What's new

Announcement: Cycle-accurate N64 development underway.

OP
MarathonMan

MarathonMan

Emulator Developer
Hey mudlord, I have a trophy for you. It's for the ten thousandth time that has been pointed out to me by a "special" person.

Back on topic: I recall thumbing through the N64 documents, and never saw anything about audio aside from it being all "mixed in software". Does that mean it's similar to GBA's DirectSound channels? Or is there some involvement from the RSP that complicates things? If it's the former I will add audio for you right now :D

Nothing is changed as far as audio is concerned, you just have a finer-grained ability to respond to timers due to the cycle-accuracy so the stuttery-ness of HLE is done for. If you do it in DS, I'll rewrite for OpenAL just FYI (as I want to remain cross-platform...) :)
 

Nintendo Maniac

New member
That reminds me - how the heck is LLE audio going to work? Some games like Mario Kart 64 use totally wacky sampling rates - it's something like 26807Hz. Seeing how no PC sound card would ever be able to play that back natively, isn't resampling going to have to happen somewhere (whether hardware or software), and therefore wouldn't technically be 100% accurate?

Or am I missing something obvious here?
 

Zuzma

New member
I wouldn't worry too much about that. If the resampling is done properly there should be no difference in the audio from a real n64.

edit: lets redo this.
edit2: I imagine the audio is converted to analogue after being processed by the RSP. So the resampling would take the place of the analogue conversion.
 
Last edited:

Reznor007

New member
Yes, on real hardware the audio DAC is connected directly to the RCP chip. It automatically handles whatever oddball sampling rate the games generate. Last year I used a frequency counter to check the sampling rate of a few games while looking into making a digital audio output for my real n64. Mario 64 was about 32khz even, but Gretzky was only 22.5khz. Sadly most spdif equipment won't accept sampling rates under 32khz.
 

Nintendo Maniac

New member
Well the thing I'm concerned about are digital audio outputs on PCs, you'd pretty much need software resampling for that to work I'd think.
 
Last edited:

Zuzma

New member
Yes, on real hardware the audio DAC is connected directly to the RCP chip. It automatically handles whatever oddball sampling rate the games generate. Last year I used a frequency counter to check the sampling rate of a few games while looking into making a digital audio output for my real n64. Mario 64 was about 32khz even, but Gretzky was only 22.5khz. Sadly most spdif equipment won't accept sampling rates under 32khz.

I don't really understand that though. So how does the DAC know to lower the sample rate anyway? Why not just put everything out at 32Khz? Hell I might as well learn some real technical info about the n64 then just throw around buzzwords. :)
 
Last edited:
F

Fanatic 64

Guest
I'll rewrite for OpenAL just FYI (as I want to remain cross-platform...) :)
Well, OpenAL isn't really cross-platform, it is a proprietary API which is available on whatever Creative Labs wants it to be. OpenAL Soft is a free, fully cross-platform API, but it processes audio on the CPU, which I guess already has enough load with the emulator itself. Or you could go with OpenAL 1.0, but that's really archaic. DirectSound/XAudio is definitely out of the question...
 

Brawler

New member
WWF No Mercy now runs and can get to actual gameplay. Only seen a few graphical glitches during character select. runs around 20 V/I on 3570k 4.0Ghz. This is also run with the emucr build 9-15

Mario Party also runs very well 30-50 V/Is
 
Last edited:

Nintendo Maniac

New member
So I just recently found out that the night-fog in BattleTanx Global Assault seems to be optimized for the 90s CRT gamma; on a 2000-era Trinitron CRT or any flat-panel without 90s CRT gamma emulation*, the night-fog in BattleTanx:GA looks and feels MUCH more claustophobic and seems to much more obviously be a "wall of fog" rather than just distance-darkness.

Therefore, I do believe that, much like higan/bsnes, for a truely accurate look we'll need a "90s-CRT-gamma-levels" option or something similar.


*my Toshiba HDTV does this on the composite input - it's EXTREMELY obvious when comparing Snes9x GX on the Wii to Snes9x on a PC hooked up via VGA. By comparison, Snes9x GX on Wii had extremely similar gamma levels to bsnes/higan with its gamma setting enabled. Also, I could totally tell in certain games that there was some black-crush going on or something over composite with my HDTV because my 2001-model Trinitron CRT (that said HDTV replaced because the CRT died) was actually capable of the modern gamma level standard. :p
 
Last edited:
F

Fanatic 64

Guest
I guess we should just add an option to enable all these "accuracy" filters, or display the raw frame. That way you could set it to taste.
 

Reznor007

New member
I don't really understand that though. So how does the DAC know to lower the sample rate anyway? Why not just put everything out at 32Khz? Hell I might as well learn some real technical info about the n64 then just throw around buzzwords. :)

The RCP chip has 3 lines going to the DAC chip, a data line which contains the sound information, a serial bit clock line, and LR sample clock line. The RCP changes the clock lines based on what sampling rate the game wants to use. I assume they would use lower rates to save processor time when generating the sound and use it for other tasks.
 

Zuzma

New member
Nice, thanks for the simple explination. I vaguely have an idea of how a clock generator works from building one in minecraft so I get the clock lines. I'm certain you're on the right track for it saving uh (cpu cycles?) on the RSP by lowering the sample rate. I had said something like that before except my question didn't make sense so I erased that part of it.
 
OP
MarathonMan

MarathonMan

Emulator Developer
Did some testing with LoZ: OoT. Runs really well (If a bit slow). :) Only one graphical bug I noticed aside from 1 or 2 random flickers in the opening cutscenes, see attachments.

Pause menu comes up immediately after pressing start, something other emulators don't seem to get right (Is this only me?). And I had heard other people mention that the paper doll of Link doesn't display in most emulators or something to that effect. No problems with that here either! Do you have any documentation on the AIF? Perhaps since you amassed so many docs you could put them on a repository of some kind?

Aware of the flicker bug, and the graphical distortion in Link's room. No idea what's causing the flicker, but it's also present in various models and such in other games (boot Mario Kart 64, for example, and the checkered flag flashes shortly after the spinning Nintendo logo). I think the distortion in Link's room is caused by some dodgy RSP LWC2/SWC2 code, but even that's just a shot in the dark.

I'm extremely hesitant to release any documentation that I've amassed as I'm not sure what's "okay" in all cases; sorry.

Either way, I haven't touched the AIF at all yet, so whatever's known already is <= what I have anyways!

EDIT: The pause screen working is primarily due to the fact that a lot of emulators don't even attempt to do FB emulation.
 
Last edited:
OP
MarathonMan

MarathonMan

Emulator Developer
EDIT2: Majora's Mask has some pretty odd bugs as well, the first two with the multiple Ocarinas may be somewhat easy to trace. The third image is when Link trips balls after falling off the ledge, and is clearly corrupted. The third is the spin attack in Deku form being wildly screwed up. Anyway, you may have already seen this, but there you go :p

Urg, the item select screen means there's almost certainly a VR4300 bug somewhere. Bummer, because I have nooo idea here it would be. Thanks for the report, though.
 

xdaniel_FWB

Living RCP Hungup
Just dropping in to say 1) there's great work being done here by MarathonMan and anyone else involved, and 2) the Ocarinas on Zelda MM's menu screen seem familiar from some other emulators long ago; IIRC it was related to not emulating MM's FlashRAM, or not emulating it right or somesuch? I might be wrong, tho, it's been years.
 

Top