CPU-Only testing ROMs. I.E. no video or sound output
Moderator: Moderators
CPU-Only testing ROMs. I.E. no video or sound output
As I've finished the addressing modes and instruction execution, the CPU core, I want to test it before I go on to PPU and APU, so when I get errors there, at least I know they're not dragged from a faulty CPU emulation.
I've searched for test ROMs in the forum and in the main site, but all I found rely on the PPU for test results outputting.
I'd need a test ROM that tests for CPU instruction and addressing modes and outputs the results to a certain memory page so I can check them with a debugger. Of course the test ROM should have some sort of txt references to interpret those results.
I could make some test ROMs myself, but I might end up making the same mistakes that I made in the emu, or worst, making new ones.
I guess I will make some test ROMs anyway, but if someone can point me to one that's already out there, it would be of much help.
Thanks!
I've searched for test ROMs in the forum and in the main site, but all I found rely on the PPU for test results outputting.
I'd need a test ROM that tests for CPU instruction and addressing modes and outputs the results to a certain memory page so I can check them with a debugger. Of course the test ROM should have some sort of txt references to interpret those results.
I could make some test ROMs myself, but I might end up making the same mistakes that I made in the emu, or worst, making new ones.
I guess I will make some test ROMs anyway, but if someone can point me to one that's already out there, it would be of much help.
Thanks!
My nes_instr_test should work. While it uses the PPU if available, it doesn't hang if it's not or if it doesn't work. It outputs all text to memory as well, so you can examine it even without a PPU. See the readme for full information.
Re: CPU-Only testing ROMs. I.E. no video or sound output
...
Last edited by Zepper on Thu May 06, 2010 8:11 pm, edited 1 time in total.
Re: CPU-Only testing ROMs. I.E. no video or sound output
So?Zepper wrote:- I think annoying. Is that a big risk? I can't understand. Even if you get that test suite ok, it doesn't mean in anyways your CPU code is bug free.Petruza wrote:As I've finished the addressing modes and instruction execution, the CPU core, I want to test it before I go on to PPU and APU
One idea is implement just enough of the PPU to get games to try to boot, so that you can tell you're on the right track toward a working CPU. You'll need it in order to test your CPU's NMI handler anyway.
- Make a dummy PPU that does nothing but vertical blanking. It need not render any graphics; only $2000.D7, $2002.D7, and /NMI need to be implemented.
- Find a known good emulator that can log every executed instruction.
- In both this emulator and your emulator, run Donkey Kong, Balloon Fight, or Mario Bros. (not Super Mario Bros.) until they first turn on rendering (that is, until they write a nonzero value to $2001).
- Compare the instruction logs between the two emulators, and try to account for any differences.
FCEUX isn't perfect, but its debug menu does have a trace logger, and its CPU should be accurate enough for you to gain confidence in your own.
Used bit.ly because phpBB's BBCode parser appears not to support braces in [url] elements.
Used bit.ly because phpBB's BBCode parser appears not to support braces in [url] elements.