There is a test called cpu_dummy_reads written by Blargg.
I created a logical counterpart called cpu_dummy_writes.
As I understand it, read-modify-write instructions, such as INC, issue two writes: Once for the unmodified value, and then for the modified value.
I tried my hand at making one (sans timings), and it is here, with source code: http://bisqwit.iki.fi/src/nes_tests/cpu ... writes.zip
It includes two versions. One depends on OAM reading being reliable, and the other depends on proper implementation of the PPU's open bus.
Test results for OAM version:
-- FCEUX, oldppu: OAM reading not supported (867 errors); fails test #3 (fail #2 given)
-- FCEUX, newppu: All opcodes pass, but 5 errors in OAM read test (fail #6)
-- BNES (BSNES 087): All official instructions pass, but emulator errors out at the first unofficial instruction (technically fail #9, but error message never gets displayed)
-- Nesemu1 (my emulator): All tests pass
-- Nintendulator 0.970: All opcodes pass, but 3 errors in OAM read test (fail #6)
-- Nestopia 1.40: All tests pass
-- NES: Random failures, more often than not. This suggests that OAM reading is reliable only on emulators. Though this test can help catch buggy CPU emulators, it does not suggest overall accuracy as it is now.
Test results for the PPU memory version:
-- FCEUX, oldppu: All tests pass
-- FCEUX, newppu: 150 open bus errors, opcodes worked fine (fail #10)
-- BNES (BSNES 087): 750 open bus errors, crash at unofficial instructions (technically fail #9, but error message never gets displayed), all official instructions report failure (but this is because open bus is not implemented properly).
-- Nesemu1 (my emulator): All tests pass
-- Nintendulator 0.970: All tests pass (nags about unofficial instructions)
-- Nestopia 1.40: 15 open bus errors, opcodes worked fine (fail #10)
-- NES: All tests pass
I created a logical counterpart called cpu_dummy_writes.
As I understand it, read-modify-write instructions, such as INC, issue two writes: Once for the unmodified value, and then for the modified value.
I tried my hand at making one (sans timings), and it is here, with source code: http://bisqwit.iki.fi/src/nes_tests/cpu ... writes.zip
It includes two versions. One depends on OAM reading being reliable, and the other depends on proper implementation of the PPU's open bus.
Test results for OAM version:
-- FCEUX, oldppu: OAM reading not supported (867 errors); fails test #3 (fail #2 given)
-- FCEUX, newppu: All opcodes pass, but 5 errors in OAM read test (fail #6)
-- BNES (BSNES 087): All official instructions pass, but emulator errors out at the first unofficial instruction (technically fail #9, but error message never gets displayed)
-- Nesemu1 (my emulator): All tests pass
-- Nintendulator 0.970: All opcodes pass, but 3 errors in OAM read test (fail #6)
-- Nestopia 1.40: All tests pass
-- NES: Random failures, more often than not. This suggests that OAM reading is reliable only on emulators. Though this test can help catch buggy CPU emulators, it does not suggest overall accuracy as it is now.
Test results for the PPU memory version:
-- FCEUX, oldppu: All tests pass
-- FCEUX, newppu: 150 open bus errors, opcodes worked fine (fail #10)
-- BNES (BSNES 087): 750 open bus errors, crash at unofficial instructions (technically fail #9, but error message never gets displayed), all official instructions report failure (but this is because open bus is not implemented properly).
-- Nesemu1 (my emulator): All tests pass
-- Nintendulator 0.970: All tests pass (nags about unofficial instructions)
-- Nestopia 1.40: 15 open bus errors, opcodes worked fine (fail #10)
-- NES: All tests pass