lorom
org $80FF50
LDA $05E5
LSR
CMP #$6800
BPL pain
CMP #$5000
BPL ouch
LDA #$0000
STA $7ED8EE
RTL

pain:
ASL $12
ASL $12
LDA #$0002
STA $7ED8EE
RTL
ouch:
ASL $12
LDA #$0001
STA $7ED8EE
RTL

org $91DF61
JSL $80FF50
NOP


org $91D8E3
JSR $FFEE
JSR $DD5B
org $91FFEE
PHA
JSL $80FFA0
PLA
RTS
org $80FFA0
LDA $7ED8EE
CMP #$0002
BEQ pain2
CMP #$0001
BEQ ouch2
LDX #$A380
RTL
pain2:
LDX #$CC00
RTL
ouch2:
LDX #$CC10
RTL

org $93803F
JSR $F620

org $938042
BRA $04

org $93F620
STA $0C2C,X
LDA $05E5
LSR
CMP #$7800
BPL SamusDoubleCrit
CMP #$6800
BPL SamusCrit
RTS

SamusDoubleCrit:
ASL $0C2C,X
SamusCrit:
ASL $0C2C,X
RTS

org $A0A4E2
JSR $F900

org $A0F900
LDA $05E5
LSR
CMP #$7800
BPL SpecialDoubleCrit
CMP #$6800
BPL SpecialCrit
LDX $0E54
RTS
SpecialDoubleCrit:
ASL $16
SpecialCrit:
ASL $16
LDX $0E54
RTS