Kodewerx
https://kodewerx.org/forum/

ASM ARDS Code Help?
https://kodewerx.org/forum/viewtopic.php?f=17&t=6091
Page 1 of 1

Author:  Zamurick [ Fri Sep 12, 2008 11:30 pm ]
Post subject:  ASM ARDS Code Help?

I'm trying to make my own infinite jumps code for Lego Star Wars: The Complete Saga, but I don't understand why it's not working...


The original code only worked for Obi-Wan. It was...
Code:
94000130 FFFD0000
221E1131 00000000
221E1132 00000005
D2000000 0000000


I then worked one out for Qui-Gon and subtracted the addresses to find the offset. The Qui-Gon infinite jumps code I created was...
Code:
94000130 FFFD0000
221F1C41 00000000
221F1C42 00000005
D2000000 00000000




Here's the ASM of the code I need help with:
Code:
ldr r0,=0x0213239E ; Current character.
ldr r1,=0x00010B10 ; Character offset.
ldr r2,=0x021E1131 ; Base character code (Obi-Wan Kenobi (Episode 1)).
ldr r0,[r0] ; r0 = r0 value
add r0,#0xFFFFFFFF ; r0 - 1
mla r4,r0,r1,r2 ; r4 = (r0 x r1) + r2
ldr r3,r4 ; r3 = r4
ldr r5,r4 ; r5 = r4
add r3,#1 ; r3 + 1
ldr r6,=0x00000005 ; r6 = 0x00000005
ldr r7,=0x00000001 ; r7 = 0x00000001
str r6,[r3] ; r3 (value) = r6
str r7,[r5] ; r5 (value) = r7
bx r14 ; necessary


The AR code I'm getting from Kenobi's tool is:
Code:
023FE074 012FFF11
E0000000 00000044
E59F0030 E59F1030
E59F2030 E5900000
E2400001 E0242190
E51F3008 E51F5008
E2833001 E3A06005
E3A07001 E5857000
E5836000 E12FFF1E
0213239E 00010B10
021E1131 00000000
023FE074 E3520003


Which I'm then turning into:

Code:
94000130 FFFD0000
023FE074 012FFF11
E0000000 00000044
E59F0030 E59F1030
E59F2030 E5900000
E2400001 E0242190
E51F3008 E51F5008
E2833001 E3A06005
E3A07001 E5857000
E5836000 E12FFF1E
0213239E 00010B10
021E1131 00000000
023FE074 E3520003
D2000000 00000000



Whenever I jump (with any character), I can only double jump. What am I doing wrong here? I've spent several hours on this and just don't get it.

Anyone have suggestions?

Author:  Zamurick [ Sun Sep 14, 2008 5:57 pm ]
Post subject:  Re: ASM ARDS Code Help?

Well since ASM isn't faring too well for me, would this be possible with a pointer code?

I can't really get Kenobi's tool working, is there a tutorial somewhere?


EDIT: I figured it out. :D

Infinite Jumps:
Code:
94000130 FFFD0000
6212533C 00000000
B212533C 00000000
B0000008 00000000
200000BD 00000001
200000BE 00000005
D2000000 00000000

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/