A seminal title for the ZX Spectrum |
Recent developments include identification and partial commenting of the recursive sprite/object priority-encoder algorithm (which I've yet to port) and - quite obviously - the 3D-to-2D translation and rendering routine.
For reasons not readily apparent to me, each of the game's sprites has a routine that tweaks the display coordinates; some are hard-coded and some depend on other factors. Why at least the hard-coded values weren't implicit in the sprite data is beyond me...
Next step is to render a room with foreground objects, which are handled differently to the background objects since multiples of which can appear anywhere in the room, and can also move around. However I believe I've already reverse-engineered most of that logic already. Like the background objects, it'll be a matter of implementing all the per-sprite tweaks that will take most of the time.
Still a few holes in my understanding of the data structures and variables but it's all coming together and I feel I'm heading towards the home stretch; less analysis and more handle-cranking - which isn't a bad thing. I still find the idea of a 6809 port a little daunting, but it's also a good chance to hone my 6809 coding skillz.
Not having any ZX-Spectrum experience, I may have to turn in my retro gaming card. However, Google helped me find the game so I'm going to hang on to the card on a technicality.
ReplyDeleteThose Rare guys are pretty damn good coders (see arcade Killer Instinct's MIPS software blit as one example). Thus I'd expect their code has good reasons to work in a certain way.
It's puzzling that a bunch of sprites have hard-coded display offsets; try as I might I can't come up with a reason why that would be a good idea knowing what I know about the game. Having said that, there's still stuff I don't know yet...
ReplyDeleteI'm starting to wonder whether this might actually work on the Grafyx Solution - albeit with flicker without a double-buffer - and it would of course be much easier to port to another Z80 machine.