I finally got around to running Klaus Dormann's 6502 functional test against the M6502A MPU model for py65. It passed all 6502 tests, including the BCD adc/sbc tests.
I did find two typos in the instruction dispatch table: (1) where I dropped the leading 's' from the python self object reference, and (2) where I somehow deleted '
ro_' from an address mode function call for
abs addressing for the
and abs instruction.
I don't know why I've procrastinated so long on running that code against my python processor model. I used to run regularly against my soft-core model. Guess I didn't want to debug any errors that those tests may have found.
I will have to assemble Klaus' 65C02-specific test routines, and run those sometime soon.
Code:
.g 400
PC AC XR YR SP VM NVMBDIZC
M65C02A: 3A32 0001 00B4 00FF 01FC 0000 01111001
0000 0000 0000 01FF 0000 DELYXSIZ
0000 0000 0000 00000000
.cycles
Total = 65088958, Num Inst = 26311402, Pgm Rd = 44504558, Data Rd = 15091228, Data Wr = 5493172, Dummy Cycles = 0
CPI = 2.47, Avg Inst Len = 1.69, Time = 147.366, time / cycle = 0.000002, MIPS = 178544.59