Friday, 30 May 2014

Mostly Playable

Tonight I finished porting the guard AI. I also did a quick audit of the ported code and discovered a few minor routines that I hadn't done and also a few lines here-and-there related to, amongst other things, the speed of the guards that I've subsequently completed.

However, there are clearly one or more bugs in the AI code (one of which causes a graphical glitch - they're generally easier to find) but nothing too major. The guards do wander around and occasionally act intelligently but more often than not get stuck or stand still. Regardless, it's a major milestone and within a session or two I'm hoping to have the demo screens running correctly and a 100% accurate and fully playable game!

It's also very good to note that without the delay loop (hack) in the main game loop it still runs too fast! Once I've ironed out the above-mentioned bugs in the AI code I'll port the original game speed throttling code, and then release a demo for beta testing whilst I attend to the rest of the missing features I detailed in my last post.

Lode Runner is approaching 4,200 lines of 6809 and it's interesting to note that my Neo Geo port of Donkey Kong is roughly the same size (68K code of course) but is only 50% complete!

I've been thinking a bit about a Neo Geo port of Lode Runner; hardware platform issues aside, it probably wouldn't be too difficult to write a 6502-68000 translator, especially given my now-intimate knowledge of the code base - even if it was in part Lode Runner-specific. That plus the fact that the rendering routines would be replaced with much, much simpler sprites, it may not be a lot of work to get something running! Food for thought...


  1. Nice to see you're making steady progress.

    At 12 MHz the Neo Geo is close to being able to emulate the 6502. Might fall a bit short, though, what with the average cycles/instruction of the 68000 being pretty high. Though it can be reasonable to write an emulator and then code the hot-spot routines in 68K as needed.

  2. I'm not experienced enough to comment either way, but you could well be right.

    At this stage my plan is a hybrid of static translation (from the source listing, not the object code) and hand-optimisation where the original code is of little relevance (such as video rendering routines). It will be an interesting exercise and may give some insight into more dynamic approaches in the future.