I started with my Coco3 initialisation code from Lode Runner (most recently used to display the ZX Spectrum Knight Lore, Alien 8 and Pentagram title screens on the Coco3), and added all the labelled addresses and routines from the original disassembly, with appropriate RTS/BRA instructions added for the most part. I then simply copied-and-pasted the variables from the Z80 listing - a benefit of using the same assembler family. The result is a 6809 .ASM file that contains all the variables and stub routines of the original, and assembles and runs.
I couldn't stop there of course and started coding the initialisation and main routines, including the main menu display and requisite font display routines.
Knight Lore for the Coco 3 - Main Menu |
Now I only have to flesh out a few routines and it's all done - right!?!
Of course the challenge of translating Z80 to 6809 is already at the forefront of the process, and it's fair to say that the code thus far - in stark contrast to the Lode Runner port - bares little resemblance to the Z80 original. I suspect that will be par for the course on this project, and will no doubt bolster my 6809 coding skills. I just hope I don't get to the end of the port wanting to re-write the first half!
Unfortunately there's a significant amount of coding to be done before anything else gets displayed. However I do now know which routines are crucial in getting the correct display, and which ones can be omitted for the purposes of seeing something.
No comments:
Post a Comment