Monday, 30 December 2013


OK, so I now at least know the cause of the slowdown - the tilemap render code that is running every VBLANK (and re-renders the entire tilemap every frame), in conjunction with the sprite render code that is running every VBLANK, in conjunction with the Donkey Kong code that is running every VBLANK - takes more than 16.7ms to run!

If I eliminate the tilemap render code, it runs at the correct speed.

The tilemap render code was always a quick 'n' dirty solution; something that would ultimately be replaced by code that directly writes to the Neo Geo 'tilemap' via macros. It was also written with absolutely no regard to speed optimisation, and one option I have in the short term is to try to speed up the code just enough to get past this issue atm. I think I will have a quick go at it (I can immediately see several ways to improve it), but if it fails without too much effort I'll just bite the bullet and implement the macros that I'm using for somewhere between 50-75% of tilemap accesses. The rest I'll have to hunt down and replace with the macros one-by-one.

No comments:

Post a Comment