Those changes seem a bit arbitrary, especially the YN1/2 ones. And I noticed your raw patch is not the most recent, are you still not satisfied with the accurate implementation as described by the ucode?
[Patch] dspHLE Mario galaxy 1 music
|
08-22-2010, 01:21 AM
I noticed the YN1/YN2 functions were using 0x00 instead of the addresses that were listed in Ucode_Zelda.h for these functions, however this may not be needed and may be off. Nexus's fix seemed a bit weird, I wanted to try eliminating PB.StopOnSilence from being used and use the original PB.CurAddr = PB.StartAddr + (PB.LoopStartPos >> 4) * PB.Format; instead of the lengthy code that was used by neXus since I didn't feel that was needed.
08-22-2010, 04:17 AM
Ah, now I understand. The UCode uses lri to load #0X66 and #0X67. Those correspond to PB.YN1 and PB.YN2. Hence your change is pretty much useless (and most likely also wrong). Same thing with CurBlock.
Your only changes other than that were renames of labels, a simplification of the PB.CurAddr calculation (which might be wrong altogether) and some condition changes that are less verbose (but do the same thing). 08-22-2010, 04:35 AM
(This post was last modified: 08-22-2010, 04:44 AM by Xtreme2damax.)
My basic goal was to just eliminate the the PB.StopOnSilence Hack from being used within the AFC code, and try to shorten up the lengthy code neXus used as I didn't feel that was needed. The other stuff was just the result of me fooling around, hoping that I might nail the music looping issue, but I've had no such luck so far.
I'm determined, I just wish I knew how to code so I could make some progress. Despite my lack of coding abilities, I'm still smart enough to mess with the code and understand some things. I now regret dropping out of college and my computer science classes. Anyways I'm trying to help, I've always wanted to contribute more than just a normal member which is fueling my determination. :Edit: I just was messing with the AFC code, the changes closer to the bottom were all changes by neXus that I patched into Ucode_Zelda_Voice.cpp. 08-22-2010, 05:58 AM
You might want to use a UCode dump and duddies docs (GC DSP.pdf) as guide, along with UCode_Zelda.h (which lists the address values, #0X66 for examples refers to the member PBZeldaVoice.YN2, marked as 0x66).
08-22-2010, 11:13 AM
(08-22-2010, 05:58 AM)Jack Frost Wrote: You might want to use a UCode dump and duddies docs (GC DSP.pdf) as guide, along with UCode_Zelda.h (which lists the address values, #0X66 for examples refers to the member PBZeldaVoice.YN2, marked as 0x66). Will I have to dump the Ucodes from my Wii or is there already a Ucode dump available for development purposes? Where can I find the GC DSP.PDF? Would the GC DSP.PDF also apply for the Wii or is it for GC only? 08-22-2010, 07:54 PM
Boot any game with the LLE Plugin and look at User\Dump\DSP. Some parts may be the same, some parts may be different (thats why we have multiple UCodes in the HLE Plugin, Zelda, AX, etc)
GC DSP.pdf is part of docs\DSP and should also apply to Wii in most cases. 08-23-2010, 12:10 AM
Do the devs already have all Ucode dumps for games or would passing these along to the developers be of any use?
08-23-2010, 12:32 AM
Boot game, done. They just dump them as they need them, no need to upload them anywhere.
08-24-2010, 12:51 AM
(This post was last modified: 08-24-2010, 01:03 AM by Xtreme2damax.)
I'm trying to make heads and tales of the dumped ucode to figure out which is which. I don't even know where to begin looking in the source, here is what Mylek said and luigi2us said a while back:
Luigi2US Wrote:I guess the SMG music issue has nothing to do with the plugin. Once one music stopped, the game refuses to play any other music. Even forcing PB.IsBlank to zero and continue playing doesn't fix it. The game stops updating the buffers matched to the music PBs, so continuing playing just plays the last played part again and again. Mylek Wrote:When the last five samples of the PB are zero, the game appears to try doing something to sync the music. So any idea where I should be looking in the source and what I should be looking for. I already know what source files I should be looking in which are Ucode_Zelda.cpp, Ucode_Zelda.h, Ucode_Zelda_Voice.cpp and perhaps Ucode_Zelda_Synth.cpp. When I ran the debug build with the LLE plugin, besides dumping the Ucode the following was also written to the log. Maybe this might offer some insight to the music looping issue. So any idea what I should be looking for and where I should be looking in the source, have you and Torin made any progress yet? Quote:56:18:519 .\Src\DSPHWInterface.cpp:89 N[DSPMails]: CPU(WM) B:0 M:0x80000005 (pc=0x07fa) It doesn't seem like the looping code is the culprit. I believe emulating the buffers properly and syncing the music should be focused on first to try solving the looping issue. It should be researched how AFC audio uses these buffers since SMG/SMG2 appear to also use AFC to loop music according to luigi2us. He found that SMG uses both PCM16 and AFC audio, and as mentioned the AFC decoder is likely being used to loop music. Something also doesn't seem right with the light ucode, Wario World lacks music and by playing around with the light ucode towards the botton of Ucode_Zelda_Voice.cpp I am able to get some music working in Wario World. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 3 Guest(s)