Remix.run Logo
▲ anyfoo 4 hours ago

Do you test every possible input/output combination on any CPU?

No, because that would be impossible.

You perform a series of more specific tests. In this case, it's "working" in so far as that Super Mario Bros. appears to be playable, for example.

Does not mean that it behaves perfectly according to some spec, or identical to another CPU (like the NES's 6502), of course, but it's clearly a working CPU to some 6502-compatible extent.

▲dbreunig 3 hours ago | parent [-]

This is a case where we basically did test it on everything! Because the emulation community maintains conformance tests with over 3k of golden instructions. (And this is why Opus was able to so effectively build it; it found the tests)

▲anyfoo 3 hours ago | parent [-]

Yeah, but that still doesn’t mean there aren’t theoretical bugs. Testing every input would effectively mean testing every stimulus, which is combinatorially impossible. You might still have subtle timing bugs, bugs with very uncommon instruction sequences etc.

But my point was exactly that the (extremely vastly) smaller subset of tests that you performed is more than enough to proclaim a CPU to be “working”.