kpmiller/emulator101

CMC implementation is incorrect

Opened this issue · 0 comments

All the variants of the emulator files have CMC (Complement Carry) implemented as "clear carry":

case 0x3f: state->cc.cy = 0; break;

It seems the test program (cpudiag.asm) does not catch that specific error and will pass the CPU as operational because it only checks that CMC results in the carry being set from 1 to 0:

STC
CNC	CPUER	;TEST "STC"
CMC
CC	CPUER	;TEST "CMC