(10-20-2016, 06:53 PM)Zerowalker Wrote: Hmm, i can get the dividing part to work.
However, no matter what i do the game goes into and endless loop if i alter that section.
Even if i alter it by using the same function.
In this case "fmr f1, f31".
So if i replace that, with the same function, it will still go into an endless loop.
It makes no sense to me, shouldn't it be exactly the same, the only difference is a branch jump which i expect shouldn't really do any harm, except maybe a performance loss.
EDIT:
//Original Code
801a133c: fmr f1, f31
//Gecko Code
C21A133C 00000001
FC20F890 00000000
//ASM
Address: 801A133C
fmr f1,f31
It being an endless loop even with the original code sounds like some kind of LR problem or something like that causing a BLR to goof.
Paste the first 10 or so instructions of the Pikmin function you're injecting code into and the last 10 or so instructions and I'll see if I can help without you pasting an entire function in here (pasting an entire function might be dangerous in terms of forum rules, idk)
EDIT: If that's the exact code your code generator spit out then something's wrong; there absolutely has to be a nop instruction at the end of all gecko ASM injection codes (so that the code handler has a "slot" in which to put the branch instruction). This is the proper way for that gecko code to be generated:
C21A133C 00000002
FC20F890 00000000
60000000 00000000


