Hardware How does digital audio clipping work on the GBA?

biolizardshadow

Well-Known Member
OP
Member
Joined
May 4, 2020
Messages
121
Trophies
0
Age
21
XP
276
Country
United States
From my understanding, digital clipping occurs when a waveform represented as binary values exceeds a DAC's maximum output range. So the range of values in an 8 bit DAC is from 0 to 255 with 0 being the lowest and 255 being the highest. My real question here is how does the Gameboy sound channels effect this? Each Gameboy sound channel has its own 4 bit DACv while the samples played share two DAC's and from my knowledge I have never seen any Gameboy, NES, or any other old console that used basic geometrical waveforms experience this. So is there a connection between loud samples and audio clipping on the GBA or does the loud square waves contribute to this?
 
  • Like
Reactions: Sterophonick

biolizardshadow

Well-Known Member
OP
Member
Joined
May 4, 2020
Messages
121
Trophies
0
Age
21
XP
276
Country
United States
Or, lack thereof.
The sound chip actually isn't that bad in my opinion. Take a look at the custom sound mixer that ipatix created that shows off what the GBA can really do! Pokemon High Quality Sound (ASM Hack) - YouTube Even with all of this the quantization noise that is applied to every virtual Direct Sound channel still remains and I don't think that it's fixable without having to replace the DAC's entirely. :(
 
Last edited by biolizardshadow,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,341
Trophies
3
XP
27,296
Country
United Kingdom
Clipping has multiple forms, and that is before we do loudness wars.

The primary form comes from the fact you are unlikely to ever have your peaks for every wave line up with the sample point of the wave (bit before, bit after, either side of a peak or a trough). If said sample is below the maximum in either direction the wave would have achieved then oddness happens that bothers the ears of many (sometimes even if they don't realise it consciously -- see listening fatigue). I don't know that anybody has particularly characterised the GBA (or indeed various versions thereof).
Generally speaking most audio mixers on the GBA (and DS, and most things once software became the main driver of audio rather than the chips themselves) tended to favour maximum volume at all times and then change the instruments/samples (possibly at source level rather than hardware) if they did somehow need lower. This could theoretically push you into some kind of virtual clipping or noise on the line making some kind of odd effects but I would have to test that.

Indeed I don't even particularly have anything along the lines of
http://www.herbertweixelbaum.com/comparison.htm
and
https://web.archive.org/web/20190225074332/https://aquellex.ws/goodies/tutorial/game-boy-comparison/
For the GBA other than what is on those.
Never going to replicate

As far as 4 bit meeting 8 bit then most likely things will be interpolated to fall within the same effective range (I would be surprised if it did either the simpler min-max assumptions, left it as is, or went for some kind of characterisation or complicated setup).

Square waves are always a fun thing in electrical engineering (to start with they are generally considered theoretical and instead reality, because you are never not going to have impedance means there will be a slope, and any attempts to correct that tend to result in overshooting, rounded corners or something else entirely as instantaneous tends to mean infinite energy which not really the done thing), and usually the source of much to ponder. I don't know that the comparison in the OP would yield us here though.
 

biolizardshadow

Well-Known Member
OP
Member
Joined
May 4, 2020
Messages
121
Trophies
0
Age
21
XP
276
Country
United States
I was talking about loudness clipping. I'm not sure where direct sound and PSG sounds are mixed together, so I wasn't sure if the loud PSG's can cause audio clipping or not. It's hard to tell what's causing the audio to make popping sounds (usually when a sample sound effect plays) in my rom hack. It just sort of happens seemingly at random and I'm not sure if the PSG's can effect this or not since they are separate from the 8 bit DAC's on the GBA.

Could it also be the emulator? I tested the loudness of the PSG's yesterday and no audio clipping from what I heard was detected, however, during a part of the song where an echo can be heard their was some distortion where on real hardware the distortion isn't there. The only problem with it being the emulator is that once the wave channel is muted the distortion goes away so it might be how the emulator mixes everything together.
 
Last edited by biolizardshadow,

Lumstar

Princess
Member
Joined
Mar 6, 2006
Messages
4,045
Trophies
1
Location
Darling
Website
eonhack.blogspot.com
XP
1,660
Country
United States
The sound chip actually isn't that bad in my opinion. Take a look at the custom sound mixer that ipatix created that shows off what the GBA can really do! Pokemon High Quality Sound (ASM Hack) - YouTube Even with all of this the quantization noise that is applied to every virtual Direct Sound channel still remains and I don't think that it's fixable without having to replace the DAC's entirely. :(

I thought GBA, strictly speaking, doesn't have a dedicated sound chip.
 

biolizardshadow

Well-Known Member
OP
Member
Joined
May 4, 2020
Messages
121
Trophies
0
Age
21
XP
276
Country
United States
It doesn't. It has 4 sound generators from the original Gameboy and two DAC's for sample playback. I just used the word sound chip in my response to make explaining a bit easier. Sorry for the confusion. I wonder if the sound generators were made by Nintendo's R&D team or if someone else made them because they are not that great (especially compared to the sound generators on the NES).
 
Last edited by biolizardshadow,
General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
  • BentlyMods @ BentlyMods:
    My fav actvity is:

    mario-dancing.gif
  • Psionic Roshambo @ Psionic Roshambo:
    Do the Mario lol
  • K3N1 @ K3N1:
    🍑
  • K3N1 @ K3N1:
    Whoever developed Bramble was smoking that good shit fucking gnomes
    K3N1 @ K3N1: Whoever developed Bramble was smoking that good shit fucking gnomes