Revert "chore: tick on memory access instead of 1cpi"

This reverts commit 7f555095f2.
This commit is contained in:
2022-03-29 08:58:57 -03:00
parent 7f555095f2
commit e127669549
2 changed files with 5 additions and 17 deletions

View File

@@ -43,9 +43,9 @@ pub fn run(kind: RunKind, quit: *Atomic(bool), fps: *FpsAverage, sched: *Schedul
}
pub fn runFrame(sched: *Scheduler, cpu: *Arm7tdmi, bus: *Bus) void {
const frame_end = sched.tick + cycles_per_frame;
while (sched.tick < frame_end) {
var cycles: u64 = 0;
while (cycles < cycles_per_frame) : (cycles += 1) {
sched.tick += 1;
_ = cpu.step();
while (sched.tick >= sched.nextTimestamp()) {