This repository has been archived on 2024-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
rustboyadvance-ng/src/core
Michel Heily 5acd7ddd71 Solve the sound clicking issue in Kirby!
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
2019-12-27 15:28:06 +02:00
..
arm7tdmi Continue working on DMA sound. 2019-12-23 01:37:45 +02:00
gpu Solve the sound clicking issue in Kirby! 2019-12-27 15:28:06 +02:00
sound Add simple resampling using cosine interpolation, seems to work~ish. 2019-12-23 01:37:45 +02:00
cartridge.rs Refactor "backend" concept 2019-12-20 15:11:26 +02:00
dma.rs Improve DMA code 2019-12-27 12:37:32 +02:00
gba.rs Improve DMA code 2019-12-27 12:37:32 +02:00
interrupt.rs mGBA test suite now boots! 2019-11-12 18:22:00 +02:00
iodev.rs Add simple resampling using cosine interpolation, seems to work~ish. 2019-12-23 01:37:45 +02:00
keypad.rs Model the keypad 2019-07-20 22:58:29 +03:00
mod.rs Add WIP sound controller and backend 2019-12-20 15:11:26 +02:00
palette.rs Refactor core functionality into a separate module 2019-07-20 16:46:00 +03:00
sysbus.rs Add simple resampling using cosine interpolation, seems to work~ish. 2019-12-23 01:37:45 +02:00
timer.rs More work. DMA sound seems to work, but sounds very crappy. 2019-12-23 01:37:45 +02:00