I can't find some variables, can you help me?

Started by Fighter19, November 30, 2013, 10:12:34 AM

Previous topic - Next topic

Bully@Wiiplaza

#30
My source of the fixed teleporter:
[spoiler]Hook: 80246A88

.set STORAGE, 0x80001650
.set BUTTON_MINUS, 0x1000
.set BUTTON_ONE, 0x200
.set BUTTON_ADDRESS, 0x8037A640

lis r12, STORAGE@h

lis r10, BUTTON_ADDRESS@h
ori r10, r10, BUTTON_ADDRESS@l
lhz r10, 0 (r10)

andi. r9, r10, BUTTON_MINUS
beq- _NOSTORE

lwz r11, 0 (r5)
stw r11, STORAGE@l (r12)
lwz r11, 8 (r5)
stw r11, STORAGE + 4@l (r12)

_NOSTORE:

andi. r9, r10, BUTTON_ONE
beq- _NOLOAD

lwz r11, STORAGE@l (r12)
stw r11, 0 (r5)
lwz r11, STORAGE + 4@l (r12)
stw r11, 8 (r5)

_NOLOAD:

lfs f0,8(r5)[/spoiler]
Note that there are x y z coordinates but only x and z are actually used.
The height is always 0.

http://geckocodes.org/?c=RHAP01
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

megazig

#31
Quote from: Bully@Wiiplaza on December 13, 2013, 05:29:39 PM
My source of the fixed teleporter:
[spoiler]Hook: 80246A88

.set STORAGE, 0x80001650
.set BUTTON_MINUS, 0x1000
.set BUTTON_ONE, 0x200
.set BUTTON_ADDRESS, 0x8037A640

lis r12, STORAGE@ha

lis r10, BUTTON_ADDRESS@ha
lhz r10, BUTTON_ADDRESS@l (r10)

andi. r9, r10, BUTTON_MINUS
beq- _NOSTORE

lwz r11, 0 (r5)
stw r11, STORAGE@l (r12)
lwz r11, 8 (r5)
stw r11, STORAGE + 4@l (r12)

_NOSTORE:

andi. r9, r10, BUTTON_ONE
beq- _NOLOAD

lwz r11, STORAGE@l (r12)
stw r11, 0 (r5)
lwz r11, STORAGE + 4@l (r12)
stw r11, 8 (r5)

_NOLOAD:

lfs f0,8(r5)[/spoiler]
Note that there are x y z coordinates but only x and z are actually used.
The height is always 0.

http://geckocodes.org/?c=RHAP01

now with less code and more safety. lwz/stw use SIMM so offset needs @ha for initial lis
I'm also not too keen on using the 0x80000000-0x80001800 area for storage as it's not defined for such things. setting up variables in your .s would be better