mirror of
https://github.com/mre/mos6502.git
synced 2026-01-23 00:16:10 +00:00
Fixes critical bugs in the 6502 emulator and successfully passes the Klaus2m5 functional test suite, one of the most complete test suites for 6502 emulators (~30 million instructions). Along the way, we fixed stack operation bugs that were preventing proper execution: - RTI: Removed extra pull_from_stack() and fixed PCH retrieval - RTS: Removed extra pull_from_stack() and fixed PCH retrieval - PLA, PLP, PLX, PLY: Fixed to use single pull_from_stack() call - pull_from_stack: Fixed to increment SP before reading (6502 SP points to next available slot, not last used) The emulator now passes one of the most rigorous 6502 test suite that I know of, which provides high confidence in our emulation correctness.