I did manage to code the Z-order algorithm yesterday during my lunch break, and today during the same I debugged it.
Z-order implemented; contrast this with the previously-posted screen shot |
I also ported the delay loop code verbatim from the ZX Spectrum and although it does produce more consistent results between screens, it still runs too fast on empty rooms. Overall the results are encouraging, and although there is still code to be added, I think the performance of the original game is within reach of the Coco3.
What remains includes jumping, object collision/interaction, pick-up/drop and a few details like handling player dying, end of game, etc. Finally of course is filling out all the stub routines for the sprite update handlers. If I had another week here I could probably finish it off before returning home.
The immediate task however is to find and fix the handful of glitches I have with the rendering. These glitches cause occasional extraneous pixels and/or wiping of small rectangular areas that shouldn't be wiped, or perhaps should be re-rendered. They might take some effort to track down, but the fixes should be trivial.
UPDATE: In between FPGA builds I've got Sabreman jumping. It required only a handful of lines to initiate the jumping; the rest is handled in the already-ported routine that moves the player.
I also took an audit of the outstanding code. Simply counting lines and comparing Z80 and 6809 listings suggest I'm about 60% done; that sounds about right, keeping in mind the most challenging code is well behind me now. I also listed the routines that are still remaining, and there's certainly nothing technically challenging in there. From here-on in it's just a matter of finding the time and cranking the handle.
When I started this, I thought how cool it would be to release a cartridge with all three filmation engine titles - Knight Lore, Alien 8 and Pentagram. The thought of porting all three to 6809 seemed terribly daunting at the time. Right now however, it is definitely something I would consider, depending on the level of interest in Knight Lore when it's eventually released.
No comments:
Post a Comment