nfg.forums

NFG Forums => Audio Mods => Topic started by: radorn on April 06, 2007, 09:23:19 PM

Title: n64 digital audio possible?
Post by: radorn on April 06, 2007, 09:23:19 PM
Hi,

This is just a thread for open and light discussion.
Nothing serious nor a request, but elaborate rants and discourses that show one knows what he or she is talking about are apreciated.

I, have an n64 project in mind for implementing RGB (aidan-viletim's mod on PAL board), universal mod (NTSC+PAL PIF) and overclock on a single system and also making a custom case for it. But that's entirely another matter.
The case is I was giving a look to the board thinking about stuff, and thought about if digital audio would be possible at all.

I don't know where the n64 audio DAC is or how it works. I mean, if it's a seperate component or is integrated in the RPC, or whatever. I couldn't find anything that directly addressed that wich was effectively searchable or "google"-able, so I came here.

I do know N64 games don't produce standard samplerates like 22050, 32000, 44100 and such. It outputs 22047, 21617, 44050, 32006 and crazy stuff like that.
This would trouble some audio equipment, but not all if you supply your own clock, wich would be possible converting the hypotetically available clock given to the dac inside the n64.

But, well, nothing of this is useful if there's no digital audio bus to tap inside the console.

What do you know about the subject?
Title: n64 digital audio possible?
Post by: Hojo_Norem on April 07, 2007, 08:37:43 AM
I have had a look into this myself not to long ago.  In the N64 I examined uses a 9480f (http://pdf1.alldatasheet.com/datasheet-pdf/view/36378/ROHM/BU9480F.html).  As you mention the N64 can output some wierd samplerates and that coupled with the fact that there is no mclk signal I think that a simple S/PDIF converter can be used.  The output would have to be re-sampled up to 44 or 48 Khz and would (at a guess, I have little precious knowlage on this) need some interpolation as I would guess without it the resulting sound wouldn't be to great.
Title: n64 digital audio possible?
Post by: viletim on April 07, 2007, 02:35:10 PM
In all cases, digital audio must be converted to an analog signal before you can listen to it. Do you think you can do a better job at converting the signal to analog than Nintendo can? Is there anything wrong with the sound to begin with?

The only reason I can think of for wanting to tap into the digital audio stream is if you want to process (distort) the audio with a computer or something....
Title: n64 digital audio possible?
Post by: Hojo_Norem on April 08, 2007, 03:45:36 AM
QuoteIn all cases, digital audio must be converted to an analog signal before you can listen to it. Do you think you can do a better job at converting the signal to analog than Nintendo can? Is there anything wrong with the sound to begin with?
It has been discussed on these boards many a time that there can be quite a lot of EM interference flying around inside a console or computer (the classic 50/60Hz hum).  In the N64 the DAC and analog amp are on two chips smaller than the size of nail on my little finger.  The amp is made by Nintendo but the DAC isn't.

Now, I don't really like Sony, but I would rate the DAC inside my AV receiver to be much better than what can be found in any console or computer.

If your going to use the source machines DAC then unless you tap the audio directly from the last stage of the amp, you are going to get interference from the machine's video signal at the AV connector.  And to minimise that in 90% of the time you need to make a custom AV cable because nearly all of the ones you can buy (the RGB ones at least) run the audio down the .5m~.75m cable to the connectors at the other end.

Now I can only assume but the people who want to do this kind of mod will have the audio equipment to take advantage of it because even half decent audio equipment can show how bad the (default) audio output from consoles and computers can be.

If I get round to it I'll make a recording of my S/PDIF modded snes in both digital and analog to try to demonstrate what I mean.

These comments only apply to machines where the audio is reasonably easily accessible in the digital domain before being fed into a DAC.
Title: n64 digital audio possible?
Post by: radorn on April 08, 2007, 09:45:22 AM
QuoteI have had a look into this myself not to long ago.  In the N64 I examined uses a 9480f (http://pdf1.alldatasheet.com/datasheet-pdf/view/36378/ROHM/BU9480F.html).  As you mention the N64 can output some wierd samplerates and that coupled with the fact that there is no mclk signal I think that a simple S/PDIF converter can be used.  The output would have to be re-sampled up to 44 or 48 Khz and would (at a guess, I have little precious knowlage on this) need some interpolation as I would guess without it the resulting sound wouldn't be to great.
Thanks, butter_pat_head, I really didn't expect

I checked my ntsc n64 board (I had it open already) and found that chip too.
Traced the data pins to the RCP, so it's undoubtly a digital audio bus.
As a curiosity, it seemed as if the power pin was not connected, but maybe the trace is just under the chip and that's why I don't see it... I didn't care to desolder it to see it.

With the audio DAC being an "off-the-shelf" part, making a s/pdif interface should not be as hard as viletim's work on it's great RGB DAC!
Maybe even there's already some transcoder out there for the job... and maybe I'm getting too excited too, hehe!

About the resampling bit.
I'm more fond of keeping the original sampling rate intact. if one needs resampling at some point, I'm sure it can be done later, at other stages of the transmission, rather than converting it beforehand.
You know, for recording and stuff like that, it's better to have the signal as untouched as possible.

About what you say of the SNES S/PDIF mod, I would like to hear those clips.
Also, it was ALPHA-II's document about the mod is where I got that notion of spdif equipment that can sync to nonstandard rates/clocks and those that won't because of trying to force it's own clock.

Now a question:
What are you meaning with mclk? I'm not familiar with that nomenclature. Maybe you are meaning "master clock" (google'd for it, that the most likely meaning I found). Master to what?
In the datasheet for the dac, there's a BCLK pin, to wich I assigned (not randomly I hope) the meaning of Bus Clock.
Maybe a spdif clock can be derived from that?
I'm just guessing.

viletim, don't be so negative! :) It's just technical interest, at least for me.
I don't really wish to discuss utility of this. What one considers vital could seem useless to someone else.
Also, this all resulting in an actual mod is out of the scope, and would be just a really nice side-effect. Don't feel like someone is asking you or anyone else for it... I, at least, am not doing so ;)

PS: will try your great RGB DAC as soon and possible!
Title: n64 digital audio possible?
Post by: Hojo_Norem on April 08, 2007, 09:31:54 PM
QuoteNow a question:
What are you meaning with mclk? I'm not familiar with that nomenclature. Maybe you are meaning "master clock" (google'd for it, that the most likely meaning I found). Master to what?
In the datasheet for the dac, there's a BCLK pin, to wich I assigned (not randomly I hope) the meaning of Bus Clock.
Maybe a spdif clock can be derived from that?
I'm just guessing.
I don't claim to be an expert, but the chip used in the SNES S/PDIF mod, CS8405A_F2.pdf (http://www.jcomcp.plus.com/CS8405A_F2.pdf) needs a OMCK signal in addition to the 3 audio signals.  If interpolation wasn't going to be used then some way of dynamically generating the OMCK signal (I guess it'll be different depending on the output samplerate).  I suppose it doesnt sound that hard to accomplish... if you have the knowledge to begin with.  Personally I wouldn't know where to begin.

But...

While writing this I did some Googling, perhaps this (http://www.cirrus.com/en/pubs/proDatasheet/CS8427_F3.pdf) might do the trick as it can 'recover' the neccisarry clock signal from the audio data.  Finding a seller that will sell to somebody like us will be difficult I guess...  
Title: n64 digital audio possible?
Post by: radorn on April 09, 2007, 03:15:59 AM
I did only a quick look on that datasheet, but seems interesting. We'll have to bug some experts (here or elsewhere as this is about standard parts and not custom console hardware) to see if that would do the trick... or find out ourselves, maybe.

Anyway.
I still are a bit puzzled about that MCLK you mentioned and also that OMCK you said now. i would like to know the meaning and what you are referring to with them, if you would explain.

EDIT: I've just seen in the 9480f datasheet that it has a 2x resampler. That explains how the N64 got away with such framerates. Not that it is too important now, just it is interesting to me.
Title: n64 digital audio possible?
Post by: Hojo_Norem on April 09, 2007, 07:25:05 PM
Quote
Anyway.
I still are a bit puzzled about that MCLK you mentioned and also that OMCK you said now. i would like to know the meaning and what you are referring to with them, if you would explain.
Oops, my bad.  When I mentioned MCLK I was actually meaning OMCK.  It had been a while since I had looked into this kind of stuff so I was a little rusty on the terminology until I read up on it again.
Title: n64 digital audio possible?
Post by: radorn on April 09, 2007, 08:03:40 PM
Quote
Quote
Anyway.
I still are a bit puzzled about that MCLK you mentioned and also that OMCK you said now. i would like to know the meaning and what you are referring to with them, if you would explain.
Oops, my bad.  When I mentioned MCLK I was actually meaning OMCK.  It had been a while since I had looked into this kind of stuff so I was a little rusty on the terminology until I read up on it again.
but what does OMCK mean?
Title: n64 digital audio possible?
Post by: Hojo_Norem on April 10, 2007, 08:14:29 AM
Quote
Quote
Oops, my bad.  When I mentioned MCLK I was actually meaning OMCK.  It had been a while since I had looked into this kind of stuff so I was a little rusty on the terminology until I read up on it again.
but what does OMCK mean?
I assume it means something like 'Output Master Clock'.  On the first datasheet the chip can be either master or slave.  As a master it supplies the OMCK signal and gets the audio data in response.  In slave mode, which is used in the SNES mod, the OMCK is supplied from a outside source for proper operation.
Title: n64 digital audio possible?
Post by: viletim on April 10, 2007, 11:04:54 AM
butter_pat_head,
I agree that crappy RGB cables are often the cause of a horrible buzz in in the audio signal, but there's an easy solution. It's probably immedately obvious...you can solve the video signal interference problem by simply cutting the traces to the A/V output connector and mounting a pair of phono sockets for the audio output.
Title: n64 digital audio possible?
Post by: Hojo_Norem on April 11, 2007, 04:14:17 AM
Quotebutter_pat_head,
I agree that crappy RGB cables are often the cause of a horrible buzz in in the audio signal, but there's an easy solution. It's probably immedately obvious...you can solve the video signal interference problem by simply cutting the traces to the A/V output connector and mounting a pair of phono sockets for the audio output.
That's a perfectly acceptable fix for most people.  However some people like a little more.  People who want digital audio mods usually have the equipment to take advantage of it and when you have the equipment you want to USE it.

It will take a lot to beat playing Starwing at very high volume (not deafening tho ^_^)with no sound distortion or background interference, something which would be difficult to do without expensive analog audio cables and connections.  In contrast the parts the the snes digital audio mod are cheap and the result is instantly noticeable.

It's more a case of 'Because we can' rather than 'Because we need to'.

Title: n64 digital audio possible?
Post by: Hojo_Norem on April 21, 2007, 07:47:01 AM
Quote
About what you say of the SNES S/PDIF mod, I would like to hear those clips.
Was doing some maintenance on my PC so I had a chance to install a S/PDIF bracket and get some recordings done.

http/www.jcomcp.plus.com/snes_digi.rar (~10MB) (http://www.jcomcp.plus.com/snes_digi.rar)

Contained are the first few seconds of Super Metroid's opening (in wave format)and the opening of Tales of Phantasia (in mp3) both recorded via digital and analog.

All the recordings were done at 48Khz 16bit on my 'SB Live! 5.1 digital' soundcard.

The SNES used is a pal model with ALL the trimmings (50/60Hz, lockout, 128Mbit GDSF7 with CDROM, the works...).  The analog audio was recorded via the A/V port, but in all the recordings the RGB video signal was being tapped at the circuit board and connected to a custom connector.  The digital was recorded via the S/PDIF mod into the Live's CD_SPDIF input on the card.

All the audio was normalised after recording and the 2 mp3 files were encoded with a newish version of LAME.
Title: n64 digital audio possible?
Post by: radorn on May 01, 2007, 10:36:28 AM
hey butter_pat_head, thanks for the samples. Coincidentally you posted them on my birthday xD.
Title: Re: n64 digital audio possible?
Post by: timofonic on March 01, 2008, 09:36:55 PM
Any news about this? A digital audio output for N64 could be quite interesting :)