Commit graph

15 commits

Author SHA1 Message Date
6a335a15d4 Fix Intel 4004 CPU instruction set and improve MCS-4 timing accuracy
Overhaul the Intel 4004 instruction set to match the real opcode map,
adding missing instructions (NOP, FIM, FIN, JIN, ISZ, KBP, DCL, WR0-3,
RD0-3) and refining two-byte instruction handling with proper M1/M2
data phases.  Rewrite the CPU fetch-execute cycle to correctly process
two-byte opcodes across separate clock cycles.

Improve Intel 4001 ROM timing with M1/M2 nibble phase tracking and an
A3 wait counter so the ROM drives data only when the CPU expects it.
Fix state-machine transition helpers in Intel 4002 and 4003 to capture
the old state before processing events, preventing incorrect exit/entry
callbacks.

Add non-propagating pin driver methods to prevent deadlocks caused by
bidirectional pin connections during signal propagation.

Add Fibonacci integration test and opcode fix plan document.
Update all README files to reflect the new instruction set.
2026-05-12 19:32:01 +02:00
54144d10e9 feat: migrate to parking_lot mutex and add system control architecture 2026-02-28 18:27:27 +01:00
6636417d18 feat: Add real-time data display for CPU registers, RAM, and ROM 2026-02-26 19:36:59 +01:00
3530ea5f28 refactor: clean up test suite and apply code formatting
Remove redundant/obsolete tests from intel_400x_tests.rs, retaining core test coverage for Intel400x common functionality. Apply rustfmt formatting to intel_4002.rs and state machine test files.

Changes:

- Remove ~40 redundant test functions from intel_400x_tests.rs

- Apply rustfmt formatting to intel_4002.rs

- Fix import formatting in state machine tests

- Clean up trailing whitespace
2026-02-26 14:32:52 +01:00
c9f39aa600 fix: RESET pin active-LOW and clock edge state reset 2026-02-26 11:04:25 +01:00
1cf2cd6e2b fix: address latching timing and cleanup debug code 2026-02-25 11:55:16 +01:00
20884b57c3 feat(cpu): add A1/A2/A3 address cycle timing and fix pin propagation 2026-02-24 18:58:14 +01:00
633463e370 Unified the 400x state machine for address latching
Fixed timing issues
2025-11-14 18:51:10 +01:00
e17d6ad177 Added debug output
Added GUI
2025-10-03 11:44:55 +02:00
3d4de8b268 Syntax cleanup, fixed never-ending test suite (console in doc-test) 2025-09-30 11:43:49 +02:00
0e0713c3a0 Fixed test failures 2025-09-30 10:23:17 +02:00
7d06837608 Added I/O demo system
CLean up of unused components and functions
2025-09-29 21:42:37 +02:00
0278a96a8d Added console for displaying the system state
Corrected behaviour and tests
2025-09-29 19:02:00 +02:00
6f3295dc5e Created factory for system creation.
Systems are now defined in JSON rather than hard-coded
2025-09-29 12:41:16 +02:00
c039e9069a Added more tests
Extracted common 400x behavior like timing and latching into common module
Added maxed MCS-4
2025-09-29 11:53:46 +02:00