i make a C0 and doesn't work to maybe is just the code
the code:
lis r12, 0x8035
lhz r12, 0x57E2 (r12)
li r11, 0x0880
and r0, r11, r12
cmpw r0, r11
lis r12, 0x8000
beq- button_pressed
#Nothing Pressed, Reset Button Status, End C0
li r0, 0
stb r0, 0x3FF (r12)
blr
button_pressed:
.set InputManager_s_instance, 0x809bd70c
lis r3, InputManager_s_instance@ha
lwz r3, InputManager_s_instance@l (r3)
lwz r3, 0x8 (r3)
lhz r4, 0x20 (r3)
ori r4, r4, 0x1
sth r4, 0x20 (r3)
blr
the code:
lis r12, 0x8035
lhz r12, 0x57E2 (r12)
li r11, 0x0880
and r0, r11, r12
cmpw r0, r11
lis r12, 0x8000
beq- button_pressed
#Nothing Pressed, Reset Button Status, End C0
li r0, 0
stb r0, 0x3FF (r12)
blr
button_pressed:
.set InputManager_s_instance, 0x809bd70c
lis r3, InputManager_s_instance@ha
lwz r3, InputManager_s_instance@l (r3)
lwz r3, 0x8 (r3)
lhz r4, 0x20 (r3)
ori r4, r4, 0x1
sth r4, 0x20 (r3)
blr