Update on my progress with 96khz.(a breakthough... I think?)

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Locked
Bahamut_ZERO_Clue

Update on my progress with 96khz.(a breakthough... I think?)

Post by Bahamut_ZERO_Clue »

I finally got it working with some help from a friend known as KnightofGania. Anywho, the sound is somewhat premature and we haven't ironed out all the possibly reprocussions... but we did make some progress last night and got a working sample. The dspproc.asm code required a minor edit from the original posted code namingly adding in 96000 to these lines (line 403):

NEWSYM SBToSPCSpeeds, dd 8000,10989,22222,43478,15874,32258,48000
NEWSYM SBToSPCSpeeds2, dd 8192,11289,22579,45158,16384,32768,48000
%else
NEWSYM SBToSPCSpeeds, dd 8000,11025,22050,44100,16000,32000,48000

Thank you Kode54 for at least giving me a hit to where the rest of the code was though I figured it was all handled by winlink.cpp (go figure... it's asm)

But we did some testing and we noticed something about Final Fantasy 3's SquareSoundRape and it sounded clearer but less distorted. We did NOTHING to the buffersize and SoundSpeeds making this pure raw audio but something just hit my ear and it sounded different. Less obvious whoosing, whiring, shining, etc. to what would it sound like. We only were aiming for Guassian Interpolation as that more or less is the native SPC700's interpolation method (at least by all known documents it is) so the output is unknown across Cubic and 8-Point. He said something about 96000 not needing anything else codewise except those minor edits., however he did inform me of a slight problem and told me I was thinking to hard for a simple problem but said for 5 years out I did okay but I could have done better :lol: :P

Whenever ZSnesW exited the sound would default back to 32000 and each time you restarted the application it would need to be reset. He said whatever it was, was located in the GUI and possibly the developers would know about how to correct this. He looked at the code for several hours but found nothing. So here's the latest code submission from both of us so any help as to why the GUI resets the audio sample rate is apprieciated:

================================================
line 504 of cfgload.c

- WRITE_LINE("; 6 = 48,000 Hz\r\n\r\n");
+WRITE_LINE("; 6 = 48,000 Hz, 7 = 96,000 Hz\r\n\r\n");

line 818 of winlink.cpp

+ case 7:
+ wfx.nSamplesPerSec = 96000;
+ SoundBufferSize=1024*12;
+ break;

line 951 of winlink.cpp

+ case 7:
+ wfx.nSamplesPerSec = 96000;
+ SoundBufferSize=1024*12;
+ break;

line 1833 of guiwindp.inc

+GUISoundTextB8 db '96000HZ',0

line 1412 of guikeys.inc

- .sampratenext db 1,4,5,6,2,3,0,0,0,0
+.sampratenext db 1,4,5,6,2,3,7,0,0,0

line 2578 of guimouse.inc

- sampratenext db 1,4,5,6,2,3,0,0,0,0
+sampratenext db 1,4,5,6,2,3,7,0,0,0

line 403 of dspproc.asm

- NEWSYM SBToSPCSpeeds, dd 8000,10989,22222,43478,15874,32258,48000
- NEWSYM SBToSPCSpeeds2, dd 8192,11289,22579,45158,16384,32768,48000
- %else
- NEWSYM SBToSPCSpeeds, dd 8000,11025,22050,44100,16000,32000,48000

+ NEWSYM SBToSPCSpeeds, dd 8000,10989,22222,43478,15874,32258,48000,96000
+ NEWSYM SBToSPCSpeeds2, dd 8192,11289,22579,45158,16384,32768,48000,96000
+ %else
+ NEWSYM SBToSPCSpeeds, dd 8000,11025,22050,44100,16000,32000,48000,96000

================================================

Remember the sample rate does reset to 32000 when you exit ZSnesW.exe and so far that's the only bug we've had or noticed. Also, he said the code might have some minor if noticable speed problems but nothing a good modern CPU wouldn't solve. I didn't notice it but he said it made a 600mhz Pentium 3 drag to half speed.
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

Quit trying.

Please.

Certain individuals [who will remain nameless because I am not at liberty to say] have already done 96kHz [and done it in about 30 minutes], and all you have to do get a build with it is to pay $20.
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

Besides, what's wrong with posting your progress in the 96kHz thread you already started ? :P
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
Locked