mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 13:54:09 +08:00
用于生成cheat的代码和工具
This commit is contained in:
parent
4faf2e0e33
commit
fae275e5c0
7
tools/cheat-builder/asm/build.sh
Normal file
7
tools/cheat-builder/asm/build.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
PATH=$PATH:/var/devkit/bin
|
||||
arm-agb-elf-gcc -ffreestanding -nostdlib -nostartfiles -o /tmp/cht /var/asm/exec.s
|
||||
arm-agb-elf-strip --strip-all /tmp/cht
|
||||
arm-agb-elf-objdump -fd /tmp/cht
|
||||
arm-agb-elf-objcopy -O binary -j .text /tmp/cht /tmp/cht.bin
|
||||
mv /tmp/cht.bin /var/asm/cht.bin
|
31
tools/cheat-builder/asm/exec.s
Normal file
31
tools/cheat-builder/asm/exec.s
Normal file
@ -0,0 +1,31 @@
|
||||
.file "cheat.S"
|
||||
.text
|
||||
.align 4
|
||||
.global _start
|
||||
.type _start,function
|
||||
|
||||
_start:
|
||||
add r0, r15, #0x28
|
||||
|
||||
.Lapply:
|
||||
ldr r1, [r0], #4
|
||||
cmp r1, #0
|
||||
beq .Ldone
|
||||
|
||||
ldr r2, [r0], #4
|
||||
and r3, r2, #255
|
||||
mov r2, r2, lsr #8
|
||||
|
||||
.Lmemset:
|
||||
strb r3, [r1], #1
|
||||
subs r2, r2, #1
|
||||
bne .Lmemset
|
||||
b .Lapply
|
||||
|
||||
.Ldone:
|
||||
bx r14
|
||||
|
||||
.cheat:
|
||||
.long 0x0200234e
|
||||
.long 0x00000180
|
||||
.long 0x0
|
BIN
tools/cheat-builder/devkitadv.tar.bz2
Normal file
BIN
tools/cheat-builder/devkitadv.tar.bz2
Normal file
Binary file not shown.
2
tools/cheat-builder/makebin.sh
Executable file
2
tools/cheat-builder/makebin.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker run -it --rm -v /root/3ds/devkit/gbatool/devkitadv:/var/devkit -v /root/3ds/devkit/gbatool/asm:/var/asm i386/debian:buster-slim bash /var/asm/build.sh
|
Loading…
x
Reference in New Issue
Block a user