7

There is the mGBA Game Boy Advance emulator. I wonder which MIDI sound font it uses. I think the original Nintendo GBA sound font is copyrighted. So if it uses an open source sound font all music will sound different I think. But an emulator always wants to be exactly as the original.

0

1 Answer 1

31

It doesn’t.

The sound hardware on the Game Boy Advance is relatively primitive. Inherited from the original Game Boy, there is a pair of square-wave generators, a white noise generator, and a 4-bit DAC driven from a tiny, 16-byte buffer. The Game Boy Advance itself introduced a pair of DMA-driven 8-bit DACs. Detailed technical descriptions are not hard to find: see for example Pan Docs, a Game Boy developers’ wiki page or this blog post. Emulating those devices doesn’t require keeping any instrument patches around: waveforms generated by them can be described by rather simple mathematical functions, while the DACs are just fed PCM waveform samples directly.

The game just programs that emulated sound hardware, leaving the emulator to synthesise and mix the waveforms that would be generated by them, then perform sample format and rate conversion, if necessary, and feed it to the output device. This means that as long as it is free of errors, the emulator will reproduce the sound of the game exactly as it would be on real hardware.0 This is, of course, subject to imperfections in the emulation of that hardware, e.g. precision errors in sample rate conversion, or noise and timing characteristics of the DACs and the oscillators; however, I would be surprised if such differences were perceptible in practice.

If a game has any kind of tracker-based or MIDI soundtrack, any waveform synthesis will be performed in software running on the emulated CPU, and any instrument samples have to be located on the cartridge. The emulator does not have to include a sound font of its own; all it has to do is run the game code.


0 Not that achieving this is a trivial matter; far from it.

1
  • 3
    In particular, the audio generating code can be found here and there's no trace of a soundfont.
    – AKX
    Sep 8, 2022 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .