Thursday 17 November 2022

This project is starting to tank (and that's good!)

Some free time today to work on Xevious. Added a few more ground-based object handlers - enough of each of them to see them appear at least - and stubs for other functions that needed to be defined. A few of the objects have pulsating colours! I also took the opportunity to fix the sprite placement - they're exact now.

A few more ground-based objects implemented

One thing I forgot to mention last post is that I've just split the Xevious core source into 2 files; main and sub for each of the CPUs. The main in particular is going to be huge, and the only shared information between them are a couple of routines and a handful of memory variables, so it made sense. The sub will likely be finished sooner rather than later as well.

I'm finding I only need about half the number of 68K instructions to manipulate the object tables in the handler functions as compared to the Z80 code - often even less! As an example, the handler for the Barra (Pyramid) is 23 instructions in Z80, and only 10 in 68K! And using .equ for member offsets in the table, a lot of it is self-documenting.

I only just realised that I had the sprite layer on top of the foreground tilemap layer! Only noticed when the Grobda (tanks) scrolled onto the screen in front of the High Score text! Fortunately all that was required was to change two .equ values and re-assemble - it pays to take the time to avoid magic numbers in your code!

My choice now is to continue with map parsing and adding handlers - or at least stubs - for new objects, or implementing bombing. I'm undecided. In any case, I might have a break until tomorrow...

No comments:

Post a Comment