AndreaOrru / LaiNES

Cycle-accurate NES emulator in ~1000 lines of code
BSD 2-Clause "Simplified" License
1.49k stars 115 forks source link

Add some tests #19

Open AndreaOrru opened 7 years ago

AndreaOrru commented 7 years ago

At least check if it compiles correctly.

kraln commented 7 years ago

I would be super interested in tiny unit tests for each mapper. They'd have to be 6502, and the unit test suite would load each up. Then they would run their tests, and write the result to a special memory address to let the test suite know.

Does this even make sense?

AndreaOrru commented 7 years ago

Yes it does. Good stuff.

kraln commented 7 years ago

I found a fairly exhaustive set of tests called "Holy Diver Batman" It covers SxROM (1), UxROM (2), TxROM (4), AxROM (7), PNROM (9), FxROM (10), INL-ROM Action 53 (28), BNROM (34), NROM/CNROM/GNROM (66), JxROM (69), IF-12 (78.3), TxSROM (118), UxROM (180)

Binaries: http://pineight.com/nes/holydiverbatman-bin-0.01.7z Source: http://pineight.com/nes/holydiverbatman-0.01.zip

kraln commented 7 years ago

Note: seems MMC1 and MMC3 fails the holy diver tests

More on testing here: https://wiki.nesdev.com/w/index.php/Emulator_tests

kraln commented 7 years ago

Also good targets for testing: http://wiki.nesdev.com/w/index.php/Tricky-to-emulate_games