hi, i am trying to change a exp multiplier code for golden sun dark dawn.
the (U) code(s) are here:
over at this forum (gbatemp.net/threads/reverse-engineering-golden-sun-dark-dawn-exp-multiplyer-code.272880) someone changed the code to 0.5x experience, since the game is easy, to make it harder.
the (E) version of the game has a exp multiplier code as well:
comparing this to this (U) code (also above), how are they different, yet give the same output?
(this is what i think about the codes, from the what i could read about on the internet)
the first line is the same, just a different memory address for the different region. correct?
an if statement, the 5 at the start means it is 32 bit if, and to only do the following (until D0 or D2) if the memory at 212194C is equal to E0820000?
the second line for (E) is doing a 16 bit write, but for (U) there is a 32 bit write? are these interchangeable for this code?
with the third line, the difference between D0 and D2 is that D2 clears all the temporary data.
BUT.
someone explains what the code does on this post:
gbatemp.net/threads/reverse-engineering-golden-sun-dark-dawn-exp-multiplyer-code.272880/#post-3370026
This isn't as straightforward as it looks because the code is changing instructions, it's looking for a code E0820000 which is
add r0, r2, r0 (r0 = r2 + r0)
and editing only the low bits, for example the x4 code is changed into E0820100
which is
add r0, r2, r0, lsl 2 (this shifts r0 left twice for x4 before adding)
what you want is the opposite, to do a right shift.
add r0, r2, r0, lsr 1
which is E08200A0 (you can use an assembler, maybe more information is in the rom hacking thread)
Since your code is only changing the last part of the instruction, the updated code should be
0.5x
5212194C E0820000
1212194C 000000A0
D0000000 00000000
so, does this mean the first line is not an IF? it is an asm instruction?
i want to understand these more
because, i want to modify it to make a 0.75x code.
i understand that this cannot be done(?) like the other multiple of 2 codes?
so i would need to make a 0.25x code, use the 0.5x code together.
so, where the guy who made the 0.5x code, where he shifts it to the right once, i want to store that value.
then, i want to right shift that stored value again, and add it to itself.
like,
data = shiftright(originalvalue)
data += shiftright(data)
originalvalue = data
D5000000 XXXXXXXX makes the data register what XXXXXXXX is.
D4000000 XXXXXXXX adds XXXXXXXX to the data register.
i need some help, i am not trying to be a 'leech' and just ask for the code i really want to understand what is happening
i use c++ and java a lot, yet never had to use any asm etc.
in summary, i want to know how the U and E codes has a different 2nd line, and i want to understand the first line of the code
thanks for the help, i really appreciate it
the (U) code(s) are here:
Code:
2x 5212194C E0820000 1212194C 00000080 D0000000 00000000 4x 5212194C E0820000 1212194C 00000100 D0000000 00000000 8x 5212194C E0820000 1212194C 00000180 D0000000 00000000 16x 5212194C E0820000 1212194C 00000200 D0000000 00000000
the (E) version of the game has a exp multiplier code as well:
Code:
x2 52121a08 e0820000 02121a08 e0820080 d2000000 00000000
Code:
2x 5212194C E0820000 1212194C 00000080 D0000000 00000000
the first line is the same, just a different memory address for the different region. correct?
an if statement, the 5 at the start means it is 32 bit if, and to only do the following (until D0 or D2) if the memory at 212194C is equal to E0820000?
the second line for (E) is doing a 16 bit write, but for (U) there is a 32 bit write? are these interchangeable for this code?
with the third line, the difference between D0 and D2 is that D2 clears all the temporary data.
BUT.
someone explains what the code does on this post:
gbatemp.net/threads/reverse-engineering-golden-sun-dark-dawn-exp-multiplyer-code.272880/#post-3370026
This isn't as straightforward as it looks because the code is changing instructions, it's looking for a code E0820000 which is
add r0, r2, r0 (r0 = r2 + r0)
and editing only the low bits, for example the x4 code is changed into E0820100
which is
add r0, r2, r0, lsl 2 (this shifts r0 left twice for x4 before adding)
what you want is the opposite, to do a right shift.
add r0, r2, r0, lsr 1
which is E08200A0 (you can use an assembler, maybe more information is in the rom hacking thread)
Since your code is only changing the last part of the instruction, the updated code should be
0.5x
5212194C E0820000
1212194C 000000A0
D0000000 00000000
i want to understand these more

because, i want to modify it to make a 0.75x code.
i understand that this cannot be done(?) like the other multiple of 2 codes?
so i would need to make a 0.25x code, use the 0.5x code together.
so, where the guy who made the 0.5x code, where he shifts it to the right once, i want to store that value.
then, i want to right shift that stored value again, and add it to itself.
like,
data = shiftright(originalvalue)
data += shiftright(data)
originalvalue = data
D5000000 XXXXXXXX makes the data register what XXXXXXXX is.
D4000000 XXXXXXXX adds XXXXXXXX to the data register.
i need some help, i am not trying to be a 'leech' and just ask for the code i really want to understand what is happening

i use c++ and java a lot, yet never had to use any asm etc.
in summary, i want to know how the U and E codes has a different 2nd line, and i want to understand the first line of the code
thanks for the help, i really appreciate it




Comment