Skip to content

Instantly share code, notes, and snippets.

@sp1187 sp1187/elevator.asm Secret
Created Sep 4, 2017

Embed
What would you like to do?
.headersize 0x80245000 //configure RAM - ROM difference
.org 0x80252448 //RAM address
jal elevator
nop
.headersize 0x80283280 //switch section
.org 0x803843e0 //RAM address
elevator:
lui t1, 0x8036
lw t1, 0x1158 (t1) //Mario object
lw t0, 0x0214 (t1)
beq t0, r0, @@skip
nop
lwc1 f2, 0x00b0 (t0)
lui t2, 0x8034
lwc1 f4, 0xb1bc (t2) //Mario Y speed
mtc1 r0, f6
c.lt.s f2, f6
nop
bc1t @@skip
nop
add.s f4, f2, f4
swc1 f4, 0xb1bc (t2) //Mario Y speed
lwc1 f18, 0xb1b0 (t2) //Mario Y position
add.s f18, f18, f2
swc1 f18, 0xb1b0 (t2) //Mario Y position
@@skip:
jr ra
nop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.