Item Cycler v2 [Ro]
#11
My apologies, XXXX is the address, not the button, so 3E80

YYYY is 0880 (if it doesnt work, try 0800
Reply
#12
(01-16-2025, 09:17 AM)_Ro Wrote: DO NOT USE MORE THAN ONE BUTTON AT SAME TIME (Example: B and D-Pad Left. Use one: D-Pad Left for example)

Just a quick info: The "andi. rA, rB, YYYY" instruction alone doesn't work with multiple buttons for one activator. But if you want to use multiple buttons, you can add an "cmplwi rA, YYYY" instruction after the "andi. rA, rB, YYYY" instruction and change the "beq" instruction afterwards to "bne" instruction to make it work.


Here is an Example how this would look like:

lis r12, 0x8034
lhz r12, 0x5842 (r12) # load button from controller adress (here PAL Classic Controller is taken as example)
andi. r12, r12, 0x0028 # and immediate the button activator(s) (here X and Y are used as example)
cmplwi r12, 0x0028 #same values as on the and immediate instruction.
bne+ skip # if this combination not pressed, skip the code execution

If you want to make it work for only these buttons (with no other buttons) pressed down, simply remove the "andi." instruction or replace it with nop.
Reply
#13
I am aware.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)