It all started simply enough: I came up with the idea of using my retrotech timelapse camera kit to do a timelapse of the upcoming Phoenix Type-In. Well, when you come up with these ideas, the first thing you do is check your kit and get it ready. Thus began the adventure…
I pulled the Timelapse Kit out of the closet where I had stored it some months ago, and I expected the batteries in the TRS-80 Model 100 to be dead. They were. No big deal, I changed them. Then I booted it up to find that it had sat long enough without power that the memory had cleared, wiping the resident TL.BA program that I use as an intervalometer. “No Problem” thought I, “I have a backup right here on my PC.
Well, in order to transfer the file from my PC to the Model 100, I need a null-modem cable (you remember them, right?) and a PC with an RS-232 port. I can whip up an old PC from parts in minutes that will suit, but for some reason I couldn’t find my Null Modem Cable.
Ergh. No way to transfer the file then. Well, I guess I’ll just rewrite the timelapse program. No Problemo – it’s like 20 lines of BASIC. I dusted off the Model 100’s BASIC reference manual and set to work. About halfway into it, I discovered that the Model 100’s Backspace key had stopped working… and I discovered that by not being able to delete a typo. Ergh…
Ok, that’s gonna be a problem, but I can power through it. I have my Model 200 that I can use instead. Now I just have to figure out how to get what I’d already typed from the 100 to the 200. At first I considered trying to use the PDD drives I have, but they’ve been fritzy for decades and I don’t really trust them. That left me with the old CCR-81 Cassette Drive.
It was then that I got the bright idea of trying to use a Digital Audio Recorder to transfer the files rather than the Cassette Drive. After all (I reasoned), a digital audio file will probably have better data fidelity than a 30 year old tape recorder with dry belts and a God-knows-how-old cassette tape, right?
So I gave it a try. I happen to have picked up an iKey Audio M3 at Deseret a week or two ago for $10 (smokin’ deal – still in the box!), and it can be set to record 44k Mono WAV files. After a few tries (the TRS-80 is a little deaf, and needs the sound levels just about as high as they’ll go for both recording and playback), I found I could save the files from the Model 100 to the M3 recorder and load them into the Model 200 for editing. YAY! :D
I then happily finished the timelapse program, tested it on the Model 200 and then saved it to the M3 and loaded it to the Model 100. Mission accomplished!
And then I realized that I had a digital representation of my program as an audio file on an SD card I could read on my PC. Hmmn… I wonder if anyone has written some sort of converter to read an audio file of a saved program on cassette and turn it back into ASCII? That would be a handy way of transferring files from my Model 100/200 to the PC, wouldn’t it?
It turns out that someone has… *sort of*… At least they have for the TRS-80 Model I/III/4. Completely different machines, different processor and OS, but just maybe they use the same format for recording data to tape? Might as well give it a try and see what happens… I downloaded the utilities for converting Model I/III/4 WAV files to CAS (a format used to load the programs into emulators), and to convert from CAS to Hexidecimal Text.
My first attempt wouldn’t load because the M3 recorder records a WAV file that isn’t Microsoft 16-Bit PCM format, so the first thing to do is convert it to that format. I loaded the WAV file into the Free Audacity audio editor and simply “exported” it to the proper format.
Once in the right WAV format, the file imported into WAV2CAS just fine, and I could immediately see that even though the program didn’t understand the audio file’s data headers, it could read the file and could show the HEX and ASCII contents. I couldn’t select or copy that text though. First I needed to “Save” each chunk of the packet as a separate CAS file. I did so, exporting all chunks except the first one, which contained garbage headers.
The next step is to fire up the PLAYCAS program and load each of the CAS files into it, then right-click the title bar to get the menu where you can “save text”, which finally exports the data to a plain ASCII text file.
Well, OK. Not really plain ASCII. What you get is a bunch of text files that contain the data in a HEX column and an ASCII column. This is not really what you want in the end, so here’s how to get the plain text. First, open up all the text files in a text editor (I use Notepad++) and copy/paste them all together in order. What you get looks like this:
Delete the headers and use the “Regular Expression” search/replace function to get rid of the ASCII column. All you want is the HEX column. Copy that entire HEX column and go to a HEX to ASCII converter site and paste the HEX code into the “convert” box.
and here it is:
10 CLS:PRINT”Canon PS600 Timelapse”
20 PRINT”2014 – T. Munk – munk.org”
30 PRINT:INPUT”Seconds Between Shots”;D
200 INPUT “#Exposures to Shoot”;A:O=A
300 CLS:PRINT”Timelapse Program:”
310 PRINT”At”;D;”Second Intervals.”
350 PRINT:INPUT”Press <ENTER> To Begin”;G$
390 IF G$ = “” THEN 400 ELSE 10
400 CLS:MOTOR ON:FOR Z = 1 TO 25:NEXT Z
410 MOTOR OFF:A=A-1
413 PRINT”*** TRS-80 Timelapse ***”
414 PRINT “<SHIFT><BREAK> To Quit.”
420 FOR X=1 TO A STEP 1
430 FOR E=1 TO B STEP 1
440 NEXT E
450 MOTOR ON:FOR Z=1 TO 25:NEXT Z:MOTOR OFF
490 NEXT X
1000 PRINT@162,”Ended Shoot. “
Oh, and in case you want to hear what this data file sounds like in the language of the TRS-80’s Cassette Save format, listen to this WAV file. (set your volume low first, for Jebus sakes, the TRS-80 sings one screetchy song!)
Alternately, you can use the above WAV file to load this program directly into your own Model 100/102/200!