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 |
||
---|---|---|
.vscode | ||
img | ||
src | ||
.gitignore | ||
.travis.yml | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md |
RustBoyAdvance-NG
RustBoyAdvance-NG Nintendo GameBoy Advance emulator and debugger, written in the rust programming language.
Currently passing armwrestler tests, and displays some of TONC's Demos.
Using the REPL
You need to have rust installed, and somehow legally obtain a gba bios binary.
$ cargo run -- debug
Why is this project needed ?
It's actually not. There are quite a lot of GBA emulators, and even some written in rust. Actually, I couldn't find any game capable emulators written in rust.
I'm only doing this as a side project intended for learning rust.
This is my third take on this project. My first go at this was about 3 years ago, but I didn't like rust much at the time so it got abandoned. I tried to resurrect it a year ago but didn't have the time to get invested in a side-project, let alone learning rust.
I've grown to like rust a lot since then, so here we go again. You know what they say, third time's a charm.
Links
- ARM7TDMI Technical Reference Manual Technical Reference Manuals are fun.
- GBATEK A single webpage written by no$gba developer Martin Korth. This page has pretty much everything. Seriously, it's the best.
- TONC A comprehensive GBA dev guide that I used a-lot in order to understand the GBA system. Comes with neat demo roms that really helped me during development and debugging.
- NanoboyAdvance A GameBoy Advance emulator written in C++17 by a nice person called fleroviux. I've used this emulator to search for a tough bug in mine.
- Eggvance A GameBoy Advance emulator written in C++, with really useful CPU test roms.