Sunday, August 6, 2017

Arm the Lasers!

Now that I've just about exhausted the remaining free space in the MC-10's 8K ROM I may take some time to look at the VTEC VZ200 ROM. The message title comes from the fact that the machines were also released as the VTEC Laser if you hadn't figured that out already.

The VZ200 used a blatant ripoff of the LEVEL II BASIC ROM on the TRS-80 Model I.  They just made patches to the ROM to disable some of the commands and to add support of the different hardware.  They even filled in some unused space with sequential numbers.  Something like $FF, $FE, $FD, $FC, etc...  When you are ripping someone off, you don't want to make it too obvious right?

One thing they didn't do, is they didn't actually remove the code for the commands, they just removed them from the keyword table used by the tokenizer.  I released a ROM image back in 2007(?) with the startup message BASIC+ that I had patched with the a hex editor to add the keywords back in. (Someone had patched this before but the ROM image was apparently lost to time)  Any program written under BASIC+ that uses those commands will still run on the original ROM because the commands still have pointers in the token jump table!  This makes it much easier to port programs from LEVEL II BASIC.  There's just one little problem.  The screen editor and line buffer are shorter than the one on the TRS-80.  So you still can't just type in a lot of programs.

I spent a couple months worth of evenings creating a commented disassembly of the ROM that could be reassembled just like the MC-10 ROM I've been working on.  I had the idea of fixing a few things in the ROM including the short line length, and to reassemble the code with the unused space in a single block I could put something else in.  Sadly, that work was lost in a fire, but I may give it another go soon.  This time I'll probably automate the process a bit using comments from a disassembly of the TRS-80 LEVEL II BASIC ROM and a program to grab the comments from a scan and append them to the end of the lines from the disassembly.
The process shouldn't take long once I have the automation code worked out.  The disassembly will have to be recreated first.  FWIW, I don't plan on modifying the line buffer and editor to handle longer lines.  I have a program on the PC that will tokenize them and they will run just fine once they are loaded.  You can't edit the long lines, but it should run them just fine.  But I can still add a few optimizations I used on the MC-10 ROM to speed it up a little.  I can even create an HD64180/Z180 version that uses it's hardware multiply.

I do have several other projects I may work on.  It might be nice to write an entire project in a high level language again.  :D

No comments:

Post a Comment