Saturday 5 November 2022

Too many sprites spoil the transcode!

A few frustrating hours thinking that my background layer sprites weren't visible, when in fact buggy code elsewhere meant they were being created and then wiped before I could see them. I must have walked through the same routines a half dozen times in the last 48 hrs looking for a bug that didn't exist... though that's arguably par for the course for any software development really.

Background and foreground layers - final implementation?

It may look like I've taken a step backwards from the last screen shot, but I think I've finally nailed down the implementation of the two tilemap layers on the Neo Geo. You'd think that 384 sprites - 96 on any scanline - would be more than adequate for a 1982 Z80-based arcade game with discrete graphics hardware... but when you have to scale down the target system sprites and emulate dual tilemaps it can become an issue! I'm confident though that I've managed code around these limitations with a solution that allows me to coordinate the original scrolling variables with what's happening on the Neo Geo screen relatively easily.

Hopefully - it's yet to be tested!

Coined up and started a game... can you tell?

It may not look very good, but the only thing missing from the latest implementation is the background layer colour/attribute RAM, which is why the tiles aren't rotated correctly or have the correct colours. The code has been implemented in other - obsolete - routines already, I just need to port it across. There is one issue though; 1 bit of the colour index is dependent on the tile code, which means in theory the tile colour needs to be (also) updated whenever a new tile code is written to the background layer video RAM.

Next step is to complete the abovementioned background layer colour/attribute RAM implementation and then I can look at scrolling. If that's as straightforward as I'm hoping it will be with my new implementation, then within a few days I should have complete, perfect, implementation of both layers! Then I can start fleshing out the rest of the code in preparation for adding the Xevious sprites!

And there's the small matter of finishing the RE as well... 😉


No comments:

Post a Comment