Dolphin, the GameCube and Wii emulator - Forums

Full Version: AFC Looping Checkbox for DSP Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
I had the idea to do it that way, but I had one line of code in the wrong spot. I only needed to know what to add to UCode_Zelda_Voice.cpp..

It may need a proper if/else statement though to work properly. Then again I'm not sure since I am a newbie to coding, I decided to attempt this since it seemed easy enough to accomplish.

Can any of the developers provide any insight or feedback?
Lol , I had a problem because I didn't hooked the file to the config file to actually make it recognize what it was the new line for ( and because Instead of writing "looping" I wrote "lopping" xD )

I only need to put something in the tip box to don't confuse people Tongue
Yeah thanks, I had the code slightly wrong in UCode_Zelda_Voice.cpp. I also added an option in ISOProperties.cpp and ISOProperties.h to switch it on and off on a per game basis. I hope I did it correctly..

I already added a tooltip for this option..

I noticed that it was looping regardless of whether or not the hack was enabled. After some tinkering I found the correct way of ensuring the option can be toggled and actually works.

Instead of:

if (g_Config.m_EnableAFCLooping || PB.RepeatMode == 0)

It should be:

if (!g_Config.m_EnableAFCLoopingHack || g_Config.m_EnableAFCLoopingHack && PB.RepeatMode == 0)

Edit: Another thing, I can't seem to get the checkbox to work in ISOProperties so the option can be toggled on/off on a per game basis.

Todo: Get the ISOProperties checkbox to work so this option can be toggled on/off on a per game basis, for only the games that actually need it. Wink

Here are the plugins, I will also try to create a patch later on. These plugins were compiled for revision 4986, they may also work on the latest revision..
Tested, and it worked perfectly in a short Demo scene (the one Midona destroy Hyrule piramid). However there are some bugs AFC unchecked didn't make:
*Some SE are off (like Sword slashes)
*At some point sounds completely get off and it doesn't back (for me it was the middle of boss battle with final Ork)

But this is a great update. Happy to see Zelda TP focused develop. Makes whole of the game worth to play again. So thank you!
Yeah, unfortunately that's why I made it optional since it has issues. It's only there for those who want to test it and there until proper AFC looping is implemented. I'm trying to make it functional in ISOProperties so it can be enabled/disabled only for the games that need it instead of the setting being global.

I will be releasing a patch for it within the next bit.

Your welcome by the way. Wink
(02-01-2010, 03:44 PM)Xtreme2damax Wrote: [ -> ]Yeah, unfortunately that's why I made it optional since it has issues. It's only there for those who want to test it and there until proper AFC looping is implemented. I'm trying to make it functional in ISOProperties so it can be enabled/disabled only for the games that need it instead of the setting being global.

Well yes, that makes sense really.
If it could be dynamically enabled only for Demo/Intro scenes, that's perfect but I guess it'll be tough...
Here is the patch, source is enclosed in the patch file of course. I've also included a readme in the archive that explains what the patch does and what is left to finish. The final v2 patch will contain a fix to enable and disable the AFC looping hack on a per game basis instead of globally, that way it can be enabled only for the games that need it.

If possible it would be nice to enable and disable on the fly or dynamically enable it only when it's needed as mentioned above even though I don't think the latter is technically possible.

Anyone is welcome to make improvements to this patch, all I ask is that I am credited for the time it took to put this together. Smile
(02-01-2010, 05:40 AM)Xtreme2damax Wrote: [ -> ]Instead of:

if (g_Config.m_EnableAFCLooping || PB.RepeatMode == 0)

It should be:

if (!g_Config.m_EnableAFCLoopingHack || g_Config.m_EnableAFCLoopingHack && PB.RepeatMode == 0)
Why ? Tongue
Well because the method you used enabled the AFC looping hack regardless of whether or not the setting was enabled and this works correctly the way it's supposed to. Wink
And about the ISOProperties checkbox , I couldn't make it work too , Or:

The UCode_Zelda_Voice.cpp is not allowing me to overrride the setting

or

The checkbox is just not hooked to the option at all Tongue
Pages: 1 2 3 4 5 6 7 8 9