ASM Moon Jump [Black_Wolf]

I actually posted this in another thread somewhere, but it was actually a decent little guide when I was done, so i figured I should post here lol.


first off you wanted the button right, well its pretty easy really, you can usually find the hex for button presses somewhere (ex on psp LTrigger = 0x0100) so if you DO know that, just hold that button and search the value, hold a different button and search its value.


If you CAN"T however, you can do an unknown value search, hold nothing, hold a button seach increase. Hold that button THEN another button, search increase, let go of the first button, search decrease etc. Remember generally the buttons ADD together when a combo is held.


Now there are 2 popular methods for a moon jump code, one is generally easier than the other, but the address is hard to find.


The first method is a simple button activated gravity mod. You hold a button, gravity is lessened. Now finding gravity can be a chore, generally it can be found as a float 1 value (0x3f800000) HOWEVER try finding co-ordinates and experimenting with the area around it.


Now the SECOND method is to use the Z co-ordinates (height) to make a custom "jump" routine in asm. I generally use this is I can't find the gravity modifier, but it nevertheless works in a similar manner.


Basically, you're going to need to inject a subroutine that does the following


Loads controller address's value

Loads the value of the BUTTON you want

Branches to the end if these are different

Loads the Z Co-ordinates

Loads what you want to ADD to them (try experimenting with pokes first, remember if you HOLD the button, it will continually increase, so a small value is usually good)

Add them together

Store the modded co-ords back at their address. In modern powerpc asm it would look like this. For this example the


-co-ordinates are at 0x80CC4584

-controller address is at 0x80496AC0

-The button we want to activate has a vaalue of 0x00000200

-We want to add 0x004C to the Z Co-ords

- We are injecting our routine at the adddress 0x804568C8

lis r0, 0x8049 //Loads first 2 bytes of Control address

lwz r1, 0x6AC0(r0) //Loads the full value of the control address into r1

li r2, 0x00000200 //Loads the value for the button we want to be the activator into r2

lis r3, 0x80CC //Loads first 2 bytes of co-ords

lwz r4, 0x4584(r3) //Loads the full value of the z-co-ords into r4

li r5, 0x0000004C //Loads the value we want to add to co-ords (jump speed) into r5

cmpw r1, r2 //Compares the BUTTON value and the CONTROLLER address (check if we are holding our activator or not)

bne +0x12 //If we are NOT holding the button activator, jump to the end i.e cancel

add r6, r4, r5 // If we ARE, add 0x004C to our z-co-ord value (increase our height)

stw r6, 0x4584(r3) //Store the modified co-ords back to their address!


And thats pretty much it lol. In theory this should increase our height if holding a button, therefore "jumping" into the air. Now there might be some mistakes in the above routine, I'm very new to this type of asm, I'm good at mips but some of the syntaxes are very confusing, so bear with me if there some errors. This should however, give you a fair idea of how its done.


This is exactly how my ASM program looked: