Monday, 27 February 2023

Another gameplay bug squashed - potentially only one to go!

Getting really close now - fixed another game play bug! Only one confirmed, and one unconfirmed to go now... (that I know of!)

I fixed the bug where you would suddenly start to earn an extra Solvalou for every hit. I had suspected it was something to do with the dipswitch settings and bonus life calculation; what I didn't suspect was that it actually comprised about 4 different bugs! 😮

The dipswitches on the Neo Geo were a bit of a mess TBH. And for some reason, I was negating the bits when reading them which only confused matters - including debugging - further. The trick to avoiding CPU-consuming bit operations is to order the Neo Geo settings to match the bit patterns of the arcade dips, rather than preserving a nice 'natural order' for each option. It's better that the options listed for lives is "5, 2, 1, 3" (you'll likely only ever look at them once) than requiring an extra 12 instructions every VBLANK just to read the dipswitches - or a few lookup tables!

Suffice it to say, as well as incongruencies in the Neo Geo dipswitch settings, there were a few bugs in the bonus calculation routine as well (comprising 16-bit BCD addition), which meant around 64,000 you started getting Solvalou every hit. And because it worked fine at 20K and 60K, it went unnoticed for a long time, until I started patching the starting score to test the high score table and load/save.

So now I'm left the randomly exploding Solvalou, seemingly (only) when Bacura are present. At least I believe I can reliably recreate the issue every time, so I'm hoping that won't be too difficult to fix either. I'm a bit surprised that it might be related to the olde Bacura hit-box issue again (which was a bit of a bugger to find), but no solid theories just yet.

The only other issue I'm aware of is something I noticed early on when working on the scrolling - when ignoring attribute settings for tiles (can't remember fg or bg) there was a curious black square scrolling down the left-hand side of the screen. It could have been related to the Xevious sprites - which have since undergone a complete overhaul - so I'm half-expecting the issue to longer exist. But I will see if I can recreate that one as well, just for good measure.

That should cover everything, except for the purely cosmetic issue of 'sparklies' on the screen, mosty down the left-hand side. Absolute worst case, they don't affect the game at all and are easily ignored, but again it wold be nice to know what it is, and whether it can be eliminated.

I suspect it is Neo Geo sprite code running outside the context of VBLANK. It may even be the foreground layer tiles being updated - they are always outside VBLANK. If that's the case, I can look at using dirty squares and deferring update until VBLANK, or just leave them as-is. Not a show-stopper by any means, and akin to 'sprite flicker' you see on a lot of platforms being pushed to their limit.

Now, those pesky Bacura...

2 comments:

  1. You may find this 1986 interview Xevious creator Masanobu Endo conducted with Shigeru Miyamoto interesting.
    https://shmuplations.com/miyamotoxendo/

    ReplyDelete