Re:I don't know how CPUs work so I simulated one in code
by flohofwoe on Tuesday August 06, 2024 @05:28AM
(#41169118)
The netlist simulation of visual6502.org [1] works like this, it basically runs the simulation in a loop until the node network reaches a steady state, which means the current clock cycle is 'done'. This is a C port of that inner loop [2].
[1] http://visual6502.org/JSSim/index.html
[2] https://github.com/mist64/perfect6502/blob/268d16647c6b9cb0c...