File Transfer for TRS-80 Model 100/102/200 using a Digital Audio Recorder: The Road Less Travelled…

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.

TRS-80 Model 100, still kickin' since 1983

TRS-80 Model 100, still kickin’ since 1983

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…

IMG_3844Ok, 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.

image011It 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.

2014-07-25-5Once 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.

2014-07-25-1The 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.

2014-07-25-2Well, 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:

2014-07-25-3Delete 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.

2014-07-25-42014-07-25-6What you’ll get in return is the ASCII text with some garbage characters at the beginning and ends of the chunks. Just cut out these garbage characters, and what’s left is your text file!

and here it is:

10 CLS:PRINT”Canon PS600 Timelapse”
20 PRINT”2014 – T. Munk –”
30 PRINT:INPUT”Seconds Between Shots”;D
50 I1=30
110 B=INT(I1*D)
200 INPUT “#Exposures to Shoot”;A:O=A
300 CLS:PRINT”Timelapse Program:”
305 PRINT”Shoot”;A;”Exposures”
310 PRINT”At”;D;”Second Intervals.”
350 PRINT:INPUT”Press <ENTER> To Begin”;G$
390 IF G$ = “” THEN 400 ELSE 10
411 S2=INT(D*A)
413 PRINT”*** TRS-80 Timelapse ***”
414 PRINT “<SHIFT><BREAK> To Quit.”
420 FOR X=1 TO A STEP 1
425 PRINT@122,”Exposure”;X;”of”;O
430 FOR E=1 TO B STEP 1
433 R=ABS((E/I1)-D):R2=INT(R)
435 PRINT@162,”Countdown:”;R2
440 NEXT E
490 NEXT X
495 PRINT@122,”Exposed”;X;”of”;O
500 A=O
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!

Updated: October 31, 2019 — 12:27 am


Add a Comment
  1. This reminds me of the Timex Sinclair 1000 that I used to play with. We’d transfer cassette tape files over the phone lines, using a Radio Shack battery-powered audio amp, as a makeshift modem. Fun stuff.

    1. Yeah, I got a little obsessed about it after catching up on the new AMC series “Halt and Catch Fire”. The little Model 100 shows up in enough scenes that II started thinking about it a lot. Unlike Mad Men where Selectric II’s pop up in 1959, ten full years before they actually existed, The Model 100 did in fact exist and was sold in the show’s current 1983 (it had been introduced just a few months before Comdex ’83).

      After playing around last night, I suspect that it’d be trivial to convert the cassette-save WAV files directly to plain ASCII if only I understood what the Model I/III/4 utilities were doing. It seems that the data format is the same, but the utilities just don’t grok the header bits and the handshake bits in-between the data chunks, and so can’t link the chunks together. If I understood how the format worked and knew a dang thing about Windows programming, I’d do it myself. :D

  2. I understood none of these but it sure sounds impressive. (:

  3. Well, it’s all Greek to me!

  4. Man, oh, man! Does that ever take me back! It’s great to see where we came from and get some feeling for how we got here. Kudos, Ted, for remembering it and having the guts to try to make it work with old gear. This kind of project isn’t exactly easy even with modern tools but there’s an advantage with the primitive tools in that they both forced and made possible an understanding of the low-level processes you were working with. Great example. Thanks.

    1. I agree. One of the many things I love about the Trash-80 is the fact that the technical reference manual is only a couple hundred pages long and describes in fine detail every memory address and instruction set and how each function controls each specific IC. Heck the addressable memory map for the Model 100 fits on a single page in the manual. It’s the closest I’ve come to an understanding of how software operates on hardware at the very lowest level in a computer, only possible because it’s such a simple and comprehensible system.

      Oh and after some research, it appears to me that the base carrier format of the audio is probably AFSK, which I think is also used in HAM packet-radio data transmission. It just uses frequency shifting to represent digital 1’s and 0’s as waveforms. If this is so, it would explain why the Model 1/3/4 CAS converter has no problem decrypting the plain text in the file and only chokes on the flow-control codes and headers. I have an idea about maybe writing an analyzer/decryptor in PHP, assuming I can find a library that can analyze waveforms in an audio file. Then it’d just be a matter of converting the waveforms to binary, then to ASCII and stripping out the high-ASCII headers and control codes as extraneous noise.

      Good Jebus, this rabbit hole is deep…

      1. Well, to analyze the waveforms, while you’re waiting for Goodwill to give you an oscilloscope next week, what about opening it in one of those music editing apps that are all over the net these days? At least might give you some ideas about the structure.

  5. Wow. I worked a number of roundabout ways doing various things in my earlier days with old tech, but nothing as magnificently confusing as what you did here, and I even understand most of what you said. XD

  6. You bring back a lot of memories from the late 70s early 80s. Weren’t computers fun way back then?

    1. still fun, if you do it right! :D

  7. Wow that really takes me back. This is why I like hanging out with you. I tend to just do these as thought experiments but you actually haul out the gear and DO them.

  8. Very clever and super interesting. Thanks for documenting.

  9. Thanks for sharing that WAV!! I needed to hear that sound again.

  10. What do you add to the WAV file in the header to get WAV2CAS to open it?

    1. well, the audio files have some kind of flow control codes that I eventually stripped out with the text editor once I got that far. To get the WAV file into WAV2CAS, I just had to make sure the WAV file was Microsoft 16-Bit PCM format (I used Audacity to convert it).

      1. Maybe that’s the key, that I don’t need to add anything, just strip it out? Do you have an example you might be able to send me? My e-mail is abby dot r dot adams at gmail dot com. Thanks so much.

        1. Yep, getting the WAV file into WAV2CAS simply was a matter of saving the WAV file in a format that the program would accept (16 Bit PCM). Once in WAV2CAS, you just follow the instructions above (export to CAS, then into PLAYCAS to export to ASCII text). Once you have the ASCII textfile(s) of the HEX and ASCII, that’s when you strip out the control codes. They’re represented in the text as weird boxes with 4 characters in them and you can just select and cut in your text editor. chop out all except the HEX column, then use a HEX2ASCII converter on the web to convert it to plain text.

          If you need an audio file to practice on, here’s the one from this project:

  11. When I open this file in WAV2CAS, it opens and let’s me save to CAS to but it says “bad”. Do you know why that would be?

    1. nah, it did the same to me (you can see it in one of the screenshots above – the file gets named “file 2(bad).hi.txt”) I just ignored it. it might be some comment on how the program couldn’t properly figure out the flow control codes, but it made no difference in the end.

      1. I must be doing something wrong along the way because even with the audio file above, when I follow the process outlined above with the sample audio file, I don’t end up with much hex code and barely any text when I convert it the ASCII. This is it –> œTL ªEUªS*Uªå

        Could I see the CAS file created from the sample file to see if that is where I’m having the issue?

  12. I see the sample audio file is pulled up in the WAV2CAS screenshot but when I do the same on my end, it doesn’t look anything like that…hmmmm…

    1. Now I’m seeing it…for some reason, I have to select “file 2” from the drop-down. Not sure why…but I think I have it figured out. Thanks!

      1. ahh, excellent! I assume from your username that you’re the sort that is interested in pulling info from old obsolete data tapes as more than a casual interest. Let us know if you find a better way to do this sort of thing. This is admittedly an obtuse hack born of an afternoon’s whimsy to get old computer gear working again, but it’s a hack because I couldn’t find an easier, more modern software package that did a similar task. Seems like there would be *something* out there that people use to do pull legible data from old analog data tapes.

  13. It would be nice to make a YouTube video showing how to save and load files onto a TRS 80 Model 100. Showing step by step instructions on connecting digital .WAV recorder to M100. Plus show how to connect cassette cord from the M100 to the digital .WAV recorder.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.