WiiRd forum

Wii & Gamecube Hacking => WiiRD Remote Debugger => Topic started by: Panda On Smack on September 23, 2009, 05:04:22 PM

Title: Load a vaue into floating point register
Post by: Panda On Smack on September 23, 2009, 05:04:22 PM
hey guys, age old question for me

i have this to load a value into a normal register, r4 holds 00989693:

lis r4,0x0098
ori r4,r4,0x9693
stw r4,0(r3)

what if i want to load the value 43FA0000 into floating point register 0?

ta
Title: Re: Load a vaue into floating point register
Post by: hetoan2 on September 23, 2009, 11:52:43 PM
why not just write the value 43FA0000 to some blank region (like 817F0000 area usually is good) and then use:
For HHHHLLLL use your address. like 817F0000 or anything really.

lis r16,0xHHHH
ori r16,r16,0xLLLL
lfs f0,0(r16)

then before your instruction you can write 43FA0000 to HHHHLLLL or you can even use simple assembly if you really wanted to. Not sure you would tho.
Title: Re: Load a vaue into floating point register
Post by: Panda On Smack on September 24, 2009, 09:11:04 AM
Thanks Hetoan

i ended up storing the value in a gecko register and then using what you suggested