Wednesday, 19 October 2022

Most of the handle-cranking is done. And considering where to take this project.

I've spent the last week or so commenting code at a furious rate as the object table structures were fleshed out and subsequently the numerous object handlers - some 67 of them - became a lot more apparent in their function. Literally hundreds of accesses to the same table entries makes for some tedious documentation but at least the bulk of the code is now clear.

In fact I would estimate at least 95% of the code has been commented now, if not 97%.

I have purposefully left a few choice sections uncommented while I pressed on with the straightforward code. Those sections remaining comprise:
  • The Domogram (path-following dome) - the movement calculations
  • Object moving and shooting involving directional calculations. Most, but not all of these involve the relative location of the Solvalou. Or to put it simply - enemies aiming for the player
  • A handful of AI variables that factor into the difficulty of the game
 Xevious is famous for claiming that the "...computer program self-adjusts the difficulty level of game play to the ability of the player at the controls - moment by moment". I have certainly seen some indication of this in the code, although I haven't sought to understand it in any detail just yet.

I have documented some of the variables that control the difficulty of the game. It's worth a separate blog entry on the subject, but the flying objects are primarily used to adjust the game play - not only the frequency at which they shoot bullets, but also the type of flying enemy that is spawned.

I was also surprised at the number of different enemies that have subtly different behaviours, but are otherwise indistinguishable apart from their point values. Not only the more obvious like the various Grobda (tanks) that move in different ways, but also some enemies that use different logic to shoot, or that respectively do or don't take into account the proficiency of the player. Again, more details in a later post.

On that note, I'm considering writing a series of articles that document the architecture of Xevious.

And it's a bit premature, but I've also been thinking about where I want to take the project from here, once the RE is complete. I'm still deciding whether I will actually attempt a transcode. And whether it will be more of a hybrid transcode/port to facilitate running on a single-processor system. And whether I'll do a C transcode, or a 68K transcode, or both. My holy grail would be to see it running on the Neo Geo, but of course that would likely only be in tate mode. I think a C transcode would probably hold up on the Neo Geo, and facilitate porting to other capable platforms. A 68K transcode would be a lot of work, but would be interesting too. Given the nature of the code, I'd even think about some sort of program to auto-generate a lot of the object handler code.

As an aside, it was announced way back in 2015 that someone was writing a port from scratch for the Atari Jaguar. It was even demonstrated at some show a while back, but since then there has been no news at all about a release. I'm wondering whether technical issues, or legal issues have been the cause of the seeming abandonment of the project... would love to get in touch with the author.

And then there's the subject of Super Xevious, which I'm sure will be heavily based on the original source. It would probably be very straightforward to work through an RE of that game.

Finally, Xevious Arrangement on the Namco Classics Vol. 1 68K-based arcade PCB. Incidentally the first two games are also included on the board - I'd be interested to see how they're implemented - maybe a transcode themselves!?! I'm actually reasonably familiar with this board as - aside from owning one myself - I wrote the MAME driver for it many years ago, and did some preliminary RE for it. There's even some debug tools hidden in the ROM!

But I'm getting ahead of myself. For now, I'll probably go back and finish the Domogram handler, then look at the directional calculations. That will allow me to finish off the few small sections of the object handlers that remain.

I think it would then be advisable to step through all 11,000 lines of the ROM code with a particular attention to detail in order to correct any mistakes or add any missing detail. This would be a good point to document all the objects and their behaviour in detail - the Namco Wiki is a little lacking in some areas.

Then the AI...

Plenty to do...

No comments:

Post a Comment