mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 22:04:10 +08:00
Merge branch 'dev_cheat' of https://gitee.com/anod/open_agb_firm into dev_cheat
This commit is contained in:
commit
29f57a58d1
22
tools/cheat-builder/asm/key_enable.s
Normal file
22
tools/cheat-builder/asm/key_enable.s
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.file "key_input.c"
|
||||||
|
.text
|
||||||
|
.align 2
|
||||||
|
.global _start
|
||||||
|
.type _start,function
|
||||||
|
|
||||||
|
_start:
|
||||||
|
mov r0, #0x4000000
|
||||||
|
ldr r0, [r0, #0x130] @ r0 = read_io(0x4000130)
|
||||||
|
ldrh r1, [pc, #0x10] @ r1 = 0x3ff
|
||||||
|
ldrh r2, [pc, #0x0e] @ r2 = 0x384 key:L+R+D+SEL
|
||||||
|
and r0, r0, r2 @ r0 = r0 & 0x3ff
|
||||||
|
cmp r0, r1 @ r0 == key
|
||||||
|
beq _next @ if r0 == key then next else return
|
||||||
|
bx lr
|
||||||
|
|
||||||
|
_const:
|
||||||
|
.long 0x03ff0384
|
||||||
|
|
||||||
|
_next:
|
||||||
|
.long 0
|
||||||
|
|
28
tools/cheat-builder/asm/key_onoff.s
Normal file
28
tools/cheat-builder/asm/key_onoff.s
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
.file "key_onoff.c"
|
||||||
|
.text
|
||||||
|
.align 2
|
||||||
|
.global _start
|
||||||
|
.type _start,function
|
||||||
|
|
||||||
|
_start:
|
||||||
|
mov r0, #0x4000000
|
||||||
|
ldr r0, [r0, #0x130] @ r0 = read_io(0x4000130)
|
||||||
|
ldrh r1, [pc, #0x24] @ r1 = 0x384 key:L+R+D+SEL
|
||||||
|
ldrh r2, [pc, #0x22] @ r2 = 0x3ff
|
||||||
|
and r0, r0, r2 @ r0 = r0 & 0x3ff
|
||||||
|
ldr r2, [pc, #0x1c] @ r2 = static_addr(isOn)
|
||||||
|
ldrb r3, [r2] @ r3 = *isOn
|
||||||
|
cmp r0, r1
|
||||||
|
eoreq r3, r3, #1 @ if r0 == key then *isOn = !r3
|
||||||
|
streqb r3, [r2]
|
||||||
|
cmp r3, #0
|
||||||
|
bne _next @ if r3 != 0 then next else return
|
||||||
|
bx lr
|
||||||
|
|
||||||
|
_const:
|
||||||
|
.long 0x03ff0384
|
||||||
|
.long 0
|
||||||
|
|
||||||
|
_next:
|
||||||
|
.long 0xFFFFFFFF
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user