Strangely enough, I had posted this block code a while ago when it worked, but now for some reason .. it just crashes the ROM. Here it is:
PHA
LDA $7E1420
CMP #$04
BEQ SetTeleport
BNE Fail
SetTeleport
LDA #$05
STA $7E0071
LDA $7E1420
CMP #$04
BEQ Fail
Fail
PLA
RTS
So yeah, pretty straightforward - it loads the RAM address for the current amount of Yoshi coins, and then branches if it's equal or not equal - but whether or not you have four Yoshi coins, it will crash.
Any tips for why this seemed to mess up?
PHA
LDA $7E1420
CMP #$04
BEQ SetTeleport
BNE Fail
SetTeleport
LDA #$05
STA $7E0071
LDA $7E1420
CMP #$04
BEQ Fail
Fail
PLA
RTS
So yeah, pretty straightforward - it loads the RAM address for the current amount of Yoshi coins, and then branches if it's equal or not equal - but whether or not you have four Yoshi coins, it will crash.
Any tips for why this seemed to mess up?