• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM & Hex] [EM] Reset Mossdeep's rocket launch counter?

232
Posts
12
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:
    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:
    Back
    Top