ProcessorTests icon indicating copy to clipboard operation
ProcessorTests copied to clipboard

65816 Needs Edge-Case Tests

Open L-Spiro opened this issue 2 months ago • 0 comments

There are a lot of rare edge cases in 65816 that depend on an address being XXFF or FFFF and then adding an offset. For example, an operand might be at address 0x6BFFFF with the high byte on 0x6BFFFF+1. They are handled in different ways. 0x6BFFFF+1 could become 0x6B0000, 0x6BFF00, or carry into the bank (6B): 0x6C0000. Because of how rare this cases is, it simply isn’t tested in most tests, so both 0x6B0000 and 0x6C0000 implementations pass and it is impossible to know which is correct.

Either more tests need to be generated to be sure these edge cases are covered or some percentage of 10,000 tests should be biased toward (or guaranteed to be) these edges cases.

L-Spiro avatar May 01 '24 00:05 L-Spiro