It is currently Mon Oct 23, 2017 3:11 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Mar 02, 2017 3:02 am 
Offline
User avatar

Joined: Thu Feb 02, 2012 7:05 am
Posts: 8
Location: Skull Castle
Simples questions :

How works the DMG APU on Nintendo DS when a GBA game is used ?
Is there a real Gameboy hardware APU in Nintendo DS or it's just emulation ?
In DS mode, is DS games can use Gameboy channels ? (2 pulses, 1 wave, 1 noise)


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 3:05 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7235
Location: Chexbres, VD, Switzerland
I always wondered that as well. I know the DS' sound channels have an option to generate square waves or white noise without requiring samples, but my understanding is that this mode is sparsely used by DS games. I don't know whether this was used to support GB(C)'s sound backwards compatibility or not. In all cases, compatibility seems complete and I've yet to see games which sounds any different on a DS than on a GBA (the same cannot be said about GBA emulators...) I could be wrong, though.


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 4:03 am 
Offline
User avatar

Joined: Thu Feb 02, 2012 7:05 am
Posts: 8
Location: Skull Castle
Quote:
I know the DS' sound channels have an option to generate square waves or white noise without requiring samples


Yes, DS' channels 8-13 generate some "PSG" like sounds. Channels 14-15 can generate white noise. But the DMG APU has specifics features like the wave channel who use a builtin wave patern memory of 16 bytes and a noise channel who use LSFR. These features are very specific to the Gameboy APU, especially the wave channel where the sounding depend of the revision of the CPU. I don't know if it's possible to emulate these features on DS.


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 6:51 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19116
Location: NE Indiana, USA (NTSC)
I think those are available only while GBA mode is active, just as 2bpp 160x144 video is available only in GBC mode on a GBA.


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 8:12 am 
Offline
User avatar

Joined: Thu Feb 02, 2012 7:05 am
Posts: 8
Location: Skull Castle
Quote:
I think those are available only while GBA mode is active, just as 2bpp 160x144 video is available only in GBC mode on a GBA.


Thanks tepples. But the gameboy APU in DS is hardware or software ?


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 8:47 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19116
Location: NE Indiana, USA (NTSC)
I'd guess hardware. But given that the PlayStation 2 emulates the original's GTE+GPU partially in software, I can't say for sure. To be 100 percent sure would require fuming nitric acid and microphotography.

Let's take a step back and talk about the goal you're seeking. Are you looking for behavior differences between GBC tone generators on a GBA in GBA mode and GBC tone generators on a DS in GBA mode?


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 9:18 am 
Offline
User avatar

Joined: Thu Feb 02, 2012 7:05 am
Posts: 8
Location: Skull Castle
Quote:
Are you looking for behavior differences between GBC tone generators on a GBA in GBA mode and GBC tone generators on a DS in GBA mode?


None of them. My purpose is to know how DS produces Gameboy sound, if this machine is reliable for compose music with orriginal Gameboy feeling.
All Gameboy models handle sound differently (especialy channel 3). I need to know if the orriginal tone generator circuitery in the Gameboy is the same as one present (or not) in DS.


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 10:19 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
Supposedly, the DS mixes sound at 1,048,576Hz 24-bit, then cuts that down to 32768Hz 10-bit with PWM. But I've found that PSG sounds really bad on the DS, it sounds very aliased. So you'd get better sound with a software mixer that synthesizes sound at 32768Hz.
If it's mixing 16 channels at ~1MHz, it's probably playing all 16 sound channels in series for left and right channels, then downsampling with PWM. It wouldn't be playing PSG sound at anything faster than 32768Hz.

There is a GBA sound chip in there too, but it's completely inaccessible in DS mode.

I bet they kept PSG sound in there (DS MODE) just for the Pokemon cries.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Last edited by Dwedit on Thu Mar 02, 2017 10:24 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 10:23 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19116
Location: NE Indiana, USA (NTSC)
Dwedit wrote:
I bet they kept PSG sound in there just for the Pokemon cries.

That plus Nintendo knew how much CPU and programmer time was associated with software mixing. Some games (such as Doom and Pinobee) use the GBC channels for music and the GBA channels for PCM sound streamed directly from ROM rather than mixed in RAM, and even games with a software mixer (such as Mario Kart Super Circuit) run some instruments on the PSG.


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 10:25 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
Was actually talking about DS mode there, not GBA mode, sorry if I wasn't clear enough. But the pokemon cries are still the same in DS games as they were in the GBC games.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 11:45 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6297
Location: Seattle
Dwedit wrote:
But I've found that PSG sounds really bad on the DS, it sounds very aliased.
Nocash's description of how the PSG is mixed into the audio on the GBA seems like it would also produce horrible aliasing...


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 12:55 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
On a GBA you can request a PWM update rate of 131,072Hz with 7-bit audio, or even 262,144Hz with 6-bit audio. You can't do that on a DS.
I guess someone could try to figure out the quantization noise you'd get with aliased sampling at 131072Hz, but it's a lot less than the artifacts you'd get at 32768Hz.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Thu Mar 02, 2017 11:56 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7235
Location: Chexbres, VD, Switzerland
Dwedit wrote:
On a GBA you can request a PWM update rate of 131,072Hz with 7-bit audio, or even 262,144Hz with 6-bit audio. You can't do that on a DS.

I am not 100% sure, but I guess you can in GBA mode / i.e. a DS in GBA mode behaves like a geniune GBA in this regard.


Top
 Profile  
 
PostPosted: Fri Mar 03, 2017 7:13 am 
Offline
User avatar

Joined: Thu Feb 02, 2012 7:05 am
Posts: 8
Location: Skull Castle
tepples wrote:
Some games (such as Doom and Pinobee) use the GBC channels for music and the GBA channels for PCM sound


Many GBA games use pulse channels. On top of my head I think at Harmony of Dissonance, Kururin, Gradius Gen, Bubble Bobble - Old & New , Advance War, Contra Advance, Final Fantasy IV Advance and as you said Mario Kart.
This is not few games and the DS handles pretty well these channels. But how ?
I know that the 8080 is built in GBA SOC. But the DMG part has been removed in the DS, Nintendo would have left only the Gameboy sound circuitery ?

Dwedit wrote:
But I've found that PSG sounds really bad on the DS, it sounds very aliased.


Yes, pulse channels seems more roughness than genuine Gameboy sound (include the GBA). That's why I wonder if the Gameboy channels are hardware or software on Nintendo DS.

EDIT : maybe you can move this post in GBDev section...


Top
 Profile  
 
PostPosted: Sat Mar 04, 2017 12:07 pm 
Offline

Joined: Sun Jan 26, 2014 9:31 am
Posts: 256
Dr. Wily wrote:
This is not few games and the DS handles pretty well these channels. But how ?


Hasn't this been answered already? As far as we know, when the NDS switches to GBA mode, it just uses the GBA sound chip. The NDS has a lot of hardware bits inside it for handling GBA compatibility.

Dr. Wily wrote:
I know that the 8080 is built in GBA SOC. But the DMG part has been removed in the DS, Nintendo would have left only the Gameboy sound circuitery ?


There's no need for the old DMG sound hardware because the GBA sound hardware is almost functionally identical for the PSG channels. Obviously there are some differences in the wave channel (e.g. you can have 64 samples instead of 32), but that's optional. Unless you're into chip tunes (in which case, almost every Game Boy model produces slightly different quality sound) the GBA can mimic DMG sound. And by that extension, the NDS can mimic DMG sound if you're playing in GBA mode.

I wouldn't say that the NDS (in GBA mode) can exactly, 100% recreate the waveforms you'd get from an original DMG, but it should be close enough if you're not very selective. But if you plan to use an NDS in GBA mode, you might as well just use a GBA instead.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group