||"dawnbreak in the west"|
Monday, March 16, 2015
How to rip text from a TRS-80 DSK image
I've let out here and there, on this blog, that before I moved here I owned a TRS-80 Color Computer and a lot of old magazines. I managed to save some of the product. I've mentioned TIMPIST; there's more where that came from.
Bad news: It was all locked away on stuff I couldn't access easily. Good news: Last night I spent some hours figuring out how to get at it.
So. Say you've inherited a collection of .BAS files on a .DSK image, and you want to read 'em in a text editor. You could, I guess, read the files straight off the .BAS with Pilot352's CoCoDSK viewer. Problem with that is that everything in the DSK's likely all "tokenised". That means that the original CoCo has helpfully (for the CoCo) turned the program's BASIC words like "DRAW" and "PLAY" into single-character tokens. This saves space on the disk, and the computer likes it; but you don't want to put up with that - you're a human.
I haven't yet found a shortest-way (heh) to render .BAS on .DSK to text. Until we get that, here's what to do instead: load up and save that .BAS file again, this time as ASCII. Pilot352 says his app works great at reading ASCII and, despite some weirdness in the app, he's more right than not.
If you can boot up your CoCo in tandem with your PC, bully for you, but that won't work for everyone. For the rest of us there's a solution: emulators. Personally I use Xroar. You will, also, need to get your old CoCo's ROM onto the Xroar folder on your PC - and said CoCo's DOS ROM. There will likely be three files you'll need for that: the normal BASIC, the extended BASIC and also the DOS. There are ways of ripping all this from your CoCo; once you've done that, at least you won't have to do it twice. Others can try the Color Computer Archive. (I am assuming for the latter that you had once owned a legal CoCo, and simply left it in an attic in an old house or something.)
When you have the files in gear - say you had a CoCo 64 - create a batch file with this in it:
xroar -vo sdl -machine cocous -bas color64bas.rom -extbas color64extbas.rom -cart rsdos -dos disk10.rom -ram 64 -kbd-translate
Now run Xroar. Oops! It probably won't work. So run Xroar by way of that batch file. You SHOULD get that lovely green screen. Now mount the .dsk as a disk (Insert Disk in Xroar); remember to make it write-enable and write-back. You can now go to your green screen and "DIR" the disk; and - more to the point - you can "LOAD" the .BAS file you want. "LIST" it to make sure: woot! detokened! Now, "SAVE X.ASC, A" to get that thing into ASCII. When you exit this screen, the .DSK should be updated with the new ASCII file. Load up CoCoDSK, read it in, and you'll have your detokenised ASCII right there in the window.
On this site
Property of author; All Rights Reserved