Welcome! Log In Create A New Profile

Advanced

Emulation quality

Posted by FireAngel40k 
Re: Emulation quality
July 03, 2009 02:03AM
Or rather, could sound sync be added as an in-menu feature?....that's what I meant.
Re: Emulation quality
July 03, 2009 05:58AM
How would a sync menu item work, what would it do?
Re: Emulation quality
July 03, 2009 07:08AM
Hmmm...just an idea. Didn't older versions (1.43 ports) have it? I personally can't tell when the sound is synced or not. On the windows ports, I can. It would help with most, if not all the Square Enix sounds behave better(?) If I could, should I do a comparison of the Snes9xW port with and without sync (like in an uploaded MP3) or something? Would that help pinpoint the issue I'm describing?


Edit 11:19PM: here are a couple of games I recorded (the sound from), with and without synced sound

[www.filefactory.com]

[www.filefactory.com]

If the links die, let me know.



Edited 3 time(s). Last edit at 07/03/2009 07:21AM by the_randomizer.
Re: Emulation quality
July 03, 2009 07:44AM
Yes but 1.43 is not 1.51, it's not a simple "add a button" type thing. the snes9x team changed a lot between 1.43 and 1.50, some of it for the better, but not without drawbacks. such is "progress". 1.52 may have yet another new audio core, which would make audio a lot better overall, but who knows - might have some drawbacks.
Re: Emulation quality
July 03, 2009 08:14AM
didn't even know they were making 1.52.....guess I'll back off; didn't mean to annoy.
Re: Emulation quality
July 03, 2009 11:08AM
Anyway, soundsync is enabled by default in snes9x GX

Settings.SoundSync = true;

In 1.51, there are two sound syncing methods by the way (soundsync and sounsync2), but this does not seems to be handled differently in the code.

Here are the settings that can be modified to change the accuracy of sound emulation (and obviously emulation speed as well), bolded ones are disabled in snes9x GX, others are enabled by default.

Quote

Settings.FixFrequency
Settings.AltSampleDecode

Settings.InterpolatedSound
Settings.SoundEnvelopeHeightReading
Settings.SoundSync

Maybe enabling "FixFrequency" will improve sound emulation ?
Or add an "Advanced Settings" menu for "advanced" users that like to customize things ;-)


Other settings (hacks) that can affect emulation and can be required for some games to work properly:
Quote

Settings.DisableHDMA
Settings.BlockInvalidVRAMAccess
Settings.HDMATimingHack
Settings.ShutdownMaster



Edited 1 time(s). Last edit at 07/03/2009 02:59PM by ekeeke.
Re: Emulation quality
July 03, 2009 03:59PM
Hmmm...it's definitely worth a shot. Sounds like a plan to me. Perhaps we can try one setting at a time to see what happens...?


Edit 11:02AM (MST) What I meant to say was "would there be any possible beta releases to try these settings out?"



Edited 1 time(s). Last edit at 07/03/2009 07:03PM by the_randomizer.
Re: Emulation quality
July 03, 2009 07:17PM
You can play with those settings yourself and recompile. I've already set them to how I thought was best.
Re: Emulation quality
July 03, 2009 08:13PM
How do I edit those settings? I mean, what program do I use?
Re: Emulation quality
July 03, 2009 08:35PM
Quote
the_randomizer
How do I edit those settings? I mean, what program do I use?
You can use your favorite IDE to edit and recompile Tantric's C/C++ code. I believe most people (myself included) use Programmers Notepad for Wii since it's very devkitPRO friendly.
Re: Emulation quality
July 03, 2009 08:45PM
So I just simply look for the lines that have:

Settings.FixFrequency
Settings.AltSampleDecode
Settings.InterpolatedSound
Settings.SoundEnvelopeHeightReading
Settings.SoundSync


And change them accordingly (like from disabled to enabled or false to true), right? Maybe enabling "FixFrequency" will improve sound emulation?

Oh, and the links for the devkitpro ppc download is down.(here: [www.devkitpro.org] and then the download link)


Edit 1:05PM: Managed to open up and I think I found the code, but what do I change the value(s) to?

static void S9xSetSoundFrequency (int, int);
static void S9xConvertSoundOldValues ();
static void DecodeBlock (Channel *);
static void AltDecodeBlock (Channel *);
static void AltDecodeBlock2 (Channel *);
STATIC inline uint8 *S9xGetSampleAddress (int);

I'm probably in the wrong place...



Edited 2 time(s). Last edit at 07/03/2009 09:06PM by the_randomizer.
Re: Emulation quality
July 03, 2009 10:49PM
Do you have any advice? Which one am I supposed to edit? I'm somewhat confused as to which .cpp or .h files do I need to open/edit.
Re: Emulation quality
July 04, 2009 02:40PM
do not touch these functions
you only need to modify the following line

Settings.FixFrequency = false;;

to

Settings.FixFrequency = true;

in the function DefaultSettings () from s9xconfig.cpp ;-)

this is also where you can configure the several settings I described in the previous post
you can for example try to add

Settings.AltSampleDecode = true;

to see if this change anything to sound emulation

(by default, all settings are set to false = 0 if not specified otherwise)
Re: Emulation quality
July 04, 2009 04:16PM
Hmm.....the only file I see that's closest to s9xconfig.cpp is called "snes9x_default_config.cfg....I wonder why I can't see it....That's not the one I edit, though, I'm sure. But what you're saying is that all values that are either "False" (or 0) need to be changed to say "True"...


Edit 8:22AM: Okay, I made the necessary changes to those setttings, so now I need to select "makefile.wii" or is it just plain "makefile"?

Edit 2 (8:34AM) Tried to export the SVN, but now am getting this (Rapid SVN) "Execute: Checkout
Error: Error while performing action: PROPFIND of '/svn/trunk': 200 OK (http://snes9x-gx.googlecode.com)
Ready" Oooookay.


Edit 3 (4:16PM): Yep, definitely something amiss at google code. Cannot download SVN. Inserting this [snes9x-gx.googlecode.com] doesn't do anything.



Edited 4 time(s). Last edit at 07/05/2009 12:16AM by the_randomizer.
Re: Emulation quality
July 08, 2009 04:22AM
Maybe I should just wait until someone else fixes it, since I seem to be having bad luck with this....
Re: Emulation quality
July 15, 2009 06:47AM
What are the sound settings anyhow? I saw that some were enabled by default, such as interpolation. They should be set to 32khz sampling, 16 bit, gaussian interpolation. It sounds like it is outputting in line with those parameters except for interpolation - this is causing the sound out of snes9x on the wii to be raw and annoying.

I just tested the sync option with Super Mario RPG on my win32 computer, and it made all sorts of clipping noises with the sync option on.

So, I would just make sure the interpolation option is set and change nothing else. I know you said it was on, but my ears clearly say no.



Edited 2 time(s). Last edit at 07/15/2009 07:00AM by sprockkets.
Re: Emulation quality
July 16, 2009 04:25AM
I heard it had to do with the .ogg file that plays (the background music) in the menu is set 48000Hz where Snes9x is at what a normal SNES is, 32000Hz, and when you switch back and forth, the sound gets tinny/raspy when it shouldn't. Interpolation is definitely on since games sound smooth (a notable example is Soul Blazer, and I can notice it), so, if both could be set at 32000Hz, the issue may go away. Dborth gave me settings to mess with, but I can't access the SVN (asinine internet filter) and was hoping someone could do what he asked for someone to change, but, I assume until Snes9x 2.0 (if the project is even active), not much can be done about the "sound sync being on and not able to tell the difference issue" either, huh?
It's either wait until 2.0 or until the SnesGT programmers make their emulator open source....



Edited 1 time(s). Last edit at 07/16/2009 04:28AM by the_randomizer.
Re: Emulation quality
July 23, 2009 05:37PM
Will someone at least look into the tinny sound issue? I know 4.0.9 was just released today, but, it would be nice to know how the whole switching back-and-forth thing won't cause this issue is coming along....
Re: Emulation quality
July 23, 2009 06:29PM
What do you expect me to "look at"? I have no idea what the issue is. So no, it's not coming along.
Re: Emulation quality
July 23, 2009 11:17PM
Well, it's kind of hard to explain what the exact issue is, but I was told that it had to do with the .ogg file initialization process (in the background) when you switch back and forth between game menus/save menus and then back to the game or when you decide to load another game. I was told it was some conflict that the Snes audio is fixed at 32000hz and the .ogg file (the music) in the background was being fixed at 44100Hz and somehow, the caused the Snes game you played after closing the menu to sound tinny and/or raspy. Another thing I found out is if you spam the menu to open and close two or three times after hearing the raspy sound, the audio would revert back to its normal, non-raspy state. FceuGC and VbaGx use the same menu structure as Snes9x, but unlike Snes9x, they don't have the same raspy audio issues when going in and out of a menu no matter how many times you open/close it. You can simulate it (somewhat) on the Windows port by changing the buffer length to random from 80ms, to 240, and then to 40ms and you'll get raspy sound. Changing is back to 80ms will cause the sound to revert. Why this happens in Snes9x and not the other GX-based emulators is beyond me. One last interesting thing to note is that if you close Snes9x while the sound is in its tinny state, and go back to the wii menu, the games you play on the wii will be affected until you reboot. I should also note that it sounds as if the frequency is changed to 22000hz, but it actually isn't.



Edited 1 time(s). Last edit at 07/23/2009 11:23PM by the_randomizer.
Sorry, only registered users may post in this forum.

Click here to login