Compare commits

..

1 Commits

2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ const Bus = @import("Bus.zig");
const Scheduler = @import("scheduler.zig").Scheduler;
const Arm7tdmi = @import("cpu.zig").Arm7tdmi;
const cycles_per_frame: u64 = 100; // TODO: How many cycles actually?
const cycles_per_frame: u64 = 160 * (308 * 4);
pub fn runFrame(sched: *Scheduler, cpu: *Arm7tdmi, bus: *Bus) void {
var cycles: u64 = 0;

View File

@ -53,7 +53,7 @@ pub const Scheduler = struct {
} else {
// Transitioning to a Vblank
bus.io.dispstat.vblank.set();
self.push(.{ .kind = .VBlank, .tick = self.tick + 68 * (308 * 4) });
self.push(.{ .kind = .VBlank, .tick = self.tick + (308 * 4) });
}
},
.Draw => {
@ -72,7 +72,7 @@ pub const Scheduler = struct {
if (new_scanline < 228) {
// Transition to another Vblank
self.push(.{ .kind = .VBlank, .tick = self.tick + 68 * (308 * 4) });
self.push(.{ .kind = .VBlank, .tick = self.tick + (308 * 4) });
} else {
// Transition to another Draw
bus.io.vcount.scanline.write(0); // Reset Scanline