Fix Intel 4004 CPU emulation bugs: opcode mapping, JCN conditions, DAA carry

- Remap opcodes 0x01-0x0F from duplicate LD to Invalid (undefined on real hardware)
- Fix JCN condition bit mapping per datasheet: C1=Carry, C2=ACC zero, C3=TEST pin
- Fix DAA instruction to clear carry when no 4-bit overflow occurs
- Rewrite fibonacci demo program with correct opcodes (FIM, CLB, LD, ADD, WRM, XCH, ISZ)
- Regenerate fibonacci.bin and fibonacci_output.bin with correct opcodes
- Update all tests to match corrected JCN condition codes
- Update plan document and README to reflect changes
This commit is contained in:
Jan-Peter von Hunnius 2026-05-12 20:55:26 +02:00
parent 6a335a15d4
commit add7ace674
7 changed files with 132 additions and 100 deletions

Binary file not shown.