Closed pinobatch closed 6 years ago
Which emulators out there currently support profiling and benchmarking?
It doesn't have to be a full NES emulator. It can be just a 6502 simulator with the most basic of I/O, perhaps fake6502 or another on 6502.org's list, and still work. Memblers wrote a basic NSF benchmark tool; perhaps we could build on that.
Another angle is to let Pently's NES demo profile it, using a similar technique to the overclock test in the NES port of the 240p Test Suite.
It would involve placing sprite 0 at such a position that a known number of cycles elapse between sprite 0 off and sprite 0 on. There are two such numbers: one for PAL NES (which transposes everything up a semitone) and another for NTSC and Dendy (which does not).
The NES allows 29,780 CPU cycles per frame, shared among input, game, simulation, graphics, and audio code. A game architect considering integrating Pently would want to know how many cycles it uses for typical music. So it needs a test case running the NSF in a 6502 simulator capable of logging how many cycles each frame takes, and then post-processing the log to show average, 99th percentile, and maximum times.