Hey Ninja,
Looking at Computer Bot's original source,it has a default instruction of lwz r0, 0x0020 (r3). He includes it in the source before the function call for when the button activator is pressed, but afaik it doesn't need to be included at all when the activator is pressed because r0 doesn't get saved (its not a Variable register) thru the function call. Meaning its contents get wiped/changed anyway.
I had you throw it at the end via a branch scheme last night as a 'just because' thing, but here's a technically better way to write your source. Granted it makes almost zero difference.
Looking at Computer Bot's original source,it has a default instruction of lwz r0, 0x0020 (r3). He includes it in the source before the function call for when the button activator is pressed, but afaik it doesn't need to be included at all when the activator is pressed because r0 doesn't get saved (its not a Variable register) thru the function call. Meaning its contents get wiped/changed anyway.
I had you throw it at the end via a branch scheme last night as a 'just because' thing, but here's a technically better way to write your source. Granted it makes almost zero difference.
Code:
lbz r0, 32 (r3) #Default instruction
lis r12, 0x809C
lbz r12, 14521 (r12)
cmpwi r12, 1
beq- the_end
stwu r1, -128(r1)
stmw r3, 8(r1)
li r4, 0x2
li r5, 0x1
lis r12, 0x8053
ori r12, r12, 0x42E8
mtlr r12
blrl
lmw r3, 8(r1)
addi r1, r1, 0x80
the_end: