Emulator tests: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(→‎Controller: Zap Ruder and allpads)
(Updated test rom list)
Line 2: Line 2:


== Validation ROMs ==
== Validation ROMs ==
There is a substantial archive of test roms available at [https://github.com/christopherpow/nes-test-roms https://github.com/christopherpow/nes-test-roms]
Note: Most of these test roms can also be found at [https://github.com/christopherpow/nes-test-roms https://github.com/christopherpow/nes-test-roms]
=== Multiple ===
* [http://nesdev.org/NEStress.zip NEStress] partially tests PPU, CPU, and controller operation (old; some tests seem to always fail).
* [http://blargg.8bitalley.com/nes-tests/ Blargg's test ROMs] partially test APU, misc PPU behavior, sprite 0 hit, and MMC3 operation. Refer to [[PPU_frame_timing|PPU frame timing]] for new information that the PPU ROMs test.


=== CPU ===
=== CPU Tests ===
* [http://nickmass.com/images/nestest.nes nestest] ([http://www.qmtpro.com/~nes/misc/nestest.txt doc]) fairly thoroughly tests CPU operation. This is the best test to start with when getting a CPU emulator working for the first time. Start execution at $C000 and compare execution with a [http://www.qmtpro.com/~nes/misc/nestest.log log] from [[Nintendulator]], an emulator whose CPU is known to work correctly (apart from some details of the power-up state).
* [http://blargg.8bitalley.com/nes-tests/instr_test-v4.zip instr_test] tests official and unofficial CPU instructions and lists which ones failed. It will work even if emulator has no PPU and only supports NROM, writing a copy of output to $6000 (see readme). This more thoroughly tests instructions, but can't help you figure out what's wrong beyond what instruction(s) are failing, so it's better for testing mature CPU emulators.
* [http://blargg.8bitalley.com/parodius/nes-tests/nes_instr_misc.zip instr_misc] tests some miscellaneous aspects of instructions, including behavior when 16-bit address wraps around, and dummy reads.
* [http://blargg.8bitalley.com/parodius/nes-tests/instr_timing.zip instr_timing] tests timing of all instructions, including unofficial ones, page-crossing, etc.
* [http://blargg.8bitalley.com/parodius/nes-tests/cpu_interrupts_v2.zip cpu_interrupts_v2] tests the behavior and timing of CPU in the presence of interrupts, both IRQ and NMI; see [[CPU interrupts]].
* [http://blargg.8bitalley.com/parodius/nes-tests/cpu_reset.zip cpu_reset] tests CPU registers just after power and changes during reset, and that RAM isn't changed during reset.


=== PPU ===
{| class="wikitable sortable"
* [http://forums.nesdev.org/viewtopic.php?t=626 Sprite 0 Hit] test ROMs.
|-
* [http://forums.nesdev.org/viewtopic.php?t=567 Misc PPU Tests].
! Name
* [http://blargg.8bitalley.com/parodius/nes-tests/ppu_vbl_nmi.zip ppu_vbl_nmi] tests the behavior and timing of the NTSC PPU's VBL flag, NMI enable, and NMI interrupt. Timing is tested to an accuracy of one PPU clock.
! Author
* [http://blargg.8bitalley.com/nes-tests/sprite_overflow_tests.zip PPU sprite overflow flag timing tests] ($2002 bit 5), covering general operation, timing, and obscure pathological behavior ([http://forums.nesdev.org/viewtopic.php?p=11416#p11416 discussion]).
! Description
* [http://pics.pineight.com/nes/tvpassfail.zip tvpassfail]: NTSC color and NTSC/PAL pixel aspect ratio test ROM.
! Resources
* [http://forums.nesdev.org/viewtopic.php?f=3&t=13264 NTSC palette display]
|-
* [[Full palette demo]] displays the full palette with all emphasis states, demonstrates direct PPU color control
| [http://www.slack.net/~ant/nes-tests/branch_timing_tests.zip branch_timing_tests] || blargg || These ROMs test timing of the branch instruction, including edge cases ||
|-
| [https://github.com/christopherpow/nes-test-roms/raw/master/cpu_dummy_reads/cpu_dummy_reads.nes cpu_dummy_reads] || blargg || Tests the CPU's dummy reads || [https://forums.nesdev.org/viewtopic.php?p=31629 thread]
|-
| [http://bisqwit.iki.fi/src/nes_tests/cpu_dummy_writes.zip cpu_dummy_writes] || bisqwit || Tests the CPU's dummy writes || [https://forums.nesdev.org/viewtopic.php?t=8738 thread]
|-
| [http://bisqwit.iki.fi/src/nes_tests/cpu_exec_space.zip cpu_exec_space] || bisqwit || Verifies that the CPU can execute code from any possible memory location, even if that is mapped as I/O space || [https://forums.nesdev.org/viewtopic.php?t=8755 thread]
|-
| [http://bisqwit.iki.fi/kala/test1.zip cpu_flag_concurrency] || bisqwit || Unsure what results are meant to be, see thread for more info. || [https://forums.nesdev.org/viewtopic.php?f=3&t=8757 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/cpu_interrupts_v2.zip cpu_interrupts_v2] || blargg || Tests the behavior and timing of CPU in the presence of interrupts, both IRQ and NMI; see CPU interrupts. || [https://forums.nesdev.org/viewtopic.php?f=2&t=6510 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/cpu_reset.zip cpu_reset] || blargg || Tests CPU registers just after power and changes during reset, and that RAM isn't changed during reset. ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/cpu_timing_test6.zip cpu_timing_test6] || blargg || This program tests instruction timing for all official and unofficial NES 6502 instructions except the 8 branch instructions (Bxx) and the 12 halt instructions (HLT) || [https://forums.nesdev.org/viewtopic.php?f=3&t=3831 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/nes_instr_misc.zip instr_misc] || blargg || Tests some miscellaneous aspects of instructions, including behavior when 16-bit address wraps around, and dummy reads. ||
|-
| [http://blargg.8bitalley.com/nes-tests/instr_test-v5.zip instr_test_v5] || blargg || Tests official and unofficial CPU instructions and lists which ones failed. It will work even if emulator has no PPU and only supports NROM, writing a copy of output to $6000 (see readme). This more thoroughly tests instructions, but can't help you figure out what's wrong beyond what instruction(s) are failing, so it's better for testing mature CPU emulators. ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/instr_timing.zip instr_timing] || blargg || Tests timing of all instructions, including unofficial ones, page-crossing, etc. ||
|-
| [http://nickmass.com/images/nestest.nes nestest] || ? || fairly thoroughly tests CPU operation. This is the best test to start with when getting a CPU emulator working for the first time. Start execution at $C000 and compare execution with a log from Nintendulator, an emulator whose CPU is known to work correctly (apart from some details of the power-up state). ||
|}


=== APU ===
=== PPU Tests ===
* [http://blargg.8bitalley.com/parodius/nes-tests/apu_test.zip apu_test] tests many aspects of the APU that are visible to the CPU. Really obscure things are not tested here.
* [http://blargg.8bitalley.com/parodius/nes-tests/apu_mixer.zip apu_mixer] verifies proper operation of the APU's sound channel mixer, including relative volumes of channels and non-linear mixing. [http://blargg.8bitalley.com/parodius/nes-tests/apu_mixer_recordings.zip recordings when run on NES] are available for comparison, though the tests are made so that you don't really need these.
* [http://blargg.8bitalley.com/parodius/nes-tests/apu_reset.zip apu_reset] tests initial APU state at power, and the effect of reset.
* [http://pics.pineight.com/nes/volume_tests.zip volume_tests] plays tones on all the APU's channels to show their relative volumes at various settings of $4011. Package includes a recording from an NES's audio output for comparison.
* [http://blargg.8bitalley.com/nes-tests/apu_sweep-3.zip apu_sweep] tests the sweep unit's add, subtract, overflow cutoff, and minimum period behaviors.


=== Mapper ===
{| class="wikitable sortable"
* [http://blargg.8bitalley.com/parodius/nes-tests/mmc3_test_2.zip mmc3_test] tests the [[MMC3]] scanline counter and IRQ generation, not much else currently.
! Name
* [http://pics.pineight.com/nes/bntest.zip BNTest] tests how many PRG banks are reachable in [[BxROM]] and [[AxROM]].
! Author
* [http://forums.nesdev.org/viewtopic.php?p=102693#p102693 test28] tests the [[Action 53 mapper]] exhaustively.
! Description
* [http://pineight.com/nes/ Holy Diver Batman] by [[User:Tepples|Tepples]] detects over a dozen mappers and verifies that all PRG ROM and CHR ROM banks are reachable, that PRG RAM and CHR RAM can be written and read back without error, and that nametable [[mirroring]], IRQ, and WRAM protection work.
! Resources
* [http://forums.nesdev.org/viewtopic.php?p=142243#p142243 FME-7 IRQ acknowledge test] by [[User:Tepples|Tepples]] checks some IRQ acknowledgment behiaviors of [[Sunsoft FME-7]] that emulators were getting wrong in 2015.
|-
| [http://www.slack.net/~ant/nes-tests/blargg_ppu_tests.zip blargg_ppu_tests_2005.09.15b] || blargg || Miscellaneous PPU tests (palette ram, sprite ram, etc.) || [https://forums.nesdev.org/viewtopic.php?t=567 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-code/full_palette.zip full_palette] || blargg || Displays the full palette with all emphasis states, demonstrates direct PPU color control || [https://forums.nesdev.org/viewtopic.php?p=10658 thread]
|-
| [http://blargg.parodius.com/nes-code/nmi_sync.zip nmi_sync] || blargg || Verifies NMI timing by creating a specific pattern on the screen (NTSC & PAL versions) || [https://forums.nesdev.org/viewtopic.php?t=6589 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/oam_read.zip oam_read] || blargg || Tests OAM reading ($2004), being sure it reads the byte from OAM at the current address in $2003. || [https://forums.nesdev.org/viewtopic.php?t=6424 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/oam_stress.zip oam_stress] || blargg || Thoroughly tests OAM address ($2003) and read/write ($2004) || [https://forums.nesdev.org/viewtopic.php?t=6424 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/ppu_open_bus.zip ppu_open_bus] || blargg || Tests behavior when reading from open-bus PPU bits/registers ||
|-
| [http://bisqwit.iki.fi/src/nes_tests/ppu_read_buffer.zip ppu_read_buffer] || bisqwit || Mammoth test pack tests many aspects of the NES system, mostly centering around the PPU $2007 read buffer || [https://forums.nesdev.org/viewtopic.php?f=3&t=8847&start=0 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/ppu_sprite_hit.zip ppu_sprite_hit] || blargg || Tests sprite 0 hit behavior and timing || [https://forums.nesdev.org/viewtopic.php?t=626 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/ppu_sprite_overflow.zip ppu_sprite_overflow] || blargg || Tests sprite overflow behavior and timing || [https://forums.nesdev.org/viewtopic.php?t=1308 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/ppu_vbl_nmi.zip ppu_vbl_nmi] || blargg || Tests the behavior and timing of the NTSC PPU's VBL flag, NMI enable, and NMI interrupt. Timing is tested to an accuracy of one PPU clock. || [https://forums.nesdev.org/viewtopic.php?t=730 thread]
|-
| [http://www.qmtpro.com/~nes/demos/scanline.zip scanline] || Quietust || Displays a test screen that will contain glitches if certain portions of the emulation are not perfect. ||
|-
| [http://www.slack.net/~ant/nes-tests/sprite_hit_tests.zip sprite_hit_tests_2005.10.05] || blargg || Generally the same as ppu_sprite_hit (older revision of the tests - ppu_sprite_hit is most likely better) || [https://forums.nesdev.org/viewtopic.php?t=626 thread]
|-
| [http://www.slack.net/~ant/nes-tests/sprite_overflow_tests.zip sprite_overflow_tests] || blargg || Generally the same as ppu_sprite_overflow (older revision of the tests - ppu_sprite_overflow is most likely better) || [https://forums.nesdev.org/viewtopic.php?t=1308 thread]
|-
| [http://blargg.parodius.com/temp/sprdma_and_dmc_dma.zip sprdma_and_dmc_dma] || blargg || Tests the cycle stealing behavior of the DMC DMA while running Sprite DMAs || [https://forums.nesdev.org/viewtopic.php?f=3&t=6100 thread]
|-
| [http://pics.pineight.com/nes/tvpassfail.zip tvpassfail] || tepples || NTSC color and NTSC/PAL pixel aspect ratio test ROM || [https://forums.nesdev.org/viewtopic.php?t=3393 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/ppu_vbl_nmi.zip vbl_nmi_timing] || blargg || Generally the same as ppu_vbl_nmi (older revision of the tests - ppu_vbl_nmi is most likely better) || [https://forums.nesdev.org/viewtopic.php?f=3&t=3953 thread]
|}


=== Controller ===
=== APU Tests ===
* [http://rdev.g-pw.org/makimura/homebrew Mouse test] for a Super Famicom [[mouse]] wired in a Famicom expansion port as controller 3
 
* [https://github.com/pinobatch/zap-ruder Zap Ruder] for the [[Zapper]], including dual wield but not the serial Vs. variant
{| class="wikitable sortable"
* [https://github.com/pinobatch/allpads-nes allpads]: Multiple controller test supporting [[Standard controller|NES controller, Super NES controller]], Famicom microphone, [[Four Score]], Zapper, NES [[Arkanoid controller]], and Super NES Mouse
! Name
! Author
! Description
! Resources
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/apu_mixer.zip apu_mixer] || blargg || Verifies proper operation of the APU's sound channel mixer, including relative volumes of channels and non-linear mixing. recordings when run on NES are available for comparison, though the tests are made so that you don't really need these. || [https://forums.nesdev.org/viewtopic.php?f=3&t=4911 thread]
|-  
| [https://forums.nesdev.org/download/file.php?id=7496 apu_phase_reset] || Rahsennor || Tests the correct square channel behavior when writing to $4003/4007 (reset the duty cycle sequencers but not the clock dividers) || [https://forums.nesdev.org/viewtopic.php?f=2&t=15346 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/apu_reset.zip apu_reset] || blargg || Tests initial APU state at power, and the effect of reset. ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/apu_test.zip apu_test] || blargg || Tests many aspects of the APU that are visible to the CPU. Really obscure things are not tested here. ||
|-
| [http://www.slack.net/~ant/nes-tests/blargg_apu_2005.07.30.zip blargg_apu_2005.07.30] || blargg || Tests APU length counters, frame counter, IRQ, etc. ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/dmc_dma_during_read4.zip dmc_dma_during_read4] || blargg || Tests register read/write behavior while DMA is running ||
|-
| [https://github.com/christopherpow/nes-test-roms/tree/master/dmc_tests dmc_tests] || ? || ? ||
|-
| [http://pics.pineight.com/nes/dpcmletterbox.zip dpcmletterbox] || tepples || Tests accuracy of the DMC channel's IRQ ||
|-
| [http://www.slack.net/~ant/nes-tests/pal_apu_tests.zip pal_apu_tests] || blargg || PAL version of the blargg_apu_2005.07.30 tests ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/older/square_timer_div2.zip square_timer_div2] || blargg || Tests the square timer's period ||
|-
| [https://forums.nesdev.org/download/file.php?id=1494 test_apu_2 (1-10)] [https://forums.nesdev.org/download/file.php?id=5699 (11)] || x0000 || 11 tests that verify a number of behaviors with the APU (including the frame counter) || [https://forums.nesdev.org/viewtopic.php?f=3&t=11174 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/older/test_apu_env.zip test_apu_env] || blargg || Tests the APU envelope for correctness. ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/older/test_apu_sweep.zip test_apu_sweep] || blargg || Tests the sweep unit's add, subtract, overflow cutoff, and minimum period behaviors. ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/older/test_apu_timers.zip test_apu_timers] || blargg || Tests frequency timer of all 5 channels ||
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/older/test_tri_lin_ctr.zip test_tri_lin_ctr] || blargg || Tests triangle's linear counter and clocking by the frame counter ||
|-
| [http://pics.pineight.com/nes/volume_tests.zip volume_tests] || tepples || Plays tones on all the APU's channels to show their relative volumes at various settings of $4011. Package includes a recording from an NES's audio output for comparison. ||
|}
 
=== Mapper-specific Tests ===
 
{| class="wikitable sortable"
! Name
! Author
! Description
! Resources
|-
| [https://forums.nesdev.org/download/file.php?id=3772 31_test] || rainwarrior || Tests for mapper 31 (with various NES 2.0 headers for PRG ROM sizes) || [https://forums.nesdev.org/viewtopic.php?f=3&t=13120 thread]
|-
| [https://forums.nesdev.org/download/file.php?id=2253 BNTest] || tepples || Tests how many PRG banks are reachable in BxROM and AxROM. || [https://forums.nesdev.org/viewtopic.php?p=79826#p79826 thread]
|-
| [https://forums.nesdev.org/download/file.php?id=2247 bxrom_512k_test] || rainwarrior || Similar to the BxROM test in BNTest above. || [https://forums.nesdev.org/viewtopic.php?f=3&t=12085 thread]
|-
| [http://www.qmtpro.com/~nes/demos/mmc5exram.zip exram] || Quietust || MMC5 exram test ||
|-
| [https://forums.nesdev.org/download/file.php?id=2759 fme7acktest-r1] || tepples || Checks some IRQ acknowledgment behiaviors of Sunsoft FME-7 that emulators were getting wrong in 2015. || [https://forums.nesdev.org/viewtopic.php?f=2&t=12436 thread]
|-
| [https://forums.nesdev.org/download/file.php?id=2800 fme7ramtest-r1] || tepples || Checks how much work ram the Sunsoft FME-7 can access || [https://forums.nesdev.org/viewtopic.php?f=9&t=12467 thread]
|-
| [https://pineight.com/nes/holydiverbatman-bin-0.01.7z Holy Diver Batman] || tepples || Detects over a dozen mappers and verifies that all PRG ROM and CHR ROM banks are reachable, that PRG RAM and CHR RAM can be written and read back without error, and that nametable mirroring, IRQ, and WRAM protection work. || [https://forums.nesdev.org/viewtopic.php?f=22&t=10640 thread]
|-
| [https://forums.nesdev.org/download/file.php?id=5166 mmc3bigchrram] || tepples || MMC3 test for large 32kb CHR RAM with NES 2.0 headers || [https://forums.nesdev.org/viewtopic.php?f=3&t=13890 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-tests/mmc3_test_2.zip mmc3_test] || blargg || MMC3 scanline counter and IRQ generation tests. ||
|-
| [https://forums.nesdev.org/download/file.php?id=3753 serom] || lidnariq || Tests the constraints of SEROM / SHROM / SH1ROM variations of the MMC1 boards. || [https://forums.nesdev.org/viewtopic.php?f=3&t=9350&start=90#p153298 thread]
|-
| rowspan="4" | Submapper Tests || rainwarrior || [https://forums.nesdev.org/download/file.php?id=4299 2_test] - Mapper 2, Submappers 0, 1 and 2 || [https://forums.nesdev.org/viewtopic.php?f=3&t=9350&start=90#p157804 thread]
|-
| rainwarrior || [https://forums.nesdev.org/download/file.php?id=4302 3_test] - Mapper 3, Submappers 0, 1 and 2 || [https://forums.nesdev.org/viewtopic.php?f=3&t=9350&start=90#p154555 thread]
|-
| rainwarrior || [https://forums.nesdev.org/download/file.php?id=4301 7_test] - Mapper 7, Submappers 0, 1 and 2 || [https://forums.nesdev.org/viewtopic.php?f=3&t=9350&start=90#p157804 thread]
|-
| rainwarrior || [https://forums.nesdev.org/download/file.php?id=3771 34_test] - Mapper 34, Submappers 1 and 2 || [https://forums.nesdev.org/viewtopic.php?f=3&t=9350&start=90#p153334 thread]
|-
| [https://forums.nesdev.org/download/file.php?id=158 test28] || tepples || Tests for mapper 28 || [https://forums.nesdev.org/viewtopic.php?p=102693#p102693 thread]
|-
| [http://www.mediafire.com/download/6hvuj53omv8y3fn/vrc6test.zip vrc6test] || natt || VRC6 mirroring tests || [https://forums.nesdev.org/viewtopic.php?t=11028 thread]
|}
 
=== Input Tests ===
{| class="wikitable sortable"
! Name
! Author
! Description
! Resources
|-
| [https://github.com/pinobatch/allpads-nes/raw/master/allpads.nes allpads] || tepples || Multiple controller test supporting NES controller, Super NES controller, Famicom microphone, Four Score, Zapper, NES Arkanoid controller, and Super NES Mouse || [https://forums.nesdev.org/viewtopic.php?f=2&t=12549 thread] [https://github.com/pinobatch/allpads-nes GitHub]
|-
| [https://forums.nesdev.org/download/file.php?id=5905 dma_sync_test_v2] || Rahsennor || Tests DMC DMA read corruption || [https://forums.nesdev.org/viewtopic.php?f=2&t=14319 thread]
|-
| mousetest || || Test for a Super Famicom mouse wired in a Famicom expansion port as controller 3 ||
|-
| [https://github.com/christopherpow/nes-test-roms/raw/master/PaddleTest3/PaddleTest.nes PaddleTest3] || 3gengames || Test for the Arkanoid controller || [https://forums.nesdev.org/viewtopic.php?t=7929 thread]
|-
| [http://blargg.8bitalley.com/parodius/nes-code/read_joy3.zip read_joy3] || blargg || Various NES controllers tests, including read corruption due to DMC DMA || [https://forums.nesdev.org/viewtopic.php?f=2&t=4124&start=0 thread]
|-
| [https://github.com/pinobatch/zap-ruder/raw/master/ruder.nes Zap Ruder] || tepples || Test for the Zapper, including dual wield but not the serial Vs. variant || [https://forums.nesdev.org/viewtopic.php?t=8108 thread] [https://github.com/pinobatch/zap-ruder GitHub]
|-
| [https://forums.nesdev.org/download/file.php?id=5356 spadtest-nes] || tepples || Super Nintendo controller test (when connected to a NES) || [https://forums.nesdev.org/viewtopic.php?p=167288 thread]
|-
| [http://pics.pineight.com/nes/vaus-test-0.02.zip vaus_test] || tepples || Another test for the Arkanoid controller || [https://forums.nesdev.org/viewtopic.php?p=120455 thread]
|}
 
=== Misc Tests ===
{| class="wikitable sortable"
! Name
! Author
! Description
! Resources
|-
| [https://forums.nesdev.org/download/file.php?id=1415 characterize-vs] || lidnariq || VS System tests || [https://forums.nesdev.org/viewtopic.php?f=3&t=10276&start=15#p127592 thread]
|-
| [http://nesdev.org/NEStress.zip NEStress] || || Old test - some of the tests are supposed to fail on real hardware. ||
|-
| [https://forums.nesdev.org/download/file.php?id=2826 oc-r1a] || tepples || Detects and displays accurate clock rate of the NES || [https://forums.nesdev.org/viewtopic.php?f=22&t=12499 thread]
|}


== Automated testing ==
== Automated testing ==

Revision as of 00:47, 24 January 2017

There are many ROMs available that test an emulator for inaccuracies.

Validation ROMs

Note: Most of these test roms can also be found at https://github.com/christopherpow/nes-test-roms

CPU Tests

Name Author Description Resources
branch_timing_tests blargg These ROMs test timing of the branch instruction, including edge cases
cpu_dummy_reads blargg Tests the CPU's dummy reads thread
cpu_dummy_writes bisqwit Tests the CPU's dummy writes thread
cpu_exec_space bisqwit Verifies that the CPU can execute code from any possible memory location, even if that is mapped as I/O space thread
cpu_flag_concurrency bisqwit Unsure what results are meant to be, see thread for more info. thread
cpu_interrupts_v2 blargg Tests the behavior and timing of CPU in the presence of interrupts, both IRQ and NMI; see CPU interrupts. thread
cpu_reset blargg Tests CPU registers just after power and changes during reset, and that RAM isn't changed during reset.
cpu_timing_test6 blargg This program tests instruction timing for all official and unofficial NES 6502 instructions except the 8 branch instructions (Bxx) and the 12 halt instructions (HLT) thread
instr_misc blargg Tests some miscellaneous aspects of instructions, including behavior when 16-bit address wraps around, and dummy reads.
instr_test_v5 blargg Tests official and unofficial CPU instructions and lists which ones failed. It will work even if emulator has no PPU and only supports NROM, writing a copy of output to $6000 (see readme). This more thoroughly tests instructions, but can't help you figure out what's wrong beyond what instruction(s) are failing, so it's better for testing mature CPU emulators.
instr_timing blargg Tests timing of all instructions, including unofficial ones, page-crossing, etc.
nestest ? fairly thoroughly tests CPU operation. This is the best test to start with when getting a CPU emulator working for the first time. Start execution at $C000 and compare execution with a log from Nintendulator, an emulator whose CPU is known to work correctly (apart from some details of the power-up state).

PPU Tests

Name Author Description Resources
blargg_ppu_tests_2005.09.15b blargg Miscellaneous PPU tests (palette ram, sprite ram, etc.) thread
full_palette blargg Displays the full palette with all emphasis states, demonstrates direct PPU color control thread
nmi_sync blargg Verifies NMI timing by creating a specific pattern on the screen (NTSC & PAL versions) thread
oam_read blargg Tests OAM reading ($2004), being sure it reads the byte from OAM at the current address in $2003. thread
oam_stress blargg Thoroughly tests OAM address ($2003) and read/write ($2004) thread
ppu_open_bus blargg Tests behavior when reading from open-bus PPU bits/registers
ppu_read_buffer bisqwit Mammoth test pack tests many aspects of the NES system, mostly centering around the PPU $2007 read buffer thread
ppu_sprite_hit blargg Tests sprite 0 hit behavior and timing thread
ppu_sprite_overflow blargg Tests sprite overflow behavior and timing thread
ppu_vbl_nmi blargg Tests the behavior and timing of the NTSC PPU's VBL flag, NMI enable, and NMI interrupt. Timing is tested to an accuracy of one PPU clock. thread
scanline Quietust Displays a test screen that will contain glitches if certain portions of the emulation are not perfect.
sprite_hit_tests_2005.10.05 blargg Generally the same as ppu_sprite_hit (older revision of the tests - ppu_sprite_hit is most likely better) thread
sprite_overflow_tests blargg Generally the same as ppu_sprite_overflow (older revision of the tests - ppu_sprite_overflow is most likely better) thread
sprdma_and_dmc_dma blargg Tests the cycle stealing behavior of the DMC DMA while running Sprite DMAs thread
tvpassfail tepples NTSC color and NTSC/PAL pixel aspect ratio test ROM thread
vbl_nmi_timing blargg Generally the same as ppu_vbl_nmi (older revision of the tests - ppu_vbl_nmi is most likely better) thread

APU Tests

Name Author Description Resources
apu_mixer blargg Verifies proper operation of the APU's sound channel mixer, including relative volumes of channels and non-linear mixing. recordings when run on NES are available for comparison, though the tests are made so that you don't really need these. thread
apu_phase_reset Rahsennor Tests the correct square channel behavior when writing to $4003/4007 (reset the duty cycle sequencers but not the clock dividers) thread
apu_reset blargg Tests initial APU state at power, and the effect of reset.
apu_test blargg Tests many aspects of the APU that are visible to the CPU. Really obscure things are not tested here.
blargg_apu_2005.07.30 blargg Tests APU length counters, frame counter, IRQ, etc.
dmc_dma_during_read4 blargg Tests register read/write behavior while DMA is running
dmc_tests ? ?
dpcmletterbox tepples Tests accuracy of the DMC channel's IRQ
pal_apu_tests blargg PAL version of the blargg_apu_2005.07.30 tests
square_timer_div2 blargg Tests the square timer's period
test_apu_2 (1-10) (11) x0000 11 tests that verify a number of behaviors with the APU (including the frame counter) thread
test_apu_env blargg Tests the APU envelope for correctness.
test_apu_sweep blargg Tests the sweep unit's add, subtract, overflow cutoff, and minimum period behaviors.
test_apu_timers blargg Tests frequency timer of all 5 channels
test_tri_lin_ctr blargg Tests triangle's linear counter and clocking by the frame counter
volume_tests tepples Plays tones on all the APU's channels to show their relative volumes at various settings of $4011. Package includes a recording from an NES's audio output for comparison.

Mapper-specific Tests

Name Author Description Resources
31_test rainwarrior Tests for mapper 31 (with various NES 2.0 headers for PRG ROM sizes) thread
BNTest tepples Tests how many PRG banks are reachable in BxROM and AxROM. thread
bxrom_512k_test rainwarrior Similar to the BxROM test in BNTest above. thread
exram Quietust MMC5 exram test
fme7acktest-r1 tepples Checks some IRQ acknowledgment behiaviors of Sunsoft FME-7 that emulators were getting wrong in 2015. thread
fme7ramtest-r1 tepples Checks how much work ram the Sunsoft FME-7 can access thread
Holy Diver Batman tepples Detects over a dozen mappers and verifies that all PRG ROM and CHR ROM banks are reachable, that PRG RAM and CHR RAM can be written and read back without error, and that nametable mirroring, IRQ, and WRAM protection work. thread
mmc3bigchrram tepples MMC3 test for large 32kb CHR RAM with NES 2.0 headers thread
mmc3_test blargg MMC3 scanline counter and IRQ generation tests.
serom lidnariq Tests the constraints of SEROM / SHROM / SH1ROM variations of the MMC1 boards. thread
Submapper Tests rainwarrior 2_test - Mapper 2, Submappers 0, 1 and 2 thread
rainwarrior 3_test - Mapper 3, Submappers 0, 1 and 2 thread
rainwarrior 7_test - Mapper 7, Submappers 0, 1 and 2 thread
rainwarrior 34_test - Mapper 34, Submappers 1 and 2 thread
test28 tepples Tests for mapper 28 thread
vrc6test natt VRC6 mirroring tests thread

Input Tests

Name Author Description Resources
allpads tepples Multiple controller test supporting NES controller, Super NES controller, Famicom microphone, Four Score, Zapper, NES Arkanoid controller, and Super NES Mouse thread GitHub
dma_sync_test_v2 Rahsennor Tests DMC DMA read corruption thread
mousetest Test for a Super Famicom mouse wired in a Famicom expansion port as controller 3
PaddleTest3 3gengames Test for the Arkanoid controller thread
read_joy3 blargg Various NES controllers tests, including read corruption due to DMC DMA thread
Zap Ruder tepples Test for the Zapper, including dual wield but not the serial Vs. variant thread GitHub
spadtest-nes tepples Super Nintendo controller test (when connected to a NES) thread
vaus_test tepples Another test for the Arkanoid controller thread

Misc Tests

Name Author Description Resources
characterize-vs lidnariq VS System tests thread
NEStress Old test - some of the tests are supposed to fail on real hardware.
oc-r1a tepples Detects and displays accurate clock rate of the NES thread

Automated testing

It's best if your emulator can automatically run a suite of tests at the press of a button. This allows you to re-run them every time you make a change, without any effort. Automation can be difficult, because the emulator must be able to determine success/failure without your help.

The first part of automated testing is support for a "movie" or "demo", or a list of what buttons were pressed when. An emulator makes a movie by recording presses while the user is playing, and then it plays the movie by feeding the recorded presses back through the input system. This not only helps automated testing but also makes your emulator attractive to speedrunners.

To create a test case, record a movie of the player activating all tests in a ROM, take a screenshot of each result screen, and log the time and a hash of each screenshot. The simplest test ROMs won't require any button presses. ROMs that test more than one thing are more likely to require them, and an actual game will require a playthrough. Then to run a test case, play the movie in fast-forward (no delay between frames) and take screenshots at the same times. If a screenshot's hash differs from that of the corresponding screenshot from when the test case was created, make a note of this difference in the log. Then you can compare the emulator's output frame-by-frame to that of the previous release of your emulator running the same test case.