hi, nacho has sent me one of your routines, i want to modify it for FR. But dont know what those offsets are. Can u explane me how it works?
.THUMB
.ALIGN 2
@080A30FE 00000000
@080A3102 0000480047xxxxxx08
PUSH {R0-R7}
LDR R0, = 0x02026B42
LDRH R0, [R0]
CMP R0, #0
BEQ END
LDR R1, = 0x04000010
MOV R0, #0
STRH R0, [R1]
LDR R0, = 0x020297F8
LDRH R0, [R0]
LDR R7, = 0x08F16E00
MOV R3, #0xFF
LSL R3, R3, #8
ADD R3, #0xFF
MOV R5, #4
LSL R5, R5, #8
LOOP:
LDRH R2, [R7]
CMP R2, R3
BEQ END
CMP R0, R2
BEQ AFTER
ADD R7, #8
B LOOP
AFTER:
LDRH R2, [R7, #2]
LSL R2, R2, #3
LDR R3, = 0x08F16D60
ADD R0, R3, R2
LDR R4, [R0]
LDR R0, [R0, #4]
LDR R1, = 0x0202F048
SWI 0x12
SUB R1, R1, R5
SWI 0x12
MOV R0, R4
LDR R1, = 0x06008020
SWI 0x12
LDR R0, = 0x08F16DD0
LDR R1, = 0x0202F048
ADD R1, R1, #0x20
MOV R2, #8
SWI 0xC
SUB R1, R1, R5
SWI 0xC
LDR R0, [R7, #4]
LDR R1, = 0x06008400
SWI 0x12
LDR R0, = 0x0600F800
MOV R1, #0xC0
LSL R1, R1, #8
ADD R1, R1, #1
MOV R2, #14
MOV R3, #1
BL LOOP_
MOV R1, #0xD0
LSL R1, R1, #8
ADD R1, R1, #32
MOV R2, #14
MOV R3, #2
BL LOOP_
END:
POP {R0-R7}
ADD SP, SP, #0x14
POP {R0}
BX R0
LOOP_:
STRH R1, [R0]
ADD R1, R1, #1
ADD R0, R0, #2
SUB R2, R2, #1
BPL LOOP_
ADD R0, R0, #0x22
MOV R2, #14
SUB R3, R3, #1
BPL LOOP_
BX LR