Wednesday 5 May 2021

It's Da Bomb!

Lack of updates because of lack of progress only because of lack of time.

I can see the light at the end of the tunnel. You can shoot and destroy all objects - on the ground and in the air - and you can launch bombs, though the latter do not have any collision detection routines implemented as yet.

Shooting and bombing

So it's getting very close now; I'd estimate at the very least 95% complete. Aside from the bomb collisions and associated animations, there's a couple of minor routines like displaying mission flags and checking for extra lives and then just testing of the high score table to go.

I haven't implemented any of the sound routines, except adding calls to sound routines wrapped in a macro that nulls them out. The missing routines involve queuing and passing commands to the sound CPU, so there's not actual sound generation done in the code. I will implemement those to facilitate sound on any ports.

Most approriate for any port would, I suspect, be adding 'simulation' of the sound CPU that simply played samples. I'll leave that until later. Likely a lot later.

I haven't added emulation of cocktail mode either, which comprises flipping the screen and reading alternate controller inputs (although the calls are there). There's likely no need for this in any port at all.

I also haven't implemented the starfield or coloured background (blue/black) as of yet. The calls are there in the code, so it's a matter of writing some Allegro code to suit. I just haven't done it yet.

I have recently introduced a rather nasty bug, or perhaps more correctly, triggered it reliably - namely a segmentation fault whenver the player is destroyed and the game is about to restart. I suspect it is related to the landscape corruption I saw earlier. I'll leave this until the transcode is done and hopefully it won't be too difficult to find. Unfortunately I haven't had much luck getting the game to run in GDB thus far.

It'll probably be a few days before I can finish the transcode, sort the segmentation fault and tidy up the rest of the code. There are the odd inefficiences that I've purposefully left in the code, I don't think they'll have any significant impact on the performance on target hardware.

UPDATE: I've added support for the blue background and fixed the segmentation fault. I had a quick look at the MAME source for the stars and I don't think there's any good reason at all to attempt an accurate implementation. In fact not sure I'll even bother with stars on the Allegro prototype, at least not unless I need to prototype something for the other platforms.

There's still a few bugs introduced with the bombs but hopefully they won't be too hard to find. Hope to be able to start on the Neo Geo port in the next few days.


No comments:

Post a Comment