So...I decided to have a stab at writing a program that takes text input from the ZX81, and converting it into a PC-compatible .TXT file that will open up in Notepad. Pointless, yes. Time-consuming, yes. Possible? Yes!
The .TXT file format is, thankfully, very simple. Even so, you can dispense with all the technicalities - a file with a .TXT extension will by default open in Notepad, regardless of what's in it, and the ASCII characters for its contents will be displayed.
Biggest problem here, of course, is that the ZX81 doesn't use ASCII, but has it's own very non-standard character set.
Not a problem - just knock together a program that takes a string, analyses each character, and converts it. That's what I've done - see attached. It works by taking what you type into the INPUT statement, taking each ZX81 character value, converting it to the ASCII character value, and then poking it into memory. When it finishes poking, the ZX81 saves the data as a memory contents file with a .TXT file extension - and when you pop the SD card into your PC and click on it, it opens. Perfectly.
Line 3000 in the program sets the directory on the SD card for the .TXT file to "PC", as that's how I have my card set up, but obviously you can change this.
The way I've set this up, standard upper-case letters on the ZX81 convert into lower-case letters on the PC file, and inverse-video characters are upper case. All the ZX81's standard characters convert. Doing the letters and numbers was easy as they're in blocks that translate simply enough to ASCII, but the punctuation was a pain in the arse, because the ZX81 and ASCII punctuation characters are in a completely different order. This massively slows the program down and makes it pretty clumsy.
On top of the ZX81's normal characters, shift-graphic 1 produces an apostrophe, inverse-full stop produces an exclamation mark, and the keyword AT (function-C) produces the "@" symbol. I'll add more when I find the time. To get the " symbol, use inverse-" rather than shift-q (it just seemed easier to do it that way).
Anyway - I hope you have fun with this. Any suggestions on how to make it work better, or on a better way to get text in (obviously using INPUT limits you to 700 or so characters) would be welcome.
Enjoy.
![Smile :)](./images/smilies/icon_e_smile.gif)
Lee