High-Pass filters explained: When the Game Boy APU is playing sound, silence is not always represented by the PCM value of 0 (i.e. it has DC-offset). Since this DC-offset can be controlled by software running on the Game Boy, it must be retained for accurate emulation (This is what causes the infamous pop sound when you turn a Game Boy on, and it’s also cleverly used by some games). Regardless of high-pass mode, SameBoy always emulates the DC-offset.
Now, if you plug in an AUX cable to a Game Boy and record its audio output, you’ll notice there isn’t any DC-offset, although its effects can be heard! This is because the Game Boy itself has a capacitor used as an analog high-pass filter, which effectively removes the DC offset.
So the 3 modes work as follows:
-
GB_HIGHPASS_OFF
outputs the audio exactly as the APU would, skipping the capacitor and retaining the DC-offset as digitally output by the APU. Because in this mode silence is no longer represented by PCM 0, you will hear a popping sound whenever you pause or resume the emulator.
-
GB_HIGHPASS_ACCURATE
digitally emulates the analog high-pass filter to remove the DC-offset. However, like on real hardware, it also lowers the volume of lower frequencies.
-
GB_HIGHPASS_REMOVE_DC_OFFSET
is a tradeoff between both previous modes. It separates the DC-offset from the rest of the wave form, and applies the high-pass filter to the DC-offset alone. This way the DC-offset is removed while preserving the waveforms.
GB_HIGHPASS_ACCURATE
is the default in all SameBoy ports (Cocoa, SDL and libretro)
As for SGB support – I’ve considered this for a while, but it’s currently not a goal for SameBoy 1.0. My main reasons against it is that SameBoy is accuracy focused, and accurately emulating SGB/2 requires emulation of an SNES/SFC, and high-level emulation of SGB is often inaccurate (Borders on some tricky games), difficult to implement (additional sound effects) or simply impossible (Code execution, like in Space Invaders). So currently, I’d rather avoid investing in half-working SGB emulation when higan already emulates SGB exceptionally well.