-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathslime-patch.asm
More file actions
56 lines (44 loc) · 773 Bytes
/
slime-patch.asm
File metadata and controls
56 lines (44 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.gba
.open "slime_original.gba","output.gba",0x08000000
Decompress EQU 0x8098ac8
//==================CODE============================
.org 0x087d1c70
.area 0xDAC
.align 4
MaybeDecompress:
push {r0,r1}
ldr r1, =0x08800000
cmp r0, r1
blt less_than
;; my stuf
pop {r4,r5,r6,r7,lr}
bx lr
less_than:
pop {r0,r1}
mov r4, r8
mov r5, r9
mov r6, r10
mov r7, r11
push {r4,r5,r6,r7}
ldr r7, =0x02010880
ldmia r0!,{r4}
push r0
ldr r0, =jumpBack|1
mov lr, r0
pop r0
bx lr
.pool
.dw jumpBack
.dw 0x2010880
.endarea
//====================HOOKS==========================
.org Decompress
droutine:
push {r4,r5,r6,r7,lr}
ldr r4, =MaybeDecompress|1
bx r4
.pool
.dw MaybeDecompress
jumpBack:
//Close file and finish
.close