28-06-2014, 01:26 PM
hello to everybody, most people use writebytetooffset to do a simple thing that it is:
There are more wbto, specially to change the palette ¿no?
Well i made a routine that do it, that is the next:
And after that, how to push it normal.
If you use this routine, you need to give credits to me, Eing.
There are more wbto, specially to change the palette ¿no?
Well i made a routine that do it, that is the next:
Codice:
.align 2
.thumb
main:
push {r0-r2,lr}
ldr r0,.dispcnt
ldrh r1, .dispcntv
strh r1,[r0]
ldr r0, .textbox_pos
mov r1, #0x5f
strb r1,[r0]
ldr r0, .textbox_data
ldrh r1, .ff
strh r1, [r0]
mov r2, #0x0
b bucle
bucle:
add r2, #0x2
mov r1, #0x00
strh r1, [r0, r2]
cmp r2, #0x1C
beq end
b bucle
end:
pop {r0-r2,pc}
.align 2
.textbox_data: .word 0x0202f0aa
.ff: .word 0x0000ffff
.dispcnt: .word 0x04000000
.dispcntv: .word 0x00006161
.textbox_pos: .word 0x04000012
And after that, how to push it normal.
Codice:
.align 2
.thumb
main:
push {r0-r3,lr}
ldr r0, .dispcnt
ldr r1, .dispcntv
strh r1,[r0]
ldr r0, .textbox_pos
mov r1, #0x0
strb r1,[r0]
mov r2, #0x0
ldr r0, .textbox
ldr r1, .textboxv
b change
change:
ldr r3,[r1] @valor xxxx xxxx r1
str r3,[r0,r2]
add r2,#0x2
add r1,#0x2
cmp r2, #0x1c
beq fin
b change
fin:
pop {r0-r3,pc}
.align 2
.textbox: .word 0x0202f0aa
.dispcnt: .word 0x04000000
.dispcntv: .word 0x00001F70
.textboxv: .word 0x0202ECA8
.textbox_pos: .word 0x04000012
If you use this routine, you need to give credits to me, Eing.