Work on a NES sound engine raised my interest, how much CPU time sound engines from commercial games take. I got idea that I could measure it if I mod a NSF plugin, and tried it. I took Nosefart (was easy to compile, no other reasons) and added a cycle counter into it. I'm not sure it gives correct results, though, because some numbers are somewhat strange. I would understand if the numbers were too large (some non-sound code leaved in a NSF), but they are actually unbeliveable small.
For comparsion, numbers for my engine are <2000 cycles average, 3866 max (measured with VirtuaNES mod).
Some results for some games:
Batman, first stage - 1085, 3780
Battletoads, title song - 482, 1820
Battletoads and Double Dragons, title song - 726, 3344
Contra, first stage - 1090, 4554
Megaman, Cutman stage - 2311, 7639
Ferrari Grand Prix Challenge, title screen - 1583, 4317
Average here is per 1000 frames.
Would be interesting to compare this with results from VirtuaNES, through hacking. Experienced NSF ripper could do that rather easily.
If you want the modded plugin, it is here. It creates a text file after you stop song. When used with Winamp, seems you have to restart the Winamp to reset min/max (by some reason).
For comparsion, numbers for my engine are <2000 cycles average, 3866 max (measured with VirtuaNES mod).
Some results for some games:
Batman, first stage - 1085, 3780
Battletoads, title song - 482, 1820
Battletoads and Double Dragons, title song - 726, 3344
Contra, first stage - 1090, 4554
Megaman, Cutman stage - 2311, 7639
Ferrari Grand Prix Challenge, title screen - 1583, 4317
Average here is per 1000 frames.
Would be interesting to compare this with results from VirtuaNES, through hacking. Experienced NSF ripper could do that rather easily.
If you want the modded plugin, it is here. It creates a text file after you stop song. When used with Winamp, seems you have to restart the Winamp to reset min/max (by some reason).