
Originally Posted by
Area51_Hacker2

Originally Posted by
Vash
Code:
ldr r1,=0x022AF136
mov r5,#0x0
mov r0,#0x4
mov r2,#0xF
loop:
ldrb r3,[r1]
add r1,#1
cmp r3,#0x3A
blt number
add r3,#9
number:
and r3,r2
lsl r3,r0
add r5,r3
sub r0,#0x4
bpl loop
ldr r2,=0x021D8FC8
add r5,#1
strb r5,[r2]
bx lr
Sigh, try that?
ROFL! My problems were caused by you!
ldr
r1,=0x022AF136
I'm sorry? How did I cause you any problems whatsoever? You two were using the TTI source from RTWE which looks like this:
Code:
ldr r1, text
mov r5,#0x0
mov r0,#0xC
mov r2,#0xF
loop:
ldrb r3,[r1]
add r1,#1
cmp r3,#0x3A
blt number
add r3,#9
number:
and r3,r2
lsl r3,r0
add r5,r3
sub r0,#0x4
bpl loop
I simply changed r1 from text to the actual text address. If you want to be more organized you can change it back and add text at the end. If this isn't what you meant by bolding r1, then please be more specific and I will gladly help you fix it. Anyway, I do see a silly mistake I made before and this one makes more sense (although it probably still won't work).
Code:
ldr r1,=0x022AF136
mov r5,#0x0
mov r0,#0x4
mov r2,#0xF
loop:
ldrb r3,[r1]
add r1,#1
cmp r3,#0x3A
blt number
add r3,#9
number:
and r3,r2
lsl r3,r0
add r5,r3
sub r0,#0x4
bpl loop
ldr r2,=0x021D8FC8
add r5,#1
strb r2,[r5]
bx lr
Again, I'm sorry if I did make an error somewhere but you'll have to be more specific. I'm also sorry that you don't have access to the actual TTI source and you have to make do with this version. It should work all the same.
EDIT: I also just noticed that your r2 loads the U1.0 first emotion address. I'm not sure if you were making the code for 1.0 but I'm just letting you know. Also, without a latch this will add more then 0x1h to r5 and you won't get the desired byte. So this still wouldn't work but technically with a latch it should.