Closed ivop closed 8 months ago
Good grief. I'd no idea it was that bad. I wonder whether a different emulator core would be preferable; I find lib6502 almost impossible to read.
For a recent project I did (https://github.com/ivop/random6502) I used the emulator by Ben Zotto (https://github.com/bzotto/MCS6502). Another interesting emulation approach is https://github.com/floooh/chips/blob/master/chips/m6502.h but most of that code is machine generated and the accuracy is probably overkill for our usage.
Fixes for lib6502.
Mostly ported from PiTubeDirect project and adjusted for your version.
Tested with Klaus Dormann test suite. Passes both 65C02_extended_opcodes_test.bin and 6502_decimal_test.bin.
I could add the test harness to the repo if you want?
Regards, Ivo