Accuracy: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (pretty sure this is supposed to be $2007...)
(enhancement)
Line 12: Line 12:
First reduce your program to a minimal test case: keep removing things while the program continues to exhibit this difference.
First reduce your program to a minimal test case: keep removing things while the program continues to exhibit this difference.
Then characterize the behavior difference as best you can and add it to the [[Emulator Tests|test suite]].
Then characterize the behavior difference as best you can and add it to the [[Emulator Tests|test suite]].
Some emulators attempt to [[enhancement|enhance]] the games to make them appear more appealing than they did on the original NES.


== References ==
== References ==
*[http://nesdev.parodius.com/bbs/viewtopic.php?t=5797 Topic on forum]
*[http://nesdev.parodius.com/bbs/viewtopic.php?t=5797 Topic on forum]
*[https://wiki.mozilla.org/QA/Minimal_Test_Cases How to make a minimal test case] (focuses on HTML, but applies to any virtual machine]
*[https://wiki.mozilla.org/QA/Minimal_Test_Cases How to make a minimal test case] (focuses on HTML, but applies to any virtual machine]

Revision as of 13:55, 13 November 2011

Compatibility is how well an emulator produces the same output as the original system when running a particular known program. Accuracy refers to how well an emulator produces the same output as the original system when running an arbitrary unknown program. An emulator can be highly compatible without being very accurate; Nesticle was this way back in the 1990s.

Accuracy cannot be measured directly. Compatibility with ROMs designed to test obscure behaviors is a good (though not perfect) predictor of accuracy.

In many cases, an emulator is more forgiving than the hardware, especially in when a program is allowed to write to a register. Nesticle, for instance, allowed writes to $2007 at any time, when the NES allows it only on or after line 241 of each frame (vertical blanking) or when $2001 & $1E == 0 (forced blanking). Most emulators allow the program to twiddle PPU registers immediately, while the NES PPU ignores most writes for the first frame after a reset.

Whenever you discover a difference in behavior between the NES and best-of-breed emulators (like Nintendulator and Nestopia), you can help emulators become more accurate. First reduce your program to a minimal test case: keep removing things while the program continues to exhibit this difference. Then characterize the behavior difference as best you can and add it to the test suite.

Some emulators attempt to enhance the games to make them appear more appealing than they did on the original NES.

References