gbdev / gbdev/pandocs

Rework information about GBA sound output (research in progress)

Open
#390 0 comments 1 reaction 0 assignees View on GitHub
content research
Dominant language
Markdown
Stars
783
Forks
134
Avg merge
6h 54m
Merged PRs (30d)
3

Description

A while back I found out that the GBA does not treat channels 1, 2 and 4 the same way a normal Gameboy does- instead of using the literal value of the current volume setting to choose the DAC output level when the generation circuitry is outputting logical high, it uses a lookup table based on the volume setting as to which DAC output levels correspond to low and high. E.g. a volume setting of one would bounce between seven and eight instead of between zero and one.
This also means that at zero volume, instead of outputting a literal zero to the DAC, it outputs a _signed_ zero, which either equates to a literal seven or eight. I don't think this is the case when a "DAC" is disabled or disconnected from the output, as it may output a literal zero, so I'll have to check that.
My theory is that two channels have an inverted envelope pattern (though not inverted output from the generation circuitry,) which means two channels output a literal seven and two channels output a literal eight when at zero volume, in order to eliminate DC offset, as there is **no internal high pass filter** (thus the GBA technically has the weakest filter, if Pandocs refers to the internal filter.) I will have to test which channels they are if my theory is true, which I suspect is the case because more than likely it would be why the output of channel 3 is inverted on GBA (due to an oversight in the implementation of the digital DC offset removal mechanism.)
I am also willing to modify my GBA and DMG to output directly from SO1 and SO2 so I can make recordings from my DMG, GBC and GBA and take screenshots of them in Audacity (or captures from my oscilloscope) to provide a visual indication as to what the behavior mentioned corresponds to. (It will probably take a while though.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.