Make hardware cycle-counting
branlwyd opened this issue · comments
All hardware should have cycle-counting functionality, and should be timed against the number of cycles that pass. High-level steps:
- CPU should track its own clock speed (constant for CPU, set at time of construction, in Hz)
- Hardware should have standard method to receive a number of cycles that have passed
- CPU should use this method each time step() is called
- Existing cycle-counting hardware should be moved over to this functionality
- CPU should have functionality for running for certain amount of "real time", calculate to cycles
Implemented in 7c42db4.