Skip to content

Fast Game Boy audio emulation with 16‑bit sample output

License

Notifications You must be signed in to change notification settings

deltabeard/minigb_apu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minigb_apu

Fast[1] Game Boy audio emulation with 16‑bit signed sample output. This library is designed for use on low power microcontrollers. Hence, there are no floating point operations, and some variables are hard-coded at compile time.

This project uses code from baines/MiniGBS.

[1] As of commit 311aa8, this APU can run x450 speed on a Raspberry Pi Pico (RP2040) with a clock speed of 48 MHz and a audio sample rate of 48000 Hz. It runs at x1171 speed with a clock speed of 125 MHz.

Examples

Caveats

  • A fixed number of audio samples (AUDIO_SAMPLES) must be read each frame.
  • The sample rate must be set at compile time. This is set to 32768 Hz by default and can be changed by defining AUDIO_SAMPLE_RATE.

Todo

  • Perform benchmarks against other Game Boy APU emulators.
  • Document inaccuracies in emulation.

License

MIT. See the LICENSE file.