Why was the GBA sound so poor?

Discussion of development of software for any "obsolete" computer or video game system.
lidnariq
Posts: 9510
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Why was the GBA sound so poor?

Post by lidnariq » Sat Feb 01, 2020 12:12 pm

Marscaleb wrote:
Sat Feb 01, 2020 10:53 am
Also I don't like how so many GBA games mix square waves and such PSG sounds into their sample-based music. But that one is purely a matter of personal taste, and I get that. It makes sense for one of today's retro-throwback games like Adventures of Pip, but for a then-modern title like Minish Cap, it's just... Stop; why are you doing this? I just don't like it, but that's just me.
I actually strongly preferred the songs that used the PSG sounds, specifically because I found the softsynth to be so lackluster. But most games seemed to avoid it.

I think they used the square wave in Minish Cap specifically because square waves are one of very few ways of producing something that's identifiably a low bass note even with a crappy speaker that doesn't reproduce the fundamental.

That said, do you have a list of soundtracks that use PSG? I'd like to collect them :) All I have is Minish Cap and Castlevania: Harmony of Dissonance.

User avatar
Marscaleb
Posts: 216
Joined: Fri Sep 11, 2015 10:39 am
Contact:

Re: Why was the GBA sound so poor?

Post by Marscaleb » Sat Feb 01, 2020 12:43 pm

Bregalad wrote:
Sat Feb 01, 2020 12:09 pm
If by "the last statement" you mean this part of your post who accidentally become pasted in my post ?
Whoops; well that was embarrassing.
I'm gonna just remove that entirely, since I was replying to something you didn't say.
lidnariq wrote:
Sat Feb 01, 2020 12:12 pm
That said, do you have a list of soundtracks that use PSG? I'd like to collect them :) All I have is Minish Cap and Castlevania: Harmony of Dissonance.
I think some of the Pokemon games used it too? I think I was noticing a trend among the GBA games that were owned by Nintendo but not actually developed in-house. But I really didn't write any examples down; sorry.

User avatar
Bregalad
Posts: 7892
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Why was the GBA sound so poor?

Post by Bregalad » Sat Feb 01, 2020 2:00 pm

But most games seemed to avoid it.
A surprisingly big list of GBA games used PSG for their music, for me it remains a mystery to this day why it was used so much. Some games made great use of it, some made some poorer usage, it really depends. Mega Man Battle Network series really shines in how it uses the PSG, and uses the DirectSound channels only as secoundary sound channels for percussion or chords.

But many games used it for bass, and it works wonders and create a very specific GBA-like sound I like. I always loved games using the PSG as I loved retro systems back then. But as we said, I never understood why a supposedly "modern" game would use PSG so much.
Marscaleb wrote:
Sat Feb 01, 2020 12:43 pm
Whoops; well that was embarrassing.
For me too.
lidnariq wrote:
Sat Feb 01, 2020 12:12 pm
I think they used the square wave in Minish Cap specifically because square waves are one of very few ways of producing something that's identifiably a low bass note even with a crappy speaker that doesn't reproduce the fundamental.
Saw waves works great for this, too. However, triangle is awful, it's inaudible :)
lidnariq wrote:
Sat Feb 01, 2020 12:12 pm
That said, do you have a list of soundtracks that use PSG? I'd like to collect them All I have is Minish Cap and Castlevania: Harmony of Dissonance.
The list would be very, very long and contain a good proportion of the GBA library. However some games such as Fire Emblem uses them only for SFX.
On the top of my head we can say :

Games that uses mostly PSG (direct sound is only accompagnatory or percussive).
  • Castlevania Harmony of Dissonance
  • Mega Man Battle Network (all 6 games)
  • King of Fighters (2 games)
  • Breath of Fire (2 games) (there's a sound restoration patch available fully restoring original SNES sound made by some random dude named Bregalad :D )
  • Tactics Ogre - the Knight of Lodis
  • Many, many other games
Games that uses PSG as well as directsound (mostly for more polyphony) :
  • Phenix Wright Ace Attorney Gyakuten Saiban (3 games) (japan only - it's another title but they're more known in their DS-remake title)
  • Lufia IV
  • Final Fantasy Tactics Advance
  • Riviera - The Promised Land
  • Dragon Quest Caravan Monsters
  • Onimusha Tactics
  • Puyo Pop
  • Many, many other games
Games that uses PSG discretly, mostly to double a directsound channel or for bass only :
  • Castlevania - Aria of Sorrow (only in 2 songs)
  • Final Fantasy 1&2/4/5/6 (4 games) (but the music sucks anyway and you know there's that random dude who made some patches)
Last edited by Bregalad on Sun Feb 02, 2020 8:11 am, edited 1 time in total.

tepples
Posts: 22019
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Why was the GBA sound so poor?

Post by tepples » Sat Feb 01, 2020 5:57 pm

Pinobee and Doom are other GBA games that use PSG for most of their music.

User avatar
tokumaru
Posts: 11771
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Why was the GBA sound so poor?

Post by tokumaru » Sat Feb 01, 2020 8:38 pm

Does the Nintendo DS also support PSG sounds in these GBA games?

tepples
Posts: 22019
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Why was the GBA sound so poor?

Post by tepples » Sat Feb 01, 2020 11:03 pm

The DS renders GBA PSG sounds the same way the GBA does. The GBA-mode PSG is the only GBC-descended hardware that software running on a DS in any mode can access.

EDIT: By "any mode" I mean "at least one mode", not "all modes".

User avatar
Bregalad
Posts: 7892
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Why was the GBA sound so poor?

Post by Bregalad » Sun Feb 02, 2020 3:27 am

tepples wrote:
Sat Feb 01, 2020 11:03 pm
The DS renders GBA PSG sounds the same way the GBA does. The GBA-mode PSG is the only GBC-descended hardware that software running on a DS in any mode can access.
Not only that, but my understanding is that the NDS comes with it's own PSG, which can turn some of the 16 hardware sound channels into square wave or noise. I don't know how popular it was, but likely much less than the GBA PSG, for some reason.

This leads to several questions :
  • Why was PSG introduced in the NDS sound hardware in the first place (and not the GBA/GBC retro-compatible kept as-is)
  • Why was the NDS PSG less popular than the GBA - and which games uses it.
  • Why were hardware sound channels not available on GBA and available on NDS again, this goes oposite to the main tendency on computer hardware which tended to move from hardware-assisted to pure software render (both for sound and graphics)
Also, while we're on topic, some GBA games deliberately simulates more PSG channels using direct sound to play square, saw, sine, triangle or other simple waveforms. Castlevania - Harmony of Dissonance and the Phoenix Wright Ace Attorney games does exactly that.

Pokun
Posts: 1492
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Why was the GBA sound so poor?

Post by Pokun » Sun Feb 02, 2020 6:09 am

So the NDS is simulating the DMG/GBC APU using its own (different) PSG and ADPCM hardware? The PSG channels only seems to be able to do square and noise, so I guess it would need to emulate the triangle and wavetable channels using direct sound. What about the short period noise mode? Also direct sound? I see nothing about that in gbatek either.


Anyway I agree with Lidnariq that PSG sound is great, and I think it works perfectly well in any modern game/music. The DMG APU is one of my absolute favourite PSGs, and without it the GBA would just have 2 crappy ADPCM channels and nothing else. The PSG sound works extra well in Megaman Battle Network because of it's cyberworld theme, but also because it gives it a nice Rockman feel to it. The early Megaman games are known for their great PSG music.

Yeah, Gyakuten Saiban is another example of great usage of PSG sound, on both GBA and NDS. Whether it's using hardware PSG or simulating it with samples.

User avatar
Bregalad
Posts: 7892
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Why was the GBA sound so poor?

Post by Bregalad » Sun Feb 02, 2020 8:02 am

Pokun wrote:
Sun Feb 02, 2020 6:09 am
So the NDS is simulating the DMG/GBC APU using its own (different) PSG and ADPCM hardware? The PSG channels only seems to be able to do square and noise, so I guess it would need to emulate the triangle and wavetable channels using direct sound. What about the short period noise mode? Also direct sound? I see nothing about that in gbatek either.
No that's not it at all. The NDS contains an entiere GBA, including sound hardware, which is not accessible in NDS mode.
The NDS contains it's own sound hardware featuring 16 voices, some of them can be parametred to produce square wave or white noise instead of a sample. This "PSG" has nothing to do with GBA's and has nothing to do with the NDS being retro-compatible with the GBA. This also allow a much higher precision in pitch for example, but I doubt it allows short-period white noises or rectangle waves of other duty cycles than 50%.

This makes me ask myself - is there any emulator or music player where it's possible to see whether NDS music uses PSG or just a square wave or white noise (AD)PCM sample to simulate it ? With the GBA this is easy, for example VBA has the feature to disable sound channels.
crappy ADPCM channels and nothing else
They're not ADPCM, just PCM. They were clearly designed from the start to be used to play back a mixing buffer, and not to be used as a music channel by themselves. The latter feature can be done, but it's very limitating as the panning would be either left, right or center without fine adjustment, and either stopping or looping samples need heavy software intervention anyways.

Talking about the GBA sound, there's a feature I think the hardware allows, but the M2K driver used by a good 80% of the GBA library doesn't. It's double-buffering the channel 3's waveform, or combine 2 buffers to allow a 64-sample waveform.

The 64-sample waveform makes it possible to have more precision in the waveform than the regular 32-sample, at the expense of being one octave lower (this lowers the pitch resolution for the same pitch, so the music will possibly be more detuned).

The double buffering allows (only in 32-sample mode) to change the waveform without turning off the sound generator - in other words as a note is playing. Done multiple times this could allow to simulate more complex instruments than a simple waveform.

Alas, those 2 options were never used by any stock GBA games I know of (even those not using m2k's sound driver).

lidnariq
Posts: 9510
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Why was the GBA sound so poor?

Post by lidnariq » Sun Feb 02, 2020 11:46 am

Bregalad wrote:
Sun Feb 02, 2020 3:27 am
[*]Why were hardware sound channels not available on GBA and available on NDS again, this goes oposite to the main tendency on computer hardware which tended to move from hardware-assisted to pure software render (both for sound and graphics)
There was a big movement around the turn of the century to farm everything off to the CPU. But in its wake we discovered that it sucks, for both safety reasons and cache coherency. (supposedly the biggest reason for driver signing in the windows kernel was badly-implemented DSP (for EAX) for knock-off sound cards that could be coaxed into writing into memory they shouldn't).

Every console since the N64 and the GBA have included multichannel mixing in hardware. I assume the NDS was just Nintendo learning why softsynths aren't a good use of CPU.
Bregalad wrote:
Sun Feb 02, 2020 8:02 am
This also allow a much higher precision in pitch for example, but I doubt it allows short-period white noises or rectangle waves of other duty cycles than 50%.
Nocash's GBAtek says that the PSG channels can be set to any duty cycle ranging from 0/8 to 7/8. But, yes, the noise channel is constrained to just white noise.
is there any emulator or music player where it's possible to see whether NDS music uses PSG or just a square wave or white noise (AD)PCM sample to simulate it ?
I've been slowly hacking simple visualizations into various linux CLI players ... but haven't gotten to 2sf (vio2play) yet.

User avatar
Bregalad
Posts: 7892
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Why was the GBA sound so poor?

Post by Bregalad » Sun Feb 02, 2020 2:21 pm

lidnariq wrote:
Sun Feb 02, 2020 11:46 am
I've been slowly hacking simple visualizations into various linux CLI players ... but haven't gotten to 2sf (vio2play) yet.
This sounds amazing ! I can't wait to try this out. I was also eager to ever get a PSF1 visualisation.

lidnariq
Posts: 9510
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Why was the GBA sound so poor?

Post by lidnariq » Sun Feb 02, 2020 3:10 pm

... I swear I encountered a PSF (i.e. playstation1) player forever ago that had a simple visualization of the sound hardware state years ago, but I haven't been able to find anything like that since.

Unless I made it. In which case I have no idea where I misplaced the code.

But, anyway, I have modified GSF (playgsf), GBS (gbsplay), and NSF (nosefart) players with some amount of visualization. I should probably make threads for my patches and/or make github repositories.

Pokun
Posts: 1492
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Why was the GBA sound so poor?

Post by Pokun » Sun Feb 02, 2020 6:08 pm

Bregalad wrote:
Sun Feb 02, 2020 8:02 am
No that's not it at all.
[explanation]
OK that explains it. Not sure what Tepples means by "any mode can access" though, if it can't be accessed in DS mode.

Bregalad wrote:
Sun Feb 02, 2020 8:02 am
They're not ADPCM, just PCM. They were clearly designed from the start to be used to play back a mixing buffer, and not to be used as a music channel by themselves. The latter feature can be done, but it's very limitating as the panning would be either left, right or center without fine adjustment, and either stopping or looping samples need heavy software intervention anyways.
Now I'm confused. If it's not designed for music, then why are most games using it instead of PSG for music as stated earlier in this thread?

Why was PSG introduced in the NDS sound hardware in the first place (and not the GBA/GBC retro-compatible kept as-is)
I'm glad they included a PSG for DS, considering that they abandoned it with home consoles ever since the Nintendo 64. But I also think it's strange that the DMG APU hardware is included but not accessible in DS mode (I mean the GBA could access it in both GBC and GBA modes).

One reason I could think of is that Nintendo designed the DS as a new portable console separate from the Game Boy line (at least I remember Nintendo specifically saying this during the development), so instead of re-using the same old APU for the 4th time they might have wanted to leave the GB/GBA things behind in favour of fresh unique features. But still, why include costly hardware and limit its use at all? There got to be a more technical explanation, whether it's marketing-technical or hardware-technical.

Why was the NDS PSG less popular than the GBA - and which games uses it.
One reason to use the PSG on GBA is to get more channels for more polyphony. Since using the PSG channels on the DS doesn't increase the total number of channels I guess there is less demand for them for that reason.
Another possible reason is maybe more obvious: Since the DS has a quality DAC you are no longer limited to PSG. Although some developers might set arbitrary limitations to increase creativity, I think most developers would prefer more freedom in general.


DS emulators are still not really where we would like them to be (much like Nintendo 64 emulators). Best ones seems to be DeSmuME, melonDS and No$GBA. Not sure if any of them let you see PSG usage though.

As for titles using the DS PSG feature, it looks like Puchicon and Puchicon MK II (AKA Petite Computer) can use all the PSG channels in MML besides General Midi samples and user-defined samples. So most games made using either of those probably use the PSG a lot. I only have Puchicon 3-gou (3DS) and although it can do square waves and stuff, I guess the 3DS doesn't have a hardware PSG (DS backwards-compatibility is supposedly emulation).

DS games I suspect might use PSG channels:
Gyakuten Saiban remakes
Trauma Center (maybe a bit)
Survival Kids: Lost in Blue 2 ("dummy": 8-bit version of the LIB1 theme)
Etrian Odyssey (quite a lot)
Dark Spire (especially in "Classic Mode")
Pokemon Fire-Red Leaf-Green
Megaman Zero Collection
Dragon Quest 9 (lots of classic DQ SEs and MEs)
About any DQ spin-off game for DS (same as above)

Many games might use PSG for some sound effects. I guess it saves a little space that sample data would otherwise need to use and maybe also improves performance a bit?

lidnariq
Posts: 9510
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Why was the GBA sound so poor?

Post by lidnariq » Sun Feb 02, 2020 7:48 pm

Pokun wrote:
Sun Feb 02, 2020 6:08 pm
DS games I suspect might use PSG channels:
Since I've started hacking up vio2play for a cheap state visualization
(q.v.
08 Battlefield - A Sudden Gust of Wind Before Your Eyes.png
08 Battlefield - A Sudden Gust of Wind Before Your Eyes.png (3.88 KiB) Viewed 3178 times
)

This is the first one that definitely does use them. Etrian Odyssey. Not anything before track 8.
Almost everything I've seen so far has used ADPCM-encoded samples.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Why was the GBA sound so poor?

Post by rainwarrior » Sun Feb 02, 2020 8:04 pm

One of my favourite that mixes PSG + DAC was this Yu-Gi-Oh: Eternal Duelist Soul soundtrack.

https://www.youtube.com/watch?v=Mpj0a2U ... C659D3C077

Post Reply