set up DC patch framework
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1CA49C
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1AADD8
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1C7408
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1C9E9C
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1C75B4
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1CA240
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1F27E8
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1F27E8
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1F17F0
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.meta name="Invisible MAG"
|
||||||
|
.meta description="Make MAGs invisible"
|
||||||
|
|
||||||
|
entry_ptr:
|
||||||
|
reloc0:
|
||||||
|
.offsetof start
|
||||||
|
start:
|
||||||
|
.include WriteCodeBlocksDC
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x8C1F2354
|
||||||
|
.data 0x00000004
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.data 0x00000000
|
||||||
|
.data 0x00000000
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
mova r0, [first_patch_header]
|
||||||
|
mov r7, r0 # r7 = read ptr
|
||||||
|
xor r3, r3
|
||||||
|
dec r3
|
||||||
|
shl r3, 2 # r3 = 0xFFFFFFFC (mask for aligning r7)
|
||||||
|
apply_patch:
|
||||||
|
add r7, 3
|
||||||
|
and r7, r3 # r7 = (r7 + 3) & (~3) (align to 4-byte boundary)
|
||||||
|
mov.l r4, [r7]+ # r4 = dest addr
|
||||||
|
mov.l r5, [r7]+
|
||||||
|
add r5, r4 # r5 = dest end ptr (dest addr + size)
|
||||||
|
|
||||||
|
again:
|
||||||
|
cmpeq r4, r5
|
||||||
|
bt done # if (r4 == r5) break
|
||||||
|
mov.b r0, [r7]+
|
||||||
|
mov.b [r4], r0 # *(r4) = *(r7++);
|
||||||
|
bs again # r4++; continue
|
||||||
|
add r4, 1
|
||||||
|
|
||||||
|
done:
|
||||||
|
rets
|
||||||
|
nop
|
||||||
|
|
||||||
|
debug_stop:
|
||||||
|
mov r2, 0x46
|
||||||
|
shl r2, 1
|
||||||
|
shl r2, 8
|
||||||
|
shl r2, 16
|
||||||
|
mov.l [r2], r0
|
||||||
|
add r2, 4
|
||||||
|
mov.l [r2], r3
|
||||||
|
add r2, 4
|
||||||
|
mov.l [r2], r4
|
||||||
|
add r2, 4
|
||||||
|
mov.l [r2], r5
|
||||||
|
add r2, 4
|
||||||
|
mov.l [r2], r6
|
||||||
|
add r2, 4
|
||||||
|
mov.l [r2], r7
|
||||||
|
bs debug_stop
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
first_patch_header:
|
||||||
Reference in New Issue
Block a user