diff options
author | Colin Noga <Tempus@chronometry.ca> | 2013-06-06 11:09:46 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2013-06-06 11:09:46 -0500 |
commit | a0d09d365dff46fc987a3c66ea837afae19a1d9d (patch) | |
tree | ef67236d6bd5d978dfd8a2d981fda75d224c1f41 /src/classic_controller.S | |
parent | 51ece71399c424b8ecced389cad6297edd4412ec (diff) | |
download | kamek-a0d09d365dff46fc987a3c66ea837afae19a1d9d.tar.gz kamek-a0d09d365dff46fc987a3c66ea837afae19a1d9d.zip |
major fix for controller issue that snuck in
Diffstat (limited to 'src/classic_controller.S')
-rw-r--r-- | src/classic_controller.S | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/classic_controller.S b/src/classic_controller.S index ec35e60..fd6aa4c 100644 --- a/src/classic_controller.S +++ b/src/classic_controller.S @@ -197,10 +197,29 @@ skip_plus: beq- skip_minus ori r6,r6,0x1000 // WPAD_BUTTON_MINUS skip_minus: - andi. r4,r5,0xF // Any_DPAD + andi. r4,r5,0xC003 // Any_DPAD beq- DPADOnly // DPAD and Analog are processed separately to avoid conflicting button presses + andi. r4,r5,1 // WPAD_CLASSIC_BUTTON_UP + beq- skip_up + ori r6,r6,2 // WPAD_BUTTON_RIGHT +skip_up: + andi. r4,r5,2 // WPAD_CLASSIC_BUTTON_LEFT + beq- skip_left + ori r6,r6,8 // WPAD_BUTTON_UP +skip_left: + andi. r4,r5,0x8000 // WPAD_CLASSIC_BUTTON_RIGHT + beq- skip_right + ori r6,r6,4 // WPAD_BUTTON_DOWN +skip_right: + andi. r4,r5,0x4000 // WPAD_CLASSIC_BUTTON_DOWN + beq- skip_down + ori r6,r6,1 // WPAD_BUTTON_LEFT +skip_down: + mr r5,r6 + blr +DPADOnly: lfs f8,0x6c(r26) // left analog x ; KPADInsideStatus->KPADEXStatus_cl->lstick lfs f9,0x70(r26) // left analog y ; KPADInsideStatus->KPADEXStatus_cl->rstick @@ -230,26 +249,6 @@ skip_left_analog: blr -DPADOnly: - andi. r4,r5,1 // WPAD_CLASSIC_BUTTON_UP - beq- skip_up - ori r6,r6,2 // WPAD_BUTTON_RIGHT -skip_up: - andi. r4,r5,2 // WPAD_CLASSIC_BUTTON_LEFT - beq- skip_left - ori r6,r6,8 // WPAD_BUTTON_UP -skip_left: - andi. r4,r5,0x8000 // WPAD_CLASSIC_BUTTON_RIGHT - beq- skip_right - ori r6,r6,4 // WPAD_BUTTON_DOWN -skip_right: - andi. r4,r5,0x4000 // WPAD_CLASSIC_BUTTON_DOWN - beq- skip_down - ori r6,r6,1 // WPAD_BUTTON_LEFT -skip_down: - mr r5,r6 - blr - |