Pages

Friday, 6 January 2023

Running on an AES again... good news... and bad news.

I ran the latest build of Xevious on my AES... and some very unexpected results!!!

First and foremost, the VBLANK ISR is running to completion during the vertical blanking period (no red line on the display). I have confirmed with a delay loop that extending the ISR does result in a red line. So that's good news.

However, the first 2 routines in the SUB CPU should be running in VBLANK as well... I need to reorganise the code slightly to make that happen. The 2nd of those routines is the as-yet unoptimised scroll routine.

Much to my amazement, the game is running at 100%! With the ISR running to completion, and both the MAIN and SUB programs running well within one frame, it seems there's plenty of overhead left on the Neo Geo when running the game. I guess the 12MHz 68K is up to the task of running code for two 3MHz Z80s - especially considering it's running around half the number of instructions!

One last unexpected result, and certainly an unwelcome result, black lines in the background layer. They start out once every screen or so, then seemingly increase in frequency to every few rows. At this early point I don't have much of a theory at all; I can't see how it could be caused by back-to-back VRAM accesses... so at a bit of a loss.

Still, the fact that the Neo Geo performance is more than adequate is by far the most significant result to come out of the experiment! Very happy to see it running at 100% and I haven't even got to the most important optimisation.

UPDATE: It seems the black lines are caused by reading from VRAM too soon after setting the VRAM address register. I confirmed this by adding a delay before the read in one of two places where this is a potential issue, and it improved the situation quite a bit. This has only started to happen after I've optimised the routines... I've done too good a job? 😜

No comments:

Post a Comment