davidgiven / cpm65

CP/M for the 6502
BSD 2-Clause "Simplified" License
264 stars 24 forks source link

lib6502 fixes #93

Closed ivop closed 8 months ago

ivop commented 8 months ago

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

davidgiven commented 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.

ivop commented 8 months ago

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.