So, I'm developing a demo using ca65. My goal is to add as many standard common features and then see what game I could make with that.
But one thing struck me that I thought maybe I was doing wrong, so I went on to test it. At the start of the nmi I do the OAM DMA transfer, meaning it would update sprites with their state on the previous frame. I thought maybe this was weird, but I think this is advised because of some timing issue (do DMA first). Well, for TESTING I tried this:
Code: Select all
NMI begin: 1 - read controllers 2 - game logic 3 - OAM DMA 4 - scroll 5 - game clock (just 16-bit increment to a reserved ram location) 6 - famitone update 7 - RTI
So, I made a list of screen reaction to controller input. I only tested in-game, as in, when actual gameplay was happening, not title screens or such. Also, I tried several different moves to see the one that was more responsive. Sometimes a character deliberately takes a frame or two before jumping. Sometimes it is inconsistent and seems to be related to how much is going on in the screen at the time.
The count is I pause fceux, hold a button and hit frame advance. When I see the reaction I count how many times I pressed frame advance. So 2 is the minimum.
Here are the results:
2: Super Mario bros 3, Adventure Island, Battle of Olympus, Zelda 2, Kick Master, Batman, Amazon Diet, Yo! Noid, TMNT 2, Contra, Castlevania, Chip and Dale, Battletoads, Donkey Kong, Ghosts'n Goblins (very inconsistent though), Ghostbusters (tested on the car scene), Adventure Island 3, Pac Man (tengen), Lode Runner, Street Fighter 2010, Super Mario Bros, Simpsons Bart vs Space Mutants, Captain Comic, Rockman (inconsistent), Rockman 2, Rockman 3, Rockman 4, Rockman 5, Rockman6, Metroid, M.C kids, Ninja Gaiden, Ninja Gaiden 2, Ninja Gaiden 3, Mario Bros, Balloon Fight (inconsistent)
3: Arkanoid, Yie Ar Kung-Fu, Castlevania 3, Double Dragon (very inconsistent, sometimes takes as many as 11 frames to punch), Dr. Mario, Super Pitfall (original and my hack), Kid Icarus, Gradius, Punch-Out, Elevator Action, Gauntlet, Holy Diver
5: Tiger-Heli, TMNT
6: Double Dragon 2, Double Dragon 3
Now, out of the games that reacted in 2 frames, some of those I didn't test a lot, and many of them did start playing the sfx immediately. Out of the other games (3+ frames) I tested several different moves and situations to see if it would lower the response time, and I wrote the lowest I got.
I was really surprised to see the Double Dragon games perform the way they did.