5acd7ddd71
The symptom of the problem was in the form of a rythmic click sound popping in the left channel. Diving deep into Kirby's binary, I found out that channel B and channel A are playing too different pcm buffers simultationsly: A is enabled for the right channel and B is enabled for the left. I found out that the game's sound driver was using VCOUNT in order to syncornize the audio, but in some occassions the fifo DMA was not disabled in time, causing the DMA to fill the fifo in additional 16 bytes of garbage residing next to channel B's pcmBuffer. After a thorough check-up of the GPU state machine, I find out that I stay in VBLANK for 1 line too long, and that's what caused the audio buffer to de-sync with the gpu emulation. This commit fixes this issue. Former-commit-id: e0f20bd01b8abf62da486e2501cff197a9a22763 |
||
---|---|---|
.. | ||
arm7tdmi | ||
gpu | ||
sound | ||
cartridge.rs | ||
dma.rs | ||
gba.rs | ||
interrupt.rs | ||
iodev.rs | ||
keypad.rs | ||
mod.rs | ||
palette.rs | ||
sysbus.rs | ||
timer.rs |