UberASM and many other patches install a hack which stores the current level number into $010B. If you don't use any of them, here is one you can patch to your ROM:
Code!addr = $0000
if read1($00FFD5) == $23
sa1rom
!addr = $6000
endif
!level = $010B|!addr
ORG $05D8B7
BRA +
NOP #3 ;the levelnum patch goes here in many ROMs, just skip over it
+
REP #$30
LDA $0E
STA !level
ASL
CLC
ADC $0E
TAY
LDA.w $E000,Y
STA $65
LDA.w $E001,Y
STA $66
LDA.w $E600,Y
STA $68
LDA.w $E601,Y
STA $69
BRA +
ORG $05D8E0
+
--------------------
Okay, my layout looks ugly.
Follow Us On