Audio support (APU) 🔉
Description
There's no audio emulation in Boytacean, this has to be fixed by adding proper APU emulation.
The implementation should focus on getting a "good enough" emulation of the sound and not a perfect emulation as that may prove to be highly costly time-wise.
Implementation
This issue will require some background study to obtain some basic concepts on Audio, which should involve mathematics.
Start with the implementation of channel 1 which is a discrete pulse with wavelength (square wave) sweep wave which should be quite easy to emulate and provide reasonable results in terms of "bringing sound to the table".
We really need to decide how "cycle-accurate" emulation we want Boytacean to be, now that we have sound this is becoming a real issue.
The Azayaka emulator seems to have a good cycle-accurate APU emulation that can be used as an inspiration.
Utiities
References
Emulators
GameBoy audio
- The Ultimate Game Boy Talk (33c3) - Audio Section
- Pandocs - Audio Overview
- YouTube - NES Emulator Part #6: APU - Sounds, Beeps & Bloops
- Reddit - Sound emulation on Game Boy emulator: how to start ?
Web Audio
- What Is the Web Audio API?
- Web Audio API - MDN Web Docs - Mozilla
- Web Audio API Book
- GB Dev - Gameboy sound hardware