• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › Dolphin Patches (Archive) v
« Previous 1 ... 3 4 5 6 7 Next »

[Patch] dspHLE Mario galaxy 1 music
View New Posts | View Today's Posts

Pages (18): « Previous 1 ... 10 11 12 13 14 ... 18 Next »
Jump to page 
Thread Rating:
  • 4 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[Patch] dspHLE Mario galaxy 1 music
11-18-2010, 10:29 AM
#111
skid Offline
skidau / skid_au
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,006
Threads: 8
Joined: Aug 2009
I would start looking from this line.

The word "loop" appears way too often in the comments of that file.
Find
11-18-2010, 10:50 AM
#112
shuffle2 Offline
godisgovernment
*
Project Owner  Developers (Administrators)
Posts: 698
Threads: 17
Joined: Mar 2009
it's probably just referring to how dsp code is in annoyingly pipelined loops :p
Find
11-18-2010, 11:22 AM
#113
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,639
Threads: 39
Joined: Oct 2009
no wonder it gets dizzy after a while Undecided
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
11-18-2010, 11:57 AM (This post was last modified: 11-18-2010, 12:03 PM by Xtreme2damax.)
#114
Xtreme2damax Offline
New & Improved
********
Global Moderators
Posts: 3,135
Threads: 91
Joined: Mar 2009
Modifications have been made to that code without any improvement and I believe that mostly affects Windwaker, Twilight Princess and Mario Galaxy aren't really affected by that code. If someone could do some actual debugging, then someone else can handle the rest. Just knowing what chunk or line of code is causing the issue would narrow it down enough that anyone semi-knowledgeable with coding could implement a quick fix or hack until something more permanent and accurate is found

It's the AFC code that should be debugged, once we can find where the music is bugging out then maybe a hack or something can be temporarily implemented. I've noticed improvements when I've tinkered with the AFC code and the following code:

Quote:int CUCode_Zelda::ConvertRatio(int pb_ratio)
{
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
u32 _ratio = (pb_ratio << 16);
return (u64)((_ratio * _ratioFactor) * 16) >> 16;
}

int CUCode_Zelda::SizeForResampling(ZeldaVoicePB &PB, int size, int ratio) {
// This is the little calculation at the start of every sample decoder
// in the ucode.
return (PB.CurSampleFrac + size * ConvertRatio(PB.RatioInt)) >> 16;
}

The AFC code and the code above is what should be debugged, while playing the game to find out what is happening and what code is causing the music to bug out. I don't know how to debug else I would do this, sometimes I hate how n00bish I am with my lack of understanding coding. Sad
Find
11-19-2010, 01:24 AM (This post was last modified: 11-19-2010, 03:38 PM by prefix.)
#115
prefix Offline
Member
***
Posts: 54
Threads: 0
Joined: Dec 2009
I've got the motivation, and some time. Always helps getting warmly accepted into the community ;-)

I might even learn something from this experience Smile

edit: i will try to debug this, after building dolphin, and maybe a fastdebug

edit2: probably be awhile lol, alot of downloading to do in order to compile 64bit in win7 64x, especially with Visual C++ 2008 Express Edition.

exactly what part of the code was edited in order to extend the amount of time the music looped?

Code:
return (PB.CurSampleFrac + size * ConvertRatio(PB.RatioInt)) >> 16;
?

Some Troubleshooting ingame;

The music keeps playing until one of the tracks end, at which point it cannot loop. If the music is changed (by entering a pipe in a level or going into The Terrace etc) before that track ends, the music keeps playing, until a track reaches its end, at which point all background music ceases and will not work again until Dolphin is restarted. (Perhaps some sort of DSP-HLE soft reset could be issued once track ends, so instead of looping it, it starts all over?) I'm just thinking aloud.

Line 183 in the UCode_Zelda_Voice.cpp
Code:
PB.ResamplerOldData[i] = 0;  // Doesn't belong here, but dunno where to do it.
maybe its interfering with the loop. It's right in the middle of if needs reset, update sample counters and pb.reached end.. seems kind of ominous. though im no expert. this particular line of code is repeated 3 times in the cpp

I would like try removing or commenting out;

Code:
PB.YN1 = PB.LoopYN2;
                        PB.YN2 = PB.LoopYN1;

But im still Downloading Win7 64bit SDK through web installer.. taking forever.

... Let the downloader run overnight still no progress, tried to cancel it, that took forever as well.. ended up forcing the win7 64bit sdk setup to close... might be a firewall problem.
I'll try to find a direct download later today
Intel Core I7 920 @ 2.67gz | Velociraptor Harddrive | 4GB Corsair DDR3 1800mhz RAM | 64bit Windows 7 Ultimate | ASUS EAH5770 1GB GDDR5 | Real Wiimote
Find
11-20-2010, 12:23 AM
#116
Jack Frost Offline
aka. BhaaL
**********
Developers (Some Administrators and Super Moderators)
Posts: 510
Threads: 3
Joined: Oct 2009
I think I should point to my old work again: http://pastie.org/1311060
Thats part of RenderVoice_Raw and Decoder21_ReadAudio, ripped out from the numerous changes I got in there. Decoder21_ReadAudio should be a pretty accurate reverse of the DSP Ucode, RenderVoice_Raw might need a few tweaks still (and I hope removing my AFC stuff from the patch didn't break it).

IIRC, it did affect the Wind Waker intro to play just fine, but it only worked when running completely at 100%. Not sure if that part of the changes caused it, or whether some other changes are responsible, but for now I get hangs (code waiting for audio to stop looping) when trying to get to the menu screen after the intro music started playing. My sources are a bit too messy to isolate the problem, and time is always an issue here...
Find
11-20-2010, 12:37 AM (This post was last modified: 11-20-2010, 01:24 AM by Xtreme2damax.)
#117
Xtreme2damax Offline
New & Improved
********
Global Moderators
Posts: 3,135
Threads: 91
Joined: Mar 2009
Thanks, I will try playing around with that code and note anything here.

Regarding the AFC code, any idea what line or lines of code cause the music to bug out?
@Jack Frost, the downside right now to removing the PB.StopOnSilence hack is that Windwaker will hang on a black screen for 30 seconds to a minute when loading a save game depending on the area the game was saved in. Is there any way to eliminate the PB.StopOnSilence hack without the game hanging?

And yeah, there is still some crackling so something is still wrong somewhere.
Find
11-20-2010, 02:36 AM
#118
Jack Frost Offline
aka. BhaaL
**********
Developers (Some Administrators and Super Moderators)
Posts: 510
Threads: 3
Joined: Oct 2009
The whole AFC code is a single bug, depending on how you look at it (in particular, its a copy of PCM with some hacks to make-it-work­™) - or just plain wrong if you like.

StopOnSilence shouldn't be in there, but I haven't looked at it in more detail other than reversing whats in the UCode. Maybe we're not handling certain things that should actually cause the loop to break otherwise, like certain mails etc. That would be something one could check out using the LLE plugin and the HandleMail funcs in the HLE plugin/the related UCode file.
Find
11-20-2010, 04:39 AM
#119
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,639
Threads: 39
Joined: Oct 2009
BTW, Epic Mickey also has its music cut out after a while (why always the games with the most beautiful soundtrack? -_- ); however, I don't think it's the same issue since it seems the music starts playing again if you enter and exit the Home menu.
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
11-20-2010, 05:26 AM
#120
Xtreme2damax Offline
New & Improved
********
Global Moderators
Posts: 3,135
Threads: 91
Joined: Mar 2009
Tired of trying to figure this out lol:

Code:
if ((PB.RepeatMode == 0) || (!PB.StopOnSilence == 0))
                        PB.KeyOff = 1;
            PB.RemLength = 0;
            PB.CurAddr = PB.StartAddr + PB.RestartPos + PB.Length;
            
            while (sampleCount < _RealSize)
                _Buffer[sampleCount++] = 0;
            return;

Quote:if ((PB.RepeatMode == 0) || (!PB.StopOnSilence == 0))

Without the bolded part "PB.StopOnSilence" in the AFC loop, it kills sound effects and eventually completely kills audio altogether. >_<
Find
« Next Oldest | Next Newest »
Pages (18): « Previous 1 ... 10 11 12 13 14 ... 18 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode