Casio PB-100 Series Communication Utility ===== ====== ====== ============= ======= This Pd patch makes your PC communicate with the FA-3 tape interface of the Casio PB-100, FX-700P and similar early Casio Basic calculators. The FA-3 uses the "Kansas City Standard" (KCS) to transfer Basic programs stored on the calc as an audio signal which encodes binary data at 300 bps. A 1200 Hz tone denotes a binary 0, a 2400 Hz tone a binary 1. KCS dates back to the venerable first microcomputers like the Altair, and was used as a cheap way to record data and programs on tape recorders when floppy drives still cost a small fortune. It was subsequently employed by various Basic-programmable calculators produced by Casio and other manufacturers in the 1980s. More information about KCS can be found on Wikipedia. A description of the hardware of the Casio PB-100 series of calculators and their implementation of the KCS interface is available at http://www.pisi.com.pl/piotr433/. For a closer description of the inner workings of this patch, please have a look at the kcs-example package available from the same source. This program is distributed under the GPL, see the COPYING file for details. The program works great for me, but please note that there's NO WARRANTY that it will do the same for you. In particular, if you fry your audio interface by using this program I don't want to hear about it. Installation ============ The patch requires three externals to work: kcs~, a KCS signal decoder written in Faust; bit~, an external written in C which translates the output signal produced by kcs~ to a control stream of 0 and 1 values; and scrolllist, a scrolling text display available at http://ydegoyon.free.fr/software.html. Precompiled Linux binaries of these are included in the package. Moreover, most of the symbolic processing of the decoder is actually implemented as a Q script, so you need to have the Q interpreter and the Pd/Q external installed, available at http://q-lang.sf.net/. For transferring Basic programs back to the calc, you'll also need the following two utility programs: bas2fx70 (a hacked version of the program found at http://www.pisi.com.pl/piotr433/, which translates Casio Basic to a binary format) and wave730 (from http://www.mvcsys.de/doc/casioutil.html; a program to convert the binaries to a waveform in KCS encoding). Linux binaries for these can be found in the bin subdirectory, you should copy these to some directory on your PATH. The zipped sources for all third-party stuff can be found in the util directory. Moreover, the toplevel directory contains a Makefile which allows you to recompile the kcs~ and bit~ externals if necessary, by running "make clean" and then "make". If you also want to recompile the Faust source of the kcs~ external, you need to have the Faust compiler installed, available at http://faust.grame.fr/. Usage ===== The CasioComm.pd patch is the main program which takes KCS audio input and prints the translated output in a scrolling text display. The patch has an autosensing feature which makes it start decoding automagically when it senses an input signal. If this doesn't work for you, then you can uncheck the "autosense" toggle and start/stop decoding manually by checking and unchecking the "start/stop" toggle (make sure that the "dsp" toggle is checked before you do this). The patch also has a "thru" toggle which passes the input signal to Pd's audio output so that you can listen to the input signal while it is being processed. (ONLY CHECK THIS BUTTON if you know what you're doing. Listening to these rapidly changing sine tones at high output volume can cause DAMAGE TO YOUR EARS!) When using autosensing, you run the decoder by simply hooking up the white minijack of your Casio FA-3 interface to Pd's audio inputs (usually via the microphone or line input of your PC) and issuing the "SAVE" or "SAVEA" command on your Casio calculator which will transfer the current contents of the calculator's Basic program memory. The decoder should then do its thing, printing the decoded program text in realtime. (You'll have to be patient, as even transmitting a simple 3-lines Basic program at 300 bps takes its time. ;-) When running without autosensing, you'll first have to check the "start/stop" toggle, then start the transmission on the calculator, wait for the transmission to finish (i.e., until the calculator prompts you for the next input line) and finally stop the decoder by unchecking "start/stop" again. Once the program has been transferred, you can store it in a text file simply by pushing the "save" button and entering a filename. To transfer a Basic file back to the calculator, connect the black plug of the FA-3 to the phones output of your soundcard. Then push the "load" button and select the filename. If compiling the file was successful, you will be prompted to press ENTER to transfer the program (after executing "LOAD" or "LOADA" on the calc). You can also press ESC to abort the transfer at this point. Enjoy! :) 2007-03-04 Albert Graef