chore: broken impl of ch1

This commit is contained in:
2022-04-20 09:39:12 -03:00
parent c3611a0f00
commit 97a689ab55
2 changed files with 401 additions and 11 deletions

View File

@@ -51,6 +51,13 @@ pub const Scheduler = struct {
3 => cpu.bus.tim._3.handleOverflow(cpu, late),
}
},
.ApuChannel => |id| {
switch (id) {
0 => cpu.bus.apu.ch1.channelTimerOverflow(late),
else => {},
}
},
.FrameSequencer => cpu.bus.apu.tickFrameSequencer(late),
.SampleAudio => cpu.bus.apu.sampleAudio(late),
.HBlank => cpu.bus.ppu.handleHBlankEnd(cpu, late), // The end of a HBlank
.VBlank => cpu.bus.ppu.handleHDrawEnd(cpu, late), // The end of a VBlank
@@ -104,4 +111,6 @@ pub const EventKind = union(enum) {
Draw,
TimerOverflow: u2,
SampleAudio,
FrameSequencer,
ApuChannel: u2,
};