- 232
- Posts
- 14
- Years
- Seen Sep 10, 2019
I would like to reset the player's rocket launch counter. Here's the routine called by special2 LASTRESULT 0x103 which reads the player's current rocket launch counter:
This routine reads off of a ram offset and then stores up to a maximum value of 0x270f (9999) to a var such as LASTRESULT. I would like to edit the value stored at the ram offset itself, but I don't know how to figure out the ram offset location.
Code:
sub_8138BDC: @ 8138BDC
push {lr}
ldr r0, _08138BFC
movs r1, 0
ldrsh r0, [r0, r1]
movs r1, 0x7
bl __divsi3
lsls r0, 16
lsrs r0, 16
ldr r1, _08138C00
cmp r0, r1
bls _08138BF6
adds r0, r1, 0
_08138BF6:
pop {r1}
bx r1
.align 2, 0
_08138BFC: .4byte 0x03005cf8
_08138C00: .4byte 0x0000270f
This routine reads off of a ram offset and then stores up to a maximum value of 0x270f (9999) to a var such as LASTRESULT. I would like to edit the value stored at the ram offset itself, but I don't know how to figure out the ram offset location.
Last edited: