jumpman

by soapagent

Game: SMW

Description: whee!

; Base ASM file - feel free to copy/paste this and use this for your own code.
; This is the version with data bank management - be careful to ALWAYS plb before every rtl!!!

	LDA $100	; \ only run in gamemode 14
	EOR #$14	; |
	ORA $9D		; | and when the game isn't paused
	BEQ +		; |
	RTL		; |
	+		; /

	PHB		; \ push old data bank to stack, and set data bank to current program bank
	PHK		; | this allows inline data using db
	PLB		; / !! WARNING!! YOU *MUST* ALWAYS PLB BEFORE YOU RTL
	
; YOUR CODE HERE

lda $15
bit #$80
beq end

lda $72
ora $75
bne end

lda $14
and #$07
tax
lda jumpheight,X
sta !vy

end:
plb
rtl

jumpheight: db $80,$8a,$94,$9f,$a7,$b3,$ca,$e4
back to listings