Originally posted by AdamOh, It works! Thanks Kaijyuu! The one thing is that it keeps taking lives after zero, and I end up with numbers like P0.
Try something like this:
CodeMain:
LDA $0DBE ;Load current lives
CMP #$01 ;Compare it to 1
BEQ Death ;Branch if lives=1
DEC $0DBE ;If not, decrease by one
RTL ;And return
Death:
STA $0DBE ;Store lives again
JSL $00F606 ;Jump to death routine
RTL ;Return
Return:
RTL ;Return
Unfortunately I don't really understand the jumps, so you'd have to do them yourself. I also recommend reading Iceguy's ASM tutorial. It helped me understand ASM a lot better than Schwa's.
Also, a ROM address is a part of the game that
CANNOT BE LOADED OR STORED TO!!!!! Instead you usually jump to ROM addresses to trigger specific routines and such. So if you wanted a block that instantly kills Mario, you'd do this:
$00F606 is the death subroutine, so you'd jump to it to have Mario die.
RAM addresses can be loaded and stored to change aspects of the game such as lives and coins. They are also used in sprites and in complex ways, but I'm only good enough with asm to create blocks.
So if you wanted a block that multiplied Mario's coins by 2 when touched, you'd do this:
CodeLDA $0DBF ; Load current coin amount into accumulator (A)
ASL A ; Multiply A by 2
RTL ; Return
I hope this clears up some stuff.
Your layout has been removed.