feat: schedule audio sampling on scheduler
DMA sound in games like Pokemon Emerald, Chobits, Love Hina, and Kirby: Nightmare in Dream Land sound great save for conerns about resampling
This commit is contained in:
@@ -109,13 +109,7 @@ fn Timer(comptime id: u2) type {
|
||||
|
||||
// DMA Sound Things
|
||||
if (id == 0 or id == 1) {
|
||||
const apu = &cpu.bus.apu;
|
||||
|
||||
const a_tim = @boolToInt(apu.dma_cnt.sa_timer.read());
|
||||
const b_tim = @boolToInt(apu.dma_cnt.sb_timer.read());
|
||||
|
||||
if (a_tim == id) apu.handleTimerOverflow(.A, cpu);
|
||||
if (b_tim == id) apu.handleTimerOverflow(.B, cpu);
|
||||
cpu.bus.apu.handleTimerOverflow(cpu, id);
|
||||
}
|
||||
|
||||
// Perform Cascade Behaviour
|
||||
|
Reference in New Issue
Block a user