chore: tick scheduler on memory access

This commit is contained in:
2022-04-09 19:15:12 -03:00
parent 5da84aff36
commit c100d64fcb
6 changed files with 34 additions and 34 deletions

View File

@@ -46,8 +46,7 @@ pub fn runFrame(sched: *Scheduler, cpu: *Arm7tdmi, bus: *Bus) void {
const frame_end = sched.tick + cycles_per_frame;
while (sched.tick < frame_end) {
sched.tick += 1;
_ = cpu.step();
cpu.step();
while (sched.tick >= sched.nextTimestamp()) {
sched.handleEvent(cpu, bus);