Monday, 14 April 2014

Apple II Lode Runner

Check the link in my previous post for a low-down on my history with Lode Runner - and trying to get it running on the TRS-80 - but suffice it to say that I'm quite fond of the game! In particular, the original - and definitive - Apple II version.

So it is only very recently that I find myself, after all these years of talk, starting on the long road to porting the 6502-based Apple II version to the Z80-based TRS-80 Model 4/4P (utilising the uLabs Grafyx Solution hires board). Not content with one port, however, I also intend to port it simultaneously to the 6809-based TRS-80 Color Computer (Coco) 3.

And I'm also considering attempting a port to the 68K-based Neo Geo, but I'm yet to convince myself that it's technically possible on the ROM-based tile/sprite system. Perhaps I'll know more the further I get into the project, but at this point I'd have to say that it's unlikely I'll attempt it in parallel with the other two. The Amiga, OTOH, may have been more likely, but a port already exists.

As for my approach; although Sockmaster has proven that it is unnecessary to understand much of the original code in order to port it to another platform, I have every intention of producing a 100% complete reverse-engineering (i.e. commented disassembly) of Apple II Lode Runner. If nothing else, I'm interested in how the original program was coded, but I also believe it will make porting to another platform - and in particular multiple platforms - much easier.

Until my most recent project, I worked on the disassembly until it was as complete as I could get it before I started to port the code to another platform. That works well enough, but it's a hard slog and there's always a point in the process that requires a lot more work for little gain. And there it's difficult to keep motivated.

For my Donkey Kong Neo Geo port, I decided to start the port right from the beginning. That decision probably had more to do with the fact that I had absolutely no knowledge of programming the Neo Geo hardware, and I wasn't quite sure if I was going to be able to do it, so I started with a simple static screen rendering. It went from there and so far has worked out well, so I'm taking the same tact with Lode Runner. And a double dose, in fact.

Anyway, it's going to be an interesting process, and perhaps a good exercise in comparing the 6502, Z80 and 6809 processors. FTR my 6502 is very weak (I've done very little disassembly and certainly never written as much as a line of code), my 6809 perhaps a little less so (I've disassembled a few things and written some code), but my Z80 is far and away my strongest suit. I'll be curious to know if a relative novice 6809 coder can write more efficient code than an experienced Z80 coder!

Next post I'll touch on the Lode Runner code, the Apple II hardware in contrast to both of the TRS-80 machines, and perhaps document my current progress.

No comments:

Post a Comment