Routine_Macros_YI.asm
Yoshifanatic1_Yoshi-s-Island-Disassembly/YI/Routine_Macros_YI.asm

;#############################################################################################################
;#############################################################################################################

macro YIBank00Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_008000:
	SEI
	REP.b #$09
	XCE
	SEP.b #$30
	LDA.b #CODE_008000>>16
	PHA
	PLB
if !CurrentBank != $00
	LDA.b #$00
endif
	PHA
	PHA
	PLD
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	STZ.w !REGISTER_JoypadSerialPort1
	LDA.b #$8F
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.b #!SuperFX_BackupRAMRegister_EnableBRAMWrite
	STA.w !REGISTER_SuperFX_BackupRAMRegister
	STZ.w !REGISTER_MosaicSizeAndBGEnable
	STZ.w !REGISTER_APUPort0
	STZ.w !REGISTER_APUPort1
	STZ.w !REGISTER_APUPort2
	STZ.w !REGISTER_APUPort3
	LDA.b #$FF
	STA.w !REGISTER_ProgrammableIOPortOutput
	STZ.w !REGISTER_HCountTimerLo
	STZ.w !REGISTER_HCountTimerHi
	STZ.w !REGISTER_VCountTimerLo
	STZ.w !REGISTER_VCountTimerHi
	STZ.w !REGISTER_DMAEnable
	STZ.w !REGISTER_HDMAEnable
	STZ.w !REGISTER_EnableFastROM
	REP.b #$20
	LDA.w #$8000
	STA.w !REGISTER_OAMAddressLo
	LDA.w #$01FF
	TCS
	SEP.b #$20
	JSL.l CODE_0082D0
	LDX.b #$10
	JSL.l CODE_008543
	REP.b #$20
	LDX.b #$0F
CODE_008062:
	LDA.w YI_ROMHeaderVectorRAMCodeBlock,x
	STA.w $0100,x
	DEX
	DEX
	BPL.b CODE_008062
	LDA.w #!RAM_YI_Global_MainRAMCodeBlock
	STA.b $20
	LDY.b #!RAM_YI_Global_MainRAMCodeBlock>>16
	STY.b $22
	LDA.w #YI_MainRAMCodeBlock
	STA.b $23
	LDY.b #YI_MainRAMCodeBlock>>16
	STY.b $25
	LDA.w #ROMBANK00_END-YI_MainRAMCodeBlock
	JSL.l CODE_008288
	SEP.b #$20
	REP.b #$10
	LDX.w #$0046
CODE_00808C:
	STZ.w !RAM_YI_Global_CurrentGameMode,x
	DEX
	BPL.b CODE_00808C
	SEP.b #$10
	LDA.b #!SuperFX_ClockSelect_20MHz
	STA.w !REGISTER_SuperFX_ClockSelect
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.b #!SuperFX_ConfigRegister_MaskedIRQ
else
	LDA.b #!SuperFX_ConfigRegister_HighSpeedFlag|!SuperFX_ConfigRegister_MaskedIRQ
endif
	STA.w !REGISTER_SuperFX_ConfigRegister
	LDA.b #$16
	STA.w $012D
	LDA.b #!SuperFX_ScreenMode_ScreenHeight_160pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STA.w $012E
	REP.b #$20
	STZ.w $012B
	STZ.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	LDX.b #FXCODE_08A97B>>16
	LDA.w #FXCODE_08A97B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.l $707E7D
	BNE.b CODE_0080C9
	LDA.l $707E7C
	CMP.b #$03
	BCC.b CODE_0080F0
CODE_0080C9:
	REP.b #$20
	LDA.w #$0000
	STA.l $707E7C
	STA.l $707E70
	STA.l $707E72
	STA.l $707E74
	STA.l $707E76
	STA.l $707E78
	STA.l $707E7A
	JSL.l CODE_108000
	SEP.b #$20
CODE_0080F0:
	CLI
CODE_0080F1:
	LDA.w $011B
	BMI.b CODE_0080F1
if !Define_YI_Global_EnableDebugFeatures == !TRUE
	NOP #2
else
	BRA.b CODE_008130
endif

ADDR_0080F8:
	LDA.w $0943
	AND.b #$10
	BEQ.b ADDR_008107
	LDA.w $012F
	EOR.b #$01
	STA.w $012F
ADDR_008107:
	LDA.w $012F
	BEQ.b CODE_008130
	LDY.b #$20
	LDA.w $0942
	AND.b #$10
	BNE.b ADDR_00812D
	LDA.w $0940
	AND.b #$30
	BNE.b ADDR_008121
	STZ.w $0130
	BRA.b CODE_00813A

ADDR_008121:
	LDA.w $0130
	BEQ.b ADDR_00812B
	DEC.w $0130
	BRA.b CODE_00813A

ADDR_00812B:
	LDY.b #$04
ADDR_00812D:
	STY.w $0130
CODE_008130:
	REP.b #$20
	INC.b $30
	SEP.b #$20
	JSL.l CODE_008150
CODE_00813A:
	DEC.w $011B
	BRA.b CODE_0080F1

YI_ROMHeaderVectorRAMCodeBlock:
;$00813F
	RTI
	NOP #3

CODE_7E0104:
	RTI
	NOP #3

CODE_7E0108:
	JML.l !RAM_YI_Global_VBlankRt

CODE_7E010C:
	JML.l !RAM_YI_Global_IRQRt

CODE_00814F:
	RTI

;EndOfROMHeaderVectorRAMCodeBlock

;---------------------------------------------------------------------------

CODE_008150:
	LDA.w !RAM_YI_Global_CurrentGameMode
	ASL
	ADC.w !RAM_YI_Global_CurrentGameMode
	TAX
	PHB
	LDA.w DATA_00816A+$02,x
	PHA
	PHA
	PLB
	LDA.l DATA_00816A+$01,x
	PHA
	LDA.l DATA_00816A,x
	PHA
	RTL

DATA_00816A:
	dl CODE_10838B-$01
	dl CODE_10891E-$01
	dl CODE_0083F0-$01
	dl CODE_1083E7-$01
	dl CODE_0083CD-$01
	dl CODE_0FBDBE-$01
	dl CODE_0083CD-$01
	dl CODE_0FBEBA-$01
	dl CODE_0083F0-$01
	dl CODE_1780D6-$01
	dl CODE_1787D5-$01
	dl CODE_0083CD-$01
	dl CODE_01AF90-$01
	dl CODE_01B4E1-$01
	dl CODE_108D4C-$01
	dl CODE_01C0D9-$01
	dl CODE_01B580-$01
	dl CODE_108E86-$01
	dl CODE_0083CD-$01
	dl CODE_0FBB7A-$01
	dl CODE_0083CD-$01
	dl CODE_0FBC66-$01
	dl CODE_0083FC-$01
	dl CODE_10E1C1-$01
	dl CODE_1780D6-$01
	dl CODE_1787D5-$01
	dl CODE_0083CD-$01
	dl CODE_10E1DA-$01
	dl CODE_10E357-$01
	dl CODE_10E3CB-$01
	dl CODE_0083A8-$01
	dl CODE_0083F0-$01
	dl CODE_17A58E-$01
	dl CODE_0083CD-$01
	dl CODE_17B3CD-$01
	dl CODE_0083CD-$01
	dl CODE_17B363-$01
	dl CODE_0083CD-$01
	dl CODE_17AA1A-$01
	dl CODE_0083CD-$01
	dl CODE_17A932-$01
	dl CODE_0083F0-$01
	dl CODE_109AE8-$01
	dl CODE_0083CD-$01
	dl CODE_10A13B-$01
	dl CODE_0083CD-$01
	dl CODE_118000-$01
	dl CODE_0083CD-$01
	dl CODE_1181D9-$01
	dl CODE_01E26D-$01
	dl CODE_0083CD-$01
	dl CODE_01E52D-$01
	dl CODE_0083CD-$01
	dl CODE_01E5E9-$01
	dl CODE_01E6F0-$01
	dl CODE_0083F0-$01
	dl CODE_10DA33-$01
	dl CODE_10DCAD-$01
	dl CODE_0083CD-$01
	dl CODE_01E6A2-$01
	dl CODE_0083CD-$01
	dl CODE_01E6B9-$01
	dl CODE_01E6F0-$01
	dl CODE_10DE3F-$01
	dl CODE_10DF53-$01
	dl CODE_0083CD-$01
	dl CODE_108A9A-$01
	dl CODE_0083CD-$01
	dl CODE_1088FB-$01

;---------------------------------------------------------------------------

CODE_008239:
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	STZ.w !REGISTER_HDMAEnable
	LDA.b #$8F
	STA.w !REGISTER_ScreenDisplayRegister
	RTL

;---------------------------------------------------------------------------

CODE_008245:
	LDA.b #$81
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	RTL

;---------------------------------------------------------------------------

CODE_00824B:
	REP.b #$20
	LDX.b #FXCODE_08BD16>>16
	LDA.w #FXCODE_08BD16
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

CODE_008259:
	REP.b #$20
	LDX.b #FXCODE_08B1D8>>16
	LDA.w #FXCODE_08B1D8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

CODE_008267:
	REP.b #$20
	LDX.b #FXCODE_08B289>>16
	LDA.w #FXCODE_08B289
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_008275:
	dw $FFFF

CODE_008277:
	LDA.b #$03
CODE_008279:
	STA.w $0127
	JSL.l CODE_008239
	JSL.l CODE_00824B
	JML.l CODE_00E37B

;---------------------------------------------------------------------------

CODE_008288:
	STA.w DMA[$00].SizeLo
	LDA.b $20
	STA.w !REGISTER_WRAMAddressLo
	LDY.b $22
	STY.w !REGISTER_WRAMAddressBank
	LDA.w #(!REGISTER_ReadOrWriteToWRAMPort&$0000FF<<8)+$00
	STA.w DMA[$00].Parameters
	LDA.b $23
	STA.w DMA[$00].SourceLo
	LDY.b $25
	STY.w DMA[$00].SourceBank
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	RTL

;---------------------------------------------------------------------------

CODE_0082AB:
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_Mode7MatrixParameterA
	LDX.b #$00
	STX.w !REGISTER_Mode7MatrixParameterA
	INX
	STX.w !REGISTER_Mode7MatrixParameterB
	LDA.w #(!REGISTER_PPUMultiplicationProductLo&$0000FF<<8)+$80
	STA.w DMA[$00].Parameters
	LDA.b $20
	STA.w DMA[$00].SourceLo
	LDX.b $22
	STX.w DMA[$00].SourceBank
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	RTL

;---------------------------------------------------------------------------

CODE_0082D0:
	JSL.l CODE_008239
	REP.b #$20
	LDY.b #$00
	STZ.b $20
	STZ.b $22
	LDA.w #$0100
	JSL.l CODE_0082AB
	LDA.w #$7E0200
	STA.b $20
	LDX.b #$7E0200>>16
	STX.b $22
	LDA.w #$BE00
	JSL.l CODE_0082AB
	STZ.b $20
	LDX.b #$7F0000>>16
	STX.b $22
	LDA.w #$0000
	JSL.l CODE_0082AB
	LDX.b #$700000>>16
	STX.b $22
	LDA.w #$7C00
	JSL.l CODE_0082AB
	LDA.w #$FFFF
	STA.l $7E4002
	LDA.w #$4802
	STA.l $7E4800
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

CODE_00831C:
	REP.b #$20
	LDY.b #$000035>>16
	STZ.b $21
	LDA.w #$000035
	STA.b $20
	LDA.w #$00CB
	JSL.l CODE_0082AB
	LDA.w #$00093C
	STA.b $20
	LDA.w #$087A
	JSL.l CODE_0082AB
	LDA.w #$006092
	STA.b $20
	LDA.w #$0166
	JSL.l CODE_0082AB
	LDA.w #$007E08
	STA.b $20
	LDA.w #$01E8
	JSL.l CODE_0082AB
	LDA.w #$702604
	STA.b $20
	LDX.b #$702604>>16
	STX.b $22
	LDA.w #$51FC
	JSL.l CODE_0082AB
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

CODE_008365:
	STY.b $03
	PLY
	STY.b $00
	REP.b #$30
	AND.w #$00FF
	ASL
	TAY
	PLA
	STA.b $01
	INY
	LDA.b [$00],y
	STA.b $00
	SEP.b #$30
	LDY.b $03
	JMP.w [$0000]

;---------------------------------------------------------------------------

ADDR_008380:
	STY.b $05
	PLY
	STY.b $02
	REP.b #$30
	AND.w #$00FF
	STA.b $03
	ASL
	ADC.b $03
	TAY
	PLA
	STA.b $03
	INY
	LDA.b [$02],y
	STA.b $00
	INY
	LDA.b [$02],y
	STA.b $01
	XBA
	SEP.b #$30
	PHB
	PHA
	PLB
	LDY.b $05
	JMP.w [$0000]

;---------------------------------------------------------------------------

CODE_0083A8:
	LDX.w $0201
	LDA.w $0200
	AND.b #$0F
	CMP.w DATA_0083C6,x
	BNE.b CODE_0083E7
	TXA
	EOR.b #$01
	AND.b #$01
	STA.w $0201
	LDA.b #!Define_YI_GameMode20
	STA.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_0083EE

DATA_0083C4:
	db $01,$FF

DATA_0083C6:
	db $0F,$00

CODE_0083C8:
	PHB
	LDA.b #DATA_0083C4>>16
	PHA
	PLB
CODE_0083CD:
	LDX.w $0201
	LDA.w $0200
	AND.b #$0F
	CMP.w DATA_0083C6,x
	BNE.b CODE_0083E7
	TXA
	EOR.b #$01
	AND.b #$01
	STA.w $0201
	INC.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_0083EE

CODE_0083E7:
	CLC
	ADC.w DATA_0083C4,x
	STA.w $0200
CODE_0083EE:
	PLB
	RTL

CODE_0083F0:
	DEC.w $0202
	BPL.b CODE_0083EE
	LDA.b #$02
	STA.w $0202
	BRA.b CODE_0083CD

CODE_0083FC:
	DEC.w $0202
	BPL.b CODE_0083EE
	LDA.b #$08
	STA.w $0202
	BRA.b CODE_0083CD

;---------------------------------------------------------------------------

CODE_008408:
	PHP
	SEP.b #$20
	LDA.w !REGISTER_SoftwareLatchForHVCounter
	LDA.w !REGISTER_PPUStatusFlag2
	REP.b #$20
	LDA.w !REGISTER_HCounter
	CLC
	ADC.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	PLP
	RTL

;---------------------------------------------------------------------------

CODE_00841F:
	PHP
	REP.b #$30
	LDY.w #$0000
	LDA.w #$BBAA
CODE_008428:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_008428
	SEP.b #$20
	LDA.b #$CC
	BRA.b CODE_008459

CODE_008433:
	LDA.b [$00],y
	INY
	XBA
	LDA.b #$00
	BRA.b CODE_008446

CODE_00843B:
	XBA
	LDA.b [$00],y
	INY
	XBA
CODE_008440:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_008440
	INC
CODE_008446:
	REP.b #$20
	STA.w !REGISTER_APUPort0
	SEP.b #$20
	DEX
	BNE.b CODE_00843B
CODE_008450:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_008450
CODE_008455:
	ADC.b #$03
	BEQ.b CODE_008455
CODE_008459:
	PHA
	REP.b #$20
	LDA.b [$00],y
	BNE.b CODE_00847C
	DEC.w $000C
	BMI.b CODE_00847C
	LDA.w $000C
	ASL
	ADC.w $000C
	TAY
	LDA.w $0003,y
	STA.b $00
	LDA.w $0004,y
	STA.b $01
	LDY.w #$0000
	LDA.b [$00],y
CODE_00847C:
	INY
	INY
	TAX
	LDA.b [$00],y
	INY
	INY
	STA.w !REGISTER_APUPort2
	SEP.b #$20
	CPX.w #$0001
	LDA.b #$00
	ROL
	STA.w !REGISTER_APUPort1
	ADC.b #$7F
	PLA
	STA.w !REGISTER_APUPort0
CODE_008497:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_008497
	BVS.b CODE_008433
	STZ.w !REGISTER_APUPort0
	STZ.w !REGISTER_APUPort1
	STZ.w !REGISTER_APUPort2
	STZ.w !REGISTER_APUPort3
	PLP
	RTS

DATA_0084AC:
	dl DATA_4E0000
	dl DATA_4E169C
	dl DATA_4E23BF
	dl DATA_4E2C39
	dl DATA_4E38D2
	dl DATA_4ED0FE
	dl DATA_4ED5D0
	dl DATA_4EE279
	dl DATA_4EEC85
	dl DATA_4F4122
	dl DATA_4F5C48
	dl DATA_4F6E5A
	dl DATA_4F82E6
	dl DATA_4FFCB2
	dl YI_SPCEngine
	dl DATA_4F33F0
	dl DATA_4EFEC1
	dl DATA_4F205D
	dl DATA_4E3E90
	dl DATA_4EBBEC

DATA_0084E8:
	db $2B,$FF,$FF,$FF,$25,$22,$2E,$FF,$25,$22,$1C,$FF,$25,$19,$13,$FF
	db $25,$16,$10,$FF,$25,$16,$0D,$FF,$25,$22,$28,$FF,$25,$16,$0A,$FF
	db $25,$19,$07,$FF,$25,$19,$1F,$FF,$25,$01,$04,$FF,$31,$34,$FF,$FF
	db $37,$3A,$FF,$FF

DATA_00851C:
	db $00,$00,$00,$01,$00,$01,$00,$01,$01,$01,$00,$00,$01,$00,$00,$00
	db $FF,$00

DATA_00852E:
	db $FF,$0C,$10,$18,$1C,$14,$1C,$20,$24,$24,$24,$28,$28,$2C,$1C,$00
	db $00,$00,$04,$08,$30

CODE_008543:
	STX.w !RAM_YI_Level_LevelHeaderMusicSettingLo
CODE_008546:
	LDX.w !RAM_YI_Level_LevelHeaderMusicSettingLo
	LDA.l DATA_00851C,x
	BMI.b CODE_008552
	STA.w !RAM_YI_Level_CantUseItemsFlagLo
CODE_008552:
	INX
	CPX.w $0203
	BNE.b CODE_008559
	RTL

CODE_008559:
	STX.w $0203
	STZ.w $0205
	LDA.l DATA_00852E,x
	TAX
	STZ.b $0C
	STZ.b $0D
	STZ.b $0E
	LDY.b #$00
CODE_00856C:
	LDA.l DATA_0084E8,x
	CMP.w $0207,y
	BEQ.b CODE_00859F
	STA.w $0207,y
	CMP.b #$FF
	BEQ.b CODE_00859F
	INC.b $0C
	PHX
	PHY
	TAX
	LDY.b $0E
	LDA.l DATA_0084AC-$01,x
	STA.w $0000,y
	LDA.l DATA_0084AC,x
	STA.w $0001,y
	LDA.l DATA_0084AC+$01,x
	STA.w $0002,y
	INY
	INY
	INY
	STY.b $0E
	PLY
	PLX
CODE_00859F:
	INX
	INY
	CPY.b #$04
	BCC.b CODE_00856C
	DEC.b $0C
	BMI.b CODE_0085B3
	SEI
	LDA.b #$FF
	STA.w !REGISTER_APUPort0
	JSR.w CODE_00841F
	CLI
CODE_0085B3:
	LDX.b #$03
CODE_0085B5:
	STZ.w !REGISTER_APUPort0,x
	DEX
	BPL.b CODE_0085B5
	REP.b #$20
	STZ.w !RAM_YI_Global_PlayMusicLo
	STZ.w !RAM_YI_Global_PreviousMusicLo
	STZ.w !RAM_YI_Global_PlaySoundHighPriorityLo
	STZ.w !RAM_YI_Global_PreviousHighPrioritySoundLo
	STZ.w !RAM_YI_Global_SoundQueueSizeLo
	STZ.w !RAM_YI_Global_SoundQueue
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

CODE_0085D2:
	LDY.w !RAM_YI_Global_SoundQueueSizeLo
	STA.w !RAM_YI_Global_SoundQueue,y
	INC.w !RAM_YI_Global_SoundQueueSizeLo
	RTL

;---------------------------------------------------------------------------

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
else
	%ROUTINE_YI_NorSpr053_KamekSayingOhMy($0085DC)
	%ROUTINE_YI_NorSpr0AA_BackgroundShyguy($0086E9)
	%ROUTINE_YI_NorSpr03E_ThinPlatform($00878A)
endif

;---------------------------------------------------------------------------

DATA_0089CC:
	dw CODE_008CBF-$01
	dw CODE_008D04-$01
	dw CODE_008D37-$01
	dw CODE_008D75-$01
	dw CODE_008D8F-$01
	dw CODE_008DA5-$01
	dw CODE_008DB2-$01
	dw CODE_008DE7-$01
	dw CODE_008DF8-$01
	dw CODE_008E16-$01
	dw CODE_008E37-$01
	dw CODE_008E5E-$01
	dw CODE_008E7E-$01
	dw CODE_008EEF-$01
	dw CODE_008EFE-$01
	dw CODE_008F0B-$01
	dw CODE_008F3B-$01
	dw CODE_008F6A-$01
	dw CODE_008F9B-$01
	dw CODE_008FD2-$01
	dw CODE_009007-$01
	dw CODE_009028-$01
	dw CODE_009099-$01
	dw CODE_0090BA-$01
	dw CODE_0090C3-$01
	dw CODE_00AD0A-$01
	dw CODE_0090F6-$01
	dw CODE_00912D-$01
	dw CODE_009154-$01
	dw CODE_009519-$01
	dw CODE_00917B-$01
	dw CODE_0091A0-$01
	dw CODE_0091C7-$01
	dw CODE_00921A-$01
	dw CODE_009254-$01
	dw CODE_00927D-$01
	dw CODE_0092EE-$01
	dw CODE_009376-$01
	dw CODE_0093A4-$01
	dw CODE_0093DE-$01
	dw CODE_009433-$01
	dw CODE_009519-$01
	dw CODE_009548-$01
	dw CODE_00955F-$01
	dw CODE_0092AD-$01
	dw CODE_0092A5-$01
	dw CODE_00955F-$01
	dw CODE_009519-$01
	dw CODE_009519-$01
	dw CODE_009519-$01
	dw CODE_009519-$01
	dw CODE_009548-$01
	dw CODE_00A7DA-$01
	dw CODE_009531-$01
	dw CODE_00961B-$01
	dw CODE_009531-$01
	dw CODE_009646-$01
	dw CODE_0095CC-$01
	dw CODE_009531-$01
	dw CODE_00986D-$01
	dw CODE_00986D-$01
	dw CODE_009519-$01
	dw CODE_00958D-$01
	dw CODE_00986D-$01
	dw CODE_009576-$01
	dw CODE_009576-$01
	dw CODE_009519-$01
	dw CODE_009548-$01
	dw CODE_009416-$01
	dw CODE_009ADD-$01
	dw CODE_009B13-$01
	dw CODE_009531-$01
	dw CODE_009519-$01
	dw CODE_009531-$01
	dw CODE_009531-$01
	dw CODE_00955F-$01
	dw CODE_009B55-$01
	dw CODE_009519-$01
	dw CODE_009B88-$01
	dw CODE_009BBC-$01
	dw CODE_009BE3-$01
	dw CODE_009C1D-$01
	dw CODE_009E92-$01
	dw CODE_009519-$01
	dw CODE_009519-$01
	dw CODE_00951D-$01
	dw CODE_00A193-$01
	dw CODE_00A193-$01
	dw CODE_00A551-$01
	dw CODE_00A56F-$01
	dw CODE_00A59A-$01
	dw CODE_009ADD-$01
	dw CODE_00A6A9-$01
	dw CODE_00A6CE-$01
	dw CODE_00A835-$01
	dw CODE_00A6A9-$01
	dw CODE_00A726-$01
	dw CODE_009B55-$01
	dw CODE_00A759-$01
	dw CODE_00A776-$01
	dw CODE_009519-$01
	dw CODE_00A78D-$01
	dw CODE_00A7A4-$01
	dw CODE_00A7F7-$01
	dw CODE_009531-$01
	dw CODE_009519-$01
	dw CODE_00A80E-$01
	dw CODE_009519-$01
	dw CODE_008D96-$01
	dw CODE_00921A-$01
	dw CODE_009519-$01
	dw CODE_009519-$01
	dw CODE_0098AC-$01
	dw CODE_009913-$01
	dw CODE_009998-$01
	dw CODE_009A19-$01
	dw CODE_009A66-$01

CODE_008AB6:
	PHB
	PHK
	PLB
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	STA.w $0B8F
	LDX.b #$3C
CODE_008AC7:
	LDY.w !EXRAM_YI_Level_AmbSpr_SpriteExistsFlag|!EXRAMBankMirror,x
	BEQ.b CODE_008ACF
	JSR.w CODE_008AD7
CODE_008ACF:
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_008AC7
	PLB
	RTL

CODE_008AD7:
	LDA.w !EXRAM_YI_Level_AmbSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	REP.b #$10
	TAY
	LDA.w DATA_0089CC-(!Define_YI_AmbSpr1BA*$02),y
	SEP.b #$10
	PHA
	RTS

;---------------------------------------------------------------------------

CODE_008AE5:
	LDA.w $0B8F
	BEQ.b CODE_008AF2
	PLA
	RTS

CODE_008AEC:
	LDA.w $0B8F
	BEQ.b CODE_008AF2
	RTS

CODE_008AF2:
	LDA.w $7782,x
	BNE.b CODE_008B0D
	PLA
CODE_008AF8:
	STZ.w !EXRAM_YI_Level_AmbSpr_SpriteExistsFlag|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $7462,x
	LDY.w $76E2,x
	BMI.b CODE_008B0C
	LDA.w $7ECE,y
	TRB.w $7ECC
CODE_008B0C:
	RTS

CODE_008B0D:
	DEC.w $7782,x
	LDA.w $7E8E,x
	BEQ.b CODE_008B18
	DEC.w $7E8E,x
CODE_008B18:
	LDY.w $7781,x
	BEQ.b CODE_008B20
	DEC.w $7781,x
CODE_008B20:
	RTS

;---------------------------------------------------------------------------

CODE_008B21:
	PHA
	LDY.b #$3C
CODE_008B24:
	LDA.w !EXRAM_YI_Level_AmbSpr_SpriteExistsFlag|!EXRAMBankMirror,y
	BEQ.b CODE_008B3D
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_008B24
	LDY.w $7E4A
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_008B3A
	LDY.b #$3C
CODE_008B3A:
	STY.w $7E4A
CODE_008B3D:
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $73C0,y
	STA.w $70A0,y
	STA.w $7140,y
	STA.w $7E4C,y
	STA.w $7E4E,y
	STA.w $7E8C,y
	STA.w $7782,y
	STA.w $7E8E,y
	STA.w $73C2,y
	STA.w $7820,y
	STA.w !EXRAM_YI_Level_AmbSpr_UnusedRAM1|!EXRAMBankMirror,y
	STA.w $76E0,y
	STA.w $7640,y
	STA.w $7642,y
	STA.w $7500,y
	STA.w $75A0,y
	STA.w $7780,y
	DEC
	STA.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,y
	STA.w $76E2,y
	LDA.w #$1FFF
	STA.w $7822,y
	PLA
	STA.w !EXRAM_YI_Level_AmbSpr_SpriteID|!EXRAMBankMirror,y
	PHX
	ASL
	REP.b #$10
	TAX
	SEP.b #$20
	PHY
	LDA.l FXDATA_0AB912-(!Define_YI_AmbSpr1BA*$02),x
	LDY.w #$0006
CODE_008B99:
	CMP.w $6EB5,y
	BEQ.b CODE_008BA4
	DEY
	BNE.b CODE_008B99
	TYA
	BRA.b CODE_008BA9

CODE_008BA4:
	TYA
	ADC.b #$06
	ASL
	ASL
CODE_008BA9:
	REP.b #$20
	AND.w #$00FF
	PLY
	STA.w $7140,y
	LDA.l FXDATA_0AB512-(!Define_YI_AmbSpr1BA*$02)+$01,x
	AND.w #$00FF
	EOR.w #$0030
	STA.w $7002,y
	LDA.l FXDATA_0AB512-(!Define_YI_AmbSpr1BA*$02),x
	AND.w #$00FF
	STA.w $7462,y
	LDA.l FXDATA_0AB712-(!Define_YI_AmbSpr1BA*$02)-$01,x
	AND.w #$FF00
	BPL.b CODE_008BD5
	ORA.w #$00FF
CODE_008BD5:
	XBA
	STA.w $7502,y
	LDA.l FXDATA_0AB712-(!Define_YI_AmbSpr1BA*$02),x
	AND.w #$FF00
	BPL.b CODE_008BE5
	ORA.w #$00FF
CODE_008BE5:
	XBA
	ASL
	ASL
	ASL
	ASL
	STA.w $75A2,y
	LDA.l FXDATA_0AAF12-(!Define_YI_AmbSpr1BA*$02),x
	STA.w $6F60,y
	LDA.l FXDATA_0AB112-(!Define_YI_AmbSpr1BA*$02),x
	STA.w $6F62,y
	LDA.l FXDATA_0AB312-(!Define_YI_AmbSpr1BA*$02),x
	STA.w $7000,y
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_AmbSpr_SpriteExistsFlag|!EXRAMBankMirror,y
	LDA.w #$00FF
	STA.w $7460,y
	SEP.b #$10
	PLX
	RTL

;---------------------------------------------------------------------------

CODE_008C12:
	LDA.w $75A0,x
	SEC
	SBC.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	LDA.w $7500,x
	BCC.b CODE_008C23
	EOR.w #$FFFF
	INC
CODE_008C23:
	CLC
	ADC.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$00FF
	XBA
	CLC
	ADC.w $70A0,x
	STA.w $70A0,x
	LDA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$FF00
	BPL.b CODE_008C40
	ORA.w #$00FF
CODE_008C40:
	XBA
	ADC.w #$0000
	STA.w $7280,x
	CLC
	ADC.w $70A2,x
	STA.w $70A2,x
	LDA.w $75A2,x
	SEC
	SBC.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	ASL
	LDA.w $7502,x
	BCC.b CODE_008C5F
	EOR.w #$FFFF
	INC
CODE_008C5F:
	CLC
	ADC.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	AND.w #$00FF
	XBA
	CLC
	ADC.w $7140,x
	STA.w $7140,x
	LDA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	AND.w #$FF00
	BPL.b CODE_008C7C
	ORA.w #$00FF
CODE_008C7C:
	XBA
	ADC.w #$0000
	STA.w $7282,x
	CLC
	ADC.w $7142,x
	STA.w $7142,x
	RTS

;---------------------------------------------------------------------------

DATA_008C8B:
	dw $0007,$0008,$0009,$000A,$0009,$0008,$0007,$0006
	dw $0005,$0004,$0003,$0002,$0001

DATA_008CA5:
	dw $0003,$0004,$0005,$0004,$0003,$0003,$0003,$0003
	dw $0003,$0003,$0003,$0003,$0003

CODE_008CBF:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_008CDF
	LDA.w $7E4C,x
	DEC
	DEC
	BPL.b CODE_008CCF
	RTS

CODE_008CCF:
	STA.w $7E4C,x
	TAY
	LDA.w DATA_008C8B,y
	STA.w $73C2,x
	LDA.w DATA_008CA5,y
	STA.w $7782,x
CODE_008CDF:
	RTS

;---------------------------------------------------------------------------

DATA_008CE0:
	dw $0000,$0002,$0001,$0001,$0000,$0000,$0001,$0000
	dw $0000,$0000,$0000,$FFFF,$0000,$0000,$FFFF,$FFFF
	dw $FFFE,$0000

CODE_008D04:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	ASL
	TAY
	LDA.w DATA_008CE0-$02,y
	CLC
	ADC.w $7142,x
	STA.w $7142,x
	RTS

;---------------------------------------------------------------------------

DATA_008D17:
	dw $0001,$0000,$0000,$0000,$0000,$0000,$FFFF,$0000
	dw $FFFF,$0000,$0000,$0000,$0000,$0000,$0001,$0000

CODE_008D37:
	JSR.w CODE_008AE5
	LDA.w $7822,x
	AND.w #$00FF
	STA.w $7782,x
	BNE.b CODE_008D48
	JMP.w CODE_008AF8

CODE_008D48:
	LDA.w #$00FF
	ORA.w $7822,x
	STA.w $7822,x
	LDA.w #$0002
	STA.w $7462,x
	INC.w $7E4C,x
	LDA.w $7E4C,x
	BIT.w #$0018
	BEQ.b CODE_008D65
	DEC.w $7142,x
CODE_008D65:
	AND.w #$000F
	ASL
	TAY
	LDA.w $70A2,x
	CLC
	ADC.w DATA_008D17,y
	STA.w $70A2,x
	RTS

;---------------------------------------------------------------------------

CODE_008D75:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_008D89
	INC.w $7782,x
	LDA.w $7002,x
	ORA.w #$0080
	STA.w $7002,x
CODE_008D89:
	RTS

;---------------------------------------------------------------------------

DATA_008D8A:
	db $40,$40,$FF,$00,$00

;---------------------------------------------------------------------------

CODE_008D8F:
	JSR.w CODE_008AE5
	INC.w $73C2,x
	RTS

;---------------------------------------------------------------------------

CODE_008D96:
	JSR.w CODE_008AEC
	LDA.b $14
	LSR
	LSR
	LSR
	AND.w #$0003
	STA.w $73C2,x
	RTS

;---------------------------------------------------------------------------

CODE_008DA5:
	JSR.w CODE_008AEC
	RTS

;---------------------------------------------------------------------------

DATA_008DA9:
	db $02,$01,$00,$FF,$00

DATA_008DAE:
	db $06,$06,$06,$03

CODE_008DB2:
	JSR.w CODE_008AE5
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w $7782,x
	BNE.b CODE_008DD7
	DEC.w $7E4C,x
	BMI.b CODE_008DE4
	DEY
	CPY.b #$03
	BNE.b CODE_008DD1
	LDA.w $7000,x
	AND.b #$FC
	STA.w $7000,x
CODE_008DD1:
	LDA.w DATA_008DAE,y
	STA.w $7782,x
CODE_008DD7:
	LDA.w DATA_008DA9,y
	STA.w $73C2,x
	BMI.b CODE_008DE1
	LDA.b #$06
CODE_008DE1:
	STA.w $7462,x
CODE_008DE4:
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_008DE7:
	JSR.w CODE_008AE5
	SEP.b #$20
	LDA.w $7782,x
	LSR
	LSR
	LSR
	STA.w $73C2,x
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_008DF8:
	DEC.w $7782,x
	LDA.w $7782,x
	BNE.b CODE_008E03
	JMP.w CODE_008AF8

CODE_008E03:
	CMP.w #$003F
	BCS.b CODE_008E0B
	DEC.w $7782,x
CODE_008E0B:
	SEP.b #$20
	LSR
	AND.b #$07
	STA.w $73C2,x
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_008E16:
	JSR.w CODE_008AE5
	LDY.w $73C2,x
	LDA.w $7782,x
	BNE.b CODE_008E2F
	DEC.w $73C2,x
	BPL.b CODE_008E29
	JMP.w CODE_008AF8

CODE_008E29:
	LDA.w #$0002
	STA.w $7782,x
CODE_008E2F:
	RTS

;---------------------------------------------------------------------------

DATA_008E30:
	db $09,$07,$06,$03

DATA_008E34:
	db $02,$01,$00

CODE_008E37:
	JSR.w CODE_008AE5
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w $7782,x
	BNE.b CODE_008E4F
	DEC.w $7E4C,x
	BMI.b CODE_008E55
	LDA.w DATA_008E30-$01,y
	STA.w $7782,x
CODE_008E4F:
	LDA.w DATA_008E34-$01,y
	STA.w $73C2,x
CODE_008E55:
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_008E58:
	db $06,$06,$06,$06,$04,$03

CODE_008E5E:
	JSR.w CODE_008AE5
	SEP.b #$20
	LDY.w $73C2,x
	LDA.w $7782,x
	BNE.b CODE_008E77
	DEY
	BMI.b CODE_008E77
	DEC.w $73C2,x
	LDA.w DATA_008E58,y
	STA.w $7782,x
CODE_008E77:
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_008E7A:
	db $06,$06,$05,$05

CODE_008E7E:
	JSR.w CODE_008AE5
	SEP.b #$20
	LDY.w $73C2,x
	LDA.w $7782,x
	LSR
	BNE.b CODE_008E9A
	DEY
	DEY
	BMI.b CODE_008E9A
	TYA
	STA.w $73C2,x
	LDA.w DATA_008E7A,y
	STA.w $7782,x
CODE_008E9A:
	REP.b #$10
	LDA.w $73C2,x
	LSR
	TXY
	LDX.w $7E4C,y
	LDA.l DATA_00E954,x
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.l DATA_00E954+$01,x
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$FC
	BCC.b CODE_008EB8
	LDA.b #$FE
CODE_008EB8:
	CLC
	ADC.w $7E4E,y
	STA.w $7E4E,y
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_00E9D4,x
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.w $7E4E,y
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	SEP.b #$10
	TYX
	RTS

;---------------------------------------------------------------------------

CODE_008EEF:
	JSR.w CODE_008AE5
	LDA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_008EFD
	LDA.w #$0001
	STA.w $73C2,x
CODE_008EFD:
	RTS

;---------------------------------------------------------------------------

CODE_008EFE:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	LSR
	LSR
	LSR
	STA.w $73C2,x
	RTS

;---------------------------------------------------------------------------

CODE_008F0B:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	CMP.w #$0008
	BNE.b CODE_008F19
	INC.w $73C2,x
CODE_008F19:
	AND.w #$0007
	BNE.b CODE_008F2E
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0001
	BNE.b CODE_008F27
	DEC
CODE_008F27:
	CLC
	ADC.w $70A2,x
	STA.w $70A2,x
CODE_008F2E:
	RTS

;---------------------------------------------------------------------------

DATA_008F2F:
	db $02,$02,$02,$01,$01,$01

DATA_008F35:
	db $03,$03,$03,$02,$02,$02

CODE_008F3B:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_008F5B
	SEP.b #$20
	DEC.w $7E4C,x
	BEQ.b CODE_008F59
	LDY.w $7E4C,x
	LDA.w DATA_008F35-$01,y
	STA.w $7782,x
	LDA.w DATA_008F2F-$01,y
	STA.w $73C2,x
CODE_008F59:
	REP.b #$20
CODE_008F5B:
	RTS

;---------------------------------------------------------------------------

DATA_008F5C:
	db $05,$04,$03,$01,$01,$02,$01

DATA_008F63:
	db $03,$03,$03,$03,$03,$04,$04

CODE_008F6A:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_008F8A
	DEC.w $7E4C,x
	BMI.b CODE_008F8A
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_008F5C,y
	STA.w $73C2,x
	LDA.w DATA_008F63,y
	STA.w $7782,x
	REP.b #$20
CODE_008F8A:
	RTS

;---------------------------------------------------------------------------

DATA_008F8B:
	db $08,$07,$06,$05,$04,$03,$02,$01

DATA_008F93:
	db $40,$02,$02,$02,$02,$02,$02,$02

CODE_008F9B:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_008FBB
	DEC.w $7E4C,x
	BMI.b CODE_008FBB
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_008F8B,y
	STA.w $73C2,x
	LDA.w DATA_008F93,y
	STA.w $7782,x
	REP.b #$20
CODE_008FBB:
	RTS

;---------------------------------------------------------------------------

DATA_008FBC:
	db $0B,$0A,$09,$08,$07,$06,$05,$04
	db $03,$02,$01

DATA_008FC7:
	db $04,$04,$04,$04,$04,$04,$03,$03
	db $02,$02,$01

CODE_008FD2:
	LDY.w $7E4E,x
	BEQ.b CODE_008FE4
	LDA.w $0B8F
	BEQ.b CODE_008FE4
	DEC.w $7782,x
	BPL.b CODE_008FE7
	JMP.w CODE_008AF8

CODE_008FE4:
	JSR.w CODE_008AE5
CODE_008FE7:
	LDA.w $7782,x
	BNE.b CODE_009004
	DEC.w $7E4C,x
	BMI.b CODE_009004
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_008FBC,y
	STA.w $73C2,x
	LDA.w DATA_008FC7,y
	STA.w $7782,x
	REP.b #$20
CODE_009004:
	RTS

;---------------------------------------------------------------------------

DATA_009005:
	db $01

DATA_009006:
	db $11

CODE_009007:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009027
	DEC.w $7E4C,x
	BMI.b CODE_009027
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009005,y
	STA.w $73C2,x
	LDA.w DATA_009006,y
	STA.w $7782,x
	REP.b #$20
CODE_009027:
	RTS

;---------------------------------------------------------------------------

CODE_009028:
	JSR.w CODE_008AE5
	LDY.w $7E4C,x
	LDA.w $70E2,y
	STA.b $00
	LDA.w $7182,y
	CLC
	ADC.w #$0008
	STA.b $02
	LDA.w $7E4E,x
	STA.b $06
	LDA.w $7E8C,x
	STA.b $04
	LDA.w $70A2,x
	STA.b $08
	LDA.w $7142,x
	STA.b $0A
	JSL.l CODE_049B42
	LDA.b $04
	STA.w $7E8C,x
	BPL.b CODE_009061
	EOR.w #$FFFF
	INC
	STA.b $04
CODE_009061:
	LDA.b $06
	STA.w $7E4E,x
	BPL.b CODE_00906C
	EOR.w #$FFFF
	INC
CODE_00906C:
	CLC
	ADC.b $04
	CMP.w #$0030
	BCS.b CODE_00907A
	LDA.w #$0001
	STA.w $73C2,x
CODE_00907A:
	LDA.b $08
	STA.w $70A2,x
	LDA.b $0A
	STA.w $7142,x
	RTS

;---------------------------------------------------------------------------

DATA_009085:
	db $0A,$09,$08,$07,$06,$05,$04,$03
	db $02,$01

DATA_00908F:
	db $05,$05,$05,$04,$04,$04,$03,$03
	db $02,$02

CODE_009099:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_0090B9
	DEC.w $7E4C,x
	BMI.b CODE_0090B9
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009085,y
	STA.w $73C2,x
	LDA.w DATA_00908F,y
	STA.w $7782,x
	REP.b #$20
CODE_0090B9:
	RTS

;---------------------------------------------------------------------------

CODE_0090BA:
	JSR.w CODE_008AEC
	RTS

;---------------------------------------------------------------------------

DATA_0090BE:
	db $06,$04,$04,$03,$03

CODE_0090C3:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_0090DF
	DEC.w $73C2,x
	BPL.b CODE_0090D3
	JMP.w CODE_008AF8

CODE_0090D3:
	LDY.w $73C2,x
	LDA.w DATA_0090BE,y
	AND.w #$00FF
	STA.w $7782,x
CODE_0090DF:
	RTS

;---------------------------------------------------------------------------

DATA_0090E0:
	db $0B,$0A,$09,$08,$07,$06,$05,$04
	db $03,$02,$01

DATA_0090EB:
	db $06,$06,$06,$06,$06,$06,$06
	db $03,$03,$03,$03

CODE_0090F6:
	LDY.w $7E4E,x
	BEQ.b CODE_009100
	JSR.w CODE_008AF2
	BRA.b CODE_009103

CODE_009100:
	JSR.w CODE_008AE5
CODE_009103:
	LDA.w $7782,x
	BNE.b CODE_009120
	DEC.w $7E4C,x
	BMI.b CODE_009120
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_0090E0,y
	STA.w $73C2,x
	LDA.w DATA_0090EB,y
	STA.w $7782,x
	REP.b #$20
CODE_009120:
	RTS

;---------------------------------------------------------------------------

DATA_009121:
	db $06,$05,$04,$03,$02,$01

DATA_009127:
	db $04,$08,$08,$08,$04,$02

CODE_00912D:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00914D
	DEC.w $7E4C,x
	BMI.b CODE_00914D
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009121,y
	STA.w $73C2,x
	LDA.w DATA_009127,y
	STA.w $7782,x
	REP.b #$20
CODE_00914D:
	RTS

;---------------------------------------------------------------------------

DATA_00914E:
	db $03,$02,$01

DATA_009151:
	db $06,$04,$02

CODE_009154:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009174
	DEC.w $7E4C,x
	BMI.b CODE_009174
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_00914E,y
	STA.w $73C2,x
	LDA.w DATA_009151,y
	STA.w $7782,x
	REP.b #$20
CODE_009174:
	RTS

;---------------------------------------------------------------------------

DATA_009175:
	db $03,$02,$01

DATA_009178:
	db $06,$04,$02

CODE_00917B:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00919B
	DEC.w $7E4C,x
	BMI.b CODE_00919B
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009175,y
	STA.w $73C2,x
	LDA.w DATA_009178,y
	STA.w $7782,x
	REP.b #$20
CODE_00919B:
	RTS

;---------------------------------------------------------------------------

DATA_00919C:
	db $02,$01

DATA_00919E:
	db $0C,$08

CODE_0091A0:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_0091C0
	DEC.w $7E4C,x
	BMI.b CODE_0091C0
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_00919C,y
	STA.w $73C2,x
	LDA.w DATA_00919E,y
	STA.w $7782,x
	REP.b #$20
CODE_0091C0:
	RTS

;---------------------------------------------------------------------------

DATA_0091C1:
	db $03,$02,$01

DATA_0091C4:
	db $08,$08,$04

CODE_0091C7:
	JSR.w CODE_008C12
	LDA.w $75A0,x
	CMP.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0091D9
	EOR.w #$FFFF
	INC
	STA.w $75A0,x
CODE_0091D9:
	LDA.w $75A2,x
	CMP.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0091E8
	EOR.w #$FFFF
	INC
	STA.w $75A2,x
CODE_0091E8:
	DEC.w $7782,x
	BNE.b CODE_009213
	DEC.w $7E4C,x
	BPL.b CODE_0091F6
	JSR.w CODE_008AF8
	RTS

CODE_0091F6:
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_0091C1,y
	STA.w $73C2,x
	LDA.w DATA_0091C4,y
	STA.w $7782,x
	REP.b #$20
	CPY.b #$02
	BMI.b CODE_009213
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_009213:
	RTS

;---------------------------------------------------------------------------

DATA_009214:
	db $03,$02,$01

DATA_009217:
	db $08,$08,$08

CODE_00921A:
	JSR.w CODE_008C12
	JSR.w CODE_008AF2
	LDA.w $7782,x
	BNE.b CODE_00923D
	DEC.w $7E4C,x
	BMI.b CODE_00923D
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009214,y
	STA.w $73C2,x
	LDA.w DATA_009217,y
	STA.w $7782,x
	REP.b #$20
CODE_00923D:
	RTS

;---------------------------------------------------------------------------

DATA_00923E:
	db $0B,$0A,$09,$08,$07,$06,$05,$04
	db $03,$02,$01

DATA_009249:
	db $01,$01,$01,$01,$01,$01,$01,$01
	db $01,$01,$02

CODE_009254:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009274
	DEC.w $7E4C,x
	BMI.b CODE_009274
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_00923E,y
	STA.w $73C2,x
	LDA.w DATA_009249,y
	STA.w $7782,x
	REP.b #$20
CODE_009274:
	RTS

;---------------------------------------------------------------------------

DATA_009275:
	db $04,$03,$02,$01

DATA_009279:
	db $06,$06,$06,$06

CODE_00927D:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00929D
	DEC.w $7E4C,x
	BMI.b CODE_00929D
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009275,y
	STA.w $73C2,x
	LDA.w DATA_009279,y
	STA.w $7782,x
	REP.b #$20
CODE_00929D:
	RTS

;---------------------------------------------------------------------------

DATA_00929E:
	db $03,$03,$03,$03,$03,$03,$03

CODE_0092A5:
	LDA.w $0B8F
	BEQ.b CODE_0092AD
	JSR.w CODE_008C12
CODE_0092AD:
	JSR.w CODE_008AF2
	LDA.w $7782,x
	BNE.b CODE_0092CB
	DEC.w $7E4C,x
	BMI.b CODE_0092CB
	SEP.b #$20
	LDY.w $7E4C,x
	TYA
	STA.w $73C2,x
	LDA.w DATA_00929E,y
	STA.w $7782,x
	REP.b #$20
CODE_0092CB:
	RTS

;---------------------------------------------------------------------------

DATA_0092CC:
	db $03,$02,$00,$01

DATA_0092D0:
	dw $0008,$FFFA,$FFFD,$0001,$0009

DATA_0092DA:
	dw $FFF8,$0006,$0003,$FFFF,$FFF7

DATA_0092E4:
	dw $FFFE,$0004,$FFFE,$FFFC,$FFFB

CODE_0092EE:
	LDY.w $7E4E,x
	LDA.w $7400,y
	STA.b $00
	LDA.w $7402,y
	SEC
	SBC.w #$001B
	ASL
	PHY
	TAY
	LDA.b $00
	BEQ.b CODE_009309
	LDA.w DATA_0092DA,y
	BRA.b CODE_00930C

CODE_009309:
	LDA.w DATA_0092D0,y
CODE_00930C:
	STA.b $00
	LDA.w DATA_0092E4,y
	STA.b $02
	PLY
	LDA.w $70E2,y
	CLC
	ADC.b $00
	CLC
	ADC.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C0|!EXRAMBankMirror,x
	CMP.w $70A2,x
	BEQ.b CODE_00932D
	BMI.b CODE_00932A
	INC.w $70A2,x
	BRA.b CODE_00932D

CODE_00932A:
	DEC.w $70A2,x
CODE_00932D:
	LDA.w $7182,y
	CLC
	ADC.b $02
	CLC
	ADC.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C2|!EXRAMBankMirror,x
	CMP.w $7142,x
	BEQ.b CODE_009346
	BMI.b CODE_009343
	INC.w $7142,x
	BRA.b CODE_009346

CODE_009343:
	DEC.w $7142,x
CODE_009346:
	DEC.w $7782,x
	BNE.b CODE_009370
	DEC.w $7E4C,x
	BPL.b CODE_009354
	JSR.w CODE_008AF8
	RTS

CODE_009354:
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_0092CC,y
	STA.w $73C2,x
	LDA.b #$04
	STA.w $7782,x
	REP.b #$20
	CPY.b #$02
	BMI.b CODE_009370
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_009370:
	RTS

;---------------------------------------------------------------------------

DATA_009371:
	db $03,$02,$01,$00,$04

CODE_009376:
	LDY.w $7E4E,x
	BEQ.b CODE_009380
	JSR.w CODE_008AF2
	BRA.b CODE_009383

CODE_009380:
	JSR.w CODE_008AE5
CODE_009383:
	LDA.w $7782,x
	BNE.b CODE_00939F
	DEC.w $7E4C,x
	BMI.b CODE_00939F
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009371,y
	STA.w $73C2,x
	LDA.b #$04
	STA.w $7782,x
	REP.b #$20
CODE_00939F:
	RTS

;---------------------------------------------------------------------------

DATA_0093A0:
	db $04,$03,$02,$01

CODE_0093A4:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_0093C3
	DEC.w $7E4C,x
	BMI.b CODE_0093C3
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_0093A0,y
	STA.w $73C2,x
	LDA.b #$04
	STA.w $7782,x
	REP.b #$20
CODE_0093C3:
	RTS

;---------------------------------------------------------------------------

DATA_0093C4:
	db $09,$08,$07,$06,$05,$04,$03,$02
	db $01,$00,$FF,$00,$FF

DATA_0093D1:
	db $03,$03,$03,$03,$03,$02,$02,$02
	db $01,$03,$01,$01,$01

CODE_0093DE:
	JSR.w CODE_008AF2
	LDA.w $7782,x
	BNE.b CODE_00940F
	DEC.w $7E4C,x
	BMI.b CODE_00940F
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_0093C4,y
	BPL.b CODE_0093FF
	LDA.w $7E4E,x
	BPL.b CODE_0093FF
	STA.w $7462,x
	BRA.b CODE_009407

CODE_0093FF:
	STA.w $73C2,x
	LDA.b #$02
	STA.w $7462,x
CODE_009407:
	LDA.w DATA_0093D1,y
	STA.w $7782,x
	REP.b #$20
CODE_00940F:
	RTS

;---------------------------------------------------------------------------

DATA_009410:
	db $02,$04,$06,$0A,$06,$04

CODE_009416:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009432
	DEC.w $73C2,x
	BPL.b CODE_009426
	JMP.w CODE_008AF8

CODE_009426:
	LDY.w $73C2,x
	LDA.w DATA_009410,y
	AND.w #$00FF
	STA.w $7782,x
CODE_009432:
	RTS

;---------------------------------------------------------------------------

CODE_009433:
	LDA.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,x
	BPL.b CODE_009446
	LDA.w $61CE
	BEQ.b CODE_009443
	LDA.w #$0006
	STA.w $7462,x
CODE_009443:
	JMP.w CODE_009503

CODE_009446:
	LDA.w $61CE
	BEQ.b CODE_009474
	LDA.w $70A2,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7142,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7E8C,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	PHX
	LDX.b #FXCODE_09F5F4>>16
	LDA.w #FXCODE_09F5F4
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
CODE_009474:
	REP.b #$10
	TAY
	LDA.w $7E4E,x
	BNE.b CODE_009485
	LDA.w #$0010
	SEC
	SBC.w $7E4C,x
	BPL.b CODE_009488
CODE_009485:
	LDA.w #$0000
CODE_009488:
	STA.b $00
	LDA.w $6000,y
	SEC
	SBC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	SEC
	SBC.b $00
	STA.w $6002,y
	LDA.w $6008,y
	CLC
	ADC.b $00
	STA.w $6008,y
	LDA.w $600A,y
	SEC
	SBC.b $00
	STA.w $600A,y
	LDA.w $6010,y
	SEC
	SBC.b $00
	STA.w $6010,y
	LDA.w $6012,y
	CLC
	ADC.b $00
	STA.w $6012,y
	LDA.w $6018,y
	CLC
	ADC.b $00
	STA.w $6018,y
	LDA.w $601A,y
	CLC
	ADC.b $00
	STA.w $601A,y
	BRA.b CODE_009501

CODE_0094D4:
	LDA.w #$0020
	SEC
	SBC.w $7E4C,x
	STA.b $00
	LDA.w $6002,y
	CLC
	ADC.b $00
	STA.w $6002,y
	LDA.w $6008,y
	SEC
	SBC.b $00
	STA.w $6008,y
	LDA.w $6010,y
	CLC
	ADC.b $00
	STA.w $6010,y
	LDA.w $601A,y
	SEC
	SBC.b $00
	STA.w $601A,y
CODE_009501:
	SEP.b #$10
CODE_009503:
	JSR.w CODE_008AF2
	LDA.w $7E4C,x
	CLC
	ADC.w #$0004
	CMP.w #$0020
	BCC.b CODE_009515
	LDA.w #$0020
CODE_009515:
	STA.w $7E4C,x
	RTS

;---------------------------------------------------------------------------

CODE_009519:
	JSR.w CODE_008AEC
	RTS

;---------------------------------------------------------------------------

CODE_00951D:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00952D
	INC.w $7782,x
	DEC.w $73C2,x
	BMI.b CODE_00952E
CODE_00952D:
	RTS

CODE_00952E:
	JMP.w CODE_008AF8

;---------------------------------------------------------------------------

CODE_009531:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009544
	LDA.w #$0002
	STA.w $7782,x
	DEC.w $73C2,x
	BMI.b CODE_009545
CODE_009544:
	RTS

CODE_009545:
	JMP.w CODE_008AF8

;---------------------------------------------------------------------------

CODE_009548:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00955B
	LDA.w #$0003
	STA.w $7782,x
	DEC.w $73C2,x
	BMI.b CODE_00955C
CODE_00955B:
	RTS

CODE_00955C:
	JMP.w CODE_008AF8

;---------------------------------------------------------------------------

CODE_00955F:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009572
	LDA.w #$0004
	STA.w $7782,x
	DEC.w $73C2,x
	BMI.b CODE_009573
CODE_009572:
	RTS

CODE_009573:
	JMP.w CODE_008AF8

;---------------------------------------------------------------------------

CODE_009576:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009589
	LDA.w #$0006
	STA.w $7782,x
	DEC.w $73C2,x
	BMI.b CODE_00958A
CODE_009589:
	RTS

CODE_00958A:
	JMP.w CODE_008AF8

;---------------------------------------------------------------------------

CODE_00958D:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_0095A0
	LDA.w #$0008
	STA.w $7782,x
	DEC.w $73C2,x
	BMI.b CODE_0095A1
CODE_0095A0:
	RTS

CODE_0095A1:
	JMP.w CODE_008AF8

;---------------------------------------------------------------------------

DATA_0095A4:
	dw $0020,$0022,$8020,$4002,$0000,$0002,$0020,$0022
	dw $8020,$8002

DATA_0095B8:
	dw $0000,$0000,$8000,$4000,$0000,$0000,$0000,$0000
	dw $8000,$8000

CODE_0095CC:
	LDA.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,x
	BMI.b CODE_0095F3
	LDY.w $7E4E,x
	LDA.w DATA_0095A4,y
	STA.b $00
	LDA.w DATA_0095B8,y
	STA.b $02
	REP.b #$10
	LDY.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,x
	LDA.w $6004,y
	ORA.b $00
	EOR.b $02
	CLC
	ADC.w $7E8C,x
	STA.w $6004,y
	SEP.b #$10
CODE_0095F3:
	JSR.w CODE_008AE5
	LDA.w $7E8E,x
	BNE.b CODE_009613
	LDA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C0|!EXRAMBankMirror,x
	STA.w $7E8E,x
	LDA.w $7E4E,x
	CLC
	ADC.w #$0002
	STA.w $7E4E,x
	CMP.w #$0014
	BMI.b CODE_009613
	STZ.w $7E4E,x
CODE_009613:
	RTS

;---------------------------------------------------------------------------

DATA_009614:
	db $04,$03,$02,$01,$00,$00,$00

CODE_00961B:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00963A
	DEC.w $7E4C,x
	BMI.b CODE_00963A
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_009614,y
	STA.w $73C2,x
	LDA.b #$04
	STA.w $7782,x
	REP.b #$20
CODE_00963A:
	RTS

;---------------------------------------------------------------------------

DATA_00963B:
	db $04,$04,$04,$04,$04,$04,$04,$03,$03,$02,$02

CODE_009646:
	PHX
	TXA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_009693>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_009693
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_098CB1>>16
	LDA.w #FXCODE_098CB1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009687
	DEC.w $73C2,x
	BPL.b CODE_009674
	JMP.w CODE_008AF8

CODE_009674:
	SEP.b #$20
	LDY.w $73C2,x
	LDA.w DATA_009688,y
	STA.w $7001,x
	LDA.w DATA_00963B,y
	STA.w $7782,x
	REP.b #$20
CODE_009687:
	RTS

DATA_009688:
	db $08,$10,$18,$28,$38,$58,$58,$58,$58,$58,$68

DATA_009693:
	dw DATA_009868,DATA_00985E,DATA_00984F,DATA_009836,DATA_009813,DATA_0097DC,DATA_0097A5,DATA_00976E
	dw DATA_009737,DATA_009700,DATA_0096BF,DATA_0096AB

DATA_0096AB:
	db $08,$08,$6A,$C6,$02,$F8,$08,$6A,$86,$02,$08,$F8,$6A,$46,$02,$F8
	db $F8,$6A,$06,$02

DATA_0096BF:
	db $04,$FC,$45,$06,$00,$00,$08,$55,$06,$00,$04,$04,$42,$C2,$02,$FC
	db $04,$42,$82,$02,$04,$FC,$42,$42,$02,$FC,$FC,$42,$02,$02,$0F,$0D
	db $4C,$06,$00,$00,$0F,$4C,$46,$00,$F7,$06,$4C,$06,$00,$12,$03,$4C
	db $46,$00,$09,$F9,$4C,$46,$00,$FE,$FB,$4C,$46,$00,$04,$06,$4C,$06
	db $00

DATA_009700:
	db $04,$FC,$54,$06,$00,$10,$10,$55,$06,$00,$00,$08,$45,$06,$00,$00
	db $08,$55,$06,$00,$10,$12,$4C,$06,$00,$FF,$14,$4C,$46,$00,$F6,$09
	db $4C,$06,$00,$13,$06,$4C,$46,$00,$0A,$FC,$4C,$46,$00,$FD,$FE,$4C
	db $46,$00,$04,$09,$4C,$06,$00

DATA_009737:
	db $04,$FC,$44,$06,$00,$F8,$10,$55,$06,$00,$00,$08,$54,$06,$00,$10
	db $10,$45,$06,$00,$11,$16,$4C,$06,$00,$FE,$18,$4C,$46,$00,$F5,$0D
	db $4C,$06,$00,$14,$0A,$4C,$46,$00,$0B,$00,$4C,$06,$00,$FC,$02,$4C
	db $46,$00,$04,$0D,$4C,$06,$00

DATA_00976E:
	db $00,$18,$55,$06,$00,$00,$08,$44,$06,$00,$10,$10,$54,$06,$00,$F8
	db $10,$45,$06,$00,$12,$1A,$4C,$06,$00,$FD,$1C,$4D,$46,$00,$F5,$11
	db $4C,$06,$00,$15,$0E,$4D,$46,$00,$0C,$04,$4D,$06,$00,$FB,$06,$4D
	db $46,$00,$04,$11,$4C,$06,$00

DATA_0097A5:
	db $08,$08,$55,$06,$00,$10,$10,$44,$06,$00,$F8,$10,$54,$06,$00,$00
	db $18,$45,$06,$00,$12,$1E,$4D,$06,$00,$FD,$20,$4E,$46,$00,$F4,$15
	db $4D,$06,$00,$15,$12,$4E,$46,$00,$0C,$08,$4E,$06,$00,$FB,$0A,$4E
	db $46,$00,$04,$15,$4C,$06,$00

DATA_0097DC:
	db $10,$20,$55,$06,$00,$F8,$10,$44,$06,$00,$00,$18,$54,$06,$00,$08
	db $08,$45,$06,$00,$12,$23,$4E,$46,$00,$FD,$25,$4F,$46,$00,$F4,$1A
	db $4E,$06,$00,$15,$17,$4F,$46,$00,$0C,$0D,$4F,$06,$00,$FB,$0F,$4F
	db $46,$00,$04,$1A,$4D,$06,$00

DATA_009813:
	db $12,$27,$4F,$46,$00,$F4,$1F,$4F,$06,$00,$04,$1F,$4E,$06,$00,$FC
	db $28,$55,$06,$00,$00,$18,$44,$06,$00,$08,$08,$54,$06,$00,$10,$20
	db $45,$06,$00

DATA_009836:
	db $04,$24,$4F,$06,$00,$08,$30,$55,$06,$00,$FC,$28,$45,$06,$00,$10
	db $20,$54,$06,$00,$08,$08,$44,$06,$00

DATA_00984F:
	db $08,$30,$45,$06,$00,$FC,$28,$54,$06,$00,$10,$20,$44,$06,$00

DATA_00985E:
	db $08,$30,$54,$06,$00,$FC,$28,$44,$06,$00

DATA_009868:
	db $08,$30,$44,$06,$00

;---------------------------------------------------------------------------

CODE_00986D:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009883
	DEC.w $7E4E,x
	BMI.b CODE_009883
	INC.w $73C2,x
	LDA.w $7E4C,x
	STA.w $7782,x
CODE_009883:
	RTS

;---------------------------------------------------------------------------

DATA_009884:
	dw $002C,$003C,$0050,$0064,$0068

DATA_00988E:
	dw $000C,$000C,$0014,$0018,$001C

DATA_009898:
	dw $0004,$0004,$0004,$0005,$0006

DATA_0098A2:
	dw $0000,$0001,$0002,$0001,$0003

CODE_0098AC:
	PHX
	LDA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C0|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C2|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7E8C,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $70A2,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7142,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_089287>>16
	LDA.w #FXCODE_089287
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	JSR.w CODE_008AE5
	LDA.w $7E8E,x
	BNE.b CODE_00990F
	INC.w $7E4C,x
	LDA.w $7E4C,x
	ASL
	TAY
	CPY.b #$0A
	BNE.b CODE_0098F4
	LDA.w #$0000
	BRA.b CODE_00990F

CODE_0098F4:
	LDA.w DATA_009884,y
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C0|!EXRAMBankMirror,x
	LDA.w DATA_00988E,y
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C2|!EXRAMBankMirror,x
	LDA.w DATA_009898,y
	STA.w $7E8E,x
	LDA.w DATA_0098A2,y
	STA.w $73C2,x
	LDA.w #$0003
CODE_00990F:
	STA.w $7782,x
	RTS

;---------------------------------------------------------------------------

CODE_009913:
	JSR.w CODE_008AE5
	LDA.w #$0001
	STA.w $7782,x
	DEC.w $7E4C,x
	LDA.w $7E4C,x
	BPL.b CODE_009953
	LDA.w #$0001
	STA.w $7E4C,x
	INC.w $7E4E,x
	LDA.w $7E4E,x
	CMP.w #$000F
	BCC.b CODE_009953
	LDA.w #$000E
	STA.w $7E4E,x
	LDA.w $7462,x
	AND.w #$00FF
	CMP.w #$00FF
	BEQ.b CODE_009953
	PHX
	PHY
	JSR.w CODE_00995F
	PLY
	PLX
	LDA.w #$00FF
	STA.w $7462,x
CODE_009953:
	LDA.w $7E4E,x
	ASL
	TAY
	LDA.w DATA_00997A,y
	STA.w $73C2,x
	RTS

CODE_00995F:
	LDA.w #!Define_YI_AmbSpr22D
	JSL.l CODE_008B21
	LDA.w $70A2,x
	STA.w $70A2,y
	LDA.w $7142,x
	STA.w $7142,y
	PHX
	TYX
	JSL.l CODE_009A96
	PLX
	RTS

DATA_00997A:
	dw $0000,$0001,$0002,$0003,$0004,$0005,$0006,$0007
	dw $0008,$0009,$000A,$000B,$000C,$000E,$000D

;---------------------------------------------------------------------------

CODE_009998:
	JSR.w CODE_008AE5
	LDA.w #$0002
	STA.w $7782,x
	DEC.w $7E4C,x
	LDA.w $7E4C,x
	BPL.b CODE_0099B8
	LDY.w $7E4E,x
	LDA.w DATA_009A10,y
	AND.w #$00FF
	STA.w $7E4C,x
	INC.w $7E4E,x
CODE_0099B8:
	LDA.w $7E4E,x
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_009A08,y
	STA.w $73C2,x
	LDA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_009A07
	CMP.w #$0280
	BCC.b CODE_0099D7
	LDA.w #$0000
	STA.w $7782,x
	RTS

CODE_0099D7:
	LDA.w $7E8C,x
	BNE.b CODE_009A07
	INC.w $7E8C,x
	LDA.w #!Define_YI_AmbSpr22E
	JSL.l CODE_008B21
	LDA.w $70A2,x
	CLC
	ADC.w #$FFD8
	STA.w $70A2,y
	LDA.w $7142,x
	CLC
	ADC.w #$0000
	STA.w $7142,y
	LDA.w #$0003
	STA.w $7782,y
	PHX
	TYX
	JSL.l CODE_009ABF
	PLX
CODE_009A07:
	RTS

DATA_009A08:
	dw $0000,$0001,$0002,$0001

DATA_009A10:
	db $02,$03,$03,$03,$03,$20,$03,$03
	db $03

;---------------------------------------------------------------------------

CODE_009A19:
	JSR.w CODE_008AE5
	LDA.w #$0002
	STA.w $7782,x
	PHX
	DEC.w $7E4C,x
	LDA.w $7E4C,x
	BPL.b CODE_009A49
	LDA.w $7E4E,x
	AND.w #$0001
	CLC
	ADC.w #$0000
	STA.w $7E4C,x
	INC.w $7E4E,x
	LDA.w $7E4E,x
	CMP.w #$000C
	BCC.b CODE_009A49
	LDA.w #$0004
	STA.w $7E4E,x
CODE_009A49:
	LDA.w $7E4E,x
	STA.w $73C2,x
	LDA.w $7E8E,x
	BNE.b CODE_009A61
	PHD
	LDA.w #$0000
	PHA
	PLD
	JSL.l CODE_1191B8
	REP.b #$20
	PLD
CODE_009A61:
	PLX
	STX.w $7E4A
	RTS

;---------------------------------------------------------------------------

CODE_009A66:
	JSR.w CODE_008AE5
	LDA.w #$0002
	STA.w $7782,x
	DEC.w $7E4C,x
	LDA.w $7E4C,x
	BPL.b CODE_009A8F
	LDA.w #$0003
	STA.w $7E4C,x
	INC.w $7E4E,x
	LDA.w $7E4E,x
	CMP.w #$0008
	BCC.b CODE_009A8F
	LDA.w #$0000
	STA.w $7782,x
	RTS

CODE_009A8F:
	LDA.w $7E4E,x
	STA.w $73C2,x
	RTS

;---------------------------------------------------------------------------

CODE_009A96:
	LDA.w #$0002
	STA.w $7782,x
	LDA.w #$0003
	STA.w $7E4C,x
	STZ.w $7E4E,x
	STZ.w $7502,x
	LDA.w #$0000
	STA.w $7462,x
	LDA.w #$0040
	STA.w $7E8E,x
	LDA.w #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	STX.w $7E4A
	RTL

;---------------------------------------------------------------------------

CODE_009ABF:
	LDA.w #$0003
	STA.w $7782,x
	STZ.w $7E4E,x
	STZ.w $7502,x
	LDA.w #$0000
	STA.w $7462,x
	LDA.w #!Define_YI_SoundID3F_HitUvula
	JSL.l CODE_0085D2
	RTL

;---------------------------------------------------------------------------

DATA_009AD9:
	dw $0040,$FFC0

CODE_009ADD:
	JSR.w CODE_008AF2
	LDA.w $7E8E,x
	BNE.b CODE_009AE8
	JMP.w CODE_008AF8

CODE_009AE8:
	CMP.w #$0040
	BPL.b CODE_009AFA
	LDY.b #$FF
	AND.w #$0001
	BEQ.b CODE_009AF6
	LDY.b #$01
CODE_009AF6:
	TYA
	STA.w $7462,x
CODE_009AFA:
	LDA.w $7E8E,x
	AND.w #$003F
	BNE.b CODE_009B12
	LDA.w $73C0,x
	EOR.w #$0002
	STA.w $73C0,x
	TAY
	LDA.w DATA_009AD9,y
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_009B12:
	RTS

;---------------------------------------------------------------------------

CODE_009B13:
	JSR.w CODE_008AE5
	LDY.w $7462,x
	CPY.b #$FF
	BNE.b CODE_009B25
	LDA.w #$0001
	STA.w $7462,x
	BRA.b CODE_009B52

CODE_009B25:
	LDA.w $7E8C,x
	CLC
	ADC.w $7E4E,x
	STA.w $7E8C,x
	BIT.w #$FF00
	BEQ.b CODE_009B40
	AND.w #$00FF
	STA.w $7E8C,x
	LDA.w #$00FF
	STA.w $7462,x
CODE_009B40:
	LDA.w $7E4E,x
	CLC
	ADC.w #$0004
	CMP.w #$0100
	BMI.b CODE_009B4F
	LDA.w #$0100
CODE_009B4F:
	STA.w $7E4E,x
CODE_009B52:
	RTS

;---------------------------------------------------------------------------

DATA_009B53:
	db $0C,$10

CODE_009B55:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009B71
	DEC.w $73C2,x
	BPL.b CODE_009B65
	JMP.w CODE_008AF8

CODE_009B65:
	LDY.w $73C2,x
	LDA.w DATA_009B53,y
	AND.w #$00FF
	STA.w $7782,x
CODE_009B71:
	RTS

;---------------------------------------------------------------------------

DATA_009B72:
	db $03,$03,$03,$03,$03,$03,$03,$03
	db $03,$02,$02,$02,$02,$02,$02,$02
	db $02,$02,$02,$02,$02,$02

CODE_009B88:
	JSR.w CODE_008AE5
	SEP.b #$20
	LDA.w $7782,x
	BEQ.b CODE_009BA1
	LDY.w $73C2,x
	CPY.b #$16
	BNE.b CODE_009BB4
	CMP.b #$02
	BCS.b CODE_009BB4
	LDA.b #$FF
	BRA.b CODE_009BB6

CODE_009BA1:
	DEC.w $73C2,x
	BPL.b CODE_009BAB
	REP.b #$20
	JMP.w CODE_008AF8

CODE_009BAB:
	LDY.w $73C2,x
	LDA.w DATA_009B72,y
	STA.w $7782,x
CODE_009BB4:
	LDA.b #$05
CODE_009BB6:
	STA.w $7462,x
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_009BBC:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009BC7
	JMP.w CODE_008AF8

CODE_009BC7:
	LDA.w $7E8E,x
	BNE.b CODE_009BDD
	LDA.w #$0004
	STA.w $7E8E,x
	DEC.w $73C2,x
	BPL.b CODE_009BDD
	LDA.w #$0005
	STA.w $73C2,x
CODE_009BDD:
	RTS

;---------------------------------------------------------------------------

DATA_009BDE:
	db $08,$06,$04,$02,$02

CODE_009BE3:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009C10
	DEC.w $7E4C,x
	BPL.b CODE_009BF3
	JMP.w CODE_008AF8

CODE_009BF3:
	SEP.b #$20
	DEC.w $73C2,x
	LDY.w $7E4C,x
	LDA.w DATA_009BDE,y
	STA.w $7782,x
	REP.b #$20
	LDA.w #$0001
	CPY.b #$03
	BNE.b CODE_009C0D
	LDA.w #$FFFF
CODE_009C0D:
	STA.w $7462,x
CODE_009C10:
	RTS

;---------------------------------------------------------------------------

DATA_009C11:
	db $03,$03,$03,$03,$03,$03,$03,$02
	db $02,$02,$02,$02

CODE_009C1D:
	PHX
	TXA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_009C6B>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_009C6B
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_098CB1>>16
	LDA.w #FXCODE_098CB1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009C5E
	DEC.w $73C2,x
	BPL.b CODE_009C4B
	JMP.w CODE_008AF8

CODE_009C4B:
	SEP.b #$20
	LDY.w $73C2,x
	LDA.w DATA_009C5F,y
	STA.w $7001,x
	LDA.w DATA_009C11,y
	STA.w $7782,x
	REP.b #$20
CODE_009C5E:
	RTS

DATA_009C5F:
	db $10,$10,$20,$38,$48,$58,$58,$50,$58,$50,$50,$48

DATA_009C6B:
	dw DATA_009E88,DATA_009E7E,DATA_009E6A,DATA_009E47,DATA_009E1A,DATA_009DE3,DATA_009DAC,DATA_009D7A
	dw DATA_009D43,DATA_009D11,DATA_009CDF,DATA_009CB2,DATA_009C85

DATA_009C85:
	db $03,$FE,$55,$06,$00,$09,$0B,$4C,$04,$00,$09,$00,$4C,$04,$00,$FF
	db $01,$4C,$04,$00,$05,$07,$4C,$04,$00,$0E,$07,$4C,$04,$00,$00,$0B
	db $4C,$04,$00,$FE,$06,$4C,$04,$00,$04,$FD,$4D,$04,$00

DATA_009CB2:
	db $03,$FE,$55,$06,$00,$0A,$0D,$4C,$04,$00,$0A,$FD,$4C,$04,$00,$FE
	db $FE,$4C,$04,$00,$05,$08,$4C,$04,$00,$10,$06,$4C,$04,$00,$FF,$0C
	db $4D,$84,$00,$FC,$07,$4C,$04,$00,$04,$FE,$4D,$04,$00

DATA_009CDF:
	db $0C,$02,$55,$06,$00,$03,$FE,$45,$06,$00,$0A,$0F,$4C,$04,$00,$09
	db $FB,$4D,$44,$00,$FD,$FD,$4C,$04,$00,$05,$09,$4C,$04,$00,$12,$06
	db $4D,$04,$00,$FE,$0D,$4E,$84,$00,$FA,$08,$4C,$04,$00,$04,$FF,$4D
	db $04,$00

DATA_009D11:
	db $0C,$02,$55,$06,$00,$03,$FE,$54,$06,$00,$0B,$12,$4D,$44,$00,$0B
	db $FA,$4D,$44,$00,$FD,$FD,$4C,$04,$00,$05,$0B,$4C,$04,$00,$13,$06
	db $4D,$04,$00,$FE,$0F,$4E,$84,$00,$FA,$0A,$4D,$04,$00,$04,$01,$4E
	db $04,$00

DATA_009D43:
	db $FC,$08,$55,$06,$00,$0C,$02,$45,$06,$00,$03,$FE,$44,$06,$00,$0C
	db $15,$4D,$44,$00,$0C,$FA,$4D,$44,$00,$FC,$FE,$4C,$04,$00,$05,$0D
	db $4C,$04,$00,$14,$07,$4D,$04,$00,$FD,$11,$4F,$84,$00,$F9,$0C,$4D
	db $04,$00,$04,$03,$4E,$04,$00

DATA_009D7A:
	db $FC,$08,$55,$06,$00,$0C,$02,$54,$06,$00,$0C,$19,$4E,$44,$00,$0C
	db $FB,$4E,$44,$00,$FC,$FF,$4D,$44,$00,$05,$10,$4D,$44,$00,$15,$08
	db $4D,$04,$00,$FD,$14,$4F,$84,$00,$F9,$0F,$4D,$04,$00,$04,$06,$4E
	db $04,$00

DATA_009DAC:
	db $07,$16,$55,$06,$00,$FC,$08,$55,$06,$00,$0C,$02,$44,$06,$00,$0D
	db $1D,$4E,$44,$00,$0D,$FC,$4E,$44,$00,$FB,$01,$4E,$44,$00,$05,$13
	db $4E,$44,$00,$15,$09,$4E,$04,$00,$FC,$17,$4F,$84,$00,$F8,$12,$4E
	db $04,$00,$04,$09,$4F,$04,$00

DATA_009DE3:
	db $07,$17,$55,$06,$00,$FC,$09,$55,$06,$00,$0C,$03,$44,$06,$00,$0D
	db $1F,$4F,$44,$00,$0D,$FE,$4F,$44,$00,$FB,$03,$4E,$44,$00,$05,$15
	db $4E,$44,$00,$16,$0A,$4E,$04,$00,$FC,$19,$4F,$84,$00,$F8,$14,$4E
	db $04,$00,$04,$0A,$4F,$04,$00

DATA_009E1A:
	db $03,$20,$44,$06,$00,$07,$16,$45,$06,$00,$FC,$08,$54,$06,$00,$0D
	db $22,$4F,$44,$00,$0E,$01,$4F,$44,$00,$FB,$05,$4F,$44,$00,$05,$19
	db $4E,$44,$00,$17,$0D,$4E,$04,$00,$F7,$17,$4F,$04,$00

DATA_009E47:
	db $17,$10,$4F,$04,$00,$03,$20,$54,$06,$00,$07,$16,$54,$06,$00,$FC
	db $08,$44,$06,$00,$0E,$05,$4F,$44,$00,$F7,$1A,$4F,$04,$00,$05,$1C
	db $4F,$44,$00

DATA_009E6A:
	db $18,$12,$4F,$04,$00,$03,$20,$45,$06,$00,$07,$16,$44,$06,$00,$05
	db $1F,$4F,$44,$00

DATA_009E7E:
	db $03,$20,$54,$06,$00,$05,$22,$4F,$44,$00

DATA_009E88:
	db $03,$20,$44,$06,$00,$05,$25,$4F,$44,$00

;---------------------------------------------------------------------------

CODE_009E92:
	PHX
	TXA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_009EE0>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_009EE0
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_098CB1>>16
	LDA.w #FXCODE_098CB1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_009ED2
	DEC.w $73C2,x
	BPL.b CODE_009EC0
	JMP.w CODE_008AF8

CODE_009EC0:
	SEP.b #$20
	LDY.w $73C2,x
	LDA.w DATA_009ED3,y
	STA.w $7001,x
	LDA.b #$02
	STA.w $7782,x
	REP.b #$20
CODE_009ED2:
	RTS

DATA_009ED3:
	db $10,$20,$30,$40,$50,$50,$48,$50,$60,$58,$50,$60,$60

DATA_009EE0:
	dw DATA_00A172,DATA_00A15E,DATA_00A140,DATA_00A118,DATA_00A0E6,DATA_00A0B4,DATA_00A087,DATA_00A055
	dw DATA_00A019,DATA_009FE2,DATA_009FB0,DATA_009F74,DATA_009F38,DATA_009EFC

DATA_009EFC:
	db $07,$08,$42,$C2,$02,$F7,$08,$42,$82,$02,$07,$F8,$42,$42,$02,$F7
	db $F8,$42,$02,$02,$09,$01,$86,$08,$02,$FF,$08,$86,$08,$02,$F5,$FE
	db $86,$08,$02,$01,$F6,$86,$08,$02,$0C,$09,$86,$08,$02,$F5,$0A,$86
	db $08,$02,$0B,$F4,$86,$08,$02,$F6,$F3,$86,$08,$02

DATA_009F38:
	db $05,$05,$42,$C2,$02,$FD,$05,$42,$82,$02,$05,$FD,$42,$42,$02,$FD
	db $FD,$42,$02,$02,$11,$01,$86,$08,$02,$FF,$10,$86,$08,$02,$ED,$FE
	db $86,$08,$02,$01,$F2,$86,$08,$02,$10,$0D,$86,$08,$02,$F1,$0E,$86
	db $08,$02,$0D,$EE,$86,$08,$02,$F4,$ED,$86,$08,$02

DATA_009F74:
	db $08,$08,$6A,$C6,$02,$F8,$08,$6A,$86,$02,$08,$F8,$6A,$46,$02,$F8
	db $F8,$6A,$06,$02,$15,$03,$86,$08,$02,$FF,$14,$86,$08,$02,$E9,$FF
	db $86,$08,$02,$01,$F0,$86,$08,$02,$14,$0F,$86,$08,$02,$EF,$10,$86
	db $08,$02,$0F,$EC,$86,$08,$02,$F2,$EB,$86,$08,$02

DATA_009FB0:
	db $08,$08,$E3,$06,$02,$F8,$00,$E3,$06,$02,$19,$05,$86,$08,$02,$FF
	db $1A,$86,$08,$02,$E5,$01,$86,$08,$02,$01,$EE,$E3,$06,$02,$16,$12
	db $86,$08,$02,$ED,$13,$86,$08,$02,$11,$EA,$86,$08,$02,$F0,$E9,$86
	db $08,$02

DATA_009FE2:
	db $08,$F8,$E3,$06,$02,$08,$08,$E5,$06,$02,$F8,$00,$E5,$06,$02,$1D
	db $07,$86,$08,$02,$FF,$1E,$E3,$06,$02,$E1,$03,$86,$08,$02,$01,$ED
	db $E5,$06,$02,$18,$16,$86,$08,$02,$EB,$17,$86,$08,$02,$13,$E9,$86
	db $08,$02,$EE,$E8,$86,$08,$02

DATA_00A019:
	db $00,$00,$E3,$06,$02,$08,$F8,$E5,$06,$02,$08,$08,$E5,$06,$02,$F8
	db $00,$E7,$06,$02,$21,$09,$86,$08,$02,$FF,$24,$E5,$06,$02,$DD,$05
	db $86,$08,$02,$01,$ED,$E7,$06,$02,$1A,$1A,$86,$08,$02,$E9,$1B,$86
	db $08,$02,$15,$E9,$86,$08,$02,$EC,$E8,$86,$08,$02

DATA_00A055:
	db $00,$10,$E3,$06,$02,$00,$00,$E5,$06,$02,$08,$F8,$E7,$06,$02,$24
	db $0C,$E3,$06,$02,$FF,$2A,$E7,$06,$02,$DA,$08,$86,$08,$02,$1D,$20
	db $86,$08,$02,$E6,$21,$86,$08,$02,$18,$EA,$86,$08,$02,$E9,$E9,$86
	db $08,$02

DATA_00A087:
	db $F0,$08,$E3,$06,$02,$00,$10,$E5,$06,$02,$00,$00,$E7,$06,$02,$26
	db $0F,$E5,$06,$02,$D8,$0B,$86,$08,$02,$1F,$25,$86,$08,$02,$E4,$26
	db $86,$08,$02,$1A,$EC,$86,$08,$02,$E7,$EB,$E3,$06,$02

DATA_00A0B4:
	db $E8,$18,$E3,$06,$02,$08,$20,$E3,$06,$02,$F0,$08,$E5,$06,$02,$00
	db $10,$E7,$06,$02,$28,$14,$E7,$06,$02,$D6,$10,$86,$08,$02,$21,$2C
	db $86,$08,$02,$E2,$2D,$E3,$06,$02,$1C,$EF,$86,$08,$02,$E5,$EE,$E5
	db $06,$02

DATA_00A0E6:
	db $18,$10,$E3,$06,$02,$E8,$18,$E5,$06,$02,$08,$20,$E5,$06,$02,$F0
	db $08,$E7,$06,$02,$00,$10,$E7,$06,$02,$D5,$15,$86,$08,$02,$22,$32
	db $86,$08,$02,$E1,$33,$E5,$06,$02,$1D,$F3,$E5,$06,$02,$E4,$F2,$E7
	db $06,$02

DATA_00A118:
	db $00,$38,$E3,$06,$02,$18,$10,$E5,$06,$02,$E8,$18,$E7,$06,$02,$08
	db $20,$E7,$06,$02,$D3,$1B,$86,$08,$02,$24,$38,$E3,$06,$02,$E0,$39
	db $E7,$06,$02,$1F,$F9,$E5,$06,$02

DATA_00A140:
	db $08,$10,$E3,$06,$02,$00,$38,$E5,$06,$02,$18,$10,$E7,$06,$02,$D3
	db $21,$E3,$06,$02,$24,$3E,$E5,$06,$02,$1F,$FF,$E7,$06,$02

DATA_00A15E:
	db $08,$10,$E5,$06,$02,$00,$38,$E7,$06,$02,$D2,$27,$E5,$06,$02,$25
	db $44,$E7,$06,$02

DATA_00A172:
	db $08,$10,$E7,$06,$02,$D1,$2D,$E7,$06,$02

;---------------------------------------------------------------------------

DATA_00A17C:
	db $04,$04,$04,$04,$04,$04,$04,$04
	db $04,$04,$04,$04,$04,$04,$04,$03
	db $03,$03,$02,$02,$01,$01,$01

CODE_00A193:
	PHX
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_00A1E9>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_00A1E9
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_098CB1>>16
	LDA.w #FXCODE_098CB1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A1D1
	DEC.w $73C2,x
	BPL.b CODE_00A1BE
	JMP.w CODE_008AF8

CODE_00A1BE:
	SEP.b #$20
	LDY.w $73C2,x
	LDA.w DATA_00A1D2,y
	STA.w $7001,x
	LDA.w DATA_00A17C,y
	STA.w $7782,x
	REP.b #$20
CODE_00A1D1:
	RTS

DATA_00A1D2:
	db $08,$10,$18,$20,$28,$30,$40,$38,$40,$40,$40,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$40

DATA_00A1E9:
	dw DATA_00A548,DATA_00A53E,DATA_00A52F,DATA_00A51B,DATA_00A502,DATA_00A4E4,DATA_00A4BC,DATA_00A499
	dw DATA_00A471,DATA_00A449,DATA_00A421,DATA_00A3F9,DATA_00A3D1,DATA_00A3A9,DATA_00A381,DATA_00A359
	dw DATA_00A331,DATA_00A309,DATA_00A2E1,DATA_00A2B9,DATA_00A291,DATA_00A269,DATA_00A241,DATA_00A219

DATA_00A219:
	db $02,$00,$11,$00,$00,$FC,$00,$10,$00,$00,$04,$FC,$01,$00,$00,$FC
	db $FC,$00,$00,$00,$FB,$00,$11,$00,$00,$F8,$00,$10,$00,$00,$FB,$FA
	db $01,$00,$00,$F6,$FC,$00,$00,$00

DATA_00A241:
	db $06,$03,$01,$00,$00,$FC,$05,$10,$40,$00,$08,$F7,$10,$00,$00,$FC
	db $F7,$10,$00,$00,$FB,$00,$11,$40,$00,$F3,$03,$10,$40,$00,$FB,$F1
	db $01,$40,$00,$F2,$F7,$01,$00,$00

DATA_00A269:
	db $09,$03,$10,$40,$00,$FC,$08,$00,$40,$00,$0B,$F5,$10,$40,$00,$FC
	db $F4,$11,$00,$00,$FB,$01,$10,$40,$00,$F0,$03,$10,$00,$00,$FB,$ED
	db $01,$C0,$00,$EF,$F4,$01,$80,$00

DATA_00A291:
	db $0C,$04,$01,$40,$00,$FC,$08,$01,$40,$00,$0D,$F3,$01,$40,$00,$FC
	db $F3,$10,$40,$00,$FB,$02,$00,$40,$00,$ED,$04,$00,$00,$00,$FB,$EB
	db $00,$C0,$00,$ED,$F2,$10,$80,$00

DATA_00A2B9:
	db $0D,$05,$00,$C0,$00,$FC,$0A,$01,$C0,$00,$0E,$F2,$01,$C0,$00,$FC
	db $F3,$00,$40,$00,$FB,$03,$01,$40,$00,$EC,$05,$01,$00,$00,$FB,$E9
	db $11,$80,$00,$EC,$F1,$10,$C0,$00

DATA_00A2E1:
	db $0E,$06,$11,$80,$00,$FB,$0C,$00,$C0,$00,$0F,$F1,$00,$C0,$00,$FC
	db $F3,$00,$C0,$00,$FB,$04,$01,$C0,$00,$EB,$06,$01,$80,$00,$FB,$E8
	db $10,$80,$00,$EB,$F0,$01,$C0,$00

DATA_00A309:
	db $0E,$06,$01,$80,$00,$FC,$0C,$11,$80,$00,$0F,$F1,$11,$80,$00,$FC
	db $F3,$11,$80,$00,$FB,$05,$00,$C0,$00,$EB,$06,$00,$80,$00,$FB,$E8
	db $00,$80,$00,$EB,$F0,$00,$40,$00

DATA_00A331:
	db $0D,$0A,$10,$00,$00,$FD,$0F,$10,$80,$00,$10,$F2,$10,$80,$00,$FE
	db $F6,$00,$80,$00,$FB,$06,$11,$80,$00,$EB,$07,$11,$80,$00,$FC,$EB
	db $01,$00,$00,$ED,$F4,$11,$00,$00

DATA_00A359:
	db $0C,$0E,$10,$40,$00,$FE,$13,$00,$80,$00,$11,$F6,$01,$00,$00,$FE
	db $F8,$00,$00,$00,$FD,$09,$00,$80,$00,$E9,$09,$00,$C0,$00,$FC,$EE
	db $10,$00,$00,$EF,$F3,$00,$00,$00

DATA_00A381:
	db $0B,$0E,$00,$40,$00,$FE,$16,$01,$00,$00,$10,$F9,$00,$00,$00,$FC
	db $FB,$11,$00,$00,$FD,$0C,$00,$00,$00,$E9,$0C,$00,$40,$00,$FA,$F2
	db $11,$00,$00,$EE,$F3,$01,$00,$00

DATA_00A3A9:
	db $0A,$0F,$01,$40,$00,$FD,$19,$10,$00,$00,$0F,$FE,$11,$00,$00,$FB
	db $FB,$00,$40,$00,$FB,$0F,$11,$00,$00,$EB,$10,$11,$00,$00,$FA,$F2
	db $10,$40,$00,$EE,$F4,$01,$00,$00

DATA_00A3D1:
	db $09,$10,$01,$40,$00,$FB,$1A,$00,$40,$00,$0E,$FD,$00,$40,$00,$FA
	db $FC,$01,$40,$00,$F9,$10,$00,$40,$00,$EC,$11,$00,$00,$00,$F9,$F3
	db $00,$40,$00,$ED,$F6,$00,$00,$00

DATA_00A3F9:
	db $0B,$13,$00,$40,$00,$FA,$1D,$01,$40,$00,$0D,$FE,$01,$40,$00,$FB
	db $FE,$01,$C0,$00,$FA,$11,$01,$40,$00,$ED,$11,$01,$00,$00,$F9,$F3
	db $01,$40,$00,$EB,$FC,$10,$00,$00

DATA_00A421:
	db $0C,$16,$10,$40,$00,$F9,$1E,$01,$40,$00,$0D,$FF,$01,$40,$00,$FB
	db $00,$00,$C0,$00,$FA,$12,$01,$C0,$00,$ED,$13,$01,$00,$00,$F9,$F5
	db $01,$40,$00,$E9,$FE,$11,$00,$00

DATA_00A449:
	db $0D,$19,$11,$00,$00,$FA,$20,$00,$40,$00,$0E,$02,$00,$40,$00,$FB
	db $01,$10,$C0,$00,$FA,$15,$01,$C0,$00,$EC,$16,$00,$00,$00,$FA,$F8
	db $00,$40,$00,$E9,$FD,$10,$40,$00

DATA_00A471:
	db $0F,$1A,$10,$00,$00,$FB,$23,$10,$40,$00,$0E,$05,$10,$40,$00,$FC
	db $03,$10,$C0,$00,$FA,$17,$01,$40,$00,$EC,$19,$10,$00,$00,$FB,$FB
	db $10,$40,$00,$E9,$FD,$00,$40,$00

DATA_00A499:
	db $11,$1C,$01,$00,$00,$FD,$26,$00,$00,$00,$11,$08,$01,$00,$00,$FB
	db $09,$00,$C0,$00,$FB,$1C,$10,$00,$00,$E9,$1C,$00,$40,$00,$E9,$00
	db $01,$40,$00

DATA_00A4BC:
	db $10,$1B,$00,$00,$00,$FC,$25,$10,$00,$00,$10,$09,$10,$00,$00,$FC
	db $06,$10,$C0,$00,$FB,$1A,$10,$40,$00,$EA,$1B,$10,$40,$00,$FB,$FD
	db $11,$00,$00,$E9,$FE,$01,$40,$00

DATA_00A4E4:
	db $12,$1D,$01,$00,$00,$FE,$28,$01,$00,$00,$11,$09,$01,$00,$00,$FB
	db $0B,$00,$C0,$00,$FD,$1D,$01,$00,$00,$E9,$04,$00,$40,$00

DATA_00A502:
	db $11,$21,$00,$00,$00,$10,$0C,$00,$00,$00,$FA,$0E,$01,$C0,$00,$FD
	db $1E,$01,$00,$00,$EA,$07,$10,$40,$00

DATA_00A51B:
	db $10,$0E,$10,$00,$00,$FB,$11,$01,$40,$00,$FC,$22,$10,$00,$00,$EA
	db $0A,$10,$00,$00

DATA_00A52F:
	db $0F,$13,$11,$00,$00,$FB,$25,$11,$00,$00,$EB,$0A,$00,$00,$00

DATA_00A53E:
	db $FA,$26,$10,$40,$00,$EB,$0B,$01,$00,$00

DATA_00A548:
	db $F9,$27,$01,$40,$00

;---------------------------------------------------------------------------

DATA_00A54D:
	db $00,$F8,$00,$08

CODE_00A551:
	JSR.w CODE_008AE5
	LDY.b #$00
	LDA.w $7142,x
	CMP.w $7E4C,x
	BPL.b CODE_00A560
	INY
	INY
CODE_00A560:
	LDA.w DATA_00A54D,y
	STA.w $75A2,x
	RTS

;---------------------------------------------------------------------------

DATA_00A567:
	db $07,$07,$05,$04,$04,$04,$04,$04

CODE_00A56F:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A58B
	DEC.w $73C2,x
	BPL.b CODE_00A57F
	JMP.w CODE_008AF8

CODE_00A57F:
	LDY.w $73C2,x
	LDA.w DATA_00A567,y
	AND.w #$00FF
	STA.w $7782,x
CODE_00A58B:
	RTS

;---------------------------------------------------------------------------

DATA_00A58C:
	db $06,$06,$06,$06,$06,$05,$05,$05
	db $05,$05,$05,$04,$04,$04

CODE_00A59A:
	PHX
	TXA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_00A5EB>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_00A5EB
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_098CB1>>16
	LDA.w #FXCODE_098CB1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A5DB
	DEC.w $73C2,x
	BPL.b CODE_00A5C8
	JMP.w CODE_008AF8

CODE_00A5C8:
	SEP.b #$20
	LDY.w $73C2,x
	LDA.w DATA_00A5DC,y
	STA.w $7001,x
	LDA.w DATA_00A58C,y
	STA.w $7782,x
	REP.b #$20
CODE_00A5DB:
	RTS

DATA_00A5DC:
	db $08,$08,$08,$10,$18,$20,$18,$18,$18,$18,$10,$10,$10,$08,$08

DATA_00A5EB:
	dw DATA_00A6A4,DATA_00A69F,DATA_00A69A,DATA_00A690,DATA_00A681,DATA_00A66D,DATA_00A65E,DATA_00A64F
	dw DATA_00A640,DATA_00A631,DATA_00A627,DATA_00A61D,DATA_00A613,DATA_00A60E,DATA_00A609

DATA_00A609:
	db $00,$00,$E3,$06,$02

DATA_00A60E:
	db $00,$01,$E3,$06,$02

DATA_00A613:
	db $00,$00,$F8,$06,$00,$00,$03,$E3,$06,$02

DATA_00A61D:
	db $00,$00,$F8,$46,$00,$00,$06,$E3,$06,$02

DATA_00A627:
	db $00,$00,$F8,$06,$00,$00,$0A,$E5,$06,$02

DATA_00A631:
	db $08,$09,$F8,$06,$00,$00,$01,$F7,$46,$00,$00,$0E,$E5,$46,$02

DATA_00A640:
	db $08,$0A,$F8,$46,$00,$00,$03,$F7,$06,$00,$00,$12,$E5,$06,$02

DATA_00A64F:
	db $08,$0C,$F7,$06,$00,$00,$05,$F7,$46,$00,$00,$16,$E5,$46,$02

DATA_00A65E:
	db $08,$0E,$F7,$46,$00,$00,$07,$F7,$06,$00,$00,$1A,$E7,$06,$02

DATA_00A66D:
	db $00,$0B,$E1,$06,$00,$04,$18,$F8,$06,$00,$08,$10,$E1,$06,$00,$00
	db $1E,$E7,$46,$02

DATA_00A681:
	db $04,$19,$F8,$46,$00,$08,$12,$E1,$06,$00,$00,$22,$E7,$86,$02

DATA_00A690:
	db $04,$1B,$F8,$06,$00,$00,$26,$E7,$C6,$02

DATA_00A69A:
	db $04,$1D,$59,$06,$00

DATA_00A69F:
	db $04,$1F,$F7,$46,$00

DATA_00A6A4:
	db $04,$21,$E1,$06,$00

;---------------------------------------------------------------------------

CODE_00A6A9:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A6B4
	JMP.w CODE_008AF8

CODE_00A6B4:
	LDA.w $7E8E,x
	BNE.b CODE_00A6CD
	SEP.b #$20
	LDA.b #$02
	STA.w $7E8E,x
	DEC.w $73C2,x
	BPL.b CODE_00A6CB
	LDA.w $7E4C,x
	STA.w $73C2,x
CODE_00A6CB:
	REP.b #$20
CODE_00A6CD:
	RTS

;---------------------------------------------------------------------------

CODE_00A6CE:
	JSR.w CODE_008AE5
	LDA.w $7820,x
	AND.w #$0001
	BEQ.b CODE_00A701
	LDA.w $73C2,x
	BNE.b CODE_00A6E4
	LDA.w #$001C
	STA.w $6F62,x
CODE_00A6E4:
	CMP.w #$0003
	BEQ.b CODE_00A6EC
	INC.w $73C2,x
CODE_00A6EC:
	LDA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_00A701
	LSR
	CMP.w #$0020
	BCS.b CODE_00A6FA
	JMP.w CODE_008AF8

CODE_00A6FA:
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_00A701:
	RTS

;---------------------------------------------------------------------------

DATA_00A702:
	db $0A,$09,$08,$07,$06,$05,$04,$03
	db $02,$01,$00,$00

DATA_00A70E:
	db $04,$04,$03,$03,$02,$02,$01,$01
	db $01,$01,$01,$01

DATA_00A71A:
	db $01,$01,$01,$01,$01,$01,$01,$01
	db $01,$01,$FF,$01

CODE_00A726:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A74F
	DEC.w $7E4C,x
	BPL.b CODE_00A736
	JMP.w CODE_008AF8

CODE_00A736:
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_00A702,y
	STA.w $73C2,x
	LDA.w DATA_00A70E,y
	STA.w $7782,x
	LDA.w DATA_00A71A,y
	STA.w $7462,x
	REP.b #$20
CODE_00A74F:
	RTS

;---------------------------------------------------------------------------

DATA_00A750:
	db $03,$03,$03,$03,$03,$03,$03,$02,$02

CODE_00A759:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A775
	DEC.w $73C2,x
	BPL.b CODE_00A769
	JMP.w CODE_008AF8

CODE_00A769:
	LDY.w $73C2,x
	LDA.w DATA_00A750,y
	AND.w #$00FF
	STA.w $7782,x
CODE_00A775:
	RTS

;---------------------------------------------------------------------------

CODE_00A776:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A78C
	DEC.w $73C2,x
	BPL.b CODE_00A786
	JMP.w CODE_008AF8

CODE_00A786:
	LDA.w #$0003
	STA.w $7782,x
CODE_00A78C:
	RTS

;---------------------------------------------------------------------------

CODE_00A78D:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A7A3
	DEC.w $73C2,x
	BPL.b CODE_00A79D
	JMP.w CODE_008AF8

CODE_00A79D:
	LDA.w #$0004
	STA.w $7782,x
CODE_00A7A3:
	RTS

;---------------------------------------------------------------------------

CODE_00A7A4:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A7D0
	SEP.b #$20
	LDA.b #$01
	STA.w $7462,x
	REP.b #$20
	LDA.w #$0004
	STA.w $7782,x
	DEC.w $73C2,x
	BPL.b CODE_00A7D0
	LDA.w #$0001
	STA.w $73C2,x
	LDA.w $7142,x
	CLC
	ADC.w #$0008
	STA.w $7142,x
CODE_00A7D0:
	RTS

;---------------------------------------------------------------------------

DATA_00A7D1:
	db $03,$03,$02,$02,$02,$01,$01,$01,$02

CODE_00A7DA:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A7F6
	DEC.w $73C2,x
	BPL.b CODE_00A7EA
	JMP.w CODE_008AF8

CODE_00A7EA:
	LDY.w $73C2,x
	LDA.w DATA_00A7D1,y
	AND.w #$00FF
	STA.w $7782,x
CODE_00A7F6:
	RTS

;---------------------------------------------------------------------------

CODE_00A7F7:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A80D
	DEC.w $73C2,x
	BPL.b CODE_00A807
	JMP.w CODE_008AF8

CODE_00A807:
	LDA.w #$0002
	STA.w $7782,x
CODE_00A80D:
	RTS

;---------------------------------------------------------------------------

CODE_00A80E:
	JSR.w CODE_008AF2
	RTS

;---------------------------------------------------------------------------

DATA_00A812:
	db $2C,$28,$24,$20,$1C,$18,$FF,$14
	db $FF,$10,$FF,$0C,$FF,$08,$FF,$04
	db $FF,$00

DATA_00A824:
	db $04,$04,$04,$04,$04,$04,$02,$02
	db $02,$02,$02,$02,$02,$02,$02,$02
	db $02

CODE_00A835:
	LDY.w $7E4C,x
	LDA.w DATA_00A812-$01,y
	BMI.b CODE_00A890
	XBA
	ORA.w $7E4E,x
	AND.w #$00FF
	STA.w $73C2,x
	STX.b $00
	TXA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_00A8AE>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_00A8AE
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_098CB1>>16
	LDA.w #FXCODE_098CB1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $00
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $70A2,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7142,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C2|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_09F5F4>>16
	LDA.w #FXCODE_09F5F4
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $00
CODE_00A890:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00A8AD
	DEC.w $7E4C,x
	BPL.b CODE_00A8A0
	JMP.w CODE_008AF8

CODE_00A8A0:
	SEP.b #$20
	LDY.w $7E4C,x
	LDA.w DATA_00A824,y
	STA.w $7782,x
	REP.b #$20
CODE_00A8AD:
	RTS

DATA_00A8AE:
	dw DATA_00A90E,DATA_00AA12,DATA_00AB16,DATA_00AC1A,DATA_00A922,DATA_00AA26,DATA_00AB2A,DATA_00AC2E
	dw DATA_00A936,DATA_00AA3A,DATA_00AB3E,DATA_00AC42,DATA_00A94A,DATA_00AA4E,DATA_00AB52,DATA_00AC56
	dw DATA_00A95E,DATA_00AA62,DATA_00AB66,DATA_00AC6A,DATA_00A972,DATA_00AA76,DATA_00AB7A,DATA_00AC7E
	dw DATA_00A986,DATA_00AA8A,DATA_00AB8E,DATA_00AC92,DATA_00A99A,DATA_00AA9E,DATA_00ABA2,DATA_00ACA6
	dw DATA_00A9AE,DATA_00AAB2,DATA_00ABB6,DATA_00ACBA,DATA_00A9C2,DATA_00AAC6,DATA_00ABCA,DATA_00ACCE
	dw DATA_00A9D6,DATA_00AADA,DATA_00ABDE,DATA_00ACE2,DATA_00A9EA,DATA_00AAEE,DATA_00ABF2,DATA_00ACF6

DATA_00A90E:
	db $FC,$00,$42,$C2,$02,$FC,$F0,$42,$42,$02,$EC,$00,$42,$82,$02,$EC
	db $F0,$42,$02,$02

DATA_00A922:
	db $0C,$FC,$42,$C2,$02,$FC,$FC,$42,$82,$02,$0C,$EC,$42,$42,$02,$FC
	db $EC,$42,$02,$02

DATA_00A936:
	db $14,$08,$42,$C2,$02,$14,$F8,$42,$42,$02,$04,$08,$42,$82,$02,$04
	db $F8,$42,$02,$02

DATA_00A94A:
	db $0C,$14,$42,$C2,$02,$FC,$14,$42,$82,$02,$0C,$04,$42,$42,$02,$FC
	db $04,$42,$02,$02

DATA_00A95E:
	db $FC,$10,$42,$C2,$02,$EC,$10,$42,$82,$02,$FC,$00,$42,$42,$02,$EC
	db $00,$42,$02,$02

DATA_00A972:
	db $08,$08,$42,$C2,$02,$F8,$08,$42,$82,$02,$08,$F8,$42,$42,$02,$F8
	db $F8,$42,$02,$02

DATA_00A986:
	db $08,$04,$E3,$06,$02,$FC,$08,$E3,$06,$02,$04,$FC,$E3,$06,$02,$F8
	db $F8,$E3,$06,$02

DATA_00A99A:
	db $08,$02,$E3,$06,$02,$FC,$06,$E3,$06,$02,$04,$FA,$E3,$06,$02,$F8
	db $F6,$E5,$06,$02

DATA_00A9AE:
	db $08,$00,$E5,$06,$02,$FC,$04,$E3,$06,$02,$04,$F8,$E3,$06,$02,$F8
	db $F4,$E7,$06,$02

DATA_00A9C2:
	db $08,$EE,$E0,$02,$00,$08,$FE,$E7,$06,$02,$FC,$02,$E3,$06,$02,$04
	db $F6,$E5,$06,$02

DATA_00A9D6:
	db $08,$EC,$E0,$02,$00,$08,$E4,$E0,$02,$00,$FC,$00,$E5,$06,$02,$04
	db $F4,$E7,$06,$02

DATA_00A9EA:
	db $08,$F6,$E0,$02,$00,$08,$EE,$E0,$02,$00,$08,$E6,$E0,$02,$00,$FC
	db $FE,$E7,$06,$02

UNK_00A9FE:
	db $00,$10,$E0,$02,$00,$00,$08,$E0,$02,$00,$00,$00,$E0,$02,$00,$00
	db $F8,$E0,$02,$00

DATA_00AA12:
	db $FF,$02,$60,$C3,$02,$FF,$F2,$60,$43,$02,$EF,$02,$60,$83,$02,$EF
	db $F2,$60,$03,$02

DATA_00AA26:
	db $0B,$FF,$60,$C3,$02,$FB,$FF,$60,$83,$02,$0B,$EF,$60,$43,$02,$FB
	db $EF,$60,$03,$02

DATA_00AA3A:
	db $11,$08,$60,$C3,$02,$11,$F8,$60,$43,$02,$01,$08,$60,$83,$02,$01
	db $F8,$60,$03,$02

DATA_00AA4E:
	db $0B,$11,$60,$C3,$02,$FB,$11,$60,$83,$02,$0B,$01,$60,$43,$02,$FB
	db $01,$60,$03,$02

DATA_00AA62:
	db $FF,$0E,$60,$C3,$02,$EF,$0E,$60,$83,$02,$FF,$FE,$60,$43,$02,$EF
	db $FE,$60,$03,$02

DATA_00AA76:
	db $08,$08,$60,$C3,$02,$F8,$08,$60,$83,$02,$08,$F8,$60,$43,$02,$F8
	db $F8,$60,$03,$02

DATA_00AA8A:
	db $06,$03,$63,$07,$02,$FD,$06,$63,$07,$02,$03,$FD,$63,$07,$02,$FA
	db $FA,$63,$07,$02

DATA_00AA9E:
	db $06,$01,$63,$07,$02,$FD,$04,$63,$07,$02,$03,$FB,$63,$07,$02,$FA
	db $F8,$65,$07,$02

DATA_00AAB2:
	db $06,$00,$65,$07,$02,$FD,$03,$63,$07,$02,$03,$FA,$63,$07,$02,$FA
	db $F7,$67,$07,$02

DATA_00AAC6:
	db $08,$F0,$E0,$02,$00,$06,$FE,$67,$07,$02,$FD,$01,$63,$07,$02,$03
	db $F8,$65,$07,$02

DATA_00AADA:
	db $08,$E7,$E0,$02,$00,$08,$EF,$E0,$02,$00,$FD,$00,$65,$07,$02,$03
	db $F7,$67,$07,$02

DATA_00AAEE:
	db $08,$E5,$E0,$02,$00,$08,$ED,$E0,$02,$00,$08,$F5,$E0,$02,$00,$FD
	db $FD,$67,$07,$02

UNK_00AB02:
	db $00,$10,$E0,$02,$00,$00,$08,$E0,$02,$00,$00,$00,$E0,$02,$00,$00
	db $F8,$E0,$02,$00

DATA_00AB16:
	db $02,$04,$72,$C3,$00,$02,$FC,$72,$43,$00,$FA,$04,$72,$83,$00,$FA
	db $FC,$72,$03,$00

DATA_00AB2A:
	db $0A,$02,$72,$C3,$00,$02,$02,$72,$83,$00,$0A,$FA,$72,$43,$00,$02
	db $FA,$72,$03,$00

DATA_00AB3E:
	db $0E,$08,$72,$C3,$00,$0E,$00,$72,$43,$00,$06,$08,$72,$83,$00,$06
	db $00,$72,$03,$00

DATA_00AB52:
	db $0A,$0E,$72,$C3,$00,$02,$0E,$72,$83,$00,$0A,$06,$72,$43,$00,$02
	db $06,$72,$03,$00

DATA_00AB66:
	db $02,$0C,$72,$C3,$00,$FA,$0C,$72,$83,$00,$02,$04,$72,$43,$00,$FA
	db $04,$72,$03,$00

DATA_00AB7A:
	db $08,$08,$72,$C3,$00,$00,$08,$72,$83,$00,$08,$00,$72,$43,$00,$00
	db $00,$72,$03,$00

DATA_00AB8E:
	db $00,$00,$69,$07,$00,$06,$02,$69,$07,$00,$08,$06,$69,$07,$00,$02
	db $08,$69,$07,$00

DATA_00ABA2:
	db $00,$FF,$6A,$07,$00,$06,$01,$69,$07,$00,$08,$05,$69,$07,$00,$02
	db $07,$69,$07,$00

DATA_00ABB6:
	db $00,$FE,$6B,$07,$00,$06,$00,$69,$07,$00,$08,$04,$6A,$07,$00,$02
	db $06,$69,$07,$00

DATA_00ABCA:
	db $08,$F7,$E0,$02,$00,$06,$FF,$6A,$07,$00,$08,$03,$6B,$07,$00,$02
	db $05,$69,$07,$00

DATA_00ABDE:
	db $08,$EE,$E0,$02,$00,$08,$F6,$E0,$02,$00,$06,$FE,$6B,$07,$00,$02
	db $04,$6A,$07,$00

DATA_00ABF2:
	db $08,$E5,$E0,$02,$00,$08,$ED,$E0,$02,$00,$08,$FB,$E0,$02,$00,$02
	db $03,$6B,$07,$00

UNK_00AC06:
	db $00,$10,$E0,$02,$00,$00,$08,$E0,$02,$00,$00,$00,$E0,$02,$00,$00
	db $F8,$E0,$02,$00

DATA_00AC1A:
	db $05,$06,$62,$C3,$00,$05,$FE,$62,$43,$00,$FD,$06,$62,$83,$00,$FD
	db $FE,$62,$03,$00

DATA_00AC2E:
	db $0B,$FD,$62,$43,$00,$0B,$05,$62,$C3,$00,$03,$05,$62,$83,$00,$03
	db $FD,$62,$03,$00

DATA_00AC42:
	db $0B,$00,$62,$43,$00,$0B,$08,$62,$C3,$00,$03,$08,$62,$83,$00,$03
	db $00,$62,$03,$00

DATA_00AC56:
	db $03,$0B,$62,$83,$00,$0B,$03,$62,$43,$00,$0B,$0B,$62,$C3,$00,$03
	db $03,$62,$03,$00

DATA_00AC6A:
	db $04,$0A,$62,$C3,$00,$04,$02,$62,$43,$00,$FC,$0A,$62,$83,$00,$FC
	db $02,$62,$03,$00

DATA_00AC7E:
	db $08,$00,$62,$43,$00,$08,$08,$62,$C3,$00,$00,$08,$62,$83,$00,$00
	db $00,$62,$03,$00

DATA_00AC92:
	db $05,$03,$79,$07,$00,$06,$05,$79,$07,$00,$03,$06,$79,$07,$00,$02
	db $02,$79,$07,$00

DATA_00ACA6:
	db $05,$02,$79,$07,$00,$06,$04,$79,$07,$00,$03,$05,$79,$07,$00,$02
	db $01,$7A,$07,$00

DATA_00ACBA:
	db $05,$02,$79,$07,$00,$06,$04,$7A,$07,$00,$03,$05,$79,$07,$00,$02
	db $01,$7B,$07,$00

DATA_00ACCE:
	db $08,$F9,$E0,$02,$00,$05,$01,$7A,$07,$00,$06,$03,$7B,$07,$00,$03
	db $04,$79,$07,$00

DATA_00ACE2:
	db $08,$F1,$E0,$02,$00,$08,$F9,$E0,$02,$00,$05,$01,$7B,$07,$00,$03
	db $04,$7A,$07,$00

DATA_00ACF6:
	db $08,$EB,$E0,$02,$00,$08,$F3,$E0,$02,$00,$08,$FB,$E0,$02,$00,$03
	db $03,$7B,$07,$00

;---------------------------------------------------------------------------

CODE_00AD0A:
	LDA.w !EXRAM_YI_Level_AmbSpr_OAMIndex|!EXRAMBankMirror,x
	BMI.b CODE_00AD61
	REP.b #$10
	TAY
	LDA.w $7E4C,x
	STA.b $00
	LDA.w $6000,y
	SEC
	SBC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	SEC
	SBC.b $00
	STA.w $6002,y
	LDA.w $6008,y
	CLC
	ADC.b $00
	STA.w $6008,y
	LDA.w $600A,y
	SEC
	SBC.b $00
	STA.w $600A,y
	LDA.w $6010,y
	SEC
	SBC.b $00
	STA.w $6010,y
	LDA.w $6012,y
	CLC
	ADC.b $00
	STA.w $6012,y
	LDA.w $6018,y
	CLC
	ADC.b $00
	STA.w $6018,y
	LDA.w $601A,y
	CLC
	ADC.b $00
	STA.w $601A,y
	SEP.b #$10
CODE_00AD61:
	JSR.w CODE_008AE5
	LDA.w $7782,x
	BNE.b CODE_00AD6C
	JMP.w CODE_008AF8

CODE_00AD6C:
	RTS

;---------------------------------------------------------------------------

DATA_00AD6D:
	db $19,$00,$F8,$00,$10,$12,$00,$92,$00,$04,$76,$00,$95,$00,$06,$72
	db $00,$C0,$00,$20,$4F,$00,$60,$F3,$00,$98,$00,$10,$F4,$00,$A0,$00
	db $10,$F0,$00,$00,$F1,$00,$08,$F2,$00,$70,$F7,$00,$D0,$00,$04,$F8
	db $00,$D2,$00,$04,$F9,$00,$D4,$00,$04,$FA,$00,$D6,$00,$04,$FB,$00
	db $D8,$00,$04,$FC,$00,$DA,$00,$04,$F5,$00,$28,$F6,$00,$2C,$FF,$F0
	db $00,$34,$1D,$00,$38,$73,$00,$DC,$00,$08,$73,$00,$FC,$00,$08,$74
	db $00,$BC,$00,$08,$B1,$00,$00,$FF,$72,$00,$C0,$00,$20,$FF,$10,$00
	db $C0,$00,$10,$11,$00,$C8,$00,$10,$FF,$27,$00,$78,$87,$00,$80,$00
	db $20,$88,$00,$90,$00,$20,$89,$00,$A0,$00,$20,$8B,$00,$B0,$00,$20
	db $8A,$00,$C0,$00,$20,$4A,$00,$50,$73,$00,$74,$74,$00,$60,$75,$00
	db $68,$FF,$F0,$00,$00,$F1,$00,$08,$7E,$00,$14,$F2,$00,$B8,$00,$08
	db $F3,$00,$BC,$00,$08,$56,$00,$10,$F4,$00,$30,$F5,$00,$C0,$00,$08
	db $F6,$00,$C4,$00,$08,$F7,$00,$C8,$00,$08,$F8,$00,$CC,$00,$08,$F9
	db $00,$D0,$00,$08,$FA,$00,$D4,$00,$08,$FB,$00,$D8,$00,$08,$FC,$00
	db $DC,$00,$08,$8F,$00,$E0,$00,$10,$8C,$00,$F0,$00,$10,$73,$00,$FC
	db $00,$08,$FF,$21,$00,$70,$22,$00,$74,$14,$00,$F8,$00,$10,$15,$00
	db $90,$00,$10,$16,$00,$98,$00,$10,$1C,$00,$28,$4E,$00,$2C,$72,$00
	db $C0,$00,$20,$13,$00,$D0,$00,$10,$F0,$00,$68,$F2,$00,$38,$F4,$00
	db $34,$FF,$41,$00,$70,$19,$00,$F8,$00,$10,$25,$00,$00,$26,$00,$08
	db $F0,$00,$98,$00,$10,$F1,$00,$A0,$00,$10,$50,$00,$28,$4E,$00,$2C
	db $72,$00,$C0,$00,$20,$24,$00,$50,$4E,$00,$D8,$00,$04,$F2,$00,$68
	db $F3,$00,$38,$FF,$F0,$00,$00,$F1,$00,$10,$F2,$00,$20,$F3,$00,$30
	db $F4,$00,$00,$72,$00,$C0,$00,$20,$4F,$00,$60,$F5,$00,$D0,$00,$04
	db $F6,$00,$D2,$00,$04,$F7,$00,$D4,$00,$04,$F8,$00,$D6,$00,$04,$F9
	db $00,$D8,$00,$04,$FA,$00,$DA,$00,$04,$FF,$1B,$00,$70,$1E,$00,$74
	db $1E,$00,$78,$72,$00,$C0,$00,$20,$4F,$00,$60,$AF,$00,$28,$AF,$00
	db $30,$AF,$00,$38,$67,$00,$D0,$00,$04,$3C,$00,$D2,$00,$04,$55,$00
	db $D4,$00,$04,$1A,$00,$D6,$00,$04,$1A,$00,$D8,$00,$04,$29,$00,$DA
	db $00,$04,$FF,$B3,$00,$D4,$00,$10,$AA,$00,$5C,$FF

DATA_00AF39:
	db $00,$01,$40,$02,$03,$41,$08,$09,$44,$0A,$0B,$45,$04,$05,$42,$06
	db $07,$43,$0C,$0D,$46,$0E,$0F,$47,$30,$31,$40,$32,$33,$41,$38,$39
	db $46,$3A,$3B,$45,$34,$35,$42,$36,$37,$47,$3C,$3D,$46,$3E,$3F,$47

DATA_00AF69:
	db $00,$01,$40,$69,$6A,$6B,$08,$09,$44,$0A,$0B,$45,$04,$05,$42,$06
	db $07,$43,$0C,$0D,$46,$0E,$0F,$47,$30,$31,$40,$32,$33,$41,$38,$39
	db $46,$3A,$3B,$45,$34,$35,$42,$36,$37,$47,$3C,$3D,$46,$3E,$3F,$47

DATA_00AF99:
	dw $1817,$A308,$0302,$0100,$0100,$7E77,$900C,$0B0A
	dw $0706,$7877,$0E79,$7A04,$7C7B,$A47D,$7E7F,$8281
	dw $7877,$0500,$0500,$8483,$8180,$8685,$A2A1,$0908
	dw $7E0D,$900E,$8685,$8685,$0909,$A6A5,$7B7A,$A8A7

DATA_00AFD9:
	dw $4E4D,$1514,$1516,$1818,$5251,$1516,$1516,$1516
	dw $1516,$1313,$4E12,$1516,$111A,$1110,$2928,$2B2A
	dw $4E4D,$6310,$1715,$4E4E,$5251,$5253,$5C5B,$5454
	dw $541B,$5251,$5251,$1718,$1414,$4E4E,$1919,$4E4D
	dw $1861,$5251,$4E62,$6319,$4E64,$6565,$1766,$5267
	dw $6262,$5857,$1919,$5857,$6268,$6268,$5857,$5859

DATA_00B039:
	dw $2120,$2B2A,$295E,$2120,$1C5E,$2931,$2C1F,$4036
	dw $2951,$5E2E,$1A37,$1F1A,$5E55,$1F5F,$291A,$4053
	dw $1A51,$291A,$2A36,$3C2B,$712D,$364A,$711C,$5931
	dw $1A6A,$1A1A,$1A1A,$7150,$312F,$2949,$5755,$715D
	dw $2F1C,$7155,$573C,$1C4A,$3F3C,$711F,$1A1A,$7125
	dw $1A1C,$1A1A,$1A2E,$1A1A,$1F1A,$5736,$1C38,$295C
	dw $3B3A,$5531,$2971,$6160,$221C,$2523,$251C,$4342
	dw $294F,$5B5A,$255C,$296A,$371F,$4239,$1A43,$3527
	dw $3D4E,$301A,$1C4E,$4651,$2971,$2322,$6045,$301A
	dw $4342,$3938,$591C,$1D60,$4E71,$301C,$1D60,$4640
	dw $304E,$1D55,$4E60,$1A51,$6336,$5C1F,$291A,$1D39
	dw $1B35,$3063,$1A71,$5F51,$3060,$632A,$1A1A,$1A1A
	dw $3E27,$3D1A,$1A1A,$2B25,$6447,$1F36,$6151,$6548
	dw $601C,$1C48,$2865,$7160,$451C,$711F,$296A,$6A4D
	dw $1F48,$291A,$6028,$4E38,$5136,$1A1A,$1A2D,$1A1A
	dw $3545,$6454,$1C1F,$5854,$3D35,$6471,$4135,$641F
	dw $1C5C,$3332,$4134,$544C,$1E64,$1F41,$291C,$1E55
	dw $6028,$5C71,$4C64,$4041,$2968,$5C2F,$1C5D,$1A1A
	dw $6527,$AA49,$1F1C,$4861,$1C71,$6A55,$3C71,$3F60
	dw $AA49,$1A53,$551C,$5931,$4342,$1F55,$1A41,$2B2A
	dw $7129,$5D1C,$1F55,$2A27,$291A,$2B4F,$5247,$5160
	dw $472B,$7138,$5160,$2940,$4E31,$591C,$1A1C,$4E1A
	dw $1A1A,$472B,$5226,$2956,$472B,$5226,$2931,$472B
	dw $291F,$5131,$472B,$1E2F,$2971,$1A29,$531A,$1F1B
	dw $4031,$1A1F,$1A1A,$3541,$7139,$291F,$472B,$4924
	dw $1F1A,$5C1F,$4E49,$475D,$3B3A,$1A1C,$291A,$1A1F
	dw $1A38,$1A1A,$472B,$5437,$2971,$3C3F,$1C66,$6047
	dw $3531,$5471,$1F55,$1F2E,$2449,$295E,$5458,$1F5E
	dw $2948,$6560,$7130,$1A1A,$295E,$2671,$4B49,$2F55
	dw $6458,$592C,$245E,$291C,$4B49,$2527,$4938,$292A
	dw $361F,$1A4E,$1A1A,$1F4D,$2855,$7160,$712E,$1A1C
	dw $1A1A,$3935,$2541,$2964,$2564,$4136,$291A,$444E
	dw $3D1A,$2948,$1E5D,$3D36,$4825,$4342,$6A44,$1A1A
	dw $4564,$1A1A,$291F,$2B2A,$6A38,$5E6C,$3155,$1A1A
	dw $1F1A,$3E35,$3D1C,$472B,$2B2A,$635E,$1A1A,$1A24
	dw $1A1A,$1A1A,$361A,$2931,$5966,$3A40,$373B,$1A36
	dw $702F,$6A61,$1F1A,$6C6B,$6A1A,$1F47,$5C57,$245D
	dw $291C,$711B,$1C29,$5D1F,$5C55,$455F,$3771,$6D6F
	dw $296E,$1A6A,$6A55,$1AA9,$1F1A,$3C62,$534E,$4471
	dw $6A68,$1A1A,$1A1A,$1E1A,$1F52,$2971,$445D,$564C
	dw $1A1A,$291C,$2A44,$4E71,$7145,$581C,$1A1A,$2555
	dw $1F71,$1C29,$375D,$2971,$1A1C,$6A45,$1A1F,$1A1A
	dw $641F,$5341,$1C3E,$7153,$1C5D,$1A1A,$1C36,$2838
	dw $2960,$472B,$2120,$711C,$2120,$1C2F,$475D,$3527
	dw $5441,$6864,$711C,$2D2C,$1A1A,$6C6A,$1A63,$1A1A
	dw $2322,$6045,$301A,$3C67,$1A55,$291A,$7154,$4C41
	dw $3764,$AEAD,$B0AF,$6A67,$4755,$4957,$291C,$2B27
	dw $1C47,$2925,$7127,$311C,$1A1A,$451C,$711F,$2946

CODE_00B339:
	PHB
	PHK
	PLB
	REP.b #$30
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	ASL
	ADC.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	TAY
	LDA.w !RAM_YI_Level_CurrentWorldLo
	CMP.w #!Define_YI_WorldID_World6
	BNE.b CODE_00B35A
	LDA.w DATA_00AF69,y
	STA.b $10
	LDA.w DATA_00AF69+$01,y
	STA.b $11
	BRA.b CODE_00B364

CODE_00B35A:
	LDA.w DATA_00AF39,y
	STA.b $10
	LDA.w DATA_00AF39+$01,y
	STA.b $11
CODE_00B364:
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	ASL
	TAY
	LDA.w DATA_00AF99,y
	STA.b $13
	LDA.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	ASL
	TAY
	LDA.w DATA_00AFD9,y
	STA.b $15
	LDA.w !RAM_YI_Level_LevelHeaderSpriteTilesetLo
	ASL
	ADC.w !RAM_YI_Level_LevelHeaderSpriteTilesetLo
	ASL
	TAY
	LDA.w DATA_00B039,y
	STA.w $6EB6
	STA.b $17
	LDA.w DATA_00B039+$02,y
	STA.w $6EB8
	STA.b $19
	LDA.w DATA_00B039+$04,y
	STA.w $6EBA
	STA.b $1B
	SEP.b #$20
	LDY.w #$0000
CODE_00B39E:
	LDA.b #$16
	STA.w $012D
	LDA.b #!SuperFX_ScreenMode_ScreenHeight_160pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STA.w $012E
CODE_00B3A8:
	LDA.w DATA_00AD6D,y
	CMP.b #$F0
	BCC.b CODE_00B3C0
	CMP.b #$FF
	BEQ.b CODE_00B3CB
	SEC
	SBC.b #$F0
	REP.b #$20
	AND.w #$00FF
	TAX
	SEP.b #$20
	LDA.b $10,x
CODE_00B3C0:
	LDX.w DATA_00AD6D+$01,y
	JSR.w CODE_00B507
	INY
	INY
	INY
	BRA.b CODE_00B3A8

CODE_00B3CB:
	SEP.b #$10
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_00B3CF:
	PHB
	PHK
	PLB
	LDA.b #$68
	STA.b $10
	LDA.w $011A
	CMP.b #$80
	BEQ.b CODE_00B3E6
	LDA.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	BNE.b CODE_00B3E6
	LDA.b #$1F
	STA.b $10
CODE_00B3E6:
	REP.b #$10
	LDY.w #$004F
	JMP.w CODE_00B39E

;---------------------------------------------------------------------------

CODE_00B3EE:
	PHB
	PHK
	PLB
	JMP.w CODE_00B39E

;---------------------------------------------------------------------------

DATA_00B3F4:
	db $7C,$7D,$7F,$80,$81,$82,$83,$84,$85,$86,$87,$88,$74,$B5,$B7,$75
	db $B6,$B8,$4C,$6C,$6D

DATA_00B409:
	db $99,$9A,$9B,$9C,$9D,$9E,$9F,$A0
	db $99,$9A,$9B,$9C,$9D,$9E,$9F,$A0
	db $99,$9A,$9B,$9C,$9D,$9E,$9F,$A0
	db $99,$9A,$9B,$9C,$9D,$9E,$9F,$A0
	db $99,$9A,$9B,$9C,$9D,$9E,$9F,$A0
	db $99,$9A,$9B,$9C,$95,$96,$97,$98

CODE_00B439:
	PHB
	PHK
	PLB
	LDA.b #$74
	STA.b $12
	LDA.b #$75
	STA.b $13
	LDA.b #$4C
	STA.b $14
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_00B3F4,y
	STA.b $10
	LDA.w DATA_00B3F4+$01,y
	STA.b $11
	TYA
	ASL
	ASL
	TAY
	LDX.b #$00
CODE_00B45B:
	LDA.w DATA_00B409,y
	STA.b $15,x
	INY
	INX
	CPX.b #$08
	BCC.b CODE_00B45B
	REP.b #$10
	LDY.w #$00A2
	JMP.w CODE_00B39E

;---------------------------------------------------------------------------

DATA_00B46E:
	db $04,$04,$04,$79,$04,$04,$04,$77,$04,$0C,$0C,$04

DATA_00B47A:
	db $04,$04,$04,$7A,$04,$04,$04,$78,$05,$04,$04,$04

DATA_00B486:
	db $96,$96,$96,$96,$97,$98,$98,$9A,$9B,$99,$99,$96

DATA_00B492:
	db $9C,$9C,$9C,$9F,$9C,$9C,$9C,$A0,$A1,$9C,$9C,$9C

CODE_00B49E:
	PHB
	PHK
	PLB
	LDA.w DATA_00B46E,y
	STA.b $10
	LDA.w DATA_00B47A,y
	STA.b $11
	LDA.w DATA_00B486,y
	STA.b $12
	LDA.w DATA_00B492,y
	STA.b $13
	LDA.b #$4E
	STA.w $6EBA
	LDA.b #$FF
	STA.w $6EB6
	STA.w $6EB7
	STA.w $6EB8
	STA.w $6EB9
	STA.w $6EBB
	REP.b #$10
	LDY.w #$0122
	JMP.w CODE_00B39E

;---------------------------------------------------------------------------

CODE_00B4D3:
	PHB
	PHK
	PLB
	LDX.b #$18
	JSL.l CODE_00BDA2
	LDA.b #$38
	STA.w !REGISTER_BG4AddressAndSize
	LDA.b #$67
	STA.w $6EB6
	LDA.b #$3C
	STA.w $6EB7
	LDA.b #$55
	STA.w $6EB8
	LDA.b #$1A
	STA.w $6EB9
	LDA.b #$1A
	STA.w $6EBA
	LDA.b #$29
	STA.w $6EBB
	REP.b #$10
	LDY.w #$018A
	JMP.w CODE_00B39E

;---------------------------------------------------------------------------

CODE_00B507:
	STX.b $0E
CODE_00B509:
	REP.b #$20
	AND.w #$00FF
	STA.b $0C
	ASL
	ADC.b $0C
	TAX
	LDA.b $0E
	BPL.b CODE_00B54D
	LDA.w DATA_00AD6D+$03,y
	STA.b $0A
	INY
	INY
	PHY
	ASL
	ASL
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_06FC79,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.l DATA_06FC79+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEP.b #$10
	LDX.b #FXCODE_0A8000>>16
	LDA.w #FXCODE_0A8000
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDY.b $0A
	SEP.b #$20
	BRA.b CODE_00B582

CODE_00B54D:
	PHY
	LDA.l DATA_06F95E,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.l DATA_06F95E+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$705800
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEP.b #$10
	LDX.b #FXCODE_08A980>>16
	LDA.w #FXCODE_08A980
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEC
	SBC.w #$705800
	TAY
	SEP.b #$20
	LDA.b $0C
	CMP.b #$B1
	BCS.b CODE_00B5A7
CODE_00B582:
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDX.b $0E
	STX.w !REGISTER_VRAMAddressLo
	LDX.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STX.w DMA[$00].Parameters
	LDX.w #$705800
	STX.w DMA[$00].SourceLo
	LDA.b #$705800>>16
	STA.w DMA[$00].SourceBank
	STY.w DMA[$00].SizeLo
	LDA.b #$01
	STA.w !REGISTER_DMAEnable
	PLY
	RTS

CODE_00B5A7:
	LDX.w #$0000
	CMP.b #$B9
	BEQ.b CODE_00B5C4
	CMP.b #$BA
	BEQ.b CODE_00B5C4
	INX
	INX
	CMP.b #$BB
	BEQ.b CODE_00B5C4
	CMP.b #$BC
	BEQ.b CODE_00B5C4
	INX
	INX
	CMP.b #$BD
	BEQ.b CODE_00B5C4
	INX
	INX
CODE_00B5C4:
	REP.b #$20
	TYA
	STA.b $00
	ASL
	PHA
	SEP.b #$20
	PHB
	LDA.b #$7E7BBE>>16
	PHA
	PLB
	REP.b #$20
	JSR.w (DATA_00B601,x)
	SEP.b #$20
	PLB
	PLY
	LDA.b $00
	BEQ.b CODE_00B5FF
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDX.b $0E
	STX.w !REGISTER_VRAMAddressLo
	LDX.b $02
	STX.w DMA[$00].Parameters
	LDX.w #$7E7BBE
	STX.w DMA[$00].SourceLo
	LDA.b #$7E7BBE>>16
	STA.w DMA[$00].SourceBank
	STY.w DMA[$00].SizeLo
	LDA.b #$01
	STA.w !REGISTER_DMAEnable
CODE_00B5FF:
	PLY
	RTS

DATA_00B601:
	dw CODE_00B609
	dw CODE_00B6B7
	dw CODE_00B70B
	dw CODE_00B609

CODE_00B609:
	LDX.w #$0000
	LDY.w #$0000
CODE_00B60F:
	LDA.l !EXRAM_YI_Global_SuperFXGFXBuffer,x
	PHA
	AND.w #$000F
	STA.w $7E7BBE,y
	INY
	PLA
	AND.w #$00F0
	LSR
	LSR
	LSR
	LSR
	STA.w $7E7BBE,y
	INX
	INY
	DEC.b $00
	BNE.b CODE_00B60F
	LDA.w #$0080
	STA.b $00
	LDA.w #$1900
	STA.b $02
	RTS

DATA_00B637:
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$10,$10,$10,$10,$10,$10
	db $10,$20,$20,$20,$20,$20,$20,$30,$30,$30,$30,$30,$30,$30,$30,$30
	db $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30
	db $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30

DATA_00B677:
	db $30,$30,$30,$30,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40

CODE_00B6B7:
	LDA.w #DATA_00B637>>16
	STA.b $04
	LDX.w #DATA_00B637
	LDA.b $0C
	CMP.w #$00BC
	BNE.b CODE_00B6C9
	LDX.w #DATA_00B677
CODE_00B6C9:
	STX.b $02
	LDX.w #$0000
	TXY
	LDA.w #$0020
	STA.b $06
CODE_00B6D4:
	LDA.l !EXRAM_YI_Global_SuperFXGFXBuffer,x
	AND.w #$00FF
	PHA
	AND.w #$000F
	ORA.b [$02]
	STA.w $7E7BBE,y
	INY
	PLA
	LSR
	LSR
	LSR
	LSR
	ORA.b [$02]
	STA.w $7E7BBE,y
	INY
	INX
	DEC.b $06
	BNE.b CODE_00B6FC
	LDA.w #$0020
	STA.b $06
	INC.b $02
CODE_00B6FC:
	DEC.b $00
	BNE.b CODE_00B6D4
	LDA.w #$0080
	STA.b $00
	LDA.w #$1900
	STA.b $02
	RTS

CODE_00B70B:
	PHB
	PHK
	PLB
	SEP.b #$10
	LDX.b #$00
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDX.b #$705800>>16
	STX.w DMA[$00].SourceBank
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$00
	STA.w DMA[$00].Parameters
	LDA.w #$705800
	STA.b $00
	LDX.b #$40
	LDY.b #$01
CODE_00B729:
	LDA.b $0E
	STA.w !REGISTER_VRAMAddressLo
	LDA.b $00
	STA.w DMA[$00].SourceLo
	LDA.w #$0040
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.b $0E
	CLC
	ADC.w #$0080
	STA.b $0E
	LDA.b $00
	CLC
	ADC.w #$0040
	STA.b $00
	DEX
	BNE.b CODE_00B729
	REP.b #$10
	PLB
	RTS

;---------------------------------------------------------------------------

CODE_00B753:
	LDX.w #$6800
CODE_00B756:
	STA.w $6000
	ASL
	ADC.w $6000
	STX.w $6000
	STX.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	TAX
	LDA.l DATA_06F95E,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.l DATA_06F95E+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	SEP.b #$10
	LDX.b #FXCODE_08A980>>16
	LDA.w #FXCODE_08A980
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEC
	SBC.w $6000
	RTL

;---------------------------------------------------------------------------

DATA_00B78A:
	dw $027C,$3B11,$01C8,$5F81,$8000,$1100,$8006,$1F01
	dw $8002,$2F41,$800A,$341C,$8004,$2F61,$8008,$2FE1
	dw $800C,$1FD1,$FFFF,$2860,$4F31,$28D8,$1F21,$2860
	dw $4FB1,$8000,$1100,$8002,$2F01,$8004,$1FF1,$FFFF
	dw $0130,$1100,$01C8,$1F81,$FFFF,$28F6,$2FE1,$FFFF
	dw $2DDC,$1100,$2DDC,$2F01,$30AC,$1F21,$328C,$1F31
	dw $2E18,$3F41,$346C,$1F81,$2ECC,$7F91,$FFFF,$8000
	dw $1100,$8002,$1F01,$8004,$1F11,$8006,$1F21,$8008
	dw $1F71,$2860,$4F31,$2860,$4F81,$3F4C,$2FC1,$3DC6
	dw $2FE1,$FFFF,$401A,$1100,$8000,$3F01,$8002,$1F71
	dw $01C8,$6F81,$8004,$4F31,$8006,$4F91,$3FFC,$1F51
	dw $3FFC,$1FB1,$8008,$1FD1,$01C8,$2FE1,$0222,$1FE1
	dw $FFFF,$2148,$1F01,$027C,$3B11,$4354,$4F41,$01C8
	dw $6F81,$8000,$1FD1,$FFFF,$586E,$8F01,$01C8,$5F81
	dw $8000,$1FD1,$8002,$2FE1,$FFFF

DATA_00B874:
	dw $067E,$06D2,$0726,$077A,$07CE,$0822,$0876,$08CA
	dw $091E,$0972,$09C6,$0A1A,$0A6E,$0AC2,$0B16,$0B6A
	dw $0BBE,$0C12,$0C66,$0CBA,$0D0E,$0D62,$0DB6,$0E0A
	dw $0E5E,$0EB2,$0F06,$0F5A,$0FAE,$1002,$1056,$10AA

DATA_00B8B4:
	dw $067E,$0BBE,$0726,$077A,$07CE,$0822,$0876,$08CA
	dw $091E,$0972,$09C6,$0A1A,$0A6E,$0AC2,$0B16,$0B6A
	dw $0BBE,$0C12,$0C66,$0CBA,$0D0E,$0D62,$0DB6,$0E0A
	dw $0E5E,$0EB2,$0F06,$0F5A,$0FAE,$1002,$1056,$10AA

DATA_00B8F4:
	dw $12A2,$11EE,$113A,$10FE,$11B2,$1176,$1266,$122A
	dw $12DE,$1356,$1392,$13CE,$140A,$1446,$1482,$14BE
	dw $1356,$10FE,$1176,$14FA,$1536,$1572,$1662,$1662
	dw $15AE,$15EA,$1626,$16DA,$169E,$1716,$1752,$178E
	dw $187E,$18BA,$18F6,$1932,$196E,$19AA,$19E6,$1A22
	dw $1A5E,$1A9A,$1AD6,$1B12,$1B4E,$1B8A,$1BC6,$1C02
	dw $1C3E,$1C7A,$1CB6,$1CF2,$1D2E,$1D6A,$1DA6,$1DE2
	dw $1E1E,$1E5A,$1E96,$1ED2,$1F0E,$1F4A,$1F86,$1FC2

DATA_00B974:
	dw $1FFE,$201C,$203A,$2058,$2076,$2094,$20B2,$20D0
	dw $2166,$210C,$212A,$2148,$20EE,$2184,$21A2,$21C0
	dw $21DE,$21FC,$221A,$2238,$2256,$2274,$2292,$22B0
	dw $22CE,$22EC,$230A,$2328,$2346,$2364,$2382,$23A0
	dw $23BE,$23DC,$23FA,$2418,$2436,$2454,$2472,$2490
	dw $24AE,$24CC,$24EA,$2508,$2526,$2544,$2562,$2580
	dw $259E,$25BC,$25DA,$25F8,$2616,$2634,$2652,$2670
	dw $268E,$26AC,$26CA,$26E8,$2706,$2724,$2742,$2760

DATA_00B9F4:
	dw $02BE,$02FA,$0336,$0372,$03AE,$03EA,$0426,$0462
	dw $049E,$04DA,$0516,$0552,$058E,$05CA,$0606,$0642

DATA_00BA14:
	dw $0040,$005E,$007C,$009A,$00B8,$00D6,$00F4,$0112

CODE_00BA24:
	PHB
	PHK
	PLB
	REP.b #$30
	LDA.w !RAM_YI_Level_LevelHeaderBackgroundColorLo
	ASL
	ADC.w #$0130
	STA.b $10
	LDA.w !RAM_YI_Level_LevelHeaderBG1PaletteLo
	ASL
	TAY
	LDA.w !RAM_YI_Level_CurrentWorldLo
	CMP.w #!Define_YI_WorldID_World6
	BNE.b CODE_00BA44
	LDA.w DATA_00B8B4,y
	BRA.b CODE_00BA47

CODE_00BA44:
	LDA.w DATA_00B874,y
CODE_00BA47:
	STA.b $12
	CLC
	ADC.w #$003C
	STA.b $1A
	LDA.w !RAM_YI_Level_LevelHeaderBG2PaletteLo
	ASL
	TAY
	LDA.w DATA_00B8F4,y
	STA.b $14
	LDA.w !RAM_YI_Level_LevelHeaderBG3PaletteLo
	ASL
	TAY
	LDA.w DATA_00B974,y
	STA.b $16
	LDA.w !RAM_YI_Level_LevelHeaderSpritePaletteLo
	ASL
	TAY
	LDA.w DATA_00B9F4,y
	STA.b $18
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	TAY
	LDA.w DATA_00BA14,y
	STA.b $1C
	LDX.w #$0000
CODE_00BA7A:
	LDA.w #DATA_5FA000						; Glitch: This pointer unintentionally affects what Yoshi initially runs on the map screen.
	STA.b $00
	LDA.w #DATA_5FA000>>8
	STA.b $01
CODE_00BA84:
	LDA.w DATA_00B78A,x
	BPL.b CODE_00BA95
	CMP.w #$FFFF
	BEQ.b CODE_00BADE
	AND.w #$7FFF
	TAY
	LDA.w $0010,y
CODE_00BA95:
	TAY
	LDA.w DATA_00B78A+$03,x
	AND.w #$000F
	STA.b $03
	LDA.w DATA_00B78A+$03,x
	AND.w #$00F0
	LSR
	LSR
	LSR
	LSR
	STA.b $05
	LDA.w DATA_00B78A+$02,x
	AND.w #$00FF
	ASL
	STA.b $07
	PHX
CODE_00BAB4:
	TAX
	LDA.b $03
	STA.b $09
CODE_00BAB9:
	LDA.b [$00],y
	STA.l YI_Global_PaletteMirror[$00].LowByte,x
	STA.l $702D6C,x
	INY
	INY
	INX
	INX
	DEC.b $09
	BNE.b CODE_00BAB9
	LDA.b $07
	CLC
	ADC.w #$0020
	STA.b $07
	DEC.b $05
	BNE.b CODE_00BAB4
	PLX
	INX
	INX
	INX
	INX
	BRA.b CODE_00BA84

CODE_00BADE:
	SEP.b #$30
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_00BAE2:
	dw $293C,$297A

DATA_00BAE6:
	dw $2CAE,$2CCC

CODE_00BAEA:
	PHB
	PHK
	PLB
	REP.b #$20
	LDA.w DATA_00BAE2,x
	STA.b $10
	INC
	INC
	STA.b $12
	LDA.w DATA_00BAE6,x
	STA.b $14
	REP.b #$10
	LDX.w #$0026
	JMP.w CODE_00BA7A

;---------------------------------------------------------------------------

CODE_00BB05:
	PHB
	PHK
	PLB
	JMP.w CODE_00BA7A

;---------------------------------------------------------------------------

DATA_00BB0B:
	dw $3ADE,$3B5A,$3BD6,$3C52,$3CCE,$3D4A

DATA_00BB17:
	dw $3AE2,$3B00,$3B1E,$3B3C,$3B5E,$3B7C,$3B9A,$3BB8
	dw $3BDA,$3BF8,$3C16,$3C34,$3C56,$3C74,$3C92,$3CB0
	dw $3CD2,$3CF0,$3D0E,$3D2C,$3D4E,$3D6C,$3D8A,$3DA8

CODE_00BB47:
	PHB
	PHK
	PLB
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_00BB0B,x
	STA.b $10
	TXA
	ASL
	ASL
	TAX
	LDA.w DATA_00BB17,x
	STA.b $12
	LDA.w DATA_00BB17+$02,x
	STA.b $14
	LDA.w DATA_00BB17+$04,x
	STA.b $16
	LDA.w DATA_00BB17+$06,x
	STA.b $18
	LDX.w #$006E
	JMP.w CODE_00BA7A

;---------------------------------------------------------------------------

CODE_00BB70:
	PHB
	PHK
	PLB
	LDA.w #$7F94
	STA.w $0948
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	TAX
	LDA.w DATA_00BA14,x
	STA.b $10
	LDX.w #$00C2
	JMP.w CODE_00BA7A

;---------------------------------------------------------------------------

CODE_00BB90:
	PHB
	PHK
	PLB
	REP.b #$30
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	TAY
	LDA.w DATA_00BA14,y
	STA.b $10
	LDA.w !RAM_YI_Level_LevelHeaderSpritePaletteLo
	ASL
	TAY
	LDA.w DATA_00B9F4,y
	STA.b $12
	LDX.w #$00D8
	JMP.w CODE_00BA7A

;---------------------------------------------------------------------------

DATA_00BBAF:
	dw $0000,$0014,$0028,$003C,$0050,$0064,$0078,$008C
	dw $00A0,$00B4,$00C8,$00DC,$00F0,$0104,$0118,$012C
	dw $0140,$0154,$0168,$01A4,$017C,$0190

DATA_00BBDB:
	db !REGISTER_BGModeAndTileSizeSetting
	db !REGISTER_BG1AddressAndSize
	db !REGISTER_BG2AddressAndSize
	db !REGISTER_BG3AddressAndSize
	db !REGISTER_BG1And2TileDataDesignation
	db !REGISTER_BG3And4TileDataDesignation
	db !REGISTER_BG1And2WindowMaskSettings
	db !REGISTER_BG3And4WindowMaskSettings
	db !REGISTER_ObjectAndColorWindowSettings
	db !REGISTER_MainScreenLayers
	db !REGISTER_SubScreenLayers
	db !REGISTER_MainScreenWindowMask
	db !REGISTER_SubScreenWindowMask
	db !REGISTER_ColorMathInitialSettings
	db !REGISTER_ColorMathSelectAndEnable

DATA_00BBEA:
	db $06,$00,$0A,$1D,$00
	db $10,$3C,$3C,$3C,$22
	db $22,$32,$00,$00,$13
	db $00,$00,$00,$00,$3F
	db $00,$00,$16,$3D,$00
	db $01,$70,$74,$78,$00
	db $06,$00,$00,$00,$13
	db $00,$00,$00,$00,$00
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$17
	db $00,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$14
	db $03,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$13
	db $04,$00,$00,$22,$B3
	db $04,$00,$16,$3D,$01
	db $22,$69,$3A,$34,$77
	db $02,$00,$00,$00,$11
	db $02,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$13
	db $14,$00,$00,$22,$72
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$15
	db $02,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$15
	db $02,$00,$00,$22,$24
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$11
	db $06,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$13
	db $00,$00,$00,$22,$20
	db $0A,$00,$16,$3D,$01
	db $07,$00,$00,$00,$00
	db $00,$00,$00,$00,$11
	db $04,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $00,$69,$28,$30,$77
	db $77,$00,$00,$00,$1F
	db $00,$00,$00,$02,$20
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$11
	db $06,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$15
	db $00,$00,$00,$22,$20
	db $02,$00,$16,$3D,$01
	db $59,$3A,$69,$34,$77
	db $02,$00,$00,$00,$05
	db $12,$00,$00,$22,$45
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$13
	db $04,$00,$00,$22,$B3
	db $02,$00,$16,$3D,$01
	db $69,$69,$3A,$34,$77
	db $02,$00,$00,$00,$04
	db $13,$00,$00,$22,$24
	db $08,$02,$16,$3D,$01
	db $09,$61,$69,$74,$00
	db $77,$00,$30,$00,$15
	db $02,$0A,$02,$02,$20
	db $0C,$00,$16,$1D,$00
	db $01,$1C,$1C,$15,$22
	db $01,$32,$00,$80,$17
	db $00,$00,$00,$10,$00
	db $0E,$06,$16,$3D,$01
	db $41,$6A,$3A,$34,$77
	db $02,$00,$00,$A0,$17
	db $00,$10,$00,$20,$94
	db $08,$04,$07,$1B,$00
	db $03,$50,$5C,$00,$50
	db $00,$00,$00,$00,$13
	db $00,$00,$00,$00,$00

CODE_00BDA2:
	PHB
	PHK
	PLB
	REP.b #$10
	LDY.w DATA_00BBAF,x
	LDA.w DATA_00BBEA,y
	STA.w $011C
	LDA.w DATA_00BBEA+$01,y
	STA.w $0126
	LDA.w DATA_00BBEA+$02,y
	STA.w $012D
	LDA.w DATA_00BBEA+$03,y
	STA.w $012E
	LDA.w DATA_00BBEA+$04,y
	BEQ.b CODE_00BDE5
	REP.b #$20
	LDA.l YI_Global_PaletteMirror[$00].LowByte
	STA.w $0948
	STA.l YI_Global_PaletteMirror[$10].LowByte
	STA.l $702D8C
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
	STA.l $702D6C
	SEP.b #$20
CODE_00BDE5:
	LDX.w #$0000
CODE_00BDE8:
	LDA.w DATA_00BBEA+$05,y
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting,x
	INY
	INX
	CPX.w #$000F
	BCC.b CODE_00BDE8
	STZ.w !RAM_YI_Global_HDMAEnable
	STZ.w !REGISTER_BG4AddressAndSize
	LDY.w #!REGISTER_ScreenDisplayRegister
	STY.b $00
	SEP.b #$10
	LDX.b #$0E
CODE_00BE04:
	LDY.w DATA_00BBDB,x
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting,x
	STA.b ($00),y
	DEX
	BPL.b CODE_00BE04
	REP.b #$20
	STZ.w !RAM_YI_Global_BGWindowLogicSettings
	STZ.w !REGISTER_BGWindowLogicSettings
	SEP.b #$20
	LDA.b #$02
	STA.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	STA.w !REGISTER_OAMSizeAndDataAreaDesignation
	STZ.w !REGISTER_InitialScreenSettings
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_00BE26:
	REP.b #$30
	PHB
	LDY.w #$702200
	LDX.w #DATA_00E552
	LDA.w #$03FF
	MVN $702200>>16,DATA_00E552>>16
	PLB
	SEP.b #$30
	RTL

;---------------------------------------------------------------------------

CODE_00BE39:
	PHP
	REP.b #$30
	LDX.w $096D
	LDA.b $02,S
	TAY
	LDA.w $0007,y
	STA.w $096F,x
	LDA.w $0001,y
	STA.w $0971,x
	LDA.w $0003,y
	STA.w $0973,x
	LDA.w $0005,y
	STA.w $0975,x
	LDA.w #$0000
	STA.w $0977,x
	TXA
	CLC
	ADC.w #$0008
	STA.w $096D
	TYA
	CLC
	ADC.w #$0008
	STA.b $02,S
	PLP
	RTL

;---------------------------------------------------------------------------

CODE_00BE71:
	PHP
	REP.b #$10
	LDX.w $096D
	STA.w $096F,x
	LDA.b $02,S
	TAY
	LDA.w $0001,y
	STA.w $0971,x
	LDA.w $0003,y
	STA.w $0973,x
	LDA.w $0005,y
	STA.w $0975,x
	LDA.w #$0000
	STA.w $0977,x
	TXA
	CLC
	ADC.w #$0008
	STA.w $096D
	TYA
	CLC
	ADC.w #$0006
	STA.b $02,S
	PLP
	RTL

;---------------------------------------------------------------------------

; Note: Routine that sets up some sort of DMA buffer.

CODE_00BEA6:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	PHX
	LDX.w $7E4800
	STA.w $0008,x
	TYA
	STA.w $0000,x
	LDA.w #$0180
	STA.w $0002,x
	LDA.w #!REGISTER_WriteToVRAMPortLo&$00FF
	STA.w $0004,x
	LDA.w $0000
	STA.w $0006,x
	PLA
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_00BEDA:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	PHX
	LDX.w $7E4800
	STA.w $0008,x
	TYA
	STA.w $0000,x
	LDA.w #$0980
	STA.w $0002,x
	LDA.w #$0018
	STA.w $0004,x
	LDA.w #$7E4800>>8
	STA.w $0006,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000D
	STA.w $000A,x
	STA.w $7E4800
	PLA
	STA.w $000C,x
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_00BF16:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	PHX
	LDX.w $7E4800
	STA.w $0008,x
	TYA
	STA.w $0000,x
	LDA.w #$0000
	STA.w $0002,x
	LDA.w #$0018
	STA.w $0004,x
	LDA.w $0000
	STA.w $0006,x
	PLA
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_00BF4A:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	PHX
	LDX.w $7E4800
	STA.w $0008,x
	TYA
	STA.w $0000,x
	LDA.w #$0800
	STA.w $0002,x
	LDA.w #$0018
	STA.w $0004,x
	LDA.w #$7E4800>>8
	STA.w $0006,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000D
	STA.w $000A,x
	STA.w $7E4800
	PLA
	STA.w $000C,x
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_00BF86:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	PHX
	LDX.w $7E4800
	STA.w $0008,x
	TYA
	STA.w $0000,x
	LDA.w #$0080
	STA.w $0002,x
	LDA.w #$0019
	STA.w $0004,x
	LDA.w $0000
	STA.w $0006,x
	PLA
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_00BFBA:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	PHX
	LDX.w $7E4800
	STA.w $0008,x
	TYA
	STA.w $0000,x
	LDA.w #$0880
	STA.w $0002,x
	LDA.w #$0019
	STA.w $0004,x
	LDA.w #$7E4800>>8
	STA.w $0006,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000D
	STA.w $000A,x
	STA.w $7E4800
	PLA
	STA.w $000C,x
	PLB
	RTL

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($00BC06, incbin, DATA_00BC06_YI_U2.bin)
else
	%FREE_BYTES($00BFF6, 10, $FF)
endif

;---------------------------------------------------------------------------

YI_MainRAMCodeBlock:

YI_VBlankRt:
;$00C000
	SEI
	REP.b #$38
	PHA
	PHX
	PHY
	PHD
	PHB
	LDA.w #$0000
	TCD
	SEP.b #$30
if !CurrentBank != $00
	LDA.b #YI_VBlankRt>>16
endif
	PHA
	PLB
	LDY.w !REGISTER_NMIEnable
	LDX.w $011C
	JSR.w (DATA_00C074,x)
	LDA.b !RAM_YI_Global_PlayMusicLo
	BNE.b CODE_00C024
	LDX.w !REGISTER_APUPort0
	CPX.b !RAM_YI_Global_PreviousMusicLo
	BNE.b CODE_00C02B
CODE_00C024:
	STA.w !REGISTER_APUPort0
	STA.b !RAM_YI_Global_PreviousMusicLo
	STZ.b !RAM_YI_Global_PlayMusicLo
CODE_00C02B:
	LDA.b $51
	STA.w !REGISTER_APUPort1
	STZ.b $51
	LDA.w !REGISTER_APUPort3
	CMP.b !RAM_YI_Global_PreviousHighPrioritySoundLo
	BNE.b CODE_00C06C
	LDY.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BEQ.b CODE_00C045
	CMP.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BEQ.b CODE_00C04D
	STZ.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_00C067

CODE_00C045:
	LDX.b !RAM_YI_Global_SoundQueueSizeLo
	BEQ.b CODE_00C067
	CMP.b !RAM_YI_Global_SoundQueue
	BNE.b CODE_00C051
CODE_00C04D:
	LDY.b #$00
	BRA.b CODE_00C067

CODE_00C051:
	DEX
	CPX.b #$07
	BCC.b CODE_00C058
	LDX.b #$06
CODE_00C058:
	STX.b !RAM_YI_Global_SoundQueueSizeLo
	LDY.b !RAM_YI_Global_SoundQueue
	LDX.b #$00
CODE_00C05E:
	LDA.b !RAM_YI_Global_SoundQueue+$01,x
	STA.b !RAM_YI_Global_SoundQueue,x
	INX
	CPX.b !RAM_YI_Global_SoundQueueSizeLo
	BCC.b CODE_00C05E
CODE_00C067:
	STY.w !REGISTER_APUPort3
	STY.b !RAM_YI_Global_PreviousHighPrioritySoundLo
CODE_00C06C:
	REP.b #$30
	PLB
	PLD
	PLY
	PLX
	PLA
	RTI

DATA_00C074:
	dw CODE_00C084
	dw CODE_00C10A
	dw CODE_00C10A
	dw CODE_00C22C
	dw CODE_00C10A
	dw CODE_00C10A
	dw CODE_00C10B
	dw CODE_00C10A

CODE_00C084:
	LDY.b #$8F
	STY.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_HDMAEnable
	LDA.w $011B
	BNE.b CODE_00C094
	JMP.w CODE_00C0FD

CODE_00C094:
	STZ.w $011B
	JSR.w CODE_00E3DF
	JSR.w CODE_00E3AA
	REP.b #$20
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	JSR.w CODE_00D4AC
	JSR.w CODE_00D4E5
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	JSR.w CODE_00DC6B
	LDA.w #$0000
	TCD
	SEP.b #$20
	JSR.w CODE_00E507
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1XPosHi
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosHi
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosHi
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosHi
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosHi
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosLo
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosHi
	STA.w !REGISTER_BG3VertScrollOffset
CODE_00C0FD:
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.w !RAM_YI_Global_HDMAEnable
	STA.w !REGISTER_HDMAEnable
	RTS

CODE_00C10A:
	RTS

CODE_00C10B:
	LDY.b #$8F
	STY.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_HDMAEnable
	LDA.w !RAM_YI_Global_ColorMathInitialSettings
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.w $0994
	ORA.b #$80
	STA.w !REGISTER_FixedColorData
	LDA.w $0992
	ORA.b #$40
	STA.w !REGISTER_FixedColorData
	LDA.w $0990
	ORA.b #$20
	STA.w !REGISTER_FixedColorData
	LDA.w $011B
	BNE.b CODE_00C139
	JMP.w CODE_00C1DF

CODE_00C139:
	STZ.w $011B
	JSR.w CODE_00E3DF
	JSR.w CODE_00E3AA
	REP.b #$20
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	JSR.w CODE_00D4AC
	JSR.w CODE_00D510
	LDA.w #$0000
	TCD
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.l $7E5B59
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.l $7E5B5B
	LDA.b $69
	STA.l $7E5B5E
	LDA.b $6B
	STA.l $7E5B60
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.l $7E5B99
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.l $7E5B9B
	LDA.b $6D
	STA.l $7E5B9E
	LDA.b $6F
	STA.l $7E5BA0
	LDA.w $1144
	STA.l $7E5740
	SEP.b #$20
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	STA.l $7E5C9B
	JSR.w CODE_00E507
	LDA.w !RAM_YI_Global_MainScreenWindowMask
	STA.w !REGISTER_MainScreenWindowMask
	LDA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STA.w !REGISTER_ObjectAndColorWindowSettings
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1XPosHi
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosHi
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosHi
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosHi
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosHi
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosLo
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosHi
	STA.w !REGISTER_BG3VertScrollOffset
CODE_00C1DF:
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.w !RAM_YI_Global_HDMAEnable
	STA.w !REGISTER_HDMAEnable
	RTS

DATA_00C1EC:
	dw $4000,$6000,$4700,$6700,$5180,$7180

DATA_00C1F8:
	dw $7F56DE,$7F56DE,$7F64DE,$7F64DE,$7F79DE,$7F79DE

DATA_00C204:
	dw $0E00,$0E00,$1500,$1500,$1500,$1500

DATA_00C210:
	db $63,$62

DATA_00C212:
	db $3F,$BF

DATA_00C214:
	db $00,$50,$28,$00,$00,$00,$00,$00

DATA_00C21C:
	db $01,$00,$01,$00,$01,$00,$00,$00

DATA_00C224:
	db $FF,$FF,$FF,$00,$01,$01,$01,$00

CODE_00C22C:
	LDY.b #$8F
	STY.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_HDMAEnable
	LDA.w $1139
	BEQ.b CODE_00C23B
	STA.b $51
CODE_00C23B:
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.w $0994
	ORA.b #$80
	STA.w !REGISTER_FixedColorData
	LDA.w $0992
	ORA.b #$40
	STA.w !REGISTER_FixedColorData
	LDA.w $0990
	ORA.b #$20
	STA.w !REGISTER_FixedColorData
	REP.b #$20
	INC.w $0131
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDY.b #$01
	SEP.b #$20
	LDA.w $0980
	BEQ.b CODE_00C29E
	ASL
	ORA.w $0984
	ASL
	TAX
	REP.b #$20
	LDA.l !RAM_YI_Global_DATA_00C1EC-$04,x
	STA.w !REGISTER_VRAMAddressLo
	LDA.l !RAM_YI_Global_DATA_00C1F8-$04,x
	STA.w DMA[$00].SourceLo
	LDA.l !RAM_YI_Global_DATA_00C204-$04,x
	STA.w DMA[$00].SizeLo
	LDX.b #$7F56DE>>16
	STX.w DMA[$00].SourceBank
	STY.w !REGISTER_DMAEnable
	SEP.b #$20
	DEC.w $0980
	BNE.b CODE_00C2A3
CODE_00C29E:
	LDA.w $011B
	BNE.b CODE_00C2A6
CODE_00C2A3:
	JMP.w CODE_00C33E

CODE_00C2A6:
	STZ.w $011B
	LDA.w $0982
	STZ.w $0982
	STA.w $0980
	JSR.w CODE_00E3DF
	REP.b #$20
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	JSR.w CODE_00D4AC
	JSR.w CODE_00D510
	LDA.w #$7E5040
	STA.w !REGISTER_WRAMAddressLo
	LDY.b #$7E5040>>16
	STY.w !REGISTER_WRAMAddressBank
	LDA.w #(!REGISTER_ReadOrWriteToWRAMPort&$0000FF<<8)+$00
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDA.w #$006CAA
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$006CAA>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0380
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w #$0000
	TCD
	SEP.b #$20
	LDY.w $0984
	LDA.w DATA_00C210,y
	STA.w !REGISTER_OAMSizeAndDataAreaDesignation
	LDA.w !RAM_YI_Global_MainScreenWindowMask
	STA.w !REGISTER_MainScreenWindowMask
	LDA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STA.w !REGISTER_ObjectAndColorWindowSettings
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1XPosHi
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosHi
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.w $020E
	STA.w !REGISTER_Mode7CenterX
	LDA.w $020F
	STA.w !REGISTER_Mode7CenterX
	LDA.w $0210
	STA.w !REGISTER_Mode7CenterY
	LDA.w $0211
	STA.w !REGISTER_Mode7CenterY
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosHi
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosHi
	STA.w !REGISTER_BG2VertScrollOffset
CODE_00C33E:
	REP.b #$20
	LDA.b !RAM_YI_Global_Layer3XPosLo
	CLC
	ADC.w $099E
	STA.b !RAM_YI_Global_Layer3XPosLo
	LSR
	STA.w $09BD
	LSR
	LSR
	LSR
	STA.w $09A1
	ADC.w $09BD
	STA.w $09B9
	ADC.w $09A1
	STA.w $09B5
	ADC.w $09A1
	STA.w $09B1
	ADC.w $09A1
	STA.w $09AD
	ADC.w $09A1
	STA.w $09A9
	ADC.w $09A1
	STA.w $09A5
	ADC.w $09A1
	STA.w $09A1
	SEP.b #$20
	LDA.w !RAM_YI_Global_BG1AddressAndSize
	STA.w !REGISTER_BG1AddressAndSize
	LDA.w !RAM_YI_Global_BG2AddressAndSize
	STA.w !REGISTER_BG2AddressAndSize
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STA.l $7E5A19
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.l $7E5A99
	LDA.w $09A0
	STA.w HDMA[$01].Destination
	JSR.w CODE_00E507
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.w !RAM_YI_Global_HDMAEnable
	STA.w !REGISTER_HDMAEnable
	LDA.w $098E
	BEQ.b CODE_00C3E7
	PHK
	PLB
	LDY.w $0201
	LDX.w DATA_00C212,y
	STX.w !RAM_YI_Global_ColorMathSelectAndEnable
	TYA
	ASL
	ASL
	TAY
	LDX.b #$04
CODE_00C3C3:
	DEC.w $0996,x
	BPL.b CODE_00C3E2
	LDA.w DATA_00C21C,y
	STA.w $0996,x
	LDA.w $0990,x
	CLC
	ADC.w DATA_00C224,y
	BPL.b CODE_00C3D9
	LDA.b #$00
CODE_00C3D9:
	CMP.b #$1F
	BCC.b CODE_00C3DF
	LDA.b #$1F
CODE_00C3DF:
	STA.w $0990,x
CODE_00C3E2:
	INY
	DEX
	DEX
	BPL.b CODE_00C3C3
CODE_00C3E7:
	RTS

;---------------------------------------------------------------------------

YI_IRQRt:
;$00C3E8
	SEI
	REP.b #$38
	PHA
	PHX
	PHY
	PHD
	PHB
	LDA.w #$0000
	TCD
	SEP.b #$30
if !CurrentBank != $00
	LDA.b #YI_IRQRt>>16
endif
	PHA
	PLB
	LDA.w !REGISTER_IRQEnable
	LDX.w $0126
	JSR.w (DATA_00C40A,x)
	REP.b #$30
	PLB
	PLD
	PLY
	PLX
	PLA
	CLI
	RTI

DATA_00C40A:
	dw CODE_00C412
	dw CODE_00C821
	dw CODE_00CA9A
	dw CODE_00D308

;---------------------------------------------------------------------------

CODE_00C412:
	LDA.w $0125
	BNE.b CODE_00C43D
CODE_00C417:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00C417
CODE_00C41C:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00C41C
	LDA.w !RAM_YI_Global_HDMAEnable
	STA.w !REGISTER_HDMAEnable
	STZ.w !REGISTER_ScreenDisplayRegister
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$08
CODE_00C431:
	INC.w $0125
CODE_00C434:
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
CODE_00C43C:
	RTS

;---------------------------------------------------------------------------

CODE_00C43D:
	DEC
	BNE.b CODE_00C465
CODE_00C440:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00C440
CODE_00C445:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00C445
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	LDX.w $0121
	BNE.b CODE_00C45F
	JMP.w CODE_00C431

CODE_00C45F:
	JSR.w CODE_00C431
	JMP.w (DATA_00C714,x)

CODE_00C465:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00C465
CODE_00C46A:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00C46A
	LDY.b #$8F
	STY.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_HDMAEnable
	LDX.w $011C
	JMP.w (DATA_00C47D,x)

DATA_00C47D:
	dw CODE_00C43C
	dw CODE_00C48D
	dw CODE_00C5FE
	dw CODE_00C43C
	dw CODE_00C87A
	dw CODE_00C641
	dw CODE_00C43C
	dw CODE_00C43C

;---------------------------------------------------------------------------

CODE_00C48D:
	LDA.w $011B
	BNE.b CODE_00C495
	JMP.w CODE_00C6CC

CODE_00C495:
	REP.b #$20
	LDA.b !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w $0CB0
	STA.w $011F
	LDA.b !RAM_YI_Global_Layer1XPosLo
CODE_00C4A2:
	STA.w $011D
	SEP.b #$20
	STA.w !REGISTER_BG1VertScrollOffset
	XBA
	STA.w !REGISTER_BG1VertScrollOffset
	STZ.w $011B
	JSR.w CODE_00E3DF
	JSR.w CODE_00E3AA
	REP.b #$20
	PHD
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	JSR.w CODE_00DE0C
	JSR.w CODE_00D4AC
	JSR.w CODE_00D4E5
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDY.w !RAM_YI_Level_CurrentPauseScreenState
	BEQ.b CODE_00C4F4
	CPY.b #$0C
	BCC.b CODE_00C4F4
	LDA.w #$4E00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$706800
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$706800>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0C00
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	BRA.b CODE_00C50E

CODE_00C4F4:
	JSR.w CODE_00DCAE
	JSR.w CODE_00D65D
	JSR.w CODE_00DC6B
	LDY.w $0D15
	BEQ.b CODE_00C508
	JSR.w CODE_00DC97
	STZ.w $0D15
CODE_00C508:
	JSR.w CODE_00DBA9
	JSR.w CODE_00DC1C
CODE_00C50E:
	PLD
	LDY.w $0D0D
	BNE.b CODE_00C51B
	LDY.w !RAM_YI_Level_LevelHeaderBackgroundColorLo
	CPY.b #$10
	BCC.b CODE_00C539
CODE_00C51B:
	LDA.w $0D0B
	STA.l $7E5D19
	CLC
	ADC.w #$0069
	STA.l $7E5D1C
	LDA.w $0D09
	STA.l $7E5C99
	CLC
	ADC.w #$00D2
	STA.l $7E5C9C
CODE_00C539:
	SEP.b #$20
	LDA.w $011D
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.w $011E
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.w $011F
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.w $0120
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosHi
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosHi
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosHi
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosLo
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosHi
	STA.w !REGISTER_BG3VertScrollOffset
	JSR.w CODE_00E507
CODE_00C57E:
	REP.b #$20
	LDA.w #!REGISTER_ScreenDisplayRegister
	TCD
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.b !REGISTER_MainScreenLayers
	LDA.w !RAM_YI_Global_MainScreenWindowMask
	STA.b !REGISTER_MainScreenWindowMask
	LDA.w !RAM_YI_Global_BG1And2TileDataDesignation
	STA.b !REGISTER_BG1And2TileDataDesignation
	LDA.w !RAM_YI_Global_BG1AddressAndSize
	STA.b !REGISTER_BG1AddressAndSize
	LDA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STA.b !REGISTER_BG1And2WindowMaskSettings
	LDA.w !RAM_YI_Global_ColorMathInitialSettings
	STA.b !REGISTER_ColorMathInitialSettings
	LDA.w !RAM_YI_Global_BGWindowLogicSettings
	STA.b !REGISTER_BGWindowLogicSettings
	SEP.b #$20
	LDA.w !RAM_YI_Global_BG3AddressAndSize
	STA.b !REGISTER_BG3AddressAndSize
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STA.b !REGISTER_BGModeAndTileSizeSetting
	LDA.w !RAM_YI_Global_MosaicSizeAndBGEnable
	STA.b !REGISTER_MosaicSizeAndBGEnable
	LDA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STA.b !REGISTER_ObjectAndColorWindowSettings
	REP.b #$20
	LDA.w #DMA[$00].Parameters
	TCD
	LDA.b HDMA[$01].SourceLo
	STA.b HDMA[$01].TableSourceLo
	LDA.b HDMA[$02].SourceLo
	STA.b HDMA[$02].TableSourceLo
	LDA.b HDMA[$03].SourceLo
	STA.b HDMA[$03].TableSourceLo
	LDA.b HDMA[$04].SourceLo
	STA.b HDMA[$04].TableSourceLo
	LDA.b HDMA[$05].SourceLo
	STA.b HDMA[$05].TableSourceLo
	LDA.b HDMA[$06].SourceLo
	STA.b HDMA[$06].TableSourceLo
	LDA.b HDMA[$07].SourceLo
	STA.b HDMA[$07].TableSourceLo
	SEP.b #$20
	LDA.b #$01
	STA.b HDMA[$01].LineCount
	STA.b HDMA[$02].LineCount
	STA.b HDMA[$03].LineCount
	STA.b HDMA[$04].LineCount
	STA.b HDMA[$05].LineCount
	STA.b HDMA[$06].LineCount
	STA.b HDMA[$07].LineCount
	STZ.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$06
	JMP.w CODE_00C434

CODE_00C5FE:
	LDA.w $011B
	BNE.b CODE_00C606
	JMP.w CODE_00C6CC

CODE_00C606:
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$20
	LDA.w #$3600
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$007EF2
	STA.w DMA[$00].SourceLo
	LDY.b #$007EF2>>16
	STY.w DMA[$00].SourceBank
	LDY.b #$80
	STY.w DMA[$00].SizeLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	LDA.w #$0080
	STA.b !RAM_YI_Global_Layer3YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	LDA.w $7EF0
	STA.w $011F
	LDA.w $7EEE
	JMP.w CODE_00C4A2

CODE_00C641:
	LDA.w $011B
	BNE.b CODE_00C649
	JMP.w CODE_00C6CC

CODE_00C649:
	LDA.w !RAM_YI_Global_Mode7TilemapSettings
	STA.w !REGISTER_Mode7TilemapSettings
	LDA.w !RAM_YI_Global_Mode7MatrixParameterALo
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.w !RAM_YI_Global_Mode7MatrixParameterAHi
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.w !RAM_YI_Global_Mode7MatrixParameterBLo
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !RAM_YI_Global_Mode7MatrixParameterBHi
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !RAM_YI_Global_Mode7MatrixParameterCLo
	STA.w !REGISTER_Mode7MatrixParameterC
	LDA.w !RAM_YI_Global_Mode7MatrixParameterCHi
	STA.w !REGISTER_Mode7MatrixParameterC
	LDA.w !RAM_YI_Global_Mode7MatrixParameterDLo
	STA.w !REGISTER_Mode7MatrixParameterD
	LDA.w !RAM_YI_Global_Mode7MatrixParameterDHi
	STA.w !REGISTER_Mode7MatrixParameterD
	LDA.w !RAM_YI_Global_Mode7CenterXLo
	STA.w !REGISTER_Mode7CenterX
	LDA.w !RAM_YI_Global_Mode7CenterXHi
	STA.w !REGISTER_Mode7CenterX
	LDA.w !RAM_YI_Global_Mode7CenterYLo
	STA.w !REGISTER_Mode7CenterY
	LDA.w !RAM_YI_Global_Mode7CenterYHi
	STA.w !REGISTER_Mode7CenterY
	REP.b #$20
	LDA.w $0B83
	STA.l $7E51E5
	STA.l $7E51E8
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.l $7E51EB
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.b !RAM_YI_Global_Layer2XPosLo
	LDA.b !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w $0CB0
	STA.b !RAM_YI_Global_Layer2YPosLo
	LDA.b !RAM_YI_Global_Layer3YPosLo
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$09
	BNE.b CODE_00C6C4
	CLC
	ADC.w $0CB0
CODE_00C6C4:
	STA.w $011F
	LDA.b !RAM_YI_Global_Layer3XPosLo
	JMP.w CODE_00C4A2

CODE_00C6CC:
	LDA.w $0121
	BEQ.b CODE_00C6F9
	REP.b #$20
	PHD
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	JSR.w CODE_00DE0C
	JSR.w CODE_00D4AC
	JSR.w CODE_00D4E5
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	JSR.w CODE_00DCAE
	JSR.w CODE_00DC6B
	PLD
	SEP.b #$20
	JSR.w CODE_00E507
CODE_00C6F9:
	LDA.w $011D
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.w $011E
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.w $011F
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.w $0120
	STA.w !REGISTER_BG1VertScrollOffset
	JMP.w CODE_00C57E

DATA_00C714:
	dw CODE_00C718
	dw CODE_00C719

CODE_00C718:
	RTS

CODE_00C719:
	JSL.l CODE_00C71E
	RTS

CODE_00C71E:
	JSL.l CODE_008259
	JSL.l CODE_0394D3
	JSL.l CODE_04FA67
	JSL.l CODE_04DD9E
	JSL.l CODE_0397D3
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0D23
	INC.w $0D25
	LDA.w $0D25
	CMP.w #$0010
	BCC.b CODE_00C775
	LDA.w $093E
	ORA.w $0942
	BEQ.b CODE_00C75D
	LDA.w $0D23
	CLC
	ADC.w #$0006
	STA.w $0D23
CODE_00C75D:
	LDA.w $0D25
	AND.w #$0003
	BEQ.b CODE_00C769
	JML.l CODE_00C7C8

CODE_00C769:
	REP.b #$10
	LDX.w #$0000
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	JML.l CODE_00C778

CODE_00C775:
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

CODE_00C778:
	REP.b #$20
	PHB
	PHK
	PLB
	LDA.w $0D21
	AND.w #$003F
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	STY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #FXDATA_5149BC>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #FXDATA_5149BC
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEP.b #$10
	LDA.w $0D1D
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w $0D1F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_09E92F>>16
	LDA.w #FXCODE_09E92F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	STA.w $0D21
	LDA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $0D1F
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STA.w $0D1D
	INC.w $0CF9
	PLB
	LDA.w #$5038
	STA.w $0D1B
CODE_00C7C8:
	REP.b #$10
	LDA.w #$AAAA
	STA.w $6C00
	STA.w $6C02
	LDA.w #$00E0
	STA.w $0D19
	SEP.b #$20
	LDX.w #$0000
CODE_00C7DE:
	REP.b #$20
	TXA
	AND.w #$00FF
	LSR
	ORA.w #$35C0
	STA.w $6A02,x
	ORA.w #$0020
	STA.w $6A22,x
	LDA.w $0B4C
	SEC
	SBC.w $0D19
	SEP.b #$20
	STA.w $6A00,x
	STA.w $6A20,x
	LDA.w $0D19
	SEC
	SBC.b #$10
	STA.w $0D19
	LDA.w $0D1B
	STA.w $6A01,x
	LDA.w $0D1C
	STA.w $6A21,x
	INX
	INX
	INX
	INX
	CPX.w #$0020
	BCC.b CODE_00C7DE
	SEP.b #$10
	RTL

CODE_00C821:
	LDA.w $0125
	BNE.b CODE_00C842
CODE_00C826:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00C826
CODE_00C82B:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00C82B
	LDA.w !RAM_YI_Global_HDMAEnable
	STA.w !REGISTER_HDMAEnable
	STZ.w !REGISTER_ScreenDisplayRegister
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$0E
	BRA.b CODE_00C85C

CODE_00C842:
	DEC
	BNE.b CODE_00C862
CODE_00C845:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00C845
CODE_00C84A:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00C84A
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$C6
CODE_00C85C:
	INC.w $0125
	JMP.w CODE_00C434

CODE_00C862:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00C862
CODE_00C867:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00C867
	LDY.b #$8F
	STY.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_HDMAEnable
	LDX.w $011C
	JMP.w (DATA_00C47D,x)

;---------------------------------------------------------------------------

CODE_00C87A:
	LDA.w $011B
	BNE.b CODE_00C882
	JMP.w CODE_00CA10

CODE_00C882:
	STZ.w $011B
	JSR.w CODE_00E3DF
	JSR.w CODE_00E3AA
	REP.b #$20
	PHD
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	JSR.w CODE_00DE0C
	JSR.w CODE_00D4AC
	JSR.w CODE_00D4E5
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDA.w $0D15
	BEQ.b CODE_00C8C5
	LDA.w #$7000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$704C00
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$704C00>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0800
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	STZ.w $0D15
CODE_00C8C5:
	LDA.w $0CF9
	BEQ.b CODE_00C8E0
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDA.w #$5000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$705800>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STX.b $00
	STZ.w $0CF9
CODE_00C8E0:
	LDA.w $0B85
	BNE.b CODE_00C8E8
	JMP.w CODE_00C9BA

CODE_00C8E8:
	LDA.w #$5400
	STA.w !REGISTER_VRAMAddressLo
	LDY.b #$40
	LDA.w $6128
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #FXDATA_53C000>>16
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $612C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6130
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6134
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6138
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $613C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6140
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6144
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w #$5500
	STA.w !REGISTER_VRAMAddressLo
	SEP.b #$20
	LDA.w $6128
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $612B
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $612C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $612F
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6130
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6133
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6134
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6137
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6138
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $613B
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $613C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $613F
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6140
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6143
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	LDA.w $6144
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6147
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	REP.b #$20
	STZ.w $0B85
CODE_00C9BA:
	PLD
	SEP.b #$20
	JSR.w CODE_00E507
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1XPosHi
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosHi
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosHi
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosHi
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosHi
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosLo
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosHi
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b !RAM_YI_Global_Layer4XPosLo
	STA.w !REGISTER_BG4HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer4XPosHi
	STA.w !REGISTER_BG4HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer4YPosLo
	STA.w !REGISTER_BG4VertScrollOffset
	LDA.b !RAM_YI_Global_Layer4YPosHi
	STA.w !REGISTER_BG4VertScrollOffset
CODE_00CA10:
	LDA.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	STA.w !REGISTER_OAMSizeAndDataAreaDesignation
	LDA.w !RAM_YI_Global_BG1AddressAndSize
	STA.w !REGISTER_BG1AddressAndSize
	LDA.w !RAM_YI_Global_BG2AddressAndSize
	STA.w !REGISTER_BG2AddressAndSize
	LDA.w !RAM_YI_Global_ColorMathInitialSettings
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.w !RAM_YI_Global_MosaicSizeAndBGEnable
	STA.w !REGISTER_MosaicSizeAndBGEnable
	REP.b #$20
	LDA.w $1407
	STA.l $7E5B99
	STA.l $7E5B9C
	LDA.w #DMA[$00].Parameters
	TCD
	LDA.b HDMA[$01].SourceLo
	STA.b HDMA[$01].TableSourceLo
	LDA.b HDMA[$02].SourceLo
	STA.b HDMA[$02].TableSourceLo
	LDA.b HDMA[$03].SourceLo
	STA.b HDMA[$03].TableSourceLo
	LDA.b HDMA[$04].SourceLo
	STA.b HDMA[$04].TableSourceLo
	LDA.b HDMA[$05].SourceLo
	STA.b HDMA[$05].TableSourceLo
	LDA.b HDMA[$06].SourceLo
	STA.b HDMA[$06].TableSourceLo
	LDA.b HDMA[$07].SourceLo
	STA.b HDMA[$07].TableSourceLo
	SEP.b #$20
	LDA.b #$01
	STA.b HDMA[$01].LineCount
	STA.b HDMA[$02].LineCount
	STA.b HDMA[$03].LineCount
	STA.b HDMA[$04].LineCount
	STA.b HDMA[$05].LineCount
	STA.b HDMA[$06].LineCount
	STA.b HDMA[$07].LineCount
	STZ.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$0C
	JMP.w CODE_00C434

;---------------------------------------------------------------------------

DATA_00CA80:
	dw $2000,$2000,$1000,$3000,$0000,$4000

DATA_00CA8C:
	dw $7F96DE,$7F56DE,$7F76DE,$7F76DE,$7F56DE,$7F96DE

DATA_00CA98:
	db $50,$52

CODE_00CA9A:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00CA9A
CODE_00CA9F:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00CA9F
	LDA.b #$8F
	STA.w !REGISTER_ScreenDisplayRegister
	JSR.w CODE_00D4C3
	LDA.w $0069
	BEQ.b CODE_00CAF7
	ASL
	ORA.w $006D
	ASL
	TAX
	REP.b #$20
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.l !RAM_YI_Global_DATA_00CA80-$04,x
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.l !RAM_YI_Global_DATA_00CA8C-$04,x
	STA.w DMA[$00].SourceLo
	LDA.w #$2000
	STA.w DMA[$00].SizeLo
	LDY.b #$7F56DE>>16
	STY.w DMA[$00].SourceBank
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	SEP.b #$20
	DEC.w $0069
	BNE.b CODE_00CAFC
	LDX.b $6D
	LDA.l !RAM_YI_Global_DATA_00CA98,x
	STA.w !REGISTER_BG1And2TileDataDesignation
	TXA
	EOR.b #$01
	STA.b $6D
CODE_00CAF7:
	LDA.w $011B
	BNE.b CODE_00CB14
CODE_00CAFC:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00CAFC
CODE_00CB01:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00CB01
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	JMP.w CODE_00CB97

CODE_00CB14:
	STZ.w $011B
	REP.b #$20
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$06
CODE_00CB1F:
	LDA.w $0B93,x
	STA.l $7017C2,x
	LDA.w $0B9B,x
	STA.l $7017E2,x
	DEX
	DEX
	BPL.b CODE_00CB1F
	LDX.b #$01
	JSR.w CODE_00D52B
	LDA.w $0BD3
	BEQ.b CODE_00CB5B
	LDA.w $0BD5
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDA.w #$701C00
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$701C00>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w $0BD7
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDY.b #$01
	STY.b $00
	STZ.w $0BD3
CODE_00CB5B:
	LDA.w #$0000
	TCD
	SEP.b #$20
	JSR.w CODE_00E507
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.w $006B
	BEQ.b CODE_00CB97
	STZ.w $006B
	STA.w $0069
	REP.b #$20
	LDA.w #$7F56DE
	STA.b $20
	LDY.b #$7F56DE>>16
	STY.b $22
	LDA.w #$701C00
	STA.b $23
	LDY.b #$701C00>>16
	STY.b $25
	LDA.w #$6000
	JSL.l CODE_008288
	SEP.b #$20
CODE_00CB97:
	REP.b #$20
	LDA.b $00
	PHA
	LDX.w $0B8F
	LDA.w $0B93
	CLC
	ADC.l !RAM_YI_Global_DATA_00CC58,x
	BMI.b CODE_00CBB5
	STA.w $0B93
	STA.w $0B97
	STA.w $0B9D
	STA.w $0B9F
CODE_00CBB5:
	LDX.b #$00
	LDA.w #$F080
CODE_00CBBA:
	STA.w $096D,x
	STZ.w $096F,x
	STA.w $0A6D,x
	STZ.w $0A6F,x
	DEX
	DEX
	DEX
	DEX
	BNE.b CODE_00CBBA
	LDA.w $0B8D
	ASL
	TAX
	LDA.l !RAM_YI_Global_DATA_00D2C2,x
	STA.b $00
	LDA.w #$007E
	STA.b $02
	REP.b #$10
	LDX.w #$0000
	TXY
CODE_00CBE2:
	REP.b #$20
	LDA.b [$00],y
	STA.b $0A
	INY
	INY
	SEP.b #$20
CODE_00CBEC:
	LDA.b [$00],y
	CMP.b #$FF
	BEQ.b CODE_00CC31
	PHA
	AND.b #$EF
	STA.w $096F,x
	ORA.b #$10
	STA.w $0973,x
	PLA
	AND.b #$10
	LSR
	LSR
	LSR
	ORA.b #$3D
	STA.w $0970,x
	STA.w $0974,x
	LDA.b $0A
	STA.w $096D,x
	STA.w $0971,x
	INY
	CLC
	ADC.b [$00],y
	STA.b $0A
	LDA.b $0B
	STA.w $096E,x
	CLC
	ADC.b #$08
	STA.w $0972,x
	REP.b #$20
	TXA
	CLC
	ADC.w #$0008
	TAX
	INY
	SEP.b #$20
	BRA.b CODE_00CBEC

CODE_00CC31:
	INY
	LDA.b [$00],y
	BEQ.b CODE_00CC50
	INY
	DEC
	BEQ.b CODE_00CBE2
	DEC
	BEQ.b CODE_00CC46
	LDA.b $0A
	CLC
	ADC.b #$08
	STA.b $0A
	BRA.b CODE_00CBEC

CODE_00CC46:
	LDA.b [$00],y
	CLC
	ADC.b $0B
	STA.b $0B
	INY
	BRA.b CODE_00CBEC

CODE_00CC50:
	REP.b #$20
	PLA
	STA.b $00
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

DATA_00CC58:
	dw $F7BE,$0842

DATA_00CC5C:
	dw $A857,$08DA,$08B5,$0498,$07B9,$077C,$087A,$08BB
	dw $089E,$07B9,$08BA,$085C,$00FF

DATA_00CC76:
	dw $A449,$08F5,$0878,$089A,$0878,$08BA,$087F,$0C98
	dw $08F5,$077C,$08D9,$08BC,$089A,$0878,$01FF,$B443
	dw $08F5,$089E,$08BA,$087F,$0498,$087F,$0498,$089A
	dw $109E,$08D7,$0878,$089A,$0878,$087E,$089E,$00FF

DATA_00CCB6:
	dw $A449,$08F4,$087F,$0498,$087E,$077C,$077D,$08BC
	dw $089C,$0C98,$08D1,$0498,$089D,$089E,$01FF,$B450
	dw $08D1,$0498,$087B,$077C,$089A,$0C98,$08D4,$089E
	dw $089D,$089D,$089E,$00FF

DATA_00CCEE:
	dw $A849,$08DA,$08F1,$07B9,$089E,$087E,$07B9,$0878
	dw $089C,$089C,$077C,$07B9,$08BA,$085C,$00FF

DATA_00CD0C:
	dw $A44A,$08F5,$089E,$08BA,$087F,$0498,$109E,$06D2
	dw $08BE,$0878,$08BE,$0878,$089A,$0898,$01FF,$B45A
	dw $08D6,$0878,$08BA,$0878,$07B9,$10BC,$08D7,$0498
	dw $0498,$00FF

DATA_00CD40:
	dw $A452,$08D4,$0498,$08D8,$089E,$08BA,$087F,$1098
	dw $08D4,$089E,$087B,$0878,$01FF,$B442,$08F4,$0878
	dw $08BB,$089E,$07B9,$10BC,$08F5,$0878,$089A,$0878
	dw $087F,$0878,$08BB,$0878,$00FF

DATA_00CD7A:
	dw $A449,$08D4,$0878,$08D9,$08BC,$0878,$089A,$0C98
	dw $08D6,$089E,$07B9,$0498,$08BB,$0878,$01FF,$B443
	dw $081A,$08BC,$0498,$087A,$087F,$0C98,$081A,$0878
	dw $089C,$0878,$089C,$089E,$08BB,$089E,$00FF

DATA_00CDB8:
	dw $A438,$08F4,$087F,$0498,$087E,$077C,$087F,$0498
	dw $07B9,$109E,$08D4,$0878,$08BA,$0878,$089C,$0878
	dw $08BB,$08BA,$08BC,$01FF,$B449,$08F4,$087F,$0498
	dw $087E,$077C,$089A,$0C98,$081A,$089E,$08BA,$087F
	dw $0498,$087B,$0878,$00FF

DATA_00CE00:
	dw $A440,$081A,$0878,$08BA,$08BC,$089D,$089E,$07B9
	dw $0C98,$08F5,$0878,$089A,$077C,$08BB,$0878,$089D
	dw $0498,$00FF

DATA_00CE24:
	dw $A83D,$08DA,$08B4,$089E,$08BC,$07B9,$08BA,$0F7C
	dw $08B5,$077C,$08BA,$0498,$087E,$089D,$077C,$07B9
	dw $08BA,$085C,$00FF

DATA_00CE4A:
	dw $A43E,$081A,$0878,$08BA,$08BC,$087F,$0498,$08BA
	dw $1078,$081A,$0878,$089C,$0878,$089C,$08BC,$07B9
	dw $0878,$01FF,$B45A,$08D4,$077C,$089D,$08BB,$1078
	dw $08F6,$08BA,$08BC,$0498,$00FF

DATA_00CE84:
	dw $A442,$081A,$089E,$08BA,$087F,$0498,$087F,$0498
	dw $07B9,$109E,$08D7,$089E,$089C,$089E,$08BB,$089E
	dw $01FF,$B460,$07B6,$0498,$0799,$0C98,$08D7,$089E
	dw $08BB,$089E,$00FF

DATA_00CEBA:
	dw $A83F,$08DA,$08F4,$089E,$08BC,$089D,$107B,$08B4
	dw $089E,$089C,$089F,$089E,$08BA,$077C,$07B9,$085C
	dw $00FF

DATA_00CEDC:
	dw $A45A,$08D4,$089E,$0799,$0C98,$08D4,$089E,$089D
	dw $087B,$089E,$00FF

DATA_00CEF2:
	dw $A830,$08DA,$08B4,$087F,$0878,$07B9,$0878,$087A
	dw $08BB,$077C,$0FB9,$08B5,$077C,$08BA,$0498,$087E
	dw $089D,$077C,$07B9,$08BA,$085C,$00FF

DATA_00CF1E:
	dw $A44E,$08F4,$087F,$0498,$087E,$077C,$077D,$08BC
	dw $089C,$0C98,$08D1,$0498,$089D,$089E,$01FF,$B44C
	dw $08D1,$0498,$08BA,$0878,$08BA,$087F,$0C98,$08D7
	dw $089E,$087E,$0878,$089C,$0498,$00FF

DATA_00CF5A:
	dw $A44A,$08D6,$0878,$08BA,$0878,$087F,$0498,$07B9
	dw $109E,$06D2,$0498,$089C,$08BC,$07B9,$0878,$01FF
	dw $B445,$08F5,$089E,$089C,$089E,$0878,$089A,$0C98
	dw $08D4,$08BC,$07B9,$089E,$08BC,$089C,$077C,$00FF

DATA_00CF9A:
	dw $A84B,$08DA,$08B4,$08DB,$08D0,$08DB,$08B5,$077C
	dw $08BA,$0498,$087E,$089D,$077C,$07B9,$085C,$00FF

DATA_00CFBA:
	dw $A448,$081A,$089E,$08BA,$087F,$0498,$0878,$089A
	dw $0C98,$08D4,$089E,$0498,$08D9,$08BC,$089C,$0498
	dw $00FF

DATA_00CFDC:
	dw $A838,$08DA,$08F4,$089F,$077C,$087A,$0498,$0878
	dw $0C9B,$08F5,$087F,$0878,$089D,$089A,$10BA,$08F5
	dw $089E,$085C,$00FF

DATA_00D002:
	dw $A443,$0818,$0878,$08BB,$0878,$07B9,$10BC,$081A
	dw $0878,$089C,$0878,$087E,$08BC,$087A,$087F,$0498
	dw $01FF,$B445,$081A,$089E,$08BA,$087F,$0498,$089A
	dw $0C98,$08D1,$0878,$07B9,$08BC,$087F,$0878,$089D
	dw $0878,$00FF

DATA_00D046:
	dw $A450,$081A,$089E,$0498,$087A,$087F,$0C98,$08D4
	dw $089E,$08BB,$0878,$0879,$077C,$01FF,$B44B,$081A
	dw $0878,$08BA,$08BC,$087F,$0498,$07B9,$109E,$08F4
	dw $0878,$089A,$0878,$0498,$00FF

DATA_00D080:
	dw $A44B,$08D1,$0498,$07B9,$089E,$089D,$089E,$0879
	dw $10BC,$08D4,$0878,$089A,$08BC,$0498,$01FF,$B440
	dw $08F4,$087F,$0498,$087E,$077C,$089A,$0C98,$081A
	dw $0878,$089C,$0878,$08BA,$087F,$0498,$07B9,$089E
	dw $00FF

DATA_00D0C2:
	dw $A44C,$08D4,$0498,$089C,$0498,$08D8,$089E,$08BA
	dw $087F,$0C98,$07B7,$08BC,$089A,$08BC,$0498,$01FF
	dw $B45B,$08D4,$077C,$0498,$08D9,$109E,$08D4,$0878
	dw $08BB,$089E,$00FF

DATA_00D0F8:
	dw $A449,$08F4,$089E,$0498,$087A,$087F,$0498,$07B9
	dw $109E,$08F5,$089E,$089C,$0498,$08BB,$0878,$01FF
	dw $B44F,$08D6,$0498,$0F7C,$081A,$089E,$08BA,$087F
	dw $0498,$089C,$08BC,$07B9,$0878,$00FF

DATA_00D134:
	dw $A449,$08D4,$077C,$089D,$08BA,$08BC,$089A,$0F7C
	dw $08F5,$0878,$089D,$0878,$0879,$077C,$01FF,$B445
	dw $08F5,$077C,$08BB,$08BA,$10BC,$08D1,$0878,$08BA
	dw $087F,$0498,$089C,$089E,$08BB,$089E,$00FF

DATA_00D172:
	dw $A451,$08B5,$077C,$07B9,$077C,$0F9A,$0818,$087F
	dw $0498,$089F,$089F,$049B,$077C,$01FF,$B457,$08D1
	dw $0498,$07B9,$109E,$081A,$0878,$089C,$0878,$087B
	dw $0878,$00FF

DATA_00D1A6:
	dw $A858,$08DA,$08F1,$07B9,$089E,$087B,$08BC,$087A
	dw $077C,$07B9,$085C,$00FF

DATA_00D1BE:
	dw $A443,$08F4,$087F,$0498,$087E,$077C,$07B9,$10BC
	dw $08D6,$0498,$08D8,$0878,$089C,$089E,$08BB,$089E
	dw $00FF

DATA_00D1E0:
	dw $A834,$08DA,$07B6,$08BF,$077C,$087A,$08BC,$08BB
	dw $0498,$08BD,$0F7C,$08F1,$07B9,$089E,$087B,$08BC
	dw $087A,$077C,$07B9,$085C,$00FF

DATA_00D20A:
	dw $A446,$08D1,$0498,$07B9,$089E,$08BA,$087F,$0C98
	dw $081A,$0878,$089C,$0878,$08BC,$087A,$087F,$0498
	dw $00FF

DATA_00D22C:
	dw $A41E,$07D5,$089E,$089E,$089A,$10BA,$049B,$0498
	dw $089A,$0F7C,$08BB,$087F,$077C,$10D8,$087F,$0878
	dw $08BD,$0F7C,$0878,$07B9,$07B9,$0498,$08BD,$077C
	dw $087B,$01FF,$B424,$08BE,$087F,$077C,$07B9,$0F7C
	dw $089C,$089E,$109C,$0878,$089D,$107B,$087B,$0878
	dw $107B,$049B,$0498,$08BD,$077C,$08DB,$08DB,$08DB
	dw $08DB,$00FF

DATA_00D290:
	dw $A442,$08D1,$077C,$07B9,$089E,$077C,$10BA,$0878
	dw $07B9,$0F7C,$0879,$089E,$07B9,$089D,$081F,$081F
	dw $00FF

DATA_00D2B2:
	dw $A462,$08F5,$08D1,$0FB6,$07B6,$08D7,$08B5,$00FF

DATA_00D2C2:
	dw DATA_00CC5C,DATA_00CC5C,DATA_00CC76,DATA_00CCB6,DATA_00CCEE,DATA_00CD0C,DATA_00CD40,DATA_00CD7A
	dw DATA_00CDB8,DATA_00CE00,DATA_00CE24,DATA_00CE4A,DATA_00CE84,DATA_00CEBA,DATA_00CEDC,DATA_00CEF2
	dw DATA_00CF1E,DATA_00CF5A,DATA_00CF9A,DATA_00CFBA,DATA_00CFDC,DATA_00D002,DATA_00D046,DATA_00D080
	dw DATA_00D0C2,DATA_00D0F8,DATA_00D134,DATA_00D172,DATA_00D1A6,DATA_00D1BE,DATA_00D1E0,DATA_00D20A
	dw DATA_00D22C,DATA_00D290,DATA_00D2B2

;---------------------------------------------------------------------------

CODE_00D308:
	LDA.w $0125
	BNE.b CODE_00D329
CODE_00D30D:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00D30D
CODE_00D312:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00D312
	LDA.w !RAM_YI_Global_HDMAEnable
	STA.w !REGISTER_HDMAEnable
	STZ.w !REGISTER_ScreenDisplayRegister
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$08
	BRA.b CODE_00D343

CODE_00D329:
	DEC
	BNE.b CODE_00D34F
CODE_00D32C:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00D32C
CODE_00D331:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00D331
	LDA.w $0200
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
CODE_00D343:
	INC.w $0125
CODE_00D346:
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	RTS

CODE_00D34F:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_00D34F
CODE_00D354:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_00D354
	LDY.b #$8F
	STY.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_HDMAEnable
	LDA.w $011B
	BNE.b CODE_00D369
	JMP.w CODE_00D46B

CODE_00D369:
	STZ.w $011B
	JSR.w CODE_00E3DF
	JSR.w CODE_00E3AA
	REP.b #$20
	PHD
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	JSR.w CODE_00DE0C
	JSR.w CODE_00D4AC
	JSR.w CODE_00D4E5
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	JSR.w CODE_00DCAE
	LDY.w $0D15
	BEQ.b CODE_00D39E
	JSR.w CODE_00DC97
	STZ.w $0D15
	BRA.b CODE_00D3A1

CODE_00D39E:
	JSR.w CODE_00DC6B
CODE_00D3A1:
	LDA.w !RAM_YI_Global_CurrentGameMode
	CMP.w #!Define_YI_GameMode30
	BNE.b CODE_00D3C3
	LDA.w !RAM_YI_Global_HDMAEnable
	AND.w #$0020
	BEQ.b CODE_00D3C0
	LDA.w $10E0
	STA.l $7E5040
	EOR.w #$FFFF
	INC
	STA.l $7E5042
CODE_00D3C0:
	JSR.w CODE_00DBA9
CODE_00D3C3:
	PLD
	SEP.b #$20
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1XPosHi
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer1YPosHi
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2XPosHi
	STA.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer2YPosHi
	STA.w !REGISTER_BG2VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3XPosHi
	STA.w !REGISTER_BG3HorizScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosLo
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b !RAM_YI_Global_Layer3YPosHi
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !REGISTER_MainScreenLayers
	LDA.w !RAM_YI_Global_SubScreenLayers
	STA.w !REGISTER_SubScreenLayers
	LDA.w !RAM_YI_Global_MainScreenWindowMask
	STA.w !REGISTER_MainScreenWindowMask
	LDA.w !RAM_YI_Global_SubScreenWindowMask
	STA.w !REGISTER_SubScreenWindowMask
	LDA.w !RAM_YI_Global_BG1And2TileDataDesignation
	STA.w !REGISTER_BG1And2TileDataDesignation
	LDA.w !RAM_YI_Global_BG1AddressAndSize
	STA.w !REGISTER_BG1AddressAndSize
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STA.w !REGISTER_BG1And2WindowMaskSettings
	LDA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STA.w !REGISTER_BG3And4WindowMaskSettings
	LDA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STA.w !REGISTER_ObjectAndColorWindowSettings
	LDA.w !RAM_YI_Global_ColorMathInitialSettings
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.w !RAM_YI_Global_BGWindowLogicSettings
	STA.w !REGISTER_BGWindowLogicSettings
	LDA.w !RAM_YI_Global_ColorAndObjectWindowLogicSettings
	STA.w !REGISTER_ColorAndObjectWindowLogicSettings
	LDA.w !RAM_YI_Global_BG2AddressAndSize
	STA.w !REGISTER_BG2AddressAndSize
	LDA.w !RAM_YI_Global_BG3AddressAndSize
	STA.w !REGISTER_BG3AddressAndSize
	LDA.w !RAM_YI_Global_MosaicSizeAndBGEnable
	STA.w !REGISTER_MosaicSizeAndBGEnable
	JSR.w CODE_00E507
CODE_00D46B:
	REP.b #$20
	LDA.w #DMA[$00].Parameters
	TCD
	LDA.b HDMA[$01].SourceLo
	STA.b HDMA[$01].TableSourceLo
	LDA.b HDMA[$02].SourceLo
	STA.b HDMA[$02].TableSourceLo
	LDA.b HDMA[$03].SourceLo
	STA.b HDMA[$03].TableSourceLo
	LDA.b HDMA[$04].SourceLo
	STA.b HDMA[$04].TableSourceLo
	LDA.b HDMA[$05].SourceLo
	STA.b HDMA[$05].TableSourceLo
	LDA.b HDMA[$06].SourceLo
	STA.b HDMA[$06].TableSourceLo
	LDA.b HDMA[$07].SourceLo
	STA.b HDMA[$07].TableSourceLo
	SEP.b #$20
	LDA.b #$01
	STA.b HDMA[$01].LineCount
	STA.b HDMA[$02].LineCount
	STA.b HDMA[$03].LineCount
	STA.b HDMA[$04].LineCount
	STA.b HDMA[$05].LineCount
	STA.b HDMA[$06].LineCount
	STA.b HDMA[$07].LineCount
	STZ.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$06
	JMP.w CODE_00D346

;---------------------------------------------------------------------------

CODE_00D4AC:
	STZ.w !REGISTER_OAMAddressLo
	STZ.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDA.w #(!REGISTER_OAMDataWritePort&$0000FF)+(($006A00&$0000FF)<<8)
	STA.b DMA[$00].Destination-!REGISTER_DMAEnable
	LDA.w #$006A00>>8
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	LDA.w #$0220
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	RTS

;---------------------------------------------------------------------------

CODE_00D4C3:
	REP.b #$20
	STZ.w !REGISTER_OAMAddressLo
	STZ.w DMA[$00].Parameters
	LDA.w #(!REGISTER_OAMDataWritePort&$0000FF)+(($00096D&$0000FF)<<8)
	STA.w DMA[$00].Destination
	LDA.w #$00096D>>8
	STA.w DMA[$00].SourceHi
	LDA.w #$0220
	STA.w DMA[$00].SizeLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_00D4E5:
	LDA.w $0948
	AND.w #$001F
	ORA.w #$0020
	TAY
	STY.w !REGISTER_FixedColorData
	LDA.w $0948
	LSR
	LSR
	LSR
	LSR
	LSR
	AND.w #$001F
	ORA.w #$0040
	TAY
	STY.w !REGISTER_FixedColorData
	LDA.w $0949
	LSR
	LSR
	ORA.w #$0080
	TAY
	STY.w !REGISTER_FixedColorData
CODE_00D510:
	LDY.b #$00
	STY.w !REGISTER_CGRAMAddress
	LDA.w #(!REGISTER_WriteToCGRAMPort&$0000FF<<8)+$00
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDA.w #$702000
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$702000>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0200
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_00D52B:
	LDA.w $0948
	AND.w #$001F
	ORA.w #$0020
	TAY
	STY.w !REGISTER_FixedColorData
	LDA.w $0948
	LSR
	LSR
	LSR
	LSR
	LSR
	AND.w #$001F
	ORA.w #$0040
	TAY
	STY.w !REGISTER_FixedColorData
	LDA.w $0949
	LSR
	LSR
	ORA.w #$0080
	TAY
	STY.w !REGISTER_FixedColorData
	LDY.b #$00
	STY.w !REGISTER_CGRAMAddress
	LDA.w #(!REGISTER_WriteToCGRAMPort&$0000FF<<8)+$00
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDA.w #$701600
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$701600>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0200
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b $00
	RTS

;---------------------------------------------------------------------------

CODE_00D571:
	PHB
	PHD
	PHK
	PLB
	REP.b #$20
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDX.b #$01
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDA.w #$0020
	STA.w $0000
CODE_00D58D:
	INC.w $7974
	JSR.w CODE_00D65D
	DEC.w $0000
	BNE.b CODE_00D58D
	SEP.b #$20
	PLD
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_00D59D:
	dw $1400,$1400,$1440,$1440,$1480,$1480,$14C0,$14C0
	dw $1400,$1400,$1440,$1440,$1480,$1480,$14C0,$14C0
	dw $1400,$1400,$1440,$1440,$1480,$1480,$14C0,$14C0
	dw $1400,$1400,$1440,$1440,$1480,$1480,$14C0,$14C0

DATA_00D5DD:
	dw FXDATA_520000+$C000,FXDATA_520000+$C000,FXDATA_520000+$C400,FXDATA_520000+$C100,FXDATA_520000+$C500,FXDATA_520000+$C000,FXDATA_520000+$C400,FXDATA_520000+$A880
	dw FXDATA_520000+$C080,FXDATA_520000+$C080,FXDATA_520000+$C480,FXDATA_520000+$C180,FXDATA_520000+$C580,FXDATA_520000+$C080,FXDATA_520000+$C480,FXDATA_520000+$AA80
	dw FXDATA_520000+$C200,FXDATA_520000+$C200,FXDATA_520000+$C600,FXDATA_520000+$C300,FXDATA_520000+$C700,FXDATA_520000+$C200,FXDATA_520000+$C600,FXDATA_520000+$AC80
	dw FXDATA_520000+$C280,FXDATA_520000+$C280,FXDATA_520000+$C680,FXDATA_520000+$C380,FXDATA_520000+$C780,FXDATA_520000+$C280,FXDATA_520000+$C680,FXDATA_520000+$AE80

DATA_00D61D:
	dw $0000,$0000,$0008,$0000,$0008,$0000,$0010,$0000
	dw $0000,$0000,$0008,$0000,$0008,$0000,$0010,$0000
	dw $0000,$0000,$0008,$0000,$0008,$0000,$0010,$0000
	dw $0000,$0000,$0008,$0000,$0008,$0000,$0010,$0000

CODE_00D65D:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	BNE.b CODE_00D665
	INC.w $0B6D
CODE_00D665:
	LDA.w !RAM_YI_Level_LevelHeaderAnimationTilesetLo
	ASL
	TAX
	JSR.w (DATA_00D6C2,x)
	LDA.w $7974
	AND.w #$001E
	ASL
	TAY
	LDA.w $7E08
	AND.w DATA_00D61D,y
	BEQ.b CODE_00D67F
	INY
	INY
CODE_00D67F:
	LDA.w DATA_00D59D,y
	STA.w !REGISTER_VRAMAddressLo
CODE_00D683:
	LDA.w DATA_00D5DD,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #(FXDATA_520000+$C000)>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDY.b #$80
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $0CFB
	BEQ.b CODE_00D6C1
	LDA.w #$1280
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$7060C0
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$7060C0>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDA.w #$1380
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$7062C0
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STZ.w $0CFB
CODE_00D6C1:
	RTS

DATA_00D6C2:
	dw CODE_00D6EA
	dw CODE_00D713
	dw CODE_00D765
	dw CODE_00D7B4
	dw CODE_00D6E6
	dw CODE_00D7F1
	dw CODE_00D81E
	dw CODE_00D898
	dw CODE_00D92D
	dw CODE_00D977
	dw CODE_00D99C
	dw CODE_00D9F6
	dw CODE_00DA65
	dw CODE_00DAE4
	dw CODE_00DB06
	dw CODE_00DB1C
	dw CODE_00DB54
	dw CODE_00DB86

;---------------------------------------------------------------------------

CODE_00D6E6:
	PLA
	LDX.b #$01
	RTS

;---------------------------------------------------------------------------

CODE_00D6EA:
	LDA.w $7974
	AND.w #$0007
	XBA
	LSR
	ORA.w #$1000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #FXDATA_520000+$B400
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDX.b #(FXDATA_520000+$B400)>>16
	STX.b $F9
	LDA.w #$0100
	STA.b $FA
	LDX.b #$01
	STX.b $00
	RTS

;---------------------------------------------------------------------------

DATA_00D70B:
	dw DATA_568000+$0800,DATA_568000+$0A00,DATA_568000+$0C00,DATA_568000+$0E00

CODE_00D713:
	LDA.w #$2F00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0200
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDY.b #(DATA_568000+$0800)>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w $7974
	LSR
	LSR
	AND.w #$0006
	TAY
	LDA.w DATA_00D70B,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDX.b #$01
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_00D735:
	dw $1000,$1080,$1200,$1280

DATA_00D73D:
	dw $1100,$1180,$1300,$1380

DATA_00D745:
	dw FXDATA_520000+$D000,FXDATA_520000+$D800,FXDATA_520000+$C000,FXDATA_520000+$C000,FXDATA_520000+$D200,FXDATA_520000+$DA00,FXDATA_520000+$C000,FXDATA_520000+$C000
	dw FXDATA_520000+$D400,FXDATA_520000+$DC00,FXDATA_520000+$C000,FXDATA_520000+$C000,FXDATA_520000+$D600,FXDATA_520000+$DE00,FXDATA_520000+$C000,FXDATA_520000+$C000

CODE_00D765:
	LDA.w $7974
	AND.w #$001E
	TAY
	LDA.w DATA_00D745,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDX.b #(FXDATA_520000+$C000)>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	TYA
	AND.w #$0006
	TAY
	LDA.w CODE_00D735,y
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDX.b #$01
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDA.w DATA_00D73D,y
	STA.w !REGISTER_VRAMAddressLo
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

DATA_00D794:
	dw DATA_568000+$1000,DATA_568000+$1000,DATA_568000+$1000,DATA_568000+$1000,DATA_568000+$1200,DATA_568000+$1200,DATA_568000+$1200,DATA_568000+$1200
	dw DATA_568000+$1400,DATA_568000+$1400,DATA_568000+$1400,DATA_568000+$1400,DATA_568000+$1600,DATA_568000+$1600,DATA_568000+$1600,DATA_568000+$1600

CODE_00D7B4:
	LDA.w $7974
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_00D794,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDX.b #(DATA_568000+$1000)>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$2F00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0200
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDX.b #$01
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

DATA_00D7D5:
	dw DATA_568000+$1800,DATA_568000+$1A00,DATA_568000+$1C00,DATA_568000+$1E00,DATA_568000+$2000,DATA_568000+$2200,DATA_568000+$2400,DATA_568000+$2600
	dw DATA_568000+$2400,DATA_568000+$2200,DATA_568000+$2000,DATA_568000+$1E00,DATA_568000+$1C00,DATA_568000+$1A00

CODE_00D7F1:
	LDA.w $0B67
	INC
	CMP.w #$0038
	BCC.b CODE_00D7FD
	LDA.w #$0000
CODE_00D7FD:
	STA.w $0B67
	LSR
	AND.w #$00FE
	TAY
CODE_00D805:
	LDA.w DATA_00D7D5,y
CODE_00D808:
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDX.b #(DATA_568000+$1800)>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$2F00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0200
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDX.b #$01
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	RTS

CODE_00D81E:
	LDA.w $0B6D
	CMP.w #$0006
	BCC.b CODE_00D834
	STZ.w $0B6D
	LDA.w $0B67
	INC
	INC
	AND.w #$000E
	STA.w $0B67
CODE_00D834:
	LDY.w $0B67
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$000A
	BNE.b CODE_00D805
	LDA.w DATA_00D7D5,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDX.b #(DATA_568000+$1800)>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$7F00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0200
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDX.b #$01
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

DATA_00D858:
	dw FXDATA_520000+$C800,FXDATA_520000+$CA00,FXDATA_520000+$CC00,FXDATA_520000+$CE00,FXDATA_520000+$EC00,FXDATA_520000+$EE00,FXDATA_520000+$F000,FXDATA_520000+$F200

DATA_00D868:
	dw FXDATA_520000+$C900,FXDATA_520000+$CB00,FXDATA_520000+$CD00,FXDATA_520000+$CF00,FXDATA_520000+$ED00,FXDATA_520000+$EF00,FXDATA_520000+$F100,FXDATA_520000+$F300

DATA_00D878:
	dw FXDATA_520000+$EC00,FXDATA_520000+$EE00,FXDATA_520000+$F000,FXDATA_520000+$F200,FXDATA_520000+$F400,FXDATA_520000+$F600,FXDATA_520000+$F800,FXDATA_520000+$FA00

DATA_00D888:
	dw FXDATA_520000+$ED00,FXDATA_520000+$EF00,FXDATA_520000+$F100,FXDATA_520000+$F300,FXDATA_520000+$F500,FXDATA_520000+$F700,FXDATA_520000+$F900,FXDATA_520000+$FB00

CODE_00D898:
	LDA.w $0B6D
	CMP.w #$000B
	BCC.b CODE_00D8AD
	STZ.w $0B6D
	LDA.w $0B67
	INC
	AND.w #$0003
	STA.w $0B67
CODE_00D8AD:
	LDA.w $0B67
	ASL
	TAY
	LDX.b #(FXDATA_520000+$C800)>>16
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$000A
	BNE.b CODE_00D8C3
	TYA
	ORA.w #$0008
	TAY
	LDX.b #(DATA_568000+$4800)>>16
CODE_00D8C3:
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDX.b #$01
	LDA.w $7974
	AND.w #$0001
	BEQ.b CODE_00D8F6
	LDA.w DATA_00D858,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	LDA.w DATA_00D868,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1100
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	RTS

CODE_00D8F6:
	LDA.w DATA_00D878,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1080
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	LDA.w DATA_00D888,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1180
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

DATA_00D91D:
	dw FXDATA_520000+$E400,FXDATA_520000+$E600,FXDATA_520000+$E800,FXDATA_520000+$EA00

DATA_00D925:
	dw FXDATA_520000+$E500,FXDATA_520000+$E700,FXDATA_520000+$E900,FXDATA_520000+$EB00

CODE_00D92D:
	INC.w $0B6D
	LDA.w $0B6D
	CMP.w #$0010
	BCC.b CODE_00D945
	STZ.w $0B6D
	LDA.w $0B67
	INC
	AND.w #$0003
	STA.w $0B67
CODE_00D945:
	LDA.w $0B67
	ASL
	TAY
	LDA.w DATA_00D91D,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDX.b #(FXDATA_520000+$E400)>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$1000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	LDA.w DATA_00D925,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1100
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_00D977:
	INC.w $0B6D
	LDA.w $0B6D
	CMP.w #$0008
	BCC.b CODE_00D992
	STZ.w $0B6D
	LDA.w $0B67
	CLC
	ADC.w #$0200
	AND.w #$0600
	STA.w $0B67
CODE_00D992:
	LDA.w #DATA_568000
	CLC
	ADC.w $0B67
	JMP.w CODE_00D808

;---------------------------------------------------------------------------

CODE_00D99C:
	LDA.w $0B6D
	CMP.w #$0008
	BCC.b CODE_00D9B4
	STZ.w $0B6D
	LDA.w $0B67
	CLC
	ADC.w #$0200
	AND.w #$0E00
	STA.w $0B67
CODE_00D9B4:
	LDA.w #DATA_568000+$3000
	CLC
	ADC.w $0B67
	JMP.w CODE_00D808

;---------------------------------------------------------------------------

DATA_00D9BE:
	dw DATA_568000+$3000,DATA_568000+$3200,DATA_568000+$3400,DATA_568000+$3600,DATA_568000+$3800,DATA_568000+$3A00,DATA_568000+$3C00,DATA_568000+$3E00
	dw DATA_568000+$3C00,DATA_568000+$3A00,DATA_568000+$3800,DATA_568000+$3600,DATA_568000+$3400,DATA_568000+$3200

DATA_00D9DA:
	dw $000A,$0004,$0004,$0004,$0004,$0004,$0004,$000A
	dw $0004,$0004,$0004,$0004,$0004,$0004

CODE_00D9F6:
	LDA.w $7974
	AND.w #$0001
	BNE.b CODE_00DA02
	JSR.w CODE_00D765
	RTS

CODE_00DA02:
	LDA.w $0B67
	AND.w #$000F
	ASL
	TAY
	LDA.w $0B6D
	CMP.w DATA_00D9DA,y
	BCC.b CODE_00DA23
	STZ.w $0B6D
	INC.w $0B67
	LDA.w $0B67
	CMP.w #$000E
	BCC.b CODE_00DA23
	STZ.w $0B67
CODE_00DA23:
	LDA.w DATA_00D9BE,y
	JMP.w CODE_00D808

;---------------------------------------------------------------------------

DATA_00DA29:
	dw FXDATA_520000+$E000,FXDATA_520000+$E100,FXDATA_520000+$E200,FXDATA_520000+$E300,FXDATA_520000+$F400,FXDATA_520000+$F500,FXDATA_520000+$F600,FXDATA_520000+$F700
	dw FXDATA_520000+$F400,FXDATA_520000+$F500,FXDATA_520000+$E200,FXDATA_520000+$E300

DATA_00DA41:
	dw FXDATA_520000+$F800,FXDATA_520000+$F900,FXDATA_520000+$FA00,FXDATA_520000+$FB00,FXDATA_520000+$FC00,FXDATA_520000+$FD00,FXDATA_520000+$FE00,FXDATA_520000+$FF00
	dw FXDATA_520000+$FC00,FXDATA_520000+$FD00,FXDATA_520000+$FA00,FXDATA_520000+$FB00

DATA_00DA59:
	dw $0010,$000C,$000C,$0010,$000C,$000C

CODE_00DA65:
	LDX.w $0B67
	LDA.w $0B6D
	CMP.w DATA_00DA59,x
	BCC.b CODE_00DA83
	STZ.w $0B6D
	LDA.w $0B67
	INC
	INC
	CMP.w #$000C
	BCC.b CODE_00DA80
	LDA.w #$0000
CODE_00DA80:
	STA.w $0B67
CODE_00DA83:
	LDA.w $0B67
	ASL
	TAY
	LDX.b #(FXDATA_520000+$E000)>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDX.b #$01
	LDA.w $7974
	AND.w #$0002
	BNE.b CODE_00DABD
	LDA.w DATA_00DA29,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	LDA.w DATA_00DA29+$02,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1100
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	RTS

CODE_00DABD:
	LDA.w DATA_00DA41,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1080
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	LDA.w DATA_00DA41+$02,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$1180
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0100
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.w !REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_00DAE4:
	INC.w $0B6F
	LDA.w $0B6F
	CMP.w #$0006
	BCS.b CODE_00DAF2
	JMP.w CODE_00D898

CODE_00DAF2:
	STZ.w $0B6F
	LDA.w $0B69
	INC
	INC
	AND.w #$000E
	STA.w $0B69
	LDY.w $0B69
	JMP.w CODE_00D805

CODE_00DB06:
	INC.w $0B6F
	LDA.w $7974
	AND.w #$0001
	BEQ.b CODE_00DAF2
	JMP.w CODE_00DA65

;---------------------------------------------------------------------------

DATA_00DB14:
	dw DATA_568000+$2800,DATA_568000+$2A00,DATA_568000+$2C00,DATA_568000+$2E00

CODE_00DB1C:
	LDA.w $0B71
	INC
	CMP.w #$0006
	BCC.b CODE_00DB2B
	INC.w $0B6B
	LDA.w #$0000
CODE_00DB2B:
	STA.w $0B71
	LDX.b #$01
	LDY.w $0B6B
	CMP.w #$0000
	BNE.b CODE_00DB43
	TYA
	AND.w #$0006
	TAY
	LDA.w DATA_00DB14,y
	JMP.w CODE_00D808

CODE_00DB43:
	RTS

;---------------------------------------------------------------------------

CODE_00DB44:
	dw DATA_568000+$4000,DATA_568000+$4100,DATA_568000+$4200,DATA_568000+$4300

DATA_00DB4C:
	dw DATA_568000+$4080,DATA_568000+$4180,DATA_568000+$4280,DATA_568000+$4380

CODE_00DB54:
	LDA.w $0B6D
	AND.w #$000C
	LSR
	TAY
	LDX.b #(DATA_568000+$4000)>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w CODE_00DB44,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$2F00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0080
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDA.w DATA_00DB4C,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$2F80
	STA.w !REGISTER_VRAMAddressLo
	STX.w !REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_00DB86:
	LDA.w $7974
	AND.w #$0003
	BNE.b CODE_00DB91
	JMP.w CODE_00D7B4

CODE_00DB91:
	JMP.w CODE_00DA65

;---------------------------------------------------------------------------

CODE_00DB94:
	REP.b #$20
	PHD
	LDA.w #!REGISTER_DMAEnable
	TCD
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDX.b #$01
	JSR.w CODE_00DBA9
	PLD
	SEP.b #$20
	RTL

CODE_00DBA9:
	LDY.b #$006DAA>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDY.b #$81
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDY.w $0077
	BEQ.b CODE_00DBD5
	LDA.w #$006DAA
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $007B
	STA.w !REGISTER_VRAMAddressLo
	LDY.b #$40
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $007F
	STA.w !REGISTER_VRAMAddressLo
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STZ.w $0077
CODE_00DBD5:
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDY.w $0079
	BEQ.b CODE_00DC1B
	LDA.w #$006E2A
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $007D
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0083
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $0081
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0087
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $0085
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0083
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $0089
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0087
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STZ.w $0079
CODE_00DC1B:
	RTS

;---------------------------------------------------------------------------

CODE_00DC1C:
	LDA.w $09ED
	BEQ.b CODE_00DC60
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDX.b #$01
	STX.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDX.b #!REGISTER_WriteToVRAMPortLo
	STX.b DMA[$00].Destination-!REGISTER_DMAEnable
	LDX.b #FXDATA_4C33F2>>16
	STX.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDY.b #$00
	LDX.b #$01
CODE_00DC36:
	LDA.w $09EF,y
	BMI.b CODE_00DC60
	PHA
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $09F1,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #$0004
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	PLA
	CLC
	ADC.w #$0020
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0004
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	INY
	INY
	INY
	INY
	BRA.b CODE_00DC36

CODE_00DC60:
	LDA.w #$0000
	STA.w $09ED
	DEC
	STA.w $09EF
	RTS

;---------------------------------------------------------------------------

CODE_00DC6B:
	LDA.w $0CF9
	BEQ.b CODE_00DC96
	BPL.b CODE_00DC7D
	AND.w #$7FE0
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$6800
	BRA.b CODE_00DC86

CODE_00DC7D:
	LDA.w #$5C00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
CODE_00DC86:
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$705800>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0800
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STZ.w $0CF9
CODE_00DC96:
	RTS

;---------------------------------------------------------------------------

CODE_00DC97:
	LDA.w #$3000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$704E00
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #$704E00>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0800
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_00DCAE:
	LDA.w #$4000
	STA.w !REGISTER_VRAMAddressLo
	LDY.b #$40
	LDA.w $6128
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $612A
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $612C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $612E
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6130
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6132
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6134
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6136
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6138
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $613A
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $613C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $613E
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6140
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6142
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$0020
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDA.w $6145
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	LDA.w $6144
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w #$4100
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $6128
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $612A
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $612C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $612E
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6130
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6132
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6134
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6136
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6138
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $613A
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $613C
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $613E
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $6140
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6142
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	LDA.w #$0020
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDA.w $6144
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $6146
	XBA
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $0B85
	BEQ.b CODE_00DDE7
	LDA.w #$4620
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0B87
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w #(FXDATA_520000+$4840)>>16
	STA.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $0B8B
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w #$4720
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0B89
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w $0B8D
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	STY.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STZ.w $0B85
CODE_00DDE7:
	LDA.w $6114
	BEQ.b CODE_00DE0B
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDY.b #(FXDATA_520000+$B600)>>16
	STY.b DMA[$00].SourceBank-!REGISTER_DMAEnable
	LDA.w #$4200
	STA.w !REGISTER_VRAMAddressLo
	LDY.b #$01
	STY.b DMA[$00].SizeHi-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	LDA.w #$4300
	STA.w !REGISTER_VRAMAddressLo
	STY.b DMA[$00].SizeHi-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	STZ.w $6114
CODE_00DE0B:
	RTS

;---------------------------------------------------------------------------

CODE_00DE0C:
	LDA.w #(!REGISTER_ReadOrWriteToWRAMPort&$0000FF<<8)+$00
	STA.b DMA[$00].Parameters-!REGISTER_DMAEnable
	LDY.b #$02
	LDA.w $096D,y
	BEQ.b CODE_00DE43
CODE_00DE18:
	STA.b DMA[$00].SizeLo-!REGISTER_DMAEnable
	LDA.w $096F,y
	STA.w !REGISTER_WRAMAddressLo
	LDA.w $0970,y
	STA.w !REGISTER_WRAMAddressHi
	LDA.w $0972,y
	STA.b DMA[$00].SourceLo-!REGISTER_DMAEnable
	LDA.w $0973,y
	STA.b DMA[$00].SourceHi-!REGISTER_DMAEnable
	STX.b !REGISTER_DMAEnable-!REGISTER_DMAEnable
	TYA
	CLC
	ADC.w #$0008
	TAY
	LDA.w $096D,y
	BNE.b CODE_00DE18
	STZ.w $096D
	STZ.w $096F
CODE_00DE43:
	RTS

;---------------------------------------------------------------------------

YI_BeginSuperFXProcessingRt:
;$00DE44
	STZ.w !REGISTER_SuperFX_StatusFlagsLo
CODE_00DE47:
	LDY.w $012D
	STY.w !REGISTER_SuperFX_ScreenBase
	LDY.w $012E
	STY.w !REGISTER_SuperFX_ScreenMode
	STX.w !REGISTER_SuperFX_ProgramBankRegister
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	LDA.w #!SuperFX_StatusFlags_GoFlag
CODE_00DE5C:
	BIT.w !REGISTER_SuperFX_StatusFlagsLo
	BNE.b CODE_00DE5C
	LDY.b #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_4Colors|!SuperFX_ScreenMode_SNESasWRAMAccess|!SuperFX_ScreenMode_SNESasROMAccess
	STY.w !REGISTER_SuperFX_ScreenMode
	RTL

;---------------------------------------------------------------------------

CODE_00DE67:
	PHB
	STZ.w !REGISTER_SuperFX_StatusFlagsLo
	LDY.w $012D
	STY.w !REGISTER_SuperFX_ScreenBase
	LDY.w $012E
	STY.w !REGISTER_SuperFX_ScreenMode
	STX.w !REGISTER_SuperFX_ProgramBankRegister
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	PHK
	PLB
	JSR.w CODE_00E240
	PLB
	LDA.w #!SuperFX_StatusFlags_GoFlag
CODE_00DE86:
	BIT.w !REGISTER_SuperFX_StatusFlagsLo
	BNE.b CODE_00DE86
	LDY.b #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_4Colors|!SuperFX_ScreenMode_SNESasWRAMAccess|!SuperFX_ScreenMode_SNESasROMAccess
	STY.w !REGISTER_SuperFX_ScreenMode
	RTL

;---------------------------------------------------------------------------

CODE_00DE91:
	STZ.w !REGISTER_SuperFX_StatusFlagsLo
	LDY.w $012D
	STY.w !REGISTER_SuperFX_ScreenBase
	LDY.w $012E
	STY.w !REGISTER_SuperFX_ScreenMode
	STX.w !REGISTER_SuperFX_ProgramBankRegister
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	REP.b #$10
	LDA.w #!SuperFX_StatusFlags_GoFlag
	TAY
CODE_00DEAC:
	BIT.w !REGISTER_SuperFX_StatusFlagsLo
	BNE.b CODE_00DEAC
	LDX.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BEQ.b CODE_00DEC6
	LDA.l $7F0000,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	TYA
	BRA.b CODE_00DEAC

CODE_00DEC6:
	LDY.w #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_4Colors|!SuperFX_ScreenMode_SNESasWRAMAccess|!SuperFX_ScreenMode_SNESasROMAccess
	STY.w !REGISTER_SuperFX_ScreenMode
	SEP.b #$10
	RTL

;---------------------------------------------------------------------------

CODE_00DECF:
	STZ.w !REGISTER_SuperFX_StatusFlagsLo
	LDY.w $012D
	STY.w !REGISTER_SuperFX_ScreenBase
	LDY.w $012E
	STY.w !REGISTER_SuperFX_ScreenMode
	STX.w !REGISTER_SuperFX_ProgramBankRegister
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	REP.b #$10
	LDA.w #!SuperFX_StatusFlags_GoFlag
	TAY
CODE_00DEEA:
	BIT.w !REGISTER_SuperFX_StatusFlagsLo
	BNE.b CODE_00DEEA
	LDX.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_00DF04
	LDA.l $7F0000,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	TYA
	BRA.b CODE_00DEEA

CODE_00DF04:
	BEQ.b CODE_00DF1F
	STZ.w !REGISTER_SuperFX_ScreenMode
	JSR.w (DATA_00DF28-$02,x)
	SEP.b #$20
	LDA.w $012E
	STA.w !REGISTER_SuperFX_ScreenMode
	REP.b #$20
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	TYA
	BRA.b CODE_00DEEA

CODE_00DF1F:
	LDY.w #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_4Colors|!SuperFX_ScreenMode_SNESasWRAMAccess|!SuperFX_ScreenMode_SNESasROMAccess
	STY.w !REGISTER_SuperFX_ScreenMode
	SEP.b #$10
	RTL

DATA_00DF28:
	dw CODE_00DF68
	dw CODE_00E04F
	dw CODE_00E0A9
	dw CODE_00E0CD
	dw CODE_00DFC3
	dw CODE_00E023
	dw CODE_00E017
	dw CODE_00E0D7
	dw CODE_00E0E6
	dw CODE_00E0F2
	dw CODE_00DF44
	dw CODE_00E068
	dw CODE_00E101
	dw CODE_00E126

;---------------------------------------------------------------------------

CODE_00DF44:
	PHY
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w #!Define_YI_LevelID_WelcomeToYoshisIsland
	BNE.b CODE_00DF62
	STZ.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w #!Define_YI_GameMode1F
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.w #$0001
	STA.w $022D
	JSL.l CODE_01B2B7
	PLY
	RTS

CODE_00DF62:
	JSL.l CODE_02A4B5
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_00DF68:
	PHY
	SEP.b #$10
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$A400
	BNE.b CODE_00DF7A
	JSR.w CODE_00DFE2
	SEP.b #$10
	BRA.b CODE_00DF97

CODE_00DF7A:
	LDA.w $6000
	AND.w #$FFF0
	STA.w $0000
	LDA.w $6002
	AND.w #$FFF0
	STA.w $0002
	JSL.l CODE_03A520
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
CODE_00DF97:
	LDA.w #!Define_YI_AmbSpr1E4
	JSL.l CODE_008B21
	LDA.w $0000
	STA.w $70A2,y
	LDA.w $0002
	STA.w $7142,y
	LDA.w #$000C
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	REP.b #$10
	LDA.w #$0000
	STA.w $0095
	LDA.w #$0007
	BRA.b CODE_00DFCD

CODE_00DFC3:
	LDA.w #$0000
	STA.w $0095
CODE_00DFC9:
	PHY
	LDA.w #$0001
CODE_00DFCD:
	STA.w $008F
	LDA.w $6000
	STA.w $0091
	LDA.w $6002
	STA.w $0093
	JSL.l CODE_109295
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_00DFE2:
	LDA.w #!Define_YI_SoundID93_RedCoin
	INC.w !RAM_YI_Level_RedCoinsCollectedLo
	LDY.w !RAM_YI_Level_RedCoinsCollectedLo
	CPY.w #$0014
	BMI.b CODE_00DFF1
	INC
CODE_00DFF1:
	JSL.l CODE_0085D2
	LDA.w #$0002
	STA.w $0006
	SEP.b #$10
	LDA.w $6000
	AND.w #$FFF0
	STA.w $0000
	LDA.w $6002
	AND.w #$FFF0
	JSL.l CODE_03A4F5
	REP.b #$10
	RTS

CODE_00E013:
	JSR.w CODE_00DFE2
	RTL

;---------------------------------------------------------------------------

CODE_00E017:
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	STA.w $0095
	BRA.b CODE_00DFC9

;---------------------------------------------------------------------------

CODE_00E01F:
	JSR.w CODE_00E023
	RTL

CODE_00E023:
	JSR.w CODE_00DFC3
	PHY
	LDA.w $0091
	CLC
	ADC.w #$0010
	STA.w $0091
	JSL.l CODE_109295
	LDA.w $0093
	CLC
	ADC.w #$0010
	STA.w $0093
	JSL.l CODE_109295
	LDA.w $6000
	STA.w $0091
	JSL.l CODE_109295
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_00E04F:
	PHY
	LDA.w $6000
	STA.w $0091
	LDA.w $6002
	STA.w $0093
	LDA.w #$0000
	STA.w $008F
	JSL.l CODE_109295
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_00E068:
	PHY
	LDA.w $6000
	STA.w $0091
	LDA.w $6002
	STA.w $0093
	LDA.w #$0006
	STA.w $008F
	JSL.l CODE_109295
	PLY
	RTS

;---------------------------------------------------------------------------

DATA_00E081:
	dw $0000,$0000,$0000,$2A0D,$0000,$0000,$0000,$2A1C
	dw $0000,$0000,$0000,$2A2B,$0000,$0000,$0000,$2A3A
	dw $0000,$0000,$0000,$964C

CODE_00E0A9:
	PHY
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_00E081,x
	STA.b $95
	LDA.w $6000
	STA.b $91
	LDA.w $6002
	STA.b $93
	LDA.w #$0004
	STA.b $8F
	JSL.l CODE_109295
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_00E0CD:
	PHY
	LDX.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	JSL.l CODE_03BF87
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_00E0D7:
	LDA.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CMP.w #$000A
	BNE.b CODE_00E0E5
	PHY
	JSL.l CODE_04F1F6
	PLY
CODE_00E0E5:
	RTS

;---------------------------------------------------------------------------

CODE_00E0E6:
	LDA.w $0CCA
	BNE.b CODE_00E0F1
	PHY
	JSL.l CODE_04AC9C
	PLY
CODE_00E0F1:
	RTS

;---------------------------------------------------------------------------

CODE_00E0F2:
	PHY
	SEP.b #$10
	JSL.l CODE_03A853
	REP.b #$10
	PLY
	RTS

;---------------------------------------------------------------------------

DATA_00E0FD:
	dw $0080,$FF80

CODE_00E101:
	LDA.w $0CCA
	BNE.b CODE_00E125
	PHY
	LDA.w #!Define_YI_PlayerState28_TouchedLava
	JSL.l CODE_04F6E2
	LDA.w #$FB00
	STA.w $60AA
	LDX.w $60C4
	LDA.l DATA_00E0FD,x
	STA.w $60A8
	LDA.w #$0020
	STA.w $61F6
	PLY
CODE_00E125:
	RTS

;---------------------------------------------------------------------------

CODE_00E126:
	PHY
	LDA.w $6000
	STA.l $007972
	SEP.b #$10
	TAX
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr115_Coin
	BEQ.b CODE_00E144
	CMP.w #!Define_YI_NorSpr065_RedCoin
	BNE.b CODE_00E14A
	JSL.l CODE_0CEA92
	BRA.b CODE_00E14E

CODE_00E144:
	JSL.l CODE_04CA27
	BRA.b CODE_00E14E

CODE_00E14A:
	JSL.l CODE_0EB499
CODE_00E14E:
	REP.b #$10
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_00E152:
	PHB
	STZ.w !REGISTER_SuperFX_StatusFlagsLo
	LDY.w $012D
	STY.w !REGISTER_SuperFX_ScreenBase
	LDY.w $012E
	STY.w !REGISTER_SuperFX_ScreenMode
	STX.w !REGISTER_SuperFX_ProgramBankRegister
	STA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	LDA.w $011A
	BEQ.b CODE_00E170
	JMP.w CODE_00E225

CODE_00E170:
	PHK
	PLB
	REP.b #$10
	LDX.b $04
	LDY.b $06
	LDA.w #$000C
	STA.b $0C
CODE_00E17D:
	CPX.w #$01FE
	BCC.b CODE_00E188
	STZ.b $0E
	LDA.b !RAM_YI_Global_Layer2YPosLo
	BRA.b CODE_00E1EE

CODE_00E188:
	TYA
	LSR
	LSR
	STA.b $08
	CLC
	ADC.w #$0008
	CMP.w #$0020
	BCC.b CODE_00E199
	LDA.w #$0020
CODE_00E199:
	ASL
	STA.b $0A
	LDA.w DATA_00E9D4,x
	PHP
	BPL.b CODE_00E1A6
	EOR.w #$FFFF
	INC
CODE_00E1A6:
	CMP.w #$0100
	SEP.b #$20
	XBA
	LDA.b $0A
	BCS.b CODE_00E1C4
	STA.l !REGISTER_Multiplicand
	XBA
	STA.l !REGISTER_Multiplier
	NOP #3
	REP.b #$20
	LDA.l $004217
	BRA.b CODE_00E1C6

CODE_00E1C4:
	REP.b #$20
CODE_00E1C6:
	AND.w #$00FF
	LSR
	LSR
	LSR
	LSR
	PLP
	BPL.b CODE_00E1D4
	EOR.w #$FFFF
	INC
CODE_00E1D4:
	STA.b $0E
	CLC
	ADC.b $08
	AND.w #$00FF
	CMP.w #$0030
	LDA.b $0E
	BCC.b CODE_00E1EB
	LDA.b $08
	EOR.w #$FFFF
	ADC.w #$002F
CODE_00E1EB:
	CLC
	ADC.b !RAM_YI_Global_Layer2YPosLo
CODE_00E1EE:
	STA.w $7E55C6,y
CODE_00E1F0:
	LDA.b $0E
	STA.w $7E55C4,y
	PHX
	TXA
	CMP.w #$01FE
	BCC.b CODE_00E200
	LDA.w #$01FE
CODE_00E200:
	LSR
	AND.w #$00FC
	TAX
	LDA.w $7E54C2,x
	STA.w $7E53C2,y
	PLA
	SEC
	SBC.w #$0010
	AND.w #$07FE
	TAX
	INY
	INY
	INY
	INY
	DEC.b $0C
	BEQ.b CODE_00E21F
	JMP.w CODE_00E17D

CODE_00E21F:
	STX.b $04
	STY.b $06
	SEP.b #$10
CODE_00E225:
	PLB
	LDA.w #!SuperFX_StatusFlags_GoFlag
CODE_00E229:
	BIT.w !REGISTER_SuperFX_StatusFlagsLo
	BNE.b CODE_00E229
	LDY.b #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_4Colors|!SuperFX_ScreenMode_SNESasWRAMAccess|!SuperFX_ScreenMode_SNESasROMAccess
	STY.w !REGISTER_SuperFX_ScreenMode
	RTL

;---------------------------------------------------------------------------

DATA_00E234:
	dw $0064,$000A

DATA_00E238:
	dw $000A,$FFF6

DATA_00E23C:
	dw $012C,$0000

CODE_00E240:
	REP.b #$10
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	CMP.w #$03E8
	BCC.b CODE_00E25E
	LDA.w #$03E7
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	LDA.w !RAM_YI_Level_1upsCollectedInCurrentLevelLo
	CMP.w #$03E8
	BCC.b CODE_00E25E
	LDA.w #$03E7
	STA.w !RAM_YI_Level_1upsCollectedInCurrentLevelLo
CODE_00E25E:
	STZ.w $0389
	INC.w $03A9
	LDY.w #$0000
	LDA.w $0396
	BEQ.b CODE_00E2B5
	BPL.b CODE_00E270
	INY
	INY
CODE_00E270:
	LDA.w $0B57
	BNE.b CODE_00E27D
	LDA.w $03A9
	CMP.w #$0008
	BCC.b CODE_00E2B3
CODE_00E27D:
	LDA.w #!Define_YI_SoundID36_CollectFlower
	JSR.w CODE_00E372
	STZ.w $03A9
	LDA.w !RAM_YI_Level_StarTimerLo
	CLC
	ADC.w DATA_00E238,y
	BMI.b CODE_00E297
	STA.w !RAM_YI_Level_StarTimerLo
	CMP.w DATA_00E23C,y
	BCC.b CODE_00E2A3
CODE_00E297:
	LDA.w DATA_00E23C,y
	STA.w !RAM_YI_Level_StarTimerLo
	STZ.w $0396
	JMP.w CODE_00E32C

CODE_00E2A3:
	LDA.w $0396
	SEC
	SBC.w DATA_00E238,y
	STA.w $0396
	TYA
	BNE.b CODE_00E2B3
	INC.w $0389
CODE_00E2B3:
	BRA.b CODE_00E32C

CODE_00E2B5:
	LDA.w $0387
	BMI.b CODE_00E2CC
	BNE.b CODE_00E32C
	LDA.w $0B57
	ORA.w $0B65
	ORA.w $0B7B
	ORA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_00E2F5
	BRA.b CODE_00E32C

CODE_00E2CC:
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_MaxRegenStarTimerThreshold
	BCS.b CODE_00E32C
	INC.w $0394
	LDA.w $0394
	CMP.w #$000C
	BCC.b CODE_00E32C
	STZ.w $0394
	INC.w !RAM_YI_Level_StarTimerLo
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_PlayFinishRegenStarTimerSoundThreshold
	BNE.b CODE_00E32C
	LDA.w #!Define_YI_SoundID32_HitMessageBox
	JSR.w CODE_00E372
	BRA.b CODE_00E32C

CODE_00E2F5:
	STZ.w $0394
	LDA.w $0C8A
	BNE.b CODE_00E36F
	LDA.w !RAM_YI_Level_StarTimerLo
	BEQ.b CODE_00E36F
	INC.w $0392
	LDA.w $0392
	CMP.w #$0004
	BCC.b CODE_00E32C
	STZ.w $0392
	DEC.w !RAM_YI_Level_StarTimerLo
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_SingleDigitStarTimerThreshold
	BCS.b CODE_00E32C
	LDA.w !RAM_YI_Level_StarTimerBelow10Flag
	AND.w #$00FF
	BNE.b CODE_00E32C
	INC.w !RAM_YI_Level_StarTimerBelow10Flag
	LDA.w #!Define_YI_SoundID24
	JSR.w CODE_00E372
CODE_00E32C:
	LDX.w #$0000
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_HardMaxStarTimerThreshold+$01
	BCC.b CODE_00E33D
	LDA.w #!Define_YI_Level_HardMaxStarTimerThreshold
	STA.w !RAM_YI_Level_StarTimerLo
CODE_00E33D:
	LDY.w #$0000
CODE_00E340:
	CMP.w DATA_00E234,x
	BCC.b CODE_00E34B
	SBC.w DATA_00E234,x
	INY
	BRA.b CODE_00E340

CODE_00E34B:
	STY.b $00,x
	INX
	INX
	CPX.w #$0004
	BNE.b CODE_00E33D
	STA.b $00,x
	LDA.b $00
	STA.w $03A1
	LDA.b $02
	STA.w $03A3
	LDA.b $04
	STA.w $03A5
	BNE.b CODE_00E36F
	LDA.w $0392
	BNE.b CODE_00E36F
	INC.w $0389
CODE_00E36F:
	SEP.b #$10
	RTS

;---------------------------------------------------------------------------

CODE_00E372:
	PHX
	LDX.b !RAM_YI_Global_SoundQueueSizeLo
	STA.b !RAM_YI_Global_SoundQueue,x
	INC.b !RAM_YI_Global_SoundQueueSizeLo
	PLX
	RTS

;---------------------------------------------------------------------------

CODE_00E37B:
	PHB
	PHK
	PLB
	JSR.w CODE_00E3AA
	PLB
	RTL

DATA_00E383:
	dl $7E4002,DATA_008275,DATA_178008,DATA_01E8F2
	dl DATA_01B62D,DATA_01B976,DATA_178000,DATA_0FBC9E
	dl DATA_01B6C1,DATA_01E8FA,DATA_01E542,DATA_01E902
	dl DATA_10E1D2

CODE_00E3AA:
	REP.b #$10
	LDY.w $0127
	LDX.w DATA_00E383,y
	LDA.w DATA_00E383+$02,y
	JSR.w CODE_00E44A
	LDA.w $0127
	BNE.b CODE_00E3CA
	STA.l $7E4000
	STA.l $7E4001
	DEC
	STA.l $7E4003
CODE_00E3CA:
	STZ.w $0127
	RTS

;---------------------------------------------------------------------------

DATA_00E3CE:
	dl $7E4800,DATA_11B72A,DATA_11B744

CODE_00E3D7:
	PHB
	PHK
	PLB
	JSR.w CODE_00E3DF
	PLB
	RTL

CODE_00E3DF:
	REP.b #$10
	LDX.w $0129
	LDY.w DATA_00E3CE,x
	LDA.w DATA_00E3CE+$02,x
	PHB
	PHA
	PLB
	STA.b $00
	REP.b #$20
	LDA.w $0000,y
	STA.b $04
	CMP.w #$4802
	BEQ.b CODE_00E443
	INY
	INY
CODE_00E3FD:
	LDA.w $0000,y
	STA.l !REGISTER_VRAMAddressLo
	LDA.w $0004,y
	STA.l DMA[$00].Destination
	LDA.w $0006,y
	STA.l DMA[$00].SourceHi
	LDA.w $0008,y
	STA.l DMA[$00].SizeLo
	LDA.w $0002,y
	SEP.b #$20
	STA.l !REGISTER_VRAMAddressIncrementValue
	XBA
	STA.l DMA[$00].Parameters
	LDA.b #$01
	STA.l !REGISTER_DMAEnable
	REP.b #$20
	LDA.w $000A,y
	TAY
	CMP.b $04
	BNE.b CODE_00E3FD
	LDA.l $000129
	BNE.b CODE_00E443
	LDA.w #$4802
	STA.w $7E4800
CODE_00E443:
	PLB
	STZ.w $0129
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

CODE_00E44A:
	PHB
	PHA
	PLB
	STA.b $00
	REP.b #$20
CODE_00E451:
	LDY.w $0000,x
	BPL.b CODE_00E45A
	SEP.b #$30
	PLB
	RTS

CODE_00E45A:
	LDA.w $0002,x
	AND.w #$1FFF
	INC
	STA.b $01
	STA.b $03
	LDA.w #$0080
	BIT.w $0002,x
	BPL.b CODE_00E470
	LDA.w #$0081
CODE_00E470:
	STA.l !REGISTER_VRAMAddressIncrementValue
	STA.b $05
	TYA
	STA.l !REGISTER_VRAMAddressLo
	LDA.w $0002,x
	AND.w #$2000
	BEQ.b CODE_00E49F
	LDA.w #$0003
	STA.b $03
	LDA.w $0004,x
	STA.l DMA[$00].SourceLo
	LDA.w $0005,x
	STA.l DMA[$00].SourceHi
	LDA.l !REGISTER_ReadFromVRAMPortLo
	LDA.w #(!REGISTER_ReadFromVRAMPortLo&$0000FF<<8)+$81
	BRA.b CODE_00E4EB

CODE_00E49F:
	LDA.b $00
	STA.l DMA[$00].SourceBank
	LDY.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	BVC.b CODE_00E4E1
	LSR.b $01
	LDA.w #$0002
	STA.b $03
	LDA.w #(!REGISTER_WriteToVRAMPortHi&$0000FF<<8)+$08
	STA.l DMA[$00].Parameters
	TXA
	CLC
	ADC.w #$0005
	STA.l DMA[$00].SourceLo
	LDA.b $01
	STA.l DMA[$00].SizeLo
	LDA.w #$0100
	STA.l !REGISTER_VCountTimerHi
	LDA.b $05
	AND.w #$007F
	STA.l !REGISTER_VRAMAddressIncrementValue
	LDA.w $0000,x
	STA.l !REGISTER_VRAMAddressLo
	LDY.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$08
CODE_00E4E1:
	TXA
	CLC
	ADC.w #$0004
	STA.l DMA[$00].SourceLo
	TYA
CODE_00E4EB:
	STA.l DMA[$00].Parameters
	LDA.b $01
	STA.l DMA[$00].SizeLo
	LDA.w #$0100
	STA.l !REGISTER_VCountTimerHi
	TXA
	CLC
	ADC.w #$0004
	ADC.b $03
	TAX
	JMP.w CODE_00E451

;---------------------------------------------------------------------------

CODE_00E507:
	LDA.w !REGISTER_HVBlankFlagsAndJoypadStatus
	LSR
	BCS.b CODE_00E507
	REP.b #$30
	LDA.w !REGISTER_Joypad1Lo
	BIT.w #$000F
	BEQ.b CODE_00E51A
	LDA.w #$0000
CODE_00E51A:
	STA.w $093C
	TAY
	EOR.w $0944
	AND.w $093C
	STA.w $093E
	STY.w $0944
	LDA.w !REGISTER_Joypad2Lo
	BIT.w #$000F
	BEQ.b CODE_00E535
	LDA.w #$0000
CODE_00E535:
	STA.w $0940
	TAY
	EOR.w $0946
	AND.w $0940
	STA.w $0942
	STY.w $0946
	LDA.w $093C
	STA.b $35
	LDA.w $093E
	STA.b $37
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

DATA_00E552:
	dw $FFFF,$FFFF,$8000,$5555,$4000,$3333,$2AAA,$2492
	dw $2000,$1C71,$1999,$1745,$1555,$13B1,$1249,$1111
	dw $1000,$0F0F,$0E38,$0D79,$0CCC,$0C30,$0BA2,$0B21
	dw $0AAA,$0A3D,$09D8,$097B,$0924,$08D3,$0888,$0842
	dw $0800,$07C1,$0787,$0750,$071C,$06EB,$06BC,$0690
	dw $0666,$063E,$0618,$05F4,$05D1,$05B0,$0590,$0572
	dw $0555,$0539,$051E,$0505,$04EC,$04D4,$04BD,$04A7
	dw $0492,$047D,$0469,$0456,$0444,$0432,$0421,$0410
	dw $0400,$03F0,$03E0,$03D2,$03C3,$03B5,$03A8,$039B
	dw $038E,$0381,$0375,$0369,$035E,$0353,$0348,$033D
	dw $0333,$0329,$031F,$0315,$030C,$0303,$02FA,$02F1
	dw $02E8,$02E0,$02D8,$02D0,$02C8,$02C0,$02B9,$02B1
	dw $02AA,$02A3,$029C,$0295,$028F,$0288,$0282,$027C
	dw $0276,$0270,$026A,$0264,$025E,$0259,$0253,$024E
	dw $0249,$0243,$023E,$0239,$0234,$0230,$022B,$0226
	dw $0222,$021D,$0219,$0214,$0210,$020C,$0208,$0204
	dw $0200,$01FC,$01F8,$01F4,$01F0,$01EC,$01E9,$01E5
	dw $01E1,$01DE,$01DA,$01D7,$01D4,$01D0,$01CD,$01CA
	dw $01C7,$01C3,$01C0,$01BD,$01BA,$01B7,$01B4,$01B2
	dw $01AF,$01AC,$01A9,$01A6,$01A4,$01A1,$019E,$019C
	dw $0199,$0197,$0194,$0192,$018F,$018D,$018A,$0188
	dw $0186,$0183,$0181,$017F,$017D,$017A,$0178,$0176
	dw $0174,$0172,$0170,$016E,$016C,$016A,$0168,$0166
	dw $0164,$0162,$0160,$015E,$015C,$015A,$0158,$0157
	dw $0155,$0153,$0151,$0150,$014E,$014C,$014A,$0149
	dw $0147,$0146,$0144,$0142,$0141,$013F,$013E,$013C
	dw $013B,$0139,$0138,$0136,$0135,$0133,$0132,$0130
	dw $012F,$012E,$012C,$012B,$0129,$0128,$0127,$0125
	dw $0124,$0123,$0121,$0120,$011F,$011E,$011C,$011B
	dw $011A,$0119,$0118,$0116,$0115,$0114,$0113,$0112
	dw $0111,$010F,$010E,$010D,$010C,$010B,$010A,$0109
	dw $0108,$0107,$0106,$0105,$0104,$0103,$0102,$0101
	dw $0100,$00FF,$00FE,$00FD,$00FC,$00FB,$00FA,$00F9
	dw $00F8,$00F7,$00F6,$00F5,$00F4,$00F3,$00F2,$00F1
	dw $00F0,$00F0,$00EF,$00EE,$00ED,$00EC,$00EB,$00EA
	dw $00EA,$00E9,$00E8,$00E7,$00E6,$00E5,$00E5,$00E4
	dw $00E3,$00E2,$00E1,$00E1,$00E0,$00DF,$00DE,$00DE
	dw $00DD,$00DC,$00DB,$00DB,$00DA,$00D9,$00D9,$00D8
	dw $00D7,$00D6,$00D6,$00D5,$00D4,$00D4,$00D3,$00D2
	dw $00D2,$00D1,$00D0,$00D0,$00CF,$00CE,$00CE,$00CD
	dw $00CC,$00CC,$00CB,$00CA,$00CA,$00C9,$00C9,$00C8
	dw $00C7,$00C7,$00C6,$00C5,$00C5,$00C4,$00C4,$00C3
	dw $00C3,$00C2,$00C1,$00C1,$00C0,$00C0,$00BF,$00BF
	dw $00BE,$00BD,$00BD,$00BC,$00BC,$00BB,$00BB,$00BA
	dw $00BA,$00B9,$00B9,$00B8,$00B8,$00B7,$00B7,$00B6
	dw $00B6,$00B5,$00B5,$00B4,$00B4,$00B3,$00B3,$00B2
	dw $00B2,$00B1,$00B1,$00B0,$00B0,$00AF,$00AF,$00AE
	dw $00AE,$00AD,$00AD,$00AC,$00AC,$00AC,$00AB,$00AB
	dw $00AA,$00AA,$00A9,$00A9,$00A8,$00A8,$00A8,$00A7
	dw $00A7,$00A6,$00A6,$00A5,$00A5,$00A5,$00A4,$00A4
	dw $00A3,$00A3,$00A3,$00A2,$00A2,$00A1,$00A1,$00A1
	dw $00A0,$00A0,$009F,$009F,$009F,$009E,$009E,$009D
	dw $009D,$009D,$009C,$009C,$009C,$009B,$009B,$009A
	dw $009A,$009A,$0099,$0099,$0099,$0098,$0098,$0098
	dw $0097,$0097,$0097,$0096,$0096,$0095,$0095,$0095
	dw $0094,$0094,$0094,$0093,$0093,$0093,$0092,$0092
	dw $0092,$0091,$0091,$0091,$0090,$0090,$0090,$0090
	dw $008F,$008F,$008F,$008E,$008E,$008E,$008D,$008D
	dw $008D,$008C,$008C,$008C,$008C,$008B,$008B,$008B
	dw $008A,$008A,$008A,$0089,$0089,$0089,$0089,$0088
	dw $0088,$0088,$0087,$0087,$0087,$0087,$0086,$0086
	dw $0086,$0086,$0085,$0085,$0085,$0084,$0084,$0084
	dw $0084,$0083,$0083,$0083,$0083,$0082,$0082,$0082
	dw $0082,$0081,$0081,$0081,$0081,$0080,$0080,$0080
	dw $0080

DATA_00E954:
	dw $0100,$0100,$0100,$00FF,$00FF,$00FE,$00FD,$00FC
	dw $00FB,$00FA,$00F8,$00F7,$00F5,$00F3,$00F1,$00EF
	dw $00ED,$00EA,$00E7,$00E5,$00E2,$00DF,$00DC,$00D8
	dw $00D5,$00D1,$00CE,$00CA,$00C6,$00C2,$00BE,$00B9
	dw $00B5,$00B1,$00AC,$00A7,$00A2,$009D,$0098,$0093
	dw $008E,$0089,$0084,$007E,$0079,$0073,$006D,$0068
	dw $0062,$005C,$0056,$0050,$004A,$0044,$003E,$0038
	dw $0032,$002C,$0026,$001F,$0019,$0013,$000D,$0006

DATA_00E9D4:
	dw $0000,$FFFA,$FFF3,$FFED,$FFE7,$FFE1,$FFDA,$FFD4
	dw $FFCE,$FFC8,$FFC2,$FFBC,$FFB6,$FFB0,$FFAA,$FFA4
	dw $FF9E,$FF98,$FF93,$FF8D,$FF87,$FF82,$FF7C,$FF77
	dw $FF72,$FF6D,$FF68,$FF63,$FF5E,$FF59,$FF54,$FF4F
	dw $FF4B,$FF47,$FF42,$FF3E,$FF3A,$FF36,$FF32,$FF2F
	dw $FF2B,$FF28,$FF24,$FF21,$FF1E,$FF1B,$FF19,$FF16
	dw $FF13,$FF11,$FF0F,$FF0D,$FF0B,$FF09,$FF08,$FF06
	dw $FF05,$FF04,$FF03,$FF02,$FF01,$FF01,$FF00,$FF00
	dw $FF00,$FF00,$FF00,$FF01,$FF01,$FF02,$FF03,$FF04
	dw $FF05,$FF06,$FF08,$FF09,$FF0B,$FF0D,$FF0F,$FF11
	dw $FF13,$FF16,$FF19,$FF1B,$FF1E,$FF21,$FF24,$FF28
	dw $FF2B,$FF2F,$FF32,$FF36,$FF3A,$FF3E,$FF42,$FF47
	dw $FF4B,$FF4F,$FF54,$FF59,$FF5E,$FF63,$FF68,$FF6D
	dw $FF72,$FF77,$FF7C,$FF82,$FF87,$FF8D,$FF93,$FF98
	dw $FF9E,$FFA4,$FFAA,$FFB0,$FFB6,$FFBC,$FFC2,$FFC8
	dw $FFCE,$FFD4,$FFDA,$FFE1,$FFE7,$FFED,$FFF3,$FFFA
	dw $0000,$0006,$000D,$0013,$0019,$001F,$0026,$002C
	dw $0032,$0038,$003E,$0044,$004A,$0050,$0056,$005C
	dw $0062,$0068,$006D,$0073,$0079,$007E,$0084,$0089
	dw $008E,$0093,$0098,$009D,$00A2,$00A7,$00AC,$00B1
	dw $00B5,$00B9,$00BE,$00C2,$00C6,$00CA,$00CE,$00D1
	dw $00D5,$00D8,$00DC,$00DF,$00E2,$00E5,$00E7,$00EA
	dw $00ED,$00EF,$00F1,$00F3,$00F5,$00F7,$00F8,$00FA
	dw $00FB,$00FC,$00FD,$00FE,$00FF,$00FF,$0100,$0100
	dw $0100,$0100,$0100,$00FF,$00FF,$00FE,$00FD,$00FC
	dw $00FB,$00FA,$00F8,$00F7,$00F5,$00F3,$00F1,$00EF
	dw $00ED,$00EA,$00E7,$00E5,$00E2,$00DF,$00DC,$00D8
	dw $00D5,$00D1,$00CE,$00CA,$00C6,$00C2,$00BE,$00B9
	dw $00B5,$00B1,$00AC,$00A7,$00A2,$009D,$0098,$0093
	dw $008E,$0089,$0084,$007E,$0079,$0073,$006D,$0068
	dw $0062,$005C,$0056,$0050,$004A,$0044,$003E,$0038
	dw $0032,$002C,$0026,$001F,$0019,$0013,$000D,$0006

DATA_00EBD4:
	incbin "LevelData/DATA_00EBD4.bin"

DATA_00ECA1:
	incbin "LevelData/DATA_00ECA1.bin"

DATA_00EE40:
	incbin "LevelData/DATA_00EE40.bin"

DATA_00EFFE:
	incbin "LevelData/DATA_00EFFE.bin"

DATA_00F2C3:
	incbin "LevelData/DATA_00F2C3.bin"

DATA_00F40A:
	incbin "LevelData/DATA_00F40A.bin"

DATA_00F4EF:
	incbin "LevelData/DATA_00F4EF.bin"

DATA_00F50A:
	incbin "LevelData/DATA_00F50A.bin"

DATA_00F614:
	incbin "LevelData/DATA_00F614.bin"

DATA_00F625:
	incbin "LevelData/DATA_00F625.bin"

DATA_00F678:
	incbin "LevelData/DATA_00F678.bin"

DATA_00F6B3:
	incbin "LevelData/DATA_00F6B3.bin"

DATA_00F71E:
	incbin "LevelData/DATA_00F71E.bin"

DATA_00F750:
	incbin "LevelData/DATA_00F750.bin"

DATA_00F773:
	incbin "LevelData/DATA_00F773.bin"

DATA_00F77B:
	incbin "LevelData/DATA_00F77B.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($00F7A7, incbin, DATA_00F7A7_YI_U2.bin)
else
	%FREE_BYTES($00F7A7, 2041, $FF)
endif

UNK_00FFA0:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	db $95,$09,$27,$10,$03
else
	db $95,$07,$31,$11,$19
endif

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($00FFA5, incbin, DATA_00FFA5_YI_U2.bin)
else
	%FREE_BYTES($00FFA5, 11, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank01Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_018000:
	TYX
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0AE_HookbillTheKoopa_Init:
;$018002
	LDY.b $18,x
	TYX
	JSR.w (DATA_018015,x)
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $7E18
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

DATA_018015:
	dw CODE_018025
	dw CODE_018041
	dw CODE_018103
	dw CODE_018174
	dw CODE_0181A8
	dw CODE_0181B2
	dw CODE_0181C5
	dw CODE_018236

CODE_018025:
	LDX.b $12
CODE_018027:
	STZ.w $6098
	STZ.w !RAM_YI_Global_Layer3XPosLo
	STZ.w $60A0
	STZ.w !RAM_YI_Global_Layer3YPosLo
	LDA.w #$1304
	STA.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$24
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	JMP.w CODE_01819F

CODE_018041:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_018051
	LDA.w #$0004
	STA.w $7A96,x
	DEC.w $70E2,x
CODE_018051:
	REP.b #$10
	LDY.w #$0000
	LDA.w $7680,x
	SEC
	SBC.w #$0120
	EOR.w #$FFFF
	INC
	BPL.b CODE_018066
	LDA.w #$0000
CODE_018066:
	CMP.w #$00E0
	BCC.b CODE_0180B9
	LDY.w #$0100
	SBC.w #$00E0
	CMP.w #$00E0
	BCC.b CODE_0180B9
	PHY
	LDA.w #$2000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$2F6C
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	SEP.b #$10
	LDX.b #FXCODE_08AA7F>>16
	LDA.w #FXCODE_08AA7F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$7FFF
	STA.l $702F8C
	LDX.b #$1C
CODE_01809D:
	STA.l $70302E,x
	STA.l $70304E,x
	DEX
	DEX
	BPL.b CODE_01809D
	LDA.w #$0000
	STA.l $70336C
	JSR.w CODE_01819F
	REP.b #$10
	PLY
	LDA.w #$00E0
CODE_0180B9:
	STY.w $60A0
	STY.w !RAM_YI_Global_Layer3YPosLo
	STA.w $6098
	STA.w !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $14
	LSR
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0070
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	STZ.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$36BA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEP.b #$10
	LDX.b #FXCODE_089208>>16
	LDA.w #FXCODE_089208
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E51E4,$7036BA : dw $0348
	LDA.w #$0008
	TSB.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	RTS

CODE_018103:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_018131
	LDA.l $70336C
	CMP.w #$0020
	BCS.b CODE_018134
CODE_018113:
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.l YI_Global_PaletteMirror[$10].LowByte
	STA.w $0948
CODE_018131:
	LDX.b $12
	RTS

CODE_018134:
	LDA.w #$0008
	TRB.w !RAM_YI_Global_HDMAEnable
	LDA.w #$0002
	TRB.w !RAM_YI_Global_SubScreenLayers
	LDA.w #$0000
	STA.l $702F6E
	STA.l $702F70
	STA.l $702F72
	STA.l $70336C
	LDX.b #$1C
CODE_018155:
	LDA.l DATA_5FDABE+$02,x
	STA.l $70314E,x
	DEX
	DEX
	BPL.b CODE_018155
	LDA.l DATA_5FDABE
	STA.l $70314C
	JSR.w CODE_01819F
	LDA.w #$00D5
	JSL.l CODE_03A34C
	RTS

CODE_018174:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_018131
	LDA.l $70336C
	CMP.w #$0020
	BCC.b CODE_018113
	LDX.b $12
	JSL.l CODE_03D5E4
	STZ.w $0C14
	STZ.w $0C16
	LDA.w #$0004
	STA.w !RAM_YI_Level_LevelHeaderAnimationTilesetLo
	STZ.w !RAM_YI_Level_LevelHeaderAnimationPaletteLo
	STZ.w $0D2B
	STZ.w $0D3B
CODE_01819F:
	SEP.b #$10
	LDX.b $12
	INC.b $18,x
	INC.b $18,x
	RTS

CODE_0181A8:
	LDA.w #$004D
	REP.b #$10
	LDY.w #$2800
	BRA.b CODE_0181BA

CODE_0181B2:
	LDA.w #$004E
	REP.b #$10
	LDY.w #$2C00
CODE_0181BA:
	JSR.w CODE_01821D
	LDA.w #$0404
	TRB.w !RAM_YI_Global_MainScreenLayers
	BRA.b CODE_01819F

CODE_0181C5:
	JSL.l CODE_0181FB
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #$00DD
	JSL.l CODE_03A364
	LDA.w #$0042
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0074
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STZ.w $105A
	INC.w $0B7B
	LDA.w #$0048
	JSL.l CODE_03A34C
	LDA.w #$0010
	STA.w $70E2,y
	JSL.l CODE_04F74A
	BRA.b CODE_01819F

CODE_0181FB:
	REP.b #$10
	LDA.w #$00F8
	LDY.w #$3400
	JSR.w CODE_01821D
	LDX.b #$0C
CODE_018208:
	LDA.l DATA_5FC13A,x
	STA.l $702D7E,x
	STA.l YI_Global_PaletteMirror[$09].LowByte,x
	STA.l $702F7E,x
	DEX
	DEX
	BPL.b CODE_018208
	RTL

CODE_01821D:
	PHY
	LDX.w #$6800
	JSL.l CODE_00B756
	PLY
	LDX.w #$706800>>16
	STX.w $0001
	LDX.w #$706800
	JSL.l CODE_00BEA6
	SEP.b #$10
CODE_018235:
	RTS

CODE_018236:
	LDX.b $12
	STZ.w $60C4
	LDY.w $105A
	BEQ.b CODE_018235
	STZ.w $7ECC
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0120
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7182,x
	STZ.w $0C1E
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $7E18
	CLC
	ADC.w #$0100
	STA.w $1082
	STA.w $7E1A
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	STA.w $106E
	XBA
	STA.w $74A2,x
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $1080
	STZ.w $60A0
	LDA.w #$0015
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
	LDY.b #$2B
	STY.b $76,x
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_018297:
	db $02,$DF,$14,$B9,$06,$00,$B4,$0E,$D8,$09,$00,$FF,$20,$DF,$07,$00
	db $90,$16,$7A,$0C,$01,$9B,$15,$BC,$07,$00,$EA,$1A,$D3,$08,$00,$F3
	db $06,$00,$00,$02,$E5,$17,$B9,$06,$00,$A4,$0C,$D9,$08,$00,$FD,$1F
	db $E2,$07,$00,$8A,$15,$79,$0C,$01,$A0,$13,$B9,$07,$00,$EC,$14,$D7
	db $08,$00,$02,$06,$00,$00,$02,$E8,$1A,$BC,$06,$01,$A2,$0C,$B0,$08
	db $00,$FC,$1E,$E1,$07,$00,$85,$14,$7B,$0D,$01,$A6,$10,$BD,$07,$02
	db $F0,$14,$B6,$06,$00,$0C,$06,$00,$00,$02,$EC,$1D,$BA,$06,$02,$A4
	db $0C,$AD,$06,$00,$FC,$1D,$DD,$07,$00,$89,$17,$7A,$0C,$01,$B0,$0E
	db $B9,$07,$01,$EF,$14,$AF,$09,$00,$02,$06,$00,$00,$00,$EC,$1D,$D5
	db $07,$01,$9F,$13,$B8,$07,$00,$FB,$1C,$E1,$07,$00,$8E,$17,$7A,$0C
	db $00,$AE,$0E,$D4,$08,$02,$DE,$12,$BB,$06,$00,$F3,$06,$00,$00,$00
	db $EF,$18,$D0,$07,$01,$A5,$11,$BC,$07,$00,$FC,$1D,$E3,$07,$00,$89
	db $17,$79,$0C,$01,$9E,$0E,$CC,$07,$02,$E1,$15,$B4,$05,$00,$02,$06
	db $00,$00,$02,$F2,$17,$BA,$06,$01,$AF,$0E,$B9,$07,$00,$FC,$1E,$DE
	db $07,$00,$84,$15,$79,$0C,$01,$9C,$0B,$BC,$07,$02,$E6,$18,$BA,$06
	db $00,$0C,$06,$00,$00,$01,$F0,$18,$A8,$08,$01,$B9,$0D,$BC,$07,$00
	db $FD,$1F,$DF,$07,$00,$8A,$15,$79,$0C,$02,$9D,$0E,$AF,$08,$02,$EA
	db $1B,$B7,$06,$00,$02,$06,$00,$00,$02,$AD,$0E,$BA,$07,$03,$63,$0F
	db $B2,$06,$00,$E2,$0F,$DF,$08,$00,$57,$1C,$78,$0C,$05,$76,$14,$A6
	db $09,$00,$C9,$0E,$D5,$07,$00,$24,$07,$00,$00,$02,$B9,$0D,$BA,$07
	db $04,$64,$0E,$AA,$08,$00,$E1,$10,$E0,$08,$00,$53,$1D,$78,$0C,$04
	db $73,$13,$A9,$08,$00,$BC,$0A,$D2,$07,$00,$27,$09,$00,$00,$02,$C5
	db $0D,$B7,$07,$04,$6D,$0F,$AB,$08,$00,$E4,$11,$E0,$09,$00,$50,$1E
	db $78,$0C,$04,$70,$11,$AA,$08,$02,$BC,$07,$BC,$07,$00,$2A,$0B,$00
	db $00,$02,$D1,$0E,$BB,$07,$05,$6D,$0F,$A5,$0A,$00,$E6,$12,$E1,$08
	db $00,$53,$1D,$7A,$0C,$03,$6F,$13,$BB,$07,$01,$B9,$04,$AA,$09,$00
	db $27,$09,$00,$00,$00,$D0,$0F,$D4,$07,$05,$70,$10,$A6,$0A,$00,$E8
	db $12,$E1,$08,$00,$57,$1C,$7A,$0C,$03,$6A,$11,$B8,$07,$02,$A8,$10
	db $B9,$07,$00,$24,$07,$00,$00,$00,$CA,$0A,$D4,$07,$04,$70,$10,$AB
	db $08,$00,$E6,$12,$DF,$08,$00,$53,$1D,$79,$0C,$04,$6C,$10,$AA,$08
	db $02,$B2,$0E,$BB,$07,$00,$27,$09,$00,$00,$02,$CE,$07,$B9,$07,$04
	db $6B,$0F,$AB,$08,$00,$E4,$11,$E1,$08,$00,$4F,$1E,$78,$0C,$04,$70
	db $11,$A8,$08,$02,$BC,$0D,$BB,$07,$00,$2A,$0B,$00,$00,$01,$DD,$05
	db $A6,$0A,$03,$6B,$0F,$B2,$06,$00,$E1,$10,$E1,$08,$00,$53,$1D,$79
	db $0C,$05,$72,$12,$A8,$09,$02,$CB,$0D,$BC,$07,$00,$27,$09,$00,$00
	db $01,$C7,$10,$A5,$0A,$05,$B8,$0A,$A6,$0A,$00,$F4,$1C,$D7,$07,$00
	db $6E,$15,$78,$0C,$03,$81,$0F,$B3,$06,$00,$E9,$1B,$D2,$07,$00,$13
	db $07,$00,$00,$02,$CE,$12,$B8,$07,$04,$A5,$0A,$AD,$08,$00,$F2,$1B
	db $D6,$07,$00,$6D,$15,$7A,$0C,$04,$87,$0C,$AC,$08,$00,$E8,$12,$D3
	db $07,$00,$14,$09,$00,$00,$02,$DD,$16,$BA,$07,$04,$98,$09,$AC,$08
	db $00,$EF,$19,$D9,$07,$00,$69,$14,$7A,$0C,$04,$92,$0B,$A9,$08,$02
	db $E0,$10,$BA,$07,$00,$13,$0B,$00,$00,$00,$E1,$19,$D0,$08,$03,$89
	db $0C,$B5,$06,$00,$ED,$17,$D7,$07,$00,$65,$14,$78,$0C,$05,$A3,$09
	db $A8,$0A,$01,$D8,$0E,$A4,$0A,$00,$13,$0D,$00,$00,$00,$ED,$1D,$D1
	db $08,$03,$92,$0F,$B5,$06,$00,$EF,$15,$D6,$07,$00,$6F,$15,$78,$0C
	db $05,$AD,$0B,$A5,$0A,$01,$C0,$10,$A7,$0A,$00,$13,$07,$00,$00,$00
	db $EC,$14,$D1,$08,$04,$89,$09,$A8,$08,$00,$ED,$17,$DA,$07,$00,$6B
	db $15,$79,$0C,$04,$9D,$0C,$AA,$08,$02,$C8,$11,$BD,$07,$00,$14,$09
	db $00,$00,$02,$E9,$10,$BA,$07,$04,$98,$09,$AB,$08,$00,$F0,$19,$D6
	db $07,$00,$68,$14,$79,$0C,$04,$93,$0B,$A9,$08,$02,$D7,$14,$BD,$07
	db $00,$13,$0B,$00,$00,$01,$DE,$10,$A4,$0A,$05,$B1,$07,$A7,$0A,$00
	db $F2,$1B,$D7,$07,$00,$66,$14,$7A,$0C,$03,$88,$0F,$B3,$06,$00,$DC
	db $17,$D1,$07,$00,$13,$0D,$00,$00,$02,$C0,$0C,$00,$00,$05,$60,$08
	db $00,$00,$00,$80,$08,$00,$00,$00,$00,$00,$00,$00,$05,$60,$08,$00
	db $00,$02,$C0,$0C,$00,$00,$00,$00,$00,$00,$00,$02,$00,$00,$00,$00
	db $05,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$05,$00,$00,$05
	db $00,$00,$00,$00,$02,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$F2
	db $24,$00,$00,$05,$8C,$24,$00,$00,$00,$0C,$22,$00,$00,$00,$84,$2B
	db $00,$00,$05,$86,$15,$00,$00,$02,$01,$22,$00,$00,$00,$00,$00,$00
	db $00,$02,$FC,$22,$00,$00,$05,$8B,$1E,$00,$00,$00,$04,$1B,$00,$00
	db $00,$83,$28,$00,$00,$05,$87,$24,$00,$00,$02,$01,$21,$00,$00,$00
	db $00,$00,$00,$00,$02,$06,$22,$00,$00,$05,$8A,$23,$00,$00,$00,$14
	db $22,$00,$00,$00,$82,$27,$00,$00,$05,$84,$20,$00,$00,$02,$0F,$1D
	db $00,$00,$00,$00,$00,$00,$00,$02,$BD,$1F,$B9,$04,$05,$64,$1F,$43
	db $05,$00,$CE,$20,$B4,$00,$00,$53,$28,$2A,$06,$05,$5A,$21,$50,$09
	db $01,$9A,$20,$C6,$03,$00,$00,$00,$00,$00,$02,$BD,$1F,$A8,$04,$05
	db $64,$1F,$9D,$05,$00,$CE,$20,$01,$04,$00,$53,$28,$1A,$08,$05,$5A
	db $21,$BF,$09,$01,$9A,$20,$BF,$06,$00,$00,$00,$00,$00,$02,$AF,$23
	db $9A,$04,$05,$54,$20,$37,$05,$00,$C3,$1D,$D2,$04,$00,$40,$28,$3E
	db $02,$05,$4C,$22,$4E,$07,$01,$9B,$23,$64,$07,$00,$00,$00,$00,$00
	db $02,$AF,$23,$6B,$03,$05,$54,$20,$90,$08,$00,$C3,$1D,$99,$04,$00
	db $40,$28,$F7,$04,$05,$4C,$22,$93,$08,$01,$9B,$23,$60,$0A,$00,$00
	db $00,$00,$00,$02,$75,$23,$4F,$04,$05,$0D,$1D,$17,$06,$00,$7B,$22
	db $98,$04,$00,$0A,$22,$07,$03,$05,$11,$20,$1B,$08,$02,$6B,$1C,$50
	db $0B,$00,$00,$00,$00,$00,$02,$75,$23,$A9,$04,$05,$0D,$1D,$EC,$0A
	db $00,$7B,$22,$C0,$0A,$00,$0A,$22,$EB,$08,$05,$11,$20,$F0,$08,$02
	db $6B,$1C,$AB,$0A,$00,$00,$00,$00,$00,$02,$5F,$1B,$29,$08,$05,$F6
	db $23,$F7,$04,$00,$65,$1A,$73,$07,$00,$EF,$21,$16,$07,$05,$F5,$25
	db $35,$07,$02,$4E,$1A,$3E,$04,$00,$00,$00,$00,$00,$02,$67,$1D,$3B
	db $04,$05,$16,$1D,$3C,$07,$00,$77,$1D,$5F,$04,$00,$16,$25,$5D,$04
	db $05,$12,$1E,$3C,$07,$02,$58,$1D,$74,$04,$00,$00,$00,$00,$00,$02
	db $00,$00,$00,$00,$05,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$05,$00,$00,$00,$00,$02,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$02,$C0,$0C,$00,$00,$05,$60,$08,$00,$00,$00,$80,$08,$00
	db $00,$00,$00,$00,$00,$00,$05,$60,$08,$00,$00,$02,$C0,$0C,$00,$00
	db $00,$00,$00,$00,$00,$02,$80,$08,$00,$00,$05,$80,$08,$00,$00,$00
	db $00,$00,$00,$00,$00,$80,$08,$00,$00,$05,$80,$08,$00,$00,$02,$80
	db $08,$00,$00,$00,$00,$00,$00,$00,$02,$DF,$14,$B9,$06,$00,$B4,$0E
	db $D8,$09,$00,$F2,$20,$DF,$07,$00,$A0,$16,$7A,$0C,$01,$9B,$15,$BC
	db $07,$00,$EA,$1A,$D3,$08,$00,$E0,$08,$00,$00,$02,$E5,$17,$B9,$06
	db $00,$A4,$0C,$D9,$08,$00,$F0,$1F,$E2,$07,$00,$9A,$15,$79,$0C,$01
	db $A0,$13,$B9,$07,$00,$EC,$14,$D7,$08,$00,$EF,$08,$00,$00,$02,$E8
	db $1A,$BC,$06,$01,$A2,$0C,$B0,$08,$00,$EF,$1E,$E1,$07,$00,$95,$14
	db $7B,$0D,$01,$A6,$10,$BD,$07,$02,$F0,$14,$B6,$06,$00,$F9,$08,$00
	db $00,$02,$EC,$1D,$BA,$06,$02,$A4,$0C,$AD,$06,$00,$EF,$1D,$DD,$07
	db $00,$99,$17,$7A,$0C,$01,$B0,$0E,$B9,$07,$01,$EF,$14,$AF,$09,$00
	db $EF,$08,$00,$00,$00,$EC,$1D,$D5,$07,$01,$9F,$13,$B8,$07,$00,$EE
	db $1C,$E1,$07,$00,$9E,$17,$7A,$0C,$00,$AE,$0E,$D4,$08,$02,$DE,$12
	db $BB,$06,$00,$E0,$08,$00,$00,$00,$EF,$18,$D0,$07,$01,$A5,$11,$BC
	db $07,$00,$EF,$1D,$E3,$07,$00,$99,$17,$79,$0C,$01,$9E,$0E,$CC,$07
	db $02,$E1,$15,$B4,$05,$00,$EF,$08,$00,$00,$02,$F2,$17,$BA,$06,$01
	db $AF,$0E,$B9,$07,$00,$EF,$1E,$DE,$07,$00,$94,$15,$79,$0C,$01,$9C
	db $0B,$BC,$07,$02,$E6,$18,$BA,$06,$00,$F9,$08,$00,$00,$01,$F0,$18
	db $A8,$08,$01,$B9,$0D,$BC,$07,$00,$F0,$1F,$DF,$07,$00,$9A,$15,$79
	db $0C,$02,$9D,$0E,$AF,$08,$02,$EA,$1B,$B7,$06,$00,$EF,$08,$00,$00

DATA_018927:
	db $00,$00,$00,$00,$F6,$00,$00,$00,$00,$D5,$00,$00,$00,$00,$EC,$C0
	db $40,$C0,$20,$00,$95,$15,$95,$20,$D5,$60,$F0,$40,$E0,$00,$70,$E0
	db $00,$10,$00,$60,$D0,$40,$E8,$0C,$00,$A0,$00,$C0,$C8,$FC,$E0,$10
	db $C0,$C4,$00,$A0,$00,$B0,$B0,$F0,$C0,$10,$B0,$A8,$AC,$5C,$AC,$7C
	db $7C,$E4,$54,$C4,$64,$84,$78,$50,$70,$88,$70,$88,$80,$80,$98,$80
	db $40,$C0,$40,$A0,$80,$30,$B0,$30,$90,$70,$C0,$40,$A0,$60,$00,$00
	db $00,$00,$00,$E0,$00,$00,$00,$00,$20,$40,$C0,$40,$D0,$80,$00,$00
	db $00,$00,$80,$00,$00,$00,$10,$F6,$00,$00,$04,$10,$F6

;---------------------------------------------------------------------------

DATA_0189A4:
	dw CODE_019312
	dw CODE_019367
	dw CODE_019400
	dw CODE_019417
	dw CODE_019428
	dw CODE_019439
	dw CODE_019459
	dw CODE_019428
	dw CODE_01946A
	dw CODE_019473
	dw CODE_01946A
	dw CODE_019494
	dw CODE_019529
	dw CODE_019540
	dw CODE_019563
	dw CODE_0196AE
	dw CODE_0196EC
	dw CODE_019709
	dw CODE_01973D
	dw CODE_019772
	dw CODE_019780
	dw CODE_0197B8
	dw CODE_0197C9
	dw CODE_0197E3
	dw CODE_01981D
	dw CODE_01983D
	dw CODE_01983D
	dw CODE_019876
	dw CODE_019898
	dw CODE_0198A6
	dw CODE_0198E8
	dw CODE_019903
	dw CODE_019931
	dw CODE_01994A
	dw CODE_019991
	dw CODE_0199AE
	dw CODE_0199FB
	dw CODE_019A31
	dw CODE_019A92
	dw CODE_019B23
	dw CODE_019BA4
	dw CODE_019BF9
	dw CODE_019C51
	dw CODE_019CC9
	dw CODE_019CF7
	dw CODE_019D0F
	dw CODE_019DE7
	dw CODE_019EB6
	dw CODE_019F57
	dw CODE_019F7A
	dw CODE_019BA4
	dw CODE_019BF9
	dw CODE_019FE5
	dw CODE_01A099
	dw CODE_01A1DC
	dw CODE_01A226

YI_NorSpr0AE_HookbillTheKoopa_Main:
;$018A14
	LDY.w $1080
	BEQ.b CODE_018A24
	DEY
	BNE.b CODE_018A29
	JSR.w CODE_018D1C
	JSR.w CODE_018A50
	BRA.b CODE_018A2C

CODE_018A24:
	JSR.w CODE_018CD8
	BRA.b CODE_018A2C

CODE_018A29:
	JSR.w CODE_018CC7
CODE_018A2C:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0189A4,x)
	LDY.w $1080
	BEQ.b CODE_018A4F
	DEY
	BNE.b CODE_018A4F
	JSR.w CODE_0191BB
	JSR.w CODE_01922A
	JSR.w CODE_018A95
	JSR.w CODE_01924D
	JSR.w CODE_0192DA
CODE_018A4F:
	RTL

;---------------------------------------------------------------------------

CODE_018A50:
	LDA.w $1060
	ASL
	LDY.w $7400,x
	BEQ.b CODE_018A60
	EOR.w #$FFFF
	INC
	AND.w #$01FE
CODE_018A60:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1076
	ASL
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $1078
	ASL
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08A000>>16
	LDA.w #FXCODE_08A000
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w !RAM_YI_Global_Mode7MatrixParameterBLo
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	STA.w !RAM_YI_Global_Mode7MatrixParameterALo
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.w !RAM_YI_Global_Mode7MatrixParameterCLo
	LDA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !RAM_YI_Global_Mode7MatrixParameterDLo
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

CODE_018A95:
	LDY.w $1070
	BEQ.b CODE_018AB5
	LDA.w $7974
	AND.w #$0001
	BEQ.b CODE_018AAA
	JSR.w CODE_018AC9
	JSR.w CODE_018AE1
	BRA.b CODE_018AB0

CODE_018AAA:
	JSR.w CODE_018AB6
	JSR.w CODE_018B15
CODE_018AB0:
	INC.w $0CF9
	LDX.b $12
CODE_018AB5:
	RTS

;---------------------------------------------------------------------------

CODE_018AB6:
	LDA.w #FXDATA_548000+$60E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b #(FXDATA_548000+$60E1)>>16
	LDA.w #$0060
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1062
	BRA.b CODE_018AF5

CODE_018AC9:
	LDA.w #FXDATA_548000+$6081
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b #(FXDATA_548000+$6081)>>16
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1064
	BRA.b CODE_018AF5

DATA_018AD9:
	dw FXDATA_548000+$60C1,FXDATA_548000+$40C1,FXDATA_548000+$4081,FXDATA_548000+$40A1

CODE_018AE1:
	LDY.w $1074
	LDA.w DATA_018AD9,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b #(FXDATA_548000+$4081)>>16
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1068
CODE_018AF5:
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	TYA
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $1076
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $1078
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	RTS

;---------------------------------------------------------------------------

CODE_018B15:
	LDA.w #FXDATA_548000+$60A1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$60A1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $1066
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $1076
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $1078
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08855F>>16
	LDA.w #FXCODE_08855F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	RTS

;---------------------------------------------------------------------------

DATA_018B46:
	db $FC,$FC,$20,$0D,$00,$0C,$0C,$1E,$0D,$00,$FC,$04,$0C,$0D,$02,$04
	db $FC,$0E,$0D,$02,$FC,$FC,$3A,$0D,$00,$0C,$0C,$1A,$0D,$00,$FC,$04
	db $08,$0D,$02,$04,$FC,$0A,$0D,$02,$F8,$F8,$C0,$0D,$02,$08,$F8,$C2
	db $0D,$02,$F8,$08,$E0,$0D,$02,$08,$08,$E2,$0D,$02

DATA_018B82:
	db $FC,$0C,$35,$0D,$00,$04,$04,$26,$0D,$02,$FC,$FC,$24,$0D,$02,$FC
	db $FC,$24,$0D,$00,$04,$FC,$22,$0D,$02,$FC,$0C,$2C,$0D,$00,$04,$04
	db $20,$0D,$02,$04,$04,$20,$0D,$00,$0C,$0C,$21,$0D,$00,$FC,$04,$28
	db $0D,$02,$04,$FC,$2A,$0D,$02,$04,$FC,$2A,$0D,$00,$FC,$04,$00,$0D
	db $02,$0C,$0C,$12,$0D,$00,$04,$FC,$02,$0D,$02,$04,$FC,$02,$0D,$00
	db $0C,$0C,$16,$0D,$00,$FC,$04,$04,$0D,$02,$04,$FC,$06,$0D,$02,$04
	db $FC,$06,$0D,$00,$F8,$F8,$CC,$0D,$02,$08,$F8,$CE,$0D,$02,$F8,$08
	db $EC,$0D,$02,$08,$08,$EE,$0D,$02

DATA_018BFA:
	db $00,$00,$D5,$0D,$02

DATA_018BFF:
	db $F8,$F8,$C8,$0D,$02,$08,$F8,$CA,$0D,$02,$F8,$08,$E8,$0D,$02,$08
	db $08,$EA,$0D,$02

DATA_018C13:
	db $FC,$0C,$35,$0F,$00,$04,$04,$26,$0F,$02,$FC,$FC,$24,$0F,$02,$FC
	db $FC,$24,$0F,$00,$04,$FC,$22,$0F,$02,$FC,$0C,$2C,$0F,$00,$04,$04
	db $20,$0F,$02,$04,$04,$20,$0F,$00,$0C,$0C,$21,$0F,$00,$FC,$04,$28
	db $0F,$02,$04,$FC,$2A,$0F,$02,$04,$FC,$2A,$0F,$00,$FC,$04,$00,$0F
	db $02,$0C,$0C,$12,$0F,$00,$04,$FC,$02,$0F,$02,$04,$FC,$02,$0F,$00
	db $0C,$0C,$16,$0F,$00,$FC,$04,$04,$0F,$02,$04,$FC,$06,$0F,$02,$04
	db $FC,$06,$0F,$00,$F8,$F8,$CC,$0F,$02,$08,$F8,$CE,$0F,$02,$F8,$08
	db $EC,$0F,$02,$08,$08,$EE,$0F,$02

DATA_018C8B:
	db $FC,$FC,$20,$0F,$00,$0C,$0C,$1E,$0F,$00,$FC,$04,$0C,$0F,$02,$04
	db $FC,$0E,$0F,$02,$FC,$FC,$3A,$0F,$00,$0C,$0C,$1A,$0F,$00,$FC,$04
	db $08,$0F,$02,$04,$FC,$0A,$0F,$02,$F8,$F8,$C0,$0F,$02,$08,$F8,$C2
	db $0F,$02,$F8,$08,$E0,$0F,$02,$08,$08,$E2,$0F,$02

;---------------------------------------------------------------------------

CODE_018CC7:
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6024,y
	AND.w #$FFF0
	ORA.w #$0004
	STA.w $6024,y
CODE_018CD8:
	REP.b #$10
	LDA.w #$0006
	STA.b $00
	LDY.w $7362,x
	LDA.w $1015
	CMP.w #$0002
	BEQ.b CODE_018D03
CODE_018CEA:
	LDA.w $6004,y
	AND.w #$F1FF
	ORA.w #$0200
	STA.w $6004,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_018CEA
	SEP.b #$10
	RTS

CODE_018D03:
	LDA.w $6004,y
	AND.w #$F1FF
	ORA.w #$0C00
	STA.w $6004,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_018D03
	SEP.b #$10
	RTS

;---------------------------------------------------------------------------

CODE_018D1C:
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_018B46>>16
	STA.w $6000
	LDA.w $7402,x
	STA.w $6002
	LDY.b $78,x
	TYA
	STA.w $6004
	LDA.w $7A36,x
	STA.w $6006
	LDA.w $7A38,x
	STA.w $6008
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $600A
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w $600E
	LDA.w $7682,x
	CLC
	ADC.w #$0008
	STA.w $6010
	LDA.w #DATA_018B46
	STA.w $6012
	LDA.w #DATA_018B82
	STA.w $6014
	LDA.w #DATA_018BFA
	STA.w $6016
	LDA.w #DATA_018BFF
	STA.w $6018
	LDA.w #DATA_018C13
	STA.w $601A
	LDA.w #DATA_018C8B
	STA.w $601C
	LDA.w #DATA_018297
	STA.w $601E
	LDA.w $106A
	STA.w $6026
	LDA.w $106C
	STA.w $6028
	LDA.w $105C
	STA.w $602A
	LDA.w $105E
	STA.w $602C
	LDA.w #DATA_018927
	STA.w $602E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $6030
	LDA.w $106E
	STA.w $6032
	LDA.w $107A
	STA.w $6046
	LDA.w $1076
	STA.w $6050
	LDA.w $1078
	STA.w $6052
	LDX.b #FXCODE_08A3BA>>16
	LDA.w #FXCODE_08A3BA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $6026
	STA.w $106A
	LDA.w $6028
	STA.w $106C
	LDA.w $6034
	STA.w $1064
	LDA.w $6036
	STA.w $1062
	LDA.w $6038
	STA.w $1066
	LDA.w $603A
	STA.w $1068
	LDA.w $603C
	STA.w $1060
	JSR.w CODE_01909B
	LDY.w $1072
	BNE.b CODE_018E25
	LDA.w $7720,x
	STA.b $00
	LDA.w $603E
	SEC
	SBC.w $7682,x
	CLC
	ADC.w #$FFFB
	STA.w $7720,x
	SEC
	SBC.b $00
	STA.b $00
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCC.b CODE_018E25
	LDA.w $7182,x
	SEC
	SBC.b $00
	STA.w $7182,x
CODE_018E25:
	LDA.w $6022
	STA.b $0A
	LDA.w $6024
	STA.b $0C
	LDA.w $7680,x
	CLC
	ADC.w #$0060
	CMP.w #$01C0
	BCC.b CODE_018E43
	LDA.w #$0160
	STA.w !RAM_YI_Global_Layer3XPosLo
	BRA.b CODE_018E55

CODE_018E43:
	LDA.w #$0020
	SEC
	SBC.b $0A
	STA.w !RAM_YI_Global_Layer3XPosLo
	LDA.w #$001C
	SEC
	SBC.b $0C
	STA.w !RAM_YI_Global_Layer3YPosLo
CODE_018E55:
	LDA.b $0A
	SEC
	SBC.w $7680,x
	STA.w $7B56,x
	LDA.b $0C
	SEC
	SBC.w $7682,x
	STA.w $7B58,x
	LDA.w #$0011
	STA.w $0B83
	LDA.w $106E
	AND.w #$FF00
	BEQ.b CODE_018E78
	STZ.w $106E
CODE_018E78:
	LDY.b $76,x
	CPY.b #$33
	BMI.b CODE_018E8B
	LDA.w $6058
	SEC
	SBC.w $6056
	SEC
	SBC.w $6122
	BRA.b CODE_018EBE

CODE_018E8B:
	LDA.w $605A
	BIT.w #$0001
	BEQ.b CODE_018E94
CODE_018E93:
	RTS

CODE_018E94:
	CMP.w #$0008
	BNE.b CODE_018E9E
	LDA.w $6058
	BPL.b CODE_018EA1
CODE_018E9E:
	JMP.w CODE_018F72

CODE_018EA1:
	SEC
	SBC.w $6056
	SEC
	SBC.w $6122
	CMP.w #$FFF4
	BCC.b CODE_018E9E
	LDY.w $60AB
	BMI.b CODE_018E93
	LDY.w $7402,x
	CPY.b #$28
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	BPL.b +
	CPY.b #$21
	BPL.b CODE_018EBE
+:
	JMP.w CODE_018F38
CODE_018EBE:
else
	BPL.b CODE_018F38
	CPY.b #$21
	BMI.b CODE_018F38
CODE_018EBE:
endif
	CLC
	ADC.w #$0003
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	STZ.w $60C0
	INC.w $61B4
	LDY.b $76,x
	CPY.b #$29
	BEQ.b CODE_018EE0
	CPY.b #$2A
	BEQ.b CODE_018EE0
	CPY.b #$33
	BMI.b CODE_018EE7
CODE_018EE0:
	LDA.w #$0029
	STA.w $60BE
	RTS

CODE_018EE7:
	LDY.w $60D4
	BEQ.b CODE_018F37
	LDY.w $107E
	CPY.w $107C
	BNE.b CODE_018F37
	LDA.w #$0060
	STA.w $7AF6,x
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	STZ.w $60A8
	STZ.w $60B4
endif
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0029
	INC.w $107C
	INC.w $107C
	LDY.w $107C
	CPY.b #$06
	BNE.b CODE_018F1A
	JSL.l CODE_02A982
	INC.w $0B7B
	LDA.w #$0033
CODE_018F1A:
	STA.b $76,x
	LDA.w #$0001
	STA.w $7A36,x
	LDY.b #$24
	STY.b $78,x
	LDY.b #$0F
	STY.w $105E
	LDA.w #$0030
	STA.b $18,x
	LDA.w #!Define_YI_SoundID80_BossDefeated
	JSL.l CODE_0085D2
CODE_018F37:
	RTS

CODE_018F38:
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDY.b $76,x
	CPY.b #$0A
	BMI.b CODE_018F5B
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w $60D4
	RTS

CODE_018F5B:
	JSR.w CODE_018FE3
	LDA.w $7402,x
	AND.w #$0007
	CLC
	ADC.w #$0028
	STA.b $78,x
	LDY.b #$05
	STY.b $76,x
	LDY.b #$18
	BRA.b CODE_018FBD

CODE_018F72:
	CMP.w #$0006
	BNE.b CODE_018F7C
	LDA.w $6058
	BPL.b CODE_018F7F
CODE_018F7C:
	JMP.w CODE_018FD4

CODE_018F7F:
	SEC
	SBC.w $6056
	SEC
	SBC.w $6122
	CMP.w #$FFF4
	BCC.b CODE_018F7C
	LDY.b $76,x
	CPY.b #$0A
	BMI.b CODE_018FA8
	LDA.w #$FB00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w $60D4
	RTS

CODE_018FA8:
	LDY.w $60AB
	BMI.b CODE_018F37
	JSR.w CODE_018FE3
	LDA.w #!Define_YI_SoundID39_PiranhaPlantMunch
	JSL.l CODE_0085D2
	LDY.b #$02
	STY.b $76,x
	LDY.b #$17
CODE_018FBD:
	STY.w $105E
	LDA.w #$0001
	STA.w $7A36,x
	INC.w $1070
	LDY.b #$02
	STY.w $1074
	LDA.w #$0040
	STA.b $18,x
	RTS

CODE_018FD4:
	LDY.b $76,x
	CPY.b #$1C
	BMI.b CODE_018FDE
	CPY.b #$27
	BMI.b CODE_018FE2
CODE_018FDE:
	JSL.l CODE_03A858
CODE_018FE2:
	RTS

CODE_018FE3:
	LDA.w #$FB00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w $60D4
	LDA.b $10
	AND.w #$003E
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$FD00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $7400,x
	BEQ.b CODE_01901D
	EOR.w #$FFFF
	INC
CODE_01901D:
	STA.b $00
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $04
	LDA.w $7CD6,x
	CLC
	ADC.w $6040
	SEC
	SBC.w #$0008
	STA.b $0A
	LDA.w $7CD8,x
	CLC
	ADC.w $6054
	SEC
	SBC.w #$0004
	STA.b $0C
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R6_MultiplierLo
	CPY.b #$06
	BMI.b CODE_019077
CODE_019050:
	STZ.b $02
	JSL.l CODE_0EEBFA
	LDA.b $04
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0028
	STA.w $7002,y
	LDA.w #$0005
	STA.w $7462,y
	LDA.w #$0000
	STA.w $75A2,y
	LDA.w #$0008
	STA.w $7502,y
	STA.w $7500,y
	RTS

CODE_019077:
	LDA.w #$0025
	JSL.l CODE_03A364
	BCC.b CODE_019050
	LDA.b $0A
	STA.w $70E2,y
	LDA.b $0C
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	RTS

CODE_01909B:
	LDA.w $7CD6,x
	PHA
	CLC
	ADC.w $6040
	STA.w $7CD6,x
	LDA.w $7CD8,x
	PHA
	CLC
	ADC.w $6054
	STA.w $7CD8,x
	LDA.w $7BB6,x
	PHA
	LDA.w $7BB8,x
	PHA
	LDA.w #$000C
	STA.w $7BB6,x
	STA.w $7BB8,x
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0190DA

CODE_0190D1:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0190DA:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_019123
	BEQ.b CODE_019123
	LDA.w $7D38,y
	BEQ.b CODE_0190D1
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.b $00
	LDA.w $7542,y
	STA.b $02
	TYX
	JSL.l CODE_03B24B
	LDY.b $76,x
	CPY.b #$0B
	BPL.b CODE_019120
	INC.w $1070
	LDY.b #$06
	STY.w $1074
	LDY.b #$17
	STY.w $105E
	LDA.w #$0020
	STA.b $18,x
	LSR
	STA.w $7A96,x
	LDY.b #$0D
	STY.b $76,x
	LDA.w #!Define_YI_SoundID3F_HitUvula
	JSL.l CODE_0085D2
	BRA.b CODE_019123

CODE_019120:
	JSR.w CODE_01913C
CODE_019123:
	PLA
	STA.w $7BB8,x
	PLA
	STA.w $7BB6,x
	PLA
	STA.w $7CD8,x
	PLA
	STA.w $7CD6,x
CODE_019133:
	RTS

;---------------------------------------------------------------------------

DATA_019134:
	db $1D,$1F

DATA_019136:
	db $08,$0A

DATA_019138:
	dw $0200,$FE00

CODE_01913C:
	LDA.b $02
	BNE.b CODE_019133
	LDA.w $7400,x
	DEC
	EOR.b $00
	BPL.b CODE_019133
	LDY.b $76,x
	CPY.b #$0F
	BMI.b CODE_019156
	CPY.b #$1C
	BMI.b CODE_0191BA
	CPY.b #$1F
	BPL.b CODE_0191BA
CODE_019156:
	INC.w $1070
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7A38,x
	STZ.w $7A36,x
	INC.w $107A
	LDY.w $107A
	CPY.b #$03
	BMI.b CODE_01919D
	LDY.w $7400,x
	LDA.w DATA_019138,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $106E
	INC.w $1072
	LDA.w #$0012
	STA.w $7720,x
	LDY.b #$21
	STY.b $78,x
	LDY.b #$0C
	STY.w $105E
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.b $18,x
	LDY.b #$1F
	STY.b $76,x
	RTS

CODE_01919D:
	SEP.b #$20
	LDA.w DATA_019134-$01,y
	STA.b $78,x
	LDA.w DATA_019136-$01,y
	STA.w $105E
	REP.b #$20
	LDA.w #$0020
	STA.b $18,x
	LDY.b #$04
	STY.w $1074
	LDY.b #$1C
	STY.b $76,x
CODE_0191BA:
	RTS

;---------------------------------------------------------------------------

CODE_0191BB:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0191D3

CODE_0191CA:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0191D3:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0191BA
	BEQ.b CODE_0191BA
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0191CA
	LDA.w $7D38,y
	BEQ.b CODE_0191CA
	LDA.w $7542,y
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.b $02
	TYX
	PHY
	JSL.l CODE_03B24B
	PLY
	LDA.b $00
	BNE.b CODE_0191CA
	LDA.w $7400,x
	DEC
	EOR.b $02
	BPL.b CODE_0191CA
	LDA.w $7CD8,y
	SEC
	SBC.w $7CD8,x
	BPL.b CODE_0191CA
	LDA.w #!Define_YI_SoundID3F_HitUvula
	JSL.l CODE_0085D2
	LDY.w $107A
	CPY.b #$02
	BMI.b CODE_0191CA
	LDY.b $76,x
	CPY.b #$1C
	BMI.b CODE_0191CA
	CPY.b #$1F
	BPL.b CODE_0191CA
	JMP.w CODE_019156

;---------------------------------------------------------------------------

CODE_01922A:
	LDA.w $7A36,x
	CLC
	ADC.b $18,x
	CMP.w #$0100
	BMI.b CODE_019249
	SEP.b #$20
	LDA.b $78,x
	STA.w $7402,x
	REP.b #$20
	LDA.w $105E
	STA.w $105C
	LDA.w #$0000
	STA.b $18,x
CODE_019249:
	STA.w $7A36,x
CODE_01924C:
	RTS

;---------------------------------------------------------------------------

CODE_01924D:
	LDA.w $7AF6,x
	BEQ.b CODE_01924C
	DEC
	BEQ.b CODE_019291
	AND.w #$0004
	BNE.b CODE_019291
	LDX.b #$14
CODE_01925C:
	LDA.l DATA_5FA570,x
	STA.l $702D6E,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	STA.l $702F2E,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	STA.l $702F4E,x
	STA.l YI_Global_PaletteMirror[$F1].LowByte,x
	DEX
	DEX
	BPL.b CODE_01925C
	LDX.b #$06
CODE_01927E:
	LDA.l DATA_5FA586,x
	STA.l $702D84,x
	STA.l YI_Global_PaletteMirror[$0C].LowByte,x
	DEX
	DEX
	BPL.b CODE_01927E
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

CODE_019291:
	LDX.b #$1C
CODE_019293:
	LDA.l DATA_5FDA80,x
	STA.l $702D6E,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	LDA.l DATA_5FDAA0,x
	STA.l $702F2E,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	LDA.l DATA_5FDAC0,x
	STA.l $702F4E,x
	STA.l YI_Global_PaletteMirror[$F1].LowByte,x
	DEX
	DEX
	BPL.b CODE_019293
	LDA.l DATA_5FDA9E
	STA.l $702F2C
	STA.l YI_Global_PaletteMirror[$E0].LowByte
	LDA.l DATA_5FDABE
	STA.l $702F4C
	STA.l YI_Global_PaletteMirror[$F0].LowByte
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_0192D6:
	dw $FF20,$00E0

CODE_0192DA:
	LDA.w $70E2,x
	SEC
	SBC.w $1082
	CLC
	ADC.w #$00E0
	CMP.w #$01C0
	BCC.b CODE_019311
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0192F5
	LDA.w $7400,x
	DEC
CODE_0192F5:
	EOR.b $00
	BMI.b CODE_019311
	LDY.b #$00
	LDA.b $00
	BMI.b CODE_019301
	INY
	INY
CODE_019301:
	LDA.w $1082
	CLC
	ADC.w DATA_0192D6,y
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_019311:
	RTS

;---------------------------------------------------------------------------

CODE_019312:
	TYX
	LDY.b #$01
	STY.b $76,x
	LDA.w #$0040
	STA.w $7A98,x
	LDA.b $10
	AND.w #$0001
	BEQ.b CODE_019366
	LDA.w $70E2,x
	SEC
	SBC.w $1082
	CLC
	ADC.w #$00A0
	CMP.w #$0140
	BCC.b CODE_01933E
	STA.b $00
	LDA.w $7400,x
	DEC
	EOR.b $00
	BPL.b CODE_019366
CODE_01933E:
	LDA.b $78,x
	AND.w #$0007
	CLC
	ADC.w #$0028
	STA.b $78,x
	LDY.b #$18
	STY.w $105E
	LDA.w #$0001
	STA.w $7A36,x
	INC.w $1070
	LDA.w #$0020
	STA.b $18,x
	LDA.w #$0040
	STA.w $7A96,x
	LDY.b #$08
	STY.b $76,x
CODE_019366:
	RTS

;---------------------------------------------------------------------------

CODE_019367:
	TYX
	STZ.w $105C
	STZ.w $105E
	STZ.w $1070
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7A38,x
	LDA.w $7A96,x
	BNE.b CODE_0193B6
	LDA.w #$0020
	STA.b $18,x
	LDA.w $7A36,x
	BNE.b CODE_0193B6
	LDA.w $7A98,x
	BNE.b CODE_019391
	STZ.b $76,x
	RTS

CODE_019391:
	SEP.b #$20
	LDA.b $78,x
	INC
	AND.b #$07
	STA.b $78,x
	REP.b #$20
	LDA.w $7402,x
	AND.w #$0003
	BNE.b CODE_0193B6
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID56_ThunderLakituAttacking6
	JSL.l CODE_0085D2
	INC.w $7A36,x
	STZ.b $18,x
CODE_0193B6:
	JSR.w CODE_0193BA
	RTS

;---------------------------------------------------------------------------

CODE_0193BA:
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_0193FF
	INC.w $1070
	INC.w $106E
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7A38,x
	STZ.w $7A36,x
	LDY.b #$18
	STY.b $78,x
	LDY.b #$03
	STY.w $105E
	LDA.w #$0010
	STA.b $18,x
	LDY.b $76,x
	CPY.b #$01
	BNE.b CODE_0193F0
	LDY.b #$16
	STY.b $76,x
	RTS

CODE_0193F0:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $78,x
	INC.w $105E
	LDY.b #$18
	STY.b $76,x
CODE_0193FF:
	RTS

;---------------------------------------------------------------------------

CODE_019400:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019416
	STZ.w $105E
	LDA.w #$0040
	STA.b $18,x
	LDA.w #$0030
	STA.w $7A96,x
	INC.b $76,x
CODE_019416:
	RTS

;---------------------------------------------------------------------------

CODE_019417:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_019427
	STZ.w $1074
	LDA.w #$0080
	STA.b $18,x
	INC.b $76,x
CODE_019427:
	RTS

;---------------------------------------------------------------------------

CODE_019428:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019438
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #$01
	STY.b $76,x
CODE_019438:
	RTS

;---------------------------------------------------------------------------

CODE_019439:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019458
	LDA.w $7402,x
	SEC
	SBC.w #$0028
	STA.b $78,x
	STZ.w $105E
	LDA.w #$0040
	STA.b $18,x
	LDA.w #$0030
	STA.w $7A96,x
	INC.b $76,x
CODE_019458:
	RTS

;---------------------------------------------------------------------------

CODE_019459:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_019469
	STZ.w $1074
	LDA.w #$0080
	STA.b $18,x
	INC.b $76,x
CODE_019469:
	RTS

;---------------------------------------------------------------------------

CODE_01946A:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019472
	INC.b $76,x
CODE_019472:
	RTS

;---------------------------------------------------------------------------

CODE_019473:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_019493
	INC.b $76,x
CODE_01947B:
	LDA.b $78,x
	SEC
	SBC.w #$0029
	AND.w #$0007
	ORA.w #$0008
	STA.b $78,x
	LDY.b #$01
	STY.w $105E
	LDA.w #$0008
	STA.b $18,x
CODE_019493:
	RTS

;---------------------------------------------------------------------------

CODE_019494:
	TYX
	LDA.w #$0001
	STA.w $105C
	STA.w $105E
	STZ.w $106E
	LDA.w $7974
	AND.w #$0001
	BNE.b CODE_0194AC
	STZ.w $1070
CODE_0194AC:
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7A38,x
	LDA.w $7A96,x
	BEQ.b CODE_0194BD
	JMP.w CODE_019525

CODE_0194BD:
	LDA.w #$0020
	STA.b $18,x
	LDA.w $7A36,x
	BNE.b CODE_019525
	LDA.w $7A98,x
	BNE.b CODE_0194FE
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BNE.b CODE_0194FE
	LDA.w $7C16,x
	CLC
	ADC.w #$0070
	CMP.w #$00E0
	BCS.b CODE_0194FE
	SEP.b #$20
	LDA.b $78,x
	INC
	AND.b #$07
	ORA.b #$10
	STA.b $78,x
	REP.b #$20
	LDY.b #$02
	STY.w $105E
	STY.w $1074
	LDA.w #$0020
	STA.b $18,x
	INC.b $76,x
	RTS

CODE_0194FE:
	SEP.b #$20
	LDA.b $78,x
	INC
	AND.b #$07
	ORA.b #$08
	STA.b $78,x
	REP.b #$20
	LDA.w $7402,x
	AND.w #$0003
	BNE.b CODE_019525
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID56_ThunderLakituAttacking6
	JSL.l CODE_0085D2
	INC.w $7A36,x
	STZ.b $18,x
CODE_019525:
	JSR.w CODE_0193BA
	RTS

;---------------------------------------------------------------------------

CODE_019529:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_01953F
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$00C0
	STA.w $7A98,x
	LDY.b #$0E
	STY.b $76,x
CODE_01953F:
	RTS

;---------------------------------------------------------------------------

CODE_019540:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_01953F
	INC.w $1070
	STZ.w $1074
	LDY.b #$0A
	STY.b $76,x
	JMP.w CODE_01947B

;---------------------------------------------------------------------------

DATA_019553:
	dw $0500,$0060

DATA_019557:
	dw $FD80,$0280,$FF40,$00C0,$FF00,$0100

CODE_019563:
	TYX
	LDA.w #$0002
	STA.w $105C
	STA.w $105E
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.b $18,x
	LDA.w $7A36,x
	BNE.b CODE_01953F
	SEP.b #$20
	LDA.b $78,x
	INC
	AND.b #$07
	ORA.b #$10
	STA.b $78,x
	REP.b #$20
	LDA.w $7402,x
	AND.w #$0003
	BNE.b CODE_019599
	LDA.w #!Define_YI_SoundID56_ThunderLakituAttacking6
	JSL.l CODE_0085D2
CODE_019599:
	LDY.b #$08
	LDA.w $7400,x
	BEQ.b CODE_0195AD
	INY
	INY
	SEC
	SBC.w #$0020
	CMP.w $7E1A
	BPL.b CODE_0195D6
	BRA.b CODE_0195BB

CODE_0195AD:
	LDY.b #$08
	LDA.w $70E2,x
	SEC
	SBC.w #$0070
	CMP.w $7E18
	BMI.b CODE_0195D6
CODE_0195BB:
	LDA.w $7A96,x
	BNE.b CODE_0195E8
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BEQ.b CODE_0195D9
	LDA.w $7A98,x
	BNE.b CODE_0195E8
	LDA.w $7400,x
	CLC
	ADC.w #$0004
	TAY
CODE_0195D6:
	JMP.w CODE_019669

CODE_0195D9:
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCC.b CODE_0195E9
CODE_0195E8:
	RTS

CODE_0195E9:
	CLC
	ADC.w #$FFD0
	CMP.w #$0040
	BCC.b CODE_0195E8
	LDA.w $60A8
	BMI.b CODE_0195FB
	EOR.w #$FFFF
	INC
CODE_0195FB:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b #$00
	LDA.w $60A8
	EOR.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_01960A
	INY
	INY
CODE_01960A:
	LDA.w DATA_019553,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0100
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_019646
	LDA.w $7400,x
	CLC
	ADC.w #$0004
	TAY
	BRA.b CODE_019669

CODE_019646:
	LDY.b #$00
	CLC
	ADC.w #$0400
	CMP.w #$0800
	BCC.b CODE_019657
	BMI.b CODE_019669
	INY
	INY
	BRA.b CODE_019669

CODE_019657:
	CLC
	ADC.w #$FCC0
	CMP.w #$0180
	BCS.b CODE_01966F
	LDY.b #$04
	CMP.w #$00C0
	BMI.b CODE_019669
	INY
	INY
CODE_019669:
	LDA.w DATA_019557,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_01966F:
	INC.w $1070
	INC.w $106E
	INC.w $1072
	LDA.w #$000A
	STA.w $7720,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7A38,x
	LDY.b #$1A
	STY.b $78,x
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0280
	STA.w $75E2,x
	LDA.w #$0028
	STA.w $7542,x
	LDY.b #$05
	STY.w $105E
	LDA.w #$0010
	STA.b $18,x
	INC.b $76,x
	RTS

;---------------------------------------------------------------------------

DATA_0196AA:
	dw $FF00,$0100

CODE_0196AE:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0196EB
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0196EB
	LDY.w $7400,x
	LDA.w DATA_0196AA,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	LDY.b #$1B
	STY.b $78,x
	LDY.b #$06
	STY.w $105E
	LDA.w #$0020
	STA.b $18,x
	STA.w $61C6
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_0196EB:
	RTS

;---------------------------------------------------------------------------

CODE_0196EC:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019708
	LDY.b #$1A
	STY.b $78,x
	LDY.b #$05
	STY.w $105E
	LDA.w #$0010
	STA.b $18,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_019708:
	RTS

;---------------------------------------------------------------------------

CODE_019709:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_01973C
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_01973C
	LDY.b #$06
	STY.w $1074
	LDA.w #$0008
	STA.w $7540,x
	LDY.b #$1C
	STY.b $78,x
	LDY.b #$07
	STY.w $105E
	LDA.w #$0020
	STA.b $18,x
	STA.w $61C6
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_01973C:
	RTS

;---------------------------------------------------------------------------

CODE_01973D:
	TYX
	LDY.b #$02
	STY.b $00
	LDA.w $7A36,x
	BNE.b CODE_019749
	DEC.b $00
CODE_019749:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_01975D
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	DEC.b $00
CODE_01975D:
	LDY.b $00
	BNE.b CODE_019771
	LDY.b #$1A
	STY.b $78,x
	LDY.b #$05
	STY.w $105E
	LDA.w #$0008
	STA.b $18,x
	INC.b $76,x
CODE_019771:
	RTS

;---------------------------------------------------------------------------

CODE_019772:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_01977F
	LDA.w #$0008
	STA.b $16,x
	INC.b $76,x
CODE_01977F:
	RTS

;---------------------------------------------------------------------------

CODE_019780:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0197B7
	DEC.b $16,x
	BPL.b CODE_0197A8
	LDY.b #$03
	STY.b $78,x
	STZ.w $105E
	LDA.w #$0010
	STA.b $18,x
	LDA.w $106E
	ORA.w #$FF00
	STA.w $106E
	STZ.w $1072
	STZ.w $1074
	INC.b $76,x
	RTS

CODE_0197A8:
	LDA.w $1074
	EOR.w #$0006
	STA.w $1074
	LDA.w #$0008
	STA.w $7A96,x
CODE_0197B7:
	RTS

;---------------------------------------------------------------------------

CODE_0197B8:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0197C8
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #$01
	STY.b $76,x
CODE_0197C8:
	RTS

;---------------------------------------------------------------------------

CODE_0197C9:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0197E2
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.b $16,x
	INC.b $76,x
CODE_0197E2:
	RTS

;---------------------------------------------------------------------------

CODE_0197E3:
	TYX
	LDY.w $7223,x
	BMI.b CODE_01981C
	LDA.b $16,x
	BEQ.b CODE_0197FC
	STZ.b $16,x
	LDY.b #$02
	STY.b $78,x
	STZ.w $105E
	LDA.w #$0010
	STA.b $18,x
	RTS

CODE_0197FC:
	LDA.w $7A36,x
	BNE.b CODE_01981C
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_01981C
	LDA.w $106E
	ORA.w #$FF00
	STA.w $106E
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #$01
	STY.b $76,x
CODE_01981C:
	RTS

;---------------------------------------------------------------------------

CODE_01981D:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_01983C
	LDY.w $7223,x
	BMI.b CODE_01983C
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	DEC.b $78,x
	LDY.b #$03
	STY.w $105E
	LDA.w #$0020
	STA.b $18,x
	INC.b $76,x
CODE_01983C:
	RTS

;---------------------------------------------------------------------------

CODE_01983D:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019875
	LDY.b $76,x
	CPY.b #$19
	BEQ.b CODE_01985D
	LDY.b #$0A
	STY.b $78,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0010
	STA.b $18,x
	LDA.w #$0001
	BRA.b CODE_019870

CODE_01985D:
	INC.b $78,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$0020
	STA.b $18,x
	LDA.w #$0004
CODE_019870:
	STA.w $105E
	INC.b $76,x
CODE_019875:
	RTS

;---------------------------------------------------------------------------

CODE_019876:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019897
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_019897
	LDA.w $106E
	ORA.w #$FF00
	STA.w $106E
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #$09
	STY.b $76,x
CODE_019897:
	RTS

;---------------------------------------------------------------------------

CODE_019898:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0198A5
	LDA.w #$0014
	STA.b $16,x
	INC.b $76,x
CODE_0198A5:
	RTS

;---------------------------------------------------------------------------

CODE_0198A6:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0198E7
	DEC.b $16,x
	BPL.b CODE_0198C7
	LDY.b #$06
	STY.w $1074
	LDY.b #$0A
	STY.b $78,x
	LDA.w #$0001
	STA.w $105E
	LDA.w #$0010
	STA.b $18,x
	INC.b $76,x
	RTS

CODE_0198C7:
	LDA.b $16,x
	AND.w #$0001
	ASL
	DEC
	STA.b $00
	CLC
	ADC.w $105E
	STA.w $105E
	SEP.b #$20
	LDA.b $78,x
	CLC
	ADC.b $00
	STA.b $78,x
	REP.b #$20
	LDA.w #$0020
	STA.b $18,x
CODE_0198E7:
	RTS

;---------------------------------------------------------------------------

CODE_0198E8:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0198FE
	STZ.w $1074
	STZ.w $107A
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #$09
	STY.b $76,x
CODE_0198FE:
	RTS

;---------------------------------------------------------------------------

DATA_0198FF:
	dw $0100,$FF00

CODE_019903:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019930
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_019930
	LDY.w $7400,x
	LDA.w DATA_0198FF,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $78,x
	INC.w $105E
	LDA.w #$0020
	STA.b $18,x
	STA.w $61C6
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_019930:
	RTS

;---------------------------------------------------------------------------

CODE_019931:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019949
	INC.b $78,x
	INC.w $105E
	LDA.w #$0010
	STA.b $18,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_019949:
	RTS

;---------------------------------------------------------------------------

CODE_01994A:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_019990
	LDY.b #$06
	CPY.w $1074
	BEQ.b CODE_019964
	STY.w $1074
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
CODE_019964:
	LDA.w #$0008
	STA.w $7540,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$0010
	BCS.b CODE_019990
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A36,x
	BNE.b CODE_019990
	DEC.b $78,x
	DEC.w $105E
	LDA.w #$0008
	STA.b $18,x
	LDA.w #$0020
	STA.w $61C6
	INC.b $76,x
CODE_019990:
	RTS

;---------------------------------------------------------------------------

CODE_019991:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0199AD
	LDA.w #$0014
	STA.b $16,x
	LDY.b #$04
	STY.w $1074
	DEC.b $78,x
	DEC.w $105E
	LDA.w #$0020
	STA.b $18,x
	INC.b $76,x
CODE_0199AD:
	RTS

;---------------------------------------------------------------------------

CODE_0199AE:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_0199EF
	DEC.b $16,x
	BPL.b CODE_0199CF
	LDY.b #$02
	STY.w $1074
	LDA.w #$0040
	STA.w $7A96,x
	LDY.b #$18
	STY.b $78,x
	LDY.b #$10
	STY.w $105E
	INC.b $76,x
	RTS

CODE_0199CF:
	LDA.b $16,x
	AND.w #$0001
	ASL
	DEC
	STA.b $00
	CLC
	ADC.w $105E
	STA.w $105E
	SEP.b #$20
	LDA.b $78,x
	CLC
	ADC.b $00
	STA.b $78,x
	REP.b #$20
	LDA.w #$0020
	STA.b $18,x
CODE_0199EF:
	LDA.w $7A98,x
	BNE.b CODE_0199FA
	LDA.w #$0008
	STA.w $7A98,x
CODE_0199FA:
	RTS

;---------------------------------------------------------------------------

CODE_0199FB:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_019A2C
	LDA.b $16,x
	BEQ.b CODE_019A0D
	STZ.b $16,x
	LDA.w #$0020
	STA.b $18,x
	RTS

CODE_019A0D:
	LDA.w $7A36,x
	BNE.b CODE_019A2C
	LDA.w #$000C
	STA.b $16,x
	LDA.w $1060
	SEC
	SBC.w #$0080
	LDY.w $7400,x
	BNE.b CODE_019A27
	EOR.w #$FFFF
	INC
CODE_019A27:
	STA.w $1088
	INC.b $76,x
CODE_019A2C:
	RTS

;---------------------------------------------------------------------------

DATA_019A2D:
	dw $FE00,$0200

CODE_019A31:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019A64
	DEC.b $16,x
	BPL.b CODE_019A44
	LDA.w #$0008
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_019A44:
	LDA.b $16,x
	AND.w #$0001
	PHP
	ASL
	DEC
	CLC
	ADC.w $105E
	STA.w $105E
	LDA.w #$0030
	STA.b $18,x
	PLP
	BEQ.b CODE_019A64
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_019A64:
	LDA.w $1060
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1088
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0048
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08A929>>16
	LDA.w #FXCODE_08A929
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $1088
CODE_019A91:
	RTS

;---------------------------------------------------------------------------

CODE_019A92:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_019A91
	LDY.b $16,x
	BEQ.b CODE_019ABE
	STZ.b $16,x
	LDY.w $77C2,x
	LDA.w DATA_019A2D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$03
	STY.w $105E
	LDA.w #$0008
	STA.b $18,x
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

CODE_019ABE:
	LDA.w $7A36,x
	BNE.b CODE_019B18
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w $75E0,x
	BNE.b CODE_019AE1
	LDA.w #$0020
	STA.w $7A96,x
	STA.w $75E0,x
	LDA.w #$000C
	STA.w $7720,x
	RTS

CODE_019AE1:
	LDA.w #$0060
	STA.w $7542,x
	LDA.w #$0800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w $75E2,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_019B18
	LDA.w #$0003
	STA.b $16,x
	STZ.w $75E0,x
	LDA.w #$0020
	STA.w $61C8
	LDA.w #$0004
	STA.w $7A96,x
	STZ.w $1074
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_019B18:
	RTS

;---------------------------------------------------------------------------

DATA_019B19:
	dw $FE00,$0200

DATA_019B1D:
	db $03,$10

DATA_019B1F:
	dw $0000,$FC00

CODE_019B23:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_019BA3
	LDA.w $7A96,x
	BNE.b CODE_019BA3
	LDA.b $16,x
	AND.w #$0001
	BNE.b CODE_019B70
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $61C8
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	DEC.b $16,x
	BPL.b CODE_019BA3
	LDA.w #$0080
	STA.w $7A96,x
	STZ.w $1072
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_019B70:
	DEC.b $16,x
	LDA.b $16,x
	LSR
	TAY
	SEP.b #$20
	LDA.w DATA_019B1D,y
	STA.w $105E
	REP.b #$20
	LDY.b $16,x
	LDA.w DATA_019B1F,y
	STA.w $7A38,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.b $18,x
	LDA.w #$F800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $77C2,x
	LDA.w DATA_019B19,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TYA
	STA.w $7400,x
CODE_019BA3:
	RTS

;---------------------------------------------------------------------------

CODE_019BA4:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_019BF8
	LDA.b $16,x
	BEQ.b CODE_019BBD
	STZ.b $16,x
	LDY.b #$02
	STY.b $78,x
	STZ.w $105E
	LDA.w #$0008
	STA.b $18,x
	RTS

CODE_019BBD:
	LDA.w $7A36,x
	BNE.b CODE_019BF8
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_019BF8
	LDA.w $106E
	ORA.w #$FF00
	STA.w $106E
	STZ.w $107A
	LDY.w $107C
	STY.w $107E
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0080
	STA.w $7A98,x
	LDY.b $76,x
	CPY.b #$28
	BEQ.b CODE_019BF4
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $0B7B
CODE_019BF4:
	LDY.b #$01
	STY.b $76,x
CODE_019BF8:
	RTS

;---------------------------------------------------------------------------

CODE_019BF9:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019C23
	LDY.b $76,x
	CPY.b #$29
	BEQ.b CODE_019C19
	LDY.b #$27
	STY.b $78,x
	LDY.b #$15
	STY.w $105E
	LDA.w #$0001
	STA.w $7A36,x
	LDA.w #$0040
	BRA.b CODE_019C1E

CODE_019C19:
	STZ.b $16,x
	LDA.w #$0020
CODE_019C1E:
	STA.w $7A96,x
	INC.b $76,x
CODE_019C23:
	LDA.w $1078
	SEC
	SBC.w #$0008
	CMP.w #$00C0
	BMI.b CODE_019C4C
	STA.w $1078
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0012
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7720,x
CODE_019C4C:
	RTS

;---------------------------------------------------------------------------

DATA_019C4D:
	dw $FC00,$0400

CODE_019C51:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_019CC8
	LDA.w $1078
	CLC
	ADC.w #$0008
	CMP.w #$0101
	BMI.b CODE_019CAB
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDY.b #$00
	LDA.w $7680,x
	CMP.w #$0080
	BPL.b CODE_019C72
	INY
	INY
CODE_019C72:
	LDA.w DATA_019C4D,y
	STA.w $60A8
	STA.w $60B4
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w $61B4
	LDY.b #$02
	STY.w $1074
	STY.b $16,x
	LDA.w #$0020
	STA.w $7A96,x
	LDY.b #$18
	STY.b $78,x
	LDY.b #$10
	STY.w $105E
	LDY.b #$24
	STY.b $76,x
	RTS

CODE_019CAB:
	STA.w $1078
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0012
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7720,x
CODE_019CC8:
	RTS

;---------------------------------------------------------------------------

CODE_019CC9:
	TYX
	LDA.w $7C16,x
	CMP.w #$00A0
	BPL.b CODE_019CE1
	LDA.w #$0008
	STA.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $1015
	INC.b $76,x
	RTS

CODE_019CE1:
	LDA.w $7A98,x
	BNE.b CODE_019CF6
	LDA.w #$0005
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0007
	STA.w $7402,x
CODE_019CF6:
	RTS

;---------------------------------------------------------------------------

CODE_019CF7:
	TYX
	LDA.w $1015
	BPL.b CODE_019D02
	STZ.w $1015
	INC.b $76,x
CODE_019D02:
	RTS

;---------------------------------------------------------------------------

DATA_019D03:
	dw $0000,$1000

DATA_019D07:
	dw $7000,$7000

DATA_019D0B:
	dw $00B7,$00B8

CODE_019D0F:
	REP.b #$10
	LDA.w #$0800
	STA.b $00
	LDA.w $0C16
	BNE.b CODE_019D61
	LDA.w $0C14
	CMP.w #$0002
	BCC.b CODE_019D2D
	STZ.w $0C18
	SEP.b #$10
	LDX.b $12
	INC.b $76,x
	RTS

CODE_019D2D:
	ASL
	TAY
	LDA.w DATA_019D03,y
	STA.w $0C18
	LDA.w #$6800
	STA.w $0C1A
	LDX.w DATA_019D07,y
	LDA.w DATA_019D0B,y
	JSL.l CODE_00B756
	STA.w $0C16
	INC.w $0C14
	PHA
	SEP.b #$10
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08AA5F>>16
	LDA.w #FXCODE_08AA5F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	PLA
	ASL
	STA.w $0C16
CODE_019D61:
	SEC
	SBC.w #$0800
	BCS.b CODE_019D6F
	ADC.w #$0800
	STA.b $00
	LDA.w #$0000
CODE_019D6F:
	STA.w $0C16
	LDX.w $0C1A
	TXA
	CLC
	ADC.b $00
	STA.w $0C1A
	LDA.w #$0070
	STA.w $0001
	LDY.w $0C18
	LDA.b $00
	JSL.l CODE_00BF86
	LDA.b $00
	CLC
	ADC.w $0C18
	STA.w $0C18
	SEP.b #$10
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_019D99:
	db $00,$01,$02,$03,$04,$05,$06,$00
	db $10,$11,$12,$13,$14,$15,$16,$17
	db $20,$21,$22,$23,$24,$25,$26,$27
	db $30,$31,$32,$33,$34,$35,$36,$37
	db $40,$41,$42,$43,$44,$45,$46,$47
	db $00,$51,$52,$53,$54,$55,$56,$00
	db $00,$00,$62,$63,$64,$65,$00,$00

DATA_019DD1:
	db $00,$05 : dl $7E5040

DATA_019DD6:
	db $70,$07,$2B,$07,$01,$49,$00

DATA_019DDD:
	db $70,$11,$00,$2B,$11,$00,$01,$12
	db $00,$00

CODE_019DE7:
	REP.b #$10
	LDA.w $0C18
	CMP.w #$4000
	BCS.b CODE_019E07
	TAY
	ADC.w #$0800
	STA.w $0C18
	LDA.w #$0800
	LDX.w #$0000
	JSL.l CODE_00BF4A
	SEP.b #$10
	LDX.b $12
	RTS

CODE_019E07:
	LDA.w #$0000
	STA.b $00
	LDA.w #DATA_019D99
	STA.b $02
	LDA.w #DATA_019D99>>16
	STA.w $0001
	LDA.w #$0007
	STA.b $04
CODE_019E1C:
	LDY.b $00
	TYA
	CLC
	ADC.w #$0080
	STA.b $00
	LDX.b $02
	TXA
	CLC
	ADC.w #$0008
	STA.b $02
	LDA.w #$0008
	JSL.l CODE_00BF16
	DEC.b $04
	BNE.b CODE_019E1C
	SEP.b #$10
	JSR.w CODE_019291
	REP.b #$10
	SEP.b #$20
	LDX.w #$0004
CODE_019E45:
	LDA.w DATA_019DD1,x
	STA.w HDMA[$07].Parameters,x
	DEX
	BPL.b CODE_019E45
	LDX.w #$0009
CODE_019E51:
	LDA.w DATA_019DD6,x
	STA.l $7E5040,x
	LDA.w DATA_019DDD,x
	STA.l $7E51E4,x
	DEX
	BPL.b CODE_019E51
	LDA.b #$C0
	TSB.w !RAM_YI_Global_HDMAEnable
	LDA.b #$0A
	STA.w $011C
	LDA.b #$69
	STA.w !RAM_YI_Global_BG2AddressAndSize
	REP.b #$20
	LDA.w #$0012
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0100
	STA.w !RAM_YI_Global_Mode7MatrixParameterALo
	STA.w !RAM_YI_Global_Mode7MatrixParameterDLo
	STZ.w !RAM_YI_Global_Mode7MatrixParameterBLo
	STZ.w !RAM_YI_Global_Mode7MatrixParameterCLo
	LDA.w #$0020
	STA.w !RAM_YI_Global_Mode7CenterXLo
	LDA.w #$001C
	STA.w !RAM_YI_Global_Mode7CenterYLo
	LDA.w #$0080
	STA.w !RAM_YI_Global_Layer3YPosLo
	SEP.b #$10
	LDX.b $12
	LDA.w #$0004
	STA.b $16,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000A
	STA.w $7A98,x
	INC.b $76,x
CODE_019EB1:
	RTS

;---------------------------------------------------------------------------

DATA_019EB2:
	db $0F,$0B,$0C,$0D

CODE_019EB6:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_019EB1
	DEC.b $16,x
	BMI.b CODE_019ED2
	LDY.b $16,x
	LDA.w DATA_019EB2,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_019ED1:
	RTS

CODE_019ED2:
	LDA.w $7860,x
	BEQ.b CODE_019ED1
	LDA.w #$6E6C
	STA.w $6FA0,x
	LDA.w #$2041
	STA.w $6FA2,x
	LDA.w #$A902
	STA.w $7040,x
	INC.w $1080
	LDA.w $70E2,x
	SEC
	SBC.w #$0002
	STA.w $70E2,x
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7182,x
	STZ.b $18,x
	STZ.w $7A36,x
	STZ.w $7042,x
	STZ.b $16,x
	LDA.w #$0050
	STA.w $1076
	STA.w $1078
	JSR.w CODE_018AC9
	JSR.w CODE_018AB6
	JSR.w CODE_018AE1
	JSR.w CODE_018B15
	INC.w $0CF9
	LDX.b $12
	INC.w $1070
	LDA.w #$0001
	STA.w $106E
	INC.w $1072
	LDA.w #$FFFE
	STA.w $7720,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7A38,x
	STZ.w $7A36,x
	LDA.w #$0025
	STA.w $7402,x
	TAY
	STY.b $78,x
	LDY.b #$12
	STY.w $105C
	STY.w $105E
	INC.b $76,x
	PLA
	RTL

;---------------------------------------------------------------------------

CODE_019F57:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_019F79
	LDA.w #$0010
	STA.b $16,x
	STZ.w $7A36,x
	INC.w $105E
	LDA.w #$0018
	STA.b $18,x
	LDA.w #!Define_YI_SoundID87_CastleAboutToExplode
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_019F79:
	RTS

;---------------------------------------------------------------------------

CODE_019F7A:
	TYX
	LDA.w $7A36,x
	BNE.b CODE_019FB1
	LDA.b $16,x
	BPL.b CODE_019F90
	STZ.w $1072
	LDA.w #$0080
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_019F90:
	DEC.b $16,x
	BPL.b CODE_019F9B
	INC.b $78,x
	LDA.w #$0012
	BRA.b CODE_019FA6

CODE_019F9B:
	LDA.b $16,x
	AND.w #$0001
	ASL
	DEC
	CLC
	ADC.w $105E
CODE_019FA6:
	STA.w $105E
	LDA.w #$0018
	STA.b $18,x
	STZ.w $7A36,x
CODE_019FB1:
	LDA.w $1076
	CLC
	ADC.w #$0001
	CMP.w #$0100
	BMI.b CODE_019FC0
	LDA.w #$0100
CODE_019FC0:
	STA.w $1076
	STA.w $1078
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0016
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0008
	STA.w $7720,x
	RTS

;---------------------------------------------------------------------------

CODE_019FE5:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_01A014
	LDA.w $7A36,x
	BNE.b CODE_01A00F
	LDA.w #$000A
	STA.b $16,x
	INC.w $0B59
	INC.w $105C
	INC.b $76,x
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	LDA.w #$0340
	JSL.l CODE_02E1A6
	RTS

CODE_01A00F:
	LDA.w #$0008
	STA.b $18,x
CODE_01A014:
	RTS

;---------------------------------------------------------------------------

DATA_01A015:
	dw $0003,$FFFE,$0002,$FFFF,$0001

DATA_01A01F:
	dw $FFFD,$0002,$FFFE,$0001,$FFFF

DATA_01A029:
	dw $0004,$0008,$000E,$0014,$001C,$0020,$0028,$002C

DATA_01A039:
	dw $FFFC,$FFF8,$0000,$FFF0,$FFF4,$0008,$0002,$FFFC

DATA_01A049:
	dw $0000,$0001,$0002,$0001,$0000,$0001,$0000,$0002

DATA_01A059:
	dw $0100,$0480,$0180,$0300,$01C0,$0240,$0080,$0200
	dw $FD00,$FF00,$FE00,$F840,$FD80,$FF80,$FAC0,$FE80

DATA_01A079:
	dw $FA00,$FD80,$FC00,$FF80,$FC80,$FB00,$F780,$FE00
	dw $FB80,$FF00,$F800,$FB00,$FE80,$FD00,$FB80,$FA80

CODE_01A099:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_01A0FD
	LDA.w $7A98,x
	BNE.b CODE_01A0B7
	DEC.b $16,x
	DEC.b $16,x
	BMI.b CODE_01A0FE
	BNE.b CODE_01A0B1
	LDA.w #$0040
	BRA.b CODE_01A0B4

CODE_01A0B1:
	LDA.w #$0020
CODE_01A0B4:
	STA.w $7A98,x
CODE_01A0B7:
	LDA.b $16,x
	BNE.b CODE_01A0C7
	LDA.w $7974
	AND.w #$0001
	BNE.b CODE_01A0FD
	LDY.b #$04
	BRA.b CODE_01A0CB

CODE_01A0C7:
	AND.w #$0002
	TAY
CODE_01A0CB:
	LDA.w DATA_01A015,y
	CLC
	ADC.w $1076
	STA.w $1076
	LDA.w DATA_01A01F,y
	CLC
	ADC.w $1078
	STA.w $1078
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0016
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0008
	STA.w $7720,x
CODE_01A0FD:
	RTS

CODE_01A0FE:
	LDA.w $70E2,x
	STA.w $1084
	LDA.w $7182,x
	STA.w $1086
	INC.w $1080
	LDA.w #FXDATA_548000+$60A1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$60A1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	LDA.w #$6E6C
	STA.w $6FA0,x
	LDA.w #$2040
	STA.w $6FA2,x
	LDA.w #$3101
	STA.w $7040,x
	LDA.w #$000C
	STA.w $7402,x
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000A
	STA.w $7542,x
	LDA.w #$0020
	STA.w $7042,x
	LDA.w #$001E
CODE_01A169:
	STA.b $00
	TAY
	LDA.w DATA_01A059,y
	STA.b $04
	LDA.w DATA_01A079,y
	STA.b $08
	TYA
	BIT.w #$0010
	BNE.b CODE_01A181
	LDA.w DATA_01A029,y
	BRA.b CODE_01A18C

CODE_01A181:
	AND.w #$000E
	TAY
	LDA.w DATA_01A029,y
	EOR.w #$FFFF
	INC
CODE_01A18C:
	STA.b $02
	LDA.w DATA_01A039,y
	STA.b $06
	LDA.w DATA_01A049,y
	STA.b $0A
	LDA.w #!Define_YI_AmbSpr223
	JSL.l CODE_008B21
	LDA.w $1084
	CLC
	ADC.b $02
	STA.w $70A2,y
	LDA.w $1086
	CLC
	ADC.b $06
	STA.w $7142,y
	LDA.w #$0080
	STA.w $7782,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $08
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0004
	STA.w $7500,y
	LDA.b $0A
	STA.w $73C2,y
	LDA.b $00
	DEC
	DEC
	BPL.b CODE_01A169
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	INC.b $76,x
	RTS

;---------------------------------------------------------------------------

CODE_01A1DC:
	TYX
	LDY.w $7223,x
	BMI.b CODE_01A225
	LDA.w $7042,x
	BIT.w #$0080
	BNE.b CODE_01A217
	ORA.w #$0080
	STA.w $7042,x
	LDA.w #$0010
	STA.w $7542,x
	LDA.w $6094
	CLC
	ADC.w #$0080
	STA.w $70E2,x
	LDA.w $609C
	SEC
	SBC.w #$0018
	STA.w $7182,x
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID82_BossFalling
	JSL.l CODE_0085D2
CODE_01A217:
	LDY.w $7683,x
	DEY
	BMI.b CODE_01A225
	LDA.w #$0060
	STA.w $7A96,x
	INC.b $76,x
CODE_01A225:
	RTS

;---------------------------------------------------------------------------

CODE_01A226:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_01A225
	SEP.b #$20
	LDA.b #$C0
	TRB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDY.b #$02
	STY.w $011C
	LDA.w #$0011
	STA.w !RAM_YI_Global_MainScreenLayers
	STZ.w $7ECC
	PLA
	JML.l CODE_03A32E

;---------------------------------------------------------------------------

YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_Init:
;$01A248
	RTL

;---------------------------------------------------------------------------

DATA_01A249:
	dw CODE_01A32D
	dw CODE_01A337
	dw CODE_01A35D
	dw CODE_01A39C
	dw CODE_01A3A9
	dw CODE_01A3E4
	dw CODE_01A494
	dw CODE_01A51F

DATA_01A259:
	dw $0005,$FFFF,$01A0,$0760,$0000,$0000,$0020,$0000
	dw $0002,$FFFF,$00C0,$01A0,$0001,$0003,$0001,$01A0
	dw $7FFF,$0004,$0001,$0006,$FFFF,$02B0,$07D0,$0005
	dw $0002,$FFFF,$00C0,$02B0,$0001,$0003,$0001,$02B0
	dw $02F0,$0000,$0002,$0000,$0001,$FFFF,$0080,$0000
	dw $0020,$0000,$0007,$FFFF,$0000,$0000,$0001,$0100
	dw $0000,$0020,$0000,$0001,$FFFF,$0020,$0004,$0001
	dw $0020,$00B0

DATA_01A2CD:
	db $06,$06,$0A,$08,$04,$0A,$0A,$06

YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_Main:
;$01A2D5
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	BNE.b CODE_01A324
	STZ.w $617A
	STZ.w $617C
	LDA.b $18,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_01A2F5
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	JML.l CODE_03A31E

CODE_01A2F5:
	REP.b #$10
	LDY.b $18,x
	LDA.w DATA_01A259,y
	STA.b $76,x
	LDA.w DATA_01A259+$04,y
	STA.b $78,x
	LDA.w DATA_01A259+$06,y
	STA.w $7A36,x
	LDA.w DATA_01A259+$08,y
	STA.w $7A38,x
	LDA.w DATA_01A259+$02,y
	STA.w $7A96,x
	LDY.b $76,x
	LDA.w DATA_01A2CD,y
	AND.w #$00FF
	CLC
	ADC.b $18,x
	STA.b $18,x
	SEP.b #$10
CODE_01A324:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_01A249,x)
	RTL

CODE_01A32D:
	TYX
	LDA.b $78,x
	STA.w $617A
	STA.w $617C
	RTS

CODE_01A337:
	TYX
	STY.w $0C1E
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w $60B0
	CMP.b $78,x
	BNE.b CODE_01A34C
	STZ.w $7A96,x
	RTS

CODE_01A34C:
	BPL.b CODE_01A353
	DEC.w !RAM_YI_Global_Layer1XPosLo
	BRA.b CODE_01A356

CODE_01A353:
	INC.w !RAM_YI_Global_Layer1XPosLo
CODE_01A356:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	RTS

CODE_01A35D:
	TYX
	STY.w $0C1E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.b $78,x
CODE_01A367:
	CMP.w #$0100
	BMI.b CODE_01A392
	SEC
	SBC.w #$0100
	PHA
	LDA.w !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w $7A36,x
	EOR.w $7A38,x
	BMI.b CODE_01A385
	PLA
	STZ.w $7A96,x
	STZ.w $0C1E
	RTS

CODE_01A385:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w $7A38,x
	STA.w !RAM_YI_Global_Layer1XPosLo
	PLA
	BRA.b CODE_01A367

CODE_01A392:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	RTS

CODE_01A39C:
	TYX
	LDA.b $78,x
	STA.w $7E18
	LDA.w $7A36,x
	STA.w $7E1A
CODE_01A3A8:
	RTS

CODE_01A3A9:
	TYX
	INC.w $105A
	PLA
	JML.l CODE_03A31E

DATA_01A3B2:
	dw $0020,$0000,$001F,$0020,$0020

DATA_01A3BC:
	dw $015C,$015A,$015B,$015C,$015C

DATA_01A3C6:
	dw $0000,$0010,$FFF0,$0010,$FFF0

DATA_01A3D0:
	dw $0000,$0000,$0010,$0000,$0010

DATA_01A3DA:
	dw $0001,$0000,$0001,$0001,$0001

CODE_01A3E4:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01A3A8
	LDY.w $7A38,x
	LDA.w DATA_01A3B2,y
	STA.w $7A98,x
	LDA.w DATA_01A3DA,y
	PHP
	LDA.w $7A36,x
	STA.w $0093
	CLC
	ADC.w DATA_01A3D0,y
	STA.w $7A36,x
	LDA.b $78,x
	STA.w $0091
	CLC
	ADC.w DATA_01A3C6,y
	STA.b $78,x
	LDA.w DATA_01A3BC,y
	STA.w $0095
	LDA.w #$0001
	STA.w $008F
	JSL.l CODE_109295
	LDX.b $12
	LDA.w $7A36,x
	CMP.w #$07B0
	BNE.b CODE_01A433
	LDA.b $78,x
	CMP.w #$01A0
	BNE.b CODE_01A433
	STZ.w $7A96,x
CODE_01A433:
	LDA.w $7A38,x
	INC
	INC
	CMP.w #$000A
	BMI.b CODE_01A440
	LDA.w #$0000
CODE_01A440:
	STA.w $7A38,x
	PLP
	BEQ.b CODE_01A477
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_008B21
	LDA.w $0091
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w $0093
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0006
	STA.w $73C2,y
	STA.w $7E4C,y
CODE_01A477:
	RTS

DATA_01A478:
	db $78,$79,$79,$79,$7A,$79,$7B,$79
	db $00,$00,$3C,$79,$3D,$79,$3E,$79
	db $3F,$79,$40,$79,$42,$79,$43,$79
	db $00,$00,$3C,$79

CODE_01A494:
	TYX
	LDA.w $7AF8,x
	BNE.b CODE_01A477
	LDA.w #$0020
	STA.w $7AF8,x
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.b $78,x
	STA.w $0091
	STA.b $04
	LDA.w $7A36,x
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$0006
	SEC
	SBC.w $7A38,x
	ASL
	ASL
	CLC
	ADC.w #$0008
	STA.b $00
	STA.b $02
CODE_01A4CB:
	LDA.b $02
	SEC
	SBC.b $00
	TAY
	LDA.w DATA_01A478,y
	STA.w $0095
	JSL.l CODE_109295
	LDA.w $0091
	CLC
	ADC.w #$0010
	STA.w $0091
	LDA.b $00
	AND.w #$0002
	BEQ.b CODE_01A4FB
	LDA.b $04
	STA.w $0091
	LDA.w $0093
	CLC
	ADC.w #$0010
	STA.w $0093
CODE_01A4FB:
	DEC.b $00
	DEC.b $00
	BNE.b CODE_01A4CB
	LDX.b $12
	LDA.w $7A36,x
	SEC
	SBC.w #$0010
	STA.w $7A36,x
	DEC.w $7A38,x
	BNE.b CODE_01A51E
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $7A96,x
	INC.w $105A
CODE_01A51E:
	RTS

CODE_01A51F:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01A51E
	LDA.b $78,x
	BNE.b CODE_01A541
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	AND.w #$FFE0
	STA.b $78,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$00B0
	STA.w $7A36,x
CODE_01A541:
	LDA.b $78,x
	STA.w $0091
	LDA.w $7A36,x
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$0000
	STA.w $0095
	JSL.l CODE_109295
	LDA.w $0093
	CLC
	ADC.w #$0010
	STA.w $0093
	JSL.l CODE_109295
	LDA.w $0091
	CLC
	ADC.w #$0010
	STA.w $0091
	JSL.l CODE_109295
	LDA.w $0093
	SEC
	SBC.w #$0010
	STA.w $0093
	JSL.l CODE_109295
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr20C
	JSL.l CODE_008B21
	LDA.b $78,x
	STA.w $70A2,y
	LDA.w $7A36,x
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$000D
	STA.w $73C2,y
	LDA.w #$0036
	STA.w $7002,y
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_01A5BC
	STZ.w $7A96,x
	RTS

CODE_01A5BC:
	LDA.w #$0010
	STA.w $7A98,x
	ASL
	CLC
	ADC.b $78,x
	STA.b $78,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr111_GeorgetteJelly_Init:
;$01A5C9
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_01A5DF
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $76,x
	LDA.w #$0002
	STA.w $7A98,x
	INC.w $7402,x
CODE_01A5DF:
	RTL

;---------------------------------------------------------------------------

DATA_01A5E0:
	dw CODE_01A830
	dw CODE_01A889
	dw CODE_01A8C0
	dw CODE_01A8F2
	dw CODE_01AA1F
	dw CODE_01AA6B

YI_NorSpr111_GeorgetteJelly_Main:
;$01A5EC
	JSL.l CODE_01A60B
	JSR.w CODE_01A740
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_01A5E0,x)
	LDA.w #$0620
	LDY.b $76,x
	CPY.b #$02
	BMI.b CODE_01A607
	LDA.w #$0660
CODE_01A607:
	STA.w $6FA0,x
	RTL

CODE_01A60B:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01A619
	PLY
	PLA
	RTL

CODE_01A619:
	LDA.w $6FA2,x
	AND.w #$FFE1
	LDY.w $7D38,x
	BNE.b CODE_01A62D
	ORA.w #$0008
	STA.w $6FA2,x
	JMP.w CODE_01A715

CODE_01A62D:
	STA.w $6FA2,x
	STZ.b $0E
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_01A63F:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_01A6A0
	BEQ.b CODE_01A6A0
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_01A6B9
	LDA.w $6FA2,y
	AND.w #$0800
	BEQ.b CODE_01A6A0
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr109_BronzeTapTap
	BEQ.b CODE_01A6A0
	CMP.w #!Define_YI_NorSpr10A_SilverTapTap
	BEQ.b CODE_01A6A0
	CMP.w #!Define_YI_NorSpr10B_HoppingSilverTapTap
	BEQ.b CODE_01A6A0
	PHY
	TYX
	JSL.l CODE_03B24B
	PLY
	LDA.w #$0000
	STA.w $7540,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	INC.b $0E
	LDX.b $12
	LDA.w #$0040
	STA.w $7542,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	JSL.l CODE_03B53D
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_01A63F

CODE_01A6A0:
	LDY.b $0E
	BEQ.b CODE_01A6B9
CODE_01A6A4:
	TXY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	JSL.l CODE_03A377
	LDA.w #CODE_039A6C
	STA.b $00
	LDA.w #CODE_039A6C>>16
	STA.b $02
	JMP.w [$7960]

CODE_01A6B9:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_01A6C9
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_01A6A4

CODE_01A6C9:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_01A6F7
	JSL.l CODE_03A590
	LDA.b $18,x
	CMP.w #$0002
	BCC.b CODE_01A6E9
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_01A6EB
	LDA.w $7A96,x
	BEQ.b CODE_01A6A4
	PLY
	PLA
	RTL

CODE_01A6E9:
	INC.b $18,x
CODE_01A6EB:
	LDA.w #$FD80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_01A6F7:
	LDA.w $7A98,x
	AND.w #$0003
	BNE.b CODE_01A712
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	ORA.w #$0004
	STA.w $7402,x
CODE_01A712:
	PLY
	PLA
CODE_01A714:
	RTL

CODE_01A715:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_01A714
	CMP.w #$0008
	BNE.b CODE_01A73D
	LDY.w $74A2,x
	BPL.b CODE_01A73D
	LDA.w $6FA2,x
	AND.w #$FCFF
	STA.w $6FA2,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	ASL
	STA.w $7402,x
CODE_01A73D:
	PLY
	PLA
	RTL

CODE_01A740:
	LDY.w $7402,x
	CPY.b #$04
	BPL.b CODE_01A7A0
	LDY.w $7D36,x
	BPL.b CODE_01A7A1
	LDY.b $76,x
	CPY.b #$03
	BPL.b CODE_01A7A0
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_01A79C
	LDY.w $60C0
	BEQ.b CODE_01A7A0
	LDY.w $60AB
	BMI.b CODE_01A7A0
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60AA
	STZ.w $60D4
	INC.w $61B4
	LDA.w $7182,x
	CLC
	ADC.w #$FFE8
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $7A36,x
CODE_01A788:
	STZ.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7A98,x
	LDY.b #$03
	STY.b $76,x
	LDA.w #!Define_YI_SoundID5F_Splash1
	JSL.l CODE_0085D2
	RTS

CODE_01A79C:
	JSL.l CODE_03A858
CODE_01A7A0:
	RTS

CODE_01A7A1:
	BEQ.b CODE_01A7A0
	LDA.w $7AF6,x
	BNE.b CODE_01A7A0
	LDA.w $7D37,y
	BEQ.b CODE_01A7A0
	LDA.w $7541,y
	CMP.w #$0040
	BMI.b CODE_01A788
	LDA.b $76,x
	CMP.w #$0001
	BEQ.b CODE_01A7DA
	CMP.w #$0003
	BEQ.b CODE_01A7DA
	LDA.w #$0001
	STA.b $76,x
	STZ.w $7402,x
	STZ.b $16,x
	LDA.w #$0003
	STA.w $7A98,x
	PHY
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	PLY
CODE_01A7DA:
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$FE00
	STA.w $7221,y
	LDA.w $721F,y
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_01A812
	LDA.w #$0010
	STA.w $7A96,x
	ASL
	STA.w $7AF6,x
	LDA.w #$FC00
	STA.w $7221,y
	LDA.w $7400,x
	DEC
	PHP
	LDA.w #$FE00
	PLP
	BPL.b CODE_01A819
	LDA.w #$0200
	BRA.b CODE_01A819

CODE_01A812:
	LDA.w $721F,y
	EOR.w #$FFFF
	INC
CODE_01A819:
	STA.w $721F,y
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

;---------------------------------------------------------------------------

DATA_01A820:
	dw $FFC0,$0040

DATA_01A824:
	db $00,$01,$02,$03,$02,$01

DATA_01A82A:
	db $08,$06,$06,$08,$06,$06

CODE_01A830:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_01A862
	LDY.w $7400,x
	LDA.w DATA_01A820,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_01A862
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$06
	BMI.b CODE_01A850
	STZ.b $16,x
	LDY.b #$00
CODE_01A850:
	LDA.w DATA_01A824,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_01A82A,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_01A862:
	RTS

;---------------------------------------------------------------------------

DATA_01A863:
	db $01,$02,$03,$02,$01,$00,$01,$02
	db $03,$02,$01,$02,$03,$02,$01,$02
	db $03,$02,$01

DATA_01A876:
	db $03,$03,$03,$03,$03,$03,$03,$03
	db $04,$04,$04,$04,$04,$06,$06,$06
	db $10,$06,$06

CODE_01A889:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01A8B7
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$14
	BMI.b CODE_01A8A5
CODE_01A897:
	STZ.w $7402,x
	STZ.b $16,x
	LDA.w #$0008
	STA.w $7A98,x
	STZ.b $76,x
	RTS

CODE_01A8A5:
	LDA.w DATA_01A863-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_01A876-$01,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_01A8B7:
	RTS

;---------------------------------------------------------------------------

DATA_01A8B8:
	db $02,$03,$02,$01

DATA_01A8BC:
	db $02,$10,$06,$06

CODE_01A8C0:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01A8E0
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$05
	BPL.b CODE_01A897
	LDA.w DATA_01A8B8-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_01A8BC-$01,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_01A8E0:
	RTS

;---------------------------------------------------------------------------

DATA_01A8E1:
	db $0C,$0B,$08,$09,$0A,$09,$08

DATA_01A8E8:
	db $04,$02,$04,$04,$04,$04,$60

DATA_01A8EF:
	db $08,$0A,$0C

CODE_01A8F2:
	TYX
	LDA.w $7A98,x
	BEQ.b CODE_01A8FB
	JMP.w CODE_01A9F2

CODE_01A8FB:
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$03
	BEQ.b CODE_01A906
	JMP.w CODE_01A9C8

CODE_01A906:
	LDA.w #!Define_YI_AmbSpr1F4
	JSL.l CODE_008B21
	LDA.w #$0008
	STA.w $73C2,y
	CLC
	ADC.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.b $10
	STA.b $06
	XBA
	STA.b $08
	LDA.w $70E2,x
	STA.b $0A
	LDA.w $7182,x
	STA.b $0C
	LDY.b #$03
CODE_01A93D:
	PHY
	LDA.w #$0112
	JSL.l CODE_03A364
	BCC.b CODE_01A9C3
	LDA.b $06
	AND.w #$003F
	SEC
	SBC.w #$001C
	STA.b $04
	CLC
	ADC.b $0A
	STA.w $70E2,y
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $08
	AND.w #$001F
	EOR.w #$FFFF
	SEC
	SBC.w #$0003
	STA.b $02
	CLC
	ADC.b $0C
	STA.w $7182,y
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PHY
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	PLY
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0000
	BNE.b CODE_01A998
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
	BRA.b CODE_01A9A5

CODE_01A998:
	LDA.b $06
	XBA
	AND.w #$001F
	CLC
	ADC.w #$0050
	STA.w $7A96,y
CODE_01A9A5:
	LDA.b $06
	EOR.w #$FFFF
	ROR
	ROR
	ROR
	ROR
	INC
	STA.b $06
	LDA.b $08
	ROR
	ROR
	ROR
	EOR.w #$FFFF
	DEC
	STA.b $08
	PLY
	DEY
	BEQ.b CODE_01A9C4
	JMP.w CODE_01A93D

CODE_01A9C3:
	PLY
CODE_01A9C4:
	LDY.b $16,x
	BRA.b CODE_01A9E0

CODE_01A9C8:
	CPY.b #$08
	BMI.b CODE_01A9E0
	LDA.w #$0009
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	INC
	STA.b $78,x
	STZ.b $16,x
	INC.b $76,x
	RTS

CODE_01A9E0:
	LDA.w DATA_01A8E1-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_01A8E8-$01,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_01A9F2:
	LDA.w $7A36,x
	BEQ.b CODE_01AA1A
	LDY.b $16,x
	CPY.b #$03
	BPL.b CODE_01AA1A
	LDA.w DATA_01A8EF,y
	AND.w #$00FF
	SEC
	SBC.w #$0020
	CLC
	ADC.w $7182,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60AA
	INC.w $61B4
CODE_01AA1A:
	RTS

;---------------------------------------------------------------------------

DATA_01AA1B:
	db $09,$0A,$09,$08

CODE_01AA1F:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01AA5C
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$04
	BMI.b CODE_01AA4D
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	STZ.b $16,x
	LDY.b #$00
	DEC.b $78,x
	BNE.b CODE_01AA4D
	LDA.w #$000B
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A98,x
	STA.b $16,x
	INC.b $76,x
	RTS

CODE_01AA4D:
	LDA.w DATA_01AA1B,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_01AA5C:
	RTS

;---------------------------------------------------------------------------

DATA_01AA5D:
	db $0C,$00,$0D,$0E,$0F,$10,$0F,$0E
	db $0D,$00,$02,$03,$02,$01

CODE_01AA6B:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01AA9C
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$0F
	BMI.b CODE_01AA8D
	STZ.w $7402,x
	STZ.b $16,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0043
	STA.w $7A98,x
	STZ.b $76,x
	RTS

CODE_01AA8D:
	LDA.w DATA_01AA5D-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A98,x
CODE_01AA9C:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr112_GeorgetteJellyGoo_Init:
;$01AA9D
	RTL

;---------------------------------------------------------------------------

YI_NorSpr112_GeorgetteJellyGoo_Main:
;$01AA9E
	JSL.l CODE_03AF23
	LDY.b $76,x
	BNE.b CODE_01AAA9
	INC.b $76,x
CODE_01AAA8:
	RTL

CODE_01AAA9:
	LDA.w $7A96,x
	BNE.b CODE_01AAD5
	LDY.b $18,x
	BNE.b CODE_01AAC0
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0008
	STA.w $7A98,x
	INC.b $18,x
CODE_01AAC0:
	LDA.w $7A98,x
	BNE.b CODE_01AAD5
	LDA.w #$0008
	STA.w $7A98,x
	LDY.w $7402,x
	CPY.b #$02
	BPL.b CODE_01AAD5
	INC.w $7402,x
CODE_01AAD5:
	LDA.w #$0006
	STA.w $74A2,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_01AAA8
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

YI_NorSpr085_HarryHedgehog_Init:
;$01AAE7
	RTL

;---------------------------------------------------------------------------

DATA_01AAE8:
	dw CODE_01AB6A
	dw CODE_01AC06

YI_NorSpr085_HarryHedgehog_Main:
;$01AAEC
	LDA.w $7040,x
	LSR
	BCC.b CODE_01AAF6
	JSL.l CODE_03AA52
CODE_01AAF6:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_01AAE8,x)
	JSR.w CODE_01AB13
	LDY.w $7D36,x
	BPL.b CODE_01AB0E
	JSL.l CODE_03A858
CODE_01AB0E:
	RTL

;---------------------------------------------------------------------------

DATA_01AB0F:
	dw FXDATA_548000+$6000,FXDATA_548000+$6020

CODE_01AB13:
	LDA.w $7040,x
	LSR
	BCC.b CODE_01AB61
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$0C00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $18,x
	LDA.w DATA_01AB0F,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D964>>16
	LDA.w #FXCODE_08D964
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_01AB61:
	RTS

;---------------------------------------------------------------------------

DATA_01AB62:
	dw $FE80,$0180,$0010,$FFF8

CODE_01AB6A:
	TYX
	LDY.w $7400,x
	LDA.w DATA_01AB62,y
	STA.w $75E0,x
	LDA.w #$0020
	STA.w $7540,x
	LDY.w $7AF8,x
	BNE.b CODE_01ABC1
	LDA.w $7C16,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_01ABC1
	LDA.w $7C18,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_01ABC1
	JSL.l CODE_03AD74
	BCC.b CODE_01ABC1
	LDA.w #$7C60
	STA.w $6FA0,x
	LDA.w #$2175
	STA.w $7040,x
	STZ.w $7402,x
	LDA.w #$0080
	STA.w $7A36,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_01ABC1:
	LDY.w $7A98,x
	BNE.b CODE_01ABD5
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_01ABD5:
	LDY.w $7AF6,x
	BNE.b CODE_01AC05
	LDA.w #$0004
	STA.w $7AF6,x
	LDA.w #!Define_YI_AmbSpr1D8
	JSL.l CODE_008B21
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w #$0002
	STA.w $7782,y
	INC
	STA.w $7E4C,y
	ASL
	CLC
	ADC.w $7182,x
	STA.w $7142,y
CODE_01AC05:
	RTS

;---------------------------------------------------------------------------

CODE_01AC06:
	TYX
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDY.w $7D36,x
	DEY
	BMI.b CODE_01AC29
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_01AC29
	LDA.w $7D38,y
	BEQ.b CODE_01AC29
	TYX
	JSL.l CODE_03B25B
	STZ.w $7A96,x
CODE_01AC29:
	LDY.w $7A96,x
	BEQ.b CODE_01AC3F
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w #$0100
	BMI.b CODE_01AC66
	LDA.w #$0100
	BRA.b CODE_01AC66

CODE_01AC3F:
	LDA.w $7A36,x
	SEC
	SBC.w #$0010
	CMP.w #$0080
	BPL.b CODE_01AC66
	LDA.w #$0040
	STA.w $7AF8,x
	STZ.b $76,x
	LDA.w #$7E00
	STA.w $6FA0,x
	LDA.w #$0974
	STA.w $7040,x
	JSL.l CODE_03AEFD
	LDA.w #$0080
CODE_01AC66:
	STA.w $7A36,x
	LDY.w $7A98,x
	BNE.b CODE_01AC79
	LDA.w #$0004
	STA.w $7A98,x
	LSR
	EOR.b $18,x
	STA.b $18,x
CODE_01AC79:
	RTS

;---------------------------------------------------------------------------

DATA_01AC7A:
	dw $FE00,$0200,$FD00,$0300

DATA_01AC82:
	dw $0004,$0006,$0008,$000C

DATA_01AC8A:
	dw $FFD0,$0120

YI_NorSpr0E6_Gusty_Init:
;$01AC8E
	LDA.w $7182,x
	BIT.w #$0010
	BEQ.b CODE_01ACCF
	AND.w #$FFE0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_01AC8A,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #$0060
	STA.w $6FA0,x
	LDA.w #$4000
	STA.w $6FA2,x
	LDA.w #$0002
	STA.w $7040,x
	INC.b $76,x
	LDY.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
	BNE.b CODE_01ACCE
	INC.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
CODE_01ACCE:
	RTL

CODE_01ACCF:
	LDA.w $70E2,x
	PHA
	SEC
	SBC.w $6094
	STA.b $00
	PLA
	AND.w #$0010
	DEC
	EOR.b $00
	BMI.b CODE_01ACE6
	JML.l CODE_03A31E

CODE_01ACE6:
	LDA.b $10
	AND.w #$0004
	STA.b $00
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.w $7400,x
CODE_01ACF9:
	ORA.b $00
	TAY
	LDA.w DATA_01AC7A,y
	STA.w $75E0,x
	LDA.b $00
	LSR
	STA.b $78,x
	TAY
	LDA.w DATA_01AC82,y
	STA.w $7540,x
	RTL

;---------------------------------------------------------------------------

CODE_01AD0F:
	dw $FE00,$0200

DATA_01AD13:
	dw $FE00,$0200

YI_NorSpr0E6_Gusty_Main:
;$01AD17
	LDY.w $7D38,x
	BEQ.b CODE_01AD30
	LDA.b $10
	AND.w #$0004
	STA.b $00
	LDA.w $7400,x
	JSL.l CODE_01ACF9
	STZ.w $7D38,x
	STZ.w $75E2,x
CODE_01AD30:
	JSL.l CODE_03AF23
	LDY.b $76,x
	BEQ.b CODE_01AD3B
	JMP.w CODE_01ADC2

CODE_01AD3B:
	LDA.w $7A96,x
	BNE.b CODE_01AD92
	LDY.w $7D36,x
	BPL.b CODE_01AD92
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF6
	BCC.b CODE_01AD64
	LDY.w $60AB
	BMI.b CODE_01AD92
	LDY.w $60C0
	BEQ.b CODE_01AD64
	JSL.l CODE_03A5B7
	RTL

CODE_01AD64:
	JSL.l CODE_03A858
	LDA.w $61B2
	BPL.b CODE_01AD92
	AND.w #$0FFF
	STA.w $61B2
	LDA.w #$0040
	STA.w $7A96,x
	ASL
	ASL
	STA.w $614A
	LDY.w $7400,x
	LDA.w DATA_01AD13,y
	CLC
	ADC.w $60A8
	STA.w $60A8
	STA.w $60B4
	JSL.l CODE_06BEC1
CODE_01AD92:
	LDA.w $7A98,x
	BNE.b CODE_01ADA7
	LDA.w #$0006
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_01ADA7:
	LDY.b $78,x
	LDA.w $7680,x
	SEC
	SBC.w #$0040
	CMP.w #$0080
	BCS.b CODE_01ADBB
	TYA
	CLC
	ADC.w #$0004
	TAY
CODE_01ADBB:
	LDA.w DATA_01AC82,y
	STA.w $7540,x
	RTL

CODE_01ADC2:
	LDY.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
	BEQ.b CODE_01ADD6
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCC.b CODE_01ADDA
	STZ.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
CODE_01ADD6:
	JML.l CODE_03A31E

CODE_01ADDA:
	LDY.b $18,x
	BEQ.b CODE_01ADEE
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_01ADF3
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0E6_Gusty
	BNE.b CODE_01ADF3
CODE_01ADEE:
	LDA.w $7A96,x
	BNE.b CODE_01AE17
CODE_01ADF3:
	LDA.w #$00E6
	JSL.l CODE_03A34C
	BCC.b CODE_01AE17
	LDA.w $6094
	AND.w #$FFEF
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $70E2,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,y
	STY.b $18,x
	LDA.w #$0100
	STA.w $7A96,x
CODE_01AE17:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr107_WatermelonSeed_Init:
;$01AE18
	RTL

;---------------------------------------------------------------------------

YI_NorSpr107_WatermelonSeed_Main:
;$01AE19
	LDY.w $7860,x
	BEQ.b CODE_01AE54
CODE_01AE1E:
	LDA.w #!Define_YI_AmbSpr229
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_01AE47
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_01AE42:
	LDA.w #$FD80
CODE_01AE47:
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FFFF
	STA.w $7782,y
	JML.l CODE_03A31E

CODE_01AE54:
	LDA.w $7A38,x
	BEQ.b CODE_01AE71
	LDY.w $7D36,x
	BPL.b CODE_01AE71
	LDA.w $61D6
	BNE.b CODE_01AE71
	JSL.l CODE_03A858
	JSL.l CODE_03B25B
	LDA.w #$0001
	STA.w $03BC
CODE_01AE71:
	JSL.l CODE_03AF23
	RTL

;---------------------------------------------------------------------------

YI_NorSpr10D_BooGuyOperatingPulley_Init:
;$01AE76
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.w $7400,x
	LDA.w #$1885
	STA.w $7040,x
	RTL

;---------------------------------------------------------------------------

DATA_01AE89:
	dw CODE_01AEB9
	dw CODE_01AEDA
	dw CODE_01AEFD
	dw CODE_018000
	dw CODE_01AF10
	dw CODE_01AF49

YI_NorSpr10D_BooGuyOperatingPulley_Main:
;$01AE95
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_01AE89,x)
	LDY.b $76,x
	BEQ.b CODE_01AEA9
	CPY.b #$05
	BMI.b CODE_01AEB8
CODE_01AEA9:
	LDA.w $7974
	AND.w #$0003
	BNE.b CODE_01AEB8
	LDA.w #!Define_YI_SoundID5A_PulleySqueak
	JSL.l CODE_0085D2
CODE_01AEB8:
	RTL

CODE_01AEB9:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01AED2
	LDA.w #$0004
	STA.w $7A98,x
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$0C
	BNE.b CODE_01AED2
	STZ.w $7402,x
CODE_01AED2:
	RTS

DATA_01AED3:
	db $04,$03,$02,$01,$01,$01,$01

CODE_01AEDA:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01AEFC
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$14
	BNE.b CODE_01AEF3
	LDA.w #$0010
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_01AEF3:
	LDA.w DATA_01AED3-$0D,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_01AEFC:
	RTS

CODE_01AEFD:
	TYX
	LDA.w $7402,x
	INC
	AND.w #$0003
	ORA.w #$0010
	STA.w $7402,x
	RTS

DATA_01AF0C:
	db $20,$04,$04,$04

CODE_01AF10:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01AF3E
	DEC.b $16,x
	BNE.b CODE_01AF2A
	LDA.w #$0008
	STA.w $7A98,x
	LDY.b #$0B
	STY.b $16,x
	STZ.w $7402,x
	INC.b $76,x
	RTS

CODE_01AF2A:
	LDY.b $16,x
	LDA.w DATA_01AF0C-$01,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0007
	STA.w $7402,x
CODE_01AF3E:
	RTS

DATA_01AF3F:
	db $04,$05,$06,$07,$08,$08,$08,$08
	db $08,$08

CODE_01AF49:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_01AF6D
	DEC.b $16,x
	BNE.b CODE_01AF5F
	LDA.w #$0004
	STA.w $7A98,x
	STZ.w $7402,x
	STZ.b $76,x
	RTS

CODE_01AF5F:
	LDY.b $16,x
	LDA.w DATA_01AF3F-$01,y
	AND.w #$00FF
	STA.w $7A98,x
	INC.w $7402,x
CODE_01AF6D:
	RTS

;---------------------------------------------------------------------------

CODE_01AF6E:
	JSL.l CODE_00831C
	REP.b #$20
	LDA.w #$4000
	STA.w $61BC
	STZ.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_01AF80:
	db $04,$06,$08,$0A,$0C,$0E,$10,$12
	db $14,$16,$18,$1A,$1C,$1E,$20,$22

CODE_01AF90:
	JSL.l CODE_008277
	JSL.l CODE_01AF6E
	JSL.l CODE_0394B8
	LDA.w $038C
	BEQ.b CODE_01AFA4
	JMP.w CODE_01B01B

CODE_01AFA4:
	REP.b #$20
	LDY.b #$00
	STZ.b $21
	LDA.w #$0392
	STA.b $20
	LDA.w #$022E
	JSL.l CODE_0082AB
	SEP.b #$20
	REP.b #$30
	STZ.w !EXRAM_YI_Level_ShowHiddenItemsFlag|!EXRAMBankMirror
	LDX.w #$003E
CODE_01AFC0:
	STZ.w $03C0,x
	STZ.w $0400,x
	STZ.w $0440,x
	STZ.w $0480,x
	STZ.w $04C0,x
	STZ.w $0500,x
	STZ.w $0540,x
	STZ.w $0580,x
	DEX
	DEX
	BPL.b CODE_01AFC0
	LDA.w #!Define_YI_Level_PlayFinishRegenStarTimerSoundThreshold
	STA.w !RAM_YI_Level_StarTimerLo
	STZ.w $03A5
	STZ.w $03A3
	LDA.w #$0001
	STA.w $03A1
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	ASL
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F3E7,x
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F471+$01,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F471+$02,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F471,x
	JMP.w CODE_01B084

CODE_01B01B:
	REP.b #$30
	STZ.w $0396
	LDA.w $038C
	DEC
	BEQ.b CODE_01B029
	JMP.w CODE_01B0AD

CODE_01B029:
	LDX.w $038E
	LDA.l $7F7E00,x
	AND.w #$00FF
	CMP.w #$00DE
	BCC.b CODE_01B05A
	SBC.w #$00DE
	ASL
	STA.w $03A7
	LDA.l $7F7E03,x
	AND.w #$00FF
	STA.w $0374
	LDA.l $7F7E01,x
	STA.w $0375
	LDA.w !RAM_YI_Level_StarTimerLo
	STA.w $0377
	JML.l CODE_118000

CODE_01B05A:
	LDA.l $7F7E01,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.l $7F7E02,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.l $7F7E03,x
	AND.w #$00FF
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.l $7F7E00,x
CODE_01B084:
	AND.w #$00FF
	ASL
	STA.b $00
	ASL
	ADC.b $00
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs,x
	STA.b !RAM_YI_Level_LevelDataPtrLo
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs+$01,x
	STA.b !RAM_YI_Level_LevelDataPtrHi
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs+$03,x
	STA.l !EXRAM_YI_Level_SpriteDataPtrLo
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs+$05,x
	AND.w #$00FF
	STA.l !EXRAM_YI_Level_SpriteDataPtrBank
CODE_01B0AD:
	STZ.w !RAM_YI_Level_DoBonusChallengeFlagLo
	SEP.b #$30
	JSL.l CODE_108B15
	REP.b #$20
	LDA.w #$07B0
	LDX.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CPX.b #$13
	BEQ.b CODE_01B0C9
	CPX.b #$1D
	BNE.b CODE_01B0CC
	LDA.w #$0700
CODE_01B0C9:
	STA.w $61BC
CODE_01B0CC:
	SEP.b #$20
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.b #!Define_YI_LevelID_WelcomeToYoshisIsland
	BNE.b CODE_01B0DA
	LDA.b #$11
	STA.w !RAM_YI_Level_LevelHeaderMusicSettingLo
CODE_01B0DA:
	JSL.l CODE_008546
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$09
	BNE.b CODE_01B0EA
	JSR.w CODE_01B335
	BRA.b CODE_01B118

CODE_01B0EA:
	CMP.b #$0A
	BNE.b CODE_01B0F8
	JSL.l CODE_00B4D3
	JSL.l CODE_00BB90
	BRA.b CODE_01B118

CODE_01B0F8:
	JSL.l CODE_00B339
	JSL.l CODE_00D571
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.b #$03
	BNE.b CODE_01B10A
	JSR.w CODE_01B4A3
CODE_01B10A:
	JSL.l CODE_00BA24
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	LDX.w DATA_01AF80,y
	JSL.l CODE_00BDA2
CODE_01B118:
	JSL.l CODE_01D5B3
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$09
	BEQ.b CODE_01B12D
	CMP.b #$0A
	BEQ.b CODE_01B12D
	JSR.w CODE_01E80A
	JSR.w CODE_01E9F5
CODE_01B12D:
	JSL.l CODE_00BE26
	LDA.w $038C
	BEQ.b CODE_01B139
	JMP.w CODE_01B1F3

CODE_01B139:
	LDA.b #$0F
	STA.w $0200
	LDA.b #$01
	STA.w $0201
	JSL.l CODE_108FD6
	LDX.b #$7F
CODE_01B149:
	STZ.w $6CAA,x
	DEX
	BPL.b CODE_01B149
	REP.b #$20
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0090
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0018
	STA.w $6094
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0094
	STA.w $609C
	INC.w $60C0
	JSL.l CODE_04DC28
	REP.b #$20
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$0280
	STA.w $60B4
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #!Define_YI_PlayerState16_LevelIntro
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	SEP.b #$20
	JSL.l CODE_01B27B
	LDA.b #$01
	STA.w $0B54
	REP.b #$20
	LDA.w #$0002
	STA.w $0121
	LDA.w #$0120
	STA.w $0B4C
	JSL.l CODE_108F49
	LDA.b #$03
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.b #$02
	STA.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	JSL.l CODE_108B61
	REP.b #$20
CODE_01B1C8:
	LDA.w $0D23
	CMP.w #$00C0
	BCC.b CODE_01B1C8
	LDA.w #$7FFF
	STA.l YI_Global_PaletteMirror[$82].LowByte
	SEP.b #$20
	STZ.w $0121
	REP.b #$20
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w $60A6
	LDA.b !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w #$0100
	STA.w $60A4
	SEP.b #$20
	INC.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_01B22F

CODE_01B1F3:
	DEC
	BNE.b CODE_01B1FA
	JSL.l CODE_108B61
CODE_01B1FA:
	JSL.l CODE_04DB68
	JSL.l CODE_03954E
	LDA.w $7E1A
	CMP.b #$0F
	BEQ.b CODE_01B211
	JSL.l CODE_04DCC4
	JSL.l CODE_03954E
CODE_01B211:
	JSL.l CODE_108FD6
	STZ.w $038C
	STZ.w $0121
	LDA.b #$02
	STA.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
CODE_01B22F:
	REP.b #$30
	JSL.l CODE_04DCF9
	SEP.b #$30
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	AND.b #$07
	CMP.b #$02
	BNE.b CODE_01B243
	INC.w $61CA
CODE_01B243:
	JSL.l CODE_01B25E
	JML.l CODE_1083E2

;---------------------------------------------------------------------------

DATA_01B24B:
	db $01,$01,$01,$01,$01,$09,$01,$01
	db $09,$0C,$01,$02,$00,$01,$00,$00
	db $00,$02,$01

CODE_01B25E:
	PHP
	SEP.b #$30
	LDA.w $0205
	BNE.b CODE_01B273
	LDX.w $0203
	LDA.l DATA_01B24B-$01,x
	STA.w !RAM_YI_Global_PlayMusicLo
	STA.w $0205
CODE_01B273:
	STZ.w !RAM_YI_Global_PlaySoundHighPriorityLo
	STZ.w !RAM_YI_Global_SoundQueueSizeLo
	PLP
	RTL

;---------------------------------------------------------------------------

CODE_01B27B:
	LDA.b #$705800>>16
	STA.b $22
	REP.b #$20
	LDA.w #$705800
	STA.b $20
	LDA.w #$0800
	LDY.b #$00
	JSL.l CODE_0082AB
	SEP.b #$20
	RTL

;---------------------------------------------------------------------------

CODE_01B292:
	REP.b #$30
	LDX.w #$020C
CODE_01B297:
	LDA.l $7E79A6,x
	STA.w $03B2,x
	DEX
	DEX
	BPL.b CODE_01B297
	STZ.w $7DF6
	LDX.w #$000C
CODE_01B2A8:
	LDA.l $7E7BB0,x
	STA.l $7E5D98,x
	DEX
	DEX
	BPL.b CODE_01B2A8
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

CODE_01B2B7:
	PHP
	REP.b #$20
	SEP.b #$10
	LDA.w $7DF6
	STA.l $7E5D98
	BEQ.b CODE_01B2D4
	TAX
CODE_01B2C6:
	LDY.w $7DF6,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	STA.l $7E5D98,x
	DEX
	DEX
	BNE.b CODE_01B2C6
CODE_01B2D4:
	PLP
	RTL

;---------------------------------------------------------------------------

CODE_01B2D6:
	PHP
	REP.b #$20
	SEP.b #$10
	STZ.w $7DF6
	LDA.l $7E5D98
	BEQ.b CODE_01B333
	STA.b $00
	PHD
	LDA.w #$7960
	TCD
	LDX.b #$00
CODE_01B2ED:
	PHX
	LDA.l $7E5D9A,x
	CMP.w #$0029
	BEQ.b CODE_01B323
	JSL.l CODE_03A364
	BCC.b CODE_01B323
	TYX
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w $7042,x
	AND.w #$00CF
	ORA.w $6126
	STA.w $7042,x
	STX.b $12
	JSL.l CODE_03BEB9
	STZ.w !RAM_YI_Global_SoundQueueSizeLo
CODE_01B323:
	PLX
	INX
	INX
	CPX.w $0000
	BCC.b CODE_01B2ED
	PLD
	LDA.w #$0000
	STA.l $7E5D98
CODE_01B333:
	PLP
	RTL

;---------------------------------------------------------------------------

CODE_01B335:
	JSL.l CODE_00BA24
	LDA.b #$B9
	STA.b $10
	LDA.b #$BA
	STA.b $11
	LDA.b #$BB
	STA.b $12
	LDA.b #$BC
	STA.b $13
	LDA.b #$BD
	STA.b $14
	REP.b #$30
	LDX.w #$0000
CODE_01B352:
	LDA.l DATA_5FE3EA,x
	STA.l YI_Global_PaletteMirror[$00].LowByte,x
	STA.l $702D6C,x
	LDA.l DATA_5FE40A,x
	STA.l YI_Global_PaletteMirror[$10].LowByte,x
	STA.l $702D8C,x
	LDA.l DATA_5FE42A,x
	STA.l YI_Global_PaletteMirror[$20].LowByte,x
	STA.l $702DAC,x
	LDA.l DATA_5FE44A,x
	STA.l YI_Global_PaletteMirror[$30].LowByte,x
	STA.l $702DCC,x
	LDA.l DATA_5FE46A,x
	STA.l YI_Global_PaletteMirror[$40].LowByte,x
	STA.l $702DEC,x
	INX
	INX
	CPX.w #$0020
	BCC.b CODE_01B352
	SEP.b #$20
	LDA.b #$2D
	STA.w $6EB6
	STA.b $15
	LDA.b #$1B
	STA.w $6EB7
	STA.b $16
	LDA.b #$1C
	STA.w $6EB8
	STA.b $17
	LDA.b #$34
	STA.w $6EB9
	STA.b $18
	STA.b $19
	STA.b $1A
	LDA.b #$FF
	STA.w $6EBA
	STA.w $6EBB
	LDY.w #$0154
	JSL.l CODE_00B3EE
	SEP.b #$10
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	LDX.w DATA_01AF80,y
	JSL.l CODE_00BDA2
	REP.b #$20
	LDA.w #$0080
	STA.w !RAM_YI_Global_Layer3XPosLo
	STA.w $6098
	STA.w !RAM_YI_Global_Layer3YPosLo
	STA.w $60A0
	LDA.w #$0100
	STA.w !RAM_YI_Global_Mode7CenterXLo
	LDA.w #$00F8
	STA.w !RAM_YI_Global_Mode7CenterYLo
	INC.w $0C1E
	INC.w $0C20
	JSL.l CODE_01B403
	LDA.w #$000C
	JSL.l CODE_03A34C
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01B403:
	JSL.l CODE_01B47C
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState20_EnteringRaphaelBossRoom
	BEQ.b CODE_01B47B
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$0120
	BPL.b CODE_01B41B
	CLC
	ADC.w #$0140
CODE_01B41B:
	CMP.w #$0260
	BMI.b CODE_01B424
	SEC
	SBC.w #$0140
CODE_01B424:
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0120
	SEP.b #$20
	STA.w !REGISTER_Multiplicand
	LDY.b #$CD
	STY.w !REGISTER_Multiplier
	NOP #2
	LDA.b #$A0
	CLC
	ADC.w !REGISTER_ProductOrRemainderLo
	LDA.w !REGISTER_ProductOrRemainderHi
	ADC.b #$00
	PHA
	XBA
	STA.w !REGISTER_Multiplicand
	STY.w !REGISTER_Multiplier
	NOP #2
	PLA
	CLC
	ADC.w !REGISTER_ProductOrRemainderLo
	SEC
	SBC.b #$1A
	AND.b #$FF
	STA.w $0D05
	REP.b #$20
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0078
	STA.w $0C23
	STA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6094
	LDA.w $60A0
	CLC
	ADC.w #$0026
	STA.w $0C27
	STA.w !RAM_YI_Global_Layer1YPosLo
	STA.w $609C
CODE_01B47B:
	RTL

;---------------------------------------------------------------------------

CODE_01B47C:
	PHX
	LDA.w $0D05
	AND.w #$00FF
	ASL
	REP.b #$10
	TAX
	LDA.l DATA_00E954,x
	STA.w !RAM_YI_Global_Mode7MatrixParameterALo
	STA.w !RAM_YI_Global_Mode7MatrixParameterDLo
	LDA.l DATA_00E9D4,x
	STA.w !RAM_YI_Global_Mode7MatrixParameterBLo
	EOR.w #$FFFF
	INC
	STA.w !RAM_YI_Global_Mode7MatrixParameterCLo
	SEP.b #$10
	PLX
	RTL

;---------------------------------------------------------------------------

CODE_01B4A3:
	REP.b #$20
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDX.b #FXDATA_520000+$1D80>>16
	STX.w DMA[$00].SourceBank
	LDY.b #$01
	LDA.w #$4280
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #FXDATA_520000+$1D80
	STA.w DMA[$00].SourceLo
	LDA.w #$0080
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	STA.w DMA[$00].SizeLo
	LDA.w #$4380
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #FXDATA_520000+$1F80
	STA.w DMA[$00].SourceLo
	STY.w !REGISTER_DMAEnable
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01B4E1:
	LDA.b #$01
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	JSL.l CODE_01C0CE
	REP.b #$20
	LDA.w $0B4A
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	INC
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0B4C
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_088E48>>16
	LDA.w #FXCODE_088E48
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $0B4C
	CLC
	ADC.w #$0008
	STA.w $0B4C
	CMP.w #$0101
	BCC.b CODE_01B548
	STZ.w $0B4C
	INC.w $0B4A
	LDA.w $0B4A
	CMP.w #$0002
	BCC.b CODE_01B548
	SEP.b #$20
	STZ.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_SubScreenWindowMask
	STZ.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STZ.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STZ.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.b #$20
	TRB.w !RAM_YI_Global_HDMAEnable
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	INC.w !RAM_YI_Global_CurrentGameMode
	JML.l CODE_1083E2

CODE_01B548:
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	SEP.b #$20
	LDA.b #$1F
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STA.w !RAM_YI_Global_SubScreenWindowMask
	LDA.b #$33
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STZ.w !RAM_YI_Global_BGWindowLogicSettings
	STZ.w !REGISTER_ColorAndObjectWindowLogicSettings
	LDA.b #$20
	TSB.w !RAM_YI_Global_HDMAEnable
	LDA.b #$0F
	STA.w $0200
	LDA.b #$01
	STA.w $0201
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_01B580:
	LDX.w $0B57
	CPX.b #$0D
	BCS.b CODE_01B58E
	JSL.l CODE_01C0CE
	LDX.w $0B57
CODE_01B58E:
	JSR.w (DATA_01B593-$01,x)
	PLB
	RTL

DATA_01B593:
	dw CODE_01E2BF
	dw CODE_01B5D7
	dw CODE_01B5D7
	dw CODE_01B5D8
	dw CODE_01E378
	dw CODE_01E442
	dw CODE_01B5E4
	dw CODE_01B6B9
	dw CODE_01B6C9
	dw CODE_01B95B
	dw CODE_01B9BA
	dw CODE_01E4A0
	dw CODE_01BA1C
	dw CODE_01BA2F
	dw CODE_01BA1C
	dw CODE_01BAD0
	dw CODE_01BA1C
	dw CODE_01BB5D
	dw CODE_01BA1C
	dw CODE_01BCBD
	dw CODE_01BA1C
	dw CODE_01BCF8
	dw CODE_01BA1C
	dw CODE_01BD50
	dw CODE_01BA1C
	dw CODE_01BDC3
	dw CODE_01BDCA
	dw CODE_01BA1C
	dw CODE_01BE00
	dw CODE_01BE63
	dw CODE_01BE9D

;---------------------------------------------------------------------------

CODE_01B5D1:
	INC.w $0B57
	INC.w $0B57
CODE_01B5D7:
	RTS

;---------------------------------------------------------------------------

CODE_01B5D8:
	LDA.w !RAM_YI_Global_HDMAEnable
	PHA
	JSR.w CODE_01E2F0
	PLA
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_01B5E4:
	REP.b #$20
	PHB
	LDX.b #$7E5DA6>>16
	PHX
	PLB
	LDX.b #$00
	LDA.w #$017F
CODE_01B5F0:
	STA.w $7E5DA6,x
	STA.w $7E5EA6,x
	STA.w $7E5FA6,x
	STA.w $7E60A6,x
	STA.w $7E6126,x
	DEX
	DEX
	BNE.b CODE_01B5F0
	PLB
	LDX.b #$00
CODE_01B606:
	LDA.w DATA_01B659,x
	STA.l $7E5E2E,x
	LDA.w DATA_01B689,x
	STA.l $7E60EE,x
	INX
	INX
	CPX.b #$30
	BCC.b CODE_01B606
	LDA.w #$0004
	STA.w !RAM_YI_Level_LevelHeaderAnimationTilesetLo
	STZ.w !RAM_YI_Level_LevelHeaderAnimationPaletteLo
	SEP.b #$20
	LDA.b #$0C
	STA.w $0127
	JMP.w CODE_01B5D1

;---------------------------------------------------------------------------

DATA_01B62D:
	dw $6800,$40BF,$18EE
	dw $68A0,$447F,$1A11
	dw $6860,$C029,$18EE
	dw $6861,$C029,$18EE
	dw $687E,$C029,$18EE
	dw $687F,$C029,$18EE
	dw $6B00,$413F,$18EE
	dw $FFFF

;---------------------------------------------------------------------------

DATA_01B659:
	dw $0145,$0146,$8145,$C146,$4145,$4146,$0145,$0146
	dw $8145,$8146,$4145,$0146,$0145,$8146,$0145,$0146
	dw $0145,$0146,$8145,$C146,$0145,$0146,$8145,$0146

DATA_01B689:
	dw $0145,$0146,$8145,$8146,$0145,$0146,$0145,$0146
	dw $8145,$8146,$0145,$8146,$0145,$8146,$8145,$0146
	dw $4145,$0146,$8145,$0146,$0145,$8146,$0145,$0146

;---------------------------------------------------------------------------

CODE_01B6B9:
	LDA.b #$18
	STA.w $0127
	JMP.w CODE_01B5D1

DATA_01B6C1:
	dw $3400,$47FF,$117F
	dw $FFFF

CODE_01B6C9:
	REP.b #$30
	LDX.w #$000A
	LDY.w #$0000
	STZ.b $00
CODE_01B6D3:
	LDA.w DATA_01B7D7,y
	JSR.w CODE_01B785
	CPY.w #$0016
	BCC.b CODE_01B6D3
	JSR.w CODE_01B7A1
	JSR.w CODE_01B7B3
	JSR.w CODE_01B7C5
	LDX.w #$03CE
	LDY.w #$0000
	STZ.b $00
CODE_01B6EF:
	LDA.w DATA_01B835,y
	JSR.w CODE_01B785
	CPY.w #$0015
	BCC.b CODE_01B6EF
	SEP.b #$30
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w !RAM_YI_Map_LevelHighScores,x
	REP.b #$30
	AND.w #$00FF
	STA.w $030C
	STZ.b $00
	LDA.w $030C
	CMP.w #$0064
	BCC.b CODE_01B71C
	LDA.w #$000B
	STA.b $00
	DEC
	BRA.b CODE_01B728

CODE_01B71C:
	CMP.w #$000A
	BCC.b CODE_01B728
	INC.b $00
	SBC.w #$000A
	BRA.b CODE_01B71C

CODE_01B728:
	ASL
	TAY
	LDA.w DATA_01B8AF,y
	STA.l $7E5DD4
	LDA.w DATA_01B92D,y
	STA.l $7E5E14
	LDA.b $00
	ASL
	TAY
	LDA.w DATA_01B8AF,y
	STA.l $7E5DD2
	LDA.w DATA_01B92D,y
	STA.l $7E5E12
	LDA.w #DATA_568000+$5000>>16
	STA.b $01
	LDY.w #$2800
	LDX.w #DATA_568000+$5000
	LDA.w #$0800
	JSL.l CODE_00BEA6
	LDA.w #FXDATA_520000+$1E00>>16
	STA.b $01
	LDY.w #$1000
	LDX.w #FXDATA_520000+$1E00
	LDA.w #$0100
	JSL.l CODE_00BEA6
	LDA.w #FXDATA_520000+$1EC0>>16
	STA.b $01
	LDY.w #$1100
	LDX.w #FXDATA_520000+$1EC0
	LDA.w #$0100
	JSL.l CODE_00BEA6
	SEP.b #$30
	JMP.w CODE_01B5D1

CODE_01B785:
	PHY
	AND.w #$00FF
	TAY
	LDA.w DATA_01B85F,y
	ORA.b $00
	STA.l $7E5DA6,x
	LDA.w DATA_01B8DD,y
	ORA.b $00
	STA.l $7E5DE6,x
	INX
	INX
	PLY
	INY
	RTS

CODE_01B7A1:
	LDX.w #$0108
	LDY.w #$0000
CODE_01B7A7:
	LDA.w DATA_01B7ED,y
	JSR.w CODE_01B785
	CPY.w #$0018
	BCC.b CODE_01B7A7
	RTS

CODE_01B7B3:
	LDX.w #$01C8
	LDY.w #$0000
CODE_01B7B9:
	LDA.w DATA_01B805,y
	JSR.w CODE_01B785
	CPY.w #$0018
	BCC.b CODE_01B7B9
	RTS

CODE_01B7C5:
	LDX.w #$0288
	LDY.w #$0000
CODE_01B7CB:
	LDA.w DATA_01B81D,y
	JSR.w CODE_01B785
	CPY.w #$0018
	BCC.b CODE_01B7CB
	RTS

DATA_01B7D7:
	dw $3C3A,$0E4E,$0C10,$4E0E,$0424,$221C,$3608,$3636
	dw $5436,$4E5C,$3C3A

DATA_01B7ED:
	dw $403E,$244E,$0026,$2422,$3636,$3636,$3636,$3450
	dw $5056,$6A68,$504E,$6E6C

DATA_01B805:
	dw $4846,$044E,$101C,$241A,$3636,$3636,$3636,$3450
	dw $5054,$6A68,$504E,$6E6C

DATA_01B81D:
	dw $4442,$0A4E,$1C16,$082C,$2422,$3636,$3636,$5036
	dw $5A34,$6A68,$504E,$6E6C

DATA_01B835:
	db $26,$1C,$26,$00,$16,$4E,$1E,$1C,$10,$1A,$26,$24,$36,$36,$36,$36
	db $36,$36,$50,$6C,$6E

DATA_01B84A:
	db $4E,$0E,$10,$0C,$0E,$4E,$24,$04,$1C,$22,$08,$36,$36,$36,$36,$36
	db $36,$36,$50,$6C,$6E

DATA_01B85F:
	dw $010A,$010B,$010C,$010D,$010E,$4106,$0120,$0121
	dw $0122,$0123,$0124,$C116,$0126,$0127,$0109,$0128
	dw $0129,$0128,$4102,$012C,$012D,$012E,$8136,$0101
	dw $0101,$0142,$0144,$0143,$017F,$012A,$012B,$0548
	dw $0549,$054A,$054B,$054C,$054D,$054E,$054F,$017F

DATA_01B8AF:
	dw $0109,$0100,$0102,$0102,$0103,$0104,$0105,$0106
	dw $0107,$C115,$0168,$0167,$0175,$0176,$017F,$017F
	dw $01C4,$010F,$01D6,$0164,$0174,$016E,$017F
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	dw $017F
endif

DATA_01B8DD:
	dw $011A,$011B,$011C,$011D,$011E,$011F,$0130,$0131
	dw $0132,$0133,$0134,$C106,$0136,$0137,$0119,$0138
	dw $0139,$0140,$0112,$013C,$013D,$013E,$8126,$0111
	dw $013C,$C142,$C144,$017F,$0141,$013A,$013B,$0508
	dw $0518,$0525,$0535,$052F,$053F,$050F,$0547,$017F

DATA_01B92D:
	dw $0119,$0110,$C142,$0112,$0113,$0114,$0115,$0116
	dw $0117,$C105,$0178,$0177,$0179,$017A,$015F,$017B
	dw $01D4,$013D,$01D7,$011E,$011E,$017E,$0158
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	dw $014F
endif

;---------------------------------------------------------------------------

CODE_01B95B:
	REP.b #$20
	STZ.w $0392
	STZ.w $0B5F
	STZ.w $0B61
	STZ.w $0B63
	STZ.w $0381
	SEP.b #$20
	LDA.b #$0F
	STA.w $0127
	JMP.w CODE_01B5D1

;---------------------------------------------------------------------------

DATA_01B976:
	dw $6862,$0001,$1A02
	dw $6863,$4033,$1A03
	dw $687D,$0001,$1A04
	dw $6882,$C025,$1A05
	dw $6883,$0001,$1A00
	dw $6884,$4031,$1A01
	dw $689D,$C025,$1A15
	dw $68A3,$C023,$1A10
	dw $6AE2,$0001,$1A12
	dw $6AE3,$4033,$1A13
	dw $6AFD,$0001,$1A14
	dw $FFFF

CODE_01B9BA:
	REP.b #$30
	LDA.w #$7E5DA6>>16
	STA.b $01
	LDY.w #$34A0
	LDX.w #$7E5DA6
	LDA.w #$0480
	JSL.l CODE_00BEA6
	LDX.w #$001C
CODE_01B9D1:
	LDA.l DATA_5FC094,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	LDA.l DATA_5FB31A,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	LDA.l DATA_5FB33A,x
	STA.l YI_Global_PaletteMirror[$71].LowByte,x
	DEX
	DEX
	BPL.b CODE_01B9D1
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	STZ.w $0948
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
	STZ.w $0B5B
	STZ.w $0B5D
	SEP.b #$30
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	AND.b #$0F
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDA.b #$04
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$01
	STA.w !RAM_YI_Global_SubScreenLayers
	JMP.w CODE_01B5D1

CODE_01BA1C:
	JSR.w CODE_01BEE4
	DEC.w $038B
	BNE.b CODE_01BA2E
	JSR.w CODE_01B5D1
	LDA.w $0B57
	CMP.b #$29
	BCS.b CODE_01BA2E
CODE_01BA2E:
	RTS

;---------------------------------------------------------------------------

CODE_01BA2F:
	JSR.w CODE_01BEE4
	REP.b #$30
	LDA.w !RAM_YI_Level_StarTimerLo
	SEC
	SBC.w #$000A
	STA.w !RAM_YI_Level_StarTimerLo
	BPL.b CODE_01BA69
	STZ.w !RAM_YI_Level_StarTimerLo
	SEP.b #$30
	LDA.b #$20
	STA.w $038B
	LDA.w !RAM_YI_Level_RedCoinsCollectedLo
	ORA.w !RAM_YI_Level_RedCoinsCollectedHi
	BNE.b CODE_01BA66
	JSR.w CODE_01B5D1
	JSR.w CODE_01B5D1
	LDA.w !RAM_YI_Level_FlowersCollectedLo
	ORA.w $03B9
	BNE.b CODE_01BA66
	JSR.w CODE_01B5D1
	JSR.w CODE_01B5D1
CODE_01BA66:
	JMP.w CODE_01B5D1

CODE_01BA69:
	STZ.b $02
	INC.w $0392
	STZ.w $0392
	LDA.w $0B5F
	INC
	CMP.w #$001E
	BCC.b CODE_01BA89
	LDA.w #$0400
	STA.b $00
	STA.b $02
	JSR.w CODE_01B7A1
	LDA.w #$001E
	BRA.b CODE_01BA95

CODE_01BA89:
	PHA
	SEP.b #$30
	LDA.b #!Define_YI_SoundID5A_PulleySqueak
	JSL.l CODE_0085D2
	REP.b #$30
	PLA
CODE_01BA95:
	STA.w $0B5F
	LDX.w #$0000
CODE_01BA9B:
	CMP.w #$000A
	BCC.b CODE_01BAA6
	INX
	SBC.w #$000A
	BRA.b CODE_01BA9B

CODE_01BAA6:
	STA.b $00
	LDA.w #$7E5EC8>>16
	STA.b $06
	STA.b $09
	STA.b $12
	STA.b $15
	LDA.w #$7E5EC8
	STA.b $04
	CLC
	ADC.w #$000E
	STA.w $0010
	LDA.w #$7E5F08
	STA.b $07
	CLC
	ADC.w #$000E
	STA.b $13
	JSR.w CODE_01BBD4
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

CODE_01BAD0:
	JSR.w CODE_01BEE4
	REP.b #$30
	LDA.w $0B61
	CMP.w #$0014
	BCS.b CODE_01BAE5
	DEC.w !RAM_YI_Level_RedCoinsCollectedLo
	LDA.w !RAM_YI_Level_RedCoinsCollectedLo
	BPL.b CODE_01BAFD
CODE_01BAE5:
	SEP.b #$30
	LDA.b #$20
	STA.w $038B
	LDA.w !RAM_YI_Level_FlowersCollectedLo
	ORA.w $03B9
	BNE.b CODE_01BAFA
	JSR.w CODE_01B5D1
	JSR.w CODE_01B5D1
CODE_01BAFA:
	JMP.w CODE_01B5D1

CODE_01BAFD:
	STZ.b $02
	LDA.w $0B61
	INC
	CMP.w #$0014
	BCC.b CODE_01BB17
	LDA.w #$0400
	STA.b $00
	STA.b $02
	JSR.w CODE_01B7B3
	LDA.w #$0014
	BRA.b CODE_01BB23

CODE_01BB17:
	PHA
	SEP.b #$30
	LDA.b #!Define_YI_SoundID5A_PulleySqueak
	JSL.l CODE_0085D2
	REP.b #$30
	PLA
CODE_01BB23:
	STA.w $0B61
	LDX.w #$0000
CODE_01BB29:
	CMP.w #$000A
	BCC.b CODE_01BB34
	INX
	SBC.w #$000A
	BRA.b CODE_01BB29

CODE_01BB34:
	STA.b $00
	LDA.w #$7E5F88>>16
	STA.b $06
	STA.b $09
	STA.b $12
	STA.b $15
	LDA.w #$7E5F88
	STA.b $04
	CLC
	ADC.w #$000E
	STA.b $10
	LDA.w #$7E5FC8
	STA.b $07
	CLC
	ADC.w #$000E
	STA.b $13
	JSR.w CODE_01BBD4
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

CODE_01BB5D:
	JSR.w CODE_01BEE4
	REP.b #$30
	DEC.w !RAM_YI_Level_FlowersCollectedLo
	LDA.w !RAM_YI_Level_FlowersCollectedLo
	BPL.b CODE_01BB77
	STZ.w !RAM_YI_Level_FlowersCollectedLo
	SEP.b #$30
	LDA.b #$20
	STA.w $038B
	JMP.w CODE_01B5D1

CODE_01BB77:
	STZ.b $02
	LDA.w $0B63
	CLC
	ADC.w #$000A
	STA.w $0B63
	LDX.w #$0000
CODE_01BB86:
	CMP.w #$000A
	BCC.b CODE_01BB91
	INX
	SBC.w #$000A
	BRA.b CODE_01BB86

CODE_01BB91:
	CPX.w #$0005
	BCC.b CODE_01BBA2
	PHX
	LDA.w #$0400
	STA.b $00
	STA.b $02
	JSR.w CODE_01B7C5
	PLX
CODE_01BBA2:
	LDA.w #$FFFF
	STA.b $00
	LDA.w #$7E604C>>16
	STA.b $06
	STA.b $09
	STA.b $12
	STA.b $15
	LDA.w #$7E604C
	STA.b $04
	CLC
	ADC.w #$000A
	STA.b $10
	LDA.w #$7E608C
	STA.b $07
	CLC
	ADC.w #$000A
	STA.b $13
	JSR.w CODE_01BBD4
	SEP.b #$30
	LDA.b #!Define_YI_SoundID5A_PulleySqueak
	JSL.l CODE_0085D2
	RTS

;---------------------------------------------------------------------------

CODE_01BBD4:
	PHX
	TXA
	BEQ.b CODE_01BBEC
	ASL
	TAX
	LDA.w DATA_01B8AF,x
	ORA.b $02
	STA.b [$04]
	STA.b [$10]
	LDA.w DATA_01B92D,x
	ORA.b $02
	STA.b [$07]
	STA.b [$13]
CODE_01BBEC:
	LDY.w #$0002
	LDA.b $00
	BMI.b CODE_01BC07
	ASL
	TAX
	LDA.w DATA_01B8AF,x
	ORA.b $02
	STA.b [$04],y
	STA.b [$10],y
	LDA.w DATA_01B92D,x
	ORA.b $02
	STA.b [$07],y
	STA.b [$13],y
CODE_01BC07:
	PLX
	LDA.b $00
	BPL.b CODE_01BC0E
	STZ.b $00
CODE_01BC0E:
	INC.b $00
	LDA.b $13
	CLC
	ADC.w #$0006
	STA.b $13
	JSR.w CODE_01BCAA
	STZ.b $00
	STZ.b $02
	LDX.w #$0004
	LDA.w $0B5F
	CLC
	ADC.w $0B61
	CLC
	ADC.w $0B63
	CMP.w #$0064
	BCC.b CODE_01BC35
	LDA.w #$0064
CODE_01BC35:
	STA.w $0381
	CMP.w #$0064
	BCC.b CODE_01BC45
	LDA.w #$000B
	STA.b $00
	DEC
	BRA.b CODE_01BC51

CODE_01BC45:
	CMP.w #$000A
	BCC.b CODE_01BC51
	INC.b $00
	SBC.w #$000A
	BRA.b CODE_01BC45

CODE_01BC51:
	ASL
	TAX
	LDA.w DATA_01B8AF,x
	STA.l $7E6198
	LDA.w DATA_01B92D,x
	STA.l $7E61D8
	LDA.b $00
	BEQ.b CODE_01BC75
CODE_01BC64:
	ASL
	TAY
	LDA.w DATA_01B8AF,y
	STA.l $7E6196
	LDA.w DATA_01B92D,y
	STA.l $7E61D6
CODE_01BC75:
	LDA.b $02
	ASL
	TAY
	BEQ.b CODE_01BC89
	LDA.w DATA_01B8AF,y
	STA.l $7E6194
	LDA.w DATA_01B92D,y
	STA.l $7E61D4
CODE_01BC89:
	TXA
	ORA.b $02
	TAX
	STZ.b $02
	LDA.w #$61DC
	STA.b $13
	JSR.w CODE_01BCAA
	LDA.w #$7E5DA6>>16
	STA.b $01
	LDY.w #$34A0
	LDX.w #$7E5DA6
	LDA.w #$0480
	JSL.l CODE_00BEA6
	RTS

;---------------------------------------------------------------------------

CODE_01BCAA:
	TXA
	BNE.b CODE_01BCB5
	LDA.b $00
	BEQ.b CODE_01BCBC
	DEC
	DEC
	BEQ.b CODE_01BCBC
CODE_01BCB5:
	LDA.w #$016F
	ORA.b $02
	STA.b [$13]
CODE_01BCBC:
	RTS

;---------------------------------------------------------------------------

CODE_01BCBD:
	JSR.w CODE_01BEE4
	LDA.b #$30
	STA.w $038B
	REP.b #$30
	STZ.w $03BA
	LDX.w #$0029
	LDA.w $0381
	BMI.b CODE_01BCDA
	CMP.w $030C
	BCC.b CODE_01BCDA
	LDX.w #$002D
CODE_01BCDA:
	STX.w $0B57
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

DATA_01BCE0:
	dw $6218,$621A,$621C,$61DA,$621A,$621C

DATA_01BCEC:
	dw $0555,$0556,$0557,$015F,$0565,$0566

CODE_01BCF8:
	JSR.w CODE_01BEE4
	LDA.b #$7E
	STA.b $02
	REP.b #$30
	LDA.w $03BA
	AND.w #$00FE
	TAX
	CPX.w #$000C
	BCC.b CODE_01BD15
	LDA.w #$003D
	STA.w $0B57
	BRA.b CODE_01BD25

CODE_01BD15:
	LDA.w DATA_01BCE0,x
	STA.b $00
	LDA.w DATA_01BCEC,x
	STA.b [$00]
	INC.w $03BA
	JSR.w CODE_01BC89
CODE_01BD25:
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

DATA_01BD28:
	dw $6218,$6216,$6214,$61D4,$6194,$6156,$6158,$615A
	dw $619A,$61DA

DATA_01BD3C:
	dw $0562,$0561,$0560,$0563,$0553,$0550,$0551,$0552
	dw $0554,$015F

CODE_01BD50:
	JSR.w CODE_01BEE4
	LDA.b #$7E
	STA.b $02
	LDA.b #$30
	STA.w $038B
	REP.b #$30
	LDA.w $03BA
	AND.w #$00FE
	TAX
	CPX.w #$0014
	BCC.b CODE_01BD80
	LDX.w #$0037
	LDA.w $0381
	CMP.w #$0064
	BNE.b CODE_01BD7B
	STZ.w $03BA
	LDX.w #$0031
CODE_01BD7B:
	STX.w $0B57
	BRA.b CODE_01BD90

CODE_01BD80:
	LDA.w DATA_01BD28,x
	STA.b $00
	LDA.w DATA_01BD3C,x
	STA.b [$00]
	INC.w $03BA
	JSR.w CODE_01BC89
CODE_01BD90:
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

DATA_01BD93:
	dw $6218,$6216,$6214,$61D4,$6194,$6154,$6156,$6158
	dw $615A,$619A,$61DA,$621A

DATA_01BDAB:
	dw $056B,$056A,$0569,$056D,$055D,$0559,$055A,$055B
	dw $055C,$055E,$015F,$056C

CODE_01BDC3:
	LDA.b #!Define_YI_SoundID95_BonusChallenge
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	JSR.w CODE_01B5D1
CODE_01BDCA:
	JSR.w CODE_01BEE4
	LDA.b #$7E
	STA.b $02
	REP.b #$30
	LDA.w $03BA
	AND.w #$00FE
	TAX
	CPX.w #$0018
	BCC.b CODE_01BDED
	LDA.w #$0037
	STA.w $0B57
	LDA.w #$0030
	STA.w $038B
	BRA.b CODE_01BDFD

CODE_01BDED:
	LDA.w DATA_01BD93,x
	STA.b $00
	LDA.w DATA_01BDAB,x
	STA.b [$00]
	INC.w $03BA
	JSR.w CODE_01BC89
CODE_01BDFD:
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

CODE_01BE00:
	JSR.w CODE_01BEE4
	REP.b #$30
	LDA.w $0381
	CMP.w $030C
	BCS.b CODE_01BE15
	LDA.w #$003D
	STA.w $0B57
	BRA.b CODE_01BE60

CODE_01BE15:
	STA.w $030C
	STZ.b $00
	CMP.w #$0064
	BCC.b CODE_01BE27
	LDA.w #$000B
	STA.b $00
	DEC
	BRA.b CODE_01BE33

CODE_01BE27:
	CMP.w #$000A
	BCC.b CODE_01BE33
	INC.b $00
	SBC.w #$000A
	BRA.b CODE_01BE27

CODE_01BE33:
	ASL
	TAY
	LDA.w DATA_01B8AF,y
	STA.l $7E5DD4
	LDA.w DATA_01B92D,y
	STA.l $7E5E14
	LDA.b $00
	ASL
	TAY
	BEQ.b CODE_01BE5A
	LDA.w DATA_01B8AF,y
	STA.l $7E5DD2
	LDA.w DATA_01B92D,y
	STA.l $7E5E12
	JSR.w CODE_01BC89
CODE_01BE5A:
	INC.w $0B57
	INC.w $0B57
CODE_01BE60:
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

CODE_01BE63:
	REP.b #$30
	LDA.w #$0570
	STA.l $7E5DB0
	STA.l $7E5DD8
	LDA.w #$0572
	STA.l $7E5DF0
	STA.l $7E5E18
	LDA.w #$0571
	STA.l $7E5DB2
	STA.l $7E5DDA
	LDA.w #$0573
	STA.l $7E5DF2
	STA.l $7E5E1A
	JSR.w CODE_01BC89
	INC.w $0B57
	INC.w $0B57
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

CODE_01BE9D:
	JSR.w CODE_01BEE4
	LDA.b $36
	ORA.b $35
	AND.b #$F0
	BEQ.b CODE_01BEE3
	JSL.l CODE_01B2B7
	LDX.b #!Define_YI_GameMode1F
	LDA.w !RAM_YI_Level_DoBonusChallengeFlagLo
	BPL.b CODE_01BEB8
	JSR.w CODE_01BF38
	LDX.b #!Define_YI_GameMode29
CODE_01BEB8:
	STX.w !RAM_YI_Global_CurrentGameMode
	LDA.b #!Define_YI_MusicID_FadeMusicCommand
	STA.b !RAM_YI_Global_PlayMusicLo
	INC.w $0220
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w $030C
	CMP.w !RAM_YI_Map_LevelHighScores,x
	BEQ.b CODE_01BEE0
	BCC.b CODE_01BEE0
	PHA
	LDA.w !RAM_YI_Map_LevelClearFlags,x
	AND.b #$7F
	BEQ.b CODE_01BEDF
	LDA.w !RAM_YI_Map_LevelHighScores,x
	ORA.b #$80
	STA.w $0220
CODE_01BEDF:
	PLA
CODE_01BEE0:
	STA.w !RAM_YI_Map_LevelHighScores,x
CODE_01BEE3:
	RTS

;---------------------------------------------------------------------------

CODE_01BEE4:
	LDA.w $0B57
	CMP.b #$3D
	BCC.b CODE_01BF22
	DEC.w $0B5D
	BPL.b CODE_01BF22
	LDA.b #$05
	STA.w $0B5D
	REP.b #$30
	LDA.w $0B5B
	TAX
	LDA.w DATA_01BF23+$02,x
	AND.w #$00FF
	STA.b $01
	LDY.w #$2800
	LDA.w DATA_01BF23,x
	TAX
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$30
	LDA.w $0B5B
	INC
	INC
	INC
	CMP.b #$09
	BCC.b CODE_01BF1F
	LDA.b #$00
CODE_01BF1F:
	STA.w $0B5B
CODE_01BF22:
	RTS

DATA_01BF23:
	dl DATA_568000+$5000
	dl DATA_568000+$5800
	dl DATA_568000+$6000

;---------------------------------------------------------------------------

DATA_01BF2C:
	db !Define_YI_BonusID_FlipCards,!Define_YI_BonusID_ScratchAndMatch
	db !Define_YI_BonusID_DrawingLots,!Define_YI_BonusID_SlotMachine
	db !Define_YI_BonusID_MatchCards,!Define_YI_BonusID_Roulette
	db !Define_YI_BonusID_DrawingLots,!Define_YI_BonusID_ScratchAndMatch
	db !Define_YI_BonusID_FlipCards,!Define_YI_BonusID_Roulette
	db !Define_YI_BonusID_MatchCards,!Define_YI_BonusID_SlotMachine

CODE_01BF38:
	JSL.l CODE_008408
	AND.b #$01
	STA.b $00
	LDA.w !RAM_YI_Level_CurrentWorldLo
	CLC
	ADC.b $00
	TAX
	LDA.w DATA_01BF2C,x
	STA.w !RAM_YI_Level_CurrentBonusGame
	CMP.b #!Define_YI_BonusID_Roulette
	BNE.b CODE_01BF5D
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	DEC
	BNE.b CODE_01BF5D
	LDA.w DATA_01BF2C-$01,x
	STA.w !RAM_YI_Level_CurrentBonusGame
CODE_01BF5D:
	RTS

;---------------------------------------------------------------------------

DATA_01BF5E:
	dw FXDATA_520000+$4000,FXDATA_520000+$4040,FXDATA_520000+$4080,FXDATA_520000+$40C0,FXDATA_520000+$4100,FXDATA_520000+$4140,FXDATA_520000+$4180,FXDATA_520000+$41C0
	dw FXDATA_520000+$4400,FXDATA_520000+$4440

DATA_01BF72:
	dw $1600,$1620,$1640,$1660,$1A00,$1A20,$1A40,$1A60
	dw $1A80,$1AA0

DATA_01BF86:
	dw $2612,$2828,$320C,$2020,$32C8,$2030,$72C8,$3020
	dw $B2C8,$3030,$F2C8,$28C8,$320C,$20C0,$32C8,$20D0
	dw $72C8,$30C0,$B2C8,$30D0,$F2C8

DATA_01BFB0:
	dw $FFF0,$0010

DATA_01BFB4:
	dw $0000,$0000,$FFEA,$0010

DATA_01BFBC:
	dw $0300,$30C4,$0008,$30D5,$0500,$B0C4,$0808,$B0D5
	dw $0000,$70D5,$0308,$70C4,$0800,$F0D5,$0508,$F0C4
	dw $0003,$30C4,$0005,$70C4,$0800,$F0C5,$0808,$B0C5
	dw $0000,$70C5,$0008,$30C5,$0803,$B0C4,$0805,$F0C4
	dw $03FF,$023F,$001F,$4010,$7C00,$7E00,$47E0,$03F4
	dw $03FF,$023F,$001F,$7D93,$7FFF,$7FFF,$7FFF,$7DF5
	dw $7FF7,$7FF9,$7DF5,$7FF9,$7FFF,$0000,$0000,$0000
	dw $0000,$0000,$0000,$7D93,$7FFF,$7FFF,$7EBA,$7E17
	dw $7FF7,$7F18,$7E76,$7FFB,$7FFD,$0000,$0000,$0000
	dw $0000,$0000,$0000,$7D93,$7FFF,$7FFF,$7E17,$7EBA
	dw $7FF7,$7E76,$7F18,$7FFD,$7FFB,$0000,$0000,$0000
	dw $0000,$0000,$0000,$7D93,$7FFF,$7FFF,$7DF5,$7FFF
	dw $7FF7,$7DF5,$7FF9,$7FFF,$7FF9,$0000,$0000,$0000
	dw $0000,$0000,$0000,$3B1D,$7759,$3B59

DATA_01C098:
	dw $0001,$0000,$FFFF,$0000,$FFFE,$0000,$FFFF,$0000

DATA_01C0A8:
	dw $FFFE,$0000,$0002,$0000,$FFFE,$0000,$FFFC,$0000

DATA_01C0B8:
	dw $0707,$1717,$2727,$3737,$4747,$5757,$6767,$7777
	dw $01FF,$02FE,$2800

CODE_01C0CE:
	PHB
	PHK
	PLB
	STZ.b $36
	STZ.b $35
	STZ.b $38
	STZ.b $37
CODE_01C0D9:
	LDA.b #$10
	STA.w $0B83
	STZ.w $0B84
	LDA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_01C0FF
	JSL.l CODE_01DE5A
	JMP.w CODE_01C16E

DATA_01C0ED:
	dw CODE_01DAC3
	dw CODE_01DAE6
	dw CODE_01DAEB
	dw CODE_01DB0E
	dw CODE_01DB00
	dw CODE_01DB25
	dw CODE_01DB5C
	dw CODE_01DB79
	dw CODE_01DB7E

CODE_01C0FF:
	LDA.w !RAM_YI_Level_CurrentPauseScreenState
	BNE.b CODE_01C137
	LDA.b $38
	AND.b #$10
	BEQ.b CODE_01C125
	LDA.w $7FEA
	ORA.w $0B65
	ORA.w $0B59
	ORA.w !RAM_YI_Level_ItemBeingUsed
	ORA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	BNE.b CODE_01C125
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.b #!Define_YI_PlayerState06
	BCC.b CODE_01C128
CODE_01C125:
	JMP.w CODE_01C16E

CODE_01C128:
	LDA.w !RAM_YI_Level_ActivePauseScreenFlag
	EOR.b #$01
	AND.b #$01
	STA.w !RAM_YI_Level_ActivePauseScreenFlag
	LDA.b #$01
	STA.w !RAM_YI_Level_CurrentPauseScreenState
CODE_01C137:
	LDA.b $38
	AND.b #$20
	BEQ.b CODE_01C16B
if !Define_YI_Global_EnableDebugFeatures == !TRUE
	NOP #2
else
	BRA.b CODE_01C14B
endif

ADDR_01C13F:
	LDA.w !RAM_YI_Global_CurrentSaveFile
	CMP.b #$02
	BNE.b CODE_01C14B
	INC.w $0220
	BRA.b CODE_01C155

CODE_01C14B:
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w !RAM_YI_Map_LevelClearFlags,x
	AND.b #$7F
	BEQ.b CODE_01C16B
CODE_01C155:
	LDA.b #!Define_YI_MusicID_StopMusicCommand
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.b #!Define_YI_SoundID01_Unpause
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	CPX.b #!Define_YI_LevelID_WelcomeToYoshisIsland
	BNE.b CODE_01C164
	STZ.w !RAM_YI_Level_CurrentLevelFromMapLo
CODE_01C164:
	LDA.b #!Define_YI_GameMode1E
	STA.w !RAM_YI_Global_CurrentGameMode
	PLB
	RTL

CODE_01C16B:
	JMP.w CODE_01CA9B

CODE_01C16E:
	LDA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01C18B
	LDX.w $039C
	BEQ.b CODE_01C17D
	DEC.w $039C
	BRA.b CODE_01C18B

CODE_01C17D:
	ASL
	TAX
	REP.b #$20
	JSR.w (DATA_01C0ED-$02,x)
	SEP.b #$20
	BRA.b CODE_01C18B

CODE_01C188:
	PHB
	PHK
	PLB
CODE_01C18B:
	JSL.l CODE_008259
	JSL.l CODE_04FD28
	JSL.l CODE_109058
	JSL.l CODE_108C9A
	REP.b #$20
	LDA.b !RAM_YI_Global_Layer1YPosLo
	PHA
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_01C1F8
	LDA.w $61C8
	BEQ.b CODE_01C1C7
	PHA
	LDA.w $61C6
	BEQ.b CODE_01C1B9
	DEC.w $61C6
CODE_01C1B9:
	PLA
	DEC.w $61C8
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_01C0A8,y
	BRA.b CODE_01C1D7

CODE_01C1C7:
	LDA.w $61C6
	BEQ.b CODE_01C1F8
	DEC.w $61C6
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_01C098,y
CODE_01C1D7:
	STA.w $0CB0
	CLC
	ADC.b !RAM_YI_Global_Layer1YPosLo
	STA.b !RAM_YI_Global_Layer1YPosLo
	STA.w $609C
	LDY.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CPY.b #$09
	BEQ.b CODE_01C1ED
	CPY.b #$0A
	BNE.b CODE_01C1F8
CODE_01C1ED:
	LDA.w $0CB0
	CLC
	ADC.b !RAM_YI_Global_Layer3YPosLo
	STA.b !RAM_YI_Global_Layer3YPosLo
	STA.w $60A0
CODE_01C1F8:
	SEP.b #$20
	LDX.w $61CA
	BEQ.b CODE_01C202
	JSR.w (DATA_01D916-$01,x)
CODE_01C202:
	JSL.l CODE_0394D3
	JSL.l CODE_04FA67
	JSL.l CODE_04DD9E
	JSL.l CODE_0397DF
	JSR.w CODE_01D6B1
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$09
	BEQ.b CODE_01C224
	LDA.w !RAM_YI_Level_LevelHeaderAnimationPaletteLo
	ASL
	TAX
	JSR.w (DATA_01C454,x)
CODE_01C224:
	LDA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	BEQ.b CODE_01C232
	DEC.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	AND.b #$0F
	TAX
	LDA.w DATA_01C0B8,x
CODE_01C232:
	STA.w !RAM_YI_Global_MosaicSizeAndBGEnable
	REP.b #$20
	PLA
	STA.b !RAM_YI_Global_Layer1YPosLo
	STA.w $609C
	LDA.w $61B2
	AND.w #$A000
	STA.w $0387
	LDA.w $0C8A
	ORA.w $614E
	ORA.w $0B4C
	ORA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w $0B57
	ORA.w $0B59
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01C260
	LDA.w #$0001
CODE_01C260:
	ORA.w $0387
	STA.w $0387
	BNE.b CODE_01C29D
	LDA.w $0389
	BEQ.b CODE_01C29D
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_MaxRegenStarTimerThreshold+$01
	LDA.w #!Define_YI_SoundID57_LoseStarsTimerAbove10
	BCS.b CODE_01C27B
	LDA.w #!Define_YI_SoundID58_LoseStarsTimerUnder10
CODE_01C27B:
	JSL.l CODE_0085D2
	LDY.w !RAM_YI_Level_TutorialMessageFlagsLo
	BMI.b CODE_01C29D
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	BEQ.b CODE_01C28D					; Note: !Define_YI_LevelID_MakeEggsThrowEggs
	CPY.b #!Define_YI_LevelID_WelcomeToYoshisIsland
	BNE.b CODE_01C29D
CODE_01C28D:
	LDA.w #!Define_YI_TutorialMessage_BabyMarioLost
	TSB.w !RAM_YI_Level_TutorialMessageFlagsLo
	INC.w !RAM_YI_Level_MessageBoxState 
	LDA.w #$002C
	STA.l $704070
CODE_01C29D:
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_RT_00DE67
	LDA.w $0B7F
	BEQ.b CODE_01C2AE
	DEC.w $0B7F
CODE_01C2AE:
	LDA.w $0B4C
	ORA.w $0B57
	ORA.w $0B59
	BNE.b CODE_01C2E2
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_MaxRegenStarTimerThreshold
	BCC.b CODE_01C2F2
	LDA.w $0387
	BEQ.b CODE_01C2FA
	LDA.w $0B7F
	BNE.b CODE_01C2EF
	LDA.b $35
	ORA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_01C2E2
	LDA.w $0B7D
	CMP.w #$0060
	BCS.b CODE_01C2EF
	INC.w $0B7D
	BRA.b CODE_01C2E5

CODE_01C2E2:
	STZ.w $0B7D
CODE_01C2E5:
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$0D
	BEQ.b CODE_01C2EF
	JMP.w CODE_01C450

CODE_01C2EF:
	JMP.w CODE_01C3C7

CODE_01C2F2:
	STZ.w $0B7D
	LDA.w $0387
	BNE.b CODE_01C2EF
CODE_01C2FA:
	LDX.b #$04
	LDA.w $7680
	SEC
	SBC.w #$0008
	CMP.w #$00E0
	BCS.b CODE_01C314
	LDA.w $7682
	SEC
	SBC.w #$0010
	CMP.w #$00C1
	BCC.b CODE_01C342
CODE_01C314:
	LDA.w $7682
	SEC
	SBC.w #$0064
	STA.b $04
	BPL.b CODE_01C323
	EOR.w #$FFFF
	INC
CODE_01C323:
	STA.b $06
	LDA.w $7680
	SEC
	SBC.w #$0078
	STA.b $00
	BPL.b CODE_01C334
	EOR.w #$FFFF
	INC
CODE_01C334:
	STA.b $02
	CMP.b $06
	BCC.b CODE_01C33C
	LDX.b #$00
CODE_01C33C:
	LDA.b $00,x
	BPL.b CODE_01C342
	INX
	INX
CODE_01C342:
	LDA.w $7680
	CLC
	ADC.w DATA_01BFB0,x
	CMP.w #$0002
	BPL.b CODE_01C351
	LDA.w #$0002
CODE_01C351:
	CMP.w #$00EF
	BMI.b CODE_01C359
	LDA.w #$00EE
CODE_01C359:
	STA.b $02
	LDA.w $7682
	CLC
	ADC.w DATA_01BFB4,x
	CMP.w #$000A
	BPL.b CODE_01C36A
	LDA.w #$000A
CODE_01C36A:
	CMP.w #$00C8
	BMI.b CODE_01C372
	LDA.w #$00C7
CODE_01C372:
	STA.b $03
	TXA
	ASL
	ASL
	ASL
	TAX
	LDA.w $7974
	AND.w #$0004
	LSR
	ADC.w #$0002
	XBA
	STA.b $00
	CLC
	LDA.b $02
	ADC.w DATA_01BFBC,x
	STA.w $6A14
	LDA.w DATA_01BFBC+$02,x
	ORA.b $00
	STA.w $6A16
	LDA.b $02
	ADC.w DATA_01BFBC+$04,x
	STA.w $6A18
	LDA.w DATA_01BFBC+$06,x
	ORA.b $00
	STA.w $6A1A
	LDA.b $02
	ADC.w DATA_01BFBC+$08,x
	STA.w $6A1C
	LDA.w DATA_01BFBC+$0A,x
	ORA.b $00
	STA.w $6A1E
	LDA.b $02
	ADC.w DATA_01BFBC+$0C,x
	STA.w $6A20
	LDA.w DATA_01BFBC+$0E,x
	ORA.b $00
	STA.w $6A22
CODE_01C3C7:
	LDA.w $03A1
	BEQ.b CODE_01C3EC
	ASL
	TAX
	LDA.w DATA_01BF72,x
	STA.w $6140
	XBA
	TAX
	INX
	INX
	STX.w $6143
	LDA.w $03A3
	ASL
	TAX
	LDA.w DATA_01BF72,x
	STA.w $6144
	XBA
	TAX
	INX
	INX
	BRA.b CODE_01C405

CODE_01C3EC:
	LDA.w $03A3
	ASL
	TAX
	LDA.w DATA_01BF5E,x
	STA.w $6140
	CLC
	ADC.w #$0020
	STA.w $6144
	XBA
	TAX
	INX
	INX
	STX.w $6143
CODE_01C405:
	STX.w $6147
	LDX.b #(FXDATA_520000+$4000)>>16
	STX.w $6142
	STX.w $6146
	LDA.w #$02AA
	STA.w $6C00
	STZ.w $6C02
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$0D
	BEQ.b CODE_01C437
	LDA.w $60B0
	SEC
	SBC.w #$0058
	CMP.w #$0040
	BCC.b CODE_01C43C
	LDX.b #$00
	LDA.w $60B0
	SEC
	SBC.w #$0078
	BPL.b CODE_01C439
CODE_01C437:
	LDX.b #$01
CODE_01C439:
	STX.w $0B81
CODE_01C43C:
	LDX.w $0B81
	LDY.w DATA_01BF86,x
	LDX.b #$12
CODE_01C444:
	LDA.w DATA_01BF86+$02,y
	STA.w $6A00,x
	DEY
	DEY
	DEX
	DEX
	BPL.b CODE_01C444
CODE_01C450:
	SEP.b #$20
	PLB
	RTL

DATA_01C454:
	dw CODE_01C47E
	dw CODE_01C493
	dw CODE_01C4D9
	dw CODE_01C54D
	dw CODE_01C584
	dw CODE_01C5BE
	dw CODE_01C5F2
	dw CODE_01C62D
	dw CODE_01C682
	dw CODE_01C6BB
	dw CODE_01C702
	dw CODE_01C728
	dw CODE_01C783
	dw CODE_01C7F2
	dw CODE_01C84E
	dw CODE_01C897
	dw CODE_01C8CB
	dw CODE_01C906
	dw CODE_01C955
	dw CODE_01C968
	dw CODE_01C968

CODE_01C47E:
	RTS

;---------------------------------------------------------------------------

DATA_01C47F:
	dw DATA_5FEB4A,DATA_5FEB64,DATA_5FEB7E,DATA_5FEB98,DATA_5FEBB2,DATA_5FEBCC,DATA_5FEBE6,DATA_5FEC00

DATA_01C48F:
	db $30,$10,$50,$10

CODE_01C493:
	REP.b #$20
	DEC.w $0B75
	LDA.w $0B75
	BPL.b CODE_01C4C0
	LDA.w $0B73
	INC
	INC
	AND.w #$000E
	STA.w $0B73
	BNE.b CODE_01C4BA
	JSL.l CODE_128875
	AND.w #$0003
	TAX
	LDA.w DATA_01C48F,x
	AND.w #$00FF
	BRA.b CODE_01C4BD

CODE_01C4BA:
	LDA.w #$0004
CODE_01C4BD:
	STA.w $0B75
CODE_01C4C0:
	LDX.w $0B73
	LDA.w DATA_01C47F,x
	STA.b $00
	LDA.w #$001A
	STA.b $0E
	LDX.b #$86
	JSR.w CODE_01C9CF
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C4D5:
	db $00,$40,$40,$40

CODE_01C4D9:
	REP.b #$10
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $7E12
	BMI.b CODE_01C4FB
	BNE.b CODE_01C4F8
	LDY.w $60A8
	BNE.b CODE_01C4F6
	LDX.w $0B73
	CPX.w #$0001
	BEQ.b CODE_01C4FE
	STZ.w $0B75
CODE_01C4F6:
	LDA.b #$01
CODE_01C4F8:
	EOR.b #$FF
	INC
CODE_01C4FB:
	SEC
	SBC.b #$06
CODE_01C4FE:
	SEP.b #$10
	CLC
	ADC.w $0B75
	STA.w $0B75
	BPL.b CODE_01C54C
	LDX.w $0B73
	INX
	CPX.b #$04
	BCC.b CODE_01C513
	LDX.b #$00
CODE_01C513:
	STX.w $0B73
	LDA.l DATA_01C4D5,x
	BNE.b CODE_01C524
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.b #$E0
	CLC
	ADC.b #$20
CODE_01C524:
	STA.w $0B75
	TXA
	ASL
	ADC.w $0B73
	ASL
	TAX
	PHB
	LDA.b #$70200A>>16
	PHA
	PLB
	REP.b #$20
	LDY.b #$00
CODE_01C537:
	LDA.l DATA_5FA190,x
	STA.w $702D76,y
	STA.w $70200A,y
	INX
	INX
	INY
	INY
	CPY.b #$06
	BCC.b CODE_01C537
	SEP.b #$20
	PLB
CODE_01C54C:
	RTS

;---------------------------------------------------------------------------

CODE_01C54D:
	LDA.w $7974
	AND.b #$18
	ASL
	ASL
	ADC.b #$1E
	TAX
	PHB
	LDA.b #$7020E0>>16
	PHA
	PLB
	REP.b #$20
	LDY.b #$1E
CODE_01C560:
	LDA.l DATA_5FCCEA,x
	STA.w $702E4C,y
	STA.w $7020E0,y
CODE_01C56A:
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_01C560
	SEP.b #$20
	PLB
	RTS

;---------------------------------------------------------------------------

DATA_01C574:
	dw DATA_5FEA5A,DATA_5FEA78,DATA_5FEA96,DATA_5FEAB4,DATA_5FEAD2,DATA_5FEAF0,DATA_5FEB0E,DATA_5FEB2C

CODE_01C584:
	LDA.w $7974
	AND.b #$1C
	LSR
	TAX
	LDA.b #DATA_5FEA5A>>16
	STA.b $02
	REP.b #$20
	LDA.w $7FE4
	CLC
	ADC.w #$0000
	STA.w $7FE4
	LDA.w DATA_01C574,x
	STA.b $00
	PHB
	LDY.b #$7020E2>>16
	PHY
	PLB
	LDY.b #$00
CODE_01C5A7:
	LDA.b [$00],y
	STA.w $702E4E,y
	STA.w $7020E2,y
	INY
	INY
	CPY.b #$1E
	BCC.b CODE_01C5A7
	SEP.b #$20
	PLB
	LDA.b #$10
	STA.w $0D43
	RTS

;---------------------------------------------------------------------------

CODE_01C5BE:
	JSR.w CODE_01C644
CODE_01C5C1:
	INC.w $0B73
	LDA.w $0B73
	AND.b #$38
	ASL
	TAX
	PHB
	LDA.b #$7020E2>>16
	PHA
	PLB
	REP.b #$20
	LDY.b #$00
CODE_01C5D4:
	LDA.l DATA_5FDA00,x
	STA.w $702E4E,y
	STA.w $7020E2,y
	INX
	INX
	INY
	INY
	CPY.b #$10
	BCC.b CODE_01C5D4
	SEP.b #$20
	PLB
	RTS

;---------------------------------------------------------------------------

DATA_01C5EA:
	dw DATA_5FA150,DATA_5FA158,DATA_5FA160,DATA_5FA168

CODE_01C5F2:
	JSR.w CODE_01C5C1
	REP.b #$20
	LDA.w $7974
	AND.w #$0038
	LSR
	LSR
	TAX
	LDA.w DATA_01C634,x
	STA.b $00
	LDX.b #$86
	LDA.w #$001A
	STA.b $0E
	JSR.w CODE_01C9CF
	SEP.b #$20
CODE_01C611:
	LDA.w $7974
	AND.b #$18
	LSR
	LSR
	TAX
	REP.b #$20
	LDA.w DATA_01C5EA,x
	STA.b $00
	LDX.b #$A6
	LDA.w #$0008
	STA.b $0E
	JSR.w CODE_01C9CF
	SEP.b #$20
	RTS

CODE_01C62D:
	JSR.w CODE_01C5C1
	JSR.w CODE_01C5F2
	RTS

DATA_01C634:
	dw DATA_5FF5CE,DATA_5FF5F4,DATA_5FF61A,DATA_5FF640,DATA_5FF666,DATA_5FF68C,DATA_5FF6B2,DATA_5FF6D8

;---------------------------------------------------------------------------

CODE_01C644:
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	AND.b #$07
	BNE.b CODE_01C679
	REP.b #$20
	LDA.w $7974
	AND.w #$0038
	LSR
	LSR
	TAX
	LDA.w DATA_01C634,x
	STA.b $00
	LDX.b #$86
	LDA.w #$001A
	STA.b $0E
	JSR.w CODE_01C9CF
	LDA.b $00
	CLC
	ADC.w #$001A
	STA.b $00
	LDX.b #$04
	LDA.w #$000C
	STA.b $0E
	JSR.w CODE_01C9CF
	SEP.b #$20
CODE_01C679:
	RTS

;---------------------------------------------------------------------------

DATA_01C67A:
	dw DATA_5FA170,DATA_5FA178,DATA_5FA180,DATA_5FA188

CODE_01C682:
	LDA.w $7974
	AND.b #$0C
	LSR
	TAX
	REP.b #$20
	LDA.w DATA_01C67A,x
	STA.b $00
CODE_01C690:
	LDX.b #$A6
	LDA.w #$0008
	STA.b $0E
	JSR.w CODE_01C9CF
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$000B
	BNE.b CODE_01C6A8
	LDA.w #$0024
	STA.w $0051
CODE_01C6A8:
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C6AB:
	dw DATA_5FC932+$00,DATA_5FC932+$02,DATA_5FC932+$04,DATA_5FC932+$06
	dw DATA_5FC932+$08,DATA_5FC932+$06,DATA_5FC932+$04,DATA_5FC932+$02

CODE_01C6BB:
	LDA.b #DATA_5FC932>>16
	STA.b $02
	LDA.w $0B75
	INC
	STA.w $0B75
	CMP.b #$06
	BCC.b CODE_01C6D7
	STZ.w $0B75
	LDA.w $0B73
	INC
	INC
	AND.b #$0E
	STA.w $0B73
CODE_01C6D7:
	LDX.w $0B73
	LDA.b #DATA_5FC932>>16
	STA.b $02
	REP.b #$20
	LDA.w DATA_01C6AB,x
	STA.b $00
	LDA.b [$00]
	STA.l $702D6E
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l $702D7E
	STA.l YI_Global_PaletteMirror[$09].LowByte
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C6FA:
	dw DATA_5FE2EC,DATA_5FE2F4,DATA_5FE2FC,DATA_5FE304

CODE_01C702:
	LDA.w $7974
	AND.b #$18
	LSR
	LSR
	TAX
	LDA.b #DATA_5FE2EC>>16
	STA.b $02
	REP.b #$20
	LDA.w DATA_01C6FA,x
	STA.b $00
	JMP.w CODE_01C690

;---------------------------------------------------------------------------

DATA_01C718:
	dw DATA_5FE336,DATA_5FE330,DATA_5FE32A,DATA_5FE324,DATA_5FE31E,DATA_5FE318,DATA_5FE312,DATA_5FE30C

CODE_01C728:
	REP.b #$20
	LDA.w $0B75
	INC
	CMP.w #$0070
	BCS.b CODE_01C738
	STA.w $0B75
	BRA.b CODE_01C770

CODE_01C738:
	LDA.w $7974
	AND.w #$007F
	BNE.b CODE_01C770
	SEP.b #$20
	LDA.b #$04
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$13
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$24
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	LDA.w $0B73
	INC
	CMP.w #$0008
	BCS.b CODE_01C770
	STA.w $0B73
	ASL
	TAY
	LDA.w DATA_01C718,y
	STA.b $00
	LDX.b #$02
	LDA.w #$0006
	STA.b $0E
	JSR.w CODE_01C9CF
CODE_01C770:
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C773:
	dw DATA_5FE30C,DATA_5FE312,DATA_5FE318,DATA_5FE31E,DATA_5FE324,DATA_5FE32A,DATA_5FE330,DATA_5FE336

CODE_01C783:
	REP.b #$20
	LDA.w $0B75
	INC
	CMP.w #$01A0
	BCS.b CODE_01C793
	STA.w $0B75
	BRA.b CODE_01C7CF

CODE_01C793:
	LDA.w $7974
	AND.w #$003F
	BNE.b CODE_01C770
	LDA.w $0B73
	INC
	CMP.w #$0008
	BCS.b CODE_01C7BA
	STA.w $0B73
	ASL
	TAY
	LDA.w DATA_01C773,y
	STA.b $00
	LDX.b #$02
	LDA.w #$0006
	STA.b $0E
	JSR.w CODE_01C9CF
	BRA.b CODE_01C7CF

CODE_01C7BA:
	LDA.w !RAM_YI_Global_MainScreenLayers
	EOR.w #$0004
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	EOR.w #$0004
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	STZ.w !RAM_YI_Level_LevelHeaderAnimationPaletteLo
CODE_01C7CF:
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C7D2:
	dw DATA_5FEC1A,DATA_5FEC20,DATA_5FEC26,DATA_5FEC2C,DATA_5FEC2C,DATA_5FEC26,DATA_5FEC20,DATA_5FEC1A

DATA_01C7E2:
	dw DATA_5FEC32,DATA_5FEC38,DATA_5FEC3E,DATA_5FEC44,DATA_5FEC44,DATA_5FEC3E,DATA_5FEC38,DATA_5FEC32

CODE_01C7F2:
	LDA.w $0B75
	INC
	CMP.b #$0C
	BCC.b CODE_01C7FF
	INC.w $0B73
	LDA.b #$00
CODE_01C7FF:
	STA.w $0B75
	LDA.w $0B73
	AND.b #$07
	ASL
	TAY
	REP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderBG3PaletteLo
	AND.w #$0001
	BNE.b CODE_01C818
	LDA.w DATA_01C7D2,y
	BRA.b CODE_01C81B

CODE_01C818:
	LDA.w DATA_01C7E2,y
CODE_01C81B:
	STA.b $00
	LDX.b #$02
	LDA.w #$0006
	STA.b $0E
	JSR.w CODE_01C9CF
	LDA.w #$0002
	STA.w $0D43
	LDA.w #$0002
	STA.w $0D4B
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C836:
	dw DATA_5FF76E,DATA_5FF78E,DATA_5FF7AE,DATA_5FF7CE,DATA_5FF7EE,DATA_5FF80E,DATA_5FF82E,DATA_5FF84E

DATA_01C846:
	dw $00D0,$00C8

DATA_01C84A:
	dw $001C,$0038

CODE_01C84E:
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.b #$08
	BNE.b CODE_01C85A
	JSR.w CODE_01C702
	BRA.b CODE_01C85D

CODE_01C85A:
	JSR.w CODE_01C611
CODE_01C85D:
	REP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderBG2PaletteLo
	AND.w #$0001
	ASL
	TAY
	ASL
	ASL
	ASL
	STA.b $00
	LDA.w DATA_01C846,y
	TAX
	LDA.w DATA_01C84A,y
	AND.w $7974
	DEY
	BMI.b CODE_01C87A
	LSR
CODE_01C87A:
	LSR
	TAY
	LDA.w DATA_01C836,y
	CLC
	ADC.b $00
	STA.b $00
	LDA.w #$0010
	STA.b $0E
	JSR.w CODE_01C9CF
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C88F:
	dw DATA_5FF46A,DATA_5FF470,DATA_5FF476,DATA_5FF47C

CODE_01C897:
	REP.b #$20
	LDA.w $7974
	AND.w #$000C
	LSR
	TAX
	LDA.w DATA_01C88F,x
	STA.b $00
	LDA.w #$0006
	STA.b $0E
	LDX.b #$0A
	JSR.w CODE_01C9CF
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01C8B3:
	dw DATA_5FF760,DATA_5FF752,DATA_5FF744,DATA_5FF736,DATA_5FF728,DATA_5FF71A,DATA_5FF70C,DATA_5FF6FE

DATA_01C8C3:
	dw $00C0,$00A0,$00E0,$00A0

CODE_01C8CB:
	REP.b #$20
	LDA.w $0B77
	CMP.w #$0080
	BCS.b CODE_01C8EA
	LSR
	LSR
	AND.w #$000E
	TAX
	LDA.w DATA_01C8B3,x
	STA.b $00
	LDA.w #$000E
	STA.b $0E
	LDX.b #$92
	JSR.w CODE_01C9CF
CODE_01C8EA:
	DEC.w $0B77
	BPL.b CODE_01C900
	JSL.l CODE_128875
	ADC.b $30
	AND.w #$0003
	ASL
	TAX
	LDA.w DATA_01C8C3,x
	STA.w $0B77
CODE_01C900:
	SEP.b #$20
	JSR.w CODE_01C5C1
	RTS

;---------------------------------------------------------------------------

CODE_01C906:
	JSR.w CODE_01C84E
	REP.b #$20
	LDA.w #DATA_5FF95E
	STA.b $00
	SEP.b #$20
CODE_01C912:
	REP.b #$20
	LDA.w $0B79
	CMP.w #$0320
	BCC.b CODE_01C946
	CMP.w #$0520
	BCS.b CODE_01C952
	SBC.w #$031F
	AND.w #$FFE0
	LSR
	LSR
	ADC.b $00
	STA.b $00
	LDA.w #$0008
	STA.b $0E
	LDX.b #$00
	JSR.w CODE_01C9CF
	LDA.w #$1304
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	ORA.w #$0004
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
CODE_01C946:
	CLC
	SED
	LDA.w $0B79
	ADC.w #$0001
	STA.w $0B79
	CLD
CODE_01C952:
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01C955:
	JSR.w CODE_01C702
	JSR.w CODE_01C8CB
	REP.b #$20
	LDA.w #DATA_5FF9DE
	STA.b $00
	SEP.b #$20
	JSR.w CODE_01C912
	RTS

;---------------------------------------------------------------------------

CODE_01C968:
	JSR.w CODE_01C4D9
	JSR.w CODE_01C85D
	REP.b #$20
	LDA.w $7974
	AND.w #$0038
	LSR
	LSR
	TAX
	LDA.w DATA_01C634,x
	STA.b $00
	LDX.b #$86
	LDA.w #$001A
	STA.b $0E
	JSR.w CODE_01C9CF
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01C98B:
	REP.b #$20
	LDA.w $0B79
	CMP.w #$0320
	BCC.b CODE_01C9C0
	CMP.w #$0520
	BCS.b CODE_01C9CC
	SBC.w #$031F
	AND.w #$FFE0
	LSR
	LSR
	ADC.w #DATA_5FF9DE
	STA.b $00
	LDA.w #$0008
	STA.b $0E
	LDX.b #$00
	JSR.w CODE_01C9CF
	LDA.w #$1304
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	ORA.w #$0004
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
CODE_01C9C0:
	CLC
	SED
	LDA.w $0B79
	ADC.w #$0001
	STA.w $0B79
	CLD
CODE_01C9CC:
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01C9CF:
	LDA.w #DATA_5FE2EC>>16
	STA.b $02
	PHB
	LDY.b #$702000>>16
	PHY
	PLB
	LDY.b #$00
CODE_01C9DB:
	LDA.b [$00],y
	STA.w $702D6C,x
	STA.w $702000,x
	INX
	INX
	INY
	INY
	CPY.b $0E
	BCC.b CODE_01C9DB
	PLB
	RTS

;---------------------------------------------------------------------------

DATA_01C9ED:
	dw $142A,$30E0,$143A,$30E2,$242A,$3100,$243A,$3102
	dw $1446,$30E4,$1456,$30E6,$2446,$3104,$2456,$3106
	dw $1462,$30E8,$1472,$30EA,$2462,$3108,$2472,$310A
	dw $147E,$30EC,$148E,$30EE,$247E,$310C,$248E,$310E
	dw $149A,$3120,$14AA,$3122,$249A,$3128,$24AA,$312A

DATA_01CA3D:
	db $00,$04,$08,$0C,$10

DATA_01CA42:
	db $FC,$04,$FC,$04,$FC,$04,$FC,$04
	db $FC,$04,$FC,$01,$00

DATA_01CA4F:
	db $20,$34

DATA_01CA51:
	db $20,$34

DATA_01CA53:
	db $20,$34,$20,$34,$20,$34,$20,$34
	db $00,$04,$FF,$40,$10

DATA_01CA60:
	db $00,$01,$02,$03,$04

DATA_01CA65:
	db $10,$30,$50,$70,$10

DATA_01CA6A:
	db $50,$50,$50,$50,$70

DATA_01CA6F:
	dw !Define_YI_SoundID01_Unpause,!Define_YI_SoundID02_Pause

DATA_01CA73:
	dw CODE_01CAF7
	dw CODE_01CB2F
	dw CODE_01CB60
	dw CODE_01CB7C
	dw CODE_01CBA9
	dw CODE_01CBBF
	dw CODE_01CC0B
	dw CODE_01CC2F
	dw CODE_01CC5C
	dw CODE_01CC8E
	dw CODE_01CAEE
	dw CODE_01CC98
	dw CODE_01CC98
	dw CODE_01CC98
	dw CODE_01CC98
	dw CODE_01CC98
	dw CODE_01CC98
	dw CODE_01CC98
	dw CODE_01CCB1
	dw CODE_01CE34

CODE_01CA9B:
	REP.b #$30
	LDA.w !RAM_YI_Level_CurrentPauseScreenState
	AND.w #$00FF
	ASL
	TAX
	LDA.w !RAM_YI_Level_ActivePauseScreenFlag
	AND.w #$00FF
	ASL
	TAY
	JSR.w (DATA_01CA73-$02,x)
	SEP.b #$30
	LDA.w !RAM_YI_Level_CurrentPauseScreenState
	CMP.b #$0B
	BCC.b CODE_01CAC4
	LDA.w $0CF6
	BEQ.b CODE_01CAC4
	JSR.w CODE_01DE0A
	JSR.w CODE_01CAD6
CODE_01CAC4:
	PLB
	RTL

DATA_01CAC6:
	dw $7C00,$7C1F,$001F,$03FF,$03E0,$03FF,$001F,$7C1F

CODE_01CAD6:
	REP.b #$20
	LDA.b $30
	AND.w #$0038
	LSR
	LSR
	TAX
	LDA.w DATA_01CAC6,x
	STA.l YI_Global_PaletteMirror[$1E].LowByte
	SEP.b #$20
	RTS

DATA_01CAEA:
	dw CODE_01CB1E
	dw CODE_01CB13

CODE_01CAEE:
	SEP.b #$30
	LDA.w !RAM_YI_Level_ActivePauseScreenFlag
	EOR.b #$01
	BRA.b CODE_01CAFC

CODE_01CAF7:
	SEP.b #$30
	LDA.w !RAM_YI_Level_ActivePauseScreenFlag
CODE_01CAFC:
	PHA
	ASL
	TAX
	LDA.w $0200
	JSR.w (DATA_01CAEA,x)
	PLA
	EOR.w !RAM_YI_Level_ActivePauseScreenFlag
	BEQ.b CODE_01CB0C
	RTS

CODE_01CB0C:
	REP.b #$20
	PLA
	JML.l CODE_01C2E2

CODE_01CB13:
	DEC
	DEC
	BPL.b CODE_01CB2B
	JSR.w CODE_01CE5D
	LDA.b #$80
	BRA.b CODE_01CB2B

CODE_01CB1E:
	AND.b #$0F
	INC
	INC
	CMP.b #$0F
	BCC.b CODE_01CB2B
	JSR.w CODE_01CE5D
	LDA.b #$0F
CODE_01CB2B:
	STA.w $0200
	RTS

CODE_01CB2F:
	SEP.b #$30
	JSL.l CODE_00824B
	REP.b #$30
	LDA.w !RAM_YI_Level_ActivePauseScreenFlag
	BNE.b CODE_01CB54
	STZ.w $093C
	STZ.w $093E
	STZ.w $0940
	STZ.w $0942
	STZ.b $35
	STZ.b $37
	SEP.b #$30
	JSL.l CODE_01C188
	REP.b #$30
CODE_01CB54:
	JSR.w CODE_01CE5D
	RTS

DATA_01CB58:
	dw $5400,$D400

DATA_01CB5C:
	dw $1000,$1002

CODE_01CB60:
	TYX
	LDA.w DATA_01CA6F,x
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	LDA.w #$7E7BBE
	STA.b $00
	LDY.w DATA_01CB5C,x
	LDA.w DATA_01CB58,x
	JMP.w CODE_01CBCB

DATA_01CB74:
	dw $4E00,$CE00

DATA_01CB78:
	dw $0C00,$0C02

CODE_01CB7C:
	SEP.b #$30
	LDX.b #$35
CODE_01CB80:
	STZ.w $0B12,x
	DEX
	BPL.b CODE_01CB80
	LDX.b #$04
CODE_01CB88:
	LDA.w DATA_01CA3D,x
	STA.w $0B42,x
	DEX
	BPL.b CODE_01CB88
	REP.b #$30
	TYX
	LDA.w #$7E7BBE
	CLC
	ADC.w DATA_01CB5C+$02
	STA.b $00
	LDY.w DATA_01CB78,x
	LDA.w DATA_01CB74,x
	BRA.b CODE_01CBCB

DATA_01CBA5:
	dw $2800,$A800

CODE_01CBA9:
	TYX
	LDA.w #$7E97C4
	STA.b $00
	LDY.w DATA_01CB5C,x
	LDA.w DATA_01CBA5,x
	BRA.b CODE_01CBCB

DATA_01CBB7:
	dw $3400,$B400

DATA_01CBBB:
	dw $0800,$0802

CODE_01CBBF:
	TYX
	LDA.w #$7EA7C6
	STA.b $00
	LDY.w DATA_01CBBB,x
	LDA.w DATA_01CBB7,x
CODE_01CBCB:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	LDX.w $7E4800
	STA.w $0000,x
	ASL
	LDA.w #$0080
	STA.w $0002,x
	LDA.w #$7E7BBE>>16
	STA.w $0007,x
	TYA
	STA.w $0008,x
	LDA.w #(!REGISTER_ReadFromVRAMPortLo&$0000FF<<8)+$81
	LDY.b $00
	BCS.b CODE_01CBF4
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	INY
	INY
CODE_01CBF4:
	STA.w $0003,x
	TYA
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	PLB
	JSR.w CODE_01CE5D
	RTS

CODE_01CC0B:
	TYA
	BEQ.b CODE_01CC2B
	LDX.w #DATA_568000+$6800
	LDA.w #DATA_568000+$6800>>16
	LDY.w !RAM_YI_Level_CantUseItemsFlagLo
	BEQ.b CODE_01CC1F
	LDX.w #FXDATA_520000+$B000
	LDA.w #FXDATA_520000+$B000>>16
CODE_01CC1F:
	STA.b $01
	LDY.w #$5400
	LDA.w #$0400
	JSL.l CODE_00BEA6
CODE_01CC2B:
	JSR.w CODE_01CE5D
	RTS

CODE_01CC2F:
	TYA
	BEQ.b CODE_01CC48
	LDA.w #$004F
	JSL.l CODE_00B753
	LDX.w #$706800>>16
	STX.b $01
	LDX.w #$706800
	LDY.w #$2C00
	JSL.l CODE_00BEA6
CODE_01CC48:
	JSR.w CODE_01CE5D
	RTS

DATA_01CC4C:
	dw $7EAFC8>>16,$00095E>>16,$7EAFC8>>16

DATA_01CC52:
	dw $7EAFC8,$00095E,$7EAFC8

DATA_01CC58:
	dw CODE_01CE83
	dw CODE_01CEB7

CODE_01CC5C:
	JSR.w CODE_01CE5D
	TYX
	JSR.w (DATA_01CC58,x)
	LDA.w DATA_01CC4C,y
	STA.b $02
	LDA.w DATA_01CC52,y
	STA.b $00
	INY
	INY
	LDA.w DATA_01CC4C,y
	STA.b $05
	LDA.w DATA_01CC52,y
	STA.b $03
	LDY.w #$0000
	TYX
	SEP.b #$20
CODE_01CC7F:
	LDA.b [$00],y
	STA.b [$03],y
	INY
	CPY.w #$000E
	BCC.b CODE_01CC7F
	RTS

DATA_01CC8A:
	dw CODE_01CF07
	dw CODE_01CF1F

CODE_01CC8E:
	JSR.w CODE_01CE5D
	PHB
	SEP.b #$10
	TYX
	JMP.w (DATA_01CC8A,x)

CODE_01CC98:
	JSR.w CODE_01CE5D
	SEP.b #$30
	LDA.w !RAM_YI_Level_CurrentPauseScreenState
	SEC
	SBC.b #$0C
	ASL
	ASL
	ASL
	LDX.b #$04
CODE_01CCA8:
	STA.w $0B36,x
	DEX
	BPL.b CODE_01CCA8
	JMP.w CODE_01CD56

CODE_01CCB1:
	SEP.b #$30
	LDA.w !RAM_YI_Level_PauseMenuItemInventory
	BEQ.b CODE_01CCBB
	JSR.w CODE_01DBD5
CODE_01CCBB:
	LDA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01CCC6
	LDA.b $37
	AND.b #$80
	BNE.b CODE_01CCCC
CODE_01CCC6:
	ORA.b $38
	AND.b #$90
	BEQ.b CODE_01CCCF
CODE_01CCCC:
	JSR.w CODE_01CE5D
CODE_01CCCF:
	LDX.b #$04
CODE_01CCD1:
	LDA.w $0B42,x
	BEQ.b CODE_01CCE1
	LDA.b $30
	AND.b #$03
	BNE.b CODE_01CD50
	DEC.w $0B42,x
	BRA.b CODE_01CD50

CODE_01CCE1:
	LDY.w $0B3C,x
	LDA.b $30
	AND.b #$03
	BNE.b CODE_01CCFC
	LDA.w $0B36,x
	CLC
	ADC.w DATA_01CA42,y
	STA.w $0B36,x
	CMP.w DATA_01CA4F,y
	BNE.b CODE_01CCFC
	INC.w $0B3C,x
CODE_01CCFC:
	CPY.b #$0B
	BCC.b CODE_01CD50
	LDA.w $0B1E,x
	CMP.w DATA_01CA53,y
	BNE.b CODE_01CD21
	CPY.b #$0B
	BEQ.b CODE_01CD30
	LDA.w $0B12,x
	BNE.b CODE_01CD30
	STZ.w $0B3C,x
	STZ.w $0B1E,x
	STZ.w $0B2A,x
	LDA.b #$20
	STA.w $0B42,x
	BRA.b CODE_01CD56

CODE_01CD21:
	LDA.b $30
	LSR
	BCS.b CODE_01CD30
	LDA.w $0B1E,x
	CLC
	ADC.w DATA_01CA51,y
	STA.w $0B1E,x
CODE_01CD30:
	LDA.w $0B1E,x
	TAY
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.w $0B2A,x
	STA.w $0B2A,x
	TYA
	PHP
	LSR
	LSR
	LSR
	LSR
	PLP
	BPL.b CODE_01CD4A
	ORA.b #$F0
CODE_01CD4A:
	ADC.w $0B12,x
	STA.w $0B12,x
CODE_01CD50:
	DEX
	BMI.b CODE_01CD56
	JMP.w CODE_01CCD1

CODE_01CD56:
	REP.b #$20
	LDA.w #$6800
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0800
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08D2F1>>16
	LDA.w #FXCODE_08D2F1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #$04
CODE_01CD6F:
	LDA.w DATA_01CA60,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $0B12,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w DATA_01CA65,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w DATA_01CA6A,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $0B36,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHX
	LDX.b #FXCODE_08F165>>16
	LDA.w #FXCODE_08F165
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	DEX
	BPL.b CODE_01CD6F
	LDA.w #$7400
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$7100
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_08D2FB>>16
	LDA.w #FXCODE_08D2FB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$7600
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$7300
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_08D2FB>>16
	LDA.w #FXCODE_08D2FB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$AAAA
	STA.l $006C00
	STA.l $006C02
	STA.l $006C04
	STA.l $006C06
	SEP.b #$20
	STZ.b $00
	LDA.b #$10
	STA.b $00
	LDX.b #$00
CODE_01CE0C:
	LDA.w DATA_01C9ED,x
	CLC
	ADC.b $00
	STA.l $006A00,x
	LDA.w DATA_01C9ED+$01,x
	STA.l $006A01,x
	LDA.w DATA_01C9ED+$02,x
	STA.l $006A02,x
	LDA.w DATA_01C9ED+$03,x
	STA.l $006A03,x
	INX
	INX
	INX
	INX
	CPX.b #$50
	BCC.b CODE_01CE0C
	RTS

CODE_01CE34:
	SEP.b #$30
	LDA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01CE48
	INC.w $0B11
	LDA.w $0B11
	CMP.b #$20
	BCC.b CODE_01CE58
	STZ.w $0B11
CODE_01CE48:
	LDA.w !RAM_YI_Level_ActivePauseScreenFlag
	EOR.b #$01
	AND.b #$01
	STA.w !RAM_YI_Level_ActivePauseScreenFlag
	JSR.w CODE_01CE5D
	JSR.w CODE_01CE5D
CODE_01CE58:
	JMP.w CODE_01CD56

DATA_01CE5B:
	db $FF,$01

CODE_01CE5D:
	PHY
	PHP
	SEP.b #$20
	LDY.w !RAM_YI_Level_ActivePauseScreenFlag
	LDA.w !RAM_YI_Level_CurrentPauseScreenState
	CLC
	ADC.w DATA_01CE5B,y
	STA.w !RAM_YI_Level_CurrentPauseScreenState
	BNE.b CODE_01CE80
	LDA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01CE80
	LDA.b #!Define_YI_SoundID27_CollectSuperStar
	JSL.l CODE_0085D2
	LDA.b #$40
	STA.w $039C
CODE_01CE80:
	PLP
	PLY
	RTS

CODE_01CE83:
	LDA.l $7EAFD7
	STA.b !RAM_YI_Global_Layer3XPosLo
	LDA.l $7EAFD9
	STA.b !RAM_YI_Global_Layer3YPosLo
	LDA.l $7EAFDB
	STA.w !RAM_YI_Global_HDMAEnable
	LDA.l $7EAFDD
	STA.w $0948
	SEP.b #$20
	LDA.l $7EB6DF
	STA.w $011C
	LDA.l $7EB8E0
	STA.w !RAM_YI_Global_MosaicSizeAndBGEnable
	LDA.l $7EB8E1
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	RTS

CODE_01CEB7:
	LDA.b !RAM_YI_Global_Layer3XPosLo
	STA.l $7EAFD7
	LDA.b !RAM_YI_Global_Layer3YPosLo
	STA.l $7EAFD9
	LDA.w !RAM_YI_Global_HDMAEnable
	STA.l $7EAFDB
	LDA.w $0948
	STA.l $7EAFDD
	SEP.b #$20
	LDA.w $011C
	STA.l $7EB6DF
	LDA.w !RAM_YI_Global_MosaicSizeAndBGEnable
	STA.l $7EB8E0
	STZ.w !RAM_YI_Global_MosaicSizeAndBGEnable
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	STA.l $7EB8E1
	LDA.b #$20
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	PHY
	LDA.w #DATA_568000+$5000>>16
	STA.b $01
	LDY.w #$2800
	LDX.w #DATA_568000+$5000
	LDA.w #$0800
	JSL.l CODE_00BEA6
	PLY
	RTS

CODE_01CF07:
	LDX.b #$00
CODE_01CF09:
	LDA.l $7EB6E0,x
	STA.l YI_Global_PaletteMirror[$00].LowByte,x
	LDA.l $7EB7E0,x
	STA.l YI_Global_PaletteMirror[$80].LowByte,x
	INX
	INX
	BNE.b CODE_01CF09
	PLB
	RTS

CODE_01CF1F:
	LDA.w #$0000
	STA.b !RAM_YI_Global_Layer3XPosLo
	STA.b !RAM_YI_Global_Layer3YPosLo
	STA.w $0948
	TAX
	STX.w !RAM_YI_Global_HDMAEnable
	LDY.b #$702000>>16
	PHY
	PLB
CODE_01CF31:
	LDA.w $702000,x
	STA.l $7EB6E0,x
	LDA.w $702100,x
	STA.l $7EB7E0,x
	INX
	INX
	BNE.b CODE_01CF31
	LDA.w #$0000
	TAX
	TXY
CODE_01CF48:
	STA.w $702000,x
	STA.w $702100,x
	INX
	INX
	BNE.b CODE_01CF48
	TYX
CODE_01CF53:
	LDA.l DATA_5FA002,x
	STA.w $702002,x
	LDA.l DATA_5FA022,x
	STA.w $702022,x
	LDA.l DATA_5FA1C8,x
	STA.w $702102,x
	LDA.l DATA_5FA1E6,x
	STA.w $702122,x
	LDA.l DATA_5FA204,x
	STA.w $702142,x
	INX
	INX
	CPX.b #$1E
	BCC.b CODE_01CF53
	LDX.b #$7EAFDF>>16
	PHX
	PLB
	LDX.b #$00
	LDA.w #$217F
CODE_01CF85:
	STA.w $7EAFDF,x
	STA.w $7EB0DF,x
	STA.w $7EB1DF,x
	STA.w $7EB2DF,x
	STA.w $7EB3DF,x
	STA.w $7EB4DF,x
	STA.w $7EB5DF,x
	INX
	INX
	BNE.b CODE_01CF85
	LDX.b #$00
	STX.b $00
	TXY
CODE_01CFA3:
	LDA.b $00
	ASL
	TAX
	LDA.l DATA_01B689,x
	STA.w $7EB3E7,y
	LDX.b $00
	CPX.b #$15
	BCS.b CODE_01CFCA
	LDA.l DATA_01B835,x
	AND.w #$00FF
	TAX
	LDA.l DATA_01B85F,x
	STA.w $7EB42D,y
	LDA.l DATA_01B8DD,x
	STA.w $7EB46D,y
CODE_01CFCA:
	LDX.b $00
	CPX.b #$15
	BCS.b CODE_01CFE6
	LDA.l DATA_01B84A,x
	AND.w #$00FF
	TAX
	LDA.l DATA_01B85F,x
	STA.w $7EB4ED,y
	LDA.l DATA_01B8DD,x
	STA.w $7EB52D,y
CODE_01CFE6:
	INY
	INY
	INC.b $00
	LDX.b $00
	CPX.b #$18
	BCC.b CODE_01CFA3
	JSR.w CODE_01D035
	JSR.w CODE_01D0DE
	JSR.w CODE_01D17A
	JSR.w CODE_01D203
	JSR.w CODE_01D275
	JSR.w CODE_01D35B
	JSR.w CODE_01D2E0
	REP.b #$10
	LDY.w #$7EAFDF>>16
	STY.b $01
	LDY.w #$3400
	LDX.w #$7EAFDF
	LDA.w #$0700
	JSL.l CODE_00BEA6
	SEP.b #$10
	PLB
	LDX.b #$09
	STX.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDX.b #$34
	STX.w !RAM_YI_Global_BG3AddressAndSize
	LDX.b #$02
	STX.w !RAM_YI_Global_BG3And4TileDataDesignation
	STX.w $011C
	LDA.w #$0014
	STA.w !RAM_YI_Global_MainScreenLayers
	RTS

;---------------------------------------------------------------------------

CODE_01D035:
	STZ.b $18
	LDY.b #$00
	STZ.b $00
	LDA.l $0003B6
	BEQ.b CODE_01D05D
CODE_01D041:
	CMP.w #$000A
	BCC.b CODE_01D04E
	SEC
	SBC.w #$000A
	INC.b $00
	BRA.b CODE_01D041

CODE_01D04E:
	LDA.b $00
	CMP.w #$001E
	BCC.b CODE_01D05D
	LDA.w #$0400
	STA.b $18
	LDA.w #$001E
CODE_01D05D:
	STA.b $00
CODE_01D05F:
	CMP.w #$000A
	BCC.b CODE_01D06A
	SBC.w #$000A
	INY
	BRA.b CODE_01D05F

CODE_01D06A:
	ASL
	TAX
	PHX
	PHY
	LDX.b #$00
	TXY
CODE_01D071:
	PHX
	LDA.l DATA_01B7ED,x
	AND.w #$00FF
	TAX
	LDA.l DATA_01B85F,x
	ORA.b $18
	STA.w $7EB1A7,y
	LDA.l DATA_01B8DD,x
	ORA.b $18
	STA.w $7EB1E7,y
	PLX
	INY
	INY
	INX
	CPX.b #$18
	BCC.b CODE_01D071
	PLY
	PLX
	LDA.b $00
	PHA
	REP.b #$10
	PHX
	PHY
	SEP.b #$10
	LDA.w #$7EB1C1
	STA.b $10
	LDA.w #$7EB1CF
	STA.b $12
	LDA.w #$7EB201
	STA.b $14
	LDA.w #$7EB20F
	STA.b $16
	JSR.w CODE_01D45E
	REP.b #$10
	PLA
	AND.w #$00FF
	TAX
	PLA
	AND.w #$00FF
	STA.b $00
	LDA.b $18
	STA.b $02
	LDA.w #$7EB215>>16
	STA.b $15
	LDA.w #$7EB215
	STA.b $13
	PHB
	PHK
	PLB
	JSR.w CODE_01BCAA
	PLB
	SEP.b #$10
	PLA
	STA.b $00
	RTS

;---------------------------------------------------------------------------

CODE_01D0DE:
	STZ.b $18
	LDY.b #$00
	LDA.l $0003B4
	CMP.w #$0014
	BCC.b CODE_01D0F3
	LDA.w #$0400
	STA.b $18
	LDA.w #$0014
CODE_01D0F3:
	STA.b $02
CODE_01D0F5:
	CMP.w #$000A
	BCC.b CODE_01D100
	SBC.w #$000A
	INY
	BRA.b CODE_01D0F5

CODE_01D100:
	ASL
	TAX
	PHX
	PHY
	LDX.b #$00
	TXY
CODE_01D107:
	PHX
	LDA.l DATA_01B805,x
	AND.w #$00FF
	TAX
	LDA.l DATA_01B85F,x
	ORA.b $18
	STA.w $7EB267,y
	LDA.l DATA_01B8DD,x
	ORA.b $18
	STA.w $7EB2A7,y
	PLX
	INY
	INY
	INX
	CPX.b #$18
	BCC.b CODE_01D107
	PLY
	PLX
	LDA.b $00
	PHA
	LDA.b $02
	PHA
	REP.b #$10
	PHX
	PHY
	SEP.b #$10
	LDA.w #$7EB281
	STA.b $10
	LDA.w #$7EB28F
	STA.b $12
	LDA.w #$7EB2C1
	STA.b $14
	LDA.w #$7EB2CF
	STA.b $16
	JSR.w CODE_01D45E
	REP.b #$10
	PLA
	AND.w #$00FF
	TAX
	PLA
	AND.w #$00FF
	STA.b $00
	LDA.b $18
	STA.b $02
	LDA.w #$7EB2D5>>16
	STA.b $15
	LDA.w #$7EB2D5
	STA.b $13
	PHB
	PHK
	PLB
	JSR.w CODE_01BCAA
	PLB
	SEP.b #$10
	PLA
	STA.b $02
	PLA
	STA.b $00
	RTS

;---------------------------------------------------------------------------

CODE_01D17A:
	STZ.b $18
	LDA.l $0003B8
	ASL
	TAX
	CPX.b #$0A
	BCC.b CODE_01D18B
	LDA.w #$0400
	STA.b $18
CODE_01D18B:
	PHX
	LDX.b #$00
	TXY
CODE_01D18F:
	PHX
	LDA.l DATA_01B81D,x
	AND.w #$00FF
	TAX
	LDA.l DATA_01B85F,x
	ORA.b $18
	STA.w $7EB327,y
	LDA.l DATA_01B8DD,x
	ORA.b $18
	STA.w $7EB367,y
	PLX
	INY
	INY
	INX
	CPX.b #$18
	BCC.b CODE_01D18F
	PLX
	LDA.b $00
	PHA
	LDA.b $02
	PHA
	REP.b #$10
	PHX
	SEP.b #$10
	LDA.l DATA_01B8AF,x
	ORA.b $18
	STA.w $7EB345
	TXY
	BEQ.b CODE_01D1CD
	STA.w $7EB34F
CODE_01D1CD:
	LDA.l DATA_01B92D,x
	ORA.b $18
	STA.w $7EB385
	TXY
	BEQ.b CODE_01D1DC
	STA.w $7EB38F
CODE_01D1DC:
	REP.b #$10
	PLA
	AND.w #$00FF
	TAX
	STX.b $00
	LDA.b $18
	STA.b $02
	LDA.w #$7EB395>>16
	STA.b $15
	LDA.w #$7EB395
	STA.b $13
	PHB
	PHK
	PLB
	JSR.w CODE_01BCAA
	PLB
	SEP.b #$10
	PLA
	STA.b $02
	PLA
	STA.b $00
	RTS

;---------------------------------------------------------------------------

CODE_01D203:
	STZ.b $18
	LDY.b #$00
	LDA.l $0003B8
	ASL
	STA.b $0E
	ASL
	ASL
	ADC.b $0E
	CLC
	ADC.b $00
	CLC
	ADC.b $02
	STA.b $00
	CMP.w #$0064
	BCC.b CODE_01D226
	LDA.w #$000A
	TAY
	INY
	BRA.b CODE_01D231

CODE_01D226:
	CMP.w #$000A
	BCC.b CODE_01D231
	SBC.w #$000A
	INY
	BRA.b CODE_01D226

CODE_01D231:
	ASL
	TAX
	LDA.b $00
	PHA
	REP.b #$10
	PHX
	PHY
	SEP.b #$10
	LDA.w #$7EB44F
	STA.b $10
	STA.b $12
	LDA.w #$7EB48F
	STA.b $14
	STA.b $16
	JSR.w CODE_01D45E
	REP.b #$10
	PLA
	AND.w #$00FF
	TAX
	PLA
	AND.w #$00FF
	STA.b $00
	LDA.b $18
	STA.b $02
	LDA.w #$7EB495>>16
	STA.b $15
	LDA.w #$7EB495
	STA.b $13
	PHB
	PHK
	PLB
	JSR.w CODE_01BCAA
	PLB
	SEP.b #$10
	PLA
	STA.b $00
	RTS

;---------------------------------------------------------------------------

CODE_01D275:
	LDY.b #$00
	LDA.l $00021A
	TAX
	LDA.l $0002B8,x
	AND.w #$00FF
	CMP.b $00
	BCS.b CODE_01D289
	LDA.b $00
CODE_01D289:
	CMP.w #$0064
	BCC.b CODE_01D295
	LDA.w #$000A
	TAY
	INY
	BRA.b CODE_01D2A0

CODE_01D295:
	CMP.w #$000A
	BCC.b CODE_01D2A0
	SBC.w #$000A
	INY
	BRA.b CODE_01D295

CODE_01D2A0:
	ASL
	TAX
	REP.b #$10
	PHX
	PHY
	SEP.b #$10
	LDA.w #$7EB50F
	STA.b $10
	STA.b $12
	LDA.w #$7EB54F
	STA.b $14
	STA.b $16
	STZ.b $18
	JSR.w CODE_01D45E
	REP.b #$10
	PLA
	AND.w #$00FF
	TAX
	PLA
	AND.w #$00FF
	STA.b $00
	LDA.b $18
	STA.b $02
	LDA.w #$7EB555>>16
	STA.b $15
	LDA.w #$7EB555
	STA.b $13
	PHB
	PHK
	PLB
	JSR.w CODE_01BCAA
	PLB
	SEP.b #$10
	RTS

;---------------------------------------------------------------------------

CODE_01D2E0:
	PHB
	PHK
	PLB
	STZ.w $0CF6
	STZ.w $0CF7
	SEP.b #$20
	LDX.b #$00
	TXY
CODE_01D2EE:
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,x
	AND.b #$0F
	BEQ.b CODE_01D2F9
	STA.w !RAM_YI_Level_PauseMenuItemInventory,y
	INY
CODE_01D2F9:
	INX
	CPX.b #$1B
	BCC.b CODE_01D2EE
	TYX
CODE_01D2FF:
	CPX.b #$1B
	BCS.b CODE_01D309
	STZ.w !RAM_YI_Level_PauseMenuItemInventory,x
	INX
	BRA.b CODE_01D2FF

CODE_01D309:
	LDA.w !RAM_YI_Level_PauseMenuItemInventory
	BEQ.b CODE_01D32F
	LDY.b #$00
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc1
	BNE.b CODE_01D31B
	STZ.w !RAM_YI_Level_PauseScreenCursorLoc2
	INC.w !RAM_YI_Level_PauseScreenCursorLoc1
CODE_01D31B:
	LDX.w !RAM_YI_Level_PauseScreenCursorLoc2
CODE_01D31E:
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,x
	STA.w $0CF6,y
	INX
	INY
	CPY.b #$03
	BCC.b CODE_01D31E
	REP.b #$20
	JSR.w CODE_01DDB0
CODE_01D32F:
	REP.b #$20
	PLB
	RTS

;---------------------------------------------------------------------------

DATA_01D333:
	dw $1DA8,$1D80,$1D82,$1D84,$1D86,$1D88,$1DA0,$1DA2
	dw $1DA4,$1DA6

DATA_01D347:
	dw $1DB8,$1D90,$1D92,$1D94,$1D96,$1D98,$1DB0,$1DB2
	dw $1DB4,$1DB6

CODE_01D35B:
	LDX.b #$00
CODE_01D35D:
	LDA.w #$9D8B
	STA.w $7EB59F,x
	LDA.w #$1D8B
	STA.w $7EB65F,x
	LDA.w #$09AF
	STA.w $7EB5DF,x
	STA.w $7EB61F,x
	INX
	INX
	CPX.b #$40
	BCC.b CODE_01D35D
	LDA.w #$098C
	STA.w $7EB5E1
	INC
	STA.w $7EB5E3
	INC
	STA.w $7EB621
	INC
	STA.w $7EB623
	LDX.b #$00
	TXY
	LDA.l $000379
CODE_01D391:
	CMP.w #$0064
	BCC.b CODE_01D39C
	SBC.w #$0064
	INY
	BRA.b CODE_01D391

CODE_01D39C:
	CMP.w #$000A
	BCC.b CODE_01D3A7
	SBC.w #$000A
	INX
	BRA.b CODE_01D39C

CODE_01D3A7:
	CPY.b #$00
	BNE.b CODE_01D3B9
	TXY
	TAX
	LDA.w #$000A
	CPY.b #$00
	BNE.b CODE_01D3B9
	TXY
	TAX
	LDA.w #$000A
CODE_01D3B9:
	ORA.w #$0DC0
	STA.w $7EB629
	TXA
	ORA.w #$0DC0
	STA.w $7EB627
	TYA
	ORA.w #$0DC0
	STA.w $7EB625
	LDA.w #$0DD2
	STA.w $7EB5EB
	INC
	STA.w $7EB5ED
	INC
	STA.w $7EB62B
	INC
	STA.w $7EB62D
	LDX.b #$00
	LDA.l $00037B
CODE_01D3E5:
	CMP.w #$000A
	BCC.b CODE_01D3F0
	SBC.w #$000A
	INX
	BRA.b CODE_01D3E5

CODE_01D3F0:
	CPX.b #$00
	BNE.b CODE_01D3F8
	TAX
	LDA.w #$000A
CODE_01D3F8:
	ORA.w #$0DC0
	STA.w $7EB631
	TXA
	ORA.w #$0DC0
	STA.w $7EB62F
	LDA.w #$0DCB
	STA.w $7EB5F5
	INC
	STA.w $7EB5F7
	INC
	STA.w $7EB635
	INC
	STA.w $7EB637
	LDA.l $0003A1
	ASL
	TAX
	LDA.l DATA_01D333,x
	STA.w $7EB5F9
	INC
	STA.w $7EB5FB
	LDA.l DATA_01D347,x
	STA.w $7EB639
	INC
	STA.w $7EB63B
	LDA.l $0003A3
	ASL
	TAX
	LDA.l DATA_01D333,x
	STA.w $7EB5FD
	INC
	STA.w $7EB5FF
	LDA.l DATA_01D347,x
	STA.w $7EB63D
	INC
	STA.w $7EB63F
	JSR.w CODE_01D490
	SEP.b #$20
	PHB
	PHK
	PLB
	JSR.w CODE_01DCE0
	PLB
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01D45E:
	PHY
	LDY.b #$02
	LDA.l DATA_01B8AF,x
	ORA.b $18
	STA.b ($10),y
	STA.b ($12),y
	LDA.l DATA_01B92D,x
	ORA.b $18
	STA.b ($14),y
	STA.b ($16),y
	PLY
	BEQ.b CODE_01D48F
	TYA
	ASL
	TAX
	LDA.l DATA_01B8AF,x
	ORA.b $18
	STA.b ($10)
	STA.b ($12)
	LDA.l DATA_01B92D,x
	ORA.b $18
	STA.b ($14)
	STA.b ($16)
CODE_01D48F:
	RTS

;---------------------------------------------------------------------------

CODE_01D490:
	LDA.w #$1DAC
	STA.w $7EB5C7
	LDA.w #$1D9C
	STA.w $7EB607
	STA.w $7EB647
	LDA.w #$9DAC
	STA.w $7EB687
	LDA.w #$1DAD
	STA.w $7EB5C9
	STA.w $7EB5CF
	STA.w $7EB5D5
	LDA.w #$5DAD
	STA.w $7EB5CB
	STA.w $7EB5D1
	STA.w $7EB5D7
	LDA.w #$9DAD
	STA.w $7EB689
	STA.w $7EB68F
	STA.w $7EB695
	LDA.w #$DDAD
	STA.w $7EB68B
	STA.w $7EB691
	STA.w $7EB697
	LDA.w #$1DAE
	STA.w $7EB5CD
	STA.w $7EB5D3
	LDA.w #$9DAE
	STA.w $7EB68D
	STA.w $7EB693
	LDA.w #$1D9E
	STA.w $7EB60D
	STA.w $7EB613
	STA.w $7EB64D
	STA.w $7EB653
	LDA.w #$5DAC
	STA.w $7EB5D9
	LDA.w #$5D9C
	STA.w $7EB619
	STA.w $7EB659
	LDA.w #$DDAC
	STA.w $7EB699
	LDA.w #$117F
	STA.w $7EB609
	STA.w $7EB649
	STA.w $7EB60B
	STA.w $7EB64B
	STA.w $7EB60F
	STA.w $7EB64F
	STA.w $7EB611
	STA.w $7EB651
	STA.w $7EB615
	STA.w $7EB655
	STA.w $7EB617
	STA.w $7EB657
	RTS

;---------------------------------------------------------------------------

CODE_01D533:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	LDX.w $7E4800
	STA.w $0000,x
	ASL
	LDA.w #$0080
	STA.w $0002,x
	LDA.w #$007E
	STA.w $0007,x
	TYA
	STA.w $0008,x
	LDA.w #$3981
	LDY.w #$7BBE
	BCS.b CODE_01D55D
	LDA.w #$1801
	INY
	INY
CODE_01D55D:
	STA.w $0003,x
	TYA
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	SEP.b #$30
	PLB
	RTS

;---------------------------------------------------------------------------

DATA_01D573:
	dw DATA_5FD64C>>16,DATA_5FD64C
	dw DATA_5FD67C>>16,DATA_5FD67C
	dw DATA_5FD6AC>>16,DATA_5FD6AC
	dw DATA_5FD6DC>>16,DATA_5FD6DC
	dw DATA_5FD70C>>16,DATA_5FD70C
	dw DATA_5FD73C>>16,DATA_5FD73C
	dw DATA_5FD76C>>16,DATA_5FD76C
	dw DATA_5FD79C>>16,DATA_5FD79C
	dw DATA_5FD7CC>>16,DATA_5FD7CC
	dw DATA_5FD7FC>>16,DATA_5FD7FC
	dw DATA_5FD82C>>16,DATA_5FD82C
	dw DATA_5FD85C>>16,DATA_5FD85C
	dw DATA_5FD88C>>16,DATA_5FD88C
	dw DATA_5FD8BC>>16,DATA_5FD8BC
	dw DATA_5FD8EC>>16,DATA_5FD8EC
	dw DATA_5FD91C>>16,DATA_5FD91C

CODE_01D5B3:
	PHB
	PHK
	PLB
	LDX.b #$04
CODE_01D5B8:
	LDA.w DATA_01D66B,x
	STA.w HDMA[$06].Parameters,x
	LDA.w DATA_01D670,x
	STA.w HDMA[$07].Parameters,x
	LDA.w DATA_01D675,x
	STA.w HDMA[$05].Parameters,x
	LDA.w DATA_01D681,x
	STA.w HDMA[$04].Parameters,x
	LDA.w DATA_01D68D,x
	STA.w HDMA[$03].Parameters,x
	LDA.w DATA_01D699,x
	STA.w HDMA[$02].Parameters,x
	LDA.w DATA_01D6A5,x
	STA.w HDMA[$01].Parameters,x
	DEX
	BPL.b CODE_01D5B8
	LDA.b #$7E5040>>16
	STA.w HDMA[$06].IndirectSourceBank
	STA.w HDMA[$07].IndirectSourceBank
	STA.w HDMA[$05].IndirectSourceBank
	STA.w HDMA[$04].IndirectSourceBank
	STA.w HDMA[$03].IndirectSourceBank
	LDA.b #$7F56DE>>16
	STA.w HDMA[$02].IndirectSourceBank
	STA.w HDMA[$01].IndirectSourceBank
	LDX.b #$06
CODE_01D600:
	LDA.w DATA_01D67A,x
	STA.l $7E5B18,x
	LDA.w DATA_01D686,x
	STA.l $7E5B98,x
	LDA.w DATA_01D692,x
	STA.l $7E5C18,x
	LDA.w DATA_01D69E,x
	STA.l $7E5C98,x
	LDA.w DATA_01D6AA,x
	STA.l $7E5D18,x
	DEX
	BPL.b CODE_01D600
	LDX.b #$00
	LDA.w !RAM_YI_Level_LevelHeaderBackgroundColorLo
	CMP.b #$10
	BCC.b CODE_01D666
	ASL
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_01D573-$40,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_01D573-$3E,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0890E7>>16
	LDA.w #FXCODE_0890E7
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$7F56DE
	STA.b $20
	LDY.b #$7F56DE>>16
	STY.b $22
	LDA.w #$705800
	STA.b $23
	LDY.b #$705800>>16
	STY.b $25
	LDA.w #$0522
	JSL.l CODE_008288
	SEP.b #$20
	LDX.b #$06
CODE_01D666:
	STX.w !RAM_YI_Global_HDMAEnable
	PLB
	RTL

DATA_01D66B:
	db $01,!REGISTER_MainScreenLayers : dl $7E51E4

DATA_01D670:
	db $03,!REGISTER_BG3HorizScrollOffset : dl $7E552C

DATA_01D675:
	db $44,!REGISTER_Window1LeftPositionDesignation : dl $7E5B18

DATA_01D67A:
	db $E9 : dw $7E56D0
	db $E9 : dw $7E5874
	db $00

DATA_01D681:
	db $42,!REGISTER_BG3VertScrollOffset : dl $7E5B98

DATA_01D686:
	db $E9 : dw $7E5040
	db $E9 : dw $7E5112
	db $00

DATA_01D68D:
	db $42,!REGISTER_BG3HorizScrollOffset : dl $7E5C18

DATA_01D692:
	db $E9 : dw $7E51E4
	db $E9 : dw $7E52B6
	db $00

DATA_01D699:
	db $42,!REGISTER_FixedColorData : dl $7E5C98

DATA_01D69E:
	db $E9 : dw $7F5894
	db $E9 : dw $7F5966
	db $00

DATA_01D6A5:
	db $40,!REGISTER_FixedColorData : dl $7E5D18

DATA_01D6AA:
	db $E9 : dw $7F56DE
	db $E9 : dw $7F5747
	db $00

;---------------------------------------------------------------------------

CODE_01D6B1:
	LDA.w $0D2D
	BEQ.b CODE_01D6BB
	JSR.w CODE_01D7CD
	BRA.b CODE_01D6C3

CODE_01D6BB:
	LDA.w $0D3D
	BEQ.b CODE_01D6C3
	JSR.w CODE_01D86D
CODE_01D6C3:
	LDX.w $0D27
	BEQ.b CODE_01D6CD
	JSR.w CODE_01D795
	BRA.b CODE_01D6DF

CODE_01D6CD:
	LDA.w $0D2B
	BEQ.b CODE_01D6D7
	JSR.w CODE_01D81D
	BRA.b CODE_01D6DF

CODE_01D6D7:
	LDA.w $0D45
	BEQ.b CODE_01D6DF
	JSR.w CODE_01D8C6
CODE_01D6DF:
	LDX.w $0D3B
	BNE.b CODE_01D6E5
	RTS

CODE_01D6E5:
	REP.b #$20
	LDA.w $609A,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08BE12>>16
	LDA.w #FXCODE_08BE12
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w #$385E
	JSL.l CODE_00BE71	: dl $7E552C,$70385E
	LDA.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CMP.w #$0001
	BEQ.b CODE_01D715
	SEP.b #$20
	LDA.b #$80
	BRA.b CODE_01D791

CODE_01D715:
	LDA.w #$06FF
	SEC
	SBC.b !RAM_YI_Global_Layer1YPosLo
	BCS.b CODE_01D724
	SEP.b #$20
	LDA.w !RAM_YI_Global_MainScreenLayers
	BRA.b CODE_01D72D

CODE_01D724:
	CMP.w #$00D2
	SEP.b #$20
	BCC.b CODE_01D747
	LDA.b #$17
CODE_01D72D:
	STA.l $7E51E5
	EOR.b #$04
	AND.b #$04
	STA.l $7E51E6
	LDA.b #$01
	STA.l $7E51E4
	LDA.b #$00
	STA.l $7E51E7
	BRA.b CODE_01D78F

CODE_01D747:
	LDX.b #$00
	CMP.b #$80
	BCC.b CODE_01D766
	SBC.b #$7F
	PHA
	LDA.b #$7F
	STA.l $7E51E4,x
	LDA.b #$17
	STA.l $7E51E5,x
	LDA.b #$00
	STA.l $7E51E6,x
	PLA
	INX
	INX
	INX
CODE_01D766:
	STA.l $7E51E4,x
	LDA.b #$01
	STA.l $7E51E7,x
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.l $7E51E8,x
	LDA.b #$04
	STA.l $7E51E9,x
	LDA.b #$17
	STA.l $7E51E5,x
	LDA.b #$00
	STA.l $7E51E6,x
	LDA.b #$00
	STA.l $7E51EA,x
CODE_01D78F:
	LDA.b #$C0
CODE_01D791:
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

CODE_01D795:
	REP.b #$20
	DEX
	LDA.b !RAM_YI_Global_Layer1YPosLo,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_01EC96>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $0D28
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$3372
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DC26>>16
	LDA.w #FXCODE_08DC26
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$01A4
	JSL.l CODE_00BE71	: dl $7E5040,$703372
	SEP.b #$20
	LDA.b #$10
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_01D7CD:
	REP.b #$20
	LDA.w $0D2D
	AND.w #$0002
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $609E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0D39
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $0D31
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #DATA_01E8CD>>16
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$36BA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_08DD23>>16
	LDA.w #FXCODE_08DD23
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$01A4
	JSL.l CODE_00BE71	: dl $7E51E4,$7036BA
	SEP.b #$20
	LDA.b #$08
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_01D81D:
	REP.b #$20
	LDA.w $0D2B
	AND.w #$0002
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $0D37
	STA.w $6000
	LDA.w $609E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0D2F
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #DATA_01E8C7>>16
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$3372
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_08DC4D>>16
	LDA.w #FXCODE_08DC4D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$01A4
	JSL.l CODE_00BE71	: dl $7E5040,$703372
	SEP.b #$20
	LDA.b #$10
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_01D86D:
	REP.b #$20
	LDA.w $0D3D
	AND.w #$0002
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $0D43
	STA.w $6000
	LDA.w $60A0
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0D3F
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #DATA_01EB7D>>16
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$36BA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_08DC4D>>16
	LDA.w #FXCODE_08DC4D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$01A4
	JSL.l CODE_00BE71	: dl $7E51E4,$7036BA
	LDA.l $7036BA
	STA.w $6098
	STA.b !RAM_YI_Global_Layer3XPosLo
	SEP.b #$20
	LDA.b #$08
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

;---------------------------------------------------------------------------

CODE_01D8C6:
	REP.b #$20
	LDA.w $0D45
	AND.w #$0002
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $60A0
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0D4B
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $0D47
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #DATA_01ECD2>>16
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$3372
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_08DD23>>16
	LDA.w #FXCODE_08DD23
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$01A4
	JSL.l CODE_00BE71	: dl $7E5040,$703372
	SEP.b #$20
	LDA.b #$10
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

;---------------------------------------------------------------------------

DATA_01D916:
	dw CODE_01DA69
	dw CODE_01D92C
	dw CODE_01DA98

DATA_01D91C:
	dw $1402,$2000,$00E0,$00C3,$00A5,$0008,$0804,$1004

CODE_01D92C:
	STZ.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$13
	STA.w !RAM_YI_Global_SubScreenLayers
	REP.b #$20
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_01D946
	LDA.w $7FE8
	BNE.b CODE_01D960
CODE_01D946:
	LDA.w $0D37
	ORA.w $0D39
	BNE.b CODE_01D95D
	STZ.w $0D2B
	STZ.w $0D2D
	LDA.w !RAM_YI_Global_HDMAEnable
	AND.w #$FFE7
	STA.w !RAM_YI_Global_HDMAEnable
CODE_01D95D:
	JMP.w CODE_01DA51

CODE_01D960:
	DEC
	BNE.b CODE_01D9BD
	LDA.w !RAM_YI_Level_FuzzyEffectAmplitudeLo
	BEQ.b CODE_01D974
	SEC
	SBC.w #$0100
	STA.w !RAM_YI_Level_FuzzyEffectAmplitudeLo
	BPL.b CODE_01D974
	STZ.w !RAM_YI_Level_FuzzyEffectAmplitudeLo
CODE_01D974:
	LDA.w !RAM_YI_Level_FuzzyEffectFrameCounterLo
	AND.w #$00FF
	BEQ.b CODE_01D97F
	JMP.w CODE_01DA1C

CODE_01D97F:
	LDA.l $702F6C
	BNE.b CODE_01D9B4
	LDA.w !RAM_YI_Level_FuzzyEffectAmplitudeLo
	BNE.b CODE_01D99C
	LDA.w #!Define_YI_SoundID22_EndFuzzyDistortedMusic
	JSL.l CODE_0085D2
	STZ.w $7FE8
	STZ.w $0D37
	STZ.w $0D39
	BRA.b CODE_01D9B1

CODE_01D99C:
	AND.w #$0100
	BNE.b CODE_01D9B1
	DEC.w $0D37
	BPL.b CODE_01D9A9
	STZ.w $0D37
CODE_01D9A9:
	DEC.w $0D39
	BPL.b CODE_01D9B1
	STZ.w $0D39
CODE_01D9B1:
	JMP.w CODE_01DA47

CODE_01D9B4:
	LDA.w #$0000
	STA.l $702F6C
	BRA.b CODE_01DA11

CODE_01D9BD:
	DEC.w $7FE8
	LDA.w !RAM_YI_Level_FuzzyEffectAmplitudeLo
	CLC
	ADC.w #$0080
	CMP.w #$6000
	BCC.b CODE_01D9CF
	LDA.w #$6000
CODE_01D9CF:
	STA.w !RAM_YI_Level_FuzzyEffectAmplitudeLo
	AND.w #$0380
	BNE.b CODE_01D9EF
	LDA.w $0D37
	INC
	CMP.w #$0018
	BCS.b CODE_01D9E3
	STA.w $0D37
CODE_01D9E3:
	LDA.w $0D39
	INC
	CMP.w #$000C
	BCS.b CODE_01D9EF
	STA.w $0D39
CODE_01D9EF:
	LDA.w #$0003
	STA.w $0D2B
	LDA.w #$0001
	STA.w $0D2D
	LDA.w !RAM_YI_Level_FuzzyEffectFrameCounterLo
	AND.w #$00FF
	BNE.b CODE_01DA1C
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$000E
	TAX
	LDA.w DATA_01D91C,x
	STA.l $702F6C
CODE_01DA11:
	STZ.w !RAM_YI_Level_FuzzyEffectFrameCounterLo
	LDA.l YI_Global_PaletteMirror[$00].LowByte
	STA.l $702D6C
CODE_01DA1C:
	LDA.w !RAM_YI_Level_FuzzyEffectFrameCounterLo
	CLC
	ADC.w #$0008
	STA.w !RAM_YI_Level_FuzzyEffectFrameCounterLo
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.l $702D6C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.l $702F6C
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08E132>>16
	LDA.w #FXCODE_08E132
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.l YI_Global_PaletteMirror[$00].LowByte
CODE_01DA47:
	LDA.w !RAM_YI_Level_FuzzyEffectPositionOffsetLo
	CLC
	ADC.w #$0020
	STA.w !RAM_YI_Level_FuzzyEffectPositionOffsetLo
CODE_01DA51:
	LDA.w !RAM_YI_Level_FuzzyEffectAmplitudeLo
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !RAM_YI_Level_FuzzyEffectPositionOffsetLo
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_089518>>16
	LDA.w #FXCODE_089518
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01DA69:
	REP.b #$20
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_01DA79
	DEC.w $0CFD
	DEC.w $0CFD
CODE_01DA79:
	LDA.w $0CFD
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.w $7EEE
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_089DCE>>16
	LDA.w #FXCODE_089DCE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01DA98:
	REP.b #$20
	INC.w $0CFD
	LDA.w $0CFD
	CMP.w #$0060
	BCC.b CODE_01DAAB
	LDA.w #$0000
	STA.w $0CFD
CODE_01DAAB:
	LSR
	LSR
	LSR
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $60B0
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0B96C3>>16
	LDA.w #FXCODE_0B96C3
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_01DAC3:
	LDA.w #$0064
CODE_01DAC6:
	LDY.w $039A
	BNE.b CODE_01DADD
	CLC
	ADC.w $0396
	STA.w $0396
	CLC
	ADC.w #$0078
	STA.w $0B7F
	INC.w $039A
	RTS

CODE_01DADD:
	LDA.w $0396
	BNE.b CODE_01DAE5
	STZ.w !RAM_YI_Level_ItemBeingUsed
CODE_01DAE5:
	RTS

CODE_01DAE6:
	LDA.w #$00C8
	BRA.b CODE_01DAC6

;---------------------------------------------------------------------------

CODE_01DAEB:
	JSL.l CODE_0294B4
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $61C6
	STZ.w !RAM_YI_Level_ItemBeingUsed
	RTS

;---------------------------------------------------------------------------

CODE_01DB00:
	INC.w !EXRAM_YI_Level_ShowHiddenItemsFlag|!EXRAMBankMirror
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
	STZ.w !RAM_YI_Level_ItemBeingUsed
	RTS

;---------------------------------------------------------------------------

CODE_01DB0E:
	LDY.w $039A
	BNE.b CODE_01DB24
	LDA.w #$00AB
	JSL.l CODE_03A364
	BCC.b CODE_01DB24
	TYX
	JSL.l CODE_029AC6
	INC.w $039A
CODE_01DB24:
	RTS

;---------------------------------------------------------------------------

CODE_01DB25:
	LDX.b #$5C
CODE_01DB27:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000E
	BCC.b CODE_01DB4B
	LDA.w $6FA2,x
	AND.w #$6000
	BNE.b CODE_01DB4B
	CPX.w $61B6
	BNE.b CODE_01DB3F
	STZ.w $61B6
CODE_01DB3F:
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$00CB
	STA.w $0B91,x
CODE_01DB4B:
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_01DB27
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	STZ.w !RAM_YI_Level_ItemBeingUsed
	RTS

;---------------------------------------------------------------------------

CODE_01DB5C:
	LDA.w #$0003
CODE_01DB5F:
	STA.w !EXRAM_YI_Level_Player_AmmoTypeInMouthLo|!EXRAMBankMirror
	INC.w $6162
	INC.w $6168
	LDA.w #$005A
	STA.w $6170
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	STZ.w !RAM_YI_Level_ItemBeingUsed
	RTS

CODE_01DB79:
	LDA.w #$0004
	BRA.b CODE_01DB5F

CODE_01DB7E:
	LDA.w #$0001
	BRA.b CODE_01DB5F

;---------------------------------------------------------------------------

CODE_01DB83:
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc1
	CLC
	ADC.w !RAM_YI_Level_PauseScreenCursorLoc2
	TAX
	BEQ.b CODE_01DBB9
	STZ.w !RAM_YI_Level_PauseMenuItemInventory-$01,x
	TXY
	DEY
CODE_01DB92:
	CPX.b #$1B
	BCS.b CODE_01DBA7
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,x
	AND.b #$0F
	BEQ.b CODE_01DBA4
	STA.w !RAM_YI_Level_PauseMenuItemInventory,y
	STZ.w !RAM_YI_Level_PauseMenuItemInventory,x
	INY
CODE_01DBA4:
	INX
	BRA.b CODE_01DB92

CODE_01DBA7:
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc2
	BEQ.b CODE_01DBB1
	DEC.w !RAM_YI_Level_PauseScreenCursorLoc2
	BRA.b CODE_01DBB9

CODE_01DBB1:
	DEC.w !RAM_YI_Level_PauseScreenCursorLoc1
	BNE.b CODE_01DBB9
	INC.w !RAM_YI_Level_PauseScreenCursorLoc1
CODE_01DBB9:
	RTS

;---------------------------------------------------------------------------

DATA_01DBBA:
	dw CODE_01DC8B,CODE_01DC8B,CODE_01DCA0,CODE_01DCA1,CODE_01DC97,CODE_01DCA0,CODE_01DCB2,CODE_01DCB2
	dw CODE_01DCB2

DATA_01DBCC:
	db $01,$FF,$FF

DATA_01DBCF:
	db $03,$FF,$FF

DATA_01DBD2:
	db $1B,$FF,$FF

CODE_01DBD5:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_01DC4B
	TAX
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc1
	BNE.b CODE_01DBE4
	JMP.w CODE_01DC8A

CODE_01DBE4:
	DEC
	STA.b $00
	CLC
	ADC.w DATA_01DBCC-$01,x
	CMP.w DATA_01DBCF-$01,x
	BEQ.b CODE_01DBFA
	INC
	STA.w !RAM_YI_Level_PauseScreenCursorLoc1
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_01DC1C

CODE_01DBFA:
	LDA.b $00
	CLC
	ADC.w !RAM_YI_Level_PauseScreenCursorLoc2
	CLC
	ADC.w DATA_01DBCC-$01,x
	CMP.w DATA_01DBD2-$01,x
	BNE.b CODE_01DC0E
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc2
	BRA.b CODE_01DC1C

CODE_01DC0E:
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc2
	CLC
	ADC.w DATA_01DBCC-$01,x
	STA.w !RAM_YI_Level_PauseScreenCursorLoc2
CODE_01DC1C:
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc1
	CLC
	ADC.w !RAM_YI_Level_PauseScreenCursorLoc2
	TAX
	CPX.b #$1B
	BCS.b CODE_01DC42
	DEX
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,x
	BNE.b CODE_01DC42
	DEC.w !RAM_YI_Level_PauseScreenCursorLoc2
	BPL.b CODE_01DC40
	STZ.w !RAM_YI_Level_PauseScreenCursorLoc2
	DEC.w !RAM_YI_Level_PauseScreenCursorLoc1
	BPL.b CODE_01DC40
	STZ.w !RAM_YI_Level_PauseScreenCursorLoc1
	BRA.b CODE_01DC42

CODE_01DC40:
	STZ.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_01DC42:
	JSR.w CODE_01DCC6
	JSR.w CODE_01DD8B
	JSR.w CODE_01DCE0
CODE_01DC4B:
	LDA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_01DC8A
	LDA.b $37
	AND.b #$80
	BEQ.b CODE_01DC8A
	LDA.w !RAM_YI_Level_CantUseItemsFlagLo
	BNE.b CODE_01DC74
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc2
	CLC
	ADC.w !RAM_YI_Level_PauseScreenCursorLoc1
	TAX
	LDA.w !RAM_YI_Level_PauseMenuItemInventory-$01,x
	STA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01DC74
	ASL
	TAX
	REP.b #$20
	JSR.w (DATA_01DBBA-$02,x)
	SEP.b #$20
CODE_01DC74:
	LDA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_01DC86
	LDA.b #!Define_YI_SoundID43_MountYoshi
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	STZ.w $039A
	STZ.w $039B
	JMP.w CODE_01DB83

CODE_01DC86:
	LDA.b #!Define_YI_SoundID90_Incorrect
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_01DC8A:
	RTS

CODE_01DC8B:
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_SoftMaxStarTimerThreshold
	BCC.b CODE_01DC96
	STZ.w !RAM_YI_Level_ItemBeingUsed
CODE_01DC96:
	RTS

CODE_01DC97:
	LDA.w !EXRAM_YI_Level_ShowHiddenItemsFlag|!EXRAMBankMirror
	BEQ.b CODE_01DC9F
	STZ.w !RAM_YI_Level_ItemBeingUsed
CODE_01DC9F:
	RTS

CODE_01DCA0:
	RTS

CODE_01DCA1:
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_01DCAE
	LDA.w $7DF6
	CMP.w #$000C
	BCC.b CODE_01DCB1
CODE_01DCAE:
	STZ.w !RAM_YI_Level_ItemBeingUsed
CODE_01DCB1:
	RTS

CODE_01DCB2:
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	ORA.w $6162
	ORA.w $6168
	BEQ.b CODE_01DCC1
	STZ.w !RAM_YI_Level_ItemBeingUsed
	RTS

CODE_01DCC1:
	JSL.l CODE_04F74A
	RTS

CODE_01DCC6:
	LDX.b #$00
	LDY.w !RAM_YI_Level_PauseScreenCursorLoc2
CODE_01DCCB:
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,y
	STA.w $0CF6,x
	INY
	INX
	CPX.b #$03
	BCC.b CODE_01DCCB
	RTS

;---------------------------------------------------------------------------

DATA_01DCD8:
	dw $09AF,$499D

DATA_01DCDC:
	dw $09AF,$099D

CODE_01DCE0:
	LDX.b #$00
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc2
	BEQ.b CODE_01DCE9
	INX
	INX
CODE_01DCE9:
	REP.b #$20
	LDA.w DATA_01DCD8,x
	STA.l $7EB605
	ORA.w #$8000
	STA.l $7EB645
	SEP.b #$20
	LDX.b #$00
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc2
	CLC
	ADC.b #$03
	CMP.b #$1B
	BCS.b CODE_01DD0F
	TAY
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,y
	BEQ.b CODE_01DD0F
	INX
	INX
CODE_01DD0F:
	REP.b #$20
	LDA.w DATA_01DCDC,x
	STA.l $7EB61B
	ORA.w #$8000
	STA.l $7EB65B
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01DD22:
	dw $1DBB,$1DBC,$1DBC,$1DBE,$1DD1,$417F,$417F,$1DBF
	dw $1DD1,$417F,$417F,$1DBF,$9DBB,$9DBC,$9DBC,$9DBE

DATA_01DD42:
	dw $5DBE,$1DBC,$1DBC,$1DBE,$5DBF,$417F,$417F,$1DBF
	dw $5DBF,$417F,$417F,$1DBF,$DDBE,$9DBC,$9DBC,$9DBE

DATA_01DD62:
	dw $5DBE,$1DBC,$1DBC,$5DBB,$5DBF,$417F,$417F,$5DD1
	dw $5DBF,$417F,$417F,$5DD1,$DDBE,$9DBC,$9DBC,$DDBB

DATA_01DD82:
	dw DATA_01DD22,DATA_01DD42,DATA_01DD62

DATA_01DD88:
	db $00,$06,$0C

CODE_01DD8B:
	REP.b #$20
	PHB
	LDX.b #$7E
	PHX
	PLB
	JSR.w CODE_01D490
	PLB
	JSR.w CODE_01DDB0
	REP.b #$10
	LDY.w #$7EB59F>>16
	STY.b $01
	LDY.w #$36E0
	LDX.w #$7EB59F
	LDA.w #$0100
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

CODE_01DDB0:
	LDA.w !RAM_YI_Level_PauseScreenCursorLoc1
	AND.w #$00FF
	TAY
	ASL
	TAX
	LDA.w DATA_01DD88-$01,y
	TAY
	LDA.w DATA_01DD82-$02,x
	STA.b $00
	CLC
	ADC.w #$0008
	STA.b $02
	CLC
	ADC.w #$0008
	STA.b $04
	CLC
	ADC.w #$0008
	STA.b $06
	TYX
	LDY.b #$00
CODE_01DDD7:
	LDA.b ($00),y
	STA.l $7EB5C7,x
	LDA.b ($02),y
	STA.l $7EB607,x
	LDA.b ($04),y
	STA.l $7EB647,x
	LDA.b ($06),y
	STA.l $7EB687,x
	INX
	INX
	INY
	INY
	CPY.b #$08
	BCC.b CODE_01DDD7
	RTS

;---------------------------------------------------------------------------

DATA_01DDF8:
	dw $3540,$3542,$3144,$3146,$3148,$314A,$314C,$314E
	dw $334C

CODE_01DE0A:
	REP.b #$20
	LDA.w #$BFA8
	STA.b $00
	LDX.b #$00
	TXY
CODE_01DE14:
	LDA.w $0CF6,y
	AND.w #$00FF
	BEQ.b CODE_01DE3C
	PHY
	ASL
	TAY
	LDA.w DATA_01DDF8-$02,y
	STA.l $006A82,x
	PLY
	LDA.b $00
	STA.l $006A80,x
	CLC
	ADC.w #$0018
	STA.b $00
	INX
	INX
	INX
	INX
	INY
	CPY.b #$03
	BCC.b CODE_01DE14
CODE_01DE3C:
	LDA.w #$AAAA
	STA.l $006C08
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01DE46:
	db $00,$02,$02,$0B,$0B,$0B,$02

DATA_01DE4D:
	db $00,$22,$22,$88,$88,$88,$22

CODE_01DE54:
	LDA.b #$01
	STA.b $10
	BRA.b CODE_01DE5C

CODE_01DE5A:
	STZ.b $10
CODE_01DE5C:
	PHB
	PHK
	PLB
	LDX.w !RAM_YI_Level_MessageBoxState 
	LDA.b $10
	BNE.b CODE_01DE80
	TXA
	LSR
	TAY
	LDA.w DATA_01DE46,y
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	LDA.w DATA_01DE4D,y
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.b #$01
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_01DE80:
	JSR.w (DATA_01DE85-$01,x)
	PLB
	RTL

DATA_01DE85:
	dw CODE_01DE93
	dw CODE_01DEA9
	dw CODE_01DED0
	dw CODE_01DEA9
	dw CODE_01DEE0
	dw CODE_01DEB9
	dw CODE_01DEB9

CODE_01DE93:
	LDA.b #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	STZ.w $0D19
	STZ.w $0D1A
	STZ.w $0D1B
CODE_01DEA2:
	INC.w !RAM_YI_Level_MessageBoxState 
	INC.w !RAM_YI_Level_MessageBoxState 
	RTS

CODE_01DEA9:
	LDY.b #$00
	CPX.b #$03
	BNE.b CODE_01DEB3
	LDA.b $10
	BNE.b CODE_01DEC3
CODE_01DEB3:
	LDX.w $0D11
	JMP.w (DATA_01DEF5,x)

CODE_01DEB9:
	LDY.b #$02
	CPX.b #$0D
	BNE.b CODE_01DEB3
	LDA.b $10
	BEQ.b CODE_01DEB3
CODE_01DEC3:
	REP.b #$20
	LDA.w $0D19
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	SEP.b #$20
	JMP.w CODE_01DF18

CODE_01DED0:
	REP.b #$20
	LDA.w #$0000
	STA.l $70406E
	SEP.b #$20
	JSR.w CODE_01E180
	BRA.b CODE_01DEA2

CODE_01DEE0:
	JSR.w CODE_01E180
	LDA.l $70406E
	CMP.b #$02
	BCC.b CODE_01DEF4
	LDA.b #!Define_YI_SoundID56_ThunderLakituAttacking6
	JSL.l CODE_0085D2
	JSR.w CODE_01DEA2
CODE_01DEF4:
	RTS

DATA_01DEF5:
	dw CODE_01DEFF

DATA_01DEF7:
	dw $0100,$0000

DATA_01DEFB:
	dw $0010,$FFF0

CODE_01DEFF:
	REP.b #$20
	LDA.w $0D19
	CLC
	ADC.w DATA_01DEFB,y
	STA.w $0D19
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	CMP.w DATA_01DEF7,y
	SEP.b #$20
	BEQ.b CODE_01DF18
	JMP.w CODE_01E048

CODE_01DF18:
	JSR.w CODE_01DEA2
	LDA.w !RAM_YI_Level_MessageBoxState 
	CMP.b #$0F
	BNE.b CODE_01DF45
	STZ.w !RAM_YI_Level_MessageBoxState 
	LDA.b $10
	BNE.b CODE_01DF44
	STZ.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STZ.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STZ.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w $038C
	BEQ.b CODE_01DF41
	BIT.b $35
	BVS.b CODE_01DF44
	STZ.w $038C
CODE_01DF41:
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
CODE_01DF44:
	RTS

CODE_01DF45:
	CMP.b #$0D
	BNE.b CODE_01DF8E
	REP.b #$30
	LDA.w #$0100
	STA.w $0D19
	LDY.w #$0180
	LDA.w $0D17
	CLC
	ADC.w #$00C0
	CMP.w #$3800
	BEQ.b CODE_01DF6A
	BCC.b CODE_01DF6A
	LDA.w #$3800
	SBC.w $0D17
	ASL
	TAY
CODE_01DF6A:
	LDA.w $0D17
	JSR.w CODE_01D533
	REP.b #$30
	LDA.w $0D17
	CLC
	ADC.w #$00C0
	SEC
	SBC.w #$3800
	BEQ.b CODE_01DF89
	BMI.b CODE_01DF89
	ASL
	TAY
	LDA.w #$3400
	JSR.w CODE_01D533
CODE_01DF89:
	SEP.b #$30
CODE_01DF8B:
	JMP.w CODE_01E048

CODE_01DF8E:
	CMP.b #$05
	BNE.b CODE_01DF8B
	REP.b #$30
	STZ.w $0D19
	LDY.w #$0182
	LDA.b !RAM_YI_Global_Layer3YPosLo
	CLC
	ADC.w #$0018
	AND.w #$01F0
	ASL
	ORA.w #$3400
	STA.w $0D17
	CLC
	ADC.w #$00C0
	CMP.w #$3800
	BEQ.b CODE_01DFBF
	BCC.b CODE_01DFBF
	LDA.w #$3800
	SBC.w $0D17
	ASL
	INC
	INC
	TAY
CODE_01DFBF:
	LDA.w $0D17
	ORA.w #$8000
	JSR.w CODE_01D533
	REP.b #$30
	LDA.w $0D17
	CLC
	ADC.w #$00C0
	SEC
	SBC.w #$3800
	BEQ.b CODE_01DFE3
	BMI.b CODE_01DFE3
	ASL
	INC
	INC
	TAY
	LDA.w #$B400
	JSR.w CODE_01D533
CODE_01DFE3:
	SEP.b #$30
	PHB
	LDA.b #$7E4002>>16
	PHA
	PLB
	REP.b #$30
	LDA.b !RAM_YI_Global_Layer3XPosLo
	CLC
	ADC.w #$0038
	AND.w #$01F0
	LSR
	LSR
	LSR
	LSR
	STA.b $02
	EOR.w #$001F
	INC
	CMP.w #$000A
	BCC.b CODE_01E007
	LDA.w #$000A
CODE_01E007:
	STA.b $04
	STZ.b $08
	LDA.w #$2A00
	STA.b $06
	LDA.l $000D17
	CLC
	ADC.b $02
	STA.b $02
	JSR.w CODE_01E0BF
	INC.b $08
	LDA.b $04
	CMP.w #$000A
	BCS.b CODE_01E03F
	DEC
	ASL
	CLC
	ADC.w #$2A00
	STA.b $06
	LDA.w #$000A
	SEC
	SBC.b $04
	STA.b $04
	LDA.b $02
	AND.w #$FFE0
	STA.b $02
	JSR.w CODE_01E0BF
CODE_01E03F:
	LDA.w #$FFFF
	STA.w $7E4002,x
	SEP.b #$30
	PLB
CODE_01E048:
	REP.b #$20
	STZ.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b !RAM_YI_Global_Layer3XPosLo
	AND.w #$000F
	CMP.w #$0008
	BCS.b CODE_01E060
	ORA.w #$0010
CODE_01E060:
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0090
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b !RAM_YI_Global_Layer3YPosLo
	AND.w #$000F
	CMP.w #$0008
	BCS.b CODE_01E078
	ORA.w #$0010
CODE_01E078:
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0047
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXCODE_088002
	LDX.b $10
	BEQ.b CODE_01E08D
	LDA.w #FXCODE_088040
CODE_01E08D:
	LDX.b #FXCODE_088002>>16
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.b $10
	BNE.b CODE_01E0BE
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.w !RAM_YI_Global_SubScreenLayers
	STA.w !RAM_YI_Global_SubScreenWindowMask
	LDA.b #$30
	STA.w !RAM_YI_Global_BGWindowLogicSettings
	STZ.w !REGISTER_ColorAndObjectWindowLogicSettings
	LDA.b #$20
	TSB.w !RAM_YI_Global_HDMAEnable
CODE_01E0BE:
	RTS

CODE_01E0BF:
	LDA.w #$0006
	STA.b $00
	LDX.w $4000
	LDA.b $02
CODE_01E0C9:
	STA.w $4002,x
	PHA
	LDA.b $04
	ASL
	DEC
	STA.w $4004,x
	LDA.b $00
	DEC
	BEQ.b CODE_01E0EB
	CMP.w #$0005
	BCS.b CODE_01E0EB
	JSR.w CODE_01E107
	LDA.b $06
	CLC
	ADC.w #$0020
	STA.b $06
	BRA.b CODE_01E0EE

CODE_01E0EB:
	JSR.w CODE_01E136
CODE_01E0EE:
	TXA
	CLC
	ADC.w #$0004
	TAX
	PLA
	CLC
	ADC.w #$0020
	AND.w #$F7FF
	ORA.w #$0400
	DEC.b $00
	BNE.b CODE_01E0C9
	STX.w $4000
	RTS

CODE_01E107:
	LDY.b $04
	LDA.b $08
	BNE.b CODE_01E118
	LDA.w #$2DC3
	STA.w $4006,x
	INX
	INX
	DEY
	BEQ.b CODE_01E135
CODE_01E118:
	LDA.b $06
CODE_01E11A:
	STA.w $4006,x
	INC
	INC
	INX
	INX
	DEY
	BNE.b CODE_01E11A
	LDA.b $08
	BNE.b CODE_01E12F
	LDA.b $04
	CMP.w #$000A
	BCC.b CODE_01E135
CODE_01E12F:
	LDA.w #$6DC3
	STA.w $4004,x
CODE_01E135:
	RTS

CODE_01E136:
	LDY.b $04
	LDA.b $08
	BNE.b CODE_01E151
	LDA.b $00
	DEC
	BNE.b CODE_01E146
	LDA.w #$ADC0
CODE_01E144:
	BRA.b CODE_01E149

CODE_01E146:
	LDA.w #$2DC0
CODE_01E149:
	STA.w $4006,x
	INX
	INX
	DEY
	BEQ.b CODE_01E17F
CODE_01E151:
	LDA.b $00
	DEC
	BNE.b CODE_01E15B
	LDA.w #$ADC1
	BRA.b CODE_01E15E

CODE_01E15B:
	LDA.w #$2DC1
CODE_01E15E:
	STA.w $4006,x
	INX
	INX
	DEY
	BNE.b CODE_01E15E
	LDA.b $08
	BNE.b CODE_01E171
	LDA.b $04
	CMP.w #$000A
	BCC.b CODE_01E17F
CODE_01E171:
	LDA.w #$6DC0
	LDY.b $00
	DEY
	BNE.b CODE_01E17C
	LDA.w #$EDC0
CODE_01E17C:
	STA.w $4004,x
CODE_01E17F:
	RTS

;---------------------------------------------------------------------------

CODE_01E180:
	LDA.w $012D
	PHA
	LDA.w $012E
	PHA
	LDA.b #$13
	STA.w $012D
	LDA.b #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STA.w $012E
	REP.b #$30
	LDA.l $704070
	ASL
	TAX
	LDA.l FXDATA_5110DB,x
	STA.l $704096
	LDA.w #FXDATA_5110DB>>16
	STA.l $704098
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	STA.l $70409A
	SEP.b #$10
	LDA.w #$0000
	STA.l $704074
	STA.l $704076
	LDA.w $0071
	BNE.b CODE_01E1D6
	LDA.w $093C
	AND.w #$0F80
	STA.l $704074
	LDA.w $093E
	AND.w #$0F80
	STA.l $704076
CODE_01E1D6:
	LDX.b #FXCODE_09B03E>>16
	LDA.w #FXCODE_09B03E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	PLA
	STA.w $012E
	PLA
	STA.w $012D
	LDA.w $607A
	BEQ.b CODE_01E1F2
	JSL.l CODE_0085D2
CODE_01E1F2:
	INC.w $0D15
	JSR.w CODE_01E1F9
	RTS

CODE_01E1F9:
	PHB
	LDA.b #$7E4000>>16
	PHA
	PLB
	REP.b #$30
	LDX.w $7E4000
	LDA.b !RAM_YI_Global_Layer3YPosLo
	CLC
	ADC.w #$0068
	AND.w #$01F0
	ASL
	ORA.w #$3400
	STA.b $00
	LDA.b !RAM_YI_Global_Layer3XPosLo
	CLC
	ADC.w #$00B8
	AND.w #$01F0
	LSR
	LSR
	LSR
	LSR
	ADC.b $00
	STA.w $7E4002,x
	LDA.w #$0001
	STA.w $7E4004,x
	LDA.l $704073
	AND.w #$00FF
	CMP.w #$000F
	BEQ.b CODE_01E250
	CMP.w #$0051
	BEQ.b CODE_01E250
	CMP.w #$00FF
	BEQ.b CODE_01E250
	LDA.l $70406E
	CMP.w #$0002
	BCS.b CODE_01E250
	LDA.b $30
	AND.w #$0010
	BEQ.b CODE_01E255
CODE_01E250:
	LDA.w #$ADC1
	BRA.b CODE_01E258

CODE_01E255:
	LDA.w #$2DC5
CODE_01E258:
	STA.w $7E4006,x
	LDA.w #$FFFF
	STA.w $7E4008,x
	TXA
	CLC
	ADC.w #$0006
	STA.w $7E4000
	SEP.b #$30
	PLB
	RTS

;---------------------------------------------------------------------------

CODE_01E26D:
	LDX.w $0B57
	JSR.w (DATA_01E291,x)
	LDA.w $0B57
	CMP.b #$16
	BCC.b CODE_01E284
	LDA.b #$19
	STA.w $0B57
	LDA.b #!Define_YI_GameMode10
	STA.w !RAM_YI_Global_CurrentGameMode
CODE_01E284:
	LDA.w $0B57
	CMP.b #$08
	BCS.b CODE_01E28F
	JSL.l CODE_01C0CE
CODE_01E28F:
	PLB
	RTL

DATA_01E291:
	dw CODE_01E2A7
	dw CODE_01E2F0
	dw CODE_01E378
	dw CODE_01E442
	dw CODE_01B5E4
	dw CODE_01B6B9
	dw CODE_01B6C9
	dw CODE_01B95B
	dw CODE_01B9BA
	dw CODE_01E2F0
	dw CODE_01E4A0

CODE_01E2A7:
	REP.b #$30
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BEQ.b CODE_01E2C1
	LDA.l YI_Global_PaletteMirror[$00].LowByte
	STA.w $0948
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
CODE_01E2BF:
	REP.b #$30
CODE_01E2C1:
	LDX.w #$0000
	LDA.w #$FF00
CODE_01E2C7:
	STA.l $703A02,x
	INX
	INX
	INX
	INX
	CPX.w #$0348
	BCC.b CODE_01E2C7
	SEP.b #$30
	INC.w $0B57
	INC.w $0B57
	STZ.w $0D1F
	RTS

DATA_01E2E0:
	dw $1F1F,$0104

DATA_01E2E4:
	dw $0000,$018C

DATA_01E2E8:
	dw $0350,$018C

DATA_01E2EC:
	dw $FF00,$9F60

CODE_01E2F0:
	INC.w $0D1F
	LDA.w $0D1F
	CMP.b #$0A
	BCC.b CODE_01E338
	INC.w $0B57
	INC.w $0B57
	REP.b #$20
	STZ.w $0D1F
	LDX.w $0B4E
	LDA.w DATA_01E2E0,x
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.w DATA_01E2E4,x
	STA.w $0D23
	LDA.w DATA_01E2E8,x
	STA.w $0D25
	LDA.w DATA_01E2EC,x
	STA.w $0D21
	SEP.b #$20
	LDA.b #$33
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.b #$22
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
	RTS

CODE_01E338:
	DEC
	BNE.b CODE_01E348
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $00D2
	RTS

CODE_01E348:
	DEC
	BNE.b CODE_01E358
	JSL.l CODE_00BE39	: dl $7E57A2,$703AD4 : dw $00D2
	RTS

CODE_01E358:
	DEC
	BNE.b CODE_01E368
	JSL.l CODE_00BE39	: dl $7E5874,$703BA6 : dw $00D2
	RTS

CODE_01E368:
	DEC
	BNE.b CODE_01E377
	JSL.l CODE_00BE39	: dl $7E5946,$703C78 : dw $00D2
CODE_01E377:
	RTS

CODE_01E378:
	JSR.w CODE_01E3AF
	REP.b #$20
	LDA.w $0D25
	SEC
	SBC.w $0D23
	CMP.w #$0008
	BCS.b CODE_01E3A4
	INC.w $0B4E
	INC.w $0B4E
	INC.w $0B57
	INC.w $0B57
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	SEP.b #$20
	LDA.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
CODE_01E3A4:
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01E3A7:
	dw $0008,$FFF8

DATA_01E3AB:
	dw $0002,$FFFE

CODE_01E3AF:
	REP.b #$30
	LDA.w $0B4E
	AND.w #$0002
	TAY
	LDX.w #$0000
	LDA.w #$00FF
CODE_01E3BE:
	CPX.w $0D23
	BCS.b CODE_01E3CD
	STA.l $703A02,x
	INX
	INX
	INX
	INX
	BRA.b CODE_01E3BE

CODE_01E3CD:
	LDA.w $0D21
CODE_01E3D0:
	CPX.w $0D25
	BCS.b CODE_01E3DF
	STA.l $703A02,x
	INX
	INX
	INX
	INX
	BRA.b CODE_01E3D0

CODE_01E3DF:
	LDA.w #$00FF
CODE_01E3E2:
	CPX.w #$0348
	BCS.b CODE_01E3F1
	STA.l $703A02,x
	INX
	INX
	INX
	INX
	BRA.b CODE_01E3E2

CODE_01E3F1:
	LDA.w #$FF00
CODE_01E3F4:
	CPX.w #$0348
	BCS.b CODE_01E403
	STA.l $703A02,x
	INX
	INX
	INX
	INX
	BRA.b CODE_01E3F4

CODE_01E403:
	LDA.w $0D23
	CLC
	ADC.w DATA_01E3A7,y
	STA.w $0D23
	LDA.w $0D25
	SEC
	SBC.w DATA_01E3A7,y
	STA.w $0D25
	SEP.b #$30
	LDA.w $0D21
	CLC
	ADC.w DATA_01E3AB,y
	STA.w $0D21
	LDA.w $0D22
	SEC
	SBC.w DATA_01E3AB,y
	STA.w $0D22
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDA.w !RAM_YI_Global_HDMAEnable
	ORA.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
	RTS

CODE_01E442:
	REP.b #$30
	LDX.w #$0000
	LDA.w #$00FF
CODE_01E44A:
	STA.l $703A02,x
	INX
	INX
	INX
	INX
	CPX.w #$0348
	BCC.b CODE_01E44A
	SEP.b #$30
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDA.b #$09
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDA.b #$69
	STA.w !RAM_YI_Global_BG1AddressAndSize
	LDA.b #$34
	STA.w !RAM_YI_Global_BG3AddressAndSize
	LDA.b #$02
	STA.w $011C
	LDA.b #$20
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	STZ.w $0D2D
	STZ.w $0D2B
	STZ.w $61CA
	LDA.w #$0277
	STA.w !RAM_YI_Global_BG1And2TileDataDesignation
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	SEP.b #$20
	INC.w $0B57
	INC.w $0B57
	RTS

;---------------------------------------------------------------------------

CODE_01E4A0:
	JSR.w CODE_01E3AF
	REP.b #$20
	LDA.w $0D23
	BPL.b CODE_01E4D1
	INC.w $0B57
	INC.w $0B57
	STZ.w $0392
	STZ.w $0B5F
	STZ.w $0B61
	STZ.w $0B63
	STZ.w $0381
	STZ.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STZ.w !RAM_YI_Global_BG3And4WindowMaskSettings
	SEP.b #$20
	LDA.b #$30
	STA.w $038B
	REP.b #$20
CODE_01E4D1:
	SEP.b #$20
	LDA.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
	RTS

;---------------------------------------------------------------------------

DATA_01E4D9:
	dw $03C0,$0440,$04C0,$0540

DATA_01E4E1:
	dw $8000,$4000,$2000,$1000,$0800,$0400,$0200,$0100
	dw $0080,$0040,$0020,$0010,$0008,$0004,$0002,$0001

CODE_01E501:
	PHX
	TXA
	AND.w #$001E
	TAX
	LDA.l DATA_01E4E1,x
	STA.b $02
	LDA.w !RAM_YI_Level_LevelHeaderItemMemorySettingLo
	ASL
	TAX
	LDA.l DATA_01E4D9,x
	STA.b $00
	PLX
	LDA.b $1B
	XBA
	AND.w #$00FF
	TAY
	LDA.w $6CAA,y
	AND.w #$003F
	ASL
	TAY
	LDA.b ($00),y
	AND.b $02
	RTL

;---------------------------------------------------------------------------

CODE_01E52D:
	JSL.l CODE_008277
	JSL.l CODE_00831C
	LDA.b #$2E
	STA.l $704070
	JSR.w CODE_01E59A
	JML.l CODE_1083E2

;---------------------------------------------------------------------------

DATA_01E542:
	dw $3400,$47FF,$2A6E
	dw $3485,$000F,$2A00
	dw $2A02,$2A04,$2A06
	dw $2A08,$2A0A,$2A0C
	dw $2A0E,$34A5,$000F
	dw $2A20,$2A22,$2A24
	dw $2A26,$2A28,$2A2A
	dw $2A2C,$2A2E,$34C5
	dw $000F,$2A40,$2A42
	dw $2A44,$2A46,$2A48
	dw $2A4A,$2A4C,$2A4E
	dw $34E5,$000F,$2A60
	dw $2A62,$2A64,$2A66
	dw $2A68,$2A6A,$2A6C
	dw $2A6E,$FFFF

;---------------------------------------------------------------------------

CODE_01E59A:
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	LDX.w DATA_01AF80
	JSL.l CODE_00BDA2
	LDX.b #$702000>>16
	PHX
	PLB
	REP.b #$20
	LDX.b #$7E
CODE_01E5B1:
	STZ.w $702000,x
	STZ.w $702080,x
	STZ.w $702100,x
	STZ.w $702180,x
	DEX
	DEX
	BPL.b CODE_01E5B1
	LDA.w #$7FFF
	STA.w $702016
	SEP.b #$20
	PHK
	PLB
	LDA.b #$1E
	STA.w $0127
	JSL.l CODE_00E37B
	JSR.w CODE_01E689
	LDA.b #$02
	STA.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	RTS

;---------------------------------------------------------------------------

CODE_01E5E9:
	LDA.b #$2E
	STA.l $704070
	JSR.w CODE_01E689
	LDA.w $0037
	AND.b #$80
	ORA.w $0038
	AND.b #$90
	BNE.b CODE_01E601
	JMP.w CODE_01E687

CODE_01E601:
	LDA.w $0037
	AND.b #$80
	BNE.b CODE_01E612
	LDA.l $704094
	TAX
	LDA.w DATA_01E6B7,x
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_01E612:
	LDA.b #$10
	STA.b $8F
	INC.w !RAM_YI_Global_CurrentGameMode
	STZ.w $038C
	TXA
	BNE.b CODE_01E687
	LDA.b #$01
	STA.w $038C
	JSR.w CODE_01B292
	REP.b #$20
	STZ.w !EXRAM_YI_Level_ShowHiddenItemsFlag|!EXRAMBankMirror
	STZ.w $03A1
	STZ.w $03A3
	STZ.w $03A5
	LDA.w !RAM_YI_Level_StarTimerLo
CODE_01E638:
	CMP.w #$0064
	BCC.b CODE_01E645
	SBC.w #$0064
	INC.w $03A1
	BRA.b CODE_01E638

CODE_01E645:
	CMP.w #$000A
	BCC.b CODE_01E652
	SBC.w #$000A
	INC.w $03A3
	BRA.b CODE_01E645

CODE_01E652:
	STA.w $03A5
	PHB
	LDY.b #YI_LevelDataPtrsAndEntranceData_DATA_17F551>>16
	PHY
	PLB
	REP.b #$30
	STZ.w $038E
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	ASL
	TAY
	LDA.w !RAM_YI_Level_CurrentItemMemoryPageLo
	ASL
	ASL
	ADC.w YI_LevelDataPtrsAndEntranceData_DATA_17F551,y
	TAY
	LDA.w YI_LevelDataPtrsAndEntranceData_DATA_17F5DB+$01,y
	STA.l $7F7E01
	SEP.b #$20
	LDA.w YI_LevelDataPtrsAndEntranceData_DATA_17F5DB,y
	STA.l $7F7E00
	LDA.w YI_LevelDataPtrsAndEntranceData_DATA_17F5DB+$03,y
	STA.l $7F7E03
	SEP.b #$10
	PLB
CODE_01E687:
	PLB
	RTL

CODE_01E689:
	JSR.w CODE_01E180
	LDA.l $704094
	TAX
	REP.b #$30
	LDA.w #$0000
	STA.l $7E4000
	DEC
	STA.l $7E4002
	SEP.b #$30
	RTS

CODE_01E6A2:
	JSL.l CODE_008277
	JSL.l CODE_00831C
	LDA.b #$21
	STA.l $704070
	JSR.w CODE_01E59A
	JML.l CODE_1083E2

DATA_01E6B7:
	db !Define_YI_SoundID43_MountYoshi,!Define_YI_SoundID2E_ClankSound7

;---------------------------------------------------------------------------

CODE_01E6B9:
	LDA.b #$21
	STA.l $704070
	JSR.w CODE_01E689
	LDA.w $0037
	AND.b #$80
	ORA.w $0038
	AND.b #$90
	BEQ.b CODE_01E6EC
	LDA.w $0037
	AND.b #$80
	BNE.b CODE_01E6DF
	LDA.l $704094
	TAX
	LDA.w DATA_01E6B7,x
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_01E6DF:
	INC.w !RAM_YI_Global_CurrentGameMode
	LDA.b #$10
	STA.b $8F
	TXA
	BNE.b CODE_01E6EC
	STZ.w $038C
CODE_01E6EC:
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_01E6EE:
	db !Define_YI_GameMode0B,!Define_YI_GameMode1F

CODE_01E6F0:
	DEC.b $8F
	BNE.b CODE_01E70F
	LDA.l $704094
	TAX
	LDA.w DATA_01E6EE,x
	STA.w !RAM_YI_Global_CurrentGameMode
	DEX
	BMI.b CODE_01E70C
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.b #!Define_YI_LevelID_WelcomeToYoshisIsland
	BNE.b CODE_01E70C
	STZ.w !RAM_YI_Level_CurrentLevelFromMapLo
CODE_01E70C:
	STZ.w $0203
CODE_01E70F:
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_01E711:
	dw $0000,$0002,$0004,$0006,$0008,$000A,$003D,$003F
	dw $0041,$0043,$0045,$0047,$0049,$004B,$004D,$004F
	dw $0087,$0089,$008B,$008D,$0099,$009B,$009D,$009F
	dw $009F,$00A1,$00A3,$00A5,$00A7,$00AB,$00AD,$00AF

DATA_01E751:
	db $00,$BE,$00,$BF,$00,$C0,$00,$C1,$00,$C2,$04,$C3,$01,$00 : dw DATA_01E761

DATA_01E761:
	db $00,$B0,$00,$F7,$02,$00,$A0,$00,$07,$03,$00,$90,$00,$17,$03,$00
	db $80,$00,$27,$03,$00,$70,$00,$37,$03,$00,$60,$00,$47,$03,$00,$50
	db $00,$57,$03,$00,$40,$00,$67,$03,$00,$C0,$00,$00,$08,$00,$C4,$00
	db $C5,$00,$C6,$00,$CD,$00,$C7,$00,$C8,$00,$C9,$00,$CA,$00,$CB,$04
	db $CC,$01,$00 : dw DATA_01E7A6

DATA_01E7A6:
	db $00,$28,$00,$97,$01,$00,$16,$00,$B7,$01,$00,$28,$00,$D7,$01,$00
	db $16,$00,$F7,$01,$00,$28,$00,$17,$02,$00,$16,$00,$37,$02,$00,$28
	db $00,$57,$02,$00,$28,$00,$77,$02,$00,$40,$00,$B7,$02,$00,$80,$00
	db $00,$04,$00,$CD,$00,$CC,$00,$CE,$00,$CF,$01,$02,$C7,$02,$04,$57
	db $03,$02,$00,$04,$00,$D0,$00,$D1,$00,$D7,$00,$D2,$00,$D3,$00,$D4
	db $00,$D5,$04,$D6,$00,$00,$00,$D9,$00,$DA,$00,$DB,$00,$76,$00,$6E
	db $00,$66,$00,$5E

CODE_01E80A:
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$0A
	BNE.b CODE_01E814
	JMP.w CODE_01E88F

CODE_01E814:
	STZ.w $0D2B
	STZ.w $0D2D
	STZ.w $0D37
	STZ.w $0D39
	REP.b #$30
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	ASL
	TAX
	LDY.w DATA_01E711,x
	LDA.w DATA_01E751,y
	AND.w #$00FF
	TAX
	JMP.w (DATA_01E834,x)

DATA_01E834:
	dw CODE_01E84F
	dw $0000
	dw CODE_01E83A

CODE_01E83A:
	SEP.b #$20
	LDA.b #!REGISTER_BG2HorizScrollOffset
	STA.w HDMA[$04].Destination
	LDA.w DATA_01E751+$02,y
	STA.w $0D2B
	REP.b #$20
	LDA.w DATA_01E751+$04,y
	STA.w $0D2F
CODE_01E84F:
	LDA.w DATA_01E751+$01,y
	AND.w #$00FF
	LDX.w #$5800
	JSL.l CODE_00B756
	STA.w DMA[$00].SizeLo
	SEP.b #$10
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$3800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDX.b #$705800>>16
	STX.w DMA[$00].SourceBank
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	SEP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$03
	BNE.b CODE_01E88E
	JSR.w CODE_01E8D1
CODE_01E88E:
	RTS

CODE_01E88F:
	REP.b #$30
	LDA.w #$00F2
	AND.w #$00FF
	LDX.w #$5800
	JSL.l CODE_00B756
	STA.w DMA[$00].SizeLo
	SEP.b #$10
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$3800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDX.b #$705800>>16
	STX.w DMA[$00].SourceBank
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	SEP.b #$20
	RTS

DATA_01E8C7:
	dw $8000,$0000,$0208

DATA_01E8CD:
	dw $0001,$FF08

CODE_01E8D1:
	LDA.b #!REGISTER_BG2HorizScrollOffset
	STA.w HDMA[$04].Destination
	LDA.b #!REGISTER_BG2VertScrollOffset
	STA.w HDMA[$03].Destination
	STZ.w $0D2B
	STZ.w $0D2D
	REP.b #$20
	LDA.w #DATA_01E8C7
	STA.w $0D2F
	LDA.w #DATA_01E8CD
	STA.w $0D31
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01E8F2:
	dw $3400,$47FF,$01CE
	dw $FFFF

DATA_01E8FA:
	dw $3400,$47FF,$0111
	dw $FFFF

DATA_01E902:
	dw $3400,$47FF,$01CE
	dw $FFFF

DATA_01E90A:
	db $DC,$00,$01,$DD,$00,$FF,$E5,$00,$00,$E5,$00,$00,$DE,$00,$FF,$DF
	db $00,$FF,$E0,$00,$FF,$E4,$00,$FF,$00,$00,$00,$00,$00,$00,$E1,$00
	db $FF,$E6,$00,$00,$E7,$00,$00,$E8,$00,$1B,$E9,$00,$26,$EA,$00,$00
	db $EB,$00,$FF,$EC,$00,$00,$ED,$00,$80,$EE,$00,$31,$EF,$00,$00,$F0
	db $00,$00,$F1,$00,$00,$F2,$00,$00,$F3,$00,$00,$F4,$00,$00,$F5,$00
	db $00,$F6,$00,$00,$ED,$00,$3C,$F7,$00,$81,$F8,$00,$00,$F9,$00,$82
	db $FB,$00,$00,$FC,$00,$83,$FD,$00,$84,$FE,$00,$85,$FF,$00,$00,$00
	db $01,$00,$01,$01,$00,$02,$01,$00,$03,$01,$00,$04,$01,$86,$05,$01
	db $00,$06,$01,$87,$06,$01,$00,$07,$01,$00,$08,$01,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00

DATA_01E9AE:
	db $00,$02,$10,$00,$04,$10,$00,$04,$10,$00,$04,$10,$00,$04,$10,$00
	db $04,$10,$00,$04,$10,$00,$04,$12,$10,$00,$00,$06,$8A,$00,$04,$0A
	db $00,$04,$16,$0A,$06,$00,$06,$8A,$00,$04,$09,$00,$04,$17,$09,$06
	db $00,$06,$90,$00,$04,$06,$0D,$04,$0C,$13,$06,$00,$06,$F5,$00,$04
	db $81,$01,$04,$89,$02,$04,$00

CODE_01E9F5:
	LDY.b #$09
	LDA.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	BEQ.b CODE_01EA39
	ASL
	ADC.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	TAY
	REP.b #$20
	LDA.w DATA_01E90A-$03,y
	BEQ.b CODE_01EA40
	REP.b #$10
	LDX.w #$5800
	PHY
	JSL.l CODE_00B756
	PLY
	LDX.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CPX.w #$0016
	BNE.b CODE_01EA43
	LDX.w #$7E5DA6
	STX.b $20
	LDX.w #$7E5DA6>>16
	STX.b $22
	LDX.w #$705800
	STX.b $23
	LDX.w #$705800>>16
	STX.b $25
	SEP.b #$10
	JSL.l CODE_008288
	SEP.b #$20
	LDY.b #$1B
CODE_01EA39:
	STY.w $0127
	JSL.l CODE_00E37B
CODE_01EA40:
	SEP.b #$20
	RTS

CODE_01EA43:
	SEP.b #$10
	STA.w DMA[$00].SizeLo
	STA.b $00
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$3400
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDX.b #$705800>>16
	STX.w DMA[$00].SourceBank
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$000A
	BNE.b CODE_01EA87
	LDA.b $00
	STA.w DMA[$00].SizeLo
	LDA.w #$0000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$5800
	STA.w DMA[$00].SourceLo
	STX.w !REGISTER_DMAEnable
CODE_01EA87:
	SEP.b #$20
	LDX.w DATA_01E90A-$01,y
	BEQ.b CODE_01EA40
	CPX.b #$FF
	BEQ.b CODE_01EAA0
	TXA
	BPL.b CODE_01EAA9
	ASL
	CMP.b #$10
	BCS.b CODE_01EAA0
	TAX
	JSR.w (DATA_01EB29,x)
	BRA.b CODE_01EA40

CODE_01EAA0:
	LDA.b #$04
	TRB.w !RAM_YI_Global_MainScreenLayers
	TRB.w !RAM_YI_Global_SubScreenLayers
	RTS

CODE_01EAA9:
	LDA.l DATA_01E9AE,x
	STA.w $0D3B
	PHB
	LDA.b #$703D4A>>16
	PHA
	PLB
	REP.b #$10
	LDY.w #$0000
	STZ.b $08
CODE_01EABC:
	LDA.l DATA_01E9AE+$01,x
	BEQ.b CODE_01EB25
	STA.b $01
	REP.b #$20
	AND.w #$007F
	ASL
	ASL
	ASL
	ASL
	STA.b $02
	LDA.l DATA_01E9AE+$02,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.b $04
	LDA.l DATA_01E9AE+$03,x
	AND.w #$00FF
	STA.b $06
CODE_01EAE5:
	LDA.b $04
	SEC
	SBC.b $08
	STA.w $703D4C,y
	LDA.w #$0010
	BIT.b $00
	BMI.b CODE_01EAFE
	LDA.b $04
	CLC
	ADC.w #$0010
	STA.b $04
	LDA.b $02
CODE_01EAFE:
	STA.w $703D4A,y
	LDA.b $08
	CLC
	ADC.w #$0010
	STA.b $08
	LDA.b $06
	STA.w $703D4E,y
	TYA
	CLC
	ADC.w #$0006
	TAY
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.b $02
	BNE.b CODE_01EAE5
	SEP.b #$20
	INX
	INX
	INX
	BRA.b CODE_01EABC

CODE_01EB25:
	PLB
	SEP.b #$10
	RTS

;---------------------------------------------------------------------------

DATA_01EB29:
	dw CODE_01EB3D
	dw CODE_01EC86
	dw CODE_01EC7F
	dw CODE_01ED77
	dw CODE_01ED14
	dw CODE_01ED8C
	dw CODE_01EC86
	dw CODE_01EC78

DATA_01EB39:
	dw $3740

DATA_01EB3B:
	dw $0680

CODE_01EB3D:
	PHX
	LDY.b #$21
	STY.w $0127
	JSL.l CODE_00E37B
	PLA
	REP.b #$20
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_01EB39,x
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0800
	SEC
	SBC.w DATA_01EB3B,x
	STA.w DMA[$00].SizeLo
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDX.b #$705800>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_01EB7D:
	db $00,$20,$00,$07,$00,$00,$30,$00,$27,$00,$00,$20,$00,$37,$00,$00
	db $2E,$00,$57,$00,$00,$20,$00,$67,$00,$00,$2C,$00,$87,$00,$00,$20
	db $00,$97,$00,$00,$2A,$00,$B7,$00,$00,$10,$00,$37,$01,$00,$28,$00
	db $57,$01,$00,$20,$00,$67,$01,$00,$40,$00,$00,$08

DATA_01EBB9:
	db $00,$1A,$00,$17,$06,$00,$2E,$00,$57,$06,$00,$19,$00,$77,$06,$00
	db $2C,$00,$C7,$06,$00,$18,$00,$D7,$06,$00,$2A,$00,$07,$07,$00,$17
	db $00,$17,$07,$00,$28,$00,$57,$07,$00,$16,$00,$67,$07,$00,$C0,$00
	db $B7,$07,$00,$40,$01,$00,$08

DATA_01EBF0:
	db $00,$16,$00,$77,$07,$82,$00,$90,$00,$00,$08,$A0

DATA_01EBFC:
	db $00,$2A,$00,$27,$00,$00,$1A,$00,$57,$00,$00,$28,$00,$87,$00,$00
	db $18,$00,$B7,$00,$00,$26,$00,$E7,$00,$00,$16,$00,$07,$01,$00,$12
	db $00,$27,$01,$82,$00,$10,$00,$67,$01,$10,$80,$00,$20,$00,$87,$01
	db $00,$30,$00,$00,$08

DATA_01EC31:
	db $00,$00,$00,$17,$00,$00,$20,$00,$37,$00,$00,$00,$00,$47,$00,$00
	db $00,$00,$67,$00,$00,$1C,$00,$97,$00,$00,$1A,$00,$C7,$00,$00,$00
	db $00,$C7,$00,$00,$18,$00,$E7,$00,$00,$00,$00,$67,$01,$00,$40,$00
	db $00,$08

DATA_01EC63:
	db $82,$00,$00,$01,$00,$08,$08

DATA_01EC6A:
	dw DATA_01EB7D,DATA_01EBB9,DATA_01EBF0,DATA_01EBFC,$0000,DATA_01EC31,DATA_01EC63

CODE_01EC78:
	LDA.b #$04
	STA.w $0D43
	BRA.b CODE_01EC86

CODE_01EC7F:
	PHX
	LDX.b #$00
	JSR.w CODE_01ECAE
	PLX
CODE_01EC86:
	LDA.b #$01
	STA.w $0D3D
	REP.b #$20
	LDA.w DATA_01EC6A-$02,x
	STA.w $0D3F
	SEP.b #$30
	RTS

;---------------------------------------------------------------------------

DATA_01EC96:
	db $11,$06,$B7,$07,$15,$02,$00,$08

DATA_01EC9E:
	db $22,$20,$87,$07,$22,$62,$00,$08

DATA_01ECA6:
	db $08,$08

DATA_01ECA8:
	dw DATA_01EC96,DATA_01EC9E

DATA_01ECAC:
	db !REGISTER_MainScreenLayers,!REGISTER_ColorMathInitialSettings

CODE_01ECAE:
	LDA.w DATA_01ECA6,x
	INC
	STA.w $0D27
	REP.b #$20
	TXA
	AND.w #$00FF
	TAY
	ASL
	TAX
	LDA.w DATA_01ECA8,x
	STA.w $0D28
	SEP.b #$20
	LDA.b #$41
	STA.w HDMA[$04].Parameters
	LDA.w DATA_01ECAC,y
	STA.w HDMA[$04].Destination
	RTS

;---------------------------------------------------------------------------

DATA_01ECD2:
	db $00,$29,$07,$01,$65,$07,$00,$00,$08,$FF

DATA_01ECDC:
	db $0C,$00,$0C,$00,$E0,$00,$19,$00,$1F,$12,$40,$00,$1F,$12,$19,$00
	db $40,$00,$0C,$00,$0C,$00,$50,$00,$FF,$FF

DATA_01ECF6:
	db $2C,$5E,$2C,$5E,$E0,$00,$EE,$6E,$F8,$6E,$40,$00,$F8,$6E,$EE,$6E
	db $40,$00,$2C,$5E,$2C,$5E,$50,$00,$FF,$FF

DATA_01ED10:
	dw DATA_01ECDC,DATA_01ECF6

CODE_01ED14:
	JSR.w CODE_01EC86
	LDY.b #$00
	LDA.w !RAM_YI_Level_LevelHeaderBG3PaletteLo
	AND.b #$01
	BEQ.b CODE_01ED22
	LDY.b #$02
CODE_01ED22:
	REP.b #$20
	LDA.w #DATA_01ECDC>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_01ED10,y
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08EBB5>>16
	LDA.w #FXCODE_08EBB5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$7F56DE
	STA.b $20
	LDY.b #$7F56DE>>16
	STY.b $22
	LDA.w #$705800
	STA.b $23
	LDY.b #$705800>>16
	STY.b $25
	LDA.w #$0522
	JSL.l CODE_008288
	LDA.w #DATA_01ECD2
	STA.w $0D47
	STZ.w $0D4B
	STZ.w $0D2B
	STZ.w $0D2D
	SEP.b #$20
	LDA.b #!REGISTER_BG3VertScrollOffset
	STA.w HDMA[$04].Destination
	INC.w $0D0D
	LDA.w !RAM_YI_Global_HDMAEnable
	ORA.b #$06
	STA.w !RAM_YI_Global_HDMAEnable
	INC.w $0D45
	RTS

;---------------------------------------------------------------------------

CODE_01ED77:
	LDA.b #$17
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$04
	STA.w !RAM_YI_Global_SubScreenLayers
	LDX.b #$01
	JSR.w CODE_01ECAE
	LDX.b #$06
	JSR.w CODE_01EC86
	RTS

;---------------------------------------------------------------------------

CODE_01ED8C:
	LDA.b #$A0
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$64
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	RTS

;---------------------------------------------------------------------------

UNK_01ED97:
	dw UNK_01ED9B,UNK_01EDA5

UNK_01ED9B:
	db $FF,$20,$BD,$B2,$B6,$AE,$D0,$BE,$B9,$FD

UNK_01EDA5:
	db $FF,$20,$C2,$B8,$BE,$D0,$B5,$B8,$BC,$BD,$FD

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($01EDBD, incbin, DATA_01EDBD_YI_U2.bin)
else
	%FREE_BYTES($01EDB0, 4688, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank02Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_028000:
	db $00,$01,$03,$02,$04,$05,$06,$07,$00,$00,$00,$00,$00,$01,$03,$02
	db $04,$05,$06,$07,$00,$00,$00,$00,$00,$01,$03,$02,$04,$05,$06,$07
	db $00,$00,$00,$00,$00,$01,$03,$02,$04,$05,$06,$07,$00,$00,$00,$00
	db $00,$01,$03,$02,$04,$05,$06,$07,$00,$00,$00,$00,$00,$01,$03,$02
	db $04,$05,$06,$00,$00,$00,$00,$00

;---------------------------------------------------------------------------

CODE_028048:
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_548000+$0040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$0040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

CODE_02808C:
	LDA.w #!Define_YI_AmbSpr1D4
	JSL.l CODE_008B21
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	RTL

;---------------------------------------------------------------------------

CODE_0280AC:
	JSL.l CODE_02808C
	LDA.w #$0001
	STA.w $7E4E,y
	RTL

;---------------------------------------------------------------------------

DATA_0280B7:
	dw $0022,$0046,$006A

DATA_0280BD:
	db $02,$04,$06,$02,$04,$06,$00,$00,$00,$02,$04,$06,$02,$04,$06,$00
	db $00,$00,$0F,$10,$11,$0D,$07,$05,$0C,$0A,$0A,$0F,$10,$11,$0D,$07
	db $05,$0C,$0A,$0A,$0C,$10,$16,$0D,$07,$05,$0C,$0A,$0A,$0C,$10,$16
	db $0D,$07,$05,$0C,$0A,$0A,$0C,$10,$16,$0D,$07,$05,$0C,$0A,$0A,$0C
	db $10,$16,$0D,$07,$05,$0C,$0A,$0A,$01,$03,$05,$01,$03,$05,$00,$00
	db $00,$01,$03,$05,$01,$03,$05,$00,$00,$00,$07,$0C,$11,$03,$05,$08
	db $05,$09,$0D,$07,$0C,$11,$03,$05,$08,$05,$09,$0D

DATA_028129:
	dw $0028,$FFD8

YI_NorSpr036_FallingWall_Init:
;$02812D
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$000A
	BNE.b CODE_02813E
	LDA.w $7042,x
	ORA.w #$0004
	STA.w $7042,x
CODE_02813E:
	JSR.w CODE_028183
	STZ.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	PHB
	PHK
	PLB
	LDY.w $0073
	LDA.w $70E2,x
	CLC
	ADC.w DATA_028129,y
	STA.w $70E2,x
	ORA.w #$0008
	STA.w $7E42
	LDA.w #$0104
	STA.w $0CB8
	STZ.w $7E40
	STZ.w $0CB4
	LDA.w $7042,x
	AND.w #$000E
	TAX
	LDY.w DATA_0280B7,x
	LDX.b #$22
CODE_028172:
	LDA.w DATA_0280BD,y
	STA.l $70404A,x
	DEY
	DEY
	DEX
	DEX
	BPL.b CODE_028172
	LDX.b $12
	PLB
	RTL

CODE_028183:
	LDA.w $0CB2
	BEQ.b CODE_02818D
	PLA
	JML.l CODE_03A31E

CODE_02818D:
	INC.w $0CB2
	RTS

;---------------------------------------------------------------------------

DATA_028191:
	dw DATA_028197,DATA_0281B1,DATA_0281CB

DATA_028197:
	db $04,$10,$8E,$60,$00,$8E,$60,$00,$00,$60,$10,$00,$60,$04,$00,$00
	db $01,$42,$01,$02,$80,$02,$03,$C2,$03,$00

DATA_0281B1:
	db $04,$08,$E0,$50,$F8,$E0,$50,$F8,$20,$50,$08,$20,$50,$04,$60,$00
	db $01,$A2,$01,$02,$E0,$02,$03,$22,$03,$00

DATA_0281CB:
	db $08,$00,$C8,$60,$D9,$D9,$60,$C8,$00,$60,$D9,$27,$60,$00,$38,$60
	db $27,$27,$60,$38,$00,$60,$27,$D9,$60,$08,$E0,$00,$01,$C2,$01,$02
	db $A1,$02,$03,$83,$03,$04,$60,$04,$05,$42,$05,$06,$21,$06,$07,$03
	db $07

DATA_0281FC:
	dw $FC00,$04FF

DATA_028200:
	dw $0000,$00F0

DATA_028204:
	db $08,$C0,$FF,$00,$00

YI_NorSpr036_FallingWall_Main:
;$028209
	JSL.l CODE_02841A
	LDA.w $7C16,x
	CLC
	ADC.w #$0070
	CMP.w #$00E1
	LDA.w #$0215
	BCS.b CODE_02822A
	LDA.w #$0710
	LDY.w $7E40
	DEY
	CPY.b #$BF
	BCS.b CODE_02822A
	LDA.w #$0714
CODE_02822A:
	STA.w !RAM_YI_Global_MainScreenLayers
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	BNE.b CODE_02825F
	LDY.w $0CB4
	BNE.b CODE_028262
	LDA.w $7C16,x
	CLC
	ADC.w #$0030
	CMP.w #$0061
	BCS.b CODE_02825F
	LDA.w $7C18,x
	CLC
	ADC.w #$0030
	CMP.w #$0061
	BCS.b CODE_02825F
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState00_Normal
	BNE.b CODE_02825F
	INC.w $0CB4
	INY
CODE_02825F:
	JMP.w CODE_028417

CODE_028262:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0281FC,y
	CMP.w DATA_028200,y
	BNE.b CODE_028271
	LDA.w DATA_028200,y
CODE_028271:
	STA.w $7A36,x
	LDA.w $7A38,x
	AND.w #$00FF
	CLC
	ADC.w $7A36,x
	STA.w $7A38,x
	AND.w #$FF00
	BPL.b CODE_028289
	ORA.w #$00FF
CODE_028289:
	XBA
	CLC
	ADC.w $7E40
	STA.w $7E40
	SEC
	SBC.w DATA_028204,y
	EOR.w DATA_028200,y
	BMI.b CODE_0282D5
	LDA.w #$0040
	CPY.b #$01
	BEQ.b CODE_0282AD
	LDX.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CPX.b #!Define_YI_PlayerState12_SmushedByWall
	BNE.b CODE_0282AB
	LDA.w #$0100
CODE_0282AB:
	LDX.b $12
CODE_0282AD:
	STA.w $7A96,x
	LDA.w DATA_028204,y
	STA.w $7E40
	STZ.w $7A36,x
	STZ.w $7A38,x
	LDA.w #$0000
	DEY
	BNE.b CODE_0282D2
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0060
	STA.w $61C6
	LDA.w #$0003
CODE_0282D2:
	STA.w $0CB4
CODE_0282D5:
	TXY
	REP.b #$10
	LDA.w $7E40
	BIT.w #$0040
	PHP
	BEQ.b CODE_0282E5
	EOR.w #$003F
	INC
CODE_0282E5:
	EOR.w #$00FF
	INC
	AND.w #$003F
	ASL
	TAX
	LDA.l FXDATA_0BBA12,x
	LSR
	PLP
	BNE.b CODE_0282FA
	EOR.w #$FFFF
	INC
CODE_0282FA:
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$60
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductLo
	ASL
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	ROL
	STA.w $0CBA
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState12_SmushedByWall
	BNE.b CODE_028322
	STY.w $61B6
	BRA.b CODE_028365

CODE_028322:
	LDA.w $0CB4
	DEC
	BNE.b CODE_028365
	LDA.w $0CB8
	SEC
	SBC.w #$0060
	ASL
	TAX
	LDA.l $702200,x
	STA.b $08
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$30
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	STA.b $06
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,y
	STA.b $02
	BPL.b CODE_02835B
	EOR.w #$FFFF
	INC
CODE_02835B:
	CLC
	ADC.w #$0008
	STA.b $04
	CMP.b $06
	BCC.b CODE_028368
CODE_028365:
	JMP.w CODE_028415

CODE_028368:
	LDA.w $7E40
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_00E9D4,x
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$70
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductMid
	CMP.b #$60
	REP.b #$20
	BCC.b CODE_028365
	LDA.w #$000B
	LDX.w $60C2
	BEQ.b CODE_028396
	LDA.w #$0005
CODE_028396:
	CLC
	ADC.w $7682,y
	SEC
	SBC.w $60B2
	BMI.b CODE_028415
	SEC
	SBC.w $0CBA
	BMI.b CODE_028415
	CMP.w #$0030
	BCS.b CODE_028415
	LDX.w $60C0
	BEQ.b CODE_0283D3
	LDX.w $60AA
	BPL.b CODE_0283B8
	STZ.w $60AA
CODE_0283B8:
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	SEC
	SBC.w $7182,y
	BMI.b CODE_028415
	EOR.w #$FFFF
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_0283D3:
	LDA.w #!Define_YI_PlayerState12_SmushedByWall
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $60B4
	STZ.w $60A8
	STZ.w $60AA
	JSL.l CODE_04F74A
	JSL.l CODE_03BFF7
	INC.w $0D94
	LDA.b $08
	ASL
	TAX
	LDA.l $702200,x
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b $04
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	LDX.b $02
	BPL.b CODE_028410
	EOR.w #$FFFF
	INC
CODE_028410:
	STA.w $7E46
	REP.b #$20
CODE_028415:
	SEP.b #$10
CODE_028417:
	LDX.b $12
	RTL

CODE_02841A:
	LDY.b #$00
CODE_02841C:
	PHY
	PHB
	PHK
	PLB
	LDA.w DATA_028191,y
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0078
	SEC
	SBC.w $7680,x
	STA.w !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	CLC
	ADC.w #$000F
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $0CB6
	LDA.w $0CB8
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7E40
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #DATA_028197>>16
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08BE9F>>16
	LDA.w #FXCODE_08BE9F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $01A4
	LDA.w !RAM_YI_Global_HDMAEnable
	AND.w #$00E7
	ORA.w #$0010
	STA.w !RAM_YI_Global_HDMAEnable
	PLB
	LDX.b $12
	PLY
	CPY.b #$04
	BEQ.b CODE_02848B
	JSL.l CODE_03A2DE
	BCC.b CODE_02848B
	STZ.w $0CB2
CODE_02848B:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr034_RogersPot_Init:
;$02848C
	LDA.w #$0035
	JSL.l CODE_03A364
	BCS.b CODE_028499
	JML.l CODE_03A31E

CODE_028499:
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	STA.w $7860,y
	TYA
	STA.b $18,x
	JSR.w CODE_0284E1
	LDY.b #$2D
	JSL.l CODE_0CE5D6
	LDA.w #$0047
	TXY
	JSL.l CODE_03A34E
	BCC.b CODE_0284CC
	LDA.w $70E2,x
	CLC
	ADC.w #$0040
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
CODE_0284CC:
	LDX.b #$3C
CODE_0284CE:
	LDA.l DATA_5FE67E,x
	STA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_0284CE
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

CODE_0284E1:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	RTS

;---------------------------------------------------------------------------

DATA_0284EE:
	dw $0100,$FF00

DATA_0284F2:
	dw $006C,$FFA0

YI_NorSpr034_RogersPot_Main:
;$0284F6
	JSL.l CODE_03AF23
	LDY.b $18,x
	JSR.w CODE_0284E1
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $61B4
	BNE.b CODE_02854F
	LDY.w $7D36,x
	BPL.b CODE_02854F
	LDA.w $60B4
	PHA
	JSL.l CODE_03D130
	PLA
	BCS.b CODE_02854F
	CMP.w $60B4
	BEQ.b CODE_02854F
	PHA
	CLC
	ADC.w #$0100
	CMP.w #$0201
	LDY.b #$00
	PLA
	BCC.b CODE_028542
	BPL.b CODE_028539
	LDY.b #$02
CODE_028539:
	LDA.w DATA_0284F2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_0284EE,y
CODE_028542:
	STA.w $60B4
	INC.w $61C2
	INC.w $60DC
	JSL.l CODE_0D90A1
CODE_02854F:
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	CMP.w #$0006
	BNE.b CODE_028592
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState02_InCutscene
	BNE.b CODE_0285DB
	LDA.w $1015
	BNE.b CODE_028579
	LDA.w $60C0
	BEQ.b CODE_028571
	LDA.w #$0040
	STA.w $7A96,x
CODE_028571:
	LDA.w $7A96,x
	BNE.b CODE_0285DB
	INC.w $1015
CODE_028579:
	BPL.b CODE_0285DB
	STZ.w $1015
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0180
	STA.w $7A98,y
	LDA.w #$0100
	STA.w $7AF6,y
	BRA.b CODE_0285DB

CODE_028592:
	CMP.w #$0004
	BNE.b CODE_0285DB
	LDA.w $7542,x
	CMP.w #$0040
	BCS.b CODE_0285A2
	INC.w $7542,x
CODE_0285A2:
	LDA.w $7682,x
	CMP.w #$0300
	BCC.b CODE_0285DB
	LDA.w #$0005
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7AF8,y
	LDA.w #$00FF
	STA.w $74A2,y
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0060
	STA.w $61C6
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSL.l CODE_02E1A3
	JML.l CODE_03A32E

CODE_0285DB:
	LDA.w $7860,x
	AND.w #$0001
	STA.w $7860,y
	BEQ.b CODE_0285E9
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0285E9:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr035_RogerThePottedGhost_Init:
;$0285EA
	RTL

;---------------------------------------------------------------------------

YI_NorSpr035_RogerThePottedGhost_Main:
;$0285EB
	JSR.w CODE_02893E
	JSL.l CODE_03AF23
	LDA.b $18,x
	ASL
	TXY
	TAX
	JSR.w (DATA_028661,x)
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $601A
	BEQ.b CODE_028639
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.w $60B4
	CLC
	ADC.w #$FF80
	CMP.w #$FC00
	BPL.b CODE_028636
	LDA.w #$FC00
CODE_028636:
	STA.w $60B4
CODE_028639:
	LDA.w $6014
	BEQ.b CODE_028650
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	CLC
	ADC.w #$FF80
	CMP.w #$FE00
	BPL.b CODE_02864D
	LDA.w #$FE00
CODE_02864D:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_028650:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_028660
	LDA.w $7D38,y
	BEQ.b CODE_028660
	TYX
	JSL.l CODE_03B25B
CODE_028660:
	RTL

DATA_028661:
	dw CODE_028687
	dw CODE_02879B
	dw CODE_028827
	dw CODE_028874
	dw CODE_0288AA
	dw CODE_0288FF
	dw CODE_02866F

CODE_02866F:
	TYX
	RTS

DATA_028671:
	db $00,$01,$02,$03,$04,$05,$06,$07
	db $08,$09,$08

DATA_02867C:
	db $01,$01,$01,$02,$02,$03,$04,$08
	db $04,$08,$04

CODE_028687:
	TYX
	LDY.w $7041,x
	CPY.b #$20
	BCC.b CODE_02870B
	LDA.w $7AF8,x
	BNE.b CODE_0286B5
	LDY.b $78,x
	INY
	CPY.b #$0C
	BCC.b CODE_0286A0
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDY.b #$08
CODE_0286A0:
	TYA
	STA.b $78,x
	LDA.w DATA_028671-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_02867C-$01,y
	AND.w #$00FF
	STA.w $7AF8,x
CODE_0286B5:
	LDA.w $7A98,x
	BNE.b CODE_0286CC
	LDA.w #$0001
	STA.b $18,x
	LDA.w #$000F
	STA.b $78,x
	LDA.w #$0003
	STA.w $7A38,x
	BRA.b CODE_02870B

CODE_0286CC:
	LDA.w $7AF6,x
	BNE.b CODE_0286F9
	LDA.b $76,x
	CMP.w #$0007
	BCC.b CODE_0286F9
	LDA.w $7C16,x
	CMP.w #$0030
	BCS.b CODE_0286F9
	LDA.w $7C18,x
	CMP.w #$0030
	BCS.b CODE_0286F9
	LDA.w #$0002
	STA.b $18,x
	LDA.w #$000A
	STA.b $76,x
	STZ.w $7AF8,x
	STZ.b $16,x
	BRA.b CODE_02870B

CODE_0286F9:
	LDA.w $7A36,x
	CMP.w #$0800
	BCC.b CODE_02870B
	LDA.w #$0003
	STA.b $18,x
	STZ.b $78,x
	STZ.w $7AF8,x
CODE_02870B:
	LDA.w $7860,x
	BNE.b CODE_028739
	LDA.w #!Define_YI_SoundID82_BossFalling
	JSL.l CODE_0085D2
	LDA.w #$0004
	STA.b $18,x
	LDA.w #$000E
	STA.b $76,x
	STZ.b $16,x
	LDA.w $7182,x
	STA.b $78,x
	LDA.w #$0013
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7AF8,x
	JSL.l CODE_02A982
	RTS

CODE_028739:
	LDA.b $16,x
	CLC
	ADC.w #$0008
	CMP.w #$0101
	BCC.b CODE_028768
	LDA.b $76,x
	INC
	CMP.w #$0009
	BCC.b CODE_028763
	LDY.w $7041,x
	CPY.b #$20
	BCS.b CODE_028760
	LDA.w $7040,x
	CLC
	ADC.w #$6000
	STA.w $7040,x
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_028760:
	LDA.w #$0007
CODE_028763:
	STA.b $76,x
	LDA.w #$0000
CODE_028768:
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	DEC
	BPL.b CODE_028775
CODE_02876F:
	STZ.w $7A36,x
	BRA.b CODE_02877C

CODE_028775:
	CLC
	ADC.w $7A36,x
	STA.w $7A36,x
CODE_02877C:
	RTS

DATA_02877D:
	db $06,$05,$04,$03,$02,$01,$0A,$0B
	db $0A,$02,$03,$04,$05,$06,$07

DATA_02878C:
	db $01,$01,$01,$01,$01,$01,$02,$10
	db $02,$01,$01,$01,$01,$01,$10

CODE_02879B:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0287B7
	LDY.b $78,x
	BNE.b CODE_0287BB
	DEC.w $7A38,x
	BNE.b CODE_0287B9
	LDA.w #$01C0
	STA.w $7A98,x
	STZ.b $18,x
	LDA.w #$0008
	STA.b $78,x
CODE_0287B7:
	BRA.b CODE_028824

CODE_0287B9:
	LDY.b #$0F
CODE_0287BB:
	DEY
	TYA
	STA.b $78,x
	LDA.w DATA_02878C,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_02877D,y
	AND.w #$00FF
	STA.w $7402,x
	CMP.w #$000B
	BNE.b CODE_028824
	LDA.w #$0038
	JSL.l CODE_03A364
	BCC.b CODE_028824
	PHY
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
	PLY
	LDA.w $70E2,x
	CLC
	ADC.w $6000
	SEC
	SBC.w #$0008
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w $6002
	CLC
	ADC.w #$0006
	STA.w $7182,y
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0010
	STA.w $7540,y
	LDA.w #$0120
	STA.w $7A96,y
	LDA.w #$0002
	STA.w $7A98,y
	LDA.w #$0020
	STA.w $7AF6,y
	LDX.b $12
CODE_028824:
	JMP.w CODE_02870B

CODE_028827:
	TYX
	LDA.b $76,x
	ASL
	TAY
	LDA.b $16,x
	CLC
	ADC.w DATA_028A41,y
	CMP.w #$0101
	BCC.b CODE_02885B
	LDA.b $76,x
	INC
	CMP.w #$000D
	BCC.b CODE_02884A
	STZ.b $18,x
	LDA.w #$0080
	STA.w $7AF6,x
	LDA.w #$0007
CODE_02884A:
	STA.b $76,x
	CMP.w #$000B
	BNE.b CODE_028858
	LDA.w #!Define_YI_SoundID83_LungeFish
	JSL.l CODE_0085D2
CODE_028858:
	LDA.w #$0000
CODE_02885B:
	STA.b $16,x
	RTS

DATA_02885E:
	db $07,$06,$05,$0C,$0D,$0E,$0F,$10
	db $11,$10,$0F

DATA_028869:
	db $10,$01,$01,$01,$01,$01,$10,$02
	db $20,$02,$10

CODE_028874:
	TYX
	LDA.w $7AF8,x
	BNE.b CODE_0288A5
	LDY.b $78,x
	INY
	CPY.b #$0C
	BCC.b CODE_028890
	STZ.b $18,x
	STZ.w $7A36,x
	LDA.w #$0008
	STA.b $78,x
	STZ.w $7AF6,x
	BRA.b CODE_0288A5

CODE_028890:
	TYA
	STA.b $78,x
	LDA.w DATA_02885E-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_028869-$01,y
	AND.w #$00FF
	STA.w $7AF8,x
CODE_0288A5:
	JMP.w CODE_02870B

DATA_0288A8:
	db $02,$FF

CODE_0288AA:
	TYX
	LDA.w $7182,x
	SEC
	SBC.b $78,x
	CMP.w #$007E
	BCS.b CODE_0288E7
	XBA
	STA.w !REGISTER_DividendLo
	LDY.b #$7E
	STY.w !REGISTER_Divisor
	LDA.w $7AF8,x
	BNE.b CODE_0288DB
	LDY.w $7402,x
	CPY.b #$14
	BEQ.b CODE_0288CC
	INY
CODE_0288CC:
	TYA
	STA.w $7402,x
	LDA.w DATA_0288A8-$13,y
	AND.w #$00FF
	STA.w $7AF8,x
	BRA.b CODE_0288E1

CODE_0288DB:
	NOP #6
CODE_0288E1:
	LDA.w !REGISTER_QuotientLo
	STA.b $16,x
	RTS

CODE_0288E7:
	LDA.b $76,x
	CMP.w #$000E
	BNE.b CODE_0288F2
	INC.b $76,x
	STZ.b $16,x
CODE_0288F2:
	LDA.b $16,x
	CMP.w #$0100
	BCS.b CODE_0288FE
	ADC.w #$0010
	STA.b $16,x
CODE_0288FE:
	RTS

CODE_0288FF:
	TYX
	LDA.w $7AF8,x
	BEQ.b CODE_028906
	RTS

CODE_028906:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0078
	STA.b $00
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$00C0
	STA.b $02
	JSL.l CODE_0D8ED7
	JSL.l CODE_03A32E
	PLA
	RTL

;---------------------------------------------------------------------------

CODE_028922:
	STZ.w $60B4
CODE_028925:
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $617A
	STZ.w $617C
	STZ.w $61D6
	STZ.w $60DE
	STZ.w $60EA
	STZ.w $60E0
	RTL

;---------------------------------------------------------------------------

CODE_02893E:
	LDY.w $74A2,x
	BPL.b CODE_028944
	RTS

CODE_028944:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	CMP.w #$0006
	BNE.b CODE_028958
	LDA.w #$0008
	STA.b $00
	STZ.b $02
	JSR.w CODE_0289CB
	PLA
	RTL

CODE_028958:
	LDA.b $76,x
	ASL
	TAY
	LDA.w DATA_028A33,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_028A33+$02,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_028A5D>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0042
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7680,x
	CLC
	ADC.w #$0002
	STA.w $6040
	LDA.w $7682,x
	SEC
	SBC.w #$0008
	STA.w $6042
	LDX.b #FXCODE_08E93B>>16
	LDA.w #FXCODE_08E93B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	LDX.b $12
	LDA.w #$0002
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.w #$0065
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w #$0018
	TSB.w !RAM_YI_Global_HDMAEnable
	LDA.l $7045A2
	STA.b $00
	LDA.l $7045A4
	STA.b $02
CODE_0289CB:
	REP.b #$10
	LDY.w $7362,x
	LDX.w #$0003
CODE_0289D3:
	LDA.w $6000,y
	CLC
	ADC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $02
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_0289D3
	LDX.b $12
	LDA.w $7040,x
	CMP.w #$2000
	BCC.b CODE_028A2E
	LDA.l $70459E
	SEC
	SBC.w #$0010
	STA.w $6000
	LDA.l $7045A0
	SEC
	SBC.w #$0004
	STA.w $6002
	LDX.w #$000C
CODE_028A11:
	LDA.w $6000,y
	CLC
	ADC.w $6000
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.w $6002
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_028A11
CODE_028A2E:
	SEP.b #$10
	LDX.b $12
	RTS

DATA_028A33:
	dw DATA_028A5D,DATA_028AE1,DATA_028B65,DATA_028BE9,DATA_028C6D,DATA_028CF1,DATA_028D75

DATA_028A41:
	dw DATA_028DF9,DATA_028E7D,DATA_028DF9,DATA_028DF9,DATA_028F01,DATA_028F85,DATA_028DF9
	dw DATA_028DF9,DATA_029009,DATA_028BE9

UNk_028A55:
	dw $0008,$0010,$0008,$0008

DATA_028A5D:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0002,$0002
	dw $0002,$0002,$0003,$0003,$0003,$0003,$0004,$0004
	dw $0004,$0004,$0006,$0006,$0006,$0006,$0008,$0008
	dw $0008,$0008,$000A,$000A,$000A,$000A,$000B,$000B
	dw $000B,$000B,$000C,$000C,$000C,$000C,$000D,$000D
	dw $000D,$000D,$000D,$000D,$000D,$000D,$000E,$000E
	dw $000E,$000E,$000E,$000E,$000E,$000E,$000E,$000F
	dw $000F,$0008

DATA_028AE1:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$FF02,$FF02
	dw $FF02,$FF02,$FF03,$FF03,$FF03,$FF03,$FE04,$FE04
	dw $FE04,$FE04,$FE06,$FE06,$FE06,$FE06,$FE08,$FE08
	dw $FE08,$FE08,$FE0A,$FE0A,$FE0A,$FE0A,$FE0B,$FE0B
	dw $FE0B,$FE0B,$FF0C,$FF0C,$FF0C,$FF0C,$FF0D,$FF0D
	dw $FF0D,$FF0D,$FF0D,$FF0D,$FF0D,$FF0D,$000E,$000E
	dw $000E,$000E,$000E,$000E,$000E,$000E,$000E,$000F
	dw $000F,$0008

DATA_028B65:
	dw $0000,$0000,$0000,$FF02,$FF02,$FF02,$FD03,$FD03
	dw $FD03,$FD03,$FB04,$FB04,$FB04,$FB04,$F805,$F805
	dw $F805,$F805,$F505,$F505,$F505,$F505,$F206,$F206
	dw $F206,$F206,$F108,$F108,$F108,$F108,$F10B,$F10B
	dw $F10B,$F10B,$F10F,$F10F,$F10F,$F10F,$F210,$F210
	dw $F210,$F210,$F312,$F312,$F312,$F312,$F613,$F613
	dw $F613,$F613,$F912,$F912,$F912,$F912,$FB12,$FB12
	dw $FB12,$FB12,$FE0F,$FE0F,$FE0F,$FE0F,$FE0F,$000F
	dw $000F,$F50B

DATA_028BE9:
	dw $0000,$FF00,$FEFF,$FDFF,$FCFE,$FBFE,$FAFE,$F9FE
	dw $F8FF,$F6FF,$F500,$F300,$F100,$F000,$EFFF,$EEFE
	dw $EDFD,$EBFC,$EAFB,$E9FB,$E8FA,$E7FA,$E5FA,$E4FB
	dw $E3FC,$E2FD,$E1FF,$E100,$E102,$E103,$E105,$E107
	dw $E109,$E10A,$E20C,$E30D,$E30F,$E310,$E411,$E412
	dw $E514,$E615,$E716,$E816,$E917,$EB17,$ED17,$EF16
	dw $F015,$F113,$F211,$F310,$F40F,$F50E,$F60D,$F70C
	dw $F90C,$FA0C,$FB0C,$FC0C,$FD0C,$FE0D,$FF0E,$000F
	dw $000F,$E505

DATA_028C6D:
	dw $0000,$FE01,$FD02,$FC02,$FB03,$FA03,$F703,$F602
	dw $F401,$F300,$F2FF,$F1FE,$EFFC,$EDFB,$EBFA,$E9FA
	dw $E7F8,$E6F5,$E4F2,$E2F1,$E0F0,$DEF0,$DBF0,$D9F2
	dw $D7F4,$D5F7,$D4F9,$D2FB,$D1FD,$D1FF,$D101,$D103
	dw $D105,$D207,$D309,$D40A,$D50C,$D50E,$D610,$D712
	dw $D913,$DA14,$DC14,$DE14,$E015,$E116,$E318,$E519
	dw $E71A,$E91A,$EB1B,$ED1B,$EF1A,$F118,$F316,$F515
	dw $F716,$F917,$FB17,$FD16,$FE14,$FF12,$FF10,$000F
	dw $000F,$D501

DATA_028CF1:
	dw $0000,$FFFF,$FFFD,$FDFB,$FBFA,$F9F9,$F7F8,$F5F8
	dw $F3F8,$F1F9,$EFF9,$ECF9,$E9F9,$E7F7,$E6F5,$E4F3
	dw $E1F2,$DDF3,$D9F2,$D6EF,$D3EE,$CEED,$CAEE,$C6EF
	dw $C3F1,$C0F4,$BEF6,$BBF8,$BAFC,$B900,$B904,$B907
	dw $BA0B,$BA0E,$BB10,$BC12,$BD14,$BF16,$C118,$C318
	dw $C617,$C818,$CA1C,$CC1F,$D020,$D221,$D622,$DB20
	dw $DE1D,$E21A,$E518,$E716,$E914,$EB13,$ED11,$EF10
	dw $F10F,$F40E,$F60D,$F90D,$FB0E,$FD0E,$FF0F,$000F
	dw $000F,$BD04

DATA_028D75:
	dw $0000,$FEFF,$FBFF,$F8FE,$F5FE,$F2FC,$EFFA,$ECF9
	dw $E9F8,$E6F8,$E3F9,$E0F8,$DCF7,$D7F5,$D4F4,$D3F1
	dw $D0EE,$CCED,$C8ED,$C3EE,$C0EA,$BAE9,$B5E9,$B0EA
	dw $ABEC,$A7EF,$A3F3,$9EFA,$9C00,$9A05,$990F,$9A15
	dw $9C1A,$9E1E,$A021,$A323,$A525,$A826,$AC26,$B027
	dw $B526,$BA24,$BD20,$C01C,$C518,$CA16,$D015,$D517
	dw $D91A,$DD1C,$E01C,$E31C,$E61C,$E91C,$EB1B,$ED1A
	dw $F019,$F318,$F617,$F915,$FB13,$FD12,$FF10,$000F
	dw $000F,$9D0F

DATA_028DF9:
	dw $0000,$FD00,$FAFF,$F7FF,$F4FF,$F100,$EEFF,$EBFE
	dw $E8FE,$E5FB,$E1FA,$DDF7,$D7F2,$D1EE,$CCEC,$C7EA
	dw $C0EB,$BAEB,$B5E9,$B0E8,$AAE6,$A4E6,$9EE7,$98EA
	dw $92EC,$8CEE,$88F2,$85F6,$83FA,$82FF,$8205,$830A
	dw $840F,$8613,$8817,$8A19,$8D1C,$901F,$9321,$9623
	dw $9C24,$A125,$A724,$AC22,$B01E,$B81C,$BE1D,$C420
	dw $CA23,$D024,$D623,$DA23,$DE21,$E21F,$E51C,$E919
	dw $EC17,$F016,$F415,$F714,$F912,$FC0F,$FE0C,$000B
	dw $98FE,$8605

DATA_028E7D:
	dw $0000,$FD01,$FA00,$F7FF,$F4FC,$F1FA,$EEF8,$EBF6
	dw $E8F5,$E4F5,$DFF4,$DAF4,$D5F3,$D0F3,$CBF2,$C6F1
	dw $C0ED,$BAEA,$B6E8,$B0E6,$AAE7,$A4E8,$9DE8,$97EB
	dw $91EE,$8CF1,$88F6,$85FA,$83FE,$8201,$8206,$820B
	dw $830F,$8413,$8617,$881B,$8A1E,$8D21,$9123,$9624
	dw $9C24,$A124,$A722,$AB22,$B124,$B824,$BF21,$C51E
	dw $CC1E,$D01F,$D620,$DB21,$DF22,$E322,$E622,$EA22
	dw $ED20,$F01E,$F41B,$F717,$F914,$FC10,$FE0D,$000B
	dw $9CF9,$8606

DATA_028F01:
	dw $0000,$FE00,$FB01,$F902,$F703,$F405,$F106,$EE06
	dw $EA05,$E604,$E203,$DF02,$DB01,$D7FF,$D3FD,$CFFB
	dw $CCFA,$C8F9,$C4F8,$BDF8,$B6F8,$B0F9,$ABFB,$A7FD
	dw $A300,$A003,$9E07,$9D0A,$9C0E,$9B12,$9B16,$9B1A
	dw $9C1E,$9D22,$9E26,$A02A,$A22E,$A432,$A635,$A938
	dw $AD3C,$B240,$B744,$BB47,$C14A,$C74D,$CE4F,$D351
	dw $D752,$DC53,$E053,$E453,$E852,$EC50,$F14D,$F44A
	dw $F747,$F943,$FB3E,$FD37,$FF30,$0027,$001A,$000F
	dw $E037,$9F16

DATA_028F85:
	dw $0000,$00E8,$00CF,$00B8,$00AA,$FF9E,$FE97,$F992
	dw $F390,$ED90,$E991,$E495,$E09A,$DEA2,$DDA9,$DCB1
	dw $DBB8,$D8BE,$D5C2,$D1C6,$CEC9,$CACC,$C6CF,$C2D2
	dw $BED6,$BAD9,$B7DC,$B4E0,$B2E4,$B0E9,$B0ED,$B0F1
	dw $B1F6,$B2FA,$B4FE,$B602,$B805,$BA07,$BD09,$C20B
	dw $C60C,$CB0C,$CF0B,$D30A,$D707,$DA04,$DC01,$DFFE
	dw $E2FB,$E5F7,$E6F4,$E8F1,$EDEE,$F1EF,$F4F2,$F5F5
	dw $F7FA,$F800,$F804,$F908,$FA0B,$FB0D,$FE0F,$000F
	dw $F09F,$B4ED

DATA_029009:
	dw $0000,$FA00,$F400,$EE00,$E800,$E200,$DC00,$D6FF
	dw $D0FF,$CAFC,$C2FC,$BAF9,$AEF5,$A2F2,$98F0,$8EEF
	dw $80F0,$74F0,$6AEE,$60ED,$54EC,$48EC,$3CEC,$30EF
	dw $24F0,$18F2,$10F5,$0AF8,$06FC,$0400,$0404,$0608
	dw $080C,$0C0F,$1012,$1414,$1A16,$2018,$261A,$2C1C
	dw $381C,$421D,$4E1C,$581B,$6018,$7016,$7C17,$8819
	dw $941C,$A01C,$AC1C,$B41C,$BC1A,$C418,$CA16,$D214
	dw $D812,$E011,$E810,$EE10,$F20E,$F80C,$FC09,$0008
	dw $30FF,$0804

;---------------------------------------------------------------------------

YI_NorSpr038_PottedGhostFlame_Init:
;$02908D
	RTL

;---------------------------------------------------------------------------

DATA_02908E:
	dw $0010,$0018

DATA_029092:
	dw $0008,$0016

DATA_029096:
	dw $0000,$0001,$0002,$0003,$0004,$0005,$0004,$0005
	dw $0003,$0002,$0001,$0000

DATA_0290AE:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0040,$0040
	dw $0000,$0000,$0000,$0000

DATA_0290C6:
	dw $0002,$0002,$0002,$0002,$0008,$0008,$0008,$0008
	dw $0006,$0006,$0006,$0006

DATA_0290DE:
	dw $FF80,$0080,$FF00,$0100

YI_NorSpr038_PottedGhostFlame_Main:
;$0290E6
	JSL.l CODE_03AF23
	INC.b $16,x
	LDA.w $7A96,x
	BNE.b CODE_02910A
	LDA.w #$0008
	STA.w $7540,x
	STZ.w $75E0,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$FF80
	STA.w $75E2,x
	LDY.b #$02
	BRA.b CODE_029161

CODE_02910A:
	LDY.w $7D36,x
	BPL.b CODE_029113
	JSL.l CODE_03A858
CODE_029113:
	LDA.w $75E0,x
	BNE.b CODE_029127
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_02915F
	STZ.w $7540,x
	LDA.w $7AF6,x
	BNE.b CODE_02915F
	BRA.b CODE_029133

CODE_029127:
	LDA.b $16,x
	BIT.w #$001F
	BNE.b CODE_02915F
	AND.w #$0040
	BNE.b CODE_02914A
CODE_029133:
	LDY.b #$00
	LDA.w $7C16,x
	BPL.b CODE_02913C
	LDY.b #$02
CODE_02913C:
	LDA.w DATA_0290DE,y
	STA.w $75E0,x
	LDA.w #$0002
	STA.w $7540,x
	BRA.b CODE_02915F

CODE_02914A:
	LDY.b #$00
	LDA.w $7C18,x
	BPL.b CODE_029153
	LDY.b #$02
CODE_029153:
	LDA.w DATA_0290DE,y
	STA.w $75E2,x
	LDA.w #$0002
	STA.w $7542,x
CODE_02915F:
	LDY.b #$00
CODE_029161:
	LDA.w $7A98,x
	BNE.b CODE_029195
	LDA.b $18,x
	INC
	INC
	CMP.w DATA_02908E,y
	BNE.b CODE_02917A
	CPY.b #$00
	BEQ.b CODE_029177
	JML.l CODE_03A31E

CODE_029177:
	LDA.w DATA_029092,y
CODE_02917A:
	STA.b $18,x
	TAY
	LDA.w DATA_029096,y
	STA.w $7402,x
	LDA.w $7042,x
	AND.w #$00BF
	ORA.w DATA_0290AE,y
	STA.w $7042,x
	LDA.w DATA_0290C6,y
	STA.w $7A98,x
CODE_029195:
	RTL

;---------------------------------------------------------------------------

DATA_029196:
	db $40,!REGISTER_CGRAMAddress : dl $7E5C18

DATA_02919B:
	db $E9 : dw $7E528C
	db $E9 : dw $7E528C
	db $00

DATA_0291A2:
	db $02,!REGISTER_WriteToCGRAMPort : dl $7E51FC

DATA_0291A7:
	db $02,!REGISTER_WriteToCGRAMPort : dl $7E5244

DATA_0291AC:
	db $02,!REGISTER_BG3HorizScrollOffset : dl $7E51E4

DATA_0291B1:
	db $0B,$15,$1B,$12,$1A,$1F,$18,$1D,$1F,$03,$05,$08,$03,$0A,$11,$08
	db $0F,$17

YI_NorSpr039_HorizontalRotatingPlank_Init:
;$0291C3
	SEP.b #$20
	LDX.b #$04
CODE_0291C7:
	LDA.w DATA_029196,x
	STA.w HDMA[$01].Parameters,x
	LDA.w DATA_0291A2,x
	STA.w HDMA[$02].Parameters,x
	LDA.w DATA_0291AC,x
	STA.w HDMA[$03].Parameters,x
	LDA.w DATA_0291A7,x
	STA.w HDMA[$06].Parameters,x
	DEX
	BPL.b CODE_0291C7
	LDA.b #$7E528C>>16
	STA.w HDMA[$01].IndirectSourceBank
	STA.w HDMA[$02].IndirectSourceBank
	STA.w HDMA[$03].IndirectSourceBank
	STA.w HDMA[$06].IndirectSourceBank
	LDX.b #$06
CODE_0291F2:
	LDA.w DATA_02919B,x
	STA.l $7E5C18,x
	DEX
	BPL.b CODE_0291F2
	LDX.b #$6F
	LDA.b #$09
CODE_029200:
	STA.l $7E528C,x
	DEX
	BPL.b CODE_029200
	REP.b #$20
	LDX.b #$10
CODE_02920B:
	LDA.w DATA_0291B1,x
	STA.l $70404A,x
	DEX
	DEX
	BPL.b CODE_02920B
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$0B].LowByte
	STA.l $702D82
	LDX.b $12
	LDA.w $70E2,x
	ORA.w #$0008
	STA.w $70E2,x
	DEC.w $7182,x
	LDA.w #$0040
	STA.b $16,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr039_HorizontalRotatingPlank_Main:
;$029235
	JSR.w CODE_029316
	LDY.w $7E3E
	BEQ.b CODE_02924A
	LDA.w $7E46
	STA.b $00
	DEY
	CPY.b $12
	BEQ.b CODE_029298
	JMP.w CODE_029306

CODE_02924A:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	STA.b $00
	CLC
	ADC.w #$007F
	CMP.w #$00FF
	BCC.b CODE_02925F
	JMP.w CODE_029306

CODE_02925F:
	REP.b #$10
	LDA.b $16,x
	ASL
	TAX
	LDA.l DATA_00E954,x
	STA.b $02
	BPL.b CODE_029271
	EOR.w #$FFFF
	INC
CODE_029271:
	ASL
	TAX
	LDA.l $702200,x
	LSR
	SEP.b #$30
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b $00
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	ASL
	LDY.b $03
	BPL.b CODE_029294
	EOR.w #$FFFF
	INC
CODE_029294:
	STA.b $00
	LDX.b $12
CODE_029298:
	STZ.w $7E3E
	LDA.w $60AA
	BMI.b CODE_029306
	LDA.b $00
	CLC
	ADC.w #$0070
	CMP.w #$00E1
	BCS.b CODE_029306
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0020
	CMP.w #$FFF6
	BCC.b CODE_029306
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	TXA
	INC
	STA.w $7E3E
	INC.w $61B4
	LDA.b $00
	STA.w $7E46
	LDA.b $16,x
	STA.w $7E40
	LDA.w $70E2,x
	STA.w $7E42
	LDA.b $16,x
	ASL
	REP.b #$10
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	ASL
	ASL
	SEP.b #$30
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.w $7E46
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	EOR.w #$FFFF
	INC
	STA.w $61BA
	LDX.b $12
CODE_029306:
	JSL.l CODE_03AF23
	LDA.b $16,x
	CLC
CODE_02930D:
	ADC.w #$FFFF
	AND.w #$00FF
	STA.b $16,x
CODE_029315:
	RTL

CODE_029316:
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$00D4
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0030
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #$0078
	SEC
	SBC.w $7680,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $0CC2
	BEQ.b CODE_02934E
	LDX.b #FXCODE_08C470>>16
	LDA.w #FXCODE_08C470
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JMP.w CODE_02937E

CODE_02934E:
	INC.w $0CC2
	LDX.b #FXCODE_08C450>>16
	LDA.w #FXCODE_08C450
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E51E4,$703516 : dw $00A8
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $01A4
	LDA.w #$0004
	TSB.w !RAM_YI_Global_SubScreenLayers
	LDA.w #$005E
	TSB.w !RAM_YI_Global_HDMAEnable
CODE_02937E:
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr04D_UnusedSpriteIndex_Init:
;$029381:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr04D_UnusedSpriteIndex_Main:
;$029382
	RTL

;---------------------------------------------------------------------------

YI_NorSpr04F_MiddleRing_Init:
;$029383
	JSL.l CODE_03D406
	LDA.w #$0020
	STA.w $7A36,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr04F_MiddleRing_Main:
;$02938E
	LDA.w $7362,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $76,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEP.b #$10
	LDX.b #FXCODE_08D3F9>>16
	LDA.w #FXCODE_08D3F9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.b $76,x
	LDA.w $0030
	AND.w #$0003
	BNE.b CODE_0293CF
	LDA.b $78,x
	INC
	CMP.w #$0006
	BCC.b CODE_0293CD
	LDA.w #$0000
CODE_0293CD:
	STA.b $78,x
CODE_0293CF:
	LDY.b $18,x
	BEQ.b CODE_0293D6
	JMP.w CODE_029461

CODE_0293D6:
	JSL.l CODE_03AF23
	LDA.w $7C16,x
	CLC
	ADC.w #$0020
	CMP.w #$0041
	BCS.b CODE_0293F2
	LDA.w $7C18,x
	CLC
	ADC.w #$0038
	CMP.w #$0089
	BCC.b CODE_0293FC
CODE_0293F2:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
CODE_0293FB:
	RTL

CODE_0293FC:
	LDA.w $7C18,x
	CLC
	ADC.w #$0028
	CMP.w #$0046
	BCS.b CODE_0293FB
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_0293FB
	LDA.w !RAM_YI_Level_TutorialMessageFlagsLo
	AND.w #!Define_YI_TutorialMessage_FirstMidpoint
	BNE.b CODE_029434
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	DEC
	BNE.b CODE_029434					; Note: !Define_YI_LevelID_WatchOutBelow
	LDA.w !RAM_YI_Level_TutorialMessageFlagsLo
	ORA.w #!Define_YI_TutorialMessage_FirstMidpoint
	STA.w !RAM_YI_Level_TutorialMessageFlagsLo
	LDA.w #$0027
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
CODE_029434:
	INC.w $0B65
	INC.b $18,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w $0396
	CLC
	ADC.w #$0064
	STA.w $0396
	LDA.w #$00DC
	STA.w $0B7F
	RTL

;---------------------------------------------------------------------------

DATA_029459:
	dw $0013,$0021,$002F,$003D

CODE_029461:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_02946E
	LDA.w $7A98,x
	BEQ.b CODE_02946F
	DEC.w $7A98,x
CODE_02946E:
	RTL

CODE_02946F:
	LDA.w $0396
	BNE.b CODE_02946E
	LDA.w $7A36,x
	CMP.w #$0020
	BNE.b CODE_029485
	PHA
	LDA.w #!Define_YI_SoundID27_CollectSuperStar
	JSL.l CODE_0085D2
	PLA
CODE_029485:
	CLC
	ADC.w #$0002
	CMP.w #$0060
	BCS.b CODE_02949D
	STA.w $7A36,x
	LSR
	LSR
	LSR
	LSR
	ASL
	TAY
	LDA.w DATA_029459-$04,y
	STA.b $78,x
	RTL

CODE_02949D:
	STZ.w $0B65
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	JSL.l CODE_03D3EB
	JSL.l CODE_029507
	LDX.b $12
	JSL.l CODE_03A32E
CODE_0294B4:
	LDA.w #$01A2
CODE_0294B7:
	STA.b $0E
	LDY.b #$5C
CODE_0294BB:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$000E
	BCS.b CODE_0294CD
	CMP.w #$0008
	BNE.b CODE_0294FF
	LDA.w $6162
	BNE.b CODE_0294FF
CODE_0294CD:
	LDA.w $6FA2,y
	AND.w #$6000
	BEQ.b CODE_0294EC
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg
	BEQ.b CODE_0294EC
	CMP.w #!Define_YI_NorSpr0CE_BowserFire
	BEQ.b CODE_0294EC
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BNE.b CODE_0294FF
	LDA.w $7D38,y
	BNE.b CODE_0294FF
CODE_0294EC:
	CPY.w $61B6
	BNE.b CODE_0294F4
	STZ.w $61B6
CODE_0294F4:
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.b $0E
	STA.w $0B91,y
CODE_0294FF:
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_0294BB
	RTL

;---------------------------------------------------------------------------

CODE_029506:
	RTL

;---------------------------------------------------------------------------

CODE_029507:
	INC.w !RAM_YI_Level_MiddleRingsTouchedLo
	REP.b #$10
	LDX.w #$020C
CODE_02950F:
	LDA.w $03B2,x
	STA.l $7E79A6,x
	DEX
	DEX
	BPL.b CODE_02950F
	SEP.b #$10
	LDA.w $7DF6
	STA.l $7E7BB0
	BEQ.b CODE_029534
	TAX
CODE_029526:
	LDY.w $7DF6,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	STA.l $7E7BB0,x
	DEX
	DEX
	BNE.b CODE_029526
CODE_029534:
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

DATA_029537:
	dw FXDATA_540000+$0000,FXDATA_548000+$2000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_548000+$2010
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_548000+$2020
	dw FXDATA_548000+$2060,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_548000+$2050,FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_540000+$0000
	dw FXDATA_540000+$0000,FXDATA_540000+$0000,FXDATA_548000+$2040,FXDATA_548000+$2030

;---------------------------------------------------------------------------

DATA_0295B7:
	dw $FFF0,$0010

YI_NorSpr07E_DentOfSquishyPlatform_Init:
;$0295BB
	JSR.w CODE_0297F3
	LDA.w $0020
	STA.w $7A38,x
	LDA.w $0022
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $0024
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSR.w CODE_02984B
YI_NorSpr07E_DentOfSquishyPlatform_Main:
	JSL.l CODE_03AF23
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $18,x
	BEQ.b CODE_029627
	LDY.b #$00
	LDA.b $76,x
	BPL.b CODE_0295E8
	LDY.b #$02
CODE_0295E8:
	CLC
	ADC.w DATA_0295B7,y
	STA.b $76,x
	BEQ.b CODE_0295F8
	EOR.w DATA_0295B7,y
	BPL.b CODE_0295F8
	JMP.w CODE_0297A3

CODE_0295F8:
	LDY.b #$00
	LDA.w $7A38,x
	JSR.w CODE_029818
	LDY.b #$02
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSR.w CODE_029818
	LDY.b #$04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSR.w CODE_029818
	STZ.w $61BE
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

DATA_029617:
	dw $0008,$0004,$0000,$0000,$0000,$0000

DATA_029623:
	dw $FFD0,$0030

CODE_029627:
	LDA.b $76,x
	BPL.b CODE_02969E
	LDA.w $60C2
	ASL
	TAY
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_029617,y
	BMI.b CODE_0296AF
	CMP.w #$0008
	BMI.b CODE_02964B
	LDA.w $7182,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0008
CODE_02964B:
	XBA
	LSR
	LSR
	LSR
	EOR.w #$FFFF
	STA.b $76,x
	LDA.w $60AA
	CLC
	ADC.w #$0030
	CMP.w #$0010
	BMI.b CODE_029663
	LDA.w #$0010
CODE_029663:
	STA.w $60AA
	LDA.w #$0002
	STA.w $61DC
	LDA.w $61F0
	CMP.w #$0002
	BCS.b CODE_029681
	LDA.w #$0006
	STA.w $61F0
	LDA.w #!Define_YI_SoundID9B_YoshiHeadStuck
	JSL.l CODE_0085D2
CODE_029681:
	LDY.b #$00
	LDA.w $60B4
	BEQ.b CODE_02969B
	BPL.b CODE_02968C
	INY
	INY
CODE_02968C:
	CLC
	ADC.w DATA_029623,y
	STA.w $60B4
	EOR.w DATA_029623,y
	BMI.b CODE_02969B
	STZ.w $60B4
CODE_02969B:
	JMP.w CODE_029744

CODE_02969E:
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $6112
	CLC
	ADC.w #$0020
	SEC
	SBC.w $7182,x
	BPL.b CODE_0296B4
CODE_0296AF:
	INC.b $18,x
	JMP.w CODE_0297A3

CODE_0296B4:
	CMP.w #$000A
	BMI.b CODE_0296CA
	LDA.w $7182,x
	SEC
	SBC.w #$0016
	SEC
	SBC.w $6112
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$000A
CODE_0296CA:
	STA.b $00
	LDA.w $60C0
	BEQ.b CODE_0296E8
	LDA.w $60AA
	BPL.b CODE_0296E8
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.b $00
	ASL
	ASL
	ASL
	ASL
	ADC.w $60AA
	BRA.b CODE_029739

CODE_0296E8:
	INC.w $61B4
	LDY.b $00
	CPY.b #$02
	BCS.b CODE_0296FB
	INC.b $00
	INC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0000
	BRA.b CODE_029739

CODE_0296FB:
	LDA.w #$0000
	CPY.b #$05
	BCC.b CODE_029705
	LDA.w #$0000
CODE_029705:
	STA.w $60FA
	LDA.w $60F8
	BNE.b CODE_029714
	LDA.w #!Define_YI_SoundID9B_YoshiHeadStuck
	JSL.l CODE_0085D2
CODE_029714:
	LDA.w $60A8
	BPL.b CODE_02971D
	EOR.w #$FFFF
	INC
CODE_02971D:
	LSR
	EOR.w #$FFFF
	INC
	STA.b $02
	LDA.w #$0008
	SEC
	SBC.b $00
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $02
	CMP.w #$FF00
	BPL.b CODE_029739
	LDA.w #$FF00
CODE_029739:
	STA.w $60AA
	LDA.b $00
	XBA
	LSR
	LSR
	LSR
	STA.b $76,x
CODE_029744:
	LDA.w $70E2,x
	AND.w #$FFF0
	STA.b $00
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0008
	STA.w $70E2,x
	AND.w #$FFF0
	SEC
	SBC.b $00
	BEQ.b CODE_0297A3
	BMI.b CODE_029775
	LDA.w $7A38,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7A38,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	PLA
	LDY.b #$00
	BRA.b CODE_029788

CODE_029775:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7A38,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	PLA
	LDY.b #$04
CODE_029788:
	PHY
	JSR.w CODE_029818
	JSR.w CODE_0297F3
	PLY
	BNE.b CODE_02979A
	LDA.w $0024
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_0297A0

CODE_02979A:
	LDA.w $0020
	STA.w $7A38,x
CODE_0297A0:
	JSR.w CODE_02984B
CODE_0297A3:
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0030
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $70E2,x
	AND.w #$000F
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.b $78,x
	CPY.b #$02
	BNE.b CODE_0297C5
	CMP.w #$000D
	BCS.b CODE_0297D0
	BRA.b CODE_0297CE

CODE_0297C5:
	CPY.b #$40
	BNE.b CODE_0297D0
	CMP.w #$0004
	BCC.b CODE_0297D0
CODE_0297CE:
	INC.b $18,x
CODE_0297D0:
	LDA.w DATA_029537,y
	LDY.b $77,x
	BPL.b CODE_0297DB
	CLC
	ADC.w #$0800
CODE_0297DB:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$0000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088CDB>>16
	LDA.w #FXCODE_088CDB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CFB
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

CODE_0297F3:
	LDA.w #$0002
	STA.w $008F
	LDA.w $70E2,x
	STA.w $0091
	LDA.w $7182,x
	STA.w $0093
	LDA.w #$6200
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_029812:
	dw $0000,$0010,$0020

CODE_029818:
	CMP.w #$6106
	BEQ.b CODE_02983C
	STA.w $0095
	LDA.w #$0001
	STA.w $008F
	LDA.w $6EBC
	CLC
	ADC.w DATA_029812,y
	STA.w $0091
	LDA.w $7182,x
	STA.w $0093
	JSL.l CODE_109295
	LDX.b $12
CODE_02983C:
	RTS

;---------------------------------------------------------------------------

DATA_02983D:
	dw $0001,$0003,$0002,$0001,$0003,$0002,$0000

CODE_02984B:
	LDA.w $7A38,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_02983D,y
	ASL
	ASL
	STA.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_02983D,y
	ORA.b $78,x
	ASL
	ASL
	STA.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_02983D,y
	ORA.b $78,x
	ASL
	STA.b $78,x
	RTS

;---------------------------------------------------------------------------

DATA_02987C:
	dw $FF80,$0080

YI_NorSpr059_StationarySuperStar_Init:
;$029880
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerForm10_SuperBabyMario
	BEQ.b CODE_02989E
CODE_029888:
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	RTL

YI_NorSpr088_SuperStar_Init:
	LDY.w $7400,x
	LDA.w DATA_02987C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02989E:
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_550000+$60F0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$60F0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088619>>16
	LDA.w #FXCODE_088619
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	LDY.w $74A2,x
	BPL.b CODE_0298F3
	LDA.w #$0005
	STA.w $74A2,x
CODE_0298E8:
	LDA.w #!Define_YI_SoundID30_AppearingStars
	JSL.l CODE_0085D2
	JSL.l CODE_04849E
CODE_0298F3:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr059_StationarySuperStar_Main:
YI_NorSpr088_SuperStar_Main:
;$0298F4
	LDA.b $18,x
	ASL
	TXY
	TAX
	JMP.w (DATA_0298FC,x)

DATA_0298FC:
	dw CODE_029900
	dw CODE_02999F

CODE_029900:
	TYX
	JSL.l CODE_03AA2E
	JSL.l CODE_03AF23
	LDA.w $7542,x
	BNE.b CODE_02991D
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerForm10_SuperBabyMario
	BEQ.b CODE_02991D
	JSL.l CODE_0298E8
	JMP.w CODE_029888

CODE_02991D:
	JSL.l CODE_029BCA
	LDY.w $7D36,x
	BPL.b CODE_02998C
	LDA.w $7680,x
	CLC
	ADC.w #$0020
	CMP.w #$0120
	BCS.b CODE_02998C
	LDA.w $7682,x
	CLC
	ADC.w #$0020
	CMP.w #$0100
	BCS.b CODE_02998C
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BEQ.b CODE_029951
	LDA.w #!Define_YI_SoundID27_CollectSuperStar
	JSL.l CODE_0085D2
	JSL.l CODE_03A31E
	JMP.w CODE_029A50

CODE_029951:
	LDA.w $61B2
	BPL.b CODE_02998C
	LDA.w $6150
	BEQ.b CODE_02996D
	LDA.w $6162
	BEQ.b CODE_02996D
	LDA.w !EXRAM_YI_Level_Player_AmmoTypeInMouthLo|!EXRAMBankMirror
	CMP.w #$0001
	BEQ.b CODE_02998C
	CMP.w #$0004
	BEQ.b CODE_02998C
CODE_02996D:
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w #$0020
	STA.w $7A96,x
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	RTL

CODE_02998C:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02999A
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_02999A:
	RTL

DATA_02999B:
	dw $0100,$FF00

CODE_02999F:
	TYX
	LDA.w $7A96,x
	BEQ.b CODE_0299C6
	DEC.w $7A96,x
	CMP.w #$0010
	BNE.b CODE_0299C5
	LDA.w #!Define_YI_SoundID05_Powerup
	JSL.l CODE_0085D2
	LDA.w $7CD6
	STA.b $00
	LDA.w $7CD8
	STA.b $02
	LDA.w #$01E7
	JSL.l CODE_03B577
CODE_0299C5:
	RTL

CODE_0299C6:
	LDA.w #$2000
	STA.w $61B2
	LDA.w #$FFFF
	STA.w $7E48
	JSL.l CODE_04F74A
	LDA.w #!Define_YI_PlayerForm10_SuperBabyMario
	STA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	LDA.w #$0010
	TSB.w $7E08
	LDA.w #$0116
	STA.w $60BE
	LDA.w #$0008
	STA.w $60C0
	LDA.w #$FC00
	STA.w $60AA
	LDA.w $60C4
	EOR.w #$0002
	STA.w $60C4
	STA.w $7400
	TAY
	LDA.w DATA_02999B,y
	STA.w $60B4
	STZ.w $60D2
	STZ.w $61DC
	REP.b #$10
	JSL.l CODE_04EF27
	SEP.b #$10
	JSL.l CODE_03A31E
	PHX
	LDA.w #$0029
	LDY.b #$00
	TYX
	STX.b $12
	JSL.l CODE_03A377
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDA.w $7182
	SEC
	SBC.w #$0008
	STA.w $7182
	JSL.l CODE_03BEB9
	PLX
	LDA.w #FXDATA_520000+$B600
	STA.w $6114
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #$0002
	STA.w !RAM_YI_Global_PlayMusicLo
	STZ.w $0205
CODE_029A50:
	LDA.w #$0200
	STA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0AB_FullEggSpawner_Init:
;$029A57
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0AB_FullEggSpawner_Main:
;$029A58
	JSL.l CODE_03B69D
	LDA.w $7542,x
	BNE.b CODE_029A6E
	LDA.w #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_0085D2
	LDA.w #$0040
	STA.w $7542,x
CODE_029A6E:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CMP.w #$0010
	BMI.b CODE_029AC5
	LDA.w #$0025
	JSL.l CODE_03A364
	BCS.b CODE_029A9B
	LDA.w #$0025
	TXY
	JSL.l CODE_03A377
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $7182,x
	JSL.l CODE_03BEB9
	BRA.b CODE_029AC2

CODE_029A9B:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $7182,y
	PHX
	TYX
	STX.b $12
	JSL.l CODE_03BEB9
	PLX
	STX.b $12
	LDA.w $7DF6
	CMP.w #$000C
	BCC.b CODE_029AC6
	JSL.l CODE_03A31E
CODE_029AC2:
	STZ.w !RAM_YI_Level_ItemBeingUsed
CODE_029AC5:
	RTL

CODE_029AC6:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0020
	STA.w $7182,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	JML.l CODE_0280AC

;---------------------------------------------------------------------------

DATA_029AE3:
	dw $000F,$0003,$000F,$0405,$000F,$0A07,$010F,$0E0B
	dw $020F,$0203,$020F,$0605,$020F,$0C07,$040F,$0805
	dw $050F,$0E01,$060F,$0E06,$0B0F,$080A,$0C0F,$0E00
	dw $100F,$0009,$100F,$040B,$100F,$0A0D,$110F,$0E06
	dw $120F,$0209,$120F,$060B,$120F,$0C0D,$170F,$0802
	dw $190F,$0809,$1D0F,$0E05
	db $FF

;---------------------------------------------------------------------------

YI_NorSpr0D5_BackgroundForHookbillFight_Init:
;$029B3C
	RTL

;---------------------------------------------------------------------------

DATA_029B3D:
	dw $7FFF,$7FFF,$7FFF,$7FFF

YI_NorSpr0D5_BackgroundForHookbillFight_Main:
;$029B45
	LDA.b $18,x
	BNE.b CODE_029B85
	LDA.w !RAM_YI_Global_Layer1XPosLo
	LSR
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #DATA_029AE3
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $6092
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_029AE3>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7180,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_089183>>16
	LDA.w #FXCODE_089183
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_029B85:
	JSL.l CODE_03AF23
	LDA.w $0B59
	LSR
	BEQ.b CODE_029BC9
	LDA.w #DATA_029B3D
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_029B3D>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $76,x
	CLC
	ADC.w #$0008
	CMP.w #$0100
	BCC.b CODE_029BAD
	JSL.l CODE_03A31E
	LDA.w #$0100
CODE_029BAD:
	STA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$00FC
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_029BC9:
	RTL

CODE_029BCA:
	LDA.w $7A96,x
	BEQ.b CODE_029BD0
	RTL

CODE_029BD0:
	LDA.w #$0005
	STA.w $7A96,x
	LDA.w #$0808
CODE_029BD9:
	PHA
	AND.w #$00FF
	STA.b $00
	JSL.l CODE_008408
	LDA.b $0F
	AND.w #$FF00
	ORA.b $00
	STA.w !REGISTER_Multiplicand
	PLA
	AND.w #$FF00
	STA.b $02
	LDA.b $11
	LSR
	LDA.w !REGISTER_ProductOrRemainderHi
	AND.w #$00FF
	BCC.b CODE_029C01
	EOR.w #$FFFF
CODE_029C01:
	ADC.w $70E2,x
	STA.b $00
	JSL.l CODE_008408
	LDA.b $10
	AND.w #$00FF
	ORA.b $02
	STA.w !REGISTER_Multiplicand
	NOP #2
	LDA.b $11
	LSR
	LDA.w !REGISTER_ProductOrRemainderHi
	AND.w #$00FF
	BCC.b CODE_029C24
	EOR.w #$FFFF
CODE_029C24:
	ADC.w $7182,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1DD
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0D8_ChompWarningSign_Init:
;$029C47
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_548000+$00C1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$00C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0D8_ChompWarningSign_Main:
;$029C87
	JML.l CODE_03AA52

;---------------------------------------------------------------------------

YI_NorSpr0DE_FallingRockPlatform_Init:
;$029C8B
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0ACD1E>>16
	LDA.w #FXCODE_0ACD1E
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	BNE.b CODE_029CAE
	STZ.w $61C0
	JML.l CODE_03A31E

CODE_029CAE:
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $70E2,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	INC
	STA.w $7182,x
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STA.b $76,x
	LSR
	STA.w $7BB6,x
	LDA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	STA.b $78,x
	LSR
	INC
	STA.w $7BB8,x
	LDA.w #$0008
	STA.w $7B56,x
	STA.w $7B58,x
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	ASL
	ASL
	ASL
	XBA
	ORA.w $7040,x
	STA.w $7040,x
	LDA.w #$0070
	STA.w $7A96,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0DE_FallingRockPlatform_Main:
;$029CEB
	JSR.w CODE_029DF6
	LDA.b $18,x
	BNE.b CODE_029D54
	LDA.b $76,x
	SEC
	SBC.w #$0010
	LSR
	EOR.w #$FFFF
	SEC
	ADC.w $70E2,x
	CLC
	ADC.w $7A36,x
	STA.w $0091
	LDA.b $78,x
	SEC
	SBC.w #$0010
	LSR
	EOR.w #$FFFF
	SEC
	ADC.w $7182,x
	CLC
	ADC.w $7A38,x
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$0000
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	BCC.b CODE_029D51
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BCC.b CODE_029D4B
	INC.b $18,x
	STZ.w $61C0
CODE_029D4B:
	STA.w $7A38,x
	LDA.w #$0000
CODE_029D51:
	STA.w $7A36,x
CODE_029D54:
	JSL.l CODE_03AF23
	LDA.b $18,x
	BEQ.b CODE_029DC6
	LDA.w $7E2A
	BEQ.b CODE_029D6D
	TXA
	LSR
	LSR
	TAY
	LDA.w $0C98,y
	AND.w #$00FF
	BNE.b CODE_029D9B
CODE_029D6D:
	LDA.b $76,x
	LSR
	ADC.w #$0018
	ADC.w $7680,x
	BMI.b CODE_029D97
	SEC
	SBC.b $76,x
	BCC.b CODE_029D9B
	CMP.w #$0120
	BCS.b CODE_029D97
	LDA.b $78,x
	LSR
	ADC.w #$0018
	ADC.w $7682,x
	BMI.b CODE_029D97
	SEC
	SBC.b $78,x
	BCC.b CODE_029D9B
	CMP.w #$0100
	BCC.b CODE_029D9B
CODE_029D97:
	JML.l CODE_03A31E

CODE_029D9B:
	LDA.w $7A96,x
	DEC
	CMP.w #$0050
	BCS.b CODE_029DC6
	CMP.w #$0040
	BNE.b CODE_029DAF
	LDA.w #$0004
	STA.w $7542,x
CODE_029DAF:
	LDA.b $14
	LSR
	BCC.b CODE_029DC6
	LDA.w $70E2,x
	EOR.w #$0001
	PHA
	SEC
	SBC.w $70E2,x
	STA.w $72C0,x
	PLA
	STA.w $70E2,x
CODE_029DC6:
	JML.l CODE_03D05D

;---------------------------------------------------------------------------

DATA_029DCA:
	dw !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,$7901,$7902,$7909,$790A,$790B,$7903,$7904
	dw $7905,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $7906,$7907,$7908,$0000,$0000,$0000

CODE_029DF6:
	LDA.w $7362,x
	BMI.b CODE_029E34
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7682,x
	DEC
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7180,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	XBA
	ORA.w $7042,x
	XBA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDX.b #FXCODE_099126>>16
	LDA.w #FXCODE_099126
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_029E34:
	RTS

;---------------------------------------------------------------------------

DATA_029E35:
	dw $0000,$0000,$0000,$0008

DATA_029E3D:
	dw $FFD8,$FFF0,$FFC0,$FFF0

DATA_029E45:
	dw $0030,$0030,$0030,$0060

DATA_029E4D:
	dw $0060,$0030,$0090,$0030

YI_NorSpr137_3x6FallingStone_Init:
YI_NorSpr138_3x3FallingStone_Init:
YI_NorSpr139_3x9FallingStone_Init:
YI_NorSpr13A_6x3FallingStone_Init:
;$029E55
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr137_3x6FallingStone
	ASL
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_029E35,y
	STA.w $70E2,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_029E3D,y
	STA.w $7182,x
	LDA.w DATA_029E45,y
	STA.b $76,x
	LSR
	STA.w $7BB6,x
	LDA.w DATA_029E4D,y
	STA.b $78,x
	LSR
	INC
	STA.w $7BB8,x
	LDA.w #$0008
	STA.w $7B56,x
	STA.w $7B58,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr137_3x6FallingStone_Main:
YI_NorSpr138_3x3FallingStone_Main:
YI_NorSpr139_3x9FallingStone_Main:
YI_NorSpr13A_6x3FallingStone_Main:
;$029E8F
	JSR.w CODE_029DF6
	LDA.b $18,x
	BEQ.b CODE_029E99
	JMP.w CODE_029F33

CODE_029E99:
	JSL.l CODE_03AF23
	LDA.w $7CD7,x
	AND.w #$000F
	STA.b $00
	LDA.b $78,x
	LSR
	STA.b $02
	LDA.w $7CD8,x
	SEC
	SBC.b $02
	CMP.w #$0800
	BCS.b CODE_029EC4
	AND.w #$0700
	LSR
	LSR
	LSR
	LSR
	ORA.b $00
	TAY
	LDA.w $6CA9,y
	BPL.b CODE_029EC8
CODE_029EC4:
	JML.l CODE_03A32E

CODE_029EC8:
	LDA.b $76,x
	LSR
	PHA
	EOR.w #$FFFF
	SEC
	ADC.w $7CD6,x
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.b $02
	CLC
	ADC.w $7CD8,x
	STA.b $02
	PLA
	LSR
	LSR
	LSR
	STA.b $04
CODE_029EE7:
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0003
	BNE.b CODE_029F13
	LDA.b $00
	CLC
	ADC.w #$0010
	STA.b $00
	DEC.b $04
	BNE.b CODE_029EE7
	LDX.b $12
	JMP.w CODE_029FD0

CODE_029F13:
	LDA.w #!Define_YI_SoundID48_LargeBlockLands
	JSL.l CODE_0085D2
	LDX.b $12
	INC.b $18,x
	LDA.w $7182,x
	AND.w #$FFF8
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $61C6
	JMP.w CODE_029FD0

CODE_029F33:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	LSR
	STA.w !REGISTER_Multiplicand
	LDA.w $7A38,x
	LSR
	LSR
	LSR
	LSR
	STA.w !REGISTER_Multiplier
	LDA.b $76,x
	LSR
	EOR.w #$FFFF
	SEC
	ADC.w $7CD6,x
	CLC
	ADC.w $7A36,x
	STA.w $0091
	LDA.b $78,x
	LSR
	EOR.w #$FFFF
	SEC
	ADC.w $7CD8,x
	CLC
	ADC.w $7A38,x
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w $7A36,x
	LSR
	ADC.w !REGISTER_ProductOrRemainderLo
	CLC
	ADC.w $7362,x
	REP.b #$10
	TAY
	LDA.w $6004,y
	SEP.b #$10
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BPL.b CODE_029F96
	AND.w #$7FFF
	CMP.w #$0020
	BCC.b CODE_029F90
	SBC.w #$0010
CODE_029F90:
	CLC
	ADC.w #$0014
	BRA.b CODE_029F9E

CODE_029F96:
	CMP.w #$0020
	BCC.b CODE_029F9E
	SBC.w #$0010
CODE_029F9E:
	TAY
	LDA.w DATA_029DCA,y
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	BCC.b CODE_029FCD
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BCC.b CODE_029FC7
	JML.l CODE_03A32E

CODE_029FC7:
	STA.w $7A38,x
	LDA.w #$0000
CODE_029FCD:
	STA.w $7A36,x
CODE_029FD0:
	JSL.l CODE_03D05D
	LDY.w $7D36,x
	DEY
	BMI.b CODE_029FE3
	BEQ.b CODE_029FE3
	TYX
	JSL.l CODE_039F91
	LDX.b $12
CODE_029FE3:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr027_Key_Init:
;$029FE4
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_02A006
	JSL.l CODE_03D3F8
	BEQ.b CODE_029FF6
	JML.l CODE_03A32E

CODE_029FF6:
	JSL.l CODE_02A007
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_02A006:
	RTL

CODE_02A007:
	LDA.w $70E2,x
	AND.w #$FFF0
	ORA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	AND.w #$FFF0
	ORA.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$B800
	BNE.b CODE_02A049
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $6000
	STA.w $70E2,x
	LDA.w $6002
	STA.w $7182,x
	PLA
	PLY
CODE_02A049:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr027_Key_Main:
;$02A04A
	LDA.w $7D38,x
	BEQ.b CODE_02A059
	LDA.b $18,x
	CMP.w #$0002
	BCC.b CODE_02A059
	STZ.w $7D38,x
CODE_02A059:
	JSL.l CODE_03B9DD
	LDA.b $78,x
	BEQ.b CODE_02A064
	JMP.w CODE_02A099

CODE_02A064:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02A070
	JSL.l CODE_03A58B
CODE_02A070:
	LDY.w $7D36,x
	BPL.b CODE_02A08C
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_02A08C
	JSL.l CODE_03C640
	JSL.l CODE_03BEB9
	DEC.w !RAM_YI_Global_SoundQueueSizeLo
	LDA.w #!Define_YI_SoundID1E_PickUpKey
	JML.l CODE_0085D2

CODE_02A08C:
	LDA.w $7182,x
	CMP.w #$0800
	BMI.b CODE_02A098
	JML.l CODE_03A31E

CODE_02A098:
	RTL

CODE_02A099:
	JSL.l CODE_03BB1D
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0CA_BigBossDoor_Init:
;$02A09E
	JSL.l CODE_03AEBE
	JSL.l CODE_02A153
	LDA.w $70E2,x
	ORA.w #$0008
	STA.w $70E2,x
	LDA.w #$001C
	STA.w $7BB6,x
	LDA.w #$0039
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr04E_LockedDoor_Init:
;$02A0BC
	JSL.l CODE_03D3F8
	BEQ.b CODE_02A0D4
	LDA.w #!Define_YI_NorSpr001_ClosedDoor
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	BRA.b YI_NorSpr001_ClosedDoor_Init

YI_NorSpr131_LockedDoor_Init:
CODE_02A0D4:
	JSL.l CODE_03D3F8
	BNE.b CODE_02A0DF
	INC.w $7A36,x
	BRA.b CODE_02A134

CODE_02A0DF:
	LDA.w #!Define_YI_NorSpr093_Door
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	BRA.b CODE_02A134

YI_NorSpr001_ClosedDoor_Init:
;$02A0E7
	LDA.w #$0003
	STA.b $18,x
	LDA.w !RAM_YI_Global_CurrentGameMode
	CMP.w #!Define_YI_GameMode0D
	BNE.b CODE_02A125
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w $70E2,x
	BNE.b CODE_02A125
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	ADC.w #$000F
	CMP.w $7182,x
	BNE.b CODE_02A125
	LDA.w #$7005
	STA.w $7040,x
	LDA.w #$0002
	STA.b $18,x
	INC.w $7402,x
	LDA.w #$0020
	STA.b $76,x
	LDA.w #$0004
	STA.b $78,x
	LDA.w #$0040
	STA.w $7A96,x
YI_NorSpr012_BossDoor_Init:
YI_NorSpr093_Door_Init:
CODE_02A125:
	LDA.w $7722,x
	BPL.b CODE_02A13E
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,x
CODE_02A134:
	JSL.l CODE_03AE60
	JSL.l CODE_02A153
	BRA.b CODE_02A142

CODE_02A13E:
	JSL.l CODE_02A1FD
CODE_02A142:
	JSL.l CODE_02A007
	LDA.w #$000C
	STA.w $7BB6,x
	LDA.w #$0019
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

CODE_02A153:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr04E_LockedDoor
	BEQ.b CODE_02A190
	CMP.w #!Define_YI_NorSpr131_LockedDoor
	BEQ.b CODE_02A190
	CMP.w #!Define_YI_NorSpr093_Door
	BEQ.b CODE_02A185
	CMP.w #!Define_YI_NorSpr0CA_BigBossDoor
	BEQ.b CODE_02A1C2
	CMP.w #!Define_YI_NorSpr012_BossDoor
	BNE.b CODE_02A17A
	LDA.w #FXDATA_550000+$60C0
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_550000+$60C0)>>16
	BRA.b CODE_02A199

CODE_02A17A:
	LDA.w #FXDATA_550000+$0021
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_550000>>16
	BRA.b CODE_02A199

CODE_02A185:
	LDA.w #FXDATA_540000+$00F1
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_540000+$00F1)>>16
	BRA.b CODE_02A199

CODE_02A190:
	LDA.w #FXDATA_550000+$6000
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_550000+$6000)>>16
CODE_02A199:
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w $6000
	LDA.l DATA_03A9EE,x
	STA.w $6002
	LDX.b #FXCODE_08D317>>16
	LDA.w #FXCODE_08D317
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

CODE_02A1C2:
	LDA.w #FXDATA_550000+$60C0
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_550000+$60C0)>>16
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w $6000
	LDA.l DATA_03A9EE,x
	STA.w $6002
	LDX.b #FXCODE_08D317>>16
	LDA.w #FXCODE_08D317
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #FXCODE_09F897>>16
	LDA.w #FXCODE_09F897
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

CODE_02A1FD:
	REP.b #$10
	LDY.w $7362,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0CA_BigBossDoor
	BEQ.b CODE_02A247
CODE_02A20A:
	LDA.w $7722,x
	TAX
	LDA.w $6004,y
	AND.w #$FE00
	ORA.l DATA_03AA0E,x
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E,x
	STA.w $600C,y
	LDA.w $6014,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$04,x
	STA.w $6014,y
	LDA.w $601C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$04,x
	STA.w $601C,y
	SEP.b #$10
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

CODE_02A247:
	LDA.w $7722,x
	TAX
	LDA.w $6004,y
	AND.w #$FE00
	ORA.l DATA_03AA0E,x
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$02,x
	STA.w $600C,y
	LDA.w $6014,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$04,x
	STA.w $6014,y
	LDA.w $601C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$06,x
	STA.w $601C,y
	LDA.w $6024,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$08,x
	STA.w $6024,y
	LDA.w $602C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0A,x
	STA.w $602C,y
	LDA.w $6034,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0C,x
	STA.w $6034,y
	LDA.w $603C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0E,x
	STA.w $603C,y
	LDA.w $6044,y
	AND.w #$FE00
	ORA.l DATA_03AA0E,x
	STA.w $6044,y
	LDA.w $604C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$02,x
	STA.w $604C,y
	LDA.w $6054,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$04,x
	STA.w $6054,y
	LDA.w $605C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$06,x
	STA.w $605C,y
	LDA.w $6064,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$08,x
	STA.w $6064,y
	LDA.w $606C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0A,x
	STA.w $606C,y
	LDA.w $6074,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0C,x
	STA.w $6074,y
	LDA.w $607C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0E,x
	STA.w $607C,y
	SEP.b #$10
CODE_02A31D:
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

DATA_02A320:
	dw $0001,$FFFF,$0008,$FFF8

DATA_02A328:
	dw $0040,$0020,$0040,$0000

YI_NorSpr001_ClosedDoor_Main:
YI_NorSpr012_BossDoor_Main:
YI_NorSpr04E_LockedDoor_Main:
YI_NorSpr093_Door_Main:
YI_NorSpr0CA_BigBossDoor_Main:
YI_NorSpr131_LockedDoor_Main:
;$02A330
	JSL.l CODE_02A1FD
	LDY.b $18,x
	BEQ.b CODE_02A33B
	JMP.w CODE_02A3F0

CODE_02A33B:
	JSL.l CODE_03AF23
	LDA.w $60C0
	BNE.b CODE_02A34C
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BEQ.b CODE_02A34D
CODE_02A34C:
	RTL

CODE_02A34D:
	LDA.w $7C16,x
	CLC
	ADC.w $7BB6,x
	CMP.w $7BB8,x
	BCS.b CODE_02A34C
	LDA.w $0038
	AND.w #$0008
	BEQ.b CODE_02A34C
	LDA.w $61B2
	BPL.b CODE_02A34C
	LDA.w $6150
	BNE.b CODE_02A34C
	LDA.w $7A36,x
	BEQ.b CODE_02A3A7
	LDY.w $7DF6
	BEQ.b CODE_02A34C
	LDA.w $7DF6,y
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr027_Key
	BEQ.b CODE_02A388
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JML.l CODE_0085D2

CODE_02A388:
	TYX
	JSL.l CODE_03BF87
	JSL.l CODE_03A31E
	LDA.w #!Define_YI_SoundID64_UnlockDoor
	JSL.l CODE_0085D2
	LDX.b $12
	JSL.l CODE_03D3EB
	JSL.l CODE_02A4F4
	LDA.w #$0040
	BRA.b CODE_02A3AA

CODE_02A3A7:
	LDA.w #$0002
CODE_02A3AA:
	STA.w $7A96,x
	INC.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0CA_BigBossDoor
	BEQ.b CODE_02A3BD
	LDA.w #$7005
	STA.w $7040,x
CODE_02A3BD:
	LDA.w #!Define_YI_PlayerState0A_EnteringDoor
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $0C8C
	STZ.w $6104
	INC.w $0C8E
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr04E_LockedDoor
	BNE.b CODE_02A3D7
	DEC.w $6104
CODE_02A3D7:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w $60F8
	LDA.w #$0006
	STA.w $61D2
	LDA.w #$0008
	STA.w $6116
CODE_02A3EF:
	RTL

CODE_02A3F0:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_02A3EF
	CPY.b #$03
	BEQ.b CODE_02A3EF
	LDA.w $7A96,x
	BEQ.b CODE_02A40F
	DEC.w $7A96,x
	BNE.b CODE_02A40E
	CPY.b #$02
	BEQ.b CODE_02A40E
	LDA.w #!Define_YI_SoundID40_OpenDoor
	JSL.l CODE_0085D2
CODE_02A40E:
	RTL

CODE_02A40F:
	JSL.l CODE_02A153
	LDY.b $78,x
	CPY.b #$02
	BCC.b CODE_02A43B
	LDA.b $18,x
	LSR
	BNE.b CODE_02A43B
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w $7C16,x
	BEQ.b CODE_02A436
	ASL
	LDA.w #$FFFF
	BCS.b CODE_02A42F
	LDA.w #$0001
CODE_02A42F:
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_02A436:
	LDA.w $7402,x
	BEQ.b CODE_02A43E
CODE_02A43B:
	LDA.w #$0007
CODE_02A43E:
	PHY
	LDY.w $0C8C
	BEQ.b CODE_02A447
	EOR.w #$0007
CODE_02A447:
	STA.w $74A2,x
	PLY
	LDA.b $76,x
	CLC
	ADC.w DATA_02A320,y
	STA.b $76,x
	SEC
	SBC.w DATA_02A328,y
	EOR.w DATA_02A320,y
	BMI.b CODE_02A4B4
	TYA
	LSR
	LSR
	BCS.b CODE_02A47B
	LDA.b $76,x
	SEC
	SBC.w #$003F
	EOR.w #$FFFF
	SEC
	ADC.w #$0040
	STA.b $76,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	BRA.b CODE_02A480

CODE_02A47B:
	LDA.w DATA_02A328,y
	STA.b $76,x
CODE_02A480:
	INY
	INY
	CPY.b #$08
	BCC.b CODE_02A4F0
	LDA.w #!Define_YI_SoundID41_CloseDoor
	JSL.l CODE_0085D2
	LDA.b $18,x
	LSR
	BNE.b CODE_02A4E7
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BEQ.b CODE_02A4A2
	STZ.w $0C8E
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w $0C8C
	BRA.b CODE_02A4E7

CODE_02A4A2:
	LDA.w $6104
	BEQ.b CODE_02A4B5
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.w $0C8C
	LDA.w #$0001
	STA.b $18,x
	STZ.b $78,x
CODE_02A4B4:
	RTL

CODE_02A4B5:
	LDA.w !EXRAM_YI_Player_XPosHi|!EXRAMBankMirror
	AND.w #$000F
	ASL
	ASL
	STA.w $0000
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	AND.w #$0F00
	LSR
	LSR
	ORA.w $0000
CODE_02A4CB:
	STA.w $038E
	LDA.w #!Define_YI_SoundID22_EndFuzzyDistortedMusic
	STA.w !RAM_YI_Global_PlaySoundHighPriorityLo
	LDA.w #$0001
	STA.w $038C
	LDA.w #!Define_YI_GameMode0B
	STA.w !RAM_YI_Global_CurrentGameMode
	JSL.l CODE_01B2B7
	LDX.b $12
	RTL

CODE_02A4E7:
	INC.b $18,x
	LDA.w #$2005
	STA.w $7040,x
	RTL

CODE_02A4F0:
	TYA
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

CODE_02A4F4:
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	STA.w $7E4E,y
	LDA.w #$0004
	STA.w $7782,y
	RTL

;---------------------------------------------------------------------------

YI_NorSpr084_TeleportSprite_Init:
;$02A517
	RTL

;---------------------------------------------------------------------------

YI_NorSpr084_TeleportSprite_Main:
;$02A518
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BPL.b CODE_02A52B
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_02A4B5
	LDA.w $61B2
	BMI.b CODE_02A4B5
CODE_02A52B:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr00D_GoalRing_Init:
;$02A52C
	JSL.l CODE_03AEBE
	STZ.w $7400,x
	LDA.w #FXDATA_540000+$4010
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$4010)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0099
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088619>>16
	LDA.w #FXCODE_088619
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #FXDATA_550000+$60E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$60E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088619>>16
	LDA.w #FXCODE_088619
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #FXDATA_540000+$3040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$3040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0099
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088619>>16
	LDA.w #FXCODE_088619
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	LDA.w #$6000
	STA.w $7A38,x
	RTL

;---------------------------------------------------------------------------

DATA_02A5ED:
	dw $0001,$0002,$0004,$0008,$0010,$0020,$0040,$0080
	dw $0100,$0200

DATA_02A601:
	dw $0000,$0200,$0280,$02A0,$02A8,$02AA

DATA_02A60D:
	db !Define_YI_SoundID51_ThunderLakituAttacking1,!Define_YI_SoundID52_ThunderLakituAttacking2
	db !Define_YI_SoundID53_ThunderLakituAttacking3,!Define_YI_SoundID54_ThunderLakituAttacking4
	db !Define_YI_SoundID55_ThunderLakituAttacking5,!Define_YI_SoundID56_ThunderLakituAttacking6
	db !Define_YI_SoundID55_ThunderLakituAttacking5,!Define_YI_SoundID54_ThunderLakituAttacking4
	db !Define_YI_SoundID53_ThunderLakituAttacking3,!Define_YI_SoundID52_ThunderLakituAttacking2

YI_NorSpr00D_GoalRing_Main:
;$02A617
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_02A663
	LDA.w $0B57
	CMP.w #$0003
	BNE.b CODE_02A63F
	INC.w $0B57
	INC.w $0B57
	REP.b #$10
	LDA.w #$0020
	JSL.l CODE_00B753
	SEP.b #$10
	LDA.w #$D800
	STA.w $0CF9
	LDX.b $12
	BRA.b CODE_02A663

CODE_02A63F:
	LDY.b $79,x
	TYA
	EOR.w #$FFFF
	SEC
	ADC.w #$000A
	STA.w $0B91,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	BEQ.b CODE_02A65D
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7AF8,x
CODE_02A65D:
	LDA.w $7AF8,x
	STA.w $0B93,x
CODE_02A663:
	LDA.w $0B91,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $0B93,x
	STA.w $600C
	LDA.w $7362,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7680,x
	CLC
	ADC.w #$0018
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7682,x
	SEC
	SBC.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$3000
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w !RAM_YI_Level_FlowersCollectedLo
	ASL
	TAY
	LDA.w DATA_02A601,y
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w $7722,x
	TAX
	LDA.l DATA_03AA0E,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_08E1BE>>16
	LDA.w #FXCODE_08E1BE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_02A6BE
	JMP.w CODE_02A761

CODE_02A6BE:
	LDA.w $6002
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $6004
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #FXDATA_540000>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	CLC
	ADC.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $600A
	BMI.b CODE_02A6FF
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_02A71C

CODE_02A6FF:
	LDA.l DATA_03A9EE,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088619>>16
	LDA.w #FXCODE_088619
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_02A71C:
	LDX.b $12
	LDA.w $6008
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #FXDATA_540000>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $6006
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088619>>16
	LDA.w #FXCODE_088619
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_02A761:
	JSL.l CODE_03AF23
	LDA.w $0B57
	BNE.b CODE_02A786
	LDA.w $7680,x
	CLC
	ADC.w #$0060
	CMP.w #$01C0
	BCS.b CODE_02A782
	LDA.w $7682,x
	CLC
	ADC.w #$0060
	CMP.w #$01D0
	BCC.b CODE_02A786
CODE_02A782:
	JML.l CODE_03A31E

CODE_02A786:
	LDA.b $18,x
	ASL
	TXY
	TAX
	JSR.w (DATA_02A8E0,x)
	LDY.w $7A39,x
	TYA
	STA.b $02
	LDA.b $78,x
	STA.b $00
	CLC
	ADC.b $02
	CMP.w #$0A00
	BCC.b CODE_02A7A3
	SBC.w #$0A00
CODE_02A7A3:
	STA.b $78,x
	ORA.w #$00FF
	SEC
	SBC.b $00
	AND.w #$FF00
	BEQ.b CODE_02A7BE
	LDA.w $0B57
	BEQ.b CODE_02A7BE
	LDY.b $79,x
	LDA.w DATA_02A60D,y
	JSL.l CODE_0085D2
CODE_02A7BE:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_02A7C4
CODE_02A7C3:
	RTL

CODE_02A7C4:
	CPY.b #$0B
	BCS.b CODE_02A7C3
	LDA.w $7A38,x
	BEQ.b CODE_02A83F
	SEC
	SBC.w #$0046
	BCC.b CODE_02A7ED
	CMP.w #$0300
	BCS.b CODE_02A7F0
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	CPY.b #!Define_YI_LevelID_PoochyAintStupid
	BNE.b CODE_02A7F0
	REP.b #$10
	LDY.w $6000
	SEP.b #$10
	BEQ.b CODE_02A7ED
	LDA.w #$0300
	BRA.b CODE_02A7F0

CODE_02A7ED:
	LDA.w #$0000
CODE_02A7F0:
	STA.w $7A38,x
	CMP.w #$0000
	BNE.b CODE_02A7C3
	LDY.w $7A36,x
	LDA.w #$0040
	STA.w $7541,y
	LDA.w $79D5,y
	STA.w $721F,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D7|!EXRAMBankMirror,y
	STA.w $7221,y
	LDA.w #$0060
	STA.w $7A98,x
	LDY.b #!Define_YI_SoundID2E_ClankSound7
	LDA.w $6000
	BEQ.b CODE_02A838
	DEC.w !RAM_YI_Level_DoBonusChallengeFlagLo
	LDA.w #!Define_YI_PlayerState24
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0002
	STA.w $617E
	LDA.w #$0030
	STA.w $6180
	LDA.w #$000F
	JSL.l CODE_03A34C
	LDY.b #!Define_YI_SoundID08_1up
CODE_02A838:
	TYA
	JSL.l CODE_0085D2
	BRA.b CODE_02A7C3

CODE_02A83F:
	LDA.w $7A98,x
	BEQ.b CODE_02A845
	RTL

CODE_02A845:
	LDA.w !RAM_YI_Level_DoBonusChallengeFlagLo
	BMI.b CODE_02A853
	PHY
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	PLY
CODE_02A853:
	LDA.w #$0004
	STA.w $7A98,x
	TYA
	CLC
	ADC.b $79,x
	AND.w #$00FF
	CMP.w #$000A
	BCC.b CODE_02A868
	SBC.w #$000A
CODE_02A868:
	ASL
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	ORA.w DATA_02A5ED,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TYA
	ASL
	REP.b #$10
	TAY
	LDA.w $600E,y
	CLC
	ADC.w $6094
	STA.w $0000
	LDA.w $6010,y
	CLC
	ADC.w $609C
	STA.w $0002
	SEP.b #$10
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CPY.b #$0B
	BCC.b CODE_02A8C0
	LDA.w $6000
	BEQ.b CODE_02A8BD
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $0000
	STA.w $70A2,y
	LDA.w $0002
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	RTL

CODE_02A8BD:
	INC.w !RAM_YI_Level_DoBonusChallengeFlagLo
CODE_02A8C0:
	LDA.w #!Define_YI_AmbSpr1E4
	JSL.l CODE_008B21
	LDA.w $0000
	STA.w $70A2,y
	LDA.w $0002
	STA.w $7142,y
	LDA.w #$000C
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	RTL

DATA_02A8E0:
	dw CODE_02A8E8
	dw CODE_02AA86
	dw CODE_02AB65
	dw CODE_02ABAA

CODE_02A8E8:
	TYX
	LDA.w $70E2,x
	SEC
	SBC.w #$0080
	CMP.w !RAM_YI_Global_Layer1XPosLo
	BMI.b CODE_02A8F8
	LDA.w #$0EE0
CODE_02A8F8:
	CLC
	ADC.w #$0020
	STA.w $7E1A
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	SEC
	SBC.w #$0018
	PHA
	EOR.b $76,x
	ASL
	PLA
	STA.b $76,x
	BCC.b CODE_02A915
	BPL.b CODE_02A916
CODE_02A915:
	RTS

CODE_02A916:
	LDA.w $61B2
	BPL.b CODE_02A915
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$0070
	CMP.w #$0050
	BCS.b CODE_02A915
	LDA.w #$0005
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w !RAM_YI_Global_CurrentGameMode
	INC.w $0B57
	INC.b $18,x
	LDA.w #!Define_YI_PlayerState14_ActivateGoal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0006
	STA.w $60DE
	STZ.w $60EC
	STZ.w $60C4
	STZ.w $60EA
	STZ.w $60E0
	STZ.w $60D4
	STZ.w $60D8
	STZ.w $0C1C
	STZ.w $0C20
	LDA.w #$0001
	STA.w $0C1E
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	LDA.w $70E2,x
	SEC
	SBC.w #$0010
	STA.w $7E1A
	JSL.l CODE_02A98E
CODE_02A981:
	RTS

CODE_02A982:
	LDA.w #!Define_YI_MusicID_StopMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	INC.w $0B59
	INC.w $0B7B
CODE_02A98E:
	JSL.l CODE_04F74D
	LDX.w $7DF6
CODE_02A995:
	DEX
	DEX
	BMI.b CODE_02A9AE
	STX.b $0E
	LDY.w $7DF8,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	SEC
	SBC.w #!Define_YI_NorSpr022_FlashingEgg
	ASL
	TAX
	JSR.w (DATA_02A9B7,x)
	LDX.b $0E
	BRA.b CODE_02A995

CODE_02A9AE:
	LDX.b $12
	LDA.w #$FFFF
	JML.l CODE_0294B7

DATA_02A9B7:
	dw CODE_02A9CB
	dw CODE_02A981
	dw CODE_02A981
	dw CODE_02A981
	dw CODE_02AA36
	dw CODE_02AA20
	dw CODE_02AA2A
	dw CODE_02A981
	dw CODE_02AA36
	dw CODE_02AA36

CODE_02A9CB:
	TYX
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	LDA.w $7042,x
	STA.w $0004
	PHX
	JSL.l CODE_04F88E
	PLX
	LDA.w #$0006
CODE_02A9E7:
	PHA
	JSL.l CODE_03BF87
	LDA.w #$0115
	TXY
	JSL.l CODE_03A377
	PLA
	EOR.w $7042,x
	STA.w $7042,x
	LDA.w #$0030
	STA.w $7A96,x
	STA.w $7A98,x
	STA.w $7AF6,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	RTS

CODE_02AA20:
	TYX
CODE_02AA21:
	JSL.l CODE_02A4F4
	LDA.w #$0000
	BRA.b CODE_02A9E7

CODE_02AA2A:
	TYX
	JSL.l CODE_03BF87
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_02AA36:
	TYX
	LDA.w $7182,x
	STA.b $00
	LDA.w #$0003
	STA.b $02
CODE_02AA41:
	LDA.w #$0115
	JSL.l CODE_03A364
	BCC.b CODE_02AA21
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.b $00
	SEC
	SBC.w #$0010
	STA.w $7182,y
	STA.b $00
	LDA.w #$0030
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0008
	STA.w $7542,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	DEC.b $02
	BNE.b CODE_02AA41
	JMP.w CODE_02AA21

CODE_02AA86:
	TYX
	LDA.w $60DE
	BNE.b CODE_02AB09
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $617A
	STZ.w $617C
	INC.b $18,x
	LDA.w #$0054
	STA.w $7A96,x
	LDY.b #$04
	LDA.w #$008C
	JSL.l CODE_03A34E
	TYA
	INC
	STA.w $7A36,x
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	STA.w $7182,y
	LDA.w #$0002
	STA.w $7400,y
	LDA.w $60A8
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w $60AA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	TAX
	JSR.w CODE_02AC4F
	LDA.w $70E2,x
	CLC
	ADC.w #$0144
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60B4
	STZ.w $60C0
	STZ.w $6162
	STZ.w $6168
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.l DATA_028000+$01,x
	AND.w #$00FF
	STA.w !RAM_YI_Level_CurrentYoshiColorLo
	LDX.b $12
	BRA.b CODE_02AB56

CODE_02AB09:
	CMP.w #$0002
	BNE.b CODE_02AB56
	LDA.w #!Define_YI_SoundID4A_YoshiGrunt
	JSL.l CODE_0085D2
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDY.b #$00
	STY.w $7862
	LDA.w $61B2
	AND.w #$0FFF
	STA.w $61B2
	STZ.b $76
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w $7182,x
	ASL
	ADC.w #$0200
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w #$FD40
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$0010
	STA.w $7542
	LDA.w #$0010
	STA.w $7AF8
	STZ.b $16
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w #$FFFF
	STA.w $7E48
CODE_02AB56:
	LDA.w $0C23
	CMP.w $7E1A
	BCS.b CODE_02AB64
	ADC.w #$0002
	STA.w $0C23
CODE_02AB64:
	RTS

CODE_02AB65:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02AB78
	INC.b $18,x
	LDA.w #$0180
	STA.w $7A96,x
	STZ.w $617A
	BRA.b CODE_02AB91

CODE_02AB78:
	CMP.w #$0050
	BNE.b CODE_02AB86
	LDA.w #$000E
	JSL.l CODE_03A34C
	BRA.b CODE_02AB91

CODE_02AB86:
	CMP.w #$0040
	BCS.b CODE_02AB91
	LDA.w #$0200
	STA.w $617A
CODE_02AB91:
	LDA.w $7AF6,x
	BNE.b CODE_02ABA7
	LDA.w #$0008
	STA.w $7AF6,x
	LDA.w #$0808
	LDX.b #$00
	JSL.l CODE_029BD9
	LDX.b $12
CODE_02ABA7:
	JMP.w CODE_02AB56

CODE_02ABAA:
	TYX
	LDA.w $61B2
	BMI.b CODE_02ABF8
	LDA.b $14
	AND.w #$0003
	BNE.b CODE_02ABEA
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0006
	STA.w $70A2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0018
	STA.w $7142,y
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FFF0
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0003
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
CODE_02ABEA:
	LDA.w #$004C
	STA.w $60BE
	LDA.w #$0180
	STA.w $7A96,x
	BRA.b CODE_02AB91

CODE_02ABF8:
	LDA.w $7A96,x
	LSR
	BNE.b CODE_02AC4E
	BCC.b CODE_02AC07
	LDA.w #$0006
	STA.l $00004D
CODE_02AC07:
	STZ.w $60C4
	LDA.w #$0100
	STA.w $617A
	STZ.w $0C1E
	LDA.w #$0030
	STA.w $7E20
	LDA.w $70E2,x
	CLC
	ADC.w #$0060
	STA.w $7E1A
	LDA.w $60B4
	CMP.w #$0180
	BMI.b CODE_02AC31
	LDA.w #$0180
	STA.w $60B4
CODE_02AC31:
	LDA.w $60B0
	CMP.w #$00F0
	BMI.b CODE_02AC4E
	INC.w $0B57
	INC.w $0B57
	LDY.w $7A36,x
	DEY
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
	JSL.l CODE_03A31E
CODE_02AC4E:
	RTS

CODE_02AC4F:
	REP.b #$10
	PHB
	PEA.w $702000>>8
	PLB
	PLB
	LDA.l DATA_04FB23,x
	TAX
	LDY.w #$001C
CODE_02AC5F:
	LDA.l DATA_5FA000,x
	STA.w $7021E2,y
	STA.w $702F4E,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_02AC5F
	PLB
	SEP.b #$10
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr08C_YoshiAtGoal_Init:
;$02AC75
	JSL.l CODE_03AD74
	BCS.b CODE_02AC9D
CODE_02AC7B:
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

DATA_02AC82:
	dw FXDATA_550000+$6080,FXDATA_550000+$60A0

YI_NorSpr08C_YoshiAtGoal_Main:
;$02AC86
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	STA.w $6116
	JSL.l CODE_04FB41
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	JSL.l CODE_03A590
CODE_02AC9D:
	LDY.b #$00
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02ACBD
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$02
	LDA.w $7A96,x
	BNE.b CODE_02ACBD
	LDA.w #$FD80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0018
	STA.w $7A96,x
CODE_02ACBD:
	TYA
	STA.b $18,x
	LDA.w DATA_02AC82,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$6080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

YI_NorSpr004_HitSuperBabyMarioBlock_Init:
;$02ACFC
	LDA.w $7182,x
	STA.b $18,x
	LDA.w #$FD80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_02AD08:
	db $88,$00

YI_NorSpr004_HitSuperBabyMarioBlock_Main:
;$02AD0A
	JSL.l CODE_03AF23
	JSL.l CODE_03D127
	LDA.b $76,x
	BNE.b CODE_02AD57
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_02AD57
	INC.b $76,x
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_SoftMaxStarTimerThreshold
	BCS.b CODE_02AD48
	LDA.b $10
	AND.w #$0007
	BNE.b CODE_02AD48
	LDA.w #$01A2
	JSL.l CODE_03A34C
	BCC.b CODE_02AD8B
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	RTL

CODE_02AD48:
	LDA.w #$0004
	JSL.l CODE_03A4E9
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	RTL

CODE_02AD57:
	LDA.w $7182,x
	SEC
	SBC.b $18,x
	BMI.b CODE_02AD8B
	INC.b $76,x
	LDA.w $70E2,x
	STA.w $0091
	LDA.b $18,x
	STA.w $0093
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0001
	STA.w $008F
	LDA.w #$8A00
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	JML.l CODE_03A31E

CODE_02AD8B:
	RTL

;---------------------------------------------------------------------------

DATA_02AD8C:
	dw $FFF7,$0008

YI_NorSpr1A5_RunAwayMonkey_Init:
;$02AD90
	LDA.w #$0002
	JSR.w CODE_02AE77
	LDA.b $10
	AND.w #$0002
	TAY
	JSR.w CODE_02ADC1
	BCS.b CODE_02ADAB
	TYA
	EOR.w #$0002
	TAY
	JSR.w CODE_02ADC1
	BCC.b CODE_02ADBC
CODE_02ADAB:
	TYA
	STA.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_02AD8C,y
	STA.w $70E2,x
	JSR.w CODE_02B348
CODE_02ADBC:
	RTL

;---------------------------------------------------------------------------

DATA_02ADBD:
	dw $FFFF,$0010

CODE_02ADC1:
	LDA.w $7182,x
CODE_02ADC4:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $70E2,x
	CLC
	ADC.w DATA_02ADBD,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	PHY
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	PLY
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0002
	BNE.b CODE_02ADF5
	LDA.w !REGISTER_SuperFX_R6_MultiplierHi
	AND.w #$00FF
	SEC
	SBC.w #$0099
	LSR
	BEQ.b CODE_02ADF5
	CLC
	RTS

CODE_02ADF5:
	SEC
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1A6_MonkeyWithWatermelon_Init:
;$02ADF7
	LDA.w #$0004
	JSR.w CODE_02AE77
CODE_02ADFD:
	JSR.w CODE_02AEA0
	BCS.b CODE_02AE06
	JML.l CODE_03A31E

CODE_02AE06:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1A9_HangingMonkeySpittingSeeds_Init:
;$02AE07
	LDA.w #$000A
	JSR.w CODE_02AE77
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w $7042,x
	ORA.w #$0030
	STA.w $7042,x
	LDA.w $7400,x
	EOR.w #$0002
	JSL.l CODE_02AE3F
	BRA.b CODE_02ADFD

YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_Init:
	LDA.w #$0006
	JSR.w CODE_02AE77
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.b $10
	AND.w #$0002
CODE_02AE3F:
	TAY
	JSR.w CODE_02ADC1
	BCS.b CODE_02AE61
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$3D3B
	BEQ.b CODE_02AE61
	CMP.w #$3D3C
	BEQ.b CODE_02AE61
	CMP.w #$3D49
	BEQ.b CODE_02AE61
	CMP.w #$3D4A
	BEQ.b CODE_02AE61
	TYA
	EOR.w #$0002
	TAY
CODE_02AE61:
	TYA
	STA.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_02AD8C,y
	STA.w $70E2,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1A8_TheifMonkey_Init:
;$02AE70
	LDA.w #$0008
	JSR.w CODE_02AE77
	RTL

CODE_02AE77:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_02AE9C
	PLA
CODE_02AE7D:
	LDA.w $7042,x
	ORA.w #$0008
	STA.w $7042,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #$0010
	STA.w $7A38,x
	LDA.w #$000C
	JSR.w CODE_02B6B2
	RTL

CODE_02AE9C:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

;---------------------------------------------------------------------------

CODE_02AEA0:
	LDA.w #$0007
	JSL.l CODE_03A364
CODE_02AEA7:
	BCC.b CODE_02AF10
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $74A2,x
	AND.w #$0080
	ORA.w #$0005
	STA.w $74A2,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w $7042,x
	STA.w $7042,y
	TYA
	INC
	STA.b $78,x
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr007_Watermelon
	BEQ.b CODE_02AEFA
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0400
	STA.w $75E2,y
	STA.w $7A38,y
	BRA.b CODE_02AF0F

CODE_02AEFA:
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7402,y
	TYX
	LDY.b #$64
	JSL.l CODE_03C878
	LDX.b $12
	REP.b #$20
CODE_02AF0F:
	SEC
CODE_02AF10:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1A5_RunAwayMonkey_Main:
YI_NorSpr1A6_MonkeyWithWatermelon_Main:
YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_Main:
YI_NorSpr1A8_TheifMonkey_Main:
YI_NorSpr1A9_HangingMonkeySpittingSeeds_Main:
;$02AF11
	SEP.b #$20
	LDA.w $6FA2,x
	AND.b #$10
	STA.w $77C0,x
	REP.b #$20
	LDA.w $7D96,x
	BNE.b CODE_02AF3B
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_02AF4A
	CMP.w #$000E
	BEQ.b CODE_02AF3B
	LDA.w $7042,x
	AND.w #$00CF
	ORA.w #$0020
	STA.w $7042,x
CODE_02AF3B:
	JSR.w CODE_02B657
	LDA.w $6FA2,x
	AND.w #$FFE0
	ORA.w #$0018
	STA.w $6FA2,x
CODE_02AF4A:
	LDA.w #$C200
	LDY.w $7D38,x
	BEQ.b CODE_02AF68
	LDY.w $7862,x
	DEY
	BMI.b CODE_02AF5F
	STZ.w $7D38,x
	JSL.l CODE_02AE7D
CODE_02AF5F:
	LDA.w #$0011
	STA.w $7402,x
	LDA.w #$C600
CODE_02AF68:
	LDY.w $7A98,x
	BEQ.b CODE_02AF70
	LDA.w #$C000
CODE_02AF70:
	STA.w $6FA0,x
	JSL.l CODE_03AF23
	INC.b $16,x
	JSR.w CODE_02B276
	LDY.b $76,x
	BEQ.b CODE_02AFC8
	LDA.w #$FFC0
	LDY.w $7862,x
	DEY
	BPL.b CODE_02AF94
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_02AFB4
	LDA.w #$0100
CODE_02AF94:
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$FFC0
	BCC.b CODE_02AFA5
	LDA.w #$0004
	STA.w $7542,x
CODE_02AFA5:
	LDA.w #$0000
	STA.w $7402,x
	TXY
	LDX.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	JSR.w (DATA_02B024-$02,x)
	BRA.b CODE_02AFEA

CODE_02AFB4:
	STZ.b $76,x
	STZ.w $75E0,x
	STZ.w $7540,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
CODE_02AFC8:
	TXY
	LDX.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	JSR.w (DATA_02B018-$02,x)
	LDY.w $7862,x
	DEY
	BMI.b CODE_02AFEA
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_02AFEA
	INC.b $76,x
	LDA.w #$0100
	CMP.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_02AFEA
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_02AFEA:
	JSR.w CODE_02B8C7
	LDY.w $77C0,x
	BEQ.b CODE_02B00B
	LDA.w $7860,x
	AND.w #$0001
	STA.w $7A36,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_02B017
	LDA.w $7042,x
	AND.w #$00CF
	ORA.w #$0020
	BRA.b CODE_02B014

CODE_02B00B:
	STZ.w $7A36,x
	LDA.w $7042,x
	ORA.w #$0030
CODE_02B014:
	STA.w $7042,x
CODE_02B017:
	RTL

DATA_02B018:
	dw CODE_02B16B
	dw CODE_02B476
	dw CODE_02B996
	dw CODE_02BA81
	dw CODE_02BC66
	dw CODE_02B05A

DATA_02B024:
	dw CODE_02BE02
	dw CODE_02BE80
	dw CODE_02BE87
	dw CODE_02BE89
	dw CODE_02BE87
	dw CODE_02BEC9

;---------------------------------------------------------------------------

DATA_02B030:
	db $02,$01,$02,$01,$00,$16,$15,$14,$15,$14,$13,$14,$13,$12,$11

DATA_02B03F:
	db $08,$08,$08,$08,$20,$06,$10,$04,$04,$40,$04,$04,$04,$04,$04
	db $FE,$FF,$FE,$FF,$FD,$FF,$03,$00,$02,$00,$02,$00

CODE_02B05A:
	TYX
	LDY.w $7A38,x
	BEQ.b CODE_02B098
	JSR.w CODE_02B2BF
	LDA.w $7AF8,x
	BNE.b CODE_02B082
	DEC.w $7A38,x
	BEQ.b CODE_02B082
	LDY.w $7A38,x
	LDA.w DATA_02B030-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_02B03F-$01,y
	AND.w #$00FF
	STA.w $7AF8,x
CODE_02B082:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02B093
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_02B097
	JSL.l CODE_03A590
CODE_02B093:
	JSL.l CODE_02AE7D
CODE_02B097:
	RTS

CODE_02B098:
	JSR.w CODE_02B6E4
	LDY.b $18,x
	BNE.b CODE_02B0D7
	JSR.w CODE_02B342
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_02B0AD
	JMP.w CODE_02B426

CODE_02B0AD:
	LDA.w $7C16,x
	CLC
	ADC.w #$0020
	CMP.w #$0041
	BCC.b CODE_02B0C8
	LDA.w $77C2,x
	EOR.w #$0002
	AND.w #$00FF
	STA.w $7400,x
	JMP.w CODE_02B3D9

CODE_02B0C8:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.w #$FB00
	JMP.w CODE_02B423

CODE_02B0D7:
	DEY
	BNE.b CODE_02B10F
	JSR.w CODE_02B316
	BCC.b CODE_02B0E4
	INC.b $18,x
	STZ.b $16,x
	RTS

CODE_02B0E4:
	LDA.w $7AF8,x
	BNE.b CODE_02B10A
	LDA.w #$0004
	STA.w $7AF8,x
	LDA.w $7402,x
	INC
	CMP.w #$001A
	BCC.b CODE_02B0FB
	LDA.w #$0017
CODE_02B0FB:
	STA.w $7402,x
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_02B03F-$1F,y
	STA.w $7182,x
CODE_02B10A:
	RTS

DATA_02B10B:
	dw $0008,$0004

CODE_02B10F:
	JSR.w CODE_02B259
	BCS.b CODE_02B156
	LDA.b $00
	CMP.w #$0020
	BCS.b CODE_02B156
	LDA.w #$0010
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_02B10B,y
	BNE.b CODE_02B131
	LDA.b $10
	LSR
	BCC.b CODE_02B138
CODE_02B131:
	TYA
	EOR.w #$0002
	STA.w $7400,x
CODE_02B138:
	STZ.b $18,x
	STZ.w $7A38,x
CODE_02B13D:
	LDA.w $6FA2,x
	AND.w #$FFE0
	ORA.w #$0018
	STA.w $6FA2,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	RTS

CODE_02B156:
	JSR.w CODE_02B316
	LDA.b $16,x
	AND.w #$0010
	BEQ.b CODE_02B163
	LDA.w #$0001
CODE_02B163:
	CLC
	ADC.w #$001A
	STA.w $7402,x
	RTS

;---------------------------------------------------------------------------

CODE_02B16B:
	TYX
	LDY.b $18,x
	BEQ.b CODE_02B173
	JMP.w CODE_02B213

CODE_02B173:
	JSR.w CODE_02B342
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_02B189
	LDA.w $7A38,x
	BNE.b CODE_02B186
	JMP.w CODE_02B426

CODE_02B186:
	JMP.w CODE_02B42F

CODE_02B189:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_02B1DC
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_02B1DC
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr007_Watermelon
	BNE.b CODE_02B1DC
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BNE.b CODE_02B1DC
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w $7542,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	TYA
	INC
	STA.b $78,x
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7A38,x
	STZ.w $7AF8,x
CODE_02B1DC:
	JSR.w CODE_02B259
	BCS.b CODE_02B203
	JSR.w CODE_02B6E4
	LDA.b $00
	CMP.w #$0020
	BCS.b CODE_02B1F1
	STZ.w $7A38,x
	JMP.w CODE_02B0C8

CODE_02B1F1:
	LDA.w $77C2,x
	EOR.w #$0002
CODE_02B1F7:
	AND.w #$00FF
	STA.w $7400,x
	STZ.w $7A38,x
	JMP.w CODE_02B3D9

CODE_02B203:
	LDA.w $77C2,x
	JSR.w CODE_02B1F7
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7A38,x
	RTS

CODE_02B213:
	DEY
	BNE.b CODE_02B239
	JSR.w CODE_02B316
	LDA.w #$0003
	BCS.b CODE_02B22E
	LDA.w $60C0
	BEQ.b CODE_02B22B
	LDA.w $7C18,x
	CMP.w #$FFC0
	BPL.b CODE_02B233
CODE_02B22B:
	LDA.w #$0002
CODE_02B22E:
	STA.b $18,x
	STZ.b $16,x
	RTS

CODE_02B233:
	JSR.w CODE_02B6E4
	JMP.w CODE_02B0E4

CODE_02B239:
	DEY
	BNE.b CODE_02B256
	JSR.w CODE_02B259
	BCS.b CODE_02B253
	LDA.w $60C0
	BNE.b CODE_02B24E
	LDA.w $7C18,x
	CMP.w #$FFC0
	BMI.b CODE_02B253
CODE_02B24E:
	DEC.b $18,x
	JMP.w CODE_02B35F

CODE_02B253:
	JMP.w CODE_02B156

CODE_02B256:
	JMP.w CODE_02B10F

CODE_02B259:
	LDA.w $7C16,x
	BPL.b CODE_02B262
	EOR.w #$FFFF
	INC
CODE_02B262:
	STA.b $00
	LDA.w $7C18,x
	BPL.b CODE_02B26D
	EOR.w #$FFFF
	INC
CODE_02B26D:
	STA.b $02
	CLC
	ADC.b $00
	CMP.w #$0080
CODE_02B275:
	RTS

;---------------------------------------------------------------------------

CODE_02B276:
	LDY.w $7D36,x
	BPL.b CODE_02B275
	LDA.w $7A98,x
	BNE.b CODE_02B275
	JSL.l CODE_03D35D
	CPY.b #$06
	BNE.b CODE_02B275
	LDA.w $60AA
	BMI.b CODE_02B275
	LDA.w #$0020
	STA.w $7A98,x
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$8001
	STA.w $60D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_02B2AA
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_02B2AA:
	JSL.l CODE_03A0E5
CODE_02B2AE:
	JSR.w CODE_02B13D
	JSR.w CODE_02B657
	JSL.l CODE_02AE7D
	STZ.b $76,x
	RTS

CODE_02B2BB:
	JSR.w CODE_02B2AE
	RTL

;---------------------------------------------------------------------------

CODE_02B2BF:
	LDY.w $7D36,x
	BPL.b CODE_02B2D1
	LDA.w $7A98,x
	BNE.b CODE_02B2D1
	JSL.l CODE_03D35D
	CPY.b #$04
	BCC.b CODE_02B2D2
CODE_02B2D1:
	RTS

CODE_02B2D2:
	LDA.w #$FFF0
	CPY.b #$00
	BEQ.b CODE_02B2DC
	LDA.w #$0010
CODE_02B2DC:
	SEC
	SBC.w $7C16,x
	PHA
	CLC
	ADC.w $60A8
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	BMI.b CODE_02B2EF
	EOR.w #$FFFF
	INC
CODE_02B2EF:
	CLC
	ADC.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $60A8
	CMP.w #$8000
	ROR
	STA.w $60A8
	JSR.w CODE_02B2AA
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $7042,x
	ORA.w #$0030
	STA.w $7042,x
	PLA
	RTS

;---------------------------------------------------------------------------

CODE_02B314:
	TAX
	RTS

;---------------------------------------------------------------------------

CODE_02B316:
	JSR.w CODE_02B37F
	BCS.b CODE_02B325
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLA
	JMP.w CODE_02B138

CODE_02B325:
	LDA.w $7860,x
	AND.w #$0002
	BNE.b CODE_02B341
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	TAX
	LDA.l $70001F,x
	SEP.b #$10
	TAY
	LDX.b $12
	CPY.b #$9B
	BEQ.b CODE_02B341
	CLC
CODE_02B341:
	RTS

;---------------------------------------------------------------------------

CODE_02B342:
	JSR.w CODE_02B37A
	BCC.b CODE_02B36B
	PLA
CODE_02B348:
	INC.b $18,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	ORA.w #$0006
	STA.w $6FA2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_02B35F:
	LDA.w #$0019
	STA.w $7402,x
	LDA.w #$0006
	STA.w $7AF8,x
CODE_02B36B:
	RTS

;---------------------------------------------------------------------------

DATA_02B36C:
	dw $0008,$0004

DATA_02B370:
	dw $0007,$0008

DATA_02B374:
	dw $0001,$FFFF,$0001

CODE_02B37A:
	LDA.w $7A96,x
	BNE.b CODE_02B3BB
CODE_02B37F:
	LDY.w $7400,x
CODE_02B382:
	LDA.w $7860,x
	AND.w DATA_02B36C,y
	BNE.b CODE_02B3C7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CPY.b #$00
	BEQ.b CODE_02B395
	CLC
	ADC.w #$0008
CODE_02B395:
	REP.b #$10
	TAX
	LDA.l $70000F,x
	AND.w #$00FF
	SEP.b #$10
	LDX.b $12
	SEC
	SBC.w #$0099
	LSR
	BNE.b CODE_02B3BB
	LDA.w $70E2,x
	AND.w #$000F
	SEC
	SBC.w DATA_02B370,y
	BEQ.b CODE_02B3C7
	EOR.w DATA_02B374,y
	BMI.b CODE_02B3BD
CODE_02B3BB:
	CLC
	RTS

CODE_02B3BD:
	LDA.w $70E2,x
	CLC
	ADC.w DATA_02B374,y
	STA.w $70E2,x
CODE_02B3C7:
	SEC
	RTS

;---------------------------------------------------------------------------

DATA_02B3C9:
	dw $FFE0,$0020

DATA_02B3CD:
	dw $FE00,$0200

CODE_02B3D1:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02B42F
CODE_02B3D9:
	LDA.w $7AF8,x
	BEQ.b CODE_02B3E8
CODE_02B3DE:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
CODE_02B3E3:
	STA.w $7402,x
	RTS

CODE_02B3E8:
	LDY.w $7400,x
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_02B3C9,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	SEC
	SBC.w #$0030
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0002
	BNE.b CODE_02B420
	LDA.w #$FD00
	LDY.w !REGISTER_SuperFX_R6_MultiplierHi
	CPY.b #$99
	BCC.b CODE_02B423
	CPY.b #$9B
	BCS.b CODE_02B423
CODE_02B420:
	LDA.w #$FA00
CODE_02B423:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_02B426:
	LDY.w $7400,x
	LDA.w DATA_02B3CD,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02B42F:
	LDA.w #$0005
	STA.w $7AF8,x
	LDA.w #$0004
	STA.w $7402,x
	RTS

;---------------------------------------------------------------------------

DATA_02B43C:
	db $24,$23,$24,$23,$24,$23,$24,$23,$1E,$22,$1E,$22,$1E,$22,$1E,$22
	db $1E,$21,$20

DATA_02B44F:
	db $03,$03,$03,$03,$03,$03,$03,$03,$10,$04,$04,$04,$04,$04,$04,$04
	db $04,$08,$10

DATA_02B462:
	dw $FE80,$0180

DATA_02B466:
	dw $FFF8,$0008

DATA_02B46A:
	dw $FE00,$0200

DATA_02B46E:
	dw $0010,$0020,$0008,$0018

CODE_02B476:
	TYX
	JSR.w CODE_02B7D1
	LDY.b $18,x
	CPY.b #$03
	BCC.b CODE_02B483
	JMP.w CODE_02BB6B

CODE_02B483:
	JSR.w CODE_02B728
	LDY.b $18,x
	BEQ.b CODE_02B48D
	JMP.w CODE_02B55C

CODE_02B48D:
	LDY.w $7A38,x
	BNE.b CODE_02B495
	JMP.w CODE_02B52E

CODE_02B495:
	LDA.w $7AF8,x
	BNE.b CODE_02B4AD
	DEY
	TYA
	STA.w $7A38,x
	BNE.b CODE_02B4AE
	LDA.w #$0080
	STA.w $7AF8,x
	LDA.w #$001E
	STA.w $7402,x
CODE_02B4AD:
	RTS

CODE_02B4AE:
	LDA.w DATA_02B44F-$01,y
	AND.w #$00FF
	STA.w $7AF8,x
	LDA.w DATA_02B43C-$01,y
	AND.w #$00FF
	STA.w $7402,x
	CMP.w #$0022
	BNE.b CODE_02B4CE
	PHA
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	PLA
CODE_02B4CE:
	CMP.w #$0023
	BNE.b CODE_02B52D
	LDA.w $77C2,x
	EOR.w #$0002
	AND.w #$00FF
	STA.w $7400,x
	LDA.w #$0107
	JSL.l CODE_03A364
	BCC.b CODE_02B52D
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,y
	TAX
	LDA.w $6EBC
	CLC
	ADC.w DATA_02B466,x
	STA.w $70E2,y
	LDA.w $6EBE
	SEC
	SBC.w #$0003
	STA.w $7182,y
	LDA.w DATA_02B46A,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7D38,y
	STA.w $7A38,y
	LDA.w $6FA0,y
	AND.w #$F9FF
	STA.w $6FA0,y
	LDA.w #$FFFF
	STA.w $7862,y
	LDA.w #!Define_YI_SoundID45_SpitSeed
	JSL.l CODE_0085D2
	LDX.b $12
CODE_02B52D:
	RTS

CODE_02B52E:
	JSR.w CODE_02B259
	BCS.b CODE_02B53C
	INC.b $18,x
	LDA.w #$0020
	STA.w $7AF6,x
	RTS

CODE_02B53C:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7AF8,x
	BNE.b CODE_02B559
	LDA.w $7680,x
	CMP.w #$00F0
	BCS.b CODE_02B559
	LDA.b $02
	CMP.w #$0020
	BCS.b CODE_02B559
	LDA.w #$0014
	STA.w $7A38,x
CODE_02B559:
	JMP.w CODE_02B62F

CODE_02B55C:
	DEY
	BNE.b CODE_02B5A9
	JSR.w CODE_02B259
	BCC.b CODE_02B569
	LDA.w $7AF6,x
	BEQ.b CODE_02B5B9
CODE_02B569:
	LDA.b $00
	CMP.w #$0020
	BCS.b CODE_02B573
	JMP.w CODE_02B60D

CODE_02B573:
	LDA.w $77C2,x
	EOR.w #$0002
	AND.w #$00FF
	STA.w $7400,x
	TAY
	LDA.w DATA_02B462,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w DATA_02B36C,y
	BEQ.b CODE_02B591
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02B591:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02B5A6
	LDA.b $16,x
	AND.w #$0002
	LSR
	ADC.w #$001C
	STA.w $7402,x
	RTS

CODE_02B5A6:
	JMP.w CODE_02BB55

CODE_02B5A9:
	JSR.w CODE_02B259
	BCS.b CODE_02B5B9
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_02B5CB
CODE_02B5B9:
	STZ.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$001E
	STA.w $7402,x
	LDA.w #$0020
	STA.w $7AF6,x
CODE_02B5CA:
	RTS

CODE_02B5CB:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $60A8
	BPL.b CODE_02B5D7
	EOR.w #$FFFF
	INC
CODE_02B5D7:
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0018
	CMP.b $00
	BCS.b CODE_02B5E5
	JMP.w CODE_02B620

CODE_02B5E5:
	LDY.b $78,x
	BEQ.b CODE_02B5CA
	LDA.w $77C2,x
	EOR.w #$0002
	TAY
	JSR.w CODE_02B382
	BCC.b CODE_02B60D
	INC.b $18,x
CODE_02B5F7:
	LDA.w $6FA2,x
	AND.w #$FFE0
	ORA.w #$0006
	STA.w $6FA2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	RTS

CODE_02B60D:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.w #$FB00
	JSR.w CODE_02BB43
	LDY.w $7400,x
	LDA.w DATA_02B3CD,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_02B620:
	LDA.w #$0007
	LDY.b $00
	CPY.b #$40
	BCC.b CODE_02B62C
	LDA.w #$000F
CODE_02B62C:
	JSR.w CODE_02B6E7
CODE_02B62F:
	LDA.w $7AF8,x
	BNE.b CODE_02B656
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w DATA_02B46E,y
	LDY.b $00
	CPY.b #$40
	BCS.b CODE_02B644
	LSR
CODE_02B644:
	STA.w $7AF8,x
	LDA.w $7402,x
	INC
	CMP.w #$0020
	BCC.b CODE_02B653
	LDA.w #$001E
CODE_02B653:
	STA.w $7402,x
CODE_02B656:
	RTS

;---------------------------------------------------------------------------

CODE_02B657:
	LDY.b $78,x
	BEQ.b CODE_02B656
	DEY
	BNE.b CODE_02B679
	JSL.l CODE_06C0BB
	LDA.w $70E2,x
	STA.w $70E2
	LDA.w $7182,x
	STA.w $7182
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BRA.b CODE_02B6AA

CODE_02B679:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$000A
	STA.w $7182,y
	PHX
	TYX
	STZ.b $18,x
	JSL.l CODE_048066
	TXY
	PLX
	LDA.w $70E2,x
	CMP.w $70E2,y
	LDA.w #$0100
	BCC.b CODE_02B6A1
	LDA.w #$FF00
CODE_02B6A1:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_02B6AA:
	STZ.b $78,x
CODE_02B6AC:
	STZ.w $7A38,x
	LDA.w #$0002
CODE_02B6B2:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.b $18,x
	STZ.w $7AF8,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	ORA.w #$0018
	STA.w $6FA2,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	LDA.w #$0004
	STA.w $74A2,x
	LDA.w #$0040
	STA.w $7542,x
	RTS

;---------------------------------------------------------------------------

DATA_02B6DC:
	dw $0004,$FFFC

DATA_02B6E0:
	dw $0080,$FF80

CODE_02B6E4:
	LDA.w #$000F
CODE_02B6E7:
	AND.b $16,x
	BNE.b CODE_02B723
	LDY.w $7400,x
	LDA.w DATA_02B6E0,y
	PHA
	LDA.w DATA_02B6DC,y
	PHA
	LDA.w #!Define_YI_AmbSpr1D7
	JSL.l CODE_008B21
	PLA
	CLC
	ADC.w $70E2,x
	STA.w $70A2,y
	PLA
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $7182,x
	SEC
	SBC.w #$0009
	STA.w $7142,y
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.w #$0010
	STA.w $7782,y
CODE_02B723:
	RTS

;---------------------------------------------------------------------------

DATA_02B724:
	dw $0008,$0004

CODE_02B728:
	JSR.w CODE_02B37A
	BCC.b CODE_02B74F
	LDA.w #$0003
	STA.b $18,x
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w #$0018
	STA.w $7402,x
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_02B374+$02,y
	STA.w $70E2,x
	PLA
	JMP.w CODE_02B5F7

CODE_02B74F:
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_02B760
	LDY.w $7400,x
	AND.w DATA_02B724,y
	BNE.b CODE_02B77B
	RTS

CODE_02B760:
	LDA.w $7A36,x
	BNE.b CODE_02B767
	PLA
	RTS

CODE_02B767:
	LDA.l $70276E,x
	STA.w $70E2,x
	LDA.l $702770,x
	STA.w $7182,x
	STZ.w $7AF6,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02B77B:
	JSR.w CODE_02B259
	BCS.b CODE_02B79D
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_02B79D
	STA.w $7400,x
	LDA.w #$0002
	STA.b $18,x
	LDA.w #$001E
	STA.w $7402,x
	STZ.w $7AF8,x
	RTS

CODE_02B79D:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	RTS

;---------------------------------------------------------------------------

CODE_02B7A7:
	LDY.b #$08
	LDA.w $70E2,x
	SEC
	SBC.w #$0010
	BMI.b CODE_02B7BA
	SEC
	SBC.w #$0FD0
	BMI.b CODE_02B7C4
	LDY.b #$04
CODE_02B7BA:
	EOR.w #$FFFF
	SEC
	ADC.w $70E2,x
	STA.w $70E2,x
CODE_02B7C4:
	LDA.w $7680,x
	CLC
	ADC.w #$0020
	CMP.w #$0130
	BCS.b CODE_02B821
	RTS

;---------------------------------------------------------------------------

CODE_02B7D1:
	LDY.b $78,x
	BNE.b CODE_02B7D8
	JMP.w CODE_02B867

CODE_02B7D8:
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_02B85C
	DEY
	BNE.b CODE_02B83B
	LDA.w $7680,x
	CLC
	ADC.w #$0040
	CMP.w #$0170
	BCS.b CODE_02B821
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	CMP.w #$0120
	BCC.b CODE_02B83B
	LDA.w $70E3,x
	AND.w #$000F
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w #$0030
	CMP.w #$0800
	BCS.b CODE_02B81E
	AND.w #$0700
	LSR
	LSR
	LSR
	LSR
	ORA.b $00
	TAY
	LDA.w $6CA9,y
	BPL.b CODE_02B821
CODE_02B81E:
	JMP.w CODE_02B657

CODE_02B821:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	JSR.w CODE_02B8C7
	PLA
	PLA
	RTL

CODE_02B83B:
	PHY
	JSL.l CODE_03A2F8
	PLY
	BCS.b CODE_02B852
	LDA.w $7542,y
	CMP.w #$0040
	BPL.b CODE_02B85C
	LDA.w $7400,x
	STA.w $7400,y
	RTS

CODE_02B852:
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
	PLA
	PLA
	RTL

CODE_02B85C:
	STZ.b $78,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
CODE_02B867:
	PLA
	JMP.w CODE_02B6AC

;---------------------------------------------------------------------------

DATA_02B86B:
	dw $0000,$0000,$0000,$0000,$0000,$FFF6,$FFF6,$FFF4
	dw $FFF4,$FFF4,$FFF3,$FFF4,$FFF8,$FFF8,$0000,$0000
	dw $FFF6,$FFF5,$FFF6,$FFFA,$FFFA,$FFF6,$FFF6

DATA_02B899:
	dw $FFEE,$FFEF,$FFF0,$FFF0,$FFF0,$FFFB,$FFFA,$FFFC
	dw $FFFC,$FFFC,$FFFD,$FFFC,$0000,$0000,$FFF0,$FFE5
	dw $FFFC,$FFFD,$FFFC,$0000,$0000,$FFFC,$FFFC

CODE_02B8C7:
	LDY.b $78,x
	BEQ.b CODE_02B90F
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$0006
	BEQ.b CODE_02B90F
	LDA.w $7402,x
	CMP.w #$0017
	BCS.b CODE_02B8E1
	LDA.w #$001E
	STA.w $7402,x
CODE_02B8E1:
	ASL
	TAY
	LDA.w $7400,x
	LSR
	LSR
	LDA.w DATA_02B86B-$2E,y
	BCC.b CODE_02B8F1
	EOR.w #$FFFF
	INC
CODE_02B8F1:
	PHA
	LDA.w DATA_02B899-$2E,y
	LDY.b $78,x
	CLC
	ADC.w $7182,x
	STA.w $7181,y
	PLA
	CLC
	ADC.w $70E2,x
	STA.w $70E1,y
	SEP.b #$20
	LDA.b #$FF
	STA.w $7861,y
	REP.b #$20
CODE_02B90F:
	RTS

;---------------------------------------------------------------------------

DATA_02B910:
	db $05,$06,$05,$06,$05,$06,$05,$06,$05,$06,$06,$07,$07,$08,$09,$0A
	db $09,$08,$09,$0B,$0A,$0B,$0C,$0D,$0E,$0F,$10,$1A,$1B,$1A,$1B,$1A
	db $1B,$1A,$1B

DATA_02B933:
	db $08,$08,$08,$08,$08,$08,$08,$08,$10,$02,$02,$02,$02,$02,$02

DATA_02B942:
	dw $0204,$2004,$0820,$0101,$0101,$2004,$1010,$1010
	dw $1010,$1010,$0000,$0000,$0000,$0000,$0000,$0000

DATA_02B962:
	dw $0000,$0000,$0000,$0000,$0005,$0000,$0005,$000C
	dw $000F,$000F,$FFFB,$FFF5,$FFF0,$FFEC,$FFE9,$FFE7
	dw $FFE6,$FFE7,$FFE9,$FFE7,$FFEA,$FFE6,$FFEA,$FFEF
	dw $FFFF,$000B

CODE_02B996:
	TYX
	LDY.w $7A38,x
	CPY.b #$0A
	BCC.b CODE_02B9A5
	CPY.b #$1A
	BCS.b CODE_02B9A5
	JSR.w CODE_02B7D1
CODE_02B9A5:
	LDA.w $7AF8,x
	BEQ.b CODE_02B9AD
	JMP.w CODE_02BA4B

CODE_02B9AD:
	LDY.w $7A38,x
	INY
	CPY.b #$0A
	BCS.b CODE_02B9B8
	JMP.w CODE_02BA21

CODE_02B9B8:
	BNE.b CODE_02B9D8
	PHY
	LDA.w $7182,x
	AND.w #$0010
	BNE.b CODE_02B9C8
	LDA.w #$0060
	BRA.b CODE_02B9CB

CODE_02B9C8:
	LDA.w #$00F9
CODE_02B9CB:
	JSL.l CODE_03A34C
	JSR.w CODE_02AEA7
	PLY
	BCS.b CODE_02B9D8
	JMP.w CODE_02BA4B

CODE_02B9D8:
	CPY.b #$15
	BCC.b CODE_02BA21
	BNE.b CODE_02B9F4
	LDA.w $7680,x
	CMP.w #$00F0
	BCS.b CODE_02B9F2
	LDA.w $7682,x
	SEC
	SBC.w #$0008
	CMP.w #$00B0
	BCC.b CODE_02B9F4
CODE_02B9F2:
	LDY.b #$12
CODE_02B9F4:
	CPY.b #$1A
	BNE.b CODE_02BA21
	PHY
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	LDY.b $78,x
	DEY
	TYX
	STZ.b $18,x
	LDA.w $7182,x
	CLC
	ADC.w #$0002
	STA.w $7182,x
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.b $76,x
	JSL.l CODE_048072
	LDX.b $12
	STZ.b $78,x
	PLY
CODE_02BA21:
	CPY.b #$0D
	BNE.b CODE_02BA2F
	PHY
	LDY.b $78,x
	LDA.w #$0002
	STA.w $74A1,y
	PLY
CODE_02BA2F:
	LDA.w DATA_02B910-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_02B933-$01,y
	AND.w #$00FF
	STA.w $7AF8,x
	CPY.b #$24
	BCC.b CODE_02BA47
	LDY.b #$00
CODE_02BA47:
	TYA
	STA.w $7A38,x
CODE_02BA4B:
	LDY.w $7A38,x
	CPY.b #$0A
	BCC.b CODE_02BA7C
	CPY.b #$1A
	BCS.b CODE_02BA7C
	TYA
	ASL
	TAY
	LDA.w $7400,x
	LSR
	LSR
	LDA.w DATA_02B942,y
	BCC.b CODE_02BA67
	EOR.w #$FFFF
	INC
CODE_02BA67:
	PHA
	LDA.w DATA_02B962,y
	LDY.b $78,x
	CLC
	ADC.w $7182,x
	STA.w $7181,y
	PLA
	CLC
	ADC.w $70E2,x
	STA.w $70E1,y
CODE_02BA7C:
	RTS

;---------------------------------------------------------------------------

DATA_02BA7D:
	dw $FE80,$0180

CODE_02BA81:
	TYX
	LDY.b $78,x
	BEQ.b CODE_02BA89
	JMP.w CODE_02BAE9

CODE_02BA89:
	LDA.w #$0004
	STA.w $74A2,x
	JSR.w CODE_02BBCE
	LDA.w $7860,x
	ORA.w $7A36,x
	AND.w #$0001
	BEQ.b CODE_02BAD0
	LDA.w $7AF8,x
	BEQ.b CODE_02BAA5
	JMP.w CODE_02B3DE

CODE_02BAA5:
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0001
	BEQ.b CODE_02BAB1
	TYA
	STA.w $7400,x
CODE_02BAB1:
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$0008
	BNE.b CODE_02BAD0
	LDA.w $7C16,x
	CLC
	ADC.w #$0060
	CMP.w #$00C1
	BCS.b CODE_02BAD0
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_02BAD0:
	JSR.w CODE_02B42F
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_02B36C,y
	BEQ.b CODE_02BAE2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_02BAE2:
	LDA.w DATA_02BA7D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_02BAE9:
	LDA.w #$0003
	STA.w $74A2,x
	JSR.w CODE_02B7D1
	JSR.w CODE_02B7A7
	LDY.b $18,x
	CPY.b #$03
	BCC.b CODE_02BAFE
	JMP.w CODE_02BB65

CODE_02BAFE:
	JSR.w CODE_02B728
	LDY.b $18,x
	BNE.b CODE_02BB18
	JSR.w CODE_02B259
	BCC.b CODE_02BB15
	LDA.w $7AF6,x
	BNE.b CODE_02BB15
	INC.b $18,x
	STZ.w $7AF8,x
	RTS

CODE_02BB15:
	JMP.w CODE_02B573

CODE_02BB18:
	DEY
	BNE.b CODE_02BB62
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02BB55
	JSR.w CODE_02B259
	BCS.b CODE_02BB34
	DEC.b $18,x
	LDA.w #$0020
	STA.w $7AF6,x
	RTS

CODE_02BB34:
	LDA.w $7AF8,x
	BEQ.b CODE_02BB40
	LDA.w #$0025
	STA.w $7402,x
	RTS

CODE_02BB40:
	LDA.w #$FC00
CODE_02BB43:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	STZ.w $7860,x
	STZ.w $7A36,x
CODE_02BB55:
	LDA.w #$0010
	STA.w $7AF8,x
	LDA.w #$0026
	STA.w $7402,x
	RTS

CODE_02BB62:
	JMP.w CODE_02B5A9

;---------------------------------------------------------------------------

CODE_02BB65:
	LDA.w #$0004
	STA.w $74A2,x
CODE_02BB6B:
	CPY.b #$03
	BNE.b CODE_02BBAE
	JSR.w CODE_02B37F
	BCS.b CODE_02BB8F
	JSR.w CODE_02B13D
CODE_02BB77:
	LDA.w #$0002
	STA.b $18,x
	LDA.w #$FC00
	JSR.w CODE_02BB43
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	JMP.w CODE_02BAE2

CODE_02BB8F:
	JSR.w CODE_02B325
	BCS.b CODE_02BBA6
	LDA.w $7AF6,x
	BNE.b CODE_02BBAB
	LDA.w $60C0
	BNE.b CODE_02BBA6
	LDA.w $7C18,x
	CMP.w #$FFC0
	BPL.b CODE_02BBAB
CODE_02BBA6:
	INC.b $18,x
	STZ.b $16,x
	RTS

CODE_02BBAB:
	JMP.w CODE_02B0E4

CODE_02BBAE:
	LDA.w $60C0
	BNE.b CODE_02BBBD
	LDA.w $7C18,x
	CMP.w #$FFC0
	BMI.b CODE_02BBBD
	DEC.b $18,x
CODE_02BBBD:
	JSR.w CODE_02B10F
	LDA.b $18,x
	BNE.b CODE_02BBCD
	JSR.w CODE_02BB55
	LDY.w $7400,x
	JMP.w CODE_02BAE2

CODE_02BBCD:
	RTS

;---------------------------------------------------------------------------

CODE_02BBCE:
	LDA.w $61CC
	BNE.b CODE_02BBDB
	LDA.w $61B2
	AND.w #$6000
	BEQ.b CODE_02BBE0
CODE_02BBDB:
	LDY.w $7400,x
	SEC
	RTS

CODE_02BBE0:
	LDY.b #$02
	LDA.w $7CD6
	SEC
	SBC.w $7CD6,x
	BPL.b CODE_02BBF1
	LDY.b #$00
	EOR.w #$FFFF
	INC
CODE_02BBF1:
	CMP.w #$0008
	BCS.b CODE_02BC21
	LDA.w $7CD8
	SEC
	SBC.w $7CD8,x
	CLC
	ADC.w #$0008
	CMP.w #$0011
	BCS.b CODE_02BC21
CODE_02BC06:
	LDA.w #$0001
	STA.b $78,x
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHA
	JSL.l CODE_06BE72
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
CODE_02BC21:
	RTS

CODE_02BC22:
	JSR.w CODE_02BC06
	RTL

;---------------------------------------------------------------------------

DATA_02BC26:
	db $2B,$2A,$2B,$2A,$2B,$2A,$2B,$2A,$2C,$29,$2C,$29,$2C,$29,$2C,$29
	db $2C,$28,$27

DATA_02BC39:
	db $03,$03,$03,$03,$03,$03,$03,$03,$10,$04,$04,$04,$04,$04,$04,$04
	db $04,$08,$10

DATA_02BC4C:
	dw $FFF4,$000C

DATA_02BC50:
	dw $FFFF,$FFFF,$FFFE,$FFFE,$FFFD,$0002,$0002,$0001
	dw $0001

DATA_02BC62:
	dw $FFF0,$0010

CODE_02BC66:
	TYX
	JSR.w CODE_02B7D1
	LDY.b $18,x
	BEQ.b CODE_02BC71
	JMP.w CODE_02BD79

CODE_02BC71:
	LDY.w $7A38,x
	BNE.b CODE_02BC79
	JMP.w CODE_02BD01

CODE_02BC79:
	LDA.w $7AF8,x
	BEQ.b CODE_02BC7F
	RTS

CODE_02BC7F:
	DEY
	TYA
	STA.w $7A38,x
	BNE.b CODE_02BC8D
	LDA.w #$0040
	STA.w $7AF8,x
	RTS

CODE_02BC8D:
	LDA.w DATA_02BC39-$01,y
	AND.w #$00FF
	STA.w $7AF8,x
	LDA.w DATA_02BC26-$01,y
	AND.w #$00FF
	STA.w $7402,x
	CMP.w #$0019
	BNE.b CODE_02BCAD
	PHA
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	PLA
CODE_02BCAD:
	CMP.w #$002A
	BNE.b CODE_02BD00
	LDA.w #$0107
	JSL.l CODE_03A364
	BCC.b CODE_02BD00
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,y
	TAX
	LDA.w $6EBC
	CLC
	ADC.w DATA_02BC4C,x
	STA.w $70E2,y
	LDA.w $6EBE
	SEC
	SBC.w #$0001
	STA.w $7182,y
	LDA.w DATA_02B46A,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7D38,y
	STA.w $7A38,y
	LDA.w $6FA0,y
	AND.w #$F9FF
	STA.w $6FA0,y
	LDA.w #$FFFF
	STA.w $7862,y
	LDA.w #!Define_YI_SoundID45_SpitSeed
	JSL.l CODE_0085D2
	LDX.b $12
CODE_02BD00:
	RTS

CODE_02BD01:
	LDA.w $7AF8,x
	BEQ.b CODE_02BD1F
	LDY.b #$2C
	CMP.w #$0020
	BCS.b CODE_02BD1A
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_02BD1A
	LDY.b #$2D
CODE_02BD1A:
	TYA
	STA.w $7402,x
	RTS

CODE_02BD1F:
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_02BD3F
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_02B36C,y
	BNE.b CODE_02BD72
	INC.b $18,x
	LDA.w #$0009
	STA.w $7A38,x
	BRA.b CODE_02BD6B

CODE_02BD3F:
	JSR.w CODE_02B259
	BCS.b CODE_02BD72
	LDA.w $7C18,x
	CLC
	ADC.w #$0008
	CMP.w #$0011
	BCC.b CODE_02BD72
	LDY.w $77C3,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_02BC62,y
	LDY.w $7400,x
	JSR.w CODE_02ADC4
	BCC.b CODE_02BD72
	LDA.w $77C3,x
	CLC
	ADC.w #$0002
	STA.b $18,x
CODE_02BD6B:
	LDA.w #$0019
	STA.w $7402,x
	RTS

CODE_02BD72:
	LDA.w #$0014
	STA.w $7A38,x
	RTS

CODE_02BD79:
	DEY
	BNE.b CODE_02BDAB
	DEC.w $7A38,x
	BNE.b CODE_02BD85
CODE_02BD81:
	STZ.b $18,x
	BRA.b CODE_02BD72

CODE_02BD85:
	LDA.w $7A38,x
	ASL
	TAY
	CPY.b #$08
	BNE.b CODE_02BD97
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_02BD97:
	LDA.w DATA_02BC50,y
	LDY.w $7400,x
	BNE.b CODE_02BDA3
	EOR.w #$FFFF
	INC
CODE_02BDA3:
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	RTS

CODE_02BDAB:
	DEY
	BNE.b CODE_02BDB3
	JSR.w CODE_02B0E4
	BRA.b CODE_02BDD9

CODE_02BDB3:
	LDA.w $7AF8,x
	BNE.b CODE_02BDD9
	LDA.w #$0004
	STA.w $7AF8,x
	LDA.w $7402,x
	DEC
	CMP.w #$0017
	BCS.b CODE_02BDCA
	LDA.w #$0019
CODE_02BDCA:
	STA.w $7402,x
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w $02B026,y
	STA.w $7182,x
CODE_02BDD9:
	LDY.w $7400,x
	JSR.w CODE_02ADC1
	BCS.b CODE_02BDEA
	LDA.w $6EBE
	STA.w $7182,x
CODE_02BDE7:
	JMP.w CODE_02BD81

CODE_02BDEA:
	JSR.w CODE_02B259
	BCS.b CODE_02BDE7
	LDA.w $77C3,x
	AND.w #$00FF
	CLC
	ADC.w #$0002
	CMP.b $18,x
	BNE.b CODE_02BDE7
	RTS

;---------------------------------------------------------------------------

DATA_02BDFE:
	dw $FF80,$0080

CODE_02BE02:
	TYX
CODE_02BE03:
	JSR.w CODE_02B259
	BCS.b CODE_02BE69
CODE_02BE08:
	JSR.w CODE_02B6E4
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_02B36C,y
	BEQ.b CODE_02BE40
CODE_02BE1F:
	STZ.b $76,x
	STZ.w $75E0,x
	STZ.w $7540,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDY.b $78,x
	BNE.b CODE_02BE3D
	LDA.w #$FC00
	JMP.w CODE_02B423

CODE_02BE3D:
	JMP.w CODE_02BB77

CODE_02BE40:
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	TAY
CODE_02BE4D:
	LDA.w DATA_02BDFE,y
	STA.w $75E0,x
CODE_02BE53:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	CMP.w #$0101
	LDA.w #$0004
	BCC.b CODE_02BE65
	LDA.w #$0020
CODE_02BE65:
	STA.w $7540,x
	RTS

CODE_02BE69:
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	STZ.w $75E0,x
	BRA.b CODE_02BE53

CODE_02BE80:
	TYX
	JSR.w CODE_02B7D1
	JMP.w CODE_02BE03

;---------------------------------------------------------------------------

CODE_02BE87:
	TYX
	RTS

;---------------------------------------------------------------------------

CODE_02BE89:
	TYX
	LDY.b $78,x
	BNE.b CODE_02BEB2
	LDA.w #$0004
	STA.w $74A2,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
	JSR.w CODE_02BBCE
	TYA
	STA.w $7400,x
	LDA.w $7860,x
	AND.w DATA_02B36C,y
	BEQ.b CODE_02BEAF
	JMP.w CODE_02BE1F

CODE_02BEAF:
	JMP.w CODE_02BE4D

CODE_02BEB2:
	LDA.w #$0003
	STA.w $74A2,x
	JSR.w CODE_02B7D1
	JSR.w CODE_02B7A7
	JSR.w CODE_02B259
	BCS.b CODE_02BEC6
	JMP.w CODE_02BE08

CODE_02BEC6:
	JMP.w CODE_02BE69

;---------------------------------------------------------------------------

CODE_02BEC9:
	TYX
	LDY.w $7A38,x
	BEQ.b CODE_02BEFD
	CPY.b #$04
	BCS.b CODE_02BED9
	LDA.w #$0080
	STA.w $75E2,x
CODE_02BED9:
	LDA.w $7AF8,x
	BNE.b CODE_02BEE7
	DEC.w $7A38,x
	LDA.w #$0010
	STA.w $7AF8,x
CODE_02BEE7:
	JSR.w CODE_02B6E4
	LDA.b $16,x
	AND.w #$0008
	BEQ.b CODE_02BEF7
	LDA.w #$0020
	STA.w $7402,x
CODE_02BEF7:
	STZ.w $75E0,x
	JMP.w CODE_02BE53

CODE_02BEFD:
	JMP.w CODE_02BE08

;---------------------------------------------------------------------------

YI_NorSpr0A5_NepEnut_Init:
;$02BF00
	LDA.w $70E2,x
	AND.w #$0010
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

DATA_02BF09:
	dw $7D8F,$7D8F,$7D8F,$7D8F,$7D8F,$7D8F,$7D8F,$7D8F
	dw $001F,$001E,$001D,$001C,$001B,$001C,$001D,$001E
	dw $7FFF

DATA_02BF2B:
	dw $6CAA,$6CAA,$6CAA,$6CAA,$6CAA,$6CAA,$6CAA,$6CAA
	dw $0015,$0016,$0017,$0018,$0019,$0018,$0017,$0016
	dw $7FFF

DATA_02BF4D:
	dw $7F2F,$7F2F,$7F2F,$7F2F,$7F2F,$7F2F,$7F2F,$7F2F
	dw $01DF,$01DF,$01DF,$01DF,$01DF,$01DF,$01DF,$01DF
	dw $7FFF

DATA_02BF6F:
	dw $0000,$0001,$0002,$0002,$0001,$0000,$0000,$0001
	dw $0002,$0002,$0001

DATA_02BF85:
	dw $000A,$0016

DATA_02BF89:
	dw $FFC0,$0040

DATA_01BF8D:
	dw $0001,$FFFF

YI_NorSpr0A5_NepEnut_Main:
;$02BF91
	JSR.w CODE_02C1F4
	JSL.l CODE_03AF23
	LDY.b #$02
	LDA.w $7680,x
	CLC
	ADC.w #$0050
	BMI.b CODE_02BFAB
	SEC
	SBC.w #$01A0
	BMI.b CODE_02BFB9
	LDY.b #$00
CODE_02BFAB:
	EOR.w #$FFFF
	INC
	STA.b $02
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	BRA.b CODE_02BFC4

CODE_02BFB9:
	STZ.b $02
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_02BFC4
	LDY.b #$02
CODE_02BFC4:
	STY.b $00
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_02BF89,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_02BFF0
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b $00
	LDA.w DATA_01BF8D,y
	STA.b $02
CODE_02BFF0:
	LDA.w $70E2,x
	CLC
	ADC.b $02
	STA.w $70E2,x
	TXY
	LDA.b $18,x
	ASL
	TAX
	JSR.w (DATA_02C0A0,x)
	STZ.w $7A38,x
	LDA.w $7AF8,x
	BEQ.b CODE_02C015
	AND.w #$FFFE
	TAY
	LDA.w DATA_02BF6F,y
	STA.w $7402,x
	BRA.b CODE_02C028

CODE_02C015:
	LDA.b $10
	AND.w #$003F
	BNE.b CODE_02C028
	LDA.b $14
	AND.w #$0002
	TAY
	LDA.w DATA_02BF85,y
	STA.w $7AF8,x
CODE_02C028:
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $601A
	BEQ.b CODE_02C055
	INC.w $7A38,x
	JSL.l CODE_03A858
CODE_02C055:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_02C06B
	LDA.w $7D38,y
	BEQ.b CODE_02C06B
	LDA.w #$FFFF
	STA.w $7A38,x
	TYX
	JSL.l CODE_03B25B
CODE_02C06B:
	LDY.b #$20
	LDA.w $7AF6,x
	AND.w #$0004
	BNE.b CODE_02C07E
	LDA.b $14
	LSR
	AND.w #$000E
	ORA.b $78,x
	TAY
CODE_02C07E:
	LDA.w DATA_02BF09,y
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l $702D6E
	LDA.w DATA_02BF2B,y
	STA.l YI_Global_PaletteMirror[$02].LowByte
	STA.l $702D70
	LDA.w DATA_02BF4D,y
	STA.l YI_Global_PaletteMirror[$03].LowByte
	STA.l $702D72
	RTL

DATA_02C0A0:
	dw CODE_02C0A8
	dw CODE_02C141

DATA_02C0A4:
	dw $FE00,$0200

CODE_02C0A8:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_02C0C3
	LDY.w $77C2,x
	LDA.w DATA_02C0A4,y
	STA.w $75E0,x
	LDA.w #$0020
	STA.w $7540,x
	LDA.w #$0040
	STA.w $7A98,x
CODE_02C0C3:
	LDA.b $76,x
	BNE.b CODE_02C0DC
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	CLC
	ADC.w #$0004
	CMP.w #$0101
	BCC.b CODE_02C0D8
	INC.b $76,x
	LDA.w #$0000
CODE_02C0D8:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	RTS

CODE_02C0DC:
	LDY.b $00
	TYA
	CMP.w $7400,x
	BEQ.b CODE_02C0F5
	LDA.b $16,x
	CLC
	ADC.w #$0008
	CMP.w #$0101
	BCC.b CODE_02C102
	TYA
	STA.w $7400,x
	BRA.b CODE_02C0FF

CODE_02C0F5:
	LDA.b $16,x
	BEQ.b CODE_02C105
	SEC
	SBC.w #$0004
	BPL.b CODE_02C102
CODE_02C0FF:
	LDA.w #$0000
CODE_02C102:
	STA.b $16,x
	RTS

CODE_02C105:
	LDA.w $7A96,x
	BNE.b CODE_02C13C
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BNE.b CODE_02C13C
	LDA.w $7C16,x
	CLC
	ADC.w #$0090
	CMP.w #$0121
	BCS.b CODE_02C13C
	LDA.w #!Define_YI_SoundID48_LargeBlockLands
	JSL.l CODE_0085D2
	INC.b $18,x
	STZ.w $7A36,x
	LDA.w #$0003
	STA.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0080
	STA.w $7A98,x
CODE_02C13C:
	RTS

DATA_02C13D:
	dw $FF00,$0100

CODE_02C141:
	TYX
	LDY.b $76,x
	CPY.b #$04
	BCC.b CODE_02C16C
	LDA.w $7A36,x
	BNE.b CODE_02C16C
	LDA.w $7A38,x
	BEQ.b CODE_02C16C
	STA.w $7A36,x
	BPL.b CODE_02C166
	PHY
	LDA.w #!Define_YI_SoundID7A_HurtNepEnut
	JSL.l CODE_0085D2
	PLY
	LDA.w #$0040
	STA.w $7AF6,x
CODE_02C166:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_02C16C:
	CPY.b #$07
	BCS.b CODE_02C178
	LDA.w $7A36,x
	BPL.b CODE_02C178
	LDA.w #$0020
CODE_02C178:
	CLC
	ADC.w #$0008
	CLC
	ADC.b $16,x
	CMP.w #$0101
	BCC.b CODE_02C1E9
	INY
	CPY.b #$09
	BCS.b CODE_02C1C7
	CPY.b #$05
	BCC.b CODE_02C1E3
	LDA.w $7A36,x
	BNE.b CODE_02C1BF
	LDA.w $7A98,x
	BNE.b CODE_02C1B7
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_02C1BF
	PHY
	TAY
	LDA.w DATA_02C13D,y
	STA.w $75E0,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w #$0040
	STA.w $7A98,x
	PLY
CODE_02C1B7:
	CPY.b #$07
	BNE.b CODE_02C1E3
	LDY.b #$05
	BRA.b CODE_02C1E3

CODE_02C1BF:
	CPY.b #$05
	BNE.b CODE_02C1E3
	LDY.b #$07
	BRA.b CODE_02C1E3

CODE_02C1C7:
	STZ.b $18,x
	LDA.w #$0020
	LDY.w $7A36,x
	BEQ.b CODE_02C1DE
	LDA.w #$00A0
	LDY.w !RAM_YI_Level_CurrentWorldLo
	CPY.b #!Define_YI_WorldID_World4
	BCS.b CODE_02C1DE
	LDA.w #$0100
CODE_02C1DE:
	STA.w $7A96,x
	LDY.b #$01
CODE_02C1E3:
	TYA
	STA.b $76,x
	LDA.w #$0000
CODE_02C1E9:
	STA.b $16,x
	RTS

DATA_02C1EC:
	dw $0048,$00B0

DATA_02C1F0:
	dw $0040,$00B8

CODE_02C1F4:
	LDA.b $76,x
	ASL
	ASL
	ORA.w $7400,x
	TAY
	LDA.w DATA_02C2DC,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_02C2E0,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_02C304>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$003E
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w $6040
	LDA.w $7682,x
	SEC
	SBC.w #$0008
	STA.w $6042
	LDX.b #FXCODE_08E93B>>16
	LDA.w #FXCODE_08E93B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	LDX.b $12
	LDA.w #$0004
	TSB.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0008
	TRB.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDA.w #$0018
	TSB.w !RAM_YI_Global_HDMAEnable
	LDY.w $7400,x
	LDX.b #$7C
	LDA.l $70449E,x
	STA.b $00
	LDA.l $7044A0,x
	STA.b $02
	LDX.w DATA_02C1EC,y
	LDA.l $70449E,x
	STA.b $04
	LDA.l $7044A0,x
	STA.b $06
	LDX.w DATA_02C1F0,y
	LDA.l $70449E,x
	STA.b $08
	LDA.l $7044A0,x
	STA.b $0A
	LDX.b $12
	REP.b #$10
	LDY.w $7362,x
	LDX.w #$000A
CODE_02C298:
	LDA.w $6000,y
	CLC
	ADC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $02
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_02C298
	LDA.w $6000,y
	CLC
	ADC.b $04
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $06
	STA.w $6002,y
	LDA.w $6008,y
	CLC
	ADC.b $08
	STA.w $6008,y
	LDA.w $600A,y
	CLC
	ADC.b $0A
	STA.w $600A,y
	SEP.b #$10
	LDX.b $12
	RTS

DATA_02C2DC:
	dw DATA_02C304,DATA_02C304

DATA_02C2E0:
	dw DATA_02C380,DATA_02C570,DATA_02C570,DATA_02C380,DATA_02C380,DATA_02C570,DATA_02C3FC,DATA_02C5EC
	dw DATA_02C4F4,DATA_02C6E4,DATA_02C478,DATA_02C668,DATA_02C4F4,DATA_02C6E4,DATA_02C3FC,DATA_02C5EC
	dw DATA_02C380,DATA_02C570

DATA_02C304:
	dw $0000,$00C0,$00C6,$00C9,$00CB,$00CD,$00CE,$00E8
	dw $0002,$000B,$0013,$0016,$0018,$0015,$0012,$000C
	dw $0001,$00EF,$00DC,$00D7,$00D3,$00CF,$00CF,$00D0
	dw $00D0,$00D1,$00D3,$00D8,$00DF,$00E7,$00F1,$00F1
	dw $00FC,$0008,$0013,$001D,$0024,$0028,$0029,$002A
	dw $002B,$002D,$002E,$002E,$002E,$002E,$002E,$002E
	dw $002E,$002E,$002E,$002E,$002E,$002E,$002E,$002E
	dw $002E,$0030,$0034,$0037,$003B,$003F

DATA_02C380:
	dw $0000,$00C0,$FFC6,$FEC9,$FDCB,$FBCD,$FACE,$FAE8
	dw $FA02,$FA0B,$FA13,$FA16,$FA18,$FA15,$FA12,$FA0C
	dw $FA01,$FAEF,$FADC,$FAD7,$FAD3,$FACF,$F9CF,$F8D0
	dw $F8D0,$F7D1,$F6D3,$F4D8,$F2DF,$F1E7,$F1F1,$F1F1
	dw $F1FC,$F108,$F213,$F41D,$F624,$F728,$F829,$F82A
	dw $F92B,$FA2D,$FA2E,$FA2E,$FA2E,$FA2E,$FA2E,$FA2E
	dw $FA2E,$FA2E,$FA2E,$FA2E,$FA2E,$FA2E,$FA2E,$FA2E
	dw $FA2E,$FB30,$FD34,$FE37,$003B,$003F

DATA_02C3FC:
	dw $0000,$00C0,$FCC6,$F8C9,$F3CB,$ECCD,$E7CE,$E7E8
	dw $E702,$E70B,$E713,$E716,$E718,$E715,$E712,$E70C
	dw $E701,$E7EF,$E7DC,$E7D7,$E7D3,$E6CF,$E2CF,$E0D0
	dw $DED0,$DBD1,$D6D3,$CED8,$C7DF,$C3E7,$C1F1,$C1F1
	dw $C1FC,$C308,$C713,$CE1D,$D624,$DB28,$DE29,$E02A
	dw $E22B,$E62D,$E72E,$E72E,$E72E,$E72E,$E72E,$E72E
	dw $E72E,$E72E,$E72E,$E72E,$E72E,$E72E,$E72E,$E72E
	dw $E72E,$EC30,$F334,$F837,$FD3B,$003F

DATA_02C478:
	dw $0000,$00C0,$FAC5,$F5C8,$E9CB,$DCCD,$C8D0,$C6E8
	dw $C202,$BF0B,$BC13,$B916,$B518,$B015,$AD12,$A90C
	dw $A501,$A1EF,$9EDC,$9DD7,$9DD3,$9BD0,$97D0,$95D2
	dw $93D6,$92DA,$8DDD,$89E1,$86E5,$84EA,$82F1,$82F1
	dw $82FC,$8301,$8508,$890F,$8E15,$9219,$931A,$951B
	dw $971C,$9B1E,$9D1F,$9D1F,$9E20,$A121,$A523,$A924
	dw $AC25,$B027,$B528,$B929,$BC2A,$C02A,$C22B,$C62C
	dw $C82C,$DC31,$E934,$F538,$FA3B,$003F

DATA_02C4F4:
	dw $0000,$00C0,$FCC3,$F9C5,$F1C8,$E8CA,$DCCA,$DAE8
	dw $D701,$D00F,$CB14,$C117,$BA18,$B417,$AF15,$A911
	dw $A40B,$9BFA,$97E6,$96DE,$95D8,$92D4,$8DD3,$8BD5
	dw $8AD7,$8AE1,$88E4,$86E7,$84EC,$83F0,$82F5,$8200
	dw $8206,$840C,$8610,$8916,$8D1B,$9220,$9321,$9523
	dw $9724,$9B26,$9D27,$9E27,$9F27,$A128,$A529,$A92A
	dw $AC2B,$B02C,$B32D,$BA2D,$C12E,$CB2F,$D02F,$D730
	dw $DA31,$E834,$F137,$F93B,$FC3D,$003F

DATA_02C570:
	dw $0000,$00C1,$00C5,$FEC9,$FDCC,$FBD0,$FAD2,$FAD2
	dw $FAD2,$FAD2,$FAD2,$FAD2,$FAD2,$FAD2,$FAD2,$FAD2
	dw $FAD2,$FAD2,$FAD2,$FAD2,$FAD2,$FAD3,$F9D5,$F8D6
	dw $F8D7,$F7D8,$F6DC,$F4E3,$F2ED,$F1F8,$F104,$F10F
	dw $F10F,$F119,$F221,$F428,$F62D,$F72F,$F830,$F830
	dw $F931,$FA31,$FA2D,$FA29,$FA24,$FA11,$FAFF,$FAF4
	dw $FAEE,$FAEB,$FAE8,$FAEA,$FAED,$FAF5,$FAFE,$FA18
	dw $FA32,$FB33,$FD35,$FE37,$FF3A,$0040

DATA_02C5EC:
	dw $0000,$00C1,$FDC5,$F8C9,$F3CC,$ECD0,$E7D2,$E7D2
	dw $E7D2,$E7D2,$E7D2,$E7D2,$E7D2,$E7D2,$E7D2,$E7D2
	dw $E7D2,$E7D2,$E7D2,$E7D2,$E7D2,$E6D3,$E2D5,$E0D6
	dw $DED7,$DBD8,$D6DC,$CEE3,$C7ED,$C3F8,$C104,$C10F
	dw $C10F,$C319,$C721,$CE28,$D62D,$DB2F,$DE30,$E030
	dw $E231,$E631,$E72D,$E729,$E724,$E711,$E7FF,$E7F4
	dw $E7EE,$E7EB,$E7E8,$E7EA,$E7ED,$E7F5,$E7FE,$E718
	dw $E732,$EC33,$F335,$F837,$FC3A,$0040

DATA_02C668:
	dw $0000,$00C1,$FAC5,$F5C8,$E9CC,$DCCF,$C8D4,$C6D4
	dw $C2D5,$C0D6,$BCD6,$B9D7,$B5D8,$B0D9,$ACDB,$A9DC
	dw $A5DD,$A1DF,$9EE0,$9DE1,$9DE1,$9BE2,$97E4,$95E5
	dw $93E6,$92E7,$8EEB,$89F1,$85F8,$83FF,$8204,$820F
	dw $820F,$8416,$861B,$891F,$8D23,$9226,$932A,$952E
	dw $9730,$9B30,$9D2D,$9D29,$9E24,$A111,$A5FF,$A9F4
	dw $ADEE,$B0EB,$B5E8,$B9EA,$BCED,$BFF5,$C2FE,$C618
	dw $C830,$DC33,$E935,$F538,$FA3B,$0040

DATA_02C6E4:
	dw $0000,$00C1,$FCC3,$F9C5,$F1C9,$E8CC,$DACF,$D7D0
	dw $D0D1,$CBD1,$C1D2,$BAD3,$B3D3,$B0D4,$ACD5,$A9D6
	dw $A5D7,$A1D8,$9FD9,$9ED9,$9DD9,$9BDA,$97DC,$95DD
	dw $93DF,$92E0,$8DE5,$89EA,$86F0,$84F4,$82FA,$8200
	dw $820B,$8310,$8414,$8619,$881C,$8A1F,$8A29,$8B2B
	dw $8D2D,$922C,$9528,$9622,$971A,$9B06,$A4F5,$A9EF
	dw $AFEB,$B4E9,$BAE8,$C1E9,$CBEC,$D0F1,$D7FF,$DA18
	dw $DC36,$E836,$F138,$F93B,$FC3D,$0040

;---------------------------------------------------------------------------

DATA_02C760:
	db $43,!REGISTER_BG2HorizScrollOffset : dl $7E5D18

DATA_02C765:
	db $D9 : dw $7E5388
	db $D9 : dw $7E54EC
	db $00

DATA_02C76C:
	dw DATA_02C774,DATA_02C794

DATA_02C770:
	dw DATA_02C7B4,DATA_02C7D4

DATA_02C774:
	dw $0050,$1E48,$3939,$481E,$5000,$48E3,$39C8,$1EB9
	dw $00B1,$E3B9,$C8C8,$B9E3,$B100,$B91E,$C839,$E348

DATA_02C794:
	dw $004E,$1F4A,$3737,$4A1F,$4E00,$4AE2,$37CA,$1FB7
	dw $00B3,$E2B7,$CACA,$B7E2,$B300,$B71F,$CA37,$E24A

DATA_02C7B4:
	dw $0040,$1534,$2D2D,$3415,$4000,$34EC,$2DD4,$15CD
	dw $00C1,$ECCD,$D4D4,$CDEC,$C100,$CD15,$D42D,$EC34

DATA_02C7D4:
	dw $0038,$183B,$2828,$3B18,$3800,$3BE9,$28D9,$18C6
	dw $00C9,$E9C6,$D9D9,$C6E9,$C900,$C618,$D928,$E93B

YI_NorSpr045_PrinceFroggy_Init:
;$02C7F4
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_02C7FF
	JMP.w CODE_02C8A1

CODE_02C7FF:
	AND.w $7182,x
	BEQ.b CODE_02C873
	INC.w $0B59
	LDA.w #$0017
	JSL.l CODE_03A364
	BCS.b CODE_02C814
	JML.l CODE_03A31E

CODE_02C814:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w $70E2,x
	SEC
	SBC.w #$0058
	STA.w $70E2,y
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	SEC
	SBC.w #$0028
	STA.w $7182,y
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $6FA2,y
	AND.w #$FFE0
	ORA.w #$2000
	STA.w $6FA2,y
	LDA.w #$0000
	STA.w $7542,y
	LDA.w #$0080
	STA.w $7A96,y
	LDA.w #$0060
	STA.w $105C
	JSR.w CODE_02C92C
	LDX.b #$1C
CODE_02C85F:
	LDA.l YI_Global_PaletteMirror[$D1].LowByte,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	STA.l $702F2E,x
	DEX
	DEX
	BPL.b CODE_02C85F
	LDX.b $12
	BRA.b CODE_02C89D

CODE_02C873:
	LDA.w #$0017
	JSL.l CODE_03A364
	BCC.b CODE_02C89D
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$000D
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w $6FA2,y
	ORA.w #$2000
	STA.w $6FA2,y
	LDY.b #$36
	JSL.l CODE_0CE5D6
CODE_02C89D:
	JML.l CODE_03A31E

CODE_02C8A1:
	JSL.l CODE_03AD74
	BCS.b CODE_02C8AA
	JMP.w CODE_02A31D+$01				; Glitch: This jumps to the middle of an instruction!

CODE_02C8AA:
	JSR.w CODE_02C92C
	LDA.w #$0010
	STA.l $7049C6
	DEC
	ASL
	TAX
CODE_02C8B7:
	LDA.w DATA_02C774,x
	STA.l $7049C7,x
	DEX
	DEX
	BPL.b CODE_02C8B7
	LDX.b #$3C
CODE_02C8C4:
	LDA.l DATA_5FE802,x
	STA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_02C8C4
	LDY.b #!REGISTER_BG1HorizScrollOffset
	STY.w HDMA[$03].Destination
	LDY.b #!REGISTER_BG1VertScrollOffset
	STY.w HDMA[$04].Destination
	SEP.b #$20
	LDX.b #$04
CODE_02C8E2:
	LDA.w DATA_02C760,x
	STA.w HDMA[$07].Parameters,x
	DEX
	BPL.b CODE_02C8E2
	LDA.b #$7E5388>>16
	STA.w HDMA[$07].IndirectSourceBank
	LDX.b #$06
CODE_02C8F2:
	LDA.w DATA_02C765,x
	STA.l $7E5D18,x
	DEX
	BPL.b CODE_02C8F2
	REP.b #$20
	LDX.b $12
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
	LDA.w #$0180
	STA.w $7AF8,x
	LDA.w #$0100
	STA.w $7AF6,x
	STA.w $7A36,x
	INC.w $0C1E
	STZ.w $0C23
	INC.w $0C20
	LDA.w #$070C
	STA.w $0C27
	JML.l CODE_0CDB4D

CODE_02C92C:
	LDY.w $7DF6
	BEQ.b CODE_02C943
CODE_02C931:
	PHY
	LDX.w $7DF6,y
	JSL.l CODE_03A32E
	PLY
	DEY
	DEY
	BNE.b CODE_02C931
	STZ.w $7DF6
	LDX.b $12
CODE_02C943:
	RTS

;---------------------------------------------------------------------------

DATA_02C944:
	dw $FFFF,$0001

DATA_02C948:
	dw $FFC0,$0040

DATA_02C94C:
	dw $FE00,$0200

YI_NorSpr045_PrinceFroggy_Main:
;$02C950
	JSR.w CODE_02CDFA
	JSL.l CODE_03AF23
	LDA.w $0CB0
	STA.w !RAM_YI_Global_Layer3YPosLo
	STA.w $60A0
	TXY
	LDA.b $18,x
	ASL
	TAX
	JSR.w (DATA_02CAF0,x)
	LDA.w #$FC00
	LDY.b $79,x
	BPL.b CODE_02C972
	LDA.w #$0400
CODE_02C972:
	LDY.b #$00
	CLC
	ADC.b $76,x
	BPL.b CODE_02C97B
	LDY.b #$02
CODE_02C97B:
	LDA.b $78,x
	PHA
	SEC
	SBC.w DATA_02C94C,y
	EOR.w DATA_02C948,y
	ASL
	PLA
	BCC.b CODE_02C98F
	CLC
	ADC.w DATA_02C948,y
	STA.b $78,x
CODE_02C98F:
	CLC
	ADC.b $76,x
	STA.b $76,x
	CLC
	ADC.w #$3000
	CMP.w #$6001
	BCC.b CODE_02C9AB
	LDA.b $76,x
	EOR.b $78,x
	BMI.b CODE_02C9AB
	LDA.b $78,x
	EOR.w #$FFFF
	INC
	STA.b $78,x
CODE_02C9AB:
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8AD0>>16
	LDA.w #FXCODE_0A8AD0
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $601A
	AND.w #$001E
	BEQ.b CODE_02CA03
	ASL
	AND.w $601A
	AND.w #$0014
	BEQ.b CODE_02C9E2
	CMP.w #$0014
	BEQ.b CODE_02CA00
CODE_02C9E2:
	EOR.w #$0014
	LDY.b #$00
	AND.w $601A
	BEQ.b CODE_02C9EE
	LDY.b #$02
CODE_02C9EE:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_02C944,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $60B4
	EOR.w DATA_02C944,y
	BPL.b CODE_02CA03
CODE_02CA00:
	STZ.w $60B4
CODE_02CA03:
	LDA.w $601A
	AND.w #$0001
	BEQ.b CODE_02CA67
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CMP.w $6EBE
	BMI.b CODE_02CA67
	LDA.w $60C0
	BEQ.b CODE_02CA1D
	LDA.w $60AA
	BMI.b CODE_02CA67
CODE_02CA1D:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	SEC
	SBC.w $6EBC
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0020
	SEC
	SBC.w $6EBE
	CMP.w #$0080
	BCC.b CODE_02CA3E
	LDA.w #$007F
CODE_02CA3E:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0060
	STA.w $6004
	LDX.b #FXCODE_0A8DC8>>16
	LDA.w #FXCODE_0A8DC8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState06
	BEQ.b CODE_02CA67
	INC.w $61B4
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $601C
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_02CA67:
	LDY.w $7D36,x
	DEY
	BPL.b CODE_02CA70
	JMP.w CODE_02CAEF

CODE_02CA70:
	LDA.w $6EBC
	SEC
	SBC.w $7CD6,y
	STA.b $0C
	ASL
	CLC
	ADC.b $0C
	STA.b $0C
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.b $0C
	STA.b $00
	LDA.w $6EBE
	SEC
	SBC.w $7CD8,y
	STA.b $0E
	ASL
	CLC
	ADC.b $0E
	STA.b $0E
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	EOR.b $0E
	ORA.b $00
	BPL.b CODE_02CAC4
	LDA.w $7542,y
	CMP.w #$0040
	BCC.b CODE_02CACA
	PHB
	TYX
	JSL.l CODE_03B078
	TXY
	PLB
	LDA.b $0C
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $0E
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_02CACA

CODE_02CAC4:
	LDA.w #$0040
	STA.w $7542,y
CODE_02CACA:
	LDA.w $7CD6,y
	SEC
	SBC.w $6EBC
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7CD8,y
	SEC
	SBC.w $6EBE
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0078
	STA.w $6004
	LDX.b #FXCODE_0A8DC8>>16
	LDA.w #FXCODE_0A8DC8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_02CAEF:
	RTL

DATA_02CAF0:
	dw CODE_02CAF6
	dw CODE_02CD2A
	dw CODE_02CDF4

CODE_02CAF6:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_02CB47
	LDA.b $10
	AND.w #$003C
	CLC
	ADC.w #$00C4
	CMP.w #$00D8
	BCC.b CODE_02CB0F
	CMP.w #$00F4
	BCC.b CODE_02CB47
CODE_02CB0F:
	PHA
	LDA.w $7A39,x
	AND.w #$00FF
	STA.b $00
	LSR
	LSR
	ADC.b $00
	LSR
	LSR
	EOR.w #$FFFF
	ADC.w #$0070
	STA.w $7AF6,x
	LDA.w #$013B
	JSL.l CODE_03A364
	PLA
	BCC.b CODE_02CB47
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	PHY
	JSR.w CODE_02D0D9
	PLY
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
CODE_02CB47:
	LDA.w $7AF8,x
	BNE.b CODE_02CBB0
	LDA.w #$0100
	STA.w $7AF8,x
	LDA.w #$002A
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$002C
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0002
	BCS.b CODE_02CBB0
	LDA.w #$0043
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0045
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	BNE.b CODE_02CBB0
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0043
	JSL.l CODE_03A34C
	BCC.b CODE_02CBB0
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0074
	STA.w $7182,y
CODE_02CBB0:
	LDA.w $7A96,x
	BEQ.b CODE_02CBF1
	LDA.w $7A98,x
	AND.w #$000F
	CMP.w #$0001
	BNE.b CODE_02CBC7
	LDA.w #!Define_YI_SoundID3F_HitUvula
	JSL.l CODE_0085D2
CODE_02CBC7:
	LDA.w $7A98,x
	AND.w #$0004
	BEQ.b CODE_02CBE6
	LDX.b #$3C
	LDA.w #$7FFF
CODE_02CBD4:
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_02CBD4
	LDX.b $12
	LDY.b #$05
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
CODE_02CBE3:
	JMP.w CODE_02CCD3

CODE_02CBE6:
	LDY.b #$45
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w $7A38,x
	JMP.w CODE_02CC88

CODE_02CBF1:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_02CBE3
	LDA.w $7D38,y
	BEQ.b CODE_02CBE3
	LDA.w $7C76,x
	EOR.w #$FFFF
	INC
	AND.w #$00FF
	XBA
	CMP.w #$FFFF
	BNE.b CODE_02CC0F
	INC
	BRA.b CODE_02CC13

CODE_02CC0F:
	CMP.w #$8000
	ROR
CODE_02CC13:
	STA.b $00
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	ASL
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BCC.b CODE_02CC21
	LDA.w #$0000
CODE_02CC21:
	CLC
	ADC.b $00
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	EOR.w $7C76,x
	ASL
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BCS.b CODE_02CC36
	EOR.w #$FFFF
	INC
CODE_02CC36:
	CLC
	ADC.b $00
	STA.b $78,x
	BPL.b CODE_02CC41
	EOR.w #$FFFF
	INC
CODE_02CC41:
	PHA
	ASL
	ASL
	ASL
	AND.w #$FF00
	XBA
	CMP.w #$0020
	BCS.b CODE_02CC51
	LDA.w #$0020
CODE_02CC51:
	STA.w $7A96,x
	LDA.w #$0020
	STA.w $7A98,x
	STA.w $61C8
	TYX
	JSL.l CODE_03B25B
	PLA
	ASL
	CLC
	ADC.w $7A38,x
	STA.w $7A38,x
	BCC.b CODE_02CC88
	INC.b $18,x
	LDA.w #$0140
	STA.w $7A96,x
	STZ.w $7A38,x
	LDA.w #$0800
	STA.w $61C8
	JSL.l CODE_028925
	JSL.l CODE_02A982
	BRA.b CODE_02CCD3

CODE_02CC88:
	AND.w #$FF00
	XBA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #DATA_5FD94C
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FD94C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0007
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #DATA_5FE8B0
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FE8B0>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0061
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_02CCD3:
	LDA.w #DATA_02C774>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $14
	AND.w #$0008
	TAY
	BEQ.b CODE_02CCF4
	LDY.b #$02
	LDA.w $7A96,x
	BEQ.b CODE_02CCF4
	LDA.b $14
	AND.w #$0010
	LSR
	LSR
	LSR
	ADC.w #$0004
	TAY
CODE_02CCF4:
	LDA.w DATA_02C76C,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_0A8D8B>>16
	LDA.w #FXCODE_0A8D8B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

DATA_02CD06:
	dw $0002,$0000,$FFFE,$0000,$0002,$0000,$FFFE,$0000

DATA_02CD16:
	dw $FFFF,$0001

DATA_02CD1A:
	dw $48EC,$492A,$4968,$49A6

DATA_02CD22:
	dw $3958,$3966,$3974,$3982

CODE_02CD2A:
	TYX
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BEQ.b CODE_02CD47
	BMI.b CODE_02CD3D
	LDY.b #$02
CODE_02CD3D:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_02CD16,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_02CD47:
	PHB
	LDA.b $14
	AND.w #$000C
	LSR
	TAY
	REP.b #$10
	LDX.w DATA_02CD22,y
	PHX
	LDX.w DATA_02CD1A,y
	PEA.w $702002>>8
	PLB
	PLB
	LDY.w #$003C
CODE_02CD60:
	LDA.l DATA_5FA000,x
	STA.w $7020C2,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_02CD60
	PLX
	LDY.w #$000C
CODE_02CD71:
	LDA.l DATA_5FA000,x
	STA.w $702002,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_02CD71
	PLB
	SEP.b #$10
	LDA.w #DATA_02C7B4>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $14
	AND.w #$0008
	TAY
	BEQ.b CODE_02CD91
	LDY.b #$02
CODE_02CD91:
	LDA.w DATA_02C770,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_0A8D8B>>16
	LDA.w #FXCODE_0A8D8B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_02CDB1
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	INC.b $18,x
	RTS

CODE_02CDB1:
	CMP.w #$0028
	BNE.b CODE_02CDDB
	LDA.w #$8006
CODE_02CDB9:
	STA.w $6106
	LDA.w #!Define_YI_PlayerState06
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $6108
	STZ.w $610A
	STZ.w $61F6
	LDA.w #$0001
	STA.w $610C
	STZ.w $60A8
	STZ.w $60AA
	STZ.w $60DE
	RTS

CODE_02CDDB:
	BCS.b CODE_02CDE1
	LSR.w $6108
	RTS

CODE_02CDE1:
	AND.w #$003F
	BNE.b CODE_02CDF3
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
CODE_02CDF3:
	RTS

CODE_02CDF4:
	TYX
	RTS

DATA_02CDF6:
	dw $0004,$0006

CODE_02CDFA:
	LDA.w $7680,x
	STA.w $6040
	LDA.w $7682,x
	STA.w $6042
	LDX.b #FXCODE_08E4BD>>16
	LDA.w #FXCODE_08E4BD
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$36BA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $14
	LDY.w $7A96,x
	BEQ.b CODE_02CE23
	ASL
	ASL
	ASL
	LDY.b #$02
CODE_02CE23:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w DATA_02CDF6,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	ASL
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.b $14
	EOR.w #$FFFF
	LSR
	LSR
	LSR
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_0A8F10>>16
	LDA.w #FXCODE_0A8F10
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0690
	LDX.b #FXCODE_0A8C48>>16
	LDA.w #FXCODE_0A8C48
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0098
	TSB.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	JSL.l CODE_03AA52
	REP.b #$10
	LDY.w $7362,x
	LDA.l $704582
	SEC
	SBC.w #$0005
	STA.b $00
	CLC
	ADC.w $6020,y
	STA.w $6020,y
	LDA.l $704584
	STA.b $02
	CLC
	ADC.w $6022,y
	STA.w $6022,y
	LDA.w $6028,y
	CLC
	ADC.b $00
	STA.w $6028,y
	LDA.w $602A,y
	CLC
	ADC.b $02
	STA.w $602A,y
	LDX.b $12
	LDA.b $77,x
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	ASL
	ASL
	ASL
	AND.w #$FF00
	BPL.b CODE_02CECA
	ORA.w #$00FF
CODE_02CECA:
	XBA
	EOR.w #$FFFF
	SEC
	ADC.b $00
	STA.b $00
	LDA.l DATA_00E954,x
	ASL
	ASL
	ASL
	ASL
	AND.w #$FF00
	BPL.b CODE_02CEE3
	ORA.w #$00FF
CODE_02CEE3:
	XBA
	CLC
	ADC.b $02
	STA.b $02
	LDX.w #$0004
CODE_02CEEC:
	LDA.w $6000,y
	CLC
	ADC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $02
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_02CEEC
	SEP.b #$10
	LDX.b $12
	LDA.b $00
	CLC
	ADC.w #$0008
	STA.w $7B56,x
	LDA.b $02
	CLC
	ADC.w #$0004
	STA.w $7B58,x
	LDA.b $76,x
	CMP.w $7A36,x
	BEQ.b CODE_02CF6D
	STA.w $7A36,x
	LDY.b #$00
	AND.w #$FF00
	BMI.b CODE_02CF33
	EOR.w #$FF00
	LDY.b #$02
CODE_02CF33:
	XBA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	TYA
	STA.w $7400,x
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6041
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6041)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_02CF6D:
	RTS

;---------------------------------------------------------------------------

DATA_02CF6E:
	dw $FFA0,$0060

YI_NorSpr042_RedGiantShyguy_Init:
YI_NorSpr043_GreenGiantShyguy_Init:
CODE_02CF72:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_02CF8F
	LDA.w $6FA0,x
	AND.w #$F9FF
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w #$0100
	STA.w $75E2,x
CODE_02CF8F:
	LDA.b $10
	AND.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_02CF6E,y
	STA.w $75E0,x
	RTL

;---------------------------------------------------------------------------

DATA_02CF9F:
	db $00,$01,$02,$03,$04,$03,$02

YI_NorSpr043_RedGiantShyguy_Main:
YI_NorSpr044_GreenGiantShyguy_Main:
;$02CFA6
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_02CFC9
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w $6FA0,x
	ORA.w #$0600
	STA.w $6FA0,x
	LDA.w $6FA2,x
	ORA.w #$0017
	STA.w $6FA2,x
CODE_02CFC9:
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_02CFED
	INC.b $76,x
	LDA.b $76,x
	CMP.w #$0028
	BCC.b CODE_02D03C
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0300
	STA.w $75E2,x
	LDA.w $6FA2,x
	ORA.w #$0017
	STA.w $6FA2,x
CODE_02CFED:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02D02D
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w $6FA0,x
	ORA.w #$0600
	STA.w $6FA0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_02D011
	EOR.w #$FFFF
	INC
CODE_02D011:
	LSR
	LSR
	ADC.b $16,x
	CMP.w #$0700
	BCC.b CODE_02D01D
	SBC.w #$0700
CODE_02D01D:
	STA.b $16,x
	XBA
	TAY
	LDA.w DATA_02CF9F,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0020
CODE_02D02D:
	STA.w $7540,x
	LDA.w $75E2,x
	CMP.w #$0400
	BNE.b CODE_02D03C
	JSL.l CODE_03A5B7
CODE_02D03C:
	RTL

;---------------------------------------------------------------------------

CODE_02D03D:
	RTL

;---------------------------------------------------------------------------

CODE_02D03E:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr13B_StomachAcid_Init:
;$02D03F
	RTL

;---------------------------------------------------------------------------

YI_NorSpr13B_StomachAcid_Main:
;$02D040
	JSL.l CODE_03AF23
	LDA.w $75E2,x
	BEQ.b CODE_02D04C
	JMP.w CODE_02D09D

CODE_02D04C:
	TXY
	JSR.w CODE_02D0D9
	LDA.b $00
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0008
	CMP.w #$0011
	BCS.b CODE_02D087
	LDA.b $02
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$0008
	CMP.w #$0011
	BCS.b CODE_02D087
	LDA.b $02
	STA.w $7182,x
	LDA.b $00
	STA.w $70E2,x
	LDA.w #$0006
	STA.w $74A2,x
	INC.b $78,x
	LDA.b $78,x
	CMP.w #$0010
	BCC.b CODE_02D09C
CODE_02D087:
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w $75E2,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	INC.w $7402,x
CODE_02D09C:
	RTL

CODE_02D09D:
	LDY.w $7D36,x
	BEQ.b CODE_02D0A8
	JSL.l CODE_03A858
	BRA.b CODE_02D0AE

CODE_02D0A8:
	LDA.w $7860,x
	LSR
	BCC.b CODE_02D0D8
CODE_02D0AE:
	LDA.w #!Define_YI_SoundID45_SpitSeed
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr221
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0007
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	JML.l CODE_03A31E

CODE_02D0D8:
	RTL

;---------------------------------------------------------------------------

CODE_02D0D9:
	REP.b #$10
	LDX.b $76,y
	LDA.l $70449E,x
	SEC
	SBC.w #$0008
	LDX.b $18,y
	CLC
	ADC.w $70E2,x
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LSR
	LDX.b $76,y
	CLC
	ADC.l $7044A0,x
	SEC
	SBC.w #$000C
	LDX.b $18,y
	CLC
	ADC.w $7182,x
	STA.b $02
	SEP.b #$10
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_02D109:
	dw $3898,$3898,$28A3,$18A7,$08AA,$F8AC,$E8AD,$D8B0
	dw $C8B2,$B8B8,$A0C8,$95E6,$A41C,$0C40,$3870,$3870

DATA_02D129:
	dw $3800,$38F8,$3898,$3898,$28A3,$18A9,$D8B0,$C8B2
	dw $B8B8,$A0C8,$95E6,$A41C,$0C40,$3870,$3870,$3808

YI_NorSpr0D7_SluggyTheUnshaven_Init:
;$02D149
	JSL.l CODE_03AEEB
	LDY.b #$3C
	JSL.l CODE_0CE5D6
	LDA.w #$0010
	STA.l $7049C6
	DEC
	ASL
	TAX
CODE_02D15D:
	LDA.w DATA_02D109,x
	STA.l $7049C7,x
	DEX
	DEX
	BPL.b CODE_02D15D
	LDX.b #$3C
CODE_02D16A:
	LDA.l DATA_5FE54E,x
	STA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_02D16A
	LDX.b $12
	STZ.w $7B56,x
	STZ.w $7B58,x
	LDA.w #$000B
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

DATA_02D189:
	dw $FF60,$FF5C,$FF58,$FF54

DATA_02D191:
	dw $FF00,$0100

YI_NorSpr0D7_SluggyTheUnshaven_Main:
;$02D195
	JSR.w CODE_02D7D6
	JSL.l CODE_03AF23
	TXY
	LDA.b $18,x
	ASL
	TAX
	JSR.w (DATA_02D2F4,x)
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $601A
	BEQ.b CODE_02D1DF
	DEC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $093A
	CLC
	ADC.w #$0100
	STA.w $093A
	LDA.w $60B4
	BMI.b CODE_02D1DF
	STZ.w $60B4
CODE_02D1DF:
	LDA.w $6014
	BEQ.b CODE_02D1F6
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	CLC
	ADC.w #$FF80
	CMP.w #$FF00
	BPL.b CODE_02D1F3
	LDA.w #$FF00
CODE_02D1F3:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_02D1F6:
	LDA.b $18,x
	CMP.w #$0003
	BCS.b CODE_02D210
	LDY.w $7D36,x
	DEY
	BMI.b CODE_02D210
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_02D210
	LDA.w $7D38,y
	BNE.b CODE_02D213
CODE_02D210:
	JMP.w CODE_02D2F3

CODE_02D213:
	LDA.w $7A38,x
	ASL
	TAX
	LDA.w DATA_02D189,x
	LDX.b $12
	CLC
	ADC.w $70E2,x
	SEC
	SBC.w $7CD6,y
	ASL
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BPL.b CODE_02D235
	LDA.w #$0040
	STA.w $7542,y
CODE_02D235:
	LDX.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_02D252
	BPL.b CODE_02D240
	LDX.b #$02
CODE_02D240:
	CLC
	ADC.w DATA_02D191,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	EOR.w DATA_02D191,x
	BMI.b CODE_02D252
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_02D252:
	LDX.b $12
	LDA.w $7CD6,y
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0004
	STA.b $00
	LDA.l $7049CA
	AND.w #$00FF
	CLC
	ADC.w $7182,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_02D275
	LDA.w #$0000
CODE_02D275:
	TAY
	AND.w #$00F0
	LSR
	LSR
	LSR
	TAX
	BEQ.b CODE_02D2B5
	PHX
	TYA
	AND.w #$000F
	ASL
	EOR.w #$FFFF
	SEC
	ADC.b $00
	STA.b $02
CODE_02D28D:
	LDA.l $7049C8,x
	AND.w #$FF00
	BPL.b CODE_02D299
	ORA.w #$00FF
CODE_02D299:
	XBA
	CMP.b $02
	BPL.b CODE_02D2A8
	SEP.b #$20
	LDA.b $02
	STA.l $7049C9,x
	REP.b #$20
CODE_02D2A8:
	LDA.b $02
	SEC
	SBC.w #$0020
	STA.b $02
	DEX
	DEX
	BNE.b CODE_02D28D
	PLX
CODE_02D2B5:
	INX
	INX
	TYA
	EOR.w #$000F
	INC
	AND.w #$000F
	ASL
	EOR.w #$FFFF
	SEC
	ADC.b $00
	STA.b $02
CODE_02D2C8:
	LDA.l $7049C8,x
	AND.w #$FF00
	BPL.b CODE_02D2D4
	ORA.w #$00FF
CODE_02D2D4:
	XBA
	CMP.b $02
	BPL.b CODE_02D2E3
	SEP.b #$20
	LDA.b $02
	STA.l $7049C9,x
	REP.b #$20
CODE_02D2E3:
	LDA.b $02
	SEC
	SBC.w #$0020
	STA.b $02
	INX
	INX
	CPX.b #$12
	BCC.b CODE_02D2C8
	LDX.b $12
CODE_02D2F3:
	RTL

DATA_02D2F4:
	dw CODE_02D30C
	dw CODE_02D439
	dw CODE_02D4D7
	dw CODE_02D614
	dw CODE_02D6CE

DATA_02D2FE:
	db $0B,$0C,$0D,$0C

DATA_02D302:
	db $0D,$0C,$0B,$0C,$0D

DATA_02D307:
	db $20,$04,$04,$01,$01

CODE_02D30C:
	TYX
	LDA.w $6FA2,x
	AND.w #$001F
	BNE.b CODE_02D38B
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState02_InCutscene
	BEQ.b CODE_02D35A
	LDA.w $7C16,x
	CMP.w #$0070
	BPL.b CODE_02D346
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #$0080
	STA.w $7A96,x
	LDA.w #$0048
	JSL.l CODE_03A34C
	BCC.b CODE_02D346
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
CODE_02D346:
	LDA.b $14
	AND.w #$0018
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_02D2FE,y
	AND.w #$00FF
	STA.w $7402,x
	PLA
	RTL

CODE_02D35A:
	LDA.w $7A96,x
	BEQ.b CODE_02D368
	LSR
	BNE.b CODE_02D346
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_02D368:
	LDA.b $14
	AND.w #$0003
	BNE.b CODE_02D389
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0010
	BCC.b CODE_02D389
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w #$0040
	STA.w $7542,x
CODE_02D389:
	PLA
	RTL

CODE_02D38B:
	LDA.w $7860,x
	LSR
	BCC.b CODE_02D389
	LDA.w $7542,x
	BEQ.b CODE_02D3B1
	LDA.w #!Define_YI_SoundID60_Splash2
	JSL.l CODE_0085D2
	STZ.w $7542,x
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	LDA.w #$0005
	STA.b $76,x
	STZ.w $7A96,x
CODE_02D3B1:
	LDA.w $7A96,x
	BNE.b CODE_02D433
	LDA.b $76,x
	BNE.b CODE_02D41D
	LDA.w $1015
	BNE.b CODE_02D3C2
	INC.w $1015
CODE_02D3C2:
	BPL.b CODE_02D433
	STZ.w $1015
	LDA.w #!Define_YI_SoundID87_CastleAboutToExplode
	JSL.l CODE_0085D2
	INC.b $18,x
	STZ.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w #$000F
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$FE80
	STA.w $75E0,x
	LDA.w $7042,x
	AND.w #$FF3F
	STA.w $7042,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w $7040,x
	CLC
	ADC.w #$E000
	STA.w $7040,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	STZ.w $7180,x
	REP.b #$20
	LDA.w #$0018
	STA.b $76,x
	JSR.w CODE_02D44C
	LDA.w $70E2,x
	CLC
	ADC.w #$000A
	STA.w $70E2,x
	PLA
	RTL

CODE_02D41D:
	DEC.b $76,x
	LDY.b $76,x
	LDA.w DATA_02D302,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_02D307,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_02D433:
	PLA
	RTL

DATA_02D435:
	db $80,$64,$48,$2C

CODE_02D439:
	TYX
	LDA.b $76,x
	CMP.w #$0100
	BCS.b CODE_02D47A
	ADC.w #$0001
	CMP.w #$0100
	BCC.b CODE_02D44C
	LDA.w #$0100
CODE_02D44C:
	STA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #DATA_02D109>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_02D109
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_0A8F57>>16
	LDA.w #FXCODE_0A8F57
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.l $7049C8
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,x
	RTS

CODE_02D47A:
	INC.b $18,x
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_02D47F:
	STZ.b $78,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.w $7A38,x
	LDA.w DATA_02D435,y
	AND.w #$00FF
	STA.w $7A96,x
	LDX.b #$1E
	LDA.w #$0000
CODE_02D498:
	STA.l $704C96,x
	DEX
	DEX
	BPL.b CODE_02D498
	LDX.b $12
	RTS

DATA_02D4A3:
	dw $0020,$0000

DATA_02D4A7:
	dw $0004,$FFFE

DATA_02D4AB:
	dw $0040,$0000

DATA_02D4AF:
	dw $0006,$000A,$000E,$0012

DATA_02D4B7:
	dw $0200,$01C0,$0180,$0140

DATA_02D4BF:
	dw $00C0,$00D0,$00E0,$00F0

DATA_02D4C7:
	dw $0060,$0068,$0070,$0078

DATA_02D4CF:
	dw $0040,$0030,$0020,$0010

CODE_02D4D7:
	TYX
	LDA.w $7A96,x
	BEQ.b CODE_02D4E9
	LSR
	BNE.b CODE_02D536
	LDA.w #!Define_YI_SoundID3E_Tongue
	JSL.l CODE_0085D2
	BRA.b CODE_02D536

CODE_02D4E9:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CMP.w #$00C5
	BMI.b CODE_02D4FC
	LDA.w DATA_02D4A3,y
	STA.w $7540,x
	BNE.b CODE_02D502
CODE_02D4FC:
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02D502:
	LDA.b $78,x
	CLC
	ADC.w DATA_02D4A7,y
	STA.b $78,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w DATA_02D4AB,y
	BNE.b CODE_02D51B
	TYA
	EOR.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_02D528
CODE_02D51B:
	LDX.b #FXCODE_0A8FE2>>16
	LDA.w #FXCODE_0A8FE2
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	BRA.b CODE_02D536

CODE_02D528:
	LDX.b #FXCODE_0A8FE2>>16
	LDA.w #FXCODE_0A8FE2
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSR.w CODE_02D47F
CODE_02D536:
	LDA.w $7A98,x
	BNE.b CODE_02D542
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_02D54D
CODE_02D542:
	LDX.b #FXCODE_0A8FBB>>16
	LDA.w #FXCODE_0A8FBB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_02D54D:
	LDA.w $7A38,x
	ASL
	TAY
	LDA.b $16,x
	SEC
	SBC.w DATA_02D4AF,y
	BPL.b CODE_02D566
	PHY
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	PLY
	LDA.w DATA_02D4B7,y
CODE_02D566:
	STA.b $16,x
	CMP.w DATA_02D4BF,y
	BCC.b CODE_02D570
	LDA.w DATA_02D4BF,y
CODE_02D570:
	CMP.w DATA_02D4C7,y
	BCS.b CODE_02D57A
	LDA.w DATA_02D4BF,y
	SBC.b $16,x
CODE_02D57A:
	CLC
	ADC.w DATA_02D4CF,y
	JSR.w CODE_02D69A
	LDA.w $7A98,x
	BEQ.b CODE_02D58E
	CMP.w #$0040
	BCC.b CODE_02D5ED
	JMP.w CODE_02D5EE

CODE_02D58E:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_02D5ED
	LDA.w $7680,x
	CLC
	ADC.w #$0080
	CMP.w #$0201
	BCS.b CODE_02D5ED
	LDA.w $7D38,y
	BEQ.b CODE_02D5ED
	TYX
	JSL.l CODE_03B25B
	LDA.w #!Define_YI_SoundID78_HurtBoss
	JSL.l CODE_0085D2
	INC.w $7A38,x
	LDA.w $7A38,x
	CMP.w #$0004
	BCC.b CODE_02D5E7
	INC.b $18,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.b $78,x
	LDA.w #$0080
	STA.w $7A96,x
	JSL.l CODE_02A982
	LDA.l $7049C6
	DEC
	ASL
	TAX
CODE_02D5DA:
	LDA.w DATA_02D109,x
	STA.l $704C76,x
	DEX
	DEX
	BPL.b CODE_02D5DA
	LDX.b $12
CODE_02D5E7:
	LDA.w #$0060
	STA.w $7A98,x
CODE_02D5ED:
	RTS

CODE_02D5EE:
	AND.w #$0004
	BEQ.b CODE_02D603
	LDX.b #$3C
	LDA.w #$7FFF
CODE_02D5F8:
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_02D5F8
	LDX.b $12
	RTS

CODE_02D603:
	LDX.b #$3C
CODE_02D605:
	LDA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_02D605
	LDX.b $12
	RTS

CODE_02D614:
	TYX
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w $7A96,x
	BEQ.b CODE_02D640
	LSR
	BNE.b CODE_02D62A
	LDA.w #!Define_YI_SoundID15_Growth
	JSL.l CODE_0085D2
CODE_02D62A:
	LDA.w $7A96,x
	JSR.w CODE_02D5EE
	LDX.b #FXCODE_0A8FBB>>16
	LDA.w #FXCODE_0A8FBB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $78,x
	JMP.w CODE_02D69A

CODE_02D640:
	LDA.b $78,x
	SEC
	SBC.w #$0004
	CMP.w #$0010
	BCS.b CODE_02D698
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	INC.b $18,x
	LDA.w #$FFFF
	STA.w $7A38,x
	LDA.w $7040,x
	SEC
	SBC.w #$2000
	STA.w $7040,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #!Define_YI_AmbSpr1C0
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w $6000
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
	LDA.w #$0010
CODE_02D698:
	STA.b $78,x
CODE_02D69A:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_560000+$60C1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$60C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

CODE_02D6CE:
	TYX
	LDA.w $7A96,x
	BEQ.b CODE_02D709
	LDA.w $7A96,x
	LSR
	BNE.b CODE_02D708
	LDA.w #!Define_YI_SoundID82_BossFalling
	JSL.l CODE_0085D2
	LDA.w #$1000
	STA.b $78,x
	STZ.w $75E0,x
	LDA.w #$0100
	STA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #DATA_02D129>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_02D129
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_0A8F57>>16
	LDA.w #FXCODE_0A8F57
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_02D708:
	RTS

CODE_02D709:
	LDA.b $78,x
	BEQ.b CODE_02D756
	CMP.w #$0100
	LDA.w #$FFF8
	BCC.b CODE_02D720
	LDA.w $75E0,x
	CMP.w #$FFD0
	BMI.b CODE_02D720
	DEC.w $75E0,x
CODE_02D720:
	CLC
	ADC.b $78,x
	BPL.b CODE_02D728
	LDA.w #$0000
CODE_02D728:
	STA.b $78,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LSR
	LSR
	LSR
	LSR
	STA.b $76,x
	CMP.w #$0020
	BCS.b CODE_02D73E
	LDA.w #$00FF
	STA.w $74A2,x
CODE_02D73E:
	LDA.w #DATA_02D129>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_02D129
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_0A90FF>>16
	LDA.w #FXCODE_0A90FF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_02D756:
	LDA.w $7682,x
	CMP.w #$00E0
	BPL.b CODE_02D765
	LDA.w #$0200
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_02D765:
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSL.l CODE_02E19C
	JSL.l CODE_03A32E
	STZ.w !RAM_YI_Global_SubScreenLayers
	LDA.w #$0018
	TRB.w !RAM_YI_Global_HDMAEnable
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_02D782:
	dw $0008,$0008,$0008,$0008,$0010,$0006,$0010

DATA_02D790:
	dw $0008,$000F,$000F,$0008,$001F,$001C,$0010

DATA_02D79E:
	dw FXDATA_560000+$6081,FXDATA_560000+$7081,FXDATA_560000+$6091,FXDATA_560000+$7091,FXDATA_560000+$60A1,FXDATA_560000+$60E1,FXDATA_560000+$60C1

DATA_02D7AC:
	dw $0000,$0000,$0010,$0010,$0020,$0060,$0040

DATA_02D7BA:
	dw $0000,$0010,$0000,$0010,$0000,$0000,$0000

DATA_02D7C8:
	dw FXCODE_088619,FXCODE_088619,FXCODE_088619,FXCODE_088619,FXCODE_088293,FXCODE_088293,FXCODE_088293

CODE_02D7D6:
	LDA.b $18,x
	BNE.b CODE_02D7DD
	JMP.w CODE_02D863

CODE_02D7DD:
	LDA.w $7680,x
	STA.w $6040
	LDA.w $7682,x
	STA.w $6042
	LDX.b #FXCODE_08E4BD>>16
	LDA.w #FXCODE_08E4BD
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	LDA.w #$0215
	STA.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$75
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w #$0018
	TSB.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	LDA.w $7362,x
	BPL.b CODE_02D817
	RTS

CODE_02D817:
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l $7049DE
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l $7049C8
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.l $7049C8
	SEC
	SBC.l $7049CA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	STA.w $6000
	LDA.b $76,x
	STA.w $6002
	LDX.b #FXCODE_0A9039>>16
	LDA.w #FXCODE_0A9039
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $6000
	CLC
	ADC.w #$0010
	STA.w $7B56,x
CODE_02D863:
	LDA.b $76,x
	CMP.w $7A36,x
	BEQ.b CODE_02D8C7
	STA.w $7A36,x
	CMP.w #$0020
	BCS.b CODE_02D875
	LDA.w #$0020
CODE_02D875:
	STA.b $00
	LDY.b #$0C
	LDA.w $7A38,x
	BPL.b CODE_02D880
	DEY
	DEY
CODE_02D880:
	LDA.w $0030
	LSR
	BCC.b CODE_02D888
	DEY
	DEY
CODE_02D888:
	LDA.w DATA_02D782,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w DATA_02D790,y
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w DATA_02D79E,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6081)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w DATA_02D7BA,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w DATA_02D7AC,y
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_088619>>16
	LDA.w DATA_02D7C8,y
	PHY
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_02D888
	INC.w $0CF9
	LDX.b $12
CODE_02D8C7:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr042_VerticalPipeEntrance_Init:
YI_NorSpr0D1_SecretPipeEntrance_Init:
;$02D8C8
	LDA.w $70E2,x
	ORA.w #$0008
	STA.w $70E2,x
	LDA.w #$0001
	STA.w $7BB6,x
	STA.w $7BB8,x
	STZ.w $7B58,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0D1_SecretPipeEntrance_Main:
;$02D8DE
	LDY.b #$02
	JSL.l CODE_02D985
	BCS.b CODE_02D8E7
	RTL

YI_NorSpr042_VerticalPipeEntrance_Main:
CODE_02D8E7:
	JSL.l CODE_03AF23
	JSR.w CODE_02D908
	BCC.b CODE_02D907
	LDA.w $0036
	AND.w #$0004
	BEQ.b CODE_02D907
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	JSR.w CODE_02CDB9
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $610E
CODE_02D907:
	RTL

CODE_02D908:
	LDY.w $7D36,x
	BPL.b CODE_02D91C
	LDA.w $61B2
	BPL.b CODE_02D91C
	LDA.w $60C0
	ORA.w $6150
	BNE.b CODE_02D91C
	SEC
	RTS

CODE_02D91C:
	CLC
	RTS

;---------------------------------------------------------------------------

DATA_02D91E:
	dw $0008,$FFF8

YI_NorSpr147_HorizontalEntranceToLeft_Init:
;$02D922
	INC.b $18,x
	INC.b $18,x
YI_NorSpr0D0_HorizontalEntranceToRight_Init:
	LDY.b $18,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_02D91E,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.b $18,x
	LDY.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_02D954
	EOR.w #$0002
CODE_02D954:
	STA.w $7400,x
	RTL

;---------------------------------------------------------------------------

DATA_02D958:
	dw $0001,$0002

YI_NorSpr0D0_HorizontalEntranceToRight_Main:
YI_NorSpr147_HorizontalEntranceToLeft_Main:
;$02D95C
	JSL.l CODE_03AF23
	JSR.w CODE_02D908
	BCC.b CODE_02D984
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_02D984
	TAY
	LDA.w $0036
	AND.w DATA_02D958,y
	BEQ.b CODE_02D984
	TYA
	CLC
	ADC.w #$8002
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	JSR.w CODE_02CDB9
CODE_02D984:
	RTL

;---------------------------------------------------------------------------

CODE_02D985:
	LDA.w $7E08
	AND.w #$0008
	BEQ.b CODE_02D9B6
	LDA.w $0030
	AND.w #$0018
	BEQ.b CODE_02D9B4
CODE_02D995:
	TYA
	PHA
	LDA.w #!Define_YI_AmbSpr224
	JSL.l CODE_008B21
	PLA
	STA.w $73C2,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0001
	STA.w $7782,y
CODE_02D9B4:
	SEC
	RTL

CODE_02D9B6:
	CLC
	RTL

;---------------------------------------------------------------------------

YI_NorSpr014_KeyFromBoss_Init:
;$02D9B8
	LDA.w $61B2
	BPL.b CODE_02D9C3
	JSL.l CODE_03AD74
	BCS.b CODE_02D9C6
CODE_02D9C3:
	JMP.w CODE_02AC7B

CODE_02D9C6:
	JSL.l CODE_04F74A
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w $60C4
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0028
	STA.w $7182,x
	LDA.w #$0002
	STA.w $74A2,x
	LDA.w #$0020
	STA.b $76,x
	JSR.w CODE_02DB37
	JSL.l CODE_02A4F4
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	LDA.w !RAM_YI_Global_Layer1YPosLo
	STA.w $0C27
	LDA.w #$0001
	STA.w $0C1E
	STA.w $0C20
	RTL

;---------------------------------------------------------------------------

YI_NorSpr014_KeyFromBoss_Main:
;$02DA0E
	JSL.l CODE_03AA52
	TXY
	LDA.b $18,x
	ASL
	TAX
	JSR.w (DATA_02DA1B,x)
	RTL

DATA_02DA1B:
	dw CODE_02DAC9
	dw CODE_02DB02
	dw CODE_02DB7E
	dw CODE_02DDAD
	dw CODE_02DEDD

DATA_02DA25:
	dw $0004,$0004,$0004,$0024,$0014,$0014,$0004,$0005
	dw $00C0,$0020,$0040,$0004,$0034,$0004,$0004,$0004
	dw $0001

DATA_02DA47:
	dw $0125,$0126,$0127,$0128,$0129,$012A,$012B,$012C
	dw $012C,$012C,$012C,$012D,$012E,$012F,$0130,$0000
	dw $0000

DATA_02DA69:
	dw $002B,$002C,$002D,$002E,$002F,$0030,$0031,$0031
	dw $0031,$0031,$0031,$0032,$0032,$0033,$0034,$000D
	dw $000D

CODE_02DA8B:
	JSL.l CODE_06C9D7
	LDA.w $7A98,x
	BNE.b CODE_02DAB9
	LDA.b $78,x
	INC.b $78,x
	ASL
	TAY
	CPY.b #$18
	BNE.b CODE_02DAA7
	PHY
	LDA.w #!Define_YI_SoundID43_MountYoshi
	JSL.l CODE_0085D2
	PLY
CODE_02DAA7:
	LDA.w DATA_02DA25,y
	STA.w $7A98,x
	LDA.w DATA_02DA47,y
	STA.w $60BE
	LDA.w DATA_02DA69,y
	STA.w $7402
CODE_02DAB9:
	RTS

CODE_02DABA:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_02DAC8
	LDA.w #$1010
	JSL.l CODE_029BD9
CODE_02DAC8:
	RTL

CODE_02DAC9:
	TYX
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$09
	BNE.b CODE_02DADF
	LDA.w $0C27
	CMP.w #$0080
	BMI.b CODE_02DADF
	DEC.w $0C27
	DEC.w $60A0
CODE_02DADF:
	LDY.b $78,x
	CPY.b #$04
	BCS.b CODE_02DAE8
	JSR.w CODE_02DA8B
CODE_02DAE8:
	LDA.b $76,x
	CLC
	ADC.w #$0002
	CMP.w #$0100
	BCC.b CODE_02DAFE
	INC.b $18,x
	LDA.w #$0001
	STA.w $7542,x
	LDA.w #$0100
CODE_02DAFE:
	STA.b $76,x
	BRA.b CODE_02DB37

CODE_02DB02:
	TYX
	JSL.l CODE_02DABA
	LDY.b $78,x
	CPY.b #$05
	BCS.b CODE_02DB10
	JSR.w CODE_02DA8B
CODE_02DB10:
	LDA.w $7C18,x
	SEC
	SBC.w #$FFE4
	BMI.b CODE_02DB37
	INC.b $18,x
	EOR.w #$FFFF
	SEC
	ADC.w $7182,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$00E0
	STA.w $7A38,x
CODE_02DB37:
	LDA.b $14
	ASL
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_548000+$40E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$40E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

DATA_02DB72:
	dw $0010

DATA_02DB74:
	dw $FFF0,$0010

DATA_02DB78:
	dw $0120

DATA_02DB7A:
	dw $FFE0,$00F0

CODE_02DB7E:
	TYX
	JSL.l CODE_02DABA
	JSR.w CODE_02DA8B
	LDY.b $78,x
	CPY.b #$08
	BNE.b CODE_02DB92
	DEC.w $70E2,x
	DEC.w $7182,x
CODE_02DB92:
	LDY.b $78,x
	CPY.b #$0A
	BCC.b CODE_02DC03
	INC.b $18,x
	LDA.w #$0006
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #$00FF
	STA.w $74A2,x
	STZ.b $76,x
	LDY.b #$02
	STY.w $011C
	STZ.w !RAM_YI_Level_LevelHeaderAnimationTilesetLo
	STZ.w !RAM_YI_Level_LevelHeaderAnimationPaletteLo
	LDY.b #$0F
	STY.w !RAM_YI_Level_LevelHeaderBGScrollSettingLo
	STZ.w !RAM_YI_Level_LevelHeaderLevelModeLo
	LDA.w #$1014
	STA.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$69
	STY.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDY.b #$02
	STY.w !RAM_YI_Global_BG3And4TileDataDesignation
	LDY.b #$34
	STY.w !RAM_YI_Global_BG3AddressAndSize
	STZ.w $0948
	LDA.w #!Define_YI_SoundID64_UnlockDoor
	JSL.l CODE_0085D2
	JSL.l CODE_02A4F4
	REP.b #$10
	LDA.w #$00B0
	JSL.l CODE_00B753
	SEP.b #$10
	LDA.w #$B400
	STA.w $0CF9
	LDX.b #$24
CODE_02DBF1:
	LDA.l DATA_5FFA5E,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	STA.l $702D6E,x
	DEX
	DEX
	BPL.b CODE_02DBF1
	LDX.b $12
CODE_02DC03:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_02DC0B
	JMP.w CODE_02DCDE

CODE_02DC0B:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	TAY
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7A36,x
	SEC
	SBC.w DATA_02DB78,y
	EOR.w DATA_02DB72,y
	STA.b $00
	BMI.b CODE_02DC3B
	LDA.w $7A38,x
	SEC
	SBC.w #$002C
	STA.w $7A38,x
	TYA
	EOR.w #$0002
	TAY
CODE_02DC3B:
	LDA.w $7A38,x
	SEC
	SBC.w DATA_02DB7A,y
	EOR.w DATA_02DB74,y
	STA.b $02
	BMI.b CODE_02DC58
	LDA.w $7A36,x
	SEC
	SBC.w #$002C
	STA.w $7A36,x
	TYA
	EOR.w #$0002
	TAY
CODE_02DC58:
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_02DB72,y
	STA.w $7A36,x
CODE_02DC64:
	LDA.w $7A38,x
	CLC
	ADC.w DATA_02DB74,y
	STA.w $7A38,x
	LDA.b $00
	EOR.b $02
	BMI.b CODE_02DC7D
	LDA.b $00
	BMI.b CODE_02DC7D
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_02DC7D:
	LDX.b #FXCODE_09A82C>>16
	LDA.w #FXCODE_09A82C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDA.w #$AAAA
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_BGWindowLogicSettings
	LDY.b #$A0
	STY.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDY.b #$22
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.w #$0020
	TSB.w !RAM_YI_Global_HDMAEnable
	LDA.l YI_Global_PaletteMirror[$00].LowByte
	BEQ.b CODE_02DCC6
	STA.w $0948
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
	LDX.b #$20
	STX.w !RAM_YI_Global_ColorMathSelectAndEnable
CODE_02DCC6:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_02DD4B
	REP.b #$10
	LDA.w #$0056
	JSL.l CODE_00B753
	SEP.b #$10
	LDA.w #$A800
	STA.w $0CF9
CODE_02DCDE:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0078
	STA.b $00
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0080
	STA.b $02
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0C23
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $0C27
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $0C2A
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $0C2C
	REP.b #$10
	JSL.l CODE_03D9C6
	SEP.b #$10
	LDA.b $00
	SEC
	SBC.w $0C23
	BEQ.b CODE_02DD37
	EOR.w $0C2A
	BPL.b CODE_02DD37
	LDA.b $00
	STA.w $0C23
CODE_02DD37:
	LDA.b $02
	SEC
	SBC.w $0C27
	BEQ.b CODE_02DD49
	EOR.w $0C2C
	BPL.b CODE_02DD49
	LDA.b $02
	STA.w $0C27
CODE_02DD49:
	LDX.b $12
CODE_02DD4B:
	RTS

DATA_02DD4C:
	db $60,$06,$0A,$0D,$0F,$11,$12,$13,$15,$16,$17,$18,$19,$19,$1A,$1B
	db $1C,$1C,$1D,$1D,$1E,$1E,$1E,$1F,$1F,$1F,$1F,$20,$20,$20,$20,$20
	db $20,$20,$20,$20,$20,$20,$20,$1F,$1F,$1F,$1F,$1E,$1E,$1E,$1D,$1D
	db $1C,$1C,$1B,$1A,$19,$19,$18,$17,$16,$15,$13,$12,$11,$11,$11,$11
	db $12,$12,$12,$13,$13,$13,$14,$14,$14,$15,$15,$15,$16,$16,$16,$17
	db $17,$17,$18,$18,$18,$19,$19,$19,$1A,$1A,$1A,$1B,$1B,$1B,$1C,$1C
	db $1C

CODE_02DDAD:
	TYX
	JSR.w CODE_02DA8B
	LDY.b $78,x
	CPY.b #$0B
	BCS.b CODE_02DDB8
	RTS

CODE_02DDB8:
	LDA.b $76,x
	BNE.b CODE_02DDC5
	LDA.w #!Define_YI_SoundID27_CollectSuperStar
	JSL.l CODE_0085D2
	LDA.b $76,x
CODE_02DDC5:
	CMP.w #$0100
	BCC.b CODE_02DDDF
	LDY.b $78,x
	CPY.b #$10
	BCC.b CODE_02DDE4
	INC.b $18,x
	LDA.w #!Define_YI_PlayerState22_EnterKeyhole
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $60C0
	STZ.w $60C6
	RTS

CODE_02DDDF:
	ADC.w #$0010
	STA.b $76,x
CODE_02DDE4:
	LDA.w #$0030
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$FFD8
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $60A0
	STA.w !RAM_YI_Global_Layer3YPosLo
	STZ.w $6098
	STZ.w !RAM_YI_Global_Layer3XPosLo
	LDA.w #$0260
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	AND.w #$FFF0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PHB
	LDY.b #$702002>>16
	PHY
	PLB
	REP.b #$10
	LDA.l !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	TAX
	LDY.w #$0000
CODE_02DE32:
	LDA.l DATA_5FFA5E,x
	STA.w $702002,y
	STA.w $702D6E,y
	INX
	INX
	INY
	INY
	CPY.w #$0026
	BCC.b CODE_02DE32
	SEP.b #$10
	PLB
	LDA.w #DATA_02DD4C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_02DD4C
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	STZ.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #$005F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0096
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08F05F>>16
	LDA.w #FXCODE_08F05F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDA.w #$FFFF
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.w #$0155
	STA.w !RAM_YI_Global_BGWindowLogicSettings
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
	LDA.w #$7FFF
	STA.w $0948
	LDY.b #$A0
	LDA.w $60B0
	CMP.w #$0079
	BMI.b CODE_02DEA9
	LDY.b #$A8
CODE_02DEA9:
	STY.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDY.b #$22
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDY.b #$34
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w #$0020
	STA.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	RTS

DATA_02DEBF:
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF

CODE_02DEDD:
	LDA.w $60B0
	SEC
	SBC.w #$0078
	BPL.b CODE_02DEE9
	LDA.w #$0000
CODE_02DEE9:
	ASL
	ASL
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$00D1
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #DATA_02DEBF
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_02DEBF>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $60B2
	CMP.w #$0088
	BMI.b CODE_02DF52
	LDA.b $76,x
	CMP.w #$0100
	BNE.b CODE_02DF29
	LDA.w #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	LDA.b $76,x
CODE_02DF29:
	SEC
	SBC.w #$0010
	STA.b $76,x
	BNE.b CODE_02DF52
	LDX.b #FXCODE_08B3D9>>16
	LDA.w #FXCODE_08B3D9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #!Define_YI_GameMode31
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.w #$0004
	STA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w $0948
	JSL.l CODE_03A31E
CODE_02DF52:
	JMP.w CODE_02DDE4

;---------------------------------------------------------------------------

YI_NorSpr013_BossExplosion_Init:
;$02DF55
	LDA.w #$0002
	STA.b $16,x
CODE_02DF5A:
	LDA.w #!Define_YI_SoundID74_BossExplosion
	JSL.l CODE_0085D2
	LDA.w #$0800
	STA.w $7A38,x
	RTL

;---------------------------------------------------------------------------

DATA_02DF68:
	dw $0000,$7F00,$23EC,$22DF

DATA_02DF70:
	dw $0002,$0004,$0004,$0004,$0004

YI_NorSpr013_BossExplosion_Main:
;$02DF7A
	LDA.w $7402
	CMP.w #$0032
	BNE.b CODE_02DF86
	JSL.l CODE_06C9D7
CODE_02DF86:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	BPL.b CODE_02DF8E
	JMP.w CODE_02E04E

CODE_02DF8E:
	LDA.w #DATA_17A48C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_17A48C
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $7680,x
	BPL.b CODE_02DFA2
	LDA.w #$0000
CODE_02DFA2:
	CMP.w #$0100
	BCC.b CODE_02DFAA
	LDA.w #$00FF
CODE_02DFAA:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $70E2,x
	LDA.w $7682,x
	BPL.b CODE_02DFBC
	LDA.w #$0000
CODE_02DFBC:
	CMP.w #$00D2
	BCC.b CODE_02DFC4
	LDA.w #$00D1
CODE_02DFC4:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $7182,x
	LDA.b $19,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08B2B6>>16
	LDA.w #FXCODE_08B2B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDX.b $12
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08E132>>16
	LDA.w #FXCODE_08E132
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.l YI_Global_PaletteMirror[$00].LowByte
	BNE.b CODE_02E02A
	LDY.w !RAM_YI_Global_SubScreenLayers
	BEQ.b CODE_02E02A
	SEP.b #$20
	LDA.w !RAM_YI_Global_MainScreenLayers
	ORA.w !RAM_YI_Global_SubScreenLayers
	STA.w !RAM_YI_Global_MainScreenLayers
	STZ.w !RAM_YI_Global_SubScreenLayers
	REP.b #$20
	LDA.w $0948
	STA.l YI_Global_PaletteMirror[$00].LowByte
CODE_02E02A:
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w $0948
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_BG1And2WindowMaskSettings
	LDY.b #$20
	STY.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDY.b #$10
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDY.b #$37
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w #$0020
	TSB.w !RAM_YI_Global_HDMAEnable
CODE_02E04E:
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	CMP.w #$0140
	BNE.b CODE_02E06C
	LDA.w #$0005
	STA.l $00004D
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_02E08D
	JSL.l CODE_02E195
	BRA.b CODE_02E08D

CODE_02E06C:
	CMP.w #$00C0
	BNE.b CODE_02E08D
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_02E08D
	LDA.w #!Define_YI_SoundID43_MountYoshi
	JSL.l CODE_0085D2
	JSL.l CODE_04F74A
	LDA.w #$012E
	STA.w $60BE
	LDA.w #$0032
	STA.w $7402
CODE_02E08D:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	BPL.b CODE_02E0C8
	LDA.w $7A96,x
	BMI.b CODE_02E0C4
	BEQ.b CODE_02E09A
	RTL

CODE_02E09A:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_02E0C4
	LDA.w #$0006
	STA.l $00004D
	LDA.w #!Define_YI_GameMode31
	STA.w !RAM_YI_Global_CurrentGameMode
	STZ.w !RAM_YI_Global_MainScreenWindowMask
	LDY.b #$00
	STY.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDY.b #$22
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDY.b #$20
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w #$0020
	TRB.w !RAM_YI_Global_HDMAEnable
CODE_02E0C4:
	JML.l CODE_03A31E

CODE_02E0C8:
	LDA.w $7A38,x
	SEC
	SBC.w #$0040
	CMP.w #$0100
	BCS.b CODE_02E0D7
	LDA.w #$0100
CODE_02E0D7:
	STA.w $7A38,x
	CLC
	ADC.b $18,x
	STA.b $18,x
	LDA.b $76,x
	CMP.w #$0100
	BCC.b CODE_02E114
	LDA.b $16,x
	BNE.b CODE_02E0ED
	DEC.b $16,x
	RTL

CODE_02E0ED:
	DEC.b $16,x
	DEC.b $16,x
	BNE.b CODE_02E0FE
	LDY.w $61CE
	BEQ.b CODE_02E0FE
	LDA.w #$7FFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_02E0FE:
	STZ.b $18,x
	STZ.b $76,x
	LDA.w $7A36,x
	LDY.w $61CE
	BEQ.b CODE_02E10F
	LDY.b $16,x
	LDA.w DATA_02DF68,y
CODE_02E10F:
	STA.b $78,x
	JMP.w CODE_02DF5A

CODE_02E114:
	LDY.b $16,x
	CLC
	ADC.w DATA_02DF70,y
	CMP.w #$0100
	BCC.b CODE_02E122
	LDA.w #$0100
CODE_02E122:
	STA.b $76,x
	CPY.b #$00
	BEQ.b CODE_02E12D
	CMP.w #$00C0
	BCS.b CODE_02E190
CODE_02E12D:
	LDA.b $14
	AND.w #$0001
	BNE.b CODE_02E190
	LDA.b $10
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $19,x
	AND.w #$00FF
	LSR
	NOP #2
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0500
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0A91E0>>16
	LDA.w #FXCODE_0A91E0
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr1DD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	CLC
	ADC.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $7142,y
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R4_LMULTResultLo
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0004
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
CODE_02E190:
	RTL

;---------------------------------------------------------------------------

CODE_02E191:
	JSL.l CODE_03A32E
CODE_02E195:
	LDA.w #$0014
	JML.l CODE_03A34C

;---------------------------------------------------------------------------

CODE_02E19C:
	LDA.w #$0200
	LDX.b #$00
	BRA.b CODE_02E1A8

CODE_02E1A3:
	LDA.w #$0200
CODE_02E1A6:
	LDX.b #$01
CODE_02E1A8:
	PHA
	LDA.w #$0013
	JSL.l CODE_03A34C
	PLA
	BCC.b CODE_02E1DF
	STA.w $7A96,y
	LDA.b $00
	CLC
	ADC.w #$0008
	STA.w $70E2,y
	LDA.b $02
	CLC
	ADC.w #$0008
	STA.w $7182,y
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	ORA.w !RAM_YI_Level_CurrentWorldLo
	ASL
	TAX
	LDA.l DATA_0CDACA,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.l DATA_0CDAE2,x
	STA.w $7A36,y
CODE_02E1DF:
	LDX.b $12
CODE_02E1E1:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	JML.l CODE_028922

;---------------------------------------------------------------------------

YI_NorSpr000_LavaLog_Init:
;$02E1EB
	JSL.l CODE_03AE60
	STZ.w $7400,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_02E1FC:
	dw $0002,$FFFE,$01E0,$01E0,$01E0,$01E0,$01E0,$01E0
	dw $01E0,$01E0,$01E0,$01E0,$01E4,$01E8,$01EC,$01F0
	dw $01F4,$01F8,$01FC,$01FE,$0000,$0000,$0000,$0000
	dw $0002,$0004,$0008,$000C,$0010,$0014,$0018,$001C
	dw $0020,$0020,$0020,$0020,$0020,$0020,$0020,$0020
	dw $0020,$0020

DATA_02E250:
	dw $0004,$0000,$0006,$FFFF

DATA_02E258:
	dw $0080,$0030,$0018,$0010,$000C,$0008,$0008,$0008
	dw $0008

YI_NorSpr000_LavaLog_Main:
;$02E26A
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $70000C,x
	AND.w #$0008
	STA.b $04
	LDA.l $700014,x
	AND.w #$0008
	STA.b $08
	SEP.b #$10
	LDX.b $12
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_02E299
	JMP.w CODE_02E2D1

CODE_02E299:
	LDA.w $7862,x
	AND.w #$00FF
	STA.b $06
	BNE.b CODE_02E2A6
	JMP.w CODE_02E3BE

CODE_02E2A6:
	LDA.w $7AF6,x
	BNE.b CODE_02E2D1
	LDY.b #$0E
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$00E0
	BPL.b CODE_02E2CB
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_02E2BE
	EOR.w #$FFFF
	INC
CODE_02E2BE:
	CMP.w #$0040
	BCC.b CODE_02E2D1
	ASL
	ASL
	ASL
	XBA
	AND.w #$000E
	TAY
CODE_02E2CB:
	LDA.w DATA_02E258,y
	STA.w $7AF6,x
CODE_02E2D1:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w #$0020
	CMP.w #$FF80
	BPL.b CODE_02E2E0
	LDA.w #$FF80
CODE_02E2E0:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700002,x
	SEC
	SBC.l $700012,x
	STA.b $02
	LDA.l $700002,x
	SEC
	SBC.l $70000A,x
	PHP
	BPL.b CODE_02E304
	EOR.w #$FFFF
	INC
CODE_02E304:
	ASL
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.l FXDATA_0BB810,x
	PLP
	BPL.b CODE_02E315
	EOR.w #$FFFF
	INC
CODE_02E315:
	STA.b $00
	LDA.b $02
	PHP
	BPL.b CODE_02E320
	EOR.w #$FFFF
	INC
CODE_02E320:
	ASL
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.l FXDATA_0BB810,x
	PLP
	BMI.b CODE_02E331
	EOR.w #$FFFF
	INC
CODE_02E331:
	CLC
	ADC.b $00
	LSR
	AND.w #$01FE
	STA.b $00
	LDX.b $12
	LDY.b $78,x
	BEQ.b CODE_02E34E
	TYA
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_02E34D
	LDY.w #$0000
CODE_02E34D:
	TYA
CODE_02E34E:
	SEP.b #$10
	STA.b $02
	SEC
	SBC.w $7A36,x
	LDY.b #$00
	AND.w #$0100
	BEQ.b CODE_02E35F
	LDY.b #$02
CODE_02E35F:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_02E1FC,y
	AND.w #$01FE
	STA.w $7A36,x
	SEC
	SBC.b $02
	EOR.w DATA_02E1FC,y
	BMI.b CODE_02E379
	LDA.b $02
	STA.w $7A36,x
CODE_02E379:
	LDA.b $78,x
	BEQ.b CODE_02E39F
	CLC
	ADC.w #$0030
	LSR
	LSR
	LSR
	LSR
	AND.w #$0006
	TAY
	LDA.w $7964,y
	BEQ.b CODE_02E394
	LDY.b #$00
	LDA.b $02
	BRA.b CODE_02E398

CODE_02E394:
	LDA.b $00
	ASL
	ASL
CODE_02E398:
	SEC
	SBC.w #$0010
	AND.w #$01FE
CODE_02E39F:
	LDY.b #$04
	REP.b #$10
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	SEP.b #$10
	LDX.b $12
	CMP.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_02E3B4
	INY
	INY
CODE_02E3B4:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_02E250,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02E3BE:
	LDY.b $78,x
	BEQ.b CODE_02E3D8
	LDA.w $72C0,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
	STZ.b $78,x
CODE_02E3D8:
	LDA.w $60AA
	BMI.b CODE_02E440
	LDA.w $7C16,x
	CLC
	ADC.w #$0014
	CMP.w #$0028
	BCS.b CODE_02E440
	TXY
	REP.b #$10
	LDX.w $7A36,y
	LDA.l FXDATA_0BBA12,x
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	TYX
	LDA.w $7C16,x
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	SEP.b #$10
	LDA.w !REGISTER_PPUMultiplicationProductMid
	CLC
	ADC.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0020
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	CMP.w #$FFF6
else
	CMP.w #$FFF8
endif
	BCC.b CODE_02E440
	INC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0100
	STA.w $60AA
	INC.w $61B4
	STZ.w $60FA
	LDA.w #$0010
	STA.w $0CCA
	LDA.w $7C16,x
	BNE.b CODE_02E43A
	INC
CODE_02E43A:
	ASL
	AND.w #$01FE
	STA.b $78,x
CODE_02E440:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BEQ.b CODE_02E452
	JMP.w CODE_02E48D

CODE_02E452:
	LDA.w $7A36,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_540000+$4060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$4060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_02E48D:
	RTL

;---------------------------------------------------------------------------

CODE_02E48E:
	TYX
	RTS

;---------------------------------------------------------------------------

DATA_02E490:
	dw $FFE0,$0020

YI_NorSpr171_NavalPiranha_Init:
;$02E494
	STX.w $1072
	INC.b $18,x
	LDA.w #$01FF
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$001C
	STA.w $1068
	LDA.w #$0006
	STA.b $78,x
	DEC.w $106E
	LDY.b #$01
	STY.b $76,x
	LDA.w #$0003
	STA.w $1082
	LDA.w #$0388
	STA.w $70E2,x
	LDA.w $7182,x
	STA.w $1074
	CLC
	ADC.w #$0060
	STA.w $7182,x
	LDA.w #$0070
	STA.w $7A38,x
	LDA.w #$FFC0
	STA.w $1070
	LDA.w #!Define_YI_NorSpr066_PiranhaPlant
	TXY
	JSL.l CODE_03A366
	LDA.w #$0388
	STA.w $70E2,y
	LDA.w #$0780
	STA.w $7182,y
	LDA.w #$BC00
	STA.w $6FA0,y
	LDA.w $6FA2,y
	ORA.w #$2000
	STA.w $6FA2,y
	LDA.w #$2C01
	STA.w $7040,y
	LDA.w #$0001
	STA.w $7402,y
	SEP.b #$20
	LDA.b #$2C
	STA.w $7042,y
	STY.w $108A
	STZ.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	LDA.b #$08
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.b #$FF
	STA.w $7863,y
	REP.b #$20
	STZ.w $105A
	LDX.b #$1E
CODE_02E526:
	LDA.l $702E8C,x
	STA.l YI_Global_PaletteMirror[$E0].LowByte,x
	DEX
	DEX
	BPL.b CODE_02E526
	RTL

;---------------------------------------------------------------------------

DATA_02E533:
	dw CODE_02E905,CODE_02EA2C,CODE_02EB2D,CODE_02EB54,CODE_02EC46,CODE_02EE2C,CODE_02EB54,CODE_02EC41
	dw CODE_02ECAB,CODE_02ECD3,CODE_02ED71,CODE_02EB54,CODE_02ED84,CODE_02EE7A,CODE_02EF86,CODE_02EDB5
	dw CODE_02EDE1,CODE_02EB54,CODE_02EC46,CODE_02EE2C,CODE_02EB54,CODE_02EE7A,CODE_02EF86,CODE_02F02D
	dw CODE_02F074,CODE_02EB54,CODE_02F09C,CODE_02F10E,CODE_02EC46,CODE_02EE2C,CODE_02F156,CODE_02EE7A
	dw CODE_02EC46,CODE_02EE2C,CODE_02F1DF,CODE_02F205,CODE_02F273,CODE_02F310

YI_NorSpr171_NavalPiranha_Main:
;$02E57F
	JSR.w CODE_02E5E4
	JSL.l CODE_03AF23
	LDY.b $18,x
	BMI.b CODE_02E5AB
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_02E533,x)
	LDY.w $74A2,x
	BMI.b CODE_02E5C1
	LDY.w $1084
	BNE.b CODE_02E5C1
	JSR.w CODE_02E68E
	LDY.b $76,x
	CPY.b #$20
	BPL.b CODE_02E5AB
	JSR.w CODE_02E761
	JSR.w CODE_02E8A5
CODE_02E5AB:
	JSR.w CODE_02E6C3
	LDA.w $7AF8,x
	BEQ.b CODE_02E5C1
	AND.w #$0003
	BNE.b CODE_02E5C1
	LDA.w $7042,x
	EOR.w #$0002
	STA.w $7042,x
CODE_02E5C1:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_02E5CA
	EOR.w #$FFFF
	INC
CODE_02E5CA:
	CLC
	ADC.w $1088
	CMP.w #$2000
	BMI.b CODE_02E5E0
	SEC
	SBC.w #$2000
	PHA
	LDA.w #!Define_YI_SoundID5F_Splash1
	JSL.l CODE_0085D2
	PLA
CODE_02E5E0:
	STA.w $1088
	RTL

CODE_02E5E4:
	LDY.w $74A2,x
	BMI.b CODE_02E65D
	JSL.l CODE_03AB1C
	LDA.w $1068
	STA.w $6000
	LDA.w $7A38,x
	STA.w $6002
	LDA.w $106A
	STA.w $6004
	LDA.w $106C
	STA.w $6006
	LDA.w $1070
	STA.w $6008
	LDA.w $7A36,x
	LSR
	STA.w $600A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LSR
	STA.w $600C
	LDA.w $1084
	STA.w $601E
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_02FC39>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.b $78,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #DATA_02FC39
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_08A062>>16
	LDA.w #FXCODE_08A062
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $0C
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.b $0E
CODE_02E65D:
	RTS

DATA_02E65E:
	dw $0009,$0008,$0007,$0008,$000C,$000C,$0010,$000F
	dw $000E,$0010,$000F,$000E

DATA_02E676:
	dw $FFDA,$FFD1,$FFD7,$FFD8,$FFD7,$FFD6,$FFDA,$FFD9
	dw $FFD7,$FFDA,$FFD9,$FFD7

CODE_02E68E:
	LDA.b $78,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_02E676,y
	CLC
	ADC.w $106C
	CMP.w #$8000
	ROR
	STA.w $106C
	LDA.w DATA_02E65E,y
	LDY.w $7400,x
	BEQ.b CODE_02E6AF
	EOR.w #$FFFF
	INC
CODE_02E6AF:
	CLC
	ADC.w $106A
	CMP.w #$8000
	ROR
	STA.w $106A
	RTS

DATA_02E6BB:
	dw FXDATA_540000+$60E1,FXDATA_540000+$20A1,FXDATA_540000+$60C1,FXDATA_540000+$20C1

CODE_02E6C3:
	LDY.b $79,x
	LDA.w #(FXDATA_540000+$20A1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w DATA_02E6BB,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b $18,x
	BMI.b CODE_02E71E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088A81>>16
	LDA.w #FXCODE_088A81
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	STA.w $105C
	LDA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	STA.w $105E
	LDA.w $6000
	STA.w $1060
	LDA.w $6002
	STA.w $1062
	LDA.w $6004
	STA.w $1064
	LDA.w $6006
	STA.w $1066
	BRA.b CODE_02E759

CODE_02E71E:
	LDA.w $105C
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $105E
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $1060
	STA.w $6000
	LDA.w $1062
	STA.w $6002
	LDA.w $1064
	STA.w $6004
	LDA.w $1066
	STA.w $6006
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088AF5>>16
	LDA.w #FXCODE_088AF5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_02E759:
	LDA.b $18,x
	EOR.w #$00FF
	STA.b $18,x
CODE_02E760:
	RTS

CODE_02E761:
	LDA.w $7362,x
	BMI.b CODE_02E760
	LDY.w $7D36,x
	DEY
	BMI.b CODE_02E779
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_02E779
	LDA.w $7D38,y
	BNE.b CODE_02E77C
CODE_02E779:
	JMP.w CODE_02E82B

CODE_02E77C:
	LDA.w $7AF8,x
	BEQ.b CODE_02E784
CODE_02E781:
	JMP.w CODE_02E81A

CODE_02E784:
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	EOR.w $106E
	BMI.b CODE_02E781
	LDY.b $76,x
	CPY.b #$0E
	BMI.b CODE_02E7A2
	CPY.b #$11
	BMI.b CODE_02E781
	CPY.b #$16
	BMI.b CODE_02E7A2
	CPY.b #$19
	BMI.b CODE_02E781
CODE_02E7A2:
	LDA.w #$0409
	STA.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFFF
	STA.w $7AF8,x
	LDA.w $1082
	DEC
	ASL
	TAY
	LDA.w DATA_02E8FD,y
	STA.w $1086
	STZ.w $0CE8
	DEC.w $1082
	BNE.b CODE_02E7D9
	JSL.l CODE_02A982
	LDA.w #!Define_YI_SoundID80_BossDefeated
	PHA
	LDA.w #$000F
	LDY.b #$20
	BRA.b CODE_02E7E2

CODE_02E7D9:
	LDA.w #!Define_YI_SoundID78_HurtBoss
	PHA
	LDA.w #$000E
	LDY.b #$1C
CODE_02E7E2:
	STA.b $00
	STY.b $02
	PLA
	JSL.l CODE_0085D2
	LDX.b #$00
	LDY.w $1076
CODE_02E7F0:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STA.w $107C,x
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CPY.w $1076
	BNE.b CODE_02E807
	INX
	INX
	LDY.w $1078
	BRA.b CODE_02E7F0

CODE_02E807:
	LDX.w $7972
	LDY.b $02
	STY.b $76,x
	STZ.w $7A96,x
	LDA.w #$01FF
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_02E81A:
	LDY.w $7D36,x
	TYX
	DEX
	JSL.l CODE_03B24B
	LDA.w #!Define_YI_SoundID0B_ShellHit1
	JSL.l CODE_0085D2
	RTS

CODE_02E82B:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_02E84C
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_02E84C
	LDA.w $7D38,y
	BNE.b CODE_02E84D
CODE_02E84C:
	RTS

CODE_02E84D:
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $7CD8,y
	STA.b $0A
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $7CD6,y
	STA.b $08
	CLC
	ADC.b $0C
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_02E88E
	LDA.b $0A
	CLC
	ADC.b $0E
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_02E88E
CODE_02E881:
	TYX
	JSL.l CODE_03B24B
	LDA.w #!Define_YI_SoundID0B_ShellHit1
	JSL.l CODE_0085D2
	RTS

CODE_02E88E:
	LDA.b $08
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_02E8A4
	LDA.b $0A
	SEC
	SBC.w #$FFF8
	CMP.w #$0050
	BCC.b CODE_02E881
CODE_02E8A4:
	RTS

CODE_02E8A5:
	LDY.b $76,x
	CPY.b #$1C
	BPL.b CODE_02E8FA
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611E
	STA.b $0A
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	STA.b $08
	CLC
	ADC.b $0C
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_02E8E4
	LDA.b $0A
	CLC
	ADC.b $0E
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_02E8E4
CODE_02E8DF:
	JSL.l CODE_03A858
	RTS

CODE_02E8E4:
	LDA.b $08
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_02E8FA
	LDA.b $0A
	SEC
	SBC.w #$FFF8
	CMP.w #$0050
	BCC.b CODE_02E8DF
CODE_02E8FA:
	RTS

DATA_02E8FB:
	dw $0080

DATA_02E8FD:
	dw $FF80

DATA_02E8FF:
	dw $6D65,$D8ED,$62D9

CODE_02E905:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02E8FA
	LDA.w $7A98,x
	BEQ.b CODE_02E913
	JMP.w CODE_02E9C9

CODE_02E913:
	LDY.b $78,x
	BNE.b CODE_02E91F
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_02E922
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_02E91F:
	JMP.w CODE_02E9C6

CODE_02E922:
	LDY.w $1076
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.w $1078
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BNE.b CODE_02E91F
	LDA.w $1086
	INC
	BNE.b CODE_02E941
	LDA.w $1082
	ASL
	TAY
	LDA.w DATA_02E8FD,y
	STA.w $1086
CODE_02E941:
	LDA.w $1086
	SEC
	ROR
	BCC.b CODE_02E985
	LDY.b #$0D
	SEC
	ROR
	BCS.b CODE_02E950
	LDY.b #$15
CODE_02E950:
	STY.b $76,x
	STA.w $1086
	LDY.w $7400,x
	LDA.w DATA_02E8FB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0006
	STA.b $78,x
	LDA.w #$0040
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_02E969:
	LDY.w $1076
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.w $1078
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	RTS

CODE_02E985:
	SEC
	ROR
	BCS.b CODE_02E9B4
	STA.w $1086
	LDA.w #$04C0
	STA.w $0CE8
	STZ.b $78,x
	LDY.b #$0C
	STY.b $76,x
	LDY.w $1076
	LDA.w #$0040
	STA.w $7A96,y
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.w $1078
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$00C0
	STA.w $7A96,y
	RTS

CODE_02E9B4:
	STA.w $1086
	LDY.b #$00
	STY.b $79,x
	LDA.w #$0010
	STA.w $7A96,x
	LDY.b #$07
	STY.b $76,x
	RTS

CODE_02E9C6:
	JSR.w CODE_02E9E1
CODE_02E9C9:
	JSR.w CODE_02EA00
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BEQ.b CODE_02E9DC
	STZ.w $107A
	LDY.b #$1A
	STY.b $76,x
CODE_02E9DC:
	RTS

DATA_02E9DD:
	db $00,$01,$02,$01

CODE_02E9E1:
	LDA.w $7A98,x
	BNE.b CODE_02E9FB
	LDA.b $17,x
	INC
	AND.w #$FF03
	STA.b $17,x
	TAY
	LDA.w DATA_02E9DD,y
	TAY
	STY.b $78,x
	LDA.w #$0008
	STA.w $7A98,x
CODE_02E9FB:
	RTS

DATA_02E9FC:
	dw $0200,$0204

CODE_02EA00:
	LDA.w $7AF6,x
	BNE.b CODE_02EA2B
	LDA.b $16,x
	INC
	AND.w #$FF03
	STA.b $16,x
	TAY
	LDA.w DATA_02E9FC,y
	TAY
	STY.b $79,x
	CPY.b #$04
	BNE.b CODE_02EA1F
	LDA.w #!Define_YI_SoundID7B_NavalPiranhaMunch
	JSL.l CODE_0085D2
CODE_02EA1F:
	LDA.b $10
	AND.w #$0006
	CLC
	ADC.w #$0004
	STA.w $7AF6,x
CODE_02EA2B:
	RTS

CODE_02EA2C:
	TYX
	LDY.w $105A
	CPY.b #$02
	BPL.b CODE_02EA95
	LDY.w $108A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_02EA82
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w $70E2,y
	STA.b $00
	LDA.w #$0053
	JSL.l CODE_03A364
	LDA.w $6094
	CLC
	ADC.w #$0140
	STA.w $70E2,y
	LDA.w $609C
	CLC
	ADC.w #$0040
	STA.w $7182,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0010
	STA.w $7540,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	JSL.l CODE_02A982
	STZ.w $7ECC
	PLA
	JML.l CODE_03A32E

CODE_02EA82:
	STZ.w $0C1E
	LDA.w #$02B0
	CMP.w !RAM_YI_Global_Layer1XPosLo
	BPL.b CODE_02EA94
	INC
	STA.w $0C23
	INC.w $0C1E
CODE_02EA94:
	RTS

CODE_02EA95:
	JSL.l CODE_03D5E4
	STZ.w $7722,x
	JSR.w CODE_02EABD
	STZ.w $7400,x
	LDA.w #$00C0
	STA.w $7A96,x
	LDA.w #$0002
	STA.b $76,x
	LDA.w #$62D9
	STA.w $1086
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $74A2,x
	RTS

CODE_02EABD:
	LDA.w #$0002
	STA.b $00
	LDA.w #DATA_02E490
	STA.b $02
	LDA.w #$1076
	STA.b $04
CODE_02EACC:
	LDA.w #$0172
	JSL.l CODE_03A364
	LDA.b ($02)
	CLC
	ADC.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0000
	STA.w $7402,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	TYA
	STA.b ($04)
	JSR.w CODE_02EB0A
	INC.b $02
	INC.b $02
	INC.b $04
	INC.b $04
	DEC.b $00
	BNE.b CODE_02EACC
	RTS

CODE_02EB0A:
	LDA.w #$0002
	JSL.l CODE_03A364
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$FFB0
	STA.w $7182,y
	LDA.w #$0005
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.b ($04)
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	RTS

CODE_02EB2D:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02EB4B
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $1074
	CMP.w $7182,x
	BMI.b CODE_02EB4B
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $78,x
	INC.b $76,x
CODE_02EB4B:
	RTS

DATA_02EB4C:
	dw $FFFC,$0004

DATA_02EB50:
	dw $FFFF,$0001

CODE_02EB54:
	TYX
	LDA.w $7A96,x
	BEQ.b CODE_02EB5D
	JMP.w CODE_02EC28

CODE_02EB5D:
	LDA.w $7AF6,x
	BNE.b CODE_02EB73
	SEP.b #$20
	LDA.b $79,x
	LSR
	AND.b #$FE
	STA.b $79,x
	REP.b #$20
	LDA.w #$0004
	STA.w $7AF6,x
CODE_02EB73:
	LDY.b #$04
	STY.b $00
	LDY.b #$00
	LDA.w $1070
	SEC
	SBC.w #$FFBC
	CMP.w #$0008
	BCS.b CODE_02EB8C
	DEC.b $00
	LDA.w #$FFC0
	BRA.b CODE_02EB97

CODE_02EB8C:
	BPL.b CODE_02EB90
	INY
	INY
CODE_02EB90:
	LDA.w $1070
	CLC
	ADC.w DATA_02EB4C,y
CODE_02EB97:
	STA.w $1070
	LDY.b #$00
	LDA.w $1068
	SEC
	SBC.w #$0023
	CMP.w #$0002
	BCS.b CODE_02EBAF
	DEC.b $00
	LDA.w #$0024
	BRA.b CODE_02EBBA

CODE_02EBAF:
	BPL.b CODE_02EBB3
	INY
	INY
CODE_02EBB3:
	LDA.w $1068
	CLC
	ADC.w DATA_02EB50,y
CODE_02EBBA:
	STA.w $1068
	LDY.b #$00
	LDA.w $7A38,x
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_02EBD2
	DEC.b $00
	LDA.w #$0000
	BRA.b CODE_02EBE3

CODE_02EBD2:
	CMP.w #$00FC
	BMI.b CODE_02EBD9
	INY
	INY
CODE_02EBD9:
	LDA.w $7A38,x
	CLC
	ADC.w DATA_02EB4C,y
	AND.w #$01FE
CODE_02EBE3:
	STA.w $7A38,x
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $1074
	CMP.w $7182,x
	BMI.b CODE_02EBFC
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	DEC.b $00
CODE_02EBFC:
	LDY.b $00
	BNE.b CODE_02EC28
	LDY.b $76,x
	CPY.b #$11
	BEQ.b CODE_02EC25
	CPY.b #$03
	BEQ.b CODE_02EC1F
	CPY.b #$06
	BNE.b CODE_02EC14
	STZ.w $0C1E
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_02EC14:
	STZ.b $16,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_02EC1F:
	LDA.w #$0040
	STA.w $7A96,x
CODE_02EC25:
	INC.b $76,x
	RTS

CODE_02EC28:
	LDY.b $76,x
	CPY.b #$19
	BNE.b CODE_02EC40
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_02EC40
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_02EC40:
	RTS

CODE_02EC41:
	LDA.w #$01A0
	BRA.b CODE_02EC49

CODE_02EC46:
	LDA.w #$01C0
CODE_02EC49:
	STA.b $02
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02ECAA
	LDY.b #$02
	STY.b $00
	LDA.w $1070
	CLC
	ADC.w #$0008
	CMP.w #$FFE0
	BMI.b CODE_02EC66
	DEC.b $00
	LDA.w #$FFE0
CODE_02EC66:
	STA.w $1070
	LDA.w $1068
	CLC
	ADC.w #$0026
	INC
	LSR
	STA.w $1068
	LDA.w $7A38,x
	SEC
	SBC.w #$0010
	AND.w #$01FE
	CMP.b $02
	BPL.b CODE_02EC87
	DEC.b $00
	LDA.b $02
CODE_02EC87:
	STA.w $7A38,x
	LDY.b $00
	BNE.b CODE_02ECAA
	STZ.b $16,x
	LDA.w #$0004
	LDY.b $76,x
	CPY.b #$20
	BNE.b CODE_02EC9E
	LDA.w #$0001
	BRA.b CODE_02ECA5

CODE_02EC9E:
	CPY.b #$04
	BNE.b CODE_02ECA5
	LDA.w #$000C
CODE_02ECA5:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.b $76,x
CODE_02ECAA:
	RTS

CODE_02ECAB:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0010
	CMP.w #$0180
	BPL.b CODE_02ECC3
	LDA.w #$0008
	STA.w $7A96,x
	INC.b $76,x
	LDA.w #$017F
CODE_02ECC3:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_02ECC6:
	RTS

DATA_02ECC7:
	dw $FF38,$FE78,$FDC8

DATA_02ECCD:
	dw $FC14,$FC4C,$FCAC

CODE_02ECD3:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02ECC6
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$01FF
	BMI.b CODE_02ED5B
	LDA.w $70E2,x
	CLC
	ADC.b $0C
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.b $0E
	STA.b $02
	LDA.w #!Define_YI_SoundID83_LungeFish
	JSL.l CODE_0085D2
	LDA.w #$0006
	STA.b $0A
CODE_02ED01:
	LDY.b $0A
	LDA.w DATA_02ECCD-$02,y
	STA.b $08
	LDA.w DATA_02ECC7-$02,y
	LDY.w $7400,x
	BEQ.b CODE_02ED14
	EOR.w #$FFFF
	INC
CODE_02ED14:
	STA.b $06
	LDA.w #$0165
	JSL.l CODE_03A364
	BCC.b CODE_02ED50
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
	LDA.b $06
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $08
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7A36,y
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	STA.w $7540,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	DEC.b $0A
	DEC.b $0A
	BNE.b CODE_02ED01
CODE_02ED50:
	LDA.w #$0010
	STA.w $7A96,x
	INC.b $76,x
	LDA.w #$01FF
CODE_02ED5B:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$00
	CMP.w #$01B0
	BMI.b CODE_02ED6E
	LDY.b #$02
	CMP.w #$01E0
	BMI.b CODE_02ED6E
	LDY.b #$04
CODE_02ED6E:
	STY.b $79,x
	RTS

CODE_02ED71:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02ED83
	LDY.b #$00
	STY.b $79,x
	LDA.w #$0100
	STA.w $7A96,x
	INC.b $76,x
CODE_02ED83:
	RTS

CODE_02ED84:
	TYX
	LDY.w $1076
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.w $1078
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BNE.b CODE_02ED9C
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_02ED9C:
	JSR.w CODE_02E9E1
	JSR.w CODE_02EA00
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BEQ.b CODE_02EDB4
	LDY.b #$0C
	STY.w $107A
	LDY.b #$1A
	STY.b $76,x
CODE_02EDB4:
	RTS

CODE_02EDB5:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_02EDD1
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_02EDD1:
	JSR.w CODE_02EFD3
	RTS

DATA_02EDD5:
	dw $0100,$FF00,$0200,$FE00

DATA_02EDDD:
	dw $03B0,$02E0

CODE_02EDE1:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02EE23
	LDY.w $7400,x
	TYA
	DEC
	EOR.w $7C16,x
	BMI.b CODE_02EDF7
	TYA
	CLC
	ADC.w #$0004
	TAY
CODE_02EDF7:
	LDA.w DATA_02EDD5,y
	STA.w $75E0,x
	LDA.w #$0008
	STA.w $7540,x
	LDY.w $7400,x
	LDA.w $70E2,x
	SEC
	SBC.w DATA_02EDDD,y
	STA.b $02
	TYA
	DEC
	EOR.b $02
	BPL.b CODE_02EE23
	LDA.w DATA_02EDDD,y
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	INC.b $76,x
CODE_02EE23:
	RTS

DATA_02EE24:
	dw $0009,$020A,$040B,$020A

CODE_02EE2C:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_02EE75
	LDA.w #$0004
	STA.w $7A98,x
	LDA.b $16,x
	INC
	INC
	AND.w #$0006
	STA.b $16,x
	TAY
	LDA.w DATA_02EE24,y
	STA.b $78,x
	CPY.b #$04
	BNE.b CODE_02EE75
	LDA.w #!Define_YI_SoundID7B_NavalPiranhaMunch
	JSL.l CODE_0085D2
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_02EE75
	INC.b $76,x
	LDY.b $76,x
	CPY.b #$14
	BEQ.b CODE_02EE75
	LDA.w #$0080
	CPY.b #$06
	BEQ.b CODE_02EE72
	CPY.b #$22
	BNE.b CODE_02EE6F
	LDA.w #$001B
	STA.b $16,x
CODE_02EE6F:
	LDA.w #$0040
CODE_02EE72:
	STA.w $7A96,x
CODE_02EE75:
	RTS

DATA_02EE76:
	dw $03B0,$02E0

CODE_02EE7A:
	TYX
	LDY.b #$05
	STY.b $00
	LDA.w $1070
	SEC
	SBC.w #$0004
	CMP.w #$FF81
	BPL.b CODE_02EE90
	DEC.b $00
	LDA.w #$FF80
CODE_02EE90:
	STA.w $1070
	LDA.w $1068
	DEC
	CMP.w #$001D
	BPL.b CODE_02EEA1
	DEC.b $00
	LDA.w #$001C
CODE_02EEA1:
	STA.w $1068
	LDA.w $7A38,x
	CLC
	ADC.w #$0004
	CMP.w #$0070
	BMI.b CODE_02EEB5
	DEC.b $00
	LDA.w #$0070
CODE_02EEB5:
	STA.w $7A38,x
	LDY.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_02EECF
	LDA.w $70E2,x
	SEC
	SBC.w DATA_02EE76,y
	STA.b $02
	TYA
	DEC
	EOR.b $02
	BPL.b CODE_02EEDA
CODE_02EECF:
	DEC.b $00
	LDA.w DATA_02EE76,y
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02EEDA:
	LDA.w $1074
	CLC
	ADC.w #$0010
	CMP.w $7182,x
	BPL.b CODE_02EEEF
	INC
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	DEC.b $00
CODE_02EEEF:
	LDY.b $00
	BNE.b CODE_02EF06
	LDY.b $76,x
	CPY.b #$1F
	BEQ.b CODE_02EF07
	INC.b $76,x
CODE_02EEFB:
	STZ.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7A96,x
CODE_02EF06:
	RTS

CODE_02EF07:
	LDA.w $7042,x
	AND.w #$FFF0
	ORA.w #$000C
	STA.w $7042,x
	STZ.w $7AF8,x
	LDY.w $1076
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.w $1078
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BNE.b CODE_02EF06
	LDY.b #$16
	STY.b $76,x
	JSR.w CODE_02EEFB
	JMP.w CODE_02E969

DATA_02EF2E:
	dw $FD00,$0300

DATA_02EF32:
	dw $0706,$0708

DATA_02EF36:
	dw $02E8,$03A4,$EF42,$EF52,$EF62,$EF72,$0010,$0040
	dw $0080,$00B0,$FFF0,$FFE0,$FFE8,$FFD0,$0010,$0040
	dw $0080,$00B0,$FFF0,$FFE0,$FFE8,$FFD0,$0010,$0040
	dw $0080,$00B0,$FFF0,$FFE0,$FFE8,$FFD0,$0010,$0040
	dw $0080,$00B0,$FFF0,$FFE0,$FFE8,$FFD0

DATA_02EF82:
	dw $0100,$FF00

CODE_02EF86:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02EFB5
	LDY.w $7400,x
	LDA.w DATA_02EF2E,y
	STA.w $75E0,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w $7A98,x
	BNE.b CODE_02EFB5
	LDA.b $16,x
	INC
	AND.w #$0003
	STA.b $16,x
	TAY
	LDA.w DATA_02EF32,y
	TAY
	STY.b $78,x
	LDA.w #$0008
	STA.w $7A98,x
CODE_02EFB5:
	LDY.b $76,x
	CPY.b #$16
	BEQ.b CODE_02EFD3
	LDA.w $70E2,x
	SEC
	SBC.w #$0320
	CMP.w #$0060
	BCS.b CODE_02EFD3
	STZ.w $75E0,x
	LDA.w #$0018
	STA.w $7540,x
	INC.b $76,x
	RTS

CODE_02EFD3:
	LDY.w $7400,x
	LDA.w $70E2,x
	SEC
	SBC.w DATA_02EF36,y
	STA.b $02
	TYA
	DEC
	EOR.b $02
	BMI.b CODE_02F014
	LDA.w DATA_02EF36,y
	STA.w $70E2,x
	LDY.b #$06
	STY.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_02F015
	LDA.w #$0040
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_02EF82,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7540,x
	LDY.b #$19
	STY.b $76,x
CODE_02F014:
	RTS

CODE_02F015:
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $61C8
	LDY.b #$17
	STY.b $76,x
	RTS

CODE_02F02D:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0060
	CMP.w #$0140
	BPL.b CODE_02F03F
	INC.b $76,x
	LDA.w #$0140
CODE_02F03F:
	STA.w $7A36,x
	LSR
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0018
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0018
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $7400,x
	BNE.b CODE_02F067
	EOR.w #$FFFF
	INC
CODE_02F067:
	ASL
	CLC
	ADC.w DATA_02EF36,y
	STA.w $70E2,x
	RTS

DATA_02F070:
	dw $0200,$FE00

CODE_02F074:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w #$0040
	CMP.w #$01FF
	BMI.b CODE_02F03F
	LDY.w $7400,x
	LDA.w DATA_02F070,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7540,x
	ASL
	ASL
	STA.w $7A96,x
	INC.b $76,x
	LDA.w #$01FF
	BRA.b CODE_02F03F

CODE_02F09C:
	TYX
	LDA.b $78,x
	BNE.b CODE_02F0AF
	STZ.b $16,x
	LDA.w #$0003
	STA.w $7A98,x
	INC
	STA.b $78,x
	INC.b $76,x
	RTS

CODE_02F0AF:
	LDY.b $78,x
	BEQ.b CODE_02F0C6
	LDA.w $7A98,x
	BNE.b CODE_02F0C6
	LDA.b $78,x
	INC
	AND.w #$FF03
	STA.b $78,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_02F0C6:
	LDY.b $79,x
	BEQ.b CODE_02F0EF
	LDA.w $7AF6,x
	BNE.b CODE_02F0EF
	LDA.b $16,x
	INC
	AND.w #$0003
	STA.b $16,x
	TAY
	LDA.w DATA_02E9FC,y
	TAY
	STY.b $79,x
	CPY.b #$04
	BNE.b CODE_02F0E9
	LDA.w #!Define_YI_SoundID7B_NavalPiranhaMunch
	JSL.l CODE_0085D2
CODE_02F0E9:
	LDA.w #$0004
	STA.w $7AF6,x
CODE_02F0EF:
	RTS

DATA_02F0F0:
	dw $0604,$0605,$0605,$0604,$0003

DATA_02F0FA:
	dw $FFB0,$FFA8,$FFA8,$FFB0,$FFC0

DATA_02F104:
	dw $0024,$0020,$0020,$0024,$0024

CODE_02F10E:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_02F155
	INC.b $16,x
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$0C
	BMI.b CODE_02F131
	LDA.w $106E
	EOR.w #$FFFF
	STA.w $106E
	STZ.b $78,x
	STZ.b $16,x
	LDY.w $107A
	STY.b $76,x
	RTS

CODE_02F131:
	LDA.w DATA_02F0F0-$02,y
	STA.b $78,x
	LDA.w DATA_02F0FA-$02,y
	STA.w $1070
	LDA.w DATA_02F104-$02,y
	STA.w $1068
	CPY.b #$06
	BNE.b CODE_02F14F
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_02F14F:
	LDA.w #$0004
	STA.w $7A98,x
CODE_02F155:
	RTS

CODE_02F156:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02F155
	LDY.b $79,x
	TYA
	LSR
	AND.w #$00FE
	STA.b $00
	LDA.b $79,x
	AND.w #$FF00
	ORA.b $00
	STA.b $79,x
	LDY.b #$02
	STY.b $00
	LDA.w $7A38,x
	CMP.w #$0010
	BPL.b CODE_02F17E
	DEC.b $00
	BRA.b CODE_02F188

CODE_02F17E:
	CLC
	ADC.w #$0004
	AND.w #$01FE
	STA.w $7A38,x
CODE_02F188:
	LDY.b #$00
	LDA.w $1070
	SEC
	SBC.w #$FFBC
	CMP.w #$0008
	BCS.b CODE_02F19D
	DEC.b $00
	LDA.w #$FFC0
	BRA.b CODE_02F1A8

CODE_02F19D:
	BPL.b CODE_02F1A1
	INY
	INY
CODE_02F1A1:
	LDA.w $1070
	CLC
	ADC.w DATA_02EB4C,y
CODE_02F1A8:
	STA.w $1070
	LDY.b $00
	BNE.b CODE_02F1DE
	LDX.b #$00
	LDY.w $1076
CODE_02F1B4:
	LDA.w $107C,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	INX
	INX
	CPY.w $1076
	BNE.b CODE_02F1C6
	LDY.w $1078
	BRA.b CODE_02F1B4

CODE_02F1C6:
	LDX.b $12
	LDY.w $7400,x
	LDA.w DATA_02E8FB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0006
	STA.b $78,x
	LDA.w #$0040
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_02F1DE:
	RTS

CODE_02F1DF:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02F204
	LDA.b $0C
	CLC
	ADC.w $70E2,x
	STA.b $00
	LDA.b $0E
	CLC
	ADC.w $7182,x
	STA.b $02
	LDA.w #$0340
	JSL.l CODE_02E1A6
	LDA.w #$0080
	STA.w $7A96,x
	INC.b $76,x
CODE_02F204:
	RTS

CODE_02F205:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02F26D
	LDA.w $7AF8,x
	BEQ.b CODE_02F216
	LDA.w #$0001
	STA.w $7AF8,x
CODE_02F216:
	LDA.w $7042,x
	AND.w #$FFF0
	ORA.w #$000C
	STA.w $7042,x
	LDA.w $1070
	BEQ.b CODE_02F235
	LDA.w $7AF6,x
	BNE.b CODE_02F235
	INC.w $1070
	LDA.w #$0004
	STA.w $7AF6,x
CODE_02F235:
	LDA.w $7A36,x
	SEC
	SBC.w #$0008
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$00C0
	BPL.b CODE_02F24F
	LDA.w #$0030
	STA.w $7A96,x
	INC.b $76,x
CODE_02F24F:
	LDA.w #$0180
	SEC
	SBC.w $7A36,x
	BMI.b CODE_02F26D
	AND.w #$01E0
	ASL
	ASL
	ASL
	XBA
	STA.w $1080
	CMP.b $16,x
	BEQ.b CODE_02F26D
	STA.b $16,x
	JSR.w CODE_02F357
	LDX.b $12
CODE_02F26D:
	RTS

DATA_02F26E:
	db $10,$18,$00,$08,$20

CODE_02F273:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02F2CD
	LDY.w $1084
	BNE.b CODE_02F2C1
	LDA.w $70E2,x
	CLC
	ADC.b $0C
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.b $0E
	CLC
	ADC.w #$0008
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	ASL
	DEC
	STA.w $73C2,y
	STA.w $7E4C,y
	LDY.b #$10
	STY.w $1084
	LDA.w #$0020
	STA.w $7A96,x
	RTS

CODE_02F2C1:
	CPY.b #$15
	BMI.b CODE_02F2CE
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
CODE_02F2CD:
	RTS

CODE_02F2CE:
	INC.w $1084
	LDA.w $1084
	SEC
	SBC.w #$0010
	TAY
	REP.b #$10
	LDA.w DATA_02F26E-$01,y
	AND.w #$00FF
	CLC
	ADC.w $7362,x
	CLC
	ADC.w #$0080
	TAY
	LDA.w $6000,y
	CLC
	ADC.w $6094
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $6002,y
	CLC
	ADC.w $609C
	CLC
	ADC.w #$0008
	STA.b $02
	SEP.b #$10
	JSR.w CODE_02F31E
	LDA.w #$0008
	STA.w $7A96,x
CODE_02F30F:
	RTS

CODE_02F310:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02F30F
	STZ.w $7ECC
	PLA
	JML.l CODE_03A32E

CODE_02F31E:
	LDA.w #!Define_YI_AmbSpr222
	JSL.l CODE_008B21
	LDA.b $00
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.b $02
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$000F
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID0A_BreakDirt
	JSL.l CODE_0085D2
	RTS

;---------------------------------------------------------------------------

DATA_02F349:
	dw DATA_5FE48A,DATA_5FE4A6,DATA_5FE4C2,DATA_5FE4DE,DATA_5FE4FA,DATA_5FE516,DATA_5FE532

CODE_02F357:
	PHD
	LDA.w #$0000
	TCD
	LDA.w $1080
	ASL
	TAX
	LDA.w DATA_02F349,x
	STA.b $00
	PHB
	LDX.b #$7021C4>>16
	PHX
	PLB
	LDX.b #DATA_5FE48A>>16
	STX.b $02
	LDY.b #$00
CODE_02F371:
	LDA.b [$00],y
	STA.w $7021C4,y
	INY
	INY
	CPY.b #$1C
	BCC.b CODE_02F371
	PLB
	PLD
	RTS

;---------------------------------------------------------------------------

YI_NorSpr172_NavalPiranhaBuds_Init:
;$02F37F
	RTL

;---------------------------------------------------------------------------

DATA_02F380:
	dw CODE_02F4AD,CODE_02F4E4,CODE_02F56B,CODE_02F633,CODE_02F655,CODE_02F6D2,CODE_02F71A,CODE_02F78E
	dw CODE_02F7D0,CODE_02F4E4,CODE_02F655,CODE_02F800,CODE_02F4AD,CODE_02F655,CODE_02E48E,CODE_02F848
	dw CODE_02F8AA,CODE_02E48E

YI_NorSpr172_NavalPiranhaBuds_Main:
;$02F3A4
	JSR.w CODE_02F3E1
	LDY.w $1072
	LDA.w $7042,y
	STA.w $7042,x
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_02F380,x)
	JSR.w CODE_02F438
	LDY.b $76,x
	CPY.b #$0E
	BNE.b CODE_02F3DA
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	RTL

CODE_02F3DA:
	JSR.w CODE_02F497
	JSR.w CODE_02F4C1
	RTL

CODE_02F3E1:
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_02FD7D>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_02FD7D
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDY.w $7041,x
	TYA
	LSR
	LSR
	LSR
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.b $78,x
	STA.w $601E
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_08A201>>16
	LDA.w #FXCODE_08A201
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

DATA_02F41E:
	db $00,$01,$03,$05,$07,$09,$0A,$0B,$0C,$0D,$0E,$0F,$11,$12,$14,$15
	db $17,$18,$19,$19,$1B,$1B,$1B,$1B,$1A,$19

CODE_02F438:
	LDY.b $76,x
	CPY.b #$0E
	BPL.b CODE_02F47C
	LDA.w $7362,x
	BMI.b CODE_02F47C
	LDA.w $6120
	CLC
	ADC.w #$0006
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_02F47C
	LDY.w $7402,x
	LDA.w DATA_02F41E,y
	AND.w #$00FF
	STA.b $00
	CLC
	ADC.w #$0006
	CLC
	ADC.w $6122
	ASL
	STA.b $02
	LSR
	CLC
	ADC.w $7C18,x
	SEC
	SBC.b $00
	CMP.b $02
	BCS.b CODE_02F47C
	JSL.l CODE_03A858
CODE_02F47C:
	RTS

DATA_02F47D:
	db $18,$18,$10,$10,$20,$20,$18,$18,$20,$28,$28,$20,$20,$20,$28,$28
	db $28,$28,$28,$28,$28,$28,$28,$28,$28,$28

CODE_02F497:
	LDY.w $7402,x
	LDA.w DATA_02F47D,y
	TAY
	TYA
	STA.b $00
	LDA.w $7041,x
	AND.w #$FF07
	ORA.b $00
	STA.w $7041,x
	RTS

CODE_02F4AD:
	TYX
	LDA.w $1074
	CMP.w $7182,x
	BMI.b CODE_02F4BE
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
CODE_02F4BE:
	JMP.w CODE_02F52F

CODE_02F4C1:
	LDA.w $70E2,x
	CMP.w #$03B0
	BMI.b CODE_02F4CE
	LDA.w #$03AF
	BRA.b CODE_02F4D6

CODE_02F4CE:
	CMP.w #$02D0
	BPL.b CODE_02F4E3
	LDA.w #$02D0
CODE_02F4D6:
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02F4E3:
	RTS

CODE_02F4E4:
	TYX
	LDA.w $1074
	CMP.w $7182,x
	BMI.b CODE_02F4F3
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_02F4F3:
	JSR.w CODE_02F52F
	LDY.b $76,x
	CPY.b #$01
	BNE.b CODE_02F507
	LDY.w $1072
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BNE.b CODE_02F506
	STZ.b $76,x
CODE_02F506:
	RTS

CODE_02F507:
	LDY.w $7402,x
	CPY.b #$12
	BNE.b CODE_02F51E
	LDA.w $7A98,x
	BNE.b CODE_02F51E
	INC.b $76,x
	LDA.w $0CE8
	BEQ.b CODE_02F51E
	LDY.b #$0D
	STY.b $76,x
CODE_02F51E:
	RTS

DATA_02F51F:
	db $12,$13,$14,$15,$16,$17,$18,$19,$19,$18,$17,$16,$15,$14,$13,$12

CODE_02F52F:
	LDA.w $7AF6,x
	BNE.b CODE_02F55E
	LDA.b $16,x
	INC
	AND.w #$000F
	STA.b $16,x
	TAY
	LDA.w DATA_02F51F,y
	TAY
	TYA
	STA.w $7402,x
	LDY.b $76,x
	CPY.b #$09
	BEQ.b CODE_02F54F
	CPY.b #$0E
	BMI.b CODE_02F556
CODE_02F54F:
	LDA.w #$0002
	STA.w $7AF6,x
	RTS

CODE_02F556:
	LDA.b $10
	AND.w #$0005
	STA.w $7AF6,x
CODE_02F55E:
	RTS

DATA_02F55F:
	dw $0020,$FFE0

DATA_02F563:
	dw $0001,$FFFF

DATA_02F567:
	dw $03B0,$02D0

CODE_02F56B:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_02F59B
	LDY.b #$00
	LDA.w $7402,x
	CLC
	ADC.b $16,x
	CMP.w #$0001
	BMI.b CODE_02F585
	INY
	INY
	CMP.w #$0004
	BMI.b CODE_02F58C
CODE_02F585:
	PHA
	LDA.w DATA_02F563,y
	STA.b $16,x
	PLA
CODE_02F58C:
	STA.w $7402,x
	LDA.b $10
	AND.w #$0003
	CLC
	ADC.w #$0004
	STA.w $7AF6,x
CODE_02F59B:
	LDY.b #$00
	CPX.w $1076
	BNE.b CODE_02F5A4
	INY
	INY
CODE_02F5A4:
	TYA
	DEC
	STA.b $06
	LDA.w DATA_02F567,y
	STA.b $04
	LDA.w DATA_02F55F,y
	LDY.w $1072
	CLC
	ADC.w $70E2,y
	STA.b $02
	SEC
	SBC.w $70E2,x
	STA.b $00
	ASL
	ASL
	ASL
	ASL
	PHP
	CMP.w #$0300
	BMI.b CODE_02F5CC
	LDA.w #$0300
CODE_02F5CC:
	CMP.w #$FD00
	BPL.b CODE_02F5D4
	LDA.w #$FD00
CODE_02F5D4:
	STA.w $75E0,x
	PLP
	BPL.b CODE_02F5DE
	EOR.w #$FFFF
	INC
CODE_02F5DE:
	LSR
	LSR
	LSR
	LSR
	STA.w $7540,x
	LDY.w $1072
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$000D
	BMI.b CODE_02F5FF
	CMP.w #$0012
	BMI.b CODE_02F632
	CMP.w #$0015
	BMI.b CODE_02F5FF
	CMP.w #$001A
	BMI.b CODE_02F632
CODE_02F5FF:
	LDA.b $02
	SEC
	SBC.b $04
	EOR.b $06
	BPL.b CODE_02F60C
	LDA.b $04
	BRA.b CODE_02F627

CODE_02F60C:
	LDA.b $00
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_02F632
	LDA.w $70E2,y
	LDY.b #$00
	CPX.w $1076
	BNE.b CODE_02F623
	INY
	INY
CODE_02F623:
	CLC
	ADC.w DATA_02F55F,y
CODE_02F627:
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	INC.b $76,x
CODE_02F632:
	RTS

CODE_02F633:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_02F654
	LDA.w $7402,x
	INC
	CMP.w #$0012
	BMI.b CODE_02F647
	STZ.b $76,x
	LDA.w #$0012
CODE_02F647:
	STA.w $7402,x
	LDA.b $10
	AND.w #$0001
	INC
	INC
	STA.w $7AF6,x
CODE_02F654:
	RTS

CODE_02F655:
	TYX
	LDA.w $0CE8
	BNE.b CODE_02F661
	LDY.b #$0A
	STY.b $76,x
	BRA.b CODE_02F666

CODE_02F661:
	LDA.w $7A96,x
	BNE.b CODE_02F6CF
CODE_02F666:
	LDY.w $7402,x
	CPY.b #$13
	BPL.b CODE_02F6CF
	LDA.w $7AF6,x
	BNE.b CODE_02F6CF
	LDA.w $7402,x
	DEC
	BPL.b CODE_02F694
	LDA.w $1074
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $16,x
	LDA.w #$0000
	BRA.b CODE_02F6C5

CODE_02F694:
	LDY.b $76,x
	CPY.b #$0D
	BNE.b CODE_02F6B8
	CMP.w #$0005
	BPL.b CODE_02F6C5
	STA.w $7402,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0080
	STA.w $7A96,x
	LDA.w #$0001
	STA.b $16,x
	LDY.b #$06
	STY.b $76,x
	RTS

CODE_02F6B8:
	CMP.w #$0006
	BPL.b CODE_02F6C5
	PHA
	LDA.w #$0040
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLA
CODE_02F6C5:
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7AF6,x
	RTS

CODE_02F6CF:
	JMP.w CODE_02F52F

CODE_02F6D2:
	TYX
	LDA.w $0CE8
	BNE.b CODE_02F6DD
	LDY.b #$0A
	STY.b $76,x
	RTS

CODE_02F6DD:
	LDA.w $7A96,x
	BNE.b CODE_02F711
	LDY.b $16,x
	BNE.b CODE_02F6EE
	INC.b $16,x
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
CODE_02F6EE:
	LDA.w $7AF6,x
	BNE.b CODE_02F711
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$03
	BMI.b CODE_02F70B
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	INC.b $76,x
CODE_02F70B:
	LDA.w #$0003
	STA.w $7AF6,x
CODE_02F711:
	RTS

DATA_02F712:
	dw $0004,$FFFC

DATA_02F716:
	dw $FFC0,$0040

CODE_02F71A:
	TYX
	LDA.w $0CE8
	BNE.b CODE_02F72B
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$0A
	STY.b $76,x
	RTS

CODE_02F72B:
	LDA.w $7A96,x
	BNE.b CODE_02F745
	LDA.w $7C16,x
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_02F745
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	INC.b $76,x
	RTS

CODE_02F745:
	LDY.b #$00
	CPX.w $1076
	BEQ.b CODE_02F74E
	INY
	INY
CODE_02F74E:
	LDA.w DATA_02F712,y
	LDY.b #$00
	CLC
	ADC.w $7C16,x
	BPL.b CODE_02F75B
	INY
	INY
CODE_02F75B:
	LDA.w DATA_02F716,y
	STA.w $75E0,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w $7AF6,x
	BNE.b CODE_02F78D
	LDA.w $7402,x
	CLC
	ADC.b $16,x
	STA.w $7402,x
	CMP.w #$0003
	BEQ.b CODE_02F77F
	CMP.w #$0005
	BMI.b CODE_02F787
CODE_02F77F:
	LDA.b $16,x
	EOR.w #$FFFF
	INC
	STA.b $16,x
CODE_02F787:
	LDA.w #$0008
	STA.w $7AF6,x
CODE_02F78D:
	RTS

CODE_02F78E:
	TYX
	LDA.w $0CE8
	BNE.b CODE_02F799
	LDY.b #$0A
	STY.b $76,x
	RTS

CODE_02F799:
	LDY.w $7402,x
	BNE.b CODE_02F7CC
	LDA.w #$0020
	STA.w $7A96,x
	STZ.b $16,x
	INC.b $76,x
CODE_02F7A8:
	LDA.w #!Define_YI_AmbSpr1BA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $1074
	STA.w $7142,y
	LDA.w #$001A
	STA.w $7E4C,y
	LDA.w #!Define_YI_SoundID03_Swim
	STA.w $7782,y
	JSL.l CODE_0085D2
	RTS

CODE_02F7CC:
	DEC.w $7402,x
	RTS

CODE_02F7D0:
	TYX
	LDA.w $0CE8
	BNE.b CODE_02F7DB
	LDY.b #$0A
	STY.b $76,x
	RTS

CODE_02F7DB:
	LDA.w $7A96,x
	BNE.b CODE_02F7FB
	LDY.b $16,x
	BNE.b CODE_02F7E9
	INC.b $16,x
	JSR.w CODE_02F7A8
CODE_02F7E9:
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$12
	BMI.b CODE_02F7FB
	LDA.w #$0040
	STA.w $7A98,x
	INC.b $76,x
CODE_02F7FB:
	RTS

DATA_02F7FC:
	dw $0020,$FFE0

CODE_02F800:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02F843
	LDY.b $16,x
	BNE.b CODE_02F826
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	CPX.w $1076
	BNE.b CODE_02F819
	INY
	INY
CODE_02F819:
	LDA.w DATA_02F7FC,y
	LDY.w $1072
	CLC
	ADC.w $70E2,y
	STA.w $70E2,x
CODE_02F826:
	LDA.w $7AF6,x
	BNE.b CODE_02F843
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$12
	BMI.b CODE_02F83D
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_02F83D:
	LDA.w #$0004
	STA.w $7AF6,x
CODE_02F843:
	RTS

DATA_02F844:
	dw $0040,$FFC0

CODE_02F848:
	TYX
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w $7AF6,x
	BNE.b CODE_02F8A4
	LDY.w $7402,x
	CPY.b #$12
	BEQ.b CODE_02F872
	BPL.b CODE_02F868
	INC.w $7402,x
	BRA.b CODE_02F86B

CODE_02F868:
	DEC.w $7402,x
CODE_02F86B:
	LDA.w #$0004
	STA.w $7AF6,x
	RTS

CODE_02F872:
	LDY.b #$00
	LDA.w $1074
	CMP.w $7182,x
	BEQ.b CODE_02F887
	BPL.b CODE_02F880
	INY
	INY
CODE_02F880:
	LDA.w DATA_02F844,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_02F887:
	LDY.w $1072
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0025
	BNE.b CODE_02F8A4
	LDA.w #$0010
	STA.w $7A38,x
CODE_02F898:
	DEC
	AND.b $10
	CLC
	ADC.w #$0018
	STA.w $7A96,x
	INC.b $76,x
CODE_02F8A4:
	RTS

DATA_02F8A5:
	db $20,$00,$18,$10,$08

CODE_02F8AA:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02F8FC
	LDY.b $78,x
	CPY.b #$05
	BNE.b CODE_02F8B9
	INC.b $76,x
	RTS

CODE_02F8B9:
	INC.b $78,x
	LDY.b $78,x
	REP.b #$10
	LDA.w DATA_02F8A5-$01,y
	AND.w #$00FF
	CLC
	ADC.w $7362,x
	TAY
	LDA.w $6000,y
	CLC
	ADC.w $6094
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $6002,y
	CLC
	ADC.w $609C
	CLC
	ADC.w #$0008
	STA.b $02
	SEP.b #$10
	JSR.w CODE_02F31E
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w $7A38,x
	STA.w $7A96,x
	LDA.w $7A38,x
	LSR
	STA.w $7A38,x
CODE_02F8FC:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr002_NavalPiranhaVines_Init:
;$02F8FD
	RTL

;---------------------------------------------------------------------------

DATA_02F8FE:
	dw CODE_02FA5E,CODE_02FB78,CODE_02FBB8,CODE_02FBE3,CODE_02E48E,CODE_02FA5E,CODE_02FB78

DATA_02F90C:
	dw $0000,$0040,$FFC0

YI_NorSpr002_NavalPiranhaVines_Main:
;$02F912
	LDY.w $1072
	LDA.w $7042,y
	STA.w $7042,x
	JSR.w CODE_02F9CC
	JSL.l CODE_03AF23
	LDY.w $1072
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$001C
	BMI.b CODE_02F986
	CMP.w #$001F
	BNE.b CODE_02F942
	LDY.w $1076
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.w $1078
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BEQ.b CODE_02F974
	BRA.b CODE_02F986

CODE_02F942:
	CMP.w #$0020
	BMI.b CODE_02F974
	LDY.b $76,x
	CPY.b #$02
	BPL.b CODE_02F98F
	LDY.b #$02
	STY.b $76,x
	LDY.b #$00
	LDA.w $1074
	CMP.w $7182,x
	BEQ.b CODE_02F963
	PHP
	INY
	INY
	PLP
	BPL.b CODE_02F963
	INY
	INY
CODE_02F963:
	LDA.w DATA_02F90C,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0004
	STA.w $7A36,x
	BRA.b CODE_02F98F

CODE_02F974:
	LDA.w $7542,x
	BEQ.b CODE_02F97B
	STA.b $78,x
CODE_02F97B:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	BRA.b CODE_02F9C7

CODE_02F986:
	LDA.b $78,x
	BEQ.b CODE_02F98F
	STA.w $7542,x
	STZ.b $78,x
CODE_02F98F:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_02F8FE,x)
	JSR.w CODE_02F9F3
	JSR.w CODE_02FA09
	JSR.w CODE_02FA19
	LDY.w $1072
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$000E
	BEQ.b CODE_02F9B5
	CMP.w #$0016
	BMI.b CODE_02F9C7
	CMP.w #$0019
	BPL.b CODE_02F9C7
CODE_02F9B5:
	LDA.w #$0100
	STA.w $75E2,x
	LDA.b $10
	AND.w #$000F
	CLC
	ADC.w #$0010
	STA.w $7542,x
CODE_02F9C7:
	RTL

DATA_02F9C8:
	dw $0818,$1000

CODE_02F9CC:
	LDA.w $7A38,x
	BEQ.b CODE_02F9F2
	STA.b $02
	REP.b #$10
	LDA.w $7362,x
	STA.b $00
CODE_02F9DA:
	LDY.b $02
	LDA.w DATA_02F9C8-$01,y
	AND.w #$00FF
	CLC
	ADC.b $00
	TAY
	LDA.w #$8000
	STA.w $6000,y
	DEC.b $02
	BNE.b CODE_02F9DA
	SEP.b #$10
CODE_02F9F2:
	RTS

CODE_02F9F3:
	LDA.w $7A98,x
	BNE.b CODE_02FA08
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
	LDA.w $7A36,x
	STA.w $7A98,x
CODE_02FA08:
	RTS

CODE_02FA09:
	LDY.b $76,x
	CPY.b #$02
	BPL.b CODE_02FA18
	LDY.w $7D36,x
	BPL.b CODE_02FA18
	JSL.l CODE_03A858
CODE_02FA18:
	RTS

CODE_02FA19:
	LDY.b $76,x
	CPY.b #$05
	BPL.b CODE_02FA41
	LDA.w $70E2,x
	CMP.w #$03A0
	BMI.b CODE_02FA2C
	LDA.w #$039F
	BRA.b CODE_02FA34

CODE_02FA2C:
	CMP.w #$02F0
	BPL.b CODE_02FA41
	LDA.w #$02F0
CODE_02FA34:
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
CODE_02FA3E:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_02FA41:
	RTS

DATA_02FA42:
	dw CODE_02FA70,CODE_02FA70,CODE_02FAC7,CODE_02FAC7,CODE_02FAC7,CODE_02FAC7,CODE_02FAC7,CODE_02FAC7
	dw CODE_02FAC7,CODE_02FAC7,CODE_02FAC7,CODE_02FAC7,CODE_02FAC7,CODE_02FAC7

CODE_02FA5E:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02FA6F
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	ASL
	TXY
	TAX
	JSR.w (DATA_02FA42,x)
CODE_02FA6F:
	RTS

CODE_02FA70:
	CPX.b #$02
	BMI.b CODE_02FA78
	CPX.b #$0A
	BMI.b CODE_02FA7B
CODE_02FA78:
	TYX
	STZ.b $76,x
CODE_02FA7B:
	TYX
	STZ.w $7400,x
	LDY.w $1072
	LDA.b $10
	PHA
	AND.w #$007F
	SEC
	SBC.w #$0040
	BPL.b CODE_02FA94
	INC.w $7400,x
	INC.w $7400,x
CODE_02FA94:
	CLC
	ADC.w $70E2,y
	STA.w $70E2,x
	PLA
	PHA
	XBA
	AND.w #$001F
	CLC
	ADC.w #$FF70
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $75E2,x
	LDA.w #$0002
	STA.w $7542,x
	PLA
	XBA
	AND.w #$0003
	CLC
	ADC.w #$0004
	STA.w $7A36,x
	INC.b $76,x
	RTS

DATA_02FAC3:
	dw $0010,$0030

CODE_02FAC7:
	TYX
	STZ.w $7400,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w #$0400
	BMI.b CODE_02FAF2
	LDA.w #$0400
CODE_02FAF2:
	CMP.w #$FC00
	BPL.b CODE_02FAFA
	LDA.w #$FC00
CODE_02FAFA:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_02FB05
	LDA.w #$0002
	STA.w $7400,x
CODE_02FB05:
	LDX.b #$00
	LDA.w $70E2,y
	LDY.w $1072
	SEC
	SBC.w $70E2,y
	BPL.b CODE_02FB15
	INX
	INX
CODE_02FB15:
	LDA.b $10
	PHA
	AND.w #$003F
	SEC
	SBC.w DATA_02FAC3,x
	LDX.b $12
	LDY.b $18,x
	CLC
	ADC.w $70E2,y
	STA.w $70E2,x
	LDY.w $1072
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$000E
	BEQ.b CODE_02FB3F
	CMP.w #$0016
	BMI.b CODE_02FB53
	CMP.w #$0019
	BPL.b CODE_02FB53
CODE_02FB3F:
	PLA
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.w $7A36,x
	LSR
	STA.w $7540,x
	INC.b $76,x
	RTS

CODE_02FB53:
	PLA
	PHA
	XBA
	AND.w #$003F
	CLC
	ADC.w #$FF20
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	PLA
	AND.w #$0003
	INC
	INC
	STA.w $7A36,x
	INC.b $76,x
	RTS

CODE_02FB78:
	TYX
	LDY.w $7223,x
	BMI.b CODE_02FBB7
	LDA.w $1074
	CLC
	ADC.w #$0018
	CMP.w $7182,x
	BPL.b CODE_02FBB7
	STA.w $7182,x
	LDA.w $7542,x
	CMP.w #$0010
	BPL.b CODE_02FBA9
	LDA.b $10
	AND.w #$007F
	CLC
	ADC.w #$0020
	CMP.w #$0060
	BMI.b CODE_02FBA6
	LDA.w #$0060
CODE_02FBA6:
	STA.w $7A96,x
CODE_02FBA9:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.b $76,x
CODE_02FBB7:
	RTS

CODE_02FBB8:
	TYX
	LDA.w $1074
	CMP.w $7182,x
	BNE.b CODE_02FBB7
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7402,x
	BNE.b CODE_02FBB7
	LDA.w #$FFFF
	STA.w $7A98,x
	LDY.w $1072
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0025
	BMI.b CODE_02FBB7
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JMP.w CODE_02F898

CODE_02FBE3:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_02FC38
	LDY.w $7A38,x
	CPY.b #$04
	BNE.b CODE_02FBF3
	INC.b $76,x
	RTS

CODE_02FBF3:
	INC.w $7A38,x
	LDY.w $7A38,x
	REP.b #$10
	LDA.w DATA_02F9C8-$01,y
	AND.w #$00FF
	CLC
	ADC.w $7362,x
	TAY
	LDA.w $6000,y
	CLC
	ADC.w $6094
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $6002,y
	CLC
	ADC.w $609C
	CLC
	ADC.w #$0008
	STA.b $02
	SEP.b #$10
	JSR.w CODE_02F31E
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7A96,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LSR
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_02FC38:
	RTS

DATA_02FC39:
	dw DATA_02FC51,DATA_02FC6A,DATA_02FC83,DATA_02FC9C,DATA_02FCB5,DATA_02FCCE,DATA_02FCE7,DATA_02FD00
	dw DATA_02FD19,DATA_02FD32,DATA_02FD4B,DATA_02FD64

DATA_02FC51:
	db $F6,$FC,$20,$00,$02,$00,$04,$08,$C0,$02,$00,$F4,$08,$40,$02,$09
	db $EA,$08,$80,$02,$09,$DA,$08,$00,$02

DATA_02FC6A:
	db $F7,$FB,$0E,$00,$02,$01,$F4,$28,$C0,$02,$08,$D9,$28,$80,$02,$08
	db $E9,$28,$00,$02,$01,$04,$28,$40,$02

DATA_02FC83:
	db $F8,$FA,$2C,$00,$02,$02,$F4,$22,$40,$02,$07,$D7,$22,$00,$02,$07
	db $E7,$22,$80,$02,$02,$04,$22,$C0,$02

DATA_02FC9C:
	db $F8,$FB,$20,$00,$02,$01,$F4,$28,$C0,$02,$08,$D9,$28,$80,$02,$08
	db $E9,$28,$00,$02,$01,$04,$28,$40,$02

DATA_02FCB5:
	db $FC,$FA,$2E,$00,$02,$02,$F4,$22,$40,$02,$07,$D7,$22,$00,$02,$07
	db $E7,$22,$80,$02,$02,$04,$22,$C0,$02

DATA_02FCCE:
	db $01,$FA,$2E,$00,$02,$04,$F4,$24,$40,$02,$05,$D6,$24,$00,$02,$05
	db $E6,$24,$80,$02,$04,$04,$24,$C0,$02

DATA_02FCE7:
	db $F5,$FC,$20,$00,$02,$FF,$04,$08,$C0,$02,$FF,$F4,$08,$40,$02,$08
	db $EA,$08,$80,$02,$08,$DA,$08,$00,$02

DATA_02FD00:
	db $F6,$FB,$0E,$00,$02,$00,$F4,$28,$C0,$02,$07,$D9,$28,$80,$02,$07
	db $E9,$28,$00,$02,$00,$04,$28,$40,$02

DATA_02FD19:
	db $F7,$FA,$2C,$00,$02,$01,$F4,$22,$40,$02,$06,$D7,$22,$00,$02,$06
	db $E7,$22,$80,$02,$01,$04,$22,$C0,$02

DATA_02FD32:
	db $F5,$FC,$20,$00,$02,$FF,$04,$08,$C0,$02,$FF,$F4,$08,$40,$02,$08
	db $EA,$08,$80,$02,$08,$DA,$08,$00,$02

DATA_02FD4B:
	db $F6,$FB,$0E,$00,$02,$00,$F4,$28,$C0,$02,$07,$D9,$28,$80,$02,$07
	db $E9,$28,$00,$02,$00,$04,$28,$40,$02

DATA_02FD64:
	db $F7,$FA,$2C,$00,$02,$01,$F4,$22,$40,$02,$06,$D7,$22,$00,$02,$06
	db $E7,$22,$80,$02,$01,$04,$22,$C0,$02

DATA_02FD7D:
	dw DATA_02FDB1,DATA_02FDC0,DATA_02FDCF,DATA_02FDD9,DATA_02FDE3,DATA_02FDF7,DATA_02FE0B,DATA_02FE1A
	dw DATA_02FE29,DATA_02FE3D,DATA_02FE56,DATA_02FE6F,DATA_02FE83,DATA_02FE97,DATA_02FEAB,DATA_02FEC4
	dw DATA_02FEDD,DATA_02FEF6,DATA_02FF0F,DATA_02FF28,DATA_02FF41,DATA_02FF5A,DATA_02FF73,DATA_02FF8C
	dw DATA_02FFA5,DATA_02FFBE

DATA_02FDB1:
	db $01,$00,$26,$00,$02,$00,$0C,$3B,$40,$00,$08,$0C,$3A,$40,$00

DATA_02FDC0:
	db $00,$FE,$26,$00,$02,$00,$0C,$0D,$C0,$00,$08,$0C,$0C,$C0,$00

DATA_02FDCF:
	db $00,$FB,$26,$00,$02,$00,$04,$0A,$C0,$02

DATA_02FDD9:
	db $FF,$F6,$26,$00,$02,$00,$04,$2A,$40,$02

DATA_02FDE3:
	db $FF,$F2,$26,$00,$02,$00,$FC,$1D,$40,$00,$08,$FC,$1C,$40,$00,$00
	db $04,$0C,$C0,$02

DATA_02FDF7:
	db $FF,$EE,$26,$00,$02,$08,$FC,$2A,$C0,$00,$00,$FC,$2B,$C0,$00,$00
	db $04,$0A,$C0,$02

DATA_02FE0B:
	db $00,$EC,$26,$00,$02,$00,$04,$08,$C0,$02,$00,$F4,$08,$40,$02

DATA_02FE1A:
	db $02,$E9,$26,$00,$02,$00,$04,$2A,$40,$02,$00,$F4,$0A,$40,$02

DATA_02FE29:
	db $05,$E7,$26,$00,$02,$00,$F4,$0C,$40,$02,$0F,$F3,$0B,$80,$00,$00
	db $04,$0C,$C0,$02

DATA_02FE3D:
	db $06,$E5,$26,$00,$02,$11,$F2,$0B,$80,$00,$09,$F2,$0A,$80,$00,$00
	db $04,$0A,$C0,$02,$00,$F4,$2A,$C0,$02

DATA_02FE56:
	db $08,$E3,$26,$00,$02,$00,$04,$08,$C0,$02,$00,$F4,$08,$40,$02,$11
	db $F2,$09,$80,$00,$09,$F2,$08,$80,$00

DATA_02FE6F:
	db $00,$F4,$0A,$40,$02,$09,$E1,$26,$00,$02,$09,$EA,$2A,$00,$02,$00
	db $04,$2A,$40,$02

DATA_02FE83:
	db $0A,$DE,$26,$00,$02,$09,$EA,$0C,$80,$02,$00,$04,$0C,$C0,$02,$00
	db $F4,$0C,$40,$02

DATA_02FE97:
	db $0A,$DB,$26,$00,$02,$09,$EA,$0A,$80,$02,$00,$04,$0A,$C0,$02,$00
	db $F4,$2A,$C0,$02

DATA_02FEAB:
	db $0A,$D8,$26,$00,$02,$09,$EA,$08,$80,$02,$09,$E2,$18,$00,$02,$00
	db $04,$08,$C0,$02,$00,$F4,$08,$40,$02

DATA_02FEC4:
	db $09,$D5,$26,$00,$02,$09,$EA,$2A,$00,$02,$09,$E2,$1A,$00,$02,$00
	db $04,$2A,$40,$02,$00,$F4,$0A,$40,$02

DATA_02FEDD:
	db $09,$EA,$0C,$80,$02,$08,$D2,$26,$00,$02,$00,$04,$0C,$C0,$02,$00
	db $F4,$0C,$40,$02,$09,$DA,$0C,$00,$02

DATA_02FEF6:
	db $09,$EA,$0A,$80,$02,$06,$CF,$26,$00,$02,$00,$04,$0A,$C0,$02,$00
	db $F4,$2A,$C0,$02,$09,$DA,$2A,$80,$02

DATA_02FF0F:
	db $00,$F4,$08,$40,$02,$04,$CD,$26,$00,$02,$09,$DA,$08,$00,$02,$09
	db $EA,$08,$80,$02,$00,$04,$08,$C0,$02

DATA_02FF28:
	db $04,$CC,$26,$00,$02,$01,$04,$28,$40,$02,$01,$F4,$28,$C0,$02,$08
	db $D9,$28,$80,$02,$08,$E9,$28,$00,$02

DATA_02FF41:
	db $04,$CA,$26,$00,$02,$02,$04,$22,$C0,$02,$02,$F4,$22,$40,$02,$07
	db $D7,$22,$00,$02,$07,$E7,$22,$80,$02

DATA_02FF5A:
	db $04,$C9,$26,$00,$02,$04,$04,$24,$C0,$02,$04,$F4,$24,$40,$02,$05
	db $D6,$24,$00,$02,$05,$E6,$24,$80,$02

DATA_02FF73:
	db $04,$C9,$26,$40,$02,$04,$04,$24,$80,$02,$04,$F4,$24,$00,$02,$03
	db $D6,$24,$40,$02,$03,$E6,$24,$C0,$02

DATA_02FF8C:
	db $04,$CA,$26,$40,$02,$06,$04,$22,$80,$02,$06,$F4,$22,$00,$02,$01
	db $D7,$22,$40,$02,$01,$E7,$22,$C0,$02

DATA_02FFA5:
	db $04,$CC,$26,$40,$02,$07,$04,$28,$00,$02,$07,$F4,$28,$80,$02,$00
	db $D9,$28,$C0,$02,$00,$E9,$28,$40,$02

DATA_02FFBE:
	db $FF,$EA,$08,$C0,$02,$04,$CD,$26,$40,$02,$08,$04,$08,$80,$02,$08
	db $F4,$08,$00,$02,$FF,$DA,$08,$40,$02

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($02FFD7, incbin, DATA_02FFD7_YI_U2.bin)
else
	%FREE_BYTES($02FFD7, 41, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank03Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_038000:
	dl YI_NorSpr000_LavaLog_Init
	dl YI_NorSpr001_ClosedDoor_Init
	dl YI_NorSpr002_NavalPiranhaVines_Init
	dl YI_NorSpr003_CrateWithKey_Init
	dl YI_NorSpr004_HitSuperBabyMarioBlock_Init
	dl YI_NorSpr005_IcyWatermelon_Init
	dl YI_NorSpr006_WatermelonFreeze_Init
	dl YI_NorSpr007_Watermelon_Init
	dl YI_NorSpr008_FallingRubble_Init
	dl YI_NorSpr009_FireWatermelon_Init
	dl YI_NorSpr00A_Kaboomba_Init
	dl YI_NorSpr00B_Cannonball_Init
	dl YI_NorSpr00C_RaphaelTheRaven_Init
	dl YI_NorSpr00D_GoalRing_Init
	dl YI_NorSpr00E_GOALLetters_Init
	dl YI_NorSpr00F_BonusChallengeSign_Init
	dl YI_NorSpr010_RoundedCagedGhost_Init
	dl YI_NorSpr011_ItemCard_Init
	dl YI_NorSpr012_BossDoor_Init
	dl YI_NorSpr013_BossExplosion_Init
	dl YI_NorSpr014_KeyFromBoss_Init
	dl YI_NorSpr015_SubmarineTorpedo_Init
	dl YI_NorSpr016_BiggerBoo_Init
	dl YI_NorSpr017_FrogPirate_Init
	dl YI_NorSpr018_WatermelonFlame_Init
	dl YI_NorSpr019_Bubble_Init
	dl YI_NorSpr01A_SkiLift_Init
	dl YI_NorSpr01B_VerticalLavaLog_Init
	dl YI_NorSpr01C_DrFreezegood_Init
	dl YI_NorSpr01D_DrFreezegoodOnSkiLift_Init
	dl YI_NorSpr01E_Shyguy_Init
	dl YI_NorSpr01F_RotatingDoors_Init
	dl YI_NorSpr020_Bandit_Init
	dl YI_NorSpr021_Bucket_Init
	dl YI_NorSpr022_FlashingEgg_Init
	dl YI_NorSpr023_RedEgg_Init
	dl YI_NorSpr024_YellowEgg_Init
	dl YI_NorSpr025_GreenEgg_Init
	dl YI_NorSpr026_BowserFightGiantEgg_Init
	dl YI_NorSpr027_Key_Init
	dl YI_NorSpr028_HuffinPuffin_Init
	dl YI_NorSpr029_GiantEgg_Init
	dl YI_NorSpr02A_RedGiantEgg_Init
	dl YI_NorSpr02B_GreenGiantEgg_Init
	dl YI_NorSpr02C_LungeFish_Init
	dl YI_NorSpr02D_SalvoTheSlime_Init
	dl YI_NorSpr02E_EyesOfSalvoTheSlime_Init
	dl YI_NorSpr02F_LittleMouserHole_Init
	dl YI_NorSpr030_LittleMouser_Init
	dl YI_NorSpr031_PottedSpikedFunGuy_Init
	dl YI_NorSpr032_PeekingLittleMouser_Init
	dl YI_NorSpr033_LittleMouserExitingNest_Init
	dl YI_NorSpr034_RogersPot_Init
	dl YI_NorSpr035_RogerThePottedGhost_Init
	dl YI_NorSpr036_FallingWall_Init
	dl YI_NorSpr037_GrimLeecher_Init
	dl YI_NorSpr038_PottedGhostFlame_Init
	dl YI_NorSpr039_HorizontalRotatingPlank_Init
	dl YI_NorSpr03A_3MiniRavens_Init
	dl YI_NorSpr03B_MiniRaven_Init
	dl YI_NorSpr03C_TapTapTheRedNose_Init
	dl YI_NorSpr03D_LargeSeesaw_Init
	dl YI_NorSpr03E_ThinPlatform_Init
	dl YI_NorSpr03F_SlimeBlock_Init
	dl YI_NorSpr040_BabyLuigi_Init
	dl YI_NorSpr041_Stork_Init
	dl YI_NorSpr042_VerticalPipeEntrance_Init
	dl YI_NorSpr042_RedGiantShyguy_Init
	dl YI_NorSpr043_GreenGiantShyguy_Init
	dl YI_NorSpr045_PrinceFroggy_Init
	dl YI_NorSpr046_BurtTheBashful_Init
	dl YI_NorSpr047_ShyguyPushingRoger_Init
	dl YI_NorSpr048_CutsceneKamek_Init
	dl YI_NorSpr049_ThunderLakituFireBlast1_Init
	dl YI_NorSpr04A_ThunderLakituFireBlast2_Init
	dl YI_NorSpr04B_ThunderLakituFireBlast3_Init
	dl YI_NorSpr04C_UpsidedownBlowHard_Init
	dl YI_NorSpr04D_UnusedSpriteIndex_Init
	dl YI_NorSpr04E_LockedDoor_Init
	dl YI_NorSpr04F_MiddleRing_Init
	dl YI_NorSpr050_GreyRotatingWoodenBoard_Init
	dl YI_NorSpr051_LargeWheel_Init
	dl YI_NorSpr052_BalloonPlatform_Init
	dl YI_NorSpr053_KamekSayingOhMy_Init
	dl YI_NorSpr054_UpsideDownPiranhaPlant_Init
	dl YI_NorSpr055_4GreenRotatingPlatforms_Init
	dl YI_NorSpr056_4PinkRotatingPlatforms_Init
	dl YI_NorSpr057_SewerGhostWithPlatform_Init
	dl YI_NorSpr058_GreenToady_Init
	dl YI_NorSpr059_StationarySuperStar_Init
	dl YI_NorSpr05A_RaphaelSparkAttack_Init
	dl YI_NorSpr05B_RedCoinBandit_Init
	dl YI_NorSpr05C_PinkToady_Init
	dl YI_NorSpr05D_GlitchedSprite_Init
	dl YI_NorSpr05E_BrownWoodenBoard_Init
	dl YI_NorSpr05F_AutoRotateBrownWoodenBoard_Init
	dl YI_NorSpr060_Bomb_Init
	dl YI_NorSpr061_BabyMario_Init
	dl YI_NorSpr062_Goomba_Init
	dl YI_NorSpr063_MuddyBuddy_Init
	dl YI_NorSpr064_4AutoRotatingPinkPlatforms_Init
	dl YI_NorSpr065_RedCoin_Init
	dl YI_NorSpr066_PiranhaPlant_Init
	dl YI_NorSpr067_RockRevealedHiddenWingedCloud_Init
	dl YI_NorSpr068_FlashingEggBlock_Init
	dl YI_NorSpr069_RedEggBlock_Init
	dl YI_NorSpr06A_YellowEggBlock_Init
	dl YI_NorSpr06B_GreenEggBlock_Init
	dl YI_NorSpr06C_LargeSpringBall_Init
	dl YI_NorSpr06D_ClockwiseHootieTheBlueFish_Init
	dl YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_Init
	dl YI_NorSpr06F_SpringBall_Init
	dl YI_NorSpr070_Clawdaddy_Init
	dl YI_NorSpr071_BigBoo_Init
	dl YI_NorSpr072_TrainBandit_Init
	dl YI_NorSpr073_BalloonPump_Init
	dl YI_NorSpr074_Spike_Init
	dl YI_NorSpr075_SpikeBall_Init
	dl YI_NorSpr076_ClockwisePiroDangle_Init
	dl YI_NorSpr077_CounterclockwisePiroDangle_Init
	dl YI_NorSpr078_RedBulletBillShooter_Init
	dl YI_NorSpr079_YellowBulletBillShooter_Init
	dl YI_NorSpr07A_GreenBulletBillShooter_Init
	dl YI_NorSpr07B_RedBulletBill_Init
	dl YI_NorSpr07C_YellowBulletBill_Init
	dl YI_NorSpr07D_GreenBulletBill_Init
	dl YI_NorSpr07E_DentOfSquishyPlatform_Init
	dl YI_NorSpr07F_LogSeesawPlatform_Init
	dl YI_NorSpr080_StraightLavaBubble_Init
	dl YI_NorSpr081_FollowingLavaBubble_Init
	dl YI_NorSpr082_ChainChomp_Init
	dl YI_NorSpr083_BowserFightCloud_Init
	dl YI_NorSpr084_TeleportSprite_Init
	dl YI_NorSpr085_HarryHedgehog_Init
	dl YI_NorSpr086_GlitchedSprite_Init
	dl YI_NorSpr087_MockUpLaidEgg_Init
	dl YI_NorSpr088_SuperStar_Init
	dl YI_NorSpr089_HorizontalMovingRedPlatform_Init
	dl YI_NorSpr08A_VerticalMovingPinkPlatform_Init
	dl YI_NorSpr08B_MockUp_Init
	dl YI_NorSpr08C_YoshiAtGoal_Init
	dl YI_NorSpr08D_Flyguy_Init
	dl YI_NorSpr08E_BowserRoomKamek_Init
	dl YI_NorSpr08F_MonkeySwing_Init
	dl YI_NorSpr090_DanglingGhost_Init
	dl YI_NorSpr091_4RedToadies_Init
	dl YI_NorSpr092_MelonBug_Init
	dl YI_NorSpr093_Door_Init
	dl YI_NorSpr094_ExpandingBlock_Init
	dl YI_NorSpr095_BlueCheckeredBlock_Init
	dl YI_NorSpr096_RedCheckeredBlock_Init
	dl YI_NorSpr097_POWBlock_Init
	dl YI_NorSpr098_EndTransformationBlock_Init
	dl YI_NorSpr099_SpinyEgg_Init
	dl YI_NorSpr09A_SwingingGreenPlatform_Init
	dl YI_NorSpr09B_MaceGuy_Init
	dl YI_NorSpr09C_Mace_Init
	dl YI_NorSpr09D_RedSwitch_Init
	dl YI_NorSpr09E_ChompRock_Init
	dl YI_NorSpr09F_PtooiePiranhaPlant_Init
	dl YI_NorSpr0A0_Tulip_Init
	dl YI_NorSpr0A1_SmallPot_Init
	dl YI_NorSpr0A2_ThunderLakituFireball_Init
	dl YI_NorSpr0A3_LeftHidingBandit_Init
	dl YI_NorSpr0A4_RightHidingBandit_Init
	dl YI_NorSpr0A5_NepEnut_Init
	dl YI_NorSpr0A6_IncomingChomp_Init
	dl YI_NorSpr0A7_GroupOfIncomingChomps_Init
	dl YI_NorSpr0A8_FallingIncomingChomp_Init
	dl YI_NorSpr0A9_IncomingChompShadow_Init
	dl YI_NorSpr0AA_BackgroundShyguy_Init
	dl YI_NorSpr0AB_FullEggSpawner_Init
	dl YI_NorSpr0AC_FallingRockArrowAndShadow_Init
	dl YI_NorSpr0AD_MessageBox_Init
	dl YI_NorSpr0AE_HookbillTheKoopa_Init
	dl YI_NorSpr0AF_CarMorphBubble_Init
	dl YI_NorSpr0B0_MoleMorphBubble_Init
	dl YI_NorSpr0B1_HelicopterMorphBubble_Init
	dl YI_NorSpr0B2_TrainMorphBubble_Init
	dl YI_NorSpr0B3_FuzzyFart_Init
	dl YI_NorSpr0B4_SubmarineMorphBubble_Init
	dl YI_NorSpr0B5_HiddenWingedCloud_Init
	dl YI_NorSpr0B6_WingedCloudWith8Coins_Init
	dl YI_NorSpr0B7_WingedCloudWithBubbled1up_Init
	dl YI_NorSpr0B8_WingedCloudWithFlower_Init
	dl YI_NorSpr0B9_WingedCloudWithPOW_Init
	dl YI_NorSpr0BA_WingedCloudWithStairs_Init
	dl YI_NorSpr0BB_WingedCloudWithPlatform_Init
	dl YI_NorSpr0BC_WingedCloudWithBandit_Init
	dl YI_NorSpr0BD_WingedCloudWithCoin_Init
	dl YI_NorSpr0BE_WingedCloudWith1up_Init
	dl YI_NorSpr0BF_WingedCloudWithKey_Init
	dl YI_NorSpr0C0_WingedCloudWith3Stars_Init
	dl YI_NorSpr0C1_WingedCloudWith5Stars_Init
	dl YI_NorSpr0C2_WingedCloudWithDoor_Init
	dl YI_NorSpr0C3_WingedCloudWithLowerGround_Init
	dl YI_NorSpr0C4_WingedCloudWithWatermelon_Init
	dl YI_NorSpr0C5_WingedCloudWithFireWatermelon_Init
	dl YI_NorSpr0C6_WingedCloudWithIcyWatermelon_Init
	dl YI_NorSpr0C7_WingedCloudWith3LeafSunflower_Init
	dl YI_NorSpr0C8_WingedCloudWith6LeafSunflower_Init
	dl YI_NorSpr0C9_WingedCloudWithCrashGameFeature_Init
	dl YI_NorSpr0CA_BigBossDoor_Init
	dl YI_NorSpr0CB_WingedCloudWithCoinOrStar_Init
	dl YI_NorSpr0CC_WingedCloudWithRedSwitch_Init
	dl YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_Init
	dl YI_NorSpr0CE_BowserFire_Init
	dl YI_NorSpr0CF_BowserRocks_Init
	dl YI_NorSpr0D0_HorizontalEntranceToRight_Init
	dl YI_NorSpr0D1_SecretPipeEntrance_Init
	dl YI_NorSpr0D2_MarchingMilde_Init
	dl YI_NorSpr0D3_LargeMilde_Init
	dl YI_NorSpr0D4_MediumMilde_Init
	dl YI_NorSpr0D5_BackgroundForHookbillFight_Init
	dl YI_NorSpr0D6_FortGhostWithPlatform_Init
	dl YI_NorSpr0D7_SluggyTheUnshaven_Init
	dl YI_NorSpr0D8_ChompWarningSign_Init
	dl YI_NorSpr0D9_FishinLakitu_Init
	dl YI_NorSpr0DA_FlowerPot_Init
	dl YI_NorSpr0DB_SoftBlock_Init
	dl YI_NorSpr0DC_Snowball_Init
	dl YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_Init
	dl YI_NorSpr0DE_FallingRockPlatform_Init
	dl YI_NorSpr0DF_PiscatoryPete_Init
	dl YI_NorSpr0E0_PreyingMantas_Init
	dl YI_NorSpr0E1_LochNestor_Init
	dl YI_NorSpr0E2_BooBlah_Init
	dl YI_NorSpr0E3_BooBlahWithPiroDangle_Init
	dl YI_NorSpr0E4_HeadingCactus_Init
	dl YI_NorSpr0E5_GreenNeedlenose_Init
	dl YI_NorSpr0E6_Gusty_Init
	dl YI_NorSpr0E7_Burt_Init
	dl YI_NorSpr0E8_Goonie_Init
	dl YI_NorSpr0E9_3WinglessGoonies_Init
	dl YI_NorSpr0EA_VerticalCloudDrop_Init
	dl YI_NorSpr0EB_HorizontalCloudDrop_Init
	dl YI_NorSpr0EC_JumpingFlamerGuy_Init
	dl YI_NorSpr0ED_RunningFlamerGuy_Init
	dl YI_NorSpr0EE_EggoDil_Init
	dl YI_NorSpr0EF_EggoDilFace_Init
	dl YI_NorSpr0F0_EggoDilPetal_Init
	dl YI_NorSpr0F1_EggPlantShootingBubbles_Init
	dl YI_NorSpr0F2_ShyguyOnStilts_Init
	dl YI_NorSpr0F3_WoozyGuy_Init
	dl YI_NorSpr0F4_EggPlant_Init
	dl YI_NorSpr0F5_Slugger_Init
	dl YI_NorSpr0F6_MotherHuffinPuffin_Init
	dl YI_NorSpr0F7_BarneyBubble_Init
	dl YI_NorSpr0F8_BlowHard_Init
	dl YI_NorSpr0F9_YellowNeedlenose_Init
	dl YI_NorSpr0FA_Flower_Init
	dl YI_NorSpr0FB_LongSpearGuy_Init
	dl YI_NorSpr0FC_ShortSpearGuy_Init
	dl YI_NorSpr0FD_ZeusGuy_Init
	dl YI_NorSpr0FE_ZeusGuyBlast_Init
	dl YI_NorSpr0FF_Poochy_Init
	dl YI_NorSpr100_Bubbled1up_Init
	dl YI_NorSpr101_RotatingMace_Init
	dl YI_NorSpr102_DoubleRotatingMace_Init
	dl YI_NorSpr103_BooGuysMovingMace_Init
	dl YI_NorSpr104_JeanDeFillet_Init
	dl YI_NorSpr105_BooGuysCarryingBombToLeft_Init
	dl YI_NorSpr106_BooGuysCarryingBombToRight_Init
	dl YI_NorSpr107_WatermelonSeed_Init
	dl YI_NorSpr108_Milde_Init
	dl YI_NorSpr109_BronzeTapTap_Init
	dl YI_NorSpr10A_SilverTapTap_Init
	dl YI_NorSpr10B_HoppingSilverTapTap_Init
	dl YI_NorSpr10C_ChainedSpikeBall_Init
	dl YI_NorSpr10D_BooGuyOperatingPulley_Init
	dl YI_NorSpr10E_CrateWith6Stars_Init
	dl YI_NorSpr10F_BooManBluff_Init
	dl YI_NorSpr110_Flower_Init
	dl YI_NorSpr111_GeorgetteJelly_Init
	dl YI_NorSpr112_GeorgetteJellyGoo_Init
	dl YI_NorSpr113_Snifit_Init
	dl YI_NorSpr114_SnifitBullet_Init
	dl YI_NorSpr115_Coin_Init
	dl YI_NorSpr116_BuoyantRoundPlatform_Init
	dl YI_NorSpr117_DonutLift_Init
	dl YI_NorSpr118_LargeDonutLift_Init
	dl YI_NorSpr119_Spooky_Init
	dl YI_NorSpr11A_GreenGlove_Init
	dl YI_NorSpr11B_Lakitu_Init
	dl YI_NorSpr11C_LakituCloud_Init
	dl YI_NorSpr11D_SpinyEgg_Init
	dl YI_NorSpr11E_BrownArrowWheel_Init
	dl YI_NorSpr11F_BlueArrowWheel_Init
	dl YI_NorSpr120_DoubledSidedArrowLift_Init
	dl YI_NorSpr121_NumberPlatformExplosion_Init
	dl YI_NorSpr122_BucketWithBandit_Init
	dl YI_NorSpr123_BucketWithCoins_Init
	dl YI_NorSpr124_Stretch_Init
	dl YI_NorSpr125_AttackingAndEndingKamek_Init
	dl YI_NorSpr126_SpikedLogOnPulley_Init
	dl YI_NorSpr127_PulleyOfSpikedLog_Init
	dl YI_NorSpr128_GroundRippleInBabyBowerRoom_Init
	dl YI_NorSpr129_Fuzzy_Init
	dl YI_NorSpr12A_ShyGuyBanditTrap_Init
	dl YI_NorSpr12B_FatGuy_Init
	dl YI_NorSpr12C_FlyOrWhirlyGuy_Init
	dl YI_NorSpr12D_PrologueCutsceneYoshi_Init
	dl YI_NorSpr12E_LargePopEffect_Init
	dl YI_NorSpr12F_HorizontalLavaDrop_Init
	dl YI_NorSpr130_VerticalLavaDrop_Init
	dl YI_NorSpr131_LockedDoor_Init
	dl YI_NorSpr132_LemonDrop_Init
	dl YI_NorSpr133_LanternGhost_Init
	dl YI_NorSpr134_BabyBowser_Init
	dl YI_NorSpr135_CirclingRaven_Init
	dl YI_NorSpr136_CirclingRaven_Init
	dl YI_NorSpr137_3x6FallingStone_Init
	dl YI_NorSpr138_3x3FallingStone_Init
	dl YI_NorSpr139_3x9FallingStone_Init
	dl YI_NorSpr13A_6x3FallingStone_Init
	dl YI_NorSpr13B_StomachAcid_Init
	dl YI_NorSpr13C_DownFlippers_Init
	dl YI_NorSpr13D_DanglingFang_Init
	dl YI_NorSpr13E_FlyingFang_Init
	dl YI_NorSpr13F_SwimmingFlopsyFish_Init
	dl YI_NorSpr140_SwimmingAndJumpingFlopsyFish_Init
	dl YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_Init
	dl YI_NorSpr142_3JumpFlopsyFish_Init
	dl YI_NorSpr143_SprayFish_Init
	dl YI_NorSpr144_RightOrLeftFlippers_Init
	dl YI_NorSpr145_BlueSluggy_Init
	dl YI_NorSpr146_PinkSluggy_Init
	dl YI_NorSpr147_HorizontalEntranceToLeft_Init
	dl YI_NorSpr148_LargeSpringBall_Init
	dl YI_NorSpr149_UpArrowCloud_Init
	dl YI_NorSpr14A_UpRightArrowCloud_Init
	dl YI_NorSpr14B_RightArrowCloud_Init
	dl YI_NorSpr14C_DownRightArrowCloud_Init
	dl YI_NorSpr14D_DownArrowCloud_Init
	dl YI_NorSpr14E_DownLeftArrowCloud_Init
	dl YI_NorSpr14F_LeftArrowCloud_Init
	dl YI_NorSpr150_UpLeftArrowCloud_Init
	dl YI_NorSpr151_RotatingArrowCloud_Init
	dl YI_NorSpr152_Flutter_Init
	dl YI_NorSpr153_GoonieWithShyGuy_Init
	dl YI_NorSpr154_SharkChomp_Init
	dl YI_NorSpr155_FatGoonie_Init
	dl YI_NorSpr156_CactusJack_Init
	dl YI_NorSpr157_WallLakitu_Init
	dl YI_NorSpr158_BowlingGoonie_Init
	dl YI_NorSpr159_WalkingGrunt_Init
	dl YI_NorSpr15A_RunningGrunt_Init
	dl YI_NorSpr15B_DancingSpearGuy_Init
	dl YI_NorSpr15C_GreenRotatingPlatformSwitch_Init
	dl YI_NorSpr15D_RedRotatingPlatformSwitch_Init
	dl YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_Init
	dl YI_NorSpr15F_GreenSpikedPlatform_Init
	dl YI_NorSpr160_RedSpikedPlatform_Init
	dl YI_NorSpr161_RewardItemForDefeatingRoomEnemies_Init
	dl YI_NorSpr162_DoubleSpikePlatformWithSwitch_Init
	dl YI_NorSpr163_BouncingNeedlenose_Init
	dl YI_NorSpr164_NipperPlant_Init
	dl YI_NorSpr165_NipperSpore_Init
	dl YI_NorSpr166_ThunderLakitu_Init
	dl YI_NorSpr167_GreenKoopaShell_Init
	dl YI_NorSpr168_RedKoopaShell_Init
	dl YI_NorSpr169_GreenNakedKoopa_Init
	dl YI_NorSpr16A_RedNakedKoopa_Init
	dl YI_NorSpr16B_GreenKoopa_Init
	dl YI_NorSpr16C_RedKoopa_Init
	dl YI_NorSpr16D_GreenParakoopa_Init
	dl YI_NorSpr16E_RedHorizontalParakoopa_Init
	dl YI_NorSpr16F_RedVerticalParakoopa_Init
	dl YI_NorSpr170_AquaLakitu_Init
	dl YI_NorSpr171_NavalPiranha_Init
	dl YI_NorSpr172_NavalPiranhaBuds_Init
	dl YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_Init
	dl YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_Init
	dl YI_NorSpr175_BaronVonZeppelinCarryingBomb_Init
	dl YI_NorSpr176_BaronVonZeppelinCarryingBandit_Init
	dl YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_Init
	dl YI_NorSpr178_BaronVonZeppelinCarrying1up_Init
	dl YI_NorSpr179_BaronVonZeppelinCarryingKey_Init
	dl YI_NorSpr17A_BaronVonZeppelinCarryingCoins_Init
	dl YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_Init
	dl YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_Init
	dl YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_Init
	dl YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_Init
	dl YI_NorSpr17F_BaronVonZeppelin_Init
	dl YI_NorSpr180_SpinningLog_Init
	dl YI_NorSpr181_CrazeeDayzee_Init
	dl YI_NorSpr182_Dragonfly_Init
	dl YI_NorSpr183_Butterfly_Init
	dl YI_NorSpr184_Bumpty_Init
	dl YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_Init
	dl YI_NorSpr186_MovingLineGuidedGreenPlatformRight_Init
	dl YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_Init
	dl YI_NorSpr188_MovingLineGuidedYellowPlatformRight_Init
	dl YI_NorSpr189_LineGuidedGreenPlatformLeft_Init
	dl YI_NorSpr18A_LineGuidedGreenPlatformRight_Init
	dl YI_NorSpr18B_LineGuidedYellowPlatformLeft_Init
	dl YI_NorSpr18C_LineGuidedYellowPlatformRight_Init
	dl YI_NorSpr18D_LineGuidedRedPlatformLeft_Init
	dl YI_NorSpr18E_LineGuidedGreenPlatformRight_Init
	dl YI_NorSpr18F_SpiralPlatform_Init
	dl YI_NorSpr190_FallingIcicle_Init
	dl YI_NorSpr191_Bird_Init
	dl YI_NorSpr192_PetalGuy_Init
	dl YI_NorSpr193_SnakeCagedGhost_Init
	dl YI_NorSpr194_Blargg_Init
	dl YI_NorSpr195_SmallUnstableSnowPlatform_Init
	dl YI_NorSpr196_UnstableSnowPlatform_Init
	dl YI_NorSpr197_ArrowSign_Init
	dl YI_NorSpr198_DiagonalArrowSign_Init
	dl YI_NorSpr199_DizzyDandy_Init
	dl YI_NorSpr19A_BooGuy_Init
	dl YI_NorSpr19B_TacklingBumpty_Init
	dl YI_NorSpr19C_FlyingBumpty_Init
	dl YI_NorSpr19D_SkeletonGoonie_Init
	dl YI_NorSpr19E_WinglessSkeletonGoonie_Init
	dl YI_NorSpr19F_SkeletonGoonieCarryingBomb_Init
	dl YI_NorSpr1A0_DoubleFirebar_Init
	dl YI_NorSpr1A1_Firebar_Init
	dl YI_NorSpr1A2_HealthStar_Init
	dl YI_NorSpr1A3_LittleSkullMouser_Init
	dl YI_NorSpr1A4_KeyholeCork_Init
	dl YI_NorSpr1A5_RunAwayMonkey_Init
	dl YI_NorSpr1A6_MonkeyWithWatermelon_Init
	dl YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_Init
	dl YI_NorSpr1A8_TheifMonkey_Init
	dl YI_NorSpr1A9_HangingMonkeySpittingSeeds_Init
	dl YI_NorSpr1AA_HotLips_Init
	dl YI_NorSpr1AB_BooBalloon_Init
	dl YI_NorSpr1AC_SmallFrog_Init
	dl YI_NorSpr1AD_MagicShootingKamek_Init
	dl YI_NorSpr1AE_MagicShot_Init
	dl YI_NorSpr1AF_FloatingCoin_Init
	dl YI_NorSpr1B0_DeflatingBalloon_Init
	dl YI_NorSpr1B1_CoinCannon_Init
	dl YI_NorSpr1B2_MinigameCoin_Init
	dl YI_NorSpr1B3_GatherCoinsBandit_Init
	dl YI_NorSpr1B4_MinigameCheckeredPlatform_Init
	dl YI_NorSpr1B5_PoppingBalloonsBandit_Init
	dl YI_NorSpr1B6_MinigameBalloon_Init
	dl YI_NorSpr1B7_SeedSpittingMinigameBandit_Init
	dl YI_NorSpr1B8_WatermelonPot_Init
	dl YI_NorSpr1B9_P2SeedSpittingMinigameBandit_Init

DATA_03852E:
	dl YI_NorSpr000_LavaLog_Main
	dl YI_NorSpr001_ClosedDoor_Main
	dl YI_NorSpr002_NavalPiranhaVines_Main
	dl YI_NorSpr003_CrateWithKey_Main
	dl YI_NorSpr004_HitSuperBabyMarioBlock_Main
	dl YI_NorSpr005_IcyWatermelon_Main
	dl YI_NorSpr006_WatermelonFreeze_Main
	dl YI_NorSpr007_Watermelon_Main
	dl YI_NorSpr008_FallingRubble_Main
	dl YI_NorSpr009_FireWatermelon_Main
	dl YI_NorSpr00A_Kaboomba_Main
	dl YI_NorSpr00B_Cannonball_Main
	dl YI_NorSpr00C_RaphaelTheRaven_Main
	dl YI_NorSpr00D_GoalRing_Main
	dl YI_NorSpr00E_GOALLetters_Main
	dl YI_NorSpr00F_BonusChallengeSign_Main
	dl YI_NorSpr010_RoundedCagedGhost_Main
	dl YI_NorSpr011_ItemCard_Main
	dl YI_NorSpr012_BossDoor_Main
	dl YI_NorSpr013_BossExplosion_Main
	dl YI_NorSpr014_KeyFromBoss_Main
	dl YI_NorSpr015_SubmarineTorpedo_Main
	dl YI_NorSpr016_BiggerBoo_Main
	dl YI_NorSpr017_FrogPirate_Main
	dl YI_NorSpr018_WatermelonFlame_Main
	dl YI_NorSpr019_Bubble_Main
	dl YI_NorSpr01A_SkiLift_Main
	dl YI_NorSpr01B_VerticalLavaLog_Main
	dl YI_NorSpr01C_DrFreezegood_Main
	dl YI_NorSpr01D_DrFreezegoodOnSkiLift_Main
	dl YI_NorSpr01E_Shyguy_Main
	dl YI_NorSpr01F_RotatingDoors_Main
	dl YI_NorSpr020_Bandit_Main
	dl YI_NorSpr021_Bucket_Main
	dl YI_NorSpr022_FlashingEgg_Main
	dl YI_NorSpr023_RedEgg_Main
	dl YI_NorSpr024_YellowEgg_Main
	dl YI_NorSpr025_GreenEgg_Main
	dl YI_NorSpr026_BowserFightGiantEgg_Main
	dl YI_NorSpr027_Key_Main
	dl YI_NorSpr028_HuffinPuffin_Main
	dl YI_NorSpr029_GiantEgg_Main
	dl YI_NorSpr02A_RedGiantEgg_Main
	dl YI_NorSpr02B_GreenGiantEgg_Main
	dl YI_NorSpr02C_LungeFish_Main
	dl YI_NorSpr02D_SalvoTheSlime_Main
	dl YI_NorSpr02E_EyesOfSalvoTheSlime_Main
	dl YI_NorSpr02F_LittleMouserHole_Main
	dl YI_NorSpr030_LittleMouser_Main
	dl YI_NorSpr031_PottedSpikedFunGuy_Main
	dl YI_NorSpr032_PeekingLittleMouser_Main
	dl YI_NorSpr033_LittleMouserExitingNest_Main
	dl YI_NorSpr034_RogersPot_Main
	dl YI_NorSpr035_RogerThePottedGhost_Main
	dl YI_NorSpr036_FallingWall_Main
	dl YI_NorSpr037_GrimLeecher_Main
	dl YI_NorSpr038_PottedGhostFlame_Main
	dl YI_NorSpr039_HorizontalRotatingPlank_Main
	dl YI_NorSpr03A_3MiniRavens_Main
	dl YI_NorSpr03B_MiniRaven_Main
	dl YI_NorSpr03C_TapTapTheRedNose_Main
	dl YI_NorSpr03D_LargeSeesaw_Main
	dl YI_NorSpr03E_ThinPlatform_Main
	dl YI_NorSpr03F_SlimeBlock_Main
	dl YI_NorSpr040_BabyLuigi_Main
	dl YI_NorSpr041_Stork_Main
	dl YI_NorSpr042_VerticalPipeEntrance_Main
	dl YI_NorSpr043_RedGiantShyguy_Main
	dl YI_NorSpr044_GreenGiantShyguy_Main
	dl YI_NorSpr045_PrinceFroggy_Main
	dl YI_NorSpr046_BurtTheBashful_Main
	dl YI_NorSpr047_ShyguyPushingRoger_Main
	dl YI_NorSpr048_CutsceneKamek_Main
	dl YI_NorSpr049_ThunderLakituFireBlast1_Main
	dl YI_NorSpr04A_ThunderLakituFireBlast2_Main
	dl YI_NorSpr04B_ThunderLakituFireBlast3_Main
	dl YI_NorSpr04C_UpsidedownBlowHard_Main
	dl YI_NorSpr04D_UnusedSpriteIndex_Main
	dl YI_NorSpr04E_LockedDoor_Main
	dl YI_NorSpr04F_MiddleRing_Main
	dl YI_NorSpr050_GreyRotatingWoodenBoard_Main
	dl YI_NorSpr051_LargeWheel_Main
	dl YI_NorSpr052_BalloonPlatform_Main
	dl YI_NorSpr053_KamekSayingOhMy_Main
	dl YI_NorSpr054_UpsideDownPiranhaPlant_Main
	dl YI_NorSpr055_4GreenRotatingPlatforms_Main
	dl YI_NorSpr056_4PinkRotatingPlatforms_Main
	dl YI_NorSpr057_SewerGhostWithPlatform_Main
	dl YI_NorSpr058_GreenToady_Main
	dl YI_NorSpr059_StationarySuperStar_Main
	dl YI_NorSpr05A_RaphaelSparkAttack_Main
	dl YI_NorSpr05B_RedCoinBandit_Main
	dl YI_NorSpr05C_PinkToady_Main
	dl YI_NorSpr05D_GlitchedSprite_Main
	dl YI_NorSpr05E_BrownWoodenBoard_Main
	dl YI_NorSpr05F_AutoRotateBrownWoodenBoard_Main
	dl YI_NorSpr060_Bomb_Main
	dl YI_NorSpr061_BabyMario_Main
	dl YI_NorSpr062_Goomba_Main
	dl YI_NorSpr063_MuddyBuddy_Main
	dl YI_NorSpr064_4AutoRotatingPinkPlatforms_Main
	dl YI_NorSpr065_RedCoin_Main
	dl YI_NorSpr066_PiranhaPlant_Main
	dl YI_NorSpr067_RockRevealedHiddenWingedCloud_Main
	dl YI_NorSpr068_FlashingEggBlock_Main
	dl YI_NorSpr069_RedEggBlock_Main
	dl YI_NorSpr06A_YellowEggBlock_Main
	dl YI_NorSpr06B_GreenEggBlock_Main
	dl YI_NorSpr06C_LargeSpringBall_Main
	dl YI_NorSpr06D_ClockwiseHootieTheBlueFish_Main
	dl YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_Main
	dl YI_NorSpr06F_SpringBall_Main
	dl YI_NorSpr070_Clawdaddy_Main
	dl YI_NorSpr071_BigBoo_Main
	dl YI_NorSpr072_TrainBandit_Main
	dl YI_NorSpr073_BalloonPump_Main
	dl YI_NorSpr074_Spike_Main
	dl YI_NorSpr075_SpikeBall_Main
	dl YI_NorSpr076_ClockwisePiroDangle_Main
	dl YI_NorSpr077_CounterclockwisePiroDangle_Main
	dl YI_NorSpr078_RedBulletBillShooter_Main
	dl YI_NorSpr079_YellowBulletBillShooter_Main
	dl YI_NorSpr07A_GreenBulletBillShooter_Main
	dl YI_NorSpr07B_RedBulletBill_Main
	dl YI_NorSpr07C_YellowBulletBill_Main
	dl YI_NorSpr07D_GreenBulletBill_Main
	dl YI_NorSpr07E_DentOfSquishyPlatform_Main
	dl YI_NorSpr07F_LogSeesawPlatform_Main
	dl YI_NorSpr080_StraightLavaBubble_Main
	dl YI_NorSpr081_FollowingLavaBubble_Main
	dl YI_NorSpr082_ChainChomp_Main
	dl YI_NorSpr083_BowserFightCloud_Main
	dl YI_NorSpr084_TeleportSprite_Main
	dl YI_NorSpr085_HarryHedgehog_Main
	dl YI_NorSpr086_GlitchedSprite_Main
	dl YI_NorSpr087_MockUpLaidEgg_Main
	dl YI_NorSpr088_SuperStar_Main
	dl YI_NorSpr089_HorizontalMovingRedPlatform_Main
	dl YI_NorSpr08A_VerticalMovingPinkPlatform_Main
	dl YI_NorSpr08B_MockUp_Main
	dl YI_NorSpr08C_YoshiAtGoal_Main
	dl YI_NorSpr08D_Flyguy_Main
	dl YI_NorSpr08E_BowserRoomKamek_Main
	dl YI_NorSpr08F_MonkeySwing_Main
	dl YI_NorSpr090_DanglingGhost_Main
	dl YI_NorSpr091_4RedToadies_Main
	dl YI_NorSpr092_MelonBug_Main
	dl YI_NorSpr093_Door_Main
	dl YI_NorSpr094_ExpandingBlock_Main
	dl YI_NorSpr095_BlueCheckeredBlock_Main
	dl YI_NorSpr096_RedCheckeredBlock_Main
	dl YI_NorSpr097_POWBlock_Main
	dl YI_NorSpr098_EndTransformationBlock_Main
	dl YI_NorSpr099_SpinyEgg_Main
	dl YI_NorSpr09A_SwingingGreenPlatform_Main
	dl YI_NorSpr09B_MaceGuy_Main
	dl YI_NorSpr09C_Mace_Main
	dl YI_NorSpr09D_RedSwitch_Main
	dl YI_NorSpr09E_ChompRock_Main
	dl YI_NorSpr09F_PtooiePiranhaPlant_Main
	dl YI_NorSpr0A0_Tulip_Main
	dl YI_NorSpr0A1_SmallPot_Main
	dl YI_NorSpr0A2_ThunderLakituFireball_Main
	dl YI_NorSpr0A3_LeftHidingBandit_Main
	dl YI_NorSpr0A4_RightHidingBandit_Main
	dl YI_NorSpr0A5_NepEnut_Main
	dl YI_NorSpr0A6_IncomingChomp_Main
	dl YI_NorSpr0A7_GroupOfIncomingChomps_Main
	dl YI_NorSpr0A8_FallingIncomingChomp_Main
	dl YI_NorSpr0A9_IncomingChompShadow_Main
	dl YI_NorSpr0AA_BackgroundShyguy_Main
	dl YI_NorSpr0AB_FullEggSpawner_Main
	dl YI_NorSpr0AC_FallingRockArrowAndShadow_Main
	dl YI_NorSpr0AD_MessageBox_Main
	dl YI_NorSpr0AE_HookbillTheKoopa_Main
	dl YI_NorSpr0AF_CarMorphBubble_Main
	dl YI_NorSpr0B0_MoleMorphBubble_Main
	dl YI_NorSpr0B1_HelicopterMorphBubble_Main
	dl YI_NorSpr0B2_TrainMorphBubble_Main
	dl YI_NorSpr0B3_FuzzyFart_Main
	dl YI_NorSpr0B4_SubmarineMorphBubble_Main
	dl YI_NorSpr0B5_HiddenWingedCloud_Main
	dl YI_NorSpr0B6_WingedCloudWith8Coins_Main
	dl YI_NorSpr0B7_WingedCloudWithBubbled1up_Main
	dl YI_NorSpr0B8_WingedCloudWithFlower_Main
	dl YI_NorSpr0B9_WingedCloudWithPOW_Main
	dl YI_NorSpr0BA_WingedCloudWithStairs_Main
	dl YI_NorSpr0BB_WingedCloudWithPlatform_Main
	dl YI_NorSpr0BC_WingedCloudWithBandit_Main
	dl YI_NorSpr0BD_WingedCloudWithCoin_Main
	dl YI_NorSpr0BE_WingedCloudWith1up_Main
	dl YI_NorSpr0BF_WingedCloudWithKey_Main
	dl YI_NorSpr0C0_WingedCloudWith3Stars_Main
	dl YI_NorSpr0C1_WingedCloudWith5Stars_Main
	dl YI_NorSpr0C2_WingedCloudWithDoor_Main
	dl YI_NorSpr0C3_WingedCloudWithLowerGround_Main
	dl YI_NorSpr0C4_WingedCloudWithWatermelon_Main
	dl YI_NorSpr0C5_WingedCloudWithFireWatermelon_Main
	dl YI_NorSpr0C6_WingedCloudWithIcyWatermelon_Main
	dl YI_NorSpr0C7_WingedCloudWith3LeafSunflower_Main
	dl YI_NorSpr0C8_WingedCloudWith6LeafSunflower_Main
	dl YI_NorSpr0C9_WingedCloudWithCrashGameFeature_Main
	dl YI_NorSpr0CA_BigBossDoor_Main
	dl YI_NorSpr0CB_WingedCloudWithCoinOrStar_Main
	dl YI_NorSpr0CC_WingedCloudWithRedSwitch_Main
	dl YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_Main
	dl YI_NorSpr0CE_BowserFire_Main
	dl YI_NorSpr0CF_BowserRocks_Main
	dl YI_NorSpr0D0_HorizontalEntranceToRight_Main
	dl YI_NorSpr0D1_SecretPipeEntrance_Main
	dl YI_NorSpr0D2_MarchingMilde_Main
	dl YI_NorSpr0D3_LargeMilde_Main
	dl YI_NorSpr0D4_MediumMilde_Main
	dl YI_NorSpr0D5_BackgroundForHookbillFight_Main
	dl YI_NorSpr0D6_FortGhostWithPlatform_Main
	dl YI_NorSpr0D7_SluggyTheUnshaven_Main
	dl YI_NorSpr0D8_ChompWarningSign_Main
	dl YI_NorSpr0D9_FishinLakitu_Main
	dl YI_NorSpr0DA_FlowerPot_Main
	dl YI_NorSpr0DB_SoftBlock_Main
	dl YI_NorSpr0DC_Snowball_Main
	dl YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_Main
	dl YI_NorSpr0DE_FallingRockPlatform_Main
	dl YI_NorSpr0DF_PiscatoryPete_Main
	dl YI_NorSpr0E0_PreyingMantas_Main
	dl YI_NorSpr0E1_LochNestor_Main
	dl YI_NorSpr0E2_BooBlah_Main
	dl YI_NorSpr0E3_BooBlahWithPiroDangle_Main
	dl YI_NorSpr0E4_HeadingCactus_Main
	dl YI_NorSpr0E5_GreenNeedlenose_Main
	dl YI_NorSpr0E6_Gusty_Main
	dl YI_NorSpr0E7_Burt_Main
	dl YI_NorSpr0E8_Goonie_Main
	dl YI_NorSpr0E9_3WinglessGoonies_Main
	dl YI_NorSpr0EA_VerticalCloudDrop_Main
	dl YI_NorSpr0EB_HorizontalCloudDrop_Main
	dl YI_NorSpr0EC_JumpingFlamerGuy_Main
	dl YI_NorSpr0ED_RunningFlamerGuy_Main
	dl YI_NorSpr0EE_EggoDil_Main
	dl YI_NorSpr0EF_EggoDilFace_Main
	dl YI_NorSpr0F0_EggoDilPetal_Main
	dl YI_NorSpr0F1_EggPlantShootingBubbles_Main
	dl YI_NorSpr0F2_ShyguyOnStilts_Main
	dl YI_NorSpr0F3_WoozyGuy_Main
	dl YI_NorSpr0F4_EggPlant_Main
	dl YI_NorSpr0F5_Slugger_Main
	dl YI_NorSpr0F6_MotherHuffinPuffin_Main
	dl YI_NorSpr0F7_BarneyBubble_Main
	dl YI_NorSpr0F8_BlowHard_Main
	dl YI_NorSpr0F9_YellowNeedlenose_Main
	dl YI_NorSpr0FA_Flower_Main
	dl YI_NorSpr0FB_LongSpearGuy_Main
	dl YI_NorSpr0FC_ShortSpearGuy_Main
	dl YI_NorSpr0FD_ZeusGuy_Main
	dl YI_NorSpr0FE_ZeusGuyBlast_Main
	dl YI_NorSpr0FF_Poochy_Main
	dl YI_NorSpr100_Bubbled1up_Main
	dl YI_NorSpr101_RotatingMace_Main
	dl YI_NorSpr102_DoubleRotatingMace_Main
	dl YI_NorSpr103_BooGuysMovingMace_Main
	dl YI_NorSpr104_JeanDeFillet_Main
	dl YI_NorSpr105_BooGuysCarryingBombToLeft_Main
	dl YI_NorSpr106_BooGuysCarryingBombToRight_Main
	dl YI_NorSpr107_WatermelonSeed_Main
	dl YI_NorSpr108_Milde_Main
	dl YI_NorSpr109_BronzeTapTap_Main
	dl YI_NorSpr10A_SilverTapTap_Main
	dl YI_NorSpr10B_HoppingSilverTapTap_Main
	dl YI_NorSpr10C_ChainedSpikeBall_Main
	dl YI_NorSpr10D_BooGuyOperatingPulley_Main
	dl YI_NorSpr10E_CrateWith6Stars_Main
	dl YI_NorSpr10F_BooManBluff_Main
	dl YI_NorSpr110_Flower_Main
	dl YI_NorSpr111_GeorgetteJelly_Main
	dl YI_NorSpr112_GeorgetteJellyGoo_Main
	dl YI_NorSpr113_Snifit_Main
	dl YI_NorSpr114_SnifitBullet_Main
	dl YI_NorSpr115_Coin_Main
	dl YI_NorSpr116_BuoyantRoundPlatform_Main
	dl YI_NorSpr117_DonutLift_Main
	dl YI_NorSpr118_LargeDonutLift_Main
	dl YI_NorSpr119_Spooky_Main
	dl YI_NorSpr11A_GreenGlove_Main
	dl YI_NorSpr11B_Lakitu_Main
	dl YI_NorSpr11C_LakituCloud_Main
	dl YI_NorSpr11D_SpinyEgg_Main
	dl YI_NorSpr11E_BrownArrowWheel_Main
	dl YI_NorSpr11F_BlueArrowWheel_Main
	dl YI_NorSpr120_DoubledSidedArrowLift_Main
	dl YI_NorSpr121_NumberPlatformExplosion_Main
	dl YI_NorSpr122_BucketWithBandit_Main
	dl YI_NorSpr123_BucketWithCoins_Main
	dl YI_NorSpr124_Stretch_Main
	dl YI_NorSpr125_AttackingAndEndingKamek_Main
	dl YI_NorSpr126_SpikedLogOnPulley_Main
	dl YI_NorSpr127_PulleyOfSpikedLog_Main
	dl YI_NorSpr128_GroundRippleInBabyBowerRoom_Main
	dl YI_NorSpr129_Fuzzy_Main
	dl YI_NorSpr12A_ShyGuyBanditTrap_Main
	dl YI_NorSpr12B_FatGuy_Main
	dl YI_NorSpr12C_FlyOrWhirlyGuy_Main
	dl YI_NorSpr12D_PrologueCutsceneYoshi_Main
	dl YI_NorSpr12E_LargePopEffect_Main
	dl YI_NorSpr12F_HorizontalLavaDrop_Main
	dl YI_NorSpr130_VerticalLavaDrop_Main
	dl YI_NorSpr131_LockedDoor_Main
	dl YI_NorSpr132_LemonDrop_Main
	dl YI_NorSpr133_LanternGhost_Main
	dl YI_NorSpr134_BabyBowser_Main
	dl YI_NorSpr135_CirclingRaven_Main
	dl YI_NorSpr136_CirclingRaven_Main
	dl YI_NorSpr137_3x6FallingStone_Main
	dl YI_NorSpr138_3x3FallingStone_Main
	dl YI_NorSpr139_3x9FallingStone_Main
	dl YI_NorSpr13A_6x3FallingStone_Main
	dl YI_NorSpr13B_StomachAcid_Main
	dl YI_NorSpr13C_DownFlippers_Main
	dl YI_NorSpr13D_DanglingFang_Main
	dl YI_NorSpr13E_FlyingFang_Main
	dl YI_NorSpr13F_SwimmingFlopsyFish_Main
	dl YI_NorSpr140_SwimmingAndJumpingFlopsyFish_Main
	dl YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_Main
	dl YI_NorSpr142_3JumpFlopsyFish_Main
	dl YI_NorSpr143_SprayFish_Main
	dl YI_NorSpr144_RightOrLeftFlippers_Main
	dl YI_NorSpr145_BlueSluggy_Main
	dl YI_NorSpr146_PinkSluggy_Main
	dl YI_NorSpr147_HorizontalEntranceToLeft_Main
	dl YI_NorSpr148_LargeSpringBall_Main
	dl YI_NorSpr149_UpArrowCloud_Main
	dl YI_NorSpr14A_UpRightArrowCloud_Main
	dl YI_NorSpr14B_RightArrowCloud_Main
	dl YI_NorSpr14C_DownRightArrowCloud_Main
	dl YI_NorSpr14D_DownArrowCloud_Main
	dl YI_NorSpr14E_DownLeftArrowCloud_Main
	dl YI_NorSpr14F_LeftArrowCloud_Main
	dl YI_NorSpr150_UpLeftArrowCloud_Main
	dl YI_NorSpr151_RotatingArrowCloud_Main
	dl YI_NorSpr152_Flutter_Main
	dl YI_NorSpr153_GoonieWithShyGuy_Main
	dl YI_NorSpr154_SharkChomp_Main
	dl YI_NorSpr155_FatGoonie_Main
	dl YI_NorSpr156_CactusJack_Main
	dl YI_NorSpr157_WallLakitu_Main
	dl YI_NorSpr158_BowlingGoonie_Main
	dl YI_NorSpr159_WalkingGrunt_Main
	dl YI_NorSpr15A_RunningGrunt_Main
	dl YI_NorSpr15B_DancingSpearGuy_Main
	dl YI_NorSpr15C_GreenRotatingPlatformSwitch_Main
	dl YI_NorSpr15D_RedRotatingPlatformSwitch_Main
	dl YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_Main
	dl YI_NorSpr15F_GreenSpikedPlatform_Main
	dl YI_NorSpr160_RedSpikedPlatform_Main
	dl YI_NorSpr161_RewardItemForDefeatingRoomEnemies_Main
	dl YI_NorSpr162_DoubleSpikePlatformWithSwitch_Main
	dl YI_NorSpr163_BouncingNeedlenose_Main
	dl YI_NorSpr164_NipperPlant_Main
	dl YI_NorSpr165_NipperSpore_Main
	dl YI_NorSpr166_ThunderLakitu_Main
	dl YI_NorSpr167_GreenKoopaShell_Main
	dl YI_NorSpr168_RedKoopaShell_Main
	dl YI_NorSpr169_GreenNakedKoopa_Main
	dl YI_NorSpr16A_RedNakedKoopa_Main
	dl YI_NorSpr16B_GreenKoopa_Main
	dl YI_NorSpr16C_RedKoopa_Main
	dl YI_NorSpr16D_GreenParakoopa_Main
	dl YI_NorSpr16E_RedHorizontalParakoopa_Main
	dl YI_NorSpr16F_RedVerticalParakoopa_Main
	dl YI_NorSpr170_AquaLakitu_Main
	dl YI_NorSpr171_NavalPiranha_Main
	dl YI_NorSpr172_NavalPiranhaBuds_Main
	dl YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_Main
	dl YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_Main
	dl YI_NorSpr175_BaronVonZeppelinCarryingBomb_Main
	dl YI_NorSpr176_BaronVonZeppelinCarryingBandit_Main
	dl YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_Main
	dl YI_NorSpr178_BaronVonZeppelinCarrying1up_Main
	dl YI_NorSpr179_BaronVonZeppelinCarryingKey_Main
	dl YI_NorSpr17A_BaronVonZeppelinCarryingCoins_Main
	dl YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_Main
	dl YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_Main
	dl YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_Main
	dl YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_Main
	dl YI_NorSpr17F_BaronVonZeppelin_Main
	dl YI_NorSpr180_SpinningLog_Main
	dl YI_NorSpr181_CrazeeDayzee_Main
	dl YI_NorSpr182_Dragonfly_Main
	dl YI_NorSpr183_Butterfly_Main
	dl YI_NorSpr184_Bumpty_Main
	dl YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_Main
	dl YI_NorSpr186_MovingLineGuidedGreenPlatformRight_Main
	dl YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_Main
	dl YI_NorSpr188_MovingLineGuidedYellowPlatformRight_Main
	dl YI_NorSpr189_LineGuidedGreenPlatformLeft_Main
	dl YI_NorSpr18A_LineGuidedGreenPlatformRight_Main
	dl YI_NorSpr18B_LineGuidedYellowPlatformLeft_Main
	dl YI_NorSpr18C_LineGuidedYellowPlatformRight_Main
	dl YI_NorSpr18D_LineGuidedRedPlatformLeft_Main
	dl YI_NorSpr18E_LineGuidedGreenPlatformRight_Main
	dl YI_NorSpr18F_SpiralPlatform_Main
	dl YI_NorSpr190_FallingIcicle_Main
	dl YI_NorSpr191_Bird_Main
	dl YI_NorSpr192_PetalGuy_Main
	dl YI_NorSpr193_SnakeCagedGhost_Main
	dl YI_NorSpr194_Blargg_Main
	dl YI_NorSpr195_SmallUnstableSnowPlatform_Main
	dl YI_NorSpr196_UnstableSnowPlatform_Main
	dl YI_NorSpr197_ArrowSign_Main
	dl YI_NorSpr198_DiagonalArrowSign_Main
	dl YI_NorSpr199_DizzyDandy_Main
	dl YI_NorSpr19A_BooGuy_Main
	dl YI_NorSpr19B_TacklingBumpty_Main
	dl YI_NorSpr19C_FlyingBumpty_Main
	dl YI_NorSpr19D_SkeletonGoonie_Main
	dl YI_NorSpr19E_WinglessSkeletonGoonie_Main
	dl YI_NorSpr19F_SkeletonGoonieCarryingBomb_Main
	dl YI_NorSpr1A0_DoubleFirebar_Main
	dl YI_NorSpr1A1_Firebar_Main
	dl YI_NorSpr1A2_HealthStar_Main
	dl YI_NorSpr1A3_LittleSkullMouser_Main
	dl YI_NorSpr1A4_KeyholeCork_Main
	dl YI_NorSpr1A5_RunAwayMonkey_Main
	dl YI_NorSpr1A6_MonkeyWithWatermelon_Main
	dl YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_Main
	dl YI_NorSpr1A8_TheifMonkey_Main
	dl YI_NorSpr1A9_HangingMonkeySpittingSeeds_Main
	dl YI_NorSpr1AA_HotLips_Main
	dl YI_NorSpr1AB_BooBalloon_Main
	dl YI_NorSpr1AC_SmallFrog_Main
	dl YI_NorSpr1AD_MagicShootingKamek_Main
	dl YI_NorSpr1AE_MagicShot_Main
	dl YI_NorSpr1AF_FloatingCoin_Main
	dl YI_NorSpr1B0_DeflatingBalloon_Main
	dl YI_NorSpr1B1_CoinCannon_Main
	dl YI_NorSpr1B2_MinigameCoin_Main
	dl YI_NorSpr1B3_GatherCoinsBandit_Main
	dl YI_NorSpr1B4_MinigameCheckeredPlatform_Main
	dl YI_NorSpr1B5_PoppingBalloonsBandit_Main
	dl YI_NorSpr1B6_MinigameBalloon_Main
	dl YI_NorSpr1B7_SeedSpittingMinigameBandit_Main
	dl YI_NorSpr1B8_WatermelonPot_Main
	dl YI_NorSpr1B9_P2SeedSpittingMinigameBandit_Main

DATA_038A5C:
	dl YI_NorSpr000_LavaLog_StompRt
	dl YI_NorSpr001_ClosedDoor_StompRt
	dl YI_NorSpr002_NavalPiranhaVines_StompRt
	dl YI_NorSpr003_CrateWithKey_StompRt
	dl YI_NorSpr004_HitSuperBabyMarioBlock_StompRt
	dl YI_NorSpr005_IcyWatermelon_StompRt
	dl YI_NorSpr006_WatermelonFreeze_StompRt
	dl YI_NorSpr007_Watermelon_StompRt
	dl YI_NorSpr008_FallingRubble_StompRt
	dl YI_NorSpr009_FireWatermelon_StompRt
	dl YI_NorSpr00A_Kaboomba_StompRt
	dl YI_NorSpr00B_Cannonball_StompRt
	dl YI_NorSpr00C_RaphaelTheRaven_StompRt
	dl YI_NorSpr00D_GoalRing_StompRt
	dl YI_NorSpr00E_GOALLetters_StompRt
	dl YI_NorSpr00F_BonusChallengeSign_StompRt
	dl YI_NorSpr010_RoundedCagedGhost_StompRt
	dl YI_NorSpr011_ItemCard_StompRt
	dl YI_NorSpr012_BossDoor_StompRt
	dl YI_NorSpr013_BossExplosion_StompRt
	dl YI_NorSpr014_KeyFromBoss_StompRt
	dl YI_NorSpr015_SubmarineTorpedo_StompRt
	dl YI_NorSpr016_BiggerBoo_StompRt
	dl YI_NorSpr017_FrogPirate_StompRt
	dl YI_NorSpr018_WatermelonFlame_StompRt
	dl YI_NorSpr019_Bubble_StompRt
	dl YI_NorSpr01A_SkiLift_StompRt
	dl YI_NorSpr01B_VerticalLavaLog_StompRt
	dl YI_NorSpr01C_DrFreezegood_StompRt
	dl YI_NorSpr01D_DrFreezegoodOnSkiLift_StompRt
	dl YI_NorSpr01E_Shyguy_StompRt
	dl YI_NorSpr01F_RotatingDoors_StompRt
	dl YI_NorSpr020_Bandit_StompRt
	dl YI_NorSpr021_Bucket_StompRt
	dl YI_NorSpr022_FlashingEgg_StompRt
	dl YI_NorSpr023_RedEgg_StompRt
	dl YI_NorSpr024_YellowEgg_StompRt
	dl YI_NorSpr025_GreenEgg_StompRt
	dl YI_NorSpr026_BowserFightGiantEgg_StompRt
	dl YI_NorSpr027_Key_StompRt
	dl YI_NorSpr028_HuffinPuffin_StompRt
	dl YI_NorSpr029_GiantEgg_StompRt
	dl YI_NorSpr02A_RedGiantEgg_StompRt
	dl YI_NorSpr02B_GreenGiantEgg_StompRt
	dl YI_NorSpr02C_LungeFish_StompRt
	dl YI_NorSpr02D_SalvoTheSlime_StompRt
	dl YI_NorSpr02E_EyesOfSalvoTheSlime_StompRt
	dl YI_NorSpr02F_LittleMouserHole_StompRt
	dl YI_NorSpr030_LittleMouser_StompRt
	dl YI_NorSpr031_PottedSpikedFunGuy_StompRt
	dl YI_NorSpr032_PeekingLittleMouser_StompRt
	dl YI_NorSpr033_LittleMouserExitingNest_StompRt
	dl YI_NorSpr034_RogersPot_StompRt
	dl YI_NorSpr035_RogerThePottedGhost_StompRt
	dl YI_NorSpr036_FallingWall_StompRt
	dl YI_NorSpr037_GrimLeecher_StompRt
	dl YI_NorSpr038_PottedGhostFlame_StompRt
	dl YI_NorSpr039_HorizontalRotatingPlank_StompRt
	dl YI_NorSpr03A_3MiniRavens_StompRt
	dl YI_NorSpr03B_MiniRaven_StompRt
	dl YI_NorSpr03C_TapTapTheRedNose_StompRt
	dl YI_NorSpr03D_LargeSeesaw_StompRt
	dl YI_NorSpr03E_ThinPlatform_StompRt
	dl YI_NorSpr03F_SlimeBlock_StompRt
	dl YI_NorSpr040_BabyLuigi_StompRt
	dl YI_NorSpr041_Stork_StompRt
	dl YI_NorSpr042_VerticalPipeEntrance_StompRt
	dl YI_NorSpr043_RedGiantShyguy_StompRt
	dl YI_NorSpr044_GreenGiantShyguy_StompRt
	dl YI_NorSpr045_PrinceFroggy_StompRt
	dl YI_NorSpr046_BurtTheBashful_StompRt
	dl YI_NorSpr047_ShyguyPushingRoger_StompRt
	dl YI_NorSpr048_CutsceneKamek_StompRt
	dl YI_NorSpr049_ThunderLakituFireBlast1_StompRt
	dl YI_NorSpr04A_ThunderLakituFireBlast2_StompRt
	dl YI_NorSpr04B_ThunderLakituFireBlast3_StompRt
	dl YI_NorSpr04C_UpsidedownBlowHard_StompRt
	dl YI_NorSpr04D_UnusedSpriteIndex_StompRt
	dl YI_NorSpr04E_LockedDoor_StompRt
	dl YI_NorSpr04F_MiddleRing_StompRt
	dl YI_NorSpr050_GreyRotatingWoodenBoard_StompRt
	dl YI_NorSpr051_LargeWheel_StompRt
	dl YI_NorSpr052_BalloonPlatform_StompRt
	dl YI_NorSpr053_KamekSayingOhMy_StompRt
	dl YI_NorSpr054_UpsideDownPiranhaPlant_StompRt
	dl YI_NorSpr055_4GreenRotatingPlatforms_StompRt
	dl YI_NorSpr056_4PinkRotatingPlatforms_StompRt
	dl YI_NorSpr057_SewerGhostWithPlatform_StompRt
	dl YI_NorSpr058_GreenToady_StompRt
	dl YI_NorSpr059_StationarySuperStar_StompRt
	dl YI_NorSpr05A_RaphaelSparkAttack_StompRt
	dl YI_NorSpr05B_RedCoinBandit_StompRt
	dl YI_NorSpr05C_PinkToady_StompRt
	dl YI_NorSpr05D_GlitchedSprite_StompRt
	dl YI_NorSpr05E_BrownWoodenBoard_StompRt
	dl YI_NorSpr05F_AutoRotateBrownWoodenBoard_StompRt
	dl YI_NorSpr060_Bomb_StompRt
	dl YI_NorSpr061_BabyMario_StompRt
	dl YI_NorSpr062_Goomba_StompRt
	dl YI_NorSpr063_MuddyBuddy_StompRt
	dl YI_NorSpr064_4AutoRotatingPinkPlatforms_StompRt
	dl YI_NorSpr065_RedCoin_StompRt
	dl YI_NorSpr066_PiranhaPlant_StompRt
	dl YI_NorSpr067_RockRevealedHiddenWingedCloud_StompRt
	dl YI_NorSpr068_FlashingEggBlock_StompRt
	dl YI_NorSpr069_RedEggBlock_StompRt
	dl YI_NorSpr06A_YellowEggBlock_StompRt
	dl YI_NorSpr06B_GreenEggBlock_StompRt
	dl YI_NorSpr06C_LargeSpringBall_StompRt
	dl YI_NorSpr06D_ClockwiseHootieTheBlueFish_StompRt
	dl YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_StompRt
	dl YI_NorSpr06F_SpringBall_StompRt
	dl YI_NorSpr070_Clawdaddy_StompRt
	dl YI_NorSpr071_BigBoo_StompRt
	dl YI_NorSpr072_TrainBandit_StompRt
	dl YI_NorSpr073_BalloonPump_StompRt
	dl YI_NorSpr074_Spike_StompRt
	dl YI_NorSpr075_SpikeBall_StompRt
	dl YI_NorSpr076_ClockwisePiroDangle_StompRt
	dl YI_NorSpr077_CounterclockwisePiroDangle_StompRt
	dl YI_NorSpr078_RedBulletBillShooter_StompRt
	dl YI_NorSpr079_YellowBulletBillShooter_StompRt
	dl YI_NorSpr07A_GreenBulletBillShooter_StompRt
	dl YI_NorSpr07B_RedBulletBill_StompRt
	dl YI_NorSpr07C_YellowBulletBill_StompRt
	dl YI_NorSpr07D_GreenBulletBill_StompRt
	dl YI_NorSpr07E_DentOfSquishyPlatform_StompRt
	dl YI_NorSpr07F_LogSeesawPlatform_StompRt
	dl YI_NorSpr080_StraightLavaBubble_StompRt
	dl YI_NorSpr081_FollowingLavaBubble_StompRt
	dl YI_NorSpr082_ChainChomp_StompRt
	dl YI_NorSpr083_BowserFightCloud_StompRt
	dl YI_NorSpr084_TeleportSprite_StompRt
	dl YI_NorSpr085_HarryHedgehog_StompRt
	dl YI_NorSpr086_GlitchedSprite_StompRt
	dl YI_NorSpr087_MockUpLaidEgg_StompRt
	dl YI_NorSpr088_SuperStar_StompRt
	dl YI_NorSpr089_HorizontalMovingRedPlatform_StompRt
	dl YI_NorSpr08A_VerticalMovingPinkPlatform_StompRt
	dl YI_NorSpr08B_MockUp_StompRt
	dl YI_NorSpr08C_YoshiAtGoal_StompRt
	dl YI_NorSpr08D_Flyguy_StompRt
	dl YI_NorSpr08E_BowserRoomKamek_StompRt
	dl YI_NorSpr08F_MonkeySwing_StompRt
	dl YI_NorSpr090_DanglingGhost_StompRt
	dl YI_NorSpr091_4RedToadies_StompRt
	dl YI_NorSpr092_MelonBug_StompRt
	dl YI_NorSpr093_Door_StompRt
	dl YI_NorSpr094_ExpandingBlock_StompRt
	dl YI_NorSpr095_BlueCheckeredBlock_StompRt
	dl YI_NorSpr096_RedCheckeredBlock_StompRt
	dl YI_NorSpr097_POWBlock_StompRt
	dl YI_NorSpr098_EndTransformationBlock_StompRt
	dl YI_NorSpr099_SpinyEgg_StompRt
	dl YI_NorSpr09A_SwingingGreenPlatform_StompRt
	dl YI_NorSpr09B_MaceGuy_StompRt
	dl YI_NorSpr09C_Mace_StompRt
	dl YI_NorSpr09D_RedSwitch_StompRt
	dl YI_NorSpr09E_ChompRock_StompRt
	dl YI_NorSpr09F_PtooiePiranhaPlant_StompRt
	dl YI_NorSpr0A0_Tulip_StompRt
	dl YI_NorSpr0A1_SmallPot_StompRt
	dl YI_NorSpr0A2_ThunderLakituFireball_StompRt
	dl YI_NorSpr0A3_LeftHidingBandit_StompRt
	dl YI_NorSpr0A4_RightHidingBandit_StompRt
	dl YI_NorSpr0A5_NepEnut_StompRt
	dl YI_NorSpr0A6_IncomingChomp_StompRt
	dl YI_NorSpr0A7_GroupOfIncomingChomps_StompRt
	dl YI_NorSpr0A8_FallingIncomingChomp_StompRt
	dl YI_NorSpr0A9_IncomingChompShadow_StompRt
	dl YI_NorSpr0AA_BackgroundShyguy_StompRt
	dl YI_NorSpr0AB_FullEggSpawner_StompRt
	dl YI_NorSpr0AC_FallingRockArrowAndShadow_StompRt
	dl YI_NorSpr0AD_MessageBox_StompRt
	dl YI_NorSpr0AE_HookbillTheKoopa_StompRt
	dl YI_NorSpr0AF_CarMorphBubble_StompRt
	dl YI_NorSpr0B0_MoleMorphBubble_StompRt
	dl YI_NorSpr0B1_HelicopterMorphBubble_StompRt
	dl YI_NorSpr0B2_TrainMorphBubble_StompRt
	dl YI_NorSpr0B3_FuzzyFart_StompRt
	dl YI_NorSpr0B4_SubmarineMorphBubble_StompRt
	dl YI_NorSpr0B5_HiddenWingedCloud_StompRt
	dl YI_NorSpr0B6_WingedCloudWith8Coins_StompRt
	dl YI_NorSpr0B7_WingedCloudWithBubbled1up_StompRt
	dl YI_NorSpr0B8_WingedCloudWithFlower_StompRt
	dl YI_NorSpr0B9_WingedCloudWithPOW_StompRt
	dl YI_NorSpr0BA_WingedCloudWithStairs_StompRt
	dl YI_NorSpr0BB_WingedCloudWithPlatform_StompRt
	dl YI_NorSpr0BC_WingedCloudWithBandit_StompRt
	dl YI_NorSpr0BD_WingedCloudWithCoin_StompRt
	dl YI_NorSpr0BE_WingedCloudWith1up_StompRt
	dl YI_NorSpr0BF_WingedCloudWithKey_StompRt
	dl YI_NorSpr0C0_WingedCloudWith3Stars_StompRt
	dl YI_NorSpr0C1_WingedCloudWith5Stars_StompRt
	dl YI_NorSpr0C2_WingedCloudWithDoor_StompRt
	dl YI_NorSpr0C3_WingedCloudWithLowerGround_StompRt
	dl YI_NorSpr0C4_WingedCloudWithWatermelon_StompRt
	dl YI_NorSpr0C5_WingedCloudWithFireWatermelon_StompRt
	dl YI_NorSpr0C6_WingedCloudWithIcyWatermelon_StompRt
	dl YI_NorSpr0C7_WingedCloudWith3LeafSunflower_StompRt
	dl YI_NorSpr0C8_WingedCloudWith6LeafSunflower_StompRt
	dl YI_NorSpr0C9_WingedCloudWithCrashGameFeature_StompRt
	dl YI_NorSpr0CA_BigBossDoor_StompRt
	dl YI_NorSpr0CB_WingedCloudWithCoinOrStar_StompRt
	dl YI_NorSpr0CC_WingedCloudWithRedSwitch_StompRt
	dl YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_StompRt
	dl YI_NorSpr0CE_BowserFire_StompRt
	dl YI_NorSpr0CF_BowserRocks_StompRt
	dl YI_NorSpr0D0_HorizontalEntranceToRight_StompRt
	dl YI_NorSpr0D1_SecretPipeEntrance_StompRt
	dl YI_NorSpr0D2_MarchingMilde_StompRt
	dl YI_NorSpr0D3_LargeMilde_StompRt
	dl YI_NorSpr0D4_MediumMilde_StompRt
	dl YI_NorSpr0D5_BackgroundForHookbillFight_StompRt
	dl YI_NorSpr0D6_FortGhostWithPlatform_StompRt
	dl YI_NorSpr0D7_SluggyTheUnshaven_StompRt
	dl YI_NorSpr0D8_ChompWarningSign_StompRt
	dl YI_NorSpr0D9_FishinLakitu_StompRt
	dl YI_NorSpr0DA_FlowerPot_StompRt
	dl YI_NorSpr0DB_SoftBlock_StompRt
	dl YI_NorSpr0DC_Snowball_StompRt
	dl YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_StompRt
	dl YI_NorSpr0DE_FallingRockPlatform_StompRt
	dl YI_NorSpr0DF_PiscatoryPete_StompRt
	dl YI_NorSpr0E0_PreyingMantas_StompRt
	dl YI_NorSpr0E1_LochNestor_StompRt
	dl YI_NorSpr0E2_BooBlah_StompRt
	dl YI_NorSpr0E3_BooBlahWithPiroDangle_StompRt
	dl YI_NorSpr0E4_HeadingCactus_StompRt
	dl YI_NorSpr0E5_GreenNeedlenose_StompRt
	dl YI_NorSpr0E6_Gusty_StompRt
	dl YI_NorSpr0E7_Burt_StompRt
	dl YI_NorSpr0E8_Goonie_StompRt
	dl YI_NorSpr0E9_3WinglessGoonies_StompRt
	dl YI_NorSpr0EA_VerticalCloudDrop_StompRt
	dl YI_NorSpr0EB_HorizontalCloudDrop_StompRt
	dl YI_NorSpr0EC_JumpingFlamerGuy_StompRt
	dl YI_NorSpr0ED_RunningFlamerGuy_StompRt
	dl YI_NorSpr0EE_EggoDil_StompRt
	dl YI_NorSpr0EF_EggoDilFace_StompRt
	dl YI_NorSpr0F0_EggoDilPetal_StompRt
	dl YI_NorSpr0F1_EggPlantShootingBubbles_StompRt
	dl YI_NorSpr0F2_ShyguyOnStilts_StompRt
	dl YI_NorSpr0F3_WoozyGuy_StompRt
	dl YI_NorSpr0F4_EggPlant_StompRt
	dl YI_NorSpr0F5_Slugger_StompRt
	dl YI_NorSpr0F6_MotherHuffinPuffin_StompRt
	dl YI_NorSpr0F7_BarneyBubble_StompRt
	dl YI_NorSpr0F8_BlowHard_StompRt
	dl YI_NorSpr0F9_YellowNeedlenose_StompRt
	dl YI_NorSpr0FA_Flower_StompRt
	dl YI_NorSpr0FB_LongSpearGuy_StompRt
	dl YI_NorSpr0FC_ShortSpearGuy_StompRt
	dl YI_NorSpr0FD_ZeusGuy_StompRt
	dl YI_NorSpr0FE_ZeusGuyBlast_StompRt
	dl YI_NorSpr0FF_Poochy_StompRt
	dl YI_NorSpr100_Bubbled1up_StompRt
	dl YI_NorSpr101_RotatingMace_StompRt
	dl YI_NorSpr102_DoubleRotatingMace_StompRt
	dl YI_NorSpr103_BooGuysMovingMace_StompRt
	dl YI_NorSpr104_JeanDeFillet_StompRt
	dl YI_NorSpr105_BooGuysCarryingBombToLeft_StompRt
	dl YI_NorSpr106_BooGuysCarryingBombToRight_StompRt
	dl YI_NorSpr107_WatermelonSeed_StompRt
	dl YI_NorSpr108_Milde_StompRt
	dl YI_NorSpr109_BronzeTapTap_StompRt
	dl YI_NorSpr10A_SilverTapTap_StompRt
	dl YI_NorSpr10B_HoppingSilverTapTap_StompRt
	dl YI_NorSpr10C_ChainedSpikeBall_StompRt
	dl YI_NorSpr10D_BooGuyOperatingPulley_StompRt
	dl YI_NorSpr10E_CrateWith6Stars_StompRt
	dl YI_NorSpr10F_BooManBluff_StompRt
	dl YI_NorSpr110_Flower_StompRt
	dl YI_NorSpr111_GeorgetteJelly_StompRt
	dl YI_NorSpr112_GeorgetteJellyGoo_StompRt
	dl YI_NorSpr113_Snifit_StompRt
	dl YI_NorSpr114_SnifitBullet_StompRt
	dl YI_NorSpr115_Coin_StompRt
	dl YI_NorSpr116_BuoyantRoundPlatform_StompRt
	dl YI_NorSpr117_DonutLift_StompRt
	dl YI_NorSpr118_LargeDonutLift_StompRt
	dl YI_NorSpr119_Spooky_StompRt
	dl YI_NorSpr11A_GreenGlove_StompRt
	dl YI_NorSpr11B_Lakitu_StompRt
	dl YI_NorSpr11C_LakituCloud_StompRt
	dl YI_NorSpr11D_SpinyEgg_StompRt
	dl YI_NorSpr11E_BrownArrowWheel_StompRt
	dl YI_NorSpr11F_BlueArrowWheel_StompRt
	dl YI_NorSpr120_DoubledSidedArrowLift_StompRt
	dl YI_NorSpr121_NumberPlatformExplosion_StompRt
	dl YI_NorSpr122_BucketWithBandit_StompRt
	dl YI_NorSpr123_BucketWithCoins_StompRt
	dl YI_NorSpr124_Stretch_StompRt
	dl YI_NorSpr125_AttackingAndEndingKamek_StompRt
	dl YI_NorSpr126_SpikedLogOnPulley_StompRt
	dl YI_NorSpr127_PulleyOfSpikedLog_StompRt
	dl YI_NorSpr128_GroundRippleInBabyBowerRoom_StompRt
	dl YI_NorSpr129_Fuzzy_StompRt
	dl YI_NorSpr12A_ShyGuyBanditTrap_StompRt
	dl YI_NorSpr12B_FatGuy_StompRt
	dl YI_NorSpr12C_FlyOrWhirlyGuy_StompRt
	dl YI_NorSpr12D_PrologueCutsceneYoshi_StompRt
	dl YI_NorSpr12E_LargePopEffect_StompRt
	dl YI_NorSpr12F_HorizontalLavaDrop_StompRt
	dl YI_NorSpr130_VerticalLavaDrop_StompRt
	dl YI_NorSpr131_LockedDoor_StompRt
	dl YI_NorSpr132_LemonDrop_StompRt
	dl YI_NorSpr133_LanternGhost_StompRt
	dl YI_NorSpr134_BabyBowser_StompRt
	dl YI_NorSpr135_CirclingRaven_StompRt
	dl YI_NorSpr136_CirclingRaven_StompRt
	dl YI_NorSpr137_3x6FallingStone_StompRt
	dl YI_NorSpr138_3x3FallingStone_StompRt
	dl YI_NorSpr139_3x9FallingStone_StompRt
	dl YI_NorSpr13A_6x3FallingStone_StompRt
	dl YI_NorSpr13B_StomachAcid_StompRt
	dl YI_NorSpr13C_DownFlippers_StompRt
	dl YI_NorSpr13D_DanglingFang_StompRt
	dl YI_NorSpr13E_FlyingFang_StompRt
	dl YI_NorSpr13F_SwimmingFlopsyFish_StompRt
	dl YI_NorSpr140_SwimmingAndJumpingFlopsyFish_StompRt
	dl YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_StompRt
	dl YI_NorSpr142_3JumpFlopsyFish_StompRt
	dl YI_NorSpr143_SprayFish_StompRt
	dl YI_NorSpr144_RightOrLeftFlippers_StompRt
	dl YI_NorSpr145_BlueSluggy_StompRt
	dl YI_NorSpr146_PinkSluggy_StompRt
	dl YI_NorSpr147_HorizontalEntranceToLeft_StompRt
	dl YI_NorSpr148_LargeSpringBall_StompRt
	dl YI_NorSpr149_UpArrowCloud_StompRt
	dl YI_NorSpr14A_UpRightArrowCloud_StompRt
	dl YI_NorSpr14B_RightArrowCloud_StompRt
	dl YI_NorSpr14C_DownRightArrowCloud_StompRt
	dl YI_NorSpr14D_DownArrowCloud_StompRt
	dl YI_NorSpr14E_DownLeftArrowCloud_StompRt
	dl YI_NorSpr14F_LeftArrowCloud_StompRt
	dl YI_NorSpr150_UpLeftArrowCloud_StompRt
	dl YI_NorSpr151_RotatingArrowCloud_StompRt
	dl YI_NorSpr152_Flutter_StompRt
	dl YI_NorSpr153_GoonieWithShyGuy_StompRt
	dl YI_NorSpr154_SharkChomp_StompRt
	dl YI_NorSpr155_FatGoonie_StompRt
	dl YI_NorSpr156_CactusJack_StompRt
	dl YI_NorSpr157_WallLakitu_StompRt
	dl YI_NorSpr158_BowlingGoonie_StompRt
	dl YI_NorSpr159_WalkingGrunt_StompRt
	dl YI_NorSpr15A_RunningGrunt_StompRt
	dl YI_NorSpr15B_DancingSpearGuy_StompRt
	dl YI_NorSpr15C_GreenRotatingPlatformSwitch_StompRt
	dl YI_NorSpr15D_RedRotatingPlatformSwitch_StompRt
	dl YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_StompRt
	dl YI_NorSpr15F_GreenSpikedPlatform_StompRt
	dl YI_NorSpr160_RedSpikedPlatform_StompRt
	dl YI_NorSpr161_RewardItemForDefeatingRoomEnemies_StompRt
	dl YI_NorSpr162_DoubleSpikePlatformWithSwitch_StompRt
	dl YI_NorSpr163_BouncingNeedlenose_StompRt
	dl YI_NorSpr164_NipperPlant_StompRt
	dl YI_NorSpr165_NipperSpore_StompRt
	dl YI_NorSpr166_ThunderLakitu_StompRt
	dl YI_NorSpr167_GreenKoopaShell_StompRt
	dl YI_NorSpr168_RedKoopaShell_StompRt
	dl YI_NorSpr169_GreenNakedKoopa_StompRt
	dl YI_NorSpr16A_RedNakedKoopa_StompRt
	dl YI_NorSpr16B_GreenKoopa_StompRt
	dl YI_NorSpr16C_RedKoopa_StompRt
	dl YI_NorSpr16D_GreenParakoopa_StompRt
	dl YI_NorSpr16E_RedHorizontalParakoopa_StompRt
	dl YI_NorSpr16F_RedVerticalParakoopa_StompRt
	dl YI_NorSpr170_AquaLakitu_StompRt
	dl YI_NorSpr171_NavalPiranha_StompRt
	dl YI_NorSpr172_NavalPiranhaBuds_StompRt
	dl YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_StompRt
	dl YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_StompRt
	dl YI_NorSpr175_BaronVonZeppelinCarryingBomb_StompRt
	dl YI_NorSpr176_BaronVonZeppelinCarryingBandit_StompRt
	dl YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_StompRt
	dl YI_NorSpr178_BaronVonZeppelinCarrying1up_StompRt
	dl YI_NorSpr179_BaronVonZeppelinCarryingKey_StompRt
	dl YI_NorSpr17A_BaronVonZeppelinCarryingCoins_StompRt
	dl YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_StompRt
	dl YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_StompRt
	dl YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_StompRt
	dl YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_StompRt
	dl YI_NorSpr17F_BaronVonZeppelin_StompRt
	dl YI_NorSpr180_SpinningLog_StompRt
	dl YI_NorSpr181_CrazeeDayzee_StompRt
	dl YI_NorSpr182_Dragonfly_StompRt
	dl YI_NorSpr183_Butterfly_StompRt
	dl YI_NorSpr184_Bumpty_StompRt
	dl YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_StompRt
	dl YI_NorSpr186_MovingLineGuidedGreenPlatformRight_StompRt
	dl YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_StompRt
	dl YI_NorSpr188_MovingLineGuidedYellowPlatformRight_StompRt
	dl YI_NorSpr189_LineGuidedGreenPlatformLeft_StompRt
	dl YI_NorSpr18A_LineGuidedGreenPlatformRight_StompRt
	dl YI_NorSpr18B_LineGuidedYellowPlatformLeft_StompRt
	dl YI_NorSpr18C_LineGuidedYellowPlatformRight_StompRt
	dl YI_NorSpr18D_LineGuidedRedPlatformLeft_StompRt
	dl YI_NorSpr18E_LineGuidedGreenPlatformRight_StompRt
	dl YI_NorSpr18F_SpiralPlatform_StompRt
	dl YI_NorSpr190_FallingIcicle_StompRt
	dl YI_NorSpr191_Bird_StompRt
	dl YI_NorSpr192_PetalGuy_StompRt
	dl YI_NorSpr193_SnakeCagedGhost_StompRt
	dl YI_NorSpr194_Blargg_StompRt
	dl YI_NorSpr195_SmallUnstableSnowPlatform_StompRt
	dl YI_NorSpr196_UnstableSnowPlatform_StompRt
	dl YI_NorSpr197_ArrowSign_StompRt
	dl YI_NorSpr198_DiagonalArrowSign_StompRt
	dl YI_NorSpr199_DizzyDandy_StompRt
	dl YI_NorSpr19A_BooGuy_StompRt
	dl YI_NorSpr19B_TacklingBumpty_StompRt
	dl YI_NorSpr19C_FlyingBumpty_StompRt
	dl YI_NorSpr19D_SkeletonGoonie_StompRt
	dl YI_NorSpr19E_WinglessSkeletonGoonie_StompRt
	dl YI_NorSpr19F_SkeletonGoonieCarryingBomb_StompRt
	dl YI_NorSpr1A0_DoubleFirebar_StompRt
	dl YI_NorSpr1A1_Firebar_StompRt
	dl YI_NorSpr1A2_HealthStar_StompRt
	dl YI_NorSpr1A3_LittleSkullMouser_StompRt
	dl YI_NorSpr1A4_KeyholeCork_StompRt
	dl YI_NorSpr1A5_RunAwayMonkey_StompRt
	dl YI_NorSpr1A6_MonkeyWithWatermelon_StompRt
	dl YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_StompRt
	dl YI_NorSpr1A8_TheifMonkey_StompRt
	dl YI_NorSpr1A9_HangingMonkeySpittingSeeds_StompRt
	dl YI_NorSpr1AA_HotLips_StompRt
	dl YI_NorSpr1AB_BooBalloon_StompRt
	dl YI_NorSpr1AC_SmallFrog_StompRt
	dl YI_NorSpr1AD_MagicShootingKamek_StompRt
	dl YI_NorSpr1AE_MagicShot_StompRt
	dl YI_NorSpr1AF_FloatingCoin_StompRt
	dl YI_NorSpr1B0_DeflatingBalloon_StompRt
	dl YI_NorSpr1B1_CoinCannon_StompRt
	dl YI_NorSpr1B2_MinigameCoin_StompRt
	dl YI_NorSpr1B3_GatherCoinsBandit_StompRt
	dl YI_NorSpr1B4_MinigameCheckeredPlatform_StompRt
	dl YI_NorSpr1B5_PoppingBalloonsBandit_StompRt
	dl YI_NorSpr1B6_MinigameBalloon_StompRt
	dl YI_NorSpr1B7_SeedSpittingMinigameBandit_StompRt
	dl YI_NorSpr1B8_WatermelonPot_StompRt
	dl YI_NorSpr1B9_P2SeedSpittingMinigameBandit_StompRt

DATA_038F8A:
	dl YI_NorSpr000_LavaLog_RideYoshiRt
	dl YI_NorSpr001_ClosedDoor_RideYoshiRt
	dl YI_NorSpr002_NavalPiranhaVines_RideYoshiRt
	dl YI_NorSpr003_CrateWithKey_RideYoshiRt
	dl YI_NorSpr004_HitSuperBabyMarioBlock_RideYoshiRt
	dl YI_NorSpr005_IcyWatermelon_RideYoshiRt
	dl YI_NorSpr006_WatermelonFreeze_RideYoshiRt
	dl YI_NorSpr007_Watermelon_RideYoshiRt
	dl YI_NorSpr008_FallingRubble_RideYoshiRt
	dl YI_NorSpr009_FireWatermelon_RideYoshiRt
	dl YI_NorSpr00A_Kaboomba_RideYoshiRt
	dl YI_NorSpr00B_Cannonball_RideYoshiRt
	dl YI_NorSpr00C_RaphaelTheRaven_RideYoshiRt
	dl YI_NorSpr00D_GoalRing_RideYoshiRt
	dl YI_NorSpr00E_GOALLetters_RideYoshiRt
	dl YI_NorSpr00F_BonusChallengeSign_RideYoshiRt
	dl YI_NorSpr010_RoundedCagedGhost_RideYoshiRt
	dl YI_NorSpr011_ItemCard_RideYoshiRt
	dl YI_NorSpr012_BossDoor_RideYoshiRt
	dl YI_NorSpr013_BossExplosion_RideYoshiRt
	dl YI_NorSpr014_KeyFromBoss_RideYoshiRt
	dl YI_NorSpr015_SubmarineTorpedo_RideYoshiRt
	dl YI_NorSpr016_BiggerBoo_RideYoshiRt
	dl YI_NorSpr017_FrogPirate_RideYoshiRt
	dl YI_NorSpr018_WatermelonFlame_RideYoshiRt
	dl YI_NorSpr019_Bubble_RideYoshiRt
	dl YI_NorSpr01A_SkiLift_RideYoshiRt
	dl YI_NorSpr01B_VerticalLavaLog_RideYoshiRt
	dl YI_NorSpr01C_DrFreezegood_RideYoshiRt
	dl YI_NorSpr01D_DrFreezegoodOnSkiLift_RideYoshiRt
	dl YI_NorSpr01E_Shyguy_RideYoshiRt
	dl YI_NorSpr01F_RotatingDoors_RideYoshiRt
	dl YI_NorSpr020_Bandit_RideYoshiRt
	dl YI_NorSpr021_Bucket_RideYoshiRt
	dl YI_NorSpr022_FlashingEgg_RideYoshiRt
	dl YI_NorSpr023_RedEgg_RideYoshiRt
	dl YI_NorSpr024_YellowEgg_RideYoshiRt
	dl YI_NorSpr025_GreenEgg_RideYoshiRt
	dl YI_NorSpr026_BowserFightGiantEgg_RideYoshiRt
	dl YI_NorSpr027_Key_RideYoshiRt
	dl YI_NorSpr028_HuffinPuffin_RideYoshiRt
	dl YI_NorSpr029_GiantEgg_RideYoshiRt
	dl YI_NorSpr02A_RedGiantEgg_RideYoshiRt
	dl YI_NorSpr02B_GreenGiantEgg_RideYoshiRt
	dl YI_NorSpr02C_LungeFish_RideYoshiRt
	dl YI_NorSpr02D_SalvoTheSlime_RideYoshiRt
	dl YI_NorSpr02E_EyesOfSalvoTheSlime_RideYoshiRt
	dl YI_NorSpr02F_LittleMouserHole_RideYoshiRt
	dl YI_NorSpr030_LittleMouser_RideYoshiRt
	dl YI_NorSpr031_PottedSpikedFunGuy_RideYoshiRt
	dl YI_NorSpr032_PeekingLittleMouser_RideYoshiRt
	dl YI_NorSpr033_LittleMouserExitingNest_RideYoshiRt
	dl YI_NorSpr034_RogersPot_RideYoshiRt
	dl YI_NorSpr035_RogerThePottedGhost_RideYoshiRt
	dl YI_NorSpr036_FallingWall_RideYoshiRt
	dl YI_NorSpr037_GrimLeecher_RideYoshiRt
	dl YI_NorSpr038_PottedGhostFlame_RideYoshiRt
	dl YI_NorSpr039_HorizontalRotatingPlank_RideYoshiRt
	dl YI_NorSpr03A_3MiniRavens_RideYoshiRt
	dl YI_NorSpr03B_MiniRaven_RideYoshiRt
	dl YI_NorSpr03C_TapTapTheRedNose_RideYoshiRt
	dl YI_NorSpr03D_LargeSeesaw_RideYoshiRt
	dl YI_NorSpr03E_ThinPlatform_RideYoshiRt
	dl YI_NorSpr03F_SlimeBlock_RideYoshiRt
	dl YI_NorSpr040_BabyLuigi_RideYoshiRt
	dl YI_NorSpr041_Stork_RideYoshiRt
	dl YI_NorSpr042_VerticalPipeEntrance_RideYoshiRt
	dl YI_NorSpr043_RedGiantShyguy_RideYoshiRt
	dl YI_NorSpr044_GreenGiantShyguy_RideYoshiRt
	dl YI_NorSpr045_PrinceFroggy_RideYoshiRt
	dl YI_NorSpr046_BurtTheBashful_RideYoshiRt
	dl YI_NorSpr047_ShyguyPushingRoger_RideYoshiRt
	dl YI_NorSpr048_CutsceneKamek_RideYoshiRt
	dl YI_NorSpr049_ThunderLakituFireBlast1_RideYoshiRt
	dl YI_NorSpr04A_ThunderLakituFireBlast2_RideYoshiRt
	dl YI_NorSpr04B_ThunderLakituFireBlast3_RideYoshiRt
	dl YI_NorSpr04C_UpsidedownBlowHard_RideYoshiRt
	dl YI_NorSpr04D_UnusedSpriteIndex_RideYoshiRt
	dl YI_NorSpr04E_LockedDoor_RideYoshiRt
	dl YI_NorSpr04F_MiddleRing_RideYoshiRt
	dl YI_NorSpr050_GreyRotatingWoodenBoard_RideYoshiRt
	dl YI_NorSpr051_LargeWheel_RideYoshiRt
	dl YI_NorSpr052_BalloonPlatform_RideYoshiRt
	dl YI_NorSpr053_KamekSayingOhMy_RideYoshiRt
	dl YI_NorSpr054_UpsideDownPiranhaPlant_RideYoshiRt
	dl YI_NorSpr055_4GreenRotatingPlatforms_RideYoshiRt
	dl YI_NorSpr056_4PinkRotatingPlatforms_RideYoshiRt
	dl YI_NorSpr057_SewerGhostWithPlatform_RideYoshiRt
	dl YI_NorSpr058_GreenToady_RideYoshiRt
	dl YI_NorSpr059_StationarySuperStar_RideYoshiRt
	dl YI_NorSpr05A_RaphaelSparkAttack_RideYoshiRt
	dl YI_NorSpr05B_RedCoinBandit_RideYoshiRt
	dl YI_NorSpr05C_PinkToady_RideYoshiRt
	dl YI_NorSpr05D_GlitchedSprite_RideYoshiRt
	dl YI_NorSpr05E_BrownWoodenBoard_RideYoshiRt
	dl YI_NorSpr05F_AutoRotateBrownWoodenBoard_RideYoshiRt
	dl YI_NorSpr060_Bomb_RideYoshiRt
	dl YI_NorSpr061_BabyMario_RideYoshiRt
	dl YI_NorSpr062_Goomba_RideYoshiRt
	dl YI_NorSpr063_MuddyBuddy_RideYoshiRt
	dl YI_NorSpr064_4AutoRotatingPinkPlatforms_RideYoshiRt
	dl YI_NorSpr065_RedCoin_RideYoshiRt
	dl YI_NorSpr066_PiranhaPlant_RideYoshiRt
	dl YI_NorSpr067_RockRevealedHiddenWingedCloud_RideYoshiRt
	dl YI_NorSpr068_FlashingEggBlock_RideYoshiRt
	dl YI_NorSpr069_RedEggBlock_RideYoshiRt
	dl YI_NorSpr06A_YellowEggBlock_RideYoshiRt
	dl YI_NorSpr06B_GreenEggBlock_RideYoshiRt
	dl YI_NorSpr06C_LargeSpringBall_RideYoshiRt
	dl YI_NorSpr06D_ClockwiseHootieTheBlueFish_RideYoshiRt
	dl YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_RideYoshiRt
	dl YI_NorSpr06F_SpringBall_RideYoshiRt
	dl YI_NorSpr070_Clawdaddy_RideYoshiRt
	dl YI_NorSpr071_BigBoo_RideYoshiRt
	dl YI_NorSpr072_TrainBandit_RideYoshiRt
	dl YI_NorSpr073_BalloonPump_RideYoshiRt
	dl YI_NorSpr074_Spike_RideYoshiRt
	dl YI_NorSpr075_SpikeBall_RideYoshiRt
	dl YI_NorSpr076_ClockwisePiroDangle_RideYoshiRt
	dl YI_NorSpr077_CounterclockwisePiroDangle_RideYoshiRt
	dl YI_NorSpr078_RedBulletBillShooter_RideYoshiRt
	dl YI_NorSpr079_YellowBulletBillShooter_RideYoshiRt
	dl YI_NorSpr07A_GreenBulletBillShooter_RideYoshiRt
	dl YI_NorSpr07B_RedBulletBill_RideYoshiRt
	dl YI_NorSpr07C_YellowBulletBill_RideYoshiRt
	dl YI_NorSpr07D_GreenBulletBill_RideYoshiRt
	dl YI_NorSpr07E_DentOfSquishyPlatform_RideYoshiRt
	dl YI_NorSpr07F_LogSeesawPlatform_RideYoshiRt
	dl YI_NorSpr080_StraightLavaBubble_RideYoshiRt
	dl YI_NorSpr081_FollowingLavaBubble_RideYoshiRt
	dl YI_NorSpr082_ChainChomp_RideYoshiRt
	dl YI_NorSpr083_BowserFightCloud_RideYoshiRt
	dl YI_NorSpr084_TeleportSprite_RideYoshiRt
	dl YI_NorSpr085_HarryHedgehog_RideYoshiRt
	dl YI_NorSpr086_GlitchedSprite_RideYoshiRt
	dl YI_NorSpr087_MockUpLaidEgg_RideYoshiRt
	dl YI_NorSpr088_SuperStar_RideYoshiRt
	dl YI_NorSpr089_HorizontalMovingRedPlatform_RideYoshiRt
	dl YI_NorSpr08A_VerticalMovingPinkPlatform_RideYoshiRt
	dl YI_NorSpr08B_MockUp_RideYoshiRt
	dl YI_NorSpr08C_YoshiAtGoal_RideYoshiRt
	dl YI_NorSpr08D_Flyguy_RideYoshiRt
	dl YI_NorSpr08E_BowserRoomKamek_RideYoshiRt
	dl YI_NorSpr08F_MonkeySwing_RideYoshiRt
	dl YI_NorSpr090_DanglingGhost_RideYoshiRt
	dl YI_NorSpr091_4RedToadies_RideYoshiRt
	dl YI_NorSpr092_MelonBug_RideYoshiRt
	dl YI_NorSpr093_Door_RideYoshiRt
	dl YI_NorSpr094_ExpandingBlock_RideYoshiRt
	dl YI_NorSpr095_BlueCheckeredBlock_RideYoshiRt
	dl YI_NorSpr096_RedCheckeredBlock_RideYoshiRt
	dl YI_NorSpr097_POWBlock_RideYoshiRt
	dl YI_NorSpr098_EndTransformationBlock_RideYoshiRt
	dl YI_NorSpr099_SpinyEgg_RideYoshiRt
	dl YI_NorSpr09A_SwingingGreenPlatform_RideYoshiRt
	dl YI_NorSpr09B_MaceGuy_RideYoshiRt
	dl YI_NorSpr09C_Mace_RideYoshiRt
	dl YI_NorSpr09D_RedSwitch_RideYoshiRt
	dl YI_NorSpr09E_ChompRock_RideYoshiRt
	dl YI_NorSpr09F_PtooiePiranhaPlant_RideYoshiRt
	dl YI_NorSpr0A0_Tulip_RideYoshiRt
	dl YI_NorSpr0A1_SmallPot_RideYoshiRt
	dl YI_NorSpr0A2_ThunderLakituFireball_RideYoshiRt
	dl YI_NorSpr0A3_LeftHidingBandit_RideYoshiRt
	dl YI_NorSpr0A4_RightHidingBandit_RideYoshiRt
	dl YI_NorSpr0A5_NepEnut_RideYoshiRt
	dl YI_NorSpr0A6_IncomingChomp_RideYoshiRt
	dl YI_NorSpr0A7_GroupOfIncomingChomps_RideYoshiRt
	dl YI_NorSpr0A8_FallingIncomingChomp_RideYoshiRt
	dl YI_NorSpr0A9_IncomingChompShadow_RideYoshiRt
	dl YI_NorSpr0AA_BackgroundShyguy_RideYoshiRt
	dl YI_NorSpr0AB_FullEggSpawner_RideYoshiRt
	dl YI_NorSpr0AC_FallingRockArrowAndShadow_RideYoshiRt
	dl YI_NorSpr0AD_MessageBox_RideYoshiRt
	dl YI_NorSpr0AE_HookbillTheKoopa_RideYoshiRt
	dl YI_NorSpr0AF_CarMorphBubble_RideYoshiRt
	dl YI_NorSpr0B0_MoleMorphBubble_RideYoshiRt
	dl YI_NorSpr0B1_HelicopterMorphBubble_RideYoshiRt
	dl YI_NorSpr0B2_TrainMorphBubble_RideYoshiRt
	dl YI_NorSpr0B3_FuzzyFart_RideYoshiRt
	dl YI_NorSpr0B4_SubmarineMorphBubble_RideYoshiRt
	dl YI_NorSpr0B5_HiddenWingedCloud_RideYoshiRt
	dl YI_NorSpr0B6_WingedCloudWith8Coins_RideYoshiRt
	dl YI_NorSpr0B7_WingedCloudWithBubbled1up_RideYoshiRt
	dl YI_NorSpr0B8_WingedCloudWithFlower_RideYoshiRt
	dl YI_NorSpr0B9_WingedCloudWithPOW_RideYoshiRt
	dl YI_NorSpr0BA_WingedCloudWithStairs_RideYoshiRt
	dl YI_NorSpr0BB_WingedCloudWithPlatform_RideYoshiRt
	dl YI_NorSpr0BC_WingedCloudWithBandit_RideYoshiRt
	dl YI_NorSpr0BD_WingedCloudWithCoin_RideYoshiRt
	dl YI_NorSpr0BE_WingedCloudWith1up_RideYoshiRt
	dl YI_NorSpr0BF_WingedCloudWithKey_RideYoshiRt
	dl YI_NorSpr0C0_WingedCloudWith3Stars_RideYoshiRt
	dl YI_NorSpr0C1_WingedCloudWith5Stars_RideYoshiRt
	dl YI_NorSpr0C2_WingedCloudWithDoor_RideYoshiRt
	dl YI_NorSpr0C3_WingedCloudWithLowerGround_RideYoshiRt
	dl YI_NorSpr0C4_WingedCloudWithWatermelon_RideYoshiRt
	dl YI_NorSpr0C5_WingedCloudWithFireWatermelon_RideYoshiRt
	dl YI_NorSpr0C6_WingedCloudWithIcyWatermelon_RideYoshiRt
	dl YI_NorSpr0C7_WingedCloudWith3LeafSunflower_RideYoshiRt
	dl YI_NorSpr0C8_WingedCloudWith6LeafSunflower_RideYoshiRt
	dl YI_NorSpr0C9_WingedCloudWithCrashGameFeature_RideYoshiRt
	dl YI_NorSpr0CA_BigBossDoor_RideYoshiRt
	dl YI_NorSpr0CB_WingedCloudWithCoinOrStar_RideYoshiRt
	dl YI_NorSpr0CC_WingedCloudWithRedSwitch_RideYoshiRt
	dl YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_RideYoshiRt
	dl YI_NorSpr0CE_BowserFire_RideYoshiRt
	dl YI_NorSpr0CF_BowserRocks_RideYoshiRt
	dl YI_NorSpr0D0_HorizontalEntranceToRight_RideYoshiRt
	dl YI_NorSpr0D1_SecretPipeEntrance_RideYoshiRt
	dl YI_NorSpr0D2_MarchingMilde_RideYoshiRt
	dl YI_NorSpr0D3_LargeMilde_RideYoshiRt
	dl YI_NorSpr0D4_MediumMilde_RideYoshiRt
	dl YI_NorSpr0D5_BackgroundForHookbillFight_RideYoshiRt
	dl YI_NorSpr0D6_FortGhostWithPlatform_RideYoshiRt
	dl YI_NorSpr0D7_SluggyTheUnshaven_RideYoshiRt
	dl YI_NorSpr0D8_ChompWarningSign_RideYoshiRt
	dl YI_NorSpr0D9_FishinLakitu_RideYoshiRt
	dl YI_NorSpr0DA_FlowerPot_RideYoshiRt
	dl YI_NorSpr0DB_SoftBlock_RideYoshiRt
	dl YI_NorSpr0DC_Snowball_RideYoshiRt
	dl YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_RideYoshiRt
	dl YI_NorSpr0DE_FallingRockPlatform_RideYoshiRt
	dl YI_NorSpr0DF_PiscatoryPete_RideYoshiRt
	dl YI_NorSpr0E0_PreyingMantas_RideYoshiRt
	dl YI_NorSpr0E1_LochNestor_RideYoshiRt
	dl YI_NorSpr0E2_BooBlah_RideYoshiRt
	dl YI_NorSpr0E3_BooBlahWithPiroDangle_RideYoshiRt
	dl YI_NorSpr0E4_HeadingCactus_RideYoshiRt
	dl YI_NorSpr0E5_GreenNeedlenose_RideYoshiRt
	dl YI_NorSpr0E6_Gusty_RideYoshiRt
	dl YI_NorSpr0E7_Burt_RideYoshiRt
	dl YI_NorSpr0E8_Goonie_RideYoshiRt
	dl YI_NorSpr0E9_3WinglessGoonies_RideYoshiRt
	dl YI_NorSpr0EA_VerticalCloudDrop_RideYoshiRt
	dl YI_NorSpr0EB_HorizontalCloudDrop_RideYoshiRt
	dl YI_NorSpr0EC_JumpingFlamerGuy_RideYoshiRt
	dl YI_NorSpr0ED_RunningFlamerGuy_RideYoshiRt
	dl YI_NorSpr0EE_EggoDil_RideYoshiRt
	dl YI_NorSpr0EF_EggoDilFace_RideYoshiRt
	dl YI_NorSpr0F0_EggoDilPetal_RideYoshiRt
	dl YI_NorSpr0F1_EggPlantShootingBubbles_RideYoshiRt
	dl YI_NorSpr0F2_ShyguyOnStilts_RideYoshiRt
	dl YI_NorSpr0F3_WoozyGuy_RideYoshiRt
	dl YI_NorSpr0F4_EggPlant_RideYoshiRt
	dl YI_NorSpr0F5_Slugger_RideYoshiRt
	dl YI_NorSpr0F6_MotherHuffinPuffin_RideYoshiRt
	dl YI_NorSpr0F7_BarneyBubble_RideYoshiRt
	dl YI_NorSpr0F8_BlowHard_RideYoshiRt
	dl YI_NorSpr0F9_YellowNeedlenose_RideYoshiRt
	dl YI_NorSpr0FA_Flower_RideYoshiRt
	dl YI_NorSpr0FB_LongSpearGuy_RideYoshiRt
	dl YI_NorSpr0FC_ShortSpearGuy_RideYoshiRt
	dl YI_NorSpr0FD_ZeusGuy_RideYoshiRt
	dl YI_NorSpr0FE_ZeusGuyBlast_RideYoshiRt
	dl YI_NorSpr0FF_Poochy_RideYoshiRt
	dl YI_NorSpr100_Bubbled1up_RideYoshiRt
	dl YI_NorSpr101_RotatingMace_RideYoshiRt
	dl YI_NorSpr102_DoubleRotatingMace_RideYoshiRt
	dl YI_NorSpr103_BooGuysMovingMace_RideYoshiRt
	dl YI_NorSpr104_JeanDeFillet_RideYoshiRt
	dl YI_NorSpr105_BooGuysCarryingBombToLeft_RideYoshiRt
	dl YI_NorSpr106_BooGuysCarryingBombToRight_RideYoshiRt
	dl YI_NorSpr107_WatermelonSeed_RideYoshiRt
	dl YI_NorSpr108_Milde_RideYoshiRt
	dl YI_NorSpr109_BronzeTapTap_RideYoshiRt
	dl YI_NorSpr10A_SilverTapTap_RideYoshiRt
	dl YI_NorSpr10B_HoppingSilverTapTap_RideYoshiRt
	dl YI_NorSpr10C_ChainedSpikeBall_RideYoshiRt
	dl YI_NorSpr10D_BooGuyOperatingPulley_RideYoshiRt
	dl YI_NorSpr10E_CrateWith6Stars_RideYoshiRt
	dl YI_NorSpr10F_BooManBluff_RideYoshiRt
	dl YI_NorSpr110_Flower_RideYoshiRt
	dl YI_NorSpr111_GeorgetteJelly_RideYoshiRt
	dl YI_NorSpr112_GeorgetteJellyGoo_RideYoshiRt
	dl YI_NorSpr113_Snifit_RideYoshiRt
	dl YI_NorSpr114_SnifitBullet_RideYoshiRt
	dl YI_NorSpr115_Coin_RideYoshiRt
	dl YI_NorSpr116_BuoyantRoundPlatform_RideYoshiRt
	dl YI_NorSpr117_DonutLift_RideYoshiRt
	dl YI_NorSpr118_LargeDonutLift_RideYoshiRt
	dl YI_NorSpr119_Spooky_RideYoshiRt
	dl YI_NorSpr11A_GreenGlove_RideYoshiRt
	dl YI_NorSpr11B_Lakitu_RideYoshiRt
	dl YI_NorSpr11C_LakituCloud_RideYoshiRt
	dl YI_NorSpr11D_SpinyEgg_RideYoshiRt
	dl YI_NorSpr11E_BrownArrowWheel_RideYoshiRt
	dl YI_NorSpr11F_BlueArrowWheel_RideYoshiRt
	dl YI_NorSpr120_DoubledSidedArrowLift_RideYoshiRt
	dl YI_NorSpr121_NumberPlatformExplosion_RideYoshiRt
	dl YI_NorSpr122_BucketWithBandit_RideYoshiRt
	dl YI_NorSpr123_BucketWithCoins_RideYoshiRt
	dl YI_NorSpr124_Stretch_RideYoshiRt
	dl YI_NorSpr125_AttackingAndEndingKamek_RideYoshiRt
	dl YI_NorSpr126_SpikedLogOnPulley_RideYoshiRt
	dl YI_NorSpr127_PulleyOfSpikedLog_RideYoshiRt
	dl YI_NorSpr128_GroundRippleInBabyBowerRoom_RideYoshiRt
	dl YI_NorSpr129_Fuzzy_RideYoshiRt
	dl YI_NorSpr12A_ShyGuyBanditTrap_RideYoshiRt
	dl YI_NorSpr12B_FatGuy_RideYoshiRt
	dl YI_NorSpr12C_FlyOrWhirlyGuy_RideYoshiRt
	dl YI_NorSpr12D_PrologueCutsceneYoshi_RideYoshiRt
	dl YI_NorSpr12E_LargePopEffect_RideYoshiRt
	dl YI_NorSpr12F_HorizontalLavaDrop_RideYoshiRt
	dl YI_NorSpr130_VerticalLavaDrop_RideYoshiRt
	dl YI_NorSpr131_LockedDoor_RideYoshiRt
	dl YI_NorSpr132_LemonDrop_RideYoshiRt
	dl YI_NorSpr133_LanternGhost_RideYoshiRt
	dl YI_NorSpr134_BabyBowser_RideYoshiRt
	dl YI_NorSpr135_CirclingRaven_RideYoshiRt
	dl YI_NorSpr136_CirclingRaven_RideYoshiRt
	dl YI_NorSpr137_3x6FallingStone_RideYoshiRt
	dl YI_NorSpr138_3x3FallingStone_RideYoshiRt
	dl YI_NorSpr139_3x9FallingStone_RideYoshiRt
	dl YI_NorSpr13A_6x3FallingStone_RideYoshiRt
	dl YI_NorSpr13B_StomachAcid_RideYoshiRt
	dl YI_NorSpr13C_DownFlippers_RideYoshiRt
	dl YI_NorSpr13D_DanglingFang_RideYoshiRt
	dl YI_NorSpr13E_FlyingFang_RideYoshiRt
	dl YI_NorSpr13F_SwimmingFlopsyFish_RideYoshiRt
	dl YI_NorSpr140_SwimmingAndJumpingFlopsyFish_RideYoshiRt
	dl YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_RideYoshiRt
	dl YI_NorSpr142_3JumpFlopsyFish_RideYoshiRt
	dl YI_NorSpr143_SprayFish_RideYoshiRt
	dl YI_NorSpr144_RightOrLeftFlippers_RideYoshiRt
	dl YI_NorSpr145_BlueSluggy_RideYoshiRt
	dl YI_NorSpr146_PinkSluggy_RideYoshiRt
	dl YI_NorSpr147_HorizontalEntranceToLeft_RideYoshiRt
	dl YI_NorSpr148_LargeSpringBall_RideYoshiRt
	dl YI_NorSpr149_UpArrowCloud_RideYoshiRt
	dl YI_NorSpr14A_UpRightArrowCloud_RideYoshiRt
	dl YI_NorSpr14B_RightArrowCloud_RideYoshiRt
	dl YI_NorSpr14C_DownRightArrowCloud_RideYoshiRt
	dl YI_NorSpr14D_DownArrowCloud_RideYoshiRt
	dl YI_NorSpr14E_DownLeftArrowCloud_RideYoshiRt
	dl YI_NorSpr14F_LeftArrowCloud_RideYoshiRt
	dl YI_NorSpr150_UpLeftArrowCloud_RideYoshiRt
	dl YI_NorSpr151_RotatingArrowCloud_RideYoshiRt
	dl YI_NorSpr152_Flutter_RideYoshiRt
	dl YI_NorSpr153_GoonieWithShyGuy_RideYoshiRt
	dl YI_NorSpr154_SharkChomp_RideYoshiRt
	dl YI_NorSpr155_FatGoonie_RideYoshiRt
	dl YI_NorSpr156_CactusJack_RideYoshiRt
	dl YI_NorSpr157_WallLakitu_RideYoshiRt
	dl YI_NorSpr158_BowlingGoonie_RideYoshiRt
	dl YI_NorSpr159_WalkingGrunt_RideYoshiRt
	dl YI_NorSpr15A_RunningGrunt_RideYoshiRt
	dl YI_NorSpr15B_DancingSpearGuy_RideYoshiRt
	dl YI_NorSpr15C_GreenRotatingPlatformSwitch_RideYoshiRt
	dl YI_NorSpr15D_RedRotatingPlatformSwitch_RideYoshiRt
	dl YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_RideYoshiRt
	dl YI_NorSpr15F_GreenSpikedPlatform_RideYoshiRt
	dl YI_NorSpr160_RedSpikedPlatform_RideYoshiRt
	dl YI_NorSpr161_RewardItemForDefeatingRoomEnemies_RideYoshiRt
	dl YI_NorSpr162_DoubleSpikePlatformWithSwitch_RideYoshiRt
	dl YI_NorSpr163_BouncingNeedlenose_RideYoshiRt
	dl YI_NorSpr164_NipperPlant_RideYoshiRt
	dl YI_NorSpr165_NipperSpore_RideYoshiRt
	dl YI_NorSpr166_ThunderLakitu_RideYoshiRt
	dl YI_NorSpr167_GreenKoopaShell_RideYoshiRt
	dl YI_NorSpr168_RedKoopaShell_RideYoshiRt
	dl YI_NorSpr169_GreenNakedKoopa_RideYoshiRt
	dl YI_NorSpr16A_RedNakedKoopa_RideYoshiRt
	dl YI_NorSpr16B_GreenKoopa_RideYoshiRt
	dl YI_NorSpr16C_RedKoopa_RideYoshiRt
	dl YI_NorSpr16D_GreenParakoopa_RideYoshiRt
	dl YI_NorSpr16E_RedHorizontalParakoopa_RideYoshiRt
	dl YI_NorSpr16F_RedVerticalParakoopa_RideYoshiRt
	dl YI_NorSpr170_AquaLakitu_RideYoshiRt
	dl YI_NorSpr171_NavalPiranha_RideYoshiRt
	dl YI_NorSpr172_NavalPiranhaBuds_RideYoshiRt
	dl YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_RideYoshiRt
	dl YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_RideYoshiRt
	dl YI_NorSpr175_BaronVonZeppelinCarryingBomb_RideYoshiRt
	dl YI_NorSpr176_BaronVonZeppelinCarryingBandit_RideYoshiRt
	dl YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_RideYoshiRt
	dl YI_NorSpr178_BaronVonZeppelinCarrying1up_RideYoshiRt
	dl YI_NorSpr179_BaronVonZeppelinCarryingKey_RideYoshiRt
	dl YI_NorSpr17A_BaronVonZeppelinCarryingCoins_RideYoshiRt
	dl YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_RideYoshiRt
	dl YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_RideYoshiRt
	dl YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_RideYoshiRt
	dl YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_RideYoshiRt
	dl YI_NorSpr17F_BaronVonZeppelin_RideYoshiRt
	dl YI_NorSpr180_SpinningLog_RideYoshiRt
	dl YI_NorSpr181_CrazeeDayzee_RideYoshiRt
	dl YI_NorSpr182_Dragonfly_RideYoshiRt
	dl YI_NorSpr183_Butterfly_RideYoshiRt
	dl YI_NorSpr184_Bumpty_RideYoshiRt
	dl YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_RideYoshiRt
	dl YI_NorSpr186_MovingLineGuidedGreenPlatformRight_RideYoshiRt
	dl YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_RideYoshiRt
	dl YI_NorSpr188_MovingLineGuidedYellowPlatformRight_RideYoshiRt
	dl YI_NorSpr189_LineGuidedGreenPlatformLeft_RideYoshiRt
	dl YI_NorSpr18A_LineGuidedGreenPlatformRight_RideYoshiRt
	dl YI_NorSpr18B_LineGuidedYellowPlatformLeft_RideYoshiRt
	dl YI_NorSpr18C_LineGuidedYellowPlatformRight_RideYoshiRt
	dl YI_NorSpr18D_LineGuidedRedPlatformLeft_RideYoshiRt
	dl YI_NorSpr18E_LineGuidedGreenPlatformRight_RideYoshiRt
	dl YI_NorSpr18F_SpiralPlatform_RideYoshiRt
	dl YI_NorSpr190_FallingIcicle_RideYoshiRt
	dl YI_NorSpr191_Bird_RideYoshiRt
	dl YI_NorSpr192_PetalGuy_RideYoshiRt
	dl YI_NorSpr193_SnakeCagedGhost_RideYoshiRt
	dl YI_NorSpr194_Blargg_RideYoshiRt
	dl YI_NorSpr195_SmallUnstableSnowPlatform_RideYoshiRt
	dl YI_NorSpr196_UnstableSnowPlatform_RideYoshiRt
	dl YI_NorSpr197_ArrowSign_RideYoshiRt
	dl YI_NorSpr198_DiagonalArrowSign_RideYoshiRt
	dl YI_NorSpr199_DizzyDandy_RideYoshiRt
	dl YI_NorSpr19A_BooGuy_RideYoshiRt
	dl YI_NorSpr19B_TacklingBumpty_RideYoshiRt
	dl YI_NorSpr19C_FlyingBumpty_RideYoshiRt
	dl YI_NorSpr19D_SkeletonGoonie_RideYoshiRt
	dl YI_NorSpr19E_WinglessSkeletonGoonie_RideYoshiRt
	dl YI_NorSpr19F_SkeletonGoonieCarryingBomb_RideYoshiRt
	dl YI_NorSpr1A0_DoubleFirebar_RideYoshiRt
	dl YI_NorSpr1A1_Firebar_RideYoshiRt
	dl YI_NorSpr1A2_HealthStar_RideYoshiRt
	dl YI_NorSpr1A3_LittleSkullMouser_RideYoshiRt
	dl YI_NorSpr1A4_KeyholeCork_RideYoshiRt
	dl YI_NorSpr1A5_RunAwayMonkey_RideYoshiRt
	dl YI_NorSpr1A6_MonkeyWithWatermelon_RideYoshiRt
	dl YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_RideYoshiRt
	dl YI_NorSpr1A8_TheifMonkey_RideYoshiRt
	dl YI_NorSpr1A9_HangingMonkeySpittingSeeds_RideYoshiRt
	dl YI_NorSpr1AA_HotLips_RideYoshiRt
	dl YI_NorSpr1AB_BooBalloon_RideYoshiRt
	dl YI_NorSpr1AC_SmallFrog_RideYoshiRt
	dl YI_NorSpr1AD_MagicShootingKamek_RideYoshiRt
	dl YI_NorSpr1AE_MagicShot_RideYoshiRt
	dl YI_NorSpr1AF_FloatingCoin_RideYoshiRt
	dl YI_NorSpr1B0_DeflatingBalloon_RideYoshiRt
	dl YI_NorSpr1B1_CoinCannon_RideYoshiRt
	dl YI_NorSpr1B2_MinigameCoin_RideYoshiRt
	dl YI_NorSpr1B3_GatherCoinsBandit_RideYoshiRt
	dl YI_NorSpr1B4_MinigameCheckeredPlatform_RideYoshiRt
	dl YI_NorSpr1B5_PoppingBalloonsBandit_RideYoshiRt
	dl YI_NorSpr1B6_MinigameBalloon_RideYoshiRt
	dl YI_NorSpr1B7_SeedSpittingMinigameBandit_RideYoshiRt
	dl YI_NorSpr1B8_WatermelonPot_RideYoshiRt
	dl YI_NorSpr1B9_P2SeedSpittingMinigameBandit_RideYoshiRt

;---------------------------------------------------------------------------

CODE_0394B8:
	REP.b #$30
	LDX.w #$009C
	LDA.w #$00FF
CODE_0394C0:
	STZ.w !EXRAM_YI_Level_AmbSpr_SpriteExistsFlag|!EXRAMBankMirror,x
	STA.w $7462,x
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_0394C0
	SEP.b #$30
	RTL

;---------------------------------------------------------------------------

CODE_0394CF:
	REP.b #$20
	BRA.b CODE_0394F3

CODE_0394D3:
	LDA.w $7E2A
	BNE.b CODE_039505
	REP.b #$20
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w #!Define_YI_LevelID_WelcomeToYoshisIsland
	BEQ.b CODE_0394F6
	CMP.w #!Define_YI_LevelID_DangerIcyConditionsAhead
	BEQ.b CODE_0394EC
	CMP.w #!Define_YI_LevelID_KameksRevenge
	BNE.b CODE_0394F3
CODE_0394EC:
	LDY.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CPY.b #!Define_YI_PlayerForm0E_Skiing
	BEQ.b CODE_0394F6
CODE_0394F3:
	LDA.w #$0000
CODE_0394F6:
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_098925>>16
	LDA.w #FXCODE_098925
	JSL.l !RAM_YI_Global_RT_00DECF
	SEP.b #$20
	RTL

CODE_039505:
	SEP.b #$20
	LDX.b #$17
	LDY.b #$5C
CODE_03950B:
	LDA.w $0C98,x
	BEQ.b CODE_03951A
	LDA.w $7040,y
	STA.b $00,x
	AND.b #$F3
	STA.w $7040,y
CODE_03951A:
	DEY
	DEY
	DEY
	DEY
	DEX
	BPL.b CODE_03950B
	REP.b #$20
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	SEC
	SBC.w #!Define_YI_LevelID_WelcomeToYoshisIsland
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_098925>>16
	LDA.w #FXCODE_098925
	JSL.l !RAM_YI_Global_RT_00DECF
	SEP.b #$20
	LDX.b #$17
	LDY.b #$5C
CODE_03953C:
	LDA.w $0C98,x
	BEQ.b CODE_039546
	LDA.b $00,x
	STA.w $7040,y
CODE_039546:
	DEY
	DEY
	DEY
	DEY
	DEX
	BPL.b CODE_03953C
	RTL

;---------------------------------------------------------------------------

CODE_03954E:
	PHB
	PHK
	PLB
	PHD
	REP.b #$20
	LDA.w #$7960
	TCD
	LDY.b #$3C
	STY.w $7E4A
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.b $0E
	SEC
	SBC.w #$0160
	STA.w !RAM_YI_Global_Layer1XPosLo
	STZ.w $0073
CODE_03956C:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0010
	STA.w !RAM_YI_Global_Layer1XPosLo
	JSR.w CODE_039596
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.b $0E
	BNE.b CODE_03956C
	LDA.w #$4000
	STA.w $60A4
	STA.w $60A6
	SEP.b #$20
	PLD
	PLB
	RTL

DATA_03958E:
	dw $0120,$FFD0

DATA_039592:
	dw $0110,$FFE0

CODE_039596:
	LDX.w $0073
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03958E,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.w $0075
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w DATA_039592,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w #$0030
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_098000>>16
	LDA.w #FXCODE_098000
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDX.w #$0000
CODE_0395D2:
	LDA.l $7027CE,x
	BPL.b CODE_0395DB
	SEP.b #$10
	RTS

CODE_0395DB:
	SEC
	SBC.w #$01BA
	BCC.b CODE_0395E9
	JSR.w CODE_03979E
	BCC.b CODE_039640
	JMP.w CODE_03977F

CODE_0395E9:
	LDA.w $7E2A
	BEQ.b CODE_03962F
	TXY
	LDA.l $7027CE,x
	ASL
	TAX
	LDA.l FXDATA_0A971E,x
	TYX
	AND.w #$6000
	BNE.b CODE_03962F
	LDA.w $7E2A
	INC
	BEQ.b CODE_039640
	LDA.l $7027D0,x
	ASL
	ASL
	ASL
	ASL
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C1
	BCS.b CODE_03962F
	LDA.l $7027D2,x
	ASL
	ASL
	ASL
	ASL
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C1
	BCC.b CODE_039640
CODE_03962F:
	LDY.w #$005C
CODE_039632:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_039654
	DEY
	DEY
	DEY
	DEY
	CPY.w #$0018
	BCS.b CODE_039632
CODE_039640:
	TXY
	SEP.b #$30
	LDA.l $7027D4,x
	TAX
	LDA.b #$00
	STA.l $7028CA,x
	REP.b #$30
	TYX
	JMP.w CODE_03977F

CODE_039654:
	LDA.l $7027D0,x
	ASL
	ASL
	ASL
	ASL
	STA.w $70E2,y
	LDA.l $7027D2,x
	ASL
	ASL
	ASL
	ASL
	STA.w $7182,y
	LDA.w #$0000
	STA.w $7D96,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	STA.w $70E0,y
	STA.w $7D36,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	STA.w $7A36,y
	STA.w $7A38,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	STA.w $7AF8,y
	STA.w $7402,y
	STA.w $7860,y
	STA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,y
	STA.w $7D38,y
	STA.w $7720,y
	STA.w $7680,y
	STA.w $7682,y
	STA.w $7540,y
	STA.w $75E0,y
	STA.w $77C0,y
	DEC
	STA.w $7362,y
	STA.w $7722,y
	LDA.w #$1FFF
	STA.w $7862,y
	LDA.l $7027CE,x
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	PHX
	ASL
	TAX
	SEP.b #$20
	PHY
	LDA.l FXDATA_0AA716,x
	LDY.w #$0006
CODE_0396DF:
	CMP.w $6EB5,y
	BEQ.b CODE_0396EA
	DEY
	BNE.b CODE_0396DF
	TYA
	BRA.b CODE_0396EF

CODE_0396EA:
	TYA
	ADC.b #$06
	ASL
	ASL
CODE_0396EF:
	REP.b #$20
	AND.w #$00FF
	PLY
	STA.w $7180,y
	LDA.l FXDATA_0A9F1A+$01,x
	AND.w #$00FF
	EOR.w #$0020
	STA.w $7042,y
	LDA.l FXDATA_0A9F1A,x
	AND.w #$00FF
	STA.w $74A2,y
	LDA.l FXDATA_0AA318-$01,x
	AND.w #$FF00
	BPL.b CODE_03971B
	ORA.w #$00FF
CODE_03971B:
	XBA
	STA.w $7542,y
	LDA.l FXDATA_0AA318,x
	AND.w #$FF00
	BPL.b CODE_03972B
	ORA.w #$00FF
CODE_03972B:
	XBA
	ASL
	ASL
	ASL
	ASL
	STA.w $75E2,y
	LDA.l FXDATA_0A9B1C,x
	STA.w $7040,y
	LDA.l FXDATA_0A971E,x
	STA.w $6FA2,y
	LDA.l FXDATA_0A9320,x
	STA.w $6FA0,y
	AND.w #$001F
	ASL
	ASL
	ASL
	TAX
	LDA.l FXDATA_0A9220,x
	STA.w $7B56,y
	LDA.l FXDATA_0A9220+$02,x
	STA.w $7B58,y
	LDA.l FXDATA_0A9220+$04,x
	STA.w $7BB6,y
	LDA.l FXDATA_0A9220+$06,x
	STA.w $7BB8,y
	PLX
	LDA.w $0073
	STA.w $7400,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.l $7027D4,x
	STA.w $74A0,y
CODE_03977F:
	TXA
	CLC
	ADC.w #$0008
	TAX
	JMP.w CODE_0395D2

;---------------------------------------------------------------------------

CODE_039788:
	PHB
	PHK
	PLB
	SEC
	SBC.w #$01BA
	REP.b #$10
	JSR.w CODE_03979E
	SEP.b #$10
	LDA.w #$00FF
	STA.w $0C0C,y
	PLB
	RTL

CODE_03979E:
	PHX
	LDY.w #$0006
CODE_0397A2:
	LDX.w $0C04,y
	BEQ.b CODE_0397AE
	DEY
	DEY
	BPL.b CODE_0397A2
	PLX
	CLC
	RTS

CODE_0397AE:
	INC
	STA.w $0C04,y
	ASL
	PLX
	PHX
	PHA
	LDA.l $7027D4,x
	STA.w $0C0C,y
	LDA.l $7027D0,x
	STA.w $7960
	LDA.l $7027D2,x
	STA.w $7962
	PLA
	TAX
	JSR.w (DATA_03D46F-$02,x)
	PLX
	SEC
	RTS

;---------------------------------------------------------------------------

CODE_0397D3:
	PHB
	PHK
	PLB
	PHD
	REP.b #$20
	LDA.w #$7960
	TCD
	BRA.b CODE_0397EC

CODE_0397DF:
	PHB
	PHK
	PLB
	PHD
	REP.b #$20
	LDA.w #$7960
	TCD
	JSR.w CODE_039596
CODE_0397EC:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_039802
	INC.b $14
	LDX.b #FXCODE_09884C>>16
	LDA.w #FXCODE_09884C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_039802:
	STZ.w $607A
	LDA.w #$29CC
	STA.l $7029CA
	LDX.b #FXCODE_0ACFED>>16
	LDA.w #FXCODE_0ACFED
	JSL.l !RAM_YI_Global_RT_00DECF
	LDA.w #$0008
	STA.w $6120
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $611C
	LDA.w #$000C
	LDX.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CPX.b #!Define_YI_PlayerForm08_Train
	BNE.b CODE_03984D
	LDY.w $6180
	BEQ.b CODE_039855
	LDA.w #$0004
	STA.w $6120
	STA.w $6122
	LDA.w #$00FF
	LDY.w $60C4
	BEQ.b CODE_039843
	LSR
CODE_039843:
	EOR.w $617E
	INC
	TAY
	LDA.w #$0015
	BRA.b CODE_039874

;---------------------------------------------------------------------------

CODE_03984D:
	LDY.w $60C2
	BEQ.b CODE_039855
	LDA.w #$0006
CODE_039855:
	STA.w $6122
	CPX.b #$10
	BNE.b CODE_039886
	LDY.w $6180
	BEQ.b CODE_039886
	INC.w $6122
	LDA.w $617E
	LDY.w $60C4
	BNE.b CODE_039870
	EOR.w #$00FF
	INC
CODE_039870:
	TAY
	LDA.w #$0021
CODE_039874:
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	TYA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_09F83A>>16
	LDA.w #FXCODE_09F83A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_039895

CODE_039886:
	SEC
	SBC.w #$0020
	EOR.w #$FFFF
	INC
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $611E
CODE_039895:
	LDX.b #FXCODE_098084>>16
	LDA.w #FXCODE_098084
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $607A
	BEQ.b CODE_0398A7
	JSL.l CODE_0085D2
CODE_0398A7:
	JSL.l CODE_008AB6
	LDA.w $7E2A
	DEC
	BMI.b CODE_0398B7
	LDA.w #$FFF8
	STA.w $7E2A
CODE_0398B7:
	STZ.w $0CC2
	STZ.w $61BA
	LDA.w #$FFFF
	STA.w $0D96
	LDX.b #$5C
CODE_0398C5:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BEQ.b CODE_0398DF
	STX.b $12
	PHB
	LDY.w !REGISTER_SoftwareLatchForHVCounter
	LDY.w !REGISTER_PPUStatusFlag2
	LDA.w !REGISTER_HCounter
	ADC.b $10
	STA.b $10
	JSL.l CODE_039A12
	PLB
CODE_0398DF:
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_0398C5
	LDY.w $0C50
	BEQ.b CODE_0398F7
	LDY.w $0C54
	CPY.b #$30
	BMI.b CODE_0398F4
	STZ.w $0C54
CODE_0398F4:
	INC.w $0C54
CODE_0398F7:
	REP.b #$10
	LDY.w #$0006
CODE_0398FC:
	LDA.w $0C04,y
	BEQ.b CODE_039906
	ASL
	TAX
	JSR.w (DATA_03D4E3,x)
CODE_039906:
	DEY
	DEY
	BPL.b CODE_0398FC
	SEP.b #$10
	LDA.w $7E2A
	BPL.b CODE_039953
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_039938
	INC.w $7E2A
	BPL.b CODE_039956
	LDA.w $60B0
	CMP.w #$0038
	BMI.b CODE_039938
	CMP.w #$00B8
	BPL.b CODE_039938
	LDA.w $60B2
	CMP.w #$0040
	BMI.b CODE_039938
	CMP.w #$0080
	BPL.b CODE_039938
	JMP.w CODE_0399BF

CODE_039938:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STA.w $0C1E
	STA.w $0C20
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	LDA.w !RAM_YI_Global_Layer1YPosLo
	STA.w $0C27
CODE_039953:
	JMP.w CODE_0399CE

CODE_039956:
	DEC.w $7E2A
	LDA.w $0C94
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $0C96
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0C23
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $0C27
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0600
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $0C2A
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $0C2C
	REP.b #$10
	JSR.w CODE_03D997
	SEP.b #$10
	LDA.w $0C94
	SEC
	SBC.w $0C23
	BEQ.b CODE_0399A7
	EOR.w $0C2A
	BPL.b CODE_0399CE
	LDA.w $0C94
	STA.w $0C23
CODE_0399A7:
	LDA.w $0C96
	SEC
	SBC.w $0C27
	BEQ.b CODE_0399BB
	EOR.w $0C2C
	BPL.b CODE_0399CE
	LDA.w $0C96
	STA.w $0C27
CODE_0399BB:
	JSL.l CODE_04DCF9
CODE_0399BF:
	STZ.w $7E2A
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w $0C1E
	STZ.w $0C20
CODE_0399CE:
	SEP.b #$20
	PLD
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_0399D3:
	LDA.w $7E35
	AND.w #$FF00
	CLC
	ADC.w $7E32
	STA.w $7E32
	LDA.w $7E36
	AND.w #$FF00
	BPL.b CODE_0399EB
	ORA.w #$00FF
CODE_0399EB:
	XBA
	ADC.w $7E2E
	STA.w $7E2E
	LDA.w $7E37
	AND.w #$FF00
	CLC
	ADC.w $7E34
	STA.w $7E34
	LDA.w $7E38
	AND.w #$FF00
	BPL.b CODE_039A0A
	ORA.w #$00FF
CODE_039A0A:
	XBA
	ADC.w $7E30
	STA.w $7E30
	RTS

;---------------------------------------------------------------------------

CODE_039A12:
	LDA.w $70E2,x
	STA.w $6EBC
	LDA.w $7182,x
	STA.w $6EBE
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_039A49
	LDA.w $7A96,x
	BEQ.b CODE_039A31
	DEC.w $7A96,x
CODE_039A31:
	LDA.w $7A98,x
	BEQ.b CODE_039A39
	DEC.w $7A98,x
CODE_039A39:
	LDA.w $7AF6,x
	BEQ.b CODE_039A41
	DEC.w $7AF6,x
CODE_039A41:
	LDA.w $7AF8,x
	BEQ.b CODE_039A49
	DEC.w $7AF8,x
CODE_039A49:
	LDY.w $77C1,x
	BEQ.b CODE_039A51
	DEC.w $77C1,x
CODE_039A51:
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w DATA_039A59-$02,y
	PHA
	RTS

DATA_039A59:
	dw CODE_039A6E-$01
	dw CODE_039A6E-$01
	dw CODE_03A247-$01
	dw CODE_039AC8-$01
	dw CODE_03A11D-$01
	dw CODE_039F8D-$01
	dw CODE_03A085-$01
	dw CODE_039A90-$01
	dw CODE_03A00B-$01

;---------------------------------------------------------------------------

YI_NorSpr0B3_FuzzyFart_Init:

YI_NorSpr000_LavaLog_StompRt:
YI_NorSpr001_ClosedDoor_StompRt:
YI_NorSpr002_NavalPiranhaVines_StompRt:
YI_NorSpr003_CrateWithKey_StompRt:
YI_NorSpr004_HitSuperBabyMarioBlock_StompRt:
YI_NorSpr006_WatermelonFreeze_StompRt:
YI_NorSpr008_FallingRubble_StompRt:
YI_NorSpr00A_Kaboomba_StompRt:
YI_NorSpr00B_Cannonball_StompRt:
YI_NorSpr00C_RaphaelTheRaven_StompRt:
YI_NorSpr00D_GoalRing_StompRt:
YI_NorSpr00E_GOALLetters_StompRt:
YI_NorSpr00F_BonusChallengeSign_StompRt:
YI_NorSpr010_RoundedCagedGhost_StompRt:
YI_NorSpr011_ItemCard_StompRt:
YI_NorSpr012_BossDoor_StompRt:
YI_NorSpr013_BossExplosion_StompRt:
YI_NorSpr014_KeyFromBoss_StompRt:
YI_NorSpr015_SubmarineTorpedo_StompRt:
YI_NorSpr016_BiggerBoo_StompRt:
YI_NorSpr018_WatermelonFlame_StompRt:
YI_NorSpr019_Bubble_StompRt:
YI_NorSpr01A_SkiLift_StompRt:
YI_NorSpr01B_VerticalLavaLog_StompRt:
YI_NorSpr01C_DrFreezegood_StompRt:
YI_NorSpr01D_DrFreezegoodOnSkiLift_StompRt:
YI_NorSpr01F_RotatingDoors_StompRt:
YI_NorSpr021_Bucket_StompRt:
YI_NorSpr026_BowserFightGiantEgg_StompRt:
YI_NorSpr02C_LungeFish_StompRt:
YI_NorSpr02D_SalvoTheSlime_StompRt:
YI_NorSpr02E_EyesOfSalvoTheSlime_StompRt:
YI_NorSpr02F_LittleMouserHole_StompRt:
YI_NorSpr031_PottedSpikedFunGuy_StompRt:
YI_NorSpr032_PeekingLittleMouser_StompRt:
YI_NorSpr034_RogersPot_StompRt:
YI_NorSpr035_RogerThePottedGhost_StompRt:
YI_NorSpr036_FallingWall_StompRt:
YI_NorSpr037_GrimLeecher_StompRt:
YI_NorSpr038_PottedGhostFlame_StompRt:
YI_NorSpr039_HorizontalRotatingPlank_StompRt:
YI_NorSpr03A_3MiniRavens_StompRt:
YI_NorSpr03B_MiniRaven_StompRt:
YI_NorSpr03C_TapTapTheRedNose_StompRt:
YI_NorSpr03D_LargeSeesaw_StompRt:
YI_NorSpr03E_ThinPlatform_StompRt:
YI_NorSpr03F_SlimeBlock_StompRt:
YI_NorSpr040_BabyLuigi_StompRt:
YI_NorSpr041_Stork_StompRt:
YI_NorSpr042_VerticalPipeEntrance_StompRt:
YI_NorSpr045_PrinceFroggy_StompRt:
YI_NorSpr046_BurtTheBashful_StompRt:
YI_NorSpr047_ShyguyPushingRoger_StompRt:
YI_NorSpr048_CutsceneKamek_StompRt:
YI_NorSpr049_ThunderLakituFireBlast1_StompRt:
YI_NorSpr04A_ThunderLakituFireBlast2_StompRt:
YI_NorSpr04B_ThunderLakituFireBlast3_StompRt:
YI_NorSpr04C_UpsidedownBlowHard_StompRt:
YI_NorSpr04D_UnusedSpriteIndex_StompRt:
YI_NorSpr04E_LockedDoor_StompRt:
YI_NorSpr04F_MiddleRing_StompRt:
YI_NorSpr050_GreyRotatingWoodenBoard_StompRt:
YI_NorSpr051_LargeWheel_StompRt:
YI_NorSpr052_BalloonPlatform_StompRt:
YI_NorSpr053_KamekSayingOhMy_StompRt:
YI_NorSpr054_UpsideDownPiranhaPlant_StompRt:
YI_NorSpr055_4GreenRotatingPlatforms_StompRt:
YI_NorSpr056_4PinkRotatingPlatforms_StompRt:
YI_NorSpr057_SewerGhostWithPlatform_StompRt:
YI_NorSpr059_StationarySuperStar_StompRt:
YI_NorSpr05A_RaphaelSparkAttack_StompRt:
YI_NorSpr05D_GlitchedSprite_StompRt:
YI_NorSpr05E_BrownWoodenBoard_StompRt:
YI_NorSpr05F_AutoRotateBrownWoodenBoard_StompRt:
YI_NorSpr060_Bomb_StompRt:
YI_NorSpr061_BabyMario_StompRt:
YI_NorSpr063_MuddyBuddy_StompRt:
YI_NorSpr064_4AutoRotatingPinkPlatforms_StompRt:
YI_NorSpr065_RedCoin_StompRt:
YI_NorSpr066_PiranhaPlant_StompRt:
YI_NorSpr067_RockRevealedHiddenWingedCloud_StompRt:
YI_NorSpr068_FlashingEggBlock_StompRt:
YI_NorSpr069_RedEggBlock_StompRt:
YI_NorSpr06A_YellowEggBlock_StompRt:
YI_NorSpr06B_GreenEggBlock_StompRt:
YI_NorSpr06C_LargeSpringBall_StompRt:
YI_NorSpr06D_ClockwiseHootieTheBlueFish_StompRt:
YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_StompRt:
YI_NorSpr06F_SpringBall_StompRt:
YI_NorSpr070_Clawdaddy_StompRt:
YI_NorSpr071_BigBoo_StompRt:
YI_NorSpr072_TrainBandit_StompRt:
YI_NorSpr073_BalloonPump_StompRt:
YI_NorSpr074_Spike_StompRt:
YI_NorSpr075_SpikeBall_StompRt:
YI_NorSpr076_ClockwisePiroDangle_StompRt:
YI_NorSpr077_CounterclockwisePiroDangle_StompRt:
YI_NorSpr078_RedBulletBillShooter_StompRt:
YI_NorSpr079_YellowBulletBillShooter_StompRt:
YI_NorSpr07A_GreenBulletBillShooter_StompRt:
YI_NorSpr07E_DentOfSquishyPlatform_StompRt:
YI_NorSpr07F_LogSeesawPlatform_StompRt:
YI_NorSpr080_StraightLavaBubble_StompRt:
YI_NorSpr081_FollowingLavaBubble_StompRt:
YI_NorSpr082_ChainChomp_StompRt:
YI_NorSpr083_BowserFightCloud_StompRt:
YI_NorSpr084_TeleportSprite_StompRt:
YI_NorSpr085_HarryHedgehog_StompRt:
YI_NorSpr086_GlitchedSprite_StompRt:
YI_NorSpr087_MockUpLaidEgg_StompRt:
YI_NorSpr088_SuperStar_StompRt:
YI_NorSpr089_HorizontalMovingRedPlatform_StompRt:
YI_NorSpr08A_VerticalMovingPinkPlatform_StompRt:
YI_NorSpr08B_MockUp_StompRt:
YI_NorSpr08C_YoshiAtGoal_StompRt:
YI_NorSpr08D_Flyguy_StompRt:
YI_NorSpr08E_BowserRoomKamek_StompRt:
YI_NorSpr08F_MonkeySwing_StompRt:
YI_NorSpr090_DanglingGhost_StompRt:
YI_NorSpr092_MelonBug_StompRt:
YI_NorSpr093_Door_StompRt:
YI_NorSpr094_ExpandingBlock_StompRt:
YI_NorSpr095_BlueCheckeredBlock_StompRt:
YI_NorSpr096_RedCheckeredBlock_StompRt:
YI_NorSpr097_POWBlock_StompRt:
YI_NorSpr098_EndTransformationBlock_StompRt:
YI_NorSpr099_SpinyEgg_StompRt:
YI_NorSpr09A_SwingingGreenPlatform_StompRt:
YI_NorSpr09B_MaceGuy_StompRt:
YI_NorSpr09C_Mace_StompRt:
YI_NorSpr09D_RedSwitch_StompRt:
YI_NorSpr09E_ChompRock_StompRt:
YI_NorSpr09F_PtooiePiranhaPlant_StompRt:
YI_NorSpr0A0_Tulip_StompRt:
YI_NorSpr0A1_SmallPot_StompRt:
YI_NorSpr0A2_ThunderLakituFireball_StompRt:
YI_NorSpr0A5_NepEnut_StompRt:
YI_NorSpr0A6_IncomingChomp_StompRt:
YI_NorSpr0A7_GroupOfIncomingChomps_StompRt:
YI_NorSpr0A8_FallingIncomingChomp_StompRt:
YI_NorSpr0A9_IncomingChompShadow_StompRt:
YI_NorSpr0AA_BackgroundShyguy_StompRt:
YI_NorSpr0AB_FullEggSpawner_StompRt:
YI_NorSpr0AC_FallingRockArrowAndShadow_StompRt:
YI_NorSpr0AD_MessageBox_StompRt:
YI_NorSpr0AE_HookbillTheKoopa_StompRt:
YI_NorSpr0AF_CarMorphBubble_StompRt:
YI_NorSpr0B0_MoleMorphBubble_StompRt:
YI_NorSpr0B1_HelicopterMorphBubble_StompRt:
YI_NorSpr0B2_TrainMorphBubble_StompRt:
YI_NorSpr0B3_FuzzyFart_StompRt:
YI_NorSpr0B4_SubmarineMorphBubble_StompRt:
YI_NorSpr0B5_HiddenWingedCloud_StompRt:
YI_NorSpr0B6_WingedCloudWith8Coins_StompRt:
YI_NorSpr0B7_WingedCloudWithBubbled1up_StompRt:
YI_NorSpr0B8_WingedCloudWithFlower_StompRt:
YI_NorSpr0B9_WingedCloudWithPOW_StompRt:
YI_NorSpr0BA_WingedCloudWithStairs_StompRt:
YI_NorSpr0BB_WingedCloudWithPlatform_StompRt:
YI_NorSpr0BC_WingedCloudWithBandit_StompRt:
YI_NorSpr0BD_WingedCloudWithCoin_StompRt:
YI_NorSpr0BE_WingedCloudWith1up_StompRt:
YI_NorSpr0BF_WingedCloudWithKey_StompRt:
YI_NorSpr0C0_WingedCloudWith3Stars_StompRt:
YI_NorSpr0C1_WingedCloudWith5Stars_StompRt:
YI_NorSpr0C2_WingedCloudWithDoor_StompRt:
YI_NorSpr0C3_WingedCloudWithLowerGround_StompRt:
YI_NorSpr0C4_WingedCloudWithWatermelon_StompRt:
YI_NorSpr0C5_WingedCloudWithFireWatermelon_StompRt:
YI_NorSpr0C6_WingedCloudWithIcyWatermelon_StompRt:
YI_NorSpr0C7_WingedCloudWith3LeafSunflower_StompRt:
YI_NorSpr0C8_WingedCloudWith6LeafSunflower_StompRt:
YI_NorSpr0C9_WingedCloudWithCrashGameFeature_StompRt:
YI_NorSpr0CA_BigBossDoor_StompRt:
YI_NorSpr0CB_WingedCloudWithCoinOrStar_StompRt:
YI_NorSpr0CC_WingedCloudWithRedSwitch_StompRt:
YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_StompRt:
YI_NorSpr0CE_BowserFire_StompRt:
YI_NorSpr0CF_BowserRocks_StompRt:
YI_NorSpr0D0_HorizontalEntranceToRight_StompRt:
YI_NorSpr0D1_SecretPipeEntrance_StompRt:
YI_NorSpr0D2_MarchingMilde_StompRt:
YI_NorSpr0D5_BackgroundForHookbillFight_StompRt:
YI_NorSpr0D6_FortGhostWithPlatform_StompRt:
YI_NorSpr0D7_SluggyTheUnshaven_StompRt:
YI_NorSpr0D8_ChompWarningSign_StompRt:
YI_NorSpr0DA_FlowerPot_StompRt:
YI_NorSpr0DB_SoftBlock_StompRt:
YI_NorSpr0DC_Snowball_StompRt:
YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_StompRt:
YI_NorSpr0DE_FallingRockPlatform_StompRt:
YI_NorSpr0DF_PiscatoryPete_StompRt:
YI_NorSpr0E0_PreyingMantas_StompRt:
YI_NorSpr0E1_LochNestor_StompRt:
YI_NorSpr0E2_BooBlah_StompRt:
YI_NorSpr0E3_BooBlahWithPiroDangle_StompRt:
YI_NorSpr0E4_HeadingCactus_StompRt:
YI_NorSpr0E5_GreenNeedlenose_StompRt:
YI_NorSpr0E6_Gusty_StompRt:
YI_NorSpr0E7_Burt_StompRt:
YI_NorSpr0E8_Goonie_StompRt:
YI_NorSpr0E9_3WinglessGoonies_StompRt:
YI_NorSpr0EC_JumpingFlamerGuy_StompRt:
YI_NorSpr0ED_RunningFlamerGuy_StompRt:
YI_NorSpr0EE_EggoDil_StompRt:
YI_NorSpr0EF_EggoDilFace_StompRt:
YI_NorSpr0F0_EggoDilPetal_StompRt:
YI_NorSpr0F1_EggPlantShootingBubbles_StompRt:
YI_NorSpr0F4_EggPlant_StompRt:
YI_NorSpr0F5_Slugger_StompRt:
YI_NorSpr0F6_MotherHuffinPuffin_StompRt:
YI_NorSpr0F7_BarneyBubble_StompRt:
YI_NorSpr0F8_BlowHard_StompRt:
YI_NorSpr0F9_YellowNeedlenose_StompRt:
YI_NorSpr0FA_Flower_StompRt:
YI_NorSpr0FB_LongSpearGuy_StompRt:
YI_NorSpr0FC_ShortSpearGuy_StompRt:
YI_NorSpr0FE_ZeusGuyBlast_StompRt:
YI_NorSpr0FF_Poochy_StompRt:
YI_NorSpr100_Bubbled1up_StompRt:
YI_NorSpr101_RotatingMace_StompRt:
YI_NorSpr102_DoubleRotatingMace_StompRt:
YI_NorSpr103_BooGuysMovingMace_StompRt:
YI_NorSpr104_JeanDeFillet_StompRt:
YI_NorSpr105_BooGuysCarryingBombToLeft_StompRt:
YI_NorSpr106_BooGuysCarryingBombToRight_StompRt:
YI_NorSpr108_Milde_StompRt:
YI_NorSpr109_BronzeTapTap_StompRt:
YI_NorSpr10A_SilverTapTap_StompRt:
YI_NorSpr10B_HoppingSilverTapTap_StompRt:
YI_NorSpr10C_ChainedSpikeBall_StompRt:
YI_NorSpr10D_BooGuyOperatingPulley_StompRt:
YI_NorSpr10E_CrateWith6Stars_StompRt:
YI_NorSpr10F_BooManBluff_StompRt:
YI_NorSpr110_Flower_StompRt:
YI_NorSpr111_GeorgetteJelly_StompRt:
YI_NorSpr112_GeorgetteJellyGoo_StompRt:
YI_NorSpr113_Snifit_StompRt:
YI_NorSpr114_SnifitBullet_StompRt:
YI_NorSpr115_Coin_StompRt:
YI_NorSpr116_BuoyantRoundPlatform_StompRt:
YI_NorSpr117_DonutLift_StompRt:
YI_NorSpr118_LargeDonutLift_StompRt:
YI_NorSpr119_Spooky_StompRt:
YI_NorSpr11A_GreenGlove_StompRt:
YI_NorSpr11C_LakituCloud_StompRt:
YI_NorSpr11D_SpinyEgg_StompRt:
YI_NorSpr11E_BrownArrowWheel_StompRt:
YI_NorSpr11F_BlueArrowWheel_StompRt:
YI_NorSpr120_DoubledSidedArrowLift_StompRt:
YI_NorSpr121_NumberPlatformExplosion_StompRt:
YI_NorSpr122_BucketWithBandit_StompRt:
YI_NorSpr123_BucketWithCoins_StompRt:
YI_NorSpr125_AttackingAndEndingKamek_StompRt:
YI_NorSpr126_SpikedLogOnPulley_StompRt:
YI_NorSpr127_PulleyOfSpikedLog_StompRt:
YI_NorSpr128_GroundRippleInBabyBowerRoom_StompRt:
YI_NorSpr129_Fuzzy_StompRt:
YI_NorSpr12A_ShyGuyBanditTrap_StompRt:
YI_NorSpr12B_FatGuy_StompRt:
YI_NorSpr12D_PrologueCutsceneYoshi_StompRt:
YI_NorSpr12E_LargePopEffect_StompRt:
YI_NorSpr12F_HorizontalLavaDrop_StompRt:
YI_NorSpr130_VerticalLavaDrop_StompRt:
YI_NorSpr131_LockedDoor_StompRt:
YI_NorSpr132_LemonDrop_StompRt:
YI_NorSpr134_BabyBowser_StompRt:
YI_NorSpr135_CirclingRaven_StompRt:
YI_NorSpr136_CirclingRaven_StompRt:
YI_NorSpr137_3x6FallingStone_StompRt:
YI_NorSpr138_3x3FallingStone_StompRt:
YI_NorSpr139_3x9FallingStone_StompRt:
YI_NorSpr13A_6x3FallingStone_StompRt:
YI_NorSpr13B_StomachAcid_StompRt:
YI_NorSpr13C_DownFlippers_StompRt:
YI_NorSpr13D_DanglingFang_StompRt:
YI_NorSpr13E_FlyingFang_StompRt:
YI_NorSpr13F_SwimmingFlopsyFish_StompRt:
YI_NorSpr140_SwimmingAndJumpingFlopsyFish_StompRt:
YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_StompRt:
YI_NorSpr142_3JumpFlopsyFish_StompRt:
YI_NorSpr143_SprayFish_StompRt:
YI_NorSpr144_RightOrLeftFlippers_StompRt:
YI_NorSpr147_HorizontalEntranceToLeft_StompRt:
YI_NorSpr148_LargeSpringBall_StompRt:
YI_NorSpr149_UpArrowCloud_StompRt:
YI_NorSpr14A_UpRightArrowCloud_StompRt:
YI_NorSpr14B_RightArrowCloud_StompRt:
YI_NorSpr14C_DownRightArrowCloud_StompRt:
YI_NorSpr14D_DownArrowCloud_StompRt:
YI_NorSpr14E_DownLeftArrowCloud_StompRt:
YI_NorSpr14F_LeftArrowCloud_StompRt:
YI_NorSpr150_UpLeftArrowCloud_StompRt:
YI_NorSpr151_RotatingArrowCloud_StompRt:
YI_NorSpr152_Flutter_StompRt:
YI_NorSpr153_GoonieWithShyGuy_StompRt:
YI_NorSpr154_SharkChomp_StompRt:
YI_NorSpr155_FatGoonie_StompRt:
YI_NorSpr156_CactusJack_StompRt:
YI_NorSpr158_BowlingGoonie_StompRt:
YI_NorSpr159_WalkingGrunt_StompRt:
YI_NorSpr15A_RunningGrunt_StompRt:
YI_NorSpr15B_DancingSpearGuy_StompRt:
YI_NorSpr15C_GreenRotatingPlatformSwitch_StompRt:
YI_NorSpr15D_RedRotatingPlatformSwitch_StompRt:
YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_StompRt:
YI_NorSpr15F_GreenSpikedPlatform_StompRt:
YI_NorSpr160_RedSpikedPlatform_StompRt:
YI_NorSpr161_RewardItemForDefeatingRoomEnemies_StompRt:
YI_NorSpr162_DoubleSpikePlatformWithSwitch_StompRt:
YI_NorSpr163_BouncingNeedlenose_StompRt:
YI_NorSpr164_NipperPlant_StompRt:
YI_NorSpr165_NipperSpore_StompRt:
YI_NorSpr171_NavalPiranha_StompRt:
YI_NorSpr172_NavalPiranhaBuds_StompRt:
YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_StompRt:
YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_StompRt:
YI_NorSpr175_BaronVonZeppelinCarryingBomb_StompRt:
YI_NorSpr176_BaronVonZeppelinCarryingBandit_StompRt:
YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_StompRt:
YI_NorSpr178_BaronVonZeppelinCarrying1up_StompRt:
YI_NorSpr179_BaronVonZeppelinCarryingKey_StompRt:
YI_NorSpr17A_BaronVonZeppelinCarryingCoins_StompRt:
YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_StompRt:
YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_StompRt:
YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_StompRt:
YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_StompRt:
YI_NorSpr17F_BaronVonZeppelin_StompRt:
YI_NorSpr180_SpinningLog_StompRt:
YI_NorSpr182_Dragonfly_StompRt:
YI_NorSpr183_Butterfly_StompRt:
YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_StompRt:
YI_NorSpr186_MovingLineGuidedGreenPlatformRight_StompRt:
YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_StompRt:
YI_NorSpr188_MovingLineGuidedYellowPlatformRight_StompRt:
YI_NorSpr189_LineGuidedGreenPlatformLeft_StompRt:
YI_NorSpr18A_LineGuidedGreenPlatformRight_StompRt:
YI_NorSpr18B_LineGuidedYellowPlatformLeft_StompRt:
YI_NorSpr18C_LineGuidedYellowPlatformRight_StompRt:
YI_NorSpr18D_LineGuidedRedPlatformLeft_StompRt:
YI_NorSpr18E_LineGuidedGreenPlatformRight_StompRt:
YI_NorSpr18F_SpiralPlatform_StompRt:
YI_NorSpr190_FallingIcicle_StompRt:
YI_NorSpr191_Bird_StompRt:
YI_NorSpr192_PetalGuy_StompRt:
YI_NorSpr193_SnakeCagedGhost_StompRt:
YI_NorSpr194_Blargg_StompRt:
YI_NorSpr195_SmallUnstableSnowPlatform_StompRt:
YI_NorSpr196_UnstableSnowPlatform_StompRt:
YI_NorSpr197_ArrowSign_StompRt:
YI_NorSpr198_DiagonalArrowSign_StompRt:
YI_NorSpr199_DizzyDandy_StompRt:
YI_NorSpr19E_WinglessSkeletonGoonie_StompRt:
YI_NorSpr1A0_DoubleFirebar_StompRt:
YI_NorSpr1A1_Firebar_StompRt:
YI_NorSpr1A2_HealthStar_StompRt:
YI_NorSpr1A3_LittleSkullMouser_StompRt:
YI_NorSpr1A4_KeyholeCork_StompRt:
YI_NorSpr1AA_HotLips_StompRt:
YI_NorSpr1AC_SmallFrog_StompRt:
YI_NorSpr1AE_MagicShot_StompRt:
YI_NorSpr1AF_FloatingCoin_StompRt:
YI_NorSpr1B0_DeflatingBalloon_StompRt:
YI_NorSpr1B1_CoinCannon_StompRt:
YI_NorSpr1B2_MinigameCoin_StompRt:
YI_NorSpr1B3_GatherCoinsBandit_StompRt:
YI_NorSpr1B4_MinigameCheckeredPlatform_StompRt:
YI_NorSpr1B5_PoppingBalloonsBandit_StompRt:
YI_NorSpr1B6_MinigameBalloon_StompRt:
YI_NorSpr1B8_WatermelonPot_StompRt:
YI_NorSpr1B9_P2SeedSpittingMinigameBandit_StompRt:
YI_NorSpr000_LavaLog_RideYoshiRt:
YI_NorSpr001_ClosedDoor_RideYoshiRt:
YI_NorSpr002_NavalPiranhaVines_RideYoshiRt:
YI_NorSpr003_CrateWithKey_RideYoshiRt:
YI_NorSpr004_HitSuperBabyMarioBlock_RideYoshiRt:
YI_NorSpr005_IcyWatermelon_RideYoshiRt:
YI_NorSpr006_WatermelonFreeze_RideYoshiRt:
YI_NorSpr007_Watermelon_RideYoshiRt:
YI_NorSpr008_FallingRubble_RideYoshiRt:
YI_NorSpr009_FireWatermelon_RideYoshiRt:
YI_NorSpr00A_Kaboomba_RideYoshiRt:
YI_NorSpr00B_Cannonball_RideYoshiRt:
YI_NorSpr00C_RaphaelTheRaven_RideYoshiRt:
YI_NorSpr00D_GoalRing_RideYoshiRt:
YI_NorSpr00E_GOALLetters_RideYoshiRt:
YI_NorSpr00F_BonusChallengeSign_RideYoshiRt:
YI_NorSpr010_RoundedCagedGhost_RideYoshiRt:
YI_NorSpr011_ItemCard_RideYoshiRt:
YI_NorSpr012_BossDoor_RideYoshiRt:
YI_NorSpr013_BossExplosion_RideYoshiRt:
YI_NorSpr014_KeyFromBoss_RideYoshiRt:
YI_NorSpr015_SubmarineTorpedo_RideYoshiRt:
YI_NorSpr016_BiggerBoo_RideYoshiRt:
YI_NorSpr017_FrogPirate_RideYoshiRt:
YI_NorSpr018_WatermelonFlame_RideYoshiRt:
YI_NorSpr019_Bubble_RideYoshiRt:
YI_NorSpr01A_SkiLift_RideYoshiRt:
YI_NorSpr01B_VerticalLavaLog_RideYoshiRt:
YI_NorSpr01C_DrFreezegood_RideYoshiRt:
YI_NorSpr01D_DrFreezegoodOnSkiLift_RideYoshiRt:
YI_NorSpr01E_Shyguy_RideYoshiRt:
YI_NorSpr01F_RotatingDoors_RideYoshiRt:
YI_NorSpr020_Bandit_RideYoshiRt:
YI_NorSpr021_Bucket_RideYoshiRt:
YI_NorSpr022_FlashingEgg_RideYoshiRt:
YI_NorSpr023_RedEgg_RideYoshiRt:
YI_NorSpr024_YellowEgg_RideYoshiRt:
YI_NorSpr025_GreenEgg_RideYoshiRt:
YI_NorSpr026_BowserFightGiantEgg_RideYoshiRt:
YI_NorSpr027_Key_RideYoshiRt:
YI_NorSpr028_HuffinPuffin_RideYoshiRt:
YI_NorSpr029_GiantEgg_RideYoshiRt:
YI_NorSpr02A_RedGiantEgg_RideYoshiRt:
YI_NorSpr02B_GreenGiantEgg_RideYoshiRt:
YI_NorSpr02C_LungeFish_RideYoshiRt:
YI_NorSpr02D_SalvoTheSlime_RideYoshiRt:
YI_NorSpr02E_EyesOfSalvoTheSlime_RideYoshiRt:
YI_NorSpr02F_LittleMouserHole_RideYoshiRt:
YI_NorSpr030_LittleMouser_RideYoshiRt:
YI_NorSpr031_PottedSpikedFunGuy_RideYoshiRt:
YI_NorSpr032_PeekingLittleMouser_RideYoshiRt:
YI_NorSpr033_LittleMouserExitingNest_RideYoshiRt:
YI_NorSpr034_RogersPot_RideYoshiRt:
YI_NorSpr035_RogerThePottedGhost_RideYoshiRt:
YI_NorSpr036_FallingWall_RideYoshiRt:
YI_NorSpr038_PottedGhostFlame_RideYoshiRt:
YI_NorSpr039_HorizontalRotatingPlank_RideYoshiRt:
YI_NorSpr03A_3MiniRavens_RideYoshiRt:
YI_NorSpr03B_MiniRaven_RideYoshiRt:
YI_NorSpr03C_TapTapTheRedNose_RideYoshiRt:
YI_NorSpr03D_LargeSeesaw_RideYoshiRt:
YI_NorSpr03E_ThinPlatform_RideYoshiRt:
YI_NorSpr03F_SlimeBlock_RideYoshiRt:
YI_NorSpr040_BabyLuigi_RideYoshiRt:
YI_NorSpr041_Stork_RideYoshiRt:
YI_NorSpr042_VerticalPipeEntrance_RideYoshiRt:
YI_NorSpr043_RedGiantShyguy_RideYoshiRt:
YI_NorSpr044_GreenGiantShyguy_RideYoshiRt:
YI_NorSpr045_PrinceFroggy_RideYoshiRt:
YI_NorSpr046_BurtTheBashful_RideYoshiRt:
YI_NorSpr047_ShyguyPushingRoger_RideYoshiRt:
YI_NorSpr048_CutsceneKamek_RideYoshiRt:
YI_NorSpr049_ThunderLakituFireBlast1_RideYoshiRt:
YI_NorSpr04A_ThunderLakituFireBlast2_RideYoshiRt:
YI_NorSpr04B_ThunderLakituFireBlast3_RideYoshiRt:
YI_NorSpr04C_UpsidedownBlowHard_RideYoshiRt:
YI_NorSpr04D_UnusedSpriteIndex_RideYoshiRt:
YI_NorSpr04E_LockedDoor_RideYoshiRt:
YI_NorSpr04F_MiddleRing_RideYoshiRt:
YI_NorSpr050_GreyRotatingWoodenBoard_RideYoshiRt:
YI_NorSpr051_LargeWheel_RideYoshiRt:
YI_NorSpr052_BalloonPlatform_RideYoshiRt:
YI_NorSpr053_KamekSayingOhMy_RideYoshiRt:
YI_NorSpr054_UpsideDownPiranhaPlant_RideYoshiRt:
YI_NorSpr055_4GreenRotatingPlatforms_RideYoshiRt:
YI_NorSpr056_4PinkRotatingPlatforms_RideYoshiRt:
YI_NorSpr057_SewerGhostWithPlatform_RideYoshiRt:
YI_NorSpr058_GreenToady_RideYoshiRt:
YI_NorSpr059_StationarySuperStar_RideYoshiRt:
YI_NorSpr05A_RaphaelSparkAttack_RideYoshiRt:
YI_NorSpr05B_RedCoinBandit_RideYoshiRt:
YI_NorSpr05C_PinkToady_RideYoshiRt:
YI_NorSpr05D_GlitchedSprite_RideYoshiRt:
YI_NorSpr05E_BrownWoodenBoard_RideYoshiRt:
YI_NorSpr05F_AutoRotateBrownWoodenBoard_RideYoshiRt:
YI_NorSpr060_Bomb_RideYoshiRt:
YI_NorSpr062_Goomba_RideYoshiRt:
YI_NorSpr063_MuddyBuddy_RideYoshiRt:
YI_NorSpr064_4AutoRotatingPinkPlatforms_RideYoshiRt:
YI_NorSpr065_RedCoin_RideYoshiRt:
YI_NorSpr066_PiranhaPlant_RideYoshiRt:
YI_NorSpr067_RockRevealedHiddenWingedCloud_RideYoshiRt:
YI_NorSpr068_FlashingEggBlock_RideYoshiRt:
YI_NorSpr069_RedEggBlock_RideYoshiRt:
YI_NorSpr06A_YellowEggBlock_RideYoshiRt:
YI_NorSpr06B_GreenEggBlock_RideYoshiRt:
YI_NorSpr06C_LargeSpringBall_RideYoshiRt:
YI_NorSpr06D_ClockwiseHootieTheBlueFish_RideYoshiRt:
YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_RideYoshiRt:
YI_NorSpr06F_SpringBall_RideYoshiRt:
YI_NorSpr070_Clawdaddy_RideYoshiRt:
YI_NorSpr071_BigBoo_RideYoshiRt:
YI_NorSpr072_TrainBandit_RideYoshiRt:
YI_NorSpr073_BalloonPump_RideYoshiRt:
YI_NorSpr074_Spike_RideYoshiRt:
YI_NorSpr075_SpikeBall_RideYoshiRt:
YI_NorSpr076_ClockwisePiroDangle_RideYoshiRt:
YI_NorSpr077_CounterclockwisePiroDangle_RideYoshiRt:
YI_NorSpr078_RedBulletBillShooter_RideYoshiRt:
YI_NorSpr079_YellowBulletBillShooter_RideYoshiRt:
YI_NorSpr07A_GreenBulletBillShooter_RideYoshiRt:
YI_NorSpr07B_RedBulletBill_RideYoshiRt:
YI_NorSpr07C_YellowBulletBill_RideYoshiRt:
YI_NorSpr07D_GreenBulletBill_RideYoshiRt:
YI_NorSpr07E_DentOfSquishyPlatform_RideYoshiRt:
YI_NorSpr07F_LogSeesawPlatform_RideYoshiRt:
YI_NorSpr080_StraightLavaBubble_RideYoshiRt:
YI_NorSpr081_FollowingLavaBubble_RideYoshiRt:
YI_NorSpr082_ChainChomp_RideYoshiRt:
YI_NorSpr083_BowserFightCloud_RideYoshiRt:
YI_NorSpr084_TeleportSprite_RideYoshiRt:
YI_NorSpr085_HarryHedgehog_RideYoshiRt:
YI_NorSpr086_GlitchedSprite_RideYoshiRt:
YI_NorSpr087_MockUpLaidEgg_RideYoshiRt:
YI_NorSpr088_SuperStar_RideYoshiRt:
YI_NorSpr089_HorizontalMovingRedPlatform_RideYoshiRt:
YI_NorSpr08A_VerticalMovingPinkPlatform_RideYoshiRt:
YI_NorSpr08B_MockUp_RideYoshiRt:
YI_NorSpr08C_YoshiAtGoal_RideYoshiRt:
YI_NorSpr08D_Flyguy_RideYoshiRt:
YI_NorSpr08E_BowserRoomKamek_RideYoshiRt:
YI_NorSpr08F_MonkeySwing_RideYoshiRt:
YI_NorSpr090_DanglingGhost_RideYoshiRt:
YI_NorSpr091_4RedToadies_RideYoshiRt:
YI_NorSpr092_MelonBug_RideYoshiRt:
YI_NorSpr093_Door_RideYoshiRt:
YI_NorSpr094_ExpandingBlock_RideYoshiRt:
YI_NorSpr095_BlueCheckeredBlock_RideYoshiRt:
YI_NorSpr096_RedCheckeredBlock_RideYoshiRt:
YI_NorSpr097_POWBlock_RideYoshiRt:
YI_NorSpr098_EndTransformationBlock_RideYoshiRt:
YI_NorSpr099_SpinyEgg_RideYoshiRt:
YI_NorSpr09A_SwingingGreenPlatform_RideYoshiRt:
YI_NorSpr09B_MaceGuy_RideYoshiRt:
YI_NorSpr09C_Mace_RideYoshiRt:
YI_NorSpr09D_RedSwitch_RideYoshiRt:
YI_NorSpr09E_ChompRock_RideYoshiRt:
YI_NorSpr09F_PtooiePiranhaPlant_RideYoshiRt:
YI_NorSpr0A0_Tulip_RideYoshiRt:
YI_NorSpr0A1_SmallPot_RideYoshiRt:
YI_NorSpr0A2_ThunderLakituFireball_RideYoshiRt:
YI_NorSpr0A3_LeftHidingBandit_RideYoshiRt:
YI_NorSpr0A4_RightHidingBandit_RideYoshiRt:
YI_NorSpr0A5_NepEnut_RideYoshiRt:
YI_NorSpr0A6_IncomingChomp_RideYoshiRt:
YI_NorSpr0A7_GroupOfIncomingChomps_RideYoshiRt:
YI_NorSpr0A8_FallingIncomingChomp_RideYoshiRt:
YI_NorSpr0A9_IncomingChompShadow_RideYoshiRt:
YI_NorSpr0AA_BackgroundShyguy_RideYoshiRt:
YI_NorSpr0AB_FullEggSpawner_RideYoshiRt:
YI_NorSpr0AC_FallingRockArrowAndShadow_RideYoshiRt:
YI_NorSpr0AD_MessageBox_RideYoshiRt:
YI_NorSpr0AE_HookbillTheKoopa_RideYoshiRt:
YI_NorSpr0AF_CarMorphBubble_RideYoshiRt:
YI_NorSpr0B0_MoleMorphBubble_RideYoshiRt:
YI_NorSpr0B1_HelicopterMorphBubble_RideYoshiRt:
YI_NorSpr0B2_TrainMorphBubble_RideYoshiRt:
YI_NorSpr0B3_FuzzyFart_RideYoshiRt:
YI_NorSpr0B4_SubmarineMorphBubble_RideYoshiRt:
YI_NorSpr0B5_HiddenWingedCloud_RideYoshiRt:
YI_NorSpr0B6_WingedCloudWith8Coins_RideYoshiRt:
YI_NorSpr0B7_WingedCloudWithBubbled1up_RideYoshiRt:
YI_NorSpr0B8_WingedCloudWithFlower_RideYoshiRt:
YI_NorSpr0B9_WingedCloudWithPOW_RideYoshiRt:
YI_NorSpr0BA_WingedCloudWithStairs_RideYoshiRt:
YI_NorSpr0BB_WingedCloudWithPlatform_RideYoshiRt:
YI_NorSpr0BC_WingedCloudWithBandit_RideYoshiRt:
YI_NorSpr0BD_WingedCloudWithCoin_RideYoshiRt:
YI_NorSpr0BE_WingedCloudWith1up_RideYoshiRt:
YI_NorSpr0BF_WingedCloudWithKey_RideYoshiRt:
YI_NorSpr0C0_WingedCloudWith3Stars_RideYoshiRt:
YI_NorSpr0C1_WingedCloudWith5Stars_RideYoshiRt:
YI_NorSpr0C2_WingedCloudWithDoor_RideYoshiRt:
YI_NorSpr0C3_WingedCloudWithLowerGround_RideYoshiRt:
YI_NorSpr0C4_WingedCloudWithWatermelon_RideYoshiRt:
YI_NorSpr0C5_WingedCloudWithFireWatermelon_RideYoshiRt:
YI_NorSpr0C6_WingedCloudWithIcyWatermelon_RideYoshiRt:
YI_NorSpr0C7_WingedCloudWith3LeafSunflower_RideYoshiRt:
YI_NorSpr0C8_WingedCloudWith6LeafSunflower_RideYoshiRt:
YI_NorSpr0C9_WingedCloudWithCrashGameFeature_RideYoshiRt:
YI_NorSpr0CA_BigBossDoor_RideYoshiRt:
YI_NorSpr0CB_WingedCloudWithCoinOrStar_RideYoshiRt:
YI_NorSpr0CC_WingedCloudWithRedSwitch_RideYoshiRt:
YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_RideYoshiRt:
YI_NorSpr0CE_BowserFire_RideYoshiRt:
YI_NorSpr0CF_BowserRocks_RideYoshiRt:
YI_NorSpr0D0_HorizontalEntranceToRight_RideYoshiRt:
YI_NorSpr0D1_SecretPipeEntrance_RideYoshiRt:
YI_NorSpr0D2_MarchingMilde_RideYoshiRt:
YI_NorSpr0D3_LargeMilde_RideYoshiRt:
YI_NorSpr0D4_MediumMilde_RideYoshiRt:
YI_NorSpr0D5_BackgroundForHookbillFight_RideYoshiRt:
YI_NorSpr0D6_FortGhostWithPlatform_RideYoshiRt:
YI_NorSpr0D7_SluggyTheUnshaven_RideYoshiRt:
YI_NorSpr0D8_ChompWarningSign_RideYoshiRt:
YI_NorSpr0D9_FishinLakitu_RideYoshiRt:
YI_NorSpr0DA_FlowerPot_RideYoshiRt:
YI_NorSpr0DB_SoftBlock_RideYoshiRt:
YI_NorSpr0DC_Snowball_RideYoshiRt:
YI_NorSpr0DD_CloseWallInNavalPiranhaRoom_RideYoshiRt:
YI_NorSpr0DE_FallingRockPlatform_RideYoshiRt:
YI_NorSpr0DF_PiscatoryPete_RideYoshiRt:
YI_NorSpr0E0_PreyingMantas_RideYoshiRt:
YI_NorSpr0E1_LochNestor_RideYoshiRt:
YI_NorSpr0E2_BooBlah_RideYoshiRt:
YI_NorSpr0E3_BooBlahWithPiroDangle_RideYoshiRt:
YI_NorSpr0E4_HeadingCactus_RideYoshiRt:
YI_NorSpr0E5_GreenNeedlenose_RideYoshiRt:
YI_NorSpr0E6_Gusty_RideYoshiRt:
YI_NorSpr0E7_Burt_RideYoshiRt:
YI_NorSpr0E8_Goonie_RideYoshiRt:
YI_NorSpr0E9_3WinglessGoonies_RideYoshiRt:
YI_NorSpr0EA_VerticalCloudDrop_RideYoshiRt:
YI_NorSpr0EB_HorizontalCloudDrop_RideYoshiRt:
YI_NorSpr0EC_JumpingFlamerGuy_RideYoshiRt:
YI_NorSpr0ED_RunningFlamerGuy_RideYoshiRt:
YI_NorSpr0EE_EggoDil_RideYoshiRt:
YI_NorSpr0EF_EggoDilFace_RideYoshiRt:
YI_NorSpr0F0_EggoDilPetal_RideYoshiRt:
YI_NorSpr0F1_EggPlantShootingBubbles_RideYoshiRt:
YI_NorSpr0F2_ShyguyOnStilts_RideYoshiRt:
YI_NorSpr0F3_WoozyGuy_RideYoshiRt:
YI_NorSpr0F4_EggPlant_RideYoshiRt:
YI_NorSpr0F5_Slugger_RideYoshiRt:
YI_NorSpr0F6_MotherHuffinPuffin_RideYoshiRt:
YI_NorSpr0F7_BarneyBubble_RideYoshiRt:
YI_NorSpr0F8_BlowHard_RideYoshiRt:
YI_NorSpr0F9_YellowNeedlenose_RideYoshiRt:
YI_NorSpr0FA_Flower_RideYoshiRt:
YI_NorSpr0FB_LongSpearGuy_RideYoshiRt:
YI_NorSpr0FC_ShortSpearGuy_RideYoshiRt:
YI_NorSpr0FD_ZeusGuy_RideYoshiRt:
YI_NorSpr0FE_ZeusGuyBlast_RideYoshiRt:
YI_NorSpr0FF_Poochy_RideYoshiRt:
YI_NorSpr100_Bubbled1up_RideYoshiRt:
YI_NorSpr101_RotatingMace_RideYoshiRt:
YI_NorSpr102_DoubleRotatingMace_RideYoshiRt:
YI_NorSpr103_BooGuysMovingMace_RideYoshiRt:
YI_NorSpr104_JeanDeFillet_RideYoshiRt:
YI_NorSpr105_BooGuysCarryingBombToLeft_RideYoshiRt:
YI_NorSpr106_BooGuysCarryingBombToRight_RideYoshiRt:
YI_NorSpr107_WatermelonSeed_RideYoshiRt:
YI_NorSpr108_Milde_RideYoshiRt:
YI_NorSpr109_BronzeTapTap_RideYoshiRt:
YI_NorSpr10A_SilverTapTap_RideYoshiRt:
YI_NorSpr10B_HoppingSilverTapTap_RideYoshiRt:
YI_NorSpr10C_ChainedSpikeBall_RideYoshiRt:
YI_NorSpr10D_BooGuyOperatingPulley_RideYoshiRt:
YI_NorSpr10E_CrateWith6Stars_RideYoshiRt:
YI_NorSpr10F_BooManBluff_RideYoshiRt:
YI_NorSpr110_Flower_RideYoshiRt:
YI_NorSpr111_GeorgetteJelly_RideYoshiRt:
YI_NorSpr112_GeorgetteJellyGoo_RideYoshiRt:
YI_NorSpr113_Snifit_RideYoshiRt:
YI_NorSpr114_SnifitBullet_RideYoshiRt:
YI_NorSpr115_Coin_RideYoshiRt:
YI_NorSpr116_BuoyantRoundPlatform_RideYoshiRt:
YI_NorSpr117_DonutLift_RideYoshiRt:
YI_NorSpr118_LargeDonutLift_RideYoshiRt:
YI_NorSpr119_Spooky_RideYoshiRt:
YI_NorSpr11A_GreenGlove_RideYoshiRt:
YI_NorSpr11B_Lakitu_RideYoshiRt:
YI_NorSpr11C_LakituCloud_RideYoshiRt:
YI_NorSpr11D_SpinyEgg_RideYoshiRt:
YI_NorSpr11E_BrownArrowWheel_RideYoshiRt:
YI_NorSpr11F_BlueArrowWheel_RideYoshiRt:
YI_NorSpr120_DoubledSidedArrowLift_RideYoshiRt:
YI_NorSpr121_NumberPlatformExplosion_RideYoshiRt:
YI_NorSpr122_BucketWithBandit_RideYoshiRt:
YI_NorSpr123_BucketWithCoins_RideYoshiRt:
YI_NorSpr124_Stretch_RideYoshiRt:
YI_NorSpr125_AttackingAndEndingKamek_RideYoshiRt:
YI_NorSpr126_SpikedLogOnPulley_RideYoshiRt:
YI_NorSpr127_PulleyOfSpikedLog_RideYoshiRt:
YI_NorSpr128_GroundRippleInBabyBowerRoom_RideYoshiRt:
YI_NorSpr129_Fuzzy_RideYoshiRt:
YI_NorSpr12B_FatGuy_RideYoshiRt:
YI_NorSpr12C_FlyOrWhirlyGuy_RideYoshiRt:
YI_NorSpr12D_PrologueCutsceneYoshi_RideYoshiRt:
YI_NorSpr12E_LargePopEffect_RideYoshiRt:
YI_NorSpr12F_HorizontalLavaDrop_RideYoshiRt:
YI_NorSpr130_VerticalLavaDrop_RideYoshiRt:
YI_NorSpr131_LockedDoor_RideYoshiRt:
YI_NorSpr132_LemonDrop_RideYoshiRt:
YI_NorSpr133_LanternGhost_RideYoshiRt:
YI_NorSpr135_CirclingRaven_RideYoshiRt:
YI_NorSpr136_CirclingRaven_RideYoshiRt:
YI_NorSpr137_3x6FallingStone_RideYoshiRt:
YI_NorSpr138_3x3FallingStone_RideYoshiRt:
YI_NorSpr139_3x9FallingStone_RideYoshiRt:
YI_NorSpr13A_6x3FallingStone_RideYoshiRt:
YI_NorSpr13B_StomachAcid_RideYoshiRt:
YI_NorSpr13C_DownFlippers_RideYoshiRt:
YI_NorSpr13D_DanglingFang_RideYoshiRt:
YI_NorSpr13E_FlyingFang_RideYoshiRt:
YI_NorSpr13F_SwimmingFlopsyFish_RideYoshiRt:
YI_NorSpr140_SwimmingAndJumpingFlopsyFish_RideYoshiRt:
YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_RideYoshiRt:
YI_NorSpr142_3JumpFlopsyFish_RideYoshiRt:
YI_NorSpr143_SprayFish_RideYoshiRt:
YI_NorSpr144_RightOrLeftFlippers_RideYoshiRt:
YI_NorSpr145_BlueSluggy_RideYoshiRt:
YI_NorSpr146_PinkSluggy_RideYoshiRt:
YI_NorSpr147_HorizontalEntranceToLeft_RideYoshiRt:
YI_NorSpr148_LargeSpringBall_RideYoshiRt:
YI_NorSpr149_UpArrowCloud_RideYoshiRt:
YI_NorSpr14A_UpRightArrowCloud_RideYoshiRt:
YI_NorSpr14B_RightArrowCloud_RideYoshiRt:
YI_NorSpr14C_DownRightArrowCloud_RideYoshiRt:
YI_NorSpr14D_DownArrowCloud_RideYoshiRt:
YI_NorSpr14E_DownLeftArrowCloud_RideYoshiRt:
YI_NorSpr14F_LeftArrowCloud_RideYoshiRt:
YI_NorSpr150_UpLeftArrowCloud_RideYoshiRt:
YI_NorSpr151_RotatingArrowCloud_RideYoshiRt:
YI_NorSpr152_Flutter_RideYoshiRt:
YI_NorSpr153_GoonieWithShyGuy_RideYoshiRt:
YI_NorSpr154_SharkChomp_RideYoshiRt:
YI_NorSpr155_FatGoonie_RideYoshiRt:
YI_NorSpr156_CactusJack_RideYoshiRt:
YI_NorSpr157_WallLakitu_RideYoshiRt:
YI_NorSpr158_BowlingGoonie_RideYoshiRt:
YI_NorSpr159_WalkingGrunt_RideYoshiRt:
YI_NorSpr15A_RunningGrunt_RideYoshiRt:
YI_NorSpr15B_DancingSpearGuy_RideYoshiRt:
YI_NorSpr15C_GreenRotatingPlatformSwitch_RideYoshiRt:
YI_NorSpr15D_RedRotatingPlatformSwitch_RideYoshiRt:
YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_RideYoshiRt:
YI_NorSpr15F_GreenSpikedPlatform_RideYoshiRt:
YI_NorSpr160_RedSpikedPlatform_RideYoshiRt:
YI_NorSpr161_RewardItemForDefeatingRoomEnemies_RideYoshiRt:
YI_NorSpr162_DoubleSpikePlatformWithSwitch_RideYoshiRt:
YI_NorSpr163_BouncingNeedlenose_RideYoshiRt:
YI_NorSpr164_NipperPlant_RideYoshiRt:
YI_NorSpr165_NipperSpore_RideYoshiRt:
YI_NorSpr166_ThunderLakitu_RideYoshiRt:
YI_NorSpr167_GreenKoopaShell_RideYoshiRt:
YI_NorSpr168_RedKoopaShell_RideYoshiRt:
YI_NorSpr169_GreenNakedKoopa_RideYoshiRt:
YI_NorSpr16A_RedNakedKoopa_RideYoshiRt:
YI_NorSpr16B_GreenKoopa_RideYoshiRt:
YI_NorSpr16C_RedKoopa_RideYoshiRt:
YI_NorSpr16D_GreenParakoopa_RideYoshiRt:
YI_NorSpr16E_RedHorizontalParakoopa_RideYoshiRt:
YI_NorSpr16F_RedVerticalParakoopa_RideYoshiRt:
YI_NorSpr170_AquaLakitu_RideYoshiRt:
YI_NorSpr171_NavalPiranha_RideYoshiRt:
YI_NorSpr172_NavalPiranhaBuds_RideYoshiRt:
YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_RideYoshiRt:
YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_RideYoshiRt:
YI_NorSpr175_BaronVonZeppelinCarryingBomb_RideYoshiRt:
YI_NorSpr176_BaronVonZeppelinCarryingBandit_RideYoshiRt:
YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_RideYoshiRt:
YI_NorSpr178_BaronVonZeppelinCarrying1up_RideYoshiRt:
YI_NorSpr179_BaronVonZeppelinCarryingKey_RideYoshiRt:
YI_NorSpr17A_BaronVonZeppelinCarryingCoins_RideYoshiRt:
YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_RideYoshiRt:
YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_RideYoshiRt:
YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_RideYoshiRt:
YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_RideYoshiRt:
YI_NorSpr17F_BaronVonZeppelin_RideYoshiRt:
YI_NorSpr180_SpinningLog_RideYoshiRt:
YI_NorSpr181_CrazeeDayzee_RideYoshiRt:
YI_NorSpr182_Dragonfly_RideYoshiRt:
YI_NorSpr183_Butterfly_RideYoshiRt:
YI_NorSpr184_Bumpty_RideYoshiRt:
YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_RideYoshiRt:
YI_NorSpr186_MovingLineGuidedGreenPlatformRight_RideYoshiRt:
YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_RideYoshiRt:
YI_NorSpr188_MovingLineGuidedYellowPlatformRight_RideYoshiRt:
YI_NorSpr189_LineGuidedGreenPlatformLeft_RideYoshiRt:
YI_NorSpr18A_LineGuidedGreenPlatformRight_RideYoshiRt:
YI_NorSpr18B_LineGuidedYellowPlatformLeft_RideYoshiRt:
YI_NorSpr18C_LineGuidedYellowPlatformRight_RideYoshiRt:
YI_NorSpr18D_LineGuidedRedPlatformLeft_RideYoshiRt:
YI_NorSpr18E_LineGuidedGreenPlatformRight_RideYoshiRt:
YI_NorSpr18F_SpiralPlatform_RideYoshiRt:
YI_NorSpr190_FallingIcicle_RideYoshiRt:
YI_NorSpr191_Bird_RideYoshiRt:
YI_NorSpr192_PetalGuy_RideYoshiRt:
YI_NorSpr193_SnakeCagedGhost_RideYoshiRt:
YI_NorSpr194_Blargg_RideYoshiRt:
YI_NorSpr195_SmallUnstableSnowPlatform_RideYoshiRt:
YI_NorSpr196_UnstableSnowPlatform_RideYoshiRt:
YI_NorSpr197_ArrowSign_RideYoshiRt:
YI_NorSpr198_DiagonalArrowSign_RideYoshiRt:
YI_NorSpr199_DizzyDandy_RideYoshiRt:
YI_NorSpr19A_BooGuy_RideYoshiRt:
YI_NorSpr19B_TacklingBumpty_RideYoshiRt:
YI_NorSpr19C_FlyingBumpty_RideYoshiRt:
YI_NorSpr19D_SkeletonGoonie_RideYoshiRt:
YI_NorSpr19E_WinglessSkeletonGoonie_RideYoshiRt:
YI_NorSpr19F_SkeletonGoonieCarryingBomb_RideYoshiRt:
YI_NorSpr1A0_DoubleFirebar_RideYoshiRt:
YI_NorSpr1A1_Firebar_RideYoshiRt:
YI_NorSpr1A2_HealthStar_RideYoshiRt:
YI_NorSpr1A3_LittleSkullMouser_RideYoshiRt:
YI_NorSpr1A4_KeyholeCork_RideYoshiRt:
YI_NorSpr1A5_RunAwayMonkey_RideYoshiRt:
YI_NorSpr1A6_MonkeyWithWatermelon_RideYoshiRt:
YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_RideYoshiRt:
YI_NorSpr1A8_TheifMonkey_RideYoshiRt:
YI_NorSpr1A9_HangingMonkeySpittingSeeds_RideYoshiRt:
YI_NorSpr1AA_HotLips_RideYoshiRt:
YI_NorSpr1AB_BooBalloon_RideYoshiRt:
YI_NorSpr1AC_SmallFrog_RideYoshiRt:
YI_NorSpr1AD_MagicShootingKamek_RideYoshiRt:
YI_NorSpr1AE_MagicShot_RideYoshiRt:
YI_NorSpr1AF_FloatingCoin_RideYoshiRt:
YI_NorSpr1B0_DeflatingBalloon_RideYoshiRt:
YI_NorSpr1B1_CoinCannon_RideYoshiRt:
YI_NorSpr1B2_MinigameCoin_RideYoshiRt:
YI_NorSpr1B3_GatherCoinsBandit_RideYoshiRt:
YI_NorSpr1B4_MinigameCheckeredPlatform_RideYoshiRt:
YI_NorSpr1B5_PoppingBalloonsBandit_RideYoshiRt:
YI_NorSpr1B6_MinigameBalloon_RideYoshiRt:
YI_NorSpr1B7_SeedSpittingMinigameBandit_RideYoshiRt:
YI_NorSpr1B8_WatermelonPot_RideYoshiRt:
YI_NorSpr1B9_P2SeedSpittingMinigameBandit_RideYoshiRt:
;$039A6B
	RTL

;---------------------------------------------------------------------------

CODE_039A6C:
	PHK
	PLB
CODE_039A6E:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	ADC.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	REP.b #$10
	TAY
	LDA.w DATA_038000,y
	STA.b $00
	LDA.w DATA_038000+$02,y
	STA.b $02
	SEP.b #$10
	TAY
	PHY
	PLB
	JMP.w [$7960]

;---------------------------------------------------------------------------

CODE_039A90:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	ADC.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	REP.b #$10
	PHX
	TAX
	LDA.l DATA_03852E,x
	STA.b $00
	LDA.l DATA_03852E+$02,x
	STA.b $02
	PLX
	SEP.b #$10
	TAY
	PHY
	PLB
	JMP.w [$7960]

;---------------------------------------------------------------------------

DATA_039AB0:
	dw $FF00,$0100

DATA_039AB4:
	dw $FFFE,$0002

DATA_039AB8:
	dw $000C,$FFF4,$0000,$0000

DATA_039AC0:
	dw $FFFC,$FFFC,$FFFA,$FFFA

CODE_039AC8:
	JSL.l CODE_039A90
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	PHK
	PLB
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_039AE3
	RTL

CODE_039AE3:
	LDY.b #$00
	LDA.w $6164
	BEQ.b CODE_039AFD
	BPL.b CODE_039AEE
	LDY.b #$02
CODE_039AEE:
	CLC
	ADC.w DATA_039AB4,y
	STA.w $6164
	EOR.w DATA_039AB4,y
	BMI.b CODE_039AFD
	STZ.w $6164
CODE_039AFD:
	LDY.b #$00
	LDA.w $6166
	BEQ.b CODE_039B17
	BPL.b CODE_039B08
	LDY.b #$02
CODE_039B08:
	CLC
	ADC.w DATA_039AB4,y
	STA.w $6166
	EOR.w DATA_039AB4,y
	BMI.b CODE_039B17
	STZ.w $6166
CODE_039B17:
	LDA.w $615A
	CLC
	ADC.w $6164
	SEC
	SBC.w #$0008
	STA.w $70E2,x
	LDA.w $615C
	CLC
	ADC.w $6166
	SEC
	SBC.w #$0008
	STA.w $7182,x
	LDA.w $6152
	ORA.w $6154
	BEQ.b CODE_039B3C
CODE_039B3B:
	RTL

CODE_039B3C:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	LDA.w $6168
	BNE.b CODE_039B4B
	JMP.w CODE_039DA7

CODE_039B4B:
	REP.b #$20
	LDA.w $6162
	BNE.b CODE_039B55
	JMP.w CODE_039BBC

CODE_039B55:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_039B66
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_039B66
	JML.l CODE_03BF87

CODE_039B66:
	LDY.b #$01
	CMP.w #!Define_YI_NorSpr009_FireWatermelon
	BEQ.b CODE_039B98
	CMP.w #!Define_YI_NorSpr0EC_JumpingFlamerGuy
	BEQ.b CODE_039B81
	CMP.w #!Define_YI_NorSpr0ED_RunningFlamerGuy
	BEQ.b CODE_039B81
	CMP.w #!Define_YI_NorSpr080_StraightLavaBubble
	BEQ.b CODE_039B81
	CMP.w #!Define_YI_NorSpr081_FollowingLavaBubble
	BNE.b CODE_039B86
CODE_039B81:
	STZ.w $7402,x
	BRA.b CODE_039B98

CODE_039B86:
	INY
	CMP.w #!Define_YI_NorSpr019_Bubble
	BEQ.b CODE_039B98
	INY
	CMP.w #!Define_YI_NorSpr007_Watermelon
	BEQ.b CODE_039B98
	INY
	CMP.w #!Define_YI_NorSpr005_IcyWatermelon
	BNE.b CODE_039B3B
CODE_039B98:
	STY.w !EXRAM_YI_Level_Player_AmmoTypeInMouthLo|!EXRAMBankMirror
	LDA.w #$001E
	LDY.w $7402,x
	BEQ.b CODE_039BA6
	LDA.w #$000A
CODE_039BA6:
	STA.w $6170
	STZ.w $616C
	LDA.w #$0010
	STA.w $616E
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	JML.l CODE_03A32E

CODE_039BBC:
	LDA.w $61E0
	CMP.w #$0003
	BCC.b CODE_039BC7
	JMP.w CODE_039DA6

CODE_039BC7:
	LDA.w $6150
	DEC
	ASL
	ORA.w $60C4
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_039AB8,y
	STA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w DATA_039AC0,y
	STA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PHY
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	PLY
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0006
	BEQ.b CODE_039C11
	LDA.w $6168
	STA.w $6162
	STZ.w $6150
	RTL

CODE_039C11:
	STZ.w $6150
	STZ.w $6168
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr01E_Shyguy
	BEQ.b CODE_039C2E
	CMP.w #!Define_YI_NorSpr133_LanternGhost
	BEQ.b CODE_039C2E
	CMP.w #!Define_YI_NorSpr12A_ShyGuyBanditTrap
	BEQ.b CODE_039C2E
	CMP.w #!Define_YI_NorSpr074_Spike
	BNE.b CODE_039C58
CODE_039C2E:
	CPY.b #$04
	BCS.b CODE_039C45
	LDA.w $60C4
	EOR.w #$0002
	STA.w $7400,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSL.l CODE_048B73
	JMP.w CODE_039D2E

CODE_039C45:
	LDA.w #$0E81
	STA.w $6FA2,x
	LDA.w $7042,x
	ORA.w #$0020
	STA.w $7042,x
	STZ.b $76,x
	BRA.b CODE_039CCD

CODE_039C58:
	CMP.w #!Define_YI_NorSpr017_FrogPirate
	BNE.b CODE_039C64
	JSL.l CODE_0EE0DE
	JMP.w CODE_039D2E

CODE_039C64:
	CMP.w #!Define_YI_NorSpr092_MelonBug
	BNE.b CODE_039C7D
	STZ.w $7D38,x
	LDA.w #$0010
	STA.w $7AF6,x
	LDA.w #$0002
	STA.w $7402,x
	STA.b $76,x
	JMP.w CODE_039D2E

CODE_039C7D:
	CPY.b #$04
	BCS.b CODE_039CCD
	CMP.w #!Define_YI_NorSpr19A_BooGuy
	BNE.b CODE_039CB0
	PHY
	JSL.l CODE_039D28
	PLY
	STY.b $00
	JSL.l CODE_03AF0D
	JSL.l CODE_03AD24
	LDY.b #$00
	STY.b $78,x
	LDY.b $00
	PHB
	LDA.w #DATA_0C8D4E>>16
	XBA
	PHA
	PLB
	PLB
	PHY
	JSL.l CODE_0C8E07
	PLY
	JSL.l CODE_0C8D6A
	PLB
	RTL

CODE_039CB0:
	CMP.w #!Define_YI_NorSpr0F3_WoozyGuy
	BNE.b CODE_039CCD
	PHY
	JSL.l CODE_039D28
	PLY
	PHB
	LDY.b #DATA_0CFEC1>>16
	PHY
	PLB
	JSL.l CODE_0CFEDD
	PLB
	SEP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	REP.b #$20
	RTL

CODE_039CCD:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	TAX
	LDA.l FXDATA_0AAB14,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0000
	BEQ.b CODE_039D09
	PHP
	JSL.l CODE_03AF0D
	PLP
	BMI.b CODE_039CFA
	JSL.l CODE_03AD24
	BCC.b CODE_039D09
	LDA.w #$0100
	ORA.w $7402,x
	STA.w $7402,x
	BRA.b CODE_039D09

CODE_039CFA:
	JSL.l CODE_03AD74
	BCC.b CODE_039D09
	LDA.w #$0200
	ORA.w $7402,x
	STA.w $7402,x
CODE_039D09:
	STZ.b $18,x
	STZ.b $16,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.w $7540,x
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0040
	STA.w $6FA2,x
CODE_039D28:
	LDA.w #$0020
	STA.w $7D38,x
CODE_039D2E:
	LDX.b $12
	LDA.w $60E4
	EOR.w $60A8
	ASL
	LDA.w $60E4
	BCS.b CODE_039D3F
	ADC.w $60A8
CODE_039D3F:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $60E6
	SEC
	SBC.w #$0300
	BPL.b CODE_039D4E
	LDA.w #$0000
CODE_039D4E:
	SEC
	SBC.w #$0200
	ADC.w $60E6
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $60C4
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
CODE_039D68:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$00FF
	ORA.w $7862,x
	STA.w $7862,x
	TXY
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	ASL
	TAX
	LDA.l FXDATA_0A9F1A,x
	AND.w #$00FF
	STA.w $74A2,y
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr108_Milde
	BNE.b CODE_039D96
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	BNE.b CODE_039D9A
CODE_039D96:
	LDA.l FXDATA_0A9B1C,x
CODE_039D9A:
	AND.w #$000C
	ORA.w $7040,y
	STA.w $7040,y
	SEP.b #$10
	TYX
CODE_039DA6:
	RTL

CODE_039DA7:
	REP.b #$20
	LDA.w $0B57
	ORA.w $0B59
	BEQ.b CODE_039DB5
	JML.l CODE_03A32E

CODE_039DB5:
	PHB
	PHK
	PLB
	LDA.w $6150
	BEQ.b CODE_039DC5
	CMP.w #$0043
	BCS.b CODE_039DC5
	JMP.w CODE_039ECE

CODE_039DC5:
	LDA.w $6FA2,x
	BPL.b CODE_039DCD
	JMP.w CODE_039E4E

CODE_039DCD:
	JSL.l CODE_04D1B6
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_03B212
	JSL.l CODE_03AF0D
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr08B_MockUp
	BNE.b CODE_039E01
	JSL.l CODE_03A32E
	LDA.w #!Define_YI_NorSpr087_MockUpLaidEgg
	TXY
	JSL.l CODE_03A366
	LDY.w $60C4
	LDA.w DATA_039AB0,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_039E36

CODE_039E01:
	CMP.w #!Define_YI_NorSpr129_Fuzzy
	BNE.b CODE_039E09
	JMP.w CODE_039ED4

CODE_039E09:
	CMP.w #!Define_YI_NorSpr12B_FatGuy
	BEQ.b CODE_039E1C
	JSL.l CODE_05AD01
	LDA.w #!Define_YI_NorSpr025_GreenEgg
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$0D
	BNE.b CODE_039E1F
CODE_039E1C:
	LDA.w #!Define_YI_NorSpr02B_GreenGiantEgg
CODE_039E1F:
	STZ.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	TXY
	JSL.l CODE_03A366
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	JSL.l CODE_03BEB9
	LDA.w #$FFA2
	STA.b $76,x
CODE_039E36:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w $60C4
	STA.w $7400,x
	PLB
	RTL

CODE_039E4E:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr1A2_HealthStar
	BNE.b CODE_039E85
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	LDA.w #$0003
	STA.w $0004
	JSL.l CODE_03A4C3
	LDA.w $0396
	CLC
	ADC.w #$000A
	STA.w $0396
	LDA.w #$0082
	STA.w $0B7F
	BRA.b CODE_039EC6

CODE_039E85:
	CMP.w #!Define_YI_NorSpr115_Coin
	BNE.b CODE_039EB7
	LDA.w $7042,x
	BIT.w #$0002
	BEQ.b CODE_039EA6
	LDA.w #!Define_YI_SoundID93_RedCoin
	INC.w !RAM_YI_Level_RedCoinsCollectedLo
	LDY.w !RAM_YI_Level_RedCoinsCollectedLo
	CPY.b #$14
	BMI.b CODE_039EA0
	INC
CODE_039EA0:
	JSL.l CODE_0085D2
	BRA.b CODE_039EAD

CODE_039EA6:
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
CODE_039EAD:
	JSL.l CODE_03A520
	JSL.l CODE_0CF957
	BRA.b CODE_039ECA

CODE_039EB7:
	CMP.w #!Define_YI_NorSpr1B2_MinigameCoin
	BNE.b CODE_039EC6
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	INC.w $03BA
CODE_039EC6:
	JSL.l CODE_03B288
CODE_039ECA:
	JSL.l CODE_03A32E
CODE_039ECE:
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_039ED0:
	dw $FFF8,$0018

CODE_039ED4:
	LDA.w #!Define_YI_SoundID21_Fuzzy
	JSL.l CODE_0085D2
	LDA.w #$0400
	STA.w $7FE8
	LDA.w #$0003
	STA.w $61CA
	LDA.w #$0010
	STA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	JSL.l CODE_03A31E
	LDA.w #!Define_YI_NorSpr0B3_FuzzyFart
	TXY
	JSL.l CODE_03A366
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0001
	STA.w $7D38,x
	LDY.w $60C4
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_039ED0,y
	STA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	PLB
CODE_039F2B:
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0006
	STA.w $73C2,y
	STA.w $7E4C,y
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0B3_FuzzyFart_Main:
;$039F4E
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_039F5A
	RTL

CODE_039F5A:
	LDA.w $7A96,x
	BNE.b CODE_039F62
	JMP.w CODE_03A31E

CODE_039F62:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_039F8C
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_039F8C
	LDA.w $7D96,y
	BEQ.b CODE_039F7D
	TYX
	JSL.l CODE_03B595
	LDX.b $12
	RTL

CODE_039F7D:
	LDA.w $6FA0,y
	AND.w #$0020
	BNE.b CODE_039F8C
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
CODE_039F8C:
	RTL

;---------------------------------------------------------------------------

CODE_039F8D:
	JSL.l CODE_039A90
CODE_039F91:
	JSL.l CODE_03A31E
	TXY
	JML.l CODE_03B4D6

;---------------------------------------------------------------------------

CODE_039F9A:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr022_FlashingEgg_StompRt:
CODE_039F9B:
	JSL.l CODE_03B75E
YI_NorSpr005_IcyWatermelon_StompRt:
YI_NorSpr007_Watermelon_StompRt:
YI_NorSpr009_FireWatermelon_StompRt:
YI_NorSpr023_RedEgg_StompRt:
YI_NorSpr024_YellowEgg_StompRt:
YI_NorSpr025_GreenEgg_StompRt:
YI_NorSpr027_Key_StompRt:
YI_NorSpr028_HuffinPuffin_StompRt:
YI_NorSpr029_GiantEgg_StompRt:
YI_NorSpr02A_RedGiantEgg_StompRt:
YI_NorSpr02B_GreenGiantEgg_StompRt:
YI_NorSpr030_LittleMouser_StompRt:
YI_NorSpr033_LittleMouserExitingNest_StompRt:
YI_NorSpr043_RedGiantShyguy_StompRt:
YI_NorSpr044_GreenGiantShyguy_StompRt:
YI_NorSpr058_GreenToady_StompRt:
YI_NorSpr05C_PinkToady_StompRt:
YI_NorSpr0F3_WoozyGuy_StompRt:
YI_NorSpr107_WatermelonSeed_StompRt:
YI_NorSpr124_Stretch_StompRt:
YI_NorSpr184_Bumpty_StompRt:
YI_NorSpr19B_TacklingBumpty_StompRt:
YI_NorSpr19C_FlyingBumpty_StompRt:
YI_NorSpr1A5_RunAwayMonkey_StompRt:
YI_NorSpr1A6_MonkeyWithWatermelon_StompRt:
YI_NorSpr1A7_HangingMonkeyThrowingBombsOrNeedlenoses_StompRt:
YI_NorSpr1A8_TheifMonkey_StompRt:
YI_NorSpr1A9_HangingMonkeySpittingSeeds_StompRt:
YI_NorSpr1B7_SeedSpittingMinigameBandit_StompRt:
CODE_039F9F:
	JSL.l CODE_039A90
	LDA.w $7040,x
	AND.w #$FFF3
	ORA.w #$0004
	STA.w $7040,x
	LDA.w $7042,x
	ORA.w #$0080
	AND.w #$00CF
	ORA.w #$0020
	LDY.w $7862,x
	DEY
	BPL.b CODE_039FC4
	ORA.w #$0030
CODE_039FC4:
	STA.w $7042,x
	STZ.w $74A2,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w $6FA0,x
	AND.w #$F9FF
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	RTL

;---------------------------------------------------------------------------

DATA_039FE9:
	dw $FF80,$0080

YI_NorSpr091_4RedToadies_StompRt:
;$039FED
	LDA.w $7682,x
	CMP.w #$00F0
	BMI.b CODE_039FF9
	JML.l CODE_03A31E

CODE_039FF9:
	LDY.b #$00
	LDA.w $70E2,x
	CMP.b $18,x
	BPL.b CODE_03A004
	LDY.b #$02
CODE_03A004:
	LDA.w DATA_039FE9,y
	STA.w $75E0,x
	RTL

;---------------------------------------------------------------------------

CODE_03A00B:
	JSL.l CODE_039A90
	LDA.w #$0060
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w $7040,x
	AND.w #$FFF3
	ORA.w #$0004
	STA.w $7040,x
	LDA.w $7042,x
	AND.w #$00CF
	ORA.w #$0020
	LDY.w $7862,x
	DEY
	BPL.b CODE_03A03C
	ORA.w #$0030
CODE_03A03C:
	STA.w $7042,x
	STZ.w $74A2,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w $7A96,x
	BNE.b CODE_03A084
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7E4C,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_03A084:
	RTL

;---------------------------------------------------------------------------

CODE_03A085:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	ADC.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	REP.b #$10
	TAY
	LDA.w DATA_038A5C,y
	STA.b $00
	LDA.w DATA_038A5C+$02,y
	STA.b $02
	SEP.b #$10
	TAY
	PHY
	PLB
	JMP.w [$7960]

;---------------------------------------------------------------------------

CODE_03A0A1:
	LDA.w $0CCE
	BNE.b CODE_03A0E4
	LDA.w #$0010
	STA.w $0CCE
	LDA.w #!Define_YI_SoundID0C_ShellHit2
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1BE
	JSL.l CODE_008B21
	LDA.w $7C76,x
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $7C78,x
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7CD8,x
	SEC
	SBC.w #$0008
CODE_03A0DB:
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7782,y
CODE_03A0E4:
	RTL

;---------------------------------------------------------------------------

CODE_03A0E5:
	LDY.b #!Define_YI_SoundID0C_ShellHit2
CODE_03A0E7:
	LDA.w $0CCE
	BNE.b CODE_03A0E4
	TYA
	JSL.l CODE_0085D2
	LDA.w #$0010
	STA.w $0CCE
	LDA.w #!Define_YI_AmbSpr1BE
	JSL.l CODE_008B21
	LDA.w $7C16,x
	CMP.w #$8000
	ROR
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70A2,y
	LDA.w $7C18,x
	CMP.w #$8000
	ROR
	CLC
	ADC.w $6122
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BRA.b CODE_03A0DB

;---------------------------------------------------------------------------

CODE_03A11D:
	JSL.l CODE_039A90
	PHK
	PLB
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7AF8,x
	BEQ.b CODE_03A147
	LDA.w #$0010
	SEC
	SBC.w $7AF8,x
	LSR
	INC
	CMP.w #$0004
	BCC.b CODE_03A13F
	LDA.w #$0003
CODE_03A13F:
	CMP.w $60C2
	BCC.b CODE_03A147
	STA.w $60C2
CODE_03A147:
	REP.b #$10
	LDY.w $60BE
	LDA.w DATA_03F8E1,y
	AND.w #$FF00
	BPL.b CODE_03A157
	ORA.w #$00FF
CODE_03A157:
	XBA
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7182,x
	LDA.w DATA_03F6DE,y
	LDY.w $611A
	DEY
	BMI.b CODE_03A173
	LDY.w #$0004
	AND.w #$0040
	BEQ.b CODE_03A173
	LDY.w #$0002
CODE_03A173:
	SEP.b #$20
	TYA
	STA.w $74A2,x
	REP.b #$20
	LDY.w $60BE
	LDA.w DATA_03F6DE-$01,y
	AND.w #$BF00
	BPL.b CODE_03A189
	ORA.w #$40FF
CODE_03A189:
	XBA
	LDY.w $60C4
	BNE.b CODE_03A193
	EOR.w #$FFFF
	INC
CODE_03A193:
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
	LDA.w $60C4
	STA.w $7400,x
	SEP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	ADC.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	REP.b #$10
	TAY
	LDA.w DATA_038F8A,y
	STA.b $00
	LDA.w DATA_038F8A+$02,y
	STA.b $02
	SEP.b #$10
	TAY
	PHY
	PLB
	JMP.w [$7960]

;---------------------------------------------------------------------------

CODE_03A1BE:
	LDY.w $7D36,x
	BPL.b CODE_03A1CB
	JSL.l CODE_03D35D
	TYX
	JSR.w (DATA_03A1CC,x)
CODE_03A1CB:
	RTL

DATA_03A1CC:
	dw CODE_03A1D4
	dw CODE_03A1D4
	dw CODE_03A209
	dw CODE_03A22E

CODE_03A1D4:
	LDX.b $12
CODE_03A1D6:
	STZ.w $7540,x
	LDA.w $60A8
	CMP.w #$8000
	ROR
	STA.w $60A8
	LDA.w $60A8
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03A1F3
	EOR.w #$FFFF
	INC
CODE_03A1F3:
	CLC
	ADC.w #$FCC0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_03A1FA:
	LDA.w $7D96,x
	BNE.b CODE_03A204
	JSL.l CODE_03B51F
	RTS

CODE_03A204:
	JSL.l CODE_03B595
	RTS

CODE_03A209:
	LDX.b $12
	STZ.w $7540,x
	LDA.w $7C16,x
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $60AA
	BPL.b CODE_03A221
	STZ.w $60AA
CODE_03A221:
	CMP.w #$FC00
	BMI.b CODE_03A229
	LDA.w #$FC00
CODE_03A229:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_03A1FA

CODE_03A22E:
	LDX.b $12
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$8001
	STA.w $60D2
	BRA.b CODE_03A1FA

;---------------------------------------------------------------------------

CODE_03A247:
	JSL.l CODE_02808C
	JSL.l CODE_039A90
	PHK
	PLB
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.w $74A0,x
	PHA
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	JSL.l CODE_03A31E
	LDA.w $0B91,x
	BPL.b CODE_03A27D
	LDA.w #$0004
	JSL.l CODE_03A4E9
	PLY
	LDA.w #!Define_YI_SoundID09_Coin
	JML.l CODE_0085D2

CODE_03A27D:
	TXY
	JSL.l CODE_03A34E
	SEP.b #$20
	PLA
	STA.w $74A0,x
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr115_Coin
	BNE.b CODE_03A298
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_03A298:
	RTL

;---------------------------------------------------------------------------

CODE_03A299:
	LDA.w $7680,x
	CLC
	ADC.w #$0100
	CMP.w #$0300
	BCS.b CODE_03A2AF
	LDA.w $7682,x
	CLC
	ADC.w #$0100
	CMP.w #$02E0
CODE_03A2AF:
	RTL

;---------------------------------------------------------------------------

CODE_03A2B0:
	LDA.w $7680,x
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCS.b CODE_03A2C6
	LDA.w $7682,x
	CLC
	ADC.w #$0080
	CMP.w #$01E0
CODE_03A2C6:
	RTL

;---------------------------------------------------------------------------

CODE_03A2C7:
	LDA.w $7680,x
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCS.b CODE_03A2DD
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	CMP.w #$0160
CODE_03A2DD:
	RTL

;---------------------------------------------------------------------------

CODE_03A2DE:
	LDA.w $7680,x
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCS.b CODE_03A310
	LDA.w $7682,x
	CLC
	ADC.w #$0080
	CMP.w #$01E0
	BCS.b CODE_03A310
	BRA.b CODE_03A34B

CODE_03A2F8:
	LDA.w $7680,x
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCS.b CODE_03A310
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	CMP.w #$0160
	BCC.b CODE_03A34B
CODE_03A310:
	LDA.w $7E2A
	BEQ.b CODE_03A31E
	TXA
	LSR
	LSR
	TAY
	LDA.w $0C98,y
	BNE.b CODE_03A34B
CODE_03A31E:
	SEP.b #$20
	PHX
	LDA.w $74A0,x
	TAX
	LDA.b #$00
	STA.l $7028CA,x
	PLX
	REP.b #$20
CODE_03A32E:
	STZ.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_03A331:
	LDA.w #$00FF
	STA.w $74A2,x
	LDY.w $7722,x
	BMI.b CODE_03A342
	LDA.w $7ECE,y
	TRB.w $7ECC
CODE_03A342:
	CPX.w $61B6
	BNE.b CODE_03A34A
	STZ.w $61B6
CODE_03A34A:
	SEC
CODE_03A34B:
	RTL

;---------------------------------------------------------------------------

CODE_03A34C:
	LDY.b #$5C
CODE_03A34E:
	PHA
CODE_03A34F:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_03A35F
	DEY
	DEY
	DEY
	DEY
	CPY.b #$18
	BCS.b CODE_03A34F
	PLA
	CLC
	RTL

CODE_03A35F:
	LDA.w #$0002
	BRA.b CODE_03A37D

CODE_03A364:
	LDY.b #$5C
CODE_03A366:
	PHA
CODE_03A367:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_03A37A
	DEY
	DEY
	DEY
	DEY
	CPY.b #$18
	BCS.b CODE_03A367
	PLA
	CLC
	RTL

CODE_03A377:
	PHA
	BRA.b CODE_03A395

CODE_03A37A:
	LDA.w #$0010
CODE_03A37D:
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$00FF
	STA.w $74A0,y
	LDA.w #$0000
	STA.w $7400,y
	STA.w $7D96,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
CODE_03A395:
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	STA.w $70E0,y
	STA.w $7D36,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	STA.w $7A36,y
	STA.w $7A38,y
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	STA.w $7AF8,y
	STA.w $7402,y
	STA.w $7860,y
	STA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,y
	STA.w $7D38,y
	STA.w $7720,y
	STA.w $7680,y
	STA.w $7682,y
	STA.w $7540,y
	STA.w $75E0,y
	STA.w $77C0,y
	DEC
	STA.w $7362,y
	STA.w $7722,y
	LDA.w #$1FFF
	STA.w $7862,y
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	PHX
	ASL
	REP.b #$10
	TAX
	SEP.b #$20
	PHY
	LDA.l FXDATA_0AA716,x
	LDY.w #$0006
CODE_03A400:
	CMP.w $6EB5,y
	BEQ.b CODE_03A40B
	DEY
	BNE.b CODE_03A400
	TYA
	BRA.b CODE_03A410

CODE_03A40B:
	TYA
	ADC.b #$06
	ASL
	ASL
CODE_03A410:
	REP.b #$20
	AND.w #$00FF
	PLY
	STA.w $7180,y
	LDA.l FXDATA_0A9F1A+$01,x
	AND.w #$00FF
	EOR.w #$0020
	STA.w $7042,y
	LDA.l FXDATA_0A9F1A,x
	AND.w #$00FF
	STA.w $74A2,y
	LDA.l FXDATA_0AA318-$01,x
	AND.w #$FF00
	BPL.b CODE_03A43C
	ORA.w #$00FF
CODE_03A43C:
	XBA
	STA.w $7542,y
	LDA.l FXDATA_0AA318,x
	AND.w #$FF00
	BPL.b CODE_03A44C
	ORA.w #$00FF
CODE_03A44C:
	XBA
	ASL
	ASL
	ASL
	ASL
	STA.w $75E2,y
	LDA.l FXDATA_0A9B1C,x
	STA.w $7040,y
	LDA.l FXDATA_0A971E,x
	STA.w $6FA2,y
	LDA.l FXDATA_0A9320,x
	STA.w $6FA0,y
	AND.w #$001F
	ASL
	ASL
	ASL
	TAX
	LDA.l FXDATA_0A9220,x
	STA.w $7B56,y
	LDA.l FXDATA_0A9220+$02,x
	STA.w $7B58,y
	LDA.l FXDATA_0A9220+$04,x
	STA.w $7BB6,y
	LDA.l FXDATA_0A9220+$06,x
	STA.w $7BB8,y
	SEP.b #$10
	PLX
	SEC
	RTL

;---------------------------------------------------------------------------

CODE_03A491:
	LDA.w #$0003
	BRA.b CODE_03A4A5

CODE_03A496:
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
CODE_03A4A2:
	LDA.w #$0001
CODE_03A4A5:
	STA.w $0004
	CLC
	ADC.w !RAM_YI_Level_CurrentLifeCountLo
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	LDA.w $0004
	CLC
	ADC.w !RAM_YI_Level_1upsCollectedInCurrentLevelLo
	STA.w !RAM_YI_Level_1upsCollectedInCurrentLevelLo
	LDA.w #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	LSR.w $0004
CODE_03A4C3:
	LDA.w #!Define_YI_AmbSpr1BF
	JSL.l CODE_008B21
	LDA.w $0000
	STA.w $70A2,y
	LDA.w $0002
	STA.w $7142,y
	LDA.w $0004
	STA.w $73C2,y
	LDA.w #$0040
	STA.w $7782,y
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	RTL

;---------------------------------------------------------------------------

CODE_03A4E9:
	STA.w $0006
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
CODE_03A4F5:
	STA.w $0002
	LDA.w #!Define_YI_AmbSpr226
	JSL.l CODE_008B21
	LDA.w $0000
	STA.w $70A2,y
	LDA.w $0002
	STA.w $7142,y
	LDA.w $7002,y
	ORA.w $0006
	STA.w $7002,y
	LDA.w #$0040
	STA.w $7782,y
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_03A520:
	INC.w !RAM_YI_Level_CurrentCoinCountLo
	LDA.w !RAM_YI_Level_CurrentCoinCountLo
	CMP.w #$0064
	BCC.b CODE_03A538
	JSL.l CODE_03A4A2
	LDA.w #$FE40
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	STZ.w !RAM_YI_Level_CurrentCoinCountLo
CODE_03A538:
	RTL

;---------------------------------------------------------------------------

CODE_03A539:
	LDA.w $70E2,y
	LDY.b #$00
	SEC
	SBC.w $70E2,x
	STA.b $08
	BPL.b CODE_03A54C
	EOR.w #$FFFF
	INC
	LDY.b #$02
CODE_03A54C:
	STA.b $06
	TYA
	RTL

;---------------------------------------------------------------------------

CODE_03A550:
	LDY.b #$00
	LDA.w $7182,y
	SEC
	SBC.w $7182,x
	STA.b $0E
	BPL.b CODE_03A563
	EOR.w #$FFFF
	INC
	LDY.b #$02
CODE_03A563:
	STA.b $0C
	TYA
	RTL

;---------------------------------------------------------------------------

CODE_03A567:
	PHY
	JSL.l CODE_03A550
	STY.b $0A
	PLY
	JSL.l CODE_03A539
	STY.b $04
	LDA.b $06
	CMP.b $0C
	BCS.b CODE_03A581
	LDY.b $0A
	INY
	INY
	INY
	INY
CODE_03A581:
	TYA
	RTL

;---------------------------------------------------------------------------

DATA_03A583:
	dw $FF40,$00C0,$FFA0,$0060

CODE_03A58B:
	TXY
	LDX.b #$04
	BRA.b CODE_03A593

CODE_03A590:
	TXY
	LDX.b #$00
CODE_03A593:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_03A5B0
	BPL.b CODE_03A59C
	INX
	INX
CODE_03A59C:
	CLC
	ADC.l DATA_03A583,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.l DATA_03A583,x
	BMI.b CODE_03A5B0
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_03A5B0:
	TYX
	RTL

;---------------------------------------------------------------------------

CODE_03A5B2:
	JSL.l CODE_03A5B7
	RTL

CODE_03A5B7:
	LDY.w $7D36,x
	BEQ.b CODE_03A5F0
	BPL.b CODE_03A62E
CODE_03A5BE:
	LDA.w $7D96,x
	BEQ.b CODE_03A5C9
	PLA
	PLY
	JML.l CODE_03B595

CODE_03A5C9:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF6
	BCC.b CODE_03A5F9
	TXY
	LDX.b #$0C
	LDA.w $60AA
	BMI.b CODE_03A5EA
	LDA.w $6FA1,y
	AND.w #$0038
	LSR
	LSR
	TAX
CODE_03A5EA:
	JSR.w (DATA_03A655,x)
	PLA
	PLY
	RTL

CODE_03A5F0:
	CPX.w $61B6
	BNE.b CODE_03A5F8
	STZ.w $61B6
CODE_03A5F8:
	RTL

CODE_03A5F9:
	LDA.w $6FA0,x
	AND.w #$3800
	CMP.w #$2800
	BEQ.b CODE_03A61D
	LDA.w $60D8
	BNE.b CODE_03A61D
	LDA.w $60A8
	BPL.b CODE_03A612
	EOR.w #$FFFF
	INC
CODE_03A612:
	CMP.w #$0400
	BCC.b CODE_03A61D
	PLA
	PLY
	JSR.w CODE_03A1D6
	RTL

CODE_03A61D:
	LDA.w $6FA0,x
	AND.w #$C000
	ASL
	ROL
	ROL
	ASL
	TAX
	JSR.w (DATA_03A665,x)
	PLA
	PLY
	RTL

CODE_03A62E:
	CPX.w $61B6
	BNE.b CODE_03A636
	STZ.w $61B6
CODE_03A636:
	RTL

CODE_03A637:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_03A64B:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	RTL

DATA_03A655:
	dw CODE_03A66D
	dw CODE_03A6B5
	dw CODE_03A6B5
	dw CODE_03A6B5
	dw CODE_03A6D6
	dw CODE_03A7A4
	dw CODE_03A6F5
	dw CODE_03A789

DATA_03A665:
	dw CODE_03A7AB
	dw CODE_03A7A4
	dw CODE_03A806
	dw CODE_03A80B

CODE_03A66D:
	LDA.w $60C0
	BNE.b CODE_03A675
	JMP.w CODE_03A7A4

CODE_03A675:
	LDX.b $12
	LDA.w $7C16,x
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$8001
	STA.w $60D2
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	JSL.l CODE_03B288
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$09
	BEQ.b CODE_03A6B4
	JSL.l CODE_03B523
CODE_03A6B4:
	RTS

CODE_03A6B5:
	LDX.b $12
	LDY.b #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_03A0E7
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$8001
	STA.w $60D2
	RTS

CODE_03A6D6:
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$8001
	STA.w $60D2
	LDX.b $12
	JSL.l CODE_03B4D6
	JSL.l CODE_03B288
	JSL.l CODE_03A31E
	RTS

DATA_03A6F1:
	dw $0180,$0060

CODE_03A6F5:
	LDX.b $12
	LDA.w $60D4
	BEQ.b CODE_03A707
	LDA.w $6FA2,x
	AND.w #$6000
	BNE.b CODE_03A707
	JMP.w CODE_03A789

CODE_03A707:
	LDA.w $0D94
	BEQ.b CODE_03A716
	CPX.w $61B6
	BNE.b CODE_03A787
	STZ.w $61B6
	BRA.b CODE_03A787

CODE_03A716:
	LDA.w $6FA0,x
	AND.w #$3800
	CMP.w #$3000
	BNE.b CODE_03A731
	CPX.w $61B6
	BEQ.b CODE_03A72E
	LDA.w $61B6
	AND.w #$00FF
	BNE.b CODE_03A787
CODE_03A72E:
	STX.w $61B6
CODE_03A731:
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_03A759
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	SEC
	SBC.w $6EBE
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03A759:
	LDA.w $60AA
	BMI.b CODE_03A787
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03A766
	LDA.w #$0000
CODE_03A766:
	STA.w $60AA
	LDY.b #$00
	LDA.w $72C0,x
	BMI.b CODE_03A772
	LDY.b #$02
CODE_03A772:
	LDA.w $60FC
	AND.w DATA_03A6F1,y
	BNE.b CODE_03A784
	LDA.w $72C0,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_03A784:
	INC.w $61B4
CODE_03A787:
	PLA
	RTL

CODE_03A789:
	LDX.b $12
	JSL.l CODE_03B51F
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$8001
	STA.w $60D2
CODE_03A79B:
	RTS

CODE_03A79C:
	JSR.w CODE_03A789
	RTL

DATA_03A7A0:
	dw $0100,$FF00

CODE_03A7A4:
	LDX.b $12
	JSL.l CODE_03A858
	RTS

CODE_03A7AB:
	LDX.b $12
	LDA.w $60A8
	ORA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_03A79B
	REP.b #$10
	LDA.w $60A8
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	LDA.w $60A8
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TAY
	EOR.w $7C16,x
	BMI.b CODE_03A7D2
	BCS.b CODE_03A7E1
	STZ.w $60A8
	BRA.b CODE_03A7E1

CODE_03A7D2:
	BCS.b CODE_03A7DE
	TYA
	SEC
	SBC.w $60A8
	EOR.w $60A8
	BMI.b CODE_03A7E1
CODE_03A7DE:
	STY.w $60A8
CODE_03A7E1:
	PLA
	TAY
	EOR.w $7C16,x
	BPL.b CODE_03A7EF
	BCS.b CODE_03A7FF
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_03A7FF

CODE_03A7EF:
	BCS.b CODE_03A7FB
	TYA
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03A7FF
CODE_03A7FB:
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_03A7FF:
	SEP.b #$10
	JSL.l CODE_03A0E5
	RTS

CODE_03A806:
	LDX.b $12
	JMP.w CODE_03A1D6

CODE_03A80B:
	LDX.b $12
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_03A80F:
	dw $0100,$FF00

CODE_03A813:
	LDX.b $12
	LDA.w $61D6
	BNE.b CODE_03A850
	LDA.w $6FA2,x
	AND.w #$6000
	BNE.b CODE_03A84A
	INC.w $7D38,x
	STZ.b $18,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.w $7540,x
	STZ.w $7860,x
	TXY
	LDX.w $77C2,y
	LDA.l DATA_03A7A0,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_03A84A:
	LDX.b $12
	JSL.l CODE_03A858
CODE_03A850:
	PLA
	PLY
	RTL

;---------------------------------------------------------------------------

CODE_03A853:
	STZ.w $7972
	BRA.b CODE_03A865

CODE_03A858:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BEQ.b CODE_03A865
	LDY.w $7972
	BEQ.b CODE_03A899
	JMP.w CODE_03B25B

CODE_03A865:
	LDA.w $61D6
	ORA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_FreeMovementFlag
	BNE.b CODE_03A899
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState03
	BCS.b CODE_03A899
	LDA.w $60B2
	CLC
	ADC.w #$0010
	CMP.w #$00E9
	BCS.b CODE_03A899
	LDA.w #!Define_YI_SoundID17_YoshiHurt
	JSL.l CODE_0085D2
	STA.w $607A
	STZ.w $60D4
	LDX.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	JSR.w (DATA_03A89A,x)
	LDX.b $12
CODE_03A899:
	RTL

DATA_03A89A:
	dw CODE_03A8CF
	dw CODE_03A8FC
	dw CODE_03A936
	dw CODE_03A8AE
	dw CODE_03A8C1
	dw CODE_03A94A
	dw CODE_03A940
	dw CODE_03A94B
	dw CODE_03A901
	dw CODE_03A8D3

CODE_03A8AE:
	LDA.w #$0068
	STA.w $61D6
	STZ.w $60A8
	STZ.w $60B4
	LDA.w #$1000
	STA.w $6180
	RTS

CODE_03A8C1:
	LDA.w #$0090
	STA.w $61D6
	STZ.w $618E
	RTS

DATA_03A8CB:
	dw $FE00,$0200

CODE_03A8CF:
	JSL.l CODE_04F74A
CODE_03A8D3:
	LDA.w $61B2
	BMI.b CODE_03A8F7
	LDA.w $0390
	BMI.b CODE_03A8F7
	LDA.w $60A8
	CLC
	ADC.w #$02C0
	CMP.w #$0581
	LDA.w #$0180
	BCC.b CODE_03A8EF
	LDA.w #$0240
CODE_03A8EF:
	STA.w $614A
	LDA.w #$0080
	BRA.b CODE_03A904

CODE_03A8F7:
	LDA.w #$00A0
	BRA.b CODE_03A904

CODE_03A8FC:
	LDA.w #$0040
	BRA.b CODE_03A904

CODE_03A901:
	LDA.w #$0068
CODE_03A904:
	STA.w $61D6
	LDY.w $7972
	BEQ.b CODE_03A917
	LDX.w $77C2,y
	LDA.l DATA_03A8CB,x
	TYX
	STA.w $60B4
CODE_03A917:
	LDY.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CPY.b #!Define_YI_PlayerForm02_Car
	BEQ.b CODE_03A923
	LDA.w $60C0
	BNE.b CODE_03A92F
CODE_03A923:
	LDA.w #$0008
	STA.w $60C0
	LDA.w #$FC00
	STA.w $60AA
CODE_03A92F:
	LDA.w #$0008
	STA.w $0CCC
	RTS

CODE_03A936:
	LDA.w #$0090
	STA.w $61D6
	STZ.w $6194
	RTS

CODE_03A940:
	LDA.w #$00D0
	STA.w $61D6
	STZ.w $6180
	RTS

CODE_03A94A:
	RTS

CODE_03A94B:
	LDA.w $6180
	BNE.b CODE_03A965
	LDA.w #$0080
	STA.w $6180
	LDA.w #$0080
	STA.w $61F6
	LDA.w #$FE00
	STA.w $60AA
	STZ.w $617E
CODE_03A965:
	RTS

;---------------------------------------------------------------------------

DATA_03A966:
	dw $0000,$8040,$8000,$00C0,$8080,$0040,$0080,$80C0

CODE_03A977:
	PHX
	LDY.b #$00
	LDA.b $00
	BPL.b CODE_03A983
	LDY.b #$04
	EOR.w #$FFFF
	INC
CODE_03A983:
	STA.b $04
	TAX
	LDA.b $02
	BPL.b CODE_03A990
	INY
	INY
	EOR.w #$FFFF
	INC
CODE_03A990:
	CMP.b $04
	BCC.b CODE_03A998
	INY
	TAX
	LDA.b $04
CODE_03A998:
	XBA
	STA.w !REGISTER_DividendLo
	STX.w !REGISTER_Divisor
	TYA
	ASL
	TAX
	NOP #4
	REP.b #$10
	LDA.w !REGISTER_QuotientLo
	ASL
	TAY
	CPY.w #$0202
	BCC.b CODE_03A9B5
	LDY.w #$0200
CODE_03A9B5:
	LDA.l DATA_03A966,x
	ASL
	STA.b $04
	TYX
	LDA.l FXDATA_0BB810,x
	BCC.b CODE_03A9C7
	EOR.w #$FFFF
	INC
CODE_03A9C7:
	CLC
	ADC.b $04
	SEP.b #$10
	PLX
	RTL

;---------------------------------------------------------------------------

DATA_03A9CE:
	dw $0000,$0010,$0000,$0010,$0020,$0030,$0020,$0030
	dw $0040,$0050,$0040,$0050,$0060,$0070,$0060,$0070

DATA_03A9EE:
	dw $0000,$0000,$0010,$0010,$0000,$0000,$0010,$0010
	dw $0000,$0000,$0010,$0010,$0000,$0000,$0010,$0010

;---------------------------------------------------------------------------

DATA_03AA0E:
	dw $01C0,$01C2,$01E0,$01E2,$01C4,$01C6,$01E4,$01E6
	dw $01C8,$01CA,$01E8,$01EA,$01CC,$01CE,$01EC,$01EE

CODE_03AA2E:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_03AA51
	REP.b #$10
	LDY.w $7362,x
	BMI.b CODE_03AA4F
CODE_03AA3C:
	PHX
	LDA.w $7722,x
	TAX
	LDA.w $6004,y
	AND.w #$FE00
	ORA.l DATA_03AA0E,x
	STA.w $6004,y
	PLX
CODE_03AA4F:
	SEP.b #$10
CODE_03AA51:
	RTL

;---------------------------------------------------------------------------

CODE_03AA52:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_03AA9C
	REP.b #$10
	LDY.w $7362,x
	BMI.b CODE_03AA9A
CODE_03AA60:
	PHX
	LDA.w $7722,x
	TAX
	LDA.w $6004,y
	AND.w #$FE00
	ORA.l DATA_03AA0E,x
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$02,x
	STA.w $600C,y
	LDA.w $6014,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$04,x
	STA.w $6014,y
	LDA.w $601C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$06,x
	STA.w $601C,y
	PLX
CODE_03AA9A:
	SEP.b #$10
CODE_03AA9C:
	RTL

;---------------------------------------------------------------------------

CODE_03AA9D:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_03AB1B
	REP.b #$10
	LDY.w $7362,x
	BMI.b CODE_03AB19
CODE_03AAAB:
	PHX
	LDA.w $7722,x
	TAX
	LDA.w $6004,y
	AND.w #$FE00
	ORA.l DATA_03AA0E,x
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$02,x
	STA.w $600C,y
	LDA.w $6014,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$04,x
	STA.w $6014,y
	LDA.w $601C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$06,x
	STA.w $601C,y
	LDA.w $6024,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$08,x
	STA.w $6024,y
	LDA.w $602C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0A,x
	STA.w $602C,y
	LDA.w $6034,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0C,x
	STA.w $6034,y
	LDA.w $603C,y
	AND.w #$FE00
	ORA.l DATA_03AA0E+$0E,x
	STA.w $603C,y
	PLX
CODE_03AB19:
	SEP.b #$10
CODE_03AB1B:
	RTL

;---------------------------------------------------------------------------

CODE_03AB1C:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_03AB1B
	REP.b #$10
	LDY.w $7362,x
	BPL.b CODE_03AB2D
	JMP.w CODE_03ABF7

CODE_03AB2D:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7722,x
	TAX
	LDA.w $6004,y
	AND.w #$FE00
	ORA.w DATA_03AA0E,x
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$02,x
	STA.w $600C,y
	LDA.w $6014,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$04,x
	STA.w $6014,y
	LDA.w $601C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$06,x
	STA.w $601C,y
	LDA.w $6024,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$08,x
	STA.w $6024,y
	LDA.w $602C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$0A,x
	STA.w $602C,y
	LDA.w $6034,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$0C,x
	STA.w $6034,y
	LDA.w $603C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$0E,x
	STA.w $603C,y
	LDA.w $6044,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$10,x
	STA.w $6044,y
	LDA.w $604C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$12,x
	STA.w $604C,y
	LDA.w $6054,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$14,x
	STA.w $6054,y
	LDA.w $605C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$16,x
	STA.w $605C,y
	LDA.w $6064,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$18,x
	STA.w $6064,y
	LDA.w $606C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$1A,x
	STA.w $606C,y
	LDA.w $6074,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$1C,x
	STA.w $6074,y
	LDA.w $607C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$1E,x
	STA.w $607C,y
	PLB
	PLX
CODE_03ABF7:
	SEP.b #$10
CODE_03ABF9:
	RTL

;---------------------------------------------------------------------------

CODE_03ABFA:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_03ABF9
	REP.b #$10
	LDY.w $7362,x
	BPL.b CODE_03AC0B
	JMP.w CODE_03ACED

CODE_03AC0B:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7722,x
	TAX
	LDA.w $6004,y
	AND.w #$FE00
	ORA.w DATA_03AA0E,x
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$02,x
	STA.w $600C,y
	LDA.w $6014,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$04,x
	STA.w $6014,y
	LDA.w $601C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$06,x
	STA.w $601C,y
	LDA.w $6024,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E+$02,x
	STA.w $6024,y
	LDA.w $602C,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E,x
	STA.w $602C,y
	LDA.w $6034,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E+$06,x
	STA.w $6034,y
	LDA.w $603C,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E+$04,x
	STA.w $603C,y
	LDA.w $6044,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$08,x
	STA.w $6044,y
	LDA.w $604C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$0A,x
	STA.w $604C,y
	LDA.w $6054,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$0C,x
	STA.w $6054,y
	LDA.w $605C,y
	AND.w #$FE00
	ORA.w DATA_03AA0E+$0E,x
	STA.w $605C,y
	LDA.w $6064,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E+$0A,x
	STA.w $6064,y
	LDA.w $606C,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E+$08,x
	STA.w $606C,y
	LDA.w $6074,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E+$0E,x
	STA.w $6074,y
	LDA.w $607C,y
	AND.w #$FE00
	EOR.w #$4000
	ORA.w DATA_03AA0E+$0C,x
	STA.w $607C,y
	PLB
	PLX
CODE_03ACED:
	SEP.b #$10
	RTL

;---------------------------------------------------------------------------

DATA_03ACF0:
	dw $FF00,$0FF0,$00FF

DATA_03ACF6:
	dw $F000,$0F00,$00F0,$000F

DATA_03ACFE:
	dw $FA00,$0FA0,$00FA

DATA_03AD04:
	dw $8000,$4000,$2000,$1000,$0800,$0400,$0200,$0100
	dw $0080,$0040,$0020,$0010,$0008,$0004,$0002,$0001

CODE_03AD24:
	PHX
	PHB
	PHK
	PLB
	SEC
	ROR.w $0000
	LDX.b #$06
CODE_03AD2E:
	LDA.w $7ECC
	AND.w DATA_03ACF6,x
	BNE.b CODE_03AD3B
	STX.w $0001
	BRA.b CODE_03AD40

CODE_03AD3B:
	CMP.w DATA_03ACF6,x
	BNE.b CODE_03AD49
CODE_03AD40:
	DEX
	DEX
	BPL.b CODE_03AD2E
	LDX.w $0001
	BMI.b CODE_03AD5C
CODE_03AD49:
	TXA
	ASL
	ASL
	TAX
	LDA.w $7ECC
	LDY.b #$04
CODE_03AD52:
	BIT.w DATA_03AD04,x
	BEQ.b CODE_03AD60
	INX
	INX
	DEY
	BNE.b CODE_03AD52
CODE_03AD5C:
	PLB
	PLX
	CLC
	RTL

CODE_03AD60:
	LDA.w DATA_03AD04,x
	STA.w $7ECE,x
	TSB.w $7ECC
	TXA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	SEC
	RTL

CODE_03AD74:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7ECC
	LDX.b #$06
CODE_03AD7D:
	BIT.w DATA_03ACF6,x
	BEQ.b CODE_03AD8A
	DEX
	DEX
	BPL.b CODE_03AD7D
	PLB
	PLX
	CLC
	RTL

CODE_03AD8A:
	TXA
	ASL
	ASL
	TAY
	LDA.w DATA_03ACF6,x
	STA.w $7ECE,y
	TSB.w $7ECC
	TYA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	SEC
	RTL

CODE_03ADA2:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7ECC
	LDX.b #$04
CODE_03ADAB:
	BIT.w DATA_03ACFE,x
	BEQ.b CODE_03ADB8
	DEX
	DEX
	BPL.b CODE_03ADAB
	PLB
	PLX
	CLC
	RTL

CODE_03ADB8:
	TXA
	ASL
	ASL
	TAY
	LDA.w DATA_03ACFE,x
	STA.w $7ECE,y
	TSB.w $7ECC
	TYA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	SEC
	RTL

CODE_03ADD0:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7ECC
	LDX.b #$04
CODE_03ADD9:
	BIT.w DATA_03ACF0,x
	BEQ.b CODE_03ADE6
	DEX
	DEX
	BPL.b CODE_03ADD9
	PLB
	PLX
CODE_03ADE4:
	CLC
	RTL

CODE_03ADE6:
	TXA
	ASL
	ASL
	TAY
	LDA.w DATA_03ACF0,x
	STA.w $7ECE,y
	TSB.w $7ECC
	TYA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	SEC
	RTL

CODE_03ADFE:
	LDA.w $7ECC
	BNE.b CODE_03ADE4
	LDA.w #$FFFF
	STA.w $7ECE
	STA.w $7ECC
	STZ.w $7722,x
	SEC
	RTL

CODE_03AE11:
	PHX
	PHB
	PHK
	PLB
	SEC
	ROR.w $0000
	LDX.b #$06
CODE_03AE1B:
	LDA.w $7ECC
	AND.w DATA_03ACF6,x
	BNE.b CODE_03AE28
	STX.w $0001
	BRA.b CODE_03AE2D

CODE_03AE28:
	CMP.w DATA_03ACF6,x
	BNE.b CODE_03AE36
CODE_03AE2D:
	DEX
	DEX
	BPL.b CODE_03AE1B
	LDX.w $0001
	BMI.b CODE_03AE49
CODE_03AE36:
	TXA
	ASL
	ASL
	TAX
	LDA.w $7ECC
	LDY.b #$04
CODE_03AE3F:
	BIT.w DATA_03AD04,x
	BEQ.b CODE_03AE4D
	INX
	INX
	DEY
	BNE.b CODE_03AE3F
CODE_03AE49:
	PLB
	PLX
	BRA.b CODE_03AEA1

CODE_03AE4D:
	LDA.w DATA_03AD04,x
	STA.w $7ECE,x
	TSB.w $7ECC
	TXA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	RTL

CODE_03AE60:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7ECC
	LDX.b #$06
CODE_03AE69:
	BIT.w DATA_03ACF6,x
	BEQ.b CODE_03AE76
	DEX
	DEX
	BPL.b CODE_03AE69
	PLB
	PLX
	BRA.b CODE_03AEA1

CODE_03AE76:
	TXA
	ASL
	ASL
	TAY
	LDA.w DATA_03ACF6,x
	STA.w $7ECE,y
	TSB.w $7ECC
	TYA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	RTL

CODE_03AE8D:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7ECC
	LDX.b #$04
CODE_03AE96:
	BIT.w DATA_03ACFE,x
	BEQ.b CODE_03AEA7
	DEX
	DEX
	BPL.b CODE_03AE96
	PLB
	PLX
CODE_03AEA1:
	PLA
	PLY
	JML.l CODE_03A31E

CODE_03AEA7:
	TXA
	ASL
	ASL
	TAY
	LDA.w DATA_03ACFE,x
	STA.w $7ECE,y
	TSB.w $7ECC
	TYA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	RTL

CODE_03AEBE:
	PHX
	PHB
	PHK
	PLB
	LDA.w $7ECC
	LDX.b #$04
CODE_03AEC7:
	BIT.w DATA_03ACF0,x
	BEQ.b CODE_03AED4
	DEX
	DEX
	BPL.b CODE_03AEC7
	PLB
	PLX
	BRA.b CODE_03AEA1

CODE_03AED4:
	TXA
	ASL
	ASL
	TAY
	LDA.w DATA_03ACF0,x
	STA.w $7ECE,y
	TSB.w $7ECC
	TYA
	AND.w #$00FF
	PLB
	PLX
	STA.w $7722,x
	RTL

CODE_03AEEB:
	LDA.w $7ECC
	BNE.b CODE_03AEA1
	LDA.w #$FFFF
	STA.w $7ECE
	STA.w $7ECC
	STZ.w $7722,x
	RTL

;---------------------------------------------------------------------------

CODE_03AEFD:
	LDY.w $7722,x
	LDA.w $7ECE,y
	TRB.w $7ECC
	LDA.w #$FFFF
	STA.w $7722,x
	RTL

;---------------------------------------------------------------------------

CODE_03AF0D:
	LDY.w $7722,x
	BMI.b CODE_03AF1E
	LDA.w $7ECE,y
	TRB.w $7ECC
	LDA.w #$FFFF
	STA.w $7722,x
CODE_03AF1E:
	RTL

;---------------------------------------------------------------------------

DATA_03AF1F:
	dw FXCODE_08867E,FXCODE_088205

CODE_03AF23:
	LDA.w $7D38,x
	BEQ.b CODE_03AF42
	LDY.w $7722,x
	BMI.b CODE_03AF42
	LDA.w $7403,x
	AND.w #$00FF
	BEQ.b CODE_03AF42
	DEC
	BNE.b CODE_03AF3E
	JSL.l CODE_03AA2E
	BRA.b CODE_03AF42

CODE_03AF3E:
	JSL.l CODE_03AA52
CODE_03AF42:
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPY.b #$10
	BNE.b CODE_03AF54
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_03AF57
CODE_03AF54:
	PLA
	PLY
	RTL

CODE_03AF57:
	LDA.w $7D96,x
	BEQ.b CODE_03AFB0
	CMP.w #$0020
	BCS.b CODE_03AF76
	LSR
	BNE.b CODE_03AF6B
	LDA.w #!Define_YI_SoundID77_EnemyJumpingOutOfPipe
	JSL.l CODE_0085D2
CODE_03AF6B:
	AND.w #$0001
	ASL
	DEC
	ADC.w $70E2,x
	STA.w $70E2,x
CODE_03AF76:
	LDA.w $7042,x
	AND.w #$00F1
	ORA.w #$0006
	STA.w $7042,x
	LDA.w $7A98,x
	BNE.b CODE_03AF91
	LDA.w #$000C
	STA.w $7A98,x
	JSL.l CODE_03B5C3
CODE_03AF91:
	LDA.w $7D38,x
	BNE.b CODE_03AFB6
	DEC.w $7D96,x
	BNE.b CODE_03AFA9
	JSL.l CODE_04849E
	JSL.l CODE_03B078
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_03AFA9:
	JSL.l CODE_03A1BE
	PLA
	PLY
	RTL

CODE_03AFB0:
	LDA.w $7D38,x
	BNE.b CODE_03AFB6
	RTL

CODE_03AFB6:
	DEC
	BEQ.b CODE_03AFBC
	DEC.w $7D38,x
CODE_03AFBC:
	LDY.w $7722,x
	BMI.b CODE_03AFF0
	LDA.w $7403,x
	AND.w #$00FF
	BEQ.b CODE_03AFF0
	LDA.b $16,x
	CLC
	ADC.w #$0010
	AND.w #$00FF
	STA.b $16,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	JSL.l CODE_03B631
	LDA.l DATA_03AF1F,x
	LDX.b #FXCODE_088205>>16
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_03AFF0:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_03B02B
	LDA.w $7542,x
	CMP.w #$0040
	BCS.b CODE_03B005
	JSR.w CODE_03B11B
	BRA.b CODE_03B02B

CODE_03B005:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w $7D96,x
	BEQ.b CODE_03B024
	PLA
	PLY
	JML.l CODE_03B595

CODE_03B024:
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_03B212
CODE_03B02B:
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_03B04D
	AND.w #$0002
	BEQ.b CODE_03B058
	LDA.w $7542,x
	CMP.w #$0040
	BCC.b CODE_03B055
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_03B212
	JMP.w CODE_03B0C1

CODE_03B04D:
	LDA.w $7542,x
	CMP.w #$0040
	BCS.b CODE_03B05B
CODE_03B055:
	JSR.w CODE_03B11B
CODE_03B058:
	JMP.w CODE_03B0C1

CODE_03B05B:
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_03B212
	JSL.l CODE_03A58B
	LDA.b $18,x
	CMP.w #$0003
	BCC.b CODE_03B0AC
	LDA.w $6FA2,x
	AND.w #$6000
	BNE.b CODE_03B078
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_03B078:
	JSL.l CODE_03AF0D
	TXY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	JSL.l CODE_03A377
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	JSL.l CODE_039A6C
	LDA.w $7D96,x
	BEQ.b CODE_03B0A5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7042,x
	AND.w #$00F1
	ORA.w #$0006
	STA.w $7042,x
CODE_03B0A5:
	RTL

;---------------------------------------------------------------------------

DATA_03B0A6:
	dw $FD80,$FDC0,$FE00

CODE_03B0AC:
	INC.b $18,x
	LDA.b $18,x
	ASL
	TXY
	TAX
	LDA.l DATA_03B0A6-$02,x
	TYX
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_03B0C1:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_03B118
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03B118
	LDA.w $7D96,y
	BEQ.b CODE_03B0DF
	PHY
	TYX
	JSL.l CODE_03B595
	PLY
	LDX.b $12
	BRA.b CODE_03B0EE

CODE_03B0DF:
	LDA.w $6FA0,y
	AND.w #$0020
	BNE.b CODE_03B118
	TYX
	JSL.l CODE_03B24B
	BCS.b CODE_03B118
CODE_03B0EE:
	LDA.w $7542,x
	CMP.w #$0040
	BCS.b CODE_03B10B
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_03B10B
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_03B10B
	LDA.w #$0004
	STA.w $7542,x
	BRA.b CODE_03B118

CODE_03B10B:
	LDA.w $7D96,x
	BEQ.b CODE_03B114
	JML.l CODE_03B595

CODE_03B114:
	JSL.l CODE_03B24B
CODE_03B118:
	PLA
	PLY
	RTL

CODE_03B11B:
	CMP.w #$0002
	BCS.b CODE_03B123
	LDA.w #!Define_YI_SoundID67_EnemyTumbling-$0099
CODE_03B123:
	ADC.w #!Define_YI_SoundID99_BigExplosion
	CMP.w #!Define_YI_SoundID9E_EggBounce3+$01
	BCC.b CODE_03B12E
	LDA.w #!Define_YI_SoundID9E_EggBounce3
CODE_03B12E:
	JSL.l CODE_03B212
	RTS

CODE_03B133:
	LDY.w $7D36,x
	BPL.b CODE_03B140
	JSL.l CODE_03D35D
	TYX
	JSR.w (DATA_03B141,x)
CODE_03B140:
	RTL

DATA_03B141:
	dw CODE_03B149
	dw CODE_03B149
	dw CODE_03B18B
	dw CODE_03B1C4

CODE_03B149:
	LDX.b $12
	LDA.w $7C16,x
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03B18A
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDA.w #$FE00
	LDY.w $77C2,x
	BEQ.b CODE_03B165
	LDA.w #$0200
CODE_03B165:
	STA.w $60B4
	STA.w $60A8
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FD00
	STA.w $60AA
	LDA.w #$0008
	STA.w $60C0
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_03B18A:
	RTS

CODE_03B18B:
	LDX.b $12
	LDA.w $7C18,x
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03B1C3
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03B1A4
	LDA.w #$0000
CODE_03B1A4:
	BIT.w $60AA
	BMI.b CODE_03B1AE
	CMP.w $60AA
	BMI.b CODE_03B1B1
CODE_03B1AE:
	STA.w $60AA
CODE_03B1B1:
	LDA.w #$0005
	STA.w $60C2
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_03B1C3:
	RTS

CODE_03B1C4:
	LDX.b $12
	LDA.w $7C18,x
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03B20A
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDA.w $60AA
	BPL.b CODE_03B1DD
	LDA.w #$0000
CODE_03B1DD:
	BIT.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03B1E7
	CMP.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03B1F0
CODE_03B1E7:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_03B1F0:
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_03B1FE
	LDA.w #$FC00
	STA.w $60AA
CODE_03B1FE:
	LDA.w #$0008
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
CODE_03B20A:
	RTS

CODE_03B20B:
	STZ.w $60D4
	JSR.w CODE_03B1F0
	RTL

;---------------------------------------------------------------------------

CODE_03B212:
	JSL.l CODE_0085D2
	LDA.w #$0040
	STA.w $61F2
	LDA.w $70E2,x
	STA.w $6EB2
	LDA.w $7182,x
	STA.w $6EB4
	RTL

;---------------------------------------------------------------------------

DATA_03B229:
	dw $0001,$0003,$0005

CODE_03B22F:
	LDY.w $7D36,x
	BEQ.b CODE_03B248
	BPL.b CODE_03B23B
	JSL.l CODE_03A5BE
	RTL

CODE_03B23B:
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_03B248
	LDA.w $7D37,y
	BNE.b CODE_03B249
CODE_03B248:
	RTL

CODE_03B249:
	DEY
	TYX
CODE_03B24B:
	JSL.l CODE_04906C
	BEQ.b CODE_03B257
	JSL.l CODE_0EBE8D
	BNE.b CODE_03B25B
CODE_03B257:
	LDX.b $12
	SEC
	RTL

CODE_03B25B:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr028_HuffinPuffin
	BNE.b CODE_03B266
CODE_03B263:
	JMP.w CODE_03B34C

CODE_03B266:
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg
	BNE.b CODE_03B273
	LDA.w $75E2,x
	CMP.w #$0401
	BCS.b CODE_03B263
CODE_03B273:
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0400
	STA.w $75E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_03B288:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_03B2D0
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_03B2D0
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCC.b CODE_03B2BF
	CMP.w #!Define_YI_NorSpr027_Key
	BEQ.b CODE_03B2AF
	LDA.w $7542,x
	CMP.w #$0040
	BCC.b CODE_03B313
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BCS.b CODE_03B313
CODE_03B2AF:
	LDA.w #$0001
	STA.b $18,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.w $7D38,x
	BRA.b CODE_03B30B

CODE_03B2BF:
	JSR.w CODE_03B3C2
	LDA.w #$0040
	STA.w $7542,x
CODE_03B2C8:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BRA.b CODE_03B31C

CODE_03B2D0:
	CMP.w #!Define_YI_NorSpr107_WatermelonSeed
	BNE.b CODE_03B2DC
	JSL.l CODE_01AE1E
	JMP.w CODE_03B3BE

CODE_03B2DC:
	LDA.w #$0040
	STA.w $7542,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr1A5_RunAwayMonkey
	BCC.b CODE_03B34E
	CMP.w #!Define_YI_NorSpr1AA_HotLips
	BCS.b CODE_03B34E
	LDA.w $7A98,x
	BNE.b CODE_03B34C
	LDY.b $12
	PHY
	STX.b $12
	JSL.l CODE_02B2BB
	PLY
	STY.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #$0199
	BNE.b CODE_03B30B
	JMP.w CODE_03B3AD

CODE_03B30B:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BRA.b CODE_03B31C

CODE_03B313:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $7D38,x
CODE_03B31C:
	LDY.b $12
	LDA.w $7C76,y
	BNE.b CODE_03B328
	CPX.w $7972
	BRA.b CODE_03B331

CODE_03B328:
	CPX.b $12
	BEQ.b CODE_03B330
	EOR.w #$FFFF
	INC
CODE_03B330:
	ASL
CODE_03B331:
	LDA.w #$FF00
	BCC.b CODE_03B339
	LDA.w #$0100
CODE_03B339:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	JSL.l CODE_03A0A1
CODE_03B34C:
	BRA.b CODE_03B3B6

CODE_03B34E:
	CMP.w #!Define_YI_NorSpr115_Coin
	BNE.b CODE_03B380
CODE_03B353:
	LDA.w $7042,x
	BIT.w #$0002
	BEQ.b CODE_03B373
CODE_03B35B:
	JSL.l CODE_03A4E9
	LDA.w #!Define_YI_SoundID93_RedCoin
	INC.w !RAM_YI_Level_RedCoinsCollectedLo
	LDY.w !RAM_YI_Level_RedCoinsCollectedLo
	CPY.b #$14
	BMI.b CODE_03B36D
	INC
CODE_03B36D:
	JSL.l CODE_0085D2
	BRA.b CODE_03B3BE

CODE_03B373:
	JSL.l CODE_03A520
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	BRA.b CODE_03B3BE

CODE_03B380:
	CMP.w #!Define_YI_NorSpr100_Bubbled1up
	BNE.b CODE_03B39C
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $0002
	LDA.b $18,x
	INC
	JSL.l CODE_03A4A5
CODE_03B39C:
	LDY.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr107_WatermelonSeed
	BNE.b CODE_03B3AD
	TXY
	JSR.w CODE_03B42F
	JMP.w CODE_03B2C8

CODE_03B3AD:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
CODE_03B3B6:
	CPX.w $61B6
	BNE.b CODE_03B3BE
	STZ.w $61B6
CODE_03B3BE:
	LDX.b $12
	CLC
	RTL

CODE_03B3C2:
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	LDA.w $7042,x
	STA.w $0004
	PHX
	JSL.l CODE_04F88E
	PLX
	TXY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr022_FlashingEgg
	ASL
	TAX
	JSR.w (DATA_03B3E9,x)
	TYX
	RTS

DATA_03B3E9:
	dw CODE_03B3FA
	dw CODE_03B42A
	dw CODE_03B41D
	dw CODE_03B3F1

CODE_03B3F1:
	TYX
	PLA
	PLA
	JSL.l CODE_03A31E
	BRA.b CODE_03B3BE

CODE_03B3FA:
	LDA.w #!Define_YI_NorSpr115_Coin
	JSL.l CODE_03A377
	LDA.w $7042,y
	EOR.w #$0006
	STA.w $7042,y
CODE_03B40A:
	LDA.w #$0100
	STA.w $7A96,y
	LDA.w #$0140
	STA.w $7A98,y
	LDA.w #$0010
	STA.w $7AF6,y
	RTS

CODE_03B41D:
	LDA.w #!Define_YI_NorSpr115_Coin
	JSL.l CODE_03A377
	BRA.b CODE_03B40A

CODE_03B426:
	JSR.w CODE_03B42F
	RTL

CODE_03B42A:
	LDA.w #$0001
	BRA.b CODE_03B432

CODE_03B42F:
	LDA.w #$0000
CODE_03B432:
	STA.b $08
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_SoftMaxStarTimerThreshold
	LDA.w #!Define_YI_NorSpr1A2_HealthStar
	BCC.b CODE_03B442
	LDA.w #!Define_YI_NorSpr115_Coin
CODE_03B442:
	JSL.l CODE_03A377
	LDA.w #$0000
	STA.w $7D96,y
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_SoftMaxStarTimerThreshold
	BCC.b CODE_03B459
	JSR.w CODE_03B40A
	BRA.b CODE_03B468

CODE_03B459:
	LDA.w #$0180
	STA.w $7A96,y
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,y
	REP.b #$20
CODE_03B468:
	LDA.b $08
	BEQ.b CODE_03B479
	PHY
	LDA.w !RAM_YI_Level_StarTimerLo
	CLC
	ADC.w #$000A
	JSL.l CODE_03C793
	PLY
CODE_03B479:
	RTS

;---------------------------------------------------------------------------

CODE_03B47A:
	LDY.w $03BA
	CPY.b #$1E
	BCS.b CODE_03B49D
CODE_03B481:
	PHX
	STA.b $04
	ASL
	TAX
	LDA.w $03BA
	CLC
	ADC.l DATA_03B229-$06,x
	CMP.w #$001E
	BCC.b CODE_03B496
	LDA.w #$001E
CODE_03B496:
	STA.w $03BA
	PLX
	JMP.w CODE_03A4C3

CODE_03B49D:
	LDA.w #$0115
	TXY
	JSL.l CODE_03A364
	BCC.b CODE_03B4D5
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
	LDA.w #$0030
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0008
	STA.w $7542,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
CODE_03B4D5:
	RTL

;---------------------------------------------------------------------------

CODE_03B4D6:
	PHY
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_03B212
	PLY
CODE_03B4DF:
	LDA.w $70E2,y
	STA.b $00
	LDA.w $7182,y
	STA.b $02
	LDA.w #!Define_YI_AmbSpr208
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #$0016
	STA.w $73C2,y
	RTL

;---------------------------------------------------------------------------

CODE_03B507:
	JSL.l CODE_03B25B
CODE_03B50B:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.b $02
	BRA.b CODE_03B56B

CODE_03B51F:
	JSL.l CODE_03B25B
CODE_03B523:
	LDA.w $70E2,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$8000
	ROR
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BRA.b CODE_03B555

CODE_03B53D:
	LDA.w $70E2,x
	CLC
	ADC.w $70E2,y
	CMP.w #$8000
	ROR
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w $7182,y
CODE_03B555:
	CMP.w #$8000
	ROR
	CLC
	ADC.w #$0002
	STA.b $02
	LDA.w $0CCE
	BEQ.b CODE_03B565
	RTL

CODE_03B565:
	LDA.w #$0010
	STA.w $0CCE
CODE_03B56B:
	LDA.w #!Define_YI_AmbSpr1E6
CODE_03B56E:
	PHA
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_03B212
	PLA
CODE_03B577:
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0007
	STA.w $73C2,y
	STA.w $7E4C,y
	RTL

;---------------------------------------------------------------------------

CODE_03B595:
	LDA.w #!Define_YI_SoundIDA1_BreakFrozenEnemy
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1F2
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	JSL.l CODE_03B288
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

CODE_03B5C3:
	JSL.l CODE_008408
	LDA.w $796F
	AND.w #$FF00
	ORA.w $7BB8,x
	STA.w !REGISTER_Multiplicand
	LDA.w !EXRAM_YI_Global_RNGOutputHi|!EXRAMBankMirror
	LSR
	NOP #2
	LDA.w !REGISTER_ProductOrRemainderHi
	AND.w #$00FF
	BCC.b CODE_03B5E4
	EOR.w #$FFFF
CODE_03B5E4:
	ADC.w $70E2,x
	STA.b $00
	JSL.l CODE_008408
	LDA.w $796F
	AND.w #$FF00
	ORA.w $7BB6,x
	STA.w !REGISTER_Multiplicand
	LDA.w !EXRAM_YI_Global_RNGOutputHi|!EXRAMBankMirror
	LSR
	NOP #2
	LDA.w !REGISTER_ProductOrRemainderHi
	AND.w #$00FF
	BCC.b CODE_03B60A
	EOR.w #$FFFF
CODE_03B60A:
	ADC.w $7182,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1F0
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	SEC
	SBC.w #$0004
	STA.w $7142,y
	LDA.w #$0006
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	RTL

;---------------------------------------------------------------------------

CODE_03B631:
	REP.b #$10
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b $12
	LDA.w #FXDATA_540000>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7403,x
	AND.w #$00FF
	DEC
	ASL
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	TAX
	LDA.l FXDATA_0AAB14,x
	TAX
	AND.w #$0400
	BEQ.b CODE_03B665
	LDA.w #$8000
CODE_03B665:
	STA.b $00
	TXA
	BIT.w #$0200
	BEQ.b CODE_03B66F
	INC.b $00
CODE_03B66F:
	BIT.w #$0100
	BEQ.b CODE_03B67A
	LDA.w #$4000
	TSB.b $00
	TXA
CODE_03B67A:
	AND.w #$0080
	TSB.b $00
	TXA
	AND.w #$0070
	XBA
	LSR
	TSB.b $00
	TXA
	AND.w #$000F
	ASL
	ASL
	ASL
	ORA.b $00
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	SEP.b #$10
	TYX
	RTL

;---------------------------------------------------------------------------

CODE_03B697:
	LDA.w $7860,x
	LSR
	BCS.b CODE_03B6D9
CODE_03B69D:
	LDA.w $75E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	ASL
	LDA.w $7542,x
	BCC.b CODE_03B6AE
	EOR.w #$FFFF
	INC
CODE_03B6AE:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	AND.w #$00FF
	XBA
	CLC
	ADC.w $7180,x
	STA.w $7180,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	AND.w #$FF00
	BPL.b CODE_03B6CB
	ORA.w #$00FF
CODE_03B6CB:
	XBA
	ADC.w #$0000
	STA.w $72C2,x
	CLC
	ADC.w $7182,x
	STA.w $7182,x
CODE_03B6D9:
	LDA.w $75E0,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	LDA.w $7540,x
	BCC.b CODE_03B6EA
	EOR.w #$FFFF
	INC
CODE_03B6EA:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$00FF
	XBA
	CLC
	ADC.w $70E0,x
	STA.w $70E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$FF00
	BPL.b CODE_03B707
	ORA.w #$00FF
CODE_03B707:
	XBA
	ADC.w #$0000
	STA.w $72C0,x
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	RTL

;---------------------------------------------------------------------------

CODE_03B716:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_03B741
	LDA.w $7A96,x
	BEQ.b CODE_03B729
	DEC.w $7A96,x
CODE_03B729:
	LDA.w $7A98,x
	BEQ.b CODE_03B731
	DEC.w $7A98,x
CODE_03B731:
	LDA.w $7AF6,x
	BEQ.b CODE_03B739
	DEC.w $7AF6,x
CODE_03B739:
	LDA.w $7AF8,x
	BEQ.b CODE_03B741
	DEC.w $7AF8,x
CODE_03B741:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr022_FlashingEgg_Init:
;$03B742
	JSL.l CODE_03B75E
YI_NorSpr023_RedEgg_Init:
YI_NorSpr024_YellowEgg_Init:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_03B759
	JSL.l CODE_03D3F8
	BEQ.b CODE_03B755
	JML.l CODE_03A32E

CODE_03B755:
	JSL.l CODE_0ED844
YI_NorSpr025_GreenEgg_Init:
YI_NorSpr029_GiantEgg_Init:
YI_NorSpr02A_RedGiantEgg_Init:
YI_NorSpr02B_GreenGiantEgg_Init:
CODE_03B759:
	RTL

;---------------------------------------------------------------------------

DATA_03B75A:
	db $00,$02,$04,$08

CODE_03B75E:
	TXY
	LDA.w $0030
	AND.w #$0003
	TAX
	LDA.w $7042,y
	AND.w #$00F1
	ORA.l DATA_03B75A,x
	AND.w #$00FF
	STA.w $7042,y
	TYX
	RTL

;---------------------------------------------------------------------------

DATA_03B778:
	dw $0002,$0018,$002C,$0040,$0054,$0068,$007C

DATA_03B786:
	dw $0002,$FFFE

DATA_03B78A:
	dw $0000,$0000,$FFFF,$FFFE,$FFFE,$FFFD,$FFFD,$FFFD
	dw $FFFD,$FFFE,$FFFE,$FFFF,$FFFF,$0000,$0000,$0000
	dw $0001,$0000,$0002,$0003,$0003

YI_NorSpr029_GiantEgg_Main:
;$03B7B4
	LDA.w $7AF8,x
	BNE.b CODE_03B7BC
	JMP.w CODE_03B83C

CODE_03B7BC:
	DEC.w $7AF8,x
	BEQ.b CODE_03B7CD
	CMP.w #$0002
	BNE.b CODE_03B83B
	LDA.w #$00FF
	STA.w $74A2,x
	RTL

CODE_03B7CD:
	LDX.b #FXCODE_0BC6B7>>16
	LDA.w #FXCODE_0BC6B7
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0010
	TRB.w $7E08
	STZ.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	JSL.l CODE_04EF27
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0004
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0008
	STA.w $60BE
	STA.w $60C0
	LDA.w #$FC00
	STA.w $60AA
	STZ.w $60B4
	STZ.w $60D2
	LDX.b $12
	JSL.l CODE_03BF87
	JSL.l CODE_03A32E
	LDA.w #!Define_YI_NorSpr061_BabyMario
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7182
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2
	LDA.w #FXDATA_520000+$BC00
	STA.w $6114
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w !RAM_YI_Global_PlayMusicLo
	JSL.l CODE_01B25E
	LDX.b $12
CODE_03B83B:
	RTL

CODE_03B83C:
	JSL.l CODE_03B9DD
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	DEC
	BNE.b CODE_03B876
	LDA.w $611C
	CLC
	ADC.w $7CD6
	LSR
	STA.b $00
	LDA.w $611E
	CLC
	ADC.w $7CD8
	LSR
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E7
	JSL.l CODE_03B56E
	LDA.w #$0012
	STA.w $7AF8,x
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	RTL

;---------------------------------------------------------------------------

YI_NorSpr022_FlashingEgg_Main:
;$03B86E
	JSL.l CODE_03B75E
YI_NorSpr023_RedEgg_Main:
YI_NorSpr024_YellowEgg_Main:
YI_NorSpr025_GreenEgg_Main:
YI_NorSpr02A_RedGiantEgg_Main:
YI_NorSpr02B_GreenGiantEgg_Main:
;$03B872
	JSL.l CODE_03B9DD
CODE_03B876:
	LDA.b $78,x
	BEQ.b CODE_03B87D
	JMP.w CODE_03B96D

CODE_03B87D:
	LDA.w $7A36,x
	BPL.b CODE_03B883
CODE_03B882:
	RTL

CODE_03B883:
	LSR
	BEQ.b CODE_03B88E
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03B882
	JMP.w CODE_03B95E

CODE_03B88E:
	INC.b $16,x
	STZ.w $7402,x
	LDA.b $18,x
	BNE.b CODE_03B8FE
	LDY.w $7860,x
	BNE.b CODE_03B8DA
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
CODE_03B8A8:
	INC.b $18,x
	LDA.w $7042,x
	ORA.w #$0020
	STA.w $7042,x
	LDA.w $6FA0,x
	AND.w #$FFBF
	ORA.w #$0200
	STA.w $6FA0,x
	LDY.b #$01
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BCC.b CODE_03B8CB
	LDY.b #$1A
CODE_03B8CB:
	TYA
	STA.b $00
	LDA.w $6FA2,x
	AND.w #$FFC0
	ORA.b $00
	STA.w $6FA2,x
	RTL

CODE_03B8DA:
	LDA.w $7042,x
	AND.w #$00CF
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

DATA_03B8E4:
	db $01,$00,$01,$00,$02,$00,$02,$00,$04,$00,$04,$00,$08,$00,$08,$00

DATA_03B8F4:
	db $01,$01,$00,$00,$04,$04,$02,$02,$04,$04

CODE_03B8FE:
	LDA.w $7AF6,x
	BEQ.b CODE_03B92A
	LSR
	BNE.b CODE_03B90F
	TXY
	JSL.l CODE_03B4D6
	JML.l CODE_03A31E

CODE_03B90F:
	CMP.w #$0040
	BCS.b CODE_03B92A
	LSR
	LSR
	AND.w #$000E
	TAY
	LDA.w DATA_03B8E4,y
	LDY.b #$05
	AND.w $7AF6,x
	BEQ.b CODE_03B926
	LDY.b #$FF
CODE_03B926:
	TYA
	STA.w $74A2,x
CODE_03B92A:
	LDA.w $7860,x
	LSR
	BCS.b CODE_03B940
	LDA.w #$000A
	STA.w $7A98,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03B95E
	INC.w $7402,x
	BRA.b CODE_03B96C

CODE_03B940:
	JSL.l CODE_03A590
	LDY.w $7A98,x
	BEQ.b CODE_03B954
	LDA.w DATA_03B8F4,y
	AND.w #$00FF
	STA.w $7402,x
	BRA.b CODE_03B95E

CODE_03B954:
	LDA.b $16,x
	AND.w #$0010
	BEQ.b CODE_03B95E
	INC.w $7402,x
CODE_03B95E:
	LDY.w $7D36,x
	BPL.b CODE_03B96C
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_03B96C
	JSL.l CODE_03BEB9
CODE_03B96C:
	RTL

CODE_03B96D:
	JSL.l CODE_03BB1D
	STZ.w $7402,x
	LDA.w $0812,y
	AND.w #$FF00
	BEQ.b CODE_03B983
	BPL.b CODE_03B9BC
	INC.w $7402,x
	BRA.b CODE_03B9BC

CODE_03B983:
	LDA.w $6EBC
	SEC
	SBC.w $70E2,x
	STA.b $00
	ORA.w $60A8
	BEQ.b CODE_03B9AC
	LDA.b $16,x
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_03B78A,y
	BEQ.b CODE_03B9A0
	INC.w $7402,x
CODE_03B9A0:
	LDA.b $00
	BEQ.b CODE_03B9C3
	BPL.b CODE_03B9C6
	EOR.w #$FFFF
	INC
	BNE.b CODE_03B9C6
CODE_03B9AC:
	LDA.b $16,x
	CLC
	ADC.w #$0010
	STA.b $16,x
	AND.w #$0100
	BEQ.b CODE_03B9BC
	INC.w $7402,x
CODE_03B9BC:
	LDA.b $16,x
	AND.w #$000F
	BEQ.b CODE_03B9C6
CODE_03B9C3:
	LDA.w #$0001
CODE_03B9C6:
	SEP.b #$10
	CLC
	ADC.b $16,x
	STA.b $16,x
	AND.w #$000F
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_03B78A,y
	STA.w $7182,x
	RTL

;---------------------------------------------------------------------------

CODE_03B9DD:
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPY.b #$08
	BNE.b CODE_03BA43
	LDA.w $6152
	CLC
	ADC.w $6154
	CLC
	ADC.w #$0010
	CMP.w #$0021
	BCS.b CODE_03BA43
	STZ.w $6168
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $7D38,x
	STZ.w $7860,x
	STZ.w $7A96,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr027_Key
	BEQ.b CODE_03BA17
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
CODE_03BA17:
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$FBC0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7C16,x
	PHP
	BPL.b CODE_03BA2D
	EOR.w #$FFFF
	INC
CODE_03BA2D:
	CLC
	ADC.w #$0100
	PLP
	BMI.b CODE_03BA38
	EOR.w #$FFFF
	INC
CODE_03BA38:
	CLC
	ADC.w $60A8
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	PLA
	PLA
	RTL

CODE_03BA43:
	LDA.w $7D38,x
	BNE.b CODE_03BA57
	LDA.b $78,x
	DEC
	BMI.b CODE_03BA53
	LDA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	BNE.b CODE_03BA53
	RTL

CODE_03BA53:
	JML.l CODE_03AF23

CODE_03BA57:
	LDY.b #$34
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BCC.b CODE_03BA84
	LDA.w $7860,x
	LSR
	BCC.b CODE_03BA82
	LDA.w #$0060
	STA.w $61C6
	JSL.l CODE_0294B4
	JSL.l CODE_03B273
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	PLA
	PLY
	RTL

CODE_03BA82:
	LDY.b #$3A
CODE_03BA84:
	TYA
	STA.b $00
	LDA.w $6FA2,x
	AND.w #$FFC0
	ORA.b $00
	STA.w $6FA2,x
	LDA.w $6FA0,x
	ORA.w #$0600
	STA.w $6FA0,x
	LDY.w $7542,x
	CPY.b #$40
	BCS.b CODE_03BA53
	LDA.w $7A36,x
	DEC
	BNE.b CODE_03BAAC
	JSL.l CODE_03B133
CODE_03BAAC:
	LDY.w $77C0,x
	BNE.b CODE_03BADF
	LDA.w $7A96,x
	BNE.b CODE_03BAD0
	LDA.w $60B0
	CMP.w #$FFF8
	BMI.b CODE_03BAD6
	CMP.w #$00F8
	BPL.b CODE_03BAD6
	LDA.w $60B2
	CMP.w #$0000
	BMI.b CODE_03BAD6
	CMP.w #$00C0
	BPL.b CODE_03BAD6
CODE_03BAD0:
	JSL.l CODE_03CD07
	BRA.b CODE_03BADF

CODE_03BAD6:
	SEP.b #$20
	LDA.b #$01
	STA.w $77C0,x
	REP.b #$20
CODE_03BADF:
	LDA.b $14
	AND.w #$0001
	ORA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	BNE.b CODE_03BB19
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w $7042,x
	AND.w #$0030
	ORA.w #$0006
	STA.w $7002,y
	LDA.w #$0006
	STA.w $7462,y
	DEC
	STA.w $7E4C,y
	STA.w $73C2,y
	DEC
	STA.w $7782,y
CODE_03BB19:
	JML.l CODE_03AF23

;---------------------------------------------------------------------------

CODE_03BB1D:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b $78,x
	BMI.b CODE_03BB2A
	JMP.w CODE_03BDA1

CODE_03BB2A:
	PLA
	PLY
	STZ.w $7402,x
	LDA.w $0B57
	BNE.b CODE_03BB39
	LDY.w $60DE
	BNE.b CODE_03BB6B
CODE_03BB39:
	STZ.b $78,x
	INC.b $18,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr028_HuffinPuffin
	BNE.b CODE_03BB62
	LDA.w #$FFFF
	STA.b $18,x
	LDA.w $0B57
	BNE.b CODE_03BB5C
	LDA.b $10
	AND.w #$0003
	BNE.b CODE_03BB62
CODE_03BB5C:
	LDA.w #$0030
	STA.w $7AF6,x
CODE_03BB62:
	LDA.w $7FE8
	BPL.b CODE_03BB6A
	STZ.w $7FE8
CODE_03BB6A:
	RTL

CODE_03BB6B:
	CPY.b #$06
	BCS.b CODE_03BB89
	LDY.b #$00
	LDA.w $60E4
	SEC
	SBC.w $70E2,x
	BEQ.b CODE_03BB82
	BPL.b CODE_03BB7E
	LDY.b #$02
CODE_03BB7E:
	TYA
	STA.w $60C4
CODE_03BB82:
	LDY.w $60DE
	CPY.b #$02
	BEQ.b CODE_03BB8C
CODE_03BB89:
	JMP.w CODE_03BD2E

CODE_03BB8C:
	STZ.w $7A36,x
	STZ.b $78,x
	LDA.w #$0020
	STA.w $7D38,x
	LDA.w $60C4
	EOR.w #$0002
	STA.w $7400,x
	LDY.b #$34
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BCC.b CODE_03BBB4
	LDY.b #$3A
	LDA.w $7FE8
	BPL.b CODE_03BBB4
	STZ.w $7FE8
CODE_03BBB4:
	TYA
	STA.b $00
	LDA.w $6FA2,x
	AND.w #$FFC0
	ORA.b $00
	STA.w $6FA2,x
	STZ.b $18,x
	STZ.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BCC.b CODE_03BBE4
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$0D
	BEQ.b CODE_03BBE4
	LDA.w #$0060
	STA.w $7542,x
	LDA.w #$0600
	STA.w $75E2,x
	JMP.w CODE_03BCD9

CODE_03BBE4:
	STZ.w $7542,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr028_HuffinPuffin
	BNE.b CODE_03BC53
	LDA.w $70E2,x
	SEC
	SBC.w $60E4
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	SEC
	SBC.w $60E6
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $7400,x
	BNE.b CODE_03BC1A
	EOR.w #$00FF
	INC
CODE_03BC1A:
	SEC
	SBC.w #$0018
	AND.w #$01FE
	PHA
	LDY.w $7400,x
	BEQ.b CODE_03BC2A
	ORA.w #$8000
CODE_03BC2A:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$10
	PLX
	LDA.l DATA_00E9D4,x
	ASL
	ASL
	ASL
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_00E954,x
	ASL
	ASL
	ASL
	SEP.b #$10
	LDX.b $12
	LDY.w $7400,x
	BNE.b CODE_03BC4E
	EOR.w #$FFFF
	INC
CODE_03BC4E:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BRA.b CODE_03BCBB

CODE_03BC53:
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BNE.b CODE_03BC92
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$000C
	STA.w $7542,x
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w #$0060
	STA.w $6FA0,x
	LDA.w #$2000
	STA.w $6FA2,x
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w $60E4
	SEC
	SBC.w $70E2,x
	BPL.b CODE_03BC92
	EOR.w #$FFFF
	SEC
	ADC.w $70E2,x
	STA.w $60E4
CODE_03BC92:
	LDA.w $60E4
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $60E6
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$07F0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_03BCBB:
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.b #$01
	STA.w $77C0,x
	REP.b #$20
	STZ.w $7A96,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BRA.b CODE_03BD27

CODE_03BCD9:
	LDA.w $60E4
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $60E6
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0400
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w $60A8
	ASL
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BCS.b CODE_03BD11
	ADC.w $60A8
CODE_03BD11:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w #$0300
	BPL.b CODE_03BD20
	LDA.w #$0000
CODE_03BD20:
	SEC
	SBC.w #$0100
	ADC.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
CODE_03BD27:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $60E0
	RTL

CODE_03BD2E:
	CPY.b #$06
	BNE.b CODE_03BD40
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BCC.b CODE_03BD40
	LDA.w #$FFFF
	STA.w $7FE8
CODE_03BD40:
	PHB
	PHK
	PLB
	REP.b #$10
	LDY.w $60BE
	LDA.w DATA_03FCE9,y
	AND.w #$FF00
	BPL.b CODE_03BD53
	ORA.w #$00FF
CODE_03BD53:
	XBA
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7182,x
	LDA.w #$0002
	STA.w $74A2,x
	LDA.w DATA_03FAE5,y
	AND.w #$BF00
	BPL.b CODE_03BD6C
	ORA.w #$40FF
CODE_03BD6C:
	XBA
	LDY.w $60C4
	BNE.b CODE_03BD76
	EOR.w #$FFFF
	INC
CODE_03BD76:
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
	SEP.b #$10
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_03BD81:
	dw $0010,$000D,$000B,$0009,$0008,$0007,$0007,$0006
	dw $0006,$0006,$0007,$0007,$0008,$0009,$000B,$000D

CODE_03BDA1:
	PHB
	PHK
	PLB
	LDA.w $61B8
	BEQ.b CODE_03BDAB
	LDY.b #$00
CODE_03BDAB:
	LDA.w DATA_03B778,y
	STA.b $00
	LDY.b #$00
	CMP.b $76,x
	BEQ.b CODE_03BE1D
	BPL.b CODE_03BDBA
	INY
	INY
CODE_03BDBA:
	LDA.b $76,x
	CLC
	ADC.w DATA_03B786,y
	CMP.w #$0004
	BPL.b CODE_03BDF9
	STA.b $76,x
	DEC
	DEC
	EOR.w #$FFFF
	INC
	CMP.w #$0040
	BCS.b CODE_03BDD5
	JMP.w CODE_03BE48

CODE_03BDD5:
	TAY
	LDA.w DATA_03BD81-$40,y
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7182,x
	LDA.w #$0060
	CLC
	ADC.b $76,x
	LSR
	LDY.w $7400,x
	BNE.b CODE_03BDF0
	EOR.w #$FFFF
	INC
CODE_03BDF0:
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
	PLB
	RTL

CODE_03BDF9:
	CPY.b #$00
	BNE.b CODE_03BE1B
	STA.b $00
	LDA.w $05C0
	SBC.b $00
	BPL.b CODE_03BE0A
	CLC
	ADC.w #$0128
CODE_03BE0A:
	REP.b #$10
	TAY
	LDA.w $0813,y
	AND.w #$00FF
	BNE.b CODE_03BE1D
	LDA.b $00
	STA.b $76,x
	BRA.b CODE_03BE2C

CODE_03BE1B:
	STA.b $76,x
CODE_03BE1D:
	LDA.w $05C0
	SEC
	SBC.b $76,x
	BPL.b CODE_03BE29
	CLC
	ADC.w #$0128
CODE_03BE29:
	REP.b #$10
	TAY
CODE_03BE2C:
	PLB
	LDA.w $05C2,y
	STA.w $70E2,x
	LDA.w $06EA,y
	STA.w $7182,x
	LDA.w $7042,x
	AND.w #$00CF
	ORA.w $0812,y
	STA.w $7042,x
	SEP.b #$10
	RTL

CODE_03BE48:
	ASL
	ASL
	STA.b $02
	LDA.w #$0100
	SEC
	SBC.b $02
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0100
	BCC.b CODE_03BE5E
	LDA.b $00
	STA.b $76,x
CODE_03BE5E:
	LDA.w $05C0
	SEC
	SBC.b $00
	BPL.b CODE_03BE6A
	CLC
	ADC.w #$0128
CODE_03BE6A:
	REP.b #$10
	TAY
	LDA.w $05C2,y
	SEC
	SBC.w $70E2,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $06EA,y
	SEC
	SBC.w $7182,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $70E2,x
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $70E2,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7182,x
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7182,x
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_03BEB5:
	dw $0100,$FF00

CODE_03BEB9:
	JSL.l CODE_0CF957
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	LDA.w $7DF6
	INC
	INC
	CMP.w #$000E
	BCC.b CODE_03BF15
	PHB
	PHK
	PLB
	LDX.w $7DF8
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.b $78,x
	STZ.b $18,x
	STZ.b $76,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	STZ.w $7D38,x
	LDY.w $77C2,x
	LDA.w DATA_03BEB5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	PLB
	LDY.b #$02
CODE_03BF01:
	LDA.w $7DF8,y
	STA.w $7DF6,y
	TAX
	TYA
	STA.b $78,x
	INY
	INY
	CPY.w $7DF6
	BCC.b CODE_03BF01
	LDX.b $12
	TYA
CODE_03BF15:
	STA.w $7DF6
	REP.b #$10
	TAY
	CPY.w #$0004
	BCC.b CODE_03BF40
CODE_03BF20:
	LDX.w $7DF4,y
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr027_Key
	BEQ.b CODE_03BF30
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BNE.b CODE_03BF3E
CODE_03BF30:
	TYA
	STA.b $78,x
	TXA
	STA.w $7DF6,y
	DEY
	DEY
	CPY.w #$0004
	BCS.b CODE_03BF20
CODE_03BF3E:
	LDX.b $12
CODE_03BF40:
	TYA
	SEP.b #$10
	STA.b $78,x
	LDA.w #$0002
	STA.b $76,x
	LDA.b $12
	STA.w $7DF6,y
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w $6FA0,x
	AND.w #$F9FF
	ORA.w #$0040
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.b #$0D
	BNE.b CODE_03BF6B
	ORA.w #$0200
CODE_03BF6B:
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFC0
	STA.w $6FA2,x
	LDA.w #$0005
	STA.w $74A2,x
	STZ.w $7AF6,x
	STZ.w $7542,x
	STZ.w $7D38,x
	RTL

;---------------------------------------------------------------------------

CODE_03BF87:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BEQ.b CODE_03BFF6
	BMI.b CODE_03BFF6
CODE_03BF8E:
	PHP
	SEP.b #$10
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr028_HuffinPuffin
	BEQ.b CODE_03BFB4
	LDA.w $6FA0,x
	AND.w #$FFBF
	ORA.w #$0200
	STA.w $6FA0,x
CODE_03BFB4:
	PHY
	LDY.b #$01
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BCC.b CODE_03BFC1
	LDY.b #$1A
CODE_03BFC1:
	TYA
	STA.b $00
	LDA.w $6FA2,x
	AND.w #$FFC0
	ORA.b $00
	STA.w $6FA2,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	PLY
	PHX
CODE_03BFDA:
	CPY.w $7DF6
	BCS.b CODE_03BFEE
	LDA.w $7DF8,y
	STA.w $7DF6,y
	TAX
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	INY
	INY
	BRA.b CODE_03BFDA

CODE_03BFEE:
	DEC.w $7DF6
	DEC.w $7DF6
	PLX
	PLP
CODE_03BFF6:
	RTL

;---------------------------------------------------------------------------

CODE_03BFF7:
	PHX
CODE_03BFF8:
	LDY.w $7DF6
	BEQ.b CODE_03C03E
	LDX.w $7DF8
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr027_Key
	BEQ.b CODE_03C03E
	CMP.w #!Define_YI_NorSpr029_GiantEgg
	BEQ.b CODE_03C03E
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	JSL.l CODE_03BF8E
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	LDA.w #$0200
	STA.w $7AF6,x
	BRA.b CODE_03BFF8

CODE_03C03E:
	PLX
	RTL

;---------------------------------------------------------------------------

CODE_03C040:
	JSL.l CODE_03A31E
	JSL.l CODE_03BF87
	LDA.w $70E2,x
	STA.w $7960
	LDA.w $7182,x
	STA.w $7962
	LDA.w $7042,x
	AND.w #$000E
	STA.w $7964
	LDA.w #!Define_YI_AmbSpr1BE
	JSL.l CODE_008B21
	LDA.w $7960
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w $7962
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7782,y
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0B5_HiddenWingedCloud_Init:
;$03C07F
	JSL.l CODE_03D406
	RTL

;---------------------------------------------------------------------------

DATA_03C084:
	dw !Define_YI_NorSpr0BE_WingedCloudWith1up
	dw !Define_YI_NorSpr0C1_WingedCloudWith5Stars
	dw !Define_YI_NorSpr0CC_WingedCloudWithRedSwitch
	dw !Define_YI_NorSpr0C1_WingedCloudWith5Stars

YI_NorSpr0B5_HiddenWingedCloud_Main:
;$03C08C
	LDA.w !EXRAM_YI_Level_ShowHiddenItemsFlag|!EXRAMBankMirror
	BNE.b CODE_03C0CC
	LDY.w $7D36,x
	BMI.b CODE_03C0CC
	DEY
	BMI.b CODE_03C0FC
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03C0FC
	LDA.w $7D38,y
	BNE.b CODE_03C0B3
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr018_WatermelonFlame
	BEQ.b CODE_03C0B3
	CMP.w #!Define_YI_NorSpr006_WatermelonFreeze
	BNE.b CODE_03C0FC
CODE_03C0B3:
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	CMP.w #$0101
	BCS.b CODE_03C0FC
	LDA.w $7682,x
	CMP.w #$00CC
	BCS.b CODE_03C0FC
	TYX
	JSL.l CODE_03B25B
CODE_03C0CC:
	LDA.w #!Define_YI_SoundID27_CollectSuperStar
	JSL.l CODE_0085D2
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.w #$0010
	ORA.b $00
	LSR
	LSR
	TAY
	LDA.w DATA_03C084,y
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	INC.w $77C0,x
	JSL.l CODE_03B50B
CODE_03C0FC:
	RTL

;---------------------------------------------------------------------------

DATA_03C0FD:
	db $FF,$00,$FF,$00,$FF,$00,$FF,$00,$00,$00,$FF,$00,$00,$00,$08,$08
	db $08,$08,$08,$08,$FF,$FF,$FF,$FF,$FF,$FF,$08,$08,$FF,$FF,$FF,$FF
	db $FF,$FF,$08,$08,$FF,$FF,$FF,$FF,$FF,$FF,$08,$08,$08,$08,$08,$08
	db $FF,$FF,$FF,$FF,$08,$08,$00,$00,$FF,$FF,$FF

DATA_03C138:
	db $00,$04,$04,$04,$04,$04,$04,$04,$04,$00,$00,$04,$04,$00,$00,$04
	db $04,$04,$04,$04,$04,$04,$04,$08,$08,$08,$08,$04,$04,$04,$04,$04
	db $04,$08,$08,$04,$04,$FF,$FF,$08,$08,$04,$04,$04,$04,$04,$04,$04
	db $04,$08,$08,$08,$08,$04,$04,$00,$00,$04,$04,$04,$04

DATA_03C175:
	dw $FF80,$0080

YI_NorSpr0B6_WingedCloudWith8Coins_Init:
YI_NorSpr0B7_WingedCloudWithBubbled1up_Init:
YI_NorSpr0B8_WingedCloudWithFlower_Init:
YI_NorSpr0BD_WingedCloudWithCoin_Init:
YI_NorSpr0BF_WingedCloudWithKey_Init:
YI_NorSpr0C0_WingedCloudWith3Stars_Init:
YI_NorSpr0C1_WingedCloudWith5Stars_Init:
YI_NorSpr0CC_WingedCloudWithRedSwitch_Init:
;$03C179
	JSL.l CODE_03D406
	JSL.l CODE_03C236
	BRA.b CODE_03C1C0

YI_NorSpr0AF_CarMorphBubble_Init:
YI_NorSpr0B0_MoleMorphBubble_Init:
YI_NorSpr0B1_HelicopterMorphBubble_Init:
YI_NorSpr0B2_TrainMorphBubble_Init:
YI_NorSpr0B4_SubmarineMorphBubble_Init:
;$$03C183
	JSL.l CODE_03C236
	LDA.w $7182,x
	AND.w #$0010
	BEQ.b CODE_03C1C4
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_03C1B2
	INC.w $7A38,x
	LDA.w #$00FF
	STA.w $74A2,x
	BRA.b CODE_03C1C4

YI_NorSpr0BE_WingedCloudWith1up_Init:
	JSL.l CODE_03D406
	JSL.l CODE_03C236
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_03C1C4
CODE_03C1B2:
	LDY.w $7400,x
	LDA.w DATA_03C175,y
	STA.w $75E0,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_03C1C4

YI_NorSpr0B9_WingedCloudWithPOW_Init:
YI_NorSpr0BA_WingedCloudWithStairs_Init:
YI_NorSpr0BB_WingedCloudWithPlatform_Init:
YI_NorSpr0BC_WingedCloudWithBandit_Init:
YI_NorSpr0C2_WingedCloudWithDoor_Init:
YI_NorSpr0C3_WingedCloudWithLowerGround_Init:
YI_NorSpr0C4_WingedCloudWithWatermelon_Init:
YI_NorSpr0C5_WingedCloudWithFireWatermelon_Init:
YI_NorSpr0C6_WingedCloudWithIcyWatermelon_Init:
YI_NorSpr0C7_WingedCloudWith3LeafSunflower_Init:
YI_NorSpr0C8_WingedCloudWith6LeafSunflower_Init:
YI_NorSpr0C9_WingedCloudWithCrashGameFeature_Init:
CODE_03C1C0:
	JSL.l CODE_03C236
YI_NorSpr0CB_WingedCloudWithCoinOrStar_Init:
CODE_03C1C4:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0AF_CarMorphBubble
	ASL
	STA.b $00
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	ORA.b $00
	TAY
	LDA.w DATA_03C0FD-$01,y
	BMI.b CODE_03C207
	XBA
	AND.w #$00FF
	BNE.b CODE_03C1FB
	JSR.w CODE_03C271
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.b $18,x
	JML.l CODE_03C476

CODE_03C1FB:
	CLC
	ADC.w $70E2,x
	STA.b $78,x
	LDA.w #$0002
	STA.w $7540,x
CODE_03C207:
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	ORA.b $00
	TAY
	LDA.w DATA_03C138,y
	BMI.b CODE_03C22C
	XBA
	AND.w #$00FF
	CLC
	ADC.w $7182,x
	STA.b $76,x
	LDA.w #$0002
	STA.w $7542,x
CODE_03C22C:
	STZ.w $7400,x
	LDA.w #$0002
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

CODE_03C236:
	LDA.w $70E2,x
	AND.w #$FFF0
	ORA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	AND.w #$FFF0
	ORA.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0002
	BEQ.b CODE_03C26A
	LDY.b #$02
	JSL.l CODE_02D985
	PLY
	BRA.b CODE_03C2A5

CODE_03C26A:
	LDA.w #$0002
	STA.w $74A2,x
	RTL

CODE_03C271:
	LDY.w $0BF1
	BEQ.b CODE_03C285
	SEP.b #$20
	LDA.w $74A0,x
CODE_03C27B:
	CMP.w $0BF1,y
	BEQ.b CODE_03C29E
	DEY
	BNE.b CODE_03C27B
	REP.b #$20
CODE_03C285:
	LDY.b $18,x
	BEQ.b CODE_03C29D
	LDA.w $7A96,x
	BNE.b CODE_03C29A
	JSL.l CODE_02808C
	LDA.w #$0040
	STA.w $7A96,x
	BRA.b CODE_03C2A5

CODE_03C29A:
	DEC
	BNE.b CODE_03C2A5
CODE_03C29D:
	RTS

CODE_03C29E:
	REP.b #$20
	LDA.w #$0001
	STA.b $18,x
CODE_03C2A5:
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_03C2B3:
	dw $FF00,$0100

DATA_03C2B7:
	dw $FFFF,$0001

DATA_03C2BB:
	dw $0002,$0005

YI_NorSpr0AF_CarMorphBubble_Main:
YI_NorSpr0B0_MoleMorphBubble_Main:
YI_NorSpr0B1_HelicopterMorphBubble_Main:
YI_NorSpr0B2_TrainMorphBubble_Main:
YI_NorSpr0B4_SubmarineMorphBubble_Main:
YI_NorSpr0B6_WingedCloudWith8Coins_Main:
YI_NorSpr0B7_WingedCloudWithBubbled1up_Main:
YI_NorSpr0B8_WingedCloudWithFlower_Main:
YI_NorSpr0B9_WingedCloudWithPOW_Main:
YI_NorSpr0BA_WingedCloudWithStairs_Main:
YI_NorSpr0BB_WingedCloudWithPlatform_Main:
YI_NorSpr0BC_WingedCloudWithBandit_Main:
YI_NorSpr0BD_WingedCloudWithCoin_Main:
YI_NorSpr0BE_WingedCloudWith1up_Main:
YI_NorSpr0BF_WingedCloudWithKey_Main:
YI_NorSpr0C0_WingedCloudWith3Stars_Main:
YI_NorSpr0C1_WingedCloudWith5Stars_Main:
YI_NorSpr0C2_WingedCloudWithDoor_Main:
YI_NorSpr0C3_WingedCloudWithLowerGround_Main:
YI_NorSpr0C4_WingedCloudWithWatermelon_Main:
YI_NorSpr0C5_WingedCloudWithFireWatermelon_Main:
YI_NorSpr0C6_WingedCloudWithIcyWatermelon_Main:
YI_NorSpr0C7_WingedCloudWith3LeafSunflower_Main:
YI_NorSpr0C8_WingedCloudWith6LeafSunflower_Main:
YI_NorSpr0C9_WingedCloudWithCrashGameFeature_Main:
YI_NorSpr0CB_WingedCloudWithCoinOrStar_Main:
YI_NorSpr0CC_WingedCloudWithRedSwitch_Main:
;$03C2BF
	LDA.b $18,x
	BEQ.b CODE_03C2C6
	JMP.w CODE_03C3DF

CODE_03C2C6:
	STZ.w $7400,x
	LDA.w $7A38,x
	BEQ.b CODE_03C2DE
	LDY.b #$02
	JSL.l CODE_02D985
	LDY.b #$FF
	BCC.b CODE_03C2DA
	LDY.b #$02
CODE_03C2DA:
	TYA
	STA.w $74A2,x
CODE_03C2DE:
	LDY.w $77C0,x
	BEQ.b CODE_03C2F3
	LDY.b #$02
	LDA.w $0030
	AND.w #$0001
	BEQ.b CODE_03C2EF
	LDY.b #$FF
CODE_03C2EF:
	TYA
	STA.w $74A2,x
CODE_03C2F3:
	JSL.l CODE_03AF23
	LDA.b $76,x
	BEQ.b CODE_03C30A
	LDY.b #$00
	CMP.w $7182,x
	BMI.b CODE_03C304
	LDY.b #$02
CODE_03C304:
	LDA.w DATA_03C2B3,y
	STA.w $75E2,x
CODE_03C30A:
	LDA.b $78,x
	BEQ.b CODE_03C31F
	LDY.b #$00
	LDA.b $78,x
	CMP.w $70E2,x
	BMI.b CODE_03C319
	LDY.b #$02
CODE_03C319:
	LDA.w DATA_03C2B3,y
	STA.w $75E0,x
CODE_03C31F:
	JSR.w CODE_03C4F1
	LDA.w $7A38,x
	BNE.b CODE_03C32D
	LDY.w $7D36,x
	DEY
	BPL.b CODE_03C32E
CODE_03C32D:
	RTL

CODE_03C32E:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03C32D
	LDA.w $7D38,y
	BNE.b CODE_03C348
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr018_WatermelonFlame
	BEQ.b CODE_03C348
	CMP.w #!Define_YI_NorSpr006_WatermelonFreeze
	BNE.b CODE_03C32D
CODE_03C348:
	LDA.w $7680,x
	CLC
	ADC.w #$0018
	CMP.w #$0121
	BCS.b CODE_03C32D
	LDA.w $7682,x
	CLC
	ADC.w #$0010
	CMP.w #$00F1
	BCC.b CODE_03C363
	JMP.w CODE_03C3DE

CODE_03C363:
	TYX
	LDA.w #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_03B212
	JSL.l CODE_03B25B
	LDA.w #$0002
	STA.w $74A2,x
	JSL.l CODE_03CC6B
	STZ.w $7E36
	STZ.w $7E38
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0BA_WingedCloudWithStairs
	LSR
	BEQ.b CODE_03C398
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $75E2,x
	JSL.l CODE_03C48B
	BRA.b CODE_03C3CF

CODE_03C398:
	LDA.w $7040,x
	SEC
	SBC.w #$2001
	STA.w $7040,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$0010
	EOR.w #$0010
	BNE.b CODE_03C3B9
	LDA.w #$FFF0
CODE_03C3B9:
	STA.b $76,x
CODE_03C3BB:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	INC.b $18,x
CODE_03C3CF:
	LDA.w #$0002
	STA.w $74A2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $75E0,x
	STZ.w $7540,x
CODE_03C3DE:
	RTL

CODE_03C3DF:
	DEC
	BNE.b CODE_03C42D
	JSL.l CODE_03AF23
	JSL.l CODE_03CC6B
	JSR.w CODE_03C4F1
	LDA.w $7860,x
	AND.w #$0001
	ORA.w $7862,x
	AND.w #$00FF
	BNE.b CODE_03C41E
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w $1DAE
	BNE.b CODE_03C42C
CODE_03C41E:
	LDA.w $7040,x
	CLC
	ADC.w #$2001
	STA.w $7040,x
	JSL.l CODE_03C48B
CODE_03C42C:
	RTL

CODE_03C42D:
	DEC
	BNE.b CODE_03C481
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	JSL.l CODE_03CC6B
	JSL.l CODE_03C4AE
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A38,x
	CLC
	ADC.w #$0018
	STA.w $7A38,x
	CMP.w #$0370
	BCC.b CODE_03C480
	JSL.l CODE_03AEFD
CODE_03C459:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	INC.b $18,x
	LDA.w #$0003
	STA.w $7402,x
	LDA.w $7040,x
	CLC
	ADC.w #$0800
	STA.w $7040,x
	JSL.l CODE_04849E
CODE_03C476:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	TAX
	JMP.w (DATA_03C51A-!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys,x)

CODE_03C480:
	RTL

CODE_03C481:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	TAX
	JMP.w (DATA_03C8ED-!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys,x)

CODE_03C48B:
	LDA.w #$0002
	STA.b $18,x
	JSL.l CODE_03AD74
	BCS.b CODE_03C49B
	PLA
	PLY
	JMP.w CODE_03C459

CODE_03C49B:
	STZ.w $7402,x
	LDA.w $7040,x
	SEC
	SBC.w #$0800
	STA.w $7040,x
	LDA.w #$0100
	STA.w $7A38,x
CODE_03C4AE:
	LDA.w $7A38,x
	CMP.w #$01F0
	BCC.b CODE_03C4B9
	LDA.w #$01F0
CODE_03C4B9:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_550000+$70E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$70E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_0882F8>>16
	LDA.w #FXCODE_0882F8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

CODE_03C4F1:
	LDA.w $7A96,x
	BNE.b CODE_03C519
	LDY.w $7A36,x
	LDA.w $7402,x
	CMP.w DATA_03C2BB,y
	BNE.b CODE_03C50C
	TYA
	EOR.w #$0002
	STA.w $7A36,x
	TAY
	LDA.w $7402,x
CODE_03C50C:
	CLC
	ADC.w DATA_03C2B7,y
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_03C519:
	RTS

DATA_03C51A:
	dw CODE_03C562
	dw CODE_03C562
	dw CODE_03C562
	dw CODE_03C562
	dw $0000
	dw CODE_03C562
	dw $0000
	dw CODE_03C60B
	dw CODE_03C654
	dw CODE_03C681
	dw CODE_03C6A3
	dw CODE_03C6B6
	dw CODE_03C6B6
	dw CODE_03C6E3
	dw CODE_03C70B
	dw CODE_03C725
	dw CODE_03C735
	dw CODE_03C76C
	dw CODE_03C7F5
	dw CODE_03C7FB
	dw CODE_03C5E5
	dw CODE_03C81E
	dw CODE_03C81E
	dw CODE_03C81E
	dw CODE_03C83E
	dw CODE_03C83E
	dw $0000
	dw $0000
	dw CODE_03C8A4
	dw CODE_03C8C9

DATA_03C556:
	dw FXDATA_550000+$6061,FXDATA_550000+$6071,FXDATA_550000+$7061,FXDATA_550000+$7071,FXDATA_550000+$0000,FXDATA_550000+$70F0

CODE_03C562:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03AD24
	BCS.b CODE_03C570
	JML.l CODE_03A31E

CODE_03C570:
	LDA.w $7402,x
	STA.b $78,x
	BEQ.b CODE_03C57D
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_03C57D:
	LDA.w #$0007
	STA.w $7402,x
	STZ.w $7A36,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w #$0002
	STA.w $7542,x
	LDA.w #$FFC0
	STA.w $75E2,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0AF_CarMorphBubble
	ASL
	TAY
	LDA.w DATA_03C556,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$6061)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_088619>>16
	LDA.w #FXCODE_088619
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

CODE_03C5E5:
	LDX.b $12
	LDA.w $7680,x
	SEC
	SBC.w #$0080
	ASL
	LDA.w #$0000
	BCS.b CODE_03C5F7
	LDA.w #$0040
CODE_03C5F7:
	PHA
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	PLA
	SEC
	SBC.w #$0020
	STA.b $78,x
	LDA.w #$0090
	BRA.b CODE_03C616

CODE_03C60B:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03C640
	LDA.w #$0040
CODE_03C616:
	SEP.b #$10
	STA.w $7A96,x
	LDA.w $7182,x
	AND.w #$FFF0
	STA.w $7182,x
CODE_03C624:
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	STZ.w $7040,x
	LDA.w #$00FF
	STA.w $74A2,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_03C640:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JML.l CODE_03D3F3

DATA_03C64C:
	dw $FF80,$0080,$0110,$FFE0

CODE_03C654:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03A331
	LDA.w #!Define_YI_NorSpr100_Bubbled1up
	TXY
	JSL.l CODE_03A377
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7A36,x
	LDA.w #$0002
	LDY.w $03A3
	CPY.b #$03
	BEQ.b CODE_03C67D
	LDA.w #$0000
CODE_03C67D:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	RTL

CODE_03C681:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03A331
	LDY.b #$71
	JSL.l CODE_03C878
	LDA.w #!Define_YI_NorSpr110_Flower
	BCC.b CODE_03C697
	LDA.w #!Define_YI_NorSpr0FA_Flower
CODE_03C697:
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_03C6A3:
	SEP.b #$10
	LDX.b $12
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	JSL.l CODE_0294B4
	JML.l CODE_03A32E

CODE_03C6B6:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03C624
	LDA.w $7CD6,x
	STA.w $70E2,x
	LDA.w $7860,x
	LSR
	LDA.w $7182,x
	BCS.b CODE_03C6D0
	SBC.w #$0004
CODE_03C6D0:
	AND.w #$FFF0
	SEC
	SBC.w #$0010
	STA.w $7182,x
	LDA.w #$0060
	STA.w $7A96,x
	STZ.b $78,x
	RTL

CODE_03C6E3:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03A331
	LDA.w #!Define_YI_NorSpr020_Bandit
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$000C
	STA.b $76,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0017
	STA.w $7402,x
	RTL

CODE_03C70B:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03C640
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w $7182,x
	AND.w #$FFF0
	STA.w $7182,x
	JMP.w CODE_03C624

CODE_03C725:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03C640
	JSL.l CODE_03A496
	JML.l CODE_03A32E

CODE_03C735:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03A331
	LDA.w #!Define_YI_NorSpr027_Key
	TXY
	JSL.l CODE_03A377
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

DATA_03C74C:
	dw $0040,$FF00,$0080,$FF80,$00C0,$FF40,$0020,$FFE0

DATA_03C75C:
	dw $FE00,$FC00,$FC80,$FE80,$FD00,$FD80,$FF00,$FF80

CODE_03C76C:
	LDA.w #$0003
CODE_03C76F:
	STA.b $08
	LDA.w #!Define_YI_SoundID30_AppearingStars
	JSL.l CODE_0085D2
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03C640
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	JSL.l CODE_03A32E
	LDA.w !RAM_YI_Level_StarTimerLo
CODE_03C793:
	STA.b $04
	CMP.w #!Define_YI_Level_SoftMaxStarTimerThreshold
	LDA.w #$01A2
	BCC.b CODE_03C7A0
	LDA.w #$0115
CODE_03C7A0:
	JSL.l CODE_03A364
	BCC.b CODE_03C7F2
	LDA.w $0000
	STA.w $70E2,y
	LDA.w $0002
	STA.w $7182,y
	LDA.b $04
	CMP.w #$012C
	BCC.b CODE_03C7BE
	JSR.w CODE_03B40A
	BRA.b CODE_03C7C4

CODE_03C7BE:
	LDA.w #$0180
	STA.w $7A96,y
CODE_03C7C4:
	JSL.l CODE_008408
CODE_03C7C7:
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$000E
	TAX
	LDA.l DATA_03C74C,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	LSR
	LSR
	LSR
	LSR
	AND.w #$000E
	TAX
	LDA.l DATA_03C75C,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $04
	CLC
	ADC.w #$000A
	DEC.b $08
	BNE.b CODE_03C793
CODE_03C7F2:
	LDX.b $12
	RTL

CODE_03C7F5:
	LDA.w #$0005
	JMP.w CODE_03C76F

CODE_03C7FB:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03A331
	LDA.w #!Define_YI_NorSpr093_Door
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	RTL

DATA_03C818:
	dw !Define_YI_NorSpr007_Watermelon
	dw !Define_YI_NorSpr009_FireWatermelon
	dw !Define_YI_NorSpr005_IcyWatermelon

CODE_03C81E:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03A331
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0C4_WingedCloudWithWatermelon
	ASL
	TAY
	LDA.w DATA_03C818,y
	TXY
	JSL.l CODE_03A377
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JML.l CODE_048060

CODE_03C83E:
	SEP.b #$10
	LDX.b $12
	STZ.w $7402,x
	LDA.w $7040,x
	SEC
	SBC.w #$2001
	STA.w $7040,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w $7042,x
	ORA.w #$0002
	STA.w $7042,x
	LDA.w #$FFFC
	STA.w $7720,x
	LDY.b #$5C
	JSL.l CODE_03C878
	JSL.l CODE_03C3BB
	LDA.w #$0007
	STA.w $74A2,x
	RTL

CODE_03C878:
	SEP.b #$20
	TYA
	LDY.b #$06
CODE_03C87D:
	CMP.w $6EB5,y
	BEQ.b CODE_03C889
	DEY
	BNE.b CODE_03C87D
	SEC
	TYA
	BRA.b CODE_03C88E

CODE_03C889:
	TYA
	ADC.b #$06
	ASL
	ASL
CODE_03C88E:
	STA.w $7180,x
	REP.b #$20
	RTL

DATA_03C894:
	dw $0000,$0002,$0000,$0004,$0000,$0002,$0000,$0000

CODE_03C8A4:
	SEP.b #$10
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0007
	ASL
	TAY
	LDX.w DATA_03C894,y
	LDY.b $12
	JSR.w (DATA_03C8B8,x)
	TYX
	RTL

DATA_03C8B8:
	dw CODE_03B41D
	dw CODE_03B42F
	dw CODE_03C8BE

CODE_03C8BE:
	TYX
	JSL.l CODE_03A496
	JSL.l CODE_03A32E
	TXY
	RTS

CODE_03C8C9:
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_03C640
	JSL.l CODE_03A331
	LDA.w #!Define_YI_NorSpr09D_RedSwitch
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	RTL

DATA_03C8ED:
	dw CODE_03C92D
	dw CODE_03C92D
	dw CODE_03C92D
	dw CODE_03C92D
	dw $0000
	dw CODE_03C92D
	dw $0000
	dw CODE_03CAF8
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CB6B
	dw CODE_03CD4F
	dw CODE_03CB66
	dw CODE_03CDF2
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CE91
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CB66
	dw CODE_03CF58
	dw CODE_03CF58
	dw $0000
	dw $0000
	dw CODE_03CB66
	dw CODE_03CB66

DATA_03C929:
	db $07,$06,$08,$06

CODE_03C92D:
	LDX.b $12
	LDA.b $18,x
	CMP.w #$0003
	BEQ.b CODE_03C93B
	SEP.b #$10
	JMP.w CODE_03CA65

CODE_03C93B:
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	JSL.l CODE_03AA3C
	LDA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_03C94D
	RTL

CODE_03C94D:
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$0100
	BPL.b CODE_03C966
	LDA.w $7A36,x
	CLC
	ADC.w #$0020
	AND.w #$03FF
	STA.w $7A36,x
CODE_03C966:
	LDY.w $7A37,x
	LDA.w DATA_03C929,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_03C97D
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_03C97D:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E2,x
	BEQ.b CODE_03C98B
	EOR.w $75E2,x
	BMI.b CODE_03C995
CODE_03C98B:
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_03C995:
	LDA.b $14
	AND.w #$000F
	BNE.b CODE_03C9A3
	LDA.w #$0808
	JSL.l CODE_029BD9
CODE_03C9A3:
	LDA.w $7A96,x
	BNE.b CODE_03C9EC
	LDY.w $7D36,x
	BPL.b CODE_03C9EC
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0AE_HookbillTheKoopa
	ASL
	STA.w $0C88
	LDA.w $0C8A
	BEQ.b CODE_03C9D0
	CMP.w $0C88
	BNE.b CODE_03C9F1
	LDA.w #$0500
	STA.w $61F4
	TXY
	JSL.l CODE_03B4D6
	JMP.w CODE_03CA8B

CODE_03C9D0:
	LDA.w $61B2
	BPL.b CODE_03C9EC
	LDA.w $6150
	BEQ.b CODE_03C9ED
	LDA.w $6162
	BEQ.b CODE_03C9ED
	LDA.w !EXRAM_YI_Level_Player_AmmoTypeInMouthLo|!EXRAMBankMirror
	CMP.w #$0001
	BEQ.b CODE_03C9EC
	CMP.w #$0004
	BNE.b CODE_03C9ED
CODE_03C9EC:
	RTL

CODE_03C9ED:
	JSL.l CODE_04F74A
CODE_03C9F1:
	LDA.w #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_PlayerState10_Transforming
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $614E
	LDA.w #$0000
	STA.l $70336C
	LDA.w #$2D6C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$2F6C
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$65E9
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08BC98>>16
	LDA.w #FXCODE_08BC98
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w #$7FFF
	STA.l $703070
	LDX.w #$001C
CODE_03CA35:
	LDA.l DATA_5FCB2C,x
	STA.l $70310E,x
	DEX
	DEX
	BPL.b CODE_03CA35
	SEP.b #$10
	LDX.b $12
	LDA.w $0C8A
	BEQ.b CODE_03CA53
	LDA.w #$0003
	STA.w $614E
	JMP.w CODE_03CA8B

CODE_03CA53:
	INC.b $18,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #$0030
	STA.w $7A96,x
	STZ.w $614E
	RTL

CODE_03CA65:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03CA72
	LDY.w $614E
	BNE.b CODE_03CA73
	INC.w $614E
CODE_03CA72:
	RTL

CODE_03CA73:
	DEC.w $7A96,x
	BPL.b CODE_03CA8A
	INC.w $614E
	LDA.w #$0164
	STA.w $60BE
	LDA.w #FXDATA_520000+$B800
	STA.w $6114
	JMP.w CODE_03CA8B

CODE_03CA8A:
	RTL

CODE_03CA8B:
	LDA.b $78,x
	BNE.b CODE_03CAC4
	SEP.b #$20
	INC.w $0BF1
	LDY.w $0BF1
	LDA.w $74A0,x
	STA.w $0BF1,y
	REP.b #$20
	JSL.l CODE_03AF0D
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,x
	LDA.w #$00FF
	STA.w $74A2,x
	RTL

CODE_03CAC4:
	JML.l CODE_03A32E

DATA_03CAC8:
	dw !Define_YI_SoundID04_SpitOut,!Define_YI_SoundID0C_ShellHit2,!Define_YI_SoundID0D_ShellHit3,!Define_YI_SoundID0E_ShellHit4
	dw !Define_YI_SoundID0F_ShellHit5,!Define_YI_SoundID10_ShellHit6,!Define_YI_SoundID11_ShellHit7,!Define_YI_SoundID12_ShellHit8

DATA_03CAD8:
	dw $FFF0,$0020,$0010,$0000,$FFF0,$FFE0,$FFF0,$0000

DATA_03CAE8:
	dw $FFE0,$0000,$0010,$0020,$0010,$0000,$FFF0,$FFE0

CODE_03CAF8:
	SEP.b #$10
	LDX.b $12
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03CB09
	LDA.w $7A96,x
	BEQ.b CODE_03CB0A
	DEC.w $7A96,x
CODE_03CB09:
	RTL

CODE_03CB0A:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #$0004
	STA.w $7A96,x
	LDY.b $18,x
	LDA.w DATA_03CAC8-$03,y
	PHY
	JSL.l CODE_0085D2
	PLY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_03CAD8-$03,y
	STA.w $70E2,x
	STA.w $0091
	LDA.w $7182,x
	CLC
	ADC.w DATA_03CAE8-$03,y
	STA.w $7182,x
	STA.w $0093
	INY
	INY
	STY.b $18,x
	CPY.b #$13
	BCC.b CODE_03CB50
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	JSL.l CODE_03A32E
CODE_03CB50:
	LDA.w #$0005
	STA.w $008F
	LDA.w #$6000
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	JML.l CODE_0280AC

CODE_03CB66:
	SEP.b #$10
	LDX.b $12
CODE_03CB6A:
	RTL

CODE_03CB6B:
	SEP.b #$10
	LDX.b $12
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03CB6A
	LDA.b $18,x
	CMP.w #$0003
	BEQ.b CODE_03CB7E
	JMP.w CODE_03CD5F

CODE_03CB7E:
	LDA.w $7A96,x
	BEQ.b CODE_03CB92
	DEC.w $7A96,x
	CMP.w #$0010
	BCC.b CODE_03CB8F
	JML.l CODE_03CC6B

CODE_03CB8F:
	JMP.w CODE_03CC3C

CODE_03CB92:
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	JSR.w CODE_03CD3F
	BCS.b CODE_03CBCD
	LDA.w $70E2,x
	CLC
	ADC.b $76,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	JSR.w CODE_03CD3F
	BCC.b CODE_03CBD7
CODE_03CBCD:
	INC.b $18,x
	LDA.w #$0030
	STA.w $7A96,x
	BRA.b CODE_03CC3C

CODE_03CBD7:
	JSR.w CODE_03CD23
	LDA.w $70E2,x
	STA.w $0091
	LDA.w $7182,x
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$3D59
	LDY.b $77,x
	BPL.b CODE_03CBF6
	LDA.w #$3D5A
CODE_03CBF6:
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	LDA.w $0091
	CLC
	ADC.b $76,x
	STA.w $0091
	LDA.w #$6600
	LDY.b $77,x
	BPL.b CODE_03CC12
	LDA.w #$6700
CODE_03CC12:
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	LDA.w $70E2,x
	CLC
	ADC.b $76,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,x
	JSL.l CODE_0280AC
	LDA.w $7142,y
	CLC
	ADC.w #$0010
	STA.w $7142,y
CODE_03CC3C:
	LDA.w $7680,x
	SEC
	SBC.w #$0080
	ASL
	LDA.w #$FF00
	BCS.b CODE_03CC4C
	LDA.w #$0100
CODE_03CC4C:
	STA.w $7E36
	LDA.w $7682,x
	SEC
	SBC.w #$0060
	ASL
	LDA.w #$FF00
	BCS.b CODE_03CC5F
	LDA.w #$0100
CODE_03CC5F:
	STA.w $7E38
CODE_03CC62:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_03CC6B:
	LDA.w $7E2A
	BNE.b CODE_03CCBA
	LDA.w $0C1E
	ORA.w $0C20
	BEQ.b CODE_03CC79
	RTL

CODE_03CC79:
	LDA.w $7680,x
	SEC
	SBC.w #$0010
	CMP.w #$00D1
	BCS.b CODE_03CC91
	LDA.w $7682,x
	SEC
	SBC.w #$0010
	CMP.w #$00B1
	BCC.b CODE_03CD06
CODE_03CC91:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C94
	LDA.w !RAM_YI_Global_Layer1YPosLo
	STA.w $0C96
	SEP.b #$20
	LDY.b #$17
	LDX.b #$5C
CODE_03CCA3:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPX.b $12
	BNE.b CODE_03CCAC
	LDA.b #$00
CODE_03CCAC:
	STA.w $0C98,y
	DEX
	DEX
	DEX
	DEX
	DEY
	BPL.b CODE_03CCA3
	LDX.b $12
	REP.b #$20
CODE_03CCBA:
	LDA.w #$0001
	STA.w $7E2A
	STX.w $1E2C
	LDA.w $70E2,x
	STA.w $7E2E
	LDA.w $7182,x
	STA.w $7E30
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	LDA.w !RAM_YI_Global_Layer1YPosLo
	STA.w $0C27
	LDA.w $60B0
	CMP.w #$0008
	BMI.b CODE_03CCF5
	CMP.w #$00E8
	BPL.b CODE_03CCF5
	LDA.w $60B2
	CMP.w #$0010
	BMI.b CODE_03CCF5
	CMP.w #$00B0
	BMI.b CODE_03CD06
CODE_03CCF5:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w #$0002
	CMP.w $61D6
	BCC.b CODE_03CD06
	STA.w $61D6
CODE_03CD06:
	RTL

CODE_03CD07:
	LDA.w $7E2A
	BEQ.b CODE_03CD12
	CPX.w $1E2C
	BEQ.b CODE_03CD12
	RTL

CODE_03CD12:
	JSL.l CODE_03CC6B
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $7E36
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w $7E38
	RTL

CODE_03CD23:
	LDA.w #$0008
	STA.w $7A96,x
	LDA.b $78,x
	INC
	CMP.w #$0006
	BCC.b CODE_03CD34
	LDA.w #$0001
CODE_03CD34:
	STA.b $78,x
	CLC
	ADC.w #!Define_YI_SoundID4B_StairsAppearing1-$01
	JSL.l CODE_0085D2
	RTS

CODE_03CD3F:
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0000
	CLC
	BEQ.b CODE_03CD4E
	SBC.w #$96D0
	CMP.w #$0009
CODE_03CD4E:
	RTS

CODE_03CD4F:
	SEP.b #$10
	LDX.b $12
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03CD71
	LDA.b $18,x
	CMP.w #$0003
	BEQ.b CODE_03CD80
CODE_03CD5F:
	LDA.w $7A96,x
	BEQ.b CODE_03CD72
	DEC.w $7A96,x
	JSL.l CODE_03CC62
	STZ.w $7E36
	STZ.w $7E38
CODE_03CD71:
	RTL

CODE_03CD72:
	LDA.w $7E2A
	BNE.b CODE_03CD7D
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_03CD7D:
	JMP.w CODE_03A32E

CODE_03CD80:
	LDA.w $7A96,x
	BEQ.b CODE_03CD91
	DEC.w $7A96,x
	CMP.w #$0010
	BCC.b CODE_03CDEF
	JML.l CODE_03CC6B

CODE_03CD91:
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	JSR.w CODE_03CD3F
	BCC.b CODE_03CDB7
	INC.b $18,x
	LDA.w #$0030
	STA.w $7A96,x
	BRA.b CODE_03CDEF

CODE_03CDB7:
	JSR.w CODE_03CD23
	LDA.w $70E2,x
	STA.w $0091
	LDA.w $7182,x
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$1512
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	JSL.l CODE_0280AC
	LDA.w $7142,y
	SEC
	SBC.w #$0004
	STA.w $7142,y
	LDA.w $70E2,x
	CLC
	ADC.b $76,x
	STA.w $70E2,x
CODE_03CDEF:
	JMP.w CODE_03CC3C

CODE_03CDF2:
	SEP.b #$10
	LDX.b $12
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03CE03
	LDA.w $7A96,x
	BEQ.b CODE_03CE04
	DEC.w $7A96,x
CODE_03CE03:
	RTL

CODE_03CE04:
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
	LDA.w $70E2,x
	STA.w $0091
	LDA.w $7182,x
	STA.w $0093
	JSL.l CODE_03A32E
	LDA.w #$0005
	STA.w $008F
	LDA.w #$6000
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	JML.l CODE_0280AC

;---------------------------------------------------------------------------

DATA_03CE31:
	dw $0000,$0000,$0000,$0000,$0000,$1D24,$1D06,$1D08
	dw $1D06,$1D26,$1D28,$1D0A,$1D02,$1D0C,$1D2A,$1D12
	dw $1C5C,$1C5E,$1C5C,$1D14,$1D16,$1CD0,$1CB6,$1CD2
	dw $1D18,$0000,$1CD4,$1CBA,$1CD6,$0000,$1D12,$1C5C
	dw $1C5E,$1C5C,$1D14,$1D16,$1CD0,$1CB6,$1CD2,$1D18
	dw $1C5C,$1CFE,$1CBA

DATA_03CE87:
	dw $1D00,$1C5C,$1E00,$1E00,$3C00

CODE_03CE91:
	SEP.b #$10
	LDX.b $12
	LDA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_03CE9B
	RTL

CODE_03CE9B:
	LDA.w $7A96,x
	BEQ.b CODE_03CEAF
	DEC.w $7A96,x
	CMP.w #$0040
	BCC.b CODE_03CEAC
	JML.l CODE_03CC6B

CODE_03CEAC:
	JMP.w CODE_03CC3C

CODE_03CEAF:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w #$0010
	STA.w $61C6
	LDA.w $70E2,x
	SEC
	SBC.b $78,x
	STA.b $04
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $0093
	LDY.b $18,x
	INY
	CPY.b #$0A
	BCC.b CODE_03CEE7
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	JML.l CODE_03A32E

CODE_03CEE7:
	STY.b $18,x
	LDA.w DATA_03CE87,y
	TAY
	BNE.b CODE_03CEF9
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
CODE_03CEF9:
	PHY
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	PLY
	REP.b #$10
	LDA.w #$0003
	STA.b $00
CODE_03CF09:
	LDA.b $04
	STA.w $0091
	LDA.w #$0005
	STA.b $02
CODE_03CF13:
	LDA.w DATA_03CE31,y
	BEQ.b CODE_03CF1C
	TAX
	LDA.w $0000,x
CODE_03CF1C:
	STA.w $0095
	LDA.w #$0001
	STA.w $008F
	PHY
	JSL.l CODE_109295
	PLY
	LDA.w $0091
	CLC
	ADC.w #$0010
	STA.w $0091
	INY
	INY
	DEC.b $02
	BNE.b CODE_03CF13
	LDA.w $0093
	CLC
	ADC.w #$0010
	STA.w $0093
	DEC.b $00
	BNE.b CODE_03CF09
	SEP.b #$10
	LDX.b $12
	JMP.w CODE_03CC3C

;---------------------------------------------------------------------------

DATA_03CF50:
	dw $8802,$E802

DATA_03CF54:
	dw $0060,$00C0

CODE_03CF58:
	SEP.b #$10
	LDX.b $12
	LDA.b $18,x
	CMP.w #$0004
	BEQ.b CODE_03CF66
	JMP.w CODE_03CFDF

CODE_03CF66:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03CF81
	JSL.l CODE_03AF23
	JSL.l CODE_03CC6B
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_03CF82
	LDA.w #$0020
	STA.w $7A96,x
CODE_03CF81:
	RTL

CODE_03CF82:
	LDY.w $7A96,x
	BEQ.b CODE_03CFAB
	CPY.b #$10
	BCS.b CODE_03CFAA
	TYA
	AND.w #$0001
	EOR.w $70E2,x
	STA.w $70E2,x
	CPY.b #$04
	BNE.b CODE_03CFAA
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E7
	JSL.l CODE_03B56E
CODE_03CFAA:
	RTL

CODE_03CFAB:
	INC.b $18,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0C7_WingedCloudWith3LeafSunflower 
	ASL
	TAY
	LDA.w $7040,x
	CLC
	ADC.w DATA_03CF50,y
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w DATA_03CF54,y
	STA.b $16,x
	STZ.b $76,x
	STZ.b $78,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	STZ.w $7720,x
	RTL

CODE_03CFDF:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0998B6>>16
	LDA.w #FXCODE_0998B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03D02A
	LDA.b $18,x
	CMP.w #$0005
	BNE.b CODE_03D040
	LDA.w $7182,x
	PHA
	SEC
	SBC.b $76,x
	STA.w $7182,x
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $7682,x
	JSL.l CODE_03CC3C
	PLA
	STA.w $7182,x
	LDA.b $76,x
	CMP.b $16,x
	BCS.b CODE_03D02B
	INC.b $76,x
	SBC.w #$0015
	AND.w #$001F
	BNE.b CODE_03D02A
	LDA.w #!Define_YI_SoundID05_Powerup
	JSL.l CODE_0085D2
CODE_03D02A:
	RTL

CODE_03D02B:
	LDA.w $7A38,x
	CMP.w #$000F
	BCS.b CODE_03D037
	INC.w $7A38,x
	RTL

CODE_03D037:
	INC.b $18,x
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	RTL

CODE_03D040:
	JSL.l CODE_03AF23
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099B23>>16
	LDA.w #FXCODE_099B23
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $6000
	BEQ.b CODE_03D05A
	JSL.l CODE_0085D2
CODE_03D05A:
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

CODE_03D05D:
	STZ.b $0E
	LDY.w $7D36,x
	BMI.b CODE_03D066
	CLC
	RTL

CODE_03D066:
	LDA.w $6122
	CLC
	ADC.w $7BB8,x
	STA.b $00
	CLC
	ADC.w $7C18,x
	STA.b $08
	LDA.w $7C18,x
	SEC
	SBC.b $00
	STA.b $0A
	LDY.b #$00
	CLC
	ADC.b $08
	BMI.b CODE_03D086
	LDY.b #$02
CODE_03D086:
	STY.b $0C
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	STA.b $00
	CLC
	ADC.w $7C16,x
	STA.b $02
	LDA.w $7C16,x
	SEC
	SBC.b $00
	STA.b $04
	LDY.b #$00
	CLC
	ADC.b $02
	BMI.b CODE_03D0A8
	LDY.b #$02
CODE_03D0A8:
	STY.b $06
	LDA.w $7962,y
	BPL.b CODE_03D0B3
	EOR.w #$FFFF
	INC
CODE_03D0B3:
	STA.b $00
	LDY.b $0C
	LDA.w $7968,y
	BPL.b CODE_03D0C0
	EOR.w #$FFFF
	INC
CODE_03D0C0:
	CMP.b $00
	BCC.b CODE_03D0DD
	LDA.w $7968,y
	BMI.b CODE_03D0DA
	LDA.b $00
	CMP.w #$000A
	BCC.b CODE_03D0DA
	REP.b #$10
	JSL.l CODE_04AC9C
	SEP.b #$10
	BRA.b CODE_03D111

CODE_03D0DA:
	JMP.w CODE_03D208

CODE_03D0DD:
	LDA.w $7968,y
	BPL.b CODE_03D0E5
	JMP.w CODE_03D1C4

CODE_03D0E5:
	LDA.w $60C2
	BEQ.b CODE_03D0F4
	LDA.w $7968,y
	CLC
	ADC.w #$000C
	STA.w $7968,y
CODE_03D0F4:
	LDA.w $7968,y
	CMP.w #$000A
	BCC.b CODE_03D111
	CMP.w #$0012
	BCC.b CODE_03D10B
	REP.b #$10
	JSL.l CODE_04AC9C
	SEP.b #$10
	BRA.b CODE_03D111

CODE_03D10B:
	LDA.w #$0005
	STA.w $60C2
CODE_03D111:
	LDA.w $60C0
	BEQ.b CODE_03D120
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03D120:
	JMP.w CODE_03D1FB

;---------------------------------------------------------------------------

DATA_03D123:
	dw $0001,$FFFF

CODE_03D127:
	STZ.b $0E
CODE_03D129:
	LDY.w $7D36,x
	BMI.b CODE_03D130
	CLC
	RTL

CODE_03D130:
	LDA.w $6122
	CLC
	ADC.w $7BB8,x
	STA.b $00
	CLC
	ADC.w $7C18,x
	STA.b $08
	LDA.w $7C18,x
	SEC
	SBC.b $00
	STA.b $0A
	LDY.b #$00
	CLC
	ADC.b $08
	BMI.b CODE_03D150
	LDY.b #$02
CODE_03D150:
	STY.b $0C
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	STA.b $00
	CLC
	ADC.w $7C16,x
	STA.b $02
	LDA.w $7C16,x
	SEC
	SBC.b $00
	STA.b $04
	LDY.b #$00
	CLC
	ADC.b $02
	BMI.b CODE_03D172
	LDY.b #$02
CODE_03D172:
	STY.b $06
	LDA.w $7962,y
	BPL.b CODE_03D17D
	EOR.w #$FFFF
	INC
CODE_03D17D:
	STA.b $00
	LDY.b $0C
	LDA.w $7968,y
	BPL.b CODE_03D18A
	EOR.w #$FFFF
	INC
CODE_03D18A:
	CMP.b $00
	BCC.b CODE_03D191
	JMP.w CODE_03D208

CODE_03D191:
	LDA.w $7968,y
	BMI.b CODE_03D1C4
	LDA.w $60C2
	BEQ.b CODE_03D1A5
	LDA.w $7968,y
	CLC
	ADC.w #$000C
	STA.w $7968,y
CODE_03D1A5:
	LDA.w $7968,y
	CMP.w #$000A
	BCC.b CODE_03D1B3
	LDA.w #$0005
	STA.w $60C2
CODE_03D1B3:
	BRA.b CODE_03D1FB

CODE_03D1B5:
	LDA.w $7968,y
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60D2
	BRA.b CODE_03D1FB

CODE_03D1C4:
	CMP.w #$FFF5
	BMI.b CODE_03D208
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	SEC
	SBC.w $6EBE
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.w $60AB
	BMI.b CODE_03D22B
	LDA.w $70E2,x
	SEC
	SBC.w $6EBC
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	INC.w $61B4
	INC.b $0E
	LDA.w $60AA
	STA.b $0C
CODE_03D1FB:
	SEC
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03D204
	LDA.w #$0000
CODE_03D204:
	STA.w $60AA
	RTL

;---------------------------------------------------------------------------

CODE_03D208:
	LDX.b $06
	LDA.b $00
	LSR
	BEQ.b CODE_03D21A
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.l DATA_03D123,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_03D21A:
	LDA.w $60B4
	EOR.l DATA_03D123,x
	BPL.b CODE_03D229
	STZ.w $60A8
	STZ.w $60B4
CODE_03D229:
	LDX.b $12
CODE_03D22B:
	CLC
	RTL

;---------------------------------------------------------------------------

CODE_03D22D:
	LDY.w $7D36,x
	BMI.b CODE_03D233
CODE_03D232:
	RTL

CODE_03D233:
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF6
	BCC.b CODE_03D232
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	SEC
	SBC.w $6EBE
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.b $00
	CLC
	ADC.w $611E
	STA.w $611E
	LDY.w $60AB
	BMI.b CODE_03D232
	LDA.w $70E2,x
	SEC
	SBC.w $6EBC
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	INC.w $61B4
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_03D289
	LDA.w #$0000
CODE_03D289:
	STA.w $60AA
	RTL

;---------------------------------------------------------------------------

DATA_03D28D:
	dw $0001,$FFFF

CODE_03D291:
	STZ.b $0E
	LDA.w $61B2
	AND.w #$C000
	ORA.w $61CC
	BNE.b CODE_03D2D6
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6
	STA.b $00
	ASL
	STA.b $02
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6
	STA.b $04
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_03D2D6
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8
	STA.b $06
	ASL
	STA.b $08
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8
	STA.b $0A
	CLC
	ADC.b $06
	CMP.b $08
	BCC.b CODE_03D2D8
CODE_03D2D6:
	CLC
	RTL

CODE_03D2D8:
	LDA.b $0A
	CLC
	ADC.b $06
	STA.b $08
	LDA.b $0A
	SEC
	SBC.b $06
	STA.b $0A
	LDY.b #$00
	CLC
	ADC.b $08
	BMI.b CODE_03D2EF
	LDY.b #$02
CODE_03D2EF:
	STY.b $0C
	LDA.b $04
	CLC
	ADC.b $00
	STA.b $02
	LDA.b $04
	SEC
	SBC.b $00
	STA.b $04
	LDY.b #$00
	CLC
	ADC.b $02
	BMI.b CODE_03D308
	LDY.b #$02
CODE_03D308:
	STY.b $06
	LDA.w $7962,y
	BPL.b CODE_03D313
	EOR.w #$FFFF
	INC
CODE_03D313:
	STA.b $00
	LDY.b $0C
	LDA.w $7968,y
	BPL.b CODE_03D320
	EOR.w #$FFFF
	INC
CODE_03D320:
	CMP.b $00
	BCS.b CODE_03D339
	CMP.w #$0009
	BCS.b CODE_03D339
	LDA.w $7968,y
	PHP
	LDA.w #$0001
	PLP
	BMI.b CODE_03D334
	ASL
CODE_03D334:
	TSB.w $7860
	SEC
	RTL

CODE_03D339:
	LDX.b $06
	LDA.w $70E2
	CLC
	ADC.l DATA_03D28D,x
	STA.w $70E2
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	EOR.l DATA_03D28D,x
	BPL.b CODE_03D359
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_03D359:
	LDX.b $12
	CLC
	RTL

;---------------------------------------------------------------------------

CODE_03D35D:
	LDA.w $6122
	CLC
	ADC.w $7BB8,x
	STA.b $00
	CLC
	ADC.w $7C18,x
	STA.b $08
	LDA.w $7C18,x
	SEC
	SBC.b $00
	STA.b $0A
	LDY.b #$04
	CLC
	ADC.b $08
	BMI.b CODE_03D37D
	LDY.b #$06
CODE_03D37D:
	STY.b $0C
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	STA.b $00
	CLC
	ADC.w $7C16,x
	STA.b $02
	LDA.w $7C16,x
	SEC
	SBC.b $00
	STA.b $04
	LDY.b #$00
	CLC
	ADC.b $02
	BMI.b CODE_03D39F
	LDY.b #$02
CODE_03D39F:
	STY.b $06
	LDA.w $7962,y
	BPL.b CODE_03D3AA
	EOR.w #$FFFF
	INC
CODE_03D3AA:
	STA.b $00
	LDY.b $0C
	LDA.w $7964,y
	BPL.b CODE_03D3B7
	EOR.w #$FFFF
	INC
CODE_03D3B7:
	CMP.b $00
	BCS.b CODE_03D3C0
	CMP.w #$0008
	BCC.b CODE_03D3C2
CODE_03D3C0:
	LDY.b $06
CODE_03D3C2:
	RTL

;---------------------------------------------------------------------------

DATA_03D3C3:
	dw $03C0,$0440,$04C0,$0540

DATA_03D3CB:
	dw $8000,$4000,$2000,$1000,$0800,$0400,$0200,$0100
	dw $0080,$0040,$0020,$0010,$0008,$0004,$0002,$0001

CODE_03D3EB:
	LDA.w $70E2,x
	STA.b $04
	LDA.w $7182,x
CODE_03D3F3:
	STA.b $06
	SEC
	BRA.b CODE_03D415

CODE_03D3F8:
	LDA.w $70E2,x
	STA.b $04
	LDA.w $7182,x
CODE_03D400:
	STA.b $06
	LDY.b #$02
	BRA.b CODE_03D412

CODE_03D406:
	LDA.w $70E2,x
	STA.b $04
	LDA.w $7182,x
CODE_03D40E:
	STA.b $06
	LDY.b #$00
CODE_03D412:
	STY.b $0E
	CLC
CODE_03D415:
	PHP
	REP.b #$10
	PHX
	LDA.b $04
	AND.w #$00F0
	LSR
	LSR
	LSR
	TAX
	LDA.l DATA_03D3CB,x
	STA.b $0C
	PLX
	PHX
	LDA.w !RAM_YI_Level_LevelHeaderItemMemorySettingLo
	ASL
	TAY
	LDA.b $06
	AND.w #$0700
	LSR
	LSR
	LSR
	LSR
	STA.b $00
	LDA.b $05
	AND.w #$000F
	ORA.b $00
	TAX
	LDA.w $6CAA,x
	AND.w #$003F
	ASL
	TYX
	CLC
	ADC.l DATA_03D3C3,x
	STA.b $02
	LDA.b ($02)
	PLX
	SEP.b #$10
	PLP
	BCS.b CODE_03D46A
	AND.b $0C
	BEQ.b CODE_03D469
	LDY.b $0E
	BNE.b CODE_03D469
	JSL.l CODE_03A32E
	PLY
	PLA
	LDY.b #$02
CODE_03D469:
	RTL

CODE_03D46A:
	ORA.b $0C
	STA.b ($02)
	RTL

;---------------------------------------------------------------------------

DATA_03D46F:
	dw CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B
	dw CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B,CODE_03D55B
	dw CODE_03D83D,CODE_03D83D,CODE_03D83D,CODE_03D83D,CODE_03D83D,CODE_03D83D,CODE_03D83D,CODE_03D83D
	dw CODE_03D83D,CODE_03D83D,CODE_03D83D,CODE_03E3B1,CODE_03E2B5,CODE_03D9CA,CODE_03DA58,CODE_03DA5E
	dw CODE_03DA64,CODE_03DA6A,CODE_03DA70,CODE_03DB85,CODE_03DA70,CODE_03DB85,CODE_03DB8B,CODE_03DC2E
	dw CODE_03DC38,CODE_03DDA3,CODE_03DDB8,CODE_03DDBE,CODE_03DE5A,CODE_03DE60,CODE_03DF0C,CODE_03DF12
	dw CODE_03DFF0,CODE_03DFF6,CODE_03E0AD,CODE_03E0B3,CODE_03E124,CODE_03E142,CODE_03E1E2,CODE_03E2A1
	dw CODE_03E2A7,CODE_03E2C6

DATA_03D4E3:
	dw CODE_03E2CC,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615
	dw CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615,CODE_03D615
	dw CODE_03D615,CODE_03D8D7,CODE_03D8D7,CODE_03D8D7,CODE_03D8D7,CODE_03D8D7,CODE_03D8D7,CODE_03D8D7
	dw CODE_03D8D7,CODE_03D8D7,CODE_03D8D7,CODE_03D8D7,CODE_03A79B,CODE_03A79B,CODE_03D9E6,CODE_03A79B
	dw CODE_03A79B,CODE_03A79B,CODE_03A79B,CODE_03DA80,CODE_03A79B,CODE_03DAEB,CODE_03A79B,CODE_03DBB7
	dw CODE_03A79B,CODE_03DCEC,CODE_03A79B,CODE_03A79B,CODE_03DDDA,CODE_03A79B,CODE_03DE94,CODE_03A79B
	dw CODE_03DF2E,CODE_03A79B,CODE_03E002,CODE_03A79B,CODE_03E0BF,CODE_03A79B,CODE_03E190,CODE_03E1FB
	dw CODE_03A79B,CODE_03A79B,CODE_03A79B,CODE_03E30E

CODE_03D55B:
	LDA.w $7960
	LSR
	BCS.b CODE_03D57E
	LDA.w $0C04,y
	SEC
	SBC.w #$0001
	CMP.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	BNE.b CODE_03D570
	JMP.w CODE_03D62C

CODE_03D570:
	STA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	JSL.l CODE_03D5E4
	STZ.w $0C14
	STZ.w $0C16
	RTS

CODE_03D57E:
	LDA.w $0C04,y
	SEC
	SBC.w #$0001
	CMP.w !RAM_YI_Level_LevelHeaderBG1PaletteLo
	BEQ.b CODE_03D5E1
	STA.w !RAM_YI_Level_LevelHeaderBG1PaletteLo
	ASL
	TAX
	LDA.l DATA_00B874,x
	TAX
	PHY
	PHB
	PEA.w $702038>>8
	PLB
	PLB
	LDY.w #$001C
CODE_03D59E:
	LDA.l DATA_5FA01C,x
	STA.w $702082,y
	STA.w $702DEE,y
	LDA.l DATA_5FA03A,x
	STA.w $7020A2,y
	STA.w $702E0E,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_03D59E
	LDY.w #$0006
CODE_03D5BB:
	LDA.l DATA_5FA060,x
	STA.w $702038,y
	STA.w $702DA4,y
	LDA.l DATA_5FA068,x
	STA.w $702058,y
	STA.w $702DC4,y
	LDA.l DATA_5FA070,x
	STA.w $702078,y
	STA.w $702DE4,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_03D5BB
	PLB
	PLY
CODE_03D5E1:
	JMP.w CODE_03D62C

CODE_03D5E4:
	PHX
	PHY
	PHP
	REP.b #$20
	SEP.b #$10
	LDX.b #$5C
CODE_03D5ED:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BEQ.b CODE_03D5FF
	JSL.l CODE_03AF0D
	LDA.w $7402,x
	AND.w #$00FF
	STA.w $7402,x
CODE_03D5FF:
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_03D5ED
	LDA.w #$FFFF
	STA.w $7ECC
	PLP
	PLY
	PLX
	RTL

DATA_03D60F:
	dw $0000,$0800,$7000

CODE_03D615:
	PHY
	LDA.w #$0800
	STA.b $00
	LDA.w $0C16
	BNE.b CODE_03D66A
	LDA.w $0C14
	CMP.w #$0003
	BNE.b CODE_03D640
	PLY
	STZ.w $7ECC
CODE_03D62C:
	SEP.b #$30
	LDX.w $0C0C,y
	LDA.b #$00
	STA.l $7028CA,x
	REP.b #$30
CODE_03D639:
	LDA.w #$0000
	STA.w $0C04,y
	RTS

CODE_03D640:
	ASL
	TAX
	LDA.w DATA_03D60F,x
	STA.w $0C18
	LDA.w #$6800
	STA.w $0C1A
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	ASL
	ADC.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	ADC.w $0C14
	TAX
	LDA.l DATA_00AF39,x
	AND.w #$00FF
	JSL.l CODE_00B753
	STA.w $0C16
	INC.w $0C14
CODE_03D66A:
	SEC
	SBC.w #$0800
	BCS.b CODE_03D678
CODE_03D670:
	ADC.w #$0800
	STA.b $00
	LDA.w #$0000
CODE_03D678:
	STA.w $0C16
	LDX.w $0C1A
	TXA
	CLC
	ADC.b $00
	STA.w $0C1A
	LDA.w #$0070
	STA.w $0001
	LDY.w $0C18
	LDA.b $00
	JSL.l CODE_00BEA6
	LDA.b $00
	LSR
	CLC
	ADC.w $0C18
	STA.w $0C18
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_03D6A0:
	PHB
	PHK
	PLB
	LDA.w $0C1C
	ASL
	TAX
	JSR.w (DATA_03D4E3,x)
	PLB
	RTL

DATA_03D6AD:
	dw $0000,$000D,$0028,$008C,$00AF,$003E,$0090,$00BC
	dw $00F0,$00F7,$012E,$0138

DATA_03D6C5:
	dw $0020,$3004,$0400,$0040,$8004,$0400,$6EFF,$0660
	dw $6A63,$5B08,$086C,$6C3C,$1E06,$056C,$6916,$1005
	dw $0565,$600C,$0905,$0557,$4D0A,$1005,$0545,$361A
	dw $2105,$052D,$2B30,$4008,$062E,$2F50,$FF05,$300B
	dw $1308,$0836,$371B,$2308,$0839,$3B2A,$4108,$083D
	dw $3E4B,$6008,$084A,$5264,$6608,$085D,$616E,$7108
	dw $0867,$6D6E,$6408,$0870,$7054,$4B06,$0470,$6846
	dw $4104,$045E,$5341,$4304,$044D,$4B48,$5106,$084C
	dw $5161,$7008,$0855,$5882,$8B06,$0459,$59A0,$FF08
	dw $5C11,$1810,$185C,$5D1F,$2320,$1D5F,$6230,$5014
	dw $1269,$6A71,$8F12,$1264,$5FAA,$E012,$155F,$10FF
	dw $0570,$7040,$7007,$0970,$70A0,$FF0B,$501A,$2005
	dw $054E,$502C,$3905,$054E,$4A42,$4D05,$0549,$4858
	dw $6305,$054B,$4E6E,$7E05,$054A,$478A,$9505,$0544
	dw $43A2,$AE05,$0541,$3FB9,$C005,$053E,$3EE0,$FF05
	dw $2002,$0202,$0319,$CBFE,$065A,$5DC0,$B008,$085F
	dw $5DAA,$A608,$085F,$6C98,$8808,$086E,$6780,$7906
	dw $0860,$606B,$4B08,$085A,$5D40,$3008,$085F,$5D2A
	dw $2608,$085F,$6C18,$0808,$086E,$6700,$FE08,$6F20
	dw $8008,$086F,$6FD8,$FF08,$700C,$1408,$086E,$701E
	dw $2A08,$086A,$6A2E,$3B08,$0870,$7053,$710A,$0A70
	dw $708F,$9808,$0467,$5B8F,$9006,$032E,$2C94,$9D08
	dw $082C,$2CA6,$AD08,$0A2F,$36B6,$CA08,$0836,$3AD4
	dw $E204,$0843,$3FF0,$FF08

CODE_03D83D:
	LDA.w $0C1C
	BEQ.b CODE_03D845
	JMP.w CODE_03D639

CODE_03D845:
	LDA.w $0C04,y
	STA.w $0C1C
	STA.w $0C1E
	CMP.w #$001B
	BEQ.b CODE_03D85B
	CMP.w #$0011
	BEQ.b CODE_03D85B
	STA.w $0C20
CODE_03D85B:
	SEC
	SBC.w #$0011
	ASL
	TAX
	LDA.w DATA_03D6AD,x
	STA.w $0C2E
	JSR.w CODE_03D639
	LDA.w $6093
	AND.w #$FF00
	STA.w $0C22
	LDA.w $6095
	AND.w #$00FF
	STA.w $0C24
	LDA.w $609B
	AND.w #$FF00
	STA.w $0C26
	LDA.w $609D
	AND.w #$00FF
	STA.w $0C28
	STZ.w $0C2A
	STZ.w $0C2C
	LDX.w $0C2E
CODE_03D897:
	LDA.w DATA_03D6C5,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.w $0C30
	SEC
	SBC.w $0C23
	STA.w $0C36
	LDA.w DATA_03D6C5+$01,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.w #$001C
	STA.w $0C32
	SEC
	SBC.w $0C27
	STA.w $0C38
	LDA.w DATA_03D6C5+$01,x
	AND.w #$FF00
	BPL.b CODE_03D8CE
	ORA.w #$00FF
CODE_03D8CE:
	XBA
	ASL
	ASL
	ASL
	ASL
	STA.w $0C34
	RTS

;---------------------------------------------------------------------------

CODE_03D8D7:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03D93D
	JSR.w CODE_03D942
	LDA.w $0C23
	SEC
	SBC.w $0C30
	BEQ.b CODE_03D8F9
	EOR.w $0C36
	BMI.b CODE_03D8F9
	LDA.w $0C30
	STA.w $0C23
CODE_03D8F9:
	STA.w $0000
	LDA.w $0C27
	SEC
	SBC.w $0C32
	BEQ.b CODE_03D910
	EOR.w $0C38
	BMI.b CODE_03D910
	LDA.w $0C32
	STA.w $0C27
CODE_03D910:
	ORA.w $0000
	BMI.b CODE_03D93D
	LDX.w $0C2E
	LDA.w DATA_03D6C5+$03,x
	AND.w #$00FF
	CMP.w #$00FE
	BCS.b CODE_03D92C
	INX
	INX
	INX
	STX.w $0C2E
	JMP.w CODE_03D897

CODE_03D92C:
	BNE.b CODE_03D934
	STZ.w $0C1E
	STZ.w $0C20
CODE_03D934:
	STZ.w $0C1C
	STZ.w $0C2A
	STZ.w $0C2C
CODE_03D93D:
	RTS

;---------------------------------------------------------------------------

DATA_03D93E:
	dw $FFFF,$0001

CODE_03D942:
	LDA.w $0C30
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $0C32
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0C23
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $0C27
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $0C34
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEP.b #$10
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #$00
	LDA.w $0C2A
	CMP.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BEQ.b CODE_03D980
	BPL.b CODE_03D979
	LDX.b #$02
CODE_03D979:
	CLC
	ADC.w DATA_03D93E,x
	STA.w $0C2A
CODE_03D980:
	LDX.b #$00
	LDA.w $0C2C
	CMP.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BEQ.b CODE_03D995
	BPL.b CODE_03D98E
	LDX.b #$02
CODE_03D98E:
	CLC
	ADC.w DATA_03D93E,x
	STA.w $0C2C
CODE_03D995:
	REP.b #$10
CODE_03D997:
	LDX.w #$0000
	LDA.w $0C2A
	BPL.b CODE_03D9A0
	DEX
CODE_03D9A0:
	CLC
	ADC.w $0C22
	STA.w $0C22
	TXA
	ADC.w $0C24
	STA.w $0C24
	LDX.w #$0000
	LDA.w $0C2C
	BPL.b CODE_03D9B7
	DEX
CODE_03D9B7:
	CLC
	ADC.w $0C26
	STA.w $0C26
	TXA
	ADC.w $0C28
	STA.w $0C28
	RTS

;---------------------------------------------------------------------------

CODE_03D9C6:
	JSR.w CODE_03D997
	RTL

;---------------------------------------------------------------------------

CODE_03D9CA:
	LDA.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
	BEQ.b CODE_03D9D2
	JMP.w CODE_03D62C

CODE_03D9D2:
	INC.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
	RTS

;---------------------------------------------------------------------------

DATA_03D9D6:
	dw $0110,$FFE0

DATA_03D9DA:
	dw $FE00,$0200,$FD00,$0300

DATA_03D9E2:
	dw $0004,$0006

CODE_03D9E6:
	LDA.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
	BNE.b CODE_03D9EE
	JMP.w CODE_03D62C

CODE_03D9EE:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03DA57
	LDA.w $0CD2
	BNE.b CODE_03DA57
	LDA.w #$0030
	STA.w $0CD2
	SEP.b #$10
	PHY
	LDA.w #$00E6
	JSL.l CODE_03A364
	BCC.b CODE_03DA54
	LDA.b $10
	AND.w #$001E
	ASL
	ASL
	ASL
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$001B
	STA.w $7182,y
	LDA.b $10
	AND.w #$0001
	ASL
	STA.w $7400,y
	STA.b $00
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03D9D6,x
	STA.w $70E2,y
	LDA.b $10
	AND.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	TAX
	LDA.w DATA_03D9E2,x
	STA.w $7540,y
	TXA
	ASL
	CLC
	ADC.b $00
	TAX
	LDA.w DATA_03D9DA,x
	STA.w $75E0,y
CODE_03DA54:
	PLY
	REP.b #$10
CODE_03DA57:
	RTS

;---------------------------------------------------------------------------

CODE_03DA58:
	STZ.w !RAM_YI_Level_NorSpr_GustyGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DA5E:
	STZ.w !RAM_YI_Level_NorSpr_LakituActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DA64:
	STZ.w !RAM_YI_Level_NorSpr_FuzzyGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DA6A:
	STZ.w !RAM_YI_Level_NorSpr_PoochyExistsFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DA70:
	LDA.w !RAM_YI_Level_NorSpr_BatGeneratorActiveFlagLo
	BEQ.b CODE_03DA78
	JMP.w CODE_03D62C

CODE_03DA78:
	INC.w !RAM_YI_Level_NorSpr_BatGeneratorActiveFlagLo
	RTS

;---------------------------------------------------------------------------

DATA_03DA7C:
	dw $0110,$FFE0

CODE_03DA80:
	LDA.w !RAM_YI_Level_NorSpr_BatGeneratorActiveFlagLo
	BNE.b CODE_03DA88
	JMP.w CODE_03D62C

CODE_03DA88:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03DAEA
	LDA.w $0CD4
	BNE.b CODE_03DAEA
	LDA.w !RAM_YI_Level_NorSpr_SpawnedBatGeneratorBatsLo
	CMP.w #$0003
	BCS.b CODE_03DAEA
	LDA.w #$0030
	STA.w $0CD4
	SEP.b #$10
	PHY
	LDA.w #$013E
	JSL.l CODE_03A364
	BCC.b CODE_03DAE7
	INC.w !RAM_YI_Level_NorSpr_SpawnedBatGeneratorBatsLo
	LDA.b $10
	AND.w #$000E
	ASL
	ASL
	ASL
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0030
	STA.w $7182,y
	LDA.w $0073
	STA.w $7400,y
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03DA7C,x
	STA.w $70E2,y
	PHB
	LDX.b #DATA_07B1A6>>16
	PHX
	PLB
	TYX
	JSL.l CODE_07B1B6
	PLB
	INC.w $7A36,x
CODE_03DAE7:
	PLY
	REP.b #$10
CODE_03DAEA:
	RTS

;---------------------------------------------------------------------------

CODE_03DAEB:
	LDA.w !RAM_YI_Level_NorSpr_BatGeneratorActiveFlagLo
	BNE.b CODE_03DAF3
	JMP.w CODE_03D62C

CODE_03DAF3:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03DAEA
	LDA.w $0CD4
	BNE.b CODE_03DAEA
	LDA.w #$0003
	STA.b $00
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w #!Define_YI_LevelID_BiggerBoosFort
	BNE.b CODE_03DB30
	SEP.b #$10
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0003
	BCC.b CODE_03DB30
	DEC.b $00
	CMP.w #$0005
	BCC.b CODE_03DB30
	DEC.b $00
CODE_03DB30:
	LDA.w !RAM_YI_Level_NorSpr_SpawnedBatGeneratorBatsLo
	CMP.b $00
	BCS.b CODE_03DB84
	LDA.w #$0030
	STA.w $0CD4
	SEP.b #$10
	PHY
	LDA.w #$013E
	JSL.l CODE_03A364
	BCC.b CODE_03DB81
	INC.w !RAM_YI_Level_NorSpr_SpawnedBatGeneratorBatsLo
	LDA.b $10
	AND.w #$000E
	ASL
	ASL
	ASL
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0030
	STA.w $7182,y
	LDA.b $10
	AND.w #$0001
	ASL
	STA.w $7400,y
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03DA7C,x
	STA.w $70E2,y
	PHB
	LDX.b #DATA_07B1A6>>16
	PHX
	PLB
	TYX
	JSL.l CODE_07B1B6
	PLB
	INC.w $7A36,x
CODE_03DB81:
	PLY
	REP.b #$10
CODE_03DB84:
	RTS

;---------------------------------------------------------------------------

CODE_03DB85:
	STZ.w !RAM_YI_Level_NorSpr_BatGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DB8B:
	LDA.w $0C4C
	BEQ.b CODE_03DB93
	JMP.w CODE_03D62C

CODE_03DB93:
	INC.w $0C4C
	RTS

;---------------------------------------------------------------------------

DATA_03DB97:
	dw $0020,$0030,$0050,$0060,$0090,$0090,$00C0,$00D0

DATA_03DBA7:
	dw $0030,$0060,$0020,$0050,$0040,$0070,$0060,$0030

CODE_03DBB7:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03DC2D
	LDA.w $0CD6
	BNE.b CODE_03DC2D
	LDA.w $0C4E
	CMP.w #$0001
	BCS.b CODE_03DC2D
	PHY
	SEP.b #$10
	LDA.b $10
	AND.w #$0007
	ASL
	TAY
	LDA.w !RAM_YI_Global_Layer1XPosLo
	AND.w #$FF00
	CLC
	ADC.w DATA_03DB97,y
	CMP.w !RAM_YI_Global_Layer1XPosLo
	BPL.b CODE_03DBEC
	CLC
	ADC.w #$0100
CODE_03DBEC:
	STA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w !RAM_YI_Global_Layer1YPosLo
	AND.w #$FF00
	CLC
	ADC.w DATA_03DBA7,y
	CMP.w !RAM_YI_Global_Layer1YPosLo
	BPL.b CODE_03DC04
	CLC
	ADC.w #$0100
CODE_03DC04:
	STA.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0010
	BNE.b CODE_03DC2A
	LDA.w #$0157
	JSL.l CODE_03A364
	BCC.b CODE_03DC2A
	INC.w $0C4E
	JSL.l CODE_07C30B
CODE_03DC2A:
	REP.b #$10
	PLY
CODE_03DC2D:
	RTS

;---------------------------------------------------------------------------

CODE_03DC2E:
	STZ.w $0C4C
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

DATA_03DC34:
	dw $0901,$1911

CODE_03DC38:
	LDA.b $00
	AND.w #$0001
	STA.b $00
	LDA.b $02
	AND.w #$0001
	ASL
	ORA.b $00
	TAX
	LDA.w DATA_03DC34,x
	AND.w #$00FF
	STA.b $00
	CMP.w $0C50
	BNE.b CODE_03DC58
CODE_03DC55:
	JMP.w CODE_03D62C

CODE_03DC58:
	STA.w $0C50
	LDA.w $0C52
	BNE.b CODE_03DC55
	STZ.w $0C54
	STZ.w $0C5C
	INC.w $0C52
	RTS

;---------------------------------------------------------------------------

DATA_03DC6A:
	db $04,$06,$0E,$08,$0A,$08,$0C,$06,$0C,$0E,$10,$00,$0E,$0C,$10,$02
	db $0A,$04,$0C,$06,$0A,$04,$0E,$08,$0E,$08,$10,$00,$0E,$08,$04,$00

DATA_03DC8A:
	db $0A,$08,$0C,$06,$04,$06,$0E,$08,$0E,$0C,$10,$02,$0C,$0E,$10,$00
	db $0A,$04,$0E,$08,$0A,$04,$0C,$06,$0E,$08,$04,$00,$0E,$08,$10,$00

DATA_03DCAA:
	db $00,$F0,$F0,$00,$00,$10,$10,$00,$00,$00,$00,$E0,$E0,$E0,$E0,$00
	db $00,$00,$00,$F0,$F0,$F0,$F0,$00,$00,$10,$10,$F0,$F0,$00,$00,$E0

DATA_03DCCA:
	db $00,$10,$10,$00,$00,$F0,$F0,$00,$00,$00,$00,$20,$20,$20,$20,$00
	db $00,$00,$00,$10,$10,$10,$10,$00,$00,$10,$10,$F0,$F0,$00,$00,$E0

DATA_03DCEA:
	db !Define_YI_SoundID68_SpearGuyChant1,!Define_YI_SoundID69_SpearGuyChant2

CODE_03DCEC:
	LDA.w $0C54
	DEC
	BNE.b CODE_03DD00
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_03DD04
	STA.w $0C56
CODE_03DD00:
	STZ.w $0C66
	RTS

CODE_03DD04:
	LDA.w $0C56
	BEQ.b CODE_03DD0D
	STZ.w $0C56
	RTS

CODE_03DD0D:
	LDA.w $0C5C
	INC
	AND.w #$0007
	STA.w $0C5C
	LDA.w $0C50
	CLC
	ADC.w $0C5C
	TAX
	LDA.w DATA_03DC6A-$01,x
	AND.w #$00FF
	STA.w $0C58
	LDA.w DATA_03DC8A-$01,x
	AND.w #$00FF
	STA.w $0C5A
	PHY
	LDY.w $0C66
	BEQ.b CODE_03DD4E
	LDY.w #$0000
	CMP.w #$000A
	BEQ.b CODE_03DD45
	CMP.w #$0003
	BMI.b CODE_03DD45
	INY
CODE_03DD45:
	LDA.w DATA_03DCEA,y
	TAY
	TYA
	JSL.l CODE_0085D2
CODE_03DD4E:
	PLY
	LDA.w DATA_03DCAA-$01,x
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_03DD5D
	ORA.w #$FF00
CODE_03DD5D:
	STA.w $0C5E
	LDA.w DATA_03DCCA-$01,x
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_03DD6E
	ORA.w #$FF00
CODE_03DD6E:
	STA.w $0C60
	TXA
	DEC
	AND.w #$0007
	TAX
	LDA.w DATA_03DCAA-$01,x
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_03DD85
	ORA.w #$FF00
CODE_03DD85:
	STA.w $0C62
	LDA.w DATA_03DCCA-$01,x
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_03DD96
	ORA.w #$FF00
CODE_03DD96:
	STA.w $0C64
	LDX.w #$0002
	STX.w $0CD8
	STZ.w $0C66
	RTS

;---------------------------------------------------------------------------

CODE_03DDA3:
	STZ.w $0C50
	STZ.w $0C52
	STZ.w $0CD8
	STZ.w $0C58
	STZ.w $0C5A
	STZ.w $0C66
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DDB8:
	STZ.w !RAM_YI_Level_NorSpr_FireLakituActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DDBE:
	LDA.w $0C6A
	BEQ.b CODE_03DDC6
	JMP.w CODE_03D62C

CODE_03DDC6:
	INC.w $0C6A
	RTS

;---------------------------------------------------------------------------

DATA_03DDCA:
	dw $0120,$0130,$FFD0,$FFC0

DATA_03DDD2:
	dw $0020,$0060,$00A0,$00E0

CODE_03DDDA:
	LDA.w $0C6A
	BNE.b CODE_03DDE2
	JMP.w CODE_03D62C

CODE_03DDE2:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03DE59
	LDA.w $0CDA
	BNE.b CODE_03DE59
	LDA.w $0C6C
	CMP.w #$0004
	BCS.b CODE_03DE59
	LDA.w #$0030
	STA.w $0CDA
	SEP.b #$10
	PHY
	LDA.w #$0152
	JSL.l CODE_03A364
	BCC.b CODE_03DE56
	INC.w $0C6C
	LDA.w $0073
	STA.w $7400,y
	ASL
	STA.b $00
	LDA.b $10
	AND.w #$0001
	ASL
	ORA.b $00
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03DDCA,x
	STA.w $70E2,y
	LDA.b $10
	AND.w #$0003
	ASL
	TAX
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w DATA_03DDD2,x
	STA.w $7182,y
	PHB
	LDX.b #DATA_07BB14>>16
	PHX
	PLB
	TYX
	JSL.l YI_NorSpr152_Flutter_Init
	PLB
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w #$0001
	STA.w $7A36,x
CODE_03DE56:
	PLY
	REP.b #$10
CODE_03DE59:
	RTS

;---------------------------------------------------------------------------

CODE_03DE5A:
	STZ.w $0C6A
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DE60:
	LDA.w !RAM_YI_Level_NorSpr_NipperSporeGeneratorActiveFlagLo
	BEQ.b CODE_03DE68
	JMP.w CODE_03D62C

CODE_03DE68:
	INC.w !RAM_YI_Level_NorSpr_NipperSporeGeneratorActiveFlagLo
	RTS

;---------------------------------------------------------------------------

DATA_03DE6C:
	dw $0000,$0010,$0020,$0030,$0040,$0050,$0060,$0070
	dw $0080,$0090,$00A0,$00B0,$00C0,$00D0,$00E0,$00F0

DATA_03DE8C:
	dw $FFF0,$FFE0,$FFD0,$FFC0

CODE_03DE94:
	LDA.w !RAM_YI_Level_NorSpr_NipperSporeGeneratorActiveFlagLo
	BNE.b CODE_03DE9C
	JMP.w CODE_03D62C

CODE_03DE9C:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03DF0B
	LDA.w $0CDC
	BNE.b CODE_03DF0B
	SEP.b #$10
	PHY
	LDA.w #$0165
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0166
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0004
	BCS.b CODE_03DF08
	LDA.w #$0020
	STA.w $0CDC
	LDA.w #$0165
	JSL.l CODE_03A364
	BCC.b CODE_03DF08
	LDA.b $10
	AND.w #$000F
	ASL
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03DE6C,x
	STA.w $70E2,y
	LDA.b $10
	AND.w #$0003
	ASL
	TAX
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w DATA_03DE8C,x
	STA.w $7182,y
	PHB
	LDX.b #DATA_0F8B2E>>16
	PHX
	PLB
	TYX
	JSL.l YI_NorSpr165_NipperSpore_Init
	PLB
CODE_03DF08:
	PLY
	REP.b #$10
CODE_03DF0B:
	RTS

;---------------------------------------------------------------------------

CODE_03DF0C:
	STZ.w !RAM_YI_Level_NorSpr_NipperSporeGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DF12:
	LDA.w !RAM_YI_Level_NorSpr_PokeyBalloonGeneratorActiveFlagLo
	BEQ.b CODE_03DF1A
	JMP.w CODE_03D62C

CODE_03DF1A:
	INC.w !RAM_YI_Level_NorSpr_PokeyBalloonGeneratorActiveFlagLo
	RTS

;---------------------------------------------------------------------------

DATA_03DF1E:
	dw $0110,$0120,$FFE0,$FFD0

DATA_03DF26:
	dw $0010,$0020,$0030,$0040

CODE_03DF2E:
	JSL.l CODE_008408
	LDA.w !RAM_YI_Level_NorSpr_PokeyBalloonGeneratorActiveFlagLo
	BNE.b CODE_03DF3A
	JMP.w CODE_03D62C

CODE_03DF3A:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03DF4A
	LDA.w $0CDE
	BEQ.b CODE_03DF4B
CODE_03DF4A:
	RTS

CODE_03DF4B:
	SEP.b #$10
	PHY
	LDA.w #$0174
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0175
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHA
	LDA.w #$017F
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0180
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLA
	CLC
	ADC.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0004
	BCS.b CODE_03DFEC
	LDA.b $10
	AND.w #$0004
	LSR
	STA.b $00
	LDA.w $0073
	STA.w $7400,x
	ASL
	ORA.b $00
	TAY
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03DF1E,y
	STA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w DATA_03DF26,y
	STA.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	BIT.w #$0002
	BNE.b CODE_03DFEC
	LDA.w #$00C0
	STA.w $0CDE
	LDA.w #$0174
	JSL.l CODE_03A364
	BCC.b CODE_03DFEC
	TYX
	LDA.b $00
	STA.w $70E2,x
	LDA.b $02
	STA.w $7182,x
	PHB
	LDY.b #DATA_07F10C>>16
	PHY
	PLB
	JSL.l YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_Init
	PLB
CODE_03DFEC:
	PLY
	REP.b #$10
	RTS

;---------------------------------------------------------------------------

CODE_03DFF0:
	STZ.w !RAM_YI_Level_NorSpr_PokeyBalloonGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03DFF6:
	LDA.w !RAM_YI_Level_NorSpr_MissileBalloonGeneratorActiveFlagLo
	BEQ.b CODE_03DFFE
	JMP.w CODE_03D62C

CODE_03DFFE:
	INC.w !RAM_YI_Level_NorSpr_MissileBalloonGeneratorActiveFlagLo
	RTS

;---------------------------------------------------------------------------

CODE_03E002:
	JSL.l CODE_008408
	LDA.w !RAM_YI_Level_NorSpr_MissileBalloonGeneratorActiveFlagLo
	BNE.b CODE_03E00E
	JMP.w CODE_03D62C

CODE_03E00E:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03E01E
	LDA.w $0CE0
	BEQ.b CODE_03E01F
CODE_03E01E:
	RTS

CODE_03E01F:
	SEP.b #$10
	PHY
	LDA.w #$0175
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0176
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHA
	LDA.w #$017F
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0180
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLA
	CLC
	ADC.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0004
	BCS.b CODE_03E0A9
	LDA.b $10
	AND.w #$0004
	LSR
	STA.b $00
	LDA.w $0073
	STA.w $7400,x
	ASL
	ORA.b $00
	TAY
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03DF1E,y
	STA.b $00
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w DATA_03DF26,y
	STA.b $02
	LDA.w #$00C0
	STA.w $0CE0
	LDA.w #$0175
	JSL.l CODE_03A364
	BCC.b CODE_03E0A9
	TYX
	LDA.b $00
	STA.w $70E2,x
	LDA.b $02
	STA.w $7182,x
	PHB
	LDY.b #DATA_07F10C>>16
	PHY
	PLB
	JSL.l YI_NorSpr175_BaronVonZeppelinCarryingBomb_Init
	PLB
CODE_03E0A9:
	PLY
	REP.b #$10
	RTS

;---------------------------------------------------------------------------

CODE_03E0AD:
	STZ.w !RAM_YI_Level_NorSpr_MissileBalloonGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03E0B3:
	LDA.w !RAM_YI_Level_NorSpr_BalloonGeneratorActiveFlagLo
	BEQ.b CODE_03E0BB
	JMP.w CODE_03D62C

CODE_03E0BB:
	INC.w !RAM_YI_Level_NorSpr_BalloonGeneratorActiveFlagLo
	RTS

;---------------------------------------------------------------------------

CODE_03E0BF:
	LDA.w !RAM_YI_Level_NorSpr_BalloonGeneratorActiveFlagLo
	BNE.b CODE_03E0C7
	JMP.w CODE_03D62C

CODE_03E0C7:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03E123
	LDA.w $0CE2
	BNE.b CODE_03E123
	LDA.w #$0060
	STA.w $0CE2
	LDA.w $0FED
	CMP.w #$000C
	BPL.b CODE_03E123
	SEP.b #$10
	PHY
	LDA.w #$0052
	JSL.l CODE_03A34C
	BCC.b CODE_03E120
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0110
	STA.w $7182,y
	LDA.w $60A8
	BNE.b CODE_03E108
	LDA.w $60C4
	DEC
	EOR.w #$FFFF
	INC
CODE_03E108:
	BPL.b CODE_03E10F
	LDA.w #$FFA0
	BRA.b CODE_03E112

CODE_03E10F:
	LDA.w #$0060
CODE_03E112:
	STA.b $00
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.b $00
	AND.w #$FFE0
	STA.w $70E2,y
CODE_03E120:
	PLY
	REP.b #$10
CODE_03E123:
	RTS

;---------------------------------------------------------------------------

CODE_03E124:
	STZ.w !RAM_YI_Level_NorSpr_BalloonGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

DATA_03E12A:
	dw $0620,$06A0,$0630,$05B0

DATA_03E132:
	dw $0140,$01B0,$0230,$01B0

DATA_03E13A:
	dw $0188,$0188,$0187,$0188

CODE_03E142:
	LDA.w !RAM_YI_Level_NorSpr_PlatformGeneratorActiveFlagLo
	BEQ.b CODE_03E14A
	JMP.w CODE_03D62C

CODE_03E14A:
	INC.w !RAM_YI_Level_NorSpr_PlatformGeneratorActiveFlagLo
	PHY
	SEP.b #$10
	LDY.b #$00
CODE_03E152:
	STY.b $00
	LDA.w DATA_03E12A,y
	STA.b $02
	LDA.w DATA_03E132,y
	STA.b $04
	LDA.w DATA_03E13A,y
	JSL.l CODE_03A34C
	BCC.b CODE_03E18C
	LDA.b $02
	STA.w $70E2,y
	LDA.b $04
	STA.w $7182,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	INC.w $0FF7
	INC.w $0FF7
	TYA
	LDY.b $00
	STA.w $0FEF,y
	INY
	INY
	CPY.b #$08
	BMI.b CODE_03E152
CODE_03E18C:
	REP.b #$10
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_03E190:
	PHY
	SEP.b #$10
	LDY.w $0FF7
CODE_03E196:
	STY.b $00
	LDA.w $0FED,y
	TAY
	LDA.w $7680,y
	CLC
	ADC.w #$0100
	CMP.w #$0300
	BCS.b CODE_03E1B4
	LDA.w $7682,y
	CLC
	ADC.w #$0100
	CMP.w #$0300
	BCC.b CODE_03E1DE
CODE_03E1B4:
	LDY.b $00
	DEY
	DEY
	BNE.b CODE_03E196
	LDY.w $0FF7
CODE_03E1BD:
	STY.b $00
	LDX.w $0FED,y
	JSL.l CODE_03A31E
	LDY.b $00
	LDA.w #$0000
	STA.w $0FED,y
	DEY
	DEY
	BNE.b CODE_03E1BD
	STZ.w !RAM_YI_Level_NorSpr_PlatformGeneratorActiveFlagLo
	STZ.w $0FF7
	REP.b #$10
	PLY
	JMP.w CODE_03D62C

CODE_03E1DE:
	REP.b #$10
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_03E1E2:
	LDA.w !RAM_YI_Level_NorSpr_SlimeGeneratorActiveFlagLo
	BEQ.b CODE_03E1EA
	JMP.w CODE_03D62C

CODE_03E1EA:
	INC.w !RAM_YI_Level_NorSpr_SlimeGeneratorActiveFlagLo
	LDA.b $02
	ASL
	ASL
	ASL
	ASL
	STA.w $0C7A
	RTS

;---------------------------------------------------------------------------

DATA_03E1F7:
	dw $0020,$FFE0

CODE_03E1FB:
	LDA.w !RAM_YI_Level_NorSpr_SlimeGeneratorActiveFlagLo
	BNE.b CODE_03E203
	JMP.w CODE_03D62C

CODE_03E203:
	PHY
	SEP.b #$10
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03E216
	LDA.w $0CE4
	BEQ.b CODE_03E219
CODE_03E216:
	JMP.w CODE_03E29D

CODE_03E219:
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0008
	SEC
	SBC.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0005
	BMI.b CODE_03E231
	LDA.w #$0005
CODE_03E231:
	STA.b $00
	LDA.w #$0132
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	INC
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDY.w !REGISTER_SuperFX_R6_MultiplierLo
	CPY.b $00
	BPL.b CODE_03E29D
	LDA.w #$0132
	JSL.l CODE_03A34C
	BCC.b CODE_03E29D
	PHY
	LDY.b #$00
	LDA.b $10
	AND.w #$007F
	SEC
	SBC.w #$0040
	STA.b $00
	BPL.b CODE_03E268
	INY
	INY
CODE_03E268:
	CLC
	ADC.w DATA_03E1F7,y
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	PLY
	STA.w $70E2,y
	LDA.w $0C7A
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w #$0007
	STA.w $7402,y
	INC
	STA.w $7A98,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w $74A2,y
	LDA.w #$0060
	STA.w $0CE4
CODE_03E29D:
	REP.b #$10
	PLY
	RTS

;---------------------------------------------------------------------------

CODE_03E2A1:
	STZ.w !RAM_YI_Level_NorSpr_SlimeGeneratorActiveFlagLo
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03E2A7:
	LDA.w $7FE8
	BEQ.b CODE_03E2B2
	LDA.w #$0001
	STA.w $7FE8
CODE_03E2B2:
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03E2B5:
	LDA.w $7960
	ASL
	ASL
	ASL
	ASL
	SEC
	SBC.w #$0100
	STA.w $7E1A
	JMP.w CODE_03D639

;---------------------------------------------------------------------------

CODE_03E2C6:
	STZ.w $0C7C
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03E2CC:
	LDA.w !RAM_YI_Level_NorSpr_FuzzyGeneratorActiveFlagLo
	BEQ.b CODE_03E2D4
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

CODE_03E2D4:
	INC.w !RAM_YI_Level_NorSpr_FuzzyGeneratorActiveFlagLo
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C44
	RTS

;---------------------------------------------------------------------------

DATA_03E2DE:
	dw $0120,$FFE0,$0130,$FFD0,$0140,$FFC0,$0150,$FFB0

DATA_03E2EE:
	dw $0000,$0020,$0040,$0060,$0080,$00A0,$00C0,$00E0

DATA_03E2FE:
	dw $0001,$0002,$0004,$0008,$0010,$0020,$0040,$0080

CODE_03E30E:
	LDA.w !RAM_YI_Level_NorSpr_FuzzyGeneratorActiveFlagLo
	BNE.b CODE_03E316
	JMP.w CODE_03D62C

CODE_03E316:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_03E322
CODE_03E321:
	RTS

CODE_03E322:
	LDA.w $0C40
	CMP.w #$0008
	BCS.b CODE_03E321
	LDA.w $0C44
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_03E33F
	LDA.w $0CEA
	BNE.b CODE_03E3B0
CODE_03E33F:
	LDA.b $10
	AND.w #$0007
	ASL
	TAX
	LDA.w !RAM_YI_Global_Layer1YPosLo
	AND.w #$FFE0
	CLC
	ADC.w DATA_03E2EE,x
	STA.b $02
	LSR
	LSR
	LSR
	LSR
	AND.w #$000E
	TAX
	LDA.w $0C42
	AND.w DATA_03E2FE,x
	BNE.b CODE_03E3B0
	LDA.w DATA_03E2FE,x
	STA.b $00
	JSL.l CODE_008408
	SEP.b #$10
	PHY
	LDA.w #$0129
	JSL.l CODE_03A34C
	BCC.b CODE_03E3AD
	LDA.w #$0080
	STA.w $0CEA
	LDA.b $00
	TSB.w $0C42
	INC.w $0C40
	LDA.w $0073
	STA.w $7400,y
	LDA.b $10
	AND.w #$0003
	ASL
	ASL
	ORA.w $7400,y
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C44
	CLC
	ADC.w DATA_03E2DE,x
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
CODE_03E3AD:
	PLY
	REP.b #$10
CODE_03E3B0:
	RTS

;---------------------------------------------------------------------------

CODE_03E3B1:
	STZ.w $0C7E
	JMP.w CODE_03D62C

;---------------------------------------------------------------------------

YI_NorSpr125_AttackingAndEndingKamek_Init:
;$03E3B7
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_03E3CD
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TAY
	REP.b #$20
CODE_03E3CD:
	DEY
	TYX
	JMP.w (DATA_03E3D2,x)

DATA_03E3D2:
	dw CODE_03E3D6
	dw CODE_03E3F7

CODE_03E3D6:
	LDX.b $12
	JSL.l CODE_03AE60
	SEP.b #$20
	LDA.b #$3C
	STA.w $7180,x
	LDA.b #$FF
	STA.w $74A2,x
	REP.b #$20
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$0040
	STA.w $7A96,x
	RTL

CODE_03E3F7:
	LDX.b $12
	LDA.w $6FA0,x
	ORA.w #$6800
	STA.w $6FA0,x
	LDA.w #$0001
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr125_AttackingAndEndingKamek_Main:
;$03E409
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	TYX
	JMP.w (DATA_03E411,x)

DATA_03E411:
	dw CODE_03E415
	dw CODE_03E78F

CODE_03E415:
	LDX.b $12
	LDA.w $7402,x
	BNE.b CODE_03E423
	JSL.l CODE_03AA52
	JSR.w CODE_03E70C
CODE_03E423:
	JSL.l CODE_03AF23
	LDY.b $16,x
	TYX
	JMP.w (DATA_03E42D,x)

DATA_03E42D:
	dw CODE_03E43F
	dw CODE_03E479
	dw CODE_03E4F4
	dw CODE_03E53E
	dw CODE_03E571
	dw CODE_03E58B
	dw CODE_03E67B
	dw CODE_03E6AE
	dw CODE_03E6F6

CODE_03E43F:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_03E478
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0130
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0040
	STA.w $7182,x
	STA.w $7A36,x
	SEP.b #$20
	LDA.b #$01
	STA.w $74A2,x
	REP.b #$20
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A98,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_03E478:
	RTL

CODE_03E479:
	LDX.b $12
	JSL.l CODE_0CE4E9
	LDA.w $7680,x
	CMP.w #$00F4
	BMI.b CODE_03E49C
	LDA.w $7A98,x
	BNE.b CODE_03E49B
	LDA.w $7402,x
	EOR.w #$0003
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_03E49B:
	RTL

CODE_03E49C:
	LDA.w #$0006
	STA.w $7402,x
	LDA.w #$0020
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03E49B
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	SEP.b #$20
	LDY.b #$13
	STY.b $17,x
	LDA.w DATA_03E4CC,y
	STA.w $7402,x
	LDA.w DATA_03E4E0,y
	STA.w $7A98,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	RTL

DATA_03E4CC:
	db $05,$05,$04,$03,$04,$05,$04,$03,$04,$05,$04,$03,$04,$05,$04,$03
	db $04,$05,$04,$03

DATA_03E4E0:
	db $02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06
	db $02,$06,$02,$06

CODE_03E4F4:
	LDX.b $12
	JSL.l CODE_0CE4E9
	LDA.w $7A98,x
	BNE.b CODE_03E526
	LDY.b $17,x
	DEY
	BMI.b CODE_03E527
	STY.b $17,x
	SEP.b #$20
	LDA.w DATA_03E4CC,y
	STA.w $7402,x
	LDA.w DATA_03E4E0,y
	STA.w $7A98,x
	REP.b #$20
	TYA
	AND.w #$0007
	CMP.w #$0007
	BNE.b CODE_03E526
	LDA.w #!Define_YI_SoundID5B_KamekTalk
	JSL.l CODE_0085D2
CODE_03E526:
	RTL

CODE_03E527:
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$0115
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
	RTL

CODE_03E53E:
	LDX.b $12
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$F800
	STA.w $75E0,x
	LDA.w #$0040
	STA.w $7540,x
	LDA.w #$0800
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
	RTL

CODE_03E571:
	LDX.b $12
	LDA.w $7680,x
	CMP.w #$0080
	BMI.b CODE_03E57E
	JMP.w CODE_03E640

CODE_03E57E:
	LDA.w #$0800
	STA.w $75E0,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
	RTL

CODE_03E58B:
	LDX.b $12
	LDA.w $7680,x
	CMP.w #$0140
	BCC.b CODE_03E5F1
	LDX.b #$1C
CODE_03E597:
	LDA.l DATA_5FF556,x
	STA.l $702F2E,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	DEX
	DEX
	BPL.b CODE_03E597
	LDX.b $12
	SEP.b #$20
	LDY.w $105E
	LDA.b #$FF
	STA.w $74A2,y
	REP.b #$20
	STZ.w $7402,x
	STZ.w $7400,x
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$000C
	STA.w $7042,x
	LDA.w $7040,x
	AND.w #$07FF
	ORA.w #$2000
	STA.w $7040,x
	LDA.w #$0100
	STA.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $7542,x
	LDA.w #$0020
	STA.w $7A98,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
	RTL

CODE_03E5F1:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03E5FA
	INY
	INY
CODE_03E5FA:
	TYA
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03E611
	LDA.w $7682,x
	CMP.w #$0060
	BCC.b CODE_03E611
	LDA.w #$F800
	STA.w $75E2,x
CODE_03E611:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_03E622
	LDA.w #$0007
	BRA.b CODE_03E63C

CODE_03E622:
	CLC
	ADC.w #$0100
	CMP.w #$0300
	BCS.b CODE_03E630
	LDA.w #$0006
	BRA.b CODE_03E63C

CODE_03E630:
	CLC
	ADC.w #$0100
	CMP.w #$0500
	BCS.b CODE_03E640
	LDA.w #$0003
CODE_03E63C:
	STA.w $7402,x
	RTL

CODE_03E640:
	LDA.b $14
	LSR
	LSR
	AND.w #$0001
	INC
	STA.w $7402,x
	LDA.w $7400,x
	BEQ.b CODE_03E67A
	LDY.w $105E
	LDA.w $70E2,x
	CMP.w $70E2,y
	BCC.b CODE_03E67A
	LDA.w #$002F
	STA.w $7402,y
	LDA.w #$0000
	STA.w $7542,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
CODE_03E67A:
	RTL

CODE_03E67B:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_03E6AD
	LDA.b $76,x
	ASL
	ASL
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFF0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0110
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0038
	STA.w $7182,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_03E6AD:
	RTL

CODE_03E6AE:
	LDX.b $12
	LDA.w $7680,x
	CMP.w #$00E0
	BPL.b CODE_03E6E5
	LDA.b $76,x
	SEC
	SBC.w #$0003
	BMI.b CODE_03E6D0
	STA.b $76,x
	ASL
	ASL
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_03E762
	BRA.b CODE_03E6E5

CODE_03E6D0:
	LDA.w $7680,x
	CMP.w #$0020
	BPL.b CODE_03E6E5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
	RTL

CODE_03E6E5:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_03E6EF
	CMP.w #$FFF0
	BCC.b CODE_03E6F5
CODE_03E6EF:
	LDA.w #$FFF0
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_03E6F5:
	RTL

CODE_03E6F6:
	LDX.b $12
	LDY.w $105E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7A96,y
	JML.l CODE_03A31E

CODE_03E70C:
	LDY.w $74A2,x
	CMP.w #$00FF
	BEQ.b CODE_03E761
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03E761
	LDA.w $7722,x
	BMI.b CODE_03E761
	REP.b #$10
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	CMP.w #$0018
	BPL.b CODE_03E730
	LDA.w #$0018
CODE_03E730:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_548000+$2080
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$2080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_03E761:
	RTS

CODE_03E762:
	LDA.w #$5574
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0100
	SEC
	SBC.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$00E1
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_03E78F:
	LDX.b $12
	JSL.l CODE_03AF23
	LDY.b $16,x
	TYX
	JMP.w (DATA_03E79B,x)

DATA_03E79B:
	dw CODE_03E7A7
	dw CODE_03E7F8
	dw CODE_03E827
	dw CODE_03E88E

DATA_03E7A3:
	dw $0120,$FFD0

CODE_03E7A7:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_03E7F7
	STZ.w $7400,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03E7A3
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0030
	STA.w $7182,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w #!Define_YI_LevelID_KameksRevenge
	BEQ.b CODE_03E7DE
	LDA.w $7042,x
	EOR.w #$0020
	STA.w $7042,x
	BRA.b CODE_03E7E7

CODE_03E7DE:
	LDA.w $7042,x
	EOR.w #$0020
	STA.w $7042,x
CODE_03E7E7:
	SEP.b #$20
	STZ.w $74A2,x
	LDA.b #$40
	STA.w $70E0,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_03E7F7:
	RTL

CODE_03E7F8:
	LDX.b $12
	LDA.b $14
	LSR
	LSR
	AND.w #$0001
	CLC
	ADC.w #$0008
	STA.w $7402,x
	LDA.w $7680,x
	CMP.w #$FFD0
	BPL.b CODE_03E826
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$003C
	STA.w $7A96,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_03E826:
	RTL

CODE_03E827:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_03E881
	LDA.w #$0002
	STA.w $7400,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03E7A3+$02
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w #$0480
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w #!Define_YI_LevelID_KameksRevenge
	BEQ.b CODE_03E861
	LDA.w $7042,x
	EOR.w #$0020
	STA.w $7042,x
	BRA.b CODE_03E86A

CODE_03E861:
	LDA.w $7042,x
	EOR.w #$0020
	STA.w $7042,x
CODE_03E86A:
	SEP.b #$20
	LDA.b #$02
	STA.w $74A2,x
	STZ.w $70E0,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID9A_KamekFlying
	JML.l CODE_0085D2

CODE_03E881:
	CMP.w #$0020
	BNE.b CODE_03E88D
	LDA.w #!Define_YI_SoundID5B_KamekTalk
	JML.l CODE_0085D2

CODE_03E88D:
	RTL

CODE_03E88E:
	LDX.b $12
	JSL.l CODE_03A5B7
	LDA.b $14
	LSR
	LSR
	AND.w #$0001
	INC
	STA.w $7402,x
	LDA.w $7680,x
	CMP.w #$0120
	BMI.b CODE_03E8BB
	LDA.w #$003C
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	STZ.b $16,x
	REP.b #$20
CODE_03E8BB:
	RTL

;---------------------------------------------------------------------------

DATA_03E8BC:
	dw CODE_03E954
	dw CODE_03E993
	dw CODE_03E9A2
	dw CODE_03EA62
	dw CODE_03EB50
	dw CODE_03E9CC
	dw CODE_03E9E4
	dw CODE_03E9F5

DATA_03E8CC:
	dw $0000,$0002

YI_NorSpr08B_MockUp_Init:
;$03E8D0
	JSL.l CODE_03D3F8
	BEQ.b CODE_03E8DA
	JML.l CODE_03A31E

CODE_03E8DA:
	LDA.w $70E2,x
	STA.w $7A36,x
	LDA.w $7182,x
	STA.w $7A38,x
	JSL.l CODE_03AE60
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_03E90A
	SEP.b #$20
	LDA.b #$20
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TAY
	REP.b #$20
CODE_03E90A:
	DEY
	BEQ.b CODE_03E915
	LDY.b #$0A
	STY.b $18,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
CODE_03E915:
	LDA.w $7042,x
	ORA.w DATA_03E8CC,y
	STA.w $7042,x
	JSR.w CODE_03EC0B
	RTL

;---------------------------------------------------------------------------

ADDR_03E922:
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr08B_MockUp_Main:
;$03E925
	JSL.l CODE_03AA52
	JSR.w CODE_03EC0B
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_03E940
	LDA.w $7A36,x
	STA.b $04
	LDA.w $7A38,x
	JSL.l CODE_03D3F3
CODE_03E940:
	JSL.l CODE_03AF23
	LDY.b $18,x
	CMP.w #$0008
	BEQ.b CODE_03E94E
	JSR.w CODE_03EB95
CODE_03E94E:
	LDY.b $18,x
	TYX
	JMP.w (DATA_03E8BC,x)

CODE_03E954:
	LDX.b $12
	JSR.w CODE_03EC91
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_03E98E
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_03E98D
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_03E98D
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
CODE_03E98D:
	RTL

CODE_03E98E:
	LDY.b #$02
	STY.b $18,x
	RTL

CODE_03E993:
	LDX.b $12
	JSR.w CODE_03EC91
	JSR.w CODE_03EA3B
	BCS.b CODE_03E9A1
	LDY.b #$04
	STY.b $18,x
CODE_03E9A1:
	RTL

CODE_03E9A2:
	LDX.b $12
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	CLC
	ADC.b #$02
	BCS.b CODE_03E9B4
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	REP.b #$20
	RTL

CODE_03E9B4:
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	LDA.b #$06
	STA.b $18,x
	LDA.b #$08
	STA.w $7A96,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	RTL

CODE_03E9CC:
	LDX.b $12
	JSR.w CODE_03EC91
	JSR.w CODE_03EA3B
	BCS.b CODE_03E9E3
	LDA.w #$0010
	STA.w $7540,x
	STA.w $7542,x
	LDY.b #$0C
	STY.b $18,x
CODE_03E9E3:
	RTL

CODE_03E9E4:
	LDX.b $12
	JSR.w CODE_03EC91
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	CPY.b #$80
	BNE.b CODE_03E9F4
	LDY.b #$0E
	STY.b $18,x
CODE_03E9F4:
	RTL

CODE_03E9F5:
	LDX.b $12
	JSR.w CODE_03E9FD
	JMP.w CODE_03E9A2

CODE_03E9FD:
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
	RTS

CODE_03EA3B:
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_03EA59
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C0
CODE_03EA59:
	RTS

;---------------------------------------------------------------------------

DATA_03EA5A:
	dw $0000,$0002,$0004,$0008

CODE_03EA62:
	LDX.b $12
	LDA.w $7A96,x
	BEQ.b CODE_03EA89
	BIT.w #$000F
	BNE.b CODE_03EA77
	PHA
	LDA.w #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	PLA
CODE_03EA77:
	AND.w #$000C
	LSR
	TAY
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w DATA_03EA5A,y
	STA.w $7042,x
	RTL

CODE_03EA89:
	LDA.w #!Define_YI_AmbSpr1EE
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0008
	STA.w $73C2,y
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0028
	CMP.w #$0050
	BCS.b CODE_03EADC
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0028
	CMP.w #$0050
	BCS.b CODE_03EADC
	JSL.l CODE_03A858
CODE_03EADC:
	LDA.w $7A36,x
	STA.b $04
	LDA.w $7A38,x
	JSL.l CODE_03D3F3
	JSL.l CODE_03A31E
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	LDA.w DATA_03E8CC,y
	INC
	STA.b $00
	LDA.w #$008D
	JSL.l CODE_03A364
	BCC.b CODE_03EB4B
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$FC00
	STA.w $75E2,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w $7040,y
	AND.w #$07FF
	ORA.w #$2800
	STA.w $7040,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	DEC
	ORA.w $7042,y
	STA.w $7042,y
	SEP.b #$20
	LDA.b #$05
	STA.w $74A2,y
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.b #$02
	STA.w $7AF8,y
	REP.b #$20
CODE_03EB4B:
	RTL

;---------------------------------------------------------------------------

DATA_03EB4C:
	dw $0800,$F800

CODE_03EB50:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.b $76,x
	BMI.b CODE_03EB6B
	LDY.w $7D36,x
	BMI.b CODE_03EB8A
	DEY
	BMI.b CODE_03EB6E
	BEQ.b CODE_03EB6E
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03EB6E
CODE_03EB6B:
	JMP.w CODE_03EA89

CODE_03EB6E:
	SEP.b #$20
	LDA.b #$00
	LDY.w $7221,x
	BMI.b CODE_03EB79
	INC
	INC
CODE_03EB79:
	EOR.w $7400,x
	TAY
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_03EB4C,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	RTL

CODE_03EB8A:
	JSL.l CODE_03A858
	JMP.w CODE_03EA89

;---------------------------------------------------------------------------

DATA_03EB91:
	dw $FE00,$0200

CODE_03EB95:
	LDY.w $7D36,x
	BPL.b CODE_03EB9B
	RTS

CODE_03EB9B:
	DEY
	BMI.b CODE_03EBE6
	BEQ.b CODE_03EBE6
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03EBE6
	LDA.w $7D38,y
	BEQ.b CODE_03EBE6
	LDA.w $70E2,y
	STA.b $00
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.b $00
	BMI.b CODE_03EBCC
	INY
	INY
CODE_03EBCC:
	LDA.w DATA_03EB91,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $76,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDY.b #$08
	STY.b $18,x
	PLA
	RTL

CODE_03EBE6:
	RTS

;---------------------------------------------------------------------------

DATA_03EBE7:
	db $0F,$00,$0F,$00,$0E,$00,$0D,$00,$0C,$00,$0B,$00,$0A,$00,$09,$00
	db $08,$00,$07,$00,$06,$00,$05,$00,$04,$00,$03,$00,$02,$00,$01,$00
	db $00,$00,$00,$00

CODE_03EC0B:
	LDY.w $74A2,x
	BPL.b CODE_03EC11
	RTS

CODE_03EC11:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	TYA
	INC
	LSR
	LSR
	LSR
	AND.w #$00FE
	TAY
	LDA.w DATA_03EBE7,y
	STA.b $00
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6002,y
	CLC
	ADC.b $00
	STA.w $6002,y
	LDA.w $600A,y
	CLC
	ADC.b $00
	STA.w $600A,y
	LDA.w $6012,y
	CLC
	ADC.b $00
	STA.w $6012,y
	LDA.w $601A,y
	CLC
	ADC.b $00
	STA.w $601A,y
	SEP.b #$10
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_03EC90
	LDY.b $17,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	TYA
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	REP.b #$10
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #FXDATA_548000+$4041
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$4041)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_03EC90:
	RTS

;---------------------------------------------------------------------------

CODE_03EC91:
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	CMP.b #$80
	BCC.b CODE_03ECA1
	LDA.b #$80
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BRA.b CODE_03ECA8

CODE_03ECA1:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
CODE_03ECA8:
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_03ECAB:
	dw $3000,$3000,$4800,$4800

DATA_03ECB3:
	dw CODE_03EF92
	dw CODE_03EF11
	dw CODE_03EF0A
	dw CODE_03EF0A

DATA_03ECBB:
	dw DATA_03F258>>16,DATA_0CF87B>>16,DATA_03F1A4>>16,DATA_03F1A4>>16

DATA_03ECC3:
	dw DATA_03F258,DATA_0CF87B,DATA_03F1A4,DATA_03F1A4

YI_NorSpr08D_Flyguy_Init:
;$03ECCB
	JSL.l CODE_03D3F8
	BEQ.b CODE_03ECD5
	JML.l CODE_03A31E

CODE_03ECD5:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BNE.b CODE_03ECF6
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.b #$10
	LSR
	LSR
	ORA.b $00
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	TAY
	REP.b #$20
CODE_03ECF6:
	DEY
	LDA.w $7040,x
	ORA.w DATA_03ECAB,y
	STA.w $7040,x
	LDA.w #$001E
	STA.w $7A96,x
	LDA.w $70E2,x
	STA.w $7A36,x
	LDA.w $7182,x
	STA.w $7A38,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7042,x
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr08D_Flyguy_Main:
;$03ED20
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYX
	JMP.w (DATA_03ED27,x)

DATA_03ED27:
	dw CODE_03ED2B
	dw CODE_03F0D1

CODE_03ED2B:
	LDX.b $12
	JSR.w CODE_03F183
	JSR.w CODE_03EECA
	JSL.l CODE_03AF23
	JSL.l CODE_03A5B7
	JSR.w CODE_03F07F
	LDA.b $14
	AND.w #$0003
	STA.w $7402,x
	LDY.b $18,x
	TYX
	JMP.w (DATA_03ED4C,x)

DATA_03ED4C:
	dw CODE_03ED5A
	dw CODE_03ED95
	dw CODE_03EE0B
	dw CODE_03EE56
	dw CODE_03EEB3

DATA_03ED56:
	dw $0120,$FFD0

CODE_03ED5A:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_03ED94
	SEP.b #$20
	INC.b $18,x
	INC.b $18,x
	LDA.b #$05
	STA.w $74A2,x
	REP.b #$20
	LDA.w $0073
	STA.w $7400,x
	TAY
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_03ED56,y
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$FFC0
	STA.w $7182,x
	LDA.w #$0020
	STA.w $7540,x
	STA.w $7542,x
	BRA.b CODE_03EDAB

CODE_03ED94:
	RTL

CODE_03ED95:
	LDX.b $12
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03EDA0
	INY
	INY
CODE_03EDA0:
	TYA
	CMP.w $7400,x
	BEQ.b CODE_03EDAB
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03EDE1
CODE_03EDAB:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $75E0,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $75E2,x
	RTL

CODE_03EDE1:
	STZ.w $7540,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	STA.b $78,x
	LDA.w #$0078
	STA.w $7A96,x
	LDA.w $7A36,x
	STA.b $04
	LDA.w $7A38,x
	JSL.l CODE_03D3F3
	LDY.b $18,x
	INY
	INY
	STY.b $18,x
	RTL

CODE_03EE0B:
	LDX.b $12
	LDA.w $7A96,x
	BEQ.b CODE_03EE45
	TXY
	REP.b #$10
	LDX.b $76,y
	LDA.l DATA_00E9D4,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	STA.w $7182,y
	TXA
	CLC
	ADC.w #$0002
	AND.w #$01FE
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	SEP.b #$10
	TYX
	RTL

CODE_03EE45:
	LDA.w #$0000
	STA.b $76,x
	LDY.w $7400,x
	STY.b $19,x
	LDY.b $18,x
	INY
	INY
	STY.b $18,x
	RTL

CODE_03EE56:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	CMP.w #$0250
	BCS.b CODE_03EEA2
	TXY
	REP.b #$10
	AND.w #$01FE
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_00E954,x
	ASL
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701979|!EXRAMBankMirror,y
	AND.w #$00FF
	BNE.b CODE_03EE83
	PLA
	EOR.w #$FFFF
	INC
	PHA
CODE_03EE83:
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CLC
	ADC.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	SEP.b #$10
	LDX.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_03EE9C
	INX
	INX
CODE_03EE9C:
	TXA
	STA.w $7400,y
	TYX
	RTL

CODE_03EEA2:
	LDA.w #$0010
	STA.w $7A96,x
	LDY.b #$00
	STY.b $19,x
	LDY.b $18,x
	INY
	INY
	STY.b $18,x
	RTL

CODE_03EEB3:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_03EEC9
	LDY.b $19,x
	BNE.b CODE_03EEC9
	LDA.w #!Define_YI_SoundID6E_FlyGuyGettingAway
	JSL.l CODE_0085D2
	LDY.b #$01
	STY.b $19,x
CODE_03EEC9:
	RTL

CODE_03EECA:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_03EEE8
	JSR.w CODE_03EEF6
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	TXY
	JSL.l CODE_03A377
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7042,x
	STA.w $7042,x
	RTS

CODE_03EEE8:
	CMP.w #$0010
	BEQ.b CODE_03EEF5
	CMP.w #$000E
	BEQ.b CODE_03EEF5
	JSR.w CODE_03EEF6
CODE_03EEF5:
	RTS

CODE_03EEF6:
	LDA.w $7A36,x
	STA.b $04
	LDA.w $7A38,x
	JSL.l CODE_03D3F3
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	DEY
	TYX
	JMP.w (DATA_03ECB3,x)

CODE_03EF0A:
	LDX.b $12
	JSL.l CODE_03A496
	RTS

CODE_03EF11:
	LDX.b $12
	LDA.w $7A38,x
	ASL
	ASL
	ASL
	ASL
	AND.w #$FF00
	ORA.w #$8000
	STA.b $00
	LDA.w $7A36,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	ORA.b $00
	STA.b $0E
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	LDA.w #$0115
	JSL.l CODE_03A34C
	BCC.b CODE_03EF62
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,y
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	RTS

CODE_03EF62:
	JSL.l CODE_0CFF61
	LDA.w #!Define_YI_NorSpr115_Coin
	TXY
	JSL.l CODE_03A377
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,x
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLA
	PLA
	RTL

CODE_03EF92:
	LDX.b $12
	LDA.w #!Define_YI_SoundID30_AppearingStars
	JSL.l CODE_0085D2
	LDA.w !RAM_YI_Level_StarTimerLo
	BEQ.b CODE_03EFB3
	STA.w !REGISTER_DividendLo
	LDY.b #$0A
	STY.w !REGISTER_Divisor
	NOP #8
	LDA.w !REGISTER_QuotientLo
CODE_03EFB3:
	STA.b $00
	LDA.w #$001D
	SEC
	SBC.b $00
	STA.b $00
	LDA.w #$0004
	STA.b $02
CODE_03EFC2:
	LDA.b $00
	BPL.b CODE_03EFDA
	LDA.w #$0100
	STA.b $04
	LDA.w #$0140
	STA.b $06
	LDA.w #$0010
	STA.b $08
	LDA.w #!Define_YI_NorSpr115_Coin
	BRA.b CODE_03EFE6

CODE_03EFDA:
	LDA.w #$0180
	STA.b $04
	STZ.b $06
	STZ.b $08
	LDA.w #!Define_YI_NorSpr1A2_HealthStar
CODE_03EFE6:
	STA.b $0A
	JSL.l CODE_03A364
	BCC.b CODE_03F038
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	JSL.l CODE_008408
	LDA.b $10
	AND.w #$000E
	TAX
	LDA.l DATA_03C74C,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $10
	LSR
	LSR
	LSR
	LSR
	AND.w #$000E
	TAX
	LDA.l DATA_03C75C,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
	LDA.b $04
	STA.w $7A96,y
	LDA.b $06
	STA.w $7A98,y
	LDA.b $08
	STA.w $7AF6,y
	DEC.b $00
	DEC.b $02
	BPL.b CODE_03EFC2
	RTS

CODE_03F038:
	JSL.l CODE_0CFF61
	LDA.b $0A
	TXY
	JSL.l CODE_03A377
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.b $10
	AND.w #$000E
	TAX
	LDA.l DATA_03C74C,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $10
	LSR
	LSR
	LSR
	LSR
	AND.w #$000E
	TAX
	LDA.l DATA_03C75C,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
	LDA.b $04
	STA.w $7A96,y
	LDA.b $06
	STA.w $7A98,y
	LDA.b $08
	STA.w $7AF6,y
	PLA
	PLA
	RTL

CODE_03F07F:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_03F0D0
	BEQ.b CODE_03F0D0
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03F0D0
	LDA.w $7D38,y
	BEQ.b CODE_03F0D0
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	JSR.w CODE_03EEF6
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b #$02
	STA.w $7AF8,x
	REP.b #$20
	LDA.w #$FE00
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	LDA.w $7040,x
	AND.w #$07FF
	ORA.w #$2800
	STA.w $7040,x
	PLA
	RTL

CODE_03F0D0:
	RTS

CODE_03F0D1:
	LDX.b $12
	LDY.w $74A2,x
	BMI.b CODE_03F0EF
	LDA.w #DATA_0CF8F3>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0CF8F3
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_09AEC1>>16
	LDA.w #FXCODE_09AEC1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_03F0EF:
	JSR.w CODE_03F142
	JSL.l CODE_03AF23
	LDA.w $7AF8,x
	CMP.w #$0001
	BNE.b CODE_03F105
	LDA.w #!Define_YI_SoundID6E_FlyGuyGettingAway
	JSL.l CODE_0085D2
CODE_03F105:
	JSL.l CODE_03A5B7
	JSR.w CODE_03F15D
	LDA.b $14
	AND.w #$0003
	STA.w $7402,x
	TXY
	REP.b #$10
	LDX.b $76,y
	LDA.l DATA_00E954,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CLC
	ADC.w #$0002
	AND.w #$01FE
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	SEP.b #$10
	TYX
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03F13D
	INY
	INY
CODE_03F13D:
	TYA
	STA.w $7400,x
	RTL

CODE_03F142:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_03F15C
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	TXY
	JSL.l CODE_03A377
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7042,x
	STA.w $7042,x
CODE_03F15C:
	RTS

CODE_03F15D:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_03F182
	BEQ.b CODE_03F182
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03F182
	LDA.w $7D38,y
	BEQ.b CODE_03F182
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	JSL.l CODE_0CFF61
	PLA
	JML.l CODE_03A32E

CODE_03F182:
	RTS

CODE_03F183:
	LDY.w $74A2,x
	BMI.b CODE_03F1A3
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	DEY
	LDA.w DATA_03ECBB,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_03ECC3,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_09AEC1>>16
	LDA.w #FXCODE_09AEC1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_03F1A3:
	RTS

DATA_03F1A4:
	dw $0002,$8800,$0000,$0E01,$402F,$0600,$2F0E,$0040
	dw $FA08,$402C,$0000,$2CFA,$0000,$16FE,$0249,$0800
	dw $6F16,$0002,$1600,$026E,$0002,$E311,$0206,$0000
	dw $0088,$0100,$2F0E,$0040,$0E06,$402F,$0800,$2DFA
	dw $0040,$FA00,$002D,$FE00,$4916,$0002,$1608,$026F
	dw $0000,$6E16,$0202,$1100,$06E3,$0002,$8800,$0000
	dw $0E01,$402F,$0600,$2F0E,$0040,$FA08,$403C,$0000
	dw $3CFA,$0000,$16FE,$0249,$0800,$6F16,$0002,$1600
	dw $026E,$0002,$E311,$0206,$0000,$0088,$0100,$2F0E
	dw $0040,$0E06,$402F,$0800,$3DFA,$0040,$FA00,$003D
	dw $FE00,$4916,$0002,$1608,$026F,$0000,$6E16,$0202
	dw $1100,$06E3

DATA_03F258:
	dw $0002,$8800,$0000,$0E01,$402F,$0600,$2F0E,$0040
	dw $FA08,$402C,$0000,$2CFA,$0200,$1000,$00EA,$0002
	dw $8800,$0000,$0E01,$402F,$0600,$2F0E,$0040,$FA08
	dw $402D,$0000,$2DFA,$0200,$1000,$00EA,$0002,$8800
	dw $0000,$0E01,$402F,$0600,$2F0E,$0040,$FA08,$403C
	dw $0000,$3CFA,$0200,$1000,$00EA,$0002,$8800,$0000
	dw $0E01,$402F,$0600,$2F0E,$0040,$FA08,$403D,$0000
	dw $3DFA,$0200,$1000,$00EA

;---------------------------------------------------------------------------

DATA_03F2D0:
	db $08,$06,$07,$08,$09,$0C,$0A,$09,$09,$0A,$08,$08,$0B,$0D

DATA_03F2DE:
	dw $FFE8,$FFE6,$FFE7,$FFE8,$FFE9,$FFEC,$FFEA,$FFE9
	dw $FFE9,$FFEA,$FFE8,$FFE8,$FFEB,$FFED

DATA_03F2FA:
	dw $FF80,$0080

YI_NorSpr00A_Kaboomba_Init:
;$03F2FE
	LDA.w #$0007
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_03F396,y
	STA.w $7A96,x
	LDA.w DATA_03F38E,y
	STA.w $7402,x
	TAY
	LDA.w DATA_03F2D0,y
	STA.w $7B58,x
	REP.b #$20
	LDA.w #$0004
	STA.w $7BB8,x
	LDA.w #$0004
	STA.w $7BB6,x
	LDY.w $7400,x
	LDA.w DATA_03F2FA,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr00A_Kaboomba_Main:
;$03F331
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JSR.w (DATA_03F388,x)
	LDA.b $76,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.b $76,x
	JSL.l CODE_03A5B7
	LDY.w $7D36,x
	BPL.b CODE_03F35E
	LDA.w $60C0
	BNE.b CODE_03F35D
	LDA.w $60AA
	BMI.b CODE_03F35D
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_03F35B
	INC
CODE_03F35B:
	STA.b $76,x
CODE_03F35D:
	RTL

CODE_03F35E:
	DEY
	BMI.b CODE_03F35D
	BEQ.b CODE_03F35D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03F35D
	LDA.w $7D38,y
	BEQ.b CODE_03F35D
	LDA.w $7542,y
	CMP.w #$0040
	BCS.b CODE_03F380
	JSL.l CODE_0CFF61
	JML.l CODE_03B24B

CODE_03F380:
	PHX
	TYX
	JSL.l CODE_03B24B
	PLX
	RTL

DATA_03F388:
	dw CODE_03F39E
	dw CODE_03F422
	dw CODE_03F4A9

DATA_03F38E:
	db $07,$06,$05,$04,$03,$02,$01,$00

DATA_03F396:
	db $04,$04,$03,$02,$02,$03,$04,$04

CODE_03F39E:
	LDX.b $12
	JSR.w CODE_03F531
	LDA.b $10
	AND.w #$003F
	BEQ.b CODE_03F3E3
	LDA.w $7A96,x
	BNE.b CODE_03F3E2
	DEC.b $18,x
	BPL.b CODE_03F3B8
	LDA.w #$0007
	STA.b $18,x
CODE_03F3B8:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_03F396,y
	STA.w $7A96,x
	LDA.w DATA_03F38E,y
	STA.w $7402,x
	TAY
	LDA.w DATA_03F2D0,y
	STA.w $7B58,x
	REP.b #$20
	LDA.b $76,x
	BEQ.b CODE_03F3E2
	TYA
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_03F2DE,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03F3E2:
	RTS

CODE_03F3E3:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_03F49B,y
	STA.w $7A96,x
	LDA.w DATA_03F495,y
	STA.w $7402,x
	TAY
	LDA.w DATA_03F2D0,y
	STA.w $7B58,x
	REP.b #$20
	LDA.b $76,x
	BEQ.b CODE_03F414
	TYA
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_03F2DE,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03F414:
	LDA.w #$0004
	STA.b $16,x
	RTS

DATA_03F41A:
	db $08,$0C,$0D,$0C

DATA_03F41E:
	db $10,$02,$04,$02

CODE_03F422:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_03F457
	DEC.b $18,x
	BMI.b CODE_03F458
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_03F41E,y
	STA.w $7A96,x
	LDA.w DATA_03F41A,y
	STA.w $7402,x
	TAY
	LDA.w DATA_03F2D0,y
	STA.w $7B58,x
	REP.b #$20
	LDA.b $76,x
	BEQ.b CODE_03F457
	TYA
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_03F2DE,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03F457:
	RTS

CODE_03F458:
	LDY.w $7400,x
	LDA.w DATA_03F2FA,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0007
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_03F396,y
	STA.w $7A96,x
	LDA.w DATA_03F38E,y
	STA.w $7402,x
	TAY
	LDA.w DATA_03F2D0,y
	STA.w $7B58,x
	REP.b #$20
	LDA.b $76,x
	BEQ.b CODE_03F48F
	TYA
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_03F2DE,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03F48F:
	LDA.w #$0000
	STA.b $16,x
CODE_03F494:
	RTS

DATA_03F495:
	db $08,$09,$0B,$0A,$09,$08

DATA_03F49B:
	db $10,$04,$04,$02,$10,$20

DATA_03F4A1:
	dw $FFF0,$0010

DATA_03F4A5:
	dw $FE00,$0200

CODE_03F4A9:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_03F494
	DEC.b $18,x
	BMI.b CODE_03F458
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_03F49B,y
	STA.w $7A96,x
	LDA.w DATA_03F495,y
	STA.w $7402,x
	TAY
	LDA.w DATA_03F2D0,y
	STA.w $7B58,x
	REP.b #$20
	LDA.b $76,x
	BEQ.b CODE_03F4DE
	TYA
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_03F2DE,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03F4DE:
	LDA.b $18,x
	CMP.w #$0003
	BNE.b CODE_03F530
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_03F4A1,y
	STA.b $00
	LDA.w DATA_03F4A5,y
	STA.b $02
	LDA.w #$000B
	JSL.l CODE_03A364
	BCC.b CODE_03F529
	LDA.w $7960
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7D38,y
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	BRA.b CODE_03F530

CODE_03F529:
	LDA.w #!Define_YI_SoundID42
	JSL.l CODE_0085D2
CODE_03F530:
	RTS

CODE_03F531:
	LDA.b $76,x
	CMP.w #$0001
	BNE.b CODE_03F571
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_03F41E,y
	STA.w $7A96,x
	LDA.w DATA_03F41A,y
	STA.w $7402,x
	TAY
	LDA.w DATA_03F2D0,y
	STA.w $7B58,x
	REP.b #$20
	LDA.b $76,x
	BEQ.b CODE_03F569
	TYA
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_03F2DE,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_03F569:
	INC.b $76,x
	LDA.w #$0002
	STA.b $16,x
	PLA
CODE_03F571:
	RTS

;---------------------------------------------------------------------------

DATA_03F572:
	dw $FF40,$00C0,$0020,$FFE0

DATA_03F57A:
	dw $FFC0,$0040,$0120,$FFE0,$0130,$FFD0,$0140,$FFC0
	dw $0150,$FFB0,$0020,$0060,$00A0,$00E0,$0000,$0040
	dw $0080,$00C0

YI_NorSpr129_Fuzzy_Init:
;$03F59E
	LDA.w #$FF40
	STA.w $75E2,x
	LDY.w $7400,x
	LDA.w $7182,x
	CLC
	ADC.w #$0020
	STA.b $18,x
	LDA.w DATA_03F57A,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr129_Fuzzy_Main:
;$03F5B7
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_03F5CF
CODE_03F5BF:
	LDA.b $78,x
	BEQ.b CODE_03F5D4
	DEC.w $0C40
	LDA.b $78,x
	TRB.w $0C42
	STZ.b $78,x
	BRA.b CODE_03F604

CODE_03F5CF:
	LDY.w $7D96,x
	BNE.b CODE_03F5BF
CODE_03F5D4:
	LDA.w $7D38,x
	BEQ.b CODE_03F616
	STZ.w $7D38,x
	LDA.w #$0040
	STA.w $7542,x
	STA.w $7540,x
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w #$0100
	LDY.w $7221,x
	BPL.b CODE_03F5F6
	LDA.w #$FF00
CODE_03F5F6:
	STA.w $75E0,x
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_03F616
CODE_03F604:
	LDA.w $6FA0,x
	ORA.w #$0060
	STA.w $6FA0,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
CODE_03F616:
	JSL.l CODE_03AF23
	LDA.b $78,x
	BEQ.b CODE_03F677
	JSR.w CODE_03F6B8
	LDA.b $76,x
	BEQ.b CODE_03F632
	LDA.w $7A96,x
	BNE.b CODE_03F62F
	STZ.b $76,x
	JMP.w CODE_03F6D2

CODE_03F62F:
	JSR.w CODE_03F6B1
CODE_03F632:
	JSR.w CODE_03F678
	LDY.b #$00
	LDA.b $18,x
	CMP.w $7182,x
	BMI.b CODE_03F640
	LDY.b #$02
CODE_03F640:
	LDA.w DATA_03F572,y
	STA.w $75E2,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w $75E2,x
	BMI.b CODE_03F668
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCC.b CODE_03F676
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$00A0
	CMP.w #$0140
	BCC.b CODE_03F66F
CODE_03F668:
	INY
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_03F66F
	INY
CODE_03F66F:
	TYA
	AND.w #$00FF
	STA.w $7402,x
CODE_03F676:
	RTL

CODE_03F677:
	RTL

CODE_03F678:
	LDY.w $7D36,x
	BPL.b CODE_03F698
	LDA.w #!Define_YI_SoundID21_Fuzzy
	JSL.l CODE_0085D2
	LDA.w #$0400
	STA.w $7FE8
	LDA.w #$0003
	STA.w $61CA
	LDA.w #$0010
	STA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	BRA.b CODE_03F6B1

CODE_03F698:
	DEY
	BMI.b CODE_03F6B7
	BEQ.b CODE_03F6B7
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_03F6B7
	LDA.w $7D38,y
	BEQ.b CODE_03F6B7
	LDA.w #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_0085D2
CODE_03F6B1:
	JSL.l CODE_039F2B
	BRA.b CODE_03F6D1

CODE_03F6B7:
	RTS

CODE_03F6B8:
	LDA.w $7680,x
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCS.b CODE_03F6D1
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	CMP.w #$0140
	BCS.b CODE_03F6D1
	RTS

CODE_03F6D1:
	PLA
CODE_03F6D2:
	DEC.w $0C40
	LDA.b $78,x
	TRB.w $0C42
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

DATA_03F6DE:
	db $06,$06,$06,$06,$06,$06,$06,$06,$06,$06,$06,$06,$06,$06,$06,$06
	db $06,$06,$06,$06,$06,$06,$06,$06,$06,$06,$BC,$BC,$BC,$09,$09,$09
	db $09,$04,$04,$04,$04,$04,$04,$04,$05,$05,$05,$06,$03,$BE,$00,$00
	db $03,$01,$07,$00,$00,$01,$00,$00,$BE,$BE,$BE,$01,$01,$01,$02,$02
	db $05,$05,$06,$05,$05,$04,$05,$05,$46,$06,$06,$05,$06,$06,$BC,$BB
	db $BB,$BD,$BD,$BD,$BD,$05,$06,$06,$06,$06,$06,$06,$06,$06,$06,$06
	db $05,$05,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$05,$05,$05,$07,$46,$44,$40
	db $FF,$FF,$40,$40,$40,$40,$40,$40,$06,$06,$07,$06,$08,$08,$08,$08
	db $04,$04,$05,$05,$06,$06,$04,$06,$06,$06,$06,$06,$04,$42,$FD,$FD
	db $FD,$FD,$FD,$FD,$06,$05,$04,$03,$02,$01,$BF,$BD,$BC,$BC,$BC,$BC
	db $BB,$BB,$06,$07,$08,$0A,$0C,$0D,$10,$10,$10,$10,$10,$10,$10,$BC
	db $BB,$BA,$BA,$B9,$B8,$B6,$B4,$B2,$B3,$B5,$B4,$B5,$B5,$BD,$BD,$BD
	db $BF,$00,$00,$01,$02,$02,$02,$02,$02,$02,$00,$00,$00,$00,$00,$00
	db $00,$06,$06,$05,$05,$06,$06,$07,$08,$08,$08,$07,$07,$07,$07,$07
	db $07,$06,$05,$05,$05,$06,$07,$07,$08,$06,$05,$05,$05,$06,$07,$07
	db $08,$03,$03,$03,$02,$01,$02,$02,$03,$04,$04,$03,$04,$02,$01,$04
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$06,$06,$06,$06,$06,$06,$06,$06,$05,$05,$05
	db $06,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$06,$06,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$02,$01,$06,$01,$42,$05,$05,$06,$06,$00,$00,$06,$06,$00,$02
	db $46,$46,$46,$46,$46,$06,$46,$06,$06,$06,$06,$46,$02,$06,$06,$46
	db $46,$46,$06,$06,$02,$02,$02,$06,$06,$BC,$BC,$BC,$49,$49,$49,$49
	db $04,$04,$04,$04,$04,$04,$44,$44,$44,$44,$FC,$FD,$FE,$FD,$FB,$FB
	db $FD,$03,$44,$04,$FC,$FC,$FC,$F7,$F7,$F7,$01,$01,$01,$02,$02,$02
	db $02,$02,$02,$02,$02,$02,$02,$02,$06,$06,$05,$02,$02,$FC,$FB,$FB
	db $FD,$FD,$BD

DATA_03F8E1:
	db $FD,$05,$05,$06,$06,$05,$05,$04,$04,$04,$05,$06,$05,$04,$04,$04
	db $04,$03,$06,$08,$04,$04,$04,$04,$04,$03,$04,$00,$FF,$FE,$02,$02
	db $02,$02,$F8,$F8,$F8,$F8,$FB,$FE,$00,$06,$06,$06,$06,$06,$01,$00
	db $FE,$03,$FF,$06,$01,$00,$02,$01,$00,$FF,$FF,$FF,$06,$06,$07,$07
	db $06,$04,$04,$04,$04,$04,$03,$04,$03,$08,$04,$04,$04,$04,$04,$03
	db $03,$04,$05,$05,$05,$04,$04,$04,$04,$04,$04,$04,$04,$05,$04,$04
	db $04,$04,$04,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$FE,$01,$01,$04,$04
	db $07,$07,$05,$06,$07,$05,$06,$07,$00,$04,$04,$04,$04,$04,$04,$05
	db $05,$02,$02,$02,$02,$05,$05,$04,$04,$04,$04,$04,$04,$01,$FD,$FE
	db $FE,$FE,$FE,$FE,$FE,$03,$03,$03,$02,$02,$02,$02,$01,$00,$02,$02
	db $02,$02,$01,$01,$00,$00,$00,$01,$02,$03,$04,$03,$03,$04,$05,$04
	db $05,$06,$06,$07,$07,$06,$04,$04,$04,$03,$02,$03,$05,$04,$04,$03
	db $02,$02,$02,$03,$04,$05,$05,$05,$07,$06,$05,$00,$00,$00,$00,$00
	db $00,$00,$01,$01,$00,$00,$01,$01,$02,$02,$02,$02,$00,$00,$01,$01
	db $01,$01,$05,$05,$04,$04,$04,$04,$06,$06,$05,$05,$04,$04,$05,$05
	db $06,$07,$0A,$09,$0A,$0A,$0B,$0B,$0A,$0A,$0A,$0A,$0A,$06,$0B,$0C
	db $08,$05,$05,$05,$05,$04,$05,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$05,$05,$05,$05,$05,$05,$05,$05,$03,$04
	db $02,$07,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$05,$05,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$01,$FB,$03,$FB,$FE,$04,$04,$04,$04,$00,$00,$06,$08,$00
	db $05,$05,$06,$06,$05,$05,$04,$04,$04,$05,$06,$05,$04,$05,$04,$04
	db $03,$06,$08,$04,$04,$05,$05,$05,$03,$04,$04,$03,$02,$02,$02,$02
	db $01,$F8,$F8,$F8,$F8,$FB,$FE,$00,$05,$07,$09,$04,$00,$03,$03,$04
	db $06,$04,$04,$02,$02,$04,$03,$02,$02,$02,$01,$06,$06,$07,$07,$06
	db $05,$05,$05,$05,$05,$03,$05,$03,$08,$04,$04,$04,$05,$05,$03,$03
	db $04,$05,$05,$04

DATA_03FAE5:
	db $05,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D,$0B
	db $07,$0A,$03,$BA,$AC,$00,$0D,$0D,$0D,$0D,$0D,$0D,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$00,$00,$00,$00,$00,$07
	db $06,$06,$07,$08,$07,$07,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$40
	db $40,$40,$40,$40,$40,$40,$40,$40,$40,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$40
	db $40,$40,$40,$40,$40,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $0A,$09,$08,$07,$06,$05,$04,$02,$00,$01,$03,$03,$03,$03,$0B,$0C
	db $0D,$0E,$0F,$10,$11,$12,$12,$12,$12,$12,$12,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$40,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$40,$40,$40,$40,$40,$00,$40,$00,$00,$00,$00,$40,$00,$00,$00
	db $40,$40,$40,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$40,$40
	db $40,$00,$00,$00,$00,$00,$00,$40,$40,$40,$40,$40,$40,$4D,$4B,$49
	db $4A,$4A,$07,$48,$08,$49,$4B,$4A,$49,$49,$4A,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$47,$46
	db $46,$47,$48,$07

DATA_03FCE9:
	db $47,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$0D
	db $0A,$04,$00,$00,$00,$00,$0A,$09,$08,$04,$04,$04,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$09
	db $09,$0A,$0B,$0A,$0A,$09,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $0B,$0B,$0C,$0C,$0C,$0B,$0A,$0A,$0A,$08,$07,$08,$09,$08,$0A,$09
	db $08,$08,$08,$09,$0A,$0A,$0A,$0B,$0C,$0B,$0A,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$0D,$0A
	db $03,$F9,$EB,$E2,$D8,$09,$09,$08,$FE,$FF,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$09,$09
	db $0A,$0B,$0A,$0C,$0B

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($03FEEE, incbin, DATA_03FEEE_YI_U2.bin)
else
	%FREE_BYTES($03FEEE, 274, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank04Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_048000:
	TYX
	RTS

;---------------------------------------------------------------------------

YI_NorSpr005_IcyWatermelon_Init:
YI_NorSpr007_Watermelon_Init:
YI_NorSpr009_FireWatermelon_Init:
;$048002
	JSL.l CODE_02A007
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0003
	BNE.b CODE_048066
	RTL

;---------------------------------------------------------------------------

YI_NorSpr005_IcyWatermelon_Main:
YI_NorSpr007_Watermelon_Main:
YI_NorSpr009_FireWatermelon_Main:
;$048031
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr005_IcyWatermelon
	BNE.b CODE_048041
	JSL.l CODE_048131
CODE_048041:
	LDA.w $7542,x
	BNE.b CODE_04809D
	LDY.w $7D36,x
	DEY
	BMI.b CODE_04809C
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_04809C
	LDA.w $7D38,y
	BEQ.b CODE_04809C
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
CODE_048060:
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_048066:
	LDA.w $6FA0,x
	AND.w #$F9FF
	ORA.w #$0220
	STA.w $6FA0,x
CODE_048072:
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w $7042,x
	AND.w #$00CF
	ORA.w #$0020
	STA.w $7042,x
	LDA.w #$0040
	STA.w $7542,x
CODE_04809C:
	RTL

CODE_04809D:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0480BF
	JSL.l CODE_03A590
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0480BC
	CMP.w #$0200
	BCC.b CODE_0480BC
	LSR
	EOR.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0480BF

CODE_0480BC:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0480BF:
	LDY.b $18,x
	BEQ.b CODE_0480FC
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0480EB
	LDA.w $70E2,y
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0480EB
	LDA.w $7182,y
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$001C
	CMP.w #$0038
	BCC.b CODE_0480FC
CODE_0480EB:
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STZ.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JMP.w CODE_048066

CODE_0480FC:
	LDA.b $76,x
	BEQ.b CODE_048130
	LDY.w $7D36,x
	BPL.b CODE_048115
	JSL.l CODE_03A858
	LDA.w $7C16,x
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_048124

CODE_048115:
	LDA.w $7860,x
	AND.w #$0001
CODE_04811A:
	BEQ.b CODE_048130
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_0085D2
CODE_048124:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_048130:
	RTL

CODE_048131:
	LDA.w $7A96,x
	BNE.b CODE_0480FC
	LDA.w #$000C
	STA.w $7A96,x
	JML.l CODE_03B5C3

;---------------------------------------------------------------------------

YI_NorSpr015_SubmarineTorpedo_Init:
;$048140
	JSL.l CODE_03AD24
	BCS.b CODE_048149
	JMP.w CODE_0481C0

CODE_048149:
	SEP.b #$20
	LDA.b #$7F
	STA.w $7863,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_048153:
	dw $0000,$8040,$8000,$00C0,$8080,$0040,$0080,$80C0

DATA_048163:
	dw $0200,$FE00

DATA_048167:
	dw $0800,$F800

YI_NorSpr015_SubmarineTorpedo_Main:
;$04816B
	JSL.l CODE_03AA2E
	JSL.l CODE_03AF23
	INC.b $16,x
	JSL.l CODE_03A2F8
	BCS.b CODE_0481C4
	LDY.w $7D36,x
	DEY
	BMI.b CODE_04819C
	LDA.w $6FA2,y
	AND.w #$6000
	BNE.b CODE_04819C
CODE_048189:
	SEP.b #$20
	LDA.w $74A0,y
	STA.w $74A0,x
	REP.b #$20
	TYX
	JSL.l CODE_03B507
	LDX.b $12
	BRA.b CODE_0481A1

CODE_04819C:
	LDA.w $7860,x
	BEQ.b CODE_0481C8
CODE_0481A1:
	LDA.w #!Define_YI_AmbSpr1C4
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0003
	STA.w $7E4C,y
	LDA.w #$0002
	STA.w $7782,y
CODE_0481C0:
	JSL.l CODE_03A31E
CODE_0481C4:
	STZ.w $61C4
	RTL

CODE_0481C8:
	LDA.b $18,x
	LDY.w $7400,x
	BNE.b CODE_0481D3
	EOR.w #$00FF
	INC
CODE_0481D3:
	AND.w #$01FE
	STA.b $00
	LDY.w $7862,x
	BNE.b CODE_0481E3
	LDA.w #$0080
	JMP.w CODE_04827F

CODE_0481E3:
	LDA.b $16,x
	AND.w #$0007
	BEQ.b CODE_0481ED
	JMP.w CODE_048290

CODE_0481ED:
	TXA
	STA.w $6000
	LDX.b #FXCODE_098D5E>>16
	LDA.w #FXCODE_098D5E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDY.w $6000
	BPL.b CODE_04820C
	LDX.b $12
	LDY.b #$00
	LDA.b $76,x
	BMI.b CODE_048209
	LDY.b #$02
CODE_048209:
	JMP.w CODE_04828C

CODE_04820C:
	LDY.b #$00
	LDA.w $6002
	BPL.b CODE_048219
	LDY.b #$04
	EOR.w #$FFFF
	INC
CODE_048219:
	CMP #$0100
	BCS.b CODE_04828E
	STA.b $02
	TAX
	LDA.w $6004
	BPL.b CODE_04822C
	INY
	INY
	EOR.w #$FFFF
	INC
CODE_04822C:
	CMP.w #$0100
	BCS.b CODE_04828E
	CMP.b $02
	BCC.b CODE_048239
	INY
	TAX
	LDA.b $02
CODE_048239:
	CPX.b #$10
	BCS.b CODE_04824D
	LDY.w $6000
	LDA.w $6FA0,y
	AND.w #$0200
	BEQ.b CODE_04824D
	LDX.b $12
	JMP.w CODE_048189

CODE_04824D:
	XBA
	STA.w !REGISTER_DividendLo
	STX.w !REGISTER_Divisor
	TYA
	ASL
	TAY
	NOP #4
	REP.b #$10
	LDA.w !REGISTER_QuotientLo
	ASL
	TAX
	CPX.w #$0202
	BCC.b CODE_04826A
	LDX.w #$0200
CODE_04826A:
	LDA.w DATA_048153,y
	ASL
	STA.b $02
	LDA.l FXDATA_0BB810,x
	BCC.b CODE_04827A
	EOR.w #$FFFF
	INC
CODE_04827A:
	CLC
	ADC.b $02
	SEP.b #$10
CODE_04827F:
	SBC.b $00
	LDY.b #$00
	AND.w #$0100
	BEQ.b CODE_04828A
	LDY.b #$02
CODE_04828A:
	LDX.b $12
CODE_04828C:
	STY.b $78,x
CODE_04828E:
	LDX.b $12
CODE_048290:
	LDY.b $78,x
	LDA.b $76,x
	CMP.w DATA_048167,y
	BEQ.b CODE_04829F
	CLC
	ADC.w DATA_048163,y
	STA.b $76,x
CODE_04829F:
	AND.w #$FF00
	BPL.b CODE_0482A7
	ORA.w #$00FF
CODE_0482A7:
	XBA
	CLC
	ADC.b $00
	AND.w #$01FE
	STA.b $00
	SEC
	SBC.w #$0081
	LDY.b #$02
	CMP.w #$00FF
	LDA.b $00
	BCS.b CODE_0482C6
	EOR.w #$00FF
	INC
	AND.w #$01FE
	LDY.b #$00
CODE_0482C6:
	STA.b $18,x
	PHA
	REP.b #$10
	TYA
	STA.w $7400,x
	TXY
	LDX.b $00
	LDA.l DATA_00E954,x
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_00E9D4,x
	EOR.w #$FFFF
	INC
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	PLA
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.w $7722,y
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w #FXDATA_540000+$30A0
	LDA.b $14
	AND.w #$0002
	BEQ.b CODE_048311
	LDY.w #FXDATA_540000+$30B0
CODE_048311:
	TYA
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$30A0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_08867E>>16
	LDA.w #FXCODE_08867E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

YI_NorSpr018_WatermelonFlame_Init:
;$04832C
	RTL

;---------------------------------------------------------------------------

DATA_04832D:
	dw $0008,$FFF8,$0008,$FFF8

DATA_048335:
	dw $0008,$0008,$FFF8,$FFF8

YI_NorSpr018_WatermelonFlame_Main:
;$04833D
	JSL.l CODE_03AF23
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700007,x
	AND.w #$00FF
	CMP.w #$0089
	BNE.b CODE_04839D
	LDA.l $700006,x
	AND.w #$00FF
	ASL
	TAY
	LDA.l $700000,x
	AND.w #$FFF0
	CLC
	ADC.w DATA_04832D,y
	STA.w $6000
	LDA.l $700002,x
	AND.w #$FFF0
	CLC
	ADC.w DATA_048335,y
	STA.w $6002
	JSL.l CODE_00E01F
	SEP.b #$10
	LDA.w #!Define_YI_AmbSpr213
	JSL.l CODE_008B21
	LDA.w $6000
	STA.w $70A2,y
	LDA.w $6002
	STA.w $7142,y
	LDA.w #$0008
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
CODE_04839D:
	SEP.b #$10
	LDX.b $12
	LDA.w $7A96,x
	AND.w #$0003
	BNE.b CODE_0483B8
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0004
	BCC.b CODE_0483B8
	JML.l CODE_03A31E

CODE_0483B8:
	LDA.w $7A38,x
	BNE.b CODE_048413
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0483CA:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_048412
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0483E1
	LDA.w $7040,y
	AND.w #$0010
	BNE.b CODE_0483EC
CODE_0483E1:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_RT_00DE47
	BRA.b CODE_0483CA

CODE_0483EC:
	LDA.w #$0012
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w $7FEE
	BNE.b CODE_048400
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
CODE_048400:
	LDA.w #$0000
	STA.w $7A96,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w $7540,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_048412:
	RTL

CODE_048413:
	LDY.w $7D36,x
	BPL.b CODE_048427
	LDA.w $61D6
	BNE.b CODE_048427
	JSL.l CODE_03A858
	LDA.w #$0002
	STA.w $03BC
CODE_048427:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr006_WatermelonFreeze_Init:
;$048428
	RTL

;---------------------------------------------------------------------------

YI_NorSpr006_WatermelonFreeze_Main:
;$048429
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	BNE.b CODE_048441
	LDA.w #$0006
	STA.w $7A96,x
	DEC.w $7402,x
	BPL.b CODE_048441
	JML.l CODE_03A31E

CODE_048441:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_04844E:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0484BF
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_04846A
	LDA.w $7D96,y
	BNE.b CODE_04846A
	LDA.w $7040,y
	AND.w #$0040
	BNE.b CODE_048475
CODE_04846A:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_RT_00DE47
	BRA.b CODE_04844E

CODE_048475:
	TYX
	LDA.w #!Define_YI_SoundIDA0_FreezeEnemy
	JSL.l CODE_0085D2
	LDA.w #$0200
	STA.w $7D96,x
	STZ.w $7A98,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
CODE_04849E:
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDX.b $12
CODE_0484BF:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr019_Bubble_Init:
;$0484C0
	RTL

;---------------------------------------------------------------------------

DATA_0484C1:
	dw $0003,$0003,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0002,$0001,$0000

DATA_0484ED:
	dw $FFF0,$0010,$FFE8,$0018,$FFE0,$0020,$FFD8,$0028

DATA_0484FD:
	dw $0001,$0002,$0000,$0002

DATA_048505:
	dw $FE00,$0200,$FE00,$0200

YI_NorSpr019_Bubble_Main:
;$04850D
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	BNE.b CODE_048579
	LDA.w $7A98,x
	BEQ.b CODE_048528
	LSR
	BEQ.b CODE_048524
	JSL.l CODE_0485E5
	BRA.b CODE_04852C

CODE_048524:
	INC
	STA.w $7402,x
CODE_048528:
	JSL.l CODE_0485C9
CODE_04852C:
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0003
	ASL
	LDY.w $7221,x
	BPL.b CODE_048539
	INC
CODE_048539:
	ASL
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0484ED,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w DATA_0484ED,y
	BMI.b CODE_04855D
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0006
	CLC
	ADC.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	LDA.w #$0030
	STA.w $7A96,x
CODE_04855D:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$FF80
	BPL.b CODE_048578
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0003
	ASL
	ASL
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0484ED+$02,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_048578:
	RTL

CODE_048579:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$0001
	BNE.b CODE_048585
	JML.l CODE_03A31E

CODE_048585:
	BIT.w #$0003
	BNE.b CODE_0485C9
	LSR
	LSR
	ASL
	TAY
	LDA.w DATA_0484C1,y
	STA.w $7402,x
	DEC
	BEQ.b CODE_0485B3
	DEC
	BNE.b CODE_0485B9
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	BMI.b CODE_0485B9
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	INC.b $18,x
	LDA.b $18,x
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_0484FD,y
	STA.w $7402,x
	BRA.b CODE_0485B9

CODE_0485B3:
	DEC.w $7182,x
	DEC.w $7182,x
CODE_0485B9:
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0001
	BNE.b CODE_0485C2
	DEC
CODE_0485C2:
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
CODE_0485C9:
	LDY.w $7D36,x
	BPL.b CODE_0485E5
	LDY.w $77C2,x
	LDA.w DATA_048505,y
	STA.w $60B4
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0008
	STA.w $60C0
	BRA.b CODE_04862A

CODE_0485E5:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_048654
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_048654
	LDA.w $7040,y
	AND.w #$0020
	BEQ.b CODE_048654
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr1A5_RunAwayMonkey
	BCC.b CODE_048609
	CMP.w #!Define_YI_NorSpr1AA_HotLips
	BCS.b CODE_048609
	PHX
	TYX
	STX.b $12
	JSL.l CODE_02B2BB
	TXY
	PLX
	STX.b $12
endif
CODE_048609:
	LDA.w $7C16,y
	ASL
	LDA.w #$FE00
	BCS.b CODE_048615
	LDA.w #$0200
CODE_048615:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0020
	STA.w $7D38,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
CODE_04862A:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1D0
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000A
	STA.w $7E4C,y
	LDA.w #$0002
	STA.w $7782,y
	JML.l CODE_03A31E

CODE_048654:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr01D_DrFreezegoodOnSkiLift_Init:
;$048655
	LDA.w #$001C
	JSL.l CODE_03A34C
	BCC.b CODE_04868A
	INY
	TYA
	STA.w $7A38,x
	SEP.b #$20
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	REP.b #$20
	LDA.w $703F,y
	AND.w #$FFF3
	STA.w $703F,y
CODE_048674:
	LDA.w $70E2,x
	STA.w $70E1,y
	LDA.w $7182,x
	CLC
	ADC.w #$000D
	STA.w $7181,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $721F,y
YI_NorSpr01A_SkiLift_Init:
CODE_04868A:
	RTL

;---------------------------------------------------------------------------

DATA_04868B:
	dw $0007,$0005

DATA_04868F:
	dw $0006,$0004

DATA_048693:
	dw $0080,$FF80

DATA_048697:
	dw $FFFC,$0004,$FFF0,$0000,$000F,$FFFF,$FFF8,$0000
	dw $0008,$000F,$0008,$FFFF,$001F,$FFFF,$000F,$FFF0

DATA_0486B7:
	dw $FFE0,$0000,$0000,$0000,$0002,$0002,$FFFE,$FFFE
	dw $0001,$0001,$0001,$FFFF,$FFFF,$FFFF,$FFFC,$FFFC
	dw $FFFC,$0004

DATA_0486DB:
	dw $0004,$0004,$0000,$0000,$00B5,$00B5,$00B5,$00B5
	dw $00E4,$00E4,$00E4,$00E4,$00E4,$00E4,$0072,$0072
	dw $0072,$0072,$0072,$0072,$0100,$0100

YI_NorSpr01A_SkiLift_Main:
YI_NorSpr01D_DrFreezegoodOnSkiLift_Main:
;$048707
	JSL.l CODE_03A2DE
	BCC.b CODE_04871B
	LDY.w $7A38,x
	BEQ.b CODE_04871A
	DEY
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
CODE_04871A:
	RTL

CODE_04871B:
	JSL.l CODE_03AF23
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700006,x
	SEP.b #$10
	LDX.b $12
	SEC
	SBC.w #$0092
	CMP.w #$0002
	BCS.b CODE_04877B
	ASL
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w DATA_048693,y
	EOR.w DATA_048693,y
	BMI.b CODE_04874A
	LDA.w DATA_048693,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_04874A:
	LDA.w DATA_048697,y
	LDY.b #$00
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_04875A
	LDY.b #$02
CODE_04875A:
	CLC
	ADC.w #$0010
	CMP.w #$0020
	STZ.w $7402,x
	BCS.b CODE_048769
	INC.w $7402,x
CODE_048769:
	TYA
	STA.w $7400,x
	LDA.w $7182,x
	AND.w #$FFF0
	ORA.w #$0008
	STA.w $7182,x
	BRA.b CODE_0487E7

CODE_04877B:
	CMP.w #$0004
	BCC.b CODE_0487E7
	CMP.w #$0016
	BCS.b CODE_0487E7
	ASL
	TAY
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700000,x
	AND.w #$000F
	STA.b $00
	SEP.b #$10
	LDX.w DATA_0486B7,y
	STX.w !REGISTER_Mode7MatrixParameterA
	LDX.w DATA_0486B7+$01,y
	STX.w !REGISTER_Mode7MatrixParameterA
	TAX
	STX.w !REGISTER_Mode7MatrixParameterB
	LDX.b $12
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	AND.w #$000F
	STA.b $02
	LDA.w !REGISTER_PPUMultiplicationProductLo
	CMP.w #$8000
	ROR
	CLC
	ADC.w DATA_048693,y
	CLC
	SBC.b $02
	BPL.b CODE_0487E7
	LSR.b $00
	LSR.b $00
	LSR.b $00
	ADC.w $7182,x
	STA.w $7182,x
	LDA.w #$0200
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_0486DB,y
	LDY.w $7400,x
	BNE.b CODE_0487E4
	EOR.w #$FFFF
	INC
CODE_0487E4:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0487E7:
	LDY.w $7400,x
	LDA.w DATA_04868B,y
	STA.w $74A2,x
	LDA.w $7A38,x
	BEQ.b CODE_048815
	LDA.w DATA_04868F,y
	LDY.w $7A38,x
	STA.w $74A1,y
	LDA.w $7400,x
	STA.w $73FF,y
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_04880F
	ASL
	ROL
	AND.w #$0001
	INC
CODE_04880F:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D7|!EXRAMBankMirror,y
	JMP.w CODE_048674

CODE_048815:
	LDA.b $78,x
	BEQ.b CODE_048862
	LDA.w $60C0
	BEQ.b CODE_048844
	LDA.w $60B4
	BNE.b CODE_048836
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.b $78,x
	BMI.b CODE_048836
	LDA.w $72C0,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BRA.b CODE_048867

CODE_048836:
	STZ.b $78,x
	LDA.w $60B4
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60B4
	BRA.b CODE_0488B3

CODE_048844:
	STZ.b $78,x
	LDA.w DATA_04868F,y
	STA.w $611A
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
	LDA.w $72C0,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BRA.b CODE_048867

CODE_048862:
	LDA.w $60C0
	BEQ.b CODE_0488B3
CODE_048867:
	LDA.w $60AA
	BMI.b CODE_0488B3
	LDY.w $0D94
	BNE.b CODE_0488B3
	LDA.w $7C16,x
	CLC
	ADC.w #$0014
	CMP.w #$0028
	BCS.b CODE_0488B3
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	CMP.w #$FFF4
else
	CMP.w #$FFF5
endif
	BCC.b CODE_0488B3
	STA.b $00
	LDY.w $61B6
	BEQ.b CODE_048895
	CPX.w $61B6
	BNE.b CODE_0488B3
CODE_048895:
	STX.w $61B6
	LDA.b $00
	INC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0400
	STA.w $60AA
	INC.w $61B4
	STZ.w $60FA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $78,x
	RTL

CODE_0488B3:
	CPX.w $61B6
	BNE.b CODE_0488BB
	STZ.w $61B6
CODE_0488BB:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr01B_VerticalLavaLog_Init:
;$0488BC
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	LDA.w #$0008
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$03
	BEQ.b CODE_0488D3
	CPY.b #$0D
	BNE.b CODE_0488D6
CODE_0488D3:
	LDA.w #$FFF6
CODE_0488D6:
	STA.w $7720,x
	STA.b $16,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr01B_VerticalLavaLog_Main:
;$0488DC
	JSL.l CODE_03AF23
	LDY.w $7862,x
	BEQ.b CODE_0488FA
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_04890F
	STZ.b $18,x
	SEC
	SBC.w #$0008
	CMP.w #$FF80
	BCS.b CODE_048930
	LDA.w #$FF80
	BRA.b CODE_048930

CODE_0488FA:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_04891C
	STZ.b $18,x
	CLC
	ADC.w #$0008
	CMP.w #$0080
	BCC.b CODE_048930
	LDA.w #$0080
	BRA.b CODE_048930

CODE_04890F:
	LSR
	LSR
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$FFFC
	BRA.b CODE_048927

CODE_04891C:
	EOR.w #$FFFF
	INC
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0004
CODE_048927:
	CLC
	ADC.b $18,x
	STA.b $18,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_048930:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $78,x
	LDA.w $60AA
	BMI.b CODE_04899B
	LDA.w $6120
	CLC
	ADC.w #$0005
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_04899B
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w #$0010
	CMP.w #$FFF6
	BCC.b CODE_04899B
	INC
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7720,x
	SEC
	SBC.b $16,x
	BNE.b CODE_048981
	LDA.w #$FFF8
	CLC
	ADC.b $16,x
	STA.w $7720,x
	LDA.w $60AA
	LSR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_048981:
	LDA.w #$0100
	STA.w $60AA
	INC.w $61B4
	STZ.w $60FA
	LDA.w $7C16,x
	BNE.b CODE_048993
	INC
CODE_048993:
	ASL
	AND.w #$01FE
	STA.b $78,x
	BRA.b CODE_0489B2

CODE_04899B:
	LDA.w $7720,x
	SEC
	SBC.b $16,x
	BEQ.b CODE_0489B2
	LDA.b $16,x
	STA.w $7720,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0489B2:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr12A_ShyGuyBanditTrap_Init:
;$0489B3
	LDY.b #$05
	STY.b $76,x
	RTL

;---------------------------------------------------------------------------

DATA_0489B8:
	dw $0001,$0003,$0005,$0009

YI_NorSpr01E_Shyguy_Init:
YI_NorSpr133_LanternGhost_Init:
;$0489C0
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0489F8
	JSL.l CODE_0EB8AE
	BNE.b CODE_0489F8
	LDA.w #$0060
	STA.w $6FA0,x
	LDA.w #$4000
	STA.w $6FA2,x
	LDA.w #$0005
	STA.w $7040,x
	LDA.w #$00FF
	STA.w $74A2,x
	STZ.w $7542,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,x
	LDY.b #$08
	STY.b $76,x
	RTL

CODE_0489F8:
	JSL.l CODE_048A18
	JSL.l CODE_02A007
CODE_048A00:
	LDA.w #$0018
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr01E_Shyguy
	BEQ.b CODE_048A17
	LDY.b #$02
	STY.b $78,x
CODE_048A17:
	RTL

CODE_048A18:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BIT.w #$0001
	BNE.b CODE_048A3C
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.w #$0010
	LSR
	LSR
	ORA.b $00
	TAY
	LDA.w DATA_0489B8,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_048A3C:
	AND.w #$00FE
	ORA.w #$0020
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

DATA_048A46:
	dw CODE_048DA0
	dw CODE_048E14
	dw CODE_048EB5
	dw CODE_048F0F
	dw CODE_048F22
	dw CODE_048000
	dw CODE_048F57
	dw CODE_048F90
	dw CODE_048FD0

YI_NorSpr01E_Shyguy_Main:
YI_NorSpr12A_ShyGuyBanditTrap_Main:
YI_NorSpr133_LanternGhost_Main:
;$048A58
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_048A8A
	JSR.w CODE_048ACB
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_048A8A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	SEC
	SBC.w #$0010
	ORA.w $7D96,x
	BNE.b CODE_048A8A
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_048AAB
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_048A8E
	JML.l CODE_03B273

CODE_048A8A:
	JSL.l CODE_03AF23
CODE_048A8E:
	LDY.b $76,x
	TYA
	ASL
	TXY
	TAX
	JSR.w (DATA_048A46,x)
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_048AAB
	LDA.w $7AF6,x
	BNE.b CODE_048AA8
	JSR.w CODE_048B8D
	JSR.w CODE_048BDF
CODE_048AA8:
	JSR.w CODE_048AAC
CODE_048AAB:
	RTL

CODE_048AAC:
	LDA.w $6FA0,x
	AND.w #$FFBF
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_048AC3
	LDY.w $7A36,x
	BEQ.b CODE_048AC3
	DEC.w $7A36,x
	ORA.w #$0040
CODE_048AC3:
	STA.w $6FA0,x
	RTS

DATA_048AC7:
	dw $001B,$001C

CODE_048ACB:
	LDA.w $7722,x
	BMI.b CODE_048B0D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_048ADD
	LDY.w $74A2,x
	BMI.b CODE_048B0A
CODE_048ADD:
	LDY.w $7403,x
	BNE.b CODE_048B0A
	LDA.w $7362,x
	BMI.b CODE_048B0A
	JSL.l CODE_03AA2E
	REP.b #$10
	LDY.w $7362,x
	LDA.w #$8000
	STA.w $6008,y
	STA.w $6010,y
	LDA.w $7040,x
	AND.w #$2000
	BEQ.b CODE_048B0A
	LDA.w #$8000
	STA.w $6018,y
	STA.w $6020,y
CODE_048B0A:
	SEP.b #$10
	RTS

CODE_048B0D:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_048B72
	LDA.w $7D96,x
	BNE.b CODE_048B0A
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_048B24
CODE_048B20:
	LDY.b $78,x
	BNE.b CODE_048B3E
CODE_048B24:
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6004,y
	AND.w #$F1FF
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$F1FF
	STA.w $600C,y
	SEP.b #$10
	RTS

CODE_048B3E:
	LDY.b $79,x
	LDA.w $7AF8,x
	BNE.b CODE_048B58
	LDA.b $10
	AND.w #$0003
	INC
	INC
	STA.w $7AF8,x
	INY
	INY
	TYA
	AND.w #$0002
	TAY
	STY.b $79,x
CODE_048B58:
	LDA.w DATA_048AC7,y
	STA.b $02
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6004,y
	ORA.b $02
	AND.w #$F1FF
	ORA.w #$0200
	STA.w $6004,y
	SEP.b #$10
CODE_048B72:
	RTS

CODE_048B73:
	LDA.w #$0020
	STA.w $7A36,x
	LDA.w $7722,x
	BMI.b CODE_048B82
	JSL.l CODE_03AEFD
CODE_048B82:
	JSR.w CODE_048C80
	PHB
	PHK
	PLB
	JSR.w CODE_048EBB
	PLB
	RTL

CODE_048B8D:
	LDY.w $7D36,x
	BMI.b CODE_048B9B
	CPX.w $61B6
	BNE.b CODE_048B9A
	STZ.w $61B6
CODE_048B9A:
	RTS

CODE_048B9B:
	LDY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr074_Spike
	BNE.b CODE_048BAB
	CPY.b #$03
	BNE.b CODE_048BBB
	BRA.b CODE_048BAF

CODE_048BAB:
	CPY.b #$02
	BNE.b CODE_048BB4
CODE_048BAF:
	PLA
	JML.l CODE_03B273

CODE_048BB4:
	CPY.b #$05
	BNE.b CODE_048BBB
	JSR.w CODE_048D13
CODE_048BBB:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCS.b CODE_048BD0
	PLA
	JSL.l CODE_03A813
CODE_048BD0:
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
	RTS

CODE_048BDB:
	JSR.w CODE_048BDF
	RTL

CODE_048BDF:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_048BEC:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_048BF5
	BNE.b CODE_048C01
CODE_048BF5:
	RTS

CODE_048BF6:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_048BEC

CODE_048C01:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr074_Spike
	BNE.b CODE_048C16
	LDA.b $76,x
	AND.w #$00FF
	CMP.w #$0003
	BNE.b CODE_048C23
	JMP.w CODE_048CED

CODE_048C16:
	LDA.b $76,x
	AND.w #$00FF
	CMP.w #$0002
	BNE.b CODE_048C23
	JMP.w CODE_048CED

CODE_048C23:
	LDA.w $6FA0,y
	AND.w #$0200
	BEQ.b CODE_048BF6
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_048BF6
	LDA.w $7D38,y
	BEQ.b CODE_048BF6
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr156_CactusJack
	BEQ.b CODE_048BF6
	CMP.w #!Define_YI_NorSpr01E_Shyguy
	BEQ.b CODE_048C54
	CMP.w #!Define_YI_NorSpr12A_ShyGuyBanditTrap
	BEQ.b CODE_048C54
	CMP.w #!Define_YI_NorSpr133_LanternGhost
	BEQ.b CODE_048C54
	CMP.w #!Define_YI_NorSpr074_Spike
	BNE.b CODE_048C5E
CODE_048C54:
	TYX
	JSL.l CODE_03B273
	PLA
	JML.l CODE_03B273

CODE_048C5E:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	PHP
	LDA.w #$0200
	PLP
	BPL.b CODE_048C6B
	LDA.w #$FE00
CODE_048C6B:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TYX
	JSL.l CODE_03B24B
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
CODE_048C80:
	LDA.w #$0001
	STA.w $7D38,x
	LDA.w #$FFF0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_048CA0
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_048CA0
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_048CA0:
	STZ.w $75E0,x
	STZ.w $7540,x
	LDY.b #$02
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr074_Spike
	BNE.b CODE_048CB2
	LDY.b #$03
CODE_048CB2:
	STY.b $76,x
	LDA.w #$0040
	STA.w $7542,x
	LSR
	ORA.w $7042,x
	STA.w $7042,x
	LDA.w #$0005
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr01E_Shyguy
	BNE.b CODE_048CD1
	STZ.b $78,x
CODE_048CD1:
	LDA.w #$0841
	STA.w $6FA2,x
	STZ.w $7A38,x
	JSL.l CODE_03AD24
	BCS.b CODE_048CEC
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	STZ.w $7402,x
CODE_048CEC:
	RTS

CODE_048CED:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_048CFD
	LDA.w $6FA2,y
	AND.w #$6000
	BEQ.b CODE_048D00
CODE_048CFD:
	JMP.w CODE_048BF6

CODE_048D00:
	LDA.w $6FA0,y
	AND.w #$0020
	BNE.b CODE_048CFD
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr156_CactusJack
	BEQ.b CODE_048CFD
	JMP.w CODE_048C54

CODE_048D13:
	LDA.w $61B2
	BPL.b CODE_048D5C
	LDA.w $7E48
	BEQ.b CODE_048D1F
	BPL.b CODE_048D5C
CODE_048D1F:
	JSL.l CODE_06BEBA
	LDA.w #$0020
	JSL.l CODE_03A364
	BCC.b CODE_048D40
	LDA.w $70E2,x
	STA.w $70E2,y
	STA.b $04
	LDA.w $7182,x
	STA.w $7182,y
	STA.b $06
	JSL.l CODE_048D5F
CODE_048D40:
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	TXA
	STA.w $7E48
	LDA.w #$8000
	STA.w $0390
	LDA.w #$FFFF
	STA.w $0CD0
	LDA.w #$0020
	STA.w $0CC8
CODE_048D5C:
	PLA
	PLA
	RTL

CODE_048D5F:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400
	EOR.w #$0002
	STA.w $7400,y
	LDA.w #$0000
	STA.w $7402,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	REP.b #$20
	STY.b $18
	LDA.b $04
	STA.w $70E2
	LDA.b $06
	SEC
	SBC.w #$000E
	STA.w $7182
	TYX
	JSL.l CODE_06BE72
	LDX.b $12
	RTL

DATA_048D98:
	dw $FEF4,$010C

DATA_048D9C:
	dw $FFA7,$0059

CODE_048DA0:
	TYX
	LDA.w $7860,x
	LSR
	BCC.b CODE_048DAA
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_048DAA:
	LDA.w $7A96,x
	BNE.b CODE_048DC2
	DEC.b $16,x
	BEQ.b CODE_048DC3
	LDA.w #$0018
	STA.w $7A96,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_048DC2:
	RTS

CODE_048DC3:
	LDA.b $10
	AND.w #$0003
	BNE.b CODE_048DD1
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
CODE_048DD1:
	LDY.w $7400,x
	LDA.w DATA_048D9C,y
	STA.w $75E0,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0020
	CPY.b #$00
	BNE.b CODE_048DEB
	EOR.w #$FFFF
	INC
CODE_048DEB:
	CLC
	ADC.w $70E2,x
	STA.w $7A38,x
	LDA.w #$0005
	STA.w $7540,x
	INC.b $76,x
	RTS

DATA_048DFB:
	dw $0004,$0008

DATA_048DFF:
	db $02,$02,$03,$03,$03,$03,$02,$01,$01,$02,$02,$02,$02,$01

DATA_048E0D:
	db $00,$03,$00,$02,$04,$01,$02

CODE_048E14:
	TYX
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_048E90
	AND.w #$0001
	STA.b $00
	LDY.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	TYA
	ORA.b $00
	BEQ.b CODE_048E90
	LDA.w $70E2,x
	SEC
	SBC.w $7A38,x
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCC.b CODE_048E90
	LDA.w $7A98,x
	BNE.b CODE_048E8F
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr124_Stretch
	BNE.b CODE_048E63
	LDY.b #$00
	LDA.w $7540,x
	CMP.w #$0005
	BNE.b CODE_048E53
	INY
	INY
CODE_048E53:
	LDA.w DATA_048DFB,y
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	RTS

CODE_048E63:
	INC.b $77,x
	LDY.b $77,x
	CPY.b #$07
	BMI.b CODE_048E6F
	LDY.b #$00
	STY.b $77,x
CODE_048E6F:
	LDA.w DATA_048E0D,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w $7540,x
	CMP.w #$0005
	BEQ.b CODE_048E86
	TYA
	CLC
	ADC.w #$0007
	TAY
CODE_048E86:
	LDA.w DATA_048DFF,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_048E8F:
	RTS

CODE_048E90:
	LDA.w #$0018
	STA.w $7A96,x
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0003
	STA.b $16,x
	LDY.b #$00
	STY.b $77,x
	STZ.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.b $76,x
	RTS

DATA_048EB1:
	dw FXDATA_540000+$6020,FXDATA_540000+$2040

CODE_048EB5:
	TYX
	LDA.w $7722,x
	BMI.b CODE_048F0E
CODE_048EBB:
	LDA.w $7A38,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w $7A38,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr074_Spike
	BNE.b CODE_048EDA
	LDA.w #FXDATA_540000+$20B0
	LDY.b #(FXDATA_540000+$20B0)>>16
	BRA.b CODE_048EE1

CODE_048EDA:
	LDY.b $78,x
	LDA.w DATA_048EB1,y
	LDY.b #(FXDATA_540000+$2040)>>16
CODE_048EE1:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08867E>>16
	LDA.w #FXCODE_08867E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_048F0E:
	RTS

CODE_048F0F:
	TYX
	LDA.w $7860,x
	AND.w #$001F
	BEQ.b CODE_048F21
	LDA.w #$0040
	STA.w $7542,x
	JSR.w CODE_048E90
CODE_048F21:
	RTS

CODE_048F22:
	TYX
	PLA
	STA.b $00
	JSL.l CODE_04C833
	LDA.b $00
	PHA
	LDA.w $7A96,x
	ORA.w $7542,x
	BNE.b CODE_048F56
	LDY.b $16,x
	BNE.b CODE_048F48
	LDA.b $10
	AND.w #$0018
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	INC.b $16,x
	RTS

CODE_048F48:
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.b $16,x
CODE_048F56:
	RTS

CODE_048F57:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_048F8B
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_048F76
	LDA.b $18,x
	CMP.w $7182,x
	BMI.b CODE_048F8B
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7A98,x
	RTS

CODE_048F76:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #!Define_YI_SoundID77_EnemyJumpingOutOfPipe
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_048F8B:
	RTS

DATA_048F8C:
	dw $FF00,$0100

CODE_048F90:
	TYX
	LDY.w $7223,x
	BMI.b CODE_048FA2
	LDA.w $7860,x
	LSR
	BCC.b CODE_048FCF
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_048FA2:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_048FCF
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$000F
	JSL.l CODE_0EB8B7
	BEQ.b CODE_048FCF
	STZ.b $18,x
	LDA.w #$0E81
	STA.w $6FA2,x
	LDY.w $7400,x
	LDA.w DATA_048F8C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_048FCF:
	RTS

CODE_048FD0:
	TYX
	LDA.w $7A96,x
	ORA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	BNE.b CODE_048FCF
	LDA.w $7C16,x
	CLC
	ADC.w #$001C
	CMP.w #$0038
	BCS.b CODE_048FF4
	LDA.w $7C18,x
	CLC
	ADC.w #$0021
	CMP.w #$0042
	BCC.b CODE_049063
CODE_048FF4:
	LDX.b #FXCODE_099204>>16
	LDA.w #FXCODE_099204
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0007
	BPL.b CODE_049063
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	JSL.l CODE_03A364
	BCC.b CODE_04906B
	LDA.w $70E2,x
	STA.w $70E2,y
	CLC
	ADC.w #$0008
	STA.w $7CD6,y
	LDA.w $7182,x
	STA.w $7182,y
	SEC
	SBC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	CLC
	ADC.w #$000E
	STA.w $7CD8,y
	SEP.b #$20
	LDA.w $77C2,x
	STA.w $7400,y
	REP.b #$20
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w $7542,y
	LDA.w #$0E80
	STA.w $6FA2,y
	TYX
	LDY.b #$06
	STY.b $76,x
	JSL.l CODE_048A18
	JSL.l CODE_048A00
	LDA.w #!Define_YI_SoundID76_EnemyPeekingOutOfPipe
	JSL.l CODE_0085D2
CODE_049063:
	LDX.b $12
	LDA.w #$00C0
	STA.w $7A96,x
CODE_04906B:
	RTS

;---------------------------------------------------------------------------

CODE_04906C:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr01E_Shyguy
	BEQ.b CODE_049086
	CMP.w #!Define_YI_NorSpr133_LanternGhost
	BEQ.b CODE_049086
	CMP.w #!Define_YI_NorSpr12A_ShyGuyBanditTrap
	BEQ.b CODE_049086
	CMP.w #!Define_YI_NorSpr09B_MaceGuy
	BEQ.b CODE_049086
	CMP.w #!Define_YI_NorSpr074_Spike
CODE_049086:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr01E_Shyguy_StompRt:
YI_NorSpr133_LanternGhost_StompRt:
;$049087
	JSR.w CODE_048B20
	LDA.w #$0001
	STA.w $7402,x
	JML.l CODE_039F9F

;---------------------------------------------------------------------------

YI_NorSpr12A_ShyGuyBanditTrap_RideYoshiRt:
;$049094
	JSR.w CODE_04909B
	JSR.w CODE_0490AF
	RTL

CODE_04909B:
	LDA.w $61D6
	CMP.w #$0087
	BNE.b CODE_0490F0
	LDA.w #$FFFF
	STA.w $7E48
	BRA.b CODE_0490B4

DATA_0490AB:
	dw $0100,$FF00

CODE_0490AF:
	LDA.w $61B2
	BPL.b CODE_0490F0
CODE_0490B4:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7AF6,x
	LDA.w #$0018
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $16,x
	STZ.b $76,x
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7D38,x
	ASL
	EOR.w $60C4
	TAY
	LDA.w DATA_0490AB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $0390
CODE_0490F0:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr124_Stretch_Init:
;$0490F1:
	LDA.w #$0018
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BPL.b CODE_049129
	JSL.l CODE_03AD74
	BCC.b CODE_049132
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w $7A36,x
	LDA.w #$2079
	STA.w $7040,x
	LDA.w #$0002
	STA.w $7402,x
	LDY.b #$06
	STY.b $76,x
	JSR.w CODE_04942A
	LDA.w $6020
	BRA.b CODE_049132

CODE_049129:
	LDA.w #$01FF
	STA.w $7A36,x
	LDA.w #$001E
CODE_049132:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JML.l CODE_048A18

;---------------------------------------------------------------------------

DATA_049139:
	dw CODE_048DA0
	dw CODE_048E14
	dw CODE_0491A0
	dw CODE_04924A
	dw CODE_049276
	dw CODE_0492C4
	dw CODE_049243

YI_NorSpr124_Stretch_Main:
;$049147
	LDA.w $7722,x
	BMI.b CODE_049150
	JSL.l CODE_03AA52
CODE_049150:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_04916C
	LDY.w $74A2,x
	BPL.b CODE_04916C
	LDA.w $7722,x
	BMI.b CODE_04916C
	LDA.w $7A36,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_04916C:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_049139,x)
	STZ.b $02
	JSR.w CODE_049351
	BCC.b CODE_049194
	JSL.l CODE_03AD74
	BCC.b CODE_049194
	LDA.w #$2079
	STA.w $7040,x
	LDA.w #$0002
	STA.w $7402,x
	STA.b $76,x
	RTL

CODE_049194:
	JML.l CODE_0DC14C

DATA_049198:
	dw $FC00,$0400

DATA_04919C:
	dw $FFF8,$0008

CODE_0491A0:
	TYX
	PLA
	LDA.w $7A36,x
	SEC
	SBC.w #$0020
	CMP.w #$0020
	BPL.b CODE_0491B1
	LDA.w #$0020
CODE_0491B1:
	STA.w $7A36,x
	LDA.w $0036
	AND.w $6084
	BEQ.b CODE_0491C9
	LDA.w $60A8
	STA.b $78,x
	LDY.b #$05
	STY.b $76,x
	JSR.w CODE_049401
	RTL

CODE_0491C9:
	JSR.w CODE_049306
	BCS.b CODE_0491D0
	INC.b $76,x
CODE_0491D0:
	LDA.w $7A36,x
	CMP.w #$0020
	BEQ.b CODE_049242
	LDA.w $7A98,x
	BNE.b CODE_049242
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0005
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $7400,x
	LDA.w DATA_049198,y
	STA.b $00
	LDA.w DATA_04919C,y
	STA.b $02
	LDA.w #$0107
	JSL.l CODE_03A364
	BCC.b CODE_049242
	LDA.w $70E2,x
	CLC
	ADC.b $02
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7D38,y
	STA.w $7A38,y
	LDA.w #$FFFF
	STA.w $7862,y
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #!Define_YI_SoundID45_SpitSeed
	JSL.l CODE_0085D2
CODE_049242:
	RTL

CODE_049243:
	TYX
	PLA
	LDA.w #$0020
	BRA.b CODE_04924F

CODE_04924A:
	TYX
	PLA
	LDA.w #$0080
CODE_04924F:
	CLC
	ADC.w $7A36,x
	CMP.w #$01FF
	BMI.b CODE_049269
	LDA.w #$FE9A
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$04
	STY.b $76,x
	LDA.w #$01FF
	STA.w $7A36,x
	RTL

CODE_049269:
	STA.w $7A36,x
	JSR.w CODE_049306
	BCC.b CODE_049275
	LDY.b #$02
	STY.b $76,x
CODE_049275:
	RTL

CODE_049276:
	TYX
	PLA
	LDA.w $7A36,x
	SEC
	SBC.w #$0010
	CMP.w #$01FF
	BPL.b CODE_0492B7
	STZ.w $7402,x
	LDA.w #$01FF
	STA.w $7A36,x
	LDA.w #$001E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSL.l CODE_03AEFD
	LDA.w #$1079
	STA.w $7040,x
	LDA.w #$0018
	STA.w $7A96,x
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0003
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.b $76,x
	RTL

CODE_0492B7:
	STA.w $7A36,x
	JSR.w CODE_049306
	BCC.b CODE_0492C3
	LDY.b #$02
	STY.b $76,x
CODE_0492C3:
	RTL

CODE_0492C4:
	TYX
	PLA
	LDA.w $7A36,x
	CLC
	ADC.w #$0060
	CMP.w #$01FF
	BMI.b CODE_0492FB
	LDA.w #$01FF
	STA.w $7A36,x
	LDA.b $78,x
	STA.w $60A8
	LDA.w #$F800
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	INC.w $7E0A
	LDA.w #$FD34
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	DEC.b $76,x
	RTL

CODE_0492FB:
	STA.w $7A36,x
	JSR.w CODE_049401
	RTL

;---------------------------------------------------------------------------

DATA_049302:
	dw $0166,$FE9A

CODE_049306:
	JSR.w CODE_04942A
	LDA.w $7AF6,x
	BNE.b CODE_04932C
	LDA.w $6020
	PHA
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w $72C2,x
	STA.b $02
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7C16,x
	CLC
	ADC.w #$000E
	CMP.w #$001C
	BCC.b CODE_04932F
CODE_04932C:
	JMP.w CODE_0493F7

CODE_04932F:
	SEC
	SBC.w #$0004
	CMP.w #$0014
	BCC.b CODE_049365
	BPL.b CODE_04933F
	LDA.w #$0080
	BRA.b CODE_049342

CODE_04933F:
	LDA.w #$FF80
CODE_049342:
	STA.w $60A8
	STA.w $60B4
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_049365

CODE_049351:
	LDA.w $7AF6,x
	BNE.b CODE_04932C
	LDA.w $7C16,x
	CLC
	ADC.w #$000E
	CMP.w #$001C
	BCC.b CODE_049365
	JMP.w CODE_0493F7

CODE_049365:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.b $02
	DEC
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BPL.b CODE_0493F7
	CMP.b $00
	BMI.b CODE_0493C1
	LDY.w $60AB
	BMI.b CODE_0493F7
	LDY.w $0D94
	BNE.b CODE_0493F7
	CPX.w $61B6
	BEQ.b CODE_04939D
	LDY.w $61B6
	BNE.b CODE_0493F7
	STX.w $61B6
CODE_04939D:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.b #$00
	STY.w !EXRAM_YI_Player_SubYPosLo|!EXRAMBankMirror
	STZ.w $60AA
	STZ.w $60D4
	INC.w $61B4
	SEC
	RTS

CODE_0493C1:
	DEC
	CMP.w #$FFEC
	BCC.b CODE_0493F7
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0493D0
	INY
	INY
CODE_0493D0:
	LDA.w DATA_049302,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	CMP.w #$8000
	ROR
	STA.w $60A8
	STA.w $60B4
	STZ.w $75E0,x
	LDA.w #$0008
	STA.w $7540,x
	JSL.l CODE_03A858
	LDA.w #$0020
	STA.w $7AF6,x
CODE_0493F7:
	CPX.w $61B6
	BNE.b CODE_0493FF
	STZ.w $61B6
CODE_0493FF:
	CLC
	RTS

;---------------------------------------------------------------------------

CODE_049401:
	JSR.w CODE_04942A
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	SEC
	SBC.w $6020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.b #$00
	STY.w !EXRAM_YI_Player_SubYPosLo|!EXRAMBankMirror
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60AA
	INC.w $61B4
	RTS

;---------------------------------------------------------------------------

CODE_04942A:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	SEC
	SBC.w #$0100
	BMI.b CODE_049439
	LSR
	LSR
	LSR
CODE_049439:
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0100
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0F00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_540000+$7020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_540000+$7020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D76B>>16
	LDA.w #FXCODE_08D76B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

YI_NorSpr192_PetalGuy_Init:
;$049481
	JSL.l CODE_048A18
	LDA.w #$0020
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

DATA_04948C:
	dw CODE_04951E
	dw CODE_04958F

YI_NorSpr192_PetalGuy_Main:
;$049490
	JSR.w CODE_0494EB
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0494D2
	JSR.w CODE_0496A6
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHA
	LDA.w $74A0,x
	PHA
	STZ.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	TXY
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	JSL.l CODE_03A366
	PLA
	SEP.b #$20
	STA.w $74A0,x
	REP.b #$20
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$00FE
	ORA.w #$0020
	STA.w $7042,x
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_0494D2:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_04948C,x)
	JSR.w CODE_0495DD
	RTL

DATA_0494E2:
	db $10,$10,$10,$10,$08,$20,$20,$FF,$FF

CODE_0494EB:
	LDY.w $7402,x
	LDA.w DATA_0494E2,y
	TAY
	BMI.b CODE_04950A
	REP.b #$10
	TYA
	CLC
	ADC.w $7362,x
	TAY
	LDA.w $6005,y
	AND.w #$FFF1
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $6005,y
	SEP.b #$10
CODE_04950A:
	RTS

DATA_04950B:
	dw $FFA7,$0059,$FEF4,$010C

DATA_049513:
	dw $0005,$000B

DATA_049517:
	db $05,$06,$07,$08,$07,$06,$05

CODE_04951E:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_049553
	LDA.w #$0004
	STA.w $7A98,x
	INC.b $18,x
	LDY.b $18,x
	LDA.w DATA_049517,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$03
	BNE.b CODE_049554
	LDA.w #$0040
	STA.w $7A98,x
	LDY.w $77C2,x
	LDA.b $10
	BIT.w #$0001
	BNE.b CODE_04954F
	AND.w #$0002
	TAY
CODE_04954F:
	TYA
	STA.w $7400,x
CODE_049553:
	RTS

CODE_049554:
	CPY.b #$07
	BNE.b CODE_049587
	LDY.w $7400,x
	LDA.w DATA_04950B,y
	STA.w $75E0,x
	TYA
	LSR
	AND.w #$FFFE
	TAY
	LDA.w DATA_049513,y
	STA.w $7540,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	LDA.w #$0003
	STA.w $7402,x
	INC
	STA.w $7A98,x
	STZ.b $18,x
	INC.b $76,x
CODE_049587:
	RTS

DATA_049588:
	db $03,$04,$03,$02,$00,$01,$02

CODE_04958F:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0495DC
	LDA.w #$0004
	LDY.w $7540,x
	CPY.b #$05
	BEQ.b CODE_0495A0
	LSR
CODE_0495A0:
	STA.w $7A98,x
	INC.b $18,x
	LDY.b $18,x
	CPY.b #$07
	BMI.b CODE_0495AF
	STZ.b $18,x
	LDY.b #$00
CODE_0495AF:
	LDA.w $7402,x
	CMP.w #$0003
	BNE.b CODE_0495D3
	LDA.w $7A96,x
	BNE.b CODE_0495D3
	LDA.w #$0005
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	STZ.b $18,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_0495D3:
	LDA.w DATA_049588,y
	AND.w #$00FF
	STA.w $7402,x
CODE_0495DC:
	RTS

CODE_0495DD:
	LDY.w $7D36,x
	BPL.b CODE_04963F
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_04963A
	LDY.w $60AB
	BMI.b CODE_0495DC
	LDY.w $60C0
	BEQ.b CODE_0495DC
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	JSR.w CODE_0496A6
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHA
	LDA.w $74A0,x
	PHA
	STZ.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	TXY
	LDA.w #$001E
	JSL.l CODE_03A34E
	PLA
	SEP.b #$20
	STA.w $74A0,x
	REP.b #$20
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$FFFE
	ORA.w #$0020
	STA.w $7042,x
	RTS

CODE_04963A:
	JSL.l CODE_03A858
	RTS

CODE_04963F:
	DEY
	BMI.b CODE_0496A5
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0496A5
	LDA.w $7D38,y
	BEQ.b CODE_0496A5
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	PHP
	LDA.w #$FE00
	PLP
	BMI.b CODE_04965C
	LDA.w #$0200
CODE_04965C:
	STA.b $0E
	TYX
	JSL.l CODE_03B24B
	BCC.b CODE_04966C
	LDA.w #$4E00
	STA.w $6FA0,x
	RTS

CODE_04966C:
	JSR.w CODE_0496A6
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHA
	LDA.w $74A0,x
	PHA
	STZ.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	TXY
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	JSL.l CODE_03A366
	PLA
	SEP.b #$20
	STA.w $74A0,x
	REP.b #$20
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$FFFE
	ORA.w #$0020
	STA.w $7042,x
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $7D38,x
	LDA.w #$0020
	STA.w $7AF6,x
CODE_0496A5:
	RTS

CODE_0496A6:					; Note: Routine that spawns the flower petals when attacking a flower guy.
	LDA.w #!Define_YI_AmbSpr210
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.w #$0017
	STA.w $73C2,y
	LDA.w #$0022
	STA.w $7002,y
	RTS

;---------------------------------------------------------------------------

YI_NorSpr02C_LungeFish_Init:
;$0496CC
	LDA.w $7182,x
	STA.w $7A36,x
	SEC
	SBC.w #$0020
	STA.w $7182,x
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_0496E6:
	dw CODE_04978A
	dw CODE_0497AD
	dw CODE_0497C6
	dw CODE_049896
	dw CODE_049991
	dw CODE_0499F2
	dw CODE_049A11
	dw CODE_049A21
	dw CODE_049A45
	dw CODE_049A61

YI_NorSpr02C_LungeFish_Main:
;$0496FA
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0496E6,x)
	JSR.w CODE_04970A
	RTL

CODE_04970A:
	LDY.w $74A2,x
	BMI.b CODE_049755
	LDY.b $76,x
	CPY.b #$04
	BMI.b CODE_049719
	CPY.b #$07
	BMI.b CODE_049755
CODE_049719:
	LDY.w $7D36,x
	BEQ.b CODE_049755
	BPL.b CODE_049756
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_049751
	LDY.w $60AB
	BMI.b CODE_049755
	LDY.w $60C0
	BEQ.b CODE_049755
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w $60D4
	BRA.b CODE_049770

CODE_049751:
	JSL.l CODE_03A858
CODE_049755:
	RTS

CODE_049756:
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_049789
	LDA.w $7D37,y
	BEQ.b CODE_049789
	DEY
	TYX
	JSL.l CODE_03B25B
	LDY.w $7402,x
	CPY.b #$02
	BEQ.b CODE_049789
CODE_049770:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0002
	STA.w $7402,x
	LDY.b #$07
	STY.b $76,x
CODE_049789:
	RTS

CODE_04978A:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0497A5
	LDA.w $7C16,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_0497A5
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0497A4:
	RTS

CODE_0497A5:
	JSL.l CODE_03A2F8
	BCC.b CODE_0497A4
	PLA
	RTL

CODE_0497AD:
	TYX
	JSR.w CODE_049943
	BPL.b CODE_0497BD
	LDA.w #$0040
	STA.w $7A96,x
	STZ.b $16,x
	INC.b $76,x
CODE_0497BD:
	RTS

DATA_0497BE:
	dw $0020,$FFE0

DATA_0497C2:
	dw $FF00,$0100

CODE_0497C6:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0497BD
	LDY.b #$00
	LDA.w $60A8
	BMI.b CODE_0497E0
	BNE.b CODE_0497DE
	LDA.w $60C4
	EOR.w #$0002
	TAY
	BRA.b CODE_0497E0

CODE_0497DE:
	INY
	INY
CODE_0497E0:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_0497BE,y
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LSR
	CLC
	ADC.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BCC.b CODE_049831
	BMI.b CODE_049808
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_04980F

CODE_049808:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_04980F:
	STA.w $70E2,x
	LDY.w $77C2,x
	LDA.b $00
	CLC
	ADC.w #$0100
	STA.b $00
	LDA.b $02
	CLC
	ADC.w #$0080
	CMP.b $00
	BCC.b CODE_049831
	STZ.w $7402,x
	LDA.w #$0008
	STA.b $76,x
	BRA.b CODE_04987D

CODE_049831:
	LDA.w $7C18,x
	CMP.w #$0040
	BMI.b CODE_049858
	INC.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	CMP.w #$0080
	BMI.b CODE_04988D
	STZ.w $7402,x
	LDA.w #$0060
	STA.w $7A96,x
	LDY.b #$09
	STY.b $76,x
	LDY.w $77C2,x
	LDA.w #$FF00
	BRA.b CODE_049880

CODE_049858:
	LDA.w DATA_0497C2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0340
	STA.w $75E2,x
	LDA.w #$0001
	STA.w $7402,x
	STZ.b $18,x
	PHY
	LDA.w #!Define_YI_SoundID83_LungeFish
	JSL.l CODE_0085D2
	PLY
	INC.b $76,x
CODE_04987D:
	LDA.w #$FCC0
CODE_049880:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	TYA
	STA.w $7400,x
	LDA.w #$0002
	STA.w $74A2,x
CODE_04988D:
	RTS

DATA_04988E:
	dw $0020,$FFE0

DATA_049892:
	dw $0180,$FE80

CODE_049896:
	TYX
	LDY.w $7223,x
	BMI.b CODE_0498A5
	LDA.w #$0002
	STA.w $7402,x
	JMP.w CODE_049931

CODE_0498A5:
	JSR.w CODE_049AA4
	LDA.w $7400,x
	DEC
	EOR.w $7C16,x
	BPL.b CODE_0498F0
	LDA.w $7C16,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0498F0
	LDA.w $7C18,x
	CLC
	ADC.w #$0030
	CMP.w #$0040
	BCS.b CODE_0498F0
	JSL.l CODE_04F74A
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$006B
	STA.w $60BE
	STA.w !RAM_YI_Level_CantUseItemsFlagLo
	LDA.w $7C16,x
	STA.b $78,x
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7A38,x
	INC.b $18,x
	INC.b $76,x
	RTS

CODE_0498F0:
	LDA.w $7400,x
	TAY
	DEC
	EOR.w $7C16,x
	BPL.b CODE_049931
	LDA.w $7C16,x
	CLC
	ADC.w #$0012
	CMP.w #$0024
	BCS.b CODE_049931
	LDA.w $7C18,x
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_049931
	LDA.w DATA_04988E,y
	CLC
	ADC.w $60A8
	STA.w $60A8
	STA.w $60B4
	CLC
	ADC.w #$0180
	CMP.w #$0300
	BCC.b CODE_049931
	LDA.w DATA_049892,y
	STA.w $60A8
	STA.w $60B4
CODE_049931:
	JSR.w CODE_049943
	BPL.b CODE_049942
	LDA.w #$00A0
	STA.w $7A96,x
	STZ.b $16,x
	LDY.b #$02
	STY.b $76,x
CODE_049942:
	RTS

CODE_049943:
	LDA.w $7A36,x
	CMP.w $7182,x
	BPL.b CODE_049990
	STA.w $7182,x
	LDA.w #!Define_YI_AmbSpr1CE
	JSL.l CODE_008B21
	LDA.w #$0001
	STA.w $7E4C,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0012
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7142,y
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $75E2,x
	LDA.w #!Define_YI_SoundID5F_Splash1
	JSL.l CODE_0085D2
	LDA.w #$FFFF
	STA.w $74A2,x
CODE_049990:
	RTS

CODE_049991:
	TYX
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	LDA.b $78,x
	STA.b $04
	LDA.w $7A38,x
	STA.b $06
	JSL.l CODE_049B42
	STA.b $0C
	LDA.b $04
	STA.b $78,x
	LDA.b $06
	STA.w $7A38,x
	LDA.b $08
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.b $0A
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.b $0C
	BNE.b CODE_0499D2
	STZ.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.b $76,x
	RTS

CODE_0499D2:
	JSR.w CODE_049943
	BPL.b CODE_0499F1
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	CLC
	ADC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0020
	STA.w $7A98,x
	LDY.b #$06
	STY.b $76,x
CODE_0499F1:
	RTS

CODE_0499F2:
	TYX
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	CLC
	ADC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	JSR.w CODE_049943
	BPL.b CODE_049A10
	LDA.w #$0020
	STA.w $7A98,x
	INC.b $76,x
CODE_049A10:
	RTS

CODE_049A11:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_049A10
	REP.b #$10
	JSL.l CODE_04AC9C
	SEP.b #$10
	PLA
	RTL

CODE_049A21:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_049A44
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0340
	STA.w $75E2,x
	JSR.w CODE_049943
	BPL.b CODE_049A44
	LDA.w #$00A0
	STA.w $7A96,x
	STZ.b $16,x
	LDY.b #$02
	STY.b $76,x
CODE_049A44:
	RTS

CODE_049A45:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0020
	CMP.w $7182,x
	BMI.b CODE_049A60
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7A96,x
	STZ.b $76,x
CODE_049A60:
	RTS

CODE_049A61:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0008
	CMP.w $7182,x
	BMI.b CODE_049A83
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A96,x
	BNE.b CODE_049A83
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$01
	STY.b $76,x
CODE_049A83:
	RTS

;---------------------------------------------------------------------------

DATA_049A84:
	dw $0028,$0030,$0038,$003F,$FFD8,$FFD0,$FFC8,$FFC1

DATA_049A94:
	dw $002C,$0028,$0034,$0000,$0008,$0010,$0018,$0020

CODE_049AA4:
	LDA.b $10
	AND.w #$0003
	STA.b $00
	LDA.w $7400,x
	ASL
	CLC
	ADC.b $00
	ASL
	TAY
	LDA.w DATA_049A84,y
	STA.b $00
	LDA.b $11
	AND.w #$000E
	TAY
	LDA.w DATA_049A94,y
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1CF
	JSL.l CODE_008B21
	LDA.w #$0010
	STA.w $7782,y
	LDA.w $70E2,x
	SEC
	SBC.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.b $02
	STA.w $7142,y
	TXA
	STA.w $7E4C,y
	LDA.b $00
	STA.w $7E8C,y
	LDA.b $02
	STA.w $7E4E,y
	RTS

;---------------------------------------------------------------------------

DATA_049AF2:
	db $00,$00,$01,$02,$03,$04,$05,$05,$06,$07,$08,$09,$0A,$0B,$0B,$0C
	db $0D,$0E,$0F,$10,$11,$12,$12,$13,$14,$15,$16,$17,$18,$19,$1A,$1B
	db $1B,$1C,$1D,$1E,$1F,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2A
	db $2B,$2C,$2D,$2D,$2E,$2F,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39
	db $3A,$3B,$3C,$3D,$3E,$3F,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49

CODE_049B42:
	PHB
	PHK
	PLB
	LDA.b $00
	SEC
	SBC.b $04
	STA.b $08
	LDA.b $02
	SEC
	SBC.b $06
	STA.b $0A
	LDA.b $04
	BEQ.b CODE_049B91
	BMI.b CODE_049B62
	TAY
	LDA.w DATA_049AF2,y
	AND.w #$00FF
	BRA.b CODE_049B71

CODE_049B62:
	EOR.w #$FFFF
	INC
	TAY
	LDA.w DATA_049AF2,y
	AND.w #$00FF
	EOR.w #$FFFF
	INC
CODE_049B71:
	STA.b $04
	LDA.b $06
CODE_049B75:
	BMI.b CODE_049B80
	TAY
	LDA.w DATA_049AF2,y
	AND.w #$00FF
	BRA.b CODE_049B9B

CODE_049B80:
	EOR.w #$FFFF
	INC
	TAY
	LDA.w DATA_049AF2,y
	AND.w #$00FF
	EOR.w #$FFFF
	INC
	BRA.b CODE_049B9B

CODE_049B91:
	LDA.b $06
	BNE.b CODE_049B75
	ORA.b $04
	BNE.b CODE_049B9D
	PLB
	RTL

CODE_049B9B:
	STA.b $06
CODE_049B9D:
	LDA.w #$0001
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_049BA2:
	dw $FFC0,$0040

DATA_049BA6:
	dw $FF80,$0080

YI_NorSpr031_PottedSpikedFunGuy_Init:
;$049BAA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_049BCA
	CMP.w #$FFFF
	BNE.b CODE_049BCA
CODE_049BB7:
	LDY.w $7400,x
	LDA.w DATA_049BA6,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	INC.b $76,x
	BRA.b CODE_049BFB

CODE_049BCA:
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_049BB7
	LDA.w #$00A1
	JSL.l CODE_03A364
	BCC.b CODE_049BB7
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	SEC
	SBC.w #$000A
	STA.w $7182,x
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	TXA
	STA.w $7A38,y
CODE_049BFB:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_049C02:
	db $47,$09,$07,$00

DATA_049C06:
	dw CODE_048000
	dw CODE_049C40

YI_NorSpr031_PottedSpikedFunGuy_Main:
;$049C0A
	LDY.b #$00
	LDA.w $7D38,x
	ORA.w $7D96,x
	BEQ.b CODE_049C1F
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INY
	INY
CODE_049C1F:
	LDA.w DATA_049C02,y
	STA.w $6FA2,x
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_049C06,x)
	LDY.w $7D36,x
	DEY
	BPL.b CODE_049C3C
	JSL.l CODE_03A5B7
	RTL

CODE_049C3C:
	JML.l CODE_0DC14C

CODE_049C40:
	TYX
	LDY.w $7D36,x
	DEY
	BMI.b CODE_049C87
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0A1_SmallPot
	BNE.b CODE_049C87
	LDA.w $7A38,y
	BNE.b CODE_049C87
	LDA.w $7D38,y
	BNE.b CODE_049C87
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w $7182,x
	SEC
	SBC.w $7182,y
	CLC
	ADC.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w $7D38,y
	TXA
	STA.w $7A38,y
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.b $76,x
	RTS

CODE_049C87:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098E44>>16
	LDA.w #FXCODE_098E44
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_049CB2
	STZ.w $7400,x
	LDA.w $70E2,y
	CMP.w $70E2,x
	BMI.b CODE_049CAC
	LDA.w #$0002
	STA.w $7400,x
CODE_049CAC:
	LDA.w #$0087
	STA.w $6FA2,x
CODE_049CB2:
	LDY.w $7400,x
	LDA.w DATA_049BA6,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_049CC4
	EOR.w #$FFFF
	INC
CODE_049CC4:
	CLC
	ADC.w $7A36,x
	CMP.w #$0200
	BMI.b CODE_049CDC
	PHA
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	PLA
	SEC
	SBC.w #$0200
CODE_049CDC:
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0A1_SmallPot_Init:
;$049CE0
	RTL

;---------------------------------------------------------------------------

DATA_049CE1:
	dw $FA00,$FB80

YI_NorSpr0A1_SmallPot_Main:
;$049CE5
	STZ.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_049CFC
	LDY.w $7A38,x
	BEQ.b CODE_049CFC
	STZ.w $7A38,x
	JSR.w CODE_049DFC
	RTL

CODE_049CFC:
	JSL.l CODE_03AF23
	JSL.l CODE_03A2C7
	BCC.b CODE_049D12
	LDY.w $7A38,x
	BEQ.b CODE_049D0E
	JSR.w CODE_049DFC
CODE_049D0E:
	JML.l CODE_03A32E

CODE_049D12:
	LDY.w $7A38,x
	BNE.b CODE_049D26
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_049D25
	STZ.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_049D25:
	RTL

CODE_049D26:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_049D36
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr031_PottedSpikedFunGuy
	BEQ.b CODE_049D3A
CODE_049D36:
	STZ.w $7A38,x
	RTL

CODE_049D3A:
	LDA.w $7D96,y
	BEQ.b CODE_049D49
	STZ.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	RTL

CODE_049D49:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	LDA.w #$000C
	STA.b $00
	LDA.w #$0001
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_049DB1
	LDA.w #$000A
	STA.b $00
	STZ.w $7402,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_049DB1
	LDA.w $7AF8,x
	BEQ.b CODE_049D7B
	DEC
	BEQ.b CODE_049D86
	BRA.b CODE_049DB1

CODE_049D7B:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7AF8,x
	BRA.b CODE_049DB1

CODE_049D86:
	PHY
	LDY.b $02
	BNE.b CODE_049DB0
	LDY.w $77C2,x
	LDA.w DATA_049BA2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$00
	LDA.b $10
	AND.w #$0003
	BEQ.b CODE_049DA8
	INC.b $76,x
	LDA.b $76,x
	CMP.w #$0003
	BEQ.b CODE_049DA8
	INY
	INY
CODE_049DA8:
	STZ.b $76,x
	LDA.w DATA_049CE1,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_049DB0:
	PLY
CODE_049DB1:
	LDA.w $70E2,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.b $00
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,y
	LDA.w $7402,x
	STA.w $7402,y
	PHY
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_049DD8
	INY
	INY
CODE_049DD8:
	TYA
	PLY
	STA.w $7400,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_049DEC
	BPL.b CODE_049DE9
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_049DEC

CODE_049DE9:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_049DEC:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_049DFB
	BPL.b CODE_049DF8
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_049DFB

CODE_049DF8:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_049DFB:
	RTL

CODE_049DFC:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w $7400,y
	PHY
	TAY
	LDA.w DATA_049BA6,y
	PLY
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	RTS

;---------------------------------------------------------------------------

YI_NorSpr037_GrimLeecher_Init:
;$049E15
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A38,x
	RTL

;---------------------------------------------------------------------------

DATA_049E22:
	dw CODE_049E7E
	dw CODE_049EAF
	dw CODE_049F6E
	dw CODE_049F9B
	dw CODE_049FCA
	dw CODE_049FF9
	dw CODE_04A03C

YI_NorSpr037_GrimLeecher_Main:
;$049E30
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_049E22,x)
	LDA.b $76,x
	CMP.w #$0002
	BEQ.b CODE_049E4C
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
CODE_049E4C:
	LDA.w $7860,x
	BIT.w #$0002
	BEQ.b CODE_049E61
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_049E61:
	LDA.b $16,x
	CMP.w #$0006
	BNE.b CODE_049E78
	STZ.b $16,x
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0003
	BNE.b CODE_049E78
	STZ.w $7402,x
CODE_049E78:
	INC.b $16,x
	JML.l CODE_0DC14C

CODE_049E7E:
	TYX
	STZ.w $75E0,x
	STZ.w $7540,x
	LDA.w $7C16,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_049EAE
	LDA.w #$0004
	STA.w $7540,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0060
	LDY.w $7C17,x
	BMI.b CODE_049EA9
	EOR.w #$FFFF
	INC
CODE_049EA9:
	STA.w $75E0,x
	INC.b $76,x
CODE_049EAE:
	RTS

CODE_049EAF:
	TYX
	JSR.w CODE_04A085
	LDA.b $10
	AND.w #$003F
	LDY.w $7C19,x
	BMI.b CODE_049EC1
	EOR.w #$FFFF
	INC
CODE_049EC1:
	CLC
	ADC.w $7A38,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b $11
	AND.w #$001F
	CLC
	ADC.w #$0060
	LDY.w $7C16,x
	BMI.b CODE_049EDA
	EOR.w #$FFFF
	INC
CODE_049EDA:
	STA.w $75E0,x
	LDA.w $7C16,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCC.b CODE_049EF4
	STZ.w $75E0,x
	LDA.w #$0040
	STA.w $75E2,x
	STZ.b $76,x
CODE_049EF4:
	LDY.w $7D36,x
	BPL.b CODE_049F6D
	LDA.w $7E48
	AND.w #$00FF
	ORA.w $0CD0
	ORA.w $61D6
	BNE.b CODE_049F6D
	LDA.w $61B2
	BPL.b CODE_049F25
	AND.w #$0FFF
	STA.w $61B2
	STZ.b $18
	LDA.w #$0006
	STA.b $16
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDA.w #$0040
	STA.w $7AF8
CODE_049F25:
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	TXA
	STA.w $7E48
	LDA.w #$2881
	STA.w $6FA2,x
	LDA.w #$0904
	STA.w $7040,x
	LDA.w #$0020
	STA.w $0CC8
	STZ.w $7540,x
	STZ.w $75E0,x
	LDA.w #$0260
	STA.w $7AF6,x
	LDA.w #$003E
	STA.w $7A96,x
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w #$0010
	STA.w $7AF8,x
	LDA.w #$FFFF
	STA.w $0CD0
	LDA.w #$8000
	STA.w $0390
	STZ.b $76,x
CODE_049F6D:
	RTS

CODE_049F6E:
	TYX
	JSR.w CODE_04A085
	LDA.w $7A38,x
	BPL.b CODE_049F7B
	EOR.w #$FFFF
	INC
CODE_049F7B:
	LSR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCC.b CODE_049F95
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_049F95:
	LDA.w $7A96,x
	BNE.b CODE_049FA1
	RTS

CODE_049F9B:
	TYX
	LDA.w $7A96,x
	BEQ.b CODE_049FBA
CODE_049FA1:
	LDA.w $7A98,x
	BNE.b CODE_049FB9
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w $6116
	EOR.w #$0002
	STA.w $6116
	JSL.l CODE_04FB41
CODE_049FB9:
	RTS

CODE_049FBA:
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPY.b #$10
	BEQ.b CODE_049FC7
	LDA.w #$FFFF
	STA.w $61EC
CODE_049FC7:
	INC.b $76,x
	RTS

CODE_049FCA:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_049FE8
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0060
	LDY.w $7C16,x
	BMI.b CODE_049FE2
	EOR.w #$FFFF
	INC
CODE_049FE2:
	STA.w $75E0,x
	STZ.b $76,x
	RTS

CODE_049FE8:
	JSR.w CODE_04A085
	LDA.w $7A38,x
	BMI.b CODE_049FF4
	EOR.w #$FFFF
	INC
CODE_049FF4:
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_049FF9:
	TYX
	LDA.w #$0004
	STA.w $7540,x
	LDA.w #$0080
	STA.w $75E0,x
	TXA
	AND.w #$000F
	LSR
	LSR
	LSR
	BEQ.b CODE_04A015
	LDA.w #$FF80
	STA.w $75E0,x
CODE_04A015:
	LDA.w #$0040
	STA.w $75E2,x
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0060
	STA.w $7A38,x
	LDA.w #$0004
	STA.w $7542,x
	LDA.w #$0080
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_04A03C:
	TYX
	JSR.w CODE_04A085
	LDA.w $7A38,x
	BPL.b CODE_04A049
	EOR.w #$FFFF
	INC
CODE_04A049:
	STA.b $02
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	TXA
	AND.w #$000F
	LSR
	LSR
	LSR
	BCS.b CODE_04A066
	LDA.b $02
	LSR
	LSR
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_04A066:
	LDA.w $7A96,x
	BNE.b CODE_04A084
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0060
	LDA.w $7C16,x
	BMI.b CODE_04A07D
	EOR.w #$FFFF
	INC
CODE_04A07D:
	STA.w $75E0,x
	LDY.b #$01
	STY.b $76,x
CODE_04A084:
	RTS

CODE_04A085:
	LDA.w $7A38,x
	PHA
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_04A09C
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_04A09C:
	PLA
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7A38,x
	RTS

;---------------------------------------------------------------------------

DATA_04A0A5:
	dw CODE_049F9B
	dw CODE_04A0B8
	dw CODE_04A128

YI_NorSpr037_GrimLeecher_RideYoshiRt:
;$04A0AB
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_04A0A5,x)
	RTL

DATA_04A0B4:
	dw $0040,$FFC0

CODE_04A0B8:
	TYX
	LDY.w $61B3
	BMI.b CODE_04A0C3
	LDA.w $7AF6,x
	BNE.b CODE_04A0D1
CODE_04A0C3:
	LDY.w $77C2,x
	LDA.w DATA_04A0B4,y
	STA.w $75E0,x
	LDA.w #$0079
	BRA.b CODE_04A106

CODE_04A0D1:
	LDA.w $60FC
	BIT.w #$0018
	BEQ.b CODE_04A0ED
	CPX.w $0D96
	BNE.b CODE_04A0ED
	LDA.w #$0030
	STA.w $7A96,x
	LDA.w #$0004
	STA.w $7A98,x
	INC.b $76,x
CODE_04A0EC:
	RTS

CODE_04A0ED:
	LDA.w $61D6
	BEQ.b CODE_04A0EC
	CPX.w $0D96
	BEQ.b CODE_04A0EC
	LDA.w $6FA0,x
	EOR.w #$0E40
	STA.w $6FA0,x
	STZ.w $6FA2,x
	LDA.w #$FFFF
CODE_04A106:
	STA.w $7AF6,x
	LDA.w #$0004
	STA.w $7540,x
	LDA.w #$003E
	STA.w $7A96,x
	STA.w $0CD0
	STA.w $61EC
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w #$0003
	STA.b $76,x
	BRA.b CODE_04A17C

CODE_04A128:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_04A196
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7042,x
	EOR.w #$000E
	STA.w $7042,x
	LDA.w $7A96,x
	BNE.b CODE_04A196
	LDA.w $6FA0,x
	EOR.w #$0E40
	STA.w $6FA0,x
	STZ.w $6FA2,x
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	LDA.w #$0080
	STA.w $75E0,x
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7540,x
	LDA.w #$0038
	STA.w $7A96,x
	INC
	STA.w $0CD0
	STA.w $61EC
	LDA.w #$0004
	STA.w $7A98,x
CODE_04A17C:
	STZ.b $16,x
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$FFFF
	STA.w $7E48
	LDA.w #$0881
	STA.w $6FA2,x
	LDA.w #$0954
	STA.w $7040,x
CODE_04A196:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr050_GreyRotatingWoodenBoard_Init:
;$04A197
	JSL.l CODE_02813E
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.w $70E2,x
	LDA.w #$0140
	STA.w $7A36,x
	RTL

;---------------------------------------------------------------------------

DATA_04A1AC:
	dw $FFFC,$0004

DATA_04A1B0:
	dw $FEC0,$0140

YI_NorSpr050_GreyRotatingWoodenBoard_Main:
;$04A1B4
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_04A1C2
	JMP.w CODE_04A250

CODE_04A1C2:
	JSR.w CODE_04A300
	BCC.b CODE_04A1CB
	STZ.w $0CB2
	RTL

CODE_04A1CB:
	LDA.b $78,x
	CMP.w #$2000
	BPL.b CODE_04A1EB
	LDY.b #$20
	LDA.w #$0030
	JSR.w CODE_04A280
	BCS.b CODE_04A1EB
	LDA.w #$0008
	STA.w $7A38,x
	CLC
	ADC.w $7A36,x
	STA.w $7A36,x
	BRA.b CODE_04A248

CODE_04A1EB:
	LDY.w $7A38,x
	BEQ.b CODE_04A21B
	LDA.b $78,x
	BMI.b CODE_04A205
	LDA.w $7A36,x
	CMP.w #$0140
	BMI.b CODE_04A205
	SEC
	SBC.w #$0010
	STA.w $7A36,x
	BPL.b CODE_04A248
CODE_04A205:
	STZ.w $7A38,x
	LDA.w #!Define_YI_SoundID40_OpenDoor
	JSL.l CODE_0085D2
	LDY.b #$00
	LDA.b $78,x
	BPL.b CODE_04A217
	INY
	INY
CODE_04A217:
	STY.b $16,x
	BRA.b CODE_04A248

CODE_04A21B:
	LDY.b $16,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_04A1AC,y
	STA.w $7A36,x
	SEC
	SBC.w DATA_04A1B0,y
	EOR.w DATA_04A1B0,y
	BMI.b CODE_04A248
	LDA.w DATA_04A1B0,y
	STA.w $7A36,x
	EOR.b $78,x
	BMI.b CODE_04A248
	LDA.w #!Define_YI_SoundID40_OpenDoor
	JSL.l CODE_0085D2
	LDA.b $16,x
	EOR.w #$0002
	STA.b $16,x
CODE_04A248:
	LDA.b $78,x
	CLC
	ADC.w $7A36,x
	STA.b $78,x
CODE_04A250:
	LDA.w #$0104
	STA.w $0CB8
	LDY.b $79,x
	TYA
	STA.b $00
	LDA.w #$00C0
	SEC
	SBC.b $00
	STA.w $7E40
	LDA.w $7682,x
	PHA
	SEC
	SBC.w #$0008
	STA.w $7682,x
	LDY.b #$02
	JSL.l CODE_02841C
	PLA
	STA.w $7682,x
	LDA.w #$0710
	STA.w !RAM_YI_Global_MainScreenLayers
	RTL

CODE_04A280:
	STA.b $04
	ASL
	STA.b $06
	TYA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D9|!EXRAMBankMirror,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	SEC
	ADC.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.b $02
	SEC
	SBC.w $611E
	SEC
	SBC.w $6112
	SEC
	SBC.w $6122
	DEC
	CMP.w #$FFF4
	BCC.b CODE_04A2E4
	STA.b $00
	LDA.w $60AA
	BMI.b CODE_04A2E4
	LDA.w $7C16,x
	CLC
	ADC.b $04
	CMP.b $06
	BCS.b CODE_04A2E4
	LDA.b $00
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0003
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	STZ.w $60AA
	CLC
	RTS

CODE_04A2E4:
	SEC
	RTS

;---------------------------------------------------------------------------

CODE_04A2E6:
	LDA.w $7680,x
	CLC
	ADC.w #$0068
	CMP.w #$01D0
	BCS.b CODE_04A318
	LDA.w $7682,x
	CLC
	ADC.w #$00A0
	CMP.w #$0220
	BCC.b CODE_04A31E
	BRA.b CODE_04A318

CODE_04A300:
	LDA.w $7680,x
	CLC
	ADC.w #$0068
	CMP.w #$01D0
	BCS.b CODE_04A318
	LDA.w $7682,x
	CLC
	ADC.w #$0080
	CMP.w #$01E0
	BCC.b CODE_04A31E
CODE_04A318:
	PHP
	JSL.l CODE_03A31E
	PLP
CODE_04A31E:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr051_LargeWheel_Init:
;$04A31F
	LDA.w $0073
	STA.b $00
	JSL.l CODE_02813E
	LDA.b $00
	STA.w $0073
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_04A33E:
	dw $FFA0,$0060

YI_NorSpr051_LargeWheel_Main:
;$04A342
	LDA.w #$0104
	STA.w $0CB8
	LDA.b $79,x
	AND.w #$00FF
	STA.b $00
	LDA.w #$0010
	SEC
	SBC.b $00
	STA.w $7E40
	LDY.b #$04
	JSL.l CODE_02841C
	LDA.w #$0710
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState06
	BNE.b CODE_04A372
	LDA.w #$0215
	STA.w !RAM_YI_Global_MainScreenLayers
CODE_04A372:
	JSL.l CODE_03AF23
	JSR.w CODE_04A2E6
	BCC.b CODE_04A3A0
	LDX.b #FXCODE_08D46A>>16
	LDA.w #FXCODE_08D46A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $01A4
	SEP.b #$10
	LDX.b $12
	STZ.w $0CB2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !RAM_YI_Global_MainScreenLayers
	RTL

CODE_04A3A0:
	LDA.b $19,x
	AND.w #$00FF
	CMP.w #$0020
	BCC.b CODE_04A3AD
	JMP.w CODE_04A45D

CODE_04A3AD:
	LDY.w $60C0
	BEQ.b CODE_04A3BA
	LDY.w $60AB
	BPL.b CODE_04A3BA
	JMP.w CODE_04A45D

CODE_04A3BA:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w $6112
	BMI.b CODE_04A3CC
	CMP.w #$0038
	BCC.b CODE_04A3CF
CODE_04A3CC:
	JMP.w CODE_04A45D

CODE_04A3CF:
	LDA.w $7C16,x
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_04A3CC
	LDA.w $7A38,x
	BNE.b CODE_04A406
	LDA.w #$0038
	SEC
	SBC.w $7182,x
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.b $02
	SEP.b #$20
	LDA.b #$92
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$00
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b $02
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	XBA
	STA.b $18,x
CODE_04A406:
	SEP.b #$20
	LDA.b #$C0
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$01
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b $19,x
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	CLC
	ADC.w $7182,x
	SEC
	SBC.w #$0037
	SEC
	SBC.w $6112
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	LDY.w $7A38,x
	BNE.b CODE_04A43B
	LDA.w $7A36,x
	BPL.b CODE_04A43B
	STZ.w $7A36,x
CODE_04A43B:
	LDA.w #$0001
	STA.w $7A38,x
	STZ.w $60AA
	LDA.w $7A36,x
	CLC
	ADC.w #$0008
	CMP.w #$0400
	BCS.b CODE_04A453
	STA.w $7A36,x
CODE_04A453:
	LDA.b $18,x
	CLC
	ADC.w $7A36,x
	STA.b $18,x
	BRA.b CODE_04A4A8

CODE_04A45D:
	LDA.w $7A38,x
	BEQ.b CODE_04A478
	STZ.w $7A38,x
	LDA.b $19,x
	AND.w #$00FF
	CMP.w #$0020
	BCC.b CODE_04A478
	LDA.w #$0400
	STA.w $60AA
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_04A478:
	STZ.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAY
	DEC
	STA.b $00
	LDA.w #$0002
	CPY.b #$00
	BNE.b CODE_04A48C
	EOR.w #$FFFF
	INC
CODE_04A48C:
	CLC
	ADC.w $7A36,x
	STA.w $7A36,x
	SEC
	SBC.w DATA_04A33E,y
	EOR.b $00
	BMI.b CODE_04A4A8
	TYA
	EOR.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_04A33E,y
	STA.w $7A36,x
CODE_04A4A8:
	LDA.b $78,x
	CLC
	ADC.w $7A36,x
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr05E_BrownWoodenBoard_Init:
YI_NorSpr05F_AutoRotateBrownWoodenBoard_Init:
;$04A4B1
	INC.w $0DF9
	RTL

;---------------------------------------------------------------------------

DATA_04A4B5:
	dw DATA_04A4B7

DATA_04A4B7:
	db $04,$08,$E8,$30,$F8,$E8,$30,$F8,$18,$30,$08,$18,$30,$04,$60,$00
	db $01,$A2,$01,$02,$E0,$02,$03,$22,$03,$00

DATA_04A4D1:
	dw CODE_04A5FB
	dw CODE_04A65C

YI_NorSpr05E_BrownWoodenBoard_Main:
YI_NorSpr05F_AutoRotateBrownWoodenBoard_Main:
;$04A4D5
	LDA.w $0030
	CMP.w $0DF7
	BEQ.b CODE_04A4F1
	STA.w $0DF7
	LDA.w $0DF9
	STA.w $0DFB
	LDX.b #FXCODE_08D46A>>16
	LDA.w #FXCODE_08D46A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_04A4F1:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_04A4FF
	JMP.w CODE_04A586

CODE_04A4FF:
	LDX.b $12
	JSR.w CODE_04A300
	BCC.b CODE_04A579
	DEC.w $0DF9
	DEC.w $0DFB
	BNE.b CODE_04A578
CODE_04A50E:
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$10
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$07
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$02
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$20
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	STA.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDA.w #$14E9
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l $702D6E
	LDA.w #$14E9
	STA.l YI_Global_PaletteMirror[$08].LowByte
	STA.l $702D7C
	LDA.w #$3216
	STA.l YI_Global_PaletteMirror[$02].LowByte
	STA.l $702D70
	LDA.w #$3216
	STA.l YI_Global_PaletteMirror[$09].LowByte
	STA.l $702D7E
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$03].LowByte
	STA.l $702D72
	STA.l YI_Global_PaletteMirror[$0A].LowByte
	STA.l $702D80
CODE_04A578:
	RTL

CODE_04A579:
	TXY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr05E_BrownWoodenBoard
	ASL
	TAX
	JSR.w (DATA_04A4D1,x)
CODE_04A586:
	LDA.w #$0104
	STA.w $0CB8
	LDA.b $79,x
	AND.w #$00FF
	STA.b $00
	LDA.w #$00C0
	SEC
	SBC.b $00
	STA.w $7E40
	LDA.w $7682,x
	PHA
	SEC
	SBC.w #$0010
	STA.w $7682,x
	LDY.b #$00
	LDA.w DATA_04A4B5,y
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0078
	SEC
	SBC.w $7680,x
	STA.w !RAM_YI_Global_Layer3XPosLo
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	CLC
	ADC.w #$000F
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $0CB6
	LDA.w $0CB8
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7E40
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #DATA_04A4B7>>16
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08D486>>16
	LDA.w #FXCODE_08D486
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	DEC.w $0DFB
	BNE.b CODE_04A5F4
	JSL.l CODE_04A50E
CODE_04A5F4:
	LDX.b $12
	PLA
	STA.w $7682,x
	RTL

CODE_04A5FB:
	TYX
	LDA.w $7A38,x
	BEQ.b CODE_04A612
CODE_04A601:
	LDA.b $78,x
	CLC
	ADC.w $7A36,x
	BPL.b CODE_04A60F
	STZ.w $7A38,x
	LDA.w #$0000
CODE_04A60F:
	STA.b $78,x
	RTS

CODE_04A612:
	LDA.b $79,x
	AND.w #$00FF
	CMP.w #$0020
	BCC.b CODE_04A621
	INC.w $7A38,x
	BRA.b CODE_04A601

CODE_04A621:
	LDY.b #$20
	LDA.w #$0018
	JSR.w CODE_04A280
	BCS.b CODE_04A64B
	LDA.b $78,x
	CLC
	ADC.w $7A36,x
	CMP.w #$4000
	BCC.b CODE_04A639
	LDA.w #$4000
CODE_04A639:
	STA.b $78,x
	LDA.w $7A36,x
	CLC
	ADC.w #$0003
	CMP.w #$0200
	BCS.b CODE_04A65B
	STA.w $7A36,x
	RTS

CODE_04A64B:
	STZ.w $7A36,x
	LDA.b $78,x
	SEC
	SBC.w #$0100
	BPL.b CODE_04A659
	LDA.w #$0000
CODE_04A659:
	STA.b $78,x
CODE_04A65B:
	RTS

CODE_04A65C:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_04A69E
	INC.w $7A38,x
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CLC
	ADC.w $7A38,x
	CMP.w #$0400
	BCS.b CODE_04A678
	STA.w $7A36,x
CODE_04A678:
	LDA.b $78,x
	CLC
	ADC.w $7A36,x
	BPL.b CODE_04A69C
	STZ.w $7A38,x
	STZ.w $7A36,x
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_04A693
	LDA.w #$0060
	BRA.b CODE_04A696

CODE_04A693:
	LDA.w #$0080
CODE_04A696:
	STA.w $7A96,x
	LDA.w #$0000
CODE_04A69C:
	STA.b $78,x
CODE_04A69E:
	LDA.b $78,x
	CMP.w #$1500
	BCS.b CODE_04A6AD
	LDY.b #$20
	LDA.w #$0018
	JSR.w CODE_04A280
CODE_04A6AD:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr089_HorizontalMovingRedPlatform_Init:
CODE_04A6AE:
	LDA.w $7182,x
	AND.w #$0010
	BEQ.b CODE_04A6BB
	LDA.w #$FF90
	BRA.b CODE_04A6BE

CODE_04A6BB:
	LDA.w #$0070
CODE_04A6BE:
	STA.w $75E0,x
	LDA.w #$0005
	STA.w $7540,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0028
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0050
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_04A6D8:
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$0003
	BEQ.b CODE_04A6E5
	CMP.w #$000D
	BNE.b CODE_04A6EB
CODE_04A6E5:
	INC.w $7B58,x
	INC.w $7B58,x
CODE_04A6EB:
	LDA.w #$0014
	STA.w $7BB6,x
	LDA.w #$0008
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr089_HorizontalMovingRedPlatform_Main:
;$04A6F8
	JSL.l CODE_03AF23
	LDA.w $70E2,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_04A709
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_04A722
CODE_04A709:
	LDA.b $18,x
	STA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $7CD6,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_04A722:
	JMP.w CODE_04A77C

YI_NorSpr08A_VerticalMovingPinkPlatform_Init:
CODE_04A725:
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_04A732
	LDA.w #$FF90
	BRA.b CODE_04A735

CODE_04A732:
	LDA.w #$0070
CODE_04A735:
	STA.w $75E2,x
	LDA.w #$0005
	STA.w $7542,x
	LDA.w $7182,x
	CLC
	ADC.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0040
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JMP.w CODE_04A6D8

YI_NorSpr08A_VerticalMovingPinkPlatform_Main:
;$04A752
	JSL.l CODE_03AF23
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_04A763
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_04A77C
CODE_04A763:
	LDA.b $78,x
	STA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7CD8,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_04A77C:
	LDA.w $70E2,x
	SEC
	SBC.b $18,x
	STA.w $72C0,x
	LDA.w $7182,x
	SEC
	SBC.b $78,x
	STA.w $72C2,x
CODE_04A78E:
	LDY.w $0B59
	BNE.b CODE_04A7F3
	LDY.w $60AB
	BMI.b CODE_04A7F3
	LDY.w $0D94
	BNE.b CODE_04A7F3
	CPX.w $61B6
	BNE.b CODE_04A7EE
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_04A7B3
	AND.w #$0180
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_04A7C7
CODE_04A7B3:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $611C
	CLC
	ADC.w $72C0,x
	STA.w $611C
CODE_04A7C7:
	LDA.w $60FC
	AND.w #$001F
	BEQ.b CODE_04A7D8
	AND.w #$0018
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_04A7EE
CODE_04A7D8:
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $611E
	CLC
	ADC.w $72C2,x
	STA.w $611E
	BRA.b CODE_04A7F6

CODE_04A7EE:
	LDY.w $60C0
	BNE.b CODE_04A7F6
CODE_04A7F3:
	JMP.w CODE_04A853

CODE_04A7F6:
	LDA.w $7BB6,x
	CLC
	ADC.w $6120
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $611C
	CMP.b $00
	BCS.b CODE_04A853
	LDA.w $7BB8,x
	CLC
	ADC.w $6122
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7CD8,x
	SEC
	SBC.w $611E
	CMP.b $00
	BCS.b CODE_04A853
	SEC
	SBC.b $00
	STA.b $02
	CMP.w #$FFF6
	BCC.b CODE_04A853
	CPX.w $61B6
	BEQ.b CODE_04A83B
	LDY.w $61B6
	BNE.b CODE_04A85B
	STX.w $61B6
CODE_04A83B:
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.b $02
	CLC
	ADC.w #$0002
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60D2
	STZ.w $60AA
	INC.w $61B4
	BRA.b CODE_04A85B

CODE_04A853:
	CPX.w $61B6
	BNE.b CODE_04A85B
	STZ.w $61B6
CODE_04A85B:
	LDA.w $70E2,x
	STA.b $18,x
	LDA.w $7182,x
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

DATA_04A866:
	dw $AA00,$0000,$5400,$0001,$0000,$0004

YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_Init:
YI_NorSpr186_MovingLineGuidedGreenPlatformRight_Init:
YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_Init:
YI_NorSpr188_MovingLineGuidedYellowPlatformRight_Init:
;$04A872
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr185_MovingLineGuidedGreenPlatformLeft
	AND.w #$0002
	ASL
	TAY
	LDA.w DATA_04A866,y
	STA.w $7A36,x
	LDA.w DATA_04A866+$02,y
	STA.w $7A38,x
YI_NorSpr189_LineGuidedGreenPlatformLeft_Init:
YI_NorSpr18A_LineGuidedGreenPlatformRight_Init:
YI_NorSpr18B_LineGuidedYellowPlatformLeft_Init:
YI_NorSpr18C_LineGuidedYellowPlatformRight_Init:
YI_NorSpr18D_LineGuidedRedPlatformLeft_Init:
YI_NorSpr18E_LineGuidedGreenPlatformRight_Init:
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0185
	AND.w #$0001
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr185_MovingLineGuidedGreenPlatformLeft
	AND.w #$0001
	CMP.b $00
	BNE.b CODE_04A8AB
	LDA.w #$8000
	STA.b $16,x
CODE_04A8AB:
	LDA.w #$0014
	STA.w $7BB6,x
	LDA.w #$0008
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr185_MovingLineGuidedGreenPlatformLeft_Main:
YI_NorSpr186_MovingLineGuidedGreenPlatformRight_Main:
YI_NorSpr187_MovingLineGuidedYellowPlatformLeft_Main:
YI_NorSpr188_MovingLineGuidedYellowPlatformRight_Main:
YI_NorSpr189_LineGuidedGreenPlatformLeft_Main:
YI_NorSpr18A_LineGuidedGreenPlatformRight_Main:
YI_NorSpr18B_LineGuidedYellowPlatformLeft_Main:
YI_NorSpr18C_LineGuidedYellowPlatformRight_Main:
YI_NorSpr18D_LineGuidedRedPlatformLeft_Main:
YI_NorSpr18E_LineGuidedGreenPlatformRight_Main:
;$04A8B8
	JSL.l CODE_03AF23
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSL.l CODE_04A9FD
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_04A8FF
	LDA.w $70E2,x
	SEC
	SBC.b $00
	CLC
	ADC.w $72C0,x
	STA.w $72C0,x
	LDA.w $7182,x
	SEC
	SBC.b $02
	CLC
	ADC.w $72C2,x
	STA.w $72C2,x
	LDA.w $70E2,x
	CLC
	ADC.w $7B56,x
	STA.w $7CD6,x
	LDA.w $7182,x
	CLC
	ADC.w $7B58,x
	STA.w $7CD8,x
	BRA.b CODE_04A92A

CODE_04A8FF:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_04A92A
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $75E0,x
	LSR
	XBA
	STA.b $16,x
CODE_04A92A:
	LDY.w $61B6
	STY.b $0E
	JSL.l CODE_04A78E
	LDA.w $7A38,x
	ORA.w $7A36,x
	BNE.b CODE_04A959
	CPX.w $61B6
	BNE.b CODE_04A958
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr189_LineGuidedGreenPlatformLeft
	AND.w #$0006
	ASL
	TAY
	LDA.w DATA_04A866,y
	STA.w $7A36,x
	LDA.w DATA_04A866+$02,y
	STA.w $7A38,x
CODE_04A958:
	RTL

CODE_04A959:
	CPX.b $0E
	BNE.b CODE_04A958
	CPX.w $61B6
	BEQ.b CODE_04A958
	LDA.w $61D6
	BNE.b CODE_04A958
	LDY.w $0D94
	BNE.b CODE_04A958
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_04A9A8
	LDA.b $16,x
	AND.w #$FF00
	XBA
	ASL
	EOR.w #$0100
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A37,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $60A8
	STA.w $60A8
	STA.w $60B4
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w $60AA
	STA.w $60AA
	BRA.b CODE_04A9CD

CODE_04A9A8:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ORA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_04A9FC
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w $60A8
	STA.w $60A8
	STA.w $60B4
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_04A9C6
	CMP.w #$8000
	ROR
CODE_04A9C6:
	CLC
	ADC.w $60AA
	STA.w $60AA
CODE_04A9CD:
	LDA.w $60A8
	CMP.w #$0800
	BMI.b CODE_04A9D8
	LDA.w #$0800
CODE_04A9D8:
	CMP.w #$F800
	BPL.b CODE_04A9E0
	LDA.w #$F800
CODE_04A9E0:
	STA.w $60A8
	STA.w $60B4
	LDA.w $60AA
	CMP.w #$0800
	BMI.b CODE_04A9F1
	LDA.w #$0800
CODE_04A9F1:
	CMP.w #$F800
	BPL.b CODE_04A9F9
	LDA.w #$F800
CODE_04A9F9:
	STA.w $60AA
CODE_04A9FC:
	RTL

;---------------------------------------------------------------------------

CODE_04A9FD:
	LDA.b $16,x
	STA.w $6046
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$FFFF
	STA.w $6040
	LDA.w $75E0,x
	STA.w $601E
	LDX.b #FXCODE_0B89E9>>16
	LDA.w #FXCODE_0B89E9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $601E
	STA.w $75E0,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr18F_SpiralPlatform_Init:
;$04AA24
	JSL.l CODE_03AE60
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7400,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr18F_SpiralPlatform_Main:
;$04AA32
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	STZ.b $0E
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSR.w CODE_04AAA2
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_04AA6A
	LDA.w $70E2,x
	SEC
	SBC.b $00
	CLC
	ADC.w $72C0,x
	STA.w $72C0,x
	LDA.w $7182,x
	SEC
	SBC.b $02
	CLC
	ADC.w $72C2,x
	STA.w $72C2,x
	BRA.b CODE_04AA95

CODE_04AA6A:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_04AA95
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $75E0,x
	LSR
	XBA
	STA.b $16,x
CODE_04AA95:
	JSR.w CODE_04AABE
	JSR.w CODE_04ABC6
	JSR.w CODE_04ABED
	JSR.w CODE_04AC61
	RTL

CODE_04AAA2:
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $75E0,x
	STA.w $601E
	LDX.b #FXCODE_0B89E9>>16
	LDA.w #FXCODE_0B89E9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $601E
	STA.w $75E0,x
	RTS

CODE_04AABE:
	LDY.w $7D36,x
	BMI.b CODE_04AB06
CODE_04AAC3:
	CPX.w $61B6
	BNE.b CODE_04AB05
	STZ.w $61B6
	LDY.w $0D94
	BNE.b CODE_04AB05
	LDA.b $16,x
	AND.w #$FF00
	XBA
	ASL
	EOR.w #$0100
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A37,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $60A8
	STA.w $60A8
	STA.w $60B4
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w $60AA
	STA.w $60AA
CODE_04AB05:
	RTS

CODE_04AB06:
	LDY.w $60AB
	BMI.b CODE_04AAC3
	LDY.w $0D94
	BNE.b CODE_04AAC3
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_04AAC3
	CPX.w $61B6
	BEQ.b CODE_04AB35
	LDY.w $61B6
	BNE.b CODE_04AB05
	STX.w $61B6
	LDA.w !EXRAM_YI_Player_SubXPosHi|!EXRAMBankMirror
	AND.w #$FF00
	STA.b $76,x
CODE_04AB35:
	LDA.w $7182,x
	SEC
	SBC.w #$0022
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	INC.w $61B4
	LDA.w #$0120
	JSL.l CODE_04AB6F
	LDA.b $16,x
	CLC
	ADC.w #$4000
	PHP
	LDA.w $7C16,x
	XBA
	AND.w #$FF00
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	PLP
	BPL.b CODE_04AB69
	EOR.w #$FFFF
	INC
CODE_04AB69:
	CLC
	ADC.b $0E
	STA.b $0E
	RTS

;---------------------------------------------------------------------------

CODE_04AB6F:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $72BF,x
	AND.w #$FF00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !EXRAM_YI_Player_SubXPosHi|!EXRAMBankMirror
	AND.w #$FF00
	STA.b $00
	LDY.b $76,x
	TYA
	ORA.b $00
	STA.b $76,x
	LDA.w !EXRAM_YI_Player_XPosHi|!EXRAMBankMirror
	AND.w #$00FF
	STA.b $00
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_04ABAE
	CLC
	ADC.b $76,x
	STA.b $76,x
	LDA.b $00
	SBC.w #$0000
	BRA.b CODE_04ABB8

CODE_04ABAE:
	CLC
	ADC.b $76,x
	STA.b $76,x
	LDA.b $00
	ADC.w #$0000
CODE_04ABB8:
	XBA
	STA.b $00
	LDA.b $77,x
	AND.w #$00FF
	ORA.b $00
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	RTL

;---------------------------------------------------------------------------

CODE_04ABC6:
	LDA.b $16,x
	AND.w #$FF00
	XBA
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$FC00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_04ABE7
	ASL
CODE_04ABE7:
	CLC
	ADC.b $0E
	STA.b $0E
	RTS

;---------------------------------------------------------------------------

CODE_04ABED:
	LDA.b $0E
	SEC
	SBC.w #$0080
	BPL.b CODE_04AC24
	CLC
	ADC.w $7A36,x
	STA.w $7A36,x
	LDA.w $7A38,x
	SBC.w #$0000
	STA.w $7A38,x
	BPL.b CODE_04AC48
	STZ.w $7A38,x
	STZ.w $7A36,x
	LDA.b $16,x
	CLC
	ADC.w #$8000
	STA.b $16,x
	LDA.w $75E0,x
	CLC
	ADC.w #$0100
	AND.w #$01FE
	STA.w $75E0,x
	BRA.b CODE_04AC48

CODE_04AC24:
	CLC
	ADC.w $7A36,x
	STA.w $7A36,x
	LDA.w $7A38,x
	ADC.w #$0000
	STA.w $7A38,x
	LDA.w $7A37,x
	CMP.w #$0200
	BMI.b CODE_04AC48
	LDA.w #$0002
	STA.w $7A38,x
	LDA.w #$0000
	STZ.w $7A36,x
CODE_04AC48:
	LDA.b $16,x
	CLC
	ADC.w #$4000
	PHP
	LDA.w $7A37,x
	ASL
	ASL
	PLP
	BPL.b CODE_04AC5B
	EOR.w #$FFFF
	INC
CODE_04AC5B:
	CLC
	ADC.b $78,x
	STA.b $78,x
	RTS

;---------------------------------------------------------------------------

CODE_04AC61:
	LDA.w #FXDATA_550000+$0001
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0001)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.b $79,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

CODE_04AC9C:
	LDA.w #!Define_YI_PlayerState0E_TouchedSpike
	JSL.l CODE_04F6E2
	STZ.w $60C6
	LDA.w #$003A
	STA.w $60F8
	LDA.w #$0022
	STA.w $61D2
	STZ.w $61F4
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	RTL

;---------------------------------------------------------------------------

YI_NorSpr07F_LogSeesawPlatform_Init:
;$04ACB9
	JSL.l CODE_03AE60
	JSL.l CODE_04AE9D
	STZ.w $7400,x
	LDA.w #$2000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_04ACCB:
	dw $0020,$FFE0

DATA_04ACCF:
	dw $FF00,$0100

YI_NorSpr07F_LogSeesawPlatform_Main:
;$04ACD3
	LDY.b #$00
	JSR.w CODE_04AEDF
	LDY.b #$00
	LDA.w $7A39,x
	AND.w #$00FF
	CLC
	ADC.w #$0020
	AND.w #$00FF
	CMP.w #$0040
	BCC.b CODE_04AD09
	CMP.w #$0080
	BMI.b CODE_04ACF3
	INY
	INY
CODE_04ACF3:
	LDA.w DATA_04ACCF,y
	STA.w $75E0,x
	LDA.w #$0020
	STA.w $7540,x
	ASL
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
CODE_04AD09:
	LDA.w $7A39,x
	AND.w #$00FF
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$1A00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B855B>>16
	LDA.w #FXCODE_0B855B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	PHX
	LDA.w $7722,x
	LSR
	CLC
	ADC.w #$01C0
	STA.b $00
	LDA.w $7042,x
	XBA
	AND.w #$FF00
	ORA.b $00
	STA.b $00
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $6094
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $02
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $609C
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $04
	LDA.w #$0003
	STA.b $06
	REP.b #$10
	LDY.w $7362,x
CODE_04AD66:
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $02
	STA.w $6008,y
	STA.w $6018,y
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $02
	LDA.b $04
	SEC
	SBC.w #$0010
	STA.w $6002,y
	STA.w $600A,y
	LDA.b $04
	STA.w $6012,y
	STA.w $601A,y
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $04
	LDA.b $00
	STA.w $6004,y
	INC
	INC
	STA.w $600C,y
	CLC
	ADC.w #$001E
	STA.w $6014,y
	INC
	INC
	STA.w $601C,y
	TYA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $06
	BNE.b CODE_04AD66
	SEP.b #$10
	PLX
	JSL.l CODE_03AF23
	LDA.w $60AA
	BPL.b CODE_04ADC9
	JMP.w CODE_04AE51

CODE_04ADC9:
	LDA.w $7A39,x
	AND.w #$00FF
	CLC
	ADC.w #$0028
	AND.w #$00FF
	CMP.w #$0050
	BCC.b CODE_04ADDE
	JMP.w CODE_04AE56

CODE_04ADDE:
	LDA.w #$FA00
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDY.b $18,x
	BEQ.b CODE_04AE00
	LDA.w $7E12
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BPL.b CODE_04ADF5
	EOR.w #$FFFF
	INC
CODE_04ADF5:
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0004
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_04AE00:
	LDY.b #$00
	LDA.w $611C
	SEC
	SBC.w $7CD6,x
	BMI.b CODE_04AE0D
	INY
	INY
CODE_04AE0D:
	JSR.w CODE_04AF4D
	LDA.w $603E
	BEQ.b CODE_04AE51
	LDA.w $7CD8,x
	CLC
	ADC.w $603C
	SEC
	SBC.w $6112
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $60AA
	ASL
	ASL
	ASL
	STZ.w $60AA
	INC.w $61B4
	LDY.b $18,x
	BNE.b CODE_04AE3B
	INC.b $18,x
	BRA.b CODE_04AE49

CODE_04AE3B:
	LDA.b $04
	BPL.b CODE_04AE43
	EOR.w #$FFFF
	INC
CODE_04AE43:
	ASL
	ASL
	CLC
	ADC.w #$0200
CODE_04AE49:
	STA.b $00
	LDY.b $02
	CPY.b #$01
	BRA.b CODE_04AE62

CODE_04AE51:
	LDY.w $7A39,x
	BRA.b CODE_04AE59

CODE_04AE56:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_04AE59:
	STZ.b $18,x
	LDA.w #$0200
	STA.b $00
	CPY.b #$00
CODE_04AE62:
	BPL.b CODE_04AE80
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	ADC.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_04AE9D
	BRA.b CODE_04AE9A

CODE_04AE80:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SBC.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$FF00
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BMI.b CODE_04AE9D
CODE_04AE9A:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
CODE_04AE9D:
	LDA.w #FXDATA_540000+$4060
	LDY.b #(FXDATA_540000+$4060)>>16
CODE_04AEA2:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7A39,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTL

;---------------------------------------------------------------------------

DATA_04AED7:
	dw $C000,$4001,$E000,$2001

CODE_04AEDF:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_04AF3C
	LDA.w $7A38,x
	STA.b $00
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_04AEFF
	CMP.w DATA_04AED7,y
	BPL.b CODE_04AF39
	LDA.w DATA_04AED7,y
	BRA.b CODE_04AF07

CODE_04AEFF:
	CMP.w DATA_04AED7+$02,y
	BMI.b CODE_04AF39
	LDA.w DATA_04AED7+$02,y
CODE_04AF07:
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr03D_LargeSeesaw
	BNE.b CODE_04AF38
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	CMP.b #$80
	ROR
	CMP.b #$80
	ROR
	EOR.b #$FF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
CODE_04AF38:
	PLA
CODE_04AF39:
	STA.w $7A38,x
CODE_04AF3C:
	RTS

;---------------------------------------------------------------------------

DATA_04AF3D:
	dw $D900,$2700,$F000,$1000,$8C00,$7400

DATA_04AF49:
	dw $0000,$8000

CODE_04AF4D:
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.b $04
	LDA.w DATA_04AF3D,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	TYA
	AND.w #$0002
	TAY
	LDA.w DATA_04AF49,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	STY.b $02
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $6112
	CLC
	ADC.w #$0020
	SEC
	SBC.w $7CD8,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7A39,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	PHX
	REP.b #$10
	TAX
	LDA.l FXDATA_0BBA12,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	PLX
	LDX.b #FXCODE_0B8500>>16
	LDA.w #FXCODE_0B8500
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr116_BuoyantRoundPlatform_Init:
;$04AF9E
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,x
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7400,x
	RTL

;---------------------------------------------------------------------------

DATA_04AFBC:
	dw $FE00,$0200

YI_NorSpr116_BuoyantRoundPlatform_Main:
;$04AFC0
	LDY.w $7722,x
	BMI.b CODE_04AFC9
	JSL.l CODE_03AA52
CODE_04AFC9:
	JSL.l CODE_03AF23
	LDY.b #$04
	JSR.w CODE_04AEDF
	LDY.b $18,x
	BNE.b CODE_04AFEB
	CLC
	ADC.w #$0200
	CMP.w #$0400
	BCS.b CODE_04AFEB
	STZ.w $7A38,x
	LDY.w $7722,x
	BMI.b CODE_04AFEB
	JSL.l CODE_03AEFD
CODE_04AFEB:
	LDY.w $60AB
	BPL.b CODE_04AFF3
	JMP.w CODE_04B09F

CODE_04AFF3:
	LDA.w #$F800
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDY.b $18,x
	BEQ.b CODE_04B015
	LDA.w $7E12
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BPL.b CODE_04B00A
	EOR.w #$FFFF
	INC
CODE_04B00A:
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0004
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_04B015:
	LDY.b #$04
	LDA.w $611C
	SEC
	SBC.w $7CD6,x
	BMI.b CODE_04B022
	INY
	INY
CODE_04B022:
	JSR.w CODE_04AF4D
	LDA.w $603E
	BEQ.b CODE_04B09F
	LDA.w $7CD8,x
	CLC
	ADC.w $603C
	SEC
	SBC.w #$0020
	SEC
	SBC.w $6112
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $60AA
	ASL
	ASL
	ASL
	PHA
	STZ.w $60AA
	LDY.w $7A39,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w #$0020
	AND.w #$01FE
	CMP.w #$0040
	BCC.b CODE_04B078
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w $60A8
	STA.w $60A8
	STA.w $60B4
CODE_04B078:
	INC.w $61B4
	LDY.w $7722,x
	BPL.b CODE_04B084
	JSL.l CODE_03AD74
CODE_04B084:
	LDY.b $18,x
	BNE.b CODE_04B093
	LDA.w #$FFFA
	STA.w $7720,x
	INC.b $18,x
	PLA
	BRA.b CODE_04B097

CODE_04B093:
	PLA
	LDA.w #$1000
CODE_04B097:
	STA.b $00
	LDY.b $02
	CPY.b #$01
	BRA.b CODE_04B0BE

CODE_04B09F:
	STZ.b $18,x
	STZ.w $7720,x
	LDY.b #$00
	LDA.w $7A38,x
	BNE.b CODE_04B0B3
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_04B0F6

CODE_04B0B3:
	BPL.b CODE_04B0B7
	INY
	INY
CODE_04B0B7:
	LDA.w DATA_04AFBC,y
	BRA.b CODE_04B0F3

CODE_04B0BC:
	CPY.b #$00
CODE_04B0BE:
	BPL.b CODE_04B0DC
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	ADC.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_04B0F6
	BRA.b CODE_04B0F3

CODE_04B0DC:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SBC.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$FF00
	BMI.b CODE_04B0F6
CODE_04B0F3:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
CODE_04B0F6:
	LDA.w $7722,x
	BMI.b CODE_04B104
	LDA.w #FXDATA_550000+$2060
	LDY.b #(FXDATA_550000+$2060)>>16
	JSL.l CODE_04AEA2
CODE_04B104:
	LDA.w #$0040
	LDY.w $7862,x
	BEQ.b CODE_04B10F
	LDA.w #$FFC0
CODE_04B10F:
	STA.w $75E2,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

YI_NorSpr03D_LargeSeesaw_Init:
;$04B11C
	LDA.w $0CB2
	BEQ.b CODE_04B125
	JML.l CODE_03A31E

CODE_04B125:
	INC.w $0CB2
	LDA.w #$0078
	LDY.w $0073
	BEQ.b CODE_04B133
	LDA.w #$FF88
CODE_04B133:
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	LDX.b #$04
CODE_04B13C:
	LDA.l DATA_5FE33E,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	STA.l $702D6E,x
	DEX
	DEX
	BPL.b CODE_04B13C
	LDX.b $12
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w $7A36,x
	LDA.w #$1000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr03D_LargeSeesaw_Main:
;$04B15B
	JSR.w CODE_04B2B3
	JSL.l CODE_03AF23
	JSR.w CODE_04B169
	JSR.w CODE_04B191
	RTL

CODE_04B169:
	LDY.b #$04
	JSR.w CODE_04AEDF
	SEC
	SBC.b $00
	BPL.b CODE_04B177
	EOR.w #$FFFF
	INC
CODE_04B177:
	CLC
	ADC.w $75E0,x
	CMP.w #$1000
	BMI.b CODE_04B18D
	PHA
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_0085D2
	PLA
	SEC
	SBC.w #$1000
CODE_04B18D:
	STA.w $75E0,x
	RTS

CODE_04B191:
	LDY.w $60AB
	BPL.b CODE_04B19E
	LDY.w $60C0
	BEQ.b CODE_04B19E
	JMP.w CODE_04B238

CODE_04B19E:
	LDA.w #$F800
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDY.b $18,x
	BEQ.b CODE_04B1C8
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_04B1C8
	LDA.w $7E12
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BPL.b CODE_04B1BD
	EOR.w #$FFFF
	INC
CODE_04B1BD:
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0004
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_04B1C8:
	LDY.b #$08
	LDA.w $611C
	SEC
	SBC.w $7CD6,x
	BMI.b CODE_04B1D5
	INY
	INY
CODE_04B1D5:
	JSR.w CODE_04AF4D
	LDA.w $603E
	BEQ.b CODE_04B238
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_04B238
	LDA.w $7CD8,x
	CLC
	ADC.w $603C
	SEC
	SBC.w $6112
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $60AA
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0180
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STZ.w $60AA
	INC.w $61B4
	LDY.b $18,x
	BNE.b CODE_04B21F
	INC.b $18,x
	BRA.b CODE_04B22C

CODE_04B21F:
	LDA.b $04
	BPL.b CODE_04B227
	EOR.w #$FFFF
	INC
CODE_04B227:
	ASL
	CLC
	ADC.w #$0100
CODE_04B22C:
	STA.b $00
	LDY.b $02
	CPY.b #$01
	BRA.b CODE_04B277

DATA_04B234:
	dw $0020,$0010

CODE_04B238:
	STZ.b $18,x
	LDY.b #$00
	LDA.w $7A38,x
	EOR.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_04B246
	INY
	INY
CODE_04B246:
	LDA.w $7A38,x
	BPL.b CODE_04B24F
	EOR.w #$FFFF
	INC
CODE_04B24F:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w #$0400
	BPL.b CODE_04B25C
	LDA.w #$0020
	BRA.b CODE_04B270

CODE_04B25C:
	LDA.w DATA_04B234,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_04B270:
	STA.b $00
	LDY.w $7A39,x
	CPY.b #$00
CODE_04B277:
	BPL.b CODE_04B295
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	ADC.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_04B2B2
	BRA.b CODE_04B2AF

CODE_04B295:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SBC.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$FF00
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BMI.b CODE_04B2B2
CODE_04B2AF:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
CODE_04B2B2:
	RTS

CODE_04B2B3:
	JSL.l CODE_03A299
	BCC.b CODE_04B2CF
	LDY.b $78,x
CODE_04B2BB:
	BNE.b CODE_04B2CF
	PLA
	LDY.b $16,x
	BEQ.b CODE_04B2C9
	STZ.w $0CB2
	JML.l CODE_03A31E

CODE_04B2C9:
	INC.b $16,x
	JSR.w CODE_04B601
	RTL

CODE_04B2CF:
	LDA.w #DATA_04B32F>>16
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #DATA_04B32F
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7A39,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w $6040
	LDA.w $7682,x
	CLC
	ADC.w #$0010
	STA.w $6042
	LDX.b #FXCODE_08E447>>16
	LDA.w #FXCODE_08E447
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$11
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$06
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$20
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$08
	TSB.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	RTS

DATA_04B32F:
	db $10,$74,$F0,$75,$F1,$76,$F3,$77,$F6,$77,$FA,$76,$FD,$75,$FF,$74
	db $00,$8C,$00,$8B,$FF,$8A,$FD,$89,$FA,$89,$F6,$8A,$F3,$8B,$F1,$8C
	db $F0

;---------------------------------------------------------------------------

DATA_04B350:
	dw CODE_04B363
	dw CODE_04B467

YI_NorSpr016_BiggerBoo_Init:
;$04B354
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_04B350,x)
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_04B363:
	TYX
	LDA.w #$0000
	STA.l $70336C
	STZ.w $1060
	SEP.b #$20
	LDA.b #$61
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDA.b #$22
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	REP.b #$20
	LDY.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CPY.b #$16
	BEQ.b CODE_04B386
	JMP.w CODE_04B42D

CODE_04B386:
	INC.w $1060
	LDA.w #$0001
	STA.w $1064
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$0C38
	BMI.b CODE_04B3B2
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	JSL.l CODE_03AD74
	BCC.b CODE_04B3B2
	LDY.w $7722,x
	STY.b $77,x
	JSL.l CODE_03AD74
	BCS.b CODE_04B3B3
	JSL.l CODE_03AEFD
CODE_04B3B2:
	RTS

CODE_04B3B3:
	STZ.w $60A8
	STZ.w $60B4
	JSL.l CODE_04F74A
	LDA.w #$0048
	JSL.l CODE_03A34C
	LDA.w #$0000
	STA.w $70E2,y
	LDA.w $6094
	SEC
	SBC.w #$0060
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0020
	STA.w $7182,x
	LDA.w #$0003
	STA.w $74A2,x
	LDA.w #$0004
	STA.w $7542,x
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7400,x
	LDY.b #$04
	STY.b $76,x
	LDX.b #$20
CODE_04B3FC:
	LDA.l $702E8C,x
	STA.l YI_Global_PaletteMirror[$E0].LowByte,x
	DEX
	DEX
	BPL.b CODE_04B3FC
	LDX.b #$C0
	LDA.w #$0000
CODE_04B40D:
	STA.l $702F6A,x
	DEX
	DEX
	BNE.b CODE_04B40D
	LDX.b #$20
CODE_04B417:
	LDA.l YI_Global_PaletteMirror[$5F].LowByte,x
	STA.l $70302A,x
	LDA.l YI_Global_PaletteMirror[$6F].LowByte,x
	STA.l $70304A,x
	DEX
	DEX
	BNE.b CODE_04B417
	BRA.b CODE_04B44A

CODE_04B42D:
	INC.b $76,x
	LDX.b #$20
CODE_04B431:
	LDA.l $701FFE,x
	STA.l $702F6A,x
	DEX
	DEX
	BNE.b CODE_04B431
	LDX.b #$E0
	LDA.w #$0000
CODE_04B442:
	STA.l $702F8A,x
	DEX
	DEX
	BNE.b CODE_04B442
CODE_04B44A:
	LDX.b #$00
CODE_04B44C:
	LDA.l YI_Global_PaletteMirror[$7F].LowByte,x
	STA.l $70306A,x
	DEX
	DEX
	BNE.b CODE_04B44C
	LDX.b $12
	LDY.w $1060
	BEQ.b CODE_04B48A
	LDA.w #$0080
	STA.w $7A98,x
	PLA
	RTL

CODE_04B467:
	TYX
	LDA.l $70336C
	CMP.w #$0011
	BPL.b CODE_04B48B
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_04B48A:
	RTS

CODE_04B48B:
	JSL.l CODE_03AD74
	BCC.b CODE_04B4A0
	LDY.w $7722,x
	STY.b $77,x
	JSL.l CODE_03AD74
	BCS.b CODE_04B4A1
	JSL.l CODE_03AEFD
CODE_04B4A0:
	RTS

CODE_04B4A1:
	LDA.l DATA_5FDFF4
	STA.l $702D76
	LDA.l DATA_5FDFF6
	STA.l $702D78
	LDY.w $7400,x
	STY.b $18,x
	LDX.b #$00
CODE_04B4B8:
	LDA.l $701FFE,x
	STA.l $702F6A,x
	LDA.l $702D6A,x
	STA.l $701FFE,x
	DEX
	DEX
	BNE.b CODE_04B4B8
	LDX.b $12
	LDY.b #$00
	STY.b $76,x
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_04B4DA:
	dw CODE_04BA6D
	dw CODE_04BAA2
	dw CODE_04BAC4
	dw CODE_04BB6B
	dw CODE_04BB8F
	dw CODE_04BC08
	dw CODE_04BC43
	dw CODE_04BD41

YI_NorSpr016_BiggerBoo_Main:
;$04B4EA
	LDY.b $76,x
	CPY.b #$03
	BEQ.b CODE_04B4F8
	LDA.w $7040,x
	AND.w #$0001
	BEQ.b CODE_04B4FE
CODE_04B4F8:
	JSL.l CODE_03AF23
	BRA.b CODE_04B50B

CODE_04B4FE:
	JSR.w CODE_04B541
	JSR.w CODE_04B5A2
	JSL.l CODE_03AF23
	JSR.w CODE_04B712
CODE_04B50B:
	LDY.b $76,x
	TYA
	ASL
	TXY
	TAX
	JSR.w (DATA_04B4DA,x)
	LDY.b $76,x
	CPY.b #$02
	BPL.b CODE_04B52C
	JSR.w CODE_04B905
	JSR.w CODE_04B9C5
	JSR.w CODE_04B645
	JSR.w CODE_04B6D4
	JSR.w CODE_04B808
	JSR.w CODE_04B8E4
CODE_04B52C:
	LDY.w $1066
	BEQ.b CODE_04B540
	LDA.w $7A36,x
	CMP.b $16,x
	BNE.b CODE_04B540
	LDY.w $7D36,x
	BMI.b CODE_04B540
	STZ.w $1066
CODE_04B540:
	RTL

CODE_04B541:
	LDY.w $74A2,x
	BMI.b CODE_04B54B
	LDA.w $7362,x
	BPL.b CODE_04B54C
CODE_04B54B:
	RTS

CODE_04B54C:
	JSL.l CODE_03AA52
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	LDA.w $7722,x
	PHA
	LDA.b $77,x
	AND.w #$00FF
	STA.w $7722,x
	JSL.l CODE_03AA60
	PLA
	STA.w $7722,x
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $105C
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$FFF0
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08A248>>16
	LDA.w #FXCODE_08A248
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_04B5A1:
	RTS

CODE_04B5A2:
	LDA.w #DATA_04BD8D>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.b $18,x
	LDA.w DATA_04BD83,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w $6000
	LDA.w $7682,x
	STA.w $6002
	STZ.w $6004
	STZ.w $6006
	STZ.w $600E
	LDA.w #$3516
	STA.w $600A
	LDA.w #$3372
	STA.w $600C
CODE_04B5DD:
	LDX.b #FXCODE_08E315>>16
	LDA.w #FXCODE_08E315
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	RTS

CODE_04B601:
	LDX.b #FXCODE_08D46A>>16
	LDA.w #FXCODE_08D46A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$10
	REP.b #$20
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr03D_LargeSeesaw
	BNE.b CODE_04B62B
	LDA.w $7A36,x
	BRA.b CODE_04B638

CODE_04B62B:
	LDY.w $1060
	BNE.b CODE_04B635
	LDA.w #$0314
	BRA.b CODE_04B638

CODE_04B635:
	LDA.w #$0512
CODE_04B638:
	STA.w !RAM_YI_Global_MainScreenLayers
	SEP.b #$20
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	RTS

CODE_04B645:
	LDA.w $7A36,x
	CMP.b $16,x
	BMI.b CODE_04B69A
	LDY.w $77C2,x
	TYA
	STA.b $00
	LDY.b $18,x
	CPY.b #$04
	BMI.b CODE_04B69B
	CPY.b #$08
	BEQ.b CODE_04B69A
	LDY.w $7D36,x
	BMI.b CODE_04B69A
	LDA.b $00
	CMP.w $7400,x
	BEQ.b CODE_04B66F
	LDY.b #$01
	STY.b $79,x
	STY.b $76,x
	RTS

CODE_04B66F:
	LDA.w $60C4
	CMP.w $7400,x
	BNE.b CODE_04B67B
	CMP.b $00
	BEQ.b CODE_04B694
CODE_04B67B:
	LDA.w $7AF8,x
	BNE.b CODE_04B69A
	LDY.b $76,x
	CPY.b #$01
	BEQ.b CODE_04B694
	LDY.b $18,x
	TYA
	AND.w #$0002
	TAY
	STY.b $18,x
	LDY.b #$F8
	STY.b $19,x
	RTS

CODE_04B694:
	LDA.w #$0020
	STA.w $7AF8,x
CODE_04B69A:
	RTS

CODE_04B69B:
	LDA.w $7400,x
	DEC
	EOR.w $7C16,x
	BPL.b CODE_04B6B9
	LDY.w $1066
	BNE.b CODE_04B6B9
	LDY.b #$F8
	STY.b $19,x
	LDA.w $60C4
	CMP.w $7400,x
	BNE.b CODE_04B6D3
	CMP.b $00
	BNE.b CODE_04B6D3
CODE_04B6B9:
	LDY.b $18,x
	TYA
	CLC
	ADC.w #$0004
	TAY
	STY.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $7542,x
	LDY.b #$08
	STY.b $19,x
CODE_04B6D3:
	RTS

CODE_04B6D4:
	LDY.b $79,x
	BEQ.b CODE_04B711
	LDA.w $7AF6,x
	BNE.b CODE_04B711
	LDA.w #$0002
	STA.w $7AF6,x
	TYA
	CPY.b #$00
	BPL.b CODE_04B6EB
	ORA.w #$FF00
CODE_04B6EB:
	CLC
	ADC.w $105C
	CMP.w #$FFF4
	BNE.b CODE_04B705
	STA.w $105C
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDY.b #$FF
	STY.b $79,x
	RTS

CODE_04B705:
	CMP.w #$FFEC
	BNE.b CODE_04B70E
	LDY.b #$00
	STY.b $79,x
CODE_04B70E:
	STA.w $105C
CODE_04B711:
	RTS

CODE_04B712:
	LDA.b $16,x
	LDY.b $76,x
	CPY.b #$07
	BEQ.b CODE_04B745
	CPY.b #$04
	BPL.b CODE_04B72E
	CPY.b #$02
	BEQ.b CODE_04B748
	LDA.w $7A36,x
	CMP.b $16,x
	BPL.b CODE_04B72E
	LDA.w #$0002
	BRA.b CODE_04B742

CODE_04B72E:
	LDA.b $18,x
	BIT.w #$0008
	BEQ.b CODE_04B738
	LDA.w #$0004
CODE_04B738:
	AND.w #$0004
	LSR
	LSR
	CMP.w $7402,x
	BEQ.b CODE_04B7AD
CODE_04B742:
	STA.w $7402,x
CODE_04B745:
	LDA.w $7A36,x
CODE_04B748:
	SEC
	SBC.w #$01C0
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$FF90
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0100
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $04
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_04B772
	LDA.w #$0100
CODE_04B772:
	STA.b $02
	LDA.w $7722,x
	STA.b $06
	LDY.b $77,x
	TYA
	STA.b $08
	LDY.w $7402,x
	DEY
	BEQ.b CODE_04B7A0
	BMI.b CODE_04B793
	LDY.b #$06
	JSR.w CODE_04B7CC
	LDA.b $08
CODE_04B78C:
	STA.b $06
	LDY.b #$08
	BRA.b CODE_04B7A2

CODE_04B793:
	LDY.b #$00
	JSR.w CODE_04B7CC
	LDA.b $08
	STA.b $06
	LDY.b #$02
	BRA.b CODE_04B7A2

CODE_04B7A0:
	LDY.b #$04
CODE_04B7A2:
	JSR.w CODE_04B7CC
	LDX.b $12
	INC.w $0CF9
	JSR.w CODE_04B541
CODE_04B7AD:
	RTS

DATA_04B7AE:
	dw FXDATA_550000+$4041,FXDATA_550000+$6041,FXDATA_550000+$4061,FXDATA_550000+$2001,FXDATA_560000+$6061

DATA_04B7B8:
	dw (FXDATA_550000+$4041)>>16,(FXDATA_550000+$6041)>>16,(FXDATA_550000+$4061)>>16,(FXDATA_550000+$2001)>>16,(FXDATA_560000+$6061)>>16

DATA_04B7C2:
	dw $0020,$0000,$0010,$0020,$0000

CODE_04B7CC:
	LDA.w DATA_04B7AE,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w DATA_04B7B8,y
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.b $02
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.b $04
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w DATA_04B7C2,y
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b $06
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	RTS

CODE_04B808:
	LDY.b $78,x
	BNE.b CODE_04B81E
	LDA.b $16,x
	CMP.w $7A36,x
	BNE.b CODE_04B81E
	LDY.b $19,x
	DEY
	BPL.b CODE_04B81E
	JSR.w CODE_04B81F
	JSR.w CODE_04B82E
CODE_04B81E:
	RTS

CODE_04B81F:
	LDY.w $7D36,x
	BPL.b CODE_04B82D
	LDY.w $1066
	BNE.b CODE_04B82D
	JSL.l CODE_03A858
CODE_04B82D:
	RTS

CODE_04B82E:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_04B82D
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	CMP.b $00
	BCS.b CODE_04B82D
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7CD8,y
	SEC
	SBC.w $7CD8,x
	CMP.b $00
	BCS.b CODE_04B82D
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_04B82D
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_04B82D
	PHY
	TYX
	JSL.l CODE_03B25B
	PLY
	LDA.w $7A36,x
	CMP.b $16,x
	BNE.b CODE_04B8E3
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	CMP.w #$0002
	BPL.b CODE_04B8E3
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $7542,x
	INC.w $1066
	LDA.w #!Define_YI_SoundID78_HurtBoss
	JSL.l CODE_0085D2
	LDA.b $16,x
	CLC
	ADC.w #$0018
	STA.w $105E
	CLC
	ADC.w #$0030
	CMP.w #$01C1
	BMI.b CODE_04B8DF
	STA.b $16,x
	LDY.b #$08
	STY.b $19,x
	JSL.l CODE_02A982
	STZ.w !RAM_YI_Level_NorSpr_BatGeneratorActiveFlagLo
	LDA.w #$0000
	STA.l $70336C
	LDA.w #$0002
	STA.w $7402,x
	INC.w $0B7B
	LDY.b #$02
	STY.b $76,x
	JMP.w CODE_04BB4E

CODE_04B8DF:
	STA.b $16,x
	INC.b $78,x
CODE_04B8E3:
	RTS

CODE_04B8E4:
	LDA.w #$0030
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7BB6,x
	STA.w $7BB8,x
	RTS

CODE_04B905:
	LDY.b #$60
	LDA.b $78,x
	AND.w #$00FF
	BEQ.b CODE_04B917
	LDY.b #$64
	LDA.w $1060
	BEQ.b CODE_04B917
	LDY.b #$62
CODE_04B917:
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDY.b $19,x
	BEQ.b CODE_04B941
	TYA
	CPY.b #$00
	BPL.b CODE_04B926
	ORA.w #$FF00
CODE_04B926:
	STA.b $00
	LDY.b $78,x
	TYA
	CLC
	ADC.b $00
	BMI.b CODE_04B939
	CMP.w #$0100
	BMI.b CODE_04B942
	LDY.b #$FF
	BRA.b CODE_04B93B

CODE_04B939:
	LDY.b #$00
CODE_04B93B:
	STY.b $78,x
	LDY.b #$00
	STY.b $19,x
CODE_04B941:
	RTS

CODE_04B942:
	TAY
	STY.b $78,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $1060
	BNE.b CODE_04B970
	LDA.w #DATA_5FDFF8
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FDFF8>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0005
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0002
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_04B9B2

CODE_04B970:
	LDA.w #DATA_5FE878
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FE878>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0061
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #DATA_5FE894
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FE894>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0071
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_04B9B2:
	LDX.b $12
	RTS

DATA_04B9B5:
	dw $7F26,$7FFF,$6F35,$0000,$7F26,$477F,$323F,$7FFF

CODE_04B9C5:
	LDY.w $1064
	BNE.b CODE_04B9F8
	LDA.w $7A36,x
	CMP.b $16,x
	BPL.b CODE_04B9F8
	LDY.w $0CE8
	BEQ.b CODE_04B9DD
	LDA.w $1060
	BNE.b CODE_04BA0B
	BRA.b CODE_04BA19

CODE_04B9DD:
	CMP.w $105E
	BMI.b CODE_04B9F9
	LDA.w #$0020
	STA.w $0CE8
	LDA.w $105E
	CLC
	ADC.w #$0018
	CMP.b $16,x
	BMI.b CODE_04B9F5
	LDA.b $16,x
CODE_04B9F5:
	STA.w $105E
CODE_04B9F8:
	RTS

CODE_04B9F9:
	CLC
	ADC.w #$0008
	STA.w $7A36,x
	CMP.b $16,x
	BMI.b CODE_04BA0B
	LDY.w $1060
	BEQ.b CODE_04BA19
	BRA.b CODE_04BA3B

CODE_04BA0B:
	LDA.w $7974
	LDY.w $1060
	BNE.b CODE_04BA36
	AND.w #$0002
	ASL
	ASL
	TAY
CODE_04BA19:
	LDA.w DATA_04B9B5,y
	STA.l YI_Global_PaletteMirror[$04].LowByte
	LDA.w DATA_04B9B5+$02,y
	STA.l YI_Global_PaletteMirror[$05].LowByte
	LDA.w DATA_04B9B5+$04,y
	STA.l YI_Global_PaletteMirror[$06].LowByte
	LDA.w DATA_04B9B5+$06,y
	STA.l YI_Global_PaletteMirror[$07].LowByte
	RTS

CODE_04BA36:
	AND.w #$0002
	BNE.b CODE_04BA54
CODE_04BA3B:
	LDX.b #$1C
CODE_04BA3D:
	LDA.l DATA_5FE83E,x
	STA.l YI_Global_PaletteMirror[$60].LowByte,x
	LDA.l DATA_5FE85A,x
	STA.l YI_Global_PaletteMirror[$70].LowByte,x
	DEX
	DEX
	BNE.b CODE_04BA3D
	LDX.b $12
	RTS

CODE_04BA54:
	LDX.b #$1C
CODE_04BA56:
	LDA.l DATA_5FA56E,x
	STA.l YI_Global_PaletteMirror[$60].LowByte,x
	STA.l YI_Global_PaletteMirror[$70].LowByte,x
	DEX
	DEX
	BNE.b CODE_04BA56
	LDX.b $12
	RTS

DATA_04BA69:
	dw $FF80,$0080

CODE_04BA6D:
	TYX
	LDY.b $18,x
	CPY.b #$03
	BPL.b CODE_04BAA1
	LDA.w $7A96,x
	BNE.b CODE_04BAA1
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w $7A36,x
	CMP.b $16,x
	BNE.b CODE_04BAA1
	LDY.w $77C2,x
	LDA.w DATA_04BA69,y
	STA.w $75E0,x
	LDY.w $77C3,x
	LDA.w DATA_04BA69,y
	STA.w $75E2,x
	LDA.w #$0002
	STA.w $7540,x
	STA.w $7542,x
CODE_04BAA1:
	RTS

CODE_04BAA2:
	TYX
	LDA.w $105C
	SEC
	SBC.w #$FFF1
	CMP.w #$0006
	BCS.b CODE_04BAB3
	LDY.b #$08
	BRA.b CODE_04BABB

CODE_04BAB3:
	LDA.w $7400,x
	CLC
	ADC.w #$0004
	TAY
CODE_04BABB:
	STY.b $18,x
	LDY.b $79,x
	BNE.b CODE_04BAC3
	STY.b $76,x
CODE_04BAC3:
	RTS

CODE_04BAC4:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_04BAF4
	LDA.w $7A36,x
	CMP.b $16,x
	BPL.b CODE_04BB1A
	CMP.w $105E
	BNE.b CODE_04BAE5
	CLC
	ADC.w #$0018
	STA.w $105E
	LDA.w #$0020
	STA.w $7A96,x
	BRA.b CODE_04BAF4

CODE_04BAE5:
	CLC
	ADC.w #$0008
	CMP.w #$0200
	BMI.b CODE_04BAF1
	LDA.w #$01FF
CODE_04BAF1:
	STA.w $7A36,x
CODE_04BAF4:
	JSR.w CODE_04BA0B
	LDA.l $70336C
	CMP.w #$0020
	BPL.b CODE_04BB19
	LDA.w #$2F6C
	STA.l $70336E
	LDA.w #$2D6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_04BB19:
	RTS

CODE_04BB1A:
	LDA.w #$012E
	JSL.l CODE_03A34C
	BCC.b CODE_04BB4D
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID81_Unknown
	JSL.l CODE_0085D2
	JSR.w CODE_04B601
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0050
	STA.w $61C6
	INC.b $76,x
CODE_04BB4D:
	RTS

CODE_04BB4E:
	LDX.b #$00
CODE_04BB50:
	LDA.l $702F6A,x
	STA.l $701FFE,x
	DEX
	DEX
	BNE.b CODE_04BB50
	LDX.b $12
	LDA.w #$0000
	STA.l $70336C
	LDY.b #$20
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	RTS

CODE_04BB6B:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_04BB4D
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSL.l CODE_02E19C
	LDA.w #$0100
	STA.w $7A96,x
	PLA
	JML.l CODE_03A32E

CODE_04BB8A:
	RTS

DATA_04BB8B:
	dw $FF80,$0080

CODE_04BB8F:
	TYX
	STZ.w $60C4
	LDA.w $7A98,x
	BNE.b CODE_04BBA1
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
	DEC.w $7A98,x
CODE_04BBA1:
	LDA.w $7C16,x
	SEC
	SBC.w #$FFA0
	BNE.b CODE_04BBB6
	INC.w $7540,x
	INC.w $1015
	STZ.w $7A98,x
	INC.b $76,x
	RTS

CODE_04BBB6:
	STA.w $0C1E
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0BC0
	BEQ.b CODE_04BBDB
	SEC
	SBC.w #$0BC0
	STA.b $00
	LDA.w $7974
	AND.w #$0001
	PHP
	LDA.w !RAM_YI_Global_Layer1XPosLo
	PLP
	BNE.b CODE_04BBDB
	DEC
	LDY.b $01
	BPL.b CODE_04BBDB
	INC
	INC
CODE_04BBDB:
	STA.w $0C23
	LDA.w $7C18,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	SEC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_04BBF3:
	LDA.w $7A96,x
	BNE.b CODE_04BC07
	LDA.w #$0020
	STA.w $7A96,x
	LDY.w $77C3,x
	LDA.w DATA_04BB8B,y
	STA.w $75E2,x
CODE_04BC07:
	RTS

CODE_04BC08:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_04BC14
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_04BC14:
	LDA.w $1015
	BMI.b CODE_04BC3A
	CMP.w #$0002
	BMI.b CODE_04BBF3
	STZ.w $75E2,x
	LDA.w #$0002
	STA.w $7542,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_04BC42
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	RTS

CODE_04BC3A:
	LDA.w #$0030
	STA.w $7A96,x
	INC.b $76,x
CODE_04BC42:
	RTS

CODE_04BC43:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_04BC42
	LDA.l $70336C
	CMP.w #$0011
	BPL.b CODE_04BC6C
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_04BC6C:
	LDX.b #$1C
CODE_04BC6E:
	LDA.l DATA_5FE83E,x
	STA.l $702E2C,x
	STA.l YI_Global_PaletteMirror[$60].LowByte,x
	LDA.l DATA_5FE85A,x
	STA.l $702E4C,x
	STA.l YI_Global_PaletteMirror[$70].LowByte,x
	DEX
	DEX
	BNE.b CODE_04BC6E
	LDY.b #!REGISTER_BG2HorizScrollOffset
	STY.w HDMA[$03].Destination
	INY
	STY.w HDMA[$04].Destination
	LDA.w #$0512
	STA.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$60
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDX.b #$00
CODE_04BCA0:
	LDA.l $701FFE,x
	STA.l $702F6A,x
	LDA.l $702D6A,x
	STA.l $701FFE,x
	DEX
	DEX
	BNE.b CODE_04BCA0
	LDX.b $12
	LDA.w #$4002
	STA.w $7040,x
	LDA.w #$0007
	STA.w $74A2,x
	SEP.b #$20
	LDA.b #$22
	STA.w $7042,x
	STZ.w $7180,x
	REP.b #$20
	LDA.w #$0050
	STA.b $16,x
	LDA.w #$0040
	STA.w $7A36,x
	SEC
	SBC.w #$01C0
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$FF90
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0100
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $02
	STA.b $04
	LDA.w $7722,x
	STA.b $06
	LDY.b $77,x
	TYA
	STA.b $08
	LDY.b #$00
	JSR.w CODE_04B7CC
	LDA.b $08
	STA.b $06
	LDY.b #$02
	JSR.w CODE_04B7CC
	LDX.b $12
	INC.w $0CF9
	LDA.w #$FFEC
	STA.w $105C
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $7182,x
	LDA.w #$0002
	STA.b $18,x
	LDY.b #$00
	STY.b $78,x
	JSR.w CODE_04B601
	LDA.w #$0040
	STA.w $7A96,x
	STZ.w $1015
	INC.b $76,x
	RTS

CODE_04BD41:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_04BD82
	LDA.w $7A36,x
	CLC
	ADC.w #$0002
	STA.w $7A36,x
	CMP.b $16,x
	BMI.b CODE_04BD82
	LDA.w #$0020
	STA.w $7A96,x
	LDA.b $16,x
	CLC
	ADC.w #$0010
	CMP.w #$0090
	BNE.b CODE_04BD80
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDY.b #$00
	STY.b $76,x
	STZ.w $7A96,x
	STZ.w $0C1E
	STZ.w $1064
	LDA.w #$01DE
	JSL.l CODE_039788
	LDA.w #$0080
CODE_04BD80:
	STA.b $16,x
CODE_04BD82:
	RTS

DATA_04BD83:
	dw DATA_04BD8D,DATA_04BF6F,DATA_04C060,DATA_04C151,DATA_04BE7E

DATA_04BD8D:
	db $78,$06,$10,$06,$1A,$06,$22,$06,$28,$06,$2E,$06,$32,$06,$36,$06
	db $3A,$06,$3C,$06,$40,$06,$42,$06,$46,$06,$48,$06,$4A,$06,$4E,$06
	db $50,$06,$52,$06,$54,$06,$56,$06,$58,$06,$5A,$06,$5A,$06,$5C,$06
	db $5E,$02,$76,$02,$7A,$02,$7C,$01,$7D,$01,$7D,$01,$7D,$01,$7D,$01
	db $7D,$01,$7D,$02,$7C,$02,$7C,$01,$7B,$02,$7A,$02,$7A,$02,$78,$02
	db $77,$02,$76,$03,$76,$03,$75,$04,$74,$04,$73,$05,$73,$06,$72,$06
	db $72,$06,$72,$06,$72,$06,$74,$06,$74,$06,$74,$06,$74,$06,$74,$06
	db $74,$06,$74,$06,$74,$06,$74,$05,$75,$05,$75,$05,$75,$05,$75,$05
	db $75,$05,$76,$05,$76,$05,$76,$05,$76,$04,$77,$04,$77,$04,$76,$03
	db $77,$03,$77,$03,$78,$03,$78,$02,$78,$01,$79,$01,$79,$01,$7A,$00
	db $7A,$FF,$7B,$FF,$7C,$FE,$7C,$FE,$7C,$FE,$7C,$FD,$7B,$FE,$7A,$FD
	db $79,$FD,$77,$FE,$76,$FD,$75,$FD,$73,$FE,$72,$FD,$71,$FD,$6F,$FD
	db $6D,$FE,$6C,$FE,$6A,$FE,$68,$FE,$66,$FE,$64,$FE,$62,$FE,$60,$FE
	db $5E,$FE,$5B,$FE,$59,$FE,$56,$FE,$53,$FE,$51,$FE,$4D,$FF,$4A,$FF
	db $46,$FF,$42,$FF,$3E,$FF,$3A,$FF,$35,$FF,$2F,$FF,$27,$FF,$1F,$FF
	db $13

DATA_04BE7E:
	db $78,$00,$10,$00,$1A,$00,$22,$00,$28,$00,$2E,$00,$32,$00,$36,$00
	db $3A,$00,$3C,$00,$40,$00,$42,$00,$46,$00,$48,$00,$4A,$00,$4E,$00
	db $50,$00,$52,$00,$54,$00,$56,$00,$58,$00,$58,$00,$5A,$00,$5C,$00
	db $5E,$00,$5E,$00,$60,$00,$62,$00,$62,$00,$64,$00,$66,$00,$66,$00
	db $68,$00,$68,$00,$6A,$00,$6A,$00,$6C,$00,$6C,$00,$6C,$00,$6E,$00
	db $6E,$00,$6E,$00,$70,$00,$70,$00,$70,$00,$70,$00,$72,$00,$72,$00
	db $72,$00,$72,$00,$72,$00,$74,$00,$74,$00,$74,$00,$74,$00,$74,$00
	db $74,$00,$74,$00,$74,$00,$74,$00,$74,$00,$74,$00,$74,$00,$74,$00
	db $74,$00,$74,$00,$74,$00,$74,$00,$74,$00,$74,$00,$74,$00,$72,$00
	db $72,$00,$72,$00,$72,$00,$72,$00,$70,$00,$70,$00,$70,$00,$70,$00
	db $6E,$00,$6E,$00,$6E,$00,$6C,$00,$6C,$00,$6C,$00,$6A,$00,$6A,$00
	db $68,$00,$68,$00,$66,$00,$66,$00,$64,$00,$62,$00,$62,$00,$60,$00
	db $5E,$00,$5E,$00,$5C,$00,$5A,$00,$58,$00,$58,$00,$56,$00,$54,$00
	db $52,$00,$50,$00,$4E,$00,$4A,$00,$48,$00,$46,$00,$42,$00,$40,$00
	db $3C,$00,$3A,$00,$36,$00,$32,$00,$2E,$00,$28,$00,$22,$00,$1A,$00
	db $10

DATA_04BF6F:
	db $78,$FA,$10,$FA,$1A,$FA,$22,$FA,$28,$FA,$2E,$FA,$32,$FA,$36,$FA
	db $3A,$FA,$3C,$FA,$40,$FA,$42,$FA,$46,$FA,$48,$FA,$4A,$FA,$4E,$FA
	db $50,$FA,$52,$FA,$54,$FA,$56,$FA,$58,$FA,$5A,$FA,$5A,$FA,$5C,$FA
	db $5E,$FE,$76,$FE,$7A,$FE,$7C,$FE,$7D,$FE,$7D,$FE,$7D,$FE,$7D,$FE
	db $7D,$FE,$7D,$FE,$7C,$FE,$7C,$FE,$7B,$FE,$7A,$FE,$7A,$FE,$78,$FD
	db $77,$FE,$76,$FD,$76,$FC,$75,$FC,$74,$FB,$73,$FA,$73,$FA,$72,$FA
	db $72,$FA,$72,$FA,$72,$FA,$74,$FA,$74,$FA,$74,$FA,$74,$FA,$74,$FA
	db $74,$FA,$74,$FA,$74,$FA,$74,$FA,$75,$FA,$75,$FA,$75,$FA,$75,$FA
	db $75,$FB,$76,$FB,$76,$FB,$76,$FB,$76,$FB,$77,$FB,$77,$FC,$76,$FC
	db $77,$FC,$77,$FD,$78,$FD,$78,$FE,$78,$FE,$79,$FE,$79,$FF,$7A,$00
	db $7A,$00,$7B,$01,$7C,$02,$7C,$02,$7C,$02,$7C,$02,$7B,$02,$7A,$02
	db $79,$02,$77,$02,$76,$02,$75,$02,$73,$02,$72,$02,$71,$02,$6F,$02
	db $6D,$02,$6C,$02,$6A,$02,$68,$02,$66,$02,$64,$02,$62,$02,$60,$02
	db $5E,$01,$5B,$01,$59,$02,$56,$01,$53,$01,$51,$01,$4D,$01,$4A,$01
	db $46,$01,$42,$01,$3E,$01,$3A,$00,$35,$00,$2F,$00,$27,$00,$1F,$00
	db $13

DATA_04C060:
	db $78,$06,$10,$06,$1A,$06,$22,$06,$28,$06,$2E,$06,$32,$06,$36,$06
	db $3A,$06,$3C,$06,$40,$06,$42,$06,$46,$06,$48,$06,$4A,$06,$4E,$06
	db $50,$06,$52,$06,$54,$06,$56,$06,$58,$06,$58,$06,$5A,$06,$5C,$06
	db $5E,$06,$5E,$06,$60,$06,$62,$06,$62,$06,$64,$06,$66,$06,$66,$06
	db $68,$06,$68,$06,$6A,$06,$6A,$06,$6C,$06,$6C,$06,$6C,$06,$6E,$06
	db $6E,$06,$6E,$06,$70,$06,$70,$06,$70,$06,$70,$06,$72,$06,$72,$06
	db $72,$06,$72,$06,$72,$06,$74,$06,$74,$06,$74,$06,$74,$06,$74,$06
	db $74,$06,$74,$06,$74,$06,$74,$05,$75,$05,$75,$05,$75,$05,$75,$05
	db $75,$05,$76,$05,$76,$05,$76,$05,$76,$04,$77,$04,$77,$04,$76,$03
	db $77,$03,$77,$03,$78,$03,$78,$02,$78,$01,$79,$01,$79,$01,$7A,$00
	db $7A,$FF,$7B,$FF,$7C,$FE,$7C,$FE,$7C,$FE,$7C,$FD,$7B,$FE,$7A,$FD
	db $79,$FD,$77,$FE,$76,$FD,$75,$FD,$73,$FE,$72,$FD,$71,$FD,$6F,$FD
	db $6D,$FE,$6C,$FE,$6A,$FE,$68,$FE,$66,$FE,$64,$FE,$62,$FE,$60,$FE
	db $5E,$FE,$5B,$FE,$59,$FE,$56,$FE,$53,$FE,$51,$FE,$4D,$FF,$4A,$FF
	db $46,$FF,$42,$FF,$3E,$FF,$3A,$FF,$35,$FF,$2F,$FF,$27,$FF,$1F,$FF
	db $13

DATA_04C151:
	db $78,$FA,$10,$FA,$1A,$FA,$22,$FA,$28,$FA,$2E,$FA,$32,$FA,$36,$FA
	db $3A,$FA,$3C,$FA,$40,$FA,$42,$FA,$46,$FA,$48,$FA,$4A,$FA,$4E,$FA
	db $50,$FA,$52,$FA,$54,$FA,$56,$FA,$58,$FA,$58,$FA,$5A,$FA,$5C,$FA
	db $5E,$FA,$5E,$FA,$60,$FA,$62,$FA,$62,$FA,$64,$FA,$66,$FA,$66,$FA
	db $68,$FA,$68,$FA,$6A,$FA,$6A,$FA,$6C,$FA,$6C,$FA,$6C,$FA,$6E,$FA
	db $6E,$FA,$6E,$FA,$70,$FA,$70,$FA,$70,$FA,$70,$FA,$72,$FA,$72,$FA
	db $72,$FA,$72,$FA,$72,$FA,$74,$FA,$74,$FA,$74,$FA,$74,$FA,$74,$FA
	db $74,$FA,$74,$FA,$74,$FA,$74,$FA,$75,$FA,$75,$FA,$75,$FA,$75,$FA
	db $75,$FB,$76,$FB,$76,$FB,$76,$FB,$76,$FB,$77,$FB,$77,$FC,$76,$FC
	db $77,$FC,$77,$FD,$78,$FD,$78,$FE,$78,$FE,$79,$FE,$79,$FF,$7A,$00
	db $7A,$00,$7B,$01,$7C,$02,$7C,$02,$7C,$02,$7C,$02,$7B,$02,$7A,$02
	db $79,$02,$77,$02,$76,$02,$75,$02,$73,$02,$72,$02,$71,$02,$6F,$02
	db $6D,$02,$6C,$02,$6A,$02,$68,$02,$66,$02,$64,$02,$62,$02,$60,$02
	db $5E,$01,$5B,$01,$59,$02,$56,$01,$53,$01,$51,$01,$4D,$01,$4A,$01
	db $46,$01,$42,$01,$3E,$01,$3A,$00,$35,$00,$2F,$00,$27,$00,$1F,$00
	db $13

;---------------------------------------------------------------------------

DATA_04C242:
	db $80,$7F

YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_Init:
;$04C244
	LDA.w $7974
	STA.w $0FF9
	LDY.b #$F0
	STY.b $79,x
	LDY.b #$00
	JSR.w CODE_04C433
	LDA.w #$0004
	STA.b $00
CODE_04C258:
	LDA.b $00
	ASL
	TAY
	LDA.w $0FF9,y
	STA.b $04
	LDA.w $1001,y
	STA.b $06
	LDA.w #$001E
	JSL.l CODE_03A364
	BCC.b CODE_04C2A7
	LDA.b $04
	STA.w $7A36,y
	SEC
	SBC.w #$0008
	STA.w $70E2,y
	LDA.b $06
	STA.w $7A38,y
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.b $00
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w $0FF9
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	DEC.b $00
	BNE.b CODE_04C258
YI_NorSpr064_4AutoRotatingPinkPlatforms_Init:
CODE_04C2A7:
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_04C242,y
	TAY
	STY.b $19,x
YI_NorSpr055_4GreenRotatingPlatforms_Init:
YI_NorSpr056_4PinkRotatingPlatforms_Init:
	STZ.w $7400,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	LDA.w #$8000
	STA.w $75E0,x
	XBA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$F0
	STY.b $79,x
	STZ.w $7BB6,x
	STZ.w $7BB8,x
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$0003
	BEQ.b CODE_04C2EF
	CMP.w #$000D
	BNE.b CODE_04C2F5
CODE_04C2EF:
	INC.w $7B58,x
	INC.w $7B58,x
CODE_04C2F5:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr055_4GreenRotatingPlatforms_Main:
YI_NorSpr056_4PinkRotatingPlatforms_Main:
YI_NorSpr064_4AutoRotatingPinkPlatforms_Main:
YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys_Main:
;$04C2F6
	STZ.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr056_4PinkRotatingPlatforms
	BEQ.b CODE_04C30D
	CMP.w #!Define_YI_NorSpr064_4AutoRotatingPinkPlatforms
	BNE.b CODE_04C311
	LDA.w $7182,x
	AND.w #$0010
	BNE.b CODE_04C311
CODE_04C30D:
	INC.b $04
	INC.b $04
CODE_04C311:
	JSR.w CODE_04C332
	JSL.l CODE_03AF23
	LDA.w $7362,x
	BMI.b CODE_04C331
	LDY.w $74A2,x
	BMI.b CODE_04C331
	JSR.w CODE_04C530
	JSR.w CODE_04C776
	JSR.w CODE_04C574
	JSR.w CODE_04C66A
	JSR.w CODE_04C7F4
CODE_04C331:
	RTL

CODE_04C332:
	LDA.w $7362,x
	BMI.b CODE_04C33C
	LDY.w $74A2,x
	BPL.b CODE_04C33D
CODE_04C33C:
	RTS

CODE_04C33D:
	LDY.b $04
	JSR.w CODE_04C433
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.b $0C
	LDA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.b $0E
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.b $08
	LDA.w $7682,x
	STA.b $0A
	REP.b #$10
	LDY.w $7362,x
	LDA.b $08
	CLC
	ADC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	SEC
	SBC.b $00
	STA.w $6000,y
	CLC
	ADC.b $02
	STA.w $6008,y
	LDA.b $08
	CLC
	ADC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	SEC
	SBC.b $00
	STA.w $6010,y
	CLC
	ADC.b $02
	STA.w $6018,y
	LDA.b $08
	SEC
	SBC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	SEC
	SBC.b $00
	STA.w $6020,y
	CLC
	ADC.b $02
	STA.w $6028,y
	LDA.b $08
	SEC
	SBC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	SEC
	SBC.b $00
	STA.w $6030,y
	CLC
	ADC.b $02
	STA.w $6038,y
	LDA.b $0A
	SEC
	SBC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.w $6002,y
	STA.w $600A,y
	LDA.b $0A
	CLC
	ADC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $6012,y
	STA.w $601A,y
	LDA.b $0A
	CLC
	ADC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.w $6022,y
	STA.w $602A,y
	LDA.b $0A
	SEC
	SBC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $6032,y
	STA.w $603A,y
	JSR.w CODE_04C4C7
	LDA.b $04
	BEQ.b CODE_04C40B
	LDA.w $6004,y
	AND.w #$F1FF
	ORA.w #$0800
	STA.w $6004,y
	STA.w $6014,y
	STA.w $6024,y
	STA.w $6034,y
	LDA.w $600C,y
	AND.w #$F1FF
	ORA.w #$0800
	STA.w $600C,y
	STA.w $601C,y
	STA.w $602C,y
	STA.w $603C,y
	SEP.b #$10
	RTS

CODE_04C40B:
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	CLC
	ADC.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	CLC
	ADC.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	TYA
	CLC
	ADC.w #$0020
	TAY
	JSR.w CODE_04C4C7
	SEP.b #$10
	RTS

;---------------------------------------------------------------------------

DATA_04C42B:
	db $10,$10,$0C,$08

DATA_03C42F:
	dw $0028,$0018

CODE_04C433:
	LDA.w DATA_04C42B,y
	AND.w #$00FF
	STA.b $00
	LDA.w DATA_04C42B+$01,y
	AND.w #$00FF
	STA.b $02
	LDA.w DATA_03C42F,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0003
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	CPY.b #$00
	BEQ.b CODE_04C456
	DEC.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
CODE_04C456:
	LDY.b $79,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B85D0>>16
	LDA.w #FXCODE_0B85D0
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys
	BNE.b CODE_04C4C6
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.b $06
	LDA.w $7182,x
	STA.b $08
	LDA.b $06
	CLC
	ADC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $0FFB
	LDA.b $06
	CLC
	ADC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.w $0FFD
	LDA.b $06
	SEC
	SBC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $0FFF
	LDA.b $06
	SEC
	SBC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.w $1001
	LDA.b $08
	SEC
	SBC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.w $1003
	LDA.b $08
	CLC
	ADC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $1005
	LDA.b $08
	CLC
	ADC.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.w $1007
	LDA.b $08
	SEC
	SBC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $1009
CODE_04C4C6:
	RTS

;---------------------------------------------------------------------------

CODE_04C4C7:
	LDA.b $08
	CLC
	ADC.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEC
	SBC.w #$0004
	STA.w $6048,y
	LDA.b $08
	CLC
	ADC.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	SEC
	SBC.w #$0004
	STA.w $6050,y
	LDA.b $08
	SEC
	SBC.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEC
	SBC.w #$0004
	STA.w $6058,y
	LDA.b $08
	SEC
	SBC.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	SEC
	SBC.w #$0004
	STA.w $6060,y
	LDA.b $0A
	SEC
	SBC.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	CLC
	ADC.w #$0004
	STA.w $604A,y
	LDA.b $0A
	CLC
	ADC.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	CLC
	ADC.w #$0004
	STA.w $6052,y
	LDA.b $0A
	CLC
	ADC.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	CLC
	ADC.w #$0004
	STA.w $605A,y
	LDA.b $0A
	SEC
	SBC.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	CLC
	ADC.w #$0004
	STA.w $6062,y
	RTS

CODE_04C530:
	LDA.w $75E0,x
	CMP.w #$8000
	BNE.b CODE_04C56B
	STZ.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr064_4AutoRotatingPinkPlatforms
	BEQ.b CODE_04C562
	CMP.w #!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys
	BEQ.b CODE_04C562
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700006,x
	SEP.b #$10
	LDX.b $12
	AND.w #$FF00
	CMP.w #$8700
	BNE.b CODE_04C562
	INC.b $77,x
	BRA.b CODE_04C56B

CODE_04C562:
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
CODE_04C56B:
	RTS

DATA_04C56C:
	dw $0010,$000C

DATA_04C570:
	db !Define_YI_SoundID6A_ManuallyRotatePlatform1,!Define_YI_SoundID6B_ManuallyRotatePlatform2
	db !Define_YI_SoundID6C_ManuallyRotatePlatform3,!Define_YI_SoundID6B_ManuallyRotatePlatform2

CODE_04C574:
	LDY.b $77,x
	BNE.b CODE_04C5B9
	LDY.b $04
	LDA.w DATA_04C56C,y
	STA.w $6028
	LDA.w $7CD6,x
	STA.w $602A
	LDA.w $7CD8,x
	STA.w $602C
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $19,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $0C
	STA.w $603C
	LDA.b $0E
	STA.w $603E
	LDX.b #FXCODE_0AE864>>16
	LDA.w #FXCODE_0AE864
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7860,x
	BEQ.b CODE_04C60D
	LDY.b #$00
	STY.b $19,x
	BRA.b CODE_04C60D

CODE_04C5B9:
	LDA.b $16,x
	SEC
	SBC.w #$4000
	EOR.b $18,x
	BMI.b CODE_04C5E5
	LDA.b $16,x
	CLC
	ADC.w #$8000
	STA.b $16,x
	LDA.w $75E0,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CPY.b #$02
	BPL.b CODE_04C5DE
	CLC
	ADC.w #$0100
	AND.w #$01FE
	BRA.b CODE_04C5E2

CODE_04C5DE:
	EOR.w #$FFFF
	INC
CODE_04C5E2:
	STA.w $75E0,x
CODE_04C5E5:
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSL.l CODE_04A9FD
	LDA.w $70E2,x
	SEC
	SBC.b $00
	CLC
	ADC.w $72C0,x
	STA.w $72C0,x
	LDA.w $7182,x
	SEC
	SBC.b $02
	CLC
	ADC.w $72C2,x
	STA.w $72C2,x
CODE_04C60D:
	LDY.b $19,x
	TYA
	CPY.b #$00
	BPL.b CODE_04C617
	ORA.w #$FF00
CODE_04C617:
	STA.b $00
	ASL
	CLC
	ADC.b $78,x
	STA.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr064_4AutoRotatingPinkPlatforms
	BEQ.b CODE_04C65B
	CMP.w #!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys
	BEQ.b CODE_04C65B
	LDA.b $00
	BPL.b CODE_04C634
	EOR.w #$FFFF
	INC
CODE_04C634:
	CLC
	ADC.w $7BB6,x
	CMP.w #$0600
	BMI.b CODE_04C657
	PHA
	LDA.w $7BB8,x
	INC
	AND.w #$0003
	STA.w $7BB8,x
	TAY
	LDA.w DATA_04C570,y
	TAY
	TYA
	JSL.l CODE_0085D2
	PLA
	SEC
	SBC.w #$0600
CODE_04C657:
	STA.w $7BB6,x
	RTS

CODE_04C65B:
	LDY.b $19,x
	BEQ.b CODE_04C665
	LDA.w #$00E0
	STA.w $0051
CODE_04C665:
	RTS

DATA_04C666:
	dw $0014,$0010

CODE_04C66A:
	LDY.b $04
	LDA.w DATA_04C666,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $0C
	EOR.w #$FFFF
	INC
	STA.b $08
	LDA.b $0E
	EOR.w #$FFFF
	INC
	STA.b $0A
	STZ.b $06
	LDA.b $0C
	STA.b $00
	LDA.b $0E
	JSR.w CODE_04C6B3
	INC.b $06
	LDA.b $0E
	STA.b $00
	LDA.b $08
	JSR.w CODE_04C6B3
	INC.b $06
	LDA.b $08
	STA.b $00
	LDA.b $0A
	JSR.w CODE_04C6B3
	INC.b $06
	LDA.b $0A
	STA.b $00
	LDA.b $0C
	JSR.w CODE_04C6B3
	RTS

CODE_04C6B3:
	STA.b $02
	CPX.w $61B6
	BEQ.b CODE_04C6F9
	LDY.w $60AB
	BMI.b CODE_04C6F8
	LDA.w $7C16,x
	CLC
	ADC.b $00
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BCS.b CODE_04C6F8
	LDA.w $7C18,x
	CLC
	ADC.b $02
	SEC
	SBC.w $6122
	SEC
	SBC.w #$0008
	CMP.w #$FFF6
	BCC.b CODE_04C6F8
	LDY.w $61B6
	BNE.b CODE_04C6F8
	STX.w $61B6
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.b $06
	STY.b $18,x
	JMP.w CODE_04C766

CODE_04C6F8:
	RTS

CODE_04C6F9:
	LDY.b $18,x
	CPY.b $06
	BNE.b CODE_04C6F8
	LDY.w $60AB
	BMI.b CODE_04C758
	LDY.w $0D94
	BNE.b CODE_04C758
	LDY.b $76,x
	TYA
	CPY.b #$00
	BPL.b CODE_04C713
	ORA.w #$FF00
CODE_04C713:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $00
	SEC
	SBC.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.w $72C0,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.w $7C16,x
	STA.w $7C16,x
	LDA.w $7C18,x
	CLC
	ADC.b $02
	SEC
	SBC.w $6122
	SEC
	SBC.w #$0008
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7C16,x
	CLC
	ADC.b $00
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BCC.b CODE_04C766
CODE_04C758:
	CPX.w $61B6
	BNE.b CODE_04C760
	STZ.w $61B6
CODE_04C760:
	LDY.b #$00
	STY.b $18,x
	PLA
	RTS

CODE_04C766:
	INC.w $61B4
	LDY.b $00
	STY.b $76,x
	STZ.w $60AA
	PLA
CODE_04C771:
	RTS

DATA_04C772:
	db $00,$40,$80,$C0

CODE_04C776:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr064_4AutoRotatingPinkPlatforms
	BEQ.b CODE_04C771
	CMP.w #!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys
	BEQ.b CODE_04C771
	CPX.w $61B6
	BNE.b CODE_04C7D1
	LDY.b $18,x
	LDA.w DATA_04C772,y
	AND.w #$00FF
	CLC
	ADC.b $79,x
	AND.w #$00FF
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$FFF0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	INC
	CMP.w #$0002
	BCC.b CODE_04C7D1
	LDY.b $19,x
	TYA
	CPY.b #$00
	BPL.b CODE_04C7BE
	ORA.w #$FF00
CODE_04C7BE:
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	TAY
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCC.b CODE_04C7CE
	LDY.b $19,x
CODE_04C7CE:
	STY.b $19,x
	RTS

CODE_04C7D1:
	LDY.b $19,x
	TYA
	CPY.b #$00
	BPL.b CODE_04C7E1
	ORA.w #$FF00
	CLC
	ADC.w #$0002
	BRA.b CODE_04C7E5

CODE_04C7E1:
	SEC
	SBC.w #$0002
CODE_04C7E5:
	TAY
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_04C7F1
	LDY.b #$00
CODE_04C7F1:
	STY.b $19,x
	RTS

CODE_04C7F4:
	SEP.b #$20
	LDA.b $19,x
	PHP
	BPL.b CODE_04C7FE
	EOR.b #$FF
	INC
CODE_04C7FE:
	TAY
	REP.b #$20
	TYA
	STA.w $7A37,x
	SEP.b #$20
	STZ.w $7A39,x
	PLP
	BPL.b CODE_04C810
	DEC.w $7A39,x
CODE_04C810:
	REP.b #$20
	LDY.b $77,x
	BNE.b CODE_04C832
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr064_4AutoRotatingPinkPlatforms
	BEQ.b CODE_04C832
	CMP.w #!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys
	BEQ.b CODE_04C832
	LDA.w $7A37,x
	LDY.w $7A39,x
	BNE.b CODE_04C82F
	EOR.w #$FFFF
	INC
CODE_04C82F:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_04C832:
	RTS

;---------------------------------------------------------------------------

CODE_04C833:
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_04C84D
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr15E_4PinkRotatingPlatformsWithShyGuys
	BNE.b CODE_04C84D
	LDA.w $0FF9
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_04C853
CODE_04C84D:
	PLY
	PLA
	JML.l CODE_03A31E

CODE_04C853:
	LDY.b $78,x
	LDA.w $0FF9,y
	SEC
	SBC.w $7A36,x
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	LDA.w $1001,y
	SEC
	SBC.w $7A38,x
	CLC
	ADC.w $7182,x
	STA.w $7182,x
	LDA.w $1001,y
	SEC
	SBC.w #$0010
	CMP.w $7182,x
	BPL.b CODE_04C886
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_04C886:
	LDA.w $0FF9,y
	STA.w $7A36,x
	LDA.w $1001,y
	STA.w $7A38,x
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr100_Bubbled1up_Init:
;$04C89A
	RTL

;---------------------------------------------------------------------------

YI_NorSpr100_Bubbled1up_Main:
;$04C89B
	STZ.w $7400,x
	LDY.b $18,x
	BEQ.b CODE_04C8B8
	LDA.w $7362,x
	BMI.b CODE_04C8B8
	REP.b #$10
	TAY
	LDA.w $6024,y
	AND.w #$FF00
	ORA.w #$004A
	STA.w $6024,y
	SEP.b #$10
CODE_04C8B8:
	JSL.l CODE_03AF23
	LDY.b $76,x
	BNE.b CODE_04C8C3
	INC.b $76,x
	RTL

CODE_04C8C3:
	LDY.w $7D36,x
	BMI.b CODE_04C8DD
	BEQ.b CODE_04C92D
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_04C92D
	LDA.w $7D37,y
	BEQ.b CODE_04C92D
	DEY
	TYX
	JSL.l CODE_03B25B
CODE_04C8DD:
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.w $0000
	LDA.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.w $0002
	LDY.b $18,x
	BNE.b CODE_04C8FB
	JSL.l CODE_03A4A2
	BRA.b CODE_04C8FF

CODE_04C8FB:
	JSL.l CODE_03A491
CODE_04C8FF:
	LDA.w #!Define_YI_AmbSpr1E4
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000C
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	LDA.b $78,x
	STA.b $04
	LDA.w $7A36,x
	JSL.l CODE_03D3F3
	JML.l CODE_03A32E

CODE_04C92D:
	LDA.w $75E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_04C947
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_04C947:
	LDA.w $7A98,x
	BNE.b CODE_04C95C
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_04C95C:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_04C967
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_04C967:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr115_Coin_Init:
CODE_04C968:
	LDA.w #$0100
	STA.w $7A96,x
	LDA.w #$0140
	STA.w $7A98,x
	LDA.w #$0010
	STA.w $7AF6,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr115_Coin_Main:
;$04C97B
	JSL.l CODE_03AF23
	LDA.w $7974
	LSR
	LSR
	LSR
	AND.w #$0003
	STA.w $7402,x
	LDY.b $76,x
	BEQ.b CODE_04C9BF
	LDA.w $7860,x
	LSR
	BCC.b CODE_04C9BE
	JSL.l CODE_04C968
	LDA.b $10
	AND.w #$01FF
	CLC
	ADC.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	XBA
	AND.w #$01FF
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $74A2,x
	STZ.b $76,x
CODE_04C9BE:
	RTL

CODE_04C9BF:
	LDA.w $7860,x
	LSR
	BCC.b CODE_04C9DB
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FD80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_04C9DB:
	LDA.w $7AF6,x
	BNE.b CODE_04CA09
	LDY.w $7D36,x
	BEQ.b CODE_04CA09
	BMI.b CODE_04CA01
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_04CA09
	LDA.w $7D37,y
	BEQ.b CODE_04CA09
	LDA.w $735F,y
	CMP.w #$0022
	BMI.b CODE_04CA09
	CMP.w #$002C
	BPL.b CODE_04CA09
CODE_04CA01:
	JSL.l CODE_04CA3A
	JML.l CODE_03A32E

CODE_04CA09:
	LDA.w $7A96,x
	BNE.b CODE_04CA26
	LDA.w $7A98,x
	BNE.b CODE_04CA1B
	LDY.b $78,x
	BNE.b CODE_04CA01
	JML.l CODE_03A31E

CODE_04CA1B:
	LDA.w $7974
	AND.w #$0001
	ASL
	DEC
	STA.w $74A2,x
CODE_04CA26:
	RTL

;---------------------------------------------------------------------------

CODE_04CA27:
	PHB
	PHK
	PLB
	PHD
	LDA.w #$7960
	TCD
	JSL.l CODE_04CA3A
	JSL.l CODE_03A32E
	PLD
	PLB
	RTL

CODE_04CA3A:
	LDA.w #!Define_YI_AmbSpr1E4
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000C
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	JSL.l CODE_03B353
	JML.l CODE_0CF957

;---------------------------------------------------------------------------

YI_NorSpr049_ThunderLakituFireBlast1_Init:
YI_NorSpr04A_ThunderLakituFireBlast2_Init:
YI_NorSpr04B_ThunderLakituFireBlast3_Init:
;$04CA61
	RTL

;---------------------------------------------------------------------------

YI_NorSpr049_ThunderLakituFireBlast1_Main:
;$04CA62
	JSL.l CODE_03AF23
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_04CA73
	AND.w #$000C
	BEQ.b CODE_04CA77
CODE_04CA73:
	JML.l CODE_03A31E

CODE_04CA77:
	LDA.w $7A96,x
	BNE.b CODE_04CABC
	LDA.w #$004B
	JSL.l CODE_03A364
	BCC.b CODE_04CABC
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0001
	STA.w $7402,y
	INC
	STA.w $7BB8,y
	INC
	STA.w $7A98,y
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$000B
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	INC
	STA.w $7B58,y
	LDA.w #!Define_YI_SoundID39_PiranhaPlantMunch
	JSL.l CODE_0085D2
	LDA.w #$0006
	STA.w $7A96,x
CODE_04CABC:
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_04CA73
	RTL

;---------------------------------------------------------------------------

DATA_04CACD:
	db $0B,$0A,$09,$08,$07,$06,$05,$04,$03,$02,$01,$12,$11,$09,$10

DATA_04CADC:
	db $0F,$0E,$0D,$0C,$04,$08,$0C,$10,$08,$04,$02,$00,$00,$00,$00

DATA_04CAEB:
	db $04,$06,$0A,$04,$0C,$08,$04,$00,$08,$0C,$0E,$00,$00,$00,$00,$0C
	db $0A,$06,$0C

YI_NorSpr04A_ThunderLakituFireBlast2_Main:
YI_NorSpr04B_ThunderLakituFireBlast3_Main:
;$04CAFE
	JSL.l CODE_03AF23
	LDA.w $7A98,x
	BNE.b CODE_04CB36
	DEC.b $18,x
	BPL.b CODE_04CB0F
	JML.l CODE_03A31E

CODE_04CB0F:
	LDA.b $18,x
	CLC
	ADC.b $78,x
	TAY
	LDA.w DATA_04CACD,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A98,x
	LDA.w DATA_04CADC,y
	AND.w #$00FF
	STA.w $7BB8,x
	LDA.w DATA_04CAEB,y
	AND.w #$00FF
	STA.w $7B58,x
CODE_04CB36:
	LDY.b $18,x
	CPY.b #$04
	BMI.b CODE_04CB45
	LDY.w $7D36,x
	BPL.b CODE_04CB45
	JSL.l CODE_03A858
CODE_04CB45:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr117_DonutLift_Init:
YI_NorSpr118_LargeDonutLift_Init:
;$04CB46
	LDY.b #$08
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr117_DonutLift
	BEQ.b CODE_04CB52
	LDY.b #$10
CODE_04CB52:
	TYA
	STA.w $7BB6,x
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

DATA_04CB5A:
	dw $0001,$0004

DATA_04CB5E:
	dw $7502,$7500,$7501,$3DAA,$3DAB

DATA_04CB68:
	dw $0000,$0000,$0010,$FFF0,$0010

DATA_04CB72:
	dw $0000,$0000,$0000,$0010,$0000

YI_NorSpr117_DonutLift_Main:
YI_NorSpr118_LargeDonutLift_Main:
;$04CB7C
	STZ.w $7400,x
	JSL.l CODE_03AF23
	LDY.b $76,x
	BEQ.b CODE_04CB8B
	JML.l CODE_03A31E

CODE_04CB8B:
	LDA.w $7A96,x
	DEC
	CMP.w #$0050
	BCS.b CODE_04CBB6
	CMP.w #$0040
	BNE.b CODE_04CB9F
	LDA.w #$0004
	STA.w $7542,x
CODE_04CB9F:
	LDA.b $14
	LSR
	BCC.b CODE_04CBB6
	LDA.w $70E2,x
	EOR.w #$0001
	PHA
	SEC
	SBC.w $70E2,x
	STA.w $72C0,x
	PLA
	STA.w $70E2,x
CODE_04CBB6:
	LDA.w $61B4
	PHA
	JSL.l CODE_03D22D
	PLA
	SEC
	SBC.w $61B4
	ORA.w $7542,x
	BNE.b CODE_04CBF9
	LDA.w $7362,x
	BMI.b CODE_04CBF9
	LDA.w $70E2,x
	STA.b $04
	LDA.w $7182,x
	STA.b $06
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr117_DonutLift
	ASL
	TAY
	LDA.w DATA_04CB5A,y
	STA.b $00
CODE_04CBE5:
	LDA.w DATA_04CB5E,y
	STA.b $02
	PHY
	JSR.w CODE_04CBFA
	LDX.b $12
	PLY
	INY
	INY
	DEC.b $00
	BNE.b CODE_04CBE5
	INC.b $76,x
CODE_04CBF9:
	RTL

;---------------------------------------------------------------------------

CODE_04CBFA:
	LDA.w DATA_04CB68,y
	CLC
	ADC.b $04
	STA.b $04
	LDA.w DATA_04CB72,y
	CLC
	ADC.b $06
	STA.b $06
	LDA.b $04
	STA.w $0091
	LDA.b $06
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.b $02
	STA.w $0095
	JSL.l CODE_109295
	RTS

;---------------------------------------------------------------------------

YI_NorSpr121_NumberPlatformExplosion_Init:
;$04CC24
	RTL

;---------------------------------------------------------------------------

DATA_04CC25:
	dw $0000,$0000,$0000,$0000,$7600,$7601,$7775,$7776
	dw $7602,$7603,$7777,$7778,$7604,$7605,$7779,$777A

YI_NorSpr121_NumberPlatformExplosion_Main:
;$04CC45
	JSL.l CODE_03AF23
	LDY.b $76,x
	BNE.b CODE_04CC50
	INC.b $76,x
	RTL

CODE_04CC50:
	LDA.w $61B4
	PHA
	JSL.l CODE_03D22D
	PLA
	CMP.w $61B4
	BNE.b CODE_04CCAC
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.b $18,x
	BNE.b CODE_04CC7C
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_03B56E
	LDA.b $18,x
CODE_04CC7C:
	ASL
	ASL
	ASL
	TAY
	LDA.w $70E2,x
	STA.b $04
	LDA.w $7182,x
	STA.b $06
	LDA.w #$0004
	STA.b $00
CODE_04CC8F:
	LDA.w DATA_04CC25,y
	STA.b $02
	PHY
	TYA
	AND.w #$0007
	TAY
	INY
	INY
	JSR.w CODE_04CBFA
	LDX.b $12
	PLY
	INY
	INY
	DEC.b $00
	BNE.b CODE_04CC8F
	JSL.l CODE_03A31E
CODE_04CCAC:
	RTL

;---------------------------------------------------------------------------

DATA_04CCAD:
	dw $FFBD,$0046

YI_NorSpr074_Spike_Init:
;$04CCB1
	INC.b $78,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	BMI.b CODE_04CCC0
	INY
	INY
CODE_04CCC0:
	TYA
	STA.w $7400,x
	LDA.w DATA_04CCAD,y
	STA.w $75E0,x
	RTL

;---------------------------------------------------------------------------

DATA_04CCCB:
	dw CODE_04CD26
	dw CODE_04CE25
	dw CODE_04CE46
	dw CODE_048EB5

YI_NorSpr074_Spike_Main:
;$04CCD3
	LDY.w $7722,x
	BMI.b CODE_04CCDC
	JSL.l CODE_03AA2E
CODE_04CCDC:
	LDY.b $76,x
	CPY.b #$03
	BNE.b CODE_04CD01
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_04CD01
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_04CD22
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_04CD05
	JML.l CODE_03B273

CODE_04CD01:
	JSL.l CODE_03AF23
CODE_04CD05:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_04CCCB,x)
	LDY.b #$00
	LDA.w $75E0,x
	BEQ.b CODE_04CD1C
	BMI.b CODE_04CD18
	INY
	INY
CODE_04CD18:
	TYA
	STA.w $7400,x
CODE_04CD1C:
	JSR.w CODE_048B8D
	JSR.w CODE_048BDF
CODE_04CD22:
	RTL

DATA_04CD23:
	db $0C,$20,$18

CODE_04CD26:
	TYX
	STZ.w $7540,x
	LDY.w $7402,x
	CPY.b #$03
	BMI.b CODE_04CD45
	LDA.w $7A96,x
	BEQ.b CODE_04CD37
	RTS

CODE_04CD37:
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$05
	BMI.b CODE_04CDB9
	INC.b $76,x
	BRA.b CODE_04CDB9

CODE_04CD45:
	LDA.w $7A98,x
	BEQ.b CODE_04CD4D
	JMP.w CODE_04CDCC

CODE_04CD4D:
	LDA.w $75E0,x
	EOR.w $7C16,x
	BPL.b CODE_04CDCC
	LDA.w $7C16,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_04CDCC
	LDA.w $7C18,x
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_04CDCC
	LDA.w #$0075
	JSL.l CODE_03A34C
	BCC.b CODE_04CDCC
	PHX
	TYX
	JSL.l CODE_03AD74
	BCC.b CODE_04CDB4
	TXY
	PLX
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$01C0
	STA.w $7A38,y
	LDA.w #$0080
	STA.w $7A36,y
	SEP.b #$20
	LDA.w $7400,x
	STA.w $7400,y
	REP.b #$20
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$0003
	STA.w $7402,x
	BRA.b CODE_04CDB9

CODE_04CDB4:
	JSL.l CODE_03A31E
	PLX
CODE_04CDB9:
	LDY.w $7402,x
	LDA.w DATA_04CD23-$03,y
	AND.w #$00FF
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	RTS

CODE_04CDCC:
	LDA.w #$000B
	STA.w $7540,x
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_04CDE9
	AND.w #$0001
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	ORA.b $00
	BNE.b CODE_04CDEF
CODE_04CDE9:
	LDA.w #$0020
	STA.w $7A98,x
CODE_04CDEF:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_04CDF8
	EOR.w #$FFFF
	INC
CODE_04CDF8:
	CLC
	ADC.b $18,x
	CMP.w #$0200
	BCC.b CODE_04CE1E
	PHA
	LDA.w $7402,x
	CLC
	ADC.b $78,x
	CMP.w #$0003
	BCC.b CODE_04CE16
	LDA.b $78,x
	EOR.w #$FFFF
	INC
	STA.b $78,x
	BRA.b CODE_04CE19

CODE_04CE16:
	STA.w $7402,x
CODE_04CE19:
	PLA
	SEC
	SBC.w #$0200
CODE_04CE1E:
	STA.b $18,x
	RTS

DATA_04CE21:
	dw $0059,$FFA7

CODE_04CE25:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_04CE45
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$FE9A
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7860,x
	LDY.w $7400,x
	LDA.w DATA_04CE21,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_04CE45:
	RTS

CODE_04CE46:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_04CE5D
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0060
	STA.w $7A98,x
	STZ.w $7402,x
	STZ.b $76,x
CODE_04CE5D:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr075_SpikeBall_Init:
;$04CE5E
	JSR.w CODE_04CF1A
	RTL

;---------------------------------------------------------------------------

DATA_04CE62:
	dw $0010,$FFF0

DATA_04CE66:
	dw CODE_04CF72
	dw CODE_04CF88
	dw CODE_04CFA2
	dw CODE_04CFCA
	dw CODE_048000

YI_NorSpr075_SpikeBall_Main:
;$04CE70
	LDY.w $74A2,x
	BMI.b CODE_04CE79
	JSL.l CODE_03AA52
CODE_04CE79:
	JSL.l CODE_03AF23
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_04CE8C
	LDA.w $7D38,y
	BEQ.b CODE_04CEA2
CODE_04CE8C:
	LDY.b $76,x
	CPY.b #$03
	BPL.b CODE_04CEA2
	LDA.w #$02CC
	STA.w $75E2,x
	LDA.w #$002C
	STA.w $7542,x
	LDY.b #$04
	STY.b $76,x
CODE_04CEA2:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_04CE66,x)
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BEQ.b CODE_04CEBA
	RTL

CODE_04CEBA:
	LDA.w #$0002
	STA.w $74A2,x
	JSR.w CODE_04CF1A
	LDY.b $76,x
	CPY.b #$03
	BPL.b CODE_04CEDF
	LDY.b $18,x
	LDA.w $70E2,y
	SEC
	SBC.w $6022
	STA.w $70E2,x
	LDA.w $7182,y
	SEC
	SBC.w $6020
	STA.w $7182,x
CODE_04CEDF:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	CLC
	ADC.w $6024
	CMP.w $6026
	BCS.b CODE_04CF19
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611E
	CLC
	ADC.w $6028
	CMP.w $602A
	BCS.b CODE_04CF19
	LDA.w $61D6
	BNE.b CODE_04CF19
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	JSL.l CODE_03A858
CODE_04CF19:
	RTL

CODE_04CF1A:
	LDA.w #FXDATA_540000+$6000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0A00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0600
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $6120
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $6122
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D69F>>16
	LDA.w #FXCODE_08D69F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_04CF72:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w #$0009
	CMP.w #$01FF
	BMI.b CODE_04CF84
	INC.b $76,x
	LDA.w #$01FF
CODE_04CF84:
	STA.w $7A36,x
	RTS

CODE_04CF88:
	TYX
	LDA.w $7A38,x
	SEC
	SBC.w #$0008
	AND.w #$01FE
	CMP.w #$0160
	BCS.b CODE_04CF9A
	INC.b $76,x
CODE_04CF9A:
	STA.w $7A38,x
	RTS

DATA_04CF9E:
	dw $FDE7,$0219

CODE_04CFA2:
	TYX
	LDA.w $7A38,x
	CLC
	ADC.w #$0008
	AND.w #$01FE
	CMP.w #$0180
	BCC.b CODE_04CFC6
	LDY.b #$00
	LDA.w $7400,x
	BEQ.b CODE_04CFBB
	INY
	INY
CODE_04CFBB:
	LDA.w DATA_04CF9E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
	LDA.w #$0160
CODE_04CFC6:
	STA.w $7A38,x
	RTS

CODE_04CFCA:
	TYX
	LDA.w $7A38,x
	CLC
	ADC.w #$0008
	AND.w #$01FE
	STA.w $7A38,x
	RTS

;---------------------------------------------------------------------------

DATA_04CFD9:
	dw $FFC0,$0040

YI_NorSpr108_Milde_Init:
;$04CFDD
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_04CFE5
	STA.w $7040,x
CODE_04CFE5:
	LDY.w $7400,x
	LDA.w DATA_04CFD9,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	RTL

;---------------------------------------------------------------------------

DATA_04CFF1:
	dw $0941,$0841

DATA_04CFF5:
	dw CODE_04D0D4
	dw CODE_04D104

YI_NorSpr108_Milde_Main:
;$04CFF9
	LDY.b #$00
	LDA.w $7D38,x
	BEQ.b CODE_04D002
	INY
	INY
CODE_04D002:
	LDA.w DATA_04CFF1,y
	STA.w $6FA2,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_04D022
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState02_InCutscene
	BNE.b CODE_04D022
	CMP.b $18,x
	BNE.b CODE_04D022
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_04D022:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_04D037
	CMP.w #$0008
	BEQ.b CODE_04D037
	LDY.b $78,x
	BNE.b CODE_04D037
	JSL.l CODE_04D1A0
CODE_04D037:
	JSL.l CODE_03AF23
	LDY.b $76,x
	BEQ.b CODE_04D042
	JMP.w CODE_04D0CB

CODE_04D042:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_04D053
	LDY.w $7400,x
	LDA.w DATA_04CFD9,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_04D053:
	LDY.w $7D36,x
	BPL.b CODE_04D0C5
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_04D0BF
	LDY.w $60AB
	BMI.b CODE_04D0CB
	LDY.w $60C0
	BEQ.b CODE_04D0BF
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_04D0CB
	LDA.w #$0020
	CMP.w $61D6
	BMI.b CODE_04D085
	STA.w $61D6
CODE_04D085:
	LDA.w $6086
	AND.w $0035
	STA.w $617A
	STZ.w $60D4
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STA.b $18,x
	LDA.w #$7C60
	STA.w $6FA0,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60AA
	LDA.w #$1175
	STA.w $7040,x
	LDA.w #$000A
	STA.w $7402,x
	DEC
	STA.w $7A98,x
	INC.b $76,x
	BRA.b CODE_04D0CB

CODE_04D0BF:
	JSL.l CODE_03A813
	BRA.b CODE_04D0CB

CODE_04D0C5:
	JSL.l CODE_0DC0F0
	BCS.b CODE_04D0D3
CODE_04D0CB:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_04CFF5,x)
CODE_04D0D3:
	RTL

CODE_04D0D4:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_04D0FF
	LDA.w #$0006
	STA.w $7A98,x
	LDA.b $16,x
	CLC
	ADC.w $7402,x
	BPL.b CODE_04D0EF
	LDA.w #$0001
	STA.b $16,x
	BRA.b CODE_04D0FC

CODE_04D0EF:
	CMP.w #$0005
	BNE.b CODE_04D0FC
	LDA.w #$FFFF
	STA.b $16,x
	LDA.w #$0003
CODE_04D0FC:
	STA.w $7402,x
CODE_04D0FF:
	RTS

DATA_04D100:
	dw $0018,$0014

CODE_04D104:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_04D17E
	LDY.w $7402,x
	CPY.b #$0B
	BNE.b CODE_04D175
	LDA.w #!Define_YI_AmbSpr1EE
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0008
	STA.w $73C2,y
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $617A
	STZ.w $617C
	JSL.l CODE_04D1A0
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$0200
	STA.w $6000
	LDA.w #$FE00
	STA.w $6002
	LDX.b #FXCODE_099253>>16
	LDA.w #FXCODE_099253
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03A32E
	RTS

CODE_04D175:
	INC.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_04D17E:
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_04D19F
	LDA.w $7402,x
	ASL
	TAY
	LDA.w $7182,x
	SEC
	SBC.w DATA_04D100-$14,y
	SEC
	SBC.w $6112
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	INC.w $61B4
CODE_04D19F:
	RTS

;---------------------------------------------------------------------------

CODE_04D1A0:
	INC.b $78,x
CODE_04D1A2:
	INC.w $1013
	BNE.b CODE_04D1B5
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSL.l CODE_02E19C
CODE_04D1B5:
	RTL

;---------------------------------------------------------------------------

CODE_04D1B6:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr108_Milde
	BNE.b CODE_04D1C2
	JSL.l CODE_04D1A0
CODE_04D1C2:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr09B_MaceGuy_Init:
;$04D1C3
	LDA.w #$009C
	JSL.l CODE_03A34C
	BCC.b CODE_04D1D5
	STY.b $18,x
	TYX
	JSL.l CODE_03AD74
	BCS.b CODE_04D1DB
CODE_04D1D5:
	LDX.b $12
	JML.l CODE_03A31E

CODE_04D1DB:
	LDX.b $12
	LDY.b $18,x
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.w #$0100
	STA.w $7A36,y
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0005
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w $7400,x
	STA.w $7400,y
	RTL

;---------------------------------------------------------------------------

YI_NorSpr09B_MaceGuy_Main:
;$04D20C
	JSL.l CODE_03A2C7
	BCC.b CODE_04D223
	LDY.b $18,x
	TYX
	JSL.l CODE_03A2DE
	BCC.b CODE_04D221
	LDX.b $12
	JML.l CODE_03A31E

CODE_04D221:
	LDX.b $12
CODE_04D223:
	LDA.w $7D96,x
	BNE.b CODE_04D230
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_04D233
CODE_04D230:
	JSR.w CODE_04D27E
CODE_04D233:
	JSL.l CODE_03AF23
	STZ.w $7402,x
	LDY.b $18,x
	LDA.w $7A38,y
	SEC
	SBC.w #$0010
	AND.w #$01FE
	CMP.w #$0080
	BMI.b CODE_04D25E
	INC.w $7402,x
	CMP.w #$0100
	BMI.b CODE_04D25E
	INC.w $7402,x
	CMP.w #$0180
	BMI.b CODE_04D25E
	INC.w $7402,x
CODE_04D25E:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_04D279
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_04D27D
	LDA.w $7D38,y
	BEQ.b CODE_04D27D
	JSR.w CODE_04D27E
	JSL.l CODE_048BDB
	RTL

CODE_04D279:
	JSL.l CODE_03A5B7
CODE_04D27D:
	RTL

CODE_04D27E:
	PHY
	LDA.w $7D96,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w $7042,x
	PHA
	TXY
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	JSL.l CODE_03A377
	PLA
	STA.w $7042,x
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	STA.w $7D96,x
	PLY
	RTS

;---------------------------------------------------------------------------

YI_NorSpr09C_Mace_Init:
;$04D2A5
	JSR.w CODE_04D4E7
	RTL

;---------------------------------------------------------------------------

DATA_04D2A9:
	dw CODE_04D53B
	dw CODE_04D57E

DATA_04D2AD:
	dw $0006,$0001

YI_NorSpr09C_Mace_Main:
;$04D2B1
	LDY.b $18,x
	BEQ.b CODE_04D330
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr09B_MaceGuy
	BNE.b CODE_04D2CA
	LDA.w $7D96,y
	BNE.b CODE_04D2CA
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BEQ.b CODE_04D31D
CODE_04D2CA:
	LDA.w #$0100
	SEC
	SBC.w $7A38,x
	BPL.b CODE_04D2D7
	EOR.w #$FFFF
	INC
CODE_04D2D7:
	ASL
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $7A39,x
	BNE.b CODE_04D2F8
	EOR.w #$FFFF
	INC
CODE_04D2F8:
	LDY.w $7400,x
	BEQ.b CODE_04D301
	EOR.w #$FFFF
	INC
CODE_04D301:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.b $18,x
	LDA.w $7040,x
	ORA.w #$0008
	STA.w $7040,x
	BRA.b CODE_04D330

CODE_04D31D:
	LDA.w $70E2,y
	SEC
	SBC.w $70E2,x
	STA.b $16,x
	LDA.w $7182,y
	SEC
	SBC.w $7182,x
	STA.w $75E0,x
CODE_04D330:
	JSR.w CODE_04D3DA
	JSL.l CODE_03AF23
	LDY.b $18,x
	BEQ.b CODE_04D387
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	CMP.w $7182,y
	BPL.b CODE_04D34A
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_04D34A:
	LDY.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$6000
	BNE.b CODE_04D356
	LDY.b #$08
CODE_04D356:
	TYA
	CLC
	ADC.w $7A38,x
	AND.w #$01FE
	STA.w $7A38,x
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_04D2A9,x)
	LDA.w $7A38,x
	STA.b $78,x
	LDY.b #$00
	LDA.w $7A38,x
	SEC
	SBC.w #$0080
	AND.w #$01FE
	CMP.w #$0100
	BMI.b CODE_04D381
	LDY.b #$02
CODE_04D381:
	LDA.w DATA_04D2AD,y
	STA.w $74A2,x
CODE_04D387:
	JSR.w CODE_04D4E7
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w $6024
	CMP.w $6026
	BCS.b CODE_04D3D1
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w $6028
	CMP.w $602A
	BCS.b CODE_04D3D1
	LDA.w $61D6
	BNE.b CODE_04D3D1
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	LDA.w #$FF00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w $60D4
	JSL.l CODE_03A858
CODE_04D3D1:
	RTL

DATA_04D3D2:
	dw $FFF8,$0008

DATA_04D3D6:
	dw $0010,$FFF0

CODE_04D3DA:
	LDY.b $18,x
	BNE.b CODE_04D3EF
	LDA.b $16,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $00
	LDA.w $75E0,x
	BRA.b CODE_04D407

CODE_04D3EF:
	LDA.w $70E2,y
	SEC
	SBC.w $70E2,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $00
	LDA.w $7182,y
	SEC
	SBC.w $7182,x
CODE_04D407:
	CLC
	ADC.w #$0004
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $02
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.b $04
	LDA.w $7682,x
	CLC
	ADC.w #$0004
	STA.b $06
	LDA.w #$0003
	STA.b $0C
	LDA.w #$0008
	STA.b $0E
	REP.b #$10
	LDY.w $7362,x
	LDA.w $7A38,x
	SEC
	SBC.w #$0080
	AND.w #$01FE
	CMP.w #$0100
	BMI.b CODE_04D44C
	TYA
	CLC
	ADC.w #$0020
	BRA.b CODE_04D45B

CODE_04D44C:
	LDA.w #$FFF8
	STA.b $0E
	TYA
	CLC
	ADC.w #$0018
	TAY
	SEC
	SBC.w #$0008
CODE_04D45B:
	PHY
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	JSL.l CODE_03AA60
	REP.b #$10
	LDY.w $7400,x
	LDA.w DATA_04D3D2,y
	STA.b $08
	LDA.w DATA_04D3D6,y
	STA.b $0A
	PLY
	LDA.w $7680,x
	CLC
	ADC.b $08
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.b $0A
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $7682,x
	SEC
	SBC.w #$0008
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
	LDA.w #$0002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	STZ.b $08
	STZ.b $0A
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
CODE_04D4B5:
	LDA.b $08
	CLC
	ADC.b $00
	STA.b $08
	CLC
	ADC.b $04
	STA.w $6000,y
	LDA.b $0A
	CLC
	ADC.b $02
	STA.b $0A
	CLC
	ADC.b $06
	STA.w $6002,y
	LDA.w #$20BD
	STA.w $6004,y
	LDA.w #$0000
	STA.w $6006,y
	TYA
	CLC
	ADC.b $0E
	TAY
	DEC.b $0C
	BNE.b CODE_04D4B5
	SEP.b #$10
	RTS

CODE_04D4E7:
	LDA.w #FXDATA_540000+$6000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	STZ.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0A00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0600
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $6120
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $6122
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D69F>>16
	LDA.w #FXCODE_08D69F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_04D53B:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0060
	CMP.w #$2001
	BPL.b CODE_04D54B
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_04D54B:
	JSR.w CODE_04D5AD
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	ASL
	XBA
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_04D560
	ORA.w #$FF00
	BRA.b CODE_04D562

CODE_04D560:
	ASL
	ASL
CODE_04D562:
	CLC
	ADC.w #$0100
	STA.w $7A36,x
	LDA.w $7A38,x
	CMP.b $78,x
	BPL.b CODE_04D57D
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_04D57D
	LDA.w #$6000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_04D57D:
	RTS

CODE_04D57E:
	TYX
	LDA.w $7A38,x
	CMP.w #$0100
	BNE.b CODE_04D595
	LDA.w #$1FE0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC.b $76,x
CODE_04D595:
	JSR.w CODE_04D5AD
	LDY.w $7A38,x
	BPL.b CODE_04D5AC
	LDA.w $7A36,x
	SEC
	SBC.w #$0010
	CMP.w #$00C0
	BMI.b CODE_04D5AC
	STA.w $7A36,x
CODE_04D5AC:
	RTS

CODE_04D5AD:
	LDA.w $7A38,x
	LDY.w $7400,x
	BEQ.b CODE_04D5BC
	EOR.w #$FFFF
	INC
	AND.w #$01FE
CODE_04D5BC:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $18,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	XBA
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_04D5E1
	ORA.w #$FF00
CODE_04D5E1:
	CLC
	ADC.w $70E2,y
	STA.w $70E2,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr091_4RedToadies_Init:
;$04D5E9
	RTL

;---------------------------------------------------------------------------

DATA_04D5EA:
	dw CODE_04D86C
	dw CODE_04D97E
	dw CODE_04D9DC
	dw CODE_04DA0E
	dw CODE_04DA7C

DATA_04D5F4:
	dw $FFC0,$0040,$FF00,$0100

YI_NorSpr091_4RedToadies_Main:
;$04D5FC
	JSR.w CODE_04D7EA
	JSL.l CODE_03AF23
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_04D64C
	LDA.w $70E2,x
	SEC
	SBC.w $609A
	CLC
	ADC.w $6094
	STA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $7CD6,x
	LDA.w $7182,x
	SEC
	SBC.w $60A2
	CLC
	ADC.w $609C
	STA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7CD8,x
	LDY.b $76
	CPY.b #$03
	BNE.b CODE_04D64C
	LDA.w $0DBC
	CLC
	ADC.w $6094
	STA.w $70E2
	CLC
	ADC.w #$0008
	STA.w $7CD6
CODE_04D64C:
	LDA.w $70E2,x
	STA.w $6000
	LDA.w $7182,x
	STA.w $6002
	LDA.w $7CD6,x
	STA.w $6004
	LDA.w $7CD8,x
	STA.w $6006
	LDY.w $0E2D
	BNE.b CODE_04D6C0
	LDA.w $61B2
	BMI.b CODE_04D691
	LDA.w $0B59
	ORA.w $0B57
	BNE.b CODE_04D67E
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_StarTimerThatSpawnsToadiesThreshold
	BMI.b CODE_04D689
CODE_04D67E:
	LDA.w $61CC
	BEQ.b CODE_04D691
	JSL.l CODE_06C09A
	BRA.b CODE_04D691

CODE_04D689:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0010
	BEQ.b CODE_04D6C0
CODE_04D691:
	INC.w $0E2D
	STZ.w $61CC
	LDX.b #$0C
CODE_04D699:
	LDA.w #$0004
	STA.w $0EC9,x
	TXA
	LSR
	TAY
	LDA.w DATA_04D5F4,y
	STA.w $0E69,x
	LDA.w #$0200
	STA.w $0E6B,x
	LDA.w #$F800
	STA.w $0E8B,x
	LDA.w #$0010
	STA.w $0E7B,x
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_04D699
CODE_04D6C0:
	LDX.b #$0C
CODE_04D6C2:
	LDA.w $0E9B,x
	BEQ.b CODE_04D6CA
	JMP.w CODE_04D7A8

CODE_04D6CA:
	LDA.w $0E69,x
	CMP.w $0E89,x
	BMI.b CODE_04D6D8
	SEC
	SBC.w $0E79,x
	BRA.b CODE_04D6DC

CODE_04D6D8:
	CLC
	ADC.w $0E79,x
CODE_04D6DC:
	STA.w $0E69,x
	BPL.b CODE_04D6F0
	CLC
	ADC.w $0E37,x
	STA.w $0E37,x
	LDA.w $0E39,x
	SBC.w #$0000
	BRA.b CODE_04D6FD

CODE_04D6F0:
	CLC
	ADC.w $0E37,x
	STA.w $0E37,x
	LDA.w $0E39,x
	ADC.w #$0000
CODE_04D6FD:
	STA.w $0E39,x
	LDA.w $6000
	CLC
	ADC.w $0E38,x
	STA.w $6020
	LDA.w $6004
	CLC
	ADC.w $0E38,x
	STA.w $6024
	LDA.w $0E6B,x
	CMP.w $0E8B,x
	BMI.b CODE_04D722
	SEC
	SBC.w $0E7B,x
	BRA.b CODE_04D726

CODE_04D722:
	CLC
	ADC.w $0E7B,x
CODE_04D726:
	STA.w $0E6B,x
	BPL.b CODE_04D73A
	CLC
	ADC.w $0E49,x
	STA.w $0E49,x
	LDA.w $0E4B,x
	SBC.w #$0000
	BRA.b CODE_04D747

CODE_04D73A:
	CLC
	ADC.w $0E49,x
	STA.w $0E49,x
	LDA.w $0E4B,x
	ADC.w #$0000
CODE_04D747:
	STA.w $0E4B,x
	LDA.w $6002
	CLC
	ADC.w $0E4A,x
	STA.w $6022
	LDA.w $6006
	CLC
	ADC.w $0E4A,x
	STA.w $6026
	LDA.w $0EAB,x
	BEQ.b CODE_04D766
	DEC.w $0EAB,x
CODE_04D766:
	LDA.w $0EB9,x
	BEQ.b CODE_04D76E
	DEC.w $0EB9,x
CODE_04D76E:
	LDA.w $0EBB,x
	BEQ.b CODE_04D776
	DEC.w $0EBB,x
CODE_04D776:
	TXY
	LDA.w $0EC9,x
	ASL
	TAX
	JSR.w (DATA_04D5EA,x)
	LDA.w $0EB9,x
	BNE.b CODE_04D794
	LDA.w #$0006
	STA.w $0EB9,x
	LDA.w $0EA9,x
	INC
	AND.w #$0003
	STA.w $0EA9,x
CODE_04D794:
	LDA.w $6020
	SEC
	SBC.w $6000
	STA.w $0E38,x
	LDA.w $6022
	SEC
	SBC.w $6002
	STA.w $0E4A,x
CODE_04D7A8:
	DEX
	DEX
	DEX
	DEX
	BMI.b CODE_04D7B1
	JMP.w CODE_04D6C2

CODE_04D7B1:
	LDX.b $12
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_04D7E5
	LDA.w $70E2,x
	SEC
	SBC.w $6094
	CLC
	ADC.w $609A
	STA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $7CD6,x
	LDA.w $7182,x
	SEC
	SBC.w $609C
	CLC
	ADC.w $60A2
	STA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7CD8,x
CODE_04D7E5:
	RTL

DATA_04D7E6:
	db $2C,$2D,$3C,$3D

CODE_04D7EA:
	REP.b #$10
	LDY.w $7362,x
	LDX.w #$000C
CODE_04D7F2:
	LDA.w $0E9B,x
	BEQ.b CODE_04D805
	LDA.w #$8000
	STA.w $6000,y
	STA.w $6008,y
	STA.w $6010,y
	BRA.b CODE_04D857

CODE_04D805:
	LDA.w $6000,y
	CLC
	ADC.w $0E38,x
	STA.w $6000,y
	STA.w $6008,y
	CLC
	ADC.w #$0008
	STA.w $6010,y
	LDA.w $6002,y
	CLC
	ADC.w $0E4A,x
	STA.w $6002,y
	SEC
	SBC.w #$0008
	STA.w $600A,y
	STA.w $6012,y
	LDA.w $0E99,x
	XBA
	LSR
	LSR
	LSR
	XBA
	STA.b $00
	PHY
	LDY.w $0EA9,x
	LDA.w DATA_04D7E6,y
	AND.w #$00FF
	PLY
	CLC
	ADC.w $600C,y
	STA.w $600C,y
	EOR.w #$4000
	STA.w $6014,y
	LDA.w $6004,y
	EOR.b $00
	STA.w $6004,y
CODE_04D857:
	TYA
	CLC
	ADC.w #$0018
	TAY
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_04D7F2
	SEP.b #$10
	LDX.b $12
	RTS

DATA_04D868:
	dw $0300,$FD00

CODE_04D86C:
	TYX
	LDA.w #$0002
	STA.w $0E99,x
	LDA.w $7CD6
	SEC
	SBC.w $6024
	PHP
	BPL.b CODE_04D881
	EOR.w #$FFFF
	INC
CODE_04D881:
	LSR
	CMP.w #$0018
	BMI.b CODE_04D88A
	LDA.w #$0018
CODE_04D88A:
	CLC
	ADC.w #$0018
	STA.w $0E79,x
	ASL
	ASL
	ASL
	ASL
	PLP
	BPL.b CODE_04D89F
	EOR.w #$FFFF
	INC
	STZ.w $0E99,x
CODE_04D89F:
	STA.w $0E89,x
	LDA.w $7CD8
	SEC
	SBC.w $6026
	PHP
	BPL.b CODE_04D8B0
	EOR.w #$FFFF
	INC
CODE_04D8B0:
	LSR
	CMP.w #$0018
	BMI.b CODE_04D8B9
	LDA.w #$0018
CODE_04D8B9:
	CLC
	ADC.w #$0018
	STA.w $0E7B,x
	ASL
	ASL
	ASL
	ASL
	PLP
	BPL.b CODE_04D8CB
	EOR.w #$FFFF
	INC
CODE_04D8CB:
	STA.w $0E8B,x
	LDA.w $7CD6
	SEC
	SBC.w $6024
	CLC
	ADC.w #$000C
	CMP.w #$0018
	BCC.b CODE_04D8DF
CODE_04D8DE:
	RTS

CODE_04D8DF:
	LDA.w $7CD8
	SEC
	SBC.w $6026
	CLC
	ADC.w #$000C
	CMP.w #$0018
	BCS.b CODE_04D8DE
	LDA.w $61CC
	PHP
	AND.w #$0002
	STA.w $0E99,x
	PLP
	BNE.b CODE_04D938
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_04D91D
	LDA.w $7680
	STA.w $0DBC
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.w $75E2
	JSL.l CODE_06BFA4
	LDY.b #$07
	STY.w $0DB4
	LDY.b #$03
	BRA.b CODE_04D936

CODE_04D91D:
	JSL.l CODE_06C114
	JSL.l CODE_06BF73
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.w $7542
	LDA.w #$6040
	STA.w $6FA2
	LDY.b #$02
CODE_04D936:
	STY.b $76
CODE_04D938:
	LDY.w $61CC
	CPY.b #$06
	BNE.b CODE_04D954
	LDA.w $7680
	AND.w #$FF00
	STA.b $00
	LDA.w $7682
	AND.w #$FF00
	ORA.b $00
	BEQ.b CODE_04D954
	JMP.w CODE_04DA48

CODE_04D954:
	TYA
	STA.w $0E59,x
	INC.w $61CC
	INC.w $61CC
	STZ.w $0E69,x
	STZ.w $0E79,x
	STZ.w $0E6B,x
	STZ.w $0E7B,x
	INC.w $0EC9,x
	RTS

DATA_04D96E:
	dw $FFF6,$000A,$FFFA,$0006

DATA_04D976:
	dw $0008,$0009,$0010,$000F

CODE_04D97E:
	TYX
	LDY.b #$02
	STY.b $00
	TXA
	LSR
	TAY
	LDA.w $70E2
	CLC
	ADC.w DATA_04D96E,y
	STA.b $02
	LDA.w $6020
	SEC
	SBC.b $02
	STA.b $04
	INC
	CMP.w #$0002
	BCS.b CODE_04D9A1
	STZ.b $04
	DEC.b $00
CODE_04D9A1:
	LDA.b $04
	CMP.w #$8000
	ROR
	CLC
	ADC.b $02
	STA.w $6020
	LDA.w $7182
	CLC
	ADC.w DATA_04D976,y
	STA.b $02
	LDA.w $6022
	SEC
	SBC.b $02
	STA.b $04
	INC
	CMP.w #$0002
	BCS.b CODE_04D9C8
	STZ.b $04
	DEC.b $00
CODE_04D9C8:
	LDA.b $04
	CMP.w #$8000
	ROR
	CLC
	ADC.b $02
	STA.w $6022
	LDY.b $00
	BNE.b CODE_04D9DB
	INC.w $0EC9,x
CODE_04D9DB:
	RTS

CODE_04D9DC:
	TYX
	LDY.w $61CC
	CPY.b #$08
	BMI.b CODE_04DA0D
	LDY.w $0E2F
	CPY.b #$04
	BPL.b CODE_04DA02
	LDY.w $0E5B,x
	BNE.b CODE_04DA0D
	INC.w $0E5B,x
	INC.w $0E2F
	LDY.w $0E59,x
	BNE.b CODE_04DA0D
	LDA.w #!Define_YI_SoundID3D_MarioKidnapped
	STA.w !RAM_YI_Global_PlaySoundHighPriorityLo
	RTS

CODE_04DA02:
	INC.w $0EC9,x
	TXA
	LSR
	AND.w #$0002
	STA.w $0E99,x
CODE_04DA0D:
	RTS

CODE_04DA0E:
	TYX
	TXA
	LSR
	TAY
	AND.w #$0002
	STA.w $0E99,x
	CPY.b #$06
	BNE.b CODE_04DA5F
	LDA.w #$0040
	STA.w $0E7B,x
	LDA.w #$F800
	STA.w $0E8B,x
	LDA.w $6020
	SEC
	SBC.w #$0006
	STA.w $70E2
	LDA.w $6022
	SEC
	SBC.w #$000F
	STA.w $7182
	LDA.w $6022
	SEC
	SBC.w $609C
	CMP.w #$FFF0
	BPL.b CODE_04DA7B
CODE_04DA48:
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState0E_TouchedSpike
	BEQ.b CODE_04DA5E
	REP.b #$10
	JSL.l CODE_04F6F1
	LDA.w #!Define_YI_GameMode12
	STA.w !RAM_YI_Global_CurrentGameMode
	SEP.b #$10
CODE_04DA5E:
	RTS

CODE_04DA5F:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0010
	BNE.b CODE_04DA7B
	LDA.w $70E2
	CLC
	ADC.w DATA_04D96E,y
	STA.w $6020
	LDA.w $7182
	CLC
	ADC.w DATA_04D976,y
	STA.w $6022
CODE_04DA7B:
	RTS

CODE_04DA7C:
	TYX
	LDY.w $0E6C,x
	BPL.b CODE_04DA88
	LDA.w #$0040
	STA.w $0E7B,x
CODE_04DA88:
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BEQ.b CODE_04DAA0
	LDA.w $6020
	SEC
	SBC.w $6094
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCS.b CODE_04DAB0
CODE_04DAA0:
	LDA.w $6022
	SEC
	SBC.w $609C
	CLC
	ADC.w #$0040
	CMP.w #$0160
	BCC.b CODE_04DAC8
CODE_04DAB0:
	INC.w $0E9B,x
	DEC.w $0E31
	BNE.b CODE_04DAE8
	STZ.w $0E33
	STZ.w $0E2D
	STZ.w $0CE6
	LDX.b $12
	PLA
	JML.l CODE_03A31E

CODE_04DAC8:
	LDA.w $61B2
	BMI.b CODE_04DAE8
	LDY.w $0E31
	CPY.b #$04
	BNE.b CODE_04DAE8
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_StarTimerThatSpawnsToadiesThreshold
	BPL.b CODE_04DAE8
	STZ.w $0EC9,x
	STZ.w $0E2F
	STZ.w $0E2D
	STZ.w $0E5B,x
CODE_04DAE8:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr103_BooGuysMovingMace_Init:
;$04DAE9
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.w $7400,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr103_BooGuysMovingMace_Main:
;$04DAF6
	JSL.l CODE_03AF23
	LDA.w $7A98,x
	BNE.b CODE_04DB14
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	CMP.w #$0005
	BMI.b CODE_04DB11
	LDA.w #$0000
CODE_04DB11:
	STA.w $7402,x
CODE_04DB14:
	RTL

;---------------------------------------------------------------------------

DATA_04DB15:
	dw $0020,$0040

YI_NorSpr083_BowserFightCloud_Init:
;$04DB19
	SEP.b #$20
	LDA.b #$02
	STA.w $74A1,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_04DB23:
	dw $0030,$0040,$0050,$0060

YI_NorSpr083_BowserFightCloud_Main:
;$04DB2B
	JSL.l CODE_03AF23
	LDA.w $7680,x
	CMP.w #$0130
	BMI.b CODE_04DB47
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w !RAM_YI_Global_Layer2XPosLo
	SEC
	SBC.w DATA_04DB23,y
	STA.w $70E2,x
CODE_04DB47:
	RTL

;---------------------------------------------------------------------------

DATA_04DB48:
	dw $003B,$003C,$003D,$003E,$003F

DATA_04DB52:
	dw !Define_YI_PlayerState00_Normal
	dw !Define_YI_PlayerState0C
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState06
	dw !Define_YI_PlayerState20_EnteringRaphaelBossRoom

CODE_04DB68:
	REP.b #$30
	PHB
	PHK
	PLB
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	ASL
	TAY
	LDX.w #$0020
	LDA.w DATA_04DB52,y
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	CMP.w #$000C
	BNE.b CODE_04DBA5
	LDA.w #!Define_YI_PlayerForm0E_Skiing
	STA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $60B4
	STZ.w $60A8
	STZ.w $60AA
	STZ.w $60D4
	JSL.l CODE_04EF27
	BRA.b CODE_04DBEC

CODE_04DBA5:
	CMP.w #$0006
	BNE.b CODE_04DBEC
	PHA
	TYA
	CLC
	ADC.w #$FFFE
	CMP.w #$000A
	BCS.b CODE_04DBC0
	LDX.w #$0112
	STX.w $60BE
	LDX.w #$0010
	BRA.b CODE_04DBC9

CODE_04DBC0:
	SBC.w #$0008
	ORA.w #$8000
	LDX.w #$0020
CODE_04DBC9:
	ORA.w #$4000
	STA.w $6106
	AND.w #$00FF
	CMP.w #$0006
	BCC.b CODE_04DBE2
	TAY
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	ORA.w #$0008
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	TYA
CODE_04DBE2:
	AND.w #$0002
	EOR.w #$0002
	STA.w $60C4
	PLA
CODE_04DBEC:
	STX.w $6126
	SEP.b #$10
	CMP.w #$0020
	BNE.b CODE_04DC0B
	LDX.b #$1C
CODE_04DBF8:
	LDA.l DATA_5FE5AA,x
	STA.l YI_Global_PaletteMirror[$D1].LowByte,x
	STA.l $702F0E,x
	DEX
	DEX
	BPL.b CODE_04DBF8
	STZ.w $617E
CODE_04DC0B:
	LDA.w #$0001
	STA.w $60CC
	PLB
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0078
	STA.w $6094
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0064
	STA.w $609C
	BRA.b CODE_04DC2E

CODE_04DC28:
	LDA.w #$0020
	STA.w $6126
CODE_04DC2E:
	LDA.w #!Define_YI_NorSpr061_BabyMario
	LDY.b #$00
	JSL.l CODE_03A366
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$000D
	STA.w $7402,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$8000
	STA.w $61B2
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7182,y
	LDA.w $7042,y
	AND.w #$00CF
	ORA.w $6126
	STA.w $7042,y
	JSL.l CODE_01B2D6
	REP.b #$10
	LDX.w #$0126
CODE_04DC70:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $05C2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $06EA,x
	LDA.w $6126
	STA.w $0812,x
	DEX
	DEX
	BPL.b CODE_04DC70
	SEP.b #$10
	LDA.w !EXRAM_YI_Player_SubXPosLo|!EXRAMBankMirror
	STA.w $7E10
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $7E12
	LDA.w !EXRAM_YI_Player_SubYPosLo|!EXRAMBankMirror
	STA.w $7E14
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7E16
	STZ.w $7E18
	LDA.w #$0F00
	STA.w $7E1A
	STZ.w $7E1C
	LDA.w #$070C
	STA.w $7E1E
	LDA.w #$006C
	STA.w $7E20
	LDA.w #$0058
	STA.w $7E22
	SEP.b #$20
CODE_04DCC4:
	JSL.l CODE_04FD28
	LDY.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CPY.b #$1A
	BNE.b CODE_04DCE5
	REP.b #$20
	LDA.w #$0000
	SEC
	SBC.b !RAM_YI_Global_Layer3XPosLo
	STA.w $0C90
	LDA.w #$0100
	SEC
	SBC.b !RAM_YI_Global_Layer3YPosLo
	STA.w $0C92
	SEP.b #$20
CODE_04DCE5:
	PHB
	PHK
	PLB
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.b #!Define_YI_PlayerState0C
	BEQ.b CODE_04DCF7
	JSR.w CODE_04FA33
	BNE.b CODE_04DCF7
	INC.w $0C8E
CODE_04DCF7:
	PLB
	RTL

;---------------------------------------------------------------------------

CODE_04DCF9:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w #$000C
	CMP.w #$0030
	BPL.b CODE_04DD0C
	LDA.w #$0030
CODE_04DD0C:
	CMP.w #$00A8
	BMI.b CODE_04DD14
	LDA.w #$00A8
CODE_04DD14:
	STA.w $7E20
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	CMP.w #$0040
	BPL.b CODE_04DD26
	LDA.w #$0040
CODE_04DD26:
	CMP.w #$00A0
	BMI.b CODE_04DD2E
	LDA.w #$00A0
CODE_04DD2E:
	STA.w $7E22
	RTL

;---------------------------------------------------------------------------

DATA_04DD32:
	dw $0080,$0080

DATA_04DD36:
	dw $4000,$4000

DATA_04DD3A:
	dw $8000,$8000

DATA_04DD3E:
	dw $000C,$000C,$0004,$0004,$0010,$0010,$000C,$000C
	dw $000D,$000D,$0008,$0008,$0007,$0007,$0007,$0007

DATA_04DD5E:
	dw $000C,$FFF4,$0008,$FFF8,$0004,$FFFC,$0004,$FFFC
	dw $000B,$FFF5,$0008,$FFF8

DATA_04DD76:
	dw $0008,$0008,$0008,$0008,$0006,$000A

DATA_04DD82:
	dw $0004,$0004,$0004,$0004,$0002,$0002,$0004,$FFFC
	dw $0004,$FFFC,$0008,$FFF8,$0800,$0000

CODE_04DD9E:
	PHB
	PHK
	PLB
	REP.b #$30
	LDX.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	LDA.w DATA_04DD36,x
	STA.w $6088
	LDA.w DATA_04DD32,x
	STA.w $6086
	LDA.w DATA_04DD3A,x
	STA.w $6084
	JSR.w CODE_04F04F
	LDA.w $616E
	BEQ.b CODE_04DDCC
	LSR
	BNE.b CODE_04DDC9
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_04DDC9:
	DEC.w $616E
CODE_04DDCC:
	LDA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	BMI.b CODE_04DDD9
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_04DDE8
CODE_04DDD9:
	JSR.w CODE_04DE5F
	JSR.w CODE_04DF4A
	JSR.w CODE_04DE7E
	STZ.w $61B4
	STZ.w $61C2
CODE_04DDE8:
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_04DE48
	LDA.w $6150
	INC
	AND.w #$0006
	TAX
	BEQ.b CODE_04DDFD
	LDY.w $60C6
	BEQ.b CODE_04DDFD
	INX
CODE_04DDFD:
	TXA
	ASL
	ASL
	ORA.w $60C4
	TAY
	TXA
	ASL
	ORA.w $60C4
	TAX
	LDA.w DATA_04DD5E,y
	CLC
	ADC.w $6152
	STA.w $0C80
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04DD76,x
	STA.w $615A
	LDA.w $60B0
	CLC
	ADC.w $0C80
	STA.w $6156
	LDA.w DATA_04DD3E,y
	CLC
	ADC.w $6154
	STA.w $0C82
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04DD82,x
	STA.w $615C
	LDA.w $60B0
	CLC
	ADC.w $0C80
	STA.w $6156
CODE_04DE48:
	LDY.w $61CE
	BEQ.b CODE_04DE5B
	LDA.w $60BE
	CMP.w #$0055
	BCS.b CODE_04DE5B
	ADC.w #$01AF
	STA.w $60BE
CODE_04DE5B:
	SEP.b #$30
	PLB
	RTL

CODE_04DE5F:
	LDX.w #$0028
CODE_04DE62:
	LDA.w $0CC6,x
	BEQ.b CODE_04DE6A
	DEC.w $0CC6,x
CODE_04DE6A:
	DEX
	DEX
	BPL.b CODE_04DE62
	LDX.w #$0026
CODE_04DE71:
	LDA.w $61D0,x
	BEQ.b CODE_04DE79
	DEC.w $61D0,x
CODE_04DE79:
	DEX
	DEX
	BPL.b CODE_04DE71
	RTS

CODE_04DE7E:
	LDA.w $61B4
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.w #$000D
	BNE.b CODE_04DE8C
	LDA.w #$0000
CODE_04DE8C:
	STA.w $61B8
	ORA.w $60C0
	STA.b $6B
	STZ.b $69
	LDX.w $7DF6
	BEQ.b CODE_04DEE3
CODE_04DE9B:
	LDY.w $7DF6,x
	LDA.w $05C0
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BPL.b CODE_04DEAB
	CLC
	ADC.w #$0128
CODE_04DEAB:
	TAY
	LDA.w $0813,y
	AND.w #$00FF
	TSB.b $69
	DEX
	DEX
	BNE.b CODE_04DE9B
	LDA.b $69
	ORA.b $6B
	ORA.w $0C8A
	ORA.w $0B57
	BNE.b CODE_04DEE3
	LDA.w $60B4
	CLC
	ADC.w $7E3A
	BPL.b CODE_04DED1
	EOR.w #$FFFF
	INC
CODE_04DED1:
	CLC
	ADC.w $093A
	STA.w $093A
	CMP.w #$0160
	BCC.b CODE_04DF49
	SBC.w #$0160
	STA.w $093A
CODE_04DEE3:
	LDY.w $05C0
	LDA.w $0C8A
	BNE.b CODE_04DEF5
	LDA.w $0B57
	BEQ.b CODE_04DF19
	LDA.w $61B2
	BMI.b CODE_04DF19
CODE_04DEF5:
	LDA.w $70E2
	STA.w $05C2,y
	LDA.w $7182
	SEC
	SBC.w #$FFF3
	STA.w $06EA,y
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	AND.w #$FF00
	ORA.w #$0100
	ORA.w $7042
	AND.w #$FF30
	LDY.w $05C0
	BRA.b CODE_04DF39

CODE_04DF19:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $05C2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	STA.w $06EA,y
	LDA.b $6B
	BEQ.b CODE_04DF36
	LDA.w $60AA
	AND.w #$FF00
	ORA.w #$0100
CODE_04DF36:
	ORA.w $6126
CODE_04DF39:
	STA.w $0812,y
	INY
	INY
	CPY.w #$0128
	BCC.b CODE_04DF46
	LDY.w #$0000
CODE_04DF46:
	STY.w $05C0
CODE_04DF49:
	RTS

CODE_04DF4A:
	LDX.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	JMP.w (DATA_04DF50,x)

DATA_04DF50:
	dw CODE_04F64C
	dw CODE_04E782
	dw CODE_04E10B
	dw CODE_04E48F
	dw CODE_04E696
	dw CODE_04F8F1
	dw CODE_04E413
	dw CODE_04F800
	dw CODE_04EDBD
	dw CODE_04E905
	dw CODE_04F84A
	dw CODE_04E8AC
	dw CODE_04E79D
	dw CODE_04F849
	dw CODE_04F846
	dw CODE_04E3C6
	dw CODE_04E296
	dw CODE_04E0BC
	dw CODE_04E21F
	dw CODE_04E03A
	dw CODE_04DF7C
	dw CODE_04E770

CODE_04DF7C:
	SEP.b #$10
	JSL.l CODE_04F74A
	LDA.w $61F6
	BEQ.b CODE_04DF8E
	REP.b #$10
	DEC.w $61F6
	BRA.b CODE_04DFFE

CODE_04DF8E:
	LDA.w $0030
	AND.w #$0001
	BNE.b CODE_04DFC5
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70A2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$000C
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7E4C,y
	STA.w $7E4E,y
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0006
	STA.w $7462,y
CODE_04DFC5:
	LDX.b #FXCODE_0BC70A>>16
	LDA.w #FXCODE_0BC70A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w $60B2
	CMP.w #$0120
	BMI.b CODE_04DFE0
	JSL.l CODE_04F6CE
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	RTS

CODE_04DFE0:
	LDX.w #$01AE
	LDA.w $60AA
	CLC
	ADC.w #$0028
	CMP.w #$0400
	BMI.b CODE_04DFF2
	LDA.w #$0400
CODE_04DFF2:
	STA.w $60AA
	TAY
	BMI.b CODE_04E001
	LDA.w #$0030
	STA.w $6126
CODE_04DFFE:
	LDX.w #$006B
CODE_04E001:
	STX.w $60BE
	RTS

DATA_04E005:
	db $02,$08,$03,$2C,$02,$16,$03,$12,$02,$1C,$03,$1C,$02,$26,$00,$FF
	db $02,$10,$00,$40,$01,$06,$00,$14,$01,$06,$00,$40,$01,$06,$00,$14
	db $01,$06,$00,$40,$01,$06,$00,$14,$01,$06,$00,$40,$01,$06,$00,$14
	db $01,$06,$00,$7F,$FF

CODE_04E03A:
	SEP.b #$10
	LDA.w $61F6
	BNE.b CODE_04E07B
CODE_04E041:
	LDA.w $617E
	ASL
	TAX
	CPX.b #$08
	BCC.b CODE_04E04D
	STA.w $1078
CODE_04E04D:
	LDY.w DATA_04E005,x
	BPL.b CODE_04E05F
	TYA
	ORA.w #$FF00
	CLC
	ADC.w $617E
	STA.w $617E
	BRA.b CODE_04E041

CODE_04E05F:
	TYA
	LSR
	XBA
	BCC.b CODE_04E067
	ORA.w $6084
CODE_04E067:
	STA.w $617A
	STA.w $617C
	LDA.w DATA_04E005+$01,x
	AND.w #$00FF
	STA.w $61F6
	INC.w $617E
	BRA.b CODE_04E07E

CODE_04E07B:
	STZ.w $617C
CODE_04E07E:
	REP.b #$10
	LDA.w $617A
	STA.w $6070
	LDA.w $617C
	STA.w $6072
	JSR.w CODE_04F6A2
	LDA.w $60C0
	BEQ.b CODE_04E0BB
	LDX.w $617E
	CPX.w #$0008
	BCC.b CODE_04E0AD
	CMP.w #$00DA
	BCS.b CODE_04E0AA
	LDA.w #$00DA
	STA.w $60C0
	STA.w $6182
CODE_04E0AA:
	JSR.w CODE_04E271
CODE_04E0AD:
	LDA.w #$07A0
	CMP.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BPL.b CODE_04E0BB
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60C0
CODE_04E0BB:
	RTS

CODE_04E0BC:
	INC.w $61B4
	SEP.b #$10
	LDX.b #FXCODE_0BC703>>16
	LDA.w #FXCODE_0BC703
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0100
	STA.w $6070
	LDA.w $60B0
	CMP.w #$0080
	BPL.b CODE_04E0E6
	STZ.w $6072
	LDA.b !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0080
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BRA.b CODE_04E0FC

CODE_04E0E6:
	LDA.w $60C0
	BNE.b CODE_04E0F1
	LDA.w $6084
	STA.w $6072
CODE_04E0F1:
	LDA.w $60AA
	BPL.b CODE_04E0FC
	LDA.w $6084
	TSB.w $6070
CODE_04E0FC:
	INC.w $60CC
	LDX.b #FXCODE_0BC6EF>>16
	LDA.w #FXCODE_0BC6EF
	JSL.l !RAM_YI_Global_RT_00DECF
	REP.b #$10
	RTS

CODE_04E10B:
	LDA.w $61B2
	BMI.b CODE_04E13F
	LDA.w $60C0
	ORA.w $61D4
	BNE.b CODE_04E152
	LDA.w $617E
	CMP.w #$0002
	BCS.b CODE_04E125
	INC.w $617E
	BRA.b CODE_04E19A

CODE_04E125:
	LDA.w #$0080
	STA.w $61F6
	LDA.w $60B4
	CMP.w #$FF00
	BPL.b CODE_04E139
	LDA.w #$FF00
	STA.w $60B4
CODE_04E139:
	LDA.w #$0200
	JMP.w CODE_04E216

CODE_04E13F:
	LDA.w $0D27
	CMP.w #$0008
	BCS.b CODE_04E158
	LDA.w $61F6
	BEQ.b CODE_04E152
	LSR
	BNE.b CODE_04E152
	INC.w $0D27
CODE_04E152:
	LDA.w #$0000
	JMP.w CODE_04E216

CODE_04E158:
	STZ.w $0C1E
	LDA.w $60B0
	CMP.w #$00A0
	BPL.b CODE_04E1A8
	LDA.w $617E
	ORA.w $60C0
	ORA.w $61D4
	BEQ.b CODE_04E176
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$01D0
	BPL.b CODE_04E179
CODE_04E176:
	JMP.w CODE_04E205

CODE_04E179:
	LDA.w $60B4
	BEQ.b CODE_04E184
	LDA.w #$0040
	STA.w $61F6
CODE_04E184:
	LDA.w #$0002
	STA.w $60C4
	LDA.w $61F6
	BNE.b CODE_04E152
	LDA.w $60C0
	ORA.w $61D4
	BNE.b CODE_04E152
	DEC.w $617E
CODE_04E19A:
	LDA.w #$FA00
CODE_04E19D:
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	BRA.b CODE_04E152

CODE_04E1A8:
	CMP.w #$0120
	BMI.b CODE_04E1BA
	LDA.w #!Define_YI_GameMode0B
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.w #!Define_YI_LevelID_WelcomeToYoshisIsland
	STA.w !RAM_YI_Level_CurrentLevelFromMapLo
	RTS

CODE_04E1BA:
	LDA.w $617E
	CMP.w #$FFFE
	BNE.b CODE_04E179
	LDA.w $60C0
	ORA.w $61D4
	BEQ.b CODE_04E1E3
	LDA.w $60B0
	CMP.w #$00C0
	BMI.b CODE_04E1DA
	LDA.w $6084
	ORA.w #$0100
	BRA.b CODE_04E216

CODE_04E1DA:
	LDA.w #$0040
CODE_04E1DD:
	STA.w $61F6
CODE_04E1E0:
	JMP.w CODE_04E152

CODE_04E1E3:
	LDA.w $60B0
	CMP.w #$00C0
	BMI.b CODE_04E1F0
	LDA.w #$FB00
	BRA.b CODE_04E19D

CODE_04E1F0:
	LDA.w $61F6
	BEQ.b CODE_04E213
	LSR
	BNE.b CODE_04E1E0
	LDA.w $60C4
	BEQ.b CODE_04E1E0
	STZ.w $60C4
	LDA.w #$0060
	BRA.b CODE_04E1DD

CODE_04E205:
	LDA.w $60B4
	CMP.w #$0100
	BMI.b CODE_04E213
	LDA.w #$0100
	STA.w $60B4
CODE_04E213:
	LDA.w #$0100
CODE_04E216:
	STA.w $6070
	STZ.w $6072
	JMP.w CODE_04F6A2

CODE_04E21F:
	LDA.w $6084
	STA.w $6070
	STZ.w $6072
	STZ.w $60D2
	LDA.w #$0001
	STA.w $61E6
	JSR.w CODE_04F6A2
	LDA.w $6180
	BEQ.b CODE_04E248
	DEC.w $6180
	CMP.w #$0040
	BCS.b CODE_04E247
	LDA.w #$004C
	STA.w $60BE
CODE_04E247:
	RTS

CODE_04E248:
	LDA.w $60C0
	BNE.b CODE_04E271
	LDA.w $61D4
	BNE.b CODE_04E295
	DEC.w $617E
	BPL.b CODE_04E25E
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	RTS

CODE_04E25E:
	LDA.w #$FD00
	STA.w $60AA
	LDA.w #$00DA
	STA.w $60C0
	STA.w $6182
	STZ.w $60D2
	RTS

CODE_04E271:
	LDA.w $60AA
	CMP.w #$FF00
	BMI.b CODE_04E28F
	LDA.w $61D4
	BNE.b CODE_04E28F
	LDA.w #$0004
	STA.w $61D4
	LDA.w $6182
	CMP.w #$00DD
	BCS.b CODE_04E28F
	INC.w $6182
CODE_04E28F:
	LDA.w $6182
	STA.w $60BE
CODE_04E295:
	RTS

CODE_04E296:
	SEP.b #$10
	LDX.b #FXCODE_0BC70A>>16
	LDA.w #FXCODE_0BC70A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $617E
	BNE.b CODE_04E2B9
	LDA.w #!Define_YI_SoundID89_FallingToMoon
	JSL.l CODE_0085D2
	LDA.w #$FA00
	STA.w $6180
	LDA.w #$0800
	STA.w $617E
CODE_04E2B9:
	SEC
	SBC.w #$0008
	CMP.w #$0100
	BCS.b CODE_04E2C5
	LDA.w #$0100
CODE_04E2C5:
	STA.w $617E
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0A91C9>>16
	LDA.w #FXCODE_0A91C9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $6180
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_08B2B2>>16
	LDA.w #FXCODE_08B2B2
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $2FFF
	AND.w #$FF00
	STA.b $02
	LDA.w !REGISTER_SuperFX_R4_LMULTResultHi
	AND.w #$00FF
	ORA.b $02
	STA.w $60A8
	LDA.w #$FC00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_08B2B2>>16
	LDA.w #FXCODE_08B2B2
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $2FFF
	AND.w #$FF00
	STA.b $02
	LDA.w !REGISTER_SuperFX_R4_LMULTResultHi
	AND.w #$00FF
	ORA.b $02
	STA.w $60AA
	LDA.w $6180
	CLC
	ADC.w #$0008
	STA.w $6180
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7974
	ASL
	ASL
	ASL
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #FXDATA_540000+$0040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$0040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0164
	STA.w $60BE
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	TAX
	LDA.l DATA_00BA14,x
	CLC
	ADC.w #DATA_5FA000
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FA000>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$00D1
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDY.b #$0A
	LDX.b #$40
	LDA.w $60B2
	CMP.w #$FF80
	BPL.b CODE_04E3BD
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	STA.w $6116
	JSL.l CODE_04FB41
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0140
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$0000
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.b #$2A
	LDX.b #$00
CODE_04E3BD:
	STY.w $7042
	STX.w $70E0
	REP.b #$10
	RTS

CODE_04E3C6:
	SEP.b #$10
	LDX.b #FXCODE_0BC70A>>16
	LDA.w #FXCODE_0BC70A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #FXCODE_0BC6F7>>16
	LDA.w #FXCODE_0BC6F7
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w $60FC
	AND.w #$0180
	BEQ.b CODE_04E3EC
	LDA.w #$0800
	LDY.w #$FC00
	BRA.b CODE_04E3FA

CODE_04E3EC:
	LDA.w $60FC
	AND.w #$0060
	BEQ.b CODE_04E400
	LDA.w #$FC00
	LDY.w #$F800
CODE_04E3FA:
	STA.w $60A8
	STY.w $60AA
CODE_04E400:
	LDA.w $60B2
	CMP.w #$FFC0
	BPL.b CODE_04E40C
	JSL.l CODE_02A4B5
CODE_04E40C:
	LDA.w #$006B
	STA.w $60BE
	RTS

CODE_04E413:
	LDA.w $60B0
	CMP.w #$0020
	BMI.b CODE_04E41E
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_04E41E:
	LDA.w #$0300
	STA.w $60B4
	LDA.w #$0100
	STA.w $6070
	STZ.w $6072
	JSR.w CODE_04F6A2
	LDA.w #$000F
	TRB.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	RTS

DATA_04E437:
	dw $0080,$FF80

DATA_04E43B:
	dw $0008,$0006

DATA_04E43F:
	dw $0100,$F400,$0100

DATA_04E445:
	dw $FF00,$0011,$0012,$0011,$010C,$010D,$010E,$010F
	dw $0101,$0102,$0103,$0104,$0105,$0106,$0107,$0108

DATA_04E465:
	dw $0109,$010A

DATA_04E469:
	dw $010B,$0000

DATA_04E46D:
	dw $000E,$0007,$000B,$0006,$0004

DATA_04E477:
	dw $0001,$FFFF

DATA_04E47B:
	dw $FFFE,$0002,$FFE1,$001F,$0000

DATA_04E485:
	dw $0000,$0000,$0000,$FFE1,$001F

CODE_04E48F:
	LDA.w $60A8
	ORA.w $60AA
	ORA.w $60C0
	BNE.b CODE_04E4B1
	LDA.w #!Define_YI_SoundID31_EnterPipe
	LDY.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CPY.w #$000D
	BNE.b CODE_04E4AD
	LDY.w $6106
	BMI.b CODE_04E4B1
	LDA.w #!Define_YI_SoundID14_Gulp
CODE_04E4AD:
	JSL.l CODE_0085D2
CODE_04E4B1:
	INC.w $61B4
	SEP.b #$10
	LDY.w $6106
	CPY.b #$06
	BCS.b CODE_04E4C0
	JMP.w CODE_04E589

CODE_04E4C0:
	STZ.w $60B4
	STZ.w $60A8
	BIT.w $6106
	BVC.b CODE_04E511
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	AND.w #$000F
	CMP.w #$0008
	BEQ.b CODE_04E4E6
	LDX.b #$00
	BCC.b CODE_04E4DC
	LDX.b #$02
CODE_04E4DC:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04E477,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_04E4E6:
	LDA.w $6106
	AND.w #$A000
	CMP.w #$8000
	BNE.b CODE_04E4FC
	LDA.w DATA_04E437-$02,y
	STA.w $60C0
	LDA.w DATA_04E43B-$02,y
	BRA.b CODE_04E505

CODE_04E4FC:
	LDA.w #$0112
	STA.w $60C0
	LDA.w DATA_04E43F-$02,y
CODE_04E505:
	STA.w $60AA
	BPL.b CODE_04E50E
	EOR.w #$FFFF
	INC
CODE_04E50E:
	JMP.w CODE_04E5A2

CODE_04E511:
	LDX.w $60C4
	LDA.w $610E
	CLC
	ADC.w DATA_04E47B,x
	LDX.b #$00
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BEQ.b CODE_04E530
	BPL.b CODE_04E526
	LDX.b #$02
CODE_04E526:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04E477,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_04E530:
	LDA.w $61F6
	BNE.b CODE_04E546
	LDA.w $610A
	CMP.w DATA_04E469,y
	BEQ.b CODE_04E546
	INC.w $610A
	LDA.w DATA_04E46D,y
	STA.w $61F6
CODE_04E546:
	LDA.w $610A
	ASL
	ADC.w DATA_04E465,y
	TAX
	LDA.w DATA_04E445,x
	STA.w $60C0
	STZ.w $60C2
	LDA.w $0030
	AND.w #$0001
	BNE.b CODE_04E56B
	LDA.w $610C
	ASL
	BCC.b CODE_04E568
	LDA.w #$FFFF
CODE_04E568:
	STA.w $610C
CODE_04E56B:
	LDA.w $610C
	XBA
	AND.w #$00FF
	CPY.b #$06
	BEQ.b CODE_04E57A
	EOR.w #$FFFF
	INC
CODE_04E57A:
	CLC
	ADC.w $60AA
	STA.w $60AA
	BPL.b CODE_04E5A2
	EOR.w #$FFFF
	INC
	BRA.b CODE_04E5A2

CODE_04E589:
	STZ.w $60AA
	LDX.b #$00
	LDA.w DATA_04E437-$02,y
	STA.w $60B4
	STA.w $60A8
	BPL.b CODE_04E59F
	LDX.b #$02
	EOR.w #$FFFF
	INC
CODE_04E59F:
	STX.w $60C4
CODE_04E5A2:
	CLC
	ADC.w $6108
	STA.w $6108
	CMP.w #$1F00
	BCS.b CODE_04E5B1
	JMP.w CODE_04E644

CODE_04E5B1:
	BIT.w $6106
	BVC.b CODE_04E5D9
	LDA.w $60AA
	CMP.w #$FF00
	BPL.b CODE_04E5C6
	LDA.w #!Define_YI_PlayerState2A
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	BRA.b CODE_04E5D7

CODE_04E5C6:
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w $60C0
	BEQ.b CODE_04E5D7
	LDA.w #$0008
	STA.w $60C0
CODE_04E5D7:
	BRA.b CODE_04E64C

CODE_04E5D9:
	LDA.w $6106
	AND.w #$2000
	BEQ.b CODE_04E620
	LDA.w #!Define_YI_PlayerState08
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0038
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w #$0000
	LDY.w !REGISTER_SuperFX_R6_MultiplierHi
	CPY.b #$3D
	BEQ.b CODE_04E60D
	LDA.w #$0002
CODE_04E60D:
	STA.w $6106
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	AND.w #$FFF0
	DEC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BRA.b CODE_04E65E

CODE_04E620:
	LDY.w $6106
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04E47B+$02,y
	XBA
	AND.w #$000F
	ASL
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04E485,y
	AND.w #$0F00
	LSR
	LSR
	ORA.b $00
	JSL.l CODE_02A4CB
CODE_04E644:
	LDA.w #$0010
	BIT.w $6106
	BPL.b CODE_04E64F
CODE_04E64C:
	LDA.w #$0020
CODE_04E64F:
	STA.w $6126
	JSR.w CODE_04E661
	LDX.b #FXCODE_0BC6DA>>16
	LDA.w #FXCODE_0BC6DA
	JSL.l !RAM_YI_Global_RT_00DECF
CODE_04E65E:
	REP.b #$10
	RTS

CODE_04E661:
	LDA.w $7042
	AND.w #$00CF
	ORA.w $6126
	STA.w $7042
	LDX.w $7DF6
	BEQ.b CODE_04E685
CODE_04E672:
	LDY.w $7DF6,x
	LDA.w $7042,y
	AND.w #$00CF
	ORA.w $6126
	STA.w $7042,y
	DEX
	DEX
	BNE.b CODE_04E672
CODE_04E685:
	RTS

DATA_04E686:
	dw $007C,$008C

DATA_04E68A:
	dw $0004,$FFFC

DATA_04E68E:
	dw $FFF1,$0000

DATA_04E692:
	dw $3D35,$3D2F

CODE_04E696:
	STZ.w $60C0
	INC.w $61B4
	SEP.b #$10
	LDY.w $6106
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04E68A,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04E68E,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDY.w $6106
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w DATA_04E692,y
	BNE.b CODE_04E748
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$7D24
	BNE.b CODE_04E729
	LDX.w $7DF6
	BEQ.b CODE_04E6FD
	LDY.w $7DF6,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr027_Key
	BEQ.b CODE_04E708
CODE_04E6FD:
	LDA.w $6106
	EOR.w #$0002
	STA.w $6106
	BRA.b CODE_04E748

CODE_04E708:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.b $91
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	STA.b $93
	LDA.w #$0001
	STA.w $008F
	LDA.w #$7D22
	STA.w $0095
	JSL.l CODE_109295
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
CODE_04E729:
	LDA.w #!Define_YI_PlayerState06
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$E008
	STA.w $6106
	STZ.w $6108
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	AND.w #$FFF0
	DEC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BRA.b CODE_04E74B

CODE_04E748:
	STZ.w $611A
CODE_04E74B:
	JSR.w CODE_04E751
	REP.b #$10
	RTS

CODE_04E751:
	LDX.w $611A
	DEX
	TXY
	BMI.b CODE_04E75C
	LDX.b #$04
	LDY.b #$05
CODE_04E75C:
	STX.w $74A2
	TYA
	LDX.w $7DF6
	BEQ.b CODE_04E76F
CODE_04E765:
	LDY.w $7DF6,x
	STA.w $74A2,y
	DEX
	DEX
	BNE.b CODE_04E765
CODE_04E76F:
	RTS

CODE_04E770:
	STZ.w $617A
	STZ.w $617C
	LDA.w $60C0
	BNE.b CODE_04E782
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	RTS

CODE_04E782:
	LDA.w $617A
	STA.w $6070
	LDA.w $617C
	STA.w $6072
	JMP.w CODE_04F6A2

DATA_04E791:
	dw FXDATA_540000+$60A0,FXDATA_540000+$2060,FXDATA_540000+$00A0,FXDATA_540000+$2000,FXDATA_540000+$00C0,FXDATA_540000+$0000

CODE_04E79D:
	STZ.w $61B6
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w $61F4
	BEQ.b CODE_04E7BD
	LSR
	BNE.b CODE_04E7BA
	LDA.w $0C88
	BEQ.b CODE_04E7BA
	LDA.w #!Define_YI_SoundID7D_YoshiLostChallenge
	JSL.l CODE_0085D2
CODE_04E7BA:
	JMP.w CODE_04E8AB

CODE_04E7BD:
	STZ.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	SEP.b #$10
	LDA.w #$0186
	STA.w $60BE
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $0C84
	CLC
	ADC.w #$0010
	AND.w #$00FF
	STA.w $0C84
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $0C8A
	LDA.w DATA_04E791-$02,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$0000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $70E2
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182
	SEC
	SBC.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0800
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $60A8
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $60AA
	LDX.b #FXCODE_0BC70A>>16
	LDA.w #FXCODE_0BC70A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w $70E2
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BEQ.b CODE_04E855
	EOR.w $60A8
	BPL.b CODE_04E8AB
	LDA.w $70E2
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_04E855:
	LDA.w $7182
	SEC
	SBC.w #$0010
	STA.b $00
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BEQ.b CODE_04E86E
	EOR.w $60AA
	BPL.b CODE_04E8AB
	LDA.b $00
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_04E86E:
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	JSL.l CODE_04EF27
	STZ.w $0C8A
	STZ.w $6150
	STZ.w $60C6
	LDA.w #$0003
	STA.w $60C2
	STZ.w $60B4
	STZ.w $60A8
	STZ.w $60AA
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w $6112
	LDA.w #FXDATA_520000+$BC00
	STA.w $6114
	SEP.b #$30
	LDX.w $0BF1
	BEQ.b CODE_04E8A9
CODE_04E8A0:
	STZ.w $0BF1,x
	DEX
	BNE.b CODE_04E8A0
	STZ.w $0BF1
CODE_04E8A9:
	REP.b #$30
CODE_04E8AB:
	RTS

CODE_04E8AC:
	LDA.w $6084
	STA.w $6070
	STZ.w $6072
	STZ.w $60D2
	LDA.w #$0001
	STA.w $61E6
	SEP.b #$10
	LDX.b #FXCODE_0BC703>>16
	LDA.w #FXCODE_0BC703
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $60AA
	BMI.b CODE_04E8EA
	LDA.b !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0094
	CMP.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BCS.b CODE_04E8EA
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $60C0
	BEQ.b CODE_04E8EA
	STZ.w $60C0
	LDA.w #$0005
	STA.w $61D4
CODE_04E8EA:
	INC.w $60CC
	LDX.b #FXCODE_0BC6EF>>16
	LDA.w #FXCODE_0BC6EF
	JSL.l !RAM_YI_Global_RT_00DECF
	REP.b #$10
	RTS

DATA_04E8F9:
	dw $0003,$FFFD,$0010,$FFF0,$0100,$FF00

CODE_04E905:
	LDY.w $7E40
	BEQ.b CODE_04E90D
	JMP.w CODE_04E9D0

CODE_04E90D:
	SEP.b #$10
	LDY.w $0CBC
	BNE.b CODE_04E944
	LDA.w #!Define_YI_SoundID7D_YoshiLostChallenge
	JSL.l CODE_0085D2
	LDY.w $60C4
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04E8F9,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $0CBB
	INC.w $0CBC
	STZ.w $0CBE
	LDA.w #$007F
	STA.w $0CC0
	JMP.w CODE_04E9C0

CODE_04E944:
	CPY.b #$38
	BCC.b CODE_04E96C
	LDA.w $60AA
	CLC
	ADC.w #$0008
	CMP.w #$0080
	BMI.b CODE_04E957
	LDA.w #$0080
CODE_04E957:
	STA.w $60AA
	LDX.b #FXCODE_0BC711>>16
	LDA.w #FXCODE_0BC711
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #FXCODE_0BC6F7>>16
	LDA.w #FXCODE_0BC6F7
	JSL.l !RAM_YI_Global_RT_00DECF
CODE_04E96C:
	LDA.w $0CBC
	CMP.w #$0079
	BNE.b CODE_04E982
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $61B6
	STA.w $0D94
	BRA.b CODE_04E998

CODE_04E982:
	LDA.w $0CBE
	CMP.w #$0180
	BEQ.b CODE_04E991
	CLC
	ADC.w #$0010
	STA.w $0CBE
CODE_04E991:
	CLC
	ADC.w $0CBB
	STA.w $0CBB
CODE_04E998:
	LDA.w $0CBC
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_540000+$40E0)>>16
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #FXDATA_540000+$40E0
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_540000+$6060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $0CC0
	XBA
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_08C136>>16
	LDA.w #FXCODE_08C136
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_04E9C0:
	LDA.w #$0196
	LDY.w $0CBC
	CPY.b #$68
	BCS.b CODE_04E9CD
	LDA.w #$0197
CODE_04E9CD:
	JMP.w CODE_04EA92

CODE_04E9D0:
	STZ.w $0CBC
	LDA.w $0CBA
	BPL.b CODE_04E9DD
	LDA.w #FXDATA_540000+$0080
	BRA.b CODE_04EA3A

CODE_04E9DD:
	LDY.w $0CB4
	DEY
	BNE.b CODE_04EA37
	CLC
	ADC.w #$0004
	XBA
	STA.w !REGISTER_DividendLo
	LDA.w #$001C
	STA.w !REGISTER_Divisor
	NOP #7
	REP.b #$20
	LDA.w !REGISTER_QuotientLo
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_540000+$40E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$40E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0164
	BRA.b CODE_04EA92

CODE_04EA37:
	LDA.w #FXDATA_540000+$40E0
CODE_04EA3A:
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #(FXDATA_540000+$40E0)>>16
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $7E46
	LDY.w $60C4
	BNE.b CODE_04EA4F
	EOR.w #$FFFF
	INC
CODE_04EA4F:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$FFA0
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $0CB8
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7E40
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	SEP.b #$10
	LDX.b #FXCODE_08C045>>16
	LDA.w #FXCODE_08C045
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $6000
	LDY.w $60C4
	BNE.b CODE_04EA7E
	EOR.w #$FFFF
	INC
CODE_04EA7E:
	CLC
	ADC.w $7E42
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $0CB6
	CLC
	ADC.w $6002
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0195
CODE_04EA92:
	STA.w $60BE
	REP.b #$10
	RTS

DATA_04EA98:
	db $E0,$5F,$20,$0B,$0F,$0F,$13,$0B,$0F,$0F,$14,$0B,$0F,$0F,$14,$0B
	db $0F,$0F,$13,$0A,$0F,$0F,$12,$09,$12,$16,$18,$08,$13,$15,$19,$02
	db $04,$08,$19,$01,$0E,$0E,$19,$00,$0E,$0E,$19,$00,$0E,$0E,$18,$00
	db $0E,$0E,$18,$00,$0E,$0E,$19,$00,$0F,$0F,$1B,$01,$10,$10,$1C,$01
	db $10,$10,$1E,$02,$10,$10,$1E,$04,$11,$11,$1E,$04,$11,$11,$1E,$04
	db $11,$11,$1E,$03,$10,$10,$1E,$02,$10,$10,$1E,$02,$10,$10,$1E,$02
	db $0F,$0F,$1E,$02,$0F,$0F,$1E,$03,$13,$19,$1E,$03,$12,$1A,$1F,$04
	db $11,$1B,$1F,$05,$11,$1C,$1E,$09,$10,$10,$11,$0A,$10,$10,$10,$0B
	db $0C,$0E,$0F

DATA_04EB1B:
	db $C0,$77,$15,$03,$10,$10,$1E,$02,$10,$10,$1E,$02,$10,$10,$1F,$01
	db $0F,$0F,$1F,$01,$0F,$0F,$1F,$00,$0F,$0F,$1E,$00,$0F,$0F,$1E,$00
	db $0F,$0F,$1F,$01,$0F,$0F,$1F,$01,$0F,$0F,$1F,$02,$0F,$0F,$1E,$03
	db $0F,$0F,$1E,$05,$0F,$0F,$1D,$08,$0F,$0F,$1C,$08,$0F,$0F,$1B,$08
	db $0F,$0F,$19,$09,$0E,$0E,$16,$09,$0E,$0E,$14,$0A,$0E,$0E,$13,$0B
	db $0E,$0E,$12,$0C,$0D,$0F,$11

DATA_04EB72:
	db $E0,$7F,$16,$00,$07,$09,$1D,$00,$14,$14,$1E,$00,$14,$14,$1F,$00
	db $14,$14,$1F,$01,$14,$14,$1F,$01,$14,$14,$1F,$02,$14,$14,$1E,$01
	db $13,$13,$1E,$01,$12,$12,$1D,$01,$11,$11,$1D,$01,$10,$10,$1D,$01
	db $0F,$0F,$1C,$02,$0F,$0F,$1C,$03,$0F,$0F,$1B,$05,$0F,$0F,$1A,$09
	db $0F,$0F,$19,$09,$0F,$0F,$17,$0A,$11,$13,$14,$13,$14,$14,$16,$13
	db $14,$14,$14,$13,$13,$15,$16,$13,$13,$13,$13

DATA_04EBCD:
	db $20,$17,$18,$0A,$0E,$0E,$0F,$07,$0F,$0F,$13,$05,$15,$1C,$1D,$04
	db $17,$1B,$1D,$03,$18,$1B,$1D,$02,$12,$12,$1D,$02,$12,$12,$1E,$01
	db $12,$12,$1F,$01,$12,$12,$1F,$01,$12,$12,$1F,$02,$12,$12,$1F,$02
	db $11,$11,$1D,$03,$19,$1B,$1E,$04,$17,$1B,$1E,$06,$15,$1B,$1E,$09
	db $17,$1C,$1D,$09,$0F,$0F,$18,$09,$0F,$0F,$17,$0A,$0F,$0F,$15,$0B
	db $0E,$0E,$14,$11,$12,$12,$13,$0F,$12,$12,$13,$0F,$11,$11,$13,$0F
	db $10,$10,$12

DATA_04EC30:
	db $A0,$1B,$18,$04,$11,$11,$19,$03,$11,$11,$1A,$02,$11,$11,$19,$02
	db $0C,$0E,$15,$02,$04,$06,$14,$05,$11,$11,$14,$04,$12,$12,$14,$03
	db $03,$05,$15,$02,$13,$13,$16,$02,$13,$13,$16,$02,$17,$1A,$1D,$02
	db $19,$1E,$1E,$03,$1B,$1E,$1E,$04,$1D,$1F,$1F,$05,$1D,$1F,$1F,$06
	db $1D,$1F,$1F,$06,$13,$18,$1F,$06,$13,$1B,$1E,$06,$13,$1E,$1E,$07
	db $13,$1A,$1D,$08,$0A,$0C,$13,$08,$15,$17,$1B,$10,$11,$11,$13,$11
	db $11,$11,$12

DATA_04EC93:
	db $00,$3E,$1E,$0D,$11,$15,$19,$04,$12,$14,$1A,$04,$12,$14,$1A,$05
	db $12,$14,$1A,$06,$12,$14,$1A,$05,$11,$11,$1C,$05,$11,$11,$1C,$04
	db $11,$11,$1C,$03,$11,$11,$1C,$03,$11,$11,$1A,$03,$11,$11,$1A,$03
	db $11,$11,$1A,$03,$11,$11,$1A,$03,$11,$11,$1A,$02,$11,$11,$1A,$02
	db $11,$11,$1A,$02,$11,$11,$1A,$02,$15,$17,$1A,$02,$16,$18,$1A,$02
	db $15,$17,$1A,$02,$10,$10,$1A,$03,$0F,$0F,$1A,$07,$0E,$0E,$1B,$06
	db $0E,$0E,$1B,$06,$0F,$0F,$1B,$06,$0F,$0F,$1A,$06,$0F,$0F,$18,$06
	db $0E,$0E,$0F,$07,$0D,$0D,$0E,$08,$0D,$0D,$0D

DATA_04ED0E:
	db $80,$5F,$16,$0D,$0F,$0F,$12,$0B,$0F,$0F,$14,$0A,$0F,$0F,$15,$09
	db $0F,$0F,$16,$09,$0F,$0F,$16,$09,$0F,$0F,$16,$09,$0F,$0F,$15,$0A
	db $0F,$0F,$14,$08,$0F,$0F,$16,$06,$0F,$0F,$19,$05,$0F,$0F,$1A,$04
	db $0F,$0F,$1B,$04,$0F,$0F,$1B,$04,$0F,$0F,$1B,$05,$0F,$0F,$1A,$05
	db $0F,$0F,$1A,$06,$0F,$0F,$19,$07,$0F,$0F,$18,$08,$0F,$0F,$17,$09
	db $0F,$0F,$16,$0B,$0F,$0F,$15,$0D,$0F,$0F,$12

DATA_04ED69:
	dw DATA_04EA98,DATA_04EB1B,DATA_04EB72,DATA_04EC30,DATA_04EC93,DATA_04ED0E,DATA_04EBCD

DATA_04ED77:
	dw $0000,$016B,$0178,$0181,$0186,$0182,$0171,$000A
	dw $0004,$03FF,$023F,$001F,$4010,$7C00,$7E00,$47E0
	dw $03F4,$03FF,$031F,$021F,$011F,$001F,$2018,$4010
	dw $6008,$7C00,$7D00,$7E00,$6300,$47E0,$23EA,$03F4
	dw $03FA

DATA_04EDB9:
	dw $000C,$0006

CODE_04EDBD:					; Note: Yoshi transforming state.
	LDA.w #$00FF
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STA.w $7E0A
	LDY.w $614E
	BNE.b CODE_04EDCC
	RTS

CODE_04EDCC:
	DEY
	DEY
	DEY
	BPL.b CODE_04EDD4
	JMP.w CODE_04EE63

CODE_04EDD4:
	BNE.b CODE_04EE0E
	LDA.l $70336C
	CMP.w #$0020
	BCC.b CODE_04EDF0
	LDA.w #$FF80
CODE_04EDE2:
	STA.w $0C86
	LDA.w #$0000
	STA.l $70336C
	INC.w $614E
	RTS

CODE_04EDF0:
	LDA.w #$2D6C
	LDY.w #$2F6C
CODE_04EDF6:
	STA.l $70336E
	TYA
	STA.l $703370
	SEP.b #$10
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	BRA.b CODE_04EE63

CODE_04EE0E:
	DEY
	BNE.b CODE_04EE40
	LDA.w #!Define_YI_SoundID70_Transforming
	JSL.l CODE_0085D2
	SEP.b #$10
	LDA.w #!Define_YI_AmbSpr1C2
	JSL.l CODE_008B21
	LDX.w $60C4
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_04EDB9,x
	STA.w $70A2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7142,y
	LDA.w #$00F0
	STA.w $7782,y
	REP.b #$10
	INC.w $614E
	RTS

CODE_04EE40:
	DEY
	BNE.b CODE_04EE98
	LDA.w $0C86
	CMP.w #$0100
	BMI.b CODE_04EE57
	LDX.w $0C88
	STX.w $0C8A
	LDA.w #$0000
	JMP.w CODE_04EDE2

CODE_04EE57:
	LDA.w $0C86
	CLC
	ADC.w #$0002
	STA.w $0C86
	BPL.b CODE_04EE66
CODE_04EE63:
	LDA.w #$0000
CODE_04EE66:
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.w $0C8A
	LDA.w DATA_04ED69,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.w $0C88
	LDA.w DATA_04ED69,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_04EA98>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	SEP.b #$10
	LDX.b #FXCODE_08BA44>>16
	LDA.w #FXCODE_08BA44
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
CODE_04EE97:
	RTS

CODE_04EE98:
	LDA.l $70336C
	CMP.w #$0020
	BCS.b CODE_04EEAD
	LDA.w #$2F6C
	LDY.w #$2D6C
	JSR.w CODE_04EDF6
	JMP.w CODE_04EE97

CODE_04EEAD:
	LDA.w #$0000
	STA.l $70336C
	STZ.w $614E
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $60B4
	STZ.w $60A8
	STZ.w $60AA
	STZ.w $60D4
	LDX.w $0C8A
	STX.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BEQ.b CODE_04EEDF
	LDA.w #$0500
	STA.w $61F4
	STZ.w $60C6
	BRA.b CODE_04EEDF

CODE_04EEDF:
	LDA.w DATA_04ED77,x
	STA.w $60BE
	JSL.l CODE_04EF27
	JMP.w (DATA_04EF47,x)

CODE_04EEEC:
	TXY
	STA.b $00
	ASL
	STA.b $02
	STA.b $04
	LDA.w #$706000
CODE_04EEF7:
	STA.w $6128,x
	CLC
	ADC.w #$0200
	STA.w $612A,x
	CLC
	ADC.w #$0200
	INX
	INX
	INX
	INX
	DEC.b $00
	BNE.b CODE_04EF10
	LDA.w #$6040
CODE_04EF10:
	DEC.b $02
	BNE.b CODE_04EEF7
	SEP.b #$20
	LDA.b #$706000>>16
	TYX
CODE_04EF19:
	STA.w $612A,x
	INX
	INX
	INX
	INX
	DEC.b $04
	BNE.b CODE_04EF19
	REP.b #$20
	RTS

CODE_04EF27:
	PHP
	REP.b #$30
	PHX
	STZ.w $60D4
	STZ.w $60DE
	STZ.w $61D0
	STZ.w $60C2
	STZ.w $60F8
	LDX.w #$002E
CODE_04EF3D:
	STZ.w $617E,x
	DEX
	DEX
	BPL.b CODE_04EF3D
	PLX
	PLP
	RTL

DATA_04EF47:
	dw CODE_04EF55
	dw CODE_04EF5C
	dw CODE_04EFC3
	dw CODE_04EFB2
	dw CODE_04EFD3
	dw CODE_04EF55
	dw CODE_04EFBF

CODE_04EF55:
	RTS

CODE_04EF56:
	JSR.w CODE_04EF5C
	JMP.w CODE_04EFA8

CODE_04EF5C:
	STZ.w $617E
	STZ.w $6180
	STZ.w $6182
	STZ.w $6184
	STZ.w $6186
	STZ.w $6188
	STZ.w $6112
	STZ.w $618A
	LDA.w #$0100
	STA.w $618C
	STZ.w $618E
	STZ.w $6190
	STZ.w $60FC
	STZ.w $6192
	STZ.w $6194
	STZ.w $6196
	STZ.w $619E
	STZ.w $61A0
	STZ.w $61A2
	STZ.w $61A4
	STZ.w $61A6
	STZ.w $61A8
	STZ.w $61AA
	STZ.w $61AC
	STZ.w $61E4
	RTS

CODE_04EFA8:
	STZ.w $6070
	STZ.w $6072
	JSR.w CODE_04F6A2
	RTL

CODE_04EFB2:
	STZ.w $617E
	STZ.w $6182
	STZ.w $6184
	STZ.w $61F6
	RTS

CODE_04EFBF:
	STZ.w $617E
	RTS

CODE_04EFC3:
	STZ.w $617E
	STZ.w $6182
	STZ.w $6184
	STZ.w $6180
	STZ.w $618A
	RTS

CODE_04EFD3:
	LDA.w $60C4
	BEQ.b CODE_04EFDB
	LDA.w #$8000
CODE_04EFDB:
	STA.w $617E
	STZ.w $6180
	STZ.w $618A
	STZ.w $6184
	STZ.w $6186
	LDA.w #$0100
	STA.w $6182
	RTS

CODE_04EFF1:
	LDA.w $61F4
	SEC
	SBC.w #$0020
	BCC.b CODE_04F00E
	CMP.w #$00C0
	BCS.b CODE_04F04C
	INC
	AND.w #$003F
	BNE.b CODE_04F04C
	LDA.w #!Define_YI_SoundID7F_SwitchTimerEnding
	JSL.l CODE_0085D2
	BRA.b CODE_04F04C

CODE_04F00E:
	LDA.w #!Define_YI_PlayerState18_SentTowardsBabyMario
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $0C84
	SEP.b #$10
	LDA.w #!Define_YI_AmbSpr1E1
	JSL.l CODE_008B21
	TYX
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	STA.w $70A2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0014
	STA.w $7142,x
	LDA.w #$000B
	STA.w $7E4C,x
	LDA.w #$00FF
	STA.w $7E4E,x
	STZ.w $73C2,x
	LDA.w #$0002
	STA.w $7782,x
	REP.b #$10
CODE_04F04C:
	JMP.w CODE_04F690

CODE_04F04F:
	LDA.w $7FEA
	BEQ.b CODE_04F05D
	ASL
	ASL
	ORA.w $7FEC
	TAX
	JSR.w (DATA_04F05E-$04,x)
CODE_04F05D:
	RTS

DATA_04F05E:
	dw CODE_04F094
	dw CODE_04F0F3
	dw CODE_04F1EE
	dw CODE_04F0F9
	dw CODE_04F0F3
	dw CODE_04F0AE
	dw CODE_04F0F9
	dw CODE_04F0AE
	dw CODE_04F07A
	dw CODE_04F13B
	dw $0000
	dw CODE_04F094
	dw $0000
	dw CODE_04F07A

CODE_04F07A:
	STZ.w $7FEA
	LDA.w #$0000
	STA.l $70336C
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w $7FEC
	EOR.w #$0002
	STA.w $7FEC
	RTS

CODE_04F094:
	JSR.w CODE_04F54B
	LDA.l $70336C
	INC
	STA.l $70336C
	CMP.w #$0010
	BCS.b CODE_04F0EF
	RTS

DATA_04F0A6:
	dw $7E6800,$7E6C00

DATA_04F0AA:
	dw $65A6,$6DA6

CODE_04F0AE:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	LDY.w $7E4800
	LDA.l $007FEA
	ASL
	TAX
	LDA.l DATA_04F0A6-$06,x
	STA.w $0000,y
	LDA.w #$0080
	STA.w $0002,y
	LDA.w #((!REGISTER_ReadFromVRAMPortLo&$0000FF)<<8)+$81
	STA.w $0003,y
	LDA.l DATA_04F0AA-$06,x
	STA.w $0005,y
	LDA.w #$7E6800>>16
	STA.w $0007,y
	LDA.w #$07C0
	STA.w $0008,y
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,y
	STA.w $7E4800
	PLB
CODE_04F0EF:
	INC.w $7FEA
	RTS

CODE_04F0F3:
	BRA.b CODE_04F0EF

DATA_04F0F5:
	dw $0002,$FFFE

CODE_04F0F9:
	LDX.w $7FEC
	LDA.l $70336C
	CLC
	ADC.w DATA_04F0F5,x
	AND.w #$001E
	STA.l $70336C
	BEQ.b CODE_04F0EF
	BIT.w #$0002
	BNE.b CODE_04F13A
	AND.w #$001C
	LSR
	STA.b $00
	LSR
	ADC.b $00
	ASL
	ADC.w #$0004
	TAX
	PHB
	PEA.w $70200A>>8
	PLB
	PLB
	LDY.w #$0004
CODE_04F129:
	LDA.l DATA_5FCB4A,x
	STA.w $70200A,y
	STA.w $702D76,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_04F129
	PLB
CODE_04F13A:
	RTS

CODE_04F13B:
	PHB
	PEA.w $7E65A6>>8
	PLB
	PLB
	LDX.w #$07BE
	LDY.w #$03FE
CODE_04F147:
	PHX
	LDA.w #$0010
	STA.b $00
	STA.b $02
CODE_04F14F:
	PHY
	LDA.w $7E6DA6,x
	TAY
	AND.w #$03FF
	CMP.w #$0180
	BCC.b CODE_04F161
	CMP.w #$0200
	BCC.b CODE_04F166
CODE_04F161:
	LDA.w #$01CE
	BRA.b CODE_04F16D

CODE_04F166:
	TYA
	AND.w #$C07F
	ORA.w #$2100
CODE_04F16D:
	PLY
	STA.w $7E71A6,y
	STA.w $7E75A6,y
	DEY
	DEY
	DEX
	DEX
	DEX
	DEX
	DEC.b $00
	BNE.b CODE_04F14F
	PLX
CODE_04F17F:
	PHY
	LDA.w $7E65A6,x
	TAY
	AND.w #$03FF
	CMP.w #$0180
	BCC.b CODE_04F191
	CMP.w #$0200
	BCC.b CODE_04F196
CODE_04F191:
	LDA.w #$01CE
	BRA.b CODE_04F19D

CODE_04F196:
	TYA
	AND.w #$C07F
	ORA.w #$2100
CODE_04F19D:
	PLY
	STA.w $7E71A6,y
	STA.w $7E75A6,y
	DEY
	DEY
	DEX
	DEX
	DEX
	DEX
	DEC.b $02
	BNE.b CODE_04F17F
	TXA
	AND.w #$FFBF
	TAX
	BPL.b CODE_04F147
	PLB
	LDA.w #(($7E71A6&$0000FF)<<8)+(!REGISTER_WriteToVRAMPortLo&$0000FF)
	LDY.w #$7E71A6>>8
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	LDX.w $7E4800
	STA.w $0004,x
	TYA
	STA.w $0006,x
	LDA.w #$3400
	STA.w $0000,x
	LDA.w #$0180
	STA.w $0002,x
	LDA.w #$0800
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	PLB
CODE_04F1EA:
	INC.w $7FEA
	RTS

CODE_04F1EE:
	BRA.b CODE_04F1EA

DATA_04F1F0:
	dw $0FFE,$07FE,$0FFE

CODE_04F1F6:
	LDA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_ItemBeingUsed
	ORA.w $7E2A
	BEQ.b CODE_04F205
	RTL

CODE_04F205:
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
	INC.w $7FEA
	LDX.w $7FEC
	PHB
	PEA.w $705800>>8
	PLB
	PLB
	PHX
	LDA.l DATA_04F1F0+$02,x
	TAX
	LDY.w #$07FE
CODE_04F221:
	STZ.w $706800,x
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_04F221
	PLX
	LDA.l DATA_04F1F0,x
	TAY
	LDX.w #$07FE
CODE_04F233:
	LDA.l $7E5DA6,x
	STA.w $706800,y
	DEY
	DEY
	DEX
	DEX
	BPL.b CODE_04F233
	PLB
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	RTL

DATA_04F24B:
	db $00,$07,$01,$06,$00,$07,$02,$05,$01,$06,$00,$07,$03,$04,$02,$05
	db $01,$06,$00,$07,$04,$03,$03,$04,$02,$05,$01,$06,$00,$07,$05,$02
	db $04,$03,$03,$04,$02,$05,$01,$06,$00,$07,$06,$01,$05,$02,$04,$03
	db $03,$04,$02,$05,$01,$06,$00,$07,$07,$00,$06,$01,$05,$02,$04,$03
	db $00,$01,$02,$03,$04,$05,$06,$07,$07,$07,$07,$07,$07,$07,$07,$06
	db $05,$04,$03,$02,$01,$00,$00,$00,$00,$00,$00,$00,$01,$02,$03,$04
	db $05,$06,$06,$06,$06,$06,$06,$05,$04,$03,$02,$01,$01,$01,$01,$01
	db $02,$03,$04,$05,$05,$05,$05,$04,$03,$02,$02,$02,$03,$04,$04,$03
	db $00,$05,$02,$04,$03,$07,$01,$06,$02,$04,$01,$06,$00,$05,$04,$05
	db $03,$06,$03,$07,$00,$03,$04,$07,$01,$05,$01,$05,$00,$06,$01,$07
	db $02,$05,$03,$07,$02,$03,$03,$07,$01,$07,$02,$06,$02,$06,$00,$05
	db $02,$04,$02,$05,$00,$04,$01,$04,$00,$07,$03,$06,$00,$04,$01,$06
	db $00,$01,$02,$03,$04,$05,$06,$07,$07,$07,$07,$07,$07,$07,$07,$06
	db $05,$04,$03,$02,$01,$01,$01,$01,$01,$01,$02,$03,$04,$05,$05,$05
	db $05,$04,$03,$03,$04,$04,$03,$02,$02,$02,$02,$03,$04,$05,$06,$06
	db $06,$06,$06,$06,$05,$04,$03,$02,$01,$00,$00,$00,$00,$00,$00,$00
	db $03,$04,$00,$00,$03,$04,$07,$07,$02,$05,$00,$00,$02,$05,$07,$07
	db $03,$04,$01,$01,$03,$04,$06,$06,$01,$06,$00,$00,$01,$06,$07,$07
	db $02,$05,$01,$01,$02,$05,$06,$06,$03,$04,$02,$02,$03,$04,$05,$05
	db $00,$07,$00,$07,$01,$06,$01,$06,$02,$05,$02,$05,$03,$04,$03,$04
	db $03,$04,$00,$07,$03,$04,$00,$07,$02,$05,$01,$06,$03,$04,$00,$07
	db $02,$05,$01,$06,$03,$04,$00,$07,$01,$06,$02,$05,$02,$05,$01,$06
	db $03,$04,$00,$07,$01,$06,$02,$05,$02,$05,$01,$06,$03,$04,$00,$07
	db $00,$07,$00,$07,$01,$06,$01,$06,$02,$05,$02,$05,$03,$04,$03,$04

DATA_04F3CB:
	db $00,$07,$00,$07,$01,$06,$00,$07,$01,$06,$02,$05,$00,$07,$01,$06
	db $02,$05,$03,$04,$00,$07,$01,$06,$02,$05,$03,$04,$04,$03,$00,$07
	db $01,$06,$02,$05,$03,$04,$04,$03,$05,$02,$00,$07,$01,$06,$02,$05
	db $03,$04,$04,$03,$05,$02,$06,$01,$00,$07,$01,$06,$02,$05,$03,$04
	db $00,$00,$00,$00,$00,$00,$00,$00,$01,$02,$03,$04,$05,$06,$07,$07
	db $07,$07,$07,$07,$07,$07,$06,$05,$04,$03,$02,$01,$01,$01,$01,$01
	db $01,$01,$02,$03,$04,$05,$06,$06,$06,$06,$06,$06,$05,$04,$03,$02
	db $02,$02,$02,$02,$03,$04,$05,$05,$05,$05,$04,$03,$03,$03,$04,$04
	db $02,$05,$05,$01,$03,$07,$07,$03,$01,$06,$04,$01,$00,$02,$04,$00
	db $00,$06,$07,$04,$05,$02,$05,$02,$02,$07,$06,$03,$03,$07,$01,$03
	db $04,$01,$06,$01,$00,$04,$01,$05,$05,$00,$06,$00,$03,$05,$07,$04
	db $07,$02,$02,$06,$01,$03,$03,$07,$04,$06,$05,$02,$06,$00,$00,$04
	db $00,$00,$00,$00,$00,$00,$00,$00,$01,$02,$03,$04,$05,$06,$07,$07
	db $07,$07,$07,$07,$07,$06,$05,$04,$03,$02,$02,$02,$02,$02,$03,$04
	db $05,$05,$05,$04,$04,$03,$03,$03,$04,$05,$06,$06,$06,$06,$06,$05
	db $04,$03,$02,$01,$01,$01,$01,$01,$01,$01,$02,$03,$04,$05,$06,$07
	db $00,$00,$03,$04,$07,$07,$03,$04,$00,$00,$02,$05,$07,$07,$02,$05
	db $01,$01,$03,$04,$06,$06,$03,$04,$00,$00,$01,$06,$07,$07,$01,$06
	db $01,$01,$02,$05,$06,$06,$02,$05,$02,$02,$03,$04,$05,$05,$03,$04
	db $00,$07,$07,$00,$01,$06,$06,$01,$02,$05,$05,$02,$03,$04,$04,$03
	db $00,$00,$07,$07,$01,$01,$06,$06,$00,$00,$07,$07,$02,$02,$05,$05
	db $01,$01,$06,$06,$03,$03,$04,$04,$00,$00,$07,$07,$02,$02,$05,$05
	db $04,$04,$03,$03,$01,$01,$06,$06,$03,$03,$04,$04,$05,$05,$02,$02
	db $00,$00,$01,$01,$02,$02,$03,$03,$04,$04,$05,$05,$06,$06,$07,$07

CODE_04F54B:
	SEP.b #$10
	LDY.w $012D
	PHY
	LDY.b #$1A
	STY.w $012D
	LDY.w $012E
	PHY
	LDY.b #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STY.w $012E
	LDX.b #FXCODE_08BCE0>>16
	REP.b #$10
	LDA.l $70336C
	ASL
	ASL
	TAY
CODE_04F56A:
	LDA.w DATA_04F24B,y
	AND.w #$00FF
	STA.w $6000
	LDA.w DATA_04F3CB,y
	AND.w #$00FF
	STA.w $6002
	PHY
	SEP.b #$10
	LDA.w #FXCODE_08BCE0
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	PLY
	INY
	TYA
	AND.w #$0003
	BNE.b CODE_04F56A
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	LDX.w $7E4800
	LDA.w #$2800
	STA.w $0000,x
	LDA.w #$0180
	STA.w $0002,x
	LDA.w #(($707000&$0000FF)<<8)+(!REGISTER_WriteToVRAMPortLo&$0000FF)
	STA.w $0004,x
	LDA.w #$707000>>8
	STA.w $0006,x
	LDA.w #$0800
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	PLB
	SEP.b #$10
	PLY
	STY.w $012E
	PLY
	STY.w $012D
	REP.b #$10
	RTS

UNK_04F5D0:
	dw $053D,$0063,$0470,$0078,$BB74,$007A,$04CF,$004D
	dw $12BF,$0461,$0D7F,$0042,$0682,$0064,$0D86,$0078
	dw $0A8A,$007A,$03C4,$054B,$49CC,$0264,$04DD,$007A

ADDR_04F600:
	LDA.w $0035
	CMP.w #$00F0
	BNE.b ADDR_04F64B
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
ADDR_04F60B:
	CMP.w #!Define_YI_Map_LevelsPerWorld
	BCC.b ADDR_04F615
	SBC.w #!Define_YI_Map_LevelsPerWorld
	BRA.b ADDR_04F60B

ADDR_04F615:
	CMP.w #$0003
	BEQ.b ADDR_04F61F
	CMP.w #$0007
	BNE.b ADDR_04F64B
ADDR_04F61F:
	AND.w #$0004
	LSR
	LSR
	ORA.w !RAM_YI_Level_CurrentWorldLo
	ASL
	ASL
	TAX
	LDA.w UNK_04F5D0,x
	STA.l $7F7E00
	LDA.w UNK_04F5D0+$02,x
	STA.l $7F7E02
	STZ.w $038E
	LDA.w #$0001
	STA.w $038C
	LDA.w #!Define_YI_GameMode0B
	STA.w !RAM_YI_Global_CurrentGameMode
	JSL.l CODE_01B2B7
ADDR_04F64B:
	RTS

CODE_04F64C:
if !Define_YI_Global_EnableDebugFeatures == !TRUE
	NOP #2
else
	BRA.b CODE_04F673
endif

ADDR_04F64E:
	JSR.w ADDR_04F600
	LDA.b $35
	AND.w #$0030
	BEQ.b ADDR_04F668
	LDA.b $38
	AND.w #$0008
	BEQ.b ADDR_04F668
	LDA.w !RAM_YI_Level_FreeMovementFlag
	EOR.w #$0001
	STA.w !RAM_YI_Level_FreeMovementFlag
ADDR_04F668:
	LDA.w !RAM_YI_Level_FreeMovementFlag
	BEQ.b CODE_04F673
	STZ.w $61B6
	JMP.w ADDR_04F718

CODE_04F673:
	LDA.w $60B2
	CMP.w #$0140
	BMI.b CODE_04F688
	LDA.w $7E2A
	BNE.b CODE_04F688
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	JSL.l CODE_04F6CA
	RTS

CODE_04F688:
	LDA.w $0C8A
	BEQ.b CODE_04F690
	JMP.w CODE_04EFF1

CODE_04F690:
	LDA.b $35
	LDY.w $0CCC
	BEQ.b CODE_04F69A
	AND.w #$FCFF
CODE_04F69A:
	STA.w $6070
	LDA.b $37
	STA.w $6072
CODE_04F6A2:
	STZ.w $6076
	STZ.w $607A
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	STA.w $607C
	SEP.b #$10
	LDX.b #FXCODE_0BC71B>>16
	LDA.w #FXCODE_0BC71B
	JSL.l !RAM_YI_Global_RT_00DECF
	LDA.w $6076
	STA.b $51
	LDA.w $607A
	BEQ.b CODE_04F6C7
	JSL.l CODE_0085D2
CODE_04F6C7:
	REP.b #$10
	RTS

CODE_04F6CA:
	JSL.l CODE_04F6E2
CODE_04F6CE:
	LDA.w #!Define_YI_GameMode11
	STA.w !RAM_YI_Global_CurrentGameMode
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w $0B4C
	SEP.b #$20
	STZ.w $0D21
	REP.b #$20
	RTL

CODE_04F6E2:
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w $61D6
	LDA.w #$0007
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_04F6F1:
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w #!Define_YI_LevelID_WelcomeToYoshisIsland
	BEQ.b CODE_04F707
	DEC.w !RAM_YI_Level_CurrentLifeCountLo
	LDA.w !RAM_YI_Level_DeathsInCurrentLevelLo
	CMP.w #$03E7
	BCS.b CODE_04F707
	INC.w !RAM_YI_Level_DeathsInCurrentLevelLo
CODE_04F707:
	RTL

UNK_04F708:
	dw $0000,$0000,$0001,$0004,$FFFF,$FFFC,$FFFF,$FFFC

ADDR_04F718:
	STZ.w $60C0
	LDA.b $36
	AND.w #$0003
	ASL
	BIT.b $34
	BPL.b ADDR_04F726
	INC
ADDR_04F726:
	ASL
	TAX
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w UNK_04F708,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.b $36
	AND.w #$000C
	LSR
	BIT.b $34
	BPL.b ADDR_04F73D
	INC
ADDR_04F73D:
	ASL
	TAX
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w UNK_04F708,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	RTS

CODE_04F74A:
	STZ.w $60DE
CODE_04F74D:
	STZ.w $60D4
	PHX
	LDX.w $6162
	BNE.b CODE_04F75D
	LDX.w $6168
	BEQ.b CODE_04F79D
	BRA.b CODE_04F7A0

CODE_04F75D:
	LDA.w $6152
	ORA.w $6154
	BNE.b CODE_04F774
	LDA.w $6168
	BEQ.b CODE_04F794
	LDA.w !EXRAM_YI_Level_Player_AmmoTypeInMouthLo|!EXRAMBankMirror
	BEQ.b CODE_04F7AC
	STZ.w $616C
	BRA.b CODE_04F79D

CODE_04F774:
	DEX
	BNE.b CODE_04F77C
	LDA.w $0B57
	BNE.b CODE_04F794
CODE_04F77C:
	JSL.l CODE_039D68
	LDA.w $6FA2,x
	AND.w #$6000
	CMP.w #$6000
	BNE.b CODE_04F794
	LDA.w $7542,x
	BNE.b CODE_04F794
	JSL.l CODE_048066
CODE_04F794:
	STZ.w $6162
	STZ.w $6168
	STZ.w !EXRAM_YI_Level_Player_AmmoTypeInMouthLo|!EXRAMBankMirror
CODE_04F79D:
	STZ.w $6150
CODE_04F7A0:
	STZ.w $6152
	STZ.w $6154
	STZ.w $615E
	STZ.w $6160
CODE_04F7AC:
	PLX
	RTL

DATA_04F7AE:
	dw $0080,$0005,$0002,$0002,$0002,$000C,$0006,$0006
	dw $0006,$0006,$0006,$0006,$0004,$0004,$0004,$0004
	dw $0004,$0004,$0003,$0003,$0003,$0003,$0003,$0003
	dw $0002,$0002,$0002,$0002,$0002

DATA_04F7E8:
	dw $006E,$006D,$006E,$006D,$006C,$006F,$0074,$0073
	dw $0072,$0071,$0070,$006F

CODE_04F800:
	SEP.b #$10
	JSL.l CODE_04F74A
	REP.b #$10
	LDX.w $60F8
	LDA.w $61D2
	BNE.b CODE_04F82D
	DEX
	DEX
	BPL.b CODE_04F81C
	JSL.l CODE_04F6CE
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	RTS

CODE_04F81C:
	STX.w $60F8
	LDA.w DATA_04F7AE,x
	CPX.w #$003A
	BCC.b CODE_04F82A
	LDA.w #$0001
CODE_04F82A:
	STA.w $61D2
CODE_04F82D:
	CPX.w #$000C
	BCC.b CODE_04F83F
	TXA
	SBC.w #$000C
CODE_04F836:
	SBC.w #$000C
	BCS.b CODE_04F836
	ADC.w #$0018
	TAX
CODE_04F83F:
	LDA.w DATA_04F7E8,x
	STA.w $60BE
	RTS

CODE_04F846:
	STZ.w $611A
CODE_04F849:
	RTS

CODE_04F84A:
	STZ.w $6070
	STZ.w $6072
	SEP.b #$10
	LDX.b #FXCODE_0BC6E7>>16
	LDA.w #FXCODE_0BC6E7
	JSL.l !RAM_YI_Global_RT_00DECF
	REP.b #$10
	RTS

;---------------------------------------------------------------------------

DATA_04F85E:
	dw $FFFC,$0004,$FFFC,$0004

DATA_04F866:
	dw $FFFC,$FFFC,$0004,$0004

DATA_04F86E:
	dw $FF00,$0100,$FF80,$0080

DATA_04F876:
	dw $FD00,$FD00,$FE00,$FE00

DATA_04F87E:
	dw $0000,$0040,$0080,$00C0

DATA_04F886:
	dw $0010,$0010,$0001,$0001

CODE_04F88E:
	LDX.b #$06
CODE_04F890:
	LDA.w #!Define_YI_AmbSpr1BD
	JSL.l CODE_008B21
	LDA.w $0000
	CLC
	ADC.l DATA_04F85E,x
	STA.w $70A2,y
	LDA.w $0002
	CLC
	ADC.l DATA_04F866,x
	STA.w $7142,y
	LDA.l DATA_04F86E,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_04F876,x
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $0004
	ORA.l DATA_04F87E,x
	STA.w $7002,y
	LDA.l DATA_04F886,x
	STA.w $7782,y
	DEX
	DEX
	BPL.b CODE_04F890
	RTL

;---------------------------------------------------------------------------

DATA_04F8D1:
	dw $007D,$007E,$007F,$0080,$0081,$0082,$0083,$0084
	dw $0085,$0086,$0110,$0111,$0112,$0113,$0114,$0115

CODE_04F8F1:
	LDA.w $60C0
	BEQ.b CODE_04F8F9
	JMP.w CODE_04F998

CODE_04F8F9:
	LDY.w $60F8
	LDA.w $61D2
	BNE.b CODE_04F968
	INY
	INY
	LDA.w $0C8C
	BEQ.b CODE_04F915
	STZ.w $0E15
	CPY.w #$0020
	BCC.b CODE_04F921
	LDY.w #$0014
	BRA.b CODE_04F921

CODE_04F915:
	INC
	STA.w $0E15
	CPY.w #$0014
	BCC.b CODE_04F921
	LDY.w #$0004
CODE_04F921:
	STY.w $60F8
	LDA.w #$0006
	CPY.w #$0004
	BCS.b CODE_04F965
	PHY
	LDA.w #$2D6C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$2F6C
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	SEP.b #$10
	LDX.b #FXCODE_08AA7F>>16
	LDA.w #FXCODE_08AA7F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	PLY
	LDX.w #$001C
	LDA.w #$0000
CODE_04F953:
	STA.l $70310E,x
	DEX
	DEX
	BPL.b CODE_04F953
	LDA.w #$FFFF
	STA.l $70336C
	LDA.w #$0004
CODE_04F965:
	STA.w $61D2
CODE_04F968:
	LDA.w DATA_04F8D1,y
	STA.w $60BE
	CPY.w #$0004
	BCC.b CODE_04F997
	LDA.l $70336C
	CMP.w #$0020
	BPL.b CODE_04F998
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	SEP.b #$10
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
CODE_04F997:
	RTS

CODE_04F998:
	LDA.w $6104
	CMP.w #$0100
	BEQ.b CODE_04F9AD
	SEP.b #$30
	JSR.w CODE_04FA33
	REP.b #$30
	BEQ.b CODE_04F9B2
	STZ.w $6104
	RTS

CODE_04F9AD:
	JSL.l CODE_02A4B5
	RTS

CODE_04F9B2:
	LDA.w #$0200
	STA.w $6104
	STZ.w $60B4
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_04FA22
	LDA.w $0C8C
	BEQ.b CODE_04FA21
	LDA.w #!Define_YI_PlayerForm0E_Skiing
	STA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	JSL.l CODE_04EF27
	LDA.w #!Define_YI_PlayerState0A_EnteringDoor
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	INC.w $0C8C
	LDA.w #$0012
	STA.w $60F8
	STZ.w $61D2
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	STA.w $6116
	JSL.l CODE_04FB41
	LDA.w #$2D6C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$2F6C
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	SEP.b #$10
	LDX.b #FXCODE_08AA7F>>16
	LDA.w #FXCODE_08AA7F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w #$0000
	STA.l $70336C
	LDX.w #$001C
CODE_04FA15:
	STA.l YI_Global_PaletteMirror[$D1].LowByte,x
	STA.l $702F0E,x
	DEX
	DEX
	BPL.b CODE_04FA15
CODE_04FA21:
	RTS

CODE_04FA22:
	LDA.w $0C8E
	BNE.b CODE_04FA30
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $60C4
	STZ.w $60F8
CODE_04FA30:
	RTS

;---------------------------------------------------------------------------

DATA_04FA31:
	db !Define_YI_LevelID_DangerIcyConditionsAhead
	db !Define_YI_LevelID_KameksRevenge

CODE_04FA33:
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.b #$04
	BNE.b CODE_04FA4E
	LDX.w !RAM_YI_Level_LevelHeaderItemMemorySettingLo
	CPX.b #$03
	BNE.b CODE_04FA4E
	LDX.b #$01
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
CODE_04FA46:
	CMP.w DATA_04FA31,x
	BEQ.b CODE_04FA4E
	DEX
	BPL.b CODE_04FA46
CODE_04FA4E:
	RTS

;---------------------------------------------------------------------------

DATA_04FA4F:
	dw $0000,$0000,$0001,$0001,$0002,$0002,$0004,$0004
	dw $0004,$0004,$0004,$0004

CODE_04FA67:
	REP.b #$30
	LDA.w !EXRAM_YI_Player_SubXPosLo|!EXRAMBankMirror
	STA.w $7E10
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $7E12
	SEC
	SBC.w $6094
	STA.w $60B0
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w $0C80
	STA.w $6156
	LDA.w !EXRAM_YI_Player_SubYPosLo|!EXRAMBankMirror
	STA.w $7E14
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $7E16
	SEC
	SBC.w $609C
	STA.w $60B2
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.w $0C82
	STA.w $6158
	LDA.w $611A
	BEQ.b CODE_04FB16
	LDA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w $614A
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_04FAE9
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_04FAC0
	LDA.w $61F4
	BEQ.b CODE_04FAD7
CODE_04FAC0:
	CMP.w #$00C0
	BCS.b CODE_04FAD7
	STA.b $00
	LSR
	LSR
	LSR
	LSR
	ASL
	TAX
	LDA.l DATA_04FA4F,x
	AND.b $00
	BEQ.b CODE_04FAE9
	BRA.b CODE_04FB16

CODE_04FAD7:
	LDA.w $61D6
	LSR
	LSR
	LSR
	LSR
	ASL
	TAX
	LDA.w $7974
	AND.l DATA_04FA4F,x
	BNE.b CODE_04FB16
CODE_04FAE9:
	LDA.w $60C4
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $60BE
	TAY
	ASL
	TAX
	LDA.l FXDATA_4C0204,x
	CLC
	ADC.w #FXDATA_4C060C
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	TYX
	LDA.l FXDATA_4C0000,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	SEP.b #$10
	LDX.b #FXCODE_09835F>>16
	LDA.w #FXCODE_09835F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_04FB16:
	SEP.b #$30
	LDA.b #$03
	STA.w $611A
	LDA.b #$0A
	STA.w $6124
	RTL

;---------------------------------------------------------------------------

DATA_04FB23:
	dw $005C,$007A,$0098,$00B6,$00D4,$00F2,$0110,$012E

DATA_04FB33:
	dw $27AA,$27C8,$27E6,$2804,$2822,$2840,$285E

CODE_04FB41:
	PHP
	REP.b #$30
	PHA
	PHX
	PHY
	PHB
	LDX.w $6116
	PEA.w $702000>>8
	PLB
	PLB
	LDA.l DATA_04FB23,x
	TAX
	LDY.w #$001C
CODE_04FB58:
	LDA.l DATA_5FA000,x
	STA.w $7021A2,y
	STA.w $702F0E,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_04FB58
	PLB
	PLY
	PLX
	PLA
	PLP
	RTL

;---------------------------------------------------------------------------

DATA_04FB6E:
	dw $0040,$0080,$0100,$0080,$0080,$0080,$0080,$0080
	dw $0040,$00C0,$0080,$00C0,$0000,$0080,$0000,$0000
	dw $0080,$0080,$0080,$0080,$0040,$0100,$0100,$0100
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0100,$0100

DATA_04FBAE:
	dw $0040,$FFFF,$FFFF,$0040,$0040,$0040,$0040,$0040
	dw $FFFF,$0060,$0040,$FFFF,$0000,$FFFF,$0000,$0000
	dw $0100,$0040,$0040,$0040,$0040,$0100,$0100,$0100
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0100,$0100

DATA_04FBEE:
	dw $0020,$0040,$0100,$0100,$0000,$0040,$0133,$0080
	dw $0040,$0040,$0020,$0000,$0040,$0000,$0040,$0000
	dw $0040,$0040,$0080,$00C0,$0000,$0100,$0100,$0100
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0100,$0100

DATA_04FC2E:
	dw $0020,$FFFF,$FFFF,$FFFF,$0000,$0040,$0133,$0040
	dw $FFFF,$0020,$0020,$0000,$0020,$0000,$0040,$0000
	dw $0100,$0020,$0040,$0060,$0000,$0100,$0100,$0100
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0100,$0100

DATA_04FC6E:
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0166,$0000
	dw $0100,$0100,$0100,$0000,$0000,$0100,$0000,$0000
	dw $0020,$0060,$0100,$0100,$0000,$0100,$0100,$0100
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0100,$0100

DATA_04FCAE:
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0000,$0000
	dw $0100,$0100,$0100,$0000,$0000,$0100,$0000,$0000
	dw $0100,$0020,$0100,$0100,$0000,$0100,$0100,$0100
	dw $0100,$0100,$0100,$0100,$0100,$0100,$0100,$0100
	dw $0023,$0600,$0406,$0206,$0106,$0606,$0102,$0104
	dw $0001,$0000,$0000,$0000,$0100,$0000,$FF00,$0100
	dw $00FF,$0000,$0000,$0000,$0100,$0000,$0100,$FF00
	dw $00FF,$FFF8,$0008,$FFF8,$0008

CODE_04FD28:
	PHB
	PHK
	PLB
	REP.b #$20
	LDA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_04FD35
	JMP.w CODE_04FDC1

CODE_04FD35:
	LDA.w $7E2A
	ORA.w $0B57
	BNE.b CODE_04FD55
	LDA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w $0C8E
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_04FDC1
	LDA.w $614E
	BEQ.b CODE_04FD55
	CMP.w #$0005
	BCS.b CODE_04FDC1
CODE_04FD55:
	REP.b #$10
	LDA.w $0C1C
	TAY
	BEQ.b CODE_04FD67
	JSL.l CODE_03D6A0
	LDA.w $0C2A
	LDY.w $0C22
CODE_04FD67:
	STA.w $7E28
	STY.w $7E26
	SEP.b #$10
	LDX.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CPX.b #!Define_YI_PlayerState16_LevelIntro
	BEQ.b CODE_04FDC1
	LDX.w !RAM_YI_Level_LevelHeaderBGScrollSettingLo
	CPX.b #$0D
	BNE.b CODE_04FDAE
	LDX.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CPX.b #!Define_YI_PlayerState08
	BNE.b CODE_04FDA2
	LDY.w $6106
	LDA.w DATA_04E686
	STA.w $7E22
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w $609C
	SEC
	SBC.w $7E22
	EOR.w DATA_04E68A,y
	BMI.b CODE_04FDA2
	LDA.w #$0000
	BRA.b CODE_04FDAB

CODE_04FDA2:
	LDA.w $609C
	STA.w $0C27
	LDA.w #$0001
CODE_04FDAB:
	STA.w $0C20
CODE_04FDAE:
	LDX.b #FXCODE_0994D7>>16
	LDA.w #FXCODE_0994D7
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $609C
	CLC
	ADC.w #$000C
	STA.w $609C
CODE_04FDC1:
	LDA.w $6094
	LDY.w $0C1E
	BEQ.b CODE_04FDD8
	LDA.w $0C22
	AND.w #$00FF
	STA.w $7E0C
	LDA.w $0C23
	STA.w $6094
CODE_04FDD8:
	LDY.b #$00
	CMP.b !RAM_YI_Global_Layer1XPosLo
	BPL.b CODE_04FDE0
	LDY.b #$02
CODE_04FDE0:
	STY.b $73
	STA.b !RAM_YI_Global_Layer1XPosLo
	LDA.w $609C
	LDY.w $0C20
	BEQ.b CODE_04FDFB
	LDA.w $0C26
	AND.w #$00FF
	STA.w $7E0E
	LDA.w $0C27
	STA.w $609C
CODE_04FDFB:
	LDY.b #$00
	CMP.b !RAM_YI_Global_Layer1YPosLo
	BPL.b CODE_04FE03
	LDY.b #$02
CODE_04FE03:
	STY.b $75
	STA.b !RAM_YI_Global_Layer1YPosLo
	STA.b !RAM_YI_Global_Layer1YPosLo
	LDY.w !RAM_YI_Level_LevelHeaderBackgroundColorLo
	CPY.b #$10
	BCC.b CODE_04FE23
	LSR
	LSR
	LSR
	PHA
	CLC
	ADC.w #$56DE
	STA.w $0D0B
	PLA
	ASL
	ADC.w #$5894
	STA.w $0D09
CODE_04FE23:
	LDA.w $0D0D
	BEQ.b CODE_04FE43
	LDA.b !RAM_YI_Global_Layer3YPosLo
	SEC
	SBC.w #$0029
	BPL.b CODE_04FE33
	LDA.w #$0000
CODE_04FE33:
	PHA
	CLC
	ADC.w #$56DE
	STA.w $0D0B
	PLA
	ASL
	ADC.w #$5894
	STA.w $0D09
CODE_04FE43:
	LDA.w !RAM_YI_Level_LevelHeaderBGScrollSettingLo
	ASL
	TAX
	LDA.w DATA_04FB6E,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w DATA_04FBAE,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w DATA_04FBEE,x
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$03
	BNE.b CODE_04FE61
	LDA.w #$0000
CODE_04FE61:
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w DATA_04FC2E,x
	LDY.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CPY.b #$1C
	BNE.b CODE_04FE74
	JSR.w CODE_04FF06
	LDA.w #$0000
CODE_04FE74:
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w DATA_04FC6E,x
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w DATA_04FCAE,x
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0993B3>>16
	LDA.w #FXCODE_0993B3
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $6096
	STA.b !RAM_YI_Global_Layer2XPosLo
	LDA.w $609E
	STA.b !RAM_YI_Global_Layer2YPosLo
	LDY.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CPY.b #$1A
	BNE.b CODE_04FEC1
	LDA.w $7974
	LSR
	LSR
	PHA
	CLC
	ADC.w $6098
	CLC
	ADC.w $0C90
	STA.w $6098
	STA.b !RAM_YI_Global_Layer3XPosLo
	PLA
	LSR
	CLC
	ADC.w $60A0
	CLC
	ADC.w $0C92
	STA.w $60A0
	STA.b !RAM_YI_Global_Layer3YPosLo
	BRA.b CODE_04FEF8

CODE_04FEC1:
	CPY.b #$2D
	BNE.b CODE_04FED7
	LDA.w $7974
	LSR
	LSR
	LSR
	ADC.w $6094
	STA.w $6098
	LDA.w $609C
	STA.w $60A0
CODE_04FED7:
	DEY
	BNE.b CODE_04FEEE
	LDA.w $7974
	LSR
	LSR
	CLC
	ADC.w $6098
	CLC
	ADC.w $0C90
	STA.w $6098
	STA.b !RAM_YI_Global_Layer3XPosLo
	BRA.b CODE_04FEF8

CODE_04FEEE:
	LDA.w $6098
	STA.b !RAM_YI_Global_Layer3XPosLo
	LDA.w $60A0
	STA.b !RAM_YI_Global_Layer3YPosLo
CODE_04FEF8:
	LDA.w $609A
	STA.b !RAM_YI_Global_Layer4XPosLo
	LDA.w $60A2
	STA.b !RAM_YI_Global_Layer4YPosLo
	SEP.b #$30
	PLB
	RTL

CODE_04FF06:
	LDA.w #$00F8
	SEC
	SBC.w $60B0
	STA.w $6098
	LDA.w #$00F0
	SEC
	SBC.w $60B2
	STA.w $60A0
	RTS

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($04FF34, incbin, DATA_04FF34_YI_U2.bin)
else
	%FREE_BYTES($04FF1B, 229, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank05Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_058000:
	STA.b $0C
	ASL
	STA.b $0E
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHA
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.b $0C
	CMP.b $0E
	BCC.b CODE_058043
	BMI.b CODE_058038
	CMP.w #$0100
	BCS.b CODE_05803D
CODE_058032:
	PLA
	SEC
	SBC.b $0C
	BRA.b CODE_058044

CODE_058038:
	CMP.w #$FF00
	BCC.b CODE_058032
CODE_05803D:
	PLA
	CLC
	ADC.b $0C
	BRA.b CODE_058044

CODE_058043:
	PLA
CODE_058044:
	AND.w #$01FE
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w #$0080
	CMP.w #$0100
	BCS.b CODE_05805F
	STZ.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	BRA.b CODE_05806C

CODE_05805F:
	LDA.w #$0002
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
CODE_05806C:
	AND.w #$01FE
	STA.w $7A38,x
	RTS

;---------------------------------------------------------------------------

CODE_058073:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0080
	CMP.w #$0100
	BCS.b CODE_0580B5
	LDA.w #$0002
	STA.w $7400,x
	LDA.w #$0100
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BRA.b CODE_0580BB

CODE_0580B5:
	STZ.w $7400,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_0580BB:
	AND.w #$01FE
	STA.w $7A38,x
	RTS

;---------------------------------------------------------------------------

CODE_0580C2:
	TYX
	RTS

;---------------------------------------------------------------------------

YI_NorSpr068_FlashingEggBlock_Init:
YI_NorSpr069_RedEggBlock_Init:
YI_NorSpr06A_YellowEggBlock_Init:
;$0580C4
	JSL.l CODE_03D406
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr068_FlashingEggBlock
	ASL
	STA.b $18,x
	LDA.w #$0100
	STA.w $7A36,x
	RTL

;---------------------------------------------------------------------------

DATA_0580D9:
	dw CODE_058234
	dw CODE_05827D

YI_NorSpr068_FlashingEggBlock_Main:
;$0580DD
	JSL.l CODE_03B75E
YI_NorSpr069_RedEggBlock_Main:
YI_NorSpr06A_YellowEggBlock_Main:
	STZ.w $7400,x
	LDY.w $7402,x
	BEQ.b CODE_0580ED
	JSL.l CODE_03AA52
CODE_0580ED:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0580D9,x)
	JSR.w CODE_058120
	LDY.w $7402,x
	BEQ.b CODE_058104
	JSR.w CODE_058161
CODE_058104:
	LDY.b $76,x
	BEQ.b CODE_058109
	RTL

CODE_058109:
	JSL.l CODE_03D291
	LDY.w $61B4
	PHY
	JSL.l CODE_03D22D
	PLY
	CPY.w $61B4
	BNE.b CODE_05811F
	JSL.l CODE_03D127
CODE_05811F:
	RTL

CODE_058120:
	LDY.b $76,x
	BEQ.b CODE_05813C
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05813C
	LDA.w $7182,y
	CMP.w $7182,x
	BPL.b CODE_05813C
	LDA.w $75E2,y
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_05813C:
	RTS

DATA_05813D:
	dw $0100,$01FF,$00CC,$01FF,$0100,$0199

DATA_058149:
	dw $0050,$FFB0,$0060,$FF9E,$0028,$FFD8

DATA_058155:
	dw FXDATA_540000+$7040,FXDATA_548000+$3070,FXDATA_548000+$2070

DATA_05815B:
	dw (FXDATA_540000+$7040)>>16,(FXDATA_548000+$3070)>>16,(FXDATA_548000+$2070)>>16

CODE_058161:
	LDA.b $18,x
	PHA
	ASL
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05816D
	INY
	INY
CODE_05816D:
	LDA.w DATA_058149,y
	STA.b $00
	PLA
	ASL
	TAY
	LDA.w $7A36,x
	CLC
	ADC.b $00
	CMP.w DATA_05813D,y
	BCS.b CODE_058185
	LDA.w DATA_05813D,y
	BRA.b CODE_05818D

CODE_058185:
	CMP.w DATA_05813D+$02,y
	BCC.b CODE_05818D
	LDA.w DATA_05813D+$02,y
CODE_05818D:
	STA.w $7A36,x
	LDY.b $18,x
	CPY.b #$04
	BEQ.b CODE_0581CE
	PHY
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$FF80
	BMI.b CODE_0581AA
	INY
	INY
	CMP.w #$0200
	BMI.b CODE_0581AA
	INY
	INY
CODE_0581AA:
	LDA.w DATA_058155,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w DATA_05815B,y
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PLY
	BEQ.b CODE_0581E3
	SEC
	SBC.w #$0100
	LSR
	STA.b $00
	LDA.w #$0100
	SEC
	SBC.b $00
	BRA.b CODE_0581E3

CODE_0581CE:
	LDA.w #FXDATA_540000+$4081
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$4081)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$00CE
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A36,x
CODE_0581E3:
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $7722,x
	TAX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CPY.b #$04
	BNE.b CODE_058210
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_058222

CODE_058210:
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0882FA>>16
	LDA.w #FXCODE_0882FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_058222:
	LDX.b $12
	INC.w $0CF9
	RTS

DATA_058228:
	dw $FC00,$FEC0,$FC00

DATA_05822E:
	dw $0040,$0012,$0040

CODE_058234:
	TYX
	LDY.w $7D36,x
	BPL.b CODE_05827C
	LDA.w $7C18,x
	CLC
	ADC.w $6122
	CLC
	ADC.w $7BB8,x
	CMP.w #$0008
	BCS.b CODE_05827C
	LDY.w $60AB
	BPL.b CODE_05827C
	LDY.w $60C0
	BEQ.b CODE_05827C
	STZ.w $60AA
	STZ.w $60D2
	JSL.l CODE_03AD74
	BCC.b CODE_058263
	INC.w $7402,x
CODE_058263:
	LDY.b $18,x
	LDA.w DATA_058228,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_05822E,y
	STA.w $7542,x
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC.w $7182,x
	INC.b $76,x
CODE_05827C:
	RTS

CODE_05827D:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w $7182,x
	BCS.b CODE_05827C
	STA.w $7182,x
	JSL.l CODE_03AEFD
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	TXY
	LDA.b $18,x
	LSR
	CLC
	ADC.w #!Define_YI_NorSpr022_FlashingEgg
	JSL.l CODE_03A377
	JSL.l CODE_0ED844
	PHX
	TYX
	JSL.l CODE_03B8A8
	PLX
	PLA
	LDA.w #!Define_YI_SoundID3A_StompShyGuy
	JML.l CODE_0085D2

;---------------------------------------------------------------------------

YI_NorSpr06C_LargeSpringBall_Init:
YI_NorSpr148_LargeSpringBall_Init:
;$0582B5
	LDA.w $7722,x
	BPL.b CODE_0582E1
	JSL.l CODE_03AE60
	INC.w $7402,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$FFF8
	STA.w $7720,x
	STZ.w $7B58,x
	LDA.w #$000C
	STA.w $7BB6,x
	STA.w $7BB8,x
	LDY.b #$02
	JSL.l CODE_0582FD
	BRA.b CODE_0582E5

CODE_0582E1:
	JSL.l CODE_03AA52
CODE_0582E5:
	JSL.l CODE_02A007
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
	STA.w $75E0,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr06F_SpringBall_Init:
;$0582F7
	JSL.l CODE_02A007
	LDY.b #$00
CODE_0582FD:
	STY.b $0E
	LDA.w #$0004
	STA.w $7BB6,x
	LDA.w #$0100
	STA.w $7A36,x
	STZ.w $7400,x
	LDA.w $7BB8,x
	CLC
	ADC.w $6122
	CLC
	ADC.w $6112
	STA.w $7A38,x
	JSR.w CODE_05851F
	RTL

;---------------------------------------------------------------------------

YI_NorSpr06F_SpringBall_Main:
;$058320
	LDY.w $7402,x
	BEQ.b CODE_058329
YI_NorSpr06C_LargeSpringBall_Main:
YI_NorSpr148_LargeSpringBall_Main:
	JSL.l CODE_03AA52
CODE_058329:
	JSL.l CODE_03AF23
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr06F_SpringBall
	BEQ.b CODE_05835F
	INY
	INY
	CMP.w #!Define_YI_NorSpr148_LargeSpringBall
	BNE.b CODE_05835F
	LDA.w $75E0,x
	AND.w #$0001
	BEQ.b CODE_05835F
	AND.w $7860,x
	BNE.b CODE_05835F
	LDA.w $75E0,x
	AND.w #$FFFE
	CMP.w $7182,x
	BPL.b CODE_05835F
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
CODE_05835F:
	STY.b $0E
	JSR.w CODE_05837E
	JSR.w CODE_05847C
	JSR.w CODE_05851F
	LDA.w $7860,x
	AND.w #$0001
	STA.b $00
	LDA.w $75E0,x
	AND.w #$FFFE
	ORA.b $00
	STA.w $75E0,x
	RTL

CODE_05837E:
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	ORA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_0583A0
	LDY.b $18,x
	BEQ.b CODE_05838D
	JMP.w CODE_058430

CODE_05838D:
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCC.b CODE_0583A1
CODE_0583A0:
	RTS

CODE_0583A1:
	LDA.w $7C18,x
	BMI.b CODE_0583A0
	SEC
	SBC.w $7A38,x
	BPL.b CODE_0583A0
	LDY.w $60C0
	BEQ.b CODE_0583A0
	LDY.w $60AB
	BMI.b CODE_0583A0
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05842F
	LDY.b $0E
	BNE.b CODE_0583D7
	LDA.w $7722,x
	BPL.b CODE_0583DB
	JSL.l CODE_03AD74
	BCC.b CODE_0583DB
	INC.w $7402,x
CODE_0583D7:
	LDY.b #$01
	STY.b $19,x
CODE_0583DB:
	LDA.w $60AA
	LSR
	LSR
	LDY.b $0E
	BNE.b CODE_0583E5
	LSR
CODE_0583E5:
	CLC
	ADC.w #$0100
	CMP.w #$01C0
	BMI.b CODE_0583F1
	LDA.w #$01C0
CODE_0583F1:
	CPY.b #$00
	BEQ.b CODE_05840C
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0140
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86BF>>16
	LDA.w #FXCODE_0B86BF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_05840C:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $60AA
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60C0
	LDY.b #$02
	STY.b $76,x
	LDA.w #$0004
	CMP.w $61D6
	BMI.b CODE_05842A
	STA.w $61D6
CODE_05842A:
	INC.w $61B4
	INC.b $18,x
CODE_05842F:
	RTS

CODE_058430:
	LDY.w $60C0
	BEQ.b CODE_058439
	JSR.w CODE_0585A5
	RTS

CODE_058439:
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCC.b CODE_058450
	JSR.w CODE_058618
	RTS

CODE_058450:
	LDA.w $7CD8,x
	SEC
	SBC.w $7A38,x
	SEC
	SBC.w $611E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	LDA.w #$0004
	CMP.w $61D6
	BMI.b CODE_058470
	STA.w $61D6
CODE_058470:
	INC.w $61B4
	RTS

;---------------------------------------------------------------------------

DATA_058474:
	dw $FFF0,$0010,$FFF8,$0008

CODE_05847C:
	LDY.w $7722,x
	BMI.b CODE_0584AB
	LDY.b $19,x
	BEQ.b CODE_0584AB
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_058490
	JMP.w CODE_0584EB

CODE_058490:
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_0584AC
	LDY.b $0E
	BNE.b CODE_0584A1
	JSL.l CODE_03AEFD
	STZ.w $7402,x
CODE_0584A1:
	LDY.b #$00
	STY.b $19,x
	LDA.w #$0100
	STA.w $7A36,x
CODE_0584AB:
	RTS

CODE_0584AC:
	TYA
	DEC
	STA.b $00
	LDA.w $7A36,x
	CLC
	ADC.w DATA_058474,y
	STA.w $7A36,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	EOR.b $00
	BMI.b CODE_0584EA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7A36,x
	CPY.b #$00
	BEQ.b CODE_0584D5
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_0584D5:
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	LDA.w #$0140
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_0085D2
CODE_0584EA:
	RTS

CODE_0584EB:
	LDY.b #$04
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0584FC
	LDA.w $7A36,x
	CMP.w #$0100
	BPL.b CODE_0584FC
	INY
	INY
CODE_0584FC:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_058474,y
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

DATA_058507:						; Note: Spring ball graphics pointers
	dw FXDATA_540000+$7050,FXDATA_550000+$40E0

DATA_05850B:
	dw (FXDATA_540000+$7050)>>16,(FXDATA_550000+$40E0)>>16

DATA_05850F:
	dw $0008,$0010

DATA_058513:
	dw $0010,$001C

DATA_058517:
	dw $0E00,$1800

DATA_05851B:
	dw $0008,$000C

CODE_05851F:
	LDY.b $0E
	LDA.w $7722,x
	BPL.b CODE_05852E
	LDA.w DATA_058517+$01,y
	AND.w #$00FF
	BRA.b CODE_05858F

CODE_05852E:
	STZ.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7A36,x
	CMP.b $16,x
	BEQ.b CODE_05853D
	STA.b $16,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
CODE_05853D:
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w DATA_05850B,y
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w DATA_058507,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w DATA_05850F,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w DATA_058513,y
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w DATA_058517,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	TYA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D62C>>16
	LDA.w #FXCODE_08D62C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDA.w $6020
CODE_05858F:
	LDY.b $0E
	CLC
	ADC.w $6122
	CLC
	ADC.w $6112
	SEC
	SBC.w DATA_05851B,y
	STA.w $7A38,x
CODE_0585A0:
	RTS

;---------------------------------------------------------------------------

DATA_0585A1:
	dw $0280,$0200

CODE_0585A5:
	LDY.b $18,x
	BEQ.b CODE_0585A0
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_058618
	LDY.b $0E
	BNE.b CODE_0585BA
	LDA.w #$00B0
	BRA.b CODE_0585E2

CODE_0585BA:
	LDA.w $7A36,x
	CMP.w #$0140
	BMI.b CODE_0585C5
	LDA.w #$0140
CODE_0585C5:
	PHY
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0130
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PLY
	SEC
	SBC.w #$0020
CODE_0585E2:
	ASL
	ASL
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_0585A1,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $60AA
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.w #$0006
	STA.w $60C0
	STA.w $7E0A
	STZ.w $7860,x
CODE_058618:
	LDY.b #$00
	STY.b $18,x
	LDY.b #$04
	STY.b $76,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr070_Clawdaddy_Init:
;$058627
	LDA.w #$FFFF
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_058636:
	dw CODE_0587B7
	dw CODE_0588D7
	dw CODE_058951
	dw CODE_058A08
	dw CODE_058A42

DATA_058640:
	dw $0022,$0024,$0026,$0028

YI_NorSpr070_Clawdaddy_Main:
;$058648
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0012
	BEQ.b CODE_058655
	LDA.w $7D96,x
	BEQ.b CODE_058658
CODE_058655:
	JSR.w CODE_058A87
CODE_058658:
	JSR.w CODE_058723
	JSL.l CODE_03AF23
	LDA.w $6FA2,x
	AND.w #$0300
	BNE.b CODE_058673
	LDA.w $7860,x
	LSR
	BCC.b CODE_058673
	LDA.w #$0943
	STA.w $6FA2,x
CODE_058673:
	LDA.w #$0022
	STA.w $7042,x
	LDA.w $7AF8,x
	BEQ.b CODE_0586A2
	AND.w #$0006
	TAY
	LDA.w DATA_058640,y
	STA.w $7042,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $7A96,x
	INC.w $7A98,x
	INC.w $7AF6,x
	JSR.w CODE_0586C8
	RTL

CODE_0586A2:
	JSR.w CODE_0586C8
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_058636,x)
	JSR.w CODE_058723
	SEP.b #$20
	LDA.w $7402,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	BEQ.b CODE_0586C5
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	BNE.b CODE_0586C5
	REP.b #$20
	JSL.l CODE_03AEFD
CODE_0586C5:
	REP.b #$20
	RTL

CODE_0586C8:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_058710
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_058710
	LDA.w $7D38,y
	BEQ.b CODE_058710
	TYX
	JSL.l CODE_03B25B
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_058709
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID0C_ShellHit2
	JSL.l CODE_0085D2
	PLA
	RTL

CODE_058709:
	LDA.w #$0040
	STA.w $7AF8,x
	RTS

CODE_058710:
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
	RTS

DATA_05871B:
	dw $0000,$FFF0

DATA_05871F:
	dw $0010,$FFF0

CODE_058723:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	BNE.b CODE_058729
	RTS

CODE_058729:
	LDY.w $7400,x
	LDA.w DATA_05871B,y
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $6094
	STA.b $0C
	LDA.w $7CD8,x
	SEC
	SBC.w $609C
	STA.b $0E
	JSL.l CODE_03AA52
	LDY.w $7400,x
	LDA.w DATA_05871B+$02,y
	STA.b $00
	LDA.w $7042,x
	AND.w #$0080
	ASL
	ASL
	XBA
	TAY
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_058760
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_058760:
	LDA.w DATA_05871F,y
	STA.b $02
	REP.b #$10
	LDY.w $7362,x
	LDA.b $18,x
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_058777
	ORA.w #$FF00
CODE_058777:
	CLC
	ADC.b $0C
	STA.w $6008,y
	STA.w $6018,y
	CLC
	ADC.b $00
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $19,x
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_058796
	ORA.w #$FF00
CODE_058796:
	CLC
	ADC.b $0E
	STA.w $6012,y
	STA.w $601A,y
	SEC
	SBC.b $02
	STA.w $6002,y
	STA.w $600A,y
	SEP.b #$10
	RTS

DATA_0587AB:
	dw $00B3,$0059,$FF4D,$FFA7

DATA_0587B3:
	dw $FE9A,$0166

CODE_0587B7:
	TYX
	LDA.w $7722,x
	BMI.b CODE_0587C1
	JSL.l CODE_03AEFD
CODE_0587C1:
	LDA.w $7AF6,x
	BNE.b CODE_058837
	LDA.w $7C18,x
	CLC
	ADC.w #$0028
	CMP.w #$0050
	BCS.b CODE_058837
	LDA.w $7C16,x
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_058837
	SEC
	SBC.w #$0030
	CMP.w #$0040
	BCC.b CODE_058801
	LDY.w $77C2,x
	LDA.w DATA_0587B3,y
	STA.w $75E0,x
	LDA.w #$000B
	STA.w $7540,x
	LDA.w #$0010
	STA.w $7A96,x
	STZ.w $7A98,x
	BRA.b CODE_058837

CODE_058801:
	JSL.l CODE_03AD74
	BCC.b CODE_058837
	LDY.b #$00
	LDA.w $7C16,x
	BPL.b CODE_058810
	INY
	INY
CODE_058810:
	TYA
	STA.w $7400,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $7A96,x
	STZ.w $7A98,x
	LDA.w #$0055
	STA.w $7A36,x
	LDA.w #$0002
	STA.b $78,x
	LDA.w #$0010
	STA.w $7A38,x
	LDA.w #$0201
	STA.b $76,x
CODE_058836:
	RTS

CODE_058837:
	LDA.w $7A98,x
	BNE.b CODE_058836
	LDA.w #$000B
	STA.w $7540,x
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_058857
	AND.w #$0001
	BNE.b CODE_05888D
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	BNE.b CODE_05888D
CODE_058857:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_058875
	AND.w #$FF00
	XBA
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.b $00
	STA.w $7182,x
CODE_058875:
	STZ.w $75E0,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0020
	STA.w $7A98,x
	LDA.w $7A36,x
	EOR.w #$0004
	STA.w $7A36,x
CODE_05888D:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_058896
	EOR.w #$FFFF
	INC
CODE_058896:
	CLC
	ADC.w $7A38,x
	CMP.w #$0A00
	BCC.b CODE_0588AE
	PHA
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	PLA
	SEC
	SBC.w #$0A00
CODE_0588AE:
	STA.w $7A38,x
	LDA.w $7A96,x
	BNE.b CODE_0588D2
	LDA.b $10
	AND.w #$001F
	PHA
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	PLA
	AND.w #$0002
	CLC
	ADC.w $7A36,x
	TAY
	LDA.w DATA_0587AB,y
	STA.w $75E0,x
CODE_0588D2:
	RTS

DATA_0588D3:
	dw $FFE8,$0008

CODE_0588D7:
	TYX
	LDA.w #$0001
	STA.w $7402,x
	LDY.b $77,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0588D3,y
	CMP.w #$00E3
	BMI.b CODE_058926
	STZ.b $78,x
	LDA.b $10
	PHA
	AND.w #$0002
	CLC
	ADC.w #$0004
	TAY
	STZ.b $16,x
	PLA
	AND.w #$0003
	BNE.b CODE_058905
	INY
	INY
	INY
	INY
CODE_058905:
	CLC
	ADC.b $76,x
	INC
	AND.w #$00FF
	CMP.w #$0004
	BCC.b CODE_058917
	TYA
	LSR
	TAY
	LDA.w #$0004
CODE_058917:
	STA.b $76,x
	STY.b $79,x
	LDA.w #$0010
	STA.w $7A98,x
	LDA.w #$00E3
	BRA.b CODE_058946

CODE_058926:
	CMP.w #$0055
	BPL.b CODE_058946
	STZ.w $7402,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0010
	STA.w $7AF6,x
	DEC.b $76,x
	LDY.b #$00
	LDA.w $75E0,x
	BPL.b CODE_058945
	LDY.b #$04
CODE_058945:
	TYA
CODE_058946:
	STA.w $7A36,x
	JSR.w CODE_058A87
CODE_05894C:
	RTS

DATA_05894D:
	dw $FFF0,$0020

CODE_058951:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05894C
	STZ.b $02
	LDY.b $16,x
	LDA.w $7A38,x
	CLC
	ADC.w DATA_05894D,y
	AND.w #$01FE
	CPY.b #$00
	BNE.b CODE_05897A
	CMP.w #$0190
	BCS.b CODE_05898B
	CMP.w #$0100
	BCC.b CODE_05898B
	LDA.w #$0190
	LDY.b #$02
	BRA.b CODE_05898B

CODE_05897A:
	CMP.w #$0090
	BCC.b CODE_05898B
	CMP.w #$0100
	BCS.b CODE_05898B
	LDA.w #$0090
	INC.b $02
	LDY.b #$00
CODE_05898B:
	STY.b $16,x
	STA.w $7A38,x
	CMP.w #$0010
	BNE.b CODE_0589A5
	DEC.b $79,x
	LDY.b $79,x
	BNE.b CODE_0589A5
	LDA.w #$FFFF
	STA.b $16,x
	LDA.w #$0001
	STA.b $76,x
CODE_0589A5:
	JSR.w CODE_058A75
	LDY.b $02
	BEQ.b CODE_058A07
	LDA.w $7182,x
	CLC
	ADC.w #$0014
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7CD6,x
	CLC
	ADC.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w #!Define_YI_SoundID45_SpitSeed
	LDY.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_058A03
	LDA.w #!Define_YI_AmbSpr1D4
	JSL.l CODE_008B21
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
	LDA.w $7CD6,x
	CLC
	ADC.b $00
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $7CD8,x
	CLC
	ADC.w $6022
	SEC
	SBC.w #$0010
	STA.w $7142,y
	LDA.w #!Define_YI_SoundID1F_HitHead
CODE_058A03:
	JSL.l CODE_0085D2
CODE_058A07:
	RTS

CODE_058A08:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_058A07
	LDA.w $7A96,x
	BNE.b CODE_058A41
	LDA.w #$0004
	STA.w $7A96,x
	LDA.b $78,x
	EOR.w #$0002
	STA.b $78,x
	BNE.b CODE_058A29
	LDA.w #!Define_YI_SoundID37_FlutterJump
	JSL.l CODE_0085D2
CODE_058A29:
	DEC.b $79,x
	LDY.b $79,x
	BNE.b CODE_058A38
	LDA.w #$FFFF
	STA.b $16,x
	INC
	INC
	STA.b $76,x
CODE_058A38:
	JSR.w CODE_058A87
	BCC.b CODE_058A41
	JSL.l CODE_03A858
CODE_058A41:
	RTS

CODE_058A42:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_058A41
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	AND.w #$01FE
	STA.w $7A38,x
	CMP.w #$0010
	BNE.b CODE_058A72
	DEC.b $79,x
	LDY.b $79,x
	BNE.b CODE_058A6B
	LDA.w #$FFFF
	STA.b $16,x
	INC
	INC
	STA.b $76,x
	BRA.b CODE_058A72

CODE_058A6B:
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_0085D2
CODE_058A72:
	JMP.w CODE_058A75

CODE_058A75:
	JSR.w CODE_058A87
	BCC.b CODE_058A7E
	JSL.l CODE_03A858
CODE_058A7E:
	RTS

DATA_058A7F:
	dw FXDATA_540000+$4001,FXDATA_540000+$4021

DATA_058A83:
	dw $FFF8,$0008

CODE_058A87:
	LDY.w $7402,x
	BEQ.b CODE_058A7E
	LDY.b $78,x
	LDA.w DATA_058A7F,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$4001)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	SEC
	SBC.w #$0040
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$EC00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D645>>16
	LDA.w #FXCODE_08D645
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	LDY.w $7400,x
	LDA.w DATA_058A83,y
	CLC
	ADC.w $6020
	STA.b $00
	TAY
	STY.b $18,x
	LDY.w $6022
	STY.b $19,x
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_058B48
	LDA.w $6120
	CLC
	ADC.w #$0008
	STA.b $0C
	ASL
	STA.b $0E
	LDA.b $00
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	CLC
	ADC.b $0C
	CMP.b $0E
	BCS.b CODE_058B48
	LDA.w $6122
	CLC
	ADC.w #$0008
	STA.b $0C
	ASL
	STA.b $0E
	LDA.w $6022
	CLC
	ADC.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.b $0C
	CMP.b $0E
	BCS.b CODE_058B48
	TYX
	JSL.l CODE_03B25B
CODE_058B48:
	LDA.w $7C16,x
	CLC
	ADC.w $6020
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_058B6F
	LDA.w $7C18,x
	CLC
	ADC.w $6022
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_058B6F
	LDA.w $61D6
	BNE.b CODE_058B6F
	SEC
	RTS

CODE_058B6F:
	CLC
	RTS

;---------------------------------------------------------------------------

CODE_058B71:
	JSL.l CODE_03AE60
	LDA.w #$0049
	STA.w $7A36,x
	JSR.w CODE_058C74
	RTL

;---------------------------------------------------------------------------

DATA_058B7F:
	dw $FFA7,$0059

DATA_058B83:
	dw $0020,$FFE0

DATA_058B87:
	dw FXDATA_540000+$20E1,FXDATA_540000+$0041

CODE_058B8B:
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BEQ.b CODE_058BA3
	RTL

CODE_058BA3:
	SEP.b #$20
	LDA.b #$04
	STA.w $74A2,x
	REP.b #$20
	LDA.w #$0002
	STA.w $7540,x
	STA.w $7542,x
	LDA.w $7400,x
	EOR.w $60C4
	BNE.b CODE_058BD0
	STZ.w $7542,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7A98,x
	LDY.b #$02
	BRA.b CODE_058BFE

CODE_058BD0:
	LDA.w $7A98,x
	BNE.b CODE_058BFC
	LDA.w #$0040
	STA.w $7A98,x
	LDA.b $10
	PHA
	AND.w #$0001
	BEQ.b CODE_058BEC
	LDY.w $77C2,x
	LDA.w DATA_058B7F,y
	STA.w $75E0,x
CODE_058BEC:
	PLA
	XBA
	AND.w #$0001
	BEQ.b CODE_058BFC
	LDY.w $77C3,x
	LDA.w DATA_058B7F,y
	STA.w $75E2,x
CODE_058BFC:
	LDY.b #$00
CODE_058BFE:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_058B83,y
	CMP.w #$00E3
	BMI.b CODE_058C0F
	LDA.w #$00E3
	BRA.b CODE_058C17

CODE_058C0F:
	CMP.w #$0049
	BPL.b CODE_058C17
	LDA.w #$0049
CODE_058C17:
	STA.w $7A36,x
	LDA.w $7C16,x
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0080
	CMP.w #$0100
	BCS.b CODE_058C58
	LDA.w #$0002
	STA.w $7400,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0100
	BRA.b CODE_058C5E

CODE_058C58:
	STZ.w $7400,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_058C5E:
	AND.w #$01FE
	STA.w $7A38,x
	JSR.w CODE_058C74
	LDA.w $6020
	CMP.w #$0002
	BNE.b CODE_058C73
	JSL.l CODE_03A858
CODE_058C73:
	RTL

CODE_058C74:
	LDA.w #(FXDATA_540000+$0041)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w DATA_058B87,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $61D6
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$1A00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D67A>>16
	LDA.w #FXCODE_08D67A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

YI_NorSpr080_StraightLavaBubble_Init:
;$058CC6
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_058CD6:
	dw CODE_058D45
	dw CODE_058D82

YI_NorSpr080_StraightLavaBubble_Main:
YI_NorSpr081_FollowingLavaBubble_Main:
;$058CDA
	LDA.w $7722,x
	BMI.b CODE_058CE3
	JSL.l CODE_03AA52
CODE_058CE3:
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BPL.b CODE_058CF2
	JSL.l CODE_03A858
	BRA.b CODE_058CF8

CODE_058CF2:
	JSL.l CODE_0DC14C
	BCS.b CODE_058D40
CODE_058CF8:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr080_StraightLavaBubble
	BEQ.b CODE_058D03
	JMP.w CODE_058E5F

CODE_058D03:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_058CD6,x)
	LDY.b $76,x
	BEQ.b CODE_058D40
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0020
	CMP.w #$0100
	BMI.b CODE_058D3D
	AND.w #$00FF
	PHA
	LDA.w #!Define_YI_AmbSpr1D6
	JSL.l CODE_008B21
	LDA.w #$0003
	STA.w $7E4C,y
	ASL
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	PLA
CODE_058D3D:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_058D40:
	RTL

DATA_058D41:
	dw $0009,$0012

CODE_058D45:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_058D81
	JSL.l CODE_03AD74
	BCC.b CODE_058D81
	LDA.b $10
	AND.w #$0002
	STA.b $78,x
	TAY
	LDA.w DATA_058D41,y
	STA.w $7542,x
	LDA.w #$FD34
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID39_PiranhaPlantMunch
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.w $7042,x
	AND.b #$7F
	STA.w $7042,x
	LDA.b #$02
	STA.w $74A2,x
	REP.b #$20
	STZ.b $18,x
	INC.b $76,x
CODE_058D81:
	RTS

CODE_058D82:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w $7182,x
	BPL.b CODE_058DAA
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	JSL.l CODE_03AEFD
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	REP.b #$20
	LDA.w #$0060
	STA.w $7A98,x
	DEC.b $76,x
	RTS

CODE_058DAA:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_058DB5
	EOR.w #$FFFF
	INC
	BRA.b CODE_058DC9

CODE_058DB5:
	LDY.b $18,x
	BNE.b CODE_058DC9
	PHA
	INC.b $18,x
	SEP.b #$20
	LDA.w $7042,x
	ORA.b #$80
	STA.w $7042,x
	REP.b #$20
	PLA
CODE_058DC9:
	LSR
	CMP.w #$0080
	BPL.b CODE_058DD4
	LDA.w #$0080
	BRA.b CODE_058DDC

CODE_058DD4:
	CMP.w #$0200
	BMI.b CODE_058DDC
	LDA.w #$01FF
CODE_058DDC:
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_548000+$00B0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$00B0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0882FA>>16
	LDA.w #FXCODE_0882FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

YI_NorSpr081_FollowingLavaBubble_Init:
;$058E1B
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_058E2B:
	dw CODE_058F11
	dw CODE_058F57
	dw CODE_05908F
	dw CODE_0590B4
	dw CODE_059118
	dw CODE_059151

DATA_058E37:
	dw $0080,$0100,$0180,$0200,$FF80,$FF00,$FE80,$FE00

DATA_058E47:
	dw $0008,$0000

DATA_058E4B:
	dw $FFFF,$FFFF,$0008,$0000

DATA_058E53:
	dw $0008,$FFF8

DATA_058E57:
	dw $0000,$0000,$0008,$FFF8

CODE_058E5F:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_058E2B,x)
	LDY.b $76,x
	BNE.b CODE_058E6C
CODE_058E6B:
	RTL

CODE_058E6C:
	CPY.b #$03
	BEQ.b CODE_058E7C
	CPY.b #$04
	BEQ.b CODE_058E7C
	LDA.w $0030
	AND.w #$0007
	BNE.b CODE_058E6B
CODE_058E7C:
	LDA.w #!Define_YI_AmbSpr1D6
	JSL.l CODE_008B21
	LDA.w #$0003
	STA.w $7E4C,y
	ASL
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.b $76,x
	CMP.w #$0003
	BEQ.b CODE_058EA5
	CMP.w #$0004
	BNE.b CODE_058F0C
CODE_058EA5:
	PHY
	LDY.b $16,x
	LDA.w DATA_058E53,y
	STA.b $08
	LDA.w DATA_058E57,y
	STA.b $0A
	LDA.w DATA_058E47,y
	BPL.b CODE_058EC2
	LDA.w $7974
	AND.w #$0001
	BEQ.b CODE_058EC2
	LDA.w #$0008
CODE_058EC2:
	STA.b $04
	LDA.w DATA_058E4B,y
	BPL.b CODE_058ED4
	LDA.w $7974
	AND.w #$0001
	BEQ.b CODE_058ED4
	LDA.w #$0008
CODE_058ED4:
	STA.b $06
	LDA.b $10
	PHA
	AND.w #$0006
	CLC
	ADC.b $04
	TAY
	LDA.w DATA_058E37,y
	STA.b $00
	PLA
	XBA
	AND.w #$0006
	CLC
	ADC.b $06
	TAY
	LDA.w DATA_058E37,y
	PLY
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $70A2,y
	CLC
	ADC.b $08
	STA.w $70A2,y
	LDA.w $7142,y
	CLC
	ADC.b $0A
	STA.w $7142,y
CODE_058F0C:
	RTL

DATA_058F0D:
	dw $FF4D,$00B3

CODE_058F11:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_058F47
	JSL.l CODE_03AD74
	BCC.b CODE_058F47
	LDA.w $77C2,x
	TAY
	STY.b $77,x
	LDA.w DATA_058F0D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FD34
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0009
	STA.w $7542,x
	SEP.b #$20
	LDA.b #$02
	STA.w $74A2,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID39_PiranhaPlantMunch
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_058F47:
	RTS

DATA_058F48:
	db $04,$06,$06,$00,$FF,$FF,$06,$02,$FF,$FF,$06,$00,$00,$FF,$06

CODE_058F57:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w $7182,x
	BPL.b CODE_058F82
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	JSL.l CODE_03AEFD
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	REP.b #$20
	LDA.w #$0060
	STA.w $7A98,x
	DEC.b $76,x
	RTS

CODE_058F82:
	LDA.w #$0001
	LDY.w $7223,x
	BPL.b CODE_058F8B
	INC
CODE_058F8B:
	ORA.w #$0004
	LDY.w $7221,x
	BPL.b CODE_058F96
	EOR.w #$000C
CODE_058F96:
	TAY
	AND.w $7860,x
	BEQ.b CODE_059008
	STY.b $02
	TAY
	LDA.w DATA_058F48-$01,y
	AND.w #$00FF
	CMP.w #$00FF
	BNE.b CODE_058FD4
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_058FB3
	EOR.w #$FFFF
	INC
CODE_058FB3:
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_058FBE
	EOR.w #$FFFF
	INC
CODE_058FBE:
	CMP.b $00
	BPL.b CODE_058FCB
	LDA.b $02
	AND.w #$0008
	LSR
	LSR
	BRA.b CODE_058FD4

CODE_058FCB:
	LDA.b $02
	AND.w #$0002
	CLC
	ADC.w #$0004
CODE_058FD4:
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $7A36,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BPL.b CODE_058FEA
	EOR.w #$FFFF
	INC
	BRA.b CODE_058FFA

CODE_058FEA:
	CMP.w #$0100
	BPL.b CODE_058FFA
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$00C0
	STA.b $18,x
CODE_058FFA:
	STA.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	INC.b $76,x
	RTS

CODE_059008:
	JSR.w CODE_058073
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0080
	AND.w #$01FE
	STA.w $7A38,x
	STZ.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_05901E:
	BPL.b CODE_059024
	EOR.w #$FFFF
	INC
CODE_059024:
	LSR
	CMP.w #$0080
	BPL.b CODE_05902F
	LDA.w #$0080
	BRA.b CODE_059037

CODE_05902F:
	CMP.w #$0200
	BMI.b CODE_059037
	LDA.w #$01FE
CODE_059037:
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	STA.w $6022
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w #$0110
	SEC
	SBC.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.w $6024
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #(FXDATA_548000+$00B0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$00B0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	PHX
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	PLX
	LDX.b #FXCODE_08855F>>16
	LDA.w #FXCODE_08855F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDY.b $76,x
	CPY.b #$01
	BNE.b CODE_05908E
	LDA.w $6022
	STA.b $18,x
CODE_05908E:
	RTS

CODE_05908F:
	TYX
	LDA.b $78,x
	SEC
	SBC.w #$00A0
	STA.b $78,x
	JSR.w CODE_05901E
	LDA.w $6022
	CMP.w #$0080
	BNE.b CODE_0590AB
	LDA.w $6024
	STA.w $7A38,x
	INC.b $76,x
CODE_0590AB:
	RTS

DATA_0590AC:
	dw $00C0,$0040,$0080,$0000

CODE_0590B4:
	TYX
	LDA.w $7A38,x
	CLC
	ADC.w #$0020
	CMP.w #$0154
	BMI.b CODE_0590C6
	INC.b $76,x
	LDA.w #$0154
CODE_0590C6:
	STA.w $7A38,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0200
	SEC
	SBC.w !REGISTER_SuperFX_R6_MultiplierLo
	LSR
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #(FXDATA_548000+$00B0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$00B0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b $16,x
	LDA.w DATA_0590AC,y
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000A
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08855F>>16
	LDA.w #FXCODE_08855F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_059118:
	TYX
	LDA.w $7A38,x
	SEC
	SBC.w #$0060
	CMP.w #$0100
	BPL.b CODE_0590C6
	LDA.w $7A36,x
	LDY.b $16,x
	CPY.b #$04
	BCS.b CODE_059132
	EOR.w #$FFFF
	INC
CODE_059132:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CPY.b #$04
	BCC.b CODE_059140
	EOR.w #$FFFF
	INC
CODE_059140:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0009
	STA.w $7542,x
	LDA.w #$0010
	STA.b $78,x
	INC.b $76,x
	RTS

CODE_059151:
	TYX
	JSR.w CODE_058073
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0080
	AND.w #$01FE
	STA.w $7A38,x
	STZ.w $7400,x
	LDA.b $78,x
	CLC
	ADC.w #$0060
	STA.b $78,x
	JSR.w CODE_05901E
	LDA.w $6022
	DEC
	CMP.b $18,x
	BMI.b CODE_05917C
	LDY.b #$01
	STY.b $76,x
CODE_05917C:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr082_ChainChomp_Init:
;$05917D
	JSL.l CODE_03AE60
	LDA.w $70E2,x
	CLC
	ADC.w #$0004
	STA.w $0DFD
	STA.w $0DFF
	STA.w $0E01
	STA.w $0E03
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $0E05
	STA.w $0E07
	STA.w $0E09
	STA.w $0E0B
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A36,x
	STZ.w $0E13
	JSR.w CODE_059372
	RTL

;---------------------------------------------------------------------------

DATA_0591BA:
	dw CODE_05948E
	dw CODE_059564
	dw CODE_059591
	dw CODE_0595FD
	dw CODE_05963C
	dw CODE_0596EF

DATA_0591C6:
	dw FXDATA_548000+$1080,FXDATA_548000+$1090,FXDATA_548000+$10A0,FXDATA_548000+$1090,FXDATA_548000+$4000,FXDATA_548000+$4020,FXDATA_548000+$4040,FXDATA_548000+$4020

DATA_0591D6:
	dw $0200,$FE00

YI_NorSpr082_ChainChomp_Main:
;$0591DA
	LDY.w $7041,x
	BPL.b CODE_0591E8
	JSL.l CODE_03ABFA
	LDA.w #$0080
	BRA.b CODE_0591EF

CODE_0591E8:
	JSL.l CODE_03AA52
	LDA.w #$0020
CODE_0591EF:
	STA.b $08
	STZ.b $0A
	LDY.b $78,x
	BEQ.b CODE_059208
	CPY.b #$02
	BPL.b CODE_059208
	LDA.w $7974
	AND.w #$0004
	BNE.b CODE_059208
	LDA.w #$8000
	STA.b $0A
CODE_059208:
	PHX
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.b $08
	TAY
	LDA.b $76,x
	CMP.w #$0002
	BMI.b CODE_059253
	LDA.w $0E11
	BEQ.b CODE_059253
	LDX.w #$0006
CODE_059221:
	LDA.b $10
	PHA
	AND.w #$0001
	CLC
	ADC.w $0DFD,x
	SEC
	SBC.w $6094
	STA.w $6000,y
	PLA
	PHA
	XBA
	AND.w #$0001
	CLC
	ADC.w $0E05,x
	SEC
	SBC.w $609C
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	PLA
	LSR
	STA.b $10
	DEX
	DEX
	BPL.b CODE_059221
	BRA.b CODE_059280

CODE_059253:
	LDX.w #$0006
CODE_059256:
	LDA.w $0DFD,x
	SEC
	SBC.w $6094
	CLC
	ADC.b $0A
	STA.w $6000,y
	LDA.w $0E05,x
	SEC
	SBC.w $609C
	STA.w $6002,y
	LDA.w $6004,y
	AND.w #$3FFF
	STA.w $6004,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	DEX
	BPL.b CODE_059256
CODE_059280:
	SEP.b #$10
	PLX
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0591BA,x)
	JSR.w CODE_059372
	STZ.w $7540,x
	LDA.w $603C
	STA.w $0E13
	BEQ.b CODE_0592FC
	LDA.w #$0010
	STA.w $0E11
	LDY.w $7223,x
	BPL.b CODE_0592B5
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0592B5:
	LDY.b $76,x
	CPY.b #$02
	BPL.b CODE_0592DF
	LDA.w $7860,x
	LSR
	BCS.b CODE_0592DF
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0004
	CMP.w $70E2,x
	BPL.b CODE_0592D1
	INY
	INY
CODE_0592D1:
	LDA.w DATA_0591D6,y
	STA.w $75E0,x
	LDA.w #$0020
	STA.w $7540,x
	BRA.b CODE_059304

CODE_0592DF:
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0004
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0592FC
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0592FC:
	LDA.w $0E11
	BEQ.b CODE_059304
	DEC.w $0E11
CODE_059304:
	LDY.b $76,x
	CPY.b #$04
	BMI.b CODE_05930B
	RTL

CODE_05930B:
	JSL.l CODE_03A5B7
	LDY.w $7D36,x
	DEY
	BMI.b CODE_059371
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_059371
	LDA.w $7D38,y
	BEQ.b CODE_059371
	LDA.w $7040,y
	LSR
	PHP
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	PLP
	BCS.b CODE_059339
	CMP.w #$8000
	ROR
CODE_059339:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$0200
	BMI.b CODE_059345
	LDA.w #$0200
CODE_059345:
	CMP.w #$FE00
	BPL.b CODE_05934D
	LDA.w #$FE00
CODE_05934D:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	TYX
	LDA.w #!Define_YI_SoundID79_HurtGhost
	JSL.l CODE_0085D2
	JSL.l CODE_03B25B
	LDA.w #$0001
	STA.b $16,x
	LDY.b #$01
	STY.b $76,x
CODE_059371:
	RTL

CODE_059372:
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_05938D
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_059388
	LDA.w $7860,x
	LSR
	BCS.b CODE_059394
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_059394
CODE_059388:
	JSR.w CODE_058073
	BRA.b CODE_059394

CODE_05938D:
	CPY.b #$04
	BPL.b CODE_059394
	STZ.w $7A38,x
CODE_059394:
	LDY.b #$06
CODE_059396:
	LDA.w $0DFD,y
	STA.w $6020,y
	LDA.w $0E05,y
	STA.w $6028,y
	DEY
	DEY
	BPL.b CODE_059396
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0004
	BPL.b CODE_0593C9
	EOR.w #$FFFF
	INC
CODE_0593C9:
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w #$0008
	BPL.b CODE_0593E0
	EOR.w #$FFFF
	INC
CODE_0593E0:
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$1000
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	XBA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $7402,x
	STA.w $6040
	LDA.b $76,x
	LSR
	DEC
	STA.w $6042
	LDA.w $7A36,x
	STA.w $604C
	LDA.w $7A38,x
	LSR
	STA.w $604A
	LDY.b $18,x
	LDA.w #(FXDATA_548000+$1080)>>16
	STA.w $605A
	LDA.w DATA_0591C6,y
	STA.w $6058
	PHX
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w $6046
	LDA.l DATA_03A9EE,x
	STA.w $6044
	PLX
	LDY.b $76,x
	CPY.b #$03
	BEQ.b CODE_05945A
	CPY.b #$02
	BPL.b CODE_059465
	LDA.w $7182,x
	CLC
	ADC.w #$0007
	CMP.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	BMI.b CODE_05945A
	LDY.w $0E13
	BEQ.b CODE_05944F
	LDX.b #FXCODE_08D883>>16
	LDA.w #FXCODE_08D883
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_05946E

CODE_05944F:
	LDX.b #FXCODE_08D8F0>>16
	LDA.w #FXCODE_08D8F0
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_05946E

CODE_05945A:
	LDX.b #FXCODE_08D776>>16
	LDA.w #FXCODE_08D776
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_05946E

CODE_059465:
	LDX.b #FXCODE_08D7FA>>16
	LDA.w #FXCODE_08D7FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_05946E:
	LDX.b $12
	INC.w $0CF9
	LDY.b #$06
CODE_059475:
	LDA.w $6020,y
	STA.w $0DFD,y
	LDA.w $6028,y
	STA.w $0E05,y
	DEY
	DEY
	BPL.b CODE_059475
	RTS

DATA_059486:
	dw $FE80,$0180

DATA_05948A:
	dw $FB00,$0500

CODE_05948E:
	TYX
	LDA.w $7AF6,x
	BEQ.b CODE_0594A1
	LDA.w $7860,x
	LSR
	BCC.b CODE_05949D
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05949D:
	JSR.w CODE_0595C1
	RTS

CODE_0594A1:
	LDA.w $7C16,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCC.b CODE_0594D9
	LDA.b $10
	BIT.w #$0003
	BEQ.b CODE_0594D3
	PHA
	AND.w #$0003
	INC
	STA.b $16,x
	PLA
	XBA
	AND.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_059486,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	JMP.w CODE_059561

CODE_0594D3:
	XBA
	BIT.w #$0003
	BEQ.b CODE_0594DE
CODE_0594D9:
	LDY.w $77C2,x
	BRA.b CODE_0594E5

CODE_0594DE:
	LDA.w $7400,x
	EOR.w #$0002
	TAY
CODE_0594E5:
	LDA.w DATA_05948A,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $0E0F
	TYA
	STA.w $7400,x
	LDA.b $10
	PHP
	AND.w #$01FF
	CLC
	ADC.w #$0300
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLP
	BMI.b CODE_05954F
	LDA.w #$0080
	STA.w $7A36,x
	STZ.w $7A38,x
	LDA.w #$01FE
	STA.w $0E0D
	LDA.w #$0050
	STA.b $16,x
	JSL.l CODE_03AEFD
	LDA.w #!Define_YI_SoundID83_LungeFish
	JSL.l CODE_0085D2
	JSL.l CODE_03ADD0
	BCS.b CODE_059537
	LDA.w #$0100
	STA.w $0E0D
	JSL.l CODE_03AD74
	BRA.b CODE_059540

CODE_059537:
	INC.w $7402,x
	LDA.w #$A005
	STA.w $7040,x
CODE_059540:
	LDA.w #$00A0
	STA.w $7A98,x
	STZ.w $7542,x
	LDY.b #$04
	STY.b $76,x
	PLA
	RTL

CODE_05954F:
	LDA.w #!Define_YI_SoundID7B_NavalPiranhaMunch
	JSL.l CODE_0085D2
	LDA.w #$0060
	STA.w $7A98,x
	STZ.w $7542,x
	INC.b $76,x
CODE_059561:
	INC.b $76,x
	RTS

CODE_059564:
	TYX
	LDY.w $0E13
	BNE.b CODE_05957B
	LDA.w $7860,x
	LSR
	BCC.b CODE_05958D
	LDA.w #!Define_YI_SoundID26_WalkingTapTap
	JSL.l CODE_0085D2
	DEC.b $16,x
	BNE.b CODE_059587
CODE_05957B:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7AF6,x
	DEC.b $76,x
	RTS

CODE_059587:
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_05958D:
	JSR.w CODE_0595CE
	RTS

CODE_059591:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0595AA
	STZ.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7AF6,x
	ASL
	STA.w $7542,x
	RTS

CODE_0595AA:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0595BA
	LDA.w $7860,x
	LSR
	BCS.b CODE_0595BF
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0595BF
CODE_0595BA:
	LDY.b #$04
	STY.b $18,x
	RTS

CODE_0595BF:
	BRA.b CODE_0595CE

CODE_0595C1:
	LDA.w #$0008
	STA.b $00
	LSR
	BRA.b CODE_0595D6

CODE_0595C9:
	LDA.w #$0010
	BRA.b CODE_0595D1

CODE_0595CE:
	LDA.w #$0008
CODE_0595D1:
	STA.b $00
	LDA.w #$0002
CODE_0595D6:
	STA.b $02
	LDA.w $7A96,x
	BNE.b CODE_0595FC
	LDA.b $02
	STA.w $7A96,x
	LDA.b $18,x
	INC
	INC
	CMP.b $00
	BCC.b CODE_0595EE
	LSR
	AND.w #$FFF8
CODE_0595EE:
	STA.b $18,x
	CMP.w #$0008
	BNE.b CODE_0595FC
	LDA.w #!Define_YI_SoundID64_UnlockDoor
	JSL.l CODE_0085D2
CODE_0595FC:
	RTS

CODE_0595FD:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_0595CE

DATA_059614:
	dw $001C,$002C

DATA_059618:
	dw $0180,$FE80

DATA_05961C:
	dw $0100,$00C4,$0100,$00D8,$0100,$00F0,$0100,$0100
	dw $01FE,$013C,$01FE,$0174,$01FE,$019A,$01FE,$01FE

CODE_05963C:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05965A
	LDA.w #$0040
	STA.w $7542,x
	LDY.b #$00
	LDA.w $0E0F
	BMI.b CODE_059651
	INY
	INY
CODE_059651:
	LDA.w DATA_059618,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_05965A:
	LDA.w $7040,x
	AND.w #$8000
	XBA
	ASL
	ASL
	XBA
	TAY
	LDA.w $7A38,x
	AND.w #$0002
	BEQ.b CODE_05967E
	LDA.w $7A36,x
	SEC
	SBC.w DATA_059614,y
	STA.w $7A36,x
	CMP.w $0E0D
	BPL.b CODE_0596D1
	BRA.b CODE_05968E

CODE_05967E:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_059614,y
	STA.w $7A36,x
	DEC
	CMP.w $0E0D
	BMI.b CODE_0596D1
CODE_05968E:
	LDA.w $0E0D
	STA.w $7A36,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A38,x
	INC
	INC
	CMP.w #$0010
	BMI.b CODE_0596A7
	LDA.w #$000E
CODE_0596A7:
	STA.w $7A38,x
	LDA.w $7040,x
	AND.w #$8000
	XBA
	LSR
	LSR
	LSR
	STA.b $00
	CLC
	ADC.w $7A38,x
	TAY
	LDA.w DATA_05961C,y
	STA.w $0E0D
	LDY.b $00
	LDA.w DATA_05961C,y
	CMP.w $7A36,x
	BNE.b CODE_0596D1
	LDA.w #$0010
	STA.w $0E11
CODE_0596D1:
	LDA.b $16,x
	BNE.b CODE_0596D8
	JMP.w CODE_0595C9

CODE_0596D8:
	LDY.b #$0C
	STY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ORA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0596EA
	LDA.b $16,x
	BEQ.b CODE_0596EA
	DEC.b $16,x
CODE_0596EA:
	RTS

DATA_0596EB:
	dw $0006,$0008

CODE_0596EF:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0596FB
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0596FB:
	LDY.b #$08
	STY.b $18,x
	LDA.w $7040,x
	AND.w #$8000
	XBA
	ASL
	ASL
	XBA
	TAY
	LDA.w $7A36,x
	SEC
	SBC.w DATA_0596EB,y
	CMP.w #$0080
	BPL.b CODE_059748
	LDA.w #$0020
	STA.w $7AF6,x
	LDY.w $7041,x
	BPL.b CODE_059741
	JSL.l CODE_03AEFD
	JSL.l CODE_03AD74
	DEC.w $7402,x
	LDA.w #$4005
	STA.w $7040,x
	STZ.w $7A38,x
	STZ.b $18,x
	STZ.b $76,x
	LDA.w #$0100
	STA.w $7A36,x
	PLA
	RTL

CODE_059741:
	STZ.b $18,x
	STZ.b $76,x
	LDA.w #$0100
CODE_059748:
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr08F_MonkeySwing_Init:
;$05974C
	JSL.l CODE_03AE60
	LDA.w $7722,x
	STA.b $18,x
	JSL.l CODE_03AE60
	LDA.w #$FE40
	STA.w $75E0,x
	STA.w $75E2,x
	LDA.w #$8000
	STA.w $7A36,x
	STA.w $7A38,x
	LDA.w #$0018
	STA.w $7AF8,x
	JSR.w CODE_059A9F
	RTL

;---------------------------------------------------------------------------

YI_NorSpr08F_MonkeySwing_Main:
;$059775
	JSR.w CODE_0597A9
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0006
	BNE.b CODE_059792
	LDA.w $7722,x
	BMI.b CODE_059789
	JSL.l CODE_03AEFD
CODE_059789:
	LDA.b $18,x
	STA.w $7722,x
	JSL.l CODE_03AEFD
CODE_059792:
	JSL.l CODE_03AF23
	JSR.w CODE_05988A
	JSR.w CODE_05989A
	JSR.w CODE_0599DD
	JSR.w CODE_059A9F
	RTL

DATA_0597A3:
	dw $FFF0,$0010,$FFF0

CODE_0597A9:
	LDY.w $7A37,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDY.w $7A39,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A38,x
	SEC
	SBC.w $7A36,x
	XBA
	TAY
	TYA
	CPY.b #$00
	BPL.b CODE_0597CD
	ORA.w #$FF00
CODE_0597CD:
	ASL
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0B950A>>16
	LDA.w #FXCODE_0B950A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AA52
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	PHA
	TAY
	JSL.l CODE_03AA60
	LDA.w $7722,x
	STA.b $00
	LDA.b $18,x
	STA.w $7722,x
	REP.b #$10
	PLA
	CLC
	ADC.w #$0020
	PHA
	TAY
	JSL.l CODE_03AA60
	REP.b #$10
	PLA
	CLC
	ADC.w #$0020
	TAY
	JSL.l CODE_03AA60
	LDA.b $00
	STA.w $7722,x
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	LDY.w $7400,x
	CLC
	ADC.w DATA_0597A3,y
	STA.b $00
	LDA.w DATA_0597A3+$02,y
	STA.b $02
	LDA.w $7682,x
	SEC
	SBC.w #$0008
	STA.b $04
	LDA.w #$6020
	STA.b $06
	LDA.w #$0004
	STA.b $0A
	REP.b #$10
	LDY.w $7362,x
CODE_05984A:
	LDA.b ($06)
	CLC
	ADC.b $00
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.b $02
	STA.w $6008,y
	STA.w $6018,y
	INC.b $06
	INC.b $06
	LDA.b ($06)
	CLC
	ADC.b $04
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
	DEC.b $0A
	BEQ.b CODE_059887
	INC.b $06
	INC.b $06
	TYA
	CLC
	ADC.w #$0020
	TAY
	BRA.b CODE_05984A

CODE_059887:
	SEP.b #$10
CODE_059889:
	RTS

CODE_05988A:
	JSL.l CODE_03A2DE
	BCC.b CODE_059889
	LDA.b $18,x
	STA.w $7722,x
	PLA
	JML.l CODE_03AEFD

CODE_05989A:
	LDY.b #$0C
	LDA.w $61B2
	BIT.w #$6000
	BNE.b CODE_059889
	LDY.w $61CC
	BNE.b CODE_059889
	AND.w #$8000
	BEQ.b CODE_0598D6
CODE_0598AE:
	LDA.w $7C16,x
	CLC
	ADC.w $6020,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0598CE
	LDA.w $7C18,x
	CLC
	ADC.w $6022,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_059911
CODE_0598CE:
	TYA
	SEC
	SBC.w #$0004
	TAY
	BPL.b CODE_0598AE
CODE_0598D6:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8
	STA.b $02
	LDY.b #$0C
CODE_0598EA:
	LDA.b $00
	CLC
	ADC.w $6020,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_059908
	LDA.b $02
	CLC
	ADC.w $6022,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_059911
CODE_059908:
	TYA
	SEC
	SBC.w #$0004
	TAY
	BPL.b CODE_0598EA
	RTS

CODE_059911:
	STY.b $00
	LDA.w $6020,y
	STA.b $02
	LDA.w $6022,y
	STA.b $04
	CPY.b #$08
	BMI.b CODE_059923
	INX
	INX
CODE_059923:
	LDA.w #$0040
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_05992E
	LDA.w #$FFC0
CODE_05992E:
	CLC
	ADC.w $7A37,x
	AND.w #$00FF
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$FC00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $7400,x
	BEQ.b CODE_059959
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_059959:
	LDA.w #$01A8
	JSL.l CODE_03A364
	BCC.b CODE_0599D8
	LDA.w $70E2,x
	CLC
	ADC.b $02
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $04
	STA.w $7182,y
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	TYX
	JSL.l CODE_02BC22
	LDX.b $12
	LDY.b #$0C
CODE_05998F:
	STY.b $06
	CPY.b $00
	BEQ.b CODE_0599C0
	LDA.w $6020,y
	STA.b $02
	LDA.w $6022,y
	STA.b $04
	LDA.w #$01A5
	JSL.l CODE_03A34C
	BCC.b CODE_0599D8
	LDA.w $70E2,x
	CLC
	ADC.b $02
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $04
	STA.w $7182,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
CODE_0599C0:
	LDY.b $06
	TYA
	SEC
	SBC.w #$0004
	TAY
	BPL.b CODE_05998F
	JSL.l CODE_03AEFD
	LDA.b $18,x
	STA.w $7722,x
	PLA
	JML.l CODE_03A32E

CODE_0599D8:
	RTS

;---------------------------------------------------------------------------

DATA_0599D9:
	dw $FFFA,$0006

CODE_0599DD:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w $75E0,x
	BEQ.b CODE_059A06
	STA.b $00
	BPL.b CODE_0599EE
	INY
	INY
CODE_0599EE:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0599D9,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w $75E0,x
	EOR.b $00
	BPL.b CODE_059A06
	LDA.w $75E0,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_059A06:
	LDY.w $7A37,x
	TYA
	SEC
	SBC.w #$0040
	STA.b $00
	LDA.w $7A36,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7A36,x
	XBA
	AND.w #$00FF
	SEC
	SBC.w #$0040
	EOR.b $00
	BPL.b CODE_059A3B
	LDA.b $00
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_059A3B
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_059A3B:
	LDA.w $7AF8,x
	BNE.b CODE_059A9E
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w $75E2,x
	BEQ.b CODE_059A69
	STA.b $00
	BPL.b CODE_059A51
	INY
	INY
CODE_059A51:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0599D9,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w $75E2,x
	EOR.b $00
	BPL.b CODE_059A69
	LDA.w $75E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_059A69:
	LDY.w $7A39,x
	TYA
	SEC
	SBC.w #$0040
	STA.b $00
	LDA.w $7A38,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7A38,x
	XBA
	AND.w #$00FF
	SEC
	SBC.w #$0040
	EOR.b $00
	BPL.b CODE_059A9E
	LDA.b $00
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_059A9E
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_059A9E:
	RTS

;---------------------------------------------------------------------------

CODE_059A9F:
	LDA.w #FXDATA_548000+$4060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$4060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	SEC
	SBC.w $7A36,x
	BPL.b CODE_059AB7
	LDA.w #$0000
CODE_059AB7:
	STA.b $06
	LSR
	STA.b $04
	LDA.w $7A38,x
	CLC
	ADC.w $7A36,x
	LSR
	CLC
	ADC.b $04
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #FXDATA_548000+$4060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$4060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	CLC
	ADC.b $06
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $18,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

YI_NorSpr094_ExpandingBlock_Init:
;$059B30
	JSL.l CODE_03AE60
	LDA.w $7182,x
	STA.b $78,x
	LDA.w #$0100
	STA.w $7A36,x
	STZ.w $7400,x
	JSR.w CODE_059BA7
	RTL

;---------------------------------------------------------------------------

DATA_059B46:
	dw CODE_0580C2
	dw CODE_059BE7
	dw CODE_059C15
	dw CODE_059C42

YI_NorSpr094_ExpandingBlock_Main:
;$059B4E
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_059B46,x)
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_059B70
	JSR.w CODE_059BA7
CODE_059B70:
	LDA.b $76,x
	PHA
	LDA.w #$0700
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0800
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$000A
	STA.b $0A
	STZ.b $02
	LDY.b #$01
	STY.b $09
	STY.b $06
	DEY
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	JSL.l CODE_059C6F
	PLA
	CMP.b $76,x
	BEQ.b CODE_059BA6
	LDA.w #!Define_YI_SoundID15_Growth
	JSL.l CODE_0085D2
CODE_059BA6:
	RTL

CODE_059BA7:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #(FXDATA_540000+$7040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_540000+$7040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $7722,x
	TAX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0882FA>>16
	LDA.w #FXCODE_0882FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_059BE7:
	TYX
	LDY.w $7223,x
	BMI.b CODE_059C11
	LDA.w $7860,x
	AND.w #$0003
	BEQ.b CODE_059BF9
	INC.b $18,x
	BRA.b CODE_059C03

CODE_059BF9:
	LDA.b $78,x
	CMP.w $7182,x
	BPL.b CODE_059C11
	STA.w $7182,x
CODE_059C03:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	INC.b $76,x
	LDA.w #$0120
	STA.w $7A96,x
CODE_059C11:
	JSR.w CODE_059C2F
	RTS

CODE_059C15:
	TYX
	LDA.b $18,x
	BEQ.b CODE_059C22
	LDA.w $7860,x
	AND.w #$0003
	BEQ.b CODE_059C27
CODE_059C22:
	LDA.w $7A96,x
	BNE.b CODE_059C2F
CODE_059C27:
	LDA.w #$0040
	STA.w $7542,x
	INC.b $76,x
CODE_059C2F:
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w #$0200
	BMI.b CODE_059C3E
	LDA.w #$01FF
CODE_059C3E:
	STA.w $7A36,x
	RTS

CODE_059C42:
	TYX
	LDA.b $78,x
	INC
	CMP.w $7182,x
	BPL.b CODE_059C55
	DEC
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_059C55:
	LDA.w $7A36,x
	SEC
	SBC.w #$0018
	CMP.w #$0100
	BPL.b CODE_059C6B
	LDA.w #$0100
	LDY.w $7542,x
	BNE.b CODE_059C6B
	STZ.b $76,x
CODE_059C6B:
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

CODE_059C6F:
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STY.b $08
	LDA.w $6120
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $6122
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0B8578>>16
	LDA.w #FXCODE_0B8578
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	STZ.b $04
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	STA.b $0C
	CLC
	ADC.w $603C
	CMP.w $6038
	BCC.b CODE_059CA4
	RTL

CODE_059CA4:
	LDA.w #$0008
	LDY.b $09
	BEQ.b CODE_059CC7
	CPY.b #$01
	BNE.b CODE_059CBC
	LDA.w #$0010
	SEC
	SBC.w $6036
	SEC
	SBC.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	BRA.b CODE_059CC7

CODE_059CBC:
	LDA.w #$FFF0
	CLC
	ADC.w $6036
	SEC
	SBC.w !REGISTER_SuperFX_R3_GeneralPurposeLo
CODE_059CC7:
	CLC
	ADC.w $7182,x
	SEC
	SBC.w $611E
	SEC
	SBC.w $6112
	STA.b $0E
	CLC
	ADC.w $603E
	CMP.w $603A
	BCS.b CODE_059D29
	LDA.w $603E
	SEC
	SBC.b $0A
	STA.b $00
	LDA.b $0E
	BPL.b CODE_059CFA
	PHA
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
	PLA
	CMP.b $00
	BMI.b CODE_059D2A
	BRA.b CODE_059CFE

CODE_059CFA:
	CMP.b $00
	BPL.b CODE_059D2A
CODE_059CFE:
	LDY.b $08
	BNE.b CODE_059D6A
	INC.b $04
	LDA.w $60A8
	EOR.b $0C
	BMI.b CODE_059D28
	LDA.w $603C
	INC
	LDY.b $0D
	BMI.b CODE_059D18
	INC.b $04
	EOR.w #$FFFF
CODE_059D18:
	CLC
	ADC.b $0C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $60A8
	STZ.w $60B4
CODE_059D28:
	CLC
CODE_059D29:
	RTL

CODE_059D2A:
	LDA.b $0E
	BPL.b CODE_059D6C
	LDY.b $02
	BNE.b CODE_059D39
	LDA.b $0E
	EOR.w $60AA
	BMI.b CODE_059D6A
CODE_059D39:
	LDY.b $08
	BNE.b CODE_059D6A
	LDY.b #$04
	STY.b $04
	LDA.b $0E
	CLC
	ADC.w $603E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	STZ.w $60D2
	LDY.b $06
	BEQ.b CODE_059D6A
	LDA.b $76,x
	BNE.b CODE_059D6A
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	INC.b $76,x
CODE_059D6A:
	SEC
	RTL

CODE_059D6C:
	LDA.b $0E
	EOR.w $60AA
	BMI.b CODE_059D6A
	LDY.b #$08
	STY.b $04
	LDA.b $0E
	SEC
	SBC.w $603E
	CLC
	ADC.w #$0002
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.b #$00
	STY.w !EXRAM_YI_Player_SubYPosLo|!EXRAMBankMirror
	STZ.w $60AA
	INC.w $61B4
	CLC
	RTL

;---------------------------------------------------------------------------

YI_NorSpr095_BlueCheckeredBlock_Init:
YI_NorSpr096_RedCheckeredBlock_Init:
;$059D95
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	STA.w $7A38,x
	STZ.b $16,x
	JSR.w CODE_059E99
	RTL

;---------------------------------------------------------------------------

DATA_059DA8:
	dw CODE_059EF3
	dw CODE_059F50
	dw CODE_0580C2
	dw CODE_0580C2

DATA_059DB0:
	dw FXDATA_548000+$10B0,FXDATA_548000+$0060

DATA_059DB4:
	dw $0600,$0E00

DATA_059DB8:
	dw $0A00,$0600

YI_NorSpr095_BlueCheckeredBlock_Main:
YI_NorSpr096_RedCheckeredBlock_Main:
;$059DBC
	JSL.l CODE_03AA52
	LDY.b $76,x
	CPY.b #$01
	BEQ.b CODE_059DCC
	JSL.l CODE_03AF23
	BRA.b CODE_059DD3

CODE_059DCC:
	JSL.l CODE_03B716
	JSR.w CODE_059E99
CODE_059DD3:
	JSR.w CODE_059E06
	JSR.w CODE_059E6F
	JSL.l CODE_059C6F
	BCS.b CODE_059DF3
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_059DF3:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_059DA8,x)
	LDA.w $70E2,x
	STA.b $18,x
	LDA.w $7182,x
	STA.b $78,x
	RTL

CODE_059E06:
	LDY.b $76,x
	CPY.b #$02
	BMI.b CODE_059E6E
	BNE.b CODE_059E36
	LDA.w $70E2,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_059E1B
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_059E5C
CODE_059E1B:
	LDA.b $18,x
	STA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $7CD6,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
	BRA.b CODE_059E5C

CODE_059E36:
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_059E43
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_059E5C
CODE_059E43:
	LDA.b $78,x
	STA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7CD8,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_059E5C:
	LDA.w $70E2,x
	SEC
	SBC.b $18,x
	STA.w $72C0,x
	LDA.w $7182,x
	SEC
	SBC.b $78,x
	STA.w $72C2,x
CODE_059E6E:
	RTS

CODE_059E6F:
	LDY.b $16,x
	LDA.w DATA_059DB4,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_059DB8,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$000A
	STA.b $0A
	STZ.b $02
	LDY.b #$00
	STY.b $09
	TYA
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	INY
	STY.b $06
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	RTS

CODE_059E99:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.b $16,x
	LDA.w #(FXDATA_548000+$0060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w DATA_059DB0,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $7722,x
	TAX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	CPY.b #$00
	BEQ.b CODE_059EDD
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_059EED

CODE_059EDD:
	LSR
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0882FA>>16
	LDA.w #FXCODE_0882FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_059EED:
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_059EF3:
	TYX
	LDY.w $7D36,x
	BMI.b CODE_059F10
	DEY
	BMI.b CODE_059F4F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_059F4F
	LDA.w $7D38,y
	BEQ.b CODE_059F4F
	TYX
	JSL.l CODE_03B25B
	BRA.b CODE_059F19

CODE_059F10:
	STZ.w $60B4
	STZ.w $60A8
	STZ.w $60AA
CODE_059F19:
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E7
	JSL.l CODE_03B56E
	LDY.b #$02
	STY.b $16,x
	LDA.w #$0021
	STA.w $7A96,x
	LDA.w #$0080
	STA.w $7A36,x
	LDA.w #$01FF
	STA.w $7A38,x
	LDA.w #!Define_YI_SoundID05_Powerup
	JSL.l CODE_0085D2
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	INC.b $76,x
CODE_059F4F:
	RTS

CODE_059F50:
	TYX
	LDY.w $7A96,x
	BNE.b CODE_059F9E
	LDA.w $7A36,x
	CLC
	ADC.w #$0004
	CMP.w #$0100
	BMI.b CODE_059F65
	LDA.w #$0100
CODE_059F65:
	STA.w $7A36,x
	LDA.w $7A38,x
	SEC
	SBC.w #$0008
	CMP.w #$0100
	BPL.b CODE_059F77
	LDA.w #$0100
CODE_059F77:
	STA.w $7A38,x
	ORA.w $7A36,x
	CMP.w #$0100
	BNE.b CODE_059F9E
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr095_BlueCheckeredBlock
	BNE.b CODE_059F90
	JSL.l CODE_04A6AE
	BRA.b CODE_059F96

CODE_059F90:
	JSL.l CODE_04A725
	INC.b $76,x
CODE_059F96:
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	INC.b $76,x
CODE_059F9E:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr054_UpsideDownPiranhaPlant_Init:
YI_NorSpr066_PiranhaPlant_Init:
;$059F9F
	INC.w $7402,x
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	JSL.l CODE_0EB8B7
	BNE.b CODE_059FBF
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,x
CODE_059FBF:
	RTL

;---------------------------------------------------------------------------

DATA_059FC0:
	dw CODE_05A11E
	dw CODE_05A169
	dw CODE_05A36C
	dw CODE_05A456
	dw CODE_05A5AF
	dw CODE_05A402
	dw CODE_05A5DA
	dw CODE_05A5DF
	dw CODE_05A5F1
	dw CODE_05A622
	dw CODE_05A65E
	dw CODE_05A6A6
	dw CODE_05A6BE
	dw CODE_05A6E8
	dw CODE_05A719
	dw CODE_05A738
	dw CODE_05A758

CODE_059FE2:
	dw $0010,$0000

YI_NorSpr054_UpsideDownPiranhaPlant_Main:
YI_NorSpr066_PiranhaPlant_Main:
;$059FE6
	LDA.b $18,x
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_059FF3
	ORA.w #$FF00
CODE_059FF3:
	STA.b $0C
	LDA.b $19,x
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_05A002
	ORA.w #$FF00
CODE_05A002:
	LDY.w $7042,x
	BPL.b CODE_05A00B
	CLC
	ADC.w #$0010
CODE_05A00B:
	STA.b $0E
	LDA.w $7402,x
	BNE.b CODE_05A015
	JSR.w CODE_05A769
CODE_05A015:
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_05A022
	LDY.w !EXRAM_YI_NorSprXXX_PiranhaPlant_GrabbedYoshiFlag|!EXRAMBankMirror,x
	BEQ.b CODE_05A02D
	BRA.b CODE_05A02A

CODE_05A022:
	CPY.b #$03
	BMI.b CODE_05A02D
	CPY.b #$06
	BPL.b CODE_05A02D
CODE_05A02A:
	STZ.w $611A
CODE_05A02D:
	LDA.w $7D96,x
	BEQ.b CODE_05A040
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr054_UpsideDownPiranhaPlant
	BNE.b CODE_05A040
	LDA.w #$8840
	STA.w $6FA2,x
CODE_05A040:
	LDY.b $76,x
	CPY.b #$10
	BEQ.b CODE_05A04A
	JSL.l CODE_03AF23
CODE_05A04A:
	JSL.l CODE_03A2C7
	BCC.b CODE_05A07B
	LDY.b $76,x
	CPY.b #$08
	BPL.b CODE_05A07B
	CPY.b #$02
	BMI.b CODE_05A076
	CPY.b #$06
	BPL.b CODE_05A09F
	CPY.b #$04
	BNE.b CODE_05A067
	LDY.w !EXRAM_YI_NorSprXXX_PiranhaPlant_GrabbedYoshiFlag|!EXRAMBankMirror,x
	BEQ.b CODE_05A076
CODE_05A067:
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0070
	STA.w $61D6
	STZ.w $0D94
	STZ.w $61B6
CODE_05A076:
	JML.l CODE_03A31E

CODE_05A07A:
	RTL

CODE_05A07B:
	LDY.b $76,x
	CPY.b #$08
	BMI.b CODE_05A09F
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05A0A2
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05A0A2
	LDA.w $7D38,y
	BEQ.b CODE_05A0A2
	TYX
	JSL.l CODE_03B25B
	LDY.b #$10
	STY.b $76,x
	BRA.b CODE_05A0A2

CODE_05A09F:
	JSR.w CODE_05A0C3
CODE_05A0A2:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_059FC0,x)
	LDA.w #$0008
	STA.w $7B56,x
	STA.w $7B58,x
	LDA.w $7402,x
	BNE.b CODE_05A0C2
	LDA.b $0C
	STA.w $7B56,x
	LDA.b $0E
	STA.w $7B58,x
CODE_05A0C2:
	RTL

CODE_05A0C3:
	LDY.w $7D36,x
	BNE.b CODE_05A11D
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_05A11D
	LDA.w $7BB6,y
	CLC
	ADC.w #$0006
	STA.b $00
	ASL
	STA.b $02
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $7CD6,y
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_05A11D
	LDA.w $7BB8,y
	CLC
	ADC.w #$0006
	STA.b $00
	ASL
	STA.b $02
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_05A11D
	INY
	TYA
	STA.w $7D36,x
CODE_05A11D:
	RTS

CODE_05A11E:
	TYX
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
	LDA.w $7A98,x
	BNE.b CODE_05A168
	LDA.w $7C16,x
	CLC
	ADC.w #$0070
	CMP.w #$00E0
	BCS.b CODE_05A168
	LDA.w $7C18,x
	CLC
	ADC.w #$0070
	CMP.w #$00E0
	BCS.b CODE_05A168
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerForm10_SuperBabyMario
	BEQ.b CODE_05A168
	JSL.l CODE_03AD74
	BCC.b CODE_05A168
	LDA.w #$84A8
	STA.w $6FA0,x							; Todo: Is this a pointer?
	LDA.w #$3D51
	STA.w $7040,x
	LDA.w #$0055
	STA.w $7A36,x
	INC.b $76,x
CODE_05A168:
	RTS

CODE_05A169:
	TYX
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05A19B
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05A19B
	LDA.w $7D38,y
	BEQ.b CODE_05A19B
	JSR.w CODE_05A96C
	LDA.w $7A38,x
	LDY.w $7400,x
	BEQ.b CODE_05A192
	EOR.w #$FFFF
	SEC
	ADC.w #$0100
	AND.w #$01FE
CODE_05A192:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0206
	STA.b $76,x
	RTS

CODE_05A19B:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_05A1C0
	STZ.w $7402,x
	JSR.w CODE_05A24A
	JSR.w CODE_05A800
	JSR.w CODE_05A336
	LDY.w !RAM_YI_Level_FreeMovementFlag
	BNE.b CODE_05A1C0
	LDY.w $7AF8,x
	BEQ.b CODE_05A1C1
CODE_05A1C0:
	RTS

CODE_05A1C1:
	LDA.w $6120
	CLC
	ADC.w #$0004
	ASL
	STA.b $04
	LSR
	CLC
	ADC.w $70E2,x
	CLC
	ADC.b $0C
	SEC
	SBC.w $611C
	STA.b $00
	CMP.b $04
	BCS.b CODE_05A1C0
	LDA.w $6122
	CLC
	ADC.w #$0004
	ASL
	STA.b $04
	LSR
	CLC
	ADC.w $7182,x
	CLC
	ADC.b $0E
	SEC
	SBC.w $611E
	STA.b $02
	CMP.b $04
	BCS.b CODE_05A1C0
	LDA.w $7A36,x
	SEC
	SBC.w #$0100
	ORA.w $61D6
	ORA.w $0D94
	BNE.b CODE_05A249
	JSL.l CODE_03BFF7
	LDA.w #$A041
	STA.w $6FA2,x
	LDA.w #$3D01
	STA.w $7040,x
	INC.w $0D94
	LDY.w $7E48
	BMI.b CODE_05A224
	TYA
	STA.w $0D96
CODE_05A224:
	LDA.b $00
	STA.w !EXRAM_YI_NorSprXXX_PiranhaPlant_GrabbedYoshiFlag|!EXRAMBankMirror,x
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_04F74A
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0021
	STA.w $60BE
	LDA.w #$0202
	STA.b $76,x
	JSR.w CODE_05A800
	JSR.w CODE_05A352
CODE_05A249:
	RTS

CODE_05A24A:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_05A27F
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerForm10_SuperBabyMario
	BEQ.b CODE_05A27F
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0070
	CMP.w #$00E0
	BCS.b CODE_05A27F
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0070
	CMP.w #$00E0
	BCC.b CODE_05A2B8
CODE_05A27F:
	LDA.w $7A36,x
	SEC
	SBC.w #$0020
	CMP.w #$0055
	BPL.b CODE_05A2C7
	JSL.l CODE_03AEFD
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_05A29D
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A98,x
CODE_05A29D:
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$BE00
	STA.w $6FA0,x
	LDA.w #$3DD1
	STA.w $7040,x
	DEC.b $76,x
	LDA.w #$0055
	STA.w $7A36,x
	RTS

CODE_05A2B8:
	LDA.w $7A36,x
	CLC
	ADC.w #$0040
	CMP.w #$0100
	BMI.b CODE_05A2C7
	LDA.w #$0100
CODE_05A2C7:
	STA.w $7A36,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611E
	LDY.w $7042,x
	BPL.b CODE_05A2EC
	EOR.w #$FFFF
	INC
CODE_05A2EC:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0080
	CMP.w #$0100
	BCS.b CODE_05A31A
	STZ.w $7400,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w #$0100
	BMI.b CODE_05A314
	LDA.w #$0100
CODE_05A314:
	CLC
	ADC.w #$0100
	BRA.b CODE_05A32F

CODE_05A31A:
	LDA.w #$0002
	STA.w $7400,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w #$0080
	BMI.b CODE_05A32B
	LDA.w #$0000
CODE_05A32B:
	EOR.w #$FFFF
	INC
CODE_05A32F:
	AND.w #$01FE
	STA.w $7A38,x
	RTS

CODE_05A336:
	LDA.w $7A96,x
	BNE.b CODE_05A352
	LDA.w #$0008
	STA.w $7A96,x
	LDA.b $77,x
	EOR.w #$0002
	STA.b $77,x
	TAY
	BEQ.b CODE_05A352
	LDA.w #!Define_YI_SoundID39_PiranhaPlantMunch
	JSL.l CODE_0085D2
CODE_05A352:
	LDA.w $6022
	STA.b $0C
	TAY
	STY.b $18,x
	LDA.w $6020
	TAY
	STY.b $19,x
	LDY.w $7042,x
	BPL.b CODE_05A369
	CLC
	ADC.w #$0010
CODE_05A369:
	STA.b $0E
	RTS

CODE_05A36C:
	TYX
	STX.w $61B6
	LDA.w $70E2,x
	CLC
	ADC.b $0C
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.b $0E
	STA.b $02
	LDA.w !EXRAM_YI_NorSprXXX_PiranhaPlant_GrabbedYoshiFlag|!EXRAMBankMirror,x
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $06
	JSL.l CODE_049B42
	PHA
	LDA.b $04
	STA.w !EXRAM_YI_NorSprXXX_PiranhaPlant_GrabbedYoshiFlag|!EXRAMBankMirror,x
	LDA.b $06
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.b $08
	SEC
	SBC.w $611C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.b $0A
	SEC
	SBC.w $611E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	PLA
	BNE.b CODE_05A3ED
	STZ.w !EXRAM_YI_NorSprXXX_PiranhaPlant_GrabbedYoshiFlag|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.b $76,x
	LDA.w #$0020
	STA.b $16,x
	STZ.w $611A
	LDY.w $7E48
	BMI.b CODE_05A3E7
	LDA.w #$00FF
	STA.w $74A2,y
	DEC.b $76,x
	DEC.b $76,x
	INC.w !EXRAM_YI_NorSprXXX_PiranhaPlant_GrabbedYoshiFlag|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $16,x
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
CODE_05A3E7:
	JSR.w CODE_05A800
	JSR.w CODE_05A352
CODE_05A3ED:
	RTS

DATA_05A3EE:
	dw $0008,$FFF8

DATA_05A3F2:
	dw $0110,$0100

DATA_05A3F6:
	dw $FC80,$0380

DATA_05A3FA:
	dw $FC00,$0400

DATA_05A3FE:
	dw $0004,$FFFC

CODE_05A402:
	TYX
	LDA.w $7042,x
	AND.w #$FFE0
	ORA.w #$0024
	STA.w $7042,x
	LDA.w $7A36,x
	CMP.w #$0100
	BMI.b CODE_05A464
	LDA.w $7042,x
	AND.w #$FFE0
	ORA.w #$0022
	STA.w $7042,x
	LDA.w $0035
	AND.w #$CFF0
	CMP.w $0D98
	BEQ.b CODE_05A464
	STA.w $0D98
	CMP.w #$0000
	BEQ.b CODE_05A464
	LDA.b $16,x
	CMP.w #$0005
	BMI.b CODE_05A464
	SEC
	SBC.w #$0010
	CMP.w #$0004
	BPL.b CODE_05A449
	LDA.w #$0004
CODE_05A449:
	AND.w #$FFFC
	STA.b $16,x
	LDA.w #$00C0
	STA.w $7A36,x
	BRA.b CODE_05A464

CODE_05A456:
	TYX
	LDY.w $7E48
	CPY.b #$00
	BMI.b CODE_05A464
	LDA.w #$00FF
	STA.w $74A2,y
CODE_05A464:
	LDY.b #$00
	LDA.w $7A38,x
	BEQ.b CODE_05A47C
	CMP.w #$0100
	BPL.b CODE_05A472
	INY
	INY
CODE_05A472:
	CLC
	ADC.w DATA_05A3FE,y
	AND.w #$01FC
	STA.w $7A38,x
CODE_05A47C:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BEQ.b CODE_05A48E
	JMP.w CODE_05A58C

CODE_05A48E:
	LDA.b $16,x
	AND.w #$0002
	TAY
	LDA.w $7A36,x
	CLC
	ADC.w DATA_05A3EE,y
	CMP.w DATA_05A3F2,y
	BEQ.b CODE_05A4A3
	JMP.w CODE_05A583

CODE_05A4A3:
	DEC.b $16,x
	DEC.b $16,x
	BEQ.b CODE_05A4AC
	JMP.w CODE_05A580

CODE_05A4AC:
	PHY
	LDY.b $76,x
	CPY.b #$05
	BNE.b CODE_05A4B6
	JMP.w CODE_05A540

CODE_05A4B6:
	LDY.w $7400,x
	LDA.w DATA_05A3FA,y
	STA.b $00
	LDY.w $7E48
	LDA.w $70E2,x
	CLC
	ADC.b $0C
	SEC
	SBC.w #$0008
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $0E
	SEC
	SBC.w #$0008
	STA.w $7182,y
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CPY.b #$00
	BNE.b CODE_05A520
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.b $16
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w #$0010
	STA.w $7AF8
	LDA.w $61B2
	AND.w #$0FFF
	STA.w $61B2
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0030
	CLC
	ADC.w $609C
	CLC
	ADC.w #$0030
	CMP.w #$8000
	ROR
	STA.w $0DB2
	BRA.b CODE_05A523

CODE_05A520:
	STZ.w $0390
CODE_05A523:
	PHX
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	ASL
	TAX
	SEP.b #$20
	LDA.l FXDATA_0A9F1A,x
	STA.w $74A2,y
	REP.b #$20
	PLX
	LDA.w #$FFFF
	STA.w $0D96
	STA.w $7E48
	BRA.b CODE_05A56D

CODE_05A540:
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDY.w $7400,x
	LDA.w DATA_05A3F6,y
	STA.w $60A8
	STA.w $60B4
	LDA.w #$0070
	STA.w $61D6
	STZ.w $0D94
	STZ.w $61B6
	LDA.w #$0060
	STA.w $7AF8,x
	LDA.w #$8841
	STA.w $6FA2,x
	LDA.w #$3D51
	STA.w $7040,x
CODE_05A56D:
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0204
	STA.b $76,x
	PLY
CODE_05A580:
	LDA.w DATA_05A3F2,y
CODE_05A583:
	STA.w $7A36,x
	JSR.w CODE_05A800
	JSR.w CODE_05A352
CODE_05A58C:
	LDA.w $70E2,x
	CLC
	ADC.b $0C
	SEC
	SBC.w $611C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	CLC
	ADC.b $0E
	SEC
	SBC.w $611E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	RTS

CODE_05A5AF:
	TYX
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_05A5B8
	JSR.w CODE_05A58C
CODE_05A5B8:
	LDA.w $7A96,x
	BNE.b CODE_05A5D9
	CPY.b #$00
	BNE.b CODE_05A5C6
	LDY.b #$01
	STY.b $76,x
	RTS

CODE_05A5C6:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.b $16,x
	LDA.w #$0005
	STA.b $76,x
	JSR.w CODE_05A800
	JSR.w CODE_05A352
CODE_05A5D9:
	RTS

CODE_05A5DA:
	JSR.w CODE_05AAFC
	BRA.b CODE_05A5E8

CODE_05A5DF:
	PLA
	STA.b $00
	JSR.w CODE_05AB77
	LDA.b $00
	PHA
CODE_05A5E8:
	JSR.w CODE_05A990
	JSR.w CODE_05A800
	JMP.w CODE_05A352

CODE_05A5F1:
	TYX
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$0300
	BMI.b CODE_05A621
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #$00DD
	JSL.l CODE_03A364
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0026
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0042
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STZ.w $60A8
	STA.w $60B4
	INC.b $76,x
CODE_05A621:
	RTS

CODE_05A622:
	TYX
	LDY.w $105A
	BEQ.b CODE_05A65D
	JSL.l CODE_03AD74
	BCC.b CODE_05A65D
	LDA.w #$84A8
	STA.w $6FA0,x
	LDA.w #$3D51
	STA.w $7040,x
	LDA.w #$0055
	STA.w $7A36,x
	LDA.w #$0040
	STA.w $7AF6,x
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
	INC.b $76,x
	LDA.w #$0048
	JSL.l CODE_03A34C
	BCC.b CODE_05A65D
	LDA.w #$0010
	STA.w $70E2,y
CODE_05A65D:
	RTS

CODE_05A65E:
	TYX
	LDY.w !RAM_YI_Level_BossHasBeenVisitedBeforeFlagLo
	BEQ.b CODE_05A669
	LDA.w $1015
	BNE.b CODE_05A66F
CODE_05A669:
	LDA.l $704070
	BEQ.b CODE_05A67F
CODE_05A66F:
	STA.w $7A96,x
	LDY.b #$00
	STY.b $77,x
	JSR.w CODE_05A800
	JSR.w CODE_05A336
	INC.b $76,x
	RTS

CODE_05A67F:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_05A69A
	STZ.w $7402,x
	JSR.w CODE_05A2B8
	JSR.w CODE_05A800
	JSR.w CODE_05A336
CODE_05A69A:
	LDA.w $7AF6,x
	BNE.b CODE_05A6A5
	INC.w $1015
	DEC.w $7AF6,x
CODE_05A6A5:
	RTS

CODE_05A6A6:
	TYX
	LDA.w $1015
	BPL.b CODE_05A6BD
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w #$FFFF
	STA.w $7A96,x
	STZ.w $1015
	INC.b $76,x
CODE_05A6BD:
	RTS

CODE_05A6BE:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_05A6E7
	LDA.w $7A38,x
	CLC
	ADC.w #$0002
	AND.w #$01FE
	CMP.w #$0030
	BNE.b CODE_05A6DE
	LDA.w #$0020
	STA.w $7AF6,x
	INC.b $76,x
	LDA.w #$0030
CODE_05A6DE:
	STA.w $7A38,x
	JSR.w CODE_05A800
	JSR.w CODE_05A336
CODE_05A6E7:
	RTS

CODE_05A6E8:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_05A6E7
	LDA.w $7A38,x
	SEC
	SBC.w #$0010
	AND.w #$01FE
	CMP.w #$01D0
	BNE.b CODE_05A6DE
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$8840
	STA.w $6FA2,x
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.b $78,x
	INC.b $76,x
	LDA.w #$01D0
	BRA.b CODE_05A6DE

CODE_05A719:
	TYX
	LDA.w $7182,x
	CMP.b $78,x
	BMI.b CODE_05A727
	LDA.w #$8841
	STA.w $6FA2,x
CODE_05A727:
	LDA.w $7682,x
	CMP.w #$0100
	BMI.b CODE_05A737
	LDA.w #$0080
	STA.w $7AF6,x
	INC.b $76,x
CODE_05A737:
	RTS

CODE_05A738:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_05A746
	INC.w $105A
	PLA
	JML.l CODE_03A31E

CODE_05A746:
	CMP.w #$0030
	BNE.b CODE_05A757
	LDA.w #$0260
	STA.w $61C6
	LDA.w #$01C0
	STA.w $61C8
CODE_05A757:
	RTS

CODE_05A758:
	TYX
	LDA.w $7042,x
	EOR.w #$0002
	STA.w $7042,x
	RTS

DATA_05A763:
	dw $0010,$FFF0,$0000

CODE_05A769:
	JSL.l CODE_03AA52
	LDA.w $7042,x
	AND.w #$0080
	ASL
	ASL
	XBA
	TAY
	LDA.w DATA_05A763,y
	STA.b $02
	LDA.w DATA_05A763+$02,y
	STA.b $04
	LDY.w $7400,x
	LDA.w DATA_05A763,y
	STA.b $00
	LDA.w DATA_05A763+$02,y
	REP.b #$10
	LDY.w $7362,x
	CLC
	ADC.b $0C
	CLC
	ADC.w $7680,x
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.b $00
	STA.w $6008,y
	STA.w $6018,y
	LDA.b $0E
	CLC
	ADC.b $04
	CLC
	ADC.w $7682,x
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.b $02
	STA.w $6012,y
	STA.w $601A,y
	LDA.b $76,x
	CMP.w #$0006
	BMI.b CODE_05A7D0
	LDA.w $1015
	BMI.b CODE_05A7F9
	CMP.w #$0002
	BPL.b CODE_05A7F9
CODE_05A7D0:
	LDA.w $7D96,x
	BNE.b CODE_05A7F9
	LDA.w $6024,y
	AND.w #$F1FF
	ORA.w #$0200
	STA.w $6024,y
	LDA.w $602C,y
	AND.w #$F1FF
	ORA.w #$0200
	STA.w $602C,y
	LDA.w $6034,y
	AND.w #$F1FF
	ORA.w #$0200
	STA.w $6034,y
CODE_05A7F9:
	SEP.b #$10
	RTS

DATA_05A7FC:
	dw FXDATA_540000+$60E1,FXDATA_540000+$60C1

CODE_05A800:
	LDA.w $7402,x
	BNE.b CODE_05A87B
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	TAY
	BMI.b CODE_05A813
	CLC
	ADC.w #$0100
CODE_05A813:
	SEC
	SBC.w #$00C0
	LSR
	LSR
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDY.b $77,x
	LDA.w DATA_05A7FC,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$60C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0C00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D5F1>>16
	LDA.w #FXCODE_08D5F1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDY.w $7042,x
	BPL.b CODE_05A87B
	LDA.w $6020
	EOR.w #$FFFF
	INC
	STA.w $6020
CODE_05A87B:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr09F_PtooiePiranhaPlant_Init:
;$05A87C
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$01C0
	STA.w $7A38,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSR.w CODE_05A9F0
	LDA.b $16,x
	LDY.w $7400,x
	BEQ.b CODE_05A8A0
	CLC
	ADC.w #$0008
CODE_05A8A0:
	TAY
	LDA.w DATA_05AA10,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSR.w CODE_05A800
	RTL

;---------------------------------------------------------------------------

DATA_05A8AB:
	dw CODE_05A9CB
	dw CODE_05AA20
	dw CODE_05AAFC
	dw CODE_05AB77

YI_NorSpr09F_PtooiePiranhaPlant_Main:
;$05A8B3
	LDY.b $18,x
	TYA
	CPY.b #$00
	BPL.b CODE_05A8BD
	ORA.w #$FF00
CODE_05A8BD:
	STA.b $0C
	STA.w $7B56,x
	LDY.b $19,x
	TYA
	CPY.b #$00
	BPL.b CODE_05A8CC
	ORA.w #$FF00
CODE_05A8CC:
	STA.b $0E
	STA.w $7B58,x
	JSR.w CODE_05A769
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05A8AB,x)
	JSR.w CODE_05A94C
	JSR.w CODE_05A990
	JSR.w CODE_05A800
	LDY.w $6022
	STY.b $18,x
	LDY.w $6020
	STY.b $19,x
	RTL

CODE_05A8F4:
	LDA.w $7C16,x
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_05A916:
	STA.b $00
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_05A929
	LDA.b $00
	BRA.b CODE_05A945

CODE_05A929:
	BPL.b CODE_05A939
	CMP.w #$FF00
	BMI.b CODE_05A93E
CODE_05A930:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w #$0004
	BRA.b CODE_05A945

CODE_05A939:
	CMP.w #$0100
	BPL.b CODE_05A930
CODE_05A93E:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0004
CODE_05A945:
	AND.w #$01FE
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

CODE_05A94C:
	LDY.b $76,x
	CPY.b #$02
	BPL.b CODE_05A98F
	LDY.w $7D36,x
	BEQ.b CODE_05A98F
	DEY
	BPL.b CODE_05A95F
	JSL.l CODE_03A858
	RTS

CODE_05A95F:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05A98F
	LDA.w $7D38,y
	BEQ.b CODE_05A98F
CODE_05A96C:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	PHP
	TYX
	JSL.l CODE_03B25B
	LDA.w #!Define_YI_SoundID0B_ShellHit1
	JSL.l CODE_0085D2
	LDY.b #$00
	PLP
	BPL.b CODE_05A983
	INY
	INY
CODE_05A983:
	STY.b $78,x
	LDA.w #$0020
	STA.w $7AF8,x
	LDY.b #$02
	STY.b $76,x
CODE_05A98F:
	RTS

CODE_05A990:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	AND.w #$01FE
	CMP.w #$00E8
	BMI.b CODE_05A9B5
	CMP.w #$0118
	BMI.b CODE_05A9C2
	INY
	INY
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w #$0100
	EOR.w #$FFFF
	INC
	BRA.b CODE_05A9B8

CODE_05A9B5:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05A9B8:
	AND.w #$01FE
	STA.w $7A38,x
	TYA
	STA.w $7400,x
CODE_05A9C2:
	RTS

DATA_05A9C3:
	dw $0004,$FFFC

DATA_05A9C7:
	dw $0100,$00E0

CODE_05A9CB:
	TYX
	LDA.w $7AF8,x
	BNE.b CODE_05AA0F
	LDA.b $16,x
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_05A9C3,y
	STA.b $00
	CLC
	ADC.w $7A36,x
	STA.w $7A36,x
	SEC
	SBC.w DATA_05A9C7,y
	EOR.b $00
	BMI.b CODE_05AA0C
	DEC.b $16,x
	BPL.b CODE_05AA0C
CODE_05A9F0:
	LDA.w #$0010
	STA.w $7AF8,x
	LDA.w #$0004
	STA.b $16,x
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_05AA07
	LDY.b #$06
	STY.b $16,x
CODE_05AA07:
	LDA.w #$0001
	STA.b $76,x
CODE_05AA0C:
	JSR.w CODE_05A8F4
CODE_05AA0F:
	RTS

DATA_05AA10:
	dw $0190,$01A8,$01A8,$0198,$0170,$0158,$0158,$0168

CODE_05AA20:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05AA2A
	LDY.b #$00
	STY.b $77,x
CODE_05AA2A:
	LDA.w $7AF8,x
	BNE.b CODE_05AA0F
	LDA.b $16,x
	BPL.b CODE_05AA41
	LDA.w #$0010
	STA.w $7AF8,x
	LDA.w #$000B
	STA.b $16,x
	STZ.b $76,x
	RTS

CODE_05AA41:
	LDY.w $7400,x
	BEQ.b CODE_05AA4A
	CLC
	ADC.w #$0008
CODE_05AA4A:
	TAY
	LDA.w DATA_05AA10,y
	PHA
	PHY
	JSR.w CODE_05A916
	PLY
	PLA
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_05AA0F
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_05AA64
	STZ.b $16,x
CODE_05AA64:
	DEC.b $16,x
	DEC.b $16,x
	LDA.w #$0010
	STA.w $7A98,x
	LDA.w #$0040
	STA.w $7AF8,x
	LDY.b #$02
	STY.b $77,x
	LDA.w #$00F9
	JSL.l CODE_03A34C
	BCS.b CODE_05AA87
	LDA.w #$FFFF
	STA.b $16,x
	RTS

CODE_05AA87:
	LDA.w $70E2,x
	CLC
	ADC.b $0C
	SEC
	SBC.w #$0008
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $0E
	SEC
	SBC.w #$0008
	STA.w $7182,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0400
	STA.w $75E2,y
	PHY
	LDA.w #$FA00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	PLY
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	RTS

DATA_05AAE0:
	dw $FFF0,$FFF0,$FFFC,$FFFC

DATA_05AAE8:
	dw $FFF0,$0010,$FFFC,$0004

DATA_05AAF0:
	dw $0140,$01C0,$0100,$0000

DATA_05AAF8:
	db $22,$22,$24,$20

CODE_05AAFC:
	TYX
	LDA.w $7AF8,x
	BNE.b CODE_05AB33
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr09F_PtooiePiranhaPlant
	BNE.b CODE_05AB1B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_05AAF8-$01,y
	AND.w #$00FF
	STA.w $7042,x
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_05AB25
CODE_05AB1B:
	LDA.w #!Define_YI_SoundID25_DyingPiranha
	JSL.l CODE_0085D2
	INC.b $76,x
	RTS

CODE_05AB25:
	LDA.w #$0010
	STA.w $7AF8,x
	LDA.w #$000B
	STA.b $16,x
	STZ.b $76,x
	RTS

CODE_05AB33:
	LDY.b $78,x
	BMI.b CODE_05AB53
	LDA.w DATA_05AAE0,y
	AND.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_05AAE8,y
	AND.w #$01FE
	CMP.w DATA_05AAF0,y
	BNE.b CODE_05AB50
	LDA.w DATA_05AAF0,y
	LDY.b #$FF
	STY.b $78,x
CODE_05AB50:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05AB53:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr09F_PtooiePiranhaPlant
	BNE.b CODE_05AB76
	LDA.w $7974
	BIT.w #$0003
	BNE.b CODE_05AB76
	AND.w #$0004
	LSR
	LSR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_05AAF8-$01,y
	AND.w #$00FF
	STA.w $7042,x
CODE_05AB76:
	RTS

CODE_05AB77:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0004
	CMP.w #$0030
	BPL.b CODE_05AB92
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	PLA
	JML.l CODE_03B25B

CODE_05AB92:
	STA.w $7A36,x
	LDA.w $7A98,x
	BNE.b CODE_05ABA9
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7042,x
	EOR.w #$000E
	STA.w $7042,x
CODE_05ABA9:
	RTS

;---------------------------------------------------------------------------

DATA_05ABAA:
	dw $0030,$FFD0

DATA_05ABAE:
	dw $FEC0,$0140

YI_NorSpr0E7_Burt_Init:
;$05ABB2
	JSL.l CODE_03AE60
	LDA.w #$0003
	STA.w $7A38,x
	LDA.w #$0100
	STA.w $7A36,x
	SEP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05ABD6
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_05ABFA
CODE_05ABD6:
	LDA.w #$03FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.b #$0C
	STY.b $76,x
	LDA.w #$0034
	STA.w $7542,x
	LDA.w #$0340
	STA.w $75E2,x
	LDA.w #$0002
	STA.w $0EED
	AND.b $78,x
	STA.b $78,x
	JSR.w CODE_05B035
	RTL

CODE_05ABFA:
	LDY.w $7400,x
	LDA.w DATA_05ABAA,y
	STA.b $00
	LDA.w DATA_05ABAE,y
	STA.b $04
	LDA.w #$00E7
	JSL.l CODE_03A364
	BCC.b CODE_05AC1F
	STY.b $02
	TYX
	JSL.l CODE_03AD74
	BCS.b CODE_05AC23
	JSL.l CODE_03A31E
	LDX.b $12
CODE_05AC1F:
	JML.l CODE_03A31E

CODE_05AC23:
	LDX.b $12
	LDY.b $02
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $7400,x
	STA.w $7400,y
	TYA
	ORA.w #$0300
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TXA
	ORA.w #$0300
CODE_05AC46:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	TXA
	XBA
	ORA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	INC
	STA.w $7A38,y
	LDA.w #$0100
	STA.w $7A36,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0140
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.w $74A0,x
	STA.w $74A0,y
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	REP.b #$20
	TYX
	JSR.w CODE_05B035
	LDX.b $12
	STZ.w $0EED
	JSR.w CODE_05B035
	RTL

;---------------------------------------------------------------------------

DATA_05AC8E:
	dw CODE_05B07C
	dw CODE_05B0CE
	dw CODE_05B152
	dw CODE_05B16A
	dw CODE_05B182
	dw CODE_05B18B
	dw CODE_0580C2
	dw CODE_05B1A9
	dw CODE_05B205
	dw CODE_05B257
	dw CODE_05B2EA
	dw CODE_05B34F
	dw CODE_05B3AB
	dw CODE_05B3E3
	dw CODE_05B182
	dw CODE_05B18B

YI_NorSpr0E7_Burt_Main:
;$05ACAE
	LDY.w $74A2,x
	BMI.b CODE_05ACB6
	JSR.w CODE_05AD19
CODE_05ACB6:
	JSR.w CODE_05AE61
	JSL.l CODE_03AF23
	LDA.w #$0018
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_0B86EC>>16
	LDA.w #FXCODE_0B86EC
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $0E
	JSR.w CODE_05ADA6
	JSR.w CODE_05AF09
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05AC8E,x)
	JSR.w CODE_05B035
CODE_05AD00:
	RTL

CODE_05AD01:
	CMP.w #$00E7
	BNE.b CODE_05AD00
	JSR.w CODE_05AE7E
	JML.l CODE_03A32E

DATA_05AD0D:
	dw $009E,$002E,$002F

DATA_05AD13:
	dw $FFFF,$0001,$0003

CODE_05AD19:
	LDY.b #$00
	LDA.b $76,x
	CMP.w #$000A
	BEQ.b CODE_05AD3E
	CMP.w #$000B
	BEQ.b CODE_05AD3E
	LDA.w $7860,x
	LSR
	BCS.b CODE_05AD50
	LDA.b $76,x
	CMP.w #$0006
	BEQ.b CODE_05AD50
	CMP.w #$0008
	BEQ.b CODE_05AD3E
	CMP.w #$000D
	BNE.b CODE_05AD47
CODE_05AD3E:
	LDA.w $7AF6,x
	BEQ.b CODE_05AD50
	INY
	INY
	BRA.b CODE_05AD50

CODE_05AD47:
	INY
	INY
	LDA.w $7AF6,x
	BNE.b CODE_05AD50
	INY
	INY
CODE_05AD50:
	LDA.w DATA_05AD0D,y
	STA.b $00
	LDA.w DATA_05AD13,y
	STA.w $7A38,x
	REP.b #$10
	LDY.w $7362,x
	BMI.b CODE_05ADA3
	LDA.w $6004,y
	AND.w #$FF00
	ORA.b $00
	STA.w $6004,y
	LDA.w $600C,y
	AND.w #$FF00
	ORA.b $00
	STA.w $600C,y
	TYA
	CLC
	ADC.w #$0010
	TAY
	PHY
	JSL.l CODE_03AA60
	REP.b #$10
	PLY
	LDA.w #$0004
	STA.b $02
	LDA.w $7A38,x
	STA.b $00
CODE_05AD90:
	LDA.w $6002,y
	SEC
	SBC.b $00
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $02
	BNE.b CODE_05AD90
CODE_05ADA3:
	SEP.b #$10
CODE_05ADA5:
	RTS

CODE_05ADA6:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_05ADB3:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_05ADA5
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05ADA5
	LDA.w $7D38,y
	BNE.b CODE_05ADD2
CODE_05ADC7:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_05ADB3

CODE_05ADD2:
	LDA.w $6FA2,y
	AND.w #$4000
	BNE.b CODE_05ADC7
	TYX
	JSL.l CODE_03B25B
CODE_05ADDF:
	JSL.l CODE_05AE0B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BMI.b CODE_05ADF1
	SEP.b #$20
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,y
	REP.b #$20
CODE_05ADF1:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	PLA
	JML.l CODE_03B273

DATA_05ADFF:
	dw $0000,$FE6B,$0195

DATA_05AE05:
	dw $FE00,$FE11,$FE11

CODE_05AE0B:
	PHB
	PHK
	PLB
	LDA.w !RAM_YI_Level_StarTimerLo
	STA.b $06
	LDY.b #$06
CODE_05AE15:
	TYA
	STA.b $00
	LDA.w DATA_05ADFF-$02,y
	STA.b $02
	LDA.w DATA_05AE05-$02,y
	STA.b $04
	LDA.b $06
	CLC
	ADC.w #$000A
	STA.b $06
	CMP.w #!Define_YI_Level_SoftMaxStarTimerThreshold+$0A
	BMI.b CODE_05AE34
	LDA.w #$0115
	BRA.b CODE_05AE37

CODE_05AE34:
	LDA.w #$01A2
CODE_05AE37:
	JSL.l CODE_03A34C
	BCC.b CODE_05AE5F
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0011
	STA.w $7AF6,y
	LDY.b $00
	DEY
	DEY
	BNE.b CODE_05AE15
CODE_05AE5F:
	PLB
	RTL

CODE_05AE61:
	LDA.w $7D96,x
	BEQ.b CODE_05AE71
	STZ.w $6FA2,x
	LDA.w #$3155
	STA.w $7040,x
	BRA.b CODE_05AE7E

CODE_05AE71:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_05AED4
	CMP.w #$0008
	BEQ.b CODE_05AE95
CODE_05AE7E:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_05AE84
	RTS

CODE_05AE84:
	SEP.b #$20
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,y
	STA.w $74A0,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	REP.b #$20
	BRA.b CODE_05AE9A

CODE_05AE95:
	LDA.w $75E0,x
	BNE.b CODE_05AED2
CODE_05AE9A:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05AED2
	SEP.b #$20
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$20
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	EOR.w #$0002
	STA.w $0EED
	LDA.w #$0034
	STA.w $7542,y
	LDA.w #$0340
	STA.w $75E2,y
	STA.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	AND.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
CODE_05AED2:
	PLA
	RTL

CODE_05AED4:
	JSL.l CODE_03A2B0
	BCC.b CODE_05AF04
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05AEEA
	TYX
	JSL.l CODE_03A2B0
	BCC.b CODE_05AF02
	JSL.l CODE_03A31E
CODE_05AEEA:
	LDX.b $12
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BMI.b CODE_05AEFD
	SEP.b #$20
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,y
	STA.w $74A0,x
	REP.b #$20
CODE_05AEFD:
	PLA
	JML.l CODE_03A31E

CODE_05AF02:
	LDX.b $12
CODE_05AF04:
	RTS

DATA_05AF05:
	dw $0100,$FF00

CODE_05AF09:
	LDY.w $0D94
	BNE.b CODE_05AF68
	CPX.w $61B6
	BNE.b CODE_05AF78
	LDA.b $78,x
	AND.w #$0002
	BEQ.b CODE_05AF78
	LDA.w $60FC
	BIT.w #$0007
	BNE.b CODE_05AF62
	LDY.w $7223,x
	BPL.b CODE_05AF46
	AND.w #$0018
	BEQ.b CODE_05AF46
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	LDA.w $7CD8,x
	SEC
	SBC.w $72C2,x
	STA.w $7CD8,x
	STZ.w $72C2,x
CODE_05AF46:
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $611C
	SEC
	SBC.w $7CD6,x
	CMP.b $00
	BCS.b CODE_05AF62
	LDY.w $60AB
	BPL.b CODE_05AFD1
CODE_05AF62:
	LDA.w #$0010
	STA.w $7AF8,x
CODE_05AF68:
	LDA.b $78,x
	AND.w #$0001
	STA.b $78,x
	CPX.w $61B6
	BNE.b CODE_05AF77
	STZ.w $61B6
CODE_05AF77:
	RTS

CODE_05AF78:
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $611C
	SEC
	SBC.w $7CD6,x
	CMP.b $00
	BCS.b CODE_05AF68
	LDA.b $0E
	SEC
	SBC.w $6122
	SEC
	SBC.w $611E
	BPL.b CODE_05AF68
	CMP.w #$FFF0
	BCS.b CODE_05AFA3
CODE_05AFA0:
	JMP.w CODE_05B02B

CODE_05AFA3:
	LDY.w $60AB
	BMI.b CODE_05AFA0
	LDA.w $60FC
	BIT.w #$0018
	BEQ.b CODE_05AFB5
	AND.w #$01E0
	BEQ.b CODE_05B02B
CODE_05AFB5:
	LDY.w $60D4
	BEQ.b CODE_05AFBD
	JMP.w CODE_05ADDF

CODE_05AFBD:
	LDY.w $61B6
	BEQ.b CODE_05AFC7
	CPX.w $61B6
	BNE.b CODE_05B02B
CODE_05AFC7:
	STX.w $61B6
	LDA.b $78,x
	ORA.w #$0002
	STA.b $78,x
CODE_05AFD1:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05AFF6
	LDA.b $78,x
	AND.w #$0001
	BNE.b CODE_05AFF6
	LDY.b $76,x
	CPY.b #$0A
	BEQ.b CODE_05AFF6
	LDA.w #$0004
	STA.w $7AF6,x
	LDY.b #$0A
	STY.b $76,x
	STZ.w $60A8
	STZ.w $60B4
CODE_05AFF6:
	LDA.b $0E
	SEC
	SBC.w $6122
	SEC
	SBC.w $611E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0180
	LDY.w $72C1,x
	BMI.b CODE_05B012
	LDA.w #$0060
CODE_05B012:
	AND.w $60FC
	BNE.b CODE_05B021
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_05B021:
	STZ.w $60AA
	STZ.w $60D4
	INC.w $61B4
	RTS

CODE_05B02B:
	LDY.w $7D36,x
	BPL.b CODE_05B034
	JSL.l CODE_03A858
CODE_05B034:
	RTS

CODE_05B035:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0200
	SEC
	SBC.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_548000+$00E1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$00E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_05B07C:
	TYX
CODE_05B07D:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05B0CD
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_05B0CD
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05B0CD
	LDA.b $0E
	SEC
	SBC.w #$000E
	STA.b $00
	SEC
	SBC.w $7182,y
	BPL.b CODE_05B0CD
	CMP.w #$FFF8
	BMI.b CODE_05B0CD
	LDA.b $00
	STA.w $7182,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $7542,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w $7AF6,y
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	INC.b $78,x
	LDY.b #$01
	STY.b $76,x
CODE_05B0CD:
	RTS

CODE_05B0CE:
	TYX
	LDA.w $7A36,x
	CMP.w #$0160
	BMI.b CODE_05B13B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05B119
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0034
	STA.w $7542,y
	LDA.w #$0340
	STA.w $75E2,y
	LDA.w #$0004
	STA.w $7AF6,y
	LDA.w #$0180
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	PHY
	LDA.w $7400,y
	TAY
	LDA.w DATA_05ABAE,y
	PLY
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0007
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
CODE_05B119:
	LDA.b $78,x
	AND.w #$0002
	BEQ.b CODE_05B132
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
CODE_05B132:
	STZ.b $78,x
	INC.b $76,x
	LDA.w #$0160
	BRA.b CODE_05B13F

CODE_05B13B:
	CLC
	ADC.w #$0008
CODE_05B13F:
	STA.w $7A36,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7A36,y
	LDA.b $0E
	SEC
	SBC.w #$000E
	STA.w $7182,y
	RTS

CODE_05B152:
	TYX
	LDA.w $7A36,x
	CMP.w #$00C0
	BPL.b CODE_05B162
	INC.b $76,x
	LDA.w #$00C0
	BRA.b CODE_05B166

CODE_05B162:
	SEC
	SBC.w #$0018
CODE_05B166:
	STA.w $7A36,x
	RTS

CODE_05B16A:
	TYX
	LDA.w $7A36,x
	CMP.w #$0100
	BMI.b CODE_05B17A
	STZ.b $76,x
	LDA.w #$0100
	BRA.b CODE_05B17E

CODE_05B17A:
	CLC
	ADC.w #$0008
CODE_05B17E:
	STA.w $7A36,x
	RTS

CODE_05B182:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05B1CB
	INC.b $76,x
	RTS

CODE_05B18B:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05B1A8
	INC
	STA.w $7AF6,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$09
	LDA.b $76,x
	CMP.w #$0005
	BEQ.b CODE_05B1A6
	LDY.b #$0D
CODE_05B1A6:
	STY.b $76,x
CODE_05B1A8:
	RTS

CODE_05B1A9:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05B1CB
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05B1CA
	LDA.w #$0004
	STA.w $7AF6,x
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_05B1CA:
	RTS

CODE_05B1CB:
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $18,x
	ASL
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_0B86D1>>16
	LDA.w #FXCODE_0B86D1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0100
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $7A36,x
	LSR
	STA.w $7A36,x
	RTS

DATA_05B1F9:
	dw $0100,$00C0,$0160

DATA_05B1FF:
	dw $0008,$FFF0,$0010

CODE_05B205:
	TYX
	LDA.b $16,x
	TAY
	AND.w #$0002
	BEQ.b CODE_05B218
	LDA.w $7A36,x
	CMP.w DATA_05B1F9,y
	BPL.b CODE_05B24F
	BRA.b CODE_05B220

CODE_05B218:
	LDA.w $7A36,x
	CMP.w DATA_05B1F9,y
	BMI.b CODE_05B24F
CODE_05B220:
	DEC.b $16,x
	DEC.b $16,x
	BPL.b CODE_05B24A
	PHY
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7A96,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0009
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.b #$00
	STY.b $76,x
	LDA.w $0EED
	EOR.w #$0002
	STA.w $0EED
	PLY
CODE_05B24A:
	LDA.w DATA_05B1F9,y
	BRA.b CODE_05B253

CODE_05B24F:
	CLC
	ADC.w DATA_05B1FF,y
CODE_05B253:
	STA.w $7A36,x
CODE_05B256:
	RTS

CODE_05B257:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05B256
	LDA.w $7A36,x
	CMP.w #$0140
	BMI.b CODE_05B2E2
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCC.b CODE_05B288
	BPL.b CODE_05B282
	LDA.w #$FFC0
	BRA.b CODE_05B285

CODE_05B282:
	LDA.w #$0040
CODE_05B285:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_05B288:
	LDA.w #$05C0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	STZ.w $7400,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05B2AA
	LDA.w #$0002
	STA.w $7400,x
CODE_05B2AA:
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0140
	STA.b $18,x
	LDA.w #$0004
	STA.w $7AF6,x
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	STZ.w $7860,x
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	LDA.b $78,x
	AND.w #$0002
	BEQ.b CODE_05B2DD
	STZ.w $61B4
	STZ.b $78,x
	LDA.w #$0010
	STA.w $7AF8,x
CODE_05B2DD:
	LDA.w #$0140
	BRA.b CODE_05B2E6

CODE_05B2E2:
	CLC
	ADC.w #$0006
CODE_05B2E6:
	STA.w $7A36,x
	RTS

CODE_05B2EA:
	TYX
	LDY.w $7223,x
	BMI.b CODE_05B2FB
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05B2FB
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05B2FB:
	LDA.w $7A36,x
	CMP.w #$0160
	BMI.b CODE_05B344
	LDA.b $78,x
	AND.w #$0002
	BNE.b CODE_05B317
	STZ.w $61B4
	LDA.w #$0004
	STA.w $7AF6,x
	INC.b $76,x
	BRA.b CODE_05B33F

CODE_05B317:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05B33F
	LDA.w $7860,y
	LSR
	BCC.b CODE_05B33F
	LDA.w #$0009
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BEQ.b CODE_05B33F
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0010
	STA.w $7A96,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STY.w $0EED
CODE_05B33F:
	LDA.w #$0160
	BRA.b CODE_05B348

CODE_05B344:
	CLC
	ADC.w #$0008
CODE_05B348:
	STA.w $7A36,x
	JSR.w CODE_05B07D
	RTS

CODE_05B34F:
	TYX
	LDY.w $7223,x
	BMI.b CODE_05B360
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05B360
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05B360:
	LDA.w $7A36,x
	CMP.w #$0100
	BPL.b CODE_05B3A0
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BPL.b CODE_05B371
	LDY.b #$0C
	BRA.b CODE_05B399

CODE_05B371:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w $0EED
	BEQ.b CODE_05B397
	LDA.w $7860,y
	LSR
	BCC.b CODE_05B39B
	LDA.w #$0010
	STA.w $7A96,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0009
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STY.w $0EED
CODE_05B397:
	LDY.b #$00
CODE_05B399:
	STY.b $76,x
CODE_05B39B:
	LDA.w #$0100
	BRA.b CODE_05B3A4

CODE_05B3A0:
	SEC
	SBC.w #$0010
CODE_05B3A4:
	JMP.w CODE_05B348

DATA_05B3A7:
	dw $0008,$FFF8

CODE_05B3AB:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05B3CF
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$00
	LDA.w $7A36,x
	CMP.w #$0100
	BNE.b CODE_05B3D0
	LDA.w #$0004
	STA.w $7AF6,x
	LDA.w #$0020
	STA.w $7A96,x
	INC.b $76,x
CODE_05B3CF:
	RTS

CODE_05B3D0:
	BMI.b CODE_05B3D4
	INY
	INY
CODE_05B3D4:
	CLC
	ADC.w DATA_05B3A7,y
	AND.w #$FFF8
	STA.w $7A36,x
	RTS

DATA_05B3DF:
	dw $FF22,$00DE

CODE_05B3E3:
	TYX
	LDA.w $7A36,x
	CMP.w #$0140
	BMI.b CODE_05B415
	LDY.w $7400,x
	LDA.w DATA_05B3DF,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0180
	STA.b $18,x
	LDA.w #$0004
	STA.w $7AF6,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	LDA.w #$0140
	BRA.b CODE_05B419

CODE_05B415:
	CLC
	ADC.w #$0008
CODE_05B419:
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

DATA_05B41D:
	db $20,$22,$24,$28

YI_NorSpr052_BalloonPlatform_Init:
;$05B421
	LDA.w $70E2,x
	BIT.w #$0010
	BEQ.b CODE_05B455
	AND.w #$FFE0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #$0060
	STA.w $6FA0,x
	LDA.w #$4000
	STA.w $6FA2,x
	LDA.w #$0002
	STA.w $7040,x
	STZ.w $7542,x
	INC.b $76,x
	LDY.w !RAM_YI_Level_NorSpr_BalloonGeneratorActiveFlagLo
	BNE.b CODE_05B454
	INC.w !RAM_YI_Level_NorSpr_BalloonGeneratorActiveFlagLo
CODE_05B454:
	RTL

CODE_05B455:
	LDY.w $0FEB
	BNE.b CODE_05B469
	JSL.l CODE_03AE60
	INC.w $0FEB
	LDA.w $7722,x
	STA.w $0FE9
	BRA.b CODE_05B46F

CODE_05B469:
	LDA.w $0FE9
	STA.w $7722,x
CODE_05B46F:
	INC.w $0FED
	LDA.w #$0040
	STA.w $7A96,x
	STA.w $75E0,x
	LDA.w #$0004
	STA.w $7540,x
	SEP.b #$20
	LDA.b $10
	AND.b #$03
	TAY
	LDA.w DATA_05B41D,y
	STA.w $7042,x
	REP.b #$20
	LDA.w #FXDATA_550000+$0041
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0041)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTL

;---------------------------------------------------------------------------

YI_NorSpr052_BalloonPlatform_Main:
;$05B4CC
	LDY.b $76,x
	BEQ.b CODE_05B4D3
	JMP.w CODE_05B52B

CODE_05B4D3:
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	JSL.l CODE_03A2C7
	BCC.b CODE_05B50F
	LDA.w $7722,x
	CMP.w $0FE9
	BEQ.b CODE_05B4F3
	JSL.l CODE_03AEFD
	LDA.w $0FE9
	STA.w $7722,x
CODE_05B4F3:
	DEC.w $0FED
	BEQ.b CODE_05B500
	LDA.w #$FFFF
	STA.w $7722,x
	BRA.b CODE_05B503

CODE_05B500:
	STZ.w $0FEB
CODE_05B503:
	CPX.w $61B6
	BNE.b CODE_05B50B
	STZ.w $61B6
CODE_05B50B:
	JML.l CODE_03A31E

CODE_05B50F:
	JSR.w CODE_05B565
	JSR.w CODE_05B6B0
	LDA.w $7A96,x
	BNE.b CODE_05B52A
	LDA.w #$0080
	STA.w $7A96,x
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_05B52A:
	RTL

CODE_05B52B:
	JSL.l CODE_03AF23
	LDY.w !RAM_YI_Level_NorSpr_BalloonGeneratorActiveFlagLo
	BEQ.b CODE_05B50B
	LDA.w $7680,x
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCS.b CODE_05B50B
	LDA.w $7A96,x
	BNE.b CODE_05B564
	LDA.w #$0052
	JSL.l CODE_03A34C
	BCC.b CODE_05B564
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $70E2,y
	LDA.w $609C
	CLC
	ADC.w #$0100
	STA.w $7182,y
	LDA.w #$0240
	STA.w $7A96,x
CODE_05B564:
	RTL

CODE_05B565:
	LDY.w $60AB
	BMI.b CODE_05B5B0
	LDY.w $0D94
	BNE.b CODE_05B5B0
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_05B5B0
	LDA.w $7C16,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05B5B0
	LDA.b $78,x
	LSR
	LSR
	LSR
	LSR
	CLC
	ADC.w $7182,x
	CLC
	ADC.w #$0000
	SEC
	SBC.w $611E
	SEC
	SBC.w $6122
	STA.b $00
	CPX.w $61B6
	BNE.b CODE_05B5AB
	LDA.w $75E2,x
	CMP.w #$FF40
	BEQ.b CODE_05B5B8
	JMP.w CODE_05B64D

CODE_05B5AB:
	CMP.w #$FFF8
	BCS.b CODE_05B5EE
CODE_05B5B0:
	CPX.w $61B6
	BNE.b CODE_05B5CE
	STZ.w $61B6
CODE_05B5B8:
	LDA.w #$0040
	STA.w $75E0,x
	LDA.w #$FF40
	STA.w $75E2,x
	LDA.w $7C16,x
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05B5CE:
	LDY.b $18,x
	BEQ.b CODE_05B5ED
	LDA.b $78,x
	SEC
	SBC.w #$0010
	STA.b $78,x
	CMP.w #$0010
	BPL.b CODE_05B5ED
	STZ.b $18,x
	STZ.b $78,x
	JSL.l CODE_03AEFD
	LDA.w $0FE9
	STA.w $7722,x
CODE_05B5ED:
	RTS

CODE_05B5EE:
	LDY.w $60C0
	BEQ.b CODE_05B5B0
	LDY.w $61B6
	BNE.b CODE_05B5CE
	STX.w $61B6
	LDA.w $60AA
	LSR
	LSR
	CMP.w #$0060
	BMI.b CODE_05B608
	LDA.w #$0060
CODE_05B608:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	ASL
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$00C0
	BMI.b CODE_05B618
	LDA.w #$00C0
CODE_05B618:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFD0
	STA.w $75E2,x
	LDA.w $60A8
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $75E0,x
	JSL.l CODE_03AD74
	BCC.b CODE_05B64D
	STZ.b $78,x
	STZ.w $7A38,x
	LDA.w #$0010
	STA.w $7A36,x
	INC.b $18,x
CODE_05B64D:
	LDA.w $60FC
	AND.w #$0007
	BEQ.b CODE_05B65D
	LDY.w $7223,x
	BMI.b CODE_05B65D
	JMP.w CODE_05B5B0

CODE_05B65D:
	LDY.b $18,x
	BEQ.b CODE_05B692
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.b $78,x
	BMI.b CODE_05B670
	LDA.b $78,x
	CLC
	ADC.w $7A36,x
	BRA.b CODE_05B690

CODE_05B670:
	LDA.w $7A38,x
	BNE.b CODE_05B685
	INC.w $7A38,x
	LDA.w $7A36,x
	LSR
	STA.w $7A36,x
	LDA.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_05B685:
	LDA.b $78,x
	CMP.w $7A36,x
	BEQ.b CODE_05B690
	SEC
	SBC.w $7A36,x
CODE_05B690:
	STA.b $78,x
CODE_05B692:
	LDA.b $00
	INC
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $60C0
	STZ.w $60AA
	INC.w $61B4
	RTS

CODE_05B6B0:
	LDA.w $7722,x
	CMP.w $0FE9
	BEQ.b CODE_05B6DD
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w $6000
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D584>>16
	LDA.w #FXCODE_08D584
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05B6DD:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr098_EndTransformationBlock_Init:
;$05B6DE
	LDA.w $61F4
	BEQ.b CODE_05B6E8
	LDA.w $0C8A
	BNE.b CODE_05B6F3
CODE_05B6E8:
	LDY.b #$03
	STY.b $76,x
	LDA.w #$00FF
	STA.w $74A2,x
	RTL

CODE_05B6F3:
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_03B56E
	JSL.l CODE_03AE60
	LDA.w $70E2,x
	STA.b $18,x
	DEC.w $7182,x
	LDA.w $7182,x
	STA.b $78,x
	STZ.w $7400,x
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STZ.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_548000+$60C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$60C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTL

;---------------------------------------------------------------------------

DATA_05B754:
	dw CODE_0580C2
	dw CODE_05B7D1
	dw CODE_05B85A

YI_NorSpr098_EndTransformationBlock_Main:
;$05B75A
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_05B76D
	JSL.l CODE_03B69D
CODE_05B76D:
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState18_SentTowardsBabyMario
	BEQ.b CODE_05B7B6
	TXY
	LDA.b $76,x
	CMP.w #$0003
	BNE.b CODE_05B793
	LDA.w $61F4
	BEQ.b CODE_05B7D0
	LDA.w $0C8A
	BEQ.b CODE_05B7D0
	LDA.w #$0002
	STA.w $74A2,x
	STZ.b $76,x
	JML.l CODE_05B6F3

CODE_05B793:
	ASL
	TAX
	JSR.w (DATA_05B754,x)
	JSR.w CODE_05B88C
	BCS.b CODE_05B7B6
	LDA.w $7E16
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $0C8A
	BEQ.b CODE_05B7AE
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_05B7AE:
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	RTL

CODE_05B7B6:
	LDA.w $61F4
	BNE.b CODE_05B7D0
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_03B56E
	JML.l CODE_03A31E

CODE_05B7D0:
	RTL

CODE_05B7D1:
	TYX
	LDY.w $7A36,x
	BNE.b CODE_05B7FB
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w $75E0,x
	BMI.b CODE_05B859
	LDA.b $18,x
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_05B859
	LDA.b $18,x
	STA.w $70E2,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_05B81D

CODE_05B7FB:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w $75E2,x
	BMI.b CODE_05B859
	LDA.b $78,x
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_05B859
	LDA.b $78,x
	STA.w $7182,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_05B81D:
	LDA.w $0C8A
	BNE.b CODE_05B825
	STZ.b $76,x
	RTS

CODE_05B825:
	LDA.w #$0020
	STA.w $7A98,x
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w $70E2,x
	STA.w $70E2
	LDA.w $7182,x
	STA.w $7182
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$0018
	STA.w $7542
	LDA.w #$0080
	STA.w $75E2
	LDY.b #$07
	STY.b $76
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_05B859:
	RTS

CODE_05B85A:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05B859
	LDA.w #!Define_YI_AmbSpr1D4
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
	PLA
	JML.l CODE_03A31E

DATA_05B888:
	dw $FC00,$0400

CODE_05B88C:
	LDY.b $76,x
	BEQ.b CODE_05B896
	JSL.l CODE_03D127
	SEC
CODE_05B895:
	RTS

CODE_05B896:
	STZ.w $7A36,x
	LDA.w #$0E00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$1000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w $6120
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $6122
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0B8578>>16
	LDA.w #FXCODE_0B8578
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	STA.b $0C
	CLC
	ADC.w $603C
	CMP.w $6038
	BCS.b CODE_05B895
	LDA.w #$FFF0
	CLC
	ADC.w $6036
	SEC
	SBC.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	CLC
	ADC.w $7182,x
	SEC
	SBC.w $611E
	SEC
	SBC.w $6112
	STA.b $0E
	CLC
	ADC.w $603E
	CMP.w $603A
	BCS.b CODE_05B960
	LDA.w $603E
	SEC
	SBC.w #$0010
	STA.b $00
	LDA.b $0E
	BPL.b CODE_05B91D
	PHA
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
	PLA
	CMP.b $00
	BMI.b CODE_05B962
	BRA.b CODE_05B921

CODE_05B91D:
	CMP.b $00
	BPL.b CODE_05B962
CODE_05B921:
	LDA.w $60A8
	EOR.b $0C
	BMI.b CODE_05B960
	STZ.b $00
	LDA.w $603C
	LDY.b $0D
	BMI.b CODE_05B939
	INC.b $00
	INC.b $00
	EOR.w #$FFFF
	INC
CODE_05B939:
	CLC
	ADC.b $0C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDY.b $00
	LDA.w DATA_05B888,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
	LDA.w #$0040
	STA.w $7540,x
	STZ.w $60A8
	STZ.w $60B4
	BRA.b CODE_05B998

CODE_05B960:
	SEC
	RTS

CODE_05B962:
	STZ.b $00
	LDA.w $603E
	LDY.b $0F
	BMI.b CODE_05B973
	INC.b $00
	INC.b $00
	EOR.w #$FFFF
	INC
CODE_05B973:
	CLC
	ADC.b $0E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.b $00
	LDA.w DATA_05B888,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.w $60AA
	INC.w $7A36,x
CODE_05B998:
	STZ.w $60D2
	INC.b $76,x
	CLC
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0EE_EggoDil_Init:
;$05B99F
	LDY.w $0EDF
	BEQ.b CODE_05B9A8
	JML.l CODE_03A31E

CODE_05B9A8:
	INC.w $0EDF
	LDY.b #$08
CODE_05B9AD:
	LDA.w $0EE1,y
	BMI.b CODE_05B9C3
	BEQ.b CODE_05B9BD
	PHY
	TAY
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	PLY
CODE_05B9BD:
	LDA.w #$FFFF
	STA.w $0EE1,y
CODE_05B9C3:
	DEY
	DEY
	BPL.b CODE_05B9AD
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0EE_EggoDil_Main:
;$05B9C8
	STZ.w $7400,x
	JSL.l CODE_03AF23
	LDA.b $18,x
	BNE.b CODE_05B9ED
	LDA.w #$00EF
	JSL.l CODE_03A34C
	BCC.b CODE_05B9ED
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	STX.w $0EDD
	INC.b $18,x
CODE_05B9ED:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0EF_EggoDilFace_Init:
;$05B9EE
	JSR.w CODE_05BBD5
	RTL

;---------------------------------------------------------------------------

DATA_05B9F2:
	dw CODE_05BC14
	dw CODE_05BCBE
	dw CODE_05BCE8
	dw CODE_05BD3E
	dw CODE_05BD3E

YI_NorSpr0EF_EggoDilFace_Main:
;$05B9FC
	STZ.w $7400,x
	JSR.w CODE_05BA36
	JSR.w CODE_05BB09
	JSL.l CODE_03AF23
	LDY.w $0EDF
	BPL.b CODE_05BA1E
	LDX.w $0EDD
	JSL.l CODE_03A31E
	LDX.b $12
	STZ.w $0EDF
	JML.l CODE_03A31E

CODE_05BA1E:
	JSL.l CODE_03A2C7
	BCC.b CODE_05BA2A
	LDY.b #$FF
	STY.w $0EDF
	RTL

CODE_05BA2A:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05B9F2,x)
	JSR.w CODE_05BBD5
	RTL

CODE_05BA36:
	LDY.w $7722,x
	BPL.b CODE_05BA52
	REP.b #$10
	LDY.w $7362,x
	LDA.w #$8000
	STA.w $6000,y
	STA.w $6008,y
	STA.w $6010,y
	STA.w $6018,y
	SEP.b #$10
	RTS

CODE_05BA52:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	SEC
	SBC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A36,x
	PHA
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0B86FA>>16
	LDA.w #FXCODE_0B86FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $00
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $04
	PLA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$000A
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDY.w $7362,x
	LDA.w $7CD6,x
	SEC
	SBC.b $00
	SEC
	SBC.w $6094
	STA.b $00
	SEC
	SBC.w #$0010
	STA.b $02
	LDA.w $7182,x
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $78,x
	SEC
	SBC.b $04
	SEC
	SBC.w $609C
	STA.b $04
	LDA.b $02
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $00
	STA.w $6008,y
	STA.w $6018,y
	LDA.b $04
	STA.w $6012,y
	STA.w $601A,y
	SEC
	SBC.w #$0010
	STA.w $6002,y
	STA.w $600A,y
	LDY.w #$0000
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	AND.w #$01FE
	CMP.w #$0020
	BCC.b CODE_05BAFF
	INY
	CMP.w #$0110
	BPL.b CODE_05BAFF
	INY
CODE_05BAFF:
	SEP.b #$10
	TYA
	LDY.w $0EDD
	STA.w $7402,y
CODE_05BB08:
	RTS

CODE_05BB09:
	LDY.b $18,x
	BEQ.b CODE_05BB08
	LDA.w $61C6
	BEQ.b CODE_05BB75
	LDA.w $0EEB
	STA.b $00
	LDY.b #$08
CODE_05BB19:
	LDX.w $0EE1,y
	BMI.b CODE_05BB52
	LDA.b $00
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHY
	PHX
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	PLY
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0008
	STA.w $7540,x
CODE_05BB52:
	LDA.b $00
	CLC
	ADC.w #$0066
	AND.w #$01FE
	STA.b $00
	DEY
	DEY
	BPL.b CODE_05BB19
	LDX.b $12
	STZ.b $18,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0008
	STA.b $16,x
	LDY.b #$04
	STY.b $76,x
	RTS

CODE_05BB75:
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.b $78,x
	SEC
	SBC.w #$0008
	STA.b $02
	LDA.w $0EEB
	STA.b $06
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b #$08
CODE_05BB93:
	LDX.w $0EE1,y
	BMI.b CODE_05BBC3
	LDA.b $06
	SEC
	SBC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHX
	PHY
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.b $00
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $70E2,x
	LDA.b $02
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7182,x
CODE_05BBC3:
	LDA.b $06
	CLC
	ADC.w #$0066
	AND.w #$01FE
	STA.b $06
	DEY
	DEY
	BPL.b CODE_05BB93
	LDX.b $12
CODE_05BBD4:
	RTS

CODE_05BBD5:
	LDY.w $7722,x
	BMI.b CODE_05BBD4
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #FXDATA_550000+$0060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05BC13:
	RTS

CODE_05BC14:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05BC13
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_05BC2D
	LDY.b #$08
CODE_05BC21:
	LDA.w $0EE1,y
	BPL.b CODE_05BC13
	DEY
	DEY
	BPL.b CODE_05BC21
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05BC2D:
	LDA.w $7722,x
	BPL.b CODE_05BC38
	JSL.l CODE_03AD74
	BCC.b CODE_05BC13
CODE_05BC38:
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w #$00E0
	BPL.b CODE_05BC48
CODE_05BC44:
	STA.w $7A36,x
	RTS

CODE_05BC48:
	CMP.w #$0100
	BMI.b CODE_05BC5A
	LDA.w #$0100
	LDY.b $18,x
	BEQ.b CODE_05BC63
	STA.w $7A36,x
	INC.b $76,x
	RTS

CODE_05BC5A:
	LDY.b $18,x
	BEQ.b CODE_05BC63
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_05BC44

CODE_05BC63:
	STA.w $7A36,x
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.b $02
	LDA.b $78,x
	SEC
	SBC.w #$0008
	STA.b $04
	LDA.w #$0005
	STA.b $00
CODE_05BC7C:
	LDA.w #$00F0
	JSL.l CODE_03A364
	BCC.b CODE_05BCA2
	LDA.b $02
	STA.w $70E2,y
	LDA.b $04
	STA.w $7182,y
	TYA
	PHA
	LDA.b $00
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	TAY
	PLA
	STA.w $0EDF,y
	DEC.b $00
	BNE.b CODE_05BC7C
	BRA.b CODE_05BCB2

CODE_05BCA2:
	LDA.b $00
	BEQ.b CODE_05BCB2
	ASL
	TAY
	LDA.w #$FFFF
	STA.w $0EDF,y
	DEC.b $00
	BRA.b CODE_05BCA2

CODE_05BCB2:
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $0EEB
	INC.b $18,x
	RTS

CODE_05BCBE:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC
	CMP.w #$0014
	BNE.b CODE_05BCE4
	LDA.b $10
	AND.w #$0003
	CLC
	ADC.w #$0005
	STA.b $16,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0030
	STA.w $7A98,x
	INC.b $76,x
	LDA.w #$0010
CODE_05BCE4:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

CODE_05BCE8:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05BD2F
	LDA.w $7A98,x
	BNE.b CODE_05BD0C
	LDA.w #$0020
	DEC.b $16,x
	BPL.b CODE_05BD06
	LDA.w #$0008
	STA.b $16,x
	STA.w $7A96,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	RTS

CODE_05BD06:
	BNE.b CODE_05BD09
	LSR
CODE_05BD09:
	STA.w $7A98,x
CODE_05BD0C:
	LDA.b $16,x
	AND.w #$0001
	ASL
	ASL
	ASL
	SEC
	SBC.w #$0004
	CLC
	ADC.w $7A38,x
	AND.w #$01FE
	STA.w $7A38,x
	LDA.w $0EEB
	CLC
	ADC.w #$0004
	AND.w #$01FE
	STA.w $0EEB
CODE_05BD2F:
	RTS

DATA_05BD30:
	dw $FFF0,$0010

DATA_05BD34:
	dw $0080,$00E0,$00A0,$00F0,$00C0

CODE_05BD3E:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05BD2F
	LDA.b $16,x
	AND.w #$0002
CODE_05BD48:
	PHP
	TAY
	LDA.w DATA_05BD30,y
	CLC
	ADC.w $7A36,x
	LDY.b $16,x
	PLP
	BNE.b CODE_05BD5E
	CMP.w DATA_05BD34,y
	BPL.b CODE_05BD6C
	BRA.b CODE_05BD63

CODE_05BD5E:
	CMP.w DATA_05BD34,y
	BMI.b CODE_05BD6C
CODE_05BD63:
	DEC.b $16,x
	DEC.b $16,x
	BMI.b CODE_05BD70
	LDA.w DATA_05BD34,y
CODE_05BD6C:
	STA.w $7A36,x
	RTS

CODE_05BD70:
	LDA.w #!Define_YI_AmbSpr1E8
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.b $78,x
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.w #$0003
	STA.w $73C2,y
	INC
	STA.w $7782,y
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_05BDEA
	LDA.w $0EEB
	STA.b $06
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b #$08
CODE_05BDA7:
	LDX.w $0EE1,y
	BMI.b CODE_05BDD9
	LDA.b $06
	SEC
	SBC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHY
	PHX
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	PLY
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_05BDD9:
	LDA.b $06
	CLC
	ADC.w #$0066
	AND.w #$01FE
	STA.b $06
	DEY
	DEY
	BPL.b CODE_05BDA7
	LDX.b $12
CODE_05BDEA:
	LDA.w #$00C0
	STA.w $7A96,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	STZ.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.b $76,x
	JSL.l CODE_03AEFD
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0F0_EggoDilPetal_Init:
;$05BE02
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0F0_EggoDilPetal_Main:
;$05BE03
	STZ.w $7400,x
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPY.b #$10
	BEQ.b CODE_05BE12
	JSR.w CODE_05BE5A
	BRA.b CODE_05BE24

CODE_05BE12:
	LDA.w $7D38,x
	BEQ.b CODE_05BE24
	JSL.l CODE_03A2C7
	BCC.b CODE_05BE24
	JSR.w CODE_05BE5A
	JML.l CODE_03A31E

CODE_05BE24:
	JSL.l CODE_03AF23
	LDY.w $0EDF
	BMI.b CODE_05BE3A
	JSL.l CODE_03A2C7
	BCC.b CODE_05BE4B
	JSR.w CODE_05BE5A
	JML.l CODE_03A31E

CODE_05BE3A:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ORA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05BE4B
	JSR.w CODE_05BE5A
	LDA.w #$0040
	STA.w $7542,x
CODE_05BE4B:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05BE55
	JML.l CODE_0DC0F0

CODE_05BE55:
	JSL.l CODE_03A5B7
	RTL

CODE_05BE5A:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05BE68
	LDA.w #$FFFF
	STA.w $0EDF,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05BE68:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0EC_JumpingFlamerGuy_Init:
YI_NorSpr0ED_RunningFlamerGuy_Init:
;$05BE69
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$FFFF
	BNE.b CODE_05BE83
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_05BE83
	JSL.l CODE_03AD74
	BCS.b CODE_05BE89
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_05BE83:
	JSL.l CODE_03AE60
	INC.b $78,x
CODE_05BE89:
	LDA.w #$0100
	STA.w $7A36,x
	LDY.w $7400,x
	STY.b $79,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.w $74A2,x
	JSR.w CODE_05C16C
	RTL

;---------------------------------------------------------------------------

DATA_05BEA4:
	dw CODE_05C1C4
	dw CODE_05C202
	dw CODE_05C233
	dw CODE_05C2D3
	dw CODE_05C3A9
	dw CODE_05C3DD
	dw CODE_05C450

YI_NorSpr0EC_JumpingFlamerGuy_Main:
YI_NorSpr0ED_RunningFlamerGuy_Main:
;$05BEB2
	LDA.w $7D96,x
	BEQ.b CODE_05BEDA
	JSR.w CODE_05BF99
	JSR.w CODE_05C06E
	LDA.w $7D96,x
	PHA
	TXY
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	JSL.l CODE_03A377
	PLA
	STA.w $7D96,x
	LDA.w #$0022
	STA.w $7042,x
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JMP.w CODE_05BF69

CODE_05BEDA:
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPY.b #$08
	BNE.b CODE_05BF00
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A36,x
	LDY.w $74A2,x
	BMI.b CODE_05BF69
CODE_05BEF5:
	JSR.w CODE_05BF99
	JSR.w CODE_05C06E
	JSR.w CODE_05C16C
	BRA.b CODE_05BF69

CODE_05BF00:
	CPY.b #$10
	BNE.b CODE_05BEF5
	LDY.w $7D38,x
	BEQ.b CODE_05BF63
	LDA.w #$0011
	STA.w $7402,x
	LDA.b $79,x
	AND.w #$00FF
	CMP.w $7400,x
	PHP
	BEQ.b CODE_05BF2C
	LDY.w $7400,x
	STY.b $79,x
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	AND.w #$01FE
	STA.w $7A38,x
CODE_05BF2C:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05BF4F
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_05BF4F
	LDA.w $7A36,x
	SEC
	SBC.w #$0020
	CMP.w #$0060
	BPL.b CODE_05BF4C
	LDA.w #$0060
CODE_05BF4C:
	STA.w $7A36,x
CODE_05BF4F:
	JSR.w CODE_05BF99
	JSR.w CODE_05C06E
	JSR.w CODE_05C16C
	PLP
	BNE.b CODE_05BF69
	LDA.w #$0005
	STA.w $74A2,x
	BRA.b CODE_05BF69

CODE_05BF63:
	JSR.w CODE_05BF99
	JSR.w CODE_05C06E
CODE_05BF69:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05BEA4,x)
	JSR.w CODE_05C16C
	LDA.b $79,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_05BF8F
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	AND.w #$01FE
	STA.w $7A38,x
CODE_05BF8F:
	LDY.w $7400,x
	STY.b $79,x
	JSL.l CODE_03A5B7
	RTL

CODE_05BF99:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0EC_JumpingFlamerGuy
	BEQ.b CODE_05BFA4
	JMP.w CODE_05C014

CODE_05BFA4:
	LDY.b $76,x
	CPY.b #$00
	BEQ.b CODE_05BFD2
	LDA.w $7A36,x
	LDY.b $78,x
	BEQ.b CODE_05BFC1
	CMP.w #$00A0
	BPL.b CODE_05BFBB
	LDA.w #$00A0
	BRA.b CODE_05BFCF

CODE_05BFBB:
	SEC
	SBC.w #$0010
	BRA.b CODE_05BFCF

CODE_05BFC1:
	CMP.w #$0100
	BMI.b CODE_05BFCB
	LDA.w #$0100
	BRA.b CODE_05BFCF

CODE_05BFCB:
	CLC
	ADC.w #$0008
CODE_05BFCF:
	STA.w $7A36,x
CODE_05BFD2:
	LDY.b $78,x
	BNE.b CODE_05C013
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	LDY.w $7400,x
	BEQ.b CODE_05BFEA
	EOR.w #$FFFF
	INC
CODE_05BFEA:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	AND.w #$01FE
	STA.w $7A38,x
CODE_05C013:
	RTS

CODE_05C014:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	BEQ.b CODE_05C020
	EOR.w #$FFFF
	INC
CODE_05C020:
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	AND.w #$01FE
	SEC
	SBC.w $7A38,x
	PHP
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_05C042
	PLP
	BPL.b CODE_05C04E
	BRA.b CODE_05C045

CODE_05C042:
	PLP
	BMI.b CODE_05C04E
CODE_05C045:
	LDA.w $7A38,x
	SEC
	SBC.w #$0010
	BRA.b CODE_05C055

CODE_05C04E:
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
CODE_05C055:
	AND.w #$01FE
	STA.w $7A38,x
CODE_05C05B:
	RTS

DATA_05C05C:
	db $0C,$0C,$0C,$0C,$0D,$0D,$0C,$0B,$0A,$0B,$0C,$0D,$10,$10,$10,$10
	db $10,$08

CODE_05C06E:
	LDY.w $74A2,x
	BMI.b CODE_05C05B
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0018
	TAY
	PHY
	JSL.l CODE_03AA60
	LDA.w $7AF8,x
	BNE.b CODE_05C096
	LDA.w #$0004
	STA.w $7AF8,x
	LDA.b $19,x
	INC
	AND.w #$0003
	TAY
	STY.b $19,x
CODE_05C096:
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A38,x
	SEC
	SBC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_0B86FA>>16
	LDA.w #FXCODE_0B86FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.b $79,x
	BNE.b CODE_05C0CB
	EOR.w #$FFFF
	INC
CODE_05C0CB:
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $6094
	STA.b $02
	SEC
	SBC.w #$0010
	STA.b $00
	LDY.w $7402,x
	LDA.w DATA_05C05C,y
	AND.w #$00FF
	STA.b $04
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.b $04
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $609C
	STA.b $04
	REP.b #$10
	PLY
	LDA.b $79,x
	AND.w #$00FF
	BEQ.b CODE_05C10E
	LDA.b $00
	PHA
	LDA.b $02
	STA.b $00
	PLA
	STA.b $02
CODE_05C10E:
	LDA.b $19,x
	AND.w #$0002
	BEQ.b CODE_05C143
	LDA.b $00
	PHA
	LDA.b $02
	STA.b $00
	PLA
	STA.b $02
	LDA.w $6004,y
	EOR.w #$4000
	STA.w $6004,y
	LDA.w $600C,y
	EOR.w #$4000
	STA.w $600C,y
	LDA.w $6014,y
	EOR.w #$4000
	STA.w $6014,y
	LDA.w $601C,y
	EOR.w #$4000
	STA.w $601C,y
CODE_05C143:
	LDA.b $00
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $02
	STA.w $6008,y
	STA.w $6018,y
	LDA.b $04
	STA.w $6012,y
	STA.w $601A,y
	SEC
	SBC.w #$0010
	STA.w $6002,y
	STA.w $600A,y
	SEP.b #$10
	RTS

DATA_05C168:
	dw FXDATA_550000+$4040,FXDATA_550000+$6040

CODE_05C16C:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $19,x
	AND.w #$0002
	TAY
	LDA.w $7A38,x
	CPY.b #$00
	BEQ.b CODE_05C18C
	EOR.w #$FFFF
	INC
	AND.w #$01FE
CODE_05C18C:
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $19,x
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_05C168,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$4040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_05C1C4:
	TYX
	LDA.w $7A36,x
	CMP.w #$0100
	BMI.b CODE_05C1F6
	LDY.b #$04
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0EC_JumpingFlamerGuy
	BNE.b CODE_05C1EF
	LDY.b #$00
	STY.b $78,x
	LDA.w #$0140
	STA.w $7A38,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$02
CODE_05C1EF:
	STY.b $76,x
	LDA.w #$0100
	BRA.b CODE_05C1FA

CODE_05C1F6:
	CLC
	ADC.w #$0010
CODE_05C1FA:
	STA.w $7A36,x
	RTS

DATA_05C1FE:
	dw $FE00,$0200

CODE_05C202:
	TYX
	LDA.b $18,x
	AND.w #$0003
	BEQ.b CODE_05C21D
	AND.w #$0001
	BEQ.b CODE_05C214
	LDA.w #$FC00
	BRA.b CODE_05C220

CODE_05C214:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	BRA.b CODE_05C220

CODE_05C21D:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05C220:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_05C1FE,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$00
	STY.b $78,x
	INC.b $76,x
	RTS

CODE_05C233:
	TYX
	LDY.w $7402,x
	CPY.b #$11
	BNE.b CODE_05C24C
	LDA.b $18,x
	BIT.w #$000C
	BEQ.b CODE_05C24C
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
CODE_05C24C:
	LDY.w $7860,x
	STY.b $18,x
	TYA
	AND.w #$000F
	BEQ.b CODE_05C29F
	AND.w #$000C
	BEQ.b CODE_05C271
	LDY.w $7402,x
	CPY.b #$0C
	BMI.b CODE_05C271
	CPY.b #$11
	BPL.b CODE_05C271
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
CODE_05C271:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	INC.b $78,x
	LDA.w #$0011
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_05C29F:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PHP
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05C2B2
	PLP
	LDA.w #$000E
	BRA.b CODE_05C2CF

CODE_05C2B2:
	CLC
	ADC.w #$01C0
	CMP.w #$0400
	BCS.b CODE_05C2C6
	LDA.w #$000F
	PLP
	BPL.b CODE_05C2CF
	LDA.w #$000D
	BRA.b CODE_05C2CF

CODE_05C2C6:
	LDA.w #$0010
	PLP
	BPL.b CODE_05C2CF
	LDA.w #$000C
CODE_05C2CF:
	STA.w $7402,x
	RTS

CODE_05C2D3:
	TYX
	LDA.w $7A36,x
	CMP.w #$0090
	BNE.b CODE_05C2E6
	LDA.w #$0040
	STA.w $7542,x
	LDY.b #$01
	STY.b $76,x
CODE_05C2E6:
	JSR.w CODE_05C312
	RTS

DATA_05C2EA:
	dw $0080,$0100,$0180,$0200,$FF80,$FF00,$FE80,$FE00

DATA_05C2FA:
	dw $0008,$0000

DATA_05C2FE:
	dw $FFFF,$FFFF,$0008,$0000

DATA_05C306:
	dw $0008,$FFF8

DATA_05C30A:
	dw $0000,$0000,$0008,$FFF8

CODE_05C312:
	LDA.w #!Define_YI_AmbSpr1D6
	JSL.l CODE_008B21
	LDA.w #$0003
	STA.w $7E4C,y
	ASL
	STA.w $7782,y
	LDA.w #$0022
	STA.w $7002,y
	PHY
	LDA.b $18,x
	BIT.w #$000C
	BNE.b CODE_05C33A
	AND.w #$0002
	CLC
	ADC.w #$0004
	BRA.b CODE_05C341

CODE_05C33A:
	AND.w #$0004
	EOR.w #$0004
	LSR
CODE_05C341:
	TAY
	LDA.w DATA_05C306,y
	STA.b $08
	LDA.w DATA_05C30A,y
	STA.b $0A
	LDA.w DATA_05C2FA,y
	BPL.b CODE_05C35B
	LDA.b $10
	AND.w #$0008
	BEQ.b CODE_05C35B
	LDA.w #$0008
CODE_05C35B:
	STA.b $04
	LDA.w DATA_05C2FE,y
	BPL.b CODE_05C36C
	LDA.b $10
	AND.w #$0020
	BEQ.b CODE_05C36C
	LDA.w #$0008
CODE_05C36C:
	STA.b $06
	LDA.b $10
	PHA
	AND.w #$0006
	CLC
	ADC.b $04
	TAY
	LDA.w DATA_05C2EA,y
	STA.b $00
	PLA
	XBA
	AND.w #$0006
	CLC
	ADC.b $06
	TAY
	LDA.w DATA_05C2EA,y
	PLY
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $70E2,x
	CLC
	ADC.b $08
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.b $0A
	STA.w $7142,y
	RTS

DATA_05C3A5:
	dw $FE00,$0200

CODE_05C3A9:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05C3C7
	LDY.w $7400,x
	LDA.w DATA_05C3A5,y
	STA.w $75E0,x
	LDA.w #$0030
	STA.w $7AF6,x
	LDA.w #$0004
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_05C3C7:
	LDA.w $7A98,x
	BNE.b CODE_05C3DC
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_05C3DC:
	RTS

CODE_05C3DD:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05C3F6
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_05C3FA
	STZ.w $7540,x
	LDA.w #$0010
	STA.w $7402,x
	INC.b $76,x
CODE_05C3F6:
	INC.w $7AF6,x
	RTS

CODE_05C3FA:
	LDA.w #$0010
	STA.w $7540,x
	LDA.w $7AF6,x
	BNE.b CODE_05C426
	STZ.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05C426
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0060
	STA.w $7A96,x
	STZ.w $7402,x
	DEC.b $76,x
	RTS

CODE_05C426:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05C42F
	EOR.w #$FFFF
	INC
CODE_05C42F:
	CLC
	ADC.b $16,x
	CMP.w #$0400
	BMI.b CODE_05C44D
	PHA
	LDA.w $7402,x
	SEC
	SBC.w #$0003
	AND.w #$0007
	CLC
	ADC.w #$0004
	STA.w $7402,x
	PLA
	AND.w #$03FF
CODE_05C44D:
	STA.b $16,x
	RTS

CODE_05C450:
	TYX
	INC.w $7AF6,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05C46A
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w #$000E
	STA.w $7402,x
	DEC.b $76,x
CODE_05C46A:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr021_Bucket_Init:
YI_NorSpr122_BucketWithBandit_Init:
YI_NorSpr123_BucketWithCoins_Init:
;$05C46B
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7182,x
	SEC
	SBC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $7400,x
	JSR.w CODE_05C59F
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr021_Bucket
	BNE.b CODE_05C4A2
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.b $16,x
CODE_05C4A2:
	RTL

;---------------------------------------------------------------------------

DATA_05C4A3:
	dw CODE_05C5EB
	dw CODE_05C6B1
	dw CODE_05C70D
	dw CODE_05C766
	dw CODE_05C79E

YI_NorSpr122_BucketWithBandit_Main:
YI_NorSpr123_BucketWithCoins_Main:
;$05C4AD
	JSR.w CODE_05C4D5
	JSL.l CODE_03AF23
	JSL.l CODE_03A2C7
	BCC.b CODE_05C4C6
	LDY.b $18,x
	BEQ.b CODE_05C4C2
	JML.l CODE_03A32E

CODE_05C4C2:
	JML.l CODE_03A31E

CODE_05C4C6:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05C4A3,x)
	JSR.w CODE_05C571
	JSR.w CODE_05C591
	RTL

CODE_05C4D5:
	JSL.l CODE_03AA52
	LDA.w $7A39,x
	AND.w #$00FF
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$000A
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDY.w $7362,x
	LDA.w $7542,x
	BNE.b CODE_05C552
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$FFFC
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $6094
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$FFFC
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $609C
	STA.b $02
	LDA.b $00
	STA.w $6008,y
	STA.w $6018,y
	SEC
	SBC.w #$0010
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $02
	STA.w $6012,y
	STA.w $601A,y
	SEC
	SBC.w #$0010
	STA.w $6002,y
	STA.w $600A,y
CODE_05C552:
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w $6094
	STA.w $6000,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w $609C
	STA.w $6002,y
	SEP.b #$10
	RTS

CODE_05C571:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05C590
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05C590
	LDA.w $7D38,y
	BEQ.b CODE_05C590
	TYX
	JSL.l CODE_03B25B
	LDA.w #!Define_YI_SoundID2E_ClankSound7
	JSL.l CODE_0085D2
CODE_05C590:
	RTS

CODE_05C591:
	LDA.w $7722,x
	BMI.b CODE_05C5E2
	LDA.w $7A38,x
	CMP.b $78,x
	BEQ.b CODE_05C5E2
	STA.b $78,x
CODE_05C59F:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7A39,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #(FXDATA_550000+$20C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$20C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05C5E2:
	RTS

DATA_05C5E3:
	dw CODE_05C7D4
	dw CODE_05C7F9

DATA_05C5E7:
	dw $0020,$0115

CODE_05C5EB:
	TYX
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05C5E2
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05C5E2
	LDA.w $7D38,y
	BEQ.b CODE_05C5E2
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7CD8,y
	SEC
	SBC.w $7CD8,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $7D36,x
	DEY
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w #$0100
	BMI.b CODE_05C633
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.w #$FFFF
	INC
	BRA.b CODE_05C6A6

CODE_05C633:
	SEC
	SBC.w #$0070
	CMP.w #$0020
	BCS.b CODE_05C682
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BMI.b CODE_05C654
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BPL.b CODE_05C654
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$04
	STY.b $76,x
	RTS

CODE_05C654:
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDY.b #$FF
	STY.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr122_BucketWithBandit
	ASL
	TAY
	STY.b $00
	LDA.w DATA_05C5E7,y
	JSL.l CODE_03A34C
	BCC.b CODE_05C67F
	STY.b $16,x
	LDX.b $00
	JSR.w (DATA_05C5E3,x)
CODE_05C67F:
	INC.b $76,x
	RTS

CODE_05C682:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BMI.b CODE_05C6A3
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BPL.b CODE_05C6A3
	LDA.w $7542,y
	BNE.b CODE_05C6A3
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	PHP
	LDA.w #$0800
	PLP
	BPL.b CODE_05C6A6
	LDA.w #$F800
	BRA.b CODE_05C6A6

CODE_05C6A3:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_05C6A6:
	STA.b $16,x
	LDY.b #$02
	STY.b $76,x
	RTS

DATA_05C6AD:
	dw $FFF8,$0000

CODE_05C6B1:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0006
	CMP.w $7182,x
	BPL.b CODE_05C6C7
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_05C6C7:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr122_BucketWithBandit
	ASL
	TAY
	STY.b $02
	LDA.w DATA_05C6AD,y
	STA.b $00
	LDY.b $16,x
	BMI.b CODE_05C6FA
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0002
	BEQ.b CODE_05C6FC
	CMP.w #$0010
	BNE.b CODE_05C6FA
	LDA.w $7182,y
	CLC
	ADC.b $00
	CMP.w $7182,x
	BMI.b CODE_05C6FC
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
CODE_05C6FA:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w $7542,x
	ORA.w $7222,x
	BNE.b CODE_05C6FC
endif
	STZ.b $76,x
CODE_05C6FC:
	RTS

DATA_05C6FD:
	dw $0020,$0040,$FFC0,$FFE0,$0040,$0040,$FFC0,$FFC0

CODE_05C70D:
	TYX
	LDA.w $7A38,x
	CLC
	ADC.b $16,x
	STA.w $7A38,x
	SEC
	SBC.w #$7C00
	CMP.w #$0800
	BCS.b CODE_05C729
	LDA.w #$0010
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_05C729:
	LDY.b #$00
CODE_05C72B:
	LDA.w $7A38,x
	BMI.b CODE_05C736
	TYA
	CLC
	ADC.w #$0004
	TAY
CODE_05C736:
	LDA.b $16,x
	BPL.b CODE_05C73C
	INY
	INY
CODE_05C73C:
	CLC
	ADC.w DATA_05C6FD,y
	STA.b $00
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05C75D
	LDA.w $7A38,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_05C75D
	STZ.w $7A38,x
	STZ.b $76,x
	RTS

CODE_05C75D:
	LDA.b $00
	STA.b $16,x
	RTS

DATA_05C762:
	dw CODE_05C82A
	dw CODE_05C85F

CODE_05C766:
	TYX
	LDY.b #$08
	LDA.w $7A38,x
	CLC
	ADC.b $16,x
	STA.w $7A38,x
	SEC
	SBC.w #$7C00
	CMP.w #$0800
	BCS.b CODE_05C72B
	LDA.w $7A96,x
	BNE.b CODE_05C729
	LDA.w #$8000
	STA.w $7A38,x
	TXY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr122_BucketWithBandit
	ASL
	TAX
	JSR.w (DATA_05C762,x)
	LDA.w #$0030
	STA.w $7A96,x
	STA.b $18,x
	INC.b $76,x
	RTS

CODE_05C79E:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05C7D3
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$8000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $6FA2,x
	AND.w #$001F
	BEQ.b CODE_05C7D3
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05C7D3
	LDA.w #$2000
	STA.w $6FA2,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID2F_ClankSound8
	JSL.l CODE_0085D2
CODE_05C7D3:
	RTS

CODE_05C7D4:
	LDX.b $12
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7182,y
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0017
	STA.w $7402,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	RTS

CODE_05C7F9:
	LDX.b $12
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $7182,y
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FFFF
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	LDA.w #$0007
	STA.w $74A2,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	RTS

CODE_05C82A:
	TYX
	LDA.w #$0020
	JSL.l CODE_03A34C
	BCC.b CODE_05C84A
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,y
	LDA.w #$0017
	STA.w $7402,y
CODE_05C84A:
	RTS

DATA_05C84B:
	dw $0004,$0000,$FFFC,$FFFF,$0002

DATA_05C855:
	dw $FFFC,$0004,$0002,$FFFE,$FFF8

CODE_05C85F:
	TYX
	LDY.b #$08
CODE_05C862:
	PHY
	LDA.w DATA_05C84B,y
	STA.b $00
	LDA.w DATA_05C855,y
	STA.b $02
	LDA.w #$0115
	JSL.l CODE_03A364
	BCC.b CODE_05C8AC
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $02
	STA.w $7182,y
	LDA.w #$FFFF
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	LDA.w #$0007
	STA.w $74A2,y
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	PLY
	DEY
	DEY
	BPL.b CODE_05C862
	PHY
CODE_05C8AC:
	PLY
	RTS

;---------------------------------------------------------------------------

DATA_05C8AE:
	dw CODE_05C8F6
	dw CODE_05C922
	dw CODE_05C958
	dw CODE_0580C2

YI_NorSpr021_Bucket_Main:
;$05C8B6
	JSR.w CODE_05C4D5
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05C8AE,x)
	JSR.w CODE_05C571
	JSR.w CODE_05C591
	LDY.b $76,x
	CPY.b #$02
	BMI.b CODE_05C8F5
	LDA.w $7C16,x
	CLC
	ADC.w #$0014
	CMP.w #$0028
	BCS.b CODE_05C8F5
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w #$000C
	BPL.b CODE_05C8F5
	CMP.w #$FFE4
	BMI.b CODE_05C8F5
	LDA.w #$0010
	STA.w $0CCA
CODE_05C8F5:
	RTL

CODE_05C8F6:
	TYX
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05C921
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05C921
	LDA.w $7D38,y
	BEQ.b CODE_05C921
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$8000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.b $76,x
CODE_05C921:
	RTS

CODE_05C922:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05C943
	LDA.w #$4000
	STA.w $6FA2,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$03
	STY.b $76,x
	LDA.w #!Define_YI_SoundID2F_ClankSound8
	JSL.l CODE_0085D2
	RTS

CODE_05C943:
	LDY.w $7862,x
	BEQ.b CODE_05C953
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LSR
	LSR
	LSR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_05C953:
	RTS

DATA_05C954:
	dw $0200,$FF80

CODE_05C958:
	TYX
	LDY.b #$02
	LDA.w $7862,x
	AND.w #$00FF
	BNE.b CODE_05C965
	DEY
	DEY
CODE_05C965:
	LDA.w DATA_05C954,y
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05C974
	EOR.w #$FFFF
	INC
CODE_05C974:
	CLC
	ADC.w #$0080
	AND.w #$FF00
	XBA
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.w #$0010
	STA.w $7542,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
	JSR.w CODE_05C9A4
	RTS

;---------------------------------------------------------------------------

DATA_05C994:
	dw $FFF0,$0010

DATA_05C998:
	dw $0080,$FF80

DATA_05C99C:
	dw $000C,$0002

DATA_05C9A0:
	dw $0008,$FFFE

CODE_05C9A4:
	LDY.b $16,x
	LDA.w DATA_05C99C,y
	STA.w $7720,x
	LDY.w $60AB
	BMI.b CODE_05C9B6
	LDY.w $0D94
	BEQ.b CODE_05C9C4
CODE_05C9B6:
	CPX.w $61B6
	BNE.b CODE_05C9C1
	STZ.w $61B6
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_05C9C1:
	JMP.w CODE_05CA90

CODE_05C9C4:
	CPX.w $61B6
	BNE.b CODE_05C9DD
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
	LDA.w $7C18,x
	SEC
	SBC.w $72C2,x
	STA.w $7C18,x
CODE_05C9DD:
	LDA.w $7C16,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05C9B6
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	CLC
	ADC.w #$0008
	BPL.b CODE_05C9B6
	CMP.w #$FFF8
	BMI.b CODE_05C9B6
	STA.b $00
	LDY.w $61B6
	BNE.b CODE_05CA10
	LDA.w $7C16,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STX.w $61B6
	LDY.b #!Define_YI_PlayerState02_InCutscene
	STY.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_05CA10:
	CPX.w $61B6
	BNE.b CODE_05C9C1
	LDY.b $16,x
	LDA.w DATA_05C9A0,y
	STA.w $7720,x
	LDA.w $6086
	ORA.w $6088
	ORA.w #$0C00
	AND.w $0035
	STA.w $617A
	LDA.w $0037
	AND.w #$FCFF
	STA.w $617C
	LDA.b $00
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC
	SEC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	LDA.w #$0010
	CMP.w $61D6
	BMI.b CODE_05CA51
	STA.w $61D6
CODE_05CA51:
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60AA
	STZ.w !EXRAM_YI_Player_SubXPosLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Player_SubYPosLo|!EXRAMBankMirror
	STZ.w $60D4
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$FFFD
	BEQ.b CODE_05CA75
	BPL.b CODE_05CA72
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_05CA75

CODE_05CA72:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05CA75:
	LDA.w $7C16,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDY.w $6150
	BNE.b CODE_05CA90
	LDA.w $0036
	AND.w #$0003
	BNE.b CODE_05CAC6
CODE_05CA90:
	LDA.w $7A38,x
	BEQ.b CODE_05CAB2
	BPL.b CODE_05CA9D
	CLC
	ADC.w #$0080
	BRA.b CODE_05CAA1

CODE_05CA9D:
	SEC
	SBC.w #$0080
CODE_05CAA1:
	STA.w $7A38,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_05CAB2
	STZ.w $7A38,x
	STZ.b $18,x
CODE_05CAB2:
	STZ.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC
	INC
	CMP.w #$0004
	BCS.b CODE_05CAC5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_05CAC5:
	RTS

CODE_05CAC6:
	AND.w #$0002
	STA.w $60C4
	TAY
	LDA.w DATA_05C998,y
	STA.w $75E0,x
	LDA.w #$0002
	STA.w $7540,x
	LDA.b $18,x
	CLC
	ADC.w DATA_05C994,y
	CMP.w #$0100
	BMI.b CODE_05CAE7
	LDA.w #$0100
CODE_05CAE7:
	CMP.w #$FF00
	BPL.b CODE_05CAEF
	LDA.w #$FF00
CODE_05CAEF:
	STA.b $18,x
	LDA.w $7A38,x
	CLC
	ADC.b $18,x
	CMP.w #$1000
	BMI.b CODE_05CAFF
	LDA.w #$1000
CODE_05CAFF:
	CMP.w #$F000
	BPL.b CODE_05CB07
	LDA.w #$F000
CODE_05CB07:
	STA.w $7A38,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr01C_DrFreezegood_Init:
;$05CB0B
	LDY.b $77,x
	BEQ.b CODE_05CB25
	JSL.l CODE_03AD74
	BCS.b CODE_05CB21
	LDY.b $77,x
	LDA.w #$0000
	STA.w $7A38,y
	JML.l CODE_03A31E

CODE_05CB21:
	JSR.w CODE_05CC2E
	RTL

CODE_05CB25:
	JSL.l CODE_03AE60
	JSR.w CODE_05CC2E
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03D400
	BNE.b CODE_05CB59
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.b #$10
	LSR
	LSR
	ORA.b $00
	STA.b $18,x
	REP.b #$20
CODE_05CB59:
	LDY.b #$02
	STY.b $76,x
	RTL

;---------------------------------------------------------------------------

DATA_05CB5E:
	dw CODE_05D0A8
	dw CODE_05D0C7
	dw CODE_05D0E4

YI_NorSpr01C_DrFreezegood_Main:
;$05CB64
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_05CB7A
	CMP.w #$0012
	BNE.b CODE_05CB77
	PLY
	PLA
CODE_05CB77:
	JSR.w CODE_05D152
CODE_05CB7A:
	JSL.l CODE_03AF23
	JSR.w CODE_05CB93
	JSR.w CODE_05CBBC
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05CB5E,x)
	JSR.w CODE_05CC1F
	JSR.w CODE_05CC68
	RTL

CODE_05CB93:
	LDA.w $7A36,x
	BIT.w #$FF00
	BEQ.b CODE_05CB9E
	ORA.w #$FF00
CODE_05CB9E:
	STA.b $00
	LDA.w $7A38,x
	SEC
	SBC.b $00
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.b $00
	AND.w #$01FE
	STA.w $7A36,x
CODE_05CBB7:
	RTS

DATA_05CBB8:
	dw $FD00,$0300

CODE_05CBBC:
	LDY.b $77,x
	BNE.b CODE_05CBB7
	LDY.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	BEQ.b CODE_05CBD0
	PHP
	LDY.b #$00
	PLP
	BPL.b CODE_05CBCD
	INY
	INY
CODE_05CBCD:
	LDA.w DATA_05CBB8,y
CODE_05CBD0:
	STA.w $75E0,x
	LDA.w #$0000
	LDY.b $19,x
	BNE.b CODE_05CC06
	LDA.w $7A38,x
	LDY.w $7400,x
	BEQ.b CODE_05CBE6
	EOR.w #$FFFF
	INC
CODE_05CBE6:
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_05CC06
	EOR.w #$FFFF
	INC
CODE_05CC06:
	CLC
	ADC.w #$0004
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	BPL.b CODE_05CC17
	EOR.w #$FFFF
	INC
CODE_05CC17:
	XBA
	AND.w #$00FF
	STA.w $7720,x
	RTS

CODE_05CC1F:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_05CC67
CODE_05CC2E:
	LDA.w #FXDATA_540000+$2041
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$2041)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A36,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05CC67:
	RTS

CODE_05CC68:
	LDY.w $7D36,x
	BEQ.b CODE_05CC67
	BMI.b CODE_05CCA6
	SEP.b #$20
	LDA.b #$00
	STA.b $19,x
	REP.b #$20
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_05CC67
	LDA.w $7D37,y
	BEQ.b CODE_05CC67
	LDA.w $7541,y
	STA.b $00
	TYX
	DEX
	JSL.l CODE_03B24B
	BCC.b CODE_05CC9C
	LDA.w $6FA0,x
	ORA.w #$0200
	STA.w $6FA0,x
	PLA
	RTL

CODE_05CC9C:
	LDA.b $00
	CMP.w #$0040
	BCS.b CODE_05CC67
	JMP.w CODE_05D152

CODE_05CCA6:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_05CCD1
	LDY.b #$00
	STY.b $19,x
	LDY.w $60AB
	BMI.b CODE_05CD15
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	LDA.w #$FC00
	STA.w $60AA
	JMP.w CODE_05D152

CODE_05CCD1:
	LDA.w $7C16,x
	BPL.b CODE_05CCE0
	CLC
	ADC.w $6120
	CLC
	ADC.w $7BB6,x
	BRA.b CODE_05CCE8

CODE_05CCE0:
	SEC
	SBC.w $6120
	SEC
	SBC.w $7BB6,x
CODE_05CCE8:
	STA.b $06
	STZ.b $00
	LDY.b $19,x
	BEQ.b CODE_05CCF5
	JSR.w CODE_05CD55
	BRA.b CODE_05CCF9

CODE_05CCF5:
	JSL.l CODE_05CDF9
CODE_05CCF9:
	LDA.w $60FC
	AND.b $00
	BEQ.b CODE_05CD14
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $603E
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_05CD14:
	RTS

CODE_05CD15:
	LDA.w $60A8
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	LDY.w $77C2,x
	BEQ.b CODE_05CD36
	LDA.w #$0200
CODE_05CD36:
	STA.w $60A8
	STA.w $60B4
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	RTS

DATA_05CD49:
	dw $0280,$FD80

DATA_05CD4D:
	dw $0002,$FFFE

DATA_05CD51:
	dw $0180,$0060

CODE_05CD55:
	LDA.b $78,x
	AND.w #$FF00
	STA.b $04
	LDA.w $0035
	BIT.b $04
	BEQ.b CODE_05CD68
	AND.w $6084
	BEQ.b CODE_05CD7F
CODE_05CD68:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.b $06
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	LDY.b #$00
	STY.b $19,x
	RTS

CODE_05CD7F:
	LDA.b $05
	AND.w #$0002
	TAY
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.b $06
	CLC
	ADC.w DATA_05CD4D,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7C16,x
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05CD9F
	LDA.w DATA_05CD51,y
	STA.b $00
CODE_05CD9F:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05CDAD
	SEC
	SBC.w $60A8
	EOR.w $7C16,x
	BPL.b CODE_05CDF5
CODE_05CDAD:
	LDA.w $60DE
	ORA.w $6150
	BNE.b CODE_05CDF8
	INC.w $61C2
	LDA.w $60A8
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $0E
	CLC
	ADC.w #$0280
	LDY.b #$00
	CMP.w #$0500
	BCC.b CODE_05CDF0
	BPL.b CODE_05CDEB
	INY
	INY
CODE_05CDEB:
	LDA.w DATA_05CD49,y
	STA.b $0E
CODE_05CDF0:
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05CDF5:
	INC.w $60DC
CODE_05CDF8:
	RTS

CODE_05CDF9:
	LDY.w $60C0
	BEQ.b CODE_05CE01
	JMP.w CODE_05CE4B

CODE_05CE01:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05CE0E
	LDA.w $60A8
	BNE.b CODE_05CE21
	JMP.w CODE_05CFF0

CODE_05CE0E:
	LDA.w $60A8
	BNE.b CODE_05CE1C
	LDA.w $7C16,x
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05CE4B
CODE_05CE1B:
	RTL

CODE_05CE1C:
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05CE2C
CODE_05CE21:
	LDA.w $7C16,x
	EOR.w $60A8
	BMI.b CODE_05CE1B
	JMP.w CODE_05CF16

CODE_05CE2C:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $60A8
	EOR.w $60A8
	BPL.b CODE_05CE43
	LDA.w $7C16,x
	EOR.w $60A8
	BMI.b CODE_05CE21
	JMP.w CODE_05CF16

CODE_05CE43:
	LDA.w $7C16,x
	EOR.w $60A8
	BPL.b CODE_05CE21
CODE_05CE4B:
	LDA.w $0035
	AND.w #$0300
	BEQ.b CODE_05CE7A
	AND.w #$0200
	DEC
	EOR.w $7C16,x
	BPL.b CODE_05CE7A
	LDA.w $60A8
	BPL.b CODE_05CE65
	EOR.w #$FFFF
	INC
CODE_05CE65:
	AND.w #$FF00
	XBA
	INC
	LDY.w $77C2,x
	BEQ.b CODE_05CE73
	EOR.w #$FFFF
	INC
CODE_05CE73:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05CE7A:
	LDA.w #$0160
	STA.w $093A
	LDA.w $60C0
	ORA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	ORA.w $60DE
	ORA.w $6150
	BNE.b CODE_05CE9F
	LDA.w $7974
	AND.w #$0007
	ASL
	TAX
	LDA.l FXDATA_0AF6AF,x
	STA.w $60BE
	LDX.b $12
CODE_05CE9F:
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	DEC
	ASL
	CLC
	ADC.b $06
CODE_05CEAB:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $6120
	LDY.w $77C2,x
	BNE.b CODE_05CEBA
	EOR.w #$FFFF
	INC
CODE_05CEBA:
	CLC
	ADC.w $611C
	STA.b $02
	STA.w $6020
	STA.w $6024
	LDA.w $611E
	SEC
	SBC.w #$0004
	STA.w $6022
	CLC
	ADC.w #$0008
	STA.w $6026
	STZ.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0AEA19>>16
	LDA.w #FXCODE_0AEA19
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w $6020
	SEC
	SBC.b $02
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	BEQ.b CODE_05CF15
	LDY.w $77C2,x
	TYA
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05CF15
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $60A8
	STZ.w $60B4
CODE_05CF15:
	RTL

CODE_05CF16:
	LDA.w $0035
	AND.w #$0300
	BNE.b CODE_05CF21
	JMP.w CODE_05CE4B

CODE_05CF21:
	AND.w #$0200
	DEC
	EOR.w $7C16,x
	BMI.b CODE_05CF2D
	JMP.w CODE_05CE9F

CODE_05CF2D:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05CF37
	EOR.w $60A8
	BPL.b CODE_05CF55
CODE_05CF37:
	LDA.w $60A8
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	LDY.w $60C0
	BEQ.b CODE_05CF68
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	BRA.b CODE_05CF68

CODE_05CF55:
	LDA.w $60A8
	AND.w #$FF00
	XBA
	TAY
	BPL.b CODE_05CF62
	ORA.w #$FF00
CODE_05CF62:
	LDY.w $60C0
	BNE.b CODE_05CF68
	ASL
CODE_05CF68:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $08
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05CF8C
	EOR.w $60A8
	BPL.b CODE_05CF8C
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $60A8
	CLC
	ADC.w #$0200
	CMP.w #$0400
	BCC.b CODE_05CF8C
	JSR.w CODE_05CD15
	RTL

CODE_05CF8C:
	LDA.b $08
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	INC.b $19,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr01C_DrFreezegood
	BNE.b CODE_05CFB8
	STZ.b $16,x
	LDA.w $0035
	AND.w #$0300
	CMP.w #$0300
	BNE.b CODE_05CFB1
	AND.w #$0100
CODE_05CFB1:
	ORA.w #$0010
	STA.b $78,x
	BRA.b CODE_05CFF0

CODE_05CFB8:
	TAY
	PHY
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.b $78,x
	LDA.w $0035
	AND.w #$0300
	CMP.w #$0300
	BNE.b CODE_05CFD0
	AND.w #$0100
CODE_05CFD0:
	PLY
	CPY.b #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_05CFDA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_05CFDD

CODE_05CFDA:
	STA.w $7A36,x
CODE_05CFDD:
	LDY.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	BEQ.b CODE_05CFE5
	JMP.w CODE_05CE9F

CODE_05CFE5:
	LDY.w $77C2,x
	TYA
	DEC
	ASL
	SEC
	SBC.b $06
	BRA.b CODE_05CFF6

CODE_05CFF0:
	LDA.b $06
	EOR.w #$FFFF
	INC
CODE_05CFF6:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	STA.b $02
	LDA.w $7BB6,x
	LDY.w $77C2,x
	BEQ.b CODE_05D007
	EOR.w #$FFFF
	INC
CODE_05D007:
	CLC
	ADC.w $7CD6,x
	STA.b $02
	STA.w $6020
	STA.w $6024
	LDA.w $7CD8,x
	SEC
	SBC.w #$0004
	STA.w $6022
	CLC
	ADC.w #$0008
	STA.w $6026
	STZ.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0AEA19>>16
	LDA.w #FXCODE_0AEA19
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w $6020
	SEC
	SBC.b $02
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	LDA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	BEQ.b CODE_05D0A7
	LDY.b $07
	BPL.b CODE_05D04C
	EOR.w #$FFFF
	INC
CODE_05D04C:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $6120
	LDY.w $77C2,x
	BNE.b CODE_05D05B
	EOR.w #$FFFF
	INC
CODE_05D05B:
	CLC
	ADC.w $611C
	STA.b $02
	STA.w $6020
	STA.w $6024
	LDA.w $611E
	SEC
	SBC.w #$0004
	STA.w $6022
	CLC
	ADC.w #$0008
	STA.w $6026
	STZ.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0AEA19>>16
	LDA.w #FXCODE_0AEA19
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w $6020
	SEC
	SBC.b $02
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $60A8
	STZ.w $60B4
CODE_05D0A7:
	RTL

CODE_05D0A8:
	TYX
	LDA.w $7C16,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05D0C6
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BEQ.b CODE_05D0C6
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
CODE_05D0C6:
	RTS

CODE_05D0C7:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05D0E3
	LDY.b $77,x
	LDA.w #$0000
	STA.w $7A38,y
	TAY
	STY.b $77,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	INC.b $76,x
CODE_05D0E3:
	RTS

CODE_05D0E4:
	TYX
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_05D13F
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	ASL
	PHP
	BIT.w #$FF00
	BEQ.b CODE_05D0FA
	ORA.w #$FF00
CODE_05D0FA:
	LDY.w $7400,x
	BEQ.b CODE_05D103
	EOR.w #$FFFF
	INC
CODE_05D103:
	STA.w $7A38,x
	PLP
	BNE.b CODE_05D124
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05D124
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	BRA.b CODE_05D13F

CODE_05D124:
	LDY.w $7720,x
	CPY.b #$04
	BPL.b CODE_05D12E
	INC.w $7720,x
CODE_05D12E:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_05D13F
	JMP.w CODE_05D152

CODE_05D139:
	STZ.w $7A38,x
	STZ.w $7720,x
CODE_05D13F:
	LDY.b $18,x
	CPY.b #$06
	BNE.b CODE_05D151
	LDA.w $7C16,x
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCC.b CODE_05D152
CODE_05D151:
	RTS

CODE_05D152:
	LDY.b $18,x
	BEQ.b CODE_05D18B
	DEY
	DEY
	BNE.b CODE_05D160
	JSL.l CODE_0D9329
	BRA.b CODE_05D17F

CODE_05D160:
	DEY
	DEY
	BNE.b CODE_05D16A
	JSL.l CODE_03A496
	BRA.b CODE_05D17F

CODE_05D16A:
	LDA.w #$019B
	JSL.l CODE_03A34C
	BCC.b CODE_05D151
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
CODE_05D17F:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03D3F3
CODE_05D18B:
	LDA.w #!Define_YI_AmbSpr1CC
	JSL.l CODE_008B21
	LDA.w #$0008
	STA.w $7E4C,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05D1B8
	LDA.w #$0000
CODE_05D1B8:
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID37_FlutterJump
	JSL.l CODE_0085D2
	LDY.b $77,x
	BEQ.b CODE_05D1CC
	LDA.w #$0000
	STA.w $7A38,y
CODE_05D1CC:
	PLA
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

DATA_05D1D1:
	dw $0022,$0024,$0020

YI_NorSpr078_RedBulletBillShooter_Init:
YI_NorSpr079_YellowBulletBillShooter_Init:
YI_NorSpr07A_GreenBulletBillShooter_Init:
;$05D1D7
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr078_RedBulletBillShooter
	ASL
	TAY
	STY.b $18,x
	LDA.w DATA_05D1D1,y
	STA.w $7042,x
	CPY.b #$02
	BNE.b CODE_05D22E
	JSL.l CODE_03AE60
	LDY.b #$04
	STY.b $77,x
	JSR.w CODE_05D32B
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w #$0080
	CMP.w #$0100
	BCS.b CODE_05D228
	STZ.w $7400,x
	BRA.b CODE_05D22E

CODE_05D228:
	LDA.w #$0002
	STA.w $7400,x
CODE_05D22E:
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TAY
	STY.b $19,x
	RTL

;---------------------------------------------------------------------------

DATA_05D238:
	dw CODE_05D4FA
	dw CODE_05D577
	dw CODE_05D5A1

DATA_05D23E:
	dw $0010,$FFF0

DATA_05D242:
	dw $FFF8,$0008

YI_NorSpr078_RedBulletBillShooter_Main:
YI_NorSpr079_YellowBulletBillShooter_Main:
YI_NorSpr07A_GreenBulletBillShooter_Main:
;$05D246
	JSR.w CODE_05D2B9
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BMI.b CODE_05D275
	LDA.w $7D96,x
	BNE.b CODE_05D260
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_05D260
	LDA.w $0B65
	BEQ.b CODE_05D26F
CODE_05D260:
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_05D275

CODE_05D26F:
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
CODE_05D275:
	JSL.l CODE_03AF23
	JSR.w CODE_05D37E
	TXY
	LDA.b $76,x
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_05D238,x)
	JSR.w CODE_05D32B
	JSR.w CODE_05D43A
	LDY.b $18,x
	CPY.b #$02
	BNE.b CODE_05D2B8
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_05D2B8
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr07C_YellowBulletBill
	BNE.b CODE_05D2B2
	LDA.w $7D96,y
	BNE.b CODE_05D2B2
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
CODE_05D2A7:
	CMP.w #$0010
	BEQ.b CODE_05D2B8
	CMP.w #$0002
	BEQ.b CODE_05D2B8
CODE_05D2B2:
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_05D2B8:
	RTL

CODE_05D2B9:
	LDY.w $7723,x
	BMI.b CODE_05D324
	LDY.w $7400,x
	LDA.w DATA_05D23E,y
	STA.b $00
	LDA.w DATA_05D242,y
	STA.b $02
	LDA.w #$FFF0
	LDY.w $7042,x
	BPL.b CODE_05D2D6
	LDA.w #$0010
CODE_05D2D6:
	STA.b $04
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0008
	TAY
	LDA.w $7680,x
	CLC
	ADC.b $02
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.b $00
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $7682,x
	CLC
	ADC.b $04
	STA.w $6002,y
	STA.w $600A,y
	SEC
	SBC.b $04
	STA.w $6012,y
	STA.w $601A,y
	LDA.w $6006,y
	ORA.w #$0002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	JSL.l CODE_03AA60
	SEP.b #$10
CODE_05D324:
	RTS

DATA_05D325:
	dw FXDATA_548000+$0010,FXDATA_548000+$0000,FXDATA_548000+$3000

CODE_05D32B:
	LDY.w $7723,x
	BMI.b CODE_05D37D
	LDY.b $77,x
	LDA.w DATA_05D325,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$0000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STZ.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D6EB>>16
	LDA.w #FXCODE_08D6EB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05D37D:
	RTS

CODE_05D37E:
	LDA.w #$0005
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $6120
	STA.b $04
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_05D37D
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $6122
	ASL
	STA.b $02
	LSR
	CLC
	ADC.w $7C18,x
	CMP.b $02
	BCS.b CODE_05D37D
	CMP.w #$0008
	BCS.b CODE_05D3E6
	LDY.w $60AB
	BPL.b CODE_05D37D
	STZ.w $60D2
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
CODE_05D3E5:
	RTS

CODE_05D3E6:
	SEC
	SBC.b $02
	CMP.w #$FFF6
	BCC.b CODE_05D407
	LDY.w $60C0
	BEQ.b CODE_05D3F8
	LDY.w $60AB
	BMI.b CODE_05D3E5
CODE_05D3F8:
	INC.w $61B4
	INC
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	RTS

CODE_05D407:
	LDA.w $60A8
	BNE.b CODE_05D413
	LDA.w $60C4
	EOR.w #$0002
	DEC
CODE_05D413:
	STA.b $06
	EOR.w $7C16,x
	BMI.b CODE_05D439
	LDA.b $04
	LDY.b $07
	BMI.b CODE_05D424
	EOR.w #$FFFF
	INC
CODE_05D424:
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $60A8
	STZ.w $60B4
CODE_05D439:
	RTS

CODE_05D43A:
	LDY.b $79,x
	BEQ.b CODE_05D439
	LDY.b #$00
	STY.b $79,x
	LDA.w $7A38,x
	SEC
	SBC.w #$0100
	EOR.w $6024
	BMI.b CODE_05D457
	LDA.w $6024
	EOR.w #$FFFF
	STA.w $6024
CODE_05D457:
	LDA.w #!Define_YI_AmbSpr1D5
	JSL.l CODE_008B21
	LDA.w #$0006
	STA.w $7E4C,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $70E2,x
	SEC
	SBC.w $6022
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	SEC
	SBC.w $6020
	STA.w $7142,y
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BMI.b CODE_05D439
	LDA.w #$0100
	STA.w $7A36,y
	LDA.w $7A38,x
	STA.w $7A38,y
	LDA.w $70E2,x
	SEC
	SBC.w $6022
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	SEC
	SBC.w $6020
	STA.w $7182,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w $6024
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $6026
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$6820
	STA.w $6FA0,y
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	SEC
	SBC.w #!Define_YI_NorSpr07B_RedBulletBill
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0030
	STA.w $7A98,y
	LDA.w #$0200
	STA.w $7AF6,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	ORA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

DATA_05D4F6:
	dw $0000,$0100

CODE_05D4FA:
	TYX
	LDY.b $18,x
	CPY.b #$02
	BNE.b CODE_05D531
	LDA.w #$0004
	JSR.w CODE_058000
	LDA.w $7A98,x
	BNE.b CODE_05D530
	LDY.b $19,x
	BEQ.b CODE_05D520
	LDA.w $7680,x
	CLC
	ADC.w #$0010
	CMP.w #$0110
	BCS.b CODE_05D530
	LDY.b #$00
	STY.b $19,x
CODE_05D520:
	JSR.w CODE_05D602
	BCC.b CODE_05D530
	LDA.w #$0174
	STA.w $7A36,x
	LDA.w #$0001
	STA.b $76,x
CODE_05D530:
	RTS

CODE_05D531:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	TAY
	LDA.w DATA_05D4F6,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_05D576
	LDY.b $19,x
	BEQ.b CODE_05D55A
	LDA.w $7680,x
	CLC
	ADC.w #$0010
	CMP.w #$0110
	BCS.b CODE_05D576
	LDY.b #$00
	STY.b $19,x
CODE_05D55A:
	JSL.l CODE_03AD74
	BCC.b CODE_05D576
	JSR.w CODE_05D602
	BCS.b CODE_05D56B
	JSL.l CODE_03AEFD
	BRA.b CODE_05D576

CODE_05D56B:
	LDA.w #$0174
	STA.w $7A36,x
	LDA.w #$0001
	STA.b $76,x
CODE_05D576:
	RTS

CODE_05D577:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w #$0004
	CMP.w #$01FF
	BMI.b CODE_05D595
	LDY.b #$02
	STY.b $16,x
	LDA.w #$0102
	STA.b $78,x
	LDA.w #$0202
	STA.b $76,x
	LDA.w #$01FF
CODE_05D595:
	STA.w $7A36,x
	RTS

DATA_05D599:
	dw $0010,$FFF0

DATA_05D59D:
	dw $0004,$0000

CODE_05D5A1:
	TYX
	LDY.b $78,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_05D599,y
	CMP.w #$01FF
	BMI.b CODE_05D5C0
	LDY.b #$02
	STY.b $77,x
	LDA.b $78,x
	EOR.w #$0002
	STA.b $78,x
	LDA.w #$01FF
	BRA.b CODE_05D5FE

CODE_05D5C0:
	CMP.w #$0199
	BPL.b CODE_05D5FE
	LDA.b $78,x
	EOR.w #$0002
	STA.b $78,x
	LDA.w #$0199
	DEC.b $16,x
	BNE.b CODE_05D5FE
	LDY.b #$00
	LDA.b $18,x
	AND.w #$00FF
	CMP.w #$0002
	BEQ.b CODE_05D5E1
	INY
	INY
CODE_05D5E1:
	LDA.w #$0100
	STA.w $7A98,x
	LDA.w DATA_05D59D,y
	STA.b $77,x
	LDA.w #$0100
	STA.w $7A36,x
	TYA
	BEQ.b CODE_05D5F9
	JSL.l CODE_03AEFD
CODE_05D5F9:
	LDY.b #$00
	STY.b $76,x
	RTS

CODE_05D5FE:
	STA.w $7A36,x
	RTS

CODE_05D602:
	LDY.b $18,x
	CPY.b #$02
	BNE.b CODE_05D613
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_05D635
CODE_05D613:
	TYA
	LSR
	CLC
	ADC.w #$007B
	TXY
	JSL.l CODE_03A34E
	BCC.b CODE_05D635
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr07D_GreenBulletBill
	BEQ.b CODE_05D639
	PHX
	TYX
	JSL.l CODE_03AD74
	BCS.b CODE_05D637
	JSL.l CODE_03A31E
	PLX
CODE_05D635:
	CLC
	RTS

CODE_05D637:
	TXY
	PLX
CODE_05D639:
	TYA
	SEP.b #$20
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	REP.b #$20
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $7042,x
	STA.w $7042,y
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	SEC
	RTS

;---------------------------------------------------------------------------

YI_NorSpr07B_RedBulletBill_Init:
;$05D661
	JSR.w CODE_05D77F
YI_NorSpr07D_GreenBulletBill_Init:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr07B_RedBulletBill_Main:
;$05D665
	LDY.w $74A2,x
	BMI.b CODE_05D673
	LDY.w $7723,x
	BMI.b CODE_05D673
	JSL.l CODE_03AA52
CODE_05D673:
	JSR.w CODE_05D71D
	JSL.l CODE_03AF23
	LDY.b $76,x
	BNE.b CODE_05D68B
	LDA.w $7A98,x
	BNE.b CODE_05D688
	INC.b $76,x
	JSR.w CODE_05D883
CODE_05D688:
	JMP.w CODE_05D6E8

CODE_05D68B:
	LDA.w $7AF6,x
	BNE.b CODE_05D6E2
	LDA.b $16,x
	BNE.b CODE_05D6C5
	LDY.b $76,x
	DEY
	BEQ.b CODE_05D6BC
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	JML.l CODE_03A31E

CODE_05D6BC:
	LDA.w #$0018
	STA.b $16,x
	INC.b $76,x
	BRA.b CODE_05D6C7

CODE_05D6C5:
	DEC.b $16,x
CODE_05D6C7:
	LDA.w $7042,x
	EOR.w #$000E
	STA.w $7042,x
	LDA.w $7A36,x
	SEC
	SBC.w #$0004
	CMP.w #$0040
	BPL.b CODE_05D6DF
	LDA.w #$0040
CODE_05D6DF:
	STA.w $7A36,x
CODE_05D6E2:
	JSR.w CODE_05D883
	JSR.w CODE_058073
CODE_05D6E8:
	JSR.w CODE_05D76A
	BRA.b CODE_05D6FA

YI_NorSpr07D_GreenBulletBill_Main:
;$05D6ED
	JSR.w CODE_05D71D
	JSL.l CODE_03AF23
	LDA.w #$0004
	STA.w $74A2,x
CODE_05D6FA:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	JSR.w CODE_05D7BB
	LDA.w $7A96,x
	BNE.b CODE_05D718
	LDA.w #$0006
	STA.w $7A96,x
	LDA.b $78,x
	EOR.w #$0002
	STA.b $78,x
CODE_05D718:
	RTL

DATA_05D719:
	dw $FE00,$0200

CODE_05D71D:
	LDY.w $7D38,x
	BEQ.b CODE_05D765
	LDY.w $7722,x
	BMI.b CODE_05D72B
	JSL.l CODE_03AEFD
CODE_05D72B:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w $7042,x
	PHA
	TXY
	LDA.w #!Define_YI_NorSpr07D_GreenBulletBill
	JSL.l CODE_03A377
	LDY.w $7400,x
	LDA.w DATA_05D719,y
	STA.w $75E0,x
	LDA.w #$0040
	STA.w $7542,x
	STA.w $7540,x
	LDA.w #$6820
	STA.w $6FA0,x
	PLA
	STA.w $7042,x
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	RTL

CODE_05D765:
	RTS

DATA_05D766:
	dw FXDATA_548000+$1000,FXDATA_548000+$0020

CODE_05D76A:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_05D7BA
	LDA.w #$0004
	STA.w $74A2,x
CODE_05D77F:
	LDY.b $78,x
	LDA.w DATA_05D766,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$0020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05D7BA:
	RTS

CODE_05D7BB:
	LDA.w #$000C
	JSR.w CODE_05D833
	BCS.b CODE_05D7BA
	LDA.w $7C18,x
	SEC
	SBC.b $02
	CMP.w #$FFF8
	BCC.b CODE_05D820
	LDY.w $60C0
	BEQ.b CODE_05D832
	LDY.w $60AB
	BMI.b CODE_05D832
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_05D7F5
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	STZ.w $60D4
	LDA.w #$8001
	STA.w $60D2
CODE_05D7F5:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0016
	STA.w $7542,x
	LDA.w #$02CC
	STA.w $75E2,x
	STZ.b $78,x
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w #!Define_YI_SoundID0B_ShellHit1
	JSL.l CODE_0085D2
	RTS

CODE_05D820:
	LDA.w #$0006
	JSR.w CODE_05D833
	BCS.b CODE_05D832
	STZ.w $60AA
	STZ.w $60D2
	JSL.l CODE_03A858
CODE_05D832:
	RTS

CODE_05D833:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !REGISTER_SuperFX_R4_LMULTResultLo
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $6120
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_05D87E
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $6122
	STA.b $02
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C18,x
	CMP.b $00
CODE_05D87E:
	RTS

DATA_05D87F:
	dw $009C,$FF64

CODE_05D883:
	LDA.w #$0005
	STA.w $7542,x
	STA.w $7540,x
	LDA.w $7A98,x
	BNE.b CODE_05D8B5
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #$00
	LDA.w $7C16,x
	BMI.b CODE_05D8A0
	INY
	INY
CODE_05D8A0:
	LDA.w DATA_05D87F,y
	STA.w $75E0,x
	LDY.b #$00
	LDA.w $7C18,x
	BMI.b CODE_05D8AF
	INY
	INY
CODE_05D8AF:
	LDA.w DATA_05D87F,y
	STA.w $75E2,x
CODE_05D8B5:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr07B_RedBulletBill_StompRt:
YI_NorSpr07C_YellowBulletBill_StompRt:
;$05D8B6
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_05D8D5
	LDA.w $7A38,x
	CLC
	ADC.w #$0002
	AND.w #$01FE
	STA.w $7A38,x
	JSR.w CODE_05D76A
CODE_05D8D5:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr07D_GreenBulletBill_StompRt:
;$05D8D6
	JML.l CODE_039F9F

;---------------------------------------------------------------------------

YI_NorSpr07C_YellowBulletBill_Init:
;$05D8DA
	JSR.w CODE_05D923
	RTL

;---------------------------------------------------------------------------

DATA_05D8DE:
	dw CODE_05D962
	dw CODE_05D9F2
	dw CODE_05DA6A
	dw CODE_05DA81

YI_NorSpr07C_YellowBulletBill_Main:
;$05D8E6
	LDY.w $74A2,x
	BMI.b CODE_05D8F4
	LDY.w $7723,x
	BMI.b CODE_05D8F4
	JSL.l CODE_03AA52
CODE_05D8F4:
	JSR.w CODE_05D71D
	LDA.w $7D96,x
	BEQ.b CODE_05D8FF
	STZ.w $6FA2,x
CODE_05D8FF:
	JSL.l CODE_03AF23
	LDA.w #$0004
	STA.w $74A2,x
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05D8DE,x)
	JSR.w CODE_05D923
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	JSR.w CODE_05D7BB
	RTL

CODE_05D923:
	LDA.w #FXDATA_548000+$0020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$0020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_05D962:
	TYX
	LDA.w #$0100
	STA.b $78,x
	STA.w $7A36,x
	JSR.w CODE_05D96F
	RTS

CODE_05D96F:
	LDA.w $7860,x
	AND.w #$000F
	BEQ.b CODE_05D9C5
	TAY
	STY.b $02
	LDA.w DATA_058F48-$01,y
	AND.w #$00FF
	CMP.w #$00FF
	BNE.b CODE_05D9AF
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05D98E
	EOR.w #$FFFF
	INC
CODE_05D98E:
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05D999
	EOR.w #$FFFF
	INC
CODE_05D999:
	CMP.b $00
	BPL.b CODE_05D9A6
	LDA.b $02
	AND.w #$0008
	LSR
	LSR
	BRA.b CODE_05D9AF

CODE_05D9A6:
	LDA.b $02
	AND.w #$0002
	CLC
	ADC.w #$0004
CODE_05D9AF:
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$01
	STY.b $76,x
	PLA
	RTS

CODE_05D9C5:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

DATA_05D9D2:
	dw $FE58,$FE80,$FEAC,$FF00,$FEAC,$FE80,$FE54,$0200
	dw $FFA8,$FF80,$FF54,$FE00,$FE54,$FE80,$FEA8,$FF00

CODE_05D9F2:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0008
	CMP.w #$00A0
	BPL.b CODE_05DA5D
	LDY.b $16,x
	CPY.b #$04
	BPL.b CODE_05DA0A
	LDA.w #$000E
	BRA.b CODE_05DA16

CODE_05DA0A:
	LDA.b $18,x
	CLC
	ADC.w #$0038
	AND.w #$00F0
	LSR
	LSR
	LSR
CODE_05DA16:
	LDY.w $7400,x
	BEQ.b CODE_05DA1F
	CLC
	ADC.w #$0010
CODE_05DA1F:
	TAY
	LDA.w DATA_05D9D2,y
	LDY.w $7400,x
	BNE.b CODE_05DA2E
	SEC
	SBC.w $7A38,x
	BRA.b CODE_05DA32

CODE_05DA2E:
	CLC
	ADC.w $7A38,x
CODE_05DA32:
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0166
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_058073
	INC.b $76,x
	LDA.w #$00A0
CODE_05DA5D:
	STA.w $7A36,x
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.b $78,x
	RTS

CODE_05DA6A:
	TYX
	JSR.w CODE_05D96F
	LDA.w $7A36,x
	CLC
	ADC.w #$0008
	CMP.w #$0130
	BMI.b CODE_05DA7F
	INC.b $76,x
	LDA.w #$0130
CODE_05DA7F:
	BRA.b CODE_05DA5D

CODE_05DA81:
	TYX
	JSR.w CODE_05D96F
	LDA.w $7A36,x
	SEC
	SBC.w #$0004
	CMP.w #$0100
	BPL.b CODE_05DA96
	STZ.b $76,x
	LDA.w #$0100
CODE_05DA96:
	BRA.b CODE_05DA5D

;---------------------------------------------------------------------------

YI_NorSpr0AD_MessageBox_Init:
;$05DA98
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w $7182,x
	STA.b $78,x
	LDA.w #$0001
	STA.w $7402,x
	JSR.w CODE_05DB79
	RTL

;---------------------------------------------------------------------------

DATA_05DAB1:
	dw CODE_0580C2
	dw CODE_05DBC8
	dw CODE_05DC05

DATA_05DAB7:
	dw FXDATA_550000+$6010,FXDATA_550000+$7010

DATA_05DABB:
	dw $0018,$FFE8

DATA_05DABF:
	dw $0020,$FFE0

YI_NorSpr0AD_MessageBox_Main:
;$05DAC3
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_05DADA
	JSL.l CODE_03B69D
	JSL.l CODE_03B716
CODE_05DADA:
	STZ.w $7400,x
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05DAB1,x)
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_05DAF4
	LDY.b $76,x
	BEQ.b CODE_05DAF7
CODE_05DAF4:
	JSR.w CODE_05DB79
CODE_05DAF7:
	LDY.b $76,x
	BNE.b CODE_05DB74
	LDY.w $60AB
	BPL.b CODE_05DB46
	LDY.w $60C0
	BEQ.b CODE_05DB46
	LDA.w $7C16,x
	CLC
	ADC.w #$000C
	CMP.w #$0018
	BCS.b CODE_05DB46
	LDA.w $7C18,x
	CMP.w #$FFE8
	BMI.b CODE_05DB46
	CMP.w #$FFF0
	BPL.b CODE_05DB46
	STZ.w $60AA
	STZ.w $60D2
CODE_05DB24:
	DEC.w $7182,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0034
	STA.w $7542,x
	STZ.w $7A38,x
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_0085D2
	INC.b $76,x
	RTL

CODE_05DB46:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05DB60
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05DB60
	LDA.w $7D38,y
	BEQ.b CODE_05DB60
	TYX
	JSL.l CODE_03B25B
	BRA.b CODE_05DB24

CODE_05DB60:
	LDA.w $7A98,x
	BNE.b CODE_05DB74
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w $7A38,x
	EOR.w #$0002
	STA.w $7A38,x
CODE_05DB74:
	JSL.l CODE_03D127
	RTL

CODE_05DB79:
	LDY.w $7A38,x
	LDA.w DATA_05DAB7,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$6010)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEC
	SBC.w #$0100
	LSR
	STA.b $00
	LDA.w #$0100
	SEC
	SBC.b $00
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $7722,x
	TAX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0882FA>>16
	LDA.w #FXCODE_0882FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_05DBC8:
	TYX
	LDA.b $78,x
	CMP.w $7182,x
	BPL.b CODE_05DBDF
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_05DBDF:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05DBE8
	INY
	INY
CODE_05DBE8:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_05DABB,y
	CMP.w #$00A0
	BPL.b CODE_05DBF9
	LDA.w #$00A0
	BRA.b CODE_05DC01

CODE_05DBF9:
	CMP.w #$01FF
	BMI.b CODE_05DC01
	LDA.w #$01FF
CODE_05DC01:
	STA.w $7A36,x
	RTS

CODE_05DC05:
	TYX
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_05DABF,y
	CPY.b #$00
	BEQ.b CODE_05DC58
	CMP.w #$0100
	BPL.b CODE_05DC66
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	TAY
	LDA.w $7182,x
	AND.w #$0010
	BEQ.b CODE_05DC2E
	INY
	INY
CODE_05DC2E:
	TYA
	STA.b $00
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	ASL
	ASL
	CLC
	ADC.b $00
	STA.l $704070
	CMP.w #$0001
	BNE.b CODE_05DC4E
	LDA.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	BEQ.b CODE_05DC4E
	LDA.w #$011C
	STA.l $704070
CODE_05DC4E:
	INC.w !RAM_YI_Level_MessageBoxState 
	STZ.b $76,x
	LDA.w #$0100
	BRA.b CODE_05DC66

CODE_05DC58:
	CMP.w #$0160
	BMI.b CODE_05DC66
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0160
CODE_05DC66:
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

DATA_05DC6A:
	dw $FFC0,$0040

DATA_05DC6E:
	dw $0100,$FF00,$0100

YI_NorSpr10F_BooManBluff_Init:
;$05DC74
	LDY.w $7400,x
	LDA.w DATA_05DC6A,y
	STA.w $75E0,x
	LDA.w #$0006
	STA.w $7540,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CMP.w $7182,x
	BMI.b CODE_05DC8F
	INY
	INY
CODE_05DC8F:
	LDA.w DATA_05DC6E,y
	STA.w $75E2,x
	LDA.w DATA_05DC6E+$02,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0026
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

DATA_05DCA8:
	dw CODE_05DF60
	dw CODE_05DF9B
	dw CODE_05DFCC
	dw CODE_05DFDE
	dw CODE_05E010
	dw CODE_05E027
	dw CODE_05E04A
	dw CODE_05E069
	dw CODE_05E087
	dw CODE_05E0B3
	dw CODE_05E0DC

YI_NorSpr10F_BooManBluff_Main:
;$05DCBE
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BPL.b CODE_05DCFB
	JSL.l CODE_03A858
	LDY.b $76,x
	CPY.b #$0A
	BEQ.b CODE_05DCFF
	LDA.w #$FFFF
	STA.w $7AF6,x
	LDA.w #$0100
	STA.w $7A98,x
	LDA.w #$0007
	STA.w $7402,x
	LDA.w #$FC00
	STA.w $75E2,x
	STZ.w $75E0,x
	LDA.w #$0008
	STA.w $7542,x
	STA.w $7540,x
	LDY.b #$0A
	STY.b $76,x
	BRA.b CODE_05DCFF

CODE_05DCFB:
	JSL.l CODE_03A5B7
CODE_05DCFF:
	JSR.w CODE_05DD1A
	LDY.b $78,x
	BNE.b CODE_05DD0E
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05DCA8,x)
CODE_05DD0E:
	JSR.w CODE_05DF1E
	RTL

DATA_05DD12:
	dw $FF00,$0100

DATA_05DD16:
	dw $FE80,$0180

CODE_05DD1A:
	LDA.w $7AF6,x
	BNE.b CODE_05DD4B
	LDA.w $61F2
	BEQ.b CODE_05DD27
	JMP.w CODE_05DE0B

CODE_05DD27:
	LDY.b $76,x
	CPY.b #$02
	BEQ.b CODE_05DD35
	CPY.b #$03
	BEQ.b CODE_05DD35
	CPY.b #$09
	BNE.b CODE_05DD4C
CODE_05DD35:
	LDA.w #$0003
	STA.w $7402,x
	INC
	STA.w $7A98,x
	LDA.w #$FFFF
	STA.w $7AF6,x
	STZ.b $78,x
	LDY.b #$07
	STY.b $76,x
CODE_05DD4B:
	RTS

CODE_05DD4C:
	CPY.b #$04
	BNE.b CODE_05DD89
	STZ.w $75E0,x
	STZ.w $75E2,x
	LDA.w $7C16,x
	BPL.b CODE_05DD5F
	EOR.w #$FFFF
	INC
CODE_05DD5F:
	LSR
	LSR
	STA.w $7540,x
	LDA.w $7C18,x
	BPL.b CODE_05DD6D
	EOR.w #$FFFF
	INC
CODE_05DD6D:
	LSR
	LSR
	STA.w $7542,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$FFFF
	STA.w $7AF6,x
	LDY.b #$06
	STY.b $76,x
	RTS

CODE_05DD89:
	CPY.b #$06
	BNE.b CODE_05DDA0
	LDA.w #$0003
	STA.w $7402,x
	INC
	STA.w $7A98,x
	LDA.w #$FFFF
	STA.w $7AF6,x
	INC.b $76,x
	RTS

CODE_05DDA0:
	CPY.b #$07
	BNE.b CODE_05DDC0
	LDA.w #$0005
	STA.w $7402,x
	DEC
	STA.w $7A98,x
	DEC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7400,x
	STA.b $16,x
	LDA.w #$FFFF
	STA.w $7AF6,x
	INC.b $76,x
	RTS

CODE_05DDC0:
	CPY.b #$08
	BNE.b CODE_05DE0A
	STZ.b $78,x
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_05DDF5
	LDY.b #$00
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05DDD7
	INY
	INY
CODE_05DDD7:
	LDA.w DATA_05DC6E,y
	STA.w $75E2,x
	LDA.w DATA_05DC6E+$02,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_05DC6A,y
	STA.w $75E0,x
	LDA.w #$0100
	STA.w $7A96,x
	STZ.b $76,x
	RTS

CODE_05DDF5:
	LDA.w #$0005
	STA.w $7402,x
	DEC
	STA.w $7A98,x
	LDA.w $7400,x
	STA.b $16,x
	LDA.w #$FFFF
	STA.w $7AF6,x
CODE_05DE0A:
	RTS

CODE_05DE0B:
	LDY.b $76,x
	BEQ.b CODE_05DE13
	CPY.b #$07
	BNE.b CODE_05DE4B
CODE_05DE13:
	STZ.w $75E0,x
	STZ.w $75E2,x
	LDA.w #$0010
	STA.w $7540,x
	STA.w $7542,x
	LDA.w #$FFFF
	STA.w $7AF6,x
	LDY.b #$02
	LDA.w $6EB4
	STA.w $7A38,x
	LDA.w $6EB2
	STA.w $7A36,x
	SEC
	SBC.w $70E2,x
	STA.b $00
	LDA.w $7400,x
	STA.b $16,x
	DEC
	EOR.b $00
	BPL.b CODE_05DE48
	LDY.b #$03
CODE_05DE48:
	STY.b $76,x
	RTS

CODE_05DE4B:
	CPY.b #$02
	BEQ.b CODE_05DE57
	CPY.b #$03
	BEQ.b CODE_05DE57
	CPY.b #$09
	BNE.b CODE_05DE9E
CODE_05DE57:
	STZ.b $78,x
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$FFFF
	STA.w $7AF6,x
	LDY.b #$00
	LDA.w $6EB2
	CMP.w $70E2,x
	BMI.b CODE_05DE71
	INY
	INY
CODE_05DE71:
	TYA
	CMP.w $7400,x
	BEQ.b CODE_05DE87
	LDA.w #$0009
	STA.w $7402,x
	LDA.w $7400,x
	STA.b $16,x
	LDY.b #$09
	STY.b $76,x
	RTS

CODE_05DE87:
	LDA.w $6EB2
	STA.w $7A36,x
	LDA.w $6EB4
	STA.w $7A38,x
	LDA.w #$0002
	STA.w $7402,x
	LDY.b #$04
	STY.b $76,x
	RTS

CODE_05DE9E:
	CPY.b #$04
	BNE.b CODE_05DF15
	LDA.w $6EB2
	STA.w $7A36,x
	LDA.w $6EB4
	STA.w $7A38,x
CODE_05DEAE:
	LDA.w #$0040
	STA.w $7AF6,x
	LDA.w $7C16,x
	BPL.b CODE_05DEBD
	EOR.w #$FFFF
	INC
CODE_05DEBD:
	LSR
	LSR
	LSR
	STA.w $7540,x
	LDA.w $7C18,x
	BPL.b CODE_05DECC
	EOR.w #$FFFF
	INC
CODE_05DECC:
	LSR
	LSR
	LSR
	STA.w $7542,x
	LDY.b #$00
	LDA.w $7A36,x
	CMP.w $70E2,x
	BMI.b CODE_05DEDE
	INY
	INY
CODE_05DEDE:
	LDA.w DATA_05DD12,y
	STA.w $75E0,x
	TYA
	CMP.w $7400,x
	BEQ.b CODE_05DF02
	LDA.w #$FFFF
	STA.w $7AF6,x
	LDA.w $7400,x
	STA.b $16,x
	DEC.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	LDY.b #$05
	STY.b $76,x
CODE_05DF02:
	LDY.b #$00
	LDA.w $7A38,x
	CMP.w $7182,x
	BMI.b CODE_05DF0E
	INY
	INY
CODE_05DF0E:
	LDA.w DATA_05DD16,y
	STA.w $75E2,x
CODE_05DF14:
	RTS

CODE_05DF15:
	CPY.b #$08
	BNE.b CODE_05DF14
	STZ.b $78,x
	JMP.w CODE_05DE13

CODE_05DF1E:
	LDA.w $75E0,x
	BNE.b CODE_05DF3F
	LDA.w $7540,x
	BEQ.b CODE_05DF3F
	DEC
	STA.b $00
	ASL
	STA.w $7962
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_05DF3F
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_05DF3F:
	LDA.w $75E2,x
	BNE.b CODE_05DF5F
	LDA.w $7542,x
	BEQ.b CODE_05DF5F
	DEC
	STA.b $00
	ASL
	STA.b $02
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_05DF5F
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_05DF5F:
	RTS

CODE_05DF60:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05DF7F
	STZ.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ORA.w $7540,x
	BNE.b CODE_05DF7F
	LDA.w $7400,x
	STA.b $16,x
	LDA.w #$0005
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_05DF7F:
	LDA.w #$0006
	STA.w $7540,x
	STA.w $7542,x
	LDY.b #$00
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05DF94
	INY
	INY
CODE_05DF94:
	LDA.w DATA_05DC6E,y
	STA.w $75E2,x
	RTS

CODE_05DF9B:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05DFC9
	LDA.w $7400,x
	CMP.b $16,x
	BEQ.b CODE_05DFBD
	STZ.w $7402,x
	LDA.w #$0100
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_05DC6A,y
	STA.w $75E0,x
	STZ.b $76,x
	RTS

CODE_05DFBD:
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$0008
	STA.w $7A98,x
CODE_05DFC9:
	JMP.w CODE_05DF7F

CODE_05DFCC:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E00F
	DEC.w $7402,x
	LDY.w $7402,x
	CPY.b #$03
	BEQ.b CODE_05E009
	BRA.b CODE_05DFEB

CODE_05DFDE:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E00F
	LDA.w $7400,x
	CMP.b $16,x
	BEQ.b CODE_05E000
CODE_05DFEB:
	LDA.w #$0008
	STA.w $7402,x
	LDA.w #$0040
	STA.w $7AF6,x
	STZ.w $75E0,x
	STZ.w $75E2,x
	INC.b $78,x
	RTS

CODE_05E000:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_05E009:
	LDA.w #$0004
	STA.w $7A98,x
CODE_05E00F:
	RTS

CODE_05E010:
	TYX
	LDY.w $7402,x
	CPY.b #$07
	BEQ.b CODE_05E026
	LDA.w $7A98,x
	BNE.b CODE_05E026
	LDA.w #$0007
	STA.w $7402,x
	JSR.w CODE_05DEAE
CODE_05E026:
	RTS

CODE_05E027:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E049
	LDA.w $7400,x
	CMP.b $16,x
	BEQ.b CODE_05E03D
	STZ.w $7AF6,x
	DEC.w $7402,x
	DEC.b $76,x
	RTS

CODE_05E03D:
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_05E049:
	RTS

CODE_05E04A:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E068
	LDY.w $7402,x
	CPY.b #$08
	BEQ.b CODE_05E05D
	LDA.w #$0008
	STA.w $7402,x
CODE_05E05D:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ORA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05E068
	STZ.w $7AF6,x
CODE_05E068:
	RTS

CODE_05E069:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E086
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$05
	BNE.b CODE_05E080
	STZ.w $7AF6,x
	STZ.w $7402,x
	RTS

CODE_05E080:
	LDA.w #$0004
	STA.w $7A98,x
CODE_05E086:
	RTS

CODE_05E087:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E0B2
	LDY.w $7402,x
	BNE.b CODE_05E09B
	LDA.w #$0010
	STA.w $7AF6,x
	INC.b $78,x
	RTS

CODE_05E09B:
	LDA.w $7400,x
	CMP.b $16,x
	BEQ.b CODE_05E0AC
	LDA.w #$0010
	STA.w $7A98,x
	STZ.w $7402,x
	RTS

CODE_05E0AC:
	EOR.w #$0002
	STA.w $7400,x
CODE_05E0B2:
	RTS

CODE_05E0B3:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E0DB
	LDA.w $7400,x
	CMP.b $16,x
	BEQ.b CODE_05E0CF
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w #$0008
	STA.w $7402,x
	INC.b $78,x
	RTS

CODE_05E0CF:
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_05E0DB:
	RTS

CODE_05E0DC:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E0EA
	STZ.w $7AF6,x
	LDY.b #$04
	STY.b $76,x
	RTS

CODE_05E0EA:
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BPL.b CODE_05E0F5
	STZ.w $75E0,x
CODE_05E0F5:
	JMP.w CODE_05DF7F

;---------------------------------------------------------------------------

YI_NorSpr0E4_HeadingCactus_Init:
;$05E0F8
	DEC.b $18,x
	LDA.w #$00E5
	JSL.l CODE_03A364
	BCC.b CODE_05E122
	LDA.w $70E2,x
	STA.w $70E2,y
	STA.w $7A36,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	STY.b $18,x
	LDA.w #$0005
	STA.w $7A36,x
	LDY.b #$02
	STY.b $76,x
CODE_05E122:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.w !RAM_YI_Level_CurrentWorldLo
	BEQ.b CODE_05E130				; Note: !Define_YI_WorldID_World1
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_05E130:
	RTL

;---------------------------------------------------------------------------

DATA_05E131:
	dw CODE_05E179
	dw CODE_05E1A4
	dw CODE_05E1EF
	dw CODE_05E28F
	dw CODE_05E2C2
	dw CODE_05E300

YI_NorSpr0E4_HeadingCactus_Main:
;$05E13D
	JSL.l CODE_03AF23
	LDY.b $18,x
	BMI.b CODE_05E149
	JSL.l CODE_03A5B7
CODE_05E149:
	LDY.b $18,x
	BMI.b CODE_05E170
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05E162
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BNE.b CODE_05E162
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0E5_GreenNeedlenose
	BEQ.b CODE_05E170
CODE_05E162:
	LDY.b #$FF
	STY.b $18,x
	LDA.w #$0060
	STA.w $7A98,x
	LDY.b #$05
	STY.b $76,x
CODE_05E170:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05E131,x)
	RTL

CODE_05E179:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05E1A3
	LDA.w #$00E5
	JSL.l CODE_03A364
	BCC.b CODE_05E1A3
	LDA.w $70E2,x
	STA.w $70E2,y
	STA.w $7A36,y
	LDA.w $7182,x
	DEC
	DEC
	STA.w $7182,y
	STY.b $18,x
	LDA.w #$0020
	STA.w $7A98,x
	INC.b $76,x
CODE_05E1A3:
	RTS

CODE_05E1A4:
	TYX
	LDY.b $18,x
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7A98,x
	BNE.b CODE_05E1D6
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7182,y
	DEC
	STA.w $7182,y
	SEC
	SBC.w $7182,x
	CMP.w #$FFF3
	BNE.b CODE_05E1D6
	LDA.w #$0020
	STA.w $7A98,x
	LDA.w #$0005
	STA.w $7A36,x
	INC.b $76,x
CODE_05E1D6:
	RTS

DATA_05E1D7:
	db $03,$04,$03,$02,$01

DATA_05E1DC:
	db $04,$04,$03,$02,$01

DATA_05E1E1:
	db $00,$08,$02,$01,$02

DATA_05E1E6:
	db $00,$00,$02,$01,$02

DATA_05E1EB:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	db $F2,$F0,$EA,$E4,$E2
else
	db $F0,$EA,$E4,$E2
endif

CODE_05E1EF:
	TYX
	LDA.w $7A98,x
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	BEQ.b +
	JMP.w CODE_05E276

+:
else
	BNE.b CODE_05E206
endif
	DEC.w $7A36,x
	BPL.b CODE_05E217
	INC.b $78,x
	LDY.b $78,x
	CPY.b #$03
	BNE.b CODE_05E204
	STZ.b $78,x
CODE_05E204:
	INC.b $76,x
CODE_05E206:
	RTS

DATA_05E207:
	dw $FC00,$FBC0

DATA_05E20B:
	dw $FB00,$FA00

DATA_05E20F:
	dw $0020,$0030

DATA_05E213:
	dw $0300,$0300

CODE_05E217:
	LDY.w $7A36,x
	CPY.b #$01
	BNE.b CODE_05E24B
	PHY
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_05E20F,y
	STA.b $00
	LDA.w DATA_05E213,y
	STA.b $02
	LDA.w DATA_05E207,y
	LDY.b $78,x
	CPY.b #$02
	BNE.b CODE_05E23B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_05E20B,y
CODE_05E23B:
	LDY.b $18,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $7542,y
	LDA.b $02
	STA.w $75E2,y
	PLY
CODE_05E24B:
	LDA.b $78,x
	CMP.w #$0002
	BEQ.b CODE_05E260
	LDA.w DATA_05E1D7,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_05E1E1,y
	BRA.b CODE_05E26C

CODE_05E260:
	LDA.w DATA_05E1DC,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_05E1E6,y
CODE_05E26C:
	AND.w #$00FF
	STA.w $7A98,x
	CPY.b #$01
	BMI.b CODE_05E288
CODE_05E276:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDY.b $18,x
	LDA.w $7222,y
	BMI.b CODE_05E288
	LDY.w $7402,x
	LDA.w DATA_05E1EB,y
else
	LDY.w $7402,x
	LDA.w DATA_05E1EB-$01,y
endif
	LDY.b $18,x
	ORA.w #$FF00
	CLC
	ADC.w $7182,x
	STA.w $7182,y
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w #$0000
	STA.w $7222,y
endif
CODE_05E288:
	RTS

DATA_05E289:
	dw $FFE2,$FFE4,$FFE4

CODE_05E28F:
	TYX
	LDA.b $78,x
	ASL
	TAY
	LDA.w DATA_05E289,y
	LDY.b $18,x
	CLC
	ADC.w $7182,x
	CMP.w $7182,y
	BPL.b CODE_05E2B6
	STA.w $7182,y
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w #$0000
	STA.w $7222,y
else
	LDA.w #$0000
	STA.w $7542,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
endif
	LDA.w #$0002
	STA.w $7A98,x
	INC.b $76,x
CODE_05E2B6:
	RTS

DATA_05E2B7:
	db $F2,$F0,$EA,$E4
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	db $E4
endif

DATA_05E2BB:
	db $04,$01,$01,$01

DATA_05E2BF:
	db $10,$01,$01

CODE_05E2C2:
	TYX
	LDA.w $7A98,x
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	BEQ.b +
	LDY.w $7402,x
	BRA.b CODE_05E2F0

+:
else
	BNE.b CODE_05E2FF
endif
	DEC.w $7402,x
	LDY.w $7402,x
	BNE.b CODE_05E2DB
	LDA.w #$0005
	STA.w $7A36,x
	LDA.w #$0002
	STA.b $76,x
CODE_05E2DB:
	LDA.b $78,x
	CMP.w #$0002
	BNE.b CODE_05E2E7
	LDA.w DATA_05E2BF,y
	BRA.b CODE_05E2EA

CODE_05E2E7:
	LDA.w DATA_05E2BB,y
CODE_05E2EA:
	AND.w #$00FF
	STA.w $7A98,x
CODE_05E2F0:
	LDA.w DATA_05E2B7,y
	LDY.b $18,x
	ORA.w #$FF00
	CLC
	ADC.w $7182,x
	STA.w $7182,y
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w #$0000
	STA.w $7222,y
endif
CODE_05E2FF:
	RTS

CODE_05E300:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05E31C
	LDA.w #$0008
	STA.w $7A98,x
	DEC.w $7402,x
	BPL.b CODE_05E31C
	STZ.w $7402,x
	LDA.w #$0180
	STA.w $7A96,x
	STZ.b $76,x
CODE_05E31C:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr063_MuddyBuddy_Init:
;$05E31D
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	STA.w $7A38,x
	JSR.w CODE_05E63A
	RTL

;---------------------------------------------------------------------------

DATA_05E32E:
	dw CODE_05E6F7
	dw CODE_05E75E
	dw CODE_05E7AC
	dw CODE_05E7D5
	dw CODE_05E75E
	dw CODE_05E82A
	dw CODE_05E85D
	dw CODE_05E898
	dw CODE_05E898
	dw CODE_05E937

DATA_05E342:
	dw $0200,$FE00

YI_NorSpr063_MuddyBuddy_Main:
;$05E346
	JSR.w CODE_05E3EE
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_05E358
	LDY.b $18,x
	BEQ.b CODE_05E358
	JSR.w CODE_05E524
CODE_05E358:
	JSL.l CODE_03AF23
	JSR.w CODE_05E6BD
	JSR.w CODE_05E6D9
	JSR.w CODE_05E44C
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05E32E,x)
	JSR.w CODE_05E63A
	CPX.w $61B6
	BNE.b CODE_05E379
	JSR.w CODE_05E67D
CODE_05E378:
	RTL

CODE_05E379:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_05E391

CODE_05E388:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_05E391:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_05E378
	BEQ.b CODE_05E378
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05E388
	LDA.w $7D38,y
	BEQ.b CODE_05E388
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_05E3B4
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCC.b CODE_05E3C3
CODE_05E3B4:
	LDA.w $6FA2,y
	AND.w #$4000
	BNE.b CODE_05E388
	TYX
	JSL.l CODE_03B25B
	BRA.b CODE_05E388

CODE_05E3C3:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_05E388
	PHX
	LDX.b #$00
	LDA.w $6000
	BPL.b CODE_05E3D2
	INX
	INX
CODE_05E3D2:
	LDA.l DATA_05E342,x
	PLX
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0001
	STA.w $7D38,y
	BRA.b CODE_05E388

CODE_05E3EE:
	LDA.w $7042,x
	AND.w #$FF00
	BNE.b CODE_05E447
	LDY.w $74A2,x
	BMI.b CODE_05E447
	JSL.l CODE_03AA52
	LDA.w $7680,x
	CLC
	ADC.w #$0004
	STA.b $00
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0002
	STA.b $02
	REP.b #$10
	LDY.w $7362,x
CODE_05E418:
	PHY
	LDA.w $6020,y
	SEC
	SBC.b $00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEP.b #$10
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	PLY
	LDA.b $00
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $6020,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $02
	BNE.b CODE_05E418
	SEP.b #$10
	LDX.b $12
CODE_05E447:
	RTS

DATA_05E448:
	dw $0100,$FF00

CODE_05E44C:
	LDY.b $76,x
	CPY.b #$09
	BPL.b CODE_05E447
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $6122
	STA.b $00
	CPX.w $61B6
	BNE.b CODE_05E47A
	JMP.w CODE_05E508

CODE_05E47A:
	LDY.b $76,x
	CPY.b #$05
	BMI.b CODE_05E483
	JMP.w CODE_05E524

CODE_05E483:
	LDY.w $7D36,x
	BPL.b CODE_05E447
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w $611E
	SEC
	SBC.b $00
	CMP.w #$FFF8
	BCS.b CODE_05E4CD
	LDY.w $77C2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05E4B6
	TYA
	CMP.w $7400,x
	BNE.b CODE_05E4B6
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w $60A8
	STA.w $60A8
	STA.w $60B4
CODE_05E4B6:
	LDA.w $60A8
	CLC
	ADC.w DATA_05E448,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7D38,x
	RTS

CODE_05E4CD:
	LDY.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_05E551
	LDY.w $61B6
	BNE.b CODE_05E551
	STX.w $61B6
	INC.b $18,x
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$7440
	STA.w $6FA0,x
	LDA.w #$0401
	STA.w $6FA2,x
	LDA.w #$3105
	STA.w $7040,x
	STZ.w $7402,x
	LDA.w #$0008
	STA.w $7BB6,x
	STA.w $7BB8,x
	LDY.b #$05
	STY.b $76,x
CODE_05E508:
	LDY.w $0D94
	BNE.b CODE_05E51F
	LDY.w $7862,x
	BNE.b CODE_05E51F
	LDA.w $0035
	AND.w #$0400
	BNE.b CODE_05E524
	LDA.w $61D6
	BEQ.b CODE_05E552
CODE_05E51F:
	CPX.w $61B6
	BNE.b CODE_05E551
CODE_05E524:
	STZ.w $61B6
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.b $18,x
	LDA.w #$7480
	STA.w $6FA0,x
	LDA.w #$0C01
	STA.w $6FA2,x
	LDA.w #$3155
	STA.w $7040,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0006
	STA.w $7BB6,x
	STA.w $7BB8,x
	LDY.b #$09
	STY.b $76,x
CODE_05E551:
	RTS

CODE_05E552:
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $611E
	SEC
	SBC.w $6122
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_05E584
	LDY.w $7223,x
	BPL.b CODE_05E584
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_05E584:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05E5B2
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_05E5B2
	AND.w #$0180
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05E5B2
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05E5B2:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_05E5C1
	BPL.b CODE_05E5BE
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_05E5C1

CODE_05E5BE:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05E5C1:
	LDA.w $70E2,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	CLC
	ADC.w #$0012
	SEC
	SBC.b $00
	SEC
	SBC.w $611E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $6084
	ORA.w #$0700
	EOR.w #$FFFF
	STA.b $00
	LDA.w $0035
	AND.b $00
	STA.w $617A
	LDA.w $0037
	AND.b $00
	STA.w $617C
	LDA.w $6150
	ORA.w $60DE
	BNE.b CODE_05E617
	LDA.w $0036
	AND.w #$0003
	BEQ.b CODE_05E617
	AND.w #$0002
	STA.w $60C4
	EOR.w #$0002
	STA.w $7400,x
CODE_05E617:
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $60A8
	STZ.w $60AA
	STZ.w $60D4
	INC.w $61B4
	LDY.b #$40
	LDA.w $0035
	AND.w $6084
	BEQ.b CODE_05E635
	LDY.b #$20
CODE_05E635:
	TYA
	STA.w $7542,x
	RTS

CODE_05E63A:
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_540000+$4000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_540000+$4000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0882FA>>16
	LDA.w #FXCODE_0882FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_05E67D:
	LDY.w $7223,x
	BMI.b CODE_05E6BC
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F9C>>16
	LDA.w #FXCODE_098F9C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_05E68F:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_05E6BC
	BEQ.b CODE_05E6BC
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05E6BC
	LDA.w $7D38,y
	BNE.b CODE_05E6BC
	TYX
	JSL.l CODE_03B24B
	LDA.w #!Define_YI_SoundID1D_ObjectLanding
	JSL.l CODE_0085D2
	LDX.b #FXCODE_098FFE>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_05E68F

CODE_05E6BC:
	RTS

CODE_05E6BD:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_05E6D8
	AND.w #$0008
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05E6D8
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
CODE_05E6D8:
	RTS

CODE_05E6D9:
	CPX.w $61B6
	BNE.b CODE_05E6F2
	LDA.w $7680,x
	BMI.b CODE_05E6E8
	CMP.w #$00F0
	BMI.b CODE_05E6F2
CODE_05E6E8:
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05E6F2:
	RTS

DATA_05E6F3:
	dw $FF00,$0100

CODE_05E6F7:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05E71B
	LDA.b $11
	AND.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_05E6F3,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_05E71B:
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BNE.b CODE_05E751
	LDA.w $7C16,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_05E751
	LDA.w $7C18,x
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_05E751
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.b $16,x
	LDA.w #$0008
	STA.w $7A96,x
	STZ.w $7402,x
	LDY.b #$02
	STY.b $76,x
CODE_05E751:
	RTS

DATA_05E752:
	db $02,$03,$04,$03,$03,$02,$01,$02,$02,$02,$02,$01

CODE_05E75E:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05E779
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	STZ.b $76,x
	RTS

CODE_05E779:
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_05E782
	JSR.w CODE_05E71B
CODE_05E782:
	LDA.w $7A98,x
	BNE.b CODE_05E7A9
	LDY.w $7402,x
	INY
	CPY.b #$07
	BMI.b CODE_05E791
	LDY.b #$01
CODE_05E791:
	TYA
	STA.w $7402,x
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_05E7A0
	CLC
	ADC.w #$0006
	TAY
CODE_05E7A0:
	LDA.w DATA_05E752-$01,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_05E7A9:
	RTS

DATA_05E7AA:
	db $0C,$00

CODE_05E7AC:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_05E7CE
	LDY.b $16,x
	LDA.w DATA_05E7AA,y
	TAY
	JSR.w CODE_05E9C6
	BNE.b CODE_05E7CE
	DEC.b $16,x
	BPL.b CODE_05E7CE
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.b $16,x
	INC.b $76,x
CODE_05E7CE:
	RTS

DATA_05E7CF:
	db $18,$24

DATA_05E7D1:
	dw $FE00,$0200

CODE_05E7D5:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05E80B
	STZ.w $7402,x
	LDY.b $16,x
	LDA.w DATA_05E7CF,y
	TAY
	JSR.w CODE_05E9C6
	BNE.b CODE_05E80A
	DEC.b $16,x
	BPL.b CODE_05E80A
	LDY.w $7400,x
	LDA.w DATA_05E7D1,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	STZ.w $7402,x
	INC.b $76,x
CODE_05E80A:
	RTS

CODE_05E80B:
	LDY.b #$18
	JSR.w CODE_05E9C6
CODE_05E810:
	LDA.w $7A98,x
	BNE.b CODE_05E829
	LDY.w $7402,x
	INY
	CPY.b #$07
	BMI.b CODE_05E81F
	LDY.b #$01
CODE_05E81F:
	TYA
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A98,x
CODE_05E829:
	RTS

CODE_05E82A:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05E84D
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	LDY.b #$30
	JSR.w CODE_05E9C6
	BNE.b CODE_05E84C
	LDA.w #$0001
	STA.b $16,x
	INC.b $76,x
CODE_05E84C:
	RTS

CODE_05E84D:
	JSR.w CODE_05E909
	LDA.w $0035
	AND.w $6084
	BEQ.b CODE_05E84C
	JMP.w CODE_05E810

CODE_05E85B:
	RTS

DATA_05E85C:
	db $3C

CODE_05E85D:
	TYX
	LDY.b #$07
	LDA.w $0035
	BIT.w $6084
	BNE.b CODE_05E86E
	BIT.w #$0300
	BEQ.b CODE_05E876
	INY
CODE_05E86E:
	STY.b $76,x
	LDA.w #$0001
	STA.b $16,x
	RTS

CODE_05E876:
	LDA.b $78,x
	BEQ.b CODE_05E880
	CMP.w #$8000
	ROR
	STA.b $78,x
CODE_05E880:
	LDY.b $16,x
	BMI.b CODE_05E88F
	LDA.w DATA_05E85C-$01,y
	TAY
	JSR.w CODE_05E9C6
	BNE.b CODE_05E88F
	DEC.b $16,x
CODE_05E88F:
	RTS

DATA_05E890:
	db $54,$48,$78,$6C

DATA_05E894:
	dw $FB80,$FD00

CODE_05E898:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05E8D8
	LDA.b $16,x
	BMI.b CODE_05E8E2
	LDY.b $76,x
	CPY.b #$07
	BEQ.b CODE_05E8AF
	CLC
	ADC.w #$0002
CODE_05E8AF:
	TAY
	LDA.w DATA_05E890,y
	TAY
	JSR.w CODE_05E9C6
	BNE.b CODE_05E8D7
	DEC.b $16,x
	BPL.b CODE_05E8D7
	LDA.b $76,x
	SEC
	SBC.w #$0007
	ASL
	TAY
	LDA.w DATA_05E894,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID35_FrogHop
	JSL.l CODE_0085D2
	LDA.b $78,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05E8D7:
	RTS

CODE_05E8D8:
	JSR.w CODE_05E909
	LDY.b #$18
	JSR.w CODE_05E9C6
	BNE.b CODE_05E8E6
CODE_05E8E2:
	LDY.b #$05
	STY.b $76,x
CODE_05E8E6:
	LDA.w $0035
	AND.w $6084
	BEQ.b CODE_05E8D7
	JMP.w CODE_05E810

DATA_05E8F1:
	dw $0020,$FFE0,$0010,$FFF0

DATA_05E8F9:
	dw $0400,$FC00,$0200,$FE00

DATA_05E901:
	dw $FFFF,$0000,$FFFF,$0000

CODE_05E909:
	LDA.w $0036
	AND.w #$0003
	BEQ.b CODE_05E936
	AND.w #$0002
	CPY.b #$00
	BEQ.b CODE_05E91C
	CLC
	ADC.w #$0004
CODE_05E91C:
	TAY
	LDA.w DATA_05E8F1,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w DATA_05E8F9,y
	EOR.w DATA_05E901,y
	BPL.b CODE_05E936
	LDA.w DATA_05E8F9,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05E936:
	RTS

CODE_05E937:
	TYX
	LDY.b #$18
	JSR.w CODE_05E9C6
	BNE.b CODE_05E941
	STZ.b $76,x
CODE_05E941:
	RTS

DATA_05E942:
	dw $0012,$01C0,$0024,$0012,$00A0,$0024,$000F,$00C0
	dw $001E,$000F,$0180,$001E,$000C,$0100,$0018,$000C
	dw $0100,$0018,$000C,$01C0,$0018,$000C,$00A0,$0018
	dw $0020,$01E0,$0040,$0020,$0040,$0040,$000C,$0100
	dw $0018,$000C,$0100,$0018,$0014,$00E0,$0028,$0014
	dw $0140,$0028,$0024,$0080,$0048,$0010,$0160,$0020
	dw $0008,$01C0,$0010,$0008,$0080,$0010,$0014,$00F0
	dw $0028,$0014,$0120,$0028,$0024,$00C0,$0048,$0010
	dw $0130,$0020

CODE_05E9C6:
	LDA.w #$0002
	STA.b $00
CODE_05E9CB:
	LDA.w $7A36,x
	CMP.w DATA_05E942+$02,y
	BEQ.b CODE_05E9EF
	BMI.b CODE_05E9DB
	SEC
	SBC.w DATA_05E942,y
	BRA.b CODE_05E9DF

CODE_05E9DB:
	CLC
	ADC.w DATA_05E942,y
CODE_05E9DF:
	STA.w $7A36,x
	SEC
	SBC.w DATA_05E942+$02,y
	CLC
	ADC.w DATA_05E942,y
	CMP.w DATA_05E942+$04,y
	BCS.b CODE_05E9F7
CODE_05E9EF:
	DEC.b $00
	LDA.w DATA_05E942+$02,y
	STA.w $7A36,x
CODE_05E9F7:
	CPX.b $12
	BNE.b CODE_05EA05
	INX
	INX
	TYA
	CLC
	ADC.w #$0006
	TAY
	BRA.b CODE_05E9CB

CODE_05EA05:
	LDX.b $12
	LDY.b $00
	RTS

;---------------------------------------------------------------------------

YI_NorSpr119_Spooky_Init:
;$05EA0A
	JSL.l CODE_03AE60
	LDA.w #$0004
	STA.w $7720,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSR.w CODE_05EC10
	RTL

;---------------------------------------------------------------------------

DATA_05EA1B:
	dw FXDATA_550000+$0040,FXDATA_550000+$0020,FXDATA_550000+$0000

DATA_05EA21:
	dw CODE_05EC54
	dw CODE_05ECF2
	dw CODE_05ED3A
	dw CODE_05EDFD
	dw CODE_05EC54

YI_NorSpr119_Spooky_Main:
;$05EA2B
	JSR.w CODE_05EB40
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPY.b #$08
	BEQ.b CODE_05EA60
	CPY.b #$0C
	BEQ.b CODE_05EA4E
	CPY.b #$06
	BEQ.b CODE_05EA40
	JMP.w CODE_05EAAF

CODE_05EA40:
	LDY.b $78,x
	BEQ.b CODE_05EA4B
	JSR.w CODE_05EBD0
	JSL.l CODE_06BEC1
CODE_05EA4B:
	JMP.w CODE_05EAAF

CODE_05EA4E:
	LDY.b $78,x
	BEQ.b CODE_05EA57
	JSR.w CODE_05EF52
	BRA.b CODE_05EA5A

CODE_05EA57:
	JSR.w CODE_05EEF7
CODE_05EA5A:
	PLA
	PLY
	JML.l CODE_03A31E

CODE_05EA60:
	LDY.w $6150
	CPY.b #$03
	BEQ.b CODE_05EA6B
	CPY.b #$04
	BNE.b CODE_05EA96
CODE_05EA6B:
	LDY.b $78,x
	BEQ.b CODE_05EA78
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	JSR.w CODE_05EBD0
CODE_05EA78:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05EA8A
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
CODE_05EA8A:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $6162
	PLA
	PLY
	RTL

CODE_05EA96:
	LDY.b $18,x
	BNE.b CODE_05EAAC
	LDA.w #$3101
	STA.w $7040,x
	LDY.b $78,x
	BEQ.b CODE_05EAA9
	JSR.w CODE_05EF52
	BRA.b CODE_05EAAC

CODE_05EAA9:
	JSR.w CODE_05EEF7
CODE_05EAAC:
	JSR.w CODE_05EF9F
CODE_05EAAF:
	JSL.l CODE_03AF23
	LDY.b $76,x
	CPY.b #$03
	BEQ.b CODE_05EAD7
	CPY.b #$02
	BNE.b CODE_05EAD3
	LDY.w $7223,x
	BMI.b CODE_05EAD3
	LDA.w $7C16,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05EAD3
	LDA.w $7C18,x
	BMI.b CODE_05EAD7
CODE_05EAD3:
	JSL.l CODE_03A5B7
CODE_05EAD7:
	JSR.w CODE_05EBA4
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05EA21,x)
	SEP.b #$20
	LDA.w $7A98,x
	BNE.b CODE_05EAF8
	LDA.b #$08
	STA.w $7A98,x
	DEC.b $19,x
	DEC.b $19,x
	BPL.b CODE_05EAF8
	LDY.b #$04
	STY.b $19,x
CODE_05EAF8:
	REP.b #$20
	LDA.w $7540,x
	BEQ.b CODE_05EB13
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w $7540,x
	CMP.b $00
	BCS.b CODE_05EB13
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05EB13:
	LDY.b $79,x
	BNE.b CODE_05EB3C
	LDA.w $7974
	AND.w #$0003
	BNE.b CODE_05EB3C
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC
	CLC
	ADC.w $7720,x
	BMI.b CODE_05EB2E
	CMP.w #$000C
	BMI.b CODE_05EB39
CODE_05EB2E:
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	EOR.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	PLA
CODE_05EB39:
	STA.w $7720,x
CODE_05EB3C:
	JSR.w CODE_05EBFC
	RTL

CODE_05EB40:
	LDY.w $7402,x
	BNE.b CODE_05EBA3
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $7400,x
	BEQ.b CODE_05EB6F
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
CODE_05EB6F:
	LDA.w #$FFF8
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	REP.b #$10
	LDY.w $7362,x
	LDA.w #$0004
	STA.b $00
CODE_05EB83:
	LDA.w $6000,y
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_05EB83
	SEP.b #$10
CODE_05EBA3:
	RTS

CODE_05EBA4:
	JSL.l CODE_03A2C7
	BCC.b CODE_05EBB3
	LDY.b $78,x
	BNE.b CODE_05EBB8
	PLA
	JML.l CODE_03A31E

CODE_05EBB3:
	LDY.b $78,x
	BNE.b CODE_05EBBE
	RTS

CODE_05EBB8:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_05EBBE:
	LDA.w $61CC
	BNE.b CODE_05EBD0
	LDA.w $70E2,x
	STA.w $70E2
	LDA.w $7182,x
	STA.w $7182
	RTS

CODE_05EBD0:
	LDY.b #$04
	STY.w $74A2
	STZ.w $7AF8
	STZ.w $7860
	LDA.w #$B220
	STA.w $6FA0
	STZ.b $18
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w $61B2
	AND.w #$0FFF
	STA.w $61B2
	LDY.b #$00
	STY.b $78,x
	STY.b $76,x
	LDA.w #$0020
	STA.w $7AF6,x
	RTS

CODE_05EBFC:
	LDY.w $7402,x
	BNE.b CODE_05EC4B
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0001
	BNE.b CODE_05EC4B
CODE_05EC10:
	LDY.b $19,x
	LDA.w DATA_05EA1B,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05EC4B:
	RTS

DATA_05EC4C:
	dw $FF00,$0100

DATA_05EC50:
	dw $FE80,$0180

CODE_05EC54:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05EC77
	STZ.w $7AF6,x
	STZ.w $7AF8,x
	LDA.w $7A38,x
	BEQ.b CODE_05EC6E
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_05EC80
CODE_05EC6E:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_05EC77:
	LDY.w $7400,x
	LDA.w DATA_05EC4C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05EC80:
	JSR.w CODE_05EE64
	LDY.b $76,x
	BNE.b CODE_05ECDF
	LDA.w $7400,x
	DEC
	EOR.w $7C16,x
	BPL.b CODE_05ECDF
	LDA.w $7C16,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05ECDF
	LDA.w $7C18,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05ECDF
	LDA.w $7A38,x
	CLC
	ADC.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_05EC50,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	LSR
	STA.w $7540,x
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$8C83
	STA.w $6FA2,x
	INC.b $79,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7720,x
	INC.b $76,x
	RTS

CODE_05ECDF:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05ECF1
	LDA.w #$8E83
	STA.w $6FA2,x
	LDY.b #$00
	STY.b $79,x
CODE_05ECF1:
	RTS

CODE_05ECF2:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_05ED0B
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_05ED0B:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0180
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDX.b #FXCODE_08A320>>16
	LDA.w #FXCODE_08A320
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w #$0020
	AND.w #$01FE
	STA.w $7A38,x
	RTS

CODE_05ED3A:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0110
	BEQ.b CODE_05ED68
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STZ.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDX.b #FXCODE_08A320>>16
	LDA.w #FXCODE_08A320
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7A38,x
	RTS

CODE_05ED68:
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05ED92
	LDY.w $7400,x
	LDA.w DATA_05EC4C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$8E83
	STA.w $6FA2,x
	LDY.b #$00
	STY.b $79,x
	STZ.b $76,x
	RTS

CODE_05ED92:
	LDA.w $7C16,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05EDF4
	LDA.w $7C18,x
	BPL.b CODE_05EDF4
	CMP.w #$FFE8
	BMI.b CODE_05EDF4
	LDA.w $61B2
	BPL.b CODE_05EDF4
	AND.w #$0FFF
	ORA.w #$4000
	STA.w $61B2
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	LDA.w #$FFFF
	STA.w $7AF8
	STA.w $7E48
	LDA.w #$0004
	STA.b $76
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDY.b #$FF
	STY.w $74A2
	STX.b $18
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w #$B260
	STA.w $6FA0
	LDA.w #$604F
	STA.w $6FA2
	INC.b $78,x
	LDA.w #$0020
	STA.w $7A96,x
	STA.w $61EC
	INC.b $76,x
CODE_05EDF4:
	RTS

DATA_05EDF5:
	dw $0006,$FFFA

DATA_05EDF9:
	dw $FF00,$0100

CODE_05EDFD:
	TYX
	LDA.w $60C4
	STA.w $7400,x
	LDA.w $7A96,x
	BNE.b CODE_05EE2A
	STA.w $61EC
	LDA.w #$0080
	STA.w $61D6
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_05EDF9,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_05EE2A:
	LDA.w $0035
	AND.w #$CFF0
	CMP.w $0D98
	BEQ.b CODE_05EE44
	STA.w $0D98
	LDA.w $7A96,x
	SEC
	SBC.w #$0002
	BMI.b CODE_05EE44
	STA.w $7A96,x
CODE_05EE44:
	LDY.w $60C4
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_05EDF5,y
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0006
	STA.w $7182,x
	RTS

DATA_05EE5C:
	dw $0002,$FFFE

DATA_05EE60:
	dw $0020,$01E0

CODE_05EE64:
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	BEQ.b CODE_05EEAA
	ASL
	LDY.w $7400,x
	BEQ.b CODE_05EE79
	EOR.w #$FFFF
	INC
	AND.w #$01FE
CODE_05EE79:
	STA.b $00
	CMP.w $7A38,x
	BEQ.b CODE_05EEA9
	LDY.b #$00
	LDA.b $00
	SEC
	SBC.w $7A38,x
	PHP
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_05EE97
	PLP
	BPL.b CODE_05EE9C
	BRA.b CODE_05EE9A

CODE_05EE97:
	PLP
	BMI.b CODE_05EE9C
CODE_05EE9A:
	INY
	INY
CODE_05EE9C:
	LDA.w $7A38,x
	CLC
	ADC.w DATA_05EE5C,y
	AND.w #$01FE
	STA.w $7A38,x
CODE_05EEA9:
	RTS

CODE_05EEAA:
	LDA.w $7AF6,x
	ORA.w $7AF8,x
	BNE.b CODE_05EEF2
	LDA.w #$0002
	STA.w $7AF8,x
	LDY.b $16,x
	LDA.w $7A38,x
	CLC
	ADC.w DATA_05EE5C,y
	AND.w #$01FE
	BIT.w #$0100
	BEQ.b CODE_05EECC
	ORA.w #$FF00
CODE_05EECC:
	CPY.b #$00
	BNE.b CODE_05EED7
	CMP.w #$0020
	BMI.b CODE_05EEEC
	BRA.b CODE_05EEDC

CODE_05EED7:
	CMP.w #$FFE0
	BPL.b CODE_05EEEC
CODE_05EEDC:
	LDA.b $16,x
	EOR.w #$0002
	STA.b $16,x
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w DATA_05EE60,y
CODE_05EEEC:
	AND.w #$01FE
	STA.w $7A38,x
CODE_05EEF2:
	RTS

DATA_05EEF3:
	dw $FFF8,$0008

CODE_05EEF7:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	TAY
	LDA.w DATA_05EEF3,y
	STA.b $04
	LDA.w #$001E
	JSL.l CODE_03A364
	BCC.b CODE_05EF30
	LDA.w $70E2,x
	CLC
	ADC.b $04
	STA.w $70E2,y
	LDA.w $7182,x
	AND.w #$FFF0
	STA.w $7182,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w #$0001
	STA.w $7D38,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
CODE_05EF30:
	LDA.w $6152
	STA.w $7A36,x
	STZ.w $6164
	LDA.w #$FFFC
	STA.w $6166
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$0005
	STA.w $74A2,x
	INC.b $18,x
	RTS

DATA_05EF4E:
	dw $FFF8,$0008

CODE_05EF52:
	JSL.l CODE_06BEBA
	LDY.b #$04
	STY.w $74A2
	STZ.b $18
	LDY.w $7400,x
	LDA.w DATA_05EF4E,y
	STA.b $00
	LDA.w #$0020
	JSL.l CODE_03A364
	BCC.b CODE_05EF30
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,y
	STA.b $04
	LDA.w $7182,x
	AND.w #$FFF0
	CLC
	ADC.w #$0010
	STA.w $7182,y
	STA.b $06
	JSL.l CODE_048D5F
	JMP.w CODE_05EF30

DATA_05EF8F:
	dw $0008,$FFF8

DATA_05EF93:
	dw $0008,$FFF8

DATA_05EF97:
	dw $FFF8,$0008,$FFE8,$0018

CODE_05EF9F:
	LDA.w $60C4
	AND.w #$0002
	TAY
	STA.w $7400,x
	LDA.w $7402,x
	CMP.w #$0003
	BMI.b CODE_05EFB4
	JMP.w CODE_05F020

CODE_05EFB4:
	LDA.w $6152
	BEQ.b CODE_05EFD8
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_05EFCA
	LDA.w DATA_05EF8F,y
	STA.w $6152
	BRA.b CODE_05EFD8

CODE_05EFCA:
	LDA.w $6152
	SEC
	SBC.w $7A36,x
	CLC
	ADC.w $6164
	STA.w $6164
CODE_05EFD8:
	LDA.w $7A98,x
	BNE.b CODE_05EFEE
	LDA.w #$0002
	STA.w $7A98,x
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0003
	BEQ.b CODE_05EFF1
CODE_05EFEE:
	JMP.w CODE_05F074

CODE_05EFF1:
	LDA.w $6164
	CLC
	ADC.w $6152
	PHA
	AND.w #$8000
	STA.b $06
	PLA
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_05F011
	LDA.w $6152
	EOR.b $06
	BMI.b CODE_05F072
	BRA.b CODE_05F074

CODE_05F011:
	INC.w $7402,x
	LDA.w $6152
	EOR.b $06
	BPL.b CODE_05F074
	INC.w $7402,x
	BRA.b CODE_05F074

CODE_05F020:
	LDA.w $6152
	BEQ.b CODE_05F074
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05F044
	LDA.w DATA_05EF8F,y
	STA.w $6152
	LDA.w $6164
	CLC
	ADC.w DATA_05EF97,y
	STA.w $6164
	CLC
	ADC.w DATA_05EF93,y
	BRA.b CODE_05F04B

CODE_05F044:
	LDA.w $6164
	CLC
	ADC.w $6152
CODE_05F04B:
	PHA
	AND.w #$8000
	STA.b $06
	PLA
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05F06B
	LDY.b #$04
	LDA.w $6152
	EOR.b $06
	BPL.b CODE_05F065
	INY
CODE_05F065:
	TYA
	STA.w $7402,x
	BRA.b CODE_05F074

CODE_05F06B:
	LDA.w $6152
	EOR.b $06
	BPL.b CODE_05F074
CODE_05F072:
	PLA
	RTL

CODE_05F074:
	LDA.w $6152
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

DATA_05F07B:
	dw $0480,$0240

YI_NorSpr11E_BrownArrowWheel_Init:
YI_NorSpr11F_BlueArrowWheel_Init:
;$05F07F
	JSL.l CODE_03AE60
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr11E_BrownArrowWheel
	ASL
	TAY
	LDA.w DATA_05F07B,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A36,x
	JSR.w CODE_05F3B6
	RTL

;---------------------------------------------------------------------------

YI_NorSpr11E_BrownArrowWheel_Main:
YI_NorSpr11F_BlueArrowWheel_Main:
;$05F09F
	STZ.w $7400,x
	JSL.l CODE_03AA52
	JSL.l CODE_05F0FA
	JSR.w CODE_05F0F3
	JSR.w CODE_05F1F6
	JSR.w CODE_05F2F6
	JSR.w CODE_05F34C
	JSR.w CODE_05F3B6
	LDY.b $18,x
	BEQ.b CODE_05F0F2
	LDA.w $7A96,x
	BNE.b CODE_05F0F2
	LDA.w $7A98,x
	BNE.b CODE_05F0E2
	LDA.w $7A36,x
	SEC
	SBC.w #$0020
	STA.w $7A36,x
	CMP.w #$0010
	BPL.b CODE_05F0E2
	CPX.w $61B6
	BNE.b CODE_05F0DE
	STZ.w $61B6
CODE_05F0DE:
	JML.l CODE_03A31E

CODE_05F0E2:
	LDY.b #$FF
	LDA.w $7974
	AND.w #$0001
	BNE.b CODE_05F0EE
	LDY.b #$05
CODE_05F0EE:
	TYA
	STA.w $74A2,x
CODE_05F0F2:
	RTL

CODE_05F0F3:
	JSL.l CODE_03A2F8
	BCS.b CODE_05F113
	RTS

CODE_05F0FA:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_05F112
	LDY.w $7D38,x
	BNE.b CODE_05F115
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_05F114
CODE_05F112:
	PLY
CODE_05F113:
	PLA
CODE_05F114:
	RTL

CODE_05F115:
	LDA.w #$0040
	STA.w $7540,x
	STZ.w $75E0,x
	STZ.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05F133
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_05F133:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05F145
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_05F145:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ORA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05F18C
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05F1BB
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05F1BB
	LDA.w $6FA0,y
	AND.w #$0020
	BNE.b CODE_05F1BB
	PHY
	TYX
	JSL.l CODE_03B24B
	PLY
	LDA.w #$0000
	STA.w $7540,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
	LDA.w #$0040
	STA.w $7542,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	JSL.l CODE_03B53D
CODE_05F18C:
	JSL.l CODE_03AEFD
	LDA.b $78,x
	PHA
	LDA.w $7A36,x
	PHA
	LDA.w $7A38,x
	PHA
	TXY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	JSL.l CODE_03A377
	PLA
	STA.w $7A38,x
	PLA
	STA.w $7A36,x
	PLA
	STA.b $78,x
	LDA.w #CODE_039A6C
	STA.b $00
	LDA.w #CODE_039A6C>>16
	STA.b $02
	JMP.w [$7960]

CODE_05F1BB:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_05F1CF
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_05F1E6

CODE_05F1CF:
	LDA.w $7860,x
	AND.w #$0003
	BEQ.b CODE_05F1E6
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	BRA.b CODE_05F18C

CODE_05F1E6:
	PLY
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_05F1E9:
	db $00,$00,$00,$01,$01,$01,$03,$03,$04,$05,$06,$07,$08

CODE_05F1F6:
	LDY.w $60AB
	BMI.b CODE_05F200
	LDY.w $0D94
	BEQ.b CODE_05F203
CODE_05F200:
	JMP.w CODE_05F2D6

CODE_05F203:
	CPX.w $61B6
	BNE.b CODE_05F223
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_05F219
	AND.w #$0180
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05F223
CODE_05F219:
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
CODE_05F223:
	LDA.w $7C16,x
	CLC
	ADC.w #$000C
	CMP.w #$0018
	BCS.b CODE_05F200
	LDA.w $7C16,x
	BPL.b CODE_05F238
	EOR.w #$FFFF
	INC
CODE_05F238:
	STA.b $16,x
	TAY
	LDA.w DATA_05F1E9,y
	AND.w #$00FF
	CPX.w $61B6
	BNE.b CODE_05F254
	SEC
	SBC.w #$0027
	SEC
	SBC.w $6112
	CLC
	ADC.w $7182,x
	BRA.b CODE_05F29B

CODE_05F254:
	CLC
	ADC.w $7C18,x
	SEC
	SBC.w $6112
	STA.b $00
	CMP.w #$001B
	BPL.b CODE_05F2D6
	CMP.w #$0012
	BMI.b CODE_05F2D6
	LDY.w $61B6
	BEQ.b CODE_05F270
	JMP.w CODE_05F2DE

CODE_05F270:
	STX.w $61B6
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr11F_BlueArrowWheel
	BNE.b CODE_05F28D
	LDY.b $18,x
	BNE.b CODE_05F28D
	LDA.w #$018B
	STA.w $7A96,x
	LDA.w #$0200
	STA.w $7A98,x
	INC.b $18,x
CODE_05F28D:
	LDA.b $00
	SEC
	SBC.w #$001B
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
CODE_05F29B:
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	STZ.w $60AA
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $60FC
	BIT.w #$0018
	BEQ.b CODE_05F2C4
	AND.w #$01E0
	BNE.b CODE_05F2C4
	LDA.w $7860,x
	ORA.w #$0002
	STA.w $7860,x
CODE_05F2C4:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr120_DoubledSidedArrowLift
	BEQ.b CODE_05F2F5
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

CODE_05F2D6:
	CPX.w $61B6
	BNE.b CODE_05F2DE
	STZ.w $61B6
CODE_05F2DE:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr120_DoubledSidedArrowLift
	BEQ.b CODE_05F2F5
	SEC
	SBC.w #!Define_YI_NorSpr11E_BrownArrowWheel
	ASL
	TAY
	LDA.w DATA_05F07B,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05F2F5:
	RTS

CODE_05F2F6:
	LDA.b $78,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	PHA
	AND.w #$FE00
	XBA
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $7A38,x
	AND.w #$01FE
	STA.w $7A38,x
	PLA
	AND.w #$01FF
	STA.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b $75,x
	AND.w #$0100
	CLC
	ADC.w $7A38,x
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_05F34C:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05F37B
	LDA.w $7860,x
	AND.w #$0003
	BEQ.b CODE_05F37B
	DEC
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05F37B
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	SEC
	SBC.w #$0100
	AND.w #$01FE
	STA.w $7A38,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
CODE_05F37B:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05F3A8
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_05F3A8
	SEC
	SBC.w #$0008
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05F3A8
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	AND.w #$01FE
	STA.w $7A38,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
CODE_05F3A8:
	RTS

CODE_05F3A9:
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_550000+$4000
	LDY.b #(FXDATA_550000+$4000)>>16
	BRA.b CODE_05F3C1

CODE_05F3B6:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_540000+$2061
	LDY.b #(FXDATA_540000+$2061)>>16
CODE_05F3C1:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

YI_NorSpr120_DoubledSidedArrowLift_Init:
;$05F3F0
	JSL.l CODE_03AE60
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC
	BEQ.b CODE_05F40B
	INC
	BEQ.b CODE_05F405
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$0010
	BEQ.b CODE_05F40B
CODE_05F405:
	LDA.w #$0020
	STA.w $7042,x
CODE_05F40B:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7A36,x
	SEC
	SBC.w $7A38,x
	BEQ.b CODE_05F428
	AND.w #$00FF
	BEQ.b CODE_05F422
	LDY.b #$01
	STY.b $18,x
	BRA.b CODE_05F428

CODE_05F422:
	LDA.w $7A36,x
	STA.w $7A38,x
CODE_05F428:
	LDA.w #$0340
	STA.w $75E2,x
	JSR.w CODE_05F3A9
	RTL

;---------------------------------------------------------------------------

DATA_05F432:
	dw CODE_05F52E
	dw CODE_05F57D

YI_NorSpr120_DoubledSidedArrowLift_Main:
;$05F436
	STZ.w $7400,x
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_05F45B
	LDY.w $74A2,x
	BPL.b CODE_05F45B
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7A36,x
	AND.w #$0040
	BEQ.b CODE_05F45B
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_05F45B:
	JSL.l CODE_05F0FA
	JSR.w CODE_05F0F3
	JSR.w CODE_05F1F6
	JSR.w CODE_05F2F6
	JSR.w CODE_05F34C
	JSR.w CODE_05F47B
	TXY
	LDA.b $18,x
	ASL
	TAX
	JSR.w (DATA_05F432,x)
	JSR.w CODE_05F3A9
	RTL

CODE_05F47A:
	RTS

CODE_05F47B:
	LDA.w $7A96,x
	BNE.b CODE_05F47A
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05F47A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05F47A
	LDA.w $7D38,y
	BEQ.b CODE_05F47A
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHY
	TYX
	JSL.l CODE_03B25B
	PLY
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PHA
	LDA.w $7C76,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C78,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	PLA
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PHP
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_05F4F9
	PLP
	BPL.b CODE_05F4FC
	BRA.b CODE_05F501

CODE_05F4F9:
	PLP
	BPL.b CODE_05F501
CODE_05F4FC:
	LDA.w #$F000
	BRA.b CODE_05F504

CODE_05F501:
	LDA.w #$1000
CODE_05F504:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	PHP
	LDA.w $7A38,x
	LDY.b $18,x
	BEQ.b CODE_05F512
	LDA.w $7A36,x
CODE_05F512:
	PLP
	BPL.b CODE_05F51B
	CLC
	ADC.w #$0080
	BRA.b CODE_05F51F

CODE_05F51B:
	SEC
	SBC.w #$0080
CODE_05F51F:
	AND.w #$01FE
	STA.w $7A36,x
	INY
	INY
	STY.b $77,x
	LDY.b #$01
	STY.b $18,x
	RTS

CODE_05F52E:
	TYX
	LDA.w $75E2,x
	CLC
	ADC.w $75E0,x
	PHA
	AND.w #$00FF
	STA.w $75E0,x
	PLA
	AND.w #$FF00
	BPL.b CODE_05F546
	ORA.w #$00FF
CODE_05F546:
	XBA
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BPL.b CODE_05F55F
	LDA.b $76,x
	EOR.w #$0001
	STA.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $75E0,x
	BRA.b CODE_05F572

CODE_05F55F:
	CMP.w #$0100
	BMI.b CODE_05F57C
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $75E0,x
	CPX.w $61B6
	BEQ.b CODE_05F57C
CODE_05F572:
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_05F57C:
	RTS

CODE_05F57D:
	TYX
	LDA.w $7A38,x
	SEC
	SBC.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_05F5A6
	LDY.b $77,x
	DEY
	STY.b $77,x
	BPL.b CODE_05F5A6
	LDA.w $7A36,x
	STA.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.b $18,x
CODE_05F5A6:
	RTS

;---------------------------------------------------------------------------

DATA_05F5A7:
	dw $0100,$00A0,$0060

YI_NorSpr097_POWBlock_Init:
;$05F5AD
	LDY.w $0E25
	CPY.b #$06
	BNE.b CODE_05F5B8
	JML.l CODE_03A31E

CODE_05F5B8:
	JSL.l CODE_03AE60
	LDY.w $0E25
	LDA.w DATA_05F5A7,y
	STA.w $7A36,x
	STZ.w $7400,x
	JSR.w CODE_05F67D
	RTL

;---------------------------------------------------------------------------

DATA_05F5CC:
	dw CODE_0580C2
	dw CODE_05F6BF
	dw CODE_0580C2

YI_NorSpr097_POWBlock_Main:
;$05F5D2
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05F5CC,x)
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_05F5F4
	JSR.w CODE_05F67D
CODE_05F5F4:
	LDA.w #$0E00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0010
	STA.b $0A
	STZ.b $02
	LDY.b #$02
	STY.b $09
	LDY.b #$00
	STZ.b $06
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A36,x
	JSL.l CODE_059C6F
	LDY.b $04
	BNE.b CODE_05F629
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_05F628
	STZ.b $76,x
CODE_05F628:
	RTL

CODE_05F629:
	CPY.b #$04
	BNE.b CODE_05F628
	LDY.b $76,x
	BNE.b CODE_05F628
	LDA.w #$0020
	STA.w $61C6
	JSL.l CODE_0294B4
	INC.b $76,x
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_0085D2
	INC.w $0E25
	INC.w $0E25
	LDY.w $0E25
	CPY.b #$06
	BNE.b CODE_05F67C
	LDA.w #!Define_YI_AmbSpr1D4
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
	JSL.l CODE_03AEFD
	JSL.l CODE_03A31E
CODE_05F67C:
	RTL

CODE_05F67D:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STZ.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_548000+$60A0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$60A0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_05F6BF:
	TYX
	LDY.w $0E25
	LDA.w $7A36,x
	CMP.w DATA_05F5A7,y
	BPL.b CODE_05F6D2
	INC.b $76,x
	LDA.w DATA_05F5A7,y
	BRA.b CODE_05F6D6

CODE_05F6D2:
	SEC
	SBC.w #$0010
CODE_05F6D6:
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

DATA_05F6DA:
	dw $FFC0,$0040

YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_Init:
YI_NorSpr142_3JumpFlopsyFish_Init:
;$05F6DE
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	PHA
	SEC
	SBC.w $6094
	STA.b $00
	PLA
	AND.w #$0010
	EOR.w #$0010
	LSR
	LSR
	LSR
	STA.w $7400,x
	LDY.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CPY.b #!Define_YI_NorSpr041_Stork
	BEQ.b CODE_05F737
	LDA.b $00
	LDY.w $7400,x
	BNE.b CODE_05F719
	CMP.w #$0120
	BMI.b CODE_05F733
	BRA.b CODE_05F71E

CODE_05F719:
	CMP.w #$FFE0
	BPL.b CODE_05F733
CODE_05F71E:
	JSL.l CODE_03AE60
	LDY.b #$03
	STY.b $16,x
	JSR.w CODE_05F872
	LDY.w $7400,x
	LDA.w DATA_05F84C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_05F733:
	JML.l CODE_03A31E

CODE_05F737:
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_05F6DA,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSR.w CODE_05F7C3
	RTL

;---------------------------------------------------------------------------

DATA_05F746:
	dw CODE_05F850
	dw CODE_05F8DD
	dw CODE_05F922
	dw CODE_0580C2

YI_NorSpr141_SwimmingAndArcJumpingFlopsyFish_Main:
YI_NorSpr142_3JumpFlopsyFish_Main:
;$05F74E
	JSR.w CODE_05F76D
	JSL.l CODE_05F79A
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05F746,x)
	JSR.w CODE_05F7C3
	JSL.l CODE_03A5B7
	RTL

DATA_05F769:
	db $03,$04,$05,$04

CODE_05F76D:
	LDA.w $7722,x
	BMI.b CODE_05F799
	LDA.w $7362,x
	BMI.b CODE_05F799
	LDY.w $74A2,x
	BMI.b CODE_05F799
	JSL.l CODE_03AA52
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6000,y
	STA.w $6020,y
	LDA.w $6002,y
	STA.w $6022,y
	LDA.w $6004,y
	STA.w $6024,y
	SEP.b #$10
CODE_05F799:
	RTS

CODE_05F79A:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000C
	BNE.b CODE_05F7C2
	CPX.w $61B6
	BNE.b CODE_05F7AA
	STZ.w $61B6
CODE_05F7AA:
	LDA.w $7722,x
	BMI.b CODE_05F7B3
	JSL.l CODE_03AEFD
CODE_05F7B3:
	LDA.w #$0004
	STA.w $7402,x
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
CODE_05F7C2:
	RTL

CODE_05F7C3:
	LDA.w $7722,x
	BMI.b CODE_05F83F
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05F804
	LDA.w #$0080
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BRA.b CODE_05F807

CODE_05F804:
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
CODE_05F807:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #FXDATA_550000+$4020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$4020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_05F83F:
	RTS

DATA_05F840:
	dw $0001,$000E

DATA_05F844:
	dw $080A,$080A

DATA_05F848:
	dw $000E,$0001

DATA_05F84C:
	dw $FEF8,$0108

CODE_05F850:
	TYX
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05F88C
	SEC
	SBC.w #$0020
	CMP.w #$0040
	BCS.b CODE_05F8AF
	JSL.l CODE_03AD74
	BCC.b CODE_05F88C
	INC.b $16,x
CODE_05F872:
	JSR.w CODE_05F953
	LDA.w #$FA80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$002E
	STA.w $7542,x
	LDA.w #$0011
	STA.w $7402,x
	LDY.b #$02
	STY.b $76,x
	RTS

CODE_05F88C:
	STA.b $00
	LDA.w $7400,x
	DEC
	EOR.b $00
	BMI.b CODE_05F8AF
	LDY.w $7400,x
	STY.b $78,x
	LDA.w DATA_05F848,y
	STA.w $7402,x
	LDA.w #$0008
	STA.w $7A98,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
	INC.b $76,x
	RTS

CODE_05F8AF:
	LDY.w $7400,x
	LDA.w DATA_05F84C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_05F8D8
	LDA.b $18,x
	INC
	AND.w #$0003
	STA.b $18,x
	TAY
	LDA.w DATA_05F840,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_05F844,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_05F8D8:
	RTS

DATA_05F8D9:
	db $0F,$01,$10,$0E

CODE_05F8DD:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_05F921
	LDA.w #$0008
	STA.w $7A98,x
	INC.b $18,x
	LDA.b $18,x
	CMP.w #$0003
	BNE.b CODE_05F8F5
	DEC.b $76,x
	RTS

CODE_05F8F5:
	LDY.b $78,x
	BNE.b CODE_05F906
	CMP.w #$0002
	PHP
	LDA.b $18,x
	CLC
	ADC.w #$0002
	TAY
	BRA.b CODE_05F90C

CODE_05F906:
	CMP.w #$0001
	PHP
	LDY.b $18,x
CODE_05F90C:
	LDA.w DATA_05F8D9-$01,y
	AND.w #$00FF
	STA.w $7402,x
	PLP
	BNE.b CODE_05F921
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_05F921:
	RTS

CODE_05F922:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w $7182,x
	BPL.b CODE_05F952
	JSR.w CODE_05F953
	DEC.b $16,x
	BNE.b CODE_05F94C
	LDY.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CPY.b #!Define_YI_NorSpr041_Stork
	BEQ.b CODE_05F93C
	INC.b $76,x
	RTS

CODE_05F93C:
	JSL.l CODE_03AEFD
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $7402,x
	STZ.b $76,x
	RTS

CODE_05F94C:
	LDA.w #$FA80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_05F952:
	RTS

CODE_05F953:
	LDA.w #!Define_YI_AmbSpr1FE
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0006
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	RTS

;---------------------------------------------------------------------------

YI_NorSpr092_MelonBug_Init:
;$05F97A
	RTL

;---------------------------------------------------------------------------

DATA_05F97B:
	dw CODE_05FA42
	dw CODE_05FA81
	dw CODE_05FAC7

YI_NorSpr092_MelonBug_Main:
;$05F981
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_05F994
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_05F994:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_05F97B,x)
	LDA.w #$0040
	STA.w $7542,x
	LDY.b $76,x
	DEY
	BNE.b CODE_05F9C0
	LDY.w $7402,x
	CPY.b #$02
	BPL.b CODE_05F9C0
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$00A0
	CMP.w #$0140
	BCS.b CODE_05F9C0
	LDA.w #$0008
	STA.w $7542,x
CODE_05F9C0:
	LDY.w $7402,x
	CPY.b #$02
	BMI.b CODE_05F9CE
	JSR.w CODE_05FB2E
	JSR.w CODE_05FC2F
	RTL

CODE_05F9CE:
	STZ.b $18,x
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05FA21
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05FA3D
	LDA.w $7D38,y
	BEQ.b CODE_05FA3D
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$0300
	BMI.b CODE_05F9EE
	LDA.w #$0300
CODE_05F9EE:
	CMP.w #$FD00
	BPL.b CODE_05F9F6
	LDA.w #$FD00
CODE_05F9F6:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7402,x
	STA.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BMI.b CODE_05FA13
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BPL.b CODE_05FA13
	TYX
	JML.l CODE_03B24B

CODE_05FA13:
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BCC.b CODE_05FA3D
	CMP.w #!Define_YI_NorSpr170_AquaLakitu
	BCS.b CODE_05FA3D
	JSR.w CODE_05FD1A
	RTL

CODE_05FA21:
	LDY.w $7D36,x
	BPL.b CODE_05FA3D
	LDA.w #!Define_YI_SoundID62_MelonBugBump
	STA.b $18,x
	JSL.l CODE_0085D2
	LDA.w #$0010
	STA.w $7AF6,x
	LDA.w #$0002
	STA.w $7402,x
	STA.b $76,x
CODE_05FA3D:
	JSL.l CODE_03A5B7
	RTL

CODE_05FA42:
	TYX
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	STZ.w $7402,x
	LDA.w $7A96,x
	BNE.b CODE_05FA7C
	STZ.b $78,x
	LDA.w $7C16,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_05FA74
	LDA.w $7C18,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_05FA74
	LDA.w #$0002
	STA.w $7402,x
	STA.b $78,x
CODE_05FA74:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_05FA7C:
	RTS

DATA_05FA7D:
	dw $0010,$0060

CODE_05FA81:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05FA95
	LDY.b $78,x
	STY.b $76,x
	LDA.w DATA_05FA7D,y
	STA.w $7A96,x
	RTS

CODE_05FA95:
	LDY.b $78,x
	BNE.b CODE_05FAC6
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$00A0
	CMP.w #$0140
	BCS.b CODE_05FAC0
	LDA.w $7A98,x
	BNE.b CODE_05FAB9
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_05FAB9:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

CODE_05FAC0:
	LDA.w #$0001
	STA.w $7402,x
CODE_05FAC6:
	RTS

CODE_05FAC7:
	TYX
	JSR.w CODE_05FDBA
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05FAFF
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_05FAE6
	LSR
	CMP.w #$0100
	BMI.b CODE_05FAE6
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_05FAE6:
	LDA.w $75E0,x
	ORA.w $7A96,x
	ORA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05FAFF
	LDY.w $7D36,x
	BMI.b CODE_05FAFF
	LDA.w #$0010
	STA.w $7A96,x
	STZ.b $76,x
	RTS

CODE_05FAFF:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05FB08
	EOR.w #$FFFF
	INC
CODE_05FB08:
	CLC
	ADC.w $7A38,x
	CMP.w #$0400
	BCC.b CODE_05FB20
	SEC
	SBC.w #$0400
	PHA
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	PLA
CODE_05FB20:
	STA.w $7A38,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

;---------------------------------------------------------------------------

DATA_05FB2A:
	dw $0180,$FE80

CODE_05FB2E:
	LDA.w $7AF6,x
	BNE.b CODE_05FB38
	LDY.w $7D36,x
	BMI.b CODE_05FB3B
CODE_05FB38:
	STZ.b $18,x
	RTS

CODE_05FB3B:
	LDY.b $18,x
	BNE.b CODE_05FB48
	LDA.w #!Define_YI_SoundID62_MelonBugBump
	STA.b $18,x
	JSL.l CODE_0085D2
CODE_05FB48:
	LDA.w $0036
	AND.w #$0003
	BEQ.b CODE_05FB59
	AND.w #$0002
	DEC
	EOR.w $7C16,x
	BMI.b CODE_05FBD5
CODE_05FB59:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05FBA8
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0300
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	EOR.w $60A8
	BMI.b CODE_05FB97
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $60A8
	EOR.w $60A8
	BMI.b CODE_05FBA8
	LDA.w $7C16,x
	EOR.w $60A8
	BPL.b CODE_05FBA8
	BRA.b CODE_05FB9F

CODE_05FB97:
	LDA.w $7C16,x
	EOR.w $60A8
	BPL.b CODE_05FBA8
CODE_05FB9F:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $60A8
	STA.w $60B4
CODE_05FBA8:
	LDA.w $7C16,x
	BPL.b CODE_05FBB7
	CLC
	ADC.w $6120
	CLC
	ADC.w $7BB6,x
	BRA.b CODE_05FBBF

CODE_05FBB7:
	SEC
	SBC.w $6120
	SEC
	SBC.w $7BB6,x
CODE_05FBBF:
	STA.b $06
	JSL.l CODE_05CE7A
	LDA.w $60DE
	ORA.w $6150
	BNE.b CODE_05FBD4
	LDY.w $77C2,x
	TYA
	STA.w $60C4
CODE_05FBD4:
	RTS

CODE_05FBD5:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w $60A8
	BPL.b CODE_05FBF2
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w $60A8
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	RTS

CODE_05FBF2:
	LDY.w $77C2,x
	LDA.w $60A8
	CLC
	ADC.w DATA_05FB2A,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $60A8
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$00C0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $60A8
	STA.w $60B4
CODE_05FC1F:
	RTS

DATA_05FC20:
	dw $0080,$FF80,$FD00,$0300

DATA_05FC28:
	db !Define_YI_SoundID0C_ShellHit2,!Define_YI_SoundID0D_ShellHit3,!Define_YI_SoundID0E_ShellHit4,!Define_YI_SoundID0F_ShellHit5
	db !Define_YI_SoundID10_ShellHit6,!Define_YI_SoundID11_ShellHit7,!Define_YI_SoundID12_ShellHit8

CODE_05FC2F:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_05FC3C:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_05FC1F
	BEQ.b CODE_05FC1F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05FC9C
	LDA.w $6FA2,y
	AND.w #$6000
	BEQ.b CODE_05FC8C
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0FA_Flower
	BEQ.b CODE_05FC79
	CMP.w #!Define_YI_NorSpr110_Flower
	BEQ.b CODE_05FC79
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BMI.b CODE_05FC9C
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BPL.b CODE_05FC9C
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_05FC9C
	TYX
	JSL.l CODE_03B24B
	JMP.w CODE_05FD58

CODE_05FC79:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0002
	BNE.b CODE_05FC9C
	INC.w $7D38,x
	LDA.w #$0620
	STA.w $6FA0,x
	BRA.b CODE_05FC1F

CODE_05FC8C:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr092_MelonBug
	BNE.b CODE_05FCA3
	LDA.w $7A36,x
	BEQ.b CODE_05FC9E
	STZ.w $7A36,x
CODE_05FC9C:
	BRA.b CODE_05FCE1

CODE_05FC9E:
	JSR.w CODE_05FCED
	BRA.b CODE_05FCE1

CODE_05FCA3:
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC
	CMP.w #$0009
	BPL.b CODE_05FCB0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_05FCB0:
	PLA
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BCC.b CODE_05FCC0
	CMP.w #!Define_YI_NorSpr170_AquaLakitu
	BCS.b CODE_05FCC0
	JSR.w CODE_05FD0D
	BRA.b CODE_05FCC7

CODE_05FCC0:
	PHY
	TYX
	JSL.l CODE_03B25B
	PLY
CODE_05FCC7:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$0008
	BMI.b CODE_05FCD6
	TYX
	JSL.l CODE_03A496
	BRA.b CODE_05FCE1

CODE_05FCD6:
	TAY
	LDA.w DATA_05FC28-$01,y
	AND.w #$00FF
	JSL.l CODE_0085D2
CODE_05FCE1:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JMP.w CODE_05FC3C

CODE_05FCED:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BNE.b CODE_05FCF8
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05FD00
	RTS

CODE_05FCF8:
	JSR.w CODE_05FD58
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_05FD08
CODE_05FD00:
	PHX
	TYX
	PLY
	JSR.w CODE_05FD58
	LDX.b $12
CODE_05FD08:
	RTS

DATA_05FD09:
	dw $FE00,$0200

CODE_05FD0D:
	CMP.w #$0169
	BCS.b CODE_05FD1A
	LDA.w $7D38,y
	BEQ.b CODE_05FD1A
	JSR.w CODE_05FD58
CODE_05FD1A:
	PHY
	TYX
	JSL.l CODE_0CFF61
	JSL.l CODE_03B24B
	PLY
	LDA.w $7CD6,x
	LDX.b #$00
	CMP.w $7CD6,y
	BPL.b CODE_05FD31
	INX
	INX
CODE_05FD31:
	LDA.w DATA_05FD09,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0400
	STA.w $75E2,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDX.b $12
	RTS

CODE_05FD58:
	PHY
	JSL.l CODE_03B288
	PLY
	PHY
	LDA.w $7CD6,y
	LDY.b #$00
	CMP.w $7CD6,x
	BPL.b CODE_05FD6B
	INY
	INY
CODE_05FD6B:
	LDA.w DATA_05FD09,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0840
	STA.w $6FA2,x
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	PLY
	RTS

DATA_05FD8E:
	dw $0008,$0008,$0010,$0020,$0020,$0010,$0008,$0000
	dw $0008,$0010,$0020,$0040,$0040,$0020,$0010

DATA_05FDAC:
	dw $0000,$0300,$021F,$0180,$FE80,$FDE1,$FD00

CODE_05FDBA:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	BNE.b CODE_05FDD8
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_05FE1B
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_05FDD3
	LDY.b #$0E
CODE_05FDD3:
	LDA.w #$0000
	BRA.b CODE_05FDFB

CODE_05FDD8:
	CMP.w #$0080
	BMI.b CODE_05FDE8
	ORA.w #$FF00
	LDY.b #$04
	CLC
	ADC.w #$0020
	BRA.b CODE_05FDEE

CODE_05FDE8:
	LDY.b #$0A
	SEC
	SBC.w #$0020
CODE_05FDEE:
	BEQ.b CODE_05FDF8
	BMI.b CODE_05FDF6
	DEY
	DEY
	BRA.b CODE_05FDF8

CODE_05FDF6:
	INY
	INY
CODE_05FDF8:
	LDA.w DATA_05FDAC,y
CODE_05FDFB:
	STA.w $75E0,x
	ASL
	STA.b $00
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_05FE12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E0,x
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_05FE18
CODE_05FE12:
	TYA
	CLC
	ADC.w #$0010
	TAY
CODE_05FE18:
	LDA.w DATA_05FD8E,y
CODE_05FE1B:
	STA.w $7540,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr06B_GreenEggBlock_Init:
;$05FE1F
	JSL.l CODE_03AD74
	BCC.b CODE_05FE33
	JSL.l CODE_05FF7E
	LDA.w $7040,x
	CLC
	ADC.w #$1801
	STA.w $7040,x
CODE_05FE33:
	INC.w $0C02
	LDA.w $70E2,x
	STA.b $18,x
	LDA.w $7182,x
	STA.b $76,x
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

DATA_05FE4A:
	dw $00F0,$00D8,$0100,$00C8,$00E0,$00F8,$00D0,$00E8

DATA_05FE5A:
	dw $FD30,$FD78,$FD00,$FDA8,$FD60,$FD18,$FD90,$FD48

DATA_05FE6A:
	dw $0300,$FD00

YI_NorSpr06B_GreenEggBlock_Main:
;$05FE6E
	LDA.w $7722,x
	ORA.w $7362,x
	BMI.b CODE_05FE7A
	JSL.l CODE_03AA52
CODE_05FE7A:
	JSL.l CODE_03AF23
	JSL.l CODE_03D127
	LDY.w $7D36,x
	DEY
	BMI.b CODE_05FE9D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_05FE9D
	LDA.w $6FA2,y
	AND.w #$0800
	BEQ.b CODE_05FE9D
	TYX
	JSL.l CODE_03B24B
CODE_05FE9D:
	LDA.w $7A38,x
	BPL.b CODE_05FEC2
	LDA.b $18,x
	STA.w $0091
	LDA.b $76,x
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$5F04
	STA.w $0095
	JSL.l CODE_109295
	LDX.b $12
	JML.l CODE_03A31E

CODE_05FEC2:
	LDY.w $7A36,x
	CLC
	ADC.w DATA_05FE6A,y
	STA.w $7A38,x
	BPL.b CODE_05FED5
	LDA.w #$00FF
	STA.w $74A2,x
	RTL

CODE_05FED5:
	CMP.w #$1800
	BMI.b CODE_05FF2D
	LDA.w #$0002
	STA.w $7A36,x
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0006
	BCS.b CODE_05FF2D
	LDA.w #$0025
	JSL.l CODE_03A34C
	BCC.b CODE_05FF2D
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $0C02
	AND.w #$0007
	ASL
	TAX
	LDA.w DATA_05FE5A,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w DATA_05FE4A,x
	LDX.b $12
	BIT.b $78,x
	BPL.b CODE_05FF23
	EOR.w #$FFFF
	INC
CODE_05FF23:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
CODE_05FF2D:
	LDA.w $7A39,x
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_00E9D4,x
	TAY
	STY.w !REGISTER_Mode7MatrixParameterA
	XBA
	TAY
	STY.w !REGISTER_Mode7MatrixParameterA
	LDY.b #$20
	STY.w !REGISTER_Mode7MatrixParameterB
	LDA.l DATA_00E954,x
	PHA
	LDX.b $12
	LDA.b $76,x
	CLC
	ADC.w !REGISTER_PPUMultiplicationProductMid
	STA.w $7182,x
	PLY
	STY.w !REGISTER_Mode7MatrixParameterA
	PLY
	STY.w !REGISTER_Mode7MatrixParameterA
	LDY.b #$20
	STY.w !REGISTER_Mode7MatrixParameterB
	LDA.w #$0020
	SEC
	SBC.w !REGISTER_PPUMultiplicationProductMid
	BIT.b $78,x
	BPL.b CODE_05FF73
	EOR.w #$FFFF
	INC
CODE_05FF73:
	CLC
	ADC.b $18,x
	STA.w $70E2,x
	LDA.w $7722,x
	BMI.b CODE_05FFC3
CODE_05FF7E:
	LDA.w $7A39,x
	BIT.b $78,x
	BMI.b CODE_05FF89
	EOR.w #$FFFF
	INC
CODE_05FF89:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_540000+$7040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$7040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_08835F>>16
	LDA.w #FXCODE_08835F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_05FFC3:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr05D_GlitchedSprite_Init:
YI_NorSpr086_GlitchedSprite_Init:
YI_NorSpr05D_GlitchedSprite_Main:
YI_NorSpr086_GlitchedSprite_Main:
;$05FFC4
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($05FFE6, incbin, DATA_05FFE6_YI_U2.bin)
else
	%FREE_BYTES($05FFC4, 60, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank06Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

YI_NorSpr03F_SlimeBlock_Init:
;$068000
	LDA.b $18,x
	BNE.b CODE_068064
	JSL.l CODE_03D406
	REP.b #$10
	LDA.w $7182,x
	STA.w $1094
	SEC
	SBC.w #$0038
	PHA
	AND.w #$FF00
	LSR
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $70E2,x
	STA.w $1092
	SEC
	SBC.w #$0018
	PHA
	AND.w #$FF00
	XBA
	ORA.b $00
	TAX
	PLA
	AND.w #$00F0
	LSR
	LSR
	LSR
	STA.b $00
	PLA
	AND.w #$00F0
	ASL
	ORA.b $00
	STA.b $00
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	CLC
	ADC.b $00
	STA.b $00
	TAX
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0174
	BEQ.b CODE_068060
CODE_06805C:
	JML.l CODE_03A31E

CODE_068060:
	LDA.b $00
	STA.b $18,x
CODE_068064:
	LDA.w $0CB2
	BNE.b CODE_06805C
	LDA.w $6120
	CLC
	ADC.w #$0030
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $70E2,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w $611C
	CMP.b $00
	BCS.b CODE_06809D
	LDA.w $7182,x
	SEC
	SBC.w $611E
	SEC
	SBC.w $6122
	SEC
	SBC.w #$0041
	BPL.b CODE_06809D
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_0680A4
CODE_06809D:
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_0680A4:
	INC.w $0CB2
	LDA.w #$0174
	JSL.l CODE_0681A6
	LDA.b $04
	XBA
	AND.w #$00E3
	STA.w $107E
	ORA.w #$0080
	STA.w $1080
	LDA.b $18,x
	STA.w $1090
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,x
	STZ.w $107C
	LDA.w #$0008
	STA.b $02
	LDA.w $7182,x
	CLC
	ADC.w #$FFC8
	AND.w #$00F0
	ASL
	ASL
	STA.b $00
	LDA.w $70E2,x
	CLC
	ADC.w #$FFE0
	AND.w #$01F0
	LSR
	LSR
	LSR
	BIT.w #$0020
	BEQ.b CODE_0680F7
	EOR.w #$0420
CODE_0680F7:
	TSB.b $00
	LDA.b $00
	CLC
	ADC.w #$6800
	STA.b $00
	STA.w $108E
	LDA.w #$0006
	STA.b $0E
	PHB
	SEP.b #$20
	LDA.b #$7E4800>>16
	PHA
	PLB
	REP.b #$30
	LDX.w $7E4800
CODE_068115:
	LDA.b $00
	STA.w $0000,x
	LDA.w #$0880
	STA.w $0002,x
	LDA.w #$0019
	STA.w $0004,x
	LDA.w #$107E
	STA.w $0005,x
	LDA.w #$0000
	STA.w $0007,x
	LDA.w #$000C
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	TAX
	DEC.b $02
	BEQ.b CODE_06814F
	LDA.b $00
	CLC
	ADC.w #$0020
	STA.b $00
	BRA.b CODE_068115

CODE_06814F:
	LDA.b $00
	INC
	STA.w $0000,x
	LDA.w #$0880
	STA.w $0002,x
	LDA.w #$0019
	STA.w $0004,x
	LDA.w #$1080
	STA.w $0005,x
	LDA.w #$0000
	STA.w $0007,x
	LDA.w #$000A
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	JSR.w CODE_0690D2
	PLB
	LDA.w #$0008
	STA.w $7A96,x
	LSR
	STA.w $105E
	LDA.w #$E000
	STA.w $1078
	STZ.w $1070
	LDA.w #$0001
	STA.w $10B6
	LDA.w #$883A
	STA.w $108C
	LDY.b #$0C
	STY.b $76,x
	RTL

;---------------------------------------------------------------------------

CODE_0681A6:
	PHY
	REP.b #$10
	TAY
	AND.w #$FF00
	XBA
	ASL
	TAX
	LDA.l FXDATA_4C32A4,x
	STA.b $00
	TYA
	AND.w #$00FF
	ASL
	ASL
	ASL
	CLC
	ADC.b $00
	TAX
	LDA.l FXDATA_4C33F2,x
	STA.b $04
	LDA.l FXDATA_4C33F2+$02,x
	STA.b $06
	LDA.l FXDATA_4C33F2+$04,x
	STA.b $08
	LDA.l FXDATA_4C33F2+$06,x
	STA.b $0A
	SEP.b #$10
	PLY
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

DATA_0681DF:
	dw CODE_0681FE
	dw CODE_06823D
	dw CODE_068292
	dw CODE_06833D
	dw CODE_068347
	dw CODE_068362
	dw CODE_0682A2
	dw CODE_068384

YI_NorSpr02D_SalvoTheSlime_Init:
;$0681EF
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0681DF,x)
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_0681FE:
	TYX
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$01E0
	BMI.b CODE_06823C
	STZ.w $60A8
	STZ.w $60B4
	JSL.l CODE_04F74A
	LDA.w #$0048
	JSL.l CODE_03A34C
	LDA.w #$0010
	STA.w $70E2,y
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #$00DD
	JSL.l CODE_03A364
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0026
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STZ.w $105A
	INC.b $76,x
CODE_06823C:
	RTS

CODE_06823D:
	TYX
	STZ.w $60C4
	LDY.w $105A
	BEQ.b CODE_068291
	LDA.w #$0132
	JSL.l CODE_03A364
	LDA.w #$0240
	STA.w $70E2,y
	LDA.w #$0730
	STA.w $7182,y
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w $6FA2,y
	ORA.w #$2000
	STA.w $6FA2,y
	SEP.b #$20
	LDA.b #$01
	STA.w $74A2,y
	LDA.b #$2E
	STA.w $7042,y
	REP.b #$20
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
	LDX.b #$20
CODE_06827E:
	LDA.l $702E8A,x
	STA.l YI_Global_PaletteMirror[$DF].LowByte,x
	DEX
	DEX
	BNE.b CODE_06827E
	LDX.b $12
	STZ.w $105A
	INC.b $76,x
CODE_068291:
	RTS

CODE_068292:
	TYX
	LDY.w $105A
	BEQ.b CODE_0682A1
	STZ.w $10B6
	LDY.b #$06
	STY.b $76,x
	INC.b $76,x
CODE_0682A1:
	RTS

CODE_0682A2:
	TYX
	JSL.l CODE_03D5E4
	STZ.w $7ECC
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$00A8
	STA.w $70E2,x
	LDA.w #$0728
	STA.w $7182,x
	STA.w $1076
	LDA.w #$07B0
	STA.w $108A
	INC.w $0CB2
	LDY.b #$05
	STY.b $76,x
	LDA.w #!Define_YI_AmbSpr1D1
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0006
	STA.w $7182,x
	STA.w $7142,y
	LDA.w $7182,x
	SEC
	SBC.w $609C
	CLC
	ADC.w #$0016
	STA.w $1062
	LDA.w #$FFFF
	STA.w $7782,y
	TYA
	STA.w $7A38,x
	TXA
	STA.w $7E4C,y
	STZ.w $105C
	STZ.w $105E
	STZ.w $1060
	STZ.w $1064
	STZ.w $1066
	LDA.w #$0100
	STA.w $1068
	STZ.w $106C
	STZ.w $1084
	STZ.w $1086
	LDA.w #$B000
	STA.w $1078
	STZ.w $106A
	LDA.w #$00E0
	STA.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $1070
	LDA.w #$0001
	STA.w $1082
	STZ.w $1088
	PLA
	RTL

CODE_06833D:
	LDA.w #$0016
	REP.b #$10
	LDY.w #$2800
	BRA.b CODE_06834F

CODE_068347:
	LDA.w #$0015
	REP.b #$10
	LDY.w #$2C00
CODE_06834F:
	PHA
	PHY
	SEP.b #$10
	LDA.w #$0404
	TRB.w !RAM_YI_Global_MainScreenLayers
CODE_068358:
	REP.b #$10
	PLY
	PLA
	JSR.w CODE_068395
	BRA.b CODE_06837F

CODE_068362:
	REP.b #$10
	LDA.w #$00DD
	LDY.w #$3400
	JSR.w CODE_068395
	LDX.b #$06
CODE_06836F:
	LDA.l DATA_5FE344,x
	STA.l $702D74,x
	STA.l YI_Global_PaletteMirror[$04].LowByte,x
	DEX
	DEX
	BPL.b CODE_06836F
CODE_06837F:
	LDX.b $12
	INC.b $76,x
	RTS

CODE_068384:
	JSR.w CODE_068603
	LDY.b #!REGISTER_BG2HorizScrollOffset
	STY.w HDMA[$03].Destination
	INY
	STY.w HDMA[$04].Destination
	LDX.b $12
	DEC.b $76,x
	RTS

CODE_068395:
	PHY
	LDX.w #$6800
	JSL.l CODE_00B756
	PLY
	LDX.w #$706800>>16
	STX.w $0001
	LDX.w #$706800
	JSL.l CODE_00BEA6
	SEP.b #$10
	RTS

;---------------------------------------------------------------------------

DATA_0683AE:
	dw CODE_068999
	dw CODE_0689B1
	dw CODE_068A95
	dw CODE_068B08
	dw CODE_068999
	dw CODE_068B59
	dw CODE_068999
	dw CODE_068B94
	dw CODE_068BAD
	dw CODE_068BC6
	dw CODE_068C0B
	dw CODE_068C8A
	dw CODE_068D65
	dw CODE_068E80

YI_NorSpr02D_SalvoTheSlime_Main:
YI_NorSpr03F_SlimeBlock_Main:
;$0683CA
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $1079
	TYA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0180
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $107A
	LDY.b $76,x
	CPY.b #$0C
	BPL.b CODE_068402
	JSR.w CODE_068442
	JSR.w CODE_068722
CODE_068402:
	JSR.w CODE_068622
	LDY.w $10B6
	BEQ.b CODE_068417
	LDY.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CPY.b #!Define_YI_PlayerState06
	BNE.b CODE_068417
	LDA.w #$0215
	STA.w !RAM_YI_Global_MainScreenLayers
CODE_068417:
	JSL.l CODE_03AF23
	LDY.b $76,x
	CPY.b #$0C
	BEQ.b CODE_06842B
	CPY.b #$0D
	BEQ.b CODE_068428
	JSR.w CODE_0687A5
CODE_068428:
	JSR.w CODE_068909
CODE_06842B:
	JSR.w CODE_06866E
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0683AE,x)
	LDA.w $106A
	BEQ.b CODE_06843E
	DEC.w $106A
CODE_06843E:
	JSR.w CODE_0686C1
	RTL

CODE_068442:
	LDY.b $76,x
	CPY.b #$05
	BEQ.b CODE_068452
	CPY.b #$0B
	BNE.b CODE_068464
	LDY.w $1088
	BEQ.b CODE_068464
	RTS

CODE_068452:
	STZ.w $600E
	STZ.w $6010
	LDY.w $7A38,x
	LDA.w $7142,y
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	BRA.b CODE_0684AA

CODE_068464:
	LDY.w $7A38,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	PHA
	AND.w #$00FF
	TAY
	BPL.b CODE_068474
	ORA.w #$FF00
CODE_068474:
	STA.w $600E
	PLA
	AND.w #$FF00
	BPL.b CODE_068480
	ORA.w #$00FF
CODE_068480:
	XBA
	STA.b $00
	LDA.w #$0028
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $107A
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $00
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0008
	STA.w $6010
	LDA.w #$0000
CODE_0684AA:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $1062
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w $6000
	LDA.w $7682,x
	STA.w $6002
	LDA.w $107A
	STA.w $6006
	TXA
	STA.w $6012
	LDA.w #$02C0
	SEC
	SBC.b $18,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_0684D7:
	LDY.w $1079
	TYA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $6004
	LDA.w $1064
	STA.w $6008
	LDA.w $1066
	STA.w $600A
	LDA.w $1068
	STA.w $600C
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A81C9>>16
	LDA.w #FXCODE_0A81C9
	JSL.l !RAM_YI_Global_RT_00DE91
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.w $1076
	ORA.w $1077
	BEQ.b CODE_06853C
	LDA.b #$08
	TRB.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDY.b #$13
	LDA.b #$04
	BRA.b CODE_06854B

CODE_06853C:
	LDY.w $10B6
	BEQ.b CODE_068547
	LDY.b #$10
	LDA.b #$07
	BRA.b CODE_06854B

CODE_068547:
	LDY.b #$12
	LDA.b #$05
CODE_06854B:
	STY.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$02
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$20
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	JSR.w CODE_068591
	LDX.b $12
	LDA.w $6020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b $76,x
	CPY.b #$05
	BEQ.b CODE_068590
	LDY.w $7A38,x
	LDA.w $600E
	CLC
	ADC.w $70E2,x
	STA.w $70E2,y
	LDA.w $6010
	CLC
	ADC.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
CODE_068590:
	RTS

CODE_068591:
	LDY.w $10B6
	BEQ.b CODE_0685E0
	LDY.w $106A
	BEQ.b CODE_0685BE
	LDA.w $7AF6,x
	BNE.b CODE_0685DF
	LDA.w #$0004
	STA.w $7AF6,x
	LDA.l YI_Global_PaletteMirror[$01].LowByte
	EOR.w #$FFFF
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l $702D6E
	LDA.l YI_Global_PaletteMirror[$02].LowByte
	EOR.w #$FFFF
	BRA.b CODE_0685CC

CODE_0685BE:
	LDA.w #$637D
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l $702D6E
	LDA.w #$4A75
CODE_0685CC:
	STA.l YI_Global_PaletteMirror[$02].LowByte
	STA.l $702D70
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$03].LowByte
	STA.l $702D72
CODE_0685DF:
	RTS

CODE_0685E0:
	LDY.w $106A
	BEQ.b CODE_068603
	LDA.w $7AF6,x
	BNE.b CODE_068603
	LDA.w #$0004
	STA.w $7AF6,x
	LDX.b #$1C
CODE_0685F2:
	LDA.l DATA_5FA56E,x
	STA.l YI_Global_PaletteMirror[$60].LowByte,x
	STA.l YI_Global_PaletteMirror[$70].LowByte,x
	DEX
	DEX
	BNE.b CODE_0685F2
	RTS

CODE_068603:
	LDX.b #$1C
CODE_068605:
	LDA.l DATA_5FE9C6,x
	STA.l $702E2C,x
	STA.l YI_Global_PaletteMirror[$60].LowByte,x
	LDA.l DATA_5FE9E2,x
	STA.l $702E4C,x
	STA.l YI_Global_PaletteMirror[$70].LowByte,x
	DEX
	DEX
	BNE.b CODE_068605
	RTS

CODE_068622:
	LDY.w $1082
	BNE.b CODE_068631
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_068631
	CPY.b #$03
	BPL.b CODE_06866D
CODE_068631:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_06866D
	CMP.w #$000C
	BEQ.b CODE_06866D
	AND.w #$0008
	LSR
	LSR
	DEC
	CLC
	ADC.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $10BC
	EOR.w #$FFFF
	INC
	STA.w $10BC
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_06866D:
	RTS

CODE_06866E:
	LDY.w $1079
	CPY.b #$4C
	BCS.b CODE_0686C0
	LDY.w $10B6
	BNE.b CODE_068683
	LDY.w $0B59
	BNE.b CODE_068683
	JSL.l CODE_02A982
CODE_068683:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0686C0
	LDY.b $76,x
	CPY.b #$09
	BEQ.b CODE_0686C0
	CPY.b #$0A
	BEQ.b CODE_0686C0
	CPY.b #$0B
	BEQ.b CODE_0686C0
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$000A
	STA.b $76,x
	LDA.w #$FFFF
	STA.w $7AF8,x
	STA.w $0B7B
	LDY.w $10B6
	BNE.b CODE_0686C0
	DEC.b $76,x
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_0686C0:
	RTS

CODE_0686C1:
	LDA.w $10B6
	ORA.w $1082
	ORA.w $0B59
	BNE.b CODE_06871D
	LDY.b $76,x
	CPY.b #$09
	BPL.b CODE_06871D
	LDA.w #$0132
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	INC
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R6_MultiplierLo
	BNE.b CODE_06871D
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R6_MultiplierLo
	BNE.b CODE_06871D
	LDA.w #$0132
	JSL.l CODE_03A364
	BCC.b CODE_06871D
	LDA.b $10
	AND.w #$00FF
	CLC
	ADC.w #$01C8
	STA.w $70E2,y
	LDA.w #$0730
	STA.w $7182,y
	LDA.w #$0001
	STA.w $74A2,y
CODE_06871D:
	RTS

DATA_06871E:
	dw $FFFD,$FFFE

CODE_068722:
	LDY.b $76,x
	CPY.b #$05
	BNE.b CODE_06872C
	STZ.w $7860,x
	RTS

CODE_06872C:
	LDY.w $7223,x
	BMI.b CODE_068747
	LDA.w $108A
	BMI.b CODE_068747
	CMP.w $7182,x
	BPL.b CODE_068747
	STA.w $7182,x
	LDA.w $7860,x
	ORA.w #$0001
	STA.w $7860,x
CODE_068747:
	LDY.w $1070
	BNE.b CODE_06877D
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_068755
	INY
	INY
CODE_068755:
	LDA.w DATA_06871E,y
	AND.w $7860,x
	STA.w $7860,x
	AND.w #$0003
	BEQ.b CODE_068796
	AND.w #$0002
	BEQ.b CODE_06878A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0004
	STA.w $1072
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	STZ.w $7542,x
	INC.w $1070
CODE_06877D:
	LDA.w $1072
	CLC
	ADC.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_068793

CODE_06878A:
	LDA.w $7182,x
	AND.w #$FFF0
	ORA.w #$0001
CODE_068793:
	STA.w $7182,x
CODE_068796:
	LDA.w $7860,x
	AND.w #$0030
	LSR
	LSR
	ORA.w $7860,x
	STA.w $7860,x
	RTS

CODE_0687A5:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0687E8
	BEQ.b CODE_0687E8
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0687E8
	LDA.w $7D38,y
	BEQ.b CODE_0687E8
	CPY.w $10BA
	BEQ.b CODE_0687C5
	STY.w $10BA
	STZ.w $10B8
CODE_0687C5:
	LDA.w $1078
	CMP.w #$4C00
	BCC.b CODE_0687E3
	LDA.b $76,x
	CMP.w #$0003
	BEQ.b CODE_0687E3
	CMP.w #$0009
	BEQ.b CODE_0687E3
	CMP.w #$000A
	BEQ.b CODE_0687E3
	CMP.w #$000B
	BNE.b CODE_0687EE
CODE_0687E3:
	TYX
	JSL.l CODE_03B24B
CODE_0687E8:
	LDY.b #$FF
	STY.w $10BA
	RTS

CODE_0687EE:
	LDA.w #$0020
	STA.w $106A
	LDA.w $7A98,x
	BNE.b CODE_0687E8
	LDA.w $70E2,y
	STA.b $00
	LDA.w $7182,y
	STA.b $02
	LDA.w $7542,y
	STA.b $04
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w $10B8
	AND.w #$0003
	ORA.w $10B6
	BNE.b CODE_06886C
	LDA.w #$0132
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	INC
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R6_MultiplierLo
	CPY.b #$06
	BPL.b CODE_06886C
	LDA.w #$0132
	JSL.l CODE_03A364
	BCC.b CODE_06886C
	SEP.b #$20
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.b #$10
	STA.w $7AF6,y
	LDA.w $6FA1,y
	AND.b #$F9
	STA.w $6FA1,y
	LDA.b #$01
	STA.w $74A2,y
	LDA.b #$2E
	STA.w $7042,y
	LDA.b #$40
	STA.w $7542,y
	REP.b #$20
	TYA
	CLC
	ADC.w #$0040
	TAY
	BRA.b CODE_068879

CODE_06886C:
	LDA.w #!Define_YI_AmbSpr217
	JSL.l CODE_008B21
	LDA.w #$FFFF
	STA.w $7782,y
CODE_068879:
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	SEP.b #$20
	LDA.b #$FF
	STA.w $7823,y
	REP.b #$20
	LDA.b $10
	PHA
	AND.w #$01FF
	SEC
	SBC.w #$0100
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0688A1
	LDA.w #$0002
	STA.w $73C0,y
CODE_0688A1:
	PLA
	XBA
	AND.w #$03FF
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	INC.w $10B8
	LDY.w $1084
	BNE.b CODE_0688E3
	INC.w $1084
	LDY.b #$02
	STY.w $1086
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_0688CF
	LDA.w #$0003
	STA.w $106C
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_0688CF:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_0688E3:
	LDA.w $1078
	SEC
	SBC.w #$0300
	CMP.w #$4C00
	BCS.b CODE_0688F2
	LDA.w #$4BFF
CODE_0688F2:
	STA.w $1078
	LDY.b #$02
	LDA.b $04
	CMP.w #$0040
	BPL.b CODE_068900
	LDY.b #$01
CODE_068900:
	TYA
	STA.w $7A98,x
CODE_068904:
	RTS

DATA_068905:
	dw $0080,$FF80

CODE_068909:
	LDA.w $601A
	BEQ.b CODE_068904
	STZ.w $60D4
	BIT.w #$0001
	BEQ.b CODE_06891B
	BIT.w #$000E
	BEQ.b CODE_068953
CODE_06891B:
	LDY.w $77C2,x
	LDA.w DATA_068905,y
	SEC
	SBC.w $7C16,x
	CMP.w #$8000
	ROR
	STA.b $00
	LDY.b $76,x
	CPY.b #$09
	BEQ.b CODE_068953
	CPY.b #$0A
	BEQ.b CODE_068953
	CPY.b #$0B
	BEQ.b CODE_068953
	LDA.w $60A8
	PHA
	CLC
	ADC.w #$0400
	CMP.w #$0800
	BCS.b CODE_068952
	PLA
	SEC
	SBC.b $00
	STA.w $60A8
	STA.w $60B4
	BRA.b CODE_068953

CODE_068952:
	PLA
CODE_068953:
	LDA.w $601A
	BIT.w #$0001
	BEQ.b CODE_068964
	LDA.w $60AA
	BMI.b CODE_068964
	LSR
	STA.w $60AA
CODE_068964:
	LDY.w $77C3,x
	LDA.w DATA_068905,y
	SEC
	SBC.w $7C18,x
	STA.b $00
	LDA.w $60AA
	PHA
	CLC
	ADC.w #$0200
	CMP.w #$0400
	BCS.b CODE_068997
	PLA
	SEC
	SBC.b $00
	SEC
	SBC.w #$0080
	STA.w $60AA
	BPL.b CODE_068998
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	RTS

CODE_068997:
	PLA
CODE_068998:
	RTS

CODE_068999:
	TYX
	JSR.w CODE_069114
	LDA.w $1066
	BEQ.b CODE_0689AC
	BMI.b CODE_0689A9
	DEC.w $1066
	BRA.b CODE_0689AC

CODE_0689A9:
	INC.w $1066
CODE_0689AC:
	RTS

DATA_0689AD:
	dw $0100,$FF00

CODE_0689B1:
	TYX
	LDY.w $1082
	BNE.b CODE_0689D8
	LDA.w $1086
	BEQ.b CODE_0689E5
	LDY.w $1079
	CPY.b #$4C
	BCC.b CODE_0689D8
	BIT.w #$0001
	BNE.b CODE_0689D9
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0002
	STA.w $106C
	LDY.b #$03
	STY.b $76,x
CODE_0689D8:
	RTS

CODE_0689D9:
	LDA.w $1086
	AND.w #$0002
	TAY
	LDA.w DATA_0689AD,y
	BRA.b CODE_068A1E

CODE_0689E5:
	LDA.w #$00C0
	LDY.w $77C2,x
	BNE.b CODE_0689F1
	EOR.w #$FFFF
	INC
CODE_0689F1:
	STA.b $00
	LDA.w $7C16,x
	STA.b $02
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_068A10
	SEC
	SBC.w #$0006
	EOR.b $02
	BMI.b CODE_068A10
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
CODE_068A10:
	LDA.b $00
	LDY.w $1084
	BEQ.b CODE_068A1E
	STZ.w $1084
	EOR.w #$FFFF
	INC
CODE_068A1E:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $1079
	TYA
	STA.b $00
	LDA.w #$0200
	SEC
	SBC.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $75E0,x
	LDY.w $1086
	BEQ.b CODE_068A4F
	STZ.w $1086
	LDY.b #$04
	STY.b $76,x
	BRA.b CODE_068A7D

CODE_068A4F:
	LDA.w $7C16,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_068A7B
	LDA.b $10
	BIT.w #$0003
	BEQ.b CODE_068A7B
	STZ.w $106C
	STZ.w $1066
	LDA.w #$0010
	STA.w $7540,x
	LDA.w #$0100
	STA.w $105C
	STA.b $78,x
	LDY.b #$02
	STY.b $76,x
	RTS

CODE_068A7B:
	STZ.b $76,x
CODE_068A7D:
	LDA.w #$0400
	STA.w $105C
	STA.b $78,x
	LDA.w #$FCE0
	STA.w $105E
	LDA.w $75E0,x
	STA.w $10BC
	STZ.w $7540,x
	RTS

CODE_068A95:
	TYX
	LDA.b $78,x
	CMP.w $105C
	BNE.b CODE_068AA7
	LDA.w $75E0,x
	BMI.b CODE_068AAC
CODE_068AA2:
	INC.w $1066
	BRA.b CODE_068AAF

CODE_068AA7:
	LDA.w $75E0,x
	BMI.b CODE_068AA2
CODE_068AAC:
	DEC.w $1066
CODE_068AAF:
	JSR.w CODE_06914C
	LDY.w $1079
	CPY.b #$4C
	BCC.b CODE_068AF9
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_068AF9
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	STA.b $00
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_068AF9
	LDA.b $00
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BPL.b CODE_068AF9
	LDA.w #$0001
	STA.b $76,x
	STA.w $1086
	LDA.b $00
	BMI.b CODE_068AF9
	LDA.w #$0003
	STA.w $1086
	RTS

CODE_068AF9:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_068B07
	LDA.w #$0003
	STA.w $106C
CODE_068B07:
	RTS

CODE_068B08:
	TYX
	LDA.w $106C
	BNE.b CODE_068B22
	LDA.w $1066
	BMI.b CODE_068B17
	DEC.w $1066
	RTS

CODE_068B17:
	LDY.b #$01
	STY.b $76,x
	STZ.w $1066
	STZ.w $1086
	RTS

CODE_068B22:
	LDA.w $106C
	BIT.w #$0001
	BNE.b CODE_068B3B
	LDA.w $1068
	CLC
	ADC.w #$0040
	STA.w $1068
	CMP.w #$0800
	BNE.b CODE_068B4D
	BRA.b CODE_068B4A

CODE_068B3B:
	LDA.w $1068
	SEC
	SBC.w #$0040
	STA.w $1068
	CMP.w #$0100
	BNE.b CODE_068B4D
CODE_068B4A:
	DEC.w $106C
CODE_068B4D:
	LDA.w $1066
	CMP.w #$0008
	BCS.b CODE_068B58
	INC.w $1066
CODE_068B58:
	RTS

CODE_068B59:
	TYX
	LDY.w $7A38,x
	LDA.w $7182,x
	SEC
	SBC.w $7142,y
	CMP.w #$004A
	BMI.b CODE_068B90
	CMP.w #$004E
	BPL.b CODE_068B7C
	LDA.w #$0018
	STA.w $7542,x
	LDA.w #$0080
	STA.w $75E2,x
	BRA.b CODE_068B90

CODE_068B7C:
	STZ.w $1076
	LDA.w #$000C
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	INC.b $76,x
	JSR.w CODE_0690AA
CODE_068B90:
	JSR.w CODE_069114
	RTS

CODE_068B94:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_068BAC
	LDA.w $1078
	CLC
	ADC.w #$0240
	BMI.b CODE_068BA6
	LDA.w #$FFFF
CODE_068BA6:
	STA.w $1078
	JSR.w CODE_069114
CODE_068BAC:
	RTS

CODE_068BAD:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_068BBD
	STZ.w $1082
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDY.b #$01
	STY.b $76,x
CODE_068BBD:
	RTS

DATA_068BBE:
	dw $0100,$0200

DATA_068BC2:
	dw $0100,$FF00

CODE_068BC6:
	TYX
	LDY.b #$00
	LDA.w $7C16,x
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_068BDB
	STZ.w $617A
	INC.b $76,x
	RTS

CODE_068BDB:
	BPL.b CODE_068BDF
	INY
	INY
CODE_068BDF:
	LDA.w DATA_068BBE,y
	STA.w $617A
	LDA.w $60A8
	SEC
	SBC.w DATA_068BC2,y
	EOR.w DATA_068BC2,y
	BMI.b CODE_068BFA
	LDA.w DATA_068BC2,y
	STA.w $60A8
	STA.w $60B4
CODE_068BFA:
	RTS

DATA_068BFB:
	dw $0080,$0100,$0200,$0400

DATA_068C03:
	dw $FF80,$FF00,$FE00,$FC00

CODE_068C0B:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_068C72
	LDA.w #$0002
	STA.w $7A96,x
	LDA.b $10
	AND.w #$000E
	TAY
	LDA.w DATA_068BFB,y
	STA.b $00
	LDA.b $11
	AND.w #$0006
	TAY
	LDA.w DATA_068C03,y
	STA.b $02
	LDA.b $10
	AND.w #$000F
	SEC
	SBC.w #$0008
	STA.b $04
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr217
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.b $04
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $7142,y
	LDA.w #$FFFF
	STA.w $7782,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$FF
	STA.w $7823,y
	REP.b #$20
CODE_068C72:
	LDA.w $1078
	SEC
	SBC.w #$0020
	STA.w $1078
	CMP.w #$2000
	BCS.b CODE_068C89
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
CODE_068C89:
	RTS

CODE_068C8A:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_068C89
	INC.w $1088
	LDY.w $1088
	CPY.b #$01
	BEQ.b CODE_068CBF
	CPY.b #$02
	BEQ.b CODE_068CA6
	STZ.w $7ECC
	PLA
	JML.l CODE_03A32E

CODE_068CA6:
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.b $02
	JSL.l CODE_02E1A3
	LDA.w #$00C0
	STA.w $7A96,x
	RTS

CODE_068CBF:
	LDA.w $7A38,x
CODE_068CC2:
	TAX
	LDA.w #!Define_YI_AmbSpr1C0
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $7000,y
	AND.w #$FFFC
	STA.w $7000,y
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
	JSL.l CODE_03A31E
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDX.b #FXCODE_08D46A>>16
	LDA.w #FXCODE_08D46A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$10
	LDX.b $12
	LDA.w #$0002	
	STA.w $7A96,x
	LDY.w $10B6
	BEQ.b CODE_068D64
	LDA.w #$0027
	JSL.l CODE_03A34C
	LDA.w $7A38,x
	TAX
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7D38,y
	LDA.w $1092
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w $1094
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$0215
	STA.w !RAM_YI_Global_MainScreenLayers
	LDX.b $12
	PLA
	JML.l CODE_03A32E

CODE_068D64:
	RTS

CODE_068D65:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_068D7F
	DEC.w $105E
	BEQ.b CODE_068D7A
	LDA.w #$0008
	STA.w $7A96,x
	JSR.w CODE_0690D2
	RTS

CODE_068D7A:
	STZ.w $106E
	INC.b $76,x
CODE_068D7F:
	RTS

DATA_068D80:
	dw $B200,$B20A,$B30F,$B412,$B517,$B71B,$BA21,$BF28
	dw $C52F,$C932,$CC33,$CF35,$D438,$D838,$DB39,$DC3A
	dw $E03A,$E13B,$E83B,$EA3A,$EC39,$EF38,$F136,$F531
	dw $F72D,$FA27,$FB25,$FC1F,$FE19,$FF15,$FF0E,$000E
	dw $0000,$00F1,$FFF1,$FFEB,$FEE7,$FCE0,$FBDB,$FAD9
	dw $F7D3,$F5CF,$F1CA,$EFC8,$ECC7,$EAC6,$E8C5,$E1C5
	dw $E0C6,$DCC6,$DBC7,$D8C8,$D4C8,$CFCB,$CCCD,$C9CE
	dw $C5D2,$BFD8,$BADF,$B7E5,$B5E9,$B4EE,$B3F1,$B2F6

DATA_068E00:
	dw $C100,$C106,$C10C,$C112,$C118,$C11E,$C124,$C12A
	dw $C12F,$C52F,$C92F,$CD2F,$D12F,$D52F,$D92F,$DD2F
	dw $E12F,$E52F,$E92F,$ED2F,$F12F,$F52F,$F92F,$FD2F
	dw $002F,$002A,$0024,$001E,$0018,$0012,$000C,$0006
	dw $0000,$00FA,$00F4,$00EE,$00E8,$00E2,$00DC,$00D6
	dw $00D0,$FDD0,$F9D0,$F5D0,$F1D0,$EDD0,$E9D0,$E5D0
	dw $E1D0,$DDD0,$D9D0,$D5D0,$D1D0,$CDD0,$C9D0,$C5D0
	dw $C1D0,$C1D6,$C1DC,$C1E2,$C1E8,$C1EE,$C1F4,$C1FA

CODE_068E80:
	TYX
	LDA.w $106E
	BEQ.b CODE_068E89
	JMP.w CODE_068F82

CODE_068E89:
	PHA
	LDA.w #$0000
	JSL.l CODE_0681A6
	LDA.b $04
	LDX.b #$00
CODE_068E95:
	STA.w $1096,x
	INX
	INX
	CPX.b #$20
	BNE.b CODE_068E95
	LDA.w $108E
	STA.b $00
	LDA.w #$0008
	STA.b $02
	PHB
	SEP.b #$20
	LDA.b #$7E4800>>16
	PHA
	PLB
	REP.b #$30
	LDX.w #$7E4800
	INX
	INX
CODE_068EB6:
	LDA.b $00
	STA.w $0000,x
	LDA.w #$0180
	STA.w $0002,x
	LDA.w #$0018
	STA.w $0004,x
	LDA.w #$1096
	STA.w $0005,x
	LDA.w #$0000
	STA.w $0007,x
	LDA.w #$0018
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	TAX
	DEC.b $02
	BEQ.b CODE_068EF0
	LDA.b $00
	CLC
	ADC.w #$0020
	STA.b $00
	BRA.b CODE_068EB6

CODE_068EF0:
	TXA
	STA.w $7E4800
	PLB
	LDX.b $12
	LDA.w #$0004
	STA.b $0A
	LDA.w $108E
	SEC
	SBC.w #$6800
	STA.b $00
	STA.b $08
	LDA.w $7682,x
	SEC
	SBC.w #$0040
CODE_068F0E:
	STA.b $0E
	CMP.w #$0100
	BCS.b CODE_068F47
	LDY.w #$0006
	LDX.b $12
	LDA.w $7680,x
	SEC
	SBC.w #$0028
CODE_068F21:
	STA.b $0C
	CMP.w #$0130
	BCS.b CODE_068F3A
	LDA.b $00
	BIT.w #$0400
	BEQ.b CODE_068F32
	EOR.w #$0420
CODE_068F32:
	TAX
	LDA.w #$0000
	STA.l $70409E,x
CODE_068F3A:
	LDA.b $0C
	CLC
	ADC.w #$0010
	INC.b $00
	INC.b $00
	DEY
	BNE.b CODE_068F21
CODE_068F47:
	LDA.b $08
	CLC
	ADC.w #$0040
	STA.b $00
	STA.b $08
	LDA.b $0E
	CLC
	ADC.w #$0010
	DEC.b $0A
	BNE.b CODE_068F0E
	LDA.w #$0004
	STA.b $00
	LDX.w $1090
CODE_068F63:
	PHX
	LDY.w #$0006
CODE_068F67:
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	INX
	INX
	DEY
	BNE.b CODE_068F67
	PLA
	CLC
	ADC.w #$0020
	TAX
	DEC.b $00
	BNE.b CODE_068F63
	SEP.b #$10
	LDX.b $12
	PLA
CODE_068F82:
	CMP.w #$0100
	BMI.b CODE_068FF0
	LDA.w #$0010
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	INC.w $0CB2
	LDA.w #$00A0
	STA.b $18,x
	STZ.w $7A36,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.b #$01
	STY.b $76,x
	STZ.w $105C
	STZ.w $105E
	STZ.w $1060
	STZ.w $1064
	STZ.w $1066
	LDA.w #$0100
	STA.w $1068
	STZ.w $106C
	STZ.w $1084
	STZ.w $1086
	LDA.w #$E000
	STA.w $1078
	STZ.w $106A
	STZ.w $1062
	LDA.w #$FFFF
	STA.w $108A
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $1070
	STZ.w $1082
	STZ.w $1088
	STZ.w $1076
	STZ.w $106E
	STZ.w $1076
	JMP.w CODE_0690AA

CODE_068FF0:
	LDA.w #DATA_068E00
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #DATA_068D80
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_068D80>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0021
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $106E
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w $6040
	LDA.w $7682,x
	STA.w $6042
	LDX.b #FXCODE_08E93B>>16
	LDA.w #FXCODE_08E93B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	LDA.b $12
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$30
	LDY.b #$10
	LDA.b #$07
	STY.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$02
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$20
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	LDA.w #$637D
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l $702D6E
	LDA.w #$4A75
	STA.l YI_Global_PaletteMirror[$02].LowByte
	STA.l $702D70
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$03].LowByte
	STA.l $702D72
	LDA.w $106E
	CLC
	ADC.w #$0008
	STA.w $106E
	RTS

CODE_0690AA:
	LDA.w #$002E
	JSL.l CODE_03A364
	BCC.b CODE_0690D1
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	TYA
	STA.w $7A38,x
	LDA.w #$0002
	STA.w $7402,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0038
	STA.w $7182,y
CODE_0690D1:
	RTS

;---------------------------------------------------------------------------

CODE_0690D2:
	REP.b #$10
	LDX.w $107C
	LDA.l DATA_5FA1A8,x
	STA.l YI_Global_PaletteMirror[$0C].LowByte
	STA.l $702D84
	LDA.l DATA_5FA1A8+$02,x
	STA.l YI_Global_PaletteMirror[$0D].LowByte
	STA.l $702D86
	LDA.l DATA_5FA1A8+$04,x
	STA.l YI_Global_PaletteMirror[$0E].LowByte
	STA.l $702D88
	LDA.l DATA_5FA1A8+$06,x
	STA.l YI_Global_PaletteMirror[$0F].LowByte
	STA.l $702D8A
	TXA
	CLC
	ADC.w #$0008
	STA.w $107C
	SEP.b #$10
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

CODE_069114:
	LDY.w $1070
	BEQ.b CODE_06911E
	LDA.w #$0002
	BRA.b CODE_069129

CODE_06911E:
	LDA.w $7860,x
	AND.w #$0003
	BEQ.b CODE_06915A
	AND.w #$0002
CODE_069129:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.w $1060
	BNE.b CODE_06914C
	INC.w $1060
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $10BC
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A36,x
	BMI.b CODE_069146
	EOR.w #$FFFF
	INC
CODE_069146:
	STA.w $7A36,x
	JSR.w CODE_069176
CODE_06914C:
	JSR.w CODE_06919E
	LDA.w $7A36,x
	BPL.b CODE_06916C
	EOR.w #$FFFF
	INC
	BRA.b CODE_06916C

CODE_06915A:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $1060
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w $7A36,x
	BPL.b CODE_06916C
	EOR.w #$FFFF
	INC
CODE_06916C:
	LSR
	LSR
	LSR
	CLC
	ADC.w #$00A0
	STA.b $18,x
	RTS

CODE_069176:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$FF50
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $105C
	STA.b $78,x
	EOR.w #$FFFF
	INC
	STA.w $105E
	RTS

DATA_06919A:
	dw $00C0,$FF40

CODE_06919E:
	LDY.b $76,x
	CPY.b #$02
	BEQ.b CODE_0691AD
	CPY.b #$04
	BNE.b CODE_0691B2
	LDA.w #$4000
	BRA.b CODE_0691DD

CODE_0691AD:
	LDA.w #$0A00
	BRA.b CODE_0691DD

CODE_0691B2:
	LDA.w #$D000
	LDY.w $1086
	BEQ.b CODE_0691BD
	LDA.w #$CC00
CODE_0691BD:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $1079
	TYA
	SEC
	SBC.w #$0100
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$2000
CODE_0691DD:
	STA.b $00
	LDA.w $7A36,x
	BPL.b CODE_0691E8
	EOR.w #$FFFF
	INC
CODE_0691E8:
	CLC
	ADC.b $00
	ASL
	AND.w #$FF00
	XBA
	STA.b $0E
	LDA.b $78,x
	CMP.w $7A36,x
	BMI.b CODE_069237
	CMP.w $105C
	BEQ.b CODE_06922E
	LDY.b $76,x
	CPY.b #$02
	BEQ.b CODE_069218
	LDA.w $105E
	BEQ.b CODE_069213
	SEC
	ROR
	CMP.w #$FFE0
	BCC.b CODE_069213
	LDA.w #$0000
CODE_069213:
	STA.w $105E
	BRA.b CODE_069229

CODE_069218:
	INC.w $106C
	LDA.w $106C
	CMP.w #$0004
	BNE.b CODE_069229
	STZ.w $7540,x
	DEC.b $76,x
	RTS

CODE_069229:
	LDA.w $105C
	STA.b $78,x
CODE_06922E:
	LDA.w $7A36,x
	CLC
	ADC.b $0E
	JMP.w CODE_0692B3

CODE_069237:
	CMP.w $105C
	BEQ.b CODE_06923F
	JMP.w CODE_0692AD

CODE_06923F:
	LDY.b $76,x
	CPY.b #$02
	BEQ.b CODE_06925B
	LDA.w $105C
	BEQ.b CODE_06925B
	LSR
	CMP.w #$0020
	BCS.b CODE_069253
	LDA.w #$0000
CODE_069253:
	STA.w $105C
	LDA.w #$01D0
	BRA.b CODE_06925E

CODE_06925B:
	LDA.w #$0600
CODE_06925E:
	STA.b $00
	LDA.w $7A36,x
	BMI.b CODE_0692A8
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_069284
	LDY.b $76,x
	CPY.b #$07
	BEQ.b CODE_0692A8
	LDY.w $1082
	BEQ.b CODE_06927C
	DEY
	BNE.b CODE_06927C
	INC.w $1082
	ASL
CODE_06927C:
	CMP.b $00
	BCC.b CODE_0692A8
	EOR.w #$FFFF
	INC
CODE_069284:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	LDA.w $10BC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $1070
	LDA.w #$0010
	STA.w $7542,x
	LDY.w $1082
	BEQ.b CODE_0692E4
	LDA.w #$00C0
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0692A8:
	LDA.w $105E
	STA.b $78,x
CODE_0692AD:
	LDA.w $7A36,x
	SEC
	SBC.b $0E
CODE_0692B3:
	STA.w $7A36,x
	LDA.w $105C
	ORA.w $105E
	BNE.b CODE_0692E4
	LDY.b $76,x
	CPY.b #$06
	BNE.b CODE_0692D3
	LDA.w #$FE00
	JSR.w CODE_069176
	LDA.w #$0020
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_0692D3:
	CPY.b #$07
	BNE.b CODE_0692E0
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_0692E0:
	LDY.b #$01
	STY.b $76,x
CODE_0692E4:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr02E_EyesOfSalvoTheSlime_Init:
;$0692E5
	RTL

;---------------------------------------------------------------------------

YI_NorSpr02E_EyesOfSalvoTheSlime_Main:
;$0692E6
	JSL.l CODE_03AF23
	JSR.w CODE_069329
	LDA.w $7A96,x
	BNE.b CODE_069326
	LDA.b $76,x
	BEQ.b CODE_06931A
	BIT.w #$0001
	BNE.b CODE_069305
	DEC.w $7402,x
	LDA.w $7402,x
	BNE.b CODE_069312
	BRA.b CODE_069310

CODE_069305:
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0002
	BNE.b CODE_069312
CODE_069310:
	DEC.b $76,x
CODE_069312:
	LDA.w #$0004
	STA.w $7A96,x
	BRA.b CODE_069326

CODE_06931A:
	LDA.b $10
	BIT.w #$001F
	BNE.b CODE_069326
	LDA.w #$0004
	STA.b $76,x
CODE_069326:
	INC.b $16,x
	RTL

CODE_069329:
	LDA.b $78,x
	STA.b $0E
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	JSR.w CODE_069395
	SEP.b #$20
	LDA.b $0E
	CMP.b $02
	BEQ.b CODE_06936C
	LDA.b $0E
	BMI.b CODE_069362
	LDA.b $02
	BMI.b CODE_06936A
	CMP.b $0E
	BCC.b CODE_06936A
CODE_06935E:
	INC.b $0E
	BRA.b CODE_06936C

CODE_069362:
	LDA.b $02
	BPL.b CODE_06935E
	CMP.b $0E
	BCS.b CODE_06935E
CODE_06936A:
	DEC.b $0E
CODE_06936C:
	LDA.b $0F
	CMP.b $04
	BEQ.b CODE_06938E
	LDA.b $0F
	BMI.b CODE_069382
	LDA.b $04
	BMI.b CODE_06938C
	CMP.b $0F
	BCC.b CODE_06938C
CODE_06937E:
	INC.b $0F
	BRA.b CODE_06938E

CODE_069382:
	LDA.b $04
	BEQ.b CODE_06938E
	BPL.b CODE_06937E
	CMP.b $0F
	BCS.b CODE_06937E
CODE_06938C:
	DEC.b $0F
CODE_06938E:
	REP.b #$20
	LDA.b $0E
	STA.b $78,x
	RTS

CODE_069395:
	REP.b #$10
	ASL
	TAX
	PHX
	LDA.l DATA_00E954,x
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$10
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductMid
	STA.b $02
	BPL.b CODE_0693B7
	LDA.b #$FF
	BRA.b CODE_0693B9

CODE_0693B7:
	LDA.b #$00
CODE_0693B9:
	STA.b $03
	REP.b #$20
	PLX
	LDA.l DATA_00E9D4,x
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$10
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductMid
	STA.b $04
	BPL.b CODE_0693DB
	LDA.b #$FF
	BRA.b CODE_0693DD

CODE_0693DB:
	LDA.b #$00
CODE_0693DD:
	STA.b $05
	REP.b #$20
	SEP.b #$10
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr132_LemonDrop_Init:
;$0693E6
	LDY.b #$05
	STY.b $76,x
	RTL

;---------------------------------------------------------------------------

DATA_0693EB:
	dw CODE_0694F0
	dw CODE_069531
	dw CODE_069587
	dw CODE_0695BC
	dw CODE_069625
	dw CODE_06966D
	dw CODE_0694F0
	dw CODE_069531
	dw CODE_0696C0
	dw CODE_069703
	dw CODE_06974F

YI_NorSpr132_LemonDrop_Main:
;$069401
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_06941D
CODE_069409:
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState02_InCutscene
	BNE.b CODE_06943E
	CMP.b $78,x
	BNE.b CODE_06943E
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	BRA.b CODE_06943E

CODE_06941D:
	LDA.w $7D96,x
	BEQ.b CODE_069427
	STZ.w $6FA2,x
	BRA.b CODE_069409

CODE_069427:
	LDY.w $7D38,x
	BEQ.b CODE_06943E
	LDA.w #$0002
	STA.w $74A2,x
	STZ.w $7402,x
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_06943E:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0693EB,x)
	JSR.w CODE_06945F
	LDA.w $7AF6,x
	BNE.b CODE_06945B
	LDA.w $6FA0,x
	ORA.w #$0600
	STA.w $6FA0,x
CODE_06945B:
	JML.l CODE_0DC0F0

CODE_06945F:
	LDA.b $18,x
	BNE.b CODE_069486
	LDY.w $7D36,x
	BPL.b CODE_0694E3
	LDY.b $76,x
	CPY.b #$03
	BEQ.b CODE_0694E7
	CPY.b #$04
	BEQ.b CODE_0694E7
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCS.b CODE_069487
CODE_069482:
	JSL.l CODE_03A858
CODE_069486:
	RTS

CODE_069487:
	LDY.w $60AB
	BMI.b CODE_0694E7
	LDY.w $60C0
	BEQ.b CODE_069482
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0694E7
	LDA.w #$0020
	CMP.w $61D6
	BMI.b CODE_0694A4
	STA.w $61D6
CODE_0694A4:
	LDA.w $6086
	AND.w $0035
	STA.w $617A
	LDA.w $0037
	AND.w $6086
	STA.w $617C
	STZ.w $60D4
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STA.b $78,x
	LDA.w #$7C60
	STA.w $6FA0,x
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60AA
	STZ.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A98,x
	STA.w $7402,x
	LDY.b #$03
	STY.b $76,x
	RTS

CODE_0694E3:
	JSL.l CODE_03A5B7
CODE_0694E7:
	RTS

DATA_0694E8:
	db $08,$09,$00,$01

DATA_0694EC:
	db $10,$06,$05,$04

CODE_0694F0:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_06951E
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$05
	BNE.b CODE_06950C
	LDA.w #$0040
	STA.w $7542,x
	STZ.b $16,x
	STZ.w $7402,x
	INC.b $76,x
	RTS

CODE_06950C:
	LDA.w DATA_0694E8-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0694EC-$01,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_06951E:
	RTS

DATA_06951F:
	db $01,$04,$05,$06,$01,$00,$02,$00,$01

DATA_069528:
	db $02,$02,$02,$02,$02,$02,$04,$02,$30

CODE_069531:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_069582
	LDA.w $7A98,x
	BNE.b CODE_069582
	INC.b $16,x
	LDY.b $16,x
	LDA.w DATA_06951F-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_069528-$01,y
	AND.w #$00FF
	STA.w $7A98,x
	CPY.b #$02
	BNE.b CODE_069561
	LDA.w #!Define_YI_SoundID60_Splash2
	JSL.l CODE_0085D2
	RTS

CODE_069561:
	CPY.b #$09
	BMI.b CODE_069582
	LDA.w $7A98,x
	STA.w $7A96,x
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	INC.b $76,x
	LDY.b $76,x
	CPY.b #$08
	BNE.b CODE_069582
	LDA.w #$0007
	STA.b $16,x
	INC.w $1015
CODE_069582:
	RTS

DATA_069583:
	dw $FFC0,$0040

CODE_069587:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0695B5
	STZ.b $18,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0695B5
	LDY.w $7400,x
	LDA.w DATA_069583,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_0695B5
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_0695B5:
	RTS

DATA_0695B6:
	dw $001A,$0018,$0014

CODE_0695BC:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_069606
	INC.b $16,x
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$06
	BMI.b CODE_0695FD
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w #!Define_YI_AmbSpr1D2
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	SEP.b #$20
	LDA.b #$FF
	STA.w $7823,y
	REP.b #$20
	INC.b $76,x
	RTS

CODE_0695FD:
	LDA.w #$0004
	STA.w $7A98,x
	INC.w $7402,x
CODE_069606:
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_069624
	LDY.b $16,x
	LDA.w $7182,x
	SEC
	SBC.w DATA_0695B6,y
	SEC
	SBC.w $6112
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	INC.w $61B4
CODE_069624:
	RTS

CODE_069625:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_069643
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $617A
	STZ.w $617C
	PLA
	JML.l CODE_03A32E

CODE_069643:
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$0200
	STA.w $6000
	LDA.w #$FE00
	STA.w $6002
	LDX.b #FXCODE_099253>>16
	LDA.w #FXCODE_099253
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_06966D:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_069691
	INC
	BNE.b CODE_069691
	INC
	STA.w $7402,x
	INC
	STA.w $74A2,x
	STA.b $76,x
	LDA.w #$0030
	STA.w $7A96,x
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	RTS

CODE_069691:
	LDA.w $7C16,x
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_0696B8
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0007
	STA.w $7402,x
	INC
	STA.w $7A98,x
	LDA.w #$0002
	STA.w $74A2,x
	STZ.b $76,x
CODE_0696B8:
	RTS

DATA_0696B9:
	db $04,$05,$06,$05,$04,$00,$02

CODE_0696C0:
	TYX
	LDA.w $1015
	BPL.b CODE_0696FE
	LDA.w $7A98,x
	BNE.b CODE_0696FE
	DEC.b $16,x
	BPL.b CODE_0696ED
	LDA.w #$0002
	STA.w $7402,x
	STA.b $16,x
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $7860,x
	INC.b $76,x
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	RTS

CODE_0696ED:
	LDY.b $16,x
	LDA.w DATA_0696B9,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A98,x
CODE_0696FE:
	RTS

DATA_0696FF:
	db $07,$08

DATA_069701:
	db $08,$10

CODE_069703:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_069722
	LDA.w $7860,x
	AND.w #$0002
	BEQ.b CODE_06974E
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	AND.w #$FFF0
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_069722:
	LDA.w $7A98,x
	BNE.b CODE_06974E
	DEC.b $16,x
	BPL.b CODE_06973A
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$00FF
	STA.w $74A2,x
	INC.b $76,x
	RTS

CODE_06973A:
	LDY.b $16,x
	LDA.w DATA_0696FF,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_069701,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_06974E:
	RTS

CODE_06974F:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_06975F
	STZ.w $1015
	INC.w $105A
	JSL.l CODE_03A31E
CODE_06975F:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr046_BurtTheBashful_Init:
;$069760
	JSL.l CODE_03AEEB
	LDY.b #$24
	JSL.l CODE_0CE5D6
	LDA.w #$0080
	STA.w $7E1A
	LDA.w $7182,x
	CLC
	ADC.w #$000F
	STA.w $7182,x
	LDA.w #$FFF8
	STA.w $7A38,x
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w #$0200
	STA.w $7A98,x
	LDA.w #$FFF4
	STA.w $7720,x
	LDA.w #$0010
	STA.w $1066
	LDA.w #$0010
	STA.w $1064
	LDA.w #$0040
	STA.w $7542,x
	SEP.b #$20
	LDA.b #$04
	STA.w $7A37,x
	LDA.b #$40
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b #$0A
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	REP.b #$20
	LDA.w $7402,x
	ASL
	TAY
	LDA.w DATA_06A421,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001C
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_560000+$6020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_560000+$6030
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6030)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	ASL
	ASL
	TAY
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_06A409,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHX
	PHY
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	CMP.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_0698BB
	LDA.w DATA_06A409+$02,y
	BEQ.b CODE_0698BE
	LDA.w DATA_06A409+$02,y
	EOR.w #$FFFF
	INC
	AND.w #$00FF
	BRA.b CODE_0698BE

CODE_0698BB:
	LDA.w DATA_06A409+$02,y
CODE_0698BE:
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0060
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	ASL
	TAY
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_06A419,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHX
	PHY
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.b $00
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$7030
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$7030)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$7020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$7020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	JSR.w CODE_06A740
	RTL

;---------------------------------------------------------------------------

DATA_069988:
	dw CODE_06A429
	dw CODE_06A5A6
	dw CODE_06A740

DATA_06998E:
	dw CODE_06A36F
	dw CODE_06A36F
	dw CODE_06A3EF

DATA_069994:
	dw $00E0,$00D0,$00C0,$00C0,$00C0,$00C0

DATA_0699A0:
	dw $FA00,$FA40,$FA80,$FAC0,$FB00,$FB40,$F600,$F680
	dw $F700,$F780,$F800,$F880

DATA_0699B8:
	dw DATA_5FE7A6,DATA_5FE640,DATA_5FE640,DATA_5FE640,DATA_5FE640,DATA_5FE640

DATA_0699C4:
	dw DATA_5FE7DA,DATA_5FA5D8,DATA_5FA5D8,DATA_5FA5D8,DATA_5FA5D8,DATA_5FA5D8

DATA_0699D0:
	dw DATA_5FE7FA,DATA_5FA5F6,DATA_5FA5F6,DATA_5FA5F6,DATA_5FA5F6,DATA_5FA5F6

YI_NorSpr046_BurtTheBashful_Main:
;$0699DC
	LDY.w $7A37,x
	TYX
	JSR.w (DATA_06998E,x)
	LDY.w $7A37,x
	CPY.b #$04
	BCS.b CODE_0699ED
	JSR.w CODE_06A77F
CODE_0699ED:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0699F9
	LDY.w $7A37,x
	TYX
	JSR.w (DATA_069988,x)
CODE_0699F9:
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	BNE.b CODE_069A19
	LDY.w $7A37,x
	CPY.b #$04
	BCS.b CODE_069A19
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CPY.b #$7F
	BCS.b CODE_069A19
	LDA.w $601A
	BEQ.b CODE_069A19
	JSL.l CODE_03A858
CODE_069A19:
	LDY.b $78,x
	BEQ.b CODE_069A21
	TYX
	JSR.w (DATA_069A28,x)
CODE_069A21:
	LDY.w $7A36,x
	TYX
	JMP.w (DATA_069A2E,x)

DATA_069A28:
	dw CODE_06A31F
	dw CODE_06A322
	dw CODE_06A34D

DATA_069A2E:
	dw CODE_069A7A
	dw CODE_069AD3
	dw CODE_069B36
	dw CODE_069BAD
	dw CODE_069BC0
	dw CODE_069C22
	dw CODE_069C56
	dw CODE_069C8E
	dw CODE_069CC6
	dw CODE_069CF5
	dw CODE_069D20
	dw CODE_069D65
	dw CODE_069DB7
	dw CODE_069DE4
	dw CODE_069E6A
	dw CODE_069EA9
	dw CODE_069F2D
	dw CODE_069F6A
	dw CODE_069FF4
	dw CODE_069FD5
	dw CODE_069FF4
	dw CODE_069FD5
	dw CODE_069FF4
	dw CODE_069FD5
	dw CODE_069FF4
	dw CODE_069FD5
	dw CODE_069FF4
	dw CODE_069FD5
	dw CODE_069FF4
	dw CODE_069FD5
	dw CODE_069FC4
	dw CODE_06A029
	dw CODE_06A044
	dw CODE_06A089
	dw CODE_06A0AF
	dw CODE_06A18F
	dw CODE_06A1DA
	dw CODE_06A305

CODE_069A7A:
	LDX.b $12
	LDA.w $60C0
	BNE.b CODE_069AD2
	LDA.w $7A96,x
	BNE.b CODE_069AD2
	LDA.b $18,x
	CLC
	ADC.w $1064
	STA.b $18,x
	LDA.b $76,x
	SEC
	SBC.w $1066
	STA.b $76,x
	CMP.w #$00C0
	BCS.b CODE_069AB0
	LDA.w $1066
	EOR.w #$FFFF
	INC
	STA.w $1066
	LDA.w $1064
	EOR.w #$FFFF
	INC
	STA.w $1064
	RTL

CODE_069AB0:
	CMP.w #$0100
	BCC.b CODE_069AD2
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
CODE_069AD2:
	RTL

CODE_069AD3:
	LDX.b $12
	LDA.b $76,x
	CMP.w #$0140
	BCS.b CODE_069AEA
	SEC
	SBC.w $1066
	STA.b $76,x
	LDA.b $18,x
	CLC
	ADC.w $1064
	STA.b $18,x
CODE_069AEA:
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_069B17
	STZ.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $1066
	EOR.w #$FFFF
	INC
	STA.w $1066
	LDA.w $1064
	EOR.w #$FFFF
	INC
	STA.w $1064
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069B17:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_069B2B
	INY
	EOR.w #$FFFF
	INC
	CMP.w #$0300
	BCS.b CODE_069B31
	INY
	BRA.b CODE_069B31

CODE_069B2B:
	CMP.w #$0200
	BCS.b CODE_069B31
	INY
CODE_069B31:
	TYA
	STA.w $7402,x
	RTL

CODE_069B36:
	LDX.b $12
	LDA.b $18,x
	CLC
	ADC.w $1064
	STA.b $18,x
	LDA.b $76,x
	SEC
	SBC.w $1066
	STA.b $76,x
	LDY.w $1067
	BMI.b CODE_069B67
	CMP.w #$00C0
	BCS.b CODE_069B66
	LDA.w $1066
	EOR.w #$FFFF
	INC
	STA.w $1066
	LDA.w $1064
	EOR.w #$FFFF
	INC
	STA.w $1064
CODE_069B66:
	RTL

CODE_069B67:
	CMP.w #$0100
	BCC.b CODE_069BA1
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	LDA.w $70E2,x
	CMP.w #$00B0
	BCC.b CODE_069BA2
	LDA.w $1066
	EOR.w #$FFFF
	INC
	STA.w $1066
	LDA.w $1064
	EOR.w #$FFFF
	INC
	STA.w $1064
	SEP.b #$20
	LDA.b #$10
	STA.w $7A96,x
	LDA.w $7A36,x
	SEC
	SBC.b #$04
	STA.w $7A36,x
	REP.b #$20
CODE_069BA1:
	RTL

CODE_069BA2:
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069BAD:
	LDX.b $12
	LDA.w #$0001
	STA.w $1015
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069BC0:
	LDX.b $12
	LDA.w $1015
	BMI.b CODE_069BC8
	RTL

CODE_069BC8:
	LDA.w #$0008
	STA.w $1066
	LDA.w #$0008
	STA.w $1064
	LDX.b #$3C
CODE_069BD6:
	LDA.l DATA_5FE640,x
	STA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_069BD6
	LDX.b $12
	SEP.b #$20
	LDA.b #!REGISTER_BG2HorizScrollOffset
	STA.w HDMA[$03].Destination
	LDA.b #!REGISTER_BG2VertScrollOffset
	STA.w HDMA[$04].Destination
	REP.b #$20
	LDA.w #$0030
	STA.w $6126
	LDA.w $7042
	AND.w #$FFCF
	ORA.w #$0030
	STA.w $7042
	LDA.w #$0510
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7720,x
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069C22:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0400
	BMI.b CODE_069C55
	LDA.w #$0030
	STA.b $18,x
	STA.b $76,x
	STZ.w $1015
	SEP.b #$20
	LDA.b #$02
	STA.w $7A37,x
	LDA.w $6FA2,x
	AND.b #$E0
	STA.w $6FA2,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
CODE_069C55:
	RTL

CODE_069C56:
	LDX.b $12
	LDA.b $76,x
	CLC
	ADC.w $1066
	STA.b $76,x
	CMP.w #$0030
	BCC.b CODE_069C71
	CMP.w #$0100
	BCC.b CODE_069C70
	LDA.w #$FFE0
	STA.w $1066
CODE_069C70:
	RTL

CODE_069C71:
	LDA.w #$0030
	STA.b $76,x
	LDA.w #$0010
	STA.w $1066
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	RTL

CODE_069C8E:
	LDX.b $12
	LDA.b $18,x
	CLC
	ADC.w $1064
	STA.b $18,x
	CMP.w #$0030
	BCC.b CODE_069CA9
	CMP.w #$0100
	BCC.b CODE_069CA8
	LDA.w #$FFE0
	STA.w $1064
CODE_069CA8:
	RTL

CODE_069CA9:
	LDA.w #$0030
	STA.b $18,x
	LDA.w #$0010
	STA.w $1064
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	RTL

CODE_069CC6:
	LDX.b $12
	LDA.b $76,x
	CLC
	ADC.w $1066
	STA.b $76,x
	LDA.b $18,x
	CLC
	ADC.w $1064
	STA.b $18,x
	CMP.w #$0100
	BMI.b CODE_069CF4
	LDA.w #$0100
	STA.b $18,x
	LDA.w #$0100
	STA.b $76,x
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	STZ.w $7A37,x
	REP.b #$20
CODE_069CF4:
	RTL

CODE_069CF5:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_069D00
	RTL

CODE_069D00:
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0300
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $61C6
	STZ.w $1062
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069D20:
	LDX.b $12
	LDA.b $18,x
	SEC
	SBC.w $7A38,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w $7A38,x
	STA.b $76,x
	CMP.w #$00C0
	BCS.b CODE_069D43
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	STA.w $7A38,x
	LDA.b $76,x
CODE_069D43:
	CMP.w #$0100
	BCC.b CODE_069D64
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	LDA.w #$FFF8
	STA.w $7A38,x
	SEP.b #$20
	LDA.b #$40
	STA.w $7A98,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
CODE_069D64:
	RTL

CODE_069D65:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_069D9F
	SEP.b #$20
	LDA.b $14
	BIT.b #$01
	BEQ.b CODE_069D81
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.b #$01
	CMP.b #$20
	BCC.b CODE_069DA0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_069D81:
	LDY.b $78,x
	BNE.b CODE_069D9D
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.b #$20
	BEQ.b CODE_069DA0
	BCC.b CODE_069DA0
	LDA.b #$04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.b #$07
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D9|!EXRAMBankMirror,x
	LDA.b #$02
	STA.w $7A96,x
CODE_069D9D:
	REP.b #$20
CODE_069D9F:
	RTL

CODE_069DA0:
	LDA.b #$20
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b $78,x
	BNE.b CODE_069DB4
	LDA.b #$20
	STA.w $7A98,x
	INC.w $7A36,x
	INC.w $7A36,x
CODE_069DB4:
	REP.b #$20
	RTL

CODE_069DB7:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_069DCB
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_069DCB:
	RTL

DATA_069DCC:
	dw $FEC0,$0140,$FEF0,$0110,$FF40,$00C0,$FF58,$00A8
	dw $FF70,$0090,$FF80,$0080

CODE_069DE4:
	LDX.b $12
	JSL.l CODE_06A860
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_069E4A
	LDA.w $1062
	BEQ.b CODE_069E07
	LDA.w #!Define_YI_SoundID23_GroundPound
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $61C6
	STZ.w $1062
CODE_069E07:
	LDA.w $7A38,x
	BMI.b CODE_069E4B
	LDA.b $76,x
	CMP.w #$0110
	BMI.b CODE_069E4B
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0699A0,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$00FF
	ASL
	ORA.w $7400,x
	TAY
	LDA.w DATA_069DCC,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	INC.w $1062
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
CODE_069E4A:
	RTL

CODE_069E4B:
	LDA.b $18,x
	SEC
	SBC.w $7A38,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w $7A38,x
	STA.b $76,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w DATA_069994,y
	BPL.b CODE_069E69
	LDA.w #$0008
	STA.w $7A38,x
CODE_069E69:
	RTL

CODE_069E6A:
	LDX.b $12
	JSL.l CODE_06A860
	LDA.b $18,x
	CMP.w #$00A0
	BCC.b CODE_069E85
	SEC
	SBC.w $7A38,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w $7A38,x
	STA.b $76,x
CODE_069E85:
	LDY.w $7223,x
	BPL.b CODE_069E98
	LDA.b $16,x
	CMP.w #$3000
	BPL.b CODE_069E98
	CLC
	ADC.w #$0800
	STA.b $16,x
	RTL

CODE_069E98:
	LDA.w #$0400
	STA.w $105C
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069EA9:
	LDX.b $12
	JSL.l CODE_06A860
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	BMI.b CODE_069EBE
	LDA.w #$FFF8
	STA.w $7A38,x
CODE_069EBE:
	LDA.b $18,x
	CMP.w #$00A0
	BCS.b CODE_069ECA
	LDY.w $7A39,x
	BPL.b CODE_069EDD
CODE_069ECA:
	CMP.w #$0100
	BCS.b CODE_069EDD
	SEC
	SBC.w $7A38,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w $7A38,x
	STA.b $76,x
CODE_069EDD:
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_069F1A
CODE_069EE5:
	LDY.w $7223,x
	BMI.b CODE_069EFB
	LDA.b $16,x
	BEQ.b CODE_069F19
	BPL.b CODE_069EF5
	LDA.w #$0000
	BRA.b CODE_069F17

CODE_069EF5:
	CLC
	ADC.w #$FE00
	BRA.b CODE_069F17

CODE_069EFB:
	LDA.b $16,x
	CMP.w #$2800
	BCC.b CODE_069F07
	CMP.w #$3000
	BCC.b CODE_069F13
CODE_069F07:
	LDA.w $105C
	EOR.w #$FFFF
	INC
	STA.w $105C
	LDA.b $16,x
CODE_069F13:
	CLC
	ADC.w $105C
CODE_069F17:
	STA.b $16,x
CODE_069F19:
	RTL

CODE_069F1A:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $16,x
	SEP.b #$20
	LDA.w $7A36,x
	SEC
	SBC.b #$04
	STA.w $7A36,x
	REP.b #$20
	RTL

CODE_069F2D:
	LDX.b $12
	JSR.w CODE_06A978
	LDA.b $18,x
	CMP.w #$0080
	BCC.b CODE_069F4B
	LDA.b $18,x
	SEC
	SBC.w $7A38,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w $7A38,x
	STA.b $76,x
	BRA.b CODE_069EE5

CODE_069F4B:
	LDA.w #$0080
	STA.b $18,x
	LDA.w #$0180
	STA.b $76,x
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	STA.w $7A38,x
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069F6A:
	LDX.b $12
	JSR.w CODE_06A978
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_069FA0
	LDA.b $18,x
	CMP.w #$0080
	BCC.b CODE_069F83
	CMP.w #$00C0
	BCC.b CODE_069F8D
CODE_069F83:
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	STA.w $7A38,x
CODE_069F8D:
	LDA.b $18,x
	SEC
	SBC.w $7A38,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w $7A38,x
	STA.b $76,x
	JMP.w CODE_069EE5

CODE_069FA0:
	LDA.w #!Define_YI_SoundID23_GroundPound
	JSL.l CODE_0085D2
	LDA.w #$0060
	STA.w $61C6
	STZ.w $1062
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFF0
	STA.w $7A38,x
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_069FC4:
	LDX.b $12
	LDA.b $18,x
	CMP.w #$0100
	BMI.b CODE_06A015
	LDA.w #$0010
	STA.w $7A98,x
	BRA.b CODE_069FFD

CODE_069FD5:
	LDX.b $12
	LDA.b $18,x
	CMP.w $1060
	BPL.b CODE_06A015
	LDA.w $105E
	SEC
	SBC.w #$0010
	STA.w $105E
	LDA.w $1060
	CLC
	ADC.w #$0010
	STA.w $1060
	BRA.b CODE_069FFD

CODE_069FF4:
	LDX.b $12
	LDA.b $18,x
	CMP.w $105E
	BMI.b CODE_06A015
CODE_069FFD:
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	STA.w $7A38,x
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	JSR.w CODE_06A978
	RTL

CODE_06A015:
	LDA.b $18,x
	SEC
	SBC.w $7A38,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w $7A38,x
	STA.b $76,x
	JSR.w CODE_06A978
	RTL

CODE_06A029:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_06A040
	SEP.b #$20
	LDA.b #$08
	STA.w $7A98,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_06A040:
	JSR.w CODE_06A978
	RTL

CODE_06A044:
	LDX.b $12
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_06A050
	LDA.w $7A98,x
	BEQ.b CODE_06A065
CODE_06A050:
	JSR.w CODE_06A978
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CPY.b #$7F
	BCS.b CODE_06A065
	SEP.b #$20
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	RTL

CODE_06A065:
	LDX.b #$03
	JSR.w CODE_06A984
	JSR.w CODE_06A849
	SEP.b #$20
	LDA.b #$20
	STA.w $7A98,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_06A088
	JSL.l CODE_028925
	JSR.w CODE_06A920
CODE_06A088:
	RTL

CODE_06A089:
	LDX.b $12
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_06A097
	JSL.l CODE_02A982
	JSR.w CODE_06A934
CODE_06A097:
	JSR.w CODE_06A9FB
	LDA.w $7A98,x
	BNE.b CODE_06A0AE
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
CODE_06A0AE:
	RTL

CODE_06A0AF:
	LDX.b $12
	JSR.w CODE_06A9FB
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_06A0BC
	JSR.w CODE_06A934
CODE_06A0BC:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0699B8,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FE640>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0061
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	PHY
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	LDX.b $12
	LDA.w DATA_0699C4,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FA5D8>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$00E8
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	PHY
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	LDX.b $12
	LDA.w DATA_0699D0,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FA5F6>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$00F8
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	CLC
	ADC.b #$04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	BCC.b CODE_06A171
	JSR.w CODE_06A8C8
	LDA.b #$05
	STA.w $74A2,x
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_06A174
	LDA.b #$1A
	STA.w $7A36,x
	REP.b #$20
	LDA.w #$FFF8
	STA.w $7A38,x
CODE_06A171:
	REP.b #$20
	RTL

CODE_06A174:
	INC.w $7A36,x
	INC.w $7A36,x
	LDA.b #$02
	STA.w $7A37,x
	REP.b #$20
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	RTL

CODE_06A18F:
	LDX.b $12
	JSR.w CODE_06A934
	LDA.w $7A96,x
	BNE.b CODE_06A1D1
	LDA.w #$00A0
	STA.w $7A96,x
	STZ.w $7542,x
	TXY
	LDA.b $10
	AND.w #$007E
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_00E954,x
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	TYX
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
CODE_06A1D1:
	RTL

DATA_06A1D2:
	dw $0040,$0000,$0080,$00C0

CODE_06A1DA:
	LDX.b $12
	JSR.w CODE_06A934
	LDA.w $7A98,x
	BNE.b CODE_06A215
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7E4C,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0006
	STA.w $7462,y
	LDA.w #$0002
	STA.w $7A98,x
CODE_06A215:
	LDY.b #$00
	LDA.w $7680,x
	AND.w #$FF00
	BEQ.b CODE_06A22F
	BPL.b CODE_06A223
	INY
	INY
CODE_06A223:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_06A24D
	TYA
	ORA.w #$0004
	TAY
	BRA.b CODE_06A24D

CODE_06A22F:
	LDA.w $7682,x
	BMI.b CODE_06A23F
	CLC
	ADC.w #$0040
	AND.w #$FF00
	BEQ.b CODE_06A27E
	BPL.b CODE_06A243
CODE_06A23F:
	INY
	INY
	INY
	INY
CODE_06A243:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_06A24D
	TYA
	ORA.w #$0002
	TAY
CODE_06A24D:
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w DATA_06A1D2,y
	REP.b #$10
	AND.w #$00FF
	ASL
	TXY
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_00E954,x
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	SEP.b #$10
	TYX
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
CODE_06A27E:
	LDA.b $18,x
	CMP.w #$0020
	BCC.b CODE_06A294
	SEC
	SBC.w #$0002
	STA.b $18,x
	LDA.b $76,x
	SEC
	SBC.w #$0002
	STA.b $76,x
	RTL

CODE_06A294:
	LDA.w $7A96,x
	BNE.b CODE_06A304
	LDA.w $7680,x
	CMP.w #$0040
	BCC.b CODE_06A304
	CMP.w #$00C0
	BCS.b CODE_06A304
	LDA.w $7682,x
	CMP.w #$0040
	BCC.b CODE_06A304
	CMP.w #$0080
	BCS.b CODE_06A304
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.w #$0006
	STA.w $73C2,y
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.b $02
	JSL.l CODE_02E19C
	SEP.b #$20
	LDA.b #$02
	TRB.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$FF
	STA.w $74A2,x
	LDA.b #$04
	STA.w $7A37,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
CODE_06A304:
	RTL

CODE_06A305:
	LDX.b $12
	JSR.w CODE_06A934
	JML.l CODE_03A32E

CODE_06A30E:
	RTL

DATA_06A30F:
	db $00,$01,$02,$03,$03,$02,$01,$00

DATA_06A317:
	db $00,$00,$00,$02,$00,$00,$00,$00

CODE_06A31F:
	LDX.b $12
	RTS

CODE_06A322:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_06A347
	SEP.b #$20
	DEC.b $79,x
	BMI.b CODE_06A348
	LDY.b $79,x
	LDA.b #$04
	STA.w $7A96,x
	LDA.w DATA_06A30F,y
	STA.w $7402,x
	LDA.w $7400,x
	EOR.w DATA_06A317,y
	STA.w $7400,x
	REP.b #$20
CODE_06A347:
	RTS

CODE_06A348:
	STZ.b $78,x
	REP.b #$20
	RTS

CODE_06A34D:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_06A369
	SEP.b #$20
	DEC.b $79,x
	BMI.b CODE_06A36A
	LDY.b $79,x
	LDA.b #$02
	STA.w $7A96,x
	LDA.w DATA_06A30F,y
	STA.w $7402,x
	REP.b #$20
CODE_06A369:
	RTS

CODE_06A36A:
	STZ.b $78,x
	REP.b #$20
	RTS

CODE_06A36F:
	LDX.b $12
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_06A3EC
	LDA.w $7362,x
	BMI.b CODE_06A3EC
	LDA.w #$01C0
	STA.w $6000
	LDA.w #$01C2
	STA.w $6002
	LDA.w #$01E0
	STA.w $6004
	LDA.w #$01E2
	STA.w $6006
	LDA.w #$01C4
	STA.w $6008
	LDA.w #$01C6
	STA.w $600A
	LDA.w #$01E4
	STA.w $600C
	LDA.w #$01E6
	STA.w $600E
	LDA.w #$01C8
	STA.w $6010
	LDA.w #$01E8
	STA.w $6012
	LDA.w #$01CC
	STA.w $6014
	LDA.w #$01CE
	STA.w $6016
	LDA.w #$01EC
	STA.w $6018
	LDA.w #$01EE
	STA.w $601A
	LDA.w #$01CA
	STA.w $601C
	STA.w $601E
	LDA.w #$01EA
	STA.w $6020
	STA.w $6022
	LDX.b #FXCODE_09A122>>16
	LDA.w #FXCODE_09A122
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_06A3EC:
	LDX.b $12
	RTS

CODE_06A3EF:
	LDX.b $12
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_06A406
	LDA.w $7362,x
	BMI.b CODE_06A406
	LDX.b #FXCODE_09A511>>16
	LDA.w #FXCODE_09A511
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_06A406:
	LDX.b $12
	RTS

DATA_06A409:
	dw $0100,$0000,$00E6,$0007,$00B3,$000E,$0066,$0015

DATA_06A419:
	dw $0100,$00CC,$0099,$0066

DATA_06A421:
	dw $0100,$00E6,$00CC,$00B3

CODE_06A429:
	LDX.b $12
	REP.b #$10
	LDA.b $16,x
	EOR.w #$FFFF
	INC
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_560000+$6000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	ASL
	TAY
	LDA.w DATA_06A421,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001C
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	ASL
	ASL
	TAY
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_06A409,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHX
	PHY
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	CMP.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_06A4DC
	LDA.w DATA_06A409+$02,y
	BEQ.b CODE_06A4DF
	LDA.w DATA_06A409+$02,y
	EOR.w #$FFFF
	INC
	AND.w #$00FF
	BRA.b CODE_06A4DF

CODE_06A4DC:
	LDA.w DATA_06A409+$02,y
CODE_06A4DF:
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0060
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	ASL
	TAY
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_06A419,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHX
	PHY
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.b $00
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$7030
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$7030)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$7020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$7020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

CODE_06A5A6:
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	ASL
	TAY
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001C
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6030
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6030)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0060
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$7030
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$7030)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$7020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$7020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_08861B>>16
	LDA.w #FXCODE_08861B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

CODE_06A740:
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001B
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_548000+$00E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$00E1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

CODE_06A77F:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A897A>>16
	LDA.w #FXCODE_0A897A
	JSL.l !RAM_YI_Global_RT_00DE91
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	LDX.b $12
	LDA.w #$0002
	TSB.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0018
	TSB.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	LDY.w $7A36,x
	CPY.b #$48
	BCS.b CODE_06A848
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_06A80B
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_06A80B
	LDA.w $6002
	AND.w #$000F
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.b $00
	STA.w $7182,x
	SEP.b #$20
	STZ.w $7181,x
	REP.b #$20
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_06A80B:
	LDA.w $7860,x
	LDY.w $7221,x
CODE_06A810:
	BMI.b CODE_06A821
	BNE.b CODE_06A81A
	LDY.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_06A848
CODE_06A81A:
	BIT.w #$0014
	BEQ.b CODE_06A848
	BRA.b CODE_06A826

CODE_06A821:
	BIT.w #$0028
	BEQ.b CODE_06A848
CODE_06A826:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BNE.b CODE_06A848
CODE_06A835:
	SEP.b #$20
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.b #$07
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D9|!EXRAMBankMirror,x
	LDA.b #$04
	STA.w $7A96,x
CODE_06A842:
	REP.b #$20
CODE_06A848:
	RTS

CODE_06A849:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BNE.b CODE_06A85F
	LDA.w $70E2,x
	SEC
	SBC.w $611C
	STA.b $00
	LDA.w $7400,x
	DEC
	EOR.b $00
	BPL.b CODE_06A835
CODE_06A85F:
	RTS

CODE_06A860:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_06A8C7
	BEQ.b CODE_06A8C7
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_06A8C7
	LDA.w $7D38,y
	BEQ.b CODE_06A8C7
	LDA.w $70E2,x
	SEC
	SBC.w $7CD6,y
	STA.b $00
	EOR.w #$FFFF
	INC
	STA.w $7C76,y
	PHX
	TYX
	JSL.l CODE_03B24B
	PLX
	LDA.w #$0200
	LDY.b $01
	BPL.b CODE_06A897
	EOR.w #$FFFF
	INC
CODE_06A897:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7A38,x
	LDA.w #$0140
	STA.w $105E
	LDA.w #$00C0
	STA.w $1060
	INC.w $1062
	LDA.w #!Define_YI_SoundID78_HurtBoss
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.b #$20
	STA.w $7A36,x
	REP.b #$20
	PLY
	PLA
CODE_06A8C7:
	RTL

CODE_06A8C8:
	LDA.b #DATA_5FE640>>16
	STA.b $02
	REP.b #$20
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0699B8,y
	STA.b $00
	PHY
	LDX.b #$1A
CODE_06A8D9:
	TXY
	LDA.b [$00],y
	STA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_06A8D9
	PLY
	LDA.w DATA_0699C4,y
	STA.b $00
	PHY
	LDX.b #$06
CODE_06A8F1:
	TXY
	LDA.b [$00],y
	STA.l $702F3C,x
	STA.l YI_Global_PaletteMirror[$E8].LowByte,x
	DEX
	DEX
	BPL.b CODE_06A8F1
	PLY
	LDA.w DATA_0699D0,y
	STA.b $00
	LDX.b #$06
CODE_06A908:
	TXY
	LDA.b [$00],y
	STA.l $702F5C,x
	STA.l YI_Global_PaletteMirror[$F8].LowByte,x
	DEX
	DEX
	BPL.b CODE_06A908
	SEP.b #$20
	LDX.b $12
	RTS

DATA_06A91C:
	dw $0200,$0100

CODE_06A920:
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BMI.b CODE_06A92D
	INY
	INY
CODE_06A92D:
	LDA.w DATA_06A91C,y
	STA.w $617A
	RTS

CODE_06A934:
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_06A947
	STZ.w $617A
CODE_06A947:
	RTS

DATA_06A948:
	dl DATA_5FA570,$702E2E,$702E2E,$702E2E

DATA_06A954:
	dl DATA_5FA570,$702E4E,$702E4E,$702E4E

DATA_06A960:
	dl DATA_5FA570,$702F2E,$702F2E,$702F2E

DATA_06A96C:
	dl DATA_5FA570,$702F4E,$702F4E,$702F4E

CODE_06A978:
	LDA.b $14
	AND.w #$0003
	STA.b $00
	ASL
	CLC
	ADC.b $00
	TAX
CODE_06A984:
	LDA.w DATA_06A948,x
	STA.b $00
	LDY.w DATA_06A948+$02,x
	STY.b $02
	LDA.w #$7020C2
	STA.b $04
	LDY.b #$7020C2>>16
	STY.b $06
	LDY.b #$1C
CODE_06A999:
	LDA.b [$00],y
	STA.b [$04],y
	DEY
	DEY
	BPL.b CODE_06A999
	LDA.w DATA_06A954,x
	STA.b $00
	LDY.w DATA_06A954+$02,x
	STY.b $02
	LDA.w #$20E2
	STA.b $04
	LDY.b #$70
	STY.b $06
	LDY.b #$1C
CODE_06A9B6:
	LDA.b [$00],y
	STA.b [$04],y
	DEY
	DEY
	BPL.b CODE_06A9B6
	LDA.w DATA_06A960,x
	STA.b $00
	LDY.w DATA_06A960+$02,x
	STY.b $02
	LDA.w #$7021C2
	STA.b $04
	LDY.b #$7021C2>>16
	STY.b $06
	LDY.b #$1C
CODE_06A9D3:
	LDA.b [$00],y
	STA.b [$04],y
	DEY
	DEY
	BPL.b CODE_06A9D3
	LDA.w DATA_06A96C,x
	STA.b $00
	LDY.w DATA_06A96C+$02,x
	STY.b $02
	LDA.w #$7021E2
	STA.b $04
	LDY.b #$7021E2>>16
	STY.b $06
	LDY.b #$1C
CODE_06A9F0:
	LDA.b [$00],y
	STA.b [$04],y
	DEY
	DEY
	BPL.b CODE_06A9F0
	LDX.b $12
	RTS

CODE_06A9FB:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_06AA24
	LDA.w $0030
	AND.w #$0003
	CMP.w #$0002
	BCS.b CODE_06AA11
	LDA.w #$0002
	TRB.w !RAM_YI_Global_MainScreenLayers
CODE_06AA11:
	LDA.w !RAM_YI_Global_MainScreenLayers
	BIT.w #$0002
	BEQ.b CODE_06AA1E
	LDA.w #$0005
	BRA.b CODE_06AA21

CODE_06AA1E:
	LDA.w #$FFFF
CODE_06AA21:
	STA.w $74A2,x
CODE_06AA24:
	RTS

;---------------------------------------------------------------------------

DATA_06AA25:
	dw $FF80,$0080

YI_NorSpr0D2_MarchingMilde_Init:
;$06AA29
	LDA.w #!Define_YI_NorSpr0D2_MarchingMilde
	LDY.b #$04
	JSL.l CODE_03A366
	LDA.w #$0080
	STA.w $7E1A
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	TYX
	LDA.w #$FFF0
	STA.w $1013
	JSL.l CODE_03AEEB
	LDY.b #$2A
	JSL.l CODE_0CE5D6
	LDX.b $12
	JML.l CODE_03A32E

;---------------------------------------------------------------------------

DATA_06AA5B:
	dw $FFF9,$FFFA,$FFFB,$FFFC,$FFFD,$FFFE,$FFFF,$0000
	dw $0000,$FFFF,$FFFE,$FFFD,$FFFC,$FFFB,$FFFA,$FFF9

DATA_06AA7B:
	dw CODE_06AA91
	dw CODE_06AABB
	dw CODE_06AB08
	dw CODE_06AB1A
	dw CODE_06AB67
	dw CODE_06AC4C
	dw CODE_06AD12
	dw CODE_06AB2B

YI_NorSpr0D2_MarchingMilde_Main:
;$06AA8B
	LDX.w $105C
	JMP.w (DATA_06AA7B,x)

CODE_06AA91:
	LDX.b $12
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$07
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_06AAB3,y
	STA.w $7402,x
	LDA.b #$08
	STA.w $7A96,x
	REP.b #$20
	INC.w $105C
	INC.w $105C
	RTL

DATA_06AAB3:
	db $01,$02,$03,$04,$03,$02,$01,$00

CODE_06AABB:
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.w $70E2,x
	CMP.w #$00C0
	BCC.b CODE_06AAE7
	LDA.w $7A96,x
	BNE.b CODE_06AAE6
	LDY.b $18,x
	DEY
	BPL.b CODE_06AAD5
	LDY.b #$07
CODE_06AAD5:
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_06AAB3,y
	STA.w $7402,x
	LDA.b #$08
	STA.w $7A96,x
	REP.b #$20
CODE_06AAE6:
	RTL

CODE_06AAE7:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$0001
	STA.w $1015
	LDX.b $12
	LDA.w #$0080
	STA.w $7A96,x
	INC.w $1015
	INC.w $105C
	INC.w $105C
	RTL

CODE_06AB08:
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.w $1015
	BPL.b CODE_06AB19
	INC.w $105C
	INC.w $105C
CODE_06AB19:
	RTL

CODE_06AB1A:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_06AB2A
	STZ.w $1015
	INC.w $105C
	INC.w $105C
CODE_06AB2A:
	RTL

CODE_06AB2B:
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.b $18,x
	BNE.b CODE_06AB63
	LDA.w $1013
	BEQ.b CODE_06AB5C
	LDX.b #FXCODE_09AF4A>>16
	LDA.w #FXCODE_09AF4A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	BPL.b CODE_06AB62
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.b $02
	JSL.l CODE_02E19C
CODE_06AB5C:
	JSL.l CODE_02A982
	INC.b $18,x
CODE_06AB62:
	RTL

CODE_06AB63:
	JML.l CODE_03A32E

CODE_06AB67:
	LDX.b $12
	LDA.w $7040,x
	AND.w #$07FC
	ORA.w #$0002
	STA.w $7040,x
	LDY.b #$1E
	STY.b $78,x
	LDY.b #$00
	STA.b $79,x
	LDA.w #$0020
	STA.b $18,x
	STA.b $76,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$001E
	TAY
	LDA.w DATA_06AC3A,y
	STA.w $7720,x
	LDA.w $7182,x
	SEC
	SBC.w $7720,x
	STA.w $7182,x
	LDA.w #$0FFF
	STA.b $16,x
	CLC
	ADC.w #$2000
	XBA
	LSR
	LSR
	LSR
	AND.w #$0007
	STA.w $7402,x
	LDX.b #$1E
CODE_06ABB1:
	LDA.l DATA_5FE6BC,x
	STA.l $702E4E,x
	STA.l YI_Global_PaletteMirror[$71].LowByte,x
	DEX
	DEX
	BPL.b CODE_06ABB1
	LDX.b $12
	SEP.b #$20
	LDA.b #!REGISTER_BG2HorizScrollOffset
	STA.w HDMA[$03].Destination
	LDA.b #!REGISTER_BG2VertScrollOffset
	STA.w HDMA[$04].Destination
	REP.b #$20
	LDA.w #$0030
	STA.w $6126
	LDA.w $7042
	AND.w #$FFCF
	ORA.w #$0030
	STA.w $7042
	LDA.w #$0510
	STA.w !RAM_YI_Global_MainScreenLayers
	JSR.w CODE_06B223
	LDA.w #!Define_YI_SoundID87_CastleAboutToExplode
	JSL.l CODE_0085D2
	INC.w $105C
	INC.w $105C
	RTL

DATA_06ABFA:
	dw $0110,$0100,$00F0,$00E0,$00D0,$00C0,$00B0,$00A0
	dw $0090,$0080,$0070,$0060,$0050,$0040,$0030,$0020

DATA_06AC1A:
	dw $0100,$00F0,$00E0,$00D0,$00C0,$00B0,$00A0,$0090
	dw $0080,$0070,$0060,$0050,$0040,$0030,$0020,$0050

DATA_06AC3A:
	dw $FFF6,$FFF6,$FFF8,$FFF9,$FFFA,$FFFB,$FFFC,$FFFD
	dw $FFFE

CODE_06AC4C:
	LDX.b $12
	LDA.w #$0001
	JSR.w CODE_06B072
	JSR.w CODE_06B2DC
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_06AC5F
	JSR.w CODE_06B223
CODE_06AC5F:
	JSL.l CODE_03AF23
	LDY.b $79,x
	TYX
	JMP.w (DATA_06AC69,x)

DATA_06AC69:
	dw CODE_06AC6F
	dw CODE_06AC9A
	dw CODE_06ACF5

CODE_06AC6F:
	LDX.b $12
	LDY.b $78,x
	LDA.b $18,x
	CLC
	ADC.w #$0004
	CMP.w DATA_06ABFA,y
	BCS.b CODE_06AC91
	STA.b $18,x
	STA.b $76,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$001E
	TAY
	LDA.w DATA_06AC3A,y
	STA.w $7720,x
	RTL

CODE_06AC91:
	SEP.b #$20
	INC.b $79,x
	INC.b $79,x
	REP.b #$20
	RTL

CODE_06AC9A:
	LDX.b $12
	LDY.b $78,x
	LDA.b $18,x
	SEC
	SBC.w #$0004
	CMP.w DATA_06AC1A,y
	BCC.b CODE_06ACBC
	STA.b $18,x
	STA.b $76,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$001E
	TAY
	LDA.w DATA_06AC3A,y
	STA.w $7720,x
	RTL

CODE_06ACBC:
	LDY.b $78,x
	DEY
	DEY
	BMI.b CODE_06ACCD
	STY.b $78,x
	SEP.b #$20
	DEC.b $79,x
	DEC.b $79,x
	REP.b #$20
	RTL

CODE_06ACCD:
	LDA.w #$0080
	STA.w $7A96,x
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	LDA.b $16,x
	CLC
	ADC.w #$2000
	XBA
	LSR
	AND.w #$001E
	TAY
	LDA.w DATA_06AA5B,y
	STA.w $7720,x
	SEP.b #$20
	INC.b $79,x
	INC.b $79,x
	REP.b #$20
	RTL

CODE_06ACF5:
	LDA.w $7A96,x
	BNE.b CODE_06AD11
	LDA.w #$0100
	STA.b $78,x
	LDY.w $7400,x
	LDA.w DATA_06AA25,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	INC.w $105C
	INC.w $105C
CODE_06AD11:
	RTL

CODE_06AD12:
	LDX.b $12
	LDA.w #$0000
	JSR.w CODE_06B072
	JSR.w CODE_06B2DC
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_06AD25
	JSR.w CODE_06B0FD
CODE_06AD25:
	JSL.l CODE_03AF23
	JSR.w CODE_06AFA7
	LDY.w $7A36,x
	TYX
	JMP.w (DATA_06AD33,x)

DATA_06AD33:
	dw CODE_06AD47
	dw CODE_06ADA5
	dw CODE_06ADCC
	dw CODE_06AE08
	dw CODE_06AE44
	dw CODE_06AEA0
	dw CODE_06AEDD
	dw CODE_06AF09

DATA_06AD43:
	dw $0028,$0014

CODE_06AD47:
	LDX.b $12
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_06AD43,y
	BEQ.b CODE_06AD5E
	LDA.w $7A36,x
	XBA
	ORA.w #$0002
	STA.w $7A36,x
CODE_06AD5E:
	LDA.b $16,x
	SEC
	SBC.b $78,x
	STA.b $00
	CLC
	ADC.w #$2000
	CMP.w #$4000
	BCC.b CODE_06AD7A
	LDA.b $78,x
	EOR.w #$FFFF
	INC
	STA.b $78,x
	LDA.b $16,x
	BRA.b CODE_06AD7E

CODE_06AD7A:
	LDA.b $00
	STA.b $16,x
CODE_06AD7E:
	CLC
	ADC.w #$2000
	XBA
	LSR
	PHA
	LSR
	LSR
	AND.w #$0007
	STA.w $7402,x
	PLA
	AND.w #$001E
	TAY
	LDA.w DATA_06AA5B,y
	STA.w $7720,x
	RTL

DATA_06AD99:
	db $03,$06,$08,$08,$06,$03

DATA_06AD9F:
	db $00,$00,$02,$00,$00,$00

CODE_06ADA5:
	LDX.b $12
	LDY.w $7402,x
	CPY.b #$03
	BEQ.b CODE_06ADB0
	BRA.b CODE_06AD5E

CODE_06ADB0:
	SEP.b #$20
	LDA.b #$05
	STA.w $7A38,x
	TAY
	LDA.w DATA_06AD99,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_06ADCC:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_06ADF3
	SEP.b #$20
	DEC.w $7A38,x
	BMI.b CODE_06ADF4
	LDA.b #$04
	STA.w $7A96,x
	LDY.w $7A38,x
	LDA.w DATA_06AD99,y
	STA.w $7402,x
	LDA.w $7400,x
	EOR.w DATA_06AD9F,y
	STA.w $7400,x
	REP.b #$20
CODE_06ADF3:
	RTL

CODE_06ADF4:
	STZ.w $7A36,x
	LDA.b #$03
	STA.w $7402,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_06AA25,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_06AE08:
	LDX.b $12
	LDA.b $76,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $76,x
	LDA.b $18,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $18,x
	CMP.w #$00FC
	BCS.b CODE_06AE26
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

CODE_06AE26:
	CMP.w #$0100
	BCS.b CODE_06AE2C
	RTL

CODE_06AE2C:
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	LDA.w #$FFFC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEP.b #$20
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_06AE44:
	LDX.b $12
	LDA.b $18,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $18,x
	LDA.b $76,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $76,x
	CMP.w #$00FC
	BCS.b CODE_06AE62
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

CODE_06AE62:
	CMP.w #$0100
	BCS.b CODE_06AE68
	RTL

CODE_06AE68:
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	LDA.w #$FFFC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEP.b #$20
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_06AE85
	DEC.w $7A36,x
	DEC.w $7A36,x
	REP.b #$20
	RTL

CODE_06AE85:
	STZ.w $7A36,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_06AA25,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

DATA_06AE94:
	dw $FF00,$0100

DATA_06AE98:
	dw $0000,$0002

DATA_06AE9C:
	dw $FFEC,$001C

CODE_06AEA0:
	LDX.b $12
	STZ.w $60AA
	LDA.w $105E
	BIT.w #$0001
	BEQ.b CODE_06AEB7
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $1060
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_06AEB7:
	LDA.b $76,x
	SEC
	SBC.w #$0010
	CMP.w #$0030
	BCC.b CODE_06AECD
	STA.b $76,x
	LDA.b $18,x
	CLC
	ADC.w #$0010
	STA.b $18,x
	RTL

CODE_06AECD:
	SEP.b #$20
	LDA.b #$08
	STA.w $7A96,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
	RTL

CODE_06AEDD:
	LDX.b $12
	STZ.w $60AA
	LDA.w $105E
	BIT.w #$0001
	BEQ.b CODE_06AEF4
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $1060
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_06AEF4:
	LDA.w $7A96,x
	BNE.b CODE_06AF08
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	INC.w $7A36,x
	INC.w $7A36,x
	REP.b #$20
CODE_06AF08:
	RTL

CODE_06AF09:
	LDX.b $12
	JSL.l CODE_03AEFD
	LDA.w #!Define_YI_SoundID85_MildePop1
	JSL.l CODE_0085D2
	LDA.w #$012E
	JSL.l CODE_03A364
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.b $00
CODE_06AF34:
	LDA.w #$00D3
	JSL.l CODE_03A34C
	LDA.w #$0020
	STA.w $7AF6,y
	LDA.w #$0030
	STA.w $7A96,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7860,y
	AND.w #$FFFE
	STA.w $7860,y
	LDA.w $7182,x
	SEC
	SBC.w #$0030
	STA.w $7182,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	PHX
	LDA.b $00
	ASL
	TAX
	LDA.w DATA_06AE94,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w DATA_06AE98,x
	STA.w $7400,y
	LDA.w DATA_06AE9C,x
	PLX
	CLC
	ADC.w $70E2,x
	STA.w $70E2,y
	DEC.b $00
	BPL.b CODE_06AF34
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0002
	TRB.w !RAM_YI_Global_MainScreenLayers
	TRB.w !RAM_YI_Global_SubScreenLayers
	STZ.b $18,x
	STZ.w $7A96,x
	INC.w $105C
	INC.w $105C
	RTL

CODE_06AFA7:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_06B029
	LDY.w $7D36,x
	DEY
	BMI.b CODE_06B016
	BEQ.b CODE_06B016
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_06B016
	LDA.w $7D38,y
	BEQ.b CODE_06B016
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $7CD6,y
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_06AFD9
	EOR.b $00
	BMI.b CODE_06B016
CODE_06AFD9:
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.w $7C76,x
	PHX
	TYX
	JSL.l CODE_03B24B
	PLX
	LDA.w $7A36,x
	CMP.w #$0006
	BCS.b CODE_06B016
CODE_06AFF1:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFFC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.b $18,x
	STA.b $18,x
	SEP.b #$20
	LDA.b #$06
	STA.w $7A36,x
	LDA.b #$03
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	PLA
	RTL

CODE_06B016:
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	BNE.b CODE_06B029
	LDA.w $105E
	BEQ.b CODE_06B029
	CMP.w #$0001
	BEQ.b CODE_06B02A
	JSL.l CODE_03A858
CODE_06B029:
	RTS

CODE_06B02A:
	LDA.w $60AA
	BMI.b CODE_06B029
	LDA.w #$0100
	STA.b $18,x
	STA.b $76,x
	LDA.w $60D4
	BNE.b CODE_06B048
	JSL.l CODE_03B20B
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	BRA.b CODE_06AFF1

CODE_06B048:
	LDA.w $60AA
	BEQ.b CODE_06B029
	STZ.w $60AA
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w $1060
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	JSL.l CODE_028925
	LDA.w #$E000
	STA.b $16,x
	SEP.b #$20
	LDA.b #$09
	STA.w $7402,x
	LDA.b #$0A
	STA.w $7A36,x
	REP.b #$20
	RTS

CODE_06B072:
	STA.w $6004
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_06B0CC
	LDA.b $16,x
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #DATA_06B36D>>16
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #DATA_06B36D
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7402,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0092
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #$4000
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $18,x
	STA.w $6000
	LDA.b $76,x
	STA.w $6002
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w $6010
	LDA.w $7682,x
	CLC
	ADC.w #$0004
	STA.w $6012
	LDX.b #FXCODE_09A578>>16
	LDA.w #FXCODE_09A578
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_06B0CC:
	RTS

DATA_06B0CD:
	dw $0100,$0000,$0100,$0000,$0100,$0000,$0100,$0000
	dw $0100,$0000,$00F3,$00E4,$00E6,$00E4,$00D9,$00E4
	dw $0100,$0000,$00E6,$00E4,$00CC,$00E4,$0100,$0000

CODE_06B0FD:
	LDY.w $74A2,x
	CPY.b #$FF
	BNE.b CODE_06B105
	RTS

CODE_06B105:
	LDA.b $16,x
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_560000+$6060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	CMP.w #$0009
	BCC.b CODE_06B17C
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$003F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6001
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6001)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088C78>>16
	LDA.w #FXCODE_088C78
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_06B17C:
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6080
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7402,x
	ASL
	ASL
	TAY
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_06B0CD,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHX
	PHY
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.b $18,x
	CMP.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_06B1EB
	LDA.w DATA_06B0CD+$02,y
	BEQ.b CODE_06B1EE
	LDA.w DATA_06B0CD+$02,y
	EOR.w #$FFFF
	INC
	AND.w #$00FF
	BRA.b CODE_06B1EE

CODE_06B1EB:
	LDA.w DATA_06B0CD+$02,y
CODE_06B1EE:
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_06B222:
	RTS

CODE_06B223:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_06B222
	LDA.b $16,x
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_560000+$6060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6080
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_560000+$6040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$6040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_06B2DB:
	RTS

CODE_06B2DC:
	LDY.w $74A2,x
	CPY.b #$FF
	BEQ.b CODE_06B2DB
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7680,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7682,x
	CLC
	ADC.w #$0004
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8974>>16
	LDA.w #FXCODE_0A8974
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w $601A
	STA.w $105E
	LDA.w $601C
	STA.w $1060
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	LDX.b $12
	LDA.w #$0002
	TSB.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0018
	TSB.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	LDA.w $7860,x
	LDY.w $7221,x
	BMI.b CODE_06B364
	BNE.b CODE_06B35D
	LDY.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_06B36C
CODE_06B35D:
	BIT.w #$0014
	BEQ.b CODE_06B36C
	BRA.b CODE_06B369

CODE_06B364:
	BIT.w #$0028
	BEQ.b CODE_06B36C
CODE_06B369:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_06B36C:
	RTS

DATA_06B36D:
	dw $02F8,$F0F0,$3DC0,$0002,$C2F0,$023D,$00F0,$3DE0
	dw $0002,$E200,$093D,$F002,$E2F0,$02FF,$F000,$FFE0
	dw $F002,$C200,$02FF,$0000,$FFC0,$F002,$C2F0,$026F
	dw $F000,$6FC0,$F002,$E200,$026F,$0000,$6FE0,$F002
	dw $E0F0,$02AD,$F000,$ADE2,$F002,$C000,$02AD,$0000
	dw $ADC2,$9DDB,$FA02,$CAF0,$027D,$F00A,$7DC8,$FA02
	dw $EA00,$027D,$000A,$7DE8,$E702,$C8F0,$023F,$F0F7
	dw $3FCA,$E702,$E800,$023F,$00F7,$3FEA,$9F00,$F002
	dw $C4F0,$023F,$F000,$3FC6,$F002,$E400,$023F,$0000
	dw $3FE6,$02F8,$F0F0,$3DC0,$0002,$C2F0,$023D,$00F0
	dw $3DE0,$0002,$E200,$093D,$F002,$E2F0,$02FF,$F000
	dw $FFE0,$F002,$C200,$02FF,$0000,$FFC0,$F002,$C2F0
	dw $026F,$F000,$6FC0,$F002,$E200,$026F,$0000,$6FE0
	dw $F002,$E0F0,$02AD,$F000,$ADE2,$F002,$C000,$02AD
	dw $0000,$ADC2,$9DDD,$FA02,$CAF0,$027D,$F00A,$7DC8
	dw $FA02,$EA00,$027D,$000A,$7DE8,$E602,$C8F0,$023F
	dw $F0F6,$3FCA,$E602,$E800,$023F,$00F6,$3FEA,$9F02
	dw $F002,$C4F0,$023F,$F000,$3FC6,$F002,$E400,$023F
	dw $0000,$3FE6,$02F8,$F0F0,$3DC0,$0002,$C2F0,$023D
	dw $00F0,$3DE0,$0002,$E200,$093D,$F002,$E2F0,$02FF
	dw $F000,$FFE0,$F002,$C200,$02FF,$0000,$FFC0,$F002
	dw $C2F0,$026F,$F000,$6FC0,$F002,$E200,$026F,$0000
	dw $6FE0,$F002,$E0F0,$02AD,$F000,$ADE2,$F002,$C000
	dw $02AD,$0000,$ADC2,$9DDF,$FB02,$CAF0,$027D,$F00B
	dw $7DC8,$FB02,$EA00,$027D,$000B,$7DE8,$E502,$C8F0
	dw $023F,$F0F5,$3FCA,$E502,$E800,$023F,$00F5,$3FEA
	dw $9F05,$F002,$C4F0,$023F,$F000,$3FC6,$F002,$E400
	dw $023F,$0000,$3FE6,$02F8,$F0F0,$3DC0,$0002,$C2F0
	dw $023D,$00F0,$3DE0,$0002,$E200,$093D,$F002,$E2F0
	dw $02FF,$F000,$FFE0,$F002,$C200,$02FF,$0000,$FFC0
	dw $F002,$C2F0,$026F,$F000,$6FC0,$F002,$E200,$026F
	dw $0000,$6FE0,$F002,$E0F0,$02AD,$F000,$ADE2,$F002
	dw $C000,$02AD,$0000,$ADC2,$9DE2,$FD02,$CAF0,$027D
	dw $F00D,$7DC8,$FD02,$EA00,$027D,$000D,$7DE8,$E402
	dw $C8F0,$023F,$F0F4,$3FCA,$E402,$E800,$023F,$00F4
	dw $3FEA,$9F0A,$F002,$C4F0,$023F,$F000,$3FC6,$F002
	dw $E400,$023F,$0000,$3FE6,$02F8,$F0F0,$3DC0,$0002
	dw $C2F0,$023D,$00F0,$3DE0,$0002,$E200,$093D,$F002
	dw $E2F0,$02FF,$F000,$FFE0,$F002,$C200,$02FF,$0000
	dw $FFC0,$F002,$C2F0,$026F,$F000,$6FC0,$F002,$E200
	dw $026F,$0000,$6FE0,$F002,$E0F0,$02AD,$F000,$ADE2
	dw $F002,$C000,$02AD,$0000,$ADC2,$9DE7,$FE02,$CAF0
	dw $027D,$F00E,$7DC8,$FE02,$EA00,$027D,$000E,$7DE8
	dw $E202,$C8F0,$023F,$F0F2,$3FCA,$E202,$E800,$023F
	dw $00F2,$3FEA,$9F10,$F002,$C4F0,$023F,$F000,$3FC6
	dw $F002,$E400,$023F,$0000,$3FE6,$02F8,$F0F0,$3DC0
	dw $0002,$C2F0,$023D,$00F0,$3DE0,$0002,$E200,$093D
	dw $F002,$E2F0,$02FF,$F000,$FFE0,$F002,$C200,$02FF
	dw $0000,$FFC0,$F002,$C2F0,$026F,$F000,$6FC0,$F002
	dw $E200,$026F,$0000,$6FE0,$F002,$E0F0,$02AD,$F000
	dw $ADE2,$F002,$C000,$02AD,$0000,$ADC2,$9DEC,$FF02
	dw $CAF0,$027D,$F00F,$7DC8,$FF02,$EA00,$027D,$000F
	dw $7DE8,$E102,$C8F0,$023F,$F0F1,$3FCA,$E102,$E800
	dw $023F,$00F1,$3FEA,$9F15,$F002,$C4F0,$023F,$F000
	dw $3FC6,$F002,$E400,$023F,$0000,$3FE6,$02F8,$F0F0
	dw $3DC0,$0002,$C2F0,$023D,$00F0,$3DE0,$0002,$E200
	dw $093D,$F002,$E2F0,$02FF,$F000,$FFE0,$F002,$C200
	dw $02FF,$0000,$FFC0,$F002,$C2F0,$026F,$F000,$6FC0
	dw $F002,$E200,$026F,$0000,$6FE0,$F002,$E0F0,$02AD
	dw $F000,$ADE2,$F002,$C000,$02AD,$0000,$ADC2,$9DEF
	dw $0002,$CAF0,$027D,$F010,$7DC8,$0002,$EA00,$027D
	dw $0010,$7DE8,$E102,$C8F0,$023F,$F0F1,$3FCA,$E102
	dw $E800,$023F,$00F1,$3FEA,$9F19,$F002,$C4F0,$023F
	dw $F000,$3FC6,$F002,$E400,$023F,$0000,$3FE6,$02F8
	dw $F0F0,$3DC0,$0002,$C2F0,$023D,$00F0,$3DE0,$0002
	dw $E200,$093D,$F002,$E2F0,$02FF,$F000,$FFE0,$F002
	dw $C200,$02FF,$0000,$FFC0,$F002,$C2F0,$026F,$F000
	dw $6FC0,$F002,$E200,$026F,$0000,$6FE0,$F002,$E0F0
	dw $02AD,$F000,$ADE2,$F002,$C000,$02AD,$0000,$ADC2
	dw $9DF2,$0002,$CAF0,$027D,$F010,$7DC8,$0002,$EA00
	dw $027D,$0010,$7DE8,$E002,$C8F0,$023F,$F0F0,$3FCA
	dw $E002,$E800,$023F,$00F0,$3FEA,$9F1C,$F002,$C4F0
	dw $023F,$F000,$3FC6,$F002,$E400,$023F,$0000,$3FE6
	dw $02F8,$F0F0,$3DC0,$0002,$C2F0,$023D,$00F0,$3DE0
	dw $0002,$E200,$093D,$F002,$E2F0,$02FF,$F000,$FFE0
	dw $F002,$C200,$02FF,$0000,$FFC0,$F002,$C2F0,$026F
	dw $F000,$6FC0,$F002,$E200,$026F,$0000,$6FE0,$F002
	dw $E0F0,$02AD,$F000,$ADE2,$F002,$C000,$02AD,$0000
	dw $ADC2,$9DF6,$0002,$CAF0,$027D,$F010,$7DC8,$0002
	dw $EA00,$027D,$0010,$7DE8,$E002,$C8F0,$023F,$F0F0
	dw $3FCA,$E002,$E800,$023F,$00F0,$3FEA,$9F20,$F002
	dw $C4F0,$023F,$F000,$3FC6,$F002,$E400,$023F,$0000
	dw $3FE6,$02F8,$F0F0,$3DC0,$0002,$C2F0,$023D,$00F0
	dw $3DE0,$0002,$E200,$093D,$F002,$E2F0,$02FF,$F000
	dw $FFE0,$F002,$C200,$02FF,$0000,$FFC0,$F002,$C2F0
	dw $027D,$F000,$7DC0,$F002,$E200,$027D,$0000,$7DE0
	dw $F002,$E0F0,$02BF,$F000,$BFE2,$F002,$C000,$02BF
	dw $0000,$BFC2,$9800,$E002,$C8F0,$023D,$F0F0,$3DCA
	dw $E002,$E800,$023D,$00F0,$3DEA,$C002,$C4F0,$023F
	dw $F0D0,$3FC6,$C002,$E400,$023F,$00D0,$3FE6,$0002
	dw $CAF0,$027F,$F010,$7FC8,$0002,$EA00,$027F,$0010
	dw $7FE8,$2002,$C6F0,$027F,$F030,$7FC4,$2002,$E600
	dw $027F,$0030,$7FE4

;---------------------------------------------------------------------------

YI_NorSpr12E_LargePopEffect_Init:
;$06B933
	RTL

;---------------------------------------------------------------------------

DATA_06B934:
	dl DATA_5FD98A
	dl DATA_5FD984
	dl DATA_5FD986
	dl DATA_5FD988

DATA_06B940:
	db $00,$06,$03,$06,$03,$06

DATA_06B946:
	db $00,$09,$06,$09,$06,$09

DATA_06B94C:
	dw DATA_06B940,DATA_06B946

YI_NorSpr12E_LargePopEffect_Main:
;$06B950
	LDA.w #$0180
	SEC
	SBC.w $7680,x
	STA.w !RAM_YI_Global_Layer3XPosLo
	LDA.w #$0180
	SEC
	SBC.w $7682,x
	STA.w !RAM_YI_Global_Layer3YPosLo
	JSL.l CODE_03AF23
	LDA.w !RAM_YI_Global_MainScreenLayers
	ORA.w !RAM_YI_Global_SubScreenLayers
	AND.w #$001B
	ORA.w #$0400
	STA.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$33
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w $7A96,x
	BNE.b CODE_06B9B7
	LDA.w #$0002
	STA.w $7A96,x
	LDY.b $16,x
	LDA.w DATA_06B94C,y
	STA.b $00
	LDY.b $18,x
	DEY
	BPL.b CODE_06B999
	DEC.b $76,x
	BMI.b CODE_06B9B8
	LDY.b #$05
CODE_06B999:
	STY.b $18,x
	LDA.b ($00),y
	TAY
	LDA.w DATA_06B934,y
	STA.b $00
	LDX.w DATA_06B934+$02,y
	STX.b $02
	LDX.b #$04
CODE_06B9AA:
	TXY
	LDA.b [$00],y
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	DEX
	DEX
	BPL.b CODE_06B9AA
	LDX.b $12
CODE_06B9B7:
	RTL

CODE_06B9B8:
	STZ.w $6098
	STZ.w $60A0
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

DATA_06B9C2:
	db $08,$08,$08,$08,$08,$0C,$10,$10,$10,$10,$10,$10,$0C,$08,$10,$10
	db $10,$10,$10,$10,$10,$10,$00,$03

YI_NorSpr0EA_VerticalCloudDrop_Init:
;$06B9DA
	LDA.w $7182,x
	STA.b $18,x
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_06BA05
	LDA.w DATA_06BA2F
	STA.w $75E2,x
	LDA.w #$FE70
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0006
	STA.w $7402,x
	TAY
	LDA.w DATA_06B9C2,y
	AND.w #$00FF
	STA.w $7B58,x
	BRA.b CODE_06BA21

CODE_06BA05:
	LDA.w DATA_06BA2F+$02
	STA.w $75E2,x
	LDA.w #$0180
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000D
	STA.w $7402,x
	TAY
	LDA.w DATA_06B9C2,y
	AND.w #$00FF
	STA.w $7B58,x
CODE_06BA21:
	STZ.w $7A96,x
	RTL

;---------------------------------------------------------------------------

DATA_06BA25:
	db $05,$04,$03,$02,$01

DATA_06BA2A:
	db $0C,$0B,$0A,$09,$08

DATA_06BA2F:
	dw $0800,$F800

YI_NorSpr0EA_VerticalCloudDrop_Main:
;$06BA33
	LDA.w $7D38,x
	BEQ.b CODE_06BA50
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_06BA50
	LDA.w $6FA0,x
	ORA.w #$0200
	STA.w $6FA0,x
	JSL.l CODE_06BB4D
CODE_06BA50:
	JSL.l CODE_03AF23
	JSL.l CODE_06BAF3
	LDA.b $16,x
	BNE.b CODE_06BAAE
	LDA.w #$0010
	STA.w $7542,x
	LDY.b #$00
	LDA.w $7182,x
	CMP.b $18,x
	BCC.b CODE_06BA6D
	LDY.b #$02
CODE_06BA6D:
	LDA.w DATA_06BA2F,y
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_06BA88
	LDA.w #$0005
	STA.b $16,x
	LDA.w #$0004
	STA.w $7A96,x
	STZ.w $7542,x
	BRA.b CODE_06BAEE

CODE_06BA88:
	BPL.b CODE_06BA9C
	LDA.w #$000D
	STA.w $7402,x
	TAY
	LDA.w DATA_06B9C2,y
	AND.w #$00FF
	STA.w $7B58,x
	BRA.b CODE_06BAEE

CODE_06BA9C:
	LDA.w #$0006
	STA.w $7402,x
	TAY
	LDA.w DATA_06B9C2,y
	AND.w #$00FF
	STA.w $7B58,x
	BRA.b CODE_06BAEE

CODE_06BAAE:
	LDA.w #DATA_06BA25
	LDY.w $75E3,x
	BPL.b CODE_06BAB9
	LDA.w #DATA_06BA2A
CODE_06BAB9:
	STA.b $00
	LDA.b $16,x
	LSR
	BNE.b CODE_06BACC
	LDA.w $7A96,x
	LSR
	BNE.b CODE_06BACC
	LDA.w #$0010
	STA.w $7542,x
CODE_06BACC:
	LDY.b $16,x
	DEY
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
	TAY
	LDA.w DATA_06B9C2,y
	AND.w #$00FF
	STA.w $7B58,x
	LDA.w $7A96,x
	BNE.b CODE_06BAEE
	LDA.w #$0004
	STA.w $7A96,x
	DEC.b $16,x
CODE_06BAEE:
	JSL.l CODE_03A5B7
	RTL

CODE_06BAF3:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_06BB35
	BEQ.b CODE_06BB35
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_06BB35
	LDA.w $7D38,y
	BEQ.b CODE_06BB35
	JSL.l CODE_0CFF61
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $75E0,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	PLY
	PLA
CODE_06BB35:
	RTL

;---------------------------------------------------------------------------

DATA_06BB36:
	db $0E,$0F,$10,$11,$12,$13,$14,$15

YI_NorSpr0EA_VerticalCloudDrop_StompRt:
;$06BB3E
	LDA.w #$0180
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_06BB4D:
	LDA.w $7A98,x
	BNE.b CODE_06BB69
	SEP.b #$20
	LDA.b #$04
	STA.w $7A98,x
	LDY.b $76,x
	LDA.w DATA_06BB36,y
	STA.w $7402,x
	TYA
	INC
	AND.b #$07
	STA.b $76,x
	REP.b #$20
CODE_06BB69:
	RTL

;---------------------------------------------------------------------------

DATA_06BB6A:
	db $04,$04,$04,$04,$08,$0C,$08,$08,$08,$08,$0C,$0C,$0C,$0C,$08,$04

YI_NorSpr0EB_HorizontalCloudDrop_Init:
;$06BB7A
	LDA.w $70E2,x
	STA.b $18,x
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_06BBA5
	LDA.w DATA_06BA2F
	STA.w $75E0,x
	LDA.w #$FE70
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000F
	STA.w $7402,x
	TAY
	LDA.w DATA_06BB6A,y
	AND.w #$00FF
	STA.w $7B56,x
	BRA.b CODE_06BBC1

CODE_06BBA5:
	LDA.w DATA_06BA2F+$02
	STA.w $75E2,x
	LDA.w #$0180
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.w $7402,x
	TAY
	LDA.w DATA_06BB6A,y
	AND.w #$00FF
	STA.w $7B56,x
CODE_06BBC1:
	STZ.w $7A96,x
	LDA.w #$0010
	STA.w $7540,x
	RTL

;---------------------------------------------------------------------------

DATA_06BBCB:
	db $04,$03,$02,$01

DATA_06BBCF:
	db $0E,$0D,$0C,$0B

YI_NorSpr0EB_HorizontalCloudDrop_Main:
;$06BBD3
	LDA.w $7D38,x
	BEQ.b CODE_06BBF0
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_06BBF0
	LDA.w $6FA0,x
	ORA.w #$0200
	STA.w $6FA0,x
	JSL.l CODE_06BCA9
CODE_06BBF0:
	JSL.l CODE_03AF23
	JSL.l CODE_06BAF3
	STZ.w $7400,x
	LDA.b $16,x
	BNE.b CODE_06BC51
	LDA.w #$0010
	STA.w $7540,x
	LDY.b #$00
	LDA.w $70E2,x
	CMP.b $18,x
	BCC.b CODE_06BC10
	LDY.b #$02
CODE_06BC10:
	LDA.w DATA_06BA2F,y
	STA.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_06BC2B
	LDA.w #$0004
	STA.b $16,x
	LDA.w #$0005
	STA.w $7A96,x
	STZ.w $7540,x
	BRA.b CODE_06BC91

CODE_06BC2B:
	BPL.b CODE_06BC3F
	LDA.w #$000F
	STA.w $7402,x
	TAY
	LDA.w DATA_06BB6A,y
	AND.w #$00FF
	STA.w $7B56,x
	BRA.b CODE_06BC91

CODE_06BC3F:
	LDA.w #$0005
	STA.w $7402,x
	TAY
	LDA.w DATA_06BB6A,y
	AND.w #$00FF
	STA.w $7B56,x
	BRA.b CODE_06BC91

CODE_06BC51:
	LDA.w #DATA_06BBCB
	LDY.w $75E1,x
	BPL.b CODE_06BC5C
	LDA.w #DATA_06BBCF
CODE_06BC5C:
	STA.b $00
	LDA.b $16,x
	LSR
	BNE.b CODE_06BC6F
	LDA.w $7A96,x
	LSR
	BNE.b CODE_06BC6F
	LDA.w #$0010
	STA.w $7540,x
CODE_06BC6F:
	LDY.b $16,x
	DEY
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
	TAY
	LDA.w DATA_06BB6A,y
	AND.w #$00FF
	STA.w $7B56,x
	LDA.w $7A96,x
	BNE.b CODE_06BC91
	LDA.w #$0005
	STA.w $7A96,x
	DEC.b $16,x
CODE_06BC91:
	JSL.l CODE_03A5B7
	RTL

;---------------------------------------------------------------------------

DATA_06BC96:
	db $06,$07,$08,$09

YI_NorSpr0EB_HorizontalCloudDrop_StompRt:
;$06BC9A
	LDA.w #$0180
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_06BCA9:
	LDA.w $7A98,x
	BNE.b CODE_06BCC5
	SEP.b #$20
	LDA.b #$05
	STA.w $7A98,x
	LDY.b $76,x
	LDA.w DATA_06BC96,y
	STA.w $7402,x
	TYA
	INC
	AND.b #$03
	STA.b $76,x
	REP.b #$20
CODE_06BCC5:
	RTL

;---------------------------------------------------------------------------

CODE_06BCC6:
	TYX
	RTS

;---------------------------------------------------------------------------

YI_NorSpr061_BabyMario_Init:
;$06BCC8
	LDY.b #$C0
	STY.w $7863
	RTL

;---------------------------------------------------------------------------

DATA_06BCCE:
	dw CODE_06C32B
	dw CODE_06C383
	dw CODE_06BCC6
	dw CODE_06C48E
	dw CODE_06BCC6
	dw CODE_06C4BD
	dw CODE_06C591
	dw CODE_06C6D1
	dw CODE_06C4C4
	dw CODE_06C61F
	dw CODE_06C4C4
	dw CODE_06C6EC
	dw CODE_06C812
	dw CODE_06C4C4
	dw CODE_06C61F

YI_NorSpr061_BabyMario_Main:
;$06BCEC
	LDY.b #$06
	LDA.w $7040
	AND.w #$E000
	BEQ.b CODE_06BCF8
	LDY.b #$0C
CODE_06BCF8:
	STY.w $7BB6
	STY.w $7BB8
	LDY.w $0B59
	BEQ.b CODE_06BD2E
	LDA.w #$0006
	CLC
	ADC.w $6120
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16
	CMP.b $00
	BCS.b CODE_06BD2E
	LDA.w #$0006
	CLC
	ADC.w $6122
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C18
	CMP.b $00
	BCS.b CODE_06BD2E
	LDY.b #$FF
	STY.w $7D36
CODE_06BD2E:
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_06BD39
	JMP.w CODE_06CA2D

CODE_06BD39:
	JSR.w CODE_06BD81
	LDA.w $7860
	ORA.w $0DB6
	STA.w $7860
	LDY.w $0B57
	BEQ.b CODE_06BD50
	LDA.w #$0030
	TSB.w $7042
CODE_06BD50:
	JSR.w CODE_06C281
	JSR.w CODE_06BFDC
	LDA.b $76
	ASL
	TAX
	JSR.w (DATA_06BCCE,x)
	LDX.b $12
	JSR.w CODE_06C1EF
	JSR.w CODE_06C2FA
	JSR.w CODE_06C26A
	LDA.w $61B2
	AND.w #$C000
	BEQ.b CODE_06BD75
	LDY.b #$FF
	STY.w $7862
CODE_06BD75:
	STZ.w $0DB6
	RTL

DATA_06BD79:
	dw $0008,$0004,$0002,$0001

CODE_06BD81:
	LDY.w $61CC
	BNE.b CODE_06BDCD
	LDY.b #$00
	LDA.w $70E2
	CMP.w $7E18
	BPL.b CODE_06BD95
	LDA.w $7E18
	BRA.b CODE_06BDA7

CODE_06BD95:
	SEC
	SBC.w #$00F0
	CMP.w $7E1A
	BMI.b CODE_06BDCE
	INY
	INY
	LDA.w $7E1A
	CLC
	ADC.w #$00EF
CODE_06BDA7:
	STA.w $70E2
	LDA.w DATA_06BD79,y
	TSB.w $7860
	LDA.w $75E0
	EOR.w #$FFFF
	INC
	STA.w $75E0
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w $7400
	EOR.w #$0002
	STA.w $7400
CODE_06BDCD:
	RTS

CODE_06BDCE:
	LDA.w $0C1C
	BEQ.b CODE_06BDCD
	LDY.b $76
	CPY.b #$01
	BEQ.b CODE_06BDCD
	LDA.w $7040
	AND.w #$E000
	BEQ.b CODE_06BDCD
	LDY.b #$00
	LDA.w $7680
	SEC
	SBC.w #$0008
	BMI.b CODE_06BDFF
	SEC
	SBC.w #$00E0
	BMI.b CODE_06BE29
	STA.b $00
	INY
	INY
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$00E7
	BRA.b CODE_06BE08

CODE_06BDFF:
	STA.b $00
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0008
CODE_06BE08:
	STA.w $70E2
	LDA.b $00
	EOR.w $75E0
	BMI.b CODE_06BE22
	LDA.w DATA_06BD79,y
	TSB.w $7860
	LDA.w $75E0
	EOR.w #$FFFF
	INC
	STA.w $75E0
CODE_06BE22:
	LDA.w $75E0
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_06BE29:
	LDY.b #$04
	LDA.w $7682
	SEC
	SBC.w #$0008
	BMI.b CODE_06BE47
	SEC
	SBC.w #$00C0
	BMI.b CODE_06BE71
	STA.b $00
	INY
	INY
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$00C7
	BRA.b CODE_06BE50

CODE_06BE47:
	STA.b $00
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0008
CODE_06BE50:
	STA.w $7182
	LDA.b $00
	EOR.w $75E2
	BMI.b CODE_06BE6A
	LDA.w DATA_06BD79,y
	TSB.w $7860
	LDA.w $75E2
	EOR.w #$FFFF
	INC
	STA.w $75E2
CODE_06BE6A:
	LDA.w $75E2
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
CODE_06BE71:
	RTS

CODE_06BE72:
	LDA.w $7040
	AND.w #$E000
	BEQ.b CODE_06BE8A
	STZ.w $7540
	STZ.w $7542
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDY.b #$09
	BRA.b CODE_06BE8F

CODE_06BE8A:
	JSR.w CODE_06BF1E
	LDY.b #$08
CODE_06BE8F:
	STY.b $76
	LDA.w #$6040
	STA.w $6FA2
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	ASL
	STA.w $74A2
	STX.b $18
	LDA.w $61B2
	ORA.w #$4000
	STA.w $61B2
	STZ.w $0D9C
	LDA.w #!Define_YI_SoundID3D_MarioKidnapped
	JSL.l CODE_0085D2
	RTL

CODE_06BEBA:
	LDA.w #!Define_YI_SoundID3D_MarioKidnapped
	JSL.l CODE_0085D2
CODE_06BEC1:
	JSR.w CODE_06BF1E
	LDA.w #$0020
	STA.w $7542
	LDA.w #$0008
	STA.w $7540
	STZ.w $75E2
	STZ.w $75E0
	LDY.b #$0A
	STY.b $76
CODE_06BEDA:
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0030
	CLC
	ADC.w $609C
	CLC
	ADC.w #$0030
	CMP.w #$8000
	ROR
	STA.w $0DB2
	RTL

CODE_06BEF1:
	JSR.w CODE_06BF1E
	LDA.w #$0020
	STA.w $7542
	LDA.w #$0008
	STA.w $7540
	STZ.w $75E2
	STZ.w $75E0
	LDY.b #$0D
	STY.b $76
	LDA.w #!Define_YI_SoundID3D_MarioKidnapped
	JSL.l CODE_0085D2
	RTL

CODE_06BF12:
	JSL.l CODE_06C114
	JSL.l CODE_06BF73
	JSR.w CODE_06C070
	RTL

CODE_06BF1E:
	LDA.w #$001B
	STA.w $7402
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.w $7540
	STZ.w $7542
	LDA.w #$F620
	STA.w $6FA0
	LDA.w #$604F
	STA.w $6FA2
	LDA.w #$3001
	STA.w $7040
	LDA.w $61B2
	BPL.b CODE_06BF5F
	AND.w #$7FFF
	STA.w $61B2
	LDA.w #$0040
	STA.w $7AF8
	LDA.w #$FFFF
	STA.w $7E48
	LDA.w #$0000
	STA.w $0D92
CODE_06BF5F:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	STZ.b $16
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	STZ.w $7860
	LDY.b #$00
	STY.w $7862
	RTS

CODE_06BF73:
	LDA.w $7040
	AND.w #$E000
	BEQ.b CODE_06BFDB
	LDA.w #$000D
	STA.w $7402
	LDA.w #$0040
	STA.w $7542
	LDA.w #$0400
	STA.w $75E2
	STZ.w $7540
	LDA.w #$604F
	STA.w $6FA2
	LDA.w #$1801
	STA.w $7040
	STZ.w $7AF8
	LDY.b #$00
	STY.w $7862
CODE_06BFA4:
	LDA.w #!Define_YI_AmbSpr1E1
	JSL.l CODE_008B21
	LDA.w $70E2
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w $7182
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$000A
	STA.w $73C2,y
	STA.w $7E4E,y
	LDA.w #$000C
	STA.w $7E4C,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
CODE_06BFDB:
	RTL

CODE_06BFDC:
	LDA.w $0B59
	BEQ.b CODE_06BFE9
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$000A
	BEQ.b CODE_06BFEC
CODE_06BFE9:
	JSR.w CODE_06C9E1
CODE_06BFEC:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$000A
	BEQ.b CODE_06C065
	LDY.w $0D9A
	BEQ.b CODE_06C00A
	JSL.l CODE_03B69D
CODE_06BFFD:
	JSL.l CODE_03B716
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0008
	BEQ.b CODE_06C028
	RTS

CODE_06C00A:
	LDY.b $76
	CPY.b #$05
	BMI.b CODE_06C020
	CPY.b #$08
	BPL.b CODE_06C020
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_06BFFD
	RTS

CODE_06C020:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0008
	BNE.b CODE_06C065
CODE_06C028:
	STA.w $0D9A
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #$8000
	TSB.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDY.b $76
	CPY.b #$08
	BMI.b CODE_06C042
	JSL.l CODE_06C114
	JSL.l CODE_06BF73
CODE_06C042:
	LDY.w $6150
	CPY.b #$04
	BNE.b CODE_06C053
	LDA.w $6154
	CMP.w #$FFF0
	BMI.b CODE_06C065
	BRA.b CODE_06C05F

CODE_06C053:
	LDA.w $6152
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_06C065
CODE_06C05F:
	STZ.w $6168
	JSR.w CODE_06C070
CODE_06C065:
	PLA
	STA.b $00
	JSL.l CODE_03AF23
	LDA.b $00
	PHA
	RTS

CODE_06C070:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDY.b #$00
	STY.w $7862
	LDA.w #$0040
	STA.w $7542
	LDY.b #$01
	STY.b $76
	STZ.w $0D9C
	LDY.w $0B57
	BNE.b CODE_06C099
	INC.w $0D9A
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_06C099:
	RTS

CODE_06C09A:
	LDA.w #$0400
	STA.w $75E2
	LDA.w #$0040
	STA.w $7542
	LDY.b #$0A
	LDA.w $7040
	AND.w #$E000
	BEQ.b CODE_06C0CF
	INY
	BRA.b CODE_06C0CF

CODE_06C0B3:
	LDA.b $76
	SEC
	SBC.w #$000D
	BRA.b CODE_06C0CB

CODE_06C0BB:
	LDA.b $76
	CMP.w #$0008
	BEQ.b CODE_06C0C7
	CMP.w #$0009
	BNE.b CODE_06C0FD
CODE_06C0C7:
	SEC
	SBC.w #$0008
CODE_06C0CB:
	CLC
	ADC.w #$000A
CODE_06C0CF:
	STA.b $76
	CMP.w #$000B
	BNE.b CODE_06C0FD
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$0002
	STA.w $7540
	ASL
	STA.w $7542
	LDA.w #$FF00
	STA.w $75E2
	LDX.w $7400
	LDA.l DATA_06C4B9,x
	STA.w $75E0
	LDX.b $12
	STZ.w $7AF6
	STZ.b $16
CODE_06C0FD:
	STZ.b $18
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w $61B2
	AND.w #$BFFF
	STA.w $61B2
	LDA.w #$604F
	STA.w $6FA2
	JMP.w CODE_06BEDA

CODE_06C114:
	LDY.b $18
	BNE.b CODE_06C119
	RTL

CODE_06C119:
	JSL.l CODE_06C0BB
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0D9_FishinLakitu
	BNE.b CODE_06C12A
	LDA.w $100F
	BNE.b CODE_06C136
CODE_06C12A:
	LDA.w $70E2,y
	STA.w $70E2
	LDA.w $7182,y
	STA.w $7182
CODE_06C136:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr058_GreenToady
	BEQ.b CODE_06C16E
	CMP.w #!Define_YI_NorSpr05C_PinkToady
	BEQ.b CODE_06C173
	CMP.w #!Define_YI_NorSpr184_Bumpty
	BEQ.b CODE_06C16D
	CMP.w #!Define_YI_NorSpr0D9_FishinLakitu
	BEQ.b CODE_06C1B4
	CMP.w #!Define_YI_NorSpr119_Spooky
	BEQ.b CODE_06C16D
	CMP.w #!Define_YI_NorSpr017_FrogPirate
	BNE.b CODE_06C15A
	JMP.w CODE_06C1DF

CODE_06C15A:
	CMP.w #!Define_YI_NorSpr1A5_RunAwayMonkey
	BCC.b CODE_06C189
	CMP.w #!Define_YI_NorSpr1AA_HotLips
	BCS.b CODE_06C189
	TYX
	STZ.b $78,x
	JSL.l CODE_02B2BB
	LDX.b $12
CODE_06C16D:
	RTL

CODE_06C16E:
	LDA.w #$0000
	BRA.b CODE_06C176

CODE_06C173:
	LDA.w #$0005
CODE_06C176:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7AF8,y
	LDA.w #$0000
	STA.w $7A38,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	RTL

CODE_06C189:
	SEP.b #$20
	LDA.b #$12
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	REP.b #$20
	LDA.w #$000A
	STA.w $7A36,y
	LDA.w #$0012
	STA.w $7402,y
	LDA.w #$0040
	STA.w $7A98,y
	LDA.w #$0000
	STA.w $7A38,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w $7540,y
	RTL

CODE_06C1B4:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0100
	STA.w $75E2,y
	LDA.w #$0008
	STA.w $7542,y
	LDA.w #$0000
	STA.w $7A38,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STA.w $7402,y
	LDA.w #$0060
	STA.w $7AF8,y
	LDA.w #$0200
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	RTL

CODE_06C1DF:
	SEP.b #$20
	LDA.b #$00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	REP.b #$20
	LDA.w #$0080
	STA.w $7AF8,y
	RTL

CODE_06C1EF:
	LDA.w $0D94
	ORA.w $614A
	ORA.w $0D9C
	BEQ.b CODE_06C1FB
CODE_06C1FA:
	RTS

CODE_06C1FB:
	LDY.w $7D36
	BPL.b CODE_06C1FA
	LDA.w $61D6
	CMP.w #$0050
	BPL.b CODE_06C1FA
	LDY.b $76
	CPY.b #$04
	BMI.b CODE_06C212
	CPY.b #$08
	BMI.b CODE_06C1FA
CODE_06C212:
	LDA.w $7AF8
	BEQ.b CODE_06C25F
	CMP.w #$0020
	BCS.b CODE_06C1FA
	LDY.b $18
	BEQ.b CODE_06C1FA
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr020_Bandit
	BEQ.b CODE_06C237
	CMP.w #!Define_YI_NorSpr0A3_LeftHidingBandit
	BEQ.b CODE_06C237
	CMP.w #!Define_YI_NorSpr0A4_RightHidingBandit
	BEQ.b CODE_06C237
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BNE.b CODE_06C25F
CODE_06C237:
	SEP.b #$20
	LDA.b #$18
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	REP.b #$20
	LDA.w #$0017
	STA.w $7402,y
	LDA.w #$0007
	STA.w $7A36,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w #$0020
	STA.w $7AF8
	RTS

CODE_06C25F:
	JSL.l CODE_06C114
	JSL.l CODE_06BF73
	JMP.w CODE_06C070

CODE_06C26A:
	LDA.w $6FA2
	AND.w #$9FFF
	LDY.w $0CC8
	BNE.b CODE_06C27A
	ORA.w #$6000
	BRA.b CODE_06C27D

CODE_06C27A:
	ORA.w #$4000
CODE_06C27D:
	STA.w $6FA2
	RTS

CODE_06C281:
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_StarTimerThatSpawnsToadiesThreshold-$01
	BPL.b CODE_06C2B4
	JSR.w CODE_06C2B5
	BPL.b CODE_06C2B1
	LDA.w $61B2
	BIT.w #$4000
	BEQ.b CODE_06C2A2
	LDX.b $18
	JSL.l CODE_03A31E
	LDX.b $12
	JSL.l CODE_06C114
CODE_06C2A2:
	LDA.w #$FFFF
	STA.w $7AF8
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.w $7542
CODE_06C2B1:
	JSR.w CODE_06C876
CODE_06C2B4:
	RTS

CODE_06C2B5:
	LDA.w #$0800
	CMP.w $7182
	BMI.b CODE_06C2F5
	LDA.w $7680,x
	CLC
	ADC.w #$0010
	CMP.w #$0120
	BCC.b CODE_06C2F6
	LDA.w $7682,x
	CLC
	ADC.w #$0010
	CMP.w #$0120
	BCC.b CODE_06C2F6
	PHX
	REP.b #$10
	LDA.w $7CD8
	AND.w #$FF00
	LSR
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7CD6
	AND.w #$FF00
	XBA
	ORA.b $00
	TAX
	LDA.w $6CAA,x
	SEP.b #$10
	PLX
	TAY
CODE_06C2F5:
	RTS

CODE_06C2F6:
	LDA.w #$0000
	RTS

CODE_06C2FA:
	LDY.w $0B59
	BEQ.b CODE_06C326
	LDY.b $76
	CPY.b #$01
	BEQ.b CODE_06C326
	CPY.b #$02
	BEQ.b CODE_06C326
	LDA.w $7040
	AND.w #$E000
	BEQ.b CODE_06C326
	LDY.w $7402
	CPY.b #$1F
	BMI.b CODE_06C326
	JSL.l CODE_06C114
	LDA.w #$001F
	TRB.w $6FA2
	LDY.b #$0C
	STY.b $76,x
CODE_06C326:
	RTS

DATA_06C327:
	db $15,$16,$15,$17

CODE_06C32B:
	LDA.w $7860
	AND.w #$0001
	BNE.b CODE_06C33D
	LDY.w $7862
	BEQ.b CODE_06C352
	LDY.w $7223
	BMI.b CODE_06C37E
CODE_06C33D:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	PHA
	JSL.l CODE_06BEC1
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	RTS

CODE_06C352:
	LDY.w $7223
	BMI.b CODE_06C37E
	LDA.w $0B57
	BNE.b CODE_06C364
	LDA.w $0DB2
	CMP.w $7182
	BMI.b CODE_06C33D
CODE_06C364:
	LDY.w $7A98
	BNE.b CODE_06C37E
	LDY.b #$08
	STY.w $7A98
	LDA.b $16
	DEC
	AND.w #$0003
	TAY
	STY.b $16
	LDA.w DATA_06C327,y
	TAY
	STY.w $7402
CODE_06C37E:
	RTS

DATA_06C37F:
	dw $0100,$FF00

CODE_06C383:
	LDY.w $0B57
	BEQ.b CODE_06C38B
	JMP.w CODE_06C414

CODE_06C38B:
	SEP.b #$20
	LDA.b #$04
	STA.w $74A2
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0008
	BNE.b CODE_06C3AA
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	STZ.w $6168
	LDY.b #$00
	STY.w $7862
CODE_06C3AA:
	LDY.w $0D9C
	BNE.b CODE_06C400
	LDA.w $7C16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$F800
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7C18
	BMI.b CODE_06C3E4
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$F800
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_06C3E4:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.w $7860
	LDY.b #$0D
	STY.w $7402
	LDA.w #$6040
	STA.w $6FA2
	INC.w $0D9C
	RTS

CODE_06C400:
	LDY.w $7223
	BMI.b CODE_06C463
	LDA.w $7C18
	CMP.w #$0008
	BCS.b CODE_06C453
	LDA.w #!Define_YI_SoundID43_MountYoshi
	JSL.l CODE_0085D2
CODE_06C414:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	STZ.w $7A36
	STZ.w $7A38
	STZ.b $16
	STZ.b $76
	STZ.b $18
	LDA.w #$604F
	STA.w $6FA2
	LDY.b #$00
	STY.w $7862
	LDA.w $61B2
	AND.w #$0FFF
	ORA.w #$8000
	STA.w $61B2
	STZ.w $0D9C
	STZ.w $0D9A
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDX.b $12
	PLA
	RTL

CODE_06C453:
	LDA.w $7860
	AND.w #$0001
	BEQ.b CODE_06C463
	LDA.w #$0006
	STA.b $16
	STZ.w $0D9C
CODE_06C463:
	RTS

DATA_06C464:
	db $24,$25,$26,$27,$23,$22,$21,$20,$22,$23,$27,$26,$25,$24,$20,$21
	db $22,$23,$22,$21,$20

DATA_06C479:
	db $20,$04,$04,$20,$20,$04,$04,$20,$04,$20,$20,$04,$04,$20,$20,$04
	db $04,$20,$04,$04,$20

CODE_06C48E:
	LDY.w $7A98
	BNE.b CODE_06C4AE
	DEC.b $16
	BPL.b CODE_06C49C
	LDA.w #$0014
	STA.b $16
CODE_06C49C:
	LDY.b $16
	LDA.w DATA_06C464,y
	AND.w #$00FF
	STA.w $7402
	LDA.w DATA_06C479,y
	TAY
	STY.w $7A98
CODE_06C4AE:
	RTS

DATA_06C4AF:
	db $1B,$1C,$1D,$1F,$1E,$1F,$1D,$1F,$1E,$1F

DATA_06C4B9:
	dw $FF80,$0080

CODE_06C4BD:
	LDY.w $614E
	CPY.b #$03
	BNE.b CODE_06C51B
CODE_06C4C4:
	LDY.w $7A98
	BNE.b CODE_06C51B
	LDY.b #$02
	STY.w $7A98
	INC.b $16
	LDY.b $16
	CPY.b #$09
	BMI.b CODE_06C514
	PHY
	LDY.b $76
	CPY.b #$08
	BEQ.b CODE_06C50F
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$FF80
	STA.w $75E2
	STZ.w $7542
	LDA.w #$0002
	STA.w $7542
	CPY.b #$0A
	BNE.b CODE_06C50F
	STA.w $7540
	ASL
	STA.w $7542
	LDA.w #$FF00
	STA.w $75E2
	LDY.w $7400
	LDA.w DATA_06C4B9,y
	STA.w $75E0
	STZ.w $7AF6
CODE_06C50F:
	PLY
	STZ.b $16
	INC.b $76
CODE_06C514:
	LDA.w DATA_06C4AF-$01,y
	TAY
	STY.w $7402
CODE_06C51B:
	LDY.b $76
	CPY.b #$08
	BEQ.b CODE_06C525
	CPY.b #$09
	BNE.b CODE_06C528
CODE_06C525:
	JSR.w CODE_06C529
CODE_06C528:
	RTS

CODE_06C529:
	LDY.b $18
	BEQ.b CODE_06C574
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0002
	BNE.b CODE_06C53A
	JSL.l CODE_06C0BB
	RTS

CODE_06C53A:
	CMP.w #$0010
	BNE.b CODE_06C574
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr1A2_HealthStar
	BEQ.b CODE_06C574
	CMP.w #!Define_YI_NorSpr115_Coin
	BEQ.b CODE_06C574
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0D9_FishinLakitu
	BEQ.b CODE_06C578
	LDA.w $70E2,y
	SEC
	SBC.w $70E2
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_06C574
	LDA.w $7182,y
	SEC
	SBC.w $7182
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCC.b CODE_06C578
CODE_06C574:
	JSL.l CODE_06C114
CODE_06C578:
	RTS

DATA_06C579:
	dw $201F,$211F,$2223,$2423

DATA_06C581:
	dw $0804,$0804,$1008,$1008,$1820,$0A10,$00E0,$0020

CODE_06C591:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_06C5A2
	JSL.l CODE_03B69D
CODE_06C5A2:
	LDA.w $0C8A
	ORA.w $614E
	BNE.b CODE_06C5CE
	JSL.l CODE_06BF73
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDA.w $61B2
	AND.w #$0FFF
	ORA.w #$8000
	STA.w $61B2
	TXA
	STA.w $7E48
	LDA.w #$FFFF
	STA.w $0D92
	STZ.b $76
	PLA
	RTL

CODE_06C5CE:
	LDA.w $7860
	AND.w #$0003
	BEQ.b CODE_06C607
	PHA
	STZ.w $7860
	LDA.w $7182
	SEC
	SBC.w $72C2
	STA.w $7182
	PLA
	AND.w #$0002
	DEC
	EOR.w $75E2
	BMI.b CODE_06C5F3
	LDA.w $75E2
	BRA.b CODE_06C5FA

CODE_06C5F3:
	LDA.w $75E2
	EOR.w #$FFFF
	INC
CODE_06C5FA:
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BRA.b CODE_06C60F

CODE_06C607:
	LDA.w $75E2
	CMP.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BNE.b CODE_06C61F
CODE_06C60F:
	LDA.w #$0080
	STA.w $7A96
	LDA.w $75E2
	EOR.w #$FFFF
	INC
	STA.w $75E2
CODE_06C61F:
	LDY.w $7A98
	BEQ.b CODE_06C627
	JMP.w CODE_06C6CE

CODE_06C627:
	LDA.b $16
	INC
	AND.w #$0003
	STA.b $16
	LDY.b $76
	CPY.b #$06
	BEQ.b CODE_06C639
	CLC
	ADC.w #$0004
CODE_06C639:
	TAY
	LDA.w DATA_06C581,y
	AND.w #$00FF
	STA.w $7A98
	LDA.w DATA_06C579,y
	TAY
	STY.w $7402
	CPY.b #$24
	BNE.b CODE_06C657
	LDA.w #!Define_YI_SoundID44_MarioCrying
	JSL.l CODE_0085D2
	BRA.b CODE_06C6CE

CODE_06C657:
	CPY.b #$22
	BNE.b CODE_06C6CE
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #!Define_YI_Level_MaxRegenStarTimerThreshold+$01
	BMI.b CODE_06C6A7
	LDA.b $10
	AND.w #$0003
	ASL
	ASL
	INC
	LDY.w $0DBA
	BNE.b CODE_06C674
	EOR.w #$FFFF
	INC
CODE_06C674:
	CLC
	ADC.w $0DB8
	STA.w $0DB8
	CMP.w #$000C
	BPL.b CODE_06C68A
	SEC
	SBC.w #$0018
	EOR.w #$FFFF
	INC
	BRA.b CODE_06C696

CODE_06C68A:
	CMP.w #$0029
	BMI.b CODE_06C6A2
	LDA.w #$0050
	SEC
	SBC.w $0DB8
CODE_06C696:
	STA.w $0DB8
	LDA.w $0DBA
	EOR.w #$0001
	STA.w $0DBA
CODE_06C6A2:
	LDA.w $0DB8
	BRA.b CODE_06C6CB

CODE_06C6A7:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $7A98
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_06C6CB:
	STA.w $7A98
CODE_06C6CE:
	JMP.w CODE_06C51B

CODE_06C6D1:
	LDY.w $7223
	BMI.b CODE_06C6E7
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w #$0020
	STA.w $61F4
	STZ.w $0C88
	DEC.b $76
CODE_06C6E7:
	RTS

DATA_06C6E8:
	dw $00F0,$00D0

CODE_06C6EC:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	BMI.b CODE_06C6F5
	INY
	INY
CODE_06C6F5:
	STY.w $7400
	LDY.w $7AF6
	BEQ.b CODE_06C72D
	INC.w $7AF6
	LDA.w $0DB2
	CMP.w $7182
	BMI.b CODE_06C715
	LDA.w $7860
	AND.w #$0001
	BNE.b CODE_06C715
	LDY.w $7862
	BEQ.b CODE_06C72A
CODE_06C715:
	LDA.w #$FF40
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$0080
	STA.w $75E2
	LDA.w #$0002
	STA.w $7542
	STZ.w $7AF6
CODE_06C72A:
	JMP.w CODE_06C61F

CODE_06C72D:
	LDA.w #$0004
	LDY.w $7683
	BEQ.b CODE_06C741
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	AND.w #$FFF0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$0010
CODE_06C741:
	STA.w $7542
	LDY.w $7D36
	DEY
	BMI.b CODE_06C784
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_06C784
	LDA.w $7D38,y
	BEQ.b CODE_06C784
	TYX
	JSL.l CODE_03B25B
	LDY.b #$02
	STY.w $7AF6
	LDA.w #$0400
	STA.w $75E2
	LDA.w #$0040
	STA.w $7542
	STZ.w $75E0
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0030
	CMP.w #$07E0
	BMI.b CODE_06C77F
	LDA.w #$07E0
CODE_06C77F:
	STA.w $0DB2
	BRA.b CODE_06C72A

CODE_06C784:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	BPL.b CODE_06C78D
	INY
	INY
CODE_06C78D:
	LDA.w DATA_06C6E8,y
	LDY.b #$00
	CMP.w $7680
	BMI.b CODE_06C799
	INY
	INY
CODE_06C799:
	LDA.w DATA_06C4B9,y
	STA.w $75E0
	LDY.w $7862
	BEQ.b CODE_06C7AB
	LDY.w $75E3
	BMI.b CODE_06C80F
	BRA.b CODE_06C7CF

CODE_06C7AB:
	LDA.w $7860
	AND.w #$0003
	BEQ.b CODE_06C7ED
	STZ.w $7860
	AND.w #$0002
	DEC
	EOR.w $75E2
	BMI.b CODE_06C7CF
	LDA.w $75E2
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BRA.b CODE_06C80F

CODE_06C7CF:
	LDA.w $7182
	SEC
	SBC.w $72C2
	STA.w $7182
	LDA.w $75E2
	EOR.w #$FFFF
	INC
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BRA.b CODE_06C805

CODE_06C7ED:
	LDA.w $75E2
	CMP.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BNE.b CODE_06C80F
	LDA.w $0DB2
	SEC
	SBC.w $7182
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BPL.b CODE_06C80F
	JSL.l CODE_06BEDA
CODE_06C805:
	LDA.w $75E2
	EOR.w #$FFFF
	INC
	STA.w $75E2
CODE_06C80F:
	JMP.w CODE_06C61F

CODE_06C812:
	LDA.w #$0002
	STA.w $7400
	LDA.w $7C16
	PHP
	BPL.b CODE_06C822
	EOR.w #$FFFF
	INC
CODE_06C822:
	LSR
	CMP.w #$0018
	BMI.b CODE_06C82B
	LDA.w #$0018
CODE_06C82B:
	CLC
	ADC.w #$0018
	STA.w $7540
	ASL
	ASL
	ASL
	ASL
	PLP
	BMI.b CODE_06C840
	EOR.w #$FFFF
	INC
	STZ.w $7400
CODE_06C840:
	STA.w $75E0
	LDA.w $7C18
	PHP
	BPL.b CODE_06C84D
	EOR.w #$FFFF
	INC
CODE_06C84D:
	LSR
	CMP.w #$0018
	BMI.b CODE_06C856
	LDA.w #$0018
CODE_06C856:
	CLC
	ADC.w #$0018
	STA.w $7542
	ASL
	ASL
	ASL
	ASL
	PLP
	BMI.b CODE_06C868
	EOR.w #$FFFF
	INC
CODE_06C868:
	STA.w $75E2
	JMP.w CODE_06C61F

DATA_06C86E:
	dw $FFC0,$FFF0,$0000,$0020

CODE_06C876:
	LDX.b $12
	LDA.w $0E35
	BEQ.b CODE_06C886
	LDA.w $03A1
	ORA.w $03A3
	BEQ.b CODE_06C886
CODE_06C885:
	RTS

CODE_06C886:
	LDA.w $0E33
	BNE.b CODE_06C885
	INC.w $0E33
	STZ.w $61CC
	STZ.w $0E2F
	STZ.w $0E2D
	LDA.w #$0004
	STA.w $0E31
	LDA.w $6094
	STA.b $0A
	LDA.w $609C
	STA.b $0C
	STZ.b $0E
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_06C8BF
	LDA.w $609A
	STA.b $0A
	LDA.w $60A2
	STA.b $0C
	LDY.b #$06
	STY.b $0E
CODE_06C8BF:
	LDY.b #$08
	LDA.w #!Define_YI_NorSpr091_4RedToadies
	JSL.l CODE_03A366
	LDA.b $0A
	CLC
	ADC.w #$0080
	STA.w $70E2,y
	LDA.b $0C
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.w $74A1,y
	ORA.b $0E
	STA.w $74A1,y
	LDY.b #$00
	LDX.b #$0C
CODE_06C8E6:
	STZ.w $0E37,x
	STZ.w $0E39,x
	STZ.w $0E49,x
	STZ.w $0E4B,x
	LDA.w DATA_06C86E,y
	STA.w $0E38,x
	STZ.w $0E9B,x
	STZ.w $0EC9,x
	STZ.w $0E69,x
	STZ.w $0E6B,x
	STZ.w $0E89,x
	STZ.w $0E8B,x
	STZ.w $0E79,x
	STZ.w $0E7B,x
	STZ.w $0EAB,x
	STZ.w $0EB9,x
	STZ.w $0EBB,x
	STZ.w $0EA9,x
	STZ.w $0E59,x
	STZ.w $0E5B,x
	STZ.w $0E99,x
	INY
	INY
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_06C8E6
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_06C930:
	db $00,$01,$00,$02,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$04
	db $03,$05,$06,$07,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F,$10,$10,$11
	db $06,$12,$12,$06,$03,$13,$13,$03,$14,$14,$15,$10,$16,$17,$17,$16
	db $0F,$18,$19,$08,$10

DATA_06C965:
	dw FXDATA_520000+$5C00,FXDATA_520000+$5C40,FXDATA_520000+$5C00,FXDATA_520000+$5CC0,FXDATA_520000+$5C00,FXDATA_520000+$5D00,FXDATA_520000+$5C00,FXDATA_520000+$5C80
	dw FXDATA_520000+$58C0,FXDATA_520000+$5C80,FXDATA_520000+$5900,FXDATA_520000+$5C80,FXDATA_520000+$5800,FXDATA_520000+$5C80,FXDATA_520000+$5000,FXDATA_520000+$5040
	dw FXDATA_520000+$5480,FXDATA_520000+$54C0,FXDATA_520000+$5500,FXDATA_520000+$5540,FXDATA_520000+$5580,FXDATA_520000+$55C0,FXDATA_520000+$4800,FXDATA_520000+$4C00
	dw FXDATA_520000+$4840,FXDATA_520000+$4C40,FXDATA_520000+$4880,FXDATA_520000+$4C80,FXDATA_520000+$5900,FXDATA_520000+$5D80,FXDATA_520000+$5C00,FXDATA_520000+$5D80
	dw FXDATA_520000+$58C0,FXDATA_520000+$5D80,FXDATA_520000+$5080,FXDATA_520000+$50C0,FXDATA_520000+$4900,FXDATA_520000+$5C80

UNK_06C9B1:
	db $00

DATA_06C9B2:
	db $4D,$80,$5C,$00,$5C,$80,$59,$C0,$5D,$C0,$59,$00,$58,$80,$5D,$00
	db $49,$80,$5D,$80,$49,$80,$4D,$C0,$48,$C0,$4C,$03,$03,$03,$03,$03
	db $03,$03,$0D,$0C,$0B

CODE_06C9D7:
	PHB
	PHK
	PLB
	JSR.w CODE_06C9E1
	PLB
	LDX.b $12
	RTL

CODE_06C9E1:
	LDA.w $7402
	CMP.b $78
	BEQ.b CODE_06CA22
	STA.b $78
	TAY
	LDA.w $7040
	AND.w #$F800
	CMP.w #$3000
	BNE.b CODE_06C9FB
	LDA.w DATA_06C9B2,y
	BRA.b CODE_06C9FE

CODE_06C9FB:
	LDA.w DATA_06C930,y
CODE_06C9FE:
	AND.w #$00FF
	ASL
	ASL
	TAY
	PHX
	LDX.b #$00
CODE_06CA07:
	LDA.w DATA_06C965,y
	STA.w $0B87,x
	CLC
	ADC.w #$0200
	STA.w $0B89,x
	INY
	INY
	INX
	INX
	INX
	INX
	CPX.b #$08
	BMI.b CODE_06CA07
	INC.w $0B85
	PLX
CODE_06CA22:
	RTS

;---------------------------------------------------------------------------

DATA_06CA23:
	dw CODE_06CDAB
	dw CODE_06CDEF
	dw CODE_06CE2F
	dw CODE_06CE2E
	dw CODE_06CEFB

CODE_06CA2D:
	LDA.w $03A1
	ORA.w $03A3
	BNE.b CODE_06CA38
	JSR.w CODE_06C876
CODE_06CA38:
	JSR.w CODE_06CB27
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$000A
	BNE.b CODE_06CA4A
	JSR.w CODE_06C9E1
	JSL.l CODE_03AF23
CODE_06CA4A:
	JSR.w CODE_06CCF8
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_06CA60
	JSL.l CODE_03B716
	JSL.l CODE_03B69D
CODE_06CA60:
	LDA.w $7680
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	CLC
	ADC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $7C16
	LDA.w $7682
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611E
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $7C18
	JSR.w CODE_06CAA4
	LDA.b $76
	ASL
	TAX
	JSR.w (DATA_06CA23,x)
	JSR.w CODE_06CB05
	LDY.b $76
	CPY.b #$03
	BEQ.b CODE_06CAA1
	CPY.b #$02
	BEQ.b CODE_06CAA1
	JSR.w CODE_06CC9E
	JSR.w CODE_06CB15
CODE_06CAA1:
	LDX.b $12
	RTL

CODE_06CAA4:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0008
	BNE.b CODE_06CB04
	LDY.b $76
	CPY.b #$02
	BEQ.b CODE_06CB04
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STA.w $0D9A
	LDA.w #$8000
	TSB.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDY.w $6150
	CPY.b #$04
	BNE.b CODE_06CAD2
	LDA.w $6154
	CMP.w #$FFF0
	BMI.b CODE_06CB04
	BRA.b CODE_06CADE

CODE_06CAD2:
	LDA.w $6152
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_06CB04
CODE_06CADE:
	STZ.w $6168
CODE_06CAE1:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDY.b #$00
	STY.w $7862
	LDY.b #$07
	STY.w $0DB4
	LDY.b #$02
	STY.b $76
	STZ.w $0D9C
	INC.w $0D9A
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_06CB04:
	RTS

CODE_06CB05:
	LDA.w $7AF8
	BNE.b CODE_06CB14
	LDY.w $7D36
	BPL.b CODE_06CB14
	LDY.w $0D9C
	BEQ.b CODE_06CAE1
CODE_06CB14:
	RTS

CODE_06CB15:
	LDY.w $0B59
	BEQ.b CODE_06CB26
	LDA.w $7040
	AND.w #$E000
	BEQ.b CODE_06CB26
	LDY.b #$04
	STY.b $76
CODE_06CB26:
	RTS

CODE_06CB27:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$000A
	BEQ.b CODE_06CB14
	LDA.w $0DB4
	CMP.w #$0007
	BPL.b CODE_06CB75
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7362
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_06CC0A>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_06CC0A
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w $7680
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7400
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08A16C>>16
	LDA.w #FXCODE_08A16C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	BRA.b CODE_06CB8B

CODE_06CB75:
	REP.b #$10
	LDY.w $7362
	LDA.w #$8000
	STA.w $6000,y
	STA.w $6008,y
	STA.w $6010,y
	STA.w $6018,y
	SEP.b #$10
CODE_06CB8B:
	LDY.w $7400
	LDA.w $7680
	CLC
	ADC.w #$FFF8
	STA.b $00
	LDA.w $7682
	SEC
	SBC.w #$0008
	STA.b $02
	LDA.w $7400
	AND.w #$FF00
	LSR
	LSR
	LSR
	ORA.w $7042
	XBA
	STA.b $06
	REP.b #$10
	LDY.w $7362
	LDA.b $00
	STA.w $6020,y
	STA.w $6030,y
	CLC
	ADC.w #$0010
	STA.w $6028,y
	STA.w $6038,y
	LDA.b $02
	STA.w $6022,y
	STA.w $602A,y
	CLC
	ADC.w #$0010
	STA.w $6032,y
	STA.w $603A,y
	LDA.b $06
	ORA.w #$0062
	STA.w $6024,y
	LDA.b $06
	ORA.w #$0064
	STA.w $602C,y
	LDA.b $06
	ORA.w #$0082
	STA.w $6034,y
	LDA.b $06
	ORA.w #$0084
	STA.w $603C,y
	LDA.w #$0202
	STA.w $6026,y
	STA.w $602E,y
	STA.w $6036,y
	STA.w $603E,y
	SEP.b #$10
	RTS

DATA_06CC0A:
	dw $0300,$0AA2,$0800,$A303,$000A,$0B00,$0AB2,$0800
	dw $B30B,$000A,$FAFA,$0A9C,$FA02,$7E06,$02CA,$0605
	dw $8A7E,$0502,$7EFA,$020A,$F5FA,$0A9C,$FB02,$7E05
	dw $02CA,$0505,$8A7E,$0602,$7EF5,$020A,$F8F8,$0A9C
	dw $F802,$7E04,$02CA,$0408,$8A7E,$0802,$7EF8,$020A
	dw $F7F9,$0A9C,$F902,$7E05,$02CA,$0507,$8A7E,$0702
	dw $7EF7,$020A,$F6FA,$0A9C,$FA02,$7E06,$02CA,$0606
	dw $8A7E,$0602,$7EF6,$020A,$F8F8,$0A9C,$F802,$7E04
	dw $02CA,$0408,$8A7E,$0802,$7EF8,$020A,$FE80,$0180
	dw $FF80,$0080

CODE_06CC9E:
	LDA.w $70E2
	SEC
	SBC.w $72C0
	STA.w $70E2
	LDA.w $7182
	SEC
	SBC.w $72C2
	STA.w $7182
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	EOR.w #$FFFF
	SEC
	ADC.w $0DAA
	BPL.b CODE_06CCC1
	LDA.w #$7FFF
CODE_06CCC1:
	CMP.w #$3800
	BPL.b CODE_06CCD3
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$3800
CODE_06CCD3:
	STA.w $0DAA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	BEQ.b CODE_06CCE5
	EOR.w #$FFFF
	SEC
	ADC.w $0DAC
	STA.w $0DAC
CODE_06CCE5:
	SEP.b #$20
	LDA.w $0DAB
	STA.b $0E
	LDA.w $0DAD
	STA.b $00
	JSL.l CODE_0FB8F0
	REP.b #$20
	RTS

CODE_06CCF8:
	LDA.w #(FXDATA_550000+$60E1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$60E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b $76
	CPY.b #$03
	BNE.b CODE_06CD0F
	STZ.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BRA.b CODE_06CD22

CODE_06CD0F:
	LDY.w $0D05
	TYA
	STA.b $00
	LDY.w $0DAD
	TYA
	CLC
	ADC.b $00
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
CODE_06CD22:
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$4620
	STA.b $00
	LDA.w #$6000
	STA.b $02
	LDA.w #$0004
	STA.b $04
	PHB
	SEP.b #$20
	LDA.b #$7E4800>>16
	PHA
	PLB
	REP.b #$30
	LDX.w $7E4800
CODE_06CD55:
	LDA.b $00
	STA.w $0000,x
	LDA.w #$0180
	STA.w $0002,x
	LDA.w #$0018
	STA.w $0004,x
	LDA.b $02
	STA.w $0005,x
	LDA.w #$0070
	STA.w $0007,x
	LDA.w #$0080
	STA.w $0008,x
	LDA.b $00
	CLC
	ADC.w #$0100
	STA.b $00
	LDA.b $02
	CLC
	ADC.w #$0200
	STA.b $02
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	TAX
	DEC.b $04
	BNE.b CODE_06CD55
	STX.w $7E4800
	SEP.b #$10
	PLB
	LDX.b $12
	RTS

DATA_06CD9D:
	db $00,$01,$02,$04,$03,$04,$02,$04,$03,$04

DATA_06CDA7:
	dw $FFC0,$0040

CODE_06CDAB:
	LDA.w $7A96
	BNE.b CODE_06CDE6
	LDY.w $7A98
	BNE.b CODE_06CDE6
	INC.b $16
	LDY.b $16
	CPY.b #$09
	BMI.b CODE_06CDDA
	LDY.w $7400
	LDA.w DATA_06CDA7,y
	STA.w $75E0
	LDA.w #$0004
	STA.w $7540
	LDA.w #$0004
	STA.w $7542
	STZ.w $75E2
	STZ.b $18
	INC.b $76
	RTS

CODE_06CDDA:
	LDA.w DATA_06CD9D-$01,y
	TAY
	STY.w $0DB4
	LDY.b #$02
	STY.w $7A98
CODE_06CDE6:
	RTS

DATA_06CDE7:
	db $04,$05,$04,$06

DATA_06CDEB:
	dw $0080,$FF80

CODE_06CDEF:
	LDY.w $7A98
	BNE.b CODE_06CE10
	LDA.b $16
	INC
	AND.w #$0003
	TAY
	STY.b $16
	AND.w #$0001
	ASL
	ASL
	CLC
	ADC.w #$0004
	STA.w $7A98
	LDA.w DATA_06CDE7,y
	TAY
	STY.w $0DB4
CODE_06CE10:
	LDY.w $7A96
	BNE.b CODE_06CE2E
	LDY.b #$60
	STY.w $7A96
	LDA.w #$0008
	STA.w $7542
	LDA.b $18
	EOR.w #$0002
	STA.b $18
	TAY
	LDA.w DATA_06CDEB,y
	STA.w $75E2
CODE_06CE2E:
	RTS

CODE_06CE2F:
	LDY.w $0D9C
	BNE.b CODE_06CE9E
	LDA.w $7C16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$F800
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7C18
	BMI.b CODE_06CE69
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$F800
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_06CE69:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.w $7540
	LDA.w #$0040
	STA.w $7542
	LDA.w #$0400
	STA.w $75E2
	STZ.w $7860
	INC.w $0D9C
	LDY.w $0DB4
	CPY.b #$07
	BPL.b CODE_06CE93
	JSL.l CODE_06BFA4
CODE_06CE93:
	LDA.w $0DAC
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STA.w $0DAC
	RTS

CODE_06CE9E:
	LDY.w $7223
	BMI.b CODE_06CE93
	LDA.w $7C18
	CMP.w #$0008
	BCS.b CODE_06CE93
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w #!Define_YI_SoundID43_MountYoshi
	JSL.l CODE_0085D2
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	STZ.w $7A36
	STZ.w $7A38
	STZ.b $16
	STZ.b $76
	STZ.b $18
	LDY.b #$00
	STY.w $7862
	LDA.w #$000D
	STA.w $7402
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror
	LDA.w #$1801
	STA.w $7040
	LDA.w $61B2
	AND.w #$0FFF
	ORA.w #$8000
	STA.w $61B2
	STZ.w $0D9C
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDX.b $12
	PLA
	RTL

DATA_06CEF7:
	dw $0200,$FE00

CODE_06CEFB:
	LDY.w $0D05
	TYA
	STA.b $00
	LDY.w $0DAD
	TYA
	CLC
	ADC.b $00
	TAY
	PHP
	LDY.b #$00
	PLP
	BPL.b CODE_06CF11
	INY
	INY
CODE_06CF11:
	LDA.w DATA_06CEF7,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	JMP.w CODE_06CDEF

YI_NorSpr061_BabyMario_RideYoshiRt:
;$06CF1A
	LDY.b #$00
	STY.w $7862
	LDA.w $0B59
	BEQ.b CODE_06CF34
	LDY.b #$FF
	LDA.w $60BE
	CMP.w #$0166
	BEQ.b CODE_06CF30
	LDY.b #$04
CODE_06CF30:
	STY.w $74A2
	RTL

CODE_06CF34:
	LDA.w $0B57
	BEQ.b CODE_06CF42
	LDA.w $60DE
	BEQ.b CODE_06CF42
	JSL.l CODE_03BD40
CODE_06CF42:
	TXA
	STA.w $7E48
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_06CF55
	JSL.l CODE_03B716
CODE_06CF55:
	JSR.w CODE_06CF66
	JSR.w CODE_06CFA5
	JSR.w CODE_06CFC4
	JSR.w CODE_06D019
	RTL

DATA_06CF62:
	dw $0003,$FFFB

CODE_06CF66:
	LDA.w $614E
	CMP.w #$0001
	BEQ.b CODE_06CF74
	LDY.w $0C8A
	BNE.b CODE_06CF74
	RTS

CODE_06CF74:
	LDY.b #$00
	STY.w $74A3
	LDY.w $60C4
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_06CF62,y
	STA.w $70E2
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$000A
	STA.w $7182
	LDA.w $7400
	EOR.w #$0002
	STA.w $7400
	INC.w $614E
	JSR.w CODE_06BF1E
	LDY.b #$05
	STY.b $76
	PLA
	RTL

CODE_06CFA5:
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState12_SmushedByWall
	BEQ.b CODE_06CFB6
	LDA.w $61D6
	SEC
	SBC.w #$009F
	BNE.b CODE_06CFC3
CODE_06CFB6:
	JSR.w CODE_06D110
	LDA.w $7182
	CLC
	ADC.w #$0004
	STA.w $7182
CODE_06CFC3:
	RTS

CODE_06CFC4:
	LDA.w #$FFFF
	LDY.w $74A2
	BMI.b CODE_06CFF2
	REP.b #$10
	LDY.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CPY.w #!Define_YI_PlayerForm0E_Skiing
	BEQ.b CODE_06CFED
	LDY.w $60BE
	CPY.w #$0166
	BEQ.b CODE_06CFED
	LDA.w #$0002
	LDY.w $0E15
	BNE.b CODE_06CFED
	LDY.w $61CE
	BNE.b CODE_06CFED
	INC
	INC
CODE_06CFED:
	STA.w $74A2
	SEP.b #$10
CODE_06CFF2:
	RTS

CODE_06CFF3:
	LDY.w $0E15
	BEQ.b CODE_06D012
	LDY.b #$1B
	STY.w $7402
	LDY.b #$12
	STY.w $7A98
	LDA.w #$0004
	STA.b $16
	LDA.w #$000C
	STA.w $7A36
CODE_06D00D:
	STZ.w $7400
	INC.b $76
CODE_06D012:
	RTS

DATA_06D013:
	dw $000D,$0010,$0012

CODE_06D019:
	LDY.w $1078
	BEQ.b CODE_06D023
	LDY.b #$02
	JMP.w CODE_06D07C

CODE_06D023:
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState06
	BNE.b CODE_06D03E
	LDA.w $6106
	AND.w #$00FF
	CMP.w #$0002
	BEQ.b CODE_06D03B
	CMP.w #$0004
	BNE.b CODE_06D03E
CODE_06D03B:
	JMP.w CODE_06D0DE

CODE_06D03E:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_06D057
	LDY.w $0E15
	BEQ.b CODE_06D056
	LDY.b #$1F
	STY.w $7402
CODE_06D056:
	RTS

CODE_06D057:
	LDA.w !RAM_YI_Level_StarTimerLo
	CMP.w #$0032
	BPL.b CODE_06D060
	RTS

CODE_06D060:
	LDY.b #$02
	LDA.w $60C0
	BEQ.b CODE_06D06C
	LDA.w $60AA
	BRA.b CODE_06D07F

CODE_06D06C:
	LDA.w $60A8
	BEQ.b CODE_06D0AD
	CLC
	ADC.w #$0270
	CMP.w #$04E0
	BCS.b CODE_06D07C
	DEY
	DEY
CODE_06D07C:
	LDA.w $60A8
CODE_06D07F:
	BPL.b CODE_06D085
	EOR.w #$FFFF
	INC
CODE_06D085:
	CLC
	ADC.w $7A36
	CMP.w #$0F00
	BMI.b CODE_06D0A9
	SEC
	SBC.w #$0F00
	PHA
	INC.b $16
	LDA.b $16
	CLC
	ADC.w DATA_06D013,y
	CMP.w DATA_06D013+$02,y
	BMI.b CODE_06D0A5
	STZ.b $16
	LDA.w DATA_06D013,y
CODE_06D0A5:
	STA.w $7402
	PLA
CODE_06D0A9:
	STA.w $7A36
	RTS

CODE_06D0AD:
	LDY.b #$0D
	LDA.w $60CE
	BEQ.b CODE_06D0CD
	LDA.w $0DAE
	INC
	INC
	STA.w $0DAE
	BPL.b CODE_06D0C4
	LDA.w #$7FFF
	STA.w $0DAE
CODE_06D0C4:
	CMP.w #$0020
	BCC.b CODE_06D104
	LDY.b #$12
	BRA.b CODE_06D104

CODE_06D0CD:
	LDA.w $0DAE
	LSR
	STA.w $0DAE
	CPX.w $0D96
	BEQ.b CODE_06D104
	LDA.w $60C2
	BEQ.b CODE_06D0FD
CODE_06D0DE:
	LDA.w $0DB0
	INC
	INC
	STA.w $0DB0
	BPL.b CODE_06D0EE
	LDA.w #$7FFF
	STA.w $0DB0
CODE_06D0EE:
	CMP.w #$0020
	BCC.b CODE_06D104
	LDY.b #$13
	CMP.w #$0024
	BMI.b CODE_06D104
	INY
	BRA.b CODE_06D104

CODE_06D0FD:
	LDA.w $0DB0
	LSR
	STA.w $0DB0
CODE_06D104:
	STY.w $7402
CODE_06D107:
	RTS

DATA_06D108:
	dw $0180,$FE80

CODE_06D10C:
	PHA
	PHA
	BRA.b CODE_06D117

CODE_06D110:
	LDX.b $12
	CPX.w $0D96
	BEQ.b CODE_06D107
CODE_06D117:
	PHX
	LDA.w $60C4
	STA.w $7400
	EOR.w #$0002
	TAX
	LDA.l DATA_06D108,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	PLX
	LDA.w $61B2
	AND.w #$7FFF
	STA.w $61B2
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDY.b #$00
	STY.w $7862
	STZ.b $16
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.b $76
	LDA.w #$F629
	STA.w $6FA0
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_06D185
	LDA.w #$0005
	STA.w $7A96
	LDA.w #$4001
	STA.w $7040
	LDA.w #$6040
	STA.w $6FA2
	STZ.w $0DB4
	LDA.w $0D04
	EOR.w #$FFFF
	INC
	AND.w #$FF00
	STA.w $0DAC
	LDA.w #$5000
	STA.w $0DAA
	LDY.b #$10
	BRA.b CODE_06D191

CODE_06D185:
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0014
	STA.w $0DB2
	LDY.b #$20
CODE_06D191:
	STY.w $7AF8
	LDA.w #$FFFF
	STA.w $7E48
	PLA
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_06D19D:
	dw $0400,$FC00

YI_NorSpr090_DanglingGhost_Init:
;$06D1A1
	LDA.w #$4000
	STA.b $18,x
	LDA.w #$2000
	STA.b $76,x
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w $611C
	BMI.b CODE_06D1B8
	LDY.b #$02
CODE_06D1B8:
	LDA.w DATA_06D19D,y
	STA.b $78,x
	STZ.w $7A36,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $7AF6,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr090_DanglingGhost_Main:
;$06D1C7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	JSR.w CODE_06D2AC
	JSR.w CODE_06D307
	JSR.w CODE_06D484
	JSR.w CODE_06D4FB
	JSL.l CODE_03AF23
	LDA.w $7680,x
	CLC
	ADC.w #$0090
	CMP.w #$0220
	BCS.b CODE_06D1F4
	LDA.w $7682,x
	CLC
	ADC.w #$00C8
	CMP.w #$019A
	BCC.b CODE_06D218
CODE_06D1F4:
	JSL.l CODE_03A31E
	LDA.b $0E
	BIT.w #$0010
	BEQ.b CODE_06D216
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
	CMP.w #$000D
	BEQ.b CODE_06D20C
	CMP.w #$000E
	BNE.b CODE_06D216
CODE_06D20C:
	JSL.l CODE_06C0B3
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
CODE_06D216:
	BRA.b CODE_06D226

CODE_06D218:
	LDA.w #$0C00
	TRB.b $0E
	JSR.w CODE_06D888
	JSR.w CODE_06D234
	JSR.w CODE_06D537
CODE_06D226:
	LDX.b $12
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDX.b $12
	RTL

DATA_06D230:
	dw $FFE0,$0000

CODE_06D234:
	LDA.w $61B2
	BMI.b CODE_06D265
	LDA.b $0E
	BIT.w #$0010
	BEQ.b CODE_06D26C
	LDA.w $7400,x
	AND.w #$0002
	TAY
	LDA.l $7049EA
	CLC
	ADC.w DATA_06D230,y
	CLC
	ADC.w $70E2,x
	STA.w $70E2
	LDA.l $7049E8
	CLC
	ADC.w #$0070
	CLC
	ADC.w $7182,x
	STA.w $7182
CODE_06D265:
	LDA.b $0E
	BIT.w #$0010
	BNE.b CODE_06D297
CODE_06D26C:
	LDA.b $0E
	AND.w #$000F
	CMP.w #$0001
	BNE.b CODE_06D2AB
	LDA.b $0E
	BIT.w #$0400
	BEQ.b CODE_06D2AB
	LDA.w $61B2
	BPL.b CODE_06D2AB
	LDA.b $0E
	PHA
	JSL.l CODE_06BEF1
	PLA
	ORA.w #$0010
	STA.b $0E
	LDA.w #!Define_YI_SoundID3D_MarioKidnapped
	JSL.l CODE_0085D2
	RTS

CODE_06D297:
	LDA.w !RAM_YI_Level_StarTimerLo
	BEQ.b CODE_06D2A1
	LDA.w $61B2
	BPL.b CODE_06D2AB
CODE_06D2A1:
	LDA.w #$0800
	TSB.b $0E
	LDA.w #$0410
	TRB.b $0E
CODE_06D2AB:
	RTS

CODE_06D2AC:
	LDA.w #$0011
	ASL
	TAY
CODE_06D2B1:
	TYA
	ASL
	TAX
	LDA.w DATA_06D2E3,y
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_06D2C2
	ORA.w #$FF00
CODE_06D2C2:
	STA.l $7049C6,x
	LDA.w DATA_06D2E3+$01,y
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_06D2D4
	ORA.w #$FF00
CODE_06D2D4:
	SEC
	SBC.w #$0070
	STA.l $7049C8,x
	DEY
	DEY
	BPL.b CODE_06D2B1
	LDX.b $12
	RTS

DATA_06D2E3:
	dw $0000,$0010,$0010,$0708,$0708,$0708,$0708,$0708
	dw $1816,$2E00,$18EA,$07F7,$07F7,$07F7,$07F7,$07F7
	dw $00F0,$00F0

CODE_06D307:
	LDA.b $18,x
	XBA
	ASL
	AND.w #$00FE
	CLC
	ADC.w #$0100
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $00
	LDA.b $76,x
	STA.b $02
	ASL
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LSR
	STA.b $04
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LSR
	STA.b $06
	LDY.b #$04
CODE_06D33A:
	LDX.w DATA_06D47F,y
	LDA.l $7049C6,x
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.l $7049C6,x
	LDA.l $7049C8,x
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.l $7049C8,x
	DEY
	BPL.b CODE_06D33A
	LDX.b $12
	LDA.b $0E
	AND.w #$000F
	CMP.w #$0001
	BEQ.b CODE_06D36A
	CMP.w #$0002
	BEQ.b CODE_06D36A
	RTS

CODE_06D36A:
	LDA.b $04
	CLC
	ADC.l $7049DA
	STA.l $7049DA
	LDA.b $04
	CLC
	ADC.l $7049FA
	STA.l $7049FA
	LDA.b $06
	CLC
	ADC.l $7049DC
	STA.l $7049DC
	LDA.b $06
	CLC
	ADC.l $7049FC
	STA.l $7049FC
	LDA.b $14
	ASL
	ASL
	ASL
	ASL
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $76,x
	XBA
	AND.w #$00FF
	LSR
	LSR
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.b $00
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $02
	LSR
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.l $7049D6
	STA.l $7049D6
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.l $7049FE
	STA.l $7049FE
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHA
	CLC
	ADC.l $7049D8
	STA.l $7049D8
	PLA
	ADC.l $704A00
	STA.l $704A00
	LDA.b $14
	ASL
	ASL
	ASL
	ASL
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $76,x
	XBA
	AND.w #$00FF
	LSR
	LSR
	LSR
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.b $00
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $02
	LSR
	CLC
	ADC.b $02
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.l $7049DE
	STA.l $7049DE
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.l $7049F6
	STA.l $7049F6
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHA
	CLC
	ADC.l $7049E0
	STA.l $7049E0
	PLA
	ADC.l $7049F8
	STA.l $7049F8
	LDX.b $12
	RTS

DATA_06D47F:
	db $1C,$20,$24,$28,$2C

CODE_06D484:
	LDA.w $7680,x
	CLC
	ADC.w #$0090
	CMP.w #$0220
	BCS.b CODE_06D49C
	LDA.w $7682,x
	CLC
	ADC.w #$00C8
	CMP.w #$019A
	BCC.b CODE_06D4AC
CODE_06D49C:
	LDY.b #$11
	STY.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$02
	STY.w !RAM_YI_Global_SubScreenLayers
	LDY.b #$20
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	RTS

CODE_06D4AC:
	LDA.w #$0000
	CLC
	ADC.w $7680,x
	STA.w $6040
	LDA.w #$0070
	CLC
	ADC.w $7682,x
	STA.w $6042
	LDA.w #$0012
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08E64B>>16
	LDA.w #FXCODE_08E64B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$13
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$04
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$22
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$63
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	RTS

CODE_06D4FB:
	REP.b #$10
	LDA.l $7049EA
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.l $7049E8
	CLC
	ADC.w #$0070
	STA.b $02
	LDY.w $7362,x
	LDX.w #$000C
CODE_06D517:
	LDA.w $6000,y
	CLC
	ADC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $02
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_06D517
	SEP.b #$10
	LDX.b $12
	RTS

CODE_06D537:
	LDA.b $0E
	BIT.w #$0800
	BEQ.b CODE_06D564
	LDA.b $0E
	AND.w #$FFE0
	ORA.w #$8022
	STA.b $0E
	LDA.w !RAM_YI_Level_StarTimerLo
	BEQ.b CODE_06D564
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
	CMP.w #$000D
	BEQ.b CODE_06D55A
	CMP.w #$000E
	BNE.b CODE_06D564
CODE_06D55A:
	JSL.l CODE_06C0B3
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
CODE_06D564:
	LDA.b $0E
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_06D577,y
	STA.b $00
	PER.w CODE_06D576-$01
	JMP.w ($0000+$7960)
CODE_06D576:
	RTS

DATA_06D577:
	dw CODE_06D589
	dw CODE_06D6F3
	dw CODE_06D7B6
	dw CODE_06D842

DATA_06D57F:
	dw $1000,$7000

DATA_06D583:
	dw $0000,$FFFF

DATA_06D587:
	db $00,$02

CODE_06D589:
	LDA.w $7400,x
	AND.w #$FFFD
	STA.w $7400,x
	LDY.b #$01
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	BPL.b CODE_06D59F
	LDY.b #$00
CODE_06D59F:
	LDA.w DATA_06D587,y
	AND.w #$00FF
	ORA.w $7400,x
	STA.w $7400,x
	STZ.w $7402,x
	LDA.b $18,x
	SEC
	SBC.w #$4000
	STA.b $00
	LDA.b $78,x
	CLC
	ADC.b $18,x
	STA.b $18,x
	SEC
	SBC.w #$4000
	EOR.b $00
	BPL.b CODE_06D5CC
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
CODE_06D5CC:
	LDY.b #$02
	LDA.b $18,x
	SEC
	SBC.w #$4000
	BPL.b CODE_06D5DB
	LDY.b #$00
	EOR.w #$FFFF
CODE_06D5DB:
	CMP.w #$3000
	BCC.b CODE_06D5E5
	LDA.w DATA_06D57F,y
	STA.b $18,x
CODE_06D5E5:
	LDY.b #$02
	LDA.b $18,x
	SEC
	SBC.w #$4000
	BPL.b CODE_06D5F5
	LDY.b #$00
	EOR.w #$FFFF
	INC
CODE_06D5F5:
	XBA
	AND.w #$00FF
	EOR.w DATA_06D583,y
	CLC
	ADC.b $78,x
	STA.b $78,x
	LDA.w $796E
	BIT.w #$0010
	BEQ.b CODE_06D60C
	JMP.w CODE_06D6E2

CODE_06D60C:
	LDA.w $611C
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCC.b CODE_06D621
CODE_06D61C:
	RTS

DATA_06D61D:
	dw $0042,$0062

CODE_06D621:
	LDA.w $61D6
	BNE.b CODE_06D61C
	LDA.w $7AF6,x
	BNE.b CODE_06D61C
	LDA.w $7A36,x
	CMP.w #$0003
	BCC.b CODE_06D63E
	LDA.w #$0050
	STA.w $7AF6,x
	STZ.w $7A36,x
	BRA.b CODE_06D61C

CODE_06D63E:
	LDY.b #$00
	LDA.w $70E2,x
	BIT.w #$0010
	BEQ.b CODE_06D64A
	LDY.b #$02
CODE_06D64A:
	LDA.b $76,x
	XBA
	AND.w #$00FF
	ASL
	STA.b $00
	LDA.w $70E2,x
	SEC
	SBC.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	SEC
	SBC.w $7182,x
	SEC
	SBC.w #$0018
	SEC
	SBC.b $00
	CMP.w #$0010
	BMI.b CODE_06D6E2
	CLC
	ADC.b $00
	CMP.w #$00C0
	BPL.b CODE_06D6E2
	CMP.w DATA_06D61D,y
	BMI.b CODE_06D680
	LDA.w DATA_06D61D,y
CODE_06D680:
	STA.b $00
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w #$0080
	AND.w #$00FF
	XBA
	STA.w $7A38,x
	REP.b #$10
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	ASL
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	TAX
	LDA.l $702200,x
	STA.b $02
	SEP.b #$30
	LDX.b $02
	STX.w !REGISTER_Mode7MatrixParameterA
	LDX.b $03
	STX.w !REGISTER_Mode7MatrixParameterA
	LDA.b $00
	LSR
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDX.b $12
	LDA.w !REGISTER_PPUMultiplicationProductMid
	AND.w #$00FF
	XBA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8001
	STA.b $0E
	INC.w $7A36,x
CODE_06D6E2:
	RTS

DATA_06D6E3:
	db $07,$06,$05,$04,$03,$02,$01,$00

DATA_06D6EB:
	db $40,$04,$03,$02,$02,$02,$01,$01

CODE_06D6F3:
	LDA.b $0E
	BPL.b CODE_06D704
	AND.w #$7FFF
	STA.b $0E
	LDA.w #$0006
	STA.b $16,x
	STZ.w $7A96,x
CODE_06D704:
	LDA.w $7A96,x
	BNE.b CODE_06D723
	LDA.b $16,x
	BEQ.b CODE_06D723
	DEC
	STA.b $16,x
	TAY
	LDA.w DATA_06D6E3,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_06D6EB,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_06D723:
	LDA.b $0E
	BIT.w #$0010
	BNE.b CODE_06D73F
	LDA.w $611C
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCC.b CODE_06D74E
	STZ.b $78,x
	STZ.w $7A36,x
CODE_06D73F:
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8002
	STA.b $0E
	RTS

DATA_06D74A:
	dw $FE00,$0200

CODE_06D74E:
	LDY.b #$00
	LDA.w $7A38,x
	SEC
	SBC.b $18,x
	STA.b $00
	BEQ.b CODE_06D76F
	BMI.b CODE_06D75E
	LDY.b #$02
CODE_06D75E:
	LDA.w DATA_06D74A,y
	CLC
	ADC.b $18,x
	PHA
	SEC
	SBC.w $7A38,x
	EOR.b $00
	ASL
	PLA
	BCS.b CODE_06D772
CODE_06D76F:
	LDA.w $7A38,x
CODE_06D772:
	STA.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.b $76,x
	BMI.b CODE_06D790
	ASL
	XBA
	AND.w #$00FF
	ASL
	ASL
	ASL
	CLC
	ADC.w #$0010
	CLC
	ADC.b $76,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BCC.b CODE_06D79D
CODE_06D790:
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8002
	STA.b $0E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_06D79D:
	STA.b $76,x
	LDX.b $12
	RTS

DATA_06D7A2:
	dw $1800,$1800

DATA_06D7A6:
	dw $0000,$8003

DATA_06D7AA:
	db $0E,$0D,$0C,$05,$06,$07

DATA_06D7B0:
	db $01,$01,$01,$01,$01,$01

CODE_06D7B6:
	LDA.b $0E
	BPL.b CODE_06D7C7
	AND.w #$7FFF
	STA.b $0E
	LDA.w #$0006
	STA.b $16,x
	STZ.w $7A96,x
CODE_06D7C7:
	LDA.w $7A96,x
	BNE.b CODE_06D7E6
	LDA.b $16,x
	BEQ.b CODE_06D7E6
	DEC
	STA.b $16,x
	TAY
	LDA.w DATA_06D7AA,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_06D7B0,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_06D7E6:
	LDY.b #$00
	LDA.b $0E
	BIT.w #$0020
	BEQ.b CODE_06D7F1
	LDY.b #$02
CODE_06D7F1:
	LDA.b $76,x
	SEC
	SBC.w #$0400
	CMP.w DATA_06D7A2,y
	BCS.b CODE_06D835
	LDA.b $18,x
	SEC
	SBC.w #$4000
	XBA
	AND.w #$00FF
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0400
	STA.b $78,x
	PHY
	LDY.b #$00
	LDA.b $0E
	BIT.w #$0020
	BEQ.b CODE_06D822
	LDA.w #$0100
	STA.w $7A98,x
	LDY.b #$02
CODE_06D822:
	LDA.b $0E
	AND.w #$FFD0
	ORA.w DATA_06D7A6,y
	STA.b $0E
	PLY
	ORA.w #$0000
	BMI.b CODE_06D842
	LDA.w DATA_06D7A2,y
CODE_06D835:
	STA.b $76,x
	LDX.b $12
	RTS

DATA_06D83A:
	db $10,$11,$10,$0F

DATA_06D83E:
	db $02,$20,$02,$10

CODE_06D842:
	LDA.b $0E
	BPL.b CODE_06D859
	AND.w #$7FFF
	STA.b $0E
	LDA.w #$0004
	STA.b $16,x
	STZ.w $7A96,x
	LDA.w #$0100
	STA.w $7A98,x
CODE_06D859:
	LDA.w $7A96,x
	BNE.b CODE_06D887
	DEC.b $16,x
	BPL.b CODE_06D867
	LDA.w #$0003
	STA.b $16,x
CODE_06D867:
	LDY.b $16,x
	LDA.w DATA_06D83A,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_06D83E,y
	AND.w #$00FF
	STA.w $7A96,x
	LDA.w $7A98,x
	BNE.b CODE_06D887
	LDA.b $0E
	AND.w #$FFF0
	STA.b $0E
CODE_06D887:
	RTS

CODE_06D888:
	LDA.w $7680,x
	CLC
	ADC.w #$0050
	CMP.w #$01A0
	BCS.b CODE_06D90F
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $601A
	BEQ.b CODE_06D8F4
	LDX.b $12
	LDY.b #$00
	LDA.w $70E2,x
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BMI.b CODE_06D8C6
	LDY.b #$02
CODE_06D8C6:
	LDA.w DATA_06D912,y
	CLC
	ADC.w $60B4
	PHA
	SEC
	SBC.w DATA_06D916,y
	EOR.w DATA_06D912,y
	ASL
	PLA
	BCS.b CODE_06D8DC
	LDA.w DATA_06D916,y
CODE_06D8DC:
	STA.w $60B4
	LDA.b $0E
	LDA.b $0E
	PHA
	LDX.b $12
	JSL.l CODE_03A858
	PLA
	STA.b $0E
	LDA.w #$0400
	TSB.b $0E
	LDX.b $12
CODE_06D8F4:
	LDX.b $12
	LDY.w $7D36,x
	DEY
	BMI.b CODE_06D90F
	LDA.w $7D38,y
	BEQ.b CODE_06D90F
	LDA.b $0E
	PHA
	TYX
	JSL.l CODE_03B25B
	PLA
	ORA.w #$0800
	STA.b $0E
CODE_06D90F:
	LDX.b $12
	RTS

DATA_06D912:
	dw $0100,$FF00

DATA_06D916:
	dw $0200,$FE00

;---------------------------------------------------------------------------

CODE_06D91A:
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $601A
	BEQ.b CODE_06D976
	LDX.b $12
	LDY.b #$00
	LDA.w $70E2,x
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BMI.b CODE_06D94C
	LDY.b #$02
CODE_06D94C:
	LDA.w DATA_06D912,y
	CLC
	ADC.w $60B4
	PHA
	SEC
	SBC.w DATA_06D916,y
	EOR.w DATA_06D912,y
	ASL
	PLA
	BCS.b CODE_06D962
	LDA.w DATA_06D916,y
CODE_06D962:
	STA.w $60B4
	LDA.b $0E
	PHA
	LDX.b $12
	JSL.l CODE_03A858
	PLA
	ORA.w #$0400
	STA.b $0E
	LDX.b $12
CODE_06D976:
	LDA.w $6014
	BEQ.b CODE_06D9A2
	LDX.b $12
	LDY.b #$00
	LDA.w $70E2,x
	CMP.w $70E2
	BMI.b CODE_06D989
	LDY.b #$02
CODE_06D989:
	LDA.w DATA_06D912,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	PHA
	SEC
	SBC.w DATA_06D916,y
	EOR.w DATA_06D912,y
	ASL
	PLA
	BCS.b CODE_06D99F
	LDA.w DATA_06D916,y
CODE_06D99F:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_06D9A2:
	LDX.b $12
	LDY.w $7D36,x
	DEY
	BMI.b CODE_06D9BD
	LDA.w $7D38,y
	BEQ.b CODE_06D9BD
	LDA.b $0E
	PHA
	TYX
	JSL.l CODE_03B25B
	PLA
	ORA.w #$0800
	STA.b $0E
CODE_06D9BD:
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr193_SnakeCagedGhost_Init:
;$06D9C0
	LDA.w #$0000
	STA.w $6040
	LDA.w #$0000
	STA.w $6042
	RTL

;---------------------------------------------------------------------------

YI_NorSpr193_SnakeCagedGhost_Main:
;$06D9CD
	JSR.w CODE_06DA01
	JSR.w CODE_06DBA5
	JSR.w CODE_06DC4D
	JSL.l CODE_03AF23
	LDA.w $7680,x
	CLC
	ADC.w #$0200
	CMP.w #$0400
	BCS.b CODE_06D9F2
	LDA.w $7682,x
	CLC
	ADC.w #$01A0
	CMP.w #$0300
	BCC.b CODE_06D9F8
CODE_06D9F2:
	JSL.l CODE_03A31E
	BRA.b CODE_06D9FE

CODE_06D9F8:
	JSR.w CODE_06DC84
	JSR.w CODE_06DD53
CODE_06D9FE:
	LDX.b $12
	RTL

CODE_06DA01:
	LDA.b $18,x
	XBA
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_06DA55,x
	STA.b $00
	LDA.w DATA_06DA55+$02,x
	STA.b $02
	LDY.b #$34
CODE_06DA15:
	TYA
	ASL
	TAX
	LDA.b ($00),y
	AND.w #$00FF
	SEC
	SBC.w #$00E0
	STA.l $7049F6,x
	LDA.b ($02),y
	AND.w #$00FF
	SEC
	SBC.w #$00E0
	STA.l $704B36,x
	LDA.b ($00),y
	AND.w #$FF00
	XBA
	SEC
	SBC.w #$0050
	STA.l $7049F8,x
	LDA.b ($02),y
	AND.w #$FF00
	XBA
	SEC
	SBC.w #$0050
	STA.l $704B38,x
	DEY
	DEY
	BPL.b CODE_06DA15
	LDX.b $12
	RTS

DATA_06DA55:
	dw DATA_06DA61,DATA_06DA97
	dw DATA_06DACD,DATA_06DB03
	dw DATA_06DB39,DATA_06DB6F

DATA_06DA61:
	db $E0,$50,$E0,$5F,$80,$5F,$72,$5F,$6E,$5D,$52,$41,$4E,$3F,$10,$2F
	db $10,$3F,$08,$3D,$02,$38,$01,$33,$01,$2C,$02,$27,$08,$22,$10,$20
	db $50,$20,$5E,$20,$62,$22,$7E,$3E,$82,$40,$E0,$43,$EF,$47,$F7,$4C
	db $FF,$56,$FF,$5B,$FC,$5F

DATA_06DA97:
	db $E0,$50,$E0,$5F,$80,$5F,$72,$5F,$6E,$5D,$52,$41,$50,$3F,$4F,$2F
	db $4F,$3F,$48,$3D,$42,$38,$41,$33,$41,$2C,$42,$27,$48,$22,$50,$20
	db $50,$20,$5E,$20,$62,$22,$7E,$3E,$82,$40,$E0,$43,$EF,$47,$F7,$4C
	db $FF,$56,$FF,$5B,$FC,$5F

DATA_06DACD:
	db $E0,$50,$E0,$5F,$80,$5F,$72,$5F,$6E,$5D,$50,$3E,$50,$3E,$5B,$34
	db $4F,$3E,$4C,$39,$4B,$30,$4D,$2B,$53,$25,$5D,$23,$62,$24,$68,$28
	db $68,$28,$68,$28,$68,$28,$68,$28,$82,$40,$E0,$43,$EF,$47,$F7,$4C
	db $FF,$56,$FF,$5B,$FC,$5F

DATA_06DB03:
	db $E0,$50,$E0,$5F,$80,$5F,$80,$5F,$69,$58,$69,$58,$69,$58,$73,$4C
	db $68,$58,$64,$51,$63,$48,$65,$43,$6B,$3D,$75,$3B,$7A,$3C,$7F,$40
	db $7F,$40,$7F,$40,$7F,$40,$7F,$40,$82,$40,$E0,$43,$EF,$47,$F7,$4C
	db $FF,$56,$FF,$5B,$FC,$5F

DATA_06DB39:
	db $E0,$50,$E0,$5F,$80,$5F,$80,$5F,$80,$5F,$80,$5F,$80,$5F,$7F,$4F
	db $7F,$5F,$78,$5D,$72,$58,$71,$53,$71,$4C,$72,$47,$78,$42,$80,$40
	db $80,$40,$80,$40,$80,$40,$80,$40,$80,$40,$E0,$43,$EF,$47,$F7,$4C
	db $FF,$56,$FF,$5B,$FC,$5F

DATA_06DB6F:
	db $E0,$50,$E0,$60,$E0,$60,$E0,$60,$E0,$60,$E0,$60,$E0,$60,$E0,$51
	db $DF,$60,$D8,$5E,$D2,$59,$D1,$54,$D1,$4D,$D2,$48,$D8,$43,$E0,$41
	db $E0,$41,$E0,$41,$E0,$41,$E0,$41,$E0,$41,$E0,$41,$EF,$48,$F7,$4D
	db $FF,$57,$FF,$5C,$FC,$60

CODE_06DBA5:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	LDA.w $7680,x
	CMP.w #$0100
	BCC.b CODE_06DBBA
	CMP.w #$FF00
	BCS.b CODE_06DBBA
	JMP.w CODE_06DC37

CODE_06DBBA:
	CLC
	ADC.w #$00E0
	STA.w $6040
CODE_06DBBF:
	LDA.w $7682,x
	CMP.w #$0200
	BCC.b CODE_06DBCE
	CMP.w #$FF00
	BCC.b CODE_06DC37
CODE_06DBCE:
	CLC
	ADC.w #$0020
	STA.w $6042
	LDA.w #$49F6
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$4B36
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$001B
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $18,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0000
	STA.w $605E
	LDX.b #FXCODE_08E8CA>>16
	LDA.w #FXCODE_08E8CA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$13
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$04
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$22
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$63
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDA.w #$0008
	TSB.b $0E
	BRA.b CODE_06DC45

CODE_06DC37:
	SEP.b #$20
	LDA.b #$04
	TRB.w !RAM_YI_Global_SubScreenLayers
	REP.b #$20
	LDA.w #$0008
	TRB.b $0E
CODE_06DC45:
	LDX.b $12
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

CODE_06DC4D:
	STZ.w $7400,x
	REP.b #$10
	LDY.w $7362,x
	LDX.w #$000C
CODE_06DC58:
	LDA.w $6000,y
	CLC
	ADC.l $7044BA
	CLC
	ADC.w #$00DE
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.l $7044BC
	CLC
	ADC.w #$0018
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_06DC58
	SEP.b #$10
	LDX.b $12
	RTS

CODE_06DC84:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BIT.w #$0008
	BNE.b CODE_06DC8F
	JMP.w CODE_06DD48

CODE_06DC8F:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$F7FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TXA
	STA.w $6012
	LDA.w $60B0
	STA.w $6014
	LDA.w $60B2
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $601A
	BEQ.b CODE_06DCF4
	LDY.b #$00
	LDA.w $70E2,x
	CLC
	ADC.w #$00E0
	ASL
	CLC
	ADC.l $7044BA
	LSR
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BMI.b CODE_06DCD5
	LDY.b #$02
CODE_06DCD5:
	LDA.w DATA_06DD4B,y
	CLC
	ADC.w $60B4
	PHA
	SEC
	SBC.w DATA_06DD4F,y
	EOR.w DATA_06DD4B,y
	ASL
	PLA
	BCS.b CODE_06DCEB
	LDA.w DATA_06DD4F,y
CODE_06DCEB:
	STA.w $60B4
	LDX.b $12
	JSL.l CODE_03A858
CODE_06DCF4:
	LDA.w $6014
	BEQ.b CODE_06DD2B
	LDX.b $12
	LDY.b #$00
	LDA.w $70E2,x
	CLC
	ADC.w #$00E0
	ASL
	CLC
	ADC.l $7044BA
	LSR
	CMP.w $70E2
	BMI.b CODE_06DD12
	LDY.b #$02
CODE_06DD12:
	LDA.w DATA_06DD4B,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	PHA
	SEC
	SBC.w DATA_06DD4F,y
	EOR.w DATA_06DD4B,y
	ASL
	PLA
	BCS.b CODE_06DD28
	LDA.w DATA_06DD4F,y
CODE_06DD28:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_06DD2B:
	LDX.b $12
	LDY.w $7D36,x
	DEY
	BMI.b CODE_06DD48
	LDA.w $7D38,y
	BEQ.b CODE_06DD48
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	ORA.w #$0800
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_06DD48:
	LDX.b $12
	RTS

DATA_06DD4B:
	dw $0100,$FF00

DATA_06DD4F:
	dw $0200,$FE00

CODE_06DD53:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	BIT.w #$0800
	BEQ.b CODE_06DD74
	LDA.w #$0010
	STA.w $7A96,x
	LDA.b $0E
	AND.w #$FFF8
	ORA.w #$0401
	STA.b $0E
	LDA.w #!Define_YI_SoundID79_HurtGhost
	JSL.l CODE_0085D2
CODE_06DD74:
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_08DD98,y
	STA.b $00
	PER.w CODE_06DD84-$01
	JMP.w ($0000+$7960)
CODE_06DD84:
	LDA.b $0E
	AND.w #$7FFF
	BIT.w #$4000
	BEQ.b CODE_06DD94
	AND.w #$BFFF
	ORA.w #$8000
CODE_06DD94:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTS

DATA_08DD98:
	dw CODE_06DDA2
	dw CODE_06DE59
	dw CODE_06DE9F
	dw CODE_06DF02
	dw CODE_06DFB2

CODE_06DDA2:
	LDA.w $7AF8,x
	BEQ.b CODE_06DDA8
	RTS

CODE_06DDA8:
	LDA.b $18,x
	BEQ.b CODE_06DDCE
	JSL.l CODE_008408
	LDA.b $10
	BIT.w #$001F
	BNE.b CODE_06DDCE
	AND.w #$0001
	CLC
	ADC.w #$001C
	STA.w $7A96,x
	LDA.b $0E
	AND.w #$FFF8
	ORA.w #$0002
	STA.b $0E
	JMP.w CODE_06DE9F

CODE_06DDCE:
	LDA.w $7A98,x
	BNE.b CODE_06DE29
	LDA.w #$00F3
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	INC
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0003
	BCS.b CODE_06DE29
	STA.b $00
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CLC
	ADC.b $00
	CMP.w #$0006
	BCS.b CODE_06DE2B
	PHA
	LDA.b $0E
	AND.w #$FFF8
	ORA.w #$8003
	STA.b $0E
	PLA
	LDY.b #$00
	CMP.w #$0005
	BCC.b CODE_06DE1D
	LDY.b #$02
CODE_06DE1D:
	LDA.w DATA_06DE25,y
	STA.b $78,x
	JMP.w CODE_06DF02

DATA_06DE25:
	db $02,$00,$01,$00

CODE_06DE29:
	LDX.b $12
CODE_06DE2B:
	LDA.b $0E
	BPL.b CODE_06DE34
	STZ.b $76,x
	STZ.w $7A96,x
CODE_06DE34:
	LDA.w $7A96,x
	BNE.b CODE_06DE53
	LDA.b $76,x
	BNE.b CODE_06DE42
	LDA.w #$0006
	STA.b $76,x
CODE_06DE42:
	TAY
	LDA.w DATA_06DFF3,y
	STA.w $7402,x
	LDA.w DATA_06DFFB,y
	STA.w $7A96,x
	DEC.b $76,x
	DEC.b $76,x
CODE_06DE53:
	RTS

DATA_06DE54:
	db $0C,$30,$18,$30,$0C

CODE_06DE59:
	LDA.w #$000E
	STA.w $7402,x
	LDA.w $7A96,x
	BNE.b CODE_06DE7A
	LDA.w #$0407
	TRB.b $0E
	LDA.w #$0020
	STA.w $7AF8,x
	LDA.w #$0180
	STA.w $7A98,x
	STZ.w $7A96,x
	STZ.b $76,x
CODE_06DE7A:
	LDA.b $18,x
	XBA
	AND.w #$00FF
	TAY
	LDA.w DATA_06DE54,y
	AND.w #$00FF
	CLC
	ADC.b $18,x
	CMP.w #$0500
	BCC.b CODE_06DE9C
	LDA.b $0E
	AND.w #$FFF8
	ORA.w #$4004
	STA.b $0E
	LDA.w #$04FF
CODE_06DE9C:
	STA.b $18,x
	RTS

CODE_06DE9F:
	LDA.w $7A96,x
	BNE.b CODE_06DEAE
	LDA.b $0E
	AND.w #$FFF8
	ORA.w #$4000
	STA.b $0E
CODE_06DEAE:
	LDA.w #$0005
	STA.w $7402,x
	LDA.w #$00C0
	STA.w $0051
	LDA.b $18,x
	XBA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_06DEDA,y
	CLC
	ADC.b $18,x
	BPL.b CODE_06DED7
	LDA.b $0E
	AND.w #$FFF8
	ORA.w #$4000
	STA.b $0E
	LDA.w #$0000
CODE_06DED7:
	STA.b $18,x
	RTS

DATA_06DEDA:
	dw $FFFE,$FFF8,$FFFC,$FFF8,$FFFE

DATA_06DEE4:
	db $07,$06,$05,$04,$03,$02,$0A,$0B,$0A,$01,$02,$03,$04,$05,$06

DATA_06DEF3:
	db $01,$01,$01,$01,$01,$01,$02,$0A,$02,$01,$01,$01,$01,$01,$01

CODE_06DF02:
	LDA.b $0E
	BPL.b CODE_06DF0B
	STZ.b $76,x
	STZ.w $7A96,x
CODE_06DF0B:
	LDA.w $7A96,x
	BEQ.b CODE_06DF13
	JMP.w CODE_06DFB1

CODE_06DF13:
	LDY.b $76,x
	CPY.b #$0F
	BCC.b CODE_06DF37
	DEC.b $78,x
	BEQ.b CODE_06DF25
	LDA.w #$4000
	TSB.b $0E
	JMP.w CODE_06DFB1

CODE_06DF25:
	LDA.w #$0060
	STA.w $7A98,x
	LDA.b $0E
	AND.w #$BFF8
	ORA.w #$4000
	STA.b $0E
	BRA.b CODE_06DFB1

CODE_06DF37:
	LDA.w DATA_06DEF3,y
	AND.w #$00FF
	STA.w $7A96,x
	CPY.b #$0E
	BNE.b CODE_06DF55
	LDA.b $78,x
	CMP.w #$0001
	BEQ.b CODE_06DF55
	LDA.w $7A96,x
	CLC
	ADC.w #$0040
	STA.w $7A96,x
CODE_06DF55:
	LDA.w DATA_06DEE4,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$07
	BNE.b CODE_06DFAF
	LDA.w #!Define_YI_SoundID77_EnemyJumpingOutOfPipe
	JSL.l CODE_0085D2
	LDA.w #$00F3
	JSL.l CODE_03A34C
	LDA.w $70E2,x
	CLC
	ADC.l $7044BA
	CLC
	ADC.w #$00CC
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.l $7044BC
	CLC
	ADC.w #$001E
	STA.w $7182,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FD80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDX.b #$04
	STX.b $76,y
	REP.b #$20
	LDA.w #$0000
	STA.w $7400,y
	LDX.b $12
CODE_06DFAF:
	INC.b $76,x
CODE_06DFB1:
	RTS

CODE_06DFB2:
	LDA.b $0E
	BPL.b CODE_06DFBB
	STZ.w $7A96,x
	STZ.b $76,x
CODE_06DFBB:
	LDA.w $7A96,x
	BNE.b CODE_06DFF2
	LDA.b $76,x
	BNE.b CODE_06DFC9
	LDA.w #$0012
	STA.b $76,x
CODE_06DFC9:
	TAY
	LDA.w DATA_06E017,y
	STA.w $7A96,x
	LDA.w DATA_06E003,y
	STA.w $7402,x
	DEC.b $76,x
	DEC.b $76,x
	BNE.b CODE_06DFF2
	LDA.b $0E
	AND.w #$FFF8
	ORA.w #$4000
	STA.b $0E
	LDA.w #$0100
	STA.w $7AF8,x
	LDA.w #$0180
	STA.w $7A98,x
CODE_06DFF2:
	RTS

DATA_06DFF3:
	dw $0008,$0009,$0008,$0007

DATA_06DFFB:
	dw $0004,$0008,$0004,$000A

DATA_06E003:
	dw $000F,$0010,$0011,$0010,$000F,$000F,$0010,$0011
	dw $0010,$000F

DATA_06E017:
	dw $000A,$0002,$0014,$0002,$000A,$000A,$0002,$0014
	dw $0002,$000A

;---------------------------------------------------------------------------

YI_NorSpr010_RoundedCagedGhost_Init:
;$06E02B
	LDA.w #$0020
	STA.b $18,x
	LDA.w #$0118
	STA.b $76,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0008
	STA.b $16,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr010_RoundedCagedGhost_Main:
;$06E047
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	LDA.w #$0000
	STA.b $0C
	JSR.w CODE_06E42F
	JSR.w CODE_06E48B
	JSR.w CODE_06E0A5
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	LDA.w $7680,x
	CLC
	ADC.w #$0090
	CMP.w #$0220
	BCS.b CODE_06E080
	LDA.w $7682,x
	CLC
	ADC.w #$0100
	CMP.w #$0300
	BCC.b CODE_06E086
CODE_06E080:
	JSL.l CODE_03A31E
	BRA.b CODE_06E093

CODE_06E086:
	LDA.b $0E
	BIT.w #$0400
	BEQ.b CODE_06E090
	JSR.w CODE_06D91A
CODE_06E090:
	JSR.w CODE_06E123
CODE_06E093:
	LDX.b $12
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_06E09B:
	dw $0078,$0000,$0078,$0028,$0078

CODE_06E0A5:
	LDA.w $7402,x
	CMP.w #$0015
	BCS.b CODE_06E102
	LDA.b $0E
	AND.w #$000F
	ASL
	TAY
	LDA.b $18,x
	CMP.w DATA_06E09B,y
	BCC.b CODE_06E102
	CPY.b #$02
	BNE.b CODE_06E0C6
	LDA.b $0E
	BIT.w #$0200
	BEQ.b CODE_06E102
CODE_06E0C6:
	REP.b #$10
	LDA.w #$FFF8
	STA.b $00
	LDA.l $7044C8
	CLC
	ADC.w #$0010
	STA.b $02
	LDY.w $7362,x
	LDX.w #$000C
CODE_06E0DD:
	LDA.w $6000,y
	CLC
	ADC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $02
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_06E0DD
	SEP.b #$10
	LDA.w #$0200
	TSB.b $0E
	LDX.b $12
	RTS

CODE_06E102:
	REP.b #$10
	LDY.w $7362,x
	LDX.w #$000C
CODE_06E10A:
	LDA.w #$00E8
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_06E10A
	SEP.b #$10
	LDA.w #$0200
	TRB.b $0E
	LDX.b $12
	RTS

CODE_06E123:
	JSR.w CODE_06E147
	LDA.b $0E
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_06E13B,y
	STA.b $00
	PER.w CODE_06E138-$01
	JMP.w ($0000+$7960)
CODE_06E138:
	LDX.b $12
	RTS

DATA_06E13B:
	dw CODE_06E195
	dw CODE_06E225
	dw CODE_06E258
	dw CODE_06E274
	dw CODE_06E2A2

DATA_06E145:
	db $00,$02

CODE_06E147:
	LDY.b #$01
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	BPL.b CODE_06E154
	LDY.b #$00
CODE_06E154:
	LDA.w DATA_06E145,y
	AND.w #$00FF
	STA.w $7400,x
	LDA.b $0E
	BIT.w #$0800
	BEQ.b CODE_06E194
	LDA.w #!Define_YI_SoundID79_HurtGhost
	JSL.l CODE_0085D2
	LDA.b $0E
	AND.w #$000F
	CMP.w #$0001
	BEQ.b CODE_06E194
	LDA.b $18,x
	SEC
	SBC.w #$0020
	CMP.w #$0030
	BCS.b CODE_06E183
	LDA.w #$0030
CODE_06E183:
	STA.b $76,x
	LDA.w #$0008
	STA.b $78,x
	LDA.b $0E
	AND.w #$F7F0
	ORA.w #$8001
	STA.b $0E
CODE_06E194:
	RTS

CODE_06E195:
	LDA.b $18,x
	CMP.w #$0118
	BCS.b CODE_06E1CD
	LDA.w $7A96,x
	BEQ.b CODE_06E1A2
	RTS

CODE_06E1A2:
	JSL.l CODE_008408
	LDA.b $10
	BIT.w #$F800
	BNE.b CODE_06E1CD
	AND.w #$0003
	ASL
	ASL
	CLC
	ADC.w #$0004
	CLC
	ADC.b $18,x
	CMP.w #$0118
	BCC.b CODE_06E1C1
	LDA.w #$0118
CODE_06E1C1:
	STA.b $76,x
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8002
	STA.b $0E
CODE_06E1CD:
	LDA.w $7AF8,x
	BNE.b CODE_06E21F
	LDA.b $18,x
	CMP.w #$0078
	BCC.b CODE_06E21F
	LDA.w #$001E
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	INC
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0003
	BCS.b CODE_06E21F
	STA.b $00
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CLC
	ADC.b $00
	CMP.w #$0006
	BCS.b CODE_06E21F
	JSL.l CODE_008408
	LDA.b $10
	BIT.w #$0007
	BNE.b CODE_06E21F
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8004
	STA.b $0E
CODE_06E21F:
	LDX.b $12
	JSR.w CODE_06E321
	RTS

CODE_06E225:
	JSR.w CODE_06E321
	LDA.b $78,x
	SEC
	SBC.w #$0001
	STA.b $78,x
	LDA.b $18,x
	CLC
	ADC.b $78,x
	CMP.b $76,x
	BCS.b CODE_06E255
	CMP.w #$0030
	BCS.b CODE_06E243
	LDA.w #$0180
	BRA.b CODE_06E246

CODE_06E243:
	LDA.w #$0080
CODE_06E246:
	STA.w $7A96,x
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8000
	STA.b $0E
	LDA.b $76,x
CODE_06E255:
	STA.b $18,x
	RTS

CODE_06E258:
	JSR.w CODE_06E321
	LDA.b $18,x
	CLC
	ADC.w #$0002
	CMP.b $76,x
	BCC.b CODE_06E271
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8000
	STA.b $0E
	LDA.b $76,x
CODE_06E271:
	STA.b $18,x
	RTS

CODE_06E274:
	LDA.w $7A96,x
	BNE.b CODE_06E299
	JSR.w CODE_06E321
	LDA.b $76,x
	SEC
	SBC.b $18,x
	BCC.b CODE_06E28B
	LSR
	LSR
	BEQ.b CODE_06E28B
	ADC.b $18,x
	BRA.b CODE_06E297

CODE_06E28B:
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8000
	STA.b $0E
	LDA.b $76,x
CODE_06E297:
	STA.b $18,x
CODE_06E299:
	RTS

DATA_06E29A:
	dw $FFDE,$0012

DATA_06E29E:
	dw $FE00,$0200

CODE_06E2A2:
	LDA.w $7A98,x
	BNE.b CODE_06E31D
	LDA.b $16,x
	BNE.b CODE_06E2B7
	LDA.b $0E
	AND.w #$FFF0
	ORA.w #$8000
	STA.b $0E
	BRA.b CODE_06E31D

CODE_06E2B7:
	CMP.w #$0008
	BNE.b CODE_06E31D
	LDA.w #!Define_YI_SoundID77_EnemyJumpingOutOfPipe
	JSL.l CODE_0085D2
	LDA.w #$001E
	JSL.l CODE_03A364
	BCC.b CODE_06E31D
	LDA.l $7044C8
	CLC
	ADC.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.w $7400,x
	AND.w #$0002
	STA.w $7400,y
	TAX
	LDA.w DATA_06E29A,x
	CLC
	ADC.b $00
	STA.w $70E2,y
	LDA.w DATA_06E29E,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FD80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0018
	STA.w $7A96,y
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDX.b $12
	LDA.w #$0048
	STA.w $7AF8,x
CODE_06E31D:
	JSR.w CODE_06E321
	RTS

CODE_06E321:
	LDA.b $0E
	BPL.b CODE_06E32F
	STZ.w $7A98,x
	STZ.b $16,x
	LDA.w #$8000
	TRB.b $0E
CODE_06E32F:
	CLC
	LDA.w $7A98,x
	BNE.b CODE_06E366
	REP.b #$10
	LDA.b $0E
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_06E371,y
	STA.b $00
	LDA.w DATA_06E37B,y
	STA.b $02
	LDA.b $16,x
	BNE.b CODE_06E34F
	LDA.w DATA_06E367,y
CODE_06E34F:
	DEC
	STA.b $16,x
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.b ($02),y
	AND.w #$00FF
	STA.w $7402,x
	SEP.b #$10
	SEC
CODE_06E366:
	RTS

DATA_06E367:
	dw $0004,$0009,$0004,$0008,$000F

DATA_06E371:
	dw DATA_06E385,DATA_06E38D,DATA_06E39F,DATA_06E3A7,DATA_06E3B7

DATA_06E37B:
	dw DATA_06E389,DATA_06E396,DATA_06E3A3,DATA_06E3AF,DATA_06E3C6

DATA_06E385:
	db $04,$08,$04,$08

DATA_06E389:
	db $08,$09,$08,$07

DATA_06E38D:
	db $40,$02,$04,$01,$01,$01,$01,$01,$02

DATA_06E396:
	db $14,$13,$12,$0E,$0D,$0C,$05,$06,$07

DATA_06E39F:
	db $04,$08,$04,$08

DATA_06E3A3:
	db $08,$09,$08,$07

DATA_06E3A7:
	db $40,$04,$03,$02,$02,$01,$01,$01

DATA_06E3AF:
	db $07,$06,$05,$04,$03,$02,$01,$00

DATA_06E3B7:
	db $01,$01,$01,$01,$01,$01,$02,$10,$02,$01,$01,$01,$01,$01,$10

DATA_06E3C6:
	db $06,$05,$04,$03,$02,$01,$0A,$0B,$0A,$02,$03,$04,$05,$06,$07

CODE_06E3D5:
	RTL

CODE_06E3D6:
	RTL

DATA_06E3D7:
	dw DATA_06E3D7+$02,DATA_06E3DF,DATA_06E407

DATA_06E3DD:
	db $14,$0E

DATA_06E3DF:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000

DATA_06E407:
	dw $0000,$00C8,$FFC5,$FEC4,$FAC3,$D9C5,$C1C9,$A9D1
	dw $A1D8,$9DE0,$9900,$9D21,$A129,$A930,$C138,$D93C
	dw $FA3E,$FE3D,$FF3C,$0039

CODE_06E42F:
	LDY.b $0C
	LDA.w DATA_06E3DD,y
	AND.w #$00FF
	STA.b $06
	TYA
	ASL
	TAY
	LDA.w DATA_06E3D7,y
	STA.b $00
	LDY.b #$00
	LDA.b ($00),y
	STA.b $02
	LDY.b #$02
	LDA.b ($00),y
	STA.b $04
	LDA.b $06
	DEC
	ASL
	TAY
CODE_06E452:
	TYA
	ASL
	TAX
	LDA.w #$0000
	STA.l $7049F6,x
	LDA.w #$0000
	STA.l $7049F8,x
	LDA.w DATA_06E407,y
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_06E471
	ORA.w #$FF00
CODE_06E471:
	STA.l $704B36,x
	LDA.w DATA_06E407,y
	AND.w #$FF00
	BPL.b CODE_06E480
	ORA.w #$00FF
CODE_06E480:
	XBA
	STA.l $704B38,x
	DEY
	BPL.b CODE_06E452
	LDX.b $12
	RTS

CODE_06E48B:
	LDA.w #$0004
	TRB.w !RAM_YI_Global_SubScreenLayers
	LDA.w #$0400
	TRB.b $0E
	LDA.w $7680,x
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCS.b CODE_06E514
	LDA.w $7682,x
CODE_06E5A3:
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCS.b CODE_06E514
	LDA.w $7680,x
	STA.w $6040
	LDA.w $7682,x
	STA.w $6042
	LDA.w #$49F6
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$4B36
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $06
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $18,x
	AND.w #$03FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0000
	STA.w $605E
	LDX.b #FXCODE_08E8CA>>16
	LDA.w #FXCODE_08E8CA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$04
	TSB.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$02
	TSB.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$63
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDA.w #$0400
	TSB.b $0E
CODE_06E514:
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0D6_FortGhostWithPlatform_Init:
;$06E517
	LDA.w #$0100
	STA.b $18,x
	LDA.w #$0040
	STA.b $76,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	STZ.b $16,x
	LDA.w #$8000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0D6_FortGhostWithPlatform_Main:
;$06E530
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	JSR.w CODE_06E562
	JSR.w CODE_06E65D
	JSR.w CODE_06E58E
CODE_06E53E:
	JSR.w CODE_06E7E0
	JSR.w CODE_06E85A
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $76,x
	JSR.w CODE_06E894
	LDX.b $12
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

CODE_06E562:
	LDA.l $7044DA
	CLC
	ADC.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.l $7044DC
CODE_06E570:
	CLC
	ADC.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_06E58D
	LDA.w #$0002
	TSB.b $0E
CODE_06E58D:
	RTS

CODE_06E58E:
	LDA.w $7680,x
	CLC
	ADC.w #$0028
	CMP.w #$0150
	BCC.b CODE_06E5AA
	LDY.b #$11
	STY.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$02
	STY.w !RAM_YI_Global_SubScreenLayers
	LDY.b #$20
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	RTS

CODE_06E5AA:
	LDA.w #DATA_06E8FC>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $18,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_06E623,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $18,x
	XBA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_06E623,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7680,x
	STA.w $6040
	LDA.w $7682,x
	STA.w $6042
	LDX.b #FXCODE_08E93B>>16
	LDA.w #FXCODE_08E93B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$13
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$04
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$22
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$63
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	RTS

DATA_06E623:
	dw DATA_06E8FC,DATA_06E91C

DATA_06E627:
	dw CODE_06E6D1,$0001,CODE_06E708,$0001,CODE_06E760,$0001,CODE_06E7BB,$0001
	dw CODE_06E78C,$0001,CODE_06E708,$0001,CODE_06E760,$0001,CODE_06E7BB,$0001
	dw CODE_06E78C,$0001,CODE_06E708,$0001,CODE_06E764,$0001,CODE_06E7BB,$0001
	dw CODE_06E78C,$0001,$0000

CODE_06E65D:
	JSR.w CODE_06E6B3
	LDA.b $78,x
	ASL
	ASL
CODE_06E664:
	TAY
	LDA.w DATA_06E627,y
	BNE.b CODE_06E673
	STA.b $78,x
	LDA.w #$8000
	TSB.b $0E
	BRA.b CODE_06E664

CODE_06E673:
	STA.b $00
	LDA.w DATA_06E627+$02,y
	STA.b $18,x
	PER.w CODE_06E680-$01
	JMP.w ($0000+$7960)
CODE_06E680:
	LDA.b $0E
	AND.w #$7FFF
	BIT.w #$4000
	BEQ.b CODE_06E68F
	EOR.w #$C000
	INC.b $78,x
CODE_06E68F:
	STA.b $0E
	RTS

DATA_06E692:
	dw $0000,$0001,$0002,$0001,$0002,$0000,$0000,$0001
	dw $0002,$0001,$0002

CODE_06E6A8:
	LDA.w #$0015
	STA.w $7A98,x
	LDA.w #$0004
	TSB.b $0E
CODE_06E6B3:
	LDA.b $0E
	BIT.w #$0004
	BEQ.b CODE_06E6D0
	LDA.w $7A98,x
	PHA
	BNE.b CODE_06E6C5
	LDA.w #$0004
	TRB.b $0E
CODE_06E6C5:
	PLA
	AND.w #$FFFE
	TAY
	LDA.w DATA_06E692,y
	STA.w $7402,x
CODE_06E6D0:
	RTS

CODE_06E6D1:
	LDA.b $0E
	BPL.b CODE_06E6DB
	LDA.w #$00F0
	STA.w $7A96,x
CODE_06E6DB:
	LDA.b $0E
	BIT.w #$0004
	BNE.b CODE_06E707
	LDA.w #$0002
	STA.w $7402,x
	LDA.w $7A96,x
	BNE.b CODE_06E6F6
	LDA.w #$00F0
	STA.w $7A96,x
	JSR.w CODE_06E6A8
CODE_06E6F6:
	LDA.b $0E
	BIT.w #$0001
	BEQ.b CODE_06E707
	LDA.b $0E
	AND.w #$FFFB
	ORA.w #$4000
	STA.b $0E
CODE_06E707:
	RTS

CODE_06E708:
	LDA.b $0E
	BPL.b CODE_06E724
	LDA.w #$0180
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $7A96,x
	LDA.w #$0002
	STA.w $7400,x
	LDA.w #$0002
	STA.w $7402,x
CODE_06E724:
	LDA.b $0E
	BIT.w #$0002
	BNE.b CODE_06E754
	LDA.w $7680,x
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCS.b CODE_06E73D
	LDA.w #$00C0
	STA.w $0051
CODE_06E73D:
	LDA.w $7A96,x
	BNE.b CODE_06E74B
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$4000
	TSB.b $0E
	RTS

CODE_06E74B:
	CMP.w #$0017
	BNE.b CODE_06E753
	JSR.w CODE_06E6A8
CODE_06E753:
	RTS

CODE_06E754:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

DATA_06E758:
	dw $0003,$0006

DATA_06E75C:
	dw $0090,$0120

CODE_06E760:
	LDY.b #$00
	BRA.b CODE_06E766

CODE_06E764:
	LDY.b #$02
CODE_06E766:
	STZ.w $7402,x
	LDA.b $0E
	BPL.b CODE_06E773
	LDA.w #$001E
	STA.w $7A96,x
CODE_06E773:
	LDA.w $7A96,x
	BNE.b CODE_06E78B
	LDA.b $76,x
	CLC
	ADC.w DATA_06E758,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w DATA_06E75C,y
	BCC.b CODE_06E78B
	LDA.w #$4000
	TSB.b $0E
CODE_06E78B:
	RTS

CODE_06E78C:
	LDA.b $0E
	BPL.b CODE_06E799
	LDA.w #$0002
	STA.w $7402,x
	STZ.w $7A96,x
CODE_06E799:
	LDA.w $7A96,x
	BNE.b CODE_06E7BA
	LDA.w #$0002
	STA.w $7A96,x
	LDA.b $76,x
	SEC
	SBC.w #$0003
	CMP.w #$0040
	BPL.b CODE_06E7B7
	LDA.w #$4000
	TSB.b $0E
	LDA.w #$0040
CODE_06E7B7:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_06E7BA:
	RTS

CODE_06E7BB:
	LDA.b $0E
	BPL.b CODE_06E7C5
	LDA.w #$00C6
	STA.w $7A96,x
CODE_06E7C5:
	LDA.w $7A96,x
	CMP.w #$0017
	BNE.b CODE_06E7D0
	JSR.w CODE_06E6A8
CODE_06E7D0:
	LDA.w $7A96,x
	BNE.b CODE_06E7DF
	LDA.b $0E
	AND.w #$FFFB
	ORA.w #$4000
	STA.b $0E
CODE_06E7DF:
	RTS

CODE_06E7E0:
	LDA.b $18,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_06E623,y
	STA.b $00
	LDA.b $18,x
	XBA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_06E623,y
	STA.b $02
	LDY.b #$12
	LDA.b ($00),y
	AND.w #$00FF
	BIT.w #$0080
	BEQ.b CODE_06E808
	ORA.w #$FF00
CODE_06E808:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b ($02),y
	AND.w #$00FF
	BIT.w #$0080
	BEQ.b CODE_06E818
	ORA.w #$FF00
CODE_06E818:
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	INY
	LDA.b ($00),y
	AND.w #$00FF
	BIT.w #$0080
	BEQ.b CODE_06E829
	ORA.w #$FF00
CODE_06E829:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b ($02),y
	AND.w #$00FF
	BIT.w #$0080
	BEQ.b CODE_06E839
	ORA.w #$FF00
CODE_06E839:
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08EB9D>>16
	LDA.w #FXCODE_08EB9D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.b $0A
	STA.b $16,x
	LDA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.b $0C
	RTS

CODE_06E85A:
	REP.b #$10
	LDA.w $7A36,x
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	STA.b $02
	LDY.w $7362,x
	LDX.w #$000D
CODE_06E874:
	LDA.w $6000,y
	CLC
	ADC.b $00
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $02
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_06E874
	SEP.b #$10
	LDX.b $12
	RTS

CODE_06E894:
	LDA.w $60AA
	BMI.b CODE_06E8F1
	LDA.w $611C
	SEC
	SBC.w $70E2,x
	CLC
	ADC.b $0A
	STA.b $00
	ASL
	LDA.w $6120
	BCS.b CODE_06E8AF
	EOR.w #$FFFF
	INC
CODE_06E8AF:
	CLC
	ADC.b $00
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_06E8F1
	LDA.w $7182,x
	CLC
	ADC.b $0C
	SEC
	SBC.w #$0008
	STA.b $00
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	CMP.w #$000A
	BMI.b CODE_06E8F1
	CMP.w #$0020
	BCS.b CODE_06E8F1
	LDA.b $00
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	LDA.w #$0001
	TSB.b $0E
CODE_06E8E7:
	LDA.w $72C0,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_06E8F1:
	LDA.b $0A
	STA.w $7A36,x
	LDA.b $0C
	STA.w $7A38,x
	RTS

;---------------------------------------------------------------------------

DATA_06E8FC:
	dw $0000,$00C1,$F4C8,$E5D0,$D0D8,$ACE0,$91E8,$86F0
	dw $82F8,$8100,$8101,$8209,$8A11,$9819,$DE20,$0028

DATA_06E91C:
	dw $0000,$00C1,$00C8,$00D0,$00D8,$00E0,$00E8,$00F0
	dw $00F8,$0000,$0001,$0009,$0011,$0019,$0020,$0028

DATA_06E93C:
	dw $0040,$0040

DATA_06E940:
	dw $0030,$0030

YI_NorSpr0DB_SoftBlock_Init:
;$06E944
	LDY.b #$00
	LDA.w $70E2,x
	BIT.w #$0010
	BEQ.b CODE_06E950
	LDY.b #$02
CODE_06E950:
	LDA.w DATA_06E93C,y
	STA.b $76,x
	LDA.w DATA_06E940,y
	STA.b $78,x
	STZ.w $7B56,x
	STZ.w $7B58,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0DB_SoftBlock_Main:
;$06E961
	LDA.w #$F880
	AND.b $18,x
	STA.b $18,x
	JSR.w CODE_06EA0A
	JSL.l CODE_03AF23
	LDA.w $7680,x
	CLC
	ADC.w #$0078
	CMP.w #$01F0
	BCS.b CODE_06E987
	LDA.w $7682,x
	CLC
	ADC.w #$0078
	CMP.w #$01C2
	BCC.b CODE_06E98C
CODE_06E987:
	JSL.l CODE_03A31E
	RTL

CODE_06E98C:
	LDA.b $76,x
	CMP.w #$8000
	ROR
	STA.w $7BB6,x
	LDA.b $78,x
	CMP.w #$8000
	ROR
	STA.w $7BB8,x
	JSR.w CODE_06EB2C
	JSR.w CODE_06EBF8
	JSR.w CODE_06EEFE
	REP.b #$10
	LDA.b $18,x
	AND.w #$07FF
	LDY.w $60D4
	BEQ.b CODE_06E9C6
	BIT.w #$0010
	BEQ.b CODE_06E9C6
	ORA.w #$0800
	BIT.w #$0400
	BEQ.b CODE_06E9C6
	LDY.w #$0000
	STY.w $60D4
CODE_06E9C6:
	LDY.w $60C0
	BNE.b CODE_06E9CE
	ORA.w #$4000
CODE_06E9CE:
	BIT.w #$0010
	BEQ.b CODE_06E9D6
	ORA.w #$1000
CODE_06E9D6:
	BIT.w #$0020
	BEQ.b CODE_06E9DE
	ORA.w #$2000
CODE_06E9DE:
	BIT.w #$0100
	BEQ.b CODE_06E9E6
	ORA.w #$8000
CODE_06E9E6:
	STA.b $18,x
	SEP.b #$10
	LDX.b $12
	RTL

CODE_06E9ED:
	LDA.b $76,x
	LSR
	BCS.b CODE_06E9F3
	DEC
CODE_06E9F3:
	STA.b $02
	SEC
	SBC.b $76,x
	INC
	STA.b $00
	LDA.b $78,x
	LSR
	BCS.b CODE_06EA01
	DEC
CODE_06EA01:
	STA.b $06
	SEC
	SBC.b $78,x
	INC
	STA.b $04
	RTS

CODE_06EA0A:
	LDA.w $7680,x
	ADC.w #$0078
	CMP.w #$01F0
	BCC.b CODE_06EA21
	SEP.b #$20
	LDA.b #$04
	TRB.w !RAM_YI_Global_MainScreenLayers
	REP.b #$20
	LDX.b $12
	RTS

CODE_06EA21:
	JSR.w CODE_06E9ED
	LDA.b $00
	SEC
	SBC.w $7A38,x
	STA.l $70449E
	STA.l $7044DA
	CLC
	ADC.w #$0001
	STA.l $7044A2
	STA.l $7044D6
	CLC
	ADC.w #$0001
	STA.l $7044A6
	STA.l $7044D2
	CLC
	ADC.w #$0002
	STA.l $7044AA
	STA.l $7044CE
	LDA.b $02
	CLC
	ADC.w $7A38,x
	STA.l $7044BA
	STA.l $7044BE
	SEC
	SBC.w #$0001
	STA.l $7044B6
	STA.l $7044C2
	SEC
	SBC.w #$0001
	STA.l $7044B2
	STA.l $7044C6
	SEC
	SBC.w #$0002
	STA.l $7044AE
	STA.l $7044CA
	LDA.b $04
	CLC
	ADC.w $7A38,x
	STA.l $7044AC
	STA.l $7044B0
	CLC
	ADC.w #$0001
	STA.l $7044A8
	STA.l $7044B4
	CLC
	ADC.w #$0001
	STA.l $7044A4
	STA.l $7044B8
	CLC
	ADC.w #$0002
	STA.l $7044A0
	STA.l $7044BC
	LDA.b $06
	STA.l $7044D0
	STA.l $7044CC
	SEC
	SBC.w #$0001
	STA.l $7044D4
	STA.l $7044C8
	SEC
	SBC.w #$0001
	STA.l $7044D8
	STA.l $7044C4
	SEC
	SBC.w #$0002
	STA.l $7044DC
	STA.l $7044C0
	LDA.w $7680,x
	STA.w $6040
	LDA.w $7682,x
	STA.w $6042
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$449E
	STA.w $6048
	LDA.w #$44DA
	STA.w $604A
	LDX.b #FXCODE_08E9E2>>16
	LDA.w #FXCODE_08E9E2
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$04
	TSB.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	RTS

CODE_06EB2C:
	JSR.w CODE_06E9ED
	LDA.b $00
	CLC
	ADC.w $70E2,x
	STA.b $00
	LDA.b $02
	CLC
	ADC.w $70E2,x
	STA.b $02
	LDA.b $04
	CLC
	ADC.w $7182,x
	STA.b $04
	LDA.b $06
	CLC
	ADC.w $7182,x
	STA.b $06
	LDA.w #$0007
	STA.b $08
	JSR.w CODE_06EFC9
	LDX.b $12
	LDA.b $0E
	ORA.b $18,x
	STA.b $18,x
	LDA.b $0E
	AND.w #$0003
	BEQ.b CODE_06EBA7
	LDA.b $0E
	BIT.w #$0001
	BNE.b CODE_06EB87
	LDA.b $04
	EOR.w #$000F
	BEQ.b CODE_06EB9E
	INC
	AND.w #$000F
	STA.b $0A
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_06EB9E
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $72C2,x
	BRA.b CODE_06EB9E

CODE_06EB87:
	LDA.b $06
	INC
	AND.w #$000F
	EOR.w #$FFFF
	INC
	STA.b $0A
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_06EB9E
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $72C2,x
CODE_06EB9E:
	LDA.w $7182,x
	CLC
	ADC.b $0A
	STA.w $7182,x
CODE_06EBA7:
	LDA.b $0E
	AND.w #$000C
	BEQ.b CODE_06EBF3
	CMP.w #$000C
	BEQ.b CODE_06EBF3
	BIT.w #$0008
	BEQ.b CODE_06EBD3
	LDA.b $00
	AND.w #$000F
	EOR.w #$000F
	INC
	AND.w #$000F
	STA.b $08
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_06EBEA
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $72C2,x
	BRA.b CODE_06EBEA

CODE_06EBD3:
	LDA.b $02
	INC
	AND.w #$000F
	EOR.w #$FFFF
	INC
	STA.b $08
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_06EBEA
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $72C0,x
CODE_06EBEA:
	LDA.w $70E2,x
	CLC
	ADC.b $08
	STA.w $70E2,x
CODE_06EBF3:
	RTS

DATA_06EBF4:
	dw $0001,$FFFF

CODE_06EBF8:
	STZ.b $0E
	LDX.b $12
	LDA.b $76,x
	CMP.w #$8000
	ROR
	STA.w $7BB6,x
	LDA.b $78,x
	CMP.w #$8000
	ROR
	STA.w $7BB8,x
	LDA.w $60B4
	PHA
	JSR.w CODE_06EDF6
	PLA
	BCS.b CODE_06EC1B
	JMP.w CODE_06ECAF

CODE_06EC1B:
	CPY.b #$01
	BNE.b CODE_06EC8F
	LDA.b $0E
	BEQ.b CODE_06EC92
	LDA.w $60D4
	BEQ.b CODE_06EC88
	LDA.b $18,x
	AND.w #$000C
	CMP.w #$000C
	BEQ.b CODE_06EC88
	LDA.b $78,x
	CMP.w #$000E
	BCC.b CODE_06EC81
	LDA.b $76,x
	PHA
	LDA.b $78,x
	DEC
	TAY
	LDA.w #$0C00
	JSR.w CODE_06EFB7
	STA.b $76,x
	DEC.b $78,x
	LDA.b $78,x
	LSR
	BCS.b CODE_06EC55
	INC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $7182,x
CODE_06EC55:
	PLA
	EOR.w #$FFFF
	SEC
	ADC.b $76,x
	LSR
	STA.b $00
	LDA.b $18,x
	BIT.w #$000C
	BEQ.b CODE_06EC88
	BIT.w #$0008
	BEQ.b CODE_06EC76
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,x
	BRA.b CODE_06EC88

CODE_06EC76:
	LDA.w $70E2,x
	SEC
	SBC.b $00
	STA.w $70E2,x
	BRA.b CODE_06EC88

CODE_06EC81:
	LDA.b $18,x
	ORA.w #$0400
	STA.b $18,x
CODE_06EC88:
	LDA.b $18,x
	ORA.w #$0110
	STA.b $18,x
CODE_06EC8F:
	JMP.w CODE_06EDF1

CODE_06EC92:
	LDA.w $60C0
	BNE.b CODE_06ECA5
	LDY.b $06
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $7962,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BRA.b CODE_06ECAC

CODE_06ECA5:
	LDA.b $18,x
	ORA.w #$0100
	STA.b $18,x
CODE_06ECAC:
	JMP.w CODE_06EDF1

CODE_06ECAF:
	CMP.w $60B4
	BNE.b CODE_06ECB7
	JMP.w CODE_06EDF1

CODE_06ECB7:
	STA.b $08
	LDA.b $18,x
	ORA.w #$0020
	STA.b $18,x
	LDY.b $06
	LDA.w $7962,y
	STA.b $0A
	LDA.b $18,x
	PHA
	AND.w #$BFFF
	STA.b $18,x
	PLA
	BIT.w #$4000
	BNE.b CODE_06ECDC
	LDY.b #$01
	LDA.w $60C0
	BNE.b CODE_06ED48
CODE_06ECDC:
	LDA.w $60DE
	BNE.b CODE_06ED48
	LDA.w $6150
	BNE.b CODE_06ED48
	LDY.b $06
	LDA.w $7962,y
	BPL.b CODE_06ECF6
	LDA.b $18,x
	BIT.w #$0004
	BNE.b CODE_06ED69
	BRA.b CODE_06ECFD

CODE_06ECF6:
	LDA.b $18,x
	BIT.w #$0008
	BNE.b CODE_06ED69
CODE_06ECFD:
	LDY.w $60AA
	BMI.b CODE_06ED48
	LDA.w $70E2,x
	SEC
	LDX.b $06
	SBC.w DATA_06EFA7,x
	LDX.b $12
	SEC
	SBC.b $0A
	STA.w $70E2,x
	LDA.b $08
	PHA
	CLC
	ADC.w #$00C0
	CMP.w #$0181
	PLA
	BCC.b CODE_06ED2A
	LDA.w #$00E0
	LDX.b $06
	BNE.b CODE_06ED2A
	LDA.w #$FF20
CODE_06ED2A:
	STA.w $60B4
	LDA.w #$0000
	STA.w $60A8
	LDA.w $7A96,x
	BNE.b CODE_06ED45
	LDA.w #!Define_YI_SoundID59_RollingRock
	JSL.l CODE_0085D2
	LDA.w #$000A
	STA.w $7A96,x
CODE_06ED45:
	JMP.w CODE_06EDEB

CODE_06ED48:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	LDX.b $06
	ADC.w DATA_06EFA7,x
	LDX.b $12
	CLC
	ADC.b $0A
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CPY.b #$00
	BNE.b CODE_06ED60
	JMP.w CODE_06EDEB

CODE_06ED60:
	STZ.w $60A8
	STZ.w $60B4
	JMP.w CODE_06EDF1

CODE_06ED69:
	LDA.b $08
	PHA
	CLC
	ADC.w #$00C0
	CMP.w #$0181
	PLA
	BCC.b CODE_06ED80
	LDA.w #$00C0
	LDX.b $06
	BNE.b CODE_06ED80
	LDA.w #$FF40
CODE_06ED80:
	STA.w $60B4
	LDA.w #$0000
	STA.w $60A8
	LDX.b $12
	LDY.b #$00
	LDA.b $18,x
	AND.w #$0003
	CMP.w #$0003
	BEQ.b CODE_06ED48
	LDA.b $76,x
	DEC
	TAY
	LDA.w #$0C00
	JSR.w CODE_06EFB7
	LDY.b #$00
	CMP.w #$0041
	BCS.b CODE_06ED48
	STA.b $78,x
	DEC.b $76,x
	LDA.b $76,x
	AND.w #$0001
	ASL
	ASL
	CLC
	ADC.b $06
	TAY
	LDA.w DATA_06EFAF,y
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	LDX.b $06
	LDA.w DATA_06EFA7,x
	LDX.w $7972
	CLC
	ADC.b $0A
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_06EFAF,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7A96,x
	BNE.b CODE_06EDE9
	LDA.w #!Define_YI_SoundID59_RollingRock
	JSL.l CODE_0085D2
	LDA.w #$000A
	STA.w $7A96,x
CODE_06EDE9:
	LDX.b $12
CODE_06EDEB:
	INC.w $61C2
	INC.w $60DC
CODE_06EDF1:
	RTS

DATA_06EDF2:
	dw $0001,$FFFF

CODE_06EDF6:
	STZ.b $0E
	BRA.b CODE_06EDFE

CODE_06EDFA:
	LDY.b #$00
	SEC
	RTS

CODE_06EDFE:
	LDA.w $6122
	CLC
	ADC.w $7BB8,x
	STA.b $00
	LDA.w $7C18,x
	SEC
	SBC.b $00
	CLC
	ADC.w $7A38,x
	BPL.b CODE_06EDFA
	STA.b $0A
	LDA.b $00
	SEC
	ADC.w $7C18,x
	BEQ.b CODE_06EDFA
	BMI.b CODE_06EDFA
	STA.b $08
	LDY.b #$00
	LDA.w $7C18,x
	BMI.b CODE_06EE2A
	LDY.b #$02
CODE_06EE2A:
	STY.b $0C
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	STA.b $00
	LDA.w $7C16,x
	SEC
	SBC.b $00
	BPL.b CODE_06EDFA
	STA.b $04
	LDA.b $00
	CLC
	ADC.w $7C16,x
	BEQ.b CODE_06EDFA
	BMI.b CODE_06EDFA
	STA.b $02
	LDY.b #$00
	LDA.w $7C16,x
	BMI.b CODE_06EE54
	LDY.b #$02
CODE_06EE54:
	STY.b $06
	LDA.w $7962,y
	BPL.b CODE_06EE5F
	EOR.w #$FFFF
	INC
CODE_06EE5F:
	STA.b $00
	LDY.b $0C
	LDA.w $7968,y
	BPL.b CODE_06EE6C
	EOR.w #$FFFF
	INC
CODE_06EE6C:
	CMP.b $00
	BCC.b CODE_06EE73
	JMP.w CODE_06EEE2

CODE_06EE73:
	CMP.w #$000D
	BCC.b CODE_06EE8B
	JMP.w CODE_06EEE2

CODE_06EE7B:
	LDA.w #$0040
	STA.w $60B4
	LDA.b $18,x
	ORA.w #$0040
	STA.b $18,x
	JMP.w CODE_06EEE2

CODE_06EE8B:
	LDA.w $7968,y
	BEQ.b CODE_06EE9E
	BMI.b CODE_06EE9E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60D2
	BRA.b CODE_06EED3

CODE_06EE9E:
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	SEC
	SBC.w $6EBE
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.w $60AB
	BPL.b CODE_06EEBB
	JMP.w CODE_06EEFA

CODE_06EEBB:
	LDA.w $70E2,x
	SEC
	SBC.w $6EBC
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	INC.w $61B4
	INC.b $0E
	LDA.w $60AA
	STA.b $0C
CODE_06EED3:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_06EEDB
	LDA.w #$0000
CODE_06EEDB:
	STA.w $60AA
	LDY.b #$01
	SEC
	RTS

CODE_06EEE2:
	LDX.b $06
	LDA.b $00
	LSR
	BEQ.b CODE_06EEE9
CODE_06EEE9:
	LDA.w $60B4
	EOR.l DATA_06EDF2,x
	BPL.b CODE_06EEF8
	STZ.w $60A8
	STZ.w $60B4
CODE_06EEF8:
	LDX.b $12
CODE_06EEFA:
	LDY.b #$01
	CLC
	RTS

CODE_06EEFE:
	LDA.b $18,x
	BIT.w #$0100
	BEQ.b CODE_06EF1F
	LDA.b $18,x
	BIT.w #$8000
	BNE.b CODE_06EF3A
	LDA.w #$0003
	STA.w $7A36,x
	LDA.w $60D4
	BEQ.b CODE_06EF1D
	LDA.w #$0005
	STA.w $7A36,x
CODE_06EF1D:
	BRA.b CODE_06EF3A

CODE_06EF1F:
	LDA.b $18,x
	BIT.w #$0020
	BEQ.b CODE_06EF3A
	BIT.w #$2000
	BNE.b CODE_06EF3A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	ORA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.w #$FFFD
	STA.w $7A36,x
CODE_06EF3A:
	LDA.w $7A36,x
	BEQ.b CODE_06EFA6
CODE_06EF3F:
	SEC
	SBC.w $7A38,x
	BEQ.b CODE_06EF81
	AND.w #$8000
	CLC
	ROL
	ROL
	ASL
	TAY
	LDA.w DATA_06EBF4,y
	CLC
	ADC.w $7A38,x
	STA.w $7A38,x
	LDA.b $18,x
	BIT.w #$0010
	BEQ.b CODE_06EF6D
	LDA.w $60AA
	BMI.b CODE_06EF6D
	LDA.w DATA_06EBF4,y
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_06EF6D:
	LDA.w $7A98,x
	BNE.b CODE_06EFA6
	LDA.w #!Define_YI_SoundID62_MelonBugBump
	JSL.l CODE_0085D2
	LDA.w #$000C
	STA.w $7A98,x
	BRA.b CODE_06EFA6

CODE_06EF81:
	LDA.b $18,x
	BIT.w #$0080
	BNE.b CODE_06EF97
	LDA.w $7A36,x
	EOR.w #$FFFF
	INC
	BMI.b CODE_06EF92
	DEC
CODE_06EF92:
	STA.w $7A36,x
	BRA.b CODE_06EF3F

CODE_06EF97:
	LDA.b $18,x
	AND.w #$FF7F
	STA.b $18,x
	LDA.w #$0001
	STA.w $7A36,x
	BRA.b CODE_06EF3F

CODE_06EFA6:
	RTS

DATA_06EFA7:
	dw $FFFF,$0001,$0001,$FFFF

DATA_06EFAF:
	dw $0000,$0001,$FFFF,$0000

CODE_06EFB7:
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDA.w !REGISTER_QuotientLo
	RTS

CODE_06EFC9:
	STZ.b $0E
	DEC.b $00
	INC.b $02
	LDA.b $04
	CLC
	ADC.b $08
	STA.b $0A
	LDA.b $06
	SEC
	SBC.b $08
	STA.b $0C
CODE_06EFDD:
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $0A
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_06EFFC
	LDA.b $0E
	ORA.w #$0008
	STA.b $0E
CODE_06EFFC:
	LDA.b $02
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $0A
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_06F01B
	LDA.b $0E
	ORA.w #$0004
	STA.b $0E
CODE_06F01B:
	LDA.b $0E
	AND.w #$000C
	CMP.w #$000C
	BEQ.b CODE_06F036
	LDA.b $0A
	AND.w #$FFF0
	CLC
	ADC.w #$0010
	STA.b $0A
	CMP.b $0C
	BEQ.b CODE_06EFDD
	BCC.b CODE_06EFDD
CODE_06F036:
	INC.b $00
	DEC.b $02
	DEC.b $04
	DEC.b $04
	INC.b $06
	LDA.b $00
	CLC
	ADC.b $08
	STA.b $0A
	LDA.b $02
	SEC
	SBC.b $08
	STA.b $0C
CODE_06F04E:
	LDA.b $0A
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $06
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_06F06D
	LDA.b $0E
	ORA.w #$0001
	STA.b $0E
CODE_06F06D:
	LDA.b $0E
	AND.w #$0003
	CMP.w #$0003
	BEQ.b CODE_06F088
	LDA.b $0A
	AND.w #$FFF0
	CLC
	ADC.w #$0010
	STA.b $0A
	CMP.b $0C
	BEQ.b CODE_06F04E
	BCC.b CODE_06F04E
CODE_06F088:
	INC.b $04
	INC.b $04
	DEC.b $06
	RTS

;---------------------------------------------------------------------------

YI_NorSpr057_SewerGhostWithPlatform_Init:
;$06F08F
	LDA.l $70449E
	CLC
	ADC.w $70E2,x
	CLC
	ADC.w #$0018
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	LDA.l $7044A8
	CLC
	ADC.w $7182,x
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.w #$0600
	STA.b $18,x
	STZ.w $7400,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $7A96,x
	STZ.w $7A98,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr057_SewerGhostWithPlatform_Main:
;$06F0C2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $0E
	JSR.w CODE_06F0EF
	JSR.w CODE_06F1A4
	JSR.w CODE_06F1C6
	JSR.w CODE_06F23F
	JSL.l CODE_03AF23
	LDA.b $0E
	BMI.b CODE_06F0E1
	JSL.l CODE_03A31E
	BRA.b CODE_06F0E9

CODE_06F0E1:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $18,x
	JSR.w CODE_06F383
CODE_06F0E9:
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

CODE_06F0EF:
	LDA.w #$49F6
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$4B36
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_06F40B>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $18,x
	XBA
	ASL
	TAY
	LDA.w DATA_06F3EF,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	INY
	INY
	LDA.w DATA_06F3EF,y
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #$0032
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0019
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $18,x
CODE_06F12B:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$8000
	TRB.b $0E
	LDA.w $7680,x
	STA.b $00
	STA.w $6040
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCC.b CODE_06F14A
	JMP.w CODE_06F1A1

CODE_06F14A:
	LDA.w $7682,x
	STA.b $02
	STA.w $6042
	CLC
	ADC.w #$00D2
	CMP.w #$02A4
	BCC.b CODE_06F15E
	JMP.w CODE_06F1A1

CODE_06F15E:
	LDA.w #$FF83
	STA.w $6044
	LDA.w #$FF2A
	STA.w $6046
	LDX.b #FXCODE_08E800>>16
	LDA.w #FXCODE_08E800
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	SEP.b #$30
	LDA.b #$13
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$04
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$22
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$63
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$18
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDA.w #$8000
	TSB.b $0E
CODE_06F1A1:
	LDX.b $12
	RTS

CODE_06F1A4:
	LDA.w #$0008
	STA.b $00
	LDA.b $18,x
	CMP.w #$0C00
	BCC.b CODE_06F1B7
	PHA
	LDA.w #$0004
	STA.b $00
	PLA
CODE_06F1B7:
	CLC
	ADC.b $00
	CMP.w #$0D00
	BCC.b CODE_06F1C2
	LDA.w #$0000
CODE_06F1C2:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

CODE_06F1C6:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	XBA
	ASL
	TAY
	LDA.w DATA_06F3EF,y
	STA.b $00
	INY
	INY
	LDA.w DATA_06F3EF,y
	STA.b $02
	LDY.b #$00
	LDA.b ($00),y
	AND.w #$00FF
	SEC
	SBC.w #$007D
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b ($02),y
	AND.w #$00FF
	SEC
	SBC.w #$007D
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDY.b #$05
	LDA.b ($00),y
	AND.w #$00FF
CODE_06F1F8:
	SEC
	SBC.w #$00D6
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b ($02),y
	AND.w #$00FF
	SEC
	SBC.w #$00D6
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08EB9D>>16
	LDA.w #FXCODE_08EB9D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	CLC
	ADC.w $70E2,x
	CLC
	ADC.w #$0018
	STA.b $00
	LDA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	CLC
	ADC.w $7182,x
	SEC
	SBC.w #$0008
	STA.b $02
CODE_06F23C:
	RTS

DATA_06F23B:
	dw $FF80,$0080

CODE_06F23F:
	LDA.b $76,x
	SEC
	SBC.w $70E2,x
	SEC
	SBC.w #$0008
	STA.b $04
	LDA.b $78,x
	SEC
	SBC.w $7182,x
	SEC
	SBC.w #$0008
	STA.b $06
	LDA.b $00
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	BEQ.b CODE_06F274
	BCC.b CODE_06F26B
	LDA.w $7400,x
	ORA.w #$0002
	STA.w $7400,x
	BRA.b CODE_06F274

CODE_06F26B:
	LDA.w $7400,x
	AND.w #$FFFD
	STA.w $7400,x
CODE_06F274:
	LDA.b $02
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BEQ.b CODE_06F291
	BCC.b CODE_06F288
	LDA.w $7400,x
	ORA.w #$0004
	STA.w $7400,x
	BRA.b CODE_06F291

CODE_06F288:
	LDA.w $7400,x
	AND.w #$FFFB
	STA.w $7400,x
CODE_06F291:
	LDA.w $7400,x
	AND.w #$0002
	TAY
	LDA.w DATA_06F23B,y
	CLC
	ADC.w $7A36,x
	STA.b $08
	BPL.b CODE_06F2A7
	EOR.w #$FFFF
	INC
CODE_06F2A7:
	CMP.w #$0400
	BCS.b CODE_06F2B1
	LDA.b $08
	STA.w $7A36,x
CODE_06F2B1:
	LDA.w $7A36,x
	AND.w #$FF00
	BPL.b CODE_06F2BC
	ORA.w #$00FF
CODE_06F2BC:
	XBA
	STA.b $08
	REP.b #$10
	LDY.w $7362,x
	LDX.w #$0004
CODE_06F2C7:
	LDA.b $08
	CLC
	ADC.b $04
	CLC
	ADC.w $6000,y
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $06
	CLC
	ADC.w #$0008
	STA.w $6002,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_06F2C7
	LDX.w #$0003
CODE_06F2EC:
	LDA.w $6000,y
	CLC
	ADC.b $04
	STA.w $6000,y
	LDA.w $6002,y
	CLC
	ADC.b $06
	STA.w $6002,y
	LDA.w $6004,y
	AND.w #$7FFF
	STA.w $6004,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	BNE.b CODE_06F2EC
	LDX.b $12
	SEP.b #$10
	LDA.w $7A96,x
	BNE.b CODE_06F348
	LDA.w #!Define_YI_AmbSpr1BA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000C
	STA.w $7142,y
	LDA.w #$001A
	STA.w $7E4C,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #$002E
	STA.w $7A96,x
	LDY.b #$00
CODE_06F348:
	SEP.b #$10
	RTS

DATA_06F34B:
	dw $0007,$0008,$0009,$000A,$0009,$0008,$0007,$0006
	dw $0005,$0004,$0003,$0002,$0001,$0000,$0003,$0004
	dw $0005,$0004,$0003,$0003,$0003,$0003,$0003,$0003
	dw $0003,$0003,$0003,$0003

CODE_06F383:
	LDA.b $0E
	BIT.w #$0001
	BEQ.b CODE_06F39B
	LDA.b $00
	SEC
	SBC.b $76,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$0001
	TRB.b $0E
CODE_06F39B:
	LDA.w $60AA
	BMI.b CODE_06F3E6
	LDA.w $611C
	SEC
	SBC.b $00
	STA.b $04
	ASL
	LDA.w $6120
	BCS.b CODE_06F3B2
	EOR.w #$FFFF
	INC
CODE_06F3B2:
	CLC
	ADC.b $04
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_06F3E6
	LDA.b $02
	SEC
	SBC.w #$0008
	STA.b $04
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	CMP.w #$000A
	BMI.b CODE_06F3E6
	CMP.w #$0020
	BCS.b CODE_06F3E6
	LDA.b $04
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	LDA.w #$0001
	TSB.b $0E
CODE_06F3E6:
	LDA.b $00
	STA.b $76,x
	LDA.b $02
	STA.b $78,x
	RTS

DATA_06F3EF:
	dw DATA_06F40B,DATA_06F46F,DATA_06F4D3,DATA_06F537,DATA_06F59B,DATA_06F5FF,DATA_06F663,DATA_06F6C7
	dw DATA_06F72B,DATA_06F78F,DATA_06F7F3,DATA_06F857,DATA_06F8BB,DATA_06F40B

DATA_06F40B:
	dw $6C00,$6903,$670B,$6724,$692C,$6C2F,$7231,$7734
	dw $7D37,$823A,$873F,$8D44,$924B,$9752,$9D5A,$A262
	dw $A76A,$AD72,$B279,$B77F,$BD84,$C289,$C78C,$CD8F
	dw $D292,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D264
	dw $CD61,$C75E,$C25B,$BD56,$B751,$B24A,$AD43,$A73B
	dw $A233,$9D2B,$9723,$921C,$8D15,$8710,$820B,$7D08
	dw $7705,$7202

DATA_06F46F:
	dw $8603,$8306,$810E,$8127,$832F,$8632,$8B35,$8F38
	dw $933B,$973F,$9B44,$9F49,$A34F,$A755,$AB5C,$AF63
	dw $B36B,$B772,$BB78,$BF7D,$C382,$C787,$CB8B,$CF8E
	dw $D391,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D363
	dw $CF60,$CB5D,$C759,$C354,$BF4F,$BB49,$B743,$B33C
	dw $AF34,$AB2D,$A726,$A320,$9F1A,$9B15,$9710,$930C
	dw $8F09,$8B06

DATA_06F4D3:
	dw $9F0D,$9C10,$9A18,$9A31,$9C39,$9F3C,$A23F,$A542
	dw $A846,$AB4A,$AD4E,$B052,$B357,$B65D,$B963,$BB68	
	dw $BE6E,$C174,$C47A,$C77E,$C982,$CC86,$CF8A,$D28E
	dw $D591,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D563
	dw $D260,$CF5C,$CC58,$C954,$C750,$C44B,$C145,$BE3F
	dw $BB39,$B934,$B62E,$B328,$B023,$AD1F,$AB1B,$A817
	dw $A513,$A210

DATA_06F537:
	dw $B41E,$B121,$AF29,$AF42,$B14A,$B44D,$B650,$B853
	dw $BA56,$BB59,$BD5D,$BF60,$C164,$C268,$C46D,$C671
	dw $C875,$C97A,$CB7D,$CD81,$CF84,$D088,$D28B,$D48E
	dw $D691,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D663
	dw $D460,$D25D,$D05A,$CF56,$CD53,$CB4F,$C94B,$C846
	dw $C642,$C43E,$C239,$C135,$BF31,$BD2E,$BB2A,$BA27
	dw $B824,$B621

DATA_06F59B:
	dw $C533,$C236,$C03E,$C057,$C25F,$C562,$C665,$C767
	dw $C869,$C96C,$CA6E,$CB71,$CC73,$CD76,$CE79,$CE7B
	dw $CF7D,$D080,$D183,$D285,$D388,$D48A,$D58D,$D68F
	dw $D691,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D663
	dw $D661,$D55F,$D45C,$D35A,$D257,$D155,$D052,$CF4F
	dw $CE4C,$CE4A,$CD47,$CC44,$CB42,$CA3F,$C93D,$C83A
	dw $C738,$C636

DATA_06F5FF:
	dw $CF4C,$CC4F,$CA57,$CA70,$CC78,$CF7B,$D07D,$D07D
	dw $D17E,$D180,$D181,$D282,$D283,$D385,$D386,$D387
	dw $D488,$D48A,$D58B,$D58C,$D58D,$D68F,$D690,$D691
	dw $D692,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D664
	dw $D663,$D662,$D660,$D55F,$D55E,$D55D,$D45B,$D45A
	dw $D359,$D358,$D356,$D255,$D254,$D153,$D151,$D150
	dw $D04F,$D04E

DATA_06F663:
	dw $D266,$CF69,$CD71,$CD8A,$CF92,$D295,$D394,$D394
	dw $D394,$D394,$D494,$D494,$D494,$D494,$D594,$D594
	dw $D594,$D594,$D694,$D694,$D694,$D694,$D694,$D694
	dw $D694,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D666
	dw $D666,$D666,$D666,$D666,$D666,$D666,$D566,$D566
	dw $D566,$D566,$D466,$D466,$D466,$D466,$D366,$D366
	dw $D366,$D366

DATA_06F6C7:
	dw $CB80,$C883,$C68B,$C6A4,$C8AC,$CBAF,$CCAD,$CDAC
	dw $CDAB,$CEA9,$CEA8,$CFA7,$D0A5,$D0A4,$D1A2,$D1A1
	dw $D2A0,$D39E,$D39D,$D49B,$D49A,$D599,$D697,$D696
	dw $D695,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D667
	dw $D668,$D669,$D56B,$D46C,$D46D,$D36F,$D370,$D272
	dw $D173,$D174,$D076,$D077,$CF79,$CE7A,$CE7B,$CD7D
	dw $CD7D,$CC7E

DATA_06F72B:
	dw $B799,$B49C,$B2A4,$B2BD,$B4C5,$B7C8,$B9C6,$BBC4
	dw $BCC2,$BEBF,$BFBD,$C1BA,$C3B7,$C4B4,$C6B1,$C7AE
	dw $C9AA,$CBA7,$CCA4,$CEA1,$CF9E,$D19C,$D399,$D497
	dw $D695,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D667
	dw $D469,$D36B,$D16E,$CF70,$CE73,$CC76,$CB79,$C97C
	dw $C77F,$C682,$C485,$C388,$C18B,$BF8E,$BE90,$BC93
	dw $BB95,$B997

DATA_06F78F:
	dw $95AE,$92B1,$90B9,$90D2,$92DA,$95DD,$99DB,$9CD9
	dw $9FD6,$A3D3,$A6D0,$A9CC,$ADC8,$B0C3,$B3BD,$B6B8
	dw $BAB3,$BDAD,$C0A8,$C4A4,$C7A0,$CA9D,$CE9A,$D197
	dw $D495,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D467
	dw $D169,$CE6C,$CA6F,$C772,$C476,$C07A,$BD7E,$BA84
	dw $B689,$B38E,$B094,$AD99,$A99D,$A6A1,$A3A4,$9FA7
	dw $9CAA,$99AC

DATA_06F7F3:
	dw $6BBF,$68C2,$66CA,$66E3,$68EB,$6BEE,$71EC,$76EA
	dw $7CE8,$81E5,$86E1,$8CDC,$91D6,$97CF,$9CC8,$A1C1
	dw $A7B9,$ACB2,$B2AB,$B7A5,$BCA0,$C29C,$C799,$CD97
	dw $D295,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D267
	dw $CD69,$C76B,$C26E,$BC72,$B777,$B27D,$AC83,$A78A
	dw $A192,$9C99,$97A0,$91A7,$8CAD,$86B2,$81B6,$7CB9
	dw $76BB,$71BD

DATA_06F857:
	dw $39C9,$36CC,$34D4,$34ED,$36F5,$39F8,$41F7,$49F6
	dw $51F5,$59F2,$61ED,$69E8,$71E1,$79D8,$81CF,$88C6
	dw $90BC,$98B3,$A0AA,$A8A3,$B09E,$B899,$C096,$C895
	dw $D094,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$D066
	dw $C867,$C068,$B86B,$B070,$A875,$A07C,$9884,$908D
	dw $8897,$81A0,$79A9,$71B2,$69B9,$61BE,$59C3,$51C6
	dw $49C7,$41C8

DATA_06F8BB:
	dw $05CC,$02CF,$00D7,$00F0,$02F8,$05FB,$10FC,$1AFC
	dw $25FB,$2FF9,$3AF5,$44EF,$4FE7,$59DD,$64D2,$6EC7
	dw $79BC,$83B1,$8EA7,$989F,$A399,$AD95,$B893,$C292
	dw $CD92,$D794,$DA93,$DB92,$DB67,$DA66,$D765,$CD64
	dw $C264,$B865,$AD67,$A36B,$9871,$8E79,$8382,$798D
	dw $6E98,$64A3,$59AE,$4FB8,$44C0,$3AC6,$2FCA,$25CC
	dw $1ACD,$10CD

;---------------------------------------------------------------------------

UNK_06F91F:
	dl $520000
	dl $528000
	dl $52C000
	dl $530000
	dl $538000
	dl $53C000
	dl $540000
	dl $548000
	dl $550000
	dl $558000
	dl $560000
	dl $566000
	dl $568000
	dl $569000
	dl $56A000
	dl $56B000
	dl $56C000
	dl $56D000
	dl $56E800
	dl $56EC00
	dl $56FC00

DATA_06F95E:
	dl DATA_573C00
	dl DATA_5748E9
	dl DATA_57555B
	dl DATA_576234
	dl DATA_576EAB
	dl DATA_5778F9
	dl DATA_57826C
	dl DATA_578DB8
	dl DATA_579952
	dl DATA_57A56A
	dl DATA_57AECB
	dl DATA_57B9B0
	dl DATA_57C271
	dl DATA_57CEA1
	dl DATA_57DBBA
	dl DATA_57E85A
	dl DATA_57F3C7
	dl DATA_57F85E
	dl DATA_57FDEA
	dl DATA_58025D
	dl DATA_5803E1
	dl DATA_5808D6
	dl DATA_580C65
	dl DATA_580FCD
	dl DATA_5814E1
	dl DATA_581B2C
	dl DATA_581FDA
	dl DATA_5822D0
	dl DATA_58285E
	dl DATA_582FC1
	dl DATA_5835E2
	dl DATA_583C34
	dl DATA_584016
	dl DATA_58451B
	dl DATA_584A74
	dl DATA_584FBF
	dl DATA_585A68
	dl DATA_586597
	dl DATA_58720F
	dl DATA_587E21
	dl DATA_5883AF
	dl DATA_5888CD
	dl DATA_588E8F
	dl DATA_589574
	dl DATA_589AE6
	dl DATA_589D4F
	dl DATA_589FC4
	dl DATA_58A2CD
	dl DATA_58A5D2
	dl DATA_58B241
	dl DATA_58BE20
	dl DATA_58C992
	dl DATA_58D774
	dl DATA_58E471
	dl DATA_58EE33
	dl DATA_58F928
	dl DATA_5902AB
	dl DATA_590E7D
	dl DATA_591A64
	dl DATA_592757
	dl DATA_593432
	dl DATA_5941AC
	dl DATA_594E69
	dl DATA_595892
	dl DATA_5964EC
	dl DATA_597241
	dl DATA_597F14
	dl DATA_598ABB
	dl DATA_5996AF
	dl DATA_599C37
	dl DATA_59A7C1
	dl DATA_59B3E4
	dl DATA_59C08B
	dl DATA_59CD17
	dl DATA_59D92C
	dl DATA_59ED9E
	dl DATA_5A05C4
	dl DATA_5A1135
	dl DATA_5A17A3
	dl DATA_5A1CED
	dl DATA_5A235C
	dl DATA_5A28D6
	dl DATA_5A2EE2
	dl DATA_5A3453
	dl DATA_5A3944
	dl DATA_5A4110
	dl DATA_5A4608
	dl DATA_5A4C5F
	dl DATA_5A53A6
	dl DATA_5A5905
	dl DATA_5A5E25
	dl DATA_5A64A1
	dl DATA_5A6952
	dl DATA_5A6DE8
	dl DATA_5A736D
	dl DATA_5A7994
	dl DATA_5A8748
	dl DATA_5A9257
	dl DATA_5A97E0
	dl DATA_5A9C3D
	dl DATA_5AA0EF
	dl DATA_5AA75A
	dl DATA_5AAD40
	dl DATA_5AB189
	dl DATA_5AB630
	dl DATA_5ABC4D
	dl DATA_5ACAD1
	dl DATA_5AD992
	dl DATA_5AE7A0
	dl DATA_5AF2D5
	dl DATA_5AFE28
	dl DATA_5B03C0
	dl DATA_5B08CC
	dl DATA_5B0C94
	dl DATA_5B121D
	dl DATA_5B17A1
	dl DATA_5B1A25
	dl DATA_5B1CC2
	dl DATA_5B2058
	dl DATA_5B2323
	dl DATA_5B25DB
	dl DATA_5B278F
	dl DATA_5B28B2
	dl DATA_5B2A43
	dl DATA_5B2BAB
	dl DATA_5B2EA9
	dl DATA_5B32B7
	dl DATA_5B35C3
	dl DATA_5B3942
	dl DATA_5B3C69
	dl DATA_5B40C4
	dl DATA_5B457B
	dl DATA_5B4937
	dl DATA_5B4D88
	dl DATA_5B51E9
	dl DATA_5B561D
	dl DATA_5B5A43
	dl DATA_5B5DE5
	dl DATA_5B6042
	dl DATA_5B6270
	dl DATA_5B6446
	dl DATA_5B6718
	dl DATA_5B69A5
	dl DATA_5B6C06
	dl DATA_5B6DDC
	dl DATA_5B70B5
	dl DATA_5B7361
	dl DATA_5B75AB
	dl DATA_5B77F0
	dl DATA_5B7AA3
	dl DATA_5B7B89
	dl DATA_5B7D18
	dl DATA_5B7EBC
	dl DATA_5B8070
	dl DATA_5B83C7
	dl DATA_5B85A0
	dl DATA_5B8C16
	dl DATA_5B8CE5
	dl DATA_5B8D8F
	dl DATA_5B8E39
	dl DATA_5B8F62
	dl DATA_5B9179
	dl DATA_5B92A1
	dl DATA_5B92AD
	dl DATA_5B93BC
	dl DATA_5B93C8
	dl DATA_5B94C1
	dl DATA_5B9588
	dl DATA_5B9669
	dl DATA_5B9A2E
	dl DATA_5B9BF5
	dl DATA_5B9F48
	dl DATA_5BA1BE
	dl DATA_5BA405
	dl DATA_5BA6A5
	dl DATA_5BA99E
	dl DATA_5BAD4E
	dl DATA_5BAE23
	dl DATA_5BBAC5
	dl DATA_5BBE47
	dl DATA_5BC472
	dl DATA_5BCB3F
	dl DATA_5BD161
	dl DATA_5BD781
	dl DATA_5BDC95
	dl DATA_5BE14B
	dl DATA_5BE7E6
	dl DATA_5BEDDD
	dl DATA_5BF3C3
	dl DATA_5BF986
	dl DATA_5BFCA8
	dl DATA_5C0892
	dl DATA_5C0BEA
	dl DATA_5C12CD
	dl DATA_5C145A
	dl DATA_5C1996
	dl DATA_5C1BFA
	dl DATA_5C1DA2
	dl DATA_5C1ED3
	dl DATA_5C24BA
	dl DATA_5C2658
	dl DATA_5C28B0
	dl DATA_5C2A9D
	dl DATA_5C340D
	dl DATA_5C3545
	dl DATA_5C3A30
	dl DATA_5C3D29
	dl DATA_5C3EDA
	dl DATA_5C437B
	dl DATA_5C4711
	dl DATA_5C490A
	dl DATA_5C50AB
	dl DATA_5C532C
	dl DATA_5C5727
	dl DATA_5C573B
	dl DATA_5C5839
	dl DATA_5C5CA3
	dl DATA_5C5D18
	dl DATA_5C6148
	dl DATA_5C63B8
	dl DATA_5C654D
	dl DATA_5C6564
	dl DATA_5C6790
	dl DATA_5C69A5
	dl DATA_5C6C1C
	dl DATA_5C6E1A
	dl DATA_5C6E26
	dl DATA_5C6E32
	dl DATA_5C6E3E
	dl DATA_5C7083
	dl DATA_5C7170
	dl DATA_5C7532
	dl DATA_5C7782
	dl DATA_5C7A54
	dl DATA_5C7C40
	dl DATA_5C7D9D
	dl DATA_5C7FD3
	dl DATA_5C84DD
	dl DATA_5C84EE
	dl DATA_5C8653
	dl DATA_5C86E9
	dl DATA_5C8892
	dl DATA_5C8A60
	dl DATA_5C8DA4
	dl DATA_5C8DC6
	dl DATA_5C8EF6
	dl DATA_5C9024
	dl DATA_5C90C8
	dl DATA_5C9456
	dl DATA_5C94CD
	dl DATA_5C97A4
	dl DATA_5C981D
	dl DATA_5C98D3
	dl DATA_5C9AC1
	dl DATA_5C9D51
	dl DATA_5CA15C
	dl DATA_5CA51B
	dl DATA_5CA62A
	dl DATA_5CA824
	dl DATA_5CACB2
	dl DATA_5CAF37
	dl DATA_5CB2B0
	dl DATA_5CB518
	dl DATA_5CB71B
	dl DATA_5CB929

DATA_06FC79:
	dl DATA_5CBA89
	dl DATA_5CC342
	dl DATA_5CCB44
	dl DATA_5CD671
	dl DATA_5CDFC6
	dl DATA_5CE630
	dl DATA_5CEEE1
	dl DATA_5CF376
	dl DATA_5CF91E
	dl DATA_5CFF0B
	dl DATA_5D04ED
	dl DATA_5D0FEB
	dl DATA_5D180F
	dl DATA_5D1FFF
	dl DATA_5D26DE
	dl DATA_5D2F69
	dl DATA_5D351B
	dl DATA_5D3A65
	dl DATA_5D3F7A
	dl DATA_5D4050
	dl DATA_5D46D0
	dl DATA_5D4B93
	dl DATA_5D511D
	dl DATA_5D57EE
	dl DATA_5D5D3A
	dl DATA_5D6469
	dl DATA_5D6ACF
	dl DATA_5D6C99
	dl DATA_5D6DAC
	dl DATA_5D6EA2
	dl DATA_5D7033
	dl DATA_5D728B
	dl DATA_5D7466
	dl DATA_5D7623
	dl DATA_5D7810
	dl DATA_5D79BB
	dl DATA_5D7B30
	dl DATA_5D7C85
	dl DATA_5D7E57
	dl DATA_5D80A3
	dl DATA_5D82C8
	dl DATA_5D845B
	dl DATA_5D86B4
	dl DATA_5D87F8
	dl DATA_5D8990
	dl DATA_5D8B43
	dl DATA_5D8D2D
	dl DATA_5D8E69
	dl DATA_5D8FC6
	dl DATA_5D90F8
	dl DATA_5D9242
	dl DATA_5D93BD
	dl DATA_5D952A
	dl DATA_5D969C
	dl DATA_5D98F0
	dl DATA_5D9AEC
	dl DATA_5D9C49
	dl DATA_5D9DC6
	dl DATA_5D9FFA
	dl DATA_5DA191
	dl DATA_5DA389
	dl DATA_5DA536
	dl DATA_5DA714
	dl DATA_5DA960
	dl DATA_5DAB59
	dl DATA_5DACF1
	dl DATA_5DAE74
	dl DATA_5DAFBA
	dl DATA_5DB0F3
	dl DATA_5DB321
	dl DATA_5DB48B
	dl DATA_5DB5F0
	dl DATA_5DB80E
	dl DATA_5DBA3E
	dl DATA_5DBC21
	dl DATA_5DBDC1
	dl DATA_5DBF2C
	dl DATA_5DC0DF
	dl DATA_5DC1EC
	dl DATA_5DC3EF
	dl DATA_5DC58C
	dl DATA_5DC70B
	dl DATA_5DC885
	dl DATA_5DC947
	dl DATA_5DCA3E
	dl DATA_5DCC2E
	dl DATA_5DCE2B
	dl DATA_5DCFDF
	dl DATA_5DD119
	dl DATA_5DD286
	dl DATA_5DD445
	dl DATA_5DD5FB
	dl DATA_5DD7C6
	dl DATA_5DD930
	dl DATA_5DDAF4
	dl DATA_5DDCCE
	dl DATA_5DDE10
	dl DATA_5DDFB0
	dl DATA_5DE0E8
	dl DATA_5DE1DC
	dl DATA_5DE3A5
	dl DATA_5DE581
	dl DATA_5DE6E9
	dl DATA_5DE8AE
	dl DATA_5DEA53
	dl DATA_5DEC4C
	dl DATA_5DEDF4
	dl DATA_5DEFCA
	dl DATA_5DF13D
	dl DATA_5DF2C3
	dl DATA_5DF399
	dl DATA_5DF4BE
	dl DATA_5DF5A6
	dl DATA_5DF70A
	dl DATA_5DF804
	dl DATA_5E03D3
	dl DATA_5E0596
	dl DATA_5E0750
	dl DATA_5E0956
	dl DATA_5E0AB6
	dl DATA_5E0F30
	dl DATA_5E16FA
	dl DATA_5E1DD1
	dl DATA_5E2450
	dl DATA_5E2E3F
	dl DATA_5E3939
	dl DATA_5E3E16
	dl DATA_5E42AC
	dl DATA_5E4D55
	dl DATA_5E57A7
	dl DATA_5E5E4B
	dl DATA_5E6583
	dl DATA_5E6AAE
	dl DATA_5E70E0
	dl DATA_5E77FD
	dl DATA_5E829F
	dl DATA_5E9360
	dl DATA_5EA7C0
	dl DATA_5EBA21
	dl DATA_5EC639
	dl DATA_5ED157
	dl DATA_5ED7BE
	dl DATA_5EE3D2
	dl DATA_5EE999
	dl DATA_5EEC88
	dl DATA_5EF3B1
	dl DATA_5EF5DC
	dl DATA_5EF845
	dl DATA_5EFA6E
	dl DATA_5EFCD6
	dl DATA_5EFEFF
	dl DATA_5F01FE
	dl DATA_5F0576
	dl DATA_5F0922
	dl DATA_5F0BBB
	dl DATA_5F10E1
	dl DATA_5F15BA
	dl DATA_5F1960
	dl DATA_5F1D97
	dl DATA_5F21AB
	dl DATA_5F25FB
	dl DATA_5F2948
	dl DATA_5F2CAC
	dl DATA_5F2EB0
	dl DATA_5F3352
	dl DATA_5F3A70
	dl DATA_5F4013
	dl DATA_5F45B7
	dl DATA_5F4D68
	dl DATA_5F5485
	dl DATA_5F55D7
	dl DATA_5F5742
	dl DATA_5F5942
	dl DATA_5F5B92
	dl DATA_5F5D48
	dl DATA_5F5F21
	dl DATA_5F6126
	dl DATA_5F62D2
	dl DATA_5F6925
	dl DATA_5F6E88
	dl DATA_5F725C
	dl DATA_5F7906
	dl DATA_5F7AC9
	dl DATA_5F7CE1
	dl DATA_5F7EA6
	dl DATA_5F80B8
	dl DATA_5F8589

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($06FEAA, incbin, DATA_06FEAA_YI_U2.bin)
else
	%FREE_BYTES($06FEAA, 342, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank07Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

YI_NorSpr0F1_EggPlantShootingBubbles_Init:
;$078000
	LDA.w #$0006
	STA.w $7A98,x
	LDA.w #$005A
	STA.w $7A96,x
	RTL

;---------------------------------------------------------------------------

DATA_07800D:
	db $00,$06,$07

DATA_078010:
	db $04,$04,$04,$14,$02,$20,$02,$04

DATA_078018:
	db $00,$02,$01,$02,$05,$03,$05,$04

YI_NorSpr0F1_EggPlantShootingBubbles_Main:
;$078020
	JSL.l CODE_03AF23
	JSR.w CODE_078425
	LDA.b $16,x
	BNE.b CODE_078055
	LDA.w $7A96,x
	BEQ.b CODE_078055
	LDA.w $7A98,x
	BEQ.b CODE_078036
	RTL

CODE_078036:
	LDA.w #$0006
	STA.w $7A98,x
	LDA.b $18,x
	INC
	CMP.w #$0003
	BCC.b CODE_078047
	LDA.w #$0000
CODE_078047:
	STA.b $18,x
	TAY
	LDA.w DATA_07800D,y
	AND.w #$00FF
	STA.w $7402,x
	BRA.b CODE_0780C0

CODE_078055:
	LDA.w $7AF6,x
	BNE.b CODE_0780AB
	LDA.b $16,x
	TAY
	INC.b $16,x
	LDA.w DATA_078010,y
	AND.w #$00FF
	STA.w $7AF6,x
	LDA.w DATA_078018,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$04
	BNE.b CODE_0780C0
	LDA.w #$0019
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	JSL.l CODE_03A34C
else
	JSL.l CODE_03A364
endif
	BCC.b CODE_0780C0
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0018
	STA.w $7182,y
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0004
	STA.w $7402,y
	LDA.w #$000A
	STA.w $7A98,y
	LDA.w $6FA0,y
	AND.w #$F9FF
	STA.w $6FA0,y
	BRA.b CODE_0780C0

CODE_0780AB:
	LSR
	BNE.b CODE_0780C0
	LDA.b $16,x
	CMP.w #$0008
	BNE.b CODE_0780C0
	STZ.b $16,x
	STZ.w $7402,x
	LDA.w #$005A
	STA.w $7A96,x
CODE_0780C0:
	RTL

;---------------------------------------------------------------------------

DATA_0780C1:
	db $FF,$9F

YI_NorSpr0F4_EggPlant_Init:
;$0780C3
	JSL.l CODE_02A007
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LSR
	TAY
	LDA.w $6FA3,x
	AND.w DATA_0780C1,y
	STA.w $6FA3,x
	LDY.b #$03
	STY.b $18,x
	LDA.w DATA_078119,y
	STA.w $7402,x
	LDA.w DATA_07811D,y
	STA.w $7A96,x
	REP.b #$20
	BRA.b CODE_07810C

YI_NorSpr0F4_EggPlant_Main:
;$0780F3
	JSL.l CODE_03AF23
	JSR.w CODE_078425
	LDA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	ORA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	BEQ.b CODE_078103
	RTL

CODE_078103:
	JSR.w CODE_078411
	LDY.b $16,x
	TYX
	JSR.w (DATA_078113,x)
CODE_07810C:
	LDA.w $60C0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

DATA_078113:
	dw CODE_07813D
	dw CODE_07838A
	dw CODE_0783C9

DATA_078119:
	db $02,$01,$02,$00

DATA_07811D:
	db $04,$02,$02,$04

DATA_078121:
	dw $0000,$0080,$FF80,$0100,$FF00,$0040,$FFC0,$00C0

DATA_078131:
	dw $0040,$FFC0,$0080,$FF80,$0100,$FF00

CODE_07813D:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07815B
	LDY.b $18,x
	DEY
	BMI.b CODE_07815C
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_078119,y
	STA.w $7402,x
	LDA.w DATA_07811D,y
	STA.w $7A96,x
	REP.b #$20
CODE_07815B:
	RTS

CODE_07815C:
	SEP.b #$20
	INC.b $16,x
	INC.b $16,x
	LDY.b #$03
	STY.b $18,x
	LDA.w DATA_078382,y
	STA.w $7402,x
	LDA.w DATA_078386,y
	STA.w $7A96,x
	REP.b #$20
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYX
	JMP.w (DATA_07817B,x)

DATA_07817B:
	dw CODE_07817F
	dw CODE_078297

CODE_07817F:
	LDX.b $12
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0006
	BCS.b CODE_0781FB
	CMP.w #$0005
	BEQ.b CODE_0781A0
	LDY.b $17,x
	BEQ.b CODE_0781A0
	JMP.w CODE_078238

CODE_0781A0:
	LDA.b $10
	AND.w #$0007
	ASL
	CMP.b $78,x
	BNE.b CODE_0781AF
	INC
	INC
	AND.w #$000E
CODE_0781AF:
	STA.b $78,x
	TAY
	LDA.w DATA_078121,y
	STA.b $00
	LDA.w #$0025
	JSL.l CODE_03A364
	BCC.b CODE_0781FB
	LDA.w #$0002
	STA.w $74A2,y
	STA.w $7A36,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0014
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	RTS

CODE_0781FB:
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0014
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7E4C,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0002
	STA.w $7462,y
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID37_FlutterJump
	JSL.l CODE_0085D2
	RTS

CODE_078238:
	LDA.w #$0006
	SEC
	SBC.w !REGISTER_SuperFX_R6_MultiplierLo
	DEC
	STA.b $00
	LDY.b #$00
	STY.b $17,x
CODE_078246:
	LDA.b $00
	ASL
	TAY
	LDA.w DATA_078131,y
	STA.b $02
	LDA.w #$0025
	JSL.l CODE_03A364
	BCC.b CODE_07828F
	LDA.w #$0002
	STA.w $74A2,y
	STA.w $7A36,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0014
	STA.w $7182,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	DEC.b $00
	BPL.b CODE_078246
CODE_07828F:
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	RTS

CODE_078297:
	LDX.b $12
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0006
	BCS.b CODE_0782DE
	STA.b $00
	LDA.w #$0163
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0164
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CLC
	ADC.b $00
	STA.b $00
	CMP.w #$0006
	BCS.b CODE_0782DE
	CMP.w #$0005
	BEQ.b CODE_0782E1
	LDY.b $17,x
	BEQ.b CODE_0782E1
	JMP.w CODE_078330

CODE_0782DE:
	JMP.w CODE_0781FB

CODE_0782E1:
	LDA.b $10
	AND.w #$0007
	ASL
	CMP.b $78,x
	BNE.b CODE_0782F0
	INC
	INC
	AND.w #$000E
CODE_0782F0:
	STA.b $78,x
	TAY
	LDA.w DATA_078121,y
	STA.b $00
	LDA.w #$0163
	JSL.l CODE_03A364
	BCC.b CODE_0782DE
	LDA.w #$0002
	STA.w $74A2,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0014
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	RTS

CODE_078330:
	LDA.w #$0006
	SEC
	SBC.b $00
	DEC
	STA.b $00
	LDY.b #$00
	STY.b $17,x
CODE_07833D:
	LDA.b $00
	ASL
	TAY
	LDA.w DATA_078131,y
	STA.b $02
	LDA.w #$0163
	JSL.l CODE_03A364
	BCC.b CODE_07837A
	LDA.w #$0002
	STA.w $74A2,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0014
	STA.w $7182,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	DEC.b $00
	BPL.b CODE_07833D
CODE_07837A:
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	RTS

DATA_078382:
	db $09,$0A,$09,$08

DATA_078386:
	db $02,$08,$02,$04

CODE_07838A:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0783A8
	LDY.b $18,x
	DEY
	BMI.b CODE_0783A9
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_078382,y
	STA.w $7402,x
	LDA.w DATA_078386,y
	STA.w $7A96,x
	REP.b #$20
CODE_0783A8:
	RTS

CODE_0783A9:
	SEP.b #$20
	INC.b $16,x
	INC.b $16,x
	LDY.b #$02
	STY.b $18,x
	LDA.w DATA_0783C6,y
	STA.w $7402,x
	LDA.b #$06
	STA.w $7A96,x
	LDA.b #$20
	STA.w $7A98,x
	REP.b #$20
	RTS

DATA_0783C6:
	db $07,$06,$00

CODE_0783C9:
	LDX.b $12
	LDY.b $17,x
	BNE.b CODE_0783D4
	LDA.w $7A98,x
	BNE.b CODE_0783DC
CODE_0783D4:
	LDA.w $7402,x
	CMP.w #$0000
	BEQ.b CODE_0783FA
CODE_0783DC:
	LDA.w $7A96,x
	BNE.b CODE_0783F9
	LDY.b $18,x
	DEY
	BPL.b CODE_0783E8
	LDY.b #$02
CODE_0783E8:
	STY.b $18,x
	SEP.b #$20
	LDA.b #$06
	STA.w $7A96,x
	LDA.w DATA_0783C6,y
	STA.w $7402,x
	REP.b #$20
CODE_0783F9:
	RTS

CODE_0783FA:
	SEP.b #$20
	STZ.b $16,x
	LDY.b #$03
	STY.b $18,x
	LDA.w DATA_078119,y
	STA.w $7402,x
	LDA.w DATA_07811D,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_078411:
	LDA.w $60D4
	BEQ.b CODE_078424
	LDA.w $60C0
	BNE.b CODE_078424
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_078424
	LDY.b #$01
	STY.b $17,x
CODE_078424:
	RTS

CODE_078425:
	LDA.w #$0040
	STA.w $7542,x
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7BB6,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7BB8,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_09933A>>16
	LDA.w #FXCODE_09933A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_078485
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w #$0008
	BPL.b CODE_078485
	CPY.b $12
	BCC.b CODE_078486
CODE_07845F:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	CMP.w #$0100
	BPL.b CODE_07846A
	LDA.w #$0100
CODE_07846A:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7CD8,y
	SEC
	SBC.w $7BB8,y
	SEC
	SBC.w #$000E
	STA.w $7182,x
	LDA.w $70E2,x
	CLC
	ADC.w $72C0,y
	STA.w $70E2,x
CODE_078485:
	RTS

CODE_078486:
	STY.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	JSL.l CODE_03A366
	BCS.b CODE_078495
	LDY.b $00
	BRA.b CODE_07845F

CODE_078495:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $16,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.b $18,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.b $76,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.b $78,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w $7A36,x
	STA.w $7A36,y
	LDA.w $7A38,x
	STA.w $7A38,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w $7A96,x
	STA.w $7A96,y
	LDA.w $7A98,x
	STA.w $7A98,y
	LDA.w $7AF6,x
	STA.w $7AF6,y
	LDA.w $7AF8,x
	STA.w $7AF8,y
	LDA.w $7402,x
	STA.w $7402,y
	LDA.w $7860,x
	STA.w $7860,y
	LDA.w $7720,x
	STA.w $7720,y
	LDA.w $7680,x
	STA.w $7680,y
	LDA.w $7682,x
	STA.w $7682,y
	LDA.w $6FA2,x
	STA.w $6FA2,y
	SEP.b #$20
	LDA.w $74A0,x
	STA.w $74A0,y
	REP.b #$20
	PLA
	JML.l CODE_03A32E

;---------------------------------------------------------------------------

; Note: Green baseball boy routine

DATA_078518:
	db $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F
	db $10,$11,$12,$13,$14,$15,$16,$17

DATA_078530:
	dw $FFA0,$0060

DATA_078534:
	dw $0060,$FFA0

DATA_078538:
	dw $0000,$0002,$0004,$0008

YI_NorSpr0F2_ShyguyOnStilts_Init:
;$078540
 	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_07856B
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.w #$0010
	ORA.b $00
	LSR
	LSR
	TAY
	LDA.w DATA_078538,y
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7042,x
	ORA.w DATA_078538,y
	STA.w $7042,x
	BRA.b CODE_078575

CODE_07856B:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7042,x
	STA.w $7042,x
CODE_078575:
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w #$0000
	STA.w $7402,x
	LDY.w $7400,x
	LDA.w #$0001
	STA.b $18,x
	LDA.w $7860,x
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0F2_ShyguyOnStilts_Main:
;$07858F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0785A8
	STZ.w $6162
	STZ.w $6168
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLY
	PLA
	JSR.w CODE_07874D
CODE_0785A8:
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BPL.b CODE_07860A
	LDA.w $60D4
	BEQ.b CODE_07860A
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_07860A
	LDY.w $7400,x
	LDA.w DATA_078530,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1F7
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$00C0
	STA.w $7782,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7002,y
	STA.w $7002,y
	JSL.l CODE_0CFF61
	JML.l CODE_03B273

CODE_07860A:
	LDA.b $16,x
	TAX
	JMP.w (DATA_078610,x)

DATA_078610:
	dw CODE_078644
	dw CODE_0786C6

DATA_078614:
	dw $0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$FFFE,$FFFF
	dw $FFFE,$FFFF,$FFFE,$FFFF,$0000,$FFFF,$0000,$FFFF
	dw $0000,$0000,$FFFE,$FFFE,$FFFE,$FFFF,$FFFE,$FFFF

CODE_078644:
	LDX.b $12
	JSR.w CODE_0786EE
	LDA.w $7860,x
	STA.b $78,x
	JSR.w CODE_078737
	JSL.l CODE_03A5B7
	LDA.w $7A96,x
	BNE.b CODE_0786C5
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w $7402,x
	STA.b $00
	CLC
	ADC.b $18,x
	CMP.w #$0018
	BCC.b CODE_078670
	LDA.w #$0000
CODE_078670:
	STA.w $7402,x
	LDA.b $18,x
	BPL.b CODE_078689
	LDA.b $00
	ASL
	TAY
	LDA.w DATA_078614,y
	LDY.w $7400,x
	BNE.b CODE_0786A2
	EOR.w #$FFFF
	INC
	BRA.b CODE_0786A2

CODE_078689:
	CLC
	ADC.b $00
	CMP.w #$0018
	BCC.b CODE_078694
	LDA.w #$0000
CODE_078694:
	ASL
	TAY
	LDA.w DATA_078614,y
	LDY.w $7400,x
	BEQ.b CODE_0786A2
	EOR.w #$FFFF
	INC
CODE_0786A2:
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	LDA.b $18,x
	BPL.b CODE_0786C5
	LDA.w $7402,x
	BEQ.b CODE_0786B7
	CMP.w #$000C
	BNE.b CODE_0786C5
CODE_0786B7:
	LDA.w #$0001
	STA.b $18,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0786C5:
	RTL

CODE_0786C6:
	LDX.b $12
	LDA.w $7860,x
	STA.b $78,x
	JSL.l CODE_03A5B7
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0786E3
	DEC.b $76,x
	BMI.b CODE_0786E4
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0786E3:
	RTL

CODE_0786E4:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $16,x
	RTL

DATA_0786EA:
	dw $0008,$0004

CODE_0786EE:
	LDA.w $7400,x
	LDY.b $18,x
	BPL.b CODE_0786F8
	EOR.w #$0002
CODE_0786F8:
	TAY
	LDA.w $7860,x
	AND.w DATA_0786EA,y
	BEQ.b CODE_07870A
	LDA.b $18,x
	EOR.w #$FFFF
	INC
	STA.b $18,x
	RTS

CODE_07870A:
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_07872F
	LDA.b $78,x
	BIT.w #$0001
	BEQ.b CODE_078730
	LDA.l $70276E,x
	STA.w $70E2,x
	LDA.l $702770,x
	STA.w $7182,x
	LDA.b $18,x
	EOR.w #$FFFF
	INC
	STA.b $18,x
CODE_07872F:
	RTS

CODE_078730:
	LDA.w $7860,x
	STA.b $78,x
	PLA
	RTL

CODE_078737:
	LDY.w $7D36,x
	BPL.b CODE_078754
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_078749
	JSL.l CODE_07FC2F
	BEQ.b CODE_078753
	BCS.b CODE_078753
CODE_078749:
	JSL.l CODE_03A858
CODE_07874D:
	LDY.w $77C2,x
	JMP.w CODE_07880B

CODE_078753:
	RTS

CODE_078754:
	DEY
	BMI.b CODE_078753
	BEQ.b CODE_078753
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_078753
	LDA.w $7D38,y
	BEQ.b CODE_078753
	LDA.w $7CD8,x
	SEC
	SBC.w #$0008
	CMP.w $7CD8,y
	BPL.b CODE_07878C
	PHY
	TYX
	JSL.l CODE_03B24B
	PLY
	LDX.b $12
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	JMP.w CODE_07880B

CODE_07878C:
	LDA.w $7542,y
	CMP.w #$0040
	BMI.b CODE_078798
	PLA
	JMP.w CODE_078826

CODE_078798:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $00
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr1F7
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$00C0
	STA.w $7782,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7002,y
	STA.w $7002,y
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	LDA.w $7040,x
	AND.w #$07FF
	ORA.w #$1800
	STA.w $7040,x
	SEP.b #$20
	STZ.w $7180,x
	REP.b #$20
	STZ.w $7402,x
	LDA.w $7182,x
	SEC
	SBC.w #$0020
	STA.w $7182,x
	PLA
	JML.l CODE_03B25B

CODE_07880B:
	LDA.w DATA_078534,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0015
	STA.w $7402,x
	LDA.w #$0003
	STA.b $76,x
	LDY.b #$02
	STY.b $16,x
	PLA
	RTL

DATA_078822:
	dw $0080,$FF80

CODE_078826:
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
YI_NorSpr0F2_ShyguyOnStilts_StompRt:
	PHX
	LDA.w #!Define_YI_AmbSpr1F7
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7002,y
	STA.w $7002,y
	LDA.w $7400,x
	STA.w $73C0,y
	TAX
	LDA.w DATA_0791BA,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$00C0
	STA.w $7782,y
	PLX
	PHY
	JSL.l CODE_03A331
	PLY
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	TXY
	JSL.l CODE_03A377
	LDA.w $7182,x
	SEC
	SBC.w #$0018
	STA.w $7182,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07888A
	CMP.w #$000E
	BNE.b CODE_078890
CODE_07888A:
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_078890:
	RTL

;---------------------------------------------------------------------------

DATA_078891:
	dw $FF80,$0080

DATA_078895:
	db $16,$17,$18,$17,$19,$17,$18,$17,$19,$17,$18,$17,$19,$17,$17,$1A
	db $1B,$1A

YI_NorSpr0F5_Slugger_Init:
;$0788A7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0788B3
	LDA.w $70E2,x
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_0788B3:
	LDA.w DATA_078932
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_078891,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_0788CF:
	dw $FF00,$0100

YI_NorSpr0F5_Slugger_Main:
;$0788D3
	LDA.w $7042,x
	AND.w #$FFF1
	LDY.w $7D38,x
	BEQ.b CODE_0788E1
	ORA.w #$0004
CODE_0788E1:
	STA.w $7042,x
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0788F0
	JMP.w CODE_078EC3

CODE_0788F0:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_0788FB
	JSL.l CODE_07FC2A
	BCS.b CODE_07890A
CODE_0788FB:
	JSL.l CODE_03A5B7
	JSR.w CODE_078DE5
	TXY
	LDA.b $16,x
	ASL
	TAX
	JMP.w (DATA_078928,x)

CODE_07890A:
	LDY.w $77C2,x
	LDA.w DATA_0788CF,y
	STA.w $60A8
	STA.w $60B4
	LDA.w $6FA2,x
	AND.w #$FCFF
	STA.w $6FA2,x
	LDA.w #DATA_078895
	STA.b $00
	JSR.w CODE_07A580
	RTL

DATA_078928:
	dw CODE_078937
	dw CODE_078A26
	dw CODE_078AEA
	dw CODE_078BB5
	dw CODE_078CD4

DATA_078932:
	db $00,$01,$02,$03,$04

CODE_078937:
	TYX
	LDA.w $7400,x
	TAY
	LDA.w DATA_078891,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_078EF1
	BCC.b CODE_078962
	JSR.w CODE_078F2C
	BCC.b CODE_078962
	JSR.w CODE_078F27
	BCC.b CODE_078962
	LDA.w #$0030
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078CF1
	BMI.b CODE_07898D
CODE_078962:
	LDA.w #$0003
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0000
	STA.b $18,x
	TAY
	LDA.w DATA_078CB2,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078CC3,y
	AND.w #$00FF
	STA.w $7A96,x
	STZ.b $76,x
	JSR.w CODE_07A218
	RTL

CODE_07898D:
	LDA.w #$0020
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078D33
	BMI.b CODE_0789C9
	LDA.w #$0002
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0000
	STA.b $18,x
	TAY
	LDA.w DATA_078ADE,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078AE2,y
	AND.w #$00FF
	STA.w $7A96,x
	STZ.b $76,x
	JSR.w CODE_07A218
	RTL

CODE_0789C9:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0789DD
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	SEC
	SBC.w #$0018
	CMP.w $70E2,x
	BPL.b CODE_0789EA
	BRA.b CODE_0789FA

CODE_0789DD:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	CLC
	ADC.w #$0018
	CMP.w $70E2,x
	BPL.b CODE_0789FA
CODE_0789EA:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_078891,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0789FA:
	LDA.w $7A96,x
	BNE.b CODE_078A1D
	LDA.b $18,x
	INC
	CMP.w #$0005
	BCC.b CODE_078A0A
	LDA.w #$0000
CODE_078A0A:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_078932,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_078A1D:
	RTL

DATA_078A1E:
	db $08,$07,$06,$05

DATA_078A22:
	db $20,$04,$04,$10

CODE_078A26:
	TYX
	JSR.w CODE_078EF1
	BCC.b CODE_078A47
	JSR.w CODE_078F2C
	BCC.b CODE_078A47
	JSR.w CODE_078F27
	BCC.b CODE_078A47
	LDA.w #$0030
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078CF1
	BMI.b CODE_078A72
CODE_078A47:
	LDA.w #$0003
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0000
	STA.b $18,x
	TAY
	LDA.w DATA_078CB2,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078CC3,y
	AND.w #$00FF
	STA.w $7A96,x
	STZ.b $76,x
	JSR.w CODE_07A218
	RTL

CODE_078A72:
	LDA.w #$0020
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078D33
	BMI.b CODE_078AAE
	LDA.w #$0002
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0000
	STA.b $18,x
	TAY
	LDA.w DATA_078ADE,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078AE2,y
	AND.w #$00FF
	STA.w $7A96,x
	STZ.b $76,x
	JSR.w CODE_07A218
	RTL

CODE_078AAE:
	LDA.w $7A96,x
	BNE.b CODE_078ADD
	LDA.b $18,x
	INC
	CMP.w #$0004
	BCC.b CODE_078AC7
	LDA.w #$0000
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $16,x
	RTL

CODE_078AC7:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_078A1E,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078A22,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_078ADD:
	RTL

DATA_078ADE:
	db $05,$06,$07,$08

DATA_078AE2:
	db $04,$02,$02,$02

DATA_078AE6:
	dw $FFE8,$0018

CODE_078AEA:
	TYX
	JSR.w CODE_078EF1
	BCC.b CODE_078B1C
	JSR.w CODE_078F2C
	BCC.b CODE_078B1C
	JSR.w CODE_078F27
	BCC.b CODE_078B1C
	LDA.w #$0018
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078D33
	BPL.b CODE_078B1C
	LDA.w #$0030
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078CF1
	BMI.b CODE_078B47
CODE_078B1C:
	LDA.w #$0003
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0000
	STA.b $18,x
	TAY
	LDA.w DATA_078CB2,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078CC3,y
	AND.w #$00FF
	STA.w $7A96,x
	STZ.b $76,x
	JSR.w CODE_07A218
	RTL

CODE_078B47:
	LDA.w #$0020
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078D33
	BPL.b CODE_078B8E
	LDA.w #$0001
	STA.b $16,x
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0000
	STA.b $18,x
	TAY
	LDA.w DATA_078A1E,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078A22,y
	AND.w #$00FF
	STA.w $7A96,x
	RTL

CODE_078B7B:
	CMP.w $7400,x
	BEQ.b CODE_078B8E
	STA.w $7400,x
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_078AE6,y
	STA.w $70E2,x
CODE_078B8E:
	LDA.w $7A96,x
	BNE.b CODE_078BB4
	LDA.b $18,x
	INC
	CMP.w #$0004
	BCC.b CODE_078B9E
	LDA.w #$0003
CODE_078B9E:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_078ADE,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078AE2,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_078BB4:
	RTL

CODE_078BB5:
	LDX.b $12
	LDY.b $18,x
	CPY.b #$08
	BCC.b CODE_078BC2
	JSR.w CODE_078F2C
	BCC.b CODE_078BEB
CODE_078BC2:
	LDA.b $18,x
	SEC
	SBC.w #$0001
	CMP.w #$0007
	BCC.b CODE_078C0B
	CMP.w #$0010
	BCS.b CODE_078BE8
	LDA.w #$0030
	STA.b $04
	STA.b $08
	ASL
	STA.b $06
	STA.b $0A
	JSR.w CODE_078CF1
	BMI.b CODE_078BE8
	TYA
	CMP.b $78,x
	BNE.b CODE_078BEB
CODE_078BE8:
	JMP.w CODE_078C84

CODE_078BEB:
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0000
	STA.b $18,x
	TAY
	LDA.w DATA_078CB2,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078CC3,y
	AND.w #$00FF
	STA.w $7A96,x
	STZ.b $76,x
	RTL

CODE_078C0B:
	LDA.b $76,x
	BNE.b CODE_078C84
	JSR.w CODE_078E3E
	JSR.w CODE_078F76
	JSR.w CODE_078FA0
	LDA.w #$0008
	STA.b $04
	ASL
	STA.b $06
	LDA.w #$0010
	STA.b $08
	ASL
	STA.b $0A
	JSR.w CODE_078CF1
	BMI.b CODE_078C84
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_078C47
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_078C47
	LDA.w #$0001
	STA.w $7A36,y
	SEP.b #$20
	STA.w $77C0,y
	REP.b #$20
CODE_078C47:
	LDA.w $70E2,y
	SEC
	SBC.w $72C0,y
	STA.w $70E2,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $7182,y
	SEC
	SBC.w $72C2,y
	STA.w $7182,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	TYA
	STA.b $78,x
	INC.b $76,x
	LDA.w $7CD6,y
	STA.b $00
	LDA.w $7CD8,y
	STA.b $02
	JSR.w CODE_07FD16
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
CODE_078C84:
	LDA.w $7A96,x
	BNE.b CODE_078CB1
	LDA.b $18,x
	INC
	CMP.w #$0011
	BCC.b CODE_078C9B
	LDA.w #$0000
	STA.w $7A96,x
	INC.b $16,x
	BRA.b CODE_078CB1

CODE_078C9B:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_078CB2,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_078CC3,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_078CB1:
	RTL

DATA_078CB2:
	db $08,$06,$09,$0A,$0B,$0C,$0D,$0E,$0F,$10,$11,$12,$13,$14,$15,$09
	db $05

DATA_078CC3:
	db $01,$01,$01,$01,$01,$01,$01,$01,$20,$01,$01,$01,$02,$02,$03,$03
	db $10

CODE_078CD4:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_078CF0
	LDA.w #$0000
	STA.b $16,x
	STZ.b $18,x
	LDA.w DATA_078932
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_078CF0:
	RTL

CODE_078CF1:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHX
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_078D32
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	PHA
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $02
	PLA
	CLC
	ADC.b $04
	CMP.b $06
CODE_078D1B:
	BCS.b CODE_078D2F
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.b $08
	CMP.b $0A
	BCS.b CODE_078D2F
	CPY.b #$00
	BRA.b CODE_078D32

CODE_078D2F:
	LDA.w #$FFFF
CODE_078D32:
	RTS

CODE_078D33:
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	PHA
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $02
	PLA
	CLC
	ADC.b $04
	CMP.b $06
	BCS.b CODE_078D5D
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.b $08
	CMP.b $0A
	BCS.b CODE_078D5D
	LDA.b $02
	BRA.b CODE_078D60

CODE_078D5D:
	LDA.w #$FFFF
CODE_078D60:
	RTS

DATA_078D61:
	dw $000A,$FFF6,$000A,$FFF6,$000A,$FFF6,$000B,$FFF5
	dw $000A,$FFF6,$0008,$FFF8,$000C,$FFF4,$000F,$FFF1
	dw $0008,$FFF8,$0010,$FFF0,$0008,$FFF8,$FFEC,$0014
	dw $FFEE,$0012,$FFFA,$0006,$0008,$FFF8,$0009,$FFF7
	dw $0001,$FFFF,$FFF6,$000A,$FFEC,$0014,$FFEE,$0012
	dw $0001,$FFFF,$000F,$FFF1

DATA_078DB9:
	dw $FFF7,$FFF6,$FFF5,$FFF6,$FFF8,$FFF3,$FFF3,$FFF1
	dw $FFED,$FFF7,$0009,$0004,$FFF4,$FFEC,$FFEE,$FFF1
	dw $FFEC,$FFEC,$FFF7,$0009,$000D,$0006

CODE_078DE5:
	LDA.w $6122
	ASL
	CLC
	ADC.w #$0004
	STA.b $00
	LDA.w $6120
	ASL
	CLC
	ADC.w #$0004
	STA.b $02
	LDA.w $7402,x
	ASL
	TAY
	LDA.w $7CD8,x
	CLC
	ADC.w DATA_078DB9,y
	SEC
	SBC.w $611E
	CLC
	ADC.w $6122
	CLC
	ADC.w #$0002
	CMP.b $00
	BCS.b CODE_078E39
	LDA.w $7402,x
	ASL
	ASL
	ORA.w $7400,x
	TAY
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_078D61,y
	SEC
	SBC.w $611C
	CLC
	ADC.w $6120
	CLC
	ADC.w #$0002
	CMP.b $02
	BCS.b CODE_078E39
	JSL.l CODE_03A858
CODE_078E39:
	RTS

DATA_078E3A:
	dw $FE00,$0200

CODE_078E3E:
	LDA.b $76
	CMP.w #$000B
	BNE.b CODE_078EC2
	LDA.w $7BB8
	ASL
	CLC
	ADC.w #$0004
	STA.b $00
	LDA.w $7BB6
	ASL
	CLC
	ADC.w #$0004
	STA.b $02
	LDA.w $7402,x
	ASL
	TAY
	LDA.w $7CD8,x
	CLC
	ADC.w DATA_078DB9,y
	SEC
	SBC.w $7CD8
	CLC
	ADC.w $7BB8
	CLC
	ADC.w #$0002
	CMP.b $00
	BCS.b CODE_078E95
	LDA.w $7402,x
	ASL
	ASL
	ORA.w $7400,x
	TAY
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_078D61,y
	SEC
	SBC.w $7CD6
	CLC
	ADC.w $7BB6
	CLC
	ADC.w #$0002
	CMP.b $02
	BCC.b CODE_078E9B
CODE_078E95:
	LDY.w $7D36,x
	DEY
	BNE.b CODE_078EC2
CODE_078E9B:
	LDY.w $7400,x
	LDA.w DATA_078E3A,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w $7CD6
	STA.b $00
	LDA.w $7CD8
	STA.b $02
	JSR.w CODE_07FD16
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
CODE_078EC2:
	RTS

CODE_078EC3:
	LDY.w $7D36,x
	BPL.b CODE_078EDA
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BEQ.b CODE_078ED1
	JML.l CODE_03B273

CODE_078ED1:
	JSL.l CODE_07FC2F
	BCC.b CODE_078EDA
	JMP.w CODE_07890A

CODE_078EDA:
	LDA.w #DATA_078895
	STA.b $00
	JSR.w CODE_07A623
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_078EF0
	LDA.w $6FA2,x
	ORA.w #$0100
	STA.w $6FA2,x
CODE_078EF0:
	RTL

CODE_078EF1:
	LDA.b $76
	CMP.w #$000B
	BNE.b CODE_078F25
	LDA.w $70E2,x
	SEC
	SBC.w $70E2
	STA.b $02
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_078F25
	LDY.b #$00
	LDA.b $02
	BPL.b CODE_078F12
	INY
	INY
CODE_078F12:
	TYA
	STA.b $02
	LDA.w $7182,x
	SEC
	SBC.w $7182
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_078F26
CODE_078F25:
	SEC
CODE_078F26:
	RTS

CODE_078F27:
	LDA.w #$011D
	BRA.b CODE_078F2F

CODE_078F2C:
	LDA.w #$009E
CODE_078F2F:
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098EBF>>16
	LDA.w #FXCODE_098EBF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_078F70
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	PHA
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $02
	PLA
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_078F70
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_078F71
CODE_078F70:
	SEC
CODE_078F71:
	RTS

DATA_078F72:
	dw $FC00,$0400

CODE_078F76:
	LDY.w $7400,x
	LDA.w DATA_078F72,y
	STA.b $0E
	LDA.w #$009E
	JSR.w CODE_078FD4
	BCS.b CODE_078F9F
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $7CD6,y
	STA.b $00
	LDA.w $7CD8,y
	STA.b $02
	JSR.w CODE_07FD16
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
CODE_078F9F:
	RTS

CODE_078FA0:
	LDY.w $7400,x
	LDA.w DATA_078F72,y
	STA.b $0E
	LDA.w #$011D
	JSR.w CODE_078FD4
	BCS.b CODE_078FD3
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7CD6,y
	STA.b $00
	LDA.w $7CD8,y
	STA.b $02
	JSR.w CODE_07FD16
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
CODE_078FD3:
	RTS

CODE_078FD4:
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098EBF>>16
	LDA.w #FXCODE_098EBF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_07901F
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $02
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_07900A
	EOR.w #$FFFF
	INC
CODE_07900A:
	CMP.b $00
	BCS.b CODE_079020
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07901B
	EOR.w #$FFFF
	INC
CODE_07901B:
	CMP.b $02
	BCC.b CODE_079020
CODE_07901F:
	SEC
CODE_079020:
	RTS

;---------------------------------------------------------------------------

DATA_079021:
	dw $FFA8,$0058

YI_NorSpr0FB_LongSpearGuy_Init:
;$079025
	LDA.w #DATA_079261
	STA.b $18,x
	LDA.w #$0800
	BRA.b CODE_079037

YI_NorSpr0FC_ShortSpearGuy_Init:
;$07902F
	LDA.w #DATA_07926D
	STA.b $18,x
	LDA.w #$0000
CODE_079037:
	STA.b $78,x
	LDA.w #$0004
	STA.b $16,x
	SEP.b #$20
	TAY
	LDA.b #$04
	STA.w $7A96,x
	LDA.w DATA_07906F,y
	STA.w $7402,x
	TAY
	LDA.w DATA_079078,y
	STA.w $7B56,x
	LDA.w DATA_07907E,y
	STA.w $7BB6,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_079021,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_07906B:
	dw $0004,$0002

DATA_07906F:
	db $04,$03,$02,$01,$00,$04,$04,$30,$01

DATA_079078:
	db $08,$08,$08,$08,$08,$06

DATA_07907E:
	db $06,$06,$06,$06,$06,$0A

DATA_079084:
	dw $0020,$0020

DATA_079088:
	dw $0200,$FE00

DATA_07908C:
	dw $FFE0,$0020

YI_NorSpr0FB_LongSpearGuy_Main:
YI_NorSpr0FC_ShortSpearGuy_Main:
;$079090
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BEQ.b CODE_07909B
	JMP.w CODE_0790D1

CODE_07909B:
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w $7400,x
	BEQ.b CODE_0790A9
CODE_0790A6:
	JMP.w CODE_0791BF

CODE_0790A9:
	LDA.w $6150
	CMP.w #$0003
	BCS.b CODE_0790A6
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $6162
	STZ.w $6168
	PLA
	PLY
	JSL.l CODE_03AF23
	JSR.w CODE_079377
	LDY.b #$02
	BRA.b CODE_0790E1

CODE_0790D1:
	JSL.l CODE_03AF23
	JSL.l CODE_03A5B7
	JSR.w CODE_079279
	BPL.b CODE_0790E1
	JMP.w CODE_079135

CODE_0790E1:
	LDA.w DATA_07906B,y
	STA.b $76,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0005
	STA.w $7402,x
	TAY
	LDA.w DATA_079078,y
	AND.w #$00FF
	STA.w $7B56,x
	LDA.w DATA_07907E,y
	AND.w #$00FF
	STA.w $7BB6,x
	LDA.w $6FA2,x
	AND.w #$FC3F
	ORA.w #$0080
	STA.w $6FA2,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	LDY.w $7D36,x
	DEY
	BMI.b CODE_079135
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_079135
	LDA.w $7D38,y
	BEQ.b CODE_079135
	TYX
	JSL.l CODE_03B25B
	JSR.w CODE_079377
CODE_079135:
	TXY
	LDX.b $76,y
	JMP.w (DATA_07913B,x)

DATA_07913B:
	dw CODE_079141
	dw CODE_07916F
	dw CODE_0791BE

CODE_079141:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_07916E
	DEC.b $16,x
	BPL.b CODE_079150
	LDA.w #$0004
	STA.b $16,x
CODE_079150:
	SEP.b #$20
	LDY.b $16,x
	LDA.b #$04
	STA.w $7A96,x
	LDA.w DATA_07906F,y
	STA.w $7402,x
	TAY
	LDA.w DATA_079078,y
	STA.w $7B56,x
	LDA.w DATA_07907E,y
	STA.w $7BB6,x
	REP.b #$20
CODE_07916E:
	RTL

CODE_07916F:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_079178
	STZ.w $7540,x
CODE_079178:
	LDA.w $7A96,x
	BNE.b CODE_0791B9
	LDA.w #$0004
	STA.b $16,x
	SEP.b #$20
	TAY
	LDA.b #$04
	STA.w $7A96,x
	LDA.w DATA_07906F,y
	STA.w $7402,x
	TAY
	LDA.w DATA_079078,y
	STA.w $7B56,x
	LDA.w DATA_07907E,y
	STA.w $7BB6,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_079021,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.b $76,x
	LDA.w $6FA2,x
	AND.w #$FC3F
	ORA.w #$0140
	STA.w $6FA2,x
CODE_0791B9:
	RTL

DATA_0791BA:
	dw $FF00,$0100

CODE_0791BE:
	TYX
CODE_0791BF:
	JSR.w CODE_0791E7
	JSL.l CODE_03A331
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	TXY
	JSL.l CODE_03A377
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7042,x
	STA.w $7042,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0791E6
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_0791E6:
	RTL

CODE_0791E7:
	PHX
	LDA.w #!Define_YI_AmbSpr1EA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w $7400,x
	STA.w $73C0,y
	TAX
	LDA.w DATA_0791BA,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0020
	STA.w $7782,y
	PLX
	PHX
	LDA.w #!Define_YI_AmbSpr1EB
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w $7000,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	STA.w $7000,y
	LDA.w $7400,x
	STA.w $73C0,y
	EOR.w #$0002
	TAX
	LDA.w DATA_0791BA,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0020
	STA.w $7782,y
	PLX
	RTS

DATA_079251:
	dw $0040,$0000

DATA_079255:
	dw $0008,$0009,$0009,$0008,$0008,$000A

DATA_079261:
	dw $FFE9,$FFEB,$FFEA,$FFE9,$FFE8,$FFEF

DATA_07926D:
	dw $FFF5,$FFF7,$FFF6,$FFF5,$FFF4,$FFF9

CODE_079279:
	JSR.w CODE_07931E
	LDY.w $7D36,x
	BEQ.b CODE_0792B9
	BMI.b CODE_0792B9
	DEY
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0792B9
	LDA.w $7D38,y
	BEQ.b CODE_0792B9
	LDX.b $12
	LDA.w $7C76,x
	AND.w #$8000
	ASL
	ROL
	ASL
	EOR.w $7400,x
	BEQ.b CODE_0792A3
	TAY
	RTS

CODE_0792A3:
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	JSR.w CODE_0791E7
	PLA
	JML.l CODE_03B24B

CODE_0792B9:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHX
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_07931D
	LDA.w $7400,x
	LSR
	LSR
	ROR
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $02
	EOR.b $00
	BMI.b CODE_07931B
	LDA.b $02
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_07931B
	LDA.b $02
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_07931B
	LDA.b $02
	BPL.b CODE_0792FC
	EOR.w #$FFFF
	INC
CODE_0792FC:
	STA.b $04
	LSR
	STA.b $02
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	STA.b $00
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_07931B
	LDA.b $00
	CLC
	ADC.b $02
	CMP.b $04
	BCS.b CODE_07931B
	LDY.b #$02
	RTS

CODE_07931B:
	LDY.b #$FF
CODE_07931D:
	RTS

CODE_07931E:
	LDY.w $7D36,x
	BMI.b CODE_079376
	LDA.w $6122
	ASL
	STA.b $02
	LDA.b $18,x
	STA.b $00
	LDA.w $7402,x
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.b ($00),y
	SEC
	SBC.w $611E
	CLC
	ADC.w $6122
	CMP.b $02
	BCS.b CODE_079376
	LDA.w $7402,x
	ASL
	TAY
	LDA.w DATA_079255,y
	LDY.w $7400,x
	BEQ.b CODE_079358
	EOR.w #$FFFF
	CLC
	ADC.w #$0009
CODE_079358:
	STA.b $00
	LDA.w $6120
	ASL
	STA.b $02
	LDA.w $70E2,x
	CLC
	ADC.b $00
	SEC
	SBC.w $611C
	CLC
	ADC.w $6120
	CMP.b $02
	BCS.b CODE_079376
	JSL.l CODE_03A858
CODE_079376:
	RTS

CODE_079377:
	LDY.w $7400,x
	LDA.w DATA_079084,y
	STA.w $7540,x
	LDA.w DATA_079088,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_07908C,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1E0
	JSL.l CODE_008B21
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $73C0,y
	LDA.w #$0004
	STA.w $7782,y
	STA.w $7E4C,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FFF0
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$000C
	STA.w $7142,y
	RTS

;---------------------------------------------------------------------------

DATA_0793C0:
	dw $FFA8,$0058

DATA_0793C4:
	dw $0100,$FF00

DATA_0793C8:
	dw $FFEC,$0005

DATA_0793CC:
	dw $FFF3,$FFFD

DATA_0793D0:
	dw $FFF8,$FFF8

DATA_0793D4:
	dw $0000,$0001,$0002,$0003,$0004

DATA_0793DE:
	dw $0005,$0006,$0007,$0008,$0009,$0008,$0005

DATA_0793EC:
	dw $0010,$0020,$0002,$0002,$0006,$0008,$0010

YI_NorSpr113_Snifit_Init:
CODE_0793FA:
	LDY.w $7400,x
	LDA.w DATA_0793C0,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w DATA_0793D4
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr113_Snifit_Main:
;$079410
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JSR.w (DATA_07941F,x)
	JSL.l CODE_03A5B7
	RTL

DATA_07941F:
	dw CODE_079423
	dw CODE_079476

CODE_079423:
	LDX.b $12
	LDA.w $7680,x
	CMP.w #$00F0
	BCS.b CODE_079432
	LDA.w $7A98,x
	BEQ.b CODE_079454
CODE_079432:
	LDA.w $7A96,x
	BNE.b CODE_079475
	LDA.w #$0004
	STA.w $7A96,x
	LDA.b $18,x
	INC
	INC
	CMP.w #$000A
	BCC.b CODE_079449
	LDA.w #$0000
CODE_079449:
	STA.b $18,x
	TAY
	LDA.w DATA_0793D4,y
	STA.w $7402,x
	BRA.b CODE_079475

CODE_079454:
	STZ.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_0793EC
	STA.w $7A96,x
	LDA.w DATA_0793DE
	STA.w $7402,x
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0400
	STA.w $6FA2,x
	INC.b $16,x
	INC.b $16,x
CODE_079475:
	RTS

CODE_079476:
	LDX.b $12
	LDA.b $76,x
	BEQ.b CODE_079486
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_079486
	STZ.w $7540,x
	STZ.b $76,x
CODE_079486:
	LDA.w $7A96,x
	BNE.b CODE_0794B5
	LDA.b $18,x
	INC
	INC
	CMP.w #$000E
	BCS.b CODE_0794B8
	STA.b $18,x
	TAY
	LDA.w DATA_0793EC,y
	STA.w $7A96,x
	LDA.w DATA_0793DE,y
	STA.w $7402,x
	TYX
	JMP.w (DATA_0794A7,x)

DATA_0794A7:
	dw CODE_0794B5
	dw CODE_0794D3
	dw CODE_07950D
	dw CODE_0794B5
	dw CODE_0794B5
	dw CODE_0794B5
	dw CODE_0794B5

CODE_0794B5:
	LDX.b $12
	RTS

CODE_0794B8:
	STZ.b $16,x
	STZ.b $18,x
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0140
	STA.w $6FA2,x
	LDA.w #$0080
	STA.w $7A98,x
	JSL.l CODE_0793FA
	RTS

CODE_0794D3:
	LDX.b $12
	LDY.w $7400,x
	LDA.w DATA_0793CC,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1F5
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	CLC
	ADC.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000A
	STA.w $7142,y
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.w #$0006
	STA.w $7E4C,y
	STA.w $7782,y
	LDA.w #$0002
	STA.w $7E4E,y
	RTS

CODE_07950D:
	LDX.b $12
	INC.b $76,x
	LDY.w $7400,x
	LDA.w DATA_0793C4,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w DATA_07958D,y
	STA.b $00
	LDA.w DATA_0793C8,y
	STA.b $02
	LDA.w DATA_0793D0,y
	STA.b $04
	LDA.w #$0114
	JSL.l CODE_03A364
	BCC.b CODE_079556
	LDA.w $7CD6,x
	CLC
	ADC.b $02
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0001
	STA.w $7182,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_079556:
	LDA.w #!Define_YI_AmbSpr1F6
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	CLC
	ADC.b $04
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $7142,y
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.w #$0002
	STA.w $7E4C,y
	STA.w $7782,y
	LDA.w #$0005
	STA.w $7E4E,y
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	RTS

;---------------------------------------------------------------------------

DATA_07958D:
	dw $FE00,$0200

YI_NorSpr114_SnifitBullet_Init:
;$079591
	LDY.w $7400,x
	LDA.w DATA_07958D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr114_SnifitBullet_Main:
;$07959B
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BPL.b CODE_0795A8
	JSL.l CODE_03A858
CODE_0795A8:
	RTL

;---------------------------------------------------------------------------

DATA_0795A9:
	db $03,$04,$05,$06

DATA_0795AD:
	db $08,$02

DATA_0795AF:
	db $01,$02,$01,$00,$01,$02,$01,$00,$01,$02,$01,$00,$01,$02,$01,$00
	db $01,$02,$01,$00

DATA_0795C3:
	db $08,$09,$08,$07,$08,$0C,$0B,$0A,$08,$0C,$0B,$0A,$08,$09,$08,$07

DATA_0795D3:
	db $0E,$0F,$10,$0F,$0E,$0D,$0E,$0F,$10,$0F,$0E,$0D,$0E,$0F,$10,$0F
	db $0E,$0D

DATA_0795E5:
	db $00,$11,$11,$00,$00,$11,$11,$00,$00,$11,$11,$00,$00

DATA_0795F2:
	db $08,$03,$03,$05,$05,$03,$03,$05,$05,$03,$03,$05,$05

DATA_0795FF:
	db $00,$02,$00,$00,$00,$02,$00,$00,$00,$02,$00,$00,$00,$00,$FF,$00
	db $01

DATA_079610:
	dw $FC80,$0380,$FF00,$0100,$0008,$0004,$0100,$FF00

DATA_079620:
	dw $FFE0,$0020

DATA_079624:
	db $06,$04,$02,$02

YI_NorSpr0FF_Poochy_Init:
;$079628
	LDA.w !RAM_YI_Level_NorSpr_PoochyExistsFlagLo
	BEQ.b CODE_079631
	JML.l CODE_03A31E

CODE_079631:
	INC.w !RAM_YI_Level_NorSpr_PoochyExistsFlagLo
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0FF_Poochy_Main:
;$079635
	JSL.l CODE_03AF23
	JSL.l CODE_03A5B7
	LDA.w $7182,x
	CMP.w #$0800
	BMI.b CODE_07964C
	STZ.w !RAM_YI_Level_NorSpr_PoochyExistsFlagLo
	JML.l CODE_03A31E

CODE_07964C:
	JSR.w CODE_079D3D
	JSR.w CODE_079EA0
	JSR.w CODE_079B88
	JSR.w CODE_079C71
	JSR.w CODE_079CBC
	LDA.w !RAM_YI_Level_NorSpr_PoochyExistsFlagLo
	BNE.b CODE_079669
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
CODE_079669:
	LDA.b $16,x
	TAX
	JSR.w (DATA_079670,x)
	RTL

DATA_079670:
	dw CODE_07967A
	dw CODE_0799AE
	dw CODE_079A3B

DATA_079676:
	dw $001D,$FFE3

CODE_07967A:
	LDX.b $12
	JSR.w CODE_079960
	LDY.b $77,x
	BEQ.b CODE_079696
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TYX
	JMP.w (DATA_07968A,x)

DATA_07968A:
	dw CODE_0797EE
	dw CODE_0797EE
	dw CODE_0798D9
	dw CODE_07992B
	dw CODE_0798D9
	dw CODE_07992B

CODE_079696:
	LDA.w !RAM_YI_Level_NorSpr_PoochyExistsFlagLo
	BNE.b CODE_07969E
	JMP.w CODE_079B48

CODE_07969E:
	LDA.w #$0300
	STA.b $00
	ASL
	STA.b $02
	JSR.w CODE_079C2E
	BCS.b CODE_0796EF
	LDA.w $60DE
	BNE.b CODE_0796B6
	LDY.b $76,x
	BEQ.b CODE_0796B6
	BPL.b CODE_0796CB
CODE_0796B6:
	LDA.w $7A98,x
	BNE.b CODE_0796E0
	LDA.w $77C2,x
	AND.w #$00FF
	DEC
	STA.b $02
	LDA.w $7C16,x
	STA.b $00
	BRA.b CODE_0796FD

CODE_0796CB:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $00
	AND.w #$8000
	ASL
	ROL
	ASL
	DEC
	STA.b $02
	JMP.w CODE_079825

CODE_0796E0:
	LDA.w $7400,x
	TAY
	DEC
	STA.b $02
	LDA.w DATA_079676,y
	STA.b $00
	JMP.w CODE_079825

CODE_0796EF:
	LDY.b $76,x
	BEQ.b CODE_0796FA
	BPL.b CODE_0796CB
	LDA.w $7A98,x
	BNE.b CODE_0796E0
CODE_0796FA:
	JMP.w CODE_07976A

CODE_0796FD:
	STZ.w $75E0,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_07974E
	LDA.b $00
	BPL.b CODE_079719
	EOR.w #$FFFF
	INC
CODE_079719:
	CMP.w #$0030
	BMI.b CODE_07974E
	LDA.w $7540,x
	ASL
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w $7540,x
	CMP.b $04
	BCS.b CODE_07973D
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.b $02
	INC
	CMP.w $7400,x
	BNE.b CODE_07976A
CODE_07973D:
	LDY.w $7400,x
	LDA.w DATA_079610,y
	STA.w $75E0,x
	LDA.w #$0030
	STA.w $7540,x
	BRA.b CODE_0797B8

CODE_07974E:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_07975C
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0797B8
CODE_07975C:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.b $02
	INC
	CMP.w $7400,x
	BEQ.b CODE_079783
CODE_07976A:
	LDY.b #$02
	STY.b $77,x
	LDY.b #$0C
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_0795F2,y
	STA.w $7A96,x
	LDA.w DATA_0795E5,y
	STA.w $7402,x
	REP.b #$20
	RTS

CODE_079783:
	LDA.w $7A96,x
	BNE.b CODE_0797B7
	LDY.b #$00
	LDA.w $60DE
	BEQ.b CODE_079791
	LDY.b #$01
CODE_079791:
	LDA.w DATA_0795AD,y
	AND.w #$00FF
	STA.w $7A96,x
	LDA.b $18,x
	DEC
	AND.w #$0003
	STA.b $18,x
	TAY
	LDA.w DATA_0795AF,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$00
	BNE.b CODE_0797B7
	LDA.w #!Define_YI_SoundIDA2_Poochy
	JSL.l CODE_0085D2
CODE_0797B7:
	RTS

CODE_0797B8:
	LDA.w $7A96,x
	BNE.b CODE_0797ED
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0797C6
	EOR.w #$FFFF
	INC
CODE_0797C6:
	XBA
	SEP.b #$20
	AND.b #$03
	TAY
	LDA.w DATA_079624,y
	STA.w $7A96,x
	LDA.b $18,x
	INC
	AND.b #$03
	STA.b $18,x
	TAY
	LDA.w DATA_0795A9,y
	STA.w $7402,x
	REP.b #$20
	CPY.b #$00
	BNE.b CODE_0797ED
	LDA.w #!Define_YI_SoundIDA2_Poochy
	JSL.l CODE_0085D2
CODE_0797ED:
	RTS

CODE_0797EE:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_079815
	LDY.b $18,x
	DEY
	BMI.b CODE_079816
	STY.b $18,x
	SEP.b #$20
	LDA.w $7400,x
	EOR.w DATA_0795FF,y
	STA.w $7400,x
	LDA.w DATA_0795E5,y
	STA.w $7402,x
	LDA.w DATA_0795F2,y
	STA.w $7A96,x
	REP.b #$20
CODE_079815:
	RTS

CODE_079816:
	LDY.b #$00
	STY.b $77,x
	LDY.b $76,x
	BPL.b CODE_079822
	LDY.b #$00
	STY.b $76,x
CODE_079822:
	STZ.b $18,x
	RTS

CODE_079825:
	STZ.w $75E0,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.b $00
	CLC
	ADC.w #$001C
	CMP.w #$0038
	BCC.b CODE_07986A
	LDA.w $7540,x
	ASL
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w $7540,x
	CMP.b $04
	BCS.b CODE_079858
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.b $02
	INC
	CMP.w $7400,x
	BNE.b CODE_07988E
CODE_079858:
	LDY.w $7400,x
	LDA.w DATA_079610,y
	STA.w $75E0,x
	LDA.w #$0030
	STA.w $7540,x
	JMP.w CODE_0797B8

CODE_07986A:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_079876
	EOR.b $02
	BPL.b CODE_079876
	JMP.w CODE_0797B8

CODE_079876:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.b $02
	INC
	CMP.w $7400,x
	BNE.b CODE_07988E
	LDY.b $76,x
	LDA.w $7D38,y
	BEQ.b CODE_079891
	JMP.w CODE_079783

CODE_07988E:
	JMP.w CODE_07976A

CODE_079891:
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_0798A4
	JMP.w CODE_07997B

CODE_0798A4:
	SEP.b #$20
	LDA.b $10
	AND.b #$06
	CLC
	ADC.b #$04
	STA.b $77,x
	TAX
	REP.b #$20
	JMP.w (DATA_0798B5,x)

DATA_0798B5:
	dw CODE_0798C1
	dw CODE_0798C1
	dw CODE_0798C1
	dw CODE_079913
	dw CODE_0798C1
	dw CODE_079948

CODE_0798C1:
	LDX.b $12
	LDA.w #$000F
	STA.b $18,x
	TAY
	LDA.w DATA_0795C3,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	RTS

CODE_0798D9:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07990D
	DEC.b $18,x
	BMI.b CODE_07990E
	LDY.b $18,x
	LDA.w DATA_0795C3,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	CPY.b #$09
	BNE.b CODE_07990D
	LDY.b $76,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0001
	STA.w $7D38,y
CODE_07990D:
	RTS

CODE_07990E:
	LDY.b #$00
	STY.b $77,x
	RTS

CODE_079913:
	LDX.b $12
	LDA.w #$0011
	STA.b $18,x
	TAY
	LDA.w DATA_0795D3,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
	RTS

CODE_07992B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_079947
	DEC.b $18,x
	BMI.b CODE_07990E
	LDY.b $18,x
	LDA.w DATA_0795D3,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
CODE_079947:
	RTS

CODE_079948:
	LDX.b $12
	LDA.w #$0013
	STA.b $18,x
	TAY
	LDA.w DATA_0795AF,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
	RTS

CODE_079960:
	LDY.w $7862,x
	BNE.b CODE_07996D
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0799A7
CODE_07996D:
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_07997A
	RTS

DATA_079976:
	dw $FF00,$0100

CODE_07997A:
	PLA
CODE_07997B:
	LDA.b $78,x
	BNE.b CODE_07998D
	LDA.w #$0006
	STA.w $7A96,x
	LDA.w #$000D
	STA.w $7402,x
	INC.b $78,x
CODE_07998D:
	LDY.w $7400,x
	LDA.w DATA_079976,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w $7A96,x
	BNE.b CODE_0799A6
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $78,x
CODE_0799A6:
	RTS

CODE_0799A7:
	LDA.w #$0002
	STA.b $16,x
	PLA
	RTS

CODE_0799AE:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0799BA
	LDY.w $7862,x
	BNE.b CODE_0799F2
CODE_0799BA:
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0799F2
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0799D0
	LDY.w $7400,x
	LDA.w DATA_079976,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0799D0:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_0799E1
	LDA.w #$0004
	BRA.b CODE_0799EE

CODE_0799E1:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0799EB
	LDA.w #$0003
	BRA.b CODE_0799EE

CODE_0799EB:
	LDA.w #$0005
CODE_0799EE:
	STA.w $7402,x
	RTS

CODE_0799F2:
	LDA.w #$0000
	STA.b $16,x
	RTS

CODE_0799F8:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_079A26
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.b $18,x
	STZ.b $76,x
	STZ.b $78,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_0799A7

CODE_079A26:
	RTS

CODE_079A27:
	STZ.b $76,x
	STZ.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.b $18,x
	LDA.w #$0004
	STA.b $16,x
	RTS

DATA_079A39:
	db $05,$06

CODE_079A3B:
	LDX.b $12
	LDA.b $78,x
	TAX
	JMP.w (DATA_079A43,x)

DATA_079A43:
	dw CODE_079A47
	dw CODE_079B17

CODE_079A47:
	LDX.b $12
	JSR.w CODE_0799F8
	JSR.w CODE_079AB5
	JSR.w CODE_079A6F
	LDA.w $7A96,x
	BNE.b CODE_079A6E
	SEP.b #$20
	LDA.b $18,x
	EOR.b #$01
	STA.b $18,x
	LDY.b $18,x
	LDA.w DATA_079A39,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	REP.b #$20
CODE_079A6E:
	RTS

CODE_079A6F:
	LDA.w $7AF6,x
	BNE.b CODE_079AB0
	LDY.w $7862,x
	BEQ.b CODE_079A8D
	LDA.w #$FF00
	STA.w $75E2,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0000
	STA.w $7AF6,x
	BRA.b CODE_079AB0

CODE_079A8D:
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.b $18,x
	STZ.b $76,x
	STZ.b $78,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0000
	STA.b $16,x
CODE_079AB0:
	RTS

DATA_079AB1:
	dw $FE00,$0200

CODE_079AB5:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_079AF4
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_079AF4
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_079AF4
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $00
	LDA.w $7400,x
	DEC
	EOR.b $00
	BPL.b CODE_079AFF
CODE_079AEA:
	LDY.w $7400,x
	LDA.w DATA_079AB1,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_079AF4:
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_079AEA
CODE_079AFF:
	LDA.w #$0002
	STA.b $78,x
	LDA.w #$0003
	STA.b $18,x
	LDA.w #$0004
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

DATA_079B13:
	db $00,$11,$11,$00

CODE_079B17:
	LDX.b $12
	JSR.w CODE_079A6F
	LDA.w $7A96,x
	BNE.b CODE_079B42
	DEC.b $18,x
	BMI.b CODE_079B43
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_079B13,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	CPY.b #$01
	BNE.b CODE_079B40
	LDA.w $7400,x
	EOR.b #$02
	STA.w $7400,x
CODE_079B40:
	REP.b #$20
CODE_079B42:
	RTS

CODE_079B43:
	STZ.b $18,x
	STZ.b $78,x
	RTS

CODE_079B48:
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_079B76
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_079B6D
	STZ.w $75E0,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_079B73
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_079B6D:
	STZ.w $7540,x
	JMP.w CODE_07976A

CODE_079B73:
	JMP.w CODE_0797B8

CODE_079B76:
	LDY.w $7400,x
	LDA.w DATA_079610,y
	STA.w $75E0,x
	LDA.w #$0030
	STA.w $7540,x
	JMP.w CODE_0797B8

CODE_079B88:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_079BCB
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_079BCB
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_079BCB
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_079BCB
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_079BCB
	STY.b $76,x
CODE_079BCB:
	LDY.b $76,x
	BEQ.b CODE_079C2D
	BMI.b CODE_079C2D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_079C05
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_079C05
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_079C05
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_079C05
	LDA.w $7680,y
	CLC
	ADC.w #$0030
	CMP.w #$0150
	BCS.b CODE_079C05
	LDA.w $7682,y
	CLC
	ADC.w #$0030
	CMP.w #$0150
	BCS.b CODE_079C05
	BRA.b CODE_079C11

CODE_079C05:
	LDA.w #$0020
	STA.w $7A98,x
	LDY.b #$FF
	STY.b $76,x
	BRA.b CODE_079C1D

CODE_079C11:
	LDA.w $7680,x
	CLC
	ADC.w #$0028
	CMP.w #$0128
	BCC.b CODE_079C2D
CODE_079C1D:
	STZ.w $7A98,x
	LDY.b #$00
	STY.b $76,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $75E0,x
CODE_079C2D:
	RTS

CODE_079C2E:
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	STA.b $08
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	PHA
	BPL.b CODE_079C45
	EOR.w #$FFFF
	INC
CODE_079C45:
	STA.b $04
	PLA
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_079C6C
	LDA.b $04
	ASL
	STA.b $04
	ASL
	STA.b $06
	LDA.b $08
	CLC
	ADC.b $04
	CMP.b $06
	BCC.b CODE_079C6C
	LDA.b $08
	CLC
	ADC.w #$0020
	BPL.b CODE_079C6B
	SEC
	BRA.b CODE_079C6C

CODE_079C6B:
	CLC
CODE_079C6C:
	RTS

DATA_079C6D:
	dw $0200,$FE00

CODE_079C71:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_079CB7
	BEQ.b CODE_079CB7
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_079CB7
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_079CB7
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_079CB7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_079CB7
	LDA.w #$0001
	STA.w $7D38,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7C76,x
	AND.w #$8000
	ASL
	ROL
	ASL
	TAX
	LDA.w DATA_079C6D,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
CODE_079CB7:
	RTS

DATA_079CB8:
	dw $0100,$FF00

CODE_079CBC:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_079CC9
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_079CF6
CODE_079CC9:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_079CD6:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_079CF6
	BEQ.b CODE_079CF6
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$000E
	BCC.b CODE_079CF7
	LDA.w $6FA2,y
	BIT.w #$6000
	BNE.b CODE_079CF7
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
CODE_079CF6:
	RTS

CODE_079CF7:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_079CD6

CODE_079D02:
	LDA.w #$0001
	STA.w $7D38,y
	LDA.w #$0400
	STA.w $75E2,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0000
	STA.w $7540,y
	STA.w $7860,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w $7C76,y
	AND.w #$8000
	ASL
	ROL
	ASL
	TAX
	LDA.w DATA_079CB8,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
	RTS

DATA_079D39:
	dw $0008,$0004

CODE_079D3D:
	LDY.w $77C0,x
	BNE.b CODE_079D52
	JSL.l CODE_07FC2A
	BCS.b CODE_079D49
	RTS

CODE_079D49:
	STZ.b $76,x
	SEP.b #$20
	INC.w $77C0,x
	REP.b #$20
CODE_079D52:
	JSR.w CODE_079CBC
	JSR.w CODE_079EA0
	LDY.w $7D36,x
	BPL.b CODE_079D74
	LDA.w $60AA
	BMI.b CODE_079D74
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_079D74
	LDA.w $7182,x
	SEC
	SBC.w #$0022
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_079D74:
	LDY.b $77,x
	TYX
	JMP.w (DATA_079D7A,x)

DATA_079D7A:
	dw CODE_079D82
	dw CODE_079E1F
	dw CODE_079E26
	dw CODE_079E3E

CODE_079D82:
	LDX.b $12
	JSL.l CODE_07FC2F
	BCC.b CODE_079DDD
	LDA.w $60C4
	CMP.w $7400,x
	BEQ.b CODE_079DBE
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_079DA2
	LDY.w $7862,x
	BEQ.b CODE_079E19
	LDA.w $7860,x
CODE_079DA2:
	LDY.w $7400,x
	AND.w DATA_079D39,y
	BNE.b CODE_079E02
	LDY.w $7400,x
	LDA.w DATA_079610,y
	STA.w $75E0,x
	LDA.w #$0008
	STA.w $7540,x
CODE_079DB9:
	JSR.w CODE_0797B8
	BRA.b CODE_079E1D

CODE_079DBE:
	JSR.w CODE_079E7E
	BNE.b CODE_079DB9
	SEP.b #$20
	LDY.b #$02
	STY.b $77,x
	LDY.b #$03
	STY.b $18,x
	LDA.w DATA_0795F2,y
	STA.w $7A96,x
	LDA.w DATA_0795E5,y
	STA.w $7402,x
	REP.b #$20
	BRA.b CODE_079E1D

CODE_079DDD:
	JSR.w CODE_079E7E
	BNE.b CODE_079DB9
	LDA.w #$0000
	STA.b $16,x
	STZ.b $18,x
	STZ.b $76,x
	STZ.b $78,x
	STZ.w $7A36,x
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEP.b #$20
	STZ.w $77C0,x
	REP.b #$20
	BRA.b CODE_079E1D

CODE_079E02:
	STZ.w $7540,x
	SEP.b #$20
	LDY.b #$04
	STY.b $77,x
	LDA.b #$06
	STA.w $7A96,x
	LDA.b #$0D
	STA.w $7402,x
	REP.b #$20
	BRA.b CODE_079E1D

CODE_079E19:
	LDY.b #$06
	STY.b $77,x
CODE_079E1D:
	PLA
	RTL

CODE_079E1F:
	LDX.b $12
	JSR.w CODE_0797EE
	BRA.b CODE_079E1D

CODE_079E26:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_079E1D
	LDY.w $7400,x
	LDA.w DATA_079976,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_079E19

CODE_079E3E:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_079E4E
	LDY.w $7400,x
	LDA.w DATA_079976,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_079E4E:
	LDY.w $7862,x
	BNE.b CODE_079E78
	LDY.b #$04
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_079E72
	LDY.b #$03
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_079E72
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_079E78
	LDY.b #$05
CODE_079E72:
	TYA
	STA.w $7402,x
	BRA.b CODE_079E1D

CODE_079E78:
	LDY.b #$00
	STY.b $77,x
	BRA.b CODE_079E1D

CODE_079E7E:
	STZ.w $75E0,x
	LDA.w #$0040
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_079E97
	AND.w #$8000
	ASL
	ROL
	ASL
	EOR.w $7400,x
	BNE.b CODE_079E9F
CODE_079E97:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDY.b #$00
CODE_079E9F:
	RTS

CODE_079EA0:
	LDY.w $7862,x
	BEQ.b CODE_079EB2
	LDA.w #$FF00
	STA.w $75E2,x
	LDA.w #$0020
	STA.w $7542,x
	RTS

CODE_079EB2:
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	RTS

;---------------------------------------------------------------------------

DATA_079EBF:
	db $00,$01,$02,$03,$04

DATA_079EC4:
	db $05,$06

DATA_079EC6:
	db $07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F,$10,$11,$12,$13,$12,$11,$14
	db $15,$05

DATA_079ED8:
	db $18,$19,$1A,$19,$1B,$19,$1A,$19,$1B,$19,$1A,$19,$1B,$19,$19,$1C
	db $1D,$1C

DATA_079EEA:
	db $04,$04,$10,$04,$04,$04,$20,$03,$02,$01,$01,$01,$10,$04,$04,$04
	db $04,$10

DATA_079EFC:
	dw $0000,$0002,$0004,$0008

DATA_079F04:
	dw $FFA0,$0060

DATA_079F08:
	dw $0006,$FFFA

DATA_079F0C:
	dw $0001,$FFFF

DATA_079F10:
	dw $FFFD,$0003,$FFFE,$0002,$FFFE,$0002,$FFFD,$0003
	dw $FFFD,$0003,$FFFE,$0002,$FFFC,$0004,$FFFC,$0004
	dw $0000,$0000,$0002,$FFFE,$0003,$FFFD,$0005,$FFFB
	dw $0009,$FFF7,$000F,$FFF1,$000F,$FFF1,$000C,$FFF4
	dw $FFFF,$0001,$FFF8,$0008,$FFF8,$0008,$FFF8,$0008
	dw $FFFA,$0006,$FFFD,$0003,$FFEC,$0014,$FFF6,$000A

DATA_079F70:
	dw $FFF8,$FFF8,$FFF7,$FFF7,$FFF6,$FFF6,$FFF7,$FFF7
	dw $FFF8,$FFF8,$FFF8,$FFF8,$FFF8,$FFF8,$FFF7,$FFF7
	dw $FFF7,$FFF7,$FFF5,$FFF5,$FFF6,$FFF6,$FFF7,$FFF7
	dw $FFF7,$FFF7,$FFFD,$FFFD,$FFFB,$FFFB,$FFF8,$FFF8
	dw $FFF0,$FFF0,$FFF8,$FFF8,$FFFA,$FFFA,$FFFB,$FFFB
	dw $FFF8,$FFF8,$FFF7,$FFF7,$FFFC,$FFFC,$FFEA,$FFEA

YI_NorSpr11A_GreenGlove_Init:
;$079FD0
	LDA.w #$FFFF
	STA.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSR.w CODE_07A0EB
	RTL

;---------------------------------------------------------------------------

YI_NorSpr11A_GreenGlove_Main:
;$079FDC
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_079FE9
	LDA.w $7D96,x
	BEQ.b CODE_07A022
CODE_079FE9:
	LDA.w $7040,x
	ORA.w #$0004
	LDA.w $7040,x
	LDY.b $76,x
	BMI.b CODE_07A022
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0001
	STA.w $7D38,y
	STA.w $74A2,y
	LDA.w #$0000
	STA.w $7A36,y
	LDA.w $6FA0,y
	AND.w #$FFBF
	STA.w $6FA0,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	LDA.w #$FFFF
	STA.b $76,x
CODE_07A022:
	JSL.l CODE_03AF23
	LDA.w $7040,x
	AND.w #$000C
	BNE.b CODE_07A040
	JSL.l CODE_03A2F8
	BCC.b CODE_07A040
	LDY.b $76,x
	BMI.b CODE_07A03F
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
CODE_07A03F:
	RTL

CODE_07A040:
	LDA.w $7402,x
	CMP.w #$000D
	BNE.b CODE_07A059
	LDA.b $14
	AND.w #$0006
	TAY
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w DATA_079EFC,y
	BRA.b CODE_07A05F

CODE_07A059:
	LDA.w $7042,x
	AND.w #$FFF1
CODE_07A05F:
	STA.w $7042,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_07A06A
	JMP.w CODE_07A54E

CODE_07A06A:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_07A075
	JSL.l CODE_07FC2A
	BCS.b CODE_07A080
CODE_07A075:
	JSL.l CODE_03A5B7
	LDA.b $16,x
	TAX
	JSR.w (DATA_07A0E1,x)
	RTL

CODE_07A080:
	LDY.b $76,x
	BMI.b CODE_07A0B0
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0001
	STA.w $7D38,y
	STA.w $74A2,y
	LDA.w #$0000
	STA.w $7A36,y
	LDA.w $6FA0,y
	AND.w #$FFBF
	STA.w $6FA0,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	LDA.w #$FFFF
	STA.b $76,x
CODE_07A0B0:
	LDY.w $77C2,x
	LDA.w DATA_0788CF,y
	STA.w $60A8
	STA.w $60B4
	LDY.b $76,x
	BMI.b CODE_07A0D8
	LDA.w $6FA0,y
	AND.w #$FFBF
	STA.w $6FA0,y
	LDA.w #$0000
	STA.w $7A36,y
	STA.w $7D38,y
	LDA.w #$0040
	STA.w $7542,x
CODE_07A0D8:
	LDA.w #DATA_079ED8
	STA.b $00
	JSR.w CODE_07A580
	RTL

DATA_07A0E1:
	dw CODE_07A111
	dw CODE_07A230
	dw CODE_07A31B
	dw CODE_07A38D
	dw CODE_07A355

CODE_07A0EB:
	LDY.w $7400,x
	LDA.w DATA_079F04,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
	LDA.w DATA_079EBF
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$007C
	STA.w $7A98,x
	LDA.w #$0000
	STA.b $16,x
	RTS

CODE_07A111:
	LDX.b $12
	JSR.w CODE_07A538
	BMI.b CODE_07A129
	JSL.l CODE_07FC1F
	BPL.b CODE_07A126
	LDA.w $77C2,x
	AND.w #$00FF
	STA.b $02
CODE_07A126:
	JMP.w CODE_07A202

CODE_07A129:
	JSR.w CODE_07A171
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07A139
	AND.w #$000C
	BEQ.b CODE_07A146
CODE_07A139:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	JMP.w CODE_07A1EB

CODE_07A146:
	LDA.w $7A96,x
	BNE.b CODE_07A170
	LDA.w $7A98,x
	BNE.b CODE_07A153
	JSR.w CODE_07A1EB
CODE_07A153:
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	INC
	CMP.b #$05
	BCC.b CODE_07A15F
	LDA.b #$00
CODE_07A15F:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_079EBF,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	REP.b #$20
CODE_07A170:
	RTS

CODE_07A171:
	LDY.w $7D36,x
	DEY
	BEQ.b CODE_07A1EA
	BMI.b CODE_07A1EA
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07A1EA
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_07A1EA
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_07A1EA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_07A1EA
	LDA.w $7A36,y
	BMI.b CODE_07A1EA
	LDA.w #$0005
	STA.w $74A2,y
	LDA.w #$0000
	STA.w $7540,y
	STA.w $7542,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $7D38,y
	STA.w $7402,y
	LDA.w $6FA0,y
	ORA.w #$0040
	STA.w $6FA0,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDA.w #$FFFF
	STA.w $7A36,y
	TYA
	STA.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	PLA
	JMP.w CODE_07A302

CODE_07A1EA:
	RTS

CODE_07A1EB:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_079F04,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$007C
	STA.w $7A98,x
	RTS

CODE_07A202:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0016
	STA.w $7402,x
	LDA.w #$0002
	STA.b $16,x
	STZ.w $7A96,x
CODE_07A218:
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07A225
	AND.w #$000C
	BEQ.b CODE_07A22F
CODE_07A225:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
CODE_07A22F:
	RTS

CODE_07A230:
	LDX.b $12
	LDY.w $7D36,x
	DEY
	BEQ.b CODE_07A23A
	BPL.b CODE_07A23D
CODE_07A23A:
	JMP.w CODE_07A2DB

CODE_07A23D:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07A23A
	LDA.w $7D38,y
	BEQ.b CODE_07A23A
	JSL.l CODE_07FC0D
	BPL.b CODE_07A253
CODE_07A250:
	JMP.w CODE_07A2DB

CODE_07A253:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_07A250
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_07A2DB
	LDA.w $7542,y
	CMP.w #$0040
	BCS.b CODE_07A278
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7540,x
CODE_07A278:
	LDA.w #$0005
	STA.w $74A2,y
	LDA.w #$0000
	STA.w $7540,y
	STA.w $7542,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $7D38,y
	STA.w $7402,y
	LDA.w #$FFFF
	STA.w $7A36,y
	LDA.w $6FA0,y
	ORA.w #$0040
	STA.w $6FA0,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	TYA
	AND.w #$00FF
	STA.b $76,x
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w $7CD8,x
	SEC
	SBC.w #$0010
	SEC
	SBC.w $7CD8,y
	BCC.b CODE_07A2D5
	JSR.w CODE_07A4D3
	BRA.b CODE_07A2D8

CODE_07A2D5:
	JSR.w CODE_07A474
CODE_07A2D8:
	JMP.w CODE_07A342

CODE_07A2DB:
	LDA.w $7A96,x
	BNE.b CODE_07A2FE
	JSR.w CODE_07A538
	BMI.b CODE_07A2FF
	JSL.l CODE_07FC1F
	BPL.b CODE_07A2F3
	LDA.w $77C2,x
	AND.w #$00FF
	STA.b $02
CODE_07A2F3:
	LDA.b $02
	STA.w $7400,x
	LDA.w #$0040
	STA.w $7A96,x
CODE_07A2FE:
	RTS

CODE_07A2FF:
	JMP.w CODE_07A0EB

CODE_07A302:
	LDA.w #$0004
	STA.b $16,x
	STZ.b $18,x
	LDA.w DATA_079EC4
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	JMP.w CODE_07A3C4

CODE_07A31B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07A33F
	LDA.b $18,x
	INC
	CMP.w #$0002
	BCC.b CODE_07A32D
	JMP.w CODE_07A372

CODE_07A32D:
	STA.b $18,x
	TAY
	LDA.w DATA_079EC4,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_07A33F:
	JMP.w CODE_07A3C4

CODE_07A342:
	LDA.w #!Define_YI_SoundID23_GroundPound
	JSL.l CODE_0085D2
	LDA.w #$0008
	STA.b $16,x
	LDA.w #$003E
	STA.w $7A96,x
	RTS

CODE_07A355:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_07A367
	LDA.w $7400,x
	LSR
	LSR
	ROR
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07A3C4
CODE_07A367:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w $7A96,x
	BNE.b CODE_07A3C4
CODE_07A372:
	LDA.w #$0006
	STA.b $16,x
	STZ.b $18,x
	LDA.w DATA_079EC6
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_079EEA
	AND.w #$00FF
	STA.w $7A96,x
	BRA.b CODE_07A3C4

CODE_07A38D:
	LDX.b $12
	LDA.w $77C2,x
	STA.w $7400,x
	LDA.w $7A96,x
	BNE.b CODE_07A3B7
	LDA.b $18,x
	INC
	CMP.w #$0012
	BCS.b CODE_07A3EC
	STA.b $18,x
	TAY
	LDA.w DATA_079EC6,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_079EEA,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_07A3B7:
	LDA.b $18,x
	CMP.w #$000B
	BEQ.b CODE_07A3EF
	BCS.b CODE_07A3EB
	JSL.l CODE_0EB14D
CODE_07A3C4:
	LDA.w $7402,x
	ASL
	ASL
	ORA.w $7400,x
	TAY
	LDA.w DATA_079F10,y
	STA.b $00
	LDA.w DATA_079F70,y
	STA.b $02
	LDY.b $76,x
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $02
	STA.w $7182,y
CODE_07A3EB:
	RTS

CODE_07A3EC:
	JMP.w CODE_07A0EB

CODE_07A3EF:
	JSL.l CODE_0EB148
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDY.b $76,x
	LDA.w $7CD6,y
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,y
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$06F0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $76,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7542,y
	STA.w $7D38,y
	LDA.w #$0001
	STA.w $7A36,y
	STA.w $74A2,y
	SEP.b #$20
	STA.w $77C0,y
	REP.b #$20
	LDA.w $6FA0,y
	AND.w #$FFBF
	STA.w $6FA0,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	LDA.w #$FFFF
	STA.b $76,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_SoundID4A_YoshiGrunt
	JSL.l CODE_0085D2
	RTS

CODE_07A474:
	PHY
	LDA.w $7402,x
	ASL
	ASL
	ORA.w $7400,x
	TAY
	LDA.w DATA_079F10,y
	STA.b $00
	LDA.w DATA_079F70,y
	STA.b $02
	PLY
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $02
	STA.w $7182,y
	LDY.w $7400,x
	LDA.w DATA_079F08,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1F6
	JSL.l CODE_008B21
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.w $70E2,x
	SEC
	SBC.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0007
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7E4C,y
	STA.w $7782,y
	LDA.w #$0005
	STA.w $7E4E,y
	RTS

CODE_07A4D3:
	LDA.w #$0017
	STA.w $7402,x
	PHY
	LDA.w $7402,x
	ASL
	ASL
	ORA.w $7400,x
	TAY
	LDA.w DATA_079F10,y
	STA.b $00
	LDA.w DATA_079F70,y
	STA.b $02
	PLY
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $02
	STA.w $7182,y
	LDY.w $7400,x
	LDA.w DATA_079F0C,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1F9
	JSL.l CODE_008B21
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.w $70E2,x
	SEC
	SBC.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000B
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7E4C,y
	STA.w $7782,y
	LDA.w #$0005
	STA.w $7E4E,y
	RTS

CODE_07A538:
	LDA.w #$0030
	STA.b $04
	ASL
	STA.b $06
	LDA.w #$0020
	STA.b $08
	CLC
	ADC.w #$0030
	STA.b $0A
	JMP.w CODE_078CF1

CODE_07A54E:
	LDY.w $7D36,x
	BPL.b CODE_07A565
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BEQ.b CODE_07A55C
	JML.l CODE_03B273

CODE_07A55C:
	JSL.l CODE_07FC2A
	BCC.b CODE_07A565
	JMP.w CODE_07A0B0

CODE_07A565:
	LDA.w #DATA_079ED8
	STA.b $00
	JSR.w CODE_07A623
	RTL

;---------------------------------------------------------------------------

DATA_07A56E:
	db $20,$20,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$20,$06
	db $18,$10

CODE_07A580:
	LDA.w $60D4
	BNE.b CODE_07A5CA
	JSL.l CODE_03B20B
	LDY.w $77C0,x
	CPY.b #$02
	BCS.b CODE_07A5CA
	SEP.b #$20
	INC.w $77C0,x
	LDA.b ($00)
	STA.w $7402,x
	LDA.w DATA_07A56E
	STA.w $7A96,x
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E7
	JSL.l CODE_03B56E
	RTS

CODE_07A5CA:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	JSL.l CODE_0CFF61
	JSL.l CODE_03A32E
	LDA.w #$0004
	STA.b $00
	JSR.w CODE_07A5EF
	PLA
	RTL

DATA_07A5E3:
	dw $0000,$0100,$FF00

DATA_07A5E9:
	dw $FD80,$FE00,$FE00

CODE_07A5EF:
	PHX
	LDX.b $00
	LDA.w DATA_07A5E3,x
	STA.b $02
	LDA.w DATA_07A5E9,x
	STA.b $04
	PLX
	LDA.w #$0115
	JSL.l CODE_03A34C
	BCC.b CODE_07A622
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	DEC.b $00
	DEC.b $00
	BPL.b CODE_07A5EF
CODE_07A622:
	RTS

;---------------------------------------------------------------------------

CODE_07A623:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_07A658
	LDA.w $7A96,x
	BNE.b CODE_07A658
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	INC
	CMP.w #$0012
	BCS.b CODE_07A659
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07A56E,y
	AND.w #$00FF
	STA.w $7A96,x
	CPY.b #$10
	BNE.b CODE_07A658
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_07A658:
	RTS

CODE_07A659:
	LDY.w $77C0,x
	PHY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	TXY
	JSL.l CODE_03A377
	SEP.b #$20
	PLA
	STA.w $77C0,x
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$FFFF
	STA.b $76,x
	RTS

;---------------------------------------------------------------------------

DATA_07A676:
	dw $FE80,$0180

YI_NorSpr11B_Lakitu_Init:
;$07A67A
	LDA.w !RAM_YI_Level_NorSpr_LakituActiveFlagLo
	BEQ.b CODE_07A683
	JML.l CODE_03A31E

CODE_07A683:
	LDA.w #$0001
	STA.w !RAM_YI_Level_NorSpr_LakituActiveFlagLo
	LDA.w #$0200
	STA.w $75E0,x
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7540,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w #DATA_07A6FA
	STA.w $7A36,x
	JSR.w CODE_07A84D
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_07A6F9
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07A676,y
	AND.w #$FFE0
	STA.b $00
	LDA.w #$011B
	JSL.l CODE_03A364
	BCC.b CODE_07A6F9
	LDA.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0200
	STA.w $75E0,y
	LDA.w #$0200
	STA.w $75E2,y
	LDA.w #$0008
	STA.w $7540,y
	LDA.w #$0008
	STA.w $7542,y
	LDA.w #DATA_07A6FE
	STA.w $7A36,y
	TYX
	JSR.w CODE_07A84D
	LDX.b $12
CODE_07A6F9:
	RTL

;---------------------------------------------------------------------------

DATA_07A6FA:
	dw $0088,$0068

DATA_07A6FE:
	dw $0098,$0058

YI_NorSpr11B_Lakitu_Main:
;$07A702
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_07A751
	LDA.w #$011C
	JSL.l CODE_03A364
	BCC.b CODE_07A741
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	TYA
	AND.w #$00FF
	INC
	STA.w $6162
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	TXA
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	JSL.l CODE_07A956
	BRA.b CODE_07A74A

CODE_07A741:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $6162
CODE_07A74A:
	STZ.w $6168
	PLA
	PLY
	BRA.b CODE_07A754

CODE_07A751:
	JSR.w CODE_07A9C6
CODE_07A754:
	JSL.l CODE_03AF23
	JSR.w CODE_07AA37
	LDA.w $77C2,x
	STA.w $7400,x
	LDA.w !RAM_YI_Level_NorSpr_LakituActiveFlagLo
	BNE.b CODE_07A783
	LDA.w #$FC00
	STA.w $75E0,x
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STA.w $7540,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	BRA.b CODE_07A800

CODE_07A783:
	LDA.w $77C2,x
	LSR
	LSR
	ROR
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_07A793
	LDA.w #$0010
	BRA.b CODE_07A796

CODE_07A793:
	LDA.w #$0008
CODE_07A796:
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07A7A2
	EOR.w #$FFFF
	INC
CODE_07A7A2:
	CMP.w #$0080
	BCC.b CODE_07A7C8
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.w $7A36,x
	STA.b $00
	LDA.w $7680,x
	CMP.b ($00),y
	BPL.b CODE_07A7C2
	LDA.w #$0200
	BRA.b CODE_07A7C5

CODE_07A7C2:
	LDA.w #$FE00
CODE_07A7C5:
	STA.w $75E0,x
CODE_07A7C8:
	LDA.w $7682,x
	SEC
	SBC.w #$0030
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_07A7D9
	LDA.w #$0010
	BRA.b CODE_07A7DC

CODE_07A7D9:
	LDA.w #$0008
CODE_07A7DC:
	STA.w $7542,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07A7E8
	EOR.w #$FFFF
	INC
CODE_07A7E8:
	CMP.w #$0100
	BCC.b CODE_07A800
	LDA.w $7682,x
	CMP.w #$0030
	BPL.b CODE_07A7FA
	LDA.w #$0200
	BRA.b CODE_07A7FD

CODE_07A7FA:
	LDA.w #$FE00
CODE_07A7FD:
	STA.w $75E2,x
CODE_07A800:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_07A83C
	LDA.w #!Define_YI_AmbSpr1F8
	JSL.l CODE_008B21
	LDA.w #$0002
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	SEC
	SBC.w $72C0,x
	STA.w $70A2,y
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w $7CD8,x
	SEC
	SBC.w #$0008
	SEC
	SBC.w $72C2,x
	STA.w $7142,y
CODE_07A83C:
	LDA.b $16,x
	TAX
	JSR.w (DATA_07A847,x)
	JSL.l CODE_03A5B7
	RTL

DATA_07A847:
	dw CODE_07A869
	dw CODE_07A869
	dw CODE_07A8E6

CODE_07A84D:
	LDA.b $10
	AND.w #$007F
	CLC
	ADC.w #$0080
	STA.w $7A96,x
	STZ.w $7402,x
	STZ.b $16,x
	LDA.w #$0003
	STA.b $76,x
	LDA.w #CODE_07A896
	STA.b $78,x
	RTS

CODE_07A869:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07A881
	LDA.w $7680,x
	ORA.w $7682,x
	AND.w #$FF00
	BEQ.b CODE_07A88F
	LDA.w #$0050
	STA.w $7A96,x
CODE_07A881:
	AND.b $76,x
	BNE.b CODE_07A88E
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_07A88E:
	RTS

CODE_07A88F:
	LDA.b $78,x
	STA.b $00
	JMP.w ($0000+$7960)

CODE_07A896:
	LDA.w #$0050
	STA.w $7A96,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$0002
	STA.b $16,x
	LDA.w #$0007
	STA.b $76,x
	LDA.w #CODE_07A8CC
	STA.b $78,x
	RTS

DATA_07A8B2:
	db $0C,$02,$02,$02,$02,$02,$02,$02,$02,$06,$10,$40,$20

DATA_07A8BF:
	db $04,$05,$06,$07,$08,$09,$0A,$0B,$0A,$0C,$0A,$0D,$0E

CODE_07A8CC:
	STZ.b $76,x
	LDA.w DATA_07A8B2
	AND.w #$00FF
	STA.w $7A96,x
	LDA.w DATA_07A8BF
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.b $16,x
	RTS

CODE_07A8E6:
	LDX.b $12
	LDA.w $7680,x
	ORA.w $7682,x
	AND.w #$FF00
	BNE.b CODE_07A903
	LDA.w $7A96,x
	BEQ.b CODE_07A8FB
	JMP.w CODE_07A928

CODE_07A8FB:
	LDA.b $76,x
	INC
	CMP.w #$000D
	BCC.b CODE_07A906
CODE_07A903:
	JMP.w CODE_07A84D

CODE_07A906:
	STA.b $76,x
	TAY
	LDA.w DATA_07A8B2,y
	AND.w #$00FF
	STA.w $7A96,x
	LDA.w DATA_07A8BF,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$0C
	BNE.b CODE_07A928
	JSL.l CODE_0EB148
	JSR.w CODE_07AA8D
	BRA.b CODE_07A944

CODE_07A928:
	LDA.b $76,x
	CMP.w #$000B
	BCC.b CODE_07A944
	CMP.w #$000C
	BCS.b CODE_07A944
	JSL.l CODE_0EB14D
	STZ.w $7540,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_07A944:
	RTS

CODE_07A945:
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_03B56E
CODE_07A956:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $75E0,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$000F
	STA.w $7402,x
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0280
	STA.w $7AF8,x
	RTL

DATA_07A97E:
	dw $0010,$0018,$0010,$0018,$0000,$0008,$0000,$0008
	dw $0000,$0008,$0000,$0008,$0000,$0008,$0008,$0010
	dw $0008,$0010,$0010,$0018,$0010,$0018,$0010,$0018
	dw $0010,$0018,$0010,$0018,$0010,$0018

DATA_07A9BA:
	dw $0008,$000A

DATA_07A9BE:
	dw $0000,$0200,$0400,$0800

CODE_07A9C6:
	LDY.w $74A2,x
	BMI.b CODE_07AA36
	REP.b #$10
	LDA.w $7402,x
	CMP.w #$000F
	BEQ.b CODE_07AA16
	ASL
	ASL
	TAY
	LDA.w DATA_07A97E,y
	STA.b $00
	LDA.w DATA_07A97E+$02,y
	STA.b $02
	LDA.b $14
	AND.w #$0008
	LSR
	LSR
	TAY
	LDA.w DATA_07A9BA,y
	STA.b $04
	LDA.w $7362,x
	CLC
	ADC.b $00
	TAY
	LDA.w $6004,y
	AND.w #$FFF0
	ORA.b $04
	STA.w $6004,y
	LDA.w $7362,x
	CLC
	ADC.b $02
	TAY
	LDA.w $6004,y
	AND.w #$FFF0
	ORA.b $04
	STA.w $6004,y
	LDA.w $7402,x
CODE_07AA16:
	CMP.w #$000D
	BNE.b CODE_07AA34
	LDA.b $14
	AND.w #$0006
	TAY
	LDA.w DATA_07A9BE,y
	STA.b $00
	LDY.w $7362,x
	LDA.w $6004,y
	AND.w #$F1FF
	ORA.b $00
	STA.w $6004,y
CODE_07AA34:
	SEP.b #$10
CODE_07AA36:
	RTS

CODE_07AA37:
	LDY.w $7D36,x
	BMI.b CODE_07AA5A
	DEY
	BEQ.b CODE_07AA59
	BMI.b CODE_07AA59
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07AA59
	LDA.w $7D38,y
	BEQ.b CODE_07AA59
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	PLA
	JMP.w CODE_07A945

CODE_07AA59:
	RTS

CODE_07AA5A:
	JSL.l CODE_07FC2F
	BCS.b CODE_07AA67
	BEQ.b CODE_07AA66
	JSL.l CODE_03A858
CODE_07AA66:
	RTS

CODE_07AA67:
	LDA.w #$011C
	JSL.l CODE_03A34C
	BCC.b CODE_07AA81
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	TXA
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
CODE_07AA81:
	JSL.l CODE_03B20B
	PLA
	JMP.w CODE_07A945

DATA_07AA89:
	dw $FFF0,$0000

CODE_07AA8D:
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDY.w $7400,x
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_07AA89,y
	STA.b $00
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$011D
	JSL.l CODE_03A34C
	BCC.b CODE_07AAE3
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,y
CODE_07AAE3:
	RTS

DATA_07AAE4:
	dw $FFC0,$0140

DATA_07AAE8:
	dw $FFC0,$0140

YI_NorSpr11B_Lakitu_StompRt:
;$07AAEC
	LDA.w $7682,x
	AND.w #$FF00
	BEQ.b CODE_07AB48
	BMI.b CODE_07AB48
	LDA.w #$FFFF
	STA.w $74A2,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7AF8,x
	BNE.b CODE_07AB48
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w #$0200
	STA.w $75E0,x
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7540,x
	LDA.w #$0008
	STA.w $7542,x
	JSR.w CODE_07A84D
	LDY.w $0073
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_07AAE4,y
	STA.w $70E2,x
	LDY.w $0075
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w DATA_07AAE8,y
	STA.w $7182,x
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07AB48:
	RTL

;---------------------------------------------------------------------------

DATA_07AB49:
	dw $FFD0,$0030

DATA_07AB4D:
	dw $FE00,$0200

YI_NorSpr12F_HorizontalLavaDrop_Init:
;$07AB51
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07AB49
	STA.b $18,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07AB49+$02
	STA.b $76,x
	LDA.w #$0004
	STA.w $7540,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_07AB4D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	SEC
	SBC.w DATA_07AB49,y
	STA.w $70E2,x
	LDA.w #$0003
	STA.w $7A96,x
	RTL

;---------------------------------------------------------------------------

DATA_07AB90:
	db $00,$09,$08,$07,$06,$05,$04,$00

DATA_07AB98:
	dw $0008,$FFF8

YI_NorSpr12F_HorizontalLavaDrop_Main:
;$07AB9C
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_07AC1C
	LDA.b $18,x
	CMP.w $70E2,x
	BCS.b CODE_07AC05
	LDA.b $76,x
	CMP.w $70E2,x
	BCC.b CODE_07AC05
	LDA.w $7A96,x
	BNE.b CODE_07ABC8
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_07ABC8:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_07AC03
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07AB98,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1FA
	JSL.l CODE_008B21
	LDA.b $10
	AND.w #$0006
	SEC
	SBC.w #$0002
	CLC
	ADC.w $7182,x
	STA.w $7142,y
	LDA.b $00
	STA.w $70A2,y
	LDA.w #$0006
	STA.w $7782,y
	LDA.w #$0003
	STA.w $73C2,y
CODE_07AC03:
	BRA.b CODE_07AC19

CODE_07AC05:
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0007
	STA.b $78,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_07AC19:
	JMP.w CODE_07FC4B

CODE_07AC1C:
	LDA.w $7A96,x
	BNE.b CODE_07AC19
	LDA.w #$0004
	STA.w $7A96,x
	LDA.b $78,x
	DEC
	BMI.b CODE_07AC47
	STA.b $78,x
	TAY
	LDA.w DATA_07AB90,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$00
	BNE.b CODE_07AC19
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	BRA.b CODE_07AC19

CODE_07AC47:
	LDA.w $7400,x
	TAY
	LDA.w DATA_07AB4D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7540,x
	LDA.w #$0003
	STA.w $7A96,x
	BRA.b CODE_07AC19

;---------------------------------------------------------------------------

YI_NorSpr130_VerticalLavaDrop_Init:
;$07AC5F
	LDA.w $7182,x
	CLC
	ADC.w DATA_07AB49
	STA.b $18,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_07AB49+$02
	STA.b $76,x
	LDA.w #$0004
	STA.w $7542,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_07AB4D,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	SEC
	SBC.w DATA_07AB49,y
	STA.w $7182,x
	LDA.w DATA_07ACCA,y
	STA.b $00
	LDY.b $78,x
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w #$0003
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

DATA_07ACB2:
	db $00,$01,$02,$03

DATA_07ACB6:
	db $0A,$0B,$0C,$0D

DATA_07ACBA:
	db $0D,$09,$08,$07,$06,$05,$04,$00

DATA_07ACC2:
	db $03,$13,$12,$11,$10,$0F,$0E,$0A

DATA_07ACCA:
	dw DATA_07ACB2,DATA_07ACB6

DATA_07ACCE:
	dw DATA_07ACBA,DATA_07ACC2

YI_NorSpr130_VerticalLavaDrop_Main:
;$07ACD2
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_07ACDE
	JMP.w CODE_07AD75

CODE_07ACDE:
	LDA.b $18,x
	CMP.w $7182,x
	BCS.b CODE_07AD4D
	LDA.b $76,x
	CMP.w $7182,x
	BCC.b CODE_07AD4D
	LDA.w $7A96,x
	BNE.b CODE_07AD11
	LDA.w #$0003
	STA.w $7A96,x
	LDY.b $16,x
	LDA.w DATA_07ACCA,y
	STA.b $00
	DEC.b $78,x
	BPL.b CODE_07AD07
	LDA.w #$0003
	STA.b $78,x
CODE_07AD07:
	LDY.b $78,x
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
CODE_07AD11:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_07AD4B
	LDY.b $16,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_07AB98,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1FB
	JSL.l CODE_008B21
	LDA.b $10
	AND.w #$0006
	SEC
	SBC.w #$0002
	CLC
	ADC.w $70E2,x
	STA.w $70A2,y
	LDA.b $00
	STA.w $7142,y
	LDA.w #$0006
	STA.w $7782,y
	LDA.w #$0003
	STA.w $73C2,y
CODE_07AD4B:
	BRA.b CODE_07AD72

CODE_07AD4D:
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0007
	STA.b $78,x
	LDA.w #$0004
	STA.w $7A96,x
	LDY.b $16,x
	LDA.w DATA_07ACCE,y
	STA.b $00
	LDY.b $78,x
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
CODE_07AD72:
	JMP.w CODE_07FC4B

CODE_07AD75:
	LDY.b $16,x
	LDA.w DATA_07ACCE,y
	STA.b $00
	LDA.w $7A96,x
	BNE.b CODE_07AD72
	DEC.b $78,x
	BMI.b CODE_07AD97
	LDY.b $78,x
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	BRA.b CODE_07AD72

CODE_07AD97:
	LDA.w #$0004
	STA.w $7542,x
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w #$0003
	STA.b $78,x
	LDA.b $16,x
	EOR.w #$0002
	STA.b $16,x
	TAY
	LDA.w DATA_07AB4D,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_07ACCA,y
	STA.b $00
	LDY.b $78,x
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
	BRA.b CODE_07AD72

;---------------------------------------------------------------------------

DATA_07ADC7:
	dw $FFA0,$0060

DATA_07ADCB:
	dw $FF00,$0100

DATA_07ADCF:
	dw $002A,$002B

DATA_07ADD3:
	dw $0002,$0000

YI_NorSpr12B_FatGuy_Init:
;$07ADD7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_07AE0C
	LDA.w #$002A
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$002C
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0003
	BCC.b CODE_07ADFF
	JML.l CODE_03A31E

CODE_07ADFF:
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_07AE0C:
	TAY
	DEY
	LDA.w $7042,x
	ORA.w DATA_07ADD3,y
	STA.w $7042,x
	LDA.w DATA_07ADCF,y
	STA.b $78,x
	TYX
	JMP.w (DATA_07AE20,x)

DATA_07AE20:
	dw CODE_07AE24
	dw CODE_07AE46

CODE_07AE24:
	LDX.b $12
	LDY.w $7400,x
	LDA.w DATA_07ADC7,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0000
	STA.b $16,x
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w DATA_07AE7A
	AND.w #$00FF
	STA.w $7402,x
	STZ.b $18,x
	RTL

CODE_07AE46:
	LDX.b $12
	LDY.w $7400,x
	LDA.w DATA_07ADCB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.b $16,x
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w DATA_07AEAD
	AND.w #$00FF
	STA.w $7402,x
	STZ.b $18,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr12B_FatGuy_Main:
;$07AE68
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_07AE72,x)

DATA_07AE72:
	dw CODE_07AE86
	dw CODE_07AEAF
	dw CODE_07AED8
	dw CODE_07AF0E

DATA_07AE7A:
	db $04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F

CODE_07AE86:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07AEAA
	LDA.w #$0003
	STA.w $7A96,x
	LDA.b $18,x
	INC
	CMP.w #$000C
	BCC.b CODE_07AE9E
	LDA.w #$0000
CODE_07AE9E:
	STA.b $18,x
	TAY
	LDA.w DATA_07AE7A,y
	AND.w #$00FF
	STA.w $7402,x
CODE_07AEAA:
	JMP.w CODE_07AF4A

DATA_07AEAD:
	db $10,$11

CODE_07AEAF:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07AECD
	LDA.w #$0002
	STA.w $7A96,x
	LDA.b $18,x
	EOR.w #$0001
CODE_07AEC0:
	STA.b $18,x
	TAY
	LDA.w DATA_07AEAD,y
	AND.w #$00FF
	STA.w $7402,x
CODE_07AECD:
	JMP.w CODE_07AF4A

DATA_07AED0:
	db $13,$02,$01,$00

DATA_07AED4:
	db $04,$03,$02,$02

CODE_07AED8:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07AEF5
	DEC.b $18,x
	BMI.b CODE_07AEF8
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07AED0,y
	STA.w $7402,x
	LDA.w DATA_07AED4,y
	STA.w $7A96,x
	REP.b #$20
CODE_07AEF5:
	JMP.w CODE_07AF4A

CODE_07AEF8:
	BRA.b CODE_07AF24

DATA_07AEFA:
	db $00,$01,$02,$01,$00,$15,$16,$17

DATA_07AF02:
	db $03,$03,$05,$03,$02,$04,$05,$0F

DATA_07AF0A:
	dw $0100,$FF00

CODE_07AF0E:
	LDX.b $12
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_07AF1B
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07AF1B:
	LDA.w $7A96,x
	BNE.b CODE_07AF4A
	DEC.b $18,x
	BPL.b CODE_07AF36
CODE_07AF24:
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	JSL.l CODE_07AE46
	BRA.b CODE_07AF4A

CODE_07AF36:
	LDY.b $18,x
	LDA.w DATA_07AEFA,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07AF02,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_07AF4A:
	LDY.w $7D36,x
	BMI.b CODE_07AF90
	DEY
	BMI.b CODE_07AF8F
	BEQ.b CODE_07AF8F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07AF8F
	LDA.w $7D38,y
	BEQ.b CODE_07AF8F
	LDA.w $7542,y
	CMP.w #$0040
	BPL.b CODE_07AFE3
	PHY
	JSL.l CODE_03B24B
	PLY
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHY
	JSL.l CODE_03B53D
	PLX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_07AF8F:
	RTL

CODE_07AF90:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_07AF9D
	JSL.l CODE_07FC2F
	BCS.b CODE_07AFA1
	BEQ.b CODE_07AF8F
CODE_07AF9D:
	JML.l CODE_03A858

CODE_07AFA1:
	LDA.w $60D4
	BEQ.b CODE_07AFA9
	JMP.w CODE_07B04B

CODE_07AFA9:
	LDA.w #!Define_YI_SoundID15_Growth
	JSL.l CODE_0085D2
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0008
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $16,x
	LDA.w #$0003
	STA.b $18,x
	TAY
	LDA.w DATA_07AED0,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07AED4,y
	AND.w #$00FF
	STA.w $7A96,x
	RTL

CODE_07AFE3:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_07AF8F
	PHY
	LDA.w #!Define_YI_SoundID15_Growth
	JSL.l CODE_0085D2
	PLY
	LDX.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BPL.b CODE_07B001
	INX
	INX
CODE_07B001:
	LDA.w DATA_07AF0A,x
	STA.b $00
	LDX.b $12
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w #$0006
	STA.b $16,x
	LDA.w #$0007
	STA.b $18,x
	TAY
	LDA.w DATA_07AEFA,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07AF02,y
	AND.w #$00FF
	STA.w $7A96,x
	RTL

CODE_07B04B:
	JSL.l CODE_03A79C
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

YI_NorSpr13D_DanglingFang_Init:
;$07B052
	LDA.w #$0004
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr13D_DanglingFang_Main:
;$07B059
	JSR.w CODE_07B253
	JSL.l CODE_03AF23
	LDY.w $7A38,x
	BEQ.b CODE_07B068
	JMP.w CODE_07B24F

CODE_07B068:
	JSR.w CODE_07B194
	LDA.b $16,x
	TAX
	JSR.w (DATA_07B076,x)
	JSL.l CODE_03A5B7
	RTL

DATA_07B076:
	dw CODE_07B080
	dw CODE_07B0D1
	dw CODE_07B14A

DATA_07B07C:
	dw $FFFF,$0000

CODE_07B080:
	LDX.b $12
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0020
	BPL.b CODE_07B0C6
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_07B0C6
	LDA.w #$0194
	STA.b $18,x
	JSR.w CODE_07B177
	LDA.w #$0000
	STA.w $7402,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07B0B6
	INY
	INY
CODE_07B0B6:
	LDA.w DATA_07B0CD,y
	STA.w $7A96,x
	LDA.w #$0040
	STA.w $7AF6,x
	INC.b $16,x
	INC.b $16,x
CODE_07B0C6:
	RTS

DATA_07B0C7:
	db $00,$01,$02,$03,$02,$01

DATA_07B0CD:
	dw $0003,$0001

CODE_07B0D1:
	LDX.b $12
	JSR.w CODE_07B165
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0010
	BMI.b CODE_07B0F5
	LDA.b $18,x
	CLC
	ADC.w #$0004
	AND.w #$01FE
	STA.b $18,x
	JSR.w CODE_07B177
	INC.b $16,x
	INC.b $16,x
CODE_07B0F5:
	LDA.w $7A96,x
	BNE.b CODE_07B11D
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07B103
	INY
	INY
CODE_07B103:
	LDA.w DATA_07B0CD,y
	STA.w $7A96,x
	LDA.b $78,x
	DEC
	BPL.b CODE_07B111
	LDA.w #$0005
CODE_07B111:
	STA.b $78,x
	TAY
	LDA.w DATA_07B0C7,y
	AND.w #$00FF
	STA.w $7402,x
CODE_07B11D:
	LDA.w $7A98,x
	BNE.b CODE_07B149
	LDA.w #!Define_YI_AmbSpr1FC
	JSL.l CODE_008B21
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7142,y
	LDA.w #$003C
	STA.w $7782,y
	LDA.w #$000C
	STA.w $7A98,x
CODE_07B149:
	RTS

CODE_07B14A:
	LDX.b $12
	LDA.b $18,x
	BNE.b CODE_07B156
	LDY.b $76,x
	BNE.b CODE_07B162
	INC.b $76,x
CODE_07B156:
	CLC
	ADC.w #$0004
	AND.w #$01FE
	STA.b $18,x
	JSR.w CODE_07B177
CODE_07B162:
	JMP.w CODE_07B0F5

CODE_07B165:
	LDA.w $7AF6,x
	BEQ.b CODE_07B176
	AND.w #$0003
	BNE.b CODE_07B176
	LDA.w #!Define_YI_SoundID1B_MaceTick
	JSL.l CODE_0085D2
CODE_07B176:
	RTS

CODE_07B177:
	REP.b #$10
	TXY
	TAX
	LDA.l DATA_00E9D4,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_00E954,x
	LDX.w $7400,y
	EOR.w DATA_07B07C,x
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	TYX
	SEP.b #$10
	RTS

CODE_07B194:
	LDY.w $7D36,x
	BPL.b CODE_07B1A5
	JSL.l CODE_07FC2F
	BCS.b CODE_07B1A5
	BEQ.b CODE_07B1A5
	JSL.l CODE_03A858
CODE_07B1A5:
	RTS

;---------------------------------------------------------------------------

DATA_07B1A6:
	dw $FEA0,$0160,$0020,$FFE0

DATA_07B1AE:
	dw $F800,$0800

DATA_07B1B2:
	dw $FF80,$0080

YI_NorSpr13E_FlyingFang_Init:
CODE_07B1B6:
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w $7182,x
	STA.b $18,x
	LDA.w DATA_07B1A6,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_07B1AE,y
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	LDY.w $7400,x
	LDA.w DATA_07B1B2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0000
	STA.w $7402,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07B1EF
	INY
	INY
CODE_07B1EF:
	LDA.w DATA_07B0CD,y
	STA.w $7A96,x
	LDA.w #$0040
	STA.w $7AF6,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr13E_FlyingFang_Main:
;$07B1FC
	LDA.w $7A36,x
	BEQ.b CODE_07B20F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07B20F
	DEC.w !RAM_YI_Level_NorSpr_SpawnedBatGeneratorBatsLo
	STZ.w $7A36,x
CODE_07B20F:
	JSR.w CODE_07B253
	JSL.l CODE_03AF23
	JSL.l CODE_07FC64
	BCC.b CODE_07B22B
	LDA.w $7A36,x
	BEQ.b CODE_07B227
	DEC.w !RAM_YI_Level_NorSpr_SpawnedBatGeneratorBatsLo
	STZ.w $7A36,x
CODE_07B227:
	JML.l CODE_03A31E

CODE_07B22B:
	JSR.w CODE_07B165
	LDY.w $7A38,x
	BNE.b CODE_07B24F
	JSR.w CODE_07B194
	LDY.b #$00
	LDA.w $7182,x
	CMP.b $18,x
	BPL.b CODE_07B241
	INY
	INY
CODE_07B241:
	LDA.w DATA_07B1AE,y
	STA.w $75E2,x
	JSR.w CODE_07B0F5
	JSL.l CODE_03A5B7
	RTL

CODE_07B24F:
	JSR.w CODE_07B0F5
	RTL

CODE_07B253:
	LDA.w $7D38,x
	BEQ.b CODE_07B281
	STZ.w $7D38,x
	LDA.w #$0001
	STA.w $7A38,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$FF00
	STA.w $75E2,x
	LDA.w #$0020
	STA.w $75E0,x
	LDA.w #$0200
	LDY.w $7221,x
	BPL.b CODE_07B27E
	LDA.w #$FE00
CODE_07B27E:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07B281:
	RTS

;---------------------------------------------------------------------------

DATA_07B282:
	dw $0020,$FFE0

DATA_07B286:
	dw $FF00,$0100

DATA_07B28A:
	dw $0100,$FF00

YI_NorSpr13F_SwimmingFlopsyFish_Init:
YI_NorSpr140_SwimmingAndJumpingFlopsyFish_Init:
;$07B28E
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w #!Define_YI_LevelID_LakeShoreParadise
	BNE.b CODE_07B2A0
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7182,x
CODE_07B2A0:
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w $70E2,x
	STA.b $18,x
	CLC
	ADC.w DATA_07B282,y
	STA.w $70E2,x
	LDA.w DATA_07B286,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.b $76,x
	TAY
	LDA.w DATA_07B2EB,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07B2EF,y
	AND.w #$00FF
	STA.w $7A96,x
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_07B2EB:
	dw $0E00,$0100

DATA_07B2EF:
	db $08,$0A,$08,$0A

YI_NorSpr13F_SwimmingFlopsyFish_Main:
;$07B2F3
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000C
	BNE.b CODE_07B301
	LDA.w #$0003
	STA.w $7402,x
CODE_07B301:
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JSR.w (DATA_07B330,x)
	JSL.l CODE_03A5B7
	RTL

YI_NorSpr140_SwimmingAndJumpingFlopsyFish_Main:
;$07B310
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000C
	BNE.b CODE_07B31E
	LDA.w #$0003
	STA.w $7402,x
CODE_07B31E:
	JSL.l CODE_03AF23
	JSR.w CODE_07B33E
	LDA.b $16,x
	TAX
	JSR.w (DATA_07B330,x)
	JSL.l CODE_03A5B7
	RTL

DATA_07B330:
	dw CODE_07B35F
	dw CODE_07B3FE
	dw CODE_07B455
	dw CODE_07B492
	dw CODE_07B53D
	dw CODE_07B580
	dw CODE_07B5D6

CODE_07B33E:
	LDA.w $7A38,x
	BNE.b CODE_07B35E
	LDA.b $10
	AND.w #$003F
	BNE.b CODE_07B35E
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	INC.w $7A38,x
	LDA.w #$0004
	STA.b $16,x
CODE_07B35E:
	RTS

CODE_07B35F:
	LDX.b $12
	JSR.w CODE_07B645
	LDA.w $70E2,x
	SEC
	SBC.b $18,x
	PHA
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_07B3BB
	STZ.w $7540,x
	PLA
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_07B387
	LDA.w #$0004
	STA.w $7540,x
CODE_07B387:
	LDY.b #$00
	LDA.w $70E2,x
	CMP.b $18,x
	BCC.b CODE_07B392
	INY
	INY
CODE_07B392:
	LDA.w DATA_07B28A,y
	STA.w $75E0,x
	LDA.w $7A96,x
	BNE.b CODE_07B3BA
	DEC.b $76,x
	BPL.b CODE_07B3A6
	LDA.w #$0003
	STA.b $76,x
CODE_07B3A6:
	LDY.b $76,x
	LDA.w DATA_07B2EB,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07B2EF,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_07B3BA:
	RTS

CODE_07B3BB:
	PLA
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.b $18,x
	CLC
	ADC.w DATA_07B282,y
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $76,x
	LDA.w #$0000
	STA.w $7402,x
	LDA.w DATA_07B3F0,y
	STA.b $78,x
	INC.w $7A38,x
	INC.b $16,x
	INC.b $16,x
	RTS

DATA_07B3F0:
	dw DATA_07B3F9,DATA_07B3F4

DATA_07B3F4:
	db $00,$0E,$10,$0E,$00

DATA_07B3F9:
	db $00,$01,$0F,$01,$00

CODE_07B3FE:
	LDX.b $12
	JSR.w CODE_07B645
	LDA.w $7A96,x
	BNE.b CODE_07B42D
	DEC.b $76,x
	BMI.b CODE_07B42E
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_07B41B
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07B41B:
	LDA.w #$0008
	STA.w $7A96,x
	LDA.b $78,x
	STA.b $00
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
CODE_07B42D:
	RTS

CODE_07B42E:
	STZ.w $7A38,x
CODE_07B431:
	LDA.w #$0003
	STA.b $76,x
	TAY
	LDA.w DATA_07B2EB,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07B2EF,y
	AND.w #$00FF
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_07B286,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $16,x
	RTS

CODE_07B455:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07B46E
	DEC.b $76,x
	BMI.b CODE_07B46F
	LDY.b $76,x
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w #$0002
	STA.w $7402,x
CODE_07B46E:
	RTS

CODE_07B46F:
	LDA.w #$0002
	STA.b $76,x
	TAY
	LDA.w DATA_07B48F,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0006
	STA.w $7A96,x
	LDA.w #$F900
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
	RTS

DATA_07B48F:
	db $05,$04,$03

CODE_07B492:
	LDX.b $12
	JSR.w CODE_07B674
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	BMI.b CODE_07B4A3
	JMP.w CODE_07B52F

CODE_07B4A3:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_07B4DD
	LDA.w $7182,x
	CMP.w $7A36,x
	BPL.b CODE_07B4DD
	LDA.w #!Define_YI_AmbSpr1FE
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7A36,x
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.w #$0006
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_07B4DD:
	LDA.w $7182,x
	CMP.w $7A36,x
	BPL.b CODE_07B50F
	LDA.w $7A98,x
	BNE.b CODE_07B50F
	LDA.w #!Define_YI_AmbSpr1FD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000F
	STA.w $73C2,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #$0006
	STA.w $7A98,x
CODE_07B50F:
	LDA.w $7A96,x
	BNE.b CODE_07B52E
	DEC.b $76,x
	BPL.b CODE_07B51D
	LDA.w #$0002
	STA.b $76,x
CODE_07B51D:
	LDY.b $76,x
	LDA.w DATA_07B48F,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0006
	STA.w $7A96,x
CODE_07B52E:
	RTS

CODE_07B52F:
	LDA.w #$0006
	STA.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
	RTS

CODE_07B53D:
	LDX.b $12
	JSR.w CODE_07B674
	LDY.b #$06
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	CMP.w #$0100
	BCC.b CODE_07B55E
	LDY.b #$07
	CMP.w #$0180
	BCC.b CODE_07B55E
	CMP.w #$0200
	BCS.b CODE_07B563
	LDY.b #$08
CODE_07B55E:
	TYA
	STA.w $7402,x
	RTS

CODE_07B563:
	LDA.w #$0002
	STA.b $76,x
	TAY
	LDA.w DATA_07B57D,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0006
	STA.w $7A96,x
	INC.b $16,x
	INC.b $16,x
	RTS

DATA_07B57D:
	db $0B,$0A,$09

CODE_07B580:
	LDX.b $12
	JSR.w CODE_07B674
	LDA.w $7A36,x
	SEC
	SBC.w $7182,x
	CMP.w #$0020
	BCC.b CODE_07B5B1
	LDA.w $7A96,x
	BNE.b CODE_07B5B0
	DEC.b $76,x
	BPL.b CODE_07B59F
	LDA.w #$0002
	STA.b $76,x
CODE_07B59F:
	LDY.b $76,x
	LDA.w DATA_07B57D,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0006
	STA.w $7A96,x
CODE_07B5B0:
	RTS

CODE_07B5B1:
	LDA.w #$0003
	STA.b $76,x
	TAY
	LDA.w DATA_07B5CE,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07B5D2,y
	AND.w #$00FF
	STA.w $7A96,x
	INC.b $16,x
	INC.b $16,x
	RTS

DATA_07B5CE:
	db $01,$02,$0D,$0C

DATA_07B5D2:
	db $08,$0C,$08,$08

CODE_07B5D6:
	LDX.b $12
	JSR.w CODE_07B674
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_07B615
	LDA.w $7182,x
	CMP.w $7A36,x
	BMI.b CODE_07B615
	LDA.w #!Define_YI_AmbSpr1FE
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7A36,x
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.w #$0006
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_07B615:
	LDA.w $7A96,x
	BNE.b CODE_07B638
	DEC.b $76,x
	BPL.b CODE_07B624
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JMP.w CODE_07B431

CODE_07B624:
	LDY.b $76,x
	LDA.w DATA_07B5CE,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07B5D2,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_07B638:
	RTS

DATA_07B639:
	dw $0040,$FFC0

DATA_07B63D:
	dw $0008,$0008

DATA_07B641:
	dw $0000,$0004

CODE_07B645:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.w $7CD8,x
	CLC
	ADC.w DATA_07B641,y
	LDY.b #$00
	CMP.w $7A36,x
	BMI.b CODE_07B65F
	INY
	INY
CODE_07B65F:
	LDA.w DATA_07B639,y
	STA.w $75E2,x
	LDA.w DATA_07B63D,y
	STA.w $7542,x
	RTS

DATA_07B66C:
	dw $0400,$FF00

DATA_07B670:
	dw $0040,$0040

CODE_07B674:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.w $7CD8,x
	CLC
	ADC.w DATA_07B641,y
	LDY.b #$00
	CMP.w $7A36,x
	BMI.b CODE_07B68E
	INY
	INY
CODE_07B68E:
	LDA.w DATA_07B66C,y
	STA.w $75E2,x
	LDA.w DATA_07B670,y
	STA.w $7542,x
	RTS

;---------------------------------------------------------------------------

DATA_07B69B:
	dw $FFE0,$0020

DATA_07B69F:
	dw $0060,$0030

YI_NorSpr145_BlueSluggy_Init:
;$07B6A3
	LDY.w $7400,x
	LDA.w DATA_07B69B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
YI_NorSpr146_PinkSluggy_Init:
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0003
	STA.b $18,x
	TAY
	LDA.w DATA_07B74B,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0100
	STA.w $7542,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_07B69F,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr145_BlueSluggy_Main:
YI_NorSpr146_PinkSluggy_Main:
;$07B6DC
	LDA.w $7D38,x
	BEQ.b CODE_07B704
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_07B704
	LDA.w #$0005
	STA.w $7402,x
	LDA.w $7042,x
	AND.w #$FF7F
	STA.w $7042,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
CODE_07B704:
	JSL.l CODE_03AF23
	JSL.l CODE_07B853
	LDA.b $16,x
	TAX
	JSR.w (DATA_07B716,x)
	JML.l CODE_07B830

DATA_07B716:
	dw CODE_07B71E
	dw CODE_07B774
	dw CODE_07B7C1
	dw CODE_07B82B

CODE_07B71E:
	LDX.b $12
	JSL.l CODE_07FC7B
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BCS.b CODE_07B74F
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $18,x
	TAY
	LDA.w DATA_07B76F,y
	AND.w #$00FF
	STA.w $7402,x
	INC.b $16,x
	INC.b $16,x
	RTS

DATA_07B74B:
	db $01,$02,$01,$00

CODE_07B74F:
	LDA.w $7A96,x
	BNE.b CODE_07B76E
	LDA.w #$0008
	STA.w $7A96,x
	DEC.b $18,x
	BPL.b CODE_07B763
	LDA.w #$0003
	STA.b $18,x
CODE_07B763:
	LDY.b $18,x
	LDA.w DATA_07B74B,y
	AND.w #$00FF
	STA.w $7402,x
CODE_07B76E:
	RTS

DATA_07B76F:
	db $04,$03,$02,$01,$00

CODE_07B774:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07B790
	LDA.w #$0004
	STA.w $7A96,x
	DEC.b $18,x
	BMI.b CODE_07B791
	LDY.b $18,x
	LDA.w DATA_07B76F,y
	AND.w #$00FF
	STA.w $7402,x
CODE_07B790:
	RTS

CODE_07B791:
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7182,x
	LDA.w #$0005
	STA.w $7402,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0005
	STA.b $18,x
	INC.b $16,x
	INC.b $16,x
	RTS

DATA_07B7B7:
	db $02,$01,$00,$01,$02

DATA_07B7BC:
	db $10,$04,$04,$01,$01

CODE_07B7C1:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07B7FE
	LDA.b $76,x
	BNE.b CODE_07B7E1
	LDA.w #!Define_YI_SoundID60_Splash2
	JSL.l CODE_0085D2
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	INC.b $76,x
CODE_07B7E1:
	LDA.w $7A96,x
	BNE.b CODE_07B7FE
	DEC.b $18,x
	BMI.b CODE_07B7FF
	LDY.b $18,x
	LDA.w DATA_07B7B7,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07B7BC,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_07B7FE:
	RTS

CODE_07B7FF:
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0003
	STA.b $18,x
	TAY
	LDA.w DATA_07B74B,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w $6FA2,x
	ORA.w #$0100
	STA.w $6FA2,x
	LDY.w $7400,x
	LDA.w DATA_07B69B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
	RTS

CODE_07B82B:
	LDX.b $12
	JMP.w CODE_07B74F

CODE_07B830:
	LDY.w $7D36,x
	BPL.b CODE_07B852
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07B845
	JSL.l CODE_07FC2A
	BCS.b CODE_07B849
	BEQ.b CODE_07B852
CODE_07B845:
	JML.l CODE_03A858

CODE_07B849:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07B852:
	RTL

CODE_07B853:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07B8B2
	BEQ.b CODE_07B8B2
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07B8B2
	LDA.w $7D38,y
	BEQ.b CODE_07B8B2
	LDA.w #!Define_YI_SoundID62_MelonBugBump
	JSL.l CODE_0085D2
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $75E0,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0005
	STA.w $7402,x
	LDA.w $7042,x
	AND.w #$FF7F
	STA.w $7042,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	INC.b $78,x
	PLY
	PLA
CODE_07B8B2:
	RTL

DATA_07B8B3:
	dw $0021,$0023,$0025

YI_NorSpr145_BlueSluggy_StompRt:
YI_NorSpr146_PinkSluggy_StompRt:
;$07B8B9
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BNE.b CODE_07B938
	LDA.w $7A38,x
	BNE.b CODE_07B928
	LDA.w $60AA
	BMI.b CODE_07B91F
	LDA.w #$0001
	STA.w $61B4
	LDA.w $7A36,x
	BNE.b CODE_07B8F3
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$0100
	STA.w $60AA
	LDA.w $7182,x
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $7A36,x
	RTL

CODE_07B8F3:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0010
	CMP.w #$0004
	BMI.b CODE_07B939
	PHA
	ASL
	ASL
	ASL
	ASL
	STA.w $60AA
	PLA
	LDY.b #$02
	CMP.w #$0018
	BCS.b CODE_07B91A
	DEY
	CMP.w #$0010
	BCS.b CODE_07B91A
	DEY
CODE_07B91A:
	TYA
	STA.w $7402,x
	RTL

CODE_07B91F:
	LDA.w #$0003
	STA.w $7A96,x
	INC.w $7A38,x
CODE_07B928:
	LDA.w $7A96,x
	BNE.b CODE_07B938
	DEC.w $7402,x
	BMI.b CODE_07B939
	LDA.w #$0003
	STA.w $7A96,x
CODE_07B938:
	RTL

CODE_07B939:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	REP.b #$20
	LDA.w #!Define_YI_AmbSpr1EE
	JSL.l CODE_008B21
	LDA.w #$0008
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	JML.l CODE_03A32E

;---------------------------------------------------------------------------

DATA_07B96C:
	dw !Define_YI_SoundID2F_ClankSound8,!Define_YI_SoundID2E_ClankSound7,!Define_YI_SoundID2D_ClankSound6,!Define_YI_SoundID2C_ClankSound5
	dw !Define_YI_SoundID2B_ClankSound4,!Define_YI_SoundID2A_ClankSound3,!Define_YI_SoundID29_ClankSound2,!Define_YI_SoundID28_ClankSound1

DATA_07B97C:
	dw $FA58,$F800,$FA58,$0000,$05A8,$0800,$05A8,$0000

DATA_07B98C:
	dw $FA58,$0000,$05A8,$0800,$05A8,$0000,$FA58,$F800

DATA_07B99C:
	dw $0000,$0002,$0004,$0008

YI_NorSpr149_UpArrowCloud_Init:
CODE_07B9A4:
	LDA.w #$000E
	BRA.b CODE_07B9CA

YI_NorSpr14A_UpRightArrowCloud_Init:
	LDA.w #$000C
	BRA.b CODE_07B9CA

YI_NorSpr14B_RightArrowCloud_Init:
	LDA.w #$000A
	BRA.b CODE_07B9CA

YI_NorSpr14C_DownRightArrowCloud_Init:
	LDA.w #$0008
	BRA.b CODE_07B9CA

YI_NorSpr14D_DownArrowCloud_Init:
	LDA.w #$0006
	BRA.b CODE_07B9CA

YI_NorSpr14E_DownLeftArrowCloud_Init:
	LDA.w #$0004
	BRA.b CODE_07B9CA

YI_NorSpr14F_LeftArrowCloud_Init:
	LDA.w #$0002
	BRA.b CODE_07B9CA

YI_NorSpr150_UpLeftArrowCloud_Init:
	LDA.w #$0000
CODE_07B9CA:
	STA.b $18,x
	LDA.w #$0002
	STA.w $7402,x
	STA.b $76,x
	LDA.w #$0008
	STA.w $7A96,x
	STZ.w $7400,x
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w $7042,x
	ORA.w DATA_07B99C,y
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr151_RotatingArrowCloud_Init:
;$07B9EE
	LDY.b #$03
	STY.w !REGISTER_Multiplicand
	LDA.b $10
	AND.w #$0007
	INC
	TAY
	STY.w !REGISTER_Multiplier
	LDA.w #$0017
	STA.b $76,x
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w !REGISTER_ProductOrRemainderLo
	DEC
	STA.w $7402,x
	STA.w !REGISTER_DividendLo
	LDY.b #$03
	STY.w !REGISTER_Divisor
	STZ.w $7400,x
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w $7042,x
	ORA.w DATA_07B99C,y
	STA.w $7042,x
	LDA.w !REGISTER_QuotientLo
	ASL
	STA.b $18,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr149_UpArrowCloud_Main:
YI_NorSpr14A_UpRightArrowCloud_Main:
YI_NorSpr14B_RightArrowCloud_Main:
YI_NorSpr14C_DownRightArrowCloud_Main:
YI_NorSpr14D_DownArrowCloud_Main:
YI_NorSpr14E_DownLeftArrowCloud_Main:
YI_NorSpr14F_LeftArrowCloud_Main:
YI_NorSpr150_UpLeftArrowCloud_Main:
;$07BA31
	JSL.l CODE_03AF23
	JSL.l CODE_07BA78
	JSR.w CODE_07BA62
	RTL

YI_NorSpr151_RotatingArrowCloud_Main:
;$07BA3D
	JSL.l CODE_03AF23
	LDA.w $7402,x
	STA.w !REGISTER_DividendLo
	LDY.b #$03
	STY.w !REGISTER_Divisor
	NOP #8
	LDA.w !REGISTER_QuotientLo
	ASL
	STA.b $18,x
	JSL.l CODE_07BA78
	JSR.w CODE_07BA62
	RTL

CODE_07BA62:
	LDA.w $7A96,x
	BNE.b CODE_07BA77
	DEC.w $7402,x
	BPL.b CODE_07BA71
	LDA.b $76,x
	STA.w $7402,x
CODE_07BA71:
	LDA.w #$0008
	STA.w $7A96,x
CODE_07BA77:
	RTS

CODE_07BA78:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07BA9A
	BEQ.b CODE_07BA9A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07BA9A
	LDA.w $7D38,y
	BEQ.b CODE_07BA9A
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_07BA9A
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCC.b CODE_07BA9D
CODE_07BA9A:
	JMP.w CODE_07BB13

CODE_07BA9D:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0000
	STA.w $7542,y
	LDA.b $18,x
	TAX
	LDA.w DATA_07B97C,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w DATA_07B98C,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FFFF
	STA.w $7A96,y
	INC
	SEP.b #$20
	STA.w $77C0,y
	REP.b #$20
	LDX.b $12
	JSL.l CODE_039F2B
	LDA.w #!Define_YI_AmbSpr200
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0080
	STA.w $7782,y
	LDA.w $7042,x
	AND.w #$000E
	ORA.w $7002,y
	STA.w $7002,y
	LDA.b $18,x
	LSR
	STA.w $73C2,y
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	LDY.b $18,x
	LDA.w DATA_07B96C,y
	JSL.l CODE_0085D2
	JSL.l CODE_03A32E
	PLY
	PLA
CODE_07BB13:
	RTL

;---------------------------------------------------------------------------

DATA_07BB14:
	dw $FF80,$0080

DATA_07BB18:
	dw $FFE0,$0020

DATA_07BB1C:
	dw $0800,$F800

YI_NorSpr152_Flutter_Init:
;$07BB20
	LDY.w $7400,x
	LDA.w DATA_07BB14,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w $7182,x
	STA.b $18,x
	CLC
	ADC.w DATA_07BB18,y
	STA.w $7182,x
	LDA.w DATA_07BB1C,y
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$0003
	STA.b $76,x
	TAY
	LDA.w DATA_07BB8A,y
	AND.w #$00FF
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr152_Flutter_Main:
;$07BB61
	LDA.w $7D38,x
	BEQ.b CODE_07BB72
	LDA.w $6FA0,x
	AND.w #$FFDF
	ORA.w #$0200
	STA.w $6FA0,x
CODE_07BB72:
	JSL.l CODE_03AF23
	JSL.l CODE_07BE69
	JSL.l CODE_07E336
	LDA.b $16,x
	TAX
	JMP.w (DATA_07BB84,x)

DATA_07BB84:
	dw CODE_07BB8E
	dw CODE_07BC9E
	dw CODE_07BD21

DATA_07BB8A:
	db $01,$02,$01,$00

CODE_07BB8E:
	LDX.b $12
	JSL.l CODE_07BBC9
	LDA.w $7A96,x
	BNE.b CODE_07BBB3
	DEC.b $76,x
	BPL.b CODE_07BBA2
	LDA.w #$0003
	STA.b $76,x
CODE_07BBA2:
	LDY.b $76,x
	LDA.w DATA_07BB8A,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_07BBB3:
	LDY.b #$00
	LDA.w $7182,x
	CMP.b $18,x
	BMI.b CODE_07BBBE
	INY
	INY
CODE_07BBBE:
	LDA.w DATA_07BB1C,y
	STA.w $75E2,x
	RTL

DATA_07BBC5:
	dw $0100,$FF00

CODE_07BBC9:
	LDY.w $7D36,x
	BPL.b CODE_07BBF3
	JSL.l CODE_07FC2F
	BEQ.b CODE_07BC05
	BCC.b CODE_07BBEF
	LDA.w $60A8
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $60AA
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	JSL.l CODE_03B20B
	BRA.b CODE_07BC1B

CODE_07BBEF:
	JML.l CODE_03A858

CODE_07BBF3:
	DEY
	BMI.b CODE_07BC05
	BEQ.b CODE_07BC05
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07BC05
	LDA.w $7D38,y
	BNE.b CODE_07BC08
CODE_07BC05:
	JMP.w CODE_07BC8F

CODE_07BC08:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_07BC1B:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7542,x
	STA.w $7540,x
	STZ.w $75E2,x
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	TAY
	LDA.w DATA_07BC90,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07BC97,y
	AND.w #$00FF
	STA.w $7A96,x
	LDY.w $77C2,x
	LDA.w DATA_07BBC5,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr202
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0020
	STA.w $7502,y
	LDA.w #$0400
	STA.w $75A2,y
	LDA.w #$0040
	STA.w $7782,y
	LDA.w #$0002
	STA.b $16,x
	PLY
	PLA
CODE_07BC8F:
	RTL

DATA_07BC90:
	db $03,$04,$05,$06,$05,$04,$03

DATA_07BC97:
	db $02,$02,$02,$04,$02,$02,$02

CODE_07BC9E:
	LDX.b $12
	JSL.l CODE_07BE33
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_07BCB5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_07BCB5:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BPL.b CODE_07BCC6
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_07BCC6:
	LDA.w $7A96,x
	BNE.b CODE_07BCE5
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	BMI.b CODE_07BCE6
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	LDA.w DATA_07BC90,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07BC97,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_07BCE5:
	RTL

CODE_07BCE6:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.b $76,x
	TAY
	LDA.w DATA_07BD19,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w #$0040
	STA.w $7A98,x
	LDA.w #$0004
	STA.b $16,x
	RTL

DATA_07BD19:
	db $08,$09,$08,$07

DATA_07BD1D:
	dw $FFF0,$0000

CODE_07BD21:
	LDX.b $12
	LDA.w $7A98,x
	BEQ.b CODE_07BD31
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
CODE_07BD31:
	JSL.l CODE_07BE33
	LDA.w $7A96,x
	BNE.b CODE_07BD54
	DEC.b $76,x
	BPL.b CODE_07BD43
	LDA.w #$0003
	STA.b $76,x
CODE_07BD43:
	LDY.b $76,x
	LDA.w DATA_07BD19,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
CODE_07BD54:
	LDA.w $7AF6,x
	BNE.b CODE_07BDA7
	LDA.w #$000E
	STA.w $7AF6,x
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07BD1D,y
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.b $02
	LDA.w #$FE00
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $04
	LDA.w #$FE00
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.b $06
	LDA.w #$0002
	STA.b $08
	JSR.w CODE_07BDE8
	LDY.w $7400,x
	LDA.b $00
	CLC
	ADC.w #$0010
	STA.b $00
	LDA.w #$0200
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $04
	STZ.b $08
	JSR.w CODE_07BDE8
CODE_07BDA7:
	LDA.b $78,x
	BNE.b CODE_07BDE7
	LDA.w $7A98,x
	BNE.b CODE_07BDE7
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $78,x
CODE_07BDE7:
	RTL

CODE_07BDE8:
	LDA.w #!Define_YI_AmbSpr203
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $06
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $75A0,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $75A0,y
	LDA.w $75A2,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w $75A2,y
	LDA.w $7968
	STA.w $73C0,y
	LDA.w #$0040
	STA.w $7502,y
	STA.w $7500,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0006
	STA.w $73C2,y
	RTS

CODE_07BE33:
	LDY.w $7D36,x
	BPL.b CODE_07BE4F
	JSL.l CODE_07FC2F
	BEQ.b CODE_07BE68
	BCC.b CODE_07BE4B
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	JML.l CODE_03B20B

CODE_07BE4B:
	JML.l CODE_03A858

CODE_07BE4F:
	DEY
	BMI.b CODE_07BE68
	BEQ.b CODE_07BE68
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07BE68
	LDA.w $7D38,y
	BEQ.b CODE_07BE68
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_07BE68:
	RTL

CODE_07BE69:
	LDA.w $7A36,x
	BEQ.b CODE_07BE8F
	LDA.w $7680,x
	CLC
	ADC.w #$0050
	CMP.w #$0190
	BCS.b CODE_07BE86
	LDA.w $7682,x
	CLC
	ADC.w #$0050
	CMP.w #$0190
	BCC.b CODE_07BE8F
CODE_07BE86:
	DEC.w $0C6C
	PLY
	PLA
	JML.l CODE_03A31E

CODE_07BE8F:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr143_SprayFish_Init:
;$07BE90
	LDA.w $70E2,x
	SEC
	SBC.w #$0020
	STA.b $76,x
	CLC
	ADC.w #$0040
	STA.b $78,x
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
	STA.w $7A38,x
	SEC
	SBC.w #$001C
	STA.w $7A36,x
	RTL

;---------------------------------------------------------------------------

DATA_07BEB4:
	dw $FFF0,$FFFB,$FFEA,$FFF5,$FFE4,$FFEF,$FFDE,$FFE9
	dw $FFD8,$FFE3,$FFD2,$FFDD,$FFCC,$FFD7,$FFC6,$FFD1
	dw $FFC0,$FFCB,$FFBA,$FFC5,$FFB4,$FFBF,$FFAE,$FFB9
	dw $FFA8,$FFB3,$FFA2,$FFAD,$FF9C,$FFA7,$FF96,$FFA1
	dw $FF90,$FF9B,$FF8A,$FF95

YI_NorSpr143_SprayFish_Main:
;$07BEFC
	LDY.w $74A2,x
	BMI.b CODE_07BF23
	LDA.w $7402,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_07BEB4
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #DATA_07BEB4>>16
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_089332>>16
	LDA.w #FXCODE_089332
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_07BF23:
	JSL.l CODE_03AF23
	LDA.b $18,x
	TAX
	JMP.w (DATA_07BF2D,x)

DATA_07BF2D:
	dw CODE_07BF39
	dw CODE_07BFBF
	dw CODE_07BFF3
	dw CODE_07C04E
	dw CODE_07C0B1
	dw CODE_07C0DD

CODE_07BF39:
	LDX.b $12
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.w $7A96,x
	BNE.b CODE_07BF81
	LDA.w $7C18,x
	SEC
	SBC.w #$0018
	CMP.w #$00A0
	BCS.b CODE_07BF81
	LDY.w $77C2,x
	DEY
	BMI.b CODE_07BF5F
	EOR.w #$FFFF
	INC
CODE_07BF5F:
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.b $76,x
	BPL.b CODE_07BF6B
	LDA.b $76,x
	BRA.b CODE_07BF71

CODE_07BF6B:
	CMP.b $78,x
	BMI.b CODE_07BF71
	LDA.b $78,x
CODE_07BF71:
	STA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_07BF82
CODE_07BF81:
	RTL

CODE_07BF82:
	LDA.w #!Define_YI_AmbSpr1BA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7A36,x
	STA.w $7142,y
	LDA.w #$001A
	STA.w $7E4C,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID61_Splash3
	JSL.l CODE_0085D2
	LDA.w #$0018
	STA.w $7A96,x
	LDA.w $7A38,x
	STA.w $7182,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $18,x
	INC.b $18,x
	RTL

CODE_07BFBF:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07BFDC
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.w $7402,x
	LDA.w #$0030
	STA.w $7A98,x
	LDA.w #$00D1
	STA.w $7AF6,x
	INC.b $18,x
	INC.b $18,x
CODE_07BFDC:
	JSR.w CODE_07C285
	RTL

DATA_07BFE0:
	db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01
	db $01,$01,$C0

CODE_07BFF3:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_07BFDC
	LDA.w #$0002
	STA.w $7402,x
	LDA.b $14
	AND.w #$0003
	BNE.b CODE_07C00E
	LDA.w #!Define_YI_SoundID51_ThunderLakituAttacking1
	JSL.l CODE_0085D2
CODE_07C00E:
	LDA.w $7AF6,x
	BEQ.b CODE_07C046
	JSL.l CODE_07C192
	LDA.b $16,x
	CMP.w #$0012
	BEQ.b CODE_07C026
	LDA.w $7A96,x
	CMP.w #$0002
	BCS.b CODE_07C02B
CODE_07C026:
	LDA.w $7A96,x
	BNE.b CODE_07C03F
CODE_07C02B:
	LDA.b $16,x
	CMP.w #$0012
	BCS.b CODE_07C046
	INC
	STA.b $16,x
	TAY
	LDA.w DATA_07BFE0,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_07C03F:
	JSR.w CODE_07C11A
	JSR.w CODE_07C285
	RTL

CODE_07C046:
	INC.b $18,x
	INC.b $18,x
	JSR.w CODE_07C285
	RTL

CODE_07C04E:
	LDX.b $12
	LDA.b $16,x
	BEQ.b CODE_07C09D
	JSR.w CODE_07C11A
	LDA.w $7A98,x
	BNE.b CODE_07C0AD
	DEC.b $16,x
	BNE.b CODE_07C095
	LDA.w #!Define_YI_AmbSpr1BA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7A36,x
	STA.w $7142,y
	LDA.w #$001A
	STA.w $7E4C,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID61_Splash3
	JSL.l CODE_0085D2
	LDA.w #$0018
	STA.w $7A96,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
CODE_07C095:
	LDA.w #$0001
	STA.w $7A98,x
	BRA.b CODE_07C0AD

CODE_07C09D:
	LDA.w $7A96,x
	BNE.b CODE_07C0AD
	LDA.w #$0040
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
CODE_07C0AD:
	JSR.w CODE_07C285
	RTL

CODE_07C0B1:
	LDX.b $12
	LDA.b $16,x
	BEQ.b CODE_07C0BD
	DEC.b $16,x
	JSR.w CODE_07C11A
	RTL

CODE_07C0BD:
	LDA.w #$0000
	STA.w $7402,x
	LDA.w $7A38,x
	CMP.w $7182,x
	BPL.b CODE_07C0D9
	STA.w $7182,x
	LDA.w #$0140
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	RTL

CODE_07C0D9:
	INC.w $7182,x
	RTL

CODE_07C0DD:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07C0EF
	LDA.w #$0040
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
CODE_07C0EF:
	RTL

DATA_07C0F0:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0003

DATA_07C116:
	dw $FC00,$0400

CODE_07C11A:
	LDA.b $16,x
	ASL
	TAY
	LDA.b $14
	AND.w DATA_07C0F0,y
	BNE.b CODE_07C189
	LDY.w $7400,x
	LDA.w DATA_07C116,y
	STA.b $00
	LDA.b $16,x
	DEC
	ASL
	ASL
	TAY
	LDA.w DATA_07BEB4,y
	PHY
	LDY.w $7400,x
	BEQ.b CODE_07C140
	EOR.w #$FFFF
	INC
CODE_07C140:
	PLY
	CLC
	ADC.w $70E2,x
	STA.b $02
	INY
	INY
	LDA.w $7182,x
	CLC
	ADC.w DATA_07BEB4,y
	STA.b $04
	LDA.w #!Define_YI_AmbSpr206
	JSL.l CODE_008B21
	LDA.w $7002,y
	ORA.w #$0006
	STA.w $7002,y
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.b $02
	STA.w $70A2,y
	LDA.b $04
	STA.w $7142,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0010
	STA.w $7782,y
	LDA.w #$0002
	STA.w $73C2,y
CODE_07C189:
	RTS

DATA_07C18A:
	dw $FE00,$0200

DATA_07C18E:
	dw $0180,$0060

CODE_07C192:
	LDA.w #DATA_07BEB4>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_07BEB4
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_089436>>16
	LDA.w #FXCODE_089436
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	BPL.b CODE_07C1B6
	JMP.w CODE_07C284

CODE_07C1B6:
	STA.b $16,x
	DEC
	ASL
	ASL
	TAY
	LDA.w DATA_07BEB4,y
	PHY
	LDY.w $7400,x
	BEQ.b CODE_07C1C9
	EOR.w #$FFFF
	INC
CODE_07C1C9:
	PLY
	CLC
	ADC.w $70E2,x
	STA.b $00
	INY
	INY
	LDA.w $7182,x
	CLC
	ADC.w DATA_07BEB4,y
	STA.b $02
	LDA.w $7AF8,x
	BNE.b CODE_07C203
	LDA.w #$0004
	STA.w $7AF8,x
	LDA.w #!Define_YI_AmbSpr204
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0001
	STA.w $73C2,y
CODE_07C203:
	LDA.b $10
	AND.w #$0003
	XBA
	LSR
	CLC
	ADC.w #$0100
	STA.b $04
	LDA.b $10
	AND.w #$0001
	BEQ.b CODE_07C21F
	LDA.b $04
	EOR.w #$FFFF
	INC
	STA.b $04
CODE_07C21F:
	LDA.b $10
	AND.w #$000C
	XBA
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0100
	STA.b $06
	LDA.b $10
	AND.w #$0100
	BNE.b CODE_07C23D
	LDA.b $06
	EOR.w #$FFFF
	INC
	STA.b $06
CODE_07C23D:
	LDA.w #!Define_YI_AmbSpr205
	JSL.l CODE_008B21
	LDA.w $7002,y
	ORA.w #$0006
	STA.w $7002,y
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0006
	STA.w $7782,y
	LDA.w #$0002
	STA.w $73C2,y
	LDY.w $7400,x
	LDA.w $60FC
	AND.w DATA_07C18E,y
	BNE.b CODE_07C27F
	LDA.w DATA_07C18A,y
	STA.w $60A8
	STA.w $60B4
CODE_07C27F:
	PLY
	PLA
	JSR.w CODE_07C285
CODE_07C284:
	RTL

CODE_07C285:
	LDY.w $7D36,x
	BMI.b CODE_07C2AF
	DEY
	BMI.b CODE_07C2AE
	BEQ.b CODE_07C2AE
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07C2AE
	LDA.w $7D38,y
	BEQ.b CODE_07C2AE
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w #$0008
	STA.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_07C2AE:
	RTS

CODE_07C2AF:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_07C2C5
	JSL.l CODE_03B20B
	BRA.b CODE_07C2C9

CODE_07C2C5:
	JSL.l CODE_03A858
CODE_07C2C9:
	RTS

;---------------------------------------------------------------------------

DATA_07C2CA:
	dw $FFFF,$0005

DATA_07C2CE:
	dw $0030,$0060

DATA_07C2D2:
	dw $0000,$0100

YI_NorSpr157_WallLakitu_Init:
;$07C2D6
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.b $16,x
	TAY
	LDA.w DATA_07C2CA,y
	STA.w $74A2,x
	LDA.w DATA_07C2CE,y
	STA.w $7A96,x
	LDA.w $7040,x
	AND.w #$FEFF
	ORA.w DATA_07C2D2,y
	STA.w $7040,x
	LDA.w #$0000
	STA.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w #$000B
	STA.w $7182,x
	RTL

;---------------------------------------------------------------------------

CODE_07C30B:
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	CLC
	ADC.w #$000B
	STA.w $7182,y
	LDA.w #$FFFF
	STA.w $74A2,y
	LDA.w #$0030
	STA.w $7A96,y
	LDA.w $7040,y
	AND.w #$FEFF
	STA.w $7040,y
	LDA.w #$0000
	STA.w $7402,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	RTL

;---------------------------------------------------------------------------

YI_NorSpr157_WallLakitu_Main:
;$07C344
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_07C351
	LDA.w $7D38,x
	BEQ.b CODE_07C373
CODE_07C351:
	LDA.w #$0010
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BEQ.b CODE_07C39D
	LDA.w #$0040
	STA.w $0CD6
	DEC.w $0C4E
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	BRA.b CODE_07C39D

CODE_07C373:
	LDY.w $74A2,x
	BMI.b CODE_07C39D
	LDA.w $7402,x
	CMP.w #$000E
	BNE.b CODE_07C39D
	LDA.b $14
	AND.w #$0006
	TAY
	LDA.w DATA_07A9BE,y
	STA.b $00
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6004,y
	AND.w #$F1FF
	ORA.b $00
	STA.w $6004,y
	SEP.b #$10
CODE_07C39D:
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_07C3A7,x)

DATA_07C3A7:
	dw CODE_07C3AB
	dw CODE_07C3CF

CODE_07C3AB:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BEQ.b CODE_07C3BF
	JSL.l CODE_07FC64
	BCC.b CODE_07C3BF
	DEC.w $0C4E
	JML.l CODE_03A31E

CODE_07C3BF:
	LDA.b $18,x
	TAX
	JMP.w (DATA_07C3C5,x)

DATA_07C3C5:
	dw CODE_07C3DB
	dw DATA_07C467
	dw CODE_07C40B
	dw CODE_07C50C
	dw CODE_07C4A1

CODE_07C3CF:
	LDX.b $12
	LDA.b $18,x
	TAX
	JMP.w (DATA_07C3D7,x)

DATA_07C3D7:
	dw CODE_07C40B
	dw CODE_07C50C

CODE_07C3DB:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07C40A
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w $7040,x
	ORA.w #$0100
	STA.w $7040,x
	LDA.w #$0003
	STA.b $76,x
	TAY
	LDA.w DATA_07C467,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
CODE_07C40A:
	RTL

CODE_07C40B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07C43C
	LDA.w $7680,x
	ORA.w $7682,x
	AND.w #$FF00
	BNE.b CODE_07C43C
	LDA.w #$0012
	STA.b $76,x
	TAY
	LDA.w DATA_07C4E6,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07C4F9,y
	AND.w #$00FF
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	JMP.w CODE_07C5D8

CODE_07C43C:
	LDA.w $7A98,x
	BNE.b CODE_07C464
	LDA.w $7A36,x
	BEQ.b CODE_07C44B
	STZ.w $7A36,x
	BRA.b CODE_07C455

CODE_07C44B:
	LDA.b $10
	AND.w #$000F
	BNE.b CODE_07C464
	INC.w $7A36,x
CODE_07C455:
	LDA.w #$0010
	STA.w $7A98,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07C464:
	JMP.w CODE_07C5D8

DATA_07C467:
	db $01,$03,$04,$05

CODE_07C46B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07C487
	DEC.b $76,x
	BMI.b CODE_07C48A
	LDY.b $76,x
	LDA.w DATA_07C467,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A96,x
CODE_07C487:
	JMP.w CODE_07C5D8

CODE_07C48A:
	LDA.w #$0000
	STA.w $7402,x
	LDA.w #$0060
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	JMP.w CODE_07C5D8

DATA_07C49D:
	db $05,$04,$03,$01

CODE_07C4A1:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07C4BD
	DEC.b $76,x
	BMI.b CODE_07C4C0
	LDY.b $76,x
	LDA.w DATA_07C49D,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A96,x
CODE_07C4BD:
	JMP.w CODE_07C5D8

CODE_07C4C0:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BNE.b CODE_07C4DF
	STZ.b $76,x
	LDA.w #$0030
	STA.w $7A96,x
	LDA.w #$FFFF
	STA.w $74A2,x
	LDA.w $7040,x
	AND.w #$FEFF
	STA.w $7040,x
	STZ.b $18,x
	RTL

CODE_07C4DF:
	DEC.w $0C4E
	JML.l CODE_03A31E

DATA_07C4E6:
	db $0F,$0E,$0B,$0D,$0B,$0C,$0B,$0A,$09,$08,$07,$06,$04,$03,$02,$03
	db $02,$03,$02

DATA_07C4F9:
	db $20,$40,$10,$06,$02,$02,$02,$02,$02,$02,$02,$02,$0C,$08,$08,$08
	db $08,$08,$08

CODE_07C50C:
	LDX.b $12
	LDA.w $7680,x
	ORA.w $7682,x
	AND.w #$FF00
	BEQ.b CODE_07C51C
	JMP.w CODE_07C5A9

CODE_07C51C:
	LDA.b $76,x
	CMP.w #$0002
	BCC.b CODE_07C52C
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
CODE_07C52C:
	LDA.w $7A96,x
	BNE.b CODE_07C582
	DEC.b $76,x
	BMI.b CODE_07C5A9
	LDY.b $76,x
	LDA.w DATA_07C4E6,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_07C4F9,y
	AND.w #$00FF
	STA.w $7A96,x
	CPY.b #$01
	BNE.b CODE_07C566
	LDA.w $611C
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $611E
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $7A38,x
	BRA.b CODE_07C588

CODE_07C566:
	CPY.b #$00
	BNE.b CODE_07C582
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	LDA.w $7A38,x
	STA.b $04
	JSL.l CODE_07FCB3
	JSR.w CODE_07C632
	BRA.b CODE_07C5A7

CODE_07C582:
	LDY.b $76,x
	CPY.b #$01
	BNE.b CODE_07C5A7
CODE_07C588:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	LDA.w $7A38,x
	STA.b $04
	JSL.l CODE_07FCB8
	LDA.w $7A38,x
	INC
	CMP.w #$0020
	BCS.b CODE_07C5A7
	STA.w $7A38,x
CODE_07C5A7:
	BRA.b CODE_07C5D8

CODE_07C5A9:
	LDA.b $16,x
	BEQ.b CODE_07C5BF
	LDA.w #$0000
	STA.w $7402,x
	LDA.w #$0060
	STA.w $7A96,x
	STZ.b $76,x
	STZ.b $18,x
	BRA.b CODE_07C5D8

CODE_07C5BF:
	LDA.w #$0003
	STA.b $76,x
	TAY
	LDA.w DATA_07C49D,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
CODE_07C5D8:
	LDY.w $7D36,x
	BMI.b CODE_07C5F9
	DEY
	BMI.b CODE_07C5F8
	BEQ.b CODE_07C5F8
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07C5F8
	LDA.w $7D38,y
	BEQ.b CODE_07C5F8
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	BRA.b CODE_07C60C

CODE_07C5F8:
	RTL

CODE_07C5F9:
	JSL.l CODE_07FC2F
	BEQ.b CODE_07C5F8
	BCC.b CODE_07C5F8
	JSL.l CODE_03B20B
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
CODE_07C60C:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0010
	STA.w $7402,x
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	RTL

CODE_07C62E:
	JML.l CODE_03A858

CODE_07C632:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDY.w $7400,x
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_07AA89,y
	STA.b $00
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0380
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$011D
	JSL.l CODE_03A34C
	BCC.b CODE_07C688
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,y
CODE_07C688:
	RTS

YI_NorSpr157_WallLakitu_StompRt:
;$07C689
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BEQ.b CODE_07C6A1
	LDA.w #$0040
	STA.w $0CD6
	JSL.l CODE_07FC64
	BCC.b CODE_07C6A1
	DEC.w $0C4E
	JML.l CODE_03A31E

CODE_07C6A1:
	RTL

;---------------------------------------------------------------------------

DATA_07C6A2:
	dw $FFA0,$0060

YI_NorSpr159_WalkingGrunt_Init:
;$07C6A6
	LDY.w $7400,x
	LDA.w DATA_07C6A2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $18,x
	TAY
	LDA.w DATA_07C714,y
	AND.w #$00FF
	STA.w $7402,x
	STZ.b $16,x
	RTL

;---------------------------------------------------------------------------

DATA_07C6C7:
	dw $FF00,$0100

YI_NorSpr15A_RunningGrunt_Init:
;$07C6CB
	LDY.w $7400,x
	LDA.w DATA_07C6C7,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w #$0001
	STA.b $18,x
	TAY
	LDA.w DATA_07C73F,y
	AND.w #$00FF
	STA.w $7402,x
	STZ.b $16,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr159_WalkingGrunt_Main:
;$07C6EC
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_07C6F6,x)

DATA_07C6F6:
	dw CODE_07C719
	dw CODE_07C79D
	dw CODE_07C7EB
	dw CODE_07C76A
	dw CODE_07C83A

YI_NorSpr15A_RunningGrunt_Main:
;$07C700
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_07C70A,x)

DATA_07C70A:
	dw CODE_07C741
	dw CODE_07C79D
	dw CODE_07C7EB
	dw CODE_07C76A
	dw CODE_07C83A

DATA_07C714:
	db $04,$03,$02,$01,$00

CODE_07C719:
	LDX.b $12
	JSL.l CODE_07C866
	LDA.w $7A96,x
	BNE.b CODE_07C73E
	DEC.b $18,x
	BPL.b CODE_07C72D
	LDA.w #$0004
	STA.b $18,x
CODE_07C72D:
	LDY.b $18,x
	LDA.w DATA_07C714,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_07C73E:
	RTL

DATA_07C73F:
	db $08,$07

CODE_07C741:
	LDX.b $12
	JSL.l CODE_07C866
	LDA.w #DATA_07C73F
	STA.b $00
CODE_07C74C:
	LDA.w $7A96,x
	BNE.b CODE_07C767
	LDA.b $18,x
	EOR.w #$0001
	STA.b $18,x
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A96,x
CODE_07C767:
	RTL

DATA_07C768:
	db $06,$05

CODE_07C76A:
	LDX.b $12
	JSL.l CODE_07C923
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BEQ.b CODE_07C796
	LDA.w $7A98,x
	BNE.b CODE_07C796
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7A98,x
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
CODE_07C796:
	LDA.w #DATA_07C768
	STA.b $00
	BRA.b CODE_07C74C

CODE_07C79D:
	LDX.b $12
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_07C7C8
	SEP.b #$20
	LDA.b #$10
	STA.b $18,x
	TAY
	LDA.w DATA_07C7C9,y
	STA.w $7402,x
	LDA.w DATA_07C7DA,y
	STA.w $7A96,x
	LDA.b $76,x
	STA.w $7400,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07C7C8:
	RTL

DATA_07C7C9:
	db $0D,$0A,$0C,$0A,$0B,$0A,$0C,$0A,$0B,$0A,$0C,$0A,$0B,$0A,$09,$10
	db $0F

DATA_07C7DA:
	db $42,$12,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$08,$20,$02
	db $02

CODE_07C7EB:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07C808
	DEC.b $18,x
	BMI.b CODE_07C809
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07C7C9,y
	STA.w $7402,x
	LDA.w DATA_07C7DA,y
	STA.w $7A96,x
	REP.b #$20
CODE_07C808:
	RTL

CODE_07C809:
	LDY.w $7400,x
	LDA.w DATA_07C6C7,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.w $7A96,x
	LDA.w #$0001
	STA.b $18,x
	TAY
	LDA.w DATA_07C768,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
	RTL

DATA_07C832:
	db $12,$13,$12,$11

DATA_07C836:
	db $40,$03,$03,$03

CODE_07C83A:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07C857
	DEC.b $18,x
	BMI.b CODE_07C858
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07C832,y
	STA.w $7402,x
	LDA.w DATA_07C836,y
	STA.w $7A96,x
	REP.b #$20
CODE_07C857:
	RTL

CODE_07C858:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr159_WalkingGrunt
	BNE.b CODE_07C863
	JMP.w YI_NorSpr159_WalkingGrunt_Init

CODE_07C863:
	JMP.w YI_NorSpr15A_RunningGrunt_Init

CODE_07C866:
	LDY.w $7D36,x
	BPL.b CODE_07C86E
	JMP.w CODE_07C8F8

CODE_07C86E:
	DEY
	BEQ.b CODE_07C873
	BPL.b CODE_07C876
CODE_07C873:
	JMP.w CODE_07C8F7

CODE_07C876:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07C8F7
	LDA.w $7D38,y
	BEQ.b CODE_07C8F7
	LDA.w #$000E
	STA.w $7402,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $76,x
	PHY
	JSL.l CODE_03B53D
	PLX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr207
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000E
	STA.w $7142,y
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w #$0100
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$00C0
	STA.w $7782,y
	LDA.w $7400,x
	STA.w $73C0,y
	INC.b $16,x
	INC.b $16,x
	PLY
	PLA
CODE_07C8F7:
	RTL

CODE_07C8F8:
	JSL.l CODE_07FC2F
	BEQ.b CODE_07C922
	BCC.b CODE_07C91E
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$03
	STA.b $18,x
	TAY
	LDA.w DATA_07C832,y
	STA.w $7402,x
	LDA.w DATA_07C836,y
	STA.w $7A96,x
	LDA.b #$08
	STA.b $16,x
	REP.b #$20
	PLY
	PLA
CODE_07C91E:
	JSL.l CODE_03A858
CODE_07C922:
	RTL

CODE_07C923:
	LDY.w $7D36,x
	BMI.b CODE_07C963
	DEY
	BMI.b CODE_07C962
	BEQ.b CODE_07C962
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07C962
	LDA.w $7D38,y
	BEQ.b CODE_07C962
	PHY
	JSL.l CODE_03B24B
	PLY
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHY
	JSL.l CODE_03B53D
	PLX
	JSL.l CODE_03B24B
	LDX.b $12
	PLY
	PLA
CODE_07C962:
	RTL

CODE_07C963:
	JSL.l CODE_03A5B7
	RTL

;---------------------------------------------------------------------------

YI_NorSpr15B_DancingSpearGuy_Init:
;$07C968
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_07C9BE
	LDA.w $0C50
	BNE.b CODE_07C976
	JML.l CODE_03A31E

CODE_07C976:
	STZ.w $7400,x
	LDA.w $7B58,x
	SEC
	SBC.w #$0004
	STA.w $7B58,x
	LDA.w $7BB8,x
	CLC
	ADC.w #$0002
	STA.w $7BB8,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $0CD8
	BEQ.b CODE_07C9B4
	LDA.w $70E2,x
	CLC
	ADC.w $0C62,y
	STA.w $70E2,x
	LDA.w $0C58,y
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTL

CODE_07C9B4:
	LDA.w $70E2,x
	CLC
	ADC.w $0C5E,y
	STA.w $70E2,x
CODE_07C9BE:
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTL

YI_NorSpr15B_DancingSpearGuy_Main:
;$07C9C8
	JSL.l CODE_03AF23
	INC.w $0C66
	JSR.w CODE_07CE47
	LDA.w $0CD8
	BEQ.b CODE_07C9EC
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7400,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	LDA.w $0C58,y
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	BRA.b CODE_07C9F2

CODE_07C9EC:
	LDA.b $16,x
	TAX
	JSR.w (DATA_07CA09,x)
CODE_07C9F2:
	JSL.l CODE_03A5B7
	RTL

DATA_07C9F7:
	dw CODE_07CA2B
	dw CODE_07CAA9
	dw CODE_07CB31
	dw CODE_07CB86
	dw CODE_07CBE0
	dw CODE_07CC58
	dw CODE_07CCCA
	dw CODE_07CD28
	dw CODE_07CDA9

DATA_07CA09:
	dw CODE_07CA44
	dw CODE_07CAC2
	dw CODE_07CB4A
	dw CODE_07CBA8
	dw CODE_07CC0B
	dw CODE_07CC71
	dw CODE_07CCE3
	dw CODE_07CD41
	dw CODE_07CDC2

DATA_07CA1B:
	dw $FE00,$0200

DATA_07CA1F:
	db $07,$03,$02,$01,$00,$06

DATA_07CA25:
	db $08,$08,$08,$08,$08,$08

CODE_07CA2B:
	LDX.b $12
	LDA.w #$0005
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07CA1F,y
	STA.w $7402,x
	LDA.w DATA_07CA25,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_07CA44:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07CA51
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07CA51:
	LDA.w $7A96,x
	BNE.b CODE_07CA8E
	DEC.b $18,x
	BMI.b CODE_07CA8F
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CA1F,y
	STA.w $7402,x
	LDA.w DATA_07CA25,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$03
	BNE.b CODE_07CA8E
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w #$0040
	STA.w $7542,x
	LDY.w $7400,x
	LDA.w DATA_07CA1B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07CA8E:
	RTS

CODE_07CA8F:
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

DATA_07CA99:
	dw $0200,$FE00

DATA_07CA9D:
	db $06,$00,$05,$04,$03,$07

DATA_07CAA3:
	db $08,$08,$08,$08,$08,$08

CODE_07CAA9:
	LDX.b $12
	LDA.w #$0005
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07CA9D,y
	STA.w $7402,x
	LDA.w DATA_07CAA3,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_07CAC2:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07CACF
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07CACF:
	LDA.w $7A96,x
	BNE.b CODE_07CB0C
	DEC.b $18,x
	BMI.b CODE_07CB0D
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CA9D,y
	STA.w $7402,x
	LDA.w DATA_07CAA3,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$03
	BNE.b CODE_07CB0C
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w #$0040
	STA.w $7542,x
	LDY.w $7400,x
	LDA.w DATA_07CA99,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07CB0C:
	RTS

CODE_07CB0D:
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

DATA_07CB17:
	db $00,$05,$04,$03,$02,$01,$00,$05,$04,$03,$02,$01,$00

DATA_07CB24:
	db $02,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$02

CODE_07CB31:
	LDX.b $12
	LDA.w #$000C
	STA.b $18,x
	TAY
	SEP.b #$20
	LDA.w DATA_07CB17,y
	STA.w $7402,x
	LDA.w DATA_07CB24,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_07CB4A:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07CB67
	DEC.b $18,x
	BMI.b CODE_07CB68
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CB17,y
	STA.w $7402,x
	LDA.w DATA_07CB24,y
	STA.w $7A96,x
	REP.b #$20
CODE_07CB67:
	RTS

CODE_07CB68:
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

DATA_07CB72:
	dw $FFAB,$0055

DATA_07CB76:
	db $08,$09,$0A,$0B,$0B,$0A,$09,$08

DATA_07CB7E:
	db $06,$06,$06,$06,$06,$06,$06,$06

CODE_07CB86:
	LDX.b $12
	LDA.w #$0007
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07CB76,y
	STA.w $7402,x
	LDA.w DATA_07CB7E,y
	STA.w $7A96,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_07CB72,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_07CBA8:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07CBD2
	DEC.b $18,x
	BMI.b CODE_07CBD3
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CB76,y
	STA.w $7402,x
	LDA.w DATA_07CB7E,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$03
	BNE.b CODE_07CBD2
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07CBD2:
	RTS

CODE_07CBD3:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

CODE_07CBE0:
	LDX.b $12
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$0007
	STA.b $18,x
	TAY
	SEP.b #$20
	LDA.w DATA_07CB76,y
	STA.w $7402,x
	LDA.w DATA_07CB7E,y
	STA.w $7A96,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_07CB72,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_07CC0B:
	LDX.b $12						; Optimization: Rogue copy/pasting strikes!
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07CC37
	DEC.b $18,x
	BMI.b CODE_07CC38
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CB76,y
	STA.w $7402,x
	LDA.w DATA_07CB7E,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$03
	BNE.b CODE_07CC37
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07CC37:
	RTS

CODE_07CC38:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

DATA_07CC4E:
	db $0C,$0D,$0E,$0D,$0C

DATA_07CC53:
	db $08,$04,$18,$04,$08

CODE_07CC58:
	LDX.b $12
	LDA.w #$0004
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07CC4E,y
	STA.w $7402,x
	LDA.w DATA_07CC53,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_07CC71:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07CCA7
	DEC.b $18,x
	BMI.b CODE_07CCA8
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CC4E,y
	STA.w $7402,x
	LDA.w DATA_07CC53,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$02
	BNE.b CODE_07CCA7
	LDA.w #$FE08
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w #$002A
	STA.w $7542,x
CODE_07CCA7:
	RTS

CODE_07CCA8:
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

DATA_07CCB2:
	db $03,$03,$03,$07,$03,$03,$03,$07

DATA_07CCBA:
	db $00,$00,$00,$06,$00,$00,$00,$06

DATA_07CCC2:
	db $06,$06,$06,$06,$06,$06,$06,$06

CODE_07CCCA:
	LDX.b $12
	LDA.w #$0007
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07CCB2,y
	STA.w $7402,x
	LDA.w DATA_07CCC2,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_07CCE3:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07CD1D
	DEC.b $18,x
	BMI.b CODE_07CD1E
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CCB2,y
	STA.w $7402,x
	LDA.w DATA_07CCC2,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$06
	BEQ.b CODE_07CD08
	CPY.b #$02
	BNE.b CODE_07CD1D
CODE_07CD08:
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w #$0040
	STA.w $7542,x
CODE_07CD1D:
	RTS

CODE_07CD1E:
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

CODE_07CD28:
	LDX.b $12
	LDA.w #$0007
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07CCBA,y
	STA.w $7402,x
	LDA.w DATA_07CCC2,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_07CD41:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07CD7B
	DEC.b $18,x
	BMI.b CODE_07CD7C
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CCBA,y
	STA.w $7402,x
	LDA.w DATA_07CCC2,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$06
	BEQ.b CODE_07CD66
	CPY.b #$02
	BNE.b CODE_07CD7B
CODE_07CD66:
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w #$0040
	STA.w $7542,x
CODE_07CD7B:
	RTS

CODE_07CD7C:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

DATA_07CD8F:
	db $0F,$10,$10,$0F,$10,$10,$0F,$10,$10,$0F,$10,$10,$0F

DATA_07CD9C:
	db $02,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$02

CODE_07CDA9:
	LDX.b $12
	LDA.w #$000C
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07CD8F,y
	STA.w $7402,x
	LDA.w DATA_07CD9C,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_07CDC2:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07CDF8
	DEC.b $18,x
	BMI.b CODE_07CDF9
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07CD8F,y
	STA.w $7402,x
	LDA.w DATA_07CD9C,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$0A
	BEQ.b CODE_07CDEF
	CPY.b #$07
	BEQ.b CODE_07CDEF
	CPY.b #$04
	BEQ.b CODE_07CDEF
	CPY.b #$01
	BNE.b CODE_07CDF8
CODE_07CDEF:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07CDF8:
	RTS

CODE_07CDF9:
	LDA.w #$0004
	STA.b $16,x
	TAX
	JSR.w (DATA_07C9F7,x)
	RTS

DATA_07CE03:
	dw $0010,$000F,$000E,$000C,$000D,$000E,$0010,$000C
	dw $0005,$0002,$0003,$0006,$000E,$000E,$000E,$0007
	dw $0008

DATA_07CE25:
	dw $FFE4,$FFE2,$FFE1,$FFE0,$FFDF,$FFE1,$FFE7,$FFE3
	dw $FFE2,$FFE3,$FFE4,$FFE3,$FFE6,$FFE3,$FFDE,$FFE4
	dw $FFE3

CODE_07CE47:
	LDA.w $7402,x
	ASL
	TAY
	LDA.w $6122
	CLC
	ADC.w #$0001
	STA.b $00
	LDA.w DATA_07CE25,y
	CLC
	ADC.w $7182,x
	SEC
	SBC.w $611E
	BPL.b CODE_07CE66
	EOR.w #$FFFF
	INC
CODE_07CE66:
	CMP.b $00
	BCS.b CODE_07CE98
	LDA.w $6120
	CLC
	ADC.w #$0001
	STA.b $00
	LDA.w DATA_07CE03,y
	LDY.w $7400,x
	BEQ.b CODE_07CE82
	EOR.w #$FFFF
	CLC
	ADC.w #$0009
CODE_07CE82:
	CLC
	ADC.w $70E2,x
	SEC
	SBC.w $611C
	BPL.b CODE_07CE90
	EOR.w #$FFFF
	INC
CODE_07CE90:
	CMP.b $00
	BCS.b CODE_07CE98
	JSL.l CODE_03A858
CODE_07CE98:
	RTS

;---------------------------------------------------------------------------

DATA_07CE99:
	dw $FF00,$0100

YI_NorSpr0FD_ZeusGuy_Init:
CODE_07CE9D:
	STZ.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.w #DATA_07D08D
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSR.w CODE_07D0A1
	RTL

;---------------------------------------------------------------------------

DATA_07CEAC:
	dw $0200,$FE00

YI_NorSpr0FD_ZeusGuy_Main:
;$07CEB0
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_07CEF4
	LDA.w $6150
	CMP.w #$0003
	BCS.b CODE_07CED8
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	TAY
	LDA.w DATA_07CEAC,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7540,x
	BRA.b CODE_07CEE6

CODE_07CED8:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_07CEE6
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_07CEE6:
	STZ.w $6162
	STZ.w $6168
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLY
	PLA
CODE_07CEF4:
	JSL.l CODE_03AF23
	LDA.w $7540,x
	BEQ.b CODE_07CF00
	JMP.w CODE_07D80C

CODE_07CF00:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7042,x
	AND.w #$FFF1
	STA.w $7042,x
	TAX
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7A38,x
	LDA.w $7402,x
	CMP.w #$0000
	BNE.b CODE_07CF32
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
CODE_07CF32:
	JSR.w CODE_07D4DF
	JSR.w CODE_07D550
	JSR.w CODE_07D5D2
	LDA.b $16,x
	CMP.w #$0004
	BCS.b CODE_07CF61
	LDY.w $7A38,x
	BMI.b CODE_07CF61
	JSL.l CODE_07FC1F
	BMI.b CODE_07CF61
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.w $7400,x
	STZ.b $16,x
	INC.b $76,x
CODE_07CF61:
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07CF75
	STZ.w $7A36,x
	LDA.b $16,x
	TAX
	JSR.w (DATA_07CF9A,x)
	JMP.w CODE_07D79D

CODE_07CF75:
	LDA.w $7A36,x
	BEQ.b CODE_07CF83
	LDY.w $7400,x
	LDA.w DATA_07CE99,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07CF83:
	LDA.w #$0020
	STA.w $7402,x
	STZ.w $7A96,x
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.b $18,x
	JMP.w CODE_07D79D

DATA_07CF9A:
	dw CODE_07D00E
	dw CODE_07D031
	dw CODE_07D05B
	dw CODE_07D072

DATA_07CFA2:
	dw CODE_07D0A1
	dw CODE_07D123
	dw CODE_07D239
	dw CODE_07D2B4
	dw CODE_07D327
	dw CODE_07D39D
	dw CODE_07D492

DATA_07CFB0:
	dw CODE_07D0D5
	dw CODE_07D13E
	dw CODE_07D283
	dw CODE_07D2FF
	dw CODE_07D372
	dw CODE_07D3C7
	dw CODE_07D49F

DATA_07CFBE:
	dw $0004,$0006,$0008,$000A,$0004,$0006,$0008,$0004
	dw $0006,$0008,$0004,$0006,$0008,$0004,$0006,$0008

DATA_07CFDE:
	dw $0004,$0006,$0008,$0004,$0006,$0008,$0004,$0006
	dw $0008,$0004,$0006,$0008,$0004,$0006,$0008,$0004

DATA_07CFFE:
	dw $000A,$000A,$000A,$000A,$000A,$0004,$0006,$0008

CODE_07D00E:
	LDX.b $12
	LDA.w #DATA_07D08D
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.b $76,x
	BEQ.b CODE_07D02A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	AND.w #$0002
	EOR.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	TAX
	JMP.w (DATA_07CFA2,x)

CODE_07D02A:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	TAX
	JMP.w (DATA_07CFB0,x)

CODE_07D031:
	LDX.b $12
	LDA.w #DATA_07D091
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.b $76,x
	BEQ.b CODE_07D02A
	LDA.b $10
	AND.w #$0007
	BEQ.b CODE_07D049
	LDA.w #$0000
	BRA.b CODE_07D054

CODE_07D049:
	LDA.b $10
	AND.w #$0038
	LSR
	LSR
	TAY
	LDA.w DATA_07CFFE,y
CODE_07D054:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	TAX
	JMP.w (DATA_07CFA2,x)

CODE_07D05B:
	LDX.b $12
	LDA.b $76,x
	BEQ.b CODE_07D02A
	LDA.b $10
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_07CFBE,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	TAX
	JMP.w (DATA_07CFA2,x)

CODE_07D072:
	LDX.b $12
	LDA.b $76,x
	BEQ.b CODE_07D02A
	LDA.b $10
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_07CFDE,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	TAX
	JMP.w (DATA_07CFA2,x)

DATA_07D089:
	db $00,$1F,$1E,$1D

DATA_07D08D:
	db $20,$02,$02,$02

DATA_07D091:
	db $08,$02,$02,$02

DATA_07D095:
	dw $0008,$0004

DATA_07D099:
	dw $FFFC,$0004

DATA_07D09D:
	dw $FFFE,$0002

CODE_07D0A1:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $00
	LDA.w #$0003
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07D089,y
	STA.w $7402,x
	LDA.b ($00),y
	STA.w $7A96,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_07D095,y
	BNE.b CODE_07D0D2
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07D099,y
	STA.w $70E2,x
CODE_07D0D2:
	STZ.b $76,x
	RTS

CODE_07D0D5:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07D10F
	DEC.b $18,x
	BMI.b CODE_07D110
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $00
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D089,y
	STA.w $7402,x
	LDA.b ($00),y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$02
	BNE.b CODE_07D10F
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_07D095,y
	BNE.b CODE_07D10F
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07D09D,y
	STA.w $70E2,x
CODE_07D10F:
	RTS

CODE_07D110:
	INC.b $76,x
	RTS

DATA_07D113:
	db $00,$1D,$1E,$1F

DATA_07D117:
	dw $0002,$FFFE

DATA_07D11B:
	dw $0004,$FFFC

DATA_07D11F:
	dw $0004,$0008

CODE_07D123:
	LDX.b $12
	LDA.w #$0003
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07D113,y
	STA.w $7402,x
	LDA.w DATA_07D08D,y
	STA.w $7A96,x
	REP.b #$20
	STZ.b $76,x
	RTS

CODE_07D13E:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07D18F
	DEC.b $18,x
	BMI.b CODE_07D190
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D113,y
	STA.w $7402,x
	LDA.w DATA_07D08D,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$01
	BNE.b CODE_07D176
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_07D11F,y
	BNE.b CODE_07D18F
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07D117,y
	STA.w $70E2,x
	BRA.b CODE_07D18F

CODE_07D176:
	CPY.b #$00
	BNE.b CODE_07D18F
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_07D11F,y
	BNE.b CODE_07D18F
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07D11B,y
	STA.w $70E2,x
CODE_07D18F:
	RTS

CODE_07D190:
	INC.b $76,x
	RTS

DATA_07D193:
	db $01,$02,$03,$02,$01,$00

DATA_07D199:
	db $02,$01,$08,$01,$02,$08

DATA_07D19F:
	dw $FFFE,$FFFF

DATA_07D1A3:
	db $04,$05,$06,$07,$08,$09,$08,$07,$06,$05,$04,$00

DATA_07D1AF:
	db $02,$02,$02,$02,$01,$01,$01,$02,$02,$02,$02,$08

DATA_07D1BB:
	dw $FFFD,$FFFE,$FFFF

DATA_07D1C1:
	db $17,$16,$15,$14,$13,$12,$11,$10,$0F,$0E,$0D,$0C,$0B,$0A,$00

DATA_07D1D0:
	db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$08

DATA_07D1DF:
	dw $FFFA,$FFFB,$FFFC,$FFFD,$FFFE,$FFFF

DATA_07D1EB:
	db $1C,$18,$19,$1A,$19,$18,$00

DATA_07D1F2:
	db $12,$01,$02,$30,$02,$02,$08

DATA_07D1F9:
	dw $FFF0,$0010

DATA_07D1FD:
	dw $0000,$0002,$0004,$0008

DATA_07D205:
	dw $0008,$FFF8

DATA_07D209:
	dw $0001,$0000,$0001,$0000,$0003,$0002,$0003,$0002
	dw $0005,$0004,$0005,$0004,$0007,$0006,$0007,$0006
	dw $0009,$0008,$0009,$0008,$000B,$000A,$000B,$000A

CODE_07D239:
	LDX.b $12
	JSR.w CODE_07D61E
	LDA.w #$0005
	STA.b $18,x
	LDY.w $7A38,x
	BMI.b CODE_07D267
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07D255
	EOR.w #$FFFF
	INC
CODE_07D255:
	LSR
	LSR
	LSR
	CMP.w #$0002
	BCS.b CODE_07D267
	ASL
	TAY
	LDA.b $18,x
	CLC
	ADC.w DATA_07D19F,y
	STA.b $18,x
CODE_07D267:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D193,y
	STA.w $7402,x
	LDA.w DATA_07D199,y
	STA.w $7A96,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	STZ.b $76,x
	RTS

CODE_07D283:
	LDX.b $12
	JSR.w CODE_07D61E
	LDA.w $7A96,x
	BNE.b CODE_07D2AA
	DEC.b $18,x
	BMI.b CODE_07D2AB
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D193,y
	STA.w $7402,x
	LDA.w DATA_07D199,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$02
	BNE.b CODE_07D2AA
	JSR.w CODE_07D701
CODE_07D2AA:
	RTS

CODE_07D2AB:
	LDA.w #$0000
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_07D2B4:
	LDX.b $12
	JSR.w CODE_07D61E
	LDA.w #$000B
	STA.b $18,x
	LDY.w $7A38,x
	BMI.b CODE_07D2E3
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07D2D0
	EOR.w #$FFFF
	INC
CODE_07D2D0:
	LSR
	LSR
	LSR
	LSR
	CMP.w #$0003
	BCS.b CODE_07D2E3
	ASL
	TAY
	LDA.b $18,x
	CLC
	ADC.w DATA_07D1BB,y
	STA.b $18,x
CODE_07D2E3:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D1A3,y
	STA.w $7402,x
	LDA.w DATA_07D1AF,y
	STA.w $7A96,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	STZ.b $76,x
	RTS

CODE_07D2FF:
	LDX.b $12
	JSR.w CODE_07D61E
	LDA.w $7A96,x
	BNE.b CODE_07D326
	DEC.b $18,x
	BMI.b CODE_07D2AB
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D1A3,y
	STA.w $7402,x
	LDA.w DATA_07D1AF,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$05
	BNE.b CODE_07D326
	JSR.w CODE_07D701
CODE_07D326:
	RTS

CODE_07D327:
	LDX.b $12
	JSR.w CODE_07D61E
	LDA.w #$000E
	STA.b $18,x
	LDY.w $7A38,x
	BMI.b CODE_07D356
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07D343
	EOR.w #$FFFF
	INC
CODE_07D343:
	LSR
	LSR
	LSR
	LSR
	CMP.w #$0006
	BCS.b CODE_07D356
	ASL
	TAY
	LDA.b $18,x
	CLC
	ADC.w DATA_07D1DF,y
	STA.b $18,x
CODE_07D356:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D1C1,y
	STA.w $7402,x
	LDA.w DATA_07D1D0,y
	STA.w $7A96,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	STZ.b $76,x
	RTS

CODE_07D372:
	LDX.b $12
	JSR.w CODE_07D61E
	LDA.w $7A96,x
	BNE.b CODE_07D399
	DEC.b $18,x
	BMI.b CODE_07D39A
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D1C1,y
	STA.w $7402,x
	LDA.w DATA_07D1D0,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$05
	BNE.b CODE_07D399
	JSR.w CODE_07D701
CODE_07D399:
	RTS

CODE_07D39A:
	JMP.w CODE_07D2AB

CODE_07D39D:
	LDX.b $12
	LDA.w #$0006
	STA.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	TAY
	LDA.w DATA_07D1EB,y
	STA.w $7402,x
	LDA.w DATA_07D1F2,y
	STA.w $7A96,x
	LDA.b #$2E
	STA.w $77C0,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	STZ.b $76,x
	RTS

CODE_07D3C7:
	LDX.b $12
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7402,x
	CMP.w #$001A
	BNE.b CODE_07D43A
	LDA.w $7A98,x
	BNE.b CODE_07D41F
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07D205,y
	STA.b $00
	LDY.w $77C0,x
	LDA.w DATA_07D209,y
	STA.b $02
	DEY
	DEY
	BPL.b CODE_07D3F3
	LDY.b #$02
CODE_07D3F3:
	SEP.b #$20
	TYA
	STA.w $77C0,x
	REP.b #$20
	LDA.w #!Define_YI_AmbSpr228
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.b $02
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	STA.w $7A98,x
CODE_07D41F:
	LDA.b $14
	AND.w #$0003
	ASL
	TAY
	LDA.w $7042,x
	ORA.w DATA_07D1FD,y
	STA.w $7042,x
	CPY.b #$00
	BNE.b CODE_07D43A
	LDA.w #!Define_YI_SoundID0E_ShellHit4
	JSL.l CODE_0085D2
CODE_07D43A:
	LDA.w $7A96,x
	BNE.b CODE_07D487
	DEC.b $18,x
	BPL.b CODE_07D446
	JMP.w CODE_07D2AB

CODE_07D446:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D1EB,y
	STA.w $7402,x
	LDA.w DATA_07D1F2,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$00
	BNE.b CODE_07D487
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07D1F9,y
	STA.b $00
	LDA.w #$00FE
	JSL.l CODE_03A364
	BCC.b CODE_07D487
	LDA.w $7400,x
	STA.w $7400,y
	LDA.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	TYX
	JSL.l YI_NorSpr0FE_ZeusGuyBlast_Init
CODE_07D487:
	LDX.b $12
	RTS

DATA_07D48A:
	db $00,$21,$20,$21

DATA_07D48E:
	db $04,$04,$00,$20

CODE_07D492:
	LDX.b $12
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.b $18,x
	STZ.b $76,x
	RTS

CODE_07D49F:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07D4D1
	LDA.w $7A96,x
	BNE.b CODE_07D4D1
	DEC.b $18,x
	BMI.b CODE_07D4D2
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D48A,y
	STA.w $7402,x
	LDA.w DATA_07D48E,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$02
	BNE.b CODE_07D4D1
	LDA.w #$FA80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.w $7A36,x
CODE_07D4D1:
	RTS

CODE_07D4D2:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

DATA_07D4DB:
	dw $FFE0,$0020

CODE_07D4DF:
	STZ.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.b $00
	STA.b $04
	ASL
	STA.b $02
	STA.b $06
	JSL.l CODE_07FCFB
	BCS.b CODE_07D547
	LDA.w #$0002
	STA.b $16,x
	LDA.w #$0020
	STA.b $00
	ASL
	STA.b $02
	LDA.w #$0010
	STA.b $04
	ASL
	STA.b $06
	JSL.l CODE_07FCFB
	BCS.b CODE_07D547
	LDY.w $7400,x
	LDA.w DATA_07D4DB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.b $00
	ASL
	STA.b $02
	LDA.w #$0010
	STA.b $04
	ASL
	STA.b $06
	JSL.l CODE_07FCFB
	BCS.b CODE_07D533
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07D533:
	LDA.w #$0004
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	CMP.w #$0000
	BEQ.b CODE_07D545
	CMP.w #$0002
	BNE.b CODE_07D547
CODE_07D545:
	INC.b $76,x
CODE_07D547:
	RTS

DATA_07D548:
	dw $0008,$0004

DATA_07D54C:
	dw $FFEC,$0014

CODE_07D550:
	LDY.w $7400,x
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_07D54C,y
	STA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$4000
	BEQ.b CODE_07D5A0
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_07D5B5
CODE_07D5A0:
	LDA.w #$0006
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	CMP.w #$0000
	BEQ.b CODE_07D5B2
	CMP.w #$0002
	BNE.b CODE_07D5B4
CODE_07D5B2:
	INC.b $76,x
CODE_07D5B4:
	RTS

CODE_07D5B5:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	CMP.w #$000C
	BEQ.b CODE_07D5D1
	LDY.w $7400,x
	LDA.w $7860,x
	AND.w DATA_07D548,y
	BEQ.b CODE_07D5D1
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	JSR.w CODE_07D492
CODE_07D5D1:
	RTS

CODE_07D5D2:
	LDY.w $7A38,x
	BMI.b CODE_07D619
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $00
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_07D619
	LDA.b $00
	BPL.b CODE_07D5F1
	EOR.w #$FFFF
	INC
CODE_07D5F1:
	ASL
	STA.b $00
	ASL
	STA.b $02
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_07D619
	LDA.w #$0006
	STA.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	CMP.w #$0000
	BEQ.b CODE_07D617
	CMP.w #$0002
	BNE.b CODE_07D619
CODE_07D617:
	INC.b $76,x
CODE_07D619:
	RTS

DATA_07D61A:
	dw $FFF0,$0010

CODE_07D61E:
	LDA.w $7400,x
	DEC
	STA.b $00
	LDY.w $7D36,x
	BMI.b CODE_07D64F
	DEY
	BEQ.b CODE_07D64F
	BMI.b CODE_07D64F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07D64F
	LDA.w $7D38,y
	BEQ.b CODE_07D64F
	LDA.w $7400,x
	DEC
	STA.b $02
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.b $02
	BMI.b CODE_07D64F
	JMP.w CODE_07D6A2

CODE_07D64F:
	LDY.w $7A38,x
	BMI.b CODE_07D6A2
	LDA.w $7BB8,x
	CLC
	ADC.w #$0008
	CLC
	ADC.w $7BB8,y
	STA.b $04
	ASL
	STA.b $02
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.b $04
	CMP.b $02
	BCS.b CODE_07D6A2
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $02
	EOR.b $00
	BPL.b CODE_07D6A2
	LDA.w $7BB6,x
	CLC
	ADC.w #$0008
	CLC
	ADC.w $7BB6,y
	STA.b $04
	LDA.b $02
	BPL.b CODE_07D694
	EOR.w #$FFFF
	INC
CODE_07D694:
	CMP.b $04
	BCS.b CODE_07D6A2
	TYX
	JSL.l CODE_03B24B
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDX.b $12
CODE_07D6A2:
	LDA.w $7BB8,x
	CLC
	ADC.w $6122
	STA.b $02
	ASL
	STA.b $04
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.b $02
	CMP.w $7964
	BCS.b CODE_07D700
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	STA.b $02
	EOR.b $00
	BPL.b CODE_07D700
	LDA.w $7BB6,x
	CLC
	ADC.w #$0008
	CLC
	ADC.w $6120
	STA.b $04
	LDA.b $02
	BPL.b CODE_07D6DF
	EOR.w #$FFFF
	INC
CODE_07D6DF:
	CMP.b $04
	BCS.b CODE_07D700
	LDA.w $61D6
	BNE.b CODE_07D6FC
	LDY.w $7400,x
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_07D61A,y
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	JSR.w CODE_07FD16
CODE_07D6FC:
	JSL.l CODE_03A858
CODE_07D700:
	RTS

CODE_07D701:
	LDY.w $7400,x
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_07D54C,y
	STA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7CD8,x
	STA.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_07D731
	JSR.w CODE_07D75C
CODE_07D731:
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_07D75B
	JSR.w CODE_07D75C
CODE_07D75B:
	RTS

CODE_07D75C:
	LDA.w #$0000
	STA.w $008F
	LDA.b $00
	STA.w $0091
	LDA.b $02
	STA.w $0093
	JSL.l CODE_109295
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr1C3
	JSL.l CODE_008B21
	LDA.b $00
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.b $02
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$000A
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID0A_BreakDirt
	JSL.l CODE_0085D2
	RTS

CODE_07D79D:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_07D7EA
	LDY.w $7D36,x
	BMI.b CODE_07D7EB
	DEY
	BMI.b CODE_07D7EA
	BEQ.b CODE_07D7EA
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07D7EA
	LDA.w $7D38,y
	BEQ.b CODE_07D7EA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_07D7CE:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07D835,y
	STA.w $7402,x
	LDA.w DATA_07D846,y
	STA.w $7A96,x
	REP.b #$20
CODE_07D7EA:
	RTL

CODE_07D7EB:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_07D805
	JSL.l CODE_07FC2F
	BCC.b CODE_07D803
CODE_07D7F6:
	JSL.l CODE_03B20B
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	BRA.b CODE_07D7CE

CODE_07D803:
	BEQ.b CODE_07D809
CODE_07D805:
	JSL.l CODE_03A858
CODE_07D809:
	RTL

DATA_07D80A:
	db $01,$20

CODE_07D80C:
	LDY.b #$00
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07D817
	INY
CODE_07D817:
	LDA.w DATA_07D80A,y
	AND.w #$00FF
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_07D82E
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_07D834
CODE_07D82E:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_07D834:
	RTL

DATA_07D835:
	db $2A,$2B,$2A,$2B,$2A,$2B,$2A,$2A,$29,$28,$27,$26,$25,$24,$23,$22
	db $00

DATA_07D846:
	db $20,$02,$02,$02,$02,$02,$02,$22,$02,$02,$80,$02,$04,$02,$02,$04
	db $02

YI_NorSpr0FD_ZeusGuy_StompRt:
;$07D857
	LDA.w $7042,x
	AND.w #$FFF1
	STA.w $7042,x
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07D86B
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07D86B:
	LDA.w $7A96,x
	BNE.b CODE_07D898
	DEC.b $18,x
	BMI.b CODE_07D8B0
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D835,y
	STA.w $7402,x
	LDA.w DATA_07D846,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$0F
	BNE.b CODE_07D898
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_07D898
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_07D898:
	JSL.l CODE_07FD6C
	BEQ.b CODE_07D8A7
	PHP
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_07D8AB
	PLP
	BCS.b CODE_07D8A8
CODE_07D8A7:
	RTL

CODE_07D8A8:
	JMP.w CODE_07D7F6

CODE_07D8AB:
	PLP
	JML.l CODE_03B273

CODE_07D8B0:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	JML.l CODE_07CE9D

;---------------------------------------------------------------------------

DATA_07D8BA:
	db $01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0A,$09,$08,$07,$06
	db $05,$04,$03,$02,$01,$00

DATA_07D8D0:
	dw $FF00,$0100

YI_NorSpr0FE_ZeusGuyBlast_Init:
;$07D8D4
	LDA.w #$0015
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07D8BA,y
	STA.w $7402,x
	LDA.b #$01
	STA.w $7A96,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_07D8D0,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0FE_ZeusGuyBlast_Main:
;$07D8F3
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	BNE.b CODE_07D91E
	DEC.b $18,x
	BPL.b CODE_07D905
	LDA.w #$0015
	STA.b $18,x
CODE_07D905:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07D8BA,y
	STA.w $7402,x
	LDA.w $7402,x
	EOR.b #$01
	STA.w $7402,x
	LDA.b #$01
	STA.w $7A96,x
	REP.b #$20
CODE_07D91E:
	LDY.w $7D36,x
	BPL.b CODE_07D955
	LDA.w #!Define_YI_AmbSpr20A
	JSL.l CODE_008B21
	LDA.w $70E2,x
	SEC
	SBC.w #$0004
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $7142,y
	LDA.w #$0008
	STA.w $7782,y
	LDA.w #$0004
	STA.w $73C2,y
	STA.w $7E4C,y
	JSL.l CODE_03A858
	JSL.l CODE_03A31E
CODE_07D955:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr167_GreenKoopaShell_Init:
YI_NorSpr168_RedKoopaShell_Init:
;$07D956
	LDA.w #$0002
	STA.b $78,x
	RTL

;---------------------------------------------------------------------------

DATA_07D95C:
	dw $0380,$FC80

DATA_07D960:
	dw $FE40,$FF00

YI_NorSpr167_GreenKoopaShell_Main:
YI_NorSpr168_RedKoopaShell_Main:
;$07D964
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w $6FA0,x
	ORA.w #$0600
	STA.w $6FA0,x
endif
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07D971
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	BRA.b CODE_07D976

CODE_07D971:
	LDA.w $7D38,x
	BNE.b CODE_07D980
CODE_07D976:
	JSL.l CODE_03AF23
	JSL.l CODE_07E336
	BRA.b CODE_07D994

CODE_07D980:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	BEQ.b CODE_07D986
	RTL

CODE_07D986:
	LDA.w $7D38,x
	CMP.w #$0002
	BCC.b CODE_07D991
	DEC.w $7D38,x
CODE_07D991:
	JSR.w CODE_07DC8C
CODE_07D994:
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07D9AA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	CMP.w #$0002
	BCS.b CODE_07D9AD
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BRA.b CODE_07D9AD

CODE_07D9AA:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
CODE_07D9AD:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	CMP.w #$0001
	BNE.b CODE_07D9CF
	LDA.w #!Define_YI_SoundID1D_ObjectLanding
	JSL.l CODE_0085D2
	LDA.b $76,x
	CMP.w #$0002
	BCS.b CODE_07D9CF
	LDA.b $76,x
	ASL
	TAY
	LDA.w DATA_07D960,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_07D9CF:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0180
	CMP.w #$0301
	BCS.b CODE_07DA52
	LDY.w $7D38,x
	CPY.b #$02
	BCS.b CODE_07D9E7
	LDY.w $7D36,x
	BMI.b CODE_07D9EA
CODE_07D9E7:
	JMP.w CODE_07DA7A

CODE_07D9EA:
	JSL.l CODE_07FC2F
	BCC.b CODE_07D9F9
	JSL.l CODE_03B20B
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	BRA.b CODE_07D9FC

CODE_07D9F9:
	LDA.w #!Define_YI_SoundID0B_ShellHit1
CODE_07D9FC:
	JSL.l CODE_0085D2
	LDA.w $61D6
	CMP.w #$0020
	BCS.b CODE_07DA0E
	LDA.w #$0020
	STA.w $61D6
CODE_07DA0E:
	LDA.w $60A8
	BPL.b CODE_07DA17
	EOR.w #$FFFF
	INC
CODE_07DA17:
	STA.b $00
	CMP.w #$0300
	BMI.b CODE_07DA26
	LDA.b $00
	CLC
	ADC.w #$0080
	BRA.b CODE_07DA29

CODE_07DA26:
	LDA.w #$0380
CODE_07DA29:
	STA.b $00
	EOR.w #$FFFF
	INC
	STA.b $02
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.w $7960,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$0001
	STA.w $7D38,x
	RTL

CODE_07DA52:
	LDA.w $7860,x
	AND.w #$000E
	BEQ.b CODE_07DA61
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
CODE_07DA61:
	LDA.w $7A96,x
	BNE.b CODE_07DA76
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
CODE_07DA76:
	JSR.w CODE_07DAA8
	RTL

CODE_07DA7A:
	LDA.w $7A98,x
	BNE.b CODE_07DA9B
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_07DA8B
	JSR.w CODE_07DAA8
	RTL

CODE_07DA8B:
	LDA.b $76,x
	CMP.w #$0002
	BCC.b CODE_07DA95
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07DA95:
	STZ.w $7D38,x
	JSR.w CODE_07DC43
CODE_07DA9B:
	RTL

DATA_07DA9C:
	db !Define_YI_SoundID0C_ShellHit2,!Define_YI_SoundID0D_ShellHit3,!Define_YI_SoundID0E_ShellHit4,!Define_YI_SoundID0F_ShellHit5
	db !Define_YI_SoundID10_ShellHit6,!Define_YI_SoundID11_ShellHit7,!Define_YI_SoundID12_ShellHit8,!Define_YI_SoundID12_ShellHit8

DATA_07DAA4:
	dw $0200,$FE00

CODE_07DAA8:
	LDY.w $7D36,x
	BPL.b CODE_07DADC
	LDA.w $7D38,x
	CMP.w #$0002
	BCS.b CODE_07DADC
	JSL.l CODE_07FC2F
	BCC.b CODE_07DAD5
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSL.l CODE_03B20B
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07DAD4
	STZ.w $7D38,x
CODE_07DAD4:
	RTS

CODE_07DAD5:
	BEQ.b CODE_07DADB
	JSL.l CODE_03A858
CODE_07DADB:
	RTS

CODE_07DADC:
	DEY
	BMI.b CODE_07DB5C
	BEQ.b CODE_07DB5C
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07DB5C
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_07DAF6
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCC.b CODE_07DAFB
CODE_07DAF6:
	CMP.w #!Define_YI_NorSpr107_WatermelonSeed
	BNE.b CODE_07DB00
CODE_07DAFB:
	LDA.w $7D38,y
	BNE.b CODE_07DB1A
CODE_07DB00:
	LDA.w $6FA2,y
	BIT.w #$6000
	BNE.b CODE_07DB5C
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BCC.b CODE_07DB15
	CMP.w #!Define_YI_NorSpr170_AquaLakitu
	BCC.b CODE_07DB5D
CODE_07DB15:
	LDA.w $7D38,y
	BEQ.b CODE_07DB1D
CODE_07DB1A:
	JMP.w CODE_07DC05

CODE_07DB1D:
	LDA.w $6FA0,y
	BIT.w #$0020
	BNE.b CODE_07DB5C
	LDA.w $7A36,x
	INC
	CMP.w #$0009
	BCS.b CODE_07DB31
	STA.w $7A36,x
CODE_07DB31:
	CMP.w #$0008
	BCC.b CODE_07DB3F
	PHX
	PHY
	TYX
	JSL.l CODE_03A496
	PLY
	PLX
CODE_07DB3F:
	TYX
	JSL.l CODE_0CFF61
	JSL.l CODE_03A32E
	LDX.b $12
CODE_07DB4A:
	LDY.w $7A36,x
	DEY
	CPY.b #$07
	BCS.b CODE_07DB5C
	LDA.w DATA_07DA9C,y
	AND.w #$00FF
	JSL.l CODE_0085D2
CODE_07DB5C:
	RTS

CODE_07DB5D:
	CMP.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BCS.b CODE_07DB9F
	LDA.w $7D38,y
	BEQ.b CODE_07DB9F
	PHY
	JSL.l CODE_03B288
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	LDA.w $7C77,x
	AND.b #$80
	ASL
	ROL
	ASL
	EOR.b #$02
	TAY
	REP.b #$20
	LDA.w DATA_07DAA4,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLY
CODE_07DB9F:
	LDA.w $7A36,x
	INC
	CMP.w #$0009
	BCS.b CODE_07DBAB
	STA.w $7A36,x
CODE_07DBAB:
	CMP.w #$0008
	BCC.b CODE_07DBB9
	PHX
	PHY
	TYX
	JSL.l CODE_03A496
	PLY
	PLX
CODE_07DBB9:
	PHY
	TYX
	JSL.l CODE_0CFF61
	JSL.l CODE_03B24B
	PLY
	LDX.b $12
	SEP.b #$20
	LDA.w $7C77,x
	AND.b #$80
	ASL
	ROL
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_07DAA4,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0400
	STA.w $75E2,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $6FA2,y
	ORA.w #$0020
	STA.w $6FA2,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDX.b $12
	JMP.w CODE_07DB4A

CODE_07DC05:
	TYX
	JSL.l CODE_03B24B
	BCS.b CODE_07DC42
	JSL.l CODE_03B288
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	LDA.w $7C77,x
	AND.b #$80
	ASL
	ROL
	ASL
	EOR.b #$02
	TAY
	REP.b #$20
	LDA.w DATA_07DAA4,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_07DC42:
	RTS

CODE_07DC43:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07DC8B
	BEQ.b CODE_07DC8B
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07DC8B
	LDA.w $7D38,y
	BEQ.b CODE_07DC8B
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BCC.b CODE_07DC65
	CMP.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BCC.b CODE_07DC8B
CODE_07DC65:
	STZ.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07DC74
	INC.b $00
	INC.b $00
CODE_07DC74:
	TYX
	JSL.l CODE_03B24B
	BCS.b CODE_07DC8B
	LDX.b $12
	LDY.b $00
	LDA.w DATA_07D95C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7D38,x
CODE_07DC8B:
	RTS

CODE_07DC8C:
	LDA.w $7860,x
	AND.w #$000E
	BEQ.b CODE_07DC8B
	BIT.w #$0008
	BNE.b CODE_07DCED
	BIT.w #$0004
	BNE.b CODE_07DCC7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	TAX
	LDA.l $70001C,x
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_07DCC4
	LDA.l $700018,x
	STA.b $00
	STA.w $0091
	LDA.l $70001A,x
	STA.b $02
	STA.w $0093
	BRA.b CODE_07DD11

CODE_07DCC4:
	JMP.w CODE_07DD49

CODE_07DCC7:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	TAX
	LDA.l $700014,x
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_07DD49
	LDA.l $700010,x
	STA.b $00
	STA.w $0091
	LDA.l $700012,x
	STA.b $02
	STA.w $0093
	BRA.b CODE_07DD11

CODE_07DCED:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	TAX
	LDA.l $70000C,x
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_07DD49
	LDA.l $700008,x
	STA.b $00
	STA.w $0091
	LDA.l $70000A,x
	STA.b $02
	STA.w $0093
CODE_07DD11:
	SEP.b #$10
	LDA.w #$0000
	STA.w $008F
	JSL.l CODE_109295
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr1C3
	JSL.l CODE_008B21
	LDA.b $00
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.b $02
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$000A
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID0A_BreakDirt
	JSL.l CODE_0085D2
CODE_07DD49:
	SEP.b #$10
	LDX.b $12
	RTS

DATA_07DD4E:
	dw $FFA0,$0060

;---------------------------------------------------------------------------

YI_NorSpr169_GreenNakedKoopa_Init:
YI_NorSpr16A_RedNakedKoopa_Init:
;$07DD52
	LDY.w $7400,x
	LDA.w DATA_07DD4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$010A
	STA.w $7A36,x
	LDA.w $7860,x
	STA.w $7A38,x
	SEP.b #$20
	STZ.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	LDA.b #$00
	STA.b $16,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

YI_NorSpr16B_GreenKoopa_Init:
YI_NorSpr16C_RedKoopa_Init:
;$07DD78
	LDY.w $7400,x
	LDA.w DATA_07DD4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000A
	STA.w $7A36,x
	LDA.w $7860,x
	STA.w $7A38,x
	SEP.b #$20
	STZ.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	LDA.b #$00
	STA.b $16,x
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr169_GreenNakedKoopa_Main:
YI_NorSpr16A_RedNakedKoopa_Main:
;$07DDA1
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_07DDC6
	LDA.w $7A38,x
	BIT.w #$0001
	BNE.b CODE_07DDC6
	LDA.w #$0002
	STA.w $7A98,x
CODE_07DDC6:
	LDA.b $16,x
	TAX
	JSR.w (DATA_07DDD1,x)
	JSL.l CODE_03A5B7
	RTL

DATA_07DDD1:
	dw CODE_07DE7F
	dw CODE_07DFFF
	dw CODE_07E12D
	dw CODE_07E1B4

YI_NorSpr16B_GreenKoopa_Main:
YI_NorSpr16C_RedKoopa_Main:
;$07DDD9
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_07DDE4
	JMP.w CODE_07E234

CODE_07DDE4:
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	JSL.l CODE_07E35B
	JSL.l CODE_03A5B7
	JSL.l CODE_07E2A1
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_07DE15
	LDA.w $7A38,x
	BIT.w #$0001
	BNE.b CODE_07DE15
	LDA.w #$0002
	STA.w $7A98,x
CODE_07DE15:
	LDA.b $16,x
	TAX
	JSR.w (DATA_07DE1C,x)
	RTL

DATA_07DE1C:
	dw CODE_07DE2A
	dw CODE_07DFFF
	dw CODE_07E0C6

DATA_07DE22:
	db $07,$06,$05,$04,$03,$02,$01,$00

CODE_07DE2A:
	LDX.b $12
	JSR.w CODE_07E1E4
	BEQ.b CODE_07DE36
	JSR.w CODE_07E1F3
	BRA.b CODE_07DE39

CODE_07DE36:
	JSR.w CODE_07E1FD
CODE_07DE39:
	JSR.w CODE_07E303
	JSR.w CODE_07E250
	LDA.w $7A98,x
	BNE.b CODE_07DE4F
	LDY.w $7400,x
	LDA.w DATA_07DD4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_07DE67

CODE_07DE4F:
	LDA.w #$000C
	STA.w $7402,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_07DE7E
	LDA.w #$0008
	STA.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_07DE67:
	LDA.w $7A96,x
	BNE.b CODE_07DE7E
	SEP.b #$20
	LDA.w $7402,x
	INC
	AND.b #$07
	STA.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	REP.b #$20
CODE_07DE7E:
	RTS

CODE_07DE7F:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BEQ.b CODE_07DE89
	JMP.w CODE_07DF0D

CODE_07DE89:
	LDA.w $7AF6,x
	BNE.b CODE_07DF0D
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_099856>>16
	LDA.w #FXCODE_099856
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	BMI.b CODE_07DF0D
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_07DF0D
	LDA.w $7400,x
	DEC
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $02
	EOR.b $00
	BPL.b CODE_07DF0D
	LDA.b $02
	BPL.b CODE_07DED5
	EOR.w #$FFFF
	INC
CODE_07DED5:
	CMP.w #$0020
	BCS.b CODE_07DF0D
	ASL
	ASL
	ASL
	LDY.b $03
	BMI.b CODE_07DEE5
	EOR.w #$FFFF
	INC
CODE_07DEE5:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	STA.w $7A38,x
	LDA.w #$000C
	STA.w $7402,x
	RTS

CODE_07DF0D:
	JSR.w CODE_07E1E4
	BEQ.b CODE_07DF17
	JSR.w CODE_07E1F3
	BRA.b CODE_07DF1A

CODE_07DF17:
	JSR.w CODE_07E1FD
CODE_07DF1A:
	JSR.w CODE_07E303
	JSR.w CODE_07E250
	LDA.w $7A98,x
	BNE.b CODE_07DF49
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_07DD4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A96,x
	BNE.b CODE_07DF48
	SEP.b #$20
	LDA.w $7402,x
	INC
	AND.b #$07
	STA.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	REP.b #$20
CODE_07DF48:
	RTS

CODE_07DF49:
	LDA.w #$000C
	LDY.w $7223,x
	BMI.b CODE_07DF54
	LDA.w #$0010
CODE_07DF54:
	STA.w $7402,x
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07DF93
	LDY.w $7D36,x
	BMI.b CODE_07DF90
	DEY
	BMI.b CODE_07DF90
	BEQ.b CODE_07DF90
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BCC.b CODE_07DF90
	CMP.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BCS.b CODE_07DF90
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07DF90
	LDA.w $7D38,y
	BNE.b CODE_07DF90
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BNE.b CODE_07DF90
	LDA.w $7860,y
	BIT.w #$0001
	BNE.b CODE_07DF94
CODE_07DF90:
	JMP.w CODE_07DFEF

CODE_07DF93:
	RTS

CODE_07DF94:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BNE.b CODE_07DFA1
	LDA.w #!Define_YI_NorSpr16B_GreenKoopa
	BRA.b CODE_07DFA4

CODE_07DFA1:
	LDA.w #!Define_YI_NorSpr16C_RedKoopa
CODE_07DFA4:
	PHY
	TXY
	JSL.l CODE_03A377
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
	LDA.w #$FFF8
	STA.w $7720,x
	LDA.w #$0004
	STA.b $16,x
	LDA.w #$0004
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07E05C,y
	STA.w $7402,x
	LDA.w DATA_07E061,y
	STA.w $7A96,x
	REP.b #$20
	LDA.w #$000A
	STA.w $7A36,x
	LDA.w $7860,x
	STA.w $7A38,x
	PLX
	JSL.l CODE_03A31E
	LDX.b $12
	RTS

CODE_07DFEF:
	LDA.w #$0040
	STA.w $7542,x
	JMP.w CODE_07E042

CODE_07DFF8:
	RTS

DATA_07DFF9:
	db $08,$09,$0A,$0A,$09,$08

CODE_07DFFF:
	LDX.b $12
	LDA.w $7860,x
	STA.w $7A38,x
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_07E01A
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	BRA.b CODE_07E042

CODE_07E01A:
	LDA.w $7A96,x
	BNE.b CODE_07E041
	DEC.b $18,x
	BMI.b CODE_07E042
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07DFF9,y
	STA.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$02
	BNE.b CODE_07E041
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07E041:
	RTS

CODE_07E042:
	LDY.w $7400,x
	LDA.w DATA_07DD4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	STZ.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	LDA.b #$00
	STA.b $16,x
	REP.b #$20
	RTS

DATA_07E05C:
	db $08,$0D,$0C,$0B,$0E

DATA_07E061:
	db $0A,$08,$10,$08,$60

DATA_07E066:
	dw $FFFE,$0002,$0002,$FFFE,$FFFE,$0002,$0002,$FFFE
	dw $FFFE,$0002,$0002,$FFFE,$FFFE,$0002,$0002,$FFFE
	dw $FFFE,$0002,$0002,$FFFE,$FFFE,$0002,$0002,$FFFE
	dw $FFFE,$0002,$0002,$FFFE,$FFFE,$0002,$0002,$FFFE
	dw $FFFE,$0002,$0002,$FFFE,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

CODE_07E0C6:
	LDX.b $12
	LDA.b $18,x
	CMP.w #$0004
	BNE.b CODE_07E0E1
	LDA.w $7A96,x
	LSR
	BCS.b CODE_07E0E1
	ASL
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07E066,y
	STA.w $70E2,x
CODE_07E0E1:
	LDA.w $7A96,x
	BNE.b CODE_07E125
	DEC.b $18,x
	BMI.b CODE_07E126
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07E05C,y
	STA.w $7402,x
	LDA.w DATA_07E061,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$03
	BNE.b CODE_07E10F
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	STZ.w $7720,x
	BRA.b CODE_07E125

CODE_07E10F:
	CPY.b #$02
	BNE.b CODE_07E125
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	STA.w $7A38,x
CODE_07E125:
	RTS

CODE_07E126:
	JMP.w CODE_07E042

DATA_07E129:
	dw $FFE0,$0020

CODE_07E12D:
	LDX.b $12
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07E193
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_07E193
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_07E191
	LDA.w $6FA0,x
	ORA.w #$0200
	STA.w $6FA0,x
	LDA.b $14
	AND.w #$0003
	BNE.b CODE_07E191
	LDY.w $7400,x
	LDA.w DATA_07E129,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1E0
	JSL.l CODE_008B21
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $73C0,y
	LDA.w #$0004
	STA.w $7782,y
	STA.w $7E4C,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FFF0
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0014
	STA.w $7142,y
CODE_07E191:
	PLA
	RTL

CODE_07E193:
	LDA.w $6FA0,x
	ORA.w #$0200
	STA.w $6FA0,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0001
	STA.b $18,x
	LDA.w #$0006
	STA.b $16,x
	PLA
	RTL

CODE_07E1B4:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07E1CB
	DEC.b $18,x
	BMI.b CODE_07E1CD
	LDA.w #$000D
	STA.w $7402,x
	LDA.w #$0008
	STA.w $7A96,x
CODE_07E1CB:
	PLA
	RTL

CODE_07E1CD:
	STZ.b $18,x
	JSR.w CODE_07E1E4
	BNE.b CODE_07E1DD
	LDA.w $6FA2,x
	ORA.w #$0200
	STA.w $6FA2,x
CODE_07E1DD:
	JMP.w CODE_07E042

DATA_07E1E0:
	dw !Define_YI_NorSpr16A_RedNakedKoopa
	dw !Define_YI_NorSpr16C_RedKoopa

CODE_07E1E4:
	LDY.b #$02
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
CODE_07E1E9:
	CMP.w DATA_07E1E0,y
	BEQ.b CODE_07E1F2
	DEY
	DEY
	BPL.b CODE_07E1E9
CODE_07E1F2:
	RTS

CODE_07E1F3:
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_07E20F
	BRA.b CODE_07E229

CODE_07E1FD:
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_07E20F
	BIT.w #$0001
	BNE.b CODE_07E229
	LDA.w $7A38,x
	BEQ.b CODE_07E229
CODE_07E20F:
	LDA.w #$0005
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07DFF9,y
	STA.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	LDA.b #$02
	STA.b $16,x
	REP.b #$20
	PLA
CODE_07E229:
	LDA.w $7860,x
	STA.w $7A38,x
	RTS

DATA_07E230:
	dw !Define_YI_NorSpr16B_GreenKoopa
	dw !Define_YI_NorSpr16D_GreenParakoopa

CODE_07E234:
	LDY.b #$02
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
CODE_07E239:
	CMP.w DATA_07E230,y
	BEQ.b CODE_07E247
	DEY
	DEY
	BPL.b CODE_07E239
	LDA.w #!Define_YI_NorSpr168_RedKoopaShell
	BRA.b CODE_07E24A

CODE_07E247:
	LDA.w #!Define_YI_NorSpr167_GreenKoopaShell
CODE_07E24A:
	TXY
	JSL.l CODE_03A377
	RTL

CODE_07E250:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07E2A0
	BEQ.b CODE_07E2A0
	LDA.w $7D38,y
	BNE.b CODE_07E2A0
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BCC.b CODE_07E2A0
	CMP.w #!Define_YI_NorSpr16E_RedHorizontalParakoopa
	BCS.b CODE_07E2A0
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07E2A0
	LDA.w $7400,x
	DEC
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.b $00
	BPL.b CODE_07E2A0
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07DFF9,y
	STA.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	LDA.b #$02
	STA.b $16,x
	REP.b #$20
	PLA
CODE_07E2A0:
	RTS

CODE_07E2A1:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07E302
	BEQ.b CODE_07E302
	LDA.w $7D38,y
	BEQ.b CODE_07E302
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BCC.b CODE_07E2BB
	CMP.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BCC.b CODE_07E302
CODE_07E2BB:
	STZ.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07E2CA
	INC.b $00
	INC.b $00
CODE_07E2CA:
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr16B_GreenKoopa
	BNE.b CODE_07E2DE
	LDA.w #!Define_YI_NorSpr167_GreenKoopaShell
	BRA.b CODE_07E2E1

CODE_07E2DE:
	LDA.w #!Define_YI_NorSpr168_RedKoopaShell
CODE_07E2E1:
	TXY
	JSL.l CODE_03A377
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7A98,x
	LDA.w #$0001
	STA.w $7D38,x
	LDY.b $00
	LDA.w DATA_07D95C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLY
	PLA
CODE_07E302:
	RTL

CODE_07E303:
	LDA.w $61D6
	BNE.b CODE_07E335
	LDY.w $7D36,x
	BPL.b CODE_07E335
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BEQ.b CODE_07E335
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07DFF9,y
	STA.w $7402,x
	LDA.b #$05
	STA.w $7A96,x
	LDA.b #$02
	STA.b $16,x
	REP.b #$20
	PLA
CODE_07E335:
	RTS

CODE_07E336:
	LDY.w $7D36,x
	BPL.b CODE_07E35A
	LDA.w $60D4
	BEQ.b CODE_07E35A
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_07E35A
	JSL.l CODE_0CFF61
	PLY
	PLA
	JML.l CODE_03B273

CODE_07E35A:
	RTL

CODE_07E35B:
	LDY.w $7D36,x
	BPL.b CODE_07E398
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_07E398
	LDA.w $60D4
	BEQ.b CODE_07E37F
	JSL.l CODE_0CFF61
	PLY
	PLA
	JML.l CODE_03B273

CODE_07E37F:
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLY
	PLA
	JML.l CODE_03B20B

CODE_07E398:
	RTL

CODE_07E399:
	LDA.w $7040,x
	BIT.w #$0003
	BEQ.b CODE_07E3AC
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_07E3AC:
	STZ.w $7402,x
	LDA.w $7040,x
	AND.w #$07FC
	ORA.w #$0800
	STA.w $7040,x
	BRA.b CODE_07E3C8

YI_NorSpr169_GreenNakedKoopa_StompRt:
YI_NorSpr16A_RedNakedKoopa_StompRt:
;$07E3BD
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
YI_NorSpr167_GreenKoopaShell_StompRt:
YI_NorSpr168_RedKoopaShell_StompRt:
CODE_07E3C8:
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w $7042,x
	ORA.w #$00B0
	STA.w $7042,x
	RTL

DATA_07E3DB:
	dw $0400,$FC00

YI_NorSpr16B_GreenKoopa_StompRt:
;$07E3DF
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_07E399
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0167
	STA.b $00
	LDA.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BRA.b CODE_07E411

YI_NorSpr16C_RedKoopa_StompRt:
;$07E3F9
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_07E399
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0168
	STA.b $00
	LDA.w #!Define_YI_NorSpr16A_RedNakedKoopa
CODE_07E411:
	TXY
	JSL.l CODE_03A377
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	TAY
	LDA.w DATA_07E3DB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w #$010A
	STA.w $7A36,x
	LDA.w $7860,x
	STA.w $7A38,x
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	LDA.w #$000C
	STA.w $7402,x
	LDA.w #$0020
	STA.w $7540,x
	LDA.w $6FA0,x
	AND.w #$FDFF
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FCFF
	STA.w $6FA2,x
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.b $00
	JSL.l CODE_03A364
	BCC.b CODE_07E482
	LDA.w #$0020
	STA.w $7A98,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
CODE_07E482:
	RTL

;---------------------------------------------------------------------------

DATA_07E483:
	dw $FF80,$0080

YI_NorSpr16D_GreenParakoopa_Init:
;$07E487
	LDA.w #$002A
	STA.w $7A36,x
	LDA.w #$0010
	STA.w $7542,x
	LDA.w #$0100
	STA.w $75E2,x
CODE_07E499:
	LDY.w $7400,x
	LDA.w DATA_07E483,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w #$0000
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_07E4BD:
	dw $0030,$FFD0

DATA_07E4C1:
	dw $0004,$FFFC

DATA_07E4C5:
	dw $FEE0,$0120

DATA_07E4C9:
	dw $FED0,$0130

DATA_07E4CD:
	dw $F800,$0800

YI_NorSpr16E_RedHorizontalParakoopa_Init:
;$07E4D1
	LDA.w #$002A
	STA.w $7A36,x
	LDA.w $70E2,x
	STA.b $18,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_07E4C5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_07E4CD,y
	STA.w $75E0,x
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7540,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w $7182,x
	STA.b $76,x
	CLC
	ADC.w DATA_07E4C1,y
	STA.w $7182,x
	LDA.w #$0008
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr16F_RedVerticalParakoopa_Init:
;$07E520
	LDA.w #$002A
	STA.w $7A36,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	TAY
	LDA.w $7182,x
	STA.b $18,x
	LDA.w DATA_07E4C9,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_07E4CD,y
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	LDA.w #$0008
	STA.w $7402,x
	LDA.w DATA_07E593,y
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr16D_GreenParakoopa_Main:
;$07E55A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_07E56A
	STZ.b $00
	JSR.w CODE_07FD34
	JMP.w CODE_07E234

CODE_07E56A:
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	JSL.l CODE_07E35B
	JSL.l CODE_03A5B7
	JSL.l CODE_07E6B7
	JSR.w CODE_07E6E9
	LDA.b $16,x
	TAX
	JSR.w (DATA_07E58F,x)
	RTL

DATA_07E58F:
	dw CODE_07E597
	dw CODE_07E5CD

DATA_07E593:
	dw $0002,$0004

CODE_07E597:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_07E5B8
	LDA.w $7A96,x
	BNE.b CODE_07E5B7
	DEC.w $7402,x
	BPL.b CODE_07E5B1
	LDA.w #$0008
	STA.w $7402,x
CODE_07E5B1:
	LDA.w #$0002
	STA.w $7A96,x
CODE_07E5B7:
	RTS

CODE_07E5B8:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0009
	STA.w $7402,x
	LDA.w #$0002
	STA.b $16,x
	RTS

CODE_07E5CD:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07E5D8
	JSL.l CODE_07E499
CODE_07E5D8:
	RTS

YI_NorSpr16E_RedHorizontalParakoopa_Main:
;$07E5D9
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_07E5E9
	STZ.b $00
	JSR.w CODE_07FD34
	JMP.w CODE_07E234

CODE_07E5E9:
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	JSL.l CODE_07E35B
	JSL.l CODE_03A5B7
	JSL.l CODE_07E6B7
	LDY.b #$00
	LDA.w $70E2,x
	CMP.b $18,x
	BPL.b CODE_07E60F
	INY
	INY
CODE_07E60F:
	LDA.w DATA_07E4CD,y
	STA.w $75E0,x
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07E627
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07E627:
	LDY.b #$00
	LDA.w $7182,x
	CMP.b $76,x
	BPL.b CODE_07E632
	INY
	INY
CODE_07E632:
	LDA.w DATA_07E4CD,y
	STA.w $75E2,x
	LDA.w $7A96,x
	BNE.b CODE_07E64E
	DEC.w $7402,x
	BPL.b CODE_07E648
	LDA.w #$0008
	STA.w $7402,x
CODE_07E648:
	LDA.w #$0003
	STA.w $7A96,x
CODE_07E64E:
	RTL

YI_NorSpr16F_RedVerticalParakoopa_Main:
;$07E64F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_07E65F
	STZ.b $00
	JSR.w CODE_07FD34
	JMP.w CODE_07E234

CODE_07E65F:
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	JSL.l CODE_07E35B
	JSL.l CODE_03A5B7
	JSL.l CODE_07E6B7
	LDY.b #$00
	LDA.w $7182,x
	CMP.b $18,x
	BPL.b CODE_07E685
	INY
	INY
CODE_07E685:
	LDA.w DATA_07E4CD,y
	STA.w $75E2,x
	LDA.w $7A96,x
	BNE.b CODE_07E6B6
	DEC.w $7402,x
	BPL.b CODE_07E69B
	LDA.w #$0008
	STA.w $7402,x
CODE_07E69B:
	LDY.b #$00
	LDA.w #$0100
	BIT.w $75E2,x
	BPL.b CODE_07E6A8
	LDA.w #$FF00
CODE_07E6A8:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_07E6B0
	INY
	INY
CODE_07E6B0:
	LDA.w DATA_07E593,y
	STA.w $7A96,x
CODE_07E6B6:
	RTL

CODE_07E6B7:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07E6E8
	BEQ.b CODE_07E6E8
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07E6E8
	LDA.w $7D38,y
	BEQ.b CODE_07E6E8
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr167_GreenKoopaShell
	BCC.b CODE_07E6D9
	CMP.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BCC.b CODE_07E6E8
CODE_07E6D9:
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLY
	PLA
CODE_07E6E8:
	RTL

CODE_07E6E9:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07E72F
	BEQ.b CODE_07E72F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07E72F
	LDA.w $7D38,y
	BNE.b CODE_07E72F
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr169_GreenNakedKoopa
	BCC.b CODE_07E72F
	CMP.w #!Define_YI_NorSpr16E_RedHorizontalParakoopa
	BCS.b CODE_07E72F
	LDA.w $7400,x
	DEC
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.b $00
	BPL.b CODE_07E72F
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07E72F:
	RTS

YI_NorSpr16D_GreenParakoopa_StompRt:
;$07E730
	LDA.w $7AF8,x
	BNE.b CODE_07E740
	STZ.b $00
	JSR.w CODE_07FD34
	LDA.w #$FFFF
	STA.w $7AF8,x
CODE_07E740:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_07E748
	JMP.w CODE_07E399

CODE_07E748:
	LDA.w #!Define_YI_NorSpr16B_GreenKoopa
	BRA.b CODE_07E768

YI_NorSpr16E_RedHorizontalParakoopa_StompRt:
YI_NorSpr16F_RedVerticalParakoopa_StompRt:
;$07E74D
	LDA.w $7AF8,x
	BNE.b CODE_07E75D
	STZ.b $00
	JSR.w CODE_07FD34
	LDA.w #$FFFF
	STA.w $7AF8,x
CODE_07E75D:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_07E765
	JMP.w CODE_07E399

CODE_07E765:
	LDA.w #!Define_YI_NorSpr16C_RedKoopa
CODE_07E768:
	PHA
	LDX.b #FXCODE_08949D>>16
	LDA.w #FXCODE_08949D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLA
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$000A
	STA.w $7A36,x
	LDA.w $7860,x
	STA.w $7A38,x
	RTL

;---------------------------------------------------------------------------

DATA_07E78D:
	dw $0018,$0018,$0018,$0018,$0010,$0008,$0004,$0003
	dw $0000,$0000,$0000,$0000,$0000,$0001,$0000,$0004
	dw $0008,$000C

DATA_07E7B1:
	dw $FF80,$0080

YI_NorSpr170_AquaLakitu_Init:
;$07E7B5
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_07E7CD
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_07E7C4
	INY
	INY
CODE_07E7C4:
	SEP.b #$20
	TYA
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
CODE_07E7CD:
	LDA.w #$0004
	STA.b $16,x
	JSR.w CODE_07E842
	RTL

;---------------------------------------------------------------------------

YI_NorSpr170_AquaLakitu_Main:
;$07E7D6
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000C
	BEQ.b CODE_07E7E3
	CMP.w #$0008
	BNE.b CODE_07E7E9
CODE_07E7E3:
	LDA.w #$0012
	STA.w $7402,x
CODE_07E7E9:
	LDY.w $74A2,x
	BMI.b CODE_07E813
	LDA.w $7402,x
	CMP.w #$000B
	BNE.b CODE_07E813
	LDA.b $14
	AND.w #$0006
	TAY
	LDA.w DATA_07A9BE,y
	STA.b $00
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6014,y
	AND.w #$F1FF
	ORA.b $00
	STA.w $6014,y
	SEP.b #$10
CODE_07E813:
	JSL.l CODE_03AF23
	JSR.w CODE_07EADE
	LDY.b $16,x
	TYX
	JSR.w (DATA_07E825,x)
	JSL.l CODE_03A5B7
	RTL

DATA_07E825:
	dw CODE_07E873
	dw CODE_07E915
	dw CODE_07E82B

CODE_07E82B:
	LDX.b $12
	LDA.w $7680,x
	CMP.w #$00F0
	BCS.b CODE_07E872
	LDA.w $7682,x
	CMP.w #$00D0
	BCS.b CODE_07E872
	LDA.w #$0002
	STA.b $16,x
CODE_07E842:
	LDA.w $6FA0,x
	AND.w #$7F9F
	STA.w $6FA0,x
	LDA.w $7040,x
	ORA.w #$0100
	STA.w $7040,x
	LDA.w #$000C
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07E8AE,y
	STA.w $7A96,x
	LDA.w DATA_07E896,y
	STA.w $7402,x
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_07E78D,y
	STA.w $7B58,x
CODE_07E872:
	RTS

CODE_07E873:
	LDX.b $12
	JSR.w CODE_07EA77
	LDA.w $7A96,x
	BNE.b CODE_07E895
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w $7402,x
	INC
	AND.w #$0001
	STA.w $7402,x
	ASL
	TAY
	LDA.w DATA_07E78D,y
	STA.w $7B58,x
CODE_07E895:
	RTS

DATA_07E896:
	db $01,$02,$03,$11,$10,$0F,$0D,$0E,$0D,$0C,$0B,$09,$08,$09,$0A,$09
	db $08,$07,$06,$05,$04,$03,$02,$01

DATA_07E8AE:
	db $04,$04,$38,$02,$02,$02,$02,$04,$02,$20,$40,$20,$04,$02,$02,$02
	db $02,$02,$02,$02,$02,$20,$02,$02

DATA_07E8C6:
	dw $FE00,$0200,$FE00,$0200

DATA_07E8CE:
	dw $0000,$0000,$FF80,$FF80

DATA_07E8D6:
	dw $FFC0,$0040,$FFD0,$0030

DATA_07E8DE:
	dw $0010,$0010,$001C,$001C

CODE_07E8E6:
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0000
	STA.w $7402,x
	ASL
	TAY
	LDA.w DATA_07E78D,y
	STA.w $7B58,x
	LDA.w #$0080
	STA.w $7A98,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	BNE.b CODE_07E90F
	LDY.w $7400,x
	LDA.w DATA_07E7B1,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_07E90F:
	LDA.w #$0000
	STA.b $16,x
	RTS

CODE_07E915:
	LDX.b $12
	LDA.w $7680,x
	ORA.w $7682,x
	AND.w #$FF00
	BNE.b CODE_07E8E6
	LDA.w $7A96,x
	BEQ.b CODE_07E92A
	JMP.w CODE_07E9AA

CODE_07E92A:
	DEC.b $18,x
	BMI.b CODE_07E8E6
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_07E8AE,y
	STA.w $7A96,x
	LDA.w DATA_07E896,y
	STA.w $7402,x
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_07E78D,y
	STA.w $7B58,x
	LDA.b $18,x
	CMP.w #$0013
	BNE.b CODE_07E97A
	LDA.w #!Define_YI_AmbSpr201
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	RTS

CODE_07E97A:
	CMP.w #$0002
	BNE.b CODE_07E9E3
	LDA.w #!Define_YI_AmbSpr1BA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.w #$001A
	STA.w $7E4C,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	RTS

CODE_07E9AA:
	LDA.b $18,x
CODE_07E9AC:
	CMP.w #$000A
	BNE.b CODE_07E9E2
CODE_07E9B1:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	TYA
	ASL
	ORA.w $7400,x
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07E8D6,y
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w DATA_07E8DE,y
	STA.b $02
	LDA.w $7A38,x
	STA.b $04
	JSL.l CODE_07FCB8
	LDA.w $7A38,x
	INC
	CMP.w #$0020
	BCS.b CODE_07E9E2
	STA.w $7A38,x
CODE_07E9E2:
	RTS

CODE_07E9E3:
	CMP.w #$0012
	BNE.b CODE_07E9FB
	LDA.w $6FA0,x
	AND.w #$7F9F
	STA.w $6FA0,x
	LDA.w $7040,x
	ORA.w #$0100
	STA.w $7040,x
	RTS

CODE_07E9FB:
	CMP.w #$0004
	BNE.b CODE_07EA13
	LDA.w $6FA0,x
	ORA.w #$C060
	STA.w $6FA0,x
	LDA.w $7040,x
	AND.w #$FEFF
	STA.w $7040,x
	RTS

CODE_07EA13:
	CMP.w #$000A
	BNE.b CODE_07EA1D
	STZ.w $7A38,x
	BRA.b CODE_07E9B1

CODE_07EA1D:
	CMP.w #$0009
	BNE.b CODE_07E9AC
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	TYA
	ASL
	ORA.w $7400,x
	TAY
	PHY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07E8D6,y
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w DATA_07E8DE,y
	STA.b $02
	LDA.w $7A38,x
	STA.b $04
	JSL.l CODE_07FCB3
	PLY
	LDA.w DATA_07E8C6,y
	STA.b $00
	LDA.w DATA_07E8CE,y
	STA.b $02
	LDA.w #$0099
	JSL.l CODE_03A34C
	BCC.b CODE_07E9E2
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	RTS

CODE_07EA77:
	LDA.w $7A98,x
	BNE.b CODE_07EAD9
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCC.b CODE_07EAD9
	SEC
	SBC.w #$0020
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_07EAD9
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_07EAD9
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0017
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_07E8AE,y
	STA.w $7A96,x
	LDA.w DATA_07E896,y
	STA.w $7402,x
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_07E78D,y
	STA.w $7B58,x
	LDA.w #$0002
	STA.b $16,x
	PLA
CODE_07EAD9:
	RTS

DATA_07EADA:
	dw $0000,$0010

CODE_07EADE:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	BNE.b CODE_07EB44
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07EADA,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$77C2
	BCC.b CODE_07EB1D
	CMP.w #$77C6
	BCC.b CODE_07EB44
	CMP.w #$77D0
	BCC.b CODE_07EB1D
	CMP.w #$77D6
	BCC.b CODE_07EB44
CODE_07EB1D:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7CD6,x
	SEC
	SBC.w $72C0,x
	STA.w $7CD6,x
CODE_07EB44:
	RTS

YI_NorSpr170_AquaLakitu_StompRt:
;$07EB45
	LDA.w #$0012
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr166_ThunderLakitu_Init:
;$07EB4C
	LDA.w #$0001
	STA.w !RAM_YI_Level_NorSpr_FireLakituActiveFlagLo
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.b $76,x
	LDA.w #$0010
	STA.w $7540,x
	STA.w $7542,x
	LDA.w #$0200
	STA.w $75E2,x
	STA.w $75E0,x
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_07EBAD
	LDY.w $0073
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_07F0C3,y
	STA.b $00
	LDA.w #$0166
	JSL.l CODE_03A364
	BCC.b CODE_07EBAD
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $70E2,y
	LDA.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0030
	STA.w $7182,y
	LDA.w #$0010
	STA.w $7540,y
	STA.w $7542,y
	LDA.w #$0200
	STA.w $75E2,y
	STA.w $75E0,y
CODE_07EBAD:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr166_ThunderLakitu_Main:
;$07EBAE
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_07EBBB
	JSR.w CODE_07EF4A
	BRA.b CODE_07EC14

CODE_07EBBB:
	PHA
	JSR.w CODE_07EFD2
	PLA
	CMP.w #$0008
	BNE.b CODE_07EC14
	LDA.w #$011C
	JSL.l CODE_03A364
	BCC.b CODE_07EC06
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,y
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	TYA
	AND.w #$00FF
	INC
	STA.w $6162
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	TXA
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	JSL.l CODE_07F06B
	BRA.b CODE_07EC0F

CODE_07EC06:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $6162
CODE_07EC0F:
	STZ.w $6168
	PLA
	PLY
CODE_07EC14:
	JSL.l CODE_03AF23
	JSL.l CODE_07EF98
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.b $16,x
	TAX
	JSR.w (DATA_07EC8B,x)
	JSR.w CODE_07EFE9
	LDA.w !RAM_YI_Level_NorSpr_FireLakituActiveFlagLo
	BNE.b CODE_07EC4E
	LDA.w #$F800
	STA.w $75E2,x
	STA.w $75E0,x
	LDA.w #$0040
	STA.w $7542,x
	STA.w $7540,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
CODE_07EC4E:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_07EC86
	LDA.w #!Define_YI_AmbSpr1F8
	JSL.l CODE_008B21
	LDA.w #$0002
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70A2,y
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $72C2,x
	STA.w $7142,y
CODE_07EC86:
	JSL.l CODE_03A5B7
	RTL

DATA_07EC8B:
	dw CODE_07ECA7
	dw CODE_07ED63
	dw CODE_07EE47
	dw CODE_07EEFF

DATA_07EC93:
	dw $0030,$FFD0

DATA_07EC97:
	dw $0008,$0010

DATA_07EC9B:
	dw $0200,$FE00

DATA_07EC9F:
	dw $0008,$0010

DATA_07ECA3:
	dw $0200,$FE00

CODE_07ECA7:
	LDX.b $12
	JSR.w CODE_07ECC4
	LDA.w $7A98,x
	BNE.b CODE_07ECC3
	JSR.w CODE_07F027
	BCS.b CODE_07ECC3
	LDA.w #$0001
	STA.w $7402,x
	STA.b $18,x
	LDA.w #$0002
	STA.b $16,x
CODE_07ECC3:
	RTS

CODE_07ECC4:
	LDY.b #$00
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07ECCE
	INY
	INY
CODE_07ECCE:
	LDA.w DATA_07EC97,y
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_07EC93,y
	LDY.b #$00
	CMP.w $70E2,x
	BPL.b CODE_07ECEE
	INY
	INY
CODE_07ECEE:
	LDA.w DATA_07EC9B,y
	STA.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_07ECFD
	EOR.w #$FFFF
	INC
CODE_07ECFD:
	CMP.w #$0100
	BCC.b CODE_07ED14
	LDY.b #$00
	LDA.w $7682,x
	CMP.w #$0030
	BMI.b CODE_07ED0E
	INY
	INY
CODE_07ED0E:
	LDA.w DATA_07ECA3,y
	STA.w $75E2,x
CODE_07ED14:
	LDY.b #$00
	LDA.w $7682,x
	SEC
	SBC.w #$0030
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_07ED24
	INY
	INY
CODE_07ED24:
	LDA.w DATA_07EC9F,y
	STA.w $7542,x
	LDA.w $7682,x
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCC.b CODE_07ED4A
	LDA.w $75E2,x
	CLC
	ADC.w #$0800
	CMP.w #$1000
	BCS.b CODE_07ED4A
	LDA.w $75E2,x
	ASL
	ASL
	STA.w $75E2,x
CODE_07ED4A:
	RTS

DATA_07ED4B:
	dw $0004,$000C

DATA_07ED4F:
	dw $FFFE,$0002

DATA_07ED53:
	dw $0006,$000C

DATA_07ED57:
	dw $000F,$000F,$000F,$000F,$000F,$000F

CODE_07ED63:
	LDX.b $12
	JSR.w CODE_07ECC4
	JSR.w CODE_07F027
	BCC.b CODE_07ED70
	JMP.w CODE_07EF06

CODE_07ED70:
	LDA.b $18,x
	PHA
	AND.w #$0004
	LSR
	TAY
	LDA.w DATA_07ED4B,y
	STA.b $00
	PLA
	LSR
	LSR
	LSR
	CMP.w #$0005
	BCC.b CODE_07ED89
	LDA.w #$0005
CODE_07ED89:
	STA.b $02
	ASL
	TAY
	LDA.b $18,x
	AND.w DATA_07ED57,y
	BNE.b CODE_07ED9B
	LDA.w #!Define_YI_SoundID51_ThunderLakituAttacking1
	JSL.l CODE_0085D2
CODE_07ED9B:
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07ED4F,y
	STA.b $04
	LDA.w #!Define_YI_AmbSpr20D
	JSL.l CODE_008B21
	LDA.b $02
	STA.w $73C2,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.b $04
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0018
	STA.w $7142,y
	LDA.w $7002,y
	AND.w #$FFF1
	ORA.b $00
	STA.w $7002,y
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_07ED53,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr20E
	JSL.l CODE_008B21
	LDA.b $18,x
	LSR
	AND.w #$0007
	STA.w $73C2,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0020
	STA.w $7142,y
	LDA.b $18,x
	INC
	CMP.w #$0040
	BCS.b CODE_07EE0F
	STA.b $18,x
	RTS

CODE_07EE0F:
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.b $76,x
	ORA.w !RAM_YI_Global_SubScreenLayers
	AND.w #$000F
	XBA
	ORA.w #$0010
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$0018
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $16,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

DATA_07EE3F:
	dw $0000,$7C00,$03E0,$001F

CODE_07EE47:
	LDX.b $12
	JSR.w CODE_07F027
	BCC.b CODE_07EE54
	JSR.w CODE_07EFD2
	JMP.w CODE_07EF06

CODE_07EE54:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_07EE62
	LDA.w #!Define_YI_SoundID51_ThunderLakituAttacking1
	JSL.l CODE_0085D2
CODE_07EE62:
	LDA.w $7402,x
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_07ED4B,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr20D
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0018
	STA.w $7142,y
	LDA.w $7002,y
	AND.w #$FFF1
	ORA.b $00
	STA.w $7002,y
	LDA.w $7A96,x
	BEQ.b CODE_07EEBF
	AND.w #$0003
	BNE.b CODE_07EEBE
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.b $14
	AND.w #$000C
	LSR
	TAY
	LDA.w DATA_07EE3F,y
	STA.l YI_Global_PaletteMirror[$00].LowByte
CODE_07EEBE:
	RTS

CODE_07EEBF:
	JSR.w CODE_07EFD2
	LDA.w #$0030
	STA.w $7A96,x
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$0006
	STA.b $16,x
	LDA.w #$00A2
	JSL.l CODE_03A364
	BCC.b CODE_07EEFA
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0005
	STA.w $7402,y
	LDA.w #$0200
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $60A8
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_07EEFA:
	RTS

DATA_07EEFB:
	dw $FE00,$0200

CODE_07EEFF:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07EF3F
CODE_07EF06:
	LDA.b $10
	AND.w #$007F
	CLC
	ADC.w #$0080
	STA.w $7A98,x
	LDA.w #$0010
	STA.w $7540,x
	STA.w $7542,x
	LDA.b $10
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_07EEFB,y
	STA.w $75E0,x
	LDA.b $10
	AND.w #$0002
	TAY
	LDA.w DATA_07EEFB,y
	STA.w $75E2,x
	LDA.w #$0000
	STA.w $7402,x
	LDA.w #$0000
	STA.b $16,x
CODE_07EF3F:
	RTS

DATA_07EF40:
	dw $000A,$000A,$000A,$0022,$000A

CODE_07EF4A:
	LDY.w $74A2,x
	BMI.b CODE_07EF97
	LDA.b $14
	AND.w #$0008
	BEQ.b CODE_07EF97
	LDA.w $7402,x
	CMP.w #$0005
	BCS.b CODE_07EF97
	ASL
	TAY
	LDA.w $7180,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	CLC
	ADC.w DATA_07EF40,y
	STA.b $00
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0008
	TAY
	LDA.w $6004,y
	AND.w #$FE00
	ORA.b $00
	STA.w $6004,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	LDA.w $6004,y
	AND.w #$FE00
	ORA.b $00
	STA.w $6004,y
	SEP.b #$10
CODE_07EF97:
	RTS

CODE_07EF98:
	LDY.w $7D36,x
	DEY
	BEQ.b CODE_07EFD1
	BMI.b CODE_07EFD1
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07EFD1
	LDA.w $7D38,y
	BEQ.b CODE_07EFD1
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_03B56E
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	JSL.l CODE_07F06B
	PLY
	PLA
CODE_07EFD1:
	RTL

CODE_07EFD2:
	LDA.w !RAM_YI_Global_ColorMathSelectAndEnable
	AND.w #$FF7F
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.l $702D6C
	STA.l YI_Global_PaletteMirror[$00].LowByte
	LDA.b $76,x
	STA.w !RAM_YI_Global_MainScreenLayers
	RTS

CODE_07EFE9:
	LDA.w $7A38,x
	BNE.b CODE_07F009
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0010
	CMP.w $70E2,x
	BPL.b CODE_07F026
	CLC
	ADC.w #$00D0
	CMP.w $70E2,x
	BMI.b CODE_07F026
	LDA.w #$0001
	STA.w $7A38,x
CODE_07F009:
	LDA.w !RAM_YI_Level_NorSpr_FireLakituActiveFlagLo
	BEQ.b CODE_07F026
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0010
	CMP.w $70E2,x
	BPL.b CODE_07F023
	CLC
	ADC.w #$00D0
	CMP.w $70E2,x
	BPL.b CODE_07F026
CODE_07F023:
	STA.w $70E2,x
CODE_07F026:
	RTS

CODE_07F027:
	LDA.w $7680,x
	CLC
	ADC.w #$0030
	CMP.w #$0150
	BCS.b CODE_07F03D
	LDA.w $7682,x
	CLC
	ADC.w #$0030
	CMP.w #$0150
CODE_07F03D:
	RTS

YI_NorSpr166_ThunderLakitu_StompRt:
;$07F03E
	LDA.w $7A36,x
	TAX
	JMP.w (DATA_07F045,x)

DATA_07F045:
	dw CODE_07F04B
	dw CODE_07F08D
	dw CODE_07F0C7

CODE_07F04B:
	LDX.b $12
	LDA.w #$011C
	JSL.l CODE_03A34C
	BCC.b CODE_07F06B
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,y
	TXA
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
CODE_07F06B:
	JSR.w CODE_07EFD2
	LDA.w #$0005
	STA.w $7402,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.w $7A36,x
	INC.w $7A36,x
	RTL

CODE_07F08D:
	LDX.b $12
	LDA.w $7680,x
	CLC
	ADC.w #$0050
	CMP.w #$0190
	BCS.b CODE_07F0A7
	LDA.w $7682,x
	CLC
	ADC.w #$0050
	CMP.w #$0190
	BCC.b CODE_07F0C2
CODE_07F0A7:
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFFF
	STA.w $74A2,x
	LDA.w #$0280
	STA.w $7A96,x
	INC.w $7A36,x
	INC.w $7A36,x
CODE_07F0C2:
	RTL

DATA_07F0C3:
	dw $FFD0,$0110

CODE_07F0C7:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_07F10B
	LDY.w $0073
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_07F0C3,y
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0030
	STA.w $7182,x
	LDA.w #$0010
	STA.w $7540,x
	STA.w $7542,x
	LDA.w #$0200
	STA.w $75E2,x
	STA.w $75E0,x
	LDA.w #$0005
	STA.w $74A2,x
	STZ.b $16,x
	STZ.w $7402,x
	STZ.w $7A36,x
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F10B:
	RTL

;---------------------------------------------------------------------------

DATA_07F10C:
	db $00,$02,$04,$08

DATA_07F110:
	dw $FFC0,$0040

DATA_07F114:
	dw $FF80,$0080

YI_NorSpr17A_BaronVonZeppelinCarryingCoins_Init:
;$07F118
	LDA.w #$000E
	BRA.b CODE_07F12B

YI_NorSpr179_BaronVonZeppelinCarryingKey_Init:
	JSR.w CODE_07F28B
	LDA.w #$000C
	BRA.b CODE_07F12B

YI_NorSpr178_BaronVonZeppelinCarrying1up_Init:
	JSR.w CODE_07F28B
	LDA.w #$000A
CODE_07F12B:
	STA.w $7A36,x
	LDA.w $7400,x
	STA.b $78,x
	TAY
	STZ.w $7400,x
	BRA.b CODE_07F1AA

YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_Init:
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_550000+$40E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$40E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDA.w #$0008
	BRA.b CODE_07F19E

YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_Init:
	LDA.w #$0014
	BRA.b CODE_07F19E

YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_Init:
	LDA.w #$0012
	BRA.b CODE_07F19E

YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_Init:
	LDA.w #$0010
	BRA.b CODE_07F19E

YI_NorSpr176_BaronVonZeppelinCarryingBandit_Init:
	LDA.w #$0006
	BRA.b CODE_07F19E

YI_NorSpr175_BaronVonZeppelinCarryingBomb_Init:
	LDA.w #$0004
	BRA.b CODE_07F19E

YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_Init:
	LDA.w #$0002
	BRA.b CODE_07F19E

YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_Init:
	LDA.w #$0000
CODE_07F19E:
	STA.w $7A36,x
	LDA.w #$FFFF
	STA.b $78,x
	LDA.w $7400,x
	TAY
CODE_07F1AA:
	LDA.w DATA_07F110,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b $10
	AND.b #$03
	TAY
	LDA.w DATA_07F10C,y
	STA.b $18,x
	REP.b #$20
	LDA.w #$0800
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_Init:
;%07F1CB
	LDA.w #$0018
	STA.w $7A36,x
	LDA.w #$FFFF
	STA.b $78,x
	LDA.w $7400,x
	TAY
	LDA.w DATA_07F114,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b $10
	AND.b #$03
	TAY
	LDA.w DATA_07F10C,y
	STA.b $18,x
	REP.b #$20
	LDA.w #$0800
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_Init:
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_550000+$2080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$2080
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDA.w #$0016
	STA.w $7A36,x
	LDA.w $7400,x
	STA.b $78,x
	TAY
	STZ.w $7400,x
	LDA.w DATA_07F110,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b $10
	AND.b #$03
	TAY
	LDA.w DATA_07F10C,y
	LSR
	STA.b $18,x
	LDA.b $10
	AND.b #$0C
	LSR
	LSR
	TAY
	LDA.w DATA_07F10C,y
	LSR
	STA.b $19,x
	LDA.b $10
	AND.b #$30
	LSR
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_07F10C,y
	LSR
	STA.b $76,x
	LDA.b #$03
	STA.b $77,x
	REP.b #$20
	LDA.w #$0800
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	RTL

CODE_07F28B:
	JSL.l CODE_03D3F8
	BEQ.b CODE_07F296
	PLA
	JML.l CODE_03A31E

CODE_07F296:
	LDA.w $70E2,x
	ASL
	ASL
	ASL
	ASL
	AND.w #$FF00
	STA.b $00
	LDA.w $7182,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	ORA.b $00
	STA.w $7A38,x
	RTS

YI_NorSpr173_BaronVonZeppelinCarryingShyGuy_Main:
YI_NorSpr174_BaronVonZeppelinCarryingNeedlenose_Main:
YI_NorSpr175_BaronVonZeppelinCarryingBomb_Main:
YI_NorSpr176_BaronVonZeppelinCarryingBandit_Main:
;$07F2B2
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0895B9>>16
	LDA.w #FXCODE_0895B9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSR.w CODE_07F9C9
	JSL.l CODE_03AF23
	JSR.w CODE_07F412
	JSR.w CODE_07F746
	JSR.w CODE_07F3DB
	RTL

YI_NorSpr177_BaronVonZeppelinCarryingLargeSpringBall_Main:
;$07F2D1
	JSL.l CODE_03AA52
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0895B9>>16
	LDA.w #FXCODE_0895B9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	JSR.w CODE_07F538
	JSR.w CODE_07F497
	JSR.w CODE_07F3DB
	RTL

YI_NorSpr0CD_BaronVonZeppelinCarryingGiantEgg_Main:
YI_NorSpr17B_BaronVonZeppelinCarryingWatermelon_Main:
YI_NorSpr17C_BaronVonZeppelinCarryingFireWatermelon_Main:
;$07F2F1
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0895B9>>16
	LDA.w #FXCODE_0895B9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSR.w CODE_07F9C9
	JSL.l CODE_03AF23
	JSR.w CODE_07F538
	JSR.w CODE_07F497
	JSR.w CODE_07F3DB
	RTL

YI_NorSpr17D_BaronVonZeppelinCarryingIcyWatermelon_Main:
;$07F310
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0895B9>>16
	LDA.w #FXCODE_0895B9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSR.w CODE_07F9C9
	JSL.l CODE_03AF23
	JSR.w CODE_07F538
	JSR.w CODE_07F497
	JSR.w CODE_07F3DB
	JSL.l CODE_048131
	RTL

YI_NorSpr178_BaronVonZeppelinCarrying1up_Main:
YI_NorSpr179_BaronVonZeppelinCarryingKey_Main:
YI_NorSpr17A_BaronVonZeppelinCarryingCoins_Main:
;$07F333
	LDA.b $78,x
	LSR
	LSR
	ROR
	LSR
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0895B9>>16
	LDA.w #FXCODE_0895B9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSR.w CODE_07F9C9
	JSL.l CODE_03AF23
	LDA.w $7400,x
	BEQ.b CODE_07F35A
	LDA.b $78,x
	EOR.w #$0002
	STA.b $78,x
CODE_07F35A:
	STZ.w $7400,x
	JSR.w CODE_07F538
	JSR.w CODE_07F497
	JSR.w CODE_07F3DB
	RTL

DATA_07F367:
	db $04,$F7,$04,$F3,$00,$E5,$0B,$F8,$0D,$F5,$0C,$E8,$FD,$F9,$FB,$F5
	db $F4

DATA_07F378:
	db $E8,$08,$F8,$09,$F4,$07,$E7,$00,$F8,$FF,$F4,$F9

DATA_07F384:
	db $E7,$04,$F8,$04,$F4,$00

DATA_07F38A:
	db $E6

DATA_07F38B:
	dw DATA_07F38A,DATA_07F384,DATA_07F378

YI_NorSpr17E_BaronVonZeppelinCarryingCrateWith6Stars_Main:
;$07F391
	JSL.l CODE_03AA52
	LDA.w #DATA_07F38B>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $77,x
	DEC
	ASL
	TAY
	LDA.w DATA_07F38B,y
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.b $78,x
	LSR
	LSR
	ROR
	LSR
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0895F4>>16
	LDA.w #FXCODE_0895F4
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.w $7400,x
	BEQ.b CODE_07F3CA
	LDA.b $78,x
	EOR.w #$0002
	STA.b $78,x
CODE_07F3CA:
	STZ.w $7400,x
	JSR.w CODE_07F6E7
	JSR.w CODE_07F582
	JSR.w CODE_07F3DB
	RTL

DATA_07F3D7:
	dw $F800,$0800

CODE_07F3DB:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCC.b CODE_07F3F7
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.w DATA_07F3D7,y
	STA.w $75E2,x
CODE_07F3F7:
	RTS

DATA_07F3F8:
	dw $FFE8,$FFE8,$FFE8,$FFE0,$FFE8,$FFE8,$FFE8,$FFE8
	dw $FFE8,$FFE8,$FFE8,$0000,$FFE0

CODE_07F412:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_07F497
	BEQ.b CODE_07F497
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07F497
	LDA.w $7D38,y
	BEQ.b CODE_07F497
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDY.w $7A36,x
	LDA.w DATA_07F3F8,y
	STA.b $00
	LDA.w #$017F
	JSL.l CODE_03A364
	BCC.b CODE_07F461
	LDA.b $18,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $00
	STA.w $7182,y
	BRA.b CODE_07F487

CODE_07F461:
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.b $00
	CLC
	ADC.w #$0008
	STA.w $7142,y
CODE_07F487:
	LDX.b $12
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	PLA
	JML.l CODE_039F91

CODE_07F497:
	LDA.w $6FA0,x
	AND.w #$0400
	BEQ.b CODE_07F4B3
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_07F4B4
CODE_07F4B3:
	RTS

CODE_07F4B4:
	LDA.w $7BB6,y
	CLC
	ADC.w #$0006
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07F4CA
	EOR.w #$FFFF
	INC
CODE_07F4CA:
	CMP.b $00
	BCS.b CODE_07F4B3
	LDA.w $7BB8,y
	CLC
	ADC.w #$0006
	STA.b $00
	LDA.w $7A36,x
	TAX
	LDA.w DATA_07F3F8,x
	LDX.b $12
	CLC
	ADC.w $7182,x
	CLC
	ADC.w #$0008
	STA.b $04
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_07F4F4
	EOR.w #$FFFF
	INC
CODE_07F4F4:
	CMP.b $00
	BCS.b CODE_07F4B3
	LDA.w $7542,y
	CMP.w #$0040
	BCC.b CODE_07F507
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_07F507:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.b $04
	STA.w $7142,y
	LDA.w $7A36,x
	TAX
	LDA.w DATA_07F7A3,x
	JSR.w (DATA_07F7BD,x)
	PLA
	RTL

CODE_07F538:
	LDY.w $7D36,x
	BPL.b CODE_07F57E
	LDY.w $7A36,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_07F3F8,y
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.b $00
	STA.w $7142,y
	LDY.w $7A36,x
	TYX
	LDA.w DATA_07F7A3,x
	JSR.w (DATA_07F7BD,x)
	PLA
	RTL

CODE_07F57E:
	RTS

DATA_07F57F:
	db $38,$50,$68

CODE_07F582:
	SEP.b #$20
	LDA.b $76,x
	BPL.b CODE_07F592
	LDA.b $19,x
	BPL.b CODE_07F59C
	LDA.b $18,x
	STA.b $76,x
	BRA.b CODE_07F5A4

CODE_07F592:
	LDA.b $19,x
	BPL.b CODE_07F5A8
	LDA.b $18,x
	STA.b $19,x
	BRA.b CODE_07F5A4

CODE_07F59C:
	LDA.b $19,x
	STA.b $76,x
	LDA.b $18,x
	STA.b $19,x
CODE_07F5A4:
	LDA.b #$FF
	STA.b $18,x
CODE_07F5A8:
	STZ.b $03
	LDA.b $77,x
	STA.b $02
	DEC
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_07F38B,y
	STA.b $00
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_07F5CD
	RTS

CODE_07F5CD:
	LDA.w $7BB6,y
	CLC
	ADC.w #$0003
	STA.b $0C
	LDA.w $7BB8,y
	CLC
	ADC.w #$0003
	STA.b $0E
CODE_07F5DF:
	LDA.b ($00)
	AND.w #$00FF
	BIT.w #$0080
	BEQ.b CODE_07F5EC
	ORA.w #$FF00
CODE_07F5EC:
	CLC
	ADC.w $7182,x
	CLC
	ADC.w #$0008
	STA.b $04
	DEC.b $00
	LDA.b ($00)
	AND.w #$00FF
	BIT.w #$0080
	BEQ.b CODE_07F605
	ORA.w #$FF00
CODE_07F605:
	CLC
	ADC.w $70E2,x
	CLC
	ADC.w #$0008
	STA.b $06
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_07F619
	EOR.w #$FFFF
	INC
CODE_07F619:
	CMP.b $0C
	BCC.b CODE_07F620
CODE_07F61D:
	JMP.w CODE_07F6B3

CODE_07F620:
	LDA.b $04
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_07F62C
	EOR.w #$FFFF
	INC
CODE_07F62C:
	CMP.b $0E
	BCS.b CODE_07F61D
	LDA.w $7542,y
	CMP.w #$0040
	BCC.b CODE_07F63F
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_07F63F:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.b $06
	STA.w $70A2,y
	LDA.b $04
	STA.w $7142,y
	LDA.w #$00C0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	DEC.b $77,x
	REP.b #$20
	BNE.b CODE_07F67F
	JSR.w CODE_07F8C9
	BRA.b CODE_07F6B1

CODE_07F67F:
	SEP.b #$20
	LDY.b $77,x
	DEY
	LDA.w $7041,x
	AND.b #$07
	ORA.w DATA_07F57F,y
	STA.w $7041,x
	LDA.b #$FF
	LDY.b $02
	CPY.b #$03
	BNE.b CODE_07F6A5
	STA.b $18,x
	LDA.b $19,x
	PHA
	LDA.b $76,x
	STA.b $19,x
	PLA
	STA.b $76,x
	BRA.b CODE_07F6AF

CODE_07F6A5:
	CPY.b #$02
	BNE.b CODE_07F6AD
	STA.b $19,x
	BRA.b CODE_07F6AF

CODE_07F6AD:
	STA.b $76,x
CODE_07F6AF:
	REP.b #$20
CODE_07F6B1:
	PLA
	RTL

CODE_07F6B3:
	LDA.b $00
	SEC
	SBC.w #$0005
	STA.b $00
	DEC.b $02
	BEQ.b CODE_07F6C2
	JMP.w CODE_07F5DF

CODE_07F6C2:
	RTS

DATA_07F6C3:
	dw $0008

DATA_07F6C5:
	dw $0001,$000F

DATA_07F6C9:
	dw $FFFC,$0014,$0008

DATA_07F6CF:
	dw $FFEE

DATA_07F6D1:
	dw $FFEF,$FFEF

DATA_07F6D5:
	dw $FFF0,$FFF0,$FFEC

DATA_07F6DB:
	dw DATA_07F6C3,DATA_07F6C5,DATA_07F6C9

DATA_07F6E1:
	dw DATA_07F6CF,DATA_07F6D1,DATA_07F6D5

CODE_07F6E7:
	LDY.w $7D36,x
	BPL.b CODE_07F745
	LDY.b $77,x
	DEY
	PHY
	TYA
	ASL
	TAY
	LDA.w DATA_07F6DB,y
	STA.b $0C
	LDA.w DATA_07F6E1,y
	STA.b $0E
	PLY
CODE_07F6FE:
	PHY
	ASL
	AND.w #$00FF
	STA.b $04
	TYA
	ASL
	TAY
	LDA.w $70E2,x
	CLC
	ADC.b ($0C),y
	STA.b $06
	LDA.w $7182,x
	CLC
	ADC.b ($0E),y
	STA.b $08
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.b $06
	STA.w $70A2,y
	LDA.b $08
	STA.w $7142,y
	PLY
	DEY
	BPL.b CODE_07F6FE
	JSR.w CODE_07F8C9
	PLA
	RTL

CODE_07F745:
	RTS

CODE_07F746:
	LDA.w $7680,x
	CMP.w #$00F0
	BCS.b CODE_07F7A2
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_07F7A2
	LDA.w #!Define_YI_SoundID0E_ShellHit4
	JSL.l CODE_0085D2
	LDY.w $7A36,x
	LDA.w DATA_07F3F8,y
	STA.b $00
	LDA.w #$017F
	JSL.l CODE_03A364
	BCC.b CODE_07F796
	LDA.b $18,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $00
	STA.w $7182,y
CODE_07F796:
	LDA.w $7A36,x
	TAX
	LDA.w DATA_07F7A3,x
	JSR.w (DATA_07F7BD,x)
	PLA
	RTL

CODE_07F7A2:
	RTS

DATA_07F7A3:
	dw !Define_YI_NorSpr01E_Shyguy
	dw !Define_YI_NorSpr163_BouncingNeedlenose
	dw !Define_YI_NorSpr060_Bomb
	dw !Define_YI_NorSpr020_Bandit
	dw !Define_YI_NorSpr148_LargeSpringBall
	dw !Define_YI_NorSpr100_Bubbled1up
	dw !Define_YI_NorSpr027_Key
	dw !Define_YI_NorSpr115_Coin
	dw !Define_YI_NorSpr007_Watermelon
	dw !Define_YI_NorSpr009_FireWatermelon
	dw !Define_YI_NorSpr005_IcyWatermelon
	dw !Define_YI_NorSpr10E_CrateWith6Stars
	dw !Define_YI_NorSpr026_BowserFightGiantEgg

DATA_07F7BD:
	dw CODE_07F7D7
	dw CODE_07F857
	dw CODE_07F808
	dw CODE_07F82C
	dw CODE_07F982
	dw CODE_07F974
	dw CODE_07F86D
	dw CODE_07F908
	dw CODE_07F8A6
	dw CODE_07F8A6
	dw CODE_07F8A6
	dw CODE_07F8C9
	dw CODE_07F9AD

CODE_07F7D7:
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #$0004
	STA.b $16,x
	LDA.w $7042,x
	ORA.w #$0002
	STA.w $7042,x
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F807
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F807:
	RTS

CODE_07F808:
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #$0001
	STA.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F82B
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F82B:
	RTS

CODE_07F82C:
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0017
	STA.w $7402,y
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F856
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F856:
	RTS

CODE_07F857:
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F86C
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F86C:
	RTS

CODE_07F86D:
	LDX.b $12
	PHA
	LDA.w $7A38,x
	PHA
	AND.w #$FF00
	LSR
	LSR
	LSR
	LSR
	STA.b $00
	PLA
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.b $02
	TXY
	PLA
	JSL.l CODE_03A377
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F8A5
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F8A5:
	RTS

CODE_07F8A6:
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	JSL.l CODE_048066
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F8C8
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F8C8:
	RTS

CODE_07F8C9:
	LDX.b $12
	JSL.l CODE_03AEFD
	TXY
	LDA.w #!Define_YI_NorSpr10E_CrateWith6Stars
	JSL.l CODE_03A377
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
	LDA.w #$0001
	STA.b $16,x
	PHB
	LDY.b #YI_NorSpr003_CrateWithKey_Init>>16
	PHY
	PLB
	JSL.l YI_NorSpr003_CrateWithKey_Init
	PLB
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTS

DATA_07F900:
	dw $0100,$0080,$FF00,$FE80

CODE_07F908:
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	JSL.l CODE_04C968
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F931
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F931:
	LDA.w #$0006
	STA.b $00
CODE_07F936:
	JSL.l CODE_008408
	LDY.b $00
	LDA.w DATA_07F900,y
	STA.b $02
	LDA.w #$0115
	JSL.l CODE_03A34C
	BCC.b CODE_07F973
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $10
	AND.w #$00FF
	CLC
	ADC.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $10
	AND.w #$01FF
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	DEC.b $00
	DEC.b $00
	BPL.b CODE_07F936
CODE_07F973:
	RTS

CODE_07F974:
	LDX.b $12
	JSL.l CODE_03A496
	JSR.w CODE_07FB0A
	JSL.l CODE_03A32E
	RTS

CODE_07F982:
	LDX.b $12
	PHA
	JSL.l CODE_03AEFD
	PLA
	TXY
	JSL.l CODE_03A377
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	ORA.w #$0001
	STA.w $7182,x
	PHB
	LDY.b #YI_NorSpr06C_LargeSpringBall_Init>>16
	PHY
	PLB
	JSL.l YI_NorSpr06C_LargeSpringBall_Init
	PLB
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTS

CODE_07F9AD:
	LDX.b $12
	TXY
	JSL.l CODE_03A377
	LDA.w #$0040
	STA.w $7542,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_07F9C8
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_07F9C8:
	RTS

CODE_07F9C9:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BEQ.b CODE_07F9D2
	RTS

CODE_07F9D2:
	LDA.w $7A36,x
	TAX
	LDA.w DATA_07F7A3,x
	JMP.w (DATA_07F9DC,x)

DATA_07F9DC:
	dw CODE_07F9F9
	dw CODE_07FA2C
	dw CODE_07FA2C
	dw CODE_07F9F6
	dw CODE_07F9F6
	dw CODE_07FABE
	dw CODE_07F9F6
	dw CODE_07FA6F
	dw CODE_07FA2C
	dw CODE_07FA2C
	dw CODE_07FA2C
	dw CODE_07F9F6
	dw CODE_07FA16

CODE_07F9F6:
	LDX.b $12
	RTS

CODE_07F9F9:
	PHA
	TXA
	ASL
	TAX
	LDY.b $12
	PLA
	JSL.l CODE_03A377
	TXY
	LDX.b $12
	LDA.w $7042,x
	ORA.w #$0002
	STA.w $7042,x
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_07FA3A

CODE_07FA16:
	PHA
	TXA
	ASL
	TAX
	LDY.b $12
	PLA
	JSL.l CODE_03A377
	TXY
	LDX.b $12
	LDA.w #$0040
	STA.w $7542,x
	BRA.b CODE_07FA3A

CODE_07FA2C:
	PHA
	TXA
	ASL
	TAX
	LDY.b $12
	PLA
	JSL.l CODE_03A377
	TXY
	LDX.b $12
CODE_07FA3A:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w $7182,x
	CLC
	ADC.w DATA_07F3F8,y
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.b $00
	STA.w $7142,y
	RTS

CODE_07FA6F:
	PHA
	TXA
	ASL
	TAX
	LDY.b $12
	PLA
	JSL.l CODE_03A377
	TXY
	LDX.b $12
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
	STZ.w $6168
	LDA.w $7182,x
	CLC
	ADC.w DATA_07F3F8,y
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.b $00
	STA.w $7142,y
	JMP.w CODE_07F931

CODE_07FABE:
	LDA.w #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
	TXA
	ASL
	TAY
	LDX.b $12
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	STZ.w $6162
	STZ.w $6168
	LDA.w $7182,x
	CLC
	ADC.w DATA_07F3F8,y
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.b $00
	STA.w $7142,y
	JSR.w CODE_07FB0A
	JMP.w CODE_07F974

CODE_07FB0A:
	LDA.w $7A38,x
	PHA
	AND.w #$FF00
	LSR
	LSR
	LSR
	LSR
	STA.b $04
	PLA
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	JSL.l CODE_03D3F3
	RTS

;---------------------------------------------------------------------------

YI_NorSpr17F_BaronVonZeppelin_Init:
;$07FB24
	LDA.w $7400,x
	TAY
	LDA.w DATA_07F110,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b $10
	AND.b #$03
	TAY
	LDA.w DATA_07F10C,y
	STA.b $18,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

YI_NorSpr17F_BaronVonZeppelin_Main:
;$07FB3D
	STZ.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0895B9>>16
	LDA.w #FXCODE_0895B9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_07FB55,x)

DATA_07FB55:
	dw CODE_07FB59
	dw CODE_07FB5F

CODE_07FB59:
	LDX.b $12
	JSR.w CODE_07FB8B
	RTL

CODE_07FB5F:
	LDX.b $12
	JSR.w CODE_07F3DB
	LDA.w $611C
	SEC
	SBC.w #$0008
	STA.w $70E2,x
	LDA.w $7182,x
	CLC
	ADC.w #$0016
	CLC
	ADC.b $78,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $60C4
	EOR.w #$0002
	STA.w $7400,x
	LDA.b $78,x
	BEQ.b CODE_07FB8A
	DEC.b $78,x
CODE_07FB8A:
	RTL

CODE_07FB8B:
	LDY.w $7D36,x
	DEY
	BEQ.b CODE_07FBD2
	BMI.b CODE_07FBD2
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_07FBD2
	LDA.w $7D38,y
	BEQ.b CODE_07FBD2
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	PLA
	JML.l CODE_03A32E

CODE_07FBD2:
	RTS

CODE_07FBD3:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	BNE.b CODE_07FC0C
	LDA.w $6122
	CLC
	ADC.w #$0004
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w #$0016
	SEC
	SBC.w $611E
	CLC
	ADC.b $00
	CMP.b $00
	BCS.b CODE_07FC0C
	STA.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
	PLA
	RTL

CODE_07FC0C:
	RTS

CODE_07FC0D:
	LDA.w $7400,x
	LSR
	LSR
	ROR
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.b $00
	RTL

CODE_07FC1F:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	RTL

CODE_07FC2A:
	LDY.w $7D36,x
	BPL.b CODE_07FC49
CODE_07FC2F:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF6
	BCC.b CODE_07FC4A
	LDA.w $60AA
	BMI.b CODE_07FC46
	SEC
	RTL

CODE_07FC46:
	LDA.w #$0000
CODE_07FC49:
	CLC
CODE_07FC4A:
	RTL

CODE_07FC4B:
	LDY.w $7D36,x
	BPL.b CODE_07FC54
	JSL.l CODE_03A858
CODE_07FC54:
	RTL

CODE_07FC55:
	LDA.w $7182,x
	CMP.w #$0800
	BMI.b CODE_07FC63
	PLY
	PLA
	JML.l CODE_03A31E

CODE_07FC63:
	RTL

CODE_07FC64:
	LDA.w $7680,x
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCS.b CODE_07FC7A
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	CMP.w #$0180
CODE_07FC7A:
	RTL

CODE_07FC7B:
	LDA.w $7860,x
	BIT.w #$0002
	BNE.b CODE_07FCAA
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_07FCAA:
	RTL

DATA_07FCAB:
	dw $0000,$0002,$0004,$0008

CODE_07FCB3:
	LDA.w #$0010
	BRA.b CODE_07FCBB

CODE_07FCB8:
	LDA.w #$0001
CODE_07FCBB:
	STA.b $08
	LDA.b $14
	BIT.w #$0007
	BNE.b CODE_07FCCD
	LDA.w #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	LDA.b $14
CODE_07FCCD:
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_07FCAB,y
	STA.b $06
	LDA.w #!Define_YI_AmbSpr1E2
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.b $08
	STA.w $7782,y
	LDA.w $7002,y
	ORA.b $06
	STA.w $7002,y
	LDA.b $04
	STA.w $7E4C,y
	RTL

CODE_07FCFB:
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_07FD15
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.b $04
	CMP.b $06
CODE_07FD15:
	RTL

CODE_07FD16:
	LDA.w #!Define_YI_AmbSpr1E9
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0022
	STA.w $7002,y
	RTS

CODE_07FD34:
	LDA.w #!Define_YI_AmbSpr211
	BRA.b CODE_07FD3C

CODE_07FD39:
	LDA.w #!Define_YI_AmbSpr210
CODE_07FD3C:
	JSL.l CODE_008B21
	LDA.w $7002,y
	AND.w #$FFF1
	ORA.b $00
	STA.w $7002,y
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.w #$0017
	STA.w $73C2,y
	RTS

CODE_07FD68:
	JSR.w CODE_07FD39
	RTL

CODE_07FD6C:
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	BPL.b CODE_07FD79
	EOR.w #$FFFF
	INC
CODE_07FD79:
	SEC
	SBC.w $7BB6,x
	SEC
	SBC.w $6120
	BPL.b CODE_07FDB5
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	STA.b $00
	BPL.b CODE_07FD92
	EOR.w #$FFFF
	INC
CODE_07FD92:
	SEC
	SBC.w $7BB8,x
	SEC
	SBC.w $6122
	BPL.b CODE_07FDB5
	LDA.b $00
	SEC
	SBC.w $7BB8,x
	SEC
	SBC.w $6122
	CMP.w #$FFF8
	BCS.b CODE_07FDB0
	LDA.w #$0001
	BRA.b CODE_07FDB8

CODE_07FDB0:
	LDA.w $60AA
	BPL.b CODE_07FDBA
CODE_07FDB5:
	LDA.w #$0000
CODE_07FDB8:
	CLC
	RTL

CODE_07FDBA:
	LDA.w #$0001
	SEC
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1A4_KeyholeCork_Init:
;$07FDBF
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w #$0007
	STA.w $7182,x
	JSL.l CODE_03D3F8
	BEQ.b CODE_07FDE0
	JSR.w CODE_07FF25
	JML.l CODE_03A31E

CODE_07FDE0:
	RTL

;---------------------------------------------------------------------------

DATA_07FDE1:
	db $10,$10,$20

YI_NorSpr1A4_KeyholeCork_Main:
;$07FDE4
	JSL.l CODE_03AF23
	JSL.l CODE_03D127
	JSL.l CODE_03D291
	LDA.b $76,x
	BEQ.b CODE_07FE56
	LDA.w $7A96,x
	BNE.b CODE_07FE55
	LDA.b $76,x
	CMP.w #$0003
	BEQ.b CODE_07FE20
	BCS.b CODE_07FE55
	TAY
	LDA.w $7182,x
	SEC
	SBC.w #$0002
	STA.w $7182,x
	LDA.w DATA_07FDE1,y
	AND.w #$00FF
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID40_OpenDoor
	JSL.l CODE_0085D2
	INC.b $76,x
	RTL

CODE_07FE20:
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w #$F800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_AmbSpr21A
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7142,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_07FE55:
	RTL

CODE_07FE56:
	JSR.w CODE_07FEFF
	BNE.b CODE_07FE73
	LDY.w $7D36,x
	BMI.b CODE_07FE63
	JMP.w CODE_07FEE5

CODE_07FE63:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF6
	BCS.b CODE_07FECF
CODE_07FE73:
	LDY.w $7DF6
	BEQ.b CODE_07FEE4
	LDA.w $7DF6,y
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr027_Key
	BNE.b CODE_07FEE4
	TYX
	JSL.l CODE_03BF87
	JSL.l CODE_03A31E
	LDX.b $12
	JSL.l CODE_03D3EB
	JSR.w CODE_07FF25
	LDA.w $7182,x
	SEC
	SBC.w #$0002
	STA.w $7182,x
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID40_OpenDoor
	JSL.l CODE_0085D2
	INC.b $76,x
	RTL

CODE_07FECF:
	LDA.b $18,x
	BNE.b CODE_07FEE4
	LDA.w $60D4
	BEQ.b CODE_07FEE4
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7182,x
	INC.b $18,x
CODE_07FEE4:
	RTL

CODE_07FEE5:
	DEY
	BMI.b CODE_07FEE4
	BEQ.b CODE_07FEE4
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_07FEE4
	LDA.w $7D38,x
	BEQ.b CODE_07FEE4
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	RTL

CODE_07FEFF:
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $02
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$7D24
	RTS

CODE_07FF25:
	JSR.w CODE_07FEFF
	BNE.b CODE_07FF46
	LDA.w #$0001
	STA.w $008F
	LDA.w #$7D22
	STA.w $0095
	LDA.b $00
	STA.w $0091
	LDA.b $02
	STA.w $0093
	JSL.l CODE_109295
	LDX.b $12
CODE_07FF46:
	RTS

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($07FF50, incbin, DATA_07FF50_YI_U2.bin)
else
	%FREE_BYTES($07FF47, 185, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank08Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
	%InsertNextPreCompiledCodeBlock($088000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank09Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
	%InsertNextPreCompiledCodeBlock($098000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank0AMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
	%InsertNextPreCompiledCodeBlock($0A8000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank0BMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
	%InsertNextPreCompiledCodeBlock($0B8000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank0CMacros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_0C8000:
	dw $0000,$FFF9,$FFF3

DATA_0C8006:
	dw $000E,$0015,$001B

YI_NorSpr190_FallingIcicle_Init:
;$0C800C
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFFF
	STA.w $74A2,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr190_FallingIcicle_Main:
;$0C8016
	JSL.l CODE_03AF23
	LDA.w $7402,x
	ASL
	TAY
	LDA.w DATA_0C8000,y
	STA.w $7B58,x
	LDA.w DATA_0C8006,y
	STA.w $7BB8,x
	LDA.b $16,x
	TAX
	JMP.w (DATA_0C8031,x)

DATA_0C8031:
	dw CODE_0C8039
	dw CODE_0C8065
	dw CODE_0C80AD
	dw CODE_0C80DB

CODE_0C8039:
	LDX.b $12
	JSR.w CODE_0C80E4
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_0C8064
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	SEC
	SBC.w #$0020
	BPL.b CODE_0C8064
	LDA.w #$0030
	STA.b $18,x
	INC.b $16,x
	INC.b $16,x
CODE_0C8064:
	RTL

CODE_0C8065:
	LDX.b $12
	JSR.w CODE_0C8133
	LDA.w #!Define_YI_SoundID59_RollingRock
	JSL.l CODE_0085D2
	LDA.w $7402,x
	STA.b $76,x
	INC.b $16,x
	INC.b $16,x
	RTL

DATA_0C807B:
	dw $0000,$FFFF,$0001,$0001,$FFFF,$FFFF,$0001,$0001
	dw $FFFF,$FFFF,$0001,$0001,$FFFF,$FFFF,$0001,$0001
	dw $FFFF,$FFFF,$0001,$0001,$FFFF,$FFFF,$0001,$0001
	dw $FFFF

CODE_0C80AD:
	LDX.b $12
	JSR.w CODE_0C8278
	LDA.w $7A96,x
	BNE.b CODE_0C80CF
	LDY.b $18,x
	BEQ.b CODE_0C80D0
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0C807B,y
	STA.w $70E2,x
	LDA.w #$0001
	STA.w $7A96,x
	DEC.b $18,x
	DEC.b $18,x
CODE_0C80CF:
	RTL

CODE_0C80D0:
	LDA.w #$0040
	STA.w $7542,x
	INC.b $16,x
	INC.b $16,x
	RTL

CODE_0C80DB:
	LDX.b $12
	JSR.w CODE_0C82B4
	JSR.w CODE_0C8278
	RTL

CODE_0C80E4:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$8E00
	BEQ.b CODE_0C811A
	CMP.w #$8E01
	BEQ.b CODE_0C811A
	CMP.w #$8E02
	BEQ.b CODE_0C811A
	PLA
	JML.l CODE_03A32E

CODE_0C811A:
	RTS

DATA_0C811B:
	dw $0000,$0000,$0000,$8D94

DATA_0C8123:
	dw $0000,$0000,$8D94,$799E

DATA_0C812B:
	dw $0000,$8D94,$799F,$799E

CODE_0C8133:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $02
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$8E00
	BNE.b CODE_0C8178
	LDA.w #$0002
	STA.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w #$0020
	STA.w $7182,x
	LDA.w #DATA_0C811B
	STA.b $04
	LDY.b #$06
	JMP.w CODE_0C8235

CODE_0C8178:
	CMP.w #$8E01
	BNE.b CODE_0C81C6
	LDA.w #$0001
	STA.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w #DATA_0C8123
	STA.b $04
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $02
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.b #$06
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$8E00
	BNE.b CODE_0C81BA
	JMP.w CODE_0C8235

CODE_0C81BA:
	LDA.b $02
	CLC
	ADC.w #$0010
	STA.b $02
	DEY
	DEY
	BRA.b CODE_0C8235

CODE_0C81C6:
	CMP.w #$8E02
	BNE.b CODE_0C8230
	LDA.w #$0000
	STA.w $7402,x
	LDA.w #DATA_0C812B
	STA.b $04
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.b #$02
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$799D
	BEQ.b CODE_0C8235
	INY
	INY
	PHY
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.b $02
	SEC
	SBC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	PLY
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$799D
	BEQ.b CODE_0C8235
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.b $02
	INY
	INY
	BRA.b CODE_0C8235

CODE_0C8230:
	PLA
	JML.l CODE_03A32E

CODE_0C8235:
	PHY
	LDA.w $7402,x
	ASL
	TAY
	LDA.w DATA_0C8000,y
	STA.w $7B58,x
	LDA.w DATA_0C8006,y
	STA.w $7BB8,x
	LDA.w #$0005
	STA.w $74A2,x
	PLY
CODE_0C824E:
	LDA.b $00
	STA.w $0091
	LDA.b $02
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.b ($04),y
	STA.w $0095
	PHY
	JSL.l CODE_109295
	PLY
	LDA.b $02
	CLC
	ADC.w #$0010
	STA.b $02
	DEY
	DEY
	BPL.b CODE_0C824E
	LDX.b $12
	RTS

CODE_0C8278:
	LDY.w $7D36,x
	BPL.b CODE_0C8282
	JSL.l CODE_03A858
CODE_0C8281:
	RTS

CODE_0C8282:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHX
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0C8281
	BEQ.b CODE_0C8281
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$000E
	BCC.b CODE_0C8281
	LDA.w $6FA2,y
	BIT.w #$6000
	BNE.b CODE_0C8281
	TYX
	JSL.l CODE_0CFF61
	JSL.l CODE_03B24B
	LDX.b $12
	RTS

CODE_0C82B4:
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0C82BD
	RTS

CODE_0C82BD:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700024,x
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_0C831E
	LDA.l $700020,x
	STA.w $0091
	STA.b $00
	LDA.l $700022,x
	STA.w $0093
	STA.b $02
	LDA.w #$0000
	STA.w $008F
	SEP.b #$10
	JSL.l CODE_109295
	LDA.w #!Define_YI_AmbSpr1C3
	JSL.l CODE_008B21
	LDA.b $00
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.b $02
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$000A
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID66_PotBreaking
	JSL.l CODE_0085D2
	LDX.b $12
	DEC.b $76,x
	BMI.b CODE_0C831E
	RTS

CODE_0C831E:
	SEP.b #$10
	LDX.b $12
	LDA.w #!Define_YI_SoundID66_PotBreaking
	JSL.l CODE_0085D2
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.w $7402,x
	STA.b $02
CODE_0C8337:
	LDA.w #!Define_YI_AmbSpr1F2
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.b $00
	STA.w $7142,y
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.w #$000B
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	DEC.b $02
	BPL.b CODE_0C8337
	PLA
	JML.l CODE_03A32E

;---------------------------------------------------------------------------

YI_NorSpr062_Goomba_Init:
;$0C8364
	JSL.l CODE_0C83DF
	RTL

;---------------------------------------------------------------------------

YI_NorSpr062_Goomba_Main:
;$0C8369
	JSL.l CODE_03AF23
	JSL.l CODE_07E336
	JSL.l CODE_03A5B7
	LDY.b $16,x
	TYX
	JMP.w (DATA_0C837B,x)

DATA_0C837B:
	dw CODE_0C83EE
	dw CODE_0C8425
	dw CODE_0C8450
	dw CODE_0C84E6
	dw CODE_0C856D
	dw CODE_0C84B1

DATA_0C8387:
	db $00,$0F,$10,$00,$08,$00,$08,$00

DATA_0C838F:
	db $20,$00,$00,$04,$04,$04,$04,$20

CODE_0C8397:
	LDA.w #$0004
	STA.b $16,x
	LDA.w #$0007
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_0C8387,y
	STA.w $7402,x
	LDA.w DATA_0C838F,y
	STA.w $7A96,x
	REP.b #$20
	RTL

DATA_0C83B3:
	db $00,$00,$08,$00,$08,$00

DATA_0C83B9:
	db $04,$04,$04,$04,$04,$20

CODE_0C83BF:
	LDA.w #$0002
	STA.b $16,x
	LDA.w #$0005
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_0C83B3,y
	STA.w $7402,x
	LDA.w DATA_0C83B9,y
	STA.w $7A96,x
	REP.b #$20
	RTL

DATA_0C83DB:
	dw $FF00,$0100

CODE_0C83DF:
	STZ.b $16,x
	LDA.w #$0004
	STA.w $7A96,x
	STZ.w $7402,x
	LDY.w $7400,x
	RTL

CODE_0C83EE:
	LDX.b $12
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0C8397
	BIT.w #$000C
	BNE.b CODE_0C83BF
	LDA.w $7A96,x
	BNE.b CODE_0C8416
	LDA.w $7402,x
	INC
	AND.w #$0007
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	RTL

CODE_0C8416:
	CMP.w #$0001
	BNE.b CODE_0C8424
	LDY.w $7400,x
	LDA.w DATA_0C83DB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0C8424:
	RTL

CODE_0C8425:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C844B
	DEC.b $18,x
	BMI.b CODE_0C83DF
	SEP.b #$20
	BNE.b CODE_0C843C
	LDA.w $7400,x
	EOR.b #$02
	STA.w $7400,x
CODE_0C843C:
	LDY.b $18,x
	LDA.w DATA_0C83B3,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	REP.b #$20
CODE_0C844B:
	RTL

DATA_0C844C:
	dw $FFC0,$0040

CODE_0C8450:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C8497
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0C8498
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	DEC.b $18,x
	BPL.b CODE_0C8469
	JMP.w CODE_0C83DF

CODE_0C8469:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_0C8387,y
	STA.w $7402,x
	LDA.w DATA_0C838F,y
	STA.w $7A96,x
	REP.b #$20
	CPY.b #$02
	BNE.b CODE_0C8497
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_0C844C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0C8497:
	RTL

CODE_0C8498:
	LDA.w #$000F
	LDY.w $7223,x
	BMI.b CODE_0C84A3
	LDA.w #$0010
CODE_0C84A3:
	STA.w $7402,x
	RTL

DATA_0C84A7:
	db $00,$09,$0A,$0B,$0C

DATA_0C84AC:
	db $20,$04,$08,$04,$20

CODE_0C84B1:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C84CE
	SEP.b #$20
	DEC.b $18,x
	BMI.b CODE_0C84CF
	LDY.b $18,x
	LDA.w DATA_0C84A7,y
	STA.w $7402,x
	LDA.w DATA_0C84AC,y
	STA.w $7A96,x
	REP.b #$20
CODE_0C84CE:
	RTL

CODE_0C84CF:
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

DATA_0C84E0:
	db $0E,$0D

DATA_0C84E2:
	dw $FF80,$0080

CODE_0C84E6:
	LDX.b $12
	JSL.l CODE_07FC2A
	BEQ.b CODE_0C84F0
	BCS.b CODE_0C84F9
CODE_0C84F0:
	STZ.b $78,x
	LDA.w $7A98,x
	BEQ.b CODE_0C8548
	BRA.b CODE_0C8503

CODE_0C84F9:
	LDA.w #$0100
	STA.w $7A98,x
	LDA.b $78,x
	BEQ.b CODE_0C8527
CODE_0C8503:
	LDA.w $7A96,x
	BNE.b CODE_0C8526
	SEP.b #$20
	LDA.b $18,x
	DEC
	AND.b #$01
	STA.b $18,x
	TAY
	LDA.w DATA_0C84E0,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A96,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID1B_MaceTick
	JSL.l CODE_0085D2
CODE_0C8526:
	RTL

CODE_0C8527:
	INC.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.b $16,x
	LDA.w #$0003
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_0C8565,y
	STA.w $7402,x
	LDA.w DATA_0C8569,y
	STA.w $7A96,x
	REP.b #$20
	RTL

CODE_0C8548:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$04
	STA.b $18,x
	TAY
	LDA.w DATA_0C84A7,y
	STA.w $7402,x
	LDA.w DATA_0C84AC,y
	STA.w $7A96,x
	LDA.b #$0A
	STA.b $16,x
	REP.b #$20
	RTL

DATA_0C8565:
	db $0C,$0B,$0A,$0B

DATA_0C8569:
	db $20,$01,$02,$01

CODE_0C856D:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C858A
	DEC.b $18,x
	BMI.b CODE_0C858B
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_0C8565,y
	STA.w $7402,x
	LDA.w DATA_0C8569,y
	STA.w $7A96,x
	REP.b #$20
CODE_0C858A:
	RTL

CODE_0C858B:
	BRA.b CODE_0C8606

YI_NorSpr062_Goomba_StompRt:
;$0C858D
	LDA.b $76,x
	TAX
	JMP.w (DATA_0C8630,x)

CODE_0C8593:
	LDX.b $12
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_0C8634,y
	STA.w $7402,x
	LDA.w DATA_0C8639,y
	STA.w $7A96,x
	REP.b #$20
	INC.b $76,x
	INC.b $76,x
	RTL

CODE_0C85B3:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C85D0
	DEC.b $18,x
	BMI.b CODE_0C85D1
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_0C8634,y
	STA.w $7402,x
	LDA.w DATA_0C8639,y
	STA.w $7A96,x
	REP.b #$20
CODE_0C85D0:
	RTL

CODE_0C85D1:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.b $76,x
	LDA.w $6FA0,x
	AND.w #$07FF
	ORA.w #$F640
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$F03F
	ORA.w #$0140
	STA.w $6FA2,x
	LDA.w #$000C
	STA.w $7B58,x
	LDA.w #$0005
	STA.w $7BB8,x
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
CODE_0C8606:
	LDA.w #$0100
	STA.w $7A98,x
	LDA.w #$0006
	STA.b $16,x
	LDA.w #$0001
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_0C84E0,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A96,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_0C84E2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

DATA_0C8630:
	dw CODE_0C8593
	dw CODE_0C85B3

;---------------------------------------------------------------------------

DATA_0C8634:
	db $0C,$0B,$0A,$09,$00

DATA_0C8639:
	db $20,$01,$02,$01,$01

YI_NorSpr195_SmallUnstableSnowPlatform_Init:
;$0C863E
	STZ.w $7400,x
	LDA.w $70E2,x
	STA.b $18,x
	STA.w $7B56,x
	STA.w $7A36,x
	LDA.w $7182,x
	STA.w $7B58,x
	STA.w $7A38,x
	CLC
	ADC.w #$0010
	STA.b $76,x
	LDA.w #$0018
	STA.w $7BB6,x
	STZ.w $7BB8,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSL.l CODE_03AE60
	BCC.b CODE_0C86AA
	JSR.w CODE_0C878D
	RTL

;---------------------------------------------------------------------------

YI_NorSpr196_UnstableSnowPlatform_Init:
;$0C8671
	STZ.w $7400,x
	LDA.w $70E2,x
	STA.b $18,x
	STA.w $7B56,x
	STA.w $7A36,x
	LDA.w $7182,x
	STA.w $7A38,x
	CLC
	ADC.w #$0020
	STA.b $76,x
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7B58,x
	LDA.w #$0028
	STA.w $7BB6,x
	LDA.w #$FFF0
	STA.w $7BB8,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSL.l CODE_03ADFE
	BCS.b CODE_0C86B1
CODE_0C86AA:
	STZ.w $61C0
	JML.l CODE_03A31E

CODE_0C86B1:
	JSR.w CODE_0C88A2
	RTL

;---------------------------------------------------------------------------

DATA_0C86B5:
	dw $0010,$0000,$FFF0,$FFE0

YI_NorSpr195_SmallUnstableSnowPlatform_Main:
;$0C86BD
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	JSR.w CODE_0C878D
	LDA.b $16,x
	STA.w $603E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0C8710
	LDA.w $61C0
	BEQ.b CODE_0C870D
	DEC.w $61C0
	DEC
	AND.w #$0001
	ASL
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0C86B5+$02,y
	STA.w $0091
	LDA.w $61C0
	AND.w #$0002
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_0C86B5+$02,y
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$0000
	STA.w $0095
	JSL.l CODE_109295
	BRA.b CODE_0C8731

CODE_0C870D:
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0C8710:
	LDA.b $16,x
	CLC
	ADC.b $78,x
	STA.b $00
	CLC
	ADC.w #$3000
	CMP.w #$6000
	BCS.b CODE_0C8731
	LDA.b $00
	STA.b $16,x
	LDX.b #FXCODE_099F21>>16
	LDA.w #FXCODE_099F21
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	BRA.b CODE_0C8744

CODE_0C8731:
	LDA.w #$FF80
	LDY.b $17,x
	BMI.b CODE_0C873B
	LDA.w #$0080
CODE_0C873B:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_0C8744:
	LDX.b #FXCODE_099D9D>>16
	LDA.w #FXCODE_099D9D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BEQ.b CODE_0C8768
	LDA.w $70E2
	CLC
	ADC.w $72C0,x
	STA.w $70E2
	LDA.w $7182
	CLC
	ADC.w $72C2,x
	STA.w $7182
CODE_0C8768:
	LDX.b #FXCODE_099C0D>>16
	LDA.w #FXCODE_099C0D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BEQ.b CODE_0C878C
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_0C878C:
	RTL

CODE_0C878D:
	REP.b #$10
	LDA.b $16,x
	EOR.w #$FFFF
	INC
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_550000+$2021
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$2021)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

YI_NorSpr196_UnstableSnowPlatform_Main:
;$0C87D1
	JSL.l CODE_03AB1C
	JSL.l CODE_03AF23
	JSR.w CODE_0C88A2
	LDA.b $16,x
	STA.w $603E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0C8825
	LDA.w $61C0
	BEQ.b CODE_0C8822
	DEC.w $61C0
	DEC
	AND.w #$0003
	ASL
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0C86B5,y
	STA.w $0091
	LDA.w $61C0
	AND.w #$000C
	LSR
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_0C86B5,y
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$0000
	STA.w $0095
	JSL.l CODE_109295
	BRA.b CODE_0C8846

CODE_0C8822:
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0C8825:
	LDA.b $16,x
	CLC
	ADC.b $78,x
	STA.b $00
	CLC
	ADC.w #$3000
	CMP.w #$6000
	BCS.b CODE_0C8846
	LDA.b $00
	STA.b $16,x
	LDX.b #FXCODE_099F21>>16
	LDA.w #FXCODE_099F21
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	BRA.b CODE_0C8859

CODE_0C8846:
	LDA.w #$FF80
	LDY.b $17,x
	BMI.b CODE_0C8850
	LDA.w #$0080
CODE_0C8850:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_0C8859:
	LDX.b #FXCODE_099D9D>>16
	LDA.w #FXCODE_099D9D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BEQ.b CODE_0C887D
	LDA.w $70E2
	CLC
	ADC.w $72C0,x
	STA.w $70E2
	LDA.w $7182
	CLC
	ADC.w $72C2,x
	STA.w $7182
CODE_0C887D:
	LDX.b #FXCODE_099C0D>>16
	LDA.w #FXCODE_099C0D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BEQ.b CODE_0C88A1
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_0C88A1:
	RTL

CODE_0C88A2:
	REP.b #$10
	LDA.b $16,x
	EOR.w #$FFFF
	INC
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_550000+$4001
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$4001)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088B47>>16
	LDA.w #FXCODE_088B47
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr199_DizzyDandy_Init:
;$0C88E6
	LDA.w #$0001
	STA.b $76,x
	LDA.w #$0100
	STA.b $78,x
	JSL.l CODE_03AE60
	JMP.w CODE_0C891C

DATA_0C88F7:
	dw FXDATA_550000+$2041,FXDATA_550000+$2041,FXDATA_550000+$2061,FXDATA_550000+$2041,FXDATA_550000+$2061

DATA_0C8901:
	dw (FXDATA_550000+$2041)>>16,(FXDATA_550000+$2041)>>16,(FXDATA_550000+$2061)>>16,(FXDATA_550000+$2041)>>16,(FXDATA_550000+$2061)>>16

YI_NorSpr199_DizzyDandy_Main:
;$0C890B
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	JSR.w CODE_0C8A80
	LDY.b $18,x
	TYX
	JSR.w (DATA_0C8965,x)
CODE_0C891C:
	LDA.w $7400,x
	STA.w $7A36,x
	REP.b #$10
	LDA.b $16,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.b $18,x
	LDA.w DATA_0C88F7,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w DATA_0C8901,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7722,x
	TAX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

DATA_0C8965:
	dw CODE_0C896F
	dw CODE_0C8994
	dw CODE_0C89B5
	dw CODE_0C8A5D
	dw CODE_0C8A13

CODE_0C896F:
	LDX.b $12
	JSR.w CODE_0C8AEC
	JSR.w CODE_0C8B28
CODE_0C8977:
	LDA.b $16,x
	CLC
	ADC.b $76,x
	STA.b $16,x
	CLC
	ADC.w #$000C
	CMP.w #$0018
	BCC.b CODE_0C898F
	LDA.b $76,x
	EOR.w #$FFFF
	INC
	STA.b $76,x
CODE_0C898F:
	RTS

DATA_0C8990:
	dw $FE00,$0200

CODE_0C8994:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0C89B4
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	TAY
	LDA.w DATA_0C8990,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b $18,x
	INY
	INY
	STY.b $18,x
CODE_0C89B4:
	RTS

CODE_0C89B5:
	LDX.b $12
	LDA.w $7400,x
	CMP.w $7A36,x
	BNE.b CODE_0C89E8
	LDA.b $14
	AND.w #$000F
	BNE.b CODE_0C89CD
	LDA.w #!Define_YI_SoundID59_RollingRock
	JSL.l CODE_0085D2
CODE_0C89CD:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0C89D6
	EOR.w #$FFFF
	INC
CODE_0C89D6:
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	CLC
	ADC.b $16,x
	AND.w #$00FF
	STA.b $16,x
	RTS

CODE_0C89E8:
	LDA.w #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	PLA
	JML.l CODE_03A31E

CODE_0C8A13:
	LDX.b $12
	JSR.w CODE_0C8AEC
	JSR.w CODE_0C8B28
	LDA.w $7A98,x
	BNE.b CODE_0C8A2D
	LDA.w #!Define_YI_SoundID3D_MarioKidnapped
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $7A98,x
CODE_0C8A2D:
	LDA.w $7A96,x
	BEQ.b CODE_0C8A4E
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.b $78,x
	SEC
	SBC.w #$0008
	CMP.w #$00C0
	BCS.b CODE_0C8A49
	LDA.w #$0100
CODE_0C8A49:
	STA.b $78,x
	JMP.w CODE_0C8977

CODE_0C8A4E:
	STZ.b $16,x
	LDA.w #$0001
	STA.b $76,x
	LDA.w #$0100
	STA.b $78,x
	JMP.w CODE_0C8B09

CODE_0C8A5D:
	LDX.b $12
	JSR.w CODE_0C8AEC
	LDA.b $78,x
	CLC
	ADC.w #$0004
	CMP.w #$0100
	BCS.b CODE_0C8A70
	STA.b $78,x
	RTS

CODE_0C8A70:
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0100
	STA.b $78,x
	LDY.b #$08
	STY.b $18,x
	RTS

CODE_0C8A80:
	LDY.w $7D36,x
	BPL.b CODE_0C8AA0
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0C8A9B
	JSL.l CODE_03B20B
	BRA.b CODE_0C8A9F

CODE_0C8A9B:
	JSL.l CODE_03A858
CODE_0C8A9F:
	RTS

CODE_0C8AA0:
	LDY.b $18,x
	CPY.b #$02
	BCC.b CODE_0C8A9F
	CPY.b #$05
	BCS.b CODE_0C8A9F
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHX
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0C8A9F
	BEQ.b CODE_0C8A9F
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$000E
	BCC.b CODE_0C8A9F
	LDA.w $6FA2,y
	AND.w #$6000
	BNE.b CODE_0C8A9F
	LDA.w $6FA0,y
	AND.w #$0020
	BNE.b CODE_0C8A9F
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr02C_LungeFish
	BEQ.b CODE_0C8A9F
	TYX
	JSL.l CODE_0CFF61
	JSL.l CODE_03B24B
	LDX.b $12
	RTS

CODE_0C8AEC:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0020
	BPL.b CODE_0C8B27
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_0C8B27
CODE_0C8B09:
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w $6FA2,x
	ORA.w #$0043
	STA.w $6FA2,x
	LDY.b #$02
	STY.b $18,x
	LDA.w #$0100
	STA.b $78,x
CODE_0C8B27:
	RTS

CODE_0C8B28:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0C8B60
	BEQ.b CODE_0C8B60
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0C8B60
	LDA.w $7D38,y
	BEQ.b CODE_0C8B60
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	STZ.b $16,x
	LDY.b #$06
	STY.b $18,x
	LDA.w #$00C0
	STA.b $78,x
	PLA
CODE_0C8B60:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr19A_BooGuy_Init:
;$0C8B61
	JSL.l CODE_0EB8AE
	BEQ.b CODE_0C8B74
	LDA.w $7182,x
	STA.w $7A38,x
	LDA.w #$0004
	STA.w $7B58,x
	RTL

CODE_0C8B74:
	SEP.b #$20
	LDA.b #$01
	STA.w $7A36,x
	LDA.b #$FF
	STA.w $74A2,x
	REP.b #$20
	LDA.w #$0060
	STA.w $6FA0,x
	LDA.w #$2000
	STA.w $6FA2,x
	LDA.w $7040,x
	AND.w #$FE0F
	STA.w $7040,x
	STZ.w $7542,x
	STZ.w $75E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,x
	RTL

;---------------------------------------------------------------------------

DATA_0C8BAB:
	dw $FF80,$0080

YI_NorSpr19A_BooGuy_Main:
;$0C8BAF
	LDY.w $7A36,x
	BEQ.b CODE_0C8BB7
	JMP.w CODE_0C8F5D

CODE_0C8BB7:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0C8BD3
	LDA.w $7D38,x
	BEQ.b CODE_0C8BD3
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
endif
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0180
	CMP.w #$0301
	BCC.b CODE_0C8BD3
	JMP.w CODE_0C8D2F

CODE_0C8BD3:
	JSL.l CODE_03AF23
	LDY.b $16,x
	CPY.b #$04
	BEQ.b CODE_0C8BE5
	JSL.l CODE_03A5B7
	JSL.l CODE_0C8E50
CODE_0C8BE5:
	LDY.b $16,x
	TYX
	JMP.w (DATA_0C8BEB,x)

DATA_0C8BEB:
	dw CODE_0C8BF7
	dw CODE_0C8C15
	dw CODE_0C8C5A
	dw CODE_0C8C7F
	dw CODE_0C8CA0
	dw CODE_0C8CCE

CODE_0C8BF7:
	LDX.b $12
	JSR.w CODE_0C8D19
	LDA.w $7A96,x
	BNE.b CODE_0C8C14
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	INC.b $16,x
	INC.b $16,x
CODE_0C8C14:
	RTL

CODE_0C8C15:
	LDX.b $12
	JSR.w CODE_0C8D19
	LDA.w $7A96,x
	BNE.b CODE_0C8C3B
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_0C8BAB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0C8CE6
CODE_0C8C3A:
	RTL

CODE_0C8C3B:
	LDA.w $7AF6,x
	BNE.b CODE_0C8C3A
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.b $10
	AND.w #$000F
	CLC
	ADC.w #$0010
	STA.w $7AF6,x
	RTL

DATA_0C8C56:
	dw $FF00,$0100

CODE_0C8C5A:
	LDX.b $12
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0003
	JSL.l CODE_0EB8B7
	BEQ.b CODE_0C8C7E
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7A96,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_0C8C7E:
	RTL

CODE_0C8C7F:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C8C9F
	LDA.w #!Define_YI_SoundID77_EnemyJumpingOutOfPipe
	JSL.l CODE_0085D2
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_0C8C9F:
	RTL

CODE_0C8CA0:
	LDX.b $12
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$000F
	JSL.l CODE_0EB8B7
	BEQ.b CODE_0C8CCD
	LDY.w $7400,x
	LDA.w DATA_0C8C56,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_0C8CCD:
	RTL

CODE_0C8CCE:
	LDX.b $12
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0C8CE5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7B58,x
	LDY.b #$00
	STY.b $16,x
CODE_0C8CE5:
	RTL

CODE_0C8CE6:
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_0C8D18
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_0C8D18
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_0C8D18
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0C8D18:
	RTS

CODE_0C8D19:
	LDA.w $7A98,x
	BNE.b CODE_0C8D2E
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0007
	STA.w $7402,x
CODE_0C8D2E:
	RTS

CODE_0C8D2F:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_0C8D3B
	RTL

CODE_0C8D3B:
	LDA.w $7D38,x
	DEC
	BEQ.b CODE_0C8D44
	STA.w $7D38,x
CODE_0C8D44:
	LDY.b $78,x
	TYX
	JMP.w (DATA_0C8D4A,x)

DATA_0C8D4A:
	dw CODE_0C8D6A
	dw CODE_0C8DB6

DATA_0C8D4E:
	dw $0200,$FE00,$0000,$0000,$0000,$0000,$FA00,$FA00
	dw $0000,$0000,$FFF0,$FFF0

DATA_0C8D66:
	dw $1000,$F000

CODE_0C8D6A:
	LDX.b $12
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0C8D75
	INY
	INY
CODE_0C8D75:
	TYA
	EOR.w $7400,x
	TAY
	LDA.w DATA_0C8D66,y
	STA.b $18,x
	STZ.w $7402,x
	LDA.w $6FA2,x
	AND.w #$FCFF
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w #$0008
	STA.w $7B58,x
	LDY.b $78,x
	INY
	INY
	STY.b $78,x
	LDA.w $7722,x
	BMI.b CODE_0C8DAC
	LDA.w $7040,x
	AND.w #$07FC
	ORA.w #$0800
	STA.w $7040,x
	RTL

CODE_0C8DAC:
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	RTL

CODE_0C8DB6:
	LDX.b $12
	LDA.w $7722,x
	BMI.b CODE_0C8DC7
	JSL.l CODE_03AA2E
	JSL.l CODE_0C8E07
	BRA.b CODE_0C8DD3

CODE_0C8DC7:
	LDA.w $7040,x
	AND.w #$07FC
	ORA.w #$1001
	STA.w $7040,x
CODE_0C8DD3:
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0C8DEE
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	ASL
	ROL
	ASL
	TAY
	LDA.w DATA_0C8D4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
CODE_0C8DEE:
	BIT.w #$000C
	BEQ.b CODE_0C8DF7
	JSL.l CODE_0C8F3F
CODE_0C8DF7:
	JSL.l CODE_0C8EDE
	SEP.b #$20
	LDA.b $18,x
	CLC
	ADC.b $19,x
	STA.b $18,x
	REP.b #$20
	RTL

CODE_0C8E07:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0C8E4F
	LDA.w $7722,x
	BMI.b CODE_0C8E4F
	REP.b #$10
	LDA.b $18,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #FXDATA_540000+$5010
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$5010)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7722,x
	TAX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_08867E>>16
	LDA.w #FXCODE_08867E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0C8E4F:
	RTL

CODE_0C8E50:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0C8EB4
	BEQ.b CODE_0C8EB4
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0C8EB4
	LDA.w $7D38,y
	BEQ.b CODE_0C8EB4
	PHY
	JSL.l CODE_03AD24
	BCC.b CODE_0C8E70
	JSL.l CODE_0C8E07
CODE_0C8E70:
	PLY
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $00
	JSR.w CODE_0C8EBF
	BCS.b CODE_0C8E8C
	TYX
	JSL.l CODE_03B24B
	BRA.b CODE_0C8E91

CODE_0C8E8C:
	TYX
	JSL.l CODE_03B25B
CODE_0C8E91:
	LDX.b $12
	LDY.b #$00
	STY.b $78,x
	LDA.w #$0001
	STA.w $7D38,x
	LDY.b $00
	LDA.w DATA_0C8D4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSL.l CODE_0C8D6A
	LDX.b $12
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
	PLY
	PLA
CODE_0C8EB4:
	RTL

DATA_0C8EB5:
	dw !Define_YI_NorSpr19A_BooGuy
	dw !Define_YI_NorSpr01E_Shyguy
	dw !Define_YI_NorSpr133_LanternGhost
	dw !Define_YI_NorSpr12B_FatGuy
	dw !Define_YI_NorSpr0F3_WoozyGuy

CODE_0C8EBF:
	LDX.b #$08
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
CODE_0C8EC4:
	CMP.w DATA_0C8EB5,x
	BEQ.b CODE_0C8ED1
	DEX
	DEX
	BPL.b CODE_0C8EC4
	LDX.b $12
	CLC
	RTS

CODE_0C8ED1:
	LDX.b $12
	SEC
	RTS

DATA_0C8ED5:
	db !Define_YI_SoundID0C_ShellHit2,!Define_YI_SoundID0C_ShellHit2,!Define_YI_SoundID0D_ShellHit3,!Define_YI_SoundID0E_ShellHit4
	db !Define_YI_SoundID0F_ShellHit5,!Define_YI_SoundID10_ShellHit6,!Define_YI_SoundID11_ShellHit7,!Define_YI_SoundID12_ShellHit8
	db !Define_YI_SoundID12_ShellHit8

CODE_0C8EDE:
	LDY.w $7D36,x
	BMI.b CODE_0C8F3F
	PHX
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0C8EB4
	BEQ.b CODE_0C8EB4
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$000E
	BCC.b CODE_0C8EB4
	LDA.w $6FA2,y
	BIT.w #$6000
	BNE.b CODE_0C8EB4
	JSR.w CODE_0C8EBF
	BCS.b CODE_0C8F16
	LDA.w $6FA0,y
	BIT.w #$0020
	BNE.b CODE_0C8EB4
CODE_0C8F16:
	LDA.b $76,x
	CMP.w #$0008
	BCS.b CODE_0C8F21
	INC.b $76,x
	BRA.b CODE_0C8F2A

CODE_0C8F21:
	PHX
	PHY
	TYX
	JSL.l CODE_03A496
	PLY
	PLX
CODE_0C8F2A:
	TYX
	JSL.l CODE_03B25B
	LDX.w $7972
	LDY.b $76,x
	LDA.w DATA_0C8ED5,y
	AND.w #$00FF
	JSL.l CODE_0085D2
CODE_0C8F3E:
	RTL

CODE_0C8F3F:
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E7
	JSL.l CODE_03B56E
	LDA.w #!Define_YI_SoundID0B_ShellHit1
	JSL.l CODE_0085D2
	PLY
	PLA
	JML.l CODE_03A32E

CODE_0C8F5D:
	JSL.l CODE_03AF23
	LDA.w $7A96,x
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	BNE.b CODE_0C8F3E
else
	BNE.b CODE_0C8FE2
endif
	LDX.b #FXCODE_099204>>16
	LDA.w #FXCODE_099204
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0007
	BCS.b CODE_0C8FE2
	LDA.w $7C16,x
	CLC
	ADC.w #$001C
	CMP.w #$0038
	BCS.b CODE_0C8F91
	LDA.w $7C18,x
	CLC
	ADC.w #$0021
	CMP.w #$0042
	BCC.b CODE_0C8FDC
CODE_0C8F91:
	LDA.w #$019A
	JSL.l CODE_03A364
	BCC.b CODE_0C8FE2
	LDA.w $70E2,x
	STA.w $70E2,y
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	STA.w $7CD6,y
endif
	LDA.w $7182,x
	STA.w $7182,y
	STA.w $7A38,y
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	STA.w $7CD8,y
endif
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w $7542,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,y
	SEP.b #$20
	LDA.b #$00
	STA.w $7862,y
	LDA.b #$04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	REP.b #$20
	LDA.w #!Define_YI_SoundID76_EnemyPeekingOutOfPipe
	JSL.l CODE_0085D2
CODE_0C8FDC:
	LDA.w #$0080
	STA.w $7A96,x
CODE_0C8FE2:
	RTL

YI_NorSpr19A_BooGuy_StompRt:
;$0C8FE3
	LDA.w $6FA0,x
	AND.w #$F9FF
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	STZ.w $74A2,x
	LDA.w $7040,x
	AND.w #$FFF3
	ORA.w #$0004
	STA.w $7040,x
	LDA.w $7042,x
	ORA.w #$0080
	LDY.b $16,x
	CPY.b #$06
	BEQ.b CODE_0C9027
	CPY.b #$08
	BEQ.b CODE_0C9027
	ORA.w #$0030
	STA.w $7042,x
CODE_0C9026:
	RTL

CODE_0C9027:
	STA.w $7042,x
	LDA.w $7182,x
	CMP.w $7A38,x
	BMI.b CODE_0C9026
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

DATA_0C9036:
	dw $0007,$0007,$0006,$0005,$0004,$0003,$0002,$0001
	dw $0000

DATA_0C9048:
	dw $0008,$0008,$0008,$0009,$000A,$000B,$000C,$000D
	dw $000E

YI_NorSpr194_Blargg_Init:
;$0C905A
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	STA.w $7A38,x
	LDA.w #$0008
	STA.w $7B56,x
	LDA.w #$000A
	STA.w $7BB6,x
	LDA.w DATA_0C9036
	STA.w $7B58,x
	LDA.w DATA_0C9048
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr194_Blargg_Main:
;$0C9080
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_0C908A,x)

DATA_0C908A:
	dw CODE_0C9092
	dw CODE_0C915E
	dw CODE_0C921B
	dw CODE_0C9263

CODE_0C9092:
	LDX.b $12
	JSL.l CODE_03A5B7
	JSL.l CODE_0C910B
	JSL.l CODE_0C9284
	LDA.b $18,x
	TAX
	JSR.w (DATA_0C90A7,x)
	RTL

DATA_0C90A7:
	dw CODE_0C90AB
	dw CODE_0C90C3

CODE_0C90AB:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C90C2
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w #$0004
	STA.w $7A98,x
	INC.b $18,x
	INC.b $18,x
CODE_0C90C2:
	RTS

CODE_0C90C3:
	LDX.b $12
	LDA.w $7A96,x
	BEQ.b CODE_0C90ED
	LDA.w $7A98,x
	BNE.b CODE_0C90EC
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	ASL
	TAY
	LDA.w DATA_0C9036,y
	STA.w $7B58,x
	LDA.w DATA_0C9048,y
	STA.w $7BB8,x
CODE_0C90EC:
	RTS

CODE_0C90ED:
	STZ.w $7402,x
	LDA.w DATA_0C9036
	STA.w $7B58,x
	LDA.w DATA_0C9048
	STA.w $7BB8,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	STZ.b $18,x
	RTS

CODE_0C910B:
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_0C915D
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0020
	CMP.w #$0080
	BCS.b CODE_0C915D
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	LDA.w DATA_0C9036
	STA.w $7B58,x
	LDA.w DATA_0C9048
	STA.w $7BB8,x
	STZ.b $18,x
	INC.b $16,x
	INC.b $16,x
	PLY
	PLA
CODE_0C915D:
	RTL

CODE_0C915E:
	LDX.b $12
	JSL.l CODE_03A5B7
	JSL.l CODE_0C92D0
	LDA.b $18,x
	TAX
	JMP.w (DATA_0C916E,x)

DATA_0C916E:
	dw CODE_0C9176
	dw CODE_0C91EE

DATA_0C9172:
	dw $FF00,$0100

CODE_0C9176:
	LDX.b $12
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	CMP.w $7182,x
	BPL.b CODE_0C91D1
	STA.w $7182,x
	LDA.w #$FEA0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDY.w $7400,x
	LDA.w DATA_0C9172,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID48_LargeBlockLands
	JSL.l CODE_0085D2
	LDA.w #$000D
	STA.b $76,x
	SEP.b #$20
	TAY
	LDA.w DATA_0C91E0,y
	STA.w $7A96,x
	LDA.w DATA_0C91D2,y
	STA.w $7402,x
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_0C9036,y
	STA.w $7B58,x
	LDA.w DATA_0C9048,y
	STA.w $7BB8,x
	INC.b $18,x
	INC.b $18,x
CODE_0C91D1:
	RTL

DATA_0C91D2:
	db $02,$03,$04,$05,$06,$07,$08,$07,$06,$05,$04,$03,$02,$00

DATA_0C91E0:
	db $02,$02,$02,$02,$02,$02,$18,$02,$02,$02,$02,$02,$02,$10

CODE_0C91EE:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C9219
	DEC.b $76,x
	BMI.b CODE_0C921A
	SEP.b #$20
	LDY.b $76,x
	LDA.w DATA_0C91E0,y
	STA.w $7A96,x
	LDA.w DATA_0C91D2,y
	STA.w $7402,x
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_0C9036,y
	STA.w $7B58,x
	LDA.w DATA_0C9048,y
	STA.w $7BB8,x
CODE_0C9219:
	RTL

CODE_0C921A:
	RTL

CODE_0C921B:
	LDX.b $12
	LDA.b $18,x
	BEQ.b CODE_0C9236
	LDA.w $7A96,x
	BNE.b CODE_0C9235
	DEC.w $7182,x
	LDA.w $7182,x
	CMP.w $7A38,x
	BNE.b CODE_0C9235
	STZ.b $16,x
	STZ.b $18,x
CODE_0C9235:
	RTL

CODE_0C9236:
	LDA.w $7A38,x
	CLC
	ADC.w #$0020
	CMP.w $7182,x
	BPL.b CODE_0C9262
	STA.w $7182,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	LDA.w DATA_0C9036
	STA.w $7B58,x
	LDA.w DATA_0C9048
	STA.w $7BB8,x
	LDA.w #$0080
	STA.w $7A96,x
	INC.b $18,x
CODE_0C9262:
	RTL

CODE_0C9263:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C9283
	LDA.w $7402,x
	CMP.w #$0001
	BEQ.b CODE_0C9283
	BCS.b CODE_0C9279
	LDA.w #$0001
	BRA.b CODE_0C927A

CODE_0C9279:
	DEC
CODE_0C927A:
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
CODE_0C9283:
	RTL

CODE_0C9284:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0C92CF
	BEQ.b CODE_0C92CF
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0C92CF
	LDA.w $7D38,y
	BEQ.b CODE_0C92CF
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	LDA.w #$0001
	STA.w $7402,x
	ASL
	TAY
	LDA.w DATA_0C9036,y
	STA.w $7B58,x
	LDA.w DATA_0C9048,y
	STA.w $7BB8,x
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
	LDA.w #$0004
	STA.b $16,x
	PLY
	PLA
CODE_0C92CF:
	RTL

CODE_0C92D0:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0C9305
	BEQ.b CODE_0C9305
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0C9305
	LDA.w $7D38,y
	BEQ.b CODE_0C9305
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7542,x
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w #$0006
	STA.b $16,x
	PLY
	PLA
CODE_0C9305:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr184_Bumpty_Init:
;$0C9306
	JSL.l CODE_02A007
	JSR.w CODE_0C9497
	RTL

;---------------------------------------------------------------------------

YI_NorSpr184_Bumpty_Main:
;$0C930E
	JSL.l CODE_03AF23
	JSR.w CODE_0C9613
	LDA.b $16,x
	TAX
	JMP.w (DATA_0C931B,x)

DATA_0C931B:
	dw CODE_0C9323
	dw CODE_0C9379
	dw CODE_0C93EF
	dw CODE_0C9408

CODE_0C9323:
	LDX.b $12
	LDA.w $7A38,x
	BEQ.b CODE_0C9345
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0C9338
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0C9344
CODE_0C9338:
	STZ.w $7A38,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0C9497
CODE_0C9344:
	RTL

CODE_0C9345:
	JSR.w CODE_0C9364
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_0C935C
	BIT.w #$0001
	BEQ.b CODE_0C935C
	LDA.b $18,x
	TAX
	JSR.w (DATA_0C9360,x)
	RTL

CODE_0C935C:
	JSR.w CODE_0C9497
	RTL

DATA_0C9360:
	dw CODE_0C9583
	dw CODE_0C9487

CODE_0C9364:
	LDY.w $61CC
	BNE.b CODE_0C936E
	LDA.w $61B2
	BEQ.b CODE_0C936F
CODE_0C936E:
	RTS

CODE_0C936F:
	LDA.w #$0002
	STA.b $16,x
	JSR.w CODE_0C95CB
	PLA
	RTL

CODE_0C9379:
	LDX.b $12
	JSR.w CODE_0C93CE
	JSR.w CODE_0C96CF
	BCS.b CODE_0C93C3
	JSL.l CODE_06BE72
	LDA.w #$0004
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0006
	STA.w $7402,x
	LDA.b $00
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.w $7400,x
	STZ.b $18,x
	LDA.b $00
	BPL.b CODE_0C93AA
	EOR.w #$FFFF
	INC
CODE_0C93AA:
	ASL
	ASL
	ASL
	ASL
	LDY.b $01
	BPL.b CODE_0C93B6
	EOR.w #$FFFF
	INC
CODE_0C93B6:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w $7860
	AND.w #$FFFE
	STA.w $7860
	RTL

CODE_0C93C3:
	LDA.b $18,x
	TAX
	JSR.w CODE_0C94DA
	RTL

UNK_0C93CA:
	dw CODE_0C95CB
	dw CODE_0C94DA

CODE_0C93CE:
	LDA.w $61CC
	ORA.w $61B2
	BNE.b CODE_0C93D7
	RTS

CODE_0C93D7:
	LDA.w #$0000
	STA.b $16,x
	LDA.b $76,x
	BNE.b CODE_0C93E5
	JSR.w CODE_0C9497
	BRA.b CODE_0C93ED

CODE_0C93E5:
	LDA.w #$0002
	STA.b $18,x
	JSR.w CODE_0C9597
CODE_0C93ED:
	PLA
	RTL

CODE_0C93EF:
	LDX.b $12
	JSR.w CODE_0C93FF
	LDA.b $18,x
	TAX
	JSR.w (DATA_0C93FB,x)
	RTL

DATA_0C93FB:
	dw CODE_0C9414
	dw CODE_0C944A

CODE_0C93FF:
	LDA.w $61B2
	CMP.w #$4000
	BNE.b CODE_0C93D7
	RTS

CODE_0C9408:
	LDX.b $12
	JSR.w CODE_0C93FF
	JSR.w CODE_0C96BE
	JSR.w CODE_0C955C
	RTL

CODE_0C9414:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BMI.b CODE_0C9449
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	JSR.w CODE_0C96BE
	INC.b $18,x
	INC.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0010
	STA.w $7A96,x
	LDA.w #$0006
	STA.w $7402,x
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w #$0008
	STA.w $7AF6,x
CODE_0C9449:
	RTS

CODE_0C944A:
	LDX.b $12
	JSR.w CODE_0C96BE
	LDA.w $7A96,x
	BNE.b CODE_0C9468
	LDA.w #$0006
	STA.b $16,x
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	JMP.w CODE_0C95DB

CODE_0C9468:
	LDA.w $7AF6,x
	BNE.b CODE_0C9482
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w #$0008
	STA.w $7AF6,x
CODE_0C9482:
	RTS

DATA_0C9483:
	dw $FF80,$0080

CODE_0C9487:
	LDX.b $12
	LDA.w #DATA_0C9483
	STA.b $78,x
	LDA.b $76,x
	BNE.b CODE_0C950B
	LDA.w $7A96,x
	BNE.b CODE_0C94BB
CODE_0C9497:
	STZ.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	LDA.w #$0006
	STA.w $7402,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0008
	STA.w $7AF6,x
	RTS

CODE_0C94BB:
	LDA.w $7AF6,x
	BNE.b CODE_0C94D1
	DEC.w $7402,x
	BPL.b CODE_0C94D1
CODE_0C94C5:
	LDA.w #$0005
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7AF6,x
CODE_0C94D1:
	RTS

DATA_0C94D2:
	dw $FF00,$0100

DATA_0C94D6:
	dw $FE00,$0200

CODE_0C94DA:
	LDX.b $12
	LDA.w #DATA_0C94D6
	STA.b $78,x
	LDA.b $76,x
	BNE.b CODE_0C950B
	JSR.w CODE_0C969E
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6
	STA.b $00
	LDA.w $7400,x
	DEC
	EOR.b $00
	BMI.b CODE_0C94BB
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0C94D2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0C94BB

CODE_0C950B:
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0C9530
	BIT.w #$000C
	BEQ.b CODE_0C9521
	LDY.w $7400,x
	LDA.w DATA_0C94D2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0C9521:
	LDA.w #$0007
	LDY.w $7223,x
	BMI.b CODE_0C952C
	LDA.w #$0008
CODE_0C952C:
	STA.w $7402,x
	RTS

CODE_0C9530:
	LDA.b $76,x
	CMP.w #$0001
	BNE.b CODE_0C9545
	LDA.w #$0009
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7AF6,x
	INC.b $76,x
CODE_0C9545:
	LDA.w $7AF6,x
	BNE.b CODE_0C955B
	LDY.w $7400,x
	LDA.b $78,x
	STA.b $00
	LDA.b ($00),y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	JMP.w CODE_0C94C5

CODE_0C955B:
	RTS

CODE_0C955C:
	LDX.b $12
	LDA.w #DATA_0C94D6
	STA.b $78,x
	LDA.b $76,x
	BNE.b CODE_0C950B
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_0C9577
	BIT.w #$0001
	BEQ.b CODE_0C9580
	JMP.w CODE_0C94BB

CODE_0C9577:
	LDY.w $7400,x
	LDA.w DATA_0C94D6,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0C9580:
	JMP.w CODE_0C95DB

CODE_0C9583:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C95B0
	INC.b $18,x
	INC.b $18,x
	LDY.w $7400,x
	LDA.w DATA_0C9483,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0C9597:
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	LDA.w #$0005
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7AF6,x
	RTS

CODE_0C95B0:
	LDA.w $7AF6,x
	BNE.b CODE_0C95CA
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0008
	STA.w $7AF6,x
CODE_0C95CA:
	RTS

CODE_0C95CB:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.w $7400,x
CODE_0C95DB:
	LDA.w #$0001
	STA.b $76,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	RTS

CODE_0C95F0:
	LDA.w $7AF6,x
	BNE.b CODE_0C960A
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0008
	STA.w $7AF6,x
CODE_0C960A:
	RTS

DATA_0C960B:
	dw $FD00,$0300

DATA_0C960F:
	dw $0180,$0060

CODE_0C9613:
	LDY.w $7D36,x
	BMI.b CODE_0C9621
	CPX.w $61B6
	BNE.b CODE_0C960A
	STZ.w $61B6
	RTS

CODE_0C9621:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BEQ.b CODE_0C962B
	PLA
	JML.l CODE_03B25B

CODE_0C962B:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0C964C
	LDA.w $60AA
	BMI.b CODE_0C95CA
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	JSL.l CODE_03B20B
	RTS

CODE_0C964C:
	LDA.w $60AA
	BPL.b CODE_0C965B
	STZ.w $60AA
	STZ.w $60C0
	STZ.w $60D2
	RTS

CODE_0C965B:
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDY.w $77C2,x
	LDA.w $60FC
	AND.w DATA_0C960F,y
	BNE.b CODE_0C9676
	LDA.w DATA_0C960B,y
	STA.w $60A8
	STA.w $60B4
CODE_0C9676:
	LDA.b $16,x
	CMP.w #$0000
	BNE.b CODE_0C9699
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	TAY
	LDA.w DATA_0C969A,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w #$0001
	STA.w $7A38,x
CODE_0C9699:
	RTS

DATA_0C969A:
	dw $0100,$FF00

CODE_0C969E:
	LDY.w $7400,x
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0C96AE
	LDA.w DATA_0C94D2,y
	BRA.b CODE_0C96B6

CODE_0C96AE:
	BIT.w #$0001
	BNE.b CODE_0C96BD
	LDA.w DATA_0C94D6,y
CODE_0C96B6:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	JMP.w CODE_0C95DB

CODE_0C96BD:
	RTS

CODE_0C96BE:
	LDA.w $70E2,x
	STA.w $70E2
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182
	RTS

CODE_0C96CF:
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6
	STA.b $04
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6
	STA.b $00
	BPL.b CODE_0C96E7
	EOR.w #$FFFF
	INC
CODE_0C96E7:
	CMP.b $04
	BCS.b CODE_0C9705
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8
	STA.b $04
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8
	STA.b $02
	BPL.b CODE_0C9703
	EOR.w #$FFFF
	INC
CODE_0C9703:
	CMP.b $04
CODE_0C9705:
	RTS

;---------------------------------------------------------------------------

DATA_0C9706:
	dw $FE58,$01A8

YI_NorSpr19B_TacklingBumpty_Init:
;$0C970A
	LDA.w $7400,x
	STA.b $76,x
	TAY
	LDA.w DATA_0C9706,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7A98,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr19B_TacklingBumpty_Main:
;$0C971D
	JSL.l CODE_03AF23
	JSL.l CODE_0C9926
	LDA.b $16,x
	TAX
	JMP.w (DATA_0C972B,x)

DATA_0C972B:
	dw CODE_0C9737
	dw CODE_0C9797
	dw CODE_0C9845
	dw CODE_0C98BA
	dw CODE_0C97F5
	dw CODE_0C98E8

CODE_0C9737:
	LDX.b $12
	JSR.w CODE_0C990C
	LDA.b $18,x
	BNE.b CODE_0C9771
	LDA.w $7A96,x
	BNE.b CODE_0C975F
	LDA.w $7A98,x
	BEQ.b CODE_0C9760
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w $7402,x
	DEC
	CMP.w #$0006
	BCC.b CODE_0C975C
	LDA.w #$0005
CODE_0C975C:
	STA.w $7402,x
CODE_0C975F:
	RTL

CODE_0C9760:
	LDA.w #$0006
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
	INC.b $16,x
	INC.b $16,x
	RTL

CODE_0C9771:
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0C9788
	LDA.w #$0007
	LDY.w $7223,x
	BMI.b CODE_0C9784
	LDA.w #$0008
CODE_0C9784:
	STA.w $7402,x
	RTL

CODE_0C9788:
	LDA.w #$0009
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
	STZ.b $18,x
	RTL

CODE_0C9797:
	LDX.b $12
	JSR.w CODE_0C990C
	LDA.b $18,x
	BNE.b CODE_0C9771
	LDA.w $7A96,x
	BNE.b CODE_0C97B5
	LDA.w $7402,x
	CMP.w #$0006
	BNE.b CODE_0C97B6
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $18,x
CODE_0C97B5:
	RTL

CODE_0C97B6:
	LDA.w #$0006
	STA.b $78,x
	TAY
	LDA.w DATA_0C9836,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0C97CE
	EOR.w #$FFFF
	INC
CODE_0C97CE:
	LSR
	LSR
	AND.w #$0007
	TAY
	LDA.w DATA_0C983D,y
	AND.w #$00FF
	STA.w $7A96,x
	LDA.w #$0004
	STA.w $7540,x
	LDA.w $6FA2,x
	AND.w #$FF3F
	ORA.w #$0080
	STA.w $6FA2,x
	LDA.w #$0004
	STA.b $16,x
	RTL

CODE_0C97F5:
	LDX.b $12
	LDA.b $18,x
	BEQ.b CODE_0C97FE
	JMP.w CODE_0C9771

CODE_0C97FE:
	LDA.w $7A96,x
	BNE.b CODE_0C9818
	DEC.b $78,x
	BMI.b CODE_0C9819
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	STA.b $76,x
CODE_0C9818:
	RTL

CODE_0C9819:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	STA.b $76,x
	TAY
	LDA.w DATA_0C9706,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7A98,x
	STZ.b $78,x
	STZ.b $16,x
	RTL

DATA_0C9836:
	db $0D,$0A,$0B,$0C,$0C,$0B,$0A

DATA_0C983D:
	db $0B,$0A,$09,$08,$07,$06,$05,$04

CODE_0C9845:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0C9897
	LDA.b $76,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0C9897
	LDA.w $7A96,x
	BNE.b CODE_0C9896
	DEC.b $78,x
	BPL.b CODE_0C9862
	LDA.w #$0006
	STA.b $78,x
CODE_0C9862:
	LDY.b $78,x
	LDA.w DATA_0C9836,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$06
	BEQ.b CODE_0C9875
	CPY.b #$03
	BNE.b CODE_0C987E
CODE_0C9875:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0C987E:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0C9887
	EOR.w #$FFFF
	INC
CODE_0C9887:
	LSR
	LSR
	AND.w #$0007
	TAY
	LDA.w DATA_0C983D,y
	AND.w #$00FF
	STA.w $7A96,x
CODE_0C9896:
	RTL

CODE_0C9897:
	LDA.w $6FA2,x
	AND.w #$FF3F
	ORA.w #$0040
	STA.w $6FA2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.b $76,x
	STA.w $7400,x
	LDA.w #$0006
	STA.b $16,x
	RTL

CODE_0C98BA:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C98D5
	LDA.w $7402,x
	CMP.w #$0006
	BEQ.b CODE_0C98D6
	LDA.w #$0006
	STA.w $7402,x
	LDA.w #$0008
	STA.w $7A96,x
CODE_0C98D5:
	RTL

CODE_0C98D6:
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0003
	STA.b $78,x
	INC.b $18,x
	INC.b $16,x
	INC.b $16,x
	RTL

CODE_0C98E8:
	LDX.b $12
	LDY.b #$00
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0C98F6
	LDY.b #$10
CODE_0C98F6:
	TYA
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0C9908
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0C990B
CODE_0C9908:
	JMP.w CODE_0C9897

CODE_0C990B:
	RTL

CODE_0C990C:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0C9919
	LDA.w $7400,x
	STA.b $76,x
CODE_0C9919:
	RTS

DATA_0C991A:
	dw $FD00,$0300

DATA_0C991E:
	dw $0180,$0060

DATA_0C9922:
	dw $0100,$FF00

CODE_0C9926:
	LDY.w $7D36,x
	BMI.b CODE_0C9935
	CPX.w $61B6
	BNE.b CODE_0C9960
	STZ.w $61B6
	BRA.b CODE_0C9960

CODE_0C9935:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BEQ.b CODE_0C9940
	PLY
	PLA
	JML.l CODE_03B25B

CODE_0C9940:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0C9961
	LDA.w $60AA
	BMI.b CODE_0C9960
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	JSL.l CODE_03B20B
CODE_0C9960:
	RTL

CODE_0C9961:
	LDA.w $60AA
	BPL.b CODE_0C9970
	STZ.w $60AA
	STZ.w $60C0
	STZ.w $60D2
	RTL

CODE_0C9970:
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDY.w $77C2,x
	LDA.w $60FC
	AND.w DATA_0C991E,y
	BNE.b CODE_0C998B
	LDA.w DATA_0C991A,y
	STA.w $60A8
	STA.w $60B4
CODE_0C998B:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	STA.b $76,x
	TAY
	LDA.w DATA_0C9922,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000A
	STA.w $7402,x
	LDA.w #$000A
	STA.b $16,x
	RTL

;---------------------------------------------------------------------------

DATA_0C99A9:
	dw $FFE8,$0018

DATA_0C99AD:
	dw $0800,$F800

DATA_0C99B1:
	dw $FF80,$0080

YI_NorSpr19C_FlyingBumpty_Init:
;$0C99B5
	LDA.w $7182,x
	STA.w $7A36,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	LDA.w DATA_0C99AD
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w $70E2,x
	BIT.w #$0010
	BNE.b CODE_0C99FB
	STA.w $7A38,x
	STZ.b $16,x
	LDY.w $7400,x
	CLC
	ADC.w DATA_0C99A9,y
	STA.w $70E2,x
	LDA.w DATA_0C99AD,y
	STA.w $75E0,x
	LDA.w #$0002
	STA.w $7540,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	RTL

CODE_0C99FB:
	LDA.w #$0002
	STA.b $16,x
	LDY.w $7400,x
	LDA.w DATA_0C99B1,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr19C_FlyingBumpty_Main:
;$0C9A13
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0C9A23
	LDA.w #!Define_YI_NorSpr184_Bumpty
	TXY
	JML.l CODE_03A377

CODE_0C9A23:
	JSL.l CODE_03AF23
	JSL.l CODE_0C9B02
	LDY.b #$00
	LDA.w $7182,x
	CMP.w $7A36,x
	BMI.b CODE_0C9A37
	INY
	INY
CODE_0C9A37:
	LDA.w DATA_0C99AD,y
	STA.w $75E2,x
	LDA.b $16,x
	TAX
	JMP.w (DATA_0C9A43,x)

DATA_0C9A43:
	dw CODE_0C9A47
	dw CODE_0C9A97

CODE_0C9A47:
	LDX.b $12
	LDY.b #$00
	LDA.w $70E2,x
	CMP.w $7A38,x
	BMI.b CODE_0C9A55
	INY
	INY
CODE_0C9A55:
	LDA.w DATA_0C99AD,y
	STA.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_0C9A81
	LDA.w #$0000
	STA.w $7402,x
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0C9A7F
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0C9A7F:
	BRA.b CODE_0C9A96

CODE_0C9A81:
	LDY.b #$00
	LDA.w $7400,x
	DEC
	EOR.w $75E0,x
	BPL.b CODE_0C9A8E
	INY
	INY
CODE_0C9A8E:
	LDA.w DATA_0C9ADF,y
	STA.b $00
	JSR.w CODE_0C9AE7
CODE_0C9A96:
	RTL

CODE_0C9A97:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0C9AA7
	LDA.w DATA_0C9ADF
	STA.b $00
	JSR.w CODE_0C9AE7
	RTL

CODE_0C9AA7:
	LDA.w $7A96,x
	BNE.b CODE_0C9ADE
	SEP.b #$20
	LDA.b #$00
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A96,x
	INC.b $77,x
	REP.b #$20
	LDY.b $77,x
	CPY.b #$02
	BNE.b CODE_0C9ACB
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0C9ACB:
	CPY.b #$03
	BCC.b CODE_0C9ADE
	SEP.b #$20
	STZ.b $77,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_0C99B1,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0C9ADE:
	RTL

DATA_0C9ADF:
	dw DATA_0C9AE3,DATA_0C9AE5

DATA_0C9AE3:
	db $01,$02

DATA_0C9AE5:
	db $03,$04

CODE_0C9AE7:
	LDA.w $7A96,x
	BNE.b CODE_0C9B01
	SEP.b #$20
	LDA.b $76,x
	EOR.b #$01
	STA.b $76,x
	TAY
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b #$03
	STA.w $7A96,x
	REP.b #$20
CODE_0C9B01:
	RTS

CODE_0C9B02:
	LDY.w $7D36,x
	BMI.b CODE_0C9B11
	CPX.w $61B6
	BNE.b CODE_0C9B3C
	STZ.w $61B6
	BRA.b CODE_0C9B3C

CODE_0C9B11:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BEQ.b CODE_0C9B1C
	PLY
	PLA
	JML.l CODE_03B25B

CODE_0C9B1C:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0C9B3D
	LDA.w $60AA
	BMI.b CODE_0C9B3C
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	JSL.l CODE_03B20B
CODE_0C9B3C:
	RTL

CODE_0C9B3D:
	LDA.w $60AA
	BPL.b CODE_0C9B4C
	STZ.w $60AA
	STZ.w $60C0
	STZ.w $60D2
	RTL

CODE_0C9B4C:
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDY.w $77C2,x
	LDA.w $60FC
	AND.w DATA_0C991E,y
	BNE.b CODE_0C9B67
	LDA.w DATA_0C991A,y
	STA.w $60A8
	STA.w $60B4
CODE_0C9B67:
	RTL


;---------------------------------------------------------------------------

DATA_0C9B68:
	dw $FF00,$0100

YI_NorSpr19D_SkeletonGoonie_Init:
;$0C9B6C
	LDY.w $7400,x
	LDA.w DATA_0C9B68,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$0008
	STA.w $7402,x
	ASL
	TAY
	LDA.w DATA_0C9BBC,y
	STA.w $7CD8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr19D_SkeletonGoonie_Main:
;$0C9B8A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0C9BA6
	LDA.w #!Define_YI_AmbSpr216
	STA.b $06
	LDA.w #$0000
	JSL.l CODE_0C9C8A
	LDA.w #!Define_YI_NorSpr19E_WinglessSkeletonGoonie
	TXY
	JML.l CODE_03A377

CODE_0C9BA6:
	JSL.l CODE_03AF23
	JSL.l CODE_07E336
	JSL.l CODE_03A5B7
	JSR.w CODE_0C9C23
	JSR.w CODE_0C9BF2
	JSR.w CODE_0C9BCE
	RTL

DATA_0C9BBC:
	dw $0008,$0007,$0007,$0006,$0006,$0007,$0007,$0008
	dw $0008

CODE_0C9BCE:
	LDA.w $7A96,x
	BNE.b CODE_0C9BF1
	SEP.b #$20
	DEC.w $7402,x
	BPL.b CODE_0C9BDF
	LDA.b #$08
	STA.w $7402,x
CODE_0C9BDF:
	LDA.b #$04
	STA.w $7A96,x
	LDA.w $7402,x
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_0C9BBC,y
	STA.w $7CD8,x
CODE_0C9BF1:
	RTS

CODE_0C9BF2:
	LDA.w $7A98,x
	BNE.b CODE_0C9C22
	LDA.w #!Define_YI_AmbSpr215
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$FFFF
	STA.w $7782,y
	LDA.w #$00C0
	STA.w $7E8E,y
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A98,x
CODE_0C9C22:
	RTS

CODE_0C9C23:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0C9C47
	BEQ.b CODE_0C9C47
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0C9C47
	LDA.w $7D38,y
	BEQ.b CODE_0C9C47
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLA
	RTL

CODE_0C9C47:
	RTS

YI_NorSpr19D_SkeletonGoonie_StompRt:
;$0C9C48
	JSL.l CODE_0C9C7B
	LDA.w #!Define_YI_NorSpr19E_WinglessSkeletonGoonie
	TXY
	JSL.l CODE_03A377
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

DATA_0C9C5B:
	dw $FE80,$FF00,$FF80,$0000,$0080,$0100,$0180,$0200

DATA_0C9C6B:
	dw $FC00,$FC80,$FD00,$FD80,$FE00,$FE80,$FF00,$FF80

CODE_0C9C7B:
	LDA.w #!Define_YI_AmbSpr216
CODE_0C9C7E:
	STA.b $06
	LDA.w #!Define_YI_SoundID07_GoonieLoseWings
	JSL.l CODE_0085D2
	LDA.w #$0004
CODE_0C9C8A:
	STA.b $00
CODE_0C9C8C:
	LDA.b $10
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_0C9C5B,y
	STA.b $02
	LDA.b $10
	AND.w #$0038
	LSR
	LSR
	TAY
	LDA.w DATA_0C9C6B,y
	STA.b $04
	LDA.b $06
	JSL.l CODE_008B21
	LDA.w #$0040
	STA.w $7782,y
	LDA.w #$0002
	STA.w $7E8E,y
	LDA.w #$0003
	STA.w $73C2,y
	STA.w $7E4C,y
	LDA.w $7CD6,x
	SEC
	SBC.w #$0004
	STA.w $70A2,y
	LDA.w $7CD8,x
	SEC
	SBC.w #$0004
	STA.w $7142,y
	LDA.w #$0020
	STA.w $7502,y
	LDA.w #$0200
	STA.w $75A2,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	JSL.l CODE_008408
	DEC.b $00
	BPL.b CODE_0C9C8C
	RTL

;---------------------------------------------------------------------------

YI_NorSpr19E_WinglessSkeletonGoonie_Init:
;$0C9CF3
	LDA.w #$0002
	STA.b $16,x
	RTL

;---------------------------------------------------------------------------

DATA_0C9CF9:
	dw $FE00,$0200

YI_NorSpr19E_WinglessSkeletonGoonie_Main:
;$0C9CFD
	JSL.l CODE_03AF23
	JSL.l CODE_03A5B7
	LDY.b $16,x
	TYX
	JMP.w (DATA_0C9D0B,x)

DATA_0C9D0B:
	dw CODE_0C9D11
	dw CODE_0C9D26
	dw CODE_0C9D3B

CODE_0C9D11:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0C9D25
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $16,x
	INC.b $16,x
CODE_0C9D25:
	RTL

CODE_0C9D26:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C9D3A
	LDY.w $7400,x
	LDA.w DATA_0C9CF9,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
CODE_0C9D3A:
	RTL

CODE_0C9D3B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0C9D55
	SEP.b #$20
	DEC.w $7402,x
	BPL.b CODE_0C9D4E
	LDA.b #$02
	STA.w $7402,x
CODE_0C9D4E:
	LDA.b #$02
	STA.w $7A96,x
	REP.b #$20
CODE_0C9D55:
	RTL

;---------------------------------------------------------------------------

DATA_0C9D56:
	dw $0001,$FFFF

DATA_0C9D5A:
	dw $0010,$000F,$000E,$000D,$000D,$000E,$000F,$0010
	dw $0011

YI_NorSpr19F_SkeletonGoonieCarryingBomb_Init:
;$0C9D6C
	LDY.w $7400,x
	LDA.w DATA_0C9B68,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$0008
	STA.w $7402,x
	ASL
	TAY
	LDA.w DATA_0C9BBC,y
	STA.w $7CD8,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_0C9D5A,y
	STA.b $02
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0C9D56,y
	STA.b $00
	LDA.w #$0060
	JSL.l CODE_03A364
	BCC.b CODE_0C9DEC
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0030
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$7F
	STA.w $7863,y
	LDA.b #$00
	STA.w $7862,y
	REP.b #$20
	TYA
	STA.w $7A36,x
	RTL

;---------------------------------------------------------------------------

CODE_0C9DEC:
	LDA.w #!Define_YI_NorSpr19D_SkeletonGoonie
	TXY
	JML.l CODE_03A377

YI_NorSpr19F_SkeletonGoonieCarryingBomb_Main:
;$0C9DF4
	JSR.w CODE_0C9F9D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0C9E34
	LDY.w $7A36,x
	LDA.w $6FA2,y
	ORA.w #$001B
	STA.w $6FA2,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #!Define_YI_AmbSpr216
	STA.b $06
	LDA.w #$0000
	JSL.l CODE_0C9C8A
	LDA.w #!Define_YI_NorSpr19E_WinglessSkeletonGoonie
	TXY
	JML.l CODE_03A377

CODE_0C9E34:
	CMP.w #$0010
	BNE.b CODE_0C9E3E
	LDA.w $7D96,x
	BEQ.b CODE_0C9E74
CODE_0C9E3E:
	LDY.w $7A36,x
	LDA.w $6FA2,y
	ORA.w #$001B
	STA.w $6FA2,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #!Define_YI_NorSpr19D_SkeletonGoonie
	TXY
	JSL.l CODE_03A377
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	RTL

CODE_0C9E74:
	JSL.l CODE_03AF23
	JSR.w CODE_0C9F76
	LDY.w $7D36,x
	BPL.b CODE_0C9EC2
	LDA.w $60D4
	BEQ.b CODE_0C9EC2
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0C9EC2
	LDY.w $7A36,x
	LDA.w $6FA2,y
	ORA.w #$001B
	STA.w $6FA2,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	JSL.l CODE_0C9C7B
	JSL.l CODE_0CFF61
	JML.l CODE_03B273

CODE_0C9EC2:
	JSL.l CODE_03A5B7
	JSR.w CODE_0C9EFE
	JSR.w CODE_0C9C23
	JSR.w CODE_0C9BF2
	JSR.w CODE_0C9BCE
	JSR.w CODE_0C9ED6
	RTL

CODE_0C9ED6:
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0C9D56,y
	STA.b $00
	LDA.w $7402,x
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_0C9D5A,y
	STA.b $02
	LDY.w $7A36,x
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
	RTS

CODE_0C9EFE:
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	BMI.b CODE_0C9F0C
	CMP.w #$0010
	BPL.b CODE_0C9F75
CODE_0C9F0C:
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0C9F75
	LDY.w $7A36,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $6FA2,y
	ORA.w #$001B
	STA.w $6FA2,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w $7402,x
	STA.b $00
	LDA.w $7A96,x
	STA.b $02
	LDA.w $7A98,x
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $06
	LDA.w #!Define_YI_NorSpr19D_SkeletonGoonie
	TXY
	JSL.l CODE_03A377
	LDA.b $06
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $04
	STA.w $7A98,x
	LDA.b $02
	STA.w $7A96,x
	LDA.b $00
	STA.w $7402,x
	PLA
	RTL

CODE_0C9F75:
	RTS

CODE_0C9F76:
	JSL.l CODE_03A2F8
	BCC.b CODE_0C9F9C
	LDY.w $7A36,x
	CPY.b #$60
	BCS.b CODE_0C9F9A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0C9F9A
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr060_Bomb
	BNE.b CODE_0C9F9A
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
CODE_0C9F9A:
	PLA
	RTL

CODE_0C9F9C:
	RTS

CODE_0C9F9D:
	LDY.w $7A36,x
	CPY.b #$60
	BCS.b CODE_0C9FB4
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0C9FB4
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr060_Bomb
	BEQ.b CODE_0C9F9C
CODE_0C9FB4:
	LDA.w $7402,x
	PHA
	LDA.w $7A96,x
	PHA
	LDA.w $7A98,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w #!Define_YI_NorSpr19D_SkeletonGoonie
	TXY
	JSL.l CODE_03A377
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	STA.w $7A98,x
	PLA
	STA.w $7A96,x
	PLA
	STA.w $7402,x
	PLA
	RTL

YI_NorSpr19F_SkeletonGoonieCarryingBomb_StompRt:
;$0C9FDE
	LDY.w $7A36,x
	LDA.w $6FA2,y
	ORA.w #$001B
	STA.w $6FA2,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	JSL.l CODE_0C9C7B
	LDA.w #!Define_YI_NorSpr19E_WinglessSkeletonGoonie
	TXY
	JSL.l CODE_03A377
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_0CA003:
	dw $4202,$0202,$4200,$0200

DATA_0CA00B:
	dw $FF00,$0100

YI_NorSpr1A0_DoubleFirebar_Init:
YI_NorSpr1A1_Firebar_Init:
;$0CA00F
	STZ.w $7400,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_0CA00B,y
	STA.b $78,x
	LDA.w $70E2,x
	CLC
	ADC.w #$FFF8
	STA.w $70E2,x
	LDA.w #$FFB8
	STA.b $18,x
	LDA.w #$0003
	STA.b $76,x
	LDA.w #$0006
	STA.w $7A96,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1A0_DoubleFirebar_Main:
YI_NorSpr1A1_Firebar_Main:
;$0CA03C
	LDA.w #DATA_0CA003>>16
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #DATA_0CA003
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0896DF>>16
	LDA.w #FXCODE_0896DF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BPL.b CODE_0CA060
	JSL.l CODE_03A858
CODE_0CA060:
	LDA.b $16,x
	CLC
	ADC.b $78,x
	STA.b $16,x
	LDA.w $7A96,x
	BNE.b CODE_0CA07D
	SEP.b #$20
	DEC.b $76,x
	BPL.b CODE_0CA076
	LDA.b #$03
	STA.b $76,x
CODE_0CA076:
	LDA.b #$06
	STA.w $7A96,x
	REP.b #$20
CODE_0CA07D:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr02F_LittleMouserHole_Init:
;$0CA07E
	STZ.w $7400,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr02F_LittleMouserHole_Main:
;$0CA082
	JSL.l CODE_03AF23
	RTL

;---------------------------------------------------------------------------

YI_NorSpr032_PeekingLittleMouser_Init:
;$0CA087
	STZ.w $7400,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.b $16,x
	TAX
	JMP.w (DATA_0CA099,x)

DATA_0CA099:
	dw CODE_0CA119
	dw CODE_0CA09D

CODE_0CA09D:
	LDX.b $12
	LDA.w #$0008
	STA.w $7402,x
	LDA.w $7182,x
	STA.b $78,x
	SEC
	SBC.w #$0018
	STA.w $7A36,x
	JMP.w CODE_0CA20F

YI_NorSpr032_PeekingLittleMouser_Main:
;$0CA0B4
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_0CA0BE,x)

DATA_0CA0BE:
	dw CODE_0CA0F0
	dw CODE_0CA143

DATA_0CA0C2:
	dw DATA_0CA0CA,DATA_0CA0DA

DATA_0CA0C6:
	dw DATA_0CA0D2,DATA_0CA0E3

DATA_0CA0CA:
	db $02,$01,$02,$01,$02,$01,$02,$00

DATA_0CA0D2:
	db $02,$40,$04,$10,$04,$20,$04,$40

DATA_0CA0DA:
	db $02,$05,$06,$05,$02,$03,$04,$03,$01

DATA_0CA0E3:
	db $02,$02,$10,$02,$02,$02,$10,$02,$40

DATA_0CA0EC:
	dw $0007,$0008

CODE_0CA0F0:
	LDX.b $12
	LDA.b $18,x
	TAY
	LDA.w DATA_0CA0C2,y
	STA.b $00
	LDA.w DATA_0CA0C6,y
	STA.b $02
	LDA.w $7A96,x
	BNE.b CODE_0CA118
	DEC.b $76,x
	BMI.b CODE_0CA11B
	SEP.b #$20
	LDY.b $76,x
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b ($02),y
	STA.w $7A96,x
	REP.b #$20
CODE_0CA118:
	RTL

CODE_0CA119:
	LDX.b $12
CODE_0CA11B:
	LDA.b $10
	AND.w #$0001
	ASL
	STA.b $18,x
	TAY
	LDA.w DATA_0CA0C2,y
	STA.b $00
	LDA.w DATA_0CA0C6,y
	STA.b $02
	LDA.w DATA_0CA0EC,y
	STA.b $76,x
	TAY
	SEP.b #$20
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b ($02),y
	STA.w $7A96,x
	REP.b #$20
	RTL

CODE_0CA143:
	LDX.b $12
	LDA.b $18,x
	TAX
	JMP.w (DATA_0CA14B,x)

DATA_0CA14B:
	dw CODE_0CA155
	dw CODE_0CA197
	dw CODE_0CA1D4
	dw CODE_0CA1E6
	dw CODE_0CA208

CODE_0CA155:
	LDX.b $12
	LDA.w $7A36,x
	CMP.w $7182,x
	BMI.b CODE_0CA177
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$0003
	BEQ.b CODE_0CA178
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0004
	STA.b $18,x
CODE_0CA177:
	RTL

CODE_0CA178:
	LDA.w #$0006
	STA.b $76,x
	INC.b $18,x
	INC.b $18,x
	RTL

DATA_0CA182:
	db $08,$07,$08,$07,$08,$07,$08

DATA_0CA189:
	db $02,$10,$30,$10,$02,$20,$02

DATA_0CA190:
	db $00,$01,$00,$01,$00,$01,$00

CODE_0CA197:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CA1C4
	DEC.b $76,x
	BMI.b CODE_0CA1C5
	SEP.b #$20
	LDY.b $76,x
	LDA.w DATA_0CA182,y
	STA.w $7402,x
	LDA.w DATA_0CA189,y
	STA.w $7A96,x
	LDA.w DATA_0CA190,y
	BEQ.b CODE_0CA1C2
	LDA.b $10
	AND.b #$01
	ASL
	EOR.w $7400,x
	STA.w $7400,x
CODE_0CA1C2:
	REP.b #$20
CODE_0CA1C4:
	RTL

CODE_0CA1C5:
	STZ.w $7400,x
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0006
	STA.b $18,x
	RTL

CODE_0CA1D4:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CA1E5
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $18,x
	INC.b $18,x
CODE_0CA1E5:
	RTL

CODE_0CA1E6:
	LDX.b $12
	LDA.w $7182,x
	CMP.b $78,x
	BMI.b CODE_0CA207
	LDA.b $78,x
	STA.w $7182,x
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $18,x
	INC.b $18,x
CODE_0CA207:
	RTL

CODE_0CA208:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CA217
CODE_0CA20F:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
CODE_0CA217:
	RTL

;---------------------------------------------------------------------------

DATA_0CA218:
	dw $FE80,$0180

YI_NorSpr030_LittleMouser_Init:
;$0CA21C
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0CA24F
CODE_0CA221:
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b #$02
	STA.b $18,x
	TAY
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
	LDA.w #$0020
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FFFF
	STA.b $76,x
	RTL

CODE_0CA24F:
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	PHA
	LDA.b #$02
	STA.b $18,x
	TAY
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
	LDA.w #$0020
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLY
	DEY
	BNE.b CODE_0CA289
	LDA.w #$FFFF
	STA.b $76,x
	RTL

CODE_0CA289:
	LDA.w #$0025
	JSL.l CODE_03A364
	BCC.b CODE_0CA221
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDA.w #$0001
	STA.w $7A36,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	TYA
	STA.b $76,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr030_LittleMouser_Main:
;$0CA2C7
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_0CA2F7
	LDY.b $76,x
	BMI.b CODE_0CA2F7
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CA2F7
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_0CA2F7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_0CA2F7
	LDA.w $6FA2,y
	ORA.w #$0001
	STA.w $6FA2,y
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
CODE_0CA2F7:
	JSL.l CODE_03AF23
	JSL.l CODE_03A2F8
	BCC.b CODE_0CA322
	LDY.b $76,x
	BMI.b CODE_0CA321
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CA321
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CA321
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_0CA321
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
CODE_0CA321:
	RTL

CODE_0CA322:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	BNE.b CODE_0CA375
	LDA.b $16,x
	CMP.w #$0006
	BCC.b CODE_0CA334
	CMP.w #$0009
	BCC.b CODE_0CA34D
CODE_0CA334:
	LDA.b $16,x
	CMP.w #$000A
	BCC.b CODE_0CA340
	CMP.w #$000F
	BCC.b CODE_0CA34D
CODE_0CA340:
	JSR.w CODE_0CA8C2
	LDA.b $16,x
	CMP.w #$0004
	BEQ.b CODE_0CA34D
	JSR.w CODE_0CA867
CODE_0CA34D:
	LDA.b $16,x
	CMP.w #$0008
	BEQ.b CODE_0CA36A
	CMP.w #$0006
	BEQ.b CODE_0CA36A
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0CA36A
	LDA.b $16,x
	STA.b $78,x
	LDA.w #$0008
	STA.b $16,x
CODE_0CA36A:
	LDA.b $16,x
	TAX
	JSR.w (DATA_0CA420,x)
	JSL.l CODE_03A5B7
	RTL

CODE_0CA375:
	LDY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CA396
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CA396
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_0CA396
	LDA.w $7D38,y
	BNE.b CODE_0CA396
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BEQ.b CODE_0CA3C7
CODE_0CA396:
	LDA.w #$FFFF
	STA.b $76,x
	STZ.w $7A36,x
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	PHY
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	PLY
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	LDA.w $6FA2,x
	JSR.w CODE_0CA50F
	BRA.b CODE_0CA41B

CODE_0CA3C7:
	LDA.w #$0002
	STA.w $7A36,x
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_0CA415
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_0CA415
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0480
	STA.w $6FA2,x
	JSR.w CODE_0CA7BF
CODE_0CA415:
	LDA.b $16,x
	TAX
	JSR.w (DATA_0CA420,x)
CODE_0CA41B:
	JSL.l CODE_03A5B7
	RTL

DATA_0CA420:
	dw CODE_0CA433
	dw CODE_0CA475
	dw CODE_0CA4CC
	dw CODE_0CA534
	dw CODE_0CA572
	dw CODE_0CA5DD
	dw CODE_0CA70A
	dw CODE_0CA7D9

DATA_0CA430:
	db $04,$03,$02

CODE_0CA433:
	LDX.b $12
	LDA.w $7A96,x
	BEQ.b CODE_0CA43D
	JMP.w CODE_0CA6EB

CODE_0CA43D:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$02
	STA.b $18,x
	TAY
	LDA.w DATA_0CA46F,y
	STA.w $7402,x
	LDA.b $10
	AND.b #$03
	INC
	STA.b $19,x
	LDA.b $10
	LSR
	LSR
	AND.b #$07
	CLC
	ADC.b #$02
	STA.w $7A96,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	LDA.w #$0002
	STA.b $16,x
	RTS

DATA_0CA46F:
	db $00,$01,$00

DATA_0CA472:
	db $02,$00,$00

CODE_0CA475:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CA4A7
	SEP.b #$20
	DEC.b $18,x
	BPL.b CODE_0CA48A
	DEC.b $19,x
	BMI.b CODE_0CA4A8
	LDA.b #$02
	STA.b $18,x
CODE_0CA48A:
	LDY.b $18,x
	LDA.w DATA_0CA46F,y
	STA.w $7402,x
	LDA.w $7400,x
	EOR.w DATA_0CA472,y
	STA.w $7400,x
	LDA.b $10
	AND.b #$1F
	CLC
	ADC.b #$02
	STA.w $7A96,x
	REP.b #$20
CODE_0CA4A7:
	RTS

CODE_0CA4A8:
	LDA.b #$02
	STA.b $18,x
	TAY
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
	LDA.w #$0020
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $16,x
	RTS

CODE_0CA4CC:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0CA4EF
CODE_0CA4D6:
	STZ.w $7402,x
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #$0001
	STA.w $7A36,x
	LDA.b $16,x
	STA.b $78,x
	LDA.w #$0006
	STA.b $16,x
	RTS

CODE_0CA4EF:
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_0CA50F
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0070
	CMP.w #$00E0
	BCC.b CODE_0CA51E
CODE_0CA50F:
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0140
	STA.w $6FA2,x
	JMP.w CODE_0CA43D

CODE_0CA51E:
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JMP.w CODE_0CA6EB

CODE_0CA534:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CA555
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
CODE_0CA555:
	LDA.w $7A36,x
	DEC
	BEQ.b CODE_0CA56D
	LDY.b $76,x
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
CODE_0CA56D:
	RTS

DATA_0CA56E:
	dw $FF00,$0100

CODE_0CA572:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0CA5D5
	LDY.b #$19
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCC.b CODE_0CA5A8
	LDY.b #$18
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CA5A8
	LDY.b #$1A
	CMP.w #$0100
	BCC.b CODE_0CA5A8
	LDY.b #$1B
	CMP.w #$0180
	BCC.b CODE_0CA5A8
	LDY.b #$1C
	CMP.w #$0200
	BCC.b CODE_0CA5A8
	LDY.b #$1D
CODE_0CA5A8:
	TYA
	STA.w $7402,x
	LDA.w $7A36,x
	BEQ.b CODE_0CA5D4
	DEC
	BEQ.b CODE_0CA5C6
	LDY.b $76,x
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
CODE_0CA5C6:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0CA5D4
	LDY.w $7400,x
	LDA.w DATA_0CA56E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CA5D4:
	RTS

CODE_0CA5D5:
	STZ.w $7A36,x
	LDA.b $78,x
	STA.b $16,x
	RTS

CODE_0CA5DD:
	LDX.b $12
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0CA616
	BEQ.b CODE_0CA616
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CA616
	LDA.w $7D38,y
	BNE.b CODE_0CA616
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CA616
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_0CA616
	LDA.w $7A36,y
	BNE.b CODE_0CA616
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D7|!EXRAMBankMirror,y
	BMI.b CODE_0CA616
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $02
	BRA.b CODE_0CA692

CODE_0CA616:
	LDA.w #$0022
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #$0026
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_099FA5>>16
	LDA.w #FXCODE_099FA5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_0CA651
	PHY
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	PLY
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	JMP.w CODE_0CA50F

CODE_0CA651:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0CA65C
	JMP.w CODE_0CA4D6

CODE_0CA65C:
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $02
	BPL.b CODE_0CA674
	EOR.w #$FFFF
	INC
CODE_0CA674:
	CMP.b $00
	BCS.b CODE_0CA6D4
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CA68E
	EOR.w #$FFFF
	INC
CODE_0CA68E:
	CMP.b $00
	BCS.b CODE_0CA6C2
CODE_0CA692:
	TYX
	JSL.l CODE_03BF87
	TXY
	LDX.b $12
	LDA.w #$000C
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	TYA
	STA.b $76,x
	LDA.w $7860,y
	AND.w #$FFFE
	STA.w $7860,y
	LDA.b $02
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	PLA
	RTL

CODE_0CA6C2:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	PLA
	RTL

CODE_0CA6D4:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.w $7400,x
	TAY
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CA6EB:
	LDA.w $7A98,x
	BNE.b CODE_0CA709
	SEP.b #$20
	DEC.b $18,x
	BPL.b CODE_0CA6FA
	LDA.b #$02
	STA.b $18,x
CODE_0CA6FA:
	LDY.b $18,x
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
CODE_0CA709:
	RTS

CODE_0CA70A:
	LDX.b $12
	LDY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CA732
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CA732
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_0CA732
	LDA.w $7D38,y
	BNE.b CODE_0CA732
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_0CA732
	LDA.w $7A36,y
	BEQ.b CODE_0CA752
CODE_0CA732:
	LDA.w #$FFFF
	STA.b $76,x
	PHY
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	PLY
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	JMP.w CODE_0CA50F

CODE_0CA752:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0CA78D
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	STA.b $02
	BPL.b CODE_0CA76F
	EOR.w #$FFFF
	INC
CODE_0CA76F:
	CMP.b $00
	BCS.b CODE_0CA78D
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CA789
	EOR.w #$FFFF
	INC
CODE_0CA789:
	CMP.b $00
	BCC.b CODE_0CA78E
CODE_0CA78D:
	RTS

CODE_0CA78E:
	LDA.w $6FA2,y
	AND.w #$FFE0
	STA.w $6FA2,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDA.w #$0001
	STA.w $7A36,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
CODE_0CA7BF:
	LDA.w #$000E
	STA.b $16,x
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	RTL

CODE_0CA7D9:
	LDX.b $12
	LDY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CA7FC
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CA7FC
	CMP.w #!Define_YI_NorSpr026_BowserFightGiantEgg
	BCS.b CODE_0CA7FC
	LDA.w $7D38,y
	BNE.b CODE_0CA7FC
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BEQ.b CODE_0CA81F
CODE_0CA7FC:
	LDA.w #$FFFF
	STA.b $76,x
	STZ.w $7A36,x
	PHY
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	PLY
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	JMP.w CODE_0CA50F

CODE_0CA81F:
	LDA.w #$0002
	STA.w $7A36,x
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0CA851
	STZ.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.b $16,x
	STA.b $78,x
	LDA.w #$0006
	STA.b $16,x
	PLA
	RTL

CODE_0CA851:
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JMP.w CODE_0CA6EB

CODE_0CA867:
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_0CA887
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCC.b CODE_0CA888
CODE_0CA887:
	RTS

CODE_0CA888:
	SEP.b #$20
	LDA.b #$02
	STA.b $18,x
	TAY
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0480
	STA.w $6FA2,x
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $16,x
	PLA
	RTL

CODE_0CA8C2:
	LDA.w #$0022
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #$0026
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_099FA5>>16
	LDA.w #FXCODE_099FA5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_0CA8E3
	RTS

CODE_0CA8E3:
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0480
	STA.w $6FA2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHY
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	PLY
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.w $7400,x
	LDA.w #$000A
	STA.b $16,x
	PLA
	RTL

;---------------------------------------------------------------------------

YI_NorSpr033_LittleMouserExitingNest_Init:
;$0CA918
	STZ.w $7400,x
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$03
	BEQ.b CODE_0CA946
	LDA.w $6FA2,x
	ORA.w #$0141
	STA.w $6FA2,x
	LDA.w #$0004
	STA.b $16,x
	SEP.b #$20
	LDA.b #$02
	STA.b $19,x
	TAY
	LDA.w DATA_0CAF00,y
	STA.w $7402,x
	LDA.w DATA_0CAF03,y
	STA.w $7A96,x
	REP.b #$20
	RTL

CODE_0CA946:
	LDA.w $6FA2,x
	ORA.w #$0006
	STA.w $6FA2,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.b $16,x
	BNE.b CODE_0CA977
	SEP.b #$20
	LDA.b #$01
	STA.w $74A2,x
	LDA.b #$02
	STA.b $19,x
	TAY
	LDA.w DATA_0CA9E7,y
	STA.w $7402,x
	LDA.w DATA_0CA9EA,y
	STA.w $7A96,x
	REP.b #$20
	RTL

CODE_0CA977:
	SEP.b #$20
	LDA.w $7042,x
	AND.b #$CF
	STA.w $7042,x
	LDA.b #$FF
	STA.w $74A2,x
	LDA.b #$0C
	STA.w $7402,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

YI_NorSpr033_LittleMouserExitingNest_Main:
;$0CA98E
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0CA9A8
	LDA.w #!Define_YI_NorSpr030_LittleMouser
	TXY
	JSL.l CODE_03A377
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	RTL

CODE_0CA9A8:
	CMP.w #$0010
	BNE.b CODE_0CA9BB
	LDA.w $7D96,x
	BEQ.b CODE_0CA9BB
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
CODE_0CA9BB:
	JSL.l CODE_03AF23
	JSR.w CODE_0CB29D
	LDA.b $16,x
	TAX
	JMP.w (DATA_0CA9C8,x)

DATA_0CA9C8:
	dw CODE_0CA9CE
	dw CODE_0CAC25
	dw CODE_0CAEE1

CODE_0CA9CE:
	LDX.b $12
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CA9D7,x)

CODE_0CA9D6:
	RTL

DATA_0CA9D7:
	dw CODE_0CA9ED
	dw CODE_0CAA27
	dw CODE_0CAA63
	dw CODE_0CAAF0
	dw CODE_0CAB3F
	dw CODE_0CAB5B
	dw CODE_0CAB99
	dw CODE_0CB1CF

DATA_0CA9E7:
	db $06,$05,$16

DATA_0CA9EA:
	db $03,$14,$40

CODE_0CA9ED:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAA0A
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CAA0B
	LDY.b $19,x
	LDA.w DATA_0CA9E7,y
	STA.w $7402,x
	LDA.w DATA_0CA9EA,y
	STA.w $7A96,x
	REP.b #$20
CODE_0CAA0A:
	RTL

CODE_0CAA0B:
	INC.b $18,x
	INC.b $18,x
	LDA.b #$07
	STA.w $7402,x
	REP.b #$20
	LDA.w $7182,x
	SEC
	SBC.w #$000A
	STA.w $7182,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CAA27:
	LDX.b $12
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700026,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0100
	BCC.b CODE_0CAA62
	CMP.w #$0103
	BCC.b CODE_0CAA46
	CMP.w #$010A
	BNE.b CODE_0CAA62
CODE_0CAA46:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$08
	STA.w $7402,x
	LDA.b #$03
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
CODE_0CAA62:
	RTL

CODE_0CAA63:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAA70
	LDA.w #$0009
	STA.w $7402,x
CODE_0CAA70:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700026,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0028
	BCC.b CODE_0CAACE
	CMP.w #$002B
	BCC.b CODE_0CAA8D
	CMP.w #$002D
	BNE.b CODE_0CAACE
CODE_0CAA8D:
	LDA.w $6FA0,x
	AND.w #$FF9F
	STA.w $6FA0,x
	LDA.w $7040,x
	ORA.w #$0150
	STA.w $7040,x
	LDA.b $10
	AND.w #$0001
	BNE.b CODE_0CAACF
CODE_0CAAA6:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$05
	STA.w $74A2,x
	LDA.b #$03
	STA.b $19,x
	TAY
	LDA.w DATA_0CAAE4,y
	STA.w $7402,x
	LDA.w DATA_0CAAE8,y
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
CODE_0CAACE:
	RTL

CODE_0CAACF:
	SEP.b #$20
	LDA.b #$07
	STA.w $74A2,x
	LDA.b $18,x
	CLC
	ADC.b #$04
	STA.b $18,x
	REP.b #$20
	RTL

DATA_0CAAE0:
	dw $0000,$0100

DATA_0CAAE4:
	dw $0000,$0B00

DATA_0CAAE8:
	dw $1024,$0324

DATA_0CAAEC:
	dw $0202,$0000

CODE_0CAAF0:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAB16
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CAB17
	LDY.b $19,x
	LDA.w DATA_0CAAE4,y
	STA.w $7402,x
	LDA.w DATA_0CAAE8,y
	STA.w $7A96,x
	LDA.w $7400,x
	EOR.w DATA_0CAAEC,y
	STA.w $7400,x
	REP.b #$20
CODE_0CAB16:
	RTL

CODE_0CAB17:
	INC.b $18,x
	INC.b $18,x
	LDA.w $6FA0,x
	ORA.b #$60
	STA.w $6FA0,x
	LDA.b #$07
	STA.w $74A2,x
	LDA.b #$09
	STA.w $7402,x
	REP.b #$20
	LDA.w $7040,x
	AND.w #$FEAF
	STA.w $7040,x
	LDA.w #$FE80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CAB3F:
	LDX.b $12
	SEP.b #$20
	LDA.w $6FA0,x
	ORA.b #$60
	STA.w $6FA0,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	LDA.w $7040,x
	AND.w #$FEAF
	STA.w $7040,x
	RTL

CODE_0CAB5B:
	LDX.b $12
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700006,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0028
	BCC.b CODE_0CAB7A
	CMP.w #$002B
	BCC.b CODE_0CAB98
	CMP.w #$002D
	BEQ.b CODE_0CAB98
CODE_0CAB7A:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$0A
	STA.w $7402,x
	LDA.w $7042,x
	AND.b #$CF
	STA.w $7042,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	LDA.w #$0300
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0CAB98:
	RTL

CODE_0CAB99:
	LDX.b $12
	JSR.w CODE_0CB21B
	BMI.b CODE_0CAB98
	BEQ.b CODE_0CAB98
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_0CABB8
	EOR.w #$FFFF
	INC
CODE_0CABB8:
	CMP.b $00
	BCS.b CODE_0CAC24
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CABD2
	EOR.w #$FFFF
	INC
CODE_0CABD2:
	CMP.b $00
	BCS.b CODE_0CAC24
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,y
	STA.w $7182,x
	LDA.b $10
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_0CB1A3,y
	STA.w $7A36,x
	STA.b $00
	LDA.w DATA_0CB1A7,y
	STA.w $7A38,x
	STA.b $02
	JSL.l CODE_008408
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	LDA.w $7042,x
	ORA.b #$20
	STA.w $7042,x
	LDA.w DATA_0CB19F,y
	STA.b $19,x
	TAY
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b $10
	AND.b #$1F
	CLC
	ADC.b #$20
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
CODE_0CAC24:
	RTL

CODE_0CAC25:
	LDX.b $12
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CAC2D,x)

DATA_0CAC2D:
	dw CODE_0CAC3F
	dw CODE_0CACC1
	dw CODE_0CAD09
	dw CODE_0CAD56
	dw CODE_0CAB3F
	dw CODE_0CADA5
	dw CODE_0CADD8
	dw CODE_0CAE3B
	dw CODE_0CAE90

CODE_0CAC3F:
	LDX.b $12
	LDA.w $7A96,x
	BEQ.b CODE_0CAC47
	RTL

CODE_0CAC47:
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0CB21B
	BMI.b CODE_0CAC91
	BEQ.b CODE_0CAC91
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_0CAC6A
	EOR.w #$FFFF
	INC
CODE_0CAC6A:
	CMP.b $00
	BCS.b CODE_0CAC88
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CAC84
	EOR.w #$FFFF
	INC
CODE_0CAC84:
	CMP.b $00
	BCC.b CODE_0CAC91
CODE_0CAC88:
	SEP.b #$20
	LDA.b #$07
	STA.w $74A2,x
	REP.b #$20
CODE_0CAC91:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700006,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0000
	BNE.b CODE_0CACC0
	SEP.b #$20
	INC.b $18,x
	INC.b $18,x
	LDA.b #$03
	STA.b $19,x
	TAY
	LDA.w DATA_0CAAE0,y
	STA.w $7402,x
	LDA.w DATA_0CAAE8,y
	STA.w $7A96,x
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0CACC0:
	RTL

CODE_0CACC1:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CACE7
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CACE8
	LDY.b $19,x
	LDA.w DATA_0CAAE0,y
	STA.w $7402,x
	LDA.w DATA_0CAAE8,y
	STA.w $7A96,x
	LDA.w $7400,x
	EOR.w DATA_0CAAEC,y
	STA.w $7400,x
	REP.b #$20
CODE_0CACE7:
	RTL

CODE_0CACE8:
	INC.b $18,x
	INC.b $18,x
	LDA.b #$0D
	STA.w $7402,x
	LDA.w $7042,x
	ORA.b #$20
	STA.w $7042,x
	REP.b #$20
	LDA.w #$0180
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	RTL

CODE_0CAD09:
	LDX.b $12
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700026,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0100
	BCC.b CODE_0CAD44
	CMP.w #$0103
	BCC.b CODE_0CAD28
	CMP.w #$010A
	BNE.b CODE_0CAD44
CODE_0CAD28:
	LDA.w $6FA0,x
	AND.w #$FF9F
	STA.w $6FA0,x
	LDA.w $7040,x
	ORA.w #$0150
	STA.w $7040,x
	LDA.b $10
	AND.w #$0001
	BNE.b CODE_0CAD45
	JMP.w CODE_0CAAA6

CODE_0CAD44:
	RTL

CODE_0CAD45:
	SEP.b #$20
	LDA.b #$01
	STA.w $74A2,x
	LDA.b $18,x
	CLC
	ADC.b #$04
	STA.b $18,x
	REP.b #$20
	RTL

CODE_0CAD56:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAD7C
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CAD7D
	LDY.b $19,x
	LDA.w DATA_0CAAE4,y
	STA.w $7402,x
	LDA.w DATA_0CAAE8,y
	STA.w $7A96,x
	LDA.w $7400,x
	EOR.w DATA_0CAAEC,y
	STA.w $7400,x
	REP.b #$20
CODE_0CAD7C:
	RTL

CODE_0CAD7D:
	INC.b $18,x
	INC.b $18,x
	LDA.w $6FA0,x
	ORA.b #$60
	STA.w $6FA0,x
	LDA.b #$01
	STA.w $74A2,x
	LDA.b #$0D
	STA.w $7402,x
	REP.b #$20
	LDA.w $7040,x
	AND.w #$FEAF
	STA.w $7040,x
	LDA.w #$0180
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CADA5:
	LDX.b $12
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700026,x
	SEP.b #$10
	LDX.b $12
	CMP.w #$0100
	BCC.b CODE_0CADC4
	CMP.w #$0103
	BCC.b CODE_0CADD7
	CMP.w #$010A
	BEQ.b CODE_0CADD7
CODE_0CADC4:
	LDA.w #$0300
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$0E
	STA.w $7402,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
CODE_0CADD7:
	RTL

CODE_0CADD8:
	LDX.b $12
	JSR.w CODE_0CB21B
	BMI.b CODE_0CAE3A
	BEQ.b CODE_0CAE3A
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_0CADF7
	EOR.w #$FFFF
	INC
CODE_0CADF7:
	CMP.b $00
	BCS.b CODE_0CAE3A
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CAE11
	EOR.w #$FFFF
	INC
CODE_0CAE11:
	CMP.b $00
	BCS.b CODE_0CAE3A
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,y
	STA.w $70E2,x
	LDA.w $7182,y
	STA.w $7182,x
	SEP.b #$20
	LDA.b #$01
	STA.b $19,x
	LDA.b #$0F
	STA.w $7402,x
	LDA.b #$03
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
CODE_0CAE3A:
	RTL

CODE_0CAE3B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAE54
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CAE55
	LDA.b #$10
	STA.w $7402,x
	LDA.b #$03
	STA.w $7A96,x
	REP.b #$20
CODE_0CAE54:
	RTL

CODE_0CAE55:
	REP.b #$20
	LDA.b $10
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_0CB1A3,y
	STA.w $7A36,x
	STA.b $00
	LDA.w DATA_0CB1A7,y
	STA.w $7A38,x
	STA.b $02
	JSL.l CODE_008408
	SEP.b #$20
	LDA.w DATA_0CB19F,y
	STA.b $19,x
	TAY
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b $10
	AND.b #$1F
	CLC
	ADC.b #$20
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	RTL

CODE_0CAE90:
	LDX.b $12
	LDA.w $7A36,x
	STA.b $00
	LDA.w $7A38,x
	STA.b $02
	LDA.w $7A96,x
	BNE.b CODE_0CAED1
	SEP.b #$20
	DEC.b $19,x
	BPL.b CODE_0CAED2
	LDA.w $7042,x
	AND.b #$CF
	STA.w $7042,x
	LDA.b #$FF
	STA.w $74A2,x
	LDA.b #$0C
	STA.w $7402,x
	LDA.b $10
	AND.b #$1F
	CLC
	ADC.b #$20
	STA.w $7A96,x
	STZ.b $18,x
	REP.b #$20
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,x
CODE_0CAED1:
	RTL

CODE_0CAED2:
	LDY.b $19,x
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b ($02),y
	STA.w $7A96,x
	REP.b #$20
	RTL

CODE_0CAEE1:
	LDX.b $12
	JSR.w CODE_0CB2C2
CODE_0CAEE6:
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CAEEC,x)

DATA_0CAEEC:
	dw CODE_0CAF06
	dw CODE_0CAF5B
	dw CODE_0CAF95
	dw CODE_0CAFDD
	dw CODE_0CB05A
	dw CODE_0CB091
	dw CODE_0CB0ED
	dw CODE_0CB125
	dw CODE_0CB131
	dw CODE_0CB1CF

DATA_0CAF00:
	db $15,$14,$16

DATA_0CAF03:
	db $04,$04,$40

CODE_0CAF06:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAF23
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CAF24
	LDY.b $19,x
	LDA.w DATA_0CAF00,y
	STA.w $7402,x
	LDA.w DATA_0CAF03,y
	STA.w $7A96,x
	REP.b #$20
CODE_0CAF23:
	RTL

CODE_0CAF24:
	INC.b $18,x
	INC.b $18,x
	LDA.b #$0D
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	LDA.b #$05
	STA.w $74A2,x
	LDA.w $6FA0,x
	AND.b #$9F
	STA.w $6FA0,x
	REP.b #$20
	LDA.w $7040,x
	ORA.w #$0150
	STA.w $7040,x
	LDA.w $7182,x
	CLC
	ADC.w #$0002
	STA.w $7182,x
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CAF5B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAF72
	SEP.b #$20
	LDA.w $7860,x
	AND.b #$01
	BNE.b CODE_0CAF73
	LDA.b #$0E
	STA.w $7402,x
	REP.b #$20
CODE_0CAF72:
	RTL

CODE_0CAF73:
	INC.b $18,x
	INC.b $18,x
	LDA.b #$01
	STA.b $19,x
	TAY
	LDA.w DATA_0CAF91,y
	STA.w $7402,x
	LDA.w DATA_0CAF93,y
	STA.w $7A96,x
	REP.b #$20
	LDA.w #$0040
	STA.w $7542,x
	RTL

DATA_0CAF91:
	db $00,$17

DATA_0CAF93:
	db $20,$04

CODE_0CAF95:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CAFB2
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CAFB3
	LDY.b $19,x
	LDA.w DATA_0CAF91,y
	STA.w $7402,x
	LDA.w DATA_0CAF93,y
	STA.w $7A96,x
	REP.b #$20
CODE_0CAFB2:
	RTL

CODE_0CAFB3:
	INC.b $18,x
	INC.b $18,x
	STZ.b $77,x
	LDA.b $10
	AND.b #$03
	INC
CODE_0CAFBE:
	STA.b $76,x
	LDA.b #$02
	STA.b $19,x
	TAY
	LDA.w DATA_0CA46F,y
	STA.w $7402,x
CODE_0CAFC9:
	LDA.b $10
	LSR
	LSR
	AND.b #$07
	CLC
	ADC.b #$02
	STA.w $7A96,x
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CAFDD:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CB00F
	SEP.b #$20
	DEC.b $19,x
	BPL.b CODE_0CAFF2
	DEC.b $76,x
	BMI.b CODE_0CB010
	LDA.b #$02
	STA.b $19,x
CODE_0CAFF2:
	LDY.b $19,x
	LDA.w DATA_0CA46F,y
	STA.w $7402,x
	LDA.w $7400,x
	EOR.w DATA_0CA472,y
	STA.w $7400,x
	LDA.b $10
	AND.b #$07
	CLC
	ADC.b #$02
	STA.w $7A96,x
	REP.b #$20
CODE_0CB00F:
	RTL

CODE_0CB010:
	LDA.b $77,x
	BNE.b CODE_0CB039
	INC.b $18,x
	INC.b $18,x
	LDA.b #$20
	STA.w $7A96,x
CODE_0CB01D:
	LDA.b #$02
	STA.b $19,x
	TAY
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_0CA218,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CB039:
	REP.b #$20
	JSR.w CODE_0CB21B
	BMI.b CODE_0CB052
	BEQ.b CODE_0CB052
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.w $7400,x
CODE_0CB052:
	SEP.b #$20
	LDA.b #$0A
	STA.b $18,x
	BRA.b CODE_0CB01D

CODE_0CB05A:
	LDX.b $12
	LDA.w $7A96,x
	BEQ.b CODE_0CB080
	LDA.w $7A98,x
	BNE.b CODE_0CB07F
	SEP.b #$20
	DEC.b $19,x
	BPL.b CODE_0CB070
	LDA.b #$02
	STA.b $19,x
CODE_0CB070:
	LDY.b $19,x
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
CODE_0CB07F:
	RTL

CODE_0CB080:
	SEP.b #$20
	LDA.b $10
	AND.b #$04
	STA.b $77,x
	LDA.b #$06
	STA.b $18,x
	LDA.b #$03
	JMP.w CODE_0CAFBE

CODE_0CB091:
	LDX.b $12
	JSR.w CODE_0CB21B
	BMI.b CODE_0CB0A8
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCC.b CODE_0CB0C7
CODE_0CB0A8:
	LDA.w $7A98,x
	BNE.b CODE_0CB0C6
	SEP.b #$20
	DEC.b $19,x
	BPL.b CODE_0CB0B7
	LDA.b #$02
	STA.b $19,x
CODE_0CB0B7:
	LDY.b $19,x
	LDA.w DATA_0CA430,y
	STA.w $7402,x
	LDA.b #$02
	STA.w $7A98,x
	REP.b #$20
CODE_0CB0C6:
	RTL

CODE_0CB0C7:
	LDA.w $70E2,y
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $7400,x
	SEP.b #$20
	LDA.b #$17
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	LDA.b #$01
	STA.b $19,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	RTL

CODE_0CB0ED:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CB109
	JSR.w CODE_0CB234
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CB10A
	LDA.b #$11
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	REP.b #$20
CODE_0CB109:
	RTL

CODE_0CB10A:
	INC.b $18,x
	INC.b $18,x
	LDA.b #$07
	STA.w $7402,x
	REP.b #$20
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	AND.w #$FFFE
	STA.w $7860,x
	RTL

CODE_0CB125:
	LDX.b $12
	JSR.w CODE_0CB234
	RTL

DATA_0CB12B:
	db $13,$12,$09

DATA_0CB12E:
	db $00,$00,$08

CODE_0CB131:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CB15F
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CB160
	LDY.b $19,x
	LDA.w DATA_0CB12B,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	LDA.w DATA_0CB12E,y
	STA.b $00
	STZ.b $01
	REP.b #$20
	LDY.b $78,x
	LDA.w $7182,y
	CLC
	ADC.b $00
	STA.w $7182,x
CODE_0CB15F:
	RTL

CODE_0CB160:
	INC.b $18,x
	INC.b $18,x
	LDA.b $10
	AND.w #$0A01
	TAY
	REP.b #$20
	LDA.w DATA_0CB1A3,y
	STA.w $7A36,x
	STA.b $00
	LDA.w DATA_0CB1A7,y
	STA.w $7A38,x
	STA.b $02
	JSL.l CODE_008408
	SEP.b #$20
	LDA.w DATA_0CB19F,y
	STA.b $19,x
	TAY
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b $10
	AND.b #$0F
	CLC
	ADC.b #$10
	STA.w $7A96,x
	LDA.b #$FF
	STA.w $74A2,x
	REP.b #$20
	RTL

DATA_0CB19F:
	dw $0007,$0009

DATA_0CB1A3:
	dw DATA_0CB1AB,DATA_0CB1BB

DATA_0CB1A7:
	dw DATA_0CB1B3,DATA_0CB1C5

DATA_0CB1AB:
	db $1E,$16,$1E,$16,$1E,$16,$1E,$16

DATA_0CB1B3:
	db $02,$40,$04,$10,$04,$20,$04,$00

DATA_0CB1BB:
	db $1E,$21,$22,$21,$1E,$1F,$20,$1F,$16,$16

DATA_0CB1C5:
	db $02,$02,$10,$02,$02,$02,$10,$02,$20,$00

CODE_0CB1CF:
	LDX.b $12
	LDA.w $7A36,x
	STA.b $00
	LDA.w $7A38,x
	STA.b $02
	LDA.w $7A96,x
	BNE.b CODE_0CB20B
	SEP.b #$20
	LDA.b #$06
	STA.w $74A2,x
	DEC.b $19,x
	BPL.b CODE_0CB20C
	LDA.b #$02
	STA.b $19,x
	TAY
	LDA.w DATA_0CAF00,y
	STA.w $7402,x
	LDA.b $10
	AND.b #$1F
	CLC
	ADC.b #$20
	STA.w $7A96,x
	STZ.b $18,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
CODE_0CB20B:
	RTL

CODE_0CB20C:
	LDY.b $19,x
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b ($02),y
	STA.w $7A96,x
	REP.b #$20
	RTL

CODE_0CB21B:
	LDA.w #$002F
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098EBF>>16
	LDA.w #FXCODE_098EBF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	RTS

CODE_0CB234:
	JSR.w CODE_0CB21B
	BMI.b CODE_0CB29C
	BEQ.b CODE_0CB29C
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	BPL.b CODE_0CB251
	EOR.w #$FFFF
	INC
CODE_0CB251:
	CMP.b $00
	BCS.b CODE_0CB29C
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CB26B
	EOR.w #$FFFF
	INC
CODE_0CB26B:
	CMP.b $00
	BCS.b CODE_0CB29C
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$10
	STA.b $18,x
	LDA.b #$02
	STA.b $19,x
	LDA.b #$04
	STA.w $7A96,x
	TYA
	STA.b $78,x
	LDA.b #$06
	STA.w $74A2,x
	LDA.w $6FA0,x
	ORA.b #$60
	STA.w $6FA0,x
	REP.b #$20
	LDA.w $7040,x
	AND.w #$FEAF
	STA.w $7040,x
CODE_0CB29C:
	RTS

CODE_0CB29D:
	LDA.w $6FA0,x
	AND.w #$0040
	BNE.b CODE_0CB2C1
	LDY.w $7D36,x
	BPL.b CODE_0CB2C1
	LDA.w $61D6
	BNE.b CODE_0CB2C1
	JSL.l CODE_07FC2F
	BCC.b CODE_0CB2BB
	PLA
	JSL.l CODE_03A5B7
	RTL

CODE_0CB2BB:
	BEQ.b CODE_0CB2C1
	JSL.l CODE_03A858
CODE_0CB2C1:
	RTS

CODE_0CB2C2:
	LDA.w $7542,x
	CMP.w #$0040
	BMI.b CODE_0CB2EA
	LDA.w #$0022
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #$0026
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_099FA5>>16
	LDA.w #FXCODE_099FA5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_0CB2EB
CODE_0CB2EA:
	RTS

CODE_0CB2EB:
	LDA.w #!Define_YI_NorSpr030_LittleMouser
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	PLA
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1A3_LittleSkullMouser_Init:
;$0CB304
	RTL

;---------------------------------------------------------------------------

DATA_0CB305:
	dw $FE80,$0180

DATA_0CB309:
	dw $0000,$0000,$0002,$0000

CODE_0CB311:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0CB351
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_0CB352
	BIT.w #$0002
	BNE.b CODE_0CB35D
	BIT.w #$0001
	BEQ.b CODE_0CB351
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_0085D2
	JSL.l CODE_03A590
	LDA.b $78,x
	CMP.w #$0003
	BCC.b CODE_0CB349
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0CB34B
	JML.l CODE_03B078

CODE_0CB349:
	INC.b $78,x
CODE_0CB34B:
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0CB351:
	RTL

CODE_0CB352:
	LSR
	AND.w #$0006
	TAY
	LDA.w DATA_0CB309,y
	STA.w $7400,x
CODE_0CB35D:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$02
	STA.w $7A36,x
	REP.b #$20
	RTL

YI_NorSpr1A3_LittleSkullMouser_Main:
;$0CB36A
	LDY.w $7A36,x
	TYX
	JMP.w (DATA_0CB371,x)

DATA_0CB371:
	dw CODE_0CB375
	dw CODE_0CB455

CODE_0CB375:
	LDX.b $12
	LDA.w $7D38,x
	BNE.b CODE_0CB311
	JSL.l CODE_03AF23
	JSL.l CODE_07FD6C
	BCC.b CODE_0CB394
	JSL.l CODE_03B20B
	SEP.b #$20
	LDA.b #$02
	STA.w $7A36,x
	REP.b #$20
	RTL

CODE_0CB394:
	JSL.l CODE_03A5B7
	JSR.w CODE_0CB406
	LDA.b $18,x
	BNE.b CODE_0CB3D5
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0CB3C3
	LDY.b #$02
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCC.b CODE_0CB3BE
	LDY.b #$01
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CB3BE
	LDY.b #$03
CODE_0CB3BE:
	TYA
	STA.w $7402,x
	RTL

CODE_0CB3C3:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
	INC.b $18,x
	RTL

CODE_0CB3D5:
	LDA.w $7A96,x
	BNE.b CODE_0CB3F7
	LDA.w $7402,x
	BNE.b CODE_0CB3F8
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	STZ.b $18,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_0CB305,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CB3F7:
	RTL

CODE_0CB3F8:
	STZ.w $7402,x
	LDA.w #$0004
	STA.w $7A96,x
	RTL

DATA_0CB402:
	dw $FF00,$0100

CODE_0CB406:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0CB43E
	BEQ.b CODE_0CB43E
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CB43E
	LDA.w $7D38,y
	BEQ.b CODE_0CB43E
	LDX.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0CB424
	INX
	INX
CODE_0CB424:
	LDA.w DATA_0CB402,x
	LDX.b $12
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$02
	STA.w $7A36,x
	REP.b #$20
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	PLA
	RTL

CODE_0CB43E:
	RTS

DATA_0CB43F:
	db $00,$05,$06,$07,$06,$07,$06,$07,$06,$07,$06

DATA_0CB44A:
	db $02,$02,$32,$02,$02,$02,$02,$02,$02,$02,$32

CODE_0CB455:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0CB471
	LDA.w #!Define_YI_NorSpr030_LittleMouser
	TXY
	JSL.l CODE_03A377
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	RTL

CODE_0CB471:
	STZ.w $7D38,x
	JSL.l CODE_03AF23
	JSL.l CODE_07FD6C
	BCC.b CODE_0CB49A
	JSL.l CODE_03B20B
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	JSL.l CODE_0CFF61
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	JML.l CODE_03A31E

CODE_0CB49A:
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0CB4A5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CB4A5:
	LDA.w $7A98,x
	BNE.b CODE_0CB4D1
	LDA.b $76,x
	CMP.w #$0001
	BNE.b CODE_0CB4B8
	LDA.w #!Define_YI_AmbSpr219
	JSL.l CODE_0C9C7E
CODE_0CB4B8:
	SEP.b #$20
	LDA.b $76,x
	CMP.b #$0B
	BCS.b CODE_0CB4D2
	TAY
	LDA.w DATA_0CB44A,y
	STA.w $7A98,x
	LDA.w DATA_0CB43F,y
	STA.w $7402,x
	INC.b $76,x
	REP.b #$20
CODE_0CB4D1:
	RTL

CODE_0CB4D2:
	REP.b #$20
	LDA.w #!Define_YI_NorSpr030_LittleMouser
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_0CB4EC:
	dw $FF80,$0080

DATA_0CB4F0:
	db $01,$01,$01,$01,$02,$02,$02,$02,$04,$04,$04,$04,$04,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

YI_NorSpr1A2_HealthStar_Init:
;$0CB530
	LDA.w #$0280
	STA.w $7A96,x
CODE_0CB536:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1A2_HealthStar_Main:
;$0CB537
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0CB536
	LDA.w $7AF6,x
	BNE.b CODE_0CB59D
	LDY.w $7D36,x
	BPL.b CODE_0CB59D
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$0004
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	LDA.w #$0003
	STA.w $0004
	JSL.l CODE_03A4C3
	LDA.w $0396
	CLC
	ADC.w #$000A
	STA.w $0396
	LDA.w #$0082
	STA.w $0B7F
	JML.l CODE_03A32E

CODE_0CB59D:
	LDA.w $7A96,x
	BNE.b CODE_0CB5A6
	JML.l CODE_03A31E

CODE_0CB5A6:
	LSR
	LSR
	LSR
	LSR
	TAY
	SEP.b #$20
	LDX.b #$05
	LDA.b $14
	AND.w DATA_0CB4F0,y
	BEQ.b CODE_0CB5B8
	LDX.b #$FF
CODE_0CB5B8:
	TXA
	LDX.b $12
	STA.w $74A2,x
	REP.b #$20
	LDA.b $18,x
	BNE.b CODE_0CB605
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0CB5F6
	LDY.b #$02
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCC.b CODE_0CB5F1
	LDY.b #$01
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CB5F1
	LDY.b #$03
	CMP.w #$0100
	BCC.b CODE_0CB5F1
	LDY.b #$04
	CMP.w #$0180
	BCC.b CODE_0CB5F1
	LDY.b #$05
CODE_0CB5F1:
	TYA
	STA.w $7402,x
	RTL

CODE_0CB5F6:
	STZ.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7A98,x
	INC.b $18,x
	RTL

CODE_0CB605:
	LDA.w $7A98,x
	BNE.b CODE_0CB62D
	LDY.w $7A36,x
	BNE.b CODE_0CB61C
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	STA.w $7400,x
	INC.w $7A36,x
CODE_0CB61C:
	LDY.w $7400,x
	LDA.w DATA_0CB4EC,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
CODE_0CB62D:
	RTL

;---------------------------------------------------------------------------

DATA_0CB62E:
	dw $FF00,$0100

DATA_0CB632:
	dw $FFE8,$0018

YI_NorSpr104_JeanDeFillet_Init:
;$0CB636
	JSL.l CODE_03AE60
	JSR.w CODE_0CB7A8
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0CB632,y
	STA.w $7A36,x
	LDA.w #$3000
	STA.b $16,x
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$03
	BNE.b CODE_0CB671
CODE_0CB663:
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $7182,x
	STA.w $7A38,x
	RTL

CODE_0CB671:
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	AND.w #$FF00
	CMP.w #$7E00
	BEQ.b CODE_0CB663
	LDA.w $7182,x
	STA.w $7A38,x
	RTL

;---------------------------------------------------------------------------

ADDR_0CB69E:
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	STA.w $7A38,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr104_JeanDeFillet_Main:
;$0CB6AC
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	JSR.w CODE_0CB7A8
	JSR.w CODE_0CB90A
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CB6C9,x)

DATA_0CB6C9:
	dw CODE_0CB6D1
	dw CODE_0CB6F5
	dw CODE_0CB74F
	dw CODE_0CB765

CODE_0CB6D1:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CB6F4
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_0CB62E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$40
	STA.w $7542,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
CODE_0CB6F4:
	RTL

CODE_0CB6F5:
	LDX.b $12
	JSR.w CODE_0CB7EC
	JSR.w CODE_0CB781
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	CMP.w $7182,x
	BCS.b CODE_0CB73E
	STA.w $7182,x
	LDY.w $7400,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0CB632,y
	STA.w $70E2,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w #$3000
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	SEP.b #$20
	LDA.b #$20
	STA.w $7A96,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	RTL

CODE_0CB73E:
	LDA.b $16,x
	SEC
	SBC.w #$0200
	CMP.w #$D000
	BPL.b CODE_0CB74C
	LDA.w #$D000
CODE_0CB74C:
	STA.b $16,x
	RTL

CODE_0CB74F:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CB764
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
CODE_0CB764:
	RTL

CODE_0CB765:
	LDX.b $12
	LDA.w $7A38,x
	CMP.w $7182,x
	BCC.b CODE_0CB780
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$20
	STA.w $7A96,x
	STZ.b $18,x
	REP.b #$20
CODE_0CB780:
	RTL

CODE_0CB781:
	LDY.w $7400,x
	BNE.b CODE_0CB794
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0CB632,y
	CMP.w $70E2,x
	BPL.b CODE_0CB7A0
CODE_0CB792:
	CLC
	RTS

CODE_0CB794:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0CB632,y
	CMP.w $70E2,x
	BPL.b CODE_0CB792
CODE_0CB7A0:
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	RTS

CODE_0CB7A8:
	REP.b #$10
	LDA.b $16,x
	EOR.w #$FFFF
	INC
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_550000+$40E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$40E1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

CODE_0CB7EC:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CB82B
	TXY
	TAX
	LDA.l $70001C,x
	AND.w #$F800
	CMP.w #$4000
	BEQ.b CODE_0CB817
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BMI.b CODE_0CB812
	LDA.l $70001C,x
	BIT.w #$0008
	BEQ.b CODE_0CB889
CODE_0CB812:
	SEP.b #$10
	LDX.b $12
	RTS

CODE_0CB817:
	LDA.l $700018,x
	STA.b $00
	STA.w $0091
	LDA.l $70001A,x
	STA.b $02
	STA.w $0093
	BRA.b CODE_0CB84B

CODE_0CB82B:
	TXY
	TAX
	LDA.l $700024,x
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_0CB884
	LDA.l $700020,x
	STA.b $00
	STA.w $0091
	LDA.l $700022,x
	STA.b $02
	STA.w $0093
CODE_0CB84B:
	SEP.b #$10
	LDA.w #$0000
	STA.w $008F
	JSL.l CODE_109295
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr1C3
	JSL.l CODE_008B21
	LDA.b $00
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.b $02
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$000A
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID0A_BreakDirt
	JSL.l CODE_0085D2
	RTS

CODE_0CB884:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BPL.b CODE_0CB89D
CODE_0CB889:
	LDA.l $700024,x
	SEP.b #$10
	LDX.b $12
	BIT.w #$0008
	BEQ.b CODE_0CB8A1
	AND.w #$0010
	BNE.b CODE_0CB8A2
	BRA.b CODE_0CB8DE

CODE_0CB89D:
	SEP.b #$10
	LDX.b $12
CODE_0CB8A1:
	RTS

CODE_0CB8A2:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.b $78,x
	LDA.w #!Define_YI_SoundID5F_Splash1
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1C7
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$FF40
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0008
	STA.w $7502,y
	LDA.w #$0200
	STA.w $75A2,y
	LDA.w #$0030
	STA.w $7782,y
	RTS

CODE_0CB8DE:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.b $78,x
	LDA.w #!Define_YI_SoundID5F_Splash1
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1BA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$001A
	STA.w $7E4C,y
	LDA.w #$0003
	STA.w $7782,y
	RTS

CODE_0CB90A:
	LDY.w $7D36,x
	BPL.b CODE_0CB913
	JSL.l CODE_03A858
CODE_0CB913:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1AA_HotLips_Init:
;$0CB914
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$03
	BNE.b CODE_0CB926
	SEC
	SBC.w #$0004
CODE_0CB926:
	STA.w $7182,x
	STA.w $7A38,x
CODE_0CB92C:
	SEP.b #$20
	LDA.b #$05
	STA.b $18,x
	TAY
	LDA.w DATA_0CBA90,y
	STA.w $7402,x
	LDA.w DATA_0CBA96,y
	STA.w $7A96,x
	STZ.b $76,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_0CB944:
	dw $FC08,$020D,$0100,$0DFC,$0002,$0008,$0206,$F802
	dw $0000,$0202,$FC08,$020C,$0100,$0CFC,$0002,$0008
	dw $0206,$F802,$0000,$0202,$FC08,$420C,$0100,$0CFC
	dw $0042,$0008,$0206,$F802,$0000,$0202,$FC08,$420D
	dw $0100,$0DFC,$0042,$0008,$0206,$F802,$0000,$0202
	dw $FC08,$421C,$0100,$1CFC,$0042,$0008,$0206,$F802
	dw $0000,$0202,$00F9,$0202,$0902,$0600,$0202,$FC09
	dw $020D,$0200,$0DFC,$0002,$000A,$020A,$FA02,$0201
	dw $0202,$FC0A,$020C,$0300,$0CFC,$0002,$00F7,$0204
	dw $0002,$1CFC,$0042,$FC07,$021C,$0700,$0600,$0202

DATA_0CB9E4:
	dw $FFF2,$FFFE,$FFEC,$FFF8,$FFE6,$FFF2,$FFE0,$FFEC
	dw $FFDA,$FFE6,$FFD4,$FFE0,$FFCE,$FFDA,$FFC8,$FFD4
	dw $FFC2,$FFCE,$FFBC,$FFC8,$FFB6,$FFC2,$FFB0,$FFBC
	dw $FFAA,$FFB6,$FFA4,$FFB0,$FF9E,$FFAA,$FF98,$FFA4
	dw $FF92,$FF9E,$FF8C,$FF98

YI_NorSpr1AA_HotLips_Main:
;$0CBA2C
	LDY.w $74A2,x
	BMI.b CODE_0CBA71
	LDA.w #DATA_0CB944>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0CB944
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7402,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_0CB9E4
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #DATA_0CB9E4>>16
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0004
	STA.w $600A
	LDA.w #$0004
	STA.w $600C
	LDA.w #$020F
	STA.w $600E
	LDX.b #FXCODE_089822>>16
	LDA.w #FXCODE_089822
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0CBA71:
	JSL.l CODE_03AF23
	JSR.w CODE_0CBDFC
	LDY.b $76,x
	TYX
	JMP.w (DATA_0CBA7E,x)

DATA_0CBA7E:
	dw CODE_0CBA9C
	dw CODE_0CBAF3
	dw CODE_0CBB2F
	dw CODE_0CBB6C
	dw CODE_0CBB9B
	dw CODE_0CBBD9
	dw CODE_0CBC3E
	dw CODE_0CBC58
	dw CODE_0CBCAE

DATA_0CBA90:
	db $01,$02,$03,$02,$01,$00

DATA_0CBA96:
	db $10,$10,$10,$10,$10,$10

CODE_0CBA9C:
	LDX.b $12
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_0CBAE0
	STZ.w $7402,x
	LDA.w #$FE00
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	SEP.b #$20
	LDA.b #$05
	STA.b $18,x
	TAY
	LDA.w DATA_0CBA90,y
	STA.w $7402,x
	LDA.w DATA_0CBA96,y
	STA.w $7A96,x
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

CODE_0CBAE0:
	LDA.w #$0005
	STA.b $00
	LDA.w #DATA_0CBA90
	STA.b $02
	LDA.w #DATA_0CBA96
	STA.b $04
	JSR.w CODE_0CBE2D
	RTL

CODE_0CBAF3:
	LDX.b $12
	LDA.w $7A38,x
	SEC
	SBC.w #$0004
	CMP.w $7182,x
	BMI.b CODE_0CBB26
	STA.w $7182,x
	STZ.w $75E2,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$03
	STA.b $18,x
	TAY
	LDA.w DATA_0CBB27,y
	STA.w $7402,x
	LDA.w DATA_0CBB2B,y
	STA.w $7A96,x
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
CODE_0CBB26:
	RTL

DATA_0CBB27:
	db $07,$06,$05,$00

DATA_0CBB2B:
	db $02,$30,$08,$50

CODE_0CBB2F:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CBB4C
	SEP.b #$20
	DEC.b $18,x
	BMI.b CODE_0CBB4D
	LDY.b $18,x
	LDA.w DATA_0CBB27,y
	STA.w $7402,x
	LDA.w DATA_0CBB2B,y
	STA.w $7A96,x
	REP.b #$20
CODE_0CBB4C:
	RTL

CODE_0CBB4D:
	LDA.b #$D1
	STA.w $7A98,x
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

DATA_0CBB59:
	db $08,$08,$08,$08,$08,$08,$08,$08,$08,$08,$08,$08,$08,$08,$08,$08
	db $08,$08,$10

CODE_0CBB6C:
	LDX.b $12
	LDA.w $7A98,x
	BEQ.b CODE_0CBB92
	JSR.w CODE_0CBD85
	LDA.w $7A96,x
	BNE.b CODE_0CBB8E
	SEP.b #$20
	LDY.b $16,x
	CPY.b #$12
	BCS.b CODE_0CBB94
	INC.b $16,x
	INY
	LDA.w DATA_0CBB59,y
	STA.w $7A96,x
	REP.b #$20
CODE_0CBB8E:
	JSR.w CODE_0CBD09
	RTL

CODE_0CBB92:
	SEP.b #$20
CODE_0CBB94:
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

CODE_0CBB9B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CBBAE
	LDY.b $16,x
	BEQ.b CODE_0CBBB2
	DEC.b $16,x
	LDA.w #$0001
	STA.w $7A96,x
CODE_0CBBAE:
	JSR.w CODE_0CBD09
	RTL

CODE_0CBBB2:
	SEP.b #$20
	LDA.b #$80
	STA.w $7A98,x
	LDA.b #$03
	STA.b $18,x
	TAY
	LDA.w DATA_0CBBD1,y
	STA.w $7402,x
	LDA.w DATA_0CBBD5,y
	STA.w $7A96,x
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

DATA_0CBBD1:
	db $00,$01,$00,$04

DATA_0CBBD5:
	db $04,$20,$04,$20

CODE_0CBBD9:
	LDX.b $12
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$00A0
	CMP.w #$0140
	BCC.b CODE_0CBC0C
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	SEP.b #$20
	STZ.w $7402,x
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

CODE_0CBC0C:
	LDA.w $7A98,x
	BEQ.b CODE_0CBC24
	LDA.w #$0003
	STA.b $00
	LDA.w #DATA_0CBBD1
	STA.b $02
	LDA.w #DATA_0CBBD5
	STA.b $04
	JSR.w CODE_0CBE2D
	RTL

CODE_0CBC24:
	SEP.b #$20
	LDA.b #$03
	STA.b $18,x
	TAY
	LDA.w DATA_0CBB27,y
	STA.w $7402,x
	LDA.w DATA_0CBB2B,y
	STA.w $7A96,x
	LDA.b #$04
	STA.b $76,x
	REP.b #$20
	RTL

CODE_0CBC3E:
	LDX.b $12
	LDA.w $7A38,x
	CMP.w $7182,x
	BPL.b CODE_0CBC57
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $75E2,x
	JMP.w CODE_0CB92C

CODE_0CBC57:
	RTL

CODE_0CBC58:
	LDX.b $12
	LDY.b $16,x
	BNE.b CODE_0CBC9D
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	CMP.w $7182,x
	BMI.b CODE_0CBC80
	LDA.b $18,x
	BNE.b CODE_0CBC7F
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	STZ.w $7402,x
	INC.b $18,x
CODE_0CBC7F:
	RTL

CODE_0CBC80:
	STA.w $7182,x
	STZ.w $75E2,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
	LDA.w #$0140
	STA.w $7A96,x
	SEP.b #$20
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

CODE_0CBC9D:
	LDA.w $7A96,x
	BNE.b CODE_0CBCAA
	DEC.b $16,x
	LDA.w #$0000
	STA.w $7A96,x
CODE_0CBCAA:
	JSR.w CODE_0CBD09
	RTL

CODE_0CBCAE:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CBCDE
	LDA.w $7A38,x
	CMP.w $7182,x
	BMI.b CODE_0CBCCC
	STA.w $7182,x
	STZ.w $75E2,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	JMP.w CODE_0CB92C

CODE_0CBCCC:
	LDA.b $18,x
	BNE.b CODE_0CBCDE
	LDA.w #$FE00
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	INC.b $18,x
CODE_0CBCDE:
	RTL

DATA_0CBCDF:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0003

DATA_0CBD05:
	dw $FD00,$0300

CODE_0CBD09:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_0CBD17
	LDA.w #!Define_YI_SoundID61_Splash3
	JSL.l CODE_0085D2
CODE_0CBD17:
	LDA.b $16,x
	ASL
	TAY
	LDA.b $14
	AND.w DATA_0CBCDF,y
	BNE.b CODE_0CBD84
	LDY.w $7400,x
	LDA.w DATA_0CBD05,y
	STA.b $00
	LDA.b $16,x
	DEC
	ASL
	ASL
	TAY
	LDA.w DATA_0CB9E4,y
	PHY
	LDY.w $7400,x
	BEQ.b CODE_0CBD3D
	EOR.w #$FFFF
	INC
CODE_0CBD3D:
	PLY
	CLC
	ADC.w $70E2,x
	STA.b $02
	LDA.w $7182,x
	CLC
	ADC.w DATA_0CB9E4+$02,y
	STA.b $04
	LDA.w #!Define_YI_AmbSpr21B
	JSL.l CODE_008B21
	LDA.w $7002,y
	ORA.w #$0002
	STA.w $7002,y
	LDA.w $7400,x
	STA.w $73C0,y
	LDA.b $02
	STA.w $70A2,y
	LDA.b $04
	STA.w $7142,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0010
	STA.w $7782,y
	LDA.w #$0002
	STA.w $73C2,y
CODE_0CBD84:
	RTS

CODE_0CBD85:
	LDA.w #DATA_0CB9E4>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0CB9E4
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_089436>>16
	LDA.w #FXCODE_089436
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	BPL.b CODE_0CBDA7
	RTS

CODE_0CBDA7:
	STA.b $16,x
	DEC
	ASL
	ASL
	TAY
	LDA.w DATA_0CB9E4,y
	PHY
	LDY.w $7400,x
	BEQ.b CODE_0CBDBA
	EOR.w #$FFFF
	INC
CODE_0CBDBA:
	PLY
	CLC
	ADC.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w DATA_0CB9E4+$02,y
	STA.b $02
	LDA.w $7AF6,x
	BNE.b CODE_0CBDF2
	LDA.w #$0004
	STA.w $7AF6,x
	LDA.w #!Define_YI_AmbSpr21E
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0000
	STA.w $73C2,y
CODE_0CBDF2:
	REP.b #$10
	JSL.l CODE_04AC9C
	SEP.b #$10
	PLA
	RTL

CODE_0CBDFC:
	LDY.w $7D36,x
	BPL.b CODE_0CBE06
	JSL.l CODE_03A858
	RTS

CODE_0CBE06:
	DEY
	BMI.b CODE_0CBE2C
	BEQ.b CODE_0CBE2C
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CBE2C
	LDA.w $7D38,y
	BEQ.b CODE_0CBE2C
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	SEP.b #$20
	LDA.b #$0E
	STA.b $76,x
	REP.b #$20
	STZ.w $7A96,x
	STZ.b $18,x
CODE_0CBE2C:
	RTS

CODE_0CBE2D:
	LDA.w $7A96,x
	BNE.b CODE_0CBE4B
	SEP.b #$20
	DEC.b $18,x
	BPL.b CODE_0CBE3C
	LDA.b $00
	STA.b $18,x
CODE_0CBE3C:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.b ($02),y
	STA.w $7402,x
	LDA.b ($04),y
	STA.w $7A96,x
	REP.b #$20
CODE_0CBE4B:
	RTS

;---------------------------------------------------------------------------

DATA_0CBE4C:
	db $06,$1E,$1C,$00,$04,$16,$0D,$00,$05,$1E,$1C,$00,$04,$16,$0C,$00
	db $04,$1E,$1C,$00,$04,$16,$0C,$00,$05,$1E,$1C,$40,$05,$16,$0C,$40
	db $04,$1E,$1C,$40,$05,$16,$0C

DATA_0CBE73:
	db $40,$03,$1E,$1C,$40,$05,$16,$0D,$40,$06,$06,$06,$06,$08,$08,$08
	db $08,$0A,$0A,$0A,$0A

DATA_0CBE88:
	dw $0100,$FF00

DATA_0CBE8C:
	dw $0100,$FF00

DATA_0CBE90:
	dw $0006,$0008,$000A,$000C

YI_NorSpr1AB_BooBalloon_Init:
;$0CBE98
	LDA.w #$0001
	STA.w $0C7E
	LDA.w DATA_0CBE8C
	STA.w $75E0,x
	LDA.w #$0008
	STA.w $7540,x
	LDA.w DATA_0CBE88
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w #$0090
	STA.b $16,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEP.b #$20
	STZ.b $76,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_0CBECE:
	db $02,$01,$01,$00,$03,$04,$04,$05

YI_NorSpr1AB_BooBalloon_Main:
;$0CBED6
	LDY.w $74A2,x
	BMI.b CODE_0CBF21
	LDA.w $7402,x
	BEQ.b CODE_0CBEEE
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0018
	TAY
	JSL.l CODE_03AA60
CODE_0CBEEE:
	LDA.w #DATA_0CBE4C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $76,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	CLC
	ADC.w #DATA_0CBE4C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $16,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$001F
	TAY
	LDA.w DATA_0CBE73,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0898C1>>16
	LDA.w #FXCODE_0898C1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0CBF21:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0CBF2E
	JSR.w CODE_0CC27A
	PLA
	PLY
CODE_0CBF2E:
	JSL.l CODE_03AF23
	JSR.w CODE_0CC01F
	JSR.w CODE_0CC220
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDY.b $77,x
	TYX
	JSR.w (DATA_0CBF97,x)
	LDA.w $0C7E
	BNE.b CODE_0CBF5E
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CBF5E:
	LDY.b #$00
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CBF6B
	LDY.b #$04
CODE_0CBF6B:
	STY.w $7960
	SEP.b #$20
	LDA.w $7221,x
	BPL.b CODE_0CBF78
	EOR.b #$FF
	INC
CODE_0CBF78:
	CMP.b #$03
	BCC.b CODE_0CBF7E
	LDA.b #$03
CODE_0CBF7E:
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_0CBECE,y
	STA.b $76,x
	REP.b #$20
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CBF8F,x)

DATA_0CBF8F:
	dw CODE_0CBF9D
	dw CODE_0CBFA6
	dw CODE_0CBFD6
	dw CODE_0CC006

DATA_0CBF97:
	dw CODE_0CC11F
	dw CODE_0CC156
	dw CODE_0CC1AA

CODE_0CBF9D:
	LDX.b $12
	JSR.w CODE_0CC065
	JSR.w CODE_0CC0F5
	RTL

CODE_0CBFA6:
	LDX.b $12
	LDA.b $78,x
	BNE.b CODE_0CBFBF
	LDA.b $16,x
	CMP.w #$00E0
	BCS.b CODE_0CBFBC
	LDA.b $16,x
	CLC
	ADC.w #$0002
	STA.b $16,x
	RTL

CODE_0CBFBC:
	INC.b $78,x
	RTL

CODE_0CBFBF:
	LDA.b $16,x
	CMP.w #$00CC
	BCC.b CODE_0CBFCF
	LDA.b $16,x
	SEC
	SBC.w #$0002
	STA.b $16,x
	RTL

CODE_0CBFCF:
	JSR.w CODE_0CC065
	JSR.w CODE_0CC0F5
	RTL

CODE_0CBFD6:
	LDX.b $12
	LDA.b $78,x
	BNE.b CODE_0CBFEF
	LDA.b $16,x
	CMP.w #$0120
	BCS.b CODE_0CBFEC
	LDA.b $16,x
	CLC
	ADC.w #$0002
	STA.b $16,x
	RTL

CODE_0CBFEC:
	INC.b $78,x
	RTL

CODE_0CBFEF:
	LDA.b $16,x
	CMP.w #$0100
	BCC.b CODE_0CBFFF
	LDA.b $16,x
	SEC
	SBC.w #$0002
	STA.b $16,x
	RTL

CODE_0CBFFF:
	JSR.w CODE_0CC065
	JSR.w CODE_0CC0F5
	RTL

CODE_0CC006:
	LDX.b $12
	LDA.b $16,x
	CMP.w #$0130
	BCS.b CODE_0CC018
	LDA.b $16,x
	CLC
	ADC.w #$0002
	STA.b $16,x
	RTL

CODE_0CC018:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_0CC01F:
	LDA.w $7402,x
	BEQ.b CODE_0CC064
	LDA.w $7722,x
	BMI.b CODE_0CC064
	REP.b #$10
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_550000+$40C1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$40C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0CC064:
	RTS

CODE_0CC065:
	STZ.w $7A36,x
	LDY.w $7D36,x
	BPL.b CODE_0CC072
	JSL.l CODE_03A858
CODE_0CC071:
	RTS

CODE_0CC072:
	DEY
	BMI.b CODE_0CC071
	BEQ.b CODE_0CC071
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CC071
	LDA.w $7D38,y
	BEQ.b CODE_0CC071
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $02
	TYX
	JSL.l CODE_03B24B
	LDY.b $00
	LDA.w DATA_0CC276,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b $02
	LDA.w DATA_0CC276,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0CC0AF:
	LDX.b $12
	LDA.w $7A36,x
	BNE.b CODE_0CC071
	INC.w $7A36,x
	LDY.b $18,x
	BNE.b CODE_0CC0CC
	LDA.w #$0001
	STA.w $7402,x
	JSL.l CODE_03AD74
	BCC.b CODE_0CC0ED
	JSR.w CODE_0CC01F
CODE_0CC0CC:
	LDA.w #!Define_YI_SoundID16_DeflateBalloon
	JSL.l CODE_0085D2
	STZ.b $78,x
	SEP.b #$20
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	LDY.b $18,x
	LDA.w DATA_0CBE90,y
	STA.w $7BB6,x
	LDA.w DATA_0CBE90,y
	STA.w $7BB8,x
	PLA
	RTL

CODE_0CC0ED:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLA
	RTL

CODE_0CC0F5:
	LDY.b $77,x
	BNE.b CODE_0CC11E
	LDA.b $10
	AND.w #$007F
	CMP.w #$003F
	BNE.b CODE_0CC11E
	JSL.l CODE_008408
	LDA.b $10
	AND.w #$000F
	CLC
	ADC.w #$0020
	STA.w $7A98,x
	JSR.w CODE_0CC174
	SEP.b #$20
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
CODE_0CC11E:
	RTS

CODE_0CC11F:
	LDX.b $12
	LDY.b #$00
	LDA.w $7682,x
	CMP.w #$0020
	BMI.b CODE_0CC12D
	INY
	INY
CODE_0CC12D:
	LDA.w DATA_0CBE88,y
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CC147
	LDA.w $7680,x
	CMP.w #$0060
	BPL.b CODE_0CC146
	LDA.w DATA_0CBE8C
	STA.w $75E0,x
CODE_0CC146:
	RTS

CODE_0CC147:
	LDA.w $7680,x
	CMP.w #$0090
	BMI.b CODE_0CC155
	LDA.w DATA_0CBE8C+$02
	STA.w $75E0,x
CODE_0CC155:
	RTS

CODE_0CC156:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_0CC174
	LDA.w DATA_0CBE8C+$02
	LDY.w $7221,x
	BMI.b CODE_0CC168
	LDA.w DATA_0CBE8C
CODE_0CC168:
	STA.w $75E0,x
	SEP.b #$20
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
	RTS

CODE_0CC174:
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0300
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $75E0,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $75E2,x
	RTS

CODE_0CC1AA:
	LDX.b $12
	LDY.b #$00
	LDA.w $7682,x
	CMP.w #$0020
	BMI.b CODE_0CC1B8
	INY
	INY
CODE_0CC1B8:
	LDA.w DATA_0CBE88,y
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CC1D3
	LDA.w $7680,x
	CMP.w #$0060
	BPL.b CODE_0CC1E1
	LDA.w DATA_0CBE8C
	STA.w $75E0,x
	BRA.b CODE_0CC1E1

CODE_0CC1D3:
	LDA.w $7680,x
	CMP.w #$0090
	BMI.b CODE_0CC1E1
	LDA.w DATA_0CBE8C+$02
	STA.w $75E0,x
CODE_0CC1E1:
	LDA.w $7682,x
	SEC
	SBC.w #$0020
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_0CC217
	LDA.w $7680,x
	CMP.w #$00F0
	BCS.b CODE_0CC217
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A98,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w #$0008
	STA.w $7540,x
	SEP.b #$20
	STZ.b $77,x
	REP.b #$20
CODE_0CC217:
	RTS

DATA_0CC218:
	dw $0100,$0800

DATA_0CC21C:
	dw $0100,$0800

CODE_0CC220:
	LDA.w $0C7E
	BEQ.b CODE_0CC275
	LDA.w $7680,x
	CLC
	ADC.w #$0020
	CMP.w #$0130
	BCC.b CODE_0CC24D
	LDY.b #$00
	CLC
	ADC.w #$0030
	CMP.w #$0190
	BCC.b CODE_0CC23E
	INY
	INY
CODE_0CC23E:
	LDA.w DATA_0CC218,y
	LDY.w $7681,x
	BMI.b CODE_0CC24A
	EOR.w #$FFFF
	INC
CODE_0CC24A:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CC24D:
	LDA.w $7682,x
	CLC
	ADC.w #$0020
	CMP.w #$0110
	BCC.b CODE_0CC275
	LDY.b #$00
	CLC
	ADC.w #$0030
	CMP.w #$0170
	BCC.b CODE_0CC266
	INY
	INY
CODE_0CC266:
	LDA.w DATA_0CC21C,y
	LDY.w $7683,x
	BMI.b CODE_0CC272
	EOR.w #$FFFF
	INC
CODE_0CC272:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0CC275:
	RTS

DATA_0CC276:
	dw $0100,$FF00

CODE_0CC27A:
	LDA.w $6150
	CMP.w #$0003
	BCC.b CODE_0CC28A
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0CC293

CODE_0CC28A:
	LDY.w $77C2,x
	LDA.w DATA_0CC276,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CC293:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $6162
	STZ.w $6168
	RTS

CODE_0CC2A0:
	JSR.w CODE_0CC0AF
	RTL

YI_NorSpr1AB_BooBalloon_StompRt:
;$0CC2A4
	LDY.w $74A2,x
	BMI.b CODE_0CC2EF
	LDA.w $7402,x
	BEQ.b CODE_0CC2BC
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0018
	TAY
	JSL.l CODE_03AA60
CODE_0CC2BC:
	LDA.w #DATA_0CBE4C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $76,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	CLC
	ADC.w #DATA_0CBE4C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $16,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$001F
	TAY
	LDA.w DATA_0CBE73,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0898C1>>16
	LDA.w #FXCODE_0898C1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0CC2EF:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	JSL.l CODE_04849E
	JSL.l CODE_03A32E
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYX
	JSR.w (DATA_0CC306,x)
	RTL

DATA_0CC306:
	dw CODE_0CC32B
	dw CODE_0CC30A

CODE_0CC30A:
	LDX.b $12
	LDA.w #$009D
	JSL.l CODE_03A34C
	BCC.b CODE_0CC348
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	RTS

CODE_0CC32B:
	LDX.b $12
	LDA.w #$0115
	JSL.l CODE_03A34C
	BCC.b CODE_0CC348
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_0CC348:
	RTS

;---------------------------------------------------------------------------

DATA_0CC349:
	db $10,$20,$30,$40,$50,$60,$70,$80,$90,$A0,$B0,$C0,$D0,$E0,$F0,$10
	db $00,$10,$20,$30,$40,$50,$60,$70,$80,$90,$A0,$B0,$C0,$D0,$00,$10

YI_NorSpr1AD_MagicShootingKamek_Init:
;$0CC369
	JSL.l CODE_03AE60
	LDA.w $70E2,x
	STA.w $7A38,x
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0000
	STA.w $7402,x
	LDA.w #$0100
	STA.b $76,x
	SEP.b #$20
	LDA.w $7041,x
	AND.b #$27
	STA.w $7041,x
	LDA.b #$FF
	STA.w $74A2,x
	LDA.b #$02
	STA.w $77C0,x
	REP.b #$20
CODE_0CC39A:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1AD_MagicShootingKamek_Main:
;$0CC39B
	LDA.w $7402,x
	BNE.b CODE_0CC3A4
	JSL.l CODE_03AA52
CODE_0CC3A4:
	JSL.l CODE_03AF23
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CC3AE,x)

DATA_0CC3AE:
	dw CODE_0CC3BA
	dw CODE_0CC53D
	dw CODE_0CC580
	dw CODE_0CC478
	dw CODE_0CC5BC
	dw CODE_0CC5E0

CODE_0CC3BA:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CC39A
	LDA.b $10
	AND.w #$000F
	TAY
	LDA.w DATA_0CC349,y
	AND.w #$00FF
	STA.b $00
	LDA.w !RAM_YI_Global_Layer1XPosLo
	AND.w #$FFF0
	CLC
	ADC.b $00
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	JSL.l CODE_008408
	LDA.w #$0030
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0040
	STA.w $6020
	LDX.b #FXCODE_0AE921>>16
	LDA.w #FXCODE_0AE921
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	BNE.b CODE_0CC442
	LDY.b #$00
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $70E2,x
	CLC
	ADC.w $7B56,x
	SEC
	SBC.w $611C
	BPL.b CODE_0CC40F
	INY
	INY
CODE_0CC40F:
	TYA
	STA.w $7400,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w #$0013
	STA.w $7182,x
	STZ.w $7402,x
	LDA.w #!Define_YI_SoundID31_EnterPipe
	JSL.l CODE_0085D2
	LDA.b $10
	BPL.b CODE_0CC443
	LDA.w #$0030
	STA.b $16,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	LDA.b #$05
	STA.w $74A2,x
	LDA.b #$02
	STA.b $18,x
	REP.b #$20
CODE_0CC442:
	RTL

CODE_0CC443:
	LDA.w #$0001
	STA.b $76,x
	LDA.b $10
	AND.w #$003F
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	LDA.w #$003F
	STA.b $78,x
	SEP.b #$20
	LDA.b #$05
	STA.w $74A2,x
	LDA.b #$04
	STA.b $18,x
	REP.b #$20
	JSR.w CODE_0CC6C4
	RTL

DATA_0CC466:
	db $01,$06,$05,$04,$03,$02,$01

DATA_0CC46D:
	db $10,$08,$10,$02,$02,$02,$30

DATA_0CC474:
	dw $FFF0,$0010

CODE_0CC478:
	LDX.b $12
	JSR.w CODE_0CC6F9
	JSR.w CODE_0CC6F3
	LDA.w $7A96,x
	BNE.b CODE_0CC4D7
	SEP.b #$20
	DEC.b $19,x
	BMI.b CODE_0CC4D8
	LDY.b $19,x
	LDA.w DATA_0CC46D,y
	STA.w $7A96,x
	LDA.w DATA_0CC466,y
	STA.w $7402,x
	REP.b #$20
	CPY.b #$01
	BNE.b CODE_0CC4D7
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0CC474,y
	STA.b $00
	LDA.w #$01AE
	JSL.l CODE_03A364
	BCC.b CODE_0CC4D7
	LDA.b $00
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0002
	STA.w $7182,y
	LDA.w $70E2,y
	CLC
	ADC.w $7B56,y
	STA.w $7CD6,y
	LDA.w $7182,y
	CLC
	ADC.w $7B58,y
	STA.w $7CD8,y
CODE_0CC4D7:
	RTL

CODE_0CC4D8:
	DEC.w $77C0,x
	BEQ.b CODE_0CC4F6
	LDA.b #$06
	STA.b $19,x
	TAY
	LDA.b #$08
	STA.w $7A96,x
	LDA.w DATA_0CC466,y
	STA.w $7402,x
	LDA.w $77C2,x
	STA.w $7400,x
	REP.b #$20
	RTL

CODE_0CC4F6:
	LDA.b #$02
	STA.w $77C0,x
	LDA.b #!Define_YI_SoundID31_EnterPipe
	JSL.l CODE_0085D2
	LDA.w $7041,x
	AND.b #$27
	STA.w $7041,x
	STZ.w $7402,x
	LDA.b $10
	AND.b #$01
	PHP
	JSL.l CODE_008408
	PLP
	BNE.b CODE_0CC524
	LDA.b #$08
	STA.b $18,x
	REP.b #$20
	LDA.w #$0100
	STA.b $16,x
	RTL

CODE_0CC524:
	LDA.b #$0A
	STA.b $18,x
	REP.b #$20
	LDA.w #$0001
	STA.b $76,x
	LDA.b $10
	AND.w #$003F
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	LDA.w #$003F
	STA.b $78,x
	RTL

CODE_0CC53D:
	LDX.b $12
	JSR.w CODE_0CC5F4
	LDA.b $16,x
	CMP.w #$0100
	BCS.b CODE_0CC550
	CLC
	ADC.w #$0010
	STA.b $16,x
	RTL

CODE_0CC550:
	LDA.w #$0100
	STA.b $16,x
	SEP.b #$20
	LDA.w $7041,x
	ORA.b #$10
	STA.w $7041,x
	LDA.b #$06
	STA.b $19,x
	TAY
	LDA.w DATA_0CC46D,y
	STA.w $7A96,x
	LDA.w DATA_0CC466,y
	STA.w $7402,x
	LDA.b $18,x
	CLC
	ADC.b #$04
	STA.b $18,x
	LDA.w $77C2,x
	STA.w $7400,x
	REP.b #$20
	RTL

CODE_0CC580:
	LDX.b $12
	JSR.w CODE_0CC679
	DEC.b $78,x
	BMI.b CODE_0CC594
	LDA.b $16,x
	CLC
	ADC.b $76,x
	AND.w #$003F
	STA.b $16,x
	RTL

CODE_0CC594:
	SEP.b #$20
	LDA.w $7041,x
	ORA.b #$10
	STA.w $7041,x
	LDA.b #$06
	STA.b $19,x
	TAY
	LDA.w DATA_0CC46D,y
	STA.w $7A96,x
	LDA.w DATA_0CC466,y
	STA.w $7402,x
	INC.b $18,x
	INC.b $18,x
	LDA.w $77C2,x
	STA.w $7400,x
	REP.b #$20
	RTL

CODE_0CC5BC:
	LDX.b $12
	JSR.w CODE_0CC5F4
	LDA.b $16,x
	CMP.w #$0030
	BCC.b CODE_0CC5CF
	SEC
	SBC.w #$0010
	STA.b $16,x
	RTL

CODE_0CC5CF:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	LDA.b #$20
	STA.w $7A96,x
	STZ.b $18,x
	REP.b #$20
	RTL

CODE_0CC5E0:
	LDX.b $12
	JSR.w CODE_0CC640
	DEC.b $78,x
	BMI.b CODE_0CC5CF
	LDA.b $16,x
	CLC
	ADC.b $76,x
	AND.w #$003F
	STA.b $16,x
	RTL

CODE_0CC5F4:
	LDA.w $7402,x
	BNE.b CODE_0CC63F
	LDA.w $7722,x
	BMI.b CODE_0CC63F
	REP.b #$10
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_550000+$60C1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$60C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0CC63F:
	RTS

CODE_0CC640:
	LDA.w $7402,x
	BNE.b CODE_0CC678
	LDA.w $7722,x
	BMI.b CODE_0CC678
	REP.b #$10
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	SEP.b #$10
	LDX.b #FXCODE_089981>>16
	LDA.w #FXCODE_089981
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0CC678:
	RTS

CODE_0CC679:
	LDA.w $7402,x
	BNE.b CODE_0CC6C3
	LDA.w $7722,x
	BMI.b CODE_0CC6C3
	REP.b #$10
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #FXDATA_550000+$60C0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_550000+$60C0)>>16
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	SEP.b #$10
	LDX.b #FXCODE_089A4B>>16
	LDA.w #FXCODE_089A4B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0CC6C3:
	RTS

CODE_0CC6C4:
	LDA.w $7402,x
	BNE.b CODE_0CC6F2
	LDA.w $7722,x
	BMI.b CODE_0CC6F2
	REP.b #$10
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_089A29>>16
	LDA.w #FXCODE_089A29
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0CC6F2:
	RTS

CODE_0CC6F3:
	LDY.w $7D36,x
	BPL.b CODE_0CC6F8
CODE_0CC6F8:
	RTS

CODE_0CC6F9:
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0CC719
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCC.b CODE_0CC74E
CODE_0CC719:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_0CC74D
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0CC74D
	LDA.w $7182,x
	SEC
	SBC.w $7182,y
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCC.b CODE_0CC74E
CODE_0CC74D:
	RTS

CODE_0CC74E:
	LDA.w #!Define_YI_SoundID31_EnterPipe
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.w $7041,x
	AND.b #$27
	STA.w $7041,x
	STZ.w $7402,x
	LDA.b $10
	AND.b #$01
	PHP
	JSL.l CODE_008408
	PLP
	BNE.b CODE_0CC77B
	LDA.b #$08
	STA.b $18,x
	REP.b #$20
	LDA.w #$0100
	STA.b $16,x
	BRA.b CODE_0CC793

CODE_0CC77B:
	LDA.b #$0A
	STA.b $18,x
	REP.b #$20
	LDA.w #$0001
	STA.b $76,x
	LDA.b $10
	AND.w #$003F
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	LDA.w #$003F
	STA.b $78,x
CODE_0CC793:
	PLA
	RTL

YI_NorSpr1AD_MagicShootingKamek_StompRt:
;$0CC795
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1AE_MagicShot_Init:
;$0CC796
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1AE_MagicShot_Main:
;$0CC797
	JSL.l CODE_03AF23
	JSR.w CODE_0CC844
	JSR.w CODE_0CC8D4
	LDA.w $7A96,x
	BNE.b CODE_0CC7BB
	LDA.w $7402,x
	INC
	CMP.w #$000C
	BCC.b CODE_0CC7B2
	LDA.w #$0000
CODE_0CC7B2:
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
CODE_0CC7BB:
	LDA.w $7A98,x
	BNE.b CODE_0CC7CD
	LDA.w #$0808
	JSL.l CODE_029BD9
	LDA.w #$0005
	STA.w $7A98,x
CODE_0CC7CD:
	LDY.b $16,x
	TYX
	JMP.w (DATA_0CC7D3,x)

DATA_0CC7D3:
	dw CODE_0CC7D7
	dw CODE_0CC839

CODE_0CC7D7:
	LDX.b $12
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
	LDA.w $7AF8,x
	BNE.b CODE_0CC838
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $75E0,x
	BPL.b CODE_0CC81A
	EOR.w #$FFFF
	INC
CODE_0CC81A:
	LSR
	LSR
	LSR
	LSR
	STA.w $7540,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $75E2,x
	BPL.b CODE_0CC82D
	EOR.w #$FFFF
	INC
CODE_0CC82D:
	LSR
	LSR
	LSR
	LSR
	STA.w $7542,x
	INC.b $16,x
	INC.b $16,x
CODE_0CC838:
	RTL

CODE_0CC839:
	LDX.b $12
	RTL

DATA_0CC83C:
	dw !Define_YI_NorSpr13E_FlyingFang
	dw !Define_YI_NorSpr108_Milde
	dw !Define_YI_NorSpr01E_Shyguy

CODE_0CC842:
	LDX.b #$01
CODE_0CC844:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700006,x
	CMP.w #$9D8B
	BEQ.b CODE_0CC858
	SEP.b #$10
	LDX.b $12
	RTS

CODE_0CC858:
	LDA.l $700000,x
	AND.w #$FFF0
	STA.b $00
	STA.w $0091
	LDA.l $700002,x
	AND.w #$FFF0
	STA.b $02
	STA.w $0093
	SEP.b #$10
	LDA.w #$0001
	STA.w $008F
	LDA.w #$0000
	STA.w $0095
	JSL.l CODE_109295
	LDA.w #!Define_YI_SoundID15_Growth
	JSL.l CODE_0085D2
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0006
	STA.w $73C2,y
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w DATA_0CC83C,y
	TXY
	JSL.l CODE_03A377
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,y
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	PLA
	RTL

CODE_0CC8D4:
	LDY.w $7D36,x
	BMI.b CODE_0CC8DA
	RTS

CODE_0CC8DA:
	JSL.l CODE_03A858
	PLA
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

YI_NorSpr0A0_Tulip_Init:
;$0CC8E3
	JSL.l CODE_03D3F8
	BEQ.b CODE_0CC8ED
	JML.l CODE_03A31E

CODE_0CC8ED:
	STZ.w $7400,x
	JSL.l CODE_03AE8D
	LDA.w #$0100
	STA.b $18,x
	STA.w $7A36,x
	STA.w $7A38,x
	JSR.w CODE_0CCC22
	LDA.w #$0008
	STA.w $7B56,x
	JSL.l CODE_0CC969
	RTL

;---------------------------------------------------------------------------

DATA_0CC90D:
	dw $FD00,$FD80,$FC00,$FC80,$FD40,$FDC0,$FC40,$FCC0

YI_NorSpr0A0_Tulip_Main:
;$0CC91D
	JSR.w CODE_0CCBD3
	JSL.l CODE_03AF23
	LDY.b $76,x
	TYX
	JMP.w (DATA_0CC92A,x)

DATA_0CC92A:
	dw CODE_0CC938
	dw CODE_0CC98E
	dw CODE_0CC9B9
	dw CODE_0CCA44
	dw CODE_0CCAE3
	dw CODE_0CCB1E
	dw CODE_0CCB62

CODE_0CC938:
	LDX.b $12
	JSR.w CODE_0CCC22
	JSR.w CODE_0CCD43
	LDA.b $16,x
	CMP.w #$1FE0
	BCC.b CODE_0CC95B
	LDA.w #$1FE0
	STA.b $16,x
	LDA.w #$00A0
	STA.b $18,x
	SEP.b #$20
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	BRA.b CODE_0CC969

CODE_0CC95B:
	CLC
	ADC.w #$0055
	STA.b $16,x
	LDA.b $18,x
	SEC
	SBC.w #$0001
	STA.b $18,x
CODE_0CC969:
	LDA.b $16,x
	XBA
	AND.w #$00FF
	LSR
	LSR
	LSR
	STA.b $00
	CLC
	ADC.w #$0008
	STA.w $7B58,x
	LDA.w #$0008
	CLC
	ADC.b $00
	STA.w $7BB6,x
	LDA.w #$000A
	SEC
	SBC.b $00
	STA.w $7BB8,x
	RTL

CODE_0CC98E:
	LDX.b $12
	JSR.w CODE_0CCC22
	JSR.w CODE_0CCD43
	LDA.b $16,x
	BNE.b CODE_0CC9A9
	STZ.b $16,x
	LDA.w #$0100
	STA.b $18,x
	SEP.b #$20
	STZ.b $76,x
	REP.b #$20
	BRA.b CODE_0CC969

CODE_0CC9A9:
	SEC
	SBC.w #$0055
	STA.b $16,x
	LDA.b $18,x
	CLC
	ADC.w #$0001
	STA.b $18,x
	BRA.b CODE_0CC969

CODE_0CC9B9:
	LDX.b $12
	JSR.w CODE_0CCC22
	JSR.w CODE_0CCE17
	LDA.b $16,x
	BNE.b CODE_0CCA12
	STZ.b $16,x
	LDA.w #$0100
	STA.b $18,x
	LDA.w #$0010
	STA.w $7B58,x
	LDA.w #$0008
	STA.w $7BB6,x
	LDA.w #$0006
	STA.w $7BB8,x
	LDA.w !RAM_YI_Level_StarTimerLo
	BEQ.b CODE_0CC9F6
	STA.w !REGISTER_DividendLo
	LDY.b #$0A
	STY.w !REGISTER_Divisor
	NOP #8
	LDA.w !REGISTER_QuotientLo
CODE_0CC9F6:
	SEP.b #$20
	STA.b $00
	LDA.b #$1E
	SEC
	SBC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	LDA.b #$08
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	JSL.l CODE_03D3EB
	RTL

CODE_0CCA12:
	SEC
	SBC.w #$0100
	BPL.b CODE_0CCA1B
	LDA.w #$0000
CODE_0CCA1B:
	STA.b $16,x
	LDA.b $18,x
	CLC
	ADC.w #$0003
	CMP.w #$0100
	BCC.b CODE_0CCA2B
	LDA.w #$0100
CODE_0CCA2B:
	STA.b $18,x
	JMP.w CODE_0CC969

CODE_0CCA30:
	CLC
	ADC.w #$0002
	STA.w $7A36,x
	LDA.w $7A38,x
	SEC
	SBC.w #$0008
	STA.w $7A38,x
	STA.b $18,x
	RTL

CODE_0CCA44:
	LDX.b $12
	JSR.w CODE_0CCCAA
	JSR.w CODE_0CCE17
	LDA.w $7A36,x
	CMP.w #$0120
	BCC.b CODE_0CCA30
	LDA.w #$0120
	STA.w $7A36,x
	LDA.w #$0080
	STA.w $7A38,x
	STA.b $18,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	BEQ.b CODE_0CCA69
	BPL.b CODE_0CCA7D
CODE_0CCA69:
	LDA.w #$0100
	STA.b $00
	LDA.w #$0140
	STA.b $02
	LDA.w #$0010
	STA.b $04
	LDA.w #$0115
	BRA.b CODE_0CCA89

CODE_0CCA7D:
	LDA.w #$0180
	STA.b $00
	STZ.b $02
	STZ.b $04
	LDA.w #$01A2
CODE_0CCA89:
	JSL.l CODE_03A364
	BCC.b CODE_0CCACD
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.b $10
	AND.w #$000E
	TAX
	LDA.l DATA_03C74C,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $10
	LSR
	LSR
	LSR
	LSR
	AND.w #$000E
	TAX
	LDA.w DATA_0CC90D,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
	LDA.b $00
	STA.w $7A96,y
	LDA.b $02
	STA.w $7A98,y
	LDA.b $04
	STA.w $7AF6,y
CODE_0CCACD:
	LDA.w #!Define_YI_SoundID6E_FlyGuyGettingAway
	JSL.l CODE_0085D2
	SEP.b #$20
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

CODE_0CCAE3:
	LDX.b $12
	JSR.w CODE_0CCCAA
	JSR.w CODE_0CCE17
	LDA.w $7A36,x
	CMP.w #$00F1
	BCS.b CODE_0CCB0A
	LDA.w #$00F0
	STA.w $7A36,x
	LDA.w #$0100
	STA.w $7A38,x
	STA.b $18,x
	SEP.b #$20
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

CODE_0CCB0A:
	SEC
	SBC.w #$000C
	STA.w $7A36,x
	LDA.w $7A38,x
	CLC
	ADC.w #$0020
	STA.w $7A38,x
	STA.b $18,x
	RTL

CODE_0CCB1E:
	LDX.b $12
	JSR.w CODE_0CCCAA
	JSR.w CODE_0CCE17
	LDA.w $7A36,x
	CMP.w #$0100
	BCC.b CODE_0CCB5A
	LDA.w #$0100
	STA.w $7A36,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0CCB4E
	LDA.w #$0080
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEP.b #$20
	INC.b $76,x
	INC.b $76,x
	REP.b #$20
	RTL

CODE_0CCB4E:
	SEP.b #$20
	LDA.b $76,x
	SEC
	SBC.b #$04
	STA.b $76,x
	REP.b #$20
	RTL

CODE_0CCB5A:
	CLC
	ADC.w #$0001
	STA.w $7A36,x
	RTL

CODE_0CCB62:
	LDX.b $12
	JSR.w CODE_0CCCAA
	LDA.w $7A96,x
	BEQ.b CODE_0CCBA9
	LDY.w $74A2,x
	CPY.b #$FF
	BNE.b CODE_0CCB7B
	LDA.w #$0001
	STA.w $74A2,x
	BRA.b CODE_0CCBA8

CODE_0CCB7B:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BIT.w #$FF00
	BEQ.b CODE_0CCB96
	AND.w #$00FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
CODE_0CCB96:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0004
	CMP.w #$0100
	BMI.b CODE_0CCBA5
	LDA.w #$0100
CODE_0CCBA5:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0CCBA8:
	RTL

CODE_0CCBA9:
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	JML.l CODE_03A32E

CODE_0CCBD3:
	LDY.w $74A2,x
	CPY.b #$FF
	BNE.b CODE_0CCBDD
CODE_0CCBDA:
	SEP.b #$10
	RTS

CODE_0CCBDD:
	REP.b #$10
	LDY.w $7362,x
	BMI.b CODE_0CCBDA
	LDA.w $7722,x
	BMI.b CODE_0CCBDA
	TAX
	LDA.l DATA_03AA0E,x
	STA.w $6000
	LDA.l DATA_03AA0E+$02,x
	STA.w $6002
	LDA.l DATA_03AA0E+$04,x
	STA.w $6004
	LDA.l DATA_03AA0E+$06,x
	STA.w $6006
	LDA.l DATA_03AA0E+$08,x
	STA.w $6008
	LDA.l DATA_03AA0E+$0C,x
	STA.w $600A
	SEP.b #$10
	LDX.b #FXCODE_089AC6>>16
	LDA.w #FXCODE_089AC6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_0CCC22:
	REP.b #$10
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_550000+$0031
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0031)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	CLC
	ADC.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088C15>>16
	LDA.w #FXCODE_088C15
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDA.b $16,x
	XBA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #FXDATA_550000+$0061
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0061)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_0CCCAA:
	REP.b #$10
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_550000+$0031
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0031)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	CLC
	ADC.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088C15>>16
	LDA.w #FXCODE_088C15
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDA.w #$0018
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_550000+$0061
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0061)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0CCD3A:
	RTS

DATA_0CCD3B:
	dw $FF00,$0100

DATA_0CCD3F:
	dw $FF00,$0100

CODE_0CCD43:
	LDY.w $7D36,x
	BMI.b CODE_0CCD3A
	PHX
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0CCD3A
	BEQ.b CODE_0CCD3A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CCD3A
	LDA.w $7D38,y
	BEQ.b CODE_0CCD3A
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0CCDCE
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	CLC
	ADC.w #$000E
	CMP.w #$001C
	BCS.b CODE_0CCDCE
	LDA.w $7BB8,x
	INC
	LSR
	STA.b $00
	CLC
	ADC.w $7BB8,y
	STA.b $02
	LDA.w $7CD8,x
	SEC
	SBC.b $00
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CCD9D
	EOR.w #$FFFF
	INC
CODE_0CCD9D:
	CMP.b $02
	BEQ.b CODE_0CCDA3
	BPL.b CODE_0CCDCE
CODE_0CCDA3:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYX
	JSL.l CODE_03A32E
	LDX.b $12
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.w $7040,x
	AND.b #$F3
	STA.w $7040,x
	LDA.b #$04
	STA.b $76,x
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	PLA
	RTL

CODE_0CCDCE:
	LDA.w #DATA_0CCD3B
	STA.b $00
	LDA.w #DATA_0CCD3F
	STA.b $02
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	BPL.b CODE_0CCDE5
	INC.b $00
	INC.b $00
CODE_0CCDE5:
	LDA.w $7182,x
	SEC
	SBC.w $7182,y
	BPL.b CODE_0CCDF2
	INC.b $02
	INC.b $02
CODE_0CCDF2:
	LDA.b ($00)
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b ($02)
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CCE0F
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_0CCE0F
	LDA.w #$0040
	STA.w $7542,y
CODE_0CCE0F:
	LDA.w #!Define_YI_SoundID49_Jump
	JSL.l CODE_0085D2
CODE_0CCE16:
	RTS

CODE_0CCE17:
	LDY.w $7D36,x
	BMI.b CODE_0CCE16
	PHX
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0CCE16
	BEQ.b CODE_0CCE16
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CCE16
	LDA.w $7D38,y
	BEQ.b CODE_0CCE16
	BRA.b CODE_0CCDCE

;---------------------------------------------------------------------------

DATA_0CCE41:
	dw $FF00,$0100

DATA_0CCE45:
	dw $000E,$000C

DATA_0CCE49:
	dw $0061,$04A1

YI_NorSpr0DF_PiscatoryPete_Init:
;$0CCE4D
	LDY.w $7400,x
	LDA.w DATA_0CCE41,y
	STA.w $75E0,x
	LDA.w #$0004
	STA.w $7540,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.b $16,x
	TAY
	LDA.w $7042,x
	ORA.w DATA_0CCE45,y
	STA.w $7042,x
	LDA.w DATA_0CCE49,y
	STA.w $6FA2,x
	SEP.b #$20
	LDA.b #$FF
	STA.b $78,x
	STA.w $7863,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0DF_PiscatoryPete_Main:
;$0CCE83
	JSL.l CODE_03AF23
	JSL.l CODE_0CD017
	JSL.l CODE_0CD053
	JSR.w CODE_0CD00D
	LDY.b $16,x
	TYX
	JMP.w (DATA_0CCE98,x)

DATA_0CCE98:
	dw CODE_0CCE9C
	dw CODE_0CCEA8

CODE_0CCE9C:
	LDX.b $12
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CCEA4,x)

DATA_0CCEA4:
	dw CODE_0CCEB4
	dw CODE_0CCFB2

CODE_0CCEA8:
	LDX.b $12
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CCEB0,x)

DATA_0CCEB0:
	dw CODE_0CCEB4
	dw CODE_0CCF13

CODE_0CCEB4:
	LDX.b $12
	LDA.w $7540,x
	BEQ.b CODE_0CCECF
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E0,x
	CLC
	ADC.w $7540,x
	CMP.b $00
	BEQ.b CODE_0CCECF
	BCS.b CODE_0CCEFC
CODE_0CCECF:
	LDA.w $7542,x
	BEQ.b CODE_0CCEE8
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E2,x
	CLC
	ADC.w $7542,x
	CMP.b $00
	BEQ.b CODE_0CCEE8
	BCS.b CODE_0CCEFC
CODE_0CCEE8:
	STZ.w $75E0,x
	STZ.w $75E2,x
	SEP.b #$20
	LDA.b #$01
	STA.w $7402,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	RTL

CODE_0CCEFC:
	LDA.w $7A96,x
	BNE.b CODE_0CCF12
	SEP.b #$20
	LDA.b #$04
	STA.w $7A96,x
	LDA.w $7402,x
	EOR.b #$01
	STA.w $7402,x
	REP.b #$20
CODE_0CCF12:
	RTL

CODE_0CCF13:
	LDX.b $12
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDA.w $7540,x
	BEQ.b CODE_0CCF37
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E0,x
	CLC
	ADC.w $7540,x
	CMP.b $00
	BEQ.b CODE_0CCF37
	BCS.b CODE_0CCF50
CODE_0CCF37:
	LDA.w $7542,x
	BEQ.b CODE_0CCF53
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E2,x
	CLC
	ADC.w $7542,x
	CMP.b $00
	BEQ.b CODE_0CCF53
	BCC.b CODE_0CCF53
CODE_0CCF50:
	JMP.w CODE_0CCFD7

CODE_0CCF53:
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $75E0,x
	BPL.b CODE_0CCF88
	EOR.w #$FFFF
	INC
CODE_0CCF88:
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $7540,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $75E2,x
	BPL.b CODE_0CCF9D
	EOR.w #$FFFF
	INC
CODE_0CCF9D:
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $7542,x
	SEP.b #$20
	STZ.w $7402,x
	DEC.b $18,x
	DEC.b $18,x
	REP.b #$20
	RTL

CODE_0CCFB2:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0CCFC2
	LDA.w $7400,x
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CCFD7
CODE_0CCFC2:
	LDY.w $7400,x
	LDA.w DATA_0CCE41,y
	STA.w $75E0,x
	SEP.b #$20
	STZ.w $7402,x
	DEC.b $18,x
	DEC.b $18,x
	REP.b #$20
	RTL

CODE_0CCFD7:
	LDY.b $19,x
	BNE.b CODE_0CCFF7
	LDA.w $7A96,x
	BNE.b CODE_0CCFF6
	SEP.b #$20
	LDA.b $10
	AND.b #$1F
	BNE.b CODE_0CCFF4
	LDA.b #$08
	STA.w $7A96,x
	LDA.b #$02
	STA.w $7402,x
	INC.b $19,x
CODE_0CCFF4:
	REP.b #$20
CODE_0CCFF6:
	RTL

CODE_0CCFF7:
	LDA.w $7A96,x
	BNE.b CODE_0CD00C
	SEP.b #$20
	LDA.b #$01
	STA.w $7402,x
	LDA.b #$08
	STA.w $7A96,x
	STZ.b $19,x
	REP.b #$20
CODE_0CD00C:
	RTL

CODE_0CD00D:
	LDY.w $7D36,x
	BPL.b CODE_0CD016
	JSL.l CODE_03A858
CODE_0CD016:
	RTS

CODE_0CD017:
	LDY.w $7862,x
	BNE.b CODE_0CD031
	SEP.b #$20
	STZ.b $78,x
	REP.b #$20
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	PLY
	PLA
	RTL

CODE_0CD031:
	LDY.b $78,x
	BNE.b CODE_0CD052
CODE_0CD035:
	STZ.w $75E0,x
	STZ.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	SEP.b #$20
	LDA.b #$01
	STA.w $7402,x
	LDA.b #$02
	STA.b $18,x
	DEC.b $78,x
	REP.b #$20
	PLY
	PLA
CODE_0CD052:
	RTL

CODE_0CD053:
	LDA.b $16,x
	BEQ.b CODE_0CD05F
	LDA.w $7860,x
	BIT.w #$000F
	BNE.b CODE_0CD035
CODE_0CD05F:
	RTL

;---------------------------------------------------------------------------

DATA_0CD060:
	db $02,$02,$05,$05

YI_NorSpr0E0_PreyingMantas_Init:
;$0CD064
	LDA.w #$FF00
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	LDA.w $7182,x
	STA.b $18,x
	LDA.w #$0003
	STA.w $7402,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_0CD060,y
	STA.b $76,x
	RTL

;---------------------------------------------------------------------------

DATA_0CD08B:
	dw $0008,$0004,$0004,$0008

YI_NorSpr0E0_PreyingMantas_Main:
;$0CD093
	JSL.l CODE_03AF23
	JSR.w CODE_0CD00D
	LDY.b $16,x
	TYX
	JSR.w (DATA_0CD0A1,x)
	RTL

DATA_0CD0A1:
	dw CODE_0CD0A5
	dw CODE_0CD106

CODE_0CD0A5:
	LDX.b $12
	LDA.w $75E2,x
	BEQ.b CODE_0CD0CD
	LDA.w $7A96,x
	BNE.b CODE_0CD105
	DEC.w $7402,x
	BMI.b CODE_0CD0C4
	SEP.b #$20
	LDY.w $7402,x
	LDA.w DATA_0CD08B,y
	STA.w $7A96,x
	REP.b #$20
	RTS

CODE_0CD0C4:
	LDA.w #$0003
	STA.w $7402,x
	STZ.w $75E2,x
CODE_0CD0CD:
	LDA.w $7542,x
	ASL
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E2,x
	CLC
	ADC.w $7542,x
	CMP.b $00
	BCS.b CODE_0CD105
	LDY.b $77,x
	BNE.b CODE_0CD0F9
	LDA.w #$0080
	STA.w $75E2,x
	SEP.b #$20
	LDA.b $76,x
	STA.b $77,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	RTS

CODE_0CD0F9:
	LDA.w #$FF00
	STA.w $75E2,x
	SEP.b #$20
	DEC.b $77,x
	REP.b #$20
CODE_0CD105:
	RTS

CODE_0CD106:
	LDX.b $12
	LDA.b $18,x
	CMP.w $7182,x
	BPL.b CODE_0CD11D
	STA.w $7182,x
	LDA.w #$FF00
	STA.w $75E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $16,x
CODE_0CD11D:
	RTS

;---------------------------------------------------------------------------

DATA_0CD11E:
	dw $0000,$0100

YI_NorSpr0E1_LochNestor_Init:
;$0CD122
	LDA.w #$00A0
	STA.b $16,x
	LDA.w $70E2,x
	STA.w $7A36,x
	LDA.w $7182,x
	STA.w $7A38,x
	LDY.w $7400,x
	LDA.w DATA_0CD11E,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSL.l CODE_03AE60
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_0CD14A:
	dl FXDATA_548000+$40A0
	dl FXDATA_548000+$40C0

DATA_0CD150:
	db $F5,$FE,$F6,$F6

YI_NorSpr0E1_LochNestor_Main:
;$0CD154
	LDY.w $74A2,x
	BMI.b CODE_0CD18E
	LDA.w $7402,x
	CMP.w #$0002
	BCC.b CODE_0CD18E
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0010
	TAY
	JSL.l CODE_03AA60
	SEP.b #$10
	LDA.w #DATA_0CD150>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0CD150
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$0002
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_089B64>>16
	LDA.w #FXCODE_089B64
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0CD18E:
	JSL.l CODE_03AF23
	JSR.w CODE_0CD3DC
	LDA.w $7A96,x
	BNE.b CODE_0CD1A9
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0CD1A9:
	JSR.w CODE_0CD435
	LDA.w $6FA0,x
	BIT.w #$0020
	BEQ.b CODE_0CD1BA
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CD1DB,x)

CODE_0CD1BA:
	LDY.b $18,x
	BEQ.b CODE_0CD1D5
	LDA.w $7A98,x
	BNE.b CODE_0CD1D5
	SEP.b #$20
	LDA.w $6FA0,x
	ORA.b #$20
	STA.w $6FA0,x
	STZ.b $18,x
	LDA.b #$04
	STA.b $19,x
	REP.b #$20
CODE_0CD1D5:
	LDY.b $19,x
	TYX
	JMP.w (DATA_0CD1E7,x)

DATA_0CD1DB:
	dw CODE_0CD347
	dw CODE_0CD36E
	dw CODE_0CD387
	dw CODE_0CD3AB
	dw CODE_0CD3B6
	dw CODE_0CD3BD

DATA_0CD1E7:
	dw CODE_0CD1ED
	dw CODE_0CD228
	dw CODE_0CD287

CODE_0CD1ED:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC
	AND.w #$01FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$01FE
	REP.b #$10
	TXY
	TAX
	LDA.l DATA_00E9D4,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7A36,y
	STA.w $70E2,y
	LDA.l DATA_00E954,x
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.w $7400,y
	TYX
	SEP.b #$10
	RTL

CODE_0CD228:
	LDX.b $12
	JSL.l CODE_0CD4AF
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $75E0,x
	BPL.b CODE_0CD263
	EOR.w #$FFFF
	INC
CODE_0CD263:
	LSR
	LSR
	LSR
	LSR
	STA.w $7540,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $75E2,x
	BPL.b CODE_0CD276
	EOR.w #$FFFF
	INC
CODE_0CD276:
	LSR
	LSR
	LSR
	LSR
	STA.w $7542,x
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	RTL

CODE_0CD287:
	LDX.b $12
	JSL.l CODE_0CD4AF
	LDY.b #$00
	LDA.w $70E2,x
	CMP.w $7A36,x
	BPL.b CODE_0CD299
	INY
	INY
CODE_0CD299:
	TYA
	STA.w $7400,x
	STZ.b $00
	LDA.w $70E2,x
	SEC
	SBC.w $7A36,x
	CLC
	ADC.w #$0001
	CMP.w #$0002
	BCS.b CODE_0CD2BD
	LDA.w $7A36,x
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	INC.b $00
CODE_0CD2BD:
	LDA.w $7182,x
	SEC
	SBC.w $7A38,x
	CLC
	ADC.w #$0001
	CMP.w #$0002
	BCS.b CODE_0CD2F5
	LDA.w $7A38,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.b $00
	BEQ.b CODE_0CD2F5
	LDY.w $7400,x
	LDA.w DATA_0CD11E,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.w $6FA2,x
	AND.b #$E0
	STA.w $6FA2,x
	STZ.b $19,x
	REP.b #$20
	RTL

CODE_0CD2F5:
	LDX.b $12
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $75E0,x
	BPL.b CODE_0CD32C
	EOR.w #$FFFF
	INC
CODE_0CD32C:
	LSR
	LSR
	LSR
	LSR
	STA.w $7540,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $75E2,x
	BPL.b CODE_0CD33F
	EOR.w #$FFFF
	INC
CODE_0CD33F:
	LSR
	LSR
	LSR
	LSR
	STA.w $7542,x
	RTL

CODE_0CD347:
	LDX.b $12
	LDA.w #$00A0
	CMP.b $16,x
	BCC.b CODE_0CD365
	STA.b $16,x
	LDA.w $6FA0,x
	AND.w #$FFDF
	STA.w $6FA0,x
	LDA.w $7402,x
	AND.w #$0001
	STA.w $7402,x
	RTL

CODE_0CD365:
	LDA.b $16,x
	SEC
	SBC.w #$0002
	STA.b $16,x
	RTL

CODE_0CD36E:
	LDX.b $12
	LDA.b $16,x
	CMP.w #$00EC
	BCC.b CODE_0CD380
CODE_0CD377:
	SEP.b #$20
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	RTL

CODE_0CD380:
	CLC
	ADC.w #$0002
	STA.b $16,x
	RTL

CODE_0CD387:
	LDX.b $12
	LDA.w #$00CC
CODE_0CD38C:
	CMP.b $16,x
	BCC.b CODE_0CD3A2
	STA.b $16,x
	LDA.w $6FA0,x
	AND.w #$FFDF
	STA.w $6FA0,x
	LDA.w #$0140
	STA.w $7A98,x
	RTL

CODE_0CD3A2:
	LDA.b $16,x
	SEC
	SBC.w #$0001
	STA.b $16,x
	RTL

CODE_0CD3AB:
	LDX.b $12
	LDA.b $16,x
	CMP.w #$0120
	BCC.b CODE_0CD380
	BRA.b CODE_0CD377

CODE_0CD3B6:
	LDX.b $12
	LDA.w #$0100
	BRA.b CODE_0CD38C

CODE_0CD3BD:
	LDX.b $12
	LDA.b $16,x
	CMP.w #$0133
	BCS.b CODE_0CD3CD
	CLC
	ADC.w #$0001
	STA.b $16,x
	RTL

CODE_0CD3CD:
	JSL.l CODE_04849E
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	JML.l CODE_03A31E

CODE_0CD3DC:
	LDA.w $7402,x
	CMP.w #$0002
	BCC.b CODE_0CD434
	LDA.w $7722,x
	BMI.b CODE_0CD434
	REP.b #$10
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7402,x
	AND.w #$0001
	STA.b $00
	ASL
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_0CD14A,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w DATA_0CD14A+$02,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEP.b #$10
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0CD434:
	RTS

CODE_0CD435:
	LDA.w $6FA0,x
	BIT.w #$0020
	BNE.b CODE_0CD434
	LDY.w $7D36,x
	BMI.b CODE_0CD4AA
	DEY
	BMI.b CODE_0CD434
	BEQ.b CODE_0CD434
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CD434
	LDA.w $7D38,y
	BEQ.b CODE_0CD45D
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	BRA.b CODE_0CD46C

CODE_0CD45D:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr015_SubmarineTorpedo
	BNE.b CODE_0CD434
	TYX
	JSL.l CODE_0481A1
	LDX.b $12
CODE_0CD46C:
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $7542,x
	SEP.b #$20
	LDA.w $7402,x
	ORA.b #$02
	STA.w $7402,x
	LDA.b #$10
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $6FA0,x
	ORA.b #$20
	STA.w $6FA0,x
	LDA.w $6FA2,x
	ORA.b #$01
	STA.w $6FA2,x
	INC.b $18,x
	INC.b $18,x
	LDA.b #$02
	STA.b $19,x
	REP.b #$20
	PLA
	RTL

CODE_0CD4AA:
	JSL.l CODE_03A858
	RTS

CODE_0CD4AF:
	LDY.w $7862,x
	BNE.b CODE_0CD4C2
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	PLY
	PLA
CODE_0CD4C2:
	RTL

;---------------------------------------------------------------------------

DATA_0CD4C3:
	dw $0001,$0002,$0004,$0008,$0010,$0020,$0040

DATA_0CD4D1:
	dw $FFFE,$FFFD,$FFFB,$FFF7,$FFEF,$FFDF,$FFBF

DATA_0CD4DF:
	dw $0000,$0400,$0800,$0C00,$1000,$1400,$1800

DATA_0CD4ED:
	dw $FFFF,$FFE0

DATA_0CD4F1:
	dw $2005,$0804

YI_NorSpr071_BigBoo_Init:
;$0CD4F5
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	STA.b $76,x
	REP.b #$20
	BNE.b CODE_0CD525
	TXY
	LDX.b #$0C
	LDA.w $0CC4
CODE_0CD50B:
	BIT.w DATA_0CD4C3,x
	BEQ.b CODE_0CD519
	DEX
	DEX
	BPL.b CODE_0CD50B
	TYX
	JML.l CODE_03A31E

CODE_0CD519:
	SEP.b #$20
	TXA
	TYX
	STA.b $18,x
	REP.b #$20
	JSR.w CODE_0CD6A2
	RTL

CODE_0CD525:
	LDA.w $7182,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w $6FA0,x
	AND.w DATA_0CD4ED,y
	STA.w $6FA0,x
	LDA.w $7040,x
	AND.w #$07F0
	ORA.w DATA_0CD4F1,y
	STA.w $7040,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr071_BigBoo_Main:
;$0CD545
	LDY.b $76,x
	TYX
	JMP.w (DATA_0CD54B,x)

DATA_0CD54B:
	dw CODE_0CD54F
	dw CODE_0CD926

CODE_0CD54F:
	LDX.b $12
	JSR.w CODE_0CD6CE
	JSL.l CODE_03AF23
	JSL.l CODE_0CD8FC
	JSR.w CODE_0CD6A2
	JSL.l CODE_0CD77C
	LDY.b $77,x
	TYX
	JMP.w (DATA_0CD569,x)

DATA_0CD569:
	dw CODE_0CD5FD
	dw CODE_0CD56F
	dw CODE_0CD5CE

CODE_0CD56F:
	LDX.b $12
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_0CD5BB
	CMP.w $60C4
	BNE.b CODE_0CD5BB
	LDA.w $7A96,x
	BNE.b CODE_0CD59C
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w #$0001
	STA.w $7402,x
	LDA.b $10
	AND.w #$003F
	BNE.b CODE_0CD59C
	STZ.w $7402,x
CODE_0CD59C:
	SEP.b #$20
	LDA.b #$01
	LDY.w $7A98,x
	BNE.b CODE_0CD5B8
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	LDY.w $7AF6,x
	BNE.b CODE_0CD5B8
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D9|!EXRAMBankMirror,x
	LDY.w $7AF8,x
	BNE.b CODE_0CD5B8
	STA.w $7A36,x
CODE_0CD5B8:
	REP.b #$20
	RTL

CODE_0CD5BB:
	SEP.b #$20
	LDA.b #$01
	STA.w $7402,x
	LDA.b #$10
	STA.w $77C0,x
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
	RTL

CODE_0CD5CE:
	LDX.b $12
	LDY.w $77C0,x
	BEQ.b CODE_0CD5DD
	SEP.b #$20
	DEC.w $77C0,x
	REP.b #$20
	RTL

CODE_0CD5DD:
	SEP.b #$20
	LDA.b #$01
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	LDA.b #$08
	STA.w $7A98,x
	LDA.b #$0C
	STA.w $7AF6,x
	LDA.b #$10
	STA.w $7AF8,x
	STZ.b $77,x
	REP.b #$20
	RTL

CODE_0CD5FD:
	LDX.b $12
	JSR.w CODE_0CD803
	LDA.w $7A96,x
	BNE.b CODE_0CD659
	STZ.w $7402,x
	SEP.b #$20
	LDA.w $7A98,x
	BNE.b CODE_0CD622
	STZ.b $78,x
	LDA.w $7AF6,x
	BNE.b CODE_0CD622
	STZ.b $79,x
	LDA.w $7AF8,x
	BNE.b CODE_0CD622
	STZ.w $7A36,x
CODE_0CD622:
	REP.b #$20
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_0CD65A
	CMP.w $60C4
	BNE.b CODE_0CD65A
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$08
	STA.w $7A96,x
	LDA.b #$10
	STA.w $7A98,x
	LDA.b #$18
	STA.w $7AF6,x
	LDA.b #$20
	STA.w $7AF8,x
	STZ.w $7402,x
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
CODE_0CD659:
	RTL

CODE_0CD65A:
	STA.w $7400,x
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b $16,x
	CMP.w #$0100
	BCS.b CODE_0CD69B
	INC.b $16,x
CODE_0CD69B:
	SEP.b #$20
	INC.b $19,x
	REP.b #$20
	RTL

CODE_0CD6A2:
	TXY
	LDX.b $18,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701979|!EXRAMBankMirror,y
	AND.w #$00FF
	ASL
	ASL
	CLC
	ADC.w DATA_0CD4DF,x
	REP.b #$10
	TAX
	LDA.w $70E2,y
	STA.l $7E5DA6,x
	LDA.w $7182,y
	STA.l $7E5DA8,x
	SEP.b #$10
	TYX
CODE_0CD6C5:
	RTS

DATA_0CD6C6:
	dw $0090,$0060,$0030

DATA_0CD6CC:
	db $26,$2E

CODE_0CD6CE:
	LDY.w $74A2,x
	BMI.b CODE_0CD6C5
	LDY.b $18,x
	LDA.w #$7E5DA6
	CLC
	ADC.w DATA_0CD4DF,y
	STA.b $00
	LDY.b #$7E5DA6>>16
	STY.b $02
	SEP.b #$20
	LDY.b $78,x
	LDA.w DATA_0CD6CC,y
	STA.b $0E
	STZ.b $0F
	LDY.b $79,x
	LDA.w DATA_0CD6CC,y
	STA.b $0C
	STZ.b $0D
	LDY.w $7A36,x
	LDA.w DATA_0CD6CC,y
	STA.b $0A
	STZ.b $0B
	REP.b #$20
	LDA.w $7180,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.b $08
	LDY.b #$04
CODE_0CD70F:
	LDA.b $08
	CLC
	ADC.w $796A,y
	STA.w $796A,y
	DEY
	DEY
	BPL.b CODE_0CD70F
	REP.b #$10
	LDA.w $7362,x
	STA.b $06
	LDA.w #$0004
	STA.b $04
CODE_0CD728:
	LDY.b $04
	LDA.b $16,x
	CMP.w DATA_0CD6C6,y
	BCS.b CODE_0CD736
	LDY.w #$0000
	BRA.b CODE_0CD745

CODE_0CD736:
	LDA.b $19,x
	AND.w #$00FF
	SEC
	SBC.w DATA_0CD6C6,y
	AND.w #$00FF
	ASL
	ASL
	TAY
CODE_0CD745:
	PHX
	LDX.b $06
	LDA.b [$00],y
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6028,x
	INY
	INY
	LDA.b [$00],y
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $602A,x
	LDY.b $04
	LDA.w $602C,x
	AND.w #$FE00
	ORA.w $796A,y
	STA.w $602C,x
	PLX
	LDA.b $06
	CLC
	ADC.w #$0008
	STA.b $06
	DEC.b $04
	DEC.b $04
	BPL.b CODE_0CD728
	SEP.b #$10
	RTS

CODE_0CD77C:
	LDY.w $7D36,x
	BPL.b CODE_0CD785
	JML.l CODE_03A858

CODE_0CD785:
	LDY.b $18,x
	LDA.w #$7E5DA6
	CLC
	ADC.w DATA_0CD4DF,y
	STA.b $00
	LDY.b #$7E5DA6>>16
	STY.b $02
	LDA.w $6120
	CLC
	ADC.w #$0006
	STA.b $06
	ASL
	STA.b $08
	LDA.w $6122
	CLC
	ADC.w #$0006
	STA.b $0A
	ASL
	STA.b $0C
	REP.b #$10
	LDA.w #$0004
	STA.b $04
CODE_0CD7B3:
	LDY.b $04
	LDA.b $16,x
	CMP.w DATA_0CD6C6,y
	BCS.b CODE_0CD7C1
	LDY.w #$0000
	BRA.b CODE_0CD7D0

CODE_0CD7C1:
	LDA.b $19,x
	AND.w #$00FF
	SEC
	SBC.w DATA_0CD6C6,y
	AND.w #$00FF
	ASL
	ASL
	TAY
CODE_0CD7D0:
	LDA.b [$00],y
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	CLC
	ADC.b $06
	CMP.b $08
	BCS.b CODE_0CD7FA
	INY
	INY
	LDA.b [$00],y
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611E
	CLC
	ADC.b $0A
	CMP.b $0C
	BCS.b CODE_0CD7FA
	SEP.b #$10
	JML.l CODE_03A858

CODE_0CD7FA:
	DEC.b $04
	DEC.b $04
	BPL.b CODE_0CD7B3
	SEP.b #$10
	RTL

CODE_0CD803:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0CD818
	BEQ.b CODE_0CD818
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CD818
	LDA.w $7D38,y
	BNE.b CODE_0CD819
CODE_0CD818:
	RTS

CODE_0CD819:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDY.b $18,x
	LDA.w #$7E5DA6
	CLC
	ADC.w DATA_0CD4DF,y
	STA.b $04
	LDY.b #$7E5DA6>>16
	STY.b $06
	JSL.l CODE_0CFF61
	REP.b #$10
	LDA.w #$0004
	STA.b $08
CODE_0CD83A:
	LDY.b $08
	LDA.b $16,x
	CMP.w DATA_0CD6C6,y
	BCS.b CODE_0CD848
	LDY.w #$0000
	BRA.b CODE_0CD857

CODE_0CD848:
	LDA.b $19,x
	AND.w #$00FF
	SEC
	SBC.w DATA_0CD6C6,y
	AND.w #$00FF
	ASL
	ASL
	TAY
CODE_0CD857:
	LDA.b [$04],y
	STA.b $00
	INY
	INY
	LDA.b [$04],y
	STA.b $02
	SEP.b #$10
	LDY.b $08
	STA.w $0008,y
	LDA.b $00
	STA.w $0000,y
	LDA.w #!Define_YI_AmbSpr208
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #$0016
	STA.w $73C2,y
	REP.b #$10
	DEC.b $08
	DEC.b $08
	BPL.b CODE_0CD83A
	SEP.b #$10
	LDY.b $18,x
	LDA.w $0CC4
	AND.w DATA_0CD4D1,y
	STA.w $0CC4
	JSL.l CODE_03A32E
	LDA.w #$01A2
	JSL.l CODE_03A364
	BCC.b CODE_0CD8FA
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0180
	STA.w $7A96,y
	LDA.w #$0004
	STA.b $00
CODE_0CD8C9:
	LDY.b $00
	LDA.w $0000,y
	STA.b $02
	LDA.w $0008,y
	STA.b $04
	LDA.w #$01A2
	JSL.l CODE_03A364
	BCC.b CODE_0CD8FA
	LDA.b $02
	STA.w $70E2,y
	LDA.b $04
	STA.w $7182,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0180
	STA.w $7A96,y
	DEC.b $00
	DEC.b $00
	BPL.b CODE_0CD8C9
CODE_0CD8FA:
	PLA
	RTL

CODE_0CD8FC:
	LDA.w $7680,x
	CLC
	ADC.w #$0080
	CMP.w #$01F0
	BCS.b CODE_0CD914
	LDA.w $7682,x
	CLC
	ADC.w #$0080
	CMP.w #$01F0
	BCC.b CODE_0CD925
CODE_0CD914:
	LDY.b $18,x
	LDA.w $0CC4
	AND.w DATA_0CD4D1,y
	STA.w $0CC4
	PLY
	PLA
	JML.l CODE_03A31E

CODE_0CD925:
	RTL

CODE_0CD926:
	LDX.b $12
	JSL.l CODE_03AF23
	JSL.l CODE_0CDA0C
	LDY.b $77,x
	TYX
	JMP.w (DATA_0CD936,x)

DATA_0CD936:
	dw CODE_0CD99D
	dw CODE_0CD93C
	dw CODE_0CD97D

CODE_0CD93C:
	LDX.b $12
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_0CD96A
	CMP.w $60C4
	BNE.b CODE_0CD96A
	LDA.w $7A96,x
	BNE.b CODE_0CD969
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.b $10
	AND.w #$003F
	BNE.b CODE_0CD969
	STZ.w $7402,x
CODE_0CD969:
	RTL

CODE_0CD96A:
	SEP.b #$20
	LDA.b #$02
	STA.w $7402,x
	LDA.b #$10
	STA.w $77C0,x
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
	RTL

CODE_0CD97D:
	LDX.b $12
	LDY.w $77C0,x
	BEQ.b CODE_0CD98C
	SEP.b #$20
	DEC.w $77C0,x
	REP.b #$20
	RTL

CODE_0CD98C:
	SEP.b #$20
	LDA.b #$02
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	STZ.b $77,x
	REP.b #$20
	RTL

CODE_0CD99D:
	LDX.b $12
	JSR.w CODE_0CDA16
	LDA.w $7A96,x
	BNE.b CODE_0CD9D2
	STZ.w $7402,x
	LDA.w $77C2,x
	AND.w #$00FF
	CMP.w $7400,x
	BNE.b CODE_0CD9D3
	CMP.w $60C4
	BNE.b CODE_0CD9D3
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$10
	STA.w $7A96,x
	LDA.b #$00
	STA.w $7402,x
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
CODE_0CD9D2:
	RTL

CODE_0CD9D3:
	STA.w $7400,x
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CDA0C:
	LDY.w $7D36,x
	BPL.b CODE_0CDA15
	JML.l CODE_03A858

CODE_0CDA15:
	RTL

CODE_0CDA16:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0CDA2B
	BEQ.b CODE_0CDA2B
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CDA2B
	LDA.w $7D38,y
	BNE.b CODE_0CDA2C
CODE_0CDA2B:
	RTS

CODE_0CDA2C:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	JSL.l CODE_0CFF61
	JSL.l CODE_03A32E
	LDA.w #$01A2
	JSL.l CODE_03A364
	BCC.b CODE_0CDA5C
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0180
	STA.w $7A96,y
CODE_0CDA5C:
	PLA
	RTL

;---------------------------------------------------------------------------

DATA_0CDA5E:
	dw $0026,$0024,$0050,$0051,$0080,$0081,$00B0,$00B1
	dw $00E0,$00E1,$0110,$0116

DATA_0CDA76:
	dw $0202,$0202,$0404,$0402,$0402,$0404

DATA_0CDA82:
	dw $3535,$3535,$3333,$B335,$3335,$3333

DATA_0CDA8E:
	dw $0404,$0404,$0101,$0104,$0104,$0101

DATA_0CDA9A:
	dw $00D8,$00D8,$00D8,$00D8,$00FA,$00FA,$00D8,$00FA
	dw $00D8,$00FA,$00FA,$00FA

DATA_0CDAB2:
	dw $3E00,$3E00,$3E00,$3E00,$3600,$3600,$3E00,$3600
	dw $3E00,$3600,$3600,$3600

DATA_0CDACA:
	dw $611F,$22DF,$7F00,$23EC,$611F,$22DF,$7F00,$5C13
	dw $611F,$22DF,$7F00,$23EC

DATA_0CDAE2:
	dw $22DF,$7F00,$23EC,$7F00,$7F00,$23EC,$611F,$5D20
	dw $23EC,$611F,$22DF,$611F

DATA_0CDAFA:
	db $0A,$0C,$0A,$0C,$0A,$0A,$0A,$0C,$0A,$0A,$0A,$0C

YI_NorSpr048_CutsceneKamek_Init:
;$0CDB06
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	BEQ.b CODE_0CDB13
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BRA.b CODE_0CDB4D

CODE_0CDB13:
	JSL.l CODE_028925
	STZ.w $60B4
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	ORA.w !RAM_YI_Level_CurrentWorldLo
	STA.b $76,x
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.w #$0016
	BNE.b CODE_0CDB47
	SEP.b #$20
	LDA.b #!REGISTER_BG2HorizScrollOffset
	STA.w HDMA[$03].Destination
	LDA.b #!REGISTER_BG2VertScrollOffset
	STA.w HDMA[$04].Destination
	REP.b #$20
	LDA.w #$0100
	STA.w $6096
	BRA.b CODE_0CDB4D

CODE_0CDB47:
	LDA.w #$0100
	STA.w $6098
CODE_0CDB4D:
	LDA.w #$FFFF
	STA.w $0E35
	RTL

;---------------------------------------------------------------------------

DATA_0CDB54:
	db $40,!REGISTER_CGRAMAddress : dl $7E5C98

DATA_0CDB59:
	db $D9 : dw $7E5A18
	db $D9 : dw $7E5A18
	db $00

DATA_0CDB60:
	db $42,!REGISTER_WriteToCGRAMPort : dl $7E5D18

DATA_0CDB65:
	db $D9 : dw $7E5388
	db $D9 : dw $7E543A
	db $00

YI_NorSpr048_CutsceneKamek_Main:
;$0CDB6C
	JSL.l CODE_03AF23
	JSR.w CODE_0CE526
	LDY.b $16,x
	TYX
	JMP.w (DATA_0CDB79,x)

DATA_0CDB79:
	dw CODE_0CDB97
	dw CODE_0CDBD7
	dw CODE_0CDC1B
	dw CODE_0CDC99
	dw CODE_0CDCE8
	dw CODE_0CDD31
	dw CODE_0CDD7B
	dw CODE_0CDDA5
	dw CODE_0CE10E
	dw CODE_0CE34D
	dw CODE_0CDF4B
	dw CODE_0CE214
	dw CODE_0CE404
	dw CODE_0CE4A7
	dw CODE_0CE4CB

CODE_0CDB97:
	LDX.b $12
	LDA.w $1015
	BEQ.b CODE_0CDBBD
	LDA.w $60C6
	BNE.b CODE_0CDBA8
	LDA.w $60C0
	BNE.b CODE_0CDBBD
CODE_0CDBA8:
	LDA.w !RAM_YI_Level_BossHasBeenVisitedBeforeFlagLo
	BNE.b CODE_0CDBBE
	INC.w !RAM_YI_Level_BossHasBeenVisitedBeforeFlagLo
	SEP.b #$20
	LDA.b #$00
	STA.w $7A98,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_0CDBBD:
	RTL

CODE_0CDBBE:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w $0948
	STA.l YI_Global_PaletteMirror[$00].LowByte
	STA.l $702D6C
	STZ.w $0948
	LDY.b #$0E
	STY.b $16,x
	RTL

CODE_0CDBD7:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_0CDC1A
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0130
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0040
	STA.w $7182,x
	LDA.w $7182,x
	STA.w $7A36,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	SEP.b #$20
	LDA.b #$05
	STA.w $74A2,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_0CDC1A:
	RTL

CODE_0CDC1B:
	LDX.b $12
	JSR.w CODE_0CE4ED
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w $7680,x
	CMP.w #$00F4
	BMI.b CODE_0CDC43
	LDA.w $7A98,x
	BNE.b CODE_0CDC42
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_0CDC42:
	RTL

CODE_0CDC43:
	LDA.w #$0005
	STA.w $7402,x
	LDA.w #$0020
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CDC70
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	SEP.b #$20
	LDA.b #$13
	STA.b $18,x
	LDA.b #$02
	STA.w $7402,x
	LDA.b #$20
	STA.w $7A98,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_0CDC70:
	RTL

DATA_0CDC71:
	db $04,$04,$03,$02,$03,$04,$03,$02,$03,$04,$03,$02,$03,$04,$03,$02
	db $03,$04,$03,$02

DATA_0CDC85:
	db $02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06
	db $02,$06,$02,$06

CODE_0CDC99:
	LDX.b $12
	JSR.w CODE_0CE4ED
	LDA.w $7A98,x
	BNE.b CODE_0CDCCA
	SEP.b #$20
	LDY.b $18,x
	DEY
	BMI.b CODE_0CDCCB
	STY.b $18,x
	LDA.w DATA_0CDC71,y
	STA.w $7402,x
	LDA.w DATA_0CDC85,y
	STA.w $7A98,x
	REP.b #$20
	TYA
	AND.w #$0007
	CMP.w #$0007
	BNE.b CODE_0CDCCA
	LDA.w #!Define_YI_SoundID5B_KamekTalk
	JSL.l CODE_0085D2
CODE_0CDCCA:
	RTL

CODE_0CDCCB:
	LDA.b #$04
	STA.w $7402,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	LDA.b $76,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_0CDA5E,y
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
	RTL

CODE_0CDCE8:
	LDX.b $12
	JSR.w CODE_0CE4ED
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0CDD24
	LDA.w $0948
	STA.l YI_Global_PaletteMirror[$00].LowByte
	STA.l $702D6C
	STZ.w $0948
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$05
	STA.b $18,x
	TAY
	LDA.w DATA_0CDD25,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A98,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_0CDD24:
	RTL

DATA_0CDD25:
	db $02,$05,$06,$06,$05,$02

DATA_0CDD2B:
	db $00,$00,$02,$00,$00,$00

CODE_0CDD31:
	LDX.b $12
	JSR.w CODE_0CE4ED
	LDA.w $7A98,x
	BNE.b CODE_0CDD6B
	SEP.b #$20
	DEC.b $18,x
	BMI.b CODE_0CDD6C
	LDY.b $18,x
	LDA.w DATA_0CDD25,y
	STA.w $7402,x
	LDA.w $7400,x
	EOR.w DATA_0CDD2B,y
	STA.w $7400,x
	LDA.b #$04
	STA.w $7A98,x
	REP.b #$20
	LDA.w DATA_0CDD2B,y
	AND.w #$00FF
	BEQ.b CODE_0CDD6B
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CDD6B:
	RTL

CODE_0CDD6C:
	STZ.w $7402,x
	LDA.b #$04
	STA.w $7A98,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	RTL

CODE_0CDD7B:
	LDX.b $12
	JSR.w CODE_0CE4ED
	LDA.w $7A98,x
	BNE.b CODE_0CDD94
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
CODE_0CDD94:
	LDA.w $7680,x
	CMP.w #$0150
	BCC.b CODE_0CDDA4
	SEP.b #$20
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_0CDDA4:
	RTL

CODE_0CDDA5:
	LDX.b $12
	SEP.b #$20
	LDA.b #$05
	STA.w $74A2,x
	REP.b #$20
	STZ.w $7400,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0130
	STA.w $70E2,x
	LDA.w #$F800
	STA.w $75E0,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7540,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0040
	STA.w $7182,x
	STZ.w $7542,x
	LDA.w #$F800
	STA.w $75E2,x
	STZ.w $7402,x
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w #$0020
	STA.l $70449E
	LDA.w #$03B8
	STA.l $7044A0
	LDA.w #$0000
	STA.l $7044A2
	LDA.w #$FF98
	STA.l $7044A4
	LDA.w #$0000
	STA.l $7044A6
	LDA.w #$0000
	STA.l $7044A8
	LDA.w #$0001
	STA.l $7044AA
	LDA.w #$0000
	STA.l $7044AC
	LDA.w #$1000
	STA.l $7044AE
	LDA.w #$0000
	STA.l $7044B0
	LDA.w #$0020
	STA.l $7044F2
	LDA.w #$0080
	STA.l $7044F4
	LDA.w #$0002
	STA.l $7044F6
	LDA.w #$4000
	STA.l $7044F8
	LDA.w #$0030
	STA.l $7044FA
	LDA.w #$0000
	STA.l $7044FC
	LDA.w #$0000
	STA.l $7044FE
	LDA.w #$0000
	STA.l $704500
	LDA.w #$0000
	STA.l $704502
	LDA.w #$0000
	STA.l $704504
	LDA.w #$0000
	STA.l $704506
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $76,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_0CDACA,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$44B2
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_08EDAC>>16
	LDA.w #FXCODE_08EDAC
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.w #$0016
	BEQ.b CODE_0CDEC1
	LDA.w #$0100
	STA.w $6098
	STA.w !RAM_YI_Global_Layer3XPosLo
	LDA.w #$0000
	STA.w $60A0
	STA.w !RAM_YI_Global_Layer3YPosLo
	BRA.b CODE_0CDED3

CODE_0CDEC1:
	LDA.w #$0100
	STA.w $6096
	STA.w !RAM_YI_Global_Layer2XPosLo
	LDA.w #$0200
	STA.w $609E
	STA.w !RAM_YI_Global_Layer2YPosLo
CODE_0CDED3:
	SEP.b #$20
	LDA.w !RAM_YI_Global_MainScreenLayers
	ORA.w !RAM_YI_Global_SubScreenLayers
	STA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_SubScreenLayers
	STZ.w !RAM_YI_Global_SubScreenWindowMask
	LDY.b $76,x
	LDA.w DATA_0CDA76,y
	TRB.w !RAM_YI_Global_MainScreenLayers
	TRB.w !RAM_YI_Global_MainScreenWindowMask
	TSB.w !RAM_YI_Global_SubScreenLayers
	TSB.w !RAM_YI_Global_SubScreenWindowMask
	LDA.w DATA_0CDA82,y
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDX.b #$04
CODE_0CDF00:
	LDA.w DATA_0CDB54,x
	STA.w HDMA[$01].Parameters,x
	LDA.w DATA_0CDB60,x
	STA.w HDMA[$02].Parameters,x
	DEX
	BPL.b CODE_0CDF00
	LDA.b #$7E5A18>>16
	STA.w HDMA[$01].IndirectSourceBank
	STA.w HDMA[$02].IndirectSourceBank
	LDX.b #$06
CODE_0CDF19:
	LDA.w DATA_0CDB59,x
	STA.l $7E5C98,x
	LDA.w DATA_0CDB65,x
	STA.l $7E5D18,x
	DEX
	BPL.b CODE_0CDF19
	LDX.b #$58
	LDA.w DATA_0CDA8E,y
CODE_0CDF2F:
	STA.l $7E5A18,x
	DEX
	BPL.b CODE_0CDF2F
	LDX.b $12
	LDA.b #$05
	STA.w $74A2,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
	RTL

CODE_0CDF4B:
	LDX.b $12
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #$0002
	STA.w $7400,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w #$0040
	STA.w $70E2,x
	LDA.w #$0800
	STA.w $75E0,x
	LDA.b $76,x
	AND.w #$00FF
	ASL
	TAY
	PHD
	LDA.w #$0000
	TCD
	REP.b #$10
	LDA.w DATA_0CDA9A,y
	LDX.w #$6800
	PHY
	JSL.l CODE_00B756
	PLY
	LDX.w DATA_0CDAB2,y
	TXY
	LDX.w #$706800>>16
	STX.b $01
	LDX.w #$706800
	JSL.l CODE_00BEA6
	SEP.b #$10
	PLD
	LDX.b $12
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7540,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0040
	STA.w $7182,x
	STZ.w $7542,x
	LDA.w #$F800
	STA.w $75E2,x
	STZ.w $7402,x
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w #$0020
	STA.l $70449E
	LDA.w #$03B8
	STA.l $7044A0
	LDA.w #$0000
	STA.l $7044A2
	LDA.w #$FF98
	STA.l $7044A4
	LDA.w #$0000
	STA.l $7044A6
	LDA.w #$0000
	STA.l $7044A8
	LDA.w #$0001
	STA.l $7044AA
	LDA.w #$0000
	STA.l $7044AC
	LDA.w #$1000
	STA.l $7044AE
	LDA.w #$0000
	STA.l $7044B0
	LDA.w #$0020
	STA.l $7044F2
	LDA.w #$0080
	STA.l $7044F4
	LDA.w #$0002
	STA.l $7044F6
	LDA.w #$4000
	STA.l $7044F8
	LDA.w #$0030
	STA.l $7044FA
	LDA.w #$0000
	STA.l $7044FC
	LDA.w #$0000
	STA.l $7044FE
	LDA.w #$0000
	STA.l $704500
	LDA.w #$0000
	STA.l $704502
	LDA.w #$0000
	STA.l $704504
	LDA.w #$0000
	STA.l $704506
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $76,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_0CDAE2,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$44B2
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_08EDAC>>16
	LDA.w #FXCODE_08EDAC
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.w #$0016
	BEQ.b CODE_0CE096
	LDA.w #$0100
	STA.w $6098
	STA.w !RAM_YI_Global_Layer3XPosLo
	LDA.w #$0000
	STA.w $60A0
	STA.w !RAM_YI_Global_Layer3YPosLo
	BRA.b CODE_0CE0A8

CODE_0CE096:
	LDA.w #$0100
	STA.w $6096
	STA.w !RAM_YI_Global_Layer2XPosLo
	LDA.w #$0200
	STA.w $609E
	STA.w !RAM_YI_Global_Layer2YPosLo
CODE_0CE0A8:
	SEP.b #$20
	LDY.b $76,x
	LDA.w DATA_0CDA76,y
	TRB.w !RAM_YI_Global_MainScreenLayers
	TRB.w !RAM_YI_Global_MainScreenWindowMask
	TSB.w !RAM_YI_Global_SubScreenLayers
	TSB.w !RAM_YI_Global_SubScreenWindowMask
	LDA.w DATA_0CDA82,y
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDX.b #$04
CODE_0CE0C3:
	LDA.w DATA_0CDB54,x
	STA.w HDMA[$01].Parameters,x
	LDA.w DATA_0CDB60,x
	STA.w HDMA[$02].Parameters,x
	DEX
	BPL.b CODE_0CE0C3
	LDA.b #$7E5A18>>16
	STA.w HDMA[$01].IndirectSourceBank
	STA.w HDMA[$02].IndirectSourceBank
	LDX.b #$06
CODE_0CE0DC:
	LDA.w DATA_0CDB59,x
	STA.l $7E5C98,x
	LDA.w DATA_0CDB65,x
	STA.l $7E5D18,x
	DEX
	BPL.b CODE_0CE0DC
	LDX.b #$58
	LDA.w DATA_0CDA8E,y
CODE_0CE0F2:
	STA.l $7E5A18,x
	DEX
	BPL.b CODE_0CE0F2
	LDX.b $12
	LDA.b #$05
	STA.w $74A2,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	LDA.w #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
	RTL

CODE_0CE10E:
	LDX.b $12
	LDA.w $7682,x
	SEC
	SBC.w #$0009
	CMP.w #$0100
	BCS.b CODE_0CE128
	AND.w #$00FF
	CLC
	ADC.w #$0010
	XBA
	STA.l $7044F2
CODE_0CE128:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	AND.w #$FC00
	XBA
	ASL
	ASL
	STA.w $7542,x
	LDA.w $7A98,x
	BNE.b CODE_0CE14E
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A98,x
CODE_0CE14E:
	LDA.w $7680,x
	CMP.w #$0100
	BCS.b CODE_0CE190
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $72C0,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7682,x
	CMP.w #$0100
	BCS.b CODE_0CE190
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w $72C2,x
	CMP.w #$0100
	BCS.b CODE_0CE190
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_08ECEF>>16
	LDA.w #FXCODE_08ECEF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDX.b $12
CODE_0CE190:
	LDA.w $7680,x
	CMP.w #$0100
	BPL.b CODE_0CE1D9
	LDX.b #FXCODE_08EF0B>>16
	LDA.w #FXCODE_08EF0B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $01A4
	JSL.l CODE_00BE39	: dl $7E5388,$7036BA : dw $01A4
	SEP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.b #$16
	BEQ.b CODE_0CE1CB
	LDA.b #$02
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	BRA.b CODE_0CE1D0

CODE_0CE1CB:
	LDA.b #$20
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
CODE_0CE1D0:
	LDA.b #$36
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
CODE_0CE1D9:
	JSR.w CODE_0CE313
	LDA.w $7A96,x
	BNE.b CODE_0CE213
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #!Define_YI_AmbSpr220
	JSL.l CODE_008B21
	LDA.w #$0007
	STA.w $73C2,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w $7182,x
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
CODE_0CE213:
	RTL

CODE_0CE214:
	LDX.b $12
	LDA.w $7682,x
	SEC
	SBC.w #$0009
	CMP.w #$0100
	BCS.b CODE_0CE22E
	AND.w #$00FF
	CLC
	ADC.w #$0010
CODE_0CE228:
	XBA
	STA.l $7044F2
CODE_0CE22E:
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$FC00
	XBA
	ASL
	ASL
	STA.w $7542,x
	LDA.w $7A98,x
	BNE.b CODE_0CE250
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A98,x
CODE_0CE250:
	LDA.w $7680,x
	CMP.w #$0100
	BCS.b CODE_0CE292
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $72C0,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7682,x
	CMP.w #$0100
	BCS.b CODE_0CE292
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w $72C2,x
	CMP.w #$0100
	BCS.b CODE_0CE292
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_08EE49>>16
	LDA.w #FXCODE_08EE49
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDX.b $12
CODE_0CE292:
	LDA.w $7680,x
	BMI.b CODE_0CE2D8
	LDX.b #FXCODE_08EF0B>>16
	LDA.w #FXCODE_08EF0B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $01A4
	JSL.l CODE_00BE39	: dl $7E5388,$7036BA : dw $01A4
	SEP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.b #$16
	BEQ.b CODE_0CE2CA
	LDA.b #$02
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	BRA.b CODE_0CE2CF

CODE_0CE2CA:
	LDA.b #$20
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
CODE_0CE2CF:
	LDA.b #$36
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
CODE_0CE2D8:
	JSR.w CODE_0CE313
	LDA.w $7A96,x
	BNE.b CODE_0CE312
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #!Define_YI_AmbSpr220
	JSL.l CODE_008B21
	LDA.w #$0007
	STA.w $73C2,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w $7182,x
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
CODE_0CE312:
	RTL

CODE_0CE313:
	LDA.w $7680,x
	CLC
	ADC.w #$0060
	CMP.w #$01B0
	BCS.b CODE_0CE32C
	LDA.w $7682,x
	CLC
	ADC.w #$0060
	CMP.w #$01B0
	BCS.b CODE_0CE32C
	RTS

CODE_0CE32C:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0020
	STA.w $7A96,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	PLA
	RTL

CODE_0CE34D:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CE363
	LDA.w #$0002
	STA.w $1015
	SEP.b #$20
	LDA.b #$01
	STA.w $7A39,x
	REP.b #$20
CODE_0CE363:
	LDA.l $7044F2
	CMP.w #$9800
	BCC.b CODE_0CE375
	SEP.b #$20
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	RTL

CODE_0CE375:
	LDX.b $12
	LDA.w $7682,x
	SEC
	SBC.w #$0009
	CMP.w #$0100
	BCS.b CODE_0CE38F
	AND.w #$00FF
	CLC
	ADC.w #$0010
	XBA
	STA.l $7044F2
CODE_0CE38F:
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $72C0,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w $72C2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_08ECEF>>16
	LDA.w #FXCODE_08ECEF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDX.b $12
	LDX.b #FXCODE_08EF0B>>16
	LDA.w #FXCODE_08EF0B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $01A4
	JSL.l CODE_00BE39	: dl $7E5388,$7036BA : dw $01A4
	SEP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.b #$16
	BEQ.b CODE_0CE3F5
	LDA.b #$02
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	BRA.b CODE_0CE3FA

CODE_0CE3F5:
	LDA.b #$20
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
CODE_0CE3FA:
	LDA.b #$36
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	RTL

CODE_0CE404:
	LDX.b $12
	LDA.l $7044F2
	CMP.w #$9800
	BCC.b CODE_0CE418
	SEP.b #$20
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	RTL

CODE_0CE418:
	LDX.b $12
	LDA.w $7682,x
	SEC
	SBC.w #$0009
	CMP.w #$0100
	BCS.b CODE_0CE432
	AND.w #$00FF
	CLC
	ADC.w #$0010
	XBA
	STA.l $7044F2
CODE_0CE432:
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $72C0,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w $72C2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_08EE49>>16
	LDA.w #FXCODE_08EE49
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDX.b $12
	LDX.b #FXCODE_08EF0B>>16
	LDA.w #FXCODE_08EF0B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	NOP #2
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $01A4
	JSL.l CODE_00BE39	: dl $7E5388,$7036BA : dw $01A4
	SEP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.b #$16
	BEQ.b CODE_0CE498
	LDA.b #$02
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	BRA.b CODE_0CE49D

CODE_0CE498:
	LDA.b #$20
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
CODE_0CE49D:
	LDA.b #$36
	TSB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	RTL

CODE_0CE4A7:
	LDX.b $12
	LDA.w #$FFFF
	STA.w $1015
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	SEP.b #$20
	LDA.b #$36
	TRB.w !RAM_YI_Global_HDMAEnable
	LDA.b #$20
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	STZ.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_SubScreenWindowMask
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
	RTL

CODE_0CE4CB:
	LDX.b $12
	LDA.w $1015
	BEQ.b CODE_0CE4D3
	RTL

CODE_0CE4D3:
	JSR.w CODE_0CE5B1
	LDY.b $76,x
	CPY.b #$0B
	BEQ.b CODE_0CE4E5
	LDA.w DATA_0CDAFA,y
	AND.w #$00FF
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_0CE4E5:
	JML.l CODE_03A32E

CODE_0CE4E9:
	JSR.w CODE_0CE4ED
	RTL

CODE_0CE4ED:
	REP.b #$10
	TXY
	LDX.b $78,y
	LDA.l DATA_00E9D4,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7A36,y
	STA.w $7182,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	CLC
	ADC.w #$0008
	AND.w #$01FE
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	TYX
	SEP.b #$10
	RTS

CODE_0CE526:
	LDY.w $7A39,x
	BEQ.b CODE_0CE568
	LDA.b $14
	AND.w #$0003
	BNE.b CODE_0CE568
	SEP.b #$20
	LDA.w $7A38,x
	PHA
	CLC
	ADC.b #$1C
	AND.b #$1E
	TAY
	PLA
	INC
	INC
	AND.b #$1E
	STA.w $7A38,x
	REP.b #$20
	PHB
	LDX.b #$7021C2>>16
	PHX
	PLB
	TYX
	LDY.b #$1C
CODE_0CE550:
	LDA.l DATA_5FE9A8,x
	STA.w $7021C2,y
	STA.w $702F2E,y
	TXA
	DEC
	DEC
	AND.w #$001E
	TAX
	DEY
	DEY
	BPL.b CODE_0CE550
	PLB
	LDX.b $12
CODE_0CE568:
	RTS

DATA_0CE569:
	dl DATA_5FA5CA
	dl $702122
	dl $702122
	dl $702122
	dl $7021A2
	dl $702122
	dl DATA_5FA606
	dl $702122
	dl $702182
	dl DATA_5FA58E
	dl DATA_5FA642
	dl $7021C2
	dl $702102
	dl $702122
	dl $702182
	dl $702122
	dl $702122
	dl $702122
	dl $7021A2
	dl $702122
	dl $702182
	dl $702142
	dl $702142
	dl $702102

CODE_0CE5B1:
	LDA.b $76,x
	ASL
	CLC
	ADC.b $76,x
	TAY
CODE_0CE5B8:
	PHX
	LDA.w DATA_0CE569,y
	STA.b $00
	LDX.w DATA_0CE569+$02,y
	STX.b $02
	LDX.b #$1C
CODE_0CE5C5:
	TXY
	LDA.b [$00],y
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	STA.l $702F2E,x
	DEX
	DEX
	BPL.b CODE_0CE5C5
	PLX
	RTS

CODE_0CE5D6:
	PHB
	PHK
	PLB
	JSR.w CODE_0CE5B8
	PLB
	RTL

;---------------------------------------------------------------------------

DATA_0CE5DE:
	dw $FFA0,$0060

DATA_0CE5E2:
	db $02,$00,$03,$00,$02,$01,$04

YI_NorSpr047_ShyguyPushingRoger_Init:
;$0CE5E9
	LDA.w $70E2,x
	STA.w $7A36,x
	LDA.w DATA_0CE5DE
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$06
	STA.b $76,x
	TAY
	LDA.w DATA_0CE5E2,y
	STA.w $7402,x
	STA.b $00
	LDA.b #$03
	STA.w $7A96,x
	REP.b #$20
	TXY
	LDA.w #!Define_YI_NorSpr047_ShyguyPushingRoger
	JSL.l CODE_03A366
	BCC.b CODE_0CE657
	LDA.w $70E2,x
	CLC
	ADC.w #$0040
	STA.w $70E2,y
	STA.w $7A36,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w DATA_0CE5DE
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	SEP.b #$20
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701979|!EXRAMBankMirror,y
	LDA.b #$04
	STA.w $74A2,y
	LDA.b #$06
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $7402,y
	LDA.b #$03
	STA.w $7A96,y
	LDA.b $18,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	REP.b #$20
CODE_0CE657:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr047_ShyguyPushingRoger_Main:
;$0CE658
	JSL.l CODE_03AF23
	JSR.w CODE_0CE94F
	LDY.b $16,x
	TYX
	JMP.w (DATA_0CE665,x)

DATA_0CE665:
	dw CODE_0CE669
	dw CODE_0CE67F

CODE_0CE669:
	LDX.b $12
	LDY.b $19,x
	TYX
	JSR.w (DATA_0CE677,x)
	LDY.b $77,x
	TYX
	JMP.w (DATA_0CE67B,x)

DATA_0CE677:
	dw CODE_0CE81B
	dw CODE_0CE851

DATA_0CE67B:
	dw CODE_0CE68B
	dw CODE_0CE6F1

CODE_0CE67F:
	LDX.b $12
	LDY.b $77,x
	TYX
	JMP.w (DATA_0CE687,x)

DATA_0CE687:
	dw CODE_0CE731
	dw CODE_0CE774

CODE_0CE68B:
	LDX.b $12
	LDY.b #$00
	LDA.w $7A36,x
	CMP.w $70E2,x
	BMI.b CODE_0CE6A2
	INY
	INY
	SEC
	SBC.w #$0010
	CMP.w $70E2,x
	BMI.b CODE_0CE6AE
CODE_0CE6A2:
	TYA
	STA.w $7400,x
	LDA.w DATA_0CE5DE,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0CE6B5

CODE_0CE6AE:
	LDA.b $10
	AND.w #$001F
	BEQ.b CODE_0CE6D4
CODE_0CE6B5:
	LDA.w $7A96,x
	BNE.b CODE_0CE6D3
	SEP.b #$20
	DEC.b $76,x
	BPL.b CODE_0CE6C4
	LDA.b #$06
	STA.b $76,x
CODE_0CE6C4:
	LDY.b $76,x
	LDA.w DATA_0CE5E2,y
	STA.w $7402,x
	LDA.b #$03
	STA.w $7A96,x
	REP.b #$20
CODE_0CE6D3:
	RTL

CODE_0CE6D4:
	JSL.l CODE_008408
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	SEP.b #$20
	LDA.b $10
	AND.b #$0F
	CLC
	ADC.b #$10
	STA.w $7A96,x
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
	RTL

CODE_0CE6F1:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CE712
	SEP.b #$20
	DEC.b $76,x
	BMI.b CODE_0CE713
	LDA.w $7400,x
	EOR.b #$02
	STA.w $7400,x
	LDA.b $10
	AND.b #$0F
	CLC
	ADC.b #$10
	STA.w $7A96,x
	REP.b #$20
CODE_0CE712:
	RTL

CODE_0CE713:
	LDA.b #$06
	STA.b $76,x
	TAY
	LDA.w DATA_0CE5E2,y
	STA.w $7402,x
	LDA.b #$03
	STA.w $7A96,x
	STZ.b $77,x
	REP.b #$20
	LDY.w $7400,x
	LDA.w DATA_0CE5DE,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_0CE731:
	LDX.b $12
	LDY.b $19,x
	TYX
	JSR.w (DATA_0CE887,x)
	LDA.w $7A96,x
	BNE.b CODE_0CE757
	SEP.b #$20
	DEC.b $76,x
	BPL.b CODE_0CE748
	LDA.b #$06
	STA.b $76,x
CODE_0CE748:
	LDY.b $76,x
	LDA.w DATA_0CE5E2,y
	STA.w $7402,x
	LDA.b #$01
	STA.w $7A96,x
	REP.b #$20
CODE_0CE757:
	RTL

DATA_0CE758:
	dw DATA_0CE75C,DATA_0CE762

DATA_0CE75C:
	db $05,$09,$08,$07,$06,$05

DATA_0CE762:
	db $0B,$0C,$0B,$0C,$0B,$0C

DATA_0CE768:
	dw $0000,$0008,$FFF0

DATA_0CE76E:
	dw $0008,$0010,$0002

CODE_0CE774:
	LDX.b $12
	LDA.w #$0004
	STA.b $00
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $70E2,y
	CMP.w #$0100
	BCS.b CODE_0CE793
	DEC.b $00
	DEC.b $00
	CMP.w #$0060
	BCC.b CODE_0CE793
	DEC.b $00
	DEC.b $00
CODE_0CE793:
	LDY.b $00
	LDA.w DATA_0CE768,y
	STA.b $02
	LDA.w DATA_0CE76E,y
	STA.b $04
	LDY.b $18,x
	LDA.w $7BB6,y
	ASL
	CLC
	ADC.w $70E2,y
	STA.w $70E2,x
	LDY.b $19,x
	BNE.b CODE_0CE7E8
	LDY.b $18,x
	PHX
	LDX.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	BMI.b CODE_0CE7BC
	INX
	INX
CODE_0CE7BC:
	LDA.w DATA_0CE758,x
	STA.b $00
	TXA
	PLX
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7A36,x
	SEC
	SBC.w #$00A0
	CMP.w $70E2,x
	BPL.b CODE_0CE7FD
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CLC
	ADC.w #$FFF4
	CLC
	ADC.b $02
	CLC
	ADC.b $78,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STZ.b $78,x
	BRA.b CODE_0CE7FD

CODE_0CE7E8:
	LDY.b $18,x
	LDA.w #$FFF4
	CLC
	ADC.b $02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	PHX
	LDX.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w DATA_0CE758,x
	STA.b $00
	PLX
CODE_0CE7FD:
	LDA.w $7A96,x
	BNE.b CODE_0CE81A
	SEP.b #$20
	DEC.b $76,x
	BPL.b CODE_0CE80C
	LDA.b #$05
	STA.b $76,x
CODE_0CE80C:
	LDY.b $76,x
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b $04
	STA.w $7A96,x
	REP.b #$20
CODE_0CE81A:
	RTL

CODE_0CE81B:
	LDX.b $12
	LDY.b $18,x
	LDA.w $7A36,x
	SEC
	SBC.w #$0030
	CMP.w $70E2,y
	BPL.b CODE_0CE850
	STZ.w $7400,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$02
	STA.b $16,x
	LDA.b #$06
	STA.b $76,x
	TAY
	LDA.w DATA_0CE5E2,y
	STA.w $7402,x
	LDA.b #$01
	STA.w $7A96,x
	STZ.b $77,x
	REP.b #$20
	PLA
	RTL

CODE_0CE850:
	RTS

CODE_0CE851:
	LDX.b $12
	LDY.b $18,x
	LDA.w $7A36,x
	SEC
	SBC.w #$003E
	CMP.w $70E2,y
	BPL.b CODE_0CE886
	STZ.w $7400,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$02
	STA.b $16,x
	LDA.b #$06
	STA.b $76,x
	TAY
	LDA.w DATA_0CE5E2,y
	STA.w $7402,x
	LDA.b #$01
	STA.w $7A96,x
	STZ.b $77,x
	REP.b #$20
	PLA
	RTL

CODE_0CE886:
	RTS

DATA_0CE887:
	dw CODE_0CE88B
	dw CODE_0CE8EE

CODE_0CE88B:
	LDX.b $12
	LDY.b $18,x
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CE8A5
	EOR.w #$FFFF
	INC
CODE_0CE8A5:
	CMP.b $00
	BCS.b CODE_0CE8ED
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	BMI.b CODE_0CE8ED
	SEC
	SBC.b $00
	STA.b $02
	BEQ.b CODE_0CE8C4
	BPL.b CODE_0CE8ED
CODE_0CE8C4:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.b $02
	STA.w $70E2,x
	STZ.w $7402,x
	SEP.b #$20
	LDA.b #$05
	STA.b $76,x
	TAY
	LDA.w DATA_0CE75C,y
	STA.w $7402,x
	LDA.b #$08
	STA.w $7A96,x
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
	PLA
	RTL

CODE_0CE8ED:
	RTS

CODE_0CE8EE:
	LDX.b $12
	LDY.b $18,x
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0CE908
	EOR.w #$FFFF
	INC
CODE_0CE908:
	CMP.b $00
	BCS.b CODE_0CE94E
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	STA.b $00
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	BMI.b CODE_0CE94E
	SEC
	SBC.b $00
	STA.b $02
	BEQ.b CODE_0CE927
	BPL.b CODE_0CE94E
CODE_0CE927:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.b $02
	STA.w $70E2,x
	LDA.w $7402,y
	STA.w $7402,x
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STA.b $76,x
	LDA.w $7A96,y
	STA.w $7A96,x
	INC.b $77,x
	INC.b $77,x
	REP.b #$20
	PLA
	RTL

CODE_0CE94E:
	RTS

CODE_0CE94F:
	LDA.w $7682,x
	CLC
	ADC.w #$0050
	CMP.w #$0190
	BCC.b CODE_0CE960
	PLA
	JML.l CODE_03A31E

CODE_0CE960:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1AF_FloatingCoin_Init:
;$0CE961
	JSL.l CODE_03D3F8
	BEQ.b CODE_0CE96B
	JML.l CODE_03A31E

CODE_0CE96B:
	LDA.w !RAM_YI_Level_LevelHeaderSpritePaletteLo
	CMP.w #$0002
	BNE.b CODE_0CE97C
	LDA.w $7042,x
	ORA.w #$000E
	STA.w $7042,x
CODE_0CE97C:
	STZ.w $7400,x
	LDA.b $14
	LSR
	LSR
	LSR
	AND.w #$0003
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1AF_FloatingCoin_Main:
;$0CE98B
	LDA.b $14
	LSR
	LSR
	LSR
	AND.w #$0003
	STA.w $7402,x
	LDY.w $7D36,x
	BEQ.b CODE_0CE9BF
	BMI.b CODE_0CE9C0
	DEY
	BEQ.b CODE_0CE9BF
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CE9BF
	LDA.w $7D38,y
	BEQ.b CODE_0CE9BF
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr107_WatermelonSeed
	BEQ.b CODE_0CE9C0
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CE9BF
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCC.b CODE_0CE9C0
CODE_0CE9BF:
	RTL

CODE_0CE9C0:
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	JSL.l CODE_03A520
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	JSL.l CODE_03D3EB
	LDA.w #!Define_YI_AmbSpr1E4
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000C
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	JML.l CODE_03A32E

;---------------------------------------------------------------------------

DATA_0CE9FE:
	dw $0004,$0002,$000E,$000C

YI_NorSpr065_RedCoin_Init:
;$0CEA06
	JSL.l CODE_03D3F8
	BEQ.b CODE_0CEA10
	JML.l CODE_03A31E

CODE_0CEA10:
	STZ.w $7400,x
	LDY.b #$00
	LDA.w !RAM_YI_Level_LevelHeaderSpritePaletteLo
	CMP.w #$0002
	BNE.b CODE_0CEA1F
	LDY.b #$04
CODE_0CEA1F:
	STY.b $18,x
	LDA.w !EXRAM_YI_Level_ShowHiddenItemsFlag|!EXRAMBankMirror
	BEQ.b CODE_0CEA28
	INY
	INY
CODE_0CEA28:
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w DATA_0CE9FE,y
	STA.w $7042,x
	LDA.b $14
	LSR
	LSR
	LSR
	AND.w #$0003
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr065_RedCoin_Main:
;$0CEA40
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_ShowHiddenItemsFlag|!EXRAMBankMirror
	BEQ.b CODE_0CEA49
	INY
	INY
CODE_0CEA49:
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w DATA_0CE9FE,y
	STA.w $7042,x
	LDA.b $14
	LSR
	LSR
	LSR
	AND.w #$0003
	STA.w $7402,x
	LDY.w $7D36,x
	BEQ.b CODE_0CEA89
	BMI.b CODE_0CEA8A
	DEY
	BEQ.b CODE_0CEA89
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CEA89
	LDA.w $7D38,y
	BEQ.b CODE_0CEA89
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr107_WatermelonSeed
	BEQ.b CODE_0CEA8A
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0CEA89
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCC.b CODE_0CEA8A
CODE_0CEA89:
	RTL

CODE_0CEA8A:
	JSL.l CODE_0CEAA5
	JML.l CODE_03A32E

CODE_0CEA92:
	PHB
	PHK
	PLB
	PHD
	LDA.w #$7960
	TCD
	JSL.l CODE_0CEAA5
	JSL.l CODE_03A32E
	PLD
	PLB
	RTL

CODE_0CEAA5:
	JSL.l CODE_03D3EB
	LDA.w #!Define_YI_AmbSpr1E4
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000C
	STA.w $73C2,y
	LDA.w #$0008
	STA.w $7782,y
	LDY.b $18,x
	INY
	INY
	LDA.w DATA_0CE9FE,y
	JSL.l CODE_03B35B
	RTL

DATA_0CEAD4:
	dw CODE_0CECEC
	dw CODE_0CECEC
	dw CODE_0CECEC
	dw CODE_0CECEC
	dw CODE_0CECEC
	dw CODE_0CECEC

DATA_0CEAE0:
	dw CODE_0CED7B
	dw CODE_0CED7B
	dw CODE_0CED7B
	dw CODE_0CED7B
	dw CODE_0CED7B
	dw CODE_0CED7B

;---------------------------------------------------------------------------

DATA_0CEAEC:
	dw $0004,$0004,$0004,$0004,$0004,$0004

DATA_0CEAF8:
	dw DATA_0CEE64,DATA_0CEE64,DATA_0CEE64,DATA_0CEE64,DATA_0CEE64,DATA_0CEE64

DATA_0CEB04:
	dw DATA_0CEF14,DATA_0CEF14,DATA_0CEF14,DATA_0CEF14,DATA_0CEF14,DATA_0CEF14

YI_NorSpr1B0_DeflatingBalloon_Init:
;$0CEB10
	STZ.b $16,x
	LDA.w $7182,x
	STA.b $78,x
	LDA.w #$0030
	STA.w $6126
	LDA.w $7042,x
	AND.w #$FFCF
	ORA.w #$0030
	STA.w $7042,x
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.w #$0016
	BNE.b CODE_0CEB67
	LDY.b #!REGISTER_BG2HorizScrollOffset
	STY.w HDMA[$03].Destination
	LDY.b #!REGISTER_BG2VertScrollOffset
	STY.w HDMA[$04].Destination
	LDX.b #$1E
CODE_0CEB43:
	LDA.l DATA_5FCD6A,x
	STA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_0CEB43
	LDX.b #$1E
CODE_0CEB55:
	LDA.l DATA_5FCD6A,x
	STA.l $702E4E,x
	STA.l YI_Global_PaletteMirror[$71].LowByte,x
	DEX
	DEX
	BPL.b CODE_0CEB55
	BRA.b CODE_0CEB79

CODE_0CEB67:
	LDX.b #$08
CODE_0CEB69:
	LDA.l DATA_5FE34C,x
	STA.l $702D6C,x
	STA.l YI_Global_PaletteMirror[$00].LowByte,x
	DEX
	DEX
	BNE.b CODE_0CEB69
CODE_0CEB79:
	LDX.b $12
	LDA.w !RAM_YI_Global_MainScreenLayers
	ORA.w !RAM_YI_Global_SubScreenLayers
	AND.w #$000F
	XBA
	ORA.w #$0010
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0002
	STA.w $7542,x
	LDA.w #$0040
	STA.w $75E2,x
	LDA.w $70E2,x
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $7680,x
	LDA.w $7182,x
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $7682,x
	JSR.w CODE_0CEDE1
	JSR.w CODE_0CED94
	RTL

;---------------------------------------------------------------------------

DATA_0CEBB2:
	dw $0014,$000A

DATA_0CEBB6:
	dw $0001,$FFFF

YI_NorSpr1B0_DeflatingBalloon_Main:
;$0CEBBA
	JSR.w CODE_0CEDE1
	JSR.w CODE_0CED94
	LDA.b $12
	AND.w #$00FF
	STA.w $6012
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6014
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $6016
	LDA.w $60C2
	STA.w $6018
	LDX.b #FXCODE_0A8390>>16
	LDA.w #FXCODE_0A8390
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.w $601A
	BNE.b CODE_0CEBF9
	JMP.w CODE_0CEC71

CODE_0CEBF9:
	BIT.w #$0001
	BEQ.b CODE_0CEC3E
	LDA.w $60AA
	BMI.b CODE_0CEC3E
	STZ.w $60D4
	LDA.w #$0001
	STA.w $61B4
	LDA.b $18,x
	BNE.b CODE_0CEC20
	LDY.b #$04
	STY.b $18,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7A96,x
CODE_0CEC20:
	LDA.w #$0200
	STA.w $60AA
	LDA.w $601C
	CLC
	ADC.w #$0002
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_0CEC3E:
	LDA.w $601A
	AND.w #$001E
	BEQ.b CODE_0CEC71
	PHA
	PHA
	LDY.b #$00
	LDA.w $60A8
	BMI.b CODE_0CEC51
	INY
	INY
CODE_0CEC51:
	PLA
	AND.w DATA_0CEBB2,y
	BEQ.b CODE_0CEC5D
	STZ.w $60A8
	STZ.w $60B4
CODE_0CEC5D:
	PLA
	LDY.b #$00
	AND.w #$0014
	BNE.b CODE_0CEC67
	INY
	INY
CODE_0CEC67:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_0CEBB6,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_0CEC71:
	LDA.w $61B2
	ORA.w $61CC
	BNE.b CODE_0CECB0
	LDA.w $6014
	BEQ.b CODE_0CECB0
	BIT.w #$0001
	BEQ.b CODE_0CEC8E
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	BMI.b CODE_0CEC8E
	LDA.w #$0001
	TSB.w $7860
CODE_0CEC8E:
	LDA.w $6014
	AND.w #$001E
	BEQ.b CODE_0CECB0
	PHA
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	BMI.b CODE_0CECA0
	INY
	INY
CODE_0CECA0:
	PLA
	AND.w DATA_0CEBB2,y
	BEQ.b CODE_0CECB0
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_0CECB0:
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CECB6,x)

DATA_0CECB6:
	dw CODE_0CECBE
	dw CODE_0CECE0
	dw CODE_0CECE6
	dw CODE_0CECDD

CODE_0CECBE:
	LDX.b $12
	LDA.w $75E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CECCD
	EOR.w #$FFFF
	INC
CODE_0CECCD:
	CMP.w $7542,x
	BCS.b CODE_0CECDC
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_0CECDC:
	RTL

CODE_0CECDD:
	LDX.b $12
	RTL

CODE_0CECE0:
	LDX.w !RAM_YI_Level_CurrentWorldLo
	JMP.w (DATA_0CEAD4,x)

CODE_0CECE6:
	LDX.w !RAM_YI_Level_CurrentWorldLo
	JMP.w (DATA_0CEAE0,x)

CODE_0CECEC:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_0CED2F
	LDA.w #$0010
	STA.w $7A98,x
	LDA.w #!Define_YI_SoundID16_DeflateBalloon
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w #$FFF8
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7E4C,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0006
	STA.w $7462,y
CODE_0CED2F:
	LDA.w $7A96,x
	BNE.b CODE_0CED5B
	LDA.b $16,x
	SEC
	SBC.w #$0001
	BPL.b CODE_0CED53
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	INC.b $18,x
	INC.b $18,x
	INC.b $18,x
	INC.b $18,x
	STZ.b $16,x
	RTL

CODE_0CED53:
	STA.b $16,x
	LDA.w #$0008
	STA.w $7A96,x
CODE_0CED5B:
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_0CEAEC,y
	STA.w $7542,x
CODE_0CED64:
	LDY.b #$00
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	BPL.b CODE_0CED70
	INY
	INY
CODE_0CED70:
	LDA.w DATA_0CED77,y
	STA.w $75E2,x
	RTL

DATA_0CED77:
	dw $FF00,$0100

CODE_0CED7B:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CED8C
	LDA.w #$0180
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$02
	STY.b $18,x
CODE_0CED8C:
	LDA.w #$0008
	STA.w $7542,x
	BRA.b CODE_0CED64

CODE_0CED94:
	LDA.w $7680,x
	CLC
	ADC.w #$00F0
	CMP.w #$0240
	BCC.b CODE_0CEDAE
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !RAM_YI_Global_MainScreenLayers
	STZ.w $0CB2
	PLA
	JML.l CODE_03A31E

CODE_0CEDAE:
	CMP.w #$0200
	BCC.b CODE_0CEDCA
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.w #$0016
	BNE.b CODE_0CEDC0
	LDA.w #$0002
	BRA.b CODE_0CEDC3

CODE_0CEDC0:
	LDA.w #$0004
CODE_0CEDC3:
	TRB.w !RAM_YI_Global_MainScreenLayers
	TRB.w !RAM_YI_Global_SubScreenLayers
	RTS

CODE_0CEDCA:
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.w #$0016
	BNE.b CODE_0CEDD7
	LDA.w #$0002
	BRA.b CODE_0CEDDA

CODE_0CEDD7:
	LDA.w #$0004
CODE_0CEDDA:
	TSB.w !RAM_YI_Global_MainScreenLayers
	TSB.w !RAM_YI_Global_SubScreenLayers
	RTS

CODE_0CEDE1:
	LDA.w #$49F6
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$4B36
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$002C
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$449E
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_0CEB04,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_0CEF14>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_0CEAF8,y
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #DATA_0CEE64>>16
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7680,x
	CLC
	ADC.w #$0010
	STA.w $6040
	LDA.w $7682,x
	CLC
	ADC.w #$0006
	STA.w $6042
	LDX.b #FXCODE_08E865>>16
	LDA.w #FXCODE_08E865
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E5040,$703372 : dw $0348
	LDA.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CMP.w #$0016
	BNE.b CODE_0CEE55
	LDA.w #$0002
	BRA.b CODE_0CEE58

CODE_0CEE55:
	LDA.w #$0004
CODE_0CEE58:
	TSB.w !RAM_YI_Global_MainScreenLayers
	LDA.w #$0018
	TSB.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_0CEE64:
	dw $0000,$0000,$0003,$FFF5,$0008,$FFEB,$000E,$FFE1
	dw $0015,$FFDA,$001C,$FFD3,$0023,$FFCE,$002C,$FFC9
	dw $0034,$FFC5,$003B,$FFC3,$0046,$FFC1,$0050,$FFC1
	dw $005D,$FFC2,$0064,$FFC4,$006B,$FFC7,$0074,$FFCC
	dw $007C,$FFD3,$0081,$FFD8,$0086,$FFDF,$008B,$FFE9
	dw $008E,$FFF3,$008F,$0000,$008F,$0008,$008D,$0012
	dw $008B,$0018,$0087,$0020,$0081,$0029,$007C,$002E
	dw $0075,$0034,$006D,$0039,$0067,$003C,$005D,$003F
	dw $0050,$0040,$0046,$0040,$003B,$003E,$0032,$003B
	dw $002A,$0037,$0023,$0033,$001C,$002E,$0016,$0028
	dw $0011,$0023,$000C,$001D,$0008,$0016,$0003,$000C

DATA_0CEF14:
	dw $0000,$0000,$0000,$FFFF,$0000,$FFFE,$0001,$FFFD
	dw $0001,$FFFC,$0002,$FFFB,$0003,$FFFA,$0004,$FFFA
	dw $0005,$FFF9,$0006,$FFF9,$0007,$FFF9,$0008,$FFF9
	dw $0009,$FFF9,$000A,$FFF9,$000B,$FFFA,$000C,$FFFA
	dw $000D,$FFFB,$000E,$FFFC,$000E,$FFFD,$000F,$FFFE
	dw $000F,$FFFF,$000F,$0000,$000F,$0001,$000F,$0002
	dw $000F,$0003,$000E,$0004,$000E,$0005,$000D,$0006
	dw $000C,$0007,$000B,$0007,$000A,$0008,$0009,$0008
	dw $0008,$0008,$0007,$0008,$0006,$0008,$0005,$0008
	dw $0004,$0007,$0003,$0007,$0002,$0006,$0001,$0005
	dw $0001,$0004,$0000,$0003,$0000,$0002,$0000,$0001

YI_NorSpr073_BalloonPump_Init:
;$0CEFC4
	JSL.l CODE_03AE60
	LDA.w $0CB2
	BNE.b CODE_0CEFD6
	LDA.w #$01B0
	JSL.l CODE_03A34C
	BCS.b CODE_0CEFDA
CODE_0CEFD6:
	JML.l CODE_03A31E

CODE_0CEFDA:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	INC.w $0CB2
	LDA.w $70E2,x
	CLC
	ADC.w #$0010
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7182,y
	STY.b $78,x
	LDA.w #$0100
	STA.b $16,x
	JML.l CODE_028048

;---------------------------------------------------------------------------

YI_NorSpr073_BalloonPump_Main:
;$0CF005
	LDA.w $7362,x
	INC
	INC
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_088ED3>>16
	LDA.w #FXCODE_088ED3
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDY.w $6002
	JSL.l CODE_03AA60
	SEP.b #$10
	LDY.w $74A2,x
	BMI.b CODE_0CF036
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0CF036
	JSL.l CODE_028048
CODE_0CF036:
	JSL.l CODE_03AF23
	JSR.w CODE_0CF147
	STZ.b $0E
	LDA.w $7C18,x
	CLC
	ADC.w $6000
	CMP.w #$0022
	BPL.b CODE_0CF05C
	STA.w $7C18,x
	JSL.l CODE_03D129
	LDA.b $0E
	BEQ.b CODE_0CF05C
	LDA.w #$0400
	STA.w $60AA
CODE_0CF05C:
	LDY.b $18,x
	TYX
	JMP.w (DATA_0CF062,x)

DATA_0CF062:
	dw CODE_0CF06C
	dw CODE_0CF0A9
	dw CODE_0CF135

CODE_0CF068:
	dw $FFFC,$FFE0

CODE_0CF06C:
	LDX.b $12
	LDA.b $0E
	BEQ.b CODE_0CF098
	LDY.b #$00
	LDA.w $60D4
	BEQ.b CODE_0CF07E
	STZ.w $60D4
	INY
	INY
CODE_0CF07E:
	STY.b $19,x
	LDA.w CODE_0CF068,y
	STA.b $76,x
	STZ.w $7A36,x
	LDA.w #!Define_YI_SoundID96_BalloonPump
	JSL.l CODE_0085D2
	SEP.b #$20
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	RTL

CODE_0CF098:
	LDA.b $16,x
	CLC
	ADC.w #$0010
	CMP.w #$0100
	BCC.b CODE_0CF0A6
	LDA.w #$0100
CODE_0CF0A6:
	STA.b $16,x
	RTL

CODE_0CF0A9:
	LDX.b $12
	LDA.b $0E
	BNE.b CODE_0CF0B8
	SEP.b #$20
	DEC.b $18,x
	DEC.b $18,x
	REP.b #$20
	RTL

CODE_0CF0B8:
	LDA.b $16,x
	CLC
	ADC.b $76,x
	CMP.w #$0020
	BCS.b CODE_0CF0C5
	LDA.w #$0020
CODE_0CF0C5:
	STA.b $16,x
	LDA.b $76,x
	CLC
	ADC.w #$0002
	CMP.w #$FFFC
	BMI.b CODE_0CF0D5
	LDA.w #$FFFC
CODE_0CF0D5:
	STA.b $76,x
	LDA.b $16,x
	CMP.w #$0020
	BEQ.b CODE_0CF134
	LDA.b $76,x
	EOR.w #$FFFF
	INC
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	NOP #2
	LDY.b $19,x
	BEQ.b CODE_0CF0F1
	ASL
CODE_0CF0F1:
	CLC
	ADC.w $7A36,x
	STA.b $00
	AND.w #$00FF
	STA.w $7A36,x
	LDY.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CF134
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr1B0_DeflatingBalloon
	BNE.b CODE_0CF134
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	AND.w #$00FF
	BNE.b CODE_0CF134
	LDA.b $00
	AND.w #$FF00
	XBA
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	CMP.w #$0100
	BCC.b CODE_0CF131
	SEP.b #$20
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	LDA.w #$0100
CODE_0CF131:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
CODE_0CF134:
	RTL

CODE_0CF135:
	LDX.b $12
	LDA.b $16,x
	CLC
	ADC.b $76,x
	CMP.w #$0020
	BCS.b CODE_0CF144
	LDA.w #$0020
CODE_0CF144:
	STA.b $16,x
	RTL

CODE_0CF147:
	LDA.w $7680,x
	CLC
	ADC.w #$0050
	CMP.w #$0190
	BCS.b CODE_0CF160
	LDA.w $7682,x
	CLC
	ADC.w #$0050
	CMP.w #$0190
	BCS.b CODE_0CF160
CODE_0CF15F:
	RTS

CODE_0CF160:
	LDY.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CF177
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr1B0_DeflatingBalloon
	BNE.b CODE_0CF177
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	BEQ.b CODE_0CF15F
CODE_0CF177:
	PLA
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

DATA_0CF17C:
	db $00,$01,$02,$03,$04,$05,$00,$01,$02,$03,$04,$05,$00,$01,$02,$03

YI_NorSpr072_TrainBandit_Init:
;$0CF18C
	SEP.b #$20
	LDA.b $10
	AND.b #$0F
	TAY
	LDA.w DATA_0CF17C,y
	STA.w $7402,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

DATA_0CF19C:
	db $FF,$00,$1F,$FF,$02,$1F,$00,$00,$20,$00,$00,$21,$00,$00,$22,$00
	db $00,$23,$00,$00,$24,$00,$00,$25,$00,$00,$26,$00,$00,$27,$00,$00
	db $28,$FF,$01,$68,$FF,$02,$68,$FF,$01,$69,$FF,$02,$69,$FF,$01,$71
	db $FF,$02,$71,$FF,$C2,$00,$00,$00,$9E

YI_NorSpr072_TrainBandit_Main:
;$0CF1D5
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerForm08_Train
	BNE.b CODE_0CF1EB
	LDA.w $61D6
	BNE.b CODE_0CF1EB
	LDA.w $6180
	BNE.b CODE_0CF1FB
CODE_0CF1EB:
	STZ.w $7A98,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7AF6,x
CODE_0CF1FA:
	RTL

CODE_0CF1FB:
	LDA.w $7AF6,x
	BNE.b CODE_0CF1FA
	JSR.w CODE_0CF2F9
	JSR.w CODE_0CF260
	JSR.w CODE_0CF2A1
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CF214
	EOR.w #$FFFF
	INC
CODE_0CF214:
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CF21F
	EOR.w #$FFFF
	INC
CODE_0CF21F:
	CMP.b $00
	BPL.b CODE_0CF234
	PHY
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CF22D
	INY
	INY
CODE_0CF22D:
	TYA
	STA.w $7400,x
	PLY
	BRA.b CODE_0CF23D

CODE_0CF234:
	INY
	INY
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CF23D
	INY
	INY
CODE_0CF23D:
	TYA
	STA.b $00
	LDA.w $7402,x
	AND.w #$0001
	ORA.b $00
	STA.w $7402,x
	LDA.w $7A96,x
	BNE.b CODE_0CF25F
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w #$0008
	STA.w $7A96,x
CODE_0CF25F:
	RTL

CODE_0CF260:
	LDA.w $7A98,x
	BNE.b CODE_0CF2A0
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0080
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7A98,x
CODE_0CF2A0:
	RTS

CODE_0CF2A1:
	LDY.w $7D36,x
	BPL.b CODE_0CF2AA
	JSL.l CODE_03A858
CODE_0CF2AA:
	PHX
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0CF2A0
	BEQ.b CODE_0CF2A0
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr072_TrainBandit
	BNE.b CODE_0CF2A0
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CF2DE
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CF2DE:
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CF2F4
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0CF2F4:
	RTS

DATA_0CF2F5:
	dw $0001,$FFFF

CODE_0CF2F9:
	LDA.w #DATA_0CF19C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0CF19C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0013
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_0AE9AE>>16
	LDA.w #FXCODE_0AE9AE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	AND.w #$000F
	CMP.w #$000F
	BEQ.b CODE_0CF386
	LDY.b #$00
	AND.w #$0008
	BNE.b CODE_0CF333
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CF342
CODE_0CF333:
	INY
	INY
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	AND.w #$0004
	BNE.b CODE_0CF355
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CF355
CODE_0CF342:
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0CF2F5,y
	STA.w $70E2,x
	BRA.b CODE_0CF384

CODE_0CF355:
	LDY.b #$00
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	AND.w #$0002
	BNE.b CODE_0CF364
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CF373
CODE_0CF364:
	INY
	INY
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	AND.w #$0001
	BNE.b CODE_0CF386
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CF386
CODE_0CF373:
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_0CF2F5,y
	STA.w $7182,x
CODE_0CF384:
	PLA
	RTL

CODE_0CF386:
	RTS

;---------------------------------------------------------------------------

DATA_0CF387:
	dw $FFC0,$0040

YI_NorSpr12C_FlyOrWhirlyGuy_Init:
;$0CF38B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0CF3BF
	LDA.w $7182,x
	ASL
	ASL
	ASL
	ASL
	AND.w #$FF00
	ORA.w #$8000
	STA.b $00
	LDA.w $70E2,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	ORA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TAY
	REP.b #$20
CODE_0CF3BF:
	DEY
	TYX
	JMP.w (DATA_0CF3C4,x)

DATA_0CF3C4:
	dw CODE_0CF3C8
	dw CODE_0CF405

CODE_0CF3C8:
	LDX.b $12
	JSL.l CODE_03D3F8
	BEQ.b CODE_0CF3D4
	JML.l CODE_03A31E

CODE_0CF3D4:
	LDA.w $70E2,x
	STA.w $7A36,x
	LDA.w $7182,x
	STA.w $7A38,x
	LDY.w $7400,x
	LDA.w DATA_0CF387,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	LDA.w #$3106
	STA.w $7040,x
	LDA.w $7042,x
	ORA.w #$0002
	STA.w $7042,x
	RTL

CODE_0CF405:
	LDX.b $12
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDA.w #$2906
	STA.w $7040,x
	RTL

;---------------------------------------------------------------------------

DATA_0CF423:
	dw DATA_0CF87B,DATA_0CF8F3

DATA_0CF427:
	dw $0200,$FE00

YI_NorSpr12C_FlyOrWhirlyGuy_Main:
;$0CF42B
	LDY.w $74A2,x
	BMI.b CODE_0CF44B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	LDA.w #DATA_0CF87B>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w DATA_0CF423,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_09AEC1>>16
	LDA.w #FXCODE_09AEC1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0CF44B:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0CF45B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	TYX
	JMP.w (DATA_0CF7B4,x)

CODE_0CF45B:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	BNE.b CODE_0CF464
	JSR.w CODE_0CF477
CODE_0CF464:
	JSL.l CODE_03AF23
	JSR.w CODE_0CF6D0
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	TYX
	JMP.w (DATA_0CF473,x)

DATA_0CF473:
	dw CODE_0CF4D9
	dw CODE_0CF5EC

CODE_0CF477:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_0CF4B0
	LDA.w #$0115
	JSL.l CODE_03A364
	BCC.b CODE_0CF4B1
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
CODE_0CF4B0:
	RTS

CODE_0CF4B1:
	LDA.w #!Define_YI_NorSpr115_Coin
	TXY
	JSL.l CODE_03A377
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLA
	PLY
	PLA
	RTL

CODE_0CF4D9:
	LDX.b $12
	JSR.w CODE_0CF52B
	LDA.w $7A36,x
	SEC
	SBC.w #$0020
	CMP.w $70E2,x
	BMI.b CODE_0CF4EF
	LDA.w #$0002
	BRA.b CODE_0CF4FB

CODE_0CF4EF:
	CLC
	ADC.w #$0040
	CMP.w $70E2,x
	BPL.b CODE_0CF505
	LDA.w #$0000
CODE_0CF4FB:
	STA.w $7400,x
	TAY
	LDA.w DATA_0CF387,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CF505:
	JMP.w CODE_0CF6AB

CODE_0CF508:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0CF526
	LDA.w #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_0085D2
	JSL.l CODE_03B20B
	JMP.w CODE_0CF5C4

CODE_0CF526:
	JSL.l CODE_03A858
CODE_0CF52A:
	RTS

CODE_0CF52B:
	LDY.w $7D36,x
	BMI.b CODE_0CF508
	DEY
	BMI.b CODE_0CF52A
	BEQ.b CODE_0CF52A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CF52A
	LDA.w $7D38,y
	BEQ.b CODE_0CF52A
	STZ.b $00
	LDA.w $70E2,x
	CMP.w $70E2,y
	BMI.b CODE_0CF550
	INC.b $00
	INC.b $00
CODE_0CF550:
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #$0115
	JSL.l CODE_03A364
	BCC.b CODE_0CF5C4
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $7040,x
	SEC
	SBC.w #$0800
	STA.w $7040,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$FE00
	STA.w $75E2,x
	LDY.b $00
	LDA.w DATA_0CF427,y
	STA.w $75E0,x
	LDA.w #$0002
	STA.w $7A98,x
	PLA
	RTL

CODE_0CF5C4:
	LDA.w #!Define_YI_NorSpr115_Coin
	TXY
	JSL.l CODE_03A377
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLA
	JMP.w CODE_0CFF61

CODE_0CF5EC:
	LDX.b $12
	JSR.w CODE_0CF6E6
	SEP.b #$20
	LDA.b $17,x
	INC
	INC
	AND.b #$0E
	STA.b $17,x
	TAY
	LDA.w $7042,x
	AND.b #$F1
	ORA.b $17,x
	STA.w $7042,x
	REP.b #$20
	LDY.b $16,x
	TYX
	JMP.w (DATA_0CF60E,x)

DATA_0CF60E:
	dw CODE_0CF614
	dw CODE_0CF66A
	dw CODE_0CF698

CODE_0CF614:
	LDX.b $12
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_0CF665
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_0CF665
CODE_0CF636:
	STZ.w $7542,x
	STZ.w $75E2,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	SEC
	SBC.w #$0060
	STA.w $7A38,x
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	STA.w $7400,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_0CF665:
	RTL

DATA_0CF666:
	dw $FFC0,$0040

CODE_0CF66A:
	LDX.b $12
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0CF666,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	CMP.w $7A38,x
	BPL.b CODE_0CF697
	LDA.w #$0080
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_0CF697:
	RTL

CODE_0CF698:
	LDX.b $12
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0CF666,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CF6AB:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w $75E2,x
	BMI.b CODE_0CF6CF
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $75E2,x
	BPL.b CODE_0CF6C0
	EOR.w #$FFFF
	INC
CODE_0CF6C0:
	CMP.w $7542,x
	BCS.b CODE_0CF6CF
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_0CF6CF:
	RTL

CODE_0CF6D0:
	LDA.w $7A96,x
	BNE.b CODE_0CF6E5
	LDA.w #$0001
	STA.w $7A96,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_0CF6E5:
	RTS

CODE_0CF6E6:
	LDY.w $7D36,x
	BMI.b CODE_0CF729
	DEY
	BMI.b CODE_0CF728
	BEQ.b CODE_0CF728
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CF728
	LDA.w $7D38,y
	BEQ.b CODE_0CF728
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	LDA.w #!Define_YI_SoundID8F_Correct
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDY.b $16,x
	BNE.b CODE_0CF71C
	JSL.l CODE_0CF636
CODE_0CF71C:
	LDY.b $18,x
	CPY.b #$05
	BCS.b CODE_0CF725
	INY
	STY.b $18,x
CODE_0CF725:
	JSR.w CODE_0CF752
CODE_0CF728:
	RTS

CODE_0CF729:
	JSL.l CODE_03A858
	RTS

DATA_0CF72E:
	dw $0200,$0202

DATA_0CF732:
	dw $0000,$0060,$0000,$FFA0,$0080,$FF80

DATA_0CF73E:
	dw $0000,$FD60,$FD00,$FD60,$FE00,$FE00

DATA_0CF74A:
	dw !Define_YI_SoundID00_None,!Define_YI_SoundID09_Coin,!Define_YI_SoundID09_Coin,!Define_YI_SoundID18_CoinSpillage

CODE_0CF752:
	LDY.b $18,x
	BEQ.b CODE_0CF7A3
	CPY.b #$04
	BCS.b CODE_0CF7A4
	LDA.w DATA_0CF74A,y
	PHY
	JSL.l CODE_0085D2
	PLY
	LDA.w DATA_0CF72E,y
	TAY
CODE_0CF767:
	PHY
	LDA.w DATA_0CF732,y
	STA.b $00
	LDA.w DATA_0CF73E,y
	STA.b $02
	LDY.w $7400,x
	BEQ.b CODE_0CF77F
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
CODE_0CF77F:
	LDA.w #$0115
	JSL.l CODE_03A34C
	BCC.b CODE_0CF79E
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
CODE_0CF79E:
	PLY
	DEY
	DEY
	BNE.b CODE_0CF767
CODE_0CF7A3:
	RTS

CODE_0CF7A4:
	PHY
	JSL.l CODE_03A496
	PLY
	CPY.b #$05
	BCC.b CODE_0CF7A3
	PLA
	PLA
	JML.l CODE_03B25B

DATA_0CF7B4:
	dw CODE_0CF7B8
	dw CODE_0CF82F

CODE_0CF7B8:
	LDX.b $12
	LDA.w #$0115
	JSL.l CODE_03A364
	BCC.b CODE_0CF802
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	TXY
	JSL.l CODE_03A377
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7042,x
	STA.w $7042,x
	BRA.b CODE_0CF82C

CODE_0CF802:
	STZ.w $6162
	STZ.w $6168
	LDA.w #!Define_YI_NorSpr115_Coin
	TXY
	JSL.l CODE_03A377
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_0CF82C:
	PLY
	PLA
	RTL

CODE_0CF82F:
	LDX.b $12
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	TXY
	JSL.l CODE_03A377
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC
	ORA.w $7042,x
	STA.w $7042,x
	BRA.b CODE_0CF82C

YI_NorSpr12C_FlyOrWhirlyGuy_StompRt:
;$0CF848
	LDY.w $74A2,x
	BMI.b CODE_0CF868
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	LDA.w #DATA_0CF8F3>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0CF8F3
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_09A7A7>>16
	LDA.w #FXCODE_09A7A7
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0CF868:
	JSR.w CODE_0CF6D0
	LDA.w $7A98,x
	CMP.w #$0001
	BNE.b CODE_0CF87A
	LDA.w #!Define_YI_SoundID6E_FlyGuyGettingAway
	JSL.l CODE_0085D2
CODE_0CF87A:
	RTL

DATA_0CF87B:
	dw $0002,$8800,$0000,$FA08,$402C,$0000,$2CFA,$0000
	dw $0E01,$402F,$0600,$2F0E,$0240,$1000,$02A0,$0002
	dw $8800,$0000,$FA08,$402D,$0000,$2DFA,$0000,$0E01
	dw $402F,$0600,$2F0E,$0240,$1000,$02A0,$0002,$8800
	dw $0000,$FA08,$403C,$0000,$3CFA,$0000,$0E01,$402F
	dw $0600,$2F0E,$0240,$1000,$02A0,$0002,$8800,$0000
	dw $FA08,$403D,$0000,$3DFA,$0000,$0E01,$402F,$0600
	dw $2F0E,$0240,$1000,$02A0

DATA_0CF8F3:
	dw $0002,$8800,$0000,$FA00,$002C,$0800,$2CFA,$0040
	dw $0E01,$402F,$0600,$2F0E,$0240,$0000,$0088,$0000
	dw $2DFA,$0000,$FA08,$402D,$0100,$2F0E,$0040,$0E06
	dw $402F,$0002,$8800,$0000,$FA00,$003C,$0800,$3CFA
	dw $0040,$0E01,$402F,$0600,$2F0E,$0240,$0000,$0088
	dw $0000,$3DFA,$0000,$FA08,$403D,$0100,$2F0E,$0040
	dw $0E06,$402F

CODE_0CF957:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BPL.b CODE_0CF972
	PHA
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	STA.b $04
	PLA
	AND.w #$7F00
	LSR
	LSR
	LSR
	LSR
	JSL.l CODE_03D3F3
CODE_0CF972:
	RTL

;---------------------------------------------------------------------------

DATA_0CF973:
	dw $0409,$200A,$0409,$1008

DATA_0CF97B:
	dw $040B,$040C,$240D,$040C,$040B,$1008

DATA_0CF987:
	dw $040E,$240F,$040E,$1008

DATA_0CF98F:
	dw $2401,$1000

DATA_0CF993:
	dw $0404,$2005,$0404,$1000

DATA_0CF99B:
	dw $0406,$2007,$0406,$1000

DATA_0CF9A3:
	dw $0404,$2010,$0404,$1000

DATA_0CF9AB:
	dw $0401,$2002,$0401,$1000

DATA_0CF9B3:
	dw $0402,$2003,$0402,$1001

DATA_0CF9BB:
	dw $0400,$2004,$0400,$1001

DATA_0CF9C3:
	dw $0406,$2007,$0406,$1001

DATA_0CF9CB:
	dw DATA_0CF98F : db $02
	dw DATA_0CF993 : db $06
	dw DATA_0CF99B : db $06
	dw DATA_0CF98F : db $02
	dw DATA_0CF993 : db $06
	dw DATA_0CF98F : db $02
	dw DATA_0CF993 : db $06
	dw DATA_0CF98F : db $02

DATA_0CF9E3:
	dw DATA_0CF973 : db $06
	dw DATA_0CF97B : db $0A
	dw DATA_0CF987 : db $06
	dw DATA_0CF973 : db $06
	dw DATA_0CF97B : db $0A
	dw DATA_0CF973 : db $06
	dw DATA_0CF97B : db $0A
	dw DATA_0CF973 : db $06

DATA_0CF9FB:
	dw DATA_0CF9A3 : db $06
	dw DATA_0CF9AB : db $06
	dw DATA_0CF99B : db $06
	dw DATA_0CF9A3 : db $06
	dw DATA_0CF9AB : db $06
	dw DATA_0CF9A3 : db $06
	dw DATA_0CF9AB : db $06
	dw DATA_0CF9A3 : db $06

DATA_0CFA13:
	dw DATA_0CF9B3 : db $06
	dw DATA_0CF9BB : db $06
	dw DATA_0CF9C3 : db $06
	dw DATA_0CF9B3 : db $06
	dw DATA_0CF9BB : db $06
	dw DATA_0CF9B3 : db $06
	dw DATA_0CF9BB : db $06
	dw DATA_0CF9B3 : db $06

DATA_0CFA2B:
	dw DATA_0CF9CB,DATA_0CF9E3,DATA_0CF9E3,DATA_0CF9E3,DATA_0CF9FB,DATA_0CFA13,DATA_0CFA13,DATA_0CF9FB

DATA_0CFA3B:
	dw $000A,$000E,$000C,$0008,$0002,$0000,$0004,$0006

YI_NorSpr12D_PrologueCutsceneYoshi_Init:
;$0CFA4B
	LDY.b $16,x
	LDA.w $7042,x
	ORA.w DATA_0CFA3B,y
	STA.w $7042,x
	LDA.w $7182,x
	STA.b $76,x
	JMP.w CODE_0CFB20

DATA_0CFA5E:
	dw $0020,$0040,$0060,$0080

DATA_0CFA66:
	dw $0004,$0008,$000C,$0010

YI_NorSpr12D_PrologueCutsceneYoshi_Main:
;$0CFA6E
	JSR.w CODE_0CFB64
	LDY.b $16,x
	TYX
	JMP.w (DATA_0CFA77,x)

DATA_0CFA77:
	dw CODE_0CFA87
	dw CODE_0CFAB0
	dw CODE_0CFAB0
	dw CODE_0CFAB0
	dw CODE_0CFAB0
	dw CODE_0CFAB0
	dw CODE_0CFAB0
	dw CODE_0CFAB0

CODE_0CFA87:
	LDX.b $12
	LDA.w $0D27
	CMP.w #$0004
	BCS.b CODE_0CFA94
	JMP.w CODE_0CFAED

CODE_0CFA94:
	LDA.w #!Define_YI_PlayerState04
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0003
	STA.w $611A
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	JML.l CODE_03A31E

CODE_0CFAB0:
	LDX.b $12
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$01C8
	BCC.b CODE_0CFAED
	LDA.w #$0002
	STA.w $7400,x
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0CFADF
	LDA.w #$0012
	STA.w $7402,x
	LDA.w $7A98,x
	BNE.b CODE_0CFAEC
	LDA.w #$0011
	STA.w $7402,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0CFADF:
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_0CFA66,y
	STA.w $7A98,x
CODE_0CFAEC:
	RTL

CODE_0CFAED:
	LDX.b $12
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_0CFA66,y
	STA.w $7A98,x
	LDA.w $7A96,x
	BNE.b CODE_0CFB1F
	LDY.b $18,x
	DEY
	DEY
	BMI.b CODE_0CFB20
	STY.b $18,x
	LDA.w $7A36,x
	STA.b $00
	INC
	STA.b $02
	SEP.b #$20
	LDA.b ($00),y
	STA.w $7402,x
	LDA.b ($02),y
	STA.w $7A96,x
	REP.b #$20
CODE_0CFB1F:
	RTL

CODE_0CFB20:
	LDY.b $16,x
	LDA.w DATA_0CFA2B,y
	STA.b $00
	LDA.b $10
	AND.w #$0007
	STA.b $02
	ASL
	CLC
	ADC.b $02
	TAY
	LDA.b ($00),y
	STA.w $7A36,x
	STA.b $02
	INC
	STA.b $04
	INY
	INY
	SEP.b #$20
	LDA.b ($00),y
	STA.b $18,x
	TAY
	LDA.b ($02),y
	STA.w $7402,x
	REP.b #$20
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_0CFA5E,y
	LDY.w $611A
	BEQ.b CODE_0CFB60
	CLC
	ADC.w #$0140
CODE_0CFB60:
	STA.w $7A96,x
	RTL

CODE_0CFB64:
	LDA.b $76,x
	CMP.w $7182,x
	BPL.b CODE_0CFB7A
	STA.w $7182,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7860,x
CODE_0CFB7A:
	RTS

DATA_0CFB7B:
	dw CODE_0CFC5F
	dw CODE_0CFCA5
	dw CODE_0CFCC2
	dw CODE_0CFC5F
	dw CODE_0CFCFC
	dw CODE_0CFD08

;---------------------------------------------------------------------------

DATA_0CFB87:
	dw $0000,$0002,$0004,$0008

YI_NorSpr0F3_WoozyGuy_Init:
;$0CFB8F
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0CFBD4
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.b #$10
	ORA.b $00
	LSR
	LSR
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TAY
	REP.b #$20
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PHY
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	PLY
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BNE.b CODE_0CFBFE
CODE_0CFBD4:
	DEY
	LDA.w $7042,x
	ORA.w DATA_0CFB87,y
	STA.w $7042,x
	JSL.l CODE_03AE11
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$20
	LDA.w #$0100
	STA.b $18,x
	LDA.w #$FFE0
	STA.w $7A36,x
	JSL.l CODE_0CFEDD
	RTL

CODE_0CFBFE:
	DEY
	LDA.w $7042,x
	ORA.w DATA_0CFB87,y
	STA.w $7042,x
	JSL.l CODE_03AE11
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,x
	LDA.w #$0020
	STA.b $18,x
	DEC
	SEP.b #$20
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	LDA.w #$FFE0
	STA.w $7A36,x
	LDY.b #$0A
	STY.b $76,x
	JSL.l CODE_0CFEDD
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0F3_WoozyGuy_Main:
;$0CFC37
	JSL.l CODE_03AA2E
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0CFC48
	LDA.w #$0100
	STA.b $18,x
CODE_0CFC48:
	JSR.w CODE_0CFD41
	JSL.l CODE_0CFEDD
	JSR.w CODE_0CFD69
	JSL.l CODE_03AF23
	JSR.w CODE_0CFDFC
	LDY.b $76,x
	TYX
	JMP.w (DATA_0CFB7B,x)

CODE_0CFC5F:
	LDX.b $12
	LDA.w $7A36,x
	PHA
	CLC
	ADC.b $18,x
	STA.b $18,x
	PLA
	BPL.b CODE_0CFC7C
	LDA.b $18,x
	CMP.w #$00A0
	BCS.b CODE_0CFC9A
	LDA.w #$0020
	STA.w $7A36,x
	BRA.b CODE_0CFC9A

CODE_0CFC7C:
	LDA.b $18,x
	CMP.w #$0100
	BCC.b CODE_0CFC9A
	LDA.w #$0100
	STA.b $18,x
	LDA.w #$FFE0
	STA.w $7A36,x
	LDA.w #$0020
	STA.w $7A96,x
	LDY.b $76,x
	INY
	INY
	STY.b $76,x
CODE_0CFC9A:
	RTL

DATA_0CFC9B:
	dw $FF00,$0100

DATA_0CFC9F:
	dw $2000,$E000,$2000

CODE_0CFCA5:
	LDX.b $12
	LDA.b $16,x
	LDY.w $7400,x
	LDA.w DATA_0CFC9B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7A96,x
	LDY.b $76,x
	INY
	INY
	STY.b $76,x
	RTL

CODE_0CFCC2:
	LDX.b $12
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0CFCD5
	LDA.b $16,x
	CLC
	ADC.w #$0800
	STA.b $16,x
	RTL

CODE_0CFCD5:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	BNE.b CODE_0CFCE6
	STZ.b $16,x
CODE_0CFCDF:
	LDY.b $76,x
	INY
	INY
	STY.b $76,x
	RTL

CODE_0CFCE6:
	BMI.b CODE_0CFCF2
	LDY.w $7400,x
	LDA.w DATA_0CFC9F,y
	STA.b $16,x
	BRA.b CODE_0CFCDF

CODE_0CFCF2:
	LDY.w $7400,x
	LDA.w DATA_0CFC9F+$02,y
	STA.b $16,x
	BRA.b CODE_0CFCDF

CODE_0CFCFC:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0CFD07
	LDY.b #$00
	STY.b $76,x
CODE_0CFD07:
	RTL

CODE_0CFD08:
	LDX.b $12
	LDA.w $7680,x
	CMP.w #$00F0
	BCS.b CODE_0CFD2F
	LDA.w $7682,x
	CMP.w #$00C0
	BCS.b CODE_0CFD2F
	LDA.b $18,x
	CLC
	ADC.w #$0002
	CMP.w #$0100
	BCS.b CODE_0CFD30
	STA.b $18,x
	DEC
	SEP.b #$20
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$20
CODE_0CFD2F:
	RTL

CODE_0CFD30:
	LDA.w #$0100
	STA.b $18,x
	SEP.b #$20
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.b $76,x
	REP.b #$20
	RTL

CODE_0CFD41:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0CFD68
	LDA.w $7D38,x
	BEQ.b CODE_0CFD68
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0180
	CMP.w #$0301
	BCC.b CODE_0CFD68
	LDA.w #$0100
	STA.b $18,x
	LDA.w $7402,x
	AND.w #$00FF
	STA.w $7402,x
CODE_0CFD68:
	RTS

CODE_0CFD69:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0CFD82
	LDA.w $7D38,x
	BEQ.b CODE_0CFD82
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0180
	CMP.w #$0301
	BCS.b CODE_0CFD83
CODE_0CFD82:
	RTS

CODE_0CFD83:
	PLA
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_0CFD90
	RTL

CODE_0CFD90:
	LDA.w $7D38,x
	DEC
	BEQ.b CODE_0CFD99
	STA.w $7D38,x
CODE_0CFD99:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	TYX
	JMP.w (DATA_0CFDA0,x)

DATA_0CFDA0:
	dw CODE_0CFDA4
	dw CODE_0CFDCF

CODE_0CFDA4:
	LDX.b $12
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0CFDAF
	INY
	INY
CODE_0CFDAF:
	TYA
	EOR.w $7400,x
	TAY
	LDA.w DATA_0C8D66,y
	STA.b $78,x
	LDA.w $7400,x
	STA.w $7A38,x
	LDA.w #$0100
	STA.b $18,x
	SEP.b #$20
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	REP.b #$20
	RTL

CODE_0CFDCF:
	LDX.b $12
	JSR.w CODE_0CFE63
	JSR.w CODE_0CFE6C
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0CFDEE
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0CFDE8
	INY
	INY
CODE_0CFDE8:
	LDA.w DATA_0C8D4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0CFDEE:
	LDA.b $16,x
	CLC
	ADC.b $78,x
	STA.b $16,x
	LDA.w $7400,x
	STA.w $7A38,x
	RTL

CODE_0CFDFC:
	LDX.b $12
	LDY.w $7D36,x
	BPL.b CODE_0CFE0E
	LDA.w $61D6
	BNE.b CODE_0CFE5E
	PLA
	JSL.l CODE_03A5B7
	RTL

CODE_0CFE0E:
	DEY
	BMI.b CODE_0CFE5E
	BEQ.b CODE_0CFE5E
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0CFE5E
	LDA.w $7D38,y
	BEQ.b CODE_0CFE5E
	JSR.w CODE_0C8EBF
	BCC.b CODE_0CFE28
	JMP.w CODE_0CFEAA

CODE_0CFE28:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	AND.w #$8000
	ASL
	ROL
	ASL
	STA.b $00
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	PLA
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
	SEP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	LDA.b #$01
	STA.w $7D38,x
	REP.b #$20
	LDY.b $00
	LDA.w DATA_0C8D4E,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JML.l CODE_0CFDA4

CODE_0CFE5E:
	RTS

DATA_0CFE5F:
	dw $0008,$0004

CODE_0CFE63:
	LDA.w $7400,x
	CMP.w $7A38,x
	BNE.b CODE_0CFE73
	RTS

CODE_0CFE6C:
	LDX.b $12
	LDY.w $7D36,x
	BPL.b CODE_0CFE77
CODE_0CFE73:
	PHY
	JMP.w CODE_0C8F3F

CODE_0CFE77:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHX
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0CFEC0
	BEQ.b CODE_0CFEC0
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$000E
	BCC.b CODE_0CFEC0
	LDA.w $6FA2,y
	AND.w #$6000
	BNE.b CODE_0CFEC0
	JSR.w CODE_0C8EBF
	BCS.b CODE_0CFEAA
	LDA.w $6FA0,y
	AND.w #$0020
	BNE.b CODE_0CFEC0
CODE_0CFEAA:
	LDA.w $70E2,y
	STA.b $00
	LDA.w $7182,y
	STA.b $02
	TYX
	JSL.l CODE_03B25B
	LDX.b $12
	PLA
	JML.l CODE_03B24B

CODE_0CFEC0:
	RTS

DATA_0CFEC1:
	dw $0007,$0006,$0005,$0004,$0003,$0002,$0001,$0000
	dw $0000,$0000,$0000,$0000

DATA_0CFED9:
	dw FXDATA_540000+$7020,FXDATA_540000+$6020

CODE_0CFEDD:
	LDY.w $7403,x
	BNE.b CODE_0CFF60
	LDY.w $74A2,x
	BMI.b CODE_0CFF60
	LDA.b $18,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FE
	TAY
	LDA.w DATA_0CFEC1,y
	STA.b $00
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6002,y
	CLC
	ADC.b $00
	STA.w $6002,y
	SEP.b #$10
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0CFF60
	LDA.w $7722,x
	BMI.b CODE_0CFF60
	LDY.b #$00
	LDA.w $7D38,x
	BEQ.b CODE_0CFF19
	INY
	INY
CODE_0CFF19:
	LDA.w DATA_0CFED9,y
	STA.b $00
	LDY.b $17,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TYA
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	REP.b #$10
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $00
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$6020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_0883ED>>16
	LDA.w #FXCODE_0883ED
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_0CFF60:
	RTL

CODE_0CFF61:
	PHY
	TXY
	JSL.l CODE_03B4DF
	PLY
	RTL

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($0CFF84, incbin, DATA_0CFF84_YI_U2.bin)
else
	%FREE_BYTES($0CFF69, 151, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank0DMacros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_0D8000:
	TYX
	RTS

;---------------------------------------------------------------------------

YI_NorSpr101_RotatingMace_Init:
YI_NorSpr102_DoubleRotatingMace_Init:
;$0D8002
	JSL.l CODE_03AE60
	LDA.w $7722,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03AD74
	BCS.b CODE_0D801C
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7722,x
	JML.l CODE_03A31E

CODE_0D801C:
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	STA.w $7400,x
	DEC
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSR.w CODE_0D82C0
	RTL

;---------------------------------------------------------------------------

YI_NorSpr101_RotatingMace_Main:
YI_NorSpr102_DoubleRotatingMace_Main:
;$0D8031
	STZ.w $7400,x
	JSR.w CODE_0D8065
	JSL.l CODE_03AF23
	JSL.l CODE_03A2DE
	BCC.b CODE_0D804C
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7722,x
	JSL.l CODE_03AEFD
	RTL

CODE_0D804C:
	JSR.w CODE_0D821E
	JSR.w CODE_0D82B1
	LDA.w $7A96,x
	BNE.b CODE_0D8064
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID1B_MaceTick
	JSL.l CODE_0085D2
CODE_0D8064:
	RTL

CODE_0D8065:
	JSL.l CODE_03AA52
	LDA.w $7722,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7722,x
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	JSL.l CODE_03AA60
	PLA
	STA.w $7722,x
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6024,y
	STA.w $6044,y
	LDA.w $602C,y
	STA.w $604C,y
	LDA.w $6034,y
	STA.w $6054,y
	LDA.w $603C,y
	STA.w $605C,y
	SEP.b #$10
	LDA.w #$FFE9
	STA.b $00
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	AND.w #$01FE
	STA.b $02
	LDX.b #$00
	LDY.b #$02
CODE_0D80B9:
	LDA.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $02
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHX
	PHY
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $04,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $08,x
	LDA.b $00
	CLC
	ADC.w #$FFC8
	STA.b $00
	INX
	INX
	DEY
	BNE.b CODE_0D80B9
	LDX.b $12
	LDA.b $04
	STA.b $18,x
	LDA.b $06
	STA.b $76,x
	LDA.b $08
	STA.b $78,x
	LDA.b $0A
	STA.w $7A36,x
	REP.b #$10
	LDY.w $7362,x
	LDA.w $7CD6,x
	SEC
	SBC.w $6094
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $609C
	STA.b $02
	LDX.w #$0002
CODE_0D8114:
	LDA.b $04,x
	STA.b $0C
	LDA.b $08,x
	STA.b $0E
	JSR.w CODE_0D81F3
	TYA
	CLC
	ADC.w #$0020
	TAY
	DEX
	DEX
	BPL.b CODE_0D8114
	LDA.b $04
	CLC
	ADC.b $06
	CMP.w #$8000
	ROR
	STA.b $0C
	LDA.b $08
	CLC
	ADC.b $0A
	CMP.w #$8000
	ROR
	STA.b $0E
	JSR.w CODE_0D81F3
	SEP.b #$10
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr101_RotatingMace
	BNE.b CODE_0D814F
	RTS

CODE_0D814F:
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6004,y
	ORA.w #$C000
	STA.w $60BC,y
	LDA.w $600C,y
	ORA.w #$C000
	STA.w $60B4,y
	LDA.w $6014,y
	ORA.w #$C000
	STA.w $60AC,y
	LDA.w $601C,y
	ORA.w #$C000
	STA.w $60A4,y
	LDA.w $6024,y
	ORA.w #$C000
	STA.w $607C,y
	STA.w $609C,y
	LDA.w $602C,y
	ORA.w #$C000
	STA.w $6074,y
	STA.w $6094,y
	LDA.w $6034,y
	ORA.w #$C000
	STA.w $606C,y
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror,y
	LDA.w $603C,y
	ORA.w #$C000
	STA.w $6064,y
	STA.w $6084,y
	LDX.w #$0006
CODE_0D81AB:
	LDA.b $04,x
	EOR.w #$FFFF
	INC
	STA.b $04,x
	DEX
	DEX
	BPL.b CODE_0D81AB
	TYA
	CLC
	ADC.w #$00A0
	TAY
	LDX.w #$0002
CODE_0D81C0:
	LDA.b $04,x
	STA.b $0C
	LDA.b $08,x
	STA.b $0E
	JSR.w CODE_0D81F3
	TYA
	SEC
	SBC.w #$0020
	TAY
	DEX
	DEX
	BPL.b CODE_0D81C0
	LDA.b $04
	CLC
	ADC.b $06
	CMP.w #$8000
	ROR
	STA.b $0C
	LDA.b $08
	CLC
	ADC.b $0A
	CMP.w #$8000
	ROR
	STA.b $0E
	JSR.w CODE_0D81F3
	SEP.b #$10
	LDX.b $12
	RTS

CODE_0D81F3:
	LDA.b $00
	CLC
	ADC.b $0E
	STA.w $6008,y
	STA.w $6018,y
	SEC
	SBC.w #$0010
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $02
	CLC
	ADC.b $0C
	STA.w $6012,y
	STA.w $601A,y
	SEC
	SBC.w #$0010
	STA.w $6002,y
	STA.w $600A,y
	RTS

CODE_0D821E:
	LDA.b $18,x
	STA.b $00
	LDA.b $76,x
	STA.b $02
	CLC
	ADC.b $00
	CMP.w #$8000
	ROR
	STA.b $04
	LDA.b $78,x
	STA.b $06
	LDA.w $7A36,x
	STA.b $08
	CLC
	ADC.b $06
	CMP.w #$8000
	ROR
	STA.b $0A
	LDA.w $7C16,x
	STA.b $0C
	LDA.w $7C18,x
	STA.b $0E
	LDA.w $6120
	CLC
	ADC.w #$000A
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	ASL
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $6122
	CLC
	ADC.w #$000A
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	ASL
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	JSR.w CODE_0D8284
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr101_RotatingMace
	BEQ.b CODE_0D8283
	LDX.b #$0A
CODE_0D8274:
	LDA.b $00,x
	EOR.w #$FFFF
	INC
	STA.b $00,x
	DEX
	DEX
	BPL.b CODE_0D8274
	JSR.w CODE_0D8284
CODE_0D8283:
	RTS

CODE_0D8284:
	LDX.b #$04
CODE_0D8286:
	LDA.b $06,x
	CLC
	ADC.b $0C
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BCS.b CODE_0D82A2
	LDA.b $00,x
	CLC
	ADC.b $0E
	CLC
	ADC.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CMP.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	BCC.b CODE_0D82A9
CODE_0D82A2:
	DEX
	DEX
	BPL.b CODE_0D8286
	LDX.b $12
	RTS

CODE_0D82A9:
	LDX.b $12
	JSL.l CODE_03A858
	PLA
	RTS

CODE_0D82B1:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0001
	BNE.b CODE_0D833C
CODE_0D82C0:
	LDA.w $7A38,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$01FE
	STA.w $7A38,x
	LDA.w #FXDATA_550000+$00A0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$00A0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #FXDATA_550000+$00C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$00C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0D833C:
	RTS

;---------------------------------------------------------------------------

DATA_0D833D:
	dw $FFE0,$0020

DATA_0D8341:
	dw $FFF0,$0020,$FFE0,$0010

DATA_0D8349:
	dw $FFF0,$0010

YI_NorSpr105_BooGuysCarryingBombToLeft_Init:
;$0D834D
	LDA.w #$0000
	BRA.b CODE_0D8355

YI_NorSpr106_BooGuysCarryingBombToRight_Init:
	LDA.w #$0002
CODE_0D8355:
	STA.w $7400,x
	STA.w $7A36,x
	ASL
	TAY
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_0D8367
	INY
	INY
CODE_0D8367:
	LDA.w $0EEF,y
	BEQ.b CODE_0D8370
	JML.l CODE_03A31E

CODE_0D8370:
	LDA.w #$0001
	STA.w $0EEF,y
	TYA
	ASL
	ASL
	ASL
	TAY
	STY.b $78,x
	LDA.w #$FFFF
	STA.w $0EF7,y
	STA.w $0EF9,y
	STA.w $0EFB,y
	STA.w $0EFD,y
	STA.w $0EFF,y
	STA.w $0F01,y
	STA.w $0F03,y
	STA.w $0F05,y
	INC
	STA.w $0F37,y
	STA.w $0F39,y
	STA.w $0F3B,y
	STA.w $0F3D,y
	STA.w $0F3F,y
	STA.w $0F41,y
	STA.w $0F43,y
	STA.w $0F45,y
	LDY.w $7400,x
	LDA.w DATA_0D8349,y
	CLC
	ADC.w $7CD6,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDY.b #$02
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$00B6
	BMI.b CODE_0D83DC
	CMP.w #$00BB
	BMI.b CODE_0D83DE
CODE_0D83DC:
	LDY.b #$00
CODE_0D83DE:
	LDX.b $12
	TYA
	EOR.w $7400,x
	TAY
	LDA.w DATA_0D833D,y
	STA.b $06
	LDA.w $7400,x
	BEQ.b CODE_0D83F5
	TYA
	CLC
	ADC.w #$0004
	TAY
CODE_0D83F5:
	LDA.w DATA_0D8341,y
	CLC
	ADC.w $7CD6,x
	STA.b $04
	STA.b $0A
	STZ.b $08
	LDA.w $7CD8,x
	STA.b $02
CODE_0D8407:
	LDA.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $04
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$00B6
	BMI.b CODE_0D8427
	CMP.w #$00BB
	BMI.b CODE_0D8432
CODE_0D8427:
	LDA.b $04
	CLC
	ADC.b $06
	STA.b $04
	INC.b $08
	BRA.b CODE_0D8407

CODE_0D8432:
	LDX.b $12
	LDY.b $08
	STY.b $18,x
	TYA
	CLC
	ADC.w #$0009
	ASL
	ASL
	ASL
	XBA
	ORA.w $7040,x
	STA.w $7040,x
	LDA.b $04
	SEC
	SBC.b $0A
	STA.b $00
	LDA.w $7400,x
	DEC
	EOR.b $00
	BPL.b CODE_0D8467
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2,x
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
CODE_0D8467:
	LDA.b $00
	EOR.w #$FFFF
	INC
	BMI.b CODE_0D847E
	CLC
	ADC.w #$0140
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_0D848B

CODE_0D847E:
	SEC
	SBC.w #$0040
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0140
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_0D848B:
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$06
	BEQ.b CODE_0D8496
	CPY.b #$0E
	BNE.b CODE_0D84A0
CODE_0D8496:
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
CODE_0D84A0:
	LDY.b #$10
	STY.b $16,x
	RTL

;---------------------------------------------------------------------------

DATA_0D84A5:
	dw CODE_0D8787
	dw CODE_0D88D0
	dw CODE_0D8997

YI_NorSpr105_BooGuysCarryingBombToLeft_Main:
YI_NorSpr106_BooGuysCarryingBombToRight_Main:
;$0D84AB
	JSR.w CODE_0D85B8
	JSL.l CODE_03AF23
	JSR.w CODE_0D8729
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0D84A5,x)
	JSR.w CODE_0D8757
	LDA.w $61C6
	BEQ.b CODE_0D84CF
	LDY.b $76,x
	BNE.b CODE_0D84CF
	LDY.b #$16
	STY.b $16,x
	INC.b $76,x
CODE_0D84CF:
	RTL

DATA_0D84D0:
	dw $0000,$0000,$0002,$0002,$0002,$0004,$0004,$0004
	dw $0004,$0004,$0004,$0002,$0002,$0002,$0002,$0000
	dw $0000,$0006,$0006,$0006,$0006,$0006,$0006,$0008
	dw $000A,$000C,$000C,$000A,$000E

DATA_0D850A:
	dw $4000,$4000,$4000,$4000,$4000,$4000,$4000,$4000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $4000,$4000,$0000,$0000,$0000

DATA_0D8544:
	dw $8000,$0010,$0010,$0010,$000F,$000D,$000A,$0006
	dw $0000,$FFFA,$FFF6,$FFF3,$FFF1,$FFF0,$FFF0,$FFF0
	dw $8000,$0000,$0000,$0000,$0000,$0000,$8000,$8000
	dw $8000,$8000,$8000,$8000,$8000

DATA_0D857E:
	dw $8000,$0000,$0000,$0000,$FFFF,$FFFE,$FFFD,$FFFD
	dw $FFFD,$FFFD,$FFFD,$FFFE,$FFFF,$0000,$0000,$0000
	dw $8000,$FFF9,$FFF6,$FFF4,$FFF3,$FFF2,$8000,$8000
	dw $8000,$8000,$8000,$8000,$8000

CODE_0D85B8:
	LDA.w $70E2,x
	SEC
	SBC.w $6094
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w $609C
	STA.b $02
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr105_BooGuysCarryingBombToLeft
	BEQ.b CODE_0D85D6
	INY
	INY
CODE_0D85D6:
	LDA.w DATA_0D833D,y
	STA.b $04
	LDA.b $18,x
	STA.b $0E
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	REP.b #$10
	LDY.w $7362,x
	STY.b $06
	LDA.w #$8000
	STA.w $6000,y
	STA.w $6008,y
	STA.w $6010,y
	STA.w $6018,y
	STA.w $6020,y
	STA.w $6028,y
	STA.w $6030,y
	STA.w $6038,y
	TYA
	CLC
	ADC.w #$0040
	STA.b $0C
	TAY
	PHY
	LDA.b $16,x
	ASL
	TAY
	LDA.w DATA_0D84D0,y
	STA.b $08
	LDA.w DATA_0D850A,y
	STA.b $0A
	PLY
CODE_0D861C:
	LDA.b $00
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCC.b CODE_0D862C
	LDA.w #$8000
	BRA.b CODE_0D862E

CODE_0D862C:
	LDA.b $00
CODE_0D862E:
	STA.w $6000,y
	LDA.b $02
	STA.w $6002,y
	LDA.w $6004,y
	ORA.b $08
	EOR.b $0A
	STA.w $6004,y
	LDA.b $00
	CLC
	ADC.b $04
	STA.b $00
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $0E
	BPL.b CODE_0D861C
	LDY.b $08
	CPY.w #$0006
	BNE.b CODE_0D865B
	SEP.b #$10
	RTS

CODE_0D865B:
	LDA.w $7400,x
	STA.b $0A
	XBA
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $08
	LDA.b $16,x
	SEC
	SBC.w #$0010
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	STZ.b $00
	LDA.w #$0007
	STA.b $0E
	ASL
	CLC
	ADC.b $78,x
	TAX
CODE_0D867D:
	LDA.w $0EF7,x
	BPL.b CODE_0D8685
	JMP.w CODE_0D871B

CODE_0D8685:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	ASL
	ASL
	ASL
	CLC
	ADC.b $0C
	TAY
	PHX
	LDA.w $0F37,x
	PHA
	LDA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	BEQ.b CODE_0D86A5
	LDA.w #$8000
	STA.b $02
	PLA
	PHA
	CMP.w #$001C
	BNE.b CODE_0D86D4
CODE_0D86A5:
	PLA
	PHA
	ASL
	TAX
	LDA.w DATA_0D84D0,x
	ORA.w $6004,y
	AND.w #$BFFF
	ORA.b $08
	EOR.w DATA_0D850A,x
	STA.w $6004,y
	LDA.w DATA_0D857E,x
	CLC
	ADC.w $6002,y
	STA.b $04
	LDA.w DATA_0D8544,x
	LDX.b $0A
	BEQ.b CODE_0D86CE
	EOR.w #$FFFF
	INC
CODE_0D86CE:
	CLC
	ADC.w $6000,y
	STA.b $02
CODE_0D86D4:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BNE.b CODE_0D86DF
	PLA
	BRA.b CODE_0D8702

CODE_0D86DF:
	TYA
	CLC
	ADC.w #$0008
	TAY
	PLA
	SEC
	SBC.w #$000C
	BMI.b CODE_0D86F1
	CMP.w #$0004
	BMI.b CODE_0D86F4
CODE_0D86F1:
	LDA.w #$0000
CODE_0D86F4:
	ASL
	TAX
	LDA.w $6004,y
	EOR.w #$4000
	ORA.w DATA_0D84D0,x
	STA.w $6004,y
CODE_0D8702:
	LDA.b $06
	CLC
	ADC.b $00
	TAY
	LDA.b $04
	STA.w $6002,y
	LDA.b $02
	STA.w $6000,y
	LDA.b $00
	CLC
	ADC.w #$0008
	STA.b $00
	PLX
CODE_0D871B:
	DEX
	DEX
	DEC.b $0E
	BMI.b CODE_0D8724
	JMP.w CODE_0D867D

CODE_0D8724:
	LDX.b $12
	SEP.b #$10
	RTS

CODE_0D8729:
	LDA.w $7680,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_0D8736
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_0D8756
CODE_0D8736:
	JSL.l CODE_03A31E
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr105_BooGuysCarryingBombToLeft
	BEQ.b CODE_0D8746
CODE_0D8743:
	LDY.b #$04
CODE_0D8746:
	LDA.w $70E2,x
	AND.w #$0010
	BEQ.b CODE_0D8750
	INY
	INY
CODE_0D8750:
	LDA.w #$0000
	STA.w $0EEF,y
CODE_0D8756:
	RTS

CODE_0D8757:
	LDY.b #$07
	TYA
	ASL
	CLC
	ADC.b $78,x
	TAX
CODE_0D875F:
	LDA.w $0F77,x
	BEQ.b CODE_0D8767
	DEC.w $0F77,x
CODE_0D8767:
	DEX
	DEX
	DEY
	BPL.b CODE_0D875F
	LDX.b $12
	RTS

DATA_0D876F:
	db $02,$02,$03,$03,$02,$02,$02,$02,$02,$02,$02,$02,$02,$03,$03,$02
	db $02,$02,$02,$02,$02,$02,$08,$10

CODE_0D8787:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0D87B5
	LDA.w #$0100
	STA.w $7A96,x
	LDY.b #$07
	TYA
	ASL
	CLC
	ADC.b $78,x
	TAX
CODE_0D879B:
	LDA.w $0EF7,x
	BMI.b CODE_0D87A7
	DEX
	DEX
	DEY
	BPL.b CODE_0D879B
	BRA.b CODE_0D87B5

CODE_0D87A7:
	STZ.w $0EF7,x
	STZ.w $0F37,x
	LDA.w #$0003
	STA.w $0F77,x
	LDX.b $12
CODE_0D87B5:
	LDA.b $18,x
	STA.b $00
	LDA.w $7C16,x
	STA.b $02
	LDA.w $7400,x
	STA.b $04
	LDY.b #$07
	TYA
	ASL
	CLC
	ADC.b $78,x
	TAX
CODE_0D87CB:
	LDA.w $0EF7,x
	BMI.b CODE_0D87E0
	LDA.w $0F37,x
	CMP.w #$0011
	BMI.b CODE_0D87DD
	JSR.w CODE_0D87E8
	BRA.b CODE_0D87E0

CODE_0D87DD:
	JSR.w CODE_0D886A
CODE_0D87E0:
	DEX
	DEX
	DEY
	BPL.b CODE_0D87CB
	LDX.b $12
CODE_0D87E7:
	RTS

CODE_0D87E8:
	LDA.w $0F77,x
	BNE.b CODE_0D87E7
	INC.w $0F37,x
	PHY
	LDA.w $0F37,x
	CMP.w #$0016
	BNE.b CODE_0D885D
	LDA.w $0EF7,x
	STA.b $00
	PHX
	LDX.b $12
	LDA.w #$0060
	JSL.l CODE_03A364
	BCC.b CODE_0D8854
	LDA.b $00
	ASL
	ASL
	ASL
	ASL
	ASL
	PHY
	LDY.w $7400,x
	BNE.b CODE_0D881B
	EOR.w #$FFFF
	INC
CODE_0D881B:
	PLY
	CLC
	ADC.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000A
	STA.w $7182,y
	LDA.w #$001C
	STA.w $7A96,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0030
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$7F
	STA.w $7863,y
	REP.b #$20
	PLX
	LDA.w #$0016
	BRA.b CODE_0D88C4

CODE_0D8854:
	PLX
	DEC.w $0F37,x
	LDA.w #$0015
	BRA.b CODE_0D88C4

CODE_0D885D:
	CMP.w #$0018
	BNE.b CODE_0D88C4
	LDA.w #$FFFF
	STA.w $0EF7,x
	PLY
	RTS

CODE_0D886A:
	LDA.w $0F77,x
	BNE.b CODE_0D88CF
	INC.w $0F37,x
	PHY
	LDA.w $0F37,x
	CMP.w #$0009
	BNE.b CODE_0D88A8
	LDA.w $0EF7,x
	CMP.b $00
	BEQ.b CODE_0D88A0
	ASL
	ASL
	ASL
	ASL
	ASL
	LDY.b $04
	BNE.b CODE_0D888F
	EOR.w #$FFFF
	INC
CODE_0D888F:
	CLC
	ADC.b $02
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCC.b CODE_0D88A0
	LDA.w #$0009
	BRA.b CODE_0D88C4

CODE_0D88A0:
	LDA.w #$0011
	STA.w $0F37,x
	BRA.b CODE_0D88C4

CODE_0D88A8:
	CMP.w #$000E
	BNE.b CODE_0D88B6
	PHA
	LDA.w #!Define_YI_SoundID55_ThunderLakituAttacking5
	JSL.l CODE_0085D2
	PLA
CODE_0D88B6:
	AND.w #$000F
	BNE.b CODE_0D88C4
	INC.w $0EF7,x
	LDA.w #$0004
	STA.w $0F37,x
CODE_0D88C4:
	TAY
	LDA.w DATA_0D876F,y
	AND.w #$00FF
	STA.w $0F77,x
	PLY
CODE_0D88CF:
	RTS

CODE_0D88D0:
	TYX
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7400,x
	STA.b $02
	LDA.w $7182,x
	STA.b $06
	LDY.b #$07
	TYA
	ASL
	CLC
	ADC.b $78,x
	TAX
CODE_0D88E8:
	LDA.w $0EF7,x
	BPL.b CODE_0D88F0
	JMP.w CODE_0D8972

CODE_0D88F0:
	PHX
	PHY
	ASL
	ASL
	ASL
	ASL
	ASL
	LDY.b $02
	BNE.b CODE_0D88FF
	EOR.w #$FFFF
	INC
CODE_0D88FF:
	CLC
	ADC.b $00
	STA.b $04
	LDA.w $0F37,x
	BIT.w #$000F
	BEQ.b CODE_0D8970
	CMP.w #$0016
	BPL.b CODE_0D8970
	ASL
	TAY
	LDA.w DATA_0D857E,y
	CLC
	ADC.b $06
	STA.b $08
	LDA.w DATA_0D8544,y
	LDY.b $02
	BEQ.b CODE_0D8926
	EOR.w #$FFFF
	INC
CODE_0D8926:
	CLC
	ADC.b $04
	STA.b $04
	LDX.b $12
	LDA.w #$0060
	JSL.l CODE_03A364
	BCS.b CODE_0D893B
	PLY
	PLX
	LDX.b $12
	RTS

CODE_0D893B:
	LDA.b $04
	STA.w $70E2,y
	LDA.b $08
	STA.w $7182,y
	LDA.w #$0020
	STA.w $7A96,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0030
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$7F
	STA.w $7863,y
	REP.b #$20
	PLY
	PLX
	LDA.w #$001C
	STA.w $0F37,x
	BRA.b CODE_0D8972

CODE_0D8970:
	PLY
	PLX
CODE_0D8972:
	DEX
	DEX
	DEY
	BMI.b CODE_0D897A
	JMP.w CODE_0D88E8

CODE_0D897A:
	LDX.b $12
	LDA.w #$00C0
	STA.w $7A96,x
	LDA.w #$0044
	STA.w $7A98,x
	LDA.w #$0040
	STA.w $7AF6,x
	LDA.w #$0001
	STA.w $7A36,x
	INC.b $76,x
	RTS

CODE_0D8997:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_0D89FE
	LDY.b $16,x
	CPY.b #$16
	BNE.b CODE_0D89A7
	LDY.b #$18
	STY.b $16,x
CODE_0D89A7:
	LDA.w $7A96,x
	BNE.b CODE_0D89CD
	LDY.b #$07
	TYA
	ASL
	CLC
	ADC.b $78,x
	TAX
CODE_0D89B4:
	LDA.w $0EF7,x
	BMI.b CODE_0D89BF
	LDA.w #$FFFF
	STA.w $0EF7,x
CODE_0D89BF:
	DEX
	DEX
	DEY
	BPL.b CODE_0D89B4
	LDX.b $12
	LDY.b #$10
	STY.b $16,x
	STZ.b $76,x
	RTS

CODE_0D89CD:
	LDA.w $7A98,x
	BNE.b CODE_0D89FE
	LDA.w #$0004
	STA.w $7A98,x
	LDA.b $16,x
	CLC
	ADC.w $7A36,x
	CMP.w #$0017
	BEQ.b CODE_0D89ED
	CMP.w #$001C
	BNE.b CODE_0D89FC
	LDA.w #$001A
	BRA.b CODE_0D89F0

CODE_0D89ED:
	LDA.w #$0019
CODE_0D89F0:
	PHA
	LDA.w $7A36,x
	EOR.w #$FFFF
	INC
	STA.w $7A36,x
	PLA
CODE_0D89FC:
	STA.b $16,x
CODE_0D89FE:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr10C_ChainedSpikeBall_Init:
;$0D89FF
	LDA.w $0FB7
	BEQ.b CODE_0D8A14
	CPX.w $0FB7
	BMI.b CODE_0D8A0C
	STX.w $0FB7
CODE_0D8A0C:
	LDA.w $0FB9
	STA.w $7722,x
	BRA.b CODE_0D8A21

CODE_0D8A14:
	JSL.l CODE_03AE60
	STX.w $0FB7
	LDA.w $7722,x
	STA.w $0FB9
CODE_0D8A21:
	INC.w $0FBB
	LDA.w #$010D
	JSL.l CODE_03A364
	BCS.b CODE_0D8A39
	DEC.w $0FBB
	BNE.b CODE_0D8A35
	STZ.w $0FB7
CODE_0D8A35:
	JML.l CODE_03A31E

CODE_0D8A39:
	STY.b $18,x
	LDA.w $7182,x
	STA.w $7182,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A98,y
	CLC
	ADC.w $70E2,x
	STA.w $70E2,y
	CLC
	ADC.w #$0004
	STA.w $70E2,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	CLC
	ADC.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0ACDFA>>16
	LDA.w #FXCODE_0ACDFA
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R12_LOOPCounterLo
	CPY.b #$0B
	BPL.b CODE_0D8A85
	LDA.w #$8000
	BRA.b CODE_0D8A90

CODE_0D8A85:
	LDA.w #$0013
	SEC
	SBC.w !REGISTER_SuperFX_R12_LOOPCounterLo
	ASL
	ASL
	ASL
	ASL
CODE_0D8A90:
	STA.w $7A36,x
	STZ.w $7400,x
	LDA.w $7182,x
	CLC
	ADC.w #$0030
	STA.w $7182,x
	CPX.w $0FB7
	BNE.b CODE_0D8AE0
	LDA.w #FXDATA_550000+$00A0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$00A0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0D8AE0:
	LDA.w #$0008
	STA.w $7720,x
	RTL

;---------------------------------------------------------------------------

DATA_0D8AE7:
	dw CODE_0D8CB5
	dw CODE_0D8CFA
	dw CODE_0D8D36
	dw CODE_0D8DC4
	dw CODE_0D8E06

YI_NorSpr10C_ChainedSpikeBall_Main:
;$0D8AF1
	JSR.w CODE_0D8B3B
	JSR.w CODE_0D8B8B
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BPL.b CODE_0D8B06
	JSL.l CODE_03A858
	BRA.b CODE_0D8B0A

CODE_0D8B06:
	JSL.l CODE_03A5B7
CODE_0D8B0A:
	JSL.l CODE_03A2C7
	BCC.b CODE_0D8B2F
	LDA.b $18,x
	TAX
	JSL.l CODE_03A31E
	LDX.b $12
	DEC.w $0FBB
	BNE.b CODE_0D8B25
	STZ.w $0FB7
	JSL.l CODE_03AEFD
CODE_0D8B25:
	LDA.w #$FFFF
	STA.w $7722,x
	JSL.l CODE_03A31E
CODE_0D8B2F:
	JSR.w CODE_0D8C4B
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0D8AE7,x)
	RTL

CODE_0D8B3B:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0D8B8A
	LDY.b $18,x
	LDA.w $70E2,y
	CLC
	ADC.w #$0004
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,y
	CLC
	ADC.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0ACDFA>>16
	LDA.w #FXCODE_0ACDFA
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R12_LOOPCounterLo
	CPY.b #$0B
	BPL.b CODE_0D8B7C
	LDA.w #$8000
	BRA.b CODE_0D8B87

CODE_0D8B7C:
	LDA.w #$0013
	SEC
	SBC.w !REGISTER_SuperFX_R12_LOOPCounterLo
	ASL
	ASL
	ASL
	ASL
CODE_0D8B87:
	STA.w $7A36,x
CODE_0D8B8A:
	RTS

CODE_0D8B8B:
	LDY.b $18,x
	LDA.w $7182,y
	SEC
	SBC.w $609C
	STA.b $04
	REP.b #$10
	LDY.w $7362,x
	LDA.w $7A36,x
	BPL.b CODE_0D8BAB
	LDA.w #$8000
	STA.w $6000,y
	STA.w $6008,y
	BRA.b CODE_0D8BC3

CODE_0D8BAB:
	CLC
	ADC.b $04
	STA.w $6002,y
	STA.w $600A,y
	LDA.w $6004,y
	AND.w #$FE00
	ORA.w #$00C0
	STA.w $6004,y
	STA.w $600C,y
CODE_0D8BC3:
	TYA
	CLC
	ADC.w #$0010
	PHA
	TAY
	JSL.l CODE_03AA60
	REP.b #$10
	PLA
	CLC
	ADC.w #$0020
	TAY
	LDA.w $7A38,x
	BEQ.b CODE_0D8BE3
	LDA.b $04
	CLC
	ADC.w #$007A
	BRA.b CODE_0D8BEA

CODE_0D8BE3:
	LDA.w $7182,x
	SEC
	SBC.w $609C
CODE_0D8BEA:
	STA.b $00
	CLC
	ADC.b $78,x
	SEC
	SBC.w #$0004
	STA.b $02
	STZ.b $06
	STZ.b $08
	LDA.w $7AF6,x
	BEQ.b CODE_0D8C04
	INC.b $06
	LDA.b $10
	STA.b $08
CODE_0D8C04:
	LDA.w #$000B
	STA.b $0E
CODE_0D8C09:
	LDA.b $02
	SEC
	SBC.w #$000A
	STA.b $02
	CMP.b $00
	BPL.b CODE_0D8C19
	CMP.b $04
	BPL.b CODE_0D8C21
CODE_0D8C19:
	LDA.w #$8000
	STA.w $6000,y
	BRA.b CODE_0D8C3E

CODE_0D8C21:
	LDA.b $08
	AND.w #$0003
	SEC
	SBC.b $06
	STA.b $0A
	ADC.b $02
	STA.w $6002,y
	LDA.w $6000,y
	CLC
	ADC.b $0A
	STA.w $6000,y
	LDA.b $08
	ROR
	STA.b $08
CODE_0D8C3E:
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $0E
	BNE.b CODE_0D8C09
	SEP.b #$10
	RTS

CODE_0D8C4B:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LSR
	STA.b $00
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	LDA.w $6120
	CLC
	ADC.w #$0008
	STA.b $04
	ASL
	STA.b $06
	LDA.w $70E2,x
	CLC
	ADC.w #$0009
	SEC
	SBC.w $611C
	STA.b $0C
	CLC
	ADC.b $04
	CMP.b $06
	BCS.b CODE_0D8CB4
	LDA.w $6122
	CLC
	ADC.b $00
	STA.b $08
	ASL
	STA.b $0A
	LDA.b $02
	SEC
	SBC.w $611E
	CLC
	ADC.b $08
	CMP.b $0A
	BCS.b CODE_0D8CB4
	LDA.b $04
	LDY.b $0D
	BMI.b CODE_0D8C9D
	EOR.w #$FFFF
	INC
CODE_0D8C9D:
	CLC
	ADC.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	JSL.l CODE_03A858
CODE_0D8CB4:
	RTS

CODE_0D8CB5:
	TYX
	LDA.b $78,x
	BEQ.b CODE_0D8CEE
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0D8CE3
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0D8CE3
	LDY.b $18,x
	LDA.w #$000C
	STA.w $7402,y
	LDA.w #$0005
	STA.w $7A98,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$02
	STY.b $76,x
	RTS

CODE_0D8CE3:
	LDA.w $7974
	AND.w #$0001
	BNE.b CODE_0D8CED
	DEC.b $78,x
CODE_0D8CED:
	RTS

CODE_0D8CEE:
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_0D8CFA:
	TYX
	LDA.w $7974
	AND.w #$0003
	BNE.b CODE_0D8D0A
	LDA.w #!Define_YI_SoundID2F_ClankSound8
	JSL.l CODE_0085D2
CODE_0D8D0A:
	LDY.b $18,x
	LDA.w $7182,x
	SEC
	SBC.w $7182,y
	CMP.w #$0028
	BPL.b CODE_0D8D35
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000C
	STA.w $7402,y
	LDA.w #$0005
	STA.w $7A98,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0008
	STA.w $7542,x
	INC.b $76,x
CODE_0D8D35:
	RTS

CODE_0D8D36:
	TYX
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.b $78,x
	SEC
	SBC.w $72C2,x
	BPL.b +
	LDA.w #$0000
+:
	STA.b $78,x
endif
	INC.w $7542,x
	LDA.w #$0040
	CMP.w $7542,x
	BPL.b CODE_0D8D45
	STA.w $7542,x
CODE_0D8D45:
	LDY.b $18,x
	LDA.w #$007A
	SEC
	SBC.w $7182,x
	CLC
	ADC.w $7182,y
	BPL.b CODE_0D8D77
	CLC
	ADC.w $7182,x
	STA.w $7182,x
	LDA.w #!Define_YI_SoundID1B_MaceTick
	JSL.l CODE_0085D2
	LDA.w $7A38,x
	BNE.b CODE_0D8DB2
	INC.w $7A38,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7AF6,x
	RTS

CODE_0D8D77:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0D8DC3
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #!Define_YI_AmbSpr1F1
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7142,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0020
	STA.w $61C6
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
CODE_0D8DB2:
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0010
	STA.w $7AF6,x
	INC.b $76,x
CODE_0D8DC3:
	RTS

CODE_0D8DC4:
	TYX
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0D8DD8
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0D8DD8
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC.b $76,x
	RTS

CODE_0D8DD8:
	LDA.b $78,x
	CLC
	ADC.w #$0004
	STA.b $78,x
	LDY.b $18,x
	LDA.w #$007A
	SEC
	SBC.w $7182,x
	CLC
	ADC.w $7182,y
	SEC
	SBC.b $78,x
	BPL.b CODE_0D8E05
	CLC
	ADC.b $78,x
	STA.b $78,x
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0020
	STA.w $7A96,x
	INC.b $76,x
CODE_0D8E05:
	RTS

CODE_0D8E06:
	TYX
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0D8E30
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0D8E30
	LDY.b $18,x
	LDA.w #$000C
	STA.w $7402,y
	LDA.w #$0005
	STA.w $7A98,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$02
	STY.b $76,x
	RTS

CODE_0D8E30:
	LDA.w $7A96,x
	BNE.b CODE_0D8E5F
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0003
	BEQ.b CODE_0D8E47
	CMP.w #$0005
	BNE.b CODE_0D8E5F
	STZ.b $76,x
	RTS

CODE_0D8E47:
	LDA.w #$0005
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w #$0014
	STA.w $7402,y
	LDA.w #$0010
	STA.w $7A98,y
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
CODE_0D8E5F:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr003_CrateWithKey_Init:
YI_NorSpr10E_CrateWith6Stars_Init:
;$0D8E60
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	LDY.b $16,x
	BNE.b CODE_0D8E84
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03D400
	BEQ.b CODE_0D8E84
	INC.b $79,x
CODE_0D8E84:
	LDA.w #$FFFA
	STA.w $7720,x
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$03
	BEQ.b CODE_0D8E95
	CPY.b #$0D
	BNE.b CODE_0D8EA9
CODE_0D8E95:
	LDY.b #$04
	STY.b $19,x
	LDA.w #$FFF2
	STA.w $7720,x
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,x
CODE_0D8EA9:
	STZ.w $7400,x
	JSR.w CODE_0D9111
	RTL

;---------------------------------------------------------------------------

DATA_0D8EB0:
	dw CODE_0D8000
	dw CODE_0D917B
	dw CODE_0D918F
	dw CODE_0D91A3
	dw CODE_0D91B7
	dw CODE_0D93BE
	dw CODE_0D93C9

YI_NorSpr003_CrateWithKey_Main:
YI_NorSpr10E_CrateWith6Stars_Main:
;$0D8EBE
	JSR.w CODE_0D8F27
	JSL.l CODE_03AF23
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0D8F38
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0D8EB0,x)
	JSR.w CODE_0D9111
	RTL

CODE_0D8ED7:
	PHX
	PHB
	PHK
	PLB
	LDA.w #$010E
	JSL.l CODE_03A364
	BCC.b CODE_0D8F23
	LDA.b $00
	STA.w $70E2,y
	LDA.b $02
	STA.w $7182,y
	TYX
	JSL.l CODE_03AD74
	BCC.b CODE_0D8F1F
	LDY.b #$06
	STY.b $76,x
	LDA.w #$0060
	STA.w $7A96,x
	LDY.b #$02
	STY.b $78,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$FFFF
	STA.w $74A2,x
	LDA.w #$2081
	STA.w $7040,x
	STZ.w $7542,x
	JSR.w CODE_0D9111
	PLB
	PLX
	SEC
	RTL

CODE_0D8F1F:
	JSL.l CODE_03A31E
CODE_0D8F23:
	PLB
	PLX
	CLC
	RTL

CODE_0D8F27:
	LDY.b $78,x
	BNE.b CODE_0D8F2F
	JSL.l CODE_03AA52
CODE_0D8F2F:
	RTS

DATA_0D8F30:
	dw $0040,$FFC0

DATA_0D8F34:
	dw $0018,$001C

CODE_0D8F38:
	LDY.b $78,x
	BNE.b CODE_0D8F2F
	LDY.b $19,x
	TYA
	LSR
	TAY
	LDA.w DATA_0D8F34,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $18,x
	BEQ.b CODE_0D8FAF
	LDA.w $60D4
	BNE.b CODE_0D8F7C
	LDY.w $60AB
	BMI.b CODE_0D8F97
	LDA.w $7BB6,x
	CLC
	ADC.w $6120
	ASL
	STA.b $02
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $02
	BCS.b CODE_0D8F97
	INC.w $61B4
CODE_0D8F7C:
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_0D8FAE
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$001E
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	RTS

CODE_0D8F97:
	LDY.b #$00
	STY.b $18,x
	LDY.b #$03
	STY.b $76,x
	LDY.w $7D36,x
	BMI.b CODE_0D8FAE
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
CODE_0D8FAE:
	RTS

CODE_0D8FAF:
	LDA.w $7BB6,x
	CLC
	ADC.w $6120
	STA.b $00
	ASL
	STA.b $02
	LDA.w $7C16,x
	CLC
	ADC.b $00
	CMP.b $02
	BCC.b CODE_0D8FC8
CODE_0D8FC5:
	JMP.w CODE_0D9027

CODE_0D8FC8:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0020
	STA.b $04
	SEC
	SBC.w #$0008
	STA.b $06
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BMI.b CODE_0D8FC5
	CMP.b $04
	BPL.b CODE_0D8FC5
	CMP.b $06
	BMI.b CODE_0D9024
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_0D8FC5
	LDY.w $60AB
	BMI.b CODE_0D8FC5
	LDY.w $60D4
	BNE.b CODE_0D9005
	INC.w $61B4
	LDY.b #$01
	BRA.b CODE_0D900D

CODE_0D9005:
	LDA.w #$0020
	STA.w $7A38,x
	LDY.b #$04
CODE_0D900D:
	STY.b $76,x
	STZ.w $60AA
	LDA.w $7182,x
	CLC
	ADC.w #$FFF2
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.b $18,x
	BRA.b CODE_0D8FC5

CODE_0D9024:
	JSR.w CODE_0D9037
CODE_0D9027:
	LDY.w $7D36,x
	BMI.b CODE_0D9036
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
CODE_0D9036:
	RTS

CODE_0D9037:
	LDA.w $60A8
	BEQ.b CODE_0D9036
	EOR.w $7C16,x
	BMI.b CODE_0D9036
	LDA.w #$0160
	STA.w $093A
	LDA.w $7BB6,x
	CLC
	ADC.w $6120
	DEC
	DEC
	LDY.w $77C2,x
	BNE.b CODE_0D9059
	EOR.w #$FFFF
	INC
CODE_0D9059:
	CLC
	ADC.w $7C16,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $60A8
	STZ.w $60B4
	LDA.w $0036
	AND.w #$0003
	BEQ.b CODE_0D909C
	AND.w #$0001
	DEC
	EOR.w $7C16,x
	BMI.b CODE_0D909C
	LDA.w $60DE
	ORA.w $6150
	BNE.b CODE_0D909C
	INC.w $61C2
	LDY.w $77C2,x
	LDA.w DATA_0D8F30,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	JSL.l CODE_0D90A1
	INC.w $60DC
CODE_0D909C:
	RTS

DATA_0D909D:
	dw $FFC0,$0040

CODE_0D90A1:
	LDA.w $7974
	AND.w #$000F
	BNE.b CODE_0D9100
	PHB
	PHK
	PLB
	LDA.w #!Define_YI_SoundID59_RollingRock
	JSL.l CODE_0085D2
	LDY.w $77C2,x
	LDA.w DATA_0D909D,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1D8
	JSL.l CODE_008B21
	LDA.b $10
	AND.w #$0007
	SEC
	SBC.w #$0004
	CLC
	ADC.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7142,y
	LDA.w #$0008
	STA.w $7782,y
	LDA.w #$0003
	STA.w $7E4C,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $73C0,y
	PLB
CODE_0D9100:
	RTL

DATA_0D9101:
	dw (FXDATA_550000+$2080)>>16,(FXDATA_550000+$20A0)>>16,(FXDATA_548000+$6060)>>16,(FXDATA_550000+$20A0)>>16

DATA_0D9109:
	dw FXDATA_550000+$2080,FXDATA_550000+$20A0,FXDATA_548000+$6060,FXDATA_550000+$20A0

CODE_0D9111:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BEQ.b CODE_0D917A
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	LSR
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEP.b #$20
	LDA.b $19,x
	CLC
	ADC.b $78,x
	TAY
	REP.b #$20
	TYA
	BIT.w #$0002
	BEQ.b CODE_0D9144
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
CODE_0D9144:
	LDA.w DATA_0D9101,y
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w DATA_0D9109,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0D917A:
	RTS

CODE_0D917B:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0010
	CMP.w #$00F0
	BPL.b CODE_0D919F
	INC.b $76,x
	LDA.w #$00F0
	BRA.b CODE_0D919F

CODE_0D918F:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w #$0008
	CMP.w #$00E0
	BMI.b CODE_0D919F
	LDA.w #$00E0
CODE_0D919F:
	STA.w $7A36,x
	RTS

CODE_0D91A3:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w #$0004
	CMP.w #$0100
	BMI.b CODE_0D919F
	STZ.b $76,x
	LDA.w #$0100
	BRA.b CODE_0D919F

CODE_0D91B7:
	TYX
	LDA.w $7A38,x
	DEC
	BEQ.b CODE_0D91C1
	STA.w $7A38,x
CODE_0D91C1:
	LDA.w $7A36,x
	SEC
	SBC.w $7A38,x
	CMP.w #$0080
	BMI.b CODE_0D91D1
	STA.w $7A36,x
CODE_0D91D0:
	RTS

CODE_0D91D1:
	JSR.w CODE_0D9236
	INC.b $76,x
	LDY.b $79,x
	BNE.b CODE_0D91D0
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr10E_CrateWith6Stars
	BNE.b CODE_0D91F7
	LDY.b $16,x
	BNE.b CODE_0D91F2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03D3F3
CODE_0D91F2:
	JSL.l CODE_0D9329
	RTS

CODE_0D91F7:
	JMP.w CODE_0D9383

DATA_0D91FA:
	dw $FFF2,$FFF4,$0000,$000A,$000D,$0000

DATA_0D9206:
	dw $0000,$FFF4,$FFF2,$FFF4,$0000,$0000

DATA_0D9212:
	dw $0000,$000E,$000C,$000E,$0012,$000C

DATA_0D921E:
	dw $FC00,$FE00,$0000,$0200,$0400,$0000

DATA_0D922A:
	dw $FF00,$FE00,$FC80,$FE00,$FF00,$0000

CODE_0D9236:
	PHX
	LDA.w $7722,x
	TAX
	LDA.l DATA_03AA0E,x
	PLX
	AND.w #$000F
	STA.b $0E
	LDA.b $10
	STA.b $0C
	LDY.b #$0A
CODE_0D924B:
	LDA.w DATA_0D91FA,y
	STA.b $00
	LDA.w DATA_0D9206,y
	STA.b $02
	LDA.w DATA_0D9212,y
	STA.b $04
	LDA.w DATA_0D921E,y
	STA.b $06
	LDA.w DATA_0D922A,y
	STA.b $08
	PHY
	LDA.w #!Define_YI_AmbSpr1F3
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.b $02
	STA.w $7142,y
	LDA.b $04
	STA.w $7E4E,y
	LDA.w #$0050
	STA.w $7782,y
	LDA.w #$0003
	STA.w $7E8E,y
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C0|!EXRAMBankMirror,y
	LDA.b $0E
	STA.w $7E8C,y
	LDA.b $06
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $08
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7500,y
	LDA.b $0C
	AND.w #$0002
	STA.w $73C0,y
	LDA.b $0C
	ROR
	STA.b $0C
	PLY
	DEY
	DEY
	BPL.b CODE_0D924B
	LDY.b #$02
	STY.b $78,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$0060
	STA.w $7A96,x
	LDA.w #$FFFF
	STA.w $74A2,x
	LDA.w #$2081
	STA.w $7040,x
	RTS

DATA_0D92D6:
	dw $0241,$FDBF,$0195,$FE6B,$009B,$FF65

DATA_0D92E2:
	dw $FEEF,$FEEF,$FE11,$FE11,$FD94,$FD94

CODE_0D92EE:
	PHB
	PHK
	PLB
	LDY.b #$0A
CODE_0D92F3:
	LDA.w DATA_0D92D6,y
	STA.b $00
	LDA.w DATA_0D92E2,y
	STA.b $02
	PHY
	LDA.w #$0115
	JSL.l CODE_03A34C
	BCC.b CODE_0D9326
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	DEC
	DEC
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	PLY
	DEY
	DEY
	BPL.b CODE_0D92F3
	PLB
	RTL

CODE_0D9326:
	PLB
	PLY
	RTL

CODE_0D9329:
	PHB
	PHK
	PLB
	LDA.w !RAM_YI_Level_StarTimerLo
	STA.b $04
	LDY.b #$0A
CODE_0D9333:
	LDA.b $04
	CLC
	ADC.w #$000A
	CMP.w #!Define_YI_Level_SoftMaxStarTimerThreshold+$0A
	BPL.b CODE_0D92F3
	STA.b $04
	LDA.w DATA_0D92D6,y
	STA.b $00
	LDA.w DATA_0D92E2,y
	STA.b $02
	PHY
	LDA.w #$01A2
	JSL.l CODE_03A34C
	BCC.b CODE_0D9326
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	DEC
	DEC
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0180
	STA.w $7A96,y
	LDA.w #$0020
	STA.w $7AF6,y
	PLY
	DEY
	DEY
	BPL.b CODE_0D9333
	PLB
	RTL

DATA_0D937F:
	dw $0200,$FE00

CODE_0D9383:
	LDY.w $60C4
	LDA.w DATA_0D937F,y
	STA.b $00
	LDA.w #$0027
	JSL.l CODE_03A34C
	BCC.b CODE_0D93BD
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7D38,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
CODE_0D93BD:
	RTS

CODE_0D93BE:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0D93C8
CODE_0D93C4:
	JSL.l CODE_03A32E
CODE_0D93C8:
	RTS

CODE_0D93C9:
	TYX
	LDA.w $7A96,x
	BEQ.b CODE_0D93C4
	CMP.w #$0050
	BMI.b CODE_0D9438
	LDA.w #!Define_YI_AmbSpr1F3
	JSL.l CODE_008B21
	LDA.b $10
	AND.w #$0078
	SEC
	SBC.w #$0040
	CLC
	ADC.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0050
	STA.w $7782,y
	PHX
	LDA.w $7722,x
	TAX
	LDA.l DATA_03AA0E,x
	PLX
	AND.w #$000F
	STA.w $7E8C,y
	LDA.b $10
	AND.w #$07FF
	SEC
	SBC.w #$0400
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $0F
	AND.w #$03FF
	CLC
	ADC.w #$0600
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w #$0002
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C0|!EXRAMBankMirror,y
	STA.w $7E8E,y
	LDA.w #$0004
	STA.w $7500,y
CODE_0D9438:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr126_SpikedLogOnPulley_Init:
;$0D9439
	LDA.w #$0127
	JSL.l CODE_03A364
	BCC.b CODE_0D944F
	TYX
	JSL.l CODE_03AD74
	BCS.b CODE_0D9453
	JSL.l CODE_03A31E
	LDX.b $12
CODE_0D944F:
	JML.l CODE_03A31E

CODE_0D9453:
	PHX
	JSR.w CODE_0D9803
	PLY
	LDX.b $12
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	STY.b $18,x
	STZ.w $7400,x
	LDA.w #$0007
	STA.w $7720,x
	LDA.w $70E2,x
	CLC
	ADC.w #$000E
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w #$0008
	STA.w $70E2,x
	LDA.w $7182,x
	CLC
	ADC.w #$0030
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_0ACDFA>>16
	LDA.w #FXCODE_0ACDFA
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R12_LOOPCounterLo
	CPY.b #$0C
	BPL.b CODE_0D94B7
	LDA.w #$8000
	STA.w $7A36,x
	XBA
	BRA.b CODE_0D94C5

CODE_0D94B7:
	LDA.w #$0014
	SEC
	SBC.w !REGISTER_SuperFX_R12_LOOPCounterLo
	ASL
	ASL
	ASL
	ASL
	STA.w $7A36,x
CODE_0D94C5:
	CLC
	ADC.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,x
	LDY.b $18,x
	STA.w $7A36,y
	STA.b $78,x
	STZ.w $7400,x
	LDA.w #$000F
	SEC
	SBC.w !REGISTER_SuperFX_R12_LOOPCounterLo
	CMP.w #$0003
	BMI.b CODE_0D94E9
	LDA.w #$0003
CODE_0D94E9:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_0D94ED:
	dw CODE_0D8000
	dw CODE_0D96A5
	dw CODE_0D96BC
	dw CODE_0D96DF

YI_NorSpr126_SpikedLogOnPulley_Main:
;$0D94F5
	JSR.w CODE_0D9560
	JSL.l CODE_03AF23
	JSR.w CODE_0D95EE
	JSL.l CODE_03A299
	BCC.b CODE_0D9512
	LDA.b $18,x
	TAX
	JSL.l CODE_03A31E
	LDX.b $12
	JML.l CODE_03A31E

CODE_0D9512:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0D94ED,x)
	JSL.l CODE_03D127
	LDY.w $7D36,x
	DEY
	BNE.b CODE_0D955B
	LDA.w $7CD6
	SEC
	SBC.w $7CD6,x
	STA.b $00
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	BPL.b CODE_0D955A
	LDA.w $7BB6,x
CODE_0D9535:
	CLC
	ADC.w $7BB6
	LDY.b $01
	BPL.b CODE_0D9541
	EOR.w #$FFFF
	INC
CODE_0D9541:
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $7CD6
	CLC
	ADC.w $70E2
	STA.w $70E2
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
CODE_0D955A:
	RTL

CODE_0D955B:
	JSL.l CODE_03A5B7
	RTL

CODE_0D9560:
	LDY.b $18,x
	LDA.w $7182,y
	SEC
	SBC.w $609C
	STA.b $04
	REP.b #$10
	LDY.w $7362,x
	LDA.w $7A36,x
	BPL.b CODE_0D9580
	LDA.w #$8000
	STA.w $6000,y
	STA.w $6008,y
	BRA.b CODE_0D9589

CODE_0D9580:
	CLC
	ADC.b $04
	STA.w $6002,y
	STA.w $600A,y
CODE_0D9589:
	TYA
	CLC
	ADC.w #$0048
	TAY
	LDA.w $7182,x
	SEC
	SBC.w #$001A
	SEC
	SBC.w $609C
	STA.b $02
	STZ.b $06
	STZ.b $08
	LDA.w $7AF6,x
	BEQ.b CODE_0D95AB
	INC.b $06
	LDA.b $10
	STA.b $08
CODE_0D95AB:
	LDA.w #$0005
	STA.b $0E
CODE_0D95B0:
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.b $02
	CMP.b $04
	BPL.b CODE_0D95C4
	LDA.w #$8000
	STA.w $6000,y
	BRA.b CODE_0D95E1

CODE_0D95C4:
	LDA.b $08
	AND.w #$0003
	SEC
	SBC.b $06
	STA.b $0A
	ADC.b $02
	STA.w $6002,y
	LDA.w $6000,y
	CLC
	ADC.b $0A
	STA.w $6000,y
	LDA.b $08
	ROR
	STA.b $08
CODE_0D95E1:
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $0E
	BNE.b CODE_0D95B0
	SEP.b #$10
	RTS

CODE_0D95EE:
	LDA.w $6120
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $611C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $6122
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $611E
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	JSR.w CODE_0D965E
	BCS.b CODE_0D962C
	LDA.b $04
	LDY.b $0D
	BMI.b CODE_0D9615
	EOR.w #$FFFF
	INC
CODE_0D9615:
	CLC
	ADC.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	JSL.l CODE_03A858
CODE_0D962C:
	LDA.w $7BB6
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7CD6
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7BB8
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD8
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	JSR.w CODE_0D965E
	BCS.b CODE_0D965D
	LDA.b $0C
	EOR.w #$FFFF
	INC
	STA.b $00
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	BPL.b CODE_0D965D
	LDA.w #$0008
	JSL.l CODE_0D9535
CODE_0D965D:
	RTS

CODE_0D965E:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LSR
	STA.b $00
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0008
	STA.b $04
	ASL
	STA.b $06
	LDA.w $70E2,x
	CLC
	ADC.w #$0009
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $0C
	CLC
	ADC.b $04
	CMP.b $06
	BCS.b CODE_0D96A4
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	CLC
	ADC.b $00
	STA.b $08
	ASL
	STA.b $0A
	LDA.b $02
	SEC
	SBC.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	CLC
	ADC.b $08
	CMP.b $0A
CODE_0D96A4:
	RTS

CODE_0D96A5:
	TYX
	LDA.b $78,x
	CMP.w $7182,x
	BMI.b CODE_0D96BB
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $7A96,x
	INC.b $76,x
CODE_0D96BB:
	RTS

CODE_0D96BC:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0D96DE
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0016
	CLC
	ADC.b $78,x
	STA.b $78,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $7A96,x
	STZ.w $7A38,x
	INC.b $76,x
CODE_0D96DE:
	RTS

CODE_0D96DF:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0D96DE
	LDA.w $7A38,x
	CLC
	ADC.w #$0020
	CMP.w #$4000
	BMI.b CODE_0D96F4
	LDA.w #$4000
CODE_0D96F4:
	STA.w $7A38,x
	AND.w #$FF00
	XBA
	STA.w $7542,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0D9744
	LDA.w #!Define_YI_AmbSpr1F1
	JSL.l CODE_008B21
	LDA.b $78,x
	STA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7142,y
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0020
	STA.w $61C6
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0010
	STA.w $7AF6,x
	BRA.b CODE_0D975B

CODE_0D9744:
	LDA.b $78,x
	CMP.w $7182,x
	BPL.b CODE_0D976F
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CPY.b #$03
	BMI.b CODE_0D9764
	STA.w $7182,x
	LDA.w #$0010
	STA.w $7AF6,x
CODE_0D975B:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.b $76,x
	RTS

CODE_0D9764:
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b $78,x
	CLC
	ADC.w #$0016
	STA.b $78,x
CODE_0D976F:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr127_PulleyOfSpikedLog_Init:
;$0D9770
	RTL

;---------------------------------------------------------------------------

YI_NorSpr127_PulleyOfSpikedLog_Main:
;$0D9771
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BEQ.b CODE_0D97C3
	DEY
	BPL.b CODE_0D9787
	JSL.l CODE_03A858
	BRA.b CODE_0D97C3

CODE_0D9787:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0D97C3
	LDA.w $7D38,y
	BEQ.b CODE_0D97C3
	TYX
	JSL.l CODE_03B25B
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0D97C3
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	DEC
	BMI.b CODE_0D97C3
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	SEC
	SBC.w #$0016
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w $7542,y
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
CODE_0D97C3:
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_0D97DB
	LDA.w $7182,y
	AND.w #$0002
	BNE.b CODE_0D97DB
	PHY
	LDA.w #!Define_YI_SoundID5A_PulleySqueak
	JSL.l CODE_0085D2
	PLY
CODE_0D97DB:
	LDA.w $7A36,x
	SEC
	SBC.w $7182,y
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0C00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	AND.w #$01FE
	STA.w $7A38,x
	JSR.w CODE_0D9803
	RTL

CODE_0D9803:
	LDA.w #FXDATA_550000+$20E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$20E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

YI_NorSpr135_CirclingRaven_Init:
YI_NorSpr136_CirclingRaven_Init:
;$0D983D
	JSL.l CODE_03AE60
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$0010
	BNE.b CODE_0D9854
	INY
	INY
CODE_0D9854:
	TYA
	STA.w $7400,x
	STY.b $78,x
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr135_CirclingRaven
	BEQ.b CODE_0D9871
	LDA.w #$0080
	STA.b $18,x
CODE_0D9871:
	JSR.w CODE_0D98FB
	RTL

;---------------------------------------------------------------------------

DATA_0D9875:
	dw CODE_0D99AF
	dw CODE_0D99EF

YI_NorSpr135_CirclingRaven_Main:
YI_NorSpr136_CirclingRaven_Main:
;$0D9879
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	JSR.w CODE_0D98CA
	JSR.w CODE_0D98FB
	JSR.w CODE_0D994E
	JSR.w CODE_0D9998
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0D9875,x)
	LDY.w $7D36,x
	BEQ.b CODE_0D98C5
	BPL.b CODE_0D98C1
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF6
	BCC.b CODE_0D98B6
	LDY.w $7223,x
	BMI.b CODE_0D98B6
	LDY.w $60C0
	BNE.b CODE_0D98BC
CODE_0D98B6:
	JSL.l CODE_03A858
	BRA.b CODE_0D98C5

CODE_0D98BC:
	JSL.l CODE_03A5B7
	RTL

CODE_0D98C1:
	JSL.l CODE_0DC14C
CODE_0D98C5:
	RTL

DATA_0D98C6:
	dw $0100,$0400

CODE_0D98CA:
	LDY.b $76,x
	BNE.b CODE_0D98F6
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr135_CirclingRaven
	ASL
	TAY
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0D98C6,y
	PHA
	AND.w #$01FF
	STA.w $7A36,x
	PLA
	AND.w #$FE00
	BPL.b CODE_0D98EE
	ORA.w #$00FF
CODE_0D98EE:
	XBA
	CLC
	ADC.w $7A38,x
	STA.w $7A38,x
CODE_0D98F6:
	RTS

DATA_0D98F7:
	dw FXDATA_550000+$4080,FXDATA_550000+$40A0

CODE_0D98FB:
	LDY.b $77,x
	LDA.w DATA_0D98F7,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$4080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.b $78,x
	STY.b $00
	LDA.w $7A38,x
	LDY.w $7400,x
	CPY.b $00
	BEQ.b CODE_0D9920
	BIT.w #$0080
	BEQ.b CODE_0D9920
	CLC
	ADC.w #$0100
CODE_0D9920:
	AND.w #$01FE
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_0D994E:
	LDY.w $7400,x
	STY.b $00
	PHP
	LDA.w $7A38,x
	LDY.b $78,x
	CPY.b $00
	BEQ.b CODE_0D9965
	BIT.w #$0080
	BEQ.b CODE_0D9965
	PLP
	BRA.b CODE_0D9968

CODE_0D9965:
	PLP
	BEQ.b CODE_0D996C
CODE_0D9968:
	EOR.w #$FFFF
	INC
CODE_0D996C:
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0018
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7182,x
	RTS

CODE_0D9998:
	LDY.b $76,x
	BNE.b CODE_0D99AE
	LDA.w $7A98,x
	BNE.b CODE_0D99AE
	LDA.w #$0004
	STA.w $7A98,x
	LDA.b $77,x
	EOR.w #$0002
	STA.b $77,x
CODE_0D99AE:
	RTS

CODE_0D99AF:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr135_CirclingRaven
	BEQ.b CODE_0D99EE
	LDA.w $7A38,x
	SEC
	SBC.b $18,x
	BMI.b CODE_0D99EE
	INC.b $76,x
	LDA.b $18,x
	STA.w $7A38,x
	AND.w #$01FF
	BEQ.b CODE_0D99DD
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0004
	STA.w $7A96,x
	LDY.b #$01
	STY.b $16,x
	RTS

CODE_0D99DD:
	LDA.w #$0010
	STA.w $7A96,x
	LDA.b $10
	AND.w #$0003
	CLC
	ADC.w #$0003
	STA.b $16,x
CODE_0D99EE:
	RTS

CODE_0D99EF:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0D9A19
	DEC.b $16,x
	BNE.b CODE_0D9A0A
	LDY.w $7400,x
	STY.b $78,x
	LDA.w $7A38,x
	CLC
	ADC.w #$0080
	STA.b $18,x
	DEC.b $76,x
	RTS

CODE_0D9A0A:
	LDA.w #$0008
	STA.w $7A96,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0D9A19:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr13C_DownFlippers_Init:
;$0D9A1A
	JSL.l CODE_03AE60
	STZ.w $7400,x
	JSR.w CODE_0D9C93
	RTL

;---------------------------------------------------------------------------

YI_NorSpr13C_DownFlippers_Main:
;$0D9A25
	JSR.w CODE_0D9A40
	JSL.l CODE_03AF23
	JSR.w CODE_0D9B13
	JSR.w CODE_0D9C93
	LDA.w #$04B4
	LDY.b $18,x
	BEQ.b CODE_0D9A3C
	LDA.w #$0474
CODE_0D9A3C:
	STA.w $6FA0,x
	RTL

CODE_0D9A40:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7CD6,x
	SEC
	SBC.w #$0018
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $6094
	STA.b $00
	LDA.w $7CD6,x
	CLC
	ADC.w #$0018
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $6094
	STA.b $02
	LDA.w $7CD8,x
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $609C
	STA.b $04
	REP.b #$10
	LDY.w $7362,x
	LDA.b $00
	STA.w $6008,y
	STA.w $6018,y
	SEC
	SBC.w #$0010
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $02
	STA.w $6020,y
	STA.w $6030,y
	SEC
	SBC.w #$0010
	STA.w $6028,y
	STA.w $6038,y
	LDA.b $04
	STA.w $6012,y
	STA.w $601A,y
	STA.w $6032,y
	STA.w $603A,y
	SEC
	SBC.w #$0010
	STA.w $6002,y
	STA.w $600A,y
	STA.w $6022,y
	STA.w $602A,y
	LDA.w $6004,y
	EOR.w #$4000
	STA.w $6024,y
	LDA.w $600C,y
	EOR.w #$4000
	STA.w $602C,y
	LDA.w $6014,y
	EOR.w #$4000
	STA.w $6034,y
	LDA.w $601C,y
	EOR.w #$4000
	STA.w $603C,y
	LDA.w $6006,y
	STA.w $6026,y
	LDA.w $600E,y
	STA.w $602E,y
	LDA.w $6016,y
	STA.w $6036,y
	LDA.w $601E,y
	STA.w $603E,y
	SEP.b #$10
	RTS

CODE_0D9B13:
	STZ.b $02
	LDY.w $7D36,x
	BPL.b CODE_0D9B86
	LDA.w $7C18,x
	EOR.w #$FFFF
	INC
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	STA.b $00
	DEC
	CMP.w #$FFF7
	BCC.b CODE_0D9B6F
	LDA.w $7A38,x
	CMP.w #$FFE0
	BMI.b CODE_0D9B86
	LDY.w $60AB
	BPL.b CODE_0D9B86
	LDA.b $00
	SEC
	ADC.w $7CD8,x
	INC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDA.w $60AA
	CMP.w #$FF40
	BPL.b CODE_0D9B67
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0D9B67
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7AF6,x
	STZ.b $78,x
CODE_0D9B67:
	STZ.w $60D2
	STZ.w $60AA
	BRA.b CODE_0D9B86

CODE_0D9B6F:
	LDY.b $18,x
	BNE.b CODE_0D9B80
	LDY.b #$02
	STY.b $18,x
	STZ.b $78,x
	LDA.w #!Define_YI_SoundID0E_ShellHit4
	JSL.l CODE_0085D2
CODE_0D9B80:
	LDA.w #$0010
	STA.w $7AF6,x
CODE_0D9B86:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0D9B93:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0D9BA4
	BNE.b CODE_0D9BA7
	LDA.w $61B2
	ORA.w $61CC
	BEQ.b CODE_0D9BA7
CODE_0D9BA4:
	JMP.w CODE_0D9C85

CODE_0D9BA7:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr091_4RedToadies
	BEQ.b CODE_0D9BA4
	INC.b $02
	BRA.b CODE_0D9BBE

CODE_0D9BB3:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0D9B93

CODE_0D9BBE:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr006_WatermelonFreeze
	BEQ.b CODE_0D9BF6
	CMP.w #!Define_YI_NorSpr018_WatermelonFlame
	BEQ.b CODE_0D9BF6
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0D9BDA
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_0D9BDA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_0D9BF6
CODE_0D9BDA:
	LDA.w $7CD8,y
	SEC
	SBC.w $7CD8,x
	STA.b $00
	BPL.b CODE_0D9BEE
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	DEC
	BMI.b CODE_0D9BEE
	JMP.w CODE_0D9C5F

CODE_0D9BEE:
	LDA.w $7A38,x
	CMP.w #$FFE0
	BPL.b CODE_0D9BF9
CODE_0D9BF6:
	JMP.w CODE_0D9C7B

CODE_0D9BF9:
	LDA.b $00
	SEC
	SBC.w $7BB8,y
	SEC
	SBC.w $7BB8,x
	EOR.w #$FFFF
	SEC
	ADC.w $7182,y
	INC
	INC
	STA.w $7182,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	CPY.b #$00
	BNE.b CODE_0D9C30
	LDY.b #$02
	STY.w $0DB6
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0D9C7B
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7AF6,x
	STZ.b $78,x
	BRA.b CODE_0D9C7B

CODE_0D9C30:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	CMP.w #$FF40
	BPL.b CODE_0D9C48
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0D9C48
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7AF6,x
	STZ.b $78,x
CODE_0D9C48:
	LDA.w $7D38,y
	BEQ.b CODE_0D9C7B
	TYX
	PHY
	JSL.l CODE_03B25B
	PLY
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $7A96,y
	BRA.b CODE_0D9C7B

CODE_0D9C5F:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0D9BEE
	LDY.b $18,x
	BNE.b CODE_0D9C75
	LDY.b #$02
	STY.b $18,x
	STZ.b $78,x
	LDA.w #!Define_YI_SoundID0E_ShellHit4
	JSL.l CODE_0085D2
CODE_0D9C75:
	LDA.w #$0010
	STA.w $7AF6,x
CODE_0D9C7B:
	LDA.b $02
	BEQ.b CODE_0D9C82
	JMP.w CODE_0D9BB3

CODE_0D9C82:
	JMP.w CODE_0D9B86

CODE_0D9C85:
	LDA.w $7AF6,x
	BNE.b CODE_0D9C92
	LDY.b $18,x
	BEQ.b CODE_0D9C92
	STZ.b $18,x
	STZ.b $78,x
CODE_0D9C92:
	RTS

CODE_0D9C93:
	LDY.b $78,x
	BEQ.b CODE_0D9C98
	RTS

CODE_0D9C98:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0D9CA6
	LDA.w $7A38,x
	LDY.b $18,x
	BNE.b CODE_0D9CD6
	BRA.b CODE_0D9CC4

CODE_0D9CA6:
	LDY.w $7AF6,x
	BNE.b CODE_0D9CBE
	LDA.w $7A38,x
	BPL.b CODE_0D9CB8
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_0D9CCF

CODE_0D9CB8:
	SEC
	SBC.w #$0008
	BRA.b CODE_0D9CE6

CODE_0D9CBE:
	CLC
	ADC.w #$0008
	BRA.b CODE_0D9CE6

CODE_0D9CC4:
	CMP.w #$0000
	BPL.b CODE_0D9CCF
	CLC
	ADC.w #$0010
	BRA.b CODE_0D9CE6

CODE_0D9CCF:
	INC.b $78,x
	LDA.w #$0000
	BRA.b CODE_0D9CE6

CODE_0D9CD6:
	CMP.w #$FFA1
	BMI.b CODE_0D9CE1
	SEC
	SBC.w #$0018
	BRA.b CODE_0D9CE6

CODE_0D9CE1:
	INC.b $78,x
	LDA.w #$FFA0
CODE_0D9CE6:
	STA.w $7A38,x
	LDA.w #FXDATA_550000+$4060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$4060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	CLC
	ADC.w $7A36,x
	AND.w #$01FE
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

;---------------------------------------------------------------------------

DATA_0D9D2A:
	dw $0080,$FF80

YI_NorSpr144_RightOrLeftFlippers_Init:
;$0D9D2E
	JSL.l CODE_03AE60
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_0D9D2A,y
	STA.w $7A36,x
	STZ.w $7400,x
	JSR.w CODE_0D9C93
	RTL

;---------------------------------------------------------------------------

YI_NorSpr144_RightOrLeftFlippers_Main:
;$0D9D49
	JSR.w CODE_0D9D64
	JSL.l CODE_03AF23
	JSR.w CODE_0D9E70
	JSR.w CODE_0D9C93
	LDA.w #$04B5
	LDY.b $18,x
	BEQ.b CODE_0D9D60
	LDA.w #$0475
CODE_0D9D60:
	STA.w $6FA0,x
	RTL

CODE_0D9D64:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_0D9DBB
	LDA.w $7CD6,x
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $6094
	STA.b $00
	LDA.w $7CD8,x
	CLC
	ADC.w #$0018
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $609C
	STA.b $02
	LDA.w $7CD8,x
	SEC
	SBC.w #$0018
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $609C
	STA.b $04
	BRA.b CODE_0D9DEA

CODE_0D9DBB:
	LDA.w $7CD6,x
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $6094
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w #$0018
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $609C
	STA.b $02
	LDA.w $7CD8,x
	CLC
	ADC.w #$0018
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $609C
	STA.b $04
CODE_0D9DEA:
	REP.b #$10
	LDY.w $7362,x
	LDA.b $00
	STA.w $6008,y
	STA.w $6018,y
	STA.w $6028,y
	STA.w $6038,y
	SEC
	SBC.w #$0010
	STA.w $6000,y
	STA.w $6010,y
	STA.w $6020,y
	STA.w $6030,y
	LDA.b $02
	STA.w $6012,y
	STA.w $601A,y
	SEC
	SBC.w #$0010
	STA.w $6002,y
	STA.w $600A,y
	LDA.b $04
	STA.w $6022,y
	STA.w $602A,y
	SEC
	SBC.w #$0010
	STA.w $6032,y
	STA.w $603A,y
	LDA.w $6004,y
	EOR.w #$8000
	STA.w $6024,y
	LDA.w $600C,y
	EOR.w #$8000
	STA.w $602C,y
	LDA.w $6014,y
	EOR.w #$8000
	STA.w $6034,y
	LDA.w $601C,y
	EOR.w #$8000
	STA.w $603C,y
	LDA.w $6006,y
	STA.w $6026,y
	LDA.w $600E,y
	STA.w $602E,y
	LDA.w $6016,y
	STA.w $6036,y
	LDA.w $601E,y
	STA.w $603E,y
	SEP.b #$10
	RTS

CODE_0D9E70:
	LDA.w $70E2,x
	AND.w #$0010
	DEC
	STA.b $0E
	STZ.b $02
	LDY.w $7D36,x
	BMI.b CODE_0D9E83
CODE_0D9E80:
	JMP.w CODE_0D9F55

CODE_0D9E83:
	LDY.b $18,x
	BNE.b CODE_0D9E8E
	LDA.w $7C16,x
	EOR.b $0E
	BPL.b CODE_0D9E91
CODE_0D9E8E:
	JMP.w CODE_0D9F38

CODE_0D9E91:
	LDA.w $7A38,x
	CMP.w #$FFE0
	BMI.b CODE_0D9E80
	LDA.w $60A8
	BNE.b CODE_0D9EAA
	LDA.w $0035
	AND.w #$0300
	BEQ.b CODE_0D9E80
	AND.w #$0100
	DEC
CODE_0D9EAA:
	EOR.b $0E
	BMI.b CODE_0D9E80
	LDA.w $60A8
	CLC
	ADC.w #$00C0
	CMP.w #$0180
	BCC.b CODE_0D9ECA
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0D9ECA
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7AF6,x
	STZ.b $78,x
CODE_0D9ECA:
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	DEC
	DEC
	LDY.b $0E
	BMI.b CODE_0D9EDB
	EOR.w #$FFFF
	INC
CODE_0D9EDB:
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $60A8
	CLC
	ADC.w #$0280
	CMP.w #$0500
	BCC.b CODE_0D9F25
	LDA.w $60A8
	PHA
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	STA.w $60A8
	STA.w $60B4
	PLA
	BMI.b CODE_0D9F13
	EOR.w #$FFFF
	INC
CODE_0D9F13:
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	BRA.b CODE_0D9F55

CODE_0D9F25:
	STZ.w $60A8
	STZ.w $60B4
	LDY.w $60C0
	BNE.b CODE_0D9F55
	INC.w $61C2
	INC.w $60DC
	BRA.b CODE_0D9F55

CODE_0D9F38:
	LDY.b $18,x
	BNE.b CODE_0D9F4F
	LDA.w #$0010
	STA.w $7BB6,x
	LDY.b #$02
	STY.b $18,x
	STZ.b $78,x
	LDA.w #!Define_YI_SoundID0E_ShellHit4
	JSL.l CODE_0085D2
CODE_0D9F4F:
	LDA.w #$0010
	STA.w $7AF6,x
CODE_0D9F55:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0D9F62:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0D9F8A
	BNE.b CODE_0D9F73
	LDA.w $61B2
	ORA.w $61CC
	BMI.b CODE_0D9F8A
CODE_0D9F73:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr091_4RedToadies
	BEQ.b CODE_0D9F7F
	INC.b $02
	BRA.b CODE_0D9F9E

CODE_0D9F7F:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0D9F62

CODE_0D9F8A:
	LDA.w $7AF6,x
	BNE.b CODE_0D9F9D
	LDY.b $18,x
	BEQ.b CODE_0D9F9D
	LDA.w #$0008
	STA.w $7BB6,x
	STZ.b $18,x
	STZ.b $78,x
CODE_0D9F9D:
	RTS

CODE_0D9F9E:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.b $0E
	BPL.b CODE_0D9FB3
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	EOR.b $0E
	BPL.b CODE_0D9FB3
	JMP.w CODE_0DA05C

CODE_0D9FB3:
	LDA.w $7A38,x
	CMP.w #$FFE0
	BMI.b CODE_0DA028
	LDA.w $6FA2,x
	AND.w #$4000
	BEQ.b CODE_0D9FC6
	JMP.w CODE_0DA02A

CODE_0D9FC6:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_0DA028
	EOR.b $0E
	BMI.b CODE_0DA028
	LDA.w $7D38,y
	BEQ.b CODE_0DA02A
	PHY
	LDA.w $7BB6,y
	SEC
	ADC.w $7BB6,x
	INC
	INC
	LDY.b $0E
	BMI.b CODE_0D9FE6
	EOR.w #$FFFF
	INC
CODE_0D9FE6:
	PLY
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	CLC
	ADC.w $70E2,y
	STA.w $70E2,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CLC
	ADC.w #$00C0
	CMP.w #$0180
	BCC.b CODE_0DA012
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0DA012
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7AF6,x
	STZ.b $78,x
CODE_0DA012:
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $6FA2,y
	AND.w #$6000
	CMP.w #$6000
	BEQ.b CODE_0DA08D
	TYX
	JSL.l CODE_03B25B
CODE_0DA028:
	BRA.b CODE_0DA08D

CODE_0DA02A:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_0DA08D
	EOR.b $0E
	BMI.b CODE_0DA08D
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $7400,y
	EOR.w #$0002
	STA.w $7400,y
	LDA.w $75E0,y
	EOR.w #$FFFF
	INC
	STA.w $75E0,y
	LDA.w $70E2,y
	SEC
	SBC.w $72C0,y
	STA.w $70E2,y
	BRA.b CODE_0DA08D

CODE_0DA05C:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_0DA069
	LDA.w $7D38,y
	BEQ.b CODE_0DA02A
CODE_0DA069:
	LDA.b $18,x
	BNE.b CODE_0DA087
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.b $0E
	BPL.b CODE_0DA02A
	LDA.w #$0010
	STA.w $7BB6,x
	LDY.b #$02
	STY.b $18,x
	STZ.b $78,x
	LDA.w #!Define_YI_SoundID0E_ShellHit4
	JSL.l CODE_0085D2
CODE_0DA087:
	LDA.w #$0010
	STA.w $7AF6,x
CODE_0DA08D:
	LDA.b $02
	BEQ.b CODE_0DA094
	JMP.w CODE_0D9F7F

CODE_0DA094:
	JMP.w CODE_0D9F55

;---------------------------------------------------------------------------

YI_NorSpr154_SharkChomp_Init:
CODE_0DA097:
	LDA.w $70E2,x
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$FFB0
	BMI.b CODE_0DA0B0
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_0DA0B0:
	JSR.w CODE_0DA4CA
	STZ.w $7400,x
	LDA.w #$FFE8
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0007
	STA.w $74A2,x
	LDA.w #$0008
	STA.w $7540,x
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$15
	STY.w !RAM_YI_Global_MainScreenLayers
	LDA.w $6094
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0040
	STA.w !RAM_YI_Global_Layer3XPosLo
	LDA.w $609C
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$0040
	STA.w !RAM_YI_Global_Layer3YPosLo
	RTL

;---------------------------------------------------------------------------

DATA_0DA0F0:
	dw CODE_0DA21E
	dw CODE_0DA24A
	dw CODE_0DA270
	dw $0004
	dw $0004
	dw CODE_0DA2F4
	dw CODE_0DA332

YI_NorSpr154_SharkChomp_Main:
;$0DA0FE
	JSR.w CODE_0DA167
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_0DA113
	LDA.w !RAM_YI_Global_MainScreenLayers
	AND.w #$1313
	STA.w !RAM_YI_Global_MainScreenLayers
	RTL

CODE_0DA113:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DA0F0,x)
	LDY.b $76,x
	CPY.b #$05
	BPL.b CODE_0DA15A
	JSR.w CODE_0DA416
	JSR.w CODE_0DA369
	JSR.w CODE_0DA386
	LDA.w #$0008
	STA.w $7540,x
	LDA.w $7680,x
	CMP.w #$FFC0
	BPL.b CODE_0DA141
	LDA.w #$0380
	BRA.b CODE_0DA144

CODE_0DA141:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0DA144:
	STA.w $75E0,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_0DA15A
	LDA.w #$0010
	STA.w $7540,x
CODE_0DA15A:
	RTL

DATA_0DA15B:
	dw $FFF0,$FFEE,$FFED

DATA_0DA161:
	dw $FFD1,$FFCE,$FFCC

CODE_0DA167:
	LDY.b $18,x
	LDA.w DATA_0DA15B,y
	CLC
	ADC.w $7680,x
	STA.b $00
	LDA.w DATA_0DA161,y
	CLC
	ADC.w $7682,x
	STA.b $02
	REP.b #$10
	LDY.w $7362,x
	LDA.b $00
	STA.w $6008,y
	STA.w $6010,y
	CLC
	ADC.w #$0008
	STA.w $6018,y
	CLC
	ADC.w #$0008
	STA.w $6000,y
	LDA.b $02
	STA.w $600A,y
	STA.w $601A,y
	CLC
	ADC.w #$0008
	STA.w $6012,y
	CLC
	ADC.w #$0008
	STA.w $6002,y
	SEP.b #$10
	LDA.w $6094
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0040
	STA.w !RAM_YI_Global_Layer3XPosLo
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_0DA1CB
	LDA.w #$0100
	STA.w !RAM_YI_Global_Layer3XPosLo
CODE_0DA1CB:
	LDY.b $19,x
	BEQ.b CODE_0DA1F6
	LDA.w $7A36,x
	AND.w #$FF00
	XBA
	STA.b $00
	REP.b #$10
	LDY.w $7362,x
	LDA.w $604A,y
	CLC
	ADC.b $00
	STA.w $604A,y
	LDA.w $6052,y
	CLC
	ADC.b $00
	STA.w $6052,y
	SEP.b #$10
	LDA.w #$0000
	BRA.b CODE_0DA1FF

CODE_0DA1F6:
	LDA.b $10
	AND.w #$0003
	SEC
	SBC.w #$0002
CODE_0DA1FF:
	CLC
	ADC.w $609C
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$0040
	STA.w !RAM_YI_Global_Layer3YPosLo
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_0DA21D
	LDA.w #$0100
	STA.w !RAM_YI_Global_Layer3YPosLo
CODE_0DA21D:
	RTS

CODE_0DA21E:
	TYX
	LDA.w $7680,x
	CMP.w #$0000
	BMI.b CODE_0DA241
	LDA.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$01
	LDA.w $0C1C
	BEQ.b CODE_0DA23F
	LDA.w $70E2,x
	CLC
	ADC.w #$0080
	STA.b $78,x
	LDY.b #$03
CODE_0DA23F:
	STY.b $76,x
CODE_0DA241:
	RTS

DATA_0DA242:
	dw $0220,$0260,$0280,$02C0

CODE_0DA24A:
	TYX
	LDA.w $7680,x
	CMP.b $78,x
	BPL.b CODE_0DA267
	LDA.b $10
	AND.w #$001F
	STA.b $78,x
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w DATA_0DA242,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DA267:
	RTS

DATA_0DA268:
	dw $0080,$00A0,$00C0,$0100

CODE_0DA270:
	TYX
	LDA.w $7680,x
	CMP.b $78,x
	BMI.b CODE_0DA291
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$FFC0
	STA.b $78,x
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w DATA_0DA268,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC.b $76,x
CODE_0DA291:
	RTS

DATA_0DA292:
	dw $0000,$0200,$0000,$0200

DATA_0DA29A:
	dw $0200,$0400

CODE_0DA29E:
	TYX
	LDA.w $70E2,x
	CMP.b $78,x
	BMI.b CODE_0DA2BD
	LDA.b $78,x
	CLC
	ADC.w #$0100
	STA.b $78,x
	LDY.w $7A38,x
	LDA.w DATA_0DA292,y
	TAY
	LDA.w DATA_0DA29A,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DA2BD:
	RTS

DATA_0DA2BE:
	dw $0002,$0000,$0200,$0000

DATA_0DA2C6:
	dw $0020,$0060

CODE_0DA2CA:
	TYX
	LDA.w $70E2,x
	CMP.b $78,x
	BMI.b CODE_0DA2F3
	LDA.b $78,x
	CLC
	ADC.w #$0080
	STA.b $78,x
	LDY.w $7A38,x
	LDA.w DATA_0DA2BE,y
	TAY
	LDA.w DATA_0DA2C6,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7A38,x
	INC
	AND.w #$0007
	STA.w $7A38,x
	DEC.b $76,x
CODE_0DA2F3:
	RTS

CODE_0DA2F4:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0DA331
	LDA.b $78,x
	CLC
	ADC.w #$0008
	CMP.w #$0200
	BMI.b CODE_0DA308
	LDA.w #$0200
CODE_0DA308:
	STA.b $78,x
	CLC
	ADC.w $7A36,x
	CMP.w #$1400
	BMI.b CODE_0DA32E
	LDA.w #$FF00
	STA.b $78,x
	LDA.w #!Define_YI_SoundID56_ThunderLakituAttacking6
	JSL.l CODE_0085D2
	DEC.b $16,x
	BNE.b CODE_0DA32B
	LDA.w #$0040
	STA.w $7A96,x
	INC.b $76,x
CODE_0DA32B:
	LDA.w #$1400
CODE_0DA32E:
	STA.w $7A36,x
CODE_0DA331:
	RTS

CODE_0DA332:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0DA350
	LDA.w #$0040
	CMP.w $7542,x
	BEQ.b CODE_0DA350
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #!Define_YI_SoundID82_BossFalling
	JSL.l CODE_0085D2
CODE_0DA350:
	LDA.w $7682,x
	CMP.w #$0140
	BMI.b CODE_0DA368
	STZ.w $7ECC
	JSL.l CODE_03A32E
	LDA.w !RAM_YI_Global_MainScreenLayers
	AND.w #$1313
	STA.w !RAM_YI_Global_MainScreenLayers
CODE_0DA368:
	RTS

CODE_0DA369:
	LDA.w $7C16,x
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_0DA385
	LDA.w $7C18,x
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_0DA385
	JSL.l CODE_03A858
CODE_0DA385:
	RTS

CODE_0DA386:
	LDA.w #$0002
	STA.b $0E
CODE_0DA38B:
	LDA.w $70E2,x
	CLC
	ADC.w #$0030
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w $0091
	LDA.w $7182,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $0093
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_0DA3C1
	JSL.l CODE_0DA46B
	BRA.b CODE_0DA3FC

CODE_0DA3C1:
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_0DA3FC
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDY.b $18,x
	CPY.b #$04
	BNE.b CODE_0DA3FA
	LDA.w #!Define_YI_SoundID84_TapTapTheRedNoseWalk
	JSL.l CODE_0085D2
	LDA.w #$0040
	STA.w $61C8
	INC.b $19,x
	STZ.b $78,x
	STZ.w $7A36,x
	LDY.b #$03
	STY.b $16,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$5C01
	STA.w $7040,x
	LDY.b #$05
	STY.b $76,x
CODE_0DA3FA:
	PLA
	RTL

CODE_0DA3FC:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0028
	BMI.b CODE_0DA40B
	LDA.w #$FFE8
CODE_0DA40B:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC.b $0E
	BEQ.b CODE_0DA415
	JMP.w CODE_0DA38B

CODE_0DA415:
	RTS

CODE_0DA416:
	LDA.w $72C0,x
	CLC
	ADC.w $7A36,x
	CMP.w #$0008
	BMI.b CODE_0DA43D
	SEC
	SBC.w #$0008
	PHA
	LDY.b $18,x
	INY
	INY
	CPY.b #$06
	BNE.b CODE_0DA431
	LDY.b #$00
CODE_0DA431:
	STY.b $18,x
	JSR.w CODE_0DA4CA
	LDA.w #$0008
	STA.w $7A98,x
	PLA
CODE_0DA43D:
	STA.w $7A36,x
	LDA.w $7A98,x
	BNE.b CODE_0DA45D
	LDA.w #$0008
	STA.w $7A98,x
	STZ.w $7A36,x
	LDY.b $18,x
	INY
	INY
	CPY.b #$06
	BNE.b CODE_0DA458
	LDY.b #$00
CODE_0DA458:
	STY.b $18,x
	JSR.w CODE_0DA4CA
CODE_0DA45D:
	LDY.b $18,x
	CPY.b #$04
	BNE.b CODE_0DA46A
	LDA.w #!Define_YI_SoundID64_UnlockDoor
	JSL.l CODE_0085D2
CODE_0DA46A:
	RTS

CODE_0DA46B:
	LDA.w #$0000
	STA.w $008F
	JSL.l CODE_109295
	LDX.b $12
	BRA.b CODE_0DA48C

CODE_0DA479:					; Note: Routine for when a chomp rock touches breakable soft dirt tiles.
	LDA.w #$0000
	STA.w $008F
	JSL.l CODE_109295
	LDX.b $12
CODE_0DA485:
	LDA.w #!Define_YI_SoundID0A_BreakDirt
	JSL.l CODE_0085D2
CODE_0DA48C:
	LDA.w #!Define_YI_AmbSpr1C3
	JSL.l CODE_008B21
	LDA.w $0091
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.w $0093
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$000A
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0008
	STA.w $7502,y
	LDA.w #$0400
	STA.w $75A2,y
	RTL

DATA_0DA4C4:
	dw $5DA8,$5FA8,$61A8

CODE_0DA4CA:
	LDY.b $18,x
	LDA.w DATA_0DA4C4,y
	STA.b $00
	PHX
	PHB
	SEP.b #$20
	LDA.b #$7E4800>>16
	PHA
	PLB
	REP.b #$30
	LDX.w #$7E4800
	INX
	INX
	LDA.w #$3401
	STA.w $0000,x
	LDA.w #$0180
	STA.w $0002,x
	LDA.w #$0018
	STA.w $0004,x
	LDA.b $00
	STA.w $0005,x
	LDA.w #$007E
	STA.w $0007,x
	LDA.w #$01CC
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	SEP.b #$10
	PLB
	PLX
	RTS

;---------------------------------------------------------------------------

YI_NorSpr15C_GreenRotatingPlatformSwitch_Init:
YI_NorSpr15D_RedRotatingPlatformSwitch_Init:
;$0DA513
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr15C_GreenRotatingPlatformSwitch
	ASL
	STA.b $78,x
	STZ.w $7400,x
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr15C_GreenRotatingPlatformSwitch_Main:
YI_NorSpr15D_RedRotatingPlatformSwitch_Main:
;$0DA527
	JSL.l CODE_03AF23
	LDY.b $78,x
	LDA.w $0FD1,y
	CMP.w $0FD5,y
	BNE.b CODE_0DA538
	JSR.w CODE_0DAA6B
CODE_0DA538:
	JSL.l CODE_03D291
	JSL.l CODE_03D127
	LDA.w $7542,x
	BEQ.b CODE_0DA556
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w $7182,x
	BPL.b CODE_0DA556
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_0DA556:
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr15F_GreenSpikedPlatform_Init:
YI_NorSpr160_RedSpikedPlatform_Init:
;$0DA560
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr15F_GreenSpikedPlatform
	ASL
	STA.b $78,x
	TAY
	LDA.w $0FC1,y
	BNE.b CODE_0DA5A1
	JSL.l CODE_03AE60
	LDY.b $78,x
	LDA.w $7722,x
	INC
	STA.w $0FC1,y
	JSL.l CODE_03AD74
	BCS.b CODE_0DA58F
	LDY.b $78,x
	LDA.w #$0000
	STA.w $0FC1,y
	JML.l CODE_03A31E

CODE_0DA58F:
	LDY.b $78,x
	LDA.w $7722,x
	INC
	STA.w $0FC5,y
	LDA.w #$FFFF
	STA.w $7722,x
	JSR.w CODE_0DA712
CODE_0DA5A1:
	LDY.b $78,x
	LDA.w $0FCD,y
	INC
	STA.w $0FCD,y
	STZ.w $7400,x
	LDA.w #$0019
	STA.w $7BB6,x
	LDA.w #$0007
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr15F_GreenSpikedPlatform_Main:
YI_NorSpr160_RedSpikedPlatform_Main:
;$0DA5BA
	JSR.w CODE_0DA5D7
	JSL.l CODE_03AF23
	JSR.w CODE_0DA69C
	JSR.w CODE_0DA7E6
	JSR.w CODE_0DA8B8
	JSR.w CODE_0DA6DC
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	RTL

CODE_0DA5D7:
	LDA.w $7362,x
	BPL.b CODE_0DA5DD
CODE_0DA5DC:
	RTS

CODE_0DA5DD:
	LDY.b $78,x
	LDA.w $0FC1,y
	DEC
	STA.w $7722,x
	JSL.l CODE_03AA52
	LDY.b $78,x
	LDA.w $0FC5,y
	DEC
	STA.w $7722,x
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	JSL.l CODE_03AA60
	LDA.w #$FFFF
	STA.w $7722,x
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0DA61C
	LDY.b $78,x
	LDA.w $0FBD,y
	CMP.w $7974
	BNE.b CODE_0DA5DC
CODE_0DA61C:
	LDY.b $78,x
	LDA.w $0FD9,y
	STA.b $00
	LDA.w $0FDD,y
	STA.b $02
	LDA.w $0FE1,y
	STA.b $04
	LDA.w $0FE5,y
	STA.b $06
	REP.b #$10
	LDY.w $7362,x
	BMI.b CODE_0DA699
	LDA.w $6000,y
	SEC
	SBC.b $00
	STA.w $6000,y
	STA.w $6010,y
	LDA.w $6008,y
	SEC
	SBC.b $00
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $6002,y
	SEC
	SBC.b $02
	STA.w $6002,y
	STA.w $600A,y
	LDA.w $6012,y
	SEC
	SBC.b $02
	STA.w $6012,y
	STA.w $601A,y
	LDA.w $6020,y
	CLC
	ADC.b $04
	STA.w $6020,y
	STA.w $6030,y
	LDA.w $6028,y
	CLC
	ADC.b $04
	STA.w $6028,y
	STA.w $6038,y
	LDA.w $6022,y
	CLC
	ADC.b $06
	STA.w $6022,y
	STA.w $602A,y
	LDA.w $6032,y
	CLC
	ADC.b $06
	STA.w $6032,y
	STA.w $603A,y
CODE_0DA699:
	SEP.b #$10
CODE_0DA69B:
	RTS

CODE_0DA69C:
	JSL.l CODE_03A2C7
	BCC.b CODE_0DA69B
	LDY.b $78,x
	LDA.w $0FCD,y
	DEC
	STA.w $0FCD,y
	BNE.b CODE_0DA6D1
	LDA.w $0FC1,y
	DEC
	STA.w $7722,x
	LDA.w #$0000
	STA.w $0FC1,y
	JSL.l CODE_03AEFD
	LDY.b $78,x
	LDA.w $0FC5,y
	DEC
	STA.w $7722,x
	LDA.w #$0000
	STA.w $0FC5,y
	JSL.l CODE_03AEFD
CODE_0DA6D1:
	LDA.w #$FFFF
	STA.w $7722,x
	PLA
	JML.l CODE_03A31E

CODE_0DA6DC:
	LDY.b $78,x
	LDA.w $7974
	CMP.w $0FBD,y
	BEQ.b CODE_0DA711
	STA.w $0FBD,y
	LDA.w $0FD1,y
	CMP.w $0FD5,y
	BEQ.b CODE_0DA70E
	SEC
	SBC.w #$0020
	STA.w $0FD1,y
	SEC
	SBC.w $0FD5,y
	CLC
	ADC.w #$000F
	CMP.w #$001E
	BCS.b CODE_0DA70B
	LDA.w $0FD5,y
	STA.w $0FD1,y
CODE_0DA70B:
	JSR.w CODE_0DA712
CODE_0DA70E:
	JSR.w CODE_0DA61C
CODE_0DA711:
	RTS

CODE_0DA712:
	LDA.w #FXDATA_550000+$40C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$40C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.b $78,x
	LDA.w $0FD1,y
	AND.w #$01FE
	LSR
	STA.b $00
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $0FC1,y
	TAX
	DEX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #FXDATA_550000+$40C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$40C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.b $00
	EOR.w #$FFFF
	INC
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $78,x
	LDA.w $0FC5,y
	TAX
	DEX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDA.w #$000D
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $78,x
	LDA.w $0FD1,y
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $78,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $0FD9,y
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $0FDD,y
	LDA.w #$000C
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $78,x
	LDA.w $0FD1,y
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $78,x
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $0FE1,y
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $0FE5,y
	RTS

CODE_0DA7E6:
	LDY.b $78,x
	LDA.w $0FD1,y
	CMP.w $0FD5,y
	BNE.b CODE_0DA807
	JSL.l CODE_03D127
	BCC.b CODE_0DA806
	DEC.b $0E
	LDY.b $78,x
	LDA.w $0FC9,y
	DEC
	EOR.b $0E
	BPL.b CODE_0DA806
	JSL.l CODE_03A858
CODE_0DA806:
	RTS

CODE_0DA807:
	LDA.w $7C16,x
	CLC
	ADC.w #$0021
	CMP.w #$0042
	BCS.b CODE_0DA806
	LDA.w $7C18,x
	CLC
	ADC.w #$0013
	CMP.w #$0026
	BCS.b CODE_0DA806
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $00
	CLC
	ADC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0400
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_0DA867
	AND.w #$0180
	DEC
	EOR.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_0DA870
CODE_0DA867:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $60A8
	STA.w $60B4
CODE_0DA870:
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	INC
	STA.b $00
	LDA.w $60FC
	AND.w #$001F
	BEQ.b CODE_0DA889
	AND.w #$0018
	DEC
	EOR.b $00
	BMI.b CODE_0DA89F
CODE_0DA889:
	LDA.b $00
	BPL.b CODE_0DA89C
	PHA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	PLA
	ASL
CODE_0DA89C:
	STA.w $60AA
CODE_0DA89F:
	LDY.b $78,x
	LDA.w $0FD1,y
	AND.w #$01FE
	SEC
	SBC.b $00
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_0DA8B7
	JSL.l CODE_03A858
CODE_0DA8B7:
	RTS

CODE_0DA8B8:
	LDY.b $78,x
	LDA.w $0FD1,y
	CMP.w $0FD5,y
	BNE.b CODE_0DA8C6
	JSL.l CODE_03D291
CODE_0DA8C6:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr162_DoubleSpikePlatformWithSwitch_Init:
;$0DA8C7
	JSL.l CODE_03AE60
	LDA.w $7722,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03AD74
	BCS.b CODE_0DA8E1
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7722,x
	JML.l CODE_03A31E

CODE_0DA8E1:
	JSR.w CODE_0DAB6A
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7400,x
	LDA.w #$0008
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr162_DoubleSpikePlatformWithSwitch_Main:
;$0DA8F1
	JSR.w CODE_0DA911
	JSL.l CODE_03AF23
	JSR.w CODE_0DAC2D
	JSR.w CODE_0DAA52
	JSR.w CODE_0DAC43
	JSR.w CODE_0DAF16
	JSR.w CODE_0DAAF5
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	RTL

CODE_0DA911:
	LDA.w $7362,x
	BPL.b CODE_0DA917
CODE_0DA916:
	RTS

CODE_0DA917:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_0DA916
CODE_0DA922:
	JSL.l CODE_03AA52
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0040
	TAY
	JSL.l CODE_03AA60
	LDA.w $7722,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7722,x
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	JSL.l CODE_03AA60
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0060
	TAY
	JSL.l CODE_03AA60
	PLA
	STA.w $7722,x
	LDA.b $18,x
	STA.b $00
	LDA.b $76,x
	STA.b $02
	LDA.b $78,x
	STA.b $04
	LDA.w $7A36,x
	STA.b $06
	REP.b #$10
	LDY.w $7362,x
	BMI.b CODE_0DA916
	LDA.w $6000,y
	SEC
	SBC.b $00
	STA.w $6000,y
	STA.w $6010,y
	LDA.w $6008,y
	SEC
	SBC.b $00
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $6002,y
	SEC
	SBC.b $02
	STA.w $6002,y
	STA.w $600A,y
	LDA.w $6012,y
	SEC
	SBC.b $02
	STA.w $6012,y
	STA.w $601A,y
	LDA.w $6020,y
	SEC
	SBC.b $04
	STA.w $6020,y
	STA.w $6030,y
	LDA.w $6028,y
	SEC
	SBC.b $04
	STA.w $6028,y
	STA.w $6038,y
	LDA.w $6022,y
	SEC
	SBC.b $06
	STA.w $6022,y
	STA.w $602A,y
	LDA.w $6032,y
	SEC
	SBC.b $06
	STA.w $6032,y
	STA.w $603A,y
	LDA.w $6040,y
	CLC
	ADC.b $04
	STA.w $6040,y
	STA.w $6050,y
	LDA.w $6048,y
	CLC
	ADC.b $04
	STA.w $6048,y
	STA.w $6058,y
	LDA.w $6042,y
	CLC
	ADC.b $06
	STA.w $6042,y
	STA.w $604A,y
	LDA.w $6052,y
	CLC
	ADC.b $06
	STA.w $6052,y
	STA.w $605A,y
	LDA.w $6060,y
	CLC
	ADC.b $00
	STA.w $6060,y
	STA.w $6070,y
	LDA.w $6068,y
	CLC
	ADC.b $00
	STA.w $6068,y
	STA.w $6078,y
	LDA.w $6062,y
	CLC
	ADC.b $02
	STA.w $6062,y
	STA.w $606A,y
	LDA.w $6072,y
	CLC
	ADC.b $02
	STA.w $6072,y
	STA.w $607A,y
	LDA.w $7A98,x
	BNE.b CODE_0DAA43
	LDA.w $7A38,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0DAA4F
CODE_0DAA43:
	LDA.w $6084,y
	AND.w #$F1FF
	ORA.w #$F800
	STA.w $6084,y
CODE_0DAA4F:
	SEP.b #$10
	RTS

CODE_0DAA52:
	LDA.w $7A38,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0DAA5D
	JSR.w CODE_0DAA6B
CODE_0DAA5D:
	JSL.l CODE_03D127
	BCS.b CODE_0DAA66
	STZ.w $7D36,x
CODE_0DAA66:
	JSL.l CODE_03D291
	RTS

CODE_0DAA6B:
	LDY.w $60AB
	BPL.b CODE_0DAA96
	LDY.w $60C0
	BEQ.b CODE_0DAA96
	LDA.w $7C16,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0DAA96
	LDA.w $7C18,x
	CMP.w #$FFE8
	BMI.b CODE_0DAA96
	CMP.w #$FFF0
	BPL.b CODE_0DAA96
	STZ.w $60AA
	STZ.w $60D2
	BRA.b CODE_0DAAAE

CODE_0DAA96:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0DAAF4
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0DAAF4
	LDA.w $7D38,y
	BEQ.b CODE_0DAAF4
	TYX
	JSL.l CODE_03B25B
CODE_0DAAAE:
	LDA.w #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_0085D2
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr162_DoubleSpikePlatformWithSwitch
	BEQ.b CODE_0DAAE4
	LDY.b $78,x
	LDA.w $0FC9,y
	EOR.w #$0002
	STA.w $0FC9,y
	LDA.w $0FD5,y
	SEC
	SBC.w #$0500
	STA.w $0FD5,y
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0DAAE3
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_0DAAE3:
	RTS

CODE_0DAAE4:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7A98,x
CODE_0DAAF4:
	RTS

CODE_0DAAF5:
	LDA.w $7A98,x
	BEQ.b CODE_0DAB0D
	DEC
	BNE.b CODE_0DAB57
	LDA.b $16,x
	EOR.w #$0002
	STA.b $16,x
	LDA.w #!Define_YI_SoundID40_OpenDoor
	JSL.l CODE_0085D2
	BRA.b CODE_0DAB57

CODE_0DAB0D:
	LDA.w $7A38,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0DAB57
	AND.w #$00FE
	SEC
	SBC.w #$007E
	CMP.w #$0004
	BCS.b CODE_0DAB30
	LDA.w $7A96,x
	BEQ.b CODE_0DAB5B
	DEC
	BNE.b CODE_0DAB57
	LDA.w #!Define_YI_SoundID40_OpenDoor
	JSL.l CODE_0085D2
CODE_0DAB30:
	LDA.w $7A38,x
	SEC
	SBC.w #$0004
	STA.w $7A38,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_0DAB54
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7A38,x
	LDA.w #!Define_YI_SoundID41_CloseDoor
	JSL.l CODE_0085D2
CODE_0DAB54:
	JSR.w CODE_0DAB6A
CODE_0DAB57:
	JSR.w CODE_0DA922
	RTS

CODE_0DAB5B:
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID41_CloseDoor
	JSL.l CODE_0085D2
	BRA.b CODE_0DAB57

CODE_0DAB6A:
	LDA.w #FXDATA_550000+$40C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$40C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	AND.w #$01FE
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #FXDATA_550000+$40C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$40C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	EOR.w #$FFFF
	INC
	AND.w #$01FE
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDA.w #$002E
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $18,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $76,x
	LDA.w #$0016
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $78,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7A36,x
CODE_0DAC2C:
	RTS

CODE_0DAC2D:
	JSL.l CODE_03A2DE
	BCC.b CODE_0DAC2C
	JSL.l CODE_03AEFD
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7722,x
	JSL.l CODE_03AEFD
	PLA
	RTL

CODE_0DAC43:
	LDA.w $7A98,x
	BNE.b CODE_0DAC71
	LDA.w $7A96,x
	BEQ.b CODE_0DAC69
	LDA.w #$0007
	STA.b $0C
	LDA.w #$0038
	STA.b $0E
	JSR.w CODE_0DAC9C
	BCS.b CODE_0DAC68
	LDA.b $16,x
	DEC
	EOR.w $7C16,x
	BPL.b CODE_0DAC68
	JSL.l CODE_03A858
CODE_0DAC68:
	RTS

CODE_0DAC69:
	LDA.w $7A38,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0DAC98
CODE_0DAC71:
	LDY.w $7D36,x
	BMI.b CODE_0DAC97
	LDA.w #$0038
	STA.b $0C
	LDA.w #$0007
	STA.b $0E
	JSR.w CODE_0DAC9C
	BCC.b CODE_0DAC97
	DEC.b $0E
	LDA.b $16,x
	DEC
	EOR.b $0E
	BPL.b CODE_0DAC97
	LDY.w $7D36,x
	BPL.b CODE_0DAC97
	JSL.l CODE_03A858
CODE_0DAC97:
	RTS

CODE_0DAC98:
	JSR.w CODE_0DACF2
	RTS

CODE_0DAC9C:
	STZ.w $7D36,x
	LDA.w $6120
	CLC
	ADC.b $0C
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_0DACF1
	LDA.w $6122
	CLC
	ADC.b $0E
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C18,x
	CMP.b $00
	BCS.b CODE_0DACF1
	LDA.w #$00FF
	STA.w $7D36,x
	LDA.w $7BB6,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7BB8,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $0C
	STA.w $7BB6,x
	LDA.b $0E
	STA.w $7BB8,x
	JSL.l CODE_03D127
	PHP
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7BB6,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7BB8,x
	PLP
CODE_0DACF1:
	RTS

CODE_0DACF2:
	LDA.w $7A38,x
	CLC
	ADC.w #$0080
	AND.w #$00FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0006
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BMI.b CODE_0DAD19
	EOR.w #$FFFF
	INC
CODE_0DAD19:
	SEC
	SBC.w $6120
	STA.b $08
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $6122
	STA.b $0A
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0100
	AND.w #$01FE
	STA.b $06
	STZ.w $6000
	STZ.w $6002
	STZ.w $6004
	LDA.w $7A38,x
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $0C
	AND.w #$00FE
	STA.b $02
	ORA.w #$0100
	STA.b $04
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $603E
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_0DAD89
	EOR.w #$FFFF
	INC
CODE_0DAD89:
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_0DADDC
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	REP.b #$10
	LDA.b $0C
	AND.w #$00FE
	TAX
	LDA.l FXDATA_0BBA12,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEP.b #$10
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $7C18,x
	STA.b $0E
	LDA.b $06
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	JSR.w CODE_0DAE9C
	LDA.w $60FC
	AND.w #$001F
	BEQ.b CODE_0DADDC
	AND.w #$0018
	DEC
	EOR.w $6000
	BPL.b CODE_0DADDC
	STZ.w $6000
CODE_0DADDC:
	LDA.w $603E
	BPL.b CODE_0DADE5
	EOR.w #$FFFF
	INC
CODE_0DADE5:
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C18,x
	CMP.b $00
	BCS.b CODE_0DAE3B
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	REP.b #$10
	LDA.w #$0080
	SEC
	SBC.b $0C
	AND.w #$00FE
	TAX
	LDA.l FXDATA_0BBA12,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEP.b #$10
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $7C16,x
	STA.b $0E
	LDA.b $06
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	JSR.w CODE_0DAEDB
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_0DAE3B
	AND.w #$0180
	EOR.w $6002
	BPL.b CODE_0DAE3B
	STZ.w $6002
CODE_0DAE3B:
	LDY.w $6004
	BNE.b CODE_0DAE41
	RTS

CODE_0DAE41:
	LDA.w $6000
	BPL.b CODE_0DAE4A
	EOR.w #$FFFF
	INC
CODE_0DAE4A:
	STA.b $00
	LDA.w $6002
	BPL.b CODE_0DAE55
	EOR.w #$FFFF
	INC
CODE_0DAE55:
	CMP.b $00
	BPL.b CODE_0DAE75
	LDA.w $6000
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDY.w $6001
	BPL.b CODE_0DAE6D
	INC.w $61B4
	BRA.b CODE_0DAE7F

CODE_0DAE6D:
	STZ.w $60AA
	STZ.w $60D2
	BRA.b CODE_0DAE7F

CODE_0DAE75:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $6002
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_0DAE7F:
	LDA.b $06
	LDY.b $0D
	BEQ.b CODE_0DAE8F
	CMP.b $02
	BMI.b CODE_0DAE9B
	CMP.b $04
	BPL.b CODE_0DAE9B
	BRA.b CODE_0DAE97

CODE_0DAE8F:
	CMP.b $02
	BMI.b CODE_0DAE97
	CMP.b $04
	BMI.b CODE_0DAE9B
CODE_0DAE97:
	JSL.l CODE_03A858
CODE_0DAE9B:
	RTS

CODE_0DAE9C:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.b $0C
	BMI.b CODE_0DAEAD
	CMP.b $02
	BMI.b CODE_0DAEC6
	CMP.b $04
	BPL.b CODE_0DAEC6
	BRA.b CODE_0DAEB5

CODE_0DAEAD:
	CMP.b $02
	BMI.b CODE_0DAEB5
	CMP.b $04
	BMI.b CODE_0DAEC6
CODE_0DAEB5:
	LDA.b $0E
	SEC
	SBC.b $0A
	CMP.w #$0008
	BCS.b CODE_0DAEDA
	STA.w $6000
	INC.w $6004
	RTS

CODE_0DAEC6:
	LDA.b $0E
	SEC
	SBC.w $6112
	CLC
	ADC.b $0A
	CMP.w #$FFF8
	BCC.b CODE_0DAEDA
	STA.w $6000
	INC.w $6004
CODE_0DAEDA:
	RTS

CODE_0DAEDB:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.b $0C
	BMI.b CODE_0DAEEC
	CMP.b $02
	BMI.b CODE_0DAF05
	CMP.b $04
	BPL.b CODE_0DAF05
	BRA.b CODE_0DAEF4

CODE_0DAEEC:
	CMP.b $02
	BMI.b CODE_0DAF05
	CMP.b $04
	BPL.b CODE_0DAF05
CODE_0DAEF4:
	LDA.b $0E
	SEC
	SBC.b $08
	CMP.w #$0008
	BCS.b CODE_0DAF15
	STA.w $6002
	INC.w $6004
	RTS

CODE_0DAF05:
	LDA.b $0E
	CLC
	ADC.b $08
	CMP.w #$FFF8
	BCC.b CODE_0DAF15
	STA.w $6002
	INC.w $6004
CODE_0DAF15:
	RTS

CODE_0DAF16:
	LDA.w $7A98,x
	BNE.b CODE_0DAF23
	LDA.w $7A38,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0DAF4B
CODE_0DAF23:
	LDA.w $7BB6,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7BB8,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0038
	STA.w $7BB6,x
	LDA.w #$0007
	STA.w $7BB8,x
	JSL.l CODE_03D291
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7BB6,x
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7BB8,x
CODE_0DAF4B:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr077_CounterclockwisePiroDangle_Init:
;$0DAF4C
	LDY.b #$0A
	STY.b $79,x
YI_NorSpr076_ClockwisePiroDangle_Init:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	XBA
	STA.w $7A36,x
	STZ.w $7400,x
	LDA.w #$0040
	STA.w $7542,x
	LDY.b #$04
	STY.b $76,x
	RTL

;---------------------------------------------------------------------------

DATA_0DAF68:
	dw CODE_0DB02D
	dw CODE_0DB040
	dw CODE_0DB062
	dw CODE_0DB09C
	dw CODE_0DB102
	dw CODE_0DB02D
	dw CODE_0DB040
	dw CODE_0DB062
	dw CODE_0DB09C

DATA_0DAF7A:
	db $00,$80,$40,$C0

YI_NorSpr076_ClockwisePiroDangle_Main:
YI_NorSpr077_CounterclockwisePiroDangle_Main:
;$0DAF7E
	LDA.w $7D96,x
	BNE.b CODE_0DAF86
	JSR.w CODE_0DB20B
CODE_0DAF86:
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0010
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0DAFC9
	LDA.w #$FFF8
	CLC
	ADC.w $7680,x
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.w #$0010
	STA.w $6008,y
	STA.w $6018,y
	LDA.w #$FFF8
	CLC
	ADC.w $7682,x
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
	JSL.l CODE_03AA60
	BRA.b CODE_0DAFE9

CODE_0DAFC9:
	PHX
	LDA.b $78,x
	AND.w #$00FF
	TAX
	SEP.b #$20
	LDA.w $6005,y
	ORA.w DATA_0DAF7A,x
	STA.w $6005,y
	STA.w $600D,y
	STA.w $6015,y
	STA.w $601D,y
	REP.b #$20
	PLX
	SEP.b #$10
CODE_0DAFE9:
	JSL.l CODE_03AF23
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0DAFF6
	JSL.l CODE_03A5B7
CODE_0DAFF6:
	TXY
	LDA.b $76,x
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_0DAF68,x)
	LDA.w $7A96,x
	BNE.b CODE_0DB02C
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w $7A38,x
	CLC
	ADC.w #$0080
	AND.w #$01FE
	STA.w $7A38,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
	LDA.b $78,x
	INC
	AND.w #$0003
	TAY
	STY.b $78,x
CODE_0DB02C:
	RTL

CODE_0DB02D:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DB03F
	JSL.l CODE_03AD74
	BCC.b CODE_0DB03F
	LDY.b #$04
	STY.b $16,x
	INC.b $76,x
CODE_0DB03F:
	RTS

CODE_0DB040:
	TYX
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7A36,x
	INC
	INC
	CMP.w #$0124
	BMI.b CODE_0DB057
	LDY.b #$00
	STY.b $18,x
	INC.b $76,x
	LDA.w #$00E0
CODE_0DB057:
	STA.w $7A36,x
	JSR.w CODE_0DB24B
	RTS

DATA_0DB05E:
	dw $0002,$FFFE

CODE_0DB062:
	TYX
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b $18,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0DB05E,y
	CMP.w #$0124
	BPL.b CODE_0DB086
	DEC.b $16,x
	BNE.b CODE_0DB07A
	INC.b $76,x
CODE_0DB07A:
	LDA.b $18,x
	EOR.w #$0002
	STA.b $18,x
	LDA.w #$0124
	BRA.b CODE_0DB095

CODE_0DB086:
	CMP.w #$01FF
	BMI.b CODE_0DB095
	LDA.b $18,x
	EOR.w #$0002
	STA.b $18,x
	LDA.w #$01FF
CODE_0DB095:
	STA.w $7A36,x
	JSR.w CODE_0DB24B
	RTS

CODE_0DB09C:
	TYX
	LDA.w $7A36,x
	DEC
	DEC
	CMP.w #$0100
	BPL.b CODE_0DB0C9
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b $76,x
	CPY.b #$05
	PHP
	LDY.b #$00
	PLP
	BMI.b CODE_0DB0B9
	LDY.b #$05
CODE_0DB0B9:
	STY.b $76,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7A36,x
	JSL.l CODE_03AEFD
	RTS

CODE_0DB0C9:
	STA.w $7A36,x
	JSR.w CODE_0DB24B
	RTS

UNK_0DB0D0:
	db $04

DATA_0DB0D1:
	db $02,$00,$00,$00,$08,$00,$04,$00,$00,$08,$02,$04,$02,$00,$00,$00
	db $08

DATA_0DB0E2:
	dw $FF00,$0100,$FF00,$0100

DATA_0DB0EA:
	dw $0100,$FF00,$FF00,$0100

DATA_0DB0F2:
	dw $0008,$0008,$0000,$0000

DATA_0DB0FA:
	dw $0040,$0140,$01C0,$00C0

CODE_0DB102:
	TYX
	LDA.w $6FA2,x
	AND.w #$FFE0
	ORA.w #$000B
	STA.w $6FA2,x
	LDY.w $7860,x
	BEQ.b CODE_0DB117
	JMP.w CODE_0DB198

CODE_0DB117:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0004
	BNE.b CODE_0DB13F
	RTS

CODE_0DB13F:
	LDY.b #$00
	LDA.w $70E2,x
	AND.w #$0010
	BNE.b CODE_0DB14B
	LDY.b #$04
CODE_0DB14B:
	LDA.b $79,x
	AND.w #$00FF
	BNE.b CODE_0DB154
	INY
	INY
CODE_0DB154:
	LDA.w DATA_0DB0E2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_0DB0EA,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_0DB0F2,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0DB0FA,y
	STA.b $0C
	LDA.w #$000B
	STA.b $77,x
	LDA.w $7182,x
	AND.w #$FFF0
	INC
	STA.w $7182,x
	SEP.b #$20
	STZ.w $70E1,x
	STZ.w $7181,x
	LDA.b #$FF
	LDY.w $7221,x
	BPL.b CODE_0DB18C
	STA.w $70E1,x
CODE_0DB18C:
	LDY.w $7223,x
	BPL.b CODE_0DB194
	STA.w $7181,x
CODE_0DB194:
	REP.b #$20
	BRA.b CODE_0DB1C6

CODE_0DB198:
	LDA.b $79,x
	AND.w #$00FF
	BEQ.b CODE_0DB1A7
	PHA
	TYA
	CLC
	ADC.w #$0006
	TAY
	PLA
CODE_0DB1A7:
	CLC
	ADC.w DATA_0DB0D1,y
	AND.w #$00FF
	LSR
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_0AE625>>16
	LDA.w #FXCODE_0AE625
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $6018
	STA.b $0C
CODE_0DB1C6:
	STZ.w $7542,x
	INC.b $19,x
	INC.b $16,x
	INC.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr03A_3MiniRavens
	BEQ.b CODE_0DB1DC
	CMP.w #!Define_YI_NorSpr03B_MiniRaven
	BNE.b CODE_0DB1E3
CODE_0DB1DC:
	LDA.b $0C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_0DB20A

CODE_0DB1E3:
	CMP.w #!Define_YI_NorSpr06D_ClockwiseHootieTheBlueFish
	BEQ.b CODE_0DB1ED
	CMP.w #!Define_YI_NorSpr06E_CounterclockwiseHootieTheBlueFish
	BNE.b CODE_0DB1F6
CODE_0DB1ED:
	LDA.b $0C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	JSR.w CODE_0DB47F
	RTS

CODE_0DB1F6:
	LDA.w $7722,x
	BMI.b CODE_0DB200
	LDY.b #$03
	STY.b $76,x
	RTS

CODE_0DB200:
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #$00
	STY.b $76,x
CODE_0DB20A:
	RTS

CODE_0DB20B:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0DB24A
	LDY.b $19,x
	BEQ.b CODE_0DB24A
	LDY.b $77,x
	TYA
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDY.b $79,x
	TYA
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LSR
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.b $0C
	STA.w $6018
	LDX.b #FXCODE_0AE602>>16
	LDA.w #FXCODE_0AE602
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w $6018
	STA.b $0C
CODE_0DB24A:
	RTS

CODE_0DB24B:
	LDA.w #FXDATA_540000+$6030
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$6030)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	STZ.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0600
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $6120
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $6122
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D69F>>16
	LDA.w #FXCODE_08D69F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_0DB2AE
	INC.w $0CF9
CODE_0DB2AE:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	CLC
	ADC.w $6024
	CMP.w $6026
	BCS.b CODE_0DB2E8
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611E
	CLC
	ADC.w $6028
	CMP.w $602A
	BCS.b CODE_0DB2E8
	LDA.w $61D6
	BNE.b CODE_0DB2E8
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	JSL.l CODE_03A858
CODE_0DB2E8:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_Init:
;$0DB2E9
	LDY.b #$0A
	STY.b $79,x
	BRA.b CODE_0DB2F5

YI_NorSpr06D_ClockwiseHootieTheBlueFish_Init:
;$0DB2EF
	LDA.w #$0100
	STA.w $7A38,x
CODE_0DB2F5:
	JSL.l CODE_03AE60
	INC.b $18,x
	LDA.w #$0080
	STA.w $7A36,x
	STZ.w $7400,x
	JSR.w CODE_0DB43E
	RTL

;---------------------------------------------------------------------------

DATA_0DB308:
	dw CODE_0DB102
	dw CODE_0DB4BD
	dw CODE_0DB504
	dw CODE_0DB5E1
	dw CODE_0DB764
	dw CODE_0DB58D
	dw CODE_0DB7C4

YI_NorSpr06D_ClockwiseHootieTheBlueFish_Main:
YI_NorSpr06E_CounterclockwiseHootieTheBlueFish_Main:
;$0DB316
	LDY.b $76,x
	CPY.b #$06
	BEQ.b CODE_0DB336
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0012
	BEQ.b CODE_0DB336
	LDA.w $7D96,x
	BNE.b CODE_0DB336
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $0C
	JSR.w CODE_0DB20B
	LDA.b $0C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0DB336:
	LDY.b $76,x
	CPY.b #$06
	BNE.b CODE_0DB342
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0DB342:
	JSR.w CODE_0DB3B9
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_0DB352
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0DB35D
	BRA.b CODE_0DB35A

CODE_0DB352:
	CPY.b #$03
	BMI.b CODE_0DB35D
	CPY.b #$06
	BPL.b CODE_0DB35D
CODE_0DB35A:
	STZ.w $611A
CODE_0DB35D:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DB308,x)
	JSR.w CODE_0DB43E
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0DB3B8
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0DB3B8
	LDA.w $7D38,y
	BEQ.b CODE_0DB3B8
	TYX
	JSL.l CODE_03B25B
	LDY.b $76,x
	CPY.b #$06
	BEQ.b CODE_0DB3B8
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A38,x
	STA.b $16,x
	INC
	INC
	AND.w #$01FE
	STA.w $7A38,x
	LDY.b #$06
	STY.b $76,x
	LDY.b #$00
	STY.b $19,x
	LDY.b $79,x
	TYA
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LSR
	TAY
	LDA.w DATA_0DB7FC,y
	SEP.b #$20
	STA.w $7A37,x
	REP.b #$20
CODE_0DB3B8:
	RTL

CODE_0DB3B9:
	JSL.l CODE_03AA52
	LDA.w #$FFF8
	LDY.b $79,x
	BEQ.b CODE_0DB3C7
	LDA.w #$0008
CODE_0DB3C7:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	LDY.b $76,x
	CPY.b #$06
	BNE.b CODE_0DB3D5
	LDA.b $16,x
CODE_0DB3D5:
	CLC
	ADC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDY.w $7362,x
	LDA.w $6000,y
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $6000,y
	STA.w $6010,y
	LDA.w $6008,y
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $6002,y
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $6002,y
	STA.w $600A,y
	LDA.w $6012,y
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $6012,y
	STA.w $601A,y
	SEP.b #$10
	LDA.w #$0008
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7B56,x
	LDA.w #$0008
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7B58,x
	RTS

DATA_0DB43A:
	dw FXDATA_540000+$4041,FXDATA_540000+$4061

CODE_0DB43E:
	LDY.b $76,x
	CPY.b #$02
	BPL.b CODE_0DB47F
	LDA.w $7A38,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0DB45B
	LDY.b $18,x
	STY.b $00
	LDY.b $78,x
	CPY.b $00
	BEQ.b CODE_0DB4BC
	STY.b $18,x
	BRA.b CODE_0DB47F

CODE_0DB45B:
	PHP
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_0DB46A
	PLP
	BPL.b CODE_0DB46D
	BRA.b CODE_0DB472

CODE_0DB46A:
	PLP
	BPL.b CODE_0DB472
CODE_0DB46D:
	LDA.w #$0004
	BRA.b CODE_0DB475

CODE_0DB472:
	LDA.w #$FFFC
CODE_0DB475:
	CLC
	ADC.w $7A38,x
	AND.w #$01FE
	STA.w $7A38,x
CODE_0DB47F:
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.b $78,x
	LDA.w DATA_0DB43A,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$4041)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7A36,x
	TYA
	ASL
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0DB4BC:
	RTS

CODE_0DB4BD:
	TYX
	LDA.w $7A96,x
	ORA.w $7A98,x
	BNE.b CODE_0DB501
	LDA.w #$0008
	STA.w $7A98,x
	LDA.b $78,x
	EOR.w #$0002
	STA.b $78,x
	DEC.b $16,x
	BPL.b CODE_0DB501
	LDA.w $7C16,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0DB4F6
	LDA.w $7C18,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0DB4F6
	LDA.w #$0001
	STA.b $16,x
	BRA.b CODE_0DB501

CODE_0DB4F6:
	LDA.w #$0007
	STA.b $16,x
	LDA.w #$0040
	STA.w $7A96,x
CODE_0DB501:
	JMP.w CODE_0DB806

CODE_0DB504:
	TYX
	STX.w $61B6
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.b $02
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PHA
	XBA
	AND.w #$00FF
	TAY
	BPL.b CODE_0DB528
	ORA.w #$FF00
CODE_0DB528:
	STA.b $04
	PLA
	AND.w #$00FF
	TAY
	BPL.b CODE_0DB534
	ORA.w #$FF00
CODE_0DB534:
	STA.b $06
	JSL.l CODE_049B42
	PHA
	LDY.b $04
	TYA
	XBA
	STA.b $04
	LDY.b $06
	TYA
	ORA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.b $08
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.b $0A
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	PLA
	BNE.b CODE_0DB584
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.b #$05
	STY.b $76,x
	LDA.w #$0020
	STA.b $16,x
	STZ.w $611A
	LDY.w $7E48
	BMI.b CODE_0DB580
	STA.w $74A2,y
	DEC.b $76,x
	DEC.b $76,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $16,x
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
CODE_0DB580:
	LDY.b #$00
	STY.b $78,x
CODE_0DB584:
	RTS

DATA_0DB585:
	dw $0004,$FFFC

DATA_0DB589:
	dw $0088,$0080

CODE_0DB58D:
	TYX
	LDA.w $7042,x
	AND.w #$FFE0
	ORA.w #$0022
	STA.w $7042,x
	LDY.w $7A36,x
	BPL.b CODE_0DB5EF
	LDA.w $7042,x
	AND.w #$FFE0
	ORA.w #$0024
	STA.w $7042,x
	LDA.w $0035
	AND.w #$CFF0
	CMP.w $0D98
	BEQ.b CODE_0DB5EF
	STA.w $0D98
	CMP.w #$0000
	BEQ.b CODE_0DB5EF
	LDA.b $16,x
	CMP.w #$0005
	BMI.b CODE_0DB5EF
	SEC
	SBC.w #$0010
	CMP.w #$0004
	BPL.b CODE_0DB5D1
	LDA.w #$0004
CODE_0DB5D1:
	AND.w #$FFFC
	STA.b $16,x
	SEP.b #$20
	LDA.b #$60
	STA.w $7A36,x
	REP.b #$20
	BRA.b CODE_0DB5EF

CODE_0DB5E1:
	TYX
	LDY.w $7E48
	CPY.b #$00
	BMI.b CODE_0DB5EF
	LDA.w #$FF00
	STA.w $74A2,y
CODE_0DB5EF:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_0DB584
	LDA.b $16,x
	AND.w #$0002
	TAY
	LDA.w $7A36,x
	AND.w #$00FF
	CLC
	ADC.w DATA_0DB585,y
	CMP.w DATA_0DB589,y
	BEQ.b CODE_0DB616
	JMP.w CODE_0DB75C

CODE_0DB616:
	DEC.b $16,x
	DEC.b $16,x
	BEQ.b CODE_0DB61F
	JMP.w CODE_0DB759

CODE_0DB61F:
	PHY
	LDY.b $76,x
	CPY.b #$05
	BNE.b CODE_0DB629
	JMP.w CODE_0DB6DF

CODE_0DB629:
	LDA.w #$FC00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $7E48
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.w $70E2,y
	LDA.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.w $7182,y
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	CPY.b #$00
	BNE.b CODE_0DB6C0
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$00C0
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$0010
	STA.w $7AF8
	LDA.w $61B2
	AND.w #$0FFF
	STA.w $61B2
	PHY
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	PLY
CODE_0DB6C0:
	STZ.w $0390
	PHX
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	ASL
	TAX
	LDA.l FXDATA_0A9F1A,x
	AND.w #$00FF
	STA.w $74A2,y
	PLX
	LDA.w #$FFFF
	STA.w $7E48
	STA.w $0D96
	BRA.b CODE_0DB743

CODE_0DB6DF:
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$FC00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $60A8
	STA.w $60B4
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	LDA.w $7CD6,x
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7CD8,x
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $61B6
	STZ.w $0D94
	LDA.w #$0060
	STA.w $7AF8,x
	LDA.w #$004B
	STA.w $6FA2,x
	LDA.w #$2155
	STA.w $7040,x
CODE_0DB743:
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $7A96,x
	LDY.b #$02
	STY.b $78,x
	LDY.b #$04
	STY.b $76,x
	PLY
CODE_0DB759:
	LDA.w DATA_0DB589,y
CODE_0DB75C:
	SEP.b #$20
	STA.w $7A36,x
	REP.b #$20
	RTS

CODE_0DB764:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0DB7C3
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0DB7B3
	STY.b $78,x
CODE_0DB771:
	LDA.w #$004B
	STA.w $6FA2,x
	LDY.b #$01
	STY.b $76,x
	STY.b $16,x
	LDY.w $7A37,x
	TYA
	LSR
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDY.b $77,x
	BEQ.b CODE_0DB798
	LDX.b #FXCODE_0AE81B>>16
	LDA.w #FXCODE_0AE81B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0DB7A1

CODE_0DB798:
	LDX.b #FXCODE_0AE625>>16
	LDA.w #FXCODE_0AE625
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0DB7A1:
	LDX.b $12
	LDA.w $6018
	STA.b $0C
	LDA.b $0C
	STA.w $7A38,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $19,x
	RTS

CODE_0DB7B3:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.b $16,x
	LDY.b #$00
	STY.b $78,x
	LDY.b #$05
	STY.b $76,x
CODE_0DB7C3:
	RTS

CODE_0DB7C4:
	TYX
	LDA.w $7A38,x
	SEC
	SBC.b $16,x
	AND.w #$01FE
	CMP.w #$01F8
	BCC.b CODE_0DB7EE
	LDA.b $16,x
	STA.w $7A38,x
	STZ.b $16,x
	LDA.w $70E2,x
	PHA
	LDA.w $7182,x
	PHA
	JSR.w CODE_0DB771
	PLA
	STA.w $7182,x
	PLA
	STA.w $70E2,x
	RTS

CODE_0DB7EE:
	LDA.w $7A38,x
	CLC
	ADC.w #$0008
	AND.w #$01FE
	STA.w $7A38,x
CODE_0DB7FB:
	RTS

DATA_0DB7FC:
	db $04,$08,$02,$00,$00,$12,$0E,$0A,$00,$0C

CODE_0DB806:
	LDA.w !RAM_YI_Level_FreeMovementFlag
	ORA.w $7AF8,x
	BNE.b CODE_0DB7FB
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$FFF4
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $6120
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCC.b CODE_0DB839
CODE_0DB838:
	RTS

CODE_0DB839:
	LDA.w $6122
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	CLC
	ADC.w $7C18,x
	CMP.b $00
	BCS.b CODE_0DB838
	LDA.w $0D94
	BNE.b CODE_0DB8C1
	LDY.b #$00
	STY.b $19,x
	LDY.b $79,x
	TYA
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LSR
	TAY
	LDA.w DATA_0DB7FC,y
	SEP.b #$20
	STA.w $7A37,x
	REP.b #$20
	JSL.l CODE_03BFF7
	INC.w $0D94
	LDY.w $7E48
	BMI.b CODE_0DB878
	TYA
	STA.w $0D96
CODE_0DB878:
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	AND.w #$00FF
	XBA
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	AND.w #$00FF
	ORA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $60D4
	JSL.l CODE_04F74A
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0021
	STA.w $60BE
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$404B
	STA.w $6FA2,x
	LDA.w #$2105
	STA.w $7040,x
	LDY.b #$02
	STY.b $78,x
	INC.b $76,x
	PLA
	RTL

CODE_0DB8C1:
	RTS

;---------------------------------------------------------------------------

DATA_0DB8C2:
	dw $0A00,$0000

DATA_0DB8C6:
	dw $0050,$0030

YI_NorSpr03A_3MiniRavens_Init:
YI_NorSpr03B_MiniRaven_Init:
;$0DB8CA
	LDA.w $7AF6,x
	BNE.b CODE_0DB913
	LDY.w $7400,x
	LDA.w DATA_0DB8C2,y
	STA.b $78,x
	STZ.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr03A_3MiniRavens
	BNE.b CODE_0DB913
	LDA.w #$0002
	STA.b $02
CODE_0DB8E7:
	LDY.b $02
	LDA.w DATA_0DB8C6,y
	STA.b $00
	LDA.w #$003A
	JSL.l CODE_03A34C
	BCC.b CODE_0DB913
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $78,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $7AF6,y
	DEC.b $02
	DEC.b $02
	BPL.b CODE_0DB8E7
CODE_0DB913:
	RTL

;---------------------------------------------------------------------------

DATA_0DB914:
	dw CODE_0DB102
	dw CODE_0D8000

YI_NorSpr03A_3MiniRavens_Main:
YI_NorSpr03B_MiniRaven_Main:
;$0DB918
	LDA.w $7362,x
	BMI.b CODE_0DB988
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0012
	BEQ.b CODE_0DB959
	LDA.w $7D96,x
	BNE.b CODE_0DB959
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $0C
	JSR.w CODE_0DB20B
	LDA.b $0C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7AF6,x
	BEQ.b CODE_0DB959
	LDA.w $7860,x
	BNE.b CODE_0DB945
	LDY.b $77,x
	BEQ.b CODE_0DB959
CODE_0DB945:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
CODE_0DB959:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DB914,x)
	JSR.w CODE_0DB9CA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0DB989
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0DB989
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0DB984
	JML.l CODE_0DC0F0

CODE_0DB984:
	JSL.l CODE_03A5B7
CODE_0DB988:
	RTL

CODE_0DB989:
	CMP.w #$0059
	BNE.b CODE_0DB991
	LDA.w #$0100
CODE_0DB991:
	CMP.w #$FFA7
	BNE.b CODE_0DB999
	LDA.w #$FF00
CODE_0DB999:
	CMP.w #$003E
	BNE.b CODE_0DB9A1
	LDA.w #$00B5
CODE_0DB9A1:
	CMP.w #$FFC2
	BNE.b CODE_0DB9A9
	LDA.w #$FF4B
CODE_0DB9A9:
	RTS

DATA_0DB9AA:
	db $00,$04,$02,$06,$00,$04,$02,$06,$00,$06,$02,$04,$00,$06,$02,$04

DATA_0DB9BA:
	db $A0,$A0,$60,$60,$60,$60,$A0,$A0,$20,$20,$20,$E0,$E0,$E0,$E0,$20

CODE_0DB9CA:
	LDA.w $7A98,x
	BNE.b CODE_0DB9DC
	LDA.w #$0003
	STA.w $7A98,x
	LDA.b $78,x
	EOR.w #$0001
	STA.b $78,x
CODE_0DB9DC:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w $7A38,x
	BEQ.b CODE_0DBA05
	STA.w $7A38,x
	ASL
	ASL
	XBA
	LDY.b $79,x
	BEQ.b CODE_0DB9F2
	CLC
	ADC.w #$0008
CODE_0DB9F2:
	TAY
	SEP.b #$20
	LDA.w DATA_0DB9BA,y
	STA.w $7042,x
	LDA.w DATA_0DB9AA,y
	AND.b #$FF
	STA.w $7A36,x
	REP.b #$20
CODE_0DBA05:
	LDA.b $78,x
	AND.w #$00FF
	ORA.w $7A36,x
	STA.w $7402,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr180_SpinningLog_Init:
;$0DBA11
	JSL.l CODE_03AE60
	STZ.w $7400,x
	JSR.w CODE_0DBA3D
	LDA.w #$000C
	STA.w $7BB6,x
	RTL

;---------------------------------------------------------------------------

DATA_0DBA22:
	dw CODE_0DBB1F
	dw CODE_0DBB2E

YI_NorSpr180_SpinningLog_Main:
;$0DBA26
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DBA22,x)
	JSR.w CODE_0DBA7D
	JSR.w CODE_0DBA3D
	RTL

CODE_0DBA3D:
	LDY.b $78,x
	BNE.b CODE_0DBA7C
	INC.b $78,x
	LDA.w #FXDATA_540000+$4060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$4060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7A38,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0DBA7C:
	RTS

CODE_0DBA7D:
	LDY.b $76,x
	BNE.b CODE_0DBA86
	JSL.l CODE_03D127
CODE_0DBA85:
	RTS

CODE_0DBA86:
	LDA.w $7C16,x
	CLC
	ADC.w #$001A
	CMP.w #$0034
	BCS.b CODE_0DBA85
	LDA.w $7C18,x
	CLC
	ADC.w #$0013
	CMP.w #$0026
	BCS.b CODE_0DBA85
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $00
	CLC
	ADC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0400
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_0DBAE6
	AND.w #$0180
	DEC
	EOR.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BPL.b CODE_0DBAEF
CODE_0DBAE6:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $60A8
	STA.w $60B4
CODE_0DBAEF:
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	INC
	STA.b $00
	LDA.w $60FC
	AND.w #$001F
	BEQ.b CODE_0DBB08
	AND.w #$0018
	DEC
	EOR.b $00
	BMI.b CODE_0DBB1E
CODE_0DBB08:
	LDA.b $00
	BPL.b CODE_0DBB1B
	PHA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	PLA
	ASL
CODE_0DBB1B:
	STA.w $60AA
CODE_0DBB1E:
	RTS

CODE_0DBB1F:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0DBB2D
	LDA.w #$0080
	STA.w $7A96,x
	INC.b $76,x
CODE_0DBB2D:
	RTS

CODE_0DBB2E:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0DBB45
	LDA.w $7A38,x
	AND.w #$007F
	BNE.b CODE_0DBB45
	DEC.b $76,x
	LDA.w #$0080
	STA.w $7A96,x
	RTS

CODE_0DBB45:
	LDA.w $7A38,x
	CLC
	ADC.w #$0010
	STA.w $7A38,x
	STZ.b $78,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0DA_FlowerPot_Init:
;$0DBB52
	LDA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03D400
	BEQ.b CODE_0DBB68
	INC.b $79,x
CODE_0DBB68:
	STZ.w $7400,x
	LDA.w #$0004
	STA.w $7B58,x
	ASL
	STA.w $7BB6,x
	LDA.w #$000C
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

DATA_0DBB7C:
	dw CODE_0D8000
	dw CODE_0DBD11

YI_NorSpr0DA_FlowerPot_Main:
;$0DBB80
	JSL.l CODE_03AF23
	LDY.b $78,x
	BNE.b CODE_0DBB8B
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0DBB8B:
	STZ.w $7400,x
	JSR.w CODE_0DBC65
	JSR.w CODE_0DBBB1
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DBB7C,x)
	LDY.b $18,x
	BEQ.b CODE_0DBBB0
	LDY.w $7223,x
	BPL.b CODE_0DBBB0
	LDA.w $60FC
	AND.w #$0018
	BEQ.b CODE_0DBBB0
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0DBBB0:
	RTL

CODE_0DBBB1:
	LDY.b $76,x
	BNE.b CODE_0DBBC4
	LDY.w $7D36,x
	BPL.b CODE_0DBBBE
	JSR.w CODE_0DBC1B
	RTS

CODE_0DBBBE:
	DEY
	BMI.b CODE_0DBBC4
	JSR.w CODE_0DBBD1
CODE_0DBBC4:
	LDY.b #$00
	STY.b $18,x
	RTS

DATA_0DBBC9:
	dw $FFC0,$0040,$FF80,$0080

CODE_0DBBD1:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0DBC12
	LDA.w $7D38,y
	BEQ.b CODE_0DBC12
	LDA.w $7542,y
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.b $02
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	TYX
	JSL.l CODE_03B25B
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$00
	LDA.b $00
	BNE.b CODE_0DBC02
	LDY.b #$04
CODE_0DBC02:
	LDA.b $02
	BMI.b CODE_0DBC08
	INY
	INY
CODE_0DBC08:
	LDA.w DATA_0DBBC9,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$01
	STY.b $78,x
CODE_0DBC12:
	RTS

DATA_0DBC13:
	dw $0040,$FFC0,$0018,$001C

CODE_0DBC1B:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	STA.b $04
	LDY.b $18,x
	BEQ.b CODE_0DBC47
	LDY.w $60AB
	BMI.b CODE_0DBC42
CODE_0DBC31:
	INC.w $61B4
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.b $04
	CLC
	ADC.w #$0002
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	RTS

CODE_0DBC42:
	LDY.b #$00
	STY.b $18,x
	RTS

CODE_0DBC47:
	CMP.w #$FFF8
	BCC.b CODE_0DBC5D
	LDY.w $60C0
	BEQ.b CODE_0DBC60
	LDY.w $60AB
	BMI.b CODE_0DBC60
	INC.b $18,x
	STZ.w $60AA
	BRA.b CODE_0DBC31

CODE_0DBC5D:
	JSR.w CODE_0D9037
CODE_0DBC60:
	RTS

DATA_0DBC61:
	dw $FE00,$FF00

CODE_0DBC65:
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0DBC7A
	LDY.w $7A36,x
	BEQ.b CODE_0DBC79
	LDY.b $78,x
	BNE.b CODE_0DBC79
	INY
	STY.b $19,x
CODE_0DBC79:
	RTS

CODE_0DBC7A:
	STA.w $7A36,x
	LDY.b $78,x
	BEQ.b CODE_0DBCA8
	LDA.w $7182,x
	SEC
	SBC.w $7A38,x
	CMP.w #$0010
	BMI.b CODE_0DBC93
	LDY.b #$00
	STY.b $78,x
	BRA.b CODE_0DBCB3

CODE_0DBC93:
	CPY.b #$03
	BPL.b CODE_0DBCA3
	TYA
	ASL
	TAY
	LDA.w DATA_0DBC61-$02,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $78,x
	RTS

CODE_0DBCA3:
	LDY.b #$00
	STY.b $78,x
	RTS

CODE_0DBCA8:
	LDY.b $19,x
	BNE.b CODE_0DBCB3
	LDA.w $7182,x
	STA.w $7A38,x
	RTS

CODE_0DBCB3:
	LDY.b $76,x
	BNE.b CODE_0DBC79
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	LDA.w #$0002
	STA.w $7A98,x
	STZ.b $16,x
	LDA.w #!Define_YI_SoundID66_PotBreaking
	JSL.l CODE_0085D2
	INC.b $76,x
	LDY.b $79,x
	BNE.b CODE_0DBC79
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$0010
	BEQ.b CODE_0DBCE0
	INY
CODE_0DBCE0:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0010
	BEQ.b CODE_0DBCEA
	INY
	INY
CODE_0DBCEA:
	CPY.b #$03
	BEQ.b CODE_0DBD10
	CPY.b #$02
	BNE.b CODE_0DBCF8
	JSL.l CODE_0D92EE
	BRA.b CODE_0DBD00

CODE_0DBCF8:
	CPY.b #$01
	BNE.b CODE_0DBD0D
	JSL.l CODE_0D9329
CODE_0DBD00:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03D3F3
	RTS

CODE_0DBD0D:
	JSR.w CODE_0D9383
CODE_0DBD10:
	RTS

CODE_0DBD11:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DBD10
	LDA.w #$0004
	STA.w $7A98,x
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$06
	BMI.b CODE_0DBD10
	LDY.b $16,x
	BNE.b CODE_0DBD2D
	INC.b $16,x
CODE_0DBD2D:
	DEC.w $7402,x
	JSL.l CODE_03A2C7
	BCC.b CODE_0DBD3A
	JSL.l CODE_03A32E
CODE_0DBD3A:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr11C_LakituCloud_Init:
;$0DBD3B
	LDA.w #$0360
	STA.w $7A96,x
	LDA.w #$03C0
	STA.w $7AF6,x
	RTL

;---------------------------------------------------------------------------

DATA_0DBD48:
	dw $0008,$00E8,$0010,$FFF0

YI_NorSpr11C_LakituCloud_Main:
;$0DBD50
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0DBD61
	CPX.w $61B6
	BEQ.b CODE_0DBD69
	LDY.w $77C2,x
	BRA.b CODE_0DBD65

CODE_0DBD61:
	BMI.b CODE_0DBD65
	INY
	INY
CODE_0DBD65:
	TYA
	STA.w $7400,x
CODE_0DBD69:
	LDY.w $7D38,x
	BEQ.b CODE_0DBD73
	JSL.l CODE_03A2F8
	RTL

CODE_0DBD73:
	CPX.w $61B6
	BEQ.b CODE_0DBD7B
	JMP.w CODE_0DBDE9

CODE_0DBD7B:
	LDA.w $7680,x
	SEC
	SBC.w #$0080
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0DBD8D
	EOR.b $00
	BMI.b CODE_0DBDAF
CODE_0DBD8D:
	LDA.w $7680,x
	CMP.w #$00F0
	BCC.b CODE_0DBDAF
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
CODE_0DBDAF:
	LDA.w $7682,x
	SEC
	SBC.w #$0080
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0DBDC1
	EOR.b $00
	BMI.b CODE_0DBDF3
CODE_0DBDC1:
	LDA.w $7682,x
	SEC
	SBC.w #$0020
	CMP.w #$00B0
	BCC.b CODE_0DBDF3
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	LDA.w $7C18,x
	SEC
	SBC.w $72C2,x
	STA.w $7C18,x
	BRA.b CODE_0DBDF3

CODE_0DBDE9:
	JSL.l CODE_03A2C7
	BCC.b CODE_0DBDF3
	JML.l CODE_03A31E

CODE_0DBDF3:
	LDA.w $0C1C
	BEQ.b CODE_0DBE53
	CPX.w $61B6
	BNE.b CODE_0DBE53
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w $6094
	SEC
	SBC.w #$0008
	BMI.b CODE_0DBE14
	INY
	INY
	SEC
	SBC.w #$00E0
	BMI.b CODE_0DBE53
CODE_0DBE14:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0DBE22
	SEC
	SBC.w $7E28
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0DBE53
CODE_0DBE22:
	LDA.w $7E28
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
	STZ.w $72C0,x
	LDA.w $6094
	CLC
	ADC.w DATA_0DBD48,y
	STA.w $70E2,x
	SEP.b #$20
	LDA.w $7E27
	STA.w $70E1,x
	REP.b #$20
CODE_0DBE53:
	JSL.l CODE_03AF23
	JSR.w CODE_0DBF4A
	LDA.w $75E0,x
	BNE.b CODE_0DBE71
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_0DBE71
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_0DBE71:
	LDA.w $75E2,x
	BNE.b CODE_0DBE88
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_0DBE88
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_0DBE88:
	LDA.w $7A98,x
	BNE.b CODE_0DBECC
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w #!Define_YI_AmbSpr1F8
	JSL.l CODE_008B21
	LDA.w #$0002
	STA.w $73C2,y
	LDA.b $10
	AND.w #$0003
	SEC
	SBC.w #$000A
	CLC
	ADC.w $7CD6,x
	STA.w $70A2,y
	LDA.b $10
	AND.w #$0007
	SEC
	SBC.w #$000C
	CLC
	ADC.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0008
	STA.w $7782,y
	STA.w $7A98,x
CODE_0DBECC:
	LDY.b $16,x
	BEQ.b CODE_0DBED6
	LDA.w #$0080
	STA.w $7AF7,y
CODE_0DBED6:
	LDA.w $0B57
	BEQ.b CODE_0DBEE8
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$FFFF
	STA.w $0B91,x
	RTL

CODE_0DBEE8:
	LDA.w $7A96,x
	BNE.b CODE_0DBF09
	LDA.w $7AF6,x
	BNE.b CODE_0DBEF9
	JSR.w CODE_0DBF59
	JML.l CODE_03A31E

CODE_0DBEF9:
	LDY.b #$FF
	LDA.w $7974
	AND.w #$0001
	BNE.b CODE_0DBF05
	LDY.b #$05
CODE_0DBF05:
	TYA
	STA.w $74A2,x
CODE_0DBF09:
	RTL

DATA_0DBF0A:
	dw $0000,$0300,$FD00,$0000,$0000,$0200,$FE00,$0000
	dw $0000,$0200,$FE00,$0000,$0000,$0200,$FE00,$0000

DATA_0DBF2A:
	dw $0000,$0000,$0000,$0000,$0300,$0200,$0200,$0200
	dw $FD00,$FE00,$FE00,$FE00,$0000,$0000,$0000,$0000

CODE_0DBF4A:
	LDA.w $0B57
	BNE.b CODE_0DBF59
	LDY.w $60AB
	BMI.b CODE_0DBF59
	LDY.w $0D94
	BEQ.b CODE_0DBF7B
CODE_0DBF59:
	CPX.w $61B6
	BNE.b CODE_0DBF7A
	STZ.w $61B6
	STZ.b $18,x
	STZ.w $75E0,x
	STZ.w $75E2,x
	LDA.w #$0600
	STA.w $6FA0,x
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState14_ActivateGoal
	BEQ.b CODE_0DBF7A
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_0DBF7A:
	RTS

CODE_0DBF7B:
	CPX.w $61B6
	BNE.b CODE_0DBFE6
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_0DBFD0
	AND.w #$0180
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0DBFA8
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
	STZ.w $72C0,x
CODE_0DBFA8:
	LDA.w $60FC
	AND.w #$001F
	BEQ.b CODE_0DBFD0
	AND.w #$0018
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0DBFD0
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	LDA.w $7C18,x
	SEC
	SBC.w $72C2,x
	STA.w $7C18,x
	STZ.w $72C2,x
CODE_0DBFD0:
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
	LDA.w $7C18,x
	SEC
	SBC.w $72C2,x
	STA.w $7C18,x
	BRA.b CODE_0DBFEE

CODE_0DBFE6:
	LDY.w $60C0
	BNE.b CODE_0DBFEE
	JMP.w CODE_0DBF59

CODE_0DBFEE:
	LDA.w $0B57
	BNE.b CODE_0DC011
	LDA.w $7C16,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0DC011
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	BPL.b CODE_0DC011
	CMP.w #$FFF8
	BPL.b CODE_0DC014
CODE_0DC011:
	JMP.w CODE_0DBF59

CODE_0DC014:
	STA.b $00
	LDY.w $61B6
	BNE.b CODE_0DC043
	LDA.w $60FC
	AND.w #$001F
	BEQ.b CODE_0DC026
	JMP.w CODE_0DBF59

CODE_0DC026:
	STX.w $61B6
	LDA.w $7C16,x
	STA.b $18,x
	LDY.b #!Define_YI_PlayerState02_InCutscene
	STY.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w $60A8
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0060
	STA.w $6FA0,x
CODE_0DC043:
	CPX.w $61B6
	BEQ.b CODE_0DC049
	RTS

CODE_0DC049:
	LDA.w $6150
	BNE.b CODE_0DC060
	LDA.w $0035
	AND.w #$FCFF
	STA.w $617A
	LDA.w $0037
	AND.w #$FCFF
	STA.w $617C
CODE_0DC060:
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_0DC078
	LDA.b $00
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
CODE_0DC078:
	LDA.b $18,x
	CMP.w #$FFFD
	BEQ.b CODE_0DC087
	BPL.b CODE_0DC085
	INC.b $18,x
	BRA.b CODE_0DC087

CODE_0DC085:
	DEC.b $18,x
CODE_0DC087:
	LDA.w $60FC
	AND.w #$01E0
	BNE.b CODE_0DC09C
	LDA.w $7C16,x
	SEC
	SBC.b $18,x
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_0DC09C:
	LDA.w $60D4
	BEQ.b CODE_0DC0AD
	LDA.w #$0500
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0DC0DD

CODE_0DC0AD:
	LDA.w $0036
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_0DBF0A,y
	STA.w $75E0,x
	BEQ.b CODE_0DC0CE
	LDA.w $6150
	ORA.w $60DE
	BNE.b CODE_0DC0CE
	LDA.w $0036
	AND.w #$0002
	STA.w $60C4
CODE_0DC0CE:
	LDA.w DATA_0DBF2A,y
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7540,x
	STA.w $7542,x
CODE_0DC0DD:
	STZ.w $60A8
	STZ.w $60B4
	STZ.w $60AA
	STZ.w !EXRAM_YI_Player_SubXPosLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Player_SubYPosLo|!EXRAMBankMirror
	STZ.w $60D4
	RTS

CODE_0DC0F0:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0DC14A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0DC13E
	TYX
	JSL.l CODE_04906C
	BEQ.b CODE_0DC10B
	JSL.l CODE_0EBE8D
	BNE.b CODE_0DC118
CODE_0DC10B:
	LDX.b $12
	LDA.w $6FA0,x
	ORA.w #$0200
	STA.w $6FA0,x
	SEC
	RTL

CODE_0DC118:
	LDA.w $7D38,x
	BEQ.b CODE_0DC13E
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0DC12A
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_0DC132
CODE_0DC12A:
	LDA.w $7542,x
	CMP.w #$0040
	BCC.b CODE_0DC136
CODE_0DC132:
	JSL.l CODE_03B25B
CODE_0DC136:
	LDX.b $12
	JSL.l CODE_03B25B
	SEC
	RTL

CODE_0DC13E:
	LDX.b $12
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
CODE_0DC14A:
	CLC
	RTL

CODE_0DC14C:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0DC14A
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0DC14A
	LDA.w $7D38,y
	BEQ.b CODE_0DC14A
	TYX
	JSL.l CODE_03B24B
	BCC.b CODE_0DC136
	LDA.w $6FA0,x
	ORA.w #$0200
	STA.w $6FA0,x
	SEC
	RTL

;---------------------------------------------------------------------------

YI_NorSpr109_BronzeTapTap_Init:
YI_NorSpr10A_SilverTapTap_Init:
YI_NorSpr10B_HoppingSilverTapTap_Init:
;$0DC171
	LDA.w $6FA2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr10B_HoppingSilverTapTap
	BNE.b CODE_0DC188
	LDA.w #$000D
	STA.w $7402,x
	INC.w $7A36,x
CODE_0DC188:
	RTL

;---------------------------------------------------------------------------

DATA_0DC189:
	dw CODE_0DC389
	dw CODE_0DC3EE
	dw CODE_0DC41E
	dw CODE_0DC496
	dw CODE_0DC4CE
	dw CODE_0DC505

DATA_0DC195:
	dw $FE88,$0178,$FE00,$0200

DATA_0DC19D:
	dw $0180,$FE80

DATA_0DC1A1:
	dw $FF80,$0080

YI_NorSpr109_BronzeTapTap_Main:
YI_NorSpr10A_SilverTapTap_Main:
YI_NorSpr10B_HoppingSilverTapTap_Main:
;$0DC1A5
	LDY.w $7402,x
	CPY.b #$0E
	BNE.b CODE_0DC1C6
	JSL.l CODE_03AA2E
	REP.b #$10
	LDY.w $7362,x
	LDA.w #$8000
	STA.w $6008,y
	STA.w $6010,y
	STA.w $6018,y
	STA.w $6020,y
	SEP.b #$10
CODE_0DC1C6:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BEQ.b CODE_0DC1D1
	JMP.w CODE_0DC273

CODE_0DC1D1:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $6168
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w $7042,x
	AND.w #$FF3F
	STA.w $7042,x
	LDY.b #$02
	LDA.w $6150
	CMP.w #$0003
	BMI.b CODE_0DC1F5
	INY
	INY
CODE_0DC1F5:
	STY.w $6150
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	CPY.b #$02
	BEQ.b CODE_0DC217
	LDY.w $77C3,x
	BEQ.b CODE_0DC217
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$05
	LDA.w #$000A
	BRA.b CODE_0DC268

CODE_0DC217:
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDA.w #$0020
	STA.w $7540,x
	LDA.w DATA_0DC19D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_0DC1A1,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1E0
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$000C
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	STA.w $7E4C,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $73C0,y
	LDY.b #$04
	LDA.w #$0006
CODE_0DC268:
	STY.b $76,x
	STA.w $7402,x
	STZ.w $7A98,x
	PLA
	PLY
	RTL

CODE_0DC273:
	JSL.l CODE_03AF23
	LDY.w $7D36,x
	BNE.b CODE_0DC27F
CODE_0DC27C:
	JMP.w CODE_0DC315

CODE_0DC27F:
	DEY
	BPL.b CODE_0DC285
	JMP.w CODE_0DC311

CODE_0DC285:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0DC27C
	LDA.w $7D38,y
	BEQ.b CODE_0DC27C
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7540,x
	LDA.w $7542,y
	CMP.w #$0040
	BPL.b CODE_0DC2AC
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0DC2AC:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	PHP
	TYX
	JSL.l CODE_03B25B
	LDY.b #$00
	PLP
	BMI.b CODE_0DC2BC
	INY
	INY
CODE_0DC2BC:
	STY.b $78,x
	TYA
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0DC2C8
	CLC
	ADC.w #$0004
CODE_0DC2C8:
	TAY
	LDA.w DATA_0DC195,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID2E_ClankSound7
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1EF
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0005
	STA.w $73C2,y
	ASL
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7782,y
	STA.b $76,x
	LDA.w $7722,x
	BPL.b CODE_0DC315
	JSL.l CODE_03AD24
	BCC.b CODE_0DC315
	STZ.w $7A38,x
	LDA.w #$000E
	STA.w $7402,x
	BRA.b CODE_0DC315

CODE_0DC311:
	JSL.l CODE_03A858
CODE_0DC315:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DC189,x)
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b $76,x
	CPY.b #$02
	BMI.b CODE_0DC329
	LDA.w #$0841
CODE_0DC329:
	STA.w $6FA2,x
	JSR.w CODE_0DC330
	RTL

CODE_0DC330:
	LDY.w $7402,x
	CPY.b #$0E
	BEQ.b CODE_0DC341
	LDA.w $7722,x
	BMI.b CODE_0DC37A
	JSL.l CODE_03AEFD
	RTS

CODE_0DC341:
	LDA.w #FXDATA_540000+$5000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$5000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08867E>>16
	LDA.w #FXCODE_08867E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0DC37A:
	RTS

DATA_0DC37B:
	dw $FF80,$00C0

DATA_0DC37F:
	db $01,$02,$01,$02,$01

DATA_0DC384:
	db $0F,$11,$0F,$11,$0F

CODE_0DC389:
	TYX
	LDY.w $7A36,x
	BEQ.b CODE_0DC3C7
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0DC3E2
	LDA.w $7A98,x
	BNE.b CODE_0DC3E2
	DEC.b $18,x
	BPL.b CODE_0DC3B2
	LDA.w #$0005
	STA.b $18,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7402,x
	RTS

CODE_0DC3B2:
	LDY.b $18,x
	LDA.w DATA_0DC37F,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_0DC384,y
	AND.w #$00FF
	STA.w $7402,x
	RTS

CODE_0DC3C7:
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$04
	BNE.b CODE_0DC3E2
	TYA
	LSR
	STA.w $7A98,x
	LDY.w $7400,x
	LDA.w DATA_0DC37B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_0DC3E2:
	CPY.b #$02
	BNE.b CODE_0DC3ED
	LDA.w #!Define_YI_SoundID26_WalkingTapTap
	JSL.l CODE_0085D2
CODE_0DC3ED:
	RTS

CODE_0DC3EE:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DC41D
	LDA.w #$0002
	STA.w $7A98,x
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$0A
	BMI.b CODE_0DC41D
	ASL
	STA.w $7A98,x
	STZ.w $7402,x
	LDY.w $7A36,x
	BEQ.b CODE_0DC418
	LDA.w #$000D
	STA.w $7402,x
	STZ.b $18,x
CODE_0DC418:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
CODE_0DC41D:
	RTS

CODE_0DC41E:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0DC452
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDY.w $7402,x
	CPY.b #$0E
	BNE.b CODE_0DC43C
	JSL.l CODE_03AEFD
CODE_0DC43C:
	STZ.w $7A38,x
	LDA.w #$000A
	STA.w $7402,x
	LDA.w #$0060
	STA.w $7A98,x
	LDY.b #$06
	STY.b $16,x
	INC.b $76,x
	RTS

CODE_0DC452:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0DC45B
	EOR.w #$FFFF
	INC
CODE_0DC45B:
	CLC
	ADC.w #$0080
	AND.w #$FF00
	ASL
	ASL
	ASL
	ASL
	ASL
	XBA
	STA.b $00
	LDA.w $7400,x
	EOR.b $78,x
	BEQ.b CODE_0DC479
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
CODE_0DC479:
	LDA.b $00
	CLC
	ADC.w $7A38,x
	AND.w #$01FE
	STA.w $7A38,x
	JSL.l CODE_0EC365
	RTS

DATA_0DC48A:
	db $0D,$0C,$0A,$0B,$0A,$0B

DATA_0DC490:
	db $12,$02,$10,$04,$08,$04

CODE_0DC496:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DC4CD
	DEC.b $16,x
	BNE.b CODE_0DC4B9
	LDA.w #$0004
	STA.w $7A98,x
	STZ.w $7402,x
	LDY.w $7A36,x
	BEQ.b CODE_0DC4B6
	LDA.w #$000D
	STA.w $7402,x
	STZ.b $18,x
CODE_0DC4B6:
	STZ.b $76,x
	RTS

CODE_0DC4B9:
	LDY.b $16,x
	LDA.w DATA_0DC48A-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0DC490-$01,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_0DC4CD:
	RTS

CODE_0DC4CE:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0DC504
CODE_0DC4D4:
	LDA.w $7A98,x
	BNE.b CODE_0DC4E6
	STZ.w $7540,x
	LDA.w #$0010
	STA.w $7A96,x
	INC
	STA.w $7A98,x
CODE_0DC4E6:
	LDA.w $7A96,x
	BNE.b CODE_0DC504
	LDA.w #$0004
	STA.w $7A98,x
	STZ.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr10B_HoppingSilverTapTap
	BNE.b CODE_0DC502
	LDA.w #$000D
	STA.w $7402,x
CODE_0DC502:
	STZ.b $76,x
CODE_0DC504:
	RTS

CODE_0DC505:
	TYX
	LDA.w $7860,x
	BNE.b CODE_0DC4D4
	RTS

;---------------------------------------------------------------------------

YI_NorSpr134_BabyBowser_Init:
;$0DC50C
	RTL

;---------------------------------------------------------------------------

DATA_0DC50D:
	dw CODE_0DC7D5
	dw CODE_0DC81A
	dw CODE_0DC834
	dw CODE_0DC876
	dw CODE_0DC916
	dw CODE_0DC985
	dw CODE_0DC9B3
	dw CODE_0DC9E4
	dw CODE_0DCA06
	dw CODE_0DCA0E
	dw CODE_0DCADC
	dw CODE_0DCAFD
	dw CODE_0DCB4C
	dw CODE_0DCB6C
	dw CODE_0DCB82
	dw CODE_0DCBC9
	dw CODE_0DCC11
	dw CODE_0DCC28
	dw CODE_0DCE3C
	dw CODE_0DEBAA
	dw CODE_0DEBE7
	dw CODE_0DCE3C
	dw CODE_0DD267
	dw CODE_0DD300
	dw CODE_0DD4AC
	dw CODE_0DD617
	dw CODE_0DD65E
	dw CODE_0DD71D
	dw CODE_0DDA15
	dw CODE_0DD77B
	dw CODE_0DD913
	dw CODE_0DF1A9
	dw CODE_0DD617
	dw CODE_0DF32A
	dw CODE_0DF358
	dw CODE_0DF360
	dw CODE_0DF383
	dw CODE_0DF4F7
	dw CODE_0DF5B2

YI_NorSpr134_BabyBowser_Main:
;$0DC55B
	LDY.b $76,x
	CPY.b #$24
	BPL.b CODE_0DC569
	CPY.b #$21
	BPL.b CODE_0DC56C
	CPY.b #$16
	BMI.b CODE_0DC56C
CODE_0DC569:
	JMP.w CODE_0DC5E6

CODE_0DC56C:
	JSR.w CODE_0DC5F9
	LDY.b $76,x
	CPY.b #$21
	BPL.b CODE_0DC5E6
	JSR.w CODE_0DC64B
	LDY.b $76,x
	CPY.b #$12
	BPL.b CODE_0DC5C5
	CPY.b #$0F
	BPL.b CODE_0DC5A7
	LDY.b #$22
	CPY.w !RAM_YI_Global_BGModeAndTileSizeSetting
	BEQ.b CODE_0DC59A
	STY.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDY.b #$04
	STY.w $011C
	LDA.w !RAM_YI_Global_Layer1YPosLo
	ORA.w #$2000
	STA.w $7EF0
CODE_0DC59A:
	LDX.b #FXCODE_0B96C3>>16
	LDA.w #FXCODE_0B96C3
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	BRA.b CODE_0DC5BF

CODE_0DC5A7:
	LDY.b #$69
	STY.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDY.b #$02
	STY.w $011C
	LDA.w #$0017
	LDY.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0DC5BC
	LDA.w #$0413
CODE_0DC5BC:
	STA.w !RAM_YI_Global_MainScreenLayers
CODE_0DC5BF:
	JSL.l CODE_03AF23
	BRA.b CODE_0DC5D8

CODE_0DC5C5:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_0DC5D8
	JSL.l CODE_03B697
	JSL.l CODE_03B716
CODE_0DC5D8:
	LDY.b $76,x
	CPY.b #$0A
	BPL.b CODE_0DC5F0
	JSR.w CODE_0DC6CE
	JSR.w CODE_0DC77A
	BRA.b CODE_0DC5F0

CODE_0DC5E6:
	LDA.w #$0011
	STA.w $0B83
	JSL.l CODE_03AF23
CODE_0DC5F0:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DC50D,x)
	RTL

CODE_0DC5F9:
	LDA.w $7362,x
	BMI.b CODE_0DC642
	LDY.w $74A2,x
	BMI.b CODE_0DC642
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7402,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7362,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$000B
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #DATA_0DDFA5
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_0DDFA5>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_08A16C>>16
	LDA.w #FXCODE_08A16C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0DC642:
	RTS

DATA_0DC643:
	dw $0008,$FFE8

DATA_0DC647:
	dw $FD00,$0300

CODE_0DC64B:
	LDY.w $60D4
	BEQ.b CODE_0DC670
	LDA.w $60FC
	AND.w #$0007
	BEQ.b CODE_0DC670
	LDY.w $1064
	BNE.b CODE_0DC673
	INC.w $1064
	STZ.b $0A
	LDA.w #$0010
	STA.b $0C
	LDA.w $611C
	STA.b $02
	JSR.w CODE_0DC674
	RTS

CODE_0DC670:
	STZ.w $1064
CODE_0DC673:
	RTS

CODE_0DC674:
	LDA.w #$0002
	STA.b $00
	STZ.b $06
	LDY.b #$00
CODE_0DC67D:
	STY.b $06
	LDY.b $00
	LDA.b $02
	CLC
	ADC.w DATA_0DC643,y
	STA.b $02
	LDA.w DATA_0DC647,y
	STA.b $04
	TXA
	SEC
	SBC.w #$0004
	TAY
	LDA.w #$0128
	JSL.l CODE_03A34E
	BCC.b CODE_0DC6CD
	LDA.b $02
	STA.w $70E2,y
	LDA.w #$07B8
	STA.w $7182,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $00
	STA.w $7400,y
	LDA.b $0A
	STA.w $7AF6,y
	LDA.b $0C
	STA.w $7AF8,y
	LDA.b $06
	STA.w $7A36,y
	DEC.b $00
	DEC.b $00
	BPL.b CODE_0DC67D
	TYA
	LDY.b $06
	STA.w $7A36,y
CODE_0DC6CD:
	RTS

CODE_0DC6CE:
	LDA.w $7AF8,x
	BNE.b CODE_0DC6CD
	LDY.w $7D36,x
	BPL.b CODE_0DC6CD
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0DC737
	LDY.w $60AB
	BMI.b CODE_0DC6CD
	LDY.w $60C0
	BEQ.b CODE_0DC6CD
	STZ.w $60D4
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDY.b $76,x
	CPY.b #$0A
	BPL.b CODE_0DC6CD
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$002E
	STA.w $7402,x
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w #$003B
	STA.w $7A36,x
	LDA.w #$003D
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$07
	STY.b $76,x
	RTS

CODE_0DC737:
	LDY.b $76,x
	CPY.b #$03
	BEQ.b CODE_0DC742
	JSL.l CODE_03A858
	RTS

CODE_0DC742:
	LDA.w $61B2
	BPL.b CODE_0DC751
	JSL.l CODE_06D10C
	LDA.w #$0040
	STA.w $7AF8
CODE_0DC751:
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	TXA
	STA.w $7E48
	STZ.w $1060
	STZ.b $18,x
	LDA.w #$8000
	STA.w $0390
	LDA.w #$FFFF
	STA.w $0CD0
	LDA.w #$0020
	STA.w $0CC8
	LDA.w #!Define_YI_SoundID8B_BabyBowserPound
	JSL.l CODE_0085D2
CODE_0DC779:
	RTS

CODE_0DC77A:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0DC779
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0DC779
	LDA.w $7D38,y
	BEQ.b CODE_0DC779
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.b $00
	TYX
	JSL.l CODE_03B24B
	LDY.b $76,x
	CPY.b #$07
	BPL.b CODE_0DC779
	LDA.w #$0080
	LDY.b $01
	BPL.b CODE_0DC7A7
	LDA.w #$FF80
CODE_0DC7A7:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $75E0,x
	LDA.w #$0040
	STA.w $7542,x
CODE_0DC7B3:
	STZ.b $16,x
	LDA.w #$0026
	STA.w $7402,x
	STZ.w $7A98,x
CODE_0DC7BE:
	LDA.w #$003D
	STA.w $7A36,x
	LDA.w #$003F
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$09
	STY.b $76,x
	RTS

CODE_0DC7D5:
	TYX
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDA.w $7A98,x
	BNE.b CODE_0DC819
	INC.b $76,x
CODE_0DC7E4:
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$F880
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$F800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0017
	STA.w $7A36,x
	LDA.w #$001A
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0DC819:
	RTS

CODE_0DC81A:
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DC833
	LDA.w #$001A
	STA.w $7A36,x
	LDA.w #$0022
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DC833:
	RTS

CODE_0DC834:
	TYX
	LDY.w $7223,x
	BMI.b CODE_0DC875
	LDY.w $7542,x
	BEQ.b CODE_0DC846
	LDA.w #!Define_YI_SoundID8B_BabyBowserPound
	JSL.l CODE_0085D2
CODE_0DC846:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TXY
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DC875
	STZ.w $1066
	LDA.w #$0800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$005B
	STA.w $7A36,x
	LDA.w #$005E
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DC875:
	RTS

CODE_0DC876:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0DC8B1
	LDA.w $7974
	AND.w #$0003
	BNE.b CODE_0DC8B0
	LDA.w #!Define_YI_AmbSpr1DD
	JSL.l CODE_008B21
	LDA.b $10
	AND.w #$000F
	SEC
	SBC.w #$0007
	CLC
	ADC.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7E4C,y
	LDA.w #$0006
	STA.w $7782,y
CODE_0DC8B0:
	RTS

CODE_0DC8B1:
	LDY.w $1066
	BNE.b CODE_0DC8ED
	INC.w $1066
	LDA.w #$0040
	STA.w $61C6
	LDA.w #!Define_YI_AmbSpr1DC
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0010
	STA.b $0A
	STZ.b $0C
	LDA.w $7CD6,x
	STA.b $02
	JSR.w CODE_0DC674
CODE_0DC8ED:
	LDA.w #$0040
	STA.w $7542,x
	TXY
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DC915
CODE_0DC8F9:
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$000B
	STA.w $7A36,x
	LDA.w #$000F
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$04
	STY.b $76,x
CODE_0DC915:
	RTS

CODE_0DC916:
	JSR.w CODE_0DCF8F
	BCS.b CODE_0DC920
	JSR.w CODE_0DC935
	BCC.b CODE_0DC934
CODE_0DC920:
	LDA.w #$0013
	STA.w $7A36,x
	LDA.w #$0015
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DC934:
	RTS

CODE_0DC935:
	LDY.w $60D4
	BEQ.b CODE_0DC94E
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_0DC94E
	LDA.w $7C16,x
	CLC
	ADC.w #$0038
	CMP.w #$0070
	BCC.b CODE_0DC981
CODE_0DC94E:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0128
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_098EBF>>16
	LDA.w #FXCODE_098EBF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_0DC983
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	STA.b $00
	CLC
	ADC.w #$0038
	CMP.w #$0070
	BCS.b CODE_0DC983
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.b $00
	BPL.b CODE_0DC983
CODE_0DC981:
	SEC
	RTS

CODE_0DC983:
	CLC
	RTS

CODE_0DC985:
	JSR.w CODE_0DCF8F
	BCS.b CODE_0DC998
	LDY.w $7402,x
	CPY.b #$09
	BNE.b CODE_0DC9B2
	JSR.w CODE_0DC935
	BCC.b CODE_0DC9B2
	BRA.b CODE_0DC9CD

CODE_0DC998:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0015
	STA.w $7A36,x
	LDA.w #$0017
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DC9B2:
	RTS

CODE_0DC9B3:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0DC9E3
	JSR.w CODE_0DCF8F
	BCS.b CODE_0DC9D4
	LDY.w $7402,x
	CPY.b #$0C
	BNE.b CODE_0DC9E3
	JSR.w CODE_0DC935
	BCC.b CODE_0DC9E3
CODE_0DC9CD:
	LDA.w #$0001
	STA.w $7A98,x
	RTS

CODE_0DC9D4:
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDA.w #$0002
	STA.w $7A98,x
	STZ.b $76,x
CODE_0DC9E3:
	RTS

CODE_0DC9E4:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0DC9E3
	JSR.w CODE_0DCF8F
	BCS.b CODE_0DCA03
	LDY.w $7402,x
	BNE.b CODE_0DC9E3
	LDY.w $7A98,x
	CPY.b #$10
	BPL.b CODE_0DC9E3
	JSR.w CODE_0DC935
	BCC.b CODE_0DC9E3
CODE_0DCA03:
	JMP.w CODE_0DCB51

CODE_0DCA06:
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DCA22
	JMP.w CODE_0DCB74

CODE_0DCA0E:
	TYX
	LDY.w $7223,x
	BMI.b CODE_0DC9E3
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0DCA23
	LDA.w #$0027
	STA.w $7402,x
CODE_0DCA22:
	RTS

CODE_0DCA23:
	JSR.w CODE_0DCA59
	JSR.w CODE_0DCA7B
	TXY
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DC9E3
	INC.b $16,x
	LDY.b $16,x
	CPY.b #$03
	BMI.b CODE_0DCA3D
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JMP.w CODE_0DC8F9

CODE_0DCA3D:
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0027
	STA.w $7402,x
	LDA.w $75E0,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $75E0,x
	JMP.w CODE_0DC7BE

CODE_0DCA59:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_0DCA7B:
	LDA.w $7974
	AND.w #$0007
	BNE.b CODE_0DCADB
	LDA.w #!Define_YI_SoundID1F_HitHead
	JSL.l CODE_0085D2
	LDA.w #$FFC0
	LDY.w $7221,x
	BMI.b CODE_0DCA95
	LDA.w #$0040
CODE_0DCA95:
	STA.b $00
	LDA.w #!Define_YI_AmbSpr1D8
	JSL.l CODE_008B21
	LDA.b $10
	AND.w #$0007
	SEC
	SBC.w #$0004
	CLC
	ADC.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7142,y
	LDA.w #$0008
	STA.w $7782,y
	LDA.w #$0003
	STA.w $7E4C,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $73C0,y
CODE_0DCADB:
	RTS

CODE_0DCADC:
	JSR.w CODE_0DCF8F
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0DCAFB
	JSR.w CODE_0DCA59
	LDY.w $7402,x
	CPY.b #$0F
	BNE.b CODE_0DCAFB
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	JSR.w CODE_0DF343
CODE_0DCAFB:
	BRA.b CODE_0DCB22

CODE_0DCAFD:
	TYX
	JSR.w CODE_0DCA59
	TXY
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DCB1F
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $1062
	LDY.w $1062
	CPY.b #$03
	BMI.b CODE_0DCB1C
	JSR.w CODE_0DCB2A
	LDY.b #$0E
	STY.b $76,x
	RTS

CODE_0DCB1C:
	JSR.w CODE_0DCBF6
CODE_0DCB1F:
	JSR.w CODE_0DCA7B
CODE_0DCB22:
	LDA.w $7974
	AND.w #$0002
	BNE.b CODE_0DCB3B
CODE_0DCB2A:
	LDX.b #$1C
CODE_0DCB2C:
	LDA.l $702F2C,x
	STA.l YI_Global_PaletteMirror[$E0].LowByte,x
	DEX
	DEX
	BNE.b CODE_0DCB2C
	LDX.b $12
	RTS

CODE_0DCB3B:
	LDX.b #$1C
CODE_0DCB3D:
	LDA.l DATA_5FA56E,x
	STA.l YI_Global_PaletteMirror[$E0].LowByte,x
	DEX
	DEX
	BNE.b CODE_0DCB3D
	LDX.b $12
	RTS

CODE_0DCB4C:
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DCB22
CODE_0DCB51:
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w #$005E
	STA.w $7A36,x
	LDA.w #$0061
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_0DCB6C:
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DCB22
	JSR.w CODE_0DCB2A
CODE_0DCB74:
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDY.b #$01
	STY.b $76,x
	JMP.w CODE_0DC7E4

CODE_0DCB82:
	TYX
	LDA.w #$0128
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	INC
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0991DB>>16
	LDA.w #FXCODE_0991DB
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R6_MultiplierLo
	BNE.b CODE_0DCBC8
	LDA.w $7C16,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_0DCBC8
	LDY.w $61B3
	BPL.b CODE_0DCBC8
	LDA.w #$0048
	JSL.l CODE_03A34C
	BCC.b CODE_0DCBC8
	LDA.w #$0010
	STA.w $70E2,y
	INC.w $1015
	JSL.l CODE_0181FB
	LDX.b $12
	INC.b $76,x
CODE_0DCBC8:
	RTS

CODE_0DCBC9:
	TYX
	LDY.w $1015
	BPL.b CODE_0DCC10
	PHB
	REP.b #$10
	LDX.w #$702D6C
	LDY.w #$702F6C
	LDA.w #$01FF
	MVN $702F6C>>16,$702D6C>>16
	SEP.b #$10
	PLB
	LDX.b #$20
	LDA.w #$0000
CODE_0DCBE6:
	STA.l $70312A,x
	DEX
	DEX
	BNE.b CODE_0DCBE6
	LDX.b $12
	LDA.w #$000B
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_0DCBF6:
	LDA.w #$0030
	STA.w $7A98,x
	LDA.w #$0056
	STA.w $7A36,x
	LDA.w #$005B
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DCC10:
	RTS

CODE_0DCC11:
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DCC27
	STZ.w $1015
	STZ.w $7400,x
	LDA.w #$0000
	STA.l $70336C
	STZ.b $16,x
	INC.b $76,x
CODE_0DCC27:
	RTS

CODE_0DCC28:
	TYX
	LDA.w $7974
	AND.w #$0003
	BNE.b CODE_0DCC7A
	LDA.l $70336C
	CMP.w #$0020
	BMI.b CODE_0DCC47
	LDA.w #$0048
	STA.b $18,x
	INC.w $0B59
	LDY.b #$16
	STY.b $76,x
	RTS

CODE_0DCC47:
	CMP.w #$0010
	BMI.b CODE_0DCC61
	LDY.b $16,x
	BNE.b CODE_0DCC61
	LDA.w #$00CF
	JSL.l CODE_03A34C
	BCC.b CODE_0DCC7A
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STA.b $16,x
CODE_0DCC61:
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0DCC7A:
	RTS

DATA_0DCC7B:
	dw CODE_0DCF8F
	dw CODE_0DCFF3
	dw CODE_0DCFFC
	dw CODE_0DD011
	dw CODE_0DD01D
	dw CODE_0DD009
	dw CODE_0DD0A2
	dw CODE_0DD0A8
	dw CODE_0DD025
	dw CODE_0DD02B
	dw CODE_0DD087
	dw CODE_0DD036
	dw CODE_0DD052
	dw CODE_0DD06E
	dw CODE_0DD0AE

DATA_0DCC99:
	db $0A,$04,$04,$02,$02,$02,$02,$02,$02,$04,$0A,$02,$02,$02,$04,$08
	db $00

DATA_0DCCAA:
	dw $0002,$0040,$0000,$0000,$0004,$0001,$0000,$0000
	dw $0004,$0006,$0010,$0004,$0000,$0006,$000B,$0001
	dw $0006,$0000,$000B,$000F,$0002,$000B,$0010,$000A
	dw $0008,$0004,$0113,$000C,$0000,$000F,$0013,$0003
	dw $000F,$0000,$000B,$000F,$0002,$000B,$000E,$0008
	dw $0000,$0013,$0015,$0001,$0013,$0014,$0000,$FC00
	dw $0800,$0080,$001A,$0000,$0015,$0017,$0001,$0015
	dw $0014,$FDC0,$F900,$0400,$0040,$0000,$0017,$001A
	dw $0001,$0017,$0016,$0000,$001A,$0022,$0001,$001A
	dw $0014,$0000,$0800,$0400,$0000,$0018,$0000,$0022
	dw $0025,$0001,$0022,$0014,$0000,$FC00,$0800,$0080
	dw $0016,$0000,$001A,$0022,$0001,$001A,$0014,$0000
	dw $0800,$0400,$0000,$0018,$0000,$0022,$0025,$0001
	dw $0022,$0014,$0000,$FC00,$0800,$0080,$0016,$0000
	dw $001A,$0022,$0001,$001A,$0014,$0000,$0800,$0400
	dw $0000,$0018,$0000,$0022,$0025,$0001,$0022,$0010
	dw $0000,$002F,$0036,$0001,$002F,$0012,$0003,$0004
	dw $0114,$000C,$0000,$0036,$003B,$0001,$0036,$001C
	dw $0010,$0014,$FFE0,$0000,$0400,$0040,$0000,$0025
	dw $0027,$0003,$0025,$0014,$0000,$0000,$0400,$0040
	dw $000E,$0006,$000C,$0000,$0027,$002B,$0003,$0027
	dw $0000,$002B,$002F,$0002,$002B,$001C,$0010,$0014
	dw $FFE0,$0000,$0400,$0040,$0000,$0025,$0027,$0003
	dw $0025,$0014,$0000,$0000,$0400,$0040,$000E,$0006
	dw $000C,$0000,$0027,$002B,$0003,$0027,$000E,$0008
	dw $FFFF

CODE_0DCE3C:
	TYX
	BRA CODE_0DCE63

CODE_0DCE3F:
	LDA.w #$0048
	STA.b $18,x
	LDA.w #$7FFF
	STA.w $0948
	LDA.w $6094
	CLC
	ADC.w #$0080
	STA.w $70E2,x
	LDA.w $609C
	CLC
	ADC.w #$0080
	STA.w $7182,x
	LDY.b #$16
	STY.b $76,x
	RTS

CODE_0DCE63:
	LDA.b $78,x
	TAX
	JSR.w (DATA_0DCC7B,x)
	BCC.b CODE_0DCECC
	REP.b #$10
	LDY.b $18,x
	LDA.w DATA_0DCCAA-$02,y
	BPL.b CODE_0DCEA1
	SEP.b #$10
	STZ.w $0C1E
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$000C
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	STZ.b $76,x
	LDX.b #$1C
CODE_0DCE92:
	LDA.l YI_Global_PaletteMirror[$E0].LowByte,x
	STA.l $702F2C,x
	DEX
	DEX
	BNE.b CODE_0DCE92
	LDX.b $12
	RTS

CODE_0DCEA1:
	STA.b $78,x
	PHA
	LDA.w DATA_0DCCAA,y
	STA.w $7A36,x
	LDA.w DATA_0DCCAA+$02,y
	STA.w $7A38,x
	LDA.w DATA_0DCCAA+$04,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0DCCAA+$06,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PLA
	LSR
	TAY
	LDA.w DATA_0DCC99,y
	AND.w #$00FF
	CLC
	ADC.b $18,x
	STA.b $18,x
	SEP.b #$10
CODE_0DCECC:
	RTS

DATA_0DCECD:
	db $02,$03,$04,$05,$06,$07,$05,$04,$03,$02,$00,$01,$00,$01,$00,$02
	db $03,$02,$00,$08,$09,$0B,$0C,$0B,$09,$0A,$0E,$0F,$10,$11,$12,$13
	db $09,$14,$15,$08,$00,$1A,$1B,$1E,$1F,$1E,$1C,$1D,$1C,$1D,$1C,$16
	db $17,$18,$19,$17,$0B,$0C,$1A,$0C,$1A,$0C,$1A,$08,$00,$08,$00,$22
	db $23,$22,$23,$22,$24,$25,$24,$09,$13,$12,$11,$10,$0F,$0E,$28,$29
	db $2A,$2B,$2A,$2B,$2A,$2B,$2C,$2D,$0E,$08,$00,$15,$08,$00,$08,$0B
	db $0C

DATA_0DCF2E:
	db $04,$04,$04,$04,$02,$02,$04,$04,$04,$04,$10,$04,$04,$04,$04,$02
	db $06,$02,$06,$08,$01,$08,$10,$08,$08,$10,$02,$02,$02,$02,$02,$02
	db $02,$10,$04,$04,$04,$08,$08,$02,$06,$02,$06,$04,$04,$04,$04,$10
	db $02,$02,$18,$02,$04,$01,$0C,$0C,$04,$04,$10,$04,$50,$08,$01,$20
	db $04,$04,$04,$20,$02,$10,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02
	db $02,$02,$02,$04,$04,$10,$04,$04,$04,$08,$10,$04,$04,$20,$02,$02
	db $02

CODE_0DCF8F:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DCFF1
	LDA.w $7A36,x
	CMP.w $7A38,x
	BMI.b CODE_0DCFA5
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0DCFFA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_0DCFA5:
	INC
	STA.w $7A36,x
	TAY
	LDA.w DATA_0DCF2E-$01,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_0DCECD-$01,y
	AND.w #$00FF
	STA.w $7402,x
	CPY.b #$05
	BPL.b CODE_0DCFCE
	CMP.w #$0002
	BNE.b CODE_0DCFF1
	LDA.w #!Define_YI_SoundID8D_BabyBowserYawn
	JSL.l CODE_0085D2
	BRA.b CODE_0DCFF1

CODE_0DCFCE:
	CPY.b #$0F
	BMI.b CODE_0DCFF1
	CPY.b #$14
	BPL.b CODE_0DCFDD
	CMP.w #$0003
	BNE.b CODE_0DCFF1
	BRA.b CODE_0DCFEA

CODE_0DCFDD:
	CPY.b #$27
	BMI.b CODE_0DCFF1
	CPY.b #$2C
	BPL.b CODE_0DCFF1
	CMP.w #$001F
	BNE.b CODE_0DCFF1
CODE_0DCFEA:
	LDA.w #!Define_YI_SoundID8C_BabyBowserTalk
	JSL.l CODE_0085D2
CODE_0DCFF1:
	CLC
	RTS

CODE_0DCFF3:
	TYX
	LDA.w $7A36,x
	STA.w $61C6
CODE_0DCFFA:
	SEC
	RTS

CODE_0DCFFC:
	TYX
	LDA.w $7A36,x
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
CODE_0DD007:
	SEC
	RTS

CODE_0DD009:
	TYX
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0DD007
	CLC
	RTS

CODE_0DD011:
	TYX
	LDA.l $704073
	TAY
	CPY.b #$12
	BEQ.b CODE_0DD007
	CLC
	RTS

CODE_0DD01D:
	TYX
	LDA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_0DD007
	CLC
	RTS

CODE_0DD025:
	TYX
	INC.w $105C
CODE_0DD029:
	SEC
	RTS

CODE_0DD02B:
	TYX
	LDY.w $7A36,x
	CPY.w $105C
	BEQ.b CODE_0DD029
CODE_0DD034:
	CLC
	RTS

CODE_0DD036:
	TYX
	LDA.w $7542,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0DD034
	LDA.w #!Define_YI_SoundID8B_BabyBowserPound
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	SEC
	RTS

CODE_0DD052:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0DD034
	LDA.w #$0020
	STA.w $61C6
	ASL
	STA.w $7542,x
	LDA.w #!Define_YI_SoundID23_GroundPound
	JSL.l CODE_0085D2
	SEC
	RTS

CODE_0DD06E:
	TYX
	LDY.w $7223,x
	BMI.b CODE_0DD034
	LDA.w #$077D
	CMP.w $7182,x
	BPL.b CODE_0DD034
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	SEC
	RTS

CODE_0DD087:
	TYX
	LDA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A38,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7542,x
	SEC
	RTS

CODE_0DD0A2:
	TYX
	STY.w $0071
	SEC
	RTS

CODE_0DD0A8:
	TYX
	STZ.w $0071
CODE_0DD0AC:
	SEC
	RTS

CODE_0DD0AE:
	TYX
	DEC.w $7A36,x
	BEQ.b CODE_0DD0AC
	CLC
	RTS

DATA_0DD0B6:
	db $6C,$58,$5A,$5A,$5B,$56,$59,$59,$5C,$55,$58,$58,$5C,$54,$58,$58
	db $5C,$53,$57,$57,$5C,$52,$57,$57,$5C,$51,$56,$56,$5C,$50,$56,$56
	db $5C,$3E,$3F,$50,$64,$3D,$40,$4F,$65,$3D,$41,$4E,$65,$3C,$42,$4D
	db $65,$3B,$44,$4D,$64,$3B,$45,$4C,$64,$3A,$44,$4B,$63,$2F,$43,$4B
	db $62,$2C,$41,$4A,$61,$2A,$43,$4A,$60,$28,$45,$49,$5F,$27,$45,$45
	db $60,$25,$44,$44,$62,$24,$43,$43,$63,$23,$43,$43,$64,$22,$43,$43
	db $65,$22,$43,$43,$66,$21,$43,$43,$66,$15,$43,$43,$66,$11,$43,$43
	db $65,$0E,$43,$43,$58,$0C,$43,$43,$50,$0B,$43,$43,$50,$09,$43,$43
	db $51,$08,$43,$43,$52,$07,$43,$43,$52,$06,$43,$43,$53,$05,$43,$43
	db $53,$05,$54,$69,$6B,$04,$54,$67,$6B,$03,$55,$66,$6B,$03,$55,$64
	db $6B,$02,$55,$62,$6B,$02,$56,$61,$6B,$02,$56,$5F,$6B,$01,$56,$5E
	db $6B,$01,$59,$5C,$6B,$01,$43,$43,$6B,$00,$43,$43,$6B,$00,$43,$43
	db $6B,$00,$43,$43,$6B,$00,$43,$43,$6B,$00,$43,$43,$6B,$00,$43,$43
	db $6B,$00,$43,$43,$6B,$00,$44,$44,$6B,$00,$44,$44,$6B,$00,$45,$45
	db $6B,$01,$46,$46,$6C,$01,$47,$47,$6C,$02,$48,$48,$6D,$02,$49,$49
	db $6E,$03,$4A,$4A,$6E,$04,$4B,$4B,$6F,$04,$4C,$4C,$7F,$05,$4D,$4D
	db $7F,$06,$4E,$4E,$7F,$08,$4F,$4F,$7E,$09,$50,$50,$7D,$0B,$51,$51
	db $7C,$0E,$51,$51,$7B,$21,$52,$52,$7B,$22,$52,$52,$7A,$24,$52,$52
	db $79,$28,$52,$52,$78,$2E,$53,$53,$77,$2F,$53,$53,$76,$30,$53,$53
	db $76,$2D,$53,$53,$76,$2C,$53,$53,$76,$2C,$53,$53,$76,$2C,$53,$53
	db $77,$25,$53,$53,$79,$24,$53,$53,$79,$24,$53,$53,$7A,$24,$53,$53
	db $7A,$24,$53,$53,$7A,$24,$53,$53,$7A,$24,$53,$53,$7A,$24,$53,$53
	db $7A,$24,$53,$53,$7A,$25,$53,$53,$7A,$25,$53,$53,$7A,$25,$53,$53
	db $79,$26,$53,$53,$79,$26,$53,$53,$78,$27,$53,$53,$77,$28,$53,$53
	db $76,$28,$53,$53,$75,$29,$53,$53,$73,$2A,$53,$53,$70,$2B,$53,$53
	db $6F,$2C,$53,$53,$6F,$2D,$41,$49,$6E,$2E,$41,$4A,$6D,$2F,$40,$4B
	db $6C,$30,$40,$4C,$6B,$31,$3F,$4E,$6A,$33,$3E,$51,$68,$36,$3C,$5A
	db $65

CODE_0DD267:
	TYX
	LDA.w #DATA_0DD0B6>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0DD0B6
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0047
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7680,x
	CLC
	ADC.w #$0006
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7682,x
	CLC
	ADC.w #$0004
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08BD37>>16
	LDA.w #FXCODE_08BD37
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	LDX.b $12
	LDA.b $18,x
	CLC
	ADC.w #$0010
	STA.b $18,x
	CMP.w #$1000
	LDA.w #$0017
	LDY.b #$AA
	BCC.b CODE_0DD2CE
	INC.b $76,x
	JSL.l CODE_03BFF7
	LDY.b #$00
	TYA
	STY.w $0200
CODE_0DD2CE:
	STA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STY.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STY.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STY.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.w #$0020
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

DATA_0DD2E4:
	dw $5000,$5800,$7000,$0000,$1000,$2000,$3000

DATA_0DD2F2:
	dw $0060,$005D,$005F,$00B3,$00B4,$00B5,$00B6

CODE_0DD300:
	PHD
	LDA.w #$0000
	TCD
	SEP.b #$20
	JSL.l CODE_008239
	LDX.b #$0C
	JSL.l CODE_008543
	LDA.b #$01
	STA.b !RAM_YI_Global_PlayMusicLo
	STA.w $0205
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	REP.b #$20
	PLD
	LDX.b $12
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w $6094
	CMP.w #$0200
	BCS.b CODE_0DD354
	LDY.b #$01
	ADC.w #$0010
	CMP.w #$0200
	BCC.b CODE_0DD347
	LDA.w #$0240
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$0200
	STA.w $7E18
	DEY
CODE_0DD347:
	STY.w $0C1E
	STA.w $0C23
	LDA.w #$0280
	STA.w $7E1A
	RTS

CODE_0DD354:
	REP.b #$10
	LDA.w #$0800
	STA.b $00
	LDA.w $0C16
	BEQ.b CODE_0DD363
	JMP.w CODE_0DD42D

CODE_0DD363:
	LDA.w $0C14
	CMP.w #$0007
	BCS.b CODE_0DD36E
	JMP.w CODE_0DD3E9

CODE_0DD36E:
	STZ.w $0C18
	SEP.b #$10
	LDX.b #$1C
CODE_0DD375:
	LDA.w #$0000
	STA.l $702D6E,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	LDA.l DATA_5FF4BE,x
	STA.l $702F4E,x
	STA.l YI_Global_PaletteMirror[$F1].LowByte,x
	DEX
	DEX
	BPL.b CODE_0DD375
	LDA.w #DATA_5FF518>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_5FF518
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_09F572>>16
	LDA.w #FXCODE_09F572
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_00BE39	: dl $7F56DE,$705800 : dw $00D2
	JSL.l CODE_00BE39	: dl $7F5894,$7058D2 : dw $01A4
	JSL.l CODE_00BE39	: dl $7E5388,$70385E : dw $01A4
	LDX.b #$D2
	LDA.w #$0000
CODE_0DD3CE:
	STA.l $7E5110,x
	DEX
	DEX
	BNE.b CODE_0DD3CE
	LDX.b $12
	INC.b $76,x
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$00
	STY.w !RAM_YI_Global_HDMAEnable
	RTS

CODE_0DD3E9:
	ASL
	TAY
	LDA.w #$6800
	STA.w $0C1A
	LDA.w DATA_0DD2E4,y
	STA.w $0C18
	LDX.w #$6800
	CMP.w #$4000
	BCS.b CODE_0DD402
	LDX.w #$7000
CODE_0DD402:
	LDA.w DATA_0DD2F2,y
	JSL.l CODE_00B756
	STA.w $0C16
	INC.w $0C14
	LDX.w $0C18
	CPX.w #$4000
	BCS.b CODE_0DD42D
	SEP.b #$10
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08AA5F>>16
	LDA.w #FXCODE_08AA5F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	ASL.w $0C16
	LDA.w $0C16
CODE_0DD42D:
	SEC
	SBC.w #$0800
	BCS.b CODE_0DD43B
	ADC.w #$0800
	STA.b $00
	LDA.w #$0000
CODE_0DD43B:
	STA.w $0C16
	LDX.w $0C1A
	TXA
	CLC
	ADC.b $00
	STA.w $0C1A
	LDA.w #$0070
	STA.w $0001
	LDY.w $0C18
	LDA.b $00
	CPY.w #$4000
	BCS.b CODE_0DD45E
	JSL.l CODE_00BF86
	BRA.b CODE_0DD464

CODE_0DD45E:
	JSL.l CODE_00BEA6
	LSR.b $00
CODE_0DD464:
	LDA.b $00
	CLC
	ADC.w $0C18
	STA.w $0C18
	SEP.b #$10
	LDX.b $12
	RTS

DATA_0DD472:
	db $00,!REGISTER_BGModeAndTileSizeSetting : dl $7E5040

DATA_0DD477:
	db $70,$07,$3B,$07,$01,$49,$00

DATA_0DD47E:
	db $70,$00,$11,$3B,$00,$11,$01,$00,$12,$00

DATA_0DD488:
	db $40,!REGISTER_CGRAMAddress : dl $7E5B98

DATA_0DD48D:
	db $E9 : dw $7E5112
	db $E9 : dw $7E517B
	db $00

DATA_0DD494:
	db $42,!REGISTER_WriteToCGRAMPort : dl $7E5C18

DATA_0DD499:
	db $E9 : dw $7E5388
	db $E9 : dw $7E545A
	db $00

DATA_0DD4A0:
	dw $0000,$00C0

DATA_0DD4A4:
	dw $0068,$0008

DATA_0DD4A8:
	dw $0020,$0040

CODE_0DD4AC:
	LDA.w $0C18
	CMP.w #$4000
	BCS.b CODE_0DD4CC
	REP.b #$10
	TAY
	ADC.b #$00
	PHP
	STA.w $0C18
	LDA.b #$00
	PHP
	LDX.w #$00FF
	JSL.l CODE_00BF4A
	SEP.b #$10
	LDX.b $12
	RTS

CODE_0DD4CC:
	SEP.b #$20
	LDX.b #$04
CODE_0DD4D0:
	LDA.w DATA_0DD472,x
	STA.w HDMA[$07].Parameters,x
	LDA.w DATA_0DD488,x
	STA.w HDMA[$03].Parameters,x
	LDA.w DATA_0DD494,x
	STA.w HDMA[$04].Parameters,x
	LDA.l DATA_01D699,x
	STA.w HDMA[$02].Parameters,x
	LDA.l DATA_01D6A5,x
	STA.w HDMA[$01].Parameters,x
	DEX
	BPL.b CODE_0DD4D0
	LDA.b #$7F
	STA.w HDMA[$02].IndirectSourceBank
	STA.w HDMA[$01].IndirectSourceBank
	LDX.b #$09
CODE_0DD4FD:
	LDA.w DATA_0DD477,x
	STA.l $7E5040,x
	LDA.w DATA_0DD47E,x
	STA.l $7E51E4,x
	DEX
	BPL.b CODE_0DD4FD
	LDX.b #$06
CODE_0DD510:
	LDA.w DATA_0DD48D,x
	STA.l $7E5B98,x
	LDA.w DATA_0DD499,x
	STA.l $7E5C18,x
	LDA.l DATA_01D69E,x
	STA.l $7E5C98,x
	LDA.l DATA_01D6AA,x
	STA.l $7E5D18,x
	DEX
	BPL.b CODE_0DD510
	LDA.b #$C6
	STA.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDA.w #$0700
	STA.w $1068
	LDA.w #$0A00
	STA.w $106A
	LDA.w #$02C0
	STA.w $106C
	LDA.w #$0200
	STA.w !RAM_YI_Global_Mode7CenterXLo
	LDA.w #$0210
	STA.w !RAM_YI_Global_Mode7CenterYLo
	SEP.b #$10
	LDA.w #$00D5
	JSL.l CODE_03A364
	BCC.b CODE_0DD5B5
	LDA.w #$0080
	STA.w $70E2,y
	STA.w $7182,y
	LDA.w #$F801
	STA.w $7040,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$06
	STA.w $74A1,y
	REP.b #$20
	LDX.b #$02
CODE_0DD57E:
	LDA.w #$0083
	JSL.l CODE_03A34C
	BCC.b CODE_0DD5B5
	LDA.w !RAM_YI_Global_Layer2XPosLo
	CLC
	ADC.w DATA_0DD4A0,x
	STA.w $70E2,y
	LDA.w !RAM_YI_Global_Layer2YPosLo
	CLC
	ADC.w DATA_0DD4A4,x
	STA.w $7182,y
	LDA.w DATA_0DD4A8,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	CPX.b #$00
	BNE.b CODE_0DD5B1
	LDA.w #$0002
	STA.w $7402,y
	LDA.w #$2001
	STA.w $7040,y
CODE_0DD5B1:
	DEX
	DEX
	BPL.b CODE_0DD57E
CODE_0DD5B5:
	LDX.b $12
	LDA.w #$00CF
	JSL.l CODE_03A34C
	BCC.b CODE_0DD5C6
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
CODE_0DD5C6:
	LDY.b #$0A
	STY.w $011C
	LDY.b #$69
	STY.w !RAM_YI_Global_BG2AddressAndSize
	LDA.w #$000F
	STA.w !RAM_YI_Level_LevelHeaderBGScrollSettingLo
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$0180
	STA.w $7A96,x
	LDA.w #$0080
	STA.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$1200
	STA.w !RAM_YI_Global_MainScreenLayers
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $0B59
CODE_0DD5F7:
	INC.b $76,x
	STZ.b $18,x
	LDA.w !RAM_YI_Global_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDY.b #$00
	STY.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDY.b #$22
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDY.b #$20
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w #$0020
	TRB.w !RAM_YI_Global_HDMAEnable
	RTS

CODE_0DD617:
	TYX
	LDA.w #$7FFF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	CLC
	ADC.w #$0001
	STA.b $18,x
	CMP.w #$0100
	BCC.b CODE_0DD633
	INC.b $76,x
CODE_0DD633:
	LDX.b #FXCODE_08E132>>16
	LDA.w #FXCODE_08E132
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDY.w $0B59
	BNE.b CODE_0DD655
	LSR
	LSR
	LSR
	XBA
	AND.w #$000F
	EOR.w #$000F
	TAY
	STY.w $0200
	RTS

CODE_0DD655:
	STA.l YI_Global_PaletteMirror[$00].LowByte
	RTS

DATA_0DD65A:
	db $30,$40,$20,$10

CODE_0DD65E:
	TYX
	JSR.w CODE_0DDEAA
	LDA.w #$0990
	SEC
	SBC.w $106A
	BPL.b CODE_0DD66E
	LDA.w #$0000
CODE_0DD66E:
	LSR
	CMP.w #$0100
	BMI.b CODE_0DD677
	LDA.w #$0100
CODE_0DD677:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #DATA_5FF482
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FF482>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0DD69C:
	LDA.w $7A96,x
	BNE.b CODE_0DD708
	LDA.b $14
	AND.w #$000F
	ORA.w #$0040
	STA.w $61C6
	LDA.w $106A
	SEC
	SBC.w #$0001
	STA.w $106A
	CMP.w #$0750
	BPL.b CODE_0DD6E2
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDX.b #$1C
CODE_0DD6C1:
	LDA.l DATA_5FF482,x
	STA.l $702D6E,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	DEX
	DEX
	BPL.b CODE_0DD6C1
	LDX.b $12
CODE_0DD6D3:
	LDA.w #$001B
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	LDA.w #$0005
	STA.b $78,x
	STZ.w $7AF8,x
	RTS

CODE_0DD6E2:
	CMP.w #$0900
	BPL.b CODE_0DD6ED
	LDA.w #$0001
	STA.w $61CE
CODE_0DD6ED:
	LDA.w $7A98,x
	BNE.b CODE_0DD708
	LDA.w #!Define_YI_SoundID48_LargeBlockLands
	JSL.l CODE_0085D2
	LDA.b $10
	AND.w #$0003
	TAY
	LDA.w DATA_0DD65A,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_0DD708:
	RTS

DATA_0DD709:
	dw $0002,$0004,$0006,$0004,$0002

DATA_0DD713:
	dw $00E0,$0004,$0130,$0004,$0080

CODE_0DD71D:
	TYX
	JSR.w CODE_0DDEAA
	LDY.w $1070
	CPY.b #$08
	BCC.b CODE_0DD72B
	JSR.w CODE_0DD8D3
CODE_0DD72B:
	LDA.w $7AF8,x
	BNE.b CODE_0DD760
	DEC.b $78,x
	BPL.b CODE_0DD73D
	INC.b $76,x
	LDA.w #$0100
	STA.w $7AF6,x
	RTS

CODE_0DD73D:
	LDA.b $78,x
	ASL
	TAY
	LDA.w DATA_0DD713,y
	STA.w $7AF8,x
	LDA.w DATA_0DD709,y
	STA.w $7402,x
	CMP.w #$0006
	BNE.b CODE_0DD760
	LDA.w #!Define_YI_SoundID91_BowserRoar
	JSL.l CODE_0085D2
	LDA.w #$00CF
	JSL.l CODE_03A34C
CODE_0DD760:
	RTS

DATA_0DD761:
	db $02,$04,$05,$04,$02,$04,$05,$04,$02,$04,$05,$04,$02

DATA_0DD76E:
	db $04,$04,$60,$04,$40,$04,$60,$04,$40,$04,$60,$04,$04

CODE_0DD77B:
	TYX
	JSR.w CODE_0DDEAA
	JSR.w CODE_0DD8D3
	LDA.w $7AF8,x
	BEQ.b CODE_0DD7F2
CODE_0DD787:
	LDY.w $7402,x
	CPY.b #$05
	BNE.b CODE_0DD7D4
	CMP.w #$0020
	BCC.b CODE_0DD7D4
	BNE.b CODE_0DD79F
	JSR.w CODE_0DD822
	LDA.w #$0030
	STA.w $7A36,x
	RTS

CODE_0DD79F:
	LDA.w #$0001
CODE_0DD7A2:
	PHA
	LDA.w #!Define_YI_AmbSpr1D3
	JSL.l CODE_008B21
	LDA.w $611C
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $611E
	SEC
	SBC.w #$0008
	STA.w $7142,y
	PLA
	STA.w $7782,y
	LDA.w $7A36,x
	STA.w $7E4C,y
	CMP.w #$0010
	BCC.b CODE_0DD7D5
	SEC
	SBC.w #$0004
	STA.w $7A36,x
CODE_0DD7D4:
	RTS

CODE_0DD7D5:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_0DD7E5
	PHY
	LDA.w #!Define_YI_SoundID63_AimedAt
	JSL.l CODE_0085D2
	PLY
CODE_0DD7E5:
	LDA.b $14
	AND.w #$0004
	LSR
	ADC.w $7002,y
	STA.w $7002,y
	RTS

CODE_0DD7F2:
	DEC.b $78,x
	BPL.b CODE_0DD7FF
	DEC.b $76,x
	LDA.w #$0100
	STA.w $7AF6,x
	RTS

CODE_0DD7FF:
	LDY.b $78,x
	LDA.w DATA_0DD76E,y
	AND.w #$00FF
	STA.w $7AF8,x
	LDA.w DATA_0DD761,y
	AND.w #$00FF
	STA.w $7402,x
	CMP.w #$0005
	BNE.b CODE_0DD81F
	LDA.w #!Define_YI_SoundID91_BowserRoar
	JSL.l CODE_0085D2
CODE_0DD81F:
	JMP.w CODE_0DD787

CODE_0DD822:
	LDA.w #!Define_YI_SoundID10_ShellHit6
	JSL.l CODE_0085D2
	LDA.w #$0010
	JSR.w CODE_0DD7A2
	LDA.w $70A2,y
	STA.b $00
	LDA.w $7142,y
	STA.b $02
	LDA.w #$00CE
	JSL.l CODE_03A34C
	BCS.b CODE_0DD845
	JMP.w CODE_0DD787

CODE_0DD845:
	LDA.w $106C
	SEC
	SBC.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	CLC
	ADC.w $1068
	SEC
	SBC.w #$0100
	STA.w $70E2,y
	LDA.w $106A
	SEC
	SBC.w #$0050
	STA.w $7182,y
	STY.b $04
	LDA.b $00
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1068
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	CLC
	ADC.w #$0300
	ASL
	STA.b $06
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $04
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $16,x
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1068
	STA.b $76,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.b $06
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $04
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDX.b $12
	RTS

DATA_0DD8CF:
	dw $0120,$FFD0

CODE_0DD8D3:
	LDA.w $7A98,x
	BNE.b CODE_0DD912
	LDX.b #FXCODE_09F743>>16
	LDA.w #FXCODE_09F743
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BNE.b CODE_0DD912
	LDA.w #$00CD
	JSL.l CODE_03A34C
	BCC.b CODE_0DD912
	LDA.b $10
	AND.w #$0002
	STA.w $7400,y
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_0DD8CF,x
	STA.w $70E2,y
	LDA.w #$0770
	STA.w $7182,y
	LDX.b $12
	LDA.w #$0100
	STA.w $7A98,x
CODE_0DD912:
	RTS

CODE_0DD913:
	TYX
	JSR.w CODE_0DDEAA
	JSR.w CODE_0DD8D3
	LDA.w #$0006
	STA.w $7402,x
	LDA.b $14
	AND.w #$0008
	BEQ.b CODE_0DD937
	LDX.b #$1C
CODE_0DD929:
	LDA.l DATA_5FF538,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	DEX
	DEX
	BPL.b CODE_0DD929
	LDX.b $12
CODE_0DD937:
	LDY.w $1076
	LDA.w $7AF8,x
	BEQ.b CODE_0DD97F
	CPY.b #$07
	BEQ.b CODE_0DD97E
	LDA.w $1068
	CLC
	ADC.w #$0004
	STA.w $1068
	LDA.w $106A
	CLC
	ADC.w $72C2,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_0DD97B
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0008
	STA.w $61C6
	LDA.w #$F800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7542,x
	LDA.w #$0800
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0DD97B:
	STA.w $106A
CODE_0DD97E:
	RTS

CODE_0DD97F:
	CPY.b #$07
	BEQ.b CODE_0DD98F
	CPY.b #$03
	BNE.b CODE_0DD98A
	JMP.w CODE_0DD6D3

CODE_0DD98A:
	DEC.b $76,x
	DEC.b $76,x
	RTS

CODE_0DD98F:
	JSR.w CODE_0DFC04
	JSL.l CODE_02A982
	LDA.w #$001F
	STA.b $76,x
	LDA.w #$0200
	STA.w $7A96,x
	LDA.w !RAM_YI_Global_HDMAEnable
	EOR.w #$001E
	STA.w !RAM_YI_Global_HDMAEnable
	STZ.w $0948
	LDA.w #$0013
	JSL.l CODE_03A364
	BCC.b CODE_0DD9F6
	LDA.w #$0200
	SBC.w !RAM_YI_Global_Layer3XPosLo
	STA.w $7680,y
	CLC
	ADC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $70E2,y
	LDA.w #$0200
	SEC
	SBC.w !RAM_YI_Global_Layer3YPosLo
	STA.w $7682,y
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $7182,y
	LDA.w #$611F
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w #$0800
	STA.w $7A38,y
	LDA.w #$FFFF
	STA.w $7A96,y
	LDA.w #!Define_YI_SoundID74_BossExplosion
	JSL.l CODE_0085D2
CODE_0DD9F6:
	JSL.l CODE_02E1E1
	RTS

DATA_0DD9FB:
	db $00,$02,$03,$01,$03,$02

DATA_0DDA01:
	dw $0840,$4008,$0808

DATA_0DDA07:
	dw $0700,$0680,$0600,$0400,$0300,$0200,$0000

CODE_0DDA15:
	TYX
	JSR.w CODE_0DDEAA
	JSR.w CODE_0DD8D3
	LDA.w $7AF8,x
	BEQ.b CODE_0DDA24
	JMP.w CODE_0DDAD3

CODE_0DDA24:
	LDY.b $78,x
	INY
	CPY.b #$06
	BCC.b CODE_0DDA2D
	LDY.b #$00
CODE_0DDA2D:
	TYA
	STA.b $78,x
	LDA.w $1076
	ASL
	TAX
	LDA.w $1068
	SEC
	SBC.w DATA_0DDA07,x
	ASL
	LDX.w DATA_0DDA01,y
	TXA
	BCS.b CODE_0DDA76
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b $12
	LDA.w #$0002
	STA.w $7AF6,x
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEC
	SBC.w #$0010
	BPL.b CODE_0DDA5D
	LDA.w #$0000
CODE_0DDA5D:
	STA.w $7A38,x
	PHY
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.w #$0004
	BCS.b CODE_0DDA76
	LDA.w #$0004
CODE_0DDA76:
	LDX.b $12
	STA.w $7AF8,x
	LDA.w DATA_0DD9FB,y
	AND.w #$00FF
	STA.w $7402,x
	LSR
	BNE.b CODE_0DDAD3
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $61C6
	LDA.w $1068
	STA.b $00
	SEC
	SBC.w #$0020
	STA.w $1068
	CMP.w #$0100
	BPL.b CODE_0DDAB9
	CMP.w #$00E0
	BMI.b CODE_0DDAD3
	LDA.w #!Define_YI_SoundID81_Unknown
	JSL.l CODE_0085D2
	LDA.w #$0200
	STA.w $61C8
	BRA.b CODE_0DDAD3

CODE_0DDAB9:
	CMP.w #$0180
	BMI.b CODE_0DDAD3
	LDA.w $7AF6,x
	BNE.b CODE_0DDAD3
	INC.b $76,x
	LDA.w #$000D
	STA.b $78,x
	LDA.w #$0030
	STA.w $7A36,x
	STZ.w $7A98,x
CODE_0DDAD3:
	LDA.w $1068
	CMP.w #$0100
	BPL.b CODE_0DDB29
	JSL.l CODE_03A858
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CPY.b #$60
	BCS.b CODE_0DDB29
	TYA
	BIT.w #$0004
	BEQ.b CODE_0DDAF0
	EOR.w #$FFFF
	INC
CODE_0DDAF0:
	ASL
	CLC
	ADC.w #$02C0
	STA.w $0091
	TYA
	AND.w #$0003
	ASL
	ASL
	ASL
	ASL
	ADC.w #$07C0
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.w #$0000
	STA.w $0095
	JSL.l CODE_109295
	JSL.l CODE_0DA485
	DEC.w !RAM_YI_Global_SoundQueueSizeLo
	LDA.w #!Define_YI_SoundID83_LungeFish
	JSL.l CODE_0085D2
	LDX.b $12
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_0DDB29:
	RTS

DATA_0DDB2A:
	dw DATA_0DDC0A,$0000,DATA_0DDC0A,$0002,DATA_0DDB62,$0000,DATA_0DDB62,$0002
	dw DATA_0DDCB2,$0000,DATA_0DDD5A,$0000,DATA_0DDE02,$0000

DATA_0DDB46:
	dw $0010,$0010,$0000,$0000,$0000,$0000,$0000

DATA_0DDB54:
	dw $0010,$FFF0,$0000,$0000,$0000,$0000,$0000

DATA_0DDB62:
	dw $FFFF,$FFFF,$FFFF,$EEED,$FFEF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FEFD,$FFFF,$FFFF,$FFFF,$FFFF,$01FF
	dw $0C02,$0E0D,$FF0F,$0504,$FFFF,$FFFF,$11FF,$1C12
	dw $1E1D,$131F,$1514,$FFFF,$FFFF,$21FF,$2C28,$2E2D
	dw $292F,$2524,$FFFF,$FFFF,$3130,$3C38,$3E3D,$393F
	dw $353A,$FF25,$FFFF,$4140,$4C42,$4E4D,$434F,$4544
	dw $FFFF,$FFFF,$5150,$5C52,$5E5D,$535F,$5554,$FFFF
	dw $00FF,$6160,$0362,$0303,$6303,$6564,$FF82,$10FF
	dw $7170,$0372,$0303,$7303,$7574,$FF92,$20FF,$8180
	dw $0303,$0303,$0303,$8584,$FFA2,$FFFF,$9190,$0303
	dw $0303,$0303,$9594,$FFFF

DATA_0DDC0A:
	dw $FFFF,$FFFF,$FFFF,$EBEA,$FFEC,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FBFA,$FFFC,$FFFF,$FFFF,$FFFF,$07FF
	dw $0C08,$0E0D,$FF0F,$0B0A,$FFFF,$FFFF,$17FF,$1C18
	dw $1E1D,$191F,$1B1A,$FFFF,$FFFF,$27FF,$2C28,$2E2D
	dw $292F,$2B2A,$FFFF,$FFFF,$3736,$3C38,$3E3D,$393F
	dw $3B3A,$FF99,$FFFF,$4746,$4C48,$4E4D,$494F,$4B4A
	dw $FFA9,$06FF,$5756,$5C58,$5E5D,$595F,$5B5A,$FFFF
	dw $16FF,$6766,$0368,$0303,$6903,$6B6A,$FFFF,$26FF
	dw $7776,$0378,$0303,$7903,$7B7A,$FF88,$FFFF,$8786
	dw $0303,$0303,$8903,$8B8A,$FF98,$FFFF,$9190,$0303
	dw $0303,$0303,$9B9A,$FFFF

DATA_0DDCB2:
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$B0A0,$FFEF,$FFFF,$FFFF,$FFFF,$01FF
	dw $0C02,$0E0D,$FF0F,$0504,$FFFF,$FFFF,$11FF,$8312
	dw $2E2D,$1334,$1514,$FFFF,$FFFF,$21FF,$3C28,$3E3D
	dw $293F,$2524,$FFFF,$FFFF,$3130,$9338,$4E4D,$39AB
	dw $353A,$FF25,$FFFF,$4140,$A342,$CECD,$43BB,$4544
	dw $FFFF,$A4FF,$2322,$DC52,$DEDD,$53DF,$A6A5,$FFA7
	dw $B4FF,$3332,$0303,$0303,$0303,$B6B5,$FFB7,$C4FF
	dw $9796,$0303,$0303,$0303,$C6C5,$FFC7,$FFFF,$8786
	dw $0303,$0303,$0303,$F6F5,$FFFF,$FFFF,$9190,$0303
	dw $0303,$0303,$9594,$FFFF

DATA_0DDD5A:
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$6CFF,$6E6D,$FF6F,$FFFF,$FFFF,$FFFF,$01FF
	dw $7C02,$7E7D,$FF7F,$0504,$FFFF,$FFFF,$11FF,$8C9D
	dw $8E8D,$9E8F,$1514,$FFFF,$FFFF,$21FF,$9CAD,$0909
	dw $AE9F,$2524,$FFFF,$FFFF,$3130,$ACBD,$0909,$BEAF
	dw $353A,$FF25,$FFFF,$4140,$BC42,$0909,$43BF,$4544
	dw $FFFF,$A4FF,$2322,$CC52,$CECD,$53CF,$A6A5,$FFA7
	dw $B4FF,$3332,$DC03,$DEDD,$03DF,$B6B5,$FFB7,$C4FF
	dw $9796,$0303,$0303,$0303,$C6C5,$FFC7,$FFFF,$8786
	dw $0303,$0303,$0303,$F6F5,$FFFF,$FFFF,$9190,$0303
	dw $0303,$0303,$9594,$FFFF

DATA_0DDE02:
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$6CFF,$6E6D,$FF6F,$FFFF,$FFFF,$A1FF,$01FF
	dw $7C02,$7E7D,$FF7F,$05A8,$FFAA,$B1FF,$B3B2,$8C9D
	dw $8E8D,$9E8F,$B9B8,$FFBA,$C1C0,$C3C2,$9CAD,$0909
	dw $AE9F,$C9C8,$CBCA,$D1D0,$D3D2,$ACD4,$0909,$D7AF
	dw $D9D8,$DBDA,$FFFF,$E3E2,$BCE4,$0909,$E7BF,$E9E8
	dw $FFFF,$FFFF,$F3F2,$CCF4,$CECD,$F7CF,$F9F8,$FF25
	dw $FFFF,$E1E0,$DC03,$DEDD,$03DF,$D6D5,$FFFF,$FFFF
	dw $F1F0,$0303,$0303,$0303,$E6E5,$FFFF,$FFFF,$8786
	dw $0303,$0303,$0303,$F6F5,$FFFF,$FFFF,$9190,$0303
	dw $0303,$0303,$9594,$FFFF

CODE_0DDEAA:
	LDA.w $7402,x
	ASL
	ASL
	TAY
	REP.b #$10
	LDA.w DATA_0DDB2A+$02,y
	STA.w $7400,x
	LDA.w DATA_0DDB2A,y
	STA.b $00
	LDA.w #$1D39
	STA.b $02
	LDA.w #DATA_0DDC0A>>16
	STA.w $0001
	LDA.w #$000C
	STA.b $04
CODE_0DDECD:
	LDX.b $00
	TXA
	CLC
	ADC.w #$000E
	STA.b $00
	LDY.b $02
	TYA
	CLC
	ADC.w #$0080
	STA.b $02
	LDA.w #$000E
	JSL.l CODE_00BF16
	DEC.b $04
	BNE.b CODE_0DDECD
	SEP.b #$10
	LDX.b $12
	LDA.w $1068
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7402,x
	ASL
	TAY
	LDA.w $106A
	CLC
	ADC.w DATA_0DDB46,y
	CLC
	ADC.w $0CB0
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $106C
	CLC
	ADC.w DATA_0DDB54,y
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LSR
	STA.w !RAM_YI_Global_Mode7TilemapSettings
	LDX.b #FXCODE_09F6B0>>16
	LDA.w #FXCODE_09F6B0
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $6098
	STA.w !RAM_YI_Global_Layer3XPosLo
	LDA.w $60A0
	STA.w !RAM_YI_Global_Layer3YPosLo
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STA.w !RAM_YI_Global_Mode7MatrixParameterALo
	STZ.w !RAM_YI_Global_Mode7MatrixParameterBLo
	STZ.w !RAM_YI_Global_Mode7MatrixParameterCLo
	STA.w !RAM_YI_Global_Mode7MatrixParameterDLo
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	ASL
	SEC
	SBC.w #$0048
	BPL.b CODE_0DDF4C
	LDA.w #$0000
CODE_0DDF4C:
	CMP.w #$0100
	BMI.b CODE_0DDF54
	LDA.w #$0100
CODE_0DDF54:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #DATA_5FF4FA
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FF4FA>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $1074
	BEQ.b CODE_0DDFA4
	LDY.b $76,x
	CPY.b #$1E
	BCS.b CODE_0DDFA4
	INC.w $1076
	LDA.w #$0080
	STA.w $7A38,x
	LDA.w #!Define_YI_SoundID92_BowserHurt
	JSL.l CODE_0085D2
	LDA.w #$001E
	STA.b $76,x
	LDA.w #$0080
	STA.w $7AF8,x
	PLA
	STZ.w $1074
CODE_0DDFA4:
	RTS

DATA_0DDFA5:
	dw $F5FA,$0C05,$0A00,$2D0D,$000C,$0DFC,$0C2C,$0600
	dw $360D,$000C,$0502,$0C26,$FA00,$05F5,$020C,$FDF2
	dw $0C14,$0602,$04F7,$000C,$0E00,$8C0A,$0800,$0B06
	dw $028C,$FE00,$8C1A,$FA02,$22F5,$000C,$0D0A,$0C2D
	dw $FC00,$2C0D,$000C,$0D06,$0C36,$0200,$2605,$000C
	dw $F5FA,$0C22,$F202,$14FD,$020C,$F706,$0C04,$0000
	dw $0A0E,$008C,$0608,$8C0B,$0002,$1AFE,$028C,$F8F2
	dw $0C37,$FA00,$6800,$020C,$F802,$0C39,$F200,$37F8
	dw $020C,$0D0A,$0C2D,$FC00,$2C0D,$000C,$0D06,$0C36
	dw $0700,$07F9,$000C,$0E00,$8C0A,$0800,$0B06,$028C
	dw $FE00,$8C1A,$F302,$37F7,$000C,$FFFB,$0C48,$0302
	dw $39F7,$000C,$F7F3,$0C37,$0A02,$2D0D,$000C,$0DFC
	dw $0C2C,$0600,$360D,$000C,$FA08,$0C07,$0000,$0A0E
	dw $008C,$0608,$8C0B,$0002,$1AFE,$028C,$F3F4,$0C45
	dw $0400,$57FA,$000C,$F3F4,$0C45,$FB02,$66FE,$020C
	dw $0D0A,$0C2D,$FC00,$2C0D,$000C,$0D06,$0C36,$0B00
	dw $07FB,$000C,$0E00,$8C0A,$0800,$0B06,$028C,$FE00
	dw $8C1A,$F502,$45F1,$000C,$F1F5,$0C45,$0502,$57F8
	dw $000C,$FDFC,$0C66,$0A02,$2D0D,$000C,$0DFC,$0C2C
	dw $0700,$360D,$000C,$F90D,$0C07,$0100,$0A0E,$008C
	dw $0609,$8C0B,$0102,$1AFE,$028C,$EEF7,$0C45,$0700
	dw $57F6,$000C,$FEFF,$0C66,$F702,$45EE,$020C,$0D0A
	dw $0C2D,$FC00,$2C0D,$000C,$0D07,$0C36,$0F00,$07F8
	dw $000C,$0E01,$8C0A,$0900,$0B06,$028C,$FE02,$8C1A
	dw $F702,$45EE,$000C,$EEF7,$0C45,$0702,$57F6,$000C
	dw $FDFF,$0C66,$0A02,$2D0D,$000C,$0DFC,$0C2C,$0700
	dw $360D,$000C,$F70F,$0C04,$0100,$0A0E,$008C,$0609
	dw $8C0B,$0202,$1AFE,$028C,$F9F9,$0C05,$0100,$2609
	dw $000C,$F9F9,$0C05,$F102,$1401,$020C,$0D0B,$0C2D
	dw $FB00,$2C0D,$000C,$0D05,$0C36,$0400,$04FA,$000C
	dw $0F00,$8C0A,$0800,$0B07,$028C,$FF00,$8C1A,$0B02
	dw $3406,$008C,$FF03,$0C26,$FB00,$05EF,$020C,$F7F3
	dw $0C14,$0802,$07F2,$000C,$0A00,$8C0A,$0800,$0B02
	dw $028C,$FA00,$8C1A,$0A02,$2D0E,$008C,$0E01,$8C2C
	dw $FC00,$3606,$000C,$070C,$0C35,$0B00,$2D0F,$000C
	dw $0FFE,$0C2C,$0100,$0A0E,$008C,$0603,$0C26,$F300
	dw $14FE,$020C,$F6FB,$0C05,$0702,$04F8,$000C,$0609
	dw $8C0B,$0102,$1AFE,$028C,$08FA,$4C35,$0200,$2606
	dw $000C,$F6FA,$0C05,$F202,$14FE,$020C,$090A,$4C36
	dw $0600,$04F8,$000C,$0C0E,$4C3C,$0000,$0A0E,$008C
	dw $0608,$8C0B,$0002,$1AFE,$028C,$0CFD,$0C3C,$FA00
	dw $3609,$000C,$0402,$0C26,$FA00,$05F4,$020C,$FCF2
	dw $0C14,$0902,$360A,$004C,$F606,$0C04,$0D00,$3C0C
	dw $004C,$0D00,$8C0A,$0800,$0B05,$028C,$FD00,$8C1A
	dw $FE02,$3C0C,$000C,$0AFD,$0C36,$0200,$2604,$000C
	dw $F4FA,$0C22,$F202,$14FC,$020C,$0A09,$4C36,$0600
	dw $04F6,$000C,$0C0D,$4C3C,$0000,$0A0D,$008C,$0508
	dw $8C0B,$0002,$1AFD,$028C,$0CFE,$0C3C,$FD00,$360A
	dw $000C,$0908,$0C36,$0E00,$2D0E,$004C,$0702,$0C29
	dw $FA00,$08F7,$020C,$FFF2,$0C17,$FD02,$54F4,$000C
	dw $0E02,$0C2C,$0A00,$0B03,$028C,$FB02,$8C1A,$FD02
	dw $3609,$000C,$0B02,$8C0A,$0900,$6C18,$00CC,$FE06
	dw $8C2F,$FE00,$2EFE,$008C,$0509,$0C34,$F100,$0710
	dw $004C,$0EF8,$0C6A,$0102,$6C10,$02CC,$0E06,$8C0F
	dw $FE00,$1EFE,$028C,$06F6,$8C0D,$0C02,$2D05,$008C
	dw $1809,$0C7B,$FF00,$041D,$00CC,$0604,$8C36,$0500
	dw $5F10,$000C,$00FD,$0C3E,$F502,$4D08,$020C,$1DFF
	dw $CC04,$0100,$6A10,$020C,$0D09,$CC6C,$0802,$2D02
	dw $000C,$02FF,$0C2C,$FF00,$2E17,$000C,$1F0B,$8C54
	dw $0300,$340A,$004C,$0504,$0C2D,$0B00,$541F,$008C
	dw $05FB,$0C2C,$0700,$0F07,$000C,$0FFF,$0C1E,$F702
	dw $0D07,$020C,$0F08,$0C6E,$0B02,$6C06,$024C,$1A07
	dw $8C3B,$0600,$6CFC,$000C,$0F03,$CC35,$FA00,$2C0B
	dw $000C,$0B03,$0C2D,$FF00,$5A0A,$008C,$12FF,$8C3A
	dw $0702,$4B0A,$028C,$050A,$0C6E,$0602,$6CFC,$020C
	dw $1314,$CC54,$0600,$340A,$004C,$050A,$0C26,$FA00
	dw $14FD,$020C,$F502,$0C05,$1002,$04FF,$008C,$0602
	dw $0C0A,$FB00,$2C0E,$000C,$0E04,$0C2D,$0200,$1A0E
	dw $020C,$060A,$0C0B,$FD02,$340A,$004C,$0702,$0C29
	dw $F200,$17FF,$020C,$F7FA,$0C08,$0202,$54F5,$004C
	dw $F502,$4C54,$0C00,$2D0D,$000C,$030C,$0C3D,$FC00
	dw $2C0D,$000C,$FE01,$8C1A,$0102,$0A0E,$008C,$0609
	dw $8C0B,$0102,$290A,$000C,$02F1,$0C17,$F902,$08FA
	dw $020C,$F7FD,$0C54,$FD00,$54F7,$000C,$060C,$0C35
	dw $FB00,$2C0B,$000C,$0B0E,$0C2D,$0100,$1AFE,$028C
	dw $0E01,$8C0A,$0900,$0B06,$028C,$0903,$0C29,$FB00
	dw $08F9,$020C,$01F3,$0C17,$0E02,$3504,$000C,$F906
	dw $0C04,$0D00,$3C0C,$004C,$0A02,$0C5A,$0A00,$4B02
	dw $020C,$FA02,$0C3A,$0002,$360C,$000C,$0211,$CC2C
	dw $0C00,$3408,$008C,$0BFD,$0C2C,$0600,$2600,$000C
	dw $F0FE,$0C05,$F602,$14F8,$020C,$F20A,$0C04,$0D00
	dw $3C0C,$004C,$0C02,$8C0A,$0A00,$0B04,$028C,$FC02
	dw $8C1A,$FB02,$3503,$004C,$EE05,$0C05,$0600,$3506
	dw $00CC,$04FD,$0C2D,$0D00,$26FE,$000C,$EE05,$0C05
	dw $FD02,$14F6,$020C,$F413,$0C07,$0D00,$3C0C,$004C
	dw $0C04,$8C0A,$0C00,$0B04,$028C,$FC04,$8C1A,$0402
	dw $05EE,$000C,$0607,$CC35,$FD00,$2D05,$000C,$FE0C
	dw $0C26,$0400,$05EE,$020C,$F6FC,$0C14,$1202,$07F4
	dw $000C,$0C0D,$4C3C,$0300,$0A0C,$008C,$040B,$8C0B
	dw $0302,$1AFC,$028C,$04F0,$0C24,$F800,$02F4,$020C
	dw $FCF8,$0C30,$0A02,$3409,$008C,$FCF0,$0C14,$0300
	dw $04F4,$000C,$0C0D,$4C3C,$FF00,$0A0D,$008C,$0507
	dw $8C0B,$FF02,$1AFD,$028C,$0CFE,$0C3C,$F100,$2406
	dw $000C,$F6F9,$0C02,$F902,$30FE,$020C,$070A,$0C35
	dw $F100,$14FE,$000C,$F604,$0C04,$0E00,$3C0C,$004C
	dw $0EFF,$8C0A,$0700,$0B06,$028C,$FEFF,$8C1A,$FC02
	dw $3C0C,$000C,$0402,$0C26,$FA00,$02F4,$020C,$FCF2
	dw $0C14,$F802,$4409,$000C,$0A09,$4C36,$0600,$04F6
	dw $000C,$0C0D,$4C3C,$0000,$0A0D,$008C,$0508,$8C0B
	dw $0002,$1AFD,$028C,$0CFE,$0C3C,$0200,$2604,$000C
	dw $F4FA,$0C22,$F202,$14FC,$020C,$09F8,$0C44,$0900
	dw $360A,$004C,$F606,$0C04,$0D00,$3C0C,$004C,$0D00
	dw $8C0A,$0800,$0B05,$028C,$FD00,$8C1A,$FE02,$3C0C
	dw $000C,$F1F9,$0C02,$FA02,$68FF,$020C,$F7F2,$0C37
	dw $F802,$4407,$000C,$0A09,$4C36,$0700,$07F8,$000C
	dw $0C0D,$4C3C,$0000,$0A0D,$008C,$0508,$8C0B,$0002
	dw $1AFD,$028C,$0CFE,$0C3C,$FA00,$02F0,$020C,$F6F3
	dw $0C37,$FB02,$48FE,$020C,$07F8,$0C44,$0900,$3609
	dw $004C,$F909,$0C07,$0D00,$3C0C,$004C,$0D00,$8C0A
	dw $0800,$0B05,$028C,$FD00,$8C1A,$FE02,$3C0C,$000C
	dw $02F3,$0C24,$FB00,$42FA,$020C,$0D0A,$0C2D,$0300
	dw $3D0A,$00CC,$F2FB,$0C05,$F302,$14FA,$000C,$0E00
	dw $8C0A,$0800,$0B06,$028C,$FE00,$8C1A,$0802,$04F5
	dw $000C,$0AFB,$CC3D,$0300,$3D0B,$00CC,$FEF9,$0C42
	dw $F102,$2406,$000C,$0A0B,$0C2D,$F900,$05F6,$020C
	dw $FEF1,$0C14,$FF00,$0A10,$008C,$0807,$8C0B,$FF02
	dw $1A00,$028C,$F805,$0C04,$FA00,$3D0B,$00CC,$FEF5
	dw $0C24,$FD00,$02EE,$020C,$F6FD,$0C30,$F502,$14F6
	dw $000C,$0D09,$0C2D,$0300,$3D0C,$00CC,$0E00,$8C0A
	dw $0800,$0B06,$028C,$FE00,$8C1A,$FE02,$3D0C,$00CC
	dw $F009,$0C04,$F500,$24FE,$000C,$EEFD,$0C22,$FD02
	dw $30F6,$020C,$F6F5,$0C14,$0900,$2D0D,$000C,$0C03
	dw $CC3D,$0000,$0A0E,$008C,$0608,$8C0B,$0002,$1AFE
	dw $028C,$0CFE,$CC3D,$0900,$04F0,$000C,$F7FA,$0C6C
	dw $FF02,$25FF,$000C,$FE07,$0C41,$FF00,$02EE,$020C
	dw $0D09,$0C2D,$0300,$3D0C,$00CC,$0E00,$8C0A,$0800
	dw $0B06,$028C,$FE00,$8C1A,$FE02,$3D0C,$00CC,$F008
	dw $0C07,$1100,$24FE,$004C,$F611,$4C14,$0100,$02EE
	dw $024C,$F601,$4C30,$0902,$2D0D,$000C,$0C03,$CC3D
	dw $0000,$0A0E,$008C,$0608,$8C0B,$0002,$1AFE,$028C
	dw $0CFE,$CC3D,$FD00,$04F0,$004C,$0A07,$0C2D,$0200
	dw $3D04,$004C,$FCFD,$0C68,$F502,$47FC,$000C,$F4F5
	dw $0C37,$FD00,$00F4,$024C,$0AFA,$0C2C,$0000,$0A0E
	dw $008C,$0608,$8C0B,$0002,$1AFE,$028C,$EF03,$0C54
	dw $FC00,$10F2,$000C,$080B,$0C2D,$FA00,$2C08,$000C
	dw $0206,$CC36,$0400,$3102,$008C,$F2FC,$0C10,$F402
	dw $17FA,$020C,$0D00,$8C0A,$0800,$0B05,$028C,$FD00
	dw $8C1A,$0302,$54F1,$004C,$FEFC,$0C10,$F402,$1706
	dw $020C,$0E04,$8C31,$FF00,$54FC,$000C,$040E,$8C3D
	dw $0A00,$5F05,$000C,$F502,$0C3E,$FA02,$4DFD,$020C
	dw $FBF8,$4C3D,$0C00,$2DF7,$000C,$F400,$0C2C,$1000
	dw $3D06,$008C,$FDFC,$0C10,$F402,$1705,$020C,$0D04
	dw $8C31,$0000,$54FB,$004C,$0A0C,$8C0F,$0400,$1EFA
	dw $028C,$F808,$4C2C,$1200,$2DFE,$000C,$FBFD,$4C3D
	dw $FC00,$0D02,$028C,$FCFC,$0C10,$F402,$1704,$020C
	dw $0C04,$8C31,$0100,$54FA,$004C,$FA01,$4C54,$0F00
	dw $3D0C,$008C,$0D03,$0C5A,$0300,$3AFD,$020C,$050B
	dw $0C4B,$0E02,$2C00,$00CC,$0717,$8C2D,$0B00,$3BFC
	dw $000C,$FDFC,$0C10,$F402,$1705,$020C,$0D04,$8C31
	dw $0200,$54FC,$004C,$FC02,$4C54,$0F00,$3D0B,$008C
	dw $0C03,$0C5A,$0300,$3AFC,$020C,$040B,$0C4B,$1602
	dw $2D0C,$008C,$FDFC,$0C08,$F402,$1705,$020C,$0D04
	dw $0C29,$0200,$54FC,$004C,$FA02,$0C3A,$0A00,$360A
	dw $004C,$FA02,$0C3A,$0A02,$4B02,$020C,$0C12,$CC2D
	dw $0A00,$2C0C,$008C,$0A02,$0C5A,$FB00,$08FD,$020C
	dw $05F3,$0C17,$0302,$290D,$000C,$FC01,$4C54,$0000
	dw $3AF8,$000C,$0808,$4C36,$0000,$3AF8,$020C,$0008
	dw $0C4B,$0F02,$2D0C,$00CC,$0C06,$8C2C,$0000,$5A08
	dw $000C,$FAF8,$0C10,$0000,$290A,$000C,$FAF8,$0C10
	dw $F002,$1702,$020C,$0D0C,$0C2D,$FA00,$2C0D,$000C
	dw $0D05,$0C36,$0300,$04FB,$000C,$0F00,$8C0A,$0800
	dw $0B07,$028C,$FF00,$8C1A,$0C02,$3608,$004C,$02FA
	dw $4C04,$FA00,$7008,$008C,$10FA,$8C50,$0202,$6108
	dw $028C,$FA03,$8C2E,$0B00,$0F0A,$008C,$FA03,$8C1E
	dw $FB02,$0D02,$028C,$040F,$8C2D,$0F00,$2D04,$008C

DATA_0DE9F5:
	dw $FE00,$0200

YI_NorSpr134_BabyBowser_RideYoshiRt:
;$0DE9F9
	LDA.w $60A8
	BEQ.b CODE_0DEA21
	STZ.w $1060
	CLC
	ADC.w #$0200
	CMP.w #$0400
	BCC.b CODE_0DEA44
	LDA.w $7A98,x
	BNE.b CODE_0DEA4A
	LDA.w #$0008
	STA.w $7A98,x
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$21
	BEQ.b CODE_0DEA4A
	BRA.b CODE_0DEA44

CODE_0DEA21:
	LDA.w $60C2
	BNE.b CODE_0DEA2B
	LDA.w $0035
	BNE.b CODE_0DEA44
CODE_0DEA2B:
	LDY.w $1060
	INY
	INY
	STY.w $1060
	BPL.b CODE_0DEA3A
	LDY.b #$7F
	STY.w $1060
CODE_0DEA3A:
	CPY.b #$20
	BCC.b CODE_0DEA44
	TXY
	JSR.w CODE_0DCF8F
	BRA.b CODE_0DEA5F

CODE_0DEA44:
	LDA.w #$0020
	STA.w $7402,x
CODE_0DEA4A:
	LDA.w #$003F
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0047
	STA.w $7A38,x
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0DEA5F:
	LDA.w $0035
	AND.w #$0300
	CMP.w $0D98
	BEQ.b CODE_0DEA8F
	STA.w $0D98
	CMP.w #$0000
	BEQ.b CODE_0DEA8F
	LDY.b $18,x
	BEQ.b CODE_0DEA83
	LDA.w $7A96,x
	BEQ.b CODE_0DEA83
	CPY.b #$04
	BPL.b CODE_0DEAA8
	INC.b $18,x
	BRA.b CODE_0DEA87

CODE_0DEA83:
	LDY.b #$01
	STY.b $18,x
CODE_0DEA87:
	LDA.w #$0040
	STA.w $7A96,x
	BRA.b CODE_0DEA96

CODE_0DEA8F:
	LDA.w $7A96,x
	BNE.b CODE_0DEA96
	STZ.b $18,x
CODE_0DEA96:
	LDA.w $60D4
	BEQ.b CODE_0DEAA3
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_0DEAA8
CODE_0DEAA3:
	LDA.w $61B2
	BPL.b CODE_0DEAD2
CODE_0DEAA8:
	STZ.b $18,x
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $0390
	LDY.w $60C4
	LDA.w DATA_0DE9F5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $75E0,x
	JSR.w CODE_0DC7B3
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7AF8,x
	ASL
	STA.w $7542,x
CODE_0DEAD2:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr08E_BowserRoomKamek_Init:
;$0DEAD3
	LDA.w #$0080
	STA.w $7E1A
	LDA.w #$0134
	JSL.l CODE_03A364
	STY.w $105E
	STZ.w $105C
	LDA.w !RAM_YI_Level_BabyBowerHasBeenVisitedBeforeFlagLo
	BEQ.b CODE_0DEB33
	LDA.w #$0100
	STA.w $70E2,y
	LDA.w #$07B0
	STA.w $7182,y
	LDA.w #$000C
	STA.w $7402,y
	LDA.w #$0013
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDX.b #$1C
CODE_0DEB05:
	LDA.l DATA_5FEA3C,x
	STA.l $702F2E,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	LDA.l DATA_5FEA00,x
	STA.l $702E2E,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	LDA.l DATA_5FEA1E,x
	STA.l $702E4E,x
	STA.l YI_Global_PaletteMirror[$71].LowByte,x
	DEX
	DEX
	BPL.b CODE_0DEB05
	LDX.b $12
	JML.l CODE_03A31E

CODE_0DEB33:
	INC.w !RAM_YI_Level_BabyBowerHasBeenVisitedBeforeFlagLo
	LDA.w #$0150
	STA.w $70E2,y
	LDA.w #$077D
	STA.w $7182,y
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w #$0012
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	JSL.l CODE_029507
	BRA.b CODE_0DEB58

ADDR_0DEB54:
	JML.l CODE_03A31E

CODE_0DEB58:
	INC.w $7402,x
	RTL

;---------------------------------------------------------------------------

DATA_0DEB5C:
	dw CODE_0DEBAA
	dw CODE_0DEBE7
	dw CODE_0DEC74
	dw CODE_0DECE2
	dw CODE_0DED47
	dw CODE_0DEDAC
	dw CODE_0DEE00
	dw CODE_0DEEAB
	dw CODE_0DEEEC
	dw CODE_0DEFF1

YI_NorSpr08E_BowserRoomKamek_Main:
;$0DEB70
	LDY.w $7402,x
	BNE.b CODE_0DEB8E
	JSL.l CODE_03AA52
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	LDA.w #$8000
	STA.w $6000,y
	STA.w $6008,y
	SEP.b #$10
CODE_0DEB8E:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_0DEBA1
	JSL.l CODE_03B697
	JSL.l CODE_03B716
CODE_0DEBA1:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0DEB5C,x)
	RTL

CODE_0DEBAA:
	TYX
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$0060
	BMI.b CODE_0DEBE6
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0100
	STA.w $617A
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w $7C16,x
	CMP.w #$0068
	BPL.b CODE_0DEBD8
	STZ.w $617A
	LDA.w $60A8
	BNE.b CODE_0DEBE6
	INC.b $76,x
	RTS

CODE_0DEBD8:
	LDA.w #$0100
	CMP.w $60A8
	BPL.b CODE_0DEBE6
	STA.w $60A8
	STA.w $60B4
CODE_0DEBE6:
	RTS

CODE_0DEBE7:
	TYX
	STY.w $0C1E
	LDA.w $60B0
	CMP.w #$0020
	BPL.b CODE_0DEC1A
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr08E_BowserRoomKamek
	BEQ.b CODE_0DEC0A
	LDA.w #$0114
	STA.b $18,x
	LDA.w #$000C
	STA.b $78,x
	LDA.w #$0114
	BRA.b CODE_0DEC0D

CODE_0DEC0A:
	LDA.w #$0111
CODE_0DEC0D:
	STA.l $704070
	INC.w $0071
	INC.w !RAM_YI_Level_MessageBoxState 
	INC.b $76,x
	RTS

CODE_0DEC1A:
	INC.w !RAM_YI_Global_Layer1XPosLo
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	RTS

DATA_0DEC24:
	db $08,$05,$08,$07,$08,$05,$08,$07,$08,$05,$08,$07,$09,$0A,$09,$07
	db $09,$0A,$09,$07,$09,$0A,$09,$07,$09,$0A,$09,$07,$09,$0A,$09,$07
	db $09,$0A,$09,$07,$09,$0A,$09,$07

DATA_0DEC4C:
	db $02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$20,$02,$06,$02,$06
	db $02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06,$02,$06
	db $02,$06,$02,$06,$02,$06,$02,$01

CODE_0DEC74:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DECE1
	LDY.b $16,x
	CPY.b #$28
	BMI.b CODE_0DECBF
	STZ.w $0071
	PHB
	REP.b #$10
	LDX.w #$702D6C
	LDY.w #$702F6C
	LDA.w #$01FF
	MVN $702F6C>>16,$702D6C>>16
	SEP.b #$10
	PLB
	LDX.b #$1C
CODE_0DEC97:
	LDA.l DATA_5FEA00,x
	STA.l $70302E,x
	LDA.l DATA_5FEA1E,x
	STA.l $70304E,x
	LDA.l DATA_5FF5B0,x
	STA.l $70312E,x
	DEX
	DEX
	BPL.b CODE_0DEC97
	LDX.b $12
	LDA.w #$0000
	STA.l $70336C
	INC.b $76,x
	RTS

CODE_0DECBF:
	INY
	STY.b $16,x
	LDA.w DATA_0DEC24-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0DEC4C-$01,y
	AND.w #$00FF
	STA.w $7A98,x
	TYA
	AND.w #$0007
	BNE.b CODE_0DECE1
	LDA.w #!Define_YI_SoundID5B_KamekTalk
	JSL.l CODE_0085D2
CODE_0DECE1:
	RTS

CODE_0DECE2:
	TYX
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0DED46
	LDA.l $70336C
	BNE.b CODE_0DECF4
	LDA.w #$0009
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_0DECF4:
	CMP.w #$0020
	BCS.b CODE_0DED13
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_0DED13:
	LDY.w $105C
	BEQ.b CODE_0DED46
	LDA.w #$0040
	STA.w $7A98,x
	LDA.w #$000B
	STA.w $7402,x
	INC.b $76,x
	LDX.b #$1C
CODE_0DED28:
	LDA.l $70302E,x
	STA.l $702E2E,x
	LDA.l $70304E,x
	STA.l $702E4E,x
	LDA.l $70312E,x
	STA.l $702F2E,x
	DEX
	DEX
	BPL.b CODE_0DED28
	LDX.b $12
CODE_0DED46:
	RTS

CODE_0DED47:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DED79
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0DED67
	LDA.w #$0112
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
	STZ.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $0071
	INC.b $76,x
	RTS

CODE_0DED67:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$000C
	STA.w $7402,x
CODE_0DED79:
	RTS

DATA_0DED7A:
	db $0D,$0C,$0B,$0C,$0D,$0C,$0B,$0C,$0D,$0C,$0B,$0C,$0D,$0C,$0B,$0C
	db $0D,$0C,$0B,$0C,$0D,$0C,$0B,$0C,$0D

DATA_0DED93:
	db $04,$02,$04,$02,$10,$02,$04,$02,$04,$02,$04,$02,$04,$02,$04,$02
	db $04,$02,$04,$02,$04,$02,$04,$02,$01

CODE_0DEDAC:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0DEDF7
	LDY.b $16,x
	CPY.b #$19
	BMI.b CODE_0DEDD5
	LDX.b #$1C
CODE_0DEDBA:
	LDA.l DATA_5FEA3C,x
	STA.l $70312E,x
	DEX
	DEX
	BPL.b CODE_0DEDBA
	LDX.b $12
	STZ.w $0071
	LDA.w #$0000
	STA.l $70336C
	INC.b $76,x
	RTS

CODE_0DEDD5:
	INY
	STY.b $16,x
	LDA.w DATA_0DED7A-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0DED93-$01,y
	AND.w #$00FF
	STA.w $7A98,x
	TYA
	AND.w #$0007
	BNE.b CODE_0DEDF7
	LDA.w #!Define_YI_SoundID5B_KamekTalk
	JSL.l CODE_0085D2
CODE_0DEDF7:
	RTS

DATA_0DEDF8:
	dw $FF00,$FEC0,$FE40,$FE00

CODE_0DEE00:
	TYX
	LDY.w $105E
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	CMP.w #$0012
	BPL.b CODE_0DEE19
	LDA.w #$000E
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_0DEE19:
	LDA.w $7A98,x
	BNE.b CODE_0DEE2D
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0DEE2D:
	JSR.w CODE_0DEE80
	LDA.w $7A96,x
	BNE.b CODE_0DEE7F
	LDA.w #$0004
	STA.w $7A96,x
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w DATA_0DEDF8,y
	STA.b $00
	LDA.b $11
	AND.w #$0006
	TAY
	LDA.w DATA_0DEDF8,y
	STA.b $02
	LDA.w #!Define_YI_AmbSpr227
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w #$000C
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000A
	STA.w $7142,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0010
	STA.w $7782,y
	STA.w $7500,y
CODE_0DEE7F:
	RTS

CODE_0DEE80:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	CMP.w #$007C
	BMI.b CODE_0DEEAA
	LDA.l $70336C
	CMP.w #$0020
	BPL.b CODE_0DEEAA
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0DEEAA:
	RTS

CODE_0DEEAB:
	TYX
	LDY.w $7D36,x
	BEQ.b CODE_0DEED4
	JSL.l CODE_03AD74
	LDA.w #$0100
	STA.w $7A36,x
	JSR.w CODE_0DEFA2
	LDA.w #$0002
	STA.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0010
	STA.w $70E2,x
	STZ.w $7402,x
	INC.b $76,x
	RTS

CODE_0DEED4:
	LDA.w $7A98,x
	BNE.b CODE_0DEEE8
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0DEEE8:
	JSR.w CODE_0DEE80
CODE_0DEEEB:
	RTS

CODE_0DEEEC:
	TYX
	LDY.w $105C
	CPY.b #$01
	BEQ.b CODE_0DEF29
	LDY.w $105E
	LDA.w $7402,y
	CMP.w #$0018
	BNE.b CODE_0DEEEB
	LDA.w #$FD80
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0180
	STA.w $75E0,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$2000
	STA.w $6FA2,x
	STZ.b $16,x
	INC.b $76,x
	LDA.w #!Define_YI_SoundID0C_ShellHit2
	JSL.l CODE_0085D2
	RTS

CODE_0DEF29:
	LDY.w $105E
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0DEF90
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7182,x
	CLC
	ADC.w #$0018
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $00
	LDA.w #$000C
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $105E
	LDA.w $7CD8,y
	SEC
	SBC.b $00
	CLC
	ADC.w $7BB8,y
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BMI.b CODE_0DEF90
	LDA.w $7A36,x
	SEC
	SBC.w #$0018
	CMP.w #$0020
	BPL.b CODE_0DEF9F
	LDA.w #$0020
	BRA.b CODE_0DEF9F

CODE_0DEF90:
	LDA.w $7A36,x
	CLC
	ADC.w #$0004
	CMP.w #$0060
	BMI.b CODE_0DEF9F
	LDA.w #$0060
CODE_0DEF9F:
	STA.w $7A36,x
CODE_0DEFA2:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #(FXDATA_550000+$60C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$60C1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

DATA_0DEFE5:
	dw $0008,$FFFE

DATA_0DEFE9:
	dw $0060,$0020

DATA_0DEFED:
	dw $0001,$FFFF

CODE_0DEFF1:
	TYX
	JSL.l CODE_03A2C7
	BCC.b CODE_0DF000
	INC.w $105C
	PLA
	JML.l CODE_03A31E

CODE_0DF000:
	LDY.b $16,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0DEFE5,y
	STA.w $7A36,x
	SEC
	SBC.w DATA_0DEFE9,y
	EOR.w DATA_0DEFED,y
	BMI.b CODE_0DF022
	LDA.w DATA_0DEFE9,y
	STA.w $7A36,x
	LDA.b $16,x
	EOR.w #$0002
	STA.b $16,x
CODE_0DF022:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w $75E0,x
	BNE.b CODE_0DF034
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_0DF034:
	JMP.w CODE_0DEFA2

;---------------------------------------------------------------------------

YI_NorSpr128_GroundRippleInBabyBowerRoom_Init:
;$0DF037
	RTL

;---------------------------------------------------------------------------

YI_NorSpr128_GroundRippleInBabyBowerRoom_Main:
;$0DF038
	JSR.w CODE_0DF058
	JSL.l CODE_03AF23
	JSR.w CODE_0DF082
	JSR.w CODE_0DF0A3
	JSR.w CODE_0DF0B9
	JSR.w CODE_0DF182
	RTL

DATA_0DF04C:
	dw $FFE8,$0018

DATA_0DF050:
	dw $0002,$FFFE

DATA_0DF054:
	dw $0020,$FFE0

CODE_0DF058:
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDY.w $7400,x
	LDA.w DATA_0DF04C,y
	CLC
	ADC.w $7680,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w DATA_0DF050,y
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w DATA_0DF054,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0B96EA>>16
	LDA.w #FXCODE_0B96EA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_0DF082:
	LDA.b $76,x
	BEQ.b CODE_0DF092
	CLC
	ADC.b $78,x
	STA.b $78,x
	BPL.b CODE_0DF0A2
	PLA
	JML.l CODE_03A31E

CODE_0DF092:
	LDA.b $78,x
	CLC
	ADC.w #$00C0
	CMP.w #$0A00
	BMI.b CODE_0DF0A0
	LDA.w #$0A00
CODE_0DF0A0:
	STA.b $78,x
CODE_0DF0A2:
	RTS

CODE_0DF0A3:
	LDY.w $7D36,x
	BPL.b CODE_0DF0A2
	LDA.w $7AF8,x
	BNE.b CODE_0DF0A2
	STZ.w $60D4
	JSL.l CODE_03A858
CODE_0DF0B4:
	RTS

DATA_0DF0B5:
	dw $FE80,$0180

CODE_0DF0B9:
	LDA.w $7AF6,x
	BNE.b CODE_0DF0B4
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0DF0CB:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0DF0B4
	BEQ.b CODE_0DF0B4
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BEQ.b CODE_0DF0E7
CODE_0DF0DC:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0DF0CB

CODE_0DF0E7:
	CPY.w $105E
	BNE.b CODE_0DF13F
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0009
	BPL.b CODE_0DF0DC
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	BMI.b CODE_0DF0DC
	LDY.w $7400,x
	LDA.w DATA_0DF0B5,y
	LDY.w $105E
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0047
	STA.w $7A36,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$004E
	STA.w $7A38,y
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID8A_BabyBowserHurt
	LDY.w $1062
	CPY.b #$02
	BMI.b CODE_0DF139
	LDA.w #!Define_YI_SoundID8E_BabyBowserDefeated
CODE_0DF139:
	JSL.l CODE_0085D2
CODE_0DF13D:
	BRA.b CODE_0DF0DC

CODE_0DF13F:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr128_GroundRippleInBabyBowerRoom
	BNE.b CODE_0DF0DC
	TYA
	CMP.w $7A36,x
	BEQ.b CODE_0DF0DC
	CMP.b $18,x
	BEQ.b CODE_0DF0DC
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BPL.b CODE_0DF0DC
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0DF168
	JMP.w CODE_0DF0DC

CODE_0DF168:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CLC
	ADC.w #$FF40
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.b $76,x
	CLC
	ADC.w #$FF40
	STA.b $76,x
	STY.b $18,x
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	BRA.b CODE_0DF13D

CODE_0DF182:
	LDA.w $7A96,x
	BNE.b CODE_0DF19A
	LDA.b $10
	AND.w #$0003
	CLC
	ADC.w #$0004
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
CODE_0DF19A:
	RTS

DATA_0DF19B:
	dw $0459,$052B,$0528,$0525,$0522,$004E,$004D

CODE_0DF1A9:
	TYX
	LDA.w $7A96,x
	BEQ.b CODE_0DF20F
	CMP.w #$0080
	BNE.b CODE_0DF1B9
	LDY.b #$0A
	STY.w !RAM_YI_Global_PlayMusicLo
CODE_0DF1B9:
	LSR
	BNE.b CODE_0DF20C
	LDY.b #$02
	STY.w $011C
	LDA.w #$1100
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w !RAM_YI_Global_HDMAEnable
	EOR.w #$00DE
	STA.w !RAM_YI_Global_HDMAEnable
	LDA.w #$7FFF
	STA.l YI_Global_PaletteMirror[$00].LowByte
	LDA.w #$2800
	STA.w $0C18
	LDA.w #$0007
	STA.w $0C14
	LDA.w #$6800
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0002
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$01CE
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0400
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08AA8B>>16
	LDA.w #FXCODE_08AA8B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$B400
	STA.w $0CF9
CODE_0DF20C:
	JMP.w CODE_0DDEAA

CODE_0DF20F:
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	LDA.w $6094
	CMP.w #$0280
	BCS.b CODE_0DF232
	ADC.w #$0010
	CMP.w #$0280
	BCC.b CODE_0DF22B
	LDA.w #$0280
CODE_0DF22B:
	STA.w $0C23
	STA.w $0C1E
	RTS

CODE_0DF232:
	STA.w $7E18
	STZ.w $0C1E
	REP.b #$10
	LDA.w $0C14
	ASL
	TAY
	LDX.w DATA_0DF19B-$02,y
	CPY.w #$000A
	BCC.b CODE_0DF25C
	BEQ.b CODE_0DF256
	TXA
	JSL.l CODE_00B753
	LDX.w #$6800
	LDA.w #$0800
	BRA.b CODE_0DF286

CODE_0DF256:
	LDA.w #$5600
	STA.w $0C18
CODE_0DF25C:
	LDA.l DATA_06F95E,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.l DATA_06F95E+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	SEP.b #$10
	LDX.b #FXCODE_0A8000>>16
	LDA.w #FXCODE_0A8000
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDX.w #$705800
	LDA.w #$0400
CODE_0DF286:
	STA.b $00
	LDY.w #$705800>>16
	STY.w $0001
	LDY.w $0C18
	JSL.l CODE_00BEA6
	SEP.b #$10
	LDX.b $12
	LDA.b $00
	LSR
	ADC.w $0C18
	STA.w $0C18
	DEC.w $0C14
	BEQ.b CODE_0DF2A8
	RTS

CODE_0DF2A8:
	LDX.b #$1C
CODE_0DF2AA:
	LDA.l DATA_5FC328,x
	STA.l $702D6E,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	LDA.l DATA_5FEA3C,x
	STA.l $702F2E,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	DEX
	DEX
	BPL.b CODE_0DF2AA
	LDX.b $12
	JSR.w CODE_0DD5F7
	LDA.w #$7FFF
	STA.l YI_Global_PaletteMirror[$00].LowByte
	STZ.w $61CE
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	JSL.l CODE_028922
	STZ.w $60C4
	LDA.w #$02C8
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$07A0
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0358
	STA.w $70E2,x
	LDA.w #$0298
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0047
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$004E
	STA.w $7A38,x
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.b $16,x
	SEP.b #$20
	LDA.b #$2C
	STA.w $7180,x
	REP.b #$20
	RTS

CODE_0DF32A:
	JSR.w CODE_0DCF8F
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0DF357
	LDY.w $7402,x
	CPY.b #$0F
	BNE.b CODE_0DF357
	LDA.w #!Define_YI_SoundID8E_BabyBowserDefeated
	JSL.l CODE_0085D2
CODE_0DF343:
	LDA.w #$004E
	STA.w $7A36,x
	LDA.w #$0056
	STA.w $7A38,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0DF357:
	RTS

CODE_0DF358:
	JSR.w CODE_0DCF8F
	BCC.b CODE_0DF35F
	INC.b $76,x
CODE_0DF35F:
	RTS

CODE_0DF360:
	TYX
	LDY.b $16,x
	BNE.b CODE_0DF382
	LDA.w #$0125
	JSL.l CODE_03A34C
	BCC.b CODE_0DF382
	LDA.w #$0000
	STA.w $70E2,y
	INC.b $16,x
	LDA.w #$0015
	STA.w !RAM_YI_Global_MainScreenLayers
	STZ.w $6098
	STZ.w $60A0
CODE_0DF382:
	RTS

CODE_0DF383:
	TYX
	REP.b #$10
	LDA.w #$005E
	JSL.l CODE_00B753
	LDX.w #$706800
	LDA.w #$706800>>16
	STA.w $0001
	LDY.w #$5800
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$10
	LDX.b #$1C
CODE_0DF3A4:
	LDA.l DATA_5FF592,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	DEX
	DEX
	BPL.b CODE_0DF3A4
	LDX.b $12
	INC.b $76,x
	LDA.w #$9000
	STA.w $0C18
	LDA.w #$0480
	STA.w $7E1A
	LDA.w #!Define_YI_PlayerState26
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $617E
	STZ.w $61F6
	LDA.w #$0011
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w #DATA_0DF3E8
	STA.b $18,x
	LDA.w #$9000
	STA.w $0C18
	LDY.b #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STY.w $012E
	LDY.b #$1A
	STY.w $012D
	RTS

table "Tables/Fonts/Main.txt"

DATA_0DF3E8:
	db "Thus, due to the marvelous"
	dw $0AFF
	db "team work of the Yoshi clan,"
	dw $09FF
	db "    the twins are reunited."
	dw $0AFF
	dw $0AFF
	dw $09FF
	db "The captured stork is freed"
	dw $0AFF
	db "  by Yoshi, and sets about"
	dw $09FF
	db "  his duty and finally makes"
	dw $0AFF
	db "  the long awaited delivery!"
	dw $09FF
	dw $0AFF
	db "Thank you, Yoshi! The twins"
	dw $09FF
	db " will meet the parents soon!"
	dw $09FF
	dw $FFFF

cleartable

CODE_0DF4F7:
	TYX
	LDA.w #DATA_0DF3E8>>16
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_09F7BC>>16
	LDA.w #FXCODE_09F7BC
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CPY.b #$FF
	BEQ.b CODE_0DF528
	LDA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	STA.b $18,x
	LDA.w $0C18
	STA.w $0CF9
	CLC
	ADC.w #$0300
	STA.w $0C18
	RTS

CODE_0DF528:
	INC.b $76,x
	LDX.b #FXCODE_09F77B>>16
	LDA.w #FXCODE_09F77B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$B400
	STA.w $0CF9
	STZ.b $18,x
	LDA.w #$0A00
	STA.w $7A96,x
	LDA.w #$0300
	STA.w $7A98,x
	LDA.w #$7FFF
	STA.l $702D6E
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STZ.w $6098
	STZ.w !RAM_YI_Global_Layer3XPosLo
	STZ.w $60A0
	STZ.w !RAM_YI_Global_Layer3YPosLo
	LDY.b #$01
	STY.w !RAM_YI_Global_BG3And4TileDataDesignation
	LDA.w #$0015
	STA.w !RAM_YI_Global_MainScreenLayers
	LDY.b #$20
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDY.b #$B1
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w !RAM_YI_Global_HDMAEnable
	EOR.w #$001E
	STA.w !RAM_YI_Global_HDMAEnable
	STZ.w $0948
	LDA.w #$0040
	JSL.l CODE_03A34C
	LDA.w #$04F0
	STA.w $70E2,y
	LDA.w #$07A0
	STA.w $7182,y
	LDA.w #$0041
	JSL.l CODE_03A34C
	LDA.w #$0530
	STA.w $70E2,y
	LDA.w #$0732
	STA.w $7182,y
	LDY.b #!SuperFX_ScreenMode_ScreenHeight_160pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STY.w $012E
	LDY.b #$16
	STY.w $012D
	RTS

CODE_0DF5B2:
	TYX
	LDA.w $60A0
	CMP.w #$00F0
	BCS.b CODE_0DF5F7
	LDA.w $7A98,x
	BNE.b CODE_0DF608
	INC.w $60A0
	LDA.w #$0004
	STA.w $7A98,x
	STZ.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$7FFF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	CLC
	ADC.w #$0002
	CMP.w #$0100
	BCC.b CODE_0DF5E3
	LDA.w #$0100
CODE_0DF5E3:
	STA.b $18,x
	LDX.b #FXCODE_08E132>>16
	LDA.w #FXCODE_08E132
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w $0948
	RTS

CODE_0DF5F7:
	LDA.w $7A96,x
	BNE.b CODE_0DF608
	LDA.w #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.w #!Define_YI_GameMode16
	STA.w !RAM_YI_Global_CurrentGameMode
CODE_0DF608:
	RTS

;---------------------------------------------------------------------------

DATA_0DF609:
	dw $0180,$00F8,$0060,$FFF0,$0128,$00A0,$0048

DATA_0DF617:
	dw $0180,$01FF,$0180,$0180,$01FF,$0180,$01FF

DATA_0DF625:
	dw $0000,$0020,$0040

DATA_0DF62B:
	dw $0100,$00C0,$0080

DATA_0DF631:
	dw $0000,$0020,$0040

YI_NorSpr0CF_BowserRocks_Init:
;$0DF637
	JSL.l CODE_03AEEB
	LDY.b #$04
CODE_0DF63D:
	PHY
	LDA.w DATA_0DF625,y
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w DATA_0DF62B,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w DATA_0DF631,y
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_548000+$00E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$00E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	DEY
	DEY
	BPL.b CODE_0DF63D
	INC.w $0CF9
	LDY.b #$1C
	LDX.w $011C
	CPX.b #$02
	BNE.b CODE_0DF67B
	LDY.b #$3C
CODE_0DF67B:
	PHB
	LDX.b #$7021C2>>16
	PHX
	PLB
	LDX.b #$1C
CODE_0DF682:
	LDA.l DATA_5FF4A0,x
	STA.w $702F2E,y
	STA.w $7021C2,y
	STA.w $70312E,y
	DEY
	DEY
	DEX
	DEX
	BPL.b CODE_0DF682
	PLB
	LDX.b $12
	LDA.w #$0010
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0DF6AA
	LDY.w $011C
	CPY.b #$02
	BEQ.b CODE_0DF6AA
	LDA.w #$0040
CODE_0DF6AA:
	STA.w $1072
	STA.b $18,x
	RTL

;---------------------------------------------------------------------------

DATA_0DF6B0:
	dw $0200,$0204,$0004,$0400,$0202,$0402,$0004,$0200

DATA_0DF6C0:
	dw $0800,$2001,$2001

DATA_0DF6C6:
	dw $0007,$0005,$0006

DATA_0DF6CC:
	dw $0C00,$0800,$0A00

DATA_0DF6D2:
	dw $FC00,$0500,$FF00,$0300,$FE00,$FD00,$0400,$0200
	dw $FD80,$0480,$FE80,$0280,$FD80,$FE80,$0380,$0180

DATA_0DF6F2:
	dw $0400,$FB00

DATA_0DF6F6:
	dw $D000,$3000

DATA_0DF6FA:
	db $40,$10,$50,$20

YI_NorSpr0CF_BowserRocks_Main:
;$0DF6FE
	JSL.l CODE_03AF23
	LDA.w $1072
	BNE.b CODE_0DF70A
	JMP.w CODE_0DF7C1

CODE_0DF70A:
	LDA.b $14
	AND.w #$000F
	ORA.w #$0040
	STA.w $61C6
	LDA.w $7AF6,x
	BNE.b CODE_0DF730
	LDA.b $10
	AND.w #$0003
	TAY
	LDA.w DATA_0DF6FA,y
	AND.w #$00FF
	STA.w $7AF6,x
	LDA.w #!Define_YI_SoundID99_BigExplosion
	JSL.l CODE_0085D2
CODE_0DF730:
	LDA.w $7A96,x
	BEQ.b CODE_0DF736
	RTL

CODE_0DF736:
	LDA.w #$0010
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0DF741
	LDA.w #$0008
CODE_0DF741:
	STA.w $7A96,x
	LDA.b $18,x
	BEQ.b CODE_0DF7C0
	LDA.w #$0008
	JSL.l CODE_03A364
	BCC.b CODE_0DF7C0
	DEC.b $18,x
	PHY
	LDA.b $18,x
	AND.w #$000F
	TAY
	LDX.w DATA_0DF6B0,y
	PLY
	TXA
	LSR
	LSR
	STA.w $7402,y
	LDA.w DATA_0DF6C0,x
	STA.w $7040,y
	LDA.w DATA_0DF6C6,x
	STA.w $74A2,y
	LDA.w DATA_0DF6CC,x
	STA.b $00
	LDA.b $10
	AND.w #$001E
	TAX
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w DATA_0DF6D2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	CLC
	ADC.b $00
	STA.w $70E2,y
	LDA.b $10
	AND.w #$00C0
	ORA.w $7042,y
	LDX.w $011C
	CPX.b #$02
	BNE.b CODE_0DF7A5
	ORA.w #$002E
	PHA
	LDA.w #$0000
	STA.w $74A2,y
	PLA
CODE_0DF7A5:
	STA.w $7042,y
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w DATA_0DF6F2,x
	STA.w $7182,y
	LDA.w DATA_0DF6F6,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
CODE_0DF7C0:
	RTL

CODE_0DF7C1:
	LDA.b $18,x
	BNE.b CODE_0DF7F1
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0DF842
	LDX.b #$1C
CODE_0DF7CC:
	LDA.l DATA_5FF4DC,x
	STA.l $702F2E,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	DEX
	DEX
	BPL.b CODE_0DF7CC
	LDX.b $12
	STZ.w $74A2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$00F0
	STA.w $7182,x
	LDA.w #$0005
	STA.b $18,x
	RTL

CODE_0DF7F1:
	LDA.b $14
	ASL
	ASL
	ASL
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_548000+$00E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$00E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_08877E>>16
	LDA.w #FXCODE_08877E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	LDA.w $7682,x
	CMP.w #$00F0
	BMI.b CODE_0DF8A6
	LDY.w $1070
	CPY.b #$0E
	BCS.b CODE_0DF842
	DEC.b $18,x
	BNE.b CODE_0DF846
CODE_0DF842:
	JML.l CODE_03A31E

CODE_0DF846:
	INY
	INY
	STY.w $1070
	LDA.w DATA_0DF609-$02,y
	CLC
	ADC.w $7E18
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0200
	STA.w $7182,x
	LDA.w DATA_0DF617-$02,y
	STA.b $76,x
	LDA.w #$07C0
	STA.b $78,x
	LDA.w #$0800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$00AC
	JSL.l CODE_03A364
	BCC.b CODE_0DF89F
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w #$07C0
	STA.w $7182,y
	LDA.w #$0080
	STA.w $7A96,y
	LDA.b $76,x
	INC
	XBA
	AND.w #$00FF
	ASL
	CLC
	ADC.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0040
	STA.w $7A98,y
CODE_0DF89F:
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JML.l CODE_0085D2

CODE_0DF8A6:
	LDA.w $7182,x
	CMP.w #$07F0
	BPL.b CODE_0DF8E9
	CMP.b $78,x
	BMI.b CODE_0DF8E9
	STA.w $0093
	LDA.w $70E2,x
	SEC
	SBC.w #$0010
	STA.w $0091
	LDA.b $76,x
	INC
	ASL
	XBA
	TAY
	DEY
	STY.w $0095
	LDA.w #$0003
	STA.w $008F
	JSL.l CODE_109295
	LDX.b $12
	LDA.b $78,x
	CLC
	ADC.w #$0010
	STA.b $78,x
	CMP.w #$07D0
	BNE.b CODE_0DF8E9
	LDA.w #!Define_YI_SoundID99_BigExplosion
	JSL.l CODE_0085D2
CODE_0DF8E9:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr026_BowserFightGiantEgg_Init:
;$0DF8EA
	RTL

;---------------------------------------------------------------------------

DATA_0DF8EB:
	db $00,$00,$00,$00,$00,$00,$00,$01,$01,$01,$02,$02,$02,$03,$03,$03

YI_NorSpr026_BowserFightGiantEgg_Main:
;$0DF8FB
	LDA.w $7D38,x
	BNE.b CODE_0DF903
	JMP.w CODE_0DFA74

CODE_0DF903:
	LDA.w #$0004
	JSR.w CODE_0DFA94
	LDA.w $7682,x
	CLC
	ADC.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $7682,x
	CMP.w #$FFC0
	BPL.b CODE_0DF98B
	LDA.w $70E2,x
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0080
	STA.w $7182,x
	LDA.b $10
	AND.w #$0003
	BNE.b CODE_0DF93F
	LDA.w #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_0085D2
	TXY
	JML.l CODE_03B426

CODE_0DF93F:
	LDA.w #!Define_YI_SoundID2E_ClankSound7
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_NorSpr091_4RedToadies
	TXY
	JSL.l CODE_03A377
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0010
	STA.b $18,x
	LDA.w #$000C
	STA.w $7540,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	LDA.w #$0004
	STA.w $74A2,x
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$1801
	STA.w $7040,x
CODE_0DF98A:
	RTL

CODE_0DF98B:
	LDA.w #$0100
	SEC
	SBC.w !REGISTER_SuperFX_R6_MultiplierLo
	LSR
	LSR
	LSR
	LSR
	CMP.w #$000F
	BCC.b CODE_0DF99F
	JML.l CODE_03A31E

CODE_0DF99F:
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0DF98A
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	CMP.w $1068
	BPL.b CODE_0DF9C5
	LDA.w $7682,x
	CMP.w #$0090
	BPL.b CODE_0DF9C2
	LDY.b #$20
	JMP.w CODE_0DFA65

CODE_0DF9C2:
	JMP.w CODE_0DFA63

CODE_0DF9C5:
	CMP.w #$0100
	BMI.b CODE_0DFA1D
	LDY.w $7B56,x
	BNE.b CODE_0DF9D8
	CMP.w #$0800
	BMI.b CODE_0DF9C2
	JML.l CODE_03A31E

CODE_0DF9D8:
	STZ.w $7B56,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w $106C
	STA.b $00
	CLC
	ADC.w #$0054
	CMP.w #$0099
	BCS.b CODE_0DFA02
	LDA.w $7CD8,x
	SEC
	SBC.w $106A
	CLC
	ADC.w #$00EC
	CMP.w #$0119
	BCS.b CODE_0DFA02
	INC.w $1074
	BRA.b CODE_0DFA1D

CODE_0DFA02:
	LDA.b $00
	CLC
	ADC.w #$00B4
	CMP.w #$0159
	BCS.b CODE_0DFA63
	LDA.w $7CD8,x
	SEC
	SBC.w $106A
	CLC
	ADC.w #$00AC
	CMP.w #$02B9
	BCS.b CODE_0DFA63
CODE_0DFA1D:
	LDA.w #!Define_YI_AmbSpr218
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C2|!EXRAMBankMirror,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0011
	STA.w $7E4C,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w $7682,x
	CMP.w #$0090
	BMI.b CODE_0DFA53
	LDA.w $7002,y
	AND.w #$00CF
	STA.w $7002,y
CODE_0DFA53:
	LDA.w $7402,x
	TAX
	LDA.w DATA_0DF8EB,x
	STA.w $7E4E,y
	LDX.b $12
	JML.l CODE_03A31E

CODE_0DFA63:
	LDY.b #$00
CODE_0DFA65:
	LDA.w $7042,x
	AND.w #$00CF
	STA.b $00
	TYA
	ORA.b $00
	STA.w $7042,x
	RTL

CODE_0DFA74:
	JSL.l CODE_03B9DD
	LDA.b $78,x
	BEQ.b CODE_0DFA7F
	JMP.w CODE_0DFA8F

CODE_0DFA7F:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0DFA8B
	JSL.l CODE_03A590
CODE_0DFA8B:
	JML.l CODE_03B95E

CODE_0DFA8F:
	JSL.l CODE_03BB1D
	RTL

CODE_0DFA94:
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7362,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_09F5F4>>16
	LDA.w #FXCODE_09F5F4
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	STZ.w $72C0,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0CE_BowserFire_Init:
;$0DFAC2
	JSL.l CODE_03AEEB
	LDA.w #$0007
	STA.w $74A2,x
	LDA.w #$0008
	STA.w $7402,x
CODE_0DFAD2:
	LDA.b $18,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $76,x
	SEC
	SBC.w #$00AB
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0400
	BCS.b CODE_0DFAEE
	STZ.w $7402,x
	LDA.w #$0003
	STA.w $7040,x
CODE_0DFAEE:
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_548000+$00C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$00C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_0888AC>>16
	LDA.w #FXCODE_0888AC
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0CE_BowserFire_Main:
;$0DFB1D
	LDA.w #$0020
	LDY.w $7402,x
	BEQ.b CODE_0DFB28
	LDA.w #$0004
CODE_0DFB28:
	JSR.w CODE_0DFA94
	LDA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	CMP.w #$0100
	BPL.b CODE_0DFB4F
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_09F70B>>16
	LDA.w #FXCODE_09F70B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BNE.b CODE_0DFB4B
	JSL.l CODE_03A858
CODE_0DFB4B:
	JML.l CODE_03A31E

CODE_0DFB4F:
	STA.b $76,x
	JSL.l CODE_03AF23
	JSL.l CODE_0DFAD2
	LDA.b $18,x
	CLC
	ADC.w #$0004
	AND.w #$00FF
	STA.b $18,x
	LDY.b #$00
	LDA.b $16,x
	BPL.b CODE_0DFB6B
	DEY
CODE_0DFB6B:
	LDA.w $7A36,x
	CLC
	ADC.b $16,x
	STA.w $7A36,x
	TYA
	ADC.w $7A38,x
	STA.w $7A38,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w $7A37,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.w $7A37,x
	STA.w $70E2,x
	STZ.w $7A37,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr008_FallingRubble_Init:
;$0DFB93
	RTL

;---------------------------------------------------------------------------

YI_NorSpr008_FallingRubble_Main:
;$0DFB94
	LDA.w $7041,x
	AND.w #$00F8
	LSR
	LSR
	LSR
	JSR.w CODE_0DFA94
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0DFBB2
	LDA.w $7682,x
	CMP.w #$F600
	BMI.b CODE_0DFBBA
CODE_0DFBB1:
	RTL

CODE_0DFBB2:
	LDA.w $7682,x
	CMP.w #$0700
	BMI.b CODE_0DFBB1
CODE_0DFBBA:
	DEC.w $1072
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

YI_NorSpr0AC_FallingRockArrowAndShadow_Init:
;$0DFBC1
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0AC_FallingRockArrowAndShadow_Main:
;$0DFBC2
	LDY.w $74A2,x
	BPL.b CODE_0DFBD5
	LDA.w $0030
	AND.w #$0008
	BEQ.b CODE_0DFBD5
	LDY.b #$02
	JSL.l CODE_02D995
CODE_0DFBD5:
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	BNE.b CODE_0DFBE2
	JML.l CODE_03A31E

CODE_0DFBE2:
	LDA.w $7A98,x
	BNE.b CODE_0DFC03
	LDA.w #$0002
	STA.w $7A98,x
	LDY.w $74A2,x
	BPL.b CODE_0DFBF9
	LDA.w #$0004
	STA.w $74A2,x
	RTL

CODE_0DFBF9:
	LDA.w $7402,x
	CMP.b $18,x
	BCS.b CODE_0DFC03
	INC.w $7402,x
CODE_0DFC03:
	RTL

CODE_0DFC04:
	PHD
	LDA.w #$0000
	TCD
	SEP.b #$20
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.b #$01
	STA.w !RAM_YI_Map_LevelClearFlags,x
	STZ.w $1135
	REP.b #$20
	LDA.w !RAM_YI_Level_StarTimerLo
CODE_0DFC1B:
	SEC
	SBC.w #$000A
	BMI.b CODE_0DFC26
	INC.w $1135
	BRA.b CODE_0DFC1B

CODE_0DFC26:
	LDA.w $1135
CODE_0DFC29:
	DEC.w !RAM_YI_Level_FlowersCollectedLo
	BMI.b CODE_0DFC34
	CLC
	ADC.w #$000A
	BRA.b CODE_0DFC29

CODE_0DFC34:
	CLC
	ADC.w !RAM_YI_Level_RedCoinsCollectedLo
	AND.w #$00FF
	SEP.b #$20
	CMP.w $02FB
	BCS.b CODE_0DFC45
	LDA.w $02FB
CODE_0DFC45:
	STA.w $1135
	STA.w $02FB
	STA.b $A0
	STZ.b $A1
	REP.b #$20
	LDX.b #$06
CODE_0DFC53:
	LDA.w $02F4,x
	AND.w #$00FF
	CLC
	ADC.b $A0
	STA.b $A0
	DEX
	BPL.b CODE_0DFC53
	LDA.b $A0
	CMP.w #$0320
	BCC.b CODE_0DFC77
	LDA.w #$0A09
	STA.w $0353
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w #$0101
	STA.w $022A,x
CODE_0DFC77:
	SEP.b #$20
	JSL.l CODE_108279
	REP.b #$20
	LDX.b $12
	PLD
	RTS

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($0DFC90, incbin, DATA_0DFC90_YI_U2.bin)
else
	%FREE_BYTES($0DFC83, 893, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank0EMacros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_0E8000:
	TYX
	RTS

;---------------------------------------------------------------------------

YI_NorSpr00B_Cannonball_Init:
YI_NorSpr060_Bomb_Init:
;$0E8002
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0030
	STA.b $16,x
	SEP.b #$20
	LDA.b #$7F
	STA.w $7863,x
	REP.b #$20
	INC.b $78,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr00B_Cannonball_Main:
;$0E8019
	LDY.w $7D38,x
	BEQ.b CODE_0E8023
	LDY.w $7D36,x
	BMI.b CODE_0E809E
YI_NorSpr060_Bomb_Main:
CODE_0E8023:
	JSL.l CODE_03AF23
	LDY.b $76,x
	BEQ.b CODE_0E802F
	JSR.w CODE_0E814D
	RTL

CODE_0E802F:
	LDY.b $18,x
	BEQ.b CODE_0E803E
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0E809E
	JMP.w CODE_0E80DD

CODE_0E803E:
	LDY.w $7D36,x
	BMI.b CODE_0E809E
	BEQ.b CODE_0E8055
	LDA.w $735F,y
	CMP.w #$0015
	BNE.b CODE_0E8055
	TYX
	DEX
	JSL.l CODE_03B25B
	BRA.b CODE_0E809E

CODE_0E8055:
	LDA.w $7A96,x
	BNE.b CODE_0E808E
	LDY.w $7223,x
	BMI.b CODE_0E8082
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr00B_Cannonball
	BEQ.b CODE_0E8082
	LDA.w $6FA2,x
	AND.w #$001F
	BEQ.b CODE_0E808A
	REP.b #$10
	TXY
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.l $700024,x
	SEP.b #$10
	TYX
	AND.w #$0004
	BNE.b CODE_0E809A
CODE_0E8082:
	LDA.w $7860,x
	AND.w #$002F
	BNE.b CODE_0E809A
CODE_0E808A:
	LDY.b #$01
	STY.b $78,x
CODE_0E808E:
	LDY.w $7862,x
	BEQ.b CODE_0E8097
	DEC.b $16,x
	BMI.b CODE_0E809A
CODE_0E8097:
	JMP.w CODE_0E80D9

CODE_0E809A:
	LDA.b $78,x
	BEQ.b CODE_0E808E
CODE_0E809E:
	LDA.w #!Define_YI_AmbSpr1ED
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$000D
	STA.w $73C2,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7D38,x
	LDA.w #$68A0
	STA.w $6FA0,x
	INC.b $76,x
	RTL

CODE_0E80D9:
	JSL.l CODE_03A5B7
CODE_0E80DD:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr00B_Cannonball
	BEQ.b CODE_0E8128
	LDA.w $7362,x
	BMI.b CODE_0E8128
	LDA.w $0030
	AND.w #$0001
	BNE.b CODE_0E8128
	LDA.b $10
	PHA
	AND.w #$0003
	SEC
	SBC.w #$000A
	STA.b $00
	PLA
	XBA
	AND.w #$0003
	SEC
	SBC.w #$000A
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1EC
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	CLC
	ADC.b $00
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.b $02
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
CODE_0E8128:
	RTL

DATA_0E8129:
	dw $0000,$FFF0,$0010,$0010,$FFF0,$0000,$0010,$FFF0

DATA_0E8139:
	dw $0010,$0000,$FFF0,$0010,$0010,$FFF0,$0000,$FFF0
	dw $FF00,$0100

CODE_0E814D:
	LDY.w $7A36,x
	PHY
	JSR.w CODE_0E818B
	PLY
	INY
	INY
	JSR.w CODE_0E818B
	LDA.w $7A36,x
	CLC
	ADC.w #$0004
	STA.w $7A36,x
	CMP.w #$0010
	BMI.b CODE_0E816E
	JSL.l CODE_03A31E
	RTS

CODE_0E816E:
	LDA.w $7C16,x
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_0E818A
	LDA.w $7C18,x
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_0E818A
	JSL.l CODE_03A858
CODE_0E818A:
	RTS

CODE_0E818B:
	LDA.w DATA_0E8129,y
	CLC
	ADC.w $7CD6,x
	STA.w $0091
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w DATA_0E8139,y
	CLC
	ADC.w $7CD8,x
	STA.w $0093
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_0E81BF
	JSL.l CODE_0DA479
CODE_0E81BF:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr09A_SwingingGreenPlatform_Init:
;$0E81C0
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$C000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $7400,x
	RTL

;---------------------------------------------------------------------------

DATA_0E81CD:
	dw $FFA0,$0060

YI_NorSpr09A_SwingingGreenPlatform_Main:
;$0E81D1
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $02
	LDA.w $70E2,x
	SEC
	SBC.w $6094
	CLC
	ADC.w #$0004
	STA.b $04
	LDA.w $7182,x
	SEC
	SBC.w $609C
	CLC
	ADC.w #$0004
	STA.b $06
	STZ.b $08
	STZ.b $0A
	LDA.w #$0003
	STA.b $0C
	REP.b #$10
	LDY.w $7362,x
CODE_0E8213:
	LDA.b $08
	CLC
	ADC.b $00
	STA.b $08
	CLC
	ADC.w #$0080
	XBA
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_0E822A
	ORA.w #$FF00
CODE_0E822A:
	CLC
	ADC.b $04
	STA.w $6008,y
	LDA.b $0A
	CLC
	ADC.b $02
	STA.b $0A
	CLC
	ADC.w #$0080
	XBA
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_0E8247
	ORA.w #$FF00
CODE_0E8247:
	CLC
	ADC.b $06
	STA.w $600A,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $0C
	BNE.b CODE_0E8213
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	XBA
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_0E826A
	ORA.w #$FF00
CODE_0E826A:
	CLC
	ADC.b $04
	CLC
	ADC.w #$0004
	STA.w $6010,y
	SEC
	SBC.w #$0010
	STA.w $6008,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	XBA
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_0E828E
	ORA.w #$FF00
CODE_0E828E:
	CLC
	ADC.b $06
	STA.w $600A,y
	STA.w $6012,y
	SEP.b #$10
	JSL.l CODE_03AF23
	LDA.w $7A38,x
	INC
	INC
	STA.w $7A38,x
	CLC
	ADC.w #$0080
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$5800
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	XBA
	AND.w #$00FF
	TAY
	BPL.b CODE_0E82D4
	ORA.w #$FF00
CODE_0E82D4:
	STA.b $08
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	XBA
	AND.w #$00FF
	TAY
	BPL.b CODE_0E82EA
	ORA.w #$FF00
CODE_0E82EA:
	STA.b $0A
	LDY.b $18,x
	BNE.b CODE_0E8314
	LDY.w $60AB
	BMI.b CODE_0E835B
	LDA.b $0A
	CLC
	ADC.w $7182,x
	CLC
	ADC.w #$0004
	SEC
	SBC.w $611E
	SEC
	SBC.w $6112
	BMI.b CODE_0E835B
	SEC
	SBC.w $6122
	CMP.w #$0004
	BMI.b CODE_0E8338
	BRA.b CODE_0E835B

CODE_0E8314:
	LDY.w $60AB
	BMI.b CODE_0E835B
	LDY.w $0D94
	BNE.b CODE_0E835B
	CPX.w $61B6
	BNE.b CODE_0E835B
	LDA.b $08
	SEC
	SBC.b $78,x
	PHA
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	PLA
	CLC
	ADC.w $611C
	STA.w $611C
CODE_0E8338:
	LDA.b $08
	CLC
	ADC.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w $611C
	BPL.b CODE_0E834E
	CLC
	ADC.w $6120
	BRA.b CODE_0E8352

CODE_0E834E:
	SEC
	SBC.w $6120
CODE_0E8352:
	CLC
	ADC.w #$000E
	CMP.w #$001C
	BCC.b CODE_0E8367
CODE_0E835B:
	CPX.w $61B6
	BNE.b CODE_0E8363
	STZ.w $61B6
CODE_0E8363:
	STZ.b $18,x
	BRA.b CODE_0E838C

CODE_0E8367:
	CPX.w $61B6
	BEQ.b CODE_0E8374
	LDY.w $61B6
	BNE.b CODE_0E8363
	STX.w $61B6
CODE_0E8374:
	LDA.b $0A
	CLC
	ADC.w $7182,x
	CLC
	ADC.w #$FFE4
	SEC
	SBC.w $6112
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	LDY.b #$01
	STY.b $18,x
CODE_0E838C:
	LDA.b $08
	STA.b $78,x
	JSL.l CODE_03D127
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0A6_IncomingChomp_Init:
;$0E8395
	LDY.w $0073
	BNE.b CODE_0E83AF
	SEP.b #$20
	LDA.b #$40
	STA.w $70E0,x
	REP.b #$20
	BRA.b CODE_0E83CC

YI_NorSpr0A7_GroupOfIncomingChomps_Init:
	LDY.w $0073
	BNE.b CODE_0E83AF
	LDY.w $0DC2
	BEQ.b CODE_0E83B3
CODE_0E83AF:
	JML.l CODE_03A31E

CODE_0E83B3:
	INC.w $0DC2
	LDA.w $70E2,x
	AND.w #$FF00
	ORA.w #$0080
	STA.w $0DC4
	LDA.w $70E2,x
	SEC
	SBC.w #$0020
	STA.w $70E2,x
CODE_0E83CC:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	AND.w #$FFF0
	STA.b $00
	LDA.w $70E2,x
	STA.b $18,x
	SEC
	SBC.b $00
	LSR.b $00
	CLC
	ADC.b $00
	STA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7182,x
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w !RAM_YI_Global_Layer2YPosLo
	AND.w #$FFF8
	CLC
	ADC.w #$0012
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	CPY.b #!Define_YI_LevelID_MarchingMildesFort
	BNE.b CODE_0E8406
	SEC
	SBC.w #$0008
	BRA.b CODE_0E8415

CODE_0E8406:
	CPY.b #!Define_YI_LevelID_WatchOutBelow
	BNE.b CODE_0E8415
	LDY.w $70E3,x
	CPY.b #$06
	BNE.b CODE_0E8415
	SEC
	SBC.w #$000A
CODE_0E8415:
	STA.w $7182,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A7_GroupOfIncomingChomps
	BNE.b CODE_0E842A
	LDA.w $7182,x
	CLC
	ADC.w #$0016
	STA.w $7182,x
CODE_0E842A:
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.w $74A1,x
	INC.w $74A1,x
YI_NorSpr0A8_FallingIncomingChomp_Init:
	LDA.w $7042,x
	AND.w #$FFDF
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

DATA_0E8440:
	dw CODE_0E8515
	dw CODE_0E85B2
	dw CODE_0E85FE
	dw CODE_0E866E
	dw CODE_0E8713
	dw CODE_0E88D7
	dw CODE_0E89DE

DATA_0E844E:
	dw FXDATA_548000+$4000,FXDATA_548000+$4020,FXDATA_548000+$4040,FXDATA_548000+$4020

YI_NorSpr0A6_IncomingChomp_Main:
YI_NorSpr0A8_FallingIncomingChomp_Main:
;$0E8456
	LDY.w $7041,x
	BPL.b CODE_0E8464
	LDA.w $7722,x
	BMI.b CODE_0E8464
	JSL.l CODE_03ABFA
CODE_0E8464:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0E8440,x)
	LDY.b $76,x
	CPY.b #$05
	BMI.b CODE_0E8492
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0E848E
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0E848E
	LDA.w $7D38,y
	BEQ.b CODE_0E848E
	TYX
	JSL.l CODE_03B25B
CODE_0E848E:
	JSL.l CODE_03D127
CODE_0E8492:
	JSR.w CODE_0E84BA
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0A6_IncomingChomp
	ORA.w $7A38,x
	BNE.b CODE_0E84B9
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.b $18,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0E84B9
	LDY.b $76,x
	CPY.b #$05
	BPL.b CODE_0E84B9
	INC.w $7A38,x
CODE_0E84B9:
	RTL

CODE_0E84BA:
	LDY.w $7041,x
	BPL.b CODE_0E8510
	LDA.w $7722,x
	BMI.b CODE_0E8510
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0001
	BNE.b CODE_0E8510
CODE_0E84D3:
	LDY.b $77,x
	LDA.w DATA_0E844E,y
	LDY.b #(FXDATA_548000+$4000)>>16
CODE_0E84DA:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088A0F>>16
	LDA.w #FXCODE_088A0F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0E8510:
	RTS

DATA_0E8511:
	dw $FFC0,$0040

CODE_0E8515:
	TYX
	STZ.w $7181,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A6_IncomingChomp
	BEQ.b CODE_0E857C
	LDY.w $0DC0
	BNE.b CODE_0E857C
	LDA.w #$00A8
	JSL.l CODE_03A364
	BCC.b CODE_0E857C
	TYX
	JSL.l CODE_03ADD0
	BCS.b CODE_0E8546
	JSL.l CODE_03A31E
	LDX.b $12
	RTS

CODE_0E8546:
	TXY
	LDX.b $12
	DEC.w $0DC0
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $7400,x
	STA.w $7400,y
	SEP.b #$20
	LDA.b #$40
	STA.w $70E0,y
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D7|!EXRAMBankMirror,y
	STA.w $74A1,y
	REP.b #$20
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w $7042,y
	AND.w #$FFDF
	STA.w $7042,y
CODE_0E857C:
	LDA.w $7AF6,x
	BNE.b CODE_0E85A9
	LDA.b $10
	PHA
	AND.w #$0003
	INC
	STA.b $16,x
	PLA
	XBA
	AND.w #$0002
	CMP.w $7400,x
	BNE.b CODE_0E85A3
	TAY
	LDA.w DATA_0E8511,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0E85A3:
	INC.b $76,x
	LDY.b #$04
	STY.b $77,x
CODE_0E85A9:
	RTS

DATA_0E85AA:
	db $00,$02

DATA_0E85AC:
	db $00,$00

DATA_0E85AE:
	db $00,$01

DATA_0E85B0:
	db $01,$00

CODE_0E85B2:
	TYX
	STZ.w $7181,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_0E85FD
	SEP.b #$20
	DEC.b $77,x
	REP.b #$20
	LDY.b $77,x
	BPL.b CODE_0E85E0
	LDY.w $7400,x
	LDA.w DATA_0E8511,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_0E85E0:
	LDY.b $77,x
	LDA.w DATA_0E85AE,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0E85AA,y
	AND.w #$00FF
	EOR.w $7400,x
	STA.w $7400,x
	LDA.w #$0006
	STA.w $7A98,x
CODE_0E85FD:
	RTS

CODE_0E85FE:
	TYX
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_0E8617
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0E8617
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0E8617:
	LDA.w $7182,x
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BMI.b CODE_0E866D
	STZ.w $7181,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A6_IncomingChomp
	BNE.b CODE_0E8652
	LDY.w $7A38,x
	BEQ.b CODE_0E8652
	LDY.w $0DC0
	BNE.b CODE_0E8652
	JSL.l CODE_03ADD0
	BCC.b CODE_0E8652
	DEC.w $0DC0
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0203
	STA.b $76,x
	RTS

CODE_0E8652:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0E865B
	DEC.b $16,x
	BNE.b CODE_0E8667
CODE_0E865B:
	LDA.w #$0020
	STA.w $7AF6,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_0E8667:
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0E866D:
	RTS

CODE_0E866E:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E86D2
	SEP.b #$20
	DEC.b $77,x
	REP.b #$20
	LDY.b $77,x
	BPL.b CODE_0E86B5
	JSL.l CODE_03AEFD
	JSL.l CODE_03ADD0
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A6_IncomingChomp
	BEQ.b CODE_0E8694
	LDA.w #$0040
	STA.w $7AF6,x
CODE_0E8694:
	LDA.w #$0080
	STA.w $7A36,x
	LDA.w #$8081
	STA.w $7040,x
	LDA.w #$0001
	STA.w $7402,x
	JSR.w CODE_0E84D3
	LDA.w #$0007
	STA.w $74A2,x
	LDA.w #$0004
	STA.b $76,x
	RTS

CODE_0E86B5:
	LDY.b $77,x
	LDA.w DATA_0E85B0,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0E85AC,y
	AND.w #$00FF
	EOR.w $7400,x
	STA.w $7400,x
	LDA.w #$0006
	STA.w $7A98,x
CODE_0E86D2:
	RTS

DATA_0E86D3:
	dw $FFC0,$0000,$0020,$0010,$0040,$0060,$0080,$00A0
	dw $00C0

DATA_0E86E5:
	dw $0018,$0068,$00B8,$0038,$00C8

DATA_0E86EF:
	dw $0000,$0000,$0200,$0202,$0202,$0404,$0404,$0404
	dw $0608,$0606,$0606,$0606,$0806,$0808,$0808,$0808

DATA_0E870F:
	dw $FF00,$0100

CODE_0E8713:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_0E86D2
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A6_IncomingChomp
	BNE.b CODE_0E872C
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$00C0
	BRA.b CODE_0E8757

CODE_0E872C:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7680,x
	SEC
	SBC.w #$0080
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0B8739>>16
	LDA.w #FXCODE_0B8739
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_0E8757:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7682,x
	CMP.w #$FFC0
	BMI.b CODE_0E87A8
	LDA.w $7A36,x
	CLC
	ADC.w #$000A
	STA.w $7A36,x
	CMP.w #$0100
	BMI.b CODE_0E878C
	CMP.w #$01FF
	BMI.b CODE_0E877C
	LDA.w #$01FF
	STA.w $7A36,x
CODE_0E877C:
	LDA.w $7042,x
	ORA.w #$0002
	STA.w $7042,x
	SEP.b #$20
	STZ.w $70E0,x
	REP.b #$20
CODE_0E878C:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0001
	BNE.b CODE_0E87A7
	SEP.b #$20
	LDA.b $77,x
	INC
	INC
	AND.b #$07
	STA.b $77,x
	REP.b #$20
CODE_0E87A7:
	RTS

CODE_0E87A8:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $74A2,x
	LDA.w $70E2,x
	SEC
	SBC.w !RAM_YI_Global_Layer2XPosLo
	CLC
	ADC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w !RAM_YI_Global_Layer2YPosLo
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $7182,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A8_FallingIncomingChomp
	BEQ.b CODE_0E87D8
	JMP.w CODE_0E885B

CODE_0E87D8:
	LDA.w $60A8
	CLC
	ADC.w #$0400
	CMP.w #$0800
	BCC.b CODE_0E87EE
	BPL.b CODE_0E87EB
	LDA.w #$0000
	BRA.b CODE_0E87EE

CODE_0E87EB:
	LDA.w #$0800
CODE_0E87EE:
	AND.w #$FF00
	XBA
	ASL
	TAY
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_0E86D3,y
CODE_0E87FB:
	STA.b $00
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_0E8813
	SEC
	SBC.w #$0100
	CLC
	ADC.b $00
	BRA.b CODE_0E87FB

CODE_0E8813:
	LDA.b $00
	AND.w #$00F0
	LSR
	LSR
	LSR
	LSR
	LDY.w !RAM_YI_Level_CurrentWorldLo
	BEQ.b CODE_0E8825				; Note: !Define_YI_WorldID_World1
	CPY.b #!Define_YI_WorldID_World6
	BNE.b CODE_0E8829
CODE_0E8825:
	CLC
	ADC.w #$0010
CODE_0E8829:
	TAY
	LDA.w DATA_0E86EF,y
	TAY
	LDA.b $00
	AND.w #$FF00
	ORA.w DATA_0E86E5,y
	STA.w $70E2,x
CODE_0E8839:
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w $0DC4
	CLC
	ADC.w #$0100
	CMP.w #$0380
	BCC.b CODE_0E8864
	BPL.b CODE_0E884F
	INY
	INY
CODE_0E884F:
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0E870F,y
	STA.w $70E2,x
	BRA.b CODE_0E8839

CODE_0E885B:
	LDA.b $18,x
	CLC
	ADC.w #$00F8
	STA.w $70E2,x
CODE_0E8864:
	JSL.l CODE_03AEFD
	STZ.w $7402,x
	LDA.w #$0881
	STA.w $7040,x
	LDA.w #$0050
	STA.w $7AF6,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A6_IncomingChomp
	BNE.b CODE_0E8885
	LDA.w #$0030
	STA.w $7AF6,x
CODE_0E8885:
	STZ.w $7542,x
	STZ.w $75E2,x
	JSR.w CODE_0E8B53
	LDA.w $7042,x
	AND.w #$FFF3
	ORA.w #$0020
	STA.w $7042,x
	SEP.b #$20
	LDA.b #$02
	STA.w $74A2,x
	STZ.w $74A1,x
	REP.b #$20
	LDA.w #$01FF
	STA.w $7A36,x
	STZ.w $7A38,x
	STZ.w $75E0,x
	STZ.b $16,x
	LDA.w #$0018
	STA.w $7BB6,x
	STA.w $7BB8,x
	LDA.w #!Define_YI_SoundID6D_FallingChomp
	JSL.l CODE_0085D2
	INC.b $76,x
	RTS

DATA_0E88C7:
	dw $FFE8,$FFF8,$0008,$0018

DATA_0E88CF:
	dw $FE00,$FF00,$0100,$0200

CODE_0E88D7:
	TYX
	LDA.w $7AF6,x
	BEQ.b CODE_0E88E1
	JSR.w CODE_0E8B53
	RTS

CODE_0E88E1:
	LDY.w $75E0,x
	BNE.b CODE_0E8943
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A6_IncomingChomp
	BNE.b CODE_0E8943
	LDA.w $7680,x
	CLC
	ADC.w #$0030
	CMP.w #$0160
	BCC.b CODE_0E8943
	LDY.b $78,x
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w #$000C
	STA.w $7042,x
	STZ.w $7402,x
	LDA.w #$0881
	STA.w $7040,x
	SEP.b #$20
	LDA.b #$40
	STA.w $70E0,x
	LDA.b #$FF
	STA.w $74A2,x
	LDA.b #$02
	STA.w $74A1,x
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,x
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $0DC0
	STZ.b $78,x
	INC.b $76,x
	JSL.l CODE_03AEFD
CODE_0E8942:
	RTS

CODE_0E8943:
	LDA.w #$6C73
	STA.w $6FA0,x
	LDA.w #$0020
	STA.w $7BB6,x
	STA.w $7BB8,x
	LDY.w $7722,x
	BPL.b CODE_0E8975
	JSL.l CODE_03ADD0
	BCC.b CODE_0E8942
	JSR.w CODE_0E84D3
	INC.w $7402,x
	INC.w $7402,x
	LDA.w #$8081
	STA.w $7040,x
	LDA.w #$0800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $0DC0
CODE_0E8975:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0001
	BNE.b CODE_0E8990
	SEP.b #$20
	LDA.b $77,x
	INC
	INC
	AND.b #$07
	STA.b $77,x
	REP.b #$20
CODE_0E8990:
	LDA.w $7182,x
	CMP.w #$07FF
	BMI.b CODE_0E899D
	PLA
	JML.l CODE_03A32E

CODE_0E899D:
	JSR.w CODE_0E8A3F
	LDY.w $75E0,x
	BEQ.b CODE_0E89DD
	LDY.b $78,x
	BEQ.b CODE_0E89AF
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	STZ.b $78,x
CODE_0E89AF:
	LDA.w $7974
	AND.w #$0001
	BNE.b CODE_0E89DD
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w DATA_0E88C7,y
	CLC
	ADC.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	LDA.w DATA_0E88CF,y
	STA.b $04
	LDA.w #$FF00
	STA.b $06
	LDA.w #$0010
	STA.b $08
	JSR.w CODE_0E8B1B
CODE_0E89DD:
	RTS

CODE_0E89DE:
	TYX
	LDA.w $70E2,x
	SEC
	SBC.w !RAM_YI_Global_Layer2XPosLo
	CLC
	ADC.w #$0020
	CMP.w #$0140
	BCS.b CODE_0E89FF
	LDA.w $7182,x
	SEC
	SBC.w !RAM_YI_Global_Layer2YPosLo
	CLC
	ADC.w #$0020
	CMP.w #$0140
	BCC.b CODE_0E8A14
CODE_0E89FF:
	SEP.b #$20
	STZ.w $74A2,x
	REP.b #$20
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	STZ.b $76,x
CODE_0E8A14:
	RTS

DATA_0E8A15:
	dw DATA_0E8A2F,DATA_0E8A2D,DATA_0E8A2D,DATA_0E8A31

DATA_0E8A1D:
	dw $1C20,$1C22,$1C22,$1C24,$1BF8,$1C04,$1C04,$1BFA

DATA_0E8A2D:
	dw $0000

DATA_0E8A2F:
	dw $007E

DATA_0E8A31:
	dw $007F,$FFE8,$FFF8,$0008,$0018

DATA_0E8A3B:
	dw $0018,$FFF8

CODE_0E8A3F:
	LDA.w $7182,x
	AND.w #$FFF0
	CMP.b $16,x
	BEQ.b CODE_0E8A9F
	LDY.w $75E0,x
	BNE.b CODE_0E8AA0
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w $1C22
	BEQ.b CODE_0E8AA0
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$2A00
	BEQ.b CODE_0E8AA0
	CMP.w #$2A01
	BEQ.b CODE_0E8AA0
	CMP.w #$2A2D
	BEQ.b CODE_0E8AA0
	CMP.w #$2A2E
	BEQ.b CODE_0E8AA0
CODE_0E8A9F:
	RTS

CODE_0E8AA0:
	LDA.w $7182,x
	AND.w #$FFF0
	STA.b $16,x
	LDA.w #$0004
	STA.b $0C
	LDA.w $7A38,x
	AND.w #$0007
	LSR
	TAY
	LDA.w $70E2,x
	SEC
	SBC.w DATA_0E8A3B,y
	STA.b $04
	LDA.w $7182,x
	STA.b $02
	LDY.w $7A38,x
	BNE.b CODE_0E8AD1
	INC.w $75E0,x
	LDA.w #$0050
	STA.w $61C8
CODE_0E8AD1:
	REP.b #$10
	TYA
	AND.w #$00FF
	TAY
	PHX
	LDA.w DATA_0E8A15,y
	TAX
	LDA.w $0000,x
	STA.b $0E
	PLX
	SEP.b #$10
	INY
	INY
	PHY
	LDA.b $04
	STA.w $0091
	LDA.b $02
	STA.w $0093
	LDA.w #$0001
	STA.w $008F
	LDA.b $0E
	STA.w $0095
	JSL.l CODE_109295
	PLY
	LDA.b $04
	CLC
	ADC.w #$0010
	STA.b $04
	DEC.b $0C
	BNE.b CODE_0E8AD1
	LDX.b $12
	CPY.b #$18
	BMI.b CODE_0E8B16
	LDY.b #$10
CODE_0E8B16:
	TYA
	STA.w $7A38,x
	RTS

CODE_0E8B1B:
	LDA.w #!Define_YI_AmbSpr1C3
	JSL.l CODE_008B21
	LDA.b $00
	STA.w $70A2,y
	LDA.b $02
	STA.w $7142,y
	LDA.b $08
	STA.w $7782,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $06
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0007
	STA.w $7E4C,y
	DEC
	STA.w $7502,y
	LDA.w #$0400
	STA.w $75A2,y
	LDA.w #!Define_YI_SoundID0A_BreakDirt
	JSL.l CODE_0085D2
CODE_0E8B52:
	RTS

CODE_0E8B53:
	LDY.w $75E2,x
	BNE.b CODE_0E8B52
	STZ.b $02
	LDA.w $7182,x
	STA.b $00
	LDA.w $70E2,x
	STA.b $04
CODE_0E8B64:
	LDA.b $00
	CLC
	ADC.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $04
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0000
	BNE.b CODE_0E8B8C
	LDA.b $02
	CLC
	ADC.w #$0010
	STA.b $02
	BRA.b CODE_0E8B64

CODE_0E8B8C:
	LDX.b $12
	CMP.w #$2A00
	BEQ.b CODE_0E8BA2
	CMP.w #$2A01
	BEQ.b CODE_0E8BA2
	CMP.w #$2A2D
	BEQ.b CODE_0E8BA2
	CMP.w #$2A2E
	BNE.b CODE_0E8BE0
CODE_0E8BA2:
	LDA.w #$00A9
	JSL.l CODE_03A34C
	BCC.b CODE_0E8BE3
	TYX
	JSL.l CODE_03ADD0
	TXY
	LDX.b $12
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.b $02
	STA.w $7182,y
	LDA.w #$0028
	STA.w $7A98,y
	LDA.w #$0010
	STA.w $7AF6,y
	INC
	STA.w $7AF6,x
	LDA.w #$0100
	STA.w $7A36,y
	LDA.w $0030
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	STY.b $78,x
CODE_0E8BE0:
	INC.w $75E2,x
CODE_0E8BE3:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0A7_GroupOfIncomingChomps_Main:
;$0E8BE4
	LDY.b $78,x
	BEQ.b CODE_0E8BEB
	JSR.w CODE_0E8C1C
CODE_0E8BEB:
	JSL.l CODE_03AF23
	LDA.w $7680,x
	CLC
	ADC.w #$00A0
	CMP.w #$0200
	BCC.b CODE_0E8C10
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	RTL

CODE_0E8C10:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0E8440,x)
	JSR.w CODE_0E8C9A
	RTL

CODE_0E8C1C:
	LDY.w $7363,x
	BPL.b CODE_0E8C22
	RTS

CODE_0E8C22:
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	LDY.w $7362,x
	LDX.w #$0006
CODE_0E8C34:
	LDA.w $0DC6,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_0E8C46
	ORA.w #$FF00
CODE_0E8C46:
	CLC
	ADC.b $00
	SEC
	SBC.w !RAM_YI_Global_Layer2XPosLo
	STA.w $6008,y
	LDA.w $0DCE,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	CMP.w #$0080
	BMI.b CODE_0E8C62
	ORA.w #$FF00
CODE_0E8C62:
	CLC
	ADC.b $02
	SEC
	SBC.w !RAM_YI_Global_Layer2YPosLo
	STA.w $600A,y
	LDA.w $0DE7,x
	AND.w #$00FF
	XBA
	LSR
	LSR
	XBA
	STA.b $04
	LDA.w $0DE6,x
	AND.w #$00FF
	ASL
	CLC
	ADC.w $600C,y
	AND.w #$3FFF
	ORA.b $04
	STA.w $600C,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEX
	DEX
	BPL.b CODE_0E8C34
	SEP.b #$10
	LDX.b $12
	RTS

CODE_0E8C9A:
	LDA.b $78,x
	BNE.b CODE_0E8CB8
	INC.b $78,x
	LDX.b #$06
CODE_0E8CA2:
	STA.w $0DC6,x
	STA.w $0DCE,x
	STA.w $0DD6,x
	STA.w $0DDE,x
	STA.w $0DE6,x
	STA.w $0DEE,x
	DEX
	DEX
	BNE.b CODE_0E8CA2
CODE_0E8CB8:
	SEP.b #$20
	LDX.b #$06
CODE_0E8CBC:
	LDY.w !REGISTER_SoftwareLatchForHVCounter
	LDA.w !REGISTER_HCounter
	CLC
	ADC.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	JSR.w CODE_0E8CDB
	JSR.w CODE_0E8CEA
	JSR.w CODE_0E8D9B
	DEX
	DEX
	BPL.b CODE_0E8CBC
	REP.b #$20
	LDX.b $12
	RTS

CODE_0E8CDB:
	LDA.w $0DEF,x
	BEQ.b CODE_0E8CE3
	DEC.w $0DEF,x
CODE_0E8CE3:
	RTS

DATA_0E8CE4:
	dw CODE_0E8CF6
	dw CODE_0E8D2F
	dw CODE_0E8D66

CODE_0E8CEA:
	TXY
	LDA.w $0DDE,x
	ASL
	TAX
	JSR.w (DATA_0E8CE4,x)
	RTS

DATA_0E8CF4:
	db $FC,$04

CODE_0E8CF6:
	TYX
	LDA.w $0DEF,x
	BNE.b CODE_0E8D26
	LDA.b $10
	PHA
	AND.b #$03
	INC
	STA.w $0DEE,x
	PLA
	LSR
	LSR
	AND.b #$01
	CMP.w $0DE7,x
	BNE.b CODE_0E8D1E
	TAY
	LDA.w DATA_0E8CF4,y
	STA.w $0DD6,x
	LDA.b #$F8
	STA.w $0DD7,x
	INC.w $0DDE,x
CODE_0E8D1E:
	INC.w $0DDE,x
	LDA.b #$04
	STA.w $0DDF,x
CODE_0E8D26:
	RTS

DATA_0E8D27:
	dw $0100,$0000

DATA_0E8D2B:
	dw $0100,$0001

CODE_0E8D2F:
	TYX
	LDA.w $0DEF,x
	BNE.b CODE_0E8D65
	DEC.w $0DDF,x
	BPL.b CODE_0E8D4C
	LDY.w $0DE7,x
	LDA.w DATA_0E8CF4,y
	STA.w $0DD6,x
	LDA.b #$F0
	STA.w $0DD7,x
	INC.w $0DDE,x
	RTS

CODE_0E8D4C:
	LDY.w $0DDF,x
	LDA.w DATA_0E8D2B,y
	AND.b #$FF
	STA.w $0DE6,x
	LDA.w DATA_0E8D27,y
	EOR.w $0DE7,x
	STA.w $0DE7,x
	LDA.b #$06
	STA.w $0DEF,x
CODE_0E8D65:
	RTS

CODE_0E8D66:
	TYX
	LDA.w $0DC7,x
	INC
	CMP.b #$02
	BCC.b CODE_0E8D77
	EOR.w $0DD6,x
	BMI.b CODE_0E8D77
	STZ.w $0DD6,x
CODE_0E8D77:
	LDA.w $0DCF,x
	BMI.b CODE_0E8D9A
	LDA.w $0DD6,x
	BEQ.b CODE_0E8D86
	DEC.w $0DEE,x
	BNE.b CODE_0E8D95
CODE_0E8D86:
	LDA.b #$20
	STA.w $0DEF,x
	STZ.w $0DD6,x
	STZ.w $0DDF,x
	STZ.w $0DDE,x
	RTS

CODE_0E8D95:
	LDA.b #$F0
	STA.w $0DD7,x
CODE_0E8D9A:
	RTS

CODE_0E8D9B:
	LDA.w $0DD7,x
	CLC
	ADC.b #$01
	CMP.b #$10
	BMI.b CODE_0E8DA7
	LDA.b #$10
CODE_0E8DA7:
	STA.w $0DD7,x
	LDA.w $0DD6,x
	BPL.b CODE_0E8DBD
	CLC
	ADC.w $0DC6,x
	STA.w $0DC6,x
	LDA.w $0DC7,x
	SBC.b #$00
	BRA.b CODE_0E8DC9

CODE_0E8DBD:
	CLC
	ADC.w $0DC6,x
	STA.w $0DC6,x
	LDA.w $0DC7,x
	ADC.b #$00
CODE_0E8DC9:
	STA.w $0DC7,x
	LDA.w $0DD7,x
	BPL.b CODE_0E8DDF
	CLC
	ADC.w $0DCE,x
	STA.w $0DCE,x
	LDA.w $0DCF,x
	SBC.b #$00
	BRA.b CODE_0E8DEB

CODE_0E8DDF:
	CLC
	ADC.w $0DCE,x
	STA.w $0DCE,x
	LDA.w $0DCF,x
	ADC.b #$00
CODE_0E8DEB:
	BMI.b CODE_0E8DFA
	EOR.w $0DD7,x
	BMI.b CODE_0E8DFA
	STZ.w $0DD7,x
	LDA.b #$00
	STA.w $0DCE,x
CODE_0E8DFA:
	STA.w $0DCF,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0A9_IncomingChompShadow_Init:
;$0E8DFE
	JSR.w CODE_0E8E6B
	RTL

;---------------------------------------------------------------------------

DATA_0E8E02:
	db $05,$FF

DATA_0E8E04:
	db $0C,$0E,$0A,$0A

YI_NorSpr0A9_IncomingChompShadow_Main:
;$0E8E08
	LDY.w $7041,x
	BPL.b CODE_0E8E11
	JSL.l CODE_03ABFA
CODE_0E8E11:
	JSL.l CODE_03AF23
	LDA.w $0030
	CMP.b $18,x
	BEQ.b CODE_0E8E22
	LDA.w #$0004
	STA.w $74A2,x
CODE_0E8E22:
	LDA.b $78,x
	BEQ.b CODE_0E8E3B
	LDY.w $7722,x
	BMI.b CODE_0E8E37
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$2081
	STA.w $7040,x
CODE_0E8E37:
	JML.l CODE_03A31E

CODE_0E8E3B:
	LDA.w $7AF6,x
	BNE.b CODE_0E8E55
	LDY.w $7722,x
	BMI.b CODE_0E8E6A
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$2081
	STA.w $7040,x
	JML.l CODE_03AEFD

CODE_0E8E55:
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w #$01FF
	BMI.b CODE_0E8E64
	LDA.w #$01FF
CODE_0E8E64:
	STA.w $7A36,x
	JSR.w CODE_0E8E6B
CODE_0E8E6A:
	RTL

CODE_0E8E6B:
	LDA.w $7A36,x
	AND.w #$00FF
	ASL
	ASL
	XBA
	TAY
	SEP.b #$20
	LDA.w $7042,x
	AND.b #$F1
	ORA.w DATA_0E8E04,y
	STA.w $7042,x
	REP.b #$20
	LDA.w #FXDATA_548000+$60E0
	LDY.b #(FXDATA_548000+$60E0)>>16
	JSR.w CODE_0E84DA
	RTS

;---------------------------------------------------------------------------

DATA_0E8E8D:
	dw $FF80,$0080

YI_NorSpr0E2_BooBlah_Init:
YI_NorSpr0E3_BooBlahWithPiroDangle_Init:
;$0E8E91
	LDY.w $7400,x
	LDA.w DATA_0E8E8D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	PHP
	INC
	STA.b $00
	PLP
	BEQ.b CODE_0E8ED4
	LDA.w $7042,x
	EOR.w #$00C0
	STA.w $7042,x
	LDA.w $7182,x
	DEC
	AND.w #$FFF0
	ORA.w #$000F
	STA.w $7182,x
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0E8ED4:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0E2_BooBlah
	ASL
	ASL
	PHP
	CLC
	ADC.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	PLP
	BEQ.b CODE_0E8F29
	LDA.w #$0076
	JSL.l CODE_03A364
	BCS.b CODE_0E8EF8
	LDA.w #!Define_YI_NorSpr0E2_BooBlah
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	BRA.b CODE_0E8F29

CODE_0E8EF8:
	STY.b $18,x
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,y
	LDA.w #$0000
	STA.w $7542,y
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDA.w #$0100
	STA.w $7A36,y
	LDA.w #$0005
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
CODE_0E8F29:
	LDY.b #$03
	STY.b $16,x
	RTL

;---------------------------------------------------------------------------

DATA_0E8F2E:
	dw CODE_0E90D8
	dw CODE_0E9138
	dw CODE_0E9194
	dw CODE_0E916E
	dw CODE_0E9194
	dw CODE_0E91E0
	dw CODE_0E9206

DATA_0E8F3C:
	dw $FFFC,$0004,$FFFC

DATA_0E8F42:
	db $00,$04,$08,$04,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00

DATA_0E8F53:
	db $02,$00,$02,$00,$0C,$10,$14,$18,$1C,$08,$1C,$1C,$1C,$00,$00,$00
	db $00

DATA_0E8F64:
	db $04,$04,$04,$04,$06,$07,$08,$09,$0A,$05,$0B,$0B,$0B,$03,$02,$01
	db $00

DATA_0E8F75:
	dw $0000,$000F

YI_NorSpr0E2_BooBlah_Main:
YI_NorSpr0E3_BooBlahWithPiroDangle_Main:
;$0E8F79
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_0E8FAB
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0E3_BooBlahWithPiroDangle
	BNE.b CODE_0E8FAB
	LDY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0005
	BMI.b CODE_0E8FAB
	LDA.w #$0040
	STA.w $7542,y
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	ORA.w $7040,y
	STA.w $7040,y
CODE_0E8FAB:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0002
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0003
	DEC
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.b $00
	AND.w #$FFF0
	ORA.w DATA_0E8F75,y
	STA.w $7182,x
	JSL.l CODE_03AF23
	JSL.l CODE_03A2F8
	BCC.b CODE_0E8FE5
	LDY.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CPY.b #!Define_YI_NorSpr0E2_BooBlah
	BEQ.b CODE_0E8FE4
	LDA.b $18,x
	TAX
	JSL.l CODE_03A31E
	LDX.b $12
CODE_0E8FE4:
	RTL

CODE_0E8FE5:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0E9002
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0E9002
	LDA.w $7D38,y
	BEQ.b CODE_0E9002
	LDY.b #$02
	STY.b $76,x
	STZ.w $7A98,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0E9002:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0E8F2E,x)
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0002
	BEQ.b CODE_0E903E
	AND.w $7860,x
	BNE.b CODE_0E903E
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
CODE_0E903E:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0004
	BEQ.b CODE_0E90C5
	LDY.w $7402,x
	LDA.w DATA_0E8F53,y
	AND.w #$00FF
	SEC
	SBC.w #$0004
	STA.b $00
	LDA.w DATA_0E8F42,y
	AND.w #$00FF
	EOR.w #$FFFF
	INC
	LDY.w $7042,x
	BPL.b CODE_0E9071
	LDY.w $7400,x
	BNE.b CODE_0E906D
	EOR.w #$FFFF
	INC
CODE_0E906D:
	INY
	INY
	BRA.b CODE_0E907A

CODE_0E9071:
	LDY.w $7400,x
	BEQ.b CODE_0E907A
	EOR.w #$FFFF
	INC
CODE_0E907A:
	CLC
	ADC.w DATA_0E8F3C,y
	LDY.b $18,x
	CLC
	ADC.w $70E2,x
	STA.w $70E2,y
	LDA.w $7A36,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PHX
	PHY
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLY
	PLX
	LDA.b $00
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0002
	BEQ.b CODE_0E90BC
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
CODE_0E90BC:
	LDA.w $7182,x
	SEC
	SBC.b $00
	STA.w $7182,y
CODE_0E90C5:
	JSR.w CODE_0E9267
	LDY.w $7402,x
	LDA.w DATA_0E8F64,y
	AND.w #$00FF
	STA.b $78,x
	RTL

DATA_0E90D4:
	db $08,$02,$06,$06

CODE_0E90D8:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E910D
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
	TAY
	BNE.b CODE_0E9104
	DEC.b $16,x
	BNE.b CODE_0E9104
	LDY.b #$16
	STY.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	INC.b $76,x
	LDA.w #$0002
	BRA.b CODE_0E910A

CODE_0E9104:
	LDA.w DATA_0E90D4,y
	AND.w #$00FF
CODE_0E910A:
	STA.w $7A98,x
CODE_0E910D:
	RTS

DATA_0E910E:
	db $01,$09,$04,$05,$06,$07,$08,$0B,$0C,$0B,$0A,$0B,$0C,$0B,$0A,$08
	db $07,$06,$05,$04,$09

DATA_0E9123:
	db $02,$02,$02,$02,$02,$02,$08,$04,$04,$04,$04,$04,$04,$04,$04,$08
	db $02,$02,$02,$02,$02

CODE_0E9138:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E916D
	DEC.b $16,x
	BNE.b CODE_0E9159
	LDY.b #$04
	STY.b $16,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0002
	EOR.w $7400,x
	TAY
	LDA.w DATA_0E8E8D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	DEC.b $76,x
	RTS

CODE_0E9159:
	LDY.b $16,x
	LDA.w DATA_0E910E-$01,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0E9123-$01,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_0E916D:
	RTS

CODE_0E916E:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E916D
	INC.b $78,x
	LDY.b $78,x
	CPY.b #$04
	BMI.b CODE_0E91CB
	BRA.b CODE_0E91B0

DATA_0E917E:
	db $10,$0F,$0E,$0D,$01,$09,$04,$05,$06,$07,$08

DATA_0E9189:
	db $06,$03,$02,$01,$02,$02,$02,$02,$02,$02,$02

CODE_0E9194:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E91DF
	DEC.b $78,x
	BPL.b CODE_0E91CB
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_0E91C0
	TYA
	STA.w $7A98,x
	INC.b $76,x
	RTS

CODE_0E91AB:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0E91C0
CODE_0E91B0:
	LDY.b #$04
	STY.b $16,x
	LDY.w $7400,x
	LDA.w DATA_0E8E8D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_0E91C0:
	LDA.w #$0002
	STA.w $7A98,x
	LDY.b #$06
	STY.b $76,x
	RTS

CODE_0E91CB:
	LDY.b $78,x
	LDA.w DATA_0E917E,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0E9189,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_0E91DF:
	RTS

CODE_0E91E0:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E91DF
	DEC.b $78,x
	LDY.b $78,x
	CPY.b #$04
	BPL.b CODE_0E91CB
	BRA.b CODE_0E91AB

DATA_0E91F0:
	dw $F900,$F900,$F900,$F900,$F980,$FA00,$FA80,$FB00
	dw $FC00,$FD00,$FE00

CODE_0E9206:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E91DF
	INC.b $78,x
	LDY.b $78,x
	CPY.b #$04
	BNE.b CODE_0E921B
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0E91CB
	BRA.b CODE_0E91B0

CODE_0E921B:
	CPY.b #$08
	BMI.b CODE_0E91CB
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0E9244
	LDA.w $7A38,x
	ASL
	TAY
	CPY.b #$15
	BMI.b CODE_0E922F
	LDY.b #$14
CODE_0E922F:
	LDA.w DATA_0E91F0,y
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0E9244:
	CPY.b #$0B
	BMI.b CODE_0E91CB
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0E9253
	LDA.w #$0008
	STA.w $7A98,x
CODE_0E9253:
	DEC.b $76,x
	RTS

DATA_0E9256:
	db $10,$10,$10,$10,$18,$1C,$1E,$1F,$20,$10,$20,$20,$20,$08,$08,$04
	db $03

CODE_0E9267:
	LDY.w $7402,x
	LDA.w DATA_0E9256,y
	AND.w #$00FF
	SEC
	SBC.w #$0010
	STA.b $00
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	STA.b $02
	ASL
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$0002
	BEQ.b CODE_0E928D
	JMP.w CODE_0E9336

CODE_0E928D:
	LDY.b $76,x
	CPY.b #$02
	BMI.b CODE_0E92BB
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0E92BB
	LDA.w $7C16,x
	CLC
	ADC.b $02
	CMP.b $04
	BCS.b CODE_0E92B7
	LDY.w $60C0
	BEQ.b CODE_0E92FD
	LDY.w $60AB
	BPL.b CODE_0E92FD
	LDA.b $78,x
	STA.w $7A38,x
	LDY.b #$06
	STY.b $76,x
	BRA.b CODE_0E92FD

CODE_0E92B7:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

CODE_0E92BB:
	LDA.w $7C16,x
	CLC
	ADC.b $02
	CMP.b $04
	BCS.b CODE_0E9335
	LDA.w $6122
	EOR.w #$FFFF
	INC
	STA.b $02
	CLC
	ADC.w #$0008
	STA.b $04
	LDA.b $00
	SEC
	SBC.w $7182,x
	CLC
	ADC.w $611E
	CMP.b $02
	BMI.b CODE_0E9335
	CMP.b $04
	BPL.b CODE_0E9324
	LDY.w $60C0
	BEQ.b CODE_0E9335
	LDY.w $60AB
	BMI.b CODE_0E9335
	STZ.w $7A38,x
	LDY.b #$04
	STY.b $76,x
	STZ.w $7A98,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0E92FD:
	LDA.w $7182,x
	SEC
	SBC.b $00
	SEC
	SBC.w $6122
	SEC
	SBC.w $611E
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC
	INC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $60AA
	STZ.w $60D4
	INC.w $61B4
	RTS

CODE_0E9324:
	SEC
	SBC.b $00
	SEC
	SBC.w #$0010
	SEC
	SBC.w $6122
	BPL.b CODE_0E9335
	JSL.l CODE_03A858
CODE_0E9335:
	RTS

CODE_0E9336:
	LDA.w $7C16,x
	CLC
	ADC.b $02
	CMP.b $04
	BCS.b CODE_0E9363
	LDA.w $6122
	CLC
	ADC.w $7BB8,x
	STA.b $02
	LDA.b $00
	PHA
	LSR
	CLC
	ADC.b $02
	ASL
	STA.b $04
	PLA
	CLC
	ADC.w $7C18,x
	CLC
	ADC.b $02
	CMP.b $04
	BCS.b CODE_0E9363
	JSL.l CODE_03A858
CODE_0E9363:
	RTS

;---------------------------------------------------------------------------

DATA_0E9364:
	dw $FF40,$00C0

DATA_0E9368:
	db $10,$20

DATA_0E936A:
	dw $FFE0,$0130

YI_NorSpr0E9_3WinglessGoonies_Init:
;$0E936E
	INC.b $18,x
	LDA.w #$000C
	STA.w $7402,x
	LDY.b #$04
	STY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC
	BEQ.b CODE_0E93E0
	LDA.w #$0002
	STA.b $00
	STA.b $18,x
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	STA.b $04
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	STA.b $06
CODE_0E9399:
	LDY.b $00
	LDA.w DATA_0E9368-$01,y
	AND.w #$00FF
	STA.b $02
	LDA.w #$00E9
	JSL.l CODE_03A364
	BCC.b CODE_0E93E0
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.b $02
	STA.w $7A96,y
	LDA.w #$000C
	STA.w $7402,y
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.b $04
	STA.w $7C16,y
	LDA.b $06
	STA.w $7C18,y
	DEC.b $00
	BNE.b CODE_0E9399
CODE_0E93E0:
	BRA.b CODE_0E943B

YI_NorSpr0E8_Goonie_Init:
;$0E93E2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC
	BEQ.b CODE_0E9433
	LDA.w $7182,x
	BIT.w #$0010
	BEQ.b CODE_0E942D
	AND.w #$FFE0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_0E936A,y
	STA.w $7A36,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #$0060
	STA.w $6FA0,x
	LDA.w #$4000
	STA.w $6FA2,x
	LDA.w #$0002
	STA.w $7040,x
	STZ.w $7542,x
	INC.w $7A38,x
	LDY.w $0C7C
	BNE.b CODE_0E942C
	INC.w $0C7C
CODE_0E942C:
	RTL

YI_NorSpr153_GoonieWithShyGuy_Init:
CODE_0E942D:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC
	BNE.b CODE_0E9463
CODE_0E9433:
	INC.b $18,x
	LDA.w #$0040
	STA.w $7A96,x
CODE_0E943B:
	LDA.w #$000C
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A98,x
	INC
	STA.b $76,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0841
	STA.w $6FA2,x
	LDA.w #$6C00
	STA.w $6FA0,x
	RTL

CODE_0E9463:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $70E2,x
	PHA
	SEC
	SBC.w $6094
	STA.b $00
	PLA
	AND.w #$0010
	EOR.w #$0010
	DEC
	EOR.b $00
	BMI.b CODE_0E9496
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #$6860
	STA.w $6FA0,x
	LDA.w #$000E
	STA.w $7BB6,x
	STZ.w $7542,x
	LDY.b #$05
	STY.b $76,x
	RTL

CODE_0E9496:
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0003
	STA.b $16,x
	LDY.w $7400,x
	LDA.w DATA_0E98A5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$0020
	STA.w $75E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr153_GoonieWithShyGuy
	BNE.b CODE_0E94C3
	JSR.w CODE_0E94C4
CODE_0E94C3:
	RTL

CODE_0E94C4:
	TXY
	LDA.w #!Define_YI_NorSpr01E_Shyguy
	JSL.l CODE_03A366
	BCC.b CODE_0E9509
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	ASL
	STA.w $7402,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STY.b $78,x
	LDA.w #$000F
	STA.w $7402,x
	LDY.w $7400,x
	LDA.w DATA_0E98A5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$06
	STY.b $76,x
CODE_0E9509:
	LDA.w #!Define_YI_NorSpr0E8_Goonie
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	RTS

;---------------------------------------------------------------------------

DATA_0E9510:
	dw CODE_0E98A9
	dw CODE_0E98EF
	dw CODE_0E9939
	dw CODE_0E995F
	dw CODE_0E999B
	dw CODE_0E99D0
	dw CODE_0E9A2F

YI_NorSpr0E8_Goonie_Main:
YI_NorSpr0E9_3WinglessGoonies_Main:
YI_NorSpr153_GoonieWithShyGuy_Main:
;$0E951E
	LDY.w $7A38,x
	BNE.b CODE_0E9561
	LDA.w $7D96,x
	BEQ.b CODE_0E952B
	STZ.w $6FA2,x
CODE_0E952B:
	LDY.b $76,x
	CPY.b #$05
	BNE.b CODE_0E9537
	JSL.l CODE_03AF23
	BRA.b CODE_0E9541

CODE_0E9537:
	JSR.w CODE_0E95AE
	JSL.l CODE_03AF23
	JSR.w CODE_0E971F
CODE_0E9541:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0E9510,x)
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_0E9557
	CPY.b #$05
	BEQ.b CODE_0E9560
	JSR.w CODE_0E9638
	RTL

CODE_0E9557:
	LDA.w $7AF8,x
	BNE.b CODE_0E9560
	JSL.l CODE_0DC0F0
CODE_0E9560:
	RTL

CODE_0E9561:
	JSL.l CODE_03AF23
	LDY.w $0C7C
	BEQ.b CODE_0E9576
	LDA.w $7682,x
	CLC
	ADC.w #$0040
	CMP.w #$0160
	BCC.b CODE_0E957A
CODE_0E9576:
	JML.l CODE_03A31E

CODE_0E957A:
	LDA.w $7A96,x
	BNE.b CODE_0E95AD
	LDA.w #$00E8
	JSL.l CODE_03A34C
	BCC.b CODE_0E95AD
	LDA.w $6094
	AND.w #$FFEF
	CLC
	ADC.w $7A36,x
	STA.w $70E2,y
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w $7400,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7182,y
	LDA.w #$0100
	STA.w $7A96,x
CODE_0E95AD:
	RTL

CODE_0E95AE:
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CPY.b #$10
	BNE.b CODE_0E95B6
	RTS

CODE_0E95B6:
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	CPY.b #$08
	BNE.b CODE_0E9637
	LDY.b $78,x
	BEQ.b CODE_0E95D2
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STZ.b $78,x
CODE_0E95D2:
	LDY.b $18,x
	BNE.b CODE_0E95FD
	INC.b $18,x
	LDA.w #!Define_YI_AmbSpr1FF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$FFFF
	STA.w $7782,y
	LDA.w #$00C0
	STA.w $7E8E,y
	LDA.w #$0020
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_0E95FD:
	LDY.w $74A2,x
	BPL.b CODE_0E9608
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0E9608:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr155_FatGoonie
	BEQ.b CODE_0E9615
	CMP.w #!Define_YI_NorSpr158_BowlingGoonie
	BNE.b CODE_0E9623
CODE_0E9615:
	JSR.w CODE_0E9DC0
	LDA.w #$74A2
	PHA
	LDY.b #$01
	LDA.w #$0843
	BRA.b CODE_0E962C

CODE_0E9623:
	LDA.w #$6C00
	PHA
	LDY.b #$0C
	LDA.w #$0841
CODE_0E962C:
	STA.w $6FA2,x
	TYA
	STA.w $7402,x
	PLA
	STA.w $6FA0,x
CODE_0E9637:
	RTS

CODE_0E9638:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0E9650

CODE_0E9647:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0E9650:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0E9637
	BEQ.b CODE_0E9637
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0E9647
	LDA.w $7D38,y
	BEQ.b CODE_0E9647
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr022_FlashingEgg
	BCC.b CODE_0E967A
	CMP.w #!Define_YI_NorSpr02B_GreenGiantEgg+$01
	BCS.b CODE_0E967A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BNE.b CODE_0E9647
	BRA.b CODE_0E9687

CODE_0E967A:
	LDA.w $6FA2,y
	AND.w #$4000
	BNE.b CODE_0E9647
	TYX
	JSL.l CODE_03B25B
CODE_0E9687:
	JSR.w CODE_0E9885
	INC.b $18,x
	LDY.b $78,x
	BEQ.b CODE_0E9698
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STZ.b $78,x
CODE_0E9698:
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E7
	JSL.l CODE_03B56E
	LDA.w #!Define_YI_SoundID0B_ShellHit1
	JSL.l CODE_0085D2
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0E8_Goonie
	BEQ.b CODE_0E96F8
	CMP.w #!Define_YI_NorSpr153_GoonieWithShyGuy
	BEQ.b CODE_0E96F8
	LDA.w #$0001
	STA.w $7402,x
	LDY.b #$0A
	STY.b $76,x
	LDA.w #$0843
	STA.w $6FA2,x
	LDA.w #$7CA2
	STA.w $6FA0,x
	LDY.w $7400,x
	LDA.w DATA_0E9A97,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A36,x
	RTS

CODE_0E96F8:
	LDA.w #$000C
	STA.w $7402,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0010
	STA.w $7AF8,x
	LDY.b #$04
	STY.b $76,x
	LDA.w #$0841
	STA.w $6FA2,x
	LDA.w #$6C00
	STA.w $6FA0,x
CODE_0E971A:
	RTS

DATA_0E971B:
	dw $FF80,$0080

CODE_0E971F:
	LDA.w #$6C20
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_0E972B
	LDA.w #$6C00
CODE_0E972B:
	STA.w $6FA0,x
	CPX.w $61B6
	BNE.b CODE_0E9736
	STZ.w $61B6
CODE_0E9736:
	LDA.w $7AF6,x
	BNE.b CODE_0E971A
	LDY.b $76,x
	CPY.b #$03
	BNE.b CODE_0E974A
	LDA.w #$6C60
	STA.w $6FA0,x
	JMP.w CODE_0E97D0

CODE_0E974A:
	JSR.w CODE_0E985E
	BCS.b CODE_0E97B4
	LDA.w $7C18,x
	SEC
	SBC.b $02
	CMP.w #$FFF6
	BCC.b CODE_0E97CB
	STA.b $00
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_0E97B5
	LDY.w $61B6
	BNE.b CODE_0E97B4
	LDA.w $60AA
	BMI.b CODE_0E97B4
	CMP.w #$8000
	ROR
	CMP.w #$0180
	BMI.b CODE_0E9778
	LDA.w #$0180
CODE_0E9778:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	LDA.w #$0008
	STA.w $7A98,x
	ASL
	STA.w $75E2,x
	LDY.w $7400,x
	LDA.w DATA_0E971B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$03
	STY.b $76,x
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	ADC.b $00
	INC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	STZ.w $60C0
	STZ.w $60D4
	INC.w $61B4
	STX.w $61B6
	LDA.w #$6C60
	STA.w $6FA0,x
CODE_0E97B4:
	RTS

CODE_0E97B5:
	LDX.b $12
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w $60AA
	PLA
	JML.l CODE_03B51F

CODE_0E97CB:
	JSL.l CODE_03A858
	RTS

CODE_0E97D0:
	LDA.w $60FC
	AND.w #$001F
	BNE.b CODE_0E97EC
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $7C18,x
	SEC
	SBC.w $72C2,x
	STA.w $7C18,x
CODE_0E97EC:
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_0E97FD
	AND.w #$0180
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0E9811
CODE_0E97FD:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7C16,x
	SEC
	SBC.w $72C0,x
	STA.w $7C16,x
CODE_0E9811:
	JSR.w CODE_0E985E
	BCS.b CODE_0E983D
	LDY.w $61B6
	BNE.b CODE_0E983D
	LDA.w $7C18,x
	SEC
	SBC.b $02
	CMP.w #$FFF6
	BCC.b CODE_0E983D
	LDY.w $60AB
	BMI.b CODE_0E983D
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	INC.w $61B4
	STX.w $61B6
	RTS

CODE_0E983D:
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0005
	STA.b $16,x
	LDY.w $7400,x
	LDA.w DATA_0E9364,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0008
	STA.w $7AF6,x
	ASL
	STA.w $7542,x
	STZ.b $76,x
	RTS

CODE_0E985E:
	LDA.w $6120
	CLC
	ADC.w $7BB6,x
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_0E9884
	LDA.w $6122
	CLC
	ADC.w $7BB8,x
	STA.b $02
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C18,x
	CMP.b $00
CODE_0E9884:
	RTS

CODE_0E9885:
	LDA.w #!Define_YI_AmbSpr211
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0017
	STA.w $73C2,y
	LDA.w #$0001
	STA.w $7782,y
	RTS

DATA_0E98A5:
	dw $FF00,$0100

CODE_0E98A9:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E98EE
	LDY.w $7402,x
	INY
	CPY.b #$09
	BMI.b CODE_0E98D3
	DEC.b $16,x
	BNE.b CODE_0E98D1
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0003
	STA.b $16,x
	LDY.w $7400,x
	LDA.w DATA_0E98A5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0E98D1:
	LDY.b #$00
CODE_0E98D3:
	TYA
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$0020
	CPY.b #$02
	BMI.b CODE_0E98EB
	CPY.b #$06
	BPL.b CODE_0E98EB
	LDA.w #$FD80
CODE_0E98EB:
	STA.w $75E2,x
CODE_0E98EE:
	RTS

CODE_0E98EF:
	TYX
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w $7A98,x
	BNE.b CODE_0E9938
	LDY.w $7402,x
	BNE.b CODE_0E990A
	LDA.w #$0003
	STA.w $7A98,x
	INC.w $7402,x
	RTS

CODE_0E990A:
	CPY.b #$01
	BNE.b CODE_0E9910
	LDY.b #$08
CODE_0E9910:
	CPY.b #$09
	BNE.b CODE_0E9927
	DEC.b $16,x
	BNE.b CODE_0E9927
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A98,x
	INC.b $76,x
	RTS

CODE_0E9927:
	INY
	CPY.b #$0C
	BMI.b CODE_0E992E
	LDY.b #$09
CODE_0E992E:
	TYA
	STA.w $7402,x
	LDA.w #$0005
	STA.w $7A98,x
CODE_0E9938:
	RTS

CODE_0E9939:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0E995E
	LDA.w #$0004
	STA.w $7A98,x
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0006
	STA.b $16,x
	STZ.w $7402,x
	LDY.w $7400,x
	LDA.w DATA_0E9364,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
CODE_0E995E:
	RTS

CODE_0E995F:
	TYX
	LDA.w #$0010
	LDY.w $7223,x
	BPL.b CODE_0E996B
	LDA.w #$0040
CODE_0E996B:
	STA.w $7542,x
	LDA.w $75E2,x
	DEC
	CMP.w #$FFE0
	BPL.b CODE_0E997A
	LDA.w #$FFE0
CODE_0E997A:
	STA.w $75E2,x
	LDA.w $7A98,x
	BNE.b CODE_0E9996
	LDY.w $7402,x
	INY
	CPY.b #$09
	BMI.b CODE_0E998C
	LDY.b #$00
CODE_0E998C:
	TYA
	STA.w $7402,x
	LDA.w #$0001
	STA.w $7A98,x
CODE_0E9996:
	RTS

DATA_0E9997:
	dw $FE00,$0200

CODE_0E999B:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0E99CF
	LDY.w $7400,x
	LDA.w DATA_0E9997,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0841
	STA.w $6FA2,x
	LDA.w $7A98,x
	BNE.b CODE_0E99CF
	LDA.w #$0002
	STA.w $7A98,x
	LDY.w $7402,x
	INY
	CPY.b #$0F
	BMI.b CODE_0E99CB
	LDY.b #$0C
CODE_0E99CB:
	TYA
	STA.w $7402,x
CODE_0E99CF:
	RTS

CODE_0E99D0:
	TYX
	LDA.w $7680,x
	CLC
	ADC.w #$0020
	CMP.w #$0140
	BCC.b CODE_0E9A2E
	LDA.w $70E2,x
	AND.w #$0010
	DEC
	EOR.w $7680,x
	BPL.b CODE_0E9A2E
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w #$6800
	STA.w $6FA0,x
	LDA.w #$0010
	STA.w $7542,x
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0003
	STA.b $16,x
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDA.w DATA_0E98A5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$0020
	STA.w $75E2,x
	LDY.b #$01
	STY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr153_GoonieWithShyGuy
	BNE.b CODE_0E9A2E
	JSR.w CODE_0E94C4
CODE_0E9A2E:
	RTS

CODE_0E9A2F:
	TYX
	LDY.b $78,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0E9A64
	LDA.w $7D96,y
	BNE.b CODE_0E9A64
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0003
	BNE.b CODE_0E9A64
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7C16,x
	CLC
	ADC.w #$0038
	CMP.w #$0070
	BCS.b CODE_0E9A6C
	LDA.w $7C18,x
	BPL.b CODE_0E9A6C
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_0E9A64:
	STZ.w $7402,x
	STZ.b $78,x
	STZ.b $76,x
	RTS

CODE_0E9A6C:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,y
	LDA.w $7A98,x
	BNE.b CODE_0E9A96
	LDA.w #$0005
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	CMP.w #$0012
	BMI.b CODE_0E9A93
	LDA.w #$000F
CODE_0E9A93:
	STA.w $7402,x
CODE_0E9A96:
	RTS

;---------------------------------------------------------------------------

DATA_0E9A97:
	dw $FF40,$00C0

YI_NorSpr155_FatGoonie_Init:
;$0E9A9B
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC
	BNE.b CODE_0E9ACD
YI_NorSpr158_BowlingGoonie_Init:
	INC.b $18,x
	INC.w $7402,x
	LDY.b #$0A
	STY.b $76,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0843
	STA.w $6FA2,x
	LDA.w #$74A2
	STA.w $6FA0,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7400,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_0E9B01

CODE_0E9ACD:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $70E2,x
	PHA
	SEC
	SBC.w $6094
	STA.b $00
	PLA
	AND.w #$0010
	EOR.w #$0010
	SEC
	SBC.w #$0010
	EOR.b $00
	BPL.b CODE_0E9AF4
	LDA.b $00
	CLC
	ADC.w #$0010
	CMP.w #$0120
	BCS.b CODE_0E9B01
CODE_0E9AF4:
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	RTL

CODE_0E9B01:
	JSL.l CODE_03AE60
	LDY.w $7400,x
	LDA.w DATA_0E9A97,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$0005
	STA.w $74A2,x
	JSR.w CODE_0E9DC0
	RTL

;---------------------------------------------------------------------------

DATA_0E9B1E:
	dw CODE_0E9FA6
	dw CODE_0E9FFE
	dw CODE_0EA01A
	dw CODE_0EA06E
	dw CODE_0E9FFE
	dw CODE_0EA01A
	dw CODE_0EA06E
	dw CODE_0EA086
	dw CODE_0EA09C
	dw CODE_0EA0DD
	dw CODE_0EA0F7

DATA_0E9B34:
	dw $74A2,$7442

YI_NorSpr155_FatGoonie_Main:
YI_NorSpr158_BowlingGoonie_Main:
;$0E9B38
	JSR.w CODE_0E9CED
	JSR.w CODE_0E95AE
	LDA.w $7D96,x
	BEQ.b CODE_0E9B46
	STZ.w $6FA2,x
CODE_0E9B46:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0E9B1E,x)
	LDY.w $7402,x
	BNE.b CODE_0E9B5A
	JSR.w CODE_0E9638
CODE_0E9B5A:
	JSR.w CODE_0E9DC0
	LDA.w $61B4
	STA.b $00
	LDY.w $7402,x
	BNE.b CODE_0E9B6E
	JSR.w CODE_0E9E86
	JSR.w CODE_0E9F2D
	RTL

CODE_0E9B6E:
	JSL.l CODE_05E379
	JSL.l CODE_03A5B7
	LDY.b #$00
	LDA.w $61B4
	CMP.b $00
	BEQ.b CODE_0E9B81
	INY
	INY
CODE_0E9B81:
	LDA.w DATA_0E9B34,y
	STA.w $6FA0,x
	LDA.w #$0008
	STA.w $7B56,x
	STA.w $7B58,x
	RTL

DATA_0E9B91:
	dw DATA_0E9BA5,DATA_0E9BC3,DATA_0E9BE1,DATA_0E9BFF,DATA_0E9C1D,DATA_0E9C3B,DATA_0E9C59,DATA_0E9C77
	dw DATA_0E9C95,DATA_0E9CB3

DATA_0E9BA5:
	dw $ED0E,$0005,$0E02,$07FD,$0000,$E610,$000D,$F400
	dw $05ED,$0240,$FDFC,$4007,$FA00,$0DE6,$0040

DATA_0E9BC3:
	dw $F510,$0008,$1502,$0DF0,$0000,$F015,$000D,$F200
	dw $08F5,$0240,$F0F5,$400D,$F500,$0DF0,$0040

DATA_0E9BE1:
	dw $FD10,$000A,$1002,$0AFD,$0000,$0510,$001A,$F200
	dw $0AFD,$0240,$FDFA,$400A,$FA00,$1A05,$0040

DATA_0E9BFF:
	dw $0610,$000C,$1002,$0C06,$0000,$0610,$000C,$F200
	dw $0C06,$0240,$06FA,$400C,$FA00,$0C0E,$0040

DATA_0E9C1D:
	dw $0810,$0017,$1000,$1708,$0000,$1010,$000E,$FA02
	dw $1708,$0040,$08FA,$4017,$F200,$0E10,$0240

DATA_0E9C3B:
	dw $0710,$8008,$1502,$0D14,$0080,$1415,$800D,$F200
	dw $0807,$02C0,$14F5,$C00D,$F500,$0D14,$00C0

DATA_0E9C59:
	dw $FF10,$800A,$1002,$0A07,$0080,$FF10,$801A,$F200
	dw $0AFF,$02C0,$07FA,$C00A,$FA00,$1AFF,$00C0

DATA_0E9C77:
	dw $F60F,$800C,$0F02,$0CFE,$0080,$F60F,$801C,$F300
	dw $0CF6,$02C0,$FEFB,$C00C,$FB00,$1CF6,$00C0

DATA_0E9C95:
	dw $FE0F,$8017,$0F00,$17FE,$0080,$EE0F,$800E,$FB02
	dw $17FE,$00C0,$FEFB,$C017,$F300,$0EEE,$02C0

DATA_0E9CB3:
	dw $F510,$0008,$1502,$0DF0,$0000,$F015,$000D,$F200
	dw $08F5,$0240,$F0F5,$400D,$F500,$0DF0,$0040

DATA_0E9CD1:
	dw $FD08,$FDFA,$FDF8,$FD06

DATA_0E9CD9:
	dw $0000,$0000,$0000,$0010,$FFF0

DATA_0E9CE3:
	dw $0000,$0010,$FFF0,$0000,$0000

CODE_0E9CED:
	LDY.w $74A2,x
	BPL.b CODE_0E9CF3
	RTS

CODE_0E9CF3:
	LDY.w $7402,x
	BEQ.b CODE_0E9CFB
	JMP.w CODE_0E9D8B

CODE_0E9CFB:
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7A36,x
	STA.w $604C
	CMP.w #$0100
	BPL.b CODE_0E9D1C
	ASL
	EOR.w #$FFFF
	CLC
	ADC.w #$0301
	BRA.b CODE_0E9D3E

CODE_0E9D1C:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0140
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$FF00
	EOR.w #$FFFF
	INC
CODE_0E9D3E:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $79,x
	TYA
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_0E9CD1>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0E9CD1
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_0E9B91
	STA.w $6000
	LDY.b $78,x
	LDA.w DATA_0E9CD9,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w DATA_0E9CE3,y
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0B8751>>16
	LDA.w #FXCODE_0B8751
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0018
	TAY
	JSL.l CODE_03AA60
	RTS

CODE_0E9D8B:
	JSL.l CODE_03AA52
	REP.b #$10
	LDY.w $7362,x
	LDA.w #$8000
	STA.w $6020,y
	STA.w $6028,y
	STA.w $6030,y
	STA.w $6038,y
	STA.w $6040,y
	STA.w $6048,y
	SEP.b #$10
	RTS

DATA_0E9DAC:
	dw $0000,$0010,$0010,$0004,$001C

DATA_0E9DB6:
	dw $0000,$0004,$001C,$0010,$0010

CODE_0E9DC0:
	LDY.w $7402,x
	BEQ.b CODE_0E9DC8
	JMP.w CODE_0E9E4C

CODE_0E9DC8:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	CMP.w #$0100
	BPL.b CODE_0E9DDD
	ASL
	EOR.w #$FFFF
	CLC
	ADC.w #$0301
	BRA.b CODE_0E9DFF

CODE_0E9DDD:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0140
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$FF00
	EOR.w #$FFFF
	INC
CODE_0E9DFF:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_540000+$2081)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_540000+$2081
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b $78,x
	LDA.w DATA_0E9DAC,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w DATA_0E9DB6,y
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7400,x
	BEQ.b CODE_0E9E2B
	LDA.w #$0020
	SEC
	SBC.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
CODE_0E9E2B:
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_0E9E4C:
	LDA.w #(FXDATA_540000+$2081)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_540000+$2081
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7A38,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_0E9E86:
	LDA.w $7BB6,x
	CLC
	ADC.w $6120
	STA.b $00
	ASL
	STA.b $02
	LDA.w $7BB8,x
	CLC
	ADC.w $6122
	STA.b $04
	ASL
	STA.b $06
	LDY.w $7A38,x
	BEQ.b CODE_0E9EA6
	JMP.w CODE_0E9EFA

CODE_0E9EA6:
	LDA.w $7C16,x
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_0E9EF9
	LDA.w $7C18,x
	CLC
	ADC.b $04
	SEC
	SBC.b $06
	BCS.b CODE_0E9EF9
	CMP.w #$FFF8
	BCC.b CODE_0E9EF5
	LDY.w $60C0
	BEQ.b CODE_0E9ECA
	LDY.w $60AB
	BMI.b CODE_0E9EF9
CODE_0E9ECA:
	LDA.w $7CD8,x
	SEC
	SBC.b $04
	SEC
	SBC.w $611E
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0001
	STA.w $7A38,x
	STZ.w $60AA
	STZ.w $60C0
	STZ.w $60D4
	INC.w $61B4
	LDA.w #$7460
	STA.w $6FA0,x
	RTS

CODE_0E9EF5:
	JSL.l CODE_03A858
CODE_0E9EF9:
	RTS

CODE_0E9EFA:
	STZ.w $7A38,x
	LDA.w #$7400
	STA.w $6FA0,x
	LDA.w $7C16,x
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_0E9EF9
	LDY.w $60C0
	BEQ.b CODE_0E9F17
	LDY.w $60AB
	BMI.b CODE_0E9EF9
CODE_0E9F17:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C2,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BRA.b CODE_0E9ECA

CODE_0E9F2D:
	LDA.w #$000C
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $78,x
	CPY.b #$06
	BPL.b CODE_0E9F75
	CPY.b #$02
	BNE.b CODE_0E9F57
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0004
	BRA.b CODE_0E9F5E

CODE_0E9F57:
	LDA.w #$0014
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_0E9F5E:
	STA.b $00
	LDY.w $7A38,x
	BEQ.b CODE_0E9F70
	SEC
	SBC.w $7B58,x
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_0E9F70:
	LDA.b $00
	STA.w $7B58,x
CODE_0E9F75:
	LDY.w $7A38,x
	BEQ.b CODE_0E9F88
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $7BB8,x
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_0E9F88:
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7BB8,x
	RTS

DATA_0E9F8F:
	db $04,$02,$04,$08,$04,$02,$04,$06,$04,$02,$04,$02,$04

DATA_0E9F9C:
	db $02,$04,$04,$00,$01,$00,$07,$00,$07,$00

CODE_0E9FA6:
	TYX
	LDA.w $7860,x
	AND.w #$000F
	BEQ.b CODE_0E9FC9
	TAY
	LDA.w DATA_0E9F8F-$01,y
	TAY
	STY.b $78,x
	LDA.w DATA_0E9F9C,y
	STA.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDY.b #$09
	STY.b $79,x
	RTS

CODE_0E9FC9:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$0100
	BMI.b CODE_0E9FE1
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	STZ.b $79,x
	BRA.b CODE_0E9FF8

CODE_0E9FE1:
	JSR.w CODE_0EA11D
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$FF00
	BMI.b CODE_0E9FF8
	LDA.w #$0008
	STA.w $7542,x
	LDA.w #$0100
	STA.w $75E2,x
CODE_0E9FF8:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.b $16,x
	RTS

CODE_0E9FFE:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0004
	CMP.w #$00D0
	BPL.b CODE_0EA016
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
	LDA.w #$00D0
CODE_0EA016:
	STA.w $7A36,x
	RTS

CODE_0EA01A:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$0100
	BMI.b CODE_0EA06A
	PHA
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_0EA053
	LDY.w $7223,x
	BMI.b CODE_0EA050
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w #$0020
	STA.w $7542,x
	LSR
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0EA050:
	JSR.w CODE_0EA11D
CODE_0EA053:
	LDA.w #$0020
	STA.w $7542,x
	LDY.w $7400,x
	LDA.w DATA_0E9A97,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	CMP.w #$0140
	BMI.b CODE_0EA06A
	INC.b $76,x
CODE_0EA06A:
	STA.w $7A36,x
	RTS

CODE_0EA06E:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0008
	CMP.w #$0100
	BPL.b CODE_0EA080
	STZ.b $76,x
	LDA.w #$0100
CODE_0EA080:
	STA.w $7A36,x
	JMP.w CODE_0EA11D

CODE_0EA086:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w #$0008
	CMP.w #$0140
	BMI.b CODE_0EA098
	INC.b $76,x
	LDA.w #$0140
CODE_0EA098:
	STA.w $7A36,x
	RTS

CODE_0EA09C:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0004
	CMP.w #$0100
	BPL.b CODE_0EA0D2
	LDY.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0EA0D2
	PHA
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0E9A97,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $16,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #!Define_YI_SoundID03_Swim
	JSL.l CODE_0085D2
	PLA
CODE_0EA0D2:
	CMP.w #$00E8
	BPL.b CODE_0EA0D9
	INC.b $76,x
CODE_0EA0D9:
	STA.w $7A36,x
	RTS

CODE_0EA0DD:
	TYX
	LDA.w $7A36,x
	CLC
	ADC.w #$0004
	CMP.w #$0100
	BMI.b CODE_0EA0EF
	STZ.b $76,x
	LDA.w #$0100
CODE_0EA0EF:
	STA.w $7A36,x
	RTS

DATA_0EA0F3:
	dw $0004,$FFFC

CODE_0EA0F7:
	TYX
	LDY.b $19,x
	LDA.w $7A38,x
	CLC
	ADC.w DATA_0EA0F3,y
	AND.w #$01FE
	STA.w $7A38,x
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0EA11C
	LDA.b $19,x
	EOR.w #$0002
	STA.b $19,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7400,x
CODE_0EA11C:
	RTS

CODE_0EA11D:
	LDA.w $7A98,x
	BNE.b CODE_0EA130
	INC.w $7A98,x
	LDY.b $79,x
	INY
	CPY.b #$09
	BMI.b CODE_0EA12E
	LDY.b #$00
CODE_0EA12E:
	STY.b $79,x
CODE_0EA130:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0F7_BarneyBubble_Init:
;$0EA131
	LDA.w #$0100
	STA.w $7A36,x
	RTL

;---------------------------------------------------------------------------

DATA_0EA138:
	dw CODE_0EA2FA
	dw CODE_0EA335
	dw CODE_0EA36B
	dw CODE_0EA433

YI_NorSpr0F7_BarneyBubble_Main:
;$0EA140
	LDY.w $7722,x
	BMI.b CODE_0EA1B9
	LDY.w $74A2,x
	BMI.b CODE_0EA1B9
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0008
	TAY
	JSL.l CODE_03AA60
	LDA.w #$0004
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7CD6,x
	SEC
	SBC.w $6094
	STA.b $00
	REP.b #$10
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $7400,x
	BEQ.b CODE_0EA19E
	LDY.w $7362,x
	LDA.b $00
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0008
	STA.w $6000,y
	LDA.b $00
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	BRA.b CODE_0EA1B4

CODE_0EA19E:
	LDY.w $7362,x
	LDA.b $00
	CLC
	ADC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $6000,y
	LDA.b $00
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w #$0008
CODE_0EA1B4:
	STA.w $6028,y
	SEP.b #$10
CODE_0EA1B9:
	JSL.l CODE_03AF23
	JSR.w CODE_0EA1CF
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EA138,x)
	JSR.w CODE_0EA29F
	JML.l CODE_0DC14C

CODE_0EA1CF:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EA1E4
	LDY.w $60AB
	BMI.b CODE_0EA1E1
	LDY.w $0D94
	BEQ.b CODE_0EA1E4
CODE_0EA1E1:
	JMP.w CODE_0EA290

CODE_0EA1E4:
	LDA.w #$0006
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $6120
	STA.b $00
	ASL
	STA.b $02
	LDA.w $7C16,x
	CLC
	ADC.b $00
	CMP.b $02
	BCS.b CODE_0EA1E1
	LDA.w #$000C
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7182,x
	CLC
	ADC.w #$000F
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $611E
	SEC
	SBC.w $6122
	STA.b $00
	CMP.w #$FFF8
	BCC.b CODE_0EA285
	CPX.w $61B6
	BEQ.b CODE_0EA26B
	LDY.w $61B6
	BNE.b CODE_0EA290
	STX.w $61B6
	LDY.w $7722,x
	BPL.b CODE_0EA264
	JSL.l CODE_03AD74
	BCC.b CODE_0EA264
	LDA.w #$0004
	STA.w $7402,x
CODE_0EA264:
	LDY.b #$02
	STY.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EA26B:
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	ADC.b $00
	INC
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60D4
	STZ.w $60AA
	INC.w $61B4
	LDA.w #$7440
	STA.w $6FA0,x
	RTS

CODE_0EA285:
	BPL.b CODE_0EA290
	LDY.w $7D36,x
	BPL.b CODE_0EA295
	JSL.l CODE_03A858
CODE_0EA290:
	CPX.w $61B6
	BNE.b CODE_0EA298
CODE_0EA295:
	STZ.w $61B6
CODE_0EA298:
	LDA.w #$7480
	STA.w $6FA0,x
	RTS

CODE_0EA29F:
	LDY.w $7722,x
	BMI.b CODE_0EA2F5
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_540000+$3050)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_540000+$3050
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0882FA>>16
	LDA.w #FXCODE_0882FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	LDY.w $7402,x
	CPY.b #$03
	BNE.b CODE_0EA2F5
	JSL.l CODE_03AEFD
CODE_0EA2F5:
	RTS

DATA_0EA2F6:
	dw $FF00,$0100

CODE_0EA2FA:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EA30B
	LDA.w #$0841
	STA.w $6FA2,x
	BRA.b CODE_0EA30E

CODE_0EA30B:
	INC.w $7A96,x
CODE_0EA30E:
	LDA.w $7A96,x
	BNE.b CODE_0EA330
	LDA.b $10
	PHA
	AND.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0EA2F6,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	AND.w #$001F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	INC.b $76,x
CODE_0EA330:
	RTS

DATA_0EA331:
	db $00,$01,$02,$01

CODE_0EA335:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EA353
	LDA.w #$0003
	STA.w $7402,x
	LDA.b $10
	AND.w #$000F
	CLC
	ADC.w #$0008
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $76,x
	RTS

CODE_0EA353:
	LDA.b $78,x
	INC
	AND.w #$0003
	STA.b $78,x
	LDY.b $78,x
	LDA.w DATA_0EA331,y
	AND.w #$00FF
	STA.w $7402,x
	RTS

DATA_0EA367:
	dw $FD00,$0300

CODE_0EA36B:
	TYX
	LDA.w $7860,x
	LSR
	BCC.b CODE_0EA37E
	CPX.w $61B6
	BEQ.b CODE_0EA37F
	LDA.w #$0002
	STA.b $16,x
	INC.b $76,x
CODE_0EA37E:
	RTS

CODE_0EA37F:
	LDA.w $7A36,x
	SEC
	SBC.w #$0010
	CMP.w #$0040
	BPL.b CODE_0EA392
	LDA.w #$0040
	STA.w $7A36,x
	RTS

CODE_0EA392:
	STA.w $7A36,x
	LDA.w $7A98,x
	BNE.b CODE_0EA37E
	LDA.w #$0006
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $7400,x
	LDA.w DATA_0EA367,y
	STA.b $00
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CPY.b #$00
	BNE.b CODE_0EA3CC
	EOR.w #$FFFF
	INC
	SEC
	SBC.w #$0010
CODE_0EA3CC:
	STA.b $02
	LDA.w #$0006
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0019
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	JSL.l CODE_03A34C
else
	JSL.l CODE_03A364
endif
	BCC.b CODE_0EA42A
	LDA.w $7CD6,x
	CLC
	ADC.b $02
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$000A
	STA.w $7A98,y
	LDA.w #$0004
	STA.w $7402,y
	DEC
	STA.w $7A98,x
	LDA.w $6FA0,y
	AND.w #$F9FF
	STA.w $6FA0,y
	LDA.w #!Define_YI_SoundID61_Splash3
	JSL.l CODE_0085D2
CODE_0EA42A:
	RTS

DATA_0EA42B:
	dw $FFF0,$0020

DATA_0EA42F:
	dw $0100,$01C0

CODE_0EA433:
	TYX
	LDY.b $16,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0EA42B,y
	CMP.w DATA_0EA42F,y
	PHP
	CPY.b #$00
	BEQ.b CODE_0EA458
	PLP
	BMI.b CODE_0EA46E
	STZ.b $16,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0841
	STA.w $6FA2,x
	BRA.b CODE_0EA46B

CODE_0EA458:
	PLP
	BPL.b CODE_0EA46E
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w #$0003
	STA.w $7402,x
	STZ.b $78,x
	STZ.b $76,x
CODE_0EA46B:
	LDA.w DATA_0EA42F,y
CODE_0EA46E:
	STA.w $7A36,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0F6_MotherHuffinPuffin_Init:
;$0EA472
	LDA.w #$0100
	STA.w $7A36,x
	JSL.l CODE_03AE60
	LDX.b #FXCODE_0991D5>>16
	LDA.w #FXCODE_0991D5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	SEC
	SBC.w #$0006
	BPL.b CODE_0EA4E3
	CMP.w #$FFFE
	BPL.b CODE_0EA498
	LDA.w #$FFFE
CODE_0EA498:
	EOR.w #$FFFF
	INC
	STA.b $00
	LDA.w #$0010
	STA.b $02
	TXY
CODE_0EA4A4:
	STY.b $04
	LDA.w #$0028
	JSL.l CODE_03A364
	BCC.b CODE_0EA4E3
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.b $02
	STA.w $7A96,y
	CLC
	ADC.w #$0008
	STA.b $02
	LDA.w $7974
	STA.w $7A38,y
	SEP.b #$20
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701979|!EXRAMBankMirror,y
	REP.b #$20
	DEC.b $00
	BNE.b CODE_0EA4A4
CODE_0EA4E3:
	JSR.w CODE_0EA57E
	LDA.w $7974
	STA.w $7A38,x
	RTL

;---------------------------------------------------------------------------

DATA_0EA4ED:
	dw CODE_0EA675
	dw CODE_0EA70E
	dw CODE_0EA745
	dw CODE_0EA768

YI_NorSpr0F6_MotherHuffinPuffin_Main:
;$0EA4F5
	JSR.w CODE_0EA519
	JSL.l CODE_03AF23
	JSR.w CODE_0EA533
	STZ.b $0E
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EA4ED,x)
	JSR.w CODE_0EA57E
	JSR.w CODE_0EA5D5
	RTL

DATA_0EA510:
	db $00,$10,$08,$10,$10,$10,$10,$10,$00

CODE_0EA519:
	LDY.w $7722,x
	BMI.b CODE_0EA532
	REP.b #$10
	LDY.w $7402,x
	LDA.w DATA_0EA510,y
	AND.w #$00FF
	CLC
	ADC.w $7362,x
	TAY
	JSL.l CODE_03AA60
CODE_0EA532:
	RTS

CODE_0EA533:
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $7CD8,x
	CLC
	ADC.w $7B58,x
	STA.w $7B58,x
	LDA.w #$000A
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7BB8,x
	RTS

CODE_0EA57E:
	LDY.w $7722,x
	BMI.b CODE_0EA5D0
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.b $0E
	BEQ.b CODE_0EA59D
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
CODE_0EA59D:
	LDA.w #(FXDATA_550000+$2000)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$2000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0EA5D0:
	RTS

DATA_0EA5D1:
	dw $FE00,$0200

CODE_0EA5D5:
	LDY.w $7D36,x
	BMI.b CODE_0EA5F2
	BEQ.b CODE_0EA5F1
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_0EA5F1
	LDA.w $7D37,y
	BEQ.b CODE_0EA5F1
	DEY
	TYX
	JSL.l CODE_03B25B
	BRA.b CODE_0EA62D

CODE_0EA5F1:
	RTS

CODE_0EA5F2:
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_0EA660
	LDY.w $60AB
	BMI.b CODE_0EA64B
	LDY.w $60C0
	BEQ.b CODE_0EA64B
	LDA.w $7C18,x
	SEC
	SBC.w $7BB8,x
	SEC
	SBC.w $6122
	CMP.w #$FFF8
	BCC.b CODE_0EA64B
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	STZ.w $60D2
	STZ.w $60D4
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
CODE_0EA62D:
	LDA.w #$0006
	STA.w $7402,x
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$01
	STY.b $76,x
	STY.b $18,x
	LDA.w $6FA2,x
	AND.w #$F83F
	ORA.w #$0480
	STA.w $6FA2,x
	RTS

CODE_0EA64B:
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w $60D4
CODE_0EA660:
	LDY.w $77C2,x
	LDA.w DATA_0EA5D1,y
	STA.w $60A8
	STA.w $60B4
	RTS

DATA_0EA66D:
	dw $FF40,$00C0

DATA_0EA671:
	dw $FFFE,$0002

CODE_0EA675:
	TYX
	LDY.b $18,x
	BEQ.b CODE_0EA684
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	STA.w $7400,x
CODE_0EA684:
	LDY.w $7400,x
	LDA.w DATA_0EA66D,y
	LDY.b $18,x
	BEQ.b CODE_0EA68F
	ASL
CODE_0EA68F:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0EA6E1
	LDA.w $7A98,x
	BNE.b CODE_0EA6B5
	LDA.w #$0008
	LDY.b $18,x
	BEQ.b CODE_0EA6A3
	LSR
	LSR
CODE_0EA6A3:
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	CMP.w #$0006
	BNE.b CODE_0EA6B2
	LDA.w #$0000
CODE_0EA6B2:
	STA.w $7402,x
CODE_0EA6B5:
	LDA.w $7402,x
	INC
	AND.w #$0004
	LSR
	TAY
	LDA.w DATA_0EA671,y
	LDY.b $18,x
	BEQ.b CODE_0EA6C7
	ASL
	ASL
CODE_0EA6C7:
	CLC
	ADC.w $7A36,x
	CMP.w #$010C
	BMI.b CODE_0EA6D3
	LDA.w #$010C
CODE_0EA6D3:
	CMP.w #$00F0
	BPL.b CODE_0EA6DB
	LDA.w #$00F0
CODE_0EA6DB:
	STA.w $7A36,x
	INC.b $0E
	RTS

CODE_0EA6E1:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0EA6F5
	AND.w #$0008
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0EA6F5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EA6F5:
	RTS

DATA_0EA6F6:
	dw $0100,$00C0,$0120,$0080

DATA_0EA6FE:
	dw $0018,$FFE8,$0010,$FFF0

DATA_0EA706:
	dw $FFFF,$0000,$FFFF,$0000

CODE_0EA70E:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EA744
	LDY.b $16,x
	LDA.w $7A36,x
	SEC
	SBC.w DATA_0EA6F6,y
	EOR.w DATA_0EA706,y
	BPL.b CODE_0EA73A
	LDA.w DATA_0EA6F6,y
	STA.w $7A36,x
	DEC.b $16,x
	DEC.b $16,x
	BPL.b CODE_0EA739
	LDA.w #$0020
	STA.w $7A98,x
	INC.b $76,x
CODE_0EA739:
	RTS

CODE_0EA73A:
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0EA6FE,y
	STA.w $7A36,x
CODE_0EA744:
	RTS

CODE_0EA745:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EA767
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$08
	BNE.b CODE_0EA761
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7860,x
	INC.b $76,x
	RTS

CODE_0EA761:
	LDA.w #$0004
	STA.w $7A98,x
CODE_0EA767:
	RTS

CODE_0EA768:
	TYX
	LDY.w $7223,x
	BMI.b CODE_0EA77E
	LDA.w #$0005
	STA.w $7402,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EA77E
	STZ.b $76,x
CODE_0EA77E:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr028_HuffinPuffin_Init:
;$0EA77F
	RTL

;---------------------------------------------------------------------------

DATA_0EA780:
	dw CODE_0EA8FC
	dw CODE_0EA96A
	dw CODE_0EA9EF

DATA_0EA786:
	dw $0006,$FFFA

DATA_0EA78A:
	dw $FFB0,$0050,$FC00,$0400

YI_NorSpr028_HuffinPuffin_Main:
;$0EA792
	LDA.w $7D38,x
	BEQ.b CODE_0EA7B1
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LSR
	BNE.b CODE_0EA7B4
	LDY.w $7D36,x
	BPL.b CODE_0EA7B4
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	ORA.w $7A36,x
	BNE.b CODE_0EA7B4
	STZ.w $7D38,x
	JSL.l CODE_03BEB9
CODE_0EA7B1:
	JMP.w CODE_0EA898

CODE_0EA7B4:
	LDA.w $7542,x
	CMP.w #$0040
	BCC.b CODE_0EA7BF
	JMP.w CODE_0EA898

CODE_0EA7BF:
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w $0B57
	BEQ.b CODE_0EA7E1
	EOR.w #$0100
CODE_0EA7E1:
	BIT.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_0EA7ED
	EOR.w #$00FF
	INC
	AND.w #$01FE
CODE_0EA7ED:
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$01FE
	STA.b $00
	BIT.w #$0100
	BEQ.b CODE_0EA7FF
	EOR.w #$01FF
	INC
CODE_0EA7FF:
	LDY.b #$00
	CMP.w #$0080
	BCS.b CODE_0EA80F
	LDA.b $00
	AND.w #$0100
	BEQ.b CODE_0EA80F
	LDY.b #$02
CODE_0EA80F:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0EA786,y
	AND.w #$01FE
	REP.b #$10
	TAY
	BIT.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BPL.b CODE_0EA824
	ORA.w #$8000
CODE_0EA824:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYX
	LDY.w #$0000
	LDA.l DATA_00E9D4,x
	ASL
	ASL
	BMI.b CODE_0EA836
	LDY.w #$0002
CODE_0EA836:
	STA.b $02
	STY.b $04
	LDA.l DATA_00E954,x
	ASL
	ASL
	SEP.b #$10
	LDX.b $12
	BIT.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BMI.b CODE_0EA84D
	EOR.w #$FFFF
	INC
CODE_0EA84D:
	LDY.b #$00
	CMP.w #$0000
	BMI.b CODE_0EA856
	LDY.b #$02
CODE_0EA856:
	STA.b $00
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.b $00
	BPL.b CODE_0EA865
	TYA
	EOR.w #$0002
	TAY
CODE_0EA865:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0EA78A,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	AND.w #$8000
	BEQ.b CODE_0EA877
	LDA.w #$0002
CODE_0EA877:
	EOR.w #$0002
	STA.w $7400,x
	LDY.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.b $02
	EOR.b $02
	BMI.b CODE_0EA88E
	TYA
	EOR.w #$0002
	TAY
CODE_0EA88E:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0EA78A,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EA898:
	JSL.l CODE_03B9DD
	LDA.b $78,x
	BEQ.b CODE_0EA8A3
	JMP.w CODE_0EAA25

CODE_0EA8A3:
	LDA.w $7A36,x
	BMI.b CODE_0EA8F7
	LSR
	BNE.b CODE_0EA8B3
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EA780,x)
CODE_0EA8B3:
	LDY.w $7D36,x
	BPL.b CODE_0EA8E0
	LDA.w $7AF6,x
	BNE.b CODE_0EA8E0
	LDY.b $18,x
	BMI.b CODE_0EA8C6
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	BEQ.b CODE_0EA8E0
CODE_0EA8C6:
	LDA.w !EXRAM_YI_Player_CurrentFormLo|!EXRAMBankMirror
	BNE.b CODE_0EA8E0
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0EA8D8
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EA8E0
CODE_0EA8D8:
	LDY.b #$FF
	STY.b $19,x
	JSL.l CODE_03BEB9
CODE_0EA8E0:
	LDY.b $19,x
	STY.b $02
	LDY.b $18,x
	BMI.b CODE_0EA8F7
	CPY.b $02
	BEQ.b CODE_0EA8F7
	LDY.b $02
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	BEQ.b CODE_0EA8F7
	LDY.b $18,x
	STY.b $19,x
CODE_0EA8F7:
	RTL

DATA_0EA8F8:
	dw $FFC0,$0040

CODE_0EA8FC:
	TYX
	JSR.w CODE_0EA9C2
	LDA.w $7A96,x
	BNE.b CODE_0EA965
	LDY.b $19,x
	BPL.b CODE_0EA912
	LDA.w $77C2,x
	EOR.w #$0002
	TAY
	BRA.b CODE_0EA92B

CODE_0EA912:
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCC.b CODE_0EA938
	LDY.b #$00
	CMP.w #$0000
	BMI.b CODE_0EA92B
	INY
	INY
CODE_0EA92B:
	TYA
	STA.w $7400,x
	LDA.w #$0004
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_0EA938:
	LDY.b $18,x
	BMI.b CODE_0EA93F
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
CODE_0EA93F:
	PHP
	LDY.w $7400,x
	LDA.w DATA_0EA8F8,y
	PLP
	BEQ.b CODE_0EA94A
	ASL
CODE_0EA94A:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0EA6E1
	LDA.w $7A98,x
	BNE.b CODE_0EA965
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_0EA965:
	RTS

DATA_0EA966:
	dw $FF00,$0100

CODE_0EA96A:
	TYX
	JSR.w CODE_0EA9C2
	LDY.b $19,x
	BPL.b CODE_0EA97E
	LDA.w $77C2,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	BRA.b CODE_0EA997

CODE_0EA97E:
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_0EA997
	LDA.w #$0002
	STA.w $7402,x
	DEC.b $76,x
	RTS

CODE_0EA997:
	LDY.b $18,x
	BMI.b CODE_0EA99E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
CODE_0EA99E:
	PHP
	LDY.w $7400,x
	LDA.w DATA_0EA966,y
	PLP
	BEQ.b CODE_0EA9A9
	ASL
CODE_0EA9A9:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0EA6E1
CODE_0EA9AF:
	LDA.w $7A98,x
	BNE.b CODE_0EA9C1
	LDA.w #$0002
	STA.w $7A98,x
	DEC
	EOR.w $7402,x
	STA.w $7402,x
CODE_0EA9C1:
	RTS

CODE_0EA9C2:
	LDY.b $18,x
	BMI.b CODE_0EA9EA
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0EA9DE
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0F6_MotherHuffinPuffin
	BNE.b CODE_0EA9DE
	LDA.w $7A38,y
	CMP.w $7A38,x
	BEQ.b CODE_0EA9EA
CODE_0EA9DE:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7402,x
	STA.b $76,x
	PLA
CODE_0EA9EA:
	RTS

DATA_0EA9EB:
	dw $0280,$FD80

CODE_0EA9EF:
	TYX
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	STA.w $7400,x
	LDA.w DATA_0EA9EB,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0EA6E1
	BRA.b CODE_0EA9AF

DATA_0EAA05:
	dw $0000,$0000,$FFFF,$FFFE,$FFFE,$FFFD,$FFFD,$FFFD
	dw $FFFD,$FFFE,$FFFE,$FFFF,$FFFF,$0000,$0000,$0000

CODE_0EAA25:
	JSL.l CODE_03BB1D
	LDA.w $70E2,x
	SEC
	SBC.w $6EBC
	STA.b $00
	BNE.b CODE_0EAA45
	LDA.w $60A8
	BEQ.b CODE_0EAA51
	PHP
	LDA.w #$0001
	PLP
	BPL.b CODE_0EAA43
	LDA.w #$FFFF
CODE_0EAA43:
	STA.b $00
CODE_0EAA45:
	ASL
	ROL
	ASL
	AND.w #$0002
	EOR.w #$0002
	STA.w $7400,x
CODE_0EAA51:
	LDA.w #$0006
	STA.w $7402,x
	LDA.w $0812,y
	AND.w #$FF00
	BEQ.b CODE_0EAA66
	BMI.b CODE_0EAAA0
	STZ.w $7402,x
	BRA.b CODE_0EAAA0

CODE_0EAA66:
	LDA.b $00
	BNE.b CODE_0EAA7E
	LDA.b $16,x
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_0EAA05,y
	BNE.b CODE_0EAAA7
	LDA.w #$0002
	STA.w $7402,x
	BRA.b CODE_0EAAA7

CODE_0EAA7E:
	LDA.b $00
	BPL.b CODE_0EAA86
	EOR.w #$FFFF
	INC
CODE_0EAA86:
	TAY
	XBA
	CLC
	ADC.b $16,x
	STA.b $16,x
	XBA
	LSR
	LSR
	AND.w #$0003
	CPY.b #$02
	BCC.b CODE_0EAA9D
	AND.w #$0001
	ORA.w #$0004
CODE_0EAA9D:
	STA.w $7402,x
CODE_0EAAA0:
	LDA.b $16,x
	AND.w #$000F
	BEQ.b CODE_0EAAAA
CODE_0EAAA7:
	LDA.w #$0001
CODE_0EAAAA:
	SEP.b #$10
	CLC
	ADC.b $16,x
	STA.b $16,x
	AND.w #$000F
	ASL
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_0EAA05,y
	STA.w $7182,x
	RTL

;---------------------------------------------------------------------------

DATA_0EAAC1:
	dw $0040,$01C0

YI_NorSpr04C_UpsidedownBlowHard_Init:
YI_NorSpr0F8_BlowHard_Init:
;$0EAAC5
	LDY.w $7400,x
	LDA.w DATA_0EAAC1,y
	STA.b $78,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_0EAADA:
	dw CODE_0EAD45
	dw CODE_0EAD5A
	dw CODE_0EAD8F
	dw CODE_0EAE14
	dw CODE_0EAE31
	dw CODE_0EAEEF
	dw CODE_0EAF36
	dw CODE_0EAF70
	dw CODE_0EB032
	dw CODE_0EB05A
	dw CODE_0EB08C

YI_NorSpr04C_UpsidedownBlowHard_Main:
YI_NorSpr0F8_BlowHard_Main:
;$0EAAF0
	JSR.w CODE_0EAB30
	LDA.w $7D96,x
	BEQ.b CODE_0EAB03
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr04C_UpsidedownBlowHard
	BNE.b CODE_0EAB03
	STZ.w $6FA2,x
CODE_0EAB03:
	JSL.l CODE_03AF23
	JSR.w CODE_0EABC0
	JSR.w CODE_0EABAC
	LDY.b $76,x
	TYA
	ASL
	TXY
	TAX
	JSR.w (DATA_0EAADA,x)
	JSR.w CODE_0EAC07
	JSR.w CODE_0EACB4
	LDA.w #$3155
	LDY.b $76,x
	CPY.b #$07
	BMI.b CODE_0EAB28
	LDA.w #$3055
CODE_0EAB28:
	STA.w $7040,x
	RTL

DATA_0EAB2C:
	dw $FFFC,$0004

CODE_0EAB30:
	LDY.w $7402,x
	BNE.b CODE_0EAB36
	RTS

CODE_0EAB36:
	JSL.l CODE_03AA52
	LDA.w $7CD6,x
	SEC
	SBC.w $6094
	STA.b $00
	SEC
	SBC.w #$0010
	STA.b $02
	LDA.w $7042,x
	AND.w #$0080
	ASL
	ASL
	XBA
	TAY
	LDA.w $7CD8,x
	CLC
	ADC.w DATA_0EAB2C,y
	SEC
	SBC.w $609C
	STA.b $04
	SEC
	SBC.w #$0010
	STA.b $06
	LDY.w $7400,x
	BEQ.b CODE_0EAB75
	LDA.b $00
	PHA
	LDA.b $02
	STA.b $00
	PLA
	STA.b $02
CODE_0EAB75:
	LDY.w $7042,x
	BPL.b CODE_0EAB84
	LDA.b $04
	PHA
	LDA.b $06
	STA.b $04
	PLA
	STA.b $06
CODE_0EAB84:
	REP.b #$10
	LDY.w $7362,x
	LDA.b $02
	STA.w $6000,y
	STA.w $6010,y
	LDA.b $00
	STA.w $6008,y
	STA.w $6018,y
	LDA.b $04
	STA.w $6012,y
	STA.w $601A,y
	LDA.b $06
	STA.w $6002,y
	STA.w $600A,y
	SEP.b #$10
	RTS

CODE_0EABAC:
	LDY.w $7D36,x
	BPL.b CODE_0EABBB
	LDY.b $76,x
	CPY.b #$09
	BPL.b CODE_0EABBB
	CPY.b #$06
	BPL.b CODE_0EABBF
CODE_0EABBB:
	JSL.l CODE_03B22F
CODE_0EABBF:
	RTS

CODE_0EABC0:
	LDY.b $76,x
	CPY.b #$06
	BPL.b CODE_0EABDE
	LDA.w $61C6
	BNE.b CODE_0EABDF
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0EABDE
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0EABDE
	LDA.w $7D38,y
	BNE.b CODE_0EABDF
CODE_0EABDE:
	RTS

CODE_0EABDF:
	LDA.w #$0006
	STA.b $76,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$000A
	STA.b $16,x
	LDA.w $7042,x
	AND.w #$FFF1
	STA.w $7042,x
	RTS

DATA_0EABFF:
	dw FXDATA_550000+$2020,FXDATA_550000+$2040

DATA_0EAC03:
	dw $0008,$FFF8

CODE_0EAC07:
	LDY.b $76,x
	CPY.b #$06
	BMI.b CODE_0EAC33
	LDY.b #$00
	LDA.w $7A38,x
	BEQ.b CODE_0EAC5B
	CMP.w #$0100
	BPL.b CODE_0EAC1B
	INY
	INY
CODE_0EAC1B:
	CLC
	ADC.w DATA_0EAC03,y
	AND.w #$01FE
	STA.w $7A38,x
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_0EAC5B
	STZ.w $7A38,x
	BRA.b CODE_0EAC5B

CODE_0EAC33:
	LDA.b $78,x
	SEC
	SBC.w #$0080
	CMP.w #$0100
	BCC.b CODE_0EAC45
	STZ.w $7400,x
	LDA.b $78,x
	BRA.b CODE_0EAC55

CODE_0EAC45:
	LDA.w #$0002
	STA.w $7400,x
	LDA.b $78,x
	CLC
	ADC.w #$0100
	EOR.w #$FFFF
	INC
CODE_0EAC55:
	AND.w #$01FE
	STA.w $7A38,x
CODE_0EAC5B:
	LDY.w $7402,x
	BNE.b CODE_0EAC61
	RTS

CODE_0EAC61:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BPL.b CODE_0EAC73
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
CODE_0EAC73:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.b $77,x
	LDA.w DATA_0EABFF,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$2020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

DATA_0EACAC:
	dw $0008,$000A

DATA_0EACB0:
	dw $0000,$FFF0

CODE_0EACB4:
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDY.w $7042,x
	BPL.b CODE_0EACCB
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	INC
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
CODE_0EACCB:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BPL.b CODE_0EACD7
	LDA.w #$0200
	SEC
	SBC.w $7A36,x
CODE_0EACD7:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDY.b $77,x
	LDA.w DATA_0EACAC,y
	CLC
	ADC.b $18,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_0B86FA>>16
	LDA.w #FXCODE_0B86FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEC
	SBC.w $7CD6,x
	CLC
	ADC.w $7B56,x
	STA.w $7B56,x
	LDA.w $7042,x
	AND.w #$0080
	ASL
	ASL
	XBA
	TAY
	LDA.w $7182,x
	SEC
	SBC.w DATA_0EACB0,y
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $7CD8,x
	CLC
	ADC.w $7B58,x
	STA.w $7B58,x
	LDA.w #$0008
	STA.w $7BB6,x
	LDA.w #$000C
	STA.w $7BB8,x
	LDY.b $76,x
	CPY.b #$06
	BPL.b CODE_0EAD44
	LDA.b $18,x
	BEQ.b CODE_0EAD44
	DEC.b $18,x
CODE_0EAD44:
	RTS

CODE_0EAD45:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EAD59
	JSL.l CODE_03AD74
	BCC.b CODE_0EAD59
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.w $7402,x
	INC.b $76,x
CODE_0EAD59:
	RTS

CODE_0EAD5A:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EAD8B
	LDA.w $7A98,x
	BNE.b CODE_0EAD88
	LDA.w $7680,x
	SEC
	SBC.w #$0018
	CMP.w #$00D0
	BCS.b CODE_0EAD88
	LDY.b #$02
	STY.b $77,x
	LDA.w #$00D0
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0030
	STA.w $7A96,x
	STZ.b $16,x
	INC.b $76,x
CODE_0EAD88:
	JSR.w CODE_0EB0E4
CODE_0EAD8B:
	RTS

DATA_0EAD8C:
	db $00,$04,$02

CODE_0EAD8F:
	TYX
	LDA.w $7680,x
	CLC
	ADC.w #$0010
	CMP.w #$1020
	BCC.b CODE_0EADB8
	LDY.b #$00
	STY.b $77,x
	LDA.w $7042,x
	AND.w #$FFF1
	STA.w $7042,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC.b $76,x
	RTS

CODE_0EADB8:
	LDA.w $7A36,x
	CLC
	ADC.w #$0004
	CMP.w #$0100
	BMI.b CODE_0EAE0C
	LDA.w $7A96,x
	BNE.b CODE_0EADEB
	LDA.w $7042,x
	AND.w #$FFF1
	STA.w $7042,x
	LDA.w #$0100
	STA.w $7A36,x
	LDA.w #$00D0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.w $7A96,x
	JSL.l CODE_0EB14D
	INC.b $76,x
	RTS

CODE_0EADEB:
	LDY.b $16,x
	INY
	CPY.b #$03
	BNE.b CODE_0EADF4
	LDY.b #$00
CODE_0EADF4:
	STY.b $16,x
	LDA.w DATA_0EAD8C,y
	AND.w #$00FF
	STA.b $00
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.b $00
	STA.w $7042,x
	LDA.w #$0100
CODE_0EAE0C:
	STA.w $7A36,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BRA.b CODE_0EAE29

CODE_0EAE14:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EAE29
	TAY
	STY.b $77,x
	DEC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
	LDA.w #$0130
CODE_0EAE26:
	STA.w $7A36,x
CODE_0EAE29:
	JSR.w CODE_0EB0E4
	JSL.l CODE_0EB14D
	RTS

CODE_0EAE31:
	TYX
	LDA.w $7A36,x
	SEC
	SBC.w #$0010
	CMP.w #$00E0
	BPL.b CODE_0EAE26
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDY.w $7042,x
	BPL.b CODE_0EAE55
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	EOR.w #$FFFF
	INC
	AND.w #$01FE
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
CODE_0EAE55:
	PHA
	LDA.w #$0008
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr1E9
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $00
	STA.w $70A2,y
	LDA.w $7CD8,x
	SEC
	SBC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.b $02
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0006
	STA.w $7462,y
	PLA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$FC00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B8595>>16
	LDA.w #FXCODE_0B8595
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$00F9
	JSL.l CODE_03A34C
	BCC.b CODE_0EAED8
	LDA.b $00
	SEC
	SBC.w #$0008
	STA.w $70E2,y
	LDA.b $02
	SEC
	SBC.w #$0008
	STA.w $7182,y
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDY.b #$08
	STY.b $16,x
	JSL.l CODE_0EB148
	INC.b $76,x
CODE_0EAED8:
	LDA.w #$00E0
	STA.w $7A36,x
	RTS

DATA_0EAEDF:
	dw $000A,$FFF4,$0010,$FFF0

DATA_0EAEE7:
	dw $0100,$00C0,$00F0,$00A0

CODE_0EAEEF:
	TYX
	LDY.b $16,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0EAEDF-$02,y
	CMP.w DATA_0EAEE7-$02,y
	PHP
	CPY.b #$00
	BNE.b CODE_0EAF06
	PLP
	BMI.b CODE_0EAF22
	BRA.b CODE_0EAF09

CODE_0EAF06:
	PLP
	BPL.b CODE_0EAF22
CODE_0EAF09:
	DEC.b $16,x
	DEC.b $16,x
	BNE.b CODE_0EAF1F
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0140
	STA.w $7A98,x
	LDY.b #$01
	STY.b $76,x
CODE_0EAF1F:
	LDA.w DATA_0EAEE7-$02,y
CODE_0EAF22:
	STA.w $7A36,x
	RTS

DATA_0EAF26:
	dw $0018,$FFE8

DATA_0EAF2A:
	dw $0100,$00A0,$0140,$00A0,$0140,$00A0

CODE_0EAF36:
	TYX
	LDA.b $16,x
	AND.w #$0002
	PHP
	TAY
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0EAF26,y
	STA.w $7A36,x
	LDY.b $16,x
	PLP
	BNE.b CODE_0EAF54
	CMP.w DATA_0EAF2A,y
	BMI.b CODE_0EAF67
	BRA.b CODE_0EAF59

CODE_0EAF54:
	CMP.w DATA_0EAF2A,y
	BPL.b CODE_0EAF67
CODE_0EAF59:
	DEC.b $16,x
	DEC.b $16,x
	BPL.b CODE_0EAF67
	LDA.w #$0100
	STA.w $7A36,x
	INC.b $76,x
CODE_0EAF67:
	RTS

DATA_0EAF68:
	dw $FFFC,$0004

DATA_0EAF6C:
	dw $0058,$00A8

CODE_0EAF70:
	TYX
	LDY.w $7400,x
	LDA.b $78,x
	SEC
	SBC.w DATA_0EAF6C,y
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0EAF8A
	LDA.w DATA_0EAF6C,y
	STA.b $78,x
	BRA.b CODE_0EAFA0

CODE_0EAF8A:
	PHP
	LDY.b #$00
	CLC
	ADC.w #$00F0
	CMP.w #$0200
	BCS.b CODE_0EAF9B
	PLP
	BPL.b CODE_0EAFA0
	BRA.b CODE_0EAF9E

CODE_0EAF9B:
	PLP
	BMI.b CODE_0EAFA0
CODE_0EAF9E:
	INY
	INY
CODE_0EAFA0:
	LDA.b $78,x
	CLC
	ADC.w DATA_0EAF68,y
	AND.w #$01FE
	STA.b $78,x
	LDY.w $7400,x
	SEC
	SBC.w DATA_0EAF6C,y
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0EB01E
	LDA.w $7A36,x
	SEC
	SBC.w #$000C
	CMP.w #$00A0
	BPL.b CODE_0EB01B
	JSL.l CODE_03AEFD
	STZ.w $7402,x
	LDA.w #$0140
	STA.w $7A96,x
	INC.b $76,x
	LDA.w #$FFF8
	LDY.w $7042,x
	BPL.b CODE_0EAFE1
	LDA.w #$0008
CODE_0EAFE1:
	STA.b $00
	LDA.b $E2,x
	AND.w #$0080
	STA.b $02
	LDA.w #!Define_YI_AmbSpr209
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	CLC
	ADC.b $00
	STA.w $7142,y
	LDA.w #$0005
	STA.w $73C2,y
	DEC
	STA.w $7E8E,y
	LDA.w #$0140
	STA.w $7782,y
	LDA.w $7002,y
	ORA.b $02
	STA.w $7002,y
	LDA.w #$00A0
CODE_0EB01B:
	STA.w $7A36,x
CODE_0EB01E:
	LDA.w $7974
	AND.w #$0001
	CLC
	ADC.b $18,x
	CMP.w #$0008
	BMI.b CODE_0EB02F
	LDA.w #$0008
CODE_0EB02F:
	STA.b $18,x
	RTS

CODE_0EB032:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EB051
	JSL.l CODE_03AD74
	BCC.b CODE_0EB051
	INC.w $7402,x
	LDA.w #$0020
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.b $16,x
	INC.b $76,x
CODE_0EB051:
	RTS

DATA_0EB052:
	dw $FFF0,$000A,$0100,$0120

CODE_0EB05A:
	TYX
	LDY.b $16,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0EB052,y
	STA.w $7A36,x
	CPY.b #$00
	BNE.b CODE_0EB072
	CMP.w #$0100
	BPL.b CODE_0EB08B
	BRA.b CODE_0EB077

CODE_0EB072:
	CMP.w #$0120
	BMI.b CODE_0EB08B
CODE_0EB077:
	DEC.b $16,x
	DEC.b $16,x
	BPL.b CODE_0EB08B
	LDA.w #$0100
	STA.w $7A36,x
	INC.b $76,x
	LDA.w #$0040
	STA.w $7A96,x
CODE_0EB08B:
	RTS

CODE_0EB08C:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EB096
	LDY.b #$01
	STY.b $76,x
CODE_0EB096:
	RTS

DATA_0EB097:
	dw $FFFC,$0004

CODE_0EB09B:
	STA.b $08
	LDA.w $7A36,x
	STA.b $02
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.b $04
	STZ.b $00
	LDX.b #$02
CODE_0EB0AB:
	LDA.b $02,x
	SEC
	SBC.b $08
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_0EB0BF
	INC.b $00
	LDA.b $08
	BRA.b CODE_0EB0CD

CODE_0EB0BF:
	PHP
	LDY.b #$00
	PLP
	BPL.b CODE_0EB0C7
	INY
	INY
CODE_0EB0C7:
	LDA.b $02,x
	CLC
	ADC.w DATA_0EB097,y
CODE_0EB0CD:
	STA.b $02,x
	DEX
	DEX
	BPL.b CODE_0EB0AB
	LDX.b $12
	LDA.b $02
	STA.w $7A36,x
	LDA.b $04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

DATA_0EB0E0:
	dw $0004,$FFFC

CODE_0EB0E4:
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7C18,x
	CLC
	ADC.w #$000C
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w $7042,x
	BPL.b CODE_0EB10E
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	EOR.w #$FFFF
	INC
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
CODE_0EB10E:
	LDY.b #$00
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0100
	AND.w #$01FE
	SEC
	SBC.b $78,x
	PHP
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCS.b CODE_0EB137
	SEC
	SBC.w #$00FC
	CMP.w #$0008
	BCS.b CODE_0EB132
	PLP
	RTS

CODE_0EB132:
	PLP
	BMI.b CODE_0EB13A
	BRA.b CODE_0EB13C

CODE_0EB137:
	PLP
	BMI.b CODE_0EB13C
CODE_0EB13A:
	INY
	INY
CODE_0EB13C:
	LDA.b $78,x
	CLC
	ADC.w DATA_0EB0E0,y
	AND.w #$01FE
	STA.b $78,x
	RTS

CODE_0EB148:
	LDA.w #$0010
	BRA.b CODE_0EB150

CODE_0EB14D:
	LDA.w #$0000
CODE_0EB150:
	STA.b $02
	STZ.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0002
	CMP.w #$0020
	BCS.b CODE_0EB165
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_0EB178

CODE_0EB165:
	LDY.b #$04
	STY.b $00
	LDA.w $7974
	AND.w #$0007
	BNE.b CODE_0EB178
	LDA.w #!Define_YI_SoundID63_AimedAt
	JSL.l CODE_0085D2
CODE_0EB178:
	LDA.w #!Define_YI_AmbSpr1E2
	JSL.l CODE_008B21
	LDA.w $611C
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $611E
	SEC
	SBC.w #$0008
	STA.w $7142,y
	LDA.b $02
	STA.w $7782,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $7E4C,y
	LDA.w $7974
	AND.b $00
	LSR
	CLC
	ADC.w #$0004
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C2|!EXRAMBankMirror,x
	ORA.w $7002,y
	STA.w $7002,y
	RTL

;---------------------------------------------------------------------------

YI_NorSpr099_SpinyEgg_Init:
YI_NorSpr0A2_ThunderLakituFireball_Init:
YI_NorSpr0E5_GreenNeedlenose_Init:
YI_NorSpr0F9_YellowNeedlenose_Init:
YI_NorSpr11D_SpinyEgg_Init:
;$0EB1B2
	RTL

;---------------------------------------------------------------------------

YI_NorSpr099_SpinyEgg_Main:
YI_NorSpr0E5_GreenNeedlenose_Main:
YI_NorSpr0F9_YellowNeedlenose_Main:
YI_NorSpr11D_SpinyEgg_Main:
;$0EB1B3
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0EB1BE
	JSR.w CODE_0EB27C
YI_NorSpr0A2_ThunderLakituFireball_Main:
CODE_0EB1BE:
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A2_ThunderLakituFireball
	BNE.b CODE_0EB1CD
	JSR.w CODE_0EB27C
CODE_0EB1CD:
	JSR.w CODE_0EB1D4
	JSR.w CODE_0EB23F
	RTL

CODE_0EB1D4:
	LDA.w $7A38,x
	ORA.w $7A98,x
	BNE.b CODE_0EB23E
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A2_ThunderLakituFireball
	BNE.b CODE_0EB20A
	LDA.w #!Define_YI_AmbSpr20F
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0001
	STA.w $7782,y
	RTS

CODE_0EB20A:
	CMP.w #!Define_YI_NorSpr0F9_YellowNeedlenose
	BEQ.b CODE_0EB21A
	CMP.w #!Define_YI_NorSpr0E5_GreenNeedlenose
	BEQ.b CODE_0EB23E
	LDA.w #$0008
	STA.w $7A98,x
CODE_0EB21A:
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	INC
	STA.w $73C2,y
	STA.w $7E4C,y
	INC
	STA.w $7462,y
CODE_0EB23E:
	RTS

CODE_0EB23F:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0EB25C
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0EB26F
	LDA.w $7D38,y
	BEQ.b CODE_0EB26F
	TYX
	JSL.l CODE_03B25B
CODE_0EB257:
	PLA
	JML.l CODE_03B25B

CODE_0EB25C:
	INY
	BEQ.b CODE_0EB26F
	LDY.b $18,x
	BEQ.b CODE_0EB26B
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BEQ.b CODE_0EB26F
CODE_0EB26B:
	JSL.l CODE_03A858
CODE_0EB26F:
	RTS

DATA_0EB270:
	dw $0018,$0010,$0008,$0000

DATA_0EB278:
	dw $0200,$FE00

CODE_0EB27C:
	LDY.b $18,x
	BNE.b CODE_0EB26F
	LDA.w $7860,x
	AND.w #$000F
	BEQ.b CODE_0EB2DD
	LDY.b #$00
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0EB2A2
	INY
	INY
	BIT.w #$0002
	BNE.b CODE_0EB2A2
	INY
	INY
	BIT.w #$0004
	BNE.b CODE_0EB2A2
	INY
	INY
CODE_0EB2A2:
	LDA.w DATA_0EB270,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	TAX
	LDA.l $70000C,x
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_0EB2CE
	LDA.l $700008,x
	STA.w $0091
	LDA.l $70000A,x
	STA.w $0093
	SEP.b #$10
	LDX.b $12
	JSL.l CODE_0DA479
CODE_0EB2CE:
	SEP.b #$10
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0A2_ThunderLakituFireball
	BEQ.b CODE_0EB302
	JMP.w CODE_0EB257

CODE_0EB2DD:
	LDY.w $7223,x
	BPL.b CODE_0EB301
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0EB301
	LDA.w DATA_0EB270
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	TAX
	LDA.l $70000C,x
	AND.w #$0004
	BNE.b CODE_0EB2CE
	SEP.b #$10
	LDX.b $12
CODE_0EB301:
	RTS

CODE_0EB302:
	LDA.w #$004A
	JSL.l CODE_03A364
	BCC.b CODE_0EB358
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$000B
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	INC
	STA.w $7B58,y
	LDA.w #$0003
	STA.w $7A98,y
	INC
	STA.w $7BB8,y
	LDY.b #$02
CODE_0EB32D:
	PHY
	LDA.w DATA_0EB278,y
	STA.b $00
	LDA.w #$0049
	JSL.l CODE_03A34C
	BCC.b CODE_0EB357
	LDA.w $70E2,x
	STA.w $70E2,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	PLY
	DEY
	DEY
	BPL.b CODE_0EB32D
	BRA.b CODE_0EB358

CODE_0EB357:
	PLY
CODE_0EB358:
	LDA.w #$0020
	STA.w $61C6
	LDA.w #!Define_YI_SoundID3E_Tongue
	JSL.l CODE_0085D2
	PLA
	JML.l CODE_03A31E

;---------------------------------------------------------------------------

YI_NorSpr0FA_Flower_Init:
;$0EB36A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0EB374
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EB37F
CODE_0EB374:
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_03D40E
	BRA.b CODE_0EB383

CODE_0EB37F:
	JSL.l CODE_03D406
CODE_0EB383:
	LDA.w $7722,x
	BPL.b CODE_0EB397
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	JSR.w CODE_0EB3CF
	BRA.b CODE_0EB39B

CODE_0EB397:
	JSL.l CODE_03AA52
CODE_0EB39B:
	JSL.l CODE_02A007
	RTL

;---------------------------------------------------------------------------

DATA_0EB3A0:
	dw CODE_0EB41A
	dw CODE_0EB42A
	dw CODE_0EB457
	dw CODE_0EB525

DATA_0EB3A8:
	dw FXDATA_540000+$4010,FXDATA_540000+$4020

YI_NorSpr0FA_Flower_Main:
;$0EB3AC
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EB3A0,x)
	JSR.w CODE_0EB3C0
	RTL

CODE_0EB3C0:
	LDA.w $7722,x
	LSR
	LSR
	LSR
	SEC
	SBC.w $0030
	AND.w #$0003
	BNE.b CODE_0EB419
CODE_0EB3CF:
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $7A38,x
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.b $78,x
	PHP
	LDA.w DATA_0EB3A8,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$4010)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	PLP
	BEQ.b CODE_0EB40B
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0EB414

CODE_0EB40B:
	LDX.b #FXCODE_08835F>>16
	LDA.w #FXCODE_08835F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0EB414:
	LDX.b $12
	INC.w $0CF9
CODE_0EB419:
	RTS

CODE_0EB41A:
	TYX
	LDY.b #$04
	STY.b $16,x
	INC.b $76,x
	RTS

DATA_0EB422:
	dw $0100,$0150

DATA_0EB426:
	dw $0100,$00B0

CODE_0EB42A:
	TYX
	LDY.b $16,x
	LDA.w $7A36,x
	CLC
	ADC.w #$0010
	CMP.w DATA_0EB422-$02,y
	BMI.b CODE_0EB44F
	LDA.w #$0002
	STA.b $78,x
	DEC.b $16,x
	DEC.b $16,x
	BNE.b CODE_0EB44C
	LDA.w #$000C
	STA.w $7A98,x
	INC.b $76,x
CODE_0EB44C:
	LDA.w DATA_0EB426-$02,y
CODE_0EB44F:
	STA.w $7A36,x
	RTS

DATA_0EB453:
	dw $0002,$FFFE

CODE_0EB457:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EB46A
	LDA.w #$0018
	STA.w $7A98,x
	LDA.b $16,x
	EOR.w #$0002
	STA.b $16,x
CODE_0EB46A:
	LDY.b $16,x
	LDA.w $7A38,x
	CLC
	ADC.w DATA_0EB453,y
	AND.w #$01FE
	STA.w $7A38,x
CODE_0EB479:
	LDY.w $7D36,x
	BNE.b CODE_0EB47F
CODE_0EB47E:
	RTS

CODE_0EB47F:
	BMI.b CODE_0EB494
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_0EB47E
	LDA.w $7D37,y
	BEQ.b CODE_0EB47E
	DEY
	TYX
	JSL.l CODE_03B25B
CODE_0EB494:
	JSL.l CODE_0EB4AE
	RTS

CODE_0EB499:
	PHB
	PHK
	PLB
	PHD
	LDA.w #$7960
	TCD
	LDY.b $76,x
	CPY.b #$02
	BNE.b CODE_0EB4AB
	JSL.l CODE_0EB4AE
CODE_0EB4AB:
	PLD
	PLB
	RTL

CODE_0EB4AE:
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w #$00FF
	STA.w $74A2,x
	INC.b $76,x
	INC.w !RAM_YI_Level_FlowersCollectedLo
	LDY.w !RAM_YI_Level_FlowersCollectedLo
	CPY.b #$05
	BCC.b CODE_0EB4E8
	LDY.b #$05
	STY.w !RAM_YI_Level_FlowersCollectedLo
	LDA.w $7CD6,x
	SEC
	SBC.w #$0008
	STA.w $0000
	LDA.w $7CD8,x
	SEC
	SBC.w #$0008
	STA.w $0002
	JSL.l CODE_03A4A2
	LDA.w #!Define_YI_SoundID08_1up
	BRA.b CODE_0EB4EB

CODE_0EB4E8:
	LDA.w #!Define_YI_SoundID36_CollectFlower
CODE_0EB4EB:
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0EB518
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EB521
CODE_0EB518:
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JML.l CODE_03D3F3

CODE_0EB521:
	JML.l CODE_03D3EB

CODE_0EB525:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_0EB54D
	LDA.w !RAM_YI_Level_TutorialMessageFlagsLo
	AND.w #!Define_YI_TutorialMessage_FirstFlower
	ORA.w !RAM_YI_Level_CurrentLevelFromMapLo			; Note: !Define_YI_LevelID_MakeEggsThrowEggs
	BNE.b CODE_0EB549
	LDA.w !RAM_YI_Level_TutorialMessageFlagsLo
	ORA.w #!Define_YI_TutorialMessage_FirstFlower
	STA.w !RAM_YI_Level_TutorialMessageFlagsLo
	LDA.w #$002D
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
CODE_0EB549:
	JSL.l CODE_03A32E
CODE_0EB54D:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr110_Flower_Init:
;$0EB54E
	JSL.l CODE_03D406
	JSL.l CODE_02A007
	RTL

;---------------------------------------------------------------------------

DATA_0EB557:
	dw CODE_0EB56C
	dw CODE_0EB586
	dw CODE_0EB5A5
	dw CODE_0EB525

YI_NorSpr110_Flower_Main:
;$0EB55F
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EB557,x)
	RTL

CODE_0EB56C:
	TYX
	LDA.w $7680,x
	AND.w #$FF00
	STA.b $00
	LDA.w $7682,x
	AND.w #$FF00
	ORA.b $00
	BNE.b CODE_0EB585
	LDY.b #$09
	STY.b $16,x
	INC.b $76,x
CODE_0EB585:
	RTS

CODE_0EB586:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EB5A4
	LDA.w #$0002
	STA.w $7A98,x
	INC.w $7402,x
	LDY.w $7402,x
	CPY.b #$04
	BMI.b CODE_0EB5A4
	LDA.w #$0008
	STA.w $7A98,x
	INC.b $76,x
CODE_0EB5A4:
	RTS

CODE_0EB5A5:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EB5D8
	LDA.w #$0004
	STA.w $7A98,x
	LDA.b $16,x
	CMP.w $7402,x
	BMI.b CODE_0EB5BD
	INC.w $7402,x
	BRA.b CODE_0EB5C0

CODE_0EB5BD:
	DEC.w $7402,x
CODE_0EB5C0:
	LDA.b $16,x
	CMP.w $7402,x
	BNE.b CODE_0EB5D8
	TAY
	LDA.w #$0008
	STA.w $7A98,x
	LSR
	CPY.b #$04
	BNE.b CODE_0EB5D6
	LDA.w #$0009
CODE_0EB5D6:
	STA.b $16,x
CODE_0EB5D8:
	JSR.w CODE_0EB479
	RTS

;---------------------------------------------------------------------------

YI_NorSpr09D_RedSwitch_Init:
;$0EB5DC
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.w $7A36,x
	STA.w $7A38,x
	JSR.w CODE_0EB6A1
	LDA.w #$000C
	STA.w $7BB6,x
	LDA.w #$0012
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

DATA_0EB5F9:
	dw CODE_0E8000
	dw CODE_0EB6FF
	dw CODE_0EB76D
	dw CODE_0EB807

YI_NorSpr09D_RedSwitch_Main:
;$0EB601
	LDY.b $76,x
	CPY.b #$03
	BEQ.b CODE_0EB60E
	JSL.l CODE_03AA52
	JSR.w CODE_0EB61A
CODE_0EB60E:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EB5F9,x)
	JSR.w CODE_0EB698
	RTL

CODE_0EB61A:
	LDY.w $74A2,x
	BMI.b CODE_0EB697
	LDY.w $60AB
	BMI.b CODE_0EB697
	LDA.w $7BB6,x
	CLC
	ADC.w $6120
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $00
	BCS.b CODE_0EB697
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w $7BB8,x
	SEC
	SBC.w $611E
	SEC
	SBC.w $6122
	LDY.b $76,x
	CPY.b #$01
	BEQ.b CODE_0EB65C
	CPY.b #$02
	BEQ.b CODE_0EB65C
	CMP.w #$FFF8
	BCC.b CODE_0EB697
	STX.w $1011
CODE_0EB65C:
	INC
	SEC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	INC.w $61B4
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EB697
	LDY.b $76,x
	BNE.b CODE_0EB697
	LDA.w $60A8
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $60A8
	STZ.w $60B4
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.b $76,x
	LDA.w #!Define_YI_SoundID33_StepOnNumberPlatform
	JSL.l CODE_0085D2
CODE_0EB697:
	RTS

CODE_0EB698:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	BEQ.b CODE_0EB6FE
	CPY.b #$03
	BPL.b CODE_0EB6FE
CODE_0EB6A1:
	LDA.w #$0C00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$1200
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #(FXDATA_540000+$00C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_540000+$00C1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08D984>>16
	LDA.w #FXCODE_08D984
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w $6020
	STA.w $7BB6,x
	LDA.w $6022
	STA.w $7BB8,x
	INC.w $0CF9
CODE_0EB6FE:
	RTS

CODE_0EB6FF:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EB6FE
	LDA.w $7A38,x
	SEC
	SBC.w #$0040
	AND.w #$FFF8
	LSR
	LSR
	INC
	INC
	STA.b $02
	LSR
	CLC
	ADC.w #$0004
	STA.b $04
	LDA.w #$0002
	STA.b $00
	LDA.w $7A36,x
	CLC
	ADC.b $04
	CMP.w #$0180
	BMI.b CODE_0EB734
	DEC.b $00
	LDA.w #$0180
CODE_0EB734:
	STA.w $7A36,x
	LDA.w $7A38,x
	SEC
	SBC.b $02
	CMP.w #$0040
	BPL.b CODE_0EB747
	DEC.b $00
	LDA.w #$0040
CODE_0EB747:
	STA.w $7A38,x
	LDY.b $00
	BNE.b CODE_0EB76C
	LDA.w $7042,x
	AND.w #$0020
	ORA.w #$0004
	STA.w $7042,x
	STZ.w $039E
	LDA.w #$0008
	TSB.w $7E08
	LDA.w #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_0085D2
	INC.b $76,x
CODE_0EB76C:
	RTS

CODE_0EB76D:
	TYX
	LDA.w $7A38,x
	SEC
	SBC.w #$0040
	AND.w #$FFF4
	INC
	INC
	STA.b $02
	LSR
	CLC
	ADC.w #$0004
	STA.b $04
	LDY.b #$02
	STY.b $00
	LDA.w $7A36,x
	SEC
	SBC.b $04
	CMP.w #$0100
	BPL.b CODE_0EB797
	DEC.b $00
	LDA.w #$0100
CODE_0EB797:
	STA.w $7A36,x
	LDA.w $7A38,x
	CLC
	ADC.b $02
	CMP.w #$0100
	BMI.b CODE_0EB7AA
	DEC.b $00
	LDA.w #$0100
CODE_0EB7AA:
	STA.w $7A38,x
	LDY.b $00
	BNE.b CODE_0EB806
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E7
	JSL.l CODE_03B56E
	LDA.w #$0280
	STA.w !RAM_YI_Level_RedSwitchTimer
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w #!Define_YI_PlayerState00_Normal
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0100
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BPL.b CODE_0EB7EB
	LDA.w #$FF00
CODE_0EB7EB:
	STA.w $60A8
	STA.w $60B4
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w $61B4
	LDA.w #$2001
	STA.w $7040,x
	JSL.l CODE_03AEFD
	INC.b $76,x
CODE_0EB806:
	RTS

CODE_0EB807:
	TYX
	CPX.w $1011
	BNE.b CODE_0EB818
	LDA.w !RAM_YI_Level_RedSwitchTimer
	BNE.b CODE_0EB81D
	LDA.w #$0008
	TRB.w $7E08
CODE_0EB818:
	PLA
	JML.l CODE_03A31E

CODE_0EB81D:
	LDA.w $7A98,x
	BNE.b CODE_0EB838
	LDA.w #$0040
	STA.w $7A98,x
	LDY.b #!Define_YI_SoundID7E_SwitchTicking
	LDA.w !RAM_YI_Level_RedSwitchTimer
	CMP.w #$00C0
	BPL.b CODE_0EB833
	INY
CODE_0EB833:
	TYA
	JSL.l CODE_0085D2
CODE_0EB838:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr156_CactusJack_Init:
;$0EB839
	JSL.l CODE_03AE60
	LDA.w #$0100
	STA.b $78,x
	DEC.b $18,x
	LDA.w #$0006
	STA.w $7BB6,x
	STA.w $7BB8,x
	STZ.w $7400,x
	LDA.w $7974
	STA.w $75E0,x
	JSL.l CODE_0EB8AE
	BNE.b CODE_0EB88C
	LDA.w $7042,x
	EOR.w #$0030
	STA.w $7042,x
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,x
	BIT.w #$0010
	BEQ.b CODE_0EB888
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0EB888:
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTL

CODE_0EB88C:
	JSR.w CODE_0EB8DC
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDA.w $70E2,x
	BIT.w #$0010
	BEQ.b CODE_0EB8A9
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0EB8A9:
	LDY.b #$02
	STY.b $76,x
	RTL

;---------------------------------------------------------------------------

CODE_0EB8AE:
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
CODE_0EB8B7:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$79F1
	BEQ.b CODE_0EB8DB
	CMP.w #$79F2
	BEQ.b CODE_0EB8DB
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$F800
	CMP.w #$A000
CODE_0EB8DB:
	RTL

;---------------------------------------------------------------------------

CODE_0EB8DC:
	LDA.w $70E2,x
	STA.b $00
	LDA.w #$0010
	STA.b $04
	CLC
	ADC.w $7182,x
	STA.b $02
	STA.b $06
CODE_0EB8EE:
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $02
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0003
	BNE.b CODE_0EB91B
	DEC.b $04
	BMI.b CODE_0EB917
	LDA.b $02
	CLC
	ADC.w #$0010
	STA.b $02
	BRA.b CODE_0EB8EE

CODE_0EB917:
	LDA.b $06
	STA.b $02
CODE_0EB91B:
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_0EB91E:
	dw CODE_0EBD1E
	dw CODE_0EBD67
	dw CODE_0EBD87
	dw CODE_0EBDA9
	dw CODE_0EBE5E
	dw CODE_0EBE6A
	dw CODE_0E8000
	dw CODE_0E8000

YI_NorSpr156_CactusJack_Main:
;$0EB92E
	STZ.w $7400,x
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_0EB958
	CMP.w #$0008
	BNE.b CODE_0EB955
	LDY.w $74A2,x
	BPL.b CODE_0EB958
	LDA.b $18,x
	INC
	BEQ.b CODE_0EB955
	INC
	BEQ.b CODE_0EB955
	LDA.w #$FFFF
	STA.w $7722,x
CODE_0EB955:
	JSR.w CODE_0EBBD2
CODE_0EB958:
	LDY.b $76,x
	CPY.b #$04
	BEQ.b CODE_0EB962
	CPY.b #$05
	BNE.b CODE_0EB975
CODE_0EB962:
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0EB997
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_0EB979
CODE_0EB975:
	JSL.l CODE_03AF23
CODE_0EB979:
	JSR.w CODE_0EB998
	LDY.w $74A2,x
	BMI.b CODE_0EB987
	JSR.w CODE_0EB99F
	JSR.w CODE_0EB9DB
CODE_0EB987:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EB91E,x)
	LDY.w $74A2,x
	BMI.b CODE_0EB997
	JSR.w CODE_0EBC3B
CODE_0EB997:
	RTL

CODE_0EB998:
	JSL.l CODE_03A2C7
	BCS.b CODE_0EB9CB
CODE_0EB99E:
	RTS

CODE_0EB99F:
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_0EB99E
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0EB99E
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_03B56E
	JSL.l CODE_05AE0B
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
CODE_0EB9CB:
	JSR.w CODE_0EBB67
	PLA
	RTL

DATA_0EB9D0:
	dw $0200,$FE00

DATA_0EB9D4:
	db !Define_YI_SoundID0C_ShellHit2,!Define_YI_SoundID0D_ShellHit3,!Define_YI_SoundID0E_ShellHit4,!Define_YI_SoundID0F_ShellHit5
	db !Define_YI_SoundID10_ShellHit6,!Define_YI_SoundID11_ShellHit7,!Define_YI_SoundID12_ShellHit8

CODE_0EB9DB:
	LDA.w $6FA0,x
	AND.w #$0600
	BEQ.b CODE_0EB99E
	LDY.w $7D36,x
	BPL.b CODE_0EB9F1
	LDA.w $7AF8,x
	BNE.b CODE_0EB9F1
	JSL.l CODE_03A858
CODE_0EB9F1:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_0EBA12
	JMP.w CODE_0EBAB7

CODE_0EBA09:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0EBA12:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	DEY
	BMI.b CODE_0EB99E
	LDA.w $6F01,y
	CMP.w #$0010
	BNE.b CODE_0EBA09
	LDA.w $7D39,y
	BEQ.b CODE_0EBA09
	LDA.w $6FA3,y
	AND.w #$4000
	BNE.b CODE_0EBA09
	LDA.w $7361,y
	CMP.w #$0156
	BNE.b CODE_0EBA54
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D7|!EXRAMBankMirror,y
	CMP.w #$0004
	BNE.b CODE_0EBA54
	LDA.w $6FA1,y
	AND.w #$0200
	BEQ.b CODE_0EBA09
	LDA.w $75E0,x
	CMP.w $75E1,y
	BEQ.b CODE_0EBA09
	LDX.b $12
	JMP.w CODE_0EBB38

CODE_0EBA54:
	LDA.w $7543,y
	CMP.w #$0040
	PHP
	STZ.b $16,x
	LDA.w $7221,y
	BPL.b CODE_0EBA67
	LDA.w #$0002
	STA.b $16,x
CODE_0EBA67:
	INY
	TYX
	JSL.l CODE_03B24B
	STZ.w $6FA2,x
	PLP
	BMI.b CODE_0EBA76
	JMP.w CODE_0EBB38

CODE_0EBA76:
	LDA.w #$0003
	STA.w $6FA2,x
	LDY.b $16,x
	LDA.w DATA_0EB9D0,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $18,x
	INC
	BEQ.b CODE_0EBA8D
	JSL.l CODE_03AD74
CODE_0EBA8D:
	LDY.b #$04
	STY.b $76,x
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0060
	STA.w $7542,x
	LDA.w #$0001
	STA.w $7D38,x
	JSR.w CODE_0EBBD2
CODE_0EBAAD:
	RTS

CODE_0EBAAE:
	LDX.b #FXCODE_09907B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0EBAB7:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	DEY
	BMI.b CODE_0EBAAD
	INY
	LDA.w $6FA2,y
	AND.w #$4000
	BNE.b CODE_0EBAAE
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0EBAAE
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr156_CactusJack
	BNE.b CODE_0EBAF9
	LDA.w $6FA0,y
	AND.w #$0200
	BEQ.b CODE_0EBAF8
	LDA.w $75E0,x
	CMP.w $75E0,y
	BEQ.b CODE_0EBAAE
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0004
	PHP
	TYX
	JSR.w CODE_0EBB38
	LDX.b $12
	PLP
	BEQ.b CODE_0EBB38
CODE_0EBAF8:
	RTS

CODE_0EBAF9:
	LDA.w $6FA2,y
	AND.w #$6000
	BNE.b CODE_0EBAAE
	LDA.w $6FA0,y
	AND.w #$0020
	BNE.b CODE_0EBAAE
	INC.w $7A36,x
	LDA.w $7A36,x
	CMP.w #$0008
	BCC.b CODE_0EBB1D
	LDA.w $7040,y
	ORA.w #$0600
	STA.w $7040,y
CODE_0EBB1D:
	JSR.w CODE_0EC413
	LDX.b $12
	LDA.w $7A36,x
	CMP.w #$0008
	BCS.b CODE_0EBAAE
	TAY
	LDA.w DATA_0EB9D4-$01,y
	AND.w #$00FF
	JSL.l CODE_0085D2
	JMP.w CODE_0EBAAE

CODE_0EBB38:
	LDA.w #$6862
	STA.w $6FA0,x
	STZ.w $6FA2,x
	LDA.b $18,x
	INC
	BEQ.b CODE_0EBB4A
	JSL.l CODE_03AD74
CODE_0EBB4A:
	LDY.b #$04
	STY.b $76,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0060
	STA.w $7542,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	JSR.w CODE_0EBBD2
	RTS

CODE_0EBB67:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0EBB74
	BIT.w #$0001
	BNE.b CODE_0EBB85
	JSR.w CODE_0EBBD2
CODE_0EBB74:
	LDA.b $18,x
	INC
	BEQ.b CODE_0EBB7F
	LDA.w #$FFFF
	STA.w $7722,x
CODE_0EBB7F:
	PLA
	PLA
	JML.l CODE_03A31E

CODE_0EBB85:
	SEC
	SBC.w $6094
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCS.b CODE_0EBB74
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w $609C
	CLC
	ADC.w #$0040
	CMP.w #$0180
	BCS.b CODE_0EBB74
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0020
	STA.w $7182,x
	STZ.w $7542,x
	LDA.w $7042,x
	EOR.w #$0030
	STA.w $7042,x
	STZ.b $76,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.b $78,x
	STZ.w $7A38,x
	STZ.w $6FA2,x
	RTS

CODE_0EBBD2:
	LDY.b $18,x
	BMI.b CODE_0EBC14
	STY.b $00
	LDY.b $19,x
	BMI.b CODE_0EBBF7
	SEP.b #$20
	LDX.b $00
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	STY.b $19,x
	REP.b #$20
	LDA.w #$0060
	STA.w $7542,x
	LDA.w #$0006
	STA.b $76,x
	LDX.b $12
	BRA.b CODE_0EBC21

CODE_0EBBF7:
	SEP.b #$20
	TYA
	LDY.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701979|!EXRAMBankMirror,y
	REP.b #$20
	LDA.w #$0060
	STA.w $7542,y
	LDA.b $78,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	BRA.b CODE_0EBC27

CODE_0EBC14:
	LDY.b $19,x
	BMI.b CODE_0EBC35
	SEP.b #$20
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	REP.b #$20
CODE_0EBC21:
	LDA.w #$0080
	STA.w $7A96,y
CODE_0EBC27:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	LDA.w #$FFFE
	BRA.b CODE_0EBC38

CODE_0EBC35:
	LDA.w #$FFFF
CODE_0EBC38:
	STA.b $18,x
CODE_0EBC3A:
	RTS

CODE_0EBC3B:
	LDA.w #(FXDATA_550000+$6060)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$6060
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.b $76,x
	CPY.b #$04
	BNE.b CODE_0EBC50
	JMP.w CODE_0EBCED

CODE_0EBC50:
	LDY.b $19,x
	BPL.b CODE_0EBC3A
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	PHA
	CMP.w #$0100
	BPL.b CODE_0EBC69
	ASL
	EOR.w #$FFFF
	CLC
	ADC.w #$0301
	BRA.b CODE_0EBC70

CODE_0EBC69:
	EOR.w #$FFFF
	CLC
	ADC.w #$01C1
CODE_0EBC70:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	PLA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0014
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $18,x
	BMI.b CODE_0EBCEC
	LDA.w $7182,x
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $00
CODE_0EBCBD:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0006
	BNE.b CODE_0EBCDB
	LDA.b $00
	CMP.w $7182,y
	BPL.b CODE_0EBCEC
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $7542,y
	LDA.w #$0007
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
CODE_0EBCDB:
	LDA.b $00
	STA.w $7182,y
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	TAY
	BPL.b CODE_0EBCBD
CODE_0EBCEC:
	RTS

CODE_0EBCED:
	LDA.w $7A38,x
	AND.w #$01FE
	LSR
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_0EBD1E:
	TYX
	LDY.w $7542,x
	BEQ.b CODE_0EBD46
	LDY.w $7223,x
	BMI.b CODE_0EBD5E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w $7182,x
	BPL.b CODE_0EBD5E
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w $7042,x
	EOR.w #$0030
	STA.w $7042,x
	INC.b $76,x
	RTS

CODE_0EBD46:
	LDA.w $7C16,x
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_0EBD5E
	LDA.w #$0060
	STA.w $7542,x
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EBD5E:
	RTS

DATA_0EBD5F:
	dw $FFFC,$0008

DATA_0EBD63:
	dw $00E0,$0140

CODE_0EBD67:
	TYX
	LDY.b $16,x
	LDA.b $78,x
	CLC
	ADC.w DATA_0EBD5F,y
	CMP.w #$00E0
	BMI.b CODE_0EBD7A
	CMP.w #$0140
	BMI.b CODE_0EBD84
CODE_0EBD7A:
	LDA.b $16,x
	EOR.w #$0002
	STA.b $16,x
	LDA.w DATA_0EBD63,y
CODE_0EBD84:
	STA.b $78,x
	RTS

CODE_0EBD87:
	TYX
	LDY.w $7681,x
	BNE.b CODE_0EBDA8
	LDA.w $609C
	SEC
	SBC.w #$0020
	STA.w $7182,x
	LDA.w #$0060
	STA.w $7542,x
	LDA.w #$0005
	STA.w $74A2,x
	STZ.w $6FA2,x
	INC.b $76,x
CODE_0EBDA8:
	RTS

CODE_0EBDA9:
	TYX
	LDA.w $7542,x
	BEQ.b CODE_0EBDCC
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w $7182,x
	BPL.b CODE_0EBDCB
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w $7A96,x
	BNE.b CODE_0EBDCB
	LDA.w #$0040
	STA.w $7A96,x
CODE_0EBDCB:
	RTS

CODE_0EBDCC:
	JSR.w CODE_0EBD67
	JSR.w CODE_0EB8DC
	LDA.b $02
	SEC
	SBC.w #$0010
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EBDE7
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0060
	STA.w $7542,x
	RTS

CODE_0EBDE7:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0EBDCB
	LDY.b $18,x
	BMI.b CODE_0EBDF6
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	TAY
	BPL.b CODE_0EBDCB
CODE_0EBDF6:
	LDA.w $7A96,x
	BNE.b CODE_0EBE5D
	LDA.w #$0156
	JSL.l CODE_03A364
	BCC.b CODE_0EBE5D
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $70E2,y
	LDA.w $609C
	SEC
	SBC.w #$0020
	STA.w $7182,y
	LDA.w #$0060
	STA.w $7542,y
	LDA.w $7722,x
	STA.w $7722,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w $75E0,x
	STA.w $75E0,y
	SEP.b #$20
	LDA.w $74A0,x
	STA.w $74A0,y
	LDA.b #$FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	BMI.b CODE_0EBE4B
	TAX
CODE_0EBE4B:
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701979|!EXRAMBankMirror,y
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDX.b $12
	REP.b #$20
	LDA.w #$0040
	STA.w $7A96,x
CODE_0EBE5D:
	RTS

CODE_0EBE5E:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0EBE67
	INC.b $76,x
	RTS

CODE_0EBE67:
	JMP.w CODE_0EC858

CODE_0EBE6A:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EBE8C
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $7D38,x
	LDY.b #$03
	STY.b $76,x
CODE_0EBE8C:
	RTS

CODE_0EBE8D:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr156_CactusJack
	RTL

;---------------------------------------------------------------------------

YI_NorSpr09E_ChompRock_Init:
;$0EBE94
	JSL.l CODE_03AE60
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	BNE.b CODE_0EBEA6
	LDY.w !RAM_YI_Level_LevelHeaderItemMemorySettingLo
	CPY.b #$01
	BEQ.b CODE_0EBEB3
	BRA.b CODE_0EBEC8

CODE_0EBEA6:
	CPY.b #$28
	BNE.b CODE_0EBEC8
	LDY.w $0E29
	BEQ.b CODE_0EBEB3
	JML.l CODE_03A31E

CODE_0EBEB3:
	INC.w $0E29
	LDA.w #$2001
	STA.w $7040,x
	LDA.w $7042,x
	AND.w #$FFF0
	ORA.w #$0008
	STA.w $7042,x
CODE_0EBEC8:
	JSR.w CODE_0EC869
	LDA.w #$000C
	STA.w $7BB6,x
	STA.w $7BB8,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr09E_ChompRock_Main:
;$0EBED5
	JSL.l CODE_03A2C7
	BCC.b CODE_0EBEE8
	JSR.w CODE_0EBF49
	JSR.w CODE_0EC54A
	JSR.w CODE_0EC71A
	JSR.w CODE_0EC858
	RTL

CODE_0EBEE8:
	JSL.l CODE_03AA52
	JSL.l CODE_03AF23
	STZ.w $7400,x
	JSR.w CODE_0EBF49
	JSL.l CODE_0EC365
	JSR.w CODE_0EBFBB
	JSR.w CODE_0EC54A
	JSR.w CODE_0EC71A
	JSR.w CODE_0EC858
	JSR.w CODE_0EC869
	JSR.w CODE_0EC8A3
	STZ.w $7542,x
	LDA.w $7A98,x
	BNE.b CODE_0EBF1A
	LDA.w #$0040
	STA.w $7542,x
CODE_0EBF1A:
	JSR.w CODE_0EC8C4
	LDA.w #$400E
	STA.w $6FA2,x
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	TAY
	BEQ.b CODE_0EBF3C
	BPL.b CODE_0EBF31
	ORA.w #$FF00
CODE_0EBF31:
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EBF3C
	LDA.w #$4010
	STA.w $6FA2,x
CODE_0EBF3C:
	RTL

DATA_0EBF3D:
	dw $FFFA,$0016

DATA_0EBF41:
	dw $0008,$0004

DATA_0EBF45:
	dw $0000,$0008

CODE_0EBF49:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,X
	BMI.b CODE_0EBF52
	INY
	INY
CODE_0EBF52:
	LDA.w DATA_0EBF45,y
	STA.b $02
	LDA.w DATA_0EBF41,y
	STA.b $00
	AND.w $7860,x
	BNE.b CODE_0EBFB6
	LDA.w DATA_0EBF3D,y
	CLC
	ADC.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_0EBFB6
	LDA.w $7860,x
	ORA.b $00
	STA.w $7860,x
	REP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.b $02
	TAX
	LDA.w $6000
	STA.l $700008,x
	LDA.w $6002
	STA.l $70000A,x
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	STA.l $70000C,x
	LDA.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.l $70000E,x
	SEP.b #$10
	LDX.b $12
CODE_0EBFB6:
	RTS

DATA_0EBFB7:
	dw $FF00,$0100

CODE_0EBFBB:
	LDA.w $61D6
	BNE.b CODE_0EBFF6
	LDY.w $0D94
	BNE.b CODE_0EBFF6
	LDA.w $7BB6,x
	CLC
	ADC.w $6120
	ASL
	STA.b $02
	LSR
	CLC
	ADC.w $7C16,x
	CMP.b $02
	BCS.b CODE_0EBFF6
	LDA.w #$0000
	LDY.b $19,x
	BEQ.b CODE_0EBFE2
	LDA.w #$0008
CODE_0EBFE2:
	CLC
	ADC.w $7BB8,x
	CLC
	ADC.w $6122
	ASL
	STA.b $02
	LSR
	CLC
	ADC.w $7C18,x
	CMP.b $02
	BCC.b CODE_0EC01A
CODE_0EBFF6:
	STZ.b $18,x
	CPX.w $61B6
	BNE.b CODE_0EC000
	STZ.w $61B6
CODE_0EC000:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_0EC011
	CPX.w $0E2B
	BNE.b CODE_0EC019
	STZ.w $0E2B
	RTS

CODE_0EC011:
	CPX.w $0E27
	BNE.b CODE_0EC019
	STZ.w $0E27
CODE_0EC019:
	RTS

CODE_0EC01A:
	LDA.w $7C16,x
	BPL.b CODE_0EC029
	CLC
	ADC.w $6120
	CLC
	ADC.w $7BB6,x
	BRA.b CODE_0EC031

CODE_0EC029:
	SEC
	SBC.w $6120
	SEC
	SBC.w $7BB6,x
CODE_0EC031:
	STA.b $06
	LDA.w $7C18,x
	BPL.b CODE_0EC042
	CLC
	ADC.w $6122
	CLC
	ADC.w $7BB8,x
	BRA.b CODE_0EC04A

CODE_0EC042:
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
CODE_0EC04A:
	STA.b $08
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $603E
	LDY.b $18,x
	BEQ.b CODE_0EC05B
	JSR.w CODE_0EC230
	BRA.b CODE_0EC067

CODE_0EC05B:
	LDY.b $19,x
	BEQ.b CODE_0EC064
	JSR.w CODE_0EC2AA
	BRA.b CODE_0EC067

CODE_0EC064:
	JSR.w CODE_0EC06C
CODE_0EC067:
	RTS

DATA_0EC068:
	dw $FC00,$0400

CODE_0EC06C:
	LDA.b $08
	BMI.b CODE_0EC080
	CMP.w #$0008
	BCS.b CODE_0EC080
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0EC085
	JMP.w CODE_0EC112

CODE_0EC080:
	CMP.w #$FFF6
	BCS.b CODE_0EC088
CODE_0EC085:
	JMP.w CODE_0EC154

CODE_0EC088:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_0EC09A
	CPX.w $0E2B
	BNE.b CODE_0EC0A2
	STZ.w $0E2B
	BRA.b CODE_0EC0A2

CODE_0EC09A:
	CPX.w $0E27
	BNE.b CODE_0EC0A2
	STZ.w $0E27
CODE_0EC0A2:
	LDY.w $60AB
	BMI.b CODE_0EC0B4
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_0EC0B4
	LDY.w $61B6
	BEQ.b CODE_0EC0B5
CODE_0EC0B4:
	RTS

CODE_0EC0B5:
	JSR.w CODE_0EC1E2
	STX.w $61B6
	STZ.w $60AA
	INC.w $61B4
	INC.b $18,x
	LDA.w !EXRAM_YI_Player_SubXPosHi|!EXRAMBankMirror
	AND.w #$FF00
	STA.b $76,x
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$FFE0
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$00
	LDA.w $60A8
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	CLC
	ADC.w #$0400
	CMP.w #$0800
	BCC.b CODE_0EC10B
	BMI.b CODE_0EC105
	INY
	INY
CODE_0EC105:
	LDA.w DATA_0EC068,y
	STA.w $60A8
CODE_0EC10B:
	LDA.w $60A8
	STA.w $60B4
	RTS

CODE_0EC112:
	LDA.w $60FC
	AND.w #$0007
	BNE.b CODE_0EC130
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0002
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0006
	STA.w $60C0
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w $60AA
CODE_0EC130:
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_0EC149
	LDA.w $60A8
	BEQ.b CODE_0EC153
	LDA.w $60FC
	AND.w #$0180
	DEC
	EOR.w $60A8
	BMI.b CODE_0EC153
CODE_0EC149:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	STA.w $60A8
	STA.w $60B4
CODE_0EC153:
	RTS

CODE_0EC154:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_0EC1AF
	CPX.w $0E2B
	BEQ.b CODE_0EC1DD
	LDY.w $0E2B
	BNE.b CODE_0EC1B9
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0EC173
	EOR.w $60A8
	BPL.b CODE_0EC1D5
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EC173:
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCC.b CODE_0EC1D5
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.b $02
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	LDA.w $60FC
	AND.w #$0007
	BEQ.b CODE_0EC1AE
	LDA.w #$FC00
	STA.w $60AA
CODE_0EC1AE:
	RTS

CODE_0EC1AF:
	LDY.w $0E27
	BEQ.b CODE_0EC1DA
	CPX.w $0E27
	BEQ.b CODE_0EC1DD
CODE_0EC1B9:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w $70E2,x
	SEC
	SBC.b $06
	STA.w $70E2,x
	JSL.l CODE_03A858
	RTS

CODE_0EC1D5:
	STX.w $0E2B
	BRA.b CODE_0EC1DD

CODE_0EC1DA:
	STX.w $0E27
CODE_0EC1DD:
	JSL.l CODE_05CDF9
	RTS

CODE_0EC1E2:
	LDA.b $08
	INC
	INC
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $611C
	SEC
	SBC.w #$0004
	STA.w $6020
	CLC
	ADC.w #$0008
	STA.w $6024
	LDA.w $611E
	SEC
	SBC.w $6122
	STA.b $00
	STA.w $6022
	STA.w $6026
	LDA.w #$0001
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_0AEA19>>16
	LDA.w #FXCODE_0AEA19
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	BEQ.b CODE_0EC222
	INC.w $6022
CODE_0EC222:
	LDA.w $6022
	SEC
	SBC.b $00
	CLC
	ADC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	RTS

CODE_0EC230:
	LDY.w $60AB
	BMI.b CODE_0EC2A3
	LDA.b $08
	CMP.w #$FFF6
	BCC.b CODE_0EC2A3
	JSR.w CODE_0EC1E2
	LDA.w $7AF6,x
	BNE.b CODE_0EC26B
	LDA.w #$0004
	STA.w $7AF6,x
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$FFE0
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EC26B:
	STZ.w $60AA
	INC.w $61B4
	LDA.w $60A8
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	PHA
	LDA.w #$0180
	JSL.l CODE_04AB6F
	PLA
	PHA
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	EOR.w #$FFFF
	INC
	STA.b $06
	PLA
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.b $06
	JSL.l CODE_05CEAB
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	STA.w $60A8
	RTS

CODE_0EC2A3:
	JMP.w CODE_0EBFF6

DATA_0EC2A6:
	dw $0400,$FC00

CODE_0EC2AA:
	LDA.w $7A36,x
	LDY.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CPY.b #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_0EC2B7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_0EC2B7:
	STA.b $02
	LDA.w $0035
	BIT.b $02
	BEQ.b CODE_0EC2D0
	AND.w $6084
	BEQ.b CODE_0EC2E3
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $60A8
	STA.w $60B4
	BRA.b CODE_0EC2E0

CODE_0EC2D0:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w $72C0,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$0160
	STA.w $093A
CODE_0EC2E0:
	JMP.w CODE_0EBFF6

CODE_0EC2E3:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0EC2F9
	LDA.w $60FC
	AND.w #$01E0
	BEQ.b CODE_0EC2F9
	AND.w #$0180
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0EC2D0
CODE_0EC2F9:
	JSL.l CODE_05CE9F
	LDA.w $60DE
	ORA.w $6150
	BNE.b CODE_0EC35C
	LDA.w $60A8
	BPL.b CODE_0EC30E
	EOR.w #$FFFF
	INC
CODE_0EC30E:
	AND.w #$FF00
	XBA
	SEC
	ADC.w $7540,x
	LDY.w $77C2,x
	BEQ.b CODE_0EC31F
	EOR.w #$FFFF
	INC
CODE_0EC31F:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $0E
	CLC
	ADC.w #$0400
	LDY.b #$00
	CMP.w #$0800
	BCC.b CODE_0EC339
	BPL.b CODE_0EC334
	INY
	INY
CODE_0EC334:
	LDA.w DATA_0EC2A6,y
	STA.b $0E
CODE_0EC339:
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $61C2
	LDA.w $60A8
	BPL.b CODE_0EC34A
	EOR.w #$FFFF
	INC
CODE_0EC34A:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$0040
	BMI.b CODE_0EC359
	INC.w $60DC
	AND.w #$003F
CODE_0EC359:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0EC35C:
	RTS

DATA_0EC35D:
	dw $0200,$FE00

DATA_0EC361:
	dw $FFFF,$0001

CODE_0EC365:
	PHB
	PHK
	PLB
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0EC380

CODE_0EC377:
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0EC380:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	DEY
	BPL.b CODE_0EC38A
	PLB
	RTL

CODE_0EC38A:
	INY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr09E_ChompRock
	BNE.b CODE_0EC398
	JSR.w CODE_0EC43B
	BRA.b CODE_0EC377

CODE_0EC398:
	CMP.w #!Define_YI_NorSpr0F5_Slugger
	BEQ.b CODE_0EC377
	LDA.w $6FA2,y
	AND.w #$0800
	BEQ.b CODE_0EC377
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0EC406
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	STA.b $0A
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BEQ.b CODE_0EC3EF
	EOR.b $0A
	BPL.b CODE_0EC377
	LDA.w $70E2,y
	SEC
	SBC.w $72C0,y
	STA.w $70E2,y
	LDA.w $7400,y
	EOR.w #$0002
	STA.w $7400,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	EOR.w $75E0,y
	BPL.b CODE_0EC3EF
	LDA.w $75E0,y
	EOR.w #$FFFF
	INC
	STA.w $75E0,y
CODE_0EC3EF:
	LDX.b #$00
	LDA.b $0A
	BMI.b CODE_0EC3F7
	INX
	INX
CODE_0EC3F7:
	LDA.w $70E2,y
	CLC
	ADC.w DATA_0EC361,x
	STA.w $70E2,y
	LDX.b $12
CODE_0EC403:
	JMP.w CODE_0EC377

CODE_0EC406:
	LDA.w $6FA2,y
	AND.w #$6000
	BNE.b CODE_0EC403
	JSR.w CODE_0EC413
	BRA.b CODE_0EC403

CODE_0EC413:
	LDA.w $7040,y
	ORA.w #$0004
	STA.w $7040,y
	PHY
	TYX
	JSL.l CODE_03B25B
	PLX
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000C
	BNE.b CODE_0EC43A
	LDY.b #$00
	LDA.w $6000
	BPL.b CODE_0EC434
	INY
	INY
CODE_0EC434:
	LDA.w DATA_0EC35D,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EC43A:
	RTS

CODE_0EC43B:
	LDA.w $7BB8,x
	ASL
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	BPL.b CODE_0EC453
	CLC
	ADC.b $00
	CMP.w #$0008
	BCS.b CODE_0EC4BA
	RTS

CODE_0EC453:
	SEC
	SBC.b $00
	DEC
	CMP.w #$FFF7
	BCC.b CODE_0EC4BA
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EC475
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	BRA.b CODE_0EC480

CODE_0EC475:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLA
CODE_0EC480:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
	LDA.w $7182,y
	SEC
	SBC.w $72C2,y
	STA.w $7182,y
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	PHP
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	BPL.b CODE_0EC4A8
	EOR.w #$FFFF
	INC
CODE_0EC4A8:
	LSR
	LSR
	LSR
	PLP
	BPL.b CODE_0EC4B2
	EOR.w #$FFFF
	INC
CODE_0EC4B2:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_0EC4BA:
	LDA.w $72C0,x
	ORA.w $72C0,y
	BNE.b CODE_0EC513
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	STA.b $00
	CPX.w $0E27
	BNE.b CODE_0EC4EF
	LDA.b $00
	PHP
	LDA.w $7BB6,x
	ASL
	INC
	PLP
	BPL.b CODE_0EC4DF
	EOR.w #$FFFF
	INC
CODE_0EC4DF:
	CLC
	ADC.w $70E2,x
	STA.w $70E2,y
	CLC
	ADC.w $7B56,y
	STA.w $7CD6,y
	BRA.b CODE_0EC53B

CODE_0EC4EF:
	CPY.w $0E27
	BNE.b CODE_0EC513
	LDA.b $00
	PHP
	LDA.w $7BB6,x
	ASL
	INC
	PLP
	BMI.b CODE_0EC503
	EOR.w #$FFFF
	INC
CODE_0EC503:
	CLC
	ADC.w $70E2,y
	STA.w $70E2,x
	CLC
	ADC.w $7B56,x
	STA.w $7CD6,x
	BRA.b CODE_0EC53B

CODE_0EC513:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7CD6,x
	SEC
	SBC.w $72C0,x
	STA.w $7CD6,x
	LDA.w $70E2,y
	SEC
	SBC.w $72C0,y
	STA.w $70E2,y
	LDA.w $7CD6,y
	SEC
	SBC.w $72C0,y
	STA.w $7CD6,y
CODE_0EC53B:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PHA
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	RTS

CODE_0EC54A:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_0EC561
	LDA.b $16,x
	CLC
	ADC.w #$0110
	CMP.w #$0220
	BCC.b CODE_0EC5A9
CODE_0EC561:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.b $02
	STZ.b $04
	LDA.w $70E2,x
	STA.b $06
	LDA.w $7182,x
	STA.b $08
	STZ.b $0E
	JSR.w CODE_0EC5BA
	LDY.b #$08
	STY.b $04
	JSR.w CODE_0EC5BA
	LDY.b #$10
	STY.b $04
	JSR.w CODE_0EC5BA
	LDY.b #$18
	STY.b $04
	JSR.w CODE_0EC5BA
	LDX.b $12
	LDY.b $0E
	BEQ.b CODE_0EC59C
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EC59C:
	LDY.b $0F
	BEQ.b CODE_0EC5A9
	LDA.b $16,x
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EC5A9:
	RTS

CODE_0EC5AA:
	dw $FFF9,$0008,$0017,$0008,$0008,$FFF9,$0008,$0017

CODE_0EC5BA:
	REP.b #$10
	LDA.b $02
	CLC
	ADC.b $04
	TAX
	LDA.l $700008,x
	STA.w $0091
	LDA.l $70000A,x
	STA.w $0093
	LDA.l $70000C,x
	AND.w #$F800
	CMP.w #$4000
	BNE.b CODE_0EC5E4
	SEP.b #$10
	JSL.l CODE_0DA479
	BRA.b CODE_0EC603				; Glitch: X/Y is 8-bit, but the location this jumps to expects it to be 16-bit! A BRK is executed but by sheer luck, it doesn't break the game.

CODE_0EC5E4:
	LDA.l $70000F,x
	AND.w #$00FF
	CMP.w #$007B
	BNE.b CODE_0EC5F8
	SEP.b #$10
	JSL.l CODE_0EC61E
	BRA.b CODE_0EC603

CODE_0EC5F8:
	CMP.w #$007C
	BNE.b CODE_0EC61A
	SEP.b #$10
	JSL.l CODE_0EC68D
CODE_0EC603:
	LDY.b $04
	CPY.w #$0018
	BPL.b CODE_0EC60E
	INC.b $0E
	BRA.b CODE_0EC610

CODE_0EC60E:
	INC.b $0F
CODE_0EC610:
	SEP.b #$10
	LDA.w #$0010
	STA.w $7A98,x
	SEC
	RTS

CODE_0EC61A:
	SEP.b #$10
	CLC
	RTS

CODE_0EC61E:
	LDA.w $0093
	PHA
	LDA.w $0091
	PHA
	LDA.w #$0000
	STA.w $0095
	LDA.w #$0001
	STA.w $008F
	JSL.l CODE_109295
	LDA.w $0091
	CLC
	ADC.w #$0010
	STA.w $0091
	JSL.l CODE_109295
	LDA.w $0093
	CLC
	ADC.w #$0010
	STA.w $0093
	JSL.l CODE_109295
	PLA
	STA.w $0091
	JSL.l CODE_109295
	PLA
	STA.w $0093
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr20C
	JSL.l CODE_008B21
	LDA.w $0091
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.w $0093
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$000D
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID48_LargeBlockLands
	JSL.l CODE_0085D2
	RTL

CODE_0EC68D:
	LDA.w #$0006
	STA.w $008F
	JSL.l CODE_109295
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr20B
	JSL.l CODE_008B21
	LDA.w $0091
	AND.w #$FFF0
	STA.w $70A2,y
	LDA.w $0093
	AND.w #$FFF0
	STA.w $7142,y
	LDA.w #$000C
	STA.w $73C2,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #!Define_YI_SoundID0A_BreakDirt
	JSL.l CODE_0085D2
	RTL

DATA_0EC6C6:
	dw $0004,$0006,$0008,$0008,$0006,$0004

DATA_0EC6D2:
	dw $0001,$0002,$0003,$0003,$0002,$0001,$0020,$0040
	dw $0060,$0060,$0040,$0020

DATA_0EC6EA:
	dw $0380,$0224,$01C0,$FE40,$FDDC,$FC80

DATA_0EC6F6:
	dw $0180,$00D2,$00A0,$FF60,$FF2E,$FE80,$FFB0,$FF97
	dw $FF40,$FF60,$FF2E,$FE80,$0180,$00D2,$00A0,$0050
	dw $0069,$00C0

CODE_0EC71A:
	STZ.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	BEQ.b CODE_0EC79D
	LDY.b #$00
	CMP.w #$0080
	BMI.b CODE_0EC737
	ORA.w #$FF00
	LDY.b #$02
	CLC
	ADC.w #$0020
	BRA.b CODE_0EC73D

CODE_0EC737:
	LDY.b #$08
	SEC
	SBC.w #$0020
CODE_0EC73D:
	BEQ.b CODE_0EC747
	BMI.b CODE_0EC745
	DEY
	DEY
	BRA.b CODE_0EC747

CODE_0EC745:
	INY
	INY
CODE_0EC747:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_0EC78F
	PHY
	LDA.b $19,x
	AND.w #$00FF
	BEQ.b CODE_0EC768
	TYA
	CLC
	ADC.w #$000C
	TAY
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EC768
	TYA
	CLC
	ADC.w #$000C
	TAY
CODE_0EC768:
	LDA.w DATA_0EC6F6,y
	STA.w $75E0,x
	PLY
	LDA.w $75E0,x
	BPL.b CODE_0EC778
	EOR.w #$FFFF
	INC
CODE_0EC778:
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.b $00
	BCC.b CODE_0EC78A
	TYA
	CLC
	ADC.w #$000C
	TAY
CODE_0EC78A:
	LDA.w DATA_0EC6D2,y
	BRA.b CODE_0EC798

CODE_0EC78F:
	LDA.w DATA_0EC6EA,y
	STA.w $75E0,x
	LDA.w DATA_0EC6C6,y
CODE_0EC798:
	STA.w $7540,x
	BRA.b CODE_0EC7D3

CODE_0EC79D:
	LDA.w $7860,x
	AND.w #$000F
	BEQ.b CODE_0EC810
	BIT.w #$0001
	BEQ.b CODE_0EC7D3
	LDA.b $18,x
	BNE.b CODE_0EC7D3
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_0EC7BF
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0EC7D3

CODE_0EC7BF:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0EC7C8
	EOR.w #$FFFF
	INC
CODE_0EC7C8:
	XBA
	AND.w #$00FF
	INC
	STA.w $7540,x
	STZ.w $75E0,x
CODE_0EC7D3:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0EC810
	SEC
	SBC.w #$0008
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0EC810
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	BEQ.b CODE_0EC7F4
	LDA.w $6FA2,x
	AND.w #$001F
	CMP.w #$000E
	BEQ.b CODE_0EC810
CODE_0EC7F4:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EC810:
	RTS

CODE_0EC811:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0EC857
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0180
	CMP.w #$0300
	BCC.b CODE_0EC857
	LDA.w #!Define_YI_AmbSpr1CC
	JSL.l CODE_008B21
	LDA.w #$0008
	STA.w $7E4C,y
	LDA.w #$0001
	STA.w $7782,y
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID37_FlutterJump
	JSL.l CODE_0085D2
CODE_0EC857:
	RTS

CODE_0EC858:
	LDA.w $72C0,x
	ASL
	ASL
	ASL
	EOR.w #$FFFF
	SEC
	ADC.w $7A38,x
	STA.w $7A38,x
	RTS

CODE_0EC869:
	LDA.w #(FXDATA_550000+$6020)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_550000+$6020
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7A38,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_0EC8A3:
	LDA.w $72C0,x
	BPL.b CODE_0EC8AC
	EOR.w #$FFFF
	INC
CODE_0EC8AC:
	CLC
	ADC.b $78,x
	CMP.w #$0010
	BMI.b CODE_0EC8C1
	SEC
	SBC.w #$0010
	PHA
	LDA.w #!Define_YI_SoundID59_RollingRock
	JSL.l CODE_0085D2
	PLA
CODE_0EC8C1:
	STA.b $78,x
	RTS

CODE_0EC8C4:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.b $16,x
	LDA.w #$04A2
	LDY.b $18,x
	BEQ.b CODE_0EC8D3
	LDA.w #$04E2
CODE_0EC8D3:
	STA.w $6FA0,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0DC_Snowball_Init:
;$0EC8D7
	JSL.l CODE_03AEEB
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	CPY.b #!Define_YI_LevelID_RideTheSkiLifts
	BNE.b CODE_0EC8E8
	LDA.w #$8001
	STA.w $7040,x
CODE_0EC8E8:
	JSR.w CODE_0EC924
	LDA.w #$0598
	STA.w $7A36,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0DC_Snowball_Main:
;$0EC8F2
	JSL.l CODE_03AB1C
	JSL.l CODE_03AF23
	STZ.w $7400,x
	JSL.l CODE_0EC365
	JSR.w CODE_0EBFBB
	JSR.w CODE_0EC71A
	JSR.w CODE_0EC914
	JSR.w CODE_0EC924
	JSR.w CODE_0EC8A3
	JSR.w CODE_0EC8C4
	RTL

CODE_0EC914:
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_0B9567>>16
	LDA.w #FXCODE_0B9567
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_0EC924:
	LDA.w #(FXDATA_548000+$6080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$6080
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDY.w $7A39,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	LSR
	LSR
	LSR
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08877E>>16
	LDA.w #FXCODE_08877E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
	RTS

CODE_0EC961:
	TYX
	RTS

;---------------------------------------------------------------------------

DATA_0EC963:
	dw $FFFC,$0004

YI_NorSpr0A3_LeftHidingBandit_Init:
YI_NorSpr0A4_RightHidingBandit_Init:
;$0EC967
	LDA.w #$001E
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0A3_LeftHidingBandit
	ASL
	STA.w $7400,x
	TAY
	LDA.w DATA_0EC963,y
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	LDY.b #$16
	STY.b $76,x
YI_NorSpr020_Bandit_Init:
	LDA.w #$0001
	STA.b $16,x
CODE_0EC98B:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

DATA_0EC993:
	dw CODE_0ECD8A
	dw CODE_0ECE01
	dw CODE_0ECEB1
	dw CODE_0ECF19
	dw CODE_0ECFEE
	dw CODE_0ED032
	dw CODE_0ED08F
	dw CODE_0ED0E9
	dw CODE_0ED183
	dw CODE_0ED1D0
	dw CODE_0ED1D0
	dw CODE_0ED264
	dw CODE_0ED0E9

YI_NorSpr020_Bandit_Main:
YI_NorSpr0A3_LeftHidingBandit_Main:
YI_NorSpr0A4_RightHidingBandit_Main:
;$0EC9AD
	LDA.w #$FC20
	LDY.b $76,x
	CPY.b #$16
	BPL.b CODE_0EC9C3
	LDY.w $61B3
	BMI.b CODE_0EC9C3
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EC9C3
	LDA.w #$7C20
CODE_0EC9C3:
	STA.w $6FA0,x
	LDA.w #$0040
	STA.w $7542,x
	JSR.w CODE_0EC9DA
	TXY
	LDA.b $76,x
	AND.w #$00FF
	TAX
	JSR.w (DATA_0EC993,x)
	RTL

CODE_0EC9DA:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BEQ.b CODE_0EC9ED
	CMP.w #$0008
	BEQ.b CODE_0EC9EA
	JMP.w CODE_0ECA77

CODE_0EC9EA:
	JMP.w CODE_0ECBAB

CODE_0EC9ED:
	LDA.w $7D38,x
	BNE.b CODE_0ECA3A
	LDY.b $76,x
	CPY.b #$16
	BEQ.b CODE_0ECA06
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0ECA06
	JSR.w CODE_0ECAA8
CODE_0ECA06:
	LDA.w $70E2,x
	LDY.w $7400,x
	BNE.b CODE_0ECA15
	CMP.w #$0014
	BMI.b CODE_0ECA1E
	BRA.b CODE_0ECA2C

CODE_0ECA15:
	SEC
	SBC.w #$00F0
	CMP.w $7E1A
	BMI.b CODE_0ECA2C
CODE_0ECA1E:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ECA2C
	LDY.b $76,x
	CPY.b #$18
	BEQ.b CODE_0ECA2C
	JSR.w CODE_0ECAF8
CODE_0ECA2C:
	JSL.l CODE_03A2C7
	BCS.b CODE_0ECA35
	JMP.w CODE_0ECA8D

CODE_0ECA35:
	JSR.w CODE_0ECC9F
	PLA
	RTL

CODE_0ECA3A:
	JSR.w CODE_0ECCC7
	JSL.l CODE_03A2C7
	BCC.b CODE_0ECA47
	JSL.l CODE_03A31E
CODE_0ECA47:
	PLA
	JSL.l CODE_03AF23
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr020_Bandit
	BEQ.b CODE_0ECA66
	LDA.w #$FC20
	STA.w $6FA0,x
	LDA.w #$0801
	STA.w $6FA2,x
	LDA.w #$0002
	STA.w $74A2,x
CODE_0ECA66:
	LDY.b #$12
	STY.b $76,x
	LDA.w #$000A
	STA.w $7A36,x
	LDA.w #$0012
	STA.w $7402,x
	RTL

CODE_0ECA77:
	JSR.w CODE_0ECCC7
	PLA
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000C
	BEQ.b CODE_0ECA88
	CMP.w #$0008
	BNE.b CODE_0ECA8C
CODE_0ECA88:
	JSL.l CODE_03AF23
CODE_0ECA8C:
	RTL

CODE_0ECA8D:
	PLA
	STA.b $00
	JSL.l CODE_03AF23
	LDA.b $00
	PHA
	RTS

DATA_0ECA98:
	dw $0000,$0100,$FF00

DATA_0ECA9E:
	dw $FD80,$FE00,$FE00

DATA_0ECAA4:
	dw $FF00,$0100

CODE_0ECAA8:
	LDY.w $7D36,x
	BEQ.b CODE_0ECAD2
	BMI.b CODE_0ECAD3
	LDY.w $7D36,x
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_0ECAC2
	LDA.w $7D37,y
	BEQ.b CODE_0ECAC2
	JMP.w CODE_0ECBFE

CODE_0ECAC2:
	PLA
	STA.b $00
	PLA
	STA.b $02
	JSL.l CODE_03A5B7
	LDA.b $02
	PHA
	LDA.b $00
	PHA
CODE_0ECAD2:
	RTS

CODE_0ECAD3:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_0ECB47
	LDY.w $60AB
	BMI.b CODE_0ECAD2
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0ECAD2
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEY
	BMI.b CODE_0ECB1B
	LDA.w $7AF8
	BEQ.b CODE_0ECB17
CODE_0ECAF8:
	LDY.b #$18
	STY.b $76,x
	LDA.w #$0007
	STA.w $7A36,x
	LDA.w #$0017
	STA.w $7402,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.b $16,x
	LDA.w #$0020
	STA.w $7AF8
	RTS

CODE_0ECB17:
	JSL.l CODE_06BF12
CODE_0ECB1B:
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_0ECAD2
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDY.w $77C2,x
	LDA.w DATA_0ECAA4,y
	STA.w $60A8
	STA.w $60B4
	LDY.w $60D4
	BNE.b CODE_0ECB47
	LDY.b $79,x
	INY
	CPY.b #$03
	BMI.b CODE_0ECB4D
CODE_0ECB47:
	JSR.w CODE_0ECB73
	JMP.w CODE_0ECC0C

CODE_0ECB4D:
	STY.b $79,x
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0ECB5C:
	LDA.w #$0007
	STA.w $7A36,x
	LDA.w #$0015
	STA.w $7402,x
	LDA.w #$0001
	STA.w $7A98,x
	LDY.b #$14
	STY.b $76,x
	RTS

CODE_0ECB73:
	LDY.b #$04
CODE_0ECB75:
	LDA.w DATA_0ECA98,y
	STA.b $00
	LDA.w DATA_0ECA9E,y
	STA.b $02
	PHY
	LDA.w #$0115
	JSL.l CODE_03A34C
	BCC.b CODE_0ECBA5
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	PLY
	DEY
	DEY
	BPL.b CODE_0ECB75
	RTS

CODE_0ECBA5:
	PLY
	RTS

DATA_0ECBA7:
	dw $0100,$FF00

CODE_0ECBAB:
	JSR.w CODE_0ECCC7
CODE_0ECBAE:
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	STZ.w $6168
	LDA.w #!Define_YI_SoundID3C_InedibleObject
	JSL.l CODE_0085D2
	LDY.b #$02
	LDA.w $6150
	CMP.w #$0003
	BMI.b CODE_0ECBCA
	INY
	INY
CODE_0ECBCA:
	STY.w $6150
	CPY.b #$02
	BEQ.b CODE_0ECBDB
	LDY.w $77C3,x
	BEQ.b CODE_0ECBDB
	LDA.w #$FD00
	BRA.b CODE_0ECBE7

CODE_0ECBDB:
	LDY.w $77C2,x
CODE_0ECBDE:
	LDA.w DATA_0ECBA7,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FF00
CODE_0ECBE7:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7540,x
	STZ.w $75E0,x
	JSR.w CODE_0ECB5C
	RTS

DATA_0ECBF7:
	db !Define_YI_SoundID0C_ShellHit2,!Define_YI_SoundID0D_ShellHit3,!Define_YI_SoundID0E_ShellHit4,!Define_YI_SoundID0F_ShellHit5
	db !Define_YI_SoundID10_ShellHit6,!Define_YI_SoundID11_ShellHit7,!Define_YI_SoundID12_ShellHit8

CODE_0ECBFE:
	LDY.w $7D36,x
	DEY
	TYX
	JSL.l CODE_03B25B
	JSR.w CODE_0ECC34
	BCC.b CODE_0ECC12
CODE_0ECC0C:
	PLA
	PLA
	JML.l CODE_03B24B

CODE_0ECC12:
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	INC.b $78,x
	JSR.w CODE_0ECCC7
	LDY.w $7D36,x
	LDA.w $7CD5,y
	LDY.b #$00
	SEC
	SBC.w $7CD6,x
	BMI.b CODE_0ECBDE
	INY
	INY
	BRA.b CODE_0ECBDE

DATA_0ECC30:
	dw $0100,$FF00

CODE_0ECC34:
	LDY.b $78,x
	INY
	CPY.b #$04
	BMI.b CODE_0ECC53
	PHY
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	JSL.l CODE_03A4A2
	PLY
	CPY.b #$06
	BMI.b CODE_0ECC9D
	SEC
	RTS

CODE_0ECC53:
	LDY.w $7400,x
	LDA.w DATA_0ECC30,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.b $02
	LDA.w #$0115
	JSL.l CODE_03A364
	BCC.b CODE_0ECC9D
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0100
	STA.w $7A96,y
	LDA.w #$0140
	STA.w $7A98,y
	LDA.w #$0020
	STA.w $7AF6,y
	LDY.b $78,x
	LDA.w DATA_0ECBF7,y
	AND.w #$00FF
	JSL.l CODE_0085D2
CODE_0ECC9D:
	CLC
	RTS

CODE_0ECC9F:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0ECCB1
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
CODE_0ECCB1:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ECCF3
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0010
	BEQ.b CODE_0ECCDC
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	BEQ.b CODE_0ECCC7
	CPX.b $18
	BEQ.b CODE_0ECCDC
CODE_0ECCC7:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEY
	BMI.b CODE_0ECCDB
	LDY.b $76
	CPY.b #$08
	BEQ.b CODE_0ECCD7
	CPY.b #$09
	BNE.b CODE_0ECCDB
CODE_0ECCD7:
	JSL.l CODE_06C114
CODE_0ECCDB:
	RTS

CODE_0ECCDC:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000E
	STA.w $7182,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	RTS

CODE_0ECCF3:
	PLA
	PLA
	JML.l CODE_03A31E

CODE_0ECCF9:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ECD12
	JSL.l CODE_03A2C7
	BCC.b CODE_0ECD30
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	BRA.b CODE_0ECD30

CODE_0ECD12:
	JSL.l CODE_03A2C7
	BCS.b CODE_0ECD4F
	RTS

CODE_0ECD19:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0ECD2B
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
CODE_0ECD2B:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ECD4F
CODE_0ECD30:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0010
	BEQ.b CODE_0ECD3B
	JMP.w CODE_0ECCC7

CODE_0ECD3B:
	LDA.w $70E2,x
	STA.w $70E2
	LDA.w $7182,x
	SEC
	SBC.w #$000E
	STA.w $7182
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	RTS

CODE_0ECD4F:
	PLA
	JML.l CODE_03A31E

CODE_0ECD54:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ECD67
	JSL.l CODE_03A2C7
	BCC.b CODE_0ECD30
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	BRA.b CODE_0ECD30

CODE_0ECD67:
	JSL.l CODE_03A2C7
	BCS.b CODE_0ECD4F
	RTS

DATA_0ECD6E:
	dw $FFA7,$0059

DATA_0ECD72:
	dw $FE40,$01C0,$FDE0,$0220,$FD80,$0280

DATA_0ECD7E:
	dw $FE80,$0180,$FE40,$01C0,$FE00,$0200

CODE_0ECD8A:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0ECDAA
	LDA.b $16,x
	BEQ.b CODE_0ECDB8
	DEC.b $16,x
	BEQ.b CODE_0ECDB8
	LDA.w #$0010
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0003
	AND.w #$000B
	STA.w $7402,x
CODE_0ECDAA:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ECDB5
	JMP.w CODE_0ED436

CODE_0ECDB5:
	JMP.w CODE_0ECE65

CODE_0ECDB8:
	LDA.b $10
	BIT.w #$0003
	BNE.b CODE_0ECDC7
	LDA.w $77C2,x
	AND.w #$00FF
	BRA.b CODE_0ECDCB

CODE_0ECDC7:
	XBA
	AND.w #$0002
CODE_0ECDCB:
	STA.w $7400,x
	TAY
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0020
	CPY.b #$02
	BEQ.b CODE_0ECDE0
	EOR.w #$FFFF
	INC
CODE_0ECDE0:
	CLC
	ADC.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0ECD6E,y
	STA.w $75E0,x
	LDA.w #$0002
	STA.w $7402,x
	STZ.w $7A36,x
	LDY.b #$02
	STY.b $76,x
	RTS

DATA_0ECDFB:
	db $07,$06,$05,$04,$03,$02

CODE_0ECE01:
	TYX
	JSR.w CODE_0ED55C
	LDA.w $7A98,x
	BNE.b CODE_0ECE29
	DEC.w $7A36,x
	BPL.b CODE_0ECE17
	LDY.b #$02
	LDA.w #$0005
	STA.w $7A36,x
CODE_0ECE17:
	LDA.w #$0003
	STA.w $7A98,x
	LDY.w $7A36,x
	LDA.w DATA_0ECDFB,y
	AND.w #$00FF
	STA.w $7402,x
CODE_0ECE29:
	LDA.w #$000B
	STA.w $7540,x
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_0ECE5A
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0003
	STA.b $16,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0009
	STA.w $7402,x
	LDY.b #$00
	STY.b $76,x
CODE_0ECE5A:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ECE65
	JMP.w CODE_0ED436

CODE_0ECE65:
	LDY.w $77C2,x
	TYA
	CMP.w $7400,x
	BNE.b CODE_0ECEA2
	LDA.w $7C16,x
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_0ECEA2
	LDA.w $7C18,x
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_0ECEA2
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0007
	STA.w $7A36,x
	LDA.w #$0017
	STA.w $7402,x
	LDY.b #$04
	STY.b $76,x
CODE_0ECEA2:
	RTS

DATA_0ECEA3:
	db $01,$01,$01,$01,$04,$02,$02

DATA_0ECEAA:
	db $09,$0C,$1D,$1C,$1B,$1A,$19

CODE_0ECEB1:
	TYX
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0ECEC9
	PHA
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLA
CODE_0ECEC9:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0ECF18
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0ECEDD
	LDA.w #$0018
	STA.w $7402,x
	RTS

CODE_0ECEDD:
	LDA.w $7A98,x
	BNE.b CODE_0ECF18
	DEC.w $7A36,x
	BPL.b CODE_0ECF03
	STZ.w $7402,x
	LDY.b #$06
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BNE.b CODE_0ECF00
	LDY.w $77C2,x
	TYA
	EOR.w #$0002
	STA.w $7400,x
	LDY.b #$08
CODE_0ECF00:
	STY.b $76,x
	RTS

CODE_0ECF03:
	LDY.w $7A36,x
	LDA.w DATA_0ECEA3,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_0ECEAA,y
	AND.w #$00FF
	STA.w $7402,x
CODE_0ECF18:
	RTS

CODE_0ECF19:
	TYX
	LDA.b $16,x
	BPL.b CODE_0ECF25
	JSR.w CODE_0ED7F7
	STZ.b $16,x
	BRA.b CODE_0ECF28

CODE_0ECF25:
	JSR.w CODE_0ED640
CODE_0ECF28:
	LDA.w #$000B
	STA.w $7540,x
	LDA.w $70E2
	LDY.b #$00
	SEC
	SBC.w $70E2,x
	PHA
	BMI.b CODE_0ECF3C
	INY
	INY
CODE_0ECF3C:
	TYA
	STA.w $7400,x
	LDY.b $79,x
	TYA
	ASL
	ASL
	CLC
	ADC.w $7400,x
	TAY
	LDA.w DATA_0ECD72,y
	STA.w $75E0,x
	LDA.w $7A98,x
	BNE.b CODE_0ECF67
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	AND.w #$0001
	STA.w $7402,x
CODE_0ECF67:
	PLA
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0ECFCC
	LDA.w $7182
	SEC
	SBC.w $7182,x
	BPL.b CODE_0ECFCC
	CMP.w #$FFA0
	BMI.b CODE_0ECFCC
	CMP.w #$FFE8
	BPL.b CODE_0ECFCC
	LDY.w $61B3
	BMI.b CODE_0ECFCC
	EOR.w #$FFFF
	INC
	AND.w #$00F0
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_0ED5AE,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7540,x
	STA.w $7A36,x
	STZ.w $7540,x
	STZ.w $7542,x
	LDY.b #$0C
	STY.b $76,x
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	PLA
	RTL

CODE_0ECFCC:
	JSR.w CODE_0ED488
	JSR.w CODE_0ED39D
	BCS.b CODE_0ECFED
	SEP.b #$20
	LDA.b $00
	STA.b $18,x
	LDA.b $02
	CLC
	ADC.b #$0E
	STA.b $19,x
	REP.b #$20
	LDY.b #$0A
	STY.b $76,x
	LDA.w #$0000
	STA.w $7402,x
CODE_0ECFED:
	RTS

CODE_0ECFEE:
	TYX
	JSR.w CODE_0ED80D
	LDA.w $7A98,x
	BNE.b CODE_0ED02F
	LDA.b $16,x
	BEQ.b CODE_0ED013
	DEC.b $16,x
	BEQ.b CODE_0ED013
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0003
	AND.w #$000B
	STA.w $7402,x
	BRA.b CODE_0ED02F

CODE_0ED013:
	LDY.w $7A36,x
	LDA.w DATA_0ED5AE,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	LDY.b #$0C
	STY.b $76,x
CODE_0ED02F:
	JMP.w CODE_0ED089

CODE_0ED032:
	TYX
	LDA.b $16,x
	BPL.b CODE_0ED03E
	JSR.w CODE_0ED7F7
	STZ.b $16,x
	BRA.b CODE_0ED041

CODE_0ED03E:
	JSR.w CODE_0ED640
CODE_0ED041:
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	EOR.w #$0002
	TAY
	LDA.w $7A98,x
	BNE.b CODE_0ED062
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0ED062:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDY.b $79,x
	TYA
	ASL
	ASL
	CLC
	ADC.w $7400,x
	TAY
	LDA.w DATA_0ECD7E,y
	STA.w $75E0,x
	LDA.w #$000B
	STA.w $7540,x
	LDA.w $7A96,x
	BNE.b CODE_0ED089
	JSR.w CODE_0ED34B
CODE_0ED089:
	JSR.w CODE_0ED488
	JMP.w CODE_0ED2EC

CODE_0ED08F:
	TYX
	STZ.w $7542,x
	LDA.w $7A98,x
	BNE.b CODE_0ED0A8
	LDY.b #$0E
	STY.b $76,x
	LDA.w #$0017
	STA.w $7402,x
	LDA.w #$0007
	STA.w $7A36,x
CODE_0ED0A8:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
CODE_0ED0BC:
	JSR.w CODE_0ED488
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ED0C7
	JSR.w CODE_0ED2EC
CODE_0ED0C7:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0ED0E0
	JSR.w CODE_0ED39D
	BCS.b CODE_0ED0E0
	SEP.b #$20
	LDA.b $00
	STA.b $18,x
	LDA.b $02
	CLC
	ADC.b #$0E
	STA.b $19,x
	REP.b #$20
CODE_0ED0E0:
	RTS

DATA_0ED0E1:
	dw $0006,$000A

DATA_0ED0E5:
	dw $0200,$FE00

CODE_0ED0E9:
	TYX
	JSR.w CODE_0ED7F7
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0ED171
	LDY.b $76,x
	CPY.b #$0E
	BEQ.b CODE_0ED125
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ED125
	JSL.l CODE_06C0BB
	LDA.w #$0040
	STA.w $7AF8
	LDY.w $77C2,x
	LDA.w DATA_0ED0E5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w $70E2,x
	STA.w $70E2
	LDA.w $7182,x
	STA.w $7182
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_0ED125:
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0ED135
	LDA.w #$0018
	STA.w $7402,x
	BRA.b CODE_0ED171

CODE_0ED135:
	LDA.w $72C2,x
	CMP.w #$0003
	BMI.b CODE_0ED14A
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_0ED171
	DEC.w $7A36,x
	BPL.b CODE_0ED15C
CODE_0ED14A:
	STZ.w $7402,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0ED0E1,y
	TAY
	STY.b $76,x
	LDA.w #$FFFF
	STA.b $16,x
	RTS

CODE_0ED15C:
	LDY.w $7A36,x
	LDA.w DATA_0ECEA3,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_0ECEAA,y
	AND.w #$00FF
	STA.w $7402,x
CODE_0ED171:
	LDY.b $76,x
	CPY.b #$0E
	BEQ.b CODE_0ED180
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ED17F
	JSR.w CODE_0ED2EC
CODE_0ED17F:
	RTS

CODE_0ED180:
	JMP.w CODE_0ED0BC

CODE_0ED183:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0ED198
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0ED198:
	LDA.w $7AF6,x
	BNE.b CODE_0ED1A7
	LDA.w #$0012
	STA.w $7A36,x
	LDY.b #$0A
	STY.b $76,x
CODE_0ED1A7:
	JSR.w CODE_0ED640
	LDA.w $7A96,x
	BNE.b CODE_0ED1B2
	JSR.w CODE_0ED34B
CODE_0ED1B2:
	JMP.w CODE_0ED089

DATA_0ED1B5:
	db $14,$02,$02,$02,$02,$02,$14,$02,$02,$02

DATA_0ED1BF:
	db $15,$16,$15,$16,$15,$16,$15,$14,$13,$12

DATA_0ED1C9:
	db $15,$14,$13,$12,$13,$14,$15

CODE_0ED1D0:
	TYX
	LDA.w $7540,x
	BEQ.b CODE_0ED1E8
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.b $00
	BCS.b CODE_0ED1E8
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_0ED1E8:
	LDA.w $7A98,x
	BNE.b CODE_0ED25F
	DEC.w $7A36,x
	BPL.b CODE_0ED231
	LDA.w $7540,x
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.b $00
	BCS.b CODE_0ED207
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0ED207:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ED214
	LDY.b #$00
	STY.b $76,x
	RTS

CODE_0ED214:
	LDA.w #$0801
	STA.w $6FA2,x
	STZ.w $7402,x
	STZ.w $7A36,x
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	LDY.b #$08
	STY.b $76,x
	RTS

CODE_0ED231:
	LDY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ED24A
	CPY.b #$14
	BNE.b CODE_0ED24A
	LDY.w $7A36,x
	INC.w $7A98,x
	LDA.w DATA_0ED1C9,y
	BRA.b CODE_0ED259

CODE_0ED24A:
	LDY.w $7A36,x
	LDA.w DATA_0ED1B5,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_0ED1BF,y
CODE_0ED259:
	AND.w #$00FF
	STA.w $7402,x
CODE_0ED25F:
	RTS

DATA_0ED260:
	dw $FE9A,$0166

CODE_0ED264:
	TYX
	LDA.w $70E2
	SEC
	SBC.w $70E2,x
	STA.b $00
	CLC
	ADC.w #$0070
	CMP.w #$00E0
	BCS.b CODE_0ED2B4
	LDA.w $61B2
	BNE.b CODE_0ED2B4
	LDY.b #$00
	LDA.b $00
	BMI.b CODE_0ED284
	INY
	INY
CODE_0ED284:
	TYA
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	SEC
	SBC.w #!Define_YI_NorSpr0A3_LeftHidingBandit
	ASL
	TAY
	LDA.w DATA_0ED260,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $74A2,x
	LDA.w #$FC20
	STA.w $6FA0,x
	LDA.w #$0801
	STA.w $6FA2,x
	INC.w $7A38,x
	STZ.w $7402,x
	LDY.b #$06
	STY.b $76,x
	RTS

CODE_0ED2B4:
	LDA.w $60C4
	DEC
	EOR.w $7C16,x
	BPL.b CODE_0ED2C4
	LDA.w #$0020
	STA.w $7402,x
	RTS

CODE_0ED2C4:
	LDY.w $7402,x
	CPY.b #$20
	BNE.b CODE_0ED2D1
	LDA.w #$001E
	STA.w $7402,x
CODE_0ED2D1:
	LDA.w $7A98,x
	BNE.b CODE_0ED2EB
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0010
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0ED2EB:
	RTS

CODE_0ED2EC:
	LDA.w #$000E
CODE_0ED2EF:
	STA.b $04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ED346
	LDA.b $18,x
	AND.w #$00FF
	BEQ.b CODE_0ED309
	CMP.w #$0080
	BMI.b CODE_0ED308
	ORA.w #$FF00
	INC
	BRA.b CODE_0ED309

CODE_0ED308:
	DEC
CODE_0ED309:
	STA.b $00
	LDA.b $19,x
	AND.w #$00FF
	BEQ.b CODE_0ED31E
	CMP.w #$0080
	BMI.b CODE_0ED31D
	ORA.w #$FF00
	INC
	BRA.b CODE_0ED31E

CODE_0ED31D:
	DEC
CODE_0ED31E:
	STA.b $02
	LDY.w $7400,x
	STY.w $7400
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70E2
	LDA.w $7182,x
	SEC
	SBC.b $04
	CLC
	ADC.b $02
	STA.w $7182
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDY.b $00
	STY.b $18,x
	LDY.b $02
	STY.b $19,x
CODE_0ED346:
	RTS

DATA_0ED347:
	dw $000C,$FFF4

CODE_0ED34B:
	LDA.w #$0010
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_0ED347,y
	STA.b $04
	LDA.w #!Define_YI_AmbSpr1D7
	JSL.l CODE_008B21
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0ED36D
	LDA.w #$0000
	BRA.b CODE_0ED370

CODE_0ED36D:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0ED370:
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FF40
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0010
	STA.w $7782,y
	LDA.w $70E2,x
	CLC
	ADC.b $04
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$000E
	STA.w $7142,y
	LDA.w $7400,x
	STA.w $73C0,y
	RTS

CODE_0ED39D:
	LDY.w $61CC
	BNE.b CODE_0ED3C2
	LDA.w $70E2
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0ED3C2
	LDA.w $7182
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$0014
	CMP.w #$0020
	BCC.b CODE_0ED3C4
CODE_0ED3C2:
	SEC
	RTS

CODE_0ED3C4:
	LDA.b $76
	CMP.w #$0001
	BEQ.b CODE_0ED3C2
CODE_0ED3CB:
	LDY.w $61CC
	BNE.b CODE_0ED3C2
	LDY.b $18
	BNE.b CODE_0ED3C2
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0008
	BNE.b CODE_0ED3E2
	STZ.w $6162
	STZ.w $6168
CODE_0ED3E2:
	LDA.w $61B2
	BPL.b CODE_0ED3F9
	LDA.w #!Define_YI_SoundID0B_ShellHit1
	JSL.l CODE_0085D2
	LDA.w #$0020
	CMP.w $61D6
	BMI.b CODE_0ED3F9
	STA.w $61D6
CODE_0ED3F9:
	LDA.w $7400,x
	STA.w $7400
	JSL.l CODE_06BE72
	LDA.w $70E2
	SEC
	SBC.w $70E2,x
	STA.b $00
	LDA.w $7182
	SEC
	SBC.w $7182,x
	STA.b $02
	CLC
	RTS

CODE_0ED417:
	LDA.w $7CD6
	SEC
	SBC.w $7CD6,x
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_0ED435
	LDA.w $7CD8
	SEC
	SBC.w $7CD8,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
CODE_0ED435:
	RTS

CODE_0ED436:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0ED435
	LDA.w $7A38,x
	BNE.b CODE_0ED457
	JSR.w CODE_0ED417
	BCS.b CODE_0ED435
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	BEQ.b CODE_0ED451
	LDA.b $18
	BNE.b CODE_0ED487
CODE_0ED451:
	LDA.w #$0001
	STA.w $7A38,x
CODE_0ED457:
	STZ.w $7402,x
	STZ.w $7400,x
	LDA.w $70E2
	CMP.w $70E2,x
	BMI.b CODE_0ED46B
	LDA.w #$0002
	STA.w $7400,x
CODE_0ED46B:
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDY.b #$04
	STY.b $76,x
	LDA.w #$0007
	STA.w $7A36,x
	LDA.w #$0017
	STA.w $7402,x
CODE_0ED487:
	RTS

CODE_0ED488:
	LDY.b $76,x
	CPY.b #$0E
	BEQ.b CODE_0ED49A
	CPY.b #$0C
	BEQ.b CODE_0ED49A
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0ED487
CODE_0ED49A:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	STA.b $00
	BNE.b CODE_0ED4A4
	JMP.w CODE_0ED51C

CODE_0ED4A4:
	LDA.b $76,x
	AND.w #$00FF
	CMP.w #$0008
	BEQ.b CODE_0ED4C2
	CMP.w #$000A
	BEQ.b CODE_0ED4C2
	CMP.w #$000E
	BEQ.b CODE_0ED4BD
	CMP.w #$000C
	BNE.b CODE_0ED4C9
CODE_0ED4BD:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ED4C9
CODE_0ED4C2:
	LDA.b $00
	CMP.w #$0008
	BEQ.b CODE_0ED4E6
CODE_0ED4C9:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	BEQ.b CODE_0ED51B
	CPX.b $18
	BEQ.b CODE_0ED4DB
	LDY.b $18
	BNE.b CODE_0ED4DC
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0ED51C
CODE_0ED4DB:
	RTS

CODE_0ED4DC:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ED54A
	BRA.b CODE_0ED51C

CODE_0ED4E6:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w $61B2
	AND.w #$BFFF
	STA.w $61B2
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ED51C
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7A98,x
	JSL.l CODE_0ECA66
	PLA
CODE_0ED51B:
	RTS

CODE_0ED51C:
	LDY.b #$00
	STY.b $76,x
	LDA.w #$0080
	STA.w $7AF8,x
	LDA.w #$0018
	STA.w $7A98,x
	LDA.b $10
	AND.w #$0001
	CLC
	ADC.w #$0003
	STA.b $16,x
	STZ.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0009
	STA.w $7402,x
	PLA
CODE_0ED54A:
	RTS

CODE_0ED54B:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0ED55B
	LDA.w $61B2
	AND.w #$6000
	BEQ.b CODE_0ED51C
CODE_0ED55B:
	RTS

CODE_0ED55C:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0ED578
	LDA.w $7860,x
	AND.w #$0008
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0ED575
	JSR.w CODE_0ED80D
	BRA.b CODE_0ED591

CODE_0ED575:
	LDA.w $7860,x
CODE_0ED578:
	AND.w #$0001
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	ORA.b $00
	BNE.b CODE_0ED5AD
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
CODE_0ED591:
	LDA.w #$0001
	STA.b $16,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0009
	STA.w $7402,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDY.b #$00
	STY.b $76,x
	PLA
CODE_0ED5AD:
	RTS

DATA_0ED5AE:
	dw $FCC0,$FBC0,$FAC0,$F9C0,$F940,$F8C0,$F7C0

DATA_0ED5BC:
	dw $FFF0,$0010

DATA_0ED5C0:
	dw $00E0,$0160,$01A0,$01F0,$00F0,$0160,$01C0,$0200
	dw $0100,$0160,$01D0,$0220,$0100,$0170,$01F0,$0240
	dw $0100,$0180,$0200,$0240,$0100,$0190,$0210,$0260
	dw $00E0,$01A0,$0220,$0260,$00E0,$01A0,$0220,$0260

DATA_0ED600:
	dw $FF00,$FE80,$FD80,$FD00,$FE80,$FDA0,$FD00,$FCA0
	dw $FE00,$FD00,$FD00,$FC60,$FD20,$FCA0,$FC80,$FC20
	dw $FC80,$FC40,$FC00,$FB80,$FBD0,$FBD0,$FBA0,$FB40
	dw $FB00,$FB10,$FB00,$FAD0,$FA80,$FA20,$FA80,$F980

CODE_0ED640:
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	AND.w #$00FF
	BNE.b CODE_0ED650
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0ED653
CODE_0ED650:
	JMP.w CODE_0ED747

CODE_0ED653:
	BIT.w #$000C
	BEQ.b CODE_0ED65B
	JMP.w CODE_0ED752

CODE_0ED65B:
	LDY.w $7400,x
	LDA.w $7CD6,x
	CLC
	ADC.w DATA_0ED5BC,y
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD8,x
	CLC
	ADC.w #$0040
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w DATA_0ED5BC,y
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0004
	STA.w $6020
	STZ.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_0ACE3F>>16
	LDA.w #FXCODE_0ACE3F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BPL.b CODE_0ED6DC
CODE_0ED697:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0ED6A4
	LDA.b $10
	AND.w #$0001
	JMP.w CODE_0ED7AF

CODE_0ED6A4:
	JSR.w CODE_0ED80D
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7AF6,x
	LDA.w #$000C
	LDY.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CPY.b #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ED6D7
	LDA.w #$0010
CODE_0ED6D7:
	TAY
	STY.b $76,x
	PLA
	RTS

CODE_0ED6DC:
	AND.w #$000F
	ASL
	STA.b $00
	LDA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	AND.w #$00F0
	LSR
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_0ED5C0,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w DATA_0ED600,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	BNE.b CODE_0ED708
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0ED708:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7540,x
	STA.w $7A36,x
	STZ.w $7540,x
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	STZ.w $7542,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ED730
	LDA.w #$000C
	BRA.b CODE_0ED742

CODE_0ED730:
	LDA.w #$0017
	STA.w $7402,x
	LDA.w #$0007
	STA.w $7A36,x
	STZ.w $7A98,x
	LDA.w #$000A
CODE_0ED742:
	TAY
	STY.b $76,x
	PLA
	RTS

CODE_0ED747:
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_0ED752
CODE_0ED74F:
	JMP.w CODE_0ED7F6

CODE_0ED752:
	LDA.w $7860,x
	AND.w #$0008
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0ED74F
	JSR.w CODE_0ED80D
	LDY.w $7400,x
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	CLC
	ADC.w DATA_0ED5BC,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7CD8,x
	SEC
	SBC.w #$0010
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$FFF0
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0005
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	STA.w $6058
	STZ.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDX.b #FXCODE_0ACE92>>16
	LDA.w #FXCODE_0ACE92
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BPL.b CODE_0ED7A3
	JMP.w CODE_0ED697

CODE_0ED7A3:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.w #$0010
	BMI.b CODE_0ED7AF
	SEC
	SBC.w #$000F
CODE_0ED7AF:
	ASL
	STA.w $7A36,x
	LDY.b #$0A
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr05B_RedCoinBandit
	BEQ.b CODE_0ED7D5
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0ED7D3
	LDY.b #$08
	STY.b $76,x
	LDA.w #$0009
	STA.w $7402,x
	LDA.w #$0002
	STA.b $16,x
	PLA
	RTS

CODE_0ED7D3:
	LDY.b #$0C
CODE_0ED7D5:
	STY.b $76,x
	LDA.w #$0004
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	LDY.w $7A36,x
	LDA.w DATA_0ED5AE,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0007
	STA.w $7A36,x
	STZ.w $7542,x
	PLA
CODE_0ED7F6:
	RTS

CODE_0ED7F7:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0ED808
	AND.w #$0008
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0ED80D
CODE_0ED808:
	RTS

DATA_0ED809:
	dw $000E,$0002

CODE_0ED80D:
	LDA.w #$000E
	CMP.w $70E2,x
	BMI.b CODE_0ED819
	STA.w $70E2,x
	RTS

CODE_0ED819:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0ED82C
	LDA.w $7860,x
	BEQ.b CODE_0ED83C
	AND.w #$0008
	BNE.b CODE_0ED830
	BRA.b CODE_0ED82E

CODE_0ED82C:
	BMI.b CODE_0ED830
CODE_0ED82E:
	INY
	INY
CODE_0ED830:
	LDA.w $70E2,x
	AND.w #$FFF0
	ORA.w DATA_0ED809,y
	STA.w $70E2,x
CODE_0ED83C:
	RTS

YI_NorSpr020_Bandit_StompRt:
YI_NorSpr05B_RedCoinBandit_StompRt:
YI_NorSpr0A3_LeftHidingBandit_StompRt:
YI_NorSpr0A4_RightHidingBandit_StompRt:
;$0ED83D
	JSR.w CODE_0ECCC7
	JML.l CODE_039F9F

;---------------------------------------------------------------------------

CODE_0ED844:
	TXY
	BRA.b CODE_0ED88C

YI_NorSpr05B_RedCoinBandit_Init:
;$0ED847
	JSL.l CODE_03D406
	LDX.b $12
	LDA.w #$0115
	JSL.l CODE_03A364
	BCS.b CODE_0ED85A
	JML.l CODE_03A31E

CODE_0ED85A:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7182,y
	LDA.w #$FFFF
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	INC
	STA.w $7542,y
	LDA.w #$0022
	STA.w $7042,y
	LDA.w #$0800
	STA.w $7040,y
	STY.b $18,x
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
CODE_0ED88C:
	LDA.w $7182,x
	ASL
	ASL
	ASL
	ASL
	AND.w #$FF00
	ORA.w #$8000
	STA.b $00
	LDA.w $70E2,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	ORA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	RTL

;---------------------------------------------------------------------------

DATA_0ED8AB:
	dw CODE_0ECD8A
	dw CODE_0ECE01
	dw CODE_0ECEB1
	dw CODE_0ED1D0
	dw CODE_0EDA32
	dw CODE_0EDA7C
	dw CODE_0EDACD

YI_NorSpr05B_RedCoinBandit_Main:
;$0ED8B9
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0ED8D9
	JSR.w CODE_0ED956
	JSL.l CODE_03A2C7
	BCC.b CODE_0ED8E8
	LDY.b $18,x
	BMI.b CODE_0ED8D3
	TYX
	JSL.l CODE_03A31E
CODE_0ED8D3:
	LDX.b $12
	JML.l CODE_03A31E

CODE_0ED8D9:
	CMP.w #$0008
	BNE.b CODE_0ED8E5
	JSR.w CODE_0ED9C2
	JSR.w CODE_0ECBAE
	RTL

CODE_0ED8E5:
	JSR.w CODE_0ED9C2
CODE_0ED8E8:
	JSL.l CODE_03AF23
	LDA.w #$0040
	STA.w $7542,x
	TXY
	LDA.b $76,x
	TAX
	JSR.w (DATA_0ED8AB,x)
	LDY.b $18,x
	BMI.b CODE_0ED934
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0ED913
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr115_Coin
	BNE.b CODE_0ED913
	TXA
	CMP.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	BEQ.b CODE_0ED919
CODE_0ED913:
	LDA.w #$FFFF
	STA.b $18,x
	RTL

CODE_0ED919:
	LDA.w $70E2,x
	STA.w $70E2,y
	LDY.w $7402,x
	LDA.w DATA_0ED935,y
	AND.w #$00FF
	ORA.w #$FF00
	CLC
	ADC.w $7182,x
	LDY.b $18,x
	STA.w $7182,y
CODE_0ED934:
	RTL

DATA_0ED935:
	db $E5,$E6,$E8,$E9,$EA,$E9,$E8,$E7,$E5,$E6,$E6,$E6,$E7,$E7,$E7,$E7
	db $E7,$E7,$ED,$EC,$EB,$EA,$EA,$E2,$E3,$EC,$EC,$EC,$EC,$EA,$E6,$E6
	db $E6

CODE_0ED956:
	LDY.w $7D36,x
	BMI.b CODE_0ED979
	LDY.w $7D36,x
	LDA.w $6EFF,y
	CMP.w #$0010
	BNE.b CODE_0ED96E
	LDA.w $7D37,y
	BEQ.b CODE_0ED96E
	JMP.w CODE_0EDA0F

CODE_0ED96E:
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
CODE_0ED978:
	RTS

CODE_0ED979:
	LDA.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	BNE.b CODE_0ED9B6
	LDY.w $60AB
	BMI.b CODE_0ED978
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0ED978
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_0ED978
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDY.w $60D4
	BNE.b CODE_0ED9B6
	JSR.w CODE_0ED9C2
	INC.b $79,x
	JSR.w CODE_0ECBDB
	PLA
	RTL

CODE_0ED9B6:
	JSR.w CODE_0ECB73
	PLA
	JML.l CODE_03B24B

DATA_0ED9BE:
	dw $FE00,$0200

CODE_0ED9C2:
	LDY.w $7400,x
	LDA.w DATA_0ED9BE,y
	LDY.b $18,x
	BMI.b CODE_0ED9F5
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0100
	STA.w $7A96,y
	LDA.w #$0140
	STA.w $7A98,y
	LDA.w #$0020
	STA.w $7AF6,y
	ASL
	STA.w $7542,y
	SEP.b #$20
	LDA.w $74A0,x
	STA.w $74A0,y
	REP.b #$20
CODE_0ED9F5:
	LDA.w $7042,x
	PHA
	LDA.w #!Define_YI_NorSpr020_Bandit
	TXY
	JSL.l CODE_03A377
	PLA
	STA.w $7042,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A0,x
	REP.b #$20
	RTS

CODE_0EDA0F:
	LDY.w $7D36,x
	DEY
	TYX
	JSL.l CODE_03B24B
	JSR.w CODE_0ED9C2
	INC.b $78,x
	LDY.w $7D36,x
	LDA.w $7CD5,y
	LDY.b #$00
	SEC
	SBC.w $7CD6,x
	BMI.b CODE_0EDA2D
	INY
	INY
CODE_0EDA2D:
	JSR.w CODE_0ECBDE
	PLA
	RTL

CODE_0EDA32:
	TYX
	LDA.b $16,x
	BPL.b CODE_0EDA3E
	JSR.w CODE_0ED7F7
	STZ.b $16,x
	BRA.b CODE_0EDA41

CODE_0EDA3E:
	JSR.w CODE_0ED640
CODE_0EDA41:
	LDA.w #$000B
	STA.w $7540,x
	LDY.b $79,x
	TYA
	ASL
	ASL
	CLC
	ADC.w $7400,x
	TAY
	LDA.w DATA_0ECD7E,y
	STA.w $75E0,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0EDA7B
	LDA.w #$0017
	STA.w $7402,x
	LDA.w #$0007
	STA.w $7A36,x
	STZ.w $7A98,x
	LDY.b #$0A
	STY.b $76,x
CODE_0EDA7B:
	RTS

CODE_0EDA7C:
	TYX
	JSR.w CODE_0ED7F7
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EDACC
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0EDA95
	LDA.w #$0018
	STA.w $7402,x
	BRA.b CODE_0EDACC

CODE_0EDA95:
	LDA.w $72C2,x
	CMP.w #$0003
	BMI.b CODE_0EDAAA
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_0EDACC
	DEC.w $7A36,x
	BPL.b CODE_0EDAB7
CODE_0EDAAA:
	STZ.w $7402,x
	LDY.b #$08
	STY.b $76,x
	LDA.w #$FFFF
	STA.b $16,x
	RTS

CODE_0EDAB7:
	LDY.w $7A36,x
	LDA.w DATA_0ECEA3,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_0ECEAA,y
	AND.w #$00FF
	STA.w $7402,x
CODE_0EDACC:
	RTS

CODE_0EDACD:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EDAE2
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0EDAE2:
	LDA.w $7AF6,x
	BNE.b CODE_0EDAF1
	STZ.w $7402,x
	STZ.w $7A36,x
	LDY.b #$08
	STY.b $76,x
CODE_0EDAF1:
	JSR.w CODE_0ED640
	LDA.w $7A96,x
	BNE.b CODE_0EDACC
	JMP.w CODE_0ED34B

;---------------------------------------------------------------------------

YI_NorSpr058_GreenToady_Init:
YI_NorSpr05C_PinkToady_Init:
;$0EDAFC
	LDA.w #$0000
	STA.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr058_GreenToady
	BEQ.b CODE_0EDB33
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0EDB19
	JSR.w CODE_0EDE60
	LDY.b #$05
	STY.b $76,x
	RTL

CODE_0EDB19:
	LDA.w $7182,x
	LSR
	LSR
	LSR
	LSR
	XBA
	STA.b $00
	LDA.w $70E2,x
	LSR
	LSR
	LSR
	LSR
	ORA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$02
	STY.b $76,x
CODE_0EDB33:
	RTL

;---------------------------------------------------------------------------

DATA_0EDB34:
	dw CODE_0EDC86
	dw CODE_0EDD6F
	dw CODE_0EDE44
	dw CODE_0EDE79
	dw CODE_0EDF03
	dw CODE_0EDFBD

YI_NorSpr058_GreenToady_Main:
YI_NorSpr05C_PinkToady_Main:
;$0EDB40
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_0EDBBB
	LDA.w $7D38,x
	BEQ.b CODE_0EDB5B
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr058_GreenToady
	BEQ.b CODE_0EDB5B
	LDA.w #$0002
	STA.w $74A2,x
CODE_0EDB5B:
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	CMP.w #$0FF0
	BCC.b CODE_0EDB76
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	JSR.w CODE_0ECCF9
	BRA.b CODE_0EDBBE

CODE_0EDB76:
	JSL.l CODE_03A2C7
	BCC.b CODE_0EDBBE
	LDY.b $76,x
	CPY.b #$01
	BEQ.b CODE_0EDBBE
	CPY.b #$04
	BEQ.b CODE_0EDBBE
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EDBB7
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0010
	BEQ.b CODE_0EDBA3
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

CODE_0EDBA3:
	LDA.w $70E2,x
	STA.w $70E2
	LDA.w $7182,x
	SEC
	SBC.w #$000E
	STA.w $7182
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	RTL

CODE_0EDBB7:
	JML.l CODE_03A31E

CODE_0EDBBB:
	JSR.w CODE_0EDC67
CODE_0EDBBE:
	LDY.b $76,x
	CPY.b #$02
	BEQ.b CODE_0EDC32
	LDY.w $7D36,x
	BPL.b CODE_0EDC32
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF6
	BCC.b CODE_0EDC32
	LDY.w $60AB
	BMI.b CODE_0EDC32
	LDY.w $60C0
	BEQ.b CODE_0EDC32
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0200
	STA.w $75E2,x
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	LDA.w #$EE60
	STA.w $6FA0,x
	LDA.w #$1000
	STA.w $6FA2,x
	LDA.w #$2805
	STA.w $7040,x
	LDY.b #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_03A0E7
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	LDA.w #$8001
	STA.w $60D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0EDC67
	RTL

CODE_0EDC32:
	JSL.l CODE_03AF23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EDB34,x)
	LDA.w $7A98,x
	BNE.b CODE_0EDC53
	LDA.w #$0006
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	AND.w #$0003
	STA.w $7402,x
CODE_0EDC53:
	LDY.w $75E3,x
	BPL.b CODE_0EDC66
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EDC66
	LDA.w #$FFFF
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EDC66:
	RTL

CODE_0EDC67:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EDC73
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JSL.l CODE_06C114
CODE_0EDC73:
	RTS

DATA_0EDC74:
	dw $FF4D,$00B3,$FEF4,$010C,$FDE7,$0219

DATA_0EDC80:
	dw $0016,$002C,$0043

CODE_0EDC86:
	TYX
	LDA.w #$0005
	STA.w $7540,x
	STA.w $7542,x
	LDA.w $7AF8,x
	BEQ.b CODE_0EDCBE
CODE_0EDC95:
	LDA.w $7A96,x
	BNE.b CODE_0EDCBD
	LDA.w #$0030
	STA.w $7A96,x
	LDA.b $10
	AND.w #$0002
	TAY
	LDA.w DATA_0EDC74,y
	STA.w $75E0,x
	TYA
	STA.w $7400,x
	LDA.b $10
	XBA
	AND.w #$0002
	TAY
	LDA.w DATA_0EDC74,y
	STA.w $75E2,x
CODE_0EDCBD:
	RTS

CODE_0EDCBE:
	LDY.w $7D36,x
	BPL.b CODE_0EDCD0
	LDY.w $61B3
	BPL.b CODE_0EDCF2
	JSR.w CODE_0EDD2E
	JSR.w CODE_0ED3CB
	BRA.b CODE_0EDCE0

CODE_0EDCD0:
	DEY
	BNE.b CODE_0EDCF2
	LDA.w $61B2
	AND.w #$6000
	BNE.b CODE_0EDC95
	JSR.w CODE_0ED39D
	BCS.b CODE_0EDCF2
CODE_0EDCE0:
	INC.b $76,x
	SEP.b #$20
	LDA.b $00
	STA.b $18,x
	LDA.b $02
	SEC
	SBC.b #$0E
	STA.b $19,x
	REP.b #$20
	RTS

CODE_0EDCF2:
	LDA.w $7A96,x
	BNE.b CODE_0EDD25
	LDA.w #$0030
	STA.w $7A96,x
	LDY.b #$00
	LDA.w $70E2
	CMP.w $70E2,x
	BMI.b CODE_0EDD09
	INY
	INY
CODE_0EDD09:
	LDA.w DATA_0EDC74,y
	STA.w $75E0,x
	TYA
	STA.w $7400,x
	LDY.b #$00
	LDA.w $7182
	CMP.w $7182,x
	BMI.b CODE_0EDD1F
	INY
	INY
CODE_0EDD1F:
	LDA.w DATA_0EDC74,y
	STA.w $75E2,x
CODE_0EDD25:
	RTS

DATA_0EDD26:
	dw $000F,$FFF1

DATA_0EDD2A:
	dw $0017,$FFE9

CODE_0EDD2E:
	LDY.b #$00
	LDA.w $70E2
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_0EDD4E
	BPL.b CODE_0EDD44
	INY
	INY
CODE_0EDD44:
	LDA.w DATA_0EDD26,y
	CLC
	ADC.w $70E2,x
	STA.w $70E2
CODE_0EDD4E:
	LDY.b #$00
	LDA.w $7182
	SEC
	SBC.w $7182,x
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCC.b CODE_0EDD6E
	BPL.b CODE_0EDD64
	INY
	INY
CODE_0EDD64:
	LDA.w DATA_0EDD2A,y
	CLC
	ADC.w $7182,x
	STA.w $7182
CODE_0EDD6E:
	RTS

CODE_0EDD6F:
	TYX
	LDA.w $60A8
	BPL.b CODE_0EDD79
	EOR.w #$FFFF
	INC
CODE_0EDD79:
	CLC
	ADC.w #$0080
	AND.w #$0200
	ASL
	XBA
	STA.b $00
	LDY.w $77C2,x
	TYA
	CLC
	ADC.b $00
	EOR.w #$0002
	TAY
	LDA.w DATA_0EDC74,y
	ASL
	STA.w $75E0,x
	PHY
	TYA
	AND.w #$0004
	LSR
	TAY
	LDA.w DATA_0EDC80,y
	ASL
	STA.w $7540,x
	PLY
	TYA
	EOR.w #$0002
	AND.w #$0002
	STA.w $7400,x
	STZ.b $00
	LDA.w $7C18,x
	SEC
	SBC.w #$0010
	BPL.b CODE_0EDDBE
	INC.b $00
	INC.b $00
CODE_0EDDBE:
	LDA.w $60AA
	BPL.b CODE_0EDDC7
	EOR.w #$FFFF
	INC
CODE_0EDDC7:
	CLC
	ADC.w #$0080
	AND.w #$0200
	ASL
	XBA
	CLC
	ADC.b $00
	EOR.w #$0002
	TAY
	LDA.w DATA_0EDC74,y
	ASL
	STA.w $75E2,x
	TYA
	AND.w #$0004
	LSR
	TAY
	LDA.w DATA_0EDC80,y
	ASL
	STA.w $7542,x
	LDA.w $7680,x
	SEC
	SBC.w #$0020
	CMP.w #$00C0
	BCC.b CODE_0EDE06
	EOR.w $75E0,x
	BMI.b CODE_0EDE06
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_0EDE06:
	LDA.w $7C18,x
	BPL.b CODE_0EDE17
	LDA.w $7682,x
	SEC
	SBC.w #$0030
	CMP.w #$00A0
	BCC.b CODE_0EDE26
CODE_0EDE17:
	EOR.w $75E2,x
	BMI.b CODE_0EDE26
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_0EDE26:
	JSR.w CODE_0EDE2F
	LDA.w #$FFF2
	JMP.w CODE_0ED2EF

CODE_0EDE2F:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	BEQ.b CODE_0EDE3E
	CMP.w #$0008
	BEQ.b CODE_0EDE3E
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EDE43
CODE_0EDE3E:
	JSL.l CODE_06C114
	PLA
CODE_0EDE43:
	RTS

CODE_0EDE44:
	TYX
	LDA.w $61B2
	BNE.b CODE_0EDE78
	LDA.w $6094
	CLC
	ADC.w #$0080
	STA.w $70E2,x
	LDA.w $609C
	SEC
	SBC.w #$0018
	STA.w $7182,x
	INC.b $76,x
CODE_0EDE60:
	LDA.w #$EE00
	STA.w $6FA0,x
	LDA.w #$0881
	STA.w $6FA2,x
	LDA.w #$2801
	STA.w $7040,x
	LDA.w #$0002
	STA.w $74A2,x
CODE_0EDE78:
	RTS

CODE_0EDE79:
	TYX
	LDA.w $61B2
	BEQ.b CODE_0EDE84
	LDY.b #$05
	STY.b $76,x
	RTS

CODE_0EDE84:
	LDA.w #$0002
	STA.w $7400,x
	LDA.w $7CD6
	SEC
	SBC.w $7CD6,x
	PHP
	BPL.b CODE_0EDE98
	EOR.w #$FFFF
	INC
CODE_0EDE98:
	LSR
	CMP.w #$0018
	BMI.b CODE_0EDEA1
	LDA.w #$0018
CODE_0EDEA1:
	CLC
	ADC.w #$0018
	STA.w $7540,x
	ASL
	ASL
	ASL
	ASL
	PLP
	BPL.b CODE_0EDEB6
	EOR.w #$FFFF
	INC
	STZ.w $7400,x
CODE_0EDEB6:
	STA.w $75E0,x
	LDA.w $7CD8
	SEC
	SBC.w $7CD8,x
	PHP
	BPL.b CODE_0EDEC7
	EOR.w #$FFFF
	INC
CODE_0EDEC7:
	LSR
	CMP.w #$0018
	BMI.b CODE_0EDED0
	LDA.w #$0018
CODE_0EDED0:
	CLC
	ADC.w #$0018
	STA.w $7542,x
	ASL
	ASL
	ASL
	ASL
	PLP
	BPL.b CODE_0EDEE2
	EOR.w #$FFFF
	INC
CODE_0EDEE2:
	STA.w $75E2,x
	JSR.w CODE_0ED39D
	BCS.b CODE_0EDEFE
	STZ.w $7A36,x
	INC.b $76,x
	SEP.b #$20
	LDA.b $00
	STA.b $18,x
	LDA.b $02
	SEC
	SBC.b #$0E
	STA.b $19,x
	REP.b #$20
CODE_0EDEFE:
	RTS

DATA_0EDEFF:
	dw $FF00,$0100

CODE_0EDF03:
	TYX
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYA
	ASL
	INC
	ASL
	ASL
	ASL
	STA.b $00
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	TYA
	ASL
	INC
	ASL
	ASL
	ASL
	STA.b $02
	LDA.b $00
	SEC
	SBC.w $7CD6,x
	STA.b $00
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_0EDF3A
	EOR.w $75E0,x
	BPL.b CODE_0EDF3A
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
CODE_0EDF3A:
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDY.w $7A36,x
	BEQ.b CODE_0EDF5E
	LDA.w $7A96,x
	BNE.b CODE_0EDF5B
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_0EDF5B:
	JMP.w CODE_0EDE26

CODE_0EDF5E:
	LDA.b $02
	SEC
	SBC.w $7CD8,x
	STA.b $02
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BCS.b CODE_0EDF93
	LDA.w #$0020
	STA.w $7A96,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EDF7E
	INY
	INY
CODE_0EDF7E:
	LDA.w #$0020
	STA.w $7542,x
	INC.w $7A36,x
	LDA.w DATA_0EDEFF,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	BRA.b CODE_0EDFB7

CODE_0EDF93:
	LDA.b $02
	PHP
	BPL.b CODE_0EDF9C
	EOR.w #$FFFF
	INC
CODE_0EDF9C:
	LSR
	CMP.w #$0018
	BMI.b CODE_0EDFA5
	LDA.w #$0018
CODE_0EDFA5:
	CLC
	ADC.w #$0018
	STA.w $7542,x
	ASL
	ASL
	ASL
	ASL
	PLP
	BPL.b CODE_0EDFB7
	EOR.w #$FFFF
	INC
CODE_0EDFB7:
	STA.w $75E2,x
	JMP.w CODE_0EDE26

CODE_0EDFBD:
	TYX
	LDA.w $61B2
	BNE.b CODE_0EDFC8
	LDY.b #$03
	STY.b $76,x
	RTS

CODE_0EDFC8:
	STZ.w $75E0,x
	LDA.w #$0004
	STA.w $7540,x
	LDA.w #$FE00
	STA.w $75E2,x
	LDA.w #$0020
	STA.w $7542,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr017_FrogPirate_Init:
;$0EDFDE
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	INC
	INC
	TAY
	STY.b $77,x
	RTL

;---------------------------------------------------------------------------

DATA_0EDFF9:
	dw CODE_0EE540
	dw CODE_0EE65A
	dw CODE_0EE699
	dw CODE_0EE774
	dw CODE_0EE7B1
	dw CODE_0EE871
	dw CODE_0EE8A6
	dw CODE_0EE699
	dw CODE_0EE91F
	dw CODE_0EE986
	dw CODE_0EE9A7
	dw CODE_0EE9DB
	dw CODE_0EEA0B
	dw CODE_0EEA97
	dw CODE_0EE699
	dw CODE_0EEAEB
	dw CODE_0EE774
	dw CODE_0EE7B1
	dw CODE_0EEB90
	dw CODE_0EEBAC
	dw CODE_0EEC2C

YI_NorSpr017_FrogPirate_Main:
;$0EE023
	JSR.w CODE_0EE112
	LDY.b $76,x
	CPY.b #$0D
	BPL.b CODE_0EE094
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0EE046
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_0EE04D
	JSL.l CODE_03B69D
	JSL.l CODE_03B716
	BRA.b CODE_0EE04D

CODE_0EE046:
	JSR.w CODE_0EE1B3
	JSL.l CODE_03AF23
CODE_0EE04D:
	JSR.w CODE_0EE1D9
	JSR.w CODE_0EE231
	LDY.b $76,x
	TYA
	ASL
	TXY
	TAX
	JSR.w (DATA_0EDFF9,x)
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BNE.b CODE_0EE06D
	JSR.w CODE_0EE2C6
	JSR.w CODE_0EE4DD
CODE_0EE06D:
	JSR.w CODE_0EE519
	STZ.w $7540,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EE093
	LDA.w #$0040
	STA.w $7540,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_0EE093
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_0EE093:
	RTL

CODE_0EE094:
	CPY.b #$15
	BPL.b CODE_0EE0D3
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0EE0B0
	LDA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	ORA.w !RAM_YI_Level_TouchedFuzzyMosaicTimerLo
	ORA.w !RAM_YI_Level_ItemBeingUsed
	BEQ.b CODE_0EE0B0
	JSL.l CODE_03B69D
	JSL.l CODE_03B716
CODE_0EE0B0:
	LDY.b $76,x
	TYA
	ASL
	TXY
	TAX
	JSR.w (DATA_0EDFF9,x)
	JSR.w CODE_0EEDF2
	JSR.w CODE_0EE519
	LDA.w $60BE
	CMP.w #$0166
	BNE.b CODE_0EE0D2
	LDA.w $7A96,x
	BNE.b CODE_0EE0D2
	LDA.w #$000C
	STA.w $6124
CODE_0EE0D2:
	RTL

CODE_0EE0D3:
	JSL.l CODE_03AF23
	JSR.w CODE_0EE1D9
	JSR.w CODE_0EE519
	RTL

CODE_0EE0DE:
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$000C
	STA.w $7402,x
	LDA.w $7042,x
	ORA.w #$0080
	STA.w $7042,x
	LDA.w #$4060
	STA.w $6FA0,x
	LDA.w #$8840
	STA.w $6FA2,x
	LDY.b #$15
	STY.b $76,x
	RTL

DATA_0EE10A:
	db $FE,$0A,$03,$05

DATA_0EE10E:
	db $05,$05,$01,$01

CODE_0EE112:
	LDA.w $7362,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	BMI.b CODE_0EE11F
	LDY.w $74A2,x
	BPL.b CODE_0EE120
CODE_0EE11F:
	RTS

CODE_0EE120:
	LDY.b $79,x
	TYA
	STA.w $602A
	STA.w $602C
	LDY.b $18,x
	BEQ.b CODE_0EE132
	STZ.w $602A
	BRA.b CODE_0EE135

CODE_0EE132:
	STZ.w $602C
CODE_0EE135:
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	BEQ.b CODE_0EE148
	INY
	LDA.w $602A
	EOR.w #$FFFF
	INC
	STA.w $602A
CODE_0EE148:
	LDA.w DATA_0EE10A,y
	AND.w #$00FF
	STA.w $6038
	LDA.w DATA_0EE10E,y
	AND.w #$00FF
	STA.w $603A
	LDY.b $78,x
	LDA.w DATA_0EF2E0,y
	AND.w #$00FF
	STA.w $6024
	TYA
	BEQ.b CODE_0EE16D
	ASL
	TAY
	LDA.w DATA_0EF2FF-$02,y
CODE_0EE16D:
	STA.w $6026
	LDY.w $7402,x
	LDA.w DATA_0EEEB7,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	ASL
	TAY
	LDA.w DATA_0EEEC8,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w DATA_0EF798,y
	STA.w $6028
	LDA.w #DATA_0EEEEA>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08A2C6>>16
	LDA.w #FXCODE_08A2C6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_0EE1B3:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0EE1C8
	LDY.w $74A2,x
	BPL.b CODE_0EE1C8
	STZ.w $7402,x
	STZ.b $78,x
	JMP.w CODE_0EE519

CODE_0EE1C8:
	LDY.w $7D38,x
	BEQ.b CODE_0EE1D8
	LDY.w $7862,x
	BEQ.b CODE_0EE1D8
	LDA.w #$0001
	STA.w $7860,x
CODE_0EE1D8:
	RTS

CODE_0EE1D9:
	LDA.w #$07E0
	CMP.w $7182,x
	BPL.b CODE_0EE1E4
	STA.w $7182,x
CODE_0EE1E4:
	LDA.w $70E2,x
	SEC
	SBC.w #$0010
	BPL.b CODE_0EE20C
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EE20C
	LDA.w #$0010
	STA.w $70E2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	RTS

CODE_0EE20C:
	JSL.l CODE_03A2C7
	BCC.b CODE_0EE230
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EE21C
	PLA
	JML.l CODE_03A31E

CODE_0EE21C:
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
CODE_0EE230:
	RTS

CODE_0EE231:
	LDY.b $76,x
	CPY.b #$06
	BEQ.b CODE_0EE275
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0EE276
	LDY.w $7862,x
	BEQ.b CODE_0EE275
	LDA.w $7A38,x
	BNE.b CODE_0EE275
	LDA.w $70E2,x
	STA.w $7A38,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0006
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$01
	BNE.b CODE_0EE25F
	LDA.w #$FFFD
CODE_0EE25F:
	STA.w $7720,x
	LDA.w $6FA2,x
	AND.w #$F7FF
	STA.w $6FA2,x
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_0EE275
	LDY.b #$09
	STY.b $76,x
CODE_0EE275:
	RTS

CODE_0EE276:
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_0EE28C
	CPY.b #$09
	BEQ.b CODE_0EE28C
	CPY.b #$0A
	BEQ.b CODE_0EE28C
	CPY.b #$0B
	BEQ.b CODE_0EE28C
	CPY.b #$0C
	BNE.b CODE_0EE275
CODE_0EE28C:
	LDA.w $7A38,x
	BEQ.b CODE_0EE275
	STZ.w $7A38,x
	STZ.w $7720,x
	LDA.w $6FA2,x
	ORA.w #$0800
	STA.w $6FA2,x
	LDA.w #$0080
	STA.w $7542,x
	LDA.w #$0800
	STA.w $75E2,x
	STZ.w $7A96,x
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_0EE275
	LDY.b #$00
	STY.b $76,x
	RTS

DATA_0EE2BA:
	dw $0180,$FE80

DATA_0EE2BE:
	dw $0040,$FFC0

DATA_0EE2C2:
	dw $FC80,$0380

CODE_0EE2C6:
	LDY.w $7D36,x
	BMI.b CODE_0EE308
	DEY
	BNE.b CODE_0EE305
	LDA.w $61B2
	AND.w #$6000
	BNE.b CODE_0EE304
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	SEC
	SBC.w #$0010
	ORA.w $7AF8,x
	ORA.w $0D9C
	ORA.w $61CC
	BNE.b CODE_0EE304
	LDY.b $76
	CPY.b #$04
	BEQ.b CODE_0EE304
	CPY.b #$01
	BEQ.b CODE_0EE304
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_0EE304
	CPY.b #$09
	BEQ.b CODE_0EE304
	CPY.b #$0B
	BEQ.b CODE_0EE304
	CPY.b #$0C
	BNE.b CODE_0EE36E
CODE_0EE304:
	RTS

CODE_0EE305:
	JMP.w CODE_0EE411

CODE_0EE308:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_0EE352
	LDY.w $60AB
	BMI.b CODE_0EE304
	LDY.w $7402,x
	CPY.b #$08
	BEQ.b CODE_0EE328
	CPY.b #$09
	BNE.b CODE_0EE333
CODE_0EE328:
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_0EE39C
	JSL.l CODE_03A858
	RTS

CODE_0EE333:
	LDA.w $7AF6,x
	BNE.b CODE_0EE304
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_0EE304
	LDA.w #$FA00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
	STZ.w $60D4
	JMP.w CODE_0EE458

CODE_0EE352:
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_0EE39C
	CPY.b #$09
	BEQ.b CODE_0EE39C
	CPY.b #$0B
	BEQ.b CODE_0EE39C
	CPY.b #$0C
	BEQ.b CODE_0EE39C
	LDA.w $7AF6,x
	BNE.b CODE_0EE39C
	LDY.w $61B3
	BPL.b CODE_0EE39C
CODE_0EE36E:
	LDA.w $7AF8,x
	BNE.b CODE_0EE304
	JSR.w CODE_0EED35
	JSR.w CODE_0EEE29
	LDA.w #$0101
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$06
	STY.b $76,x
	LDA.w #$0040
	TSB.w $6FA0
	LDY.b $79,x
	CPY.b #$58
	BNE.b CODE_0EE39B
	LDA.w #$580B
	LDY.b $18,x
	BEQ.b CODE_0EE399
	LDA.w #$5816
CODE_0EE399:
	STA.b $78,x
CODE_0EE39B:
	RTS

CODE_0EE39C:
	LDA.w $61D6
	BNE.b CODE_0EE39B
	LDY.b #$00
	LDA.w $60A8
	BNE.b CODE_0EE3AF
	LDA.w $60C4
	EOR.w #$0002
	DEC
CODE_0EE3AF:
	BPL.b CODE_0EE3B3
	INY
	INY
CODE_0EE3B3:
	LDA.w DATA_0EE2BE,y
	LDY.w $7A38,x
	BNE.b CODE_0EE3D9
	ASL
	ASL
	PHA
	LDA.w $7860,x
	AND.w #$0002
	BNE.b CODE_0EE3CC
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EE3CC:
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	PLA
CODE_0EE3D9:
	CLC
	ADC.w $60A8
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$00
	CLC
	ADC.w #$0380
	CMP.w #$0700
	BCC.b CODE_0EE3F5
	BMI.b CODE_0EE3EF
	INY
	INY
CODE_0EE3EF:
	LDA.w DATA_0EE2C2,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EE3F5:
	LDA.w $7860,x
	AND.w #$000C
	BEQ.b CODE_0EE409
	SEC
	SBC.w #$0008
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0EE409
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EE409:
	LDA.w #!Define_YI_SoundID65_JumpOnFrog
	JSL.l CODE_0085D2
CODE_0EE410:
	RTS

CODE_0EE411:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_0EE410
	LDA.w $7BB6,x
	CLC
	ADC.w $7BB6,y
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	CMP.b $00
	BCS.b CODE_0EE410
	LDA.w $7BB8,x
	CLC
	ADC.w $7BB8,y
	ASL
	STA.b $00
	LSR
	CLC
	ADC.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CMP.b $00
	BCS.b CODE_0EE410
	TYX
	JSL.l CODE_03B24B
CODE_0EE458:
	LDA.w #!Define_YI_SoundID65_JumpOnFrog
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0800
	STA.w $75E2,x
	LDA.w #$0080
	STA.w $7542,x
	LDA.w $7A38,x
	BEQ.b CODE_0EE482
	STZ.w $7542,x
	STZ.w $75E2,x
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EE482:
	LDA.w #$000B
	LDY.w $7402,x
	CPY.b #$08
	BEQ.b CODE_0EE498
	CPY.b #$09
	BEQ.b CODE_0EE498
	CPY.b #$0D
	BEQ.b CODE_0EE498
	CPY.b #$0E
	BNE.b CODE_0EE49B
CODE_0EE498:
	LDA.w #$000D
CODE_0EE49B:
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	LDY.b $76,x
	CPY.b #$08
	BEQ.b CODE_0EE4C9
	LDY.b #$08
	STY.b $76,x
	LDA.w $6FA2,x
	ORA.w #$0480
	STA.w $6FA2,x
	LDY.b $79,x
	CPY.b #$58
	BNE.b CODE_0EE4C9
	LDA.w #$580A
	LDY.b $18,x
	BEQ.b CODE_0EE4C7
	LDA.w #$5816
CODE_0EE4C7:
	STA.b $78,x
CODE_0EE4C9:
	LDA.w #$0040
	STA.w $7A96,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EE4D8
	JSL.l CODE_06C114
CODE_0EE4D8:
	RTS

DATA_0EE4D9:
	dw $FFFC,$0004

CODE_0EE4DD:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EE518
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0010
	BEQ.b CODE_0EE4FA
	SEP.b #$20
	LDA.b #$00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$20
	LDA.w #$0080
	STA.w $7AF8,x
	RTS

CODE_0EE4FA:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0EE4D9,y
	STA.w $70E2
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182
CODE_0EE518:
	RTS

CODE_0EE519:
	SEP.b #$20
	LDA.b #$00
	LDY.b $78,x
	BEQ.b CODE_0EE524
	LDA.w DATA_0EF2E0,y
CODE_0EE524:
	LDY.w $7402,x
	CLC
	ADC.w DATA_0EEEB7,y
	CLC
	ADC.w DATA_0EF787,y
	ASL
	ASL
	ASL
	STA.w $7041,x
	REP.b #$20
	RTS

DATA_0EE538:
	dw $0001,$0000

DATA_0EE53C:
	dw $0003,$0001

CODE_0EE540:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EE5AB
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A96,x
	BNE.b CODE_0EE5B8
	LDY.w $7862,x
	BNE.b CODE_0EE571
	LDA.b $11
	AND.w #$0001
	BNE.b CODE_0EE571
	LDA.w #$0002
	STA.w $7402,x
	ASL
	STA.b $16,x
	LDA.w #$0010
	STA.w $7A98,x
	LDY.b #$01
	STY.b $76,x
	RTS

CODE_0EE571:
	LDA.b $10
	AND.w #$0002
	STA.w $7400,x
	DEC
	STA.b $00
	LDY.b $77,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_0EE538-$02,y
	CMP.w DATA_0EE53C-$02,y
	BCC.b CODE_0EE597
	EOR.b $00
	BPL.b CODE_0EE597
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0EE597:
	LDY.b #$02
	STY.b $76,x
CODE_0EE59B:
	LDA.w #$0002
	STA.b $16,x
	LDA.w $7400,x
	DEC
	CLC
	ADC.w $7A36,x
	STA.w $7A36,x
CODE_0EE5AB:
	RTS

DATA_0EE5AC:
	dw $0001,$0005

DATA_0EE5B0:
	dw $0004,$0008

DATA_0EE5B4:
	dw $0003,$0004

CODE_0EE5B8:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TYA
	ORA.w $7AF6,x
	BNE.b CODE_0EE5F0
	LDY.w $61B3
	BPL.b CODE_0EE5F1
	LDA.w $7C16,x
	STA.b $00
	LDA.w $7C18,x
	JSR.w CODE_0EE607
	BCS.b CODE_0EE5F0
CODE_0EE5D3:
	LDA.w DATA_0EE5AC,y
	STA.w $7402,x
	LDA.w DATA_0EE5B4,y
	STA.b $16,x
	LDA.w DATA_0EE5B0,y
	STA.w $7A98,x
	STY.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.b #$03
	STY.b $76,x
CODE_0EE5F0:
	RTS

CODE_0EE5F1:
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6
	STA.b $00
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8
	JSR.w CODE_0EE607
	BCC.b CODE_0EE5D3
	RTS

CODE_0EE607:
	STA.b $02
	LDY.b #$02
	LDA.b $00
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_0EE622
	LDA.b $02
	CMP.w #$0040
	BCS.b CODE_0EE622
	CMP.w #$0018
	BCS.b CODE_0EE652
CODE_0EE622:
	LDA.w $7A38,x
	BEQ.b CODE_0EE629
	SEC
	RTS

CODE_0EE629:
	LDA.w $7400,x
	DEC
	EOR.b $00
	BMI.b CODE_0EE63A
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0EE63A:
	LDA.b $00
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_0EE653
	LDA.b $02
	CLC
	ADC.w #$0018
	CMP.w #$0030
	BCS.b CODE_0EE653
	DEY
	DEY
CODE_0EE652:
	CLC
CODE_0EE653:
	RTS

DATA_0EE654:
	db $03,$02,$03

DATA_0EE657:
	db $10,$10,$10

CODE_0EE65A:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EE687
	DEC.b $16,x
	BNE.b CODE_0EE667
	JMP.w CODE_0EE94B

CODE_0EE667:
	LDY.b $16,x
	LDA.w DATA_0EE657-$01,y
	AND.w #$00FF
	STA.w $7A98,x
	LDA.w DATA_0EE654-$01,y
	AND.w #$00FF
	STA.w $7402,x
	CMP.w #$0002
	BNE.b CODE_0EE687
	LDA.w #!Define_YI_SoundID5E_FrogCroak
	JSL.l CODE_0085D2
CODE_0EE687:
	RTS

DATA_0EE688:
	db $0A,$02,$01

DATA_0EE68B:
	db $00,$10,$04,$00,$06,$02

DATA_0EE691:
	dw $FE60,$01A0,$FE00,$0200

CODE_0EE699:
	TYX
	LDY.b $16,x
	BMI.b CODE_0EE706
	LDA.w $7A98,x
	BNE.b CODE_0EE705
	LDA.w DATA_0EE688,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$00FF
	BNE.b CODE_0EE6BD
	LDA.w DATA_0EE68B,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_0EE6BD:
	DEY
	STY.b $16,x
	BPL.b CODE_0EE705
	LDA.w #!Define_YI_SoundID35_FrogHop
	JSL.l CODE_0085D2
	LDA.w #$F980
	LDY.b $76,x
	CPY.b #$0E
	BNE.b CODE_0EE6D5
	LDA.w #$F680
CODE_0EE6D5:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $7542,x
	LDA.w #$0800
	STA.w $75E2,x
	LDY.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$00FF
	BEQ.b CODE_0EE6FB
	TYA
	CLC
	ADC.w #$0004
	TAY
	LDA.w #$F800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EE6FB:
	LDA.w DATA_0EE691,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b #$00
	STY.b $19,x
CODE_0EE705:
	RTS

CODE_0EE706:
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0EE761
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.w $7402,x
	CPY.b #$0B
	BEQ.b CODE_0EE729
	INC.w $7402,x
	LDA.w #$0004
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EE726
	LDA.w #$000A
CODE_0EE726:
	STA.w $7A98,x
CODE_0EE729:
	LDA.w $7A98,x
	BNE.b CODE_0EE761
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EE753
	LDY.b $76,x
	CPY.b #$0E
	BEQ.b CODE_0EE73C
	JMP.w CODE_0EE94B

CODE_0EE73C:
	STZ.w $7402,x
	INC.w $1015
	LDA.w #$0000
	LDY.w !RAM_YI_Level_BossHasBeenVisitedBeforeFlagLo
	BNE.b CODE_0EE74D
	LDA.w #$0180
CODE_0EE74D:
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_0EE753:
	STZ.w $7402,x
	LDA.w #$0002
	STA.b $16,x
	STA.w $7400,x
	STZ.w $7A98,x
CODE_0EE761:
	RTS

DATA_0EE762:
	db $04,$03,$02,$09,$08,$07,$06

DATA_0EE769:
	db $00,$02,$08,$00,$02,$08,$02

DATA_0EE770:
	db $01,$08,$0C,$08

CODE_0EE774:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EE7AE
	DEC.b $16,x
	LDA.b $16,x
	BNE.b CODE_0EE793
	LDY.b $18,x
	LDA.w DATA_0EE770,y
	STA.b $78,x
	LDA.w #!Define_YI_SoundID3E_Tongue
	JSL.l CODE_0085D2
	INC.b $76,x
	LDA.w #$0000
CODE_0EE793:
	LDY.b $18,x
	BEQ.b CODE_0EE79B
	CLC
	ADC.w #$0003
CODE_0EE79B:
	TAY
	LDA.w DATA_0EE762,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w DATA_0EE769,y
	AND.w #$00FF
	STA.w $7A98,x
CODE_0EE7AE:
	JMP.w CODE_0EEE8A

CODE_0EE7B1:
	TYX
	LDA.w $7A98,x
	BEQ.b CODE_0EE7BA
	JMP.w CODE_0EE855

CODE_0EE7BA:
	LDY.b $19,x
	BNE.b CODE_0EE815
	LDA.b $78,x
	CLC
	ADC.w #$0801
	STA.b $78,x
	XBA
	TAY
	CPY.b #$60
	BEQ.b CODE_0EE7CF
	JMP.w CODE_0EE855

CODE_0EE7CF:
	LDY.b $76,x
	CPY.b #$11
	BNE.b CODE_0EE7FA
	LDA.w #$580B
	STA.b $78,x
	LDA.w #$0006
	STA.w $7A98,x
	LDY.b #$02
	STY.b $19,x
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	SEC
	SBC.w $6038
	AND.w #$00FF
	XBA
	ORA.w #$0058
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	RTS

CODE_0EE7FA:
	LDA.w #$5817
	LDY.b $18,x
	BEQ.b CODE_0EE804
	LDA.w #$581B
CODE_0EE804:
	STA.b $78,x
	LDA.w #$0008
	STA.b $16,x
	LDA.w #!Define_YI_SoundID35_FrogHop
	JSL.l CODE_0085D2
	INC.b $76,x
	RTS

CODE_0EE815:
	LDA.b $78,x
	SEC
	SBC.w #$0801
	STA.b $78,x
	XBA
	TAY
	CPY.b #$00
	BNE.b CODE_0EE855
	STZ.w $7402,x
	STZ.b $78,x
	LDY.b #$00
	STY.b $19,x
	LDY.b $76,x
	CPY.b #$11
	BNE.b CODE_0EE842
	LDA.w #!Define_YI_SoundID14_Gulp
	JSL.l CODE_0085D2
	LDA.w #$0040
	STA.w $7A98,x
	INC.b $76,x
	RTS

CODE_0EE842:
	LDA.w $7A38,x
	BEQ.b CODE_0EE852
	LDA.w #$0006
	STA.w $7A96,x
	LDY.b #$0B
	STY.b $76,x
CODE_0EE851:
	RTS

CODE_0EE852:
	JMP.w CODE_0EE571

CODE_0EE855:
	LDY.b $76,x
	CPY.b #$11
	BEQ.b CODE_0EE851
	JSR.w CODE_0EEC41
	JMP.w CODE_0EEE8A

DATA_0EE861:
	db $0B,$19,$1A,$19,$1A,$17,$18,$17,$16,$1D,$1E,$1D,$1E,$1C,$1B,$1C

CODE_0EE871:
	TYX
	STX.b $00
	DEC.b $16,x
	BNE.b CODE_0EE884
	LDA.w #$0006
	STA.w $7A98,x
	LDY.b #$02
	STY.b $19,x
	DEC.b $76,x
CODE_0EE884:
	LDA.b $16,x
	LDY.b $18,x
	BEQ.b CODE_0EE88E
	CLC
	ADC.w #$0008
CODE_0EE88E:
	TAY
	LDA.w DATA_0EE861,y
	AND.w #$00FF
	ORA.w #$5800
	STA.b $78,x
	LDY.b $76,x
	CPY.b $00
	BNE.b CODE_0EE851
	JSR.w CODE_0EEC41
	JMP.w CODE_0EEE8A

CODE_0EE8A6:
	TYX
	LDA.b $78,x
	SEC
	SBC.w #$0801
	STA.b $78,x
	XBA
	TAY
	CPY.b #$00
	BEQ.b CODE_0EE8B7
	BPL.b CODE_0EE8BC
CODE_0EE8B7:
	STZ.w $7402,x
	STZ.b $78,x
CODE_0EE8BC:
	LDA.w $0D9A
	BNE.b CODE_0EE8C4
	JMP.w CODE_0EED91

CODE_0EE8C4:
	LDY.w $7223
	BMI.b CODE_0EE91E
	LDA.w $7CD8
	SEC
	SBC.w $7CD8,x
	CMP.w #$0008
	BCS.b CODE_0EE91E
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7AF6,x
	LDA.w #$0040
	TRB.w $6FA0
	JSL.l CODE_06BE72
	LDA.w #$0020
	STA.w $7AF8
	STZ.w $0D9A
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w $7A38,x
	BNE.b CODE_0EE914
	LDA.w #$0002
	STA.b $16,x
	STA.w $7400,x
	STZ.w $7A98,x
	LDY.b #$07
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EE91C
	JMP.w CODE_0EE94B

CODE_0EE914:
	LDA.w #$0006
	STA.w $7A96,x
	LDY.b #$0B
CODE_0EE91C:
	STY.b $76,x
CODE_0EE91E:
	RTS

CODE_0EE91F:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EE975
	LDA.b $78,x
	SEC
	SBC.w #$0801
	STA.b $78,x
	XBA
	TAY
	CPY.b #$01
	BPL.b CODE_0EE985
	LDA.w $6FA2,x
	AND.w #$FB7F
	STA.w $6FA2,x
	STZ.w $7402,x
	STZ.b $78,x
	LDY.b #$00
	STY.b $19,x
	LDA.w #$0020
	STA.w $7AF6,x
CODE_0EE94B:
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	STZ.b $76,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w $7A38,x
	BEQ.b CODE_0EE974
	LDA.w #$0006
	STA.w $7A96,x
	LDY.b #$0B
	STY.b $76,x
CODE_0EE974:
	RTS

CODE_0EE975:
	LDA.w $7A98,x
	BNE.b CODE_0EE985
	LDA.w $7402,x
	BIT.w #$0001
	BEQ.b CODE_0EE985
	INC.w $7402,x
CODE_0EE985:
	RTS

CODE_0EE986:
	TYX
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDY.w $7862,x
	BNE.b CODE_0EE9A6
	LDA.w #$0060
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w $75E2,x
	LDA.w #$0004
	STA.w $7542,x
	INC.b $76,x
CODE_0EE9A6:
	RTS

CODE_0EE9A7:
	TYX
	LDY.w $7862,x
	BEQ.b CODE_0EE9B5
	LDA.w #$FFA0
	STA.w $75E2,x
	BRA.b CODE_0EE9CC

CODE_0EE9B5:
	LDY.w $75E3,x
	BPL.b CODE_0EE9CC
	LDA.w #$0006
	STA.w $7A96,x
	LDA.w #$FFFF
	STA.w $7AF6,x
	STA.w $7AF8,x
	INC.b $76,x
	RTS

CODE_0EE9CC:
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
	JSR.w CODE_0EEE6C
	JMP.w CODE_0EE5B8

CODE_0EE9DB:
	TYX
	LDA.w #$0600
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w $7A96,x
	BNE.b CODE_0EE9FE
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	INC.b $76,x
CODE_0EE9FE:
	RTS

DATA_0EE9FF:
	dw $0020,$FFE0,$0040,$FFC0

DATA_0EEA07:
	dw $FFF0,$0010

CODE_0EEA0B:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EE9FE
	STZ.w $7AF6,x
	STZ.w $7AF8,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EEA1F
	STZ.w $7AF8
CODE_0EEA1F:
	LDA.w #$0003
	STA.b $00
	LDA.w $70E2,x
	STA.b $02
	LDA.b $10
	AND.w #$0002
	TAY
	LDA.w DATA_0EEA07,y
	STA.b $0E
	TYA
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BEQ.b CODE_0EEA3E
	CLC
	ADC.w #$0004
CODE_0EEA3E:
	TAY
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_0EE9FF,y
CODE_0EEA46:
	STA.w $70E2,x
	SEC
	SBC.w $7A38,x
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_0EEA72
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_0EEA85
CODE_0EEA72:
	DEC.b $00
	BNE.b CODE_0EEA7D
	LDA.b $02
	STA.w $70E2,x
	BRA.b CODE_0EEA85

CODE_0EEA7D:
	LDA.w $70E2,x
	CLC
	ADC.b $0E
	BRA.b CODE_0EEA46

CODE_0EEA85:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $7CD6,x
	JSR.w CODE_0EEE6C
	LDY.b #$09
	STY.b $76,x
	RTS

CODE_0EEA97:
	TYX
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$0090
	BPL.b CODE_0EEAC6
	LDA.w #$0048
	JSL.l CODE_03A34C
	LDA.w #$0000
	STA.w $70E2,y
	JSR.w CODE_0EE59B
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$FF
	STA.w $7863,x
	REP.b #$20
	INC.b $76,x
	RTS

CODE_0EEAC6:
	LDA.w #$0004
	STA.w $7542,x
	LDA.w #$0040
	LDY.w $7862,x
	BEQ.b CODE_0EEAD7
	LDA.w #$FFA0
CODE_0EEAD7:
	PHA
	EOR.w $75E2,x
	BPL.b CODE_0EEAE6
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
CODE_0EEAE6:
	PLA
	STA.w $75E2,x
	RTS

CODE_0EEAEB:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0EEB52
	LDA.w $1015
	BNE.b CODE_0EEB2F
	LDA.w $105C
	DEC
	CMP.w #$0060
	BPL.b CODE_0EEB02
	LDA.w #$0060
CODE_0EEB02:
	STA.w $105C
	JSR.w CODE_0EEB53
	LDA.w $105C
	CMP.w #$0060
	BNE.b CODE_0EEB52
	LDY.b #$00
	STY.b $18,x
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$0003
	STA.b $16,x
	INC
	STA.w $7A98,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0060
	STA.w $7A98,x
	INC.b $76,x
	RTS

CODE_0EEB2F:
	BPL.b CODE_0EEB35
	STZ.w $1015
	RTS

CODE_0EEB35:
	CMP.w #$0002
	BNE.b CODE_0EEB52
	LDA.w #$0100
	CMP.w $105C
	BEQ.b CODE_0EEB52
	STA.w $105C
	LDA.w #$0030
	STA.w $7A96,x
	JSR.w CODE_0EEB53
	JSL.l CODE_03BFF7
CODE_0EEB52:
	RTS

CODE_0EEB53:
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0166
	STA.w $60BE
	LDA.w $105C
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LSR
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_540000+$0040
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_540000+$0040)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_088293>>16
	LDA.w #FXCODE_088293
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_0EEB90:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EEBA7
	LDA.w #$0002
	STA.w $7402,x
	INC
	STA.b $16,x
	LDA.w #$0010
	STA.w $7A98,x
	INC.b $76,x
CODE_0EEBA7:
	RTS

DATA_0EEBA8:
	db $02,$03

DATA_0EEBAA:
	db $10,$20

CODE_0EEBAC:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EEBF9
	DEC.b $16,x
	BNE.b CODE_0EEBC5
	LDA.w #$0040
	STA.w $7A98,x
	LDA.w #$0002
	STA.w $7402,x
	INC.b $76,x
	RTS

CODE_0EEBC5:
	SEP.b #$20
	LDY.b $16,x
	LDA.w DATA_0EEBAA-$01,y
	STA.w $7A98,x
	LDA.w DATA_0EEBA8-$01,y
	STA.w $7402,x
	REP.b #$20
	DEY
	BEQ.b CODE_0EEBF9
	LDA.w #!Define_YI_SoundID65_JumpOnFrog
	JSL.l CODE_0085D2
	LDA.w #$FE00
	STA.b $00
	LDA.w #$FF80
	STA.b $02
	LDA.w $70E2,x
	STA.b $0A
	LDA.w $7182,x
	STA.b $0C
	JSL.l CODE_0EEBFA
CODE_0EEBF9:
	RTS

CODE_0EEBFA:
	LDA.w #!Define_YI_AmbSpr1D9
	JSL.l CODE_008B21
	LDA.b $0A
	STA.w $70A2,y
	LDA.b $0C
	STA.w $7142,y
	LDA.w #$000C
	STA.w $7782,y
	LDA.w #$0002
	STA.w $7E4C,y
	ASL
	STA.w $7500,y
	STA.w $7502,y
	STA.w $7462,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	STA.w $75A2,y
	RTL

CODE_0EEC2C:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EEC36
	JSL.l CODE_02A4B5
CODE_0EEC36:
	RTS

DATA_0EEC37:
	dw $FF00,$00FF

DATA_0EEC3B:
	dw $FF00,$0100,$0001

CODE_0EEC41:
	LDY.b $79,x
	CPY.b #$01
	BMI.b CODE_0EECBB
	TYA
	LSR
	LDY.b $18,x
	BNE.b CODE_0EEC68
	STA.w $6004
	LDA.w #$0004
	STA.w $6006
	LDA.w $7400,x
	DEC
	STA.b $00
	LDA.w $7CD6
	SEC
	SBC.w $7CD6,x
	EOR.b $00
	BPL.b CODE_0EEC79
	RTS

CODE_0EEC68:
	STA.w $6006
	LDA.w #$0004
	STA.w $6004
	LDA.w $7CD8
	CMP.w $7CD8,x
	BPL.b CODE_0EECBB
CODE_0EEC79:
	LDA.w $70E2,x
	CLC
	ADC.w $603C
	STA.w $6000
	LDA.w $7182,x
	CLC
	ADC.w $603E
	STA.w $6002
	LDA.w $6004
	CLC
	ADC.w $7BB6
	ASL
	STA.b $04
	LSR
	CLC
	ADC.w $6000
	SEC
	SBC.w $7CD6
	CMP.b $04
	BCS.b CODE_0EECBB
	LDA.w $6006
	CLC
	ADC.w $7BB8
	ASL
	STA.b $04
	LSR
	CLC
	ADC.w $6002
	SEC
	SBC.w $7CD8
	CMP.b $04
	BCC.b CODE_0EECBC
CODE_0EECBB:
	RTS

CODE_0EECBC:
	LDA.w $61B2
	AND.w #$6000
	BNE.b CODE_0EECBB
	LDA.w $7AF8,x
	ORA.w $0D9C
	ORA.w $61CC
	BNE.b CODE_0EECBB
	LDY.b $76
	CPY.b #$04
	BEQ.b CODE_0EECBB
	JSL.l CODE_06C114
	JSR.w CODE_0EED35
	LDA.w $70E2
	SEC
	SBC.w $70E2,x
	SEC
	SBC.w $6038
	AND.w #$00FF
	XBA
	STA.b $06
	LDA.w $7182
	SEC
	SBC.w $7182,x
	SEC
	SBC.w $603A
	AND.w #$00FF
	ORA.b $06
	STA.b $06
	LDY.b $18,x
	LDA.w DATA_0EEC37,y
	AND.b $06
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0EED1A
	LDA.b $18,x
	ASL
	TAY
	BNE.b CODE_0EED14
	LDY.w $7400,x
CODE_0EED14:
	LDA.w DATA_0EEC3B,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0EED1A:
	LDY.b #$02
	STY.b $19,x
	LDY.b #$06
	STY.b $76,x
	LDY.b $79,x
	CPY.b #$58
	BNE.b CODE_0EED34
	LDA.w #$580B
	LDY.b $18,x
	BEQ.b CODE_0EED32
	LDA.w #$5816
CODE_0EED32:
	STA.b $78,x
CODE_0EED34:
	RTS

CODE_0EED35:
	LDA.w $61B2
	BPL.b CODE_0EED51
	LDA.w #$0100
	STA.w $614A
	LSR
	STA.w $61D6
	STZ.w $60A8
	STZ.w $60B4
	JSL.l CODE_04F74A
	LDA.w $61B2
CODE_0EED51:
	AND.w #$7FFF
	STA.w $61B2
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDY.b #$00
	STY.w $7862
	LDY.b #$04
	STY.b $76
	LDA.w #$6040
	STA.w $6FA2
	STZ.b $16
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	LDA.w #$FFFF
	STA.w $7E48
	STA.w $7AF8
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	STZ.w $7542,x
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	INC.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
CODE_0EED8C:
	RTS

DATA_0EED8D:
	dw $0100,$FF00

CODE_0EED91:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BEQ.b CODE_0EED8C
	SEP.b #$20
	LDY.b $18,x
	BEQ.b CODE_0EEDAD
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.b #$08
	ORA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.b #$F0
	BPL.b CODE_0EEDC6
	BRA.b CODE_0EEDCB

CODE_0EEDAD:
	LDA.b #$08
	LDY.w $7400,x
	BEQ.b CODE_0EEDB6
	LDA.b #$F8
CODE_0EEDB6:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	ORA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	CLC
	ADC.b #$10
	CMP.b #$20
	BCS.b CODE_0EEDCB
CODE_0EEDC6:
	REP.b #$20
	JMP.w CODE_0EEE29

CODE_0EEDCB:
	REP.b #$20
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	TYA
	CPY.b #$00
	BPL.b CODE_0EEDD8
	ORA.w #$FF00
CODE_0EEDD8:
	CLC
	ADC.w $70E2,x
	STA.w $70E2
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYA
	CPY.b #$00
	BPL.b CODE_0EEDEA
	ORA.w #$FF00
CODE_0EEDEA:
	CLC
	ADC.w $7182,x
	STA.w $7182
	RTS

CODE_0EEDF2:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BEQ.b CODE_0EEE28
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.b $79,x
	BEQ.b CODE_0EEE08
	PHA
	LDA.b $79,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	PLA
CODE_0EEE08:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	BMI.b CODE_0EEE14
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
CODE_0EEE14:
	REP.b #$20
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	TYA
	CPY.b #$00
	BPL.b CODE_0EEE21
	ORA.w #$FF00
CODE_0EEE21:
	CLC
	ADC.w $70E2,x
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_0EEE28:
	RTS

CODE_0EEE29:
	LDY.b #$00
	LDA.w $7CD6
	SEC
	SBC.w $70E2,x
	SEC
	SBC.w $6038
	ASL
	ASL
	ASL
	EOR.w #$FFFF
	INC
	STA.b $00
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_0EEE51
	BPL.b CODE_0EEE4C
	INY
	INY
CODE_0EEE4C:
	LDA.w DATA_0EED8D,y
	STA.b $00
CODE_0EEE51:
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.w #$0040
	STA.w $7542
	STA.w $0D9A
	LDA.w #$0400
	STA.w $75E2
	RTS

CODE_0EEE6C:
	LDA.w $611C
	LDY.w $61B3
	BMI.b CODE_0EEE7C
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EEE7C
	LDA.w $7CD6
CODE_0EEE7C:
	LDY.b #$00
	CMP.w $7CD6,x
	BMI.b CODE_0EEE85
	INY
	INY
CODE_0EEE85:
	TYA
	STA.w $7400,x
	RTS

CODE_0EEE8A:
	LDA.w $7A38,x
	BEQ.b CODE_0EEEB6
	LDA.w #$0004
	STA.w $7542,x
	LDA.w #$0040
	LDY.w $7862,x
	BEQ.b CODE_0EEEA0
	LDA.w #$FFA0
CODE_0EEEA0:
	PHA
	EOR.w $75E2,x
	BPL.b CODE_0EEEAF
	SEP.b #$20
	LDA.b #$FF
	STA.w $7862,x
	REP.b #$20
CODE_0EEEAF:
	PLA
	STA.w $75E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EEEB6:
	RTS

DATA_0EEEB7:
	db $0A,$0A,$0A,$0B,$0B,$0A,$0A,$0A,$0F,$0F,$0A,$0A,$0B,$0F,$0F,$0F
	db $0F

DATA_0EEEC8:
	dw DATA_0EEEEA,DATA_0EEF1C,DATA_0EEF4E,DATA_0EEF80,DATA_0EEFB7,DATA_0EEFEE,DATA_0EF020,DATA_0EF052
	dw DATA_0EF084,DATA_0EF0CF,DATA_0EF11A,DATA_0EF14C,DATA_0EF17E,DATA_0EF1B5,DATA_0EF200,DATA_0EF24B
	dw DATA_0EF296

DATA_0EEEEA:
	db $FC,$0A,$06,$02,$00,$05,$0A,$06,$02,$00,$0E,$0A,$18,$02,$00,$0E
	db $02,$08,$02,$00,$04,$FB,$0C,$02,$00,$FD,$FB,$0C,$02,$00,$00,$00
	db $01,$02,$02,$F8,$00,$00,$02,$02,$FE,$0A,$18,$42,$00,$FE,$02,$08
	db $42,$00

DATA_0EEF1C:
	db $FC,$0A,$06,$02,$00,$05,$0A,$06,$02,$00,$0E,$0A,$18,$02,$00,$0E
	db $02,$08,$02,$00,$05,$FB,$0C,$02,$00,$FE,$FB,$0C,$02,$00,$01,$00
	db $01,$02,$02,$F9,$00,$00,$02,$02,$FE,$0A,$18,$42,$00,$FE,$02,$08
	db $42,$00

DATA_0EEF4E:
	db $FF,$FC,$0B,$42,$00,$06,$FC,$0B,$02,$00,$FC,$0A,$06,$02,$00,$05
	db $0A,$06,$02,$00,$0E,$0A,$18,$02,$00,$0E,$02,$08,$02,$00,$02,$01
	db $01,$02,$02,$FA,$01,$00,$02,$02,$FE,$0A,$18,$42,$00,$FE,$02,$08
	db $42,$00

DATA_0EEF80:
	db $FD,$FB,$0B,$42,$00,$04,$FB,$0B,$02,$00,$0E,$0A,$18,$02,$00,$0E
	db $02,$08,$02,$00,$05,$0A,$06,$02,$00,$08,$08,$12,$02,$00,$00,$08
	db $14,$02,$00,$08,$00,$05,$02,$00,$00,$00,$04,$02,$00,$F8,$00,$03
	db $02,$00,$FC,$0A,$06,$02,$00

DATA_0EEFB7:
	db $FB,$FB,$0B,$42,$00,$02,$FB,$0B,$02,$00,$0E,$0A,$18,$02,$00,$0E
	db $02,$08,$02,$00,$05,$0A,$06,$02,$00,$06,$08,$12,$02,$00,$FE,$08
	db $14,$02,$00,$06,$00,$05,$02,$00,$FE,$00,$04,$02,$00,$F6,$00,$03
	db $02,$00,$FC,$0A,$06,$02,$00

DATA_0EEFEE:
	db $04,$FB,$1A,$02,$00,$FD,$FB,$1A,$02,$00,$FC,$0A,$06,$02,$00,$05
	db $0A,$06,$02,$00,$0E,$0A,$18,$02,$00,$0E,$02,$08,$02,$00,$00,$00
	db $01,$02,$02,$F8,$00,$00,$02,$02,$FE,$0A,$18,$42,$00,$FE,$02,$08
	db $42,$00

DATA_0EF020:
	db $05,$FB,$1A,$02,$00,$FE,$FB,$1A,$02,$00,$FC,$0A,$06,$02,$00,$05
	db $0A,$06,$02,$00,$0E,$0A,$18,$02,$00,$0E,$02,$08,$02,$00,$01,$00
	db $01,$02,$02,$F9,$00,$00,$02,$02,$FE,$0A,$18,$42,$00,$FE,$02,$08
	db $42,$00

DATA_0EF052:
	db $06,$FC,$1A,$02,$00,$FF,$FC,$1A,$02,$00,$FC,$0A,$06,$02,$00,$05
	db $0A,$06,$02,$00,$0E,$0A,$18,$02,$00,$0E,$02,$08,$02,$00,$02,$01
	db $01,$02,$02,$FA,$01,$00,$02,$02,$FE,$0A,$18,$42,$00,$FE,$02,$08
	db $42,$00

DATA_0EF084:
	db $FC,$0A,$06,$02,$00,$FD,$00,$15,$02,$00,$05,$0A,$06,$02,$00,$0E
	db $0A,$18,$02,$00,$0E,$02,$08,$02,$00,$0D,$02,$1B,$02,$00,$0E,$FB
	db $1B,$02,$00,$09,$08,$13,$02,$00,$01,$08,$11,$02,$00,$F9,$08,$10
	db $02,$00,$09,$00,$17,$02,$00,$09,$F8,$07,$02,$00,$04,$02,$06,$02
	db $00,$FE,$0A,$18,$42,$00,$FE,$02,$08,$42,$00

DATA_0EF0CF:
	db $FC,$FE,$15,$02,$00,$FC,$0A,$06,$02,$00,$05,$0A,$06,$02,$00,$0E
	db $0A,$18,$02,$00,$0E,$02,$08,$02,$00,$0C,$00,$1B,$02,$00,$0D,$F9
	db $1B,$02,$00,$08,$06,$13,$02,$00,$00,$06,$11,$02,$00,$F8,$06,$10
	db $02,$00,$08,$FE,$17,$02,$00,$08,$F6,$07,$02,$00,$03,$00,$06,$02
	db $00,$FE,$0A,$18,$42,$00,$FE,$02,$08,$42,$00

DATA_0EF11A:
	db $0A,$0D,$19,$02,$00,$01,$0D,$19,$02,$00,$04,$FB,$0C,$02,$00,$FD
	db $FB,$0C,$02,$00,$00,$00,$01,$02,$02,$F8,$00,$00,$02,$02,$04,$0B
	db $09,$02,$00,$0E,$0B,$09,$02,$00,$13,$10,$19,$02,$00,$0A,$10,$19
	db $02,$00

DATA_0EF14C:
	db $FD,$FE,$0B,$42,$00,$04,$FE,$0B,$02,$00,$FC,$0B,$06,$02,$00,$05
	db $0B,$06,$02,$00,$0E,$09,$18,$02,$00,$0E,$01,$08,$02,$00,$00,$03
	db $01,$02,$02,$F8,$03,$00,$02,$02,$FE,$07,$18,$42,$00,$FE,$FF,$08
	db $42,$00

DATA_0EF17E:
	db $05,$0B,$06,$02,$00,$0E,$09,$18,$02,$00,$0E,$01,$08,$02,$00,$04
	db $FD,$1A,$02,$00,$FD,$FD,$1A,$02,$00,$08,$0B,$12,$02,$00,$00,$0B
	db $14,$02,$00,$08,$03,$05,$02,$00,$00,$03,$04,$02,$00,$F8,$03,$03
	db $02,$00,$FC,$0B,$06,$02,$00

DATA_0EF1B5:
	db $FA,$0A,$06,$02,$00,$03,$0A,$06,$02,$00,$0E,$01,$08,$02,$00,$0E
	db $09,$18,$02,$00,$0F,$FB,$1A,$02,$00,$0E,$02,$1A,$02,$00,$08,$08
	db $13,$02,$00,$00,$08,$11,$02,$00,$F8,$08,$10,$02,$00,$08,$00,$17
	db $02,$00,$08,$F8,$07,$02,$00,$FC,$00,$15,$02,$00,$03,$02,$06,$02
	db $00,$FE,$0A,$18,$42,$00,$FE,$02,$08,$42,$00

DATA_0EF200:
	db $FD,$02,$15,$02,$00,$03,$0A,$06,$02,$00,$0E,$08,$18,$02,$00,$0E
	db $00,$08,$02,$00,$11,$06,$1A,$02,$00,$12,$FD,$1A,$02,$00,$09,$0A
	db $13,$02,$00,$01,$0A,$11,$02,$00,$F9,$0A,$10,$02,$00,$09,$02,$17
	db $02,$00,$09,$FA,$07,$02,$00,$04,$04,$06,$02,$00,$FA,$0A,$06,$02
	db $00,$FE,$0A,$18,$42,$00,$FE,$02,$08,$42,$00

DATA_0EF24B:
	db $24,$1C,$0C,$02,$00,$1E,$0D,$19,$C2,$00,$20,$10,$12,$C2,$00,$28
	db $0F,$14,$C2,$00,$28,$18,$04,$C2,$00,$29,$13,$16,$82,$00,$1A,$0E
	db $09,$02,$00,$20,$18,$05,$C2,$00,$22,$0D,$09,$02,$00,$2A,$0C,$19
	db $82,$00,$31,$13,$0D,$02,$00,$30,$18,$03,$C2,$00,$1D,$08,$19,$C2
	db $00,$15,$09,$19,$C2,$00,$2B,$1C,$0C,$42,$00

DATA_0EF296:
	db $2E,$10,$0D,$02,$00,$1F,$0E,$19,$C2,$00,$24,$1B,$0C,$02,$00,$1A
	db $0D,$09,$02,$00,$28,$10,$14,$C2,$00,$29,$12,$16,$02,$00,$20,$0F
	db $12,$C2,$00,$20,$16,$05,$C2,$00,$28,$19,$04,$C2,$00,$24,$0C,$09
	db $02,$00,$29,$0C,$19,$82,$00,$30,$1A,$03,$42,$00,$1F,$07,$19,$C2
	db $00,$16,$09,$19,$C2,$00,$2B,$1D,$0C,$42

DATA_0EF2E0:
	db $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$01,$02,$03,$04
	db $05,$06,$07,$08,$09,$0A,$0B,$0B,$0B,$0B,$0B,$0B,$0B,$0B,$0B

DATA_0EF2FF:
	dw DATA_0EF33B,DATA_0EF340,DATA_0EF34A,DATA_0EF359,DATA_0EF36D,DATA_0EF386,DATA_0EF3A4,DATA_0EF3C7
	dw DATA_0EF3EF,DATA_0EF41C,DATA_0EF44E,DATA_0EF485,DATA_0EF48A,DATA_0EF494,DATA_0EF4A3,DATA_0EF4B7
	dw DATA_0EF4D0,DATA_0EF4EE,DATA_0EF511,DATA_0EF539,DATA_0EF566,DATA_0EF598,DATA_0EF5CF,DATA_0EF606
	dw DATA_0EF63D,DATA_0EF674,DATA_0EF6AB,DATA_0EF6E2,DATA_0EF719,DATA_0EF750

DATA_0EF33B:
	db $FC,$04,$0D,$02,$00

DATA_0EF340:
	db $FC,$05,$16,$02,$00,$F5,$04,$0D,$02,$00

DATA_0EF34A:
	db $FC,$03,$16,$82,$00,$F4,$05,$16,$02,$00,$ED,$04,$0D,$02,$00

DATA_0EF359:
	db $FC,$05,$16,$02,$00,$F4,$03,$16,$82,$00,$EC,$05,$16,$02,$00,$E5
	db $04,$0D,$02,$00

DATA_0EF36D:
	db $FC,$05,$16,$82,$00,$F4,$07,$16,$02,$00,$EC,$05,$16,$82,$00,$E4
	db $07,$16,$02,$00,$DD,$06,$0D,$02,$00

DATA_0EF386:
	db $FC,$07,$16,$02,$00,$F4,$06,$16,$82,$00,$EC,$07,$16,$02,$00,$E4
	db $06,$16,$82,$00,$DC,$07,$16,$02,$00,$D5,$06,$0D,$02,$00

DATA_0EF3A4:
	db $FC,$06,$16,$82,$00,$F4,$07,$16,$02,$00,$EC,$06,$16,$82,$00,$E4
	db $07,$16,$02,$00,$DC,$06,$16,$82,$00,$D4,$07,$16,$02,$00,$CD,$06
	db $0D,$02,$00

DATA_0EF3C7:
	db $FC,$06,$1C,$02,$00,$F4,$05,$1C,$02,$00,$EC,$06,$1C,$02,$00,$E4
	db $05,$1C,$02,$00,$DC,$06,$1C,$02,$00,$D4,$05,$1C,$02,$00,$CC,$06
	db $1C,$02,$00,$C5,$06,$0D,$02,$00

DATA_0EF3EF:
	db $FC,$05,$1C,$02,$00,$F4,$06,$1C,$02,$00,$EC,$05,$1C,$02,$00,$E4
	db $06,$1C,$02,$00,$DC,$05,$1C,$02,$00,$D4,$06,$1C,$02,$00,$CC,$05
	db $1C,$02,$00,$C4,$06,$1C,$02,$00,$BD,$06,$0D,$02,$00

DATA_0EF41C:
	db $FC,$06,$1C,$02,$00,$F4,$06,$1C,$02,$00,$EC,$06,$1C,$02,$00,$E4
	db $06,$1C,$02,$00,$DC,$06,$1C,$02,$00,$D4,$06,$1C,$02,$00,$CC,$06
	db $1C,$02,$00,$C4,$06,$1C,$02,$00,$BC,$06,$1C,$02,$00,$B5,$06,$0D
	db $02,$00

DATA_0EF44E:
	db $B4,$06,$1C,$02,$00,$AD,$06,$0D,$02,$00,$FC,$06,$1C,$02,$00,$F4
	db $06,$1C,$02,$00,$EC,$06,$1C,$02,$00,$E4,$06,$1C,$02,$00,$DC,$06
	db $1C,$02,$00,$D4,$06,$1C,$02,$00,$CC,$06,$1C,$02,$00,$C4,$06,$1C
	db $02,$00,$BC,$06,$1C,$02,$00

DATA_0EF485:
	db $02,$FD,$0D,$02,$00

DATA_0EF48A:
	db $02,$FD,$0A,$02,$00,$03,$F6,$0D,$02,$00

DATA_0EF494:
	db $02,$FD,$0A,$42,$00,$00,$F5,$0A,$02,$00,$01,$EE,$0D,$02,$00

DATA_0EF4A3:
	db $00,$ED,$0A,$02,$00,$00,$FD,$0A,$02,$00,$02,$F5,$0A,$42,$00,$01
	db $E6,$0D,$02,$00

DATA_0EF4B7:
	db $00,$E5,$0A,$02,$00,$01,$DE,$0D,$02,$00,$02,$ED,$0A,$42,$00,$02
	db $FD,$0A,$42,$00,$00,$F5,$0A,$02,$00

DATA_0EF4D0:
	db $00,$DD,$0A,$02,$00,$01,$E5,$0A,$42,$00,$00,$ED,$0A,$02,$00,$00
	db $FD,$0A,$02,$00,$01,$F5,$0A,$42,$00,$01,$D6,$0D,$02,$00

DATA_0EF4EE:
	db $00,$D5,$0A,$02,$00,$01,$CE,$0D,$02,$00,$01,$DD,$0A,$42,$00,$00
	db $E5,$0A,$02,$00,$01,$ED,$0A,$42,$00,$01,$FD,$0A,$42,$00,$00,$F5
	db $0A,$02,$00

DATA_0EF511:
	db $02,$FD,$1D,$02,$00,$03,$F5,$1D,$02,$00,$02,$ED,$1D,$02,$00,$03
	db $E5,$1D,$02,$00,$02,$DD,$1D,$02,$00,$03,$D5,$1D,$02,$00,$02,$CD
	db $1D,$02,$00,$02,$C6,$0D,$02,$00

DATA_0EF539:
	db $00,$FD,$1D,$42,$00,$01,$F5,$1D,$42,$00,$00,$ED,$1D,$42,$00,$01
	db $E5,$1D,$42,$00,$00,$DD,$1D,$42,$00,$01,$D5,$1D,$42,$00,$00,$CD
	db $1D,$42,$00,$01,$C5,$1D,$42,$00,$01,$BE,$0D,$02,$00

DATA_0EF566:
	db $01,$FD,$1D,$42,$00,$01,$F5,$1D,$42,$00,$01,$ED,$1D,$42,$00,$01
	db $E5,$1D,$42,$00,$01,$DD,$1D,$42,$00,$01,$D5,$1D,$42,$00,$01,$CD
	db $1D,$42,$00,$01,$C5,$1D,$42,$00,$01,$BD,$1D,$42,$00,$01,$B6,$0D
	db $02,$00

DATA_0EF598:
	db $01,$FD,$1D,$42,$00,$01,$F5,$1D,$42,$00,$01,$ED,$1D,$42,$00,$01
	db $E5,$1D,$42,$00,$01,$DD,$1D,$42,$00,$01,$D5,$1D,$42,$00,$01,$CD
	db $1D,$42,$00,$01,$C5,$1D,$42,$00,$01,$BD,$1D,$42,$00,$01,$B5,$1D
	db $42,$00,$01,$AE,$0D,$02,$00

DATA_0EF5CF:
	db $B4,$06,$1C,$02,$00,$AD,$06,$0D,$02,$00,$FC,$06,$1C,$02,$00,$F4
	db $07,$1C,$02,$00,$EC,$07,$1C,$02,$00,$E4,$08,$1C,$02,$00,$DC,$08
	db $1C,$02,$00,$D4,$08,$1C,$02,$00,$CC,$08,$1C,$02,$00,$C4,$07,$1C
	db $02,$00,$BC,$07,$1C,$02,$00

DATA_0EF606:
	db $B4,$06,$1C,$02,$00,$AD,$06,$0D,$02,$00,$FC,$06,$1C,$02,$00,$F4
	db $05,$1C,$02,$00,$EC,$05,$1C,$02,$00,$E4,$04,$1C,$02,$00,$DC,$04
	db $1C,$02,$00,$D4,$04,$1C,$02,$00,$CC,$04,$1C,$02,$00,$C4,$05,$1C
	db $02,$00,$BC,$05,$1C,$02,$00

DATA_0EF63D:
	db $B4,$06,$1C,$02,$00,$AD,$06,$0D,$02,$00,$FC,$06,$1C,$02,$00,$F4
	db $06,$1C,$02,$00,$EC,$07,$1C,$02,$00,$E4,$07,$1C,$02,$00,$DC,$08
	db $1C,$02,$00,$D4,$08,$1C,$02,$00,$CC,$07,$1C,$02,$00,$C4,$07,$1C
	db $02,$00,$BC,$06,$1C,$02,$00

DATA_0EF674:
	db $B4,$06,$1C,$02,$00,$AD,$06,$0D,$02,$00,$FC,$06,$1C,$02,$00,$F4
	db $06,$1C,$02,$00,$EC,$05,$1C,$02,$00,$E4,$05,$1C,$02,$00,$DC,$04
	db $1C,$02,$00,$D4,$04,$1C,$02,$00,$CC,$05,$1C,$02,$00,$C4,$05,$1C
	db $02,$00,$BC,$06,$1C,$02,$00

DATA_0EF6AB:
	db $01,$FD,$1D,$42,$00,$02,$F5,$1D,$42,$00,$02,$ED,$1D,$42,$00,$03
	db $E5,$1D,$42,$00,$03,$DD,$1D,$42,$00,$03,$D5,$1D,$42,$00,$03,$CD
	db $1D,$42,$00,$02,$C5,$1D,$42,$00,$02,$BD,$1D,$42,$00,$01,$B5,$1D
	db $42,$00,$01,$AE,$0D,$02,$00

DATA_0EF6E2:
	db $01,$FD,$1D,$42,$00,$00,$F5,$1D,$42,$00,$00,$ED,$1D,$42,$00,$FF
	db $E5,$1D,$42,$00,$FF,$DD,$1D,$42,$00,$FF,$D5,$1D,$42,$00,$FF,$CD
	db $1D,$42,$00,$00,$C5,$1D,$42,$00,$00,$BD,$1D,$42,$00,$01,$B5,$1D
	db $42,$00,$01,$AE,$0D,$02,$00

DATA_0EF719:
	db $01,$FD,$1D,$42,$00,$01,$F5,$1D,$42,$00,$00,$ED,$1D,$42,$00,$00
	db $E5,$1D,$42,$00,$FF,$DD,$1D,$42,$00,$FF,$D5,$1D,$42,$00,$00,$CD
	db $1D,$42,$00,$00,$C5,$1D,$42,$00,$01,$BD,$1D,$42,$00,$01,$B5,$1D
	db $42,$00,$01,$AE,$0D,$02,$00

DATA_0EF750:
	db $01,$FD,$1D,$42,$00,$01,$F5,$1D,$42,$00,$02,$ED,$1D,$42,$00,$02
	db $E5,$1D,$42,$00,$03,$DD,$1D,$42,$00,$03,$D5,$1D,$42,$00,$02,$CD
	db $1D,$42,$00,$02,$C5,$1D,$42,$00,$01,$BD,$1D,$42,$00,$01,$B5,$1D
	db $42,$00,$01,$AE,$0D,$02,$00

DATA_0EF787:
	db $00,$00,$00,$02,$02,$00,$00,$00,$00,$00,$00,$00,$02,$00,$00,$00
	db $00

DATA_0EF798:
	dw $0000,$0000,$0000,DATA_0EF7BA,DATA_0EF7BA,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,DATA_0EF7C4,$0000,$0000,$0000
	dw $0000

DATA_0EF7BA:
	dw $0AFE,$4218,$FE00,$0802,$0042

DATA_0EF7C4:
	dw $09FE,$4218,$FE00,$0801,$0042

YI_NorSpr017_FrogPirate_StompRt:
;$0EF7CE
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState02_InCutscene
	BEQ.b CODE_0EF7DF
	LDA.w #$000C
	STA.w $6124
	JSR.w CODE_0EEB53
CODE_0EF7DF:
	JSL.l YI_NorSpr017_FrogPirate_Main
	LDA.w $7A96,x
	BNE.b CODE_0EF7FC
	LDA.w $105C
	CMP.w #$0100
	BCC.b CODE_0EF7F5
	JSL.l CODE_028925
	RTL

CODE_0EF7F5:
	ADC.w #$0002
	STA.w $105C
	RTL

CODE_0EF7FC:
	CMP.w #$0040
	BNE.b CODE_0EF81A
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.b $00
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	STA.b $02
	JSL.l CODE_02E19C
	LDA.w #!Define_YI_PlayerState1A_DisableInput
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	RTL

CODE_0EF81A:
	BCC.b CODE_0EF837
	LDY.b #$0F
	LDA.b $14
	BIT.w #$0004
	BEQ.b CODE_0EF833
	AND.w #$0003
	BNE.b CODE_0EF831
	LDA.w #!Define_YI_SoundID5E_FrogCroak
	JSL.l CODE_0085D2
CODE_0EF831:
	LDY.b #$10
CODE_0EF833:
	TYA
	STA.w $7402,x
CODE_0EF837:
	RTL

;---------------------------------------------------------------------------

DATA_0EF838:
	dw $FF00,$0100

YI_NorSpr0D9_FishinLakitu_Init:
;$0EF83C
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	CPY.b #!Define_YI_LevelID_DontLookBack
	BNE.b CODE_0EF847
	LDY.b #$02
	STY.b $78,x
CODE_0EF847:
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $7400,x
	LDA.w DATA_0EF838,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7400,x
	STZ.w $100D
	STZ.w $100B
	STZ.w $100F
	RTL

;---------------------------------------------------------------------------

DATA_0EF863:
	dw CODE_0EFD11
	dw CODE_0EFD37
	dw CODE_0EFDC7
	dw CODE_0EFE57
	dw CODE_0EFE7B
	dw CODE_0EFE7F

YI_NorSpr0D9_FishinLakitu_Main:
;$0EF86F
	JSR.w CODE_0EF9FE
	JSR.w CODE_0EF98E
	JSL.l CODE_03AF23
	JSR.w CODE_0EFBC0
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0EF863,x)
	JSR.w CODE_0EFC6F
	JSR.w CODE_0EFCD5
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0300
	CMP.w #$0600
	BCC.b CODE_0EF8A4
	LDA.w #$0300
	LDY.w $7221,x
	BPL.b CODE_0EF8A1
	LDA.w #$FD00
CODE_0EF8A1:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0EF8A4:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0300
	CMP.w #$0600
	BCC.b CODE_0EF8BE
	LDA.w #$0300
	LDY.w $7223,x
	BPL.b CODE_0EF8BB
	LDA.w #$FD00
CODE_0EF8BB:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0EF8BE:
	JSR.w CODE_0EFAF6
	JSR.w CODE_0EFB1F
	JSR.w CODE_0EFA93
	RTL

DATA_0EF8C8:
	db $FD,$FA,$04,$02,$02,$03,$F3,$0D,$02,$00,$FC,$04,$08,$04,$02,$04
	db $04,$08,$44,$02,$09,$FD,$1D,$00,$00,$FD,$FA,$04,$02,$02,$04,$F3
	db $0D,$02,$00,$FC,$04,$08,$04,$02,$04,$04,$08,$44,$02,$09,$FD,$1D
	db $00,$00,$01,$F5,$02,$02,$02,$08,$F0,$0D,$02,$00,$FC,$04,$08,$04
	db $02,$04,$04,$08,$44,$02,$0A,$FD,$1D,$00,$00,$FD,$FA,$04,$02,$02
	db $FC,$04,$08,$04,$02,$04,$04,$08,$44,$02,$04,$F3,$0D,$02,$00,$09
	db $FE,$1D,$00,$00,$FE,$F5,$02,$02,$02,$05,$F0,$0D,$02,$00,$FC,$04
	db $08,$04,$02,$04,$04,$08,$44,$02,$0A,$FD,$1D,$00,$00,$FE,$F7,$02
	db $02,$02,$05,$F2,$0D,$02,$00,$FC,$04,$08,$04,$02,$04,$04,$08,$44
	db $02,$0A,$FD,$1D,$00,$00,$FF,$FB,$02,$02,$02,$02,$F5,$0D,$42,$00
	db $02,$F5,$0D,$42,$00,$02,$F5,$0D,$42,$00,$01,$00,$06,$02,$02

DATA_0EF977:
	dw $FF00,$0100

CODE_0EF97B:
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7CD8,x
	STA.b $02
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_03B56E
	BRA.b CODE_0EF9C6

CODE_0EF98E:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0EF9F9
	LDA.w #$011C
	JSL.l CODE_03A364
	BCC.b CODE_0EF9F9
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0008
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	TYA
	INC
	STA.w $6162
	LDA.w $7040,x
	AND.w #$FFF3
	STA.w $7040,x
	TXA
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	STY.b $18,x
CODE_0EF9C6:
	JSR.w CODE_0ECCC7
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0006
	STA.w $7402,x
	LDA.w #$FFFF
	STA.w $7AF8,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EF9F0
	INY
	INY
CODE_0EF9F0:
	LDA.w DATA_0EF977,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
CODE_0EF9F9:
	RTS

DATA_0EF9FA:
	dw $0003,$0002

CODE_0EF9FE:
	STZ.b $0C
	STZ.b $0E
	LDA.w $7362,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	BMI.b CODE_0EF9F9
	LDY.w $74A2,x
	BMI.b CODE_0EF9F9
	LDY.w $7402,x
	CPY.b #$03
	BPL.b CODE_0EFA59
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w $100B
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0EF9FA,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.w $1010
	TYA
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_0B95E6>>16
	LDA.w #FXCODE_0B95E6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEC
	SBC.w $7680,x
	STA.b $0C
	CLC
	ADC.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	STA.b $08
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	SEC
	SBC.w $7682,x
	STA.b $0E
	CLC
	ADC.w #$0008
	STA.b $0A
CODE_0EFA59:
	TXA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #DATA_0EF8C8>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0EF8C8
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w $7680,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7682,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7400,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0005
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w $7402,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_08A16C>>16
	LDA.w #FXCODE_08A16C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	RTS

CODE_0EFA93:
	LDY.w $7D36,x
	BPL.b CODE_0EFAF5
	LDA.w $7C18,x
	SEC
	SBC.w $7BB8,x
	SEC
	SBC.w $6122
	CMP.w #$FFF8
	BCC.b CODE_0EFAEB
	LDY.w $60AB
	BMI.b CODE_0EFAF5
	LDY.w $60C0
	BEQ.b CODE_0EFAF5
	LDA.w $60FC
	AND.w #$0018
	BNE.b CODE_0EFAC6
	LDA.w #$FC00
	STA.w $60AA
	LDA.w #$0006
	STA.w $60C0
CODE_0EFAC6:
	LDA.w #$011C
	JSL.l CODE_03A34C
	BCC.b CODE_0EFAF5
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0004
	STA.w $7182,y
	TXA
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	STY.b $18,x
	JSR.w CODE_0EF9C6
	PLA
	RTL

CODE_0EFAEB:
	PLA
	STA.b $00
	JSL.l CODE_03A5B7
	LDA.b $00
	PHA
CODE_0EFAF5:
	RTS

CODE_0EFAF6:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0EFAF5
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0EFAF5
	LDA.w $7D38,y
	BEQ.b CODE_0EFAF5
	TYX
	JSL.l CODE_03B24B
	JSR.w CODE_0EF97B
	PLA
	RTL

DATA_0EFB13:
	dw $FFF4,$FFFA,$FFFD

DATA_0EFB19:
	dw $FFF0,$FFEA,$FFE8

CODE_0EFB1F:
	LDA.w $7AF8,x
	BNE.b CODE_0EFAF5
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BNE.b CODE_0EFB65
	LDA.w $7CD6
	SEC
	SBC.w $7CD6,x
	SEC
	SBC.b $0C
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_0EFB64
	LDA.w $7CD8
	SEC
	SBC.w $7CD8,x
	SEC
	SBC.b $0E
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_0EFB64
	JSR.w CODE_0ED3C4
	BCS.b CODE_0EFB64
	LDA.w #$FEC0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7402,x
	LDY.b #$02
	STY.b $76,x
CODE_0EFB64:
	RTS

CODE_0EFB65:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	CMP.w #$0010
	BEQ.b CODE_0EFB79
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	BEQ.b CODE_0EFB76
	CPX.b $18
	BEQ.b CODE_0EFB79
CODE_0EFB76:
	JMP.w CODE_0ECCC7

CODE_0EFB79:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	LDA.b $0C
	ORA.b $0E
	BNE.b CODE_0EFBA7
	LDA.w $7402,x
	SEC
	SBC.w #$0003
	ASL
	TAY
	LDA.w DATA_0EFB19,y
	CLC
	ADC.w $7182,x
	STA.w $7182
	LDA.w DATA_0EFB13,y
	LDY.w $7400,x
	BEQ.b CODE_0EFBA1
	EOR.w #$FFFF
	INC
CODE_0EFBA1:
	CLC
	ADC.w $70E2,x
	BRA.b CODE_0EFBB6

CODE_0EFBA7:
	LDA.w $7182,x
	CLC
	ADC.b $0A
	STA.w $7182
	LDA.w $70E2,x
	CLC
	ADC.b $08
CODE_0EFBB6:
	STA.w $70E2
	LDY.w $7400,x
	STY.w $7400
	RTS

CODE_0EFBC0:
	LDA.w $70E2,x
	SEC
	SBC.w $7E18
	BMI.b CODE_0EFBD6
	LDA.w $70E2,x
	SEC
	SBC.w #$0100
	SEC
	SBC.w $7E1A
	BMI.b CODE_0EFBDD
CODE_0EFBD6:
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0EFC0C
	BRA.b CODE_0EFBEE

CODE_0EFBDD:
	LDA.w $7860,x
	BIT.w #$000C
	BEQ.b CODE_0EFC0C
	AND.w #$0008
	DEC
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0EFC0C
CODE_0EFBEE:
	LDA.w $75E0,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	SEC
	SBC.w $72C0,x
	STA.w $70E2,x
CODE_0EFC0C:
	LDA.w $7182,x
	SEC
	SBC.w $7E1C
	BMI.b CODE_0EFC22
	LDA.w $7182,x
	SEC
	SBC.w #$0100
	SEC
	SBC.w $7E1E
	BMI.b CODE_0EFC27
CODE_0EFC22:
	EOR.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0EFC56
CODE_0EFC27:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	CLC
	ADC.w #$0014
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0002
	BNE.b CODE_0EFC56
	LDA.w $7860,x
	AND.w #$0002
	BEQ.b CODE_0EFC6A
CODE_0EFC56:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	SEC
	SBC.w $72C2,x
	STA.w $7182,x
CODE_0EFC6A:
	RTS

DATA_0EFC6B:
	dw $0010,$0014

CODE_0EFC6F:
	LDA.w $100F
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BPL.b CODE_0EFC7B
	LDA.w #$0000
CODE_0EFC7B:
	CMP.w #$4001
	BPL.b CODE_0EFC83
	STA.w $100F
CODE_0EFC83:
	LDA.w $100F
	CLC
	ADC.w #$0700
	AND.w #$F800
	CLC
	ADC.w #$3802
	STA.w $7040,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w $100B
	BPL.b CODE_0EFCC6
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEC
	SBC.w $100D
	BEQ.b CODE_0EFCD4
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0EFC6B,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w $100D
	STA.w $100D
CODE_0EFCC6:
	LDA.w $100D
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w $100B
	STA.w $100B
CODE_0EFCD4:
	RTS

CODE_0EFCD5:
	LDA.w $0CEE
	BNE.b CODE_0EFD10
	LDA.w #!Define_YI_AmbSpr1F8
	JSL.l CODE_008B21
	LDA.w #$0002
	STA.w $73C2,y
	LDA.b $10
	AND.w #$0003
	SEC
	SBC.w #$000A
	CLC
	ADC.w $7CD6,x
	STA.w $70A2,y
	LDA.b $10
	AND.w #$0007
	SEC
	SBC.w #$000C
	CLC
	ADC.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0008
	STA.w $7782,y
	STA.w $0CEE
CODE_0EFD10:
	RTS

CODE_0EFD11:
	TYX
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_0EFD2A
	LDA.w #$0200
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0EFD2A:
	RTS

DATA_0EFD2B:
	dw $0040,$0080,$0020,$0040,$FFE0,$FFD0

CODE_0EFD37:
	TYX
	LDY.w $77C2,x
	TYA
	STA.w $7400,x
	LDA.w $7CD6
	SEC
	SBC.w $7CD6,x
	SEC
	SBC.b $0C
	PHP
	BPL.b CODE_0EFD50
	EOR.w #$FFFF
	INC
CODE_0EFD50:
	LSR
	CMP.w #$0018
	BMI.b CODE_0EFD59
	LDA.w #$0018
CODE_0EFD59:
	CLC
	ADC.w #$0018
	STA.w $7540,x
	ASL
	ASL
	ASL
	PLP
	BPL.b CODE_0EFD6A
	EOR.w #$FFFF
	INC
CODE_0EFD6A:
	STA.w $75E0,x
	LDA.w $7CD8
	SEC
	SBC.w $7CD8,x
	SEC
	SBC.b $0E
	SEC
	SBC.w #$0010
	PHP
	BPL.b CODE_0EFD82
	EOR.w #$FFFF
	INC
CODE_0EFD82:
	LSR
	CMP.w #$0018
	BMI.b CODE_0EFD8B
	LDA.w #$0018
CODE_0EFD8B:
	CLC
	ADC.w #$0018
	PLP
	BPL.b CODE_0EFD96
	EOR.w #$FFFF
	INC
CODE_0EFD96:
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A98,x
	BNE.b CODE_0EFDB1
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0EFDB1:
	LDA.w $7AF6,x
	BNE.b CODE_0EFDC6
	LDA.w #$0050
	STA.w $7AF6,x
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_0EFDC6:
	RTS

CODE_0EFDC7:
	TYX
	LDA.w $100F
	BNE.b CODE_0EFDDD
	INC.w $7402,x
	LDA.w #$0002
	STA.b $16,x
	LDA.w #$0008
	STA.w $7A98,x
	INC.b $76,x
CODE_0EFDDD:
	JSR.w CODE_0EFDE8
	INX
	INX
	JSR.w CODE_0EFDE8
	LDX.b $12
	RTS

CODE_0EFDE8:
	LDA.w $7C16,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_0EFE27
	PHX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	PHP
	BPL.b CODE_0EFE02
	EOR.w #$FFFF
	INC
CODE_0EFE02:
	REP.b #$10
	ASL
	TAX
	LDA.l $702200,x
	PLP
	BPL.b CODE_0EFE11
	EOR.w #$FFFF
	INC
CODE_0EFE11:
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEP.b #$10
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0EFE40

CODE_0EFE27:
	CLC
	ADC.w #$0020
	CMP.w #$00A0
	BCC.b CODE_0EFE54
	LDA.w #$FD00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHX
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0EFE40:
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $75E0,x
	BPL.b CODE_0EFE4D
	EOR.w #$FFFF
	INC
CODE_0EFE4D:
	LSR
	LSR
	LSR
	LSR
	STA.w $7540,x
CODE_0EFE54:
	RTS

DATA_0EFE55:
	db $10,$20

CODE_0EFE57:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0EFE78
	DEC.b $16,x
	BPL.b CODE_0EFE6A
	LDY.b $78,x
	BEQ.b CODE_0EFE67
	INC.b $76,x
CODE_0EFE67:
	INC.b $76,x
CODE_0EFE69:
	RTS

CODE_0EFE6A:
	LDY.b $16,x
	LDA.w DATA_0EFE55,y
	AND.w #$00FF
	STA.w $7A98,x
	INC.w $7402,x
CODE_0EFE78:
	JMP.w CODE_0EFDDD

CODE_0EFE7B:
	TYX
	JMP.w CODE_0EFDDD

CODE_0EFE7F:
	TYX
	LDA.w $7AF8,x
	BNE.b CODE_0EFE69
	LDA.w $6094
	CLC
	ADC.w #$00A0
	STA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.b $00
	LDA.w $609C
	SEC
	SBC.w #$0020
	STA.w $7182,x
	CLC
	ADC.w #$0008
	STA.b $02
	JSL.l CODE_0EFF63
	BMI.b CODE_0EFF1F
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $02
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BNE.b CODE_0EFF1F
	LDA.b $00
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $02
	SEC
	SBC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BNE.b CODE_0EFF1F
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w #$3802
	STA.w $7040,x
	LDA.w #$0100
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	LDA.w DATA_0EF838
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7400,x
	STZ.w $7402,x
	STZ.w $100D
	STZ.w $100B
	STZ.w $100F
	STZ.b $76,x
CODE_0EFF1F:
	RTS

YI_NorSpr0D9_FishinLakitu_StompRt:
;$0EFF20
	JSR.w CODE_0EF9FE
	JSL.l CODE_03A2C7
	BCC.b CODE_0EFF62
	LDY.b $18,x
	BEQ.b CODE_0EFF3D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0EFF3D
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr11C_LakituCloud
	BEQ.b CODE_0EFF62
CODE_0EFF3D:
	LDA.w $7AF8,x
	CMP.w #$FF00
	BCS.b CODE_0EFF62
	AND.w #$FF00
	BEQ.b CODE_0EFF50
	LDA.w #$0040
	STA.w $7AF8,x
CODE_0EFF50:
	STZ.b $18,x
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDY.b #$05
	STY.b $76,x
CODE_0EFF62:
	RTL

CODE_0EFF63:
	PHX
	REP.b #$10
	LDA.b $02
	AND.w #$FF00
	LSR
	LSR
	LSR
	LSR
	STA.b $04
	LDA.b $00
	AND.w #$FF00
	XBA
	ORA.b $04
	TAX
	LDA.w $6CAA,x
	SEP.b #$10
	PLX
	TAY
	RTL

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($0EFF82, incbin, DATA_0EFF82_YI_U2.bin)
else
	%FREE_BYTES($0EFF82, 126, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank0FMacros(StartBank, EndBank)
%BANK_START(<StartBank>)

;---------------------------------------------------------------------------

YI_NorSpr00E_GOALLetters_Init:
;$0F8000
	LDY.b #$05
	STY.b $18,x
	LDX.b #$1C
CODE_0F8006:
	LDA.l DATA_5FCC10,x
	STA.l $702ECE,x
	STA.l YI_Global_PaletteMirror[$B1].LowByte,x
	DEX
	DEX
	BPL.b CODE_0F8006
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

YI_NorSpr00E_GOALLetters_Main:
;$0F8019
	LDY.w $74A2,x
	BMI.b CODE_0F805B
	LDA.w #$00E0
	STA.w $7680,x
	CLC
	ADC.w !RAM_YI_Global_Layer1XPosLo
	STA.w $70E2,x
	LDA.w #$0020
	STA.w $7682,x
	CLC
	ADC.w !RAM_YI_Global_Layer1YPosLo
	STA.w $7182,x
	LDY.b $18,x
	TYA
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDY.b $19,x
	TYA
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $76,x
	TYA
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDY.b $77,x
	TYA
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_09ACDA>>16
	LDA.w #FXCODE_09ACDA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0F805B:
	LDY.b $16,x
	TYX
	JMP.w (DATA_0F8061,x)

DATA_0F8061:
	dw CODE_0F8069
	dw CODE_0F8082
	dw CODE_0F80A0
	dw CODE_0F80CD

CODE_0F8069:
	LDX.b $12
	SEP.b #$20
	LDA.b $19,x
	CLC
	ADC.b #$08
	STA.b $19,X
	TAY
	REP.b #$20
	CPY.b #$A0
	BCC.b CODE_0F8081
CODE_0F807B:
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_0F8081:
	RTL

CODE_0F8082:
	LDX.b $12
	SEP.b #$20
	LDA.b $19,x
	SEC
	SBC.b #$04
	STA.b $19,x
	TAY
	REP.b #$20
	CPY.b #$80
	BCS.b CODE_0F8081
	LDY.b #$80
	STY.b $19,x
	LDA.w #$0040
	STA.w $7A96,x
	BRA.b CODE_0F807B

CODE_0F80A0:
	LDX.b $12
	LDA.w !RAM_YI_Level_DoBonusChallengeFlagLo
	BNE.b CODE_0F807B
	LDA.w $7A96,x
	BNE.b CODE_0F80C2
	LDY.b $77,x
	INY
	CPY.b #$40
	BCC.b CODE_0F80B5
	LDY.b #$40
CODE_0F80B5:
	STY.b $77,x
	SEP.b #$20
	LDA.b $76,x
	CLC
	ADC.b #$04
	STA.b $76,x
	REP.b #$20
CODE_0F80C2:
	RTL

DATA_0F80C3:
	dw $0008,$0014,$0014,$0014,$0014

CODE_0F80CD:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F8134
	LDY.b $18,x
	DEY
	BPL.b CODE_0F80DD
	JML.l CODE_03A31E

CODE_0F80DD:
	STY.b $18,x
	TYX
	SEP.b #$20
	LDA.b #$00
	XBA
	LDA.l FXDATA_09AD61,x
	PHA
	TXA
	ASL
	TAX
	PLA
	REP.b #$20
	SEC
	SBC.w DATA_0F80C3,x
	STA.b $00
	LDX.b $12
	LDA.w !RAM_YI_Level_DoBonusChallengeFlagLo
	BMI.b CODE_0F8104
	LDA.w #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
CODE_0F8104:
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	SEC
	SBC.b $00
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0008
	STA.w $7A96,x
CODE_0F8134:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr00F_BonusChallengeSign_Init:
;$0F8135
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.b $78,x
	CLC
	ADC.w #$0080
	STA.w $70E2,x
	STA.w $7A36,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0040
	STA.w $7182,x
	LDY.b #$02
	STY.b $18,x
	LDX.b #$1C
CODE_0F8154:
	LDA.l DATA_5FCBF2,x
	STA.l $702F2E,x
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	DEX
	DEX
	BPL.b CODE_0F8154
	LDX.b $12
	LDA.w #!Define_YI_SoundID95_BonusChallenge
	JSL.l CODE_0085D2
	RTL

;---------------------------------------------------------------------------

DATA_0F816E:
	dw $0000,$FE00,$FC00

YI_NorSpr00F_BonusChallengeSign_Main:
;$0F8174
	LDY.w $74A2,x
	BMI.b CODE_0F8196
	LDA.w #DATA_0F8276>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_0F8276
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$002E
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_09AE83>>16
	LDA.w #FXCODE_09AE83
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
CODE_0F8196:
	JSR.w CODE_0F822B
	LDY.b $16,x
	TYX
	JMP.w (DATA_0F819F,x)

DATA_0F819F:
	dw CODE_0F81AF
	dw CODE_0F81AF
	dw CODE_0F81CA
	dw CODE_0F81E4

DATA_0F81A7:
	dw $0021,$0022

DATA_0F81AB:
	dw $D000,$D400

CODE_0F81AF:
	REP.b #$10
	LDA.w DATA_0F81AB,x
	STA.w $0CF9
	LDA.w DATA_0F81A7,x
	JSL.l CODE_00B753
	SEP.b #$10
	LDX.b $12
	LDA.w #$0020
	STA.w $7A96,x
	BRA.b CODE_0F81DD

CODE_0F81CA:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F81E3
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0800
	STA.w $75E2,x
CODE_0F81DD:
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
CODE_0F81E3:
	RTL

CODE_0F81E4:
	LDX.b $12
	LDA.b $78,x
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w $7A36,x
	STA.w $70E2,x
	LDA.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w #$0050
	CMP.w $7182,x
	BPL.b CODE_0F8210
	STA.w $7182,x
	LDY.b $18,x
	LDA.w DATA_0F816E,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	DEY
	DEY
	BMI.b CODE_0F8210
	STY.b $18,x
CODE_0F8210:
	RTL

DATA_0F8211:
	dw $44A6,$48C7,$4CE8,$5109

DATA_0F8219:
	dw $001F,$023F,$037F,$03F3,$0327,$7F20,$7E66,$7D77
	dw $7C1F

CODE_0F822B:
	LDA.b $14
	AND.w #$0007
	BNE.b CODE_0F8273
	LDY.b $76,x
	INY
	INY
	CPY.b #$12
	BNE.b CODE_0F823C
	LDY.b #$00
CODE_0F823C:
	STY.b $76,x
	LDX.b #$10
CODE_0F8240:
	LDA.w DATA_0F8219,y
	STA.l YI_Global_PaletteMirror[$E3].LowByte,x
	INY
	INY
	CPY.b #$12
	BNE.b CODE_0F824F
	LDY.b #$00
CODE_0F824F:
	DEX
	DEX
	BPL.b CODE_0F8240
	LDX.b $12
	LDY.b $77,x
	INY
	INY
	STY.b $77,x
	TYA
	AND.w #$0006
	TAY
	LDX.b #$06
CODE_0F8262:
	LDA.w DATA_0F8211,y
	STA.l YI_Global_PaletteMirror[$EC].LowByte,x
	DEY
	DEY
	BPL.b CODE_0F826F
	LDY.b #$06
CODE_0F826F:
	DEX
	DEX
	BPL.b CODE_0F8262
CODE_0F8273:
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_0F8276:
	dw $24E8,$3D0A,$2000,$0B14,$003D,$1428,$3D0C,$3000
	dw $600C,$027D,$1C18,$3D50,$0800,$0D14,$003D,$1418
	dw $3D0F,$1000,$0E14,$003D,$DCF8,$3D4E,$0800,$4EDC
	dw $007D,$D400,$3D10,$0000,$4FDC,$003D,$E410,$7D05
	dw $2800,$1CEC,$023D,$E428,$7D01,$1802,$1AEC,$023D
	dw $E418,$7D03,$1002,$19EC,$003D,$E400,$3D07,$0802
	dw $28F4,$023D,$0430,$3D4D,$B800,$5EF4,$003D,$F4C0
	dw $3D5F,$0000,$6714,$003D,$04C8,$3D40,$3800,$1EEC
	dw $023D,$14F0,$3D65,$2002,$4B04,$023D,$0410,$3D49
	dw $0002,$4704,$023D,$04F0,$3D45,$E002,$4304,$023D
	dw $04D0,$3D41,$F002,$05E4,$023D,$E4E0,$3D03,$D002
	dw $01E4,$023D,$14E8,$3D64,$D802,$6214,$023D,$14C8
	dw $3D60,$3802,$2EF4,$023D,$F428,$3D2C,$1802,$2AF4
	dw $023D,$F4F8,$3D26,$E802,$24F4,$023D,$F4D8,$3D22
	dw $C802,$20F4,$023D

DATA_0F835C:
	dw $0200,$0400,$0800,$0200,$0400,$0800,$0200,$0400

DATA_0F836C:
	dw $FFC0,$0040

YI_NorSpr181_CrazeeDayzee_Init:
;$0F8370
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0F839B
	LDA.w $70E2,x
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC
	BNE.b CODE_0F8395
	LDA.b $10
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_0F835C,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	BRA.b CODE_0F839B

CODE_0F8395:
	LDA.w #$0800
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_0F839B:
	JMP.w CODE_0F84AE

;---------------------------------------------------------------------------

YI_NorSpr181_CrazeeDayzee_Main:
;$0F839E
	JSR.w CODE_0F858F
	LDA.w $6FA0,x
	LDY.w $7D38,x
	BNE.b CODE_0F83AE
	AND.w #$FDFF
	BRA.b CODE_0F83B1

CODE_0F83AE:
	ORA.w #$0200
CODE_0F83B1:
	STA.w $6FA0,x
	JSL.l CODE_03AF23
	JSL.l CODE_03A5B7
	JSR.w CODE_0F85CB
	LDA.b $16,x
	TAX
	JMP.w (DATA_0F83C5,x)

DATA_0F83C5:
	dw CODE_0F83E3
	dw CODE_0F8487
	dw CODE_0F84DB

DATA_0F83CB:
	db $01,$02,$03,$04,$05,$06,$05,$04,$03,$02,$01,$00

DATA_0F83D7:
	db $04,$04,$04,$04,$04,$08,$04,$04,$04,$04,$04,$08

CODE_0F83E3:
	LDX.b $12
	LDA.w $7A98,x
	BNE.b CODE_0F83F3
	LDA.w #$0020
	STA.w $7A98,x
	JSR.w CODE_0F85FC
CODE_0F83F3:
	LDA.w $7860,x
	BIT.w #$000C
	BNE.b CODE_0F8432
	BIT.w #$0001
	BEQ.b CODE_0F8432
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC
	BEQ.b CODE_0F8412
	LDA.w $7AF6,x
	BNE.b CODE_0F8412
	LDA.b $10
	AND.w #$003F
	BEQ.b CODE_0F8450
CODE_0F8412:
	LDA.w $7A96,x
	BNE.b CODE_0F8431
	SEP.b #$20
	DEC.b $18,x
	BPL.b CODE_0F8421
	LDA.b #$0B
	STA.b $18,x
CODE_0F8421:
	LDY.b $18,x
	LDA.w DATA_0F83CB,y
	STA.w $7402,x
	LDA.w DATA_0F83D7,y
	STA.w $7A96,x
	REP.b #$20
CODE_0F8431:
	RTL

CODE_0F8432:
	LDA.w #$0007
	STA.b $18,x
	SEP.b #$20
	TAY
	LDA.w DATA_0F846F,y
	STA.w $7402,x
	LDA.w DATA_0F8477,y
	STA.w $7A96,x
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $16,x
	INC.b $16,x
	RTL

CODE_0F8450:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7A98,x
	SEP.b #$20
	LDY.b #$02
	STY.b $18,x
	LDA.w DATA_0F84D2,y
	STA.w $7402,x
	LDA.w DATA_0F84D5,y
	STA.w $7A96,x
	LDA.b #$04
	STA.b $16,x
	REP.b #$20
	RTL

DATA_0F846F:
	db $07,$07,$07,$07,$08,$07,$08,$07

DATA_0F8477:
	db $10,$10,$10,$10,$04,$04,$04,$04

DATA_0F847F:
	db $02,$02,$02,$00,$00,$00,$00,$00

CODE_0F8487:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F84AD
	DEC.b $18,x
	BMI.b CODE_0F84AE
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_0F846F,y
	STA.w $7402,x
	LDA.w DATA_0F8477,y
	STA.w $7A96,x
	LDA.w $7400,x
	EOR.w DATA_0F847F,y
	STA.w $7400,x
	REP.b #$20
CODE_0F84AD:
	RTL

CODE_0F84AE:
	LDY.w $7400,x
	LDA.w DATA_0F836C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7A98,x
	SEP.b #$20
	LDA.b #$0B
	STA.b $18,x
	TAY
	LDA.w DATA_0F83CB,y
	STA.w $7402,x
	LDA.w DATA_0F83D7,y
	STA.w $7A96,x
	REP.b #$20
	STZ.b $16,x
	RTL

DATA_0F84D2:
	db $09,$08,$07

DATA_0F84D5:
	db $20,$20,$08

DATA_0F84D8:
	db $00,$01,$00

CODE_0F84DB:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F8504
	LDY.b $18,x
	DEY
	BMI.b CODE_0F8511
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_0F84D2,y
	STA.w $7402,x
	LDA.w DATA_0F84D5,y
	STA.w $7A96,x
	LDA.w DATA_0F84D8,y
	BEQ.b CODE_0F8502
	LDA.w $77C2,x
	STA.w $7400,x
CODE_0F8502:
	REP.b #$20
CODE_0F8504:
	LDY.b $18,x
	BNE.b CODE_0F8510
	LDA.w $7A98,x
	BNE.b CODE_0F8510
	JSR.w CODE_0F8521
CODE_0F8510:
	RTL

CODE_0F8511:
	LDA.w #$0020
	STA.w $7AF6,x
	BRA.b CODE_0F84AE

DATA_0F8519:
	dw $FD00,$0300

DATA_0F851D:
	dw $FFE8,$0008

CODE_0F8521:
	LDY.w $7400,x
	LDA.w DATA_0F8519,y
	STA.b $00
	LDA.w DATA_0F851D,y
	STA.b $02
	LDA.w #$0019
	JSL.l CODE_03A34C
	BCC.b CODE_0F8566
	LDA.w $7CD6,x
	CLC
	ADC.b $02
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$000A
	STA.w $7A98,y
	LDA.w #$0004
	STA.w $7402,y
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w $6FA0,y
	AND.w #$F9FF
	STA.w $6FA0,y
CODE_0F8566:
	RTS

DATA_0F8567:
	dw $0010,$0018,$0010,$0018,$0010,$0018,$0010,$0018
	dw $0010,$0018,$0018,$0020,$0018,$0020,$0008,$0010
	dw $0000,$0010,$0000,$0010

CODE_0F858F:
	LDA.w $7402,x
	ASL
	ASL
	TAY
	LDA.w DATA_0F8567,y
	STA.b $00
	LDA.w DATA_0F8567+$02,y
	STA.b $02
	LDY.w $74A2,x
	BMI.b CODE_0F85CA
	REP.b #$10
	LDA.w $7362,x
	BMI.b CODE_0F85C8
	CLC
	ADC.b $00
	TAY
	LDA.w $6004,y
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $6004,y
	LDA.w $7362,x
	CLC
	ADC.b $02
	TAY
	LDA.w $6004,y
	ORA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $6004,y
CODE_0F85C8:
	SEP.b #$10
CODE_0F85CA:
	RTS

CODE_0F85CB:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0F85F7
	BEQ.b CODE_0F85F7
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0F85F7
	LDA.w $7D38,y
	BEQ.b CODE_0F85F7
	LDA.w $7542,y
	CMP.w #$0040
	BCC.b CODE_0F85EF
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_0F85EF:
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	PLA
	RTL

CODE_0F85F7:
	RTS

DATA_0F85F8:
	dw $0060,$FFA0

CODE_0F85FC:
	LDY.w $7400,x
	LDA.w DATA_0F85F8,y
	STA.b $00
	LDA.w #!Define_YI_AmbSpr212
	JSL.l CODE_008B21
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.w $7142,y
	STA.w $7E4C,y
	LDA.b $00
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0008
	STA.w $7502,y
	LDA.w #$0040
	STA.w $7782,y
	RTS

YI_NorSpr181_CrazeeDayzee_StompRt:
;$0F8636
	LDA.w #!Define_YI_SoundID39_PiranhaPlantMunch			; Note: This sound doesn't play. It gets overwritten by a different sound.
	JSL.l CODE_0085D2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	XBA
	STA.b $00
	JSL.l CODE_07FD68
	JML.l CODE_03A32E

;---------------------------------------------------------------------------

YI_NorSpr041_Stork_Init:
;$0F864B
	STZ.w $7400,x
	RTL

;---------------------------------------------------------------------------

DATA_0F864F:
	db $02,$00,$02,$00,$02,$00

DATA_0F8655:
	db $20,$04,$04,$08,$10,$30

DATA_0F865B:
	db $02,$03,$02,$01

YI_NorSpr041_Stork_Main:
;$0F865F
	JSL.l CODE_03AF23
	LDY.b $16,x
	TYX
	JMP.w (DATA_0F8669,x)

DATA_0F8669:
	dw CODE_0F866F
	dw CODE_0F869A
	dw CODE_0F86C1

CODE_0F866F:
	LDX.b $12
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_0F8699
	SEP.b #$20
	LDY.b #$05
	STY.b $18,x
	LDA.w DATA_0F864F,y
	STA.w $7402,x
	LDA.w DATA_0F8655,y
	STA.w $7A96,x
	INC.b $16,x
	INC.b $16,x
	REP.b #$20
CODE_0F8699:
	RTL

CODE_0F869A:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F86B8
	LDY.b $18,x
	DEY
	BMI.b CODE_0F86B9
CODE_0F86A6:
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_0F864F,y
	STA.w $7402,x
	LDA.w DATA_0F8655,y
	STA.w $7A96,x
	REP.b #$20
CODE_0F86B8:
	RTL

CODE_0F86B9:
	LDY.b $16,x
	INY
	INY
	STY.b $16,x
	BRA.b CODE_0F86CD

CODE_0F86C1:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F86E0
	LDY.b $18,x
	DEY
	BPL.b CODE_0F86CF
CODE_0F86CD:
	LDY.b #$03
CODE_0F86CF:
	STY.b $18,x
	SEP.b #$20
	LDA.w DATA_0F865B,y
	STA.w $7402,x
	LDA.b #$04
	STA.w $7A96,x
	REP.b #$20
CODE_0F86E0:
	RTL

;---------------------------------------------------------------------------

DATA_0F86E1:
	db $00,$00,$40,$80,$C0

DATA_0F86E6:
	db $00,$00,$01,$02,$03

YI_NorSpr01F_RotatingDoors_Init:
;$0F86EB
	CPX.b #$04
	BEQ.b CODE_0F8710
	LDA.w #!Define_YI_NorSpr01F_RotatingDoors
	LDY.b #$04
	JSL.l CODE_03A366
	BCC.b CODE_0F870C
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
CODE_0F870C:
	JML.l CODE_03A31E

CODE_0F8710:
	JSL.l CODE_03AE60
	STZ.w $7400,x
	LDA.w #$0000
	STA.b $76,x
	JSR.w CODE_0F8788
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A2,x
	REP.b #$20
	STZ.w $105C
	STZ.w $105E
	STZ.w $1060
	STZ.w $1062
	STZ.w $1064
	LDA.w #$0008
	STA.b $00
CODE_0F873C:
	LDA.w #$001F
	JSL.l CODE_03A364
	BCC.b CODE_0F877D
	LDA.w $7722,x
	STA.w $7722,y
	LDA.w $70E2,x
	STA.w $7A36,y
	LDA.w $7182,x
	STA.w $7A38,y
	SEP.b #$20
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LSR
	PHX
	TAX
	LDA.w DATA_0F86E1,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w DATA_0F86E6,x
	STA.w $7402,y
	PLX
	REP.b #$20
	PHX
	TYX
	JSR.w CODE_0F88A4
	PLX
	DEC.b $00
	DEC.b $00
	BNE.b CODE_0F873C
CODE_0F877C:
	RTL

CODE_0F877D:
	LDA.b $00
	CMP.w #$0008
	BNE.b CODE_0F877C
	JSL.l CODE_03A31E
CODE_0F8788:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0F8796
	LDA.w $7722,x
	BMI.b CODE_0F8796
	JSL.l CODE_02A185
CODE_0F8796:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr01F_RotatingDoors_Main:
;$0F8797
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYX
	JMP.w (DATA_0F879E,x)

DATA_0F879E:
	dw CODE_0F87A8
	dw CODE_0F87D7
	dw CODE_0F87D7
	dw CODE_0F87D7
	dw CODE_0F87D7

CODE_0F87A8:
	LDX.b $12
	JSR.w CODE_0F8788
	LDY.b $79,x
	TYX
	JMP.w (DATA_0F87B3,x)

DATA_0F87B3:
	dw CODE_0F87B7
	dw CODE_0F87D4

CODE_0F87B7:
	LDX.b $12
	LDA.w $105C
	BEQ.b CODE_0F87D3
	LDA.w #$0018
	LDY.b #$08
CODE_0F87C3:
	CPY.w $105C
	BEQ.b CODE_0F87CF
	STA.w $105C,y
	SEC
	SBC.w #$0008
CODE_0F87CF:
	DEY
	DEY
	BNE.b CODE_0F87C3
CODE_0F87D3:
	RTL

CODE_0F87D4:
	LDX.b $12
	RTL

CODE_0F87D7:
	LDX.b $12
	LDY.w $74A2,x
	CMP.w #$00FF
	BEQ.b CODE_0F87EF
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0008
	TAY
	JSL.l CODE_02A20A
CODE_0F87EF:
	LDY.b $79,x
	TYX
	JMP.w (DATA_0F87F5,x)

DATA_0F87F5:
	dw CODE_0F87FD
	dw CODE_0F8825
	dw CODE_0F8856
	dw CODE_0F8870

CODE_0F87FD:
	LDX.b $12
	JSL.l CODE_03AF23
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $105C,y
	BEQ.b CODE_0F8813
	STA.w $7A96,x
	LDY.b #$06
	STY.b $79,x
	RTL

CODE_0F8813:
	JSR.w CODE_0F88DE
	JSR.w CODE_0F88A4
	SEP.b #$20
	LDA.b $78,x
	CLC
	ADC.b #$08
	STA.b $78,x
	REP.b #$20
	RTL

CODE_0F8825:
	LDX.b $12
	JSL.l CODE_03AF23
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0F8855
	LDA.w #$0093
	JSL.l CODE_03A34C
	BCC.b CODE_0F8855
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDY.b #$04
	STY.b $79,x
CODE_0F8855:
	RTL

CODE_0F8856:
	LDX.b $12
	LDY.w $7D36,x
	BPL.b CODE_0F886F
	LDA.w $0036
	AND.w #$0008
	BEQ.b CODE_0F886F
CODE_0F8865:
	LDA.w #$FFFF
	STA.w $7722,x
	JSL.l CODE_03A31E
CODE_0F886F:
	RTL

CODE_0F8870:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F88A3
	LDA.w #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1CD
	JSL.l CODE_008B21
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0004
	STA.w $7782,y
	BRA.b CODE_0F8865

CODE_0F88A3:
	RTL

CODE_0F88A4:
	LDY.b $78,x
	TYA
	ASL
	TXY
	REP.b #$10
	TAX
	LDA.l DATA_00E954,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7A36,y
	STA.w $70E2,y
	LDA.l DATA_00E9D4,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7A38,y
	STA.w $7182,y
	SEP.b #$10
	TYX
CODE_0F88DD:
	RTS

CODE_0F88DE:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0F88DD
	BEQ.b CODE_0F88DD
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0F88DD
	LDA.w $7D38,y
	BEQ.b CODE_0F88DD
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYA
	STA.w $105C
	JSR.w CODE_0F892F
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w $6FA2,x
	ORA.w #$0001
	STA.w $6FA2,x
	LDY.b #$02
	STY.b $79,x
	PLA
	RTL

DATA_0F891F:
	dw $05B8,$0077,$07C6,$007A,$05CD,$005B,$00D3,$0677

CODE_0F892F:
	DEC
	DEC
	ASL
	CLC
	ADC.w #DATA_0F891F
	STA.b $00
	LDY.w $7A37,x
	TYA
	ASL
	ASL
	STA.b $02
	LDA.w $7A38,x
	AND.w #$0700
	LSR
	LSR
	ORA.b $02
	PHX
	REP.b #$10
	TAX
	LDA.b ($00)
	STA.l $7F7E00,x
	INC.b $00
	INC.b $00
	LDA.b ($00)
	STA.l $7F7E02,x
	SEP.b #$10
	PLX
	RTS

;---------------------------------------------------------------------------

DATA_0F8962:
	db $00,$01,$01,$00,$00,$40,$00,$C0

DATA_0F896A:
	db $02,$02,$02,$02

DATA_0F896E:
	db $00,$40,$80,$C0

YI_NorSpr198_DiagonalArrowSign_Init:
;$0F8972
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.b #$10
	LSR
	LSR
	LSR
	ORA.b $00
	TAY
	LDA.w DATA_0F896A,y
	STA.w $7402,x
	LDA.w $7042,x
	ORA.w DATA_0F896E,y
	STA.w $7042,x
	REP.b #$20
	BRA.b CODE_0F89C6

YI_NorSpr197_ArrowSign_Init:
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.b #$10
	LSR
	LSR
	LSR
	ORA.b $00
	TAY
	LDA.w DATA_0F8962,y
	STA.w $7402,x
	LDA.w $7042,x
	EOR.w DATA_0F896E,y
	STA.w $7042,x
	REP.b #$20
CODE_0F89C6:
	LDA.w $70E2,x
	AND.w #$FFE0
	CLC
	ADC.w #$0008
	STA.w $70E2,x
	LDA.w $7182,x
	AND.w #$FFE0
	CLC
	ADC.w #$0008
	STA.w $7182,x
	STZ.w $7400,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr197_ArrowSign_Main:
YI_NorSpr198_DiagonalArrowSign_Main:
;$0F89E4
	RTL

;---------------------------------------------------------------------------

DATA_0F89E5:
	dw $FFF0,$FFE0,$FFF0,$0000,$0010,$0020,$0010,$0000

DATA_0F89F5:
	dw $0000,$0008

YI_NorSpr182_Dragonfly_Init:
;$0F89F9
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w $70E2,x
	STA.b $18,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0F89F5,y
	STA.b $16,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr182_Dragonfly_Main:
;$0F8A17
	JSL.l CODE_03AF23
	JSR.w CODE_0F8A33
	LDA.w $7A96,x
	BNE.b CODE_0F8A32
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0F8A32:
	RTL

CODE_0F8A33:
	LDY.b $16,x
	LDA.b $18,x
	CLC
	ADC.w DATA_0F89E5,y
	SEC
	SBC.w $70E2,x
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_0F8A7A
	LDA.w $7A98,x
	BNE.b CODE_0F8A7A
	LDA.b $76,x
	BNE.b CODE_0F8A5C
	LDA.w #$0020
	STA.w $7A98,x
	INC.b $76,x
	BRA.b CODE_0F8A7A

CODE_0F8A5C:
	STZ.b $76,x
	LDA.b $16,x
	INC
	INC
	AND.w #$000E
	STA.b $16,x
	CMP.w #$0004
	BEQ.b CODE_0F8A71
	CMP.w #$000C
	BNE.b CODE_0F8A7A
CODE_0F8A71:
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_0F8A7A:
	RTS

;---------------------------------------------------------------------------

DATA_0F8A7B:
	dw $0000,$0002,$0004,$0008

DATA_0F8A83:
	dw $0020,$FFE0

DATA_0F8A87:
	dw $0008,$FFF8

DATA_0F8A8B:
	dw $FFC0,$0040

DATA_0F8A8F:
	dw $F800,$0800

YI_NorSpr183_Butterfly_Init:
;$0F8A93
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w $7042,x
	ORA.w DATA_0F8A7B,y
	STA.w $7042,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w $70E2,x
	PHA
	STA.b $18,x
	AND.w #$0010
	LSR
	LSR
	LSR
	EOR.w #$0002
	STA.w $7400,x
	TAY
	PLA
	CLC
	ADC.w DATA_0F8A83,y
	STA.w $70E2,x
	LDA.w $7182,x
	STA.b $76,x
	CLC
	ADC.w DATA_0F8A87,y
	STA.w $7182,x
	LDA.w DATA_0F8A8B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A98,x
	LDA.w DATA_0F8A8F,y
	STA.w $75E2,x
	LDA.w #$0008
	STA.w $7542,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr183_Butterfly_Main:
;$0F8AE9
	JSL.l CODE_03AF23
	LDA.w $7A96,x
	BNE.b CODE_0F8B01
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_0F8B01:
	LDA.w $7A98,x
	BNE.b CODE_0F8B1C
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	TAY
	LDA.w DATA_0F8A8B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0100
	STA.w $7A98,x
CODE_0F8B1C:
	LDY.b #$00
	LDA.w $7182,x
	CMP.b $76,x
	BPL.b CODE_0F8B27
	INY
	INY
CODE_0F8B27:
	LDA.w DATA_0F8A8F,y
	STA.w $75E2,x
	RTL

;---------------------------------------------------------------------------

DATA_0F8B2E:
	dw $FFF8,$0008

DATA_0F8B32:
	dw $0800,$F800

YI_NorSpr165_NipperSpore_Init:
;$0F8B36
	STZ.w $7400,x
	LDA.w $70E2,x
	STA.b $78,x
	PHA
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_0F8B32,y
	STA.w $75E0,x
	PLA
	CLC
	ADC.w DATA_0F8B2E,y
	STA.w $70E2,x
	LDA.w #$0004
	STA.w $7540,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr164_NipperPlant_Init:
;$0F8B5B
	LDA.w #$0002
	STA.b $16,x
	LDA.w $7040,x
	ORA.w #$0120
	STA.w $7040,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0006
	STA.w $7402,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$0001
	STA.b $18,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr165_NipperSpore_Main:
;$0F8B8D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0008
	BNE.b CODE_0F8BA9
	LDA.w $6FA2,x
	AND.w #$8000
	BNE.b CODE_0F8BA9
	LDA.w #!Define_YI_NorSpr164_NipperPlant
	TXY
	JSL.l CODE_03A377
	JSL.l YI_NorSpr164_NipperPlant_Init
YI_NorSpr164_NipperPlant_Main:
CODE_0F8BA9:
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JSR.w (DATA_0F8BB8,x)
	JSL.l CODE_03A5B7
	RTL

DATA_0F8BB8:
	dw CODE_0F8BD0
	dw CODE_0F8CC1
	dw CODE_0F8C6D
	dw CODE_0F8CA3

DATA_0F8BC0:
	db $01,$02,$03,$04,$03,$02,$01,$00,$08,$04,$08,$0C,$08,$04,$08,$0C

CODE_0F8BD0:
	LDX.b $12
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0F8C1B
	LDY.b #$00
	LDA.w $70E2,x
	CMP.b $78,x
	BMI.b CODE_0F8BE5
	INY
	INY
CODE_0F8BE5:
	LDA.w DATA_0F8B32,y
	STA.w $75E0,x
CODE_0F8BEB:
	LDY.b #$02
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_0F8C16
	CLC
	ADC.w #$0010
	CMP.w #$0040
	BCS.b CODE_0F8C0D
	LDY.b #$01
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0F8C16
	LDY.b #$03
	BRA.b CODE_0F8C16

CODE_0F8C0D:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0F8C16
	LDY.b #$04
CODE_0F8C16:
	TYA
	STA.w $7402,x
	RTS

CODE_0F8C1B:
	LDA.w #!Define_YI_SoundID77_EnemyJumpingOutOfPipe
	JSL.l CODE_0085D2
	JSL.l CODE_039F2B
	LDA.w $6FA0,x
	AND.w #$E7FF
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$7FFF
	ORA.w #$0040
	STA.w $6FA2,x
	LDA.w $7040,x
	ORA.w #$0120
	STA.w $7040,x
	STZ.w $7540,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0006
	STA.w $7402,x
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0001
	STA.b $18,x
	LDA.w #$0006
	STA.b $16,x
	RTS

CODE_0F8C6D:
	LDX.b $12
	LDY.w $7223,x
	BMI.b CODE_0F8CA0
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	STA.b $78,x
	LDA.w #$F800
	STA.w $75E0,x
	LDA.w $7040,x
	ORA.w #$0004
	STA.w $7040,x
	LDA.w $7682,x
	CMP.w #$FFF0
	BPL.b CODE_0F8C9E
	LDA.w $609C
	SEC
	SBC.w #$0010
	STA.w $7182,x
CODE_0F8C9E:
	STZ.b $16,x
CODE_0F8CA0:
	JMP.w CODE_0F8BEB

CODE_0F8CA3:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F8CB7
	LDA.w $77C2,x
	AND.w #$00FF
	STA.w $7400,x
	LDY.b #$02
	STY.b $16,x
CODE_0F8CB7:
	RTS

DATA_0F8CB8:
	db $05,$06,$07

DATA_0F8CBB:
	db $07,$06

DATA_0F8CBD:
	dw $FF80,$0080

CODE_0F8CC1:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BNE.b CODE_0F8CF8
	LDA.w $6FA2,x
	AND.w #$F7FF
	LDA.w $6FA2,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$0000
	STA.b $18,x
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_0F8CED
	INY
	CMP.w #$FF00
	BCC.b CODE_0F8CED
	INY
CODE_0F8CED:
	SEP.b #$20
	LDA.w DATA_0F8CB8,y
	STA.w $7402,x
	REP.b #$20
	RTS

CODE_0F8CF8:
	LDA.w $6FA2,x
	ORA.w #$0800
	LDA.w $6FA2,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A96,x
	BNE.b CODE_0F8D1E
	DEC.b $18,x
	BMI.b CODE_0F8D1F
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_0F8CBB,y
	STA.w $7402,x
	LDA.b #$08
	STA.w $7A96,x
	REP.b #$20
CODE_0F8D1E:
	RTS

CODE_0F8D1F:
	LDY.w $7400,x
	LDA.w DATA_0F8CBD,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	RTS

;---------------------------------------------------------------------------

YI_NorSpr040_BabyLuigi_Init:
;$0F8D2F
	JSL.l CODE_03AE60
	JSR.w CODE_0F8D44
	STZ.w $7400,x
	RTL

DATA_0F8D3A:
	db $20,$28,$28,$28,$28,$28,$28,$28,$28,$28

CODE_0F8D44:
	SEP.b #$20
	LDY.w $7402,x
	LDA.w $7041,x
	AND.b #$07
	ORA.w DATA_0F8D3A,y
	STA.w $7041,x
	REP.b #$20
	RTS

;---------------------------------------------------------------------------

DATA_0F8D57:
	db $20,$02,$02,$02,$20,$02,$20,$10,$02,$02,$02,$02,$02,$02,$10,$04
	db $04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$20

DATA_0F8D75:
	db $09,$08,$04,$06,$07,$06,$04,$05,$04,$03,$02,$01,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

DATA_0F8D93:
	db $00,$00,$00,$00,$00,$00,$00,$04,$00,$02,$06,$06,$02,$00,$04,$00
	db $02,$00,$04,$00,$02,$00,$04,$00,$02,$00,$04,$00,$02,$00

YI_NorSpr040_BabyLuigi_Main:
;$0F8DB1
	JSR.w CODE_0F8E20
	JSR.w CODE_0F8E49
	JSL.l CODE_03AF23
	LDY.b $18,x
	TYX
	JMP.w (DATA_0F8DC1,x)

DATA_0F8DC1:
	dw CODE_0F8DC5
	dw CODE_0F8DF8

CODE_0F8DC5:
	LDX.b $12
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0030
	CMP.w #$0060
	BCS.b CODE_0F8DF7
	SEP.b #$20
	LDY.b #$1D
	STY.b $19,x
	LDA.w DATA_0F8D57,y
	STA.w $7A96,x
	LDA.w DATA_0F8D75,y
	STA.w $7402,x
	LDA.w DATA_0F8D93,y
	STA.b $16,x
	INC.b $18,x
	INC.b $18,x
	REP.b #$20
	JSR.w CODE_0F8D44
CODE_0F8DF7:
	RTL

CODE_0F8DF8:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F8E1E
	LDY.b $19,x
	DEY
	BMI.b CODE_0F8E1F
	STY.b $19,x
	SEP.b #$20
	LDA.w DATA_0F8D57,y
	STA.w $7A96,x
	LDA.w DATA_0F8D75,y
	STA.w $7402,x
	LDA.w DATA_0F8D93,y
	STA.b $16,x
	REP.b #$20
	JSR.w CODE_0F8D44
CODE_0F8E1E:
	RTL

CODE_0F8E1F:
	RTL

CODE_0F8E20:
	LDA.w $7402,x
	BNE.b CODE_0F8E2A
	JSL.l CODE_03AA52
	RTS

CODE_0F8E2A:
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0008
	TAY
	JSL.l CODE_03AA60
	RTS

DATA_0F8E39:
	dw $0100,$00E8,$0120,$00D0

DATA_0F8E41:
	dw $0100,$0120,$00E8,$0150

CODE_0F8E49:
	LDY.w $74A2,x
	CMP.w #$00FF
	BEQ.b CODE_0F8EA5
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_0F8EA5
	LDA.w $7722,x
	BMI.b CODE_0F8EA5
	LDY.b $16,x
	LDA.w DATA_0F8E39,y
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w DATA_0F8E41,y
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$0019
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	REP.b #$10
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_548000+$20A0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$20A0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	INC.w $0CF9
CODE_0F8EA5:
	RTS

;---------------------------------------------------------------------------

DATA_0F8EA6:
	dw !Define_YI_NorSpr0C1_WingedCloudWith5Stars
	dw !Define_YI_NorSpr0C8_WingedCloudWith6LeafSunflower
	dw !Define_YI_NorSpr0B8_WingedCloudWithFlower
	dw !Define_YI_NorSpr0B7_WingedCloudWithBubbled1up

YI_NorSpr067_RockRevealedHiddenWingedCloud_Init:
;$0F8EAE
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_0F8ECF
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.b #$10
	LSR
	LSR
	ORA.b $00
	INC
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TAY
	REP.b #$20
CODE_0F8ECF:
	DEY
	TYX
	JMP.w (DATA_0F8ED4,x)

DATA_0F8ED4:
	dw CODE_0F8EDC
	dw CODE_0F8EE8
	dw CODE_0F8EDC
	dw CODE_0F8EDC

CODE_0F8EDC:
	LDX.b $12
	JSL.l CODE_03D3F8
	BEQ.b CODE_0F8EEA
	JML.l CODE_03A31E

CODE_0F8EE8:
	LDX.b $12
CODE_0F8EEA:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr067_RockRevealedHiddenWingedCloud_Main:
;$0F8EEB
	JSL.l CODE_03AF23
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_099011>>16
	LDA.w #FXCODE_099011
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0F8EFC:
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	BMI.b CODE_0F8F4A
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr09E_ChompRock
	BEQ.b CODE_0F8F1B
	CMP.w #!Define_YI_NorSpr0DC_Snowball
	BEQ.b CODE_0F8F1B
	LDX.b #FXCODE_09906B>>16
	LDA.w !REGISTER_SuperFX_R15_ProgramCounterLo
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_0F8EFC

CODE_0F8F1B:
	LDA.w #!Define_YI_SoundID27_CollectSuperStar
	JSL.l CODE_0085D2
	JSL.l CODE_039F2B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEY
	LDA.w DATA_0F8EA6,y
	TXY
	JSL.l CODE_03A377
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	SEP.b #$20
	LDA.b #$01
	STA.w $77C0,y
	REP.b #$20
CODE_0F8F4A:
	RTL

;---------------------------------------------------------------------------

DATA_0F8F4B:
	dw $0000,$0002,$0004,$0008

YI_NorSpr191_Bird_Init:
;$0F8F53
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w $7042,x
	ORA.w DATA_0F8F4B,y
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr191_Bird_Main:
;$0F8F64
	JSL.l CODE_03AF23
	LDA.b $16,x
	TAX
	JMP.w (DATA_0F8F6E,x)

DATA_0F8F6E:
	dw CODE_0F8F92
	dw CODE_0F90A8

DATA_0F8F72:
	dw $FF80,$0080

DATA_0F8F76:
	dw $FD00,$FE00,$FF00,$FFC0,$0040,$0100,$0200,$0300

DATA_0F8F86:
	db $01,$02,$03,$02,$01,$00

DATA_0F8F8C:
	db $01,$02,$03,$02,$01,$03

CODE_0F8F92:
	LDX.b $12
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098F33>>16
	LDA.w #FXCODE_098F33
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_0F8FC8
	LDA.w $7CD6,x
	SEC
	SBC.w $7CD6,y
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0F8FC8
	LDA.w $7CD8,x
	SEC
	SBC.w $7CD8,y
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCC.b CODE_0F8FE8
CODE_0F8FC8:
	LDA.w $7CD6,x
	SEC
	SBC.w $611C
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0F9034
	LDA.w $7CD8,x
	SEC
	SBC.w $611E
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0F9034
CODE_0F8FE8:
	LDA.b $10
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_0F8F76,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	TYA
	AND.w #$0008
	LSR
	LSR
	STA.w $7400,x
	LDA.w #$FE00
	STA.w $75E2,x
	LDA.w #$0010
	STA.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	LDA.w $7040,x
	AND.w #$FFFC
	STA.w $7040,x
	LDA.w #$0002
	STA.w $7A96,x
	STZ.w $7402,x
	INC.b $16,x
	INC.b $16,x
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	RTL

CODE_0F9034:
	LDA.b $18,x
	BNE.b CODE_0F9070
	LDA.w $7A98,x
	BNE.b CODE_0F905D
	DEC.b $76,x
	BPL.b CODE_0F904B
	LDA.w $7A96,x
	BEQ.b CODE_0F905E
	LDA.w #$0005
	STA.b $76,x
CODE_0F904B:
	SEP.b #$20
	LDY.b $76,x
	LDA.w DATA_0F8F86,y
	STA.w $7402,x
	LDA.w DATA_0F8F8C,y
	STA.w $7A98,x
	REP.b #$20
CODE_0F905D:
	RTL

CODE_0F905E:
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $18,x
	RTL

CODE_0F9070:
	LDA.w $7A96,x
	BEQ.b CODE_0F9090
CODE_0F9075:
	LDA.w $7AF6,x
	BNE.b CODE_0F908F
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
	LDA.b $10
	AND.w #$0007
	CLC
	ADC.w #$0008
	STA.w $7AF6,x
CODE_0F908F:
	RTL

CODE_0F9090:
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$0040
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_0F8F72,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
	RTL

CODE_0F90A8:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F90BE
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w #$0002
	STA.w $7A96,x
CODE_0F90BE:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr087_MockUpLaidEgg_Init:
;$0F90BF
	RTL

;---------------------------------------------------------------------------

YI_NorSpr087_MockUpLaidEgg_Main:
;$0F90C0
	JSL.l CODE_03AF23
	LDY.b $16,x
	TYX
	JMP.w (DATA_0F90CA,x)

DATA_0F90CA:
	dw CODE_0F90CE
	dw CODE_0F90E6

CODE_0F90CE:
	LDX.b $12
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0F90E5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7A96,x
	LDY.b #$02
	STY.b $16,x
CODE_0F90E5:
	RTL

CODE_0F90E6:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F9110
	LDA.w $70E2,x
	STA.w $0000
	LDA.w $7182,x
	STA.w $0002
	LDA.w $7042,x
	AND.w #$003E
	STA.w $0004
	JSL.l CODE_04F88E
	LDX.b $12
	JSL.l CODE_03A496
	JSL.l CODE_03A32E
CODE_0F9110:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr163_BouncingNeedlenose_Init:
;$0F9111
	RTL

;---------------------------------------------------------------------------

DATA_0F9112:
	dw $FC00,$FE00

YI_NorSpr163_BouncingNeedlenose_Main:
;$0F9116
	LDA.w $7D38,x
	BEQ.b CODE_0F912D
	LDA.w $6FA0,x
	ORA.w #$0600
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
CODE_0F912D:
	JSL.l CODE_03AF23
	LDA.w $6FA2,x
	BIT.w #$001F
	BEQ.b CODE_0F9173
	JSL.l CODE_03A5B7
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0F9173
	LDA.b $18,x
	CMP.w #$0002
	BCS.b CODE_0F9173
	ASL
	TAY
	LDA.w DATA_0F9112,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b $18,x
	BEQ.b CODE_0F916A
	LDA.w $6FA0,x
	AND.w #$F99F
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
CODE_0F916A:
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	INC.b $18,x
CODE_0F9173:
	RTL

;---------------------------------------------------------------------------

DATA_0F9174:
	dw $0000,$0002,$0004,$0008

YI_NorSpr1AC_SmallFrog_Init:
;$0F917C:
	LDA.b $10
	AND.w #$0006
	TAY
	LDA.w $7042,x
	ORA.w DATA_0F9174,y
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1AC_SmallFrog_Main:
;$0F918C
	JSL.l CODE_03AF23
	LDY.b $16,x
	TYX
	JMP.w (DATA_0F9197,x)

CODE_0F9196:
	RTL

DATA_0F9197:
	dw CODE_0F919F
	dw CODE_0F91FB
	dw CODE_0F9229
	dw CODE_0F9252

CODE_0F919F:
	LDX.b $12
	LDA.w $7C16,x
	BPL.b CODE_0F91AA
	EOR.w #$FFFF
	INC
CODE_0F91AA:
	CMP.w #$0030
	BPL.b CODE_0F91D5
	LDA.w $7C18,x
	BPL.b CODE_0F91B8
	EOR.w #$FFFF
	INC
CODE_0F91B8:
	CMP.w #$0030
	BPL.b CODE_0F91D5
	LDA.w $6FA2,x
	AND.w #$FF3F
	ORA.w #$0480
	STA.w $6FA2,x
	STZ.w $7A96,x
	LDA.b $16,x
	CLC
	ADC.w #$0004
	STA.b $16,x
	RTL

CODE_0F91D5:
	LDA.w $7A96,x
	BNE.b CODE_0F91FA
	INC.b $16,x
	INC.b $16,x
	LDA.b $10
	AND.w #$0002
	EOR.w $7400,x
	STA.w $7400,x
	PHP
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLP
	BEQ.b CODE_0F91F7
	EOR.w #$FFFF
	INC
CODE_0F91F7:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0F91FA:
	RTL

CODE_0F91FB:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0F921A
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0020
	STA.w $7A96,x
	STZ.b $16,x
	RTL

CODE_0F921A:
	LDA.w #$0001
	LDY.w $7223,x
	BMI.b CODE_0F9225
	LDA.w #$0002
CODE_0F9225:
	STA.w $7402,x
	RTL

CODE_0F9229:
	LDX.b $12
	LDA.w $7A96,x
	BNE.b CODE_0F9251
	INC.b $16,x
	INC.b $16,x
	LDA.w $77C2,x
	AND.w #$00FF
	EOR.w #$0002
	STA.w $7400,x
	PHP
	LDA.w #$FF00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PLP
	BEQ.b CODE_0F924E
	EOR.w #$FFFF
	INC
CODE_0F924E:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0F9251:
	RTL

CODE_0F9252:
	LDX.b $12
	LDA.w $7860,x
	BIT.w #$0001
	BEQ.b CODE_0F926D
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7402,x
	LDA.w #$0010
	STA.w $7A96,x
	DEC.b $16,x
	DEC.b $16,x
	RTL

CODE_0F926D:
	LDA.w #$0001
	LDY.w $7223,x
	BMI.b CODE_0F9278
	LDA.w #$0002
CODE_0F9278:
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr161_RewardItemForDefeatingRoomEnemies_Init:
;$0F927C
	JSL.l CODE_03D3F8
	BEQ.b CODE_0F9286
	JML.l CODE_03A31E

CODE_0F9286:
	SEP.b #$20
	LDA.w $70E2,x
	AND.b #$10
	LSR
	LSR
	LSR
	STA.b $00
	LDA.w $7182,x
	AND.b #$10
	LSR
	LSR
	ORA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	REP.b #$20
	RTL

;---------------------------------------------------------------------------

YI_NorSpr161_RewardItemForDefeatingRoomEnemies_Main:
;$0F92A1
	JSL.l CODE_03AF23
	LDX.b #FXCODE_09AF4A>>16
	LDA.w #FXCODE_09AF4A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	BMI.b CODE_0F92B6
	RTL

CODE_0F92B6:
	LDA.w #!Define_YI_SoundID95_BonusChallenge
	JSL.l CODE_0085D2
	JSL.l CODE_039F2B
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0F92D9,y
	TXY
	JSL.l CODE_03A377
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	TYX
	JMP.w (DATA_0F92E1,x)

DATA_0F92D9:
	dw !Define_YI_NorSpr115_Coin
	dw !Define_YI_NorSpr027_Key
	dw !Define_YI_NorSpr0FA_Flower
	dw !Define_YI_NorSpr093_Door

DATA_0F92E1:
	dw CODE_0F92E9
	dw CODE_0F931C
	dw CODE_0F931C
	dw CODE_0F931C

CODE_0F92E9:
	LDX.b $12
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7042,x
	AND.w #$FFF1
	ORA.w #$0002
	STA.w $7042,x
	LDA.w $7182,x
	ASL
	ASL
	ASL
	ASL
	AND.w #$FF00
	ORA.w #$8000
	STA.b $00
	LDA.w $70E2,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$00FF
	ORA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

CODE_0F931C:
	LDX.b $12
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%ROUTINE_YI_NorSpr053_KamekSayingOhMy($0F9328)
	%ROUTINE_YI_NorSpr0AA_BackgroundShyguy($0F9435)
	%ROUTINE_YI_NorSpr03E_ThinPlatform($0F94D6)
else
endif

;---------------------------------------------------------------------------

YI_NorSpr0D3_LargeMilde_Init:
;$0F9328
	JSL.l CODE_03ADD0
	BCS.b CODE_0F9332
	JML.l CODE_03A31E

CODE_0F9332:
	JSR.w CODE_0F9838
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0D3_LargeMilde_Main:
YI_NorSpr0D3_LargeMilde_StompRt:
;$0F933F
	STZ.w $7D38,x
	REP.b #$10
	LDA.w $7362,x
	BMI.b CODE_0F935F
	CLC
	ADC.w #$0030
	PHA
	TAY
	JSL.l CODE_03AAAB
	REP.b #$10
	PLA
	CLC
	ADC.w #$0040
	TAY
	JSL.l CODE_03AAAB
CODE_0F935F:
	SEP.b #$10
	LDA.w $7AF6,x
	BNE.b CODE_0F9377
	LDA.b $76,x
	CMP.w #$0003
	BEQ.b CODE_0F9377
	JSR.w CODE_0F9797
	JSL.l CODE_0F9388
	JSR.w CODE_0F97EE
CODE_0F9377:
	JSL.l CODE_03AF23
	JSR.w CODE_0F94BF
	JSR.w CODE_0F93EA
	JSR.w CODE_0F9391
	JSR.w CODE_0F9838
	RTL

CODE_0F9388:
	JSL.l CODE_03A5B7
	RTL

DATA_0F938D:
	dw $FFFF,$0001

CODE_0F9391:
	SEP.b #$20
	LDA.w $7860,x
	AND.b #$0C
	REP.b #$20
	BEQ.b CODE_0F93E4
	LSR
	LSR
	AND.w #$0002
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_0F938D,y
	STA.w $70E2,x
	LDA.b $76,x
	CMP.w #$0002
	BNE.b CODE_0F93C4
	LDA.w $7A36,x
	BEQ.b CODE_0F93C4
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0F93E4

CODE_0F93C4:
	LDA.b $76,x
	CMP.w #$0002
	BNE.b CODE_0F93D0
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_0F93E4

CODE_0F93D0:
	LDA.w #$0001
	STA.b $76,x
	LDA.w #$0018
	STA.w $7A96,x
	LDY.w $7400,x
	LDA.w DATA_0F93E5,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0F93E4:
	RTS

DATA_0F93E5:
	dw $0020,$FFE0

CODE_0F93E9:
	RTS

CODE_0F93EA:
	LDY.w $7D36,x
	BEQ.b CODE_0F93E9
	BMI.b CODE_0F93E9
	DEY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr0D3_LargeMilde
	BEQ.b CODE_0F93FF
	CMP.w #!Define_YI_NorSpr0D4_MediumMilde
	BNE.b CODE_0F93E9
CODE_0F93FF:
	STZ.b $00
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	BPL.b CODE_0F940E
	INC.b $00
	INC.b $00
CODE_0F940E:
	LDA.b $76,x
	CMP.w #$0000
	BEQ.b CODE_0F9442
	CMP.w #$0002
	BNE.b CODE_0F9477
	LDA.w $7A36,x
	BEQ.b CODE_0F9477
	STZ.w $7A36,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	JSR.w CODE_0F9812
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w $7A36,y
	LDA.w #$00FF
	STA.w $7A96,y
	BRA.b CODE_0F9477

CODE_0F9442:
	LDA.w $7860,x
	AND.w #$0001
	BNE.b CODE_0F946B
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	DEC.w $7182,x
	DEC.w $7182,x
	JSR.w CODE_0F9812
	PHX
	TYX
	JSR.w CODE_0F9812
	PLX
	BRA.b CODE_0F94BE

CODE_0F946B:
	LDA.w $7400,x
	CMP.b $00
	BNE.b CODE_0F9477
	PHY
	JSR.w CODE_0F93C4
	PLY
CODE_0F9477:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	CMP.w #$0000
	BEQ.b CODE_0F94B1
	CMP.w #$0002
	BNE.b CODE_0F94BE
	LDA.w $7A36,y
	BEQ.b CODE_0F94BE
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.w $7A36,x
	LDA.w #$0002
	STA.b $76,x
	LDA.w #$00FF
	STA.w $7A96,x
	LDA.w #$0000
	STA.w $7A36,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	PHX
	TYX
	JSR.w CODE_0F9812
	PLX
	BRA.b CODE_0F94BE

CODE_0F94B1:
	LDA.w $7400,y
	CMP.b $00
	BEQ.b CODE_0F94BE
	PHX
	TYX
	JSR.w CODE_0F93C4
	PLX
CODE_0F94BE:
	RTS

CODE_0F94BF:
	LDA.b $76,x
	ASL
	TXY
	TAX
	JMP.w (DATA_0F94C7,x)

DATA_0F94C7:
	dw CODE_0F94DD
	dw CODE_0F9517
	dw CODE_0F9571
	dw CODE_0F9672

DATA_0F94CF:
	dw $FF80,$0080

DATA_0F94D3:
	db $00,$01,$02,$03,$04,$05,$04,$03,$02,$01

CODE_0F94DD:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0F94EF
	LDY.w $7400,x
	LDA.w DATA_0F94CF,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0F94EF:
	SEP.b #$20
	DEC.w $7A38,x
	BPL.b CODE_0F9505
	LDA.b #$07
	STA.w $7A38,x
	INC.b $16,x
	LDA.b $16,x
	CMP.b #$0A
	BNE.b CODE_0F9505
	STZ.b $16,x
CODE_0F9505:
	LDY.b $16,x
	LDA.w DATA_0F94D3,y
	STA.w $7402,x
	REP.b #$20
	RTS

DATA_0F9510:
	db $00,$06,$07,$07,$06,$00,$00

CODE_0F9517:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0F9525
CODE_0F951D:
	LDA.w #$0000
	STA.b $76,x
	STZ.b $16,x
	RTS

CODE_0F9525:
	SEP.b #$20
	CMP.b #$0B
	BNE.b CODE_0F9535
	PHA
	LDA.w $7400,x
	EOR.b #$02
	STA.w $7400,x
	PLA
CODE_0F9535:
	LSR
	LSR
	TAY
	LDA.w DATA_0F9510,y
	STA.w $7402,x
	REP.b #$20
	RTS

DATA_0F9541:
	dw $0100,$0108,$0110,$0118,$0118,$0110,$0108,$0100

DATA_0F9551:
	dw $0100,$00F8,$00F0,$00E8,$00E8,$00F0,$00E8,$0100
	dw $0100,$0108,$0110,$0118,$0118,$0110,$0108,$0100

CODE_0F9571:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0F9586
	JSR.w CODE_0FA5E7
	JSR.w CODE_0FA5E7
	JSR.w CODE_0FA5E7
	JSR.w CODE_0FA5E7
CODE_0F9586:
	LDA.w $7A96,x
	BNE.b CODE_0F9597
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	JMP.w CODE_0F951D

CODE_0F9597:
	NOP #2
	AND.w #$0007
	ASL
	ASL
	TAY
	LDA.w DATA_0F9541,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0F9551,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	LDA.w $7362,x
	TXY
	CLC
	ADC.w #$0018
	TAX
	LDA.w $7A96,y
	BIT.w #$0002
	BEQ.b CODE_0F95D7
	AND.w #$0004
	BEQ.b CODE_0F95CE
	INC.w $6002,x
	INC.w $600A,x
	INC.w $6012,x
	BRA.b CODE_0F95D7

CODE_0F95CE:
	DEC.w $6002,x
	DEC.w $600A,x
	DEC.w $6012,x
CODE_0F95D7:
	SEP.b #$10
	LDX.b $12
	RTS

DATA_0F95DC:
	dw $0107,$010E,$0115,$011C,$0123,$012A,$0131,$0138
	dw $0138,$0138,$0138,$0138,$0138,$0138,$0138

DATA_0F95FA:
	dw $00E9,$00D2,$00BB,$00A4,$008D,$0076,$005F,$0048
	dw $0048,$0048,$0048,$0048,$0048,$0048,$0048

DATA_0F9618:
	dw $0000,$0004,$0005,$0008,$000B,$000D,$0010,$0014
	dw $0014,$0014,$0014,$0014,$0014,$0014,$0014

DATA_0F9636:
	dw $0008,$0008,$0009,$000A,$000A,$000B,$000C,$000C
	dw $000C,$000C,$000C,$000C,$000C,$000C,$000C

DATA_0F9654:
	dw $FFD8,$FFDC,$FFE0,$FFE4,$FFE8,$FFEC,$FFF2,$FFF7
	dw $FFF7,$FFF7,$FFF7,$FFF7,$FFF7,$FFF7,$FFF7

CODE_0F9672:
	TYX
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b $16,x
	CPY.b #$1E
	BEQ.b CODE_0F96CC
	LDA.w $0030
	AND.w #$0001
	BNE.b CODE_0F9688
	INC.b $16,x
	INC.b $16,x
CODE_0F9688:
	LDA.w DATA_0F95DC,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0F95FA,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_0F9636,y
	STA.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_0F9654,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	LDA.w DATA_0F9618,y
	STA.b $00
	REP.b #$10
	LDA.w #$000F
	STA.b $02
	LDY.w $7362,x
CODE_0F96B6:
	LDA.w $6032,y
	CLC
	ADC.b $00
	STA.w $6032,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $02
	BPL.b CODE_0F96B6
	SEP.b #$10
	RTS

CODE_0F96CC:
	STZ.w $60D4
	LDA.w #!Define_YI_SoundID86_MildePop2
	JSL.l CODE_0085D2
	JSR.w CODE_0F96EA
	JSL.l CODE_03A32E
	RTS

DATA_0F96DE:
	dw $0100,$FF00

DATA_0F96E2:
	dw $0010,$FFF0

DATA_0F96E6:
	dw $0002,$0000

CODE_0F96EA:
	LDA.w #$012E
	JSL.l CODE_03A364
	BCC.b CODE_0F970B
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w $7CD6,x
	STA.w $70E2,y
	LDA.w $7CD8,x
	STA.w $7182,y
CODE_0F970B:
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0050
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$0400
	STA.w $6000
	LDA.w #$FC00
	STA.w $6002
	LDX.b #FXCODE_099253>>16
	LDA.w #FXCODE_099253
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #$0002
	STA.b $08
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
CODE_0F974A:
	LDA.w #$00D4
	JSL.l CODE_03A364
	BCC.b CODE_0F9796
	LDX.b $08
	LDA.b $00
	CLC
	ADC.w DATA_0F96E2,x
	STA.w $70E2,y
	LDA.w DATA_0F96DE,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w DATA_0F96E6,x
	STA.w $7400,y
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	CLC
	ADC.w #$0000
	STA.w $7182,y
	LDA.w #$0020
	STA.w $7AF6,y
	LDA.w #$0030
	STA.w $7A96,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	LDX.b $12
	DEC.b $08
	DEC.b $08
	BPL.b CODE_0F974A
CODE_0F9796:
	RTS

CODE_0F9797:
	LDY.w $7D36,x
	DEY
	BMI.b CODE_0F97ED
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0F97ED
	LDA.w $7D38,y
	BEQ.b CODE_0F97ED
	LDA.b $76,x
	CMP.w #$0002
	BEQ.b CODE_0F97ED
	LDA.w #$0002
	STA.b $76,x
	PHY
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	PLY
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr0D4_MediumMilde
	BNE.b CODE_0F97E2
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $7A96,x
	INC.w $7A36,x
CODE_0F97E2:
	LDY.w $7D36,x
	DEY
	TYX
	JSL.l CODE_03B24B
	LDX.b $12
CODE_0F97ED:
	RTS

CODE_0F97EE:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000E
	BNE.b CODE_0F9826
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $60D4
	BNE.b CODE_0F9827
	LDA.w #$0002
	STA.b $76,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$FB00
	STA.w $60AA
CODE_0F9812:
	LDA.w #$0002
	STA.b $76,x
	LDA.w #$0020
	STA.w $7A96,x
	PHY
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	PLY
CODE_0F9826:
	RTS

CODE_0F9827:
	STZ.b $16,x
	LDA.w #$0003
	STA.b $76,x
	LDA.w $6FA0,x
	AND.w #$F9FF
	STA.w $6FA0,x
	RTS

CODE_0F9838:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_560000+$60A0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$60A0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STZ.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_560000+$60C0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$60C0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	CLC
	ADC.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr0D4_MediumMilde_Init:
;$0F98BC
	RTL

;---------------------------------------------------------------------------

YI_NorSpr0D4_MediumMilde_Main:
YI_NorSpr0D4_MediumMilde_StompRt:
;$0F98BD
	STZ.w $7D38,x
	LDA.b $76,x
	CMP.w #$0003
	BNE.b CODE_0F98D5
	JSR.w CODE_0F9BB6
	JSL.l CODE_03AF23
	JSR.w CODE_0F993B
	JSR.w CODE_0F9BC9
	RTL

CODE_0F98D5:
	LDA.w $7AF6,x
	BNE.b CODE_0F98E4
	JSR.w CODE_0F9797
	JSL.l CODE_0F9388
	JSR.w CODE_0F98F2
CODE_0F98E4:
	JSL.l CODE_03AF23
	JSR.w CODE_0F993B
	JSR.w CODE_0F93EA
	JSR.w CODE_0F9391
	RTL

CODE_0F98F2:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$000E
	BNE.b CODE_0F9919
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $60D4
	BNE.b CODE_0F991A
	LDA.w #$0002
	STA.b $76,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #$FB00
	STA.w $60AA
	STZ.w $7A36,x
CODE_0F9919:
	RTS

CODE_0F991A:
	STZ.b $16,x
	LDA.w #$0003
	STA.b $76,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.w $7040,x
	AND.w #$01FF
	ORA.w #$4000
	STA.w $7040,x
	JSL.l CODE_0F9BAB
	JSR.w CODE_0F9BB6
	RTS

CODE_0F993B:
	LDA.b $76,x
	ASL
	TXY
	TAX
	JMP.w (DATA_0F9943,x)

DATA_0F9943:
	dw CODE_0F9957
	dw CODE_0F99A2
	dw CODE_0F99C7
	dw CODE_0F9A8F

DATA_0F994B:
	dw $FF80,$0080

DATA_0F994F:
	db $00,$01,$02,$03,$06,$03,$02,$01

CODE_0F9957:
	TYX
	LDA.w $7040,x
	AND.w #$01FF
	ORA.w #$2000
	STA.w $7040,x
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0F9975
	LDY.w $7400,x
	LDA.w DATA_0F994B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0F9975:
	SEP.b #$20
	DEC.w $7A38,x
	BPL.b CODE_0F998B
	LDA.b #$07
	STA.w $7A38,x
	INC.b $16,x
	LDA.b $16,x
	CMP.b #$08
	BNE.b CODE_0F998B
	STZ.b $16,x
CODE_0F998B:
	LDY.b $16,x
	LDA.w DATA_0F994F,y
	STA.w $7402,x
	REP.b #$20
	LDA.w $7A96,x
	BNE.b CODE_0F99F4
	RTS

DATA_0F999B:
	db $01,$02,$03,$06,$03,$02,$01

CODE_0F99A2:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0F99AB
	JMP.w CODE_0F99EC

CODE_0F99AB:
	SEP.b #$20
	CMP.b #$0B
	BNE.b CODE_0F99BB
	PHA
	LDA.w $7400,x
	EOR.b #$02
	STA.w $7400,x
	PLA
CODE_0F99BB:
	LSR
	LSR
	TAY
	LDA.w DATA_0F999B,y
	STA.w $7402,x
	REP.b #$20
	RTS

CODE_0F99C7:
	TYX
	LDA.w $7860,x
	AND.w #$0001
	BEQ.b CODE_0F99E7
	LDA.w $7A36,x
	BEQ.b CODE_0F99E4
	LDY.b #$1F
CODE_0F99D7:
	JSR.w CODE_0FA5E7
	DEY
	BPL.b CODE_0F99D7
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0F99EC
	BNE.b CODE_0F99E7
CODE_0F99E4:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0F99E7:
	LDA.w $7A96,x
	BNE.b CODE_0F99F4
CODE_0F99EC:
	LDA.w #$0000
	STA.b $76,x
	STZ.b $16,x
	RTS

CODE_0F99F4:
	REP.b #$10
	LDA.w $7362,x
	TXY
	TAX
	LDA.w $0030
	AND.w #$0004
	BNE.b CODE_0F9A24
	LDA.w $7400,y
	BEQ.b CODE_0F9A16
	INC.w $6000,x
	INC.w $6010,x
	DEC.w $6008,x
	DEC.w $6018,x
	BRA.b CODE_0F9A30

CODE_0F9A16:
	DEC.w $6000,x
	DEC.w $6010,x
	INC.w $6008,x
	INC.w $6018,x
	BRA.b CODE_0F9A30

CODE_0F9A24:
	DEC.w $6002,x
	DEC.w $600A,x
	INC.w $6012,x
	INC.w $601A,x
CODE_0F9A30:
	SEP.b #$10
	LDX.b $12
	RTS

DATA_0F9A35:
	dw $0107,$010E,$0115,$011C,$0123,$012A,$0131,$0138
	dw $0138,$0138,$0138,$0138,$0138,$0138,$0138

DATA_0F9A53:
	dw $00E9,$00D2,$00BB,$00A4,$0088,$0088,$0088,$0088
	dw $0088,$0088,$0088,$0088,$0088,$0088,$0088

DATA_0F9A71:
	dw $FFE0,$FFE4,$FFE6,$FFE4,$FFE6,$FFEA,$FFEA,$FFEA
	dw $FFEA,$FFEA,$FFEA,$FFEA,$FFEA,$FFEA,$FFEA

CODE_0F9A8F:
	TYX
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b $16,x
	CPY.b #$1E
	BEQ.b CODE_0F9AC5
	LDA.w $0030
	AND.w #$0000
	BNE.b CODE_0F9AA5
	INC.b $16,x
	INC.b $16,x
CODE_0F9AA5:
	LDA.w DATA_0F9A35,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0F9A53,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w DATA_0F9A71,y
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	RTS

CODE_0F9AC5:
	STZ.w $60D4
	LDA.w #!Define_YI_SoundID86_MildePop2
	JSL.l CODE_0085D2
	JSR.w CODE_0F9AF7
	JSL.l CODE_03A32E
	RTS

DATA_0F9AD7:
	dw $FD00,$FD00,$FC00,$FC00

DATA_0F9ADF:
	dw $01C0,$FE40,$0100,$FF00

DATA_0F9AE7:
	dw $0010,$FFF0,$0008,$FFF8

DATA_0F9AEF:
	dw $0002,$0000,$0002,$0000

CODE_0F9AF7:
	LDA.w #!Define_YI_AmbSpr1EE
	JSL.l CODE_008B21
	LDA.w $7CD6,x
	STA.w $70A2,y
	LDA.w $7CD8,x
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	LDA.w #$0008
	STA.w $73C2,y
	LDA.w $7CD6,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7CD8,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$0300
	STA.w $6000
	LDA.w #$FD00
	STA.w $6002
	LDX.b #FXCODE_099253>>16
	LDA.w #FXCODE_099253
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #!Define_YI_SoundID3B_Pop
	JSL.l CODE_0085D2
	LDA.w #$0006
	STA.b $08
	LDA.w #$0020
	STA.w $61D6
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
CODE_0F9B5B:
	LDA.w #$0108
	JSL.l CODE_03A364
	BCC.b CODE_0F9B9E
	LDX.b $08
	LDA.b $00
	CLC
	ADC.w DATA_0F9AE7,x
	STA.w $70E2,y
	LDA.w DATA_0F9ADF,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w DATA_0F9AEF,x
	STA.w $7400,y
	LDA.w DATA_0F9AD7,x
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.b $02
	CLC
	ADC.w #$0000
	STA.w $7182,y
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	LDA.w $7040,y
	AND.w #$FFF3
	STA.w $7040,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	BRA.b CODE_0F9BA2

CODE_0F9B9E:
	JSL.l CODE_04D1A2
CODE_0F9BA2:
	LDX.b $12
	DEC.b $08
	DEC.b $08
	BPL.b CODE_0F9B5B
	RTS

CODE_0F9BAB:
	JSL.l CODE_03AD74
	BCS.b CODE_0F9BB5
	JML.l CODE_03A31E

CODE_0F9BB5:
	RTL

CODE_0F9BB6:
	JSL.l CODE_03AA52
	REP.b #$10
	LDA.w $7362,x
	CLC
	ADC.w #$0020
	TAY
	JSL.l CODE_03AA60
	RTS

CODE_0F9BC9:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #$001F
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #FXDATA_560000+$60E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_560000+$60E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

YI_NorSpr03C_TapTapTheRedNose_Init:
;$0F9C0B
	JSL.l CODE_03ADFE
	LDA.w #$0000
	STA.w $7542,x
	LDA.w #$0018
	STA.w $7720,x
	LDA.w #$2280
	STA.w $6FA2,x
	STZ.w $106C
	STZ.w $1072
	STZ.w $1073
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7182,x
	LDA.w #$0058
	STA.w $1064
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w #$0015
	STA.w $7402,x
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	AND.w #$00FF
	CMP.w #!Define_YI_LevelID_TapTapTheRedNosesFort
	BNE.b CODE_0F9C57
	LDY.b #$42
	JSL.l CODE_0CE5D6
CODE_0F9C57:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr03C_TapTapTheRedNose_Main:
;$0F9C58
	SEP.b #$20
	JSR.w CODE_0FA8E9
	REP.b #$20
	JSL.l CODE_03AF23
	JSR.w CODE_0FA6DB
	SEP.b #$20
	JSR.w CODE_0F9CA2
	LDA.w $7862,x
	CMP.b #$18
	BNE.b CODE_0F9C9F
	LDA.b #!Define_YI_SoundID7A_HurtNepEnut
	JSL.l CODE_0085D2
	LDA.b #!Define_YI_MusicID_StopMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	STZ.w $7862,x
	JSR.w CODE_0FA4CA
	LDA.b #$0E
	STA.w $105F
	REP.b #$20
	LDA.w $6FA0,x
	AND.w #$F9DF
	STA.w $6FA0,x
	LDA.w $6FA2,x
	AND.w #$FFE0
	STA.w $6FA2,x
	STZ.w $7542,x
CODE_0F9C9F:
	REP.b #$20
	RTL

CODE_0F9CA2:
	JSR.w CODE_0FA624
	LDA.w $1060
	BEQ.b CODE_0F9CAD
	DEC.w $1060
CODE_0F9CAD:
	LDA.w $1061
	BEQ.b CODE_0F9CB5
	DEC.w $1061
CODE_0F9CB5:
	LDA.w $1069
	BEQ.b CODE_0F9CBD
	DEC.w $1069
CODE_0F9CBD:
	JSR.w CODE_0F9D70
	JSR.w CODE_0F9D9F
	LDA.w $7860,x
	AND.b #$01
	STA.w $1074
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.b #!Define_YI_LevelID_TapTapTheRedNosesFort
	BEQ.b CODE_0F9CF6
	REP.b #$20
	LDA.w $7182,x
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	CMP.w #$0120
	BCC.b CODE_0F9CF6
	BMI.b CODE_0F9CF6
	LDA.w !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0040
	STA.w $7182,x
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w #$0180
	STA.w $70E2,x
CODE_0F9CF6:
	SEP.b #$20
	RTS

DATA_0F9CF9:
	db $00,$10,$20,$30,$40,$50,$60,$70,$70,$70,$70,$70,$70,$70,$70,$70
	db $70,$70,$70,$70,$70,$70,$70,$70,$70,$70,$70,$70,$70,$70,$70,$70

CODE_0F9D19:
	LDA.w $1071
	BPL.b CODE_0F9D21
	EOR.b #$FF
	INC
CODE_0F9D21:
	TAY
	LDA.w DATA_0F9CF9,y
	STA.w !REGISTER_Multiplicand
	LDA.w $1066
	ASL
	ASL
	BPL.b CODE_0F9D32
	EOR.b #$FF
	INC
CODE_0F9D32:
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.w !REGISTER_HVBlankFlagsAndJoypadStatus
	LDA.w $70E2,x
	SEC
	SBC.b #$78
	BPL.b CODE_0F9D4F
	EOR.b #$FF
	INC
CODE_0F9D4F:
	ASL
	NOP
	STA.w !REGISTER_ProgrammableIOPortInput
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.w !REGISTER_HVBlankFlagsAndJoypadStatus
	LDY.w $1066
	BMI.b CODE_0F9D6B
	EOR.b #$FF
	INC
CODE_0F9D6B:
	NOP #2
	STA.b $00
	RTS

CODE_0F9D70:
	LDA.w $7860,x
	AND.b #$01
	BEQ.b CODE_0F9D9A
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7223,x
	LDA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	LDY.w $1074
	BEQ.b CODE_0F9D9B
	CMP.w $105D
	BEQ.b CODE_0F9D9A
	BMI.b CODE_0F9D94
	INC.w $105D
	INC.w $105D
	BRA.b CODE_0F9D9A

CODE_0F9D94:
	DEC.w $105D
	DEC.w $105D
CODE_0F9D9A:
	RTS

CODE_0F9D9B:
	STA.w $105D
	RTS

CODE_0F9D9F:
	JSR.w CODE_0FB243
	TXY
	REP.b #$20
	LDA.w $1015
	BMI.b CODE_0F9DAC
	BNE.b CODE_0F9DB6
CODE_0F9DAC:
	SEP.b #$20
	LDA.w $105F
	ASL
	TAX
	JMP.w (DATA_0F9DC9,x)

CODE_0F9DB6:
	SEP.b #$20
	LDA.b #$40
	STA.w $7A96,x
	RTS

CODE_0F9DBE:
	LDA.w $6FA3,x
	AND.b #$FC
	ORA.b #$02
	STA.w $6FA3,x
	RTS

DATA_0F9DC9:
	dw CODE_0F9DED
	dw CODE_0F9E37
	dw CODE_0F9E60
	dw CODE_0F9EC6
	dw CODE_0F9EF4
	dw CODE_0F9F29
	dw CODE_0F9FD4
	dw CODE_0FA058
	dw CODE_0FA0C4
	dw CODE_0FA12A
	dw CODE_0FA14D
	dw CODE_0FA1B8
	dw CODE_0FA230
	dw CODE_0FA318
	dw CODE_0FA383
	dw CODE_0FA515
	dw CODE_0FA56A
	dw CODE_0FA5BF

CODE_0F9DED:
	TYX
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.b #!Define_YI_LevelID_TapTapTheRedNosesFort
	BEQ.b CODE_0F9E24
	LDA.b #$06
	STA.w $1063
	STA.w $106D
	STZ.w $7402,x
	LDA.b #$FF
	STA.w $1064
	LDA.b #$40
	STA.w $7542,x
	LDA.b #$40
	STA.w $7A96,x
	LDA.b #$04
	STA.w $105F
	LDA.b #$40
	STA.w $7A96,x
	LDA.b #$81
	STA.w $6FA2,x
	LDA.b #$E8
	STA.w $7041,x
	RTS

CODE_0F9E24:
	LDA.w $7A96,x
	BNE.b CODE_0F9E36
	INC.w $105F
	REP.b #$20
	LDA.w #$0001
	STA.w $1015
	SEP.b #$20
CODE_0F9E36:
	RTS

CODE_0F9E37:
	TYX
	REP.b #$20
	LDA.w $7A96,x
	BNE.b CODE_0F9E5D
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0018
	STA.w $7542,x
	STZ.w $1015
	SEP.b #$20
	LDA.b #$16
	STA.w $7402,x
	LDA.b #$0C
	STA.w $7A96,x
	INC.w $105F
CODE_0F9E5D:
	SEP.b #$20
	RTS

CODE_0F9E60:
	TYX
	SEP.b #$20
	LDA.w $7A96,x
	BEQ.b CODE_0F9E87
	CMP.b #$01
	BNE.b CODE_0F9E85
	LDA.w $7182,x
	CLC
	ADC.b #$00
	STA.w $7182,x
	STZ.w $7402,x
	LDA.b #$E8
	STA.w $7041,x
	LDA.b #$12
	STA.w $1063
	JSR.w CODE_0FA6DB
CODE_0F9E85:
	BRA.b CODE_0F9EC5

CODE_0F9E87:
	LDA.w $1064
	CMP.b #$FF
	BEQ.b CODE_0F9E98
	CLC
	ADC.b #$06
	STA.w $1064
	BCS.b CODE_0F9E98
	BRA.b CODE_0F9E9D

CODE_0F9E98:
	LDA.b #$FF
	STA.w $1064
CODE_0F9E9D:
	LDA.w $105D
	CLC
	ADC.b #$08
	STA.w $105D
	BEQ.b CODE_0F9EA9
	RTS

CODE_0F9EA9:
	LDA.b #$FF
	STA.w $7542,x
	LDA.b #$06
	STA.w $1063
	LDA.b #$00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b #$00
	STA.w $7223,x
	LDA.b #$81
	STA.w $6FA2,x
	INC.w $105F
CODE_0F9EC5:
	RTS

CODE_0F9EC6:
	TYX
	SEP.b #$20
	LDA.w $7860,x
	AND.b #$01
	BEQ.b CODE_0F9EF3
	LDA.b #$06
	STA.w $1063
	STA.w $106D
	LDA.b #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.b #$18
	STA.w $61C6
	LDA.b #$40
	STA.w $7542,x
	LDA.b #$A0
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	INC.w $105F
CODE_0F9EF3:
	RTS

CODE_0F9EF4:
	TYX
	SEP.b #$20
	LDA.w $7A96,x
	BNE.b CODE_0F9EFF
	JSR.w CODE_0F9FFB
CODE_0F9EFF:
	RTS

DATA_0F9F00:
	db $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F

DATA_0F9F10:
	dw $FF00,$0100,$FE80,$0180

DATA_0F9F18:
	db $1F,$1F,$1F,$1F,$20,$20,$20,$20,$20,$20,$20,$20,$1F,$1F,$1F,$1F
	db $1F

CODE_0F9F29:
	TYX
	LDA.b #$40
	STA.w $7542,x
	JSR.w CODE_0F9DBE
	LDA.w $1061
	BNE.b CODE_0F9F78
	DEC.w $106C
	BPL.b CODE_0F9F78
	LDA.b #$01
	STA.w $106C
	LDA.w $106D
	INC
	AND.b #$0F
	STA.w $106D
	LDY.w $106D
	LDA.w DATA_0F9F00,y
	STA.w $1063
	DEC
	AND.b #$07
	BNE.b CODE_0F9F5B
	JSR.w CODE_0FA006
CODE_0F9F5B:
	LDA.w $1063
	AND.b #$07
	BNE.b CODE_0F9F78
	LDA.b #$0C
	STA.w $61C6
	LDA.b #$10
	STA.w $1061
	LDA.b #!Define_YI_SoundID84_TapTapTheRedNoseWalk
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7221,x
CODE_0F9F78:
	LDA.w $7860,x
	AND.b #$0C
	STA.w $106F
	BNE.b CODE_0F9F8E
	LDA.w $7860,x
	AND.b #$01
	BNE.b CODE_0F9F91
	LDA.w $1074
	BEQ.b CODE_0F9F91
CODE_0F9F8E:
	JMP.w CODE_0F9FCC

CODE_0F9F91:
	LDA.w $1063
	BEQ.b CODE_0F9FA2
	CMP.b #$01
	BEQ.b CODE_0F9FA2
	CMP.b #$0E
	BEQ.b CODE_0F9FA2
	CMP.b #$0F
	BNE.b CODE_0F9FBC
CODE_0F9FA2:
	JSR.w CODE_0FA5FE
	TYA
	CMP.w $7400,x
	BEQ.b CODE_0F9FBD
	LDA.w $0030
	AND.b #$00
	BNE.b CODE_0F9FBC
	LDA.b #$06
	STA.w $105F
	LDA.b #$10
	STA.w $1060
CODE_0F9FBC:
	RTS

CODE_0F9FBD:
	REP.b #$20
	LDA.b $0E
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	SEP.b #$20
	BCS.b CODE_0F9FD3
CODE_0F9FCC:
	LDA.b #$07
	STA.w $105F
	STZ.b $16,x
CODE_0F9FD3:
	RTS

CODE_0F9FD4:
	TYX
	LDA.b #$40
	STA.w $7542,x
	JSR.w CODE_0F9DBE
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7221,x
	LDY.w $1060
	BEQ.b CODE_0F9FFB
	LDA.w DATA_0F9F18,y
	STA.w $1063
	CPY.b #$08
	BNE.b CODE_0F9FFA
	LDA.w $7400,x
	EOR.b #$02
	STA.w $7400,x
CODE_0F9FFA:
	RTS

CODE_0F9FFB:
	LDA.b #$05
	STA.w $105F
	STZ.w $106C
	STZ.w $106D
CODE_0FA006:
	LDY.w $7400,x
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.b #!Define_YI_LevelID_TapTapTheRedNosesFort
	BEQ.b CODE_0FA014
	INY
	INY
	INY
	INY
CODE_0FA014:
	REP.b #$20
	LDA.w DATA_0F9F10,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	RTS

DATA_0FA01F:
	dw $FE00,$0200,$FF00,$0100

DATA_0FA027:
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F
	db $FF

CODE_0FA058:
	TYX
	LDA.b #$40
	STA.w $7542,x
	JSR.w CODE_0F9DBE
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7221,x
	LDY.b $16,x
	INC.b $16,x
	LDA.w DATA_0FA027,y
	BMI.b CODE_0FA074
	STA.w $1063
	RTS

CODE_0FA074:
	LDA.b #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.b #$00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b #$F9
	STA.w $7223,x
	LSR.w $7860,x
	ASL.w $7860,x
	INC.w $105F
	STZ.b $16,x
CODE_0FA08F:
	LDY.w $7400,x
	LDA.w $106F
	BEQ.b CODE_0FA09B
	INY
	INY
	INY
	INY
CODE_0FA09B:
	REP.b #$20
	LDA.w DATA_0FA01F,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	RTS

DATA_0FA0A6:
	db $10,$10,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11
	db $11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$10,$10,$10,$10

CODE_0FA0C4:
	TYX
	LDA.b #$40
	STA.w $7542,x
	JSR.w CODE_0F9DBE
	LDA.w $7860,x
	AND.b #$0C
	BNE.b CODE_0FA0D7
	JSR.w CODE_0FA08F
CODE_0FA0D7:
	LDY.b $16,x
	CPY.b #$1C
	BCS.b CODE_0FA0DF
	INC.b $16,x
CODE_0FA0DF:
	LDA.w DATA_0FA0A6,y
	STA.w $1063
	LDA.w $7860,x
	AND.b #$01
	BEQ.b CODE_0FA104
	LDA.b #$18
	STA.w $61C6
	LDA.b #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7223,x
	LDA.b #$09
	STA.w $105F
	STZ.b $16,x
CODE_0FA104:
	RTS

DATA_0FA105:
	db $0F,$0F,$0F,$0F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$FF

CODE_0FA12A:
	TYX
	LDA.b #$40
	STA.w $7542,x
	JSR.w CODE_0F9DBE
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7221,x
	LDY.b $16,x
	INC.b $16,x
	LDA.w DATA_0FA105,y
	BMI.b CODE_0FA146
	STA.w $1063
	RTS

CODE_0FA146:
	JSR.w CODE_0F9FFB
	JSR.w CODE_0F9FA2
	RTS

CODE_0FA14D:
	TYX
	LDA.b #$40
	STA.w $7542,x
	LDA.b #$12
	STA.w $1063
	LDA.w $7860,x
	AND.b #$01
	BNE.b CODE_0FA16E
	LDA.w $7182,x
	CMP.b #$A0
	BCS.b CODE_0FA16E
	LDA.w $1074
	BEQ.b CODE_0FA16E
	JMP.w CODE_0FA279

CODE_0FA16E:
	LDA.w $1073
	CLC
	ADC.w $1072
	STA.w $1073
	LDY.w $1060
	BNE.b CODE_0FA18E
	LDA.w $1073
	CMP.b #$00
	BNE.b CODE_0FA18E
CODE_0FA184:
	STZ.w $1073
	STZ.b $16,x
	LDA.b #$0C
	STA.w $105F
CODE_0FA18E:
	RTS

DATA_0FA18F:
	db $16,$16,$16,$16,$15,$15,$15,$15,$14,$14,$14,$14,$12,$12,$12,$12
	db $12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12
	db $12,$12,$12,$12,$12,$12,$12,$12,$FF

CODE_0FA1B8:
	TYX
	LDA.b #$40
	STA.w $7542,x
	JSR.w CODE_0FA5CE
	NOP #6
	LDY.b $16,x
	INC.b $16,x
	LDA.w DATA_0FA18F,y
	BMI.b CODE_0FA1D4
	STA.w $1063
	RTS

CODE_0FA1D4:
	JMP.w CODE_0FA184

DATA_0FA1D7:
	db $12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12,$12
	db $12,$12,$12,$12,$13,$13,$13,$13,$13,$13,$13,$13,$13,$13,$12,$12
	db $12,$12,$13,$13,$13,$13,$13,$13,$13,$13,$13,$13,$14,$14,$14,$14
	db $15,$15,$15,$15,$16,$16,$16,$16,$00,$00,$00,$00,$0F,$0F,$0F,$0F
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$FF

DATA_0FA22C:
	dw $0000,$0000

CODE_0FA230:
	TYX
	LDA.b #$40
	STA.w $7542,x
	JSR.w CODE_0FA5CE
	NOP #6
	LDY.b $16,x
	INC.b $16,x
	LDA.w DATA_0FA1D7,y
	BMI.b CODE_0FA275
	STA.w $1063
	CPY.b #$30
	BNE.b CODE_0FA25F
	LDA.b #$80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b #$FD
	STA.w $7223,x
	LSR.w $7860,x
	ASL.w $7860,x
CODE_0FA25F:
	CPY.b #$2C
	BCC.b CODE_0FA274
	CPY.b #$38
	BCS.b CODE_0FA274
	LDY.w $7400,x
	REP.b #$20
	LDA.w DATA_0FA22C,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
CODE_0FA274:
	RTS

CODE_0FA275:
	JSR.w CODE_0F9FFB
	RTS

CODE_0FA279:
	LDA.b #$0D
	STA.w $105F
	STZ.b $16,x
	RTS

DATA_0FA281:
	db $17,$17,$18,$18,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$19,$19,$19,$19
	db $1A,$1A,$1A,$1A,$19,$19,$19,$19,$18,$18,$18,$18,$17,$17,$17,$17
	db $FF

DATA_0FA312:
	dw $0100,$FF00,$0100

CODE_0FA318:
	TYX
	LDA.w $6FA3,x
	AND.b #$FC
	STA.w $6FA3,x
	LDA.w $1073
	BNE.b CODE_0FA36A
	LDA.b $16,x
	LSR
	LSR
	NOP #4
	ASL
	AND.b #$02
	CLC
	ADC.w $7400,x
	TAY
	REP.b #$20
	LDA.w DATA_0FA312,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	SEP.b #$20
	LDY.b $16,x
	INC.b $16,x
	LDA.w DATA_0FA281,y
	BPL.b CODE_0FA352
	JMP.w CODE_0F9FFB

CODE_0FA352:
	PHA
	LDA.b #$00
	LDY.w $1072
	BMI.b CODE_0FA35C
	LDA.b #$02
CODE_0FA35C:
	PLY
	CMP.w $7400,x
	BNE.b CODE_0FA366
	INY
	INY
	INY
	INY
CODE_0FA366:
	STY.w $1063
	RTS

CODE_0FA36A:
	CLC
	ADC.w $1072
	STA.w $1073
	LDA.b #$12
	STA.w $1063
	RTS

DATA_0FA377:
	dw $0080,$FF80

DATA_0FA37B:
	dw $FF60,$FF80,$FF70,$FF80

CODE_0FA383:
	TYX
	LDA.b #$12
	STA.w $1063
	LDA.w $7182,x
	CMP.b #$D0
	BCC.b CODE_0FA398
	INC.w $105F
	LDA.b #$60
	STA.w $7A96,x
CODE_0FA398:
	LDA.w $1073
	BEQ.b CODE_0FA3A4
	CLC
	ADC.w $1072
	STA.w $1073
CODE_0FA3A4:
	LDY.b #$01
	LDA.w $0030
	BIT.b #$03
	BNE.b CODE_0FA3BB
	AND.b #$20
	BEQ.b CODE_0FA3B3
	LDY.b #$FF
CODE_0FA3B3:
	TYA
	CLC
	ADC.w $105D
	STA.w $105D
CODE_0FA3BB:
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $0030
	LSR
	LSR
	NOP #3
	AND.w #$0002
	TAY
	LDA.w DATA_0FA377,y
	CLC
	ADC.w #$0040
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0FA3D6:
	REP.b #$20
	LDA.w $0030
	AND.w #$0003
	BNE.b CODE_0FA444
	LDA.b $10
	AND.w #$003F
	CLC
	ADC.w #$FFE0
	STA.b $00
	ASL
	ASL
	NOP
	STA.b $02
	LDA.b $10
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_0FA37B,y
	STA.b $04
	LDA.w #!Define_YI_AmbSpr1C7
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70A2,y
	LDA.w #$07C0
	STA.w $7142,y
	LDA.b $02
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.b $04
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w #$0030
	STA.w $7782,y
	LDA.w #!Define_YI_AmbSpr1D9
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.b $00
	STA.w $70A2,y
	LDA.w #$07C0
	STA.w $7142,y
	LDA.w #$000C
	STA.w $7782,y
	LDA.w #$0002
	STA.w $7E4C,y
CODE_0FA444:
	SEP.b #$20
	JSR.w CODE_0FA558
	RTS

DATA_0FA44A:
	dw $FFF0,$FFF4,$FFF8,$FFFC,$0004,$0008,$000C,$0010
	dw $FFEE,$FFF2,$FFF6,$FFFA,$0006,$000A,$000E,$0012

DATA_0FA46A:
	dw $FF00,$FF40,$FF80,$FFC0,$0040,$0080,$00C0,$0100
	dw $FF20,$FF60,$FFA0,$FFE0,$0020,$0060,$00A0,$00E0

DATA_0FA48A:
	dw $FE20,$FE00,$FE40,$FE10,$FDF0,$FDF8,$FE30,$FE60
	dw $FE58,$FE28,$FDF0,$FDE8,$FE08,$FE38,$FDF8,$FE18

DATA_0FA4AA:
	dw $0030,$0030,$0030,$0030,$0030,$0030,$0030,$0030
	dw $0030,$0030,$0030,$0030,$0030,$0030,$0030,$0030

CODE_0FA4CA:
	REP.b #$20
	LDA.w $70E2,x
	STA.b $00
	LDA.w #$001E
	STA.b $08
CODE_0FA4D6:
	LDA.w #!Define_YI_AmbSpr1C7
	JSL.l CODE_008B21
	LDX.b $08
	LDA.b $00
	CLC
	ADC.w DATA_0FA44A,x
	STA.w $70A2,y
	LDA.w #$07C0
	STA.w $7142,y
	LDA.w DATA_0FA46A,x
	STA.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w DATA_0FA48A,x
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.w DATA_0FA4AA,x
	STA.w $7782,y
	LDA.w #$0020
	STA.w $7502,y
	LDX.b $12
	DEC.b $08
	DEC.b $08
	BPL.b CODE_0FA4D6
	SEP.b #$20
	RTS

DATA_0FA511:
	dw $0080,$FF00

CODE_0FA515:
	TYX
	JSR.w CODE_0FA3D6
	LDA.w $7A96,x
	BNE.b CODE_0FA521
	INC.w $105F
CODE_0FA521:
	LDY.b #$12
	LDA.w $0030
	AND.b #$18
	BEQ.b CODE_0FA52B
	INY
CODE_0FA52B:
	STY.w $1063
	LDY.b #$01
	LDA.w $0030
	BIT.b #$00
	BNE.b CODE_0FA545
	AND.b #$08
	BEQ.b CODE_0FA53D
	LDY.b #$FF
CODE_0FA53D:
	TYA
	CLC
	ADC.w $105D
	STA.w $105D
CODE_0FA545:
	REP.b #$20
	LDA.w $0030
	LSR
	LSR
	NOP #2
	AND.w #$0002
	TAY
	LDA.w DATA_0FA511,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0FA558:
	SEP.b #$20
	LDA.w $0030
	AND.b #$1F
	BNE.b CODE_0FA567
	LDA.b #!Define_YI_SoundID62_MelonBugBump
	JSL.l CODE_0085D2
CODE_0FA567:
	RTS

DATA_0FA568:
	db $FF,$01

CODE_0FA56A:
	TYX
	JSR.w CODE_0FA3D6
	LDA.b #$40
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7223,x
	LDA.w $0030
	AND.b #$03
	BNE.b CODE_0FA58C
	LDA.w $7400,x
	LSR
	TAY
	LDA.w DATA_0FA568,y
	CLC
	ADC.w $1073
	STA.w $1073
CODE_0FA58C:
	LDA.w $7183,x
	CMP.b #$08
	BCC.b CODE_0FA5BB
	LDA.b #$11
	STA.w $105F
	LDA.b #$20
	STA.w $7A96,x
	REP.b #$20
	JSL.l CODE_02A982
	LDA.w $70E2,x
	CLC
	ADC.w #$0000
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w #$0000
	STA.b $02
	JSL.l CODE_02E19C
	SEP.b #$20
CODE_0FA5BB:
	JSR.w CODE_0FA558
	RTS

CODE_0FA5BF:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FA5CD
	REP.b #$20
	JSL.l CODE_03A32E
	SEP.b #$20
CODE_0FA5CD:
	RTS

CODE_0FA5CE:
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0FA5E1
	BPL.b CODE_0FA5DD
	CLC
	ADC.w #$0010
	BRA.b CODE_0FA5E1

CODE_0FA5DD:
	SEC
	SBC.w #$0010
CODE_0FA5E1:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	RTS

CODE_0FA5E7:
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0FA5FA
	BPL.b CODE_0FA5F6
	CLC
	ADC.w #$0002
	BRA.b CODE_0FA5FA

CODE_0FA5F6:
	SEC
	SBC.w #$0002
CODE_0FA5FA:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_0FA5FE:
	REP.b #$20
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.b $0E
	BPL.b CODE_0FA60F
	LDY.b #$02
CODE_0FA60F:
	SEP.b #$20
	RTS

DATA_0FA612:
	db $F8,$08

DATA_0FA614:
	dw $0100,$FF00,$0200,$FE00,$0100,$FF00,$0200,$FE00

CODE_0FA624:
	REP.b #$20
	LDY.w $7D36,x
	DEY
	BPL.b CODE_0FA62F
CODE_0FA62C:
	JMP.w CODE_0FA6D0

CODE_0FA62F:
	LDA.w $1069
	BNE.b CODE_0FA62C
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_0FA62C
	LDA.w $7D38,y
	BEQ.b CODE_0FA62C
	LDA.w $7542,y
	STA.b $00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	ASL
	SEP.b #$20
	LDY.b #$00
	BCC.b CODE_0FA651
	INY
CODE_0FA651:
	LDA.b #$0B
	STA.w $105F
	STZ.b $16,x
	LDA.w DATA_0FA612,y
	STA.w $1072
	ROR
	EOR.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,x
	BPL.b CODE_0FA666
	INY
	INY
CODE_0FA666:
	LDA.b $00
	CMP.b #$00
	BNE.b CODE_0FA675
	INY
	INY
	INY
	INY
	LDA.b #$0A
	STA.w $105F
CODE_0FA675:
	TYA
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_0FA614,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.w $7860,x
	AND.b #$01
	BNE.b CODE_0FA6B5
	LDY.w $7D36,x
	DEY
	REP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	PHP
	PHP
	ROR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLP
	ROR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	PLP
	ROR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	SEP.b #$20
	LDA.b #$00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b #$FE
	STA.w $7223,x
	LSR.w $7860,x
	ASL.w $7860,x
CODE_0FA6B5:
	LDA.b #!Define_YI_SoundID2E_ClankSound7
	JSL.l CODE_0085D2
	LDA.b #$20
	STA.w $1069
	REP.b #$20
	LDY.w $7D36,x
	DEY
	TYX
	STZ.w $7D38,x
	JSL.l CODE_03B24B
	LDX.b $12
CODE_0FA6D0:
	SEP.b #$20
	RTS

DATA_0FA6D3:
	dw FXDATA_550000+$4081,FXDATA_550000+$40A1,FXDATA_550000+$6081,FXDATA_550000+$60A1

CODE_0FA6DB:
	REP.b #$20
	LDA.w $7402,x
	BNE.b CODE_0FA71A
	LDA.w $0030
	AND.w #$0001
	BNE.b CODE_0FA703
	LDA.b $D9,x
	AND.w #$000F
	ASL
	STA.b $02
	LDA.w #$0040
	STA.b $00
	LDA.w $105D
	CLC
	ADC.w $1073
	JSR.w CODE_0FA71D
	BRA.b CODE_0FA71A

CODE_0FA703:
	LDA.w #$0006
	STA.b $02
	LDA.w #$0060
	STA.b $00
	LDA.w $105E
	CLC
	ADC.w $1073
	JSR.w CODE_0FA71D
	JSR.w CODE_0FA75B
CODE_0FA71A:
	SEP.b #$20
	RTS

CODE_0FA71D:
	LDY.w $7400,x
CODE_0FA720:
	BEQ.b CODE_0FA726
	EOR.w #$00FF
	INC
CODE_0FA726:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $1064
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $02
	LDA.w DATA_0FA6D3,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$4081)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.b $00
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

CODE_0FA75B:
	LDY.w $1073
	TYA
	CLC
	ADC.w $105D
	LDY.w $7400,x
	BEQ.b CODE_0FA76C
	EOR.w #$00FF
	INC
CODE_0FA76C:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $1064
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDY.b $02
	LDA.w #FXDATA_550000+$00C1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$00C1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08881C>>16
	LDA.w #FXCODE_08881C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

DATA_0FA79F:
	db $B0,$98,$05,$F7,$B0,$98,$09,$F5,$B0,$98,$0A,$F2,$B0,$98,$0D,$EF
	db $B0,$98,$0F,$EC,$B0,$98,$11,$E9,$B0,$98,$17,$E9,$B1,$98,$18,$E8
	db $B0,$98,$17,$E9,$B0,$98,$17,$EE,$B0,$98,$F0,$14,$B0,$98,$12,$F4
	db $B0,$98,$10,$F7,$B0,$98,$0C,$F9,$B0,$98,$05,$F8,$B0,$98,$06,$F6
	db $B0,$98,$06,$F9,$B0,$98,$09,$FD,$B0,$98,$DF,$D7,$B0,$98,$DF,$D7
	db $B0,$98,$E6,$DB,$B0,$98,$F0,$E2,$B0,$98,$FB,$EE,$B0,$98,$12,$FB
	db $B0,$98,$1C,$FB,$B0,$98,$29,$03,$B0,$98,$29,$02,$B0,$98,$06,$EC
	db $B0,$98,$03,$E0,$B0,$98,$02,$D9,$B0,$98,$FD,$D6,$AC,$98,$10,$F0
	db $A0,$98,$17,$E9

DATA_0FA823:
	db $17,$0A,$19,$1A,$17,$0A,$1D,$18,$17,$0A,$1F,$1A,$17,$0A,$20,$19
	db $17,$0A,$22,$1B,$17,$0A,$20,$1C,$17,$0A,$1F,$1F,$17,$0A,$1E,$1E
	db $17,$0A,$1E,$1E,$17,$0A,$1C,$20,$17,$0A,$21,$1B,$17,$0A,$19,$20
	db $17,$0A,$19,$20,$17,$0A,$1A,$1E,$17,$0A,$19,$1A,$17,$0A,$17,$18
	db $17,$0A,$20,$20,$17,$0A,$24,$25,$17,$0A,$13,$1A,$17,$0A,$13,$1A
	db $17,$0A,$14,$1A,$17,$0A,$16,$1A,$17,$0A,$19,$1B,$17,$0A,$1D,$1E
	db $17,$0A,$1C,$23,$17,$0A,$20,$26,$17,$0A,$1E,$25,$17,$0A,$1F,$1D
	db $17,$0A,$23,$1E,$17,$0A,$25,$1B,$17,$0A,$26,$1F,$13,$0A,$1C,$1C
	db $0C,$0A,$1E,$1E

DATA_0FA8A7:
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $03,$06,$1A,$1A,$1C,$1D,$1F,$02,$05,$09,$08,$03,$06,$08,$07,$00
	db $00

DATA_0FA8C8:
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$01,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$00
	db $00

CODE_0FA8E9:
	LDA.w $7402,x
	BEQ.b CODE_0FA8EF
CODE_0FA8EE:
	RTS

CODE_0FA8EF:
	LDA.w $7363,x
	BMI.b CODE_0FA8EE
	LDY.w $1063
	LDA.w DATA_0FA8C8,y
	STA.b $D9,x
	LDA.w DATA_0FA8A7,y
	ASL
	ASL
	ASL
	LDY.w $7400,x
	BEQ.b CODE_0FA90A
	EOR.b #$FF
	INC
CODE_0FA90A:
	CLC
	ADC.w $105D
	STA.w $105E
	LDA.b #$03
	STA.b $0A
CODE_0FA915:
	LDA.w $1063
	ASL
	ASL
	CLC
	ADC.b $0A
	TAY
	LDA.w DATA_0FA823,y
	STA.w !REGISTER_Multiplicand
	PHX
	LDX.w $1064
	INX
	STX.w !REGISTER_Multiplier
	BEQ.b CODE_0FA938
	NOP #2
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
CODE_0FA938:
	STA.b $0E
	PLX
	LDA.w DATA_0FA79F,y
	LDY.w $7400,x
	BEQ.b CODE_0FA946
	EOR.b #$FF
	INC
CODE_0FA946:
	STA.b $00
	JSR.w CODE_0FA9BD
	DEC.b $0A
	BPL.b CODE_0FA915
	LDY.w $1063
	LDA.w DATA_0FA99C,y
	CLC
	ADC.b #$00
	PHA
	BPL.b CODE_0FA95E
	EOR.b #$FF
	INC
CODE_0FA95E:
	STA.b $0E
	LDA.w $105D
	CLC
	ADC.b #$80
	STA.b $0C
	JSR.w CODE_0FB91A
	PLY
	REP.b #$20
	LDA.b $02
	CPY.b #$00
	BPL.b CODE_0FA978
	EOR.w #$FFFF
	INC
CODE_0FA978:
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $00
	CPY.b #$00
	BPL.b CODE_0FA985
	EOR.w #$FFFF
	INC
CODE_0FA985:
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $7362,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_09A02A>>16
	LDA.w #FXCODE_09A02A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDX.b $12
	RTS

DATA_0FA99C:
	db $00,$03,$05,$05,$07,$04,$01,$00,$00,$04,$06,$06,$06,$05,$00,$FE
	db $02,$04,$00,$00,$00,$00,$00,$06,$0E,$0F,$0E,$06,$0E,$0F,$0E,$00
	db $00

CODE_0FA9BD:
	LDA.w $105D
	CLC
	ADC.w $1073
	CLC
	ADC.b $00
	STA.b $0C
	LSR
	LSR
	LSR
	LSR
	LSR
	AND.b #$06
	TAX
	JMP.w (DATA_0FA9D4,x)

DATA_0FA9D4:
	dw CODE_0FA9DC
	dw CODE_0FAA22
	dw CODE_0FAA6B
	dw CODE_0FAAB7

CODE_0FA9DC:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $00
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $02
	JMP.w CODE_0FAB04

CODE_0FAA22:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $02
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $00
	JMP.w CODE_0FAB04

CODE_0FAA6B:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $00
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $02
	JMP.w CODE_0FAB04

CODE_0FAAB7:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $02
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $00
	JMP.w CODE_0FAB04

DATA_0FAB00:
	db $00,$48,$08,$28

CODE_0FAB04:
	LDX.b $12
	STZ.b $01
	LDA.b $00
	BPL.b CODE_0FAB0E
	DEC.b $01
CODE_0FAB0E:
	STZ.b $03
	LDA.b $02
	BPL.b CODE_0FAB16
	DEC.b $03
CODE_0FAB16:
	STZ.b $0B
	LDA.b $0A
	REP.b #$30
	AND.w #$000F
	TAY
	CPY.w #$0001
	BCC.b CODE_0FAB54
	LDA.w $7400,x
	AND.w #$00FF
	BEQ.b CODE_0FAB54
	LDA.w DATA_0FAB00,y
	AND.w #$00FF
	CLC
	ADC.w $7362,x
	TAY
	LDA.w $6000,y
	CLC
	ADC.b $02
	CLC
	ADC.w #$0000
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.w #$FFF0
	STA.w $6008,y
	STA.w $6018,y
	BRA.b CODE_0FAB79

CODE_0FAB54:
	LDA.w DATA_0FAB00,y
	AND.w #$00FF
	CLC
	ADC.w $7362,x
	TAY
	LDA.w $6000,y
	CLC
	ADC.b $02
	STA.w $6000,y
	LDX.b $0A
	BEQ.b CODE_0FAB79
	STA.w $6010,y
	CLC
	ADC.w #$0010
	STA.w $6008,y
	STA.w $6018,y
CODE_0FAB79:
	LDA.w $6002,y
	CLC
	ADC.b $00
	STA.w $6002,y
	LDX.b $0A
	BEQ.b CODE_0FAB93
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
CODE_0FAB93:
	LDA.b $12
	AND.w #$00FF
	TAX
	LDY.w $7362,x
	LDA.w $1064
	AND.w #$00FF
	SEC
	SBC.w #$0050
	LSR
	LSR
	LSR
	LSR
	ASL
	TAX
	LDA.w $6004,y
	AND.w #$FF00
	ORA.w DATA_0FABBD,x
	STA.w $6004,y
	SEP.b #$30
	LDX.b $12
	RTS

;---------------------------------------------------------------------------

DATA_0FABBD:
	dw $0008,$0008,$0008,$0008,$000A,$000A,$000A,$000A
	dw $000C,$000C,$000E

ADDR_0FABD3:
	REP.b #$20
	SEP.b #$10
YI_NorSpr05A_RaphaelSparkAttack_Init:
	RTL

;---------------------------------------------------------------------------

DATA_0FABD8:
	dw $0003,$FFFD

DATA_0FABDC:
	db $00,$00,$00,$00,$04,$04,$04,$04,$FF

YI_NorSpr05A_RaphaelSparkAttack_Main:
;$0FABE5
	JSL.l CODE_03AF23
	SEP.b #$20
	LDA.b #$47
	STA.l $000051
	LDA.w $7A38,x
	BEQ.b CODE_0FAC0F
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0FABDC,y
	BMI.b CODE_0FAC52
	STA.w $7402,x
	LDA.w $7040,x
	AND.b #$FC
	STA.w $7040,x
	REP.b #$20
	RTL

CODE_0FAC0F:
	LDY.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_0FABD8,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,x
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	STA.b $00
	LDA.b #$38
	STA.b $0E
	JSR.w CODE_0FB8F8
	LDA.w $0030
	AND.b #$03
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,x
	STA.w $7402,x
	LDA.w $0030
	AND.b #$00
	BNE.b CODE_0FAC4C
	LDA.w $7A36,x
	CLC
	ADC.b #$01
	STA.w $7A36,x
	CMP.b #$80
	BCC.b CODE_0FAC4C
	INC.w $7A38,x
CODE_0FAC4C:
	JSR.w CODE_0FB243
	REP.b #$20
	RTL

CODE_0FAC52:
	REP.b #$20
	JSL.l CODE_03A31E
	RTL

DATA_0FAC59:
	dw $FFF8,$0008

DATA_0FAC5D:
	dw $FFF0,$0010

CODE_0FAC61:
	SEP.b #$20
	LDA.w $1062
	PHA
	REP.b #$20
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0018
	STA.w $61C6
	SEP.b #$20
	STZ.w $1062
	JSR.w CODE_0FAC8B
	LDA.b #$02
	STA.w $1062
	JSR.w CODE_0FAC8B
	PLA
	STA.w $1062
	RTS

CODE_0FAC8B:
	REP.b #$20
	LDA.w #$005A
	JSL.l CODE_03A364
	SEP.b #$20
	BCC.b CODE_0FACAE
	LDA.w $105D
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w $1062
	STA.w $7400,y
	LDA.b #$00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.b #$05
	STA.w $74A2,y
CODE_0FACAE:
	REP.b #$20
	LDA.w #$005A
	JSL.l CODE_03A364
	SEP.b #$20
	BCC.b CODE_0FACE5
	LDX.w $1062
	TXA
	STA.w $7400,y
	LDA.w $105D
	CLC
	ADC.w DATA_0FAC59,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.b #$00
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w $7040,y
	AND.b #$FC
	STA.w $7040,y
	LDA.b #$06
	STA.w $74A2,y
	LDA.b #$04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDX.b $12
CODE_0FACE5:
	REP.b #$20
	LDA.w #$005A
	JSL.l CODE_03A364
	SEP.b #$20
	BCC.b CODE_0FAD1C
	LDX.w $1062
	TXA
	STA.w $7400,y
	LDA.w $105D
	CLC
	ADC.w DATA_0FAC5D,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.b #$04
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	LDA.w $7040,y
	AND.b #$FC
	STA.w $7040,y
	LDA.b #$07
	STA.w $74A2,y
	LDA.b #$06
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDX.b $12
CODE_0FAD1C:
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

YI_NorSpr00C_RaphaelTheRaven_Init:
;$0FAD1F
	JSR.w CODE_0FB0B6
	RTL

;---------------------------------------------------------------------------

DATA_0FAD23:
	dw FXDATA_550000+$0081,FXDATA_550000+$00C1

YI_NorSpr00C_RaphaelTheRaven_Main:
;$0FAD27
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_0FAD33
	JSL.l CODE_01B403
CODE_0FAD33:
	LDA.w $7402,x
	BEQ.b CODE_0FAD4A
	LDA.w $7040,x
	AND.w #$07FF
	ORA.w #$2000
	STA.w $7040,x
	JSL.l CODE_03AA52
	BRA.b CODE_0FAD4E

CODE_0FAD4A:
	JSL.l CODE_03AB1C
CODE_0FAD4E:
	LDA.w $7402,x
	BNE.b CODE_0FADA9
	LDA.w $105E
	LDY.w $7400,x
	BEQ.b CODE_0FAD5F
	EOR.w #$00FF
	INC
CODE_0FAD5F:
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $1064
	AND.w #$00FF
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $1065
	AND.w #$00FF
	INC
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.b #$00
	LDA.w DATA_0FAD23,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0081)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088B49>>16
	LDA.w #FXCODE_088B49
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	BRA.b CODE_0FADAC

CODE_0FADA9:
	JSR.w CODE_0FADC4
CODE_0FADAC:
	JSL.l CODE_03AF23
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_0FADBC
	JSR.w CODE_0FB14B
	RTL

CODE_0FADBC:
	JSR.w CODE_0FAE12
	RTL

DATA_0FADC0:
	dw FXDATA_550000+$4080,FXDATA_550000+$40A0

CODE_0FADC4:
	LDA.w $105E
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w $106E
	LSR
	LSR
	AND.w #$0002
	TAY
	LDA.w DATA_0FADC0,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$4080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_088205>>16
	LDA.w #FXCODE_088205
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
	RTS

CODE_0FAE12:
	LDA.w $1015
	BMI.b CODE_0FAE19
	BNE.b CODE_0FAE21
CODE_0FAE19:
	LDA.b $18,x
	ASL
	TXY
	TAX
	JMP.w (DATA_0FAE54,x)

CODE_0FAE21:
	LDA.w #$0040
	STA.w $7A96,x
	LDA.w $1070
	BNE.b CODE_0FAE4C
	LDY.b #$5C
CODE_0FAE2E:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr048_CutsceneKamek
	BNE.b CODE_0FAE4D
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_0FAE4D
	LDA.w $7A98,y
	CMP.w #$0030
	BCC.b CODE_0FAE4C
	LDA.w #$0002
	STA.w $7A98,y
	STA.w $1070
CODE_0FAE4C:
	RTS

CODE_0FAE4D:
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_0FAE2E
	RTS

DATA_0FAE54:
	dw CODE_0FAE68
	dw CODE_0FAE88
	dw CODE_0FAEA1
	dw CODE_0FAECB
	dw CODE_0FAEF3
	dw CODE_0FAF24
	dw CODE_0FAF75
	dw CODE_0FAFCF
	dw CODE_0FB005
	dw CODE_0FB0B4

CODE_0FAE68:
	TYX
	INC.w $106E
	INC.w $106E
	LDA.w $7A96,x
	BNE.b CODE_0FAE87
	LDA.w #$0200
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	CMP.w #$048E
	BCC.b CODE_0FAE87
	INC.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0FAE87:
	RTS

CODE_0FAE88:
	TYX
	SEP.b #$20
	INC.w $106E
	INC.w $106E
	LDA.w $105E
	SEC
	SBC.b #$08
	STA.w $105E
	BNE.b CODE_0FAE9E
	INC.b $18,x
CODE_0FAE9E:
	REP.b #$20
	RTS

CODE_0FAEA1:
	TYX
	INC.w $106E
	INC.w $106E
	LDA.w #$FE00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	AND.w #$00FF
	CMP.w #$00A0
	BCS.b CODE_0FAECA
	LDA.w #$00FF
	STA.w $106E
	INC.b $18,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7A96,x
CODE_0FAECA:
	RTS

CODE_0FAECB:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FAEDA
	INC.b $18,x
	LDA.w #$0001
	STA.w $1015
	RTS

CODE_0FAEDA:
	SEP.b #$20
	REP.b #$20
	LDA.w $7182,x
	CMP.w #$048E
	BCC.b CODE_0FAEF2
	LDA.w #$048E
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_0FAEF2:
	RTS

CODE_0FAEF3:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FAF23
	SEP.b #$20
	INC.b $18,x
	LDA.w $7182,x
	CLC
	ADC.b #$10
	STA.w $7182,x
	LDA.b #$40
	STA.w $7A96,x
	STZ.w $7402,x
	REP.b #$20
	LDA.w $7040,x
	AND.w #$07FF
	ORA.w #$8000
	STA.w $7040,x
	JSL.l CODE_03AB1C
	STZ.w $1015
CODE_0FAF23:
	RTS

CODE_0FAF24:
	TYX
	SEP.b #$20
	LDA.w $7A96,x
	BNE.b CODE_0FAF43
	LDA.b #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	INC.b $18,x
	LDA.b #$C0
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.b #$FC
	STA.w $7223,x
	LDA.b #$18
	STA.w $7542,x
CODE_0FAF43:
	AND.b #$03
	BNE.b CODE_0FAF52
	LDA.w $1064
	EOR.b #$08
	STA.w $1064
	STA.w $1065
CODE_0FAF52:
	REP.b #$20
	RTS

DATA_0FAF55:
	db $80,$84,$88,$8C,$90,$94,$98,$9C,$A0,$98,$94,$90,$8C,$88,$84,$84

DATA_0FAF65:
	db $A0,$98,$94,$90,$8C,$88,$84,$84,$80,$84,$88,$8C,$90,$94,$98,$9C

CODE_0FAF75:
	TYX
	SEP.b #$20
	LDA.w $105E
	CLC
	ADC.b #$08
	STA.w $105E
	LDA.b $D6,x
	CMP.b #$80
	BEQ.b CODE_0FAFB3
	CLC
	ADC.b #$04
	STA.b $D6,x
	LDA.w $0030
	NOP #4
	AND.b #$0F
	TAY
	LDA.w DATA_0FAF55,y
	CLC
	ADC.b $D6,x
	BCC.b CODE_0FAFA0
	LDA.b #$FF
CODE_0FAFA0:
	STA.w $1064
	LDA.w DATA_0FAF65,y
	CLC
	ADC.b $D6,x
	BCC.b CODE_0FAFAD
	LDA.b #$FF
CODE_0FAFAD:
	STA.w $1065
	REP.b #$20
	RTS

CODE_0FAFB3:
	LDA.b #$FF
	STA.w $1064
	STA.w $1065
	STZ.w $105E
	REP.b #$20
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $18,x
	LDA.w #$0020
	STA.w $7A96,x
	RTS

CODE_0FAFCF:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FB004
	LDA.w #$0800
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w $7182,x
	CMP.w #$0493
	BCC.b CODE_0FB004
	LDA.w #$0493
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	INC.b $18,x
	LDA.w #$0020
	STA.w $7A96,x
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	LDA.w #$0018
	STA.w $61C6
CODE_0FB004:
	RTS

CODE_0FB005:
	TYX
	SEP.b #$20
	LDA.w $0030
	NOP #3
	AND.b #$07
	TAY
	LDA.w DATA_0FB48D,y
	STA.w $1064
	LDA.w DATA_0FB495,y
	STA.w $1065
	REP.b #$20
	LDY.w $7A96,x
	BNE.b CODE_0FB004
	LDA.w $0030
	AND.w #$0001
	BNE.b CODE_0FB05C
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w #$0010
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0012
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7E4C,y
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0000
	STA.w $7462,y
CODE_0FB05C:
	LDA.w #$FB80
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.w $7D36,x
	BPL.b CODE_0FB0B3
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_PlayerState1E_PushedAwayByRaphael
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	JSL.l CODE_03BFF7
	LDA.w #$FC00
	STA.w $60A8
	LDA.w #$FE00
	STA.w $60AA
	INC.b $18,x
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_AmbSpr1E6
	JSL.l CODE_008B21
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0007
	STA.w $73C2,y
	STA.w $7E4C,y
CODE_0FB0B3:
	RTS

CODE_0FB0B4:
	TYX
	RTS

CODE_0FB0B6:
	REP.b #$20
	JSL.l CODE_03ADFE
	SEP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$09
	BEQ.b CODE_0FB0FD
	LDA.b #$40
	STA.w $105E
	LDA.b #$7F
	STA.w $1064
	STA.w $1065
	STZ.b $D6,x
	STZ.w $1070
	STZ.w $1071
	LDA.b #$04
	STA.w $7402,x
	LDA.b #$40
	STA.w $7A96,x
	REP.b #$20
	STZ.w $60C4
	LDA.w $7182,x
	SEC
	SBC.w #$0008
	STA.w $7182,x
	STZ.w $7542,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	JSR.w CODE_0FADC4
	RTS

CODE_0FB0FD:
	SEP.b #$20
	LDA.b #$80
	STA.w $105D
	STA.w $105E
	LDA.b #$07
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b #$60
	STA.w $105C
	LDA.b #$50
	STA.w $1064
	STA.w $1065
	LDA.b #$00
	STA.b $D9,x
	DEC
	STA.b $76,x
	STZ.b $77,x
	LDA.b #$80
	STA.w $1068
	REP.b #$20
	LDA.w #$0140
	STA.w $70E2,x
	LDA.w $6FA0,x
	AND.w #$C7FF
	STA.w $6FA0,x
	JSL.l CODE_0CDB4D
	RTS

CODE_0FB13D:
	LDA.b #$42
	STA.w $105C
	LDA.b #$FF
	STA.w $1064
	STA.w $1065
	RTS

CODE_0FB14B:
	SEP.b #$20
	LDA.w $1068
	CMP.b #$80
	BEQ.b CODE_0FB15F
	BCS.b CODE_0FB15C
	INC.w $1068
	INC.w $1068
CODE_0FB15C:
	DEC.w $1068
CODE_0FB15F:
	LDA.w $60A0
	CMP.w $1068
	BEQ.b CODE_0FB16F
	BCS.b CODE_0FB16B
	INC
	INC
CODE_0FB16B:
	DEC
	STA.w $60A0
CODE_0FB16F:
	LDA.b $D6,x
	BEQ.b CODE_0FB175
	DEC.b $D6,x
CODE_0FB175:
	AND.b #$02
	CLC
	ADC.w $60A0
	STA.w $60A0
	LDA.w $1062
	STA.w $7400,x
	LDA.w $1060
	BEQ.b CODE_0FB18C
	DEC.w $1060
CODE_0FB18C:
	LDA.w $1061
	BEQ.b CODE_0FB194
	DEC.w $1061
CODE_0FB194:
	JSR.w CODE_0FB2AC
	LDA.w $105C
	CLC
	ADC.w $1074
	STA.b $0E
	STZ.w $1074
	JSR.w CODE_0FB905
	JSR.w CODE_0FB22F
	JSR.w CODE_0FB1E6
	REP.b #$20
	RTS

CODE_0FB1AF:
	LDA.b $76,x
	CMP.b #$FF
	BEQ.b CODE_0FB1BE
	TYA
	CLC
	ADC.b $76,x
	STA.b $76,x
	BCS.b CODE_0FB1BE
	RTS

CODE_0FB1BE:
	LDA.b #$FF
	STA.b $76,x
	LDA.b $16,x
	ASL
	TAY
	LDA.w DATA_0FB21B,y
	STA.b $00
	LDA.w DATA_0FB21B+$01,y
	STA.b $01
	LDA.b #DATA_5FE58C>>16
	STA.b $02
	PHX
	LDX.b #$00
	TXY
CODE_0FB1D8:
	LDA.b [$00],y
	STA.l $702F2E,x
	INY
	INX
	CPX.b #$1E
	BNE.b CODE_0FB1D8
	PLX
	RTS

CODE_0FB1E6:
	REP.b #$20
	LDA.b $16,x
	ASL
	TAY
	LDA.w DATA_0FB21B,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_5FE58C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.b $76,x
	AND.w #$00FF
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$00E1
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$000F
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08E167>>16
	LDA.w #FXCODE_08E167
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$30
	LDX.b $12
	RTS

DATA_0FB21B:
	dw DATA_5FE58C,DATA_5FE5AA,DATA_5FE5C8,DATA_5FE5E6,DATA_5FE604,DATA_5FE622,DATA_5FE6DA,DATA_5FE6F8
	dw DATA_5FE716,DATA_5FE734

CODE_0FB22F:
	LDA.w $093C
	AND.b #$10
	BRA.b CODE_0FB242

CODE_0FB236:
	LDA.b #$00
	STA.b $16,x
	JSR.w CODE_0FB0B6
	SEP.b #$20
	STZ.w $105F
CODE_0FB242:
	RTS

CODE_0FB243:
	REP.b #$20
	LDY.w $7D36,x
	BPL.b CODE_0FB24E
	JSL.l CODE_03A858
CODE_0FB24E:
	SEP.b #$20
	RTS

CODE_0FB251:
	REP.b #$20
	JSL.l CODE_0F9388
	SEP.b #$20
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.b #$0E
	BNE.b CODE_0FB281
	LDA.b #$10
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.b #$0C
	STA.w $105F
	LDA.b #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	LDA.b #$20
	STA.w $7A96,x
	LDA.b #$00
	STA.w $60AA
	LDA.b #$FC
	STA.w $60AB
	PLA
	PLA
CODE_0FB281:
	RTS

DATA_0FB282:
	dw CODE_0FB31A
	dw CODE_0FB337
	dw CODE_0FB363
	dw CODE_0FB391
	dw CODE_0FB425
	dw CODE_0FB4A5
	dw CODE_0FB523
	dw CODE_0FB53C
	dw CODE_0FB581
	dw CODE_0FB67A
	dw CODE_0FB694
	dw CODE_0FB5D4
	dw CODE_0FB633
	dw CODE_0FB6C9
	dw CODE_0FB733
	dw CODE_0FB76E
	dw CODE_0FB7BD
	dw CODE_0FB833
	dw CODE_0FB84D
	dw CODE_0FB866
	dw CODE_0FB8DB

CODE_0FB2AC:
	LDA.w $0D07
	BEQ.b CODE_0FB311
	STZ.w $0D07
	LDA.w $105D
	CLC
	ADC.w $0D05
	CLC
	ADC.b #$80
	CLC
	ADC.b #$0E
	CMP.b #$1C
	BCS.b CODE_0FB311
	LDA.w $105C
	CMP.b #$44
	BCS.b CODE_0FB311
	LDA.b #!Define_YI_SoundID78_HurtBoss
	JSL.l CODE_0085D2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.b #$01
	BNE.b CODE_0FB2FA
	LDA.b #$0D
	STA.w $105F
	LDA.b #$A0
	STA.w $1060
	LDA.b #$A0
	STA.w $1061
	REP.b #$20
	LDA.w #!Define_YI_PlayerState02_InCutscene
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	STZ.w $617A
	STZ.w $617C
	SEP.b #$20
	BRA.b CODE_0FB311

CODE_0FB2FA:
	LDA.b #$0B
	STA.w $105F
	LDA.b #$08
	STA.w $106C
	LDA.b #$A0
	STA.w $1065
	STZ.w $1060
	LDA.b #$18
	STA.w $1061
CODE_0FB311:
	TXY
	LDA.w $105F
	ASL
	TAX
	JMP.w (DATA_0FB282,x)

CODE_0FB31A:
	TYX
	LDA.w $0030
	LSR
	LSR
	LSR
	LSR
	AND.b #$01
	STA.w $1063
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.b #!Define_YI_PlayerState20_EnteringRaphaelBossRoom
	BEQ.b CODE_0FB336
	INC.w $105F
	LDA.b #$50
	STA.w $1060
CODE_0FB336:
	RTS

CODE_0FB337:
	TYX
	LDA.w $0030
	LSR
	LSR
	LSR
	LSR
	AND.b #$01
	STA.w $1063
	LDA.w $1060
	BNE.b CODE_0FB362
	LDA.b #$01
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w $60A8
	STZ.w $60A9
	STZ.w $60B4
	STZ.w $60B5
	INC.w $105F
	LDA.b #$A0
	STA.w $1060
CODE_0FB362:
	RTS

CODE_0FB363:
	TYX
	JSR.w CODE_0FB40E
	LDA.w $1060
	BEQ.b CODE_0FB37D
	CMP.b #$30
	BCC.b CODE_0FB37C
	AND.b #$0F
	BNE.b CODE_0FB37C
	LDA.w $1062
	EOR.b #$02
	STA.w $1062
CODE_0FB37C:
	RTS

CODE_0FB37D:
	INC.w $105F
	LDA.b #$00
	STA.w $1066
	LDA.b #$50
	STA.w $1060
	LDA.b #!Define_YI_SoundID89_FallingToMoon
	JSL.l CODE_0085D2
	RTS

CODE_0FB391:
	TYX
	JSR.w CODE_0FB40E
	LDA.w $0030
	AND.b #$03
	BEQ.b CODE_0FB3A5
	LDA.b $76,x
	BEQ.b CODE_0FB3A5
	SEC
	SBC.b #$01
	STA.b $76,x
CODE_0FB3A5:
	LDA.w $0030
	LSR
	LSR
	LSR
	AND.b #$01
	STA.w $1063
	LDA.w $0030
	AND.b #$07
	BNE.b CODE_0FB3BA
	INC.w $1066
CODE_0FB3BA:
	JSR.w CODE_0FB3EC
	LDA.w $1060
	AND.b #$01
	BNE.b CODE_0FB3D2
	LDA.w $1064
	CMP.b #$F8
	BEQ.b CODE_0FB3D2
	INC
	STA.w $1064
	STA.w $1065
CODE_0FB3D2:
	LDA.w $105D
	AND.b #$FE
	CMP.b #$7E
	BNE.b CODE_0FB3EB
	LDA.b #$80
	STA.w $105D
	INC.w $105F
	LDA.b #$30
	STA.w $1060
	STZ.w $106C
CODE_0FB3EB:
	RTS

CODE_0FB3EC:
	LDA.w $1066
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.w $1067
	STA.w $1067
	LDA.w $1066
	PHP
	LSR
	LSR
	LSR
	LSR
	PLP
	BPL.b CODE_0FB407
	ORA.b #$F0
CODE_0FB407:
	ADC.w $105D
	STA.w $105D
	RTS

CODE_0FB40E:
	REP.b #$20
	LDA.w $7182,x
	SEC
	SBC.w #$00B8
	LSR
	LSR
	NOP #2
	CLC
	ADC.w #$0076
	STA.w $1068
	SEP.b #$20
	RTS

CODE_0FB425:
	TYX
	JSR.w CODE_0FB40E
	LDA.b $D9,x
	AND.b #$FE
	CMP.b #$80
	BEQ.b CODE_0FB437
	CLC
	ADC.b #$08
	STA.b $D9,x
	RTS

CODE_0FB437:
	STA.b $D9,x
	LDA.w $1060
	BNE.b CODE_0FB455
	LDA.w $105C
	CLC
	ADC.w $106C
	STA.w $105C
	DEC.w $106C
	DEC.w $106C
	LDA.w $105C
	CMP.b #$42
	BCC.b CODE_0FB456
CODE_0FB455:
	RTS

CODE_0FB456:
	JSR.w CODE_0FB4E0
	LDA.b #$80
	STA.w $1060
	LDA.b #$80
	STA.b $D9,x
	LDA.b #$20
	STA.b $D6,x
	LDA.b #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	PHX
	LDX.b #$00
CODE_0FB46F:
	LDA.l DATA_5FE6DA,x
	STA.l $702F2E,x
	INX
	CPX.b #$1E
	BNE.b CODE_0FB46F
	PLX
	LDA.b #$FF
	STA.b $76,x
	LDA.b #$06
	STA.b $16,x
	JSR.w CODE_0FB13D
	RTS

DATA_0FB489:
	db $01,$00,$FF,$00

DATA_0FB48D:
	db $FF,$F0,$E0,$D0,$D0,$E0,$F0,$FF

DATA_0FB495:
	db $E8,$F0,$F8,$FF,$FF,$F8,$F0,$E8

DATA_0FB49D:
	db $FD,$FE,$FF,$00,$00,$FF,$FE,$FD

CODE_0FB4A5:
	TYX
	JSR.w CODE_0FB251
	LDY.b #$08
	JSR.w CODE_0FB1AF
	LDA.w $106C
	BPL.b CODE_0FB4BA
	LDA.w $105C
	CMP.b #$43
	BCC.b CODE_0FB4CC
CODE_0FB4BA:
	LDA.w $105C
	CLC
	ADC.w $106C
	STA.w $105C
	CMP.b #$43
	BCC.b CODE_0FB4CC
	DEC.w $106C
	RTS

CODE_0FB4CC:
	LDA.b #$42
	STA.w $105C
	LDA.w $1060
	BNE.b CODE_0FB4EB
	LDA.w $105D
	CLC
	ADC.b #$00
	AND.b #$1F
	BNE.b CODE_0FB4EB
CODE_0FB4E0:
	LDA.b #$14
	STA.w $1060
	LDA.b #$06
	STA.w $105F
	RTS

CODE_0FB4EB:
	LDA.w $105D
	NOP #3
	AND.b #$07
	TAY
	LDA.w DATA_0FB48D,y
	STA.w $1064
	LDA.w DATA_0FB495,y
	STA.w $1065
	LDA.w DATA_0FB49D,y
	STA.w $1074
	LDY.w $1062
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CMP.b #$07
	BEQ.b CODE_0FB518
	AND.w $0030
	BNE.b CODE_0FB518
	JSR.w CODE_0FB518
CODE_0FB518:
	LDA.w $105D
	CLC
	ADC.w DATA_0FB489,y
	STA.w $105D
	RTS

CODE_0FB523:
	TYX
	JSR.w CODE_0FB251
	JSR.w CODE_0FB65A
	LDA.w $1060
	BNE.b CODE_0FB53B
	INC.w $105F
	LDA.b $10
	AND.b #$30
	ADC.b #$40
	STA.w $1060
CODE_0FB53B:
	RTS

CODE_0FB53C:
	TYX
	JSR.w CODE_0FB251
	JSR.w CODE_0FB65A
	LDA.w $1060
	BEQ.b CODE_0FB578
	CMP.b #$28
	BNE.b CODE_0FB568
	LDA.w $105E
	CLC
	ADC.b #$40
	BMI.b CODE_0FB568
	LDA.w $105E
	ASL
	ROL
	ROL
	AND.b #$02
	EOR.b #$02
	STA.w $1062
	LDA.b #$08
	STA.w $106C
	BRA.b CODE_0FB578

CODE_0FB568:
	LDA.w $1060
	AND.b #$0F
	BNE.b CODE_0FB577
	LDA.w $1062
	EOR.b #$02
	STA.w $1062
CODE_0FB577:
	RTS

CODE_0FB578:
	INC.w $105F
	LDA.b #$14
	STA.w $1060
	RTS

CODE_0FB581:
	TYX
	JSR.w CODE_0FB251
	JSR.w CODE_0FB65A
	LDY.b #$10
	JSR.w CODE_0FB1AF
	LDA.w $1060
	BNE.b CODE_0FB5C3
	LDA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	BNE.b CODE_0FB5AF
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	NOP #2
	STA.b $00
	LDA.b $10
	AND.b $00
	BNE.b CODE_0FB5AF
	LDA.b #$09
	STA.w $105F
	LDA.b #$08
	STA.w $106C
	RTS

CODE_0FB5AF:
	STZ.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_0FB5B5:
	LDA.b #$05
	STA.w $105F
	LDA.b $10
	AND.b #$7F
	ADC.b #$80
	STA.w $1060
CODE_0FB5C3:
	RTS

DATA_0FB5C4:
	db $D0,$D6,$DC,$E2,$E8,$EE,$F4,$FF

DATA_0FB5CC:
	db $FF,$F4,$EE,$E8,$E2,$DC,$D6,$D0

CODE_0FB5D4:
	TYX
	LDA.w $1061
	LSR
	AND.b #$02
	ORA.b #$2C
	STA.w $7042,x
	LDA.w $1060
	BEQ.b CODE_0FB5FB
	CMP.b #$01
	BEQ.b CODE_0FB60F
	NOP #2
	AND.b #$07
	TAY
	LDA.w DATA_0FB5C4,y
	STA.w $1064
	LDA.w DATA_0FB5CC,y
	STA.w $1065
	RTS

CODE_0FB5FB:
	JSR.w CODE_0FB65A
	LDA.w $105C
	CMP.b #$42
	BNE.b CODE_0FB60E
	LDA.b #$30
	STA.w $1060
	JSR.w CODE_0FB13D
	RTS

CODE_0FB60E:
	RTS

CODE_0FB60F:
	LSR.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.b $77,x
	LDY.b $77,x
	LDA.w DATA_0FB6A1,y
	STA.b $16,x
	STZ.b $76,x
	JSR.w CODE_0FB13D
	JMP.w CODE_0FB4E0

DATA_0FB623:
	dw $E8E4,$F0EC,$F8F4,$FFFC

DATA_0FB62B:
	dw $FCFF,$F4F8,$ECF0,$E4E8

CODE_0FB633:
	TYX
	JSR.w CODE_0FB251
	JSR.w CODE_0FB65A
	LDA.w $7A96,x
	BNE.b CODE_0FB64A
	LDA.b #$FF
	STA.w $1064
	STA.w $1065
	JMP.w CODE_0FB4E0

CODE_0FB64A:
	AND.b #$07
	TAY
	LDA.w DATA_0FB623,y
	STA.w $1064
	LDA.w DATA_0FB62B,y
	STA.w $1065
	RTS

CODE_0FB65A:
	LDA.w $105C
	CLC
	ADC.w $106C
	STA.w $105C
	DEC.w $106C
	DEC.w $106C
	LDA.w $105C
	CMP.b #$42
	BCS.b CODE_0FB679
	LDA.b #$42
	STA.w $105C
	STZ.w $106C
CODE_0FB679:
	RTS

CODE_0FB67A:
	TYX
	JSR.w CODE_0FB251
	JSR.w CODE_0FB65A
	LDA.w $105C
	CMP.b #$42
	BNE.b CODE_0FB693
	JSR.w CODE_0FAC61
	INC.w $105F
	LDA.b #$40
	STA.w $1060
CODE_0FB693:
	RTS

CODE_0FB694:
	TYX
	JSR.w CODE_0FB251
	LDA.w $1060
	BNE.b CODE_0FB6A0
	JSR.w CODE_0FB5B5
CODE_0FB6A0:
	RTS

DATA_0FB6A1:
	db $06,$08,$09,$09,$09,$09,$09,$09

DATA_0FB6A9:
	db $A0,$AC,$B8,$C4,$D0,$DC,$E8,$FF,$FF,$E8,$DC,$D0,$C4,$B8,$AC,$A0

DATA_0FB6B9:
	db $FF,$E8,$DC,$D0,$C4,$B8,$AC,$A0,$A0,$AC,$B8,$C4,$D0,$DC,$E8,$FF

CODE_0FB6C9:
	TYX
	JSR.w CODE_0FB40E
	LDA.w $1060
	BNE.b CODE_0FB6E6
	INC.w $105F
	STZ.b $76,x
	LDA.b #$01
	STA.b $16,x
	LDA.b #$30
	STA.w $1066
	LDA.b #!Define_YI_SoundID82_BossFalling
	JSL.l CODE_0085D2
CODE_0FB6E6:
	LDA.b $D9,x
	CLC
	ADC.b #$00
	STA.b $D9,x
	LDA.w $1061
	LSR
	AND.b #$02
	ORA.b #$2C
	STA.w $7042,x
	LDA.w $1060
	AND.b #$0F
	TAY
	LDA.w DATA_0FB6A9,y
	STA.w $1064
	LDA.w DATA_0FB6B9,y
	STA.w $1065
	LDA.w $1060
	CMP.b #$9C
	BNE.b CODE_0FB732
	REP.b #$20
	LDA.w $70E2,x
	CLC
	ADC.w #$0000
	STA.b $00
	LDA.w $7182,x
	CLC
	ADC.w #$0000
	STA.b $02
	JSL.l CODE_02A982
	LDA.w #$FFFF
	JSL.l CODE_02E1A6
	SEP.b #$20
CODE_0FB732:
	RTS

CODE_0FB733:
	TYX
	JSR.w CODE_0FB40E
	LDA.w $1064
	CMP.b #$FE
	BCS.b CODE_0FB744
	INC.w $1064
	INC.w $1064
CODE_0FB744:
	JSR.w CODE_0FB3EC
	LDA.w $105D
	AND.b #$FC
	CMP.b #$D8
	BNE.b CODE_0FB758
	INC.w $105F
	LDA.b #$30
	STA.w $1061
CODE_0FB758:
	INC.b $D9,x
	INC.b $D9,x
	LDA.w $0030
	AND.b #$01
	BNE.b CODE_0FB76D
	LDA.w $105C
	CMP.b #$60
	BEQ.b CODE_0FB76D
	INC.w $105C
CODE_0FB76D:
	RTS

CODE_0FB76E:
	TYX
	JSR.w CODE_0FB40E
	JSR.w CODE_0FB758
	LDA.w $1064
	CMP.b #$40
	BEQ.b CODE_0FB785
	SEC
	SBC.b #$01
	STA.w $1064
	STA.w $1065
CODE_0FB785:
	LDA.w $0030
	AND.b #$01
	BNE.b CODE_0FB794
	LDA.b $76,x
	CMP.b #$A0
	BEQ.b CODE_0FB794
	INC.b $76,x
CODE_0FB794:
	JSR.w CODE_0FB3EC
	LDA.w $0030
	AND.b #$03
	BNE.b CODE_0FB7A8
	LDA.w $1066
	CMP.b #$04
	BCC.b CODE_0FB7A8
	DEC.w $1066
CODE_0FB7A8:
	LDA.w $105D
	LDY.w $1061
	BNE.b CODE_0FB7BC
	AND.b #$FE
	CMP.b #$04
	BNE.b CODE_0FB7BC
	INC.w $105F
	STZ.w $1060
CODE_0FB7BC:
	RTS

CODE_0FB7BD:
	TYX
	JSR.w CODE_0FB40E
	LDY.b #$01
	JSR.w CODE_0FB1AF
	LDA.w $1060
	BEQ.b CODE_0FB7D4
	CMP.b #$01
	BEQ.b CODE_0FB81B
	CMP.b #$08
	BEQ.b CODE_0FB7E9
	RTS

CODE_0FB7D4:
	LDA.b $76,x
	CMP.b #$FF
	BEQ.b CODE_0FB7DF
	INC.b $76,x
	INC.b $D9,x
	RTS

CODE_0FB7DF:
	LDA.b #$30
	STA.w $1060
	LDA.b #$80
	STA.b $D9,x
	RTS

CODE_0FB7E9:
	REP.b #$20
	LDA.w #!Define_YI_AmbSpr21F
	JSL.l CODE_008B21
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w $70E2,x
	SEC
	SBC.w #$FFFE
	STA.w $70A2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.w $7142,y
	SEP.b #$20
	LDA.b #!Define_YI_SoundID18_CoinSpillage
	JSL.l CODE_0085D2
	RTS

CODE_0FB81B:
	LDA.b #$02
	STA.b $16,x
	LDA.b #$A0
	STA.w $1064
	STA.w $1065
	INC.w $105F
	LDA.b #$50
	STA.w $1060
	STZ.w $7042,x
	RTS

CODE_0FB833:
	TYX
	JSR.w CODE_0FB40E
	LDY.b #$01
	JSR.w CODE_0FB1AF
	LDA.w $1060
	BNE.b CODE_0FB84C
	LDA.b #$05
	STA.b $16,x
	STZ.b $76,x
	STZ.b $77,x
	INC.w $105F
CODE_0FB84C:
	RTS

CODE_0FB84D:
	TYX
	JSR.w CODE_0FB40E
	JSR.w CODE_0FB881
	LDA.b $76,x
	CLC
	ADC.b #$08
	STA.b $76,x
	BEQ.b CODE_0FB85E
	RTS

CODE_0FB85E:
	INC.w $105F
	STZ.b $76,x
	STZ.b $77,x
	RTS

CODE_0FB866:
	TYX
	JSR.w CODE_0FB40E
	JSR.w CODE_0FB8AE
	LDA.b $76,x
	CMP.b #$FE
	BEQ.b CODE_0FB878
	INC.b $76,x
	INC.b $76,x
	RTS

CODE_0FB878:
	INC.w $105F
	LDA.b #$02
	STA.w $7A96,x
	RTS

CODE_0FB881:
	REP.b #$20
	LDA.w #$24A0
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$5FFF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $76,x
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08E132>>16
	LDA.w #FXCODE_08E132
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.l $702DEA
	STA.l YI_Global_PaletteMirror[$3F].LowByte
	SEP.b #$20
	RTS

CODE_0FB8AE:
	REP.b #$20
	LDA.w #$24A0
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$7E60
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $76,x
	INC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08E132>>16
	LDA.w #FXCODE_08E132
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STA.l $702DE8
	STA.l YI_Global_PaletteMirror[$3E].LowByte
	SEP.b #$20
	RTS

CODE_0FB8DB:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FB8EF
	REP.b #$20
	LDA.w #$0005
	STA.w !RAM_YI_Global_PlayMusicLo
	JSL.l CODE_02E191
	SEP.b #$20
CODE_0FB8EF:
	RTS

CODE_0FB8F0:
	PHB
	PHK
	PLB
	JSR.w CODE_0FB8F8
	PLB
	RTL

CODE_0FB8F8:
	LDA.b $00
	CLC
	ADC.w $0D05
	CLC
	ADC.b #$80
	STA.b $0C
	BRA.b CODE_0FB91A

CODE_0FB905:
	LDA.w $105D
	CLC
	ADC.w $0D05
	CLC
	ADC.b #$80
	STA.b $0C
	PHA
	CLC
	ADC.w $7A39,x
	STA.w $105E
	PLA
CODE_0FB91A:
	LSR
	LSR
	LSR
	LSR
	LSR
	AND.b #$06
	TAX
	JMP.w (DATA_0FB925,x)

DATA_0FB925:
	dw CODE_0FB92D
	dw CODE_0FB973
	dw CODE_0FB9BC
	dw CODE_0FBA08

CODE_0FB92D:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $00
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $02
	JMP.w CODE_0FBA51

CODE_0FB973:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $02
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $00
	JMP.w CODE_0FBA51

CODE_0FB9BC:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $00
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $02
	JMP.w CODE_0FBA51

CODE_0FBA08:
	LDA.b $0C
	AND.b #$3F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	EOR.b #$FF
	INC
	STA.b $02
	LDA.b $0C
	AND.b #$3F
	STA.b $0F
	LDA.b #$40
	SEC
	SBC.b $0F
	TAY
	LDA.w DATA_0FBA89,y
	STA.w !REGISTER_Multiplicand
	LDA.b $0E
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL.w !REGISTER_ProductOrRemainderLo
	ADC.b #$00
	STA.b $00
	JMP.w CODE_0FBA51

CODE_0FBA51:
	LDX.b $12
	STZ.b $01
	LDA.b $00
	BPL.b CODE_0FBA5B
	DEC.b $01
CODE_0FBA5B:
	STZ.b $03
	LDA.b $02
	BPL.b CODE_0FBA63
	DEC.b $03
CODE_0FBA63:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.b #!Define_YI_NorSpr03C_TapTapTheRedNose
	BEQ.b CODE_0FBA88
	REP.b #$20
	LDA.b $00
	CLC
	ADC.w #$0118
	STA.w $7182,x
	LDA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	CMP.w #!Define_YI_PlayerState20_EnteringRaphaelBossRoom
	BEQ.b CODE_0FBA86
	LDA.b $02
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
CODE_0FBA86:
	SEP.b #$20
CODE_0FBA88:
	RTS

DATA_0FBA89:
	db $FF,$FF,$FF,$FF,$FE,$FE,$FD,$FC,$FB,$FA,$F8,$F7,$F5,$F3,$F1,$EF
	db $ED,$EA,$E7,$E5,$E2,$DF,$DC,$D8,$D5,$D1,$CE,$CA,$C6,$C2,$BE,$B9
	db $B5,$B1,$AC,$A7,$A2,$9D,$98,$93,$8E,$89,$84,$7E,$79,$73,$6D,$68
	db $62,$5C,$56,$50,$4A,$44,$3E,$38,$32,$2C,$26,$1F,$19,$13,$0D,$06
	db $00

DATA_0FBACA:
	dw CODE_0FC089
	dw CODE_0FC089
	dw CODE_0FC089
	dw CODE_0FC1C7
	dw CODE_0FC8EB
	dw CODE_0FC8E1
	dw CODE_0FC8E6
	dw CODE_0FC99E
	dw CODE_0FCA26
	dw CODE_0FCA9A
	dw CODE_0FCAF3
	dw CODE_0FCA8A
	dw CODE_0FD56E
	dw CODE_0FD8D5
	dw CODE_0FD966
	dw CODE_0FDB30
	dw CODE_0FDBD5
	dw CODE_0FDBEE
	dw CODE_0FDD42
	dw CODE_0FDF52
	dw CODE_0FDF8E
	dw CODE_0FE01D

DATA_0FBAF6:
	dw CODE_0FC094
	dw CODE_0FC162
	dw CODE_0FC1AF
	dw CODE_0FC21A
	dw CODE_0FC8F4
	dw CODE_0FC8F4
	dw CODE_0FC8F4
	dw CODE_0FC9A3
	dw CODE_0FCA2C
	dw CODE_0FCAB2
	dw CODE_0FCAF8
	dw CODE_0FCAD3
	dw CODE_0FD57D
	dw CODE_0FD8F4
	dw CODE_0FD973
	dw CODE_0FDB43
	dw CODE_0FDBD5
	dw CODE_0FDC6A
	dw CODE_0FDD61
	dw CODE_0FDF65
	dw CODE_0FDFDF
	dw CODE_0FE01E

DATA_0FBB22:
	db $01,$58,$01,$58,$01,$48,$01,$60,$01,$30,$01,$10,$00,$08,$01,$80
	db $01,$40,$04,$08,$01,$80,$05,$20,$01,$40,$00,$08,$01,$20,$01,$20
	db $05,$20,$01,$50,$05,$20,$05,$20,$05,$60,$01,$20

DATA_0FBB4E:
	db $00,$20,$01,$20,$01,$20,$05,$10,$04,$10,$06,$10,$07,$10,$FF,$12
	db $05,$10,$05,$10,$FF,$14,$05,$10,$07,$20,$06,$22,$06,$24,$FF,$2A
	db $04,$20,$04,$10,$04,$1E,$03,$10,$04,$10,$04,$1E

CODE_0FBB7A:
	JSL.l CODE_008277
	JSL.l CODE_00831C
	JSL.l CODE_0394B8
	REP.b #$10
	LDY.w #$006E
	JSL.l CODE_00B3EE
	REP.b #$30
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
	LDX.w #$004A
	JSL.l CODE_00BB05
	LDX.b #$02
	JSL.l CODE_00BDA2
	LDA.b #$10
	STA.w !RAM_YI_Global_MainScreenLayers
	STA.w !REGISTER_MainScreenLayers
	JSL.l CODE_01B27B
	REP.b #$20
	LDA.w #$022F
	JSR.w CODE_0FBFD9
	LDA.w #$0070
	STA.w $70E2,y
	LDA.w #$0080
	STA.w $7182,y
	LDA.w #$0020
	STA.w $7A96,y
	LDA.w #$0008
	STA.w $7A98,y
	LDA.w #$0230
	JSR.w CODE_0FBFD9
	LDA.w #$001C
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$0062
	STA.w $70E2,y
	LDA.w #$0071
	STA.w $7182,y
	LDA.w #$0002
	STA.w $7A98,y
	LDA.w #$0230
	JSR.w CODE_0FBFD9
	LDA.w #$001C
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$0098
	STA.w $70E2,y
	LDA.w #$006F
	STA.w $7182,y
	LDA.w #$0002
	STA.w $7400,y
	LDA.w #$0004
	STA.w $7A98,y
	LDA.w #$0230
	JSR.w CODE_0FBFD9
	LDA.w #$001C
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$008A
	STA.w $70E2,y
	LDA.w #$007E
	STA.w $7182,y
	LDA.w #$0002
	STA.w $7400,y
	LDA.w #$0006
	STA.w $7A98,y
	LDA.w #$0231
	JSR.w CODE_0FBFD9
	LDA.w #$001C
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$0080
	STA.w $70E2,y
	LDA.w #$0060
	STA.w $7182,y
	LDA.w #$0006
	STA.w $7A98,y
	SEP.b #$20
	JSL.l CODE_0FBC63
	LDA.b #!Define_YI_MusicID_StopMusicCommand
	STA.b !RAM_YI_Global_PlayMusicLo
	JML.l CODE_1083DE

CODE_0FBC63:
	PHB
	PHK
	PLB
CODE_0FBC66:
	JSL.l CODE_008259
	JSL.l CODE_0394CF
	JSL.l CODE_0FBF39
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $0B4C
	BEQ.b CODE_0FBC9A
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	BNE.b CODE_0FBC8E
	STZ.w $0B4C
	LDX.b #!Define_YI_GameMode3F
	BRA.b CODE_0FBC97

CODE_0FBC8E:
	LDX.b #!Define_YI_GameMode3A
	LDA.w !RAM_YI_Level_MiddleRingsTouchedLo
	BEQ.b CODE_0FBC97
	LDX.b #!Define_YI_GameMode32
CODE_0FBC97:
	STX.w !RAM_YI_Global_CurrentGameMode
CODE_0FBC9A:
	SEP.b #$20
	PLB
	RTL

DATA_0FBC9E:
	dw $6400,$47FF,$03FF
	dw $6C00,$47FF,$03FF
	dw $7C00,$47FF,$0130
	dw $3FF0,$401F,$0000
	dw $FFFF

DATA_0FBCB8:
	db $00,!REGISTER_BGModeAndTileSizeSetting : dl $7E5B18

DATA_0FBCBD:
	db $46,$09,$46,$09,$01,$00,$00,$00

DATA_0FBCC5:
	db $01,!REGISTER_MainScreenLayers : dl $7E5B98

DATA_0FBCCA:
	db $46,$15,$02,$46,$15,$02,$01,$08,$00,$00

DATA_0FBCD4:
	db $44,!REGISTER_Window1LeftPositionDesignation : dl $7E5C18

DATA_0FBCD9:
	db $12,$E4,$51,$F0,$EC,$51,$10,$E4,$51,$28,$E8,$51,$01,$E4,$51,$00

DATA_0FBCE9:
	db $42,!REGISTER_BG2HorizScrollOffset : dl $7E5C98

DATA_0FBCEE:
	db $24,$40,$50,$3D,$40,$50,$98,$42,$50,$01,$40,$50,$00

DATA_0FBCFB:
	db $42,!REGISTER_BG2HorizScrollOffset : dl $7E5D18

DATA_0FBD00:
	db $29,$40,$50,$40,$42,$50,$01,$3D,$00,$00

DATA_0FBD0A:
	dw $0232,$0088,$0058,$0000

DATA_0FBD12:
	dw $0233,$0010,$0050,$0233,$00B0,$0078,$0233,$0050
	dw $0068,$0233,$00E0,$0080,$0234,$0010,$0058,$0234
	dw $0010,$00A8,$0234,$0050,$0078,$0234,$0060,$0048
	dw $0234,$0088,$0068,$0234,$00A8,$0050,$0234,$00D8
	dw $0030,$0234,$00E0,$006C,$0235,$0010,$0068,$0235
	dw $0018,$0040,$0235,$0040,$0068,$0235,$0050,$007C
	dw $0235,$0058,$0038,$0235,$0080,$0076,$0235,$00A8
	dw $0078,$0235,$00D0,$0070,$0000

DATA_0FBD8C:
	dw $0236,$00B8,$0040,$0000

DATA_0FBD94:
	dw $0237,$0600,$0038,$0000

DATA_0FBD9C:
	dw $0239,$0078,$0050,$0000

DATA_0FBDA4:
	dw $023B,$0140,$0070,$0000,$0000

DATA_0FBDAE:
	dw $0240,$0050,$0082,$0000

DATA_0FBDB6:
	dw $0243,$0080,$0070,$0000

CODE_0FBDBE:
	JSL.l CODE_0082D0
	JSL.l CODE_008277
	JSL.l CODE_00831C
	JSL.l CODE_0394B8
	REP.b #$10
	LDY.w #$0079
	JSL.l CODE_00B3EE
	LDA.b #$15
	STA.w $0127
	JSL.l CODE_00E37B
	REP.b #$30
	LDX.w #$0050
	JSL.l CODE_00BB05
	LDX.b #$24
	JSL.l CODE_00BDA2
	LDA.b #$7C
	STA.w !REGISTER_BG4AddressAndSize
	LDA.w $012B
	BNE.b CODE_0FBDFE
	LDA.b #$02
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_0FBDFE:
	LDX.b #$04
CODE_0FBE00:
	LDA.w DATA_0FBCB8,x
	STA.w HDMA[$07].Parameters,x
	LDA.w DATA_0FBCC5,x
	STA.w HDMA[$06].Parameters,x
	LDA.w DATA_0FBCD4,x
	STA.w HDMA[$05].Parameters,x
	LDA.w DATA_0FBCE9,x
	STA.w HDMA[$04].Parameters,x
	LDA.w DATA_0FBCFB,x
	STA.w HDMA[$03].Parameters,x
	DEX
	BPL.b CODE_0FBE00
	LDA.b #$7E
	STA.w HDMA[$07].IndirectSourceBank
	STA.w HDMA[$06].IndirectSourceBank
	STA.w HDMA[$05].IndirectSourceBank
	STA.w HDMA[$04].IndirectSourceBank
	STA.w HDMA[$03].IndirectSourceBank
	LDX.b #$14
CODE_0FBE34:
	LDA.w DATA_0FBCBD,x
	STA.l $7E5B18,x
	LDA.w DATA_0FBCCA,x
	STA.l $7E5B98,x
	LDA.w DATA_0FBCD9,x
	STA.l $7E5C18,x
	LDA.w DATA_0FBCEE,x
	STA.l $7E5C98,x
	LDA.w DATA_0FBD00,x
	STA.l $7E5D18,x
	DEX
	BPL.b CODE_0FBE34
	REP.b #$20
	LDA.l $7E5B99
	STA.w $1407
	LDA.w #$00FF
	STA.l $7E51E4
	STA.l $7E51E6
	LDA.w #$FF00
	STA.l $7E51E8
	STA.l $7E51EA
	SEP.b #$20
	LDA.b #$E0
	STA.w !RAM_YI_Global_HDMAEnable
	JSL.l CODE_00BE26
	REP.b #$30
	LDX.w #DATA_0FBD0A
	JSR.w CODE_0FBF14
	JSL.l CODE_0FBEB2
	LDA.b #$02
	STA.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$C6
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	REP.b #$20
	LDA.w #$3100
	STA.w $1405
	SEP.b #$20
	JML.l CODE_1083E2

CODE_0FBEB2:
	PHB
	PHK
	PLB
	JSR.w CODE_0FCB8A
	BRA.b CODE_0FBEE5

CODE_0FBEBA:
	REP.b #$20
	DEC.w $1405
	SEP.b #$20
	LDA.w $1405
	ORA.w $1406
	BEQ.b CODE_0FBED3
	LDA.b $35
	AND.b #$C0
	ORA.b $36
	AND.b #$D0
	BEQ.b CODE_0FBEE5
CODE_0FBED3:
	INC.w !RAM_YI_Global_CurrentGameMode
	LDA.w $012B
	BNE.b CODE_0FBF12
	LDA.b #!Define_YI_MusicID_FadeMusicCommand
	STA.w !RAM_YI_Global_PlayMusicLo
	STA.w $012B
	BRA.b CODE_0FBF12

CODE_0FBEE5:
	JSL.l CODE_008259
	JSR.w CODE_0FCC6F
	JSL.l CODE_0FBF39
	JSL.l CODE_0394CF
	REP.b #$20
	LDA.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	AND.w #$00E0
	BEQ.b CODE_0FBF07
	LDX.b #FXCODE_089067>>16
	LDA.w #FXCODE_089067
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0FBF07:
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
CODE_0FBF12:
	PLB
	RTL

CODE_0FBF14:
	LDA.w $0000,x
	BEQ.b CODE_0FBF36
	PHX
	SEP.b #$10
	JSR.w CODE_0FBFCD
	REP.b #$10
	PLX
	LDA.w $0002,x
	STA.w $70E2,y
	LDA.w $0004,x
	STA.w $7182,y
	TXA
	CLC
	ADC.w #$0006
	TAX
	BRA.b CODE_0FBF14

CODE_0FBF36:
	SEP.b #$30
	RTS

CODE_0FBF39:
	PHB
	PHK
	PLB
	PHD
	REP.b #$20
	LDA.w #$7960
	TCD
	INC.b $14
	LDX.b #FXCODE_09884C>>16
	LDA.w #FXCODE_09884C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #$5C
CODE_0FBF50:
	STX.b $12
	LDY.w !REGISTER_SoftwareLatchForHVCounter
	LDY.w !REGISTER_PPUStatusFlag2
	LDA.w !REGISTER_HCounter
	CLC
	ADC.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	JSR.w CODE_0FBF70
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_0FBF50
	SEP.b #$20
	PLD
	PLB
	RTL

CODE_0FBF70:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BEQ.b CODE_0FBF7F
	JSR.w CODE_0FBF84
	LDY.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w DATA_0FBF80-$1A,y
	PHA
CODE_0FBF7F:
	RTS

DATA_0FBF80:
	dw CODE_0FBFA5-$01
	dw CODE_0FBFBC-$01

CODE_0FBF84:
	LDA.w $7A96,x
	BEQ.b CODE_0FBF8C
	DEC.w $7A96,x
CODE_0FBF8C:
	LDA.w $7A98,x
	BEQ.b CODE_0FBF94
	DEC.w $7A98,x
CODE_0FBF94:
	LDA.w $7AF6,x
	BEQ.b CODE_0FBF9C
	DEC.w $7AF6,x
CODE_0FBF9C:
	LDA.w $7AF8,x
	BEQ.b CODE_0FBFA4
	DEC.w $7AF8,x
CODE_0FBFA4:
	RTS

CODE_0FBFA5:
	LDA.w #$001C
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	REP.b #$10
	TAY
	LDA.w DATA_0FBACA-(!Define_YI_AmbSpr22F_Invalid*$02),y
	STA.b $00
	SEP.b #$10
	JMP.w ($0000+$7960)

CODE_0FBFBC:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	ASL
	REP.b #$10
	TAY
	LDA.w DATA_0FBAF6-(!Define_YI_AmbSpr22F_Invalid*$02),y
	STA.b $00
	SEP.b #$10
	JMP.w ($0000+$7960)

CODE_0FBFCD:
	JSR.w CODE_0FBFD9
	BCC.b CODE_0FBFD8
	LDA.w #$02FF
	STA.w $74A0,y
CODE_0FBFD8:
	RTS

CODE_0FBFD9:
	PHA
	LDY.b #$5C
CODE_0FBFDC:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_0FBFEA
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_0FBFDC
	PLA
	CLC
	RTS

CODE_0FBFEA:
	LDA.w #$001A
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	LDA.w #$00FF
	STA.w $74A0,y
	LDA.w #$0000
	STA.w $7D96,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	STA.w $7400,y
	STA.w $70E0,y
	STA.w $7180,y
	STA.w $7D36,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror,y
	STA.w $7A36,y
	STA.w $7A38,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	STA.w $7A96,y
	STA.w $7A98,y
	STA.w $7AF6,y
	STA.w $7AF8,y
	STA.w $7402,y
	STA.w $7860,y
	STA.w !EXRAM_YI_Level_NorSpr_AngleOfStoodOnGround|!EXRAMBankMirror,y
	STA.w $7D38,y
	STA.w $7680,y
	STA.w $7682,y
	STA.w $7540,y
	STA.w $75E0,y
	STA.w $77C0,y
	STA.w $7542,y
	STA.w $75E2,y
	STA.w $6FA0,y
	STA.w $6FA2,y
	DEC
	STA.w $7722,y
	LDA.w #$1FFF
	STA.w $7862,y
	PLA
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	PHX
	ASL
	REP.b #$10
	TAX
	LDA.w DATA_0FBB4E-((!Define_YI_AmbSpr22F_Invalid*$02)-$01),x
	AND.w #$00FF
	STA.w $7042,y
	LDA.w DATA_0FBB4E-(!Define_YI_AmbSpr22F_Invalid*$02),x
	AND.w #$00FF
	STA.w $74A2,y
	LDA.w DATA_0FBB22-(!Define_YI_AmbSpr22F_Invalid*$02),x
	STA.w $7040,y
	SEP.b #$10
	PLX
	SEC
	RTS

CODE_0FC089:
	LDA.w #$0009
	STA.w $7AF6,y
	RTS

DATA_0FC090:
	dw $0030,$0000

CODE_0FC094:
	LDA.b $76,x
	DEC
	BEQ.b CODE_0FC0C8
	DEC
	BEQ.b CODE_0FC10C
	DEC
	BEQ.b CODE_0FC0FE
	LDA.w $7A96,x
	BNE.b CODE_0FC0C5
	LDA.w #$0008
	STA.w !RAM_YI_Global_PlayMusicLo
	INC.b $76,x
	LDA.b $76,x
	ASL
	TAY
	LDA.w DATA_0FC090-$02,y
	STA.w $7A96,x
	LDA.w #$0003
	STA.w $7402,x
	LDA.w #$000A
	STA.w $7A98,x
	JMP.w CODE_0FC17C

CODE_0FC0C5:
	JMP.w CODE_0FC162

CODE_0FC0C8:
	LDA.w $7A96,x
	BNE.b CODE_0FC0E1
	INC.b $76,x
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w #$0008
	STA.w $7A98,x
	STZ.w $7402,x
	JMP.w CODE_0FC162

CODE_0FC0E1:
	LDA.w $7A98,x
	BNE.b CODE_0FC0FB
	LDA.w #$0003
	STA.w $7A98,x
	LDA.w $7402,x
	INC
	CMP.w #$0005
	BCC.b CODE_0FC0F8
	LDA.w #$0003
CODE_0FC0F8:
	STA.w $7402,x
CODE_0FC0FB:
	JMP.w CODE_0FC17C

CODE_0FC0FE:
	LDA.w $7182,x
	CMP.w #$FFC0
	BPL.b CODE_0FC109
	INC.w $0B4C
CODE_0FC109:
	JMP.w CODE_0FC162

CODE_0FC10C:
	LDA.w $7A96,x
	BNE.b CODE_0FC109
	INC.b $76,x
	LDA.w #$FC00
	STA.w $75E2,x
	STA.w $762E
	STA.w $7632
	STA.w $7636
	STA.w $763A
	LDA.w #$0040
	STA.w $7542,x
	STA.w $758E
	STA.w $7592
	STA.w $7596
	STA.w $759A
	JMP.w CODE_0FC162

DATA_0FC13A:
	dw $0001,$0001,$0002,$0002,$0003,$0002,$0002,$0001
	dw $FFFF,$FFFE,$FFFE,$FFFD,$FFFE,$FFFE,$FFFF,$FFFF

DATA_0FC15A:
	dw $0CC4,$0CC6,$0CC8,$4CC6

CODE_0FC162:
	LDA.w $7A98,x
	BNE.b CODE_0FC17C
	LDA.w $7402,x
	INC
	CMP.w #$0003
	BNE.b CODE_0FC173
	LDA.w #$0000
CODE_0FC173:
	STA.w $7402,x
	LDA.w #$0008
	STA.w $7A98,x
CODE_0FC17C:
	LDA.b $14
	AND.w #$0006
	TAY
	LDA.w DATA_0FC15A,y
	REP.b #$10
	LDY.w $7362,x
	STA.w $6004,y
	SEP.b #$10
CODE_0FC18F:
	LDA.w $7AF6,x
	BNE.b CODE_0FC1AE
	LDA.w #$0008
	STA.w $7AF6,x
	LDA.b $18,x
	INC
	INC
	AND.w #$001F
	STA.b $18,x
	TAY
	LDA.w $7182,x
	CLC
	ADC.w DATA_0FC13A,y
	STA.w $7182,x
CODE_0FC1AE:
	RTS

CODE_0FC1AF:
	LDA.w $7A98,x
	BNE.b CODE_0FC1C4
	LDA.w $7402,x
	INC
	AND.w #$0001
	STA.w $7402,x
	LDA.w #$0006
	STA.w $7A98,x
CODE_0FC1C4:
	JMP.w CODE_0FC18F

CODE_0FC1C7:
	REP.b #$10
	LDX.w #$01FE
CODE_0FC1CC:
	LDA.l YI_Global_PaletteMirror[$00].LowByte,x
	STA.l $702D6C,x
	STA.l $702F6C,x
	DEX
	DEX
	BPL.b CODE_0FC1CC
	SEP.b #$10
	JSR.w CODE_0FC807
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	STZ.w !RAM_YI_Global_Layer1YPosLo
	STZ.w !RAM_YI_Global_Layer2YPosLo
	STZ.w !RAM_YI_Global_Layer1XPosLo
	STZ.w !RAM_YI_Global_Layer2XPosLo
	STZ.w $6094
	STZ.w $6096
	STZ.w $609C
	STZ.w $609E
	LDX.b #$00
	JSR.w CODE_0FC884
	LDX.b #$04
	JSR.w CODE_0FC884
	LDA.w #$0200
	STA.w $7AF8,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
CODE_0FC21A:
	LDY.b $18,x
	TYX
	JMP.w (DATA_0FC220,x)

DATA_0FC220:
	dw CODE_0FC232
	dw CODE_0FC267
	dw CODE_0FC34D
	dw CODE_0FC3C5
	dw CODE_0FC430
	dw CODE_0FC4BD
	dw CODE_0FC517
	dw CODE_0FC57A
	dw CODE_0FC5D2

CODE_0FC232:
	LDX.b $12
	JSR.w CODE_0FC281
	JSR.w CODE_0FC253
	BNE.b CODE_0FC252
	REP.b #$10
	LDX.w #DATA_0FBD12
	JSR.w CODE_0FBF14
	REP.b #$20
	LDX.b $12
	LDA.w #$0500
	STA.w $7AF8,x
CODE_0FC24E:
	INC.b $18,x
	INC.b $18,x
CODE_0FC252:
	RTS

CODE_0FC253:
	LDA.w $7AF8,x
	BNE.b CODE_0FC260
	LDY.w $1402
	BNE.b CODE_0FC261
	INC.w $1402
CODE_0FC260:
	RTS

CODE_0FC261:
	LDY.b #$00
	STY.w $1402
	RTS

CODE_0FC267:
	LDX.b $12
	JSR.w CODE_0FC884
	JSR.w CODE_0FC61D
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCS.b CODE_0FC2E8
	CLC
	ADC.w #$0002
	STA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6094
CODE_0FC281:
	LDA.b $14
	AND.w #$0003
	BNE.b CODE_0FC2E7
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0050
	CMP.w #$00F0
	BCC.b CODE_0FC297
	LDA.w #$0000
CODE_0FC297:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	ORA.w #$1900
	STA.b $00
	REP.b #$10
	LDA.l $7E4000
	TAX
	LDA.w #$0005
	STA.b $02
	LDA.w #$6108
	STA.b $04
CODE_0FC2B0:
	LDA.b $04
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.b $04
	LDA.w #$001F
	STA.l $7E4004,x
	LDY.w #$0010
	LDA.b $00
CODE_0FC2C8:
	STA.l $7E4006,x
	INC
	INX
	INX
	DEY
	BNE.b CODE_0FC2C8
	STA.b $00
	INX
	INX
	INX
	INX
	DEC.b $02
	BNE.b CODE_0FC2B0
	LDA.w #$FFFF
	STA.l $7E4002,x
	SEP.b #$10
	LDX.b $12
CODE_0FC2E7:
	RTS

CODE_0FC2E8:
	LDA.l $70336C
	CMP.w #$0020
	BCC.b CODE_0FC2FB
	LDA.b $16,x
	CMP.w #$01C2
	BCS.b CODE_0FC309
	JSR.w CODE_0FC807
CODE_0FC2FB:
	LDA.b $14
	LSR
	BCC.b CODE_0FC309
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_0FC309:
	LDX.b $12
	JSR.w CODE_0FC253
	BNE.b CODE_0FC34C
	LDA.w #$0076
	JSR.w CODE_0FC78D
	LDX.b #$1C
CODE_0FC318:
	LDA.l DATA_5FCE72,x
	STA.l YI_Global_PaletteMirror[$41].LowByte,x
	LDA.l DATA_5FCE90,x
	STA.l YI_Global_PaletteMirror[$51].LowByte,x
	DEX
	DEX
	BPL.b CODE_0FC318
	REP.b #$10
	LDX.w #DATA_0FBD8C
	JSR.w CODE_0FBF14
	LDA.b #$10
	TRB.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDX.b $12
	LDA.w #$01C0
	STA.w $7AF8,x
	LDA.w #$0002
	STA.w $7A98,x
	JMP.w CODE_0FC24E

CODE_0FC34C:
	RTS

CODE_0FC34D:
	LDX.b $12
	LDA.w $6094
	CMP.w #$0300
	BCS.b CODE_0FC36B
	ADC.w #$0002
	STA.w $6094
	CMP.w #$0100
	BCC.b CODE_0FC365
	LDA.w #$0100
CODE_0FC365:
	STA.w !RAM_YI_Global_Layer1XPosLo
	JMP.w CODE_0FC61D

CODE_0FC36B:
	LDA.w #$00FF
	STA.w $74A2,x
	JSR.w CODE_0FC253
	BNE.b CODE_0FC3C4
	LDA.w #$0075
	JSR.w CODE_0FC78D
	REP.b #$10
	LDX.w #DATA_0FBD94
	JSR.w CODE_0FBF14
	REP.b #$20
	LDX.b $12
	LDA.w #$0088
	STA.w $70E2,x
	LDA.w #$0048
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $75E2,x
	STZ.w $7540,x
	STZ.w $75E0,x
	LDA.w #$0005
	STA.w $74A2,x
	LDA.w $7042,x
	EOR.w #$0030
	STA.w $7042,x
	LDA.w #$02FF
	STA.w $74A0,x
	LDA.w #$0200
	STA.w $7AF8,x
	JMP.w CODE_0FC24E

CODE_0FC3C4:
	RTS

CODE_0FC3C5:
	LDX.b $12
	JSR.w CODE_0FC884
	JSR.w CODE_0FC61D
	LDA.w $6094
	CMP.w #$0300
	BCS.b CODE_0FC3E7
	ADC.w #$0002
	STA.w $6094
	CMP.w #$0100
	BCC.b CODE_0FC3E3
	LDA.w #$0100
CODE_0FC3E3:
	STA.w !RAM_YI_Global_Layer1XPosLo
	RTS

CODE_0FC3E7:
	JSR.w CODE_0FC253
	BNE.b CODE_0FC42F
	LDX.b #$48
	LDA.w #$1000
	JSR.w CODE_0FC74B
	LDA.w #$0077
	JSR.w CODE_0FC78D
	LDX.b #$1C
CODE_0FC3FC:
	LDA.l DATA_5FCEAE,x
	STA.l YI_Global_PaletteMirror[$41].LowByte,x
	DEX
	DEX
	BPL.b CODE_0FC3FC
	REP.b #$10
	LDX.w #DATA_0FBD9C
	JSR.w CODE_0FBF14
	LDA.b #$10
	TRB.w !RAM_YI_Global_HDMAEnable
	LDA.b #$03
	TRB.w !RAM_YI_Global_BG2AddressAndSize
	REP.b #$20
	LDA.w #$FE24
	STA.w !RAM_YI_Global_Layer2XPosLo
	STZ.b $14
	LDX.b $12
	LDA.w #$0300
	STA.w $7AF8,x
	JMP.w CODE_0FC24E

CODE_0FC42F:
	RTS

CODE_0FC430:
	LDX.b $12
	LDA.b $14
	LSR
	BCC.b CODE_0FC43D
	INC.w !RAM_YI_Global_Layer2XPosLo
	INC.w !RAM_YI_Global_Layer2YPosLo
CODE_0FC43D:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCS.b CODE_0FC451
	ADC.w #$0002
	STA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6094
	JMP.w CODE_0FC61D

CODE_0FC451:
	LDA.w #$00FF
	STA.w $74A2,x
	JSR.w CODE_0FC253
	BNE.b CODE_0FC4BC
	LDA.w #$0017
	STA.w $1407
	LDY.b #$10
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDY.b #$02
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w #$1088
	STA.w $0948
	LDA.w #$0001
	TSB.w !RAM_YI_Global_BG2AddressAndSize
	LDX.b #$49
	LDA.w #$1800
	JSR.w CODE_0FC74B
	LDA.w #$0078
	JSR.w CODE_0FC78D
	LDX.b #$1C
CODE_0FC488:
	LDA.l DATA_5FCFBC,x
	STA.l YI_Global_PaletteMirror[$51].LowByte,x
	LDA.l DATA_5FCFDA,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_0FC488
	REP.b #$10
	LDX.w #DATA_0FBDA4
	JSR.w CODE_0FBF14
	LDA.b #$03
	TRB.w !RAM_YI_Global_BG2AddressAndSize
	REP.b #$20
	LDA.w #$0178
	STA.w !RAM_YI_Global_Layer2XPosLo
	LDX.b $12
	LDA.w #$0400
	STA.w $7AF8,x
	JMP.w CODE_0FC24E

CODE_0FC4BC:
	RTS

CODE_0FC4BD:
	LDA.w $6096
	JSR.w CODE_0FCB3D
	LDX.b $12
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCS.b CODE_0FC4DF
	ADC.w #$0002
	STA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6094
	LDA.b $14
	LSR
	BCC.b CODE_0FC4DE
	INC.w !RAM_YI_Global_Layer1YPosLo
CODE_0FC4DE:
	RTS

CODE_0FC4DF:
	JSR.w CODE_0FC253
	BNE.b CODE_0FC516
	LDA.w #$0001
	TSB.w !RAM_YI_Global_BG2AddressAndSize
	LDA.w #$0079
	JSR.w CODE_0FC78D
	LDX.b #$1C
CODE_0FC4F2:
	LDA.l DATA_5FCFF8,x
	STA.l YI_Global_PaletteMirror[$31].LowByte,x
	LDA.l DATA_5FD016,x
	STA.l YI_Global_PaletteMirror[$41].LowByte,x
	DEX
	DEX
	BPL.b CODE_0FC4F2
	LDY.b #$01
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDX.b $12
	LDA.w #$0100
	STA.w $7AF8,x
	JMP.w CODE_0FC24E

CODE_0FC516:
	RTS

CODE_0FC517:
	LDX.b $12
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCS.b CODE_0FC530
	ADC.w #$0002
	STA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6094
	JSR.w CODE_0FCB3D
	LDX.b $12
	RTS

CODE_0FC530:
	JSR.w CODE_0FC253
	BNE.b CODE_0FC579
	LDA.w #$007A
	JSR.w CODE_0FC78D
	LDX.b #$1C
CODE_0FC53D:
	LDA.l DATA_5FD034,x
	STA.l YI_Global_PaletteMirror[$51].LowByte,x
	LDA.l DATA_5FD052,x
	STA.l YI_Global_PaletteMirror[$61].LowByte,x
	DEX
	DEX
	BPL.b CODE_0FC53D
	REP.b #$10
	LDX.w #DATA_0FBDAE
	JSR.w CODE_0FBF14
	REP.b #$20
	LDA.w #$0215
	STA.w $1407
	LDY.b #$02
	STY.w !RAM_YI_Global_ColorMathInitialSettings
	LDY.b #$20
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	STZ.w $0948
	LDX.b $12
	LDA.w #$0480
	STA.w $7AF8,x
	JMP.w CODE_0FC24E

CODE_0FC579:
	RTS

CODE_0FC57A:
	LDX.b $12
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCS.b CODE_0FC58E
	ADC.w #$0002
	STA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6094
	RTS

CODE_0FC58E:
	JSR.w CODE_0FC253
	BNE.b CODE_0FC5D1
	LDA.w #$007B
	JSR.w CODE_0FC78D
	LDX.b #$1C
CODE_0FC59B:
	LDA.l DATA_5FD070,x
	STA.l YI_Global_PaletteMirror[$21].LowByte,x
	LDA.l DATA_5FD08E,x
	STA.l YI_Global_PaletteMirror[$31].LowByte,x
	LDA.l DATA_5FCF9E,x
	STA.l YI_Global_PaletteMirror[$F1].LowByte,x
	DEX
	DEX
	BPL.b CODE_0FC59B
	REP.b #$10
	LDX.w #DATA_0FBDB6
	JSR.w CODE_0FBF14
	LDA.b #$03
	TRB.w !RAM_YI_Global_BG2AddressAndSize
	REP.b #$20
	LDX.b $12
	LDA.w #$0300
	STA.w $7AF8,x
	JMP.w CODE_0FC24E

CODE_0FC5D1:
	RTS

CODE_0FC5D2:
	LDX.b $12
	LDA.w !RAM_YI_Global_Layer2XPosLo
	LSR
	STA.l $7E5042
	LSR
	STA.l $7E5040
	LDA.w #$0008
	TSB.w !RAM_YI_Global_HDMAEnable
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCS.b CODE_0FC5F9
	ADC.w #$0002
	STA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $6094
	RTS

CODE_0FC5F9:
	JSR.w CODE_0FC253
	BNE.b CODE_0FC5FE
CODE_0FC5FE:
	RTS

DATA_0FC5FF:
	dw $0001,$0002

DATA_0FC603:
	dw $0010,$FFC0

DATA_0FC607:
	dw $0010,$0008,$0018,$0004

DATA_0FC60F:
	dw $0055,$0040,$0055,$0055,$0055,$0008,$0100

CODE_0FC61D:
	LDA.w #$0080
	LDY.w $7A98,x
	BNE.b CODE_0FC633
	LDY.b $76,x
	LDA.w $7A38,x
	CMP.w DATA_0FC60F,y
	BMI.b CODE_0FC633
	SEC
	SBC.w #$0002
CODE_0FC633:
	STA.w $7A38,x
	CLC
	ADC.w $7A36,x
	CMP.w #$0C00
	BCC.b CODE_0FC6B6
	LDY.b $76,x
	BNE.b CODE_0FC648
	AND.w #$00FF
	BRA.b CODE_0FC6B6

CODE_0FC648:
	PHA
	XBA
	AND.w #$00FF
	ASL
	TAY
	CPY.b #$22
	BCS.b CODE_0FC6AA
	LDA.w $7A37,x
	AND.w #$00FF
	ASL
	STA.b $00
	CPY.b #$20
	BNE.b CODE_0FC69B
	CMP.w #$001E
	BNE.b CODE_0FC6AA
	PHY
	LDA.w #$0238
	JSR.w CODE_0FBFCD
	LDA.w $70E2,x
	CLC
	ADC.w #$0014
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$FFE8
	STA.w $7182,y
	LDA.w #$023A
	JSR.w CODE_0FBFCD
	LDA.w $70E2,x
	CLC
	ADC.w #$0014
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$FFE8
	STA.w $7182,y
	PLY
CODE_0FC69B:
	CPY.b $00
	BEQ.b CODE_0FC6AA
	LDA.w DATA_0FC5FF-$04,y
	STA.w $7A38,x
	PLA
	AND.w #$FF00
	PHA
CODE_0FC6AA:
	PLA
	CMP.w #$1800
	BCC.b CODE_0FC6B6
	AND.w #$00FF
	ORA.w #$1000
CODE_0FC6B6:
	STA.w $7A36,x
	XBA
	AND.w #$00FF
	STA.w $7402,x
	LDY.b $76,x
	BEQ.b CODE_0FC718
	LDA.w $75E0,x
	SEC
	SBC.w #$0001
	CMP.w #$0010
	BPL.b CODE_0FC6D3
	LDA.w #$0010
CODE_0FC6D3:
	STA.w $75E0,x
	LDY.b #$58
CODE_0FC6D8:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_0FC711
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_AmbSpr233_Invalid
	BCC.b CODE_0FC711
	CMP.w #!Define_YI_AmbSpr236_Invalid
	BCS.b CODE_0FC711
	LDA.w $75E0,y
	EOR.w #$FFFF
	INC
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.w $75E0,x
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductLo
	ASL
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	ROL
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
CODE_0FC711:
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_0FC6D8
	RTS

CODE_0FC718:
	LDA.w $7182,x
	CMP.w #$0058
	BCC.b CODE_0FC72D
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0006
	TAY
	LDA.w DATA_0FC607,y
	STA.w $7A98,x
CODE_0FC72D:
	LDY.w $7A98,x
	BEQ.b CODE_0FC734
	LDY.b #$02
CODE_0FC734:
	LDA.w DATA_0FC5FF,y
	STA.w $7542,x
	STA.w $7540,x
	LDA.w DATA_0FC603,y
	STA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E0,x
	RTS

CODE_0FC74B:
	PHA
	REP.b #$10
	TXA
	LDX.w #$5800
	JSL.l CODE_00B756
	TAY
	LDA.l $7E4800
	TAX
	PLA
	STA.l $7E0000,x
	LDA.w #$0180
	STA.l $7E0002,x
	LDA.w #$0018
	STA.l $7E0004,x
	LDA.w #$7058
	STA.l $7E0006,x
	TYA
	STA.l $7E0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.l $7E000A,x
	STA.l $7E4800
	SEP.b #$10
	LDX.b $12
	RTS

CODE_0FC78D:
	REP.b #$10
	JSL.l CODE_00B753
	TAY
	LDA.l $7E4800
	TAX
	LDA.w !RAM_YI_Global_Layer2YPosLo
	STA.w !RAM_YI_Global_Layer1YPosLo
	STZ.w !RAM_YI_Global_Layer1XPosLo
	STZ.w $6094
	STZ.w !RAM_YI_Global_Layer2YPosLo
	LDA.w !RAM_YI_Global_BG1AddressAndSize
	XBA
	STA.w !RAM_YI_Global_BG1AddressAndSize
	AND.w #$FC00
	STA.l $7E0000,x
	LDA.w #$0180
	STA.l $7E0002,x
	LDA.w #$0018
	STA.l $7E0004,x
	LDA.w #$7068
	STA.l $7E0006,x
	TYA
	STA.l $7E0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.l $7E000A,x
	STA.l $7E4800
	SEP.b #$10
	LDX.b $12
	LDY.b #$5C
CODE_0FC7E3:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_0FC800
	LDA.w #$00FF
	STA.w $74A0,y
	LDA.w $74A2,y
	AND.w #$FFFB
	STA.w $74A2,y
	LDA.w $7042,y
	ORA.w #$0030
	STA.w $7042,y
CODE_0FC800:
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_0FC7E3
	RTS

CODE_0FC807:
	PHB
	LDY.b #$702042>>16
	PHY
	PLB
	LDA.w #$0000
	STA.l $70336C
	LDA.b $16,x
	CLC
	ADC.w #$001E
	STA.b $16,x
	REP.b #$10
	TAX
	LDY.w #$001C
CODE_0FC821:
	LDA.w $702042,y
	STA.w $702DAE,y
	LDA.l DATA_5FD0C8,x
	STA.w $702FAE,y
	LDA.w $702062,y
	STA.w $702DCE,y
	LDA.l DATA_5FD2A8,x
	STA.w $702FCE,y
	LDA.w $702102,y
	STA.w $702E6E,y
	LDA.l DATA_5FD488,x
	STA.w $70306E,y
	DEX
	DEX
	DEY
	DEY
	BPL.b CODE_0FC821
	SEP.b #$10
	LDX.b $12
	PLB
	RTS

DATA_0FC854:
	dw $0001,$0001,$0000,$0001,$0002,$0002,$0002,$0001
	dw $0002,$0003,$0001,$0002,$0003,$0003,$0002,$0003
	dw $0002,$0003,$0002,$0002,$0003,$0003,$0002,$0003

CODE_0FC884:
	PHB
	LDY.b #DATA_00E954>>16
	PHY
	PLB
	LDA.w !RAM_YI_Global_Layer2XPosLo
	STA.l $7E5040
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w #$0004
	AND.w #$01FE
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	REP.b #$10
	TAY
	LDX.w #$002E
CODE_0FC8A3:
	LDA.w !RAM_YI_Global_Layer2XPosLo
	BNE.b CODE_0FC8C4
	LDA.w DATA_00E954,y
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.l DATA_0FC854,x
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !RAM_YI_Global_Layer2XPosLo
	CLC
	ADC.w !REGISTER_PPUMultiplicationProductMid
CODE_0FC8C4:
	STA.l $7E5042,x
	TYA
	SEC
	SBC.w #$0060
	AND.w #$01FE
	TAY
	DEX
	DEX
	BPL.b CODE_0FC8A3
	SEP.b #$10
	LDA.w #$0010
	TSB.w !RAM_YI_Global_HDMAEnable
	LDX.b $12
	PLB
	RTS

CODE_0FC8E1:
	LDA.w #$FEC0
	BRA.b CODE_0FC8EE

CODE_0FC8E6:
	LDA.w #$FFC0
	BRA.b CODE_0FC8EE

CODE_0FC8EB:
	LDA.w #$FC00
CODE_0FC8EE:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $75E0,x
CODE_0FC8F4:
	LDY.w $74A1,x
	LDA.w $6094,y
	BNE.b CODE_0FC8FF
	JMP.w CODE_0FC992

CODE_0FC8FF:
	LDA.w $7680,x
	BMI.b CODE_0FC907
	JMP.w CODE_0FC99D

CODE_0FC907:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	LSR
	LSR
	LSR
	ADC.w #$0040
	TAY
	STY.w !REGISTER_Multiplicand
	LDY.w $70E2,x
	STY.w !REGISTER_Multiplier
	LDA.w #$02FF
	STA.w $74A0,x
	LDA.w $74A2,x
	EOR.w #$0004
	STA.w $74A2,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
	LDA.w !REGISTER_ProductOrRemainderLo
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	EOR.w #$FFFF
	SEC
	ADC.w #$00F0
	STA.w $70E2,x
	INC.b $18,x
	LDA.b $18,x
	CMP.w #$0003
	BCC.b CODE_0FC956
	JSL.l CODE_03A31E
	RTS

CODE_0FC956:
	LSR
	BCC.b CODE_0FC975
	TXA
	AND.w #$0004
	BEQ.b CODE_0FC968
	LDA.w $74A2,x
	ORA.w #$00F0
	STA.w $74A2,x
CODE_0FC968:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	BRA.b CODE_0FC983

CODE_0FC975:
	LDA.w $74A2,x
	AND.w #$000F
	STA.w $74A2,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	ASL
CODE_0FC983:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w $75E0,x
	LDA.w $7042,x
	EOR.w #$0030
	STA.w $7042,x
CODE_0FC992:
	LDA.w $70E2,x
	BPL.b CODE_0FC99D
	LDA.w #$00F0
	STA.w $70E2,x
CODE_0FC99D:
	RTS

CODE_0FC99E:
	LDA.w #$1800
	STA.b $16,x
CODE_0FC9A3:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCC.b CODE_0FCA25
	LDA.w #$10C0
	STA.b $00
	LDA.w #FXDATA_548000+$0001
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.b $16,x
	SEC
	SBC.w #$0014
	CMP.w #$0080
	BCS.b CODE_0FC9D2
	JSL.l CODE_03A31E
	LDY.b #$02
	STY.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	LDX.b #$4A
	LDA.w #$5000
	JMP.w CODE_0FC74B

CODE_0FC9D2:
	STA.b $16,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	CMP.w #$0480
	LDA.w #$0007
	BCS.b CODE_0FC9E2
	LDA.w #$0004
CODE_0FC9E2:
	STA.w $74A2,x
	LDA.w #FXDATA_540000>>16
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_089004>>16
	LDA.w #FXCODE_089004
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$2000
	STA.w $0CF9
	LDX.b $12
	LDY.b #$62
	STY.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	LDY.w !REGISTER_SuperFX_R4_LMULTResultLo
	STY.w !REGISTER_Mode7MatrixParameterA
	LDY.w !REGISTER_SuperFX_R4_LMULTResultHi
	STY.w !REGISTER_Mode7MatrixParameterA
	LDY.b $00
	STY.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductMid
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b $01
	STY.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductMid
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0FCA25:
	RTS

CODE_0FCA26:
	LDA.w #$F7A0
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0FCA2C:
	LDA.w $70E2,x
	BPL.b CODE_0FCA36
	JSL.l CODE_03A31E
	RTS

CODE_0FCA36:
	CMP.w #$0200
	BPL.b CODE_0FCA72
	LDY.b $D2
	BNE.b CODE_0FCA73
	LDA.w #$0200
	STA.w $70E2,x
	LDY.w $745E
	CPY.b #$0B
	BNE.b CODE_0FCA72
	LDA.w #$0002
	STA.b $D2
	LDA.w #$0080
	STA.w $763C
	LDA.w #$0100
	STA.w $7A94
	STZ.w $7AF4
	STZ.w $727C
	STZ.w $727E
	STZ.w $759C
	STZ.w $759E
	LDA.w #$0029
	STA.w $7A96,x
CODE_0FCA72:
	RTS

CODE_0FCA73:
	LDA.w $7A96,x
	BNE.b CODE_0FCA89
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w $7402,x
	CMP.w #$0003
	BCS.b CODE_0FCA89
	INC.w $7402,x
CODE_0FCA89:
	RTS

CODE_0FCA8A:
	LDA.w #$0080
	STA.b $76,x
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	BRA.b CODE_0FCAA3

CODE_0FCA9A:
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FD00
CODE_0FCAA3:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0300
	STA.w $75E2,x
CODE_0FCAB2:
	RTS

DATA_0FCAB3:
	dw $0000,$0001,$0001,$0000,$0000,$0001,$0001,$0000

DATA_0FCAC3:
	dw $0000,$0000,$0040,$0040,$00C0,$00C0,$0080,$0080

CODE_0FCAD3:
	LDA.b $78,x
	CLC
	ADC.b $76,x
	STA.b $78,x
	XBA
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_0FCAB3,y
	STA.w $7402,x
	LDA.w $7042,x
	AND.w #$003F
	ORA.w DATA_0FCAC3,y
	STA.w $7042,x
	RTS

CODE_0FCAF3:
	LDA.w #$0080
	STA.b $16,x
CODE_0FCAF8:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$0100
	BCC.b CODE_0FCB3C
	LDA.w #$0000
	STA.b $00
	LDA.w #FXDATA_548000+$0041
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.b $16,x
	CLC
	ADC.w #$0010
	CMP.w #$1B00
	BCC.b CODE_0FCB39
	LDY.w $74A2,x
	BMI.b CODE_0FCB2D
	DEY
	TYA
	STA.w $74A2,x
	LDY.b #$02
	STY.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	LDX.b #$4B
	LDA.w #$4000
	JMP.w CODE_0FC74B

CODE_0FCB2D:
	JSL.l CODE_03A31E
	LDX.b #$09
	LDA.w #$5400
	JMP.w CODE_0FC74B

CODE_0FCB39:
	JSR.w CODE_0FC9D2
CODE_0FCB3C:
	RTS

CODE_0FCB3D:
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDA.w #$0030
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0070
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0090
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$00A0
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #$3800
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$5800
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.w #$7000
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w #$8000
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_089083>>16
	LDA.w #FXCODE_089083
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSL.l CODE_00BE39	: dl $7E51EC,$703372 : dw $01C0
	SEP.b #$10
	RTS

CODE_0FCB8A:
	REP.b #$20
	LDX.b #$00
	LDA.w #$1400
	STA.b $00
	LDA.w #$1800
	STA.b $02
	LDA.w #$1C00
	STA.b $04
CODE_0FCB9D:
	LDA.b $00
	STA.w $13BE,x
	LDA.b $02
	STA.w $11BE,x
	CLC
	ADC.w #$0010
	STA.w $123E,x
	CLC
	ADC.w #$0010
	STA.w $12BE,x
	CLC
	ADC.w #$0010
	STA.w $133E,x
	LDA.b $04
	STA.w $11FE,x
	CLC
	ADC.w #$0010
	STA.w $127E,x
	CLC
	ADC.w #$0010
	STA.w $12FE,x
	CLC
	ADC.w #$0010
	STA.w $137E,x
	INC.b $02
	INC.b $04
	INX
	INX
	CPX.b #$20
	BCC.b CODE_0FCB9D
	LDA.w #$1840
	STA.b $02
	LDA.w #$1C40
	STA.b $04
CODE_0FCBEA:
	LDA.b $00
	STA.w $13BE,x
	LDA.b $02
	STA.w $11BE,x
	CLC
	ADC.w #$0010
	STA.w $123E,x
	CLC
	ADC.w #$0010
	STA.w $12BE,x
	CLC
	ADC.w #$0010
	STA.w $133E,x
	LDA.b $04
	STA.w $11FE,x
	CLC
	ADC.w #$0010
	STA.w $127E,x
	CLC
	ADC.w #$0010
	STA.w $12FE,x
	CLC
	ADC.w #$0010
	STA.w $137E,x
	INC.b $02
	INC.b $04
	INX
	INX
	CPX.b #$40
	BCC.b CODE_0FCBEA
	JSR.w CODE_0FCF2D
	LDA.w #$7E80
	STA.w $11BC
	JSR.w CODE_0FCCBC
	INC.w $0D15
	LDA.w #$00A0
	STA.w $11B6
	STZ.w $11B8
	STZ.w $11BA
	STZ.w $13FE
	STZ.w $1400
	STZ.w $1402
	LDA.w #$FFFF
	STA.b !RAM_YI_Global_Layer4YPosLo
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$79].LowByte
	STA.l YI_Global_PaletteMirror[$7B].LowByte
	STA.l YI_Global_PaletteMirror[$7E].LowByte
	STA.l YI_Global_PaletteMirror[$7F].LowByte
	SEP.b #$20
	STZ.w $1404
	RTS

CODE_0FCC6F:
	REP.b #$20
	LDA.w $11B6
	BNE.b CODE_0FCC80
	LDA.w $11B8
	ASL
	TAX
	JSR.w (DATA_0FCC99,x)
	BRA.b CODE_0FCC83

CODE_0FCC80:
	DEC.w $11B6
CODE_0FCC83:
	LDA.w $11B8
	CMP.w #$0006
	BNE.b CODE_0FCC93
	LDX.w $11BA
	LDA.w DATA_0FCD56,x
	BEQ.b CODE_0FCC96
CODE_0FCC93:
	STZ.w $1402
CODE_0FCC96:
	SEP.b #$20
	RTS

DATA_0FCC99:
	dw CODE_0FCCA7
	dw CODE_0FCCBC
	dw CODE_0FCCC0
	dw CODE_0FCCF5
	dw CODE_0FCDAA
	dw CODE_0FCE63
	dw CODE_0FCEA0

CODE_0FCCA7:
	JSR.w CODE_0FCCF5
	LDA.w #$7E80
	STA.w $11BC
	STZ.w $1400
	LDA.w #$FFFF
	STA.b !RAM_YI_Global_Layer4YPosLo
	STZ.w $13FE
	RTS

CODE_0FCCBC:
	JSR.w CODE_0FCDAA
	RTS

CODE_0FCCC0:
	LDA.l YI_Global_PaletteMirror[$79].LowByte
	CLC
	ADC.w #$0421
	CMP.w #$8000
	BCC.b CODE_0FCCE4
	LDA.w $1404
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_0FCEDB,x
	STA.w $11B6
	INC.w $1404
	INC.w $11B8
	LDA.w #$7FFF
CODE_0FCCE4:
	STA.l YI_Global_PaletteMirror[$79].LowByte
	STA.l YI_Global_PaletteMirror[$7B].LowByte
	STA.l YI_Global_PaletteMirror[$7E].LowByte
	STA.l YI_Global_PaletteMirror[$7F].LowByte
	RTS

CODE_0FCCF5:
	LDX.w $11BA
	LDA.w DATA_0FCD56,x
	BEQ.b CODE_0FCD4A
	CMP.w #$FFFF
	BEQ.b CODE_0FCD55
	STA.w $60A8
	LDA.w #DATA_0FCF78>>16
	STA.w $60AA
	SEP.b #$20
	LDA.w $012D
	PHA
	LDA.w $012E
	PHA
	LDA.b #$13
	STA.w $012D
	LDA.b #!SuperFX_ScreenMode_ScreenHeight_128pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STA.w $012E
	REP.b #$20
	LDX.b #FXCODE_09E9AF>>16
	LDA.w #FXCODE_09E9AF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	PLA
	STA.w $012E
	PLA
	STA.w $012D
	REP.b #$20
	INC.w $0D15
	INC.w $11B8
	INC.w $11BA
	INC.w $11BA
	INC.w $13FE
	INC.w $13FE
	BRA.b CODE_0FCD55

CODE_0FCD4A:
	LDA.w $1402
	BEQ.b CODE_0FCD55
	LDA.w #$0006
	STA.w $11B8
CODE_0FCD55:
	RTS

DATA_0FCD56:
	dw DATA_0FCF78,DATA_0FCF9A,$0000,DATA_0FCFD1,DATA_0FD00D,DATA_0FD042,DATA_0FD084,$0000
	dw DATA_0FD0C0,DATA_0FD0D9,$0000,DATA_0FD0F8,DATA_0FD108,DATA_0FD142,$0000,DATA_0FD174
	dw DATA_0FD1A8,DATA_0FD1C0,$0000,DATA_0FD1D2,DATA_0FD215,DATA_0FD24F,DATA_0FD25F,DATA_0FD293
	dw DATA_0FD2D1,DATA_0FD309,$0000,DATA_0FD327,DATA_0FD365,DATA_0FD395,$0000,DATA_0FD3C6
	dw DATA_0FD3DF,DATA_0FD420,DATA_0FD44B,$0000,DATA_0FD487,DATA_0FD4C3,DATA_0FD4ED,$0000
	dw DATA_0FD52A,$FFFF

CODE_0FCDAA:
	INC.w $11B8
	REP.b #$10
	LDA.w #$0000
	STA.b $01
	LDA.w $60B0
	BEQ.b CODE_0FCDD2
	LDY.w $11BC
	LDX.w $1400
	LDA.w DATA_0FCE38,x
	TAX
	LDA.w #$0080
	JSL.l CODE_00BEA6
	JSR.w CODE_0FCE40
	JSR.w CODE_0FCE4D
	BRA.b CODE_0FCDF9

CODE_0FCDD2:
	LDY.w $11BC
	LDX.w $1400
	LDA.w DATA_0FCE38,x
	TAX
	LDA.w #$0080
	JSL.l CODE_00BEA6
	JSR.w CODE_0FCE40
	JSR.w CODE_0FCE4D
	LDY.w $11BC
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	JSR.w CODE_0FCE4D
CODE_0FCDF9:
	LDY.w $11BC
	LDX.w $1400
	LDA.w DATA_0FCE38,x
	TAX
	LDA.w #$0080
	JSL.l CODE_00BEA6
	JSR.w CODE_0FCE40
	JSR.w CODE_0FCE4D
	LDY.w $11BC
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	JSR.w CODE_0FCE4D
	LDA.w $60B0
	BEQ.b CODE_0FCE35
	LDY.w $11BC
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	JSR.w CODE_0FCE4D
CODE_0FCE35:
	SEP.b #$10
	RTS

DATA_0FCE38:
	dw $11BE,$123E,$12BE,$133E

CODE_0FCE40:
	LDA.w $1400
	CLC
	ADC.w #$0002
	AND.w #$0007
	STA.w $1400
CODE_0FCE4D:
	LDA.w $11BC
	CLC
	ADC.w #$0020
	STA.w $11BC
	AND.w #$7FF0
	BNE.b CODE_0FCE62
	LDA.w #$7C00
	STA.w $11BC
CODE_0FCE62:
	RTS

CODE_0FCE63:
	LDX.w $13FE
	LDA.b !RAM_YI_Global_Layer4YPosLo
	CLC
	ADC.w #$0002
	STA.b !RAM_YI_Global_Layer4YPosLo
	CMP.w DATA_0FCE90-$02,x
	BCC.b CODE_0FCE8F
	LDA.w DATA_0FCE90-$02,x
	STA.b !RAM_YI_Global_Layer4YPosLo
	LDA.w #$0003
	STA.w $11B8
	LDA.w $1404
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_0FCEDB,x
	STA.w $11B6
	INC.w $1404
CODE_0FCE8F:
	RTS

DATA_0FCE90:
	dw $002F,$005F,$008F,$00BF,$00EF,$011F,$014F,$017F

CODE_0FCEA0:
	LDA.l YI_Global_PaletteMirror[$79].LowByte
	SEC
	SBC.w #$0421
	BPL.b CODE_0FCECA
	INC.w $11BA
	INC.w $11BA
	JSR.w CODE_0FCF2D
	STZ.w $11B8
	LDA.w $1404
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_0FCEDB,x
	STA.w $11B6
	INC.w $1404
	LDA.w #$0000
CODE_0FCECA:
	STA.l YI_Global_PaletteMirror[$79].LowByte
	STA.l YI_Global_PaletteMirror[$7B].LowByte
	STA.l YI_Global_PaletteMirror[$7E].LowByte
	STA.l YI_Global_PaletteMirror[$7F].LowByte
	RTS

DATA_0FCEDB:
	dw $0180,$0140,$0050,$0180,$01E0,$0100,$0130,$0020
	dw $00C0,$0100,$0050,$00A0,$01C0,$0180,$0050,$0170
	dw $0100,$0080,$0050,$0140,$0140,$0080,$0150,$0160
	dw $0160,$0120,$0050,$0180,$0180,$0180,$0050,$0090
	dw $0180,$0180,$0180,$0050,$0180,$0180,$0180,$0050
	dw $0000

CODE_0FCF2D:
	LDA.w #$0000
	STA.b $01
	REP.b #$10
	LDY.w #$7E60
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	LDY.w #$7E80
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	LDY.w #$7EA0
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	LDY.w #$7EC0
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	LDY.w #$7EE0
	LDX.w #$13BE
	LDA.w #$0040
	JSL.l CODE_00BEA6
	SEP.b #$10
	RTS

table "Tables/Fonts/Main.txt"

DATA_0FCF78:
	db $FE,$00,$FD,$00,$FC,$2E
	db "A long, long time ago ..."
	db $FE,$01,$FF

DATA_0FCF9A:
	db $FE,$02,$FD,$10,$FC,$38
	db "This is a story about"
	db $FE,$03,$FD,$18,$FC,$3A
	db "baby Mario and Yoshi."
	db $FF

DATA_0FCFD1:
	db $FE,$00,$FD,$00,$FC,$20
	db " A stork hurries across the"
	db $FE,$01,$FD,$08,$FC,$36
	db "dusky, pre-dawn sky."
	db $FF

DATA_0FD00D:
	db $FE,$02,$FD,$10,$FC,$30
	db "In his bill, he supports"
	db $FE,$03,$FD,$18,$FC,$4D
	db "a pair of twins."
	db $FF

DATA_0FD042:
	db $FE,$00,$FD,$00,$FC,$20
	db "Suddenly, a shadow appears"
	db $FE,$01,$FD,$08,$FC,$24
	db "in a gap between the clouds"
	db $FF

DATA_0FD084:
	db $FE,$02,$FD,$10,$FC,$30
	db "and races towards the"
	db $FE,$03,$FD,$18,$FC,$29
	db "stork with blinding speed."
	db $FF

DATA_0FD0C0:
	db $FE,$00,$FE,$01,$FD,$00,$FC,$10,$FB,$D2
	db "SCRREEEECH!!!"
	db $D2,$FF

DATA_0FD0D9:
	db $FE,$02,$FD,$10,$FC,$37,$D2
	db "THE BABIES ARE MINE!"
	db $D2,$FE,$03,$FF

DATA_0FD0F8:
	db $FE,$00,$FE,$01,$FD,$00,$FC,$54,$FB
	db "WOW!!!"
	db $FF

DATA_0FD108:
	db $FE,$02,$FD,$10,$FC,$30
	db "Snatching only one baby,"
	db $FE,$03,$FD,$18,$FC,$39
	db "the creature vanishes"
	db $FF

DATA_0FD142:
	db $FE,$00,$FD,$00,$FC,$47
	db "into the darkness"
	db $FE,$01,$FD,$08,$FC,$41
	db "from whence it came."
	db $FF

DATA_0FD174:
	db $FE,$00,$FD,$00,$FC,$34
	db "The second baby falls"
	db $FE,$01,$FD,$08,$FC,$3B
	db "undetected towards"
	db $FF

DATA_0FD1A8:
	db $FE,$02,$FE,$03,$FD,$10,$FC,$48
	db "the open sea..."
	db $FF

DATA_0FD1C0:
	db $FE,$00,$FE,$01,$FD,$00,$FC,$48,$FB
	db "OH NO..."
	db $FF

DATA_0FD1D2:
	db $FE,$00,$FD,$00,$FC,$28
	db "Meanwhile, here is Yoshi's"
	db $FE,$01,$FD,$08,$FC,$26
	db "Island, home to all Yoshies."
	db $FF

DATA_0FD215:
	db $FE,$02,$FD,$10,$FC,$4A
	db "It's a lovely day,"
	db $FE,$03,$FD,$18,$FC,$2D
	db "and Yoshi is taking a walk."
	db $FF

DATA_0FD24F:
	db $FE,$00,$FE,$01,$FD,$00,$FC,$4C,$FB
	db "HUH?!?"
	db $FF

DATA_0FD25F:
	db $FE,$02,$FD,$10,$FC,$28
	db "Suddenly, a baby drops in"
	db $FE,$03,$FD,$18,$FC,$4C
	db "onto his back."
	db $FF

DATA_0FD293:
	db $FE,$00,$FD,$00,$FC,$26
	db "The baby seems to be fine."
	db $FE,$01,$FD,$08,$FC,$30
	db "This is very fortunate!"
	db $FF

DATA_0FD2D1:
	db $FE,$02,$FD,$10,$FC,$2B
	db "Wha-?  Something else fell"
	db $FE,$03,$FD,$18,$FC,$4E
	db "with the baby ..."
	db $FF

DATA_0FD309:
	db $FE,$00,$FD,$00,$FC,$38
	db "Let's take a peek ..."
	db $FE,$01,$FF

DATA_0FD327:
	db $FE,$00,$FD,$00,$FC,$28
	db "It looks like a map. Maybe"
	db $FE,$01,$FD,$08,$FC,$30
	db "the stork was using it?"
	db $FF

DATA_0FD365:
	db $FE,$02,$FD,$10,$FC,$28
	db "But Yoshi can't figure it"
	db $FE,$03,$FD,$18,$FC,$58
	db "      out."
	db $FF

DATA_0FD395:
	db $FE,$00,$FD,$00,$FC,$2F
	db "Yoshi decides to talk to"
	db $FE,$01,$FD,$08,$FC,$5D
	db "his friends."
	db $FF

DATA_0FD3C6:
	db $FE,$00,$FE,$01,$FD,$00,$FC,$10,$FB
	db "AAAAAAAAAAKK!!!"
	db $FF

DATA_0FD3DF:
	db $FE,$02,$FD,$10,$FC,$28
	db "Kamek, the evil Magikoopa,"
	db $FE,$03,$FD,$18,$FC,$27
	db "and kidnapper of the baby,"
	db $FF

DATA_0FD420:
	db $FE,$00,$FD,$00,$FC,$34
	db "quickly dispatches his"
	db $FE,$01,$FD,$08,$FC,$6A
	db "toadies,"
	db $FF

DATA_0FD44B:
	db $FE,$02,$FD,$10,$FC,$2C
	db "when he discovers that he"
	db $FE,$03,$FD,$18,$FC,$36
	db "missed the other baby!"
	db $FF

DATA_0FD487:
	db $FE,$00,$FD,$00,$FC,$29
	db "Yoshi heads leisurely back"
	db $FE,$01,$FD,$08,$FC,$37
	db "to the other Yoshies,"
	db $FF

DATA_0FD4C3:
	db $FE,$02,$FD,$10,$FC,$38
	db "unaware of the danger"
	db $FE,$03,$FD,$18,$FC,$6A
	db "at hand."
	db $FF

DATA_0FD4ED:
	db $FE,$00,$FD,$00,$FC,$20
	db "Kamek's forces are actively"
	db $FE,$01,$FD,$08,$FC,$3A
	db "searching the island."
	db $FF

DATA_0FD52A:
	db $FE,$00,$FD,$00,$FC,$22
	db "Will these two children ever"
	db $FE,$01,$FD,$08,$FC,$21
	db "reach their parents safely?"
	db $FF

cleartable

CODE_0FD56E:
	LDA.w #$FFC0
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

DATA_0FD575:
	dw CODE_0FD589
	dw CODE_0FD5D2
	dw CODE_0FD67E
	dw CODE_0FD6FD

CODE_0FD57D:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0FD575,x)
	JSR.w CODE_0FD725
	RTS

CODE_0FD589:
	TYX
	LDA.w $70E2,x
	CMP.w #$0084
	BPL.b CODE_0FD5AA
	LDA.w #$0066
	STA.w $7A96,x
	LDA.w #$0058
	STA.w $7AF6,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0030
	STA.w $7A98,x
	INC.b $76,x
	RTS

CODE_0FD5AA:
	LDA.w $7A98,x
	BNE.b CODE_0FD5C3
	LDA.w #$0006
	STA.w $7A98,x
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0008
	BMI.b CODE_0FD5C3
	STZ.w $7402,x
CODE_0FD5C3:
	LDA.w $7AF8,x
	BNE.b CODE_0FD5D1
	LDA.w #$0002
	STA.w $7AF8,x
	DEC.w !RAM_YI_Global_Layer2XPosLo
CODE_0FD5D1:
	RTS

CODE_0FD5D2:
	TYX
	LDA.w $7AF6,x
	BNE.b CODE_0FD605
	DEC
	STA.w $7AF6,x
	LDA.w #$023D
	JSR.w CODE_0FBFCD
	LDA.w $70E2,x
	SEC
	SBC.w #$0010
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0070
	STA.w $7182,y
	LDA.w #$0700
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $75E2,y
	LDA.w #$0100
	STA.w $7A36,y
CODE_0FD605:
	LDY.w $7402,x
	CPY.b #$09
	BEQ.b CODE_0FD625
	LDA.w $7A98,x
	BNE.b CODE_0FD624
	CPY.b #$06
	BNE.b CODE_0FD61B
	LDA.w #$0007
	STA.w $7402,x
CODE_0FD61B:
	LDA.w #$0002
	STA.w $7A98,x
	INC.w $7402,x
CODE_0FD624:
	RTS

CODE_0FD625:
	LDA.w $7A96,x
	BNE.b CODE_0FD639
	INC.w $7402,x
	LDY.b #$22
	STY.b $18,x
	LDA.w #$02E0
	STA.w $7A96,x
	INC.b $76,x
CODE_0FD639:
	RTS

DATA_0FD63A:
	db $1E,$22,$23,$24,$25,$24,$23,$1E,$22,$21,$1F,$20,$1F,$1E,$1E,$1D
	db $1C,$1B,$1A,$19,$18,$17,$16,$15,$14,$13,$12,$11,$10,$0F,$0E,$0D
	db $0C,$0B

DATA_0FD65C:
	db $FF,$04,$04,$04,$32,$03,$03,$10,$02,$02,$03,$04,$02,$F0,$FF,$24
	db $02,$02,$A0,$02,$02,$02,$02,$02,$02,$02,$02,$02,$20,$02,$02,$02
	db $02,$04

CODE_0FD67E:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0FD6CA
	DEC.b $18,x
	BPL.b CODE_0FD691
	LDA.w #$4005
	STA.w $7040,x
	INC.b $76,x
	RTS

CODE_0FD691:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_0FD65C,y
	STA.w $7A98,x
	LDA.w DATA_0FD63A,y
	STA.w $7402,x
	REP.b #$20
	TAY
	CPY.b #$1C
	BNE.b CODE_0FD6BC
	LDA.w #$023F
	JSR.w CODE_0FBFCD
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	STY.b $78,x
CODE_0FD6BC:
	LDY.b $78,x
	BEQ.b CODE_0FD6CA
	LDA.w $7402,x
	SEC
	SBC.w #$001C
	STA.w $7402,y
CODE_0FD6CA:
	LDA.w $7A96,x
	BNE.b CODE_0FD6FC
	DEC
	STA.w $7A96,x
	LDA.w #$023C
	JSR.w CODE_0FBFCD
	LDA.w $70E2,x
	SEC
	SBC.w #$0012
	STA.w $70E2,y
	LDA.w $7182,x
	SEC
	SBC.w #$0070
	STA.w $7182,y
	LDA.w #$0400
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	STA.w $75E2,y
	LDA.w #$0040
	STA.w $7542,y
CODE_0FD6FC:
	RTS

CODE_0FD6FD:
	TYX
	RTS

DATA_0FD6FF:
	db $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0D,$0E
	db $0F,$10,$11,$10,$0F,$11,$10,$10,$10,$10,$12,$13,$14,$15,$15,$15
	db $15,$15,$15,$14,$16,$16

CODE_0FD725:
	LDA.w $7402,x
	CMP.w $7A36,x
	BEQ.b CODE_0FD764
	STA.w $7A36,x
	REP.b #$10
	TAY
	LDA.w DATA_0FD6FF,y
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	TAY
	LDA.w #$0008
	STA.b $00
	PHX
	LDX.w #$0000
CODE_0FD747:
	LDA.w DATA_0FD765,y
	STA.w $6128,x
	CLC
	ADC.w #$0200
	STA.w $612A,x
	INX
	INX
	INX
	INX
	INY
	INY
	DEC.b $00
	BNE.b CODE_0FD747
	INC.w $0B85
	PLX
	SEP.b #$10
CODE_0FD764:
	RTS

DATA_0FD765:
	dw FXDATA_53C000+$0000,FXDATA_53C000+$0040,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$0C00,FXDATA_53C000+$0C40,FXDATA_53C000+$2000,FXDATA_53C000+$2400
	dw FXDATA_53C000+$0080,FXDATA_53C000+$00C0,FXDATA_53C000+$0280,FXDATA_53C000+$02C0,FXDATA_53C000+$0C80,FXDATA_53C000+$0CC0,FXDATA_53C000+$2040,FXDATA_53C000+$2440
	dw FXDATA_53C000+$0100,FXDATA_53C000+$0140,FXDATA_53C000+$0300,FXDATA_53C000+$0340,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2080,FXDATA_53C000+$2480
	dw FXDATA_53C000+$0180,FXDATA_53C000+$01C0,FXDATA_53C000+$0380,FXDATA_53C000+$03C0,FXDATA_53C000+$0D80,FXDATA_53C000+$0DC0,FXDATA_53C000+$20C0,FXDATA_53C000+$24C0
	dw FXDATA_53C000+$0600,FXDATA_53C000+$0640,FXDATA_53C000+$0800,FXDATA_53C000+$0840,FXDATA_53C000+$1000,FXDATA_53C000+$1040,FXDATA_53C000+$2000,FXDATA_53C000+$2400
	dw FXDATA_53C000+$0680,FXDATA_53C000+$06C0,FXDATA_53C000+$0880,FXDATA_53C000+$08C0,FXDATA_53C000+$1080,FXDATA_53C000+$10C0,FXDATA_53C000+$2440,FXDATA_53C000+$2040
	dw FXDATA_53C000+$0700,FXDATA_53C000+$0740,FXDATA_53C000+$0900,FXDATA_53C000+$0940,FXDATA_53C000+$1100,FXDATA_53C000+$1140,FXDATA_53C000+$2480,FXDATA_53C000+$2080
	dw FXDATA_53C000+$0780,FXDATA_53C000+$07C0,FXDATA_53C000+$0980,FXDATA_53C000+$09C0,FXDATA_53C000+$1180,FXDATA_53C000+$11C0,FXDATA_53C000+$24C0,FXDATA_53C000+$20C0
	dw FXDATA_53C000+$1400,FXDATA_53C000+$1440,FXDATA_53C000+$1600,FXDATA_53C000+$1640,FXDATA_53C000+$1100,FXDATA_53C000+$1140,FXDATA_53C000+$2480,FXDATA_53C000+$2080
	dw FXDATA_53C000+$1480,FXDATA_53C000+$14C0,FXDATA_53C000+$1680,FXDATA_53C000+$16C0,FXDATA_53C000+$1100,FXDATA_53C000+$1140,FXDATA_53C000+$2480,FXDATA_53C000+$2080
	dw FXDATA_53C000+$1A60,FXDATA_53C000+$1AA0,FXDATA_53C000+$1AE0,FXDATA_53C000+$1AE0,FXDATA_53C000+$1180,FXDATA_53C000+$11C0,FXDATA_53C000+$2100,FXDATA_53C000+$2100
	dw FXDATA_53C000+$1B20,FXDATA_53C000+$1B60,FXDATA_53C000+$1BA0,FXDATA_53C000+$1BA0,FXDATA_53C000+$0C80,FXDATA_53C000+$0CC0,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$1A60,FXDATA_53C000+$1AA0,FXDATA_53C000+$1AE0,FXDATA_53C000+$1AE0,FXDATA_53C000+$0C00,FXDATA_53C000+$0C40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$0000,FXDATA_53C000+$0040,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$0C00,FXDATA_53C000+$0C40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$0000,FXDATA_53C000+$0040,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$0000,FXDATA_53C000+$0040,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$1100,FXDATA_53C000+$1140,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$0000,FXDATA_53C000+$0040,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$0000,FXDATA_53C000+$0040,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$1180,FXDATA_53C000+$11C0,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$0100,FXDATA_53C000+$0140,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$1580,FXDATA_53C000+$15C0,FXDATA_53C000+$1780,FXDATA_53C000+$17C0,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$1A00,FXDATA_53C000+$1A20,FXDATA_53C000+$1C00,FXDATA_53C000+$1C20,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$1500,FXDATA_53C000+$1520,FXDATA_53C000+$1700,FXDATA_53C000+$1720,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2140,FXDATA_53C000+$2140
	dw FXDATA_53C000+$0000,FXDATA_53C000+$0040,FXDATA_53C000+$0200,FXDATA_53C000+$0240,FXDATA_53C000+$0D00,FXDATA_53C000+$0D40,FXDATA_53C000+$2140,FXDATA_53C000+$2140

CODE_0FD8D5:
	RTS

DATA_0FD8D6:
	db $00,$01,$01,$00,$00,$01,$01,$00

DATA_0FD8DE:
	db $00,$00,$04,$04,$06,$06,$02,$02

DATA_0FD8E6:
	dw $0060,$0074,$0076

DATA_0FD8EC:
	dw $0600,$FC00,$FE00,$0000

CODE_0FD8F4:
	LDY.b $78,x
	CPY.b #$06
	BNE.b CODE_0FD916
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$007C
	STA.w $7182,x
	LDA.w #$0804
	STA.w $7040,x
	RTS

CODE_0FD916:
	LDA.w DATA_0FD8E6,y
	CMP.w $7182,x
	BPL.b CODE_0FD931
	STA.w $7182,x
	INY
	INY
	STY.b $78,x
	LDA.w DATA_0FD8EC,y
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FF20
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_0FD931:
	LDA.w $7A98,x
	BNE.b CODE_0FD965
	LDA.b $78,x
	AND.w #$0002
	LSR
	TAY
	LDA.w DATA_0FD8EC,y
	STA.b $00
	INC.b $18,x
	LDA.b $18,x
	BIT.w #$0008
	BEQ.b CODE_0FD94D
	STZ.b $18,x
CODE_0FD94D:
	TAY
	SEP.b #$20
	LDA.w DATA_0FD8DE,y
	EOR.b $00
	STA.w $7400,x
	LDA.b #$02
	STA.w $7A98,x
	LDA.w DATA_0FD8D6,y
	STA.w $7402,x
	REP.b #$20
CODE_0FD965:
	RTS

CODE_0FD966:
	RTS

DATA_0FD967:
	dw CODE_0FD9BA
	dw CODE_0FD9D4
	dw CODE_0FDA04
	dw CODE_0FDA3B
	dw CODE_0FDA8A
	dw CODE_0FD6FD

CODE_0FD973:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0FD967,x)
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0200
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #(FXDATA_548000+$20E0)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$20E0
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	ASL
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0800
	STA.w $0CF9
	LDX.b $12
	RTS

CODE_0FD9BA:
	TYX
	LDA.w #$0050
	CMP.w $7182,x
	BPL.b CODE_0FD9CB
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
CODE_0FD9CB:
	RTS

DATA_0FD9CC:
	dw $0140,$00C0

DATA_0FD9D0:
	dw $0020,$FFE0

CODE_0FD9D4:
	TYX
	LDY.b $78,x
	LDA.w $7A36,x
	CMP.w DATA_0FD9CC,y
	BEQ.b CODE_0FD9E7
	CLC
	ADC.w DATA_0FD9D0,y
	STA.w $7A36,x
	RTS

CODE_0FD9E7:
	INY
	INY
	STY.b $78,x
	CPY.b #$04
	BNE.b CODE_0FDA03
	LDA.w #$0080
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
	INC.b $76,x
CODE_0FDA03:
	RTS

CODE_0FDA04:
	TYX
	LDA.w $7A36,x
	CMP.w #$0100
	BEQ.b CODE_0FDA14
	CLC
	ADC.w #$0010
	STA.w $7A36,x
CODE_0FDA14:
	LDA.w #$006E
	CMP.w $7182,x
	BPL.b CODE_0FDA2A
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	INC.b $76,x
CODE_0FDA2A:
	RTS

DATA_0FDA2B:
	dw $0140,$00C0,$0120,$0100

DATA_0FDA33:
	dw $0010,$FFF0,$0008,$FFF8

CODE_0FDA3B:
	TYX
	LDY.b $78,x
	LDA.w $7A36,x
	CMP.w DATA_0FDA2B,y
	BEQ.b CODE_0FDA4E
	CLC
	ADC.w DATA_0FDA33,y
	STA.w $7A36,x
	RTS

CODE_0FDA4E:
	INY
	INY
	CPY.b #$08
	BEQ.b CODE_0FDA57
	STY.b $78,x
	RTS

CODE_0FDA57:
	LDA.w #$0040
	STA.w $7A96,x
	STZ.b $78,x
	LDA.w #$007A
	STA.w $7AF6,x
	INC.b $76,x
	RTS

DATA_0FDA68:
	dw $00C0,$0140,$00C0,$0140,$00E0,$0100

DATA_0FDA74:
	dw $FFE0,$0020,$FFE0,$0020,$FFE0

DATA_0FDA7E:
	dw $0020,$0024,$0000,$0010,$0000,$0000

CODE_0FDA8A:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FDACD
	LDA.w $7A98,x
	BNE.b CODE_0FDACD
	LDY.b $78,x
	LDA.w $7A36,x
	CMP.w DATA_0FDA68,y
	BEQ.b CODE_0FDAA8
	CLC
	ADC.w DATA_0FDA74,y
	STA.w $7A36,x
	BRA.b CODE_0FDACD

CODE_0FDAA8:
	INY
	INY
	STY.b $78,x
	LDA.w DATA_0FDA7E,y
	STA.w $7A98,x
	CPY.b #$0C
	BNE.b CODE_0FDACD
	LDY.b $18,x
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$0080
	STA.w $7A98,y
	LDA.w #$2005
	STA.w $7040,x
	INC.b $76,x
	RTS

CODE_0FDACD:
	LDA.w $7AF6,x
	BNE.b CODE_0FDAF0
	DEC
	STA.w $7AF6,x
	LDA.w #$023E
	JSR.w CODE_0FBFCD
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0002
	STA.w $7A98,y
	STY.b $18,x
CODE_0FDAF0:
	LDY.b $18,x
	BEQ.b CODE_0FDB2F
	LDA.w $7A36,x
	STA.w $7A36,y
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$001C
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0B86B6>>16
	LDA.w #FXCODE_0B86B6
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b $18,x
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	SEC
	SBC.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.w $7182,y
	LDA.w $7A98,y
	BNE.b CODE_0FDB2F
	INC
	STA.w $7402,y
CODE_0FDB2F:
	RTS

CODE_0FDB30:
	RTS

DATA_0FDB31:
	dw CODE_0FD6FD
	dw CODE_0FDBB0
	dw CODE_0FD6FD

DATA_0FDB37:
	dw FXDATA_548000+$20A1,FXDATA_548000+$2081,FXDATA_548000+$20E1,FXDATA_548000+$20C1,FXDATA_548000+$0081,FXDATA_548000+$00A1

CODE_0FDB43:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0FDB31,x)
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$0200
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.b $78,x
	LDA.w #(FXDATA_548000+$0081)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w DATA_0FDB37,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #$0020
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LSR
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0800
	STA.w $0CF9
	LDX.b $12
	LDY.w $74A2,x
	BPL.b CODE_0FDB99
	SEP.b #$20
	LDA.b #$06
	STA.w $74A2,x
	REP.b #$20
CODE_0FDB99:
	RTS

DATA_0FDB9A:
	db $00,$08,$0A,$08,$00,$02,$04,$06,$04,$02,$00

DATA_0FDBA5:
	db $FF,$03,$40,$03,$03,$03,$04,$40,$03,$04,$30

CODE_0FDBB0:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0FDBD4
	DEC.b $18,x
	BPL.b CODE_0FDBC3
	INC.b $76,x
	LDA.w #$2005
	STA.w $7040,x
	RTS

CODE_0FDBC3:
	SEP.b #$20
	LDY.b $18,x
	LDA.w DATA_0FDBA5,y
	STA.w $7A98,x
	LDA.w DATA_0FDB9A,y
	STA.b $78,x
	REP.b #$20
CODE_0FDBD4:
	RTS

CODE_0FDBD5:
	RTS

DATA_0FDBD6:
	dw $0090,$007C,$008C,$00A4

DATA_0FDBDE:
	dw $007B,$0076,$006E,$0077

DATA_0FDBE6:
	dw $0218,$01B0,$0190,$0180

CODE_0FDBEE:
	LDY.b #$07
	STY.b $16,x
	LDA.w #$0400
	STA.w $75E2,x
	LDA.w #$0008
	STA.b $00
CODE_0FDBFD:
	LDY.b $00
	LDA.w DATA_0FDBD6-$02,y
	STA.b $02
	LDA.w DATA_0FDBDE-$02,y
	STA.b $04
	LDA.w DATA_0FDBE6-$02,y
	STA.b $06
	LDA.w #$0241
	JSR.w CODE_0FBFCD
	LDA.b $02
	STA.w $70E2,y
	LDA.b $04
	STA.w $7182,y
	LDA.b $06
	STA.w $7A96,y
	LDA.b $00
	STA.w $7722,y
	LSR
	DEC
	STA.w $7402,y
	LDA.w #$0100
	STA.w $7A98,y
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	LDA.w #$0100
	STA.w $7A36,y
	DEC.b $00
	DEC.b $00
	BNE.b CODE_0FDBFD
	LDA.w #$0242
	JSR.w CODE_0FBFCD
	LDA.w #$0060
	STA.w $70E2,y
	LDA.w #$0078
	STA.w $7182,y
	LDA.w #$0009
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	RTS

DATA_0FDC64:
	dw CODE_0FDC73
	dw CODE_0FDCB6
	dw CODE_0FDCEC

CODE_0FDC6A:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0FDC64,x)
	RTS

CODE_0FDC73:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0FDC7C
	STZ.w $7402,x
CODE_0FDC7C:
	LDA.w $7A96,x
	BNE.b CODE_0FDCB5
	INC.b $76,x
	DEC.b $16,x
	BNE.b CODE_0FDCA6
	LDA.w #$0014
	STA.w $7A98,x
	LDA.w #$0004
	STA.w $7402,x
	DEC
	STA.b $18,x
	INC.b $76,x
	LDA.w #$0004
	LDY.w $7A36,x
	BEQ.b CODE_0FDCA3
	LDA.w #$0001
CODE_0FDCA3:
	STA.b $16,x
	RTS

CODE_0FDCA6:
	INC.w $7402,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7542,x
CODE_0FDCB5:
	RTS

CODE_0FDCB6:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0FDCE7
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$0086
	CMP.w $7182,x
	BPL.b CODE_0FDCE7
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0003
	STA.w $7402,x
	LDA.w #$0004
	STA.w $7A98,x
	LDA.w #$000A
	STA.w $7A96,x
	DEC.b $76,x
CODE_0FDCE7:
	RTS

DATA_0FDCE8:
	db $18,$98

DATA_0FDCEA:
	db $10,$90

CODE_0FDCEC:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0FDD41
	LDA.w $7402,x
	INC
	CMP.w #$0008
	BNE.b CODE_0FDCFE
	LDA.w #$0004
CODE_0FDCFE:
	STA.w $7402,x
	DEC.b $18,x
	BNE.b CODE_0FDD3B
	DEC.b $16,x
	BNE.b CODE_0FDD32
	LDA.w #$5005
	STA.w $7040,x
	LDA.w #$0003
	LDY.w $7A36,x
	BEQ.b CODE_0FDD1A
	LDA.w #$FFFF
CODE_0FDD1A:
	STA.b $16,x
	INC.w $7A36,x
	STZ.b $76,x
	LDA.w DATA_0FDCE8,y
	AND.w #$00FF
	STA.w $7A96,x
	LDA.w DATA_0FDCEA,y
	AND.w #$00FF
	BRA.b CODE_0FDD3E

CODE_0FDD32:
	LDY.b #$03
	STY.b $18,x
	LDA.w #$0014
	BRA.b CODE_0FDD3E

CODE_0FDD3B:
	LDA.w #$0004
CODE_0FDD3E:
	STA.w $7A98,x
CODE_0FDD41:
	RTS

CODE_0FDD42:
	RTS

DATA_0FDD43:
	dw FXDATA_548000+$4001,FXDATA_548000+$6001,FXDATA_548000+$6021,FXDATA_548000+$6041,FXDATA_548000+$6061

DATA_0FDD4D:
	dw $0000,$0020,$0040,$0060

DATA_0FDD55:
	dw CODE_0FDDB3
	dw CODE_0FDE06
	dw CODE_0FDE3D
	dw CODE_0FDE65
	dw CODE_0FDEFD
	dw CODE_0FDF25

CODE_0FDD61:
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0FDD55,x)
CODE_0FDD69:
	LDY.b $78,x
	LDA.w DATA_0FDD43,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #FXDATA_548000+$4001>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0200
	SEC
	SBC.w !REGISTER_SuperFX_R6_MultiplierLo
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.w $7722,x
	LDA.w DATA_0FDD4D-$02,y
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w #$0800
	STA.w $0CF9
	RTS

DATA_0FDDAB:
	dw $0048,$0120,$00C0,$0018

CODE_0FDDB3:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0FDDDA
	DEC.b $18,x
	LDY.b $18,x
	BNE.b CODE_0FDDC5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
	RTS

CODE_0FDDC5:
	LDY.w $7722,x
	LDA.w DATA_0FDDAB-$02,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$000E
	STA.w $7A98,x
	LDA.w #$000A
	STA.w $7AF8,x
CODE_0FDDDA:
	LDY.b $18,x
	CPY.b #$01
	BNE.b CODE_0FDE05
	LDA.w $7A36,x
	LDY.w $7AF8,x
	BNE.b CODE_0FDDF6
	SEC
	SBC.w #$0030
	CMP.w #$0100
	BPL.b CODE_0FDE02
	LDA.w #$0100
	BRA.b CODE_0FDE02

CODE_0FDDF6:
	CLC
	ADC.w #$0010
	CMP.w #$0180
	BMI.b CODE_0FDE02
	LDA.w #$0180
CODE_0FDE02:
	STA.w $7A36,x
CODE_0FDE05:
	RTS

CODE_0FDE06:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FDE05
	LDY.w $7722,x
	CPY.b #$02
	BNE.b CODE_0FDE24
	LDA.w #$0010
	STA.w $7A98,x
	LDA.w #$0002
	STA.b $16,x
	STA.b $78,x
	ASL
	STA.b $76,x
	RTS

CODE_0FDE24:
	LDY.b #$02
	STY.b $78,x
	LDA.w #$0010
	STA.w $7540,x
	LDA.w #$0040
	STA.w $75E2,x
	LDA.w #$0300
	STA.w $75E0,x
	INC.b $76,x
	RTS

CODE_0FDE3D:
	TYX
	LDA.w #$0078
	CMP.w $7182,x
	BNE.b CODE_0FDE4F
	LDA.w #$0010
	STA.w $7542,x
	INC.b $76,x
	RTS

CODE_0FDE4F:
	BPL.b CODE_0FDE55
	DEC.w $7182,x
	RTS

CODE_0FDE55:
	INC.w $7182,x
	RTS

DATA_0FDE59:
	dw $0002,$FFFE

DATA_0FDE5D:
	dw $000A,$0000

DATA_0FDE61:
	dw $0006,$0004

CODE_0FDE65:
	TYX
	LDA.w $7A96,x
	BNE.b CODE_0FDE89
	LDA.w #$0010
	STA.w $7A96,x
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_AmbSpr244_Invalid
	BNE.b CODE_0FDE7F
	LDA.w #$0040
	STA.w $7A96,x
CODE_0FDE7F:
	LDA.w $75E2,x
	EOR.w #$FFFF
	INC
	STA.w $75E2,x
CODE_0FDE89:
	LDA.w $7AF6,x
	BNE.b CODE_0FDEE0
	LDA.w #$0002
	STA.w $7AF6,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0BBCF8>>16
	LDA.w #FXCODE_0BBCF8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	SEP.b #$20
	EOR.b #$FF
	INC
	CMP.b #$80
	ROR
	REP.b #$20
	SEC
	SBC.w $7A38,x
	BEQ.b CODE_0FDEE0
	BPL.b CODE_0FDECE
	CMP.w #$FF80
	BMI.b CODE_0FDED3
CODE_0FDEC5:
	LDA.w $7A38,x
	SEC
	SBC.w #$0002
	BRA.b CODE_0FDEDA

CODE_0FDECE:
	CMP.w #$0080
	BPL.b CODE_0FDEC5
CODE_0FDED3:
	LDA.w $7A38,x
	CLC
	ADC.w #$0002
CODE_0FDEDA:
	AND.w #$00FF
	STA.w $7A38,x
CODE_0FDEE0:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b $78,x
	CLC
	ADC.w DATA_0FDE59,y
	CMP.w DATA_0FDE5D,y
	BNE.b CODE_0FDEFA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	EOR.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_0FDE61,y
CODE_0FDEFA:
	STA.b $78,x
	RTS

CODE_0FDEFD:
	TYX
	LDA.w $7A98,x
	BNE.b CODE_0FDF24
	DEC.b $16,x
	BNE.b CODE_0FDF1C
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $7542,x
	LDA.w #$0800
	STA.w $75E2,x
	INC.b $76,x
	RTS

CODE_0FDF1C:
	STZ.b $78,x
	LDA.w #$0020
	STA.w $7A98,x
CODE_0FDF24:
	RTS

CODE_0FDF25:
	TYX
	LDA.w #$0077
	CMP.w $7182,x
	BPL.b CODE_0FDF51
	STA.w $7182,x
	LDY.b #$02
	STY.b $78,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	STA.w $7540,x
	STZ.w $7542,x
	LDA.w #$0040
	STA.w $75E2,x
	LDA.w #$0300
	STA.w $75E0,x
	LDY.b #$02
	STY.b $76,x
CODE_0FDF51:
	RTS

CODE_0FDF52:
	RTS

DATA_0FDF53:
	db $04,$02,$08,$02,$04,$02,$08,$04,$10

DATA_0FDF5C:
	db $01,$00,$02,$00,$01,$00,$02,$01,$00

CODE_0FDF65:
	LDA.w $7A98,x
	BNE.b CODE_0FDF85
	DEC.b $16,x
	BPL.b CODE_0FDF73
	LDA.w #$0008
	STA.b $16,x
CODE_0FDF73:
	SEP.b #$20
	LDY.b $16,x
	LDA.w DATA_0FDF53,y
	STA.w $7A98,x
	LDA.w DATA_0FDF5C,y
	STA.w $7402,x
	REP.b #$20
CODE_0FDF85:
	RTS

DATA_0FDF86:
	dw $0000,$0015,$0025

CODE_0FDF8C:
	LDY.b #$02
CODE_0FDF8E:
	LDA.w #$0100
	STA.w $7A96,x
	LDA.w #$FF40
	STA.w $75E0,x
	LDA.w #$00C0
	STA.b $76,x
	LDA.w #$0008
	STA.b $00
CODE_0FDFA4:
	LDY.b $00
	LDA.w DATA_0FDF86-$02,y
	STA.b $02
	LDA.w #$0244
	JSR.w CODE_0FBFCD
	LDA.w #$04E0
	STA.w $70E2,y
	LDA.w #$0040
	STA.w $7182,y
	LDA.b $02
	STA.w $7AF8,y
	LDA.b $00
	STA.w $7722,y
	LSR
	DEC
	STA.w $7402,y
	LDA.w #$0100
	STA.w $7A36,y
	LDA.w #$0002
	STA.w $7400,y
	DEC.b $00
	DEC.b $00
	BNE.b CODE_0FDFA4
	RTS

CODE_0FDFDF:
	LDA.w $7A96,x
	BNE.b CODE_0FDFEE
	INC
	STA.w $7540,x
	DEC.b $76,x
	BPL.b CODE_0FDFEE
	STZ.b $76,x
CODE_0FDFEE:
	LDA.w $7A98,x
	BNE.b CODE_0FE007
	LDA.w #$0006
	STA.w $7A98,x
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0008
	BMI.b CODE_0FE007
	STZ.w $7402,x
CODE_0FE007:
	LDA.b $18,x
	CLC
	ADC.b $76,x
	BIT.w #$FF00
	BEQ.b CODE_0FE017
	DEC.w !RAM_YI_Global_Layer2XPosLo
	AND.w #$00FF
CODE_0FE017:
	STA.b $18,x
	JSR.w CODE_0FD725
	RTS

CODE_0FE01D:
	RTS

CODE_0FE01E:
	LDA.w $7AF8,x
	BNE.b CODE_0FE055
	LDA.w $7A98,x
	BNE.b CODE_0FE04E
	DEC
	STA.w $7A98,x
	LDA.w #$FE80
	LDY.w $7722,x
	CPY.b #$08
	BNE.b CODE_0FE039
	LDA.w #$FD00
CODE_0FE039:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7542,x
	LDA.w #$0080
	STA.w $75E2,x
	LDA.w #$FF80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_0FE04E:
	TXY
	JSR.w CODE_0FDE65
	JSR.w CODE_0FDD69
CODE_0FE055:
	RTS

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%DATATABLE_YI_LevelDataPtrsAndEntranceData($0FE446)
	%InsertGarbageData($0FED56, incbin, DATA_0FED56_YI_U2.bin)
else
	%FREE_BYTES($0FE056, 6058, $FF)
endif

DATA_0FF800:								; Note: Title screen tilemap
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$1284,$1286,$1288,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$1284,$1286,$1288,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$128C,$128E,$12E8
	dw $12E8,$1284,$1286,$1288,$12E8,$12E8,$12E8,$1284
	dw $1286,$1288,$128C,$128E,$12E8,$12E8,$12E8,$12E8
	dw $1280,$1282,$1284,$1286,$1288,$12E8,$12E8,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12AA,$12AC,$12AE,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$1280,$1282,$12E8
	dw $12E8,$12AA,$12AC,$12AE,$12E8,$12E8,$12E8,$12E8
	dw $12A0,$12A2,$12A4,$12A6,$12A8,$12E8,$12E8,$128C
	dw $128E,$12E8,$12E8,$12E8,$12CA,$12CC,$12CE,$12E8
	dw $12E8,$12E8,$12E8,$12E8,$12E8,$12C0,$12C2,$128C
	dw $128E,$12CA,$12CC,$12CE,$128C,$128E,$12E8,$12E8
	dw $12C0,$12C2,$12C4,$12C6,$12C8,$12E8,$12AA,$12AC
	dw $12AE,$12E8,$12E8,$12E8,$12EA,$12EC,$12EE,$12E8
	dw $1280,$1282,$12A4,$12A6,$12A8,$12C0,$12C2,$12AC
	dw $12AE,$12EA,$12EC,$12C6,$12C6,$12AE,$12E8,$12E8
	dw $16E0,$16E0,$16E0,$16E0,$16E0,$16E2,$16E2,$16E0
	dw $16E0,$16E2,$16E2,$16E2,$16E0,$16E0,$16E0,$16E2
	dw $16E0,$16E0,$16E0,$16E0,$16E2,$16E0,$16E0,$16E0
	dw $16E0,$16E0,$16E0,$16E0,$16E0,$16E0,$16E2,$16E2
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$12E4,$128A,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$12E4,$128A,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $12E4,$128A,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$12E4,$128A
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$12E4,$128A,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$12E4,$128A,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$12E4,$128A,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6,$16E6
	dw $16E6,$16E6,$16E6,$16E6,$12E4,$128A,$16E6,$16E6

DATA_0FFC80:
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2B00,$2F01,$2302,$2303
	dw $2304,$2B05,$2F06,$2F07,$2308,$2B09,$2F0A,$2722
	dw $2F0B,$2F0C,$2F0B,$2F0C,$2F0B,$2F0C,$2F0B,$2F0C
	dw $2F0B,$2F0C,$2F0B,$2F0C,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2B10,$2F11,$2312,$2313
	dw $2314,$2B15,$2F16,$2F17,$2318,$2B19,$2F1A,$2778
	dw $2F1B,$2F1C,$2F1B,$2F1C,$2F1B,$2F1C,$2F1B,$2F1C
	dw $2F1B,$2F1C,$2F1B,$2F1C,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2720,$2721,$277F,$A76A
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2723
	dw $2724,$2722,$2722,$2722,$2722,$2722,$A777,$277F
	dw $2725,$2726,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2727,$2728,$2729,$272A
	dw $272B,$272C,$E76A,$272D,$272E,$272F,$2722,$2730
	dw $2731,$2732,$2733,$2734,$2735,$2736,$2737,$2738
	dw $2739,$273A,$273B,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$273C,$273D,$273E
	dw $273F,$2740,$2741,$2742,$2743,$2744,$A76A,$2730
	dw $2745,$2746,$2747,$2748,$2749,$274A,$274B,$274C
	dw $274D,$274E,$274F,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2750,$2751
	dw $2752,$2753,$2754,$2755,$2756,$2757,$2740,$2730
	dw $2757,$2758,$2759,$275A,$275B,$275C,$2739,$275D
	dw $275E,$275F,$A73B,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2760,$2761
	dw $2762,$2763,$2764,$2765,$2766,$2767,$2768,$2730
	dw $2767,$2768,$2769,$276A,$276B,$276C,$276D,$276E
	dw $276F,$2770,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2771,$6772
	dw $2772,$2773,$2722,$2722,$2774,$2776,$A726,$2775
	dw $2776,$A726,$2722,$2722,$2722,$2722,$2777,$2775
	dw $2779,$277A,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $277B,$277C,$270D,$270E,$270F,$277D,$277E,$271D
	dw $271E,$271F,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722
	dw $2722,$2722,$2722,$2722,$2722,$2722,$2722,$2722

%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank10Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_108000:
	PHB
	PHK
	PLB
	REP.b #$20
	LDX.b #$04
CODE_108007:
	JSR.w CODE_108018
	DEX
	DEX
	BPL.b CODE_108007
	SEP.b #$20
	PLB
	RTL

DATA_108012:
	dw !EXRAM_YI_Global_SaveFile1,$707C68,$707CD0

CODE_108018:
	STX.b $0E
	LDA.w DATA_108012,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE83>>16
	LDA.w #FXCODE_08DE83
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $0E
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.l $707E70,x
	BEQ.b CODE_108039
	JSR.w CODE_1080A8
	BRA.b CODE_108018

CODE_108039:
	RTS

DATA_10803A:
	dw $7D38,$7DA0,$7E08

DATA_108040:
	dw $0003,$0080,$0000,$0000,$0000,$0000,$8000,$0080
	dw $0000,$0000,$0000,$0000,$8000,$0080,$0000,$0000
	dw $0000,$0000,$8000,$0080,$0000,$0000,$0000,$0000
	dw $8000,$0080,$0000,$0000,$0000,$0000,$8000,$0080
	dw $0000,$0000,$0000,$0000,$8000,$0080,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000

CODE_1080A8:
	LDA.w DATA_10803A,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE83>>16
	LDA.w #FXCODE_08DE83
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $0E
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	CMP.l $707E76,x
	BEQ.b CODE_1080EB
	LDA.w #DATA_108040
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #DATA_108040>>16
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w DATA_10803A,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE59>>16
	LDA.w #FXCODE_08DE59
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $0E
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.l $707E76,x
	BRA.b CODE_1080A8

CODE_1080EB:
	LDA.w DATA_10803A,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_108012,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE73>>16
	LDA.w #FXCODE_08DE73
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $0E
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.l $707E70,x
	RTS

CODE_10810A:
	PHB
	PHK
	PLB
	LDA.b #!EXRAM_YI_Global_SaveFile1>>16
	STA.b $02
	STA.b $05
	LDX.w !RAM_YI_Global_CurrentSaveFile
	REP.b #$20
	PHX
	JSR.w CODE_108018
	PLX
	LDA.w DATA_108012,x
	STA.b $00
	SEP.b #$20
	LDA.b [$00]
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	REP.b #$20
	INC.b $00
	INC.b $00
	SEP.b #$20
	LDY.b #$00
	LDA.b [$00]
	STA.w !RAM_YI_Level_CurrentLevelFromMapLo
	AND.b #$7F
CODE_10813A:
	CMP.b #!Define_YI_Map_LevelsPerWorld
	BCC.b CODE_108144
	SBC.b #!Define_YI_Map_LevelsPerWorld
	INY
	INY
	BRA.b CODE_10813A

CODE_108144:
	STA.w $1112
	STY.w !RAM_YI_Level_CurrentWorldLo
	REP.b #$20
	INC.b $00
	SEP.b #$20
	LDY.b #$00
CODE_108152:
	LDA.b [$00]
	PHA
	AND.b #$7F
	STA.w !RAM_YI_Map_LevelHighScores,y
	LDA.b #$00
	STA.w !RAM_YI_Map_LevelClearFlags,y
	PLA
	AND.b #$80
	BEQ.b CODE_108169
	LDA.b #$01
	STA.w !RAM_YI_Map_LevelClearFlags,y
CODE_108169:
	REP.b #$20
	INC.b $00
	SEP.b #$20
	INY
	CPY.b #$48
	BCC.b CODE_108152
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	AND.b #$7F
	TAY
	CPY.b #$35
	BCC.b CODE_108183
	LDA.w !RAM_YI_Map_LevelHighScores,y
	BNE.b CODE_108188
CODE_108183:
	LDA.b #$80
	STA.w !RAM_YI_Map_LevelClearFlags,y
CODE_108188:
	LDY.b #$00
	STZ.b $04
	INC.b $04
CODE_10818E:
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	BEQ.b CODE_1081A3
	TYA
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_1081E9,x
	STA.b $10
	SEP.b #$20
	LDA.b $04
	STA.b ($10)
CODE_1081A3:
	LDA.b $04
	INC
	CMP.b #$0D
	BCC.b CODE_1081AC
	LDA.b #$01
CODE_1081AC:
	STA.b $04
	INY
	CPY.b #$48
	BCC.b CODE_10818E
	LDY.b #$00
CODE_1081B5:
	LDA.b [$00]
	STA.w !RAM_YI_Level_PauseMenuItemInventory,y
	REP.b #$20
	INC.b $00
	SEP.b #$20
	INY
	CPY.b #$1B
	BCC.b CODE_1081B5
	REP.b #$20
	LDA.b [$00]
	AND.w #$00FF
	STA.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	INC.b $00
	LDA.b [$00]
	AND.w #$00FF
	STA.w !RAM_YI_Level_TutorialMessageFlagsLo
	SEP.b #$20
	PLB
	RTL

DATA_1081DD:
	dw DATA_1081E9,DATA_108201,DATA_108219,DATA_108231,DATA_108249,DATA_108261

DATA_1081E9:
	dw $030F,$0310,$0311,$0312,$0313,$0314,$0315,$0316
	dw $0317,$0318,$0319,$031A

DATA_108201:
	dw $031B,$031C,$031D,$031E,$031F,$0320,$0321,$0322
	dw $0323,$0324,$0325,$0326

DATA_108219:
	dw $0327,$0328,$0329,$032A,$032B,$032C,$032D,$032E
	dw $032F,$0330,$0331,$0332

DATA_108231:
	dw $0333,$0334,$0335,$0336,$0337,$0338,$0339,$033A
	dw $033B,$033C,$033D,$033E

DATA_108249:
	dw $033F,$0340,$0341,$0342,$0343,$0344,$0345,$0346
	dw $0347,$0348,$0349,$034A

DATA_108261:
	dw $034B,$034C,$034D,$034E,$034F,$0350,$0351,$0352
	dw $0353,$0354,$0355,$0356

CODE_108279:
	PHB
	PHK
	PLB
	LDA.b #!EXRAM_YI_Global_SaveFile1>>16
	STA.b $02
	REP.b #$20
	LDA.w !RAM_YI_Global_CurrentSaveFile
	AND.w #$00FF
	TAX
	LDA.w DATA_108012,x
	STA.b $00
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	STA.b [$00]
	INC.w $0000
	INC.w $0000
	LDA.w $1135
	AND.w #$007F
	BNE.b CODE_1082AF
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	AND.w #$000F
	BNE.b CODE_1082AF
	TYA
	STA.b [$00]
CODE_1082AF:
	INC.b $00
	SEP.b #$20
	LDY.b #$00
CODE_1082B5:
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	AND.b #$01
	BEQ.b CODE_1082C3
	LDA.w !RAM_YI_Map_LevelHighScores,y
	ORA.b #$80
	STA.b [$00]
CODE_1082C3:
	REP.b #$20
	INC.b $00
	SEP.b #$20
	INY
	CPY.b #$48
	BCC.b CODE_1082B5
	LDY.b #$00
CODE_1082D0:
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,y
	STA.b [$00]
	REP.b #$20
	INC.b $00
	SEP.b #$20
	INY
	CPY.b #$1B
	BCC.b CODE_1082D0
	REP.b #$20
	LDA.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	STA.b [$00]
	INC.b $00
	LDA.w !RAM_YI_Level_TutorialMessageFlagsLo
	STA.b [$00]
	SEP.b #$20
	REP.b #$20
	PHX
	PHX
	LDA.w DATA_108012,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE83>>16
	LDA.w #FXCODE_08DE83
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.l $707E70,x
	LDA.w DATA_108012,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_10803A,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE73>>16
	LDA.w #FXCODE_08DE73
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.l $707E76,x
	SEP.b #$20
	PLB
	RTL

CODE_10832C:
	PHB
	PHK
	PLB
	REP.b #$20
	LDA.w $111D
	ASL
	TAX
	LDA.w $1134
	ASL
	TAY
	PHX
	PHX
	LDA.w DATA_108012,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_10803A,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE73>>16
	LDA.w #FXCODE_08DE73
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.l $707E76,x
	LDA.w DATA_10803A,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_108012,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DE73>>16
	LDA.w #FXCODE_08DE73
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	LDA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	STA.l $707E70,x
	SEP.b #$20
	PLB
	RTL

DATA_10837B:
	dw $6060,$0000,$6070,$0002,$6080,$0004,$6090,$0006

CODE_10838B:
	JSL.l CODE_0082D0
	JSL.l CODE_008277
	LDX.b #$02
	JSL.l CODE_00BDA2
	LDA.b #$10
	STA.w !REGISTER_MainScreenLayers
	LDA.w !REGISTER_PPUStatusFlag2
	AND.b #$10
	BEQ.b CODE_1083AB
	JSR.w CODE_1086EC
	JMP.w CODE_1083E5

CODE_1083AB:
	REP.b #$10
	LDY.w #$0068
	JSL.l CODE_00B3EE
	REP.b #$30
	LDX.w #$0040
	JSL.l CODE_00BB05
	JSR.w CODE_108A6D
	LDX.b #$0F
CODE_1083C2:
	LDA.w DATA_10837B,x
	STA.l $006A00,x
	DEX
	BPL.b CODE_1083C2
	LDA.b #$AA
	STA.l $006C00
	JSL.l CODE_108000
	STZ.w $0202
	LDA.b #$80
	STA.w $011A
CODE_1083DE:
	JSL.l CODE_008245
CODE_1083E2:
	INC.w !RAM_YI_Global_CurrentGameMode
CODE_1083E5:
	PLB
	RTL

CODE_1083E7:
	DEC.w $011A
	BNE.b CODE_1083E5
	JML.l CODE_1083E2

DATA_1083F0:
	dw $00FE,$00FD,$30FC,$B1BD,$BCB2,$B0D0,$B6AA,$D0AE
	dw $AAB9,$D0B4,$BCB2,$B7D0,$BDB8,$01FE,$08FD,$28FC
	dw $AEAD,$B2BC,$B7B0,$ADAE,$AFD0,$BBB8,$C2D0,$BEB8
	dw $FEBB,$FD02,$FC10,$BC4C,$B9BE,$BBAE,$AFD0,$B6AA
	dw $ACB2,$B6B8,$03FE,$18FD,$74FC,$BBB8,$FEFF,$FD00
	dw $FC00,$BC14,$B9BE,$BBAE,$B7D0,$BCAE,$FEF3,$FD01
	dw $FC08,$B710,$B7B2,$AEBD,$ADB7,$D0B8,$B8AC,$FCF3
	dw $CF64,$FCD0,$B574,$ADBD,$FFF3

DATA_10846A:
	dw $004F,$0000,$0001,$0002,$0003,$0004,$0005,$0006
	dw $0007,$0008,$0009,$000A,$000B,$000C,$000D,$000E
	dw $000F,$0040,$0041,$0042,$0043,$0044,$0045,$0046
	dw $0047,$0048,$0049,$004A,$004B,$004C,$004D

DATA_1084A8:
	dw $0400,$0401,$0402,$0403,$0404,$0405,$0406,$0407
	dw $0408,$0409,$040A,$040B,$040C,$040D,$040E,$040F
	dw $0440,$0441,$0442,$0443,$0444,$0445,$0446,$0447
	dw $0448,$0449,$044A,$044B,$044C,$044D

DATA_1084E4:
	dw $0010,$0011,$0012,$0013,$0014,$0015,$0016,$0017
	dw $0018,$0019,$001A,$001B,$001C,$001D,$001E,$001F
	dw $0050,$0051,$0052,$0053,$0054,$0055,$0056,$0057
	dw $0058,$0059,$005A

DATA_10851A:
	dw $0410,$0411,$0412,$0413,$0414,$0415,$0416,$0417
	dw $0418,$0419,$041A,$041B,$041C,$041D,$041E,$041F
	dw $0450,$0451,$0452,$0453,$0454,$0455,$0456,$0457
	dw $0458,$0459,$045A

DATA_108550:
	dw $0020,$0021,$0022,$0023,$0024,$0025,$0026,$0027
	dw $0028,$0029,$002A,$002B,$002C,$002D,$002E,$002F
	dw $0060,$0061,$0062,$0063,$0064,$0065,$0066,$0067
	dw $0068,$0069,$006A,$006B,$006C,$006D

DATA_10858C:
	dw $0420,$0421,$0422,$0423,$0424,$0425,$0426,$0427
	dw $0428,$0429,$042A,$042B,$042C,$042D,$042E,$042F
	dw $0460,$0461,$0462,$0463,$0464,$0465,$0466,$0467
	dw $0468,$0469,$046A,$046B,$046C,$046D

DATA_1085C8:
	dw $0030,$0031,$0032,$0033,$0034,$0035,$0036,$0037
	dw $0038,$0039,$003A,$003B,$003C,$003D,$003E,$003F
	dw $0070,$0071,$0072,$0073,$0074,$0075,$0076,$0077
	dw $0078,$0079,$007A,$007B,$007C,$007D,$007E

DATA_108606:
	dw $0430,$0431,$0432,$0433,$0434,$0435,$0436,$0437
	dw $0438,$0439,$043A,$043B,$043C,$043D,$043E,$043F
	dw $0470,$0471,$0472,$0473,$0474,$0475,$0476,$0477
	dw $0478,$0479,$047A,$047B,$047C,$047D,$047E

DATA_108644:
	dw $0080,$0081,$0082,$0083,$0084,$0085,$0086,$0087
	dw $0088,$0089,$008A,$008B,$008C,$008D,$008E,$008F
	dw $00C0,$00C1

DATA_108668:
	dw $0480,$0481,$0482,$0483,$0484,$0485,$0486,$0487
	dw $0488,$0489,$048A,$048B,$048C,$048D,$048E,$048F
	dw $04C0,$04C1

DATA_10868C:
	dw $0090,$0091,$0092,$0093,$0094,$0095,$0096,$0097
	dw $0098,$0099,$009A,$009B,$009C,$009D,$009E,$009F
	dw $00D0,$00D1,$00D2,$00D3,$00D4,$00D5,$00D6,$00D7

DATA_1086BC:
	dw $0490,$0491,$0492,$0493,$0494,$0495,$0496,$0497
	dw $0498,$0499,$049A,$049B,$049C,$049D,$049E,$049F
	dw $04D0,$04D1,$04D2,$04D3,$04D4,$04D5,$04D6,$04D7

CODE_1086EC:
	LDA.b #$04
	STA.w !REGISTER_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.w $012E
	AND.b #(!SuperFX_ScreenMode_ColorMode_16Colors^$FF)+$01
	STA.w $012E
	LDA.b #$13
	STA.w $012D
	LDA.b #DATA_1083F0>>16
	STA.w $60AA
	REP.b #$20
	LDA.w #DATA_1083F0
	STA.w $60A8
	LDX.b #FXCODE_09E9AF>>16
	LDA.w #FXCODE_09E9AF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	JSR.w CODE_1087C4
	LDA.b #$10
	STA.w $60AA
	REP.b #$20
	LDA.w #$843D
	STA.w $60A8
	LDX.b #FXCODE_09E9AF>>16
	LDA.w #FXCODE_09E9AF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$6400
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$704C00
	STA.w DMA[$00].SourceLo
	LDX.b #$704C00>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	LDA.w #$7A29
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #DATA_108644
	STA.w DMA[$00].SourceLo
	LDX.b #DATA_108644>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$0024
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$7A49
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_108668
	STA.w DMA[$00].SourceLo
	LDA.w #$0024
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w #$7AC5
else
	LDA.w #$7AC6
endif
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_10868C
	STA.w DMA[$00].SourceLo
	LDA.w #$0030
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w #$7AE5
else
	LDA.w #$7AE6
endif
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_1086BC
	STA.w DMA[$00].SourceLo
	LDA.w #$0030
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	SEP.b #$20
	LDA.b #!Define_YI_GameMode43
	STA.w !RAM_YI_Global_CurrentGameMode
	JSL.l CODE_008245
	RTS

CODE_1087C4:
	REP.b #$20
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$6000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$704C00
	STA.w DMA[$00].SourceLo
	LDX.b #$704C00>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	LDX.b #$00
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$7800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$09
	STA.w DMA[$00].Parameters
	LDA.w #DATA_10846A
	STA.w DMA[$00].SourceLo
	LDX.b #DATA_10846A>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$7800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortHi&$0000FF<<8)+$09
	STA.w DMA[$00].Parameters
	LDA.w #DATA_10846A+$01
	STA.w DMA[$00].SourceLo
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$78A1
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #DATA_10846A+$02
	STA.w DMA[$00].SourceLo
	LDX.b #(DATA_10846A+$02)>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$003C
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$78C1
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_1084A8
	STA.w DMA[$00].SourceLo
	LDA.w #$003C
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$7903
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_1084E4
	STA.w DMA[$00].SourceLo
	LDA.w #$0036
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$7923
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_10851A
	STA.w DMA[$00].SourceLo
	LDA.w #$0036
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$7960
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_108550
	STA.w DMA[$00].SourceLo
	LDA.w #$003C
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$7980
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_10858C
	STA.w DMA[$00].SourceLo
	LDA.w #$003C
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$79C0
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_1085C8
	STA.w DMA[$00].SourceLo
	LDA.w #$003E
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$79E0
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_108606
	STA.w DMA[$00].SourceLo
	LDA.w #$003E
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	LDA.w #$7FFF
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l YI_Global_PaletteMirror[$03].LowByte
	STA.l YI_Global_PaletteMirror[$06].LowByte
	STA.l YI_Global_PaletteMirror[$07].LowByte
	SEP.b #$20
	RTS

CODE_1088FB:
	REP.b #$20
	LDA.l YI_Global_PaletteMirror[$01].LowByte
	INC
	CMP.w #$8000
	BCC.b CODE_10890A
	LDA.w #$0000
CODE_10890A:
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l YI_Global_PaletteMirror[$03].LowByte
	STA.l YI_Global_PaletteMirror[$06].LowByte
	STA.l YI_Global_PaletteMirror[$07].LowByte
	SEP.b #$20
	PLB
	RTL

CODE_10891E:
	JSR.w CODE_108987
	LDA.b $00
	CMP.b #$FF
	BNE.b CODE_10892D
	LDA.b $01
	CMP.b #$FF
	BNE.b CODE_108953
CODE_10892D:
	LDA.b $02
	CMP.b #$FF
	BNE.b CODE_108939
	LDA.b $03
	CMP.b #$FF
	BNE.b CODE_108953
CODE_108939:
	LDA.w !REGISTER_Joypad1Lo
	AND.b #$0F
	CMP.b #$01
	BEQ.b CODE_108953
	CMP.b #$0F
	BEQ.b CODE_108953
	LDA.w !REGISTER_Joypad2Lo
	AND.b #$0F
	CMP.b #$01
	BEQ.b CODE_108953
	CMP.b #$0F
	BNE.b CODE_10897E
CODE_108953:
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	REP.b #$20
	PHB
	LDX.b #$702000>>16
	PHX
	PLB
	LDX.b #$7E
CODE_108964:
	STZ.w $702000,x
	STZ.w $702080,x
	STZ.w $702100,x
	STZ.w $702180,x
	DEX
	DEX
	BPL.b CODE_108964
	PLB
	SEP.b #$20
	LDA.b #!Define_YI_GameMode41
	STA.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_108985

CODE_10897E:
	LDA.b #!Define_YI_SoundID09_Coin
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	INC.w !RAM_YI_Global_CurrentGameMode
CODE_108985:
	PLB
	RTL

CODE_108987:
	LDA.w !REGISTER_JoypadSerialPort1
	ORA.b #$01
	STA.w !REGISTER_JoypadSerialPort1
	STZ.b $00
	STZ.b $02
	LDX.b #$07
CODE_108995:
	ASL.b $00
	LDA.w !REGISTER_JoypadSerialPort1
	AND.b #$02
	LSR
	ORA.b $00
	STA.b $00
	ASL.b $02
	LDA.w !REGISTER_JoypadSerialPort2
	AND.b #$02
	LSR
	ORA.b $02
	STA.b $02
	DEX
	BPL.b CODE_108995
	LDA.w !REGISTER_JoypadSerialPort1
	AND.b #$FE
	STA.w !REGISTER_JoypadSerialPort1
	STZ.b $01
	STZ.b $03
	STZ.b $03
	LDX.b #$07
CODE_1089C0:
	ASL.b $01
	LDA.w !REGISTER_JoypadSerialPort1
	AND.b #$02
	LSR
	ORA.b $01
	STA.b $01
	ASL.b $03
	LDA.w !REGISTER_JoypadSerialPort2
	AND.b #$02
	LSR
	ORA.b $03
	STA.b $03
	DEX
	BPL.b CODE_1089C0
	RTS

DATA_1089DC:
	db $FE,$00,$FD,$00,$FC,$00,$BD,$B1,$B2,$BC,$D0,$B0,$AA,$B6,$AE,$D0
	db $B2,$BC,$D0,$AD,$AE,$BC,$B2,$B0,$B7,$AE,$AD,$D0,$B8,$B7,$B5,$C2
	db $D0,$BD,$B8,$D0,$B9,$B5,$AA,$C2,$D0,$FE,$01,$FD,$08,$FC,$06,$C0
	db $B2,$BD,$B1,$D0,$AA,$D0,$B7,$B8,$BB,$B6,$AA,$B5,$D0,$AC,$B8,$B7
	db $BD,$BB,$B8,$B5,$B5,$AE,$BB,$F3,$FE,$02,$FD,$10,$FC,$20,$B9,$B5
	db $AE,$AA,$BC,$AE,$D0,$AD,$B2,$BC,$AC,$B8,$B7,$B7,$AE,$AC,$BD,$D0
	db $B6,$B8,$BE,$BC,$AE,$CF,$D0,$FE,$03,$FD,$18,$FC,$00,$BC,$BE,$B9
	db $AE,$BB,$D0,$BC,$AC,$B8,$B9,$AE,$CF,$D0,$AE,$BD,$AC,$F3,$D0,$BD
	db $B8,$D0,$BC,$BD,$AA,$BB,$BD,$D0,$B9,$B5,$AA,$C2,$B2,$B7,$B0,$F3
	db $FF

CODE_108A6D:
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3XPosHi
	LDA.w $012E
	AND.b #(!SuperFX_ScreenMode_ColorMode_16Colors^$FF)+$01
	STA.w $012E
	LDA.b #$13
	STA.w $012D
	LDA.b #DATA_1089DC>>16
	STA.w $60AA
	REP.b #$20
	LDA.w #DATA_1089DC
	STA.w $60A8
	LDX.b #FXCODE_09E9AF>>16
	LDA.w #FXCODE_09E9AF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	JSR.w CODE_1087C4
	RTS

CODE_108A9A:
	REP.b #$20
	LDA.l YI_Global_PaletteMirror[$01].LowByte
	INC
	CMP.w #$8000
	BCC.b CODE_108AA9
	LDA.w #$0000
CODE_108AA9:
	STA.l YI_Global_PaletteMirror[$01].LowByte
	STA.l YI_Global_PaletteMirror[$03].LowByte
	STA.l YI_Global_PaletteMirror[$06].LowByte
	STA.l YI_Global_PaletteMirror[$07].LowByte
	SEP.b #$20
	JSR.w CODE_108987
	LDA.b $00
	CMP.b #$FF
	BNE.b CODE_108ACA
	LDA.b $01
	CMP.b #$FF
	BNE.b CODE_108AFB
CODE_108ACA:
	LDA.b $02
	CMP.b #$FF
	BNE.b CODE_108AD6
	LDA.b $03
	CMP.b #$FF
	BNE.b CODE_108AFB
CODE_108AD6:
	LDA.w !REGISTER_Joypad1Lo
	AND.b #$0F
	CMP.b #$01
	BEQ.b CODE_108AFB
	CMP.b #$0F
	BEQ.b CODE_108AFB
	LDA.w !REGISTER_Joypad2Lo
	AND.b #$0F
	CMP.b #$01
	BEQ.b CODE_108AFB
	CMP.b #$0F
	BEQ.b CODE_108AFB
	STZ.w $0201
	STZ.w $0200
	STZ.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_108B03

CODE_108AFB:
	LDA.b #$04
	STA.w !REGISTER_MainScreenLayers
	STA.w !RAM_YI_Global_MainScreenLayers
CODE_108B03:
	PLB
	RTL

DATA_108B05:
	db $05,$04,$05,$05,$06,$06,$06,$07,$04,$05,$06,$05,$05,$04,$02,$00

CODE_108B15:
	PHB
	PHK
	PLB
	REP.b #$10
	LDY.w #$0000
	LDX.w #$0000
	STX.b $99
	STZ.b $02
	LDA.w DATA_108B05,x
CODE_108B27:
	STA.b $04
	LDA.b #$00
CODE_108B2B:
	DEC.b $02
	BPL.b CODE_108B40
	PHA
	LDA.b #$07
	STA.b $02
	PHY
	LDY.b $99
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.b $06
	INY
	STY.b $99
	PLY
	PLA
CODE_108B40:
	ASL.b $06
	ROL
	DEC.w $0004
	BNE.b CODE_108B2B
	STA.w !RAM_YI_Level_LevelHeaderBackgroundColorLo,y
	INY
	INY
	INX
	LDA.w DATA_108B05,x
	BNE.b CODE_108B27
	LDA.w !RAM_YI_Level_LevelHeaderItemMemorySettingLo
	STA.w !RAM_YI_Level_CurrentItemMemoryPageLo
	SEP.b #$10
	PLB
	RTL

CODE_108B5D:
	JSL.l CODE_108B15
CODE_108B61:
	PHB
	PHK
	PLB
	JSL.l CODE_109257
	REP.b #$20
	PHB
	LDX.b #$70449E>>16
	PHX
	PLB
	LDX.b #$00
CODE_108B71:
	STZ.w $70449E,x
	INX
	INX
	CPX.b #$78
	BCC.b CODE_108B71
	LDX.b #$7F7DFE>>16
	PHX
	PLB
	REP.b #$10
	LDX.w #$8200
CODE_108B83:
	STZ.w $7F7DFE,x
	DEX
	DEX
	BNE.b CODE_108B83
	PLB
	LDX.w #$000E
CODE_108B8E:
	STZ.w $0D4E,x
	STZ.w $0D5E,x
	STZ.w $0D6E,x
	STZ.w $0D7E,x
	DEX
	DEX
	BPL.b CODE_108B8E
	SEP.b #$30
	STZ.w $0D4D
	LDA.b #$80
	LDX.b #$7F
CODE_108BA7:
	STA.w $6CAA,x
	DEX
	BPL.b CODE_108BA7
	STZ.b $97
CODE_108BAF:
	REP.b #$30
	LDA.w #$0001
	STA.b $2A
	STA.b $2E
	STZ.b $15
	SEP.b #$20
	LDY.b $99
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.b $15
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.b $1C
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.b $1B
	LDA.b $15
	BEQ.b CODE_108C13
	CMP.b #$FF
	BNE.b CODE_108C33
	LDA.b $1C
	BMI.b CODE_108C04
	REP.b #$20
CODE_108BDA:
	AND.w #$007F
	ASL
	ASL
	TAX
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.l $7F7E00,x
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.l $7F7E01,x
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.l $7F7E02,x
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	INY
	INY
	XBA
	AND.w #$00FF
	CMP.w #$00FF
	BNE.b CODE_108BDA
	SEP.b #$20
CODE_108C04:
	SEP.b #$10
	LDX.b #$7F
CODE_108C08:
	LDA.w $6CAA,x
	STA.w $6D6A,x
	DEX
	BPL.b CODE_108C08
	PLB
	RTL

CODE_108C13:
	PHK
	PEA.w CODE_108BAF-$01
	LDA.b #(CODE_128891-$01)>>16
	PHA
	PHA
	PLB
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.b $15
	INY
	STY.b $99
	REP.b #$20
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_128000,x
	PHA
	SEP.b #$30
	RTL

CODE_108C33:
	PHK
	PEA.w CODE_108BAF-$01
	REP.b #$20
	LDX.b $15
	LDA.l DATA_1284EC,x
	AND.w #$0003
	CMP.w #$0001
	BEQ.b CODE_108C6D
	TAX
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	STA.b $0A
	BIT.w #$0080
	BEQ.b CODE_108C62
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$0002
	BEQ.b CODE_108C62
	LDA.b $0A
	ORA.w #$FF00
	DEC
	BRA.b CODE_108C68

CODE_108C62:
	LDA.b $0A
	AND.w #$00FF
	INC
CODE_108C68:
	STA.b $2A
	TXA
	BEQ.b CODE_108C81
CODE_108C6D:
	INY
	LDA.b [!RAM_YI_Level_LevelDataPtrLo],y
	BIT.w #$0080
	BEQ.b CODE_108C7B
	ORA.w #$FF00
	DEC
	BRA.b CODE_108C7F

CODE_108C7B:
	AND.w #$00FF
	INC
CODE_108C7F:
	STA.b $2E
CODE_108C81:
	INY
	STY.b $99
	LDA.b $15
	ASL
	TAX
	SEP.b #$20
	LDA.b #(CODE_129191-$01)>>16
	PHA
	PHA
	PLB
	LDA.w DATA_1281FE+$01,x
	PHA
	LDA.w DATA_1281FE,x
	PHA
	SEP.b #$10
	RTL

CODE_108C9A:
	LDA.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CMP.b #$0A
	BEQ.b CODE_108CA2
CODE_108CA1:
	RTL

CODE_108CA2:
	LDA.b $77
	ORA.b $79
	BEQ.b CODE_108CA1
	PHB
	PHK
	PLB
	REP.b #$20
	LDA.w #$C07F
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$2100
	STA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	LDA.b $7D
	BIT.w #$0400
	BEQ.b CODE_108CC3
	ORA.w #$0020
CODE_108CC3:
	AND.w #$003E
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDX.b #FXCODE_08BC36>>16
	LDA.w #FXCODE_08BC36
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #$7E4800>>16
	PHX
	PLB
	REP.b #$10
	LDX.w $7E4800
	LDA.b $77
	BEQ.b CODE_108D14
	LDA.b $7B
	AND.w #$07FF
	BIT.w #$0400
	BEQ.b CODE_108CEC
	EOR.w #$0420
CODE_108CEC:
	LSR
	ORA.w #$3400
	STA.w $0000,x
	LDA.w #$0181
	STA.w $0002,x
	LDA.w #$0418
	STA.w $0004,x
	LDA.w #$7026
	STA.w $0006,x
	LDA.w #$0040
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	TAX
CODE_108D14:
	LDA.b $79
	BEQ.b CODE_108D45
	LDA.b $8B
	AND.w #$01F0
	ASL
	ORA.w #$3400
	STA.w $0000,x
	LDA.w #$0180
	STA.w $0002,x
	LDA.w #$4418
	STA.w $0004,x
	LDA.w #$7026
	STA.w $0006,x
	LDA.w #$0040
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	TAX
CODE_108D45:
	STX.w $7E4800
	SEP.b #$30
	PLB
	RTL

CODE_108D4C:
	LDA.b $8D
	BEQ.b CODE_108D75
	REP.b #$30
	JSR.w CODE_108F88
	SEP.b #$30
	JSL.l CODE_00C71E
	DEC.b $8D
	BNE.b CODE_108D73
	JSL.l CODE_03954E
	LDX.b #$5C
CODE_108D65:
	LDA.w $74A2,x
	ORA.b #$80
	STA.w $74A2,x
	DEX
	DEX
	DEX
	DEX
	BNE.b CODE_108D65
CODE_108D73:
	PLB
	RTL

CODE_108D75:
	LDA.w $0B4C
	BEQ.b CODE_108D8A
	REP.b #$20
	LDY.w $0B54
	INY
	BEQ.b CODE_108DBB
	SEP.b #$20
	JSL.l CODE_108E00
	BRA.b CODE_108DE8

CODE_108D8A:
	SEP.b #$20
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.b #!Define_YI_LevelID_HopHopDonutLifts
	BEQ.b CODE_108D9B
	CMP.b #!Define_YI_LevelID_LakitusWall
	BEQ.b CODE_108D9B
	CMP.b #!Define_YI_LevelID_ShiftingPlatformsAhead
	BNE.b CODE_108DA0
CODE_108D9B:
	LDX.b #$02
	STX.w $60C4
CODE_108DA0:
	CMP.b #!Define_YI_LevelID_WelcomeToYoshisIsland
	BNE.b CODE_108DB5
	LDA.b $35
	AND.b #$F0
	ORA.b $36
	BEQ.b CODE_108DE8
	INC.w !RAM_YI_Level_MessageBoxState 
	LDA.b #$25
	STA.l $704070
CODE_108DB5:
	INC.w !RAM_YI_Global_CurrentGameMode
	STZ.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
CODE_108DBB:
	STZ.w $0B4C
	SEP.b #$20
	STZ.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_SubScreenWindowMask
	STZ.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STZ.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STZ.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.b #$20
	TRB.w !RAM_YI_Global_HDMAEnable
	LDX.b #$5C
CODE_108DD6:
	LDA.w $74A2,x
	CMP.b #$FF
	BEQ.b CODE_108DE2
	AND.b #$7F
	STA.w $74A2,x
CODE_108DE2:
	DEX
	DEX
	DEX
	DEX
	BNE.b CODE_108DD6
CODE_108DE8:
	SEP.b #$20
	JSL.l CODE_01C0CE
	PLB
	RTL

DATA_108DF0:
	db $33,$23,$17,$15,$00

DATA_108DF5:
	db $0C,$04,$02,$02,$01

DATA_108DFA:
	db $20,$10,$00

DATA_108DFD:
	db $20,$10,$08

CODE_108E00:
	PHB
	PHK
	PLB
	LDX.w $0B54
	BEQ.b CODE_108E1D
	CPX.b #$FF
	BEQ.b CODE_108E80
	LDA.b #$00
	STA.w $0B54
	LDA.b #$FF
	STA.w $0B50
	LDA.b #$FF
	STA.w $0B51
	BRA.b CODE_108E67

CODE_108E1D:
	LDA.w $0B50
	BEQ.b CODE_108E3E
	LDX.w $0B52
	LDA.w $0B50
	CMP.w DATA_108DF0,x
	BCS.b CODE_108E2E
	INX
CODE_108E2E:
	LDA.w $0B50
	SEC
	SBC.w DATA_108DF5,x
	BCS.b CODE_108E39
	LDA.b #$00
CODE_108E39:
	STA.w $0B50
	BRA.b CODE_108E67

CODE_108E3E:
	LDX.w $0B52
	LDA.w $0B51
	BEQ.b CODE_108E55
	CMP.w DATA_108DFA,x
	BCS.b CODE_108E4C
	INX
CODE_108E4C:
	LDA.w $0B51
	SEC
	SBC.w DATA_108DFD,x
	BCS.b CODE_108E64
CODE_108E55:
	LDX.b #$FF
	STX.w $0B54
	STX.w $0B50
	LDX.b #$00
	STX.w $0B51
	BRA.b CODE_108E67

CODE_108E64:
	STA.w $0B51
CODE_108E67:
	REP.b #$20
	LDY.w $0B50
	TYA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDY.w $0B51
	TYA
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_08967D>>16
	LDA.w #FXCODE_08967D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_108E80:
	REP.b #$20
	JML.l CODE_108F5D

CODE_108E86:
	REP.b #$20
	LDA.w $0B4C
	BNE.b CODE_108EDE
	LDX.b #$5C
CODE_108E8F:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BEQ.b CODE_108EC3
	LDA.w $6FA0,x
	AND.w #$0100
	BEQ.b CODE_108EC3
	STZ.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w #$00FF
	STA.w $74A2,x
	LDY.w !RAM_YI_Level_LevelHeaderBG2TilesetLo
	CPY.b #$16
	BNE.b CODE_108EB2
	LDA.w #$0202
	TRB.w !RAM_YI_Global_MainScreenLayers
CODE_108EB2:
	LDY.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CPY.b #$02
	BEQ.b CODE_108EBD
	CPY.b #$16
	BNE.b CODE_108EC3
CODE_108EBD:
	LDA.w #$0404
	TRB.w !RAM_YI_Global_MainScreenLayers
CODE_108EC3:
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_108E8F
	LDA.l YI_Global_PaletteMirror[$00].LowByte
	BEQ.b CODE_108EDE
	STA.w $0948
	LDA.w #$0000
	STA.l YI_Global_PaletteMirror[$00].LowByte
	LDX.b #$20
	STX.w !RAM_YI_Global_ColorMathSelectAndEnable
CODE_108EDE:
	SEP.b #$20
	JSL.l CODE_01C0CE
	JSL.l CODE_108F49
	LDA.b #$1F
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STA.w !RAM_YI_Global_SubScreenWindowMask
	REP.b #$30
	LDA.w $0B4C
	CLC
	ADC.w #$0006
	STA.w $0B4C
	CMP.w #$0400
	BCC.b CODE_108F45
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	BNE.b CODE_108F0B
	LDY.w #!Define_YI_GameMode3F
	BRA.b CODE_108F16

CODE_108F0B:
	LDY.w #!Define_YI_GameMode3A
	LDA.w !RAM_YI_Level_MiddleRingsTouchedLo
	BEQ.b CODE_108F16
	LDY.w #!Define_YI_GameMode32
CODE_108F16:
	STY.w !RAM_YI_Global_CurrentGameMode
	STZ.w $0B4C
	PHB
	PEA.w $705800>>8
	PLB
	PLB
	LDX.w #$00FE
CODE_108F25:
	STZ.w $705800,x
	STZ.w $705900,x
	STZ.w $705A00,x
	STZ.w $705B00,x
	STZ.w $705C00,x
	STZ.w $705D00,x
	STZ.w $705E00,x
	STZ.w $705F00,x
	DEX
	DEX
	BNE.b CODE_108F25
	PLB
	INC.w $0CF9
CODE_108F45:
	SEP.b #$30
	PLB
	RTL

CODE_108F49:
	PHB
	PHK
	PLB
	REP.b #$20
	LDA.w $0B4C
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_088EF3>>16
	LDA.w #FXCODE_088EF3
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_108F5D:
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	STZ.w !RAM_YI_Global_BGWindowLogicSettings
	SEP.b #$20
	LDA.b #$0F
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STA.w !RAM_YI_Global_SubScreenWindowMask
	LDA.b #$22
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.b #$20
	TSB.w !RAM_YI_Global_HDMAEnable
	PLB
	RTL

CODE_108F88:
	LDA.w $60A4
	JSR.w CODE_109089
	LDA.w $60A4
	CLC
	ADC.w #$0010
	STA.w $60A4
	SEP.b #$30
	JSL.l CODE_108C9A
	REP.b #$30
	RTS

CODE_108FA1:
	PHB
	PHK
	PLB
	STZ.b $77
	STZ.b $79
	STZ.b $73
	REP.b #$30
	LDA.w #$0011
	STA.b $8D
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w $60A6
	LDA.b !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w #$0100
	STA.w $60A4
CODE_108FBF:
	JSR.w CODE_108F88
	SEP.b #$30
	JSL.l CODE_00E3D7
	JSL.l CODE_00DB94
	REP.b #$30
	DEC.b $8D
	BNE.b CODE_108FBF
	SEP.b #$30
	PLB
	RTL

CODE_108FD6:
	PHB
	PHK
	PLB
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$09
	BNE.b CODE_108FE3
	JMP.w CODE_109056

CODE_108FE3:
	STZ.b $77
	STZ.b $79
	STZ.b $73
	REP.b #$30
	LDA.w #$0011
	STA.b $8D
	LDA.w $038C
	BEQ.b CODE_109016
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w $60A6
	LDA.b !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w #$0100
	STA.w $60A4
CODE_109003:
	JSR.w CODE_108F88
	SEP.b #$30
	JSL.l CODE_00E3D7
	JSL.l CODE_00DB94
	REP.b #$30
	DEC.b $8D
	BNE.b CODE_109003
CODE_109016:
	LDA.w !RAM_YI_Level_LevelHeaderBG3TilesetLo
	CMP.w #$000A
	BNE.b CODE_109054
	PHB
	PEA.w $7E4000>>8
	PLB
	PLB
	LDY.w $7E4000
	LDA.w #$2800
	STA.w $7E4002,y
	LDA.w #$27FF
	STA.w $7E4004,y
	LDA.w #$5DA6
	STA.w $7E4006,y
	LDA.w #$007E
	STA.w $7E4008,y
	LDA.w #$FFFF
	STA.w $7E4009,y
	TYA
	CLC
	ADC.w #$0007
	STA.w $7E4000
	PLB
	SEP.b #$30
	JSL.l CODE_00E37B
CODE_109054:
	SEP.b #$30
CODE_109056:
	PLB
	RTL

CODE_109058:
	PHB
	PHK
	PLB
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.b #$09
	BNE.b CODE_109065
	JMP.w CODE_109083

CODE_109065:
	REP.b #$30
	LDA.b !RAM_YI_Global_Layer1XPosLo
	AND.w #$FFF0
	CMP.w $60A4
	BEQ.b CODE_109074
	JSR.w CODE_109089
CODE_109074:
	LDA.b !RAM_YI_Global_Layer1YPosLo
	AND.w #$FFF0
	CMP.w $60A6
	BEQ.b CODE_109081
	JSR.w CODE_109163
CODE_109081:
	SEP.b #$30
CODE_109083:
	PLB
	RTL

DATA_109085:
	dw $0100,$0000

CODE_109089:
	INC.b $77
	STA.w $60A4
	LDY.b $73
	CLC
	ADC.w DATA_109085,y
	TAY
	AND.w #$01F0
	TAX
	LSR
	LSR
	LSR
	STA.b $0A
	TXA
	BIT.w #$0100
	BEQ.b CODE_1090A7
	EOR.w #$2100
CODE_1090A7:
	LSR
	LSR
	LSR
	TAX
	ADC.w #$6800
	STA.b $7B
	INC
	STA.b $7F
	TYA
	AND.w #$0F00
	XBA
	STA.b $00
	TXA
	AND.w #$001E
	STA.b $02
	LDA.b !RAM_YI_Global_Layer1YPosLo
	AND.w #$00F0
	TAY
	ASL
	ASL
	TSB.b $0A
	TYA
	LSR
	LSR
	LSR
	LSR
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	EOR.w #$000F
	INC
	STA.b $06
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	ASL
	STA.b $0E
	LDA.b !RAM_YI_Global_Layer1YPosLo
	LSR
	LSR
	TAY
	LSR
	LSR
	AND.w #$0070
	ORA.b $00
	STA.b $04
	TAX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	ORA.b $0E
	ORA.b $02
	TAX
	TYA
	AND.w #$003C
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDY.b $0A
	STY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHB
	PEA.w $70409E>>8
	PLB
	PLB
	JSR.w CODE_109147
	LDA.l !REGISTER_SuperFX_R3_GeneralPurposeLo
	BEQ.b CODE_109138
	STA.b $06
	TYA
	AND.w #$03FF
	TAY
	STA.l !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $04
	CLC
	ADC.w #$0010
	AND.w #$007F
	TAX
	LDA.l $006CA9,x
	AND.w #$3F00
	ASL
	ORA.b $02
	TAX
	JSR.w CODE_109147
CODE_109138:
	PLB
	SEP.b #$10
	LDX.b #FXCODE_09F9E8>>16
	LDA.w #FXCODE_09F9E8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	RTS

CODE_109147:
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.w $70409E,y
	TYA
	CLC
	ADC.w #$0040
	TAY
	TXA
	CLC
	ADC.w #$0020
	TAX
	DEC.b $06
	BNE.b CODE_109147
	RTS

DATA_10915F:
	dw $00E0,$0000

CODE_109163:
	INC.b $79
	STA.w $60A6
	LDY.b $75
	CLC
	ADC.w DATA_10915F,y
	STA.b $8B
	TAY
	ASL
	AND.w #$01E0
	STA.b $02
	ASL
	STA.b $0A
	STA.b $00
	TYA
	LSR
	LSR
	LSR
	LSR
	AND.w #$0070
	STA.b $04
	LDA.b !RAM_YI_Global_Layer1XPosLo
	LSR
	LSR
	TAX
	AND.w #$003C
	TAY
	LSR
	LSR
	STA.b $08
	EOR.w #$000F
	INC
	STA.b $06
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	CLC
	ADC.w #$0004
	STA.b $87
	TYA
	LSR
	STA.b $0E
	TXA
	LSR
	AND.w #$003E
	TAY
	TSB.b $0A
	TYA
	BIT.w #$0020
	BEQ.b CODE_1091B8
	EOR.w #$0420
CODE_1091B8:
	ORA.b $00
	TAX
	CLC
	ADC.w #$6800
	STA.b $7D
	CLC
	ADC.w #$0020
	STA.b $85
	TXA
	EOR.w #$0400
	AND.w #$FFE0
	CLC
	ADC.w #$6800
	STA.b $81
	CLC
	ADC.w #$0020
	STA.b $89
	LDA.w #$0044
	SEC
	SBC.b $87
	STA.b $83
	LDY.b #$2A
	ROR.w $3AA5
	AND.w #$000F
	STA.b $0C
	ORA.b $04
	TAX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	ORA.b $0E
	ORA.b $02
	TAX
	LDY.b $0A
	STY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	PHB
	PEA.w $70409E>>8
	PLB
	PLB
	JSR.w CODE_109247
	LDA.b $08
	INC
	STA.b $06
	STA.l !REGISTER_SuperFX_R3_GeneralPurposeLo
	TYA
	BIT.w #$003E
	BNE.b CODE_10921D
	SEC
	SBC.w #$0040
	TAY
CODE_10921D:
	STA.l !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $0C
	INC
	AND.w #$000F
	ORA.b $04
	TAX
	LDA.l $006CA9,x
	AND.w #$3F00
	ASL
	ORA.b $02
	TAX
	JSR.w CODE_109247
	PLB
	SEP.b #$10
	LDX.b #FXCODE_09FA68>>16
	LDA.w #FXCODE_09FA68
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	RTS

CODE_109247:
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.w $70409E,y
	INY
	INY
	INX
	INX
	DEC.b $06
	BNE.b CODE_109247
	RTS

CODE_109257:
	LDA.b #$0019DA>>16
	STA.b $02
	REP.b #$30
	LDX.w #$0000
CODE_109260:
	STX.b $03
	LDA.l DATA_4CD61A,x
	AND.w #$00FF
	BEQ.b CODE_109292
	TAY
	LDA.l DATA_4CD61A+$01,x
	STA.b $00
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	ASL
	ADC.b $03
	TAX
	LDA.l DATA_4CD61A+$03,x
	TYX
	LDY.w #$0000
CODE_109281:
	STA.b [$00],y
	INC
	INY
	INY
	DEX
	BNE.b CODE_109281
	LDA.b $03
	CLC
	ADC.w #$0023
	TAX
	BRA.b CODE_109260

CODE_109292:
	SEP.b #$30
	RTL

CODE_109295:
	PHP
	PHB
	PHK
	PLB
	PHD
	LDA.w #$0000
	TCD
	REP.b #$30
	LDA.b $91
	AND.w #$FFF0
	SEC
	SBC.w $60A4
	CLC
	ADC.w #$0010
	STA.b $12
	LDA.b $93
	AND.w #$FFF0
	SEC
	SBC.w $60A6
	CLC
	ADC.w #$0010
	STA.b $14
	LDA.b $93
	TAY
	AND.w #$0700
	LSR
	LSR
	LSR
	LSR
	STA.b $00
	TYA
	AND.w #$00F0
	ASL
	STA.b $02
	ASL
	STA.b $07
	LDA.b $91
	TAY
	AND.w #$00F0
	LSR
	LSR
	LSR
	TSB.b $02
	TYA
	AND.w #$01F0
	LSR
	LSR
	LSR
	BIT.w #$0020
	BEQ.b CODE_1092EE
	EOR.w #$0420
CODE_1092EE:
	TSB.b $07
	TYA
	AND.w #$0F00
	XBA
	ORA.b $00
	STA.b $10
	TAX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	TSB.b $02
	LDA.b $8F
	ASL
	TAX
	JSR.w (DATA_10930E,x)
	PLD
	PLB
	PLP
	RTL

DATA_10930E:
	dw CODE_10931E
	dw CODE_1098D0
	dw CODE_10955B
	dw CODE_10962C
	dw CODE_1096DF
	dw CODE_1098E9
	dw CODE_10990B
	dw CODE_1098CD

CODE_10931E:
	LDA.b $07
	STA.b $04
	LDA.b $12
	STA.b $16
	LDA.b $14
	STA.b $18
	LDX.b $02
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	XBA
	SEC
	SBC.w #$001A
	CMP.w #$0003
	BCC.b CODE_10933F
	RTS

CODE_10933F:
	PHB
	SEP.b #$20
	LDA.b #DATA_13B7A8>>16
	PHA
	PLB
	REP.b #$20
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13B7A8,y
	BEQ.b CODE_109357
	TAY
	LDA.w $0000,y
CODE_109357:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
	JSR.w CODE_109438
	LDA.b $00
	BNE.b CODE_109391
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	XBA
	SEC
	SBC.w #$001A
	CMP.w #$0003
	BCS.b CODE_109391
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13B1B0,y
	TAY
	LDA.w $0000,y
	CMP.l !RAM_YI_Level_LevelDataBuffer,x
	BEQ.b CODE_109391
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_109391:
	JSR.w CODE_109481
	LDA.b $00
	BNE.b CODE_1093C4
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	XBA
	SEC
	SBC.w #$001A
	CMP.w #$0003
	BCS.b CODE_1093C4
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13B62A,y
	TAY
	LDA.w $0000,y
	CMP.l !RAM_YI_Level_LevelDataBuffer,x
	BEQ.b CODE_1093C4
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_1093C4:
	JSR.w CODE_1094CC
	LDA.b $00
	BNE.b CODE_1093F7
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	XBA
	SEC
	SBC.w #$001A
	CMP.w #$0003
	BCS.b CODE_1093F7
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13B4AC,y
	TAY
	LDA.w $0000,y
	CMP.l !RAM_YI_Level_LevelDataBuffer,x
	BEQ.b CODE_1093F7
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_1093F7:
	JSR.w CODE_109512
	LDA.b $00
	BNE.b CODE_10942A
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	XBA
	SEC
	SBC.w #$001A
	CMP.w #$0003
	BCS.b CODE_10942A
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13B32E,y
	TAY
	LDA.w $0000,y
	CMP.l !RAM_YI_Level_LevelDataBuffer,x
	BEQ.b CODE_10942A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_10942A:
	LDA.l $0009ED
	TAX
	LDA.w #$FFFF
	STA.l $0009EF,x
	PLB
	RTS

CODE_109438:
	LDA.b $18
	SEC
	SBC.w #$0010
	STA.b $14
	STZ.b $00
	LDA.b $04
	SEC
	SBC.w #$0040
	STA.b $07
	LDA.b $02
	SEC
	SBC.w #$0020
	TAX
	AND.w #$01E0
	CMP.w #$01E0
	BNE.b CODE_109480
	LDA.b $10
	SEC
	SBC.w #$0010
	BPL.b CODE_109463
	INC.b $00
CODE_109463:
	TXY
	TAX
	LDA.b $07
	CLC
	ADC.w #$0400
	AND.w #$07FF
	STA.b $07
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	STA.b $09
	TYA
	AND.w #$01FF
	ORA.b $09
	TAX
CODE_109480:
	RTS

CODE_109481:
	LDA.b $16
	SEC
	SBC.w #$0010
	STA.b $12
	STZ.b $00
	LDA.b $04
	DEC
	DEC
	STA.b $07
	LDA.b $02
	DEC
	DEC
	TAX
	AND.w #$001E
	CMP.w #$001E
	BNE.b CODE_1094CB
	LDA.b $10
	BIT.w #$000F
	BNE.b CODE_1094A7
	INC.b $00
CODE_1094A7:
	LDA.b $10
	DEC
	TXY
	TAX
	LDA.b $07
	CLC
	ADC.w #$0420
	AND.w #$07FF
	STA.b $07
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	STA.b $09
	TYA
	CLC
	ADC.w #$0020
	AND.w #$01FF
	ORA.b $09
	TAX
CODE_1094CB:
	RTS

CODE_1094CC:
	LDA.b $16
	CLC
	ADC.w #$0010
	STA.b $12
	STZ.b $00
	LDA.b $04
	INC
	INC
	STA.b $07
	LDA.b $02
	INC
	INC
	TAX
	AND.w #$001E
	BNE.b CODE_109511
	LDA.b $10
	INC
	BIT.w #$000F
	BNE.b CODE_1094F0
	INC.b $00
CODE_1094F0:
	TXY
	TAX
	LDA.b $07
	SEC
	SBC.w #$0420
	AND.w #$07FF
	STA.b $07
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	STA.b $09
	TYA
	SEC
	SBC.w #$0020
	AND.w #$01FF
	ORA.b $09
	TAX
CODE_109511:
	RTS

CODE_109512:
	LDA.b $18
	CLC
	ADC.w #$0010
	STA.b $14
	STZ.b $00
	LDA.b $04
	CLC
	ADC.w #$0040
	STA.b $07
	LDA.b $02
	CLC
	ADC.w #$0020
	TAX
	AND.w #$01E0
	BNE.b CODE_10955A
	LDA.b $10
	CLC
	ADC.w #$0010
	BIT.w #$0070
	BNE.b CODE_10953D
	INC.b $00
CODE_10953D:
	TXY
	TAX
	LDA.b $07
	SEC
	SBC.w #$0400
	AND.w #$07FF
	STA.b $07
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	STA.b $09
	TYA
	AND.w #$01FF
	ORA.b $09
	TAX
CODE_10955A:
	RTS

CODE_10955B:
	LDY.w #$0000
CODE_10955E:
	LDX.b $02
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.w $0020,y
	AND.w #$FF00
	CMP.w #$6100
	BEQ.b CODE_10957C
	CMP.w #$6200
	BEQ.b CODE_10957C
	LDA.w #$6106
	STA.w $0020,y
	BRA.b CODE_109588

CODE_10957C:
	LDA.w $0095
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	PHY
	JSR.w CODE_109A2A
	PLY
CODE_109588:
	INC.w $0095
	LDA.b $12
	CLC
	ADC.w #$0010
	STA.b $12
	LDA.b $07
	INC
	INC
	STA.b $07
	LDA.b $02
	INC
	INC
	STA.b $02
	BIT.w #$001E
	BNE.b CODE_1095C4
	SEC
	SBC.w #$0020
	AND.w #$01FF
	STA.b $02
	LDA.b $07
	SEC
	SBC.w #$0420
	AND.w #$07FF
	STA.b $07
	LDX.b $10
	INX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	TSB.b $02
CODE_1095C4:
	INY
	INY
	CPY.w #$0006
	BCC.b CODE_10955E
	LDA.l $0009ED
	TAX
	LDA.w #$FFFF
	STA.l $0009EF,x
	RTS

DATA_1095D8:
	dw $0000,$A55C,$0000,$0000,$0000,$A55D,$0000,$A55C
	dw $0000,$A55D,$A55B,$0000,$A55A,$A55C,$A55B,$0000
	dw $0000,$0000,$A55A,$0000,$0000,$0000,$A55B,$0000
	dw $A55A,$0000,$0000,$0000,$A55B,$0000,$0000,$A55C
	dw $0000,$0000,$A55B,$A55D,$0000,$A55C,$0000,$0000
	dw $0000,$A55D

CODE_10962C:
	LDY.w $0095
CODE_10962F:
	PHY
	LDX.b $02
	TYA
	BEQ.b CODE_10963D
	CPY.w $0095
	BNE.b CODE_10966C
	LDA.w #$0002
CODE_10963D:
	STA.b $00
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	BEQ.b CODE_109676
	PHX
	SEP.b #$10
	JSL.l CODE_0DA485
	REP.b #$10
	PLX
	LDA.b $93
	SEC
	SBC.w #$07C0
	AND.w #$FFF0
	LSR
	LSR
	TSB.b $00
	LDA.w $1070
	ASL
	ADC.w $1070
	ASL
	ADC.b $00
	TAY
	LDA.w DATA_1095D8-$0C,y
	BRA.b CODE_10966F

CODE_10966C:
	LDA.w #$0000
CODE_10966F:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_109676:
	LDA.b $12
	CLC
	ADC.w #$0010
	STA.b $12
	LDA.b $91
	CLC
	ADC.w #$0010
	STA.b $91
	LDA.b $07
	INC
	INC
	STA.b $07
	LDA.b $02
	INC
	INC
	STA.b $02
	BIT.w #$001E
	BNE.b CODE_1096B7
	SEC
	SBC.w #$0020
	AND.w #$01FF
	STA.b $02
	LDA.b $07
	SEC
	SBC.w #$0420
	AND.w #$07FF
	STA.b $07
	LDX.b $10
	INX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	TSB.b $02
CODE_1096B7:
	PLY
	DEY
	BMI.b CODE_1096BE
	JMP.w CODE_10962F

CODE_1096BE:
	LDA.l $0009ED
	TAX
	LDA.w #$FFFF
	STA.l $0009EF,x
	RTS

DATA_1096CB:
	db $00,$00,$03,$03,$04,$04,$07,$07,$08,$08,$0B,$0B,$0C,$0C,$0F,$0F
	db $10,$10,$13,$13

CODE_1096DF:
	LDA.w !RAM_YI_Level_LevelHeaderLevelModeLo
	CMP.w #$0009
	BNE.b CODE_1096EA
	JMP.w CODE_1097D9

CODE_1096EA:
	LDX.b $02
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$A300
	BNE.b CODE_109711
	LDA.b $00
	PHA
	LDA.b $02
	PHA
	LDA.b $07
	PHA
	JSR.w CODE_1098A2
	JSL.l CODE_00E013
	PLA
	STA.b $07
	PLA
	STA.b $02
	PLA
	STA.b $00
CODE_109711:
	LDX.b $02
	LDA.b $95
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
	LDA.b $07
	STA.b $04
	LDA.b $14
	STA.b $18
	JSR.w CODE_109512
	LDA.b $00
	BNE.b CODE_10975C
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	TAY
	LDA.w DATA_1096CB,y
	AND.w #$00FF
	TAY
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$6B00
	BEQ.b CODE_109751
	CMP.w #$A300
	BNE.b CODE_10975C
	TYA
	ORA.w #$A300
	BRA.b CODE_109755

CODE_109751:
	TYA
	ORA.w #$6B00
CODE_109755:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_10975C:
	LDA.l $0009ED
	TAX
	LDA.w #$FFFF
	STA.l $0009EF,x
	RTS

DATA_109769:
	dw $05C8,$05DC,$05D2,$07C6

DATA_109771:
	db $86,$86,$B0

DATA_109774:
	db $86,$86,$B1

DATA_109777:
	db $B6,$C6,$C6

DATA_10977A:
	db $B7,$C6,$C6

DATA_10977D:
	db $C2,$8A,$8A

DATA_109780:
	db $C3,$8B,$8B

DATA_109783:
	db $8A,$8A,$BC

DATA_109786:
	db $8B,$8B,$BD

DATA_109789:
	db $AC,$AE,$03

DATA_10978C:
	db $AD,$AF,$04

DATA_10978F:
	db $43,$B2,$B4

DATA_109792:
	db $44,$B3,$B5

DATA_109795:
	db $23,$BE,$BF

DATA_109798:
	db $2C,$C0,$C1

DATA_10979B:
	db $B8,$B9,$1F

DATA_10979E:
	db $BA,$BB,$24

DATA_1097A1:
	dw $0B9F,$121F,$0F25,$0F18

DATA_1097A9:
	dw $0BA0,$1220,$0FA5,$0F98

DATA_1097B1:
	dw $0003,$0003,$0000,$0000

DATA_1097B9:
	dw DATA_109771,DATA_109777,DATA_10977D,DATA_109783

DATA_1097C1:
	dw DATA_109774,DATA_10977A,DATA_109780,DATA_109786

DATA_1097C9:
	dw DATA_109789,DATA_10978F,DATA_109795,DATA_10979B

DATA_1097D1:
	dw DATA_10978C,DATA_109792,DATA_109798,DATA_10979E

CODE_1097D9:
	LDX.b $02
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	BNE.b CODE_1097E4
	JMP.w CODE_10986A

CODE_1097E4:
	STA.b $00
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$0002
	STA.w $0D07
	TXA
	LDX.w #$0000
CODE_1097F7:
	CMP.w DATA_109769,x
	BEQ.b CODE_109803
	INX
	INX
	CPX.w #$FFF8
	BCC.b CODE_1097F7
CODE_109803:
	STX.b $08
	TXA
	EOR.w #$0002
	TAX
	LDA.w DATA_109769,x
	TAX
	LDA.b $00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDY.b $08
	LDA.w DATA_1097A1,y
	STA.b $00
	LDA.w DATA_1097B1,y
	STA.b $02
	LDA.w DATA_1097B9,y
	STA.b $04
	JSR.w CODE_10986B
	LDY.b $08
	LDA.w DATA_1097A9,y
	STA.b $00
	LDA.w DATA_1097B1,y
	STA.b $02
	LDA.w DATA_1097C1,y
	STA.b $04
	JSR.w CODE_10986B
	LDA.b $08
	EOR.w #$0002
	TAY
	STA.b $08
	LDA.w DATA_1097A1,y
	STA.b $00
	LDA.w DATA_1097B1,y
	STA.b $02
	LDA.w DATA_1097C9,y
	STA.b $04
	JSR.w CODE_10986B
	LDY.b $08
	LDA.w DATA_1097A9,y
	STA.b $00
	LDA.w DATA_1097B1,y
	STA.b $02
	LDA.w DATA_1097D1,y
	STA.b $04
	JSR.w CODE_10986B
CODE_10986A:
	RTS

CODE_10986B:
	PHB
	PEA.w $7E4800>>8
	PLB
	PLB
	LDX.w $7E4800
	LDA.b $00
	STA.w $0000,x
	LDA.b $02
	STA.w $0002,x
	LDA.w #$0018
	STA.w $0004,x
	LDA.w #DATA_109789>>16
	STA.w $0007,x
	LDA.w #$0003
	STA.w $0008,x
	LDA.b $04
	STA.w $0005,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	PLB
	RTS

CODE_1098A2:
	LDA.w !RAM_YI_Level_LevelHeaderItemMemorySettingLo
	ASL
	TAX
	LDA.l DATA_01E4D9,x
	STA.b $00
	LDX.b $10
	LDA.w $6CAA,x
	AND.w #$003F
	ASL
	ADC.b $00
	STA.b $00
	LDA.b $02
	AND.w #$001E
	TAX
	LDA.l DATA_01E4E1,x
	STA.b $04
	LDA.b ($00)
	ORA.b $04
	STA.b ($00)
	RTS

CODE_1098CD:
	JSR.w CODE_1098A2
CODE_1098D0:
	LDX.b $02
	LDA.w $0095
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
	LDA.l $0009ED
	TAX
	LDA.w #$FFFF
	STA.l $0009EF,x
	RTS

CODE_1098E9:
	LDX.b $02
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$0000
	BNE.b CODE_10990A
	LDA.w $0095
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
	LDA.l $0009ED
	TAX
	LDA.w #$FFFF
	STA.l $0009EF,x
CODE_10990A:
	RTS

CODE_10990B:
	LDX.b $02
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7C00
	BEQ.b CODE_109919
	JMP.w CODE_109A1D

CODE_109919:
	STZ.b $0E
	LDA.b $07
	STA.b $04
	LDA.b $12
	STA.b $16
	LDA.b $14
	STA.b $18
	JSR.w CODE_109438
	LDA.b $00
	BNE.b CODE_10995F
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	TAY
	CMP.w #$7C00
	BNE.b CODE_109942
	LDA.w #$0008
	STA.b $0E
	BRA.b CODE_10995F

CODE_109942:
	TYA
	CMP.w #$7700
	BNE.b CODE_10995F
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	DEC
	DEC
	DEC
	DEC
	CMP.w #$777D
	BCS.b CODE_109958
	LDA.w #$0000
CODE_109958:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_10995F:
	JSR.w CODE_109481
	LDA.b $00
	BNE.b CODE_109997
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	TAY
	CMP.w #$7C00
	BNE.b CODE_10997C
	LDA.b $0E
	ORA.w #$0001
	STA.b $0E
	BRA.b CODE_109997

CODE_10997C:
	TYA
	CMP.w #$7700
	BNE.b CODE_109997
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	DEC
	DEC
	CMP.w #$777D
	BCS.b CODE_109990
	LDA.w #$0000
CODE_109990:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_109997:
	JSR.w CODE_1094CC
	LDA.b $00
	BNE.b CODE_1099CE
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	TAY
	CMP.w #$7C00
	BNE.b CODE_1099B4
	LDA.b $0E
	ORA.w #$0002
	STA.b $0E
	BRA.b CODE_1099CE

CODE_1099B4:
	TYA
	CMP.w #$7700
	BNE.b CODE_1099CE
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	DEC
	CMP.w #$777D
	BCS.b CODE_1099C7
	LDA.w #$0000
CODE_1099C7:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_1099CE:
	JSR.w CODE_109512
	LDA.b $00
	BNE.b CODE_109A08
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	TAY
	CMP.w #$7C00
	BNE.b CODE_1099EB
	LDA.b $0E
	ORA.w #$0004
	STA.b $0E
	BRA.b CODE_109A08

CODE_1099EB:
	TYA
	CMP.w #$7700
	BNE.b CODE_109A08
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	SEC
	SBC.w #$0008
	CMP.w #$777D
	BCS.b CODE_109A01
	LDA.w #$0000
CODE_109A01:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_109A08:
	LDX.b $02
	LDA.b $04
	STA.b $07
	LDA.b $0E
	BEQ.b CODE_109A16
	CLC
	ADC.w #$777C
CODE_109A16:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_109A2A
CODE_109A1D:
	LDA.l $0009ED
	TAX
	LDA.w #$FFFF
	STA.l $0009EF,x
	RTS

CODE_109A2A:
	TAY
	LDA.b $12
	CMP.w #$0130
	BCS.b CODE_109A84
	LDA.b $14
	CMP.w #$0100
	BCS.b CODE_109A84
	PHB
	PEA.w $0009
	PLB
	PLB
	LDA.b $07
	BIT.w #$0400
	BEQ.b CODE_109A49
	EOR.w #$0420
CODE_109A49:
	TAX
	TYA
	STA.l $70409E,x
	TYA
	AND.w #$FF00
	XBA
	ASL
	TAX
	LDA.l FXDATA_4C32A4,x
	STA.b $00
	TYA
	AND.w #$00FF
	ASL
	ASL
	ASL
	ADC.b $00
	CLC
	ADC.w #FXDATA_4C33F2
	STA.b $00
	LDY.w $09ED
	LDA.b $07
	ORA.w #$6800
	STA.w $09EF,y
	LDA.b $00
	STA.w $09F1,y
	TYA
	CLC
	ADC.w #$0004
	STA.w $09ED
	PLB
CODE_109A84:
	RTS

CODE_109A85:						;\ Note: Infinite loop?
	BRA CODE_109A85					;/

CODE_109A87:
	RTL

DATA_109A88:
	dw $401C,$410C,$41FC,$4274,$4184,$4094

DATA_109A94:
	dw $4076,$4166,$4256,$42CE,$41DE,$40EE

DATA_109AA0:
	dw $2860,$2860,$2860,$2860,$2860,$2860

DATA_109AAC:
	dw $2860,$2860,$2860,$2860,$2860,$2860

DATA_109AB8:
	dw $0089,$008D,$0091,$0093,$008F,$008B

DATA_109AC4:
	dw $008A,$008E,$0092,$0094,$0090,$008C

DATA_109AD0:
	dw $0095,$0095,$0095,$0095,$0095,$0095

DATA_109ADC:
	db $44,!REGISTER_Window1LeftPositionDesignation : dl $7E5B18

DATA_109AE1:
	db $E9 : dw $7E56D0
	db $E9 : dw $7E5874
	db $00

CODE_109AE8:
	JSL.l CODE_008277
	JSL.l CODE_00831C
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	JSL.l CODE_00BE26
	REP.b #$10
	LDY.w !RAM_YI_Level_CurrentBonusGame
	LDX.w DATA_109AB8,y
	STX.b $10
	LDX.w DATA_109AC4,y
	STX.b $12
	LDX.w DATA_109AD0,y
	STX.b $14
	LDY.w #$00F3
	JSL.l CODE_00B3EE
	REP.b #$30
	LDX.w !RAM_YI_Level_CurrentBonusGame
	LDA.w DATA_109A88,x
	STA.b $10
	LDA.w DATA_109A94,x
	STA.b $12
	LDA.w DATA_109AA0,x
	STA.b $14
	LDA.w DATA_109AAC,x
	STA.b $16
	LDA.w !RAM_YI_Level_CurrentYoshiColorLo
	ASL
	TAX
	LDA.l DATA_00BA14,x
	STA.b $18
	LDX.w #$0094
	JSL.l CODE_00BB05
	LDX.b #$2A
	JSL.l CODE_00BDA2
	LDX.b #$04
CODE_109B4A:
	LDA.w DATA_109ADC,x
	STA.w HDMA[$05].Parameters,x
	DEX
	BPL.b CODE_109B4A
	LDA.b #$7E56D0>>16
	STA.w HDMA[$07].IndirectSourceBank
	LDX.b #$06
CODE_109B5A:
	LDA.w DATA_109AE1,x
	STA.l $7E5B18,x
	DEX
	BPL.b CODE_109B5A
	LDA.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
	REP.b #$30
	LDA.w #$0028
	STA.b $8F
	LDA.w #$00B4
	STA.b $8D
	STZ.b $85
	LDA.w #$0002
	STA.b $83
	LDA.w #$0018
	STA.w $10E0
	LDA.w #$7FFF
	STA.w $0948
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	LDA.w #$0100
	STA.b !RAM_YI_Global_Layer1YPosLo
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	STZ.w $10DE
	LDY.w #$0000
	STY.w $60F8
	LDA.w DATA_10A29D,y
	STA.w $60BE
	LDA.w DATA_10A2F5,y
	STA.w $61D2
	LDA.w #$00D0
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$00A8
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0002
	STA.w $60C4
	SEP.b #$10
	LDY.b #$04
	LDA.w #$FFFF
CODE_109BC5:
	STA.w $6EB6,y
	DEY
	DEY
	BPL.b CODE_109BC5
	LDA.w #!Define_YI_NorSpr061_BabyMario
	LDY.b #$00
	JSL.l CODE_03A366
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
	LDA.w #$2000
	STA.w $61B2
	LDA.w #$0000
	STA.w $7402
	LDA.w #$0020
	STA.w $70E2
	LDA.w #$00B8
	STA.w $7182
	LDA.w #$0002
	STA.w $7400
	LDA.w #$003A
	STA.w $7042
	SEP.b #$20
	LDA.w DATA_10A772
	STA.w $10F6
	LDA.w DATA_10A775
	STA.w $10F7
	STZ.w $10F8
	STZ.w $10F9
	STZ.w $10FA
	STZ.w $10FB
	STZ.w $10FC
	STZ.w $10FD
	STZ.w $10FE
	STZ.w $10FF
	REP.b #$20
	STZ.w $6094
	STZ.w $609C
	LDX.b #FXCODE_08B3D9>>16
	LDA.w #FXCODE_08B3D9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSR.w CODE_109CB2
	JSR.w CODE_109D74
	SEP.b #$30
	JSL.l CODE_00E3D7
	REP.b #$30
	LDX.w !RAM_YI_Level_CurrentBonusGame
	JSR.w (DATA_109C74,x)
	SEP.b #$30
	LDX.b #$06
	JSL.l CODE_008543
	LDA.b #$01
	STA.b !RAM_YI_Global_PlayMusicLo
	STZ.w $0121
	LDA.b #$02
	STA.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	INC.w !RAM_YI_Global_CurrentGameMode
	PLB
	RTL

DATA_109C74:
	dw CODE_109E78
	dw CODE_109EF6
	dw CODE_10A000
	dw CODE_10A0BD
	dw CODE_109FB5
	dw CODE_109F3F

CODE_109C80:
	PHP
	SEP.b #$30
	PHA
	LDY.b #$00
CODE_109C86:
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,y
	BEQ.b CODE_109CA0
	INY
	CPY.b #$1B
	BNE.b CODE_109C86
	LDY.b #$00
	LDX.b #$01
CODE_109C94:
	LDA.w !RAM_YI_Level_PauseMenuItemInventory,x
	STA.w !RAM_YI_Level_PauseMenuItemInventory,y
	INX
	INY
	CPY.b #$1A
	BNE.b CODE_109C94
CODE_109CA0:
	PLA
	STA.w !RAM_YI_Level_PauseMenuItemInventory,y
	PLP
	RTS

CODE_109CA6:
	JSR.w CODE_109C80
	RTL

DATA_109CAA:
	dw $0020,$0000

DATA_109CAE:
	dw $0002,$FFFE

CODE_109CB2:
	SEP.b #$10
	STZ.b $87
	LDY.b $83
	LDA.b $85
	CMP.w DATA_109CAA,y
	BEQ.b CODE_109CC7
	INC.b $87
	CLC
	ADC.w DATA_109CAE,y
	STA.b $85
CODE_109CC7:
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #DATA_17A48C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_17A48C
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.b $8D
	SEC
	SBC.w #$0008
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $8F
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_08B348>>16
	LDA.w #FXCODE_08B348
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.b $85
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #DATA_17A48C>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #DATA_17A48C
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.b $8D
	SEC
	SBC.w #$0008
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $8F
	CLC
	ADC.w #$00B0
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0002
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_08B348>>16
	LDA.w #FXCODE_08B348
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
CODE_109D27:
	JSL.l CODE_00BE39	: dl $7E56D0,$703A02 : dw $0348
	RTS

DATA_109D34:
	dw $68D8,$68D8,$68D8,$68D9,$68D8,$68D8

DATA_109D40:
	dw $3CD6,$FCD6,$3CC0,$3CD0,$3CC1,$3CD1,$3CC2,$3CD2
	dw $3CC3,$3CD3,$3CC4,$3CD4,$3CC5,$3CD5,$3CC2,$3CD0
	dw $3CC6,$3CD5,$FCD5,$FCC5,$0385,$0385,$0385,$0385
	dw $037B,$037B

CODE_109D74:
	LDA.w !RAM_YI_Level_CurrentBonusGame
	CMP.w #!Define_YI_BonusID_Roulette
	BNE.b CODE_109D87
	LDA.w !RAM_YI_Global_CurrentGameMode
	CMP.w #!Define_YI_GameMode2A
	BNE.b CODE_109D87
	DEC.w !RAM_YI_Level_CurrentLifeCountLo
CODE_109D87:
	LDY.w #$0000
	LDX.w #$0000
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
CODE_109D90:
	LDY.w #$0000
CODE_109D93:
	CMP.w #$000A
	BCC.b CODE_109D9E
	SBC.w #$000A
	INY
	BRA.b CODE_109D93

CODE_109D9E:
	ASL
	ASL
	STA.b $00,x
	TYA
	INX
	INX
	CPX.w #$0006
	BNE.b CODE_109D90
	LDX.w !RAM_YI_Level_CurrentBonusGame
	LDA.l DATA_109D34,x
	PHB
	LDX.w #$7E4800>>16
	PHX
	PLB
	LDY.w $7E4800
	STA.w $0000,y
	CLC
	ADC.w #$0020
	STA.w $0012,y
	LDA.w #$0180
	STA.w $0002,y
	STA.w $0014,y
	LDA.w #$0018
	STA.w $0004,y
	STA.w $0016,y
	TYA
	CLC
	ADC.w #$000C
	STA.w $0005,y
	CLC
	ADC.w #$0012
	STA.w $0017,y
	LDA.w #$007E
	STA.w $0007,y
	STA.w $0019,y
	LDA.w #$0006
	STA.w $0008,y
	STA.w $001A,y
	TYA
	CLC
	ADC.w #$0012
	STA.w $000A,y
	CLC
	ADC.w #$0012
	STA.w $001C,y
	STA.w $7E4800
	PLB
	PLB
	TYA
	SEC
	SBC.w #$4802
	TAX
	LDY.w #$0004
	STY.b $06
	STZ.b $08
	STZ.b $0A
CODE_109E1A:
	LDA.w $0000,y
	BNE.b CODE_109E23
	LDA.b $08
	BEQ.b CODE_109E3D
CODE_109E23:
	LDA.w $0000,y
	TAY
	LDA.w DATA_109D40,y
	STA.l $7E480E,x
	LDA.w DATA_109D40+$02,y
	STA.l $7E4820,x
	STA.b $08
	INC.b $0A
	INC.b $0A
	INX
	INX
CODE_109E3D:
	DEC.b $06
	DEC.b $06
	LDY.b $06
	BEQ.b CODE_109E23
	BPL.b CODE_109E1A
	LDA.w #$3C7D
	LDY.b $0A
CODE_109E4C:
	CPY.w #$0006
	BEQ.b CODE_109E5F
	STA.l $7E480E,x
	STA.l $7E4820,x
	INX
	INX
	INY
	INY
	BRA.b CODE_109E4C

CODE_109E5F:
	RTS

DATA_109E60:
	db $11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11

DATA_109E6C:
	db $11,$11,$11,$11,$11,$11,$15,$15,$15,$15,$15,$15

CODE_109E78:
	SEP.b #$10
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #DATA_109E60
	STA.w $6002
	LDA.w #DATA_109E60>>16
	STA.w $6000
	LDA.w #$0012
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	STZ.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDY.b #$705800>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$1000
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	LDA.w #DATA_109E6C
	STA.w $6002
	LDA.w #DATA_109E6C>>16
	STA.w $6000
	LDA.w #$0014
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDY.b #$705800>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$1000
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	REP.b #$10
	JSR.w CODE_10A68F
	RTS

CODE_109EF6:
	SEP.b #$10
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #DATA_109E60
	STA.w $6002
	LDA.w #DATA_109E60>>16
	STA.w $6000
	LDA.w #$0012
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	STZ.w !REGISTER_VRAMAddressLo
	LDY.b #$706100>>16
	STY.w DMA[$00].SourceBank
	LDY.b #$01
	LDX.b #$07
CODE_109F2A:
	LDA.w #$706100
	STA.w DMA[$00].SourceLo
	LDA.w #$0120
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	DEX
	BNE.b CODE_109F2A
	JMP.w CODE_10B76B

CODE_109F3F:
	SEP.b #$20
	LDA.w DATA_10BFB7
	STA.w $1126
	LDA.w DATA_10BFB7+$01
	STA.w $1127
	LDA.w DATA_10BFB7+$02
	STA.w $1128
	LDA.w DATA_10BFB7+$03
	STA.w $1129
	LDA.w DATA_10BFB7+$08
	STA.w $112A
	LDA.w DATA_10BFB7+$09
	STA.w $112B
	LDA.w DATA_10BFB7+$0A
	STA.w $112C
	LDA.w DATA_10BFB7+$0B
	STA.w $112D
	LDA.w DATA_10BFB7+$10
	STA.w $112E
	LDA.w DATA_10BFB7+$11
	STA.w $112F
	LDA.w DATA_10BFB7+$12
	STA.w $1130
	LDA.w DATA_10BFB7+$13
	STA.w $1131
	LDA.b #$04
	STA.w $113E
	STA.w $113F
	STA.w $1140
	STZ.w $114D
	REP.b #$20
	LDA.w #$5800
	STA.w $1132
	STA.w $1134
	STA.w $1136
	LDA.w #$5000
	STA.w $114E
	STA.w $1150
	STA.w $1152
	JSR.w CODE_10BD7F
	RTS

CODE_109FB5:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	STA.w $1176
	SEP.b #$30
	STZ.w $1165
	STZ.w $1166
	STZ.w $1167
	STZ.w $1183
	STZ.w $1174
	LDA.b #$60
	STA.w $1168
	LDA.b #$80
	STA.w $1169
	STZ.w $116E
	STZ.w $116F
	LDA.b #$09
	STA.w $1179
	STA.w $117A
	STZ.w $117B
	LDA.b #$01
	STA.w $1178
	STZ.w $117C
	STZ.w $117D
	STZ.w $117E
	LDA.b #$40
	STA.w $1180
	STZ.w $117F
	REP.b #$30
	RTS

CODE_10A000:
	SEP.b #$10
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #DATA_109E6C
	STA.w $6002
	LDA.w #DATA_109E6C>>16
	STA.w $6000
	LDA.w #$0014
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	STZ.w !REGISTER_VRAMAddressLo
	LDY.b #$705FE0>>16
	STY.w DMA[$00].SourceBank
	LDY.b #$01
	LDX.b #$06
CODE_10A034:
	LDA.w #$705FE0
	STA.w DMA[$00].SourceLo
	LDA.w #$0120
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	DEX
	BNE.b CODE_10A034
	LDA.w #DATA_109E60
	STA.w $6002
	LDA.w #DATA_109E60>>16
	STA.w $6000
	LDA.w #$0012
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDY.b #$705800>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$0900
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	LDA.w #DATA_109E6C
	STA.w $6002
	LDA.w #DATA_109E6C>>16
	STA.w $6000
	LDA.w #$0014
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDY.b #$705800>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$1000
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	JMP.w CODE_10CDA4

DATA_10A0B1:
	db $15,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11

CODE_10A0BD:
	SEP.b #$10
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #DATA_10A0B1
	STA.w $6002
	LDA.w #DATA_10A0B1>>16
	STA.w $6000
	LDA.w #$0016
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	STZ.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDY.b #$705800>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$1000
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	LDA.w #DATA_109E6C
	STA.w $6002
	LDA.w #DATA_109E6C>>16
	STA.w $6000
	LDA.w #$0014
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDY.b #$705800>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$1000
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	REP.b #$10
	JSR.w CODE_10D205
	RTS

CODE_10A13B:
	JSL.l CODE_008259
	JSL.l CODE_0394CF
	REP.b #$30
	JSR.w CODE_10A175
	LDX.w !RAM_YI_Level_CurrentBonusGame
	JSR.w (DATA_10A169,x)
	JSR.w CODE_10A21C
	JSR.w CODE_10A33D
	SEP.b #$30
	JSL.l CODE_04FA67
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	PLB
	RTL

DATA_10A169:
	dw CODE_10A26F
	dw CODE_10B5CE
	dw CODE_10CD4F
	dw CODE_10D181
	dw CODE_10C497
	dw CODE_10BD5D

CODE_10A175:
	LDY.w $6092
	LDA.w #$00C8
	STA.w $6000,y
	STA.w $6008,y
	LDA.w #$00D8
	STA.w $6010,y
	STA.w $6018,y
	LDA.w #$0018
	STA.w $6020,y
	STA.w $6028,y
	LDA.w #$0028
	STA.w $6030,y
	STA.w $6038,y
	LDA.w #$00C0
	STA.w $6002,y
	STA.w $6012,y
	STA.w $6022,y
	STA.w $6032,y
	LDA.w #$00D0
	STA.w $600A,y
	STA.w $601A,y
	STA.w $602A,y
	STA.w $603A,y
	LDA.w #$0F0D
	STA.w $6004,y
	STA.w $6024,y
	LDA.w #$0F2D
	STA.w $600C,y
	STA.w $602C,y
	LDA.w #$4F0D
	STA.w $6014,y
	STA.w $6034,y
	LDA.w #$4F2D
	STA.w $601C,y
	STA.w $603C,y
	LDA.w #$4002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	STA.w $6026,y
	STA.w $602E,y
	STA.w $6036,y
	STA.w $603E,y
	TYA
	CLC
	ADC.w #$0040
	STA.w $6092
	RTS

DATA_10A202:
	dw $44A6,$48C7,$4CE8,$5109

DATA_10A20A:
	dw $001F,$023F,$037F,$03F3,$0327,$7F20,$7E66,$7D77
	dw $7C1F

CODE_10A21C:
	LDA.b $30
	AND.w #$0007
	BNE.b CODE_10A26E
	INC.w $10E2
	LDA.w $10E2
	ASL
	TAY
	CPY.w #$0012
	BNE.b CODE_10A236
	LDY.w #$0000
	STY.w $10E2
CODE_10A236:
	LDX.w #$0010
CODE_10A239:
	LDA.w DATA_10A20A,y
	STA.l YI_Global_PaletteMirror[$13].LowByte,x
	INY
	INY
	CPY.w #$0012
	BNE.b CODE_10A24A
	LDY.w #$0000
CODE_10A24A:
	DEX
	DEX
	BPL.b CODE_10A239
	INC.w $10E4
	LDA.w $10E4
	AND.w #$0003
	ASL
	TAY
	LDX.w #$0006
CODE_10A25C:
	LDA.w DATA_10A202,y
	STA.l YI_Global_PaletteMirror[$1C].LowByte,x
	DEY
	DEY
	BPL.b CODE_10A26A
	LDY.w #$0006
CODE_10A26A:
	DEX
	DEX
	BPL.b CODE_10A25C
CODE_10A26E:
	RTS

CODE_10A26F:
	LDA.w $10DE
	ASL
	TAX
	JMP.w (DATA_10A277,x)

DATA_10A277:
	dw CODE_10A41C
	dw CODE_10A427
	dw CODE_10A444
	dw CODE_10A466
	dw CODE_10A481
	dw CODE_10A4EC
	dw CODE_10A549
	dw CODE_10A5B3
	dw CODE_10A70A
	dw CODE_10AE80
	dw CODE_10AB90
	dw CODE_10ABCD
	dw CODE_10A5C7
	dw CODE_10A9BE
	dw CODE_10B00E
	dw CODE_10B046
	dw CODE_10A621
	dw CODE_10B49E
	dw CODE_10B4BB

DATA_10A29D:
	dw $0046,$0047,$0046,$004D,$0044,$0045,$0044,$002F
	dw $002C,$002D,$002E,$002F,$0030,$0031,$0032,$0033
	dw $0034,$004C,$00DA,$00DB,$00DC,$00DD,$0011,$0012
	dw $0011,$00DE,$006B,$006C,$006D,$006E,$00DF,$00E0

DATA_10A2DD:
	dw $0000,$000E,$0022,$0032,$003C,$003E

DATA_10A2E9:
	dw $000E,$0022,$0032,$003C,$0040,$0040

DATA_10A2F5:
	dw $0006,$0006,$0006,$0006,$0006,$0006,$0006,$0001
	dw $0001,$0004,$0001,$0008,$0004,$0001,$0001,$0001
	dw $0005,$0004,$0008,$0004,$0008,$000C,$0004,$0004
	dw $0004,$0008,$0020,$0004,$0004,$8000,$0010,$0010

DATA_10A335:
	dw $0004,$0004,$0004,$0004

CODE_10A33D:
	LDA.w #$0030
	STA.w $6126
	LDX.w $10F0
	JSR.w (DATA_10A37C,x)
	LDA.b $30
	AND.w #$0007
	BNE.b CODE_10A35E
	LDA.b $30
	AND.w #$0018
	LSR
	LSR
	TAY
	LDA.w DATA_10A335,y
	STA.w $7402
CODE_10A35E:
	SEP.b #$10
	PHB
	LDX.b #YI_NorSpr061_BabyMario_Main>>16
	PHX
	PLB
	PHD
	LDA.w #$7960
	TCD
	LDX.b #$00
	STX.w $7972
	JSL.l YI_NorSpr061_BabyMario_Main
	JSL.l CODE_008AB6
	PLD
	PLB
	REP.b #$10
	RTS

DATA_10A37C:
	dw CODE_10A388
	dw CODE_10A3AB
	dw CODE_10A3CA
	dw CODE_10A388
	dw CODE_10A388
	dw CODE_10A388

CODE_10A388:
	DEC.w $61D2
	BNE.b CODE_10A3AA
	LDA.w $60F8
	INC
	INC
	CMP.w DATA_10A2E9,x
	BNE.b CODE_10A39A
	LDA.w DATA_10A2DD,x
CODE_10A39A:
	STA.w $60F8
	TAY
	LDA.w DATA_10A29D,y
	STA.w $60BE
	LDA.w DATA_10A2F5,y
	STA.w $61D2
CODE_10A3AA:
	RTS

CODE_10A3AB:
	DEC.w $61D2
	BNE.b CODE_10A3AA
	LDA.w $60F8
	INC
	INC
	CMP.w DATA_10A2E9,x
	BNE.b CODE_10A39A
	LDA.w #!Define_YI_SoundID20_SoaringEgg
	JSL.l CODE_0085D2
	LDX.w #$0000
	STX.w $10F0
	TXA
	BRA.b CODE_10A39A

CODE_10A3CA:
	DEC.w $61D2
	BNE.b CODE_10A3FA
	LDA.w $60F8
	INC
	INC
	CMP.w DATA_10A2E9,x
	BNE.b CODE_10A3DC
	LDA.w DATA_10A2DD,x
CODE_10A3DC:
	STA.w $60F8
	TAY
	CMP.w #$0024
	BNE.b CODE_10A3EE
	LDA.w #$FC00
	STA.w $60AA
	INC.w $60C0
CODE_10A3EE:
	LDA.w DATA_10A29D,y
	STA.w $60BE
	LDA.w DATA_10A2F5,y
	STA.w $61D2
CODE_10A3FA:
	LDA.w $60C0
	BEQ.b CODE_10A41B
	LDA.w $60AA
	CLC
	ADC.w #$0040
	STA.w $60AA
	CLC
	ADC.w !EXRAM_YI_Player_SubYPosHi|!EXRAMBankMirror
	CMP.w #$A800
	BCC.b CODE_10A418
	STZ.w $60C0
	LDA.w #$A800
CODE_10A418:
	STA.w !EXRAM_YI_Player_SubYPosHi|!EXRAMBankMirror
CODE_10A41B:
	RTS

CODE_10A41C:
	DEC.w $10E0
	BNE.b CODE_10A426
	INC.w $10DE
	STZ.b $83
CODE_10A426:
	RTS

CODE_10A427:
	JSR.w CODE_109CB2
	LDA.b $87
	BNE.b CODE_10A437
	LDA.w #$0030
	STA.w $10E0
	INC.w $10DE
CODE_10A437:
	RTS

DATA_10A438:
	dw $0028,$0058,$00E8,$0118,$00B8,$0088

CODE_10A444:
	DEC.w $10E0
	BNE.b CODE_10A459
	LDX.w !RAM_YI_Level_CurrentBonusGame
	LDA.w DATA_10A438,x
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
	INC.w $10DE
CODE_10A459:
	RTS

DATA_10A45A:
	dw $0010,$000D,$000C,$000D,$0009,$000C

CODE_10A466:
	SEP.b #$30
	JSL.l CODE_01DE54
	REP.b #$30
	JSR.w CODE_109CB2
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_10A480
	LDY.w !RAM_YI_Level_CurrentBonusGame
	LDX.w $10DE
	INX
	STX.w $10DE
CODE_10A480:
	RTS

CODE_10A481:
	LDA.b $30
	AND.w #$0001
	BNE.b CODE_10A4CB
	LDA.w $0948
	SEC
	SBC.w #$0421
	STA.w $0948
	BNE.b CODE_10A4CB
	LDA.w #!Define_YI_SoundID46_BonusGameBoardFalls
	JSL.l CODE_0085D2
	INC.w $10DE
	LDY.w !RAM_YI_Level_CurrentBonusGame
	CPY.w #!Define_YI_BonusID_SlotMachine
	BNE.b CODE_10A4CB
	SEP.b #$20
	LDA.b #$10
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.b #$91
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.b #$30
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STZ.w !RAM_YI_Global_BG1And2WindowMaskSettings
	STZ.w !RAM_YI_Global_BG3And4WindowMaskSettings
	LDY.w #$4A53
	INC.w $114D
	STY.w $0948
	REP.b #$20
	JMP.w CODE_10A51C

CODE_10A4CB:
	LDY.w !RAM_YI_Level_CurrentBonusGame
	CPY.w #!Define_YI_BonusID_Roulette
	BNE.b CODE_10A4EB
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	INC
	CMP.w #$0001
	BNE.b CODE_10A4EB
	LDA.w #$0001
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	LDA.w #!Define_YI_GameMode1F
	STA.w !RAM_YI_Global_CurrentGameMode
	STZ.w !RAM_YI_Level_DoBonusChallengeFlagLo
CODE_10A4EB:
	RTS

CODE_10A4EC:
	LDA.b !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0008
	STA.b !RAM_YI_Global_Layer1YPosLo
	STA.b !RAM_YI_Global_Layer2YPosLo
	BNE.b CODE_10A514
	LDA.w #!Define_YI_SoundID46_BonusGameBoardFalls
	JSL.l CODE_0085D2
	INC.w $10DE
	STZ.w $10EC
	LDY.w $10EC
	LDA.w DATA_10A535,y
	STA.w $10E6
	LDA.w DATA_10A53F,y
	STA.w $10E8
CODE_10A514:
	LDX.w !RAM_YI_Level_CurrentBonusGame
	CPX.w #!Define_YI_BonusID_SlotMachine
	BNE.b CODE_10A534
CODE_10A51C:
	SEP.b #$10
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_08B3F5>>16
	LDA.w #FXCODE_08B3F5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSR.w CODE_109D27
	JMP.w CODE_10C017

CODE_10A534:
	RTS

DATA_10A535:
	dw $0000,$0000,$0000,$0000,$0000

DATA_10A53F:
	dw $0005,$0004,$0003,$0002,$0001

CODE_10A549:
	LDA.w $10E6
	SEC
	SBC.w #$8000
	STA.w $10E6
	LDA.w $10E8
	SBC.w #$0000
	STA.w $10E8
	LDA.w $10E6
	CLC
	ADC.w $10EA
	STA.w $10EA
	LDA.b !RAM_YI_Global_Layer1YPosLo
	ADC.w $10E8
	STA.b !RAM_YI_Global_Layer1YPosLo
	STA.b !RAM_YI_Global_Layer2YPosLo
	BPL.b CODE_10A5A4
	LDA.w #!Define_YI_SoundID46_BonusGameBoardFalls
	JSL.l CODE_0085D2
	STZ.w $10EA
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2YPosLo
	LDA.w $10EC
	INC
	INC
	STA.w $10EC
	TAY
	CPY.w #$000A
	BNE.b CODE_10A598
	INC.w $10DE
	LDA.w #$0030
	STA.w $10E0
	BRA.b CODE_10A5A4

CODE_10A598:
	LDA.w DATA_10A535,y
	STA.w $10E6
	LDA.w DATA_10A53F,y
	STA.w $10E8
CODE_10A5A4:
	JMP.w CODE_10A514

DATA_10A5A7:
	dw $0005,$0005,$0010,$0015,$0010,$0029

CODE_10A5B3:
	DEC.w $10E0
	BNE.b CODE_10A5C4
	LDY.w !RAM_YI_Level_CurrentBonusGame
	LDA.w DATA_10A5A7,y
	STA.w $10E0
	INC.w $10DE
CODE_10A5C4:
	JMP.w CODE_10A514

CODE_10A5C7:
	SEP.b #$30
	JSL.l CODE_01DE5A
	REP.b #$30
	JSR.w CODE_109D27
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_10A620
	JSR.w CODE_10AE80
	LDX.w #$0008
	LDA.l $704094
	BEQ.b CODE_10A61D
	LDY.w !RAM_YI_Level_CurrentBonusGame
	CPY.w #!Define_YI_BonusID_FlipCards
	BNE.b CODE_10A619
	SEP.b #$30
	LDY.b #$06
CODE_10A5EF:
	LDA.w $10F9,y
	BNE.b CODE_10A5F9
	DEY
	BPL.b CODE_10A5EF
	BRA.b CODE_10A617

CODE_10A5F9:
	REP.b #$30
	LDA.w #$0005
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.w #$0090
	STA.w $10E0
	LDX.w #$0004
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	SEP.b #$30
	JSR.w CODE_10A8F6
CODE_10A617:
	REP.b #$30
CODE_10A619:
	LDX.w $10DE
	INX
CODE_10A61D:
	STX.w $10DE
CODE_10A620:
	RTS

CODE_10A621:
	JSR.w CODE_10AE80
	LDA.b $37
	AND.w #$00F0
	ORA.b $38
	BNE.b CODE_10A632
	DEC.w $10E0
	BNE.b CODE_10A643
CODE_10A632:
	LDA.w #!Define_YI_GameMode1F
	STA.w !RAM_YI_Global_CurrentGameMode
	STZ.w !RAM_YI_Level_DoBonusChallengeFlagLo
	SEP.b #$30
	JSL.l CODE_108279
	REP.b #$30
CODE_10A643:
	LDX.w !RAM_YI_Level_CurrentBonusGame
	CPX.w #!Define_YI_BonusID_SlotMachine
	BNE.b CODE_10A64E
	JMP.w CODE_10C017

CODE_10A64E:
	RTS

DATA_10A64F:
	db $0A,$06,$05,$08,$00,$09,$02,$01,$0A,$06,$07,$08,$00,$09,$01,$01
	db $0A,$0A,$07,$02,$03,$0B,$01,$01,$0A,$0A,$06,$07,$06,$05,$01,$01
	db $0A,$07,$02,$03,$0B,$01,$01,$01,$0A,$0A,$0A,$07,$07,$07,$01,$01
	db $0A,$06,$06,$00,$09,$01,$01,$01,$0A,$0A,$06,$06,$07,$09,$01,$01

CODE_10A68F:
	JSL.l CODE_008408
	SEP.b #$30
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.b #$07
	TAX
	LDA.b #$00
CODE_10A69D:
	DEX
	BMI.b CODE_10A6A5
	CLC
	ADC.b #$08
	BRA.b CODE_10A69D

CODE_10A6A5:
	TAY
	REP.b #$20
	LDA.w DATA_10A64F,y
	STA.b $00
	LDA.w DATA_10A64F+$02,y
	STA.b $02
	LDA.w DATA_10A64F+$04,y
	STA.b $04
	LDA.w DATA_10A64F+$06,y
	STA.b $06
	LDA.w DATA_10A64F+$08,y
	STA.b $08
	SEP.b #$20
	LDA.b #$08
	STA.b $0A
	LDY.b #$00
CODE_10A6C9:
	JSL.l CODE_008408
	LDA.b $0A
	STA.w !REGISTER_Multiplicand
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !REGISTER_Multiplier
	NOP #4
	REP.b #$20
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	SEP.b #$20
	AND.b #$0F
	TAX
	LDA.b $00,x
	STA.w $1104,y
	INY
	CPY.b #$07
	BEQ.b CODE_10A6FE
	DEC.b $0A
CODE_10A6F3:
	CPX.b $0A
	BEQ.b CODE_10A6C9
	LDA.b $01,x
	STA.b $00,x
	INX
	BRA.b CODE_10A6F3

CODE_10A6FE:
	TXA
	EOR.b #$01
	TAX
	LDA.b $00,x
	STA.w $110B
	REP.b #$30
	RTS

CODE_10A70A:
	SEP.b #$30
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	BEQ.b CODE_10A716
	JSR.w CODE_10AE80
	BRA.b CODE_10A76F

CODE_10A716:
	LDA.w $10F3
	CMP.b #$0A
	BNE.b CODE_10A739
	REP.b #$30
	LDX.w #$0006
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	SEP.b #$30
	LDA.b #$10
	STA.w $10DE
	LDA.b #$C0
	STA.w $10E0
	BRA.b CODE_10A76F

CODE_10A739:
	LDA.w $1148
	CMP.b #$07
	BNE.b CODE_10A75F
	JSR.w CODE_10A8F6
	REP.b #$30
	LDX.w #$0004
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	SEP.b #$30
	LDA.b #$0E
	STA.w $10DE
	LDA.b #$60
	STA.w $10E0
	BRA.b CODE_10A76F

CODE_10A75F:
	LDA.w $10F8
	BEQ.b CODE_10A769
	JSR.w CODE_10A77A
	BRA.b CODE_10A76C

CODE_10A769:
	JSR.w CODE_10A7C3
CODE_10A76C:
	JSR.w CODE_10A928
CODE_10A76F:
	REP.b #$30
	RTS

DATA_10A772:
	db $58,$78,$98

DATA_10A775:
	db $60,$80,$A0

DATA_10A778:
	db $02,$FE

CODE_10A77A:
	SEP.b #$30
	LDA.w $10F8
	CMP.b #$03
	BCS.b CODE_10A7A0
	LDX.w $110D
	LDA.w DATA_10A772,x
	CMP.w $10F6
	BEQ.b CODE_10A7BD
	LDA.w $10F8
	AND.b #$01
	TAX
	LDA.w $10F6
	CLC
	ADC.w DATA_10A778,x
	STA.w $10F6
	BRA.b CODE_10A7C0

CODE_10A7A0:
	LDX.w $110E
	LDA.w DATA_10A775,x
	CMP.w $10F7
	BEQ.b CODE_10A7BD
	LDA.w $10F8
	AND.b #$01
	TAX
	LDA.w $10F7
	CLC
	ADC.w DATA_10A778,x
	STA.w $10F7
	BRA.b CODE_10A7C0

CODE_10A7BD:
	STZ.w $10F8
CODE_10A7C0:
	REP.b #$30
	RTS

CODE_10A7C3:
	SEP.b #$30
	LDA.w $093F
	AND.b #$C0
	BNE.b CODE_10A7D6
	LDA.w $093E
	AND.b #$80
	BNE.b CODE_10A7D6
	JMP.w CODE_10A838

CODE_10A7D6:
	LDA.w $110E
	ASL
	ORA.w $110E
	CLC
	ADC.w $110D
	STA.w $10F2
	CMP.b #$04
	BNE.b CODE_10A7F2
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	INC.w $10DE
	BRA.b CODE_10A821

CODE_10A7F2:
	BMI.b CODE_10A7F5
	DEC
CODE_10A7F5:
	TAX
	LDA.w $1104,x
	CMP.b #$FF
	BNE.b CODE_10A800
CODE_10A7FD:
	JMP.w CODE_10A8F3

CODE_10A800:
	STA.w $10F3
	LDA.b #$FF
	STA.w $1104,x
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	INC.w $1148
	INC.w $10DE
	LDA.w $10F3
	CMP.b #$01
	BEQ.b CODE_10A821
	CMP.b #$0A
	BEQ.b CODE_10A821
	JSR.w CODE_10A916
CODE_10A821:
	JSR.w CODE_10AD77
	REP.b #$30
	LDA.w #$002B
	STA.w $60BE
	LDX.w #$0002
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JMP.w CODE_10A39A

CODE_10A838:
	SEP.b #$30
	LDA.w $093F
	AND.b #$0F
	BEQ.b CODE_10A7FD
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
	LDA.w $093F
	AND.b #$03
	BEQ.b CODE_10A8B4
	AND.b #$02
	BEQ.b CODE_10A882
	LDA.w $110D
	BNE.b CODE_10A877
	LDX.b #$02
	STX.w $110D
	LDA.w DATA_10A772,x
	STA.w $10F6
	LDA.w $110E
	DEC
	BPL.b CODE_10A86A
	LDA.b #$02
CODE_10A86A:
	STA.w $110E
	TAX
	LDA.w DATA_10A775,x
	STA.w $10F7
	JMP.w CODE_10A8F3

CODE_10A877:
	DEC.w $110D
	LDA.b #$01
	STA.w $10F8
	JMP.w CODE_10A8F3

CODE_10A882:
	LDA.w $110D
	CMP.b #$02
	BNE.b CODE_10A8AA
	LDX.b #$00
	STX.w $110D
	LDA.w DATA_10A772,x
	STA.w $10F6
	LDA.w $110E
	INC
	CMP.b #$03
	BNE.b CODE_10A89E
	LDA.b #$00
CODE_10A89E:
	STA.w $110E
	TAX
	LDA.w DATA_10A775,x
	STA.w $10F7
	BRA.b CODE_10A8F3

CODE_10A8AA:
	INC.w $110D
	LDA.b #$02
	STA.w $10F8
	BRA.b CODE_10A8F3

CODE_10A8B4:
	LDA.w $093F
	AND.b #$08
	BEQ.b CODE_10A8D7
	LDA.w $110E
	BNE.b CODE_10A8CD
	LDX.b #$02
	STX.w $110E
	LDA.w DATA_10A775,x
	STA.w $10F7
	BRA.b CODE_10A8F3

CODE_10A8CD:
	DEC.w $110E
	LDA.b #$03
	STA.w $10F8
	BRA.b CODE_10A8F3

CODE_10A8D7:
	LDA.w $110E
	CMP.b #$02
	BNE.b CODE_10A8EB
	LDX.b #$00
	STX.w $110E
	LDA.w DATA_10A775,x
	STA.w $10F7
	BRA.b CODE_10A8F3

CODE_10A8EB:
	INC.w $110E
	LDA.b #$04
	STA.w $10F8
CODE_10A8F3:
	REP.b #$30
	RTS

CODE_10A8F6:
	SEP.b #$30
	LDX.b #$00
CODE_10A8FA:
	LDA.w $10F9,x
	BEQ.b CODE_10A909
	PHX
	JSR.w CODE_109C80
	PLX
	INX
	CPX.b #$07
	BNE.b CODE_10A8FA
CODE_10A909:
	RTS

DATA_10A90A:
	db !Define_YI_ItemID_StarCloud,!Define_YI_ItemID_FreeSlot,!Define_YI_ItemID_GreenMelon
	db !Define_YI_ItemID_RedMelon,!Define_YI_ItemID_FreeSlot,!Define_YI_ItemID_FullEgg
	db !Define_YI_ItemID_10Star,!Define_YI_ItemID_20Star,!Define_YI_ItemID_POW
	db !Define_YI_ItemID_MagnifyingGlass,!Define_YI_ItemID_FreeSlot,!Define_YI_ItemID_BlueMelon

CODE_10A916:
	SEP.b #$30
	LDY.w $1100
	LDX.w $10F3
	LDA.w DATA_10A90A,x
	STA.w $10F9,y
	INC.w $1100
	RTS

CODE_10A928:
	REP.b #$30
	LDY.w $6092
	LDA.b $30
	AND.w #$0008
	LSR
	LSR
	LSR
	STA.b $00
	LDA.b $30
	AND.w #$0010
	BEQ.b CODE_10A946
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.b $00
CODE_10A946:
	LDA.w $10F6
	INC
	CLC
	ADC.b $00
	AND.w #$00FF
	STA.w $6000,y
	STA.w $6010,y
	LDA.w $10F6
	DEC
	CLC
	ADC.w #$0010
	SEC
	SBC.b $00
	AND.w #$00FF
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $10F7
	INC
	CLC
	ADC.b $00
	AND.w #$00FF
	STA.w $6002,y
	STA.w $600A,y
	LDA.w $10F7
	DEC
	CLC
	ADC.w #$0010
	SEC
	SBC.b $00
	AND.w #$00FF
	STA.w $6012,y
	STA.w $601A,y
	LDA.w #$309F
	STA.w $6004,y
	LDA.w #$709F
	STA.w $600C,y
	LDA.w #$B09F
	STA.w $6014,y
	LDA.w #$F09F
	STA.w $601C,y
	LDA.w #$0000
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	TYA
	CLC
	ADC.w #$0020
	STA.w $6092
	RTS

CODE_10A9BE:
	JSR.w CODE_10AE80
	DEC.w $10E0
	BNE.b CODE_10AA09
	LDA.w $1102
	AND.w #$00FF
	BNE.b CODE_10A9DC
	LDA.w #$0080
	STA.w $10E0
	LDA.w #$0010
	STA.w $10DE
	BRA.b CODE_10AA09

CODE_10A9DC:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	CMP.w #$03E7
	BNE.b CODE_10A9F0
	SEP.b #$20
	STZ.w $1102
	REP.b #$20
	INC.w $10E0
	BRA.b CODE_10AA09

CODE_10A9F0:
	SEP.b #$20
	DEC.w $1102
	LDA.b #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	REP.b #$20
	INC.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	LDA.w #$0030
	STA.w $10E0
CODE_10AA09:
	RTS

DATA_10AA0A:
	dw $6E6D,$7B7A,$6F78,$7970,$7271,$7A73

DATA_10AA16:
	db $09,$0D,$0A,$0D,$0B,$0D,$0C,$0D,$0D,$0D,$0E,$0D,$0F,$0D,$10,$0D
	db $11,$0D,$12,$15,$13,$15,$14,$15,$15,$15,$16,$15,$17,$15,$18,$15
	db $19,$15,$1A,$15,$92,$11,$93,$11,$94,$11,$95,$11,$96,$11,$97,$11
	db $98,$11,$99,$11,$9A,$11,$9B,$15,$9C,$15,$9D,$15,$9E,$15,$9F,$15
	db $A0,$15,$A1,$15,$A2,$15,$A3,$15,$80,$0D,$81,$0D,$82,$0D,$83,$0D
	db $84,$0D,$85,$0D,$86,$0D,$87,$0D,$88,$0D,$1B,$0D,$1C,$0D,$1D,$0D
	db $1E,$0D,$1F,$0D,$20,$0D,$21,$0D,$22,$0D,$23,$0D,$24,$0D,$25,$0D
	db $26,$0D,$27,$0D,$28,$0D,$29,$0D,$2A,$0D,$2B,$0D,$2C,$0D,$89,$15
	db $8A,$15,$8B,$15,$8C,$15,$8D,$15,$8E,$15,$8F,$15,$90,$15,$91,$15
	db $2D,$15,$2E,$15,$2F,$15,$30,$15,$31,$15,$32,$15,$33,$15,$34,$15
	db $35,$15,$36,$0D,$37,$0D,$38,$0D,$39,$0D,$3A,$0D,$3B,$0D,$3C,$0D
	db $3D,$0D,$3E,$0D,$3F,$15,$40,$15,$41,$15,$42,$15,$43,$15,$44,$15
	db $45,$15,$46,$15,$47,$15,$92,$0D,$93,$0D,$94,$0D,$95,$0D,$96,$0D
	db $97,$0D,$98,$0D,$99,$0D,$9A,$0D,$00,$0D,$01,$0D,$02,$0D,$03,$0D
	db $04,$0D,$05,$0D,$06,$0D,$07,$0D,$08,$0D

DATA_10AB00:
	dw $698B,$698F,$6993,$6A0B

DATA_10AB08:
	dw $6A0F,$6A13,$6A8B,$6A8F,$6A93

DATA_10AB12:
	dw $0000,$0000,$0000

DATA_10AB18:
	db $54,$74,$94,$54

DATA_10AB1C:
	db $74,$94,$54,$74,$94

DATA_10AB21:
	db $5C,$5C,$5C,$7C

DATA_10AB25:
	db $7C,$7C,$9C,$9C,$9C

DATA_10AB2A:
	db $36,$32,$36,$32,$36,$32,$36,$32,$36

DATA_10AB33:
	db $32,$36,$34,$36,$32,$32,$32,$36,$36,$36,$36,$32

CODE_10AB3F:
	LDA.w $10F2
	AND.w #$00FF
	PHA
	ASL
	TAX
	LDA.w #$0003
	STA.b $0E
	LDY.w DATA_10AB00,x
CODE_10AB50:
	LDA.w #DATA_10AB12>>16
	STA.b $01
	LDX.w #DATA_10AB12
	LDA.w #$0006
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $0E
	BNE.b CODE_10AB50
	PLA
	TAX
	CLC
	ADC.w #DATA_10AB2A
	STA.b $00
	TXA
	CLC
	ADC.w #DATA_10AB18
	STA.b $02
	TXA
	CLC
	ADC.w #DATA_10AB21
	STA.b $04
	JSR.w CODE_10ACB7
	STZ.w $10F4
	LDA.w #$006C
	LDX.w #$0011
	JSR.w CODE_10AC94
	RTS

CODE_10AB90:
	JSR.w CODE_10AE80
	LDA.w $10F4
	CLC
	ADC.w #$0008
	STA.w $10F4
	CMP.w #$0080
	BMI.b CODE_10ABA6
	INC.w $10DE
	RTS

CODE_10ABA6:
	LDA.w $10F2
	AND.w #$00FF
	TAX
	CLC
	ADC.w #DATA_10AB2A
	STA.b $00
	TXA
	CLC
	ADC.w #DATA_10AB18
	STA.b $02
	TXA
	CLC
	ADC.w #DATA_10AB21
	STA.b $04
	JSR.w CODE_10ACB7
	LDA.w #$006C
	LDX.w #$0011
	JMP.w CODE_10AC94

CODE_10ABCD:
	JSR.w CODE_10AE80
	LDA.w $10F4
	SEC
	SBC.w #$0008
	STA.w $10F4
	BMI.b CODE_10ABDF
	JMP.w CODE_10AC67

CODE_10ABDF:
	LDA.w $10F2
	AND.w #$00FF
	ASL
	TAX
	LDY.w DATA_10AB00,x
	LDA.w $10F3
	AND.w #$00FF
	STA.b $00
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $00
	CLC
	ADC.b $00
	CLC
	ADC.w #DATA_10AA16
	TAX
	LDA.w #$0003
	STA.b $0E
CODE_10AC06:
	LDA.w #DATA_10AA16>>16
	STA.b $01
	LDA.w #$0006
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	PLA
	CLC
	ADC.w #$0006
	TAX
	DEC.b $0E
	BNE.b CODE_10AC06
	LDA.w $10DE
	CMP.w #$000D
	BEQ.b CODE_10AC66
	LDA.w $1148
	CMP.w #$0009
	BNE.b CODE_10AC3F
	LDA.w #$0020
	STA.w $10E0
	LDA.w #$000F
	BRA.b CODE_10AC63

CODE_10AC3F:
	LDA.w $10F3
	AND.w #$00FF
	CMP.w #$0001
	BNE.b CODE_10AC4F
	LDA.w #!Define_YI_SoundID90_Incorrect
	BRA.b CODE_10AC5C

CODE_10AC4F:
	CMP.w #$000A
	BNE.b CODE_10AC59
	LDA.w #!Define_YI_SoundID7D_YoshiLostChallenge
	BRA.b CODE_10AC5C

CODE_10AC59:
	LDA.w #!Define_YI_SoundID8F_Correct
CODE_10AC5C:
	JSL.l CODE_0085D2
	LDA.w #$0008
CODE_10AC63:
	STA.w $10DE
CODE_10AC66:
	RTS

CODE_10AC67:
	LDA.w $10F3
	AND.w #$00FF
	TAY
	CLC
	ADC.w #DATA_10AB33
	STA.b $00
	LDA.w $10F2
	AND.w #$00FF
	TAX
	CLC
	ADC.w #DATA_10AB18
	STA.b $02
	TXA
	CLC
	ADC.w #DATA_10AB21
	STA.b $04
	JSR.w CODE_10ACB7
	LDA.w DATA_10AA0A,y
	AND.w #$00FF
	LDX.w #$0011
CODE_10AC94:
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STX.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $10F4
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	SEP.b #$10
	LDX.b #FXCODE_08DE98>>16
	LDA.w #FXCODE_08DE98
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSR.w CODE_10AD19
	RTS

CODE_10ACB7:
	PHY
	LDY.w $6092
	LDA.b ($02)
	AND.w #$00FF
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.w #$0010
	STA.w $6008,y
	STA.w $6018,y
	LDA.b ($04)
	AND.w #$00FF
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
	LDA.b ($00)
	XBA
	AND.w #$FF00
	ORA.w #$01E8
	STA.w $6004,y
	INC
	INC
	STA.w $600C,y
	INC
	INC
	STA.w $6014,y
	INC
	INC
	STA.w $601C,y
	LDA.w #$0002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	TYA
	CLC
	ADC.w #$0020
	STA.w $6092
	PLY
	RTS

CODE_10AD19:
	LDA.w #$705800>>16
	STA.b $01
	LDY.w #$5E80
	LDX.w #$705800
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$5F80
	LDX.w #$705A00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$5EC0
	LDX.w #$705C00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$5FC0
	LDX.w #$705E00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	RTS

DATA_10AD53:
	dw $0007,$000D,$000C,$000A,$0008,$0008,$0003,$FFFD
	dw $FFF6

DATA_10AD65:
	dw $000A,$0010,$0010,$000C,$000B,$0004,$0003,$0003
	dw $0003

CODE_10AD77:
	REP.b #$20
	SEP.b #$10
	LDY.b #$04
	LDA.w #!Define_YI_NorSpr022_FlashingEgg
	JSL.l CODE_03A366
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_10AD53
	STA.w $70E6
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_10AD65
	STA.w $7186
	STZ.w $7224
	STZ.w $7226
	LDA.w #$0001
	STA.w $74A6
	LDA.w #$0030
	STA.w $7046
	STZ.w $7A36
	REP.b #$10
	RTS

DATA_10ADB0:
	dw $0060,$0080,$00A0

DATA_10ADB6:
	dw $0068,$0088,$00A8

CODE_10ADBC:
	SEP.b #$10
	LDA.w $70E6
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7186
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $110D
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_10ADB0,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $110E
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_10ADB6,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0600
	SEP.b #$10
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7224
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $7226
	REP.b #$10
	RTS

DATA_10AE06:
	dw $003C,$005C,$007C,$009C,$00BC,$002C,$004C,$00AC
	dw $00CC,$003C,$005C,$007C,$009C,$00BC

DATA_10AE22:
	dw $005C,$005C,$005C,$005C,$005C,$007C,$007C,$007C
	dw $007C,$009C,$009C,$009C,$009C,$009C

CODE_10AE3E:
	SEP.b #$10
	LDA.w $70E6
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7186
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $1154
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_10AE06,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_10AE22,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0600
	SEP.b #$10
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $7224
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $7226
	REP.b #$10
	RTS

CODE_10AE80:
	REP.b #$20
	SEP.b #$10
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	BNE.b CODE_10AE8C
	JMP.w CODE_10AF37

CODE_10AE8C:
	CMP.w #$0002
	BEQ.b CODE_10AEDE
	CMP.w #$0003
	BNE.b CODE_10AE99
	JMP.w CODE_10AF18

CODE_10AE99:
	LDA.w $60BE
	CMP.w #$0034
	BNE.b CODE_10AEBE
	LDA.w #!Define_YI_SoundID4A_YoshiGrunt
	JSL.l CODE_0085D2
	LDA.w !RAM_YI_Level_CurrentBonusGame
	CMP.w #!Define_YI_BonusID_MatchCards
	BEQ.b CODE_10AEB5
	JSR.w CODE_10ADBC
	BRA.b CODE_10AEB8

CODE_10AEB5:
	JSR.w CODE_10AE3E
CODE_10AEB8:
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	JMP.w CODE_10AF37

CODE_10AEBE:
	LDY.b #$02
	LDA.w $60F8
	SEC
	SBC.w DATA_10A2DD,y
	TAX
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_10AD53,x
	STA.w $70E6
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w DATA_10AD65,x
	STA.w $7186
	BRA.b CODE_10AF31

CODE_10AEDE:
	JSR.w CODE_10AFD4
	LDA.w !RAM_YI_Level_CurrentBonusGame
	CMP.w #!Define_YI_BonusID_MatchCards
	BEQ.b CODE_10AEEE
	JSR.w CODE_10AF3A
	BRA.b CODE_10AEF1

CODE_10AEEE:
	JSR.w CODE_10AF9C
CODE_10AEF1:
	CPY.b #$00
	BEQ.b CODE_10AF31
	LDA.w #$FF00
	STA.w $7224
	LDA.w #$FC00
	STA.w $7226
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	LDA.w $10DE
	CMP.w #$0011
	BEQ.b CODE_10AF31
	LDA.w #!Define_YI_SoundID67_EnemyTumbling
	JSL.l CODE_0085D2
	INC.w $10DE
	BRA.b CODE_10AF31

CODE_10AF18:
	LDA.w $7186
	CMP.w #$00E0
	BCS.b CODE_10AF2C
	LDA.w $7226
	CLC
	ADC.w #$0040
	STA.w $7226
	BRA.b CODE_10AF31

CODE_10AF2C:
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	BRA.b CODE_10AF37

CODE_10AF31:
	LDX.b #$04
	JSL.l CODE_03B69D
CODE_10AF37:
	REP.b #$10
	RTS

CODE_10AF3A:
	SEP.b #$10
	LDY.b #$00
	LDA.w $110D
	AND.w #$00FF
	ASL
	TAX
	LDA.w $70E6
	CMP.w DATA_10ADB0,x
	BCC.b CODE_10AF5E
	LDA.w $110E
	AND.w #$00FF
	ASL
	TAX
	LDA.w $7186
	CMP.w DATA_10ADB6,x
	BCS.b CODE_10AF99
CODE_10AF5E:
	SEP.b #$20
	REP.b #$10
	LDA.w $110E
	ASL
	ORA.w $110E
	CLC
	ADC.w $110D
	CMP.b #$04
	BNE.b CODE_10AF91
	REP.b #$20
	JSR.w CODE_10B56F
	JSR.w CODE_10B4F1
	LDA.w #$0100
	STA.w $10F4
	JSR.w CODE_10B54F
	LDA.w #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	LDA.w #$0011
	STA.w $10DE
	BRA.b CODE_10AF96

CODE_10AF91:
	REP.b #$20
	JSR.w CODE_10AB3F
CODE_10AF96:
	LDY.w #$0001
CODE_10AF99:
	SEP.b #$10
	RTS

CODE_10AF9C:
	SEP.b #$10
	LDY.b #$00
	LDA.w $1154
	AND.w #$00FF
	CMP.w #$0008
	BEQ.b CODE_10AFBF
	ASL
	TAX
	LDA.w $70E6
	CMP.w DATA_10AE06,x
	BCC.b CODE_10AFC9
	LDA.w $7186
	CMP.w DATA_10AE22,x
	BCS.b CODE_10AFD1
	BRA.b CODE_10AFC9

CODE_10AFBF:
	ASL
	TAX
	LDA.w $70E6
	CMP.w DATA_10AE06,x
	BCC.b CODE_10AFD1
CODE_10AFC9:
	REP.b #$10
	JSR.w CODE_10D588
	LDY.w #$0001
CODE_10AFD1:
	SEP.b #$10
	RTS

CODE_10AFD4:
	LDA.w $0030
	AND.w #$0001
	BNE.b CODE_10B00D
	LDA.w #!Define_YI_AmbSpr1DF
	JSL.l CODE_008B21
	LDA.w $70E6
	STA.w $70A2,y
	LDA.w $7186
	STA.w $7142,y
	LDA.w #$0005
	STA.w $7E4C,y
	LDA.w #$0005
	STA.w $73C2,y
	LDA.w #$0004
	STA.w $7782,y
	LDA.w #$0006
	STA.w $7462,y
	LDA.w #$002C
	STA.w $7002,y
CODE_10B00D:
	RTS

CODE_10B00E:
	DEC.w $10E0
	BPL.b CODE_10B045
	SEP.b #$30
	LDA.b #$06
	STA.b !RAM_YI_Global_PlayMusicLo
	LDX.b #$00
CODE_10B01B:
	LDA.w $1104,x
	CMP.b #$FF
	BNE.b CODE_10B025
	INX
	BRA.b CODE_10B01B

CODE_10B025:
	STA.w $10F3
	CPX.b #$04
	BMI.b CODE_10B02D
	INX
CODE_10B02D:
	STX.w $10F2
	INC.w $1148
	INC.w $10DE
	REP.b #$30
	LDA.w #$0100
	STA.w $10F4
	LDA.w #!Define_YI_SoundID51_ThunderLakituAttacking1
	JSL.l CODE_0085D2
CODE_10B045:
	RTS

CODE_10B046:
	JSR.w CODE_10B050
	JSR.w CODE_10B1CD
	JSR.w CODE_10B2DE
CODE_10B04F:
	RTS

CODE_10B050:
	LDA.w $1184
	ASL
	TAX
	JMP.w (DATA_10B058,x)

DATA_10B058:
	dw CODE_10B062
	dw CODE_10B083
	dw CODE_10B0F3
	dw CODE_10B123
	dw CODE_10B04F

CODE_10B062:
	JSR.w CODE_10B0B4
	LDA.w $10F4
	CMP.w #$0150
	BNE.b CODE_10B079
	LDA.w #!Define_YI_SoundID53_ThunderLakituAttacking3
	JSL.l CODE_0085D2
	INC.w $1184
	BRA.b CODE_10B080

CODE_10B079:
	CLC
	ADC.w #$0004
	STA.w $10F4
CODE_10B080:
	JMP.w CODE_10B0D3

CODE_10B083:
	LDA.w $10F4
	CMP.w #$0120
	BNE.b CODE_10B09A
	INC.w $1186
	INC.w $1188
	LDA.w #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
	BRA.b CODE_10B0A4

CODE_10B09A:
	CMP.w #$0100
	BNE.b CODE_10B0A4
	INC.w $1184
	BRA.b CODE_10B0B1

CODE_10B0A4:
	JSR.w CODE_10B0B4
	LDA.w $10F4
	SEC
	SBC.w #$0004
	STA.w $10F4
CODE_10B0B1:
	JMP.w CODE_10B0D3

CODE_10B0B4:
	LDA.w $10F2
	AND.w #$00FF
	TAX
	CLC
	ADC.w #DATA_10AB2A
	STA.b $00
	TXA
	CLC
	ADC.w #DATA_10AB18
	STA.b $02
	TXA
	CLC
	ADC.w #DATA_10AB21
	STA.b $04
	JSR.w CODE_10ACB7
	RTS

CODE_10B0D3:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0011
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$006C
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	SEP.b #$10
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSR.w CODE_10AD19
	RTS

CODE_10B0F3:
	LDA.w $70E6
	CMP.w $118C
	BCS.b CODE_10B122
	SEP.b #$20
	LDA.b #$04
	STA.w $10F3
	LDA.b #$0A
	STA.w $1102
	REP.b #$20
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	LDA.w #$0040
	STA.w $118E
	STZ.w $1190
	JSR.w CODE_10AB3F
	LDA.w #!Define_YI_SoundID51_ThunderLakituAttacking1
	JSL.l CODE_0085D2
	INC.w $1184
CODE_10B122:
	RTS

CODE_10B123:
	LDA.w $1190
	AND.w #$0001
	BNE.b CODE_10B148
	LDA.w $10F4
	CLC
	ADC.w $118E
	CMP.w #$0080
	BCC.b CODE_10B1AE
	SEC
	SBC.w #$0080
	STA.b $00
	LDA.w #$0080
	SEC
	SBC.b $00
	STA.w $10F4
	BRA.b CODE_10B18B

CODE_10B148:
	LDA.w $10F4
	SEC
	SBC.w $118E
	BPL.b CODE_10B1AE
	STA.b $00
	LDA.w $1190
	AND.w #$0003
	CMP.w #$0001
	BNE.b CODE_10B182
	LDX.w $118E
	CPX.w #$0004
	BNE.b CODE_10B182
	STZ.w $1148
	LDA.w $10F9
	CLC
	ADC.w #$000A
	STA.w $10F9
	LDA.w #$000D
	STA.w $10DE
	LDA.w #$0090
	STA.w $10E0
	JMP.w CODE_10ABDF

CODE_10B182:
	LDA.b $00
	EOR.w #$FFFF
	INC
	STA.w $10F4
CODE_10B18B:
	LDA.w $118E
	CMP.w #$0004
	BEQ.b CODE_10B19A
	SEC
	SBC.w #$0002
	STA.w $118E
CODE_10B19A:
	INC.w $1190
	LDA.w $1190
	AND.w #$0001
	BNE.b CODE_10B1B1
	LDA.w #!Define_YI_SoundID07_GoonieLoseWings
	JSL.l CODE_0085D2
	BRA.b CODE_10B1B1

CODE_10B1AE:
	STA.w $10F4
CODE_10B1B1:
	LDA.w $10F4
	CMP.w #$007C
	BCC.b CODE_10B1BA
	RTS

CODE_10B1BA:
	LDA.w $1190
	AND.w #$0003
	ASL
	TAX
	JMP.w (DATA_10B1C5,x)

DATA_10B1C5:
	dw CODE_10ABA6
	dw CODE_10AC67
	dw CODE_10AC67
	dw CODE_10ABA6

CODE_10B1CD:
	LDA.w $1186
	BEQ.b CODE_10B1DD
	CMP.w #$0018
	BCS.b CODE_10B1DD
	JSR.w CODE_10B211
	INC.w $1186
CODE_10B1DD:
	RTS

DATA_10B1DE:
	dw $2CE1,$2CE2,$2CF0,$2CF1,$2CF2

DATA_10B1E8:
	db $04,$04,$04,$01,$01,$01,$01,$01,$01,$02,$02,$02,$02,$03,$03,$03
	db $03,$03,$00,$00,$00,$00,$00

DATA_10B1FF:
	db $61,$81,$A1,$61,$81,$A1,$61,$81,$A1

DATA_10B208:
	db $69,$69,$69,$89,$89,$89,$A9,$A9,$A9

CODE_10B211:
	LDA.w $1186
	DEC
	AND.w #$FFFC
	LSR
	LSR
	CLC
	ADC.w #$0011
	STA.b $0E
	LDA.w $10F2
	AND.w #$00FF
	TAX
	LDA.w DATA_10B1FF,x
	AND.w #$00FF
	STA.b $04
	TAY
	SEC
	SBC.b $0E
	STA.b $00
	TYA
	CLC
	ADC.b $0E
	STA.b $02
	LDA.w DATA_10B208,x
	AND.w #$00FF
	STA.b $0A
	TAY
	SEC
	SBC.b $0E
	STA.b $06
	TYA
	CLC
	ADC.b $0E
	STA.b $08
	JSR.w CODE_10B253
	RTS

CODE_10B253:
	LDY.w $6092
	LDA.b $00
	STA.w $6000,y
	STA.w $6018,y
	STA.w $6028,y
	LDA.b $02
	STA.w $6010,y
	STA.w $6020,y
	STA.w $6038,y
	LDA.b $04
	STA.w $6008,y
	STA.w $6030,y
	LDA.b $06
	STA.w $6002,y
	STA.w $600A,y
	STA.w $6012,y
	LDA.b $08
	STA.w $602A,y
	STA.w $6032,y
	STA.w $603A,y
	LDA.b $0A
	STA.w $601A,y
	STA.w $6022,y
	LDA.w $1186
	DEC
	TAX
	LDA.w DATA_10B1E8,x
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_10B1DE,x
	STA.w $6004,y
	STA.w $600C,y
	STA.w $6014,y
	STA.w $601C,y
	STA.w $6024,y
	STA.w $602C,y
	STA.w $6034,y
	STA.w $603C,y
	LDA.w #$0000
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	STA.w $6026,y
	STA.w $602E,y
	STA.w $6036,y
	STA.w $603E,y
	TYA
	CLC
	ADC.w #$0040
	STA.w $6092
	RTS

CODE_10B2DE:
	LDA.w $1188
	ASL
	TAX
	JMP.w (DATA_10B2E6,x)

DATA_10B2E6:
	dw CODE_10B04F
	dw CODE_10B316
	dw CODE_10B356
	dw CODE_10B44F
	dw CODE_10B47A
	dw CODE_10B04F

DATA_10B2F2:
	dw $6000,$8000,$A000,$6000,$8000,$A000,$6000,$8000
	dw $A000

DATA_10B304:
	dw $5800,$5800,$5800,$7800,$7800,$7800,$9800,$9800
	dw $9800

CODE_10B316:
	SEP.b #$20
	LDA.b #$FF
	STA.w $74A6
	REP.b #$20
	STZ.w $6F04
	LDA.w $10F2
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_10B2F2,x
	STA.w $70E6
	SEC
	SBC.w #$2000
	STA.w $118C
	LDA.w DATA_10B304,x
	STA.w $7186
	LDA.w #$0500
	STA.w $7224
	LDA.w #$FD00
	STA.w $7226
	LDA.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	JSR.w CODE_10B3D6
	INC.w $1188
	RTS

CODE_10B356:
	JSR.w CODE_10B398
	JSR.w CODE_10B3B2
	LDA.w $7224
	BPL.b CODE_10B372
	LDA.w #$0020
	STA.w $7224
	LDA.w #$0040
	STA.w $7226
	INC.w $1188
	BRA.b CODE_10B378

CODE_10B372:
	JSR.w CODE_10B37C
	JSR.w CODE_10B387
CODE_10B378:
	JSR.w CODE_10B3D6
	RTS

CODE_10B37C:
	LDA.w $70E6
	CLC
	ADC.w $7224
	STA.w $70E6
	RTS

CODE_10B387:
	LDA.w $7186
	CLC
	ADC.w $7226
	STA.w $7186
	RTS

DATA_10B392:
	dw $FFC0,$0000,$FFE0

CODE_10B398:
	LDA.w $1188
	SEC
	SBC.w #$0002
	ASL
	TAX
	LDA.w DATA_10B392,x
	CLC
	ADC.w $7224
	STA.w $7224
	RTS

DATA_10B3AC:
	dw $0010,$0006,$FFF0

CODE_10B3B2:
	LDA.w $1188
	SEC
	SBC.w #$0002
	ASL
	TAX
	LDA.w DATA_10B3AC,x
	CLC
	ADC.w $7226
	STA.w $7226
	RTS

DATA_10B3C6:
	dw $3709,$370B,$3729,$372B,$3749,$374B,$3769,$376B

CODE_10B3D6:
	LDY.w $6092
	LDA.w $70E6
	AND.w #$FF00
	CMP.w #$E000
	BCC.b CODE_10B3E7
	ORA.w #$00FF
CODE_10B3E7:
	XBA
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.w #$0010
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $7186
	AND.w #$FF00
	XBA
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
	LDA.w $1188
	CMP.w #$0004
	BEQ.b CODE_10B41C
	LDX.w #$0000
	BRA.b CODE_10B41F

CODE_10B41C:
	LDX.w #$0008
CODE_10B41F:
	LDA.w DATA_10B3C6,x
	STA.w $6004,y
	LDA.w DATA_10B3C6+$02,x
	STA.w $600C,y
	LDA.w DATA_10B3C6+$04,x
	STA.w $6014,y
	LDA.w DATA_10B3C6+$06,x
	STA.w $601C,y
	LDA.w #$0002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	TYA
	CLC
	ADC.w #$0020
	STA.w $6092
	RTS

CODE_10B44F:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	BPL.b CODE_10B46A
	LDA.w #$FFF0
	STA.w $7224
	LDA.w #$0200
	STA.w $7226
	LDA.w #!Define_YI_SoundID19_SelectWorld
	JSL.l CODE_0085D2
	INC.w $1188
CODE_10B46A:
	JSR.w CODE_10B398
	JSR.w CODE_10B3B2
	JSR.w CODE_10B37C
	JSR.w CODE_10B387
	JSR.w CODE_10B3D6
	RTS

CODE_10B47A:
	LDA.w $70E6
	BPL.b CODE_10B48E
	CMP.w #$E000
	BCC.b CODE_10B48E
	CMP.w #$F000
	BCS.b CODE_10B48E
	INC.w $1188
	BRA.b CODE_10B49D

CODE_10B48E:
	JSR.w CODE_10B398
	JSR.w CODE_10B3B2
	JSR.w CODE_10B37C
	JSR.w CODE_10B387
	JSR.w CODE_10B3D6
CODE_10B49D:
	RTS

CODE_10B49E:
	JSR.w CODE_10AE80
	JSR.w CODE_10B4F1
	LDA.w $10F4
	CMP.w #$00C0
	BNE.b CODE_10B4B1
	INC.w $10DE
	BRA.b CODE_10B4B8

CODE_10B4B1:
	SEC
	SBC.w #$0020
	STA.w $10F4
CODE_10B4B8:
	JMP.w CODE_10B54F

CODE_10B4BB:
	JSR.w CODE_10AE80
	LDA.w $10F4
	CMP.w #$0100
	BNE.b CODE_10B4E1
	JSR.w CODE_10B5A4
	LDA.w #$0029
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
	LDA.w #$000C
	STA.w $10DE
	LDA.w #$0001
	STA.w $10E0
	BRA.b CODE_10B4EE

CODE_10B4E1:
	JSR.w CODE_10B4F1
	LDA.w $10F4
	CLC
	ADC.w #$0010
	STA.w $10F4
CODE_10B4EE:
	JMP.w CODE_10B54F

CODE_10B4F1:
	PHY
	LDY.w $6092
	LDA.w DATA_10AB1C
	AND.w #$00FF
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.w #$0010
	STA.w $6008,y
	STA.w $6018,y
	LDA.w DATA_10AB25
	AND.w #$00FF
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
	LDA.w #$39E8
	STA.w $6004,y
	INC
	INC
	STA.w $600C,y
	INC
	INC
	STA.w $6014,y
	INC
	INC
	STA.w $601C,y
	LDA.w #$0002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	TYA
	CLC
	ADC.w #$0020
	STA.w $6092
	PLY
	RTS

CODE_10B54F:
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0081
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	SEP.b #$10
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSR.w CODE_10AD19
	RTS

CODE_10B56F:
	LDA.w #$0003
	STA.b $0E
	LDY.w DATA_10AB08
CODE_10B577:
	LDA.w #DATA_10AB12>>16
	STA.b $01
	LDX.w #DATA_10AB12
	LDA.w #$0006
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $0E
	BNE.b CODE_10B577
	RTS

DATA_10B592:
	dw $19D1,$19D2,$19D3,$19D4,$19D5,$19D6,$19D7,$19D8
	dw $19D9

CODE_10B5A4:
	LDA.w #$0003
	STA.b $0E
	LDY.w DATA_10AB08
	LDX.w #DATA_10B592
CODE_10B5AF:
	LDA.w #DATA_10B592>>16
	STA.b $01
	LDA.w #$0006
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	PLA
	CLC
	ADC.w #$0006
	TAX
	DEC.b $0E
	BNE.b CODE_10B5AF
	RTS

CODE_10B5CE:
	LDA.w $10DE
	ASL
	TAX
	JMP.w (DATA_10B5D6,x)

DATA_10B5D6:
	dw CODE_10A41C
	dw CODE_10A427
	dw CODE_10A444
	dw CODE_10A466
	dw CODE_10A481
	dw CODE_10A4EC
	dw CODE_10A549
	dw CODE_10A5B3
	dw CODE_10B7F1
	dw CODE_10B8B9
	dw CODE_10B97F
	dw CODE_10BC8C
	dw CODE_10B9F8
	dw CODE_10A621

DATA_10B5F2:
	dw $3987,$398B,$3A05,$3A09,$3A0D,$3A87,$3A8B

DATA_10B600:
	dw $0A23,$0A24,$0A25,$0A33,$0A34,$0A35,$0A43,$0A44
	dw $0A45

DATA_10B612:
	dw $0A20,$0A21,$0A22,$0A30,$0A31,$0A32,$0A40,$0A41
	dw $0A42

DATA_10B624:
	dl DATA_10B600
	dl DATA_10B612

DATA_10B62A:
	db $03,$00,$00,$03,$00,$00,$03

DATA_10B631:
	db $38,$58,$28,$48,$68,$38,$58

DATA_10B638:
	db $60,$60,$80,$80,$80,$A0,$A0

DATA_10B63F:
	db $00,$01,$FF,$00

DATA_10B643:
	db $05,$05,$FE,$FE,$FD,$FD,$FD

DATA_10B64A:
	db $02,$02,$03,$03,$02,$FB,$FB

DATA_10B651:
	dw $0000,$0090,$0120,$01B0,$0240,$02D0,$0360

DATA_10B65F:
	db $00,$00,$00,$17,$01,$00,$01,$17,$03,$00,$03,$17,$05,$00,$05,$17
	db $07,$00,$07,$17,$09,$00,$09,$17,$0B,$00,$0B,$17,$0D,$00,$0D,$17
	db $0F,$00,$0F,$17,$11,$00,$11,$17,$13,$00,$13,$17,$15,$00,$15,$17
	db $17,$00,$17,$17,$FF

DATA_10B694:
	db $01,$00,$00,$01,$03,$00,$00,$03,$05,$00,$00,$05,$07,$00,$00,$07
	db $09,$00,$00,$09,$0B,$00,$00,$0B,$0D,$00,$00,$0D,$0F,$00,$00,$0F
	db $11,$00,$00,$11,$13,$00,$00,$13,$15,$00,$00,$15,$17,$00,$00,$17
	db $16,$17,$17,$16,$14,$17,$17,$14,$12,$17,$17,$12,$10,$17,$17,$10
	db $0E,$17,$17,$0E,$0C,$17,$17,$0C,$0A,$17,$17,$0A,$08,$17,$17,$08
	db $06,$17,$17,$06,$04,$17,$17,$04,$02,$17,$17,$02,$00,$17,$17,$00
	db $FF

DATA_10B6F5:
	db $00,$00,$17,$17,$17,$00,$00,$17,$01,$00,$02,$17,$03,$00,$04,$17
	db $05,$00,$06,$17,$07,$00,$08,$17,$09,$00,$0A,$17,$0B,$00,$0C,$17
	db $0D,$00,$0E,$17,$0F,$00,$10,$17,$11,$00,$12,$17,$13,$00,$14,$17
	db $15,$00,$16,$17,$17,$00,$17,$17,$FF

DATA_10B72E:
	db $00,$17,$17,$17,$00,$15,$17,$15,$00,$13,$17,$13,$00,$11,$17,$11
	db $00,$0F,$17,$0F,$00,$0D,$17,$0D,$00,$0B,$17,$0B,$00,$09,$17,$09
	db $00,$07,$17,$07,$00,$05,$17,$05,$00,$03,$17,$03,$00,$01,$17,$01
	db $00,$00,$17,$00,$FF

DATA_10B763:
	dw DATA_10B65F,DATA_10B694,DATA_10B6F5,DATA_10B72E

CODE_10B76B:
	SEP.b #$30
	LDA.b #$00
	STA.w $1114
	TAY
	LDA.w DATA_10B631,y
	STA.w $10F6
	LDA.w DATA_10B638,y
	STA.w $10F7
	LDX.b #$06
	TXY
CODE_10B782:
	LDA.w DATA_10B62A,x
	STA.b $00,x
	DEX
	BPL.b CODE_10B782
	LDA.b #$15
	STA.b $2D
	LDA.b #$11
	STA.b $2E
	JSR.w CODE_10BD2A
	STZ.w $111D
	STZ.w $111C
	LDY.b #$06
	LDA.b #$00
CODE_10B79F:
	STA.w $111E,y
	DEY
	BPL.b CODE_10B79F
	REP.b #$30
	LDY.w #$0006
CODE_10B7AA:
	PHY
	LDA.w $1115,y
	AND.w #$00FF
	TAX
	LDA.w DATA_10B624+$02,x
	AND.w #$00FF
	STA.b $01
	LDA.w DATA_10B624,x
	TAX
	TYA
	ASL
	TAY
	LDA.w DATA_10B5F2,y
	TAY
	LDA.w #$0003
	STA.b $1E
CODE_10B7CA:
	PHY
	PHX
	LDA.w #$0006
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0006
	TAX
	PLA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $1E
	BNE.b CODE_10B7CA
	PLY
	DEY
	BPL.b CODE_10B7AA
	LDA.w #$0080
	STA.w $1110
	STA.w $1112
	RTS

CODE_10B7F1:
	JSL.l CODE_008408
	SEP.b #$20
	LDA.w $110F
	BEQ.b CODE_10B7FF
	DEC.w $110F
CODE_10B7FF:
	REP.b #$20
	LDA.w $10F6
	AND.w #$00FF
	CLC
	ADC.w #$0014
	STA.b $00
	LDA.w $10F7
	AND.w #$00FF
	CLC
	ADC.w #$0014
	STA.b $02
	LDA.w #$3564
	STA.b $04
	JSR.w CODE_10BBF9
	LDA.w $093E
	AND.w #$C080
	BNE.b CODE_10B82C
	JMP.w CODE_10B8B5

CODE_10B82C:
	LDA.w $1114
	AND.w #$00FF
	TAX
	LDA.w $111E,x
	AND.w #$00FF
	BEQ.b CODE_10B844
	LDA.w #!Define_YI_SoundID2A_ClankSound3
	JSL.l CODE_0085D2
	BRA.b CODE_10B8B5

CODE_10B844:
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	LDY.w #$000A
	STY.w $10F0
	LDA.w DATA_10A2DD,y
	JSR.w CODE_10A39A
	SEP.b #$30
	LDA.b #$18
	STA.w $110F
	INC.w $111E,x
	INC.w $10DE
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !REGISTER_Multiplicand
	LDA.b #$04
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderHi
	ASL
	TAX
	REP.b #$20
	LDY.b #$00
	LDA.w DATA_10B763,x
	STA.b $A3
	LDA.b ($A3),y
	INY
	AND.w #$00FF
	XBA
	STA.w $1110
	LDA.b ($A3),y
	INY
	STY.w $111C
	AND.w #$00FF
	XBA
	STA.w $1112
	LDA.w #(FXDATA_538000+$04E4)>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #FXDATA_538000+$04E4
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_08DF7E>>16
	LDA.w #FXCODE_08DF7E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	BRA.b CODE_10B8B8

CODE_10B8B5:
	JSR.w CODE_10BB07
CODE_10B8B8:
	RTS

CODE_10B8B9:
	SEP.b #$20
	LDA.w $110F
	BNE.b CODE_10B8CD
	LDA.b #$20
	STA.w $110F
	LDA.b #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_0085D2
	BRA.b CODE_10B8D0

CODE_10B8CD:
	DEC.w $110F
CODE_10B8D0:
	LDA.w $10F6
	CLC
	ADC.w $1111
	STA.b $00
	LDA.w $10F7
	CLC
	ADC.w $1113
	STA.b $02
	STZ.b $01
	STZ.b $03
	REP.b #$20
	LDA.w #$3564
	STA.b $04
	JSR.w CODE_10BBF9
	SEP.b #$10
	LDA.w $1111
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1113
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_08DFA2>>16
	LDA.w #FXCODE_08DFA2
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w #$705800>>16
	STA.b $01
	LDA.w $1114
	AND.w #$00FF
	ASL
	TAX
	LDY.w DATA_10B651,x
	LDX.w #$705800
	LDA.w #$0003
	STA.b $0E
CODE_10B927:
	LDA.w #$0060
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0030
	TAY
	PLA
	CLC
	ADC.w #$0200
	TAX
	DEC.b $0E
	BNE.b CODE_10B927
	SEP.b #$30
	LDY.w $111C
	LDA.b ($A3),y
	BPL.b CODE_10B979
	LDA.b #!Define_YI_SoundID90_Incorrect
	LDX.w $1114
	LDY.w $1115,x
	BEQ.b CODE_10B955
	LDA.b #!Define_YI_SoundID8F_Correct
CODE_10B955:
	JSL.l CODE_0085D2
	INC.w $111D
	LDA.w $111D
	CMP.b #$03
	BNE.b CODE_10B968
	INC.w $10DE
	BRA.b CODE_10B97C

CODE_10B968:
	DEC.w $10DE
	REP.b #$30
	LDY.w #$0000
	STY.w $10F0
	LDA.w DATA_10A2DD,y
	JMP.w CODE_10A39A

CODE_10B979:
	JSR.w CODE_10BB72
CODE_10B97C:
	REP.b #$30
	RTS

CODE_10B97F:
	SEP.b #$30
	STZ.w $1125
	LDY.b #$06
CODE_10B986:
	LDA.w $111E,y
	BEQ.b CODE_10B993
	LDA.w $1115,y
	BEQ.b CODE_10B993
	INC.w $1125
CODE_10B993:
	DEY
	BPL.b CODE_10B986
	LDY.w $1125
	LDA.w DATA_10B9E0,y
	STA.w $1148
	STZ.w $1149
	LDA.w DATA_10B9F0,y
	STA.w $10E0
	LDA.w DATA_10B9F4,y
	STA.w $10E1
	STZ.b $A3
	STZ.b $A4
	STZ.b $A5
	STZ.b $A6
	LDA.w DATA_10B9E4,y
	CPY.b #$00
	BNE.b CODE_10B9C5
	PHY
	JSL.l CODE_0085D2
	PLY
	BRA.b CODE_10B9C8

CODE_10B9C5:
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_10B9C8:
	INC.w $10DE
	REP.b #$30
	TYA
	ASL
	TAY
	LDA.w DATA_10B9E8,y
	STA.w $10F0
	TAY
	LDA.w DATA_10A2DD,y
	JMP.w CODE_10A39A

CODE_10B9DD:
	REP.b #$30
	RTS

DATA_10B9E0:
	db $00,$01,$02,$05

DATA_10B9E4:
	db !Define_YI_SoundID7D_YoshiLostChallenge,!Define_YI_SoundID05_Powerup,!Define_YI_SoundID05_Powerup,!Define_YI_SoundID05_Powerup

DATA_10B9E8:
	dw $0006,$0004,$0004,$0004

DATA_10B9F0:
	db $78,$78,$78,$78

DATA_10B9F4:
	db $00,$00,$00,$00

CODE_10B9F8:
	LDA.w $10E0
	BEQ.b CODE_10BA02
	DEC.w $10E0
	BRA.b CODE_10BA7E

CODE_10BA02:
	LDA.w $1148
	BNE.b CODE_10BA12
CODE_10BA07:
	LDA.w #$0080
	STA.w $10E0
	INC.w $10DE
	BRA.b CODE_10BA7E

CODE_10BA12:
	LDY.w !RAM_YI_Level_CurrentLifeCountLo
	CPY.w #$03E7
	BEQ.b CODE_10BA07
	PHA
	LDA.w #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	PLA
	LDY.w #$0030
	STY.w $10E0
	CMP.w #$006F
	BCS.b CODE_10BA5F
	CMP.w #$000B
	BCS.b CODE_10BA3E
	INC.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	DEC.w $1148
	BRA.b CODE_10BA7E

CODE_10BA3E:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	CLC
	ADC.w #$000A
	CMP.w #$03E8
	BCC.b CODE_10BA4D
	LDA.w #$03E7
CODE_10BA4D:
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	LDA.w $1148
	SEC
	SBC.w #$000A
	STA.w $1148
	BRA.b CODE_10BA7E

CODE_10BA5F:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	CLC
	ADC.w #$0064
	CMP.w #$03E8
	BCC.b CODE_10BA6E
	LDA.w #$03E7
CODE_10BA6E:
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	LDA.w $1148
	SEC
	SBC.w #$0064
	STA.w $1148
CODE_10BA7E:
	RTS

CODE_10BA7F:
	LDA.w $10E0
	BEQ.b CODE_10BA8A
	DEC.w $10E0
	JMP.w CODE_10BB06

CODE_10BA8A:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	BEQ.b CODE_10BA94
	LDA.w $1148
	BNE.b CODE_10BA9F
CODE_10BA94:
	LDA.w #$0080
	STA.w $10E0
	INC.w $10DE
	BRA.b CODE_10BB06

CODE_10BA9F:
	LDY.w #$0030
	STY.w $10E0
	CMP.w #$006F
	BCS.b CODE_10BAE7
	CMP.w #$000B
	BCS.b CODE_10BAC6
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	DEC
	CMP.w #$0001
	BPL.b CODE_10BABB
	LDA.w #$0001
CODE_10BABB:
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	DEC.w $1148
	BRA.b CODE_10BB06

CODE_10BAC6:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	SEC
	SBC.w #$000A
	CMP.w #$0001
	BPL.b CODE_10BAD5
	LDA.w #$0001
CODE_10BAD5:
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	LDA.w $1148
	SEC
	SBC.w #$000A
	STA.w $1148
	BRA.b CODE_10BB06

CODE_10BAE7:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	SEC
	SBC.w #$0064
	CMP.w #$0001
	BPL.b CODE_10BAF6
	LDA.w #$0001
CODE_10BAF6:
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	LDA.w $1148
	SEC
	SBC.w #$0064
	STA.w $1148
CODE_10BB06:
	RTS

CODE_10BB07:
	SEP.b #$30
	LDA.w $093F
	AND.b #$0F
	BEQ.b CODE_10BB14
	LDY.b #$20
	BRA.b CODE_10BB1B

CODE_10BB14:
	LDY.w $110F
	BNE.b CODE_10BB6F
	LDY.b #$10
CODE_10BB1B:
	STY.w $110F
	LDA.w $093D
	AND.b #$0F
	BNE.b CODE_10BB27
	BRA.b CODE_10BB6F

CODE_10BB27:
	PHA
	AND.b #$03
	TAY
	LDA.w $1114
	CLC
	ADC.w DATA_10B63F,y
	BPL.b CODE_10BB38
	LDA.b #$06
	BRA.b CODE_10BB3E

CODE_10BB38:
	CMP.b #$07
	BCC.b CODE_10BB3E
	LDA.b #$00
CODE_10BB3E:
	STA.w $1114
	TAY
	PLA
	LSR
	LSR
	BIT.b #$01
	BEQ.b CODE_10BB50
	TYA
	CLC
	ADC.w DATA_10B64A,y
	BRA.b CODE_10BB59

CODE_10BB50:
	BIT.b #$02
	BEQ.b CODE_10BB5D
	TYA
	CLC
	ADC.w DATA_10B643,y
CODE_10BB59:
	STA.w $1114
	TAY
CODE_10BB5D:
	LDA.w DATA_10B631,y
	STA.w $10F6
	LDA.w DATA_10B638,y
	STA.w $10F7
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
CODE_10BB6F:
	REP.b #$30
	RTS

CODE_10BB72:
	REP.b #$20
	LDA.b ($A3),y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	INY
	LDA.b ($A3),y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $1111
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1113
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $1110
	CLC
	ADC.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $1110
	LDA.w $1112
	CLC
	ADC.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w $1112
	LDY.w $111C
	LDA.b ($A3),y
	AND.w #$00FF
	XBA
	SEC
	SBC.w $1110
	BEQ.b CODE_10BBD7
	EOR.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_10BBF6
	LDA.b ($A3),y
	AND.w #$00FF
	XBA
	STA.w $1110
CODE_10BBD7:
	INY
	LDA.b ($A3),y
	AND.w #$00FF
	XBA
	SEC
	SBC.w $1112
	BEQ.b CODE_10BBF2
	EOR.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BPL.b CODE_10BBF6
	LDA.b ($A3),y
	AND.w #$00FF
	XBA
	STA.w $1112
CODE_10BBF2:
	INY
	STY.w $111C
CODE_10BBF6:
	SEP.b #$20
	RTS

CODE_10BBF9:
	LDY.w $6092
	LDA.b $00
	SEC
	SBC.w #$0007
	STA.w $6000,y
	LDA.b $02
	STA.w $6002,y
	LDA.b $04
	STA.w $6004,y
	LDA.w #$0002
	STA.w $6006,y
	TYA
	CLC
	ADC.w #$0008
	STA.w $6092
	RTS

DATA_10BC1E:
	dw $0CFC,$0CFC,$0CFC,$0CFC,$0CFC,$0CFC,$0CFC

DATA_10BC2C:
	dw $0A50,$0A51,$0CFC,$0A62,$0CCB,$0EE0,$0EE1,$0A60
	dw $0A61,$0A52,$0A64,$0CDB,$0EF0,$0EF1

DATA_10BC48:
	dw $0A50,$0A51,$0CFC,$0A62,$0CC8,$0EE0,$0EE1,$0A60
	dw $0A61,$0A52,$0A63,$0CD8,$0EF0,$0EF1

DATA_10BC64:
	dw $0A50,$0A51,$0CFC,$0A53,$0CC7,$0EE0,$0EE1,$0A60
	dw $0A61,$0A52,$0A54,$0CD7,$0EF0,$0EF1

DATA_10BC80:
	dw DATA_10BC64,DATA_10BC48,DATA_10BC2C

DATA_10BC86:
	dw $3A92,$3A32,$39D2

CODE_10BC8C:
	LDA.w $1125
	AND.w #$00FF
	BNE.b CODE_10BCA8
	LDA.w $10E0
	BEQ.b CODE_10BC9D
	DEC.w $10E0
	RTS

CODE_10BC9D:
	LDA.w #$0080
	STA.w $10E0
	INC.w $10DE
	BRA.b CODE_10BCB9

CODE_10BCA8:
	DEC
	ASL
	TAY
	LDA.w $10E0
	BNE.b CODE_10BCBD
	LDA.w #$0020
	STA.w $10E0
	JSR.w CODE_10BCDD
CODE_10BCB9:
	INC.w $10DE
	RTS

CODE_10BCBD:
	DEC.w $10E0
	LDA.b $A3
	BEQ.b CODE_10BCC8
	DEC.b $A3
	BRA.b CODE_10BCD8

CODE_10BCC8:
	LDA.b $A5
	EOR.w #$0002
	STA.b $A5
	TAX
	JSR.w (DATA_10BCD9,x)
	LDA.w #$0005
	STA.b $A3
CODE_10BCD8:
	RTS

DATA_10BCD9:
	dw CODE_10BD06
	dw CODE_10BCDD

CODE_10BCDD:
	LDA.w #DATA_10BC2C>>16
	STA.b $01
	LDX.w DATA_10BC80,y
	LDA.w DATA_10BC86,y
	TAY
	LDA.w #$000E
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	PLA
	CLC
	ADC.w #$000E
	TAX
	LDA.w #$000E
	JSL.l CODE_00BEA6
	RTS

CODE_10BD06:
	LDA.w #DATA_10BC1E>>16
	STA.b $01
	LDX.w #DATA_10BC1E
	LDA.w DATA_10BC86,y
	TAY
	LDA.w #$000E
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	PLX
	LDA.w #$000E
	JSL.l CODE_00BEA6
	RTS

CODE_10BD2A:
	PHP
	SEP.b #$30
CODE_10BD2D:
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !REGISTER_Multiplicand
	TYA
	INC
	STA.w !REGISTER_Multiplier
	NOP #4
	LDX.w !REGISTER_ProductOrRemainderHi
	LDA.b $00,x
	STA.b ($2D),y
	STY.b $2F
CODE_10BD49:
	CPX.b $2F
	BEQ.b CODE_10BD54
	LDA.b $01,x
	STA.b $00,x
	INX
	BRA.b CODE_10BD49

CODE_10BD54:
	DEY
	BNE.b CODE_10BD2D
	LDA.b $00
	STA.b ($2D),y
	PLP
	RTS

CODE_10BD5D:
	LDA.w $10DE
	ASL
	TAX
	JMP.w (DATA_10BD65,x)

DATA_10BD65:
	dw CODE_10A41C
	dw CODE_10A427
	dw CODE_10A444
	dw CODE_10A466
	dw CODE_10A481
	dw CODE_10A4EC
	dw CODE_10A549
	dw CODE_10A5B3
	dw CODE_10BDB1
	dw CODE_10BDE8
	dw CODE_10C397
	dw CODE_10C219
	dw CODE_10A621

CODE_10BD7F:
	LDA.w #$0000
	STA.w $1138
	STA.w $113A
	STA.w $113C
	STZ.w $1148
	SEP.b #$20
	STZ.w $1141
	STZ.w $1142
	STZ.w $1143
	STZ.w $1144
	STZ.w $1145
	STZ.w $1146
	STZ.w $1147
	STZ.w $114A
	STZ.w $114B
	STZ.w $114C
	REP.b #$20
	RTS

CODE_10BDB1:
	LDA.w $1138
	BNE.b CODE_10BDC4
	LDX.w #$0008
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	BRA.b CODE_10BDCE

CODE_10BDC4:
	CMP.w #$0380
	BNE.b CODE_10BDCE
	INC.w $10DE
	BRA.b CODE_10BDDB

CODE_10BDCE:
	CLC
	ADC.w #$0010
	STA.w $1138
	STA.w $113A
	STA.w $113C
CODE_10BDDB:
	JSR.w CODE_10BF12
	JSR.w CODE_10BF2E
	JSR.w CODE_10C31D
	JSR.w CODE_10C017
	RTS

CODE_10BDE8:
	LDA.w $1138
	ORA.w $113A
	ORA.w $113C
	BNE.b CODE_10BE16
	JSR.w CODE_10C1B7
	LDA.w #$0080
	STA.w $10E0
	INC.w $10DE
	LDA.w $1148
	BEQ.b CODE_10BE11
	LDA.w #$0090
	STA.w $118A
	LDA.w #$0005
	STA.b !RAM_YI_Global_PlayMusicLo
	BRA.b CODE_10BE28

CODE_10BE11:
	INC.w $10DE
	BRA.b CODE_10BE28

CODE_10BE16:
	JSR.w CODE_10BE2C
	JSR.w CODE_10BEF2
	JSR.w CODE_10BF12
	JSR.w CODE_10BF2E
	JSR.w CODE_10C31D
	JSR.w CODE_10C16C
CODE_10BE28:
	JSR.w CODE_10C017
	RTS

CODE_10BE2C:
	SEP.b #$30
	LDA.w $114A
	BEQ.b CODE_10BE3D
	LDA.w $114B
	BEQ.b CODE_10BE3D
	LDA.w $114C
	BNE.b CODE_10BEBA
CODE_10BE3D:
	LDA.w $1141
	STA.b $00
	LDA.w $093F
	AND.b #$03
	BEQ.b CODE_10BE7A
	AND.b #$02
	BEQ.b CODE_10BE5C
	LDX.w $1141
CODE_10BE50:
	DEX
	BPL.b CODE_10BE55
	LDX.b #$02
CODE_10BE55:
	LDA.w $114A,x
	BNE.b CODE_10BE50
	BRA.b CODE_10BE6B

CODE_10BE5C:
	LDX.w $1141
CODE_10BE5F:
	INX
	CPX.b #$03
	BNE.b CODE_10BE66
	LDX.b #$00
CODE_10BE66:
	LDA.w $114A,x
	BNE.b CODE_10BE5F
CODE_10BE6B:
	STX.w $1141
	CPX.b $00
	BEQ.b CODE_10BEBA
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
	BRA.b CODE_10BEBA

CODE_10BE7A:
	LDA.w $093F
	AND.b #$C0
	BNE.b CODE_10BE88
	LDA.w $093E
	AND.b #$80
	BEQ.b CODE_10BEBA
CODE_10BE88:
	LDX.w $1141
	LDA.w $114A,x
	BNE.b CODE_10BEBA
	INC.w $114A,x
	JSR.w CODE_10BECF
	LDA.b #!Define_YI_SoundID33_StepOnNumberPlatform
	JSL.l CODE_0085D2
	REP.b #$30
	JSR.w CODE_10C33D
	SEP.b #$30
	LDX.w $1141
CODE_10BEA6:
	INX
	CPX.b #$03
	BNE.b CODE_10BEAD
	LDX.b #$00
CODE_10BEAD:
	CPX.w $1141
	BEQ.b CODE_10BEBA
	LDA.w $114A,x
	BNE.b CODE_10BEA6
	STX.w $1141
CODE_10BEBA:
	REP.b #$30
	RTS

DATA_10BEBD:
	db $02,$04,$06,$08,$0A,$0C

DATA_10BEC3:
	dw $0310,$02A0,$0230,$01C0,$0150,$00E0

CODE_10BECF:
	SEP.b #$30
	INC.w $1142,x
	LDY.w $1142,x
	DEY
	LDA.w DATA_10BEBD,y
	STA.w $1145,x
	REP.b #$20
	TXA
	ASL
	TAY
	LDA.w $1142,x
	DEC
	ASL
	TAX
	LDA.w DATA_10BEC3,x
	STA.w $1138,y
	SEP.b #$20
	RTS

CODE_10BEF2:
	SEP.b #$30
	LDX.b #$02
CODE_10BEF6:
	LDA.w $1142,x
	BEQ.b CODE_10BF0C
	DEC.w $1145,x
	BPL.b CODE_10BF0C
	LDA.w $1142,x
	CMP.b #$06
	BEQ.b CODE_10BF0C
	PHX
	JSR.w CODE_10BECF
	PLX
CODE_10BF0C:
	DEX
	BPL.b CODE_10BEF6
	REP.b #$30
	RTS

CODE_10BF12:
	LDX.w #$0004
CODE_10BF15:
	LDA.w $1132,x
	CLC
	ADC.w $1138,x
	STA.w $1132,x
	LDA.w $114E,x
	CLC
	ADC.w $1138,x
	STA.w $114E,x
	DEX
	DEX
	BPL.b CODE_10BF15
	RTS

CODE_10BF2E:
	SEP.b #$30
	LDX.b #$02
CODE_10BF32:
	TXA
	ASL
	TAY
	LDA.w $1133,y
	CMP.b #$58
	BNE.b CODE_10BF60
	LDA.w $1142,x
	CMP.b #$06
	BCC.b CODE_10BF60
	LDA.w $1145,x
	BPL.b CODE_10BF60
	REP.b #$20
	LDA.w #$0000
	STA.w $1138,y
	LDA.w #$5800
	STA.w $1132,y
	LDA.w #$5000
	STA.w $114E,y
	SEP.b #$20
	BRA.b CODE_10BF7C

CODE_10BF60:
	LDA.w $1133,y
	CMP.b #$68
	BCC.b CODE_10BF7C
	LDA.b #!Define_YI_SoundID06_SlotMachineSpin
	JSL.l CODE_0085D2
	JSR.w CODE_10BF82
	TXA
	ASL
	TAY
	LDA.w $1133,y
	SEC
	SBC.b #$20
	STA.w $1133,y
CODE_10BF7C:
	DEX
	BPL.b CODE_10BF32
	REP.b #$30
	RTS

CODE_10BF82:
	SEP.b #$30
	LDA.w $113E,x
	CLC
	ADC.b #$01
	AND.b #$07
	STA.w $113E,x
	TXA
	ASL
	ASL
	TAY
	LDA.w $1128,y
	STA.w $1129,y
	LDA.w $1127,y
	STA.w $1128,y
	LDA.w $1126,y
	STA.w $1127,y
	PHY
	TXA
	ASL
	ASL
	ASL
	CLC
	ADC.w $113E,x
	TAY
	LDA.w DATA_10BFB7,y
	PLY
	STA.w $1126,y
	RTS

DATA_10BFB7:
	db $00,$01,$02,$03,$04,$05,$00,$01,$01,$00,$03,$04,$05,$00,$01,$02
	db $02,$03,$04,$05,$00,$01,$02,$03

DATA_10BFCF:
	dw $0030,$0038,$0040,$0030,$0050,$0058,$0060,$0050
	dw $0070,$0078,$0080,$0070

DATA_10BFE7:
	dw $2100,$2111,$2102,$2120,$2103,$2114,$2105,$2123
	dw $2106,$2117,$2108,$2126,$2133,$2144,$2135,$2153
	dw $2136,$2147,$2138,$2156,$2130,$2141,$2132,$2150

CODE_10C017:
	LDY.w $6092
	LDA.w #$0000
	STA.b $00
CODE_10C01F:
	LDA.b $00
	ASL
	ASL
	ASL
	TAX
	LDA.w DATA_10BFCF,x
	STA.w $6000,y
	STA.w $6020,y
	STA.w $6040,y
	LDA.w DATA_10BFCF+$02,x
	STA.w $6008,y
	STA.w $6028,y
	STA.w $6048,y
	LDA.w DATA_10BFCF+$04,x
	STA.w $6010,y
	STA.w $6030,y
	STA.w $6050,y
	LDA.w DATA_10BFCF+$06,x
	STA.w $6018,y
	STA.w $6038,y
	STA.w $6058,y
	LDA.b $00
	ASL
	TAX
	LDA.w $1132,x
	XBA
	DEC
	AND.w #$00FF
	SEC
	SBC.b !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0008
	STA.w $6002,y
	STA.w $6012,y
	CLC
	ADC.w #$0008
	STA.w $600A,y
	CLC
	ADC.w #$0008
	STA.w $601A,y
	CLC
	ADC.w #$0010
	STA.w $6022,y
	STA.w $6032,y
	CLC
	ADC.w #$0008
	STA.w $602A,y
	CLC
	ADC.w #$0008
	STA.w $603A,y
	CLC
	ADC.w #$0010
	STA.w $6042,y
	STA.w $6052,y
	CLC
	ADC.w #$0008
	STA.w $604A,y
	CLC
	ADC.w #$0008
	STA.w $605A,y
	LDA.b $00
	ASL
	ASL
	STA.b $02
	TAX
	LDA.w $1126,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	TAX
	LDA.w DATA_10BFE7,x
	STA.w $6004,y
	LDA.w DATA_10BFE7+$02,x
	STA.w $600C,y
	LDA.w DATA_10BFE7+$04,x
	STA.w $6014,y
	LDA.w DATA_10BFE7+$06,x
	STA.w $601C,y
	LDX.b $02
	LDA.w $1127,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	TAX
	LDA.w DATA_10BFE7,x
	STA.w $6024,y
	LDA.w DATA_10BFE7+$02,x
	STA.w $602C,y
	LDA.w DATA_10BFE7+$04,x
	STA.w $6034,y
	LDA.w DATA_10BFE7+$06,x
	STA.w $603C,y
	LDX.b $02
	LDA.w $1128,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	TAX
	LDA.w DATA_10BFE7,x
	STA.w $6044,y
	LDA.w DATA_10BFE7+$02,x
	STA.w $604C,y
	LDA.w DATA_10BFE7+$04,x
	STA.w $6054,y
	LDA.w DATA_10BFE7+$06,x
	STA.w $605C,y
	LDA.w #$0002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6026,y
	STA.w $602E,y
	STA.w $6046,y
	STA.w $604E,y
	LDA.w #$0000
	STA.w $6016,y
	STA.w $601E,y
	STA.w $6036,y
	STA.w $603E,y
	STA.w $6056,y
	STA.w $605E,y
	INC.b $00
	LDA.b $00
	CMP.w #$0003
	BEQ.b CODE_10C159
	TYA
	CLC
	ADC.w #$0060
	TAY
	JMP.w CODE_10C01F

CODE_10C159:
	LDA.w $6092
	CLC
	ADC.w #$0120
	STA.w $6092
	JMP.w CODE_10C25C

DATA_10C166:
	dw $0034,$0054,$0074

CODE_10C16C:
	LDA.w $114D
	BEQ.b CODE_10C1B6
	LDY.w $6092
	LDA.w $1141
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_10C166,x
	STA.w $6000,y
	LDA.w #$00B0
	SEC
	SBC.b !RAM_YI_Global_Layer1YPosLo
	STA.w $6002,y
	LDA.w $093D
	AND.w #$00C0
	BNE.b CODE_10C19B
	LDA.w $093C
	AND.w #$0080
	BEQ.b CODE_10C1A0
CODE_10C19B:
	LDA.w #$3162
	BRA.b CODE_10C1A3

CODE_10C1A0:
	LDA.w #$3160
CODE_10C1A3:
	STA.w $6004,y
	LDA.w #$0002
	STA.w $6006,y
	LDA.w $6092
	CLC
	ADC.w #$0008
	STA.w $6092
CODE_10C1B6:
	RTS

CODE_10C1B7:
	SEP.b #$30
	LDA.w $1127
	CMP.b #$02
	BNE.b CODE_10C1D0
	LDA.w $112B
	CMP.b #$03
	BNE.b CODE_10C1D0
	LDA.w $112F
	CMP.b #$04
	BNE.b CODE_10C204
	BRA.b CODE_10C1F5

CODE_10C1D0:
	LDA.w $1127
	CMP.w $112B
	BNE.b CODE_10C204
	CMP.w $112F
	BNE.b CODE_10C204
	CMP.b #$00
	BNE.b CODE_10C1E5
	LDA.b #$02
	BRA.b CODE_10C1F7

CODE_10C1E5:
	CMP.b #$01
	BNE.b CODE_10C1ED
	LDA.b #$03
	BRA.b CODE_10C1F7

CODE_10C1ED:
	CMP.b #$05
	BNE.b CODE_10C1F5
	LDA.b #$05
	BRA.b CODE_10C1F7

CODE_10C1F5:
	LDA.b #$01
CODE_10C1F7:
	STA.w $1148
	REP.b #$30
	LDX.w #$0004
	STX.w $10F0
	BRA.b CODE_10C212

CODE_10C204:
	LDA.b #!Define_YI_SoundID7D_YoshiLostChallenge
	JSL.l CODE_0085D2
	REP.b #$30
	LDX.w #$0006
	STX.w $10F0
CODE_10C212:
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	RTS

CODE_10C219:
	DEC.w $10E0
	BNE.b CODE_10C252
	LDA.w $1148
	AND.w #$00FF
	BNE.b CODE_10C231
CODE_10C226:
	LDA.w #$0080
	STA.w $10E0
	INC.w $10DE
	BRA.b CODE_10C252

CODE_10C231:
	LDA.w !RAM_YI_Level_CurrentLifeCountLo
	CMP.w #$03E7
	BEQ.b CODE_10C226
	DEC.w $1148
	INC.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	SEP.b #$20
	LDA.b #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	REP.b #$20
	LDA.w #$0030
	STA.w $10E0
CODE_10C252:
	JSR.w CODE_10C017
	RTS

DATA_10C256:
	dw $0030,$0050,$0070

CODE_10C25C:
	LDY.w $6092
	LDA.w #$0000
	STA.b $00
CODE_10C264:
	LDA.b $00
	ASL
	TAX
	LDA.w DATA_10C256,x
	STA.w $6000,y
	STA.w $6018,y
	STA.w $6030,y
	CLC
	ADC.w #$0008
	STA.w $6008,y
	STA.w $6020,y
	STA.w $6038,y
	CLC
	ADC.w #$0008
	STA.w $6010,y
	STA.w $6028,y
	STA.w $6040,y
	LDA.b $00
	ASL
	TAX
	LDA.w $114E,x
	XBA
	DEC
	AND.w #$00FF
	SEC
	SBC.b !RAM_YI_Global_Layer1YPosLo
	SEC
	SBC.w #$0008
	STA.w $6002,y
	STA.w $600A,y
	STA.w $6012,y
	CLC
	ADC.w #$0020
	STA.w $601A,y
	STA.w $6022,y
	STA.w $602A,y
	CLC
	ADC.w #$0020
	STA.w $6032,y
	STA.w $603A,y
	STA.w $6042,y
	LDA.w #$2D68
	STA.w $6004,y
	STA.w $600C,y
	STA.w $6014,y
	STA.w $601C,y
	STA.w $6024,y
	STA.w $602C,y
	STA.w $6034,y
	STA.w $603C,y
	STA.w $6044,y
	LDA.w #$0000
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	STA.w $6026,y
	STA.w $602E,y
	STA.w $6036,y
	STA.w $603E,y
	STA.w $6046,y
	INC.b $00
	LDA.b $00
	CMP.w #$0003
	BEQ.b CODE_10C312
	TYA
	CLC
	ADC.w #$0080
	TAY
	JMP.w CODE_10C264

CODE_10C312:
	LDA.w $6092
	CLC
	ADC.w #$0090
	STA.w $6092
	RTS

CODE_10C31D:
	LDX.w #$0004
CODE_10C320:
	LDA.w $114E,x
	CMP.w #$6800
	BCC.b CODE_10C332
	LDA.w $114E,x
	SEC
	SBC.w #$2000
	STA.w $114E,x
CODE_10C332:
	DEX
	DEX
	BPL.b CODE_10C320
	RTS

DATA_10C337:
	dw $6AA6,$6AAA,$6AAE

CODE_10C33D:
	LDA.w $1141
	AND.w #$00FF
	ASL
	TAY
	LDA.l $7E4000
	TAX
	LDA.w DATA_10C337,y
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E400C,x
	LDA.w #$0005
	STA.l $7E4004,x
	STA.l $7E400E,x
	LDA.w #$3CF4
	STA.l $7E4006,x
	INC
	STA.l $7E4008,x
	INC
	STA.l $7E400A,x
	LDA.w #$3CF7
	STA.l $7E4010,x
	INC
	STA.l $7E4012,x
	INC
	STA.l $7E4014,x
	LDA.w #$FFFF
	STA.l $7E4016,x
	TXA
	CLC
	ADC.w #$0014
	STA.l $7E4000
CODE_10C396:
	RTS

CODE_10C397:
	JSR.w CODE_10C017
	DEC.w $118A
	BPL.b CODE_10C3A9
	LDA.w #$0001
	STA.w $10E0
	INC.w $10DE
	RTS

CODE_10C3A9:
	LDA.w $1148
	AND.w #$00FF
	DEC
	ASL
	TAX
	JMP.w (DATA_10C3B5,x)

DATA_10C3B5:
	dw CODE_10C421
	dw CODE_10C3C9
	dw CODE_10C3C9
	dw CODE_10C396
	dw CODE_10C3C9

DATA_10C3BF:
	dw $69F3,$69B3,$6973

DATA_10C3C5:
	dw $0000,$2CFC

CODE_10C3C9:
	LDA.w $1148
	AND.w #$00FF
	SEC
	SBC.w #$0002
	CMP.w #$0003
	BNE.b CODE_10C3D9
	DEC
CODE_10C3D9:
	ASL
	TAY
	LDA.l $7E4000
	TAX
	LDA.w DATA_10C3BF,y
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E4008,x
	LDA.w #$000E
	ORA.w #$4000
	STA.l $7E4004,x
	STA.l $7E400A,x
	LDA.w $118A
	AND.w #$0004
	LSR
	TAY
	LDA.w DATA_10C3C5,y
	STA.l $7E4006,x
	STA.l $7E400C,x
	LDA.w #$FFFF
	STA.l $7E400E,x
	TXA
	CLC
	ADC.w #$000C
	STA.l $7E4000
	RTS

CODE_10C421:
	LDA.l $7E4000
	TAX
	LDA.w #$6A33
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E4008,x
	CLC
	ADC.w #$0020
	STA.l $7E400E,x
	CLC
	ADC.w #$0020
	STA.l $7E4014,x
	CLC
	ADC.w #$0020
	STA.l $7E401A,x
	LDA.w #$000E
	ORA.w #$4000
	STA.l $7E4004,x
	STA.l $7E400A,x
	STA.l $7E4010,x
	STA.l $7E4016,x
	STA.l $7E401C,x
	LDA.w $118A
	AND.w #$0004
	LSR
	TAY
	LDA.w DATA_10C3C5,y
	STA.l $7E4006,x
	STA.l $7E400C,x
	STA.l $7E4012,x
	STA.l $7E4018,x
	STA.l $7E401E,x
	LDA.w #$FFFF
	STA.l $7E4020,x
	TXA
	CLC
	ADC.w #$001E
	STA.l $7E4000
	RTS

CODE_10C497:
	LDA.w $10DE
	ASL
	TAX
	JMP.w (DATA_10C49F,x)

DATA_10C49F:
	dw CODE_10A41C
	dw CODE_10A427
	dw CODE_10A444
	dw CODE_10A466
	dw CODE_10A481
	dw CODE_10A4EC
	dw CODE_10A549
	dw CODE_10A5B3
	dw CODE_10C4BF
	dw CODE_10A621

DATA_10C4B3:
	db CODE_10C4E3,CODE_10C574,CODE_10C5AF,CODE_10C61C

DATA_10C4B7:
	db CODE_10C4E3>>8,CODE_10C574>>8,CODE_10C5AF>>8,CODE_10C61C>>8

DATA_10C4BB:
	db CODE_10C4E3>>16,CODE_10C574>>16,CODE_10C5AF>>16,CODE_10C61C>>16

CODE_10C4BF:
	SEP.b #$30
	JSL.l CODE_10C4CB
	JSR.w CODE_10CC3A
	REP.b #$30
	RTS

CODE_10C4CB:
	LDX.w $1165
	LDA.l DATA_10C4B3,x
	STA.b $03
	LDA.l DATA_10C4B7,x
	STA.b $04
	LDA.l DATA_10C4BB,x
	STA.b $05
	JMP.w [$0003]

CODE_10C4E3:
	LDA.b $37
	AND.b #$80
	BNE.b CODE_10C4EF
	LDA.b $38
	BIT.b #$C0
	BEQ.b CODE_10C511
CODE_10C4EF:
	SEP.b #$20
	LDA.b #$01
	STA.w $1165
	LDA.b #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	REP.b #$30
	LDA.w #$0008
	STA.w $10F0
	TAY
	LDA.w DATA_10A2DD,y
	JSR.w CODE_10A39A
	SEP.b #$30
	JSR.w CODE_10C641
	RTL

CODE_10C511:
	AND.b #$0C
	BNE.b CODE_10C52C
	LDA.b $36
	AND.b #$0C
	BNE.b CODE_10C51F
	STZ.w $117E
	RTL

CODE_10C51F:
	INC.w $117E
	LDX.w $117E
	CPX.b #$20
	BNE.b CODE_10C573
	DEC.w $117E
CODE_10C52C:
	STA.b $0F
	LDA.w $117E
	CMP.b #$1F
	BNE.b CODE_10C53B
	LDA.b $30
	AND.b #$01
	BEQ.b CODE_10C554
CODE_10C53B:
	LDA.w $1177
	BNE.b CODE_10C54E
	LDA.w $1176
	CMP.b #$01
	BNE.b CODE_10C54E
	LDA.w $1178
	CMP.b #$01
	BEQ.b CODE_10C557
CODE_10C54E:
	LDA.b #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
CODE_10C554:
	JSR.w CODE_10C8CE
CODE_10C557:
	REP.b #$30
	LDA.w $1178
	AND.w #$00FF
	STA.b $00
	LDA.w $1176
	SEC
	SBC.b $00
	INC
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	JSR.w CODE_109D74
	SEP.b #$30
	JSR.w CODE_10CC80
CODE_10C573:
	RTL

CODE_10C574:
	LDA.w $1183
	BNE.b CODE_10C590
	LDA.b $37
	AND.b #$80
	BNE.b CODE_10C585
	LDA.b $38
	AND.b #$C0
	BEQ.b CODE_10C590
CODE_10C585:
	INC.w $1183
	LDA.b #$50
	STA.w $1168
	STA.w $1169
CODE_10C590:
	LDX.b #$00
CODE_10C592:
	LDA.w $1174
	DEC
	STA.b $00
	CPX.b $00
	BEQ.b CODE_10C59F
	JSR.w CODE_10C917
CODE_10C59F:
	INX
	CPX.b #$02
	BNE.b CODE_10C592
	REP.b #$30
	JSR.w CODE_109D74
	SEP.b #$30
	JSR.w CODE_10CC80
	RTL

CODE_10C5AF:
	DEC.w $1180
	BNE.b CODE_10C61B
	JSR.w CODE_10C624
	LDA.b #$40
	STA.w $1180
	INC.w $117F
	LDA.w $117F
	CMP.b #$01
	BNE.b CODE_10C61B
	LDA.b #$03
	STA.w $1165
	REP.b #$20
	LDA.w #$0040
	STA.w $10E0
	LDA.w $117C
	STA.w $1148
	SEP.b #$20
	BEQ.b CODE_10C5F0
	LDA.w $117D
	BNE.b CODE_10C5EA
	LDA.w $1178
	CMP.w $117C
	BCS.b CODE_10C5F6
CODE_10C5EA:
	LDA.b #$05
	STA.b !RAM_YI_Global_PlayMusicLo
	BRA.b CODE_10C5F6

CODE_10C5F0:
	LDA.b #!Define_YI_SoundID7D_YoshiLostChallenge
	JSL.l CODE_0085D2
CODE_10C5F6:
	REP.b #$30
	LDX.w #$0004
	LDA.w $1178
	AND.w #$00FF
	CMP.w $117C
	BCC.b CODE_10C610
	PHP
	LDX.w #$0000
	PLP
	BEQ.b CODE_10C610
	LDX.w #$0006
CODE_10C610:
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	SEP.b #$30
CODE_10C61B:
	RTL

CODE_10C61C:
	REP.b #$30
	JSR.w CODE_10B9F8
	SEP.b #$30
	RTL

CODE_10C624:
	LDA.w $117F
	JSL.l CODE_008365

DATA_10C62B:
	dw CODE_10C7B2
	dw CODE_10C6C5

DATA_10C62F:
	dw $39F5,$0003,$2CFC,$2CFC,$3A15,$0003,$2CFC,$2CFC
	dw $FFFF

CODE_10C641:
	LDA.w $1178
	STA.b $0E
	STZ.b $0F
	JSR.w CODE_10CD09
	STZ.b $03
	STZ.b $05
	LDA.w $1179
	ASL
	STA.b $04
	LDA.w $117A
	ASL
	STA.b $02
	REP.b #$30
	LDA.l $7E4000
	CLC
	ADC.w #$0011
	TAX
	DEC
	STA.l $7E4000
	LDY.w #$0011
	SEP.b #$20
CODE_10C670:
	LDA.w DATA_10C62F,y
	STA.l $7E4002,x
	DEX
	DEY
	BPL.b CODE_10C670
	REP.b #$20
	LDA.l $7E4000
	SEC
	SBC.w #$000C
	TAX
	LDY.b $02
	BEQ.b CODE_10C694
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4002,x
CODE_10C694:
	LDY.b $04
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4004,x
	LDA.l $7E4000
	SEC
	SBC.w #$0004
	TAX
	LDY.b $02
	BEQ.b CODE_10C6B7
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4002,x
CODE_10C6B7:
	LDY.b $04
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4004,x
	SEP.b #$30
CODE_10C6C5:
	RTS

DATA_10C6C6:
	db $F7,$39,$01,$00,$FC,$2C,$17,$3A,$01,$00,$FC,$2C,$FF,$FF

DATA_10C6D4:
	dw $3EF8,$3EF6

DATA_10C6D8:
	dw $3EF9,$3EF7

CODE_10C6DC:
	PHX
	REP.b #$30
	LDA.l $7E4000
	CLC
	ADC.w #$000D
	TAX
	DEC
	STA.l $7E4000
	LDY.w #$000D
	SEP.b #$20
CODE_10C6F2:
	LDA.w DATA_10C6C6,y
	STA.l $7E4002,x
	DEX
	DEY
	BPL.b CODE_10C6F2
	LDA.w $1166
	TAY
	LDA.w DATA_10C869,y
	ASL
	TAY
	REP.b #$20
	LDA.l $7E4000
	SEC
	SBC.w #$0008
	TAX
	LDA.w DATA_10C6D4,y
	STA.l $7E4002,x
	LDA.l $7E4000
	SEC
	SBC.w #$0002
	TAX
	LDA.w DATA_10C6D8,y
	STA.l $7E4002,x
	SEP.b #$30
	PLX
	RTS

DATA_10C72C:
	db $F8,$39,$01,$00,$FC,$2C,$18,$3A,$01,$00,$FC,$2C,$FF,$FF

CODE_10C73A:
	PHX
	STZ.b $03
	LDY.w $1167
	LDA.w DATA_10C877,y
	ASL
	STA.b $02
	REP.b #$30
	LDA.l $7E4000
	CLC
	ADC.w #$000D
	TAX
	DEC
	STA.l $7E4000
	LDY.w #$000D
	SEP.b #$20
CODE_10C75B:
	LDA.w DATA_10C72C,y
	STA.l $7E4002,x
	DEX
	DEY
	BPL.b CODE_10C75B
	REP.b #$20
	LDA.l $7E4000
	SEC
	SBC.w #$0008
	TAX
	LDY.b $02
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4002,x
	LDA.l $7E4000
	SEC
	SBC.w #$0002
	TAX
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4002,x
	SEP.b #$30
	PLX
	RTS

DATA_10C794:
	db $35,$3A,$09,$00,$FC,$2C,$FC,$2C,$FC,$2C,$9C,$3E,$9D,$3E,$55,$3A
	db $09,$00,$FC,$2C,$FC,$2C,$FC,$2C,$9E,$3E,$9F,$3E,$FF,$FF

CODE_10C7B2:
	JSR.w CODE_10C885
	LDA.w $117C
	STA.b $0E
	LDA.w $117D
	STA.b $0F
	JSR.w CODE_10CD09
	STZ.b $01
	STZ.b $03
	STZ.b $05
	LDA.w $1179
	ASL
	STA.b $04
	LDA.w $117A
	ASL
	STA.b $02
	LDA.w $117B
	ASL
	STA.b $00
	REP.b #$30
	LDA.l $7E4000
	CLC
	ADC.w #$001D
	TAX
	DEC
	STA.l $7E4000
	LDY.w #$001D
	SEP.b #$20
CODE_10C7EF:
	LDA.w DATA_10C794,y
	STA.l $7E4002,x
	DEX
	DEY
	BPL.b CODE_10C7EF
	REP.b #$20
	LDA.l $7E4000
	SEC
	SBC.w #$0018
	TAX
	LDY.b $00
	BEQ.b CODE_10C813
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4002,x
CODE_10C813:
	LDY.b $02
	BNE.b CODE_10C81B
	LDA.b $00
	BEQ.b CODE_10C825
CODE_10C81B:
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4004,x
CODE_10C825:
	LDY.b $04
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4006,x
	LDA.l $7E4000
	SEC
	SBC.w #$000A
	TAX
	LDY.b $00
	BEQ.b CODE_10C848
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4002,x
CODE_10C848:
	LDY.b $02
	BNE.b CODE_10C850
	LDA.b $00
	BEQ.b CODE_10C85A
CODE_10C850:
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4004,x
CODE_10C85A:
	LDY.b $04
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4006,x
	SEP.b #$30
	RTS

DATA_10C869:
	dw $0001,$0100,$0100,$0100,$0000,$0001,$0001

DATA_10C877:
	dw $0003,$0001,$0002,$0001,$0002,$0001,$0001

CODE_10C885:
	LDX.w $1166
	LDA.w DATA_10C869,x
	JSL.l CODE_008365

DATA_10C88F:
	dw CODE_10C893
	dw CODE_10C8A4

CODE_10C893:
	STZ.w $117D
	LDY.w $1167
	LDA.w $1178
	CLC
	ADC.w DATA_10C877,y
	STA.w $117C
	RTS

CODE_10C8A4:
	STZ.b $00
	STZ.b $01
	LDY.w $1167
	LDX.w DATA_10C877,y
	BEQ.b CODE_10C8C2
	LDA.w $1178
CODE_10C8B3:
	DEX
	BEQ.b CODE_10C8C0
	CLC
	ADC.w $1178
	BCC.b CODE_10C8BE
	INC.b $01
CODE_10C8BE:
	BRA.b CODE_10C8B3

CODE_10C8C0:
	STA.b $00
CODE_10C8C2:
	REP.b #$20
	LDA.b $00
	STA.w $117C
	SEP.b #$20
	RTS

DATA_10C8CC:
	db $FF,$01

CODE_10C8CE:
	REP.b #$20
	LDA.w #$0063
	STA.b $00
	INC
	STA.b $02
	LDA.w $1176
	CMP.w #$0063
	BCS.b CODE_10C8E5
	STA.b $00
	INC
	STA.b $02
CODE_10C8E5:
	SEP.b #$20
	LDA.b $0F
	LSR
	LSR
	DEC
	TAX
	LDA.w $1178
	CLC
	ADC.w DATA_10C8CC,x
	STA.w $1178
	CMP.b $02
	BNE.b CODE_10C901
	LDA.b #$01
	STA.w $1178
	RTS

CODE_10C901:
	CMP.b #$00
	BNE.b CODE_10C90A
	LDA.b $00
	STA.w $1178
CODE_10C90A:
	RTS

DATA_10C90B:
	db $01,$03

DATA_10C90D:
	db $01,$01

DATA_10C90F:
	db $0E,$0E

DATA_10C911:
	db $00,$00

DATA_10C913:
	db $0D,$0D

DATA_10C915:
	db $08,$04

CODE_10C917:
	LDA.w $1183
	BEQ.b CODE_10C934
	LDA.w $116E,x
	BEQ.b CODE_10C92A
	CMP.b #$01
	BEQ.b CODE_10C945
	DEC.w $116E,x
	BRA.b CODE_10C960

CODE_10C92A:
	LDA.b $30
	AND.w DATA_10C90B,x
	BNE.b CODE_10C934
	DEC.w $1168,x
CODE_10C934:
	LDA.w $1168,x
	BEQ.b CODE_10C96C
	CMP.w DATA_10C915,x
	BNE.b CODE_10C960
	LDA.b #$50
	STA.w $116E,x
	BRA.b CODE_10C960

CODE_10C945:
	TXA
	INC
	ORA.w $1174
	STA.w $1174
	AND.b #$03
	CMP.b #$03
	BNE.b CODE_10C95C
	LDA.b #$02
	STA.w $1165
	JSR.w CODE_10C73A
	RTS

CODE_10C95C:
	JSR.w CODE_10C6DC
	RTS

CODE_10C960:
	LDA.w $1168,x
	CLC
	ADC.w $116A,x
	STA.w $116A,x
	BCC.b CODE_10C9B0
CODE_10C96C:
	TXY
	PHY
	LDA.b #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	PLY
	LDA.w $1166,x
	CLC
	ADC.w DATA_10C90D,y
	CMP.w DATA_10C90F,y
	BNE.b CODE_10C984
	LDA.w DATA_10C911,y
CODE_10C984:
	STA.w $1166,x
	DEC
	BPL.b CODE_10C98D
	LDA.w DATA_10C913,y
CODE_10C98D:
	STA.w $116C,x
	LDA.b #$00
	CPX.b #$00
	BEQ.b CODE_10C998
	LDA.b #$10
CODE_10C998:
	STA.b $0F
	LDY.b #$00
	LDA.w $1166,x
	STA.w $1175
CODE_10C9A2:
	JSR.w CODE_10CBB9
	LDA.w $116C,x
	STA.w $1175
	INY
	CPY.b #$02
	BNE.b CODE_10C9A2
CODE_10C9B0:
	RTS

DATA_10C9B1:
	dw $3A2D,$0003

DATA_10C9B5:
	dw $3A6C,$0003

DATA_10C9B9:
	dw $3A8A,$0003

DATA_10C9BD:
	dw $3A88,$0003

DATA_10C9C1:
	dw $3A86,$0003

DATA_10C9C5:
	dw $3A64,$0003

DATA_10C9C9:
	dw $3A23,$0003

DATA_10C9CD:
	dw $39E3,$0003

DATA_10C9D1:
	dw $39A4,$0003

DATA_10C9D5:
	dw $3986,$0003

DATA_10C9D9:
	dw $3988,$0003

DATA_10C9DD:
	dw $398A,$0003

DATA_10C9E1:
	dw $39AC,$0003

DATA_10C9E5:
	dw $39ED,$0003

DATA_10C9E9:
	dw $3A31,$0003

DATA_10C9ED:
	dw $39F1,$0003

DATA_10C9F1:
	dw $39B2,$0003

DATA_10C9F5:
	dw $3994,$0003

DATA_10C9F9:
	dw $3996,$0003

DATA_10C9FD:
	dw $3998,$0003

DATA_10CA01:
	dw $39BA,$0003

DATA_10CA05:
	dw $39FB,$0003

DATA_10CA09:
	dw $3A3B,$0003

DATA_10CA0D:
	dw $3A7A,$0003

DATA_10CA11:
	dw $3A98,$0003

DATA_10CA15:
	dw $3A96,$0003

DATA_10CA19:
	dw $3A94,$0003

DATA_10CA1D:
	dw $3A72,$0003

DATA_10CA21:
	dw $2283,$6283

DATA_10CA25:
	dw $6288,$2288

DATA_10CA29:
	dw $A285,$E285

DATA_10CA2D:
	dw $E28A,$A28A

DATA_10CA31:
	dw $6288,$2288

DATA_10CA35:
	dw $2283,$6283

DATA_10CA39:
	dw $A289,$E289

DATA_10CA3D:
	dw $6284,$2284

DATA_10CA41:
	dw $E28A,$A28A

DATA_10CA45:
	dw $A285,$E285

DATA_10CA49:
	dw $2287,$6287

DATA_10CA4D:
	dw $6288,$2288

DATA_10CA51:
	dw $E286,$A286

DATA_10CA55:
	dw $A289,$E289

DATA_10CA59:
	dw $228B,$628B

DATA_10CA5D:
	dw $228C,$228D

DATA_10CA61:
	dw $228B,$628B

DATA_10CA65:
	dw $228C,$228D

DATA_10CA69:
	dw $228B,$628B

DATA_10CA6D:
	dw $2291,$2292

DATA_10CA71:
	dw $228B,$628B

DATA_10CA75:
	dw $228C,$228D

DATA_10CA79:
	dw $228B,$628B

DATA_10CA7D:
	dw $228E,$228F

DATA_10CA81:
	dw $228B,$628B

DATA_10CA85:
	dw $228C,$228D

DATA_10CA89:
	dw $228B,$628B

DATA_10CA8D:
	dw $228E,$228F

DATA_10CA91:
	dw $A283,$E283

DATA_10CA95:
	dw $E288,$A288

DATA_10CA99:
	dw $2285,$6285

DATA_10CA9D:
	dw $628A,$228A

DATA_10CAA1:
	dw $E288,$A288

DATA_10CAA5:
	dw $A283,$E283

DATA_10CAA9:
	dw $2289,$6289

DATA_10CAAD:
	dw $E284,$A284

DATA_10CAB1:
	dw $628A,$228A

DATA_10CAB5:
	dw $2285,$6285

DATA_10CAB9:
	dw $A287,$E287

DATA_10CABD:
	dw $E288,$A288

DATA_10CAC1:
	dw $6286,$2286

DATA_10CAC5:
	dw $2289,$6289

DATA_10CAC9:
	dw $A28B,$E28B

DATA_10CACD:
	dw $E28D,$A28D

DATA_10CAD1:
	dw $A28B,$E28B

DATA_10CAD5:
	dw $E28D,$A28D

DATA_10CAD9:
	dw $A28B,$E28B

DATA_10CADD:
	dw $A291,$2293

DATA_10CAE1:
	dw $A28B,$E28B

DATA_10CAE5:
	dw $E28D,$A28D

DATA_10CAE9:
	dw $A28B,$E28B

DATA_10CAED:
	dw $2290,$E28E

DATA_10CAF1:
	dw $A28B,$E28B

DATA_10CAF5:
	dw $E28D,$A28D

DATA_10CAF9:
	dw $A28B,$E28B

DATA_10CAFD:
	dw $2290,$E28E

DATA_10CB01:
	dw DATA_10C9D5,DATA_10C9D9,DATA_10C9DD,DATA_10C9E1,DATA_10C9E5,DATA_10C9B1,DATA_10C9B5,DATA_10C9B9
	dw DATA_10C9BD,DATA_10C9C1,DATA_10C9C5,DATA_10C9C9,DATA_10C9CD,DATA_10C9D1,DATA_10C9B1,DATA_10C9B1
	dw DATA_10C9FD,DATA_10CA01,DATA_10CA05,DATA_10CA09,DATA_10CA0D,DATA_10CA11,DATA_10CA15,DATA_10CA19
	dw DATA_10CA1D,DATA_10C9E9,DATA_10C9ED,DATA_10C9F1,DATA_10C9F5,DATA_10C9F9

DATA_10CB3D:
	dw DATA_10CA45,DATA_10CA49,DATA_10CA4D,DATA_10CA51,DATA_10CA55,DATA_10CA21,DATA_10CA25,DATA_10CA29
	dw DATA_10CA2D,DATA_10CA31,DATA_10CA35,DATA_10CA39,DATA_10CA3D,DATA_10CA41,DATA_10CA21,DATA_10CA21
	dw DATA_10CA6D,DATA_10CA71,DATA_10CA75,DATA_10CA79,DATA_10CA7D,DATA_10CA81,DATA_10CA85,DATA_10CA89
	dw DATA_10CA8D,DATA_10CA59,DATA_10CA5D,DATA_10CA61,DATA_10CA65,DATA_10CA69

DATA_10CB79:
	dw DATA_10CAB5,DATA_10CAB9,DATA_10CABD,DATA_10CAC1,DATA_10CAC5,DATA_10CA91,DATA_10CA95,DATA_10CA99
	dw DATA_10CA9D,DATA_10CAA1,DATA_10CAA5,DATA_10CAA9,DATA_10CAAD,DATA_10CAB1,DATA_10CA91,DATA_10CA91
	dw DATA_10CADD,DATA_10CAE1,DATA_10CAE5,DATA_10CAE9,DATA_10CAED,DATA_10CAF1,DATA_10CAF5,DATA_10CAF9
	dw DATA_10CAFD,DATA_10CAC9,DATA_10CACD,DATA_10CAD1,DATA_10CAD5,DATA_10CAD9

DATA_10CBB5:
	dw $0800,$1C00

CODE_10CBB9:
	REP.b #$20
	PHX
	PHY
	TYA
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_10CBB5,y
	STA.b $06
	LDA.w $1175
	AND.w #$00FF
	ORA.b $0F
	ASL
	TAX
	LDA.w DATA_10CB01,x
	STA.b $00
	LDA.w DATA_10CB3D,x
	STA.b $02
	LDA.w DATA_10CB79,x
	STA.b $04
	REP.b #$10
	LDA.l $7E4000
	TAX
	LDY.w #$0000
CODE_10CBEB:
	LDA.b ($00),y
	STA.l $7E4002,x
	CPY.w #$0000
	BNE.b CODE_10CBFA
	CLC
	ADC.w #$0020
CODE_10CBFA:
	STA.l $7E400A,x
	INX
	INX
	INY
	INY
	CPY.w #$0004
	BNE.b CODE_10CBEB
	LDY.w #$0000
CODE_10CC0A:
	LDA.b ($02),y
	ORA.b $06
	STA.l $7E4002,x
	LDA.b ($04),y
	ORA.b $06
	STA.l $7E400A,x
	INX
	INX
	INY
	INY
	CPY.w #$0004
	BNE.b CODE_10CC0A
	INX
	INX
	LDA.w #$FFFF
	STA.l $7E4008,x
	TXA
	CLC
	ADC.w #$0006
	STA.l $7E4000
	SEP.b #$30
	PLY
	PLX
	RTS

CODE_10CC3A:
	LDA.w $1174
	BEQ.b CODE_10CC6D
	LDX.b #$01
	AND.b #$02
	BNE.b CODE_10CC47
	LDX.b #$00
CODE_10CC47:
	LDA.b #$00
	CPX.b #$00
	BEQ.b CODE_10CC4F
	LDA.b #$10
CODE_10CC4F:
	STA.b $0F
	LDY.b #$00
	LDA.w $10DE
	CMP.b #$09
	BEQ.b CODE_10CC61
	LDA.b $30
	AND.b #$01
	BNE.b CODE_10CC61
	INY
CODE_10CC61:
	LDA.w $1166,x
	STA.w $1175
	JSR.w CODE_10CBB9
	DEX
	BPL.b CODE_10CC47
CODE_10CC6D:
	RTS

DATA_10CC6E:
	db $09,$3A,$03,$00,$FC,$2C,$FC,$2C,$29,$3A,$03,$00,$FC,$2C,$FC,$2C
	db $FF,$FF

CODE_10CC80:
	LDA.w $1178
	STA.b $0E
	STZ.b $0F
	JSR.w CODE_10CD09
	STZ.b $03
	STZ.b $05
	LDA.w $1179
	ASL
	STA.b $04
	LDA.w $117A
	ASL
	STA.b $02
	REP.b #$30
	LDA.l $7E4000
	CLC
	ADC.w #$0011
	TAX
	DEC
	STA.l $7E4000
	LDY.w #$0011
	SEP.b #$20
CODE_10CCAF:
	LDA.w DATA_10CC6E,y
	STA.l $7E4002,x
	DEX
	DEY
	BPL.b CODE_10CCAF
	REP.b #$20
	LDA.l $7E4000
	SEC
	SBC.w #$000C
	TAX
	LDA.b $02
	BEQ.b CODE_10CCD5
	LDY.b $02
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4002,x
CODE_10CCD5:
	LDY.b $04
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4004,x
	LDA.l $7E4000
	SEC
	SBC.w #$0004
	TAX
	LDA.b $02
	BEQ.b CODE_10CCFA
	LDY.b $02
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4002,x
CODE_10CCFA:
	LDY.b $04
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
	STA.l $7E4004,x
	SEP.b #$30
	RTS

CODE_10CD09:
	STZ.w $117B
	STZ.w $117A
	STZ.w $1179
	REP.b #$20
	LDA.b $0E
	CMP.w #$0100
	BCC.b CODE_10CD31
	STZ.b $00
CODE_10CD1D:
	CMP.w #$0064
	BCC.b CODE_10CD2A
	INC.b $00
	SEC
	SBC.w #$0064
	BRA.b CODE_10CD1D

CODE_10CD2A:
	SEP.b #$20
	LDX.b $00
	STX.w $117B
CODE_10CD31:
	SEP.b #$20
	CMP.b #$64
	BCC.b CODE_10CD3F
	INC.w $117B
	SEC
	SBC.b #$64
	BRA.b CODE_10CD31

CODE_10CD3F:
	CMP.b #$0A
	BCC.b CODE_10CD4B
	INC.w $117A
	SEC
	SBC.b #$0A
	BRA.b CODE_10CD3F

CODE_10CD4B:
	STA.w $1179
	RTS

CODE_10CD4F:
	LDA.w $10DE
	ASL
	TAX
	JMP.w (DATA_10CD57,x)

DATA_10CD57:
	dw CODE_10A41C
	dw CODE_10A427
	dw CODE_10A444
	dw CODE_10A466
	dw CODE_10A481
	dw CODE_10A4EC
	dw CODE_10A549
	dw CODE_10A5B3
	dw CODE_10CF39
	dw CODE_10CFF2
	dw CODE_10D0B8
	dw CODE_10D0C1
	dw CODE_10A621

DATA_10CD71:
	dw $0000,$0090,$0120,$01B0,$0240,$02D0

DATA_10CD7D:
	db $50,$78,$A0,$50,$78,$A0

DATA_10CD83:
	db $68,$68,$68,$90,$90,$90

DATA_10CD89:
	db $03,$03,$03,$FD,$FD,$FD,$00,$01,$02,$03,$04,$05,$06,$07,$08

DATA_10CD98:
	dw $7E39AA,$7E39AF,$7E39B4,$7E3A4A,$7E3A4F,$7E3A54

CODE_10CDA4:
	SEP.b #$30
	LDA.b #$00
	STA.w $1114
	TAY
	LDA.w DATA_10CD7D,y
	STA.w $10F6
	LDA.w DATA_10CD83,y
	STA.w $10F7
	LDX.b #$08
	TXY
CODE_10CDBB:
	TXA
	STA.b $00,x
	DEX
	BPL.b CODE_10CDBB
	LDA.b #$04
	STA.b $2D
	LDA.b #$11
	STA.b $2E
	JSR.w CODE_10BD2A
	LDX.b #$05
	TXY
CODE_10CDCF:
	TXA
	STA.b $00,x
	DEX
	BPL.b CODE_10CDCF
	LDA.b #$15
	STA.b $2D
	LDA.b #$11
	STA.b $2E
	JSR.w CODE_10BD2A
	LDY.b #$02
	LDA.w $0381
	CMP.b #$32
	BCS.b CODE_10CDEB
	LDY.b #$00
CODE_10CDEB:
	LDA.b #$09
CODE_10CDED:
	LDX.w $1115,y
	STA.w $1104,x
	DEY
	BPL.b CODE_10CDED
	REP.b #$30
	LDA.w #$7E7BBE
	STA.b $12
	LDA.w #$7E7BBE>>16
	STA.b $14
	LDY.w #$0005
CODE_10CE05:
	TYA
	ASL
	TAX
	LDA.w DATA_10CD98,x
	STA.b $10
	LDA.w $1104,y
	AND.w #$00FF
	ASL
	TAX
	PHY
	LDA.w DATA_10CE30,x
	JSR.w CODE_10CF01
	PLY
	LDA.b $12
	CLC
	ADC.w #$0012
	STA.b $12
	LDA.b $14
	ADC.w #$0000
	STA.b $14
	DEY
	BPL.b CODE_10CE05
	RTS

DATA_10CE30:
	dw DATA_10CE44,DATA_10CE56,DATA_10CE68,DATA_10CE7A,DATA_10CE8C,DATA_10CE9E,DATA_10CEB0,DATA_10CEC2
	dw DATA_10CED4,DATA_10CEE6

DATA_10CE44:
	dw $0D5A,$0D5B,$0D5C,$0D5D,$0D5E,$0D5F,$0D60,$0D61
	dw $0D62

DATA_10CE56:
	dw $1589,$158A,$158B,$158C,$158D,$158E,$158F,$1590
	dw $1591

DATA_10CE68:
	dw $0D51,$0D52,$0D53,$0D54,$0D55,$0D56,$0D57,$0D58
	dw $0D59

DATA_10CE7A:
	dw $1563,$1564,$1565,$1566,$1567,$1568,$1569,$156A
	dw $156B

DATA_10CE8C:
	dw $0D3F,$0D40,$0D41,$0D42,$0D43,$0D44,$0D45,$0D46
	dw $0D47

DATA_10CE9E:
	dw $1192,$1193,$1194,$1195,$1196,$1197,$1198,$1199
	dw $119A

DATA_10CEB0:
	dw $159B,$159C,$159D,$159E,$159F,$15A0,$15A1,$15A2
	dw $15A3

DATA_10CEC2:
	dw $0D92,$0D93,$0D94,$0D95,$0D96,$0D97,$0D98,$0D99
	dw $0D9A

DATA_10CED4:
	dw $0D6C,$0D6D,$0D6E,$0D6F,$0D70,$0D71,$0D72,$0D73
	dw $0D74

DATA_10CEE6:
	dw $1575,$1576,$1577,$1578,$1579,$157A,$157B,$157C
	dw $157D

DATA_10CEF8:
	db !Define_YI_ItemID_10Star,!Define_YI_ItemID_20Star,!Define_YI_ItemID_FullEgg
	db !Define_YI_ItemID_POW,!Define_YI_ItemID_StarCloud,!Define_YI_ItemID_GreenMelon
	db !Define_YI_ItemID_RedMelon,!Define_YI_ItemID_BlueMelon,!Define_YI_ItemID_MagnifyingGlass

CODE_10CF01:
	STA.b $16
	LDX.w #$0009
	LDY.w #$0000
CODE_10CF09:
	LDA.b ($16),y
	STA.b [$12],y
	INY
	INY
	DEX
	BNE.b CODE_10CF09
	LDA.w #$0003
	STA.b $0E
	LDA.b $14
	STA.b $01
	LDY.b $10
	LDX.b $12
CODE_10CF1F:
	LDA.w #$0006
	PHY
	PHX
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0006
	TAX
	PLA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $0E
	BNE.b CODE_10CF1F
	RTS

CODE_10CF39:
	SEP.b #$20
	LDA.w $110F
	BEQ.b CODE_10CF43
	DEC.w $110F
CODE_10CF43:
	REP.b #$20
	LDA.w $10F6
	AND.w #$00FF
	CLC
	ADC.w #$0014
	STA.b $00
	LDA.w $10F7
	AND.w #$00FF
	CLC
	ADC.w #$0014
	STA.b $02
	LDA.w #$3160
	STA.b $04
	JSR.w CODE_10BBF9
	LDA.w $093E
	AND.w #$C080
	BEQ.b CODE_10CF92
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	LDY.w #$000A
	STY.w $10F0
	LDA.w DATA_10A2DD,y
	JSR.w CODE_10A39A
	SEP.b #$30
	LDA.b #$18
	STA.w $110F
	INC.w $10DE
	REP.b #$20
	STZ.w $111C
	REP.b #$10
	RTS

CODE_10CF92:
	SEP.b #$30
	LDA.w $093F
	AND.b #$0F
	BEQ.b CODE_10CF9F
	LDY.b #$20
	BRA.b CODE_10CFA6

CODE_10CF9F:
	LDY.w $110F
	BNE.b CODE_10CFEF
	LDY.b #$10
CODE_10CFA6:
	STY.w $110F
	LDA.w $093D
	AND.b #$0F
	BNE.b CODE_10CFB2
	BRA.b CODE_10CFEF

CODE_10CFB2:
	PHA
	AND.b #$03
	TAY
	LDA.w $1114
	CLC
	ADC.w DATA_10B63F,y
	BPL.b CODE_10CFC3
	LDA.b #$05
	BRA.b CODE_10CFC9

CODE_10CFC3:
	CMP.b #$06
	BCC.b CODE_10CFC9
	LDA.b #$00
CODE_10CFC9:
	STA.w $1114
	TAY
	PLA
	LSR
	LSR
	BIT.b #$03
	BEQ.b CODE_10CFDD
	TYA
	CLC
	ADC.w DATA_10CD89,y
	STA.w $1114
	TAY
CODE_10CFDD:
	LDA.w DATA_10CD7D,y
	STA.w $10F6
	LDA.w DATA_10CD83,y
	STA.w $10F7
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
CODE_10CFEF:
	REP.b #$30
	RTS

CODE_10CFF2:
	SEP.b #$20
	LDA.w $110F
	BNE.b CODE_10D006
	LDA.b #$20
	STA.w $110F
	LDA.b #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_0085D2
	BRA.b CODE_10D009

CODE_10D006:
	DEC.w $110F
CODE_10D009:
	REP.b #$20
	SEP.b #$10
	LDA.w #(FXDATA_538000+$2420)>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #FXDATA_538000+$2420
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $111C
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_08E01F>>16
	LDA.w #FXCODE_08E01F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w #$705800>>16
	STA.b $01
	LDA.w $1114
	AND.w #$00FF
	ASL
	TAX
	LDY.w DATA_10CD71,x
	LDX.w #$705800
	LDA.w #$0003
	STA.b $0E
CODE_10D048:
	LDA.w #$0060
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0030
	TAY
	PLA
	CLC
	ADC.w #$0200
	TAX
	DEC.b $0E
	BNE.b CODE_10D048
	SEP.b #$30
	LDA.w $111C
	CMP.b #$0C
	BEQ.b CODE_10D076
	LDA.b $30
	AND.b #$03
	BNE.b CODE_10D073
	INC.w $111C
CODE_10D073:
	REP.b #$30
	RTS

CODE_10D076:
	REP.b #$30
	INC.w $10DE
	LDA.w $1114
	AND.w #$00FF
	TAY
	LDA.w $1104,y
	AND.w #$00FF
	CMP.w #$0009
	BEQ.b CODE_10D09F
	TAY
	LDA.w DATA_10CEF8,y
	JSR.w CODE_109C80
	LDA.w #$0005
	STA.w !RAM_YI_Global_PlayMusicLo
	LDY.w #$0004
	BRA.b CODE_10D0A9

CODE_10D09F:
	LDA.w #!Define_YI_SoundID7D_YoshiLostChallenge
	JSL.l CODE_0085D2
	LDY.w #$0006
CODE_10D0A9:
	STY.w $10F0
	LDA.w #$0080
	STA.w $10E0
	LDA.w DATA_10A2DD,y
	JMP.w CODE_10A39A

CODE_10D0B8:
	DEC.w $10E0
	BNE.b CODE_10D0C0
	INC.w $10DE
CODE_10D0C0:
	RTS

CODE_10D0C1:
	LDA.w #(FXDATA_538000+$2420)>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #FXDATA_538000+$2420
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $10E0
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	SEP.b #$10
	LDX.b #FXCODE_08E01F>>16
	LDA.w #FXCODE_08E01F
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w $1114
	AND.w #$00FF
	STA.b $0E
	LDX.w #$0005
CODE_10D0F1:
	CPX.b $0E
	BEQ.b CODE_10D12E
	PHX
	TXA
	ASL
	TAX
	LDA.w #$705800>>16
	STA.b $01
	LDY.w DATA_10CD71,x
	LDX.w #$705800
	LDA.w #$0060
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0030
	TAY
	LDX.w #$705A00
	LDA.w #$0060
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0030
	TAY
	LDX.w #$705C00
	LDA.w #$0060
	JSL.l CODE_00BEA6
	PLX
CODE_10D12E:
	DEX
	BPL.b CODE_10D0F1
	LDA.w $10E0
	CMP.w #$000C
	BNE.b CODE_10D14E
	STZ.w !RAM_YI_Level_DeathsInCurrentLevelLo
	STZ.w !RAM_YI_Level_1upsCollectedInCurrentLevelLo
	LDA.w #$0064
	STA.w $0381
	LDA.w #$0080
	STA.w $10E0
	INC.w $10DE
CODE_10D14E:
	LDA.b $30
	AND.w #$0003
	BNE.b CODE_10D158
	INC.w $10E0
CODE_10D158:
	RTS

DATA_10D159:
	dw $00CF,$00C7,$00C8,$00C9,$00CA,$00CB,$00CC,$00CD
	dw $00CE,$80DC

DATA_10D16D:
	dw $80CF,$00D7,$00D8,$00D9,$00DA,$00DB,$00DC,$00DD
	dw $00DC,$00DE

CODE_10D181:
	LDA.w $10DE
	ASL
	TAX
	JMP.w (DATA_10D189,x)

DATA_10D189:
	dw CODE_10A41C
	dw CODE_10A427
	dw CODE_10A444
	dw CODE_10A466
	dw CODE_10A481
	dw CODE_10A4EC
	dw CODE_10A549
	dw CODE_10A5B3
	dw CODE_10D946
	dw CODE_10D295
	dw CODE_10AE80
	dw CODE_10D5CA
	dw CODE_10D5FE
	dw CODE_10A621
	dw CODE_10D748
	dw CODE_10D7A3
	dw CODE_10D7D4
	dw CODE_10D843
	dw CODE_10D895
	dw CODE_10D5CD
	dw CODE_10D601
	dw CODE_10D9B8
	dw CODE_10D843
	dw CODE_10D895

CODE_10D1B9:
	STZ.w $1148
	STZ.w $1184
	STZ.w $114E
	LDA.w #$00FF
	STA.w $1192
	STA.w $1194
	SEP.b #$30
	LDX.b #$0C
CODE_10D1CF:
	STZ.w $119A,x
	STZ.w $119B,x
	DEX
	DEX
	BPL.b CODE_10D1CF
	LDA.w DATA_10D3CA
	STA.w $10F6
	LDA.w DATA_10D3D8
	STA.w $10F7
	STZ.w $10F8
	STZ.w $1154
	STZ.w $1155
	STZ.w $1164
	REP.b #$30
	RTS

DATA_10D1F4:
	db $00,$02,$03,$05,$06,$07,$08,$09,$0B,$01,$01,$02,$02,$03,$03,$05
	db $32

CODE_10D205:
	SEP.b #$30
	JSR.w CODE_10D275
	STA.b $20
CODE_10D20C:
	JSR.w CODE_10D275
	CMP.b $20
	BEQ.b CODE_10D20C
	STA.b $21
	LDX.b #$00
	TXY
CODE_10D218:
	CPY.b $20
	BEQ.b CODE_10D229
	CPY.b $21
	BEQ.b CODE_10D229
	LDA.w DATA_10D1F4,y
	STA.b $00,x
	STA.b $01,x
	INX
	INX
CODE_10D229:
	INY
	CPX.b #$0E
	BNE.b CODE_10D218
	LDA.b #$0E
	STA.b $0E
	LDY.b #$00
CODE_10D234:
	JSL.l CODE_008408
	LDA.b $0E
	STA.w !REGISTER_Multiplicand
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !REGISTER_Multiplier
	NOP #4
	REP.b #$20
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	SEP.b #$20
	AND.b #$0F
	TAX
	LDA.b $00,x
	STA.w $1156,y
	INY
	CPY.b #$0D
	BEQ.b CODE_10D269
	DEC.b $0E
CODE_10D25E:
	CPX.b $0E
	BEQ.b CODE_10D234
	LDA.b $01,x
	STA.b $00,x
	INX
	BRA.b CODE_10D25E

CODE_10D269:
	TXA
	EOR.b #$01
	TAX
	LDA.b $00,x
	STA.w $1163
	REP.b #$30
	RTS

CODE_10D275:
	SEP.b #$20
	JSL.l CODE_008408
	LDA.b #$09
	STA.w !REGISTER_Multiplicand
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	STA.w !REGISTER_Multiplier
	NOP #4
	REP.b #$20
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	SEP.b #$20
	AND.b #$0F
	RTS

CODE_10D295:
	SEP.b #$30
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	BEQ.b CODE_10D2A1
	JSR.w CODE_10AE80
	BRA.b CODE_10D2B6

CODE_10D2A1:
	LDA.w $1164
	CMP.b #$02
	BNE.b CODE_10D2AD
	JSR.w CODE_10D2B9
	BRA.b CODE_10D2B6

CODE_10D2AD:
	JSR.w CODE_10D3E8
	JSR.w CODE_10D470
	JSR.w CODE_10A928
CODE_10D2B6:
	REP.b #$30
	RTS

CODE_10D2B9:
	LDA.w $1148
	CMP.b #$06
	BNE.b CODE_10D2D8
	LDA.b #$0A
	STA.w $114E
	LDA.b #$05
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.b #$90
	STA.w $10E0
	REP.b #$30
	INC.w $1148
	JSR.w CODE_10D6CC
	BRA.b CODE_10D333

CODE_10D2D8:
	SEP.b #$30
	LDA.w $1192
	CMP.w $1194
	BNE.b CODE_10D341
	LDA.w $1148
	CMP.b #$05
	BNE.b CODE_10D2EC
	JSR.w CODE_10D3AE
CODE_10D2EC:
	LDA.b #$FF
	LDX.w $1196
	STA.w $1156,x
	LDX.w $1198
	STA.w $1156,x
	REP.b #$30
	INC.w $1148
	LDA.w $1148
	CMP.w #$0002
	BNE.b CODE_10D30A
	JSR.w CODE_10D37C
CODE_10D30A:
	JSR.w CODE_10D6CC
	LDA.w $1192
	AND.w #$00FF
	TAX
	LDA.w DATA_10A90A,x
	AND.w #$00FF
	JSR.w CODE_109C80
	LDA.w #$00FF
	STA.w $1192
	STA.w $1194
	LDA.w #!Define_YI_SoundID8F_Correct
	JSL.l CODE_0085D2
CODE_10D32B:
	LDA.w #$0090
	STA.w $10E0
CODE_10D333:
	LDA.w #$000E
	STA.w $10DE
	LDX.w #$0004
	STX.w $10F0
	BRA.b CODE_10D373

CODE_10D341:
	REP.b #$30
	INC.w $1184
	LDA.w $1184
	CMP.w #$0002
	BNE.b CODE_10D35A
	LDA.w #!Define_YI_SoundID7D_YoshiLostChallenge
	JSL.l CODE_0085D2
	LDA.w #$000D
	BRA.b CODE_10D364

CODE_10D35A:
	LDA.w #!Define_YI_SoundID90_Incorrect
	JSL.l CODE_0085D2
	LDA.w #$000F
CODE_10D364:
	STA.w $10DE
	LDA.w #$0080
	STA.w $10E0
	LDX.w #$0006
	STX.w $10F0
CODE_10D373:
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	SEP.b #$30
	RTS

CODE_10D37C:
	LDA.l $7E4000
	TAX
	LDA.w #$6A13
	STA.l $7E4002,x
	LDA.w #$8003
	STA.l $7E4004,x
	LDA.w #$0CAF
	STA.l $7E4006,x
	LDA.w #$0CBF
	STA.l $7E4008,x
	LDA.w #$FFFF
	STA.l $7E400A,x
	TXA
	CLC
	ADC.w #$0008
	STA.l $7E4000
	RTS

CODE_10D3AE:
	LDX.b #$0D
CODE_10D3B0:
	CPX.w $1196
	BEQ.b CODE_10D3C6
	CPX.w $1198
	BEQ.b CODE_10D3C6
	LDA.w $1156,x
	CMP.b #$FF
	BEQ.b CODE_10D3C6
	LDA.b #$04
	STA.w $1156,x
CODE_10D3C6:
	DEX
	BPL.b CODE_10D3B0
	RTS

DATA_10D3CA:
	db $38,$58,$78,$98,$B8,$28,$48,$A8,$C8,$38,$58,$78,$98,$B8

DATA_10D3D8:
	db $58,$58,$58,$58,$58,$78,$78,$78,$78,$98,$98,$98,$98,$98

DATA_10D3E6:
	db $02,$FE

CODE_10D3E8:
	LDX.w $1154
	LDA.w $10F8
	BEQ.b CODE_10D435
	CMP.b #$03
	BCS.b CODE_10D40E
	LDA.w DATA_10D3CA,x
	CMP.w $10F6
	BEQ.b CODE_10D432
	LDA.w $10F8
	AND.b #$01
	TAX
	LDA.w DATA_10D3E6,x
	CLC
	ADC.w $10F6
	STA.w $10F6
	BRA.b CODE_10D435

CODE_10D40E:
	LDA.w $10F7
	CMP.w DATA_10D3D8,x
	BEQ.b CODE_10D432
	LDA.w $10F8
	AND.b #$01
	TAX
	LDA.w DATA_10D3E6,x
	CLC
	ADC.w $10F7
	STA.w $10F7
	LDA.w $1155
	CLC
	ADC.w $10F6
	STA.w $10F6
	BRA.b CODE_10D435

CODE_10D432:
	STZ.w $10F8
CODE_10D435:
	RTS

DATA_10D436:
	db $09,$0A,$0B,$0C,$0D,$00,$01,$03,$04,$05,$06,$02,$07,$08

DATA_10D444:
	db $05,$06,$0B,$07,$08,$09,$0A,$0C,$0D,$00,$01,$02,$03,$04

DATA_10D452:
	db $00,$00,$00,$00,$00,$01,$01,$FF,$FF,$FF,$FF,$00,$01,$01

DATA_10D460:
	db $FF,$FF,$00,$01,$01,$01,$01,$FF,$FF,$00,$00,$00,$00,$00

DATA_10D46E:
	db $FF,$01

CODE_10D470:
	LDA.w $10F8
	BEQ.b CODE_10D476
CODE_10D475:
	RTS

CODE_10D476:
	LDA.w $093F
	AND.b #$C0
	BNE.b CODE_10D484
	LDA.w $093E
	AND.b #$80
	BEQ.b CODE_10D487
CODE_10D484:
	JMP.w CODE_10D520

CODE_10D487:
	LDA.w $093F
	AND.b #$0F
	BEQ.b CODE_10D475
	AND.b #$03
	BEQ.b CODE_10D4D1
	AND.b #$01
	TAX
	LDA.w $1154
	CLC
	ADC.w DATA_10D46E,x
	STA.w $1154
	CPX.b #$00
	BNE.b CODE_10D4BA
	CMP.b #$FF
	BNE.b CODE_10D4AE
	LDA.b #$0D
	STA.w $1154
	BRA.b CODE_10D506

CODE_10D4AE:
	CMP.b #$04
	BEQ.b CODE_10D506
	CMP.b #$08
	BEQ.b CODE_10D506
	LDX.b #$00
	BRA.b CODE_10D515

CODE_10D4BA:
	CMP.b #$0E
	BNE.b CODE_10D4C5
	LDA.b #$00
	STA.w $1154
	BRA.b CODE_10D506

CODE_10D4C5:
	CMP.b #$05
	BEQ.b CODE_10D506
	CMP.b #$09
	BEQ.b CODE_10D506
	LDX.b #$01
	BRA.b CODE_10D515

CODE_10D4D1:
	LDA.w $093F
	AND.b #$08
	BEQ.b CODE_10D4EF
	LDX.w $1154
	LDA.w DATA_10D452,x
	STA.w $1155
	LDA.w DATA_10D436,x
	STA.w $1154
	CPX.b #$05
	BCC.b CODE_10D506
	LDX.b #$02
	BRA.b CODE_10D515

CODE_10D4EF:
	LDX.w $1154
	LDA.w DATA_10D460,x
	STA.w $1155
	LDA.w DATA_10D444,x
	STA.w $1154
	CPX.b #$09
	BCS.b CODE_10D506
	LDX.b #$03
	BRA.b CODE_10D515

CODE_10D506:
	TAX
	LDA.w DATA_10D3CA,x
	STA.w $10F6
	LDA.w DATA_10D3D8,x
	STA.w $10F7
	BRA.b CODE_10D519

CODE_10D515:
	INX
	STX.w $10F8
CODE_10D519:
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
	RTS

CODE_10D520:
	LDX.w $1154
	LDY.w $1156,x
	CPY.b #$FF
	BEQ.b CODE_10D536
	LDA.w $1164
	AND.b #$01
	BEQ.b CODE_10D537
	CPX.w $1196
	BNE.b CODE_10D537
CODE_10D536:
	RTS

CODE_10D537:
	STY.w $10F3
	LDA.w $1164
	AND.w #$0A01
	TAX
	TYA
	STA.w $1192,x
	LDA.w $1154
	STA.w $1196,x
	INC.w $1164
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	JSR.w CODE_10AD77
	REP.b #$30
	LDX.w #$0002
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	SEP.b #$30
	INC.w $10DE
	SEP.b #$30
	RTS

DATA_10D56C:
	dw $6967,$696B,$696F,$6973,$6977,$69E5,$69E9,$69F5
	dw $69F9,$6A67,$6A6B,$6A6F,$6A73,$6A77

CODE_10D588:
	LDA.w $1154
	AND.w #$00FF
	ASL
	TAX
	LDA.w #$0003
	STA.b $0E
	LDY.w DATA_10D56C,x
CODE_10D598:
	PHY
	LDA.w #DATA_10AB12>>16
	STA.b $01
	LDX.w #DATA_10AB12
	LDA.w #$0006
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $0E
	BNE.b CODE_10D598
	LDA.w #DATA_10D6B1
	STA.b $00
	JSR.w CODE_10D6B4
	STZ.w $10F4
	LDA.w #$0084
	LDX.w #$0015
	JMP.w CODE_10AC94

DATA_10D5C6:
	dw $0008,$0010

CODE_10D5CA:
	JSR.w CODE_10AE80
CODE_10D5CD:
	LDX.w #$0000
	LDA.w $10DE
	CMP.w #$0013
	BNE.b CODE_10D5DA
	INX
	INX
CODE_10D5DA:
	LDA.w $10F4
	CLC
	ADC.w DATA_10D5C6,x
	STA.w $10F4
	CMP.w #$0080
	BMI.b CODE_10D5ED
	INC.w $10DE
	RTS

CODE_10D5ED:
	LDA.w #DATA_10D6B1
	STA.b $00
	JSR.w CODE_10D6B4
	LDA.w #$0084
	LDX.w #$0015
	JMP.w CODE_10AC94

CODE_10D5FE:
	JSR.w CODE_10AE80
CODE_10D601:
	LDX.w #$0000
	LDA.w $10DE
	CMP.w #$0014
	BNE.b CODE_10D60E
	INX
	INX
CODE_10D60E:
	LDA.w $10F4
	SEC
	SBC.w DATA_10D5C6,x
	STA.w $10F4
	BPL.b CODE_10D673
	LDA.w $1154
	AND.w #$00FF
	ASL
	TAX
	LDY.w DATA_10D56C,x
	LDA.w $10F3
	AND.w #$00FF
	ASL
	STA.b $00
	ASL
	ASL
	ASL
	CLC
	ADC.b $00
	CLC
	ADC.w #DATA_10AA16
	TAX
	LDA.w #$0003
	STA.b $0E
	LDA.w #DATA_10AA16>>16
	STA.b $01
CODE_10D643:
	LDA.w #$0006
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	PLA
	CLC
	ADC.w #$0006
	TAX
	DEC.b $0E
	BNE.b CODE_10D643
	LDA.w $10DE
	CMP.w #$0014
	BEQ.b CODE_10D669
	LDA.w #$0009
	BRA.b CODE_10D66F

CODE_10D669:
	INC.w $1154
	LDA.w #$0008
CODE_10D66F:
	STA.w $10DE
	RTS

CODE_10D673:
	LDA.w $10F3
	AND.w #$00FF
	CLC
	ADC.w #DATA_10AB33
	STA.b $00
	JSR.w CODE_10D6B4
	LDA.w $10F3
	AND.w #$00FF
	TAY
	LDX.w #$0011
	LDA.w DATA_10AA0A,y
	AND.w #$00FF
	JMP.w CODE_10AC94

DATA_10D695:
	db $34,$54,$74,$94,$B4,$24,$44,$A4,$C4,$34,$54,$74,$94,$B4

DATA_10D6A3:
	db $54,$54,$54,$54,$54,$74,$74,$74,$74,$94,$94,$94,$94,$94

DATA_10D6B1:
	db $32,$32,$32

CODE_10D6B4:
	LDA.w $1154
	AND.w #$00FF
	TAX
	CLC
	ADC.w #DATA_10D695
	STA.b $02
	TXA
	CLC
	ADC.w #DATA_10D6A3
	STA.b $04
	JSR.w CODE_10ACB7
	RTS

CODE_10D6CC:
	LDX.w #$0000
	LDA.w $1148
	LDY.w #$0000
CODE_10D6D5:
	CMP.w #$000A
	BCC.b CODE_10D6E0
	SBC.w #$000A
	INY
	BRA.b CODE_10D6D5

CODE_10D6E0:
	STA.b $00
	STY.b $02
	LDA.l $7E4000
	TAX
	LDA.w #$6A0E
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E400A,x
	LDA.w #$0003
	STA.l $7E4004,x
	STA.l $7E400C,x
	PHX
	LDA.w #$0002
	STA.b $04
	LDA.b $02
	BNE.b CODE_10D718
	LDA.w #$0000
	STA.l $7E4006,x
	BRA.b CODE_10D72A

CODE_10D716:
	LDA.b $00
CODE_10D718:
	ASL
	TAY
	LDA.w DATA_10D159,y
	ORA.w #$0C00
	STA.l $7E4006,x
	LDA.w DATA_10D16D,y
	ORA.w #$0C00
CODE_10D72A:
	STA.l $7E400E,x
	INX
	INX
	DEC.b $04
	DEC.b $04
	BPL.b CODE_10D716
	PLX
	LDA.w #$FFFF
	STA.l $7E4012,x
	TXA
	CLC
	ADC.w #$0010
	STA.l $7E4000
	RTS

CODE_10D748:
	LDA.w $10E0
	BEQ.b CODE_10D752
	DEC.w $10E0
	BRA.b CODE_10D7A2

CODE_10D752:
	LDA.w $114E
	BNE.b CODE_10D78C
	LDA.w $10F3
	AND.w #$00FF
	CMP.w #$0004
	BNE.b CODE_10D770
	LDA.w #$0080
	STA.w $10E0
	LDA.w #$000D
	STA.w $10DE
	BRA.b CODE_10D7A2

CODE_10D770:
	LDA.w $60C0
	BNE.b CODE_10D7A2
	STZ.w $1164
	LDX.w #$0000
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	LDA.w #$0009
	STA.w $10DE
	BRA.b CODE_10D7A2

CODE_10D78C:
	DEC.w $114E
	INC.w !RAM_YI_Level_CurrentLifeCountLo
	LDA.w #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	JSR.w CODE_109D74
	LDA.w #$0030
	STA.w $10E0
CODE_10D7A2:
	RTS

CODE_10D7A3:
	LDA.w $10E0
	BEQ.b CODE_10D7AD
	DEC.w $10E0
	BRA.b CODE_10D7D3

CODE_10D7AD:
	DEC.w $1164
	BMI.b CODE_10D7BE
	LDA.w #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	INC.w $10DE
	BRA.b CODE_10D7D3

CODE_10D7BE:
	STZ.w $1164
	LDX.w #$0000
	STX.w $10F0
	LDA.w DATA_10A2DD,x
	JSR.w CODE_10A39A
	LDA.w #$0009
	STA.w $10DE
CODE_10D7D3:
	RTS

CODE_10D7D4:
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1196,x
	AND.w #$00FF
	ASL
	TAX
	LDA.w #$0003
	STA.b $0E
	LDY.w DATA_10D56C,x
CODE_10D7EC:
	PHY
	LDA.w #DATA_10AB12>>16
	STA.b $01
	LDX.w #DATA_10AB12
	LDA.w #$0006
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $0E
	BNE.b CODE_10D7EC
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1192,x
	AND.w #$00FF
	CLC
	ADC.w #DATA_10AB33
	STA.b $00
	JSR.w CODE_10D926
	STZ.w $10F4
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1192,x
	AND.w #$00FF
	TAY
	LDX.w #$0011
	LDA.w DATA_10AA0A,y
	AND.w #$00FF
	JSR.w CODE_10AC94
	INC.w $10DE
	RTS

DATA_10D83F:
	dw $0018,$0010

CODE_10D843:
	LDX.w #$0000
	LDA.w $10DE
	CMP.w #$0011
	BEQ.b CODE_10D850
	INX
	INX
CODE_10D850:
	LDA.w $10F4
	CLC
	ADC.w DATA_10D83F,x
	STA.w $10F4
	CMP.w #$0080
	BMI.b CODE_10D863
	INC.w $10DE
	RTS

CODE_10D863:
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1192,x
	AND.w #$00FF
	CLC
	ADC.w #DATA_10AB33
	STA.b $00
	JSR.w CODE_10D926
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1192,x
	AND.w #$00FF
	TAY
	LDX.w #$0011
	LDA.w DATA_10AA0A,y
	AND.w #$00FF
	JMP.w CODE_10AC94

CODE_10D895:
	LDX.w #$0000
	LDA.w $10DE
	CMP.w #$0012
	BEQ.b CODE_10D8A2
	INX
	INX
CODE_10D8A2:
	LDA.w $10F4
	SEC
	SBC.w DATA_10D83F,x
	STA.w $10F4
	BPL.b CODE_10D911
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1196,x
	AND.w #$00FF
	ASL
	TAX
	LDY.w DATA_10D56C,x
	LDA.w #$00D8
	CLC
	ADC.w #DATA_10AA16
	TAX
	LDA.w #$0003
	STA.b $0E
CODE_10D8CE:
	LDA.w #DATA_10AA16>>16
	STA.b $01
	LDA.w #$0006
	PHX
	PHY
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	PLA
	CLC
	ADC.w #$0006
	TAX
	DEC.b $0E
	BNE.b CODE_10D8CE
	LDA.w $10DE
	CMP.w #$0012
	BNE.b CODE_10D907
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_10D922,x
	STA.w $10E0
	LDA.w #$000F
	BRA.b CODE_10D90D

CODE_10D907:
	INC.w $1154
	LDA.w #$0015
CODE_10D90D:
	STA.w $10DE
	RTS

CODE_10D911:
	LDA.w #DATA_10D6B1
	STA.b $00
	JSR.w CODE_10D926
	LDA.w #$0084
	LDX.w #$0015
	JMP.w CODE_10AC94

DATA_10D922:
	dw $0040,$0010

CODE_10D926:
	LDA.w $1164
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1196,x
	AND.w #$00FF
	TAX
	CLC
	ADC.w #DATA_10D695
	STA.b $02
	TXA
	CLC
	ADC.w #DATA_10D6A3
	STA.b $04
	JSR.w CODE_10ACB7
	RTS

CODE_10D946:
	LDA.w $1154
	CMP.w #$000E
	BEQ.b CODE_10D96A
	LDA.w $1154
	AND.w #$00FF
	TAX
	LDA.w $1156,x
	STA.w $10F3
	JSR.w CODE_10D97A
	LDA.w #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	LDA.w #$0013
	BRA.b CODE_10D976

CODE_10D96A:
	STZ.w $1154
	LDA.w #$0040
	STA.w $10E0
	LDA.w #$0015
CODE_10D976:
	STA.w $10DE
	RTS

CODE_10D97A:
	LDA.w $1154
	AND.w #$00FF
	ASL
	TAX
	LDA.w #$0003
	STA.b $0E
	LDY.w DATA_10D56C,x
CODE_10D98A:
	PHY
	LDA.w #DATA_10AB12>>16
	STA.b $01
	LDX.w #DATA_10AB12
	LDA.w #$0006
	JSL.l CODE_00BEA6
	PLA
	CLC
	ADC.w #$0020
	TAY
	DEC.b $0E
	BNE.b CODE_10D98A
	LDA.w #DATA_10D6B1
	STA.b $00
	JSR.w CODE_10D6B4
	STZ.w $10F4
	LDA.w #$0084
	LDX.w #$0015
	JMP.w CODE_10AC94

CODE_10D9B8:
	LDA.w $10E0
	BEQ.b CODE_10D9C2
	DEC.w $10E0
	BRA.b CODE_10D9EE

CODE_10D9C2:
	LDA.w $1154
	CMP.w #$000E
	BEQ.b CODE_10D9E5
	LDX.w $1154
	STX.w $1196
	LDA.w $1156,x
	STA.w $1192
	STZ.w $1164
	JSR.w CODE_10D7D4
	LDA.w #!Define_YI_SoundID50_MessageAppears
	JSL.l CODE_0085D2
	BRA.b CODE_10D9EE

CODE_10D9E5:
	JSR.w CODE_10D1B9
	LDA.w #$0009
	STA.w $10DE
CODE_10D9EE:
	RTS

DATA_10D9EF:
	dw $01C0,$01A0,$0164,$0144,$0156,$016E,$0192,$01AE

DATA_10D9FF:
	dw $07A0,$07A6,$07A6,$07A0,$079A,$0798,$0798,$079A

DATA_10DA0F:
	db $44,!REGISTER_Window1LeftPositionDesignation : dl $7E5B18

DATA_10DA14:
	db $E9,$D0,$56,$E9,$74,$58,$00

DATA_10DA1B:
	db $42,!REGISTER_BG1HorizScrollOffset : dl $7E5B98

DATA_10DA20:
	db $E9,$2C,$55,$E9,$FE,$55,$00

DATA_10DA27:
	db $42,!REGISTER_BG2HorizScrollOffset : dl $7E5C18

DATA_10DA2C:
	db $E9,$40,$50,$E9,$12,$51,$00

CODE_10DA33:
	JSL.l CODE_008277
	JSL.l CODE_01AF6E
	JSL.l CODE_0394B8
	REP.b #$20
	LDY.b #$00
	STZ.b $21
	LDA.w #$000392
	STA.b $20
	LDA.w #$022E
	JSL.l CODE_0082AB
	STZ.w !EXRAM_YI_Player_SuperBabyMarioTimerLo|!EXRAMBankMirror
	REP.b #$10
	LDA.w #$000A
	ASL
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F3E7,x
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F471,x
	AND.w #$00FF
	ASL
	STA.b $00
	ASL
	ADC.b $00
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs,x
	STA.b !RAM_YI_Level_LevelDataPtrLo
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs+$01,x
	STA.b !RAM_YI_Level_LevelDataPtrHi
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs+$03,x
	STA.l !EXRAM_YI_Level_SpriteDataPtrLo
	LDA.l YI_LevelDataPtrsAndEntranceData_Ptrs+$05,x
	STA.l !EXRAM_YI_Level_SpriteDataPtrBank
	SEP.b #$20
	LDA.b #$23
	STA.b $10
	STA.b $11
	STA.b $12
	LDA.b #$B1
	STA.b $13
	LDA.b #$B2
	STA.b $14
	LDA.b #$1A
	STA.b $15
	LDA.b #$17
	STA.b $16
	LDA.b #$AB
	STA.b $17
	STA.w $6EB6
	LDA.b #$AC
	STA.b $18
	STA.w $6EB7
	LDA.b #$1A
	STA.b $19
	STA.w $6EB8
	STA.b $1A
	STA.w $6EB9
	STA.b $1B
	STA.w $6EBA
	STA.b $1C
	STA.w $6EBB
	REP.b #$10
	LDY.w #$0000
	JSL.l CODE_00B3EE
	REP.b #$30
	LDA.w #$00A8
	LDX.w #$5800
	JSL.l CODE_00B756
	LDX.w #$3800
	JSR.w CODE_10DC71
	LDA.w #$00A9
	LDX.w #$5800
	JSL.l CODE_00B756
	LDX.w #$3400
	JSR.w CODE_10DC71
	REP.b #$30
	LDX.w #$0000
CODE_10DAF8:
	LDA.w #$7FFF
	STA.l YI_Global_PaletteMirror[$00].LowByte,x
	STA.l $702D6C,x
	LDA.l DATA_5FEC4A,x
	STA.l $702F6C,x
	LDA.l DATA_5FED4A,x
	STA.l $70306C,x
	STA.l YI_Global_PaletteMirror[$80].LowByte,x
	STA.l $702E6C,x
	INX
	INX
	CPX.w #$0100
	BCC.b CODE_10DAF8
	SEP.b #$30
	LDX.b #$04
	JSL.l CODE_00BDA2
	LDA.b #$68
	STA.w !RAM_YI_Global_BG1AddressAndSize
	LDX.b #$04
CODE_10DB31:
	LDA.w DATA_10DA0F,x
	STA.w HDMA[$05].Parameters,x
	LDA.w DATA_10DA1B,x
	STA.w HDMA[$06].Parameters,x
	LDA.w DATA_10DA27,x
	STA.w HDMA[$07].Parameters,x
	DEX
	BPL.b CODE_10DB31
	LDA.b #$7E
	STA.w HDMA[$05].IndirectSourceBank
	STA.w HDMA[$06].IndirectSourceBank
	STA.w HDMA[$07].IndirectSourceBank
	LDX.b #$06
CODE_10DB53:
	LDA.w DATA_10DA14,x
	STA.l $7E5B18,x
	LDA.w DATA_10DA20,x
	STA.l $7E5B98,x
	LDA.w DATA_10DA2C,x
	STA.l $7E5C18,x
	DEX
	BPL.b CODE_10DB53
	JSL.l CODE_00BE26
	LDX.b #$11
	JSL.l CODE_008543
	JSL.l CODE_108B61
	REP.b #$20
	LDA.w #$0720
	STA.w $0C27
	STA.b !RAM_YI_Global_Layer1YPosLo
	STA.w $60A6
	STA.b !RAM_YI_Global_Layer2YPosLo
	STA.w $609E
	STA.b !RAM_YI_Global_Layer3YPosLo
	STA.w $60A0
	LDA.w #$0000
	STA.b !RAM_YI_Global_Layer1XPosLo
	SEC
	SBC.w #$0100
	STA.w $60A4
	SEP.b #$20
	INC.w $038C
	JSL.l CODE_108FD6
	STZ.w $038C
	REP.b #$20
	LDA.w #$0040
	STA.w $0C23
	STA.b !RAM_YI_Global_Layer2XPosLo
	STA.b !RAM_YI_Global_Layer3XPosLo
	STA.w $6096
	STA.w $6098
	LDA.w #!Define_YI_Level_SoftMaxStarTimerThreshold
	STA.w !RAM_YI_Level_StarTimerLo
	LDA.w #$0003
	STA.w $03A1
	LDA.w #$000F
	STA.w !RAM_YI_Level_LevelHeaderBGScrollSettingLo
	LDA.w #$0001
	STA.w $0C1E
	STA.w $0C20
	LDA.w #$0180
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$0790
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	JSL.l CODE_04DC28
	LDA.b #$10
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror
	LDA.b #$03
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror
	REP.b #$20
	STZ.w $61B2
	LDA.w #!Define_YI_PlayerState1C_Prologue
	STA.w !EXRAM_YI_Player_CurrentStateLo|!EXRAMBankMirror
	LDA.w #$0002
	STA.w $60C4
	LDX.b #$0E
CODE_10DC05:
	LDA.w #$012D
	JSL.l CODE_03A34C
	LDA.w DATA_10D9EF,x
	STA.w $70E2,y
	LDA.w DATA_10D9FF,x
	STA.w $7182,y
	TXA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,y
	SEC
	SBC.w #$0004
	CMP.w #$0008
	BCS.b CODE_10DC2B
	LDA.w #$0002
	STA.w $7400,y
CODE_10DC2B:
	TXA
	LSR
	DEC
	LSR
	BNE.b CODE_10DC37
	LDA.w #$0002
	STA.w $74A2,y
CODE_10DC37:
	DEX
	DEX
	BPL.b CODE_10DC05
	LDA.w #$01F0
	STA.w $7E1A
	SEP.b #$20
	LDA.b #$01
	STA.b !RAM_YI_Global_PlayMusicLo
	STZ.w $0121
	LDA.b #$02
	STA.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #$0F
	STA.w $0200
	LDA.w $0201
	EOR.b #$01
	AND.b #$01
	STA.w $0201
	JML.l CODE_1083E2

CODE_10DC71:
	STX.b $00
	SEP.b #$10
	STA.w DMA[$00].SizeLo
	LDX.b #$80
CODE_10DC79:
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.b $00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDX.b #$705800>>16
	STX.w DMA[$00].SourceBank
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	REP.b #$10
	RTS

DATA_10DC9B:
	dw CODE_10DCF0
	dw CODE_10DD7C
	dw CODE_10DD4C
	dw CODE_10DD7C
	dw CODE_10DD60
	dw CODE_10DD61
	dw CODE_10DD6E
	dw CODE_10DD7C
	dw CODE_10DD60

CODE_10DCAD:					; Note: Routine related to the prologue Yoshis
	JSL.l CODE_008259
	LDA.w $0D27
	ASL
	TAX
	JSR.w (DATA_10DC9B,x)
	REP.b #$20
	LDA.w #$0081
	STA.w $7E20
	SEP.b #$20
	JSL.l CODE_04FD28
	JSL.l CODE_0394D3
	JSL.l CODE_04FA67
	JSL.l CODE_04DD9E
	JSL.l CODE_0397DF
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.b !RAM_YI_Global_Layer1XPosLo
	STA.b !RAM_YI_Global_Layer3XPosLo
	STA.w $6098
	SEP.b #$20
	JSR.w CODE_10DDC3
	PLB
	RTL

CODE_10DCF0:
	LDA.b $30
	AND.b #$01
	BNE.b CODE_10DD4B
	REP.b #$20
	LDA.w $0C23
	CMP.w #$0100
	BCS.b CODE_10DD01
	INC
CODE_10DD01:
	STA.w $0C23
	STA.b !RAM_YI_Global_Layer2XPosLo
	STA.w $6096
	SEP.b #$20
	INC.w $0D29
	LDA.w $0D29
	AND.b #$07
	BNE.b CODE_10DD4B
	LDA.l $70336C
	CMP.b #$20
	BCC.b CODE_10DD30
	LDA.b #$00
	STA.l $70336C
	INC.w $0D27
	INC.w !RAM_YI_Level_MessageBoxState 
	LDA.b #$30
	STA.w $0D29
	BRA.b CODE_10DD4B

CODE_10DD30:
	REP.b #$20
	LDA.w #$2D6C
	STA.l $70336E
	LDA.w #$2F6C
	STA.l $703370
	LDX.b #FXCODE_08B4A9>>16
	LDA.w #FXCODE_08B4A9
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
CODE_10DD4B:
	RTS

CODE_10DD4C:
	LDA.b #$22
	STA.l $704070
	JSR.w CODE_10DD88
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_10DD5F
	LDA.b #$40
	STA.w $0D29
CODE_10DD5F:
	RTS

CODE_10DD60:
	RTS

CODE_10DD61:
	INC.w !RAM_YI_Level_MessageBoxState 
	LDA.b #$23
	STA.l $704070
	INC.w $0D27
	RTS

CODE_10DD6E:
	JSR.w CODE_10DD88
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_10DD7B
	LDA.b #$30
	STA.w $0D29
CODE_10DD7B:
	RTS

CODE_10DD7C:
	DEC.w $0D29
	BNE.b CODE_10DD87
	STZ.w $0D29
	INC.w $0D27
CODE_10DD87:
	RTS

CODE_10DD88:
	JSL.l CODE_01DE5A
	LDA.b #$20
	TSB.w !RAM_YI_Global_HDMAEnable
	LDA.b #$00
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Level_FreezeSpritesFlagLo|!EXRAMBankMirror
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_10DDA9
	INC.w $0D27
	LDA.w !RAM_YI_Global_HDMAEnable
	EOR.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
CODE_10DDA9:
	RTS

DATA_10DDAA:
	db $00,$40,$01,$57,$07,$00,$00,$01,$B7,$07,$00,$80,$02,$00,$08

DATA_10DDB9:
	db $00,$80,$01,$47,$07,$00,$00,$02,$00,$08

CODE_10DDC3:
	REP.b #$20
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $6000
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.b !RAM_YI_Global_Layer1YPosLo
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_10DDAA
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #DATA_10DDAA>>16
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$385E
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DC4D>>16
	LDA.w #FXCODE_08DC4D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$01A4
	JSL.l CODE_00BE71	: dl $7E552C,$70385E
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w $6000
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #DATA_10DDB9
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #DATA_10DDB9>>16
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$3516
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08DC4D>>16
	LDA.w #FXCODE_08DC4D
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$01A4
	JSL.l CODE_00BE71	: dl $7E5040,$703516
	SEP.b #$20
	LDA.b #$C0
	TSB.w !RAM_YI_Global_HDMAEnable
	RTS

CODE_10DE3F:
	JSL.l CODE_008277
	JSL.l CODE_00831C
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	LDX.b #$04
	JSL.l CODE_00BDA2
	LDA.b #$10
	STA.w !RAM_YI_Global_MainScreenLayers
	STZ.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$22
	STA.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	STA.w !REGISTER_OAMSizeAndDataAreaDesignation
	STZ.w !RAM_YI_Global_HDMAEnable
	REP.b #$20
	LDA.w #FXDATA_514986
	STA.l $704096
	LDA.w #FXDATA_514986>>16
	STA.l $704098
	LDX.b #FXCODE_09B03E>>16
	LDA.w #FXCODE_09B03E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$4000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDY.b #$705800>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$2000
	STA.w DMA[$00].SizeLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	LDA.w #$0000
	STA.w $0948
	STA.l YI_Global_PaletteMirror[$00].LowByte
	TAX
CODE_10DEAE:
	STA.l YI_Global_PaletteMirror[$90].LowByte,x
	INX
	INX
	CPX.b #$20
	BCC.b CODE_10DEAE
	LDA.w #$0000
	STA.l $70336C
	LDX.b #$00
CODE_10DEC1:
	STZ.w !RAM_YI_Level_LevelHeaderBackgroundColorLo,x
	INX
	INX
	CPX.b #$1C
	BCC.b CODE_10DEC1
	LDX.b #$00
CODE_10DECC:
	STZ.w $6C00,x
	STZ.w $6D00,x
	STZ.w $6D20,x
	DEX
	DEX
	BNE.b CODE_10DECC
	LDA.w #$0018
	STA.b $A1
	LDA.w #$0060
	STA.b $B1
	LDX.b #$00
CODE_10DEE5:
	LDA.b $B1,x
	STA.b $B3,x
	LDA.b $A1,x
	CLC
	ADC.w #$0018
	STA.b $A3,x
	INX
	INX
	CPX.b #$08
	BCC.b CODE_10DEE5
	CLC
	ADC.w #$0010
	STA.b $A1,x
CODE_10DEFD:
	LDA.b $B1,x
	STA.b $B3,x
	LDA.b $A1,x
	CLC
	ADC.w #$0018
	STA.b $A3,x
	INX
	INX
	CPX.b #$0E
	BCC.b CODE_10DEFD
	STZ.b $C3
	LDA.w #$0800
	STA.b $C5
	LDA.w #$0100
	STA.b $C8
	LDX.b #$07
CODE_10DF1D:
	LDA.w #$FFFF
CODE_10DF20:
	DEC
	BNE.b CODE_10DF20
	DEX
	BNE.b CODE_10DF1D
	SEP.b #$20
	LDA.b #$02
	STA.w $0125
	STZ.w !RAM_YI_Global_HDMAEnable
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #$04
	STA.w !RAM_YI_Global_PlayMusicLo
	INC.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_10DF5C

DATA_10DF49:
	dw CODE_10DF6B
	dw CODE_10DF82
	dw CODE_10DFBB
	dw CODE_10E17C
	dw CODE_10E199

CODE_10DF53:
	JSL.l CODE_008259
	LDX.b $8F
	JSR.w (DATA_10DF49,x)
CODE_10DF5C:
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	PLB
	RTL

CODE_10DF6B:
	REP.b #$20
	INC.w $00CA
	LDA.w $00CA
	CMP.w #$0200
	BCC.b CODE_10DF7C
	INC.b $8F
	INC.b $8F
CODE_10DF7C:
	SEP.b #$20
	JSR.w CODE_10DFE7
	RTS

CODE_10DF82:
	REP.b #$20
	LDA.l YI_Global_PaletteMirror[$93].LowByte
	CLC
	ADC.w #$0842
	BPL.b CODE_10DF95
	INC.b $8F
	INC.b $8F
	LDA.w #$7FFF
CODE_10DF95:
	STA.l YI_Global_PaletteMirror[$93].LowByte
	SEP.b #$20
	JSR.w CODE_10DFE7
	RTS

DATA_10DF9F:
	db $15,$01,$16,$04,$17,$18,$04,$19

DATA_10DFA7:
	db $10,$30,$50,$70,$10,$30,$50,$70

DATA_10DFAF:
	db $50,$50,$50,$50,$70,$70,$70,$70

DATA_10DFB7:
	dw !Define_YI_SoundID43_MountYoshi,!Define_YI_SoundID2E_ClankSound7

CODE_10DFBB:
	LDA.b $37
	AND.b #$C0
	ORA.b $38
	AND.b #$D0
	BEQ.b CODE_10DFD5
	INC.b $8F
	INC.b $8F
	LDA.b #$5C
	LDX.w $00C3
	LDA.w DATA_10DFB7,x
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_10DFE7

CODE_10DFD5:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_10DFE7
	LDA.b $C3
	EOR.b #$02
	AND.b #$02
	STA.b $C3
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_10DFE7:
	REP.b #$20
	LDA.w #$6800
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$0800
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08D2F1>>16
	LDA.w #FXCODE_08D2F1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #$00
	LDY.b #$07
CODE_10E002:
	LDA.w DATA_10DF9F,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $91,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $99,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w DATA_10DFA7,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w DATA_10DFAF,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.b $C1
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHY
	PHX
	LDX.b #FXCODE_08F165>>16
	LDA.w #FXCODE_08F165
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	PLY
	INX
	DEY
	BPL.b CODE_10E002
	REP.b #$10
	LDY.w #$5000
	LDA.w #$706800>>16
	STA.b $01
	LDA.w #$1000
	LDX.w #$706800
	JSL.l CODE_00BEA6
	LDA.w #$3100
	STA.b $04
	LDX.w #$0000
	LDY.w $6092
CODE_10E062:
	LDA.b $A1,x
	STA.w $6000,y
	LDA.b $B1,x
	STA.w $6002,y
	LDA.b $04
	STA.w $6004,y
	LDA.w #$4002
	STA.w $6006,y
	LDA.b $04
	INC
	INC
	INC
	INC
	BIT.w #$000F
	BNE.b CODE_10E085
	LDA.w #$3140
CODE_10E085:
	STA.b $04
	INX
	INX
	TYA
	CLC
	ADC.w #$0008
	TAY
	CPY.w #$0240
	BCC.b CODE_10E062
	JSR.w CODE_10E0FB
	STY.w $6092
	SEP.b #$10
	LDA.b $C1
	CMP.w #$0030
	BCS.b CODE_10E0A8
	INC
	STA.b $C1
	BRA.b CODE_10E0F4

CODE_10E0A8:
	SEP.b #$20
	LDX.b #$00
	STZ.b $00
CODE_10E0AE:
	LDA.b $C6
	BNE.b CODE_10E0B8
	LDA.b $91,x
	BEQ.b CODE_10E0C1
	LDA.b #$01
CODE_10E0B8:
	CLC
	ADC.b $91,x
	STA.b $91,x
	ORA.b $00
	STA.b $00
CODE_10E0C1:
	LDA.b $C6
	BNE.b CODE_10E0CB
	LDA.b $99,x
	BEQ.b CODE_10E0D0
	LDA.b #$01
CODE_10E0CB:
	CLC
	ADC.b $99,x
	STA.b $99,x
CODE_10E0D0:
	INX
	CPX.b #$08
	BCC.b CODE_10E0AE
	REP.b #$20
	LDA.b $C5
	SEC
	SBC.w #$0010
	BPL.b CODE_10E0F2
	LDA.w #$0000
	LDX.b $00
	BNE.b CODE_10E0F4
	DEC.b $C8
	BNE.b CODE_10E0F2
	LDA.w #$0100
	STA.b $C8
	LDA.w #$0800
CODE_10E0F2:
	STA.b $C5
CODE_10E0F4:
	SEP.b #$20
	RTS

DATA_10E0F7:
	dw $0050,$007E

CODE_10E0FB:
	LDX.b $C3
	LDA.w DATA_10E0F7,x
	STA.w $6000,y
	STA.w $6008,y
	LDA.w #$00C0
	STA.w $6002,y
	STA.w $6012,y
	CLC
	ADC.w #$0008
	STA.w $600A,y
	LDA.w #$32A0
	STA.w $6004,y
	ORA.w #$0010
	STA.w $600C,y
	LDA.w #$4000
	STA.w $6006,y
	STA.w $600E,y
	TYA
	CLC
	ADC.w #$0010
	TAY
	LDA.w #$0048
	STA.b $00
	LDA.w #$3220
	STA.b $02
	LDX.w #$0006
CODE_10E13E:
	LDA.b $00
	STA.w $6000,y
	STA.w $6008,y
	CLC
	ADC.w #$0010
	STA.b $00
	LDA.w #$0090
	STA.w $6002,y
	CLC
	ADC.w #$0020
	STA.w $600A,y
	LDA.b $02
	STA.w $6004,y
	CLC
	ADC.w #$0040
	STA.w $600C,y
	LDA.w #$4002
	STA.w $6006,y
	STA.w $600E,y
	INC.b $02
	INC.b $02
	TYA
	CLC
	ADC.w #$0010
	TAY
	DEX
	BNE.b CODE_10E13E
	RTS

CODE_10E17C:
	JSR.w CODE_10DFE7
	LDA.b $C3
	BNE.b CODE_10E18F
	LDA.b #!Define_YI_GameMode1F
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.b #$03
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	BRA.b CODE_10E198

CODE_10E18F:
	DEC.w $0200
	BNE.b CODE_10E198
	INC.b $8F
	INC.b $8F
CODE_10E198:
	RTS

CODE_10E199:
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDX.b #$10
	JSL.l CODE_008543
	STZ.w $011A
	LDA.b #$80
	STA.w $012B
	STZ.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	STZ.w $0217
	STZ.w $0200
	STZ.w $0201
	LDA.b #!Define_YI_GameMode09
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	RTS

CODE_10E1C1:
	LDA.b #$FF
	STA.w $011A
	LDA.b #!Define_YI_WorldID_FinalCutscene
	STA.w !RAM_YI_Level_CurrentWorldLo
	INC.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	JML.l CODE_1083E2

DATA_10E1D2:
	dw $5000,$47FF,$0000
	dw $FFFF

CODE_10E1DA:
	LDA.b #$24
	JSL.l CODE_008279
	JSL.l CODE_00831C
	REP.b #$10
	LDY.w #$01C3
	JSL.l CODE_00B3EE
	SEP.b #$20
	LDA.b #$81
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$30
	LDA.w #$5084
	STA.b $00
	LDX.w #$0000
	LDA.w #$0018
	STA.b $02
CODE_10E203:
	LDA.b $00
	STA.w !REGISTER_VRAMAddressLo
	LDY.w #$0010
CODE_10E20B:
	STX.w !REGISTER_WriteToVRAMPortLo
	INX
	DEY
	BNE.b CODE_10E20B
	INC.b $00
	DEC.b $02
	BNE.b CODE_10E203
	LDX.w #$01FE
CODE_10E21B:
	LDA.l DATA_5FEE4A,x
	STA.l $701600,x
	STA.l $701800,x
	DEX
	DEX
	BPL.b CODE_10E21B
	LDX.w #$0006
CODE_10E22E:
	LDA.l $7017C2,x
	STA.w $0B93,x
	LDA.l $7017E2,x
	STA.w $0B9B,x
	DEX
	DEX
	BPL.b CODE_10E22E
	PHB
	LDY.w #$701200
	LDX.w #DATA_00E552
	LDA.w #$03FF
	MVN $701200>>16,DATA_00E552>>16
	PLB
	SEP.b #$30
	LDX.b #$26
	JSL.l CODE_00BDA2
	STZ.w !REGISTER_BG1HorizScrollOffset
	STZ.w !REGISTER_BG1HorizScrollOffset
	STZ.w !REGISTER_BG1VertScrollOffset
	STZ.w !REGISTER_BG1VertScrollOffset
	STZ.w !REGISTER_BG2HorizScrollOffset
	STZ.w !REGISTER_BG2HorizScrollOffset
	STZ.w !REGISTER_BG2VertScrollOffset
	STZ.w !REGISTER_BG2VertScrollOffset
	LDA.b #$03
	STA.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	STA.w !REGISTER_OAMSizeAndDataAreaDesignation
	REP.b #$30
	LDX.w #$0402
CODE_10E27B:
	LDA.w DATA_10EA44,x
	STA.w $6CAA,x
	DEX
	DEX
	BPL.b CODE_10E27B
	LDA.w #$00C0
	STA.b $82
	LDA.w #$0CAA
	STA.b $7B
	SEP.b #$10
	LDA.w #$FFB0
	STA.b $73
	STZ.b $71
	LDA.w #$0030
	STA.w $0B91
	LDA.w #$0008
	STA.b $7E
	LDA.w #$03FC
	STA.b $80
	LDA.w #$0009
	STA.b $88
	JSR.w CODE_10E430
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $73
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $71
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $7B
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_09F03E>>16
	LDA.w #FXCODE_09F03E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$0000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$701C00
	STA.w DMA[$00].SourceLo
	LDX.b #$701C00>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$6000
	STA.w DMA[$00].SizeLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	JSR.w CODE_10E430
	LDX.w $012E
	PHX
	LDX.b #!SuperFX_ScreenMode_ScreenHeight_160pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STX.w $012E
	LDX.b #FXCODE_09ECD8>>16
	LDA.w #FXCODE_09ECD8
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	STX.w $012E
	LDA.w #$7000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$701C00
	STA.w DMA[$00].SourceLo
	LDX.b #$701C00>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$2000
	STA.w DMA[$00].SizeLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	SEP.b #$20
	LDX.b #$13
	JSL.l CODE_008543
	LDA.b #$01
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$01
	STA.w !REGISTER_HCountTimerHi
	LDA.b #$D8
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	STZ.w $0200
	JML.l CODE_1083E2

CODE_10E357:
	LDA.b $8C
	AND.b #$03
	BNE.b CODE_10E360
	INC.w $0200
CODE_10E360:
	REP.b #$20
	INC.b $8C
	LDA.w $0200
	AND.w #$00FF
	CMP.w #$000F
	BCC.b CODE_10E3DD
	STZ.w $71AA
	INC.w !RAM_YI_Global_CurrentGameMode
	LDA.w $0201
	EOR.w #$0001
	AND.w #$0001
	STA.w $0201
	STZ.b $8C
	BRA.b CODE_10E3DD

DATA_10E385:
	dw CODE_10E44F
	dw CODE_10E478
	dw CODE_10E4B0
	dw CODE_10E530
	dw CODE_10E592
	dw CODE_10E5A8
	dw CODE_10E624
	dw CODE_10E66B
	dw CODE_10E692
	dw CODE_10E6C7
	dw CODE_10E592
	dw CODE_10E5A8
	dw CODE_10E6E7
	dw CODE_10E724
	dw CODE_10E735
	dw CODE_10E7AF
	dw CODE_10E7F1
	dw CODE_10E807
	dw CODE_10E7F1
	dw CODE_10E855
	dw CODE_10E7F1
	dw CODE_10E575
	dw CODE_10E8B8
	dw CODE_10E592
	dw CODE_10E5A8
	dw CODE_10E575
	dw CODE_10E8FB
	dw CODE_10E575
	dw CODE_10E922
	dw CODE_10E592
	dw CODE_10E5A8
	dw CODE_10E90C
	dw CODE_10E975
	dw CODE_10E992
	dw CODE_10E96B

CODE_10E3CB:
	REP.b #$20
	INC.b $8C
	LDA.w $0BD3
	BNE.b CODE_10E42C
	LDX.b $79
	CPX.b #$46
	BCS.b CODE_10E3DD
	JSR.w (DATA_10E385,x)
CODE_10E3DD:
	LDA.b $79
	CMP.w #$0034
	BCS.b CODE_10E42C
	LDA.w $0BD3
	BNE.b CODE_10E42C
	JSR.w CODE_10E430
	LDA.b $6F
	CLC
	ADC.b $7E
	AND.w #$03FF
	STA.b $6F
	LDA.b $79
	CMP.w #$0014
	BCS.b CODE_10E400
	JSR.w CODE_10E9C9
CODE_10E400:
	LDA.b $77
	BEQ.b CODE_10E408
	CLC
	ADC.w #$0300
CODE_10E408:
	CLC
	ADC.b $6F
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.b $73
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $71
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $7B
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDX.b #FXCODE_09F03E>>16
	LDA.w #FXCODE_09F03E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.b #$03
	STA.b $6B
CODE_10E42C:
	SEP.b #$20
	PLB
	RTL

CODE_10E430:
	LDA.w #$1C00
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0002
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$3000
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08AA8B>>16
	LDA.w #FXCODE_08AA8B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	RTS

CODE_10E44F:
	DEC.w $0B91
	BNE.b CODE_10E458
	INC.b $79
	INC.b $79
CODE_10E458:
	RTS

DATA_10E459:
	db $1E,$3E,$3E,$1E,$3E,$3E,$3E,$3E,$3E,$1E,$3E,$3E,$1E,$3E,$1E,$3E
	db $3E,$1E,$3E,$1E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$1E,$3E,$1E,$3E

CODE_10E478:
	LDA.w $0B8F
	BEQ.b CODE_10E482
	LDA.w #$000C
	BRA.b CODE_10E494

CODE_10E482:
	LDA.w $0B8D
	CMP.w #$001F
	BCS.b CODE_10E49D
	TAX
	INC.w $0B8D
	LDA.w DATA_10E459,x
	AND.w #$00FF
CODE_10E494:
	STA.w $0B91
	DEC.b $79
	DEC.b $79
	BRA.b CODE_10E4A3

CODE_10E49D:
	INC.b $79
	INC.b $79
	BRA.b CODE_10E4AF

CODE_10E4A3:
	LDA.w $0B8F
	EOR.w #$0002
	AND.w #$0002
	STA.w $0B8F
CODE_10E4AF:
	RTS

CODE_10E4B0:
	LDA.w $0B8D
	CMP.w #$001F
	BCC.b CODE_10E4CB
	LDA.b $6F
	BNE.b CODE_10E4CB
	INC.b $79
	INC.b $79
	INC.b $78
	JSR.w CODE_10E4CC
	JSR.w CODE_10E511
	STZ.w $71AA
CODE_10E4CB:
	RTS

CODE_10E4CC:
	REP.b #$10
	LDA.w #$0000
	TAX
CODE_10E4D2:
	STA.l $701A00,x
	INX
	INX
	CPX.w #$0200
	BNE.b CODE_10E4D2
	LDX.w #$0006
CODE_10E4E0:
	LDA.l $7019C2,x
	STA.l $701BC2,x
	LDA.l $7019E2,x
	STA.l $701BE2,x
	DEX
	DEX
	BPL.b CODE_10E4E0
	SEP.b #$10
	RTS

DATA_10E4F7:
	dw $0000,$569C,$28F1,$0006,$5B9F,$2DF6,$004D,$6FDF

DATA_10E507:
	dw $0000,$679F,$1D51,$6FD9,$2144

CODE_10E511:
	LDX.b #$00
CODE_10E513:
	LDA.w DATA_10E4F7,x
	STA.l $701AA2,x
	INX
	INX
	CPX.b #$10
	BCC.b CODE_10E513
	LDX.b #$00
CODE_10E522:
	LDA.w DATA_10E507,x
	STA.l $701AC2,x
	INX
	INX
	CPX.b #$0A
	BCC.b CODE_10E522
	RTS

CODE_10E530:
	LDA.w $71AA
	CMP.w #$0020
	BCS.b CODE_10E555
	LDA.w #$1800
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$1A00
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$1600
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDX.b #FXCODE_09F64E>>16
	LDA.w #FXCODE_09F64E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	BRA.b CODE_10E574

CODE_10E555:
	INC.b $79
	INC.b $79
	STZ.w $71AA
	PHB
	LDX.b #$701600>>16
	PHX
	PLB
	LDX.b #$00
CODE_10E563:
	LDA.w $701600,x
	STA.w $701800,x
	LDA.w $701700,x
	STA.w $701900,x
	INX
	INX
	BNE.b CODE_10E563
	PLB
CODE_10E574:
	RTS

CODE_10E575:
	JSR.w CODE_10E530
	LDA.b $8C
	AND.w #$0001
	BNE.b CODE_10E587
	LDA.w $71AA
	BEQ.b CODE_10E587
	DEC.w $71AA
CODE_10E587:
	RTS

DATA_10E588:
	dw $01A7,$01A7,$021C,$021C,$021C

CODE_10E592:
	REP.b #$10
	LDY.b $84
	LDX.w DATA_10E588,y
	LDA.w #$6000
	BRA.b CODE_10E5B2

DATA_10E59E:
	dw $01A7,$01AA,$01AA,$01AA,$0039

CODE_10E5A8:
	REP.b #$10
	LDY.b $84
	LDX.w DATA_10E59E,y
	LDA.w #$6800
CODE_10E5B2:
	STA.w $0BD5
	LDA.l DATA_06FC79,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.l DATA_06FC79+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0040
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	SEP.b #$10
	LDX.w $012E
	PHX
	LDX.b #!SuperFX_ScreenMode_ScreenHeight_160pixels|!SuperFX_ScreenMode_ColorMode_16Colors|!SuperFX_ScreenMode_SuperFXHasWRAMAccess|!SuperFX_ScreenMode_SuperFXHasROMAccess|!SuperFX_ScreenMode_ColorMode_Unused
	STX.w $012E
	LDX.b #FXCODE_0A8000>>16
	LDA.w #FXCODE_0A8000
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	PLX
	STX.w $012E
	LDA.w #$1000
	STA.w $0BD7
	INC.w $0BD3
	INC.b $79
	INC.b $79
	STZ.b $69
	STZ.b $6B
	RTS

DATA_10E5F6:
	dw $00AB,$00AC,$00AD,$00AE

CODE_10E5FE:
	LDX.b $84
	LDA.w DATA_10E5F6,x
	LDX.w #$1C00
	JSL.l CODE_00B756
	SEP.b #$10
	LDA.w #$5CA0
	STA.w $0BD5
	LDA.w #$0300
	STA.w $0BD7
	INC.w $0BD3
	INC.b $84
	INC.b $84
	STZ.b $69
	STZ.b $6B
	RTS

CODE_10E624:
	REP.b #$10
	LDX.w #$0000
CODE_10E629:
	LDA.l DATA_5FF04A,x
	STA.l $701A00,x
	INX
	INX
	CPX.w #$0180
	BCC.b CODE_10E629
	LDX.w #$0006
CODE_10E63B:
	LDA.w DATA_10EE48,x
	STA.w $6CAA,x
	DEX
	DEX
	BPL.b CODE_10E63B
	JSR.w CODE_10E5FE
	SEP.b #$10
	LDA.w #$0000
	STA.b $82
	LDA.w #$0000
	STA.b $80
	STZ.b $6F
	STZ.b $73
	STZ.b $77
	STZ.b $7E
	LDA.w #$0060
	STA.b $75
	INC.b $79
	INC.b $79
	LDA.w #$FE30
	STA.b $86
	RTS

CODE_10E66B:
	JSR.w CODE_10E575
	LDA.w $71AA
	CMP.w #$0018
	BCC.b CODE_10E692
	LDA.w $0B8D
	CMP.w #$0020
	BEQ.b CODE_10E692
	LDA.w $0B8F
	EOR.w #$0002
	AND.w #$0002
	STA.w $0B8F
	INC.w $0B8D
	LDA.w #$000A
	STA.b $88
CODE_10E692:
	SEP.b #$20
	LDA.w $6CAD
	INC
	STA.w $6CAD
	REP.b #$20
	LDA.b $86
	BMI.b CODE_10E6BC
	CMP.w #$01B0
	BCC.b CODE_10E6BC
	JSR.w CODE_10E4CC
	JSR.w CODE_10E511
	INC.b $79
	INC.b $79
	LDA.w $0B8F
	EOR.w #$0002
	AND.w #$0002
	STA.w $0B8F
CODE_10E6BC:
	LDY.b $80
	LDA.b $86
	CLC
	ADC.w #$0008
	STA.b $86
	RTS

CODE_10E6C7:
	SEP.b #$20
	LDA.w $6CAD
	INC
	STA.w $6CAD
	LDA.w $6CAE
	BEQ.b CODE_10E6D9
	DEC
	STA.w $6CAE
CODE_10E6D9:
	REP.b #$20
	AND.w #$00FF
	CMP.w #$0010
	BCS.b CODE_10E6E6
	JSR.w CODE_10E575
CODE_10E6E6:
	RTS

CODE_10E6E7:
	REP.b #$10
	LDX.w #$0000
CODE_10E6EC:
	LDA.l DATA_5FF24A,x
	STA.l $701A00,x
	INX
	INX
	CPX.w #$0200
	BCC.b CODE_10E6EC
	LDX.w #$0048
CODE_10E6FE:
	LDA.w DATA_10EE50,x
	STA.w $6CAA,x
	DEX
	DEX
	BPL.b CODE_10E6FE
	JSR.w CODE_10E5FE
	SEP.b #$10
	STZ.b $6F
	STZ.b $77
	STZ.b $7E
	INC.b $79
	INC.b $79
	LDA.w #$0012
	STA.b $80
	STZ.b $75
	LDA.w #$0002
	STA.b !RAM_YI_Global_PlayMusicLo
	RTS

CODE_10E724:
	JSR.w CODE_10E575
	LDA.w $71AA
	CMP.w #$0008
	BCS.b CODE_10E730
	RTS

CODE_10E730:
	LDA.w #$0002
	STA.b $7E
CODE_10E735:
	SEP.b #$20
	LDA.b $6F
	AND.b #$02
	BNE.b CODE_10E761
	LDA.w $6CC4
	CLC
	ADC.b #$01
	STA.w $6CC4
	LDA.w $6CD0
	SEC
	SBC.b #$01
	STA.w $6CD0
	LDA.w $6CDC
	CLC
	ADC.b #$01
	STA.w $6CDC
	LDA.w $6CE8
	SEC
	SBC.b #$01
	STA.w $6CE8
CODE_10E761:
	LDA.w $6CE2
	CLC
	ADC.b #$01
	STA.w $6CE2
	LDA.w $6CEE
	SEC
	SBC.b #$01
	STA.w $6CEE
	LDA.w $6CCA
	CLC
	ADC.b #$01
	STA.w $6CCA
	LDA.w $6CD6
	SEC
	SBC.b #$01
	STA.w $6CD6
	LDA.w $6CCB
	SEC
	SBC.b #$01
	STA.w $6CCB
	STA.w $6CD7
	STA.w $6CE3
	STA.w $6CEF
	REP.b #$20
	LDA.b $6F
	CMP.w #$00A0
	BCC.b CODE_10E7A6
	INC.b $79
	INC.b $79
	STZ.b $7E
CODE_10E7A6:
	RTS

DATA_10E7A7:
	db $1A,$1B,$1C,$1D,$1E,$1F,$20,$1F

CODE_10E7AF:
	INC.b $75
	LDA.b $75
	CMP.w #$0010
	BCC.b CODE_10E7BD
	LDA.w #$0008
	STA.b $75
CODE_10E7BD:
	LSR
	TAY
	LDX.b $80
	SEP.b #$20
	LDA.w DATA_10E7A7,y
	STA.w $6CAF,x
	CPY.b #$04
	BCC.b CODE_10E7EE
	LDA.w $6CAD,x
	SEC
	SBC.b #$03
	STA.w $6CAD,x
	LDA.w $6CAC,x
	CLC
	ADC.b #$03
	STA.w $6CAC,x
	CMP.b #$48
	BCC.b CODE_10E7EE
	REP.b #$20
	LDA.w #$0040
	STA.b $75
	INC.b $79
	INC.b $79
CODE_10E7EE:
	REP.b #$20
	RTS

CODE_10E7F1:
	DEC.b $75
	BNE.b CODE_10E7FB
	INC.b $79
	INC.b $79
	STZ.b $75
CODE_10E7FB:
	RTS

DATA_10E7FC:
	db $21,$22,$23,$24,$25,$26,$27,$28,$29,$2A,$2B

CODE_10E807:
	SEP.b #$20
	INC.b $75
	LDA.b $75
	CMP.b #$0B
	BCC.b CODE_10E813
	LDA.b #$00
CODE_10E813:
	STA.b $75
	TAX
	LDA.w DATA_10E7FC,x
	STA.w $6CB5
	LDA.w $6CB2
	DEC
	DEC
	STA.w $6CB2
	AND.b #$02
	BNE.b CODE_10E83B
	LDA.w $6CB3
	DEC
	STA.w $6CB3
	CMP.b #$C0
	BNE.b CODE_10E83B
	INC.b $79
	INC.b $79
	LDA.b #$08
	STA.b $75
CODE_10E83B:
	REP.b #$20
	LDA.w #$0100
	CLC
	ADC.b $6F
	STA.w $6CB0
	RTS

DATA_10E847:
	dw CODE_10E877
	dw CODE_10E89B
	dw CODE_10E877
	dw CODE_10E89B
	dw CODE_10E89B
	dw CODE_10E89B
	dw CODE_10E877

CODE_10E855:
	LDA.b $75
	AND.w #$FFFE
	TAX
	JSR.w (DATA_10E847,x)
	INC.b $75
	LDA.b $75
	CMP.w #$000E
	BCC.b CODE_10E876
	JSR.w CODE_10E4CC
	JSR.w CODE_10E511
	INC.b $79
	INC.b $79
	LDA.w #$0010
	STA.b $75
CODE_10E876:
	RTS

CODE_10E877:
	LDA.w #$03FF
	STA.l $701610
	STA.l $701630
	STA.l $701650
	STA.l $701670
	STA.l $701810
	STA.l $701830
	STA.l $701850
	STA.l $701870
	RTS

CODE_10E89B:
	LDA.w #$1041
	STA.l $701610
	LDA.w #$1400
	STA.l $701630
	LDA.w #$1800
	STA.l $701650
	LDA.w #$1C00
	STA.l $701670
	RTS

CODE_10E8B8:
	REP.b #$10
	LDX.w #$0000
CODE_10E8BD:
	LDA.l DATA_5FF24A,x
	STA.l $701A00,x
	INX
	INX
	CPX.w #$0200
	BCC.b CODE_10E8BD
	LDX.w #$0000
CODE_10E8CF:
	LDA.l DATA_5FF44A,x
	STA.l $701A80,x
	INX
	INX
	CPX.w #$0020
	BCC.b CODE_10E8CF
	LDA.l DATA_5FF44A
	STA.l $701A00
	JSR.w CODE_10E5FE
	SEP.b #$10
	LDA.w #$0080
	STA.b $75
	LDA.w #$FFFF
	STA.w $6CAA
	INC.b $79
	INC.b $79
	RTS

CODE_10E8FB:
	DEC.b $75
	BNE.b CODE_10E90B
	JSR.w CODE_10E4CC
	JSR.w CODE_10E511
	INC.b $79
	INC.b $79
	STZ.b $75
CODE_10E90B:
	RTS

CODE_10E90C:
	JSR.w CODE_10E530
	LDA.w $71AA
	BEQ.b CODE_10E921
	DEC.w $71AA
	LDA.b $8C
	AND.w #$0002
	BNE.b CODE_10E921
	INC.w $71AA
CODE_10E921:
	RTS

CODE_10E922:
	REP.b #$10
	LDX.w #$0000
CODE_10E927:
	LDA.l DATA_5FF24A,x
	STA.l $701A00,x
	INX
	INX
	CPX.w #$0200
	BCC.b CODE_10E927
	JSR.w CODE_10E5FE
	LDA.w #$0340
	STA.w $0BD7
	SEP.b #$10
	LDX.b #$00
CODE_10E943:
	LDA.l DATA_5FF1CA,x
	STA.l $701A00,x
	INX
	INX
	CPX.b #$80
	BCC.b CODE_10E943
	LDA.w #$337F
	STA.l $701AB2
	STA.l $701AB4
	LDA.w #$0009
	STA.b $88
	LDA.w #$0030
	STA.b $75
	INC.b $79
	INC.b $79
	RTS

CODE_10E96B:
	LDA.b $75
	DEC
	BNE.b CODE_10E975
	LDA.w #$000A
	STA.b $88
CODE_10E975:
	DEC.b $75
	BNE.b CODE_10E991
	LDA.w $0B8F
	EOR.w #$0002
	AND.w #$0002
	STA.w $0B8F
	INC.w $0B8D
	INC.b $79
	INC.b $79
	LDA.w #$0170
	STA.b $75
CODE_10E991:
	RTS

CODE_10E992:
	DEC.b $75
	BNE.b CODE_10E9AB
	LDA.w $0B8F
	EOR.w #$0002
	AND.w #$0002
	STA.w $0B8F
	INC.b $79
	INC.b $79
	LDA.w #$0030
	STA.b $75
CODE_10E9AB:
	RTS

DATA_10E9AC:
	db $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C

DATA_10E9B9:
	db $0D,$8F,$12,$10

DATA_10E9BD:
	db $0E,$0D,$0E,$10

DATA_10E9C1:
	db $8F,$12,$10,$10

DATA_10E9C5:
	db $8F,$10,$10,$8F

CODE_10E9C9:
	REP.b #$10
	LDY.b $80
	LDA.b $86
	BNE.b CODE_10E9DC
	LDA.b $77
	BEQ.b CODE_10E9D9
	CLC
	ADC.w #$0300
CODE_10E9D9:
	CLC
	ADC.b $6F
CODE_10E9DC:
	STA.w $6CAA,y
	LDA.b $77
	BEQ.b CODE_10E9ED
	LDA.b $73
	BEQ.b CODE_10E9ED
	CLC
	ADC.w #$0002
	STA.b $73
CODE_10E9ED:
	INC.b $75
	LDA.b $75
	CMP.w #$000D
	BCC.b CODE_10E9F9
	LDA.w #$0000
CODE_10E9F9:
	STA.b $75
	TAX
	SEP.b #$20
	LDA.b $71
	STA.w $6CAC,y
	LDA.b $73
	BEQ.b CODE_10EA0A
	STA.w $6CAD,y
CODE_10EA0A:
	LDA.w DATA_10E9AC,x
	CLC
	ADC.b $82
	STA.w $6CAF,y
	SEP.b #$30
	LDA.b $84
	BNE.b CODE_10EA41
	LDA.b $70
	BNE.b CODE_10EA41
	LDA.b $6F
	BNE.b CODE_10EA41
	LDA.b $8A
	INC
	AND.b #$03
	STA.b $8A
	TAX
	LDA.w DATA_10E9B9,x
	STA.w $6EE9
	LDA.w DATA_10E9BD,x
	STA.w $6E65
	LDA.w DATA_10E9C1,x
	STA.w $6E8F
	LDA.w DATA_10E9C5,x
	STA.w $6E2F
CODE_10EA41:
	REP.b #$20
	RTS

DATA_10EA44:
	dw $05C0,$E872,$1040,$05C0,$E044,$1040,$05C0,$E216
	dw $1040,$05C0,$D8E8,$1040,$05C0,$E8BA,$1040,$05C0
	dw $E08C,$1040,$05A0,$2600,$9440,$0580,$E062,$1040
	dw $0580,$D834,$1040,$0580,$E806,$1040,$0580,$D8D8
	dw $1040,$0580,$E0AA,$1040,$057C,$0210,$1040,$057C
	dw $06EC,$1040,$0578,$0A26,$1040,$0578,$0DD7,$1040
	dw $0570,$24B9,$1040,$0570,$2452,$1040,$0568,$1416
	dw $1040,$0568,$1CE8,$1040,$0568,$0CC0,$1240,$0560
	dw $1E44,$1040,$0560,$24BA,$1040,$055C,$1A00,$1240
	dw $0558,$1A5F,$1040,$0558,$1AAC,$1040,$0540,$E27F
	dw $1040,$0540,$D851,$1040,$0540,$E023,$1040,$0540
	dw $E8F5,$1040,$0540,$E0C7,$1040,$0540,$D899,$1040
	dw $0500,$D872,$1040,$0500,$DE44,$1040,$0500,$E816
	dw $1040,$0500,$E0E8,$1040,$0500,$D8BA,$1040,$0500
	dw $E28C,$1040,$04C0,$E872,$1040,$04C0,$E044,$1040
	dw $04C0,$E216,$1040,$04C0,$D8E8,$1040,$04C0,$E8BA
	dw $1040,$04C0,$E08C,$1040,$0480,$E062,$1040,$0480
	dw $D834,$1040,$0480,$F006,$1040,$0480,$D8D8,$1040
	dw $0480,$E0AA,$1040,$0470,$D8F8,$1240,$0440,$E27F
	dw $1040,$0440,$D851,$1040,$0440,$E023,$1040,$0440
	dw $E8F5,$1040,$0440,$E0C7,$1040,$0440,$D899,$1040
	dw $0400,$D872,$1040,$0400,$DE44,$1040,$0400,$E816
	dw $1040,$0400,$E0E8,$1040,$0400,$D8BA,$1040,$0400
	dw $E28C,$1040,$03E0,$A060,$1240,$03E0,$B0A0,$1240
	dw $03E0,$E020,$8F30,$03C0,$D87F,$1040,$03C0,$E051
	dw $1040,$03C0,$E823,$1040,$03C0,$D8F5,$1040,$03C0
	dw $D2C7,$1040,$03C0,$E899,$1040,$03A0,$9090,$1340
	dw $03A0,$B070,$1240,$03A0,$E010,$0E40,$0380,$F062
	dw $1040,$0380,$E034,$1040,$0380,$D806,$1040,$0380
	dw $DED8,$1040,$0380,$E8AA,$1040,$0380,$E670,$1140
	dw $0360,$F0E0,$8F40,$0340,$E872,$1040,$0340,$E044
	dw $1040,$0340,$E216,$1040,$0340,$D8E8,$1040,$0340
	dw $E8BA,$1040,$0340,$E08C,$1040,$0320,$9000,$1340
	dw $0300,$E062,$1040,$0300,$D834,$1040,$0300,$F006
	dw $1040,$0300,$D8D8,$1040,$0300,$E0AA,$1040,$02E0
	dw $A060,$1240,$02E0,$B0E0,$1240,$02E0,$00C0,$0D40
	dw $02C0,$E27F,$1040,$02C0,$D851,$1040,$02C0,$E023
	dw $1040,$02C0,$E8F5,$1040,$02C0,$E0C7,$1040,$02C0
	dw $D899,$1040,$02C0,$D67F,$1140,$02A0,$B030,$1240
	dw $0280,$D872,$1040,$0280,$DE44,$1040,$0280,$E816
	dw $1040,$0280,$E0E8,$1040,$0280,$D8BA,$1040,$0280
	dw $E28C,$1040,$0280,$D68C,$1140,$0260,$9050,$1340
	dw $0240,$D87F,$1040,$0240,$E051,$1040,$0240,$E823
	dw $1040,$0240,$D8F5,$1040,$0240,$D2C7,$1040,$0240
	dw $E899,$1040,$0200,$F062,$1040,$0200,$E034,$1040
	dw $0200,$D806,$1040,$0200,$DED8,$1040,$0200,$E8AA
	dw $1040,$01C0,$E872,$1040,$01C0,$E044,$1040,$01C0
	dw $E216,$1040,$01C0,$D8E8,$1040,$01C0,$E8BA,$1040
	dw $01C0,$E08C,$1040,$0180,$E062,$1040,$0180,$D834
	dw $1040,$0180,$E806,$1040,$0180,$D8D8,$1040,$0180
	dw $E0AA,$1040,$0140,$E27F,$1040,$0140,$D851,$1040
	dw $0140,$E023,$1040,$0140,$E8F5,$1040,$0140,$E0C7
	dw $1040,$0140,$D899,$1040,$0100,$D872,$1040,$0100
	dw $DE44,$1040,$0100,$E816,$1040,$0100,$E0E8,$1040
	dw $0100,$D8BA,$1040,$0100,$E28C,$1040,$00C0,$E872
	dw $1040,$00C0,$E044,$1040,$00C0,$E216,$1040,$00C0
	dw $D8E8,$1040,$00C0,$E8BA,$1040,$00C0,$E08C,$1040
	dw $0080,$E062,$1040,$0080,$D834,$1040,$0080,$F006
	dw $1040,$0080,$D8D8,$1040,$0080,$E0AA,$1040,$0070
	dw $D8F8,$1240,$0040,$E27F,$1040,$0040,$D851,$1040
	dw $0040,$E023,$1040,$0040,$E8F5,$1040,$0040,$E0C7
	dw $1040,$0040,$D899,$1040,$0000,$D872,$1040,$0000
	dw $DE44,$1040,$0000,$E816,$1040,$0000,$E0E8,$1040
	dw $0000,$D8BA,$1040,$0000,$E28C,$1040,$0000,$B000
	dw $C010,$FFFF

DATA_10EE48:
	dw $0000,$B400,$C020,$FFFF

DATA_10EE50:
	dw $0130,$4000,$96B0,$0300,$1070,$2140,$0110,$2800
	dw $1540,$0100,$2018,$1A40,$00E0,$300C,$D840,$00D0
	dw $F818,$D740,$00E0,$30F4,$D940,$00D0,$F8D8,$D740
	dw $00D0,$3030,$D854,$00A0,$F828,$D750,$00D0,$30C8
	dw $D954,$00A0,$F8C8,$D750,$FFFF

DATA_10EE9A:
	dw DATA_10EEE3,DATA_10F12D

DATA_10EE9E:
	dw DATA_10EEA2,DATA_10F0EC

DATA_10EEA2:
	db $08,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$60,$00,$00,$00,$40,$00,$00
	db $00,$20,$00,$00,$02,$00,$00,$00,$02,$55,$00,$00,$02,$AA,$00,$00
	db $04,$00,$00,$00,$04,$04,$00,$00,$04,$08,$00,$00,$06,$00,$00,$00
	db $FF

DATA_10EEE3:
	db $2B,$42,$42,$00,$00,$B6,$19,$00,$00,$CD,$C7,$00,$00,$19,$EA,$00
	db $00,$26,$31,$00,$00,$FA,$1F,$58,$00,$FA,$1E,$58,$00,$B0,$00,$00
	db $00,$C7,$C7,$00,$00,$30,$30,$42,$00,$30,$30,$40,$00,$30,$30,$44
	db $00,$12,$52,$1A,$00,$12,$52,$1A,$00,$12,$52,$1A,$00,$30,$30,$1A
	db $01,$F7,$F6,$00,$02,$D6,$E3,$00,$03,$FE,$24,$00,$03,$D0,$0C,$00
	db $07,$D9,$2E,$00,$0B,$9D,$FE,$00,$0B,$C4,$28,$00,$0B,$D2,$45,$00
	db $09,$10,$DE,$04,$09,$24,$DF,$04,$09,$23,$F3,$04,$09,$0E,$F1,$04
	db $0A,$19,$EA,$04,$05,$26,$31,$04,$0C,$1A,$D2,$00,$0C,$1E,$BF,$00
	db $0C,$1C,$C8,$00,$0F,$F1,$DD,$00,$0F,$3D,$D6,$00,$0F,$4D,$DD,$00
	db $0F,$36,$EE,$00,$11,$51,$00,$00,$13,$2F,$4B,$00,$13,$28,$5A,$00
	db $13,$43,$38,$00,$11,$16,$32,$00,$11,$37,$54,$00,$11,$3D,$59,$00
	db $12,$12,$00,$00,$12,$1E,$FE,$00,$12,$2C,$ED,$00,$12,$00,$E1,$00
	db $12,$42,$C6,$00,$08,$F6,$47,$00,$13,$19,$26,$00,$13,$32,$23,$00
	db $13,$46,$16,$00,$0C,$19,$DC,$00,$0C,$06,$E7,$00,$0F,$07,$BD,$00
	db $0F,$2C,$D5,$00,$0F,$2A,$F7,$00,$12,$11,$C2,$00,$12,$FC,$A9,$00
	db $18,$A7,$C9,$00,$18,$B9,$DA,$00,$18,$A8,$E9,$00,$18,$A7,$C0,$00
	db $19,$BD,$3F,$00,$19,$B9,$4C,$00,$19,$BA,$24,$00,$19,$B4,$30,$00
	db $19,$AA,$37,$00,$19,$AB,$0B,$00,$19,$C7,$34,$00,$19,$C6,$4F,$00
	db $07,$B6,$F0,$00,$18,$A8,$D7,$00,$18,$C1,$D3,$00,$19,$A5,$16,$00
	db $19,$9C,$29,$00,$19,$AB,$26,$00,$19,$B3,$05,$00,$08,$23,$10,$00
	db $07,$ED,$B8,$00,$0B,$08,$AD,$00,$0B,$F0,$9F,$00,$13,$5A,$F0,$00
	db $11,$5C,$01,$00,$11,$6B,$02,$00,$11,$4A,$27,$00,$11,$5C,$18,$00
	db $12,$E2,$A6,$00,$12,$02,$9E,$00,$16,$FA,$1E,$58,$15,$D6,$F7,$49
	db $15,$21,$00,$49,$15,$08,$17,$4A,$15,$F8,$3B,$30,$06,$12,$52,$00
	db $15,$EF,$D0,$40,$15,$DE,$1F,$40,$1B,$D9,$E5,$43,$1B,$DD,$E8,$43
	db $1B,$E2,$EB,$45,$1B,$E6,$EE,$47,$1B,$EB,$F0,$4C,$1B,$F1,$F3,$50
	db $1B,$F7,$FA,$53,$1B,$F7,$FD,$53,$1B,$F7,$02,$54,$1B,$F7,$08,$55
	db $1B,$F8,$0F,$58,$1B,$F8,$15,$5B,$1B,$D2,$05,$36,$1B,$D2,$FE,$37
	db $1B,$D3,$F8,$39,$1B,$D4,$F2,$3B,$1B,$D5,$EB,$3E,$0A,$B6,$19,$04
	db $04,$CD,$C7,$04,$18,$D5,$BA,$00,$18,$C1,$C5,$00,$10,$D7,$B7,$00
	db $10,$E0,$CA,$00,$10,$B4,$D2,$00,$10,$B4,$BF,$00,$0D,$DE,$50,$00
	db $10,$B4,$D2,$00,$10,$B4,$BF,$00,$0D,$DE,$50,$00,$FF

DATA_10F0E0:
	dw $01CC,$01D0,$0070,$0074,$0168,$0070

DATA_10F0EC:
	db $08,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $04,$00,$00,$00,$04,$04,$00,$00,$04,$08,$00,$00,$00,$00,$00,$00
	db $FF

DATA_10F12D:
	db $31,$0A,$20,$50,$00,$00,$B0,$00,$00,$39,$C7,$00,$00,$50,$00,$00
	db $00,$39,$39,$00,$00,$00,$50,$00,$00,$09,$16,$00,$00,$B0,$00,$00
	db $00,$C7,$C7,$00,$00,$30,$30,$42,$00,$30,$30,$40,$00,$30,$30,$44
	db $00,$3D,$06,$1A,$00,$3D,$06,$1A,$00,$3D,$06,$1A,$00,$30,$30,$00
	db $15,$30,$30,$1A,$02,$DC,$22,$00,$03,$F2,$43,$00,$03,$0B,$E6,$00
	db $6E,$0B,$58,$00,$6E,$06,$BF,$00,$6E,$C1,$09,$00,$6E,$D8,$C0,$00
	db $6E,$33,$E6,$00,$6F,$DA,$05,$00,$6F,$BE,$2A,$00,$6F,$04,$2D,$00
	db $73,$09,$16,$00,$6C,$C2,$47,$00,$6C,$D8,$4B,$00,$6C,$B0,$E2,$00
	db $6C,$E6,$EC,$00,$6C,$38,$C8,$00,$6D,$4A,$F4,$00,$6D,$D9,$F5,$00
	db $10,$55,$DD,$00,$10,$AD,$1F,$00,$1A,$38,$27,$00,$1A,$2D,$26,$00
	db $1A,$23,$27,$00,$1A,$19,$20,$00,$1A,$1E,$23,$00,$5C,$E7,$66,$00
	db $5D,$EA,$59,$00,$61,$60,$29,$00,$61,$67,$14,$00,$61,$61,$00,$00
	db $62,$5F,$1A,$00,$62,$66,$22,$00,$66,$B7,$3A,$00,$67,$AA,$2F,$00
	db $67,$A2,$0C,$00,$68,$B0,$FF,$00,$68,$CD,$54,$00,$60,$37,$5C,$00
	db $60,$1D,$58,$00,$5C,$42,$4E,$00,$5C,$17,$6C,$00,$5C,$26,$5F,$00
	db $5B,$39,$52,$00,$61,$6A,$01,$00,$61,$5F,$0A,$00,$62,$67,$0B,$00
	db $62,$5F,$EB,$00,$06,$3D,$06,$00,$15,$20,$05,$40,$15,$1F,$3C,$30
	db $15,$EC,$FB,$30,$15,$C8,$3C,$20,$15,$D0,$E7,$20,$15,$1C,$D5,$20
	db $15,$0A,$20,$50,$15,$E8,$14,$50,$0E,$C2,$EB,$00,$0E,$EF,$01,$00
	db $0E,$23,$45,$00,$FF

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
DATA_4CF4D9:
	incbin "LevelData/DATA_4CF4D9.bin"

DATA_4CF9FC:
	incbin "LevelData/DATA_4CF9FC.bin"

DATA_4CFA82:
	incbin "LevelData/DATA_4CFA82.bin"

DATA_4CFC7A:
	incbin "LevelData/DATA_4CFC7A.bin"

DATA_4CFD2F:
	incbin "LevelData/DATA_4CFD2F.bin"

DATA_4CFE27:
	incbin "LevelData/DATA_4CFE27.bin"

DATA_4CFE3B:
	incbin "LevelData/DATA_4CFE3B.bin"

DATA_4CFE9A:
	incbin "LevelData/DATA_4CFE9A.bin"

	%InsertGarbageData($10FC40, incbin, DATA_10FC40_YI_U2.bin)
else
DATA_10F262:
	incbin "LevelData/DATA_10F262.bin"

DATA_10F4FA:
	incbin "LevelData/DATA_10F4FA.bin"

DATA_10F595:
	incbin "LevelData/DATA_10F595.bin"

DATA_10F6EF:
	incbin "LevelData/DATA_10F6EF.bin"

DATA_10F8DF:
	incbin "LevelData/DATA_10F8DF.bin"

DATA_10F9D3:
	incbin "LevelData/DATA_10F9D3.bin"

DATA_10FB77:
	incbin "LevelData/DATA_10FB77.bin"

DATA_10FBF2:
	incbin "LevelData/DATA_10FBF2.bin"

DATA_10FCE5:
	incbin "LevelData/DATA_10FCE5.bin"

DATA_10FD92:
	incbin "LevelData/DATA_10FD92.bin"

DATA_10FDA3:
	incbin "LevelData/DATA_10FDA3.bin"

DATA_10FE9E:
	incbin "LevelData/DATA_10FE9E.bin"

DATA_10FF39:
	incbin "LevelData/DATA_10FF39.bin"

DATA_10FF8F:
	incbin "LevelData/DATA_10FF8F.bin"

	%FREE_BYTES($10FFA3, 93, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank11Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_118000:
	SEP.b #$30
	JSL.l CODE_119D5A
	JSL.l CODE_008277
	JSL.l CODE_01AF6E
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	REP.b #$20
	LDX.b #$1C
CODE_11801A:
	STZ.w !RAM_YI_Level_LevelHeaderBackgroundColorLo,x
	DEX
	DEX
	BPL.b CODE_11801A
	STZ.w !RAM_YI_Level_ItemBeingUsed
	SEP.b #$20
	LDA.w $03A7
	LSR
	TAY
	JSL.l CODE_00B49E
	LDX.b #$2A
	JSL.l CODE_00BDA2
	JSL.l CODE_01D5B3
	REP.b #$30
	LDA.w #$0020
	STA.w $6126
	LDA.w #$4000
	STA.w $60A4
	STA.w $60A6
	LDY.w #$005C
	LDA.w #$0000
CODE_118050:
	STA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_118050
	LDY.w $03A7
	JSL.l CODE_00BB70
	LDA.b #$09
	STA.w $0127
	JSL.l CODE_00E37B
	LDA.b #$02
	STA.w !RAM_YI_Global_PlayMusicLo
	STZ.w $0205
	LDX.w $03A7
	JSR.w (DATA_1180CD,x)
	REP.b #$20
	LDA.w #$8000
	STA.w $61B2
	STZ.w $7DF6
	INC.w $7FEE
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w $03A7
	LSR
	CLC
	ADC.w #$0120
	STA.l $704070
	SEP.b #$20
	STZ.w $038C
	LDA.b #!Define_YI_GameMode2F
	STA.w !RAM_YI_Global_CurrentGameMode
	INC.w !RAM_YI_Level_MessageBoxState 
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	ORA.b #$40
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDA.b #$04
	STA.w !RAM_YI_Level_LevelHeaderAnimationTilesetLo
	STZ.w $0121
	LDA.b #$04
	STA.w $0125
	LDA.b #$50
	STA.w !REGISTER_HCountTimerLo
	LDA.b #$D8
	STA.w !REGISTER_VCountTimerLo
	LDA.b #$B1
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	PLB
	RTL

DATA_1180CD:
	dw CODE_1180E8
	dw CODE_1180EE
	dw CODE_1180F4
	dw CODE_11B6DC
	dw CODE_11AD79
	dw CODE_119D91
	dw CODE_119D98
	dw CODE_11B764
	dw CODE_1180E5
	dw CODE_11B76E
	dw CODE_11C506
	dw CODE_1180FA

CODE_1180E5:
	SEP.b #$30
	RTS

CODE_1180E8:
	LDY.b #$03
	LDX.b #$00
	BRA.b CODE_11810A

CODE_1180EE:
	LDY.b #$04
	LDX.b #$00
	BRA.b CODE_11810A

CODE_1180F4:
	LDY.b #$05
	LDX.b #$00
	BRA.b CODE_11810A

CODE_1180FA:
	LDY.b #$03
	LDX.b #$01
	BRA.b CODE_11810A

CODE_118100:
	LDY.b #$04
	LDX.b #$01
	BRA.b CODE_11810A

CODE_118106:
	LDY.b #$05
	LDX.b #$01
CODE_11810A:
	STY.w $1170
	STX.w $10F2
	LDA.w !RAM_YI_Global_BG1AddressAndSize
	EOR.b #$03
	STA.w !RAM_YI_Global_BG1AddressAndSize
	STA.w !REGISTER_BG1AddressAndSize
	LDA.w !RAM_YI_Global_BG2AddressAndSize
	EOR.b #$03
	STA.w !RAM_YI_Global_BG2AddressAndSize
	STA.w !REGISTER_BG2AddressAndSize
	REP.b #$20
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	LDA.w #$0017
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	LDA.w #$0030
	STA.w $70E2
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$00B0
	STA.w $7182
	LDA.w #$00E0
	STA.w $70E4
	LDA.w #$00D8
	STA.w $7184
	LDA.w #$0061
	STA.w $70E6
	LDA.w #$0035
	STA.w $7186
	LDA.w #$00C0
	STA.w $10FE
	LDA.w #$00C0
	STA.w $1100
	STA.w $1164
	STZ.w $1102
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	LDA.w #$0001
	STA.w $797C
	STZ.w $1108
	STZ.w $1128
	STZ.w $1138
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	LSR
	BCC.b CODE_118191
	LDA.w #$FFF0
	BRA.b CODE_118194

CODE_118191:
	LDA.w #$0010
CODE_118194:
	STA.w $7224
	STZ.w $797A
	LDA.w #$0001
	STA.w $10F6
	LDA.w #$301F
	STA.l YI_Global_PaletteMirror[$C5].LowByte
	SEP.b #$20
	LDA.b #$B4
	STA.w $118C
	STZ.w !REGISTER_DividendLo
	STA.w !REGISTER_DividendHi
	LDA.b #$48
	STA.w !REGISTER_Divisor
	NOP #8
	LDA.w !REGISTER_QuotientLo
	STA.w $118E
	LDA.w !REGISTER_QuotientHi
	STA.w $118F
	LDA.b #$09
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STZ.w !RAM_YI_Global_ColorMathSelectAndEnable
	JSR.w CODE_119134
	RTS

CODE_1181D9:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BEQ.b CODE_1181EA
	JSL.l CODE_01DE5A
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_1181EA
	JSR.w CODE_118216
CODE_1181EA:
	LDX.w $03A7
	JSR.w (DATA_1181F2,x)
	PLB
	RTL

DATA_1181F2:
	dw CODE_11825E
	dw CODE_11825E
	dw CODE_11825E
	dw CODE_11B6DD
	dw CODE_11AE1A
	dw CODE_119E88
	dw CODE_119E88
	dw CODE_11B765
	dw CODE_1180E5
	dw CODE_11B85C
	dw CODE_11C5FA
	dw CODE_11825E

DATA_11820A:
	db $A2,$A2,$A2,$A3,$A3,$A4,$A4,$A6,$A7,$A5,$A5,$A2

CODE_118216:
	LDA.w $03A7
	LSR
	REP.b #$30
	AND.w #$00FF
	TAY
	LDA.w DATA_11820A,y
	AND.w #$00FF
	JSL.l CODE_00B753
	LDX.w #$706800>>16
	STX.b $01
	LDX.w #$706800
	LDY.w #$3400
	JSL.l CODE_00BEA6
	LDX.w #$0000
CODE_11823C:
	LDA.l DATA_5FE3CC,x
	STA.l YI_Global_PaletteMirror[$01].LowByte,x
	INX
	INX
	CPX.w #$001E
	BCC.b CODE_11823C
	SEP.b #$30
	LDA.w !RAM_YI_Global_HDMAEnable
	EOR.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
	LDA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	EOR.b #$40
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	RTS

CODE_11825E:
	REP.b #$20
	LDY.w $1194
	LDA.w $093C,y
	STA.w $0035
	LDA.w $093E,y
	STA.w $0037
	JSL.l CODE_008259
	JSL.l CODE_0394CF
	JSR.w CODE_118D8D
	JSR.w CODE_1187FD
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_118293
	LDA.w !RAM_YI_Global_HDMAEnable
	BIT.b #$08
	BNE.b CODE_118290
	JSR.w CODE_11942C
	JSL.l CODE_119C27
CODE_118290:
	JSR.w CODE_1182BB
CODE_118293:
	JSR.w CODE_118D73
	REP.b #$20
	LDA.l $7E4000
	CMP.w #$0020
	BCS.b CODE_1182A4
	JSR.w CODE_11912F
CODE_1182A4:
	LDA.w $10F8
	BEQ.b CODE_1182AD
	JSL.l CODE_0397D3
CODE_1182AD:
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

CODE_1182BB:
	LDA.w $797C
	ASL
	TAY
	LDA.w DATA_1182CD,y
	STA.b $00
	LDA.w DATA_1182CD+$01,y
	STA.b $01
	JMP.w ($0000)

DATA_1182CD:
	dw CODE_1182D3
	dw CODE_118443
	dw CODE_1184EC

CODE_1182D3:
	REP.b #$30
	LDA.b $30
	AND.w #$0003
	BEQ.b CODE_1182DF
	JMP.w CODE_11836D

CODE_1182DF:
	LDA.w $1164
	AND.w #$01F0
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	ORA.w #$001F
	STA.l YI_Global_PaletteMirror[$C5].LowByte
	LDA.w $1164
	INC
	STA.w $1164
	CMP.w #$01FF
	BCC.b CODE_11836D
	LDA.w #$0002
	STA.w $797C
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	BNE.b CODE_11833C
	LDA.w #$0003
	STA.w $797A
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	LDA.w #$00C0
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
	LDA.w #$009D
	STA.b $00
	SEP.b #$20
	LDA.b #$FE
	STA.w $1107
	LDA.b #$08
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror
	STZ.w $1106
	STZ.w $1126
	STZ.w $1136
	REP.b #$20
	BRA.b CODE_11834D

CODE_11833C:
	LDA.w #$0004
	STA.w $797A
	LDA.w #$0003
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	LDA.w #$009E
	STA.b $00
CODE_11834D:
	REP.b #$30
	LDA.w #$01FF
	STA.w $1164
	LDA.w $1154
	LDA.w $1156
	LDA.w $1144
	LDA.w $1146
	STZ.w $114A
	STZ.w $115A
	STZ.w $116A
	STZ.w $1168
CODE_11836D:
	LDA.w $1168
	BEQ.b CODE_11839D
	DEC.w $1168
	LDA.w $1100
	SEC
	SBC.w #$0003
	STA.w $1100
	LDA.w $10FE
	CLC
	ADC.w #$0003
	CMP.w #$01FF
	BCC.b CODE_11838E
	LDA.w #$01FF
CODE_11838E:
	STA.w $10FE
	LDA.b $30
	AND.w #$0003
	BNE.b CODE_1183D0
	INC.w $7186
	BRA.b CODE_1183D0

CODE_11839D:
	LDA.w $1100
	CLC
	ADC.w #$0003
	CMP.w $1164
	BCC.b CODE_1183AC
	LDA.w $1164
CODE_1183AC:
	STA.w $1100
	LDA.w $10FE
	SEC
	SBC.w #$0003
	CMP.w $1164
	BCS.b CODE_1183BE
	LDA.w $1164
CODE_1183BE:
	STA.w $10FE
	LDA.w $7186
	DEC
	CMP.w #$0090
	BCS.b CODE_1183CD
	LDA.w #$0090
CODE_1183CD:
	STA.w $7186
CODE_1183D0:
	JSR.w CODE_1183D6
	SEP.b #$30
	RTS

CODE_1183D6:
	REP.b #$30
	LDY.w $6092
	LDX.w #$0000
	STZ.b $02
CODE_1183E0:
	STZ.b $00
CODE_1183E2:
	LDA.w $70E6
	CLC
	ADC.b $00
	STA.w $6000,y
	LDA.w $7186
	CLC
	ADC.b $02
	STA.w $6002,y
	LDA.w DATA_118433,x
	AND.w #$00FF
	ORA.w #$2900
	STA.w $6004,y
	LDA.w #$0002
	STA.w $6006,y
	TYA
	CLC
	ADC.w #$0008
	TAY
	INX
	INC.b $04
	INC.b $04
	LDA.b $00
	CLC
	ADC.w #$0010
	STA.b $00
	CMP.w #$0040
	BCC.b CODE_1183E2
	STZ.b $00
	LDA.b $02
	CLC
	ADC.w #$0010
	STA.b $02
	CMP.w #$0040
	BCC.b CODE_1183E0
	STY.w $6092
	SEP.b #$30
	RTS

DATA_118433:
	db $C0,$C2,$C4,$C6,$E0,$E2,$E4,$E6,$C8,$CA,$CC,$CE,$E8,$EA,$EC,$EE

CODE_118443:
	LDY.b #$00
	LDX.b #$04
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	CMP.b #$02
	BEQ.b CODE_118457
	LDA.w $797A
	CMP.b #$02
	BNE.b CODE_11845E
	LDY.b #$02
CODE_118457:
	LDA.w $1105,y
	CMP.b #$FD
	BEQ.b CODE_11846E
CODE_11845E:
	LDA.b #$0D
	STA.b $00
	LDA.b #$03
	STA.b $02
	LDA.b #$00
	JSR.w CODE_119073
	JSR.w CODE_1190EB
CODE_11846E:
	JSR.w CODE_118FDE
	LDA.w $70E2,x
	CMP.b #$26
	BCS.b CODE_1184A9
	LDA.b #$26
	STA.w $70E2,x
	LDA.b #$90
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.b #$01
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	STZ.w $1154
	STZ.w $1144
	STZ.w $116E
	LDA.b #$08
	STA.w $1168
	LDA.b #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	STZ.w $1194
	JSR.w CODE_1195A7
	JSR.w CODE_1195E8
	BRA.b CODE_1184E8

CODE_1184A9:
	CMP.b #$9D
	BCC.b CODE_1184E8
	LDA.b #$9C
	STA.w $70E2,x
	LDA.b #$90
	STA.w $7182,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.b #$01
	STA.w $797A
	STZ.w $1156
	STZ.w $1146
	STZ.w $116E
	LDA.b #$08
	STA.w $1168
	LDA.b #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.w $10F2
	BEQ.b CODE_1184E5
	LDA.b #$04
	STA.w $1194
	JSR.w CODE_1195A7
	JSR.w CODE_1195E8
	BRA.b CODE_1184E8

CODE_1184E5:
	JSR.w CODE_118C58
CODE_1184E8:
	JSR.w CODE_1183D6
	RTS

CODE_1184EC:
	LDA.w $116A
	ASL
	TAY
	LDA.w DATA_1184FE,y
	STA.b $00
	LDA.w DATA_1184FE+$01,y
	STA.b $01
	JMP.w ($0000)

DATA_1184FE:
	dw CODE_11850E
	dw CODE_118532
	dw CODE_118557
	dw CODE_1185A8
	dw CODE_1185CC
	dw CODE_1185F0
	dw CODE_118614
	dw CODE_11867E

CODE_11850E:
	REP.b #$30
	LDA.w #$0004
	STA.b $00
	LDA.w #$0002
	STA.b $0A
	LDA.w #$006A
	STA.b $0C
	LDX.w #$0000
	JSR.w CODE_118682
	JSR.w CODE_1183D6
	INC.w $116A
	LDA.b #!Define_YI_SoundID86_MildePop2
	JSL.l CODE_0085D2
	RTS

CODE_118532:
	REP.b #$30
	LDA.w #$0001
	STA.b $00
	LDA.w #$0002
	STA.b $0A
	LDA.w #$0040
	STA.b $0C
	LDX.w #$0004
	JSR.w CODE_118682
	JSR.w CODE_1183D6
	SEP.b #$30
	INC.w $116A
	LDA.b #$10
	STA.w $1168
	RTS

CODE_118557:
	REP.b #$30
	LDA.w #$0004
	STA.b $00
	LDA.w #$0002
	STA.b $0A
	LDA.w #$0042
	STA.b $0C
	LDX.w #$0005
	JSR.w CODE_118682
	SEP.b #$30
	LDA.b $30
	LSR
	BCS.b CODE_118578
	JSR.w CODE_1183D6
CODE_118578:
	DEC.w $1168
	BNE.b CODE_118585
	INC.w $116A
	LDA.b #$02
	STA.w $1168
CODE_118585:
	REP.b #$30
	LDA.w $10FE
	SEC
	SBC.w #$0010
	BPL.b CODE_118593
	LDA.w #$0001
CODE_118593:
	STA.w $10FE
	LDA.w $1100
	SEC
	SBC.w #$0010
	BPL.b CODE_1185A2
	LDA.w #$0001
CODE_1185A2:
	STA.w $1100
	SEP.b #$30
	RTS

CODE_1185A8:
	REP.b #$30
	LDA.w #$0010
	STA.b $00
	STZ.b $0A
	LDA.w #$00E3
	STA.b $0C
	LDX.w #$0009
	JSR.w CODE_118682
	SEP.b #$30
	DEC.w $1168
	BNE.b CODE_1185CB
	INC.w $116A
	LDA.b #$02
	STA.w $1168
CODE_1185CB:
	RTS

CODE_1185CC:
	REP.b #$30
	LDA.w #$0020
	STA.b $00
	STZ.b $0A
	LDA.w #$00E3
	STA.b $0C
	LDX.w #$0019
	JSR.w CODE_118682
	SEP.b #$30
	DEC.w $1168
	BNE.b CODE_1185EF
	INC.w $116A
	LDA.b #$02
	STA.w $1168
CODE_1185EF:
	RTS

CODE_1185F0:
	REP.b #$30
	LDA.w #$0020
	STA.b $00
	STZ.b $0A
	LDA.w #$00E3
	STA.b $0C
	LDX.w #$0039
	JSR.w CODE_118682
	SEP.b #$30
	DEC.w $1168
	BNE.b CODE_118613
	INC.w $116A
	LDA.b #$02
	STA.w $1168
CODE_118613:
	RTS

CODE_118614:
	REP.b #$30
	LDA.w #$0008
	STA.b $00
	LDA.w #$0002
	STA.b $0A
	LDA.w #$00E5
	STA.b $0C
	LDX.w #$0059
	JSR.w CODE_118682
	SEP.b #$30
	DEC.w $1168
	BNE.b CODE_11867D
	INC.w $116A
	INC.w $10E2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	CMP.b #$04
	BEQ.b CODE_118644
	INC.w $10E6
	BRA.b CODE_11867A

CODE_118644:
	LDA.w $10F2
	BEQ.b CODE_11864E
	INC.w $10FA
	BRA.b CODE_11867A

CODE_11864E:
	REP.b #$20
	LDA.w #$0011
	JSL.l CODE_03A34C
	BCC.b CODE_11867A
	PHX
	LDA.w $1170
	SEC
	SBC.w #$0003
	CLC
	ADC.w #$000A
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0080
	STA.w $7182,y
	LDA.w #$0038
	STA.w $70E2,y
	PLX
	INC.w $10F8
	SEP.b #$20
CODE_11867A:
	JSR.w CODE_1191C4
CODE_11867D:
	RTS

CODE_11867E:
	JSR.w CODE_1191C4
	RTS

CODE_118682:
	REP.b #$30
	LDY.w $6092
CODE_118687:
	LDA.w DATA_11873B,x
	CLC
	ADC.w #$0020
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_118699
	ORA.w #$FF00
CODE_118699:
	CLC
	ADC.w $70E6
	STA.w $6000,y
	LDA.w DATA_1186DA,x
	CLC
	ADC.w #$0020
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_1186B2
	ORA.w #$FF00
CODE_1186B2:
	CLC
	ADC.w $7186
	STA.w $6002,y
	LDA.w DATA_11879B,x
	AND.w #$FF00
	ORA.b $0C
	STA.w $6004,y
	LDA.b $0A
	STA.w $6006,y
	INX
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_118687
	STY.w $6092
	SEP.b #$30
	RTS

DATA_1186DA:
	db $00,$00,$F0,$F0,$F8,$00,$00,$F0,$F0,$08,$08,$00,$00,$F8,$F0,$F0
	db $F8,$08,$F0,$08,$F0,$00,$00,$F8,$F8,$F4,$F4,$EC,$EC,$F4,$F4,$EC
	db $EC,$0C,$0C,$04,$04,$0C,$0C,$04,$04,$10,$10,$08,$08,$F0,$F0,$E8
	db $E8,$00,$00,$F8,$F8,$00,$00,$F8,$F8,$F0,$F0,$E8,$E8,$00,$00,$F8
	db $F8,$10,$10,$08,$08,$18,$18,$10,$10,$10,$10,$08,$08,$00,$00,$F8
	db $F8,$F0,$F0,$E8,$E8,$E8,$E8,$E0,$E0,$F8,$10,$18,$10,$F8,$E0,$D8
	db $E0

DATA_11873B:
	db $00,$F0,$00,$F0,$F8,$F0,$00,$00,$F0,$00,$F8,$F0,$08,$08,$00,$F8
	db $F0,$08,$08,$F0,$F0,$00,$F8,$00,$F8,$F4,$EC,$F4,$EC,$0C,$04,$0C
	db $04,$0C,$04,$0C,$04,$F4,$EC,$F4,$EC,$00,$F8,$00,$F8,$00,$F8,$00
	db $F8,$10,$08,$10,$08,$F0,$E8,$F0,$E8,$F0,$E8,$E8,$F0,$E8,$E0,$E0
	db $E8,$F0,$E8,$E8,$F0,$00,$F8,$F8,$00,$10,$08,$08,$10,$18,$10,$10
	db $18,$10,$08,$08,$10,$00,$F8,$F8,$00,$D8,$E0,$F8,$10,$18,$10,$F8

DATA_11879B:
	db $E0,$F0,$B0,$70,$30,$30,$B2,$F2,$72,$32,$B0,$F0,$30,$70,$F0,$30
	db $70,$B0,$F0,$70,$B0,$30,$30,$70,$B0,$F0,$F0,$B0,$70,$30,$F0,$B0
	db $70,$30,$F0,$B0,$70,$30,$F0,$B0,$70,$30,$F0,$B0,$70,$30,$F0,$B0
	db $70,$30,$F0,$B0,$70,$30,$F0,$B0,$70,$30,$F0,$B0,$30,$70,$F0,$B0
	db $30,$70,$F0,$B0,$30,$70,$F0,$B0,$30,$70,$F0,$B0,$30,$70,$F0,$B0
	db $30,$70,$F0,$B0,$30,$70,$F0,$B0,$30,$70,$30,$30,$30,$70,$70,$70
	db $70,$30

CODE_1187FD:
	LDA.w $797A
	ASL
	TAY
	LDA.w DATA_11880F,y
	STA.b $00
	LDA.w DATA_11880F+$01,y
	STA.b $01
	JMP.w ($0000)

DATA_11880F:
	dw CODE_118819
	dw CODE_1188FB
	dw CODE_118A1F
	dw CODE_118B0E
	dw CODE_118C54

CODE_118819:
	LDY.w $1156
	LDA.w $1146
	BEQ.b CODE_118826
	DEC.w $1146
	BRA.b CODE_118835

CODE_118826:
	INY
	CPY.b #$04
	BCC.b CODE_11882D
	LDY.b #$00
CODE_11882D:
	STY.w $1156
	LDA.b #$10
	STA.w $1146
CODE_118835:
	REP.b #$30
	TYA
	ASL
	ASL
	CLC
	ADC.w $1156
	ASL
	TAX
	LDY.w $6092
	LDA.w #$0005
	STA.b $00
CODE_118848:
	LDA.w DATA_1188AB,x
	CLC
	ADC.w $70E4
	STA.w $6000,y
	LDA.w DATA_1188D3,x
	CLC
	ADC.w $7184
	STA.w $6002,y
	LDA.w DATA_118883,x
	STA.w $6004,y
	AND.w #$FF00
	SEC
	SBC.w #$3100
	BEQ.b CODE_11886E
	LDA.w #$0002
CODE_11886E:
	STA.w $6006,y
	INX
	INX
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_118848
	STY.w $6092
	SEP.b #$30
	RTS

DATA_118883:
	dw $319E,$319E,$318B,$318A,$3388,$319E,$319E,$318B
	dw $318A,$3388,$3388,$319E,$319E,$318B,$318A,$319E
	dw $319E,$318B,$318A,$3388

DATA_1188AB:
	dw $FFEB,$FFE0,$FFE8,$FFE0,$FFE0,$FFEB,$FFE0,$FFE8
	dw $FFE0,$FFDF,$FFDE,$FFEB,$FFE0,$FFE8,$FFE0,$FFEB
	dw $FFE0,$FFE8,$FFE0,$FFDF

DATA_1188D3:
	dw $FFF0,$FFF0,$FFED,$FFED,$FFDE,$FFF0,$FFF0,$FFED
	dw $FFED,$FFDE,$FFDF,$FFF0,$FFF0,$FFED,$FFED,$FFF0
	dw $FFF0,$FFED,$FFED,$FFDE

CODE_1188FB:
	LDA.w $10F2
	BEQ.b CODE_118903
	JMP.w CODE_1189A5

CODE_118903:
	LDA.w $118A
	BEQ.b CODE_118919
	JSR.w CODE_119B79
	DEC.w $118A
	BEQ.b CODE_118913
	JMP.w CODE_1189A1

CODE_118913:
	STZ.w $116E
	JSR.w CODE_118C58
CODE_118919:
	LDA.w $116E
	ASL
	TAX
	LDA.w $1172,x
	DEC
	STA.w $1172,x
	BNE.b CODE_11894B
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	CMP.b #$02
	BCS.b CODE_11893F
	LDA.b #$20
	STA.w $118A
	LDA.b #!Define_YI_SoundID90_Incorrect
	JSL.l CODE_0085D2
	BRA.b CODE_1189A1

CODE_11893F:
	INC.w $116E
	LDA.b #!Define_YI_SoundID8F_Correct
	JSL.l CODE_0085D2
	JSR.w CODE_1199F8
CODE_11894B:
	DEC.w $1166
	BEQ.b CODE_118958
	JSR.w CODE_119AC6
	JSR.w CODE_119B99
	BRA.b CODE_1189A1

CODE_118958:
	LDA.b #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.b #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	LDA.b #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
	LDA.b #$02
	STA.w $797A
	LDA.b #$01
	STA.w $797C
	STZ.w $1146
	STZ.w $1156
	LDA.b #$FD
	STA.w $1107
	LDA.b #$FD
	STA.w $1109
	STZ.w $1106
	STZ.w $1108
	STZ.w $1126
	STZ.w $1128
	LDA.b #$F0
	STA.w $7224
	STZ.w $1138
	STZ.w $1168
	STZ.w $116A
	JSR.w CODE_11942C
CODE_1189A1:
	JSR.w CODE_118819
	RTS

CODE_1189A5:
	LDA.w $118A
	BEQ.b CODE_1189BC
	DEC.w $118A
	BNE.b CODE_1189B5
	STZ.w $116E
	JSR.w CODE_1195E8
CODE_1189B5:
	JSR.w CODE_118819
	JSR.w CODE_119B79
	RTS

CODE_1189BC:
	JSR.w CODE_119B99
	REP.b #$20
	DEC.w $116C
	BNE.b CODE_1189EA
CODE_1189C6:
	LDA.w #!Define_YI_SoundID90_Incorrect
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $118A
	LDA.w $118C
	STA.w $116C
	REP.b #$20
	LDA.w #$0048
	STA.w $1192
	STZ.w $1190
	JSR.w CODE_119BF4
	JMP.w CODE_118A19

CODE_1189EA:
	JSR.w CODE_119AC6
	REP.b #$20
	LDA.w $116E
	ASL
	TAX
	LDA.b $37
	BEQ.b CODE_118A19
	CMP.w $1172,x
	BNE.b CODE_1189C6
	LDA.w #!Define_YI_SoundID8F_Correct
	JSL.l CODE_0085D2
	INC.w $116E
	LDA.w $1170
	CMP.w $116E
	BCC.b CODE_118A14
	JSR.w CODE_119902
	BRA.b CODE_118A19

CODE_118A14:
	SEP.b #$20
	JMP.w CODE_118958

CODE_118A19:
	SEP.b #$20
	JSR.w CODE_118819
	RTS

CODE_118A1F:
	LDA.b #$20
	STA.b $00
	LDA.b #$04
	STA.b $02
	LDX.b #$02
	LDA.b #$00
	JSR.w CODE_119073
	LDA.w $7184
	CMP.b #$D8
	BCC.b CODE_118A43
	LDA.b #$D8
	STA.w $7184
	STZ.w $797A
	STZ.w $1146
	STZ.w $1156
CODE_118A43:
	LDA.w $1107
	CLC
	ADC.b #$03
	TAY
	LDA.w DATA_118A8F,y
	TAX
	REP.b #$30
	LDA.w #$0005
	STA.b $00
	LDY.w $6092
CODE_118A58:
	LDA.w $70E4
	CLC
	ADC.w DATA_118ABE,x
	STA.w $6000,y
	LDA.w $7184
	CLC
	ADC.w DATA_118A96,x
	STA.w $6002,y
	LDA.w DATA_118AE6,x
	STA.w $6004,y
	AND.w #$0200
	BEQ.b CODE_118A7A
	LDA.w #$0002
CODE_118A7A:
	STA.w $6006,y
	INX
	INX
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_118A58
	STY.w $6092
	SEP.b #$30
	RTS

DATA_118A8F:
	db $00,$0A,$0A,$14,$14,$14,$1E

DATA_118A96:
	dw $FFE2,$FFEF,$FFF0,$FFED,$FFED,$FFEF,$FFF0,$FFE8
	dw $FFE8,$FFD9,$FFF0,$FFF0,$FFDA,$FFE8,$FFE8,$FFF1
	dw $FFF1,$FFE2,$FFEF,$FFEF

DATA_118ABE:
	dw $FFDE,$FFEA,$FFE3,$FFE8,$FFE0,$FFE3,$FFE8,$FFE8
	dw $FFE0,$FFE2,$FFE8,$FFE3,$FFE0,$FFE8,$FFE0,$FFE5
	dw $FFE0,$FFDF,$FFE8,$FFE0

DATA_118AE6:
	dw $3388,$319A,$319E,$318B,$318A,$719A,$719A,$318B
	dw $318A,$3388,$B19B,$B19B,$3388,$318B,$318A,$319E
	dw $319E,$3388,$318B,$318A

CODE_118B0E:
	LDX.b #$02
	LDA.b #$20
	STA.b $00
	LDA.b #$04
	STA.b $02
	LDA.b #$00
	JSR.w CODE_119073
	LDA.w $7182,x
	CMP.b #$D8
	BCC.b CODE_118B4D
	LDA.b #$D8
	STA.w $7182,x
	LDA.w $70E2,x
	CLC
	ADC.b #$F6
	STA.w $70EA
	LDA.w $7182,x
	CLC
	ADC.b #$F8
	STA.w $718A
	JSR.w CODE_118F1F
	LDA.b $30
	AND.b #$30
	LSR
	LSR
	LSR
	LSR
	TAY
	LDA.w DATA_118B96,y
	TAX
	BRA.b CODE_118B59

CODE_118B4D:
	JSR.w CODE_1190EB
	LDA.w $1105,x
	INC
	INC
	TAY
	LDX.w DATA_118B9A,y
CODE_118B59:
	REP.b #$30
	LDY.w $6092
	LDA.w #$0005
	STA.b $00
CODE_118B63:
	LDA.w $70E4
	CLC
	ADC.w DATA_118BDC,x
	STA.w $6000,y
	LDA.w $7184
	CLC
	ADC.w DATA_118BA0,x
	STA.w $6002,y
	LDA.w DATA_118C18,x
	STA.w $6004,y
	AND.w #$0200
	XBA
	STA.w $6006,y
	INX
	INX
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_118B63
	STY.w $6092
	SEP.b #$30
	RTS

DATA_118B96:
	dw $281E,$2832

DATA_118B9A:
	db $00,$0A,$14,$1E,$28,$32

DATA_118BA0:
	dw $FFF1,$FFF1,$FFE2,$FFEF,$FFEF,$FFE4,$FFF2,$FFF2
	dw $FFF1,$FFF1,$FFF3,$FFF3,$FFE6,$FFF3,$FFF3,$FFF3
	dw $FFF3,$FFE5,$FFF2,$FFF2,$FFF3,$FFF3,$FFE4,$FFF2
	dw $FFF2,$FFF3,$FFF3,$FFE4,$FFF2,$FFF2

DATA_118BDC:
	dw $FFE5,$FFE0,$FFDF,$FFE8,$FFE0,$FFDF,$FFE4,$FFDF
	dw $FFE9,$FFE1,$FFDC,$FFE1,$FFDF,$FFE9,$FFE1,$FFDC
	dw $FFE1,$FFDF,$FFE9,$FFE1,$FFDC,$FFE1,$FFE0,$FFE9
	dw $FFE1,$FFDC,$FFE1,$FFE1,$FFE9,$FFE1

DATA_118C18:
	dw $319E,$319E,$3388,$318B,$318A,$3388,$319A,$319A
	dw $318B,$318A,$319B,$319B,$3388,$318B,$318A,$319B
	dw $319B,$3388,$318B,$318A,$319B,$319B,$3388,$318B
	dw $318A,$319B,$319B,$3388,$318B,$318A

CODE_118C54:
	JMP.w CODE_118819

CODE_118C57:
	RTS

CODE_118C58:
	JSR.w CODE_119BF4
	LDX.b #$0B
CODE_118C5D:
	STZ.w $1172,x
	DEX
	BPL.b CODE_118C5D
	LDA.w $1165
	BEQ.b CODE_118C78
	LDA.w $1164
	CMP.b #$80
	BCC.b CODE_118C78
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	BMI.b CODE_118CB6
CODE_118C78:
	LDA.w $1170
	ASL
	TAX
	STZ.b $00
CODE_118C7F:
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.b #$1F
	CMP.b #$18
	BCC.b CODE_118C98
	CMP.b #$1C
	BCS.b CODE_118C95
	SEC
	SBC.b #$18
	BRA.b CODE_118C98

CODE_118C95:
	SEC
	SBC.b #$08
CODE_118C98:
	CLC
	ADC.b #$08
	STA.w $1172,x
	CLC
	ADC.b $00
	STA.b $00
	DEX
	DEX
	BPL.b CODE_118C7F
	LDA.b $00
	CMP.b #$B4
	BCC.b CODE_118CAF
	LDA.b #$B4
CODE_118CAF:
	STA.w $1166
	JSR.w CODE_11976D
	RTS

CODE_118CB6:
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.b #$7F
	CLC
	ADC.b #$30
	STA.w $1166
	STA.w !REGISTER_DividendLo
	STZ.w !REGISTER_DividendHi
	LDA.w $1170
	INC
	STA.w !REGISTER_Divisor
	NOP #8
	LDA.w !REGISTER_QuotientLo
	STA.b $00
	LDA.w $1170
	ASL
	STA.b $0A
	LDX.b #$00
	STZ.b $02
CODE_118CE9:
	LDA.b $00
	STA.w $1172,x
	CLC
	ADC.b $02
	STA.b $02
	INX
	INX
	CPX.b $0A
	BNE.b CODE_118CE9
	LDA.w $1166
	SEC
	SBC.b $02
	STA.w $1172,x
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.b #$06
	TAX
	JSR.w (DATA_118D16,x)
	JSR.w CODE_11976D
	STZ.w $116E
	RTS

DATA_118D16:
	dw CODE_118D1F
	dw CODE_118D1F
	dw CODE_118D4B
	dw CODE_118D4B

CODE_118D1E:
	RTS

CODE_118D1F:
	LDA.w $1170
	ASL
	TAY
	STZ.b $00
CODE_118D26:
	LDA.w $1172,y
	SEC
	SBC.b #$08
	CLC
	ADC.b $00
	STA.b $00
	LDA.b #$08
	STA.w $1172,y
	DEY
	DEY
	CPY.b #$02
	BNE.b CODE_118D26
	LDA.b $00
	LSR
	CLC
	ADC.w $1172
	STA.w $1172
	INC
	STA.w $1174
	RTS

CODE_118D4B:
	LDA.w $1170
	DEC
	ASL
	TAY
	PHY
	STZ.b $00
CODE_118D54:
	LDA.w $1172,y
	SEC
	SBC.b #$08
	CLC
	ADC.b $00
	STA.b $00
	LDA.b #$08
	STA.w $1172,y
	DEY
	DEY
	BPL.b CODE_118D54
	PLY
	LDA.w $1174,y
	CLC
	ADC.b $00
	STA.w $1174,y
	RTS

CODE_118D73:
	LDA.w $038C
	BNE.b CODE_118D88
	REP.b #$20
	LDA.w $70E2
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $7182
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEP.b #$20
CODE_118D88:
	JSL.l CODE_04FA67
	RTS

CODE_118D8D:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	ASL
	TAY
	LDA.w DATA_118D9F,y
	STA.b $00
	LDA.w DATA_118D9F+$01,y
	STA.b $01
	JMP.w ($0000)

DATA_118D9F:
	dw CODE_118DA9
	dw CODE_118DBB
	dw CODE_118DEA
	dw CODE_118E1C
	dw CODE_118E7C

CODE_118DA9:
	JSL.l CODE_008408
	REP.b #$20
	LDX.b #FXCODE_0BC6C5>>16
	LDA.w #FXCODE_0BC6C5
	JSL.l !RAM_YI_Global_RT_00DECF
	SEP.b #$20
	RTS

CODE_118DBB:
	JSR.w CODE_119845
	LDY.w $1154
	LDA.w $1144
	BEQ.b CODE_118DCB
	DEC.w $1144
	BRA.b CODE_118DDB

CODE_118DCB:
	INY
	CPY.b #$04
	BCC.b CODE_118DD2
	LDY.b #$00
CODE_118DD2:
	STY.w $1154
	LDA.w DATA_118DE6,y
	STA.w $1144
CODE_118DDB:
	LDA.w DATA_118DE2,y
	STA.w $60BE
	RTS

DATA_118DE2:
	db $0D,$00,$4D,$00

DATA_118DE6:
	db $20,$06,$06,$06

CODE_118DEA:
	LDA.b #$20
	STA.b $00
	LDA.b #$04
	STA.b $02
	LDX.b #$00
	TXA
	JSR.w CODE_119073
	LDA.w $7182
	CMP.b #$B0
	BCC.b CODE_118E0D
	LDA.b #$B0
	STA.w $7182
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	STZ.w $1154
	STZ.w $1144
CODE_118E0D:
	LDA.w $1105
	BPL.b CODE_118E16
	LDA.b #$06
	BRA.b CODE_118E18

CODE_118E16:
	LDA.b #$07
CODE_118E18:
	STA.w $60BE
	RTS

CODE_118E1C:
	LDY.w $1154
	LDA.w $1144
	BEQ.b CODE_118E29
	DEC.w $1144
	BRA.b CODE_118E39

CODE_118E29:
	INY
	CPY.b #$11
	BCC.b CODE_118E30
	LDY.b #$10
CODE_118E30:
	STY.w $1154
	LDA.w DATA_108E6A,y
	STA.w $1144
CODE_118E39:
	LDA.w DATA_118E59,y
	STA.w $60BE
	CPY.b #$10
	BNE.b CODE_118E58
	LDA.w $70E2
	CLC
	ADC.b #$28
	STA.w $70EA
	LDA.w $7182
	CLC
	ADC.b #$24
	STA.w $718A
	JSR.w CODE_118F1F
CODE_118E58:
	RTS

DATA_118E59:
	db $74,$73,$72,$71,$70,$6F,$74,$73,$72,$71,$70,$6F,$6C,$6D,$6E,$6D
	db $6E

DATA_108E6A:
	db $03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03
	db $03

CODE_118E7B:
	RTS

CODE_118E7C:
	LDA.w $10F2
	BEQ.b CODE_118E85
	LDY.b #$00
	BRA.b CODE_118EE4

CODE_118E85:
	DEC.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror
	BNE.b CODE_118EB2
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
	INC
	INC
	CMP.b #$1E
	BCC.b CODE_118E98
	LDA.b #$1E
CODE_118E98:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
	LSR
	TAY
	LDA.w DATA_118F0F,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D8|!EXRAMBankMirror
	CPY.b #$04
	BNE.b CODE_118EB2
	LDA.b #$FC
	STA.w $1105
	STZ.w $1104
	STZ.w $1124
CODE_118EB2:
	LDA.w $1105
	BNE.b CODE_118EBE
	LDA.w $7182
	CMP.b #$B0
	BEQ.b CODE_118EE1
CODE_118EBE:
	LDA.b #$20
	STA.b $00
	LDA.b #$04
	STA.b $02
	LDX.b #$00
	TXA
	JSR.w CODE_119073
	LDA.w $7182
	CMP.b #$B0
	BCC.b CODE_118EE1
	LDA.b #$B0
	STA.w $7182
	STZ.w $1105
	STZ.w $1104
	STZ.w $1124
CODE_118EE1:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror
CODE_118EE4:
	REP.b #$20
	LDA.w DATA_118EEF,y
	STA.w $60BE
	SEP.b #$20
	RTS

DATA_118EEF:
	dw $0000,$01AA,$01AC,$01AD,$01AB,$0021,$0022,$0023
	dw $0024,$0025,$0026,$0027,$01AC,$01AD,$01AC,$0000

DATA_118F0F:
	dw $2030,$0802,$030C,$0303,$0303,$2203,$0402,$FF02

CODE_118F1F:
	LDA.w $114C
	BEQ.b CODE_118F29
	DEC.w $114C
	BRA.b CODE_118F3B

CODE_118F29:
	INC.w $115C
	LDA.b #$03
	STA.w $114C
	LDA.w $115C
	CMP.b #$06
	BNE.b CODE_118F3B
	STZ.w $115C
CODE_118F3B:
	LDA.w $115C
	ASL
	ASL
	ASL
	TAX
	REP.b #$30
	LDA.w #$0004
	STA.b $00
	LDY.w $6092
CODE_118F4C:
	LDA.w DATA_118F7E,x
	CLC
	ADC.w $70EA
	STA.w $6000,y
	LDA.w #$FFE0
	CLC
	ADC.w $718A
	STA.w $6002,y
	LDA.w DATA_118FAE,x
	STA.w $6004,y
	LDA.w #$0000
	STA.w $6006,y
	INX
	INX
	TYA
	CLC
	ADC.w #$0008
	TAY
	DEC.b $00
	BNE.b CODE_118F4C
	STY.w $6092
	SEP.b #$30
	RTS

DATA_118F7E:
	dw $FFEC,$FFEC,$FFF8,$FFE0,$FFEF,$FFE9,$FFF7,$FFE1
	dw $FFE2,$FFF2,$FFE6,$FFF6,$FFE4,$FFF4,$FFE4,$FFF4
	dw $FFE6,$FFF6,$FFE2,$FFF2,$FFE9,$FFF7,$FFE1,$FFEF

DATA_118FAE:
	dw $351A,$350A,$350A,$351A,$351A,$350A,$350A,$351A
	dw $351A,$351A,$350A,$350A,$351A,$351A,$350A,$350A
	dw $351A,$351A,$350A,$350A,$351A,$351A,$350A,$350A

CODE_118FDE:
	LDY.w $116A
	INC.w $1168
	LDA.w $1168
	CMP.w DATA_119055,y
	BCC.b CODE_118FF2
	STZ.w $1168
	INC.w $116A
CODE_118FF2:
	TYA
	ASL
	TAY
	LDA.w DATA_119002,y
	STA.b $00
	LDA.w DATA_119002+$01,y
	STA.b $01
	JMP.w ($0000)

DATA_119002:
	dw CODE_119014
	dw CODE_119034
	dw CODE_119034
	dw CODE_119014
	dw CODE_119014
	dw CODE_119034
	dw CODE_119034
	dw CODE_119014
	dw CODE_119014

CODE_119014:
	REP.b #$20
	LDA.w $1100
	SEC
	SBC.w DATA_11905F,y
	STA.w $1100
	LDA.w $10FE
	CLC
	ADC.w DATA_11905F,y
	CMP.w #$01FF
	BCC.b CODE_11902F
	LDA.w #$01FF
CODE_11902F:
	STA.w $10FE
	BRA.b CODE_119052

CODE_119034:
	REP.b #$20
	LDA.w $10FE
	SEC
	SBC.w DATA_11905F,y
	STA.w $10FE
	LDA.w $1100
	CLC
	ADC.w DATA_11905F,y
	CMP.w #$01FF
	BCC.b CODE_11904F
	LDA.w #$01FF
CODE_11904F:
	STA.w $1100
CODE_119052:
	SEP.b #$20
	RTS

DATA_119055:
	db $10,$13,$10,$10,$0E,$0E,$0E,$0E,$0E,$0E

DATA_11905F:
	dw $0006,$0005,$0004,$0004,$0004,$0004,$0004,$0003
	dw $0003,$0003

CODE_119073:
	PHA
	LDA.w $1124,x
	CLC
	ADC.w $1104,x
	STA.w $1124,x
	LDY.b #$00
	LDA.w $1105,x
	BPL.b CODE_119086
	DEY
CODE_119086:
	STY.b $07
	ADC.w $7182,x
	STA.w $7182,x
	LDA.w $7183,x
	ADC.b $07
	STA.w $7183,x
	LDA.w $1104,x
	CLC
	ADC.b $00
	STA.w $1104,x
	LDA.w $1105,x
	ADC.b #$00
	STA.w $1105,x
	CMP.b $02
	BMI.b CODE_1190BA
	LDA.w $1104,x
	CMP.b #$80
	BCC.b CODE_1190BA
	LDA.b $02
	STA.w $1105,x
	STZ.w $1104,x
CODE_1190BA:
	PLA
	BEQ.b CODE_1190EA
	LDA.b $02
	EOR.b #$FF
	INC
	STA.b $07
	LDA.w $1104,x
	SEC
	SBC.b $01
	STA.w $1104,x
	LDA.w $1105,x
	SBC.b #$00
	STA.w $1105,x
	CMP.b $07
	BPL.b CODE_1190EA
	LDA.w $1104,x
	CMP.b #$80
	BCS.b CODE_1190EA
	LDA.b $07
	STA.w $1105,x
	LDA.b #$FF
	STA.w $1104,x
CODE_1190EA:
	RTS

CODE_1190EB:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ASL
	ASL
	ASL
	ASL
	STA.b $01
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LSR
	LSR
	LSR
	LSR
	CMP.b #$08
	BCC.b CODE_119101
	ORA.b #$F0
CODE_119101:
	STA.b $00
	LDY.b #$00
	CMP.b #$00
	BPL.b CODE_11910A
	DEY
CODE_11910A:
	STY.b $02
	LDA.w $1134,x
	CLC
	ADC.b $01
	STA.w $1134,x
	LDA.b #$00
	ROL
	PHA
	ROR
	LDA.w $70E2,x
	ADC.b $00
	STA.w $70E2,x
	LDA.w $70E3,x
	ADC.b $02
	STA.w $70E3,x
	PLA
	CLC
	ADC.b $00
	RTS

CODE_11912F:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_119168
CODE_119134:
	REP.b #$20
	LDA.w $1100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w $10FE
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $1102
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w #(FXDATA_548000+$40E1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w #FXDATA_548000+$40E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	STZ.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_088945>>16
	LDA.w #FXCODE_088945
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	SEP.b #$30
CODE_119168:
	RTS

CODE_119169:
	REP.b #$30
	LDA.w $10E6
	BEQ.b CODE_119175
	LDA.w #$009E
	BRA.b CODE_119178

CODE_119175:
	LDA.w #$009D
CODE_119178:
	STA.b $00
	ASL
	CLC
	ADC.b $00
	TAX
	LDA.l DATA_06F95E,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.l DATA_06F95E+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$4E00
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEP.b #$10
	LDX.b #FXCODE_08A980>>16
	LDA.w #FXCODE_08A980
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$30
	LDX.w #$704E00
	LDA.w #$704E00>>16
	STA.b $01
	LDY.w #$3C00
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

CODE_1191B8:
	SEP.b #$20
	PHB
	LDA.b #DATA_1191D9>>16
	PHA
	PLB
	JSR.w CODE_1191C4
	PLB
	RTL

CODE_1191C4:
	SEP.b #$20
	LDA.w $10E2
	DEC
	ASL
	TAY
	LDA.w DATA_1191D9,y
	STA.b $00
	LDA.w DATA_1191D9+$01,y
	STA.b $01
	JMP.w ($0000)

DATA_1191D9:
	dw CODE_11922A
	dw CODE_1192B6
	dw CODE_1191DF

CODE_1191DF:
	REP.b #$20
	DEC.w !RAM_YI_Global_Layer2YPosLo
	INC.w !RAM_YI_Global_Layer2XPosLo
	LDA.w $10E6
	BNE.b CODE_1191FE
	LDA.w $10FA
	BEQ.b CODE_11920D
	LDA.w $03A7
	CMP.w #$0014
	BEQ.b CODE_1191FE
	LDA.w $60C0
	BNE.b CODE_11920D
CODE_1191FE:
	LDA.w #$0001
	STA.w $10F4
	DEC.w $10E4
	BNE.b CODE_11920D
	JSL.l CODE_11AD2A
CODE_11920D:
	SEP.b #$20
	LDA.w $10FC
	BEQ.b CODE_119229
	DEC.w $10FC
	BNE.b CODE_119229
	LDA.w $03A7
	CMP.b #$06
	BCC.b CODE_119229
	CMP.b #$14
	BCS.b CODE_119229
	LDA.b #$06
	STA.w !RAM_YI_Global_PlayMusicLo
CODE_119229:
	RTS

CODE_11922A:
	JSR.w CODE_119169
	SEP.b #$20
	LDA.b #$42
	STA.w HDMA[$05].Parameters
	LDA.b #!REGISTER_BG2HorizScrollOffset
	STA.w HDMA[$05].Destination
	LDA.b #$7E5B98
	STA.w HDMA[$05].SourceLo
	LDA.b #$7E5B98>>8
	STA.w HDMA[$05].SourceHi
	LDA.b #$7E5B98>>16
	STA.w HDMA[$05].SourceBank
	LDA.b #$7E
	STA.w HDMA[$05].IndirectSourceBank
	PHB
	LDA.b #$7E5040>>16
	PHA
	PLB
	STZ.w $7E5040
	STZ.w $7E5042
	STZ.w $7E5BAD
	LDA.b #$20
	STA.w $7E5B98
	STA.w $7E5B9B
	STA.w $7E5B9E
	STA.w $7E5BA1
	STA.w $7E5BA4
	STA.w $7E5BA7
	STA.w $7E5BAA
	REP.b #$20
	LDA.w #$5040
	STA.w $7E5B99
	STA.w $7E5B9F
	STA.w $7E5BA5
	STA.w $7E5BAB
	LDA.w #$5042
	STA.w $7E5B9C
	STA.w $7E5BA2
	STA.w $7E5BA8
	SEP.b #$20
	PLB
	LDX.w $10E6
	LDA.w DATA_1192B3,x
	STA.w !RAM_YI_Global_PlayMusicLo
	LDA.b #$20
	TSB.w !RAM_YI_Global_HDMAEnable
	INC.w $10E2
	LDA.w $10F6
	BEQ.b CODE_1192AB
	JSR.w CODE_11942C
CODE_1192AB:
	JSR.w CODE_119305
	JSL.l CODE_119CCB
	RTS

DATA_1192B3:
	db $05,$07,$06

CODE_1192B6:
	REP.b #$20
	LDA.w $10E0
	CLC
	ADC.w #$0008
	STA.w $10E0
	CMP.w #$0100
	BCC.b CODE_119302
	SEP.b #$20
	LDA.w !RAM_YI_Global_HDMAEnable
	EOR.b #$20
	STA.w !RAM_YI_Global_HDMAEnable
	LDA.b #$01
	STA.w !RAM_YI_Global_Layer2XPosHi
	STZ.w !RAM_YI_Global_Layer2XPosLo
	LDA.b #$3C
	STA.w !RAM_YI_Global_BG2AddressAndSize
	STA.w !REGISTER_BG2AddressAndSize
	INC.w $10E2
	LDA.w $10E6
	BNE.b CODE_1192F4
	LDA.w $03A7
	CMP.b #$06
	BCC.b CODE_1192F4
	CMP.b #$14
	BCC.b CODE_1192F8
CODE_1192F4:
	LDA.b #$E0
	BRA.b CODE_1192FA

CODE_1192F8:
	LDA.b #$01
CODE_1192FA:
	STA.w $10E4
	LDA.b #$FF
	STA.w $10FC
CODE_119302:
	SEP.b #$20
	RTS

CODE_119305:
	REP.b #$30
	LDA.l $7E4000
	TAX
	LDA.w $10F2
	BEQ.b CODE_119314
	LDA.w #$0003
CODE_119314:
	CLC
	ADC.w $10E6
	ASL
	TAY
	LDA.w DATA_119336,y
	TAY
CODE_11931E:
	LDA.w DATA_119340,y
	STA.l $7E4002,x
	INX
	INX
	INY
	INY
	INC
	BNE.b CODE_11931E
	DEX
	DEX
	TXA
	STA.l $7E4000
	SEP.b #$30
	RTS

DATA_119336:
	dw $0000,$00BA,$00EC,$002E,$0074

DATA_119340:
	db $AC,$35,$11,$00,$20,$25,$21,$25,$22,$25,$7F,$21,$23,$25,$24,$25
	db $32,$E5,$7F,$25,$30,$A5,$CC,$35,$11,$00,$30,$25,$21,$A5,$21,$A5
	db $7F,$21,$33,$25,$34,$25,$32,$25,$7F,$25,$29,$25,$FF,$FF,$A9,$35
	db $1D,$00,$27,$25,$25,$25,$21,$25,$20,$25,$26,$25,$27,$25,$7F,$21
	db $4E,$25,$7F,$21,$23,$25,$24,$25,$32,$E5,$31,$E5,$7F,$21,$30,$A5
	db $C9,$35,$1D,$00,$39,$25,$35,$25,$36,$25,$30,$25,$35,$25,$37,$25
	db $7F,$21,$5E,$25,$7F,$21,$33,$25,$34,$25,$32,$25,$31,$25,$7F,$21
	db $29,$25,$FF,$FF,$AA,$35,$1D,$00,$27,$2D,$25,$2D,$21,$2D,$20,$2D
	db $26,$2D,$27,$2D,$7F,$21,$4F,$2D,$7F,$21,$23,$2D,$24,$2D,$32,$ED
	db $31,$ED,$7F,$21,$30,$AD,$CA,$35,$1D,$00,$39,$2D,$35,$2D,$36,$2D
	db $30,$2D,$35,$2D,$37,$2D,$7F,$21,$5F,$2D,$7F,$21,$33,$2D,$34,$2D
	db $32,$2D,$31,$2D,$7F,$21,$29,$2D,$FF,$FF,$AC,$35,$13,$00,$20,$2D
	db $21,$2D,$22,$2D,$7F,$21,$25,$2D,$21,$2D,$31,$ED,$26,$2D,$7F,$21
	db $30,$AD,$CC,$35,$13,$00,$30,$2D,$21,$AD,$21,$AD,$7F,$21,$35,$2D
	db $21,$AD,$31,$2D,$35,$2D,$7F,$21,$29,$2D,$FF,$FF

CODE_11942C:
	LDA.w $1170
	SEC
	SBC.b #$03
	ASL
	TAX
	REP.b #$30
	LDA.w DATA_119457,x
	TAY
	LDA.l $7E4000
	TAX
CODE_11943F:
	LDA.w DATA_11945D,y
	STA.l $7E4002,x
	INX
	INX
	INY
	INY
	INC
	BNE.b CODE_11943F
	DEX
	DEX
	TXA
	STA.l $7E4000
	SEP.b #$30
	RTS

DATA_119457:
	dw $0000,$005E,$00CC

DATA_11945D:
	db $C5,$34,$07,$80,$55,$A5,$45,$25,$45,$25,$45,$25,$DA,$34,$07,$80
	db $55,$E5,$45,$65,$45,$65,$45,$65,$C6,$34,$27,$40,$56,$A5,$47,$35
	db $23,$40,$60,$25,$67,$35,$23,$40,$60,$25,$E7,$68,$23,$40,$FF,$00
	db $07,$69,$23,$40,$FF,$00,$27,$69,$23,$40,$FF,$00,$45,$35,$03,$00
	db $65,$25,$66,$25,$65,$35,$03,$00,$55,$25,$76,$25,$59,$35,$03,$00
	db $72,$65,$70,$65,$79,$35,$03,$00,$74,$65,$73,$65,$FF,$FF,$C3,$34
	db $07,$80,$55,$A5,$45,$25,$45,$25,$45,$25,$DC,$34,$07,$80,$55,$E5
	db $45,$65,$45,$65,$45,$65,$C4,$34,$2F,$40,$56,$A5,$45,$35,$27,$40
	db $60,$25,$65,$35,$27,$40,$60,$25,$E5,$68,$2B,$40,$FF,$00,$05,$69
	db $2B,$40,$FF,$00,$25,$69,$2B,$40,$FF,$00,$43,$35,$07,$00,$70,$25
	db $71,$25,$67,$25,$66,$25,$63,$35,$07,$00,$73,$25,$74,$25,$75,$25
	db $76,$25,$59,$35,$07,$00,$72,$65,$71,$25,$71,$25,$70,$65,$79,$35
	db $07,$00,$74,$65,$74,$25,$74,$25,$73,$65,$FF,$FF,$C1,$34,$07,$80
	db $55,$A5,$45,$25,$45,$25,$45,$25,$DE,$34,$07,$80,$55,$E5,$45,$65
	db $45,$65,$45,$65,$C2,$34,$37,$40,$56,$A5,$43,$35,$2B,$40,$60,$25
	db $63,$35,$2B,$40,$60,$25,$E3,$68,$33,$40,$FF,$00,$03,$69,$33,$40
	db $FF,$00,$23,$69,$33,$40,$FF,$00,$41,$35,$0B,$00,$70,$25,$71,$25
	db $71,$25,$71,$25,$67,$25,$66,$25,$61,$35,$0B,$00,$73,$25,$74,$25
	db $74,$25,$74,$25,$75,$25,$76,$25,$59,$35,$0B,$00,$72,$65,$71,$25
	db $71,$25,$71,$25,$71,$25,$70,$65,$79,$35,$0B,$00,$74,$65,$74,$25
	db $74,$25,$74,$25,$74,$25,$73,$65,$FF,$FF

CODE_1195A7:
	REP.b #$20
	LDA.w $118C
	STA.w $116C
	STZ.w $1190
	LDA.w #$0048
	STA.w $1192
	STZ.w $116E
	JSR.w CODE_119BF4
	REP.b #$20
	LDA.w $1170
	ASL
	TAX
CODE_1195C5:
	JSL.l CODE_008408
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$000E
	TAY
	LDA.w DATA_1196B7,y
	CMP.w $1174,x
	BEQ.b CODE_1195C5
	STA.w $1172,x
	LDA.w DATA_1196C7,y
	STA.w $117E,x
	DEX
	DEX
	BPL.b CODE_1195C5
	SEP.b #$20
	RTS

CODE_1195E8:
	REP.b #$30
	LDX.w $1170
	LDA.w DATA_119767,x
	AND.w #$00FF
	STA.b $0A
	LDA.l $7E4000
	TAX
	LDA.w #$68A4
	CLC
	ADC.b $0A
	STA.l $7E4002,x
	LDA.w $1170
	INC
	ASL
	ASL
	DEC
	ASL
	DEC
	ORA.w #$4000
	STA.l $7E4004,x
	LDA.w #$31DF
	STA.l $7E4006,x
	TXA
	CLC
	ADC.w #$0006
	TAX
	LDY.w #$0000
CODE_119624:
	TYA
	ASL
	ASL
	CLC
	ADC.w #$6884
	CLC
	ADC.b $0A
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E400C,x
	CLC
	ADC.w #$0020
	STA.l $7E4016,x
	LDA.w #$0005
	STA.l $7E4004,x
	STA.l $7E400E,x
	STA.l $7E4018,x
	PHY
	TYA
	ASL
	TAY
	LDA.w $117E,y
	TAY
	LDA.w DATA_1196D7,y
	STA.l $7E4006,x
	LDA.w DATA_1196D7+$02,y
	STA.l $7E4008,x
	LDA.w DATA_1196D7+$04,y
	STA.l $7E400A,x
	LDA.w DATA_1196D7+$06,y
	STA.l $7E4010,x
	LDA.w DATA_1196D7+$08,y
	STA.l $7E4012,x
	LDA.w DATA_1196D7+$0A,y
	STA.l $7E4014,x
	LDA.w DATA_1196D7+$0C,y
	STA.l $7E401A,x
	LDA.w DATA_1196D7+$0E,y
	STA.l $7E401C,x
	LDA.w DATA_1196D7+$10,y
	STA.l $7E401E,x
	PLY
	TXA
	CLC
	ADC.w #$001E
	TAX
	CPY.w $1170
	BEQ.b CODE_1196A8
	INY
	JMP.w CODE_119624

CODE_1196A8:
	LDA.w #$FFFF
	STA.l $7E4002,x
	TXA
	STA.l $7E4000
	SEP.b #$30
	RTS

DATA_1196B7:
	dw $0100,$0200,$0400,$0800,$8000,$4000,$0080,$0040

DATA_1196C7:
	dw $0000,$0012,$0024,$0036,$0048,$005A,$006C,$007E

DATA_1196D7:
	dw $3DCC,$3DCD,$75CC,$3DDC,$3DDD,$75DC,$BDCC,$BDCD
	dw $F5CC,$35CC,$3DCD,$7DCC,$35DC,$3DDD,$7DDC,$B5CC
	dw $BDCD,$FDCC,$3DCC,$3DCD,$7DCC,$3DDC,$3DDD,$7DDC
	dw $B5CC,$B5CD,$F5CC,$35CC,$35CD,$75CC,$3DDC,$3DDD
	dw $7DDC,$BDCC,$BDCD,$FDCC,$29CE,$29CF,$69CE,$29DE
	dw $29EF,$69DE,$A9CE,$A9CF,$E9CE,$2DCE,$2DCF,$6DCE
	dw $2DDE,$2DFE,$6DDE,$ADCE,$ADCF,$EDCE,$35CE,$35CF
	dw $75CE,$35DE,$35EE,$75DE,$B5CE,$B5CF,$F5CE,$31CE
	dw $31CF,$71CE,$31DE,$31FF,$71DE,$B1CE,$B1CF,$F1CE

DATA_119767:
	dw $0000,$6400,$6062

CODE_11976D:
	REP.b #$30
	LDX.w $1170
	LDA.w DATA_119767,x
	AND.w #$00FF
	STA.b $0A
	LDA.l $7E4000
	TAX
	LDA.w #$68A4
	CLC
	ADC.b $0A
	STA.l $7E4002,x
	LDA.w $1170
	INC
	ASL
	ASL
	DEC
	ASL
	DEC
	ORA.w #$4000
	STA.l $7E4004,x
	LDA.w #$31DF
	STA.l $7E4006,x
	TXA
	CLC
	ADC.w #$0006
	TAX
	LDY.w #$0000
CODE_1197A9:
	TYA
	ASL
	ASL
	CLC
	ADC.w #$6884
	CLC
	ADC.b $0A
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E400C,x
	CLC
	ADC.w #$0020
	STA.l $7E4016,x
	LDA.w #$0005
	STA.l $7E4004,x
	STA.l $7E400E,x
	STA.l $7E4018,x
	LDA.w DATA_119833
	STA.l $7E4006,x
	LDA.w DATA_119833+$02
	STA.l $7E4008,x
	LDA.w DATA_119833+$04
	STA.l $7E400A,x
	LDA.w DATA_119833+$06
	STA.l $7E4010,x
	LDA.w DATA_119833+$08
	STA.l $7E4012,x
	LDA.w DATA_119833+$0A
	STA.l $7E4014,x
	LDA.w DATA_119833+$0C
	STA.l $7E401A,x
	LDA.w DATA_119833+$0E
	STA.l $7E401C,x
	LDA.w DATA_119833+$10
	STA.l $7E401E,x
	TXA
	CLC
	ADC.w #$001E
	TAX
	CPY.w $1170
	BEQ.b CODE_119824
	INY
	JMP.w CODE_1197A9

CODE_119824:
	LDA.w #$FFFF
	STA.l $7E4002,x
	TXA
	STA.l $7E4000
	SEP.b #$30
	RTS

DATA_119833:
	dw $75ED,$35EC,$35ED,$35FB,$35FC,$35FD,$34FF,$35EB
	dw $34FF

CODE_119845:
	LDA.w $118A
	BEQ.b CODE_119859
	DEC.w $118A
	BNE.b CODE_119855
	STZ.w $116E
	JSR.w CODE_1195E8
CODE_119855:
	JSR.w CODE_119B79
	RTS

CODE_119859:
	JSR.w CODE_119B99
	REP.b #$20
	DEC.w $116C
	BNE.b CODE_119887
CODE_119863:
	LDA.w #!Define_YI_SoundID90_Incorrect
	JSL.l CODE_0085D2
	LDA.w #$0020
	STA.w $118A
	LDA.w $118C
	STA.w $116C
	REP.b #$20
	LDA.w #$0048
	STA.w $1192
	STZ.w $1190
	JSR.w CODE_119BF4
	JMP.w CODE_1198FF

CODE_119887:
	JSR.w CODE_119AC6
	REP.b #$20
	LDA.w $116E
	ASL
	TAX
	LDA.b $37
	BEQ.b CODE_1198FF
	CMP.w $1172,x
	BNE.b CODE_119863
	LDA.w #!Define_YI_SoundID8F_Correct
	JSL.l CODE_0085D2
	INC.w $116E
	LDA.w $1170
	CMP.w $116E
	BCC.b CODE_1198B1
	JSR.w CODE_119902
	BRA.b CODE_1198FF

CODE_1198B1:
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	SEP.b #$20
	LDA.b #$02
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror
	LDA.b #$01
	STA.w $797C
	STZ.w $1144
	STZ.w $1154
	LDA.b #$FD
	STA.w $1105
	LDA.b #$FD
	STA.w $1109
	STZ.w $1104
	STZ.w $1108
	STZ.w $1124
	STZ.w $1128
	LDA.b #$10
	STA.w $7224
	STZ.w $1138
	STZ.w $1168
	STZ.w $116A
	JSR.w CODE_11942C
CODE_1198FF:
	SEP.b #$20
	RTS

CODE_119902:
	REP.b #$30
	LDA.w $1170
	DEC
	DEC
	DEC
	ASL
	STA.b $00
	ASL
	ASL
	CLC
	ADC.b $00
	STA.b $00
	LDA.w $116E
	DEC
	ASL
	CLC
	ADC.b $00
	TAY
	LDA.l $7E4000
	TAX
	LDA.w DATA_1199DA,y
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E400C,x
	CLC
	ADC.w #$0020
	STA.l $7E4016,x
	LDA.w #$0005
	STA.l $7E4004,x
	STA.l $7E400E,x
	STA.l $7E4018,x
	LDA.w $116E
	DEC
	ASL
	TAY
	LDA.w $117E,y
	TAY
	LDA.w DATA_1196D7,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4006,x
	LDA.w DATA_1196D7+$02,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4008,x
	LDA.w DATA_1196D7+$04,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E400A,x
	LDA.w DATA_1196D7+$06,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4010,x
	LDA.w DATA_1196D7+$08,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4012,x
	LDA.w DATA_1196D7+$0A,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4014,x
	LDA.w DATA_1196D7+$0C,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E401A,x
	LDA.w DATA_1196D7+$0E,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E401C,x
	LDA.w DATA_1196D7+$10,y
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E401E,x
	LDA.w #$FFFF
	STA.l $7E4020,x
	TXA
	CLC
	ADC.w #$001E
	STA.l $7E4000
	SEP.b #$30
	RTS

DATA_1199DA:
	dw $68E8,$68EC,$68F0,$0000,$0000,$68E6,$68EA,$68EE
	dw $68F2,$0000,$68E4,$68E8,$68EC,$68F0,$68F4

CODE_1199F8:
	REP.b #$30
	LDA.w $1170
	DEC
	DEC
	DEC
	ASL
	STA.b $00
	ASL
	ASL
	CLC
	ADC.b $00
	STA.b $00
	LDA.w $116E
	DEC
	ASL
	CLC
	ADC.b $00
	TAY
	LDA.l $7E4000
	TAX
	LDA.w DATA_1199DA,y
	STA.l $7E4002,x
	CLC
	ADC.w #$0020
	STA.l $7E400C,x
	CLC
	ADC.w #$0020
	STA.l $7E4016,x
	LDA.w #$0005
	STA.l $7E4004,x
	STA.l $7E400E,x
	STA.l $7E4018,x
	LDA.w DATA_119833
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4006,x
	LDA.w DATA_119833+$02
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4008,x
	LDA.w DATA_119833+$04
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E400A,x
	LDA.w DATA_119833+$06
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4010,x
	LDA.w DATA_119833+$08
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4012,x
	LDA.w DATA_119833+$0A
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E4014,x
	LDA.w DATA_119833+$0C
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E401A,x
	LDA.w DATA_119833+$0E
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E401C,x
	LDA.w DATA_119833+$10
	AND.w #$E3FF
	ORA.w #$1800
	STA.l $7E401E,x
	LDA.w #$FFFF
	STA.l $7E4020,x
	TXA
	CLC
	ADC.w #$001E
	STA.l $7E4000
	SEP.b #$30
	RTS

CODE_119AC6:
	JSR.w CODE_119ACC
	JMP.w CODE_119B1E

CODE_119ACC:
	REP.b #$30
	LDY.w $6092
	LDA.w $1170
	DEC
	DEC
	DEC
	ASL
	TAX
	LDA.w DATA_119B73,x
	STA.b $00
	LDA.w $116E
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $00
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.w #$0008
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $118A
	BNE.b CODE_119B0A
	LDA.b $30
	AND.w #$0010
	BEQ.b CODE_119B0A
	LDA.w #$0026
	BRA.b CODE_119B0D

CODE_119B0A:
	LDA.w #$0024
CODE_119B0D:
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0008
	STA.w $6012,y
	STA.w $601A,y
	RTS

CODE_119B1E:
	LDA.b $30
	AND.w #$0010
	BNE.b CODE_119B3F
	LDA.w #$3300
	STA.w $6004,y
	ORA.w #$0010
	STA.w $6014,y
	LDA.w #$7300
	STA.w $600C,y
	ORA.w #$0010
	STA.w $601C,y
	BRA.b CODE_119B57

CODE_119B3F:
	LDA.w #$3300
	STA.w $6004,y
	ORA.w #$0011
	STA.w $6014,y
	LDA.w #$7300
	STA.w $600C,y
	ORA.w #$0011
	STA.w $601C,y
CODE_119B57:
	REP.b #$30
	LDA.w #$0000
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	TYA
	CLC
	ADC.w #$0020
	STA.w $6092
	SEP.b #$30
	RTS

DATA_119B73:
	dw $0044,$0034,$0024

CODE_119B79:
	JSR.w CODE_119ACC
	REP.b #$30
	LDA.w #$3901
	STA.w $6004,y
	LDA.w #$7901
	STA.w $600C,y
	LDA.w #$B901
	STA.w $6014,y
	LDA.w #$F901
	STA.w $601C,y
	JMP.w CODE_119B57

CODE_119B99:
	INC.w $1191
	REP.b #$30
	LDA.w $1190
	SEC
	SBC.w $118E
	BMI.b CODE_119BE9
	STA.w $1190
	DEC.w $1192
	LDA.l $7E4000
	TAX
	LDA.w #$0047
	SEC
	SBC.w $1192
	LSR
	LSR
	CLC
	ADC.w #$3547
	STA.l $7E4002,x
	LDA.w #$0001
	STA.l $7E4004,x
	LDA.w $1192
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_119BEC,y
	STA.l $7E4006,x
	LDA.w #$FFFF
	STA.l $7E4008,x
	TXA
	CLC
	ADC.w #$0006
	STA.l $7E4000
CODE_119BE9:
	SEP.b #$30
	RTS

DATA_119BEC:
	dw $2564,$2563,$2562,$2561

CODE_119BF4:
	REP.b #$30
	LDY.w #$0000
	LDA.l $7E4000
	TAX
CODE_119BFE:
	LDA.w DATA_119C1F,y
	STA.l $7E4002,x
	INX
	INX
	INY
	INY
	INC
	BNE.b CODE_119BFE
	DEX
	DEX
	TXA
	STA.l $7E4000
	LDA.w #$0048
	STA.w $1192
	STZ.w $1190
	SEP.b #$30
	RTS

DATA_119C1F:
	dw $3547,$4023,$2556,$FFFF

CODE_119C27:
	LDX.b #$00
CODE_119C29:
	LDA.w DATA_119CC4,x
	STA.l $7E5B18,x
	BEQ.b CODE_119C35
	INX
	BRA.b CODE_119C29

CODE_119C35:
	REP.b #$30
	LDX.w #$007E
	LDA.w #$00FF
CODE_119C3D:
	STA.l $7E552C,x
	STA.l $7E55AC,x
	STA.l $7E562C,x
	STA.l $7E56AC,x
	DEX
	DEX
	BPL.b CODE_119C3D
	SEP.b #$20
	LDX.w #(!REGISTER_Window1LeftPositionDesignation&$0000FF<<8)+$41
	STX.w HDMA[$03].Parameters
	LDX.w #$7E5B18
	STX.w HDMA[$03].SourceLo
	LDA.b #$7E5B18>>16
	STA.w HDMA[$03].SourceBank
	LDA.b #$7E
	STA.w HDMA[$03].IndirectSourceBank
	LDA.b #$30
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	LDA.b #$30
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	LDA.b #$20
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.b #$00
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.b #$00
	STA.w !RAM_YI_Global_SubScreenWindowMask
	LDA.b #$17
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$02
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$10
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$72
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	LDA.w $1170
	SEC
	SBC.w #$0003
	ASL
	TAX
	LDA.w DATA_119CBE,x
	LDX.w #$0058
CODE_119CA7:
	STA.l $7E552C,x
	INX
	INX
	CPX.w #$00A0
	BNE.b CODE_119CA7
	LDA.w !RAM_YI_Global_HDMAEnable
	ORA.w #$0008
	STA.w !RAM_YI_Global_HDMAEnable
	SEP.b #$30
	RTL

DATA_119CBE:
	db $30,$D0,$20,$E0,$10,$F0

DATA_119CC4:
	db $F8,$2C,$55,$F8,$1C,$56,$00

CODE_119CCB:
	LDX.b #$00
CODE_119CCD:
	LDA.w DATA_119CC4,x
	STA.l $7E5B18,x
	BEQ.b CODE_119CD9
	INX
	BRA.b CODE_119CCD

CODE_119CD9:
	REP.b #$30
	LDX.w #$007E
	LDA.w #$00FF
CODE_119CE1:
	STA.l $7E552C,x
	STA.l $7E55AC,x
	STA.l $7E562C,x
	STA.l $7E56AC,x
	DEX
	DEX
	BPL.b CODE_119CE1
	SEP.b #$20
	LDX.w #(!REGISTER_Window1LeftPositionDesignation&$0000FF<<8)+$41
	STX.w HDMA[$03].Parameters
	LDX.w #$7E5B18
	STX.w HDMA[$03].SourceLo
	LDA.b #$7E5B18>>16
	STA.w HDMA[$03].SourceBank
	LDA.b #$7E
	STA.w HDMA[$03].IndirectSourceBank
	LDA.b #$30
	STA.w !RAM_YI_Global_BG1And2WindowMaskSettings
	LDA.b #$30
	STA.w !RAM_YI_Global_BG3And4WindowMaskSettings
	LDA.b #$20
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.b #$00
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.b #$00
	STA.w !RAM_YI_Global_SubScreenWindowMask
	LDA.b #$17
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$02
	STA.w !RAM_YI_Global_SubScreenLayers
	LDA.b #$10
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	STZ.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	LDA.w #$7F94
	STA.w $0948
	LDA.w #$FF00
	LDX.w #$0000
CODE_119D46:
	STA.l $7E552C,x
	INX
	INX
	CPX.w #$01C0
	BNE.b CODE_119D46
	LDA.w #$0028
	STA.w !RAM_YI_Global_HDMAEnable
	SEP.b #$30
	RTL

CODE_119D5A:
	REP.b #$30
	LDX.w #$007E
	LDA.w #$00FF
CODE_119D62:
	STA.l $7E552C,x
	STA.l $7E55AC,x
	STA.l $7E562C,x
	STA.l $7E56AC,x
	DEX
	DEX
	BPL.b CODE_119D62
	SEP.b #$30
	LDA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	EOR.b #$03
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	LDA.w !RAM_YI_Global_MainScreenWindowMask
	EOR.b #$10
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.w !RAM_YI_Global_HDMAEnable
	AND.b #$F7
	STA.w !RAM_YI_Global_HDMAEnable
	RTL

CODE_119D91:
	REP.b #$20
	LDA.w #$0000
	BRA.b CODE_119D9D

CODE_119D98:
	REP.b #$20
	LDA.w #$0001
CODE_119D9D:
	STA.w $113C
	REP.b #$20
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	LDA.w #$0017
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	SEP.b #$20
	LDA.w !RAM_YI_Global_BG1AddressAndSize
	EOR.b #$03
	STA.w !RAM_YI_Global_BG1AddressAndSize
	STA.w !REGISTER_BG1AddressAndSize
	LDA.w !RAM_YI_Global_BG2AddressAndSize
	EOR.b #$03
	STA.w !RAM_YI_Global_BG2AddressAndSize
	STA.w !REGISTER_BG2AddressAndSize
	REP.b #$30
	LDA.w #$00B0
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $1144
	LDA.w #$0020
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $1142
	STZ.w $6CAA
	STA.w !RAM_YI_Level_StarTimerLo
	LDX.w #$01FE
	LDA.w #$0000
CODE_119DE9:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	DEX
	DEX
	BPL.b CODE_119DE9
	LDX.w #$001E
	LDA.w #$0100
CODE_119DF7:
	STA.l $7F81A0,x
	DEX
	DEX
	BPL.b CODE_119DF7
	LDX.w #$0160
CODE_119E02:
	LDA.w #$0100
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.l $7F801E,x
	TXA
	SEC
	SBC.w #$0020
	TAX
	BNE.b CODE_119E02
	LDX.w #$0018
	LDA.w #$3800
CODE_119E1B:
	STA.l $7F80A0,x
	DEX
	DEX
	CPX.w #$0006
	BCS.b CODE_119E1B
	LDA.w #$0100
	STA.l $7F8002
	STA.l $7F8004
	STA.l $7F801A
	STA.l $7F801C
	STZ.w !RAM_YI_Global_ColorMathSelectAndEnable
	SEP.b #$10
	LDA.w #$01B4
	JSL.l CODE_03A34C
	LDA.w #$01B4
	JSL.l CODE_03A34C
	LDX.b #$0A
CODE_119E4E:
	LDA.w #$01B6
	JSL.l CODE_03A34C
	DEX
	BNE.b CODE_119E4E
	LDA.w #$01B5
	JSL.l CODE_03A34C
	STZ.w $1132
	LDA.w #$0100
	STA.w $1134
	STA.w $1136
	LDX.b #$00
	LDA.w #$F000
	STA.w $7ECE
	STA.w $7ECC
	JSR.w CODE_11A008
	SEP.b #$30
	JSL.l CODE_0397D3
	LDA.b #$09
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STZ.w !RAM_YI_Global_ColorMathSelectAndEnable
	RTS

CODE_119E88:
	JSL.l CODE_008259
	REP.b #$20
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $1142
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.w $1144
	LDA.w $1104
	BEQ.b CODE_119ED0
	LDA.w $60FC
	AND.w #$0001
	EOR.w #$0001
	ORA.w $60AA
	BEQ.b CODE_119EC1
	STZ.w $0035
	STZ.w $0036
	STZ.w $0037
	STZ.w $0038
	LDA.w #$006B
	STA.w $60BE
	BRA.b CODE_119ED0

CODE_119EC1:
	STZ.w $1104
	LDA.w #$0096
	STA.w $61D6
	STZ.w $60A8
	STZ.w $60B4
CODE_119ED0:
	LDA.w $61D6
	CMP.w #$0080
	BCS.b CODE_119EDB
	STZ.w $61D6
CODE_119EDB:
	SEP.b #$20
	JSL.l CODE_0394CF
	JSL.l CODE_04FA67
	LDA.w $10F4
	BNE.b CODE_119EF1
	JSR.w CODE_119F13
	JSL.l CODE_04DD9E
CODE_119EF1:
	LDA.w $1104
	BNE.b CODE_119EF9
	JSR.w CODE_119F89
CODE_119EF9:
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_119F05
	JSL.l CODE_0397D3
	JSR.w CODE_119F40
CODE_119F05:
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

CODE_119F13:
	REP.b #$20
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BPL.b CODE_119F3D
	CMP.w #$FFF0
	BCS.b CODE_119F3D
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w #$0030
	BCS.b CODE_119F2F
	STZ.w $60A8
	LDA.w #$0030
	BRA.b CODE_119F3A

CODE_119F2F:
	CMP.w #$00C1
	BCC.b CODE_119F3A
	STZ.w $60A8
	LDA.w #$00C0
CODE_119F3A:
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_119F3D:
	SEP.b #$20
	RTS

CODE_119F40:
	REP.b #$20
	LDA.w $10F4
	BEQ.b CODE_119F48
	RTS

CODE_119F48:
	LDA.w $0030
	AND.w #$000F
	BNE.b CODE_119F85
	LDA.w $113A
	BNE.b CODE_119F6E
	DEC.w $1134
	INC.w $1136
	LDA.w $1136
	CMP.w #$0101
	BCC.b CODE_119F85
	LDA.w $113A
	EOR.w #$0001
	STA.w $113A
	BRA.b CODE_119F85

CODE_119F6E:
	INC.w $1134
	DEC.w $1136
	LDA.w $1134
	CMP.w #$0101
	BCC.b CODE_119F85
	LDA.w $113A
	EOR.w #$0001
	STA.w $113A
CODE_119F85:
	JSR.w CODE_11A008
	RTS

CODE_119F89:
	REP.b #$20
	LDA.w $60AA
	BMI.b CODE_119FCF
	LDA.w $60D4
	BNE.b CODE_119FA3
	LDA.w #$0004
	STA.b $00
	JSR.w CODE_119FD2
	CPY.b #$00
	BEQ.b CODE_119FCF
	BRA.b CODE_119FAF

CODE_119FA3:
	LDA.w #$0008
	STA.b $00
	JSR.w CODE_119FD2
	CPY.b #$00
	BEQ.b CODE_119FCF
CODE_119FAF:
	LDA.w $7182,y
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $72C0,y
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w #$0001
	STA.w $61B4
	LDA.w #$0400
	STA.w $60AA
CODE_119FCF:
	SEP.b #$20
	RTS

CODE_119FD2:
	LDY.b #$00
	LDX.w $1100
	JSR.w CODE_119FDD
	LDX.w $1102
CODE_119FDD:
	LDA.w $70E2,x
	SEC
	SBC.w #$000C
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BCS.b CODE_11A007
	CLC
	ADC.w #$0028
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BCC.b CODE_11A007
	LDA.w $7182,x
	SEC
	SBC.w #$0020
	CMP.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BCS.b CODE_11A007
	CLC
	ADC.b $00
	CMP.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BCC.b CODE_11A007
	TXY
CODE_11A007:
	RTS

CODE_11A008:
	LDA.w $1132
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $1134
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $1136
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.l DATA_03A9CE
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #FXDATA_548000+$40E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_548000+$40E1)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	RTS

CODE_11A041:
	LDA.l DATA_03A9CE+$08
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE+$08
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BRA.b CODE_11A05F

CODE_11A051:
	LDA.l DATA_03A9CE+$10
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE+$10
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
CODE_11A05F:
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w #FXDATA_548000+$40E1
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #FXDATA_548000+$40E1>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.w $7972
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1B4_MinigameCheckeredPlatform_Init:
;$11A08D
	LDY.w $10FE
	LDA.w DATA_11A0B2,y
	STA.w $70E2,x
	LDA.w DATA_11A0CA,y
	STA.w $7182,x
	TXA
	STA.w $1100,y
	LDA.w $113C
	BEQ.b CODE_11A0A8
	LDA.w DATA_11A0E2,y
CODE_11A0A8:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.w $10FE
	INC.w $10FE
	RTL

;---------------------------------------------------------------------------

DATA_11A0B2:
	dw $0010,$00D8,$0010,$00D0,$0028,$0058,$0088,$00B8
	dw $0010,$0050,$0090,$00D0

DATA_11A0CA:
	dw $0090,$0090,$0073,$0073,$0033,$0033,$0033,$0033
	dw $00B3,$00B3,$00B3,$00B3

DATA_11A0E2:
	dw $0080,$FF80

YI_NorSpr1B6_MinigameBalloon_Init:
;$11A0E6
	LDY.w $10FE
	LDA.w DATA_11A0B2,y
	STA.w $70E2,x
	LDA.w DATA_11A0CA,y
	STA.w $7182,x
	INC.w $10FE
	INC.w $10FE
	CPY.b #$04
	BEQ.b CODE_11A108
	CPY.b #$06
	BNE.b CODE_11A10D
	LDA.w $1102
	BRA.b CODE_11A10B

CODE_11A108:
	LDA.w $1100
CODE_11A10B:
	STA.b $78,x
CODE_11A10D:
	STZ.w $7722,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1B4_MinigameCheckeredPlatform_Main:
;$11A111
	LDA.w $10F4
	BEQ.b CODE_11A11A
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTL

CODE_11A11A:
	LDA.w $70E2,x
	CMP.w #$0080
	BCS.b CODE_11A14C
	LDA.w $70E2,x
	CMP.w #$0050
	BCC.b CODE_11A132
	LDA.w #$0050
	STA.w $70E2,x
	BRA.b CODE_11A140

CODE_11A132:
	CMP.w #$0010
	BCS.b CODE_11A174
	LDA.w #$0010
	STA.w $70E2,x
	STZ.w $72C0,x
CODE_11A140:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_11A174

CODE_11A14C:
	LDA.w $70E2,x
	CMP.w #$00D0
	BCC.b CODE_11A15C
	LDA.w #$00D0
	STA.w $70E2,x
	BRA.b CODE_11A16A

CODE_11A15C:
	CMP.w #$0090
	BCS.b CODE_11A174
	LDA.w #$0090
	STA.w $70E2,x
	STZ.w $72C0,x
CODE_11A16A:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11A174:
	RTL

YI_NorSpr1B6_MinigameBalloon_Main:
;$11A175
	LDA.b $78,x
	BEQ.b CODE_11A180
	TAY
	LDA.w $70E2,y
	STA.w $70E2,x
CODE_11A180:
	LDA.b $76,x
	ASL
	TAY
	LDA.w DATA_11A193,y
	STA.w $0000
	LDA.w DATA_11A193+$01,y
	STA.w $0001
	JMP.w ($0000)

DATA_11A193:
	dw CODE_11A661
	dw CODE_11A392
	dw CODE_11A3CF
	dw CODE_11A40F
	dw CODE_11A44E
	dw CODE_11A490
	dw CODE_11A514
	dw CODE_11A333
	dw CODE_11A1A9
	dw CODE_11A1E9
	dw CODE_11A22B

CODE_11A1A9:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	CMP.w #$0020
	BCC.b CODE_11A1BC
	LDA.w #$0007
	STA.b $76,x
	BRA.b CODE_11A1C6

CODE_11A1BC:
	CLC
	ADC.w #$0008
	AND.w #$00FF
	STA.w $7A38,x
CODE_11A1C6:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$00C0
	BCC.b CODE_11A1E5
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
	INC.w $7182,x
CODE_11A1E5:
	JSR.w CODE_11A4F4
	RTL

CODE_11A1E9:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	BEQ.b CODE_11A1BC
	CMP.w #$00E0
	BCS.b CODE_11A1BC
	LDA.w #$0007
	STA.b $76,x
	BRA.b CODE_11A208

CODE_11A1FE:
	SEC
	SBC.w #$0008
	AND.w #$00FF
	STA.w $7A38,x
CODE_11A208:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$00C0
	BCC.b CODE_11A227
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
	INC.w $7182,x
CODE_11A227:
	JSR.w CODE_11A4F4
	RTL

CODE_11A22B:
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w #$0020
	CMP.w #$0060
	BCS.b CODE_11A2B5
	JSL.l CODE_03A31E
	JSR.w CODE_11A61A
	CMP.w #!Define_YI_AmbSpr22B
	BNE.b CODE_11A256
	INC.w $10F4
	LDA.w #$0001
	STA.w $10E6
	STA.w $10E2
	LDA.w #!Define_YI_AmbSpr22B
CODE_11A256:
	PHA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w #$0020
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7142,y
	PLA
	PHX
	TYX
	CMP.w #!Define_YI_AmbSpr22B
	BNE.b CODE_11A280
	JSL.l CODE_11A30D
	JSR.w CODE_11A2CC
	BRA.b CODE_11A284

CODE_11A280:
	JSL.l CODE_11A2E1
CODE_11A284:
	PLX
	LDA.w #!Define_YI_AmbSpr1DC
	JSL.l CODE_008B21
	PHX
	LDX.w $112E
	LDA.w $70E2,x
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7142,y
	LDA.w #$000B
	STA.w $7E4C,y
	LDA.w #$0002
	STA.w $7782,y
	PLX
	LDA.w #!Define_YI_SoundID46_BonusGameBoardFalls
	JSL.l CODE_0085D2
	RTL

CODE_11A2B5:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
	INC.w $7182,x
	JSR.w CODE_11A4F4
	RTL

CODE_11A2CC:
	LDA.w $70A2,x
	CLC
	ADC.w #$FFF4
	STA.w $70A2,x
	LDA.w $7142,x
	CLC
	ADC.w #$FFE0
	STA.w $7142,x
	RTS

CODE_11A2E1:
	LDA.w #$0003
	STA.w $7782,x
	STZ.w $7E4E,x
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0028
	STA.w $7502,x
	LDA.w #$0001
	STA.w $7462,x
	LDA.w #!Define_YI_SoundID86_MildePop2
	JSL.l CODE_0085D2
	LDA.w #$00FF
	STA.w $7462,x
	RTL

CODE_11A30D:
	LDA.w #$0002
	STA.w $7782,x
	STA.w $7E4C,x
	STZ.w $7E4E,x
	STZ.w $7E8C,x
	STZ.w !EXRAM_YI_Level_AmbSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_AmbSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7502,x
	LDA.w #$0001
	STA.w $7462,x
	LDA.w #!Define_YI_SoundID86_MildePop2
	JSL.l CODE_0085D2
	RTL

CODE_11A333:
	JSL.l CODE_03AA52
	STZ.w $0000
	LDA.w $7A38,x
	BEQ.b CODE_11A35D
	INC.w $0000
	CMP.w #$0080
	BCS.b CODE_11A353
	SEC
	SBC.w #$0004
	AND.w #$00FF
	STA.w $7A38,x
	BRA.b CODE_11A35D

CODE_11A353:
	CLC
	ADC.w #$0004
	AND.w #$00FF
	STA.w $7A38,x
CODE_11A35D:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$0100
	BEQ.b CODE_11A384
	INC.w $0000
	CLC
	ADC.w #$0010
	CMP.w #$0100
	BCC.b CODE_11A374
	LDA.w #$0100
CODE_11A374:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	SEC
	SBC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	DEC.w $7182,x
CODE_11A384:
	LDA.w $0000
	BNE.b CODE_11A38E
	STZ.b $76,x
	STZ.w $7A36,x
CODE_11A38E:
	JSR.w CODE_11A4F4
	RTL

CODE_11A392:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	CMP.w #$0020
	BCC.b CODE_11A3A5
	LDA.w #$0007
	STA.b $76,x
	BRA.b CODE_11A3AF

CODE_11A3A5:
	CLC
	ADC.w #$0004
	AND.w #$00FF
	STA.w $7A38,x
CODE_11A3AF:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$00C0
	BCC.b CODE_11A3CB
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
CODE_11A3CB:
	JSR.w CODE_11A4F4
	RTL

CODE_11A3CF:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	CMP.w #$0020
	BCC.b CODE_11A3E2
	LDA.w #$0007
	STA.b $76,x
	BRA.b CODE_11A3EC

CODE_11A3E2:
	CLC
	ADC.w #$0008
	AND.w #$00FF
	STA.w $7A38,x
CODE_11A3EC:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$00C0
	BCC.b CODE_11A40B
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
	INC.w $7182,x
CODE_11A40B:
	JSR.w CODE_11A4F4
	RTL

CODE_11A40F:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	BEQ.b CODE_11A424
	CMP.w #$00E0
	BCS.b CODE_11A424
	LDA.w #$0007
	STA.b $76,x
	BRA.b CODE_11A42E

CODE_11A424:
	SEC
	SBC.w #$0004
	AND.w #$00FF
	STA.w $7A38,x
CODE_11A42E:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$00C0
	BCC.b CODE_11A44A
	SEC
	SBC.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
CODE_11A44A:
	JSR.w CODE_11A4F4
	RTL

CODE_11A44E:
	JSL.l CODE_03AA52
	LDA.w $7A38,x
	BEQ.b CODE_11A463
	CMP.w #$00E0
	BCS.b CODE_11A463
	LDA.w #$0007
	STA.b $76,x
	BRA.b CODE_11A42E

CODE_11A463:
	SEC
	SBC.w #$0008
	AND.w #$00FF
	STA.w $7A38,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$00C0
	BCC.b CODE_11A48C
	SEC
	SBC.w #$0020
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$000C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
	INC.w $7182,x
CODE_11A48C:
	JSR.w CODE_11A4F4
	RTL

CODE_11A490:
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$00C0
	BCC.b CODE_11A4AF
	SBC.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
CODE_11A4AF:
	LDA.w $60C0
	BNE.b CODE_11A4EB
	INC.w $61B4
	LDA.w #$0100
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LSR
	LSR
	LSR
	LSR
	STA.w $0000
	LDA.w #$001C
	SEC
	SBC.w $0000
	STA.w $0000
	LDA.w $7182,x
	SEC
	SBC.w $0000
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	JSR.w CODE_11A741
	STA.b $76,x
	CMP.w #$0001
	BEQ.b CODE_11A4E8
	CMP.w #$0003
	BNE.b CODE_11A4F0
CODE_11A4E8:
	JSR.w CODE_11A6F0
CODE_11A4EB:
	LDA.w #$0007
	STA.b $76,x
CODE_11A4F0:
	JSR.w CODE_11A4F4
	RTL

CODE_11A4F4:
	LDA.w $7A36,x
	BPL.b CODE_11A4FD
	JSR.w CODE_11A051
	RTS

CODE_11A4FD:
	JSR.w CODE_11A041
	LDA.b $78,x
	BEQ.b CODE_11A50F
	TAY
	LDA.w $72C0,y
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_11A50F:
	RTS

DATA_11A510:
	dw $0001,$0002

CODE_11A514:
	JSL.l CODE_03AA52
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w #$0020
	CMP.w #$0060
	BCC.b CODE_11A527
	JMP.w CODE_11A5FA

CODE_11A527:
	JSL.l CODE_03A31E
	JSR.w CODE_11A61A
	NOP
	CMP.w #!Define_YI_AmbSpr22B
	BNE.b CODE_11A5B3
	LDA.w $10E2
	BEQ.b CODE_11A53E
	LDA.w #!Define_YI_AmbSpr22C
	BRA.b CODE_11A5B3

CODE_11A53E:
	LDA.w #$F0F0
	STA.w $1130
	STZ.w $10E6
	LDA.w #$0001
	STA.w $10E2
	LDX.w $112E
	LDA.w #$0004
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	LDA.w #$0011
	LDY.b #$5C
CODE_11A55B:
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	BEQ.b CODE_11A566
	DEY
	DEY
	DEY
	DEY
	BRA.b CODE_11A55B

CODE_11A566:
	LDA.w #$0011
	JSL.l CODE_03A34E
	BCC.b CODE_11A5AD
	LDA.w $113C
	ASL
	TAX
	LDA.w DATA_11A510,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0080
	STA.w $7182,y
	LDA.w #$0078
	STA.w $70E2,y
	TYX
	LDA.w #!Define_YI_AmbSpr22E
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w #$FFF0
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$FFF0
	STA.w $7142,y
	LDA.w #$0003
	STA.w $7782,y
	TYX
	JSL.l CODE_009ABF
CODE_11A5AD:
	LDX.w $7972
	LDA.w #!Define_YI_AmbSpr22B
CODE_11A5B3:
	PHA
	JSL.l CODE_008B21
	LDA.w $70E2,x
	CLC
	ADC.w #$0020
	STA.w $70A2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0010
	STA.w $7142,y
	LDA.w #$0002
	STA.w $7782,y
	PLA
	PHX
	TYX
	CMP.w #!Define_YI_AmbSpr22B
	BNE.b CODE_11A5F4
	JSL.l CODE_11A30D
	LDA.w $70A2,x
	CLC
	ADC.w #$FFF4
	STA.w $70A2,x
	LDA.w $7142,x
	CLC
	ADC.w #$FFE0
	STA.w $7142,x
	BRA.b CODE_11A5F8

CODE_11A5F4:
	JSL.l CODE_11A2E1
CODE_11A5F8:
	PLX
	RTL

CODE_11A5FA:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0006
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	INC.w $7182,x
	INC.w $7182,x
	LDA.w #$0200
	STA.w $60AA
	STZ.w $60C0
	JSR.w CODE_11A4F4
	RTL

CODE_11A61A:
	PHY
	JSL.l CODE_008408
	LDY.w $1130
	BMI.b CODE_11A62F
	SEP.b #$20
	LDA.b $10
	AND.b #$1F
	CMP.w DATA_11A657,y
	BCC.b CODE_11A636
CODE_11A62F:
	REP.b #$20
	LDA.w #!Define_YI_AmbSpr22C
	BRA.b CODE_11A652

CODE_11A636:
	REP.b #$20
	LDA.w #$F0F0
	STA.w $1130
	LDY.b #$3C
	LDA.w #$0000
CODE_11A643:
	STA.w !EXRAM_YI_Level_AmbSpr_SpriteExistsFlag|!EXRAMBankMirror,y
	STA.w $7782,y
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	DEC
	STA.w $7462,y
	INC
endif
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_11A643
	LDA.w #!Define_YI_AmbSpr22B
CODE_11A652:
	INC.w $1130
	PLY
	RTS

DATA_11A657:
	db $01,$01,$03,$03,$03,$07,$07,$0F,$0F,$FF

CODE_11A661:
	JSR.w CODE_11A665
	RTL

CODE_11A665:
	LDA.w $60AA
	BPL.b CODE_11A66D
	JMP.w CODE_11A6EF

CODE_11A66D:
	LDA.w $60AB
	AND.w #$00FF
	INC
	STA.w $0000
	LDA.w $70E2,x
	SEC
	SBC.w #$0008
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BCS.b CODE_11A6EF
	CLC
	ADC.w #$0020
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BCC.b CODE_11A6EF
	LDA.w $7182,x
	SEC
	SBC.w #$001C
	CMP.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BCS.b CODE_11A6EF
	CLC
	ADC.w $0000
	CMP.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	BCC.b CODE_11A6EF
	LDA.w $7182,x
	SEC
	SBC.w #$001C
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	INC.w $61B4
	LDA.w #$0001
	STA.w $7A36,x
	STZ.w $1104
	JSR.w CODE_11A741
	STA.b $76,x
	JSR.w CODE_11A6F0
	LDA.w #$FF00
	STA.w $7ECE
	STA.w $7ECC
	LDA.w #$0008
	STA.w $7722,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0000
	STA.w $7A38,x
	JSR.w CODE_11A041
	LDA.b $78,x
	BEQ.b CODE_11A6EF
	TAY
	LDA.w $72C0,y
	CLC
	ADC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
CODE_11A6EF:
	RTS

CODE_11A6F0:
	CMP.w #$0005
	BCS.b CODE_11A72C
	ASL
	TAY
	LDA.w $10FA
	BNE.b CODE_11A702
	LDA.w #$0008
	STA.w $60C0
CODE_11A702:
	LDA.w DATA_11A737,y
	STA.w $60AA
	LDA.w DATA_11A72D,y
	STA.w $60A8
	STA.w $60B4
	STZ.w $60D4
	LDA.w #!Define_YI_SoundID13_SpringBounce
	JSL.l CODE_0085D2
	LDA.b $76,x
	LSR
	BCS.b CODE_11A72C
	STZ.w $61B4
	LDA.w #$006B
	STA.w $60BE
	INC.w $1104
CODE_11A72C:
	RTS

DATA_11A72D:
	dw $0000,$FF00,$FE80,$0100,$0180

DATA_11A737:
	dw $0000,$0000,$FC00,$0000,$FC00

CODE_11A741:
	STZ.w $0002
	LDA.w $60AB
	AND.w #$00FF
	INC
	CMP.w #$0008
	BCC.b CODE_11A753
	INC.w $0002
CODE_11A753:
	LDA.w $70E2,x
	SEC
	SBC.w #$0004
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BCS.b CODE_11A772
	CLC
	ADC.w #$0018
	CMP.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BCC.b CODE_11A76D
	LDA.w #$0005
	BRA.b CODE_11A775

CODE_11A76D:
	LDA.w #$0003
	BRA.b CODE_11A775

CODE_11A772:
	LDA.w #$0001
CODE_11A775:
	CLC
	ADC.w $0002
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1B5_PoppingBalloonsBandit_Init:
;$11A77A
	LDA.w #$00C0
	STA.w $70E2,x
	LDA.w #$00C0
	STA.w $7182,x
	LDA.w #$0009
	STA.w $7402,x
	STX.w $112E
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1B5_PoppingBalloonsBandit_Main:
;$11A790
	LDA.w $10F4
	BEQ.b CODE_11A79E
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
CODE_11A79E:
	JSR.w CODE_11AA97
	JSR.w CODE_11ABB2
	STX.w $112E
	LDA.b $18,x
	ASL
	TAX
	JSR.w (DATA_11A80A,x)
	LDA.b $18,x
	CMP.w #$0002
	BEQ.b CODE_11A7C1
	JSR.w CODE_11AA00
	JSR.w CODE_11AA47
	JSR.w CODE_11A96A
	JSR.w CODE_11A89B
CODE_11A7C1:
	LDA.w $10F4
	BEQ.b CODE_11A7D9
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0009
	STA.w $7402,x
	STZ.w $74A2,x
	RTL

CODE_11A7D9:
	LDA.b $18,x
	CMP.w #$0002
	BEQ.b CODE_11A7FD
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11A7E9
	EOR.w #$FFFF
	INC
CODE_11A7E9:
	CMP.w #$0040
	BCC.b CODE_11A7FD
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ROL
	ROL
	ROL
	AND.w #$0002
	EOR.w #$0002
	STA.w $7400,x
CODE_11A7FD:
	LDA.w $70E2,x
	STA.w $113E
	LDA.w $7182,x
	STA.w $1140
	RTL

DATA_11A80A:
	dw CODE_11AAD8
	dw CODE_11ABAB
	dw CODE_11A859
	dw CODE_11A82B
	dw CODE_11A814

CODE_11A814:
	LDX.w $112E
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	LDA.w #$0009
	STA.w $7402,x
	STZ.w $74A2,x
	PLA
	RTL

CODE_11A82B:
	LDX.w $112E
	LDA.w $110A
	ROL
	ROL
	ROL
	AND.w #$0002
	TAY
	LDA.w DATA_11A855,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $1116
	CMP.w #$0004
	BCS.b CODE_11A854
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	INC.b $76,x
	STZ.b $18,x
CODE_11A854:
	RTS

DATA_11A855:
	dw $0008,$FFF8

CODE_11A859:
	LDX.w $112E
	LDA.w $7860,x
	LSR
	BCS.b CODE_11A869
	LDA.w #$001A
	STA.w $7402,x
	RTS

CODE_11A869:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7A38,x
	TAY
	LDA.w DATA_11A892,y
	AND.w #$00FF
	STA.w $7402,x
	LDA.w $7A96,x
	BNE.b CODE_11A891
	LDA.w #$0004
	STA.w $7A96,x
	INC.w $7A38,x
	LDA.w $7A38,x
	CMP.w #$0008
	BCC.b CODE_11A891
	STZ.b $18,x
CODE_11A891:
	RTS

DATA_11A892:
	db $16,$15,$16,$15,$16,$15,$16,$15

CODE_11A89A:
	RTS

CODE_11A89B:
	LDA.b $18,x
	CMP.w #$0002
	BEQ.b CODE_11A89A
	LDA.w $1104
	BNE.b CODE_11A89A
	LDA.w $1112
	CMP.w #$0010
	BCS.b CODE_11A89A
	LDA.w $1118
	CMP.w #$0010
	BCS.b CODE_11A89A
	CMP.w #$0006
	BCC.b CODE_11A8FB
	JSR.w CODE_11A94D
	LDA.w $110C
	BPL.b CODE_11A8E2
	LDA.w #$0002
	STA.b $18,x
	STZ.w $7A38,x
	LDA.w $7CD6,x
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w #$0010
	STA.b $02
	LDY.b #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_03A0E7
	BRA.b CODE_11A8FB

CODE_11A8E2:
	LDA.w $611C
	STA.b $00
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STA.b $02
	LDY.b #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_03A0E7
	LDA.w #$006B
	STA.w $60BE
	INC.w $1104
CODE_11A8FB:
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	ROL
	ROL
	ROL
	AND.w #$0002
	TAY
	LDA.w DATA_11A966,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	EOR.w #$FFFF
	INC
	STA.w $60A8
	STA.w $60B4
	STZ.w $60D4
	LDA.w $60C0
	BEQ.b CODE_11A927
	LDA.w $110C
	BMI.b CODE_11A927
	STZ.w $60AA
	BRA.b CODE_11A933

CODE_11A927:
	LDA.w #$0008
	STA.w $60C0
	LDA.w #$FA00
	STA.w $60AA
CODE_11A933:
	LDA.b $76,x
	BEQ.b CODE_11A941
	LDA.w $110C
	BMI.b CODE_11A941
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_11A94C

CODE_11A941:
	LDA.w #$0001
	STA.b $76,x
	LDA.w #$FB00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_11A94C:
	RTS

CODE_11A94D:
	LDA.w $1142
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	LDA.w $1144
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w $113E
	STA.w $70E2,x
	LDA.w $1140
	STA.w $7182,x
	RTS

DATA_11A966:
	dw $FE00,$0200

CODE_11A96A:
	LDA.b $76,x
	BEQ.b CODE_11A9B1
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_11A9B1
	LDY.b #$5C
CODE_11A975:
	LDA.w $7A36,y
	BNE.b CODE_11A9AB
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr1B6_MinigameBalloon
	BNE.b CODE_11A9AB
	LDA.w $70E2,y
	CMP.w $7CD6,x
	BCS.b CODE_11A9AB
	CLC
	ADC.w #$0020
	CMP.w $7CD6,x
	BCC.b CODE_11A9AB
	LDA.w $7182,y
	SEC
	SBC.w #$0010
	CMP.w $7182,x
	BCS.b CODE_11A9AB
	CLC
	ADC.w #$0004
	CMP.w $7182,x
	BCC.b CODE_11A9AB
	JMP.w CODE_11A9B2

CODE_11A9AB:
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_11A975
CODE_11A9B1:
	RTS

CODE_11A9B2:
	LDA.w $70E2,y
	CLC
	ADC.w #$0008
	CMP.w $7CD6,x
	BCS.b CODE_11A9CC
	CLC
	ADC.w #$0010
	CMP.w $7CD6,x
	BCC.b CODE_11A9D1
	LDA.w #$000A
	BRA.b CODE_11A9D4

CODE_11A9CC:
	LDA.w #$0008
	BRA.b CODE_11A9D4

CODE_11A9D1:
	LDA.w #$0009
CODE_11A9D4:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable7019D6|!EXRAMBankMirror,y
	LDA.w #$FFFF
	STA.w $7A36,y
	LDA.w #$FFF0
	STA.w $7ECE
	STA.w $7ECC
	LDA.w #$0010
	STA.w $7722,y
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w $7A38,y
	TYX
	JSR.w CODE_11A051
	RTS

CODE_11AA00:
	LDA.b $76,x
	BNE.b CODE_11AA1A
	LDA.w $7A96,x
	BNE.b CODE_11AA12
	LDA.w #$0003
	STA.w $7A96,x
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
CODE_11AA12:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	AND.w #$0001
	BRA.b CODE_11AA43

CODE_11AA1A:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11AA24
	LDA.w #$0018
	BRA.b CODE_11AA43

CODE_11AA24:
	LDA.w $1114
	CMP.w #$0010
	BCS.b CODE_11AA40
	JSL.l CODE_008408
	LDA.b $10
	AND.w #$0007
	BNE.b CODE_11AA3B
	JSL.l CODE_029BD9
CODE_11AA3B:
	LDA.w #$001A
	BRA.b CODE_11AA43

CODE_11AA40:
	LDA.w #$0017
CODE_11AA43:
	STA.w $7402,x
	RTS

CODE_11AA47:
	LDY.w $1100
	JSR.w CODE_11AA54
	LDA.b $78,x
	BNE.b CODE_11AA96
	LDY.w $1102
CODE_11AA54:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_11AA94
	LDA.w $70E2,y
	CMP.w $7CD6,x
	BCS.b CODE_11AA94
	CLC
	ADC.w #$0020
	CMP.w $7CD6,x
	BCC.b CODE_11AA94
	LDA.w $7182,y
	SEC
	SBC.w #$0010
	CMP.w $7182,x
	BCS.b CODE_11AA94
	CLC
	ADC.w #$0008
	CMP.w $7182,x
	BCC.b CODE_11AA94
	LDY.w $1122
	LDA.w $7182,y
	SEC
	SBC.w #$0010
	STA.w $7182,x
	LDA.w #$0001
	STA.b $78,x
	STZ.b $76,x
	RTS

CODE_11AA94:
	STZ.b $78,x
CODE_11AA96:
	RTS

CODE_11AA97:
	LDA.w $7182,x
	BPL.b CODE_11AAB9
	LDA.w $70E2,x
	CMP.w #$0030
	BCS.b CODE_11AAAC
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0030
	BRA.b CODE_11AAD4

CODE_11AAAC:
	CMP.w #$00C1
	BCC.b CODE_11AAD4
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$00C0
	BRA.b CODE_11AAD4

CODE_11AAB9:
	LDA.w $70E2,x
	CMP.w #$0010
	BCS.b CODE_11AAC9
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0010
	BRA.b CODE_11AAD4

CODE_11AAC9:
	CMP.w #$00E1
	BCC.b CODE_11AAD4
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$00E0
CODE_11AAD4:
	STA.w $70E2,x
	RTS

CODE_11AAD8:
	LDX.w $112E
	LDA.w $7860,x
	LSR
	BCS.b CODE_11AAEC
	LDA.b $78,x
	BNE.b CODE_11AAEC
	LDA.w #$0001
	STA.b $76,x
	BRA.b CODE_11AAEE

CODE_11AAEC:
	STZ.b $76,x
CODE_11AAEE:
	LDA.b $78,x
	CMP.w #$0001
	BNE.b CODE_11AB3C
	LDA.w $111A
	CMP.w #$0004
	BNE.b CODE_11AB0A
	LDA.w $1114
	CMP.w #$0002
	BCS.b CODE_11AB72
	LDA.w #$FB80
	BRA.b CODE_11AB61

CODE_11AB0A:
	LDY.w $1122
	LDA.w $72C0,y
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	LDA.w $70E2,x
	CMP.w #$0020
	BCC.b CODE_11AB37
	CMP.w #$00D0
	BCS.b CODE_11AB37
	LDA.w $110A
	ROL
	ROL
	ROL
	AND.w #$0002
	STA.b $00
	LDA.w $110A
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_11AB83

CODE_11AB37:
	LDA.w #$FA00
	BRA.b CODE_11AB61

CODE_11AB3C:
	LDA.b $76,x
	BNE.b CODE_11AB72
	LDA.w $1114
	CMP.w #$0004
	BCS.b CODE_11AB72
	LDA.w $111A
	BEQ.b CODE_11AB5E
	CMP.w #$0070
	BCC.b CODE_11AB59
	LDA.w #$0003
	STA.b $18,x
	BRA.b CODE_11AB72

CODE_11AB59:
	LDA.w #$FA00
	BRA.b CODE_11AB61

CODE_11AB5E:
	LDA.w #$FB00
CODE_11AB61:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0001
	STA.b $76,x
	STZ.b $78,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11AB72:
	LDA.w $1108
	ROL
	ROL
	ROL
	AND.w #$0002
	STA.b $00
	LDA.w $1108
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11AB83:
	AND.w #$8000
	BEQ.b CODE_11AB94
	LDA.b $76,x
	BNE.b CODE_11AB91
	LDA.w #$0000
	BRA.b CODE_11AB94

CODE_11AB91:
	LDA.w #$0004
CODE_11AB94:
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_11ABA3,y
	CLC
	ADC.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

DATA_11ABA3:
	dw $0008,$FFF8,$0038,$FFC8

CODE_11ABAB:
	LDX.w $112E
	JMP.w CODE_11ABAB

CODE_11ABB1:
	RTS

CODE_11ABB2:
	LDA.w $611C
	SEC
	SBC.w $7CD6,x
	STA.w $1106
	BPL.b CODE_11ABC2
	EOR.w #$FFFF
	INC
CODE_11ABC2:
	STA.w $1112
	LDA.w $611E
	SEC
	SBC.w $7182,x
	STA.w $110C
	BPL.b CODE_11ABD5
	EOR.w #$FFFF
	INC
CODE_11ABD5:
	STA.w $1118
	LDA.b $76,x
	BEQ.b CODE_11ABEF
	LDY.w $1120
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr1B6_MinigameBalloon
	BNE.b CODE_11ABEF
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_11ABEF
	JMP.w CODE_11AC87

CODE_11ABEF:
	STZ.w $1120
	STZ.w $1122
	LDY.b #$5C
CODE_11ABF7:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BEQ.b CODE_11AC4C
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr1B6_MinigameBalloon
	BNE.b CODE_11AC29
	LDA.w $7A36,y
	BNE.b CODE_11AC4C
	LDA.w $7CD6,y
	CLC
	ADC.w #$0008
	STA.w $7CD6,y
	LDA.w $7CD8,y
	CLC
	ADC.w #$0005
	STA.w $7CD8,y
	LDA.w #$0002
	STA.b $08
	PHY
	JSR.w CODE_11ACD0
	PLY
	BRA.b CODE_11AC4C

CODE_11AC29:
	CMP.w #!Define_YI_NorSpr1B4_MinigameCheckeredPlatform
	BNE.b CODE_11AC4C
	LDA.w $7CD6,y
	CLC
	ADC.w #$0008
	STA.w $7CD6,y
	LDA.w $7CD8,y
	CLC
	ADC.w #$FFF8
	STA.w $7CD8,y
	LDA.w #$0004
	STA.b $08
	PHY
	JSR.w CODE_11ACD0
	PLY
CODE_11AC4C:
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_11ABF7
	LDY.b #$02
	LDA.w $1118
	CMP.w $111A
	BCS.b CODE_11AC68
	CMP.w #$0010
	BCS.b CODE_11AC68
	LDA.w $61D6
	BNE.b CODE_11AC68
	LDY.b #$00
CODE_11AC68:
	LDA.w $1106,y
	STA.w $1124
	LDA.w $110C,y
	STA.w $1126
	LDA.w $1112,y
	STA.w $1128
	LDA.w $1118,y
	STA.w $112A
	LDA.w $111E,y
	STA.w $112C
	RTS

CODE_11AC87:
	LDY.w $1120
	LDA.w $7CD6,y
	CLC
	ADC.w #$0008
	STA.w $7CD6,y
	LDA.w $7CD8,y
	CLC
	ADC.w #$0005
	STA.w $7CD8,y
	LDA.w #$0002
	STA.b $08
	STZ.w $1120
	JSR.w CODE_11ACD0
	LDY.w $1122
	LDA.w $7CD6,y
	CLC
	ADC.w #$0008
	STA.w $7CD6,y
	LDA.w $7CD8,y
	CLC
	ADC.w #$FFF8
	STA.w $7CD8,y
	LDA.w #$0004
	STA.b $08
	STZ.w $1122
	JSR.w CODE_11ACD0
	LDY.b #$00
	JMP.w CODE_11AC4C

CODE_11ACD0:
	LDA.w $7CD6,y
	SEC
	SBC.w $7CD6,x
	STA.b $00
	BPL.b CODE_11ACDF
	EOR.w #$FFFF
	INC
CODE_11ACDF:
	STA.b $04
	LDA.w $7CD8,y
	CLC
	ADC.w #$0008
	SEC
	SBC.w $7CD8,x
	STA.b $02
	BPL.b CODE_11ACF4
	EOR.w #$FFFF
	INC
CODE_11ACF4:
	STA.b $06
	STY.b $0A
	LDY.b $08
	LDA.w $111E,y
	BEQ.b CODE_11AD0F
	LDA.w $1118,y
	CMP.b $06
	BCC.b CODE_11AD29
	BNE.b CODE_11AD0F
	LDA.w $1112,y
	CMP.b $04
	BCC.b CODE_11AD29
CODE_11AD0F:
	LDA.b $00
	STA.w $1106,y
	LDA.b $02
	STA.w $110C,y
	LDA.b $04
	STA.w $1112,y
	LDA.b $06
	STA.w $1118,y
	LDA.b $0A
	STA.w $111E,y
	TAY
CODE_11AD29:
	RTS

CODE_11AD2A:
	PHP
	SEP.b #$30
	LDA.w $1135
	PHA
	LDA.b #$7F
	STA.w $1135
	JSL.l CODE_108279
	PLA
	STA.w $1135
	LDA.w $0374
	CMP.b #$FF
	BNE.b CODE_11AD4C
	LDA.b #!Define_YI_GameMode1F
	STA.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_11AD77

CODE_11AD4C:
	LDA.w $0376
	STA.l $7F7FC2
	LDA.b #$00
	STA.l $7F7FC3
	INC
	STA.w $038C
	LDA.b #!Define_YI_GameMode0B
	STA.w !RAM_YI_Global_CurrentGameMode
	REP.b #$20
	LDA.w $0374
	STA.l $7F7FC0
	LDA.w #$01C0
	STA.w $038E
	LDA.w $0377
	STA.w !RAM_YI_Level_StarTimerLo
CODE_11AD77:
	PLP
	RTL

CODE_11AD79:
	REP.b #$20
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	STZ.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	SEP.b #$20
	LDA.b #$69
	STA.w !RAM_YI_Global_BG1AddressAndSize
	STA.w !REGISTER_BG1AddressAndSize
	LDA.b #$39
	STA.w !RAM_YI_Global_BG2AddressAndSize
	STA.w !REGISTER_BG2AddressAndSize
	LDA.b #$09
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STA.w !REGISTER_BGModeAndTileSizeSetting
	STZ.w !RAM_YI_Global_HDMAEnable
	STZ.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$30
	LDA.w #$00B0
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0030
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $6CAA
	STA.w !RAM_YI_Level_StarTimerLo
	LDA.w #$0030
	STA.w $10EC
	LDA.w #$0001
	STA.w $10EE
	STZ.w $10E8
	STZ.w $10EA
	LDX.w #$01FE
	LDA.w #$0000
CODE_11ADD3:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	DEX
	DEX
	BPL.b CODE_11ADD3
	LDX.w #$001E
	LDA.w #$0100
CODE_11ADE1:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.l $7F81A0,x
	DEX
	DEX
	BPL.b CODE_11ADE1
	LDX.w #$0160
CODE_11ADF0:
	LDA.w #$0100
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.l $7F801E,x
	TXA
	SEC
	SBC.w #$0020
	TAX
	BNE.b CODE_11ADF0
	SEP.b #$10
	LDA.w #$01B1
	JSL.l CODE_03A34C
	LDA.w #$01B3
	JSL.l CODE_03A34C
	SEP.b #$30
	JSL.l CODE_0397D3
	RTS

CODE_11AE1A:
	JSL.l CODE_008259
	JSL.l CODE_0394CF
	JSL.l CODE_04FA67
	STZ.w $03BA
	LDA.w $10F8
	ASL
	TAX
	JSR.w (DATA_11AE3F,x)
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

DATA_11AE3F:
	dw CODE_11AE47
	dw CODE_11AEAC
	dw CODE_11AEC9

DATA_11AE45:
	db $06,$04

CODE_11AE47:
	JSL.l CODE_04DD9E
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_11AEA9
	JSL.l CODE_0397D3
	REP.b #$30
	JSR.w CODE_11AEDC
	SEP.b #$10
	LDA.w $10F8
	BEQ.b CODE_11AEA9
	LDX.b #$5C
CODE_11AE62:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BEQ.b CODE_11AE73
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $7540,x
CODE_11AE73:
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_11AE62
	LDA.w $10EC
	BNE.b CODE_11AEA9
	LDA.w $10E6
	BNE.b CODE_11AEA9
	LDA.w #$0011
	JSL.l CODE_03A34C
	BCC.b CODE_11AEA9
	JSL.l CODE_008408
	AND.w #$0001
	TAX
	LDA.w DATA_11AE45,x
	AND.w #$00FF
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0080
	STA.w $7182,y
	LDA.w #$0070
	STA.w $70E2,y
CODE_11AEA9:
	SEP.b #$20
	RTS

CODE_11AEAC:
	JSL.l CODE_04DD9E
	JSL.l CODE_0397D3
	LDA.w $10FA
	BEQ.b CODE_11AEC4
	LDA.w $60C0
	BNE.b CODE_11AEC4
	INC.w $10F8
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
CODE_11AEC4:
	JSL.l CODE_1191B8
	RTS

CODE_11AEC9:
	JSL.l CODE_04DD9E
	JSL.l CODE_0397D3
	LDA.b #$01
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	STA.w $10FA
	JMP.w CODE_11AEC4

CODE_11AEDC:
	CLC
	SED
	LDA.w $10E8
	ADC.w $03BA
	STA.w $10E8
	CLD
	DEC.w $10EE
	BNE.b CODE_11AF2B
	SEC
	SED
	LDA.w $10EC
	SBC.w #$0001
	STA.w $10EC
	CLD
	BNE.b CODE_11AF16
	LDY.w #$0000
	LDA.w $10E8
	CMP.w $10EA
	BCS.b CODE_11AF07
	INY
CODE_11AF07:
	STY.w $10E6
	INY
	STY.w $10F8
	LDA.w #$0001
	STA.w $10E2
	BRA.b CODE_11AF2B

CODE_11AF16:
	LDA.w $10EC
	CMP.w #$0006
	BCS.b CODE_11AF25
	LDA.w #!Define_YI_SoundID7F_SwitchTimerEnding
	JSL.l CODE_0085D2
CODE_11AF25:
	LDA.w #$003F
	STA.w $10EE
CODE_11AF2B:
	PHB
	LDA.w #$7E8000>>16
	PHA
	PLB
	LDX.w $7E4800
	LDA.w #$3484
	STA.w $0000,x
	CLC
	ADC.w #$0020
	STA.w $0010,x
	LDA.w #$348F
	STA.w $0020,x
	ADC.w #$0020
	STA.w $0030,x
	LDA.w #$349A
	STA.w $0040,x
	ADC.w #$0020
	STA.w $0050,x
	LDA.w #$0180
	STA.w $0002,x
	STA.w $0012,x
	STA.w $0022,x
	STA.w $0032,x
	STA.w $0042,x
	STA.w $0052,x
	LDA.w #$0018
	STA.w $0004,x
	STA.w $0014,x
	STA.w $0024,x
	STA.w $0034,x
	STA.w $0044,x
	STA.w $0054,x
	TXA
	ADC.w #$000C
	STA.w $0005,x
	ADC.w #$0010
	STA.w $0015,x
	ADC.w #$0010
	STA.w $0025,x
	ADC.w #$0010
	STA.w $0035,x
	ADC.w #$0010
	STA.w $0045,x
	ADC.w #$0010
	STA.w $0055,x
	LDA.w #$007E
	STA.w $0007,x
	STA.w $0017,x
	STA.w $0027,x
	STA.w $0037,x
	STA.w $0047,x
	STA.w $0057,x
	LDA.w #$0004
	STA.w $0008,x
	STA.w $0018,x
	STA.w $0028,x
	STA.w $0038,x
	STA.w $0048,x
	STA.w $0058,x
	TXA
	ADC.w #$0010
	STA.w $000A,x
	ADC.w #$0010
	STA.w $001A,x
	ADC.w #$0010
	STA.w $002A,x
	ADC.w #$0010
	STA.w $003A,x
	ADC.w #$0010
	STA.w $004A,x
	ADC.w #$0010
	STA.w $005A,x
	STA.w $7E4800
	PLB
	PLB
	TXA
	SEC
	SBC.w #$7E4802
	TAX
	LDA.w $10E8
	TAY
	AND.w #$00F0
	LSR
	LSR
	LSR
	LSR
	ORA.w #$2900
	STA.l $7E480E,x
	ORA.w #$0010
	STA.l $7E481E,x
	TYA
	AND.w #$000F
	ORA.w #$2900
	STA.l $7E4810,x
	ORA.w #$0010
	STA.l $7E4820,x
	LDA.w $10EC
	TAY
	AND.w #$00F0
	LSR
	LSR
	LSR
	LSR
	ORA.w #$2900
	STA.l $7E482E,x
	ORA.w #$0010
	STA.l $7E483E,x
	TYA
	AND.w #$000F
	ORA.w #$2900
	STA.l $7E4830,x
	ORA.w #$0010
	STA.l $7E4840,x
	LDA.w $10EA
	TAY
	AND.w #$00F0
	LSR
	LSR
	LSR
	LSR
	ORA.w #$2900
	STA.l $7E484E,x
	ORA.w #$0010
	STA.l $7E485E,x
	TYA
	AND.w #$000F
	ORA.w #$2900
	STA.l $7E4850,x
	ORA.w #$0010
	STA.l $7E4860,x
	RTS

;---------------------------------------------------------------------------

DATA_11B084:
	dw $FF00,$0100

YI_NorSpr1B1_CoinCannon_Init:
;$11B088
	LDA.w #$0038
	STA.w $7182,x
	LDA.w #$0070
	STA.w $70E2,x
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_11B084,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7A96,x
	STZ.b $78,x
	STZ.w $7A36,x
	LDA.w #$0100
	STA.w $7A38,x
	LDA.w #$0100
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.b $16,x
	STZ.w $7722,x
CODE_11B0BC:
	LDA.w #FXDATA_550000+$0080
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_550000+$0080)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDA.w $7A36,x
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $7A38,x
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDX.b #FXCODE_0884A5>>16
	LDA.w #FXCODE_0884A5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_11B0FA:
	RTL

;---------------------------------------------------------------------------

DATA_11B0FB:
	dw $0020,$00E0

DATA_11B0FF:
	dw $0018,$00C8

DATA_11B103:
	dw $0002,$FFFE

DATA_11B107:
	dw $0133,$014D,$0166,$0133,$0100

DATA_11B111:
	dw $00CD,$00B3,$009A,$0100,$0100

DATA_11B11B:
	dw $000A,$000A,$0010,$0004,$0000

YI_NorSpr1B1_CoinCannon_Main:
;$11B125
	LDA.w $10F8
	BNE.b CODE_11B0FA
	LDA.w $7A96,x
	BEQ.b CODE_11B15B
	INC.b $16,x
	LDA.b $16,x
	AND.w #$0003
	BEQ.b CODE_11B13B
CODE_11B138:
	JMP.w CODE_11B218

CODE_11B13B:
	LDY.b $78,x
	LDA.w $7A36,x
	CLC
	ADC.w DATA_11B103,y
	AND.w #$00FF
	STA.w $7A36,x
	CMP.w DATA_11B0FB,y
	BNE.b CODE_11B158
	TYA
	AND.w #$00FF
	EOR.w #$0002
	STA.b $78,x
CODE_11B158:
	JMP.w CODE_11B214

CODE_11B15B:
	LDA.w $7AF6,x
	BNE.b CODE_11B138
	INC.b $18,x
	LDA.b $18,x
	ASL
	TAY
	CPY.b #$08
	BEQ.b CODE_11B16D
CODE_11B16A:
	JMP.w CODE_11B1F3

CODE_11B16D:
	PHY
	LDA.w #$01B2
	JSL.l CODE_03A34C
	BCC.b CODE_11B16A
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70E2,y
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	STA.w $7182,y
	LDA.w $7A36,x
	CLC
	ADC.w #$0040
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_00E9D4,x
	ASL
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,y
	LDA.l DATA_00E954,x
	ASL
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDX.b $12
	LDA.w #!Define_YI_AmbSpr22A
	JSL.l CODE_008B21
	LDA.w $7A36,x
	STA.w $7E8C,y
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.w $70A2,y
	LDA.w $7182,x
	STA.w $7142,y
	LDA.w #$002C
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C0|!EXRAMBankMirror,y
	LDA.w #$000C
	STA.w !EXRAM_YI_Level_AmbSpr_GenericTable7018C2|!EXRAMBankMirror,y
	LDA.w #$0000
	STA.w $73C2,y
	LDA.w #$0003
	STA.w $7782,y
	LDA.w #$0004
	STA.w $7E8E,y
	LDA.w #$0024
	STA.w $7002,y
	LDA.w #!Define_YI_SoundID47_Explosion
	JSL.l CODE_0085D2
	PLY
CODE_11B1F3:
	LDA.w DATA_11B107,y
	STA.w $7A38,x
	LDA.w DATA_11B111,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_11B11B,y
	STA.w $7AF6,x
	BNE.b CODE_11B214
	STZ.b $18,x
	LDA.b $10
	AND.w #$003F
	ADC.w #$0040
	STA.w $7A96,x
CODE_11B214:
	JSL.l CODE_11B0BC
CODE_11B218:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $7680,x
	CMP.w DATA_11B0FF,y
	BNE.b CODE_11B23A
	STZ.w $70E1,x
	LDA.w DATA_11B0FF,y
	STA.w $70E2,x
	TYA
	EOR.w #$0002
	TAY
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_11B084,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11B23A:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1B2_MinigameCoin_Init:
;$11B23B
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11B244
	INY
	INY
CODE_11B244:
	TYA
	STA.w $7400,x
	RTL

;---------------------------------------------------------------------------

DATA_11B249:
	dw $0006,$0000

YI_NorSpr1B2_MinigameCoin_Main:
;$11B24D
	LDA.w $10F8
	BEQ.b CODE_11B255
	JMP.w CODE_11B30A

CODE_11B255:
	LDY.w $7D36,x
	BEQ.b CODE_11B2C4
	BMI.b CODE_11B284
	DEY
	LDA.w $7A36,y
	BNE.b CODE_11B2C4
	CLC
	SED
	LDA.w $10EA
	ADC.w #$0001
	STA.w $10EA
	CLD
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	DEC.w $03BA
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	SEC
	SBC.w #$0004
	STA.b $02
	BRA.b CODE_11B2A0

CODE_11B284:
	LDA.w $61D6
	CMP.w #$0081
	BCS.b CODE_11B2C4
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.b $00
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	SEC
	SBC.w #$0004
	STA.b $02
CODE_11B2A0:
	LDA.w #$0003
	JSL.l CODE_03B481
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	TAX
	LDA.w $7002,y
	AND.w #$FFF0
	ORA.w DATA_11B249,x
	STA.w $7002,y
	LDX.b $12
	LDA.w #!Define_YI_SoundID09_Coin
	JSL.l CODE_0085D2
	JML.l CODE_03A31E

CODE_11B2C4:
	LDA.w $7860,x
	LSR
	BCC.b CODE_11B2F9
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_11B2F9
	LSR
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CMP.w #$FFF0
	BCS.b CODE_11B2E5
	LDA.w #!Define_YI_SoundID2C_ClankSound5
	JSL.l CODE_0085D2
	BRA.b CODE_11B2F9

CODE_11B2E5:
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11B2F1
	EOR.w #$FFFF
	INC
CODE_11B2F1:
	CMP.w #$0010
	BCS.b CODE_11B2F9
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11B2F9:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_11B30A
	LDA.w #$0034
	STA.w $7042,x
	LDA.w #$0003
	STA.w $74A2,x
CODE_11B30A:
	LDA.w $0030
	LSR
	LSR
	LSR
	AND.w #$0003
	STA.w $7402,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1B3_GatherCoinsBandit_Init:
;$11B317
	LDA.w #$00C0
	STA.w $7182,x
	LDA.w #$00C0
	STA.w $70E2,x
	LDA.w #$0009
	STA.w $7402,x
CODE_11B329:
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1B3_GatherCoinsBandit_Main:
;$11B32A
	LDA.w $10F8
	BNE.b CODE_11B329
	LDA.w $61D6
	CMP.w #$0081
	BCS.b CODE_11B33A
	STZ.w $61D6
CODE_11B33A:
	LDA.w $7680,x
	CMP.w #$0010
	BCS.b CODE_11B352
	LDA.w #$0010
	SEC
	SBC.w $7680,x
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	BRA.b CODE_11B36B

CODE_11B352:
	LDA.w $7680,x
	SEC
	SBC.w #$00E0
	BMI.b CODE_11B375
	CMP.w #$0020
	BCC.b CODE_11B36B
	STA.b $00
	LDA.w $70E2,x
	SEC
	SBC.b $00
	STA.w $70E2,x
CODE_11B36B:
	STZ.b $18,x
	LDA.w $7A36,x
	BEQ.b CODE_11B375
	STZ.w $7A36,x
CODE_11B375:
	LDA.b $18,x
	ASL
	TAY
	LDA.w DATA_11B381,y
	STA.b $00
	JMP.w ($0000+$7960)

DATA_11B381:
	dw CODE_11B38B
	dw CODE_11B41A
	dw CODE_11B4CB
	dw CODE_11B632
	dw CODE_11B6BD

CODE_11B38B:
	LDA.w $61D6
	BNE.b CODE_11B39A
	LDA.b $10
	AND.w #$00FF
	CMP.w #$00A0
	BCC.b CODE_11B3C2
CODE_11B39A:
	TXA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098DDA>>16
	LDA.w #FXCODE_098DDA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_11B3C2
	STA.b $76,x
	TAY
	LDA.w $70E2,y
	STA.b $00
	LDA.w #$0200
	STA.b $02
	INC.b $18,x
	BRA.b CODE_11B3D7

CODE_11B3C2:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.b $00
	LDA.w #$0200
	STA.b $02
	LDA.w #$0002
	STA.b $18,x
	LDA.w #$0050
	STA.w $7A96,x
CODE_11B3D7:
	LDA.b $00
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $02
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b #$02
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11B407
	DEY
	DEY
CODE_11B407:
	TYA
	STA.w $7400,x
	LDA.w #$0001
	STA.w $7402,x
	LDA.w #$0003
	STA.w $7A98,x
	STZ.b $78,x
	RTL

CODE_11B41A:
	LDY.b $76,x
	LDA.w $70E2,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0300
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.b $76,x
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	BEQ.b CODE_11B458
	EOR.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_11B45E
CODE_11B458:
	LDA.w $70E2,y
	STA.w $70E2,x
CODE_11B45E:
	LDA.w $7860,y
	LSR
	BCS.b CODE_11B495
	LDA.w $7182,y
	CMP.w #$00A0
	BCS.b CODE_11B495
	LDA.w $7860,x
	LSR
	BCC.b CODE_11B495
	LDA.w $70E2,y
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0038
	CMP.w #$0070
	BCS.b CODE_11B495
	LDA.w $7860,x
	LSR
	BCC.b CODE_11B495
	LDA.w #$FA00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11B495:
	LDY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BNE.b CODE_11B4A4
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.b $18,x
	STZ.w $7A36,x
CODE_11B4A4:
	LDY.b #$09
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_11B4BE
	LDA.w $7A98,x
	BNE.b CODE_11B4C2
	LDA.w #$0003
	STA.w $7A98,x
	LDY.w $7402,x
	DEY
	BPL.b CODE_11B4BE
	LDY.b #$01
CODE_11B4BE:
	TYA
	STA.w $7402,x
CODE_11B4C2:
	RTL

DATA_11B4C3:
	dw $FD00,$0300

DATA_11B4C7:
	dw $0300,$FD00

CODE_11B4CB:
	LDY.w $7D36,x
	BPL.b CODE_11B4D3
	JMP.w CODE_11B570

CODE_11B4D3:
	LDA.w $7860,x
	LSR
	BCC.b CODE_11B502
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0038
	CMP.w #$0070
	BCS.b CODE_11B502
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0017
	STA.w $7402,x
	LDA.w #$0003
	STA.b $18,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
	RTL

CODE_11B502:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	BEQ.b CODE_11B53C
	EOR.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_11B542
CODE_11B53C:
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STA.w $70E2,x
CODE_11B542:
	LDA.w $7A96,x
	BEQ.b CODE_11B567
	LDY.b #$09
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_11B561
	LDA.w $7A98,x
	BNE.b CODE_11B56F
	LDA.w #$0003
	STA.w $7A98,x
	LDY.w $7402,x
	DEY
	BPL.b CODE_11B561
	LDY.b #$01
CODE_11B561:
	TYA
	STA.w $7402,x
	BRA.b CODE_11B56F

CODE_11B567:
	LDA.w #$0009
	STA.w $7402,x
	STZ.b $18,x
CODE_11B56F:
	RTL

CODE_11B570:
	LDA.w $7C18,x
	SEC
	SBC.w $6122
	SEC
	SBC.w $7BB8,x
	CMP.w #$FFF8
	BCC.b CODE_11B5D7
	LDY.b #!Define_YI_SoundID3A_StompShyGuy
	JSL.l CODE_03A0E7
	LDA.w #!Define_YI_SoundID1C_StompEnemy
	JSL.l CODE_0085D2
	LDA.w #$0001
	STA.w $7A36,x
	LDA.b $18,x
	CMP.w #$0003
	BNE.b CODE_11B5BD
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11B5A8
	EOR.w #$FFFF
	INC
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BRA.b CODE_11B5BD

CODE_11B5A8:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $77C2,x
	LDA.w DATA_11B4C7,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0017
	STA.w $7402,x
CODE_11B5BD:
	LDA.w #$0008
	STA.w $60C0
	LDA.w #$FA00
	STA.w $60AA
	LDY.w $77C2,x
	LDA.w DATA_11B4C3,y
	STA.w $60A8
	STA.w $60B4
	BRA.b CODE_11B62C

CODE_11B5D7:
	LDA.w $7C18,x
	CLC
	ADC.w $6122
	CLC
	ADC.w $7BB8,x
	CMP.w #$0008
	BCC.b CODE_11B5F0
	LDA.w #!Define_YI_SoundID34_BurtJump
	JSL.l CODE_0085D2
	BRA.b CODE_11B5A8

CODE_11B5F0:
	LDA.w #!Define_YI_SoundID17_YoshiHurt
	JSL.l CODE_0085D2
	JSL.l CODE_04F74A
	LDA.w #$00C0
	STA.w $61D6
	STZ.w $60D4
	LDA.w $60C0
	BNE.b CODE_11B617
	LDA.w $60AA
	BPL.b CODE_11B5A8
	EOR.w #$FFFF
	INC
	STA.w $60AA
	BRA.b CODE_11B617

CODE_11B617:
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDY.w $77C2,x
	LDA.w DATA_11B4C7,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0017
	STA.w $7402,x
CODE_11B62C:
	LDA.w #$0003
	STA.b $18,x
	RTL

CODE_11B632:
	LDA.w $7A36,x
	BNE.b CODE_11B640
	LDY.w $7D36,x
	BPL.b CODE_11B640
	JSL.l CODE_11B570
CODE_11B640:
	LDY.b #$18
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11B648
	DEY
CODE_11B648:
	TYA
	STA.w $7402,x
	LDA.w $7860,x
	LSR
	BCC.b CODE_11B678
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	INC.b $18,x
	LDA.w #$0019
	STA.w $7402,x
	STZ.b $78,x
	LDA.w #$0004
	STA.w $7A98,x
	STZ.w $7181,x
	LDA.w #$00C0
	STA.w $7182,x
	LDA.w $7A36,x
	BEQ.b CODE_11B678
	LDA.w #$0006
	STA.b $78,x
CODE_11B678:
	RTL

DATA_11B679:
	dw $0019,$001A,$001B,$001C,$001D,$0009,$0012,$0013
	dw $0014,$0015,$0016,$0015,$0016,$0015,$0016,$0015
	dw $0009

DATA_11B69B:
	dw $0004,$0004,$0008,$0002,$0002,$0000,$0004,$0004
	dw $0004,$0014,$0002,$0002,$0002,$0002,$0002,$0014
	dw $0000

CODE_11B6BD:
	LDA.w $7A98,x
	BNE.b CODE_11B6DB
	INC.b $78,x
	LDA.b $78,x
	ASL
	TAY
	LDA.w DATA_11B679,y
	STA.w $7402,x
	LDA.w DATA_11B69B,y
	STA.w $7A98,x
	BNE.b CODE_11B6DB
	STZ.b $18,x
	STZ.w $7A36,x
CODE_11B6DB:
	RTL

CODE_11B6DC:
	RTS

CODE_11B6DD:
	RTS

DATA_11B6DE:
	dw $2520,$2521,$2522,$257F,$2523,$2524,$E532,$A530

DATA_11B6EE:
	dw $2530,$A521,$A521,$257F,$2533,$2534,$2532,$2529

DATA_11B6FE:
	dw $2D20,$2D21,$2D22,$2D7F,$2D25,$2D21,$ED31,$2D26
	dw $AD30

DATA_11B710:
	dw $2D30,$AD21,$AD21,$2D7F,$2D35,$AD21,$2D31,$2D35
	dw $2D29,$0003,$0006

DATA_11B726:
	dw $0005,$0007

DATA_11B72A:
	dw DATA_11B72A_End
.Transfer1:
	dw $35AC,$0180 : db !REGISTER_WriteToVRAMPortLo : dl DATA_11B6DE : dw $0010,DATA_11B72A_Transfer2
.Transfer2:
	dw $35CC,$0180 : db !REGISTER_WriteToVRAMPortLo : dl DATA_11B6EE : dw $0010,DATA_11B72A_End
.End:

DATA_11B744:
	dw DATA_11B744_End
.Transfer1:
	dw $35AC,$0180 : db !REGISTER_WriteToVRAMPortLo : dl DATA_11B6FE : dw $0012,DATA_11B744_Transfer2
.Transfer2:
	dw $35CC,$0180 : db !REGISTER_WriteToVRAMPortLo : dl DATA_11B710 : dw $0012,DATA_11B744_End
.End:

CODE_11B75E:
	RTL

CODE_11B75F:
	RTL

CODE_11B760:
	RTL

CODE_11B761:
	RTL

CODE_11B762:
	RTL

CODE_11B763:
	RTL

CODE_11B764:
	RTS

CODE_11B765:
	RTS

CODE_11B766:
	RTL

CODE_11B767:
	RTL

CODE_11B768:
	RTL

CODE_11B769:
	RTL

CODE_11B76A:
	RTL

CODE_11B76B:
	RTL

CODE_11B76C:
	RTL

CODE_11B76D:
	RTL

CODE_11B76E:
	REP.b #$20
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	STZ.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	LDY.b #$69
	STY.w !RAM_YI_Global_BG1AddressAndSize
	STY.w !REGISTER_BG1AddressAndSize
	LDY.b #$39
	STY.w !RAM_YI_Global_BG2AddressAndSize
	STY.w !REGISTER_BG2AddressAndSize
	LDY.b #$09
	STY.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STY.w !REGISTER_BGModeAndTileSizeSetting
	LDY.b #$00
	STY.w !RAM_YI_Global_HDMAEnable
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	LDA.w #$00B0
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0030
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $6CAA
	STA.w !RAM_YI_Level_StarTimerLo
	STZ.w $03BC
	LDA.w #$0008
	STA.w $1100
	STA.w $1102
	LDA.w #$FFFF
	STA.w $6EB6
	STA.w $6EB8
	STA.w $6EBA
	STZ.w $6CAA
	LDA.w #DATA_15FCEB
	STA.b !RAM_YI_Level_LevelDataPtrLo
	LDA.w #$0001
	STA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	LDA.w #$01B7
	JSL.l CODE_03A34C
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$0030
	STA.w $70E2,y
	LDA.w #$0050
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$00B0
	STA.w $70E2,y
	LDA.w #$0040
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$0020
	STA.w $70E2,y
	LDA.w #$0090
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$00A0
	STA.w $70E2,y
	LDA.w #$0080
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$0090
	STA.w $70E2,y
	LDA.w #$00C0
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$00E0
	STA.w $70E2,y
	LDA.w #$00C0
	STA.w $7182,y
	JSL.l CODE_0397D3
	LDA.b #DATA_15FCEB>>16
	STA.b !RAM_YI_Level_LevelDataPtrBank
	JSL.l CODE_108B61
	RTS

CODE_11B85C:
	JSL.l CODE_008259
	LDA.b #$30
	STA.w $6126
	JSL.l CODE_0394CF
	JSL.l CODE_04FA67
	STZ.w $03BA
	LDA.w $10F8
	ASL
	TAX
	JSR.w (DATA_11B886,x)
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

DATA_11B886:
	dw CODE_11B88C
	dw CODE_11B89D
	dw CODE_11B8C2

CODE_11B88C:
	JSL.l CODE_04DD9E
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_11B89C
	JSL.l CODE_0397D3
	JSR.w CODE_11B8E2
CODE_11B89C:
	RTS

CODE_11B89D:
	JSL.l CODE_04DD9E
	JSL.l CODE_0397D3
	LDA.w $10FA
	BEQ.b CODE_11B8BF
	LDA.w $60C0
	BNE.b CODE_11B8BF
	REP.b #$20
	LDA.w #$0080
	STA.w $10F0
	SEP.b #$20
	INC.w $10F8
	INC.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
CODE_11B8BF:
	JMP.w CODE_11AEC4

CODE_11B8C2:
	JSL.l CODE_04DD9E
	JSL.l CODE_0397D3
	REP.b #$20
	DEC.w $10F0
	BNE.b CODE_11B8D5
	JSL.l CODE_11AD2A
CODE_11B8D5:
	LDA.w #$0001
	STA.w !EXRAM_YI_Level_FreezeYoshiFlagLo|!EXRAMBankMirror
	JMP.w CODE_11AEC4

DATA_11B8DE:
	dw $0001,$0002

CODE_11B8E2:
	LDA.w $03BC
	BEQ.b CODE_11B8FD
	LDA.w $03BC
	ASL
	STA.b $04
	LDA.w $1100
	SEC
	SBC.b $04
	BPL.b CODE_11B8F7
	LDA.b #$00
CODE_11B8F7:
	STA.w $1100
	STZ.w $03BC
CODE_11B8FD:
	PHB
	LDA.b #$7E4800>>16
	PHA
	PLB
	REP.b #$30
	LDX.w $7E4800
	LDA.w #$3483
	STA.w $0000,x
	LDA.w #$3495
	STA.w $001C,x
	LDA.w #$0180
	STA.w $0002,x
	STA.w $001E,x
	LDA.w #$0018
	STA.w $0004,x
	STA.w $0020,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $0005,x
	ADC.w #$001C
	STA.w $0021,x
	LDA.w #$007E
	STA.w $0007,x
	STA.w $0023,x
	LDA.w #$0010
	STA.w $0008,x
	STA.w $0024,x
	TXA
	ADC.w #$001C
	STA.w $000A,x
	ADC.w #$001C
	STA.w $0026,x
	STA.w $7E4800
	PLB
	TXA
	SEC
	SBC.w #$4802
	STA.b $04
	TAX
	LDY.w $1100
	LDA.w #$0008
	SEC
	SBC.w $1100
	STA.b $06
	CMP.w #$0008
	BEQ.b CODE_11B986
	LDA.w #$2948
CODE_11B972:
	STA.l $7E480E,x
	INX
	INX
	DEY
	BNE.b CODE_11B972
	LDA.w #$2949
	STA.l $7E480C,x
	LDA.b $06
	BEQ.b CODE_11B993
CODE_11B986:
	LDA.w #$2946
CODE_11B989:
	STA.l $7E480E,x
	INX
	INX
	DEC.b $06
	BNE.b CODE_11B989
CODE_11B993:
	LDX.b $04
	LDY.w $1102
	LDA.w #$0008
	SEC
	SBC.w $1102
	STA.b $06
	CMP.w #$0008
	BEQ.b CODE_11B9BD
	LDA.w #$2948
CODE_11B9A9:
	STA.l $7E482A,x
	INX
	INX
	DEY
	BNE.b CODE_11B9A9
	LDA.w #$2949
	STA.l $7E4828,x
	LDA.b $06
	BEQ.b CODE_11B9CA
CODE_11B9BD:
	LDA.w #$2946
CODE_11B9C0:
	STA.l $7E482A,x
	INX
	INX
	DEC.b $06
	BNE.b CODE_11B9C0
CODE_11B9CA:
	LDY.w #$0002
	LDA.w $1100
	BEQ.b CODE_11B9DA
	LDA.w $1102
	BNE.b CODE_11B9F9
	LDY.w #$0000
CODE_11B9DA:
	TYA
	LSR
	STA.w $10E6
	LDA.w DATA_11B726,y
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.w DATA_11B8DE,y
	STA.w $10F8
	LDA.w #$0200
	STA.w $10F0
	JSR.w CODE_11B9FC
	LDA.w #$0001
	STA.w $10E2
CODE_11B9F9:
	SEP.b #$30
	RTS

CODE_11B9FC:
	LDX.w #$005C
CODE_11B9FF:
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	BEQ.b CODE_11BA28
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,x
	CMP.w #!Define_YI_NorSpr1B7_SeedSpittingMinigameBandit
	BNE.b CODE_11BA17
	CPY.w #$0000
	BNE.b CODE_11BA17
	LDA.w #$000E
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
CODE_11BA17:
	LDA.w $6FA2,x
	AND.w #$6000
	BNE.b CODE_11BA28
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7542,x
	STZ.w $7540,x
CODE_11BA28:
	STZ.w $7A38,x
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_11B9FF
	CPY.w #$0000
	BNE.b CODE_11BA68
	LDA.w $10F2
	BNE.b CODE_11BA68
	SEP.b #$10
	LDA.w #$0011
	LDY.b #$04
	JSL.l CODE_03A34E
	JSL.l CODE_008408
	AND.w #$0003
	CMP.w #$0003
	BNE.b CODE_11BA55
	LDA.w #$0000
CODE_11BA55:
	CLC
	ADC.w #$0007
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,y
	LDA.w #$0098
	STA.w $7182,y
	LDA.w #$0078
	STA.w $70E2,y
CODE_11BA68:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1B7_SeedSpittingMinigameBandit_Init:
;$11BA69
	LDA.w #$00C0
	STA.w $7182,x
	LDA.w #$00C0
	STA.w $70E2,x
	LDA.w #$0004
	STA.w $7A96,x
	RTL

;---------------------------------------------------------------------------

DATA_11BA7C:
	dw $0002,$0003,$0004,$0005,$0006,$0007,$0000,$0001
	dw $0008,$0009,$000A,$000B,$000C,$000D,$000E,$000F
	dw $0010,$0011,$0012,$0013,$0014,$0015,$0016,$0017
	dw $0018,$0019,$001A,$001B,$001A

DATA_11BAB6:
	dw $0004,$0004,$0004,$0004,$0004,$0004,$0000,$0000
	dw $0002,$0002,$0008,$0008,$0000,$0000,$0000,$0000
	dw $0000,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0000,$0000,$0000,$0000

DATA_11BAF0:
	dw $0000,$0006,$0008,$000A,$000C,$0013,$0019

DATA_11BAFE:
	dw $0006,$0008,$000A,$000C,$0013,$0019,$001D

DATA_11BB0C:
	dw $0008,$0000

YI_NorSpr1B7_SeedSpittingMinigameBandit_Main:
;$11BB10
	LDA.w $10F8
	BEQ.b CODE_11BB1E
	LDA.w #$0005
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	JMP.w CODE_11BC1B

CODE_11BB1E:
	LDY.w $7400,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BB0C,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	REP.b #$10
	LDA.w #$0010
	STA.b $00
	LDA.w #$0600
	LDY.w !REGISTER_SuperFX_R6_MultiplierLo
	BEQ.b CODE_11BB55
	LDY.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BNE.b CODE_11BB55
	STZ.b $00
	LDA.w #$0000
CODE_11BB55:
	STA.b $02
	SEP.b #$10
	LDA.w $6FA0,x
	AND.w #$F9FF
	ORA.b $02
	STA.w $6FA0,x
	LDA.w $7040,x
	AND.w #$FFEF
	ORA.b $00
	STA.w $7040,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_11BB98
	LDY.w $7D36,x
	BEQ.b CODE_11BBD9
	BMI.b CODE_11BBD9
	DEY
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr107_WatermelonSeed
	BNE.b CODE_11BBD9
	LDA.w $7A38,y
	BNE.b CODE_11BBD9
	LDA.w $7AF6,x
	BNE.b CODE_11BBD9
	TYX
	JSL.l CODE_03B24B
	BRA.b CODE_11BBB0

CODE_11BB98:
	PLA
	PLY
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $7AF6,x
	BNE.b CODE_11BBD9
	LDA.w $1102
	BEQ.b CODE_11BBB0
	DEC.w $1102
	DEC.w $1102
CODE_11BBB0:
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0004
	STA.b $18,x
	LDA.w #$0080
	STA.w $7AF6,x
	LDA.w #$0020
	STA.w $7042,x
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	LDA.w $1102
	BEQ.b CODE_11BBD9
	DEC.w $1102
	DEC.w $1102
CODE_11BBD9:
	SEP.b #$20
	LDY.b #$04
	LDA.w $7AF6,x
	AND.b #$04
	BEQ.b CODE_11BBE6
	LDY.b #$FF
CODE_11BBE6:
	TYA
	STA.w $74A2,x
	REP.b #$20
	LDA.w $7680,x
	CMP.w #$0010
	BCS.b CODE_11BC04
	LDA.w #$0010
	SEC
	SBC.w $7680,x
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	BRA.b CODE_11BC18

CODE_11BC04:
	LDA.w $7680,x
	SEC
	SBC.w #$00E0
	BMI.b CODE_11BC1B
	STA.b $00
	LDA.w $70E2,x
	SEC
	SBC.b $00
	STA.w $70E2,x
CODE_11BC18:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11BC1B:
	PEA.w CODE_11BC2A-$01
	LDA.b $18,x
	ASL
	TAY
	LDA.w DATA_11BCE7,y
	STA.b $00
	JMP.w ($0000+$7960)
CODE_11BC2A:
	LDA.w $110A
	BEQ.b CODE_11BC30
CODE_11BC2F:
	RTL

CODE_11BC30:
	LDA.w $7A98,x
	BNE.b CODE_11BC2F
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BNE.b CODE_11BC41
	LDA.w #$0013
	STA.w $7402,x
	RTL

CODE_11BC41:
	BPL.b CODE_11BC47
	EOR.w #$FFFF
	INC
CODE_11BC47:
	CMP.w #$0100
	BCS.b CODE_11BC5B
	LDA.w #$0005
	CMP.w $110E
	BEQ.b CODE_11BC67
	STA.w $110E
	ASL
	TAY
	BRA.b CODE_11BC83

CODE_11BC5B:
	LDA.w $110E
	BEQ.b CODE_11BC67
	STZ.w $110E
	LDY.b #$00
	BRA.b CODE_11BC83

CODE_11BC67:
	LDA.w $7860,x
	LSR
	BCS.b CODE_11BC73
	LDA.w #$0001
	STA.w $110C
CODE_11BC73:
	LDA.w $110E
	ASL
	TAY
	LDA.b $16,x
	INC
	CMP.w DATA_11BAFE,y
	BNE.b CODE_11BC86
	STZ.w $110C
CODE_11BC83:
	LDA.w DATA_11BAF0,y
CODE_11BC86:
	STA.b $16,x
	ASL
	TAY
	LDA.w DATA_11BA7C,y
	STA.w $7402,x
	LDA.w DATA_11BAB6,y
	STA.w $7A98,x
	LDA.w $110C
	BEQ.b CODE_11BCE6
	LDA.w $7860,x
	LSR
	BCC.b CODE_11BCBC
	STZ.w $110C
	STZ.w $110E
	LDY.b #$00
	LDA.w DATA_11BAF0,y
	STA.b $16,x
	LDA.w DATA_11BA7C,y
	STA.w $7402,x
	LDA.w DATA_11BAB6,y
	STA.w $7A98,x
	BRA.b CODE_11BCE6

CODE_11BCBC:
	LDY.b #$00
	LDA.w $7182,x
	CMP.w #$FD00
	BCC.b CODE_11BCDE
	INY
	CMP.w #$FF00
	BCC.b CODE_11BCDE
	INY
	CMP.w #$0000
	BCC.b CODE_11BCDE
	CMP.w #$0100
	BCC.b CODE_11BCDE
	INY
	CMP.w #$0300
	BCC.b CODE_11BCDE
	INY
CODE_11BCDE:
	TYA
	CLC
	ADC.w #$000C
	STA.w $7402,x
CODE_11BCE6:
	RTL

DATA_11BCE7:
	dw CODE_11BCF3
	dw CODE_11BD7C
	dw CODE_11C013
	dw CODE_11C2CF
	dw CODE_11C3E1
	dw CODE_11BCFD

CODE_11BCF3:
	LDA.w $1104
	BEQ.b CODE_11BCFE
	LDA.w #$0002
	STA.b $18,x
CODE_11BCFD:
	RTS

CODE_11BCFE:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098DDA>>16
	LDA.w #FXCODE_098DDA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_11BD7B
	STA.b $76,x
	TAY
	LDA.w $7860,x
	LSR
	BCC.b CODE_11BD7B
	LDA.w $70E2,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BPL.b CODE_11BD69
	LDY.b $76,x
	LDA.w $7182,x
	SEC
	SBC.w $7182,y
	CMP.w #$0020
	BCS.b CODE_11BD5C
	LDA.w #$FC00
	BRA.b CODE_11BD5F

CODE_11BD5C:
	LDA.w #$FA80
CODE_11BD5F:
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11BD69:
	LDY.b #$02
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11BD75
	LDY.b #$00
CODE_11BD75:
	TYA
	STA.w $7400,x
	INC.b $18,x
CODE_11BD7B:
	RTS

CODE_11BD7C:
	LDA.w $6150
	BEQ.b CODE_11BDAE
	LDA.w !EXRAM_YI_Level_Player_AmmoTypeInMouthLo|!EXRAMBankMirror
	BEQ.b CODE_11BDAE
	LDA.b $02
	BEQ.b CODE_11BDAE
	LDA.w $7860,x
	LSR
	BCC.b CODE_11BDAE
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	CMP.w #$0031
	BCS.b CODE_11BDAE
	LDA.w #$FA80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
	RTS

CODE_11BDAE:
	LDY.w $7D36,x
	BEQ.b CODE_11BDEE
	BMI.b CODE_11BDEE
	DEY
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_11BDEE
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr007_Watermelon
	BEQ.b CODE_11BDCB
	CMP.w #!Define_YI_NorSpr009_FireWatermelon
	BNE.b CODE_11BDEE
CODE_11BDCB:
	STA.w $1104
	LDA.w #$0003
	STA.w $1106
	TYX
	JSL.l CODE_03A31E
	LDX.b $12
	INC.b $18,x
	RTS

CODE_11BDDE:
	LDA.w $0030
	AND.w #$0008
	LSR
	LSR
	LSR
	ORA.w #$000A
	STA.w $7402,x
	RTS

CODE_11BDEE:
	TXA
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_098DDA>>16
	LDA.w #FXCODE_098DDA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_11BDDE
	STA.b $76,x
	LDA.b $78,x
	BEQ.b CODE_11BE31
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	BNE.b CODE_11BE20
	LDA.w $70E2,x
	CMP.w #$0010
	BCS.b CODE_11BE2E
	LDA.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7400,x
	BRA.b CODE_11BE2E

CODE_11BE20:
	LDA.w $70E2,x
	CMP.w #$00E0
	BCC.b CODE_11BE2E
	STZ.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STZ.w $7400,x
CODE_11BE2E:
	JMP.w CODE_11BEC4

CODE_11BE31:
	LDA.w $7860,x
	LSR
	BCS.b CODE_11BE3A
	JMP.w CODE_11BED0

CODE_11BE3A:
	LDY.b #$00
	LDA.w $70E2,x
	SEC
	SBC.w #$0080
	BPL.b CODE_11BE47
	LDY.b #$02
CODE_11BE47:
	TYA
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7400,x
	LDY.b $76,x
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	CLC
	ADC.w #$0010
	CMP.w #$0021
	BCS.b CODE_11BED0
	LDA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	SEC
	SBC.w $7182,y
	CLC
	ADC.w #$0020
	LDY.b #$01
	CMP.w #$0031
	BCC.b CODE_11BED0
	BMI.b CODE_11BEC1
	CMP.w #$00A1
	BCS.b CODE_11BED0
	LDA.w #$FE00
	LDY.w $70E2,x
	CPY.b #$31
	BCS.b CODE_11BE89
	LDA.w #$0200
CODE_11BE89:
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w $70E2,x
	SEC
	SBC.w #$0010
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDY.b #$02
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_11BEC1
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PHY
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
	PLY
CODE_11BEC1:
	TYA
	STA.b $78,x
CODE_11BEC4:
	LDA.b $78,x
	ASL
	TAY
	LDA.w DATA_11BF47-$02,y
	STA.b $00
	JMP.w ($0000+$7960)

CODE_11BED0:
	LDY.b $76,x
	LDA.w $70E2,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $7182,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $70E2,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$0200
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.b #$02
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11BF07
	LDY.b #$00
CODE_11BF07:
	TYA
	STA.w $7400,x
	LDA.w $7860,x
	LSR
	BCC.b CODE_11BF46
	LDA.w $7860,x
	AND.w DATA_11C00B,y
	BEQ.b CODE_11BF26
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11BF26:
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BPL.b CODE_11BF46
	LDY.b $76,x
	LDA.w $7182,x
	SEC
	SBC.w $7182,y
	CMP.w #$0020
	BCC.b CODE_11BF46
	LDA.w #$FA80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11BF46:
	RTS

DATA_11BF47:
	dw CODE_11BF53
	dw CODE_11BF9E

DATA_11BF4B:
	dw $FE00,$0200

DATA_11BF4F:
	dw $FFF0,$0010

CODE_11BF53:
	LDY.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w DATA_11BF4B,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w $7860,x
	LSR
	BCC.b CODE_11BF8F
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BF4F,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_11BF8F
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11BF8F:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CMP.w #$0028
	BCC.b CODE_11BF9D
	STZ.b $78,x
CODE_11BF9D:
	RTS

CODE_11BF9E:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7400,x
	LDY.w $7400,x
	LDA.w $7860,x
	LSR
	BCC.b CODE_11BFDD
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BF4F,y
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_11BFDD
	LDA.w #$FA80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11BFDD:
	LDY.b $76,x
	LDA.w $70E2,x
	SEC
	SBC.w $70E2,y
	CLC
	ADC.w #$0010
	CMP.w #$0021
	BCC.b CODE_11BFFA
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0002
	STA.w $7400,x
	STZ.b $78,x
CODE_11BFFA:
	RTS

DATA_11BFFB:
	dw $FFEC,$0014

DATA_11BFFF:
	dw $FFF7,$0009

DATA_11C003:
	dw $FFF0,$0010,$0000,$0000

DATA_11C00B:
	dw $0008,$0004

DATA_11C00F:
	dw $FF00,$0100

CODE_11C013:
	LDA.w $7A36,x
	BNE.b CODE_11C04E
	LDY.b #$02
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	BMI.b CODE_11C030
	LDY.b #$04
	CMP.w #$0031
	BCS.b CODE_11C030
	LDY.b #$06
CODE_11C030:
	TYA
	STA.w $7A36,x
	LDY.b #$02
	LDA.w $70E2,x
	CMP.w #$0020
	BCC.b CODE_11C048
	LDY.b #$00
	CMP.w #$00D0
	BCS.b CODE_11C048
	LDY.w $60C4
CODE_11C048:
	TYA
	STA.w $7A38,x
	BRA.b CODE_11C064

CODE_11C04E:
	LDA.w $70E2,x
	CMP.w #$00E0
	BCS.b CODE_11C05B
	CMP.w #$0012
	BCS.b CODE_11C064
CODE_11C05B:
	LDA.w $7A38,x
	EOR.w #$0002
	STA.w $7A38,x
CODE_11C064:
	PEA.w CODE_11C072-$01
	LDY.w $7A36,x
	LDA.w DATA_11C085-$02,y
	STA.b $00
	JMP.w ($0000+$7960)
CODE_11C072:
	LDA.w $7A36,x
	BEQ.b CODE_11C084
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_11C080
	LDY.b #$02
CODE_11C080:
	TYA
	STA.w $7400,x
CODE_11C084:
	RTS

DATA_11C085:
	dw CODE_11C08B
	dw CODE_11C0EF
	dw CODE_11C1D2

CODE_11C08B:
	LDY.w $7A38,x
	LDA.w $7860,x
	AND.w DATA_11C00B,y
	BNE.b CODE_11C09C
	LDA.w DATA_11C00F,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C09C:
	LDA.w $7860,x
	LSR
	BCC.b CODE_11C0EE
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BF4F,y
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_11C0D3
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11C0D3:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	CMP.w #$0031
	BCC.b CODE_11C0E5
	BMI.b CODE_11C0EE
CODE_11C0E5:
	STZ.w $7A36,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C0EE:
	RTS

CODE_11C0EF:
	LDY.w $7A38,x
	LDA.w $7860,x
	AND.w DATA_11C00B,y
	BNE.b CODE_11C100
	LDA.w DATA_11C00F,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C100:
	LDA.w $7860,x
	LSR
	BCC.b CODE_11C121
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	BMI.b CODE_11C118
	CMP.w #$0031
	BCS.b CODE_11C122
CODE_11C118:
	STZ.w $7A36,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C121:
	RTS

CODE_11C122:
	LDA.w $70E2,x
	CLC
	ADC.w #$0008
	STA.b $04
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	SEC
	SBC.w #$0040
	STA.b $06
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BNE.b CODE_11C19D
	LDA.b $04
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $06
	CLC
	ADC.w #$0010
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0001
	BNE.b CODE_11C18C
	LDA.b $04
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.b $06
	CLC
	ADC.w #$0020
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R7_MERGEXPosLo
	AND.w #$0001
	BEQ.b CODE_11C19D
CODE_11C18C:
	LDA.w #$FA80
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_11C19D:
	LDY.w $7A38,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BF4F,y
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_11C1D1
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11C1D1:
	RTS

CODE_11C1D2:
	LDA.w $7A96,x
	BNE.b CODE_11C21F
	LDY.w $7A38,x
	LDA.w $7860,x
	AND.w DATA_11C00B,y
	BNE.b CODE_11C1E8
	LDA.w DATA_11C00F,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C1E8:
	LDA.w $7860,x
	LSR
	BCC.b CODE_11C21F
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BF4F,y
	CLC
	ADC.w #$0008
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_11C220
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
CODE_11C21F:
	RTS

CODE_11C220:
	LDA.w $7182,x
	SEC
	SBC.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.w #$0010
	CMP.w #$0031
	BCS.b CODE_11C2AA
	LDA.w $61D6
	BNE.b CODE_11C21F
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0060
	CMP.w #$00C1
	BCS.b CODE_11C21F
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $02
	BEQ.b CODE_11C2B4
	INC.b $18,x
	LDY.b #$02
	LDA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	CMP.w $70E2,x
	BCS.b CODE_11C25D
	LDY.b #$00
CODE_11C25D:
	TYA
	STA.w $7400,x
	LDA.w #$001E
	STA.w $7A96,x
CODE_11C267:
	STZ.w $7402,x
	LDA.w $7182,x
	CLC
	ADC.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDY.b #$00
	LDA.w $1104
	CMP.w #$0009
	BEQ.b CODE_11C280
	LDY.b #$04
CODE_11C280:
	TYA
	ORA.w $7400,x
	TAY
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BFFB,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w DATA_11C003,y
	STA.w $7A38,x
	LDA.w #$0030
	STA.w $7042,x
	LDY.b #$06
	STY.w $1108
	LDA.w #$0001
	STA.w $110A
	STZ.w $7A36,x
	RTS

CODE_11C2AA:
	STZ.w $7A36,x
	STZ.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	RTS

CODE_11C2B4:
	LDY.w $60C4
	LDA.w DATA_11C00F,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.b $10
	TAY
	CPY.b #$F8
	BCC.b CODE_11C2CE
	TYA
	AND.w #$003F
	STA.w $7A96,x
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C2CE:
	RTS

CODE_11C2CF:
	LDA.w $7A96,x
	BNE.b CODE_11C308
	LDA.w $1108
	BNE.b CODE_11C309
	LDA.w #$0002
	DEC.w $1106
	BNE.b CODE_11C2E7
	STZ.w $1104
	LDA.w #$0000
CODE_11C2E7:
	STA.b $18,x
	STZ.w $110E
	LDY.b #$00
	LDA.w DATA_11BAF0,y
	STA.b $16,x
	LDA.w DATA_11BA7C,y
	STA.w $7402,x
	LDA.w DATA_11BAB6,y
	STA.w $7A98,x
	LDA.w #$0020
	STA.w $7042,x
	STZ.w $110A
CODE_11C308:
	RTS

CODE_11C309:
	LDA.w #$0001
	STA.w $7402,x
	LDA.w $1104
	CMP.w #$0007
	BNE.b CODE_11C371
	LDY.w $7400,x
	LDA.w $7182,x
	CLC
	ADC.w #$0002
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $70E2,x
	CLC
	ADC.w DATA_11BFFF,y
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.w #$0006
	STA.w $7A96,x
	LDA.w #$0107
	JSL.l CODE_03A34C
	BCC.b CODE_11C36F
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7182,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $70E2,y
	LDA.w #$0001
	STA.w $7D38,y
	STA.w $7A38,y
	LDA.w $7400,x
	STA.w $7400,y
	TAX
	LDA.w #$FC00
	CPX.b #$00
	BEQ.b CODE_11C363
	LDA.w #$0400
CODE_11C363:
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,y
	LDA.w #!Define_YI_SoundID45_SpitSeed
	JSL.l CODE_0085D2
	LDX.b $12
CODE_11C36F:
	BRA.b CODE_11C3DD

CODE_11C371:
	LDA.w #$0018
	JSL.l CODE_03A34C
	BCC.b CODE_11C3DD
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w $7182,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w $70E2,y
	LDA.w #$0001
	STA.w $7A38,y
	LDA.w $7400,x
	STA.w $7400,y
	LDA.w #$0010
	STA.w $7A96,y
	LDA.w $7042,y
	AND.w #$00F1
	ORA.w #$0006
	STA.w $7042,y
	SEP.b #$20
	LDA.b #$29
	STA.w $7180,y
	REP.b #$20
	LDA.w #$0002
	STA.w $7A96,x
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_0ACE2F>>16
	LDA.w #FXCODE_0ACE2F
	JSL.l !RAM_YI_Global_RT_00DE91
	LDX.b $12
	LDA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	BEQ.b CODE_11C3D3
	STZ.w $1108
	RTS

CODE_11C3D3:
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	CLC
	ADC.w $7A38,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
CODE_11C3DD:
	DEC.w $1108
	RTS

CODE_11C3E1:
	LDA.w $7860,x
	LSR
	BCC.b CODE_11C44A
	LDA.w $7AF8,x
	BNE.b CODE_11C3F5
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0020
	STA.w $7AF8,x
CODE_11C3F5:
	AND.w #$0008
	LSR
	LSR
	LSR
	ORA.w #$0008
	STA.w $7402,x
	LDA.w $7AF8,x
	CMP.w #$0001
	BNE.b CODE_11C44A
	STZ.b $18,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.w $110A
	BEQ.b CODE_11C44A
	LDA.w $1108
	BEQ.b CODE_11C43A
	CMP.w #$0006
	BEQ.b CODE_11C428
	LDA.w $1104
	CMP.w #$0009
	BEQ.b CODE_11C43A
CODE_11C428:
	LDA.w #$0003
	STA.b $18,x
	LDA.w #$0030
	STA.w $7042,x
	LDA.w #$0001
	STA.w $7402,x
	RTS

CODE_11C43A:
	STZ.w $110A
	LDA.w $1106
	BEQ.b CODE_11C44A
	DEC.w $1106
	BNE.b CODE_11C44A
	STZ.w $1104
CODE_11C44A:
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1B8_WatermelonPot_Init:
;$11C44B
	LDY.w !REGISTER_SoftwareLatchForHVCounter
	LDY.w !REGISTER_PPUStatusFlag2
	LDA.w !REGISTER_HCounter
	CLC
	ADC.b $10
	STA.b $10
	AND.w #$00FF
	STA.w $7A96,x
	RTL

;---------------------------------------------------------------------------

YI_NorSpr1B8_WatermelonPot_Main:
;$11C460
	LDA.b $18,x
	ASL
	TAY
	LDA.w DATA_11C46C,y
	STA.b $00
	JMP.w ($0000+$7960)

DATA_11C46C:
	dw CODE_11C482
	dw CODE_11C4E3
	dw CODE_11C4F3

DATA_11C472:
	dw $0007,$0007,$0009,$0007,$0007,$0009,$0007,$0007

CODE_11C482:
	LDA.w $7A96,x
	BNE.b CODE_11C4E2
	LDA.w $10FE
	CMP.w #$0002
	BEQ.b CODE_11C4DC
	INC.w $1110
	LDA.w !EXRAM_YI_Global_RNGOutputLo|!EXRAMBankMirror
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_11C472,y
	TAY
	CMP.w #$0007
	BEQ.b CODE_11C4B2
	LDA.w $1110
	CMP.w #$0004
	BCC.b CODE_11C4B0
	STZ.w $1110
	BRA.b CODE_11C4B2

CODE_11C4B0:
	LDY.b #$07
CODE_11C4B2:
	TYA
	JSL.l CODE_03A364
	LDA.w $6FA0,y
	AND.w #$F9FF
	ORA.w #$0200
	STA.w $6FA0,y
	LDA.w $70E2,x
	STA.w $70E2,y
	LDA.w $7182,x
	STA.w $7182,y
	TYA
	STA.b $76,x
	LDA.w #$0010
	STA.b $16,x
	INC.w $10FE
	INC.b $18,x
CODE_11C4DC:
	LDA.w #$0100
	STA.w $7A96,x
CODE_11C4E2:
	RTL

CODE_11C4E3:
	LDY.b $76,x
	LDA.w $7182,y
	DEC
	STA.w $7182,y
	DEC.b $16,x
	BNE.b CODE_11C4F2
	INC.b $18,x
CODE_11C4F2:
	RTL

CODE_11C4F3:
	LDY.b $76,x
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	BNE.b CODE_11C505
	STZ.b $18,x
	LDA.w #$0100
	STA.w $7A96,x
	DEC.w $10FE
CODE_11C505:
	RTL

CODE_11C506:
	REP.b #$20
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	STZ.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	LDY.b #$69
	STY.w !RAM_YI_Global_BG1AddressAndSize
	STY.w !REGISTER_BG1AddressAndSize
	LDY.b #$39
	STY.w !RAM_YI_Global_BG2AddressAndSize
	STY.w !REGISTER_BG2AddressAndSize
	LDY.b #$09
	STY.w !RAM_YI_Global_BGModeAndTileSizeSetting
	STY.w !REGISTER_BGModeAndTileSizeSetting
	LDY.b #$00
	STY.w !RAM_YI_Global_HDMAEnable
	STY.w !RAM_YI_Global_ColorMathSelectAndEnable
	REP.b #$20
	LDA.w #$00B0
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	LDA.w #$0030
	STA.w !EXRAM_YI_Player_XPosLo|!EXRAMBankMirror
	STZ.w $6CAA
	STA.w !RAM_YI_Level_StarTimerLo
	STZ.w $03BC
	LDA.w #$0008
	STA.w $1100
	STA.w $1102
	LDA.w #$0001
	STA.w $10F2
	LDA.w #$FFFF
	STA.w $6EB6
	STA.w $6EB8
	STA.w $6EBA
	STZ.w $6CAA
	LDA.w #DATA_15FCEB
	STA.b !RAM_YI_Level_LevelDataPtrLo
	LDA.w #$0001
	STA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	LDA.w #$01B9
	JSL.l CODE_03A34C
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$0030
	STA.w $70E2,y
	LDA.w #$0050
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$00B0
	STA.w $70E2,y
	LDA.w #$0040
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$0020
	STA.w $70E2,y
	LDA.w #$0090
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$00A0
	STA.w $70E2,y
	LDA.w #$0080
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$0090
	STA.w $70E2,y
	LDA.w #$00C0
	STA.w $7182,y
	LDA.w #$01B8
	JSL.l CODE_03A34C
	LDA.w #$00E0
	STA.w $70E2,y
	LDA.w #$00C0
	STA.w $7182,y
	JSL.l CODE_0397D3
	LDA.b #DATA_15FCEB>>16
	STA.b !RAM_YI_Level_LevelDataPtrBank
	JSL.l CODE_108B61
	RTS

CODE_11C5FA:
	JSL.l CODE_008259
	LDA.b #$30
	STA.w $6126
	JSL.l CODE_0394CF
	JSL.l CODE_04FA67
	STZ.w $03BA
	LDA.w $1100
	BEQ.b CODE_11C618
	LDA.w $1102
	BNE.b CODE_11C622
CODE_11C618:
	LDA.b #$01
	STA.w $10FA
	JSR.w CODE_11AEC4
	BRA.b CODE_11C632

CODE_11C622:
	JSL.l CODE_04DD9E
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_11C632
	JSL.l CODE_0397D3
	JSR.w CODE_11B8E2
CODE_11C632:
	REP.b #$20
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

YI_NorSpr1B9_P2SeedSpittingMinigameBandit_Init:
;$11C640
	LDA.w #$00C0
	STA.w $7182,x
	LDA.w #$00C0
	STA.w $70E2,x
	LDA.w #$0004
	STA.w $7A96,x
	LDA.w #$0030
	STA.w $7042,x
	RTL

;---------------------------------------------------------------------------

DATA_11C659:
	dw $FFF0,$0010,$FF00,$0100

DATA_11C661:
	dw $0040,$FFC0

DATA_11C665:
	dw $FDC0,$0240,$FDC0,$0240

DATA_11C66D:
	dw $0010,$00E0

DATA_11C671:
	dw $0010,$00E0,$0011,$0012

YI_NorSpr1B9_P2SeedSpittingMinigameBandit_Main:
;$11C679
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	CMP.w #$0010
	BNE.b CODE_11C6A2
	LDY.w $7D36,x
	BEQ.b CODE_11C6D8
	BMI.b CODE_11C6D8
	DEY
	LDA.w $7AF6,x
	BNE.b CODE_11C6D8
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr107_WatermelonSeed
	BNE.b CODE_11C6D8
	LDA.w $7A38,y
	BNE.b CODE_11C6D8
	TYX
	JSL.l CODE_03B24B
	BRA.b CODE_11C6BA

CODE_11C6A2:
	PLA
	PLY
	LDA.w #$0010
	STA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,x
	LDA.w $7AF6,x
	BNE.b CODE_11C6D8
	LDA.w $1102
	BEQ.b CODE_11C6BA
	DEC.w $1102
	DEC.w $1102
CODE_11C6BA:
	LDA.w #$FD00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0080
	STA.w $7AF6,x
	LDA.w #!Define_YI_SoundID75_LitterMouserSqueak
	JSL.l CODE_0085D2
	LDA.w $1102
	BEQ.b CODE_11C6D8
	DEC.w $1102
	DEC.w $1102
CODE_11C6D8:
	LDA.w #$0010
	LDY.w $7AF6,x
	BEQ.b CODE_11C6E3
	LDA.w #$0000
CODE_11C6E3:
	STA.b $00
	LDA.w $7040,x
	AND.w #$FFEF
	ORA.b $00
	STA.w $7040,x
	SEP.b #$20
	LDY.b #$04
	LDA.w $7AF6,x
	AND.b #$04
	BEQ.b CODE_11C6FD
	LDY.b #$FF
CODE_11C6FD:
	TYA
	STA.w $74A2,x
	REP.b #$20
	LDY.w $7400,x
	BNE.b CODE_11C720
	LDA.w $7680,x
	CMP.w #$0010
	BCS.b CODE_11C737
	LDA.w #$0010
	SEC
	SBC.w $7680,x
	CLC
	ADC.w $70E2,x
	STA.w $70E2,x
	BRA.b CODE_11C734

CODE_11C720:
	LDA.w $7680,x
	SEC
	SBC.w #$00E0
	BMI.b CODE_11C737
	STA.b $00
	LDA.w $70E2,x
	SEC
	SBC.b $00
	STA.w $70E2,x
CODE_11C734:
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C737:
	LDA.w $1104
	BNE.b CODE_11C767
	LDY.w $7D36,x
	BEQ.b CODE_11C780
	BMI.b CODE_11C780
	DEY
	LDA.w !EXRAM_YI_Level_NorSpr_CurrentStatus|!EXRAMBankMirror,y
	CMP.w #$0010
	BNE.b CODE_11C767
	LDA.w !EXRAM_YI_Level_NorSpr_SpriteID|!EXRAMBankMirror,y
	CMP.w #!Define_YI_NorSpr007_Watermelon
	BEQ.b CODE_11C759
	CMP.w #!Define_YI_NorSpr009_FireWatermelon
	BNE.b CODE_11C780
CODE_11C759:
	STA.w $1104
	LDA.w #$0003
	STA.w $1106
	TYX
	JSL.l CODE_03A31E
CODE_11C767:
	LDA.w $110A
	BNE.b CODE_11C775
	LDA.w $0942
	ASL
	BPL.b CODE_11C780
	JSR.w CODE_11C267
CODE_11C775:
	JSR.w CODE_11C2CF
	LDA.w #$0030
	STA.w $7042,x
	BRA.b CODE_11C79E

CODE_11C780:
	LDA.w $110C
	BNE.b CODE_11C79E
	LDA.w $0941
	AND.w #$0004
	BEQ.b CODE_11C79E
	LDA.w $1112
	BNE.b CODE_11C79B
	LDA.w #$0004
	STA.w $7BB8,x
	STA.w $1112
CODE_11C79B:
	JMP.w CODE_11C82B

CODE_11C79E:
	LDA.w #$0006
	STA.w $7BB8,x
	STZ.w $1112
	LDY.b #$C0
	LDA.w $0940
	BPL.b CODE_11C7D8
	LDY.b #$20
	LDA.w $110C
	BNE.b CODE_11C7D8
	LDA.w $7860,x
	LSR
	BCC.b CODE_11C7D8
	LDA.w $0942
	BPL.b CODE_11C7D8
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	PHY
	LDA.w #!Define_YI_SoundID38_BabyMarioJump
	JSL.l CODE_0085D2
	PLY
	LDA.w #$0001
	STA.w $110C
	STA.w $7A96,x
CODE_11C7D8:
	TYA
	STA.w $7542,x
	LDA.w $0941
	AND.w #$0003
	BEQ.b CODE_11C82B
	AND.w #$0001
	ASL
	TAY
	EOR.w $7400,x
	BEQ.b CODE_11C803
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CPY.b #$02
	BEQ.b CODE_11C7F9
	EOR.w #$FFFF
	INC
CODE_11C7F9:
	CMP.w #$00C0
	BPL.b CODE_11C803
	TYA
	ORA.w #$0004
	TAY
CODE_11C803:
	LDA.w $70E2,x
	CMP.w DATA_11C66D,y
	BEQ.b CODE_11C82B
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w DATA_11C659,y
	CMP.w DATA_11C665,y
	BEQ.b CODE_11C81A
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C81A:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_11C84A
	BMI.b CODE_11C825
	LDY.b #$02
CODE_11C825:
	TYA
	STA.w $7400,x
	BRA.b CODE_11C84A

CODE_11C82B:
	LDA.w $110C
	BNE.b CODE_11C84A
	LDY.w $7400,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_11C84A
	CLC
	ADC.w DATA_11C661,y
	STA.b $00
	EOR.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BPL.b CODE_11C845
	STZ.b $00
CODE_11C845:
	LDA.b $00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
CODE_11C84A:
	LDA.w $110A
	BNE.b CODE_11C8BF
	LDA.w $110C
	BEQ.b CODE_11C88E
	LDA.w $7860,x
	LSR
	BCC.b CODE_11C875
	LDA.w $7A96,x
	BNE.b CODE_11C8BF
	LDY.b #$00
	LDA.w $110C
	INC
	AND.w #$0003
	STA.w $110C
	BEQ.b CODE_11C88C
	ASL
	TAY
	LDA.w DATA_11C671,y
	TAY
	BRA.b CODE_11C8BB

CODE_11C875:
	LDY.b #$0E
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0100
	CMP.w #$0200
	BCC.b CODE_11C88C
	LDY.b #$0C
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_11C88C
	LDY.b #$10
CODE_11C88C:
	BRA.b CODE_11C8BB

CODE_11C88E:
	LDA.w $1112
	BEQ.b CODE_11C897
	LDY.b #$1B
	BRA.b CODE_11C8BB

CODE_11C897:
	LDY.b #$00
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_11C8BB
	LDA.w $7A96,x
	BNE.b CODE_11C8BF
	LDA.w #$0004
	STA.w $7A96,x
	INC.b $16,x
	LDA.b $16,x
	ASL
	TAY
	CPY.b #$0C
	BNE.b CODE_11C8B7
	LDY.b #$00
	STZ.b $16,x
CODE_11C8B7:
	LDA.w DATA_11BA7C,y
	TAY
CODE_11C8BB:
	TYA
	STA.w $7402,x
CODE_11C8BF:
	RTL

;---------------------------------------------------------------------------

DATA_11C8C0:
	dw FXDATA_538000+$0070,FXDATA_538000+$2070,FXDATA_538000+$008C,FXDATA_538000+$0054,FXDATA_538000+$00A8,FXDATA_538000+$001C,FXDATA_538000+$208C,FXDATA_538000+$208C
	dw FXDATA_538000+$20A8,FXDATA_538000+$2000,FXDATA_538000+$201C,FXDATA_538000+$2038

DATA_11C8D8:
	dw DATA_5FC860,DATA_5FDFFC,DATA_5FC860,DATA_5FC860,DATA_5FC860,DATA_5FC860,DATA_5FC87E,DATA_5FC860
	dw DATA_5FDFFC,DATA_5FC860,DATA_5FC860,DATA_5FC860

YI_NorSpr011_ItemCard_Init:
;$11C8F0
	JSL.l CODE_03AE60
	LDA.b $18,x
	ASL
	TAY
	LDA.w DATA_11C8D8-$02,y
	STA.b $00
	PHB
	LDY.b #DATA_5FC860>>16
	PHY
	PLB
	LDX.b #$1C
	TXY
CODE_11C905:
	LDA.b ($00),y
	STA.l YI_Global_PaletteMirror[$E1].LowByte,x
	DEY
	DEY
	DEX
	DEX
	BPL.b CODE_11C905
	PLB
	LDX.w $7972
	LDA.w #$0020
	STA.b $76,x
CODE_11C91A:
	LDA.b $76,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $78,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $18,x
	ASL
	TAY
	LDA.w DATA_11C8C0-$02,y
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #(FXDATA_538000+$0070)>>16
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDX.b #FXCODE_089BE1>>16
	LDA.w #FXCODE_089BE1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	BRA.b CODE_11C99D

CODE_11C954:
	LDA.b $76,x
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.b $78,x
	LDA.w #$0000
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.b $18,x
	ASL
	TAY
	LDA.w DATA_11C8C0-$02,y
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
else
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
endif
	LDA.w #(FXDATA_538000+$0070)>>16
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDA.w #(FXDATA_538000+$0070)>>16
endif
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	LDY.w $7722,x
	TYX
	LDA.l DATA_03A9CE,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_03A9EE,x
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDX.b #FXCODE_089BC5>>16
	LDA.w #FXCODE_089BC5
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	INC.w $0CF9
	LDX.b $12
CODE_11C99D:
	LDX.b $12
	RTL

;---------------------------------------------------------------------------

YI_NorSpr011_ItemCard_Main:
;$11C9A0
	PEA.w CODE_11C9B0-$01
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
	ASL
	TAY
	LDA.w DATA_11C9BD,y
	STA.b $00
	JMP.w ($0000+$7960)
CODE_11C9B0:
	JSL.l CODE_11C91A
	JSL.l CODE_02DABA
	JSL.l CODE_03AA52
	RTL

DATA_11C9BD:
	dw CODE_11C9C1
	dw CODE_11C9DD

CODE_11C9C1:
	LDA.b $76,x
	CLC
	ADC.w #$0002
	STA.b $76,x
	CMP.w #$0100
	BNE.b CODE_11C9D1
	INC.w !EXRAM_YI_Level_NorSpr_GenericTable701976|!EXRAMBankMirror,x
CODE_11C9D1:
	LDA.b $78,x
	CLC
	ADC.w #$0003
	AND.w #$00FF
	STA.b $78,x
	RTS

CODE_11C9DD:
	LDY.w $7D36,x
	BEQ.b CODE_11CA04
	BPL.b CODE_11CA04
	LDA.w #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
	JSL.l CODE_02A4F4
	JSL.l CODE_03A31E
	INC.w $10FA
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701978|!EXRAMBankMirror,x
	CMP.w #$000A
	BCS.b CODE_11CA07
	JSL.l CODE_109CA6
	LDX.b $12
CODE_11CA04:
	JMP.w CODE_11C9D1

CODE_11CA07:
	SBC.w #$000A
	INC
	CLC
	ADC.w !RAM_YI_Level_CurrentLifeCountLo
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	JMP.w CODE_11C9D1

DATA_11CA15:
	incbin "LevelData/DATA_11CA15.bin"

DATA_11CC89:
	incbin "LevelData/DATA_11CC89.bin"

DATA_11CE64:
	incbin "LevelData/DATA_11CE64.bin"

DATA_11CF8C:
	incbin "LevelData/DATA_11CF8C.bin"

DATA_11D2BB:
	incbin "LevelData/DATA_11D2BB.bin"

DATA_11D34D:
	incbin "LevelData/DATA_11D34D.bin"

DATA_11D39A:
	incbin "LevelData/DATA_11D39A.bin"

DATA_11D3B4:
	incbin "LevelData/DATA_11D3B4.bin"

DATA_11D3EF:
	incbin "LevelData/DATA_11D3EF.bin"

DATA_11D547:
	incbin "LevelData/DATA_11D547.bin"

DATA_11D8B1:
	incbin "LevelData/DATA_11D8B1.bin"

DATA_11DB2E:
	incbin "LevelData/DATA_11DB2E.bin"

DATA_11DC0F:
	incbin "LevelData/DATA_11DC0F.bin"

DATA_11DC87:
	incbin "LevelData/DATA_11DC87.bin"

DATA_11DC9C:
	incbin "LevelData/DATA_11DC9C.bin"

DATA_11DDF6:
	incbin "LevelData/DATA_11DDF6.bin"

DATA_11DE77:
	incbin "LevelData/DATA_11DE77.bin"

DATA_11DEB5:
	incbin "LevelData/DATA_11DEB5.bin"

DATA_11DF32:
	incbin "LevelData/DATA_11DF32.bin"

DATA_11DFA3:
	incbin "LevelData/DATA_11DFA3.bin"

DATA_11DFBA:
	incbin "LevelData/DATA_11DFBA.bin"

DATA_11DFBF:
	incbin "LevelData/DATA_11DFBF.bin"

DATA_11DFC4:
	incbin "LevelData/DATA_11DFC4.bin"

DATA_11DFC9:
	incbin "LevelData/DATA_11DFC9.bin"

DATA_11DFF2:
	incbin "LevelData/DATA_11DFF2.bin"

DATA_11E01E:
	incbin "LevelData/DATA_11E01E.bin"

DATA_11E511:
	incbin "LevelData/DATA_11E511.bin"

DATA_11E6F7:
	incbin "LevelData/DATA_11E6F7.bin"

DATA_11E767:
	incbin "LevelData/DATA_11E767.bin"

DATA_11E802:
	incbin "LevelData/DATA_11E802.bin"

DATA_11E876:
	incbin "LevelData/DATA_11E876.bin"

DATA_11E8B1:
	incbin "LevelData/DATA_11E8B1.bin"

DATA_11EA84:
	incbin "LevelData/DATA_11EA84.bin"

DATA_11ED0B:
	incbin "LevelData/DATA_11ED0B.bin"

DATA_11F048:
	incbin "LevelData/DATA_11F048.bin"

DATA_11F1E1:
	incbin "LevelData/DATA_11F1E1.bin"

DATA_11F288:
	incbin "LevelData/DATA_11F288.bin"

DATA_11F2F9:
	incbin "LevelData/DATA_11F2F9.bin"

DATA_11F373:
	incbin "LevelData/DATA_11F373.bin"

DATA_11F3DE:
	incbin "LevelData/DATA_11F3DE.bin"

DATA_11F774:
	incbin "LevelData/DATA_11F774.bin"

DATA_11F92E:
	incbin "LevelData/DATA_11F92E.bin"

DATA_11FAA9:
	incbin "LevelData/DATA_11FAA9.bin"

DATA_11FB9F:
	incbin "LevelData/DATA_11FB9F.bin"

DATA_11FC22:
	incbin "LevelData/DATA_11FC22.bin"

DATA_11FC93:
	incbin "LevelData/DATA_11FC93.bin"

DATA_11FD6A:
	incbin "LevelData/DATA_11FD6A.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($11FD92, incbin, DATA_11FD92_YI_U2.bin)
else
	%FREE_BYTES($11FD87, 633, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank12Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_128000:
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_128891-$01
	dw CODE_1288AE-$01
	dw CODE_1288AE-$01
	dw CODE_1288C4-$01
	dw CODE_1288D5-$01
	dw CODE_1288D5-$01
	dw CODE_1288F0-$01
	dw CODE_1288FC-$01
	dw CODE_12890E-$01
	dw CODE_128924-$01
	dw CODE_128924-$01
	dw CODE_128947-$01
	dw CODE_128947-$01
	dw CODE_128967-$01
	dw CODE_128973-$01
	dw CODE_12897F-$01
	dw CODE_128990-$01
	dw CODE_1289A0-$01
	dw CODE_1289B9-$01
	dw CODE_1289C0-$01
	dw CODE_1289C7-$01
	dw CODE_1289DD-$01
	dw CODE_1289EF-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A00-$01
	dw CODE_128A14-$01
	dw CODE_128A3C-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A4E-$01
	dw CODE_128A62-$01
	dw CODE_128A6E-$01
	dw CODE_128A96-$01
	dw CODE_128AC1-$01
	dw CODE_128AE9-$01
	dw CODE_128AF5-$01
	dw CODE_128B01-$01
	dw CODE_128B0D-$01
	dw CODE_128B1E-$01
	dw CODE_128B32-$01
	dw CODE_128B3E-$01
	dw CODE_128B57-$01
	dw CODE_128B63-$01
	dw CODE_128B8B-$01
	dw CODE_128BB3-$01
	dw CODE_128BB3-$01
	dw CODE_128BCC-$01
	dw CODE_128BCC-$01
	dw CODE_128BE8-$01
	dw CODE_128BE8-$01
	dw CODE_128BE8-$01
	dw CODE_128C04-$01
	dw CODE_128C04-$01
	dw CODE_128C04-$01
	dw CODE_128C21-$01
	dw CODE_128C2D-$01
	dw CODE_128C39-$01
	dw CODE_128C45-$01
	dw CODE_128C4B-$01
	dw CODE_128C57-$01
	dw CODE_128C5D-$01
	dw CODE_128C69-$01
	dw CODE_128C75-$01
	dw CODE_128C8F-$01
	dw CODE_128C9B-$01
	dw CODE_128C9B-$01
	dw CODE_128CA7-$01
	dw CODE_128CB3-$01
	dw CODE_128CBF-$01
	dw CODE_128CDC-$01
	dw CODE_128CDC-$01
	dw CODE_128CDC-$01
	dw CODE_128CDC-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D2A-$01
	dw CODE_128D4C-$01
	dw CODE_128D4C-$01
	dw CODE_128D5E-$01
	dw CODE_128D6A-$01
	dw CODE_128D79-$01
	dw CODE_128DC2-$01
	dw CODE_128DC2-$01
	dw CODE_128DC2-$01
	dw CODE_128DC2-$01
	dw CODE_128DC2-$01
	dw CODE_128DFA-$01
	dw CODE_128E1F-$01
	dw CODE_128E1F-$01
	dw CODE_128E1F-$01
	dw CODE_128E1F-$01
	dw CODE_128E4A-$01
	dw CODE_128E56-$01
	dw CODE_128E56-$01
	dw CODE_128E56-$01
	dw CODE_128E56-$01
	dw CODE_128E6B-$01
	dw CODE_128E6B-$01
	dw CODE_128E6B-$01
	dw CODE_128E6B-$01
	dw CODE_128E86-$01
	dw CODE_128E86-$01
	dw CODE_128E86-$01
	dw CODE_128E86-$01
	dw CODE_128EA1-$01
	dw CODE_128EA1-$01
	dw CODE_128EA1-$01
	dw CODE_128EA1-$01
	dw CODE_128EB7-$01
	dw CODE_128EB7-$01
	dw CODE_128EE3-$01
	dw CODE_128EE3-$01
	dw CODE_128EE3-$01
	dw CODE_128EE3-$01
	dw CODE_128F19-$01
	dw CODE_128F3A-$01
	dw CODE_128F3A-$01
	dw CODE_128F78-$01
	dw CODE_128B3E-$01
	dw CODE_128F8C-$01
	dw CODE_128F8C-$01
	dw CODE_128F8C-$01
	dw CODE_128F8C-$01
	dw CODE_128FB9-$01
	dw CODE_128FB9-$01
	dw CODE_128FB9-$01
	dw CODE_128FB9-$01
	dw CODE_128FB9-$01
	dw CODE_128FB9-$01
	dw CODE_128FE4-$01
	dw CODE_128FF0-$01
	dw CODE_128FF0-$01
	dw CODE_129011-$01
	dw CODE_129011-$01
	dw CODE_12903E-$01
	dw CODE_12903E-$01
	dw CODE_129067-$01
	dw CODE_129067-$01
	dw CODE_129067-$01
	dw CODE_129067-$01
	dw CODE_129067-$01
	dw CODE_129067-$01
	dw CODE_12908E-$01
	dw CODE_12909F-$01
	dw CODE_1290B1-$01
	dw CODE_1290B1-$01
	dw CODE_1290CD-$01
	dw CODE_1290ED-$01
	dw CODE_1290ED-$01
	dw CODE_1290ED-$01
	dw CODE_1290ED-$01
	dw CODE_1290ED-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_12910B-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_129137-$01
	dw CODE_12915B-$01
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw $0000
	dw CODE_12916C-$01
	dw CODE_129179-$01
	dw CODE_12917A-$01
	dw CODE_129186-$01

DATA_1281FE:
	dw CODE_129191-$01
	dw CODE_1291D4-$01
	dw CODE_129217-$01
	dw CODE_129217-$01
	dw CODE_1292BC-$01
	dw CODE_1292BC-$01
	dw CODE_1292DD-$01
	dw CODE_1292DD-$01
	dw CODE_1292DD-$01
	dw CODE_1292DD-$01
	dw CODE_129217-$01
	dw CODE_129217-$01
	dw CODE_129354-$01
	dw CODE_12935E-$01
	dw CODE_129354-$01
	dw CODE_129354-$01
	dw CODE_129368-$01
	dw CODE_12937C-$01
	dw CODE_12937C-$01
	dw CODE_12939E-$01
	dw CODE_1293A8-$01
	dw CODE_1293B2-$01
	dw CODE_1293C1-$01
	dw CODE_1293CB-$01
	dw CODE_1293EE-$01
	dw CODE_1293EE-$01
	dw CODE_129407-$01
	dw CODE_129407-$01
	dw CODE_129420-$01
	dw CODE_12942F-$01
	dw CODE_12942F-$01
	dw CODE_129448-$01
	dw CODE_129448-$01
	dw CODE_1294EA-$01
	dw CODE_1294F6-$01
	dw CODE_129502-$01
	dw CODE_12950E-$01
	dw CODE_12951C-$01
	dw CODE_12951C-$01
	dw CODE_129532-$01
	dw CODE_129532-$01
	dw CODE_12954F-$01
	dw CODE_12954F-$01
	dw CODE_129569-$01
	dw CODE_129573-$01
	dw CODE_129583-$01
	dw CODE_129583-$01
	dw CODE_12959C-$01
	dw CODE_1295AA-$01
	dw CODE_1295AA-$01
	dw CODE_1295CF-$01
	dw CODE_1295CF-$01
	dw CODE_1295E0-$01
	dw CODE_1295EE-$01
	dw CODE_1295FA-$01
	dw CODE_129609-$01
	dw CODE_129613-$01
	dw CODE_129626-$01
	dw CODE_129640-$01
	dw CODE_12964A-$01
	dw CODE_129667-$01
	dw CODE_12967D-$01
	dw CODE_12968C-$01
	dw CODE_129696-$01
	dw CODE_129696-$01
	dw CODE_1296A0-$01
	dw CODE_1296AE-$01
	dw CODE_1296AE-$01
	dw CODE_1296BF-$01
	dw CODE_1296CB-$01
	dw CODE_1296CB-$01
	dw CODE_129716-$01
	dw CODE_129720-$01
	dw CODE_129743-$01
	dw CODE_129743-$01
	dw CODE_129768-$01
	dw CODE_129768-$01
	dw CODE_129768-$01
	dw CODE_12979D-$01
	dw CODE_1297BD-$01
	dw CODE_1297DD-$01
	dw CODE_1297DD-$01
	dw CODE_1297FD-$01
	dw CODE_129820-$01
	dw CODE_12982A-$01
	dw CODE_12982A-$01
	dw CODE_12982A-$01
	dw CODE_12985A-$01
	dw CODE_12987A-$01
	dw CODE_12989C-$01
	dw CODE_12989C-$01
	dw CODE_12989C-$01
	dw CODE_1298F5-$01
	dw CODE_1298F5-$01
	dw CODE_1298F5-$01
	dw CODE_12993E-$01
	dw CODE_12993E-$01
	dw CODE_12998F-$01
	dw CODE_12998F-$01
	dw CODE_129A0D-$01
	dw CODE_129A0D-$01
	dw CODE_129A0D-$01
	dw CODE_129A2D-$01
	dw CODE_129A4D-$01
	dw CODE_129A68-$01
	dw CODE_129A75-$01
	dw CODE_129A99-$01
	dw CODE_129AA3-$01
	dw CODE_129AC6-$01
	dw CODE_129AD0-$01
	dw CODE_129ADA-$01
	dw CODE_129AE4-$01
	dw CODE_129AEE-$01
	dw CODE_129B06-$01
	dw CODE_129B1E-$01
	dw CODE_129B36-$01
	dw CODE_129B4E-$01
	dw CODE_129B5D-$01
	dw CODE_129B6C-$01
	dw CODE_129B7B-$01
	dw CODE_129B85-$01
	dw CODE_129BAD-$01
	dw CODE_129BD5-$01
	dw CODE_129BDF-$01
	dw CODE_129BEE-$01
	dw CODE_129C02-$01
	dw CODE_12985A-$01
	dw CODE_129C11-$01
	dw CODE_129C33-$01
	dw CODE_129C47-$01
	dw CODE_129C74-$01
	dw CODE_129C74-$01
	dw CODE_129C7E-$01
	dw CODE_129C8D-$01
	dw CODE_129C97-$01
	dw CODE_129CB3-$01
	dw CODE_129CB3-$01
	dw CODE_129CD8-$01
	dw CODE_129A68-$01
	dw CODE_129ADA-$01
	dw CODE_129CE2-$01
	dw CODE_129CF1-$01
	dw CODE_129CFB-$01
	dw CODE_129D12-$01
	dw CODE_129D35-$01
	dw CODE_129D5C-$01
	dw CODE_129D5C-$01
	dw CODE_129D85-$01
	dw CODE_129DA8-$01
	dw CODE_129DA8-$01
	dw CODE_129DA8-$01
	dw CODE_129DA8-$01
	dw CODE_129DC2-$01
	dw CODE_129DCC-$01
	dw CODE_129DEF-$01
	dw CODE_129E26-$01
	dw CODE_129E26-$01
	dw CODE_129E46-$01
	dw CODE_129E50-$01
	dw CODE_129E5A-$01
	dw CODE_129E71-$01
	dw CODE_129E71-$01
	dw CODE_129E71-$01
	dw CODE_129E8B-$01
	dw CODE_129E8B-$01
	dw CODE_129EB0-$01
	dw CODE_129EB0-$01
	dw CODE_129EDE-$01
	dw CODE_129EDE-$01
	dw CODE_129F13-$01
	dw CODE_129F35-$01
	dw CODE_129F35-$01
	dw CODE_129F4F-$01
	dw CODE_129F4F-$01
	dw CODE_129F71-$01
	dw CODE_129F71-$01
	dw CODE_129F8F-$01
	dw CODE_129F99-$01
	dw CODE_129FA7-$01
	dw CODE_129FA7-$01
	dw CODE_129FC6-$01
	dw CODE_129FC6-$01
	dw CODE_129FE5-$01
	dw CODE_129FE5-$01
	dw CODE_12A004-$01
	dw CODE_12A004-$01
	dw CODE_12A027-$01
	dw CODE_12A027-$01
	dw CODE_12A027-$01
	dw CODE_12A027-$01
	dw CODE_12A03E-$01
	dw CODE_12A03E-$01
	dw CODE_12A057-$01
	dw CODE_12A057-$01
	dw CODE_12A057-$01
	dw CODE_12A057-$01
	dw CODE_12A07F-$01
	dw CODE_12A07F-$01
	dw CODE_12A07F-$01
	dw CODE_12A07F-$01
	dw CODE_12A07F-$01
	dw CODE_12A07F-$01
	dw CODE_12A0BD-$01
	dw CODE_12A0C7-$01
	dw CODE_12A0D7-$01
	dw CODE_12A0D7-$01
	dw CODE_12A0EF-$01
	dw CODE_12A109-$01
	dw CODE_12A123-$01
	dw CODE_12A13D-$01
	dw CODE_12A147-$01
	dw CODE_12A151-$01
	dw CODE_12A163-$01
	dw CODE_12A163-$01
	dw CODE_12A163-$01
	dw CODE_12A163-$01
	dw CODE_12A17A-$01
	dw CODE_12A17A-$01
	dw CODE_12A195-$01
	dw CODE_12A19F-$01
	dw CODE_12A1A9-$01
	dw CODE_12A1B3-$01
	dw CODE_12A1C6-$01
	dw CODE_12A1D2-$01
	dw CODE_12A1DE-$01
	dw CODE_12A1E8-$01
	dw CODE_12A205-$01
	dw CODE_12A214-$01
	dw CODE_12A21E-$01
	dw CODE_12A247-$01
	dw CODE_12A259-$01
	dw CODE_12A26B-$01
	dw CODE_12A293-$01
	dw CODE_12A2A5-$01
	dw CODE_12A2B7-$01
	dw CODE_12A2DF-$01
	dw CODE_12A2DF-$01
	dw CODE_12A30A-$01
	dw CODE_12A328-$01
	dw CODE_12A328-$01
	dw CODE_12A350-$01
	dw CODE_12A350-$01
	dw CODE_12A350-$01
	dw CODE_12A350-$01
	dw CODE_129667-$01
	dw CODE_12A3C7-$01
	dw CODE_12A3D1-$01

UNK_1283EC:
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$00,$00,$00,$00

DATA_1284EC:
	db $FF,$02,$01,$01,$02,$02,$02,$02,$02,$02,$01,$01,$01,$00,$01,$01
	db $C2,$C2,$C2,$00,$02,$00,$02,$02,$02,$02,$00,$01,$01,$00,$00,$02
	db $02,$02,$01,$01,$02,$01,$01,$82,$02,$C2,$C2,$01,$01,$01,$01,$01
	db $01,$01,$02,$02,$00,$02,$01,$00,$02,$02,$02,$02,$41,$00,$01,$01
	db $01,$00,$01,$01,$02,$02,$02,$02,$02,$01,$01,$01,$01,$01,$02,$02
	db $01,$00,$C2,$00,$C2,$C2,$C2,$00,$02,$02,$02,$02,$02,$02,$02,$02
	db $02,$02,$02,$00,$00,$00,$02,$02,$02,$02,$00,$02,$02,$01,$02,$01
	db $00,$00,$00,$01,$01,$01,$01,$01,$C2,$C0,$02,$C2,$C0,$00,$00,$02
	db $C0,$C0,$02,$00,$80,$02,$02,$02,$02,$02,$02,$02,$00,$01,$00,$82
	db $82,$01,$01,$01,$02,$02,$02,$02,$02,$01,$01,$01,$01,$02,$00,$00
	db $02,$02,$02,$02,$02,$01,$00,$02,$02,$01,$01,$01,$00,$00,$01,$00
	db $02,$00,$80,$80,$80,$80,$00,$00,$00,$00,$00,$00,$01,$01,$01,$01
	db $00,$00,$80,$80,$00,$01,$80,$00,$01,$80,$02,$02,$C2,$42,$80,$80
	db $80,$01,$00,$02,$01,$01,$00,$00,$00,$00,$02,$02,$02,$02,$01,$00
	db $01,$02,$01,$02,$02,$C2,$C2,$C2,$02,$02,$02,$02,$02,$C2,$02,$02
	db $02,$02,$02,$02,$41,$02,$02,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF

CODE_1285EC:
	STZ.b $28
	STZ.b $2C
	STZ.b $9B
CODE_1285F2:
	SEP.b #$30
	STZ.b $14
	JSR.w CODE_1286FD
	REP.b #$20
CODE_1285FB:
	SEP.b #$10
	PHK
	PEA.w CODE_12862F-$01
	LDA.b $2C
	CMP.b $19
	BCC.b CODE_128612
	LDX.b $27
	PHX
	PHX
	PLB
	LDA.b $25
	PHA
	SEP.b #$20
	RTL

CODE_128612:
	LDA.b $28
	AND.w #$0001
	BNE.b CODE_128624
	LDX.b $24
	PHX
	PHX
	PLB
	LDA.b $22
	PHA
	SEP.b #$20
	RTL

CODE_128624:
	LDX.b $21
	PHX
	PHX
	PLB
	LDA.b $1F
	PHA
	SEP.b #$20
	RTL

CODE_12862F:
	PHK
	PLB
	REP.b #$30
	LDY.w #$0000
	LDA.b $2E
	BPL.b CODE_128640
	DEC.b $2C
	INY
	INY
	BRA.b CODE_128642

CODE_128640:
	INC.b $2C
CODE_128642:
	LDA.b $2C
	CMP.b $2E
	BEQ.b CODE_128680
	LDA.b $1D
	CLC
	ADC.w DATA_1286C9,y
	TAX
	BIT.w #$FE00
	BEQ.b CODE_12865C
	AND.w #$01E0
	CMP.w DATA_1286CD,y
	BNE.b CODE_128675
CODE_12865C:
	TXA
	AND.w #$01FF
	STA.b $00
	SEP.b #$20
	LDA.b $14
	CLC
	ADC.w DATA_1286D1,y
	STA.b $14
	CLC
	ADC.b $1C
	TAX
	SEP.b #$10
	JSR.w CODE_128824
CODE_128675:
	STX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.b $12
	JMP.w CODE_1285FB

CODE_128680:
	LDA.b $1B
	AND.w #$F0F0
	STA.b $00
	STZ.b $2C
	LDA.b $2A
	BPL.b CODE_128697
	DEC.b $28
	LDA.b $1B
	AND.w #$0F0F
	DEC
	BRA.b CODE_1286A2

CODE_128697:
	INC.b $28
	LDA.b $1B
	AND.w #$0F0F
	ORA.w #$00F0
	INC
CODE_1286A2:
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	LDA.b $28
	CMP.b $2A
	BEQ.b CODE_1286C6
	LDA.b $9B
	BEQ.b CODE_1286C3
	JSR.w CODE_1286D5
	LDA.b $9B
	BMI.b CODE_1286C3
	LDA.b $2E
	CLC
	ADC.b $17
	STA.b $2E
	BEQ.b CODE_1286C6
CODE_1286C3:
	JMP.w CODE_1285F2

CODE_1286C6:
	SEP.b #$30
	RTS

DATA_1286C9:
	dw $0020,$FFE0

DATA_1286CD:
	dw $0000,$01E0

DATA_1286D1:
	dw $0010,$00F0

CODE_1286D5:
	LDA.b $17
	AND.w #$0F00
	STA.b $02
	LDA.b $17
	ASL
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	ORA.b $02
	SEC
	SBC.b $00
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	RTS

CODE_1286FD:
	REP.b #$20
	LDA.b $1B
	AND.w #$00FF
	ASL
	STA.b $00
	SEP.b #$20
	LDX.b $1C
	JSR.w CODE_128824
	STX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	STA.b $12
	SEP.b #$30
	RTS

CODE_128719:
	LDA.b $2C
	AND.w #$000F
	ASL
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $2B
	AND.w #$F000
	TSB.b $00
	LDA.b $0E
	ORA.w #$0F00
	ADC.b $00
	AND.w #$70F0
	SEC
	SBC.w #$0010
	AND.w #$70F0
	STA.b $00
	LDA.b $0E
	AND.w #$0F0F
	ORA.b $00
	TAX
	AND.w #$00FF
	ASL
	STA.b $00
	TXA
	XBA
	AND.w #$00FF
	TAX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	ADC.b $00
	TAX
	RTL

CODE_12875D:
	LDA.b $2C
	AND.w #$000F
	ASL
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $2B
	AND.w #$F000
	TSB.b $00
	LDA.b $0E
	ORA.w #$0F00
	CLC
	ADC.w #$0010
	ORA.w #$0F00
	ADC.b $00
	AND.w #$70F0
	STA.b $00
	LDA.b $0E
	AND.w #$0F0F
	ORA.b $00
	TAX
	AND.w #$00FF
	ASL
	STA.b $00
	TXA
	XBA
	AND.w #$00FF
	TAX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	ADC.b $00
	TAX
	RTL

CODE_1287A1:
	LDA.b $2C
	AND.w #$000F
	ASL
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $2B
	AND.w #$F000
	TSB.b $00
	LDA.b $0E
	ORA.w #$0F00
	ADC.b $00
	AND.w #$70F0
	STA.b $00
	LDA.b $0E
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	TAX
	AND.w #$00FF
	ASL
	STA.b $00
	TXA
	XBA
	AND.w #$00FF
	TAX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	ADC.b $00
	TAX
	RTL

CODE_1287E2:
	LDA.b $2C
	AND.w #$000F
	ASL
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $2B
	AND.w #$F000
	TSB.b $00
	LDA.b $0E
	ORA.w #$0F00
	CLC
	ADC.b $00
	AND.w #$70F0
	STA.b $00
	LDA.b $0E
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $00
	TAX
	AND.w #$00FF
	ASL
	STA.b $00
	TXA
	XBA
	AND.w #$00FF
	TAX
	LDA.w $6CA9,x
	AND.w #$3F00
	ASL
	ADC.b $00
	TAX
	RTL

CODE_128824:
	CPX.b #$80
	BCS.b CODE_12883A
	LDA.w $6CAA,x
	AND.b #$3F
	BNE.b CODE_12886A
	INC.w $0D4D
	LDA.w $0D4D
	AND.b #$3F
	TAY
	BNE.b CODE_128850
CODE_12883A:
	REP.b #$30
	JSL.l CODE_109A85
	SEP.b #$10
	LDA.w #$01F1
	TCS
	SEP.b #$20
	LDA.b #CODE_108B5D>>16
	PHA
	PLB
	JML.l CODE_108B5D

CODE_128850:
	LDA.w $0D4E,y
	BEQ.b CODE_128861
	INY
	TYA
	AND.b #$3F
	TAY
	CMP.w $0D4D
	BEQ.b CODE_128874
	BRA.b CODE_128850

CODE_128861:
	TYA
	INC.b $97
	STA.w $6CAA,x
	STA.w $0D4E,y
CODE_12886A:
	REP.b #$30
	AND.w #$00FF
	XBA
	ASL
	ADC.b $00
	TAX
CODE_128874:
	RTS

CODE_128875:
	PHP
	SEP.b #$20
	LDA.l !REGISTER_SoftwareLatchForHVCounter
	LSR
	LDA.l !REGISTER_HCounter
	ADC.l !REGISTER_VCounter
	PLP
	RTL

DATA_128887:
	db $02,$02,$02,$02,$01,$01,$01,$01,$03,$02

CODE_128891:
	REP.b #$20
	LDY.b $15
	LDA.w DATA_128887,y
	AND.w #$00FF
	STA.b $2A
	LDA.w #$0003
	STA.b $2E
	TYA
	ASL
	STA.b $15
	LDX.b #(CODE_12A48A-$01)>>16
	LDA.w #CODE_12A48A-$01
	JMP.w CODE_12A3DB

CODE_1288AE:
	REP.b #$20
	INC.b $2A
	INC.b $2E
	LDA.b $15
	AND.w #$0001
	ASL
	STA.b $15
	LDX.b #(CODE_12A4C9-$01)>>16
	LDA.w #CODE_12A4C9-$01
	JMP.w CODE_12A3DB

CODE_1288C4:
	REP.b #$20
	INC.b $2A
	LDA.w #$0004
	STA.b $2E
	LDX.b #(CODE_12A4EC-$01)>>16
	LDA.w #CODE_12A4EC-$01
	JMP.w CODE_12A3DB

CODE_1288D5:
	REP.b #$20
	LDA.b $15
	AND.w #$0002
	STA.b $15
	LDA.w #$0008
	STA.b $2A
	LDA.w #$0010
	STA.b $2E
	LDX.b #(CODE_12A60F-$01)>>16
	LDA.w #CODE_12A60F-$01
	JMP.w CODE_12A3DB

CODE_1288F0:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12A64B
	SEP.b #$30
	RTL

CODE_1288FC:
	REP.b #$20
	LDA.w #$0010
	STA.b $2A
	ASL
	STA.b $2E
	LDX.b #(CODE_12A665-$01)>>16
	LDA.w #CODE_12A665-$01
	JMP.w CODE_12A3DB

CODE_12890E:
	REP.b #$20
	LDA.w #$0001
	STA.b $2E
	INC
	STA.b $2A
	LDX.b #(CODE_12A68B-$01)>>16
	LDA.w #CODE_12A68B-$01
	JMP.w CODE_12A3DB

DATA_128920:
	dw CODE_12A6A6-$01,CODE_12A6C2-$01

CODE_128924:
	REP.b #$20
	LDA.w #$0001
	STA.b $2E
	LDA.w #$0005
	STA.b $2A
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_128920,y
	LDX.b #(CODE_12A6A6-$01)>>16
	JMP.w CODE_12A3DB

DATA_12893F:
	dw CODE_12A6E8-$01,CODE_12A718-$01

DATA_128943:
	dw $0001,$FFFF

CODE_128947:
	REP.b #$20
	LDA.w #$0002
	STA.b $2E
	LDA.w #$0005
	STA.b $2A
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_128943,y
	STA.b $17
	LDA.w DATA_12893F,y
	LDX.b #(CODE_12A6E8-$01)>>16
	JMP.w CODE_12A3DD

CODE_128967:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12A734
	SEP.b #$30
	RTL

CODE_128973:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12A749
	SEP.b #$30
	RTL

CODE_12897F:
	REP.b #$20
	LDA.w #$0010
	STA.b $2E
	STA.b $2A
	LDX.b #(CODE_12A859-$01)>>16
	LDA.w #CODE_12A859-$01
	JMP.w CODE_12A3DB

CODE_128990:
	REP.b #$20
	LDA.w #$0018
	STA.b $2A
	LDA.w #$0003
	STA.b $2E
	STZ.b $15
	BRA.b CODE_1289B1

CODE_1289A0:
	REP.b #$20
	LDA.w #$0020
	STA.b $2A
	LDA.w #$000C
	STA.b $2E
	LDA.w #$0001
	STA.b $15
CODE_1289B1:
	LDX.b #(CODE_12AA77-$01)>>16
	LDA.w #CODE_12AA77-$01
	JMP.w CODE_12A3DB

CODE_1289B9:
	REP.b #$20
	LDA.w #$0000
	BRA.b CODE_1289CC

CODE_1289C0:
	REP.b #$20
	LDA.w #$0002
	BRA.b CODE_1289CC

CODE_1289C7:
	REP.b #$20
	LDA.w #$0004
CODE_1289CC:
	STA.b $15
	LDA.w #$0002
	STA.b $2E
	STA.b $2A
	LDX.b #(CODE_12AAE5-$01)>>16
	LDA.w #CODE_12AAE5-$01
	JMP.w CODE_12A3DB

CODE_1289DD:
	REP.b #$20
	LDA.w #$0008
	STA.b $2A
	LSR
	STA.b $2E
	LDX.b #(CODE_12AB02-$01)>>16
	LDA.w #CODE_12AB02-$01
	JMP.w CODE_12A3DB

CODE_1289EF:
	REP.b #$20
	LDA.w #$0004
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12AB39-$01)>>16
	LDA.w #CODE_12AB39-$01
	JMP.w CODE_12A3DB

CODE_128A00:
	JSR.w CODE_1286FD
	REP.b #$30
	LDA.b $15
	SEC
	SBC.w #$0008
	STA.b $15
	JSL.l CODE_12AB55
	SEP.b #$30
	RTL

CODE_128A14:
	REP.b #$20
	LDA.b $1B
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0004
	STA.b $2A
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_12AB64-$01)>>16
	LDA.w #CODE_12AB64-$01
	JMP.w CODE_12A3DB

CODE_128A3C:
	REP.b #$20
	LDA.w #$0006
	STA.b $2A
	INC
	STA.b $2E
	LDX.b #(CODE_12AB9D-$01)>>16
	LDA.w #CODE_12AB9D-$01
	JMP.w CODE_12A3DB

CODE_128A4E:
	JSR.w CODE_1286FD
	REP.b #$30
	LDA.b $15
	SEC
	SBC.w #$0032
	STA.b $15
	JSL.l CODE_12ABE1
	SEP.b #$30
	RTL

CODE_128A62:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12ABFF
	SEP.b #$30
	RTL

CODE_128A6E:
	REP.b #$20
	LDA.b $1B
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0030
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0004
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12AC17-$01)>>16
	LDA.w #CODE_12AC17-$01
	JMP.w CODE_12A3DB

CODE_128A96:
	REP.b #$20
	LDA.b $1B
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$1030
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0004
	STA.b $2A
	LDA.w #$0014
	STA.b $2E
	LDX.b #(CODE_12AC59-$01)>>16
	LDA.w #CODE_12AC59-$01
	JMP.w CODE_12A3DB

CODE_128AC1:
	REP.b #$20
	LDA.b $1B
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0003
	STA.b $2A
	LDA.w #$0001
	STA.b $2E
	LDX.b #(CODE_12ACBB-$01)>>16
	LDA.w #CODE_12ACBB-$01
	JMP.w CODE_12A3DB

CODE_128AE9:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12ACD3
	SEP.b #$30
	RTL

CODE_128AF5:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12AD00
	SEP.b #$30
	RTL

CODE_128B01:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12AD2D
	SEP.b #$30
	RTL

CODE_128B0D:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12AD3F-$01)>>16
	LDA.w #CODE_12AD3F-$01
	JMP.w CODE_12A3DB

CODE_128B1E:
	REP.b #$20
	LDA.w #$0001
	STA.b $2A
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_12AD5D-$01)>>16
	LDA.w #CODE_12AD5D-$01
	JMP.w CODE_12A3DB

CODE_128B32:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12AD6F
	SEP.b #$30
	RTL

CODE_128B3E:
	REP.b #$20
	LDA.b $15
	AND.w #$0008
	ASL
	STA.b $15
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12ADA9-$01)>>16
	LDA.w #CODE_12ADA9-$01
	JMP.w CODE_12A3DB

CODE_128B57:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12AE22
	SEP.b #$30
	RTL

CODE_128B63:
	REP.b #$20
	LDA.b $1B
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0005
	STA.b $2A
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_12AE3C-$01)>>16
	LDA.w #CODE_12AE3C-$01
	JMP.w CODE_12A3DB

CODE_128B8B:
	REP.b #$20
	LDA.b $1B
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0005
	STA.b $2A
	LDA.w #$0003
	STA.b $2E
	LDX.b #(CODE_12AE88-$01)>>16
	LDA.w #CODE_12AE88-$01
	JMP.w CODE_12A3DB

CODE_128BB3:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	STA.b $15
	LDA.w #$0003
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12AEF6-$01)>>16
	LDA.w #CODE_12AEF6-$01
	JMP.w CODE_12A3DB

CODE_128BCC:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	STA.b $15
	LDA.w #$0005
	STA.b $2A
	LDA.w #$0003
	STA.b $2E
	LDX.b #(CODE_12AF48-$01)>>16
	LDA.w #CODE_12AF48-$01
	JMP.w CODE_12A3DB

CODE_128BE8:
	REP.b #$20
	LDA.b $15
	AND.w #$0003
	ASL
	STA.b $15
	LDA.w #$0003
	STA.b $2A
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_12AF84-$01)>>16
	LDA.w #CODE_12AF84-$01
	JMP.w CODE_12A3DB

CODE_128C04:
	REP.b #$20
	LDA.b $15
	INC
	AND.w #$0003
	ASL
	STA.b $15
	LDA.w #$0003
	STA.b $2A
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_12AFBF-$01)>>16
	LDA.w #CODE_12AFBF-$01
	JMP.w CODE_12A3DB

CODE_128C21:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12B001
	SEP.b #$30
	RTL

CODE_128C2D:
	REP.b #$10
	LDA.b #$00
	LDX.w #$0004
	LDY.w #$0002
	BRA.b CODE_128C7D

CODE_128C39:
	REP.b #$10
	LDA.b #$02
	LDX.w #$0005
	LDY.w #$0003
	BRA.b CODE_128C7D

CODE_128C45:
	REP.b #$10
	LDA.b #$04
	BRA.b CODE_128C4F

CODE_128C4B:
	REP.b #$10
	LDA.b #$06
CODE_128C4F:
	LDX.w #$0003
	LDY.w #$0002
	BRA.b CODE_128C7D

CODE_128C57:
	REP.b #$10
	LDA.b #$08
	BRA.b CODE_128C61

CODE_128C5D:
	REP.b #$10
	LDA.b #$0A
CODE_128C61:
	LDX.w #$0005
	LDY.w #$0004
	BRA.b CODE_128C7D

CODE_128C69:
	REP.b #$10
	LDA.b #$0C
	LDX.w #$0004
	LDY.w #$0003
	BRA.b CODE_128C7D

CODE_128C75:
	REP.b #$10
	LDA.b #$0E
	LDX.w #$0002
	TXY
CODE_128C7D:
	STA.b $15
	REP.b #$20
	STX.b $2A
	STY.b $2E
	SEP.b #$10
	LDX.b #(CODE_12B101-$01)>>16
	LDA.w #CODE_12B101-$01
	JMP.w CODE_12A3DB

CODE_128C8F:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12B14A
	SEP.b #$30
	RTL

CODE_128C9B:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12B179
	SEP.b #$30
	RTL

CODE_128CA7:
	REP.b #$10
	STZ.b $15
	LDX.w #$0003
	LDY.w #$0002
	BRA.b CODE_128CCC

CODE_128CB3:
	REP.b #$10
	LDX.w #$0002
	STX.b $15
	LDX.w #$0004
	BRA.b CODE_128CC9

CODE_128CBF:
	REP.b #$10
	LDX.w #$0004
	STX.b $15
	LDX.w #$0005
CODE_128CC9:
	LDY.w #$0003
CODE_128CCC:
	STX.b $2A
	STY.b $2E
	REP.b #$20
	SEP.b #$10
	LDX.b #(CODE_12B194-$01)>>16
	LDA.w #CODE_12B194-$01
	JMP.w CODE_12A3DB

CODE_128CDC:
	REP.b #$20
	LDA.b $15
	DEC
	AND.w #$0003
	ASL
	STA.b $15
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12B21A-$01)>>16
	LDA.w #CODE_12B21A-$01
	JMP.w CODE_12A3DB

DATA_128CF6:
	db $06,$06,$01,$01,$02,$02,$02,$02,$04,$04,$06,$06,$02

DATA_128D03:
	db $01,$01,$06,$06,$04,$04,$06,$06,$02,$02,$02,$02,$01

DATA_128D10:
	dw CODE_12B23C-$01,CODE_12B25A-$01,CODE_12B271-$01,CODE_12B288-$01,CODE_12B2A3-$01,CODE_12B2CB-$01,CODE_12B2F8-$01,CODE_12B326-$01
	dw CODE_12B349-$01,CODE_12B36A-$01,CODE_12B393-$01,CODE_12B3BC-$01,CODE_12B3D1-$01

CODE_128D2A:
	REP.b #$20
	LDA.b $15
	AND.w #$000F
	TAY
	ASL
	TAX
	LDA.w DATA_128CF6-$01,y
	AND.w #$00FF
	STA.b $2A
	LDA.w DATA_128D03-$01,y
	AND.w #$00FF
	STA.b $2E
	LDA.w DATA_128D10-$02,x
	LDX.b #(CODE_12B23C-$01)>>16
	JMP.w CODE_12A3DB

CODE_128D4C:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	STA.b $15
	LDX.b #(CODE_12B3E1-$01)>>16
	LDA.w #CODE_12B3E1-$01
	JMP.w CODE_12A3DB

CODE_128D5E:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12B3F1
	SEP.b #$30
	RTL

CODE_128D6A:
	REP.b #$20
	LDA.w #$0004
	STA.b $2A
	LDX.b #(CODE_12B3FB-$01)>>16
	LDA.w #CODE_12B3FB-$01
	JMP.w CODE_12A3DB

CODE_128D79:
	REP.b #$20
	LDA.b $1B
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$70F0
	SEC
	SBC.w #$0040
	AND.w #$70F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0008
	STA.b $2A
	LDA.w #$0005
	STA.b $2E
	LDX.b #(CODE_12B45C-$01)>>16
	LDA.w #CODE_12B45C-$01
	JMP.w CODE_12A3DB

DATA_128DA4:
	dw $0090,$0050,$0030,$0030,$0030

DATA_128DAE:
	dw $0020,$0013,$000A,$0008,$000D

DATA_128DB8:
	dw $0016,$000B,$0007,$0007,$0008

CODE_128DC2:
	REP.b #$20
	LDA.b $15
	SEC
	SBC.w #$0083
	ASL
	STA.b $15
	TAX
	LDA.b $1B
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$70F0
	SEC
	SBC.w DATA_128DA4,x
	AND.w #$70F0
	ORA.b $00
	STA.b $1B
	LDA.w DATA_128DAE,x
	STA.b $2A
	LDA.w DATA_128DB8,x
	STA.b $2E
	STZ.w $00A1
	LDX.b #(CODE_12B933-$01)>>16
	LDA.w #CODE_12B933-$01
	JMP.w CODE_12A3DB

CODE_128DFA:
	REP.b #$20
	LDA.w #$0004
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12B97B-$01)>>16
	LDA.w #CODE_12B97B-$01
	JMP.w CODE_12A3DB

DATA_128E0B:
	dw $0002,$0002,$0001,$0001

DATA_128E13:
	dw $0001,$0001,$0002,$0002

DATA_128E1B:
	dw CODE_12BAED-$01,CODE_12BB2A-$01

CODE_128E1F:
	REP.b #$20
	LDA.b $15
	AND.w #$0007
	ASL
	TAX
	LDA.w DATA_128E0B-$02,x
	STA.b $2A
	LDA.w DATA_128E13-$02,x
	STA.b $2E
	LDA.b $15
	DEC
	AND.w #$0002
	TAY
	LDA.b $15
	DEC
	AND.w #$0001
	ASL
	STA.b $15
	LDX.b #(CODE_12BAED-$01)>>16
	LDA.w DATA_128E1B,y
	JMP.w CODE_12A3DB

CODE_128E4A:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12BB63
	SEP.b #$30
	RTL

CODE_128E56:
	JSR.w CODE_1286FD
	REP.b #$30
	LDA.b $15
	INC
	INC
	AND.w #$0003
	STA.b $15
	JSL.l CODE_12BC01
	SEP.b #$30
	RTL

CODE_128E6B:
	REP.b #$20
	LDA.b $15
	INC
	INC
	AND.w #$0003
	ASL
	STA.b $15
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12BC2A-$01)>>16
	LDA.w #CODE_12BC2A-$01
	JMP.w CODE_12A3DB

CODE_128E86:
	REP.b #$20
	LDA.b $15
	INC
	INC
	AND.w #$0003
	ASL
	STA.b $15
	LDA.w #$0008
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12BD55-$01)>>16
	LDA.w #CODE_12BD55-$01
	JMP.w CODE_12A3DB

CODE_128EA1:
	JSR.w CODE_1286FD
	REP.b #$30
	LDA.b $15
	DEC
	DEC
	AND.w #$0003
	ASL
	STA.b $15
	JSL.l CODE_12BD8E
	SEP.b #$30
	RTL

CODE_128EB7:
	JSR.w CODE_1286FD
	REP.b #$30
	LDA.b $15
	AND.w #$0001
	ASL
	STA.b $15
	JSL.l CODE_12BDC0
	SEP.b #$30
	RTL

DATA_128ECB:
	dw $FFFF,$0000,$FFFF,$0000

DATA_128ED3:
	dw $FFF0,$FFF0,$0000,$0000

DATA_128EDB:
	dw CODE_12BDEA-$01,CODE_12BE42-$01,CODE_12BE99-$01,CODE_12BEF1-$01

CODE_128EE3:
	REP.b #$20
	LDA.b $15
	AND.w #$0003
	ASL
	TAY
	LDA.b $1B
	AND.w #$0F0F
	CLC
	ADC.w DATA_128ECB,y
	AND.w #$0F0F
	STA.b $00
	LDA.b $1B
	AND.w #$F0F0
	CLC
	ADC.w DATA_128ED3,y
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12BDEA-$01)>>16
	LDA.w DATA_128EDB,y
	JMP.w CODE_12A3DB

CODE_128F19:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12BF4B-$01)>>16
	LDA.w #CODE_12BF4B-$01
	JMP.w CODE_12A3DB

DATA_128F2A:
	dw $0001,$0002

DATA_128F2E:
	dw $0040,$0080

DATA_128F32:
	dw $0003,$0005

DATA_128F36:
	dw $0005,$0009

CODE_128F3A:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	STA.b $15
	ASL
	TAX
	LDA.w $001B
	AND.w #$0F0F
	SEC
	SBC.w DATA_128F2A,x
	AND.w #$0F0F
	STA.b $00
	LDA.w $001B
	AND.w #$F0F0
	SEC
	SBC.w DATA_128F2E,x
	AND.w #$F0F0
	ORA.b $00
	STA.w $001B
	LDA.w DATA_128F32,x
	STA.b $2A
	LDA.w DATA_128F36,x
	STA.b $2E
	LDX.b #(CODE_12BFF4-$01)>>16
	LDA.w #CODE_12BFF4-$01
	JMP.w CODE_12A3DB

CODE_128F78:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12C063
	SEP.b #$30
	RTL

DATA_128F84:
	dw $0005,$0004,$0003,$0003

CODE_128F8C:
	REP.b #$20
	LDA.b $15
	AND.w #$0007
	DEC
	ASL
	STA.b $15
	TAY
	LDA.w DATA_128F84,y
	STA.b $2E
	LDX.b #(CODE_12C044-$01)>>16
	LDA.w #CODE_12C044-$01
	JMP.w CODE_12A3DB

DATA_128FA5:
	dw $0000,$000E,$001C,$002A

DATA_128FAD:
	dw $0003,$0003,$0002,$0002,$0002,$0002

CODE_128FB9:
	REP.b #$20
	JSL.l CODE_128875
	AND.w #$0006
	TAY
	LDA.w DATA_128FA5,y
	STA.b $A1
	LDA.w #$0002
	STA.b $2A
	LDA.b $15
	SEC
	SBC.w #$00AD
	ASL
	STA.b $15
	TAY
	LDA.w DATA_128FAD,y
	STA.b $2E
	LDX.b #(CODE_12C0B1-$01)>>16
	LDA.w #CODE_12C0B1-$01
	JMP.w CODE_12A3DB

CODE_128FE4:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12C0CF
	SEP.b #$30
	RTL

CODE_128FF0:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	JSL.l CODE_128875
	AND.w #$0004
	STA.b $A1
	LDA.b $15
	AND.w #$0001
	STA.b $15
	LDX.b #(CODE_12C108-$01)>>16
	LDA.w #CODE_12C108-$01
	JMP.w CODE_12A3DB

CODE_129011:
	REP.b #$20
	LDA.w #$0003
	STA.b $2A
	STA.b $2E
	JSL.l CODE_128875
	AND.w #$0001
	STA.b $00
	LDA.b $15
	AND.w #$0001
	ASL
	ADC.b $00
	ASL
	STA.b $15
	LDX.b #(CODE_12C191-$01)>>16
	LDA.w #CODE_12C191-$01
	JMP.w CODE_12A3DB

DATA_129036:
	dw $0004,$0005

DATA_12903A:
	dw $0004,$0006

CODE_12903E:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	STA.b $15
	TAY
	LDA.w DATA_129036,y
	STA.b $2A
	LDA.w DATA_12903A,y
	STA.b $2E
	LDX.b #(CODE_12C244-$01)>>16
	LDA.w #CODE_12C244-$01
	JMP.w CODE_12A3DB

DATA_12905B:
	dw $0002,$0003,$0004,$0004,$0003,$0002

CODE_129067:
	REP.b #$20
	LDA.b $15
	SEC
	SBC.w #$00BA
	ASL
	STA.b $15
	TAY
	LDA.w DATA_12905B,y
	STA.b $2E
	JSL.l CODE_128875
	AND.w #$0003
	BEQ.b CODE_129084
	EOR.w #$0003
CODE_129084:
	STA.b $A1
	LDX.b #(CODE_12C29C-$01)>>16
	LDA.w #CODE_12C29C-$01
	JMP.w CODE_12A3DB

CODE_12908E:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12C2CA-$01)>>16
	LDA.w #CODE_12C2CA-$01
	JMP.w CODE_12A3DB

CODE_12909F:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	DEC
	STA.b $2E
	LDX.b #(CODE_12C302-$01)>>16
	LDA.w #CODE_12C302-$01
	JMP.w CODE_12A3DB

CODE_1290B1:
	REP.b #$20
	LDA.w #$0004
	STA.b $2A
	STA.b $2E
	LDA.b $15
	AND.w #$0001
	ASL
	ASL
	ASL
	ASL
	STA.b $15
	LDX.b #(CODE_12C375-$01)>>16
	LDA.w #CODE_12C375-$01
	JMP.w CODE_12A3DB

CODE_1290CD:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12C38E
	SEP.b #$30
	RTL

DATA_1290D9:
	dw $0002,$0003,$0002,$0002,$0002

DATA_1290E3:
	dw $0002,$0003,$0003,$0002,$0002

CODE_1290ED:
	REP.b #$20
	LDA.b $15
	SEC
	SBC.w #$00C5
	ASL
	STA.b $15
	TAX
	LDA.w DATA_1290D9,x
	STA.b $2A
	LDA.w DATA_1290E3,x
	STA.b $2E
	LDX.b #(CODE_12C3D3-$01)>>16
	LDA.w #CODE_12C3D3-$01
	JMP.w CODE_12A3DB

CODE_12910B:
	JSR.w CODE_1286FD
	REP.b #$30
	LDA.b $15
	SEC
	SBC.w #$00CA
	STA.b $15
	JSL.l CODE_12C3FF
	SEP.b #$30
	RTL

DATA_12911F:
	db $05,$05,$05,$03,$03,$05,$05,$05,$03,$03,$07,$07

DATA_12912B:
	db $05,$05,$06,$04,$03,$05,$05,$06,$04,$03,$06,$06

CODE_129137:
	REP.b #$20
	LDA.b $15
	SEC
	SBC.w #$00D4
	TAY
	ASL
	STA.b $15
	LDA.w DATA_12911F,y
	AND.w #$00FF
	STA.b $2A
	LDA.w DATA_12912B,y
	AND.w #$000F
	STA.b $2E
	LDX.b #(CODE_12C690-$01)>>16
	LDA.w #CODE_12C690-$01
	JMP.w CODE_12A3DB

CODE_12915B:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	STA.b $2E
	LDX.b #(CODE_12C6EA-$01)>>16
	LDA.w #CODE_12C6EA-$01
	JMP.w CODE_12A3DB

CODE_12916C:
	LDX.w $001C
	LDY.w $001B
	LDA.w $6CAA,x
	STA.w $6CAA,y
	RTL

CODE_129179:
	RTL

CODE_12917A:
	JSR.w CODE_1286FD
	REP.b #$30
	JSL.l CODE_12C6FF
	SEP.b #$30
	RTL

CODE_129186:
	LDX.b $1C
	LDA.w $6CAA,x
	ORA.b #$80
	STA.w $6CAA,x
	RTL

CODE_129191:
	LDY.b $1C
	LDA.w $6CAA,y
	AND.b #$3F
	BEQ.b CODE_1291D3
	PHA
	TAX
	STZ.w $0D4E,x
	TYX
	LDA.b #$80
	STA.w $6CAA,x
	PLA
	TAX
	LDA.b #$7F8000>>16
	STA.b $22
	STA.b $26
	REP.b #$20
	TXA
	AND.w #$00FF
	XBA
	ASL
	CLC
	ADC.w #$7F8000
	STA.b $20
	CLC
	ADC.w #$0100
	STA.b $24
	LDA.w #$0000
	LDY.b #$00
CODE_1291C6:
	STA.b [$20],y
	STA.b [$24],y
	INY
	INY
	BNE.b CODE_1291C6
	SEP.b #$20
	DEC.w $0D4D
CODE_1291D3:
	RTL

CODE_1291D4:
	LDA.b #(CODE_138000-$01)>>16
	STA.b $24
	LDA.b #(CODE_13801D-$01)>>16
	STA.b $21
	LDA.b #(CODE_1380B4-$01)>>16
	STA.b $27
	REP.b #$30
	LDA.b $1B
	PHA
	AND.w #$0F0F
	STA.b $00
	PLA
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	INC.b $2E
	LDA.w #CODE_138000-$01
	STA.b $22
	LDA.w #CODE_13801D-$01
	STA.b $1F
	LDA.w #CODE_1380B4-$01
	STA.b $25
	LDA.w #$0003
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129217:
	LDX.b $15
	LDA.w DATA_129286-$02,x
	LDA.b #CODE_1381CA>>16
	STA.b $24
	STA.b $21
	LDA.b #(CODE_138231-$01)>>16
	STA.b $27
	REP.b #$30
	LDA.b $15
	ASL
	TAX
	LDA.w DATA_129290-$04,x
	STA.b $22
	STA.b $1F
	LDA.w #CODE_138231-$01
	STA.b $25
	LDA.w DATA_1292A4-$04,x
	STA.b $19
	STZ.b $17
	STZ.b $A1
	CPX.w #$0008
	BCS.b CODE_129280
	LDA.b $1B
	PHA
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	STA.b $02
	INC.b $2A
	INC.b $2E
	LDA.w #$0002
	STA.b $A1
	CPX.w #$0006
	BCS.b CODE_12927A
	LDA.b $02
	DEC
	AND.w #$0F0F
	STA.b $02
	LDA.b $2E
	STA.b $A1
	LDA.w #$0002
	STA.b $2E
CODE_12927A:
	LDA.b $00
	ORA.b $02
	STA.b $1B
CODE_129280:
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_129286:
	db CODE_1381CA>>16,CODE_1381CA>>16,$00,$00,$00,$00,$00,$00
	db (CODE_138413-$01)>>16,(CODE_138413-$01)>>16

DATA_129290:
	dw CODE_1381CA,CODE_1381CA,$0000,$0000,$0000,$0000,$0000,$0000
	dw CODE_138413-$01,CODE_138413-$01

DATA_1292A4:
	dw $0003,$0003,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0001,$0001

DATA_1292B8:
	dw $FFFF,$0001

CODE_1292BC:
	REP.b #$20
	JSR.w CODE_12933A
	LDA.b $15
	AND.w #$0001
	ASL
	STA.b $15
	TAY
	LDA.w DATA_1292B8,y
	STA.b $17
	TYA
	BEQ.b CODE_1292D5
	JSR.w CODE_12933A
CODE_1292D5:
	LDX.b #(CODE_13830F-$01)>>16
	LDA.w #CODE_13830F-$01
	JMP.w CODE_12A3DD

CODE_1292DD:
	LDA.b #(CODE_138374-$01)>>16
	STA.b $24
	STA.b $21
	LDA.b #(CODE_1380B4-$01)>>16
	STA.b $27
	REP.b #$30
	JSR.w CODE_12933A
	LDA.b $15
	CMP.w #$0007
	BEQ.b CODE_1292F8
	CMP.w #$0009
	BNE.b CODE_1292FB
CODE_1292F8:
	JSR.w CODE_12933A
CODE_1292FB:
	LDA.w #CODE_138374-$01
	STA.b $22
	LDA.w #CODE_1383A7-$01
	STA.b $1F
	LDA.w #CODE_1380B4-$01
	STA.b $25
	LDA.b $15
	DEC
	DEC
	DEC
	DEC
	ASL
	TAX
	LDA.w DATA_129322,x
	STA.b $19
	LDA.w DATA_12932E,x
	STA.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_129322:
	dw $0003,$0003,$0004,$0004,$0005,$0005

DATA_12932E:
	dw $FFFF,$0001,$FFFF,$0001,$FFFE,$0002

CODE_12933A:
	LDA.b $1B
	PHA
	AND.w #$0F0F
	STA.b $00
	PLA
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	ORA.b $00
	STA.b $1B
	INC.b $2E
	RTS

CODE_129354:
	REP.b #$20
	LDX.b #(CODE_138430-$01)>>16
	LDA.w #CODE_138430-$01
	JMP.w CODE_12A3DB

CODE_12935E:
	REP.b #$20
	LDX.b #(CODE_138478-$01)>>16
	LDA.w #CODE_138478-$01
	JMP.w CODE_12A3DB

CODE_129368:
	REP.b #$20
	LDA.w #$0002
	STA.b $2E
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_1384E1-$01)>>16
	LDA.w #CODE_1384E1-$01
	JMP.w CODE_12A3DD

CODE_12937C:
	REP.b #$20
	LDA.b $15
	AND.w #$0002
	TAX
	LDA.w DATA_129396,x
	STA.b $2E
	LDA.w DATA_12939A,x
	STA.b $17
	LDX.b #(CODE_13854D-$01)>>16
	LDA.w #CODE_13854D-$01
	JMP.w CODE_12A3DD

DATA_129396:
	dw $0002,$0003

DATA_12939A:
	dw $FFFF,$FFFE

CODE_12939E:
	REP.b #$20
	LDX.b #(CODE_1385D3-$01)>>16
	LDA.w #CODE_1385D3-$01
	JMP.w CODE_12A3DB

CODE_1293A8:
	REP.b #$20
	LDX.b #(CODE_138605-$01)>>16
	LDA.w #CODE_138605-$01
	JMP.w CODE_12A3DB

CODE_1293B2:
	REP.b #$20
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_138CB6-$01)>>16
	LDA.w #CODE_138CB6-$01
	JMP.w CODE_12A3DB

CODE_1293C1:
	REP.b #$20
	LDX.b #(CODE_138CDB-$01)>>16
	LDA.w #CODE_138CDB-$01
	JMP.w CODE_12A3DB

CODE_1293CB:
	REP.b #$20
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	INC.b $2E
	LDX.b #(CODE_138CED-$01)>>16
	LDA.w #CODE_138CED-$01
	JMP.w CODE_12A3DB

CODE_1293EE:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	TAY
	ASL
	TAX
	LDA.w DATA_129403,x
	LDX.w DATA_129401,y
	JMP.w CODE_12A3DB

DATA_129401:
	db (CODE_138DEB-$01)>>16,(CODE_138E52-$01)>>16

DATA_129403:
	dw CODE_138DEB-$01,CODE_138E52-$01

CODE_129407:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	TAY
	ASL
	TAX
	LDA.w DATA_12941C,x
	LDX.w DATA_12941A,y
	JMP.w CODE_12A3DB

DATA_12941A:
	db (CODE_138EB8-$01)>>16,(CODE_138EEF-$01)>>16

DATA_12941C:
	dw CODE_138EB8-$01,CODE_138EEF-$01

CODE_129420:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	LDX.b #(CODE_138F44-$01)>>16
	LDA.w #CODE_138F44-$01
	JMP.w CODE_12A3DB

CODE_12942F:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	TAY
	ASL
	TAX
	LDA.w DATA_129444,x
	LDX.w DATA_129442,y
	JMP.w CODE_12A3DB

DATA_129442:
	db (CODE_138F77-$01)>>16,(CODE_138F77-$01)>>16

DATA_129444:
	dw CODE_138F77-$01,CODE_138F77-$01

CODE_129448:
	LDA.b $15
	AND.b #$01
	TAX
	LDA.w DATA_1294DA,x
	STA.b $24
	STA.b $21
	LDA.w DATA_1294DC,x
	STA.b $27
	REP.b #$30
	LDA.b $1B
	LSR
	LSR
	LSR
	LSR
	EOR.b $1B
	AND.w #$0001
	STA.b $A1
	LDA.b $15
	AND.w #$0002
	TAX
	BEQ.b CODE_1294BD
	SEP.b #$20
	LDA.b $1B
	PHA
	LSR
	LSR
	LSR
	LSR
	STA.b $02
	PLA
	AND.b #$0F
	STA.b $00
	LDA.b $1C
	PHA
	AND.b #$F0
	ORA.b $02
	STA.b $02
	PLA
	ASL
	ASL
	ASL
	ASL
	ORA.b $00
	STA.b $00
	LDY.w #$0000
CODE_129495:
	LDA.w $7F74,y
	BEQ.b CODE_1294A3
	INY
	INY
	INY
	INY
	CPY.w #$0050
	BCC.b CODE_129495
CODE_1294A3:
	LDA.b $00
	STA.w $7F72,y
	LDA.b $02
	DEC
	DEC
	STA.w $7F73,y
	LDA.b $2A
	DEC
	STA.w $7F74,y
	LDA.b $2E
	DEC
	STA.w $7F75,y
	REP.b #$20
CODE_1294BD:
	STZ.b $15
	LDA.w DATA_1294DE,x
	DEC
	STA.b $22
	STA.b $1F
	LDA.w DATA_1294E2,x
	DEC
	STA.b $25
	LDA.w DATA_1294E6,x
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_1294DA:
	db CODE_13FBA0>>16,CODE_138F8F>>16

DATA_1294DC:
	db CODE_13FBA0>>16,CODE_138FC1>>16

DATA_1294DE:
	dw CODE_13FBA0,CODE_138F8F

DATA_1294E2:
	dw CODE_13FBA0,CODE_138FC1

DATA_1294E6:
	dw $0002,$0005

CODE_1294EA:
	REP.b #$20
	STZ.b $A1
	LDX.b #(CODE_139001-$01)>>16
	LDA.w #CODE_139001-$01
	JMP.w CODE_12A3DB

CODE_1294F6:
	REP.b #$20
	INC.b $2A
	LDX.b #(CODE_139165-$01)>>16
	LDA.w #CODE_139165-$01
	JMP.w CODE_12A3DB

CODE_129502:
	REP.b #$20
	INC.b $2A
	LDX.b #(CODE_1391B4-$01)>>16
	LDA.w #CODE_1391B4-$01
	JMP.w CODE_12A3DB

CODE_12950E:
	REP.b #$20
	LDX.b #(CODE_139228-$01)>>16
	LDA.w #CODE_139228-$01
	JMP.w CODE_12A3DB

DATA_129518:
	dw CODE_13925C-$01,CODE_13925C-$01

CODE_12951C:
	REP.b #$20
	LDA.b $15
	AND.w #$0002
	TAY
	STA.b $15
	LDX.b #(CODE_13925C-$01)>>16
	LDA.w DATA_129518,y
	JMP.w CODE_12A3DB

DATA_12952E:
	dw CODE_139352-$01,CODE_1393EA-$01

CODE_129532:
	REP.b #$20
	LDA.b $15
	AND.w #$0008
	LSR
	LSR
	TAY
	STA.b $15
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_139352-$01)>>16
	LDA.w DATA_12952E,y
	JMP.w CODE_12A3DD

DATA_12954B:
	dw CODE_1394D0-$01,CODE_1394D0-$01

CODE_12954F:
	REP.b #$20
	LDA.b $15
	AND.w #$0002
	TAY
	ASL
	STA.b $15
	STZ.b $A1
	LDA.w #$0002
	STA.b $17
	LDX.b #(CODE_1394D0-$01)>>16
	LDA.w DATA_12954B,y
	JMP.w CODE_12A3DD

CODE_129569:
	REP.b #$20
	LDX.b #(CODE_13951B-$01)>>16
	LDA.w #CODE_13951B-$01
	JMP.w CODE_12A3DB

CODE_129573:
	REP.b #$20
	INC.b $2A
	LDX.b #(CODE_139549-$01)>>16
	LDA.w #CODE_139549-$01
	JMP.w CODE_12A3DB

DATA_12957F:
	dw CODE_13958C-$01,CODE_1395FE-$01

CODE_129583:
	REP.b #$20
	JSL.l CODE_128875
	AND.w #$0002
	STA.b $A1
	LDA.b $15
	AND.w #$0002
	TAY
	LDX.b #(CODE_13958C-$01)>>16
	LDA.w DATA_12957F,y
	JMP.w CODE_12A3DB

CODE_12959C:
	REP.b #$20
	LDX.b #(CODE_13965E-$01)>>16
	LDA.w #CODE_13965E-$01
	JMP.w CODE_12A3DB

DATA_1295A6:
	dw CODE_1396B2-$01,CODE_139769-$01

CODE_1295AA:
	REP.b #$20
	STZ.b $A1
	JSL.l CODE_128875
	AND.w #$0002
	BEQ.b CODE_1295BC
	LDA.w #$000B
	STA.b $A1
CODE_1295BC:
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_1396B2-$01)>>16
	LDA.w DATA_1295A6,y
	JMP.w CODE_12A3DB

DATA_1295CB:
	dw CODE_1397EB-$01,CODE_1398F3-$01

CODE_1295CF:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_1397EB-$01)>>16
	LDA.w DATA_1295CB,y
	JMP.w CODE_12A3DB

CODE_1295E0:
	REP.b #$20
	INC.b $2E
	STZ.b $A1
	LDX.b #(CODE_13998A-$01)>>16
	LDA.w #CODE_13998A-$01
	JMP.w CODE_12A3DB

CODE_1295EE:
	REP.b #$20
	STZ.b $15
	LDX.b #(CODE_1399F9-$01)>>16
	LDA.w #CODE_1399F9-$01
	JMP.w CODE_12A3DB

CODE_1295FA:
	REP.b #$20
	LDA.w #$000B
	STA.b $A1
	LDX.b #(CODE_139769-$01)>>16
	LDA.w #CODE_139769-$01
	JMP.w CODE_12A3DB

CODE_129609:
	REP.b #$20
	LDX.b #(CODE_139A89-$01)>>16
	LDA.w #CODE_139A89-$01
	JMP.w CODE_12A3DB

CODE_129613:
	REP.b #$20
	JSL.l CODE_128875
	AND.w #$0002
	STA.b $15
	LDX.b #(CODE_139B15-$01)>>16
	LDA.w #CODE_139B15-$01
	JMP.w CODE_12A3DB

CODE_129626:
	REP.b #$20
	LDA.b $2A
	INC
	AND.w #$FFFE
	STA.b $2A
	LDA.b $2E
	INC
	AND.w #$FFFE
	STA.b $2E
	LDX.b #(CODE_139F83-$01)>>16
	LDA.w #CODE_139F83-$01
	JMP.w CODE_12A3DB

CODE_129640:
	REP.b #$20
	LDX.b #(CODE_139FAA-$01)>>16
	LDA.w #CODE_139FAA-$01
	JMP.w CODE_12A3DD

CODE_12964A:
	REP.b #$20
	LDA.b $2A
	ASL
	STA.b $00
	LDA.b $2E
	SEC
	SBC.b $00
	BEQ.b CODE_12965A
	BPL.b CODE_12965D
CODE_12965A:
	LDA.w #$0001
CODE_12965D:
	STA.b $2E
	LDX.b #(CODE_139FE7-$01)>>16
	LDA.w #CODE_139FE7-$01
	JMP.w CODE_12A3DD

CODE_129667:
	REP.b #$20
	LDA.b $15
	AND.w #$0080
	STA.b $15
	LDA.w #$0002
	STA.b $2A
	LDX.b #(CODE_13A033-$01)>>16
	LDA.w #CODE_13A033-$01
	JMP.w CODE_12A3DB

CODE_12967D:
	REP.b #$20
	LDA.w #$0003
	STA.b $2E
	LDX.b #(CODE_13A07A-$01)>>16
	LDA.w #CODE_13A07A-$01
	JMP.w CODE_12A3DB

CODE_12968C:
	REP.b #$20
	LDX.b #(CODE_13A0E4-$01)>>16
	LDA.w #CODE_13A0E4-$01
	JMP.w CODE_12A3DB

CODE_129696:
	REP.b #$20
	LDX.b #(CODE_13A126-$01)>>16
	LDA.w #CODE_13A126-$01
	JMP.w CODE_12A3DB

CODE_1296A0:
	REP.b #$20
	LDX.b #(CODE_13A156-$01)>>16
	LDA.w #CODE_13A156-$01
	JMP.w CODE_12A3DB

DATA_1296AA:
	dw CODE_13A372-$01,CODE_13A3AF-$01

CODE_1296AE:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13A372-$01)>>16
	LDA.w DATA_1296AA,y
	JMP.w CODE_12A3DB

CODE_1296BF:
	REP.b #$20
	STZ.b $A1
	LDX.b #(CODE_13A412-$01)>>16
	LDA.w #CODE_13A412-$01
	JMP.w CODE_12A3DB

CODE_1296CB:
	LDA.b #(CODE_13A553-$01)>>16
	STA.b $24
	STA.b $21
	LDA.b #(CODE_13A412-$01)>>16
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13A553-$01
	STA.b $22
	STA.b $1F
	LDA.w #CODE_13A412-$01
	STA.b $25
	LDA.w #$0002
	STA.b $19
	LDA.b $15
	AND.w #$0002
	TAX
	LDA.w DATA_129712,x
	STA.b $17
	LDA.b $1B
	PHA
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	INC.b $2E
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_129712:
	dw $FFFF,$0001

CODE_129716:
	REP.b #$20
	LDX.b #(CODE_13A64C-$01)>>16
	LDA.w #CODE_13A64C-$01
	JMP.w CODE_12A3DB

CODE_129720:
	LDA.b #(CODE_13A753-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13A753-$01
	STA.b $22
	LDA.w #CODE_13A811-$01
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129743:
	LDA.b #(CODE_13A90D-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13A90D-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	LDA.w #$0002
	STA.b $2A
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129768:
	LDA.b #(CODE_13A94B-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13A94B-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	LDA.b $15
	AND.w #$0007
	DEC
	DEC
	DEC
	ASL
	TAX
	LDA.w DATA_129797,x
	STA.b $2A
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_129797:
	dw $0004,$0006,$0008

CODE_12979D:
	LDA.b #(CODE_13A9F6-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13A9F6-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_1297BD:
	LDA.b #(CODE_13B13F-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13B13F-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_1297DD:
	LDA.b #(CODE_13B924-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13B924-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_1297FD:
	LDA.b #(CODE_13B95C-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13B95C-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	LDA.w #$FFFF
	STA.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129820:
	REP.b #$20
	LDX.b #(CODE_13B98D-$01)>>16
	LDA.w #CODE_13B98D-$01
	JMP.w CODE_12A3DB

CODE_12982A:
	LDA.b #(CODE_13BA20-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13BA20-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	LDA.b $15
	AND.w #$0003
	ASL
	TAX
	LDA.w DATA_129854,x
	STA.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_129854:
	dw $FFFF,$FFFF,$FFFE

CODE_12985A:
	LDA.b #(CODE_13BB45-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13BB45-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_12987A:
	LDA.b #(CODE_13BBA6-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13BBA6-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	STZ.b $A1
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_12989C:
	LDA.b #(CODE_13BD80-$00)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.b $15
	AND.w #$0003
	DEC
	ASL
	TAX
	LDA.w DATA_1298E9,x
	DEC
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	LDA.w DATA_1298EF,x
	STA.b $17
	INC.b $2E
	INC.b $2A
	INC.b $2A
	LDA.b $1B
	PHA
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_1298E9:						; Note: These ones aren't decremented because the code that reads this table does it automatically.
	dw CODE_13BD80-$00,CODE_13BE07-$00,CODE_13BE78-$00

DATA_1298EF:
	dw $FFFF,$FFFF,$FFFE

CODE_1298F5:
	LDA.b #(CODE_13BD80-$00)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.b $15
	AND.w #$0003
	ASL
	TAX
	LDA.w DATA_1298E9,x
	DEC
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	LDA.w DATA_129938,x
	STA.b $17
	INC.b $2A
	INC.b $2A
	LDA.b $1B
	PHA
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_129938:
	dw $0001,$0001,$0002

CODE_12993E:
	LDA.b #(CODE_13BEF5-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13BEF5-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	LDA.b $2A
	STA.b $00
	LDA.b $15
	AND.w #$000F
	BEQ.b CODE_129965
	LSR.b $00
CODE_129965:
	LDA.b $00
	CMP.b $2E
	BMI.b CODE_12996D
	STA.b $2E
CODE_12996D:
	INC.b $2A
	INC.b $2A
	INC.b $2E
	LDA.b $1B
	PHA
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	STZ.b $A1
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_12998F:
	LDA.b #(CODE_13C03B-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13C03B-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	LDA.b $15
	AND.w #$0002
	TAX
	BEQ.b CODE_1299C0
	LDA.b $2A
	ORA.b $2E
	CMP.w #$0001
	BNE.b CODE_1299C0
	INC.b $2A
	INC.b $2A
	BRA.b CODE_1299E6

CODE_1299C0:
	INC.b $2A
	INC.b $2A
	LDA.b $2E
	CMP.w #$0002
	BCC.b CODE_1299E6
	INC.b $2E
	INC.b $2E
	LDA.b $2A
	STA.b $00
	TXA
	BNE.b CODE_1299DB
	LDA.b $00
	LSR
	STA.b $00
CODE_1299DB:
	LDA.b $2E
	SEC
	SBC.b $00
	STA.b $2E
	BNE.b CODE_1299E6
	STZ.b $2E
CODE_1299E6:
	LDA.b $1B
	PHA
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	STZ.b $A1
	LDA.b $2E
	BEQ.b CODE_129A02
	BPL.b CODE_129A07
CODE_129A02:
	LDA.w #$0001
	STA.b $2E
CODE_129A07:
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129A0D:
	LDA.b #(CODE_13C273-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13C273-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129A2D:
	LDA.b #(CODE_13C291-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13C291-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129A4D:
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.b #$0C
	BEQ.b CODE_129A5E
	REP.b #$20
	LDX.b #(CODE_13C2AF-$01)>>16
	LDA.w #CODE_13C2AF-$01
	JMP.w CODE_12A3DB

CODE_129A5E:
	REP.b #$20
	LDX.b #(CODE_13C6A5-$01)>>16
	LDA.w #CODE_13C6A5-$01
	JMP.w CODE_12A3DB

CODE_129A68:
	REP.b #$20
	LDX.b #(CODE_13C6C9-$01)>>16
	STX.w $039E
	LDA.w #CODE_13C6C9-$01
	JMP.w CODE_12A3DB

CODE_129A75:
	REP.b #$20
	LDA.b $2A
	CMP.w #$0004
	BCS.b CODE_129A83
	LDA.w #$0004
	STA.b $2A
CODE_129A83:
	LDA.l $00002E
	CMP.w #$0004
	BCS.b CODE_129A91
	LDA.w #$0004
	STA.b $2E
CODE_129A91:
	LDX.b #(CODE_13C6E3-$01)>>16
	LDA.w #CODE_13C6E3-$01
	JMP.w CODE_12A3DB

CODE_129A99:
	REP.b #$20
	LDX.b #(CODE_13C728-$01)>>16
	LDA.w #CODE_13C728-$01
	JMP.w CODE_12A3DB

CODE_129AA3:
	REP.b #$20
	INC.b $2E
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	LDX.b #(CODE_13C742-$01)>>16
	LDA.w #CODE_13C742-$01
	JMP.w CODE_12A3DB

CODE_129AC6:
	REP.b #$20
	LDX.b #(CODE_13C7B2-$01)>>16
	LDA.w #CODE_13C7B2-$01
	JMP.w CODE_12A3DB

CODE_129AD0:
	REP.b #$20
	LDX.b #(CODE_13C7C0-$01)>>16
	LDA.w #CODE_13C7C0-$01
	JMP.w CODE_12A3DB

CODE_129ADA:
	REP.b #$20
	LDX.b #(CODE_13C7E8-$01)>>16
	LDA.w #CODE_13C7E8-$01
	JMP.w CODE_12A3DB

CODE_129AE4:
	REP.b #$20
	LDX.b #(CODE_13C81E-$01)>>16
	LDA.w #CODE_13C81E-$01
	JMP.w CODE_12A3DB

CODE_129AEE:
	REP.b #$20
	LDA.b $2A
	AND.w #$0001
	BEQ.b CODE_129AF9
	INC.b $2A
CODE_129AF9:
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_13C86A-$01)>>16
	LDA.w #CODE_13C86A-$01
	JMP.w CODE_12A3DB

CODE_129B06:
	REP.b #$20
	LDA.b $2A
	AND.w #$0001
	BEQ.b CODE_129B11
	INC.b $2A
CODE_129B11:
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_13C87F-$01)>>16
	LDA.w #CODE_13C87F-$01
	JMP.w CODE_12A3DB

CODE_129B1E:
	REP.b #$20
	LDA.b $2A
	AND.w #$0001
	BEQ.b CODE_129B29
	INC.b $2A
CODE_129B29:
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_13C894-$01)>>16
	LDA.w #CODE_13C894-$01
	JMP.w CODE_12A3DB

CODE_129B36:
	REP.b #$20
	LDA.w #$0003
	STA.b $2A
	LDA.b $2E
	AND.w #$0001
	BEQ.b CODE_129B46
	INC.b $2E
CODE_129B46:
	LDX.b #(CODE_13C8C6-$01)>>16
	LDA.w #CODE_13C8C6-$01
	JMP.w CODE_12A3DB

CODE_129B4E:
	REP.b #$20
	LDA.w #$0003
	STA.b $2A
	LDX.b #(CODE_13C8EF-$01)>>16
	LDA.w #CODE_13C8EF-$01
	JMP.w CODE_12A3DB

CODE_129B5D:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	LDX.b #(CODE_13C907-$01)>>16
	LDA.w #CODE_13C907-$01
	JMP.w CODE_12A3DB

CODE_129B6C:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	LDX.b #(CODE_13C91D-$01)>>16
	LDA.w #CODE_13C91D-$01
	JMP.w CODE_12A3DB

CODE_129B7B:
	REP.b #$20
	LDX.b #(CODE_13C933-$01)>>16
	LDA.w #CODE_13C933-$01
	JMP.w CODE_12A3DB

CODE_129B85:
	LDA.b #(CODE_13C941-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13C941-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$0002
	STA.b $2E
	LDA.w #$7FFF
	STA.b $19
	LDA.w #$FFFF
	STA.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129BAD:
	LDA.b #(CODE_13C955-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13C955-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$0002
	STA.b $2E
	LDA.w #$7FFF
	STA.b $19
	LDA.w #$FFFF
	STA.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129BD5:
	REP.b #$20
	LDX.b #(CODE_13C9AD-$01)>>16
	LDA.w #CODE_13C9AD-$01
	JMP.w CODE_12A3DB

CODE_129BDF:
	REP.b #$20
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13CB49-$01)>>16
	LDA.w #CODE_13CB49-$01
	JMP.w CODE_12A3DD

CODE_129BEE:
	REP.b #$20
	LDA.b $2A
	BPL.b CODE_129BF8
	EOR.w #$FFFF
	INC
CODE_129BF8:
	STA.b $2E
	LDX.b #(CODE_13CCBE-$01)>>16
	LDA.w #CODE_13CCBE-$01
	JMP.w CODE_12A3DB

CODE_129C02:
	REP.b #$20
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_13CD32-$01)>>16
	LDA.w #CODE_13CD32-$01
	JMP.w CODE_12A3DB

CODE_129C11:
	REP.b #$20
	LDA.b $2A
	CMP.w #$0002
	BCS.b CODE_129C1F
	LDA.w #$0002
	STA.b $2A
CODE_129C1F:
	LDA.b $2E
	CMP.w #$0002
	BCS.b CODE_129C2B
	LDA.w #$0002
	STA.b $2E
CODE_129C2B:
	LDX.b #(CODE_13CDD7-$01)>>16
	LDA.w #CODE_13CDD7-$01
	JMP.w CODE_12A3DB

CODE_129C33:
	REP.b #$20
	LDA.b $2A
	BPL.b CODE_129C3D
	EOR.w #$FFFF
	INC
CODE_129C3D:
	STA.b $2E
	LDX.b #(CODE_13D01A-$01)>>16
	LDA.w #CODE_13D01A-$01
	JMP.w CODE_12A3DB

CODE_129C47:
	LDA.b #(CODE_13D098-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13D098-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	LDA.w #$FFFF
	STA.b $17
	LDA.b $2A
	BPL.b CODE_129C6C
	EOR.w #$FFFF
	INC
CODE_129C6C:
	STA.b $2E
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129C74:
	REP.b #$20
	LDX.b #(CODE_13D0E6-$01)>>16
	LDA.w #CODE_13D0E6-$01
	JMP.w CODE_12A3DB

CODE_129C7E:
	REP.b #$20
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13D10A-$01)>>16
	LDA.w #CODE_13D10A-$01
	JMP.w CODE_12A3DD

CODE_129C8D:
	REP.b #$20
	LDX.b #(CODE_13D130-$01)>>16
	LDA.w #CODE_13D130-$01
	JMP.w CODE_12A3DB

CODE_129C97:
	REP.b #$20
	LDA.b $2A
	STA.b $00
	LDA.b $2E
	SEC
	SBC.b $00
	BEQ.b CODE_129CA6
	BPL.b CODE_129CA9
CODE_129CA6:
	LDA.w #$0001
CODE_129CA9:
	STA.b $2E
	LDX.b #(CODE_13D1B0-$01)>>16
	LDA.w #CODE_13D1B0-$01
	JMP.w CODE_12A3DB

CODE_129CB3:
	LDA.b #(CODE_13D25E-$01)>>16
	STA.b $24
	STA.b $21
	LDA.b #(CODE_1380B4-$01)>>16
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13D25E-$01
	STA.b $22
	STA.b $1F
	LDA.w #CODE_1380B4-$01
	STA.b $25
	LDA.w #$0002
	STA.b $19
	STZ.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129CD8:
	REP.b #$20
	LDX.b #(CODE_13D2D6-$01)>>16
	LDA.w #CODE_13D2D6-$01
	JMP.w CODE_12A3DB

CODE_129CE2:
	REP.b #$20
	LDA.w #$0003
	STA.b $2E
	LDX.b #(CODE_13D384-$01)>>16
	LDA.w #CODE_13D384-$01
	JMP.w CODE_12A3DB

CODE_129CF1:
	REP.b #$20
	LDX.b #(CODE_13D3ED-$01)>>16
	LDA.w #CODE_13D3ED-$01
	JMP.w CODE_12A3DB

CODE_129CFB:
	REP.b #$20
	LDA.b $2A
	INC
	AND.w #$FFFE
	STA.b $2A
	LDA.w #$0002
	STA.b $2E
	LDX.b #(CODE_13D41C-$01)>>16
	LDA.w #CODE_13D41C-$01
	JMP.w CODE_12A3DB

CODE_129D12:
	LDA.b #(CODE_13D473-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13D473-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	LDA.w #$FFFF
	STA.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

CODE_129D35:
	LDA.b #(CODE_13D574-$01)>>16
	STA.b $24
	STA.b $21
	STA.b $27
	REP.b #$30
	LDA.w #CODE_13D574-$01
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	LDA.w #$FFFF
	STA.b $17
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_129D58:
	dw CODE_13D61A-$01,CODE_13D675-$01

CODE_129D5C:
	REP.b #$20
	LDA.w #$0003
	STA.b $2A
	LDA.b $1B
	PHA
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	LDA.b $15
	AND.w #$0002
	TAY
	LDX.b #(CODE_13D61A-$01)>>16
	LDA.w DATA_129D58,y
	JMP.w CODE_12A3DB

CODE_129D85:
	REP.b #$20
	LDA.w #$0004
	STA.b $2A
	LDA.b $1B
	PHA
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	LDX.b #(CODE_13D6D2-$01)>>16
	LDA.w #CODE_13D6D2-$01
	JMP.w CODE_12A3DB

CODE_129DA8:
	REP.b #$20
	LDA.b $2A
	INC
	AND.w #$FFFE
	STA.b $2A
	LDA.b $2E
	INC
	AND.w #$FFFE
	STA.b $2E
	LDX.b #(CODE_13D739-$01)>>16
	LDA.w #CODE_13D739-$01
	JMP.w CODE_12A3DB

CODE_129DC2:
	REP.b #$20
	LDX.b #(CODE_13D76B-$01)>>16
	LDA.w #CODE_13D76B-$01
	JMP.w CODE_12A3DB

CODE_129DCC:
	REP.b #$20
	LDA.w #$0003
	STA.b $2A
	LDA.b $1B
	PHA
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	LDX.b #(CODE_13D7DE-$01)>>16
	LDA.w #CODE_13D7DE-$01
	JMP.w CODE_12A3DB

CODE_129DEF:
	REP.b #$20
	LDA.w #$0004
	STA.b $2A
	LDA.b $1B
	PHA
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	JSL.l CODE_128875
	AND.w #$0003
	STA.b $15
	EOR.w #$0003
	ASL
	STA.b $A1
	LDX.b #(CODE_13D855-$01)>>16
	LDA.w #CODE_13D855-$01
	JMP.w CODE_12A3DB

DATA_129E22:
	dw CODE_13D945-$01,CODE_13D9C8-$01

CODE_129E26:
	REP.b #$20
	LDA.b $15
	AND.w #$0004
	LSR
	TAY
	JSL.l CODE_128875
	AND.w #$0003
	STA.b $15
	EOR.w #$0003
	ASL
	STA.b $A1
	LDX.b #(CODE_13D945-$01)>>16
	LDA.w DATA_129E22,y
	JMP.w CODE_12A3DB

CODE_129E46:
	REP.b #$20
	LDX.b #(CODE_13DA37-$01)>>16
	LDA.w #CODE_13DA37-$01
	JMP.w CODE_12A3DB

CODE_129E50:
	REP.b #$20
	LDX.b #(CODE_13DA8E-$01)>>16
	LDA.w #CODE_13DA8E-$01
	JMP.w CODE_12A3DB

CODE_129E5A:
	REP.b #$20
	LDA.w #$0002
	STA.b $2E
	LDA.b $2A
	INC
	AND.w #$FFFE
	STA.b $2A
	LDX.b #(CODE_13DAA4-$01)>>16
	LDA.w #CODE_13DAA4-$01
	JMP.w CODE_12A3DB

CODE_129E71:
	REP.b #$20
	LDA.b $15
	AND.w #$000F
	ASL
	STA.b $15
	LDA.b $2A
	INC
	AND.w #$FFFE
	STA.b $2A
	LDX.b #(CODE_13DACC-$01)>>16
	LDA.w #CODE_13DACC-$01
	JMP.w CODE_12A3DB

CODE_129E8B:
	REP.b #$20
	LDA.b $15
	AND.w #$0004
	STA.b $15
	LDA.b $2A
	INC
	AND.w #$FFFE
	STA.b $2A
	LDA.b $2E
	INC
	AND.w #$FFFE
	STA.b $2E
	LDX.b #(CODE_13DAEC-$01)>>16
	LDA.w #CODE_13DAEC-$01
	JMP.w CODE_12A3DB

DATA_129EAC:
	dw $0002,$0004

CODE_129EB0:
	REP.b #$20
	LDA.b $15
	AND.w #$0002
	STA.b $15
	ASL
	TAX
	LDA.w #$0002
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.b #$03
	BNE.b CODE_129ED0
	LDA.b $15
	TAY
	ORA.w #$0004
	STA.b $15
	LDA.w DATA_129EAC,y
CODE_129ED0:
	STA.b $2A,x
	LDX.b #(CODE_13DB17-$01)>>16
	LDA.w #CODE_13DB17-$01
	JMP.w CODE_12A3DB

DATA_129EDA:
	dw CODE_13DC91-$01,CODE_13DCF3-$01

CODE_129EDE:
	REP.b #$20
	LDA.b $1B
	PHA
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	PLA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	INC.b $2A
	INC.b $2A
	INC.b $2E
	INC.b $2E
	LDA.b $15
	AND.w #$0008
	LSR
	LSR
	TAY
	LDX.b #(CODE_13DC91-$01)>>16
	LDA.w DATA_129EDA,y
	JMP.w CODE_12A3DB

CODE_129F13:
	REP.b #$20
	LDX.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPX.b #$03
	BEQ.b CODE_129F24
	LDX.b #(CODE_13DDCA-$01)>>16
	LDA.w #CODE_13DDCA-$01
	JMP.w CODE_12A3DB

CODE_129F24:
	LDA.w #$0002
	STA.b $2A
	LDX.b #(CODE_13DDF0-$01)>>16
	LDA.w #CODE_13DDF0-$01
	JMP.w CODE_12A3DB

DATA_129F31:
	dw CODE_13DF04-$01,CODE_13DF50-$01

CODE_129F35:
	REP.b #$20
	LDA.w #$0002
	STA.b $2A
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13DF04-$01)>>16
	LDA.w DATA_129F31,y
	JMP.w CODE_12A3DB

DATA_129F4B:
	dw CODE_13DE61-$01,CODE_13DEB8-$01

CODE_129F4F:
	REP.b #$20
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$000B
	BNE.b CODE_129F5E
	LDA.w #$0002
	STA.b $2E
CODE_129F5E:
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13DE61-$01)>>16
	LDA.w DATA_129F4B,y
	JMP.w CODE_12A3DB

DATA_129F6D:
	dw CODE_13E148-$01,CODE_13E170-$01

CODE_129F71:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	ASL
	TAX
	LDA.w #$0002
	STA.b $2A,x
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13E148-$01)>>16
	LDA.w DATA_129F6D,y
	JMP.w CODE_12A3DB

CODE_129F8F:
	REP.b #$20
	LDX.b #(CODE_13E1B0-$01)>>16
	LDA.w #CODE_13E1B0-$01
	JMP.w CODE_12A3DB

CODE_129F99:
	REP.b #$20
	LDX.b #(CODE_13E246-$01)>>16
	LDA.w #CODE_13E246-$01
	JMP.w CODE_12A3DB

DATA_129FA3:
	dw CODE_13E281-$01,CODE_13E2A2-$01

CODE_129FA7:
	REP.b #$20
	LDA.w #$0003
	STA.b $2E
	LDA.w #$FFFF
	STA.b $17
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13E281-$01)>>16
	LDA.w DATA_129FA3,y
	JMP.w CODE_12A3DD

DATA_129FC2:
	dw CODE_13E281-$01,CODE_13E2C5-$01

CODE_129FC6:
	REP.b #$20
	LDA.w #$0004
	STA.b $2E
	LDA.w #$FFFF
	STA.b $17
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13E281-$01)>>16
	LDA.w DATA_129FC2,y
	JMP.w CODE_12A3DD

DATA_129FE1:
	dw CODE_13E2E8-$01,CODE_13E32D-$01

CODE_129FE5:
	REP.b #$20
	LDA.w #$0003
	STA.b $2E
	LDA.w #$FFFF
	STA.b $17
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13E2E8-$01)>>16
	LDA.w DATA_129FE1,y
	JMP.w CODE_12A3DD

DATA_12A000:
	dw CODE_13E2E8-$01,CODE_13E374-$01

CODE_12A004:
	REP.b #$20
	LDA.w #$0004
	STA.b $2E
	LDA.w #$FFFF
	STA.b $17
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13E2E8-$01)>>16
	LDA.w DATA_12A000,y
	JMP.w CODE_12A3DD

DATA_12A01F:
	dw CODE_13E3BB-$01,CODE_13E3EA-$01,CODE_13E448-$01,CODE_13E419-$01

CODE_12A027:
	REP.b #$20
	LDA.b $15
	DEC
	DEC
	AND.w #$0003
	ASL
	TAY
	LDX.b #(CODE_13E3BB-$01)>>16
	LDA.w DATA_12A01F,y
	JMP.w CODE_12A3DB

DATA_12A03A:
	dw CODE_13E583-$01,CODE_13E62D-$01

CODE_12A03E:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13E583-$01)>>16
	LDA.w DATA_12A03A,y
	JMP.w CODE_12A3DB

DATA_12A04F:
	dw CODE_13E74C-$01,CODE_13E81D-$01,CODE_13E8A6-$01,CODE_13E8D9-$01

CODE_12A057:
	REP.b #$20
	LDA.w #$0002
	STA.b $2E
	LDA.w #$FFFF
	STA.b $17
	LDA.b $15
	AND.w #$0003
	ASL
	TAY
	LDX.b #(CODE_13E74C-$01)>>16
	LDA.w DATA_12A04F,y
	CPY.b #$04
	BCC.b CODE_12A076
	JMP.w CODE_12A3DD

CODE_12A076:
	JMP.w CODE_12A3DB

DATA_12A079:
	dw CODE_13E904-$01,CODE_13E90F-$01,CODE_13E91A-$01

CODE_12A07F:
	REP.b #$20
	LDA.b $15
	CMP.w #$00C7
	BCC.b CODE_12A089
	INC
CODE_12A089:
	STA.b $00
	PHA
	AND.w #$0001
	EOR.w #$0001
	ASL
	ASL
	TAX
	LDA.w #$0001
	STA.b $2A,x
	LDA.b $00
	LSR
	LSR
	AND.w #$0002
	STA.b $15
	LDA.w #$FFFF
	STA.b $17
	PLA
	AND.w #$0003
	ASL
	TAY
	LDX.b #(CODE_13E904-$01)>>16
	LDA.w DATA_12A079,y
	CPY.b #$04
	BCC.b CODE_12A0BA
	JMP.w CODE_12A3DD

CODE_12A0BA:
	JMP.w CODE_12A3DB

CODE_12A0BD:
	REP.b #$20
	LDX.b #(CODE_13E9F6-$01)>>16
	LDA.w #CODE_13E9F6-$01
	JMP.w CODE_12A3DB

CODE_12A0C7:
	REP.b #$20
	STZ.b $A1
	LDX.b #(CODE_13EBFC-$01)>>16
	LDA.w #CODE_13EBFC-$01
	JMP.w CODE_12A3DB

DATA_12A0D3:
	dw CODE_13EB64-$01,CODE_13EA5A-$01

CODE_12A0D7:
	REP.b #$20
	STZ.b $A1
	LDA.w #$0001
	STA.b $17
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b #(CODE_13EB64-$01)>>16
	LDA.w DATA_12A0D3,y
	JMP.w CODE_12A3DD

CODE_12A0EF:
	REP.b #$20
	LDA.w #$0001
	STA.b $15
	LDA.b $2A
	BPL.b CODE_12A0FC
	STZ.b $15
CODE_12A0FC:
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13EC4C-$01)>>16
	LDA.w #CODE_13EC4C-$01
	JMP.w CODE_12A3DD

CODE_12A109:
	REP.b #$20
	LDA.w #$0002
	STA.b $15
	LDA.b $2A
	BPL.b CODE_12A116
	STZ.b $15
CODE_12A116:
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13EC66-$01)>>16
	LDA.w #CODE_13EC66-$01
	JMP.w CODE_12A3DD

CODE_12A123:
	REP.b #$20
	LDA.w #$0002
	STA.b $15
	LDA.b $2A
	BPL.b CODE_12A130
	STZ.b $15
CODE_12A130:
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13EC81-$01)>>16
	LDA.w #CODE_13EC81-$01
	JMP.w CODE_12A3DD

CODE_12A13D:
	REP.b #$20
	LDX.b #(CODE_13ECA1-$01)>>16
	LDA.w #CODE_13ECA1-$01
	JMP.w CODE_12A3DB

CODE_12A147:
	REP.b #$20
	LDX.b #(CODE_13ECA8-$01)>>16
	LDA.w #CODE_13ECA8-$01
	JMP.w CODE_12A3DB

CODE_12A151:
	REP.b #$20
	LDX.b #(CODE_13ECB6-$01)>>16
	LDA.w #CODE_13ECB6-$01
	JMP.w CODE_12A3DB

DATA_12A15B:
	dw CODE_13ED27-$01,CODE_13EE31-$01,CODE_13EF57-$01,CODE_13F06C-$01

CODE_12A163:
	REP.b #$20
	STZ.b $A1
	LDA.b $15
	AND.w #$0003
	ASL
	TAY
	LDX.b #(CODE_13ED27-$01)>>16
	LDA.w DATA_12A15B,y
	JMP.w CODE_12A3DB

DATA_12A176:
	dw $0004,$0003

CODE_12A17A:
	REP.b #$20
	LDA.b $15
	AND.w #$0001
	ASL
	TAX
	ASL
	ASL
	ASL
	STA.b $15
	LDA.w DATA_12A176,x
	STA.b $2E
	LDX.b #(CODE_13F167-$01)>>16
	LDA.w #CODE_13F167-$01
	JMP.w CODE_12A3DB

CODE_12A195:
	REP.b #$20
	LDX.b #(CODE_13F186-$01)>>16
	LDA.w #CODE_13F186-$01
	JMP.w CODE_12A3DB

CODE_12A19F:
	REP.b #$20
	LDX.b #(CODE_13F1A2-$01)>>16
	LDA.w #CODE_13F1A2-$01
	JMP.w CODE_12A3DB

CODE_12A1A9:
	REP.b #$20
	LDX.b #(CODE_13F206-$01)>>16
	LDA.w #CODE_13F206-$01
	JMP.w CODE_12A3DB

CODE_12A1B3:
	REP.b #$20
	JSL.l CODE_128875
	AND.w #$0007
	STA.b $15
	LDX.b #(CODE_13F2BE-$01)>>16
	LDA.w #CODE_13F2BE-$01
	JMP.w CODE_12A3DB

CODE_12A1C6:
	REP.b #$20
	INC.b $2A
	LDX.b #(CODE_13F33B-$01)>>16
	LDA.w #CODE_13F33B-$01
	JMP.w CODE_12A3DB

CODE_12A1D2:
	REP.b #$20
	INC.b $2E
	LDX.b #(CODE_13F36E-$01)>>16
	LDA.w #CODE_13F36E-$01
	JMP.w CODE_12A3DB

CODE_12A1DE:
	REP.b #$20
	LDX.b #(CODE_13F3B4-$01)>>16
	LDA.w #CODE_13F3B4-$01
	JMP.w CODE_12A3DB

CODE_12A1E8:
	REP.b #$20
	STZ.b $A1
	JSL.l CODE_128875
	AND.w #$0003
	BEQ.b CODE_12A1F8
	EOR.w #$0003
CODE_12A1F8:
	ASL
	ASL
	ASL
	STA.b $15
	LDX.b #(CODE_13F3E6-$01)>>16
	LDA.w #CODE_13F3E6-$01
	JMP.w CODE_12A3DB

CODE_12A205:
	REP.b #$20
	LDA.w #$0004
	STA.b $2A
	LDX.b #(CODE_13F4E4-$01)>>16
	LDA.w #CODE_13F4E4-$01
	JMP.w CODE_12A3DB

CODE_12A214:
	REP.b #$20
	LDX.b #(CODE_13F511-$01)>>16
	LDA.w #CODE_13F511-$01
	JMP.w CODE_12A3DB

CODE_12A21E:
	REP.b #$20
	JSR.w CODE_12A22B
	LDX.b #(CODE_13F5EE-$01)>>16
	LDA.w #CODE_13F5EE-$01
	JMP.w CODE_12A3DB

CODE_12A22B:
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0020
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	INC.b $2E
	INC.b $2E
	RTS

CODE_12A247:
	REP.b #$20
	JSR.w CODE_12A22B
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13F6D2-$01)>>16
	LDA.w #CODE_13F6D2-$01
	JMP.w CODE_12A3DD

CODE_12A259:
	REP.b #$20
	JSR.w CODE_12A22B
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13F777-$01)>>16
	LDA.w #CODE_13F777-$01
	JMP.w CODE_12A3DD

CODE_12A26B:
	REP.b #$20
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	INC.b $2E
	LDA.w #$FFFE
	STA.b $17
	LDX.b #(CODE_13F7DF-$01)>>16
	LDA.w #CODE_13F7DF-$01
	JMP.w CODE_12A3DD

CODE_12A293:
	REP.b #$20
	JSR.w CODE_12A22B
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13F888-$01)>>16
	LDA.w #CODE_13F888-$01
	JMP.w CODE_12A3DD

CODE_12A2A5:
	REP.b #$20
	JSR.w CODE_12A22B
	LDA.w #$FFFF
	STA.b $17
	LDX.b #(CODE_13F94F-$01)>>16
	LDA.w #CODE_13F94F-$01
	JMP.w CODE_12A3DD

CODE_12A2B7:
	REP.b #$20
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	INC.b $2E
	LDA.w #$FFFE
	STA.b $17
	LDX.b #(CODE_13F9B7-$01)>>16
	LDA.w #CODE_13F9B7-$01
	JMP.w CODE_12A3DD

CODE_12A2DF:
	REP.b #$20
	LDA.b $15
	AND.w #$0004
	LSR
	STA.b $15
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $1B
	INC.b $2E
	LDX.b #(CODE_13FA0D-$01)>>16
	LDA.w #CODE_13FA0D-$01
	JMP.w CODE_12A3DB

CODE_12A30A:
	REP.b #$20
	LDA.b $1B
	AND.w #$0001
	STA.b $00
	LDA.b $1B
	LSR
	LSR
	LSR
	LSR
	AND.w #$0001
	EOR.b $00
	STA.b $15
	LDX.b #(CODE_13FB0D-$01)>>16
	LDA.w #CODE_13FB0D-$01
	JMP.w CODE_12A3DB

CODE_12A328:
	REP.b #$20
	LDA.b $1B
	LSR
	LSR
	LSR
	LSR
	EOR.b $1B
	AND.w #$0001
	STA.b $A1
	LDA.b $15
	AND.w #$0001
	EOR.w #$0001
	BNE.b CODE_12A342
	DEC
CODE_12A342:
	STA.b $15
	LDX.b #(CODE_13FBA0-$01)>>16
	LDA.w #CODE_13FBA0-$01
	JMP.w CODE_12A3DB

DATA_12A34C:
	db $20,$40,$E0,$C0

CODE_12A350:
	LDA.b $1B
	PHA
	LSR
	LSR
	LSR
	LSR
	STA.b $02
	PLA
	AND.b #$0F
	STA.b $00
	LDA.b $1C
	PHA
	AND.b #$F0
	ORA.b $02
	STA.b $02
	PLA
	ASL
	ASL
	ASL
	ASL
	ORA.b $00
	STA.b $00
	LDX.b #$00
CODE_12A372:
	LDA.l $7044A0,x
	BEQ.b CODE_12A384
	INX
	INX
	INX
	INX
	INX
	INX
	CPX.b #$72
	BCC.b CODE_12A372
	LDX.b #$72
CODE_12A384:
	LDA.b $00
	STA.l $70449E,x
	LDA.b $02
	STA.l $70449F,x
	LDA.b $2A
	DEC
	STA.l $7044A0,x
	LDA.b $2E
	DEC
	STA.l $7044A1,x
	LDA.b $15
	AND.b #$0F
	TAY
	LDA.w DATA_12A34C,y
	STA.l $7044A2,x
	REP.b #$20
	LDA.b $1B
	LSR
	LSR
	LSR
	LSR
	EOR.b $1B
	AND.w #$0001
	STA.b $A1
	LDA.w #$8000
	STA.w $0015
	LDX.b #(CODE_13FBA0-$01)>>16
	LDA.w #CODE_13FBA0-$01
	JMP.w CODE_12A3DB

CODE_12A3C7:
	REP.b #$20
	LDX.b #(CODE_13FD6E-$01)>>16
	LDA.w #CODE_13FD6E-$01
	JMP.w CODE_12A3DB

CODE_12A3D1:
	REP.b #$20
	LDX.b #(CODE_13FD85-$01)>>16
	LDA.w #CODE_13FD85-$01
	JMP.w CODE_12A3DB

CODE_12A3DB:
	STZ.b $17
CODE_12A3DD:
	STX.b $24
	STX.b $21
	STX.b $27
	REP.b #$10
	STA.b $22
	STA.b $1F
	STA.b $25
	LDA.w #$7FFF
	STA.b $19
	JSR.w CODE_1285EC
	SEP.b #$30
	RTL

DATA_12A3F6:
	dw $9600,$9601,$9610,$9611,$0000,$920D

DATA_12A402:
	dw $967D,$967E,$967B,$967C,$920C,$0000

DATA_12A40E:
	dw $0000,$0000,$9606,$9607,$9208,$920C

DATA_12A41A:
	dw $0000,$0000,$9604,$9605,$920D,$920E

DATA_12A426:
	dw $0000,$967A,$920D

DATA_12A42C:
	dw $0000,$9618,$920C

DATA_12A432:
	dw $0000,$967F,$920B

DATA_12A438:
	dw $0000,$9612,$920A

DATA_12A43E:
	dw $0000,$9604,$9605,$9613,$9614,$9615,$9208,$9209
	dw $920A

DATA_12A450:
	dw $9606,$9607,$9616,$9617,$920B,$920C

DATA_12A45C:
	dw DATA_12A3F6,DATA_12A402,DATA_12A40E,DATA_12A41A,DATA_12A426,DATA_12A42C,DATA_12A432,DATA_12A438
	dw DATA_12A43E,DATA_12A450

DATA_12A470:
	db $02,$04

DATA_12A472:
	db $01,$02

DATA_12A474:
	db $03,$06

DATA_12A476:
	dw DATA_12A470-$01,DATA_12A470-$01,DATA_12A470-$01,DATA_12A470-$01,DATA_12A472-$01,DATA_12A472-$01,DATA_12A472-$01,DATA_12A472-$01
	dw DATA_12A474-$01,DATA_12A470-$01

CODE_12A48A:
	REP.b #$30
	LDX.b $15
	LDA.w DATA_12A45C,x
	STA.b $00
	LDA.w DATA_12A476,x
	STA.b $02
	LDY.b $2C
	BEQ.b CODE_12A4A2
	LDA.b ($02),y
	AND.w #$00FF
	TAY
CODE_12A4A2:
	TYA
	CLC
	ADC.b $28
	ASL
	TAY
	LDA.b ($00),y
	BEQ.b CODE_12A4B2
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12A4B2:
	SEP.b #$30
	RTL

DATA_12A4B5:
	dw $9096,$9097,$90A6,$90A7

DATA_12A4BD:
	dw $907C,$9095,$90A4,$90A5

DATA_12A4C5:
	dw DATA_12A4B5,DATA_12A4BD

CODE_12A4C9:
	REP.b #$30
	LDX.b $15
	LDA.w DATA_12A4C5,x
	STA.b $00
	LDA.b $2C
	ASL
	ADC.b $28
	ASL
	TAY
	LDA.b ($00),y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12A4E4:
	dw $920F,$9066,$9076,$9086

CODE_12A4EC:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_12A4E4,y
	LDX.b $12
	CPX.w #$9216
	BNE.b CODE_12A4FF
	LDA.w #$9213
CODE_12A4FF:
	CLC
	ADC.b $28
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12A50B:
	dw $5554,$5554,$5554,$5554,$5756,$5756,$5756,$5756
	dw $0100,$0302,$0504,$0706,$0908,$0B0A,$0D0C,$0F0E
	dw $1312,$1514,$1716,$1918,$1D1C,$5B5B,$5B5B,$5B5B
	dw $2322,$5B5B,$5B5B,$5B5B,$2726,$5B5B,$5B5B,$5B5B
	dw $2B2A,$5B5B,$5B5B,$5B5B,$2F2E,$5B5B,$5B5B,$5B5B
	dw $3332,$5B5B,$5B5B,$5B5B,$0100,$5B5B,$5B5B,$5B5B
	dw $4E4D,$464F,$4847,$4C49,$5251,$5053,$4B4A,$5053
	dw $5859,$5859,$5859,$5859,$5A5A,$5A5A,$5A5A,$5A5A

DATA_12A58B:
	dw $5554,$5554,$5554,$5554,$5756,$5756,$5756,$5756
	dw $0100,$211E,$3736,$3938,$1110,$3B3A,$3D3C,$3F3E
	dw $1B1A,$4140,$4342,$4544,$201F,$5B5B,$5B5B,$5B5B
	dw $2524,$5B5B,$5B5B,$5B5B,$2928,$5B5B,$5B5B,$5B5B
	dw $2D2C,$5B5B,$5B5B,$5B5B,$3130,$5B5B,$5B5B,$5B5B
	dw $3534,$5B5B,$5B5B,$5B5B,$0100,$5B5B,$5B5B,$5B5B
	dw $4E4D,$464F,$4847,$4C49,$5251,$5053,$4B4A,$5053
	dw $5859,$5859,$5859,$5859,$5A5A,$5A5A,$5A5A,$5A5A

DATA_12A60B:
	dw DATA_12A50B,DATA_12A58B

CODE_12A60F:
	REP.b #$30
	LDA.b $2C
	ASL
	ASL
	ASL
	ADC.b $28
	TAY
	LDX.b $15
	LDA.w DATA_12A60B,x
	STA.b $00
	LDA.b ($00),y
	AND.w #$00FF
	CMP.w #$005B
	BEQ.b CODE_12A648
	CMP.w #$0046
	BCC.b CODE_12A63A
	CMP.w #$0054
	BCC.b CODE_12A63F
	CLC
	ADC.w #$9D30
	BRA.b CODE_12A642

CODE_12A63A:
	ADC.w #$9684
	BRA.b CODE_12A642

CODE_12A63F:
	ADC.w #$9D46
CODE_12A642:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12A648:
	SEP.b #$30
	RTL

CODE_12A64B:
	LDA.w #$00B6
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12A655:
	db $00,$01,$00,$01,$02,$03,$02,$03,$01,$00,$01,$00,$03,$02,$03,$02

CODE_12A665:
	REP.b #$30
	LDA.b $2C
	AND.w #$0003
	ASL
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0003
	ORA.b $00
	TAX
	LDA.w DATA_12A655,x
	AND.w #$00FF
	CLC
	ADC.w #$84C2
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12A68B:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	CLC
	ADC.w #$7797
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12A69C:
	dw $96D1,$96D1,$96D1,$96D2,$96D2

CODE_12A6A6:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDA.w DATA_12A69C,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12A6B8:
	dw $96D3,$96D3,$96D1,$96D1,$96D1

CODE_12A6C2:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDA.w DATA_12A6B8,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12A6D4:
	dw $96D6,$0000,$96D6,$96D7,$0000,$96D7,$0000,$96D4
	dw $0000,$96D4

CODE_12A6E8:
	REP.b #$30
	LDA.w #$FFFF
	STA.b $9B
	LDA.b $28
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12A6D4,y
	BEQ.b CODE_12A701
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12A701:
	SEP.b #$30
	RTL

DATA_12A704:
	dw $0000,$96D5,$0000,$96D5,$0000,$96D8,$96D9,$96D8
	dw $96D9,$0000

CODE_12A718:
	REP.b #$30
	LDA.w #$FFFF
	STA.b $9B
	LDA.b $28
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12A704,y
	BEQ.b CODE_12A731
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12A731:
	SEP.b #$30
	RTL

CODE_12A734:
	LDX.b $1D
	JSL.l CODE_01E501
	BNE.b CODE_12A748
	LDA.b $12
	AND.w #$00FF
	ORA.w $1DF8
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12A748:
	RTL

CODE_12A749:
	LDX.b $1D
	JSL.l CODE_01E501
	BNE.b CODE_12A758
	LDA.w #$A400
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12A758:
	RTL

DATA_12A759:
	db $00,$00,$00,$00,$00,$01,$02,$00,$00,$03,$04,$05,$06,$07,$08,$09
	db $0B,$00,$00,$00,$0C,$07,$08,$0B,$0D,$07,$0E,$0A,$0A,$05,$06,$08
	db $08,$0B,$00,$0D,$03,$04,$06,$0F,$10,$11,$12,$0A,$13,$12,$14,$15
	db $16,$17,$18,$19,$1A,$1B,$13,$1C,$0F,$0B,$07,$0E,$06,$1D,$1E,$16
	db $1F,$06,$08,$20,$1F,$0A,$06,$04,$21,$08,$1F,$0A,$0A,$21,$22,$1F
	db $0A,$0A,$23,$24,$0A,$0A,$0A,$0A,$0A,$05,$0A,$0A,$0A,$0A,$05,$0A
	db $0A,$0A,$0A,$0A,$0A,$0A,$0A,$0A,$0A,$0A,$0A,$25,$0A,$0A,$0A,$0A
	db $0A,$0A,$0A,$0A,$26,$27,$28,$0A,$0A,$29,$2A,$2B,$0A,$2C,$0A,$0A
	db $0A,$26,$27,$28,$2D,$2E,$2F,$0A,$30,$31,$32,$33,$0A,$34,$35,$36
	db $37,$2D,$2E,$2F,$38,$39,$3A,$3B,$3C,$3D,$3E,$3F,$40,$41,$42,$43
	db $44,$38,$39,$3A,$45,$46,$47,$48,$49,$4A,$47,$4B,$4C,$4D,$4E,$4F
	db $50,$51,$52,$53,$54,$55,$56,$57,$53,$54,$55,$56,$57,$58,$53,$59
	db $38,$39,$3A,$3B,$3C,$38,$38,$38,$38,$38,$3D,$3E,$3F,$38,$40,$38
	db $41,$42,$43,$44,$45,$38,$46,$47,$48,$49,$4A,$4B,$4C,$4D,$4E,$38
	db $4F,$50,$51,$52,$53,$54,$55,$45,$56,$57,$58,$59,$5A,$5B,$5C,$5D
	db $5E,$51,$51,$51,$52,$53,$45,$5F,$51,$60,$61,$62,$51,$51,$63,$64

CODE_12A859:
	REP.b #$30
	LDA.b $2C
	TAX
	ASL
	ASL
	ASL
	ASL
	ORA.b $28
	TAY
	LDA.w DATA_12A759,y
	AND.w #$00FF
	CPX.w #$000C
	BCS.b CODE_12A875
	ORA.w #$A500
	BRA.b CODE_12A878

CODE_12A875:
	ORA.w #$9D00
CODE_12A878:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12A881:
	dw $1A46,$1A52,$1A2C,$1A36,$1A04,$1A06,$1A24,$1A26
	dw $19DC,$1A2E,$1A38

DATA_12A897:
	db $00,$06,$01,$07,$0C,$05,$2C,$2D,$06,$08,$2A,$2B,$0B,$00,$06,$08
	db $2A,$2B,$2C,$2D,$01,$07,$0C,$05,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $09,$0D,$09,$0E,$16,$FF,$17,$04,$09,$0E,$0F,$10,$11,$0D,$09,$0E
	db $0F,$10,$17,$04,$09,$02,$0A,$0D,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $02,$0A,$02,$12,$13,$03,$18,$19,$02,$12,$13,$03,$14,$15,$02,$12
	db $13,$03,$18,$19,$0D,$09,$02,$0A,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF

DATA_12A8F7:
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$0B,$00,$06,$08,$07,$37
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$0D,$09,$0D,$38
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$02,$0A,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$36,$09,$0D,$38
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$0D,$09,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$36,$0A,$0D,$09
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$0D,$09,$0D
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$36,$09,$02,$0A
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FF,$2C,$2D,$01,$07,$0C,$05,$0B,$00,$2A,$2B,$2C,$2D,$00,$06,$08
	db $FF,$FF,$FF,$FF,$35,$07,$0C,$37,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$0B
	db $00,$17,$04,$09,$02,$0A,$0D,$09,$0E,$0F,$10,$17,$04,$09,$02,$0A
	db $FF,$FF,$FF,$FF,$FF,$02,$0A,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$11
	db $03,$18,$19,$0D,$09,$02,$0A,$02,$12,$13,$03,$18,$19,$0D,$09,$02
	db $FF,$FF,$FF,$FF,$36,$09,$02,$38,$FF,$FF,$FF,$FF,$FF,$FF,$03,$14
	db $15,$1C,$1D,$1E,$0D,$09,$02,$0A,$0E,$1A,$1B,$1C,$1D,$1E,$0D,$09

CODE_12AA77:
	REP.b #$30
	LDA.b $2C
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $28
	TAY
	LDA.b $15
	BNE.b CODE_12AA8D
	LDA.w DATA_12A897,y
	BRA.b CODE_12AA90

CODE_12AA8D:
	LDA.w DATA_12A8F7,y
CODE_12AA90:
	AND.w #$00FF
	CMP.w #$00FF
	BEQ.b CODE_12AAC4
	CMP.w #$002A
	BCS.b CODE_12AAA3
	CLC
	ADC.w #$9D65
	BRA.b CODE_12AABE

CODE_12AAA3:
	CMP.w #$0035
	BCS.b CODE_12AAB6
	SEC
	SBC.w #$002A
	ASL
	TAY
	LDX.w DATA_12A881,y
	LDA.w $0000,x
	BRA.b CODE_12AABE

CODE_12AAB6:
	SEC
	SBC.w #$0035
	CLC
	ADC.w #$A55A
CODE_12AABE:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AAC4:
	SEP.b #$30
	RTL

DATA_12AAC7:
	dw $0000,$A55E,$A561,$A562

DATA_12AACF:
	dw $0000,$A55F,$A563,$A564

DATA_12AAD7:
	dw $0000,$A560,$A565,$A566

DATA_12AADF:
	dw DATA_12AAC7,DATA_12AACF,DATA_12AAD7

CODE_12AAE5:
	REP.b #$30
	LDX.b $15
	LDA.w DATA_12AADF,x
	STA.b $00
	LDA.b $2C
	ASL
	ORA.b $28
	ASL
	TAY
	LDA.b ($00),y
	BEQ.b CODE_12AAFF
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AAFF:
	SEP.b #$30
	RTL

CODE_12AB02:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_12AB17
	INC
	CMP.b $2A
	BEQ.b CODE_12AB12
	LDA.w #$0000
	BRA.b CODE_12AB20

CODE_12AB12:
	LDA.w #$9D9B
	BRA.b CODE_12AB1A

CODE_12AB17:
	LDA.w #$9D9A
CODE_12AB1A:
	CLC
	ADC.b $2C
	CLC
	ADC.b $2C
CODE_12AB20:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12AB29:
	db $CA,$CB,$CF,$D0,$CC,$CD,$CD,$CE,$CD,$CD,$CD,$CD,$CD,$CD,$CD,$CD

CODE_12AB39:
	REP.b #$30
	LDA.b $2C
	ASL
	ASL
	ADC.b $28
	TAY
	LDA.w DATA_12AB29,y
	AND.w #$00FF
	CLC
	ADC.w #$9600
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12AB55:
	RTL

DATA_12AB56:
	dw $015D,$015E,$015F,$0160,$015C

DATA_12AB60:
	dw $015A,$015B

CODE_12AB64:
	REP.b #$30
	LDX.b $1D
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_12AB76
	INC
	CMP.b $2A
	BNE.b CODE_12AB82
	INY
	INY
CODE_12AB76:
	LDA.b $12
	CMP.w DATA_12AB60,y
	BNE.b CODE_12AB96
	LDY.w #$0008
	BRA.b CODE_12AB8F

CODE_12AB82:
	LDA.b $28
	DEC
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ORA.b $00
	TAY
CODE_12AB8F:
	LDA.w DATA_12AB56,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AB96:
	SEP.b #$30
	RTL

DATA_12AB99:
	dw $00BD,$00BC

CODE_12AB9D:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	BNE.b CODE_12ABAA
	LDA.w #$00BB
	BRA.b CODE_12ABB2

CODE_12ABAA:
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_12AB99,y
CODE_12ABB2:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12ABB9:
	dw $1C44,$1C4A,$1C4C,$1C4E,$1C50,$1C54,$1C56,$1C58
	dw $1C5A,$1DD8,$1DD8,$1D88,$1D88,$1DDA,$1DDC,$1DDE
	dw $1DE0,$1DE2,$1DE4,$1DE6

CODE_12ABE1:
	REP.b #$30
	LDX.b $1D
	LDA.b $15
	ASL
	TAY
	LDA.w DATA_12ABB9,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12ABF7:
	dw $5F00,$5F01,$5F03,$5F03

CODE_12ABFF:
	REP.b #$30
	JSL.l CODE_128875
	AND.w #$0003
	ASL
	TAX
	LDA.l DATA_12ABF7,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12AC17:
	REP.b #$30
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ASL
	ORA.b $00
	TAY
	BEQ.b CODE_12AC36
	CPY.w #$0006
	BEQ.b CODE_12AC36
	LDX.b $1D
	LDA.w DATA_12AC39,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AC36:
	SEP.b #$30
	RTL

DATA_12AC39:
	dw $0000,$3D18,$3D19,$0000,$3D1A,$3D1B,$3D1C,$3D1D
	dw $3D1E,$3D26,$3D27,$3D21,$3D22,$6300,$3D28,$3D25

CODE_12AC59:
	REP.b #$30
	LDA.b $28
	ASL
	TAX
	JSR.w (DATA_12AC6B,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12AC6B:
	dw CODE_12AC73
	dw CODE_12AC73
	dw CODE_12AC97
	dw CODE_12AC97

CODE_12AC73:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_12AC7F
	LDA.w #$00DE
	BRA.b CODE_12AC96

CODE_12AC7F:
	LDA.b $28
	BEQ.b CODE_12AC94
	LDA.b $2C
	CMP.w #$0010
	BCS.b CODE_12AC94
	AND.w #$0001
	BEQ.b CODE_12AC94
	LDA.w #$00E5
	BRA.b CODE_12AC96

CODE_12AC94:
	LDA.b $12
CODE_12AC96:
	RTS

CODE_12AC97:
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_12ACA7
	INY
	INY
	INC
	CMP.b $2E
	BNE.b CODE_12ACA7
	INY
	INY
CODE_12ACA7:
	LDA.b $28
	AND.w #$0001
	STA.b $00
	LDA.w DATA_12ACB5,y
	CLC
	ADC.b $00
	RTS

DATA_12ACB5:
	dw $00DF,$00E1,$00E3

CODE_12ACBB:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_12ACCD,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12ACCD:
	dw $3D4D,$3D4E,$3D4F

CODE_12ACD3:
	LDX.b $1D
	LDA.w #$3D4C
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12ACE7:
	CMP.w #$3D3B
	BEQ.b CODE_12ACF7
	CMP.w #$3D49
	BEQ.b CODE_12ACF7
	CMP.w #$3D4A
	BNE.b CODE_12ACFF
CODE_12ACF7:
	NOP
	LDA.w #$3D3C
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12ACFF:
	RTL

CODE_12AD00:
	LDX.b $1D
	LDA.w #$3D41
CODE_12AD05:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$3D3B
	BEQ.b CODE_12AD24
	CMP.w #$3D3C
	BEQ.b CODE_12AD24
	CMP.w #$3D49
	BNE.b CODE_12AD2C
CODE_12AD24:
	NOP
	LDA.w #$3D4A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AD2C:
	RTL

CODE_12AD2D:
	LDA.w $1D1A
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12AD37:
	dw $0080,$0081,$014B,$014C

CODE_12AD3F:
	REP.b #$30
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ORA.b $00
	TAY
	LDX.b $1D
	LDA.w DATA_12AD37,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12AD59:
	dw $0082,$014D

CODE_12AD5D:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_12AD59,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12AD6F:
	LDX.b $1D
	LDA.w #$014A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12AD79:
	dw $000C,$000D

DATA_12AD7D:
	dw $0013,$0014,$1DC6,$1DC8,$0000,$0000,$000E,$000F
	dw $0011,$0012,$1DCA,$1DCC

DATA_12AD95:
	dw $0025,$0026,$0033,$0034

DATA_12AD9D:
	dw $000C,$000D,$008E,$008F,$0013,$0014

CODE_12ADA9:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ORA.b $00
	ORA.b $15
	TAY
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_12ADD2
	CMP.w $1C5E
	BEQ.b CODE_12ADD2
	CMP.w $1DB4
	BEQ.b CODE_12ADD2
	CMP.w $1DB6
	BNE.b CODE_12ADDB
CODE_12ADD2:
	LDA.w DATA_12AD7D,y
	TAY
	LDA.w $0000,y
	BRA.b CODE_12ADDE

CODE_12ADDB:
	LDA.w DATA_12AD79,y
CODE_12ADDE:
	STA.b $00
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	STA.b $08
endif
	LDY.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CPY.w #$0004
	BNE.b CODE_12ADF7
	LDY.b $2C
	BNE.b CODE_12ADF7
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDY.b $2C
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAX
	LDA.b $08
	TXY
	BEQ.b CODE_12ADF7
endif
	SEC
	SBC.w #$000C
	ASL
	TAY
	LDA.w DATA_12AD95,y
	BRA.b CODE_12AE19

CODE_12ADF7:
	CPY.w #$000C
	BNE.b CODE_12AE19
	LDA.b $2C
	ASL
	ORA.b $28
	ASL
	TAY
	CPY.w #$0004
	BCC.b CODE_12AE16
	LDA.b $12
	AND.w #$FF00
	CMP.w #$8500
	BEQ.b CODE_12AE16
	INY
	INY
	INY
	INY
CODE_12AE16:
	LDA.w DATA_12AD9D,y
CODE_12AE19:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12AE22:
	LDX.b $1D
	LDA.w #$0183
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AE2B:
	RTL

DATA_12AE2C:
	dw $3D63,$3D64,$3D65,$0000,$3D66,$3D67,$3D68,$015C

CODE_12AE3C:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_12AE4C
	INC
	CMP.b $2A
	BNE.b CODE_12AE58
	INY
	INY
CODE_12AE4C:
	LDA.b $12
	CMP.w DATA_12AB60,y
	BNE.b CODE_12AE6F
	LDY.w #$000E
	BRA.b CODE_12AE66

CODE_12AE58:
	LDA.b $2C
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $28
	DEC
	ASL
	ORA.b $00
	TAY
CODE_12AE66:
	LDX.b $1D
	LDA.w DATA_12AE2C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AE6F:
	SEP.b #$30
	RTL

DATA_12AE72:
	dw $3D63,$3D6C,$3D65,$0000,$3D69,$3D6A,$3D6B,$0000
	dw $8000,$010E,$010F

CODE_12AE88:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_12AE98
	INC
	CMP.b $2A
	BNE.b CODE_12AEA8
	INY
	INY
CODE_12AE98:
	LDA.b $2C
	CMP.w #$0002
	BEQ.b CODE_12AECB
	LDA.b $12
	CMP.w DATA_12AB60,y
	BNE.b CODE_12AECB
	BRA.b CODE_12AEC2

CODE_12AEA8:
	LDA.b $2C
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $28
	DEC
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_12AE72,y
	BPL.b CODE_12AEC5
	LDA.b $12
	CMP.w #$015A
	BNE.b CODE_12AEC5
CODE_12AEC2:
	LDA.w #$015C
CODE_12AEC5:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AECB:
	SEP.b #$30
	RTL

DATA_12AECE:
	dw $0000,$0000,$3DA1,$3D79,$3D77,$3DA2,$3D7A,$3DA0
	dw $0000

DATA_12AEE0:
	dw $3DA4,$0000,$0000,$3DA3,$3D78,$3D7C,$0000,$3D9F
	dw $3D7B

DATA_12AEF2:
	dw DATA_12AECE,DATA_12AEE0

CODE_12AEF6:
	REP.b #$30
	LDX.b $15
	LDA.b $2C
	ASL
	ADC.b $2C
	ASL
	ADC.w DATA_12AEF2,x
	STA.b $00
	JMP.w CODE_12AFCE

DATA_12AF08:
	dw $3D8F,$3D90,$3D91,$3D92,$0000,$3D93,$3D94,$3D95
	dw $3D96,$3D7C,$0000,$3D8C,$3D8D,$3D8E,$3D7B

DATA_12AF26:
	dw $0000,$3D81,$3D82,$3D83,$3D84,$3D79,$3D85,$3D86
	dw $3D87,$3D88,$3D7A,$3D89,$3D8A,$3D8B

DATA_12AF42:
	dw $0000

DATA_12AF44:
	dw DATA_12AF08,DATA_12AF26

CODE_12AF48:
	REP.b #$30
	LDX.b $15
	LDA.b $2C
	ASL
	ASL
	ADC.b $2C
	ASL
	ADC.w DATA_12AF44,x
	STA.b $00
	BRA.b CODE_12AFCE

DATA_12AF5A:
	dw $0000,$3D80,$3DA6,$0000,$3D7F,$0000

DATA_12AF66:
	dw $0000,$3D79,$3D73,$0000,$3D7A,$3DA0

DATA_12AF72:
	dw $3D9D,$3D9E,$0000,$3D9B,$3D9C,$3D72

DATA_12AF7E:
	dw DATA_12AF5A,DATA_12AF66,DATA_12AF72

CODE_12AF84:
	REP.b #$30
	LDX.b $15
	LDA.b $2C
	ASL
	ADC.b $2C
	ASL
	ADC.w DATA_12AF7E,x
	STA.b $00
	BRA.b CODE_12AFCE

DATA_12AF95:
	dw $3DA5,$3D7D,$0000,$0000,$3D7E,$0000

DATA_12AFA1:
	dw $3D74,$3D7C,$0000,$3D9F,$3D7B,$0000

DATA_12AFAD:
	dw $0000,$3D97,$3D98,$3D71,$3D99,$3D9A

DATA_12AFB9:
	dw DATA_12AF95,DATA_12AFA1,DATA_12AFAD

CODE_12AFBF:
	REP.b #$30
	LDX.b $15
	LDA.b $2C
	ASL
	ADC.b $2C
	ASL
	ADC.w DATA_12AFB9,X
	STA.b $00
CODE_12AFCE:
	LDA.b $28
	ASL
	TAY
	LDA.b ($00),y
	BEQ.b CODE_12AFFE
	TAY
	CMP.w #$3D9F
	BEQ.b CODE_12AFED
	CMP.w #$3DA0
	BNE.b CODE_12AFF8
	LDA.b $12
	CMP.w #$3D71
	BNE.b CODE_12AFF7
	LDA.w #$3DA8
	BRA.b CODE_12AFF8

CODE_12AFED:
	LDA.b $12
	CMP.w #$3D72
	BNE.b CODE_12AFF7
	LDY.w #$3DA9
CODE_12AFF7:
	TYA
CODE_12AFF8:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12AFFE:
	SEP.b #$30
	RTL

CODE_12B001:
	LDX.b $1D
	LDA.w #$7502
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12B00B:
	dw $01A7

DATA_12B00D:
	dw $01A8

DATA_12B00F:
	dw $01A9

DATA_12B011:
	dw $01AA

DATA_12B013:
	dw $01AB

DATA_12B015:
	dw $01AC

DATA_12B017:
	dw $01AD

DATA_12B019:
	dw $01AE

DATA_12B01B:
	dw $01AF

DATA_12B01D:
	dw $01B0

DATA_12B01F:
	dw $01B1

DATA_12B021:
	dw $01B2

DATA_12B023:
	dw $01B3

DATA_12B025:
	dw $01B4

DATA_12B027:
	dw $01B5

DATA_12B029:
	dw $01B6

DATA_12B02B:
	dw $19DC
	dw $1A44
	dw $1A52
	dw $0000
	dw $19E6
	dw DATA_12B00D
	dw DATA_12B01D
	dw $1A1A

DATA_12B03B:
	dw $0000
	dw $1A04
	dw $1A44
	dw $1A52
	dw $0000
	dw $19DC
	dw DATA_12B01F
	dw DATA_12B021
	dw DATA_12B023
	dw $19F0
	dw $19E6
	dw DATA_12B025
	dw DATA_12B027
	dw DATA_12B029
	dw $19FA

DATA_12B059:
	dw $19DC
	dw DATA_12B00B
	dw $1A18
	dw $19E6
	dw DATA_12B00D
	dw DATA_12B00F

DATA_12B065:
	dw $19DC
	dw DATA_12B00B
	dw $19F0
	dw $19E6
	dw DATA_12B00D
	dw $19F8

DATA_12B071:
	dw $0000
	dw $19DC
	dw $1A44
	dw $1A52
	dw $0000
	dw $0000
	dw $19E4
	dw DATA_12B011
	dw DATA_12B013
	dw $0000
	dw $19DC
	dw DATA_12B01F
	dw DATA_12B021
	dw DATA_12B015
	dw $19F0
	dw $19E6
	dw DATA_12B025
	dw DATA_12B027
	dw DATA_12B017
	dw $19FA

DATA_12B099:
	dw $0000
	dw $19DC
	dw DATA_12B00B
	dw $1A18
	dw $0000
	dw $0000
	dw $19E4
	dw DATA_12B011
	dw DATA_12B013
	dw $0000
	dw $19DC
	dw DATA_12B01F
	dw DATA_12B021
	dw DATA_12B015
	dw $19F0
	dw $19E6
	dw DATA_12B025
	dw DATA_12B027
	dw DATA_12B017
	dw $19FA

DATA_12B0C1:
	dw $0000
	dw $1A04
	dw $1A18
	dw $0000
	dw $19DC
	dw DATA_12B01F
	dw DATA_12B023
	dw $19F0
	dw $19E6
	dw DATA_12B019
	dw DATA_12B029
	dw $19FA

DATA_12B0D9:
	dw $19DC
	dw $1A18
	dw $19E6
	dw DATA_12B00F

DATA_12B0E1:
	dw DATA_12B02B,DATA_12B03B,DATA_12B059,DATA_12B065,DATA_12B071,DATA_12B099,DATA_12B0C1,DATA_12B0D9

DATA_12B0F1:
	dw $0008,$000A,$0006,$0006,$000A,$000A,$0008,$0004

CODE_12B101:
	REP.b #$30
	LDY.b $2C
	LDX.b $15
	LDA.w DATA_12B0E1,x
CODE_12B10A:
	DEY
	BMI.b CODE_12B113
	CLC
	ADC.w DATA_12B0F1,x
	BRA.b CODE_12B10A

CODE_12B113:
	STA.b $00
	LDA.b $28
	ASL
	TAY
	LDX.b $1D
	LDA.b ($00),y
	BEQ.b CODE_12B127
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12B127:
	SEP.b #$30
	RTL

DATA_12B12A:
	dw $3DBD

DATA_12B12C:
	dw $3DC0

DATA_12B12E:
	dw $1A06,$1A1E,$1A2C,$1A56,DATA_12B12A,DATA_12B12C

DATA_12B13A:
	dw $3DCC

DATA_12B13C:
	dw $3DCD

DATA_12B13E:
	dw $1A08,$1A1C,$1A2E,$1A54,DATA_12B13A,DATA_12B13C

CODE_12B14A:
	REP.b #$30
	LDY.w #$0000
CODE_12B14F:
	LDA.w DATA_12B12E,y
	PHY
	TAY
	LDA.w $0000,y
	PLY
	CMP.b $12
	BEQ.b CODE_12B165
	INY
	INY
	CPY.w #$0010
	BCC.b CODE_12B14F
	BRA.b CODE_12B172

CODE_12B165:
	LDX.b $1D
	LDA.w DATA_12B13E,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12B172:
	SEP.b #$30
	RTL

DATA_12B175:
	dw $775E,$775F

CODE_12B179:
	REP.b #$30
	LDX.b $1D
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_12B175,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12B18E:
	dw CODE_12B1BF
	dw CODE_12B1DB
	dw CODE_12B203

CODE_12B194:
	REP.b #$30
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ASL
	ORA.b $00
	TAY
	LDX.b $15
	JSR.w (DATA_12B18E,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12B1B1:
	dw $776A,$776B,$776C,$0000,$01CB,$01D0,$01CF

CODE_12B1BF:
	LDA.w DATA_12B1B1,y
	RTS

DATA_12B1C3:
	dw $7760,$7761,$7763,$7764,$7765,$7766,$7768,$7769
	dw $01CB,$01CC,$01CE,$01CF

CODE_12B1DB:
	LDA.w DATA_12B1C3,y
	RTS

DATA_12B1DF:
	dw $7760,$7761,$7762,$7763,$7764,$7765,$7766,$7767
	dw $7768,$7769,$01CB,$01CC,$01CD,$01CE,$01CF

DATA_12B1FD:
	dw $0000,$000A,$0014

CODE_12B203:
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_12B1FD,y
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_12B1DF,y
	RTS

DATA_12B212:
	dw $7D14,$7D18,$7D0C,$7D10

CODE_12B21A:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	LDA.b $2C
	ASL
	ORA.b $28
	CLC
	ADC.w DATA_12B212,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12B230:
	dw $791E,$0A2F,$77BB,$77BA,$082D,$791D

CODE_12B23C:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDA.w DATA_12B230,y
CODE_12B245:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12B24E:
	dw $792E,$5D09,$77B9,$77CC,$5B0D,$792D

CODE_12B25A:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDA.w DATA_12B24E,y
	BRA.b CODE_12B245

DATA_12B265:
	dw $792D,$5B0C,$77C9,$77BA,$082D,$791D

CODE_12B271:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_12B265,y
	BRA.b CODE_12B245

DATA_12B27C:
	dw $792E,$5D09,$77B9,$77CA,$0A2E,$791E

CODE_12B288:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_12B27C,y
	BRA.b CODE_12B245

DATA_12B293:
	dw $7917,$77B1,$77B4,$7927,$7918,$0000,$0000,$7928

CODE_12B2A3:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B293,y
CODE_12B2B2:
	BEQ.b CODE_12B2B8
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12B2B8:
	SEP.b #$30
	RTL

DATA_12B2BB:
	dw $7919,$0000,$0000,$7929,$791A,$77B5,$77B8,$792A

CODE_12B2CB:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B2BB,y
	BRA.b CODE_12B2B2

DATA_12B2DC:
	dw $7917,$77B1,$77B2,$77B3,$77B4,$7927,$0000,$0000
	dw $7918,$0000,$0000,$0000,$0000,$7928

CODE_12B2F8:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ASL
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B2DC,y
	BRA.b CODE_12B2B2

DATA_12B30A:
	dw $7919,$0000,$0000,$0000,$0000,$7929,$0000,$0000
	dw $791A,$77B5,$77B6,$77B7,$77B8,$792A

CODE_12B326:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ASL
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B30A,y
	JMP.w CODE_12B2B2

DATA_12B339:
	dw $7911,$7921,$77A1,$0000,$77A4,$0000,$7912,$7922

CODE_12B349:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B339,y
	JMP.w CODE_12B2B2

DATA_12B35A:
	dw $7913,$7923,$0000,$77A5,$0000,$77A8,$7914,$7924

CODE_12B36A:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B35A,y
	JMP.w CODE_12B2B2

DATA_12B37B:
	dw $7911,$7921,$77A1,$0000,$77A2,$0000,$77A3,$0000
	dw $77A4,$0000,$7912,$7922

CODE_12B393:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B37B,y
	JMP.w CODE_12B2B2

DATA_12B3A4:
	dw $7913,$7923,$0000,$77A5,$0000,$77A6,$0000,$77A7
	dw $0000,$77A8,$7914,$7924

CODE_12B3BC:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	ORA.b $2C
	ASL
	TAY
	LDA.w DATA_12B3A4,y
	JMP.w CODE_12B2B2

DATA_12B3CD:
	dw $77C6,$77C7

CODE_12B3D1:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDA.w DATA_12B3CD,y
	JMP.w CODE_12B245

DATA_12B3DD:
	dw $77BB,$77CC

CODE_12B3E1:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	LDA.w DATA_12B3DD,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12B3F1:
	LDX.b $1D
	LDA.w #$0010
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

CODE_12B3FB:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	CLC
	ADC.w #$6F00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12B40C:
	dw $8400,$8401,$8402,$8403,$8401,$8402,$8404,$8405
	dw $840C,$840D,$840E,$840F,$840E,$840D,$8411,$8412
	dw $8406,$8407,$8406,$8407,$8406,$8407,$8406,$8407
	dw $8408,$8409,$840A,$840B,$8408,$8409,$840A,$840B
	dw $840A,$840B,$840A,$840B,$8408,$8409,$8408,$8409

CODE_12B45C:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_12B40C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12B478:
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$03,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$05,$06,$07,$08,$09
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$13,$14,$21,$21,$21,$21,$19
	db $1A,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$20,$14,$21,$21,$21,$21,$21,$21
	db $19,$27,$00,$04,$05,$08,$09,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$13,$01,$1A,$2D,$21,$21,$21,$A6,$A5,$21,$21
	db $21,$32,$13,$14,$21,$21,$19,$27,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$04,$05,$14,$21,$21,$21,$21,$DD,$DF,$DA,$D8,$E1,$E3
	db $21,$19,$14,$21,$21,$21,$21,$32,$04,$05,$01,$08,$09,$00,$00,$00
	db $00,$00,$13,$14,$A4,$21,$21,$21,$21,$D1,$21,$21,$21,$21,$21,$21
	db $D3,$21,$21,$21,$21,$21,$21,$19,$14,$21,$21,$21,$19,$27,$00,$00
	db $00,$20,$DC,$DF,$D8,$E1,$E3,$DD,$DF,$21,$21,$21,$21,$21,$21,$21
	db $21,$E1,$E3,$A6,$A4,$DD,$DF,$E1,$E3,$A6,$A5,$21,$21,$32,$00,$00
	db $00,$D0,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21
	db $21,$21,$21,$DA,$DB,$21,$21,$21,$21,$D8,$DA,$E1,$E3,$19,$1A,$00
	db $38,$39,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21
	db $21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$DA,$D4,$43
	db $48,$49,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21
	db $21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$52,$53
	db $57,$58,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21
	db $21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$61,$62
	db $00,$68,$69,$6A,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21
	db $21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$6F,$70,$71,$00
	db $00,$77,$78,$46,$7A,$7B,$4A,$21,$21,$21,$21,$21,$21,$21,$21,$21
	db $21,$21,$21,$4D,$5F,$21,$21,$21,$21,$21,$6F,$7D,$6C,$8F,$80,$00
	db $00,$00,$95,$96,$78,$76,$3B,$6A,$6F,$7B,$4A,$21,$21,$21,$21,$21
	db $21,$21,$21,$4C,$60,$21,$21,$21,$21,$4E,$26,$6C,$51,$64,$00,$00
	db $00,$00,$00,$00,$63,$88,$79,$25,$26,$81,$60,$21,$21,$21,$21,$21
	db $21,$21,$4E,$36,$5C,$7A,$7B,$7C,$7D,$26,$6C,$51,$8C,$80,$00,$00
	db $00,$00,$00,$00,$77,$17,$6D,$88,$89,$7F,$73,$5E,$21,$21,$21,$21
	db $6F,$7D,$26,$72,$55,$79,$6C,$6C,$6C,$7E,$83,$99,$9A,$00,$00,$00
	db $00,$00,$00,$00,$00,$95,$96,$94,$99,$9A,$68,$76,$7A,$7B,$7C,$7D
	db $26,$6C,$7E,$71,$67,$6D,$88,$89,$8B,$6E,$64,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$77,$78,$79,$5A,$5A,$5A
	db $7E,$3C,$8C,$80,$77,$17,$6B,$6B,$6B,$18,$80,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$86,$87,$88,$89,$8B
	db $6E,$18,$8D,$00,$00,$95,$96,$94,$99,$9A,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$95,$96,$97,$98
	db $99,$9A,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$41
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

DATA_12B738:
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$03,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$05,$06,$07,$08
	db $09,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$03,$00,$20,$14,$21
	db $A6,$A5,$21,$19,$27,$00,$9C,$00,$00,$00,$00,$9C,$13,$06,$07,$1A
	db $2D,$DD,$DF,$DA,$D8,$E1,$E3,$32,$13,$01,$1A,$00,$00,$13,$01,$DC
	db $E3,$DD,$E0,$D9,$21,$21,$21,$21,$21,$21,$D7,$DC,$E3,$52,$53,$48
	db $DE,$DF,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21,$21
	db $D5,$62,$00,$3E,$2C,$21,$21,$21,$21,$21,$21,$21,$21,$21,$4E,$5E
	db $4E,$7A,$7D,$90,$1C,$00,$57,$58,$21,$21,$21,$4B,$70,$69,$7D,$7A
	db $7D,$51,$88,$7F,$82,$8B,$8C,$80,$00,$00,$68,$69,$7D,$7A,$45,$7F
	db $78,$8B,$88,$8B,$8C,$99,$9A,$86,$94,$8D,$00,$00,$00,$77,$78,$89
	db $8B,$8C,$8D,$86,$97,$98,$99,$9A,$00,$00,$00,$9B,$00,$00,$00,$00
	db $00,$95,$96,$99,$9A,$00,$00,$40,$41,$00,$00,$00,$00,$00,$00,$00
	db $00

DATA_12B809:
	db $00,$00,$00,$00,$9C,$9C,$00,$00,$00,$00,$00,$00,$02,$13,$01,$A2
	db $1A,$9C,$00,$00,$00,$13,$06,$DC,$DF,$D8,$D7,$01,$1A,$00,$48,$D2
	db $D8,$21,$21,$21,$21,$E1,$E5,$53,$00,$3E,$74,$21,$21,$4B,$7B,$24
	db $91,$1C,$00,$00,$3E,$74,$7B,$24,$34,$17,$18,$80,$00,$00,$00,$95
	db $93,$99,$9A,$95,$9A,$00

DATA_12B84F:
	db $00,$00,$00,$00,$00,$9C,$00,$00,$00,$00,$02,$03,$13,$01,$1A,$00
	db $00,$13,$06,$A1,$14,$21,$52,$53,$48,$DE,$DF,$D8,$D8,$E1,$E7,$62
	db $00,$3E,$84,$21,$6F,$7D,$90,$1C,$00,$00,$3E,$92,$10,$8B,$8C,$80
	db $00,$00,$00,$95,$96,$99,$9A,$00

DATA_12B887:
	db $00,$00,$00,$00,$00,$9C,$00,$00,$9C,$00,$00,$00,$00,$00,$00,$02
	db $03,$13,$01,$1A,$13,$01,$1A,$00,$00,$00,$00,$13,$06,$07,$DC,$DF
	db $D3,$DC,$E3,$19,$1A,$2A,$1E,$48,$D2,$D8,$DA,$21,$21,$21,$21,$21
	db $D8,$E2,$E6,$2B,$00,$3E,$84,$21,$21,$4E,$7A,$6A,$6F,$7D,$22,$90
	db $D6,$00,$00,$3E,$74,$7D,$45,$7F,$82,$89,$8B,$8C,$17,$56,$00,$00
	db $00,$95,$93,$0B,$9A,$86,$97,$98,$8D,$95,$9A,$00,$00,$00,$00,$00
	db $00,$00,$00,$40,$41,$00,$00,$00

DATA_12B8EF:
	dw DATA_12B478,DATA_12B738,DATA_12B809,DATA_12B84F,DATA_12B887

DATA_12B8F9:
	dw $0020,$0013,$000A,$0008,$000D

DATA_12B903:
	dw $1A02,$1A04,$1A06,$1A16,$1A18,$1A1A,$1A1C,$1A1E
	dw $1C7A,$1C7C,$1C7E,$1C80,$1A2A,$1A2C,$1A2E,$1A34
	dw $1A36,$1A42,$1A44,$1A50,$1A52,$1A54,$1A56,$1A58

CODE_12B933:
	REP.b #$30
	LDY.b $15
	LDA.w DATA_12B8EF,y
	LDX.b $2C
CODE_12B93C:
	DEX
	BMI.b CODE_12B945
	CLC
	ADC.w DATA_12B8F9,y
	BRA.b CODE_12B93C

CODE_12B945:
	CLC
	ADC.b $28
	STA.b $00
	LDA.b ($00)
	AND.w #$00FF
	BEQ.b CODE_12B970
	CMP.w #$00D0
	BCC.b CODE_12B965
	SEC
	SBC.w #$00D0
	ASL
	TAY
	LDA.w DATA_12B903,y
	TAY
	LDA.w $0000,y
	BRA.b CODE_12B96A

CODE_12B965:
	DEC
	CLC
	ADC.w #$8414
CODE_12B96A:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12B970:
	SEP.b #$30
	RTL

DATA_12B973:
	dw CODE_12B9E0
	dw CODE_12BA36
	dw CODE_12BA74
	dw CODE_12BAB2

CODE_12B97B:
	REP.b #$30
	STZ.b $04
	LDA.b $12
	AND.w #$FF00
	CMP.w #$8500
	BNE.b CODE_12B995
	LDA.b $12
	SEC
	SBC.w #$854B
	STA.b $02
	INC.b $04
	BRA.b CODE_12B9A0

CODE_12B995:
	LDA.b $12
	SEC
	SBC.w #$7799
	AND.w #$00FE
	STA.b $02
CODE_12B9A0:
	LDA.b $28
	ASL
	TAY
	LDA.b $2C
	ASL
	TAX
	JSR.w (DATA_12B973,x)
	LDA.b $00
	BEQ.b CODE_12B9B5
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12B9B5:
	SEP.b #$30
	RTL

DATA_12B9B8:
	dw $0000,$8500,$8503,$0000

DATA_12B9C0:
	dw $0000,$857A,$857E,$0000

DATA_12B9C8:
	dw $0002,$0001,$0000,$0002,$0000,$0000,$0000,$0000
	dw $0000,$0001,$0000,$0000

CODE_12B9E0:
	LDA.b $04
	BEQ.b CODE_12B9EE
	LDA.w DATA_12B9C0,y
	BEQ.b CODE_12BA0B
	CLC
	ADC.b $02
	BRA.b CODE_12BA0B

CODE_12B9EE:
	LDA.w DATA_12B9B8,y
	STA.b $00
	BEQ.b CODE_12BA0D
	LDA.b $12
	AND.w #$FF00
	CMP.w #$7900
	BNE.b CODE_12BA03
	STZ.b $00
	BRA.b CODE_12BA0D

CODE_12BA03:
	LDY.b $02
	LDA.b $00
	CLC
	ADC.w DATA_12B9C8,y
CODE_12BA0B:
	STA.b $00
CODE_12BA0D:
	RTS

DATA_12BA0E:
	dw $8506,$77EC,$77ED,$850A

DATA_12BA16:
	dw $8582,$77EC,$77ED,$8586

DATA_12BA1E:
	dw $0002,$0001,$0000,$0002,$0000,$0000,$0000,$0000
	dw $0003,$0001,$0000,$0003

CODE_12BA36:
	LDA.b $04
	BEQ.b CODE_12BA4C
	LDA.w DATA_12BA16,y
	CPY.w #$0002
	BEQ.b CODE_12BA61
	CPY.w #$0004
	BEQ.b CODE_12BA61
	CLC
	ADC.b $02
	BRA.b CODE_12BA61

CODE_12BA4C:
	LDA.w DATA_12BA0E,y
	STA.b $00
	TYA
	BEQ.b CODE_12BA59
	CMP.w #$0006
	BNE.b CODE_12BA63
CODE_12BA59:
	LDY.b $02
	LDA.b $00
	CLC
	ADC.w DATA_12BA1E,y
CODE_12BA61:
	STA.b $00
CODE_12BA63:
	RTS

DATA_12BA64:
	dw $850E,$1800,$77EE,$8512

DATA_12BA6C:
	dw $858A,$1800,$77EE,$858E

CODE_12BA74:
	LDA.b $04
	BEQ.b CODE_12BA8A
	LDA.w DATA_12BA6C,y
	CPY.w #$0002
	BEQ.b CODE_12BA9F
	CPY.w #$0004
	BEQ.b CODE_12BA9F
	CLC
	ADC.b $02
	BRA.b CODE_12BA9F

CODE_12BA8A:
	LDA.w DATA_12BA64,y
	STA.b $00
	TYA
	BEQ.b CODE_12BA97
	CMP.w #$0006
	BNE.b CODE_12BAA1
CODE_12BA97:
	LDY.b $02
	LDA.b $00
	CLC
	ADC.w DATA_12BA1E,y
CODE_12BA9F:
	STA.b $00
CODE_12BAA1:
	RTS

DATA_12BAA2:
	dw $0000,$8516,$8519,$0000

DATA_12BAAA:
	dw $0000,$8592,$8596,$0000

CODE_12BAB2:
	LDA.b $04
	BEQ.b CODE_12BAC0
	LDA.w DATA_12BAAA,y
	BEQ.b CODE_12BAE2
	CLC
	ADC.b $02
	BRA.b CODE_12BAE2

CODE_12BAC0:
	LDA.w DATA_12BAA2,y
	STA.b $00
	BEQ.b CODE_12BAE4
	LDA.b $12
	AND.w #$FF00
	CMP.w #$1500
	BEQ.b CODE_12BAD6
	CMP.w #$7900
	BNE.b CODE_12BADA
CODE_12BAD6:
	STZ.b $00
	BRA.b CODE_12BAE4

CODE_12BADA:
	LDY.b $02
	LDA.b $00
	CLC
	ADC.w DATA_12B9C8,y
CODE_12BAE2:
	STA.b $00
CODE_12BAE4:
	RTS

DATA_12BAE5:
	dw $851B,$8523

DATA_12BAE9:
	dw $8521,$8529

CODE_12BAED:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	LDA.b $12
	SEC
	SBC.w #$77A9
	AND.w #$000E
	STA.b $00
	CLC
	ADC.w DATA_12BAE5,y
	CLC
	ADC.b $28
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $00
	BNE.b CODE_12BB1F
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w DATA_12BAE9,y
	CLC
	ADC.b $28
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BB1F:
	SEP.b #$30
	RTL

DATA_12BB22:
	dw $852B,$8533

DATA_12BB26:
	dw $8531,$8539

CODE_12BB2A:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	LDA.b $12
	SEC
	SBC.w #$7799
	AND.w #$000E
	STA.b $00
	CLC
	ADC.w DATA_12BB22,y
	CLC
	ADC.b $2C
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $00
	BNE.b CODE_12BB5C
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.w DATA_12BB26,y
	CLC
	ADC.b $2C
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BB5C:
	SEP.b #$30
	RTL

DATA_12BB5F:
	dw CODE_12BB82
	dw CODE_12BBC0

CODE_12BB63:
	REP.b #$30
	LDX.b $1D
	LDA.b $12
	SEC
	SBC.w $1CD0
	AND.w #$0001
	TAY
	CLC
	ADC.w $1D0E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	TYA
	ASL
	TAX
	JSR.w (DATA_12BB5F,x)
	SEP.b #$30
	RTL

CODE_12BB82:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w $1C66
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287A1
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	AND.w #$70F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_12BBC0:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w $1C60
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	AND.w #$70F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_12BC01:
	REP.b #$30
	LDX.b $1D
	LDA.w #$8710
	CLC
	ADC.b $15
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12BC12:
	dw $1514,$0018

DATA_12BC16:
	dw $1716,$1900

DATA_12BC1A:
	dw $001E,$1B1A

DATA_12BC1E:
	dw $1F00,$1D1C

DATA_12BC22:
	dw DATA_12BC12,DATA_12BC16,DATA_12BC1A,DATA_12BC1E

CODE_12BC2A:
	REP.b #$30
	LDY.b $15
	LDA.w DATA_12BC22,y
	STA.b $00
	LDA.b $2C
	ASL
	ADC.b $28
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	BEQ.b CODE_12BC4A
	CLC
	ADC.w #$8700
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BC4A:
	SEP.b #$30
	RTL

DATA_12BC4D:
	dw $0000,$0000,$2120,$2322,$0000,$2524,$0026,$0000
	dw $2700,$0028,$0000,$0000,$2900,$0000,$0000,$0000
	dw $2B2A,$0000,$0000,$0000,$002C,$0000,$0000,$0000
	dw $002D,$0000,$0000,$0000,$002E,$0000,$0000,$0000

DATA_12BC8D:
	dw $4C4B,$4E4D,$0000,$0000,$0000,$4800,$4A49,$0000
	dw $0000,$0000,$4600,$0047,$0000,$0000,$0000,$0045
	dw $0000,$0000,$0000,$4443,$0000,$0000,$0000,$4200
	dw $0000,$0000,$0000,$4100,$0000,$0000,$0000,$4000

DATA_12BCCD:
	dw $003E,$0000,$0000,$0000,$003D,$0000,$0000,$0000
	dw $003C,$0000,$0000,$0000,$3B3A,$0000,$0000,$0000
	dw $3900,$0000,$0000,$0000,$3700,$0038,$0000,$0000
	dw $0000,$3534,$0036,$0000,$0000,$0000,$3130,$3332

DATA_12BD0D:
	dw $0000,$0000,$0000,$5000,$0000,$0000,$0000,$5100
	dw $0000,$0000,$0000,$5200,$0000,$0000,$0000,$5453
	dw $0000,$0000,$0000,$0055,$0000,$0000,$5600,$0057
	dw $0000,$5800,$5A59,$0000,$5C5B,$5E5D,$0000,$0000

DATA_12BD4D:
	dw DATA_12BC4D,DATA_12BC8D,DATA_12BCCD,DATA_12BD0D

CODE_12BD55:
	REP.b #$30
	LDY.b $15
	LDA.w DATA_12BD4D,y
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ASL
	ADC.b $28
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	BEQ.b CODE_12BD77
	CLC
	ADC.w #$8700
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BD77:
	SEP.b #$30
	RTL

DATA_12BD7A:
	dw $872F,$873F,$874F,$875F

DATA_12BD82:
	dw $0006,$0007,$0008,$0009

DATA_12BD8A:
	dw CODE_12BDB2
	dw CODE_12BDB7

CODE_12BD8E:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	LDA.w DATA_12BD7A,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	TYA
	LSR
	AND.w #$0002
	TAX
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_12BD8A,x)
	LDA.w DATA_12BD82,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12BDB2:
	JSL.l CODE_128719
	RTS

CODE_12BDB7:
	JSL.l CODE_1287A1
	RTS

DATA_12BDBC:
	dw $8562,$8566

CODE_12BDC0:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	LDA.b $12
	SEC
	SBC.w #$854B
	CLC
	ADC.w DATA_12BDBC,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.b $15
	LSR
	CLC
	ADC.w #$8104
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12BDEA:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7942
	BEQ.b CODE_12BE02
	CMP.w #$7943
	BNE.b CODE_12BE09
CODE_12BE02:
	INC
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BE09:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7944
	BEQ.b CODE_12BE29
	CMP.w #$7946
	BEQ.b CODE_12BE2A
	CMP.w #$794D
	BEQ.b CODE_12BE2A
	CMP.w #$794B
	BNE.b CODE_12BE31
CODE_12BE29:
	INC
CODE_12BE2A:
	INC
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BE31:
	LDA.b $2C
	ASL
	ORA.b $28
	ADC.w #$7970
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12BE42:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7948
	BEQ.b CODE_12BE5A
	CMP.w #$7949
	BNE.b CODE_12BE61
CODE_12BE5A:
	INC
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BE61:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7955
	BEQ.b CODE_12BE81
	CMP.w #$7957
	BEQ.b CODE_12BE82
	CMP.w #$795E
	BEQ.b CODE_12BE82
	CMP.w #$795C
	BNE.b CODE_12BE88
CODE_12BE81:
	INC
CODE_12BE82:
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BE88:
	LDA.b $2C
	ASL
	ORA.b $28
	ADC.w #$7974
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12BE99:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$793D
	BEQ.b CODE_12BEB1
	CMP.w #$793E
	BNE.b CODE_12BEB8
CODE_12BEB1:
	INC
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BEB8:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7962
	BEQ.b CODE_12BED8
	CMP.w #$7964
	BEQ.b CODE_12BED9
	CMP.w #$796B
	BEQ.b CODE_12BED9
	CMP.w #$7969
	BNE.b CODE_12BEE0
CODE_12BED8:
	INC
CODE_12BED9:
	INC
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BEE0:
	LDA.b $2C
	ASL
	ORA.b $28
	ADC.w #$7978
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12BEF1:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$794F
	BEQ.b CODE_12BF09
	CMP.w #$7950
	BNE.b CODE_12BF0F
CODE_12BF09:
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BF0F:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7963
	BEQ.b CODE_12BF2F
	CMP.w #$7965
	BEQ.b CODE_12BF30
	CMP.w #$796C
	BEQ.b CODE_12BF30
	CMP.w #$796A
	BNE.b CODE_12BF36
CODE_12BF2F:
	INC
CODE_12BF30:
	INC
	INC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12BF36:
	LDA.b $2C
	ASL
	ORA.b $28
	ADC.w #$797C
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12BF47:
	dw $000A,$8800

CODE_12BF4B:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_12BF47,y
	CLC
	ADC.b $28
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12BF60:
	dw $0000,$3DDE,$0000,$3DDF,$8B04,$3DE0,$8B0A,$8B0B
	dw $8B0C,$8B12,$8B13,$8B14,$0000,$6A24,$0000

DATA_12BF7E:
	dw $0000,$0000,$3DDE,$0000,$0000,$0000,$3DDF,$8B04
	dw $3DE0,$0000,$0000,$8B0A,$8B01,$8B0C,$0000,$3DE1
	dw $8B07,$8B08,$8B09,$0000,$3DE2,$8B0E,$8B0F,$8B10
	dw $3DE3,$8B02,$8B0B,$8B15,$8B16,$8B0C,$8B12,$8B19
	dw $8B1A,$8B1B,$8B14,$0000,$0000,$3DE4,$0000,$0000
	dw $0000,$0000,$6A25,$0000,$0000

DATA_12BFD8:
	dw $0000,$0006,$000C,$0012,$0018

DATA_12BFE2:
	dw $0000,$000A,$0014,$001E,$0028,$0032,$003C,$0046
	dw $0050

CODE_12BFF4:
	REP.b #$30
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	TAX
	LDA.b $15
	BNE.b CODE_12C011
	LDA.w DATA_12BFD8,x
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_12BF60,y
	BEQ.b CODE_12C023
	BRA.b CODE_12C01D

CODE_12C011:
	LDA.w DATA_12BFE2,x
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_12BF7E,y
	BEQ.b CODE_12C023
CODE_12C01D:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12C023:
	SEP.b #$30
	RTL

DATA_12C026:
	dw $8E00,$8E01,$8E02,$8D95

DATA_12C02E:
	dw $8E01,$8E02,$8D95

DATA_12C034:
	dw $8E02,$8D95

DATA_12C038:
	dw $799E,$8D94

DATA_12C03C:
	dw DATA_12C026-$02,DATA_12C02E-$02,DATA_12C034-$02,DATA_12C038-$02

CODE_12C044:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_12C04F
	LDA.w #$799D
	BRA.b CODE_12C05A

CODE_12C04F:
	ASL
	TAY
	LDX.b $15
	LDA.w DATA_12C03C,x
	STA.b $00
	LDA.b ($00),y
CODE_12C05A:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12C063:
	LDX.b $1D
	LDA.w #$799C
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12C06D:
	dw $8D54,$8D55,$8D56,$8D57,$8D58,$8D59

DATA_12C079:
	dw $8D54,$8D55,$8D56,$8D5A,$8D58,$8D5B

DATA_12C085:
	dw $8D5C,$8D5D,$8D5E,$8D5F

DATA_12C08D:
	dw $8D5C,$8D5D,$8D60,$8D5F

DATA_12C095:
	dw $8D5C,$8D5D,$8D5E,$8D61

DATA_12C09D:
	dw $8D5C,$8D5D,$8D60,$8D61

DATA_12C0A5:
	dw DATA_12C06D,DATA_12C079,DATA_12C085,DATA_12C08D,DATA_12C095,DATA_12C09D

CODE_12C0B1:
	REP.b #$30
	LDY.b $15
	LDA.w DATA_12C0A5,y
	STA.b $00
	LDA.b $2C
	ASL
	ADC.b $28
	ASL
	TAY
	LDA.b ($00),y
	CLC
	ADC.b $A1
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12C0CF:
	LDX.b $1D
	LDA.w #$8D8E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.w #$8D8F
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12C0E8:
	dw $1A04,$1A46,$8D00,$8D01,$1A06,$1A4E,$8D06,$8D07

DATA_12C0F8:
	dw $1A36,$1A18,$8D02,$8D03,$1A3C,$1A1A,$8D04,$8D05

CODE_12C108:
	REP.b #$30
	LDA.b $2C
	ASL
	ADC.b $28
	CLC
	ADC.b $A1
	ASL
	TAY
	LDA.b $15
	BNE.b CODE_12C11D
	LDA.w DATA_12C0E8,y
	BRA.b CODE_12C120

CODE_12C11D:
	LDA.w DATA_12C0F8,y
CODE_12C120:
	LDY.b $2C
	BNE.b CODE_12C128
	TAY
	LDA.w $0000,y
CODE_12C128:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12C131:
	dw $19DE,$1A4A,$1A52,$19E8,DATA_12C143,DATA_12C145,$8D0A,$8D0B
	dw $8D0C

DATA_12C143:
	dw $8D08

DATA_12C145:
	dw $8D09

DATA_12C147:
	dw $19E0,$1A4C,$1A56,$19EA,DATA_12C159,DATA_12C15B,$8D14,$8D15
	dw $8D16

DATA_12C159:
	dw $8D12

DATA_12C15B:
	dw $8D13

DATA_12C15D:
	dw $1A2C,$1A3A,$19F2,DATA_12C16F,DATA_12C171,$19FC,$8D0F,$8D10
	dw $8D11

DATA_12C16F:
	dw $8D0D

DATA_12C171:
	dw $8D0E

DATA_12C173:
	dw $1A2E,$1A3E,$19F4,DATA_12C185,DATA_12C187,$19FE,$8D19,$8D1A
	dw $8D1B

DATA_12C185:
	dw $8D17

DATA_12C187:
	dw $8D18

DATA_12C189:
	dw DATA_12C131,DATA_12C147,DATA_12C15D,DATA_12C173

CODE_12C191:					; Note: Cave mushroom level object?
	REP.b #$30
	LDA.b $2C
	ASL
	ADC.b $2C
	CLC
	ADC.b $28
	ASL
	TAY
	LDX.b $15
	LDA.w DATA_12C189,x
	STA.b $00
	LDA.b ($00),y
	LDY.b $2C
	INY
	CPY.b $2E
	BEQ.b CODE_12C1B1
	TAY
	LDA.w $0000,y
CODE_12C1B1:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_12C1BA:
	dw $0000,$1A2C,$1A3A,$19F2,$0000,DATA_12C16F,DATA_12C171,$19FC
	dw $1A04,$1A48,DATA_12C1DA,DATA_12C1DC

UNK_12C1D2:
	dw $8D00,$8D1E,$8D1F,$8D20

DATA_12C1DA:
	dw $8D1C

DATA_12C1DC:
	dw $8D1D

DATA_12C1DE:
	dw $0000,$0008,$0010,$0018

DATA_12C1E6:
	dw $0000,$19E0,$1A4C,$1A56,$0000,$0000,$19EA,DATA_12C159
	dw DATA_12C15B,$0000,$0000,DATA_12C222,DATA_12C224,$1A38,$1A18,$19DE
	dw $1A4A,$1A54,DATA_12C226,DATA_12C228,$19E8,DATA_12C143,DATA_12C22A,DATA_12C22C
	dw DATA_12C22E

DATA_12C218:
	dw $8D0A,$8D0B,$8D28,$8D1F,$8D20

DATA_12C222:
	dw $8D21

DATA_12C224:
	dw $8D22

DATA_12C226:
	dw $8D23

DATA_12C228:
	dw $8D24

DATA_12C22A:
	dw $8D25

DATA_12C22C:
	dw $8D26

DATA_12C22E:
	dw $8D27

DATA_12C230:
	dw $0000,$000A,$0014,$001E,$0028,$0032

DATA_12C23C:
	dw DATA_12C1BA,DATA_12C1E6

DATA_12C240:
	dw DATA_12C1DE,DATA_12C230

CODE_12C244:
	REP.b #$30
	LDX.b $15
	LDA.w DATA_12C240,x
	STA.b $00
	LDA.w DATA_12C23C,x
	STA.b $02
	LDA.b $2C
	ASL
	TAY
	LDA.b ($00),y
	STA.b $00
	LDA.b $28
	ASL
	ADC.b $00
	TAY
	LDA.b ($02),y
	BEQ.b CODE_12C275
	LDY.b $2C
	INY
	CPY.b $2E
	BEQ.b CODE_12C26F
	TAY
	LDA.w $0000,y
CODE_12C26F:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12C275:
	SEP.b #$30
	RTL

DATA_12C278:
	dw $8D42

DATA_12C27A:
	dw $8D39,$8D3F

DATA_12C27E:
	dw $8D39,$8D3C,$8D3F

DATA_12C284:
	dw $8D48,$8D4B,$8D4E

DATA_12C28A:
	dw $8D48,$8D4E

DATA_12C28E:
	dw $8D51

DATA_12C290:
	dw DATA_12C278-$02
	dw DATA_12C27A-$02
	dw DATA_12C27E-$02
	dw DATA_12C284-$02
	dw DATA_12C28A-$02
	dw DATA_12C28E-$02

CODE_12C29C:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_12C2B1
	LDA.w #$8D36
	LDY.b $15
	CPY.w #$0006
	BCC.b CODE_12C2BE
	LDA.w #$8D45
	BRA.b CODE_12C2BE

CODE_12C2B1:
	LDY.b $15
	LDA.w DATA_12C290,y
	STA.b $00
	LDA.b $2C
	ASL
	TAY
	LDA.b ($00),y
CODE_12C2BE:
	CLC
	ADC.b $A1
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12C2CA:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_12C2D8
	LDA.b $28
	CLC
	ADC.w #$8DA7
	BRA.b CODE_12C2F9

CODE_12C2D8:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$8DA5
	BEQ.b CODE_12C2F3
	CMP.w #$8DA6
	BEQ.b CODE_12C2F3
	LDA.w #$152A
	BRA.b CODE_12C2F6

CODE_12C2F3:
	LDA.w #$8F04
CODE_12C2F6:
	CLC
	ADC.b $28
CODE_12C2F9:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12C302:
	REP.b #$30
	LDA.w #$8DA5
	CLC
	ADC.b $28
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$152A
	BEQ.b CODE_12C326
	CMP.w #$152B
	BNE.b CODE_12C332
CODE_12C326:
	SEC
	SBC.w #$152A
	CLC
	ADC.w #$8F04
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12C332:
	SEP.b #$30
	RTL

DATA_12C335:
	dw $8D96,$8D97,$8D98,$8D99,$152C,$152D,$152E,$152F
	dw $8DB4,$8DB5,$8DB6,$8DB7,$0000,$8DC3,$8DC4,$8DC5
	dw $8DD1,$8DD2,$8DD3,$8DD4,$8F00,$8F01,$8F02,$8F03
	dw $8DD5,$8DD6,$8DD7,$8DD8,$0000,$8DD9,$8DDA,$8DDB

CODE_12C375:
	REP.b #$30
	LDA.b $2C
	ASL
	ASL
	ADC.b $28
	CLC
	ADC.b $15
	ASL
	TAY
	LDA.w DATA_12C335,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12C38E:
	LDX.b $1D
	LDA.w #$5F04
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12C398:
	db $CD,$CE,$CF,$D0

DATA_12C39C:
	db $00,$D1,$D2,$D0,$D5,$CF,$D0,$D2,$00

DATA_12C3A5:
	db $00,$D2,$CD,$D5,$CF,$00

DATA_12C3AB:
	db $CA,$00,$CB,$CC

DATA_12C3AF:
	db $00,$C5,$C6,$C7

DATA_12C3B3:
	db $00,$02

DATA_12C3B5:
	db $00,$03,$06

DATA_12C3B8:
	db $00,$02,$04

DATA_12C3BB:
	db $00,$02

DATA_12C3BD:
	db $00,$02

DATA_12C3BF:
	dw DATA_12C398,DATA_12C39C,DATA_12C3A5,DATA_12C3AB,DATA_12C3AF
	
DATA_12C3C9:
	dw DATA_12C3B3,DATA_12C3B5,DATA_12C3B8,DATA_12C3BB,DATA_12C3BD

CODE_12C3D3:
	REP.b #$30
	LDY.b $15
	LDA.w DATA_12C3BF,y
	STA.b $00
	LDA.w DATA_12C3C9,y
	STA.b $02
	LDY.b $2C
	LDA.b ($02),y
	AND.w #$00FF
	CLC
	ADC.b $28
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	BEQ.b CODE_12C3FC
	ORA.w #$7900
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12C3FC:
	SEP.b #$30
	RTL

CODE_12C3FF:
	LDA.w #$79BB
	CLC
	ADC.b $15
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12C40C:
	dw $0000,$0000,$0817,$0A18,$0000,$0000,$0817,$9000
	dw $9001,$0A1A,$79DE,$9002,$9003,$9004,$9005,$79B6
	dw $9006,$9007,$9008,$5D0C,$79AE,$9009,$900A,$5D0C
	dw $0000

DATA_12C43E:
	dw $79DE,$900B,$900C,$0F12,$1010,$79AE,$900D,$900E
	dw $900F,$9010,$79C7,$9002,$9011,$9003,$9012,$0000
	dw $9013,$9014,$9015,$5D0C,$0000,$79BF,$9009,$5D0C
	dw $0000

DATA_12C470:
	dw $0000,$0C0D,$0D0F,$9016,$0A18,$79DE,$9017,$9018
	dw $9019,$901A,$79BD,$901B,$901C,$901D,$901E,$79C6
	dw $901F,$901D,$9015,$5D0C,$79C3,$9020,$9008,$5D0C
	dw $0000,$79AF,$9009,$5D0C,$0000,$0000

DATA_12C4AC:
	dw $0000,$0817,$0A18,$79C6,$9021,$901A,$79AE,$9006
	dw $9022,$79BD,$9009,$9023

DATA_12C4C4:
	dw $79C6,$900B,$0A18,$79BE,$9024,$5D0D,$79DE,$5D0E
	dw $0000

DATA_12C4D6:
	dw $0000,$0817,$0A19,$0000,$0000,$0817,$9000,$9025
	dw $0A19,$0000,$9026,$9027,$9028,$9029,$79DA,$5B10
	dw $902A,$902B,$902C,$79BD,$0000,$5B10,$900A,$902D
	dw $79AE

DATA_12C508:
	dw $0C0D,$0D0F,$0F13,$1011,$0000,$902E,$902F,$9030
	dw $9029,$79DA,$9031,$9032,$9033,$9034,$79B6,$5B10
	dw $9035,$9036,$9037,$0000,$0000,$5B10,$902D,$79AF
	dw $0000

DATA_12C53A:
	dw $0C0D,$0D0F,$0F12,$1010,$0000,$902E,$9038,$9039
	dw $903A,$79DA,$9026,$9027,$903B,$903C,$79AF,$5B10
	dw $902A,$903D,$903E,$79CC,$0000,$5B10,$902A,$903F
	dw $79C3,$0000,$0000,$5B10,$902D,$79AD

DATA_12C576:
	dw $0817,$0A18,$0000,$9040,$9041,$79CC,$9042,$902C
	dw $79BD,$9043,$902D,$79CD

DATA_12C58E:
	dw $0817,$9044,$79CC,$5B11,$904F,$79AE,$0000,$5B12
	dw $79B6

DATA_12C5A0:
	dw $0000,$0000,$0000,$0817,$0A18,$0000,$0000,$0000
	dw $0000,$0817,$9000,$9001,$0F14,$1010,$0000,$0817
	dw $9045,$9038,$9039,$9033,$9010,$0000,$9046,$9047
	dw $9048,$9004,$9049,$9010,$0000,$79DC,$79C1,$79CA
	dw $9009,$902B,$9022,$0000,$79D0,$79CE,$79C0,$79DC
	dw $9009,$9023

DATA_12C5F4:
	dw $0000,$0817,$900C,$0A18,$0000,$0000,$0000,$0817
	dw $9045,$9038,$9001,$0A1A,$0000,$0000,$902E,$9011
	dw $904A,$9039,$904B,$0A1A,$0000,$9026,$9027,$9022
	dw $904C,$901F,$903E,$0000,$904D,$904E,$902D,$79DC
	dw $79B6,$79C5,$0000,$9043,$902D,$79AF,$79D0,$79B3
	dw $79B4,$0000

DATA_12C648:
	db $00,$05,$0A,$0F,$14,$19

DATA_12C64E:
	db $00,$03,$06,$09

DATA_12C652:
	db $00,$07,$0E,$15,$1C,$23

DATA_12C658:
	dw DATA_12C40C,DATA_12C43E,DATA_12C470,DATA_12C4AC,DATA_12C4C4,DATA_12C4D6,DATA_12C508,DATA_12C53A
	dw DATA_12C576,DATA_12C58E,DATA_12C5A0,DATA_12C5F4

DATA_12C670:
	dw DATA_12C648,DATA_12C648,DATA_12C648,DATA_12C64E,DATA_12C64E,DATA_12C648,DATA_12C648,DATA_12C648
	dw DATA_12C64E,DATA_12C64E,DATA_12C652,DATA_12C652

DATA_12C688:
	dw $100F,$0C0B

DATA_12C68C:
	dw $100E,$0C0C

CODE_12C690:
	REP.b #$30
	LDX.b $15
	LDA.w DATA_12C658,x
	STA.b $00
	LDA.w DATA_12C670,x
	STA.b $02
	LDY.b $2C
	LDA.b ($02),y
	AND.w #$00FF
	CLC
	ADC.b $28
	ASL
	TAY
	LDA.b ($00),y
	BEQ.b CODE_12C6DF
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_12C6DF
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDY.w #$0000
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12C6CA:
	CMP.w DATA_12C688,y
	BEQ.b CODE_12C6D8
	INY
	INY
	CPY.w #$0004
	BCC.b CODE_12C6CA
	BRA.b CODE_12C6DF

CODE_12C6D8:
	LDA.w DATA_12C68C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_12C6DF:
	SEP.b #$30
	RTL

DATA_12C6E2:
	dw $7D24,$7D25,$0118,$0119

CODE_12C6EA:
	REP.b #$30
	LDA.b $2C
	ASL
	ORA.b $28
	ASL
	TAY
	LDA.w DATA_12C6E2,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_12C6FF:
	LDX.b $1D
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTL

DATA_12C709:
	incbin "LevelData/DATA_12C709.bin"

DATA_12CE48:
	incbin "LevelData/DATA_12CE48.bin"

DATA_12CF07:
	incbin "LevelData/DATA_12CF07.bin"

DATA_12CFBD:
	incbin "LevelData/DATA_12CFBD.bin"

DATA_12D00A:
	incbin "LevelData/DATA_12D00A.bin"

DATA_12D150:
	incbin "LevelData/DATA_12D150.bin"

DATA_12D53C:
	incbin "LevelData/DATA_12D53C.bin"

DATA_12D623:
	incbin "LevelData/DATA_12D623.bin"

DATA_12D89C:
	incbin "LevelData/DATA_12D89C.bin"

DATA_12D8E2:
	incbin "LevelData/DATA_12D8E2.bin"

DATA_12D91D:
	incbin "LevelData/DATA_12D91D.bin"

DATA_12D9E8:
	incbin "LevelData/DATA_12D9E8.bin"

DATA_12DA1A:
	incbin "LevelData/DATA_12DA1A.bin"

DATA_12DA55:
	incbin "LevelData/DATA_12DA55.bin"

DATA_12DA6C:
	incbin "LevelData/DATA_12DA6C.bin"

DATA_12DC3F:
	incbin "LevelData/DATA_12DC3F.bin"

DATA_12DD4A:
	incbin "LevelData/DATA_12DD4A.bin"

DATA_12DDCA:
	incbin "LevelData/DATA_12DDCA.bin"

DATA_12DDE1:
	incbin "LevelData/DATA_12DDE1.bin"

DATA_12DF5D:
	incbin "LevelData/DATA_12DF5D.bin"

DATA_12E347:
	incbin "LevelData/DATA_12E347.bin"

DATA_12E3E1:
	incbin "LevelData/DATA_12E3E1.bin"

DATA_12E7C7:
	incbin "LevelData/DATA_12E7C7.bin"

DATA_12E8A7:
	incbin "LevelData/DATA_12E8A7.bin"

DATA_12E915:
	incbin "LevelData/DATA_12E915.bin"

DATA_12EA22:
	incbin "LevelData/DATA_12EA22.bin"

DATA_12EA2A:
	incbin "LevelData/DATA_12EA2A.bin"

DATA_12EB37:
	incbin "LevelData/DATA_12EB37.bin"

DATA_12EB8A:
	incbin "LevelData/DATA_12EB8A.bin"

DATA_12ED05:
	incbin "LevelData/DATA_12ED05.bin"

DATA_12EE6E:
	incbin "LevelData/DATA_12EE6E.bin"

DATA_12EEC2:
	incbin "LevelData/DATA_12EEC2.bin"

DATA_12EF99:
	incbin "LevelData/DATA_12EF99.bin"

DATA_12F043:
	incbin "LevelData/DATA_12F043.bin"

DATA_12F04E:
	incbin "LevelData/DATA_12F04E.bin"

DATA_12F1CB:
	incbin "LevelData/DATA_12F1CB.bin"

DATA_12F3EF:
	incbin "LevelData/DATA_12F3EF.bin"

DATA_12F4D1:
	incbin "LevelData/DATA_12F4D1.bin"

DATA_12F77D:
	incbin "LevelData/DATA_12F77D.bin"

DATA_12F7E8:
	incbin "LevelData/DATA_12F7E8.bin"

DATA_12F80B:
	incbin "LevelData/DATA_12F80B.bin"

DATA_12F81F:
	incbin "LevelData/DATA_12F81F.bin"

DATA_12F8B1:
	incbin "LevelData/DATA_12F8B1.bin"

DATA_12FAD5:
	incbin "LevelData/DATA_12FAD5.bin"

DATA_12FC74:
	incbin "LevelData/DATA_12FC74.bin"

DATA_12FE33:
	incbin "LevelData/DATA_12FE33.bin"

DATA_12FEC2:
	incbin "LevelData/DATA_12FEC2.bin"

DATA_12FF39:
	incbin "LevelData/DATA_12FF39.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($12FFB4, incbin, DATA_12FFB4_YI_U2.bin)
else
	%FREE_BYTES($12FF9E, 98, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank13Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

CODE_138000:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	AND.w #$FF00
	CMP.w $1C92
	BEQ.b CODE_138018
	JSR.w CODE_138055
	LDA.w DATA_138045,y
	BRA.b CODE_138038

CODE_138018:
	JSR.w CODE_138073
	BRA.b CODE_138038

CODE_13801D:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	AND.w #$FF00
	CMP.w $1C92
	BEQ.b CODE_138035
	JSR.w CODE_138055
	LDA.w DATA_13804D,y
	BRA.b CODE_138038

CODE_138035:
	JSR.w CODE_138073
CODE_138038:
	TAY
	LDA.w $0000,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138045:
	dw $1C5C,$1CB6,$1CBA,$1CC2

DATA_13804D:
	dw $1C5E,$1CB8,$1CBC,$1CC4

CODE_138055:
	CPY.w #$0004
	BNE.b CODE_138072
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CA0
	BEQ.b CODE_138070
	CMP.w $1CA2
	BNE.b CODE_138072
CODE_138070:
	INY
	INY
CODE_138072:
	RTS

CODE_138073:
	SEP.b #$20
	LDA.b $28
	BNE.b CODE_13808F
	REP.b #$20
	LDA.b $12
	CMP.w $1CD6
	BNE.b CODE_138087
	LDA.w #$1D00
	BRA.b CODE_1380A3

CODE_138087:
	JSR.w CODE_138055
	LDA.w DATA_1380A4,y
	BRA.b CODE_1380A3

CODE_13808F:
	REP.b #$20
	LDA.b $12
	CMP.w $1CD4
	BNE.b CODE_13809D
	LDA.w #$1CFE
	BRA.b CODE_1380A3

CODE_13809D:
	JSR.w CODE_138055
	LDA.w DATA_1380AC,y
CODE_1380A3:
	RTS

DATA_1380A4:
	dw $1CE6,$1CA0,$1CBA,$1CC2

DATA_1380AC:
	dw $1CE4,$1CA2,$1CBC,$1CC4

CODE_1380B4:
	REP.b #$30
	LDA.b $12
	CMP.w $1CF4
	BEQ.b CODE_13811E
	CMP.w $1CF6
	BEQ.b CODE_13811E
	CMP.w $1CD4
	BCC.b CODE_1380CC
	CMP.w $1CE8
	BCC.b CODE_13811E
CODE_1380CC:
	LDA.b $1B
	STA.b $0E
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_138105
	LDA.b $12
	CMP.w $1CB6
	BEQ.b CODE_1380F9
	CMP.w $1CB8
	BEQ.b CODE_1380F9
	CMP.w $1CC2
	BEQ.b CODE_13811E
	CMP.w $1CC4
	BEQ.b CODE_13811E
	CMP.w $1CCA
	BEQ.b CODE_13811E
	CMP.w $1CCC
	BEQ.b CODE_13811E
	BRA.b CODE_138105

CODE_1380F9:
	LDA.w #$1CAC
	STA.b $02
	JSR.w CODE_13816F
	LDY.b $02
	BRA.b CODE_138115

CODE_138105:
	JSR.w CODE_138131
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_138121,y
	TAY
CODE_138115:
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13811E:
	SEP.b #$30
	RTL

DATA_138121:
	dw $1CAE,$1CB0,$1CB2,$1CB4,$1CE8,$1CEA,$1CAE,$1CB0

CODE_138131:
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CAC
	BNE.b CODE_138154
	LDA.w $1CCA
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w $1CC4
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138154:
	JSR.w CODE_13FD61
	CMP.w $1CAC
	BNE.b CODE_13816E
	LDA.w $1CCC
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSL.l CODE_12875D
	LDA.w $1CC2
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13816E:
	RTS

CODE_13816F:
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CE8
	BEQ.b CODE_13818B
	CMP.w $1CEA
	BEQ.b CODE_13818B
	CMP.w $1CAE
	BCC.b CODE_13819F
	CMP.w $1CB6
	BCS.b CODE_13819F
CODE_13818B:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w $1CC2
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$1CCC
	BRA.b CODE_1381C8

CODE_13819F:
	JSR.w CODE_13FD61
	CMP.w $1CE8
	BEQ.b CODE_1381B6
	CMP.w $1CEA
	BEQ.b CODE_1381B6
	CMP.w $1CAE
	BCC.b CODE_1381CA
	CMP.w $1CB6
	BCS.b CODE_1381CA
CODE_1381B6:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w $1CC4
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$1CCA
CODE_1381C8:
	STA.b $02
CODE_1381CA:
	RTS

CODE_1381CB:
	REP.b #$30
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_1381DC
	LDA.b $2C
	BNE.b CODE_1381DC
	LDA.b $A1
	STA.b $2E
CODE_1381DC:
	LDA.b $15
	AND.w #$0001
	ASL
	ORA.b $28
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ORA.b $00
	ASL
	TAY
	LDX.w DATA_138217,y
	BEQ.b CODE_138214
	CPY.w #$0010
	BCC.b CODE_13820B
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_138204
	CMP.w $1C5E
	BNE.b CODE_138208
CODE_138204:
	INY
	INY
	INY
	INY
CODE_138208:
	LDX.w DATA_138217,y
CODE_13820B:
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138214:
	SEP.b #$30
	RTL

DATA_138217:
	dw $1D12,$1C5E,$1C5E,$1D14,$1D16,$1CD0,$1CD2,$1D18
	dw $0000,$1CD4,$1CD6,$1CFE,$1D00

CODE_138231:
	REP.b #$30
	JSL.l CODE_128875
	AND.w #$0003
	STA.b $00
	LDA.b $15
	AND.w #$0001
	STA.b $0A
	ASL
	ASL
	ORA.b $00
	ASL
	TAY
	LDA.w DATA_1382A8,y
	STA.b $00
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_138295
	CMP.w $1C5E
	BEQ.b CODE_138295
	CMP.w $1CAC
	BEQ.b CODE_138269
	CMP.w $1CB6
	BEQ.b CODE_138269
	CMP.w $1CB8
	BNE.b CODE_13829D
CODE_138269:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CFE
	BEQ.b CODE_13828C
	CMP.w $1D00
	BEQ.b CODE_13828C
	LDA.b $15
	AND.w #$0001
	CLC
	ADC.w $1CE4
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13828C:
	LDA.b $1B
	STA.b $0E
	JSR.w CODE_1382B8
	BRA.b CODE_13829D

CODE_138295:
	LDA.w $1CE4
	CLC
	ADC.b $0A
	BRA.b CODE_13829F

CODE_13829D:
	LDA.b ($00)
CODE_13829F:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_1382A8:
	dw $1CD8,$1CDC,$1CE0,$1CD8,$1CDA,$1CDE,$1CE2,$1CDA

CODE_1382B8:
	LDA.b $0A
	BNE.b CODE_1382E4
	JSL.l CODE_1287E2
	LDA.w #$1CA8
	STA.b $00
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CAC
	BEQ.b CODE_13830A
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w $1CC4
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$1CA2
	STA.b $00
	BRA.b CODE_13830A

CODE_1382E4:
	JSL.l CODE_1287A1
	LDA.w #$1CAA
	STA.b $00
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CAC
	BEQ.b CODE_13830A
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w $1CC2
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$1CA0
	STA.b $00
CODE_13830A:
	RTS

DATA_13830B:
	dw CODE_138348
	dw CODE_138365

CODE_13830F:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	CPY.w #$0008
	BCC.b CODE_138320
	JSL.l CODE_1380B4
	BRA.b CODE_138335

CODE_138320:
	STZ.b $9B
	LDA.b $28
	AND.w #$0001
	ASL
	TAX
	JSR.w (DATA_13830B,x)
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138335:
	SEP.b #$30
	RTL

DATA_138338:
	dw $1C60,$1A42,$1A60,$1CAE

DATA_138340:
	dw $1C64,$1A2A,$1A40,$1CC4

CODE_138348:
	LDA.b $15
	BNE.b CODE_138351
	LDX.w DATA_138338,y
	BRA.b CODE_138354

CODE_138351:
	LDX.w DATA_138340,y
CODE_138354:
	RTS

CODE_138355:
	dw $1C62,$1A50,$1A5C,$1CC2

CODE_13835D:
	dw $1C66,$1A34,$1A5E,$1CB0

CODE_138365:
	INC.b $9B
	LDA.b $15
	BNE.b CODE_138370
	LDX.w CODE_138355,y
	BRA.b CODE_138373

CODE_138370:
	LDX.w CODE_13835D,y
CODE_138373:
	RTS

CODE_138374:
	REP.b #$30
	STZ.b $9B
	LDA.b $15
	CMP.w #$0006
	BCS.b CODE_1383A7
	INC.b $9B
	AND.w #$0001
	ASL
	ASL
	ORA.b $2C
	ASL
	TAY
	LDX.w DATA_138399,y
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138399:
	dw $1C60,$1A42,$1A60,$0000,$1A2A,$1A40,$1CC4

CODE_1383A7:
	REP.b #$30
	STZ.b $9B
	LDA.b $15
	CMP.w #$0004
	BEQ.b CODE_1383B9
	CMP.w #$0005
	BEQ.b CODE_1383B9
	INC.b $9B
CODE_1383B9:
	DEC
	DEC
	DEC
	DEC
	ASL
	TAX
	LDA.w DATA_1383D7,x
	STA.b $00
	LDA.b $2C
	ASL
	TAY
	LDX.b $1D
	LDA.b ($00),y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_1383D7:
	dw DATA_1383E3,DATA_1383FB,DATA_1383E9,DATA_138401,DATA_1383F1,DATA_138409

DATA_1383E3:
	dw $1A50,$1A5C,$1CC2

DATA_1383E9:
	dw $1C6A,$1A16,$1A28,$1CBE

DATA_1383F1:
	dw $1C6C,$19EE,$19F6,$1A00,$1CEC

DATA_1383FB:
	dw $1C66,$1A34,$1A5E

DATA_138401:
	dw $1C68,$1A02,$1A14,$1CC0

DATA_138409:
	dw $1C6E,$19DA,$19E2,$19EC,$1CEE

CODE_138413:
	REP.b #$30
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13842C,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13842C:
	dw $1CA4,$1CA6

CODE_138430:
	REP.b #$30
	LDX.b $1D
	LDA.b $15
	AND.w #$0003
	ASL
	TAY
	LDA.b $2C
	BEQ.b CODE_138449
	INC
	CMP.b $2E
	BEQ.b CODE_13844E
	LDA.w DATA_138458,y
	BRA.b CODE_138451

CODE_138449:
	LDA.w DATA_138460,y
	BRA.b CODE_138451

CODE_13844E:
	LDA.w DATA_138468,y
CODE_138451:
	TAY
	LDA.w $0000,y
	JMP.w CODE_1384B8

DATA_138458:
	dw $1DD0,$0000,DATA_138476,DATA_138474

DATA_138460:
	dw $1DCE,$0000,DATA_138472,DATA_138470

DATA_138468:
	dw $1DD2,$0000,$1C72,$1C70

DATA_138470:
	dw $0090

DATA_138472:
	dw $0091

DATA_138474:
	dw $0094

DATA_138476:
	dw $0095

CODE_138478:
	REP.b #$30
	LDA.b $12
	AND.w #$FF00
	CMP.w $1C7A
	BEQ.b CODE_13848D
	LDA.b $28
	BEQ.b CODE_138492
	INC
	CMP.b $2A
	BEQ.b CODE_1384A6
CODE_13848D:
	LDA.w $1C7C
	BRA.b CODE_1384B8

CODE_138492:
	LDA.b $12
	AND.w #$FF00
	CMP.w $1C92
	BNE.b CODE_1384A1
	LDA.w $1C9A
	BRA.b CODE_1384B8

CODE_1384A1:
	LDA.w $1C7A
	BRA.b CODE_1384B8

CODE_1384A6:
	LDA.b $12
	AND.w #$FF00
	CMP.w $1C92
	BNE.b CODE_1384B5
	LDA.w $1C98
	BRA.b CODE_1384B8

CODE_1384B5:
	LDA.w $1C7E
CODE_1384B8:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_1384C1:
	dw $009C,$009B,$009A,$0000

DATA_1384C9:
	dw $0093,$0092

DATA_1384CD:
	dw $009D,$009E,$009F,$0000

DATA_1384D5:
	dw $0092,$0093

DATA_1384D9:
	dw $0001,$FFFF

DATA_1384DD:
	dw $8000,$0000

CODE_1384E1:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2A
	BPL.b CODE_1384EC
	INY
	INY
CODE_1384EC:
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	TAX
	LDA.b $28
	BEQ.b CODE_138501
	CLC
	ADC.w DATA_1384D9,y
	CMP.b $2A
	BNE.b CODE_138521
CODE_138501:
	LDA.b $2C
	BNE.b CODE_138546
	LDA.b $12
	CMP.w #$00B4
	BEQ.b CODE_138511
	CMP.w #$00A7
	BNE.b CODE_138516
CODE_138511:
	LDA.w #$00A7
	BRA.b CODE_138540

CODE_138516:
	TXA
	ORA.w #$0008
	STA.b $00
	AND.w #$0002
	BEQ.b CODE_138526
CODE_138521:
	LDA.w DATA_1384DD,x
	STA.b $9B
CODE_138526:
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ADC.b $00
	TAY
	LDA.b $2A
	BMI.b CODE_13853B
	LDA.w DATA_1384C1,y
	BEQ.b CODE_138546
	BRA.b CODE_138540

CODE_13853B:
	LDA.w DATA_1384CD,y
	BEQ.b CODE_138546
CODE_138540:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138546:
	SEP.b #$30
	RTL

DATA_138549:
	dw $009B,$009E

CODE_13854D:
	REP.b #$30
	LDA.w #$8000
	STA.b $9B
	LDY.w #$0000
	LDA.b $2A
	BPL.b CODE_13855D
	INY
	INY
CODE_13855D:
	LDA.b $28
	BEQ.b CODE_138582
	CLC
	ADC.w DATA_1384D9,y
	CMP.b $2A
	BEQ.b CODE_13859E
	LDA.b $2C
	ASL
	STA.b $00
	LDA.b $15
	AND.w #$0002
	ASL
	ADC.b $00
	ASL
	STA.b $00
	TYA
	ORA.b $00
	TAY
	LDA.w DATA_1385BF,y
	BRA.b CODE_1385B6

CODE_138582:
	STZ.b $9B
	LDA.b $2C
	BNE.b CODE_1385BC
	LDA.b $12
	CMP.w #$00B4
	BEQ.b CODE_138594
	CMP.w #$00A7
	BNE.b CODE_138599
CODE_138594:
	LDA.w #$00A7
	BRA.b CODE_1385B6

CODE_138599:
	LDA.w DATA_1384C9,y
	BRA.b CODE_1385B6

CODE_13859E:
	LDA.b $2C
	BNE.b CODE_1385BC
	LDA.b $12
	CMP.w #$00B4
	BEQ.b CODE_1385AE
	CMP.w #$00A7
	BNE.b CODE_1385B3
CODE_1385AE:
	LDA.w #$00A7
	BRA.b CODE_1385B6

CODE_1385B3:
	LDA.w DATA_1384D5,y
CODE_1385B6:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_1385BC:
	SEP.b #$30
	RTL

DATA_1385BF:
	dw $0097,$0098,$0096,$0099,$00A5,$00A0,$00A3,$00A2
	dw $00A4,$00A1

CODE_1385D3:
	REP.b #$30
	LDX.b $1D
	LDA.b $12
	CMP.w #$00B4
	BEQ.b CODE_1385E3
	CMP.w #$00A7
	BNE.b CODE_1385E8
CODE_1385E3:
	LDA.w #$00A7
	BRA.b CODE_1385FE

CODE_1385E8:
	LDA.b $28
	BEQ.b CODE_1385F6
	INC
	CMP.b $2A
	BEQ.b CODE_1385FB
	LDA.w #$00A6
	BRA.b CODE_1385FE

CODE_1385F6:
	LDA.w #$0093
	BRA.b CODE_1385FE

CODE_1385FB:
	LDA.w #$0092
CODE_1385FE:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_138605:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	LDX.b $1D
	STZ.b $A1
	LDA.b $12
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_138622
	LDA.b $12
	AND.w #$00FF
	INC
	ASL
	STA.b $A1
CODE_138622:
	LDA.b $2A
	DEC
	BEQ.b CODE_138631
	LDA.b $2E
	DEC
	BEQ.b CODE_138636
	JSR.w CODE_138686
	BRA.b CODE_138639

CODE_138631:
	JSR.w CODE_138645
	BRA.b CODE_138639

CODE_138636:
	JSR.w CODE_138666
CODE_138639:
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_138645:
	LDA.b $2C
	BEQ.b CODE_138656
	INC
	CMP.b $2E
	BEQ.b CODE_13865E
	JSR.w CODE_138712
	LDA.w DATA_138784,y
	BRA.b CODE_138664

CODE_138656:
	JSR.w CODE_138712
	LDA.w DATA_1387E2,y
	BRA.b CODE_138664

CODE_13865E:
	JSR.w CODE_138712
	LDA.w DATA_138840,y
CODE_138664:
	TAY
	RTS

CODE_138666:
	LDA.b $28
	BEQ.b CODE_138676
	INC
	CMP.b $2A
	BEQ.b CODE_13867E
	LDY.b $A1
	LDA.w DATA_13889E,y
	BRA.b CODE_138684

CODE_138676:
	JSR.w CODE_138712
	LDA.w DATA_1388FC,y
	BRA.b CODE_138684

CODE_13867E:
	JSR.w CODE_138712
	LDA.w DATA_13895A,y
CODE_138684:
	TAY
	RTS

CODE_138686:
	LDA.b $28
	BNE.b CODE_138695
	LDA.b $2C
	BEQ.b CODE_1386B4
	INC
	CMP.b $2E
	BNE.b CODE_1386C5
	BRA.b CODE_1386CD

CODE_138695:
	INC
	CMP.b $2A
	BEQ.b CODE_1386A5
	LDA.b $2C
	BEQ.b CODE_1386D5
	INC
	CMP.b $2E
	BNE.b CODE_1386E5
	BRA.b CODE_1386EA

CODE_1386A5:
	LDA.b $2C
	BEQ.b CODE_1386F2
	INC
	CMP.b $2E
	BNE.b CODE_1386B1
	JMP.w CODE_13870A

CODE_1386B1:
	JMP.w CODE_138702

CODE_1386B4:
	JSR.w CODE_138712
	PHY
	LDY.w #$0000
	JSR.w CODE_13873E
	PLY
	LDA.w DATA_1389B8,y
	JMP.w CODE_138710

CODE_1386C5:
	JSR.w CODE_138712
	LDA.w DATA_138A16,y
	BRA.b CODE_138710

CODE_1386CD:
	JSR.w CODE_138712
	LDA.w DATA_138A74,y
	BRA.b CODE_138710

CODE_1386D5:
	JSR.w CODE_138712
	PHY
	LDY.w #$0002
	JSR.w CODE_13873E
	PLY
	LDA.w DATA_138AD2,y
	BRA.b CODE_138710

CODE_1386E5:
	LDA.w #$1C04
	BRA.b CODE_138710

CODE_1386EA:
	JSR.w CODE_138712
	LDA.w DATA_138B30,y
	BRA.b CODE_138710

CODE_1386F2:
	JSR.w CODE_138712
	PHY
	LDY.w #$0004
	JSR.w CODE_13873E
	PLY
	LDA.w DATA_138B8E,y
	BRA.b CODE_138710

CODE_138702:
	JSR.w CODE_138712
	LDA.w DATA_138BEC,y
	BRA.b CODE_138710

CODE_13870A:
	JSR.w CODE_138712
	LDA.w DATA_138C4A,y
CODE_138710:
	TAY
	RTS

CODE_138712:
	LDA.b $12
	AND.w #$FF00
	CMP.w $1BE0
	BEQ.b CODE_13873B
	LDY.w #$0000
	LDA.b $12
CODE_138721:
	LDX.w DATA_138760,y
	CMP.w $0000,x
	BEQ.b CODE_138734
	INY
	INY
	CPY.w #$0024
	BCC.b CODE_138721
	STZ.b $A1
	BRA.b CODE_13873B

CODE_138734:
	TYA
	CLC
	ADC.w #$0028
	STA.b $A1
CODE_13873B:
	LDY.b $A1
	RTS

CODE_13873E:
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1C5C
	BEQ.b CODE_138750
	CMP.w $1C5E
	BNE.b CODE_138757
CODE_138750:
	LDA.w DATA_138758,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138757:
	RTS

DATA_138758:
	dw $007E,$0000,$007F

DATA_13875E:
	dw $007D

DATA_138760:
	dw $1CB6,$1CB8,$1C5C,$1C5E,$1CF2,$1CF8,$1CD8,$1CDC
	dw $1CE0,$1BE0,$1BE0,$1BE0,$1BE0,$1CDA,$1CDE,$1CE2
	dw $1CE4,$1CE6

DATA_138784:
	dw $1BE0,$1BE0,$1C18,$1C18,$1C18,$1BF2,$1BF0,$1BF2
	dw $1BF0,$1BF0,$1BF2,$1C18,$1C04,$1BF8,$1BFA,$1BF8
	dw $1C32,$1BF8,$1BFA,$1C04,$1C06,$1C06,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C12,$1C14,$1C16,$1C18,$1C18,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BF2,$1BF0,$1BE0,$1BE0

DATA_1387E2:
	dw $1C38,$1BE0,$1C18,$1BE4,$1BE4,$1BF2,$1BEA,$1BEC
	dw $1BF0,$1BEA,$1BEC,$1BF4,$1C04,$1BF8,$1BFA,$1BFC
	dw $1BFE,$1BF8,$1BFA,$1C04,$1C06,$1C06,DATA_13875E,DATA_13875E
	dw $1C0E,$1C10,$1C12,$1C14,$1C16,$1C18,$1C18,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BEC,$1BEA,$1C38,$1BE0

DATA_138840:
	dw $1C3A,$1BE0,$1BE2,$1C18,$1C1A,$1BE8,$1BF0,$1BF2
	dw $1BEE,$1BEE,$1BE8,$1C18,$1BF6,$1BF8,$1BFA,$1BF8
	dw $1C32,$1C02,$1C02,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C2C,$1C2C,$1C12,$1C14,$1C16,$1C18,$1C1A,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BE8,$1BEE,$1BE0,$1C3A

DATA_13889E:
	dw $1BE6,$1C18,$1BE2,$1BE4,$1BE6,$1C1A,$1BE4,$1BE4
	dw $1C1A,$1C18,$1C18,$1BF4,$1BF6,$1C18,$1C04,$1BE4
	dw $1BF4,$1C1A,$1BF6,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C12,$1C14,$1C16,$1C18,$1C1A,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BE6,$1BE6,$1BE4,$1BE2

DATA_1388FC:
	dw $1C34,$1BF2,$1BE8,$1BEC,$1BE6,$1BE8,$1BE4,$1BEC
	dw $1C1A,$1C18,$1BF2,$1BF4,$1BF6,$1BF8,$1C04,$1BFC
	dw $1BF4,$1BF6,$1BF6,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C08,$1C08,$1C08,$1C18,$1C1A,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C3C,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1C34,$1BE6,$1BEC,$1BE8

DATA_13895A:
	dw $1C36,$1BF0,$1BEE,$1BEA,$1BE6,$1C1A,$1BEA,$1BE4
	dw $1BEE,$1BF0,$1C18,$1BF4,$1BF6,$1C18,$1BFA,$1BF4
	dw $1BFE,$1C1A,$1C02,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C12,$1C14,$1C16,$1C18,$1C1A,$1C1C
	dw $1C1E,$1C0A,$1C0A,$1C0A,$1C26,$1C3E,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BE6,$1C36,$1BEA,$1BEE

DATA_1389B8:
	dw $1BFC,$1BF8,$1C18,$1BF4,$1BE4,$1BF8,$1BF4,$1BFC
	dw $1C18,$1C18,$1BF8,$1BF4,$1C04,$1BF8,$1C04,$1BFC
	dw $1BF4,$1BF8,$1C04,$1C04,$1C20,$1C20,$1C20,$1C20
	dw $1C0E,$1C10,$1C10,$1C10,$1C10,$1C18,$1C18,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BFC,$1BF4,$1BFC,$1BF8

DATA_138A16:
	dw $1BF8,$1BF8,$1BF8,$1C18,$1C18,$1BF8,$1C18,$1BF8
	dw $1C18,$1C18,$1BF8,$1C18,$1C04,$1BF8,$1C04,$1BF8
	dw $1C18,$1BF8,$1C04,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C0C,$1C0C,$1C0C,$1C18,$1C18,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BF8,$1C18,$1BF8,$1BF8

DATA_138A74:
	dw $1C00,$1BF8,$1C1A,$1C18,$1C1A,$1C00,$1C04,$1BF8
	dw $1C1A,$1C18,$1BF8,$1C18,$1BF6,$1BF8,$1C04,$1BF8
	dw $1C18,$1C00,$1BF6,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C26,$1C10,$1C14,$1C14,$1C14,$1C18,$1C1A,$1C1C
	dw $1C1E,$1C26,$1C26,$1C26,$1C40,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1C00,$1C1A,$1BF8,$1C00

DATA_138AD2:
	dw $1BF4,$1C18,$1C18,$1BF4,$1BF4,$1C18,$1BF4,$1BF4
	dw $1C18,$1C18,$1C18,$1BF4,$1C04,$1C18,$1C04,$1BF4
	dw $1BF4,$1C18,$1C04,$1C04,$1C22,$1C22,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C12,$1C14,$1C16,$1C18,$1C18,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BF4,$1BF4,$1BF4,$1C18

DATA_138B30:
	dw $1BF6,$1C04,$1BF6,$1C04,$1BF6,$1BF6,$1C04,$1C04
	dw $1BF6,$1C04,$1C04,$1C04,$1BF6,$1C04,$1C04,$1C04
	dw $1C04,$1BF6,$1BF6,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C28,$1C28,$1C12,$1C14,$1C16,$1C04,$1BF6,$1C1C
	dw $1C1E,$1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BF6,$1BF6,$1C04,$1BF6

DATA_138B8E:
	dw $1BFE,$1C32,$1C18,$1C18,$1BF4,$1C18,$1BFE,$1BF4
	dw $1C32,$1C32,$1C18,$1BF4,$1C04,$1C18,$1BFA,$1BF4
	dw $1BF4,$1C18,$1BFA,$1C04,$1C24,$1C24,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C12,$1C14,$1C0E,$1C04,$1C18,$1C1C
	dw $1C1E,$1C12,$1C12,$1C12,$1C26,$1C28,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BF4,$1BFE,$1BFE,$1C32

DATA_138BEC:
	dw $1BFA,$1BFA,$1C04,$1C04,$1C04,$1C04,$1BFA,$1C04
	dw $1BFA,$1BFA,$1C04,$1C04,$1C04,$1C04,$1BFA,$1C04
	dw $1BFA,$1C04,$1BFA,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C0E,$1C10,$1C12,$1C14,$1C16,$1C04,$1C04,$1C1C
	dw $1C1E,$1C0E,$1C0E,$1C0E,$1C26,$1C16,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1C04,$1BFA,$1BFA,$1BFA

DATA_138C4A:
	dw $1C02,$1BFA,$1BF6,$1C04,$1BF6,$1BF6,$1BFA,$1C04
	dw $1C02,$1BFA,$1C04,$1C04,$1BF6,$1C04,$1BFA,$1C04
	dw $1BFA,$1BF6,$1C02,$1C04,$1C06,$1C08,$1C0A,$1C0C
	dw $1C2A,$1C2A,$1C12,$1C14,$1C16,$1C04,$1C1A,$1C1C
	dw $1C1E,$1C16,$1C16,$1C16,$1C26,$1C42,$1C2A,$1C2C
	dw $1C2E,$1C30,$1C32,$1BF6,$1C02,$1BFA,$1C02

DATA_138CA8:
	dw $00DB,$00DD,$00DC,$0000,$150F,$1511,$1510

CODE_138CB6:
	REP.b #$30
	LDA.b $2C
	ASL
	ASL
	STA.b $00
	LDA.b $28
	BEQ.b CODE_138CCB
	INC.b $00
	INC
	CMP.b $2A
	BNE.b CODE_138CCB
	INC.b $00
CODE_138CCB:
	LDA.b $00
	ASL
	TAY
	LDA.w DATA_138CA8,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_138CDB:
	REP.b #$30
	LDA.b $12
	BNE.b CODE_138CEA
	LDX.b $1D
	LDA.w #$1600
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138CEA:
	SEP.b #$30
	RTL

CODE_138CED:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	STZ.b $0A
	LDX.b $1D
	LDA.b $12
	AND.w #$FF00
	CMP.w #$1600
	BNE.b CODE_138D06
	LDA.w #$0008
	STA.b $0A
CODE_138D06:
	LDA.b $2C
	BNE.b CODE_138D16
	LDA.b $0A
	BNE.b CODE_138D56
	LDY.w #$0000
	JSR.w CODE_138D8C
	BRA.b CODE_138D56

CODE_138D16:
	INC
	CMP.b $2E
	BEQ.b CODE_138D48
	CMP.w #$0002
	BNE.b CODE_138D38
	LDA.b $0A
	BNE.b CODE_138D2C
	LDY.w #$0002
	JSR.w CODE_138D8C
	BRA.b CODE_138D56

CODE_138D2C:
	JSR.w CODE_138D7B
	LDA.w DATA_138D59,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_138D56

CODE_138D38:
	JSR.w CODE_138D7B
	TYA
	ORA.b $0A
	TAY
	LDA.w DATA_138D5F,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_138D56

CODE_138D48:
	JSR.w CODE_138D7B
	TYA
	ORA.b $0A
	TAY
	LDA.w DATA_138D6D,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138D56:
	SEP.b #$30
	RTL

DATA_138D59:
	dw $011F,$0120,$0121

DATA_138D5F:
	dw $011C,$011D,$011E,$0000,$0122,$0123,$0124

DATA_138D6D:
	dw $013A,$013B,$013C,$0000,$0137,$0138,$0139

CODE_138D7B:
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_138D8B
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_138D8B
	INY
	INY
CODE_138D8B:
	RTS

CODE_138D8C:
	LDA.b $28
	AND.w #$0001
	CLC
	ADC.w DATA_138DDF,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $2C
	BNE.b CODE_138DB1
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$1600
	BEQ.b CODE_138DDE
	LDA.b $1B
	STA.b $0E
CODE_138DB1:
	LDA.b $28
	BNE.b CODE_138DC8
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	BNE.b CODE_138DDE
	LDA.w DATA_138DE3,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_138DDE

CODE_138DC8:
	INC
	CMP.b $2A
	BNE.b CODE_138DDE
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	BNE.b CODE_138DDE
	LDA.w DATA_138DE7,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_138DDE:
	RTS

DATA_138DDF:
	dw $0021,$011A

DATA_138DE3:
	dw $0020,$001F

DATA_138DE7:
	dw $0023,$0024

CODE_138DEB:
	REP.b #$30
	STZ.b $0A
	LDA.b $12
	AND.w #$FF00
	CMP.w #$1600
	BNE.b CODE_138DFE
	LDA.w #$0012
	STA.b $0A
CODE_138DFE:
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_138E10
	LDY.w #$0006
	INC
	CMP.b $2E
	BNE.b CODE_138E10
	LDY.w #$000C
CODE_138E10:
	LDA.b $28
	BEQ.b CODE_138E1D
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_138E1D
	INY
	INY
CODE_138E1D:
	TYA
	CLC
	ADC.b $0A
	TAY
	LDX.b $1D
	LDA.w DATA_138E2E,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138E2E:
	dw $0125,$0126,$0127,$0128,$0129,$012A,$012B,$012C
	dw $012D,$012E,$012F,$0130,$0131,$0132,$0133,$0134
	dw $0135,$0136

CODE_138E52:
	REP.b #$30
	LDX.b $1D
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_138E70
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0003
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_138E90,y
	BRA.b CODE_138E89

CODE_138E70:
	LDA.b $2C
	EOR.w #$0001
	AND.w #$0001
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0003
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_138EA8,y
CODE_138E89:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138E90:
	dw $1601,$1602,$1603,$1604,$1605,$1606,$1607,$1608
	dw $1609,$160A,$160B,$160C

DATA_138EA8:
	dw $160D,$160E,$160F,$1610,$1611,$1612,$1613,$1614

CODE_138EB8:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	STA.b $00
	LDA.b $28
	BNE.b CODE_138ECA
	LDA.w #$1505
	BRA.b CODE_138EE6

CODE_138ECA:
	INC
	CMP.b $2A
	BEQ.b CODE_138EE3
	LDA.b $12
	CMP.w #$0019
	BNE.b CODE_138EDB
	LDA.w #$1509
	BRA.b CODE_138EE6

CODE_138EDB:
	LDA.w #$1501
	CLC
	ADC.b $00
	BRA.b CODE_138EE6

CODE_138EE3:
	LDA.w #$1506
CODE_138EE6:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_138EEF:
	REP.b #$30
	STZ.b $0A
	LDA.b $12
	AND.w #$FF00
	CMP.w #$1600
	BNE.b CODE_138F02
	LDA.w #$0006
	STA.b $0A
CODE_138F02:
	LDA.b $12
	CMP.w #$1501
	BEQ.b CODE_138F0E
	CMP.w #$1502
	BNE.b CODE_138F13
CODE_138F0E:
	LDA.w #$000C
	STA.b $0A
CODE_138F13:
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_138F23
	INY
	INY
	INC
	CMP.b $2E
	BNE.b CODE_138F23
	INY
	INY
CODE_138F23:
	TYA
	CLC
	ADC.b $0A
	TAY
	LDA.w DATA_138F34,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138F34:
	dw $1500,$0019,$001A,$1400,$1615,$1616,$0000,$1509

CODE_138F44:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	TAY
	LDA.b $2C
	BEQ.b CODE_138F61
	INC
	CMP.b $2E
	BEQ.b CODE_138F5C
	TYA
	ORA.w #$0004
	TAY
	BRA.b CODE_138F61

CODE_138F5C:
	TYA
	ORA.w #$0008
	TAY
CODE_138F61:
	LDA.w DATA_138F6B,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138F6B:
	dw $1507,$1508,$001B,$001C,$1503,$1504

CODE_138F77:
	REP.b #$30
	LDX.b $1D
	LDA.b $15
	AND.w #$0002
	TAY
	LDA.w DATA_138F8B,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138F8B:
	dw $001D,$001E

CODE_138F8F:
	REP.b #$30
	LDX.b $1D
	LDA.b $2C
	ASL
	TAY
	LDA.b $28
	AND.w #$0001
	BNE.b CODE_138FA3
	LDA.w DATA_138FAD,y
	BRA.b CODE_138FA6

CODE_138FA3:
	LDA.w DATA_138FB7,y
CODE_138FA6:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138FAD:
	dw $002B,$0027,$9100,$7E02,$7E05

DATA_138FB7:
	dw $002C,$0027,$9101,$7E03,$7E05

CODE_138FC1:
	REP.b #$30
	LDX.b $1D
	LDA.w #$7E04
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_138FCF:
	dw $9072,$9073,$907F,$908F,$90A2,$90A3

DATA_138FDB:
	dw $9200,$9080,$9090

DATA_138FE1:
	dw $9068,$9069,$906A,$906D,$906B,$906B,$906C,$906D
	dw $906E,$906F,$9070,$906D,$9071,$906D,$906D,$906D

CODE_139001:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_139049
	ASL
	TAY
	BNE.b CODE_139017
	JSL.l CODE_128875
	AND.w #$0003
	STA.b $A1
CODE_139017:
	LDA.b $2C
	BNE.b CODE_139020
	JSR.w CODE_1390EF
	BRA.b CODE_13902A

CODE_139020:
	LDA.b $2C
	CMP.w #$0001
	BNE.b CODE_139030
	JSR.w CODE_13906F
CODE_13902A:
	TXA
	CPX.w #$FFFF
	BNE.b CODE_139056
CODE_139030:
	LDX.w #$0000
CODE_139033:
	LDA.b $12
	CMP.w DATA_138FCF,x
	BEQ.b CODE_13905C
	INX
	INX
	CPX.w #$000C
	BCC.b CODE_139033
	LDA.b $A1
	CLC
	ADC.w DATA_138FDB,y
	BRA.b CODE_139056

CODE_139049:
	JSL.l CODE_128875
	ADC.b $2C
	AND.w #$001E
	TAY
	LDA.w DATA_138FE1,y
CODE_139056:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13905C:
	SEP.b #$30
	RTL

DATA_13905F:
	dw $330D,$3512

DATA_139063:
	dw $9204,$9205

DATA_139067:
	dw $908F,$907F

DATA_13906B:
	dw $964D,$964E

CODE_13906F:
	LDA.b $12
	AND.w #$FF00
	LDX.w #$0000
	CMP.w #$9400
	BEQ.b CODE_139088
	INX
	INX
	CMP.w #$9500
	BEQ.b CODE_139088
	LDX.w #$FFFF
	BRA.b CODE_1390E2

CODE_139088:
	LDA.w DATA_13905F,x
	STA.b $04
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13909B
CODE_139094:
	INC
	CMP.b $2A
	BNE.b CODE_1390E2
	INX
	INX
CODE_13909B:
	STX.b $0C
	LDA.w DATA_139063,x
	STA.b $06
	LDA.w DATA_139067,x
	STA.b $08
	LDA.w DATA_13906B,x
	STA.b $0A
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.b $06
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.b $08
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	LDX.b $0C
	BNE.b CODE_1390D6
	JSL.l CODE_1287A1
	BRA.b CODE_1390DA

CODE_1390D6:
	JSL.l CODE_1287E2
CODE_1390DA:
	LDA.b $0A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $04
CODE_1390E2:
	RTS

DATA_1390E3:
	dw $9500,$9402

DATA_1390E7:
	dw $90A3,$90A2

DATA_1390EB:
	dw $9073,$9072

CODE_1390EF:
	LDA.b $12
	AND.w #$FF00
	LDX.w #$0000
	CMP.w #$9400
	BEQ.b CODE_139105
	INX
	INX
	CMP.w #$9500
	BEQ.b CODE_139105
	BRA.b CODE_139113

CODE_139105:
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_139118
	INX
	INX
	INC
	CMP.b $2A
	BEQ.b CODE_139118
CODE_139113:
	LDX.w #$FFFF
	BRA.b CODE_139158

CODE_139118:
	LDA.w DATA_1390E3,x
	STA.b $04
	LDA.w DATA_1390E7,x
	STA.b $06
	LDA.w DATA_1390EB,x
	STA.b $08
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.b $06
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	AND.w #$F0F0
	CLC
	ADC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_12875D
	LDA.b $08
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $04
CODE_139158:
	RTS

DATA_139159:
	dw $9204,$330D,$909C

DATA_13915F:
	dw $90A0,$90A2,$9072

CODE_139165:
	REP.b #$30
CODE_139167:
	LDA.b $28
	BNE.b CODE_139177
	LDA.b $2C
	CMP.w #$0001
	BNE.b CODE_1391A5
	LDA.w #$964D
	BRA.b CODE_13919F

CODE_139177:
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_139185
	ASL
	TAY
	LDA.w DATA_139159,y
	BRA.b CODE_13919F

CODE_139185:
	JSL.l CODE_128875
	AND.w #$0001
	CLC
	ADC.w #$909E
	STA.b $0A
	JSR.w CODE_1391F9
	TYA
	BMI.b CODE_13919D
	LDA.w DATA_13915F,y
	STA.b $0A
CODE_13919D:
	LDA.b $0A
CODE_13919F:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_1391A5:
	SEP.b #$30
	RTL

DATA_1391A8:
	dw $9205,$3512,$909D

DATA_1391AE:
	dw $90A1,$90A3,$9073

CODE_1391B4:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_1391C6
	LDA.b $2C
	CMP.w #$0001
	BNE.b CODE_1391F6
	LDA.w #$964E
	BRA.b CODE_1391F0

CODE_1391C6:
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_1391D6
	ASL
	TAY
	LDA.w DATA_1391A8,y
	STA.b $0A
	BRA.b CODE_1391F0

CODE_1391D6:
	JSL.l CODE_128875
	AND.w #$0001
	CLC
	ADC.w #$9062
	STA.b $0A
	JSR.w CODE_1391F9
	TYA
	BMI.b CODE_1391EE
	LDA.w DATA_1391AE,y
	STA.b $0A
CODE_1391EE:
	LDA.b $0A
CODE_1391F0:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_1391F6:
	SEP.b #$30
	RTL

CODE_1391F9:
	LDY.w #$0000
	LDA.b $12
	CMP.w #$9200
	BCC.b CODE_139208
	CMP.w #$9204
	BCC.b CODE_139223
CODE_139208:
	INY
	INY
	CMP.w #$9080
	BCC.b CODE_139214
CODE_13920F:
	CMP.w #$9084
	BCC.b CODE_139223
CODE_139214:
	INY
	INY
	CMP.w #$9090
	BCC.b CODE_139220
	CMP.w #$9094
	BCC.b CODE_139223
CODE_139220:
	LDY.w #$FFFF
CODE_139223:
	RTS

DATA_139224:
	dw $9608,$9300

CODE_139228:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_139234
	JMP.w CODE_139049

CODE_139234:
	JSL.l CODE_128875
	AND.w #$0003
	STA.b $00
	LDA.b $2C
	ASL
	TAY
	LDA.b $00
	CLC
	ADC.w DATA_139224,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_139250:
	dw $9400,$9502

DATA_139254:
	dw CODE_139185
	dw CODE_1391D6

DATA_139258:
	dw CODE_139278
	dw CODE_1392E0

CODE_13925C:
	REP.b #$30
	LDX.b $15
	LDA.b $2C
	BEQ.b CODE_139267
	JMP.w (DATA_139254,x)

CODE_139267:
	JSR.w (DATA_139258,x)
	LDX.b $15
	LDA.w DATA_139250,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_139278:
	JSR.w CODE_13FD61
	CMP.w #$9090
	BCC.b CODE_1392DF
	CMP.w #$9094
	BCS.b CODE_1392DF
	LDA.w #$908F
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$964D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.w #$330D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0020
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.w #$9204
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_1392DF:
	RTS

CODE_1392E0:
	JSR.w CODE_13FD54
	CMP.w #$9090
	BCC.b CODE_139347
	CMP.w #$9094
	BCS.b CODE_139347
	LDA.w #$907F
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$964E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0010
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_1287A1
	LDA.w #$3512
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	AND.w #$F0F0
	SEC
	SBC.w #$0020
	AND.w #$F0F0
	STA.b $00
	LDA.b $1B
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_1287A1
	LDA.w #$9205
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_139347:
	RTS

DATA_139348:
	dw $9400,$905C

DATA_13934C:
	dw $9402,$90A2,$9072

CODE_139352:
	REP.b #$30
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	CMP.w #$0003
	BCC.b CODE_139363
	JMP.w CODE_139049

CODE_139363:
	LDA.b $28
	BNE.b CODE_1393A2
	LDA.b $12
	CMP.w #$9080
	BCC.b CODE_139373
	CMP.w #$9084
	BCC.b CODE_13937F
CODE_139373:
	CMP.w #$9090
	BCC.b CODE_1393A2
	CMP.w #$9094
	BCC.b CODE_13939D
	BRA.b CODE_1393A2

CODE_13937F:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$9204
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD54
	LDA.w #$964D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$330D
	BRA.b CODE_1393D7

CODE_13939D:
	LDA.w #$908F
	BRA.b CODE_1393D7

CODE_1393A2:
	JSL.l CODE_128875
	AND.w #$0001
	STA.b $00
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_139348,y
	CLC
	ADC.b $00
	STA.b $0A
	LDA.b $28
	DEC
	CMP.b $2A
	BNE.b CODE_1393CB
	JSR.w CODE_1391F9
	TYA
	BMI.b CODE_1393CB
	LDA.w DATA_13934C,y
	STA.b $0A
	BRA.b CODE_1393D5

CODE_1393CB:
	LDA.b $2C
	CMP.w #$0002
	BNE.b CODE_1393D5
	JMP.w CODE_139049

CODE_1393D5:
	LDA.b $0A
CODE_1393D7:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_1393E0:
	dw $9501,$905E

DATA_1393E4:
	dw $9500,$90A3,$9073

CODE_1393EA:
	REP.b #$30
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	CMP.w #$0003
	BCC.b CODE_1393FB
	JMP.w CODE_139049

CODE_1393FB:
	LDA.b $28
	BNE.b CODE_13943A
	LDA.b $12
	CMP.w #$9080
	BCC.b CODE_13940B
	CMP.w #$9084
	BCC.b CODE_139417
CODE_13940B:
	CMP.w #$9090
	BCC.b CODE_13943A
	CMP.w #$9094
	BCC.b CODE_139435
	BRA.b CODE_13943A

CODE_139417:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$9205
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD61
	LDA.w #$964E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$3512
	BRA.b CODE_13946F

CODE_139435:
	LDA.w #$907F
	BRA.b CODE_13946F

CODE_13943A:
	JSL.l CODE_128875
	AND.w #$0001
	STA.b $00
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_1393E0,y
	CLC
	ADC.b $00
	STA.b $0A
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_139463
	JSR.w CODE_1391F9
	TYA
	BMI.b CODE_139463
	LDA.w DATA_1393E4,y
	STA.b $0A
	BRA.b CODE_13946D

CODE_139463:
	LDA.b $2C
	CMP.w #$0002
	BNE.b CODE_13946D
	JMP.w CODE_139049

CODE_13946D:
	LDA.b $0A
CODE_13946F:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_139478:
	dw $9B01,$9B00,$9639,$9638,$9629,$9628,$9631,$9630
	dw $961B,$9620

DATA_13948C:
	dw $961D,$961C,$963D,$963C,$962D,$962C,$9635,$9634
	dw $961B,$9624

DATA_1394A0:
	dw $960E,$960F,$963A,$963B,$962A,$962B,$9632,$9633
	dw $961B,$9623

DATA_1394B4:
	dw $9B02,$9B03,$963E,$963F,$962E,$962F,$9636,$9637
	dw $961B,$9627

DATA_1394C8:
	dw DATA_139478,DATA_13948C,DATA_1394A0,DATA_1394B4

CODE_1394D0:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	STA.b $00
	BNE.b CODE_1394EC
	STZ.b $9B
	LDA.b $2C
	BNE.b CODE_1394F1
	JSL.l CODE_128875
	AND.w #$0002
	STA.b $A1
	BRA.b CODE_1394F1

CODE_1394EC:
	LDA.w #$0001
	STA.b $9B
CODE_1394F1:
	LDA.b $2C
	EOR.w #$FFFF
	INC
	CMP.w #$0005
	BCS.b CODE_13950F
	ASL
	ADC.b $00
	ASL
	TAY
	LDA.b $A1
	ORA.b $15
	TAX
	LDA.w DATA_1394C8,x
	STA.b $00
	LDA.b ($00),y
	BRA.b CODE_139512

CODE_13950F:
	LDA.w #$961B
CODE_139512:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13951B:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13952B
	INY
	INC
	CMP.b $2E
	BNE.b CODE_13952B
	INY
CODE_13952B:
	TYA
	CLC
	ADC.w $1DCE
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $2E
	DEC
	BNE.b CODE_139542
	LDA.w $1DD4
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_139542:
	SEP.b #$30
	RTL

DATA_139545:
	dw $330E,$3511

CODE_139549:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_139558
	LDA.b $28
	ASL
	TAY
	LDA.w DATA_139545,y
	BRA.b CODE_13956D

CODE_139558:
	LDA.b $28
	BNE.b CODE_139569
	JSL.l CODE_128875
	AND.w #$0006
	CLC
	ADC.w #$90DA
	BRA.b CODE_13956D

CODE_139569:
	JSR.w CODE_13FD54
	INC
CODE_13956D:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_139576:
	dw CODE_1395CE
	dw CODE_1395EA

DATA_13957A:
	dw $9094,$9084

DATA_13957E:
	dw $908E,$907E

DATA_139582:
	dw DATA_13957A,DATA_13957E

DATA_139586:
	dw $9064,$9074,$9064

CODE_13958C:
	REP.b #$30
	LDX.b $A1
	LDA.b $2E
	CLC
	SBC.b $2C
	CMP.w #$0002
	BCC.b CODE_1395B4
	LDA.b $2C
	CMP.w #$0004
	BCS.b CODE_1395A8
	ASL
	TAY
	JSR.w (DATA_139576,x)
	BRA.b CODE_1395BD

CODE_1395A8:
	AND.w #$0001
	ASL
	ADC.b $A1
	TAY
	LDA.w DATA_139586,y
	BRA.b CODE_1395BD

CODE_1395B4:
	ASL
	TAY
	LDA.w DATA_139582,x
	STA.b $00
	LDA.b ($00),y
CODE_1395BD:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_1395C6:
	dw $9211,$9065,$9075,$9085

CODE_1395CE:
	LDA.b $2C
	BNE.b CODE_1395DE
	LDA.b $12
	CMP.w #$9214
	BNE.b CODE_1395DE
	LDA.w #$9213
	BRA.b CODE_1395E1

CODE_1395DE:
	LDA.w DATA_1395C6,y
CODE_1395E1:
	RTS

DATA_1395E2:
	dw $9212,$9078,$9088,$9079

CODE_1395EA:
	LDA.b $2C
	BNE.b CODE_1395FA
	LDA.b $12
	CMP.w #$9214
	BNE.b CODE_1395FA
	LDA.w #$9216
	BRA.b CODE_1395FD

CODE_1395FA:
	LDA.w DATA_1395E2,y
CODE_1395FD:
	RTS

CODE_1395FE:
	JSL.l CODE_13958C
	LDA.b $2C
	CMP.b #$04
	BCC.b CODE_139651
	LDA.b $2E
	CLC
	SBC.b $2C
	CMP.b #$02
	BCC.b CODE_139651
	REP.b #$30
	JSL.l CODE_128875
	AND.w #$0002
	BEQ.b CODE_13964F
	LDA.b $1B
	STA.b $0E
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$9064
	BNE.b CODE_13963B
	JSL.l CODE_1287A1
	LDA.w #$907A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$907B
	BRA.b CODE_139649

CODE_13963B:
	JSL.l CODE_1287E2
	LDA.w #$908A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$9089
CODE_139649:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13964F:
	SEP.b #$30
CODE_139651:
	RTL

DATA_139652:
	dw $966F,$1530

DATA_139656:
	dw $9670,$9A00

DATA_13965A:
	dw $9671,$1531

CODE_13965E:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_139682
	ASL
	TAY
	JSR.w CODE_13FD54
	LDA.w DATA_139652,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD61
	LDA.w DATA_13965A,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w DATA_139656,y
	BRA.b CODE_1396A1

CODE_139682:
	INC
	CMP.b $2E
	BEQ.b CODE_13969E
	CMP.w #$0003
	BNE.b CODE_139691
	LDA.w #$990A
	BRA.b CODE_1396A1

CODE_139691:
	JSL.l CODE_128875
	AND.w #$0002
	LSR
	ADC.w #$990B
	BRA.b CODE_1396A1

CODE_13969E:
	LDA.w #$9206
CODE_1396A1:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_1396AA:
	dw $9213,$9214,$9213,$9216

CODE_1396B2:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_1396F6
	LDA.b $12
	CMP.w #$9B00
	BCC.b CODE_1396C7
	CMP.w #$9B04
	BCS.b CODE_1396C7
	JMP.w CODE_139760

CODE_1396C7:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDY.w #$0000
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$963B
	BEQ.b CODE_1396ED
	INY
	CMP.w #$963C
	BEQ.b CODE_1396ED
	INY
	CMP.w #$960E
	BEQ.b CODE_1396ED
	INY
	CMP.w #$961D
	BNE.b CODE_1396F6
CODE_1396ED:
	TYA
	CLC
	ADC.w #$9B04
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_1396F6:
	LDY.w #$0000
	LDA.b $12
	CMP.w #$960F
	BEQ.b CODE_139706
	INY
	CMP.w #$961C
	BNE.b CODE_13970D
CODE_139706:
	TYA
	CLC
	ADC.w #$9900
	BRA.b CODE_13975A

CODE_13970D:
	JSL.l CODE_128875
	AND.w #$0001
	STA.b $00
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_139725
	LDA.b $00
	CLC
	ADC.w #$9908
	BRA.b CODE_139757

CODE_139725:
	LDA.b $12
	AND.w #$FF00
	CMP.w #$9200
	BNE.b CODE_139745
	LDA.b $12
	CMP.w #$920F
	BCS.b CODE_13973B
	LDA.w #$9215
	BRA.b CODE_13975A

CODE_13973B:
	SBC.w #$920F
	ASL
	TAY
	LDA.w DATA_1396AA,y
	BRA.b CODE_13975A

CODE_139745:
	LDA.b $00
	CLC
	ADC.w #$00AC
	LDX.b $A1
	BEQ.b CODE_13975A
	LDA.b $00
	CLC
	ADC.w #$00AE
	BRA.b CODE_13975A

CODE_139757:
	CLC
	ADC.b $A1
CODE_13975A:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_139760:
	SEP.b #$30
	RTL

DATA_139763:
	dw CODE_1397A2
	dw CODE_1397AD
	dw CODE_1397CB

CODE_139769:
	JSL.l CODE_1396B2
	LDA.b $2C
	BEQ.b CODE_1397A1
	CMP.b #$01
	BEQ.b CODE_1397A1
	INC
	CMP.b $2E
	BEQ.b CODE_1397A1
	REP.b #$30
	JSL.l CODE_128875
	AND.w #$0007
	CMP.w #$0006
	BCS.b CODE_13979F
	STA.b $0A
	ADC.w #$9902
	CLC
	ADC.b $A1
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $0A
	AND.w #$000E
	TAX
	JSR.w (DATA_139763,x)
CODE_13979F:
	SEP.b #$30
CODE_1397A1:
	RTL

CODE_1397A2:
	JSR.w CODE_1397AD
	JSR.w CODE_1397CB
	RTS

DATA_1397A9:
	dw $9672,$9674

CODE_1397AD:
	JSR.w CODE_13FD54
	LDA.b $0A
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_1397A9,y
	LDY.b $A1
	BEQ.b CODE_1397C2
	INC
	INC
	INC
	INC
CODE_1397C2:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_1397C7:
	dw $9673,$9675

CODE_1397CB:
	JSR.w CODE_13FD61
	LDA.b $0A
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_1397C7,y
	LDY.b $A1
	BEQ.b CODE_1397E0
	INC
	INC
	INC
	INC
CODE_1397E0:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_1397E5:
	dw CODE_139809
	dw CODE_139828
	dw CODE_1398B0

CODE_1397EB:
	REP.b #$30
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_1397FD
	INX
	INX
	INC
	CMP.b $2E
	BNE.b CODE_1397FD
	INX
	INX
CODE_1397FD:
	JSR.w (DATA_1397E5,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_139809:
	LDA.w #$90A8
	LDY.b $28
	BEQ.b CODE_139821
	INC
	INY
	CPY.b $2A
	BEQ.b CODE_139821
	JSL.l CODE_128875
	AND.w #$0001
	CLC
	ADC.w #$90BE
CODE_139821:
	RTS

DATA_139822:
	dw CODE_13984A
	dw CODE_139879
	dw CODE_139881

CODE_139828:
	JSL.l CODE_128875
	AND.w #$0007
	TAY
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_139840
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_139840
	INX
	INX
CODE_139840:
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_139822,x)
	LDA.b $04
	RTS

CODE_13984A:
	TYA
	AND.w #$0003
	CLC
	ADC.w #$90B6
	STA.b $04
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$90C4
	BEQ.b CODE_139870
	CMP.w #$90C5
	BEQ.b CODE_139870
	CMP.w #$90C6
	BEQ.b CODE_139870
	CMP.w #$90C7
	BNE.b CODE_139878
CODE_139870:
	LDA.b $04
	INC
	INC
	INC
	INC
	STA.b $04
CODE_139878:
	RTS

CODE_139879:
	TYA
	CLC
	ADC.w #$90D2
	STA.b $04
	RTS

CODE_139881:
	TYA
	AND.w #$0003
	CLC
	ADC.w #$90C4
	STA.b $04
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$90B6
	BEQ.b CODE_1398A7
	CMP.w #$90B7
	BEQ.b CODE_1398A7
	CMP.w #$90B8
	BEQ.b CODE_1398A7
	CMP.w #$90B9
	BNE.b CODE_1398AF
CODE_1398A7:
	LDA.b $04
	INC
	INC
	INC
	INC
	STA.b $04
CODE_1398AF:
	RTS

CODE_1398B0:
	LDA.b $12
	AND.w #$FF00
	CMP.w #$9200
	BNE.b CODE_1398D4
	LDA.w #$90CC
	LDX.b $28
	BEQ.b CODE_1398EC
	INC
	INX
	CPX.b $2A
	BEQ.b CODE_1398EC
	JSL.l CODE_128875
	AND.w #$0003
	CLC
	ADC.w #$90CE
	BRA.b CODE_1398EC

CODE_1398D4:
	LDA.w #$90AE
	LDX.b $28
	BEQ.b CODE_1398EC
	INC
	INX
	CPX.b $2A
	BEQ.b CODE_1398EC
	JSL.l CODE_128875
	AND.w #$0003
	CLC
	ADC.w #$90B2
CODE_1398EC:
	RTS

DATA_1398ED:
	dw CODE_139911
	dw CODE_139828
	dw CODE_1398B0

CODE_1398F3:
	REP.b #$30
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_139905
	INX
	INX
	INC
	CMP.b $2E
	BNE.b CODE_139905
	INX
	INX
CODE_139905:
	JSR.w (DATA_1398ED,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_139911:
	LDA.w #$90AA
	LDX.b $28
	BEQ.b CODE_139929
	INC
	INX
	CPX.b $2A
	BEQ.b CODE_139929
	JSL.l CODE_128875
	AND.w #$0003
	CLC
	ADC.w #$90C0
CODE_139929:
	RTS

DATA_13992A:
	dw $9640,$964F

DATA_13992E:
	dw $9641,$9650

DATA_139932:
	dw $9642,$9651

DATA_139936:
	dw $9643,$9652

DATA_13993A:
	dw $9644,$9653

DATA_13993E:
	dw $9645,$9654

DATA_139942:
	dw $9646,$9655

DATA_139946:
	dw $9647,$9656

DATA_13994A:
	dw $9648,$9657

DATA_13994E:
	dw $9649,$9658

DATA_139952:
	dw $964A,$9659

DATA_139956:
	dw $964B,$965A

DATA_13995A:
	dw $0000,$965B

DATA_13995E:
	dw $0000,$965C

DATA_139962:
	dw $0000,$965D

DATA_139966:
	dw $0000,$965E

DATA_13996A:
	dw DATA_13992A,DATA_13992E,DATA_139932,DATA_139936,DATA_13993A,DATA_13993E,DATA_139942,DATA_139946
	dw DATA_13994A,DATA_13994E,DATA_139952,DATA_139956,DATA_13995A,DATA_13995E,DATA_139962,DATA_139966

CODE_13998A:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_139999
	JSL.l CODE_128875
	AND.w #$001E
	STA.b $A1
CODE_139999:
	LDA.b $2C
	ASL
	TAY
	LDX.b $A1
	LDA.w DATA_13996A,x
	STA.b $00
	LDA.b ($00),y
	BEQ.b CODE_1399D6
	STA.b $00
	LDX.b $1D
	LDY.b $2C
	BEQ.b CODE_1399D0
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$9608
	BEQ.b CODE_1399C8
	CMP.w #$9609
	BEQ.b CODE_1399C8
	CMP.w #$960A
	BEQ.b CODE_1399C8
	CMP.w #$960B
	BNE.b CODE_1399D0
CODE_1399C8:
	LDA.b $00
	CLC
	ADC.w #$0010
	STA.b $00
CODE_1399D0:
	LDA.b $00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_1399D6:
	SEP.b #$30
	RTL

DATA_1399D9:
	dw $1619,$161A,$1626,$1627

DATA_1399E1:
	dw $161B,$161C,$1628,$1628

DATA_1399E9:
	dw DATA_1399E1,DATA_1399D9,DATA_1399E1,DATA_1399E1

DATA_1399F1:
	dw $9098,$9099,$909A,$9098

CODE_1399F9:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	STA.b $00
	LDA.b $2C
	BEQ.b CODE_139A10
	CMP.w #$0002
	BCC.b CODE_139A1D
	LDA.w #$1628
	BRA.b CODE_139A2D

CODE_139A10:
	LDA.b $00
	BNE.b CODE_139A1D
	JSL.l CODE_128875
	AND.w #$0006
	STA.b $15
CODE_139A1D:
	LDX.b $15
	LDA.w DATA_1399E9,x
	STA.b $02
	LDA.b $2C
	ASL
	ADC.b $00
	ASL
	TAY
	LDA.b ($02),y
CODE_139A2D:
	STA.b $00
	LDA.b $12
	AND.w #$FF00
	CMP.w #$6B00
	BEQ.b CODE_139A43
	CMP.w #$9300
	BEQ.b CODE_139A43
	CMP.w #$9000
	BNE.b CODE_139A65
CODE_139A43:
	STZ.b $15
	LDA.b $2C
	BNE.b CODE_139A4E
	LDA.w #$9061
	BRA.b CODE_139A7C

CODE_139A4E:
	CMP.w #$0002
	BCS.b CODE_139A60
	JSL.l CODE_128875
	AND.w #$0006
	TAY
	LDA.w DATA_1399F1,y
	BRA.b CODE_139A7C

CODE_139A60:
	LDA.w #$909B
	BRA.b CODE_139A7C

CODE_139A65:
	CMP.w #$9400
	BEQ.b CODE_139A74
	CMP.w #$9500
	BNE.b CODE_139A7E
	LDA.w #$9800
	BRA.b CODE_139A77

CODE_139A74:
	LDA.w #$9700
CODE_139A77:
	LDY.b $2C
	BEQ.b CODE_139A7C
	INC
CODE_139A7C:
	STA.b $00
CODE_139A7E:
	LDA.b $00
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_139A89:
	REP.b #$30
	LDA.b $12
	BNE.b CODE_139A98
	LDA.w #$1512
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_139A98:
	SEP.b #$30
	RTL

DATA_139A9B:
	dw $9D00,$9D01,$9D02,$9D03,$9D0A,$9D0B,$9D0C,$9D0D
	dw $9D12,$9D13,$9D14,$9D15

DATA_139AB3:
	dw $9D1C,$9D1D,$9D1E,$9D1F,$9D24,$9D25,$9D26,$9D27
	dw $9D2A,$9D2B,$9D2C,$9D2D

DATA_139ACB:
	db $04,$05,$06,$07,$04,$05,$06,$07,$08,$09,$0E,$0B,$0C,$0F,$0E,$0F
	db $1A,$1B,$16,$17,$18,$19,$16,$17,$18,$19,$1A,$1B,$20,$21,$22,$23
	db $20,$21,$22,$23,$28,$25,$26,$29,$28,$29,$2E,$2F,$30,$31,$2E,$2F
	db $30,$31

DATA_139AFD:
	dw CODE_139B5B
	dw CODE_139BE5
	dw CODE_139BE5
	dw CODE_139C60
	dw CODE_139CED
	dw CODE_139D5C
	dw CODE_139D5C
	dw CODE_139D5D
	dw CODE_139DD2
	dw CODE_139E5C
	dw CODE_139E5C
	dw CODE_139ED7

CODE_139B15:
	REP.b #$30
	LDA.b $2C
	BEQ.b CODE_139B28
	INC
	CMP.b $2E
	BEQ.b CODE_139B25
	LDA.w #$0001
	BRA.b CODE_139B28

CODE_139B25:
	LDA.w #$0002
CODE_139B28:
	ASL
	ASL
	STA.b $00
	LDA.b $28
	BEQ.b CODE_139B3E
	INC
	CMP.b $2A
	BNE.b CODE_139B3A
	LDA.w #$0003
	BRA.b CODE_139B3E

CODE_139B3A:
	AND.w #$0001
	INC
CODE_139B3E:
	ORA.b $00
	ASL
	TAY
	LDA.b $15
	BNE.b CODE_139B4B
	LDA.w DATA_139A9B,y
	BRA.b CODE_139B4E

CODE_139B4B:
	LDA.w DATA_139AB3,y
CODE_139B4E:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	TYX
	JSR.w (DATA_139AFD,x)
	SEP.b #$30
	RTL

CODE_139B5B:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	STX.b $04
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139BE4
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $06
	JSR.w CODE_13FD54
	STX.b $08
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139BE4
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $0A
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139BE4
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $04
	LDA.b $06
	JSR.w CODE_139F64
	LDX.b $08
	LDA.b $0A
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139BE4
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139BE4:
	RTS

CODE_139BE5:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $04
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $04
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139C5F
	LDA.b $1B
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $04
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139C5F
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139C5F
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139C5F
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139C5F:
	RTS

CODE_139C60:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	STX.b $04
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139CEC
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $06
	JSR.w CODE_13FD61
	STX.b $08
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139CEC
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $0A
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139CEC
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $04
	LDA.b $06
	JSR.w CODE_139F64
	LDX.b $08
	LDA.b $0A
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139CEC
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139CEC:
	RTS

CODE_139CED:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $08
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $08
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139D5B
	LDA.b $1B
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $08
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139D5B
	JSR.w CODE_13FD54
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139D5B
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139D5B
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139D5B:
	RTS

CODE_139D5C:
	RTS

CODE_139D5D:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $08
	TXA
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $08
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139DD1
	LDA.b $1B
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $08
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139DD1
	JSR.w CODE_13FD61
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139DD1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139DD1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139DD1:
	RTS

CODE_139DD2:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	STX.b $04
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139E5B
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $06
	JSR.w CODE_13FD54
	STX.b $08
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139E5B
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $0A
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139E5B
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $04
	LDA.b $06
	JSR.w CODE_139F64
	LDX.b $08
	LDA.b $0A
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139E5B
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139E5B:
	RTS

CODE_139E5C:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $08
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $08
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139ED6
	LDA.b $1B
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $08
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139ED6
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139ED6
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139ED6
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139ED6:
	RTS

CODE_139ED7:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	STX.b $04
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139F63
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $06
	JSR.w CODE_13FD61
	STX.b $08
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139F63
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	STA.b $0A
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139F63
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
	LDX.b $04
	LDA.b $06
	JSR.w CODE_139F64
	LDX.b $08
	LDA.b $0A
	JSR.w CODE_139F64
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$9D00
	BNE.b CODE_139F63
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	JSR.w CODE_139F64
CODE_139F63:
	RTS

CODE_139F64:
	TAY
	LDA.w DATA_139ACB,y
	AND.w #$00FF
	ORA.w #$9D00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_139F73:
	dw $9D08,$9D09,$9D10,$9D11

DATA_139F7B:
	dw CODE_139B5B
	dw CODE_139C60
	dw CODE_139DD2
	dw CODE_139ED7

CODE_139F83:
	REP.b #$30
	LDA.b $2C
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0001
	ORA.b $00
	ASL
	TAY
	LDA.w DATA_139F73,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	TYX
	JSR.w (DATA_139F7B,x)
	SEP.b #$30
	RTL

DATA_139FA6:
	dw $1DF4,$1DF0

CODE_139FAA:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_139FC1
	LDA.b $2C
	BNE.b CODE_139FC1
	DEC.b $2E
	DEC.b $2E
	BEQ.b CODE_139FBC
	BPL.b CODE_139FC1
CODE_139FBC:
	LDA.w #$0001
	STA.b $2E
CODE_139FC1:
	LDA.b $2E
	CLC
	SBC.b $2C
	BEQ.b CODE_139FD2
	CMP.w #$0001
	BEQ.b CODE_139FD2
	JSR.w CODE_13C15F
	BRA.b CODE_139FE0

CODE_139FD2:
	ASL
	TAY
	LDX.w DATA_139FA6,y
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_139FE0:
	SEP.b #$30
	RTL

DATA_139FE3:
	dw $1DEC,$1DE8

CODE_139FE7:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_139FF5
	LDA.b $2C
	BNE.b CODE_139FF5
	INC.b $2E
	INC.b $2E
CODE_139FF5:
	LDA.b $2E
	CLC
	SBC.b $2C
	BEQ.b CODE_13A006
	CMP.w #$0001
	BEQ.b CODE_13A006
	JSR.w CODE_13C15F
	BRA.b CODE_13A014

CODE_13A006:
	ASL
	TAY
	LDX.w DATA_139FE3,y
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A014:
	SEP.b #$30
	RTL

DATA_13A017:
	dw $7D08,$9D32,$9D34

DATA_13A01D:
	dw $79F1,$79F3,$79F5

DATA_13A023:
	dw $7D0A,$9D32,$9D36

DATA_13A029:
	dw $79A8,$79F3,$79A0

DATA_13A02F:
	dw $0001,$FFFF

CODE_13A033:
	REP.b #$30
	LDX.w #$0000
	LDA.b $2E
	BPL.b CODE_13A03E
	INX
	INX
CODE_13A03E:
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13A051
	INY
	INY
	CLC
	ADC.w DATA_13A02F,x
	CMP.b $2E
	BNE.b CODE_13A051
	INY
	INY
CODE_13A051:
	TXA
	BNE.b CODE_13A062
	LDA.b $15
	BNE.b CODE_13A05D
	LDA.w DATA_13A017,y
	BRA.b CODE_13A06E

CODE_13A05D:
	LDA.w DATA_13A01D,y
	BRA.b CODE_13A06E

CODE_13A062:
	LDA.b $15
	BNE.b CODE_13A06B
	LDA.w DATA_13A023,y
	BRA.b CODE_13A06E

CODE_13A06B:
	LDA.w DATA_13A029,y
CODE_13A06E:
	CLC
	ADC.b $28
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13A07A:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13A08C
	INY
	INY
	INC
	CMP.b $2E
	BNE.b CODE_13A08C
	INY
	INY
CODE_13A08C:
	LDA.b $28
	BEQ.b CODE_13A097
	INC
	CMP.b $2A
	BNE.b CODE_13A0AE
	BRA.b CODE_13A0C0

CODE_13A097:
	LDA.b $12
	CMP.w #$00A8
	BEQ.b CODE_13A0A3
	CMP.w #$00A9
	BNE.b CODE_13A0A9
CODE_13A0A3:
	INY
	INY
	INY
	INY
	INY
	INY
CODE_13A0A9:
	LDA.w DATA_13A0CC,y
	BRA.b CODE_13A0C3

CODE_13A0AE:
	LDA.b $28
	EOR.w #$0001
	AND.w #$0001
	STA.b $00
	LDA.w DATA_13A0D8,y
	CLC
	ADC.b $00
	BRA.b CODE_13A0C3

CODE_13A0C0:
	LDA.w DATA_13A0DE,y
CODE_13A0C3:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13A0CC:
	dw $00B5,$3C00,$00AB,$00A7,$3C00,$00AB

DATA_13A0D8:
	dw $00A8,$3C01,$00B0

DATA_13A0DE:
	dw $00AA,$3C03,$00B2

CODE_13A0E4:
	REP.b #$30
	LDX.b $1D
	LDA.b $12
	CMP.w #$0092
	BEQ.b CODE_13A0F9
	CMP.w #$0093
	BEQ.b CODE_13A0F9
	CMP.w #$00A6
	BNE.b CODE_13A0FE
CODE_13A0F9:
	LDA.w #$00A7
	BRA.b CODE_13A115

CODE_13A0FE:
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13A10E
	INY
	INY
	INC
	CMP.b $2E
	BNE.b CODE_13A10E
	INY
	INY
CODE_13A10E:
	LDA.w DATA_13A11C,y
	TAY
	LDA.w $0000,y
CODE_13A115:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13A11C:
	dw DATA_13A122,DATA_13A124,$1C74

DATA_13A122:
	dw $00B3

DATA_13A124:
	dw $00B4

CODE_13A126:
	REP.b #$30
	LDA.b $15
	AND.w #$0006
	TAY
	LDA.b $2C
	BEQ.b CODE_13A134
	INY
	INY
CODE_13A134:
	LDA.b $12
	BEQ.b CODE_13A13A
	INY
	INY
CODE_13A13A:
	LDX.b $1D
	LDA.w DATA_13A146,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13A146:
	dw $0114,$2904,$2906,$0115,$2905,$2907

DATA_13A152:
	dw CODE_13A1D3
	dw CODE_13A272

CODE_13A156:
	REP.b #$30
	LDX.b $1D
	LDA.b $2A
	ORA.b $2E
	DEC
	BNE.b CODE_13A173
	LDA.w #$0156
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13A1D3
	JSR.w CODE_13A20A
	JSR.w CODE_13A333
	BRA.b CODE_13A1A6

CODE_13A173:
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13A183
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13A183
	INY
	INY
CODE_13A183:
	LDA.w DATA_13A1A9,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13A198
	INX
	INX
	INC
	CMP.b $2A
	BEQ.b CODE_13A19D
CODE_13A198:
	JSR.w (DATA_13A152,x)
	BRA.b CODE_13A1A6

CODE_13A19D:
	JSR.w CODE_13A20A
	JSR.w CODE_13A272
	JSR.w CODE_13A333
CODE_13A1A6:
	SEP.b #$30
	RTL

DATA_13A1A9:
	dw $0153,$0154,$0155

DATA_13A1AF:
	dw $00C2,$00C3,$00C4,$00C5,$00C6,$00C7,$150D,$150E
	dw $00D1

DATA_13A1C1:
	dw $00C3,$00C3,$00D5,$00D5,$00C6,$00C6,$151B,$151B
	dw $00C3

CODE_13A1D3:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	LDY.w #$0000
CODE_13A1E2:
	CMP.w DATA_13A1AF,y
	BEQ.b CODE_13A1F0
	INY
	INY
	CPY.w #$0012
	BCC.b CODE_13A1E2
	BRA.b CODE_13A1F7

CODE_13A1F0:
	LDA.w DATA_13A1C1,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A1F7:
	RTS

DATA_13A1F8:
	dw $00C4,$00D5,$00C4,$00C5,$00D5,$00C5,$151B,$151B
	dw $00C4

CODE_13A20A:
	JSR.w CODE_13FD61
	LDY.w #$0000
CODE_13A210:
	CMP.w DATA_13A1AF,y
	BEQ.b CODE_13A21E
	INY
	INY
	CPY.w #$0012
	BCC.b CODE_13A210
	BRA.b CODE_13A225

CODE_13A21E:
	LDA.w DATA_13A1F8,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A225:
	RTS

DATA_13A226:
	dw $00BE,$00BF,$00C0,$00C1,$00C2,$00C3,$00C4,$00C5
	dw $00C6,$00C7,$00C9,$00CA,$00CB,$00CC,$00D6,$00D7
	dw $150D,$150E,$00D1

DATA_13A24C:
	dw $77DE,$77DF,$77E0,$77E1,$00C6,$00C6,$00D5,$00D5
	dw $00C6,$00C6,$77DA,$77DB,$77DC,$77DD,$77D8,$77D9
	dw $151A,$151A
	db $C6

DATA_13A271:
	db $00

CODE_13A272:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	LDY.w #$0000
CODE_13A281:
	CMP.w DATA_13A226,y
	BEQ.b CODE_13A28F
	INY
	INY
	CPY.w #$0026
	BCC.b CODE_13A281
	BRA.b CODE_13A296

CODE_13A28F:
	LDA.w DATA_13A24C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A296:
	RTS

DATA_13A297:
	dw $0084,$0085,$0086,$0087,$0088,$0089,$008A,$008B
	dw $008C,$008D

DATA_13A2AB:
	dw $77E7,$77E9,$77E8,$77E6,$00C5,$00D5,$00C5,$00C5
	dw $00D5,$00C6,$77E5,$77E3,$77E2,$77E4,$77D8,$77D9
	dw $151B,$151B,$00C5

CODE_13A2D1:
	JSR.w CODE_13FD61
	LDY.w #$0000
CODE_13A2D7:
	CMP.w DATA_13A226,y
	BEQ.b CODE_13A319
	INY
	INY
	CPY.w #$0026
	BCC.b CODE_13A2D7
	CMP.w #$002E
	BNE.b CODE_13A2ED
	LDA.w #$002F
	BRA.b CODE_13A31C

CODE_13A2ED:
	CMP.w DATA_13A271,y
	BEQ.b CODE_13A2FB
	INY
	INY
	CPY.w #$003A
	BCC.b CODE_13A2ED
	BRA.b CODE_13A320

CODE_13A2FB:
	CPY.w #$0030
	BCS.b CODE_13A320
	LDA.b $2C
	CMP.w #$0001
	BNE.b CODE_13A314
	JSL.l CODE_128875
	AND.w #$0006
	TAY
	LDA.w DATA_13A297,y
	BRA.b CODE_13A31C

CODE_13A314:
	LDA.w #$0031
	BRA.b CODE_13A31C

CODE_13A319:
	LDA.w DATA_13A2AB,y
CODE_13A31C:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A320:
	RTS

DATA_13A321:
	dw $00C7,$00C6,$00C5,$00C5,$00C6,$00C7,$151B,$151B
	dw $00C7

CODE_13A333:
	LDA.b $1B
	PHA
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	STA.b $0E
	PLA
	AND.w #$F0F0
	ORA.b $0E
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	LDY.w #$0000
CODE_13A352:
	CMP.w DATA_13A1AF,y
	BEQ.b CODE_13A360
	INY
	INY
	CPY.w #$0012
	BCC.b CODE_13A352
	BRA.b CODE_13A367

CODE_13A360:
	LDA.w DATA_13A321,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A367:
	RTS

DATA_13A368:
	dw $00B6,$00B8,$00BA,$00B9,$00B6

CODE_13A372:
	REP.b #$30
	LDA.b $12
	AND.w #$FF00
	CMP.w #$7E00
	BEQ.b CODE_13A39C
	LDA.b $2E
	SEC
	SBC.b $2C
	CMP.w #$0004
	BCC.b CODE_13A394
	LDA.b $2C
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_13A368,y
	BRA.b CODE_13A399

CODE_13A394:
	ASL
	TAY
	LDA.w DATA_13A368+$02,y
CODE_13A399:
	JMP.w CODE_13A3CE

CODE_13A39C:
	SEP.b #$30
	RTL

DATA_13A39F:
	dw $00B6,$00B7,$00B8

DATA_13A3A5:
	dw $7794,$7795,$7796,$7794,$7794

CODE_13A3AF:
	REP.b #$30
	LDA.b $12
	AND.w #$FF00
	CMP.w #$7E00
	BEQ.b CODE_13A40B
CODE_13A3BB:
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13A3CB
	INY
	INY
	INC
	CMP.b $2E
	BNE.b CODE_13A3CB
	INY
	INY
CODE_13A3CB:
	LDA.w DATA_13A39F,y
CODE_13A3CE:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEC
	SBC.w #$00B6
	ASL
	TAY
	LDA.b $12
	CMP.w #$0032
	BEQ.b CODE_13A3EB
	CMP.w #$0084
	BCC.b CODE_13A3F2
	CMP.w #$008E
	BCS.b CODE_13A3F2
CODE_13A3EB:
	LDA.w DATA_13A3A5,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A3F2:
	LDA.b $2C
	BNE.b CODE_13A3FB
	JSR.w CODE_13A20A
	BRA.b CODE_13A40B

CODE_13A3FB:
	JSR.w CODE_13A2D1
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13A40B
	JSR.w CODE_13A1D3
	JSR.w CODE_13A333
CODE_13A40B:
	SEP.b #$30
	RTL

DATA_13A40E:
	dw CODE_13A443
	dw CODE_13A45B

CODE_13A412:
	REP.b #$30
	LDX.b $1D
	LDA.w #$00C2
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13A42B
	INC
	CMP.b $2A
	BNE.b CODE_13A439
	INX
	INX
CODE_13A42B:
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_13A40E,x)
	LDA.b $28
	BNE.b CODE_13A439
	JSR.w CODE_13A47E
CODE_13A439:
	LDA.b $2C
	BNE.b CODE_13A440
	JSR.w CODE_13A4F8
CODE_13A440:
	SEP.b #$30
	RTL

CODE_13A443:
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$015A
	BEQ.b CODE_13A468
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13A477
	LDA.b $1B
	STA.b $0E
CODE_13A45B:
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$015B
	BNE.b CODE_13A477
CODE_13A468:
	SEC
	SBC.w #$015A
	EOR.w #$0001
	CLC
	ADC.w #$0151
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A477:
	RTS

DATA_13A478:
	dw $00C4,$00C5,$00C7

CODE_13A47E:
	JSR.w CODE_13FD54
	CMP.w #$0151
	BEQ.b CODE_13A4AB
	CMP.w #$0152
	BEQ.b CODE_13A4AB
	CMP.w #$0153
	BCC.b CODE_13A495
	CMP.w #$0161
	BCC.b CODE_13A4AB
CODE_13A495:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$00C5
	BNE.b CODE_13A4EF
	LDY.w #$0004
	BRA.b CODE_13A4E6

CODE_13A4AB:
	LDY.w #$0000
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$0151
	BEQ.b CODE_13A4DF
	CMP.w #$0152
	BEQ.b CODE_13A4DF
	CMP.w #$0153
	BCC.b CODE_13A4CE
	CMP.w #$0161
	BCC.b CODE_13A4DF
CODE_13A4CE:
	CMP.w #$00C2
	BEQ.b CODE_13A4E6
	CMP.w #$77E6
	BEQ.b CODE_13A4E6
	CMP.w #$77E7
	BEQ.b CODE_13A4E6
	BRA.b CODE_13A4E4

CODE_13A4DF:
	LDA.w #$00D5
	BRA.b CODE_13A4E9

CODE_13A4E4:
	INY
	INY
CODE_13A4E6:
	LDA.w DATA_13A478,y
CODE_13A4E9:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A4EF:
	RTS

DATA_13A4F0:
	dw $00C3,$00C6,$00C6,$00C7

CODE_13A4F8:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$0151
	BEQ.b CODE_13A521
	CMP.w #$0152
	BEQ.b CODE_13A521
	CMP.w #$0153
	BCC.b CODE_13A518
	CMP.w #$0161
	BCC.b CODE_13A521
CODE_13A518:
	LDA.b $A1
	BEQ.b CODE_13A552
	TAY
	STZ.b $A1
	BRA.b CODE_13A530

CODE_13A521:
	LDY.w #$0002
	LDA.b $A1
	BNE.b CODE_13A530
	LDA.w #$0006
	STA.b $A1
	LDY.w #$0000
CODE_13A530:
	LDX.b $1D
	TYA
	BNE.b CODE_13A549
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$00D5
	BEQ.b CODE_13A552
	JSR.w CODE_13FD54
	CMP.w #$00C6
	BNE.b CODE_13A549
	LDY.w #$0002
CODE_13A549:
	LDX.b $1D
	LDA.w DATA_13A4F0,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A552:
	RTS

CODE_13A553:
	REP.b #$30
	LDA.w #$0001
	STA.b $9B
	LDX.b $1D
	LDA.b $15
	AND.w #$0002
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ORA.b $00
	TAY
	BNE.b CODE_13A585
	LDA.b $12
	CMP.w #$00D6
	BEQ.b CODE_13A58C
	CMP.w #$00D7
	BEQ.b CODE_13A58C
	CMP.w #$77D8
	BEQ.b CODE_13A58C
	CMP.w #$77D9
	BEQ.b CODE_13A58C
CODE_13A585:
	LDA.w DATA_13A5AE,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A58C:
	LDA.b $2C
	BEQ.b CODE_13A598
	DEC
	BNE.b CODE_13A5A6
	JSR.w CODE_13A612
	BRA.b CODE_13A59B

CODE_13A598:
	JSR.w CODE_13A5BE
CODE_13A59B:
	TAX
	BEQ.b CODE_13A5A6
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13A5AB

CODE_13A5A6:
	JSR.w CODE_13A47E
	BRA.b CODE_13A5AB

CODE_13A5AB:
	SEP.b #$30
	RTL

DATA_13A5AE:
	dw $00C1,$00C0,$00BE,$00BF

DATA_13A5B6:
	dw $77E1,$77E6,$77DE,$77E7

CODE_13A5BE:
	LDY.w #$0000
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$015A
	BEQ.b CODE_13A5FF
	CMP.w #$015B
	BEQ.b CODE_13A5FF
	CMP.w #$0151
	BEQ.b CODE_13A5FF
	CMP.w #$0152
	BEQ.b CODE_13A5FF
	INY
	INY
	JSR.w CODE_13FD54
	CMP.w #$015A
	BEQ.b CODE_13A5FF
	CMP.w #$015B
	BEQ.b CODE_13A5FF
	CMP.w #$0151
	BEQ.b CODE_13A5FF
CODE_13A5F4:
	CMP.w #$0152
	BEQ.b CODE_13A5FF
	LDA.w #$0000
	BRA.b CODE_13A60D

CODE_13A5FF:
	LDA.b $15
	AND.w #$0002
	BEQ.b CODE_13A60A
	INY
	INY
	INY
	INY
CODE_13A60A:
	LDA.w DATA_13A5B6,y
CODE_13A60D:
	RTS

DATA_13A60E:
	dw $77E8,$77E9

CODE_13A612:
	JSR.w CODE_13FD54
	CMP.w #$015A
	BEQ.b CODE_13A62E
	CMP.w #$015B
	BEQ.b CODE_13A62E
	CMP.w #$0151
	BEQ.b CODE_13A62E
	CMP.w #$0152
	BEQ.b CODE_13A62E
	LDA.w #$0000
	BRA.b CODE_13A637

CODE_13A62E:
	LDA.b $15
	AND.w #$0002
	TAY
	LDA.w DATA_13A60E,y
CODE_13A637:
	RTS

DATA_13A638:
	dw $0084,$0085,$0085,$0086,$0084,$0086,$0087,$0088

DATA_13A648:
	dw CODE_13A6DE
	dw CODE_13A701

CODE_13A64C:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13A69A
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$0005
	STA.b $00
	LDY.w #$0000
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$00C2
	BEQ.b CODE_13A677
	INY
	CMP.w #$00C5
	BEQ.b CODE_13A677
	INY
	CMP.w #$00C4
	BNE.b CODE_13A68A
CODE_13A677:
	TYA
	CLC
	ADC.w #$002E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	STZ.b $00
	TYA
	BEQ.b CODE_13A68A
	LDA.w #$0031
	BRA.b CODE_13A6A3

CODE_13A68A:
	JSL.l CODE_128875
	AND.w #$000E
	TAY
	LDA.w DATA_13A638,y
	CLC
	ADC.b $00
	BRA.b CODE_13A6A3

CODE_13A69A:
	LDA.b $28
	AND.w #$0001
	CLC
	ADC.w #$7E00
CODE_13A6A3:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13A6B7
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13A6C1
CODE_13A6B7:
	LDA.b $1B
	STA.b $0E
	LDY.w #$0000
	JSR.w (DATA_13A648,x)
CODE_13A6C1:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13A6CB
	JSR.w CODE_13A724
CODE_13A6CB:
	SEP.b #$30
	RTL

DATA_13A6CE:
	dw $01A3,$01A1,$01A3,$01A3

DATA_13A6D6:
	dw $015A,$015B,$0151,$0152

CODE_13A6DE:
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A6E6:
	CMP.w DATA_13A6D6,y
	BEQ.b CODE_13A6F4
	INY
	INY
	CPY.w #$0008
	BCC.b CODE_13A6E6
	BRA.b CODE_13A748

CODE_13A6F4:
	LDA.w DATA_13A6CE,y
	BRA.b CODE_13A744

DATA_13A6F9:
	dw $01A2,$01A4,$01A4,$01A4

CODE_13A701:
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A709:
	CMP.w DATA_13A6D6,y
	BEQ.b CODE_13A717
	INY
	INY
	CPY.w #$0008
	BCC.b CODE_13A709
	BRA.b CODE_13A748

CODE_13A717:
	LDA.w DATA_13A6F9,y
	BRA.b CODE_13A744

DATA_13A71C:
	dw $01A5,$01A6,$01A5,$01A6

CODE_13A724:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDY.w #$0000
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A733:
	CMP.w DATA_13A6D6,y
	BEQ.b CODE_13A741
	INY
	INY
	CPY.w #$0008
	BCC.b CODE_13A733
	BRA.b CODE_13A748

CODE_13A741:
	LDA.w DATA_13A71C,y
CODE_13A744:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A748:
	RTS

DATA_13A749:
	dw $015A,$015B,$0151

DATA_13A74F:
	dw CODE_13A79A
	dw CODE_13A7BC

CODE_13A753:
	REP.b #$30
	LDY.w #$0004
	LDA.b $2A
	DEC
	BEQ.b CODE_13A767
	JSR.w CODE_13A887
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_13A74F,x)
CODE_13A767:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13A778
	CPY.w #$0004
	BNE.b CODE_13A778
	LDA.w #$0152
	BRA.b CODE_13A77B

CODE_13A778:
	LDA.w DATA_13A749,y
CODE_13A77B:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $28
	BEQ.b CODE_13A791
	INC
	CMP.b $2A
	BNE.b CODE_13A794
	DEY
	DEY
	JSR.w CODE_13A8AB
	BRA.b CODE_13A794

CODE_13A791:
	JSR.w CODE_13A7E0
CODE_13A794:
	JSR.w CODE_13A8DD
	JMP.w CODE_13A833

CODE_13A79A:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13A7D9
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w DATA_13A749+$02
	BEQ.b CODE_13A7D9
	CMP.w DATA_13A749+$04
	BNE.b CODE_13A7D6
	LDA.w DATA_13A749+$02
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13A7D9

CODE_13A7BC:
	LDA.b $28
	BNE.b CODE_13A7D9
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w DATA_13A80F
	BNE.b CODE_13A7D6
	LDA.w DATA_13A749
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13A7D9

CODE_13A7D6:
	LDY.w #$0004
CODE_13A7D9:
	RTS

DATA_13A7DA:
	dw $01A2,$01A4,$01A4

CODE_13A7E0:
	JSR.w CODE_13FD54
	CMP.w #$002E
	BCC.b CODE_13A80A
	CMP.w #$0033
	BCC.b CODE_13A801
	CMP.w #$0084
	BCC.b CODE_13A80A
	CMP.w #$008E
	BCC.b CODE_13A801
	CMP.w #$7E00
	BEQ.b CODE_13A801
	CMP.w #$7E01
	BNE.b CODE_13A80A
CODE_13A801:
	LDX.b $1D
	LDA.w DATA_13A7DA,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A80A:
	RTS

DATA_13A80B:
	dw $015B,$015A

DATA_13A80F:
	dw $0152

CODE_13A811:
	REP.b #$30
	LDY.w #$0004
	LDA.b $2A
	DEC
	BEQ.b CODE_13A824
	JSR.w CODE_13A887
	TXA
	BEQ.b CODE_13A824
	JSR.w CODE_13A866
CODE_13A824:
	LDX.b $1D
	LDA.w DATA_13A80B,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13A8AB
	JSR.w CODE_13A8DD
CODE_13A833:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13A846
	LDA.b $28
	BNE.b CODE_13A843
	JSR.w CODE_13A1D3
	BRA.b CODE_13A846

CODE_13A843:
	JSR.w CODE_13A272
CODE_13A846:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13A863
	LDA.b $2C
	BNE.b CODE_13A856
	JSR.w CODE_13A20A
	BRA.b CODE_13A859

CODE_13A856:
	JSR.w CODE_13A2D1
CODE_13A859:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13A863
	JSR.w CODE_13A333
CODE_13A863:
	SEP.b #$30
	RTL

CODE_13A866:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13A886
	JSR.w CODE_13FD61
	CMP.w DATA_13A80B
	BEQ.b CODE_13A886
	CMP.w DATA_13A80F
	BNE.b CODE_13A883
	LDA.w DATA_13A80B
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13A886

CODE_13A883:
	LDY.w #$0004
CODE_13A886:
	RTS

CODE_13A887:
	LDA.b $1B
	CLC
	ADC.b $28
	AND.w #$0001
	STA.b $00
	LDA.b $1B
	AND.w #$0010
	LSR
	LSR
	LSR
	LSR
	ADC.b $2C
	AND.w #$0001
	EOR.b $00
	ASL
	TAX
	TXY
	RTS

DATA_13A8A5:
	dw $01A1,$01A3,$01A3

CODE_13A8AB:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13A8DC
	JSR.w CODE_13FD61
	CMP.w #$002E
	BCC.b CODE_13A8DC
	CMP.w #$0033
	BCC.b CODE_13A8D3
	CMP.w #$0084
	BCC.b CODE_13A8DC
	CMP.w #$008E
	BCC.b CODE_13A8D3
	CMP.w #$7E00
	BEQ.b CODE_13A8D3
	CMP.w #$7E01
	BNE.b CODE_13A8DC
CODE_13A8D3:
	LDX.b $1D
	LDA.w DATA_13A8A5,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A8DC:
	RTS

CODE_13A8DD:
	LDA.b $2C
	BNE.b CODE_13A90C
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDY.w #$0000
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7E00
	BEQ.b CODE_13A8FA
CODE_13A8F4:
	CMP.w #$7E01
	BNE.b CODE_13A90C
CODE_13A8FA:
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	SEC
	SBC.w #$015A
	CLC
	ADC.w #$01A5
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13A90C:
	RTS

CODE_13A90D:
	REP.b #$30
	LDX.b $1D
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13A91A
	INY
	INY
CODE_13A91A:
	LDA.b $28
	ASL
	ASL
	STA.b $00
	TYA
	ORA.b $00
	TAY
	LDA.b $15
	AND.w #$0002
	ASL
	ASL
	STA.b $00
	TYA
	ORA.b $00
	TAY
	LDA.w DATA_13A93B,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13A93B:
	dw $00C8,$00CE,$00CD,$00CF,$00D3,$00D3,$00D4,$00D4

CODE_13A94B:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	ASL
	STA.b $0E
	LDA.b $15
	AND.w #$0007
	DEC
	DEC
	DEC
	ASL
	TAY
	LDA.b $0E
	CLC
	ADC.w DATA_13A984,y
	TAY
	LDA.b $2C
	BEQ.b CODE_13A970
	INC
	CMP.b $2E
	BNE.b CODE_13A975
	BRA.b CODE_13A97A

CODE_13A970:
	LDA.w DATA_13A98A,y
	BRA.b CODE_13A97D

CODE_13A975:
	LDA.w DATA_13A9AE,y
	BRA.b CODE_13A97D

CODE_13A97A:
	LDA.w DATA_13A9D2,y
CODE_13A97D:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13A984:
	dw $0000,$0008,$0014

DATA_13A98A:
	dw $0174,$0175,$0175,$0178,$0174,$0175,$0175,$0175
	dw $0176,$0178,$0174,$0175,$0175,$0175,$0175,$0175
	dw $0177,$0178

DATA_13A9AE:
	dw $0179,$017A,$017A,$017D,$0179,$017A,$017A,$017A
	dw $017B,$017D,$0179,$017A,$017A,$017A,$017A,$017A
	dw $017C,$017D

DATA_13A9D2:
	dw $017E,$017F,$017F,$0182,$017E,$017F,$017F,$017F
	dw $0180,$0182,$017E,$017F,$017F,$017F,$017F,$017F
	dw $0181,$0182

CODE_13A9F6:
	REP.b #$30
	LDY.w #$0000
	LDA.b $12
	AND.w #$FF00
	CMP.w $1A62
	BEQ.b CODE_13AA24
	LDA.b $12
	CMP.w #$0000
	BEQ.b CODE_13AA24
	CMP.w #$00C2
	BEQ.b CODE_13AA24
	INY
	INY
CODE_13AA13:
	LDX.w DATA_13AC3D,y
	CMP.w $0000,x
	BEQ.b CODE_13AA24
	INY
	INY
	CPY.w #$003E
	BCC.b CODE_13AA13
	BRA.b CODE_13AA51

CODE_13AA24:
	LDA.b $2A
	DEC
	BNE.b CODE_13AA30
	LDA.b $2E
	DEC
	BEQ.b CODE_13AA3A
	BRA.b CODE_13AA40

CODE_13AA30:
	LDA.b $2E
	DEC
	BEQ.b CODE_13AA45
	JSR.w CODE_13AAF0
	BRA.b CODE_13AA48

CODE_13AA3A:
	LDA.w DATA_13AC7B,y
	TAY
	BRA.b CODE_13AA48

CODE_13AA40:
	JSR.w CODE_13AA54
	BRA.b CODE_13AA48

CODE_13AA45:
	JSR.w CODE_13AAA2
CODE_13AA48:
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13AA51:
	SEP.b #$30
	RTL

CODE_13AA54:
	LDA.b $2C
	BEQ.b CODE_13AA74
	INC
	CMP.b $2E
	BEQ.b CODE_13AA8B
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AA6F
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B06B,x)

CODE_13AA6F:
	LDA.w DATA_13ACF7,y
	BRA.b CODE_13AAA0

CODE_13AA74:
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AA86
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B05B-$08,x)

CODE_13AA86:
	LDA.w DATA_13ACB9,y
	BRA.b CODE_13AAA0

CODE_13AA8B:
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AA9D
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B077,x)

CODE_13AA9D:
	LDA.w DATA_13AD35,y
CODE_13AAA0:
	TAY
	RTS

CODE_13AAA2:
	LDA.b $28
	BEQ.b CODE_13AAC2
	INC
	CMP.b $2A
	BEQ.b CODE_13AAD9
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AABD
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B0B3,x)

CODE_13AABD:
	LDA.w DATA_13ADB1,y
	BRA.b CODE_13AAEE

CODE_13AAC2:
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AAD4
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B095,x)

CODE_13AAD4:
	LDA.w DATA_13AD73,y
	BRA.b CODE_13AAEE

CODE_13AAD9:
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AAEB
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B0B9,x)

CODE_13AAEB:
	LDA.w DATA_13ADEF,y
CODE_13AAEE:
	TAY
	RTS

CODE_13AAF0:
	LDA.b $28
	BNE.b CODE_13AAFF
	LDA.b $2C
	BEQ.b CODE_13AB24
	INC
	CMP.b $2E
	BNE.b CODE_13AB3E
	BRA.b CODE_13AB54

CODE_13AAFF:
	LDA.b $28
	INC
	CMP.b $2A
	BEQ.b CODE_13AB12
	LDA.b $2C
	BEQ.b CODE_13AB6E
	INC
	CMP.b $2E
	BNE.b CODE_13AB84
	JMP.w CODE_13ABA5

CODE_13AB12:
	LDA.b $2C
	BNE.b CODE_13AB19
	JMP.w CODE_13ABBB

CODE_13AB19:
	INC
	CMP.b $2E
	BEQ.b CODE_13AB21
	JMP.w CODE_13ABD5

CODE_13AB21:
	JMP.w CODE_13ABEB

CODE_13AB24:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AB38
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B0C9,x)

CODE_13AB38:
	LDA.w DATA_13AE2D,y
	JMP.w CODE_13AC02

CODE_13AB3E:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AB4E
	JSR.w CODE_13AC15
	JMP.w CODE_13AB9F

CODE_13AB4E:
	LDA.w DATA_13AE6B,y
	JMP.w CODE_13AC02

CODE_13AB54:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AB68
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B0E7,x)

CODE_13AB68:
	LDA.w DATA_13AEA9,y
	JMP.w CODE_13AC02

CODE_13AB6E:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13AB7E
	JSR.w CODE_13AC15
	JMP.w CODE_13AB9F

CODE_13AB7E:
	LDA.w DATA_13AEE7,y
	JMP.w CODE_13AC02

CODE_13AB84:
	REP.b #$20
	TYA
	BNE.b CODE_13AB9F
	LDA.b $12
	AND.w #$FF00
	CMP.w $1A62
	BNE.b CODE_13AB9F
	LDA.b $12
	AND.w #$00FF
	CMP.w #$0010
	BCC.b CODE_13AB9F
	INY
	INY
CODE_13AB9F:
	LDA.w DATA_13AF25,y
	JMP.w CODE_13AC02

CODE_13ABA5:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13ABB5
	JSR.w CODE_13AC15
	JMP.w CODE_13AB9F

CODE_13ABB5:
	LDA.w DATA_13AF63,y
	JMP.w CODE_13AC02

CODE_13ABBB:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13ABCF
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B101,x)

CODE_13ABCF:
	LDA.w DATA_13AFA1,y
	JMP.w CODE_13AC02

CODE_13ABD5:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13ABE5
	JSR.w CODE_13AC15
	JMP.w CODE_13AB9F

CODE_13ABE5:
	LDA.w DATA_13AFDF,y
	JMP.w CODE_13AC02

CODE_13ABEB:
	REP.b #$20
	JSR.w CODE_13AC04
	BIT.w #$0001
	BEQ.b CODE_13ABFF
	JSR.w CODE_13AC15
	LDA.b $00
	ASL
	TAX
	JMP.w (DATA_13B11F,x)

CODE_13ABFF:
	LDA.w DATA_13B01D,y
CODE_13AC02:
	TAY
	RTS

CODE_13AC04:
	STZ.b $00
	LDA.b $12
	AND.w #$FF00
	CMP.w $1A62
	BNE.b CODE_13AC12
	INC.b $00
CODE_13AC12:
	LDA.b $00
	RTS

CODE_13AC15:
	LDA.b $12
	LDY.w #$0000
CODE_13AC1A:
	LDX.w DATA_13AC7B,y
	CMP.w $0000,x
	BEQ.b CODE_13AC29
	INY
	INY
	CPY.w #$03E0
	BCC.b CODE_13AC1A
CODE_13AC29:
	LDX.b $1D
	STZ.b $00
CODE_13AC2D:
	TYA
	CMP.w #$003E
	BCC.b CODE_13AC3C
	SEC
	SBC.w #$003E
	TAY
	INC.b $00
	BRA.b CODE_13AC2D

CODE_13AC3C:
	RTS

DATA_13AC3D:
	dw $0000,$1C04,$1BF8,$1BF2,$1BFA,$1BE0,$1BF4,$1BE4
	dw $1BF6,$1BE6,$1BFC,$1BEC,$1BFE,$1BEA,$1C00,$1BE8
	dw $1C02,$1C1A,$1BE2,$1C18,$1BF0,$1BEE,$1C5C,$1C5E
	dw $1C2E,$1C30,$1C32,$1C34,$1C36,$1C38,$1C3A

DATA_13AC7B:
	dw $1A80,$1AA0,$1AAC,$1B80,$1AC4,$1AB4,$1AE0,$1B9C
	dw $1AF8,$1AD0,$1B04,$1B8C,$1B0C,$1BA4,$1B14,$1BBC
	dw $1B1C,$1B24,$1BAC,$1B30,$1B58,$1AE8,$1B6C,$1B6C
	dw $1B6A,$1AFC,$1BC8,$1BD0,$1BD4,$1BD8,$1BDC

DATA_13ACB9:
	dw $1A7A,$1A9A,$1AA4,$1B78,$1ABC,$1AB2,$1ADE,$1B9A
	dw $1A7A,$1A7A,$1B00,$1B88,$1B08,$1BA0,$1A7A,$1A7A
	dw $1A7A,$1A7A,$1A7A,$1B3C,$1B50,$1A7A,$1B6E,$1B6E
	dw $1B66,$1AFA,$1BC0,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13ACF7:
	dw $1A7C,$1A9C,$1AAA,$1B7E,$1AC2,$1AB6,$1A7C,$1A7C
	dw $1A7C,$1A7C,$1A7C,$1A7C,$1A7C,$1A7C,$1A7C,$1A7C
	dw $1A7C,$1A7C,$1A7C,$1BDE,$1B56,$1A7C,$1B6C,$1B6C
	dw $1B66,$1AFA,$1BC6,$1BD0,$1BD4,$1BD6,$1BDA

DATA_13AD35:
	dw $1A7E,$1A9E,$1AB0,$1B84,$1AC8,$1AB8,$1A7E,$1A7E
	dw $1AF6,$1A7E,$1A7E,$1A7E,$1A7E,$1A7E,$1B10,$1BB8
	dw $1B18,$1B2C,$1BB4,$1B3A,$1B5C,$1AE4,$1B6C,$1B6C
	dw $1B66,$1AFA,$1BD8,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AD73:
	dw $1A74,$1A94,$1AA6,$1B7A,$1A74,$1A74,$1AD8,$1B94
	dw $1AF0,$1ACA,$1B02,$1B8A,$1A74,$1A74,$1B12,$1BBA
	dw $1A74,$1B20,$1BA8,$1A74,$1A74,$1A74,$1B70,$1B70
	dw $1B68,$1AFC,$1BC2,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13ADB1:
	dw $1A76,$1A96,$1A76,$1A76,$1A76,$1A76,$1ADA,$1B96
	dw $1AF2,$1ACC,$1A76,$1A76,$1A76,$1A76,$1A76,$1A76
	dw $1A76,$1B2A,$1BB2,$1A76,$1A76,$1A76,$1B72,$1B72
	dw $1B68,$1AFC,$1BC2,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13ADEF:
	dw $1A78,$1A98,$1A78,$1A78,$1ABE,$1A78,$1A78,$1A78
	dw $1A78,$1ACE,$1A78,$1A78,$1B0A,$1BA2,$1A78,$1A78
	dw $1B1A,$1B22,$1BAA,$1A78,$1B52,$1AE6,$1B74,$1B74
	dw $1B68,$1AFC,$1BC2,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AE2D:
	dw $1A62,$1A82,$1AA2,$1B76,$1A62,$1A62,$1AD2,$1B8E
	dw $1A62,$1A62,$1AFE,$1B86,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1B32,$1A62,$1A62,$1B6C,$1B6C
	dw $1B64,$1AFA,$1BBE,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AE6B:
	dw $1A68,$1A88,$1AA8,$1B7C,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1B36,$1A62,$1A62,$1B6C,$1B6C
	dw $1B64,$1AFA,$1BBE,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AEA9:
	dw $1A6E,$1A8E,$1AAE,$1B84,$1A62,$1A62,$1A62,$1A62
	dw $1AEA,$1A62,$1A62,$1A62,$1A62,$1A62,$1B0E,$1BB6
	dw $1A62,$1B26,$1BAE,$1B3E,$1A62,$1A62,$1B5E,$1B5E
	dw $1B64,$1AFA,$1BBE,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AEE7:
	dw $1A64,$1A84,$1A62,$1A62,$1A62,$1A62,$1AD4,$1B90
	dw $1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1B44,$1A62,$1A62,$1B6E,$1B6E
	dw $1B64,$1AFA,$1BBE,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AF25:
	dw $1A6A,$1A8A,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1B2E,$1A62,$1A62,$1B6E,$1B6E
	dw $1B64,$1AFA,$1BBE,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AF63:
	dw $1A70,$1A90,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1AEC,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1B1E,$1BA6,$1A62,$1A62,$1A62,$1B60,$1B60
	dw $1B64,$1AFA,$1BBE,$1BCE,$1BD2,$1BD2,$1BD6

DATA_13AFA1:
	dw $1A66,$1A86,$1A62,$1A62,$1ABA,$1A62,$1AD6,$1B92
	dw $1A62,$1A62,$1A62,$1A62,$1B06,$1B9E,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1B34,$1B4E,$1A62,$1B74,$1B74
	dw $1B64,$1AFA,$1BBE,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13AFDF:
	dw $1A6C,$1A8C,$1A62,$1A62,$1AC0,$1A62,$1A62,$1A62
	dw $1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1A62,$1B28,$1BB0,$1B38,$1B54,$1A62,$1B62,$1B62
	dw $1B64,$1AFA,$1BC4,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13B01D:
	dw $1A72,$1A92,$1A62,$1A62,$1AC6,$1A62,$1A62,$1A62
	dw $1AEE,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62,$1A62
	dw $1B16,$1B28,$1BB0,$1B40,$1B5A,$1AE2,$1B62,$1B62
	dw $1B64,$1AFA,$1BCA,$1BCE,$1BD2,$1BD6,$1BDA

DATA_13B05B:
	dw CODE_13AB38
	dw CODE_13AB7E
	dw CODE_13ABCF
	dw CODE_13AB38
	dw CODE_13AB9F
	dw CODE_13AB4E
	dw CODE_13AB9F
	dw CODE_13AB9F

DATA_13B06B:
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13ABE5
	dw CODE_13AB4E
	dw CODE_13AB9F

DATA_13B077:
	dw CODE_13ABE5
	dw CODE_13AB4E
	dw CODE_13AB4E
	dw CODE_13AB4E
	dw CODE_13AB68
	dw CODE_13ABB5
	dw CODE_13ABFF
	dw CODE_13AB4E
	dw CODE_13AB9F
	dw CODE_13AB68
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13ABB5
	dw CODE_13ABE5
	dw CODE_13ABE5

DATA_13B095:
	dw CODE_13ABFF
	dw CODE_13AB38
	dw CODE_13AB4E
	dw CODE_13AB68
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB7E
	dw CODE_13AB9F

DATA_13B0B3:
	dw CODE_13ABB5
	dw CODE_13AB7E
	dw CODE_13AB9F

DATA_13B0B9:
	dw CODE_13ABB5
	dw CODE_13ABCF
	dw CODE_13ABE5
	dw CODE_13ABFF
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB7E

DATA_13B0C9:
	dw CODE_13AB9F
	dw CODE_13ABB5
	dw CODE_13AB4E
	dw CODE_13AB4E
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB7E
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB4E
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB7E
	dw CODE_13AB9F

DATA_13B0E7:
	dw CODE_13AB9F
	dw CODE_13AB4E
	dw CODE_13AB4E
	dw CODE_13AB68
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13ABB5
	dw CODE_13AB4E
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F

DATA_13B101:
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13ABB5
	dw CODE_13ABE5
	dw CODE_13AB7E
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB7E
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F

DATA_13B11F:
	dw CODE_13ABE5
	dw CODE_13ABE5
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13ABB5
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13ABB5
	dw CODE_13AB9F
	dw CODE_13AB9F
	dw CODE_13ABE5
	dw CODE_13ABE5
	dw CODE_13ABFF
	dw CODE_13ABFF

CODE_13B13F:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #DATA_13B1B0
	STA.b $0A
	JSR.w CODE_13B190
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w #DATA_13B32E
	STA.b $0A
	JSR.w CODE_13B190
	JSR.w CODE_13FD61
	LDA.w #DATA_13B4AC
	STA.b $0A
	JSR.w CODE_13B190
	JSR.w CODE_13FD54
	LDA.w #DATA_13B62A
	STA.b $0A
	JSR.w CODE_13B190
	LDA.b $12
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13B7A8,y
	BEQ.b CODE_13B187
	TAY
	LDA.w $0000,y
CODE_13B187:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13B190:
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w $1A62
	BNE.b CODE_13B1AF
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$00FF
	ASL
	TAY
	LDA.b ($0A),y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13B1AF:
	RTS

DATA_13B1B0:
	dw $1A74,$1A76,$1A78,$1A6E,$1A70,$1A72,$1A6E,$1A70
	dw $1A72,$1A74,$1A76,$1A78,$1A80,$1A7E,$1A7E,$1A80
	dw $1A94,$1A96,$1A98,$1A8E,$1A90,$1A92,$1A8E,$1A90
	dw $1A92,$1A94,$1A96,$1A98,$1AA0,$1A9E,$1A9E,$1AA0
	dw $1AA6,$1AAC,$1AA6,$1AAE,$1AB0,$1AAC,$1AAE,$1AB0
	dw $1AB4,$1AB4,$1AB8,$1AB8,$1ABE,$1AC4,$1ABE,$1AC6
	dw $1AC8,$1AC4,$1AC6,$1AC8,$1ACA,$1ACC,$1ACE,$1AD0
	dw $1AD8,$1ADA,$1ADC,$1AD8,$1ADA,$1ADC,$1AE0,$1AE0
	dw $1AE2,$1AE4,$1AE6,$1AE8,$1AEA,$1AEC,$1AEE,$1AF0
	dw $1AF2,$1AF4,$1AF6,$1AF8,$1AFA,$1AFC,$1B02,$1B04
	dw $1B02,$1B04,$1B0A,$1B0C,$1B0A,$1B0C,$1B0E,$1B10
	dw $1B12,$1B14,$1B16,$1B18,$1B1A,$1B1C,$1B1E,$1B20
	dw $1B22,$1B24,$1B26,$1B28,$1B2A,$1B2C,$1B42,$1B30
	dw $1B46,$1B4A,$1B3E,$1B40,$1B3A,$1B30,$1B3E,$1B40
	dw $1B42,$1B48,$1B46,$1B48,$1B4A,$1B3A,$1B52,$1B58
	dw $1B52,$1B5A,$1B5C,$1B58,$1B5A,$1B5C,$1B5E,$1B60
	dw $1B62,$1B68,$1B6A,$1B68,$1B6A,$1B6C,$1B6E,$1B70
	dw $1B72,$1B74,$1B7A,$1B80,$1B7A,$1B82,$1B84,$1B80
	dw $1B82,$1B84,$1B8A,$1B8C,$1B8A,$1B8C,$1B94,$1B96
	dw $1B98,$1B94,$1B96,$1B98,$1B9C,$1B9C,$1BA2,$1BA4
	dw $1BA2,$1BA4,$1BA6,$1BA8,$1BAA,$1BAC,$1BAE,$1BB0
	dw $1BB2,$1BB4,$1BB6,$1BB8,$1BBA,$1BBC,$1BC2,$1BC8
	dw $1BC2,$1BCA,$1BCC,$1BC8,$1BCA,$1BCC,$1BCE,$1BD0
	dw $1BD2,$1BD4,$1BD8,$1BD8,$1BDA,$1BDC,$1BDE

DATA_13B32E:
	dw $1A62,$1A64,$1A66,$1A62,$1A64,$1A66,$1A74,$1A76
	dw $1A78,$1A74,$1A76,$1A78,$1A7A,$1A7A,$1A80,$1A80
	dw $1A82,$1A84,$1A86,$1A82,$1A84,$1A86,$1A94,$1A96
	dw $1A98,$1A94,$1A96,$1A98,$1A9A,$1A9A,$1AA0,$1AA0
	dw $1AA2,$1AA4,$1AA6,$1AA2,$1AA4,$1AAC,$1AA6,$1AAC
	dw $1AB2,$1AB4,$1AB2,$1AB4,$1ABA,$1ABC,$1ABE,$1ABA
	dw $1ABC,$1AC4,$1ABE,$1AC4,$1ACA,$1ACC,$1ACE,$1AD0
	dw $1AD2,$1AD4,$1AD6,$1AD8,$1ADA,$1ADC,$1ADE,$1AE0
	dw $1AE6,$1AE8,$1AE6,$1AE8,$1AF0,$1AF2,$1AF4,$1AF0
	dw $1AF2,$1AF4,$1AF8,$1AF8,$1AFA,$1AFC,$1AFE,$1B00
	dw $1B02,$1B04,$1B06,$1B08,$1B0A,$1B0C,$1B12,$1B14
	dw $1B12,$1B14,$1B1A,$1B1C,$1B1A,$1B1C,$1B2A,$1B20
	dw $1B22,$1B24,$1B20,$1B22,$1B2A,$1B24,$1B44,$1B30
	dw $1B32,$1B34,$1B32,$1B34,$1B30,$1B3C,$1B46,$1B4A
	dw $1B48,$1B44,$1B46,$1B48,$1B4A,$1B3C,$1B4E,$1B50
	dw $1B52,$1B4E,$1B50,$1B58,$1B52,$1B58,$1B70,$1B72
	dw $1B74,$1B64,$1B66,$1B68,$1B6A,$1B6E,$1B6E,$1B70
	dw $1B72,$1B74,$1B76,$1B78,$1B7A,$1B76,$1B78,$1B80
	dw $1B7A,$1B80,$1B86,$1B88,$1B8A,$1B8C,$1B8E,$1B90
	dw $1B92,$1B94,$1B96,$1B98,$1B9A,$1B9C,$1B9E,$1BA0
	dw $1BA2,$1BA4,$1BB2,$1BA8,$1BAA,$1BAC,$1BA8,$1BAA
	dw $1BB2,$1BAC,$1BBA,$1BBC,$1BBA,$1BBC,$1BBE,$1BC0
	dw $1BC2,$1BBE,$1BC0,$1BC8,$1BC2,$1BC8,$1BCE,$1BD0
	dw $1BD2,$1BD4,$1BD6,$1BD8,$1BDC,$1BDC,$1BDE

DATA_13B4AC:
	dw $1A62,$1A62,$1A7A,$1A68,$1A68,$1A7C,$1A6E,$1A6E
	dw $1A7E,$1A74,$1A74,$1A80,$1A7A,$1A7C,$1A7E,$1A80
	dw $1A82,$1A82,$1A9A,$1A88,$1A88,$1A9C,$1A8E,$1A8E
	dw $1A9E,$1A94,$1A94,$1AA0,$1A9A,$1A9C,$1A9E,$1AA0
	dw $1AA2,$1AA4,$1AA6,$1AA8,$1AAA,$1AAC,$1AAE,$1AB0
	dw $1AB2,$1AB4,$1AB6,$1AB8,$1ABC,$1ABC,$1AC4,$1AC2
	dw $1AC2,$1AC4,$1AC8,$1AC8,$1ACA,$1ACA,$1AD0,$1AD0
	dw $1AD2,$1AD2,$1ADE,$1AD8,$1AD8,$1AE0,$1ADE,$1AE0
	dw $1AE4,$1AE4,$1AE8,$1AE8,$1AEA,$1AEA,$1AF6,$1AF0
	dw $1AF0,$1AF8,$1AF6,$1AF8,$1AFC,$1AFC,$1AFE,$1B00
	dw $1B02,$1B04,$1B08,$1B08,$1B0C,$1B0C,$1B0E,$1B10
	dw $1B12,$1B14,$1B18,$1B18,$1B1C,$1B1C,$1B26,$1B20
	dw $1B24,$1B24,$1B26,$1B2C,$1B20,$1B2C,$1B36,$1B30
	dw $1B32,$1B3C,$1B36,$1B4C,$1B3A,$1B3C,$1B3E,$1B3A
	dw $1B3E,$1B32,$1B46,$1B46,$1B30,$1B4C,$1B50,$1B50
	dw $1B58,$1B56,$1B56,$1B58,$1B5C,$1B5C,$1B5E,$1B5E
	dw $1B6C,$1B66,$1B66,$1B6A,$1B6A,$1B6C,$1B6E,$1B70
	dw $1B70,$1B6E,$1B76,$1B78,$1B7A,$1B7C,$1B7E,$1B80
	dw $1B82,$1B84,$1B86,$1B88,$1B8A,$1B8C,$1B8E,$1B8E
	dw $1B9A,$1B94,$1B94,$1B9C,$1B9A,$1B9C,$1BA0,$1BA0
	dw $1BA4,$1BA4,$1BA8,$1BA8,$1BAC,$1BAC,$1BAE,$1BB4
	dw $1BA8,$1BB4,$1BB6,$1BB8,$1BBA,$1BBC,$1BC0,$1BC0
	dw $1BC8,$1BC6,$1BC6,$1BC8,$1BCC,$1BCC,$1BCE,$1BD0
	dw $1BD4,$1BD4,$1BD6,$1BD8,$1BDA,$1BDC,$1BDE

DATA_13B62A:
	dw $1A7A,$1A66,$1A66,$1A7C,$1A6C,$1A6C,$1A7E,$1A72
	dw $1A72,$1A80,$1A78,$1A78,$1A7A,$1A7C,$1A7E,$1A80
	dw $1A9A,$1A86,$1A86,$1A9C,$1A8C,$1A8C,$1A9E,$1A92
	dw $1A92,$1AA0,$1A98,$1A98,$1A9A,$1A9C,$1A9E,$1AA0
	dw $1AA4,$1AA4,$1AAC,$1AAA,$1AAA,$1AAC,$1AB0,$1AB0
	dw $1AB2,$1AB4,$1AB6,$1AB8,$1ABA,$1ABC,$1ABE,$1AC0
	dw $1AC2,$1AC4,$1AC6,$1AC8,$1AD0,$1ACE,$1ACE,$1AD0
	dw $1ADE,$1AD6,$1AD6,$1AE0,$1ADC,$1ADC,$1ADE,$1AE0
	dw $1AE2,$1AE4,$1AE6,$1AE8,$1AF6,$1AEE,$1AEE,$1AF8
	dw $1AF4,$1AF4,$1AF6,$1AF8,$1AFA,$1AFC,$1B00,$1B00
	dw $1B04,$1B04,$1B06,$1B08,$1B0A,$1B0C,$1B10,$1B10
	dw $1B14,$1B14,$1B16,$1B18,$1B1A,$1B1C,$1B28,$1B24
	dw $1B22,$1B24,$1B2C,$1B28,$1B22,$1B2C,$1B38,$1B30
	dw $1B3C,$1B34,$1B4C,$1B38,$1B3A,$1B3C,$1B3A,$1B40
	dw $1B40,$1B34,$1B30,$1B4A,$1B4A,$1B4C,$1B4E,$1B50
	dw $1B52,$1B54,$1B56,$1B58,$1B5A,$1B5C,$1B6C,$1B62
	dw $1B6C,$1B64,$1B66,$1B68,$1B6A,$1B6C,$1B6E,$1B6E
	dw $1B74,$1B74,$1B78,$1B78,$1B80,$1B7E,$1B7E,$1B80
	dw $1B84,$1B84,$1B88,$1B88,$1B8C,$1B8C,$1B9A,$1B92
	dw $1B92,$1B9C,$1B98,$1B98,$1B9A,$1B9C,$1B9E,$1BA0
	dw $1BA2,$1BA4,$1BB0,$1BAC,$1BAA,$1BAC,$1BB4,$1BB0
	dw $1BAA,$1BB4,$1BB8,$1BB8,$1BBC,$1BBC,$1BBE,$1BC0
	dw $1BC2,$1BC4,$1BC6,$1BC8,$1BCA,$1BCC,$1BD0,$1BD0
	dw $1BD2,$1BD4,$1BD6,$1BD8,$1BDA,$1BDC,$1BDE

DATA_13B7A8:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1C04,$1C04,$1C04,$1C04,$1C04,$1C04,$1C04,$1C04
	dw $1C04,$1C04,$1C04,$1C04,$1C04,$1C04,$1C04,$1C04
	dw $1BF8,$1BF8,$1BF8,$1BF8,$1BF8,$1BF8,$1BF8,$1BF8
	dw $1BE0,$1BE0,$1BE0,$1BE0,$1BFA,$1BFA,$1BFA,$1BFA
	dw $1BFA,$1BFA,$1BFA,$1BFA,$1BE6,$1BE6,$1BE6,$1BE6
	dw $1BF4,$1BF4,$1BF4,$1BF4,$1BF4,$1BF4,$1BF4,$1BF4
	dw $1BEE,$1BEE,$1BEE,$1BEE,$1BF6,$1BF6,$1BF6,$1BF6
	dw $1BF6,$1BF6,$1BF6,$1BF6,$1C30,$1C30,$1BFC,$1BFC
	dw $1BFC,$1BFC,$1BFE,$1BFE,$1BFE,$1BFE,$1C00,$1C00
	dw $1C00,$1C00,$1C02,$1C02,$1C02,$1C02,$1C1A,$1C1A
	dw $1C1A,$1C1A,$1C1A,$1C1A,$1C1A,$1C1A,$1C18,$1C18
	dw $1C18,$1C18,$1C18,$1C18,$1C18,$1C18,$1C18,$1C18
	dw $1C18,$1C18,$1C18,$1C18,$1C18,$1C18,$1BF0,$1BF0
	dw $1BF0,$1BF0,$1BF0,$1BF0,$1BF0,$1BF0,$1C5C,$1C5E
	dw $1C5C,$1C2E,$1C2E,$1C2E,$1C2E,$1C5C,$1C5E,$1C5C
	dw $1C5E,$1C5C,$1BF2,$1BF2,$1BF2,$1BF2,$1BF2,$1BF2
	dw $1BF2,$1BF2,$1BEC,$1BEC,$1BEC,$1BEC,$1BE4,$1BE4
	dw $1BE4,$1BE4,$1BE4,$1BE4,$1BE4,$1BE4,$1BEA,$1BEA
	dw $1BEA,$1BEA,$1BE2,$1BE2,$1BE2,$1BE2,$1BE2,$1BE2
	dw $1BE2,$1BE2,$1BE8,$1BE8,$1BE8,$1BE8,$1C32,$1C32
	dw $1C32,$1C32,$1C32,$1C32,$1C32,$1C32,$1C34,$1C34
	dw $1C36,$1C36,$1C38,$1C38,$1C3A,$1C3A

CODE_13B924:
	REP.b #$30
	LDA.b $15
	AND.w #$0001
	ASL
	TAY
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13B943
	CMP.w $1C5E
	BEQ.b CODE_13B943
	CMP.w $1D94
	BEQ.b CODE_13B943
	CMP.w $1D96
	BNE.b CODE_13B948
CODE_13B943:
	LDY.w #$1C48
	BRA.b CODE_13B94C

CODE_13B948:
	LDA.w DATA_13B958,y
	TAY
CODE_13B94C:
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13B958:
	dw $1C46,$1C52

CODE_13B95C:
	REP.b #$30
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13B982
	ASL
	TAY
	LDA.b $2A
	BPL.b CODE_13B975
	TYA
	ORA.w #$0004
	TAY
CODE_13B975:
	LDX.b $1D
	LDA.w DATA_13B985,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13B982:
	SEP.b #$30
	RTL

DATA_13B985:
	dw $1C50,$1C4E,$1C4A,$1C4C

CODE_13B98D:
	REP.b #$30
	LDA.b $12
	CMP.w #$00C2
	BCC.b CODE_13BA0D
	CMP.w #$00C8
	BCS.b CODE_13BA0D
	CMP.w #$150D
	BEQ.b CODE_13BA0D
	CMP.w #$150E
	BEQ.b CODE_13BA0D
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13B9BF
	INC
	CMP.b $2A
	BNE.b CODE_13B9B6
	LDY.w #$0006
	BRA.b CODE_13B9BF

CODE_13B9B6:
	INY
	INY
	AND.w #$0001
	BEQ.b CODE_13B9BF
	INY
	INY
CODE_13B9BF:
	LDA.b $28
	BEQ.b CODE_13B9C8
	INC
	CMP.b $2A
	BNE.b CODE_13B9E1
CODE_13B9C8:
	LDA.b $12
	CMP.w $19DA
	BCC.b CODE_13B9D4
	CMP.w $1A5E
	BCC.b CODE_13BA0D
CODE_13B9D4:
	CMP.w #$00D1
	BEQ.b CODE_13B9DE
	CMP.w #$00D2
	BNE.b CODE_13B9E1
CODE_13B9DE:
	LDY.w #$0002
CODE_13B9E1:
	LDA.w DATA_13BA10,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $12
	CMP.w #$00C4
	BCC.b CODE_13BA0D
	CMP.w #$00C8
	BCS.b CODE_13BA0D
	LDA.b $28
	BEQ.b CODE_13BA0D
	LDA.b $12
	SEC
	SBC.w #$00C4
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13BA18,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13BA0D

CODE_13BA0D:
	SEP.b #$30
	RTL

DATA_13BA10:
	dw $00D1,$150D,$150E,$00D2

DATA_13BA18:
	dw $151B,$151B,$0000,$151A

CODE_13BA20:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2A
	BPL.b CODE_13BA2B
	INC
	INC
CODE_13BA2B:
	STA.b $00
	LDA.b $28
	BEQ.b CODE_13BA44
	INY
	INY
	INC
	CMP.b $00
	BEQ.b CODE_13BA44
	LDA.b $15
	AND.w #$0003
	ASL
	TAX
	JSR.w (DATA_13BA9E,x)
	BRA.b CODE_13BA8F

CODE_13BA44:
	LDA.b $2C
	BNE.b CODE_13BA8F
	LDA.b $12
	CMP.w $19DA
	BCC.b CODE_13BA54
	CMP.w $1A5E
	BCC.b CODE_13BA8F
CODE_13BA54:
	CMP.w #$150D
	BEQ.b CODE_13BA8F
	CMP.w #$150E
	BEQ.b CODE_13BA8F
	CMP.w #$00D1
	BEQ.b CODE_13BA6A
	CMP.w #$00D2
	BNE.b CODE_13BA6F
	INY
	INY
CODE_13BA6A:
	LDA.w DATA_13BA98,y
	BRA.b CODE_13BA89

CODE_13BA6F:
	LDA.b $2A
	BPL.b CODE_13BA78
	TYA
	EOR.w #$0002
	TAY
CODE_13BA78:
	LDA.b $2C
	BNE.b CODE_13BA8F
	LDA.b $12
	CMP.w #$00C5
	BNE.b CODE_13BA86
	LDY.w #$0004
CODE_13BA86:
	LDA.w DATA_13BA92,y
CODE_13BA89:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BA8F:
	SEP.b #$30
	RTL

DATA_13BA92:
	dw $00D1,$00D2,$151B

DATA_13BA98:
	dw $150D,$150E,$150D

DATA_13BA9E:
	dw CODE_13BAA4
	dw CODE_13BAE6
	dw CODE_13BB13

CODE_13BAA4:
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13BAD5
	ASL
	STA.b $00
	LDA.b $28
	EOR.w #$0001
	AND.w #$0001
	STA.b $9B
	ASL
	ASL
	TAY
	LDA.b $2A
	BPL.b CODE_13BAC4
	TYA
	ORA.w #$0008
	TAY
CODE_13BAC4:
	TYA
	ORA.b $00
	TAY
	LDX.b $1D
	LDA.w DATA_13BAD6,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BAD5:
	RTS

DATA_13BAD6:
	dw $1A42,$1A60,$1A50,$1A5C,$1A34,$1A5E,$1A2A,$1A40

CODE_13BAE6:
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13BB0A
	ASL
	TAY
	LDA.b $2A
	BPL.b CODE_13BAFD
	TYA
	ORA.w #$0004
	TAY
CODE_13BAFD:
	LDX.b $1D
	LDA.w DATA_13BB0B,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BB0A:
	RTS

DATA_13BB0B:
	dw $1A16,$1A28,$1A02,$1A14

CODE_13BB13:
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_13BB38
	ASL
	TAY
	LDA.b $2A
	BPL.b CODE_13BB2B
	TYA
	CLC
	ADC.w #$0006
	TAY
CODE_13BB2B:
	LDX.b $1D
	LDA.w DATA_13BB39,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BB38:
	RTS

DATA_13BB39:
	dw $19EE,$19F6,$1A00,$19DA,$19E2,$19EC

CODE_13BB45:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13BB59
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13BB6E
	INY
	INY
	BRA.b CODE_13BB62

CODE_13BB59:
	LDA.b $12
	CMP.w $1BF8
	BNE.b CODE_13BB6E
	BRA.b CODE_13BB69

CODE_13BB62:
	LDA.b $12
	CMP.w $1BFA
	BNE.b CODE_13BB6E
CODE_13BB69:
	TYA
	ORA.w #$0008
	TAY
CODE_13BB6E:
	LDA.b $15
	CMP.w #$0057
	BEQ.b CODE_13BB7A
	LDA.w DATA_13BB98,y
	BRA.b CODE_13BB7D

CODE_13BB7A:
	LDA.w DATA_13BB8A,y
CODE_13BB7D:
	TAY
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13BB8A:
	dw $1D30,$1D32,$1D34,$0000,$1D36,$1D32,$1D38

DATA_13BB98:
	dw $1C8C,$1C8E,$1C90,$0000,$1C8C,$1C8E,$1C90

CODE_13BBA6:
	REP.b #$30
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13BBB8
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13BBB8
	INX
	INX
CODE_13BBB8:
	JSR.w (DATA_13BBBE,x)
	SEP.b #$30
	RTL

DATA_13BBBE:
	dw CODE_13BBC4
	dw CODE_13BC73
	dw CODE_13BCD4

CODE_13BBC4:
	LDA.b $A1
	BPL.b CODE_13BBCB
	JMP.w CODE_13BC72

CODE_13BBCB:
	LDA.b $A1
	BNE.b CODE_13BBEF
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CE8
	BEQ.b CODE_13BBEF
	CMP.w $1CEA
	BEQ.b CODE_13BBEF
	CMP.w $1CAE
	BCC.b CODE_13BC2A
	CMP.w $1CCA
	BCS.b CODE_13BC2A
CODE_13BBEF:
	LDA.w #$0001
	STA.b $A1
	LDA.b $2C
	BEQ.b CODE_13BC25
	LDA.w #$0001
	STA.b $15
	JSL.l CODE_138231
	REP.b #$30
	JSR.w CODE_13FD61
	CMP.w #$007D
	BEQ.b CODE_13BC1A
	CMP.w #$007E
	BEQ.b CODE_13BC1A
	CMP.w $1C5C
	BEQ.b CODE_13BC1A
	CMP.w $1C5E
	BNE.b CODE_13BC23
CODE_13BC1A:
	LDX.b $1D
	LDA.w $1CE6
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BC23:
	BRA.b CODE_13BC72

CODE_13BC25:
	LDA.w $1CF6
	BRA.b CODE_13BC6C

CODE_13BC2A:
	LDA.b $2C
	BNE.b CODE_13BC72
	LDA.b $12
	CMP.w $1CF0
	BEQ.b CODE_13BC4E
	CMP.w $1CF2
	BEQ.b CODE_13BC4E
	CMP.w $1CF4
	BEQ.b CODE_13BC4E
	CMP.w $1CF6
	BEQ.b CODE_13BC4E
	CMP.w $1CF8
	BEQ.b CODE_13BC4E
	CMP.w $1CFA
	BNE.b CODE_13BC53
CODE_13BC4E:
	LDA.w $1CF2
	BRA.b CODE_13BC6C

CODE_13BC53:
	LDA.w #$8000
	STA.b $A1
	LDA.b $12
	CMP.w $1C28
	BEQ.b CODE_13BC72
	CMP.w $1BF6
	BNE.b CODE_13BC69
	LDA.w $1C28
	BRA.b CODE_13BC6C

CODE_13BC69:
	LDA.w $1CF0
CODE_13BC6C:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BC72:
	RTS

CODE_13BC73:
	STZ.b $A1
	LDA.b $2C
	BNE.b CODE_13BCA3
	LDA.b $12
	CMP.w $1C28
	BEQ.b CODE_13BCA3
	LDY.w #$0000
CODE_13BC83:
	LDX.w DATA_13BCA4,y
	CMP.w $0000,x
	BEQ.b CODE_13BC97
	INY
	INY
	CPY.w #$0018
	BCC.b CODE_13BC83
	LDA.w $1CF2
	BRA.b CODE_13BC9D

CODE_13BC97:
	LDX.w DATA_13BCBC,y
	LDA.w $0000,x
CODE_13BC9D:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BCA3:
	RTS

DATA_13BCA4:
	dw $1BE2,$1BE6,$1BE8,$1BEE,$1BF6,$1C00,$1C02,$1C1A
	dw $1C30,$1C34,$1C36,$1C3A

DATA_13BCBC:
	dw $1C28,$1C28,$1C26,$1C2A,$1C28,$1C26,$1C2A,$1C28
	dw $1C2A,$1C26,$1C2A,$1C2C

CODE_13BCD4:
	LDA.b $A1
	BPL.b CODE_13BCDB
	JMP.w CODE_13BD7F

CODE_13BCDB:
	LDA.b $A1
	BNE.b CODE_13BCFF
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1CE8
	BEQ.b CODE_13BCFF
	CMP.w $1CEA
	BEQ.b CODE_13BCFF
	CMP.w $1CAE
	BCC.b CODE_13BD37
	CMP.w $1CCA
	BCS.b CODE_13BD37
CODE_13BCFF:
	LDA.w #$0001
	STA.b $A1
	LDA.b $2C
	BEQ.b CODE_13BD32
	STZ.b $15
	JSL.l CODE_138231
	REP.b #$30
	JSR.w CODE_13FD54
	CMP.w #$007D
	BEQ.b CODE_13BD27
	CMP.w #$007F
	BEQ.b CODE_13BD27
	CMP.w $1C5C
	BEQ.b CODE_13BD27
	CMP.w $1C5E
	BNE.b CODE_13BD30
CODE_13BD27:
	LDX.b $1D
	LDA.w $1CE4
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BD30:
	BRA.b CODE_13BD7F

CODE_13BD32:
	LDA.w $1CF4
	BRA.b CODE_13BD79

CODE_13BD37:
	LDA.b $2C
	BNE.b CODE_13BD7F
	LDA.b $12
	CMP.w $1CF0
	BEQ.b CODE_13BD5B
	CMP.w $1CF2
	BEQ.b CODE_13BD5B
	CMP.w $1CF4
	BEQ.b CODE_13BD5B
	CMP.w $1CF6
	BEQ.b CODE_13BD5B
	CMP.w $1CF8
	BEQ.b CODE_13BD5B
	CMP.w $1CFA
	BNE.b CODE_13BD60
CODE_13BD5B:
	LDA.w $1CF2
	BRA.b CODE_13BD79

CODE_13BD60:
	LDA.w #$8000
	STA.b $A1
	LDA.b $12
	CMP.w $1C28
	BEQ.b CODE_13BD7F
	CMP.w $1BF6
	BNE.b CODE_13BD76
	LDA.w $1C28
	BRA.b CODE_13BD79

CODE_13BD76:
	LDA.w $1CFA
CODE_13BD79:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BD7F:
	RTS

CODE_13BD80:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_13BD9B
	INC
	CMP.b $2A
	BNE.b CODE_13BDA7
	LDA.b $15
	AND.w #$0004
	BNE.b CODE_13BD96
	LDA.b $2C
	BEQ.b CODE_13BD99
CODE_13BD96:
	JSR.w CODE_13C1F0
CODE_13BD99:
	BRA.b CODE_13BDEA

CODE_13BD9B:
	JSR.w CODE_13C175
	LDA.b $15
	AND.w #$0004
	STA.b $9B
	BRA.b CODE_13BDEA

CODE_13BDA7:
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13BDE7
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0001
	EOR.w #$0001
	STA.b $9B
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.b $15
	AND.w #$0004
	ASL
	STA.b $00
	TYA
	ORA.b $00
	TAY
	LDA.b $12
	CMP.w $1CF4
	BEQ.b CODE_13BDEA
	CMP.w $1CF6
	BEQ.b CODE_13BDEA
	LDA.w DATA_13BDF7,y
	TAY
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13BDEA

CODE_13BDE7:
	JSR.w CODE_13C15F
CODE_13BDEA:
	LDA.b $28
	INC
	INC
	CMP.b $2A
	BNE.b CODE_13BDF4
	STZ.b $9B
CODE_13BDF4:
	SEP.b #$30
	RTL

DATA_13BDF7:
	dw $1D42,$1CB2,$1D44,$1CB4,$1D3A,$1CB2,$1D3C,$1CB4

CODE_13BE07:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_13BE22
	INC
	CMP.b $2A
	BNE.b CODE_13BE2E
	LDA.b $15
	AND.w #$0004
	BNE.b CODE_13BE1D
	LDA.b $2C
	BEQ.b CODE_13BE20
CODE_13BE1D:
	JSR.w CODE_13C1F0
CODE_13BE20:
	BRA.b CODE_13BE63

CODE_13BE22:
	JSR.w CODE_13C175
	LDA.b $15
	AND.w #$0004
	STA.b $9B
	BRA.b CODE_13BE63

CODE_13BE2E:
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13BE60
	ASL
	STA.b $00
	LDA.b $15
	AND.w #$0004
	ORA.b $00
	TAY
	LDA.w #$0001
	STA.b $9B
	LDA.b $12
	CMP.w $1CF4
	BEQ.b CODE_13BE63
	CMP.w $1CF6
	BEQ.b CODE_13BE63
	LDA.w DATA_13BE70,y
	TAY
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13BE63

CODE_13BE60:
	JSR.w CODE_13C15F
CODE_13BE63:
	LDA.b $28
	INC
	INC
	CMP.b $2A
	BNE.b CODE_13BE6D
	STZ.b $9B
CODE_13BE6D:
	SEP.b #$30
	RTL

DATA_13BE70:
	dw $1D5A,$1CB2,$1D56,$1CB4

CODE_13BE78:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_13BE98
	INC
	CMP.b $2A
	BNE.b CODE_13BEA4
	LDA.b $15
	AND.w #$0004
	BNE.b CODE_13BE93
	LDA.b $2C
	BEQ.b CODE_13BE96
	CMP.w #$0001
	BEQ.b CODE_13BE96
CODE_13BE93:
	JSR.w CODE_13C1F0
CODE_13BE96:
	BRA.b CODE_13BEDA

CODE_13BE98:
	JSR.w CODE_13C175
	LDA.b $15
	AND.w #$0004
	STA.b $9B
	BRA.b CODE_13BEDA

CODE_13BEA4:
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_13BED7
	ASL
	STA.b $00
	LDA.b $15
	AND.w #$0004
	ASL
	ORA.b $00
	TAY
	LDA.w #$0001
	STA.b $9B
	LDA.b $12
	CMP.w $1CF4
	BEQ.b CODE_13BEDA
	CMP.w $1CF6
	BEQ.b CODE_13BEDA
	LDA.w DATA_13BEE7,y
	TAY
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13BEDA

CODE_13BED7:
	JSR.w CODE_13C15F
CODE_13BEDA:
	LDA.b $28
	INC
	INC
	CMP.b $2A
	BNE.b CODE_13BEE4
	STZ.b $9B
CODE_13BEE4:
	SEP.b #$30
	RTL

DATA_13BEE7:
	dw $1D50,$1D52,$1CB2,$0000,$1D4A,$1D4C,$1CB4

CODE_13BEF5:
	REP.b #$30
	LDX.b $1D
	LDA.b $15
	AND.w #$0020
	LSR
	STA.b $02
	LDA.b $28
	BEQ.b CODE_13BF38
	INC
	CMP.b $2A
	BNE.b CODE_13BF45
	LDA.b $02
	BEQ.b CODE_13BF14
	LDA.b $2C
	BNE.b CODE_13BF14
	DEC.b $2E
CODE_13BF14:
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_13BF23
	JSR.w CODE_13C1F0
	STZ.b $A1
	JMP.w CODE_13BFF2

CODE_13BF23:
	LDA.b $A1
	BNE.b CODE_13BF35
	LDA.b $12
	CMP.w $1C04
	BNE.b CODE_13BF35
	LDA.w $1C1E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13BF35:
	JMP.w CODE_13BFF2

CODE_13BF38:
	LDA.b $2C
	INC
	CMP.b $2E
	BCS.b CODE_13BF42
	JSR.w CODE_13C175
CODE_13BF42:
	JMP.w CODE_13BFF2

CODE_13BF45:
	LDA.b $02
	BEQ.b CODE_13BF62
	LDA.b $2C
	BNE.b CODE_13BF62
	LDA.b $28
	CMP.w #$0001
	BEQ.b CODE_13BF62
	DEC.b $2E
	LDA.b $2E
	CMP.w #$0002
	BNE.b CODE_13BF62
	LDA.w #$0002
	BRA.b CODE_13BF8D

CODE_13BF62:
	LDA.b $28
	INC
	INC
	CMP.b $2A
	BNE.b CODE_13BF83
	LDA.b $2C
	BNE.b CODE_13BF83
	LDA.b $2E
	CMP.w #$0003
	BCS.b CODE_13BF83
	DEC.b $2A
	LDA.b $2A
	CMP.w #$0002
	BEQ.b CODE_13BF8D
	LDA.w #$0001
	BRA.b CODE_13BF8D

CODE_13BF83:
	LDA.b $2C
	INC
	INC
	CMP.b $2E
	BCC.b CODE_13BFDE
	LDA.b $2E
CODE_13BF8D:
	CLC
	SBC.b $2C
	BMI.b CODE_13BFF2
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0001
	EOR.w #$0001
	ASL
	ASL
	ASL
	ORA.b $00
	ORA.b $02
	STA.b $00
	TAY
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$0008
	BNE.b CODE_13BFB6
	LDA.w DATA_13C015,y
	BEQ.b CODE_13BFF2
	BRA.b CODE_13BFB9

CODE_13BFB6:
	LDA.w DATA_13BFF5,y
CODE_13BFB9:
	TAY
	LDA.w $0000,y
	CMP.w $1C1E
	BNE.b CODE_13BFCE
	LDA.b $12
	CMP.w $1C18
	BEQ.b CODE_13BFCE
	CMP.w $1C04
	BNE.b CODE_13BFF2
CODE_13BFCE:
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $00
	AND.w #$0008
	STA.b $A1
	BRA.b CODE_13BFF2

CODE_13BFDE:
	JSR.w CODE_13C15F
	LDA.b $02
	BNE.b CODE_13BFF2
	LDA.b $2C
	BNE.b CODE_13BFF2
	LDA.b $28
	AND.w #$0001
	BNE.b CODE_13BFF2
	DEC.b $2E
CODE_13BFF2:
	SEP.b #$30
	RTL

DATA_13BFF5:
	dw $1C1E,$1D6C,$1CB2,$0000,$1D72,$1CB4,$0000,$0000
	dw $1C1E,$1D82,$1CB2,$0000,$1C1E,$1D82,$1CB4,$0000

DATA_13C015:
	dw $0000,DATA_13C035,$1CB2,$0000,DATA_13C037,$1CB4,$0000,$0000
	dw $0000,DATA_13C039,$1CB2,$0000,$0000,DATA_13C039,$1CB4,$0000

DATA_13C035:
	dw $5703

DATA_13C037:
	dw $5903

DATA_13C039:
	dw $5D04

CODE_13C03B:
	REP.b #$30
	LDA.b $15
	AND.w #$0002
	ASL
	ASL
	ASL
	STA.b $02
	LDA.b $28
	BEQ.b CODE_13C081
	INC
	CMP.b $2A
	BNE.b CODE_13C095
	LDA.b $2C
	BNE.b CODE_13C056
	INC.b $2E
CODE_13C056:
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_13C07E
	INC
	CMP.b $2E
	BEQ.b CODE_13C06A
	JSR.w CODE_13C1F0
	STZ.b $A1
	JMP.w CODE_13C116

CODE_13C06A:
	LDA.b $A1
	BNE.b CODE_13C07E
	LDA.b $12
	CMP.w $1C04
	BNE.b CODE_13C07E
	LDX.b $1D
	LDA.w $1C1E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C07E:
	JMP.w CODE_13C116

CODE_13C081:
	LDA.b $2E
	CMP.w #$0001
	BEQ.b CODE_13C092
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_13C092
	JSR.w CODE_13C175
CODE_13C092:
	JMP.w CODE_13C116

CODE_13C095:
	LDA.b $02
	BNE.b CODE_13C0A0
	LDA.b $28
	AND.w #$0001
	BNE.b CODE_13C0A6
CODE_13C0A0:
	LDA.b $2C
	BNE.b CODE_13C0A6
	INC.b $2E
CODE_13C0A6:
	LDA.b $2C
	INC
	INC
	CMP.b $2E
	BCC.b CODE_13C113
	LDA.b $2E
	SEC
	SBC.b $2C
	BMI.b CODE_13C116
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0001
	EOR.w #$0001
	ASL
	ASL
	ASL
	ORA.b $00
	ORA.b $02
	TAY
	LDX.b $1D
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.w #$0008
	BNE.b CODE_13C0D9
	LDA.w DATA_13C139,y
	BEQ.b CODE_13C116
	BRA.b CODE_13C0DC

CODE_13C0D9:
	LDA.w DATA_13C119,y
CODE_13C0DC:
	TAY
	LDA.w $0000,y
	CMP.w $1C1C
	BNE.b CODE_13C0F8
	LDA.b $12
	CMP.w $1C04
	BEQ.b CODE_13C0F8
	CMP.w $1BFA
	BEQ.b CODE_13C101
	CMP.w $1C02
	BEQ.b CODE_13C10A
	BRA.b CODE_13C116

CODE_13C0F8:
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13C116

CODE_13C101:
	LDA.w $1C2E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13C116

CODE_13C10A:
	LDA.w $1C30
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13C116

CODE_13C113:
	JSR.w CODE_13C15F
CODE_13C116:
	SEP.b #$30
	RTL

DATA_13C119:
	dw $1C1C,$1D60,$1CB2,$0000,$1C1C,$1C1C,$1D66,$1CB4
	dw $1C1C,$1C1C,$1D78,$1CB2,$1C1C,$1C1C,$1D78,$1CB4

DATA_13C139:
	dw $0000,DATA_13C159,$1CB2,$0000,$0000,$0000,DATA_13C15B,$1CB4
	dw $0000,$0000,DATA_13C15D,$1CB2,$0000,$0000,DATA_13C15D,$1CB4

DATA_13C159:
	dw $5303

DATA_13C15B:
	dw $5503

DATA_13C15D:
	dw $5B05

CODE_13C15F:
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	TAY
	LDX.w DATA_138121,y
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13C175:
	LDA.b $12
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C193
	LDA.b $12
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C194,y
	TAY
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C193:
	RTS

DATA_13C194:
	dw $1BE0,$1BEE,$1BEA,$1C36,$1C3A,$1BEA,$1C38,$1BEE
	dw $1BF0,$1BE0,$1BFE,$1C02,$1BE0,$1BFA,$1C38,$1BFE
	dw $1C3A,$1C02,$1BFA,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1C32,$1BEE,$1C2E,$1C1E
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1C2E
	dw $1C30,$1C32,$1C34,$1C36,$1C38,$1C3A

CODE_13C1F0:
	LDA.b $12
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C20E
	LDA.b $12
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C20F,y
	TAY
	LDA.w $0000,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C20E:
	RTS

DATA_13C20F:
	dw $1BE0,$1BE8,$1BEC,$1C34,$1BE8,$1C38,$1BEC,$1C3A
	dw $1BE0,$1BF2,$1BFC,$1C00,$1BF8,$1BE0,$1BFC,$1C38
	dw $1C00,$1C3A,$1BF8,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1BF8,$1C00,$1C1C,$1C1E
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1C2E
	dw $1C30,$1BE0,$1C34,$1C36,$1C38,$1C3A

DATA_13C26B:
	dw $151E,$151F,$1520,$0000

CODE_13C273:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13C285
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13C285
	INY
	INY
CODE_13C285:
	LDA.w DATA_13C26B,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13C291:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ADC.b $00
	CLC
	ADC.w #$8900
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13C2AF:
	REP.b #$30
	JSR.w CODE_13C15F
	LDA.b $28
	BNE.b CODE_13C2BF
	LDA.b $2C
	BNE.b CODE_13C2BF
	JSR.w CODE_13C539
CODE_13C2BF:
	LDA.b $28
	BNE.b CODE_13C2C6
	JSR.w CODE_13C570
CODE_13C2C6:
	LDA.b $28
	BNE.b CODE_13C2D4
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13C2D4
	JSR.w CODE_13C58E
CODE_13C2D4:
	LDA.b $2C
	BNE.b CODE_13C2DB
	JSR.w CODE_13C5C5
CODE_13C2DB:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13C2E5
	JSR.w CODE_13C5EC
CODE_13C2E5:
	LDA.b $2C
	BNE.b CODE_13C2F3
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13C2F3
	JSR.w CODE_13C613
CODE_13C2F3:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13C2FD
	JSR.w CODE_13C64D
CODE_13C2FD:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13C30E
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13C30E
	JSR.w CODE_13C66B
CODE_13C30E:
	SEP.b #$30
	RTL

DATA_13C311:
	dw $1BE0,$1BE2,$1BE4,$1BE6,$1BE8,$1BEA,$1BEC,$1BEE
	dw $1BF0,$1BF2,$1BF4,$1BF6,$1BF8,$1BFA,$1BEC,$1BFE
	dw $1C00,$1C02,$1C04,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1C18,$1C1A,$1C1C,$1C1E
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1C2E
	dw $1C30,$1C32,$1C34,$1C36,$1C38,$1C3A

DATA_13C36D:
	dw $1BE0,$1BE2,$1BE4,$1BE6,$1BE8,$1BEA,$1BEC,$1BEE
	dw $1BF0,$1BF2,$1BF4,$1BF6,$1BF8,$1BFA,$1BFC,$1BFE
	dw $1C00,$1C02,$1C04,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1C18,$1BE2,$1C1C,$1C1E
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1C2E
	dw $1C30,$1C32,$1C34,$1C36,$1C38,$1C3A

DATA_13C3C9:
	dw $1C3A,$1BE2,$1BE6,$1BE6,$1BE8,$1C36,$1C34,$1BEE
	dw $1BEE,$1BE8,$1BE6,$1BF6,$1C00,$1C02,$1C34,$1C36
	dw $1C00,$1C02,$1BF6,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1C1A,$1C1A,$1C1C,$1C1E
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1C30
	dw $1C30,$1BEE,$1C34,$1C36,$1C38,$1C3A

DATA_13C425:
	dw $1C38,$1BE6,$1BE4,$1BE6,$1C34,$1BEA,$1BEC,$1C36
	dw $1BEA,$1BEC,$1BF4,$1BE6,$1BFC,$1BFE,$1BFC,$1BFE
	dw $1C34,$1C36,$1BF4,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1BF4,$1BE6,$1BF4,$1BF4
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1BFE
	dw $1C36,$1BFE,$1C34,$1C36,$1C38,$1C3A

DATA_13C481:
	dw $1BE0,$1BE2,$1BE4,$1BE6,$1BE8,$1BEA,$1BEC,$1BEE
	dw $1BF0,$1BF2,$1BE4,$1BF6,$1BF8,$1BFA,$1BFC,$1BEA
	dw $1C00,$1C02,$1C04,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1C18,$1C1A,$1C1C,$1C1E
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1C2E
	dw $1C30,$1C32,$1C34,$1C36,$1C38,$1C3A

DATA_13C4DD:
	dw $1BE0,$1BE2,$1BE4,$1BE6,$1BE8,$1BEA,$1BEC,$1BEE
	dw $1BF0,$1BF2,$1BF4,$1C1A,$1BF8,$1C32,$1BFC,$1BFE
	dw $1C00,$1BEE,$1C18,$1C06,$1C08,$1C0A,$1C0C,$1C0E
	dw $1C10,$1C12,$1C14,$1C16,$1C18,$1C1A,$1C1C,$1C1E
	dw $1C20,$1C22,$1C24,$1C26,$1C28,$1C2A,$1C2C,$1C2E
	dw $1C30,$1C32,$1C34,$1C36,$1C38,$1C3A

CODE_13C539:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C56F
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C311,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C56F:
	RTS

CODE_13C570:
	JSR.w CODE_13FD54
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C58D
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C194,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C58D:
	RTS

CODE_13C58E:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C5C4
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C36D,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C5C4:
	RTS

CODE_13C5C5:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C5EB
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C3C9,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C5EB:
	RTS

CODE_13C5EC:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C612
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C425,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C612:
	RTS

CODE_13C613:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C64C
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C481,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C64C:
	RTS

CODE_13C64D:
	JSR.w CODE_13FD61
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C66A
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C20F,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C66A:
	RTS

CODE_13C66B:
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $00
	TXA
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	ORA.b $00
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	TAY
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13C6A4
	TYA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_13C4DD,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C6A4:
	RTS

CODE_13C6A5:
	REP.b #$30
	JSL.l CODE_128875
	AND.w #$003F
	CMP.w #$000B
	BCC.b CODE_13C6B8
	LDA.w #$79E0
	BRA.b CODE_13C6BC

CODE_13C6B8:
	CLC
	ADC.w #$79BB
CODE_13C6BC:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C6C5:
	dw $6000,$7400

CODE_13C6C9:
	REP.b #$30
	LDX.b $1D
	JSL.l CODE_01E501
	BNE.b CODE_13C6E0
	LDA.b $15
	AND.w #$0002
	TAY
	LDA.w DATA_13C6C5,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C6E0:
	SEP.b #$30
	RTL

CODE_13C6E3:
	REP.b #$30
	LDX.b $1D
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13C6F7
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13C6F7
	INY
	INY
CODE_13C6F7:
	LDA.b $2C
	BEQ.b CODE_13C702
	INC
	CMP.b $2E
	BNE.b CODE_13C707
	BRA.b CODE_13C70C

CODE_13C702:
	LDA.w DATA_13C716,y
	BRA.b CODE_13C70F

CODE_13C707:
	LDA.w DATA_13C71C,y
	BRA.b CODE_13C70F

CODE_13C70C:
	LDA.w DATA_13C722,y
CODE_13C70F:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C716:
	dw $6100,$6101,$6102

DATA_13C71C:
	dw $0185,$0186,$0187

DATA_13C722:
	dw $6103,$6104,$6105

CODE_13C728:
	REP.b #$30
	LDX.b $1D
	LDY.w #$6400
	LDA.b $28
	BEQ.b CODE_13C73A
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13C73A
	INY
CODE_13C73A:
	TYA
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13C742:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13C75E
	LDA.b $28
	BNE.b CODE_13C7A3
	JSR.w CODE_13FD54
	CMP.w $1C5C
	BEQ.b CODE_13C759
	CMP.w $1C5E
	BNE.b CODE_13C7A3
CODE_13C759:
	LDA.w $1D14
	BRA.b CODE_13C79D

CODE_13C75E:
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13C76E
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13C76E
	INY
	INY
CODE_13C76E:
	LDA.b $2C
	CMP.w #$0001
	BNE.b CODE_13C79A
	LDA.b $28
	BNE.b CODE_13C795
	JSR.w CODE_13FD54
	CMP.w $1CB6
	BEQ.b CODE_13C790
	CMP.w $1CB8
	BEQ.b CODE_13C790
	CMP.w $1CD2
	BEQ.b CODE_13C790
	CMP.w $1CE6
	BNE.b CODE_13C795
CODE_13C790:
	LDA.w $1CFC
	BRA.b CODE_13C79D

CODE_13C795:
	LDA.w DATA_13C7A6,y
	BRA.b CODE_13C79D

CODE_13C79A:
	LDA.w DATA_13C7AC,y
CODE_13C79D:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C7A3:
	SEP.b #$30
	RTL

DATA_13C7A6:
	dw $0188,$0189,$018A

DATA_13C7AC:
	dw $018B,$018C,$018D

CODE_13C7B2:
	REP.b #$30
	LDX.b $1D
	LDA.w #$0184
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JMP.w CODE_13A833

CODE_13C7C0:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13C7D2
	INY
	INY
	INC
	CMP.b $2E
	BNE.b CODE_13C7D2
	INY
	INY
CODE_13C7D2:
	LDX.b $1D
	LDA.w DATA_13C7E2,y
	TAY
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C7E2:
	dw $1DD6,$1DD0,$1DD2

CODE_13C7E8:
	REP.b #$30
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	TAY
	LDA.b $15
	AND.w #$00FF
	CMP.w #$008B
	BNE.b CODE_13C800
	LDY.w #$0010
CODE_13C800:
	LDX.b $1D
	LDA.w DATA_13C80C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C80C:
	dw $0199,$019A,$019B,$019C,$019D,$019E,$019F,$01A0
	dw $7300

CODE_13C81E:
	LDX.b #$00
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13C829
	LDX.b #$02
CODE_13C829:
	JSR.w (DATA_13C82D,x)
	RTL

DATA_13C82D:
	dw CODE_13C831
	dw CODE_13C850

CODE_13C831:
	REP.b #$30
	JSL.l CODE_128875
	AND.w #$0003
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13C848,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTS

DATA_13C848:
	dw $3D3B,$3D3C,$3D49,$3D4A

CODE_13C850:
	REP.b #$30
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13C85E
	CMP.w $1C5E
	BNE.b CODE_13C831
CODE_13C85E:
	LDX.b $1D
	LDA.w #$3D4B
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTS

CODE_13C86A:
	REP.b #$30
	LDA.w #DATA_13C877
	STA.b $00
	JSR.w CODE_13C8A9
	SEP.b #$30
	RTL

DATA_13C877:
	dw $3D37,$3D38,$3D45,$3D46

CODE_13C87F:
	REP.b #$30
	LDA.w #DATA_13C88C
	STA.b $00
	JSR.w CODE_13C8A9
	SEP.b #$30
	RTL

DATA_13C88C:
	dw $0141,$0142,$0143,$0144

CODE_13C894:
	REP.b #$30
	LDA.w #DATA_13C8A1
	STA.b $00
	JSR.w CODE_13C8A9
	SEP.b #$30
	RTL

DATA_13C8A1:
	dw $3D39,$3D3A,$3D47,$3D48

CODE_13C8A9:
	SEP.b #$20
	LDA.b $28
	AND.b #$01
	STA.b $02
	LDA.b $2C
	ASL
	ORA.b $02
	ASL
	REP.b #$20
	AND.w #$00FF
	TAY
	LDX.b $1D
	LDA.b ($00),y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13C8C6:
	REP.b #$30
	LDY.b $28
	LDA.b $2C
	AND.w #$0001
	BEQ.b CODE_13C8D4
	INY
	INY
	INY
CODE_13C8D4:
	TYA
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13C8E3,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C8E3:
	dw $3D42,$3D43,$3D44,$3D50,$3D51,$3D52

CODE_13C8EF:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13C901,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C901:
	dw $3D53,$3D54,$3D55

CODE_13C907:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13C919,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C919:
	dw $3D53,$3D57

CODE_13C91D:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13C92F,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13C92F:
	dw $3D56,$3D55

CODE_13C933:
	REP.b #$30
	LDX.b $1D
	LDA.w #$3D58
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13C941:
	LDA.b #DATA_13C94D
	STA.b $00
	LDA.b #DATA_13C94D>>8
	STA.b $01
	JSR.w CODE_13C969
	RTL

DATA_13C94D:
	dw $3D3E,$3D3D,$3D3F,$3D40

CODE_13C955:
	LDA.b #DATA_13C961
	STA.b $00
	LDA.b #DATA_13C961>>8
	STA.b $01
	JSR.w CODE_13C969
	RTL

DATA_13C961:
	dw $3D5A,$6700,$3D59,$6600

CODE_13C969:
	REP.b #$30
	LDA.b $2C
	CLC
	ROR
	ROR
	STA.b $9B
	LDA.b $28
	BNE.b CODE_13C988
	STZ.b $9B
	LDA.b $2C
	BNE.b CODE_13C9AA
	LDY.w #$0001
	LDA.b $2A
	BPL.b CODE_13C99F
	LDY.w #$0003
	BRA.b CODE_13C99F

CODE_13C988:
	BPL.b CODE_13C98D
	DEC
	BRA.b CODE_13C98E

CODE_13C98D:
	INC
CODE_13C98E:
	CMP.b $2A
	BNE.b CODE_13C996
	LDA.b $2C
	BNE.b CODE_13C9AA
CODE_13C996:
	LDA.b $2C
	TAY
	LDA.b $2A
	BPL.b CODE_13C99F
	INY
	INY
CODE_13C99F:
	TYA
	ASL
	TAY
	LDA.b ($00),y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C9AA:
	SEP.b #$30
	RTS

CODE_13C9AD:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	ASL
	TAY
	LDA.b $12
	STA.b $00
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13C9CC
	LDX.w #$0006
	INC
	CMP.b $2E
	BNE.b CODE_13C9CC
	LDX.w #$000C
CODE_13C9CC:
	LDA.b $28
	BEQ.b CODE_13C9DB
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13C9DB
	INX
	INX
	BRA.b CODE_13C9DB

CODE_13C9DB:
	JSR.w (DATA_13C9ED,x)
	TXA
	BMI.b CODE_13C9EA
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13C9EA:
	SEP.b #$30
	RTL

DATA_13C9ED:
	dw CODE_13C9FF
	dw CODE_13CA2A
	dw CODE_13CA2E
	dw CODE_13CA59
	dw CODE_13CA98
	dw CODE_13CAA0
	dw CODE_13CADF
	dw CODE_13CB0B
	dw CODE_13CB1D

CODE_13C9FF:
	LDA.b $00
	CMP.w $1D90
	BEQ.b CODE_13CA0B
	CMP.w $1DAC
	BNE.b CODE_13CA10
CODE_13CA0B:
	LDX.w #$1D9E
	BRA.b CODE_13CA29

CODE_13CA10:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1D9C
	BNE.b CODE_13CA26
	LDX.w #$FFFF
	BRA.b CODE_13CA29

CODE_13CA26:
	LDX.w #$1DAE
CODE_13CA29:
	RTS

CODE_13CA2A:
	LDX.w #$1DAE
	RTS

CODE_13CA2E:
	LDA.b $00
	CMP.w $1D8A
	BEQ.b CODE_13CA3A
	CMP.w $1DAA
	BNE.b CODE_13CA3F
CODE_13CA3A:
	LDX.w #$1D9C
	BRA.b CODE_13CA58

CODE_13CA3F:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1D9E
	BNE.b CODE_13CA55
	LDX.w #$FFFF
	BRA.b CODE_13CA58

CODE_13CA55:
	LDX.w #$1DAE
CODE_13CA58:
	RTS

CODE_13CA59:
	LDX.w DATA_13CA94,y
	LDA.b $00
	CMP.w $1D8C
	BEQ.b CODE_13CA98
	CMP.w $1D8E
	BEQ.b CODE_13CA98
	CMP.w $1D90
	BEQ.b CODE_13CA98
	CMP.w $1DAC
	BEQ.b CODE_13CA98
	CMP.w $1D9C
	BEQ.b CODE_13CA90
	CMP.w $1D9E
	BEQ.b CODE_13CA90
	CMP.w $1DA4
	BEQ.b CODE_13CA90
	CMP.w $1DA2
	BEQ.b CODE_13CA93
	CMP.w $1DAE
	BNE.b CODE_13CA93
	LDX.w #$1D9C
	BRA.b CODE_13CA93

CODE_13CA90:
	LDX.w #$FFFF
CODE_13CA93:
	RTS

DATA_13CA94:
	dw $1D8A,$1DAA

CODE_13CA98:
	LDX.w DATA_13CA9C,y
	RTS

DATA_13CA9C:
	dw $1D8C,$1D8E

CODE_13CAA0:
	LDX.w DATA_13CADB,y
	LDA.b $00
	CMP.w $1D8A
	BEQ.b CODE_13CA98
	CMP.w $1D8C
	BEQ.b CODE_13CA98
	CMP.w $1D8E
	BEQ.b CODE_13CA98
	CMP.w $1DAA
	BEQ.b CODE_13CA98
	CMP.w $1D9C
	BEQ.b CODE_13CAD7
	CMP.w $1D9E
	BEQ.b CODE_13CAD7
	CMP.w $1DA6
	BEQ.b CODE_13CAD7
	CMP.w $1DA8
	BEQ.b CODE_13CADA
	CMP.w $1DAE
	BNE.b CODE_13CADA
	LDX.w #$1D9E
	BRA.b CODE_13CADA

CODE_13CAD7:
	LDX.w #$FFFF
CODE_13CADA:
	RTS

DATA_13CADB:
	dw $1D90,$1DAC

CODE_13CADF:
	LDX.w #$1D92
	LDA.b $00
	CMP.w $1D94
	BEQ.b CODE_13CB0B
	CMP.w $1D96
	BEQ.b CODE_13CB0B
	CMP.w $1D98
	BEQ.b CODE_13CB0B
	CMP.w $1D90
	BEQ.b CODE_13CB07
	CMP.w $1DAC
	BEQ.b CODE_13CB07
	CMP.w $1DA2
	BNE.b CODE_13CB0A
	LDX.w #$FFFF
	BRA.b CODE_13CB0A

CODE_13CB07:
	LDX.w #$1DA6
CODE_13CB0A:
	RTS

CODE_13CB0B:
	LDX.w DATA_13CB19,y
	LDA.b $00
	CMP.w #$0000
	BNE.b CODE_13CB18
	LDX.w #$1DB0
CODE_13CB18:
	RTS

DATA_13CB19:
	dw $1D94,$1D96

CODE_13CB1D:
	LDX.w #$1D98
	LDA.b $00
	CMP.w $1D92
	BEQ.b CODE_13CB0B
	CMP.w $1D94
	BEQ.b CODE_13CB0B
	CMP.w $1D96
	BEQ.b CODE_13CB0B
	CMP.w $1D8A
	BEQ.b CODE_13CB45
	CMP.w $1DAA
	BEQ.b CODE_13CB45
	CMP.w $1DA8
	BNE.b CODE_13CB48
	LDX.w #$FFFF
	BRA.b CODE_13CB48

CODE_13CB45:
	LDX.w #$1DA4
CODE_13CB48:
	RTS

CODE_13CB49:
	LDA.b #$01
	STA.b $9B
	REP.b #$30
	LDY.w #$FFFF
	LDX.w #DATA_13CB98
	LDA.b $2A
	BMI.b CODE_13CB5F
	LDY.w #$0001
	LDX.w #DATA_13CBAA
CODE_13CB5F:
	STX.b $00
	STY.b $02
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13CB7B
	INX
	INX
	CMP.w #$0001
	BEQ.b CODE_13CB7B
	INX
	INX
	INC
	CMP.w $002E
	BNE.b CODE_13CB7B
	INX
	INX
CODE_13CB7B:
	JSR.w (DATA_13CB90,x)
	TYA
	BMI.b CODE_13CB8D
	LDA.b ($00),y
	TAY
	LDA.w $0000,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13CB8D:
	SEP.b #$30
	RTL

DATA_13CB90:
	dw CODE_13CBBC
	dw CODE_13CBD0
	dw CODE_13CC19
	dw CODE_13CC6A

DATA_13CB98:
	dw $1D9A,$1D9C,$1D8A,$1DAA,$1D8C,$1D8E,$1D94,$1D96
	dw $1D92

DATA_13CBAA:
	dw $1DA0,$1D9E,$1D90,$1DAC,$1D8C,$1D8E,$1D94,$1D96
	dw $1D98

CODE_13CBBC:
	LDY.w #$0000
	LDA.b $12
	CMP.w $1DAE
	BEQ.b CODE_13CBCF
	AND.w #$FF00
	CMP.w $1D8A
	BNE.b CODE_13CBCF
	DEY
CODE_13CBCF:
	RTS

CODE_13CBD0:
	LDY.w #$0002
	LDA.b $28
	CLC
	ADC.b $02
	CMP.b $2A
	BNE.b CODE_13CBE6
	LDA.b $12
	CMP.w $1DAE
	BEQ.b CODE_13CC18
	LDY.w #$0006
CODE_13CBE6:
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13CC15
	CMP.w $1C5E
	BEQ.b CODE_13CC15
	CMP.w $1D92
	BEQ.b CODE_13CC15
	CMP.w $1D98
	BEQ.b CODE_13CC15
	CMP.w $1D8C
	BEQ.b CODE_13CC10
	CMP.w $1D8E
	BEQ.b CODE_13CC10
	CMP.w $1D9C
	BEQ.b CODE_13CC10
	CMP.w $1D9E
	BNE.b CODE_13CC18
CODE_13CC10:
	LDY.w #$FFFF
	BRA.b CODE_13CC18

CODE_13CC15:
	LDY.w #$0010
CODE_13CC18:
	RTS

CODE_13CC19:
	LDA.b $28
	AND.w #$0001
	ASL
	ADC.w #$0008
	TAY
	LDA.b $28
	CLC
	ADC.b $02
	CMP.b $2A
	BNE.b CODE_13CC69
	LDA.b $12
	CMP.w $1D8A
	BEQ.b CODE_13CC69
	CMP.w $1DAA
	BEQ.b CODE_13CC69
	CMP.w $1D90
	BEQ.b CODE_13CC69
	CMP.w $1DAC
	BEQ.b CODE_13CC69
	CMP.w $1D8C
	BEQ.b CODE_13CC69
	CMP.w $1D8E
	BEQ.b CODE_13CC69
	CMP.w $1D9C
	BEQ.b CODE_13CC60
	CMP.w $1D9E
	BEQ.b CODE_13CC60
	CMP.w $1DAE
	BNE.b CODE_13CC65
	LDY.w #$0002
	BRA.b CODE_13CC69

CODE_13CC60:
	LDY.w #$FFFF
	BRA.b CODE_13CC69

CODE_13CC65:
	DEY
	DEY
	DEY
	DEY
CODE_13CC69:
	RTS

CODE_13CC6A:
	LDA.b $28
	AND.w #$0001
	ASL
	ADC.w #$000C
	TAY
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13CC98
	CMP.w $1C5E
	BEQ.b CODE_13CC98
	CMP.w $1D92
	BEQ.b CODE_13CC98
	CMP.w $1D94
	BEQ.b CODE_13CC98
	CMP.w $1D96
	BEQ.b CODE_13CC98
	CMP.w $1D98
	BEQ.b CODE_13CC98
	DEY
	DEY
	DEY
	DEY
CODE_13CC98:
	LDA.b $28
	CLC
	ADC.b $02
	CMP.b $2A
	BNE.b CODE_13CCBD
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13CCBA
	CMP.w $1C5E
	BEQ.b CODE_13CCBA
	AND.w #$FF00
	CMP.w $1D8A
	BEQ.b CODE_13CCBD
	LDY.w #$0006
	BRA.b CODE_13CCBD

CODE_13CCBA:
	LDY.w #$0010
CODE_13CCBD:
	RTS

CODE_13CCBE:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13CCCA
	LDA.b $28
	BEQ.b CODE_13CCCA
	DEC.b $2E
CODE_13CCCA:
	LDA.w #DATA_13CD22
	LDX.b $2A
	BMI.b CODE_13CCD4
	LDA.w #DATA_13CD2A
CODE_13CCD4:
	STA.b $00
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_13CCE7
	INC
	CMP.b $2E
	BNE.b CODE_13CD00
	LDY.w #$0002
	BRA.b CODE_13CD13

CODE_13CCE7:
	LDA.b $12
	CMP.w $1D92
	BEQ.b CODE_13CCFB
	CMP.w $1D98
	BEQ.b CODE_13CCFB
	AND.w #$FF00
	CMP.w $1D8A
	BEQ.b CODE_13CD1F
CODE_13CCFB:
	LDY.w #$0000
	BRA.b CODE_13CD13

CODE_13CD00:
	LDA.b $2C
	AND.w #$0001
	INC
	INC
	ASL
	STA.b $02
	LDA.b $28
	AND.w #$0001
	ASL
	EOR.b $02
	TAY
CODE_13CD13:
	LDA.b ($00),y
	TAX
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13CD1F:
	SEP.b #$30
	RTL

DATA_13CD22:
	dw $1DA2,$1DA4,$1D8C,$1D8E

DATA_13CD2A:
	dw $1DA8,$1DA6,$1D8C,$1D8E

CODE_13CD32:
	REP.b #$30
	LDA.w #DATA_13CD97
	STA.b $00
	LDA.b $12
	CMP.w $1D8C
	BEQ.b CODE_13CD45
	CMP.w $1D8E
	BNE.b CODE_13CD4A
CODE_13CD45:
	LDA.w #DATA_13CDB7
	STA.b $00
CODE_13CD4A:
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13CD64
	AND.w #$0001
	EOR.w #$0001
	INC
	ASL
	TAY
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13CD64
	LDY.w #$0006
CODE_13CD64:
	LDA.b $2C
	BEQ.b CODE_13CD6D
	TYA
	ORA.w #$0008
	TAY
CODE_13CD6D:
	LDA.b $12
	CMP.w $1D8A
	BEQ.b CODE_13CD83
	CMP.w $1DAA
	BEQ.b CODE_13CD83
	CMP.w $1D90
	BEQ.b CODE_13CD83
	CMP.w $1DAC
	BNE.b CODE_13CD88
CODE_13CD83:
	TYA
	ORA.w #$0010
	TAY
CODE_13CD88:
	LDA.b ($00),y
	TAY
	LDX.b $1D
	LDA.w $0000,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13CD97:
	dw $1DB2,$1DB4,$1DB6,$1DB8,$1C80,$1C84,$1C86,$1C8A
	dw $1DBA,$1DBA,$1DBC,$1DBC,$1C82,$1C84,$1C86,$1C88

DATA_13CDB7:
	dw $1DBE,$1DC0,$1DC2,$1DC4,$1C80,$1C84,$1C86,$1C8A
	dw $1DBA,$1DBA,$1DBC,$1DBC,$1C82,$1C84,$1C86,$1C88

CODE_13CDD7:
	REP.b #$30
	LDA.b $12
	CMP.w #$0000
	BEQ.b CODE_13CE31
	AND.w #$FF00
	CMP.w $1BE0
	BNE.b CODE_13CDED
	JSR.w CODE_13CFD6
	BRA.b CODE_13CE31

CODE_13CDED:
	CMP.w $1D8A
	BNE.b CODE_13CE31
	LDA.b $12
	AND.w #$00FF
	ASL
	TAY
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13CE09
	INX
	INX
	INC
	CMP.b $2E
	BNE.b CODE_13CE09
	INX
	INX
CODE_13CE09:
	LDA.b $28
	BEQ.b CODE_13CE1E
	INX
	INX
	INX
	INX
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13CE1E
	INX
	INX
	INX
	INX
	INX
	INX
CODE_13CE1E:
	LDA.w DATA_13CE34,x
	STA.b $00
	LDA.b ($00),y
	TAY
	LDA.w $0000,y
	BMI.b CODE_13CE31
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13CE31:
	SEP.b #$30
	RTL

DATA_13CE34:
	dw DATA_13CE46,DATA_13CE6E,DATA_13CE96,DATA_13CEBE,DATA_13CEE6,DATA_13CF0E,DATA_13CF36,DATA_13CF5E
	dw DATA_13CF86

DATA_13CE46:
	dw $1DA2,$1DA6,$1DA6,$1D90,DATA_13CFAE,DATA_13CFAE,DATA_13CFAE,DATA_13CFAE
	dw DATA_13CFAE,DATA_13CFAE,$1DAC,DATA_13CFAE,DATA_13CFAE,$1DB0,$1DA6,DATA_13CFAE
	dw $1DA2,$1DAC,$1DA0,$1DB0

DATA_13CE6E:
	dw DATA_13CFB0,$1D90,$1DAC,$1D90,$1C5C,$1D98,$1D98,$1C5E
	dw DATA_13CFB0,$1DA0,$1DAC,DATA_13CFB0,DATA_13CFB0,$1DA8,$1D90,DATA_13CFAE
	dw DATA_13CFB0,$1DAC,$1DA0,$1DA8

DATA_13CE96:
	dw $1D9A,$1D9E,$1D9E,$1D90,$1C5C,$1D98,$1D98,$1C5E
	dw $1D9E,$1DAE,$1D9E,$1D9E,DATA_13CFB0,DATA_13CFB0,$1DAC,DATA_13CFAE
	dw $1D9A,$1DAC,DATA_13CFAE,$1DA8

DATA_13CEBE:
	dw $1DA2,$1DB0,$1DB0,$1DA8,DATA_13CFAE,DATA_13CFAE,DATA_13CFAE,DATA_13CFAE
	dw DATA_13CFB0,$1DA2,$1DA8,DATA_13CFB0,DATA_13CFAE,$1DB0,$1DB0,DATA_13CFAE
	dw $1DA2,$1DA8,DATA_13CFB0,$1DB0

DATA_13CEE6:
	dw DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,$1C5C,$1C5E,$1C5C,$1C5E
	dw DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0
	dw DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0

DATA_13CF0E:
	dw $1D9A,$1DAE,$1DAE,$1DA0,$1C5C,$1C5E,$1C5C,$1C5E
	dw DATA_13CFB0,$1DAE,$1DAE,DATA_13CFB0,DATA_13CFB0,$1D9A,$1DA0,DATA_13CFB0
	dw $1D9A,$1DA0,$1DAE,DATA_13CFB0

DATA_13CF36:
	dw $1D8A,$1DA4,$1DA4,$1DA6,DATA_13CFAE,DATA_13CFAE,DATA_13CFAE,DATA_13CFAE
	dw DATA_13CFAE,$1D8A,DATA_13CFB0,DATA_13CFB0,DATA_13CFAE,$1DA4,$1DB0,DATA_13CFAE
	dw $1DAA,$1DA6,$1D9A,$1DB0

DATA_13CF5E:
	dw $1D8A,$1D8A,$1DAA,DATA_13CFB0,$1C5C,$1D92,$1D92,$1C5E
	dw DATA_13CFB0,$1DAA,$1D9A,DATA_13CFB0,DATA_13CFAE,$1D8A,$1DA2,DATA_13CFB0
	dw $1DAA,DATA_13CFB0,$1D9A,$1DA2

DATA_13CF86:
	dw $1D8A,$1D9C,$1D9C,$1DA0,$1C5C,$1D92,$1D92,$1C5E
	dw DATA_13CFAE,$1D9C,$1DAE,DATA_13CFAE,$1DA2,$1DAA,DATA_13CFAE,DATA_13CFB0
	dw $1DAA,$1DAC,$1DAE,DATA_13CFAE

DATA_13CFAE:
	dw $FFFF

DATA_13CFB0:
	dw $0000

DATA_13CFB2:
	dw $1DA6,$1DB0,$1DA4,$1DAC,DATA_13CFB0,$1DAA,$1D9E,$1DAE
	dw $1D9C

DATA_13CFC4:
	dw $1DA2,$1DB0,$1DA8,DATA_13CFB0,DATA_13CFB0,DATA_13CFB0,$1D9A,$1DAE
	dw $1DA0

CODE_13CFD6:
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13CFE6
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13CFE6
	INY
	INY
CODE_13CFE6:
	LDX.b $2C
	BEQ.b CODE_13CFFB
	TYA
	CLC
	ADC.w #$0006
	TAY
	INX
	CPX.b $2E
	BNE.b CODE_13CFFB
	TYA
	CLC
	ADC.w #$0006
	TAY
CODE_13CFFB:
	LDA.b $12
	CMP.w $1C0C
	BEQ.b CODE_13D007
	CMP.w $1C0E
	BNE.b CODE_13D00C
CODE_13D007:
	LDA.w DATA_13CFC4,y
	BRA.b CODE_13D00F

CODE_13D00C:
	LDA.w DATA_13CFB2,y
CODE_13D00F:
	TAY
	LDA.w $0000,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13D01A:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13D026
	LDA.b $28
	BEQ.b CODE_13D026
	DEC.b $2E
CODE_13D026:
	LDX.w #$0000
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_13D039
	INX
	INX
	INC
	CMP.b $2E
	BEQ.b CODE_13D039
	INX
	INX
CODE_13D039:
	JSR.w (DATA_13D048,x)
	TYA
	BMI.b CODE_13D045
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D045:
	SEP.b #$30
	RTL

DATA_13D048:
	dw CODE_13D04E
	dw CODE_13D066
	dw CODE_13D071

CODE_13D04E:
	LDY.w $1DA8
	LDA.b $2A
	BPL.b CODE_13D058
	LDY.w $1DA2
CODE_13D058:
	LDA.b $12
	AND.w #$FF00
	CMP.w $1D8A
	BNE.b CODE_13D065
	LDY.w #$FFFF
CODE_13D065:
	RTS

CODE_13D066:
	LDY.w $1DA6
	LDA.b $2A
	BPL.b CODE_13D070
	LDY.w $1DA4
CODE_13D070:
	RTS

CODE_13D071:
	LDA.b $12
	CMP.w #$0000
	BEQ.b CODE_13D085
	AND.w #$FF00
	CMP.w $1D8A
	BEQ.b CODE_13D085
	LDY.w #$FFFF
	BRA.b CODE_13D093

CODE_13D085:
	LDA.b $28
	AND.w #$0001
	ASL
	TAY
	LDX.w DATA_13D094,y
	LDA.w $0000,x
	TAY
CODE_13D093:
	RTS

DATA_13D094:
	dw $1D8C,$1D8E

CODE_13D098:
	LDA.b #$01
	STA.b $9B
	REP.b #$30
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13D0AE
	INX
	INX
	CMP.w #$0001
	BEQ.b CODE_13D0AE
	INX
	INX
CODE_13D0AE:
	JSR.w (DATA_13D0BD,x)
	TYA
	BMI.b CODE_13D0BA
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D0BA:
	SEP.b #$30
	RTL

DATA_13D0BD:
	dw CODE_13D0C3
	dw CODE_13D0DB
	dw CODE_13D071

CODE_13D0C3:
	LDY.w $1DA0
	LDA.b $2A
	BPL.b CODE_13D0CD
	LDY.w $1D9A
CODE_13D0CD:
	LDA.b $12
	AND.w #$FF00
	CMP.w $1D8A
	BNE.b CODE_13D0DA
	LDY.w #$FFFF
CODE_13D0DA:
	RTS

CODE_13D0DB:
	LDY.w $1D9E
	LDA.b $2A
	BPL.b CODE_13D0E5
	LDY.w $1D9C
CODE_13D0E5:
	RTS

CODE_13D0E6:
	REP.b #$30
	LDX.b $1D
	JSL.l CODE_01E501
	BNE.b CODE_13D107
	LDA.b $15
	AND.w #$0001
	BEQ.b CODE_13D0FE
	LDA.b $28
	AND.w #$0001
	BNE.b CODE_13D107
CODE_13D0FE:
	LDX.b $1D
	LDA.w #$A400
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D107:
	SEP.b #$30
	RTL

CODE_13D10A:
	REP.b #$30
	LDX.b $1D
	JSL.l CODE_01E501
	BNE.b CODE_13D129
	LDA.w #$FFFF
	STA.b $9B
	LDA.b $28
	AND.w #$0001
	BNE.b CODE_13D129
	LDX.b $1D
	LDA.w #$A400
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D129:
	SEP.b #$30
	RTL

DATA_13D12C:
	dw $1DF6,$1DF2

CODE_13D130:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_13D147
	LDA.b $2C
	BNE.b CODE_13D147
	DEC.b $2E
	DEC.b $2E
	BEQ.b CODE_13D142
	BPL.b CODE_13D147
CODE_13D142:
	LDA.w #$0001
	STA.b $2E
CODE_13D147:
	LDA.b $28
	BNE.b CODE_13D14E
	JSR.w CODE_13C570
CODE_13D14E:
	LDA.b $2E
	CLC
	SBC.b $2C
	BEQ.b CODE_13D16B
	CMP.w #$0001
	BEQ.b CODE_13D16B
	JSR.w CODE_13C15F
	LDA.b $28
	INC
	CMP.l $00002A
	BNE.b CODE_13D1A9
	JSR.w CODE_13C64D
	BRA.b CODE_13D1A9

CODE_13D16B:
	ASL
	TAY
	LDX.w DATA_13D12C,y
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	TYA
	BNE.b CODE_13D198
	LDA.b $1B
	JSR.w CODE_13D22F
	LDA.b $1B
	TAX
	AND.w #$F0F0
	STA.b $0E
	TXA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	ORA.b $0E
	JSR.w CODE_13D218
	BRA.b CODE_13D1A9

CODE_13D198:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13D1A9
	JSR.w CODE_13FD61
	LDA.w $1D2E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D1A9:
	SEP.b #$30
	RTL

DATA_13D1AC:
	dw $1DEE,$1DEA

CODE_13D1B0:
	REP.b #$30
	LDA.b $28
	BEQ.b CODE_13D1BE
	LDA.b $2C
	BNE.b CODE_13D1BE
	INC.b $2E
	INC.b $2E
CODE_13D1BE:
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13D1C8
	JSR.w CODE_13C64D
CODE_13D1C8:
	LDA.b $2E
	CLC
	SBC.b $2C
	BEQ.b CODE_13D1E0
	CMP.w #$0001
	BEQ.b CODE_13D1E0
	JSR.w CODE_13C15F
	LDA.b $28
	BNE.b CODE_13D215
	JSR.w CODE_13C570
	BRA.b CODE_13D215

CODE_13D1E0:
	ASL
	TAY
	LDX.w DATA_13D1AC,y
	LDA.w $0000,x
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	TYA
	BNE.b CODE_13D215
	LDA.b $1B
	JSR.w CODE_13D218
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13D215
	LDA.b $1B
	TAX
	AND.w #$0F0F
	ORA.w #$00F0
	INC
	AND.w #$0F0F
	STA.b $0E
	TXA
	AND.w #$F0F0
	ORA.b $0E
	JSR.w CODE_13D22F
CODE_13D215:
	SEP.b #$30
	RTL

CODE_13D218:
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1C04
	BNE.b CODE_13D22E
	LDA.w $1D2C
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D22E:
	RTS

CODE_13D22F:
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w $1C04
	BNE.b CODE_13D245
	LDA.w $1D2E
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D245:
	RTS

DATA_13D246:
	dw $0146,$0147,$0148,$0149,$014E,$014F,$014E,$014F

DATA_13D256:
	dw $1D14,$1D12,$0145,$0150

CODE_13D25E:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13D26E
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13D29B
CODE_13D26E:
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13D284
	CMP.w $1C5E
	BEQ.b CODE_13D284
	CMP.w $1CB6
	BEQ.b CODE_13D284
	CMP.w $1CB8
	BNE.b CODE_13D29B
CODE_13D284:
	LDA.b $2C
	BEQ.b CODE_13D28D
	TYA
	ORA.w #$0004
	TAY
CODE_13D28D:
	LDA.w DATA_13D256,y
	CPY.w #$0004
	BCS.b CODE_13D2C5
	TAY
	LDA.w $0000,y
	BRA.b CODE_13D2C5

CODE_13D29B:
	LDA.b $2C
	BNE.b CODE_13D2B0
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13D2AB
	CMP.w $1C5E
	BNE.b CODE_13D2CB
CODE_13D2AB:
	LDA.w #$0000
	BRA.b CODE_13D2C5

CODE_13D2B0:
	JSL.l CODE_128875
	AND.w #$0003
	ASL
	STA.b $00
	LDA.b $15
	AND.w #$0008
	ORA.b $00
	TAY
	LDA.w DATA_13D246,y
CODE_13D2C5:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D2CB:
	SEP.b #$30
	RTL

DATA_13D2CE:
	dw CODE_13D301
	dw CODE_13D30B
	dw CODE_13D324
	dw CODE_13D354

CODE_13D2D6:
	REP.b #$30
	LDX.w #$0000
	TXY
	LDA.b $2E
	DEC
	BNE.b CODE_13D2EA
	LDA.b $2A
	DEC
	BEQ.b CODE_13D2F5
	INX
	INX
	BRA.b CODE_13D2F5

CODE_13D2EA:
	INX
	INX
	INX
	INX
	LDA.b $2A
	DEC
	BEQ.b CODE_13D2F5
	INX
	INX
CODE_13D2F5:
	JSR.w (DATA_13D2CE,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13D301:
	LDA.w #$720D
	RTS

DATA_13D305:
	dw $7209,$720A,$720B

CODE_13D30B:
	LDA.b $28
	BEQ.b CODE_13D318
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13D318
	INY
	INY
CODE_13D318:
	LDA.w DATA_13D305,y
	RTS

DATA_13D31C:
	dw $720C,$720E,$7213,$720F

CODE_13D324:
	LDA.b $2C
	BEQ.b CODE_13D337
	LDY.w #$0006
	INC
	CMP.b $2E
	BEQ.b CODE_13D337
	AND.w #$0001
	ASL
	TAY
	INY
	INY
CODE_13D337:
	LDA.w DATA_13D31C,y
	RTS

CODE_13D33B:
	RTS

DATA_13D33C:
	dw $7200,$7201,$7202,$7203,$7204,$7205,$7210,$7211
	dw $7212,$7206,$7207,$7208

CODE_13D354:
	LDA.b $2C
	BEQ.b CODE_13D36B
	LDY.w #$0012
	INC
	CMP.b $2E
	BEQ.b CODE_13D36B
	LDY.w #$0006
	AND.w #$0001
	BEQ.b CODE_13D36B
	LDY.w #$000C
CODE_13D36B:
	LDA.b $28
	BEQ.b CODE_13D378
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13D378
	INY
	INY
CODE_13D378:
	LDA.w DATA_13D33C,y
	RTS

DATA_13D37C:
	dw $016F,$0170,$0171,$0172

CODE_13D384:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13D3B3
	LDA.b $12
	CMP.w #$00C3
	BEQ.b CODE_13D3A5
	CMP.w #$00C7
	BEQ.b CODE_13D3A9
	CMP.w #$00C5
	BEQ.b CODE_13D3AE
	CMP.w #$00C2
	BNE.b CODE_13D3E4
	BRA.b CODE_13D3A9

CODE_13D3A5:
	LDA.b $28
	BEQ.b CODE_13D3E4
CODE_13D3A9:
	LDA.w #$00C6
	BRA.b CODE_13D3DE

CODE_13D3AE:
	LDA.w #$00D5
	BRA.b CODE_13D3DE

CODE_13D3B3:
	ASL
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0001
	ASL
	ORA.b $00
	TAY
	LDA.b $12
	CMP.w #$00B6
	BEQ.b CODE_13D3E4
	CMP.w #$00B7
	BEQ.b CODE_13D3E4
	CMP.w #$00B8
	BEQ.b CODE_13D3E4
	CMP.w #$00B9
	BEQ.b CODE_13D3E4
	CMP.w #$00BA
	BEQ.b CODE_13D3E4
	LDA.w DATA_13D37C,y
CODE_13D3DE:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D3E4:
	SEP.b #$30
	RTL

DATA_13D3E7:
	dw $3D70,$3DA7,$3D6F

CODE_13D3ED:
	REP.b #$10
	LDX.b $1D
	LDY.w #$0002
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_13D402
	JSL.l CODE_128875
	AND.b #$01
	TAY
CODE_13D402:
	REP.b #$20
	TYA
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_13D3E7,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13D414:
	dw $7500,$7501,$3DAA,$3DAB

CODE_13D41C:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D414,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13D439:
	dw $1A0E,$1A22,$3DBF,$3DBE,$3DDB,$3DDA

DATA_13D445:
	dw $1A46,$1A36,$3DC0,$3DBD,$1A48,$1A38,$3DDC,$3DD9

DATA_13D455:
	dw $1A56,$1A2C,$3DC1,$3DBC,$3DBF,$3DBE

DATA_13D461:
	dw $1A58,$1A32,$3DDD,$3DD8,$3DDB,$3DDA

DATA_13D46D:
	dw CODE_13D4D8
	dw CODE_13D4FD
	dw CODE_13D536

CODE_13D473:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_13D4D5
	ASL
	ASL
	TAY
	LDA.b $2A
	BPL.b CODE_13D485
	INY
	INY
CODE_13D485:
	STZ.b $00
	LDA.b $12
	BEQ.b CODE_13D4B9
	CMP.w $1C5C
	BEQ.b CODE_13D4B7
	CMP.w $1C5E
	BEQ.b CODE_13D4B7
	CMP.w #$3DB0
	BEQ.b CODE_13D4B5
	CMP.w #$3DB1
	BEQ.b CODE_13D4B5
	CMP.w #$3DB9
	BEQ.b CODE_13D4B5
	CMP.w #$3DBA
	BEQ.b CODE_13D4B5
	CMP.w $1A0C
	BEQ.b CODE_13D4B9
	CMP.w $1A18
	BEQ.b CODE_13D4B9
	INC.b $00
CODE_13D4B5:
	INC.b $00
CODE_13D4B7:
	INC.b $00
CODE_13D4B9:
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13D4C9
	INX
	INX
	AND.w #$0001
	BNE.b CODE_13D4C9
	INX
	INX
CODE_13D4C9:
	JSR.w (DATA_13D46D,x)
	TYA
	BEQ.b CODE_13D4D5
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D4D5:
	SEP.b #$30
	RTL

CODE_13D4D8:
	STZ.b $9B
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13D4E6
	LDA.w #$0000
	BRA.b CODE_13D4FB

CODE_13D4E6:
	LDA.b $00
	BEQ.b CODE_13D4F0
	TYA
	CLC
	ADC.w #$0004
	TAY
CODE_13D4F0:
	LDA.w DATA_13D439,y
	LDX.b $2C
	BNE.b CODE_13D4FB
	TAX
	LDA.w $0000,x
CODE_13D4FB:
	TAY
	RTS

CODE_13D4FD:
	STZ.b $9B
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13D50B
	LDA.w #$0000
	BRA.b CODE_13D52C

CODE_13D50B:
	LDA.l $000000
	BEQ.b CODE_13D521
	CMP.w #$0002
	BCC.b CODE_13D51B
	LDA.w #$0000
	BRA.b CODE_13D52C

CODE_13D51B:
	TYA
	CLC
	ADC.w #$0008
	TAY
CODE_13D521:
	LDA.w DATA_13D445,y
	LDX.b $2C
	BNE.b CODE_13D52C
	TAX
	LDA.w $0000,x
CODE_13D52C:
	TAY
	RTS

DATA_13D52E:
	dw CODE_13D54D
	dw CODE_13D553
	dw CODE_13D559
	dw CODE_13D559

CODE_13D536:
	LDA.w #$0001
	STA.b $9B
	LDA.b $00
	ASL
	TAX
	JSR.w (DATA_13D52E,x)
	LDY.b $02
	LDX.b $2C
	BNE.b CODE_13D54C
	LDA.w $0000,y
	TAY
CODE_13D54C:
	RTS

CODE_13D54D:
	LDA.w DATA_13D455,y
	STA.b $02
	RTS

CODE_13D553:
	LDA.w DATA_13D461,y
	STA.b $02
	RTS

CODE_13D559:
	STZ.b $02
	RTS

DATA_13D55C:
	dw $1A0C,$1A18,$3DB1,$3DB0,$3DB6,$3DB5

DATA_13D568:
	dw $1A1E,$1A06,$3DBB,$3DB8,$3DBA,$3DB9

CODE_13D574:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_13D5BF
	LDA.w #$0001
	STA.b $9B
	STZ.b $00
	LDA.b $2A
	BPL.b CODE_13D58D
	LDA.w #$0002
	STA.b $00
CODE_13D58D:
	LDA.b $2C
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.b $28
	BNE.b CODE_13D5B3
	STZ.b $9B
	LDA.b $12
	BEQ.b CODE_13D5AE
	CMP.w $1C5C
	BEQ.b CODE_13D5A8
	CMP.w $1C5E
	BNE.b CODE_13D5BF
CODE_13D5A8:
	TYA
	CLC
	ADC.w #$0004
	TAY
CODE_13D5AE:
	JSR.w CODE_13D5C2
	BRA.b CODE_13D5B6

CODE_13D5B3:
	JSR.w CODE_13D5E7
CODE_13D5B6:
	TYA
	BEQ.b CODE_13D5BF
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D5BF:
	SEP.b #$30
	RTL

CODE_13D5C2:
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13D5CE
	LDA.w #$0000
	BRA.b CODE_13D5D9

CODE_13D5CE:
	LDA.w DATA_13D55C,y
	LDX.b $2C
	BNE.b CODE_13D5D9
	TAX
	LDA.w $0000,x
CODE_13D5D9:
	TAY
	RTS

DATA_13D5DB:
	dw $1A20,$1A04,$3DB7,$3DB4,$3DB6,$3DB5

CODE_13D5E7:
	LDA.b $12
	BEQ.b CODE_13D5FF
	CMP.w $1C5C
	BEQ.b CODE_13D5FA
	CMP.w $1C5E
	BEQ.b CODE_13D5FA
	LDA.w #$0000
	BRA.b CODE_13D60A

CODE_13D5FA:
	LDA.w DATA_13D5DB,y
	BRA.b CODE_13D602

CODE_13D5FF:
	LDA.w DATA_13D568,y
CODE_13D602:
	LDX.b $2C
	BNE.b CODE_13D60A
	TAX
	LDA.w $0000,x
CODE_13D60A:
	TAY
	RTS

DATA_13D60C:
	dw $3DC2,$3DC3,$3DC4,$0000,$3DC8,$3DC9,$3DCA

CODE_13D61A:
	REP.b #$30
	LDA.b $2C
CODE_13D61D:
	CMP.w #$0002
	BCS.b CODE_13D635
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D60C,y
	BRA.b CODE_13D65E

CODE_13D635:
	LDA.b $28
	BEQ.b CODE_13D664
	INC
	CMP.b $2A
	BEQ.b CODE_13D664
	LDA.w #$3DB2
	LDY.b $2C
	INY
	CPY.b $2E
	BNE.b CODE_13D65E
	LDY.w $1A0A
	LDA.b $12
	CMP.w $1A06
	BEQ.b CODE_13D65D
	LDY.w $1A30
	CMP.w $1A2C
	BEQ.b CODE_13D65D
	LDY.w #$3DAC
CODE_13D65D:
	TYA
CODE_13D65E:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D664:
	SEP.b #$30
	RTL

DATA_13D667:
	dw $3DC5,$3DC6,$3DC7,$0000,$3DCB,$3DAE,$3DAF

CODE_13D675:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13D690
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D667,y
	BRA.b CODE_13D6B9

CODE_13D690:
	LDA.b $28
	BEQ.b CODE_13D6BF
	INC
	CMP.b $2A
	BEQ.b CODE_13D6BF
	LDA.w #$3DB3
	LDY.b $2C
	INY
	CPY.b $2E
	BNE.b CODE_13D6B9
	LDY.w $1A1A
	LDA.b $12
	CMP.w $1A1E
	BEQ.b CODE_13D6B8
	LDY.w $1A52
	CMP.w $1A56
	BEQ.b CODE_13D6B8
	LDY.w #$3DAD
CODE_13D6B8:
	TYA
CODE_13D6B9:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D6BF:
	SEP.b #$30
	RTL

DATA_13D6C2:
	dw $3DCE,$3DCF,$3DD0,$0000,$3DD1,$3DD2,$3DD3,$3DD4

CODE_13D6D2:
	REP.b #$30
	LDX.b $1D
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13D6F1
	LDA.b $28
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D6C2,y
	BEQ.b CODE_13D716
	BRA.b CODE_13D712

CODE_13D6F1:
	LDA.b $28
	BEQ.b CODE_13D716
	INC
	CMP.b $2A
	BEQ.b CODE_13D716
	LDY.b $2C
	INY
	CPY.b $2E
	BEQ.b CODE_13D70B
	CMP.w #$0003
	BCS.b CODE_13D716
	LDA.w #$3DD5
	BRA.b CODE_13D712

CODE_13D70B:
	AND.w #$0001
	CLC
	ADC.w #$3DD6
CODE_13D712:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D716:
	SEP.b #$30
	RTL

DATA_13D719:
	dw $7600,$7601,$7775,$7776,$7602,$7603,$7777,$7778
	dw $7604,$7605,$7779,$777A,$7606,$7607,$777B,$777C

CODE_13D739:
	REP.b #$30
	LDA.b $15
	AND.w #$0003
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0001
	ASL
	ORA.b $00
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D719,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13D765:
	dw CODE_13D794
	dw CODE_13D7A0
	dw CODE_13D7C2

CODE_13D76B:
	REP.b #$30
	LDX.w #$0000
	LDA.b $28
	AND.w #$0001
	ASL
	TAY
	LDA.b $2C
	BEQ.b CODE_13D784
	INX
	INX
	CMP.w #$0001
	BEQ.b CODE_13D784
	INX
	INX
CODE_13D784:
	JSR.w (DATA_13D765,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13D790:
	dw $7750,$7754

CODE_13D794:
	LDA.w DATA_13D790,y
	RTS

DATA_13D798:
	dw $7800,$7801,$7802,$7803

CODE_13D7A0:
	LDA.b $2A
	CMP.w #$0001
	BNE.b CODE_13D7AC
	LDA.w #$7804
	BRA.b CODE_13D7BD

CODE_13D7AC:
	LDA.b $28
	BEQ.b CODE_13D7BA
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13D7BA
	LDY.w #$0006
CODE_13D7BA:
	LDA.w DATA_13D798,y
CODE_13D7BD:
	RTS

DATA_13D7BE:
	dw $01B7,$01B8

CODE_13D7C2:
	LDA.b $2C
	CLC
	ADC.b $28
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_13D7BE,y
	RTS

DATA_13D7D0:
	dw $01B9,$01BA,$01BB,$0000,$01BC,$01BD,$01BE

CODE_13D7DE:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13D7F6
	LDA.b $28
	BEQ.b CODE_13D80A
	INC
	CMP.b $2A
	BEQ.b CODE_13D80A
	JSL.l CODE_1380B4
	BRA.b CODE_13D80A

CODE_13D7F6:
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $28
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D7D0,y
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D80A:
	SEP.b #$30
	RTL

DATA_13D80D:
	dw $0000,$7701,$7702,$7703,$7710,$7711,$7712,$7713

DATA_13D81D:
	dw $7730,$7731,$7732,$0000,$7740,$7741,$7742,$7743

DATA_13D82D:
	dw $7700,$7704,$7708,$770C

DATA_13D835:
	dw $7733,$7737,$773B,$773F

DATA_13D83D:
	dw $7723,$7727,$772B,$772F

DATA_13D845:
	dw CODE_13D896
	dw CODE_13D8CE
	dw CODE_13D8AC
	dw CODE_13D8BF

DATA_13D84D:
	dw CODE_13D8DD
	dw CODE_13D916
	dw CODE_13D907
	dw CODE_13D8F4

CODE_13D855:
	REP.b #$30
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ASL
	STA.b $00
	LDX.w #$0000
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13D87B
	INX
	INX
	INC
	CMP.b $2E
	BEQ.b CODE_13D87B
	INX
	INX
	AND.w #$0001
	BNE.b CODE_13D87B
	INX
	INX
CODE_13D87B:
	LDA.b $2E
	AND.w #$0001
	BEQ.b CODE_13D887
	JSR.w (DATA_13D845,x)
	BRA.b CODE_13D88A

CODE_13D887:
	JSR.w (DATA_13D84D,x)
CODE_13D88A:
	TYA
	BEQ.b CODE_13D893
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13D893:
	SEP.b #$30
	RTL

CODE_13D896:
	LDA.b $28
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D80D,y
	BEQ.b CODE_13D8AA
	CLC
	ADC.b $15
	ADC.b $15
	ADC.b $15
	ADC.b $15
CODE_13D8AA:
	TAY
	RTS

CODE_13D8AC:
	LDA.b $28
	CMP.w #$0002
	BNE.b CODE_13D8BB
	LDA.b $A1
	TAY
	LDA.w DATA_13D82D,y
	TAY
	RTS

CODE_13D8BB:
	LDY.w #$0000
	RTS

CODE_13D8BF:
	LDA.b $28
	CMP.w #$0002
	BNE.b CODE_13D8BB
	LDA.b $A1
	TAY
	LDA.w DATA_13D835,y
	TAY
	RTS

CODE_13D8CE:
	LDA.b $28
	CMP.w #$0002
	BNE.b CODE_13D8BB
	LDA.b $A1
	TAY
	LDA.w DATA_13D83D,y
	TAY
	RTS

CODE_13D8DD:
	LDA.b $28
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13D81D,y
	BEQ.b CODE_13D8F1
	CLC
	ADC.b $15
	ADC.b $15
	ADC.b $15
	ADC.b $15
CODE_13D8F1:
	TAY
	RTS

CODE_13D8F3:
	RTS

CODE_13D8F4:
	LDA.b $28
	CMP.w #$0001
	BNE.b CODE_13D903
	LDA.b $A1
	TAY
	LDA.w DATA_13D82D,y
	TAY
	RTS

CODE_13D903:
	LDY.w #$0000
	RTS

CODE_13D907:
	LDA.b $28
	CMP.w #$0001
	BNE.b CODE_13D903
	LDA.b $A1
	TAY
	LDA.w DATA_13D835,y
	TAY
	RTS

CODE_13D916:
	LDA.b $28
	CMP.w #$0001
	BNE.b CODE_13D903
	LDA.b $A1
	TAY
	LDA.w DATA_13D83D,y
	TAY
	RTS

DATA_13D925:
	dw CODE_13D977
	dw CODE_13D98D
	dw CODE_13D97F
	dw CODE_13D986

DATA_13D92D:
	dw CODE_13D97B
	dw CODE_13D98D
	dw CODE_13D986
	dw CODE_13D97F

DATA_13D935:
	dw $7722,$7724,$7728,$772C

DATA_13D93D:
	dw $7751,$7757,$775A,$775D

CODE_13D945:
	REP.b #$30
	LDA.b $15
	ASL
	TAY
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13D962
	INX
	INX
	INC
	CMP.b $2E
	BEQ.b CODE_13D962
	INX
	INX
	AND.w #$0001
	BEQ.b CODE_13D962
	INX
	INX
CODE_13D962:
	LDA.b $2E
	AND.w #$0001
	BNE.b CODE_13D970
	JSR.w (DATA_13D925,x)
	TAY
	JMP.w CODE_13D88A

CODE_13D970:
	JSR.w (DATA_13D92D,x)
	TAY
	JMP.w CODE_13D88A

CODE_13D977:
	LDA.w DATA_13D935,y
	RTS

CODE_13D97B:
	LDA.w DATA_13D93D,y
	RTS

CODE_13D97F:
	LDA.b $A1
	TAY
	LDA.w DATA_13D82D,y
	RTS

CODE_13D986:
	LDA.b $A1
	TAY
	LDA.w DATA_13D835,y
	RTS

CODE_13D98D:
	LDA.b $A1
	TAY
	LDA.w DATA_13D83D,y
	RTS

DATA_13D994:
	dw CODE_13DA01
	dw CODE_13DA05
	dw CODE_13D98D
	dw CODE_13D97F
	dw CODE_13D986

DATA_13D99E:
	dw CODE_13DA09
	dw CODE_13DA0D
	dw CODE_13D98D
	dw CODE_13D986
	dw CODE_13D97F

DATA_13D9A8:
	dw $7753,$7756,$7759,$775C

DATA_13D9B0:
	dw $7752,$7755,$7758,$775B

DATA_13D9B8:
	dw $7720,$7725,$7729,$772D

DATA_13D9C0:
	dw $7721,$7726,$772A,$772E

CODE_13D9C8:
	REP.b #$30
	LDA.b $15
	ASL
	TAY
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13D9EC
	INX
	INX
	CMP.w #$0001
	BEQ.b CODE_13D9EC
	INX
	INX
	INC
	CMP.b $2E
	BEQ.b CODE_13D9EC
	INX
	INX
	AND.w #$0001
	BEQ.b CODE_13D9EC
	INX
	INX
CODE_13D9EC:
	LDA.b $2E
	AND.w #$0001
	BNE.b CODE_13D9FA
	JSR.w (DATA_13D994,x)
	TAY
	JMP.w CODE_13D88A

CODE_13D9FA:
	JSR.w (DATA_13D99E,x)
	TAY
	JMP.w CODE_13D88A

CODE_13DA01:
	LDA.w DATA_13D9A8,y
	RTS

CODE_13DA05:
	LDA.w DATA_13D9B0,y
	RTS

CODE_13DA09:
	LDA.w DATA_13D9B8,y
	RTS

CODE_13DA0D:
	LDA.w DATA_13D9C0,y
	RTS

DATA_13DA11:
	dw $7900,$7901,$7902

DATA_13DA17:
	dw $7903,$7904,$7905

DATA_13DA1D:
	dw $7906,$7907,$7908

DATA_13DA23:
	dw $7909,$790A,$790B,$790C,$790D,$790E

DATA_13DA2F:
	dw CODE_13DA6C
	dw CODE_13DA78
	dw CODE_13DA70
	dw CODE_13DA74

CODE_13DA37:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13DA49
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13DA49
	INY
	INY
CODE_13DA49:
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13DA60
	INX
	INX
	INC
	CMP.b $2E
	BEQ.b CODE_13DA60
	INX
	INX
	AND.w #$0001
	BEQ.b CODE_13DA60
	INX
	INX
CODE_13DA60:
	JSR.w (DATA_13DA2F,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13DA6C:
	LDA.w DATA_13DA11,y
	RTS

CODE_13DA70:
	LDA.w DATA_13DA17,y
	RTS

CODE_13DA74:
	LDA.w DATA_13DA1D,y
	RTS

CODE_13DA78:
	LDA.b $12
	CMP.w $1C5C
	BEQ.b CODE_13DA84
	CMP.w $1C5E
	BNE.b CODE_13DA8A
CODE_13DA84:
	TYA
	CLC
	ADC.w #$0006
	TAY
CODE_13DA8A:
	LDA.w DATA_13DA23,y
	RTS

CODE_13DA8E:
	REP.b #$30
	LDX.b $1D
	LDA.w #$7502
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DA9C:
	dw $3308,$3508,$0004,$0005

CODE_13DAA4:
	REP.b #$30
	LDA.b $28
	AND.w #$0002
	BNE.b CODE_13DAC5
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	ASL
	ASL
	ORA.b $00
	TAY
	LDX.b $1D
	LDA.w DATA_13DA9C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13DAC5:
	SEP.b #$30
	RTL

DATA_13DAC8:
	dw $7A00,$7A01

CODE_13DACC:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_13DAC8,y
	CLC
	ADC.b $15
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DAE4:
	dw $7B00,$7B01,$7B02,$7B03

CODE_13DAEC:
	REP.b #$30
	LDX.b $1D
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13DAE4,y
	CLC
	ADC.b $15
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DB0F:
	dw CODE_13DB30
	dw CODE_13DB9A
	dw CODE_13DC60
	dw CODE_13DC05

CODE_13DB17:
	REP.b #$30
	LDX.b $15
	JSR.w (DATA_13DB0F,x)
	TYA
	BEQ.b CODE_13DB27
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13DB27:
	SEP.b #$30
	RTL

DATA_13DB2A:
	dw CODE_13DB52
	dw CODE_13DB6E
	dw CODE_13DB80

CODE_13DB30:
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	TAY
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13DB49
	INX
	INX
	INC
	CMP.b $2E
	BNE.b CODE_13DB49
	INX
	INX
CODE_13DB49:
	JSR.w (DATA_13DB2A,x)
	TAY
	RTS

DATA_13DB4E:
	dw $7D02,$7D03

CODE_13DB52:
	LDA.b $12
	BEQ.b CODE_13DB5D
	CMP.w #$1600
	BEQ.b CODE_13DB5D
	BRA.b CODE_13DB62

CODE_13DB5D:
	LDA.w DATA_13DB4E,y
	BRA.b CODE_13DB65

CODE_13DB62:
	LDA.w #$0000
CODE_13DB65:
	RTS

DATA_13DB66:
	dw $01C9,$01CA,$01C7,$01C8

CODE_13DB6E:
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13DB66,y
	RTS

DATA_13DB7C:
	dw $7D06,$7D07

CODE_13DB80:
	LDA.b $12
	BEQ.b CODE_13DB8B
	CMP.w #$1600
	BEQ.b CODE_13DB8B
	BRA.b CODE_13DB90

CODE_13DB8B:
	LDA.w DATA_13DB7C,y
	BRA.b CODE_13DB93

CODE_13DB90:
	LDA.w #$0000
CODE_13DB93:
	RTS

DATA_13DB94:
	dw CODE_13DBBC
	dw CODE_13DBD8
	dw CODE_13DBEB

CODE_13DB9A:
	LDA.b $2C
	AND.w #$0001
	ASL
	STA.b $00
	TAY
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13DBB3
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13DBB3
	INX
	INX
CODE_13DBB3:
	JSR.w (DATA_13DB94,x)
	TAY
	RTS

DATA_13DBB8:
	dw $7D00,$7D01

CODE_13DBBC:
	LDA.b $12
	BEQ.b CODE_13DBC7
	CMP.w #$1600
	BEQ.b CODE_13DBC7
	BRA.b CODE_13DBCC

CODE_13DBC7:
	LDA.w DATA_13DBB8,y
	BRA.b CODE_13DBCF

CODE_13DBCC:
	LDA.w #$0000
CODE_13DBCF:
	RTS

DATA_13DBD0:
	dw $01C4,$01C3,$01C5,$01C6

CODE_13DBD8:
	ASL.b $00
	LDA.b $28
	AND.w #$0001
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13DBD0,y
	RTS

DATA_13DBE7:
	dw $7D04,$7D05

CODE_13DBEB:
	LDA.b $12
	BEQ.b CODE_13DBF6
	CMP.w #$1600
	BEQ.b CODE_13DBF6
	BRA.b CODE_13DBFB

CODE_13DBF6:
	LDA.w DATA_13DBE7,y
	BRA.b CODE_13DBFE

CODE_13DBFB:
	LDA.w #$0000
CODE_13DBFE:
	RTS

DATA_13DBFF:
	dw CODE_13DC26
	dw CODE_13DC3A
	dw CODE_13DC54

CODE_13DC05:
	LDA.b $2C
	ASL
	TAY
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13DC19
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13DC19
	INX
	INX
CODE_13DC19:
	JSR.w (DATA_13DBFF,x)
	TAY
	RTS

DATA_13DC1E:
	dw $3D2B,$7D1E,$7D1F,$9056

CODE_13DC26:
	LDA.w DATA_13DC1E,y
	RTS

DATA_13DC2A:
	dw $3D2C,$3D2D,$9052,$9053,$9054,$9055,$9057,$9058

CODE_13DC3A:
	LDA.b $28
	AND.w #$0001
	STA.b $00
	LDA.b $2C
	ASL
	ORA.b $00
	ASL
	TAY
	LDA.w DATA_13DC2A,y
	RTS

DATA_13DC4C:
	dw $3D2E,$7D20,$7D21,$9059

CODE_13DC54:
	LDA.w DATA_13DC4C,y
	RTS

DATA_13DC58:
	dw $905A,$3D29,$7D1C,$9050

CODE_13DC60:
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13DC74
	INY
	INC
	CMP.b $2E
	BEQ.b CODE_13DC74
	INY
	INC
	CMP.b $2E
	BEQ.b CODE_13DC74
	INY
CODE_13DC74:
	TYA
	ASL
	TAY
	LDA.w DATA_13DC58,y
	CLC
	ADC.b $28
	TAY
	RTS

DATA_13DC7F:
	dw $0000,$7780,$0000,$777E,$7C00,$777D,$0000,$7784
	dw $0000

CODE_13DC91:
	REP.b #$30
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13DCA3
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13DCA3
	INX
	INX
CODE_13DCA3:
	STX.b $00
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13DCB7
	LDX.w #$0006
	INC
	CMP.b $2E
	BNE.b CODE_13DCB7
	LDX.w #$000C
CODE_13DCB7:
	TXA
	CLC
	ADC.b $00
	STA.b $00
	TAY
	LDA.w DATA_13DC7F,y
	STA.b $04
	BEQ.b CODE_13DCF0
	CMP.w #$7C00
	BEQ.b CODE_13DCE8
	LDA.b $12
	BEQ.b CODE_13DCE8
	SEC
	SBC.w #$777C
	STA.b $02
	DEC
	CMP.w #$000F
	BCS.b CODE_13DCF0
	LDA.b $04
	SEC
	SBC.w #$777C
	ORA.b $02
	CLC
	ADC.w #$777C
	STA.b $04
CODE_13DCE8:
	LDX.b $1D
	LDA.b $04
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13DCF0:
	SEP.b #$30
	RTL

CODE_13DCF3:
	REP.b #$30
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13DD05
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13DD05
	INX
	INX
CODE_13DD05:
	STX.b $00
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13DD19
	LDX.w #$0006
	INC
	CMP.b $2E
	BNE.b CODE_13DD19
	LDX.w #$000C
CODE_13DD19:
	TXA
	CLC
	ADC.b $00
	STA.b $06
	TAY
	LDA.w DATA_13DC7F,y
	STA.b $04
	BEQ.b CODE_13DD64
	CMP.w #$7C00
	BNE.b CODE_13DD31
	JSR.w CODE_13DD67
	BRA.b CODE_13DD5C

CODE_13DD31:
	LDA.b $12
	CMP.w #$7C00
	BEQ.b CODE_13DD64
	SEC
	SBC.w #$777C
	STA.b $02
	DEC
	CMP.w #$000F
	BCS.b CODE_13DD64
	LDA.b $04
	SEC
	SBC.w #$777C
	STA.b $04
	AND.b $02
	BEQ.b CODE_13DD64
	LDA.b $04
	EOR.b $02
	BEQ.b CODE_13DD5E
	CLC
	ADC.w #$777C
	STA.b $04
CODE_13DD5C:
	LDA.b $04
CODE_13DD5E:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13DD64:
	SEP.b #$30
	RTL

CODE_13DD67:
	STZ.b $04
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7C00
	BNE.b CODE_13DD7F
	LDA.w #$0008
	STA.b $04
CODE_13DD7F:
	LDA.b $2C
	INC
	INC
	CMP.b $2E
	BNE.b CODE_13DD9D
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7C00
	BNE.b CODE_13DD9D
	LDA.w #$0004
	TSB.b $04
CODE_13DD9D:
	JSR.w CODE_13FD54
	CMP.w #$7C00
	BNE.b CODE_13DDAA
	LDA.w #$0001
	TSB.b $04
CODE_13DDAA:
	LDA.b $28
	INC
	INC
	CMP.b $2A
	BNE.b CODE_13DDBF
	JSR.w CODE_13FD61
	CMP.w #$7C00
	BNE.b CODE_13DDBF
	LDA.w #$0002
	TSB.b $04
CODE_13DDBF:
	LDA.b $04
	BEQ.b CODE_13DDC9
	CLC
	ADC.w #$777C
	STA.b $04
CODE_13DDC9:
	RTS

CODE_13DDCA:
	REP.b #$30
	LDY.w #$0083
	LDA.b $12
	BEQ.b CODE_13DDE0
	LDY.w $1C78
	CMP.w $1C5C
	BEQ.b CODE_13DDE0
	CMP.w $1C5E
	BNE.b CODE_13DDE7
CODE_13DDE0:
	LDX.b $1D
	TYA
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13DDE7:
	SEP.b #$30
	RTL

DATA_13DDEA:
	dw CODE_13DE22
	dw CODE_13DE31
	dw CODE_13DE4B

CODE_13DDF0:
	REP.b #$30
	LDX.w #$0000
	LDA.b $2C
	BNE.b CODE_13DDFB
	STZ.b $A1
CODE_13DDFB:
	CMP.w #$0004
	BCC.b CODE_13DE0E
	INX
	INX
	LDA.b $2E
	CLC
	SBC.b $2C
	CMP.w #$0003
	BCS.b CODE_13DE0E
	INX
	INX
CODE_13DE0E:
	JSR.w (DATA_13DDEA,x)
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DE1A:
	dw $3D2F,$7D22,$0110,$0112

CODE_13DE22:
	LDA.b $2C
	ASL
	TAY
	LDA.w DATA_13DE1A,y
	BRA.b CODE_13DE55

DATA_13DE2B:
	dw $3D31,$3D16,$3D33

CODE_13DE31:
	LDA.b $A1
	INC
	CMP.w #$0003
	BCC.b CODE_13DE3C
	LDA.w #$0000
CODE_13DE3C:
	STA.b $A1
	ASL
	TAY
	LDA.w DATA_13DE2B,y
	BRA.b CODE_13DE55

DATA_13DE45:
	dw $0110,$7D22,$3D35

CODE_13DE4B:
	LDA.b $2E
	CLC
	SBC.b $2C
	ASL
	TAY
	LDA.w DATA_13DE45,y
CODE_13DE55:
	CLC
	ADC.b $28
	RTS

DATA_13DE59:
	dw $7915,$7916,$77A9,$77AA

CODE_13DE61:
	LDA.w !RAM_YI_Level_LevelHeaderBG1TilesetLo
	CMP.b #$0B
	BEQ.b CODE_13DE6C
	JML.l CODE_12ABFF

CODE_13DE6C:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	CMP.w #$0002
	BCC.b CODE_13DE8B
	LDY.w #$0004
	INC
	STA.b $00
	LDA.b $2A
	SEC
	SBC.b $00
	CMP.w #$0002
	BCS.b CODE_13DE8B
	LDY.w #$0002
CODE_13DE8B:
	STY.b $02
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13DE59,y
	STA.b $00
	JSR.w CODE_13E0F4
	LDA.b $00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DEB0:
	dw $77AF,$77B0,$7925,$7926

CODE_13DEB8:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	CMP.w #$0002
	BCC.b CODE_13DED7
	LDY.w #$0004
	INC
	STA.b $00
	LDA.b $2A
	SEC
	SBC.b $00
	CMP.w #$0002
	BCS.b CODE_13DED7
	LDY.w #$0002
CODE_13DED7:
	STY.b $02
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13DEB0,y
	STA.b $00
	JSR.w CODE_13E0F4
	LDA.b $00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DEFC:
	dw $790F,$7799,$791F,$779A

CODE_13DF04:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13DF23
	LDY.w #$0004
	INC
	STA.b $00
	LDA.b $2E
	SEC
	SBC.b $00
	CMP.w #$0002
	BCS.b CODE_13DF23
	LDY.w #$0002
CODE_13DF23:
	STY.b $02
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13DEFC,y
	STA.b $00
	JSR.w CODE_13E0F4
	LDA.b $00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DF48:
	dw $779F,$7910,$77A0,$7920

CODE_13DF50:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13DF6F
	LDY.w #$0004
	INC
	STA.b $00
	LDA.b $2E
	SEC
	SBC.b $00
	CMP.w #$0002
	BCS.b CODE_13DF6F
	LDY.w #$0002
CODE_13DF6F:
	STY.b $02
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDA.w DATA_13DF48,y
	STA.b $00
	JSR.w CODE_13E0F4
	LDA.b $00
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13DF94:
	dw $7915,$7916,$7925,$7926,$790F,$791F,$7910,$7920
	dw $77A9,$77AA,$77AF,$77B0,$7799,$779A,$779F,$77A0

DATA_13DFB4:
	dw DATA_13DFD4,DATA_13DFD4,DATA_13DFE4,DATA_13DFE4,DATA_13DFD4,DATA_13DFD4,DATA_13DFE4,DATA_13DFE4

DATA_13DFC4:
	dw DATA_13DFF4,DATA_13E014,DATA_13E034,DATA_13E054,DATA_13E074,DATA_13E094,DATA_13E0B4,DATA_13E0D4

DATA_13DFD4:
	dw $790F,$791F,$7910,$7920,$7799,$779A,$779F,$77A0

DATA_13DFE4:
	dw $7915,$7916,$7925,$7926,$77A9,$77AA,$77AF,$77B0

DATA_13DFF4:
	dw $7931,$792C,$792C,$0000,$792B,$7931,$792B,$0000
	dw $792E,$0000,$0000,$0000,$0000,$792D,$0000,$0000

DATA_13E014:
	dw $7931,$791C,$791C,$0000,$791B,$7931,$791B,$0000
	dw $791E,$0000,$0000,$0000,$0000,$791D,$0000,$0000

DATA_13E034:
	dw $7931,$792C,$792C,$0000,$791C,$7931,$791C,$0000
	dw $792E,$0000,$0000,$0000,$0000,$791E,$0000,$0000

DATA_13E054:
	dw $7931,$792B,$792B,$0000,$791B,$7931,$791B,$0000
	dw $792D,$0000,$0000,$0000,$0000,$791D,$0000,$0000

DATA_13E074:
	dw $792E,$FFFF,$FFFF,$FFFF,$FFFF,$792D,$FFFF,$FFFF
	dw $5D09,$77B9,$77B9,$0000,$77CC,$5B0D,$77CC,$0000

DATA_13E094:
	dw $791E,$FFFF,$FFFF,$FFFF,$FFFF,$791D,$FFFF,$FFFF
	dw $0A2F,$77BB,$77BB,$0000,$77BA,$082D,$77BA,$0000

DATA_13E0B4:
	dw $792E,$FFFF,$FFFF,$FFFF,$FFFF,$791E,$FFFF,$FFFF
	dw $5D09,$77B9,$77B9,$0000,$77BB,$0A2F,$77BB,$0000

DATA_13E0D4:
	dw $792D,$FFFF,$FFFF,$FFFF,$FFFF,$791D,$FFFF,$FFFF
	dw $5B0D,$77CC,$77CC,$0000,$77BA,$082D,$77BA,$0000

CODE_13E0F4:
	LDA.b $12
	BEQ.b CODE_13E13D
	LDY.w #$001E
	LDA.b $00
CODE_13E0FD:
	CMP.w DATA_13DF94,y
	BEQ.b CODE_13E106
	DEY
	DEY
	BRA.b CODE_13E0FD

CODE_13E106:
	TYA
	LSR
	AND.w #$000E
	TAY
	LDA.w DATA_13DFB4,y
	STA.b $04
	LDA.w DATA_13DFC4,y
	STA.b $06
	LDY.w #$000E
	LDA.b $12
CODE_13E11B:
	CMP.b ($04),y
	BEQ.b CODE_13E125
	DEY
	DEY
	BPL.b CODE_13E11B
	BRA.b CODE_13E13D

CODE_13E125:
	TYA
	AND.w #$000C
	ASL
	ORA.b $02
	TAY
	LDA.b ($06),y
	CMP.w #$FFFF
	BEQ.b CODE_13E13D
	CMP.w #$0000
	BNE.b CODE_13E13B
	LDA.b $12
CODE_13E13B:
	STA.b $00
CODE_13E13D:
	LDX.b $1D
	RTS

DATA_13E140:
	dw $779B,$779D,$779C,$779E

CODE_13E148:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDX.b $1D
	LDA.w DATA_13E140,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13E168:
	dw $77AB,$77AC,$77AD,$77AE

CODE_13E170:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	ASL
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ORA.b $00
	TAY
	LDX.b $1D
	LDA.w DATA_13E168,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13E190:
	dw $77AB,$77AB,$77AC,$77CE,$779B,$779D,$779E,$779D
	dw $779C,$77AD,$77AE,$77AD,$77CE,$779D,$779E,$779D

CODE_13E1B0:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13E1CC
	LDY.w #$0006
	INC
	CMP.b $2A
	BEQ.b CODE_13E1CC
	LDA.b $28
	AND.w #$0001
	ASL
	CLC
	ADC.w #$0002
	TAY
CODE_13E1CC:
	STY.b $00
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13E1EA
	LDY.w #$0018
	INC
	CMP.b $2E
	BEQ.b CODE_13E1EA
	LDA.b $2C
	AND.w #$0001
	ASL
	ASL
	ASL
	CLC
	ADC.w #$0008
	TAY
CODE_13E1EA:
	TYA
	ORA.b $00
	TAY
CODE_13E1EE:
	LDA.b $12
	BNE.b CODE_13E1FB
	LDX.b $1D
	LDA.w DATA_13E190,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E1FB:
	SEP.b #$30
	RTL

DATA_13E1FE:
	dw $77B9,$77BB,$77C9,$77CC,$8100,$8101,$8102,$8103
	dw $854B,$854C,$854D,$854E

DATA_13E216:
	dw $1519,$1519,$1519,$1519,$1517,$1517,$1517,$1517
	dw $151C,$151D,$151D,$151D

DATA_13E22E:
	dw $1513,$1514,$1515,$1516,$0000,$0000,$0000,$0000
	dw $1513,$1514,$1518,$1516

CODE_13E246:
	REP.b #$30
	LDA.b $12
CODE_13E24A:
	CMP.w #$77B9
	BCC.b CODE_13E265
	LDY.w #$0000
CODE_13E252:
	CMP.w DATA_13E1FE,y
	BEQ.b CODE_13E260
	INY
	INY
	CPY.w #$0018
	BCC.b CODE_13E252
	BRA.b CODE_13E276

CODE_13E260:
	LDA.w DATA_13E216,y
	BRA.b CODE_13E270

CODE_13E265:
	SEC
	SBC.w #$7799
	AND.w #$000E
	TAY
CODE_13E26D:
	LDA.w DATA_13E22E,y
CODE_13E270:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E276:
	SEP.b #$30
	RTL

DATA_13E279:
	dw $792E,$5D09,$77B9,$77AB

CODE_13E281:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	BNE.b CODE_13E294
	LDX.b $1D
	LDA.w DATA_13E279,y
CODE_13E290:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E294:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

DATA_13E29C:
	dw $77BA,$082D,$791D

CODE_13E2A2:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	BNE.b CODE_13E2B5
	LDX.b $1D
	LDA.w DATA_13E29C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E2B5:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

DATA_13E2BD:
	dw $77AE,$77BA,$082D,$791D

CODE_13E2C5:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	BNE.b CODE_13E2D8
	LDX.b $1D
	LDA.w DATA_13E2BD,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E2D8:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

DATA_13E2E0:
	dw $792D,$5B0C,$77C9,$77AC

CODE_13E2E8:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	BNE.b CODE_13E31F
	LDA.w DATA_13E2E0,y
	STA.b $02
	CMP.w #$5B0C
	BNE.b CODE_13E317
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$779F
	BEQ.b CODE_13E312
	CMP.w #$77A0
	BNE.b CODE_13E317
CODE_13E312:
	LDA.w #$5B0D
	STA.b $02
CODE_13E317:
	LDX.b $1D
	LDA.b $02
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E31F:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

DATA_13E327:
	dw $77CA,$0A2E,$791E

CODE_13E32D:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	BNE.b CODE_13E364
	LDA.w DATA_13E327,y
	STA.b $02
	CMP.w #$0A2E
	BNE.b CODE_13E35C
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7799
	BEQ.b CODE_13E357
	CMP.w #$779A
	BNE.b CODE_13E35C
CODE_13E357:
	LDA.w #$0A2F
	STA.b $02
CODE_13E35C:
	LDX.b $1D
	LDA.b $02
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E364:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

DATA_13E36C:
	dw $77AD,$77CA,$0A2E,$791E

CODE_13E374:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	LDA.b $12
	BNE.b CODE_13E3AB
	LDA.w DATA_13E36C,y
	STA.b $02
	CMP.w #$0A2E
	BNE.b CODE_13E3A3
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$7799
	BEQ.b CODE_13E39E
	CMP.w #$779A
	BNE.b CODE_13E3A3
CODE_13E39E:
	LDA.w #$0A2F
	STA.b $02
CODE_13E3A3:
	LDX.b $1D
	LDA.b $02
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E3AB:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

DATA_13E3B3:
	dw $792F,$7915,$7916,$7930

CODE_13E3BB:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13E3D6
	LDY.w #$0006
	INC
	CMP.b $2A
	BEQ.b CODE_13E3D6
	DEC
	AND.w #$0001
	ASL
	CLC
	ADC.w #$0002
	TAY
CODE_13E3D6:
	LDX.b $1D
	LDA.w DATA_13E3B3,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13E3E2:
	dw $7932,$7925,$7926,$7933

CODE_13E3EA:
	REP.b #$30
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13E405
	LDY.w #$0006
	INC
	CMP.b $2A
	BEQ.b CODE_13E405
	DEC
	AND.w #$0001
	ASL
	CLC
	ADC.w #$0002
	TAY
CODE_13E405:
	LDX.b $1D
	LDA.w DATA_13E3E2,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13E411:
	dw $792F,$790F,$791F,$7932

CODE_13E419:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13E434
	LDY.w #$0006
	INC
	CMP.b $2E
	BEQ.b CODE_13E434
	DEC
	AND.w #$0001
	ASL
	CLC
	ADC.w #$0002
	TAY
CODE_13E434:
	LDX.b $1D
	LDA.w DATA_13E411,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13E440:
	dw $7930,$7910,$7920,$7933

CODE_13E448:
	REP.b #$30
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13E463
	LDY.w #$0006
	INC
	CMP.b $2E
	BEQ.b CODE_13E463
	DEC
	AND.w #$0001
	ASL
	CLC
	ADC.w #$0002
	TAY
CODE_13E463:
	LDX.b $1D
	LDA.w DATA_13E440,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13E46F:
	dw $7799,$779A,$779B,$779C,$779D,$779E,$779F,$77A0
	dw $77A1,$77A2,$77A3,$77A4,$77A5,$77A6,$77A7,$77A8
	dw $77A9,$77AA,$77AB,$77AC,$77AD,$77AE,$77AF,$77B0
	dw $77B1,$77B2,$77B3,$77B4,$77B5,$77B6,$77B7,$77B8
	dw $77B9,$77BA,$77BB,$77BE,$77C9,$77CA,$77CC,$77CE
	dw $854B,$854C,$854D,$854E

DATA_13E4C7:
	dw $77CF,$77CF,$77CF,$77CF,$77C8,$77C8,$77C8,$77C8
	dw $77CF,$77CF,$77C8,$77C8,$77CF,$77CF,$77C8,$77C8
	dw $77CF,$77CF,$77CF,$77CF,$77C8,$77C8,$77C8,$77C8
	dw $77CF,$77CF,$77C8,$77C8,$77CF,$77CF,$77C8,$77C8
	dw $77CF,$77C8,$77CF,$77CF,$77CF,$77C8,$77CF,$77CF
	dw $854F,$854F,$854F,$854F

DATA_13E51F:
	dw $7925,$7926,$7927,$7928,$7929,$792A,$791B,$791C
	dw $7962,$7963,$7966,$7968,$7969,$796A,$796D,$796F
	dw $7978,$7979,$797C,$797D,$7936,$7937,$7939,$793B

DATA_13E54F:
	dw $7805,$7806,$7807,$7808,$7809,$780A,$780B,$780C
	dw $780D,$780E,$780F,$7810,$7811,$7812,$7813,$7814
	dw $7815,$7816,$7817,$7818

DATA_13E577:
	dw $1513,$1514,$1515,$1516,$1518,$1519

CODE_13E583:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13E59E
	LDY.w #$0056
	LDA.b $12
CODE_13E58E:
	CMP.w DATA_13E46F,y
	BEQ.b CODE_13E599
	DEY
	DEY
	BPL.b CODE_13E58E
	BRA.b CODE_13E5F2

CODE_13E599:
	LDA.w DATA_13E4C7,y
	BRA.b CODE_13E5EC

CODE_13E59E:
	INC
	INC
	CMP.b $2E
	BNE.b CODE_13E5BC
	LDY.w #$001A
	LDA.b $12
CODE_13E5A9:
	CMP.w DATA_13E5F5,y
	BEQ.b CODE_13E5B7
	DEY
	DEY
	BPL.b CODE_13E5A9
	LDA.w #$8103
	BRA.b CODE_13E5EC

CODE_13E5B7:
	LDA.w DATA_13E611,y
	BRA.b CODE_13E5EC

CODE_13E5BC:
	DEC
	CMP.b $2E
	BNE.b CODE_13E5D6
	LDY.w #$002E
	LDA.b $12
CODE_13E5C6:
	CMP.w DATA_13E51F,y
	BEQ.b CODE_13E5D1
	DEY
	DEY
	BPL.b CODE_13E5C6
	BRA.b CODE_13E5F2

CODE_13E5D1:
	LDA.w DATA_13E54F,y
	BRA.b CODE_13E5EC

CODE_13E5D6:
	LDY.w #$000A
	LDA.b $12
CODE_13E5DB:
	CMP.w DATA_13E577,y
	BEQ.b CODE_13E5E9
	DEY
	DEY
	BPL.b CODE_13E5DB
	LDA.w #$8101
	BRA.b CODE_13E5EC

CODE_13E5E9:
	LDA.w #$1517
CODE_13E5EC:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E5F2:
	SEP.b #$30
	RTL

DATA_13E5F5:
	dw $7925,$7926,$7927,$7928,$7929,$792A,$791B,$791C
	dw $082D,$082E,$0A2D,$0A2E,$0A2F,$0A30

DATA_13E611:
	dw $7805,$7806,$7807,$7808,$7809,$780A,$780B,$780C
	dw $7F01,$7F01,$8001,$8001,$8001,$8001

CODE_13E62D:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13E64E
	LDY.w #$77BF
	LDA.b $12
	CMP.w #$77BA
	BEQ.b CODE_13E64B
	LDY.w #$77C0
	AND.w #$FF00
	CMP.w #$8500
	BNE.b CODE_13E64B
	JMP.w CODE_13E6E5

CODE_13E64B:
	JMP.w CODE_13E6DE

CODE_13E64E:
	CMP.w #$0001
	BNE.b CODE_13E674
	LDY.w #$8100
	LDA.b $12
	CMP.w #$779F
	BEQ.b CODE_13E64B
	CMP.w #$77A0
	BEQ.b CODE_13E6DE
	LDY.w #$1517
	CMP.w #$1513
	BEQ.b CODE_13E6DE
	CMP.w #$1516
	BEQ.b CODE_13E6DE
	LDY.w #$8102
	BRA.b CODE_13E6DE

CODE_13E674:
	INC
	CMP.b $2E
	BNE.b CODE_13E6A1
	LDY.w #$001A
	LDA.b $12
CODE_13E67E:
	CMP.w DATA_13E5F5,y
	BEQ.b CODE_13E69B
	DEY
	DEY
	BPL.b CODE_13E67E
	LDY.w #$002E
CODE_13E68A:
	CMP.w DATA_13E51F,y
	BEQ.b CODE_13E695
	DEY
	DEY
	BPL.b CODE_13E68A
	BRA.b CODE_13E6D6

CODE_13E695:
	LDA.w DATA_13E54F,y
	TAY
	BRA.b CODE_13E6DE

CODE_13E69B:
	LDA.w DATA_13E611,y
	TAY
	BRA.b CODE_13E6DE

CODE_13E6A1:
	INC
	CMP.b $2E
	BNE.b CODE_13E6C8
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDY.w #$002E
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E6B5:
	CMP.w DATA_13E51F,y
	BEQ.b CODE_13E6C3
	DEY
	DEY
	BPL.b CODE_13E6B5
	LDY.w #$8101
	BRA.b CODE_13E6DE

CODE_13E6C3:
	LDY.w #$8103
	BRA.b CODE_13E6DE

CODE_13E6C8:
	LDY.w #$000A
	LDA.b $12
CODE_13E6CD:
	CMP.w DATA_13E577,y
	BEQ.b CODE_13E6DB
	DEY
	DEY
	BPL.b CODE_13E6CD
CODE_13E6D6:
	LDY.w #$8101
	BRA.b CODE_13E6DE

CODE_13E6DB:
	LDY.w #$1517
CODE_13E6DE:
	LDX.b $1D
	TYA
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E6E5:
	SEP.b #$30
	RTL

DATA_13E6E8:
	dw $77AF,$77B0,$77B4,$77B8,$77C6,$77C7,$082D,$0A2E
	dw $0A2F,$854B,$854C,$854D,$854E

DATA_13E702:
	dw $77C2,$77C3,$77D2,$77D3,$77D6,$77D7,$082E,$0A2D
	dw $0A30,$855A,$855B,$855C,$855D

DATA_13E71C:
	dw $8200,$8201,$8202,$8203,$8204,$8205,$8206,$8207
	dw $8208,$8209,$820A,$820B,$820C,$820D,$820E,$820F
	dw $8210,$8211,$8212,$8213,$8215,$8215,$8214,$8214

CODE_13E74C:
	REP.b #$30
	LDX.b $1D
	LDA.b $2C
	BNE.b CODE_13E7B7
	LDA.b $12
	CMP.w #$854A
	BNE.b CODE_13E760
	LDA.w #$8550
	BRA.b CODE_13E7CA

CODE_13E760:
	LDA.b $28
	BNE.b CODE_13E784
	JSR.w CODE_13FD54
	LDX.b $1D
	CMP.w #$8101
	BNE.b CODE_13E7A2
	LDA.b $12
	SEC
	SBC.w #$854B
	CMP.w #$0004
	BCS.b CODE_13E77F
	CLC
	ADC.w #$8556
	BRA.b CODE_13E7CA

CODE_13E77F:
	LDA.w #$77EB
	BRA.b CODE_13E7CA

CODE_13E784:
	JSR.w CODE_13FD61
	CMP.w #$8101
	BNE.b CODE_13E7A2
	LDA.b $12
	SEC
	SBC.w #$854B
	CMP.w #$0004
	BCS.b CODE_13E79D
	CLC
	ADC.w #$856A
	BRA.b CODE_13E7CA

CODE_13E79D:
	LDA.w #$77D0
	BRA.b CODE_13E7CA

CODE_13E7A2:
	LDY.w #$0018
	LDA.b $12
CODE_13E7A7:
	CMP.w DATA_13E6E8,y
	BEQ.b CODE_13E7B2
	DEY
	DEY
	BPL.b CODE_13E7A7
	BRA.b CODE_13E7D0

CODE_13E7B2:
	LDA.w DATA_13E702,y
	BRA.b CODE_13E7CA

CODE_13E7B7:
	LDY.w #$002E
	LDA.b $12
CODE_13E7BC:
	CMP.w DATA_13E51F,y
	BEQ.b CODE_13E7C7
	DEY
	DEY
	BPL.b CODE_13E7BC
	BRA.b CODE_13E7D0

CODE_13E7C7:
	LDA.w DATA_13E71C,y
CODE_13E7CA:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E7D0:
	SEP.b #$30
	RTL

DATA_13E7D3:
	dw $77C4,$77C5,$77D5,$77D4,$77D6,$77D7,$082E,$0A2D
	dw $0A30,$855E,$855F,$8560,$8561

DATA_13E7ED:
	dw $8300,$8301,$8302,$8303,$8304,$8305,$8306,$8307
	dw $8308,$8309,$830A,$830B,$830C,$830D,$830E,$830F
	dw $8310,$8311,$8312,$8313,$8315,$8315,$8314,$8314

CODE_13E81D:
	REP.b #$30
	LDX.b $1D
	LDA.b $2C
	BNE.b CODE_13E886
	LDA.b $12
	CMP.w #$8546
	BNE.b CODE_13E831
	LDA.w #$8551
	BRA.b CODE_13E899

CODE_13E831:
	LDA.b $28
	BNE.b CODE_13E853
	JSR.w CODE_13FD54
	CMP.w #$8101
	BNE.b CODE_13E871
	LDA.b $12
	SEC
	SBC.w #$854B
	CMP.w #$0004
	BCS.b CODE_13E84E
	CLC
	ADC.w #$856E
	BRA.b CODE_13E899

CODE_13E84E:
	LDA.w #$77D1
	BRA.b CODE_13E899

CODE_13E853:
	JSR.w CODE_13FD61
	CMP.w #$8101
	BNE.b CODE_13E871
	LDA.b $12
	SEC
	SBC.w #$854B
	CMP.w #$0004
	BCS.b CODE_13E86C
	CLC
	ADC.w #$8552
	BRA.b CODE_13E899

CODE_13E86C:
	LDA.w #$77D0
	BRA.b CODE_13E899

CODE_13E871:
	LDY.w #$0018
	LDA.b $12
CODE_13E876:
	CMP.w DATA_13E6E8,y
	BEQ.b CODE_13E881
	DEY
	DEY
	BPL.b CODE_13E876
	BRA.b CODE_13E89F

CODE_13E881:
	LDA.w DATA_13E7D3,y
	BRA.b CODE_13E899

CODE_13E886:
	LDY.w #$002E
	LDA.b $12
CODE_13E88B:
	CMP.w DATA_13E51F,y
	BEQ.b CODE_13E896
	DEY
	DEY
	BPL.b CODE_13E88B
	BRA.b CODE_13E89F

CODE_13E896:
	LDA.w DATA_13E7ED,y
CODE_13E899:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E89F:
	SEP.b #$30
	RTL

DATA_13E8A2:
	dw $082D,$082E

CODE_13E8A6:
	REP.b #$30
	LDY.w #$77BF
	LDA.b $2C
	BEQ.b CODE_13E8C2
	LDY.w #$0002
	LDA.b $12
CODE_13E8B4:
	CMP.w DATA_13E8A2,y
	BEQ.b CODE_13E8BF
	DEY
	DEY
	BPL.b CODE_13E8B4
	BRA.b CODE_13E8C9

CODE_13E8BF:
	LDY.w #$7F00
CODE_13E8C2:
	LDX.b $1D
	TYA
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E8C9:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

DATA_13E8D1:
	dw $0A2D,$0A2E,$0A2F,$0A30

CODE_13E8D9:
	REP.b #$30
	LDY.w #$77C0
	LDA.b $2C
	BEQ.b CODE_13E8F5
	LDY.w #$0006
	LDA.b $12
CODE_13E8E7:
	CMP.w DATA_13E8D1,y
	BEQ.b CODE_13E8F2
	DEY
	DEY
	BPL.b CODE_13E8E7
	BRA.b CODE_13E8FC

CODE_13E8F2:
	LDY.w #$8000
CODE_13E8F5:
	LDX.b $1D
	TYA
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E8FC:
	LDA.w #$FFFF
	STA.b $9B
	SEP.b #$30
	RTL

CODE_13E904:
	REP.b #$30
	LDA.b $28
	AND.w #$0001
	BEQ.b CODE_13E92A
	BRA.b CODE_13E93F

CODE_13E90F:
	REP.b #$30
	LDA.b $2C
	AND.w #$0001
	BEQ.b CODE_13E92A
	BRA.b CODE_13E93F

CODE_13E91A:
	REP.b #$30
	LDA.w #$FFFF
	STA.b $9B
	LDA.b $28
	AND.w #$0001
	BEQ.b CODE_13E92A
	BRA.b CODE_13E93F

CODE_13E92A:
	LDX.b $1D
	JSL.l CODE_01E501
	BNE.b CODE_13E93F
	LDA.b $15
	AND.w #$0002
	TAY
	LDA.w DATA_13C6C5,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13E93F:
	SEP.b #$30
	RTL

DATA_13E942:
	dw $0000,$0000,$77BC,$77BC,$77BD,$77BD,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$77BC,$77BC,$77BD,$77BD,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $77BC,$77BD,$77BC,$77BC,$77BC,$77BD,$77BC,$77BC
	dw $8572,$8573,$8574,$8575

DATA_13E99A:
	dw $0000,$0000,$77CB,$77CB,$77CD,$77CD,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$77CB,$77CB,$77CD,$77CD,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $77CB,$77CD,$77CB,$77CB,$77CB,$77CD,$77CB,$77CB
	dw $8576,$8577,$8578,$8579

DATA_13E9F2:
	dw DATA_13E942,DATA_13E99A

CODE_13E9F6:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13EA23
	LDY.w #$8103
	LDA.b $12
	CMP.w #$8101
	BEQ.b CODE_13EA4A
	JSR.w CODE_13FD54
	LDY.w #$0002
	CMP.w #$8103
	BEQ.b CODE_13EA30
	JSR.w CODE_13FD61
	LDY.w #$0000
	CMP.w #$8103
	BEQ.b CODE_13EA30
	CMP.w #$8101
	BEQ.b CODE_13EA30
	BRA.b CODE_13EA51

CODE_13EA23:
	LDY.w #$161F
	CMP.w #$0001
	BEQ.b CODE_13EA4A
	LDY.w #$1620
	BRA.b CODE_13EA4A

CODE_13EA30:
	LDA.w DATA_13E9F2,y
	STA.b $00
	LDY.w #$0056
	LDA.b $12
CODE_13EA3A:
	CMP.w DATA_13E46F,y
	BEQ.b CODE_13EA45
	DEY
	DEY
	BPL.b CODE_13EA3A
	BRA.b CODE_13EA51

CODE_13EA45:
	LDA.b ($00),y
	TAY
	BEQ.b CODE_13EA51
CODE_13EA4A:
	LDX.b $1D
	TYA
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EA51:
	SEP.b #$30
	RTL

DATA_13EA54:
	dw $00CC,$00CB,$00C2

CODE_13EA5A:
	REP.b #$30
	LDX.b $1D
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13EA6E
	INY
	INY
	CMP.w #$FFFF
	BEQ.b CODE_13EA6E
	INY
	INY
CODE_13EA6E:
	LDA.w DATA_13EA54,y
	CPY.w #$0000
	BNE.b CODE_13EA7A
	LDA.b $12
	BNE.b CODE_13EA81
CODE_13EA7A:
	LDA.w DATA_13EA54,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EA81:
	LDA.w #$0001
	STA.b $9B
	CPY.w #$0004
	BCC.b CODE_13EA94
	LDA.b $28
	BNE.b CODE_13EA99
	JSR.w CODE_13EADC
	BRA.b CODE_13EA99

CODE_13EA94:
	JSR.w CODE_13EB2C
	BRA.b CODE_13EAD9

CODE_13EA99:
	LDA.b $2C
	DEC
	CMP.b $2E
	BNE.b CODE_13EAD9
	LDA.b $12
	CMP.w #$00D5
	BNE.b CODE_13EAAB
	STZ.b $A1
	BRA.b CODE_13EAD6

CODE_13EAAB:
	LDA.b $1B
	PHA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	STA.b $0E
	PLA
	AND.w #$F0F0
	ORA.b $0E
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$0153
	BCC.b CODE_13EAD6
	CMP.w #$0161
	BCS.b CODE_13EAD6
	LDA.w #$0006
	STA.b $A1
CODE_13EAD6:
	JSR.w CODE_13A4F8
CODE_13EAD9:
	SEP.b #$30
	RTL

CODE_13EADC:
	JSR.w CODE_13FD54
	CMP.w #$0153
	BCC.b CODE_13EAE9
	CMP.w #$0161
	BCC.b CODE_13EB18
CODE_13EAE9:
	LDA.b $1B
	PHA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	STA.b $0E
	PLA
	AND.w #$F0F0
	ORA.b $0E
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$0153
	BCC.b CODE_13EB18
	CMP.w #$0161
CODE_13EB0D:
	BCS.b CODE_13EB18
	LDX.b $1D
	LDA.w #$00C7
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EB18:
	JSR.w CODE_13A47E
	RTS

DATA_13EB1C:
	dw $77DD,$77DC,$77DA,$77DB

DATA_13EB24:
	dw $77E4,$77E2,$77E5,$77E3

CODE_13EB2C:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$0153
	BCC.b CODE_13EB47
	CMP.w #$0161
	BCS.b CODE_13EB47
	LDA.w DATA_13EB1C,y
	BRA.b CODE_13EB57

CODE_13EB47:
	JSR.w CODE_13FD54
	CMP.w #$0153
	BCC.b CODE_13EB5D
	CMP.w #$0161
	BCS.b CODE_13EB5D
	LDA.w DATA_13EB24,y
CODE_13EB57:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EB5D:
	RTS

DATA_13EB5E:
	dw $00C9,$00CA,$00C2

CODE_13EB64:
	REP.b #$30
	LDX.b $1D
	LDY.w #$0000
	LDA.b $2C
	BEQ.b CODE_13EB78
	INY
	INY
	CMP.w #$FFFF
	BEQ.b CODE_13EB78
	INY
	INY
CODE_13EB78:
	LDA.w DATA_13EB5E,y
	CPY.w #$0000
	BNE.b CODE_13EB84
	LDA.b $12
	BNE.b CODE_13EB8B
CODE_13EB84:
	LDA.w DATA_13EB5E,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EB8B:
	LDA.w #$0001
	STA.b $9B
	CPY.w #$0004
	BCC.b CODE_13EBA1
	LDA.b $28
	DEC
	CMP.b $2A
	BNE.b CODE_13EBAB
	JSR.w CODE_13EADC
	BRA.b CODE_13EBAB

CODE_13EBA1:
	TYA
	ORA.w #$0004
	TAY
	JSR.w CODE_13EB2C
	BRA.b CODE_13EBED

CODE_13EBAB:
	LDA.b $2C
	DEC
	CMP.b $2E
	BNE.b CODE_13EBED
	LDA.b $12
	CMP.w #$00D5
	BNE.b CODE_13EBBB
	BRA.b CODE_13EBE8

CODE_13EBBB:
	LDA.b $1B
	PHA
	AND.w #$0F0F
	DEC
	AND.w #$0F0F
	STA.b $0E
	PLA
	AND.w #$F0F0
	ORA.b $0E
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$0153
	BCC.b CODE_13EBE8
	CMP.w #$0161
	BCS.b CODE_13EBE8
	LDA.w #$0006
	STA.b $A1
	BRA.b CODE_13EBEA

CODE_13EBE8:
	STZ.b $A1
CODE_13EBEA:
	JSR.w CODE_13A4F8
CODE_13EBED:
	SEP.b #$30
	RTL

DATA_13EBF0:
	dw $00D6,$00C2,$00D7

DATA_13EBF6:
	dw $77D8,$0000,$77D9

CODE_13EBFC:
	REP.b #$30
	LDX.b $1D
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13EC10
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13EC10
	INY
	INY
CODE_13EC10:
	LDA.w DATA_13EBF0,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $2C
	BNE.b CODE_13EC49
	CPY.w #$0002
	BEQ.b CODE_13EC46
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EC2A:
	CMP.w #$0153
	BCC.b CODE_13EC46
	CMP.w #$0161
	BCS.b CODE_13EC46
	LDX.b $1D
	LDA.w DATA_13EBF6,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.w #$0006
	STA.b $A1
	BRA.b CODE_13EC49

CODE_13EC46:
	JSR.w CODE_13A4F8
CODE_13EC49:
	SEP.b #$30
	RTL

CODE_13EC4C:
	REP.b #$30
	LDA.w #$FFFF
	STA.b $9B
	LDX.b $1D
	LDA.b $15
	CLC
	ADC.w #$8700
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13EC62:
	dw $8702,$8704

CODE_13EC66:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	STZ.b $9B
	LDA.b $28
	AND.w #$0001
	BEQ.b CODE_13EC77
	DEC.b $9B
CODE_13EC77:
	CLC
	ADC.w DATA_13EC62,y
	BRA.b CODE_13ECAD

DATA_13EC7D:
	dw $8706,$870A

CODE_13EC81:
	REP.b #$30
	LDX.b $1D
	LDY.b $15
	STZ.b $9B
	LDA.b $28
	BPL.b CODE_13EC91
	EOR.w #$FFFF
	INC
CODE_13EC91:
	AND.w #$0003
	CMP.w #$0003
	BNE.b CODE_13EC9B
	DEC.b $9B
CODE_13EC9B:
	CLC
	ADC.w DATA_13EC7D,y
	BRA.b CODE_13ECAD

CODE_13ECA1:
	REP.b #$30
	LDA.w #$870F
	BRA.b CODE_13ECAD

CODE_13ECA8:
	REP.b #$30
	LDA.w #$870E
CODE_13ECAD:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13ECB6:
	REP.b #$30
	JSR.w CODE_13ECC8
	CLC
	ADC.w #$854B
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13ECC8:
	LDA.b $1B
	AND.w #$0003
	STA.b $00
	LDA.b $2C
	AND.w #$0001
	ASL
	ADC.b $00
	AND.w #$0003
	RTS

DATA_13ECDB:
	dw CODE_13EDA2
	dw CODE_13EDC1

DATA_13ECDF:
	dw $7941,$7947,$7941,$7947

DATA_13ECE7:
	dw $7940,$7946,$793C,$7943,$793F,$7945,$7931,$7942

DATA_13ECF7:
	dw $7915,$7916,$77A9,$77AA,$77AB,$77AC,$77AD,$77AE
	dw $77AF,$77B0,$7925,$7926

DATA_13ED0F:
	dw $7938,$7938,$8543,$8543,$8544,$8544,$8545,$8545
	dw $8546,$8546,$7939,$7939

CODE_13ED27:
	REP.b #$30
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13ED37
	INX
	INX
	INC
	CMP.b $2E
	BNE.b CODE_13ED40
CODE_13ED37:
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_13ECDB,x)
	BRA.b CODE_13ED9F

CODE_13ED40:
	LDX.b $1D
	LDY.w #$0000
	LDA.b $12
CODE_13ED47:
	CMP.w DATA_13ECF7,y
	BEQ.b CODE_13ED55
	INY
	INY
	CPY.w #$0018
	BCC.b CODE_13ED47
	BRA.b CODE_13ED5C

CODE_13ED55:
	STZ.b $A1
	LDA.w DATA_13ED0F,y
	BRA.b CODE_13ED9B

CODE_13ED5C:
	LDY.b $A1
	BEQ.b CODE_13ED67
	JSR.w CODE_13EDE4
	STZ.b $A1
	BRA.b CODE_13ED9F

CODE_13ED67:
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	TAY
	CPY.w #$000C
	BCC.b CODE_13ED82
	LDA.b $2E
	CLC
	SBC.b $2C
	DEC
	BNE.b CODE_13ED82
	TYA
	AND.w #$0007
	TAY
CODE_13ED82:
	LDA.w DATA_13ECDF,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	CPY.w #$0008
	BCC.b CODE_13ED9F
	CPY.w #$000C
	BCC.b CODE_13ED95
	STY.b $A1
CODE_13ED95:
	JSR.w CODE_13FD54
	LDA.w DATA_13ECE7,y
CODE_13ED9B:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13ED9F:
	SEP.b #$30
	RTL

CODE_13EDA2:
	JSL.l CODE_128719
	LDA.w #$7980
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD54
	LDA.w #$7981
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7982
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13EDC1:
	JSL.l CODE_12875D
	LDA.w #$7988
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD54
	LDA.w #$7986
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7987
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EDDF:
	RTS

DATA_13EDE0:
	dw $793E,$7944

CODE_13EDE4:
	LDX.b $1D
	LDA.w DATA_13EDE0-$0C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	CPY.w #$000E
	BCS.b CODE_13EDFC
	JSR.w CODE_13FD54
	LDA.w #$793D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EDFC:
	RTS

DATA_13EDFD:
	dw CODE_13EEAC
	dw CODE_13EECB

DATA_13EE01:
	dw $794D,$7953,$794D,$7953

DATA_13EE09:
	dw $794B,$7951,$794E,$7948,$794C,$7952,$7931,$7949

DATA_13EE19:
	dw $793A,$793A,$8547,$8547,$8548,$8548,$8549,$8549
	dw $854A,$854A,$793B,$793B

CODE_13EE31:
	REP.b #$30
	LDX.w #$0000
	LDA.b $2C
	BEQ.b CODE_13EE41
	INX
	INX
	INC
	CMP.b $2E
	BNE.b CODE_13EE4A
CODE_13EE41:
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_13EDFD,x)
	BRA.b CODE_13EEA9

CODE_13EE4A:
	LDX.b $1D
	LDY.w #$0000
	LDA.b $12
CODE_13EE51:
	CMP.w DATA_13ECF7,y
	BEQ.b CODE_13EE5F
	INY
	INY
	CPY.w #$0018
	BCC.b CODE_13EE51
	BRA.b CODE_13EE66

CODE_13EE5F:
	STZ.b $A1
	LDA.w DATA_13EE19,y
	BRA.b CODE_13EEA5

CODE_13EE66:
	LDY.b $A1
	BEQ.b CODE_13EE71
	JSR.w CODE_13EEEE
	STZ.b $A1
	BRA.b CODE_13EEA9

CODE_13EE71:
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	TAY
	CPY.w #$000C
	BCC.b CODE_13EE8C
	LDA.b $2E
	CLC
	SBC.b $2C
	DEC
	BNE.b CODE_13EE8C
	TYA
	AND.w #$0007
	TAY
CODE_13EE8C:
	LDA.w DATA_13EE01,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	CPY.w #$0008
	BCC.b CODE_13EEA9
	CPY.w #$000C
	BCC.b CODE_13EE9F
	STY.b $A1
CODE_13EE9F:
	JSR.w CODE_13FD61
	LDA.w DATA_13EE09,y
CODE_13EEA5:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EEA9:
	SEP.b #$30
	RTL

CODE_13EEAC:
	JSL.l CODE_128719
	LDA.w #$7983
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD61
	LDA.w #$7985
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7984
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13EECB:
	JSL.l CODE_12875D
	LDA.w #$798B
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD61
	LDA.w #$798A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7989
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_13EEEA:
	dw $794F,$794A

CODE_13EEEE:
	LDX.b $1D
	LDA.w DATA_13EEEA-$0C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	CPY.w #$000E
	BCS.b CODE_13EF06
	JSR.w CODE_13FD61
	LDA.w #$7950
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EF06:
	RTS

DATA_13EF07:
	dw CODE_13EFD7
	dw CODE_13EFF6

DATA_13EF0B:
	dw $795A,$7961,$795A,$7961

DATA_13EF13:
	dw $7959,$7960,$7956,$795D,$7958,$795F,$7954,$795B

DATA_13EF23:
	dw $790F,$791F,$7799,$779A,$779B,$779C,$779D,$779E
	dw $779F,$77A0,$7910,$7920,$77CE

DATA_13EF3D:
	dw $7934,$7934,$853B,$853B,$853C,$853C,$853D,$853D
	dw $853E,$853E,$7935,$7935,$853C

CODE_13EF57:
	REP.b #$30
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13EF67
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13EF70
CODE_13EF67:
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_13EF07,x)
	BRA.b CODE_13EFD4

CODE_13EF70:
	LDX.b $1D
	LDY.w #$0000
	LDA.b $12
CODE_13EF77:
	CMP.w DATA_13EF23,y
	BEQ.b CODE_13EF85
	INY
	INY
	CPY.w #$001A
	BCC.b CODE_13EF77
	BRA.b CODE_13EF8C

CODE_13EF85:
	STZ.b $A1
	LDA.w DATA_13EF3D,y
	BRA.b CODE_13EFD0

CODE_13EF8C:
	LDY.b $A1
	BEQ.b CODE_13EF97
	JSR.w CODE_13F01D
	STZ.b $A1
	BRA.b CODE_13EFD4

CODE_13EF97:
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	TAY
	CPY.w #$000C
	BCC.b CODE_13EFB2
	LDA.b $2A
	CLC
	SBC.b $28
	DEC
	BNE.b CODE_13EFB2
	TYA
	AND.w #$0007
	TAY
CODE_13EFB2:
	LDA.w DATA_13EF0B,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	CPY.w #$0008
	BCC.b CODE_13EFD4
	CPY.w #$000C
	BCC.b CODE_13EFC5
	STY.b $A1
CODE_13EFC5:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w DATA_13EF13,y
CODE_13EFD0:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13EFD4:
	SEP.b #$30
	RTL

CODE_13EFD7:
	JSL.l CODE_128719
	LDA.w #$7980
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD54
	LDA.w #$7981
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7982
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13EFF6:
	JSL.l CODE_128719
	LDA.w #$7983
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD61
	LDA.w #$7985
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7984
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_13F015:
	dw $7957,$795E

DATA_13F019:
	dw $7955,$795C

CODE_13F01D:
	LDX.b $1D
	LDA.w DATA_13F015-$0C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w DATA_13F019-$0C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_13F036:
	dw CODE_13F0EC
	dw CODE_13F10B

DATA_13F03A:
	dw $7968,$796F,$7968,$796F

DATA_13F042:
	dw $7966,$796D,$7962,$7969,$7967,$796E,$7964,$796B

DATA_13F052:
	dw $7936,$7936,$853F,$853F,$8540,$8540,$8541,$8541
	dw $8542,$8542,$7937,$7937,$8540

CODE_13F06C:
	REP.b #$30
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13F07C
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13F085
CODE_13F07C:
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_13F036,x)
	BRA.b CODE_13F0E9

CODE_13F085:
	LDX.b $1D
	LDY.w #$0000
	LDA.b $12
CODE_13F08C:
	CMP.w DATA_13EF23,y
	BEQ.b CODE_13F09A
	INY
	INY
	CPY.w #$001A
	BCC.b CODE_13F08C
	BRA.b CODE_13F0A1

CODE_13F09A:
	STZ.b $A1
	LDA.w DATA_13F052,y
	BRA.b CODE_13F0E5

CODE_13F0A1:
	LDY.b $A1
	BEQ.b CODE_13F0AC
	JSR.w CODE_13F132
	STZ.b $A1
	BRA.b CODE_13F0E9

CODE_13F0AC:
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	TAY
	CPY.w #$000C
	BCC.b CODE_13F0C7
	LDA.b $2A
	CLC
	SBC.b $28
	DEC
	BNE.b CODE_13F0C7
	TYA
	AND.w #$0007
	TAY
CODE_13F0C7:
	LDA.w DATA_13F03A,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	CPY.w #$0008
	BCC.b CODE_13F0E9
	CPY.w #$000C
	BCC.b CODE_13F0DA
	STY.b $A1
CODE_13F0DA:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w DATA_13F042,y
CODE_13F0E5:
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F0E9:
	SEP.b #$30
	RTL

CODE_13F0EC:
	JSL.l CODE_12875D
	LDA.w #$7988
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD54
	LDA.w #$7986
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7987
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13F10B:
	JSL.l CODE_12875D
	LDA.w #$798B
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSR.w CODE_13FD61
	LDA.w #$798A
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDX.b $1D
	LDA.w #$7989
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_13F12A:
	dw $7963,$796A

DATA_13F12E:
	dw $7965,$796C

CODE_13F132:
	LDX.b $1D
	LDA.w DATA_13F12A-$0C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_12875D
	LDA.w DATA_13F12E-$0C,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_13F14B:
	dw $84BA,$84BB,$330C,$3510,$84BC,$84BD,$84BE,$84BF
	dw $84C0,$84C0,$8600,$8600,$84C1,$84C1

CODE_13F167:
	REP.b #$30
	LDX.b $1D
	LDA.b $2C
	ASL
	ASL
	STA.b $00
	LDA.b $28
	AND.w #$0001
	ASL
	ORA.b $15
	ADC.b $00
	TAY
	LDA.w DATA_13F14B,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13F186:
	REP.b #$30
	LDA.w #$8A00
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13F194:
	dw $0000,$0017,$0000,$0018

DATA_13F19C:
	dw $8C01,$8C05,$8C09

CODE_13F1A2:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13F1BB
	LDA.b $12
	BNE.b CODE_13F1DD
	JSL.l CODE_128875
	AND.w #$0006
	TAY
	LDA.w DATA_13F194,y
	BEQ.b CODE_13F1DD
	BRA.b CODE_13F1D7

CODE_13F1BB:
	LDA.b $28
	AND.w #$0001
	STA.b $00
	LDA.b $2C
	DEC
	ASL
	CMP.w #$0006
	BCC.b CODE_13F1D0
	LDA.w #$8C0D
	BRA.b CODE_13F1D7

CODE_13F1D0:
	TAY
	LDA.w DATA_13F19C,y
	CLC
	ADC.b $00
CODE_13F1D7:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F1DD:
	SEP.b #$30
	RTL

DATA_13F1E0:
	dw $8C03,$0000,$8C00,$8C07,$8C04,$8C0B,$8C08,$8C0E
	dw $8C0C

DATA_13F1F2:
	dw $8C0E,$8C0C,$0015,$0016,$1621,$1622,$1623,$1624
	dw $1625,$1625

CODE_13F206:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13F235
	LDY.w #$0000
	LDA.b $28
	BEQ.b CODE_13F21C
	INY
	INY
	INC
	CMP.b $2A
	BNE.b CODE_13F21C
	INY
	INY
CODE_13F21C:
	CPY.w #$0002
	BNE.b CODE_13F230
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F230:
	LDA.w DATA_13F1E0,y
	BRA.b CODE_13F261

CODE_13F235:
	ASL
	ASL
	TAY
	LDA.b $2C
	CMP.w #$0004
	BCC.b CODE_13F242
	LDY.w #$0010
CODE_13F242:
	STY.b $00
	LDA.b $28
	BEQ.b CODE_13F24F
	INC
	CMP.b $2A
	BNE.b CODE_13F254
	INY
	INY
CODE_13F24F:
	LDA.w DATA_13F1E0+$02,y
	BRA.b CODE_13F261

CODE_13F254:
	LDA.b $28
	AND.w #$0001
	ASL
	CLC
	ADC.b $00
	TAY
	LDA.w DATA_13F1F2,y
CODE_13F261:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13F26A:
	dw CODE_13F313
	dw CODE_13F31E

DATA_13F26E:
	dw $8C0F,$8C10,$8C11,$8C10,$8C11,$8C12,$8C0F,$8C10
	dw $798C,$798D,$798E,$798D,$798F,$7990,$798C,$7990
	dw $7991,$7992,$7991,$7993,$7994,$7997,$7997,$7997
	dw $7997,$7997,$7997,$7997,$7997,$7995,$7996,$7994
	dw $7995,$7996,$7997,$7997,$7997,$7997,$7997,$7997

CODE_13F2BE:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13F2CF
	LDA.b $28
	AND.w #$0001
	CLC
	ADC.w #$8D8C
	BRA.b CODE_13F30A

CODE_13F2CF:
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13F2DD
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13F2E8
CODE_13F2DD:
	LDA.b $1B
	STA.b $0E
	JSR.w (DATA_13F26A,x)
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F2E8:
	LDA.b $2C
	CMP.w #$0006
	BCS.b CODE_13F307
CODE_13F2EF:
	DEC
	ASL
	ASL
	ASL
	STA.b $00
	LDA.b $28
	CLC
	ADC.b $15
	AND.w #$0007
	CLC
	ADC.b $00
	ASL
	TAY
	LDA.w DATA_13F26E,y
	BRA.b CODE_13F30A

CODE_13F307:
	LDA.w #$7997
CODE_13F30A:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13F313:
	JSL.l CODE_1287A1
	LDA.b #$98
	ADC.w $0085,y
	BRA.b CODE_13F327

CODE_13F31E:
	JSL.l CODE_1287E2
	LDA.b #$9A
	ADC.w $0085,y
CODE_13F327:
	LDA.b $2C
	DEC
	BEQ.b CODE_13F330
	INC.b $00
	BRA.b CODE_13F330

CODE_13F330:
	LDA.b $00
	RTS

DATA_13F333:
	dw $79A4,$79A6

DATA_13F337:
	dw $799B,$7999

CODE_13F33B:
	REP.b #$30
	LDA.b $28
	ASL
	TAY
	LDA.b $2C
	CMP.w #$0002
	BCS.b CODE_13F352
	ASL
	TAY
	LDA.w DATA_13F333,y
	CLC
	ADC.b $28
	BRA.b CODE_13F355

CODE_13F352:
	LDA.w DATA_13F337,y
CODE_13F355:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13F35E:
	dw $8D92,$8D90,$8D91,$8D93,$A602,$A600,$A601,$A603

CODE_13F36E:
	REP.b #$30
	LDA.b $2C
	ASL
	ASL
	STA.b $00
	STZ.b $02
	LDA.b $28
	BEQ.b CODE_13F387
	INC
	CMP.b $2A
	BNE.b CODE_13F38B
	INC.b $02
	INC.b $02
	INC.b $02
CODE_13F387:
	LDA.b $02
	BRA.b CODE_13F392

CODE_13F38B:
	AND.w #$0001
	CLC
	ADC.w #$0001
CODE_13F392:
	CLC
	ADC.b $00
	ASL
	TAY
	LDA.w DATA_13F35E,y
	LDY.b $12
	CMP.w #$8D2E
	BCC.b CODE_13F3AB
	CMP.w #$8D32
	BCS.b CODE_13F3AB
	TYA
	CLC
	ADC.w #$0004
CODE_13F3AB:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13F3B4:
	REP.b #$30
	LDY.w #$A605
	LDA.b $2C
	BEQ.b CODE_13F3BE
	INY
CODE_13F3BE:
	TYA
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13F3C8:
	dw $2C0C,$1527,$2F0B,$0000,$2C0E,$1528,$2F0D,$0000
	dw $2C10,$1529,$2F0F

DATA_13F3DE:
	dw $8D2A,$8D2B,$8D2C,$8D2D

CODE_13F3E6:
	REP.b #$30
	LDA.w $002C
	BNE.b CODE_13F405
	LDA.b $A1
	ASL
	ADC.b $15
	TAY
	LDA.w DATA_13F3C8,y
	LDX.b $12
	CPX.w #$8D2A
	BCC.b CODE_13F447
	CPX.w #$8D2E
	BCS.b CODE_13F447
	INC
	BRA.b CODE_13F447

CODE_13F405:
	LDA.b $A1
	AND.w #$0001
	BEQ.b CODE_13F44D
	LDA.b $2C
	INC
	CMP.b $2E
	BEQ.b CODE_13F42B
	CMP.w #$0002
	BNE.b CODE_13F41D
	LDA.w #$8D29
	BRA.b CODE_13F447

CODE_13F41D:
	LDA.b $2C
	DEC
	DEC
	AND.w #$0003
	ASL
	TAY
	LDA.w DATA_13F3DE,y
	BRA.b CODE_13F447

CODE_13F42B:
	LDA.b $2C
	AND.w #$0003
	EOR.w #$0002
	CLC
	ADC.w #$8D2E
	LDY.b $12
	CPY.b #$90
	STA.w $0990
	CPY.b #$94
	STA.w $04B0
	CLC
	ADC.w #$0004
CODE_13F447:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F44D:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13F461
	LDA.b $A1
	INC
	CMP.w #$0003
	BCC.b CODE_13F45F
	LDA.w #$0000
CODE_13F45F:
	STA.b $A1
CODE_13F461:
	SEP.b #$30
	RTL

DATA_13F464:
	dw $0000,$8D9A,$8D9B,$0000,$0000,$8DA9,$8DAA,$0000
	dw $0000,$8DB8,$8DB9,$0000,$0000,$8DC6,$8DC7,$0000
	dw $8D9C,$8D9D,$8D9E,$8D9F,$8DAB,$8DAC,$8DAD,$8DAE
	dw $8DBA,$8DBB,$8DBC,$8DBD,$8DC8,$8DC9,$8DCA,$8DCB

DATA_13F4A4:
	dw $8D9A,$8DA0,$8DA0,$8D9B,$8DA9,$8DAF,$8DAF,$8DAA
	dw $8DB8,$8DBE,$8DBE,$8DB9,$8DC6,$8DCC,$8DCC,$8DC7
	dw $8DA1,$8DA2,$8DA3,$8DA4,$8DB0,$8DB1,$8DB2,$8DB3
	dw $8DBF,$8DC0,$8DC1,$8DC2,$8DCD,$8DCE,$8DCF,$8DD0

CODE_13F4E4:
	REP.b #$30
	LDA.b $2C
	AND.w #$0007
	ASL
	ASL
	ADC.b $28
	ASL
	TAY
	LDA.b $2C
	CMP.w #$0008
	BCS.b CODE_13F4FF
	LDA.w DATA_13F464,y
	BEQ.b CODE_13F508
	BRA.b CODE_13F502

CODE_13F4FF:
	LDA.w DATA_13F4A4,y
CODE_13F502:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F508:
	SEP.b #$30
	RTL

DATA_13F50B:
	dw $8C00,$8C04,$8C08

CODE_13F511:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BCC.b CODE_13F51D
	LDA.w #$0002
CODE_13F51D:
	ASL
	TAY
	STZ.b $00
	LDX.w #$0003
	LDA.b $28
	BEQ.b CODE_13F530
	INC
	CMP.b $2A
	BNE.b CODE_13F537
	DEX
	DEX
	DEX
CODE_13F530:
	TXA
	CLC
	ADC.w DATA_13F50B,y
	BRA.b CODE_13F53A

CODE_13F537:
	LDA.w #$0000
CODE_13F53A:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	LDA.b $2C
	BNE.b CODE_13F553
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_128719
	LDA.w #$0000
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F553:
	SEP.b #$30
	RTL

DATA_13F556:
	dw $0000,$0000,$859A,$859B,$79DA,$79DB

DATA_13F562:
	dw $0000,$0000,$859F,$85A0,$79DD,$79DE

DATA_13F56E:
	dw $0000,$0000,$859A,$859C,$79DD,$79DE

DATA_13F57A:
	dw $0000,$0000,$859F,$85A1,$79DD,$79DF

DATA_13F586:
	dw $0000,$0000,$859A,$859B,$79DC,$79DB

DATA_13F592:
	dw $0000,$0000,$85A2,$85A0,$79DD,$79DC

DATA_13F59E:
	dw $0000,$85C5,$85A2,$859D,$79DA,$79AC

DATA_13F5AA:
	dw $85C8,$0000,$85A3,$85A4,$79AD,$79AF

DATA_13F5B6:
	dw $85C6,$85C7,$859E,$859D,$79DC,$79DB

DATA_13F5C2:
	dw $85C8,$85C5,$85A3,$85A4,$79DC,$79B6

DATA_13F5CE:
	dw DATA_13F5C2,DATA_13F5B6,DATA_13F5AA,DATA_13F59E,DATA_13F592,DATA_13F586,DATA_13F57A,DATA_13F56E
	dw DATA_13F562,DATA_13F556,DATA_13F5B6,DATA_13F59E,DATA_13F586,DATA_13F56E,DATA_13F562,DATA_13F556

CODE_13F5EE:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0003
	BCC.b CODE_13F602
	DEC
	DEC
	DEC
	ASL
	STA.b $00
	JSR.w CODE_13F654
	BRA.b CODE_13F631

CODE_13F602:
	LDA.b $28
	AND.w #$0001
	STA.b $00
	BNE.b CODE_13F619
	LDA.b $2C
	BNE.b CODE_13F619
	JSL.l CODE_128875
	AND.w #$000F
	ASL
	STA.b $A1
CODE_13F619:
	LDA.b $2C
	ASL
	ADC.b $00
	ASL
	TAY
	LDX.b $A1
	LDA.w DATA_13F5CE,x
	STA.b $00
	LDA.b ($00),y
	BEQ.b CODE_13F631
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F631:
	SEP.b #$30
	RTL

DATA_13F634:
	dw $79BB,$79BC,$79BD,$79BE,$79BF,$79C0,$79C1,$79C2
	dw $79C3,$79C4,$79E0,$79E0,$79E0,$79E0,$79E0,$79E0

CODE_13F654:
	JSL.l CODE_128875
	AND.w #$000F
	CLC
	ADC.b $00
	CMP.w #$0010
	BCC.b CODE_13F666
	LDA.w #$000F
CODE_13F666:
	ASL
	TAY
	LDX.b $1D
	LDA.w DATA_13F634,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

DATA_13F672:
	dw $0000,$0000,$85A8,$85A7,$0D0D,$0C0C,$79AD,$79AC

DATA_13F682:
	dw $0000,$0000,$85A8,$85A7,$0D0E,$0C0C,$79B6,$79AE

DATA_13F692:
	dw $0000,$0000,$85A8,$85A6,$0D0E,$0C0B,$79BD,$79AE

DATA_13F6A2:
	dw $85C2,$0000,$85A9,$85A6,$0D0E,$0C0C,$79AD,$79AF

DATA_13F6B2:
	dw $85C3,$85C1,$85AA,$85A5,$0D0E,$0C0C,$79B1,$79B0

DATA_13F6C2:
	dw DATA_13F672,DATA_13F682,DATA_13F692,DATA_13F6A2,DATA_13F6B2,DATA_13F6B2,DATA_13F6A2,DATA_13F672

CODE_13F6D2:
	REP.b #$30
	STZ.b $9B
	LDA.b $2C
	CMP.w #$0001
	BNE.b CODE_13F6E6
	LDA.b $28
	BNE.b CODE_13F6F5
	JSR.w CODE_13F813
	BRA.b CODE_13F6F5

CODE_13F6E6:
	CMP.w #$0002
	BNE.b CODE_13F6F5
	LDA.b $28
	DEC
	CMP.b $2A
	BNE.b CODE_13F6F5
	JSR.w CODE_13F7FE
CODE_13F6F5:
	LDA.b $28
	AND.w #$0001
	STA.b $00
	BEQ.b CODE_13F707
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13F707
	INC.b $9B
CODE_13F707:
	LDA.b $00
	BNE.b CODE_13F735
	LDA.b $2C
	BNE.b CODE_13F735
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	STA.b $A1
	CMP.w #$0004
	BEQ.b CODE_13F723
	CMP.w #$0008
	BNE.b CODE_13F735
CODE_13F723:
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$9000
	BCC.b CODE_13F735
	CMP.w #$9050
	BCS.b CODE_13F735
	STZ.b $A1
CODE_13F735:
	LDX.b $A1
	LDA.w DATA_13F6C2,x
	STA.b $02
	JMP.w CODE_13F8F2

DATA_13F73F:
	dw $0000,$85B9,$0814,$79AA

DATA_13F747:
	dw $0000,$85BA,$0815,$79AA

DATA_13F74F:
	dw $0000,$85B9,$0816,$79AB

DATA_13F757:
	dw $85C1,$85BB,$0816,$79AB

DATA_13F75F:
	dw $85C2,$85BC,$0814,$79B6

DATA_13F767:
	dw DATA_13F73F,DATA_13F747,DATA_13F74F,DATA_13F757,DATA_13F75F,DATA_13F75F,DATA_13F757,DATA_13F73F

CODE_13F777:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BNE.b CODE_13F78A
	LDA.b $28
	DEC
	CMP.b $2A
	BNE.b CODE_13F78A
	JSR.w CODE_13F7FE
CODE_13F78A:
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	BNE.b CODE_13F79D
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	STA.b $A1
CODE_13F79D:
	LDX.b $A1
	LDA.w DATA_13F767,x
	STA.b $00
	JMP.w CODE_13F9D3

DATA_13F7A7:
	dw $85A7,$020A,$030D,$79B9

DATA_13F7AF:
	dw $85A7,$020A,$030D,$79AC

DATA_13F7B7:
	dw $85A6,$020B,$030D,$79B9

DATA_13F7BF:
	dw $85A7,$020A,$030D,$79B6

DATA_13F7C7:
	dw $85B3,$020A,$030D,$79B9

DATA_13F7CF:
	dw DATA_13F7C7,DATA_13F7BF,DATA_13F7B7,DATA_13F7AF,DATA_13F7A7,DATA_13F7BF,DATA_13F7AF,DATA_13F7A7

CODE_13F7DF:
	REP.b #$30
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	BNE.b CODE_13F7F4
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	STA.b $A1
CODE_13F7F4:
	LDX.b $A1
	LDA.w DATA_13F7CF,x
	STA.b $00
	JMP.w CODE_13F9D3

CODE_13F7FE:
	JSR.w CODE_13FD54
	CMP.w #$79D8
	BEQ.b CODE_13F80B
	CMP.w #$79D9
	BNE.b CODE_13F812
CODE_13F80B:
	LDA.w #$79C9
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F812:
	RTS

CODE_13F813:
	JSR.w CODE_13FD61
	CMP.w #$79D6
	BEQ.b CODE_13F820
	CMP.w #$79D7
	BNE.b CODE_13F827
CODE_13F820:
	LDA.w #$79C8
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13F827:
	RTS

DATA_13F828:
	dw $0000,$0000,$85AD,$85B1,$0F11,$100E,$79B2,$79BE

DATA_13F838:
	dw $0000,$0000,$85AD,$85B1,$0F10,$100E,$79AF,$79B7

DATA_13F848:
	dw $0000,$0000,$85AD,$85B2,$0F10,$100F,$79B3,$79B4

DATA_13F858:
	dw $85C3,$0000,$85AE,$85B1,$0F10,$100E,$79C2,$79B6

DATA_13F868:
	dw $85C2,$85C3,$85AF,$85B0,$0F11,$100E,$79B2,$79BE

DATA_13F878:
	dw DATA_13F828,DATA_13F838,DATA_13F848,DATA_13F858,DATA_13F868,DATA_13F868,DATA_13F858,DATA_13F828

CODE_13F888:
	REP.b #$30
	STZ.b $9B
	LDA.b $2C
	CMP.w #$0001
	BNE.b CODE_13F89C
	LDA.b $28
	BNE.b CODE_13F8AB
	JSR.w CODE_13F7FE
	BRA.b CODE_13F8AB

CODE_13F89C:
	CMP.w #$0002
	BNE.b CODE_13F8AB
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13F8AB
	JSR.w CODE_13F813
CODE_13F8AB:
	LDA.b $28
	AND.w #$0001
	STA.b $00
	BEQ.b CODE_13F8BD
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13F8BD
	INC.b $9B
CODE_13F8BD:
	LDA.b $00
	BNE.b CODE_13F8EB
	LDA.b $2C
	BNE.b CODE_13F8EB
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	STA.b $A1
	CMP.w #$0004
	BEQ.b CODE_13F8D9
	CMP.w #$0008
	BNE.b CODE_13F8EB
CODE_13F8D9:
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$9000
	BCC.b CODE_13F8EB
	CMP.w #$9050
	BCS.b CODE_13F8EB
	STZ.b $A1
CODE_13F8EB:
	LDX.b $A1
	LDA.w DATA_13F878,x
	STA.b $02
CODE_13F8F2:
	LDA.b $2C
	CMP.w #$0004
	BCS.b CODE_13F90A
	ASL
	ADC.b $00
	ASL
	TAY
	LDA.b ($02),y
	BEQ.b CODE_13F914
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13F914

CODE_13F90A:
	DEC
	DEC
	DEC
	DEC
	ASL
	STA.b $00
	JSR.w CODE_13F654
CODE_13F914:
	SEP.b #$30
	RTL

DATA_13F917:
	dw $0000,$85BD,$0A15,$79B7

DATA_13F91F:
	dw $0000,$85BF,$0A16,$79B7

DATA_13F927:
	dw $0000,$85BD,$0A17,$79B8

DATA_13F92F:
	dw $85C3,$85BE,$0A17,$79B8

DATA_13F937:
	dw $85C4,$85C0,$0A15,$79AF

DATA_13F93F:
	dw DATA_13F917,DATA_13F91F,DATA_13F927,DATA_13F92F,DATA_13F937,DATA_13F937,DATA_13F92F,DATA_13F917

CODE_13F94F:
	REP.b #$30
	LDA.b $2C
	CMP.w #$0002
	BNE.b CODE_13F962
	LDA.b $28
	INC
	CMP.b $2A
	BNE.b CODE_13F962
	JSR.w CODE_13F813
CODE_13F962:
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	BNE.b CODE_13F975
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	STA.b $A1
CODE_13F975:
	LDX.b $A1
	LDA.w DATA_13F93F,x
	STA.b $00
	JMP.w CODE_13F9D3

DATA_13F97F:
	dw $85B8,$050B,$060D,$79BA

DATA_13F987:
	dw $85B8,$050B,$060D,$79AC

DATA_13F98F:
	dw $85B7,$050A,$060D,$79BA

DATA_13F997:
	dw $85B6,$050B,$060D,$79AF

DATA_13F99F:
	dw $85B6,$050B,$060D,$79BA

DATA_13F9A7:
	dw DATA_13F99F,DATA_13F997,DATA_13F98F,DATA_13F987,DATA_13F97F,DATA_13F997,DATA_13F987,DATA_13F97F

CODE_13F9B7:
	REP.b #$30
	LDA.w #$0001
	STA.b $9B
	LDA.b $2C
	BNE.b CODE_13F9CC
	JSL.l CODE_128875
	AND.w #$0007
	ASL
	STA.b $A1
CODE_13F9CC:
	LDX.b $A1
	LDA.w DATA_13F9A7,x
	STA.b $00
CODE_13F9D3:
	LDA.b $2C
	CMP.w #$0004
	BCS.b CODE_13F9E8
	ASL
	TAY
	LDA.b ($00),y
	BEQ.b CODE_13F9F2
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	BRA.b CODE_13F9F2

CODE_13F9E8:
	DEC
	DEC
	DEC
	DEC
	ASL
	STA.b $00
	JSR.w CODE_13F654
CODE_13F9F2:
	SEP.b #$30
	RTL

DATA_13F9F5:
	dw CODE_13FA1B
	dw CODE_13FA8E

DATA_13F9F9:
	dw $79AD,$79AE,$79B5,$79DD

DATA_13FA01:
	dw $0300,$0600,$0800,$0A00,$0C00,$1000

CODE_13FA0D:
	REP.b #$30
	LDA.b $1B
	STA.b $0E
	LDX.b $15
	JSR.w (DATA_13F9F5,x)
	SEP.b #$30
	RTL

CODE_13FA1B:
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_13FA28
	JSL.l CODE_13F7DF
	BRA.b CODE_13FA8D

CODE_13FA28:
	LDA.b $2C
	AND.w #$0001
	CLC
	ADC.w #$79D6
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$7900
	BNE.b CODE_13FA5A
	STX.b $00
	JSL.l CODE_128875
	AND.w #$0006
	TAY
	LDX.b $00
	LDA.w DATA_13F9F9,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13FA5A:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13FA8D
	JSR.w CODE_13FD54
	LDY.w #$0000
	AND.w #$FF00
CODE_13FA6A:
	CMP.w DATA_13FA01,y
	BEQ.b CODE_13FA84
	INY
	INY
	CPY.w #$000C
	BCC.b CODE_13FA6A
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$85A8
	BCC.b CODE_13FA8D
	CMP.w #$85B0
	BCS.b CODE_13FA8D
CODE_13FA84:
	LDX.b $1D
	LDA.w #$79C8
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13FA8D:
	RTS

CODE_13FA8E:
	LDA.b $2C
	CMP.w #$0003
	BCS.b CODE_13FA9B
	JSL.l CODE_13F9B7
	BRA.b CODE_13FB00

CODE_13FA9B:
	LDA.b $2C
	AND.w #$0001
	CLC
	ADC.w #$79D8
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	AND.w #$FF00
	CMP.w #$7900
	BNE.b CODE_13FACD
	STX.b $00
	JSL.l CODE_128875
	AND.w #$0006
	TAY
	LDX.b $00
	LDA.w DATA_13F9F9,y
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13FACD:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13FB00
	JSR.w CODE_13FD61
	LDY.w #$0000
	AND.w #$FF00
CODE_13FADD:
	CMP.w DATA_13FA01,y
	BEQ.b CODE_13FAF7
	INY
	INY
	CPY.w #$000C
	BCC.b CODE_13FADD
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	CMP.w #$85A8
	BCC.b CODE_13FB00
	CMP.w #$85B0
	BCS.b CODE_13FB00
CODE_13FAF7:
	LDX.b $1D
	LDA.w #$79C9
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13FB00:
	RTS

DATA_13FB01:
	dw CODE_13FB7A
	dw CODE_13FB7F
	dw CODE_13FB84

DATA_13FB07:
	dw $0000,$0003,$0006

CODE_13FB0D:
	REP.b #$30
	LDA.b $2C
	EOR.w #$FFFF
	INC
	CMP.w #$0005
	BCC.b CODE_13FB1D
	LDA.w #$0004
CODE_13FB1D:
	AND.w #$0006
	TAY
	LDA.w DATA_13FB07,y
	STA.b $00
	CMP.w #$0006
	BCS.b CODE_13FB41
	LDA.b $2C
	AND.w #$0001
	BEQ.b CODE_13FB41
	JSL.l CODE_128875
	AND.w #$0002
	BEQ.b CODE_13FB41
	INC.b $00
	INC.b $00
	INC.b $00
CODE_13FB41:
	LDA.b $2C
	EOR.b $28
	EOR.b $15
	AND.w #$0001
	ASL
	TAY
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13FB5C
	INX
	INX
	INC
	CMP.b $2A
	BNE.b CODE_13FB5C
	INX
	INX
CODE_13FB5C:
	JSR.w (DATA_13FB01,x)
	LDY.b $2C
	BNE.b CODE_13FB6D
	LDA.b $02
	SEC
	SBC.w #$79E8
	CLC
	ADC.w #$3D09
CODE_13FB6D:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13FB76:
	dw $79E9,$79E8

CODE_13FB7A:
	LDA.w DATA_13FB76,y
	BRA.b CODE_13FB96

CODE_13FB7F:
	LDA.w #$79E9
	BRA.b CODE_13FB87

CODE_13FB84:
	LDA.w #$79E8
CODE_13FB87:
	TYX
	BEQ.b CODE_13FB96
	JSR.w CODE_13FD54
	SEC
	SBC.w #$79E9
	STA.b $00
	LDA.w #$79EA
CODE_13FB96:
	STA.b $02
	CLC
	ADC.b $00
	RTS

DATA_13FB9C:
	dw CODE_13FC72
	dw CODE_13FC81

CODE_13FBA0:
	REP.b #$30
	LDA.b $2C
	ASL
	TAY
	CPY.w #$0006
	BCS.b CODE_13FBB0
	JSR.w CODE_13FC0F
	BRA.b CODE_13FBDE

CODE_13FBB0:
	LDA.b $2C
	EOR.b $A1
	AND.w #$0001
	CLC
	ADC.w #$0108
	STA.b $04
	LDX.w #$0000
	LDA.b $28
	BEQ.b CODE_13FBCB
	INC
	CMP.b $2A
	BNE.b CODE_13FBD0
	INX
	INX
CODE_13FBCB:
	LDA.b $04
	JSR.w (DATA_13FB9C,x)
CODE_13FBD0:
	LDA.b $15
	BEQ.b CODE_13FBDE
	JSR.w CODE_13FCAC
	LDA.b $15
	BMI.b CODE_13FBDE
	JSR.w CODE_13FD18
CODE_13FBDE:
	LDA.b $2C
	INC
	CMP.b $2E
	BNE.b CODE_13FBEC
	LDA.b $A1
	EOR.w #$0001
	STA.b $A1
CODE_13FBEC:
	LDA.b $04
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

DATA_13FBF7:
	dw $0028,$0100,$0103

DATA_13FBFD:
	dw $002D,$010A,$0105

DATA_13FC03:
	dw $0028,$9C00,$0103

DATA_13FC09:
	dw $002D,$9C03,$0105

CODE_13FC0F:
	LDA.w DATA_13FBF7,y
	CLC
	ADC.b $A1
	STA.b $04
	LDA.b $28
	BEQ.b CODE_13FC4D
	INC
	CMP.b $2A
	BNE.b CODE_13FC44
	JSR.w CODE_13FD54
	CMP.w #$0029
	BEQ.b CODE_13FC60
	CMP.w #$002D
	BEQ.b CODE_13FC60
	CMP.w #$0101
	BEQ.b CODE_13FC60
	CMP.w #$010A
	BEQ.b CODE_13FC60
	CMP.w #$0104
	BEQ.b CODE_13FC60
	CMP.w #$0105
	BEQ.b CODE_13FC60
	INC
	BRA.b CODE_13FC6F

CODE_13FC44:
	LDA.b $15
	CMP.w #$8000
	BEQ.b CODE_13FC54
	BRA.b CODE_13FC71

CODE_13FC4D:
	LDA.b $15
	CMP.w #$8000
	BNE.b CODE_13FC5C
CODE_13FC54:
	LDA.w DATA_13FC03,y
	CLC
	ADC.b $A1
	BRA.b CODE_13FC6F

CODE_13FC5C:
	LDA.b $A1
	BEQ.b CODE_13FC71
CODE_13FC60:
	LDA.b $15
	CMP.w #$8000
	BNE.b CODE_13FC6C
	LDA.w DATA_13FC09,y
	BRA.b CODE_13FC6F

CODE_13FC6C:
	LDA.w DATA_13FBFD,y
CODE_13FC6F:
	STA.b $04
CODE_13FC71:
	RTS

CODE_13FC72:
	CMP.w #$0109
	BNE.b CODE_13FC93
	JSR.w CODE_13FD54
	CMP.w #$0108
	BEQ.b CODE_13FC93
	BRA.b CODE_13FC8E

CODE_13FC81:
	CMP.w #$0108
	BNE.b CODE_13FC93
	JSR.w CODE_13FD61
	CMP.w #$0109
	BEQ.b CODE_13FC93
CODE_13FC8E:
	LDA.w #$0106
	STA.b $04
CODE_13FC93:
	RTS

DATA_13FC94:
	dw $0108,$0108,$0108,$79E2,$79E2,$79E5,$79E5,$79E7

DATA_13FCA4:
	dw $0106,$79E1,$79E4,$79E7

CODE_13FCAC:
	LDA.b $04
	CMP.w #$0106
	BEQ.b CODE_13FCD2
	CMP.w #$0109
	BEQ.b CODE_13FCC2
	CMP.w #$79E3
	BEQ.b CODE_13FCC2
	CMP.w #$79E6
	BNE.b CODE_13FCF0
CODE_13FCC2:
	JSR.w CODE_13FD54
	CMP.w #$0000
	BEQ.b CODE_13FD0F
	CMP.w #$79E7
	BEQ.b CODE_13FD0F
	INC
	BRA.b CODE_13FD0F

CODE_13FCD2:
	LDA.b $2C
	DEC
	DEC
	DEC
	CMP.w #$0006
	BCC.b CODE_13FCE7
	JSL.l CODE_128875
	AND.w #$0002
	CLC
	ADC.w #$0004
CODE_13FCE7:
	AND.w #$0006
	TAY
	LDA.w DATA_13FCA4,y
	BRA.b CODE_13FD0F

CODE_13FCF0:
	JSL.l CODE_128875
	AND.w #$0003
	CLC
	ADC.b $2C
	ASL
	CMP.w #$0016
	BCC.b CODE_13FD0B
	JSL.l CODE_128875
	AND.w #$0002
	CLC
	ADC.w #$0012
CODE_13FD0B:
	TAY
	LDA.w DATA_13FC94-$06,y
CODE_13FD0F:
	STA.b $04
	RTS

DATA_13FD12:
	dw $7792,$7793,$0000

CODE_13FD18:
	LDX.w #$0000
	LDA.b $04
	AND.w #$FF00
	CMP.w #$7700
	BEQ.b CODE_13FD53
	LDA.b $04
	CMP.w #$0000
	BEQ.b CODE_13FD53
	CMP.w #$0106
	BEQ.b CODE_13FD53
	CMP.w #$0108
	BEQ.b CODE_13FD44
	INX
	INX
	CMP.w #$0109
	BEQ.b CODE_13FD44
	INX
	INX
	CMP.w #$79E7
	BNE.b CODE_13FD49
CODE_13FD44:
	LDA.w DATA_13FD12,x
	BRA.b CODE_13FD51

CODE_13FD49:
	SEC
	SBC.w #$79E1
	CLC
	ADC.w #$778C
CODE_13FD51:
	STA.b $04
CODE_13FD53:
	RTS

CODE_13FD54:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287A1
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13FD61:
	LDA.b $1B
	STA.b $0E
	JSL.l CODE_1287E2
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	RTS

CODE_13FD6E:
	REP.b #$30
	LDA.b $2C
	BNE.b CODE_13FD79
	LDA.w #$8413
	BRA.b CODE_13FD7C

CODE_13FD79:
	LDA.w #$2910
CODE_13FD7C:
	LDX.b $1D
	STA.l !RAM_YI_Level_LevelDataBuffer,x
	SEP.b #$30
	RTL

CODE_13FD85:
	REP.b #$30
	LDX.b $1D
	LDA.l !RAM_YI_Level_LevelDataBuffer,x
	BNE.b CODE_13FD96
	LDA.w #$9D8B
	STA.l !RAM_YI_Level_LevelDataBuffer,x
CODE_13FD96:
	SEP.b #$30
	RTL

DATA_13FD99:
	dw $0000,$0014,$0028,$0040,$0054,$0098

DATA_13FDA5:
	dw $D600,$0060,$BB00,$0054,$A200,$0031,$C100,$0015
	dw $A180,$0021,$9E00,$0021,$A900,$00DF,$BD00,$00AF
	dw $D700,$00CE,$C880,$00BB,$DB00,$00B4,$E900,$00A6
	dw $0F00,$00A4,$2000,$00B9,$1800,$00EF,$2080,$00B9
	dw $6100,$0000,$6100,$001C,$4100,$0038,$2400,$0030
	dw $3480,$0040,$2100,$0065,$E800,$005B,$E600,$001C
	dw $C900,$1019,$C400,$200A,$D600,$3002,$D700,$3314
	dw $D000,$340C,$D200,$37FF,$D300,$3BF1,$D600,$43E3
	dw $E000,$45E9,$EA00,$4CEF,$F700,$53F5,$F700,$5501
	dw $F800,$5B0F,$FB80,$5C2A,$E000,$00D6,$FA00,$00A7
	dw $2B00,$00C0,$5000,$00F3,$5300,$002C,$2100,$0026
	dw $0480,$0015

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($13FE59, incbin, DATA_13FE59_YI_U2.bin)
else
	%FREE_BYTES($13FE59, 423, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank14Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_148000:
	incbin "LevelData/DATA_148000.bin"

DATA_1484B6:
	incbin "LevelData/DATA_1484B6.bin"

DATA_14856D:
	incbin "LevelData/DATA_14856D.bin"

DATA_14861B:
	incbin "LevelData/DATA_14861B.bin"

DATA_14869D:
	incbin "LevelData/DATA_14869D.bin"

DATA_14878F:
	incbin "LevelData/DATA_14878F.bin"

DATA_14879A:
	incbin "LevelData/DATA_14879A.bin"

DATA_1487C3:
	incbin "LevelData/DATA_1487C3.bin"

DATA_1487D4:
	incbin "LevelData/DATA_1487D4.bin"

DATA_148D0D:
	incbin "LevelData/DATA_148D0D.bin"

DATA_148FF0:
	incbin "LevelData/DATA_148FF0.bin"

DATA_1493BF:
	incbin "LevelData/DATA_1493BF.bin"

DATA_1494B7:
	incbin "LevelData/DATA_1494B7.bin"

DATA_14951C:
	incbin "LevelData/DATA_14951C.bin"

DATA_14960E:
	incbin "LevelData/DATA_14960E.bin"

DATA_149D38:
	incbin "LevelData/DATA_149D38.bin"

DATA_149F1F:
	incbin "LevelData/DATA_149F1F.bin"

DATA_14A318:
	incbin "LevelData/DATA_14A318.bin"

DATA_14A39B:
	incbin "LevelData/DATA_14A39B.bin"

DATA_14A4C3:
	incbin "LevelData/DATA_14A4C3.bin"

DATA_14A52E:
	incbin "LevelData/DATA_14A52E.bin"

DATA_14A5A5:
	incbin "LevelData/DATA_14A5A5.bin"

DATA_14A5BC:
	incbin "LevelData/DATA_14A5BC.bin"

DATA_14A716:
	incbin "LevelData/DATA_14A716.bin"

DATA_14AB69:
	incbin "LevelData/DATA_14AB69.bin"

DATA_14ACFD:
	incbin "LevelData/DATA_14ACFD.bin"

DATA_14AD4A:
	incbin "LevelData/DATA_14AD4A.bin"

DATA_14AD7C:
	incbin "LevelData/DATA_14AD7C.bin"

DATA_14AE44:
	incbin "LevelData/DATA_14AE44.bin"

DATA_14AE76:
	incbin "LevelData/DATA_14AE76.bin"

DATA_14AEA8:
	incbin "LevelData/DATA_14AEA8.bin"

DATA_14B0CA:
	incbin "LevelData/DATA_14B0CA.bin"

DATA_14B123:
	incbin "LevelData/DATA_14B123.bin"

DATA_14B233:
	incbin "LevelData/DATA_14B233.bin"

DATA_14B23B:
	incbin "LevelData/DATA_14B23B.bin"

DATA_14B56B:
	incbin "LevelData/DATA_14B56B.bin"

DATA_14B9A1:
	incbin "LevelData/DATA_14B9A1.bin"

DATA_14BAE3:
	incbin "LevelData/DATA_14BAE3.bin"

DATA_14BB57:
	incbin "LevelData/DATA_14BB57.bin"

DATA_14BC5E:
	incbin "LevelData/DATA_14BC5E.bin"

DATA_14BD23:
	incbin "LevelData/DATA_14BD23.bin"

DATA_14BD91:
	incbin "LevelData/DATA_14BD91.bin"

DATA_14C445:
	incbin "LevelData/DATA_14C445.bin"

DATA_14C528:
	incbin "LevelData/DATA_14C528.bin"

DATA_14C5D9:
	incbin "LevelData/DATA_14C5D9.bin"
DATA_14C6C6:
	;dw $FFFF

DATA_14C6C8:
	incbin "LevelData/DATA_14C6C8.bin"

DATA_14C6CD:
	incbin "LevelData/DATA_14C6CD.bin"

DATA_14C711:
	incbin "LevelData/DATA_14C711.bin"

DATA_14CA56:
	incbin "LevelData/DATA_14CA56.bin"

DATA_14CD2E:
	incbin "LevelData/DATA_14CD2E.bin"

DATA_14D10A:
	incbin "LevelData/DATA_14D10A.bin"

DATA_14D2C1:
	incbin "LevelData/DATA_14D2C1.bin"

DATA_14D377:
	incbin "LevelData/DATA_14D377.bin"

DATA_14D3B8:
	incbin "LevelData/DATA_14D3B8.bin"

DATA_14D45F:
	incbin "LevelData/DATA_14D45F.bin"

DATA_14D488:
	incbin "LevelData/DATA_14D488.bin"

DATA_14D4CA:
	incbin "LevelData/DATA_14D4CA.bin"

DATA_14D9A0:
	incbin "LevelData/DATA_14D9A0.bin"

DATA_14DD7D:
	incbin "LevelData/DATA_14DD7D.bin"

DATA_14DE8F:
	incbin "LevelData/DATA_14DE8F.bin"

DATA_14DEA0:
	incbin "LevelData/DATA_14DEA0.bin"

DATA_14DF5C:
	incbin "LevelData/DATA_14DF5C.bin"

DATA_14E015:
	incbin "LevelData/DATA_14E015.bin"

DATA_14E035:
	incbin "LevelData/DATA_14E035.bin"

DATA_14E5E9:
	incbin "LevelData/DATA_14E5E9.bin"

DATA_14E743:
	incbin "LevelData/DATA_14E743.bin"

DATA_14E794:
	incbin "LevelData/DATA_14E794.bin"

DATA_14E88F:
	incbin "LevelData/DATA_14E88F.bin"

DATA_14E909:
	incbin "LevelData/DATA_14E909.bin"

DATA_14E920:
	incbin "LevelData/DATA_14E920.bin"

DATA_14EA82:
	incbin "LevelData/DATA_14EA82.bin"

DATA_14EBEC:
	incbin "LevelData/DATA_14EBEC.bin"

DATA_14EEAB:
	incbin "LevelData/DATA_14EEAB.bin"

DATA_14EFF2:
	incbin "LevelData/DATA_14EFF2.bin"

DATA_14F030:
	incbin "LevelData/DATA_14F030.bin"

DATA_14F095:
	incbin "LevelData/DATA_14F095.bin"

DATA_14F127:
	incbin "LevelData/DATA_14F127.bin"

DATA_14F13E:
	incbin "LevelData/DATA_14F13E.bin"

DATA_14F40E:
	incbin "LevelData/DATA_14F40E.bin"

DATA_14F9E1:
	incbin "LevelData/DATA_14F9E1.bin"

DATA_14FBC0:
	incbin "LevelData/DATA_14FBC0.bin"

DATA_14FCB8:
	incbin "LevelData/DATA_14FCB8.bin"

DATA_14FD17:
	incbin "LevelData/DATA_14FD17.bin"

DATA_14FDF7:
	incbin "LevelData/DATA_14FDF7.bin"

DATA_14FE86:
	incbin "LevelData/DATA_14FE86.bin"

DATA_14FEC4:
	incbin "LevelData/DATA_14FEC4.bin"

DATA_14FF1F:
	incbin "LevelData/DATA_14FF1F.bin"

DATA_14FF83:
	incbin "LevelData/DATA_14FF83.bin"

DATA_14FF91:
	incbin "LevelData/DATA_14FF91.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($14FFA5, incbin, DATA_14FFA5_YI_U2.bin)
else
	%FREE_BYTES($14FFA5, 91, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank15Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_158000:
	incbin "LevelData/DATA_158000.bin"

DATA_158250:
	incbin "LevelData/DATA_158250.bin"

DATA_1582E6:
	incbin "LevelData/DATA_1582E6.bin"

DATA_15839D:
	incbin "LevelData/DATA_15839D.bin"

DATA_15866B:
	incbin "LevelData/DATA_15866B.bin"

DATA_1586C7:
	incbin "LevelData/DATA_1586C7.bin"

DATA_1586DE:
	incbin "LevelData/DATA_1586DE.bin"

DATA_1586E6:
	incbin "LevelData/DATA_1586E6.bin"

DATA_15876C:
	incbin "LevelData/DATA_15876C.bin"

DATA_1589F7:
	incbin "LevelData/DATA_1589F7.bin"

DATA_159182:
	incbin "LevelData/DATA_159182.bin"

DATA_159245:
	incbin "LevelData/DATA_159245.bin"

DATA_1592B0:
	incbin "LevelData/DATA_1592B0.bin"

DATA_1593C9:
	incbin "LevelData/DATA_1593C9.bin"

DATA_1593F5:
	incbin "LevelData/DATA_1593F5.bin"

DATA_159527:
	incbin "LevelData/DATA_159527.bin"

DATA_1598BE:
	incbin "LevelData/DATA_1598BE.bin"

DATA_159917:
	incbin "LevelData/DATA_159917.bin"

DATA_159BF5:
	incbin "LevelData/DATA_159BF5.bin"

DATA_159C5F:
	incbin "LevelData/DATA_159C5F.bin"

DATA_159CFA:
	incbin "LevelData/DATA_159CFA.bin"

DATA_159D95:
	incbin "LevelData/DATA_159D95.bin"

DATA_159DC4:
	incbin "LevelData/DATA_159DC4.bin"

DATA_159E3E:
	incbin "LevelData/DATA_159E3E.bin"

DATA_159E43:
	incbin "LevelData/DATA_159E43.bin"

DATA_159EBD:
	incbin "LevelData/DATA_159EBD.bin"

DATA_159ED1:
	incbin "LevelData/DATA_159ED1.bin"

DATA_159F06:
	incbin "LevelData/DATA_159F06.bin"

DATA_159F1A:
	incbin "LevelData/DATA_159F1A.bin"

DATA_15A301:
	incbin "LevelData/DATA_15A301.bin"

DATA_15A51B:
	incbin "LevelData/DATA_15A51B.bin"

DATA_15A7E4:
	incbin "LevelData/DATA_15A7E4.bin"

DATA_15AA78:
	incbin "LevelData/DATA_15AA78.bin"

DATA_15AB8E:
	incbin "LevelData/DATA_15AB8E.bin"

DATA_15AC4A:
	incbin "LevelData/DATA_15AC4A.bin"

DATA_15ACD3:
	incbin "LevelData/DATA_15ACD3.bin"

DATA_15AD50:
	incbin "LevelData/DATA_15AD50.bin"

DATA_15AD64:
	incbin "LevelData/DATA_15AD64.bin"

DATA_15AD93:
	incbin "LevelData/DATA_15AD93.bin"

DATA_15AFDD:
	incbin "LevelData/DATA_15AFDD.bin"

DATA_15B666:
	incbin "LevelData/DATA_15B666.bin"

DATA_15B7EC:
	incbin "LevelData/DATA_15B7EC.bin"

DATA_15B881:
	incbin "LevelData/DATA_15B881.bin"

DATA_15B8F5:
	incbin "LevelData/DATA_15B8F5.bin"

DATA_15B981:
	incbin "LevelData/DATA_15B981.bin"

DATA_15BA16:
	incbin "LevelData/DATA_15BA16.bin"

DATA_15BA30:
	incbin "LevelData/DATA_15BA30.bin"

DATA_15BA4A:
	incbin "LevelData/DATA_15BA4A.bin"

DATA_15BA64:
	incbin "LevelData/DATA_15BA64.bin"

DATA_15BBE8:
	incbin "LevelData/DATA_15BBE8.bin"

DATA_15BEA6:
	incbin "LevelData/DATA_15BEA6.bin"

DATA_15C0FA:
	incbin "LevelData/DATA_15C0FA.bin"

DATA_15C19A:
	incbin "LevelData/DATA_15C19A.bin"

DATA_15C1F0:
	incbin "LevelData/DATA_15C1F0.bin"

DATA_15C258:
	incbin "LevelData/DATA_15C258.bin"

DATA_15C2C9:
	incbin "LevelData/DATA_15C2C9.bin"

DATA_15C307:
	incbin "LevelData/DATA_15C307.bin"

DATA_15C4E2:
	incbin "LevelData/DATA_15C4E2.bin"

DATA_15C59E:
	incbin "LevelData/DATA_15C59E.bin"

DATA_15C7F8:
	incbin "LevelData/DATA_15C7F8.bin"

DATA_15CA77:
	incbin "LevelData/DATA_15CA77.bin"

DATA_15CB51:
	incbin "LevelData/DATA_15CB51.bin"

DATA_15CC16:
	incbin "LevelData/DATA_15CC16.bin"

DATA_15D16B:
	incbin "LevelData/DATA_15D16B.bin"

DATA_15D4BA:
	incbin "LevelData/DATA_15D4BA.bin"

DATA_15D6BD:
	incbin "LevelData/DATA_15D6BD.bin"

DATA_15D6DF:
	incbin "LevelData/DATA_15D6DF.bin"

DATA_15D759:
	incbin "LevelData/DATA_15D759.bin"

DATA_15D7D6:
	incbin "LevelData/DATA_15D7D6.bin"

DATA_15D868:
	incbin "LevelData/DATA_15D868.bin"

DATA_15D8D6:
	incbin "LevelData/DATA_15D8D6.bin"

DATA_15D8E7:
	incbin "LevelData/DATA_15D8E7.bin"

DATA_15D90D:
	incbin "LevelData/DATA_15D90D.bin"

DATA_15DAEC:
	incbin "LevelData/DATA_15DAEC.bin"

DATA_15DD93:
	incbin "LevelData/DATA_15DD93.bin"

DATA_15DFDF:
	incbin "LevelData/DATA_15DFDF.bin"

DATA_15E2C8:
	incbin "LevelData/DATA_15E2C8.bin"

DATA_15E43D:
	incbin "LevelData/DATA_15E43D.bin"

DATA_15E663:
	incbin "LevelData/DATA_15E663.bin"

DATA_15E689:
	incbin "LevelData/DATA_15E689.bin"

DATA_15E6FA:
	incbin "LevelData/DATA_15E6FA.bin"

DATA_15E7A4:
	incbin "LevelData/DATA_15E7A4.bin"

DATA_15E83C:
	incbin "LevelData/DATA_15E83C.bin"

DATA_15E886:
	incbin "LevelData/DATA_15E886.bin"

DATA_15E8A6:
	incbin "LevelData/DATA_15E8A6.bin"

DATA_15E8DE:
	incbin "LevelData/DATA_15E8DE.bin"

DATA_15E8E3:
	incbin "LevelData/DATA_15E8E3.bin"

DATA_15EB1B:
	incbin "LevelData/DATA_15EB1B.bin"

DATA_15EE89:
	incbin "LevelData/DATA_15EE89.bin"

DATA_15F013:
	incbin "LevelData/DATA_15F013.bin"

DATA_15F096:
	incbin "LevelData/DATA_15F096.bin"

DATA_15F137:
	incbin "LevelData/DATA_15F137.bin"

DATA_15F196:
	incbin "LevelData/DATA_15F196.bin"

DATA_15F222:
	incbin "LevelData/DATA_15F222.bin"

DATA_15F2E7:
	incbin "LevelData/DATA_15F2E7.bin"

DATA_15F3A1:
	incbin "LevelData/DATA_15F3A1.bin"

DATA_15F51C:
	incbin "LevelData/DATA_15F51C.bin"

DATA_15F6BC:
	incbin "LevelData/DATA_15F6BC.bin"

DATA_15F7F4:
	incbin "LevelData/DATA_15F7F4.bin"

DATA_15F83A:
	incbin "LevelData/DATA_15F83A.bin"

DATA_15F8F7:
	incbin "LevelData/DATA_15F8F7.bin"

DATA_15F9B2:
	incbin "LevelData/DATA_15F9B2.bin"

DATA_15FBA2:
	incbin "LevelData/DATA_15FBA2.bin"

DATA_15FCBE:
	incbin "LevelData/DATA_15FCBE.bin"

DATA_15FCEA:
	%FREE_BYTES($15FCEA, 1, $FF)

DATA_15FCEB:
	incbin "LevelData/DATA_15FCEB.bin"

DATA_15FD47:
	incbin "LevelData/DATA_15FD47.bin"

DATA_15FDA0:
	incbin "LevelData/DATA_15FDA0.bin"

DATA_15FDC3:
	incbin "LevelData/DATA_15FDC3.bin"

DATA_15FDCE:
	incbin "LevelData/DATA_15FDCE.bin"

DATA_15FE39:
	incbin "LevelData/DATA_15FE39.bin"

DATA_15FE9E:
	incbin "LevelData/DATA_15FE9E.bin"

DATA_15FEE8:
	incbin "LevelData/DATA_15FEE8.bin"

DATA_15FEF3:
	incbin "LevelData/DATA_15FEF3.bin"

DATA_15FF28:
	incbin "LevelData/DATA_15FF28.bin"

DATA_15FF69:
	incbin "LevelData/DATA_15FF69.bin"

DATA_15FF7D:
	incbin "LevelData/DATA_15FF7D.bin"

DATA_15FFD0:
	incbin "LevelData/DATA_15FFD0.bin"

DATA_15FFD5:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($15FFD5, incbin, DATA_15FFD5_YI_U2.bin)
else
	%FREE_BYTES($15FFD5, 43, $FF)
endif

%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank16Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_168000:
	incbin "LevelData/DATA_168000.bin"

DATA_168042:
	incbin "LevelData/DATA_168042.bin"

DATA_1681C7:
	incbin "LevelData/DATA_1681C7.bin"

DATA_1684C5:
	incbin "LevelData/DATA_1684C5.bin"

DATA_16855E:
	incbin "LevelData/DATA_16855E.bin"

DATA_168560:
	incbin "LevelData/DATA_168560.bin"

DATA_168583:
	incbin "LevelData/DATA_168583.bin"

DATA_168642:
	incbin "LevelData/DATA_168642.bin"

DATA_168671:
	incbin "LevelData/DATA_168671.bin"

DATA_16873E:
	incbin "LevelData/DATA_16873E.bin"

DATA_168F5C:
	incbin "LevelData/DATA_168F5C.bin"

DATA_1690B5:
	incbin "LevelData/DATA_1690B5.bin"

DATA_1690D5:
	incbin "LevelData/DATA_1690D5.bin"

DATA_1691B5:
	incbin "LevelData/DATA_1691B5.bin"

DATA_1691D5:
	incbin "LevelData/DATA_1691D5.bin"

DATA_1694A5:
	incbin "LevelData/DATA_1694A5.bin"

DATA_16953D:
	incbin "LevelData/DATA_16953D.bin"

DATA_1695D4:
	incbin "LevelData/DATA_1695D4.bin"

DATA_169D23:
	incbin "LevelData/DATA_169D23.bin"

DATA_169E04:
	incbin "LevelData/DATA_169E04.bin"

DATA_169E75:
	incbin "LevelData/DATA_169E75.bin"

DATA_169E92:
	incbin "LevelData/DATA_169E92.bin"

DATA_169F63:
	incbin "LevelData/DATA_169F63.bin"

DATA_169F74:
	incbin "LevelData/DATA_169F74.bin"

DATA_169F7F:
	incbin "LevelData/DATA_169F7F.bin"

DATA_16A148:
	incbin "LevelData/DATA_16A148.bin"

DATA_16A400:
	incbin "LevelData/DATA_16A400.bin"

DATA_16A5DE:
	incbin "LevelData/DATA_16A5DE.bin"

DATA_16A6D9:
	incbin "LevelData/DATA_16A6D9.bin"

DATA_16A7C0:
	incbin "LevelData/DATA_16A7C0.bin"

DATA_16A80A:
	incbin "LevelData/DATA_16A80A.bin"

DATA_16A8A2:
	incbin "LevelData/DATA_16A8A2.bin"

DATA_16A916:
	incbin "LevelData/DATA_16A916.bin"

DATA_16A963:
	incbin "LevelData/DATA_16A963.bin"

DATA_16A998:
	incbin "LevelData/DATA_16A998.bin"

DATA_16AD52:
	incbin "LevelData/DATA_16AD52.bin"

DATA_16AF66:
	incbin "LevelData/DATA_16AF66.bin"

DATA_16B272:
	incbin "LevelData/DATA_16B272.bin"

DATA_16B3C1:
	incbin "LevelData/DATA_16B3C1.bin"

DATA_16B480:
	incbin "LevelData/DATA_16B480.bin"

DATA_16B4F1:
	incbin "LevelData/DATA_16B4F1.bin"

DATA_16B559:
	incbin "LevelData/DATA_16B559.bin"

DATA_16B582:
	incbin "LevelData/DATA_16B582.bin"

DATA_16BAE9:
	incbin "LevelData/DATA_16BAE9.bin"

DATA_16BE15:
	incbin "LevelData/DATA_16BE15.bin"

DATA_16BFAA:
	incbin "LevelData/DATA_16BFAA.bin"

DATA_16C01C:
	incbin "LevelData/DATA_16C01C.bin"

DATA_16C0BD:
	incbin "LevelData/DATA_16C0BD.bin"

DATA_16C167:
	incbin "LevelData/DATA_16C167.bin"

DATA_16C172:
	incbin "LevelData/DATA_16C172.bin"

DATA_16C17D:
	incbin "LevelData/DATA_16C17D.bin"

DATA_16C6CD:
	incbin "LevelData/DATA_16C6CD.bin"

DATA_16CAA6:
	incbin "LevelData/DATA_16CAA6.bin"

DATA_16CB5D:
	incbin "LevelData/DATA_16CB5D.bin"

DATA_16CBDA:
	incbin "LevelData/DATA_16CBDA.bin"

DATA_16CCD5:
	incbin "LevelData/DATA_16CCD5.bin"

DATA_16CD9D:
	incbin "LevelData/DATA_16CD9D.bin"

DATA_16CDA8:
	incbin "LevelData/DATA_16CDA8.bin"

DATA_16CDF5:
	incbin "LevelData/DATA_16CDF5.bin"

DATA_16D3C7:
	incbin "LevelData/DATA_16D3C7.bin"

DATA_16D8B4:
	incbin "LevelData/DATA_16D8B4.bin"

DATA_16DCF4:
	incbin "LevelData/DATA_16DCF4.bin"

DATA_16DD21:
	incbin "LevelData/DATA_16DD21.bin"

DATA_16DDA7:
	incbin "LevelData/DATA_16DDA7.bin"

DATA_16DEAE:
	incbin "LevelData/DATA_16DEAE.bin"

DATA_16DF61:
	incbin "LevelData/DATA_16DF61.bin"

DATA_16DF78:
	incbin "LevelData/DATA_16DF78.bin"

DATA_16E0B6:
	incbin "LevelData/DATA_16E0B6.bin"

DATA_16E763:
	incbin "LevelData/DATA_16E763.bin"

DATA_16E842:
	incbin "LevelData/DATA_16E842.bin"

DATA_16EBC4:
	incbin "LevelData/DATA_16EBC4.bin"

DATA_16EC2C:
	incbin "LevelData/DATA_16EC2C.bin"

DATA_16EC55:
	incbin "LevelData/DATA_16EC55.bin"

DATA_16EF27:
	incbin "LevelData/DATA_16EF27.bin"

DATA_16EF62:
	incbin "LevelData/DATA_16EF62.bin"

DATA_16EFF4:
	incbin "LevelData/DATA_16EFF4.bin"

DATA_16F017:
	incbin "LevelData/DATA_16F017.bin"

DATA_16F091:
	incbin "LevelData/DATA_16F091.bin"
DATA_16F097:

DATA_16F099:
	incbin "LevelData/DATA_16F099.bin"

DATA_16F0FE:
	incbin "LevelData/DATA_16F0FE.bin"

DATA_16F93D:
	incbin "LevelData/DATA_16F93D.bin"

DATA_16FC58:
	incbin "LevelData/DATA_16FC58.bin"

DATA_16FEC6:
	incbin "LevelData/DATA_16FEC6.bin"

DATA_16FF4C:
	incbin "LevelData/DATA_16FF4C.bin"

DATA_16FF96:
	incbin "LevelData/DATA_16FF96.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($16FFF8, incbin, DATA_16FFF8_YI_U2.bin)
else
	%FREE_BYTES($16FFF8, 8, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro YIBank17Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

DATA_178000:
	dw $3000,$47FF,$01BF
	dw $FFFF

DATA_178008:
	dw $3800,$47FF,$0000
	dw $7E82,$4277,$05FF
	dw $FFFF

DATA_178016:
	db $43,!REGISTER_Mode7MatrixParameterA : dl $7E5B18

DATA_17801B:
	db $F0 : dw $7E5040
	db $F0 : dw $7E5040
	db $00

DATA_178022:
	db $43,!REGISTER_Mode7MatrixParameterC : dl  $7E5B98

DATA_178027:
	db $F0 : dw $7E5200
	db $F0 : dw $7E5200
	db $00

DATA_17802E:
	db $43,!REGISTER_CGRAMAddress : dl  $7E5C18

DATA_178033:
	db $20,$22,$5C,$B0,$C0,$53,$01,$22,$5C,$00

UNK_17803D:
	db $26,$26,$FF,$7F

DATA_178041:
	db $43,!REGISTER_BG1HorizScrollOffset : dl $7E5C18

DATA_178046:
	db $76,$45,$00,$01,$39,$00,$00

DATA_17804D:
	db $43,!REGISTER_BG2HorizScrollOffset : dl $7E5C98

DATA_178052:
	db $20,$C0,$55,$B0,$C4,$55,$01,$C0,$55,$00

DATA_17805C:
	db $41,!REGISTER_Window1LeftPositionDesignation : dl $7E5C98

DATA_178061:
	db $0F,$C0,$55,$E4,$C2,$55,$81,$A0,$56,$00

DATA_17806B:
	db $00,!REGISTER_BGModeAndTileSizeSetting : dl $7E5A18

DATA_178070:
	db $76,$10,$6A,$07,$00

DATA_178075:
	db $00,!REGISTER_MainScreenLayers : dl $7E5A98

DATA_17807A:
	db $70,$13,$70,$11,$00

DATA_17807F:
	db $43,!REGISTER_BG1HorizScrollOffset : dl $7E5D18

DATA_178084:
	db $5F,$41,$00,$01,$A1,$09,$01,$A5,$09,$01,$A9,$09,$02,$AD,$09,$03
	db $B1,$09,$04,$B5,$09,$05,$B9,$09,$06,$BD,$09,$01,$39,$00,$00

DATA_1780A3:
	dl DATA_0FF800
	dl DATA_5F9380

DATA_1780A9:
	db $DA,$58,$A1,$21,$C8,$BB,$20,$B9,$34,$40,$B9,$D4

DATA_1780B5:
	dw $0070,$004D,$001C,$00EF,$009C,$002A

DATA_1780C1:
	dl $707C02
	dl $707C6A
	dl $707CD2

DATA_1780CA:
	dw $707C47,$707CAF,$707D17

DATA_1780D0:
	dw $707C46,$707CAE,$707D16

CODE_1780D6:
	LDA.b #$12
	JSL.l CODE_008279
	JSL.l CODE_00831C
	JSL.l CODE_00BE26
	REP.b #$20
	LDA.w #$0080
	STA.w $020E
	LDA.w #$0100
	STA.w $0210
	STZ.b !RAM_YI_Global_Layer1XPosLo
	LDA.w #$0060
	STA.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	LDA.w #$008F
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3XPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	STZ.w $09A3
	STZ.w $09A7
	STZ.w $09AB
	STZ.w $09AF
	STZ.w $09B3
	STZ.w $09B7
	STZ.w $09BB
	STZ.w $09BF
	STZ.w $0214
	SEP.b #$20
	LDA.w $011A
	BNE.b CODE_17815C
	LDA.l $707E7C
	ASL
	ADC.l $707E7C
	TAX
	REP.b #$20
	LDA.w DATA_1780C1,x
	STA.b $00
	LDA.w DATA_1780C1+$01,x
	STA.b $01
	STZ.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	SEP.b #$20
	LDX.b #$00
	LDA.b [$00]
	AND.b #$7F
	BEQ.b CODE_178157
CODE_178149:
	INX
	SEC
	SBC.b #!Define_YI_Map_LevelsPerWorld
	BPL.b CODE_178149
	DEX
	CPX.b #$05
	BNE.b CODE_178157
	INC.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
CODE_178157:
	TXA
	ASL
	STA.w !RAM_YI_Level_CurrentWorldLo
CODE_17815C:
	LDX.b #$04
CODE_17815E:
	LDA.w DATA_178016,x
	STA.w HDMA[$07].Parameters,x
	LDA.w DATA_178022,x
	STA.w HDMA[$06].Parameters,x
	LDA.w DATA_17802E,x
	STA.w HDMA[$05].Parameters,x
	LDA.w DATA_17804D,x
	STA.w HDMA[$04].Parameters,x
	LDA.w DATA_17806B,x
	STA.w HDMA[$03].Parameters,x
	LDA.w DATA_178075,x
	STA.w HDMA[$02].Parameters,x
	LDA.w DATA_17807F,x
	STA.w HDMA[$01].Parameters,x
	DEX
	BPL.b CODE_17815E
	LDA.b #$7E
	STA.w HDMA[$07].IndirectSourceBank
	STA.w HDMA[$06].IndirectSourceBank
	STA.w HDMA[$05].IndirectSourceBank
	STA.w HDMA[$04].IndirectSourceBank
	STA.w HDMA[$03].IndirectSourceBank
	STA.w HDMA[$02].IndirectSourceBank
	STZ.w HDMA[$01].IndirectSourceBank
	LDX.b #$1E
CODE_1781A4:
	LDA.w DATA_17801B,x
	STA.l $7E5B18,x
	LDA.w DATA_178027,x
	STA.l $7E5B98,x
	LDA.w DATA_178033,x
	STA.l $7E5C18,x
	LDA.w DATA_178052,x
	STA.l $7E5C98,x
	LDA.w DATA_178070,x
	STA.l $7E5A18,x
	LDA.w DATA_17807A,x
	STA.l $7E5A98,x
	LDA.w DATA_178084,x
	STA.l $7E5D18,x
	DEX
	BPL.b CODE_1781A4
	LDA.b #!REGISTER_BG1HorizScrollOffset
	STA.w $09A0
	JSL.l CODE_00B3CF
	LDX.b #$00
	JSL.l CODE_00BDA2
	LDA.b #$3C
	STA.w !REGISTER_BG4AddressAndSize
	STZ.w !REGISTER_Mode7TilemapSettings
	REP.b #$20
	LDY.b #$00
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$3800
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_ReadFromVRAMPortLo&$0000FF<<8)+$80
	STA.w DMA[$00].Parameters
	LDA.w #$7E7BBE
	STA.w DMA[$00].SourceLo
	LDY.b #$7E7BBE>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	LDY.w !REGISTER_ReadFromVRAMPortLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$3800
	STA.w !REGISTER_VRAMAddressLo
	LDY.b #!REGISTER_ReadFromVRAMPortHi
	STY.w DMA[$00].Destination
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	LDY.w !REGISTER_ReadFromVRAMPortHi
	STX.w !REGISTER_DMAEnable
	LDY.b #$7F
	STY.b $00
	STZ.w !REGISTER_VRAMAddressIncrementValue
	STZ.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$08
	STA.w DMA[$00].Parameters
	LDA.w #$0000
	STA.w DMA[$00].SourceLo
	STZ.w DMA[$00].SourceBank
	LDA.w #$2000
	STA.w DMA[$00].SizeLo
	LDX.b #$01
	STX.w !REGISTER_DMAEnable
	LDY.b #$80
	STY.w !REGISTER_VRAMAddressIncrementValue
	LDY.b #$03
	LDA.w $011A
	AND.w #$00FF
	CMP.w #$0080
	BEQ.b CODE_178275
	LDA.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	BNE.b CODE_178275
	DEY
	DEY
	DEY
CODE_178275:
	LDA.w #$3C00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w DATA_1780A3+$01,y
	STA.w DMA[$00].SourceHi
	LDA.w DATA_1780A3,y
	STA.w DMA[$00].SourceLo
	LDA.w #$0480
	STA.w DMA[$00].SizeLo
	STX.w !REGISTER_DMAEnable
	LDA.w #$3E40
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #DATA_0FFC80
	STA.w DMA[$00].SourceLo
	LDY.b #DATA_0FFC80>>16
	STY.w DMA[$00].SourceBank
	LDA.w #$0380
	STA.w DMA[$00].SizeLo
	STX.w !REGISTER_DMAEnable
	LDX.b #$707C47>>16
	STX.b $02
	LDA.l $707E7C
	ASL
	TAX
	LDA.w DATA_1780CA,x
	STA.b $00
	LDY.b #$05
	LDA.w #$3E9A
	STA.b $0A
	LDA.w #$3EBA
	STA.b $0C
CODE_1782CB:
	LDA.w #$2B22
	STA.b $10
	STA.b $12
	STA.b $20
	STA.b $22
	LDA.b [$00]
	AND.w #$007F
	CMP.w #$0064
	BCC.b CODE_1782F0
	LDA.w #$2F0B
	STA.b $10
	INC
	STA.b $12
	LDA.w #$2F1B
	STA.b $20
	INC
	STA.b $22
CODE_1782F0:
	LDA.b $0A
	STA.w !REGISTER_VRAMAddressLo
	LDA.b $10
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b $12
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b $0C
	STA.w !REGISTER_VRAMAddressLo
	LDA.b $20
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b $22
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b $00
	SEC
	SBC.w #$000C
	STA.b $00
	DEC.b $0A
	DEC.b $0A
	DEC.b $0C
	DEC.b $0C
	DEY
	BPL.b CODE_1782CB
	LDY.w $011A
	BNE.b CODE_17838C
	LDA.w #$0400
	STA.w $1405
	LDA.w #$DA00
	STA.w $6CA4
	LDA.w #$5800
	STA.w $6CA6
	LDA.w #$0000
	STA.w $6CA8
	LDA.w #$0070
	STA.w $6CA0
	PHB
	LDX.b #$7E53C0>>16
	PHX
	PLB
	REP.b #$10
	LDY.w #$01FC
CODE_17834E:
	LDA.w #$2626
	STA.w $7E53C0,y
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_17834E
	LDX.w #$007E
	LDY.w #$00FC
CODE_178360:
	LDA.l DATA_5FCC2E,x
	STA.w $7E53C2,y
	STA.w $7E54C2,y
	DEY
	DEY
	DEY
	DEY
	DEX
	DEX
	BPL.b CODE_178360
	LDX.w #$00E0
CODE_178375:
	LDA.b !RAM_YI_Global_Layer2XPosLo
	STA.w $7E55C0,x
	LDA.b !RAM_YI_Global_Layer2YPosLo
	STA.w $7E55C2,x
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_178375
	SEP.b #$30
	PLB
	LDA.b #$FE
	BRA.b CODE_1783BD

CODE_17838C:
	LDY.b #$00
	LDA.w #$7E7BBE
	STA.b $20
	LDX.b #$7E7BBE>>16
	STX.b $22
	LDA.w #$0400
	JSL.l CODE_0082AB
	LDA.w #$7E83BE
	STA.b $20
	LDA.w #$0400
	JSL.l CODE_0082AB
	LDA.w #$0011
	STA.w !RAM_YI_Global_MainScreenLayers
	SEP.b #$20
	LDA.b #$06
	STA.w $0127
	JSL.l CODE_00E37B
	LDA.b #$CE
CODE_1783BD:
	STA.w !RAM_YI_Global_HDMAEnable
	REP.b #$10
	LDX.w #$0044
CODE_1783C5:
	STZ.w $09C1,x
	DEX
	BPL.b CODE_1783C5
	LDX.w #$05DD
CODE_1783CE:
	STZ.w $702A,x
	DEX
	BPL.b CODE_1783CE
	SEP.b #$10
	LDX.b #$02
	LDA.w $011A
	CMP.b #$80
	BEQ.b CODE_1783E6
	LDA.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	BNE.b CODE_1783E6
	DEX
	DEX
CODE_1783E6:
	JSL.l CODE_00BAEA
	PHB
	LDA.b #$7E4800>>16
	PHA
	PLB
	REP.b #$30
	LDA.w #DATA_5F9C00-DATA_5F9800
	STA.b $04
	LDA.w $011A
	AND.w #$00FF
	CMP.w #$0080
	BEQ.b CODE_178408
	LDA.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	BNE.b CODE_178408
	STZ.b $04
CODE_178408:
	LDY.w $7E4800
	LDA.b $04
	CLC
	ADC.w #DATA_5F9800
	STA.b $04
	LDA.w #$0020
	STA.b $02
	LDA.w #$0800
CODE_17841B:
	STA.b $00
	STA.w $0000,y
	LDA.w #$0000
	STA.w $0002,y
	LDA.w #$1800
	STA.w $0003,y
	LDA.b $04
	STA.w $0005,y
	CLC
	ADC.w #$0020
	STA.b $04
	LDA.w #DATA_5F9800>>16
	STA.w $0007,y
	LDA.w #$0020
	STA.w $0008,y
	TYA
	CLC
	ADC.w #$000C
	STA.w $000A,y
	TAY
	LDA.b $00
	CLC
	ADC.w #$0080
	DEC.b $02
	BNE.b CODE_17841B
	STY.w $7E4800
	PLB
	LDX.w #$0002
	LDA.w $011A
	AND.w #$00FF
	CMP.w #$0080
	BEQ.b CODE_17846F
	LDA.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	BNE.b CODE_17846F
	DEX
	DEX
CODE_17846F:
	LDA.l DATA_10EE9A,x
	STA.b $00
	LDA.l DATA_10EE9E,x
	STA.b $02
	SEP.b #$20
	PHB
	LDA.b #DATA_10EEA2>>16
	PHA
	PLB
	LDY.w #$0000
CODE_178485:
	LDA.b ($00),y
	CMP.b #$FF
	BEQ.b CODE_17849C
	INC.w $702A
	LDX.w #$0004
CODE_178491:
	LDA.b ($00),y
	STA.w $702C,y
	INY
	DEX
	BNE.b CODE_178491
	BRA.b CODE_178485

CODE_17849C:
	PLB
	LDA.w $6CA5
	STA.w $702D
	LDA.w $6CA7
	STA.w $702E
	LDA.w $6CA9
	STA.w $702F
	LDA.b #$C0
	SEC
	SBC.w $6CA0
	STA.w $021E
	REP.b #$30
	LDX.w #$0254
	LDA.w #$0100
CODE_1784C0:
	STA.w $7286,x
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_1784C0
	SEP.b #$30
	PHB
	LDA.b #DATA_10EEA2>>16
	PHA
	PLB
	LDY.b #$00
CODE_1784D2:
	LDA.b ($02),y
	BMI.b CODE_1784E3
	LDX.b #$04
CODE_1784D8:
	LDA.b ($02),y
	STA.w $09C1,y
	INY
	DEX
	BNE.b CODE_1784D8
	BRA.b CODE_1784D2

CODE_1784E3:
	PLB
	JSR.w CODE_178661
	LDX.w !RAM_YI_Level_CurrentWorldLo
	BNE.b CODE_1784EF				; Note: !Define_YI_WorldID_World1
	JMP.w CODE_1785A1

CODE_1784EF:
	LDA.w $011A
	AND.b #$7F
	BNE.b CODE_1784F8
	INX
	INX
CODE_1784F8:
	LDA.w DATA_1780A9-$02,x
	STA.w $6CA5
	STA.w $702D
	LDA.w DATA_1780A9-$01,x
	STA.w $6CA7
	STA.w $702E
	LDA.w DATA_1780B5-$02,x
	STA.w $6CA0
	LDA.b #$C0
	SEC
	SBC.w $6CA0
	STA.w $021E
	LDA.w $011A
	AND.b #$7F
	BNE.b CODE_178568
	LDA.w !RAM_YI_Level_CurrentWorldLo
	CMP.b #!Define_YI_WorldID_World6
	BNE.b CODE_178568
	LDA.l $707E7C
	ASL
	TAY
	LDA.b #$707C46>>16
	STA.b $02
	REP.b #$20
	LDA.w DATA_1780D0,y
	STA.b $00
	SEP.b #$20
	LDA.b [$00]
	AND.b #$80
	BEQ.b CODE_178566
	REP.b #$20
	LDA.l DATA_13FD99-$02,x
	STA.w $021C
	LDA.l DATA_10F0E0-$02,x
	STA.w $096D
	REP.b #$10
	TAY
	LDA.w #$0000
	STA.w $702C,y
	SEP.b #$10
	TXA
	ASL
	TAY
	LDA.w #$000A
	STA.w $09C1,y
	SEP.b #$20
CODE_178566:
	BRA.b CODE_1785A1

CODE_178568:
	REP.b #$20
	LDA.l DATA_13FD99-$02,x
	STA.w $021C
	LDA.l DATA_10F0E0-$02,x
	STA.w $096D
	SEP.b #$20
	CPX.b #$0C
	BCS.b CODE_1785A1
	TXA
	ASL
	TAY
CODE_178581:
	DEY
	DEY
	DEY
	DEY
	BEQ.b CODE_1785A1
	LDA.b #$0A
	STA.w $09C1,y
	TYA
	LSR
	TAX
	REP.b #$20
	LDA.l DATA_10F0E0-$02,x
	REP.b #$10
	TAX
	SEP.b #$20
	STZ.w $702C,x
	SEP.b #$10
	BRA.b CODE_178581

CODE_1785A1:
	LDA.w $011A
	BEQ.b CODE_1785B8
	LDA.w $011A
	BEQ.b CODE_1785B8
	CMP.b #$80
	BNE.b CODE_1785B3
	LDA.b #$1C
	BRA.b CODE_1785B5

CODE_1785B3:
	LDA.b #$02
CODE_1785B5:
	STA.w $6CA2
CODE_1785B8:
	LDA.w $011A
	BMI.b CODE_1785F3
	LDA.l $707E7C
	STA.w $111D
	JSR.w CODE_1790E0
	REP.b #$30
	LDX.w #$000A06
	LDA.w #$0000
	STA.b $01
	LDY.w #$3020
	LDA.w #$0300
	JSL.l CODE_00BEA6
	LDX.w #$702800
	LDA.w #$702800>>16
	STA.b $01
	LDY.w #$2000
	LDA.w #$1000
	JSL.l CODE_00BEA6
	SEP.b #$30
	JSL.l CODE_00E3D7
CODE_1785F3:
	LDA.w $011A
	BPL.b CODE_1785FC
	LDA.b #$F0
	BRA.b CODE_17860D

CODE_1785FC:
	LDA.w $012B
	BPL.b CODE_17860F
	LDA.b #$01
	STA.w $012B
	LDX.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	BEQ.b CODE_17860D
	INC
	INC
CODE_17860D:
	STA.b !RAM_YI_Global_PlayMusicLo
CODE_17860F:
	LDA.w $098E
	BNE.b CODE_17861F
	LDA.b #$1F
	STA.w $0990
	STA.w $0992
	STA.w $0994
CODE_17861F:
	STZ.w $098E
	JSL.l CODE_008245
	JSL.l CODE_1787D2
	LDA.w $0982
	STA.w $0980
CODE_178630:
	LDA.w $0980
	BNE.b CODE_178630
	LDA.w $0984
	EOR.b #$01
	STA.w $0984
	LDA.b #$0F
	STA.w $0200
	JSR.w CODE_178649
	JML.l CODE_1083E2

;---------------------------------------------------------------------------

CODE_178649:
	LDA.w $0201
	ASL
	ASL
	TAX
	LDY.b #$04
CODE_178651:
	LDA.l DATA_00C214,x
	STA.w $0996,y
	INX
	DEY
	DEY
	BPL.b CODE_178651
	INC.w $098E
	RTS

;---------------------------------------------------------------------------

CODE_178661:
	STZ.w $6CA2
	LDA.w $011A
	BEQ.b CODE_178673
CODE_178669:
	LDA.b #$03
	STA.w $0988
	LDA.b #$06
	STA.w $098A
CODE_178673:
	RTS

;---------------------------------------------------------------------------

DATA_178674:					; Note: Title screen OAM data
	db $50,$28,$00,$2E
	db $70,$28,$04,$2E
	db $90,$28,$08,$2E
	db $30,$48,$40,$2E
	db $50,$48,$44,$2E
	db $70,$48,$48,$2E
	db $90,$48,$4C,$2E
	db $B0,$48,$0C,$2E
	db $20,$68,$80,$2E
	db $40,$68,$84,$2E
	db $60,$68,$88,$2E
	db $80,$68,$8C,$2E
	db $A0,$68,$40,$2F
	db $C0,$68,$44,$2F
	db $20,$88,$C0,$2E
	db $40,$88,$C4,$2E
	db $60,$88,$C8,$2E
	db $80,$88,$CC,$2E
	db $20,$A8,$00,$2F
	db $40,$A8,$04,$2F
	db $60,$A8,$08,$2F
	db $80,$A8,$0C,$2F
	db $A0,$98,$48,$2F
	db $C0,$98,$4C,$2F
	db $A0,$88,$80,$2F
	db $B0,$88,$82,$2F
	db $C0,$88,$84,$2F
	db $D0,$88,$86,$2F
	db $A0,$B8,$88,$2F
	db $B0,$B8,$8A,$2F
	db $C0,$B8,$8C,$2F
	db $D0,$B8,$8E,$2F
	db $10,$78,$A0,$2F
	db $10,$88,$A2,$2F
	db $10,$98,$A4,$2F
	db $10,$A8,$A6,$2F
	db $E0,$78,$A8,$2F
	db $E0,$88,$AA,$2F
	db $E0,$98,$AC,$2F
	db $E0,$A8,$AE,$2F

DATA_178714:
	dw $AAAA,$AAAA,$AAAA,$0000,$0000

DATA_17871E:
	dw DATA_17872E,DATA_178750,DATA_178766,DATA_17877F

DATA_178726:
	dw $7F56DE,$7F64DE,$7F72DE,$7F80DE

DATA_17872E:
	db $00,$3C,$0C,$80,$5A,$04,$20,$3C,$0C,$A0,$5A,$04,$40,$3C,$0C,$C0
	db $5A,$04,$60,$3C,$0C,$E0,$5A,$04,$80,$32,$10,$A0,$32,$10,$C0,$32
	db $10,$FF

DATA_178750:
	db $E0,$32,$10,$00,$2E,$10,$20,$2E,$10,$40,$2E,$10,$60,$2E,$10,$80
	db $2E,$10,$A0,$2E,$10,$FF

DATA_178766:
	db $C0,$2E,$10,$E0,$2E,$10,$00,$2F,$10,$20,$2F,$10,$40,$2F,$10,$60
	db $2F,$10,$00,$56,$08,$C0,$56,$08,$FF

DATA_17877F:
	db $20,$56,$08,$E0,$56,$08,$40,$56,$08,$00,$57,$08,$60,$56,$08,$20
	db $57,$08,$80,$56,$08,$40,$57,$08,$A0,$56,$08,$60,$57,$08,$40,$29
	db $02,$80,$29,$02,$C0,$29,$02,$00,$2A,$02,$40,$6A,$02,$80,$6A,$02
	db $C0,$6A,$02,$00,$6B,$02,$60,$29,$02,$A0,$29,$02,$E0,$29,$02,$20
	db $2A,$02,$60,$6A,$02,$A0,$6A,$02,$E0,$6A,$02,$20,$6B,$02,$FF

DATA_1787CE:
	dw $0000,$7FFF

CODE_1787D2:
	PHB
	PHK
	PLB
CODE_1787D5:
	JSL.l CODE_00824B
	REP.b #$30
	LDX.w #$009E
CODE_1787DE:
	LDA.w DATA_178674,x
	STA.l $006A80,x
	DEX
	DEX
	BPL.b CODE_1787DE
	LDX.w #$0008
CODE_1787EC:
	LDA.w DATA_178714,x
	STA.l $006C08,x
	DEX
	DEX
	BPL.b CODE_1787EC
	SEP.b #$30
	LDA.w $011A
	BMI.b CODE_178809
	LDA.w $0214
	BEQ.b CODE_178809
	JSR.w CODE_1794E1
	JMP.w CODE_1788BE

CODE_178809:
	REP.b #$20
	LDX.b #FXCODE_08C745>>16
	LDA.w #FXCODE_08C745
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	JSR.w CODE_178919
	LDA.b $30
	AND.b #$07
	ASL
	TAX
	REP.b #$20
	LDA.l DATA_5FC77E,x
	STA.l YI_Global_PaletteMirror[$F7].LowByte
	LDX.b #FXCODE_08C701>>16
	LDA.w #FXCODE_08C701
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b #FXCODE_08C7CA>>16
	LDA.w #FXCODE_08C7CA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
CODE_17883D:
	LDA.w $0980
	BNE.b CODE_17883D
CODE_178842:
	LDA.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BPL.b CODE_178842
CODE_178847:
	LDA.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BMI.b CODE_178847
	REP.b #$20
	LDA.w $0A04
	CLC
	ADC.w #$0020
	AND.w #$07FE
	STA.w $0A04
	STA.b $04
	STZ.b $06
	LDA.w #$706E00
	STA.b $23
	LDA.w #$706E00>>16
	STA.b $25
	LDX.b #$06
CODE_17886B:
	STX.b $00
	LDA.l DATA_17871E,x
	STA.w !REGISTER_SuperFX_R14_GETGamePakROMAddressPtrLo
	LDA.w #DATA_17872E>>16
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.b #FXCODE_08C712>>16
	LDA.w #FXCODE_08C712
	JSL.l !RAM_YI_Global_RT_00E152
	LDX.b $00
	LDA.w #$7F56DE>>8
	STA.b $21
	LDA.w DATA_178726,x
	STA.b $20
	SEP.b #$20
CODE_178891:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVC.b CODE_178891
CODE_178896:
	BIT.w !REGISTER_HVBlankFlagsAndJoypadStatus
	BVS.b CODE_178896
	LDY.b #$04
CODE_17889D:
	DEY
	BNE.b CODE_17889D
	REP.b #$20
	LDA.w #$0E00
	JSL.l CODE_008288
	DEX
	DEX
	BPL.b CODE_17886B
	LDA.w $0984
	EOR.w #$0001
	STA.w $0984
	LDA.w #$0003
	STA.w $0982
	SEP.b #$20
CODE_1788BE:
	LDA.w $098E
	BNE.b CODE_1788CD
	LDA.w $0988
	BEQ.b CODE_178909
	JSR.w CODE_178FB6
	BRA.b CODE_178909

CODE_1788CD:
	LDA.w $0201
	ASL
	TAX
	REP.b #$20
	LDA.w $0994
	ASL
	ASL
	ASL
	ASL
	ASL
	ORA.w $0992
	ASL
	ASL
	ASL
	ASL
	ASL
	ORA.w $0990
	CMP.w DATA_1787CE,x
	SEP.b #$20
	BNE.b CODE_178909
	STZ.w $098E
	LDA.w $0201
	TAX
	LDA.w DATA_17890B,x
	STA.w $0200
	TXA
	EOR.b #$01
	STA.w $0201
	BNE.b CODE_178909
	LDA.w $099C
	STA.w !RAM_YI_Global_CurrentGameMode
CODE_178909:
	PLB
	RTL

DATA_17890B:
	db $0F,$00

;---------------------------------------------------------------------------

DATA_17890D:
	dw CODE_178933
	dw CODE_17896A
	dw CODE_1789A8
	dw CODE_178A9E
	dw CODE_178FA3
	dw CODE_178D93

CODE_178919:
	LDY.b #$3C
CODE_17891B:
	LDX.w $09C1,y
	BEQ.b CODE_17892C
	LDA.w $09C4,y
	BEQ.b CODE_178929
	DEC
	STA.w $09C4,y
CODE_178929:
	JSR.w (DATA_17890D-$02,x)
CODE_17892C:
	DEY
	DEY
	DEY
	DEY
	BPL.b CODE_17891B
	RTS

CODE_178933:
	STZ.b $00
	STZ.b $01
	LDA.w $09C2,y
	INC
	STA.w $09C2,y
	LDX.b #$40
	JMP.w CODE_1789D2

DATA_178943:
	db $00,$00,$00,$FF,$00,$01,$01,$00,$FF,$FF,$00,$01,$00

DATA_178950:
	db $00,$00,$00,$FF,$00,$01,$01,$00,$FF,$FF,$00,$01,$00

DATA_17895D:
	db $1C,$1D,$1E,$1E,$1E,$1E,$1E,$1E,$1E,$1F,$20,$21,$22

CODE_17896A:
	LDA.w $702F,y
	INC
	INC
	STA.w $702F,y
	LDX.w $09C2,y
	INX
	CPX.b #$0D
	BCC.b CODE_178981
	LDX.b #$00
	LDA.b #$1A
	STA.w $702F,y
CODE_178981:
	TXA
	STA.w $09C2,y
	LDA.w $702D,y
	CLC
	ADC.w DATA_178943,x
	STA.w $702D,y
	LDA.w $702E,y
	CLC
	ADC.w DATA_178950,x
	STA.w $702E,y
	LDA.w DATA_17895D,x
	STA.w $702C,y
	RTS

DATA_1789A0:
	db $23,$24,$25,$26,$27,$28,$29,$2A

CODE_1789A8:
	LDX.w $09C3,y
	INX
	CPX.b #$08
	BCC.b CODE_1789B2
	LDX.b #$00
CODE_1789B2:
	TXA
	STA.w $09C3,y
	LDA.w DATA_1789A0,x
	STA.w $702C,y
	LDA.b #$B6
	STA.b $00
	LDA.b #$F0
	STA.b $01
	LDA.w $09C2,y
	CLC
	ADC.b #$04
	STA.w $09C2,y
	LDX.b #$10
	JMP.w CODE_1789D2

CODE_1789D2:
	STX.b $02
	REP.b #$30
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_00E954,x
	STA.b $03
	BPL.b CODE_1789E7
	EOR.w #$FFFF
	INC
CODE_1789E7:
	CMP.w #$0100
	SEP.b #$20
	BCS.b CODE_178A05
	STA.w !REGISTER_Multiplicand
	LDA.b $02
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	LDA.w !REGISTER_ProductOrRemainderHi
	ADC.b #$00
	BRA.b CODE_178A07

CODE_178A05:
	LDA.b $02
CODE_178A07:
	BIT.b $04
	BPL.b CODE_178A0E
	EOR.b #$FF
	INC
CODE_178A0E:
	CLC
	ADC.b $00
	STA.w $702D,y
	REP.b #$20
	LDA.l DATA_00E9D4,x
	STA.b $03
	BPL.b CODE_178A22
	EOR.w #$FFFF
	INC
CODE_178A22:
	CMP.w #$0100
	SEP.b #$20
	BCS.b CODE_178A40
	STA.w !REGISTER_Multiplicand
	LDA.b $02
	STA.w !REGISTER_Multiplier
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	LDA.w !REGISTER_ProductOrRemainderHi
	ADC.b #$00
	BRA.b CODE_178A42

CODE_178A40:
	LDA.b $02
CODE_178A42:
	BIT.b $04
	BPL.b CODE_178A49
	EOR.b #$FF
	INC
CODE_178A49:
	CLC
	ADC.b $01
	STA.w $702E,y
	SEP.b #$10
	RTS

DATA_178A52:
	dw $01FF,$04FC

DATA_178A56:
	dw $302B,$3A35,$443F,$4E49,$312C,$3B36,$4540,$4F4A
	dw $322D,$3C37,$4641,$504B,$332E,$3D38,$4742,$514C
	dw $342F,$3E39,$4843,$524D,$312C,$3B53,$4540,$4F57
	dw $322D,$3C54,$4641,$5058,$332E,$3D55,$4742,$5159
	dw $342F,$3E56,$4843,$525A

CODE_178A9E:
	REP.b #$20
	STZ.w $099E
	SEP.b #$20
	LDX.w $6CA2
	JSR.w (DATA_178B45,x)
	LDA.w $6CA5
	STA.w $702D,y
	LDA.w $6CA7
	STA.w $702E,y
	LDA.w $6CA9
	STA.w $702F,y
	PHY
	LDA.w $702D,y
	STA.b $00
	LDA.w $702E,y
	STA.b $01
	JSR.w CODE_178F32
	LDA.b #$C0
	SEC
	SBC.b $02
	LDX.w $011A
	BNE.b CODE_178AF5
	LDX.w $0988
	BEQ.b CODE_178AFF
	LDX.b #$03
	SEC
	SBC.w $6CA0
CODE_178ADE:
	BNE.b CODE_178AE7
	INC.w $011A
	BRA.b CODE_178B1C

CODE_178AE7:
	BPL.b CODE_178AEA
	DEX
CODE_178AEA:
	PHA
	CLC
	ADC.b #$04
	CMP.b #$09
	PLA
	BCC.b CODE_178B02
	BRA.b CODE_178AFF

CODE_178AF5:
	LDX.b #$01
	CMP.w $6CA0
	BEQ.b CODE_178B1C
	BPL.b CODE_178AFF
	DEX
CODE_178AFF:
	LDA.w DATA_178A52,x
CODE_178B02:
	PHA
	CLC
	ADC.w $6CA0
	STA.w $6CA0
	PLA
	XBA
	REP.b #$20
	AND.w #$FF00
	BPL.b CODE_178B16
	ORA.w #$00FF
CODE_178B16:
	XBA
	STA.w $099E
	SEP.b #$20
CODE_178B1C:
	PLY
	LDA.w $6CA2
	CMP.b #$18
	BCS.b CODE_178B44
	LDA.w $021F
	ASL
	ASL
	ASL
	STA.b $00
	LDA.w $021E
	CLC
	ADC.w $6CA0
	CLC
	ADC.b #$10
	LSR
	LSR
	LSR
	LSR
	LSR
	ORA.b $00
	TAX
	LDA.w DATA_178A56,x
	STA.w $702C,y
CODE_178B44:
	RTS

DATA_178B45:
	dw CODE_178B7E
	dw CODE_178B67
	dw CODE_178DFE
	dw CODE_178BB4
	dw CODE_178BBF
	dw CODE_178B6E
	dw CODE_178BF0
	dw CODE_178BFB
	dw CODE_178B6E
	dw CODE_178C3E
	dw CODE_178C49
	dw CODE_178C71
	dw CODE_178CCD
	dw CODE_178CE8
	dw CODE_178D26
	dw CODE_178D5B
	dw CODE_178D6A

CODE_178B67:
	INC.w $6CA2
	INC.w $6CA2
	RTS

CODE_178B6E:
	REP.b #$20
	DEC.w $0977
	BNE.b CODE_178B7B
	INC.w $6CA2
	INC.w $6CA2
CODE_178B7B:
	SEP.b #$20
	RTS

CODE_178B7E:
	STZ.w $021F
	LDA.w $098E
	ORA.w $0988
	BNE.b CODE_178BB3
	LDA.w $011A
	BNE.b CODE_178BB3
	REP.b #$20
	DEC.w $1405
	SEP.b #$20
	LDA.w $1405
	ORA.w $1406
	BNE.b CODE_178BA6
	LDA.b #$04
	STA.w $099C
	INC.w $098E
	RTS

CODE_178BA6:
	LDA.b $35
	AND.b #$C0
	ORA.b $36
	AND.b #$D0
	BEQ.b CODE_178BB3
	INC.w $0988
CODE_178BB3:
	RTS

CODE_178BB4:
	LDA.b #!Define_YI_SoundID87_CastleAboutToExplode
	JSR.w CODE_178F9C
	INC.w $6CA2
	INC.w $6CA2
CODE_178BBF:
	REP.b #$30
	LDX.w $096D
	LDA.w $7286,x
	CLC
	ADC.w #$0010
	STA.w $7286,x
	CMP.w #$01F0
	BCC.b CODE_178BED
	INC.w $6CA2
	INC.w $6CA2
	STZ.w $0970
	LDA.w #$0010
	STA.w $0977
	CPX.w #$0168
	BNE.b CODE_178BED
	LDA.w #$008A
	STA.w $7044
CODE_178BED:
	SEP.b #$30
	RTS

CODE_178BF0:
	LDA.b #!Define_YI_SoundID99_BigExplosion
	JSR.w CODE_178F9C
	INC.w $6CA2
	INC.w $6CA2
CODE_178BFB:
	LDA.b $30
	AND.b #$01
	BNE.b CODE_178C3D
	REP.b #$10
	LDX.w $096D
	LDA.w $0970
	PHA
	CLC
	ADC.b #$74
	STA.w $702C,x
	PLA
	LSR
	CLC
	ADC.w $702F,x
	STA.w $702F,x
	LDA.b #$00
	STA.w $7286,x
	INC.w $0970
	LDA.w $0970
	CMP.b #$0B
	BCC.b CODE_178C3B
	LDA.b #$00
	STA.w $702C,x
	LDA.b #$10
	STA.w $0977
	INC.w $6CA2
	INC.w $6CA2
	STZ.w $0970
CODE_178C3B:
	SEP.b #$10
CODE_178C3D:
	RTS

CODE_178C3E:
	LDA.b #!Define_YI_SoundID97_WorldClear
	JSR.w CODE_178F9C
	INC.w $6CA2
	INC.w $6CA2
CODE_178C49:
	REP.b #$30
	LDA.w !RAM_YI_Level_CurrentWorldLo
	ASL
	TAX
	SEP.b #$20
	LDA.w $0970
	CLC
	ADC.b #$7E
	STA.w $702C,x
	SEP.b #$10
	INC.w $0970
	LDA.w $0970
	CMP.b #$0A
	BCC.b CODE_178C70
	INC.w $6CA2
	INC.w $6CA2
	STZ.w $0970
CODE_178C70:
	RTS

CODE_178C71:
	REP.b #$30
	LDA.w !RAM_YI_Level_CurrentWorldLo
	ASL
	TAX
	SEP.b #$20
	LDA.w $0970
	AND.b #$03
	CLC
	ADC.b #$86
	STA.w $702C,x
	SEP.b #$10
	INC.w $0970
	LDA.w $0970
	CMP.b #$30
	BCC.b CODE_178CCC
	STZ.w $0970
	CPX.b #$14
	BNE.b CODE_178CAE
	INC.w $6CA2
	INC.w $6CA2
	LDA.b #$8B
	STA.w $702C
	LDA.w $6CA9
	SEC
	SBC.b #$0C
	STA.w $6CA9
	BRA.b CODE_178CCC

CODE_178CAE:
	LDA.b #$0A
	STA.w $09C1,x
	STZ.w $6CA2
	CPX.b #$18
	BCC.b CODE_178CC4
	LDA.b #$0C
	STA.w $09FD
	STZ.w $09C1
	BRA.b CODE_178CCC

CODE_178CC4:
	LDA.b #$20
	STA.w $099C
	INC.w $098E
CODE_178CCC:
	RTS

CODE_178CCD:
	REP.b #$20
	LDA.w $6CA8
	CLC
	ADC.w #$0080
	STA.w $6CA8
	SEP.b #$20
	LDA.w $0970
	CMP.b #$20
	BCC.b CODE_178CE8
	INC.w $6CA2
	INC.w $6CA2
CODE_178CE8:
	LDA.w $0970
	AND.b #$03
	CLC
	ADC.b #$8C
	STA.w $702C
	INC.w $0970
	LDA.w $0970
	CMP.b #$40
	BCC.b CODE_178D0A
	LDA.b #$80
	STA.w $011A
	LDA.b #$09
	STA.w $099C
	INC.w $098E
CODE_178D0A:
	REP.b #$30
	LDA.w !RAM_YI_Level_CurrentWorldLo
	ASL
	TAX
	SEP.b #$20
	LDA.w $0970
	AND.b #$03
	CLC
	ADC.b #$86
	STA.w $702C,x
	SEP.b #$10
	LDA.b #$C0
	STA.w $1139
	RTS

CODE_178D26:
	LDA.b #$C0
	STA.w $1139
	LDA.w $0970
	AND.b #$03
	CLC
	ADC.b #$8C
	STA.w $702C
	INC.w $0970
	REP.b #$20
	LDA.w $6CA8
	SEC
	SBC.w #$0100
	STA.w $6CA8
	XBA
	SEP.b #$20
	CMP.b #$10
	BCS.b CODE_178D5A
	STZ.w $1139
	INC.w $6CA2
	INC.w $6CA2
	LDA.b #$8B
	STA.w $702C
CODE_178D5A:
	RTS

CODE_178D5B:
	LDA.w $6CA9
	CLC
	ADC.b #$0C
	STA.w $6CA9
	INC.w $6CA2
	INC.w $6CA2
CODE_178D6A:
	LDA.b #$3F
	STA.w $702C
	REP.b #$20
	LDA.w $6CA8
	SEC
	SBC.w #$0080
	STA.w $6CA8
	BPL.b CODE_178D8C
	STZ.w $6CA8
	STZ.w $6CA2
	LDA.w #$001F
	STA.w $099C
	INC.w $098E
CODE_178D8C:
	SEP.b #$20
	RTS

DATA_178D8F:
	dw CODE_178DCA
	dw CODE_178DE5

CODE_178D93:
	LDX.w $6CA2
	JSR.w (DATA_178D8F,x)
	LDX.w $09C2,y
	INX
	CPX.b #$08
	BCC.b CODE_178DA3
	LDX.b #$00
CODE_178DA3:
	TXA
	STA.w $09C2,y
	BNE.b CODE_178DAE
	LDA.b #!Define_YI_SoundID9F_StorkFlappingWings
	JSR.w CODE_178F9C
CODE_178DAE:
	LDA.w DATA_1789A0,x
	STA.w $702C,y
	LDA.b #$09
	STA.b $00
	LDA.b #$16
	STA.b $01
	LDA.w $09C3,y
	CLC
	ADC.b #$04
	STA.w $09C3,y
	LDX.b $10
	JMP.w CODE_1789D2

CODE_178DCA:
	LDA.w $702F,y
	INC
	STA.w $702F,y
	CMP.b #$40
	BCC.b CODE_178DDB
	INC.w $6CA2
	INC.w $6CA2
CODE_178DDB:
	LSR
	CMP.b #$10
	BCC.b CODE_178DE2
	LDA.b #$10
CODE_178DE2:
	STA.b $10
	RTS

CODE_178DE5:
	LDA.b #$10
	STA.b $10
	INC.w $0970
	LDA.w $0970
	CMP.b #$30
	BCC.b CODE_178DFD
	LDA.w !RAM_YI_Global_CurrentGameMode
	INC
	STA.w $099C
	INC.w $098E
CODE_178DFD:
	RTS

CODE_178DFE:
	LDA.w $098E
	BNE.b CODE_178E41
	LDA.w $09C2,y
	BNE.b CODE_178E27
	REP.b #$10
	LDX.w $021C
	LDA.l DATA_13FDA5+$01,x
	STA.w $0972
	LDA.l DATA_13FDA5+$02,x
	STA.w $0973
	LDA.l DATA_13FDA5+$03,x
	STA.w $0974
	SEP.b #$10
	JSR.w CODE_178E42
CODE_178E27:
	JSR.w CODE_178EE0
	LDA.w $021F
	INC
	PHA
	AND.b #$03
	BNE.b CODE_178E37
	LDA.b #!Define_YI_SoundID9B_YoshiHeadStuck
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_178E37:
	PLA
	CMP.b #$09
	BCC.b CODE_178E3E
	LDA.b #$01
CODE_178E3E:
	STA.w $021F
CODE_178E41:
	RTS

CODE_178E42:
	PHY
	LDA.w $0972
	SEC
	SBC.w $702D,y
	STA.b $03
	BPL.b CODE_178E51
	EOR.b #$FF
	INC
CODE_178E51:
	STA.b $04
	LDA.w $0973
	SEC
	SBC.w $702E,y
	STA.b $05
	BPL.b CODE_178E61
	EOR.b #$FF
	INC
CODE_178E61:
	STA.b $06
	LDA.w $0974
	SEC
	SBC.w $702F,y
	STA.b $07
	BPL.b CODE_178E71
	EOR.b #$FF
	INC
CODE_178E71:
	STA.b $08
	LDY.b #$04
	CMP.b $06
	BCS.b CODE_178E7D
	LDY.b #$02
	LDA.b $06
CODE_178E7D:
	CMP.b $04
	BCS.b CODE_178E85
	LDY.b #$00
	LDA.b $04
CODE_178E85:
	STA.w $0976
	STY.b $09
	LDX.b #$04
CODE_178E8C:
	CPX.b $09
	BNE.b CODE_178E97
	REP.b #$20
	LDA.w #$0200
	BRA.b CODE_178EB2

CODE_178E97:
	STZ.w !REGISTER_DividendLo
	LDA.b $04,x
	STA.w !REGISTER_DividendHi
	LDA.w $0004,y
	STA.w !REGISTER_Divisor
	NOP #7
	REP.b #$20
	LDA.w !REGISTER_QuotientLo
	ASL
CODE_178EB2:
	BIT.b $02,x
	BPL.b CODE_178EBA
	EOR.w #$FFFF
	INC
CODE_178EBA:
	STA.w $097A,x
	SEP.b #$20
	DEX
	DEX
	BPL.b CODE_178E8C
	STZ.w $6CA4
	STZ.w $6CA6
	STZ.w $6CA8
	LDA.b $03
	STA.b $00
	LDA.b $05
	STA.b $01
	JSR.w CODE_178F32
	PLY
	STA.w $021E
	TYX
	INC.w $09C2,x
	RTS

CODE_178EE0:
	REP.b #$20
	LDX.b #$04
CODE_178EE4:
	LDA.w $6CA4,x
	CLC
	ADC.w $097A,x
	STA.w $6CA4,x
	DEX
	DEX
	BPL.b CODE_178EE4
	SEP.b #$20
	DEC.w $0976
	DEC.w $0976
	BMI.b CODE_178EFE
	BNE.b CODE_178F31
CODE_178EFE:
	REP.b #$10
	LDX.w $021C
	LDA.l DATA_13FDA5,x
	BPL.b CODE_178F12
	INC.w $6CA2
	INC.w $6CA2
	JSR.w CODE_178669
CODE_178F12:
	INX
	INX
	INX
	INX
	STX.w $021C
	SEP.b #$10
	TYX
	STZ.w $09C2,x
	LDA.w $0972
	STA.w $6CA5
	LDA.w $0973
	STA.w $6CA7
	LDA.w $0974
	STA.w $6CA9
CODE_178F31:
	RTS

CODE_178F32:
	LDX.b #$00
	LDA.b $00
	BPL.b CODE_178F3D
	LDX.b #$04
	EOR.b #$FF
	INC
CODE_178F3D:
	STA.b $02
	LDA.b $01
	BPL.b CODE_178F48
	INX
	INX
	EOR.b #$FF
	INC
CODE_178F48:
	LDY.b $02
	CMP.b $02
	BEQ.b CODE_178F54
	BCC.b CODE_178F54
	INX
	TAY
	LDA.b $02
CODE_178F54:
	STZ.w !REGISTER_DividendLo
	STA.w !REGISTER_DividendHi
	STY.w !REGISTER_Divisor
	STY.b $02
	STZ.b $03
	TXA
	ASL
	TAX
	NOP #4
	REP.b #$30
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	SEC
	SBC.b $02
	LDA.w !REGISTER_QuotientLo
	ADC.w #$0000
	ASL
	TAY
	CPY.w #$0202
	BCC.b CODE_178F81
	LDY.w #$0200
CODE_178F81:
	LDA.l DATA_048153,x
	ASL
	STA.b $02
	TYX
	LDA.l FXDATA_0BB810,x
	BCC.b CODE_178F93
	EOR.w #$FFFF
	INC
CODE_178F93:
	CLC
	ADC.b $02
	LSR
	SEP.b #$30
	STA.b $02
CODE_178F9B:
	RTS

CODE_178F9C:
	PHY
	JSL.l CODE_0085D2
	PLY
	RTS

CODE_178FA3:
	LDA.w $09C2,y
	CLC
	ADC.b #$86
	STA.w $702C,y
	LDA.w $09C2,y
	INC
	AND.b #$03
	STA.w $09C2,y
	RTS

;---------------------------------------------------------------------------

CODE_178FB6:
	ASL
	TAX
	JMP.w (DATA_178FBB-$02,x)

DATA_178FBB:
	dw CODE_178FD3
	dw CODE_178FDB
	dw CODE_178FDB
	dw CODE_17906D

DATA_178FC3:
	dw $7E7BBE,$7E83BE,$7E7BBF,$7E83BF,$7E7BBE,$7E83BE,$7E7BBF,$7E83BF

CODE_178FD3:
	LDA.b #$0E
	STA.w $098A
	INC.w $0988
CODE_178FDB:
	PHB
	LDY.w $098A
	REP.b #$10
	LDX.w DATA_178FC3,y
	STX.b $00
	LDA.b #$7E7BBE>>16
	PHA
	PLB
	CPY.w #$0008
	LDY.w #$0200
	BCC.b CODE_178FFC
CODE_178FF2:
	STZ.w $0000,x
	INX
	INX
	DEY
	BNE.b CODE_178FF2
	BRA.b CODE_179007

CODE_178FFC:
	LDA.w $0400,x
	STA.w $0000,x
	INX
	INX
	DEY
	BNE.b CODE_178FFC
CODE_179007:
	LDA.b #$7E4800>>16
	PHA
	PLB
	REP.b #$20
	LDX.w $7E4800
	LDA.w #$3800
	STA.w $0000,x
	LDA.b $00
	STA.w $0005,x
	LSR
	BCC.b CODE_179021
	INC.w $0000,x
CODE_179021:
	LDY.w #$1800
	AND.w #$0400
	BNE.b CODE_17902F
	LDA.w #$0080
	LDY.w #$1900
CODE_17902F:
	STA.w $0002,x
	TYA
	STA.w $0003,x
	LDA.w #$007E
	STA.w $0007,x
	LDA.w #$03FF
	STA.w $0008,x
	TXA
	CLC
	ADC.w #$000C
	STA.w $000A,x
	STA.w $7E4800
	SEP.b #$30
	PLB
	DEC.w $098A
	DEC.w $098A
	BMI.b CODE_179069
	LDA.w $098A
	CMP.b #$06
	BNE.b CODE_17906C
	LDA.b #$CE
	STA.w !RAM_YI_Global_HDMAEnable
	LDA.b #$11
	STA.w !RAM_YI_Global_MainScreenLayers
CODE_179069:
	INC.w $0988
CODE_17906C:
	RTS

CODE_17906D:
	LDA.w $011A
	BEQ.b CODE_1790DF
	BMI.b CODE_1790DF
	LDA.w $0984
	EOR.b #$01
	BNE.b CODE_1790DF
	STA.w $0984
	STZ.w $0982
	STZ.w $099E
	STZ.w $099F
	LDX.b #$04
CODE_179089:
	LDA.w DATA_178041,x
	STA.w HDMA[$05].Parameters,x
	LDA.w DATA_17805C,x
	STA.w HDMA[$04].Parameters,x
	DEX
	BPL.b CODE_179089
	LDX.b #$1E
CODE_17909A:
	LDA.w DATA_178046,x
	STA.l $7E5C18,x
	LDA.w DATA_178061,x
	STA.l $7E5C98,x
	DEX
	BPL.b CODE_17909A
	JSR.w CODE_179466
	INC.w $0214
	LDA.b #$41
	STA.w !RAM_YI_Global_BGModeAndTileSizeSetting
	LDA.b #$17
	STA.w !RAM_YI_Global_MainScreenLayers
	LDA.b #$30
	STA.w !RAM_YI_Global_BG1AddressAndSize
	STA.w !RAM_YI_Global_BG2AddressAndSize
	LDA.b #!REGISTER_BG3HorizScrollOffset
	STA.w $09A0
	REP.b #$20
	STZ.b !RAM_YI_Global_Layer4XPosLo
	STZ.b !RAM_YI_Global_Layer4YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	LDA.w #$0080
	STA.b !RAM_YI_Global_Layer2YPosLo
	SEP.b #$20
	LDA.b #$FE
	STA.w !RAM_YI_Global_HDMAEnable
	STZ.w $0988
CODE_1790DF:
	RTS

;---------------------------------------------------------------------------

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
DATA_179123:
	db $15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$11,$11,$11,$11
	db $11,$11,$11,$11,$11,$11,$11,$11,$E0,$90,$EC,$90,$E0,$90
endif

CODE_1790E0:
	JSR.w CODE_17942D
	JSR.w CODE_17912F
	LDA.l $707E7C
	TAX
	LDA.w DATA_1796BE,x
	STA.w $1109
	LDA.b #$3A
	STA.w $110A
	REP.b #$20
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #DATA_179123>>16
	STA.w $6000
	LDA.w #DATA_179123
	STA.w $6002
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.b #$01
	STA.w $1117
	LDA.b #$06
	STA.w $1113
	STZ.w $1114
	RTS

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
else
DATA_179123:
	db $15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15
endif

;---------------------------------------------------------------------------

CODE_17912F:
	REP.b #$30
	LDX.w #$0000
	LDA.w $1106
	AND.w #$0001
	BEQ.b CODE_17913F
	LDX.w #$0380
CODE_17913F:
	STX.b $10
	LDA.w $1129
	ASL
	TAX
	LDA.w DATA_1793C3,x
	STA.b $12
	LDX.b $10
	LDY.w #$007F
	LDA.w #$21BF
CODE_179153:
	STA.w $0A06,x
	STA.w $0B06,x
	STA.w $0C06,x
	INX
	INX
	DEY
	BPL.b CODE_179153
	LDX.b $10
	LDY.w #$0000
CODE_179166:
	LDA.w DATA_1792C7,y
	ORA.b $12
	STA.w $0A0E,x
	LDA.w DATA_1792F7,y
	ORA.b $12
	STA.w $0A4E,x
	LDA.w DATA_179327,y
	ORA.b $12
	STA.w $0A8E,x
	STA.w $0ACE,x
	STA.w $0B0E,x
	STA.w $0B4E,x
	STA.w $0B8E,x
	STA.w $0BCE,x
	STA.w $0C0E,x
	STA.w $0C4E,x
	STA.w $0C8E,x
	LDA.w DATA_179357,y
	ORA.b $12
	STA.w $0CCE,x
	INX
	INX
	INY
	INY
	CPY.w #$0030
	BCC.b CODE_179166
	LDX.b $10
	LDY.w #$0000
CODE_1791AC:
	LDA.w DATA_179387,y
	STA.w $0AB2,x
	LDA.w DATA_179391,y
	STA.w $0AF2,x
	STA.w $0B32,x
	STA.w $0B72,x
	STA.w $0BB2,x
	STA.w $0BF2,x
	STA.w $0C32,x
	STA.w $0C72,x
	LDA.w DATA_17939B,y
	STA.w $0CB2,x
	INX
	INX
	INY
	INY
	CPY.w #$000A
	BCC.b CODE_1791AC
	LDX.b $10
	LDY.w #$0000
CODE_1791DE:
	LDA.w DATA_1793A5,y
	ORA.b $12
	STA.w $0BD2,x
	LDA.w DATA_1793AF,y
	ORA.b $12
	STA.w $0BDC,x
	LDA.w DATA_1793B9,y
	ORA.b $12
	STA.w $0BE6,x
	INX
	INX
	INY
	INY
	CPY.w #$000A
	BCC.b CODE_1791DE
	LDA.w $1106
	AND.w #$0001
	XBA
	LSR
	STA.b $02
	LDX.b $10
	LDY.w #$000D
	LDA.w #$2200
	ORA.b $02
	ORA.b $12
	STA.b $00
CODE_179217:
	LDA.b $00
	STA.w $0A54,x
	ORA.w #$0010
	STA.w $0A94,x
	INC.b $00
	INX
	INX
	DEY
	BNE.b CODE_179217
	LDX.b $10
	LDY.w #$0010
	LDA.w #$2220
	ORA.b $02
	ORA.b $12
	STA.b $00
CODE_179237:
	LDA.b $00
	STA.w $0C50,x
	ORA.w #$0010
	STA.w $0C90,x
	INC.b $00
	INX
	INX
	DEY
	BNE.b CODE_179237
	LDA.b $00
	CLC
	ADC.w #$0010
	STA.w $0C50,x
	ORA.w #$0010
	STA.w $0C90,x
	SEP.b #$10
	LDX.b #$00
CODE_17925C:
	LDA.w $1123,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_1793E1,y
	ORA.w DATA_1793F9,y
	STA.b $00
	LDA.w DATA_1793CB,x
	CLC
	ADC.b $10
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSR.w CODE_179407
	INX
	INX
	CPX.b #$06
	BCC.b CODE_17925C
	LDA.w $1129
	ASL
	ASL
	TAX
CODE_17928F:
	LDA.w DATA_1793D1,x
	STA.b $00
	TXA
	AND.w #$0002
	TAY
	LDA.w DATA_1793DD,y
	CLC
	ADC.b $10
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSR.w CODE_179407
	INX
	INX
	TXA
	AND.w #$0002
	BNE.b CODE_17928F
	LDA.w $1106
	EOR.w #$0001
	AND.w #$0001
	STA.w $1106
	SEP.b #$30
	RTS

DATA_1792C7:
	dw $21BF,$21BF,$2186,$218F,$218F,$218F,$218F,$218F
	dw $218F,$218F,$218F,$218F,$218F,$218F,$218F,$218F
	dw $6186,$21BF,$21BF,$21BF,$21BF,$21BF,$21BF,$21BF

DATA_1792F7:
	dw $A199,$218F,$218E,$218E,$218E,$218E,$218E,$218E
	dw $218E,$218E,$218E,$218E,$218E,$218E,$218E,$218E
	dw $218E,$218F,$218F,$218F,$218F,$218F,$218F,$E199

DATA_179327:
	dw $2198,$218E,$218E,$218E,$218E,$218E,$218E,$218E
	dw $218E,$218E,$218E,$218E,$218E,$218E,$218E,$218E
	dw $218E,$218E,$218E,$218E,$218E,$218E,$218E,$6198

DATA_179357:
	dw $21A1,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF
	dw $21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF
	dw $21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$61A1

DATA_179387:
	dw $399F,$398F,$398F,$398F,$799F

DATA_179391:
	dw $3998,$398E,$398E,$398E,$7998

DATA_17939B:
	dw $B99F,$B98F,$B98F,$B98F,$F99F

DATA_1793A5:
	dw $219A,$219B,$219C,$219D,$219E

DATA_1793AF:
	dw $219A,$219B,$219C,$21BB,$21BC

DATA_1793B9:
	dw $219A,$219B,$219C,$21BD,$21BE

DATA_1793C3:
	dw $0C00,$1000,$1400,$1800

DATA_1793CB:
	dw $0B14,$0B1E,$0B28

DATA_1793D1:
	dw $2C51,$385A,$2C48,$385A,$2C48,$2C51

DATA_1793DD:
	dw $0AF4,$0BF4

DATA_1793E1:
	dw $2000,$2009,$2012,$201B,$2024,$202D,$2036,$283F
	dw $2C48,$3451,$385A,$3863

DATA_1793F9:
	dw $1800,$1800,$1800,$1800,$1800,$1800,$1800

;---------------------------------------------------------------------------

CODE_179407:
	LDY.b #$00
CODE_179409:
	TYA
	LSR
	CLC
	ADC.b $00
	STA.b ($0A),y
	INC
	INC
	INC
	STA.b ($0C),y
	INC
	INC
	INC
	STA.b ($0E),y
	INY
	INY
	CPY.b #$06
	BCC.b CODE_179409
	RTS

;---------------------------------------------------------------------------

DATA_179421:
	dw $707C02,$707C6A,$707CD2

DATA_179427:
	dw $001123,$001125,$001127

CODE_17942D:
	REP.b #$20
	LDA.w #$001123>>16
	STA.b $10
	PHB
	LDX.b #$707C02>>16
	PHX
	PLB
	LDX.b #$00
CODE_17943B:
	LDA.l DATA_179427,x
	STA.b $0E
	LDA.l DATA_179421,x
	STA.b $04
	SEP.b #$20
	STZ.b $00
	LDA.b ($04)
	BMI.b CODE_179456
CODE_17944F:
	INC.b $00
	SEC
	SBC.b #$0C
	BPL.b CODE_17944F
CODE_179456:
	LDA.b $00
	STA.b [$0E]
	REP.b #$20
	INX
	INX
	CPX.b #$06
	BCC.b CODE_17943B
	PLB
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDX.b #$00
-:
	LDA.w $1123,x
	BNE.b +
	STA $707E70,x
	STA $707E76,x
+:
	INX
	INX
	CPX.b #$06
	BCC.b -
	SEP.b #$20
	JSL.l CODE_108000
endif
	SEP.b #$20
	RTS

;---------------------------------------------------------------------------

CODE_179466:
	LDA.b #DATA_1794BE>>16
	STA.w $6022
	REP.b #$20
	LDA.w #DATA_1794BE
	STA.w $6020
	LDA.w #$000C
	STA.w $6024
	LDA.w #$0008
	STA.w $6026
	LDA.w #$0008
	STA.w $6028
	LDA.w #$0007
	STA.w $602A
	LDA.w #$0009
	STA.w $602C
	LDX.b #FXCODE_09EB9E>>16
	LDA.w #FXCODE_09EB9E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_1794BA,y
	TAY
	LDX.w #$702800
	LDA.w #$702800>>16
	STA.b $01
	LDA.w #$0C00
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

DATA_1794BA:
	dw $4800,$4000

DATA_1794BE:
	db $FF,$13,$04,$AF,$B2,$B5,$AE,$D0,$B6,$AE,$B7,$BE,$FF,$80,$FF,$0D
	db $12,$B9,$B5,$AA,$C2,$D0,$C0,$B1,$B2,$AC,$B1,$D0,$AF,$B2,$B5,$AE
	db $C6,$FF,$FF

;---------------------------------------------------------------------------

CODE_1794E1:
	STZ.w $6C00
	STZ.w $6C01
	STZ.w $112C
	STZ.w $112D
	LDA.b #$B5
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w $1117
	BEQ.b CODE_1794FE
	ASL
	TAX
	JSR.w (DATA_179565-$02,x)
	BRA.b CODE_179561

CODE_1794FE:
	LDA.w $112E
	BEQ.b CODE_17950D
	ASL
	TAX
	JSR.w (DATA_179569,x)
	JSR.w CODE_17A390
	BRA.b CODE_179561

CODE_17950D:
	LDA.w $1119
	BEQ.b CODE_17952E
	ASL
	TAX
	JSR.w (DATA_179573,x)
	LDA.w $1119
	CMP.b #$05
	BCC.b CODE_179525
	CMP.b #$17
	BCS.b CODE_179525
	JSR.w CODE_17A3E2
CODE_179525:
	LDA.w $1119
	CMP.b #$10
	BCC.b CODE_179561
	BRA.b CODE_179564

CODE_17952E:
	LDA.w $111B
	BEQ.b CODE_17954F
	ASL
	TAX
	JSR.w (DATA_1795AB,x)
	LDA.w $111B
	CMP.b #$05
	BCC.b CODE_179546
	CMP.b #$16
	BCS.b CODE_179546
	JSR.w CODE_17A3E2
CODE_179546:
	LDA.w $111B
	CMP.b #$06
	BCC.b CODE_179561
	BRA.b CODE_179564

CODE_17954F:
	LDA.w $1130
	BEQ.b CODE_179561
	ASL
	TAX
	JSR.w (DATA_1795E3,x)
	LDA.w $1130
	BEQ.b CODE_179561
	JSR.w CODE_17A390
CODE_179561:
	JSR.w CODE_17A356
CODE_179564:
	RTS

DATA_179565:
	dw CODE_1795F5
	dw CODE_1796C3

DATA_179569:
	dw CODE_1796F8
	dw CODE_1797B3
	dw CODE_1797E5
	dw CODE_17980C
	dw CODE_179839

DATA_179573:
	dw CODE_179845
	dw CODE_17963E
	dw CODE_1796C3
	dw CODE_1796F8
	dw CODE_179D45
	dw CODE_179D57
	dw CODE_179DE0
	dw CODE_179E2B
	dw CODE_179E63
	dw CODE_179EBE
	dw CODE_1796C3
	dw CODE_179F22
	dw CODE_179DE0
	dw CODE_179F3B
	dw CODE_179E63
	dw CODE_179F53
	dw CODE_179DE0
	dw CODE_179F5E
	dw CODE_179F7E
	dw CODE_179FA8
	dw CODE_179FBF
	dw CODE_179FE7
	dw CODE_17A03A
	dw CODE_179E63
	dw CODE_17A069
	dw CODE_179DE0
	dw CODE_17A08B
	dw CODE_179E63

DATA_1795AB:
	dw CODE_17A09C
	dw CODE_17963E
	dw CODE_1796C3
	dw CODE_1796F8
	dw CODE_179D45
	dw CODE_179D57
	dw CODE_179DE0
	dw CODE_179E2B
	dw CODE_179E63
	dw CODE_17A0A7
	dw CODE_17A105
	dw CODE_179F22
	dw CODE_179DE0
	dw CODE_179F3B
	dw CODE_179E63
	dw CODE_179F53
	dw CODE_179DE0
	dw CODE_17A14F
	dw CODE_17A15E
	dw CODE_17A1B0
	dw CODE_17A25C
	dw CODE_17A03A
	dw CODE_17A313
	dw CODE_179E63
	dw CODE_17A069
	dw CODE_179DE0
	dw CODE_17A345
	dw CODE_179E63

DATA_1795E3:
	dw CODE_17A09C
	dw CODE_179A0A
	dw CODE_179A50
	dw CODE_179A6F
	dw CODE_179A92
	dw CODE_179B67
	dw CODE_179CB7
	dw CODE_179CDE

DATA_1795F3:
	db $01,$FF

CODE_1795F5:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_179626
	TAY
	LDA.w $111D
	CLC
	ADC.w DATA_1795F3-$01,y
	BMI.b CODE_179613
	LDX.b #!Define_YI_SoundID57_LoseStarsTimerAbove10
	STX.b !RAM_YI_Global_PlaySoundHighPriorityLo
	CMP.b #$03
	BCS.b CODE_179615
	STA.w $111D
	INC.w $1117
CODE_179613:
	BRA.b CODE_17963D

CODE_179615:
	LDA.b #$C4
	STA.w $1109
	LDA.b #$32
	STA.w $110A
	LDA.b #$03
	STA.w $1117
	BRA.b CODE_17963D

CODE_179626:
	LDA.b $35
	AND.b #$C0
	ORA.b $36
	AND.b #$D0
	BEQ.b CODE_17963D
	INC.w $112C
	STZ.w $1117
	INC.w $112E
	LDA.b #!Define_YI_SoundID09_Coin
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_17963D:
	RTS

CODE_17963E:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_17969C
	TAY
	LDA.w $111D
	STA.b $00
	CLC
	ADC.w DATA_1795F3-$01,y
	BMI.b CODE_179677
	CMP.b #$03
	BCS.b CODE_179682
	STA.w $111D
	LDA.w $1129
	ASL
	TAX
	JSR.w (DATA_1796ED,x)
	TXA
	BNE.b CODE_179677
	LDA.w $111D
	CMP.b #$03
	BCS.b CODE_179682
	LDA.b #!Define_YI_SoundID57_LoseStarsTimerAbove10
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
	BRA.b CODE_1796BD

CODE_179677:
	LDA.b $00
	STA.w $111D
	LDA.b #!Define_YI_SoundID57_LoseStarsTimerAbove10
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_1796BD

CODE_179682:
	LDA.b #$C4
	STA.w $1109
	LDA.b #$32
	STA.w $110A
	LDA.w $1129
	ASL
	TAX
	LDA.b #$03
	STA.w $1117,x
	LDA.b #!Define_YI_SoundID57_LoseStarsTimerAbove10
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_1796BD

CODE_17969C:
	LDA.b $36
	ORA.b $35
	AND.b #$D0
	BEQ.b CODE_1796BD
	LDA.w $111D
	STA.w $1134
	INC.w $112C
	LDA.w $1129
	ASL
	TAX
	LDA.b #$04
	STA.w $1117,x
	LDA.b #!Define_YI_SoundID09_Coin
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_1796BD

CODE_1796BD:
	RTS

DATA_1796BE:
	db $44,$6C,$94

DATA_1796C1:
	db $04,$FC

CODE_1796C3:
	LDX.w $111D
	LDA.w $1109
	CMP.w DATA_1796BE,x
	BEQ.b CODE_1796DE
	ROL
	AND.b #$01
	TAX
	LDA.w $1109
	CLC
	ADC.w DATA_1796C1,x
	STA.w $1109
	BRA.b CODE_1796E6

CODE_1796DE:
	LDA.w $1129
	ASL
	TAX
	DEC.w $1117,x
CODE_1796E6:
	RTS

DATA_1796E7:
	db $01,$02,$00,$02,$00,$01

DATA_1796ED:
	dw CODE_179774
	dw CODE_179777
	dw CODE_179791

DATA_1796F3:
	db $01,$01,$01

DATA_1796F6:
	db $32,$52

CODE_1796F8:
	LDA.b #$02
	STA.w $111D
	LDA.b $38
	AND.b #$0C
	BEQ.b CODE_179716
	LDA.w $112B
	EOR.b #$01
	AND.b #$01
	STA.w $112B
	TAX
	LDA.w DATA_1796F6,x
	STA.w $110A
	BRA.b CODE_17976F

CODE_179716:
	LDA.b $36
	ORA.b $35
	AND.b #$D0
	BEQ.b CODE_17973C
	STZ.w $1117
	STZ.w $1119
	STZ.w $111B
	LDA.w $1129
	ASL
	ADC.w $112B
	TAX
	LDA.w DATA_1796E7,x
	STA.w $1129
	INC.w $1130
	LDA.b #!Define_YI_SoundID09_Coin
	BRA.b CODE_179771

CODE_17973C:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_179773
	TAY
	AND.b #$01
	BNE.b CODE_179773
	LDA.w $1129
	ASL
	TAX
	JSR.w (DATA_1796ED,x)
	TXA
	BNE.b CODE_179773
	LDX.w $111D
	LDA.w DATA_1796BE,x
	STA.w $1109
	LDA.b #$3A
	STA.w $110A
	LDA.w $1129
	TAX
	ASL
	TAY
	LDA.w DATA_1796F3,x
	STA.w $1117,y
	STZ.w $112B
CODE_17976F:
	LDA.b #!Define_YI_SoundID57_LoseStarsTimerAbove10
CODE_179771:
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_179773:
	RTS

CODE_179774:
	LDX.b #$00
	RTS

CODE_179777:
	LDA.w $111D
	ASL
	TAX
CODE_17977C:
	LDA.w $1123,x
	BEQ.b CODE_179791
	TXA
	CLC
	ADC.w DATA_1795F3-$01,y
	CLC
	ADC.w DATA_1795F3-$01,y
	TAX
	BMI.b CODE_179791
	CMP.b #$06
	BCC.b CODE_17977C
CODE_179791:
	LDA.w $111D
	ASL
	TAX
CODE_179796:
	LDA.w $1123,x
	BNE.b CODE_1797AB
	TXA
	CLC
	ADC.w DATA_1795F3-$01,y
	CLC
	ADC.w DATA_1795F3-$01,y
	TAX
	BMI.b CODE_1797B2
	CMP.b #$06
	BCC.b CODE_179796
CODE_1797AB:
	TXA
	LSR
	STA.w $111D
	LDX.b #$00
CODE_1797B2:
	RTS

CODE_1797B3:
	INC.w $112C
	REP.b #$20
	LDA.w #$0100
	STA.w $1110
	LDA.w $1129
	ASL
	TAX
	LDA.w $111D
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_1793CB,y
	JSR.w CODE_179960
	SEP.b #$20
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	CLC
	ADC.b #$54
	JSR.w CODE_1799AB
	INC.w $112E
	RTS

CODE_1797E5:
	INC.w $112C
	REP.b #$20
	LDA.w $1110
	SEC
	SBC.w #$0008
	STA.w $1110
	SEP.b #$20
	CMP.b #$C0
	BCS.b CODE_1797FD
	INC.w $112E
CODE_1797FD:
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	CLC
	ADC.b #$54
	JSR.w CODE_1799AB
	RTS

CODE_17980C:
	INC.w $112C
	REP.b #$20
	LDA.w $1110
	CLC
	ADC.w #$0008
	STA.w $1110
	SEP.b #$20
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	CLC
	ADC.b #$54
	JSR.w CODE_1799AB
	LDA.w $1111
	BEQ.b CODE_179838
	LDA.b #$20
	STA.w $1110
	INC.w $112E
CODE_179838:
	RTS

CODE_179839:
	INC.w $112C
	DEC.w $1110
	BNE.b CODE_179844
	INC.w $112E
CODE_179844:
	RTS

CODE_179845:
	LDA.w $111D
	STA.l $707E7C
	ASL
	STA.w !RAM_YI_Global_CurrentSaveFile
	REP.b #$20
	LDX.b #$0A
	LDA.w #$0000
CODE_179857:
	STA.w $030F,x
	STA.w $031B,x
	STA.w $0327,x
	STA.w $0333,x
	STA.w $033F,x
	STA.w $034B,x
	DEX
	DEX
	BPL.b CODE_179857
	LDA.w #$F0F0
	STA.w $0317
	STA.w $0323
	STA.w $032F
	STA.w $033B
	STA.w $0347
	STA.w $0353
	SEP.b #$20
	JSL.l CODE_10810A
	STZ.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	BMI.b CODE_179897
	CMP.b #!Define_YI_LevelID_ScareySkeletonGoonies
	BCC.b CODE_179897
	INC.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
CODE_179897:
if !Define_YI_Global_EnableDebugFeatures == !TRUE
	NOP #3
else
	JMP.w CODE_179932
endif

ADDR_17989A:
	LDA.w $111D
	CMP.b #$02
	BEQ.b ADDR_1798A4
	JMP.w CODE_179932

ADDR_1798A4:
	LDA.b #$63
	STA.w !RAM_YI_Level_CurrentCoinCountLo
	LDA.b $35
	AND.b #$30
	BEQ.b ADDR_1798B4
	LDA.b #$63
	STA.w !RAM_YI_Level_CurrentLifeCountLo
ADDR_1798B4:
	LDX.b #$00
	TXA
	INC
ADDR_1798B8:
	STA.w !RAM_YI_Level_PauseMenuItemInventory,x
	INC
	CMP.b #$0A
	BCC.b ADDR_1798C2
	LDA.b #$01
ADDR_1798C2:
	INX
	CPX.b #$1B
	BCC.b ADDR_1798B8
	LDA.b #$00
	TAX
	TXY
	INC
ADDR_1798CC:
	STA.w !RAM_YI_Map_LevelClearFlags,y
	INY
	CPY.b #$48
	BCC.b ADDR_1798CC
	LDA.b #$00
	TAX
ADDR_1798D7:
	INC
	PHA
	REP.b #$20
	LDA.l DATA_1081E9,x
	STA.b $00
	LDA.l DATA_108201,x
	STA.b $02
	LDA.l DATA_108219,x
	STA.b $04
	LDA.l DATA_108231,x
	STA.b $06
	LDA.l DATA_108249,x
	STA.b $08
	LDA.l DATA_108261,x
	STA.b $0A
	SEP.b #$20
	PLA
	STA.b ($00)
	STA.b ($02)
	STA.b ($04)
	STA.b ($06)
	STA.b ($08)
	STA.b ($0A)
	INX
	INX
	CPX.b #$18
	BCC.b ADDR_1798D7
	REP.b #$20
	LDA.w #$0A09
	STA.w $0317
	STA.w $0323
	STA.w $032F
	STA.w $033B
	STA.w $0347
	STA.w $0353
	SEP.b #$20
	LDA.b #$01
	STA.w $1127
CODE_179932:
	LDA.b #$03
	STA.w !RAM_YI_Level_CurrentLifeCountLo
	LDA.b #!Define_YI_GameMode1F
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.b #!Define_YI_MusicID_FadeMusicCommand
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.b #$01
	STA.w $0201
	STZ.w $1115
	STZ.w $1116
	LDX.w !RAM_YI_Global_CurrentSaveFile
	LDA.w $1123,x
	BNE.b CODE_17995B
	LDA.b #!Define_YI_GameMode37
	STA.w !RAM_YI_Global_CurrentGameMode
	STZ.w !RAM_YI_Level_CurrentYoshiColorLo
CODE_17995B:
	RTS

DATA_17995C:
	dw $0D86,$0A06

CODE_179960:
	LDY.w $1106
	BNE.b CODE_179969
	CLC
	ADC.w #$0380
CODE_179969:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDY.b #$00
	LDA.w #$218E
	ORA.w DATA_1793C3,x
CODE_17997F:
	STA.b ($00),y
	STA.b ($02),y
	STA.b ($04),y
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17997F
CODE_17998B:
	REP.b #$10
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17995C,y
	TAX
	LDY.w #$3020
	LDA.w #$0300
	JSL.l CODE_00BEA6
	SEP.b #$10
	RTS

CODE_1799AB:
	REP.b #$20
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1110
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDY.w #$7C80
	LDA.w #$702800>>16
	STA.b $01
	LDX.w #$702800
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7D80
	LDX.w #$702A00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7E80
	LDX.w #$702C00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7F80
	LDX.w #$702E00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

DATA_179A06:
	dw $0AF4,$0BF4

CODE_179A0A:
	INC.w $112C
	REP.b #$20
	LDA.w #$0100
	STA.w $1110
	LDA.w $112B
	ASL
	TAY
	LDA.w DATA_179A06,y
	LDX.b #$06
	JSR.w CODE_179960
	SEP.b #$20
	STZ.w $112B
	JSR.w CODE_179A88
	JSR.w CODE_17912F
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17995C,y
	TAX
	LDY.w #$3220
	LDA.w #$0300
	JSL.l CODE_00BEA6
	SEP.b #$30
	INC.w $1130
	RTS

CODE_179A50:
	INC.w $112C
	REP.b #$20
	LDA.w $1110
	SEC
	SBC.w #$0008
	STA.w $1110
	SEP.b #$20
	CMP.b #$C0
	BCS.b CODE_179A68
	INC.w $1130
CODE_179A68:
	JSR.w CODE_179A88
	RTS

DATA_179A6C:
	db $5C,$5D,$5E

CODE_179A6F:
	INC.w $112C
	REP.b #$20
	LDA.w $1110
	CLC
	ADC.w #$0008
	STA.w $1110
	SEP.b #$20
	LDA.w $1111
	BEQ.b CODE_179A88
	INC.w $1130
CODE_179A88:
	LDX.w $1129
	LDA.w DATA_179A6C,x
	JSR.w CODE_1799AB
	RTS

CODE_179A92:
	LDA.b #DATA_179AF6>>16
	STA.w $6022
	REP.b #$20
	LDA.w $1129
	ASL
	TAX
	LDA.w DATA_179AF0,x
	STA.w $6020
	LDA.w #$0008
	STA.w $6028
	LDA.w #$0007
	STA.w $602A
	LDA.w #$0009
	STA.w $602C
	LDX.b #FXCODE_09EB9E>>16
	LDA.w #FXCODE_09EB9E
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_1794BA,y
	TAY
	LDX.w #$702800
	LDA.w #$702800>>16
	STA.b $01
	LDA.w #$0400
	JSL.l CODE_00BEA6
	LDA.w $1129
	ASL
	TAX
	JSR.w (DATA_179AEA,x)
	SEP.b #$30
	INC.w $1130
	RTS

DATA_179AEA:
	dw CODE_179B21
	dw CODE_179B30
	dw CODE_179B4F

DATA_179AF0:
	dw DATA_179AF6,DATA_179B04,DATA_179B12

DATA_179AF6:
	db $FF,$13,$04,$AF,$B2,$B5,$AE,$D0,$B6,$AE,$B7,$BE,$FF,$FF

DATA_179B04:
	db $FF,$13,$04,$AC,$B8,$B9,$C2,$D0,$B6,$AE,$B7,$BE,$FF,$FF

DATA_179B12:
	db $FF,$10,$04,$AE,$BB,$AA,$BC,$AE,$D0,$B6,$AE,$B7,$BE,$FF,$FF

CODE_179B21:
	LDA.w #$0000
	STA.w $1132
	RTS

DATA_179B28:
	db $04,$00,$02,$00,$02,$00,$0A,$00

CODE_179B30:
	LDX.w #$0000
	LDA.w $1123
	BEQ.b CODE_179B3A
	INX
	INX
CODE_179B3A:
	LDA.w $1125
	BEQ.b CODE_179B41
	INX
	INX
CODE_179B41:
	LDA.w $1127
	BEQ.b CODE_179B48
	INX
	INX
CODE_179B48:
	LDA.w DATA_179B28,x
	STA.w $1132
	RTS

CODE_179B4F:
	LDA.w #$000C
	STA.w $1132
	LDA.w $1123
	ORA.w $1125
	ORA.w $1127
	BNE.b CODE_179B66
	INC.w $1132
	INC.w $1132
CODE_179B66:
	RTS

CODE_179B67:
	JSR.w CODE_179B6E
	INC.w $1130
	RTS

CODE_179B6E:
	LDA.b #DATA_179BCF>>16
	STA.w $6022
	REP.b #$20
	LDX.w $1132
	LDA.w DATA_179BB7,x
	STA.w $6020
	LDA.w #$000C
	STA.w $6024
	LDA.w #$0008
	STA.w $6026
	LDX.b #FXCODE_09EC41>>16
	LDA.w #FXCODE_09EC41
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_1794BA,y
	CLC
	ADC.w #$0200
	TAY
	LDX.w #$702C00
	LDA.w #$702C00>>16
	STA.b $01
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

DATA_179BB7:
	dw DATA_179BCF,DATA_179BE4,DATA_179BF9,DATA_179C0B,DATA_179C21,DATA_179C37,DATA_179C4A,DATA_179BF9
	dw DATA_179C60,DATA_179C75,DATA_179C8B,DATA_179CA1

DATA_179BCF:
	db $FF,$0D,$12,$B9,$B5,$AA,$C2,$D0,$C0,$B1,$B2,$AC,$B1,$D0,$AF,$B2
	db $B5,$AE,$C6,$FF,$FF

DATA_179BE4:
	db $FF,$0D,$12,$AC,$B8,$B9,$C2,$D0,$C0,$B1,$B2,$AC,$B1,$D0,$AF,$B2
	db $B5,$AE,$C6,$FF,$FF

DATA_179BF9:
	db $FF,$18,$12,$B7,$B8,$D0,$BC,$AA,$BF,$AE,$AD,$D0,$AF,$B2,$B5,$AE
	db $FF,$FF

DATA_179C0B:
	db $FF,$02,$12,$AC,$B8,$B9,$C2,$B2,$B7,$B0,$D0,$AC,$B8,$B6,$B9,$B5
	db $AE,$BD,$AE,$AD,$FF,$FF

DATA_179C21:
	db $FF,$09,$12,$AC,$B8,$B9,$C2,$D0,$B2,$BD,$D0,$BD,$B8,$D0,$C0,$B1
	db $AE,$BB,$AE,$C6,$FF,$FF

DATA_179C37:
	db $FF,$0A,$12,$B7,$B8,$D0,$AE,$B6,$B9,$BD,$C2,$D0,$AF,$B2,$B5,$AE
	db $C6,$FF,$FF

DATA_179C4A:
	db $FF,$0A,$12,$AE,$BB,$AA,$BC,$AE,$D0,$C0,$B1,$B2,$AC,$B1,$D0,$AF
	db $B2,$B5,$AE,$C6,$FF,$FF

DATA_179C60:
	db $FF,$0C,$12,$BC,$BE,$BB,$AE,$C6,$D0,$D0,$D0,$C2,$AE,$BC,$D0,$D0
	db $D0,$B7,$B8,$FF,$FF

DATA_179C75:
	db $FF,$09,$12,$AF,$B2,$B5,$AE,$D0,$A1,$D0,$C0,$AA,$BC,$D0,$AE,$BB
	db $AA,$BC,$AE,$AD,$FF,$FF

DATA_179C8B:
	db $FF,$09,$12,$AF,$B2,$B5,$AE,$D0,$A2,$D0,$C0,$AA,$BC,$D0,$AE,$BB
	db $AA,$BC,$AE,$AD,$FF,$FF

DATA_179CA1:
	db $FF,$09,$12,$AF,$B2,$B5,$AE,$D0,$A3,$D0,$C0,$AA,$BC,$D0,$AE,$BB
	db $AA,$BC,$AE,$AD,$FF,$FF

CODE_179CB7:
	REP.b #$20
	PHB
	LDX.b #$7E55C0>>16
	PHX
	PLB
	LDX.b #$00
	LDA.w #$00FF
CODE_179CC3:
	STA.w $7E55C0,x
	DEX
	DEX
	BNE.b CODE_179CC3
	PLB
	SEP.b #$20
	LDA.b #$13
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.b #$02
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STZ.w $1107
	INC.w $1130
	RTS

CODE_179CDE:
	REP.b #$20
	LDA.w $1107
	AND.w #$00FF
	ASL
	ASL
	ASL
	TAX
	LDA.w #$FF00
	STA.l $7E55C0,x
	STA.l $7E55C2,x
	STA.l $7E55C4,x
	STA.l $7E55C6,x
	SEP.b #$20
	INC.w $1107
	LDA.w $1107
	CMP.b #$15
	BCC.b CODE_179D44
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17995C,y
	TAX
	LDY.w #$3020
	LDA.w #$0300
	JSL.l CODE_00BEA6
	SEP.b #$30
	STZ.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STZ.w $1130
	STZ.w $112B
	LDA.w DATA_1796F6
	STA.w $110A
	LDA.w $1129
	ASL
	TAX
	LDA.b #$03
	STA.w $1117,x
CODE_179D44:
	RTS

CODE_179D45:
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
	REP.b #$20
	LDA.w #$0100
	STA.w $1110
	SEP.b #$20
CODE_179D57:
	INC.w $112C
	REP.b #$20
	LDA.w $1110
	CLC
	ADC.w #$0004
	STA.w $1110
	SEP.b #$20
	LDA.w $1110
	CMP.b #$50
	BCC.b CODE_179D7A
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
	STZ.w $1122
CODE_179D7A:
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	CLC
	ADC.b #$54
	REP.b #$20
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1110
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_179DA2:
	REP.b #$10
	LDY.w #$7CC0
	LDA.w #$702800>>16
	STA.b $01
	LDX.w #$702800
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7DC0
	LDX.w #$702A00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7EC0
	LDX.w #$702C00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7FC0
	LDX.w #$702E00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

CODE_179DE0:
	REP.b #$20
	LDA.w #$0C50
	LDY.w $1106
	BNE.b CODE_179DEE
	CLC
	ADC.w #$0380
CODE_179DEE:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	REP.b #$10
	LDA.w $1129
	ASL
	TAX
	LDA.w $1122
	AND.w #$00FF
	ASL
	TAY
	LDA.w #$218E
	ORA.w DATA_1793C3,x
	STA.b ($00),y
	STA.b ($02),y
	JSR.w CODE_17998B
	SEP.b #$30
	INC.w $1122
	LDA.w $1122
	CMP.b #$11
	BCC.b CODE_179E26
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
CODE_179E26:
	RTS

DATA_179E27:
	dw CODE_179E42
	dw CODE_179E5D

CODE_179E2B:
	LDA.w $1129
	ASL
	TAX
	JSR.w (DATA_179E27-$02,x)
	JSR.w CODE_179B6E
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
	STZ.w $1122
	RTS

CODE_179E42:
	LDA.b #$08
	STA.w $1132
	LDA.w $1123
	BEQ.b CODE_179E5C
	LDA.w $1125
	BEQ.b CODE_179E5C
	LDA.w $1127
	BEQ.b CODE_179E5C
	INC.w $1132
	INC.w $1132
CODE_179E5C:
	RTS

CODE_179E5D:
	LDA.b #$10
	STA.w $1132
	RTS

CODE_179E63:
	REP.b #$20
	LDA.w #$0C50
	LDY.w $1106
	BNE.b CODE_179E71
	CLC
	ADC.w #$0380
CODE_179E71:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	LDA.w $1106
	EOR.w #$0001
	AND.w #$0001
	XBA
	LSR
	STA.b $0E
	LDA.w $1129
	ASL
	TAX
	LDA.w $1122
	AND.w #$00FF
	PHA
	ASL
	TAY
	PLA
	ADC.w #$2220
	ORA.w DATA_1793C3,x
	ORA.b $0E
	STA.b ($00),y
	ORA.w #$0010
	STA.b ($02),y
	REP.b #$10
	JSR.w CODE_17998B
	SEP.b #$30
	INC.w $1122
	LDA.w $1122
	CMP.b #$10
	BCC.b CODE_179EBD
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
CODE_179EBD:
	RTS

CODE_179EBE:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_179F02
	TAY
	LDA.w $111D
	CLC
	ADC.w DATA_1795F3-$01,y
	BMI.b CODE_179F00
	CMP.b #$03
	BCS.b CODE_179F00
	ASL
	TAX
CODE_179ED4:
	LDA.w $1123,x
	BEQ.b CODE_179EF2
	TXA
	LSR
	CMP.w $1134
	BEQ.b CODE_179EF2
	TXA
	CLC
	ADC.w DATA_1795F3-$01,y
	CLC
	ADC.w DATA_1795F3-$01,y
	TAX
	BMI.b CODE_179F00
	CMP.b #$06
	BCS.b CODE_179F00
	BRA.b CODE_179ED4

CODE_179EF2:
	TXA
	LSR
	STA.w $111D
	LDA.b #!Define_YI_SoundID57_LoseStarsTimerAbove10
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	INC.w $1119
	BRA.b CODE_179F21

CODE_179F00:
	BRA.b CODE_179F21

CODE_179F02:
	LDA.b $36
	ORA.b $35
	AND.b #$D0
	BEQ.b CODE_179F21
	STZ.w $1122
	LDA.w $111D
	CMP.w $1134
	BEQ.b CODE_179F1C
	LDA.b #$10
	STA.w $1119
	BRA.b CODE_179F21

CODE_179F1C:
	LDA.b #$0B
	STA.w $1119
CODE_179F21:
	RTS

CODE_179F22:
	LDA.w $1110
	SEC
	SBC.b #$04
	STA.w $1110
	BNE.b CODE_179F35
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
CODE_179F35:
	JSR.w CODE_179D7A
	RTS

DATA_179F39:
	db $02,$0C

CODE_179F3B:
	LDX.w $1129
	LDA.w DATA_179F39-$01,x
	STA.w $1132
	JSR.w CODE_179B6E
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
	STZ.w $1122
	RTS

CODE_179F53:
	LDA.w $1129
	ASL
	TAX
	LDA.b #$01
	STA.w $1117,x
	RTS

CODE_179F5E:
	REP.b #$20
	LDA.w $1129
	ASL
	TAX
	LDA.w $111D
	AND.w #$0007
	ASL
	TAY
	LDA.w DATA_1793CB,y
	JSR.w CODE_179960
	LDA.w #$0100
	STA.w $1110
	SEP.b #$20
	INC.w $1119
CODE_179F7E:
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	CLC
	ADC.b #$54
	JSR.w CODE_1799AB
	REP.b #$20
	LDA.w $1110
	SEC
	SBC.w #$0008
	STA.w $1110
	SEP.b #$20
	LDA.w $1110
	CMP.b #$20
	BCS.b CODE_179FA4
	INC.w $1119
CODE_179FA4:
	JSR.w CODE_17A390
	RTS

CODE_179FA8:
	JSL.l CODE_10832C
	LDA.w $1134
	ASL
	TAX
	LDA.w $111D
	ASL
	TAY
	LDA.w $1123,x
	STA.w $1123,y
	INC.w $1119
CODE_179FBF:
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	CLC
	ADC.b #$54
	JSR.w CODE_1799AB
	REP.b #$20
	LDA.w $1110
	CLC
	ADC.w #$0008
	STA.w $1110
	SEP.b #$20
	LDA.w $1111
	BEQ.b CODE_179FE3
	INC.w $1119
CODE_179FE3:
	JSR.w CODE_17A390
	RTS

CODE_179FE7:
	JSR.w CODE_17A003
	JSR.w CODE_17A390
	REP.b #$20
	LDA.w #$0150
	STA.w $1110
	SEP.b #$20
	LDA.b #$06
	STA.w $1132
	JSR.w CODE_179B6E
	INC.w $1119
	RTS

CODE_17A003:
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_1793E1,y
	ORA.w DATA_1793F9,y
	STA.b $00
	LDA.w DATA_1793CB,x
	LDY.w $1106
	BNE.b CODE_17A023
	CLC
	ADC.w #$0380
CODE_17A023:
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSR.w CODE_179407
	JSR.w CODE_17998B
	SEP.b #$20
	RTS

CODE_17A03A:
	JSR.w CODE_179D7A
	REP.b #$20
	LDA.w $1110
	SEC
	SBC.w #$0004
	STA.w $1110
	SEP.b #$20
	LDA.w $1110
	BNE.b CODE_17A066
	LDA.w $1129
	ASL
	TAX
	INC.w $1117,x
	CPX.b #$02
	BNE.b CODE_17A060
	LDA.b #!Define_YI_SoundID32_HitMessageBox
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_17A060:
	STZ.w $1122
	STZ.w $1110
CODE_17A066:
	RTS

DATA_17A067:
	db $20,$40

CODE_17A069:
	INC.w $1110
	LDA.w $1129
	TAY
	ASL
	TAX
	LDA.w $1110
	CMP.w DATA_17A067-$01,y
	BCC.b CODE_17A08A
	INC.w $1117,x
	STZ.w $1122
	REP.b #$20
	LDA.w #$32C4
	STA.w $1109
	SEP.b #$20
CODE_17A08A:
	RTS

CODE_17A08B:
	REP.b #$30
	JSR.w CODE_179B30
	SEP.b #$30
	JSR.w CODE_179B6E
	STZ.w $1122
	INC.w $1119
	RTS

CODE_17A09C:
	LDA.w $1129
	ASL
	TAX
	LDA.b #$03
	STA.w $1117,x
	RTS

CODE_17A0A7:
	LDA.b #DATA_17A0F6>>16
	STA.w $6022
	REP.b #$20
	LDA.w #DATA_17A0F6
	STA.w $6020
	LDA.w #$000C
	STA.w $6024
	LDA.w #$0008
	STA.w $6026
	LDX.b #FXCODE_09EC41>>16
	LDA.w #FXCODE_09EC41
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	LDY.w #$7E00
	LDA.w #$0070
	STA.b $01
	LDX.w #$702C00
	LDA.w #$0100
	JSL.l CODE_00BEA6
	LDY.w #$7F00
	LDX.w #$702E00
	LDA.w #$0100
	JSL.l CODE_00BEA6
	SEP.b #$30
	STZ.w $1136
	JSR.w CODE_17A378
	INC.w $111B
	RTS

DATA_17A0F6:
	db $FF,$00,$12,$28,$01,$FF,$20,$12,$01,$01,$03,$FF,$FF

DATA_17A103:
	db $0B,$10

CODE_17A105:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_17A124
	EOR.b #$03
	TAY
	LDA.w $1136
	CLC
	ADC.w DATA_1795F3-$01,y
	BMI.b CODE_17A14B
	CMP.b #$02
	BCS.b CODE_17A14B
	STA.w $1136
	LDA.b #!Define_YI_SoundID57_LoseStarsTimerAbove10
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_17A14B

CODE_17A124:
	LDA.b $36
	ORA.b $35
	AND.b #$D0
	BEQ.b CODE_17A14B
	LDX.w $1136
	LDA.w DATA_17A103,x
	STA.w $111B
	REP.b #$20
	LDA.w #$0150
	STA.w $1110
	SEP.b #$20
	STZ.w $1122
	TXA
	BEQ.b CODE_17A14B
	LDA.b #!Define_YI_SoundID09_Coin
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_17A14B

CODE_17A14B:
	JSR.w CODE_17A378
	RTS

CODE_17A14F:
	STZ.w $1137
	STZ.w $1138
	LDA.b #$54
	JSR.w CODE_1799AB
	INC.w $111B
	RTS

CODE_17A15E:
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	CLC
	ADC.b #$54
	REP.b #$20
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1110
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.w $111D
	ASL
	TAX
	LDA.w $1123,x
	PHA
	PHX
	LDA.b #$00
	STA.w $1123,x
	JSR.w CODE_17A003
	PLX
	PLA
	STA.w $1123,x
	STZ.w $1122
	STZ.w $1137
	STZ.w $1138
	INC.w $111B
	RTS

DATA_17A1AC:
	db $FF,$01

DATA_17A1AE:
	db $01,$FF

CODE_17A1B0:
	JSR.w CODE_17A1FE
	JSR.w CODE_17A1FE
	REP.b #$20
	JSR.w CODE_179DA2
	SEP.b #$20
	LDA.w $1122
	CMP.b #$0B
	BCC.b CODE_17A1D6
	INC.w $111B
	STZ.w $1122
	REP.b #$20
	LDA.w #$1F1F
	STA.w $1137
	SEP.b #$20
	BRA.b CODE_17A1DA

CODE_17A1D6:
	LDA.b #!Define_YI_SoundID5A_PulleySqueak
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_17A1DA:
	REP.b #$20
	LDA.w $111D
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_17A3DC,x
	AND.w #$FFF8
	CLC
	ADC.w #$0100
	CLC
	ADC.w $1137
	STA.w $1109
	SEP.b #$20
	JSR.w CODE_17A356
	JSR.w CODE_17A409
	RTS

CODE_17A1FE:
	REP.b #$20
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $1137
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1138
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_08E0C1>>16
	LDA.w #FXCODE_08E0C1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.w $1122
	AND.b #$01
	TAX
	LDA.w $1137
	CLC
	ADC.w DATA_17A1AC,x
	BPL.b CODE_17A23F
	SEC
	SBC.w DATA_17A1AC,x
	INC.w $1138
	INC.w $1138
	INC.w $1122
CODE_17A23F:
	STA.w $1137
	LDA.w $1138
	CLC
	ADC.w DATA_17A1AE,x
	BPL.b CODE_17A258
	SEC
	SBC.w DATA_17A1AE,x
	INC.w $1137
	INC.w $1137
	INC.w $1122
CODE_17A258:
	STA.w $1138
	RTS

CODE_17A25C:
	JSR.w CODE_17A2B1
	JSR.w CODE_17A2B1
	REP.b #$20
	JSR.w CODE_179DA2
	SEP.b #$20
	LDA.w $1122
	CMP.b #$0B
	BCC.b CODE_17A289
	INC.w $111B
	REP.b #$20
	LDA.w #$0150
	STA.w $1110
	SEP.b #$20
	LDA.w $111D
	ASL
	TAX
	LDA.b #$00
	STA.w $1123,x
	BRA.b CODE_17A28D

CODE_17A289:
	LDA.b #!Define_YI_SoundID5A_PulleySqueak
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_17A28D:
	REP.b #$20
	LDA.w $111D
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_17A3DC,x
	AND.w #$FFF8
	CLC
	ADC.w #$0100
	CLC
	ADC.w $1137
	STA.w $1109
	SEP.b #$20
	JSR.w CODE_17A356
	JSR.w CODE_17A409
	RTS

CODE_17A2B1:
	REP.b #$20
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w $1137
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1138
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDX.b #FXCODE_08E0C1>>16
	LDA.w #FXCODE_08E0C1
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.w $1122
	AND.b #$01
	TAX
	LDA.w $1137
	CLC
	ADC.w DATA_17A1AE,x
	CMP.b #$20
	BCC.b CODE_17A2F4
	SEC
	SBC.w DATA_17A1AE,x
	DEC.w $1138
	DEC.w $1138
	INC.w $1122
CODE_17A2F4:
	STA.w $1137
	LDA.w $1138
	CLC
	ADC.w DATA_17A1AC,x
	CMP.b #$20
	BCC.b CODE_17A30F
	SEC
	SBC.w DATA_17A1AC,x
	DEC.w $1137
	DEC.w $1137
	INC.w $1122
CODE_17A30F:
	STA.w $1138
	RTS

CODE_17A313:
	LDA.w $111D
	ASL
	CLC
	ADC.b #$12
	STA.w $1132
	JSR.w CODE_179B6E
	STZ.w $1122
	STZ.w $1110
	REP.b #$20
	LDA.w $111D
	AND.w #$000F
	ASL
	TAX
	LDA.w #$0000
	STA.l $707E70,x
	STA.l $707E76,x
	SEP.b #$20
	JSL.l CODE_108000
	INC.w $111B
	RTS

CODE_17A345:
	REP.b #$30
	JSR.w CODE_179B4F
	SEP.b #$30
	JSR.w CODE_179B6E
	STZ.w $1122
	INC.w $111B
	RTS

CODE_17A356:
	REP.b #$20
	LDA.w $1109
	STA.w $6A00
CODE_17A35E:
	LDA.w #$39C0
	STA.w $6A02
	LDA.w $112C
	BEQ.b CODE_17A371
	LDA.w $6A02
	INC
	INC
	STA.w $6A02
CODE_17A371:
	SEP.b #$20
	RTS

DATA_17A374:
	dw $5C8E,$5C6D

CODE_17A378:
	REP.b #$20
	LDA.w $1136
	AND.w #$0001
	ASL
	TAX
	LDA.w DATA_17A374,x
	STA.w $6A00
	BRA.b CODE_17A35E

DATA_17A38A:
	dw $37C8,$37C8,$3DC8

CODE_17A390:
	LDA.w $1109
	SEC
	SBC.b #$10
	STA.w $6A08
	LDA.w $110A
	SEC
	SBC.b #$17
	STA.w $6A09
	REP.b #$20
	LDA.w $111D
	AND.w #$00FF
	ASL
	TAX
	LDA.w $1123,x
	ASL
	TAX
	LDA.w DATA_1793F9,x
	LSR
	ORA.w #$31C8
	STA.w $6A0A
	LDA.w $1130
	AND.w #$00FF
	BEQ.b CODE_17A3D1
	LDA.w $1129
	AND.w #$0003
	ASL
	TAX
	LDA.w DATA_17A38A,x
	STA.w $6A0A
CODE_17A3D1:
	SEP.b #$20
	LDA.w $6C00
	ORA.b #$20
	STA.w $6C00
	RTS

DATA_17A3DC:
	dw $2334,$235C,$2384

CODE_17A3E2:
	REP.b #$20
	LDA.w $1134
	ASL
	TAX
	LDA.w DATA_17A3DC,x
	STA.w $6A04
	LDA.w $1123,x
	ASL
	TAX
	LDA.w DATA_1793F9,x
	LSR
	ORA.w #$31CC
	STA.w $6A06
	SEP.b #$20
	LDA.w $6C00
	ORA.b #$08
	STA.w $6C00
	RTS

CODE_17A409:
	REP.b #$20
	LDA.w $111D
	AND.w #$00FF
	ASL
	TAX
	LDA.w DATA_17A3DC,x
	STA.w $6A08
	LDA.w DATA_1793F9
	LSR
	ORA.w #$31C8
	STA.w $6A0A
	SEP.b #$20
	LDA.w $6C00
	ORA.b #$20
	STA.w $6C00
	RTS

;---------------------------------------------------------------------------

DATA_17A42E:
	db $09,!REGISTER_BG1AddressAndSize : dl $7E5B18

DATA_17A433:
	db $6C,$1C,$1C,$74,$01,$09,$00

DATA_17A43A:
	db $03,!REGISTER_BG1HorizScrollOffset : dl $7E5B58

DATA_17A43F:
	db $6C,$00,$00,$00,$00,$74,$00,$00,$00,$00,$00

DATA_17A44A:
	db $03,!REGISTER_BG2HorizScrollOffset : dl $7E5B98

DATA_17A44F:
	db $6C,$00,$00,$00,$00,$74,$00,$00,$00,$00,$00

DATA_17A45A:
	db $08,!REGISTER_BG1And2WindowMaskSettings : dl $7E5BD8

DATA_17A45F:
	db $6A,$32,$76,$33,$00

DATA_17A464:
	db $09,!REGISTER_BG3And4WindowMaskSettings : dl $7E5C18

DATA_17A469:
	db $30,$00,$00,$3A,$03,$02,$76,$03,$03,$00

DATA_17A473:
	db $44,!REGISTER_Window1LeftPositionDesignation : dl $7E5C58

DATA_17A478:
	db $18,$C0,$55,$D2,$C4,$55,$76,$40,$57,$00

DATA_17A482:
	db $08,!REGISTER_ColorMathSelectAndEnable : dl $7E5C98

DATA_17A487:
	db $6A,$A6,$76,$B7,$00

DATA_17A48C:
	db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
	db $FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE,$FD,$FD,$FD,$FD
	db $FD,$FD,$FD,$FD,$FC,$FC,$FC,$FC,$FC,$FC,$FC,$FB,$FB,$FB,$FB,$FB
	db $FA,$FA,$FA,$FA,$FA,$F9,$F9,$F9,$F9,$F9,$F8,$F8,$F8,$F8,$F7,$F7
	db $F7,$F7,$F6,$F6,$F6,$F5,$F5,$F5,$F5,$F4,$F4,$F4,$F3,$F3,$F3,$F2
	db $F2,$F2,$F1,$F1,$F1,$F0,$F0,$F0,$EF,$EF,$EF,$EE,$EE,$ED,$ED,$ED
	db $EC,$EC,$EB,$EB,$EB,$EA,$EA,$E9,$E9,$E8,$E8,$E7,$E7,$E7,$E6,$E6
	db $E5,$E5,$E4,$E4,$E3,$E3,$E2,$E2,$E1,$E0,$E0,$DF,$DF,$DE,$DE,$DD
	db $DD,$DC,$DB,$DB,$DA,$DA,$D9,$D8,$D8,$D7,$D6,$D6,$D5,$D4,$D4,$D3
	db $D2,$D2,$D1,$D0,$D0,$CF,$CE,$CD,$CD,$CC,$CB,$CA,$CA,$C9,$C8,$C7
	db $C7,$C6,$C5,$C4,$C3,$C2,$C2,$C1,$C0,$BF,$BE,$BD,$BC,$BB,$BA,$B9
	db $B9,$B8,$B7,$B6,$B5,$B4,$B3,$B2,$B1,$AF,$AE,$AD,$AC,$AB,$AA,$A9
	db $A8,$A7,$A5,$A4,$A3,$A2,$A1,$9F,$9E,$9D,$9C,$9A,$99,$98,$96,$95
	db $94,$92,$91,$8F,$8E,$8C,$8B,$89,$88,$86,$84,$83,$81,$7F,$7D,$7C
	db $7A,$78,$76,$74,$72,$70,$6E,$6C,$6A,$68,$65,$63,$61,$5E,$5C,$59
	db $56,$53,$50,$4D,$4A,$47,$43,$3F,$3B,$37,$32,$2D,$27,$20,$17,$00

DATA_17A58C:
	db $BF

DATA_17A58D:
	db $01

CODE_17A58E:
	JSL.l CODE_008277
	JSL.l CODE_00831C
	LDA.b #$15
	JSL.l CODE_008279
	JSL.l CODE_00BE26
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	LDX.b #$28
	JSL.l CODE_00BDA2
	LDA.b #$03
	STA.w !RAM_YI_Global_OAMSizeAndDataAreaDesignation
	STA.w !REGISTER_OAMSizeAndDataAreaDesignation
	STZ.w $0201
	REP.b #$20
	LDX.b #$00
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$1C00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$09
	STA.w DMA[$00].Parameters
	LDA.w #DATA_17A58C
	STA.w DMA[$00].SourceLo
	LDX.b #DATA_17A58C>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$1C00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortHi&$0000FF<<8)+$09
	STA.w DMA[$00].Parameters
	LDA.w #DATA_17A58D
	STA.w DMA[$00].SourceLo
	LDA.w #$0800
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	SEP.b #$20
	JSL.l CODE_00B439
	REP.b #$30
	STZ.w !RAM_YI_Level_CurrentYoshiColorLo
	JSL.l CODE_00BB47
	REP.b #$20
	JSL.l CODE_17CD0B
	SEP.b #$20
	LDX.b #$04
CODE_17A61B:
	LDA.w DATA_17A42E,x
	STA.w HDMA[$07].Parameters,x
	LDA.w DATA_17A43A,x
	STA.w HDMA[$06].Parameters,x
	LDA.w DATA_17A44A,x
	STA.w HDMA[$05].Parameters,x
	LDA.w DATA_17A45A,x
	STA.w HDMA[$04].Parameters,x
	LDA.w DATA_17A464,x
	STA.w HDMA[$03].Parameters,x
	LDA.w DATA_17A473,x
	STA.w HDMA[$02].Parameters,x
	LDA.w DATA_17A482,x
	STA.w HDMA[$01].Parameters,x
	DEX
	BPL.b CODE_17A61B
	LDA.b #$7E
	STA.w HDMA[$02].IndirectSourceBank
	LDX.b #$09
CODE_17A64F:
	LDA.w DATA_17A433,x
	STA.l $7E5B18,x
	LDA.w DATA_17A43F,x
	STA.l $7E5B58,x
	LDA.w DATA_17A44F,x
	STA.l $7E5B98,x
	LDA.w DATA_17A45F,x
	STA.l $7E5BD8,x
	LDA.w DATA_17A469,x
	STA.l $7E5C18,x
	LDA.w DATA_17A478,x
	STA.l $7E5C58,x
	LDA.w DATA_17A487,x
	STA.l $7E5C98,x
	DEX
	BPL.b CODE_17A64F
	LDA.b #$00
	STA.w $1144
	DEC
	STA.w $1145
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	PHA
	SEC
	SBC.l DATA_17E198,x
	CMP.b #!Define_YI_Map_ExtraLevels
	BCC.b CODE_17A6A6
	LDA.l DATA_17E198,x
	STA.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w $0000					; Glitch: This should be LDA.b #$00!
CODE_17A6A6:
	STA.w !RAM_YI_Map_RunningYoshiIndex
	JSL.l CODE_17C74B
	PLA
	STA.w !RAM_YI_Level_CurrentLevelFromMapLo
	JSR.w CODE_17A871
	LDA.b #DATA_1081E9>>16
	STA.b $02
	REP.b #$20
	LDA.w #$0C0B
	STA.w $0319
	STA.w $0325
	STA.w $0331
	STA.w $033D
	STA.w $0349
	STA.w $0355
	LDX.w $1123
	CPX.b #$09
	BCC.b CODE_17A6F6
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.l DATA_1081DD,x
	STA.b $00
	LDX.b #$00
CODE_17A6E1:
	LDA.b [$00]
	STA.b $04
	LDA.b ($04)
	AND.w #$000F
	BEQ.b CODE_17A6F5
	INC.b $00
	INC.b $00
	INX
	CPX.b #$09
	BCC.b CODE_17A6E1
CODE_17A6F5:
	DEX
CODE_17A6F6:
	TXA
	AND.w #$00FF
	STA.w $1123
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	STA.w $112B
	LDX.w !RAM_YI_Level_CurrentWorldLo
	STZ.w $1148
	LDA.l DATA_17E198,x
	TAX
	LDA.w $0317,x
	CMP.w #$0A09
	BEQ.b CODE_17A739
	LDA.w #$F0F0
	STA.w $0317,x
	LDY.b #$08
	STZ.b $00
CODE_17A720:
	LDA.w !RAM_YI_Map_LevelHighScores,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.b $00
	INX
	DEY
	BNE.b CODE_17A720
	LDA.b $00
	CMP.w #$0320
	BCC.b CODE_17A739
	INC.w $1148
CODE_17A739:
	SEP.b #$20
	JSL.l CODE_17C5FE
	REP.b #$20
	LDA.w !RAM_YI_Level_CurrentWorldLo
	STA.w $1125
	REP.b #$10
	LDA.w #$0009
	STA.b $7D
	STZ.b !RAM_YI_Global_Layer1XPosLo
	STZ.b !RAM_YI_Global_Layer1YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	LDA.w #$0080
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer3YPosLo
	LDA.w #$02D0
	STA.b $69
	LDA.w #$0000
	STA.b $6B
	STZ.b $6F
	LDA.w $1125
	ASL
	ASL
	ORA.w $1123
	ASL
	ASL
	ASL
	STA.b $91
	LDX.w #$0001
	LDA.w !RAM_YI_Global_CurrentGameMode
	CMP.w #!Define_YI_GameMode23
	BEQ.b CODE_17A780
	DEX
CODE_17A780:
	STX.b $97
	LDA.w $1123
	STA.b $B1
	LDA.w $1125
	ASL
	ASL
	ORA.w $1123
	INC
	ASL
	TAY
	LDA.w DATA_17BE0E,y
	SEC
	SBC.w #$0004
	STA.b $AD
	LDA.w DATA_17BDAE,y
	SEC
	SBC.w #$0008
	STA.b $AF
	JSR.w CODE_17A825
	REP.b #$20
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDA.w #$1C20
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #(!REGISTER_WriteToVRAMPortLo&$0000FF<<8)+$01
	STA.w DMA[$00].Parameters
	LDA.w #$000A06
	STA.w DMA[$00].SourceLo
	LDX.b #$000A06>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$0380
	STA.w DMA[$00].SizeLo
	LDY.b #$01
	STY.w !REGISTER_DMAEnable
	LDA.w #$2000
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$705800
	STA.w DMA[$00].SourceLo
	LDX.b #$705800>>16
	STX.w DMA[$00].SourceBank
	LDA.w #$1000
	STA.w DMA[$00].SizeLo
	STY.w !REGISTER_DMAEnable
	SEP.b #$30
	JSL.l CODE_00E3D7
	LDX.b #$12
	JSL.l CODE_008543
	LDA.w $0205
	BNE.b CODE_17A810
	LDA.b #$08
	CLC
	ADC.w $1146
	STA.b !RAM_YI_Global_PlayMusicLo
	CMP.b #$09
	BEQ.b CODE_17A819
	LDA.w $0265
	AND.b #$7F
	BEQ.b CODE_17A810
	INC.b !RAM_YI_Global_PlayMusicLo
CODE_17A810:
	LDA.w !RAM_YI_Global_CurrentGameMode
	CMP.b #!Define_YI_GameMode27
	BCC.b CODE_17A819
	DEC.b !RAM_YI_Global_PlayMusicLo
CODE_17A819:
	JSL.l CODE_008245
	LDA.b #$FE
	STA.w !RAM_YI_Global_HDMAEnable
	JMP.w CODE_17B38A

CODE_17A825:
	LDX.w #$0000
	LDA.w $1125
	ASL
	ASL
	ORA.w $1123
	ASL
	STA.b $89
	TAY
	LDA.w DATA_17BE6E,y
	STA.b $83
	LDA.w DATA_17BE0E,y
	SEC
	SBC.w #$0004
	STA.b $72
	STA.b $8D
	LDA.w DATA_17BDAE,y
	SEC
	SBC.w #$0008
	STA.b $76
	STA.b $8F
	SEC
	SBC.w #$0074
	BMI.b CODE_17A85E
	TAX
	CMP.w #$0100
	BCC.b CODE_17A85E
	LDX.w #$0100
CODE_17A85E:
	TXA
	STA.b $69
	STA.w $6094
	STA.b $6D
	STA.b $79
	STA.b !RAM_YI_Global_Layer3XPosLo
	JMP.w CODE_17BF7C

CODE_17A86D:
	JSR.w CODE_17A825
	RTL

CODE_17A871:
	STZ.w $1115
	STZ.w $1135
	LDA.b #!Define_YI_GameMode21
	STA.w !RAM_YI_Global_CurrentGameMode
	STZ.w $1127
	JSR.w CODE_17A908
	LDA.w $0220
	BEQ.b CODE_17A8EF
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.b #$01
	STA.w !RAM_YI_Map_LevelClearFlags,x
	INC.w $1127
	REP.b #$30
	TXA
	AND.w #$00FF
	ASL
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F3E7,x
	TAX
	LDA.l YI_LevelDataPtrsAndEntranceData_DATA_17F471+$03,x
	SEP.b #$30
	TAY
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	BNE.b CODE_17A8F1
	STY.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDX.b #$FF
	TYA
CODE_17A8B1:
	INX
	SEC
	SBC.b #!Define_YI_Map_LevelsPerWorld
	BPL.b CODE_17A8B1
	REP.b #$30
	TXA
	AND.w #$00FF
	ASL
	STA.w !RAM_YI_Level_CurrentWorldLo
	SEP.b #$30
	JSL.l CODE_108279
	LDA.b #!Define_YI_GameMode23
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w DATA_17E187,x
	BNE.b CODE_17A8F1
	STX.w $1115
	DEC.w !RAM_YI_Level_CurrentWorldLo
	DEC.w !RAM_YI_Level_CurrentWorldLo
	JSR.w CODE_17A908
	LDA.b #!Define_YI_GameMode27
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.b #$07
	STA.w !RAM_YI_Map_RunningYoshiIndex
CODE_17A8EF:
	BRA.b CODE_17A904

CODE_17A8F1:
	LDA.w $0220
	BPL.b CODE_17A904
	AND.b #$7F
	STA.w $1135
	JSL.l CODE_108279
	LDA.b #!Define_YI_GameMode25
	STA.w !RAM_YI_Global_CurrentGameMode
CODE_17A904:
	STZ.w $0220
	RTS

CODE_17A908:
	REP.b #$20
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	SEC
	SBC.w DATA_17E198,x
	STA.w $1123
	SEP.b #$20
	RTS

DATA_17A91A:
	dw CODE_17AA7A
	dw CODE_17A948
	dw CODE_17A94C
	dw CODE_17A950
	dw CODE_17A954
	dw CODE_17AB69
	dw CODE_17A995
	dw CODE_17A99C
	dw CODE_17A9A0
	dw CODE_17A9AF
	dw CODE_17AA7A
	dw CODE_17A9DE

CODE_17A932:
	JSL.l CODE_008259
	LDA.w $1127
	BEQ.b CODE_17A943
	ASL
	TAX
	JSR.w (DATA_17A91A-$02,x)
	STZ.w $1118
CODE_17A943:
	REP.b #$30
	JMP.w CODE_17B387

CODE_17A948:
	LDX.b #$00
	BRA.b CODE_17A9A2

CODE_17A94C:
	LDX.b #$02
	BRA.b CODE_17A9A2

CODE_17A950:
	LDX.b #$04
	BRA.b CODE_17A9A2

CODE_17A954:
	LDX.b #$06
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17A994
	LDA.b #$03
	STA.w $1127
	STZ.w $1120
	STZ.w $1121
	INC.w $111F
	LDA.w $111F
	CMP.b #$08
	BCC.b CODE_17A994
	LDA.b #$06
	STA.w $1127
	STZ.w $111F
	LDA.w $1148
	BEQ.b CODE_17A98B
	LDA.b #$06
	STA.w $1148
	LDA.b #$14
	STA.w $1133
CODE_17A98B:
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17E198,x
	TAX
	LDY.b #$08
CODE_17A994:
	RTS

CODE_17A995:
	LDX.b #$08
	STX.w $1121
	BRA.b CODE_17A9A2

CODE_17A99C:
	LDX.b #$0A
	BRA.b CODE_17A9A2

CODE_17A9A0:
	LDX.b #$0C
CODE_17A9A2:
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17A9AE
	INC.w $1127
CODE_17A9AE:
	RTS

CODE_17A9AF:
	LDX.b #$0E
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17A9DD
	LDA.b #$04
	STA.b !RAM_YI_Global_Layer2XPosLo
	LDA.b #$84
	STA.b !RAM_YI_Global_Layer2YPosLo
	LDA.b #$07
	STA.w $1127
	INC.w $1121
	JSL.l CODE_17D3AC
	INC.w $111F
	LDA.w $111F
	CMP.b #$08
	BCC.b CODE_17A9DD
	LDA.b #$0B
	STA.w $1127
CODE_17A9DD:
	RTS

CODE_17A9DE:
	INC.w !RAM_YI_Level_CurrentWorldLo
	INC.w !RAM_YI_Level_CurrentWorldLo
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAY
	LDX.w DATA_17E187,y
	LDA.b #$80
	STA.w !RAM_YI_Map_LevelClearFlags,x
	LDA.b #$FF
	STA.w $011A
	LDA.b #!Define_YI_GameMode08
	STA.w !RAM_YI_Global_CurrentGameMode
	STZ.w !RAM_YI_Level_FinalWorldUnlockedFlagLo
	STZ.w $0217
	RTS

DATA_17AA02:
	dw CODE_17AA4B
	dw CODE_17B519
	dw CODE_17B519
	dw CODE_17B519
	dw CODE_17AA8B
	dw CODE_17AA9C
	dw CODE_17AAB1
	dw CODE_17AAE0
	dw CODE_17AB03
	dw CODE_17AB1C
	dw CODE_17AB69
	dw CODE_17AB24

CODE_17AA1A:
	JSL.l CODE_008259
	LDA.w $1127
	BEQ.b CODE_17AA3E
	ASL
	TAX
	JSR.w (DATA_17AA02-$02,x)
	LDA.w $1127
	CMP.b #$07
	BCC.b CODE_17AA39
	CMP.b #$0B
	BCS.b CODE_17AA39
	STA.w $1121
	JSR.w CODE_17B687
CODE_17AA39:
	STZ.w $1118
	BRA.b CODE_17AA46

CODE_17AA3E:
	LDA.w $1131
	BEQ.b CODE_17AA46
	JSR.w CODE_17B753
CODE_17AA46:
	REP.b #$30
	JMP.w CODE_17B387

CODE_17AA4B:
	JSR.w CODE_17AA7A
	LDA.w $1133
	BNE.b CODE_17AA79
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w !RAM_YI_Map_LevelHighScores,y
	PHA
	LDA.w $1135
	STA.w !RAM_YI_Map_LevelHighScores,y
	PLA
	STA.w $1135
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAY
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	SEC
	SBC.w DATA_17E187,y
	STA.w $111F
	JSR.w CODE_17B509
	DEC.w $1127
CODE_17AA79:
	RTS

CODE_17AA7A:
	INC.w $1133
	LDA.w $1133
	CMP.b #$14
	BCC.b CODE_17AA8A
	INC.w $1127
	STZ.w $1133
CODE_17AA8A:
	RTS

CODE_17AA8B:
	INC.w $1133
	LDA.w $1133
	CMP.b #$50
	BCC.b CODE_17AA9B
	INC.w $1127
	STZ.w $1133
CODE_17AA9B:
	RTS

CODE_17AA9C:
	JSL.l CODE_17D2B3
	REP.b #$20
	LDA.w #$0100
	STA.w $1110
	SEP.b #$20
	LDA.b #!Define_YI_SoundID15_Growth
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	INC.w $1127
CODE_17AAB1:
	REP.b #$20
	LDA.w $1110
	SEC
	SBC.w #$0008
	STA.w $1110
	SEP.b #$20
	CMP.b #$20
	BCS.b CODE_17AAD6
	INC.w $1127
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w $1135
	STA.w !RAM_YI_Map_LevelHighScores,x
	STZ.w $1135
	LDA.b #!Define_YI_SoundID05_Powerup
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_17AAD6:
	REP.b #$20
	LDX.b #$0B
	JSR.w CODE_17B623
	SEP.b #$20
CODE_17AADF:
	RTS

CODE_17AAE0:
	REP.b #$20
	LDA.w $1110
	CLC
	ADC.w #$0008
	STA.w $1110
	SEP.b #$20
	LDA.w $1111
	BEQ.b CODE_17AAF9
	STZ.w $1110
	INC.w $1127
CODE_17AAF9:
	REP.b #$20
	LDX.b #$0B
	JSR.w CODE_17B623
	SEP.b #$20
	RTS

CODE_17AB03:
	LDX.b #$00
	JSL.l CODE_17D87D
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	SEC
	SBC.w DATA_17E187,x
	STA.w $111F
	INC.w $1127
	RTS

CODE_17AB1C:
	JSL.l CODE_17D523
	INC.w $1127
	RTS

CODE_17AB24:
	STZ.w $1127
	INC.w $1131
CODE_17AB29:
	RTS

DATA_17AB2B:
	dw CODE_17AB9C
	dw CODE_17ABE6
	dw CODE_17ABF6
	dw CODE_17AC0A
	dw CODE_17AC19
	dw CODE_17AC44
	dw CODE_17AD09
	dw CODE_17B16B
	dw CODE_17B013
	dw CODE_17B03E
	dw CODE_17B060
	dw CODE_17B03E
	dw CODE_17B060
	dw CODE_17B03E
	dw CODE_17B097
	dw CODE_17B16B
	dw CODE_17B0BC
	dw CODE_17B03E
	dw CODE_17B060
	dw CODE_17B03E
	dw CODE_17B060
	dw CODE_17B03E
	dw CODE_17B0E7
	dw CODE_17B16B
	dw CODE_17B10C
	dw CODE_17B120
	dw CODE_17B12C
	dw CODE_17B138
	dw CODE_17B176
	dw CODE_17B194
	dw CODE_17B326

CODE_17AB69:
	STZ.w $1118
	LDA.w $1148
	BEQ.b CODE_17AB86
	ASL
	TAX
	JSR.w (DATA_17AB2B-$02,x)
	LDA.w $1148
	CMP.b #$07
	BCC.b CODE_17AB89
	CMP.b #$19
	BCS.b CODE_17AB89
	JSR.w CODE_17AB8E
	BRA.b CODE_17AB89

CODE_17AB86:
	JSR.w CODE_17AA8B
CODE_17AB89:
	RTS

DATA_17AB8A:
	db $81,$22,$5D,$09

CODE_17AB8E:
	LDA.b $30
	AND.b #$04
	LSR
	TAX
CODE_17AB94:
	LDA.w DATA_17AB8A,x
	STA.l YI_Global_PaletteMirror[$34].LowByte
	RTS

CODE_17AB9C:
	LDA.w $111F
	STA.w $114A
	LDA.b #$3C
	STA.w $1133
	LDX.b #$00
	JSR.w CODE_17AC0C
	REP.b #$20
	LDA.w $114A
	ASL
	TAX
	LDA.w DATA_17DCEF,x
	LDX.w $1106
	BEQ.b CODE_17ABBF
	CLC
	ADC.w #$0380
CODE_17ABBF:
	CLC
	ADC.w #$0042
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	LDY.b #$00
	LDA.w #$2DA9
	STA.b ($0A),y
	LDA.w #$2DB9
	STA.b ($0C),y
	INY
	INY
	LDA.w #$2DAA
	STA.b ($0A),y
	LDA.w #$2DBA
	STA.b ($0C),y
	SEP.b #$20
	RTS

CODE_17ABE6:
	REP.b #$20
	DEC.w $1133
	LDA.w $1133
	BNE.b CODE_17ABF3
	INC.w $1148
CODE_17ABF3:
	SEP.b #$20
	RTS

CODE_17ABF6:
	LDA.w $111F
	CMP.w $114A
	BNE.b CODE_17AC06
	INC
	CMP.b #$08
	BCS.b CODE_17AC24
	STA.w $111F
CODE_17AC06:
	LDX.b #$02
	BRA.b CODE_17AC0C

CODE_17AC0A:
	LDX.b #$04
CODE_17AC0C:
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17AC18
	INC.w $1148
CODE_17AC18:
	RTS

CODE_17AC19:
	LDX.b #$06
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17AC43
CODE_17AC24:
	STZ.w $1120
	STZ.w $1121
	LDX.b #$03
	INC.w $111F
	LDA.w $111F
	CMP.b #$08
	BCC.b CODE_17AC40
	LDA.b #$14
	STA.w $1133
	STZ.w $111F
	LDX.b #$06
CODE_17AC40:
	STX.w $1148
CODE_17AC43:
	RTS

CODE_17AC44:
	LDA.b #!Define_YI_SoundID97_WorldClear
	JSL.l CODE_0085D2
	REP.b #$20
	JSR.w CODE_17AC94
	REP.b #$10
	LDA.w #$705800>>16
	STA.b $01
	LDY.w #$6800
	LDX.w #$705800
	LDA.w #$1000
	JSL.l CODE_00BEA6
	SEP.b #$10
	LDX.b #$0C
	STZ.b $00
	LDA.w #$0040
	STA.b $02
CODE_17AC6E:
	STZ.w $1160,x
	LDA.b $00
	STA.w $1152,x
	CLC
	ADC.w #$000A
	STA.b $00
	LDA.b $02
	STA.w $117C,x
	CLC
	ADC.w #$0018
	STA.b $02
	DEX
	DEX
	BPL.b CODE_17AC6E
	INC.w $115E
	SEP.b #$30
	INC.w $1148
	RTS

CODE_17AC94:
	LDA.w #$5800
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDA.w #$0002
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	STZ.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w #$0800
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	LDX.b #FXCODE_08AA8B>>16
	LDA.w #FXCODE_08AA8B
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	RTS

DATA_17ACB3:
	dw $0001,$0001,$0001,$0001,$0002,$0002,$0002,$0002
	dw $0002,$0003,$0003,$0003,$0003,$0003,$0002,$0002
	dw $0001

DATA_17ACD5:
	dw $0030,$0030,$0030,$0030,$0030,$FFD0,$FFD0,$FFD0
	dw $FFD0,$0000,$0030,$0030

DATA_17ACED:
	dw $0030,$0003,$0003,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0001,$0001,$0001,$0001,$0001

CODE_17AD09:
	REP.b #$20
	LDY.b #$0C
CODE_17AD0D:
	LDA.w $1152,y
	DEC
	STA.w $1152,y
	BNE.b CODE_17AD45
	LDX.w $116E,y
	LDA.w DATA_17ACB3,x
	STA.w $1152,y
	LDA.w $1160,y
	CLC
	ADC.w DATA_17ACD5,x
	STA.w $1160,y
	INX
	INX
	CPX.b #$1A
	BCS.b CODE_17AD3F
	TXA
	STA.w $116E,y
	LDA.w $117C,y
	SEC
	SBC.w DATA_17ACED,x
	STA.w $117C,y
	BRA.b CODE_17AD45

CODE_17AD3F:
	LDA.w #$0100
	STA.w $1160,y
CODE_17AD45:
	DEY
	DEY
	BPL.b CODE_17AD0D
	LDX.b #$0C
	LDA.w #$0000
CODE_17AD4E:
	CLC
	ADC.w $1160,x
	DEX
	DEX
	BPL.b CODE_17AD4E
	CMP.w #$0700
	BNE.b CODE_17AD64
	INC.w $1148
	LDA.w #$0070
	STA.w $1133
CODE_17AD64:
	JSR.w CODE_17AD93
	JSR.w CODE_17AE1B
	JSR.w CODE_17AF33
	SEP.b #$20
	RTS

DATA_17AD70:
	dw FXDATA_558000+$6081,FXDATA_558000+$60A1,FXDATA_558000+$60C1,FXDATA_558000+$60E1,FXDATA_558000+$60A1,FXDATA_558000+$4081,FXDATA_548000+$20C0

DATA_17AD7E:
	db (FXDATA_558000+$6081)>>16,(FXDATA_558000+$60A1)>>16,(FXDATA_558000+$60C1)>>16,(FXDATA_558000+$60E1)>>16,(FXDATA_558000+$60A1)>>16,(FXDATA_558000+$4081)>>16,(FXDATA_548000+$20C0)>>16

DATA_17AD85:
	db $00,$20,$40,$60,$00,$20,$40

DATA_17AD8C:
	db $00,$00,$00,$00,$20,$20,$20

CODE_17AD93:
	JSR.w CODE_17AC94
	REP.b #$10
	LDX.w #$000C
	STX.b $00
	STZ.b $02
CODE_17AD9F:
	LDX.b $00
	LDY.b $02
	LDA.w $1160,x
	BEQ.b CODE_17ADEE
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w $1160,x
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDA.w DATA_17AD70,y
	STA.w !REGISTER_SuperFX_R12_LOOPCounterLo
	TYA
	LSR
	TAY
	LDA.w DATA_17AD8C,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w DATA_17AD85,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w DATA_17AD7E,y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R13_LOOPAddressLo
	SEP.b #$10
	LDX.b #FXCODE_088295>>16
	LDA.w #FXCODE_088295
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
CODE_17ADEE:
	INC.b $02
	INC.b $02
	DEC.b $00
	DEC.b $00
	BPL.b CODE_17AD9F
	LDA.w #$705800>>16
	STA.b $01
	LDY.w #$6800
	LDX.w #$705800
	LDA.w #$1000
	JSL.l CODE_00BEA6
	SEP.b #$10
	RTS

DATA_17AE0D:
	dw $3EC8,$3EC4,$3EC0,$3E8C,$3E88,$3E84,$3E80

CODE_17AE1B:
	REP.b #$10
	LDX.w #$000C
	LDY.w $6092
CODE_17AE23:
	LDA.w $1160,x
	BNE.b CODE_17AE2B
	JMP.w CODE_17AEEB

CODE_17AE2B:
	LDA.w $117C,x
	STA.w $6000,y
	STA.w $6008,y
	CLC
	ADC.w #$0010
	STA.w $6010,y
	STA.w $6018,y
	STA.w $6020,y
	STA.w $6028,y
	LDA.w #$8000
	STA.b $00
	LDA.w $116E,x
	CMP.w #$0012
	BCC.b CODE_17AE7C
	STZ.b $00
	LDA.w #$0028
	STA.w $6002,y
	PHA
	CLC
	ADC.w #$0010
	STA.w $600A,y
	PLA
	STA.w $6012,y
	CLC
	ADC.w #$0008
	STA.w $601A,y
	CLC
	ADC.w #$0008
	STA.w $6022,y
	CLC
	ADC.w #$0008
	STA.w $602A,y
	BRA.b CODE_17AEA3

CODE_17AE7C:
	LDA.w #$0028
	STA.w $600A,y
	PHA
	CLC
	ADC.w #$0010
	STA.w $6002,y
	PLA
	STA.w $602A,y
	CLC
	ADC.w #$0008
	STA.w $6022,y
	CLC
	ADC.w #$0008
	STA.w $601A,y
	CLC
	ADC.w #$0008
	STA.w $6012,y
CODE_17AEA3:
	LDA.w DATA_17AE0D,x
	ORA.b $00
	STA.w $6004,y
	PHA
	ORA.w #$0020
	STA.w $600C,y
	PLA
	INC
	INC
	STA.w $6014,y
	CLC
	ADC.w #$0010
	STA.w $601C,y
	CLC
	ADC.w #$0010
	STA.w $6024,y
	CLC
	ADC.w #$0010
	STA.w $602C,y
	LDA.w #$0002
	STA.w $6006,y
	STA.w $600E,y
	LDA.w #$0000
	STA.w $6016,y
	STA.w $601E,y
	STA.w $6026,y
	STA.w $602E,y
	TYA
	CLC
	ADC.w #$0030
	TAY
CODE_17AEEB:
	DEX
	DEX
	BMI.b CODE_17AEF2
	JMP.w CODE_17AE23

CODE_17AEF2:
	STY.w $6092
	JSR.w CODE_17AFCC
	SEP.b #$10
	RTS

DATA_17AEFB:
	db $11,$12,$13,$14,$15,$80,$0F,$10,$11,$12,$13,$80,$80,$80

DATA_17AF09:
	db $80,$80,$80,$80,$11,$12,$13,$14,$80,$80,$80,$80,$80,$80

DATA_17AF17:
	dw $3FCB,$3FDB,$3FCB,$3FDA,$3FCA,$3FCB,$3FCB,$3FDB
	dw $3FCB,$3FDA,$3FCA,$3FCB,$3FCB,$3FCB

CODE_17AF33:
	REP.b #$10
	LDX.w #$000C
	LDA.w $6092
	STA.b $00
CODE_17AF3D:
	LDA.w $116E,x
	BEQ.b CODE_17AF7F
	TAY
	PHA
	LDA.w DATA_17AF17,y
	STA.b $04
	PLA
	LSR
	TAY
	LDA.w DATA_17AEFB,y
	AND.w #$00FF
	CMP.w #$0080
	BCS.b CODE_17AF5F
	LDY.w #$0028
	STY.b $02
	JSR.w CODE_17AF8B
CODE_17AF5F:
	LDA.w $116E,x
	TAY
	PHA
	LDA.w DATA_17AF17,y
	STA.b $04
	PLA
	LSR
	TAY
	LDA.w DATA_17AF09,y
	AND.w #$00FF
	CMP.w #$0080
	BCS.b CODE_17AF7F
	LDY.w #$0038
	STY.b $02
	JSR.w CODE_17AF8B
CODE_17AF7F:
	DEX
	DEX
	BPL.b CODE_17AF3D
	LDA.b $00
	STA.w $6092
	SEP.b #$10
	RTS

CODE_17AF8B:
	LDY.b $00
	ADC.w $117C,x
	STA.w $6000,y
	LDA.b $02
	STA.w $6002,y
	LDA.b $04
	STA.w $6004,y
	LDA.w #$4000
	STA.w $6006,y
	LDA.b $00
	CLC
	ADC.w #$0008
	STA.b $00
	RTS

DATA_17AFAC:
	dw CODE_5FDFC4,CODE_5FDFCA,CODE_5FDFD0,CODE_5FDFD6,CODE_5FDFDC,CODE_5FDFE2,CODE_5FDFE8,CODE_5FDFEE

DATA_17AFBC:
	dw $0010,$0006,$0006,$0006,$0006,$0006,$0006,$0006

CODE_17AFCC:
	LDA.w $1148
	CMP.w #$0008
	BCC.b CODE_17B012
	CMP.w #$001D
	BCS.b CODE_17B012
	INC.w $118A
	LDX.w $118C
	LDA.w $118A
	CMP.w DATA_17AFBC,x
	BCC.b CODE_17AFF7
	STZ.w $118A
	INX
	INX
	CPX.w #$0010
	BCC.b CODE_17AFF4
	LDX.w #$0000
CODE_17AFF4:
	STX.w $118C
CODE_17AFF7:
	LDA.w DATA_17AFAC,x
	STA.b $00
	LDA.w #CODE_5FDFC4>>16
	STA.b $02
	LDY.w #$0000
CODE_17B004:
	TYX
	LDA.b [$00],y
	STA.l YI_Global_PaletteMirror[$FD].LowByte,x
	INY
	INY
	CPY.w #$0006
	BCC.b CODE_17B004
CODE_17B012:
	RTS

CODE_17B013:
	INC.w $1148
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.l DATA_17E198,x
	CLC
	ADC.b #$08
	STA.w $114C
	TAX
	LDA.b #$01
	STA.w !RAM_YI_Map_LevelClearFlags,x
	REP.b #$20
	JSR.w CODE_17AE1B
	LDA.w #$0010
	STA.w $1110
	JSR.w CODE_17B623
	SEP.b #$20
	LDA.b #!Define_YI_SoundID05_Powerup
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	RTS

CODE_17B03E:
	REP.b #$20
	JSR.w CODE_17AE1B
	LDX.w $1130
	LDA.w $1110
	CLC
	ADC.w DATA_17B557,x
	CMP.w DATA_17B561,x
	BCC.b CODE_17B05E
	INC.w $1148
	INC.w $1130
	INC.w $1130
	LDA.w DATA_17B561,x
CODE_17B05E:
	BRA.b CODE_17B07D

CODE_17B060:
	REP.b #$20
	JSR.w CODE_17AE1B
	LDX.w $1130
	LDA.w $1110
	SEC
	SBC.w DATA_17B557,x
	CMP.w DATA_17B561,x
	BCS.b CODE_17B07D
	INC.w $1148
	INC.w $1130
	INC.w $1130
CODE_17B07D:
	STA.w $1110
	LDX.w $114C
	JSR.w CODE_17B623
	SEP.b #$20
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w $114C
	SEC
	SBC.l DATA_17E198,x
	JSR.w CODE_17B693
	RTS

CODE_17B097:
	REP.b #$20
	JSR.w CODE_17AE1B
	LDA.w #$001E
	STA.w $1133
	INC.w $1148
	LDY.b #$10
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w $114C
	ASL
	TAX
	LDA.l DATA_17DC37
	ORA.l DATA_17DC4F,x
	STA.b $00
	JMP.w CODE_17B662

CODE_17B0BC:
	REP.b #$20
	JSR.w CODE_17AE1B
	SEP.b #$20
	INC.w $1148
	INC.w $114C
	LDA.w $114C
	TAX
	LDA.b #$01
	STA.w !RAM_YI_Map_LevelClearFlags,x
	REP.b #$20
	STZ.w $1130
	LDA.w #$0010
	STA.w $1110
	JSR.w CODE_17B623
	SEP.b #$20
	LDA.b #!Define_YI_SoundID05_Powerup
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	RTS

CODE_17B0E7:
	REP.b #$20
	JSR.w CODE_17AE1B
	LDA.w #$001E
	STA.w $1133
	INC.w $1148
	LDY.b #$12
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w $114C
	ASL
	TAX
	LDA.l DATA_17DC39
	ORA.l DATA_17DC4F,x
	STA.b $00
	JMP.w CODE_17B662

CODE_17B10C:
	LDX.b #$00
	JSR.w CODE_17AB94
	REP.b #$20
	JSR.w CODE_17AE1B
	SEP.b #$20
	LDX.b #$08
	STX.w $1121
	JMP.w CODE_17AC0C

CODE_17B120:
	REP.b #$20
	JSR.w CODE_17AE1B
	SEP.b #$20
	LDX.b #$0A
	JMP.w CODE_17AC0C

CODE_17B12C:
	REP.b #$20
	JSR.w CODE_17AE1B
	SEP.b #$20
	LDX.b #$0C
	JMP.w CODE_17AC0C

CODE_17B138:
	REP.b #$20
	JSR.w CODE_17AE1B
	SEP.b #$20
	LDX.b #$0E
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17B16A
	LDA.b #$04
	STA.b !RAM_YI_Global_Layer2XPosLo
	LDA.b #$84
	STA.b !RAM_YI_Global_Layer2YPosLo
	INC.w $1121
	JSL.l CODE_17D3AC
	LDX.b #$19
	INC.w $111F
	LDA.w $111F
	CMP.b #$08
	BCC.b CODE_17B167
	LDX.b #$1D
CODE_17B167:
	STX.w $1148
CODE_17B16A:
	RTS

CODE_17B16B:
	JSR.w CODE_17ABE6
	REP.b #$20
	JSR.w CODE_17AE1B
	SEP.b #$20
	RTS

CODE_17B176:
	REP.b #$20
	JSR.w CODE_17AE1B
	INC.w $1148
	LDX.b #$0C
	LDA.w #$0000
CODE_17B183:
	STA.w $1152,x
	CLC
	ADC.w #$000A
	DEX
	DEX
	BPL.b CODE_17B183
	INC.w $115E
	SEP.b #$20
	RTS

CODE_17B194:
	REP.b #$30
	LDY.w #$000C
CODE_17B199:
	LDA.w $1160,y
	BEQ.b CODE_17B1D3
	LDA.w $1152,y
	DEC
	STA.w $1152,y
	BNE.b CODE_17B1D3
	LDX.w $116E,y
	LDA.w DATA_17ACB3,x
	STA.w $1152,y
	LDA.w $1160,y
	SEC
	SBC.w #$0030
	STA.w $1160,y
	INX
	INX
	CPX.w #$0022
	BCC.b CODE_17B1CF
	LDA.w #$0000
	STA.w $1160,y
	STA.w $1152,y
	STA.w $116E,y
	BRA.b CODE_17B1D3

CODE_17B1CF:
	TXA
	STA.w $116E,y
CODE_17B1D3:
	DEY
	DEY
	BPL.b CODE_17B199
	LDA.w $1160
	BNE.b CODE_17B1EB
	LDA.w $116E
	CMP.w #$000C
	BCC.b CODE_17B1EB
	INC.w $1148
	SEP.b #$30
	BRA.b CODE_17B20F

CODE_17B1EB:
	JSR.w CODE_17B24C
	SEP.b #$10
	JSR.w CODE_17AD93
	JSR.w CODE_17AE1B
	SEP.b #$20
	LDX.b #$0C
CODE_17B1FA:
	LDA.w $116E,x
	BNE.b CODE_17B20B
	LDA.w $1152,x
	DEC
	BNE.b CODE_17B20B
	LDA.b #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
CODE_17B20B:
	DEX
	DEX
	BPL.b CODE_17B1FA
CODE_17B20F:
	RTS
	
DATA_17B210:
	dw $0004,$0004,$0004,$0004,$0004,$0004

DATA_17B21C:
	db $04,$08,$10,$14,$14,$14

DATA_17B222:
	db $04,$01,$00,$FC,$FC,$FC

DATA_17B228:
	db $0C,$0D,$10,$14,$14,$14

DATA_17B22E:
	db $14,$18,$20,$24,$24,$24

DATA_17B234:
	db $02,$04,$06,$0A,$0A,$0A

DATA_17B23A:
	db $02,$04,$06,$0A,$0A,$0A

DATA_17B240:
	dw $3FCB,$3FDB,$3FCB,$3FDA,$3FCA,$3FCA

CODE_17B24C:
	LDX.w #$000C
	LDY.w $6092
	STY.b $00
CODE_17B254:
	LDA.w $1160,x
	BEQ.b CODE_17B25C
	JMP.w CODE_17B319

CODE_17B25C:
	INC.w $1152,x
	LDA.w $116E,x
	TAY
	CPY.w #$000C
	BCC.b CODE_17B26B
	JMP.w CODE_17B319

CODE_17B26B:
	LDA.w $1152,x
	CMP.w DATA_17B210,y
	BCC.b CODE_17B27F
	INC.w $116E,x
	INC.w $116E,x
	LDA.w #$0000
	STA.w $1152,x
CODE_17B27F:
	TYA
	LSR
	TAY
	LDA.w DATA_17B21C,y
	AND.w #$00FF
	STA.b $10
	LDA.w DATA_17B222,y
	AND.w #$00FF
	STA.b $12
	LDA.w DATA_17B228,y
	AND.w #$00FF
	STA.b $14
	LDA.w DATA_17B22E,y
	AND.w #$00FF
	STA.b $16
	LDA.w DATA_17B234,y
	AND.w #$00FF
	STA.b $18
	LDA.w DATA_17B23A,y
	AND.w #$00FF
	STA.b $1A
	TYA
	ASL
	TAY
	LDA.w DATA_17B240,y
	STA.b $0E
	LDY.b $00
	LDA.w $117C,x
	PHA
	SEC
	SBC.b $10
	STA.w $6000,y
	PLA
	PHA
	CLC
	ADC.b $12
	STA.w $6008,y
	PLA
	PHA
	CLC
	ADC.b $14
	STA.w $6010,y
	PLA
	CLC
	ADC.b $16
	STA.w $6018,y
	LDA.w #$0028
	STA.w $600A,y
	STA.w $6012,y
	CLC
	ADC.b $18
	STA.w $6002,y
	LDA.w #$0028
	CLC
	ADC.b $1A
	STA.w $601A,y
	LDA.b $0E
	STA.w $6004,y
	STA.w $600C,y
	STA.w $6014,y
	STA.w $601C,y
	LDA.w #$4000
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	TYA
	CLC
	ADC.w #$0020
	STA.b $00
CODE_17B319:
	DEX
	DEX
	BMI.b CODE_17B320
	JMP.w CODE_17B254

CODE_17B320:
	LDA.b $00
	STA.w $6092
	RTS

CODE_17B326:
	LDA.b #$08
	STA.w $1112
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_17E257,x
	STA.w $1109
	STZ.b !RAM_YI_Global_Layer2XPosLo
	LDA.w #$0080
	STA.b !RAM_YI_Global_Layer2YPosLo
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.l DATA_17E198,x
	TAY
	LDA.w #$0A09
	STA.w $0317,y
	SEP.b #$20
	JSL.l CODE_108279
	LDX.b #!Define_YI_GameMode22
	LDA.w !RAM_YI_Global_CurrentGameMode
	CMP.b #!Define_YI_GameMode28
	BCC.b CODE_17B35F
	TAX
	LDA.b #$0B
	STA.w $1127
CODE_17B35F:
	STX.w !RAM_YI_Global_CurrentGameMode
	RTS

CODE_17B363:
	JSL.l CODE_008259
	LDA.w $1131
	BNE.b CODE_17B373
	REP.b #$30
	JSR.w CODE_17BC01
	BRA.b CODE_17B385

CODE_17B373:
	LDA.w $1127
	BEQ.b CODE_17B37D
	JSR.w CODE_17B4E6
	BRA.b CODE_17B385

CODE_17B37D:
	LDA.w $1131
	BEQ.b CODE_17B385
	JSR.w CODE_17B753
CODE_17B385:
	REP.b #$30
CODE_17B387:
	JSR.w CODE_17BF7C
CODE_17B38A:				; Note: Related to updating map screen sprites.
	REP.b #$20
	LDA.b $6D
	STA.w $6094
	LDX.b #FXCODE_08B1EF>>16
	LDA.w #FXCODE_08B1EF
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	PLB
	RTL

CODE_17B39E:
	PHP
	SEP.b #$30
	PHB
	LDA.b #$70219A>>16
	PHA
	PLB
	REP.b #$20
	LDX.b #$00
CODE_17B3AA:
	LDA.w $70219A,x
	STA.b $00
	LDA.w $7021BA,x
	STA.w $70219A,x
	LDA.b $00
	STA.w $7021BA,x
	INX
	INX
	CPX.b #$06
	BCC.b CODE_17B3AA
	SEP.b #$20
	PLB
	PLP
	RTS

DATA_17B3C5:
	dw CODE_17BF63
	dw CODE_17BF22
	dw CODE_17C562
	dw CODE_17C5C5

CODE_17B3CD:
	JSL.l CODE_008259
	JSL.l CODE_17C757
if !Define_YI_Global_EnableDebugFeatures == !TRUE
	NOP #3
else
	JMP.w CODE_17B430
endif

ADDR_17B3D8:
	LDA.w !RAM_YI_Global_CurrentSaveFile
	CMP.b #$04
	BNE.b ADDR_17B424
	LDA.w $0943
	AND.b #$20
	BEQ.b ADDR_17B3F8
	LDA.b #$FF
	STA.w $011A
	INC.w !RAM_YI_Level_CurrentWorldLo
	INC.w !RAM_YI_Level_CurrentWorldLo
	LDA.b #!Define_YI_GameMode08
	STA.w !RAM_YI_Global_CurrentGameMode
	BRA.b CODE_17B430

ADDR_17B3F8:
	LDA.w $0942
	CMP.b #$80
	BNE.b ADDR_17B424
	LDA.b #!Define_YI_GameMode1F
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.b #$E4
	STA.w $0220
	REP.b #$20
	LDA.w #$6464
	STA.w !RAM_YI_Map_LevelHighScores
	STA.w $02BA
	STA.w $02BC
	STA.w $02BE
	LDA.w #$F0F0
	STA.w $0317
	SEP.b #$20
	BRA.b CODE_17B430

ADDR_17B424:
	LDA.w $0942
	AND.b #$30
	BEQ.b CODE_17B430
	LDA.b #!Define_YI_GameMode16
	STA.w !RAM_YI_Global_CurrentGameMode
CODE_17B430:
	LDX.b #$00
	LDA.w $1118
	BNE.b CODE_17B44F
	LDA.b $38
	ORA.b $36
	AND.b #$0F
	BEQ.b CODE_17B44F
	LDA.w $1112
	CMP.b #$08
	BCS.b CODE_17B44F
	STA.w !RAM_YI_Map_RunningYoshiIndex
	JSL.l CODE_17C72B
	INX
	INX
CODE_17B44F:
	LDA.b $35
	AND.b #$30
	BEQ.b CODE_17B459
	LDX.b #$04
	BRA.b CODE_17B45F

CODE_17B459:
	LDA.b $93
	BEQ.b CODE_17B45F
	LDX.b #$06
CODE_17B45F:
	JSR.w (DATA_17B3C5,x)
	LDA.w $098E
	BEQ.b CODE_17B4BA
	DEC.w $0200
	BNE.b CODE_17B4BA
	LDA.w $0201
	EOR.b #$01
	STA.w $0201
	STZ.w $0200
	STZ.w !RAM_YI_Global_ColorMathInitialSettings
	LDA.b #$58
	STA.w $0392
	STZ.w !RAM_YI_Level_FlowersCollectedLo
	STZ.w $03B9
	REP.b #$20
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w $112B
	BEQ.b CODE_17B495
	STZ.w !RAM_YI_Level_DeathsInCurrentLevelLo
	STZ.w !RAM_YI_Level_1upsCollectedInCurrentLevelLo
CODE_17B495:
	SEP.b #$20
	TAY
	LDA.w !RAM_YI_Map_LevelHighScores,y
	STA.w $0381
	LDY.b #!Define_YI_GameMode0C
	STY.w !RAM_YI_Global_CurrentGameMode
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	CMP.w DATA_17B4BD,x
	BNE.b CODE_17B4BA
	LDA.b #!Define_YI_GameMode2A
	STA.w !RAM_YI_Global_CurrentGameMode
	TXA
	ASL
	STA.w !RAM_YI_Level_CurrentBonusGame
CODE_17B4BA:
	JMP.w CODE_17B38A

DATA_17B4BD:
	db !Define_YI_LevelID_FlipCards
	db !Define_YI_LevelID_ScratchAndMatch
	db !Define_YI_LevelID_DrawingLots
	db !Define_YI_LevelID_MatchCards
	db !Define_YI_LevelID_Roulette
	db !Define_YI_LevelID_SlotMachine
	db $51
	db $5D
	db $69

DATA_17B4C6:
	dw CODE_17B509
	dw CODE_17B519
	dw CODE_17B519
	dw CODE_17B519
	dw CODE_17B538
	dw CODE_17B54C
	dw CODE_17B56B
	dw CODE_17B594
	dw CODE_17B54C
	dw CODE_17B56B
	dw CODE_17B594
	dw CODE_17B56B
	dw CODE_17B5B9
	dw CODE_17B5FC
	dw CODE_17B616
	dw CODE_17B528

CODE_17B4E6:
	LDA.w $1127
	BEQ.b CODE_17B505
	ASL
	TAX
	JSR.w (DATA_17B4C6-$02,x)
	LDA.w $1127
	CMP.b #$06
	BCC.b CODE_17B505
	LDA.w $1121
	PHA
	STZ.w $1121
	JSR.w CODE_17B687
	PLA
	STA.w $1121
CODE_17B505:
	STZ.w $1118
	RTS

CODE_17B509:
	DEX
	DEX
	JSL.l CODE_17D87D
	LDA.w $1123
	STA.w $111F
	INC.w $1127
	RTS

CODE_17B519:
	DEX
	DEX
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17B527
	INC.w $1127
CODE_17B527:
	RTS

CODE_17B528:
	LDA.b #$80
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	LDA.b #$32
	STA.l $7E5C19
	INC.w $1127
	RTS

CODE_17B538:
	INC.w $1127
	REP.b #$20
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	LDA.w #$0020
else
	LDA.w #$0010
endif
	STA.w $1110
	JSR.w CODE_17B620
	SEP.b #$20
	STZ.w $1130
	RTS

CODE_17B54C:
	LDA.b #!Define_YI_SoundID15_Growth
	JSL.l CODE_0085D2
	INC.w $1127
	BRA.b CODE_17B56B

DATA_17B557:
	dw $0008,$0006,$0006,$0004,$0004

DATA_17B561:
	dw $00F0,$00C0,$0150,$00F0,$0100

CODE_17B56B:
	LDX.w $1130
	REP.b #$20
	LDA.w $1110
	CLC
	ADC.w DATA_17B557,x
	STA.w $1110
	CMP.w DATA_17B561,x
	BCC.b CODE_17B58E
	LDA.w DATA_17B561,x
	STA.w $1110
	INC.w $1127
	INC.w $1130
	INC.w $1130
CODE_17B58E:
	JSR.w CODE_17B620
	SEP.b #$20
	RTS

CODE_17B594:
	LDX.w $1130
	REP.b #$20
	LDA.w $1110
	SEC
	SBC.w DATA_17B557,x
	STA.w $1110
	CMP.w DATA_17B561,x
	BCS.b CODE_17B5B3
	INC.w $1127
	INC.w $1130
	INC.w $1130
	BRA.b CODE_17B5B6

CODE_17B5B3:
	JSR.w CODE_17B620
CODE_17B5B6:
	SEP.b #$20
	RTS

CODE_17B5B9:
	REP.b #$20
	LDA.w #$0100
	STA.w $1110
	JSR.w CODE_17B620
	SEP.b #$20
	JSR.w CODE_17B645
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.b #$80
	STA.w !RAM_YI_Map_LevelClearFlags,y
	PHY
	TYA
	INC
	SEC
	SBC.w DATA_17E187,x
	STA.w $030F,y
	PLA
	SEC
	SBC.w DATA_17E187,x
	STA.w $1112
	ASL
	TAX
	LSR
	STA.w $1123
	REP.b #$20
	LDA.w DATA_17E257,x
	STA.w $1109
	SEP.b #$20
	INC.w $1127
	RTS

CODE_17B5FC:
	INC.w $1127
	STZ.w $1128
	STZ.w $1128
	STZ.w $1127
	REP.b #$20
	STZ.w $0990
	STZ.w $0992
	STZ.w $0994
	SEP.b #$20
	RTS

CODE_17B616:
	STZ.w $1110
	STZ.w $1111
	STZ.w $1127
	RTS

CODE_17B620:
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
CODE_17B623:
	LDA.l DATA_17DBAF,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	TXA
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1110
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSL.l CODE_17D0C9
	RTS

CODE_17B645:
	REP.b #$20
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	ASL
	TAX
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	SEC
	SBC.w DATA_17E198,y
	STA.b $10
	ASL
	TAY
	LDA.w #$1400
	ORA.w DATA_17DC27,y
	STA.b $00
CODE_17B662:
	LDA.w DATA_17DCEF,y
	LDY.w $1106
	BNE.b CODE_17B66E
	CLC
	ADC.w #$0380
CODE_17B66E:
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSL.l CODE_17DC23
	JSL.l CODE_17E642
	SEP.b #$20
	RTS

CODE_17B687:
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAY
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	SEC
	SBC.w DATA_17E187,y
CODE_17B693:
	ASL
	TAX
	LDA.w DATA_17E257,x
	STA.b $00
	STZ.b $01
	LDA.w DATA_17E257+$01,x
	STA.b $02
	STZ.b $03
	REP.b #$30
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.l DATA_17E198,x
	CLC
	ADC.w #$0008
	STA.b $10
	LDX.w $6092
	LDA.b $00
	SEC
	SBC.w #$0010
	STA.w $6000,x
	STA.w $6010,x
	CLC
	ADC.w #$0010
	STA.w $6008,x
	STA.w $6018,x
	LDA.b $02
	SEC
	SBC.w #$0016
	STA.w $6002,x
	STA.w $600A,x
	CLC
	ADC.w #$0010
	STA.w $6012,x
	STA.w $601A,x
	LDA.w $1121
	BEQ.b CODE_17B706
	STZ.b $00
	LDY.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	CMP.w #$001E
	BCS.b CODE_17B702
	CPY.b $10
	BNE.b CODE_17B6FD
	TAY
	BEQ.b CODE_17B702
CODE_17B6FD:
	LDA.w #$0200
	STA.b $00
CODE_17B702:
	LDA.b $00
	BRA.b CODE_17B720

CODE_17B706:
	LDA.w $1148
	BEQ.b CODE_17B71D
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w $114C
	ASL
	TAY
	LDA.w DATA_17DC4F,y
	LSR
	SEC
	SBC.w #$0600
	BRA.b CODE_17B720

CODE_17B71D:
	LDA.w #$0400
CODE_17B720:
	ORA.w #$31CC
	PHA
	STA.w $6004,x
	INC
	INC
	STA.w $600C,x
	PLA
	CLC
	ADC.w #$0020
	STA.w $6014,x
	INC
	INC
	STA.w $601C,x
	LDA.w #$4002
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $601E,x
	TXA
	CLC
	ADC.w #$0020
	STA.w $6092
	SEP.b #$30
	RTS

CODE_17B753:
	LDA.w $1131
	BEQ.b CODE_17B76F
	ASL
	CLC
	ADC.b #$06
	TAX
	CMP.b #$10
	BCS.b CODE_17B76F
	JSL.l CODE_17D87D
	LDA.w $1118
	BEQ.b CODE_17B77D
	INC.w $1131
	BRA.b CODE_17B77D

CODE_17B76F:
	LDA.b #!Define_YI_GameMode22
	STA.w !RAM_YI_Global_CurrentGameMode
	STZ.w $1131
	LDA.b #$32
	STA.l $7E5C19
CODE_17B77D:
	STZ.w $1118
	RTS

DATA_17B781:
	dw $0038,$0000,$0000,$0000,$0070,$0076,$0000,$0000
	dw $00A6,$0000,$0000,$0000,$00E0,$00EE,$0000,$0000
	dw $0100,$0106,$0000,$0000,$0146,$0000,$0000,$0000
	dw $0180,$0190,$0198,$0000,$0000,$0000,$0000,$0000
	dw $003C,$0000,$0000,$0000,$0076,$0000,$0000,$0000
	dw $00A8,$00AE,$0000,$0000,$00E0,$00EE,$0000,$0000
	dw $012E,$0000,$0000,$0000,$0166,$0000,$0000,$0000
	dw $019E,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0038,$004E,$0000,$0000,$0078,$007E,$0000,$0000
	dw $00A4,$00A6,$0000,$0000,$00E8,$00F6,$0000,$0000
	dw $0128,$0136,$0000,$0000,$0176,$0000,$0000,$0000
	dw $01A8,$01AE,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0050,$0000,$0000,$0000,$007E,$0000,$0000,$0000
	dw $00A6,$0000,$0000,$0000,$00F6,$0000,$0000,$0000
	dw $0130,$0136,$0000,$0000,$0170,$0000,$0000,$0000
	dw $01A8,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $003E,$0000,$0000,$0000,$0070,$007E,$0000,$0000
	dw $00AE,$0000,$0000,$0000,$00F6,$0000,$0000,$0000
	dw $0128,$0136,$0000,$0000,$016E,$0000,$0000,$0000
	dw $01A6,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0040,$0046,$0000,$0000,$0076,$0000,$0000,$0000
	dw $00A6,$0000,$0000,$0000,$00F6,$0000,$0000,$0000
	dw $0128,$012E,$0000,$0000,$015E,$0000,$0000,$0000
	dw $0196,$0196,$0000,$0000,$0000,$0000,$0000,$0000

DATA_17B901:
	dw $0078,$0000,$0000,$0000,$00A0,$00A0,$0000,$0000
	dw $00A4,$0000,$0000,$0000,$00A4,$0090,$0000,$0000
	dw $0084,$0070,$0000,$0000,$0088,$0000,$0000,$0000
	dw $0088,$0088,$008C,$0000,$0000,$0000,$0000,$0000
	dw $0090,$0000,$0000,$0000,$0098,$0000,$0000,$0000
	dw $009C,$008C,$0000,$0000,$008C,$0098,$0000,$0000
	dw $0098,$0000,$0000,$0000,$0088,$0000,$0000,$0000
	dw $0084,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $00A0,$0090,$0000,$0000,$0094,$0080,$0000,$0000
	dw $0098,$00A0,$0000,$0000,$00AE,$00A0,$0000,$0000
	dw $0098,$0080,$0000,$0000,$00A4,$0000,$0000,$0000
	dw $00A0,$008E,$0000,$0000,$0000,$0000,$0000,$0000
	dw $00A0,$0000,$0000,$0000,$0088,$0000,$0000,$0000
	dw $00AE,$0000,$0000,$0000,$00A0,$0000,$0000,$0000
	dw $009E,$00A2,$0000,$0000,$0098,$0000,$0000,$0000
	dw $008A,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0078,$0000,$0000,$0000,$0090,$0088,$0000,$0000
	dw $007C,$0000,$0000,$0000,$0070,$0000,$0000,$0000
	dw $0088,$0088,$0000,$0000,$0080,$0000,$0000,$0000
	dw $0078,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $00A4,$00A0,$0000,$0000,$0090,$0000,$0000,$0000
	dw $0090,$0000,$0000,$0000,$0098,$0000,$0000,$0000
	dw $0094,$0098,$0000,$0000,$0088,$0000,$0000,$0000
	dw $009C,$00A4,$0000,$0000,$0000,$0000,$0000,$0000

DATA_17BA81:
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0080,$0080
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$8080,$0080,$0080
	dw $8080,$0080,$0080,$0080,$0000,$0000,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0080,$0080
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$8080,$0080,$0080
	dw $8080,$0080,$0080,$0080,$0000,$0000,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0080,$0080
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$8080,$0080,$0080
	dw $8080,$0080,$0080,$0080,$0000,$0000,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0080,$0080
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$8080,$0080,$0080
	dw $8080,$0080,$0080,$0080,$0000,$0000,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0080,$0080
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$8080,$0080,$0080
	dw $8080,$0080,$0080,$0080,$0000,$0000,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0080,$0080
	dw $0080,$0080,$0080,$0000,$0080,$0080,$0000,$0000
	dw $0080,$0080,$0080,$0000,$0080,$8080,$0080,$0080
	dw $8080,$0080,$0080,$0080,$0000,$0000,$0000,$0000

CODE_17BC01:
	LDA.b $95
	ASL
	TAX
	JMP.w (DATA_17BC10,x)

CODE_17BC08:
	INC.w $1131
	INC.b $89
	INC.b $89
	RTS

DATA_17BC10:
	dw CODE_17BC18
	dw CODE_17BD13
	dw CODE_17BD42
	dw CODE_17BD9A

CODE_17BC18:
	LDY.b $91
	LDA.w DATA_17B781,y
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w DATA_17B901,y
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.b $76
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b $72
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w DATA_17BA81,y
	AND.w #$7FFF
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	PHY
	SEP.b #$10
	LDX.b #FXCODE_09907C>>16
	LDA.w #FXCODE_09907C
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	PLY
	LDX.w #$0000
	LDA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BPL.b CODE_17BC51
	DEX
CODE_17BC51:
	CLC
	ADC.w $0075
	STA.b $00
	TXA
	ADC.w $0077
	STA.b $02
	LDX.w #$0000
	LDA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BPL.b CODE_17BC66
	DEX
CODE_17BC66:
	CLC
	ADC.w $0071
	STA.b $04
	TXA
	ADC.w $0073
	STA.b $06
	LDX.w #$0000
	LDA.b $01
	SEC
	SBC.w DATA_17B781,y
	BCC.b CODE_17BC95
	EOR.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BMI.b CODE_17BC95
	LDA.w DATA_17B781,y
	XBA
	STA.b $08
	AND.w #$FF00
	STA.b $00
	LDA.b $08
	AND.w #$00FF
	STA.b $02
	INX
CODE_17BC95:
	LDA.b $00
	STA.w $0075
	LDA.b $02
	STA.w $0077
	LDA.b $05
	SEC
	SBC.w DATA_17B901,y
	BCC.b CODE_17BCBF
	EOR.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	BMI.b CODE_17BCBF
	LDA.w DATA_17B901,y
	XBA
	STA.b $08
	AND.w #$FF00
	STA.b $04
	LDA.b $08
	AND.w #$00FF
	STA.b $06
	INX
CODE_17BCBF:
	LDA.b $04
	STA.w $0071
	LDA.b $06
	STA.w $0073
	CPX.w #$0002
	BNE.b CODE_17BCEF
	INY
	INY
	STY.b $91
	TYA
	AND.w #$0007
	BEQ.b CODE_17BCE0
	LDA.w DATA_17B781,y
	ORA.w DATA_17B901,y
	BNE.b CODE_17BCEF
CODE_17BCE0:
	LDA.w #$0001
	STA.b $95
	LDA.w #$0002
	STA.b $97
	LDA.w #$0008
	STA.b $99
CODE_17BCEF:
	LDA.b $76
CODE_17BCF1:
	LDX.w #$0000
	SEC
	SBC.w #$0074
	BMI.b CODE_17BD03
	TAX
	CMP.w #$0100
	BCC.b CODE_17BD03
	LDX.w #$0100
CODE_17BD03:
	TXA
	STA.b $69
	STA.b $6D
	STA.b $79
	STA.b !RAM_YI_Global_Layer3XPosLo
	RTS

DATA_17BD0D:
	dw $0008,$0008,$0000

CODE_17BD13:
	DEC.b $99
	BNE.b CODE_17BD41
	INC.b $9B
	LDA.b $9B
	ASL
	TAY
	LDA.w DATA_17BD0D,y
	STA.b $99
	BNE.b CODE_17BD41
	LDA.b $72
	STA.b $A3
	LDA.b $76
	STA.b $AB
	STZ.b $9D
	LDA.w #$FFFC
	STA.b $9F
	LDA.w #$E000
	STA.b $A5
	STZ.b $A7
	INC.b $95
	LDA.w #$0003
	STA.b $97
CODE_17BD41:
	RTS

CODE_17BD42:
	LDA.b $A5
	CLC
	ADC.b $A9
	STA.b $A9
	LDA.b $AB
	ADC.b $A7
	STA.b $AB
	LDA.b $9D
	CLC
	ADC.w #$4000
	STA.b $9D
	LDA.b $9F
	ADC.w #$0000
	STA.b $9F
	LDA.b $9D
	CLC
	ADC.b $A1
	STA.b $A1
	LDA.b $A3
	ADC.b $9F
	STA.b $A3
	LDA.b $A3
	CMP.b $AD
	BCC.b CODE_17BD95
	LDY.b $72
	LDX.b $76
	LDA.b $AD
	STA.b $72
	LDA.b $AF
	STA.b $76
	STY.b $AD
	STX.b $AF
	LDA.w #$0004
	STA.b $97
	STZ.b $9B
	LDA.w #$0010
	STA.b $99
	INC.b $95
	JSR.w CODE_17B39E
	JMP.w CODE_17BCEF

CODE_17BD95:
	LDA.b $AB
	JMP.w CODE_17BCF1

CODE_17BD9A:
	DEC.b $99
	BNE.b CODE_17BDAD
	STZ.b $9B
	LDA.w #$0005
	STA.b $97
	LDA.w #$0008
	STA.b $99
	JMP.w CODE_17BC08

CODE_17BDAD:
	RTS

DATA_17BDAE:
	dw $0030,$0058,$0098,$00C8,$0110,$0128,$0168,$01B8
	dw $0030,$0060,$0098,$00D0,$0110,$0150,$0188,$01C0
	dw $0030,$0070,$00A0,$00C8,$0118,$0158,$0198,$01D0
	dw $0030,$0070,$00A0,$00C8,$0118,$0158,$0190,$01C8
	dw $0030,$0060,$00A0,$00D0,$0118,$0158,$0190,$01C8
	dw $0030,$0068,$0098,$00C8,$0118,$0150,$0180,$01B8

DATA_17BE0E:
	dw $009C,$007C,$00A4,$00A8,$0094,$0074,$008C,$0090
	dw $00A4,$0094,$009C,$0090,$009C,$009C,$008C,$008C
	dw $00AC,$0094,$0084,$00A4,$00A4,$0084,$00AC,$0090
	dw $009C,$00A4,$008C,$00B0,$00A4,$00A4,$009C,$008C
	dw $00AC,$007C,$008C,$0080,$0074,$008C,$0084,$007C
	dw $00AC,$00A4,$0094,$0094,$009C,$009C,$008C,$00A8

DATA_17BE6E:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0000,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0000,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0000,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0000,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0000,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0000,$0001

DATA_17BECE:
	dw $0002,$FFFE

DATA_17BED2:
	dw $3D60,$3F66,$3960,$3F60,$3966,$3D66,$3B66,$3B60

DATA_17BEE2:
	dw $3D60,$3F66,$3960,$3F60,$3966,$3D66,$3B66,$3D60

DATA_17BEF2:
	dw $0000,$0004,$0002,$0004

DATA_17BEFA:
	dw $390F,$391F,$392F,$393F,$393B,$393C,$393D,$393E

DATA_17BF0A:
	dw $0000,$0001,$0002,$0001

DATA_17BF12:
	dw $2900,$2903,$2906,$2903

DATA_17BF1A:
	dw $2D4A,$2D4C,$2D4A,$2D4C

CODE_17BF22:
	REP.b #$30
	LDA.w $1125
	ASL
	ASL
	ORA.w $112E
	ASL
	STA.b $89
	TAY
	LDX.w #$0000
	LDA.w DATA_17BE0E,y
	SEC
	SBC.w #$0004
	STA.b $72
	LDA.w DATA_17BDAE,y
	SEC
	SBC.w #$0008
	STA.b $76
	SEC
	SBC.w #$0074
	BMI.b CODE_17BF54
	TAX
	CMP.w #$0100
	BCC.b CODE_17BF54
	LDX.w #$0100
CODE_17BF54:
	STX.b $79
	LDA.w #$0000
	CPX.b $6D
	BCS.b CODE_17BF5F
	INC
	INC
CODE_17BF5F:
	STA.b $7B
	STZ.b $97
CODE_17BF63:
	REP.b #$30
	LDA.b $6D
	CMP.b $79
	BEQ.b CODE_17BF7C
	LDX.b $7B
	LDA.b $6D
	CLC
	ADC.w DATA_17BECE,x
	AND.w #$FFFE
	STA.b $69
	STA.b $6D
	STA.b !RAM_YI_Global_Layer3XPosLo
CODE_17BF7C:
	JSL.l CODE_17E309
	LDA.b $97
	ASL
	TAX
	JMP.w (DATA_17BF87,x)

DATA_17BF87:
	dw CODE_17BF93
	dw CODE_17C0E7
	dw CODE_17C27C
	dw CODE_17C339
	dw CODE_17C3EB
	dw CODE_17C475

CODE_17BF93:
	DEC.b $7D
	BNE.b CODE_17BFA4
	LDA.w #$0009
	STA.b $7D
	LDA.b $81
	INC
	AND.w #$0003
	STA.b $81
CODE_17BFA4:
	LDX.w $6092
	LDA.b $76
	SEC
	SBC.b $6D
	STA.w $6000,x
	STA.w $6010,x
	CLC
	ADC.w #$0008
	STA.w $6008,x
	CLC
	ADC.w #$0008
	STA.w $6020,x
	CLC
	ADC.w #$0004
	STA.w $6018,x
	LDA.b $72
	SEC
	SBC.b $6F
	STA.w $600A,x
	CLC
	ADC.w #$0001
	STA.w $6002,x
	CLC
	ADC.w #$0003
	CLC
	ADC.w #$0002
	STA.w $6022,x
	CLC
	ADC.w #$0002
	STA.w $6012,x
	CLC
	ADC.w #$0001
	STA.w $601A,x
	LDA.b $81
	ASL
	TAY
	LDA.w DATA_17BF12,y
	STA.b $02
	INC
	STA.w $600C,x
	LDA.b $02
	ORA.w #$0010
	STA.w $6014,x
	LDA.w DATA_17BF1A,y
	STA.w $6004,x
	LDA.w !RAM_YI_Map_RunningYoshiIndex
	ASL
	TAY
	LDA.w DATA_17BEFA,y
	STA.w $601C,x
	LDA.w #$3D6E
	STA.w $6024,x
	LDA.w #$0400
	STA.w $601E,x
	INC
	INC
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $6026,x
	LDA.b $30
	AND.w #$0018
	LSR
	LSR
	TAY
	LDA.w DATA_17BEF2,y
	STA.b $04
	LDA.w DATA_17BF0A,y
	STA.b $06
	TXA
	CLC
	ADC.w #$0028
	TAX
	LDA.w $1125
	ASL
	ASL
	ASL
	TAY
	STA.b $0E
	STZ.b $02
CODE_17C052:
	LDA.b $02
	CMP.w !RAM_YI_Map_RunningYoshiIndex
	BNE.b CODE_17C05C
	JMP.w CODE_17C0CF

CODE_17C05C:
	LDA.w DATA_17BDAE,y
	SEC
	SBC.b $6D
	SEC
	SBC.w #$0008
	STA.w $6000,x
	CLC
	ADC.w #$0005
	STA.w $6010,x
	CLC
	ADC.w #$0004
	STA.w $6008,x
	LDA.w DATA_17BE0E,y
	SEC
	SBC.b $6F
	CLC
	ADC.w #$0004
	STA.w $6002,x
	SEC
	SBC.b $06
	SEC
	SBC.w #$000D
	STA.w $6012,x
	CLC
	ADC.w #$0003
	STA.w $600A,x
	LDA.b $02
	ASL
	TAY
	LDA.w DATA_17BEFA,y
	STA.w $600C,x
	LDA.w #$3B6E
	STA.w $6014,x
	LDA.w !RAM_YI_Level_CurrentWorldLo
	CMP.w #!Define_YI_WorldID_World6
	BNE.b CODE_17C0B2
	LDA.w DATA_17BEE2,y
	BRA.b CODE_17C0B5

CODE_17C0B2:
	LDA.w DATA_17BED2,y
CODE_17C0B5:
	CLC
	ADC.b $04
	STA.w $6004,x
	LDA.w #$0000
	STA.w $600E,x
	INC
	INC
	STA.w $6006,x
	STA.w $6016,x
	TXA
	CLC
	ADC.w #$0018
	TAX
CODE_17C0CF:
	LDY.b $0E
	INY
	INY
	STY.b $0E
	INC.b $02
	LDA.b $02
	CMP.w #$0008
	BEQ.b CODE_17C0E1
	JMP.w CODE_17C052

CODE_17C0E1:
	STX.w $6092
	SEP.b #$30
	RTS

CODE_17C0E7:
	DEC.b $7D
	BNE.b CODE_17C0F8
	LDA.w #$0009
	STA.b $7D
	LDA.b $81
	INC
	AND.w #$0003
	STA.b $81
CODE_17C0F8:
	LDX.w $6092
	LDA.b $76
	SEC
	SBC.b $6D
	STA.w $6000,x
	STA.w $6010,x
	CLC
	ADC.w #$0008
	STA.w $6008,x
	LDA.b $72
	SEC
	SBC.b $6F
	STA.w $600A,x
	CLC
	ADC.w #$0001
	STA.w $6002,x
	CLC
	ADC.w #$0007
	STA.w $6012,x
	LDA.b $81
	ASL
	TAY
	LDA.w DATA_17BF12,y
	STA.b $02
	INC
	STA.w $600C,x
	LDA.b $02
	ORA.w #$0010
	STA.w $6014,x
	LDA.w DATA_17BF1A,y
	STA.w $6004,x
	LDA.w #$0402
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	LDA.b $AF
	SEC
	SBC.b $6D
	STA.w $6018,x
	CLC
	ADC.w #$0008
	STA.w $6020,x
	LDA.b $AD
	SEC
	SBC.b $6F
	STA.w $601A,x
	CLC
	ADC.w #$0008
	STA.w $6022,x
	LDA.w #$6B01
	STA.w $601C,x
	LDA.w #$6B10
	STA.w $6024,x
	LDA.w #$0402
	STA.w $601E,x
	STA.w $6026,x
	TXA
	CLC
	ADC.w #$0028
	TAX
CODE_17C183:
	LDA.b $30
	AND.w #$0018
	LSR
	LSR
	TAY
	LDA.w DATA_17BEF2,y
	STA.b $04
	LDA.w DATA_17BF0A,y
	STA.b $06
	LDA.w $1125
	ASL
	ASL
	ASL
	TAY
	STY.b $0E
	STZ.b $02
CODE_17C1A0:
	LDA.w DATA_17BDAE,y
	SEC
	SBC.b $6D
	STA.b $08
	LDA.w DATA_17BE0E,y
	SEC
	SBC.b $6F
	STA.b $0A
	LDA.b $B1
	CMP.b $02
	BEQ.b CODE_17C1BB
	INC
	CMP.b $02
	BNE.b CODE_17C1FD
CODE_17C1BB:
	ASL
	TAY
	LDA.w DATA_17BEFA,y
	STA.w $6004,x
	LDA.w #$3B6E
	STA.w $600C,x
	LDA.b $08
	CLC
	ADC.w #$0008
	STA.w $6008,x
	CLC
	ADC.w #$0004
	STA.w $6000,x
	LDA.b $0A
	CLC
	ADC.w #$0002
	STA.w $600A,x
	CLC
	ADC.w #$0003
	STA.w $6002,x
	LDA.w #$0000
	STA.w $6006,x
	INC
	INC
	STA.w $600E,x
	TXA
	CLC
	ADC.w #$0010
	TAX
	JMP.w CODE_17C25B

CODE_17C1FD:
	LDA.b $08
	SEC
	SBC.w #$0008
	STA.w $6000,x
	CLC
	ADC.w #$0005
	STA.w $6010,x
	CLC
	ADC.w #$0004
	STA.w $6008,x
	LDA.b $0A
	CLC
	ADC.w #$0004
	STA.w $6002,x
	SEC
	SBC.b $06
	SEC
	SBC.w #$000E
	STA.w $6012,x
	CLC
	ADC.w #$0003
	STA.w $600A,x
	LDA.b $02
	ASL
	TAY
	LDA.w DATA_17BEFA,y
	STA.w $600C,x
	LDA.w #$3B6E
	STA.w $6014,x
	LDA.w DATA_17BED2,y
	CLC
	ADC.b $04
	STA.w $6004,x
	LDA.w #$0000
	STA.w $600E,x
	INC
	INC
	STA.w $6006,x
	STA.w $6016,x
	TXA
	CLC
	ADC.w #$0018
	TAX
CODE_17C25B:
	LDY.b $0E
	INY
	INY
	STY.b $0E
	INC.b $02
	LDA.b $02
	CMP.w #$0008
	BEQ.b CODE_17C26D
	JMP.w CODE_17C1A0

CODE_17C26D:
	JMP.w CODE_17C0E1

DATA_17C270:
	dw $2930,$2930

DATA_17C274:
	dw $2D4A,$2D4C

DATA_17C278:
	dw $0004,$0008

CODE_17C27C:
	LDX.w $6092
	LDA.b $9B
	ASL
	TAY
	LDA.b $76
	SEC
	SBC.b $6D
	STA.w $6008,x
	STA.w $6018,x
	CLC
	ADC.w #$0002
	STA.w $6000,x
	CLC
	ADC.w #$0006
	STA.w $6010,x
	STA.w $6020,x
	LDA.b $72
	SEC
	SBC.b $6F
	STA.b $00
	STA.w $600A,x
	STA.w $6012,x
	CLC
	ADC.w #$0008
	STA.w $601A,x
	STA.w $6022,x
	LDA.b $00
	CLC
	ADC.w DATA_17C278,y
	STA.w $6002,x
	LDA.w DATA_17C274,y
	STA.w $6004,x
	LDA.w DATA_17C270,y
	STA.b $00
	STA.w $600C,x
	INC
	STA.w $6014,x
	LDA.b $00
	CLC
	ADC.w #$0010
	STA.w $601C,x
	INC
	STA.w $6024,x
	LDA.b $AF
	SEC
	SBC.b $6D
	STA.w $6028,x
	CLC
	ADC.w #$0008
	STA.w $6030,x
	LDA.b $AD
	SEC
	SBC.b $6F
	STA.w $602A,x
	CLC
	ADC.w #$0008
	STA.w $6032,x
	LDA.w #$6B01
	STA.w $602C,x
	LDA.w #$6B10
	STA.w $6034,x
	LDA.w #$0402
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $601E,x
	STA.w $6026,x
	STA.w $602E,x
	STA.w $6036,x
	TXA
	CLC
	ADC.w #$0038
	TAX
	JMP.w CODE_17C183

DATA_17C329:
	dw $2903,$2933

DATA_17C32D:
	dw $2B36,$6B04

DATA_17C331:
	dw $2B46,$6B13

DATA_17C335:
	dw $0000,$0008

CODE_17C339:
	LDX.w $6092
	LDA.b $AB
	SEC
	SBC.b $6D
	STA.w $6000,x
	LDA.b $A3
	SEC
	SBC.b $6F
	STA.w $6002,x
	LDA.w #$2D4A
	STA.w $6004,x
	LDY.w #$0000
	LDA.b $9F
	BPL.b CODE_17C35B
	INY
	INY
CODE_17C35B:
	LDA.b $76
	SEC
	SBC.b $6D
	STA.w $6008,x
	STA.w $6018,x
	CLC
	ADC.w #$0008
	STA.w $6010,x
	STA.w $6020,x
	LDA.b $72
	SEC
	SBC.b $6F
	STA.b $00
	STA.w $600A,x
	STA.w $6012,x
	CLC
	ADC.w #$0008
	STA.w $601A,x
	STA.w $6022,x
	LDA.w DATA_17C329,y
	STA.b $00
	STA.w $600C,x
	INC
	STA.w $6014,x
	LDA.b $00
	CLC
	ADC.w #$0010
	STA.w $601C,x
	INC
	STA.w $6024,x
	LDA.b $AF
	SEC
	SBC.b $6D
	STA.w $6028,x
	CLC
	ADC.w DATA_17C335,y
	STA.w $6030,x
	LDA.b $AD
	SEC
	SBC.b $6F
	STA.w $602A,x
	CLC
	ADC.w #$0008
	STA.w $6032,x
	LDA.w DATA_17C32D,y
	STA.w $602C,x
	LDA.w DATA_17C331,y
	STA.w $6034,x
	LDA.w #$0402
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $601E,x
	STA.w $6026,x
	STA.w $602E,x
	STA.w $6036,x
	TXA
	CLC
	ADC.w #$0038
	TAX
	JMP.w CODE_17C183

CODE_17C3EB:
	LDX.w $6092
	LDA.b $76
	SEC
	SBC.b $6D
	STA.w $6010,x
	CLC
	ADC.w #$0004
	STA.w $6000,x
	CLC
	ADC.w #$0004
	STA.w $6008,x
	LDA.b $72
	SEC
	SBC.b $6F
	STA.w $6002,x
	STA.w $600A,x
	CLC
	ADC.w #$0008
	STA.w $6012,x
	LDA.w #$2904
	STA.w $600C,x
	LDA.w #$2913
	STA.w $6014,x
	LDA.w #$2D4C
	STA.w $6004,x
	LDA.b $AF
	SEC
	SBC.b $6D
	STA.w $6020,x
	CLC
	ADC.w #$0008
	STA.w $6018,x
	LDA.b $AD
	SEC
	SBC.b $6F
	STA.w $601A,x
	CLC
	ADC.w #$0008
	STA.w $6022,x
	LDA.w #$2B04
	STA.w $601C,x
	LDA.w #$2B13
	STA.w $6024,x
	LDA.w #$0402
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $601E,x
	STA.w $6026,x
	TXA
	CLC
	ADC.w #$0028
	TAX
	JMP.w CODE_17C183

DATA_17C46D:
	dw $0007,$0009

DATA_17C471:
	dw $2B38,$2B39

CODE_17C475:
	DEC.b $7D
	BNE.b CODE_17C486
	LDA.w #$0009
	STA.b $7D
	LDA.b $81
	INC
	AND.w #$0003
	STA.b $81
CODE_17C486:
	LDX.w $6092
	LDA.b $76
	SEC
	SBC.b $6D
	STA.w $6000,x
	STA.w $6010,x
	CLC
	ADC.w #$0008
	STA.w $6008,x
	LDA.b $72
	SEC
	SBC.b $6F
	STA.w $600A,x
	CLC
	ADC.w #$0001
	STA.w $6002,x
	CLC
	ADC.w #$0007
	STA.w $6012,x
	LDA.b $81
	ASL
	TAY
	LDA.w DATA_17BF12,y
	STA.b $02
	INC
	STA.w $600C,x
	LDA.b $02
	ORA.w #$0010
	STA.w $6014,x
	LDA.w DATA_17BF1A,y
	STA.w $6004,x
	DEC.b $99
	BNE.b CODE_17C4DC
	LDA.b $9B
	EOR.w #$0002
	STA.b $9B
	LDA.w #$0008
	STA.b $99
CODE_17C4DC:
	LDY.b $9B
	LDA.b $AF
	SEC
	SBC.b $6D
	STA.w $6018,x
	STA.w $6028,x
	SEC
	SBC.w #$0005
	STA.w $6030,x
	CLC
	ADC.w #$000D
	STA.w $6020,x
	LDA.b $AD
	SEC
	SBC.b $6F
	STA.b $00
	INC
	STA.w $601A,x
	STA.w $6022,x
	CLC
	ADC.w #$0007
	STA.w $602A,x
	LDA.b $00
	CLC
	ADC.w DATA_17C46D,y
	STA.w $6032,x
	LDA.w #$6B36
	STA.w $6024,x
	INC
	STA.w $601C,x
	LDA.w #$6B48
	STA.w $602C,x
	LDA.w DATA_17C471,y
	STA.w $6034,x
	LDA.w #$0400
	STA.w $601E,x
	STA.w $6026,x
	STA.w $6036,x
	INC
	INC
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $602E,x
	TXA
	CLC
	ADC.w #$0038
	TAX
	JMP.w CODE_17C183

DATA_17C54E:
	dw $FFFE,$0002,$0004,$FFFC

DATA_17C556:
	dw $0000,$0100,$0100,$0000

DATA_17C55E:
	dw $796C,$396C

CODE_17C562:
	REP.b #$30
	LDA.w #$0004
	STA.b $93
	LDA.b $35
	AND.w #$0010
	LSR
	LSR
	LSR
	TAY
	LDA.b $6D
	CMP.w DATA_17C556,y
	BEQ.b CODE_17C597
	CLC
	ADC.w DATA_17C54E,y
	STA.b $00
	SEC
	SBC.w DATA_17C556,y
	BEQ.b CODE_17C58A
	EOR.w DATA_17C54E,y
	BMI.b CODE_17C58F
CODE_17C58A:
	LDA.w DATA_17C556,y
	STA.b $00
CODE_17C58F:
	LDA.b $00
	STA.b $69
	STA.b $6D
	STA.b !RAM_YI_Global_Layer3XPosLo
CODE_17C597:
	LDX.w $6092
	LDA.w #$00E8
	CPY.w #$0002
	BEQ.b CODE_17C5A5
	LDA.w #$0008
CODE_17C5A5:
	STA.w $6000,x
	LDA.w #$00A8
	STA.w $6002,x
	LDA.w DATA_17C55E,y
	STA.w $6004,x
	LDA.w #$0102
	STA.w $6006,x
	TXA
	CLC
	ADC.w #$0008
	STA.w $6092
	JMP.w CODE_17BF7C

CODE_17C5C5:
	REP.b #$30
	LDA.w #$0000
	LDX.b $6D
	CPX.b $79
	BCC.b CODE_17C5D2
	INC
	INC
CODE_17C5D2:
	ORA.b $93
	TAY
	LDA.b $6D
	CMP.b $79
	BNE.b CODE_17C5DF
	STZ.b $93
	BRA.b CODE_17C5FB

CODE_17C5DF:
	CLC
	ADC.w DATA_17C54E,y
	STA.b $00
	SEC
	SBC.b $79
	BEQ.b CODE_17C5EF
	EOR.w DATA_17C54E,y
	BMI.b CODE_17C5F3
CODE_17C5EF:
	LDA.b $79
	STA.b $00
CODE_17C5F3:
	LDA.b $00
	STA.b $6D
	STA.b $69
	STA.b !RAM_YI_Global_Layer3XPosLo
CODE_17C5FB:
	JMP.w CODE_17BF7C

CODE_17C5FE:
	REP.b #$20
	JSR.w CODE_17C672
	STZ.w $110C
	SEP.b #$20
	JSR.w CODE_17C8B3
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDA.w !RAM_YI_Level_CurrentLevelFromMapLo
	SEC
	SBC.w DATA_17E187,x
	INC
	REP.b #$20
	AND.w #$00FF
	STA.b $00
	JSR.w CODE_17E7FB
	TYA
	AND.w #$000F
	ASL
	TAX
	LDA.w $1115
	AND.w #$00FF
	BEQ.b CODE_17C637
	ASL
	TAX
	LDA.w DATA_17E26F,x
	BRA.b CODE_17C63A

CODE_17C637:
	LDA.w DATA_17E257,x
CODE_17C63A:
	STA.w $1109
	SEP.b #$20
	STY.w $1112
	STZ.w $1117
	STZ.w $1118
	STZ.w $1108
	STZ.w $111A
	STZ.w $111B
	STZ.w $111C
	STZ.w $1128
	STZ.w $1129
	STZ.w $112A
	LDA.b #$01
	STA.w $1106
	INC.w $1118
	STZ.w $1106
	STZ.w $1118
	JSR.w CODE_17D885
	STZ.w $1115
	RTL

CODE_17C672:
	LDX.b #$00
	LDA.w #$19BF
CODE_17C677:
	STA.w $0A06,x
	STA.w $0D86,x
	STA.w $0B06,x
	STA.w $0E86,x
	STA.w $0C06,x
	STA.w $0F86,x
	STA.w $0C86,x
	STA.w $1006,x
	DEX
	DEX
	BNE.b CODE_17C677
	RTS

DATA_17C694:
	db $02,$05,$00,$04,$01,$03,$06,$07,$00,$00,$00,$00,$02,$05,$00,$04
	db $01,$03,$06,$07,$00,$00,$00,$00,$02,$05,$00,$04,$01,$03,$06,$07
	db $00,$00,$00,$00,$02,$05,$00,$04,$01,$03,$06,$07,$00,$00,$00,$00
	db $02,$05,$00,$04,$01,$03,$06,$07,$00,$00,$00,$00,$02,$05,$00,$04
	db $01,$03,$06,$02

DATA_17C6D8:
	dw DATA_5FDF88,DATA_5FDF8E,DATA_5FDF94,DATA_5FDF9A,DATA_5FDFA0,DATA_5FDFA6,DATA_5FDFAC,DATA_5FDFB2
	dw DATA_5FDFB8,DATA_5FDFBE

CODE_17C6EC:
	LDA.b #DATA_5FDF88>>16
	STA.b $02
	STA.b $05
	REP.b #$30
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
CODE_17C6F7:
	LDA.w DATA_17C694,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_17C6D8,y
	STA.b $00
	LDA.w DATA_17C694+$01,x
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_17C6D8,y
	STA.b $03
	LDX.w #$0000
CODE_17C714:
	TXY
	LDA.b [$00],y
	STA.l YI_Global_PaletteMirror[$CD].LowByte,x
	LDA.b [$03],y
	STA.l YI_Global_PaletteMirror[$DD].LowByte,x
	INX
	INX
	CPX.w #$0006
	BCC.b CODE_17C714
	SEP.b #$30
	RTS

CODE_17C72B:
	LDA.b #DATA_5FDF88>>16
	STA.b $02
	STA.b $05
	PHX
	REP.b #$30
	LDA.w $112E
	AND.w #$00FF
	STA.b $00
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17E198,x
	CLC
	ADC.b $00
	TAX
	JSR.w CODE_17C6F7
	PLX
	RTL

CODE_17C74B:
	PHP
	PHB
	PHK
	PLB
	SEP.b #$30
	JSR.w CODE_17C6EC
	PLB
	PLP
	RTL

CODE_17C757:
	STZ.w $1122
	LDA.b #$B7
	STA.w !RAM_YI_Global_ColorMathSelectAndEnable
	LDA.w $114E
	BEQ.b CODE_17C76C
	ASL
	TAX
	JSR.w (DATA_17C88D-$02,x)
	JMP.w CODE_17C80C

CODE_17C76C:
	LDA.w $1118
	CMP.b #$28
	BCC.b CODE_17C77E
	ASL
	TAX
	STA.w $1122
	JSR.w (DATA_17C813-$02,x)
	JMP.w CODE_17C80F

CODE_17C77E:
	LDA.w $0979
	BNE.b CODE_17C795
	LDA.w $111C
	AND.b #$F0
	BNE.b CODE_17C7C5
	LDA.b $36
	AND.b #$0F
	BNE.b CODE_17C7C5
	STZ.w $111C
	BRA.b CODE_17C7C5

CODE_17C795:
	LDA.w $111D
	ASL
	TAX
	JSR.w (DATA_17C887,x)
	LDA.w $1110
	CMP.b #$20
	BCS.b CODE_17C7B8
	LDA.w $1114
	CMP.b #$0C
	BCS.b CODE_17C7B0
	JSR.w CODE_17C9F6
	BRA.b CODE_17C7B8

CODE_17C7B0:
	LDA.b #$80
	STA.w $0986
	INC.w $098E
CODE_17C7B8:
	LDA.w $1110
	ORA.w $1111
	BEQ.b CODE_17C80F
	JSR.w CODE_17E533
	BRA.b CODE_17C80F

CODE_17C7C5:
	LDA.w $1118
	BEQ.b CODE_17C7D1
	ASL
	TAX
	JSR.w (DATA_17C813-$02,x)
	BRA.b CODE_17C80F

CODE_17C7D1:
	LDA.w $1117
	BEQ.b CODE_17C7E3
	LDA.w $110C
	ORA.w $110D
	BNE.b CODE_17C7F9
	JSR.w CODE_17E458
	BRA.b CODE_17C7F6

CODE_17C7E3:
	LDA.w $111B
	BEQ.b CODE_17C7EB
	JSR.w CODE_17E6C5
CODE_17C7EB:
	LDA.w $110C
	ORA.w $110D
	BNE.b CODE_17C7F9
	JSR.w CODE_17E00F
CODE_17C7F6:
	JSR.w CODE_17E1DF
CODE_17C7F9:
	LDA.w $110C
	CMP.b #$2C
	BEQ.b CODE_17C804
	CMP.b #$CC
	BNE.b CODE_17C80C
CODE_17C804:
	LDA.w $111C
	AND.b #$0F
	STA.w $111C
CODE_17C80C:
	JSR.w CODE_17E200
CODE_17C80F:
	JSR.w CODE_17E27B
	RTL

DATA_17C813:
	dw CODE_17CC69
	dw CODE_17CC93
	dw CODE_17CCBA
	dw CODE_17CD0F
	dw CODE_17CD63
	dw CODE_17CD76
	dw CODE_17CD97
	dw CODE_17CDB7
	dw CODE_17CDB7
	dw CODE_17CE2C
	dw CODE_17CDC1
	dw CODE_17CE2C
	dw CODE_17CDCB
	dw CODE_17CE51
	dw CODE_17CE5B
	dw CODE_17CE65
	dw CODE_17CE6F
	dw CODE_17CE79
	dw CODE_17CE83
	dw CODE_17CE8D
	dw CODE_17CE97
	dw CODE_17CEFB
	dw $0000
	dw CODE_17CF18
	dw CODE_17CF2F
	dw CODE_17CF45
	dw CODE_17D135
	dw CODE_17D221
	dw CODE_17D2BB
	dw CODE_17D2D9
	dw CODE_17D5E7
	dw CODE_17CF18
	dw CODE_17CF2F
	dw CODE_17CF45
	dw CODE_17CF5C
	dw CODE_17D600
	dw CODE_17D613
	dw CODE_17D62E
	dw CODE_17D648
	dw CODE_17EB3F
	dw CODE_17EB8B
	dw CODE_17EBA9
	dw CODE_17EBB8
	dw CODE_17EBCB
	dw CODE_17EBEC
	dw CODE_17EC26
	dw CODE_17ECA1
	dw CODE_17ECC2
	dw CODE_17ED02
	dw CODE_17ED37
	dw CODE_17ED3D
	dw CODE_17ED52
	dw CODE_17ED5F
	dw CODE_17ED81
	dw CODE_17ED94
	dw CODE_17EDA3
	dw CODE_17EE28
	dw CODE_17EE47

DATA_17C887:
	dw CODE_17E729
	dw CODE_17E744
	dw CODE_17E7BF

DATA_17C88D:
	dw CODE_17EF54
	dw CODE_17F0CC
	dw CODE_17F0D1
	dw CODE_17F0E1
	dw CODE_17F118
	dw CODE_17F142
	dw CODE_17F1C5
	dw CODE_17F1DF
	dw CODE_17F226
	dw CODE_17F23F
	dw CODE_17F259
	dw CODE_17F0CC
	dw CODE_17F0D1
	dw CODE_17F0E1
	dw CODE_17F266
	dw CODE_17F28A
	dw CODE_17F2DF
	dw CODE_17F3BB
	dw CODE_17F3D0

CODE_17C8B3:
	REP.b #$20
	STZ.b $04
	STZ.b $06
	SEP.b #$20
	LDA.b #DATA_1081E9>>16
	STA.b $12
	LDA.b #$00
	STA.b $0F
CODE_17C8C3:
	REP.b #$20
	LDA.b $04
	ASL
	TAX
	LDA.l DATA_1081DD,x
	STA.b $10
	LDA.w #$0001
	STA.b $02
	SEP.b #$20
CODE_17C8D6:
	LDY.b $06
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	BEQ.b CODE_17C91F
	AND.b #$80
	ORA.b $02
	STA.b $00
	LDY.b #$00
CODE_17C8E5:
	REP.b #$20
	LDA.b [$10],y
	STA.b $0D
	SEP.b #$20
	LDA.b [$0D]
	AND.b #$7F
	CMP.b $02
	BEQ.b CODE_17C915
	INY
	INY
	CPY.b #$10
	BCC.b CODE_17C8E5
	LDY.b #$00
CODE_17C8FD:
	REP.b #$20
	LDA.b [$10],y
	STA.b $0D
	SEP.b #$20
	LDA.b [$0D]
	BEQ.b CODE_17C91B
	CMP.b #$FF
	BEQ.b CODE_17C91F
	INY
	INY
	CPY.b #$10
	BCC.b CODE_17C8FD
	BRA.b CODE_17C91F

CODE_17C915:
	LDA.b [$0D]
	AND.b #$80
	BEQ.b CODE_17C91F
CODE_17C91B:
	LDA.b $00
	STA.b [$0D]
CODE_17C91F:
	INC.b $06
	INC.b $02
	LDA.b $02
	CMP.b #$09
	BCC.b CODE_17C8D6
	INC.b $06
	INC.b $06
	INC.b $06
	INC.b $06
	INC.b $04
	LDA.b $04
	CMP.b #$06
	BCC.b CODE_17C8C3
	RTS

DATA_17C93A:
	dw $030F,$031B,$0327,$0333,$033F,$034B

CODE_17C946:
	REP.b #$30
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17C9EA,x
	STA.b $0E
	STZ.b $08
	LDX.w #$0000
	LDA.w $1106
	AND.w #$00FF
	BEQ.b CODE_17C962
	LDA.w #$0380
	STA.b $08
CODE_17C962:
	LDA.w #DATA_17C9C6
	STA.b $00
	LDA.w #DATA_17C9CC
	STA.b $02
	LDA.w #DATA_17C9D2
	STA.b $04
	LDA.w DATA_17DCEF,x
	CLC
	ADC.b $08
	STA.b $10
	CLC
	ADC.w #$0040
	STA.b $12
	CLC
	ADC.w #$0040
	STA.b $14
	INX
	INX
	CPX.w #$0012
	BCS.b CODE_17C9C3
	CPX.w #$0008
	BEQ.b CODE_17C996
	CPX.w #$0010
	BNE.b CODE_17C9A5
CODE_17C996:
	LDA.w #DATA_17C9D8
	STA.b $00
	LDA.w #DATA_17C9DE
	STA.b $02
	LDA.w #DATA_17C9E4
	STA.b $04
CODE_17C9A5:
	LDY.w #$0000
CODE_17C9A8:
	LDA.b ($00),y
	ORA.b $0E
	STA.b ($10),y
	LDA.b ($02),y
	ORA.b $0E
	STA.b ($12),y
	LDA.b ($04),y
	ORA.b $0E
	STA.b ($14),y
	INY
	INY
	CPY.w #$0006
	BCC.b CODE_17C9A8
	BRA.b CODE_17C962

CODE_17C9C3:
	SEP.b #$30
	RTS

DATA_17C9C6:
	dw $2187,$218F,$6187

DATA_17C9CC:
	dw $2198,$218E,$6198

DATA_17C9D2:
	dw $A187,$A18F,$E187

DATA_17C9D8:
	dw $21F5,$21F5,$21F5

DATA_17C9DE:
	dw $21F7,$21F7,$21F7

DATA_17C9E4:
	dw $21F7,$21F6,$21F7

DATA_17C9EA:
	dw $0C00,$1000,$1400,$0000,$0400,$0800

CODE_17C9F6:
	DEC.w $1113
	BNE.b CODE_17CA07
	LDX.w $1114
	LDA.w DATA_17CAF6,x
	STA.w $1113
	INC.w $1114
CODE_17CA07:
	LDA.w $1114
	CMP.b #$0C
	BCC.b CODE_17CA11
CODE_17CA0E:
	JMP.w CODE_17CAF5

CODE_17CA11:
	CMP.b #$08
	BEQ.b CODE_17CA0E
	ASL
	REP.b #$30
	AND.w #$00FF
	TAX
	LDA.w DATA_17CB01,x
	STA.b $00
	LDY.w $6092
	LDA.w $1109
	AND.w #$00FF
	STA.b $02
	CLC
	ADC.b ($00)
	STA.w $6000,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $6008,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $6010,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $6018,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $6020,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $6028,y
	LDA.w DATA_17CB19,x
	STA.b $00
	LDA.w $110A
	AND.w #$00FF
	SEC
	SBC.w #$0005
	STA.b $02
	CLC
	ADC.b ($00)
	STA.w $6002,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $600A,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $6012,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $601A,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $6022,y
	INC.b $00
	INC.b $00
	LDA.b $02
	CLC
	ADC.b ($00)
	STA.w $602A,y
	LDA.w DATA_17CB31,x
	STA.w $6004,y
	STA.w $600C,y
	STA.w $6014,y
	STA.w $601C,y
	STA.w $6024,y
	STA.w $602C,y
	LDA.w DATA_17CB49,x
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	STA.w $6026,y
	STA.w $602E,y
	TYA
	CLC
	ADC.w #$0030
	STA.w $6092
	SEP.b #$30
CODE_17CAF5:
	RTS

DATA_17CAF6:
	db $01,$02,$02,$03,$02,$03,$04,$08,$04,$04,$04

DATA_17CB01:
	dw DATA_17CB61,DATA_17CB6D,DATA_17CB79,DATA_17CB85,DATA_17CB91,DATA_17CB9D,DATA_17CBA9,DATA_17CBB5
	dw $0000,DATA_17CBC1,DATA_17CBCD,DATA_17CBD9

DATA_17CB19:
	dw DATA_17CBE5,DATA_17CBF1,DATA_17CBFD,DATA_17CC09,DATA_17CC15,DATA_17CC21,DATA_17CC2D,DATA_17CC39
	dw $0000,DATA_17CC45,DATA_17CC51,DATA_17CC5D

DATA_17CB31:
	dw $37C4,$31C5,$35C6,$33C8,$33C8,$35C6,$31C5,$37C4
	dw $0000,$31D4,$31D5,$71D4

DATA_17CB49:
	dw $0000,$0000,$0002,$0002,$0002,$0002,$0000,$0000
	dw $0000,$0000,$0000,$0000

DATA_17CB61:
	dw $0000,$0000,$FFFC,$FFF8,$FFF8,$FFFC

DATA_17CB6D:
	dw $0004,$0004,$FFFC,$FFF4,$FFF4,$FFFC

DATA_17CB79:
	dw $FFF8,$FFF8,$FFED,$FFED,$0003,$0003

DATA_17CB85:
	dw $FFF8,$FFF8,$0006,$0006,$FFEA,$FFEA

DATA_17CB91:
	dw $FFE3,$FFE3,$000D,$000D,$FFF8,$FFF8

DATA_17CB9D:
	dw $FFF8,$FFF8,$000D,$000D,$FFE3,$FFE3

DATA_17CBA9:
	dw $FFE7,$FFFC,$0011,$0011,$FFFC,$FFE7

DATA_17CBB5:
	dw $FFFC,$0011,$0011,$FFFC,$FFE7,$FFE7

DATA_17CBC1:
	dw $FFFC,$0011,$FFE7,$FFE7,$0011,$FFFC

DATA_17CBCD:
	dw $FFE7,$FFE7,$FFFC,$0011,$0011,$FFFC

DATA_17CBD9:
	dw $FFFC,$0011,$FFE7,$FFE7,$0011,$FFFC

DATA_17CBE5:
	dw $FFFA,$FFFE,$0000,$FFFE,$FFFA,$FFF8

DATA_17CBF1:
	dw $FFF8,$0000,$0004,$0000,$FFF8,$FFF4

DATA_17CBFD:
	dw $0003,$FFED,$FFFE,$FFF2,$FFFE,$FFF2

DATA_17CC09:
	dw $FFE7,$0009,$0001,$FFEF,$FFEF,$0001

DATA_17CC15:
	dw $0005,$FFEB,$FFEB,$0005,$0010,$FFE0

DATA_17CC21:
	dw $0010,$FFE0,$FFEB,$0005,$0005,$FFEB

DATA_17CC2D:
	dw $0009,$0014,$0009,$FFEF,$FFE4,$FFEF

DATA_17CC39:
	dw $FFE4,$FFEF,$0009,$0014,$0009,$FFEF

DATA_17CC45:
	dw $0014,$0009,$0009,$FFEF,$FFEF,$FFE4

DATA_17CC51:
	dw $FFEF,$0009,$0014,$0009,$FFEF,$FFE4

DATA_17CC5D:
	dw $0014,$0009,$0009,$FFEF,$FFEF,$FFE4

CODE_17CC69:
	JSR.w CODE_17D885
	INC.w $1118
CODE_17CC6F:
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17CC8F,y
	TAX
	LDY.w #$1E20
	LDA.w #$0380
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

DATA_17CC8F:
	dw $0D86,$0A06

CODE_17CC93:
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDX.w #$705800
	LDA.w #$705800>>16
	STA.b $01
	LDA.w DATA_17CCB6,y
	TAY
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$30
	INC.w $1118
	RTS

DATA_17CCB6:
	dw $2800,$2000

CODE_17CCBA:
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDX.w #$706000
	LDA.w #$706000>>16
	STA.b $01
	LDA.w DATA_17CCF1,y
	TAY
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$10
	LDA.w #$FF00
	STA.l $7E55C0
	STA.w $1144
	STZ.w $1107
	SEP.b #$20
	LDA.b #$01
	STA.w !RAM_YI_Global_MainScreenWindowMask
	INC.w $1118
	RTS

DATA_17CCF1:
	dw $2C00,$2400

CODE_17CCF5:
	PHB
	LDY.b #$7E55C0>>16
	PHY
	PLB
	LDY.b #$00
	LDA.w #$00FF
CODE_17CCFF:
	STA.w $7E55C0,y
	STA.w $7E5620,y
	DEY
	DEY
	BNE.b CODE_17CCFF
	PLB
	RTS

CODE_17CD0B:
	JSR.w CODE_17CCF5
	RTL

CODE_17CD0F:
	JSR.w CODE_17E7BF
CODE_17CD12:
	REP.b #$30
	LDA.w $1107
	AND.w #$00FF
	ASL
	ASL
	TAX
	LDA.w #$EF10
	LDY.w #$0000
CODE_17CD23:
	STA.l $7E55C4,x
	INX
	INX
	INX
	INX
	INY
	CPY.w #$0004
	BCC.b CODE_17CD23
	SEP.b #$30
	LDA.w $1107
	CLC
	ADC.b #$04
	STA.w $1107
	CMP.b #$54
	BCC.b CODE_17CD62
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17CC8F,y
	TAX
	LDY.w #$1C20
	LDA.w #$0380
	JSL.l CODE_00BEA6
	SEP.b #$30
	INC.w $1118
CODE_17CD62:
	RTS

CODE_17CD63:
	REP.b #$20
	JSR.w CODE_17CCF5
	SEP.b #$20
	LDA.b #$17
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w !RAM_YI_Global_ColorMathInitialSettings
	INC.w $1118
	RTS

CODE_17CD76:
	INC.w $1142
	INC.w $0990
	INC.w $0992
	INC.w $0994
	LDA.w $0994
	CMP.b #$1F
	BCC.b CODE_17CD96
	INC.w $1118
	REP.b #$20
	LDA.w !RAM_YI_Level_CurrentWorldLo
	STA.w $1125
	SEP.b #$20
CODE_17CD96:
	RTS

CODE_17CD97:
	JSL.l CODE_0394B8
	JSL.l CODE_008259
	REP.b #$30
	STZ.w !RAM_YI_Map_RunningYoshiIndex
	JSL.l CODE_17A86D
	REP.b #$30
	JSL.l CODE_00BB47
	SEP.b #$30
	JSR.w CODE_17C6EC
	INC.w $1118
	RTS

CODE_17CDB7:
	REP.b #$30
	LDA.w #$0000
	LDX.w #$0000
	BRA.b CODE_17CDCF

CODE_17CDC1:
	REP.b #$30
	LDA.w #$0800
	LDX.w #$0001
	BRA.b CODE_17CDCF

CODE_17CDCB:
	INC.w $1118
	RTS

CODE_17CDCF:
	STA.b $0E
	STX.b $00
	LDA.w !RAM_YI_Level_CurrentWorldLo
	CLC
	ADC.b $00
	TAX
	LDA.l DATA_00B3F4,x
	AND.w #$00FF
	STA.b $0C
	ASL
	ADC.b $0C
	TAX
	LDA.l DATA_06F95E,x
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.l DATA_06F95E+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R4_LMULTResultLo
	LDA.w #$5800
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	SEP.b #$10
	LDX.b #FXCODE_08A980>>16
	LDA.w #FXCODE_08A980
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSR.w CODE_17CE11
	SEP.b #$30
	RTS

CODE_17CE11:
	LDX.w #$705800
	LDA.w #$705800>>16
	STA.b $01
	LDY.b $0E
	LDA.w #$0800
	JSL.l CODE_00BEA6
	INC.w $1118
	RTS

DATA_17CE26:
	dw $0400,$0C00,$1800

CODE_17CE2C:
	LDA.w $1118
	SEC
	SBC.b #$09
	REP.b #$30
	AND.w #$00FF
	TAY
	LDX.w #$706000
	LDA.w #$706000>>16
	STA.b $01
	LDA.w DATA_17CE26-$01,y
	TAY
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$30
	INC.w $1118
	RTS

CODE_17CE51:
	REP.b #$30
	LDX.w #$4000
	LDY.w #$0000
	BRA.b CODE_17CE9F

CODE_17CE5B:
	REP.b #$30
	LDX.w #$4400
	LDY.w #$0001
	BRA.b CODE_17CE9F

CODE_17CE65:
	REP.b #$30
	LDX.w #$4800
	LDY.w #$0002
	BRA.b CODE_17CE9F

CODE_17CE6F:
	REP.b #$30
	LDX.w #$4C00
	LDY.w #$0003
	BRA.b CODE_17CE9F

CODE_17CE79:
	REP.b #$30
	LDX.w #$5000
	LDY.w #$0004
	BRA.b CODE_17CE9F

CODE_17CE83:
	REP.b #$30
	LDX.w #$5400
	LDY.w #$0005
	BRA.b CODE_17CE9F

CODE_17CE8D:
	REP.b #$30
	LDX.w #$5800
	LDY.w #$0006
	BRA.b CODE_17CE9F

CODE_17CE97:
	REP.b #$30
	LDX.w #$5C00
	LDY.w #$0007
CODE_17CE9F:
	STX.b $0E
	STY.b $00
	LDA.w !RAM_YI_Level_CurrentWorldLo
	ASL
	ASL
	ADC.b $00
	TAX
	LDA.l DATA_00B409,x
	AND.w #$00FF
	STA.b $0C
	ASL
	ADC.b $0C
	TAX
	LDA.w #$0020
	JSR.w CODE_17CEC1
	SEP.b #$30
	RTS

CODE_17CEC1:
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.l DATA_06FC79,x
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.l DATA_06FC79+$02,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	SEP.b #$10
	LDX.b #FXCODE_0A8000>>16
	LDA.w #FXCODE_0A8000
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	REP.b #$10
	JSR.w CODE_17CE11
	RTS

CODE_17CEE6:
	LDX.w #$706000
	LDA.w #$706000>>16
	STA.b $01
	LDA.w #$0800
	JSL.l CODE_00BEA6
	INC.w $1118
	SEP.b #$30
	RTS

CODE_17CEFB:
	DEC.w $1142
	DEC.w $0990
	DEC.w $0992
	DEC.w $0994
	BNE.b CODE_17CF17
	STZ.w $1142
	STZ.w $1118
	LDA.b #$10
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	STZ.w !RAM_YI_Global_MainScreenWindowMask
CODE_17CF17:
	RTS

CODE_17CF18:
	LDX.b #$14
	JSR.w CODE_17CFA2
	LDA.b #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
	STZ.w $1107
	LDA.b #$0A
	JSR.w CODE_17CFDA
	INC.w $1118
	RTS

CODE_17CF2F:
	LDA.b #$0A
	JSR.w CODE_17CFDA
	LDA.w $1107
	CLC
	ADC.b #$08
	STA.w $1107
	CMP.b #$40
	BCC.b CODE_17CF44
	INC.w $1118
CODE_17CF44:
	RTS

CODE_17CF45:
	LDA.w $1107
	SEC
	SBC.b #$08
	STA.w $1107
	BPL.b CODE_17CF56
	STZ.w $1107
	INC.w $1118
CODE_17CF56:
	LDA.b #$0A
	JSR.w CODE_17CFDA
	RTS

CODE_17CF5C:
	JSR.w CODE_17D005
	REP.b #$20
	LDA.w DATA_17DC3B
	ORA.w #$1800
	STA.b $00
	LDX.b #$14
	LDA.w DATA_17DCEF,x
	LDY.w $1106
	BNE.b CODE_17CF80
	PHA
	LDA.b $00
	ORA.w #$0080
	STA.b $00
	PLA
	CLC
	ADC.w #$0380
CODE_17CF80:
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSR.w CODE_17DC09
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	SEP.b #$20
	STZ.w $1107
	INC.w $1118
	RTS

CODE_17CFA2:
	REP.b #$20
	LDA.w DATA_17DCEF,x
	LDY.w $1106
	BNE.b CODE_17CFB0
	CLC
	ADC.w #$0380
CODE_17CFB0:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDY.b #$00
	LDA.w #$398E
CODE_17CFC3:
	STA.b ($00),y
	STA.b ($02),y
	STA.b ($04),y
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17CFC3
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	SEP.b #$20
	RTS

CODE_17CFDA:
	REP.b #$20
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1107
	AND.w #$00FF
	STA.b $00
	LDA.w #$0100
	SEC
	SBC.b $00
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSR.w CODE_17D08B
CODE_17D005:
	REP.b #$30
	LDY.w $6092
	LDA.w $1109
	AND.w #$00FF
	SEC
	SBC.w #$0010
	STA.w $6000,y
	STA.w $6010,y
	CLC
	ADC.w #$0010
	STA.w $6008,y
	STA.w $6018,y
	LDA.w $110A
	AND.w #$00FF
	SEC
	SBC.w #$0016
	STA.w $6002,y
	STA.w $600A,y
	CLC
	ADC.w #$0010
	STA.w $6012,y
	STA.w $601A,y
	STZ.b $00
	LDA.w $114E
	BNE.b CODE_17D052
	LDA.w $1118
	CMP.w #$0031
	BCS.b CODE_17D052
	LDA.w #$0600
	STA.b $00
CODE_17D052:
	LDA.w #$31CC
	ORA.b $00
	STA.w $6004,y
	INC
	INC
	STA.w $600C,y
	LDA.w #$31EC
	ORA.b $00
	STA.w $6014,y
	INC
	INC
	STA.w $601C,y
	LDA.w #$4002
	STA.w $6006,y
	STA.w $600E,y
	STA.w $6016,y
	STA.w $601E,y
	TYA
	CLC
	ADC.w #$0020
	STA.w $6092
	SEP.b #$30
	LDA.b #$20
	STA.w $1122
	RTS

CODE_17D08B:
	REP.b #$30
	LDA.w #$705800>>16
	STA.b $01
	LDY.w #$7CC0
	LDX.w #$705800
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7DC0
	LDX.w #$705A00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7EC0
	LDX.w #$705C00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7FC0
	LDX.w #$705E00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

CODE_17D0C9:
	JSR.w CODE_17D08B
	RTL

DATA_17D0CD:
	dw $21AB,$21AC,$21AC,$61AB

DATA_17D0D5:
	dw $21AD,$21AE,$21AE,$61AD

DATA_17D0DD:
	dw $21AD,$218A,$218B,$61AD

DATA_17D0E5:
	dw $A1AB,$A1AC,$A1AC,$E1AB

DATA_17D0ED:
	dw $0ACE,$0AD6,$0ADE,$0AE6,$0AEE,$0AF6,$0C0E,$0C16
	dw $0C1E

DATA_17D0FF:
	dw $0B0E,$0B16,$0B1E,$0B26,$0B2E,$0B36,$0C4E,$0C56
	dw $0C5E

DATA_17D111:
	dw $0B4E,$0B56,$0B5E,$0B66,$0B6E,$0B76,$0C8E,$0C96
	dw $0C9E

DATA_17D123:
	dw $0B8E,$0B96,$0B9E,$0BA6,$0BAE,$0BB6,$0CCE,$0CD6
	dw $0CDE

CODE_17D135:
	JSR.w CODE_17D005
CODE_17D138:
	REP.b #$30
	LDY.w #$0000
	LDA.w $1106
	AND.w #$00FF
	TAX
	BEQ.b CODE_17D149
	LDX.w #$0380
CODE_17D149:
	STX.b $0A
	LDA.w #$19BF
CODE_17D14E:
	STA.w $0A06,x
	STA.w $0B06,x
	STA.w $0C06,x
	STA.w $0C86,x
	INX
	INX
	INY
	CPY.w #$0080
	BCC.b CODE_17D14E
	STZ.b $0E
CODE_17D164:
	LDY.b $0E
	LDA.w DATA_17D0ED,y
	STA.b $00
	LDA.w DATA_17D0FF,y
	STA.b $02
	LDA.w DATA_17D111,y
	STA.b $04
	LDA.w DATA_17D123,y
	STA.b $06
	LDA.w #$0C00
	STA.b $0C
	LDX.w !RAM_YI_Level_CurrentWorldLo
	TYA
	LSR
	CLC
	ADC.w DATA_17E198,x
	TAY
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	CMP.w #$001E
	BCS.b CODE_17D1B0
	LDA.b $0E
	CMP.w #$0010
	BNE.b CODE_17D1A3
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	BEQ.b CODE_17D1B0
CODE_17D1A3:
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	AND.w #$007F
	BEQ.b CODE_17D1B0
	LDA.w #$1000
	STA.b $0C
CODE_17D1B0:
	LDX.w #$0000
	LDY.b $0A
CODE_17D1B5:
	LDA.w DATA_17D0CD,x
	ORA.b $0C
	STA.b ($00),y
	LDA.w DATA_17D0D5,x
	ORA.b $0C
	STA.b ($02),y
	LDA.w DATA_17D0DD,x
	ORA.b $0C
	STA.b ($04),y
	LDA.w DATA_17D0E5,x
	ORA.b $0C
	STA.b ($06),y
	INY
	INY
	INX
	INX
	CPX.w #$0008
	BCC.b CODE_17D1B5
	INC.b $0E
	INC.b $0E
	LDA.b $0E
	CMP.w #$0012
	BCS.b CODE_17D1E8
	JMP.w CODE_17D164

CODE_17D1E8:
	SEP.b #$10
	LDA.w #$1E20
	STA.b $04
	LDA.w $1106
	EOR.w #$0001
	STA.w $1106
	JSR.w CODE_17D52B
	LDA.w $1106
	EOR.w #$0001
	STA.w $1106
	SEP.b #$20
	LDA.b #$04
	STA.b !RAM_YI_Global_Layer2XPosLo
	LDA.b #$84
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.w $111F
	STZ.w $1120
	STZ.w $1121
	LDA.b #$00
	STA.l $7E5C19
	INC.w $1118
	RTS

CODE_17D221:
	JSR.w CODE_17D005
CODE_17D224:
	JSR.w CODE_17D233
	LDA.b #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
	INC.w $1118
	JMP.w CODE_17D2BE

CODE_17D233:
	LDA.w $111F
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_17DCEF,x
	LDY.w $1106
	BNE.b CODE_17D246
	CLC
	ADC.w #$0380
CODE_17D246:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDY.b #$00
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17C9EA,x
	STA.b $06
CODE_17D25E:
	LDA.w $111F
	AND.w #$00FF
	CMP.w #$0003
	BEQ.b CODE_17D273
	CMP.w #$0007
	BEQ.b CODE_17D273
	JSR.w CODE_17D287
	BRA.b CODE_17D276

CODE_17D273:
	JSR.w CODE_17D29D
CODE_17D276:
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17D25E
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	SEP.b #$20
	RTS

CODE_17D287:
	LDA.w DATA_17C9C6,y
	ORA.b $06
	STA.b ($00),y
	LDA.w DATA_17C9CC,y
	ORA.b $06
	STA.b ($02),y
	LDA.w DATA_17C9D2,y
	ORA.b $06
	STA.b ($04),y
	RTS

CODE_17D29D:
	LDA.w DATA_17C9D8,y
	ORA.b $06
	STA.b ($00),y
	LDA.w DATA_17C9DE,y
	ORA.b $06
	STA.b ($02),y
	LDA.w DATA_17C9E4,y
	ORA.b $06
	STA.b ($04),y
	RTS

CODE_17D2B3:
	PHB
	PHK
	PLB
	JSR.w CODE_17D233
	PLB
	RTL

CODE_17D2BB:
	JSR.w CODE_17D005
CODE_17D2BE:
	JSR.w CODE_17D340
	LDA.w $1120
	CLC
	ADC.b #$10
	STA.w $1120
	JSR.w CODE_17D780
	LDA.w $1120
	BPL.b CODE_17D2D8
	INC.w $1121
	INC.w $1118
CODE_17D2D8:
	RTS

CODE_17D2D9:
	JSR.w CODE_17D005
	LDA.w $1120
	SEC
	SBC.b #$10
	STA.w $1120
	BMI.b CODE_17D2EC
	JSR.w CODE_17D340
	BRA.b CODE_17D322

CODE_17D2EC:
	JSR.w CODE_17D3E4
	STZ.w $1120
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
CODE_17D2F7:
	INC.w $111F
	LDA.w $111F
	CMP.b #$09
	BCS.b CODE_17D31A
	CLC
	ADC.w DATA_17E187,x
	TAY
	LDA.w $030F,y
	BEQ.b CODE_17D2F7
	CMP.b #$F0
	BEQ.b CODE_17D31A
	STZ.w $1121
	DEC.w $1118
	DEC.w $1118
	BRA.b CODE_17D325

CODE_17D31A:
	DEC.w $111F
	INC.w $1118
	BRA.b CODE_17D325

CODE_17D322:
	JSR.w CODE_17D780
CODE_17D325:
	RTS

CODE_17D326:
	LDA.w $1120
	SEC
	SBC.b #$10
	STA.w $1120
	BMI.b CODE_17D336
	JSR.w CODE_17D340
	BRA.b CODE_17D33C

CODE_17D336:
	JSR.w CODE_17D3E4
	INC.w $1118
CODE_17D33C:
	JSR.w CODE_17D780
	RTS

CODE_17D340:
	REP.b #$20
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17DBA3,y
	STA.b $00
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAY
	PHY
	LDA.w DATA_17E187,y
	CLC
	ADC.w $111F
	AND.w #$00FF
	TAX
	LDA.w $030F,x
	DEC
	AND.w #$007F
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1121
	AND.w #$00FF
	BEQ.b CODE_17D37C
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w #$6490
CODE_17D37C:
	STA.w $6000
	LDA.w $1120
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	PLY
	LDA.w $030F,x
	CLC
	ADC.w DATA_17E187,y
	DEC
	AND.w #$007F
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0100
	STA.w !REGISTER_SuperFX_R11_LINKDestinationLo
	LDX.b #FXCODE_08DE98>>16
	LDA.w #FXCODE_08DE98
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSR.w CODE_17E683
	SEP.b #$20
	RTS

CODE_17D3AC:
	PHB
	PHK
	PLB
	JSR.w CODE_17D340
	PLB
	RTL

DATA_17D3B4:
	dw $21A8,$21A0,$21A2,$21A2,$21A3,$21A4,$21A5,$21A6
	dw $21A7,$E1B5,$21A9,$21AA

DATA_17D3CC:
	dw $21B8,$21B0,$21B1,$21B2,$21B3,$21B4,$21B5,$21B6
	dw $21B7,$E1A5,$21B9,$21BA

CODE_17D3E4:
	LDY.w $111F
	REP.b #$20
	LDX.w !RAM_YI_Level_CurrentWorldLo
	TYA
	CLC
	ADC.w DATA_17E198,x
	AND.w #$00FF
	STA.b $10
	TAY
	LDA.w #$000A
	STA.b $00
	INC
	STA.b $02
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	CMP.w #$0064
	BCS.b CODE_17D41A
	STZ.b $00
CODE_17D40C:
	CMP.w #$000A
	BCC.b CODE_17D418
	SBC.w #$000A
	INC.b $00
	BRA.b CODE_17D40C

CODE_17D418:
	STA.b $02
CODE_17D41A:
	LDA.w $111F
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_17DCEF,y
	PHA
	LDX.w $1106
	BEQ.b CODE_17D42F
	CLC
	ADC.w #$0380
CODE_17D42F:
	CLC
	ADC.w #$0042
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	LDA.w #$0C00
	STA.b $04
	LDY.b $10
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	CMP.w #$001E
	BCS.b CODE_17D452
	LDA.w #$1000
	STA.b $04
CODE_17D452:
	ASL.b $00
	ASL.b $02
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17E198,x
	STA.b $08
	LDY.b #$00
	LDA.b $00
	BNE.b CODE_17D49C
	LDA.w $111F
	AND.w #$00FF
	CLC
	ADC.b $08
	TAX
	LDA.w $111F
	AND.w #$00FF
	CMP.w #$0008
	BNE.b CODE_17D481
	LDA.w !RAM_YI_Map_LevelHighScores,x
	AND.w #$00FF
	BEQ.b CODE_17D492
CODE_17D481:
	LDA.w !RAM_YI_Map_LevelClearFlags,x
	AND.w #$007F
	BEQ.b CODE_17D492
	LDA.w #$21AE
	ORA.b $04
	STA.b ($0A)
	STA.b ($0C)
CODE_17D492:
	INC.b $0A
	INC.b $0A
	INC.b $0C
	INC.b $0C
	INY
	INY
CODE_17D49C:
	LDA.w $111F
	AND.w #$00FF
	CLC
	ADC.b $08
	TAX
	LDA.w $111F
	AND.w #$00FF
	CMP.w #$0008
	BNE.b CODE_17D4B9
	LDA.w !RAM_YI_Map_LevelHighScores,x
	AND.w #$00FF
	BEQ.b CODE_17D4D1
CODE_17D4B9:
	LDA.w !RAM_YI_Map_LevelClearFlags,x
	AND.w #$007F
	BEQ.b CODE_17D4D1
	LDX.b $00,y
	LDA.w DATA_17D3B4,x
	ORA.b $04
	STA.b ($0A)
	LDA.w DATA_17D3CC,x
	ORA.b $04
	STA.b ($0C)
CODE_17D4D1:
	CPY.b #$02
	BCC.b CODE_17D492
	LDA.w #$1E20
	STA.b $04
	LDA.w $1106
	EOR.w #$0001
	STA.w $1106
	JSR.w CODE_17D52B
	LDA.w $1106
	EOR.w #$0001
	STA.w $1106
	PLA
	LDX.w $1106
	BNE.b CODE_17D4F9
	CLC
	ADC.w #$0380
CODE_17D4F9:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDY.b #$00
	LDA.w #$21BF
CODE_17D50C:
	STA.b ($00),y
	STA.b ($02),y
	STA.b ($04),y
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17D50C
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	SEP.b #$20
	RTS

CODE_17D523:
	PHB
	PHK
	PLB
	JSR.w CODE_17D3E4
	PLB
	RTL

CODE_17D52B:
	REP.b #$10
	LDA.w #$0000
	STA.b $01
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w DATA_17CC8F,y
	TAX
	LDY.b $04
	LDA.w #$0380
	JSL.l CODE_00BEA6
	SEP.b #$10
	RTS

DATA_17D54A:
	dw $0C00,$1000

CODE_17D54E:
	LDA.b $30
	AND.b #$04
	LSR
	TAX
CODE_17D554:
	REP.b #$20
	STZ.b $0E
	LDA.w $1106
	EOR.w #$0001
	STA.w $1106
	BNE.b CODE_17D568
	LDA.w #$0380
	STA.b $0E
CODE_17D568:
	LDA.w DATA_17D54A,x
	STA.b $10
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17E198,y
	TAY
	LDX.b #$00
CODE_17D576:
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	CMP.w #$0064
	BNE.b CODE_17D584
	JSR.w CODE_17D59E
CODE_17D584:
	INY
	INX
	INX
	CPX.b #$12
	BNE.b CODE_17D576
	LDA.w #$1E20
	STA.b $04
	JSR.w CODE_17D52B
	SEP.b #$20
	LDA.w $1106
	EOR.b #$01
	STA.w $1106
	RTS

CODE_17D59E:
	PHY
	LDA.w DATA_17DCEF,x
	CLC
	ADC.b $0E
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	CLC
	ADC.w #$0040
	STA.b $06
	LDY.b #$00
CODE_17D5BB:
	LDA.b ($00),y
	AND.w #$E3FF
	ORA.b $10
	STA.b ($00),y
	LDA.b ($02),y
	AND.w #$E3FF
	ORA.b $10
	STA.b ($02),y
	LDA.b ($04),y
	AND.w #$E3FF
	ORA.b $10
	STA.b ($04),y
	LDA.b ($06),y
	AND.w #$E3FF
	ORA.b $10
	STA.b ($06),y
	INY
	INY
	CPY.b #$08
	BCC.b CODE_17D5BB
	PLY
	RTS

CODE_17D5E7:
	JSR.w CODE_17D005
	JSR.w CODE_17D54E
	LDA.b $37
	AND.w #$05C0
	SEC
	AND.w #$F0D0
	PHP
	INC.w $1118
	LDX.b #$00
	JSR.w CODE_17D554
	RTS

CODE_17D600:
	JSR.w CODE_17D005
	STZ.w $111F
CODE_17D606:
	INC.w $1118
	STZ.w $1120
	JSR.w CODE_17D729
	JSR.w CODE_17D780
	RTS

CODE_17D613:
	JSR.w CODE_17D005
CODE_17D616:
	JSR.w CODE_17D340
	JSR.w CODE_17D780
	LDA.w $1120
	CLC
	ADC.b #$10
	STA.w $1120
	BPL.b CODE_17D62D
	STZ.w $1121
	INC.w $1118
CODE_17D62D:
	RTS

CODE_17D62E:
	JSR.w CODE_17D005
CODE_17D631:
	JSR.w CODE_17D780
	LDA.w $1120
	SEC
	SBC.b #$10
	STA.w $1120
	BPL.b CODE_17D644
	INC.w $1118
	BRA.b CODE_17D647

CODE_17D644:
	JSR.w CODE_17D340
CODE_17D647:
	RTS

CODE_17D648:
	JSR.w CODE_17D005
	JSR.w CODE_17D6C4
	STZ.w $1120
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
CODE_17D656:
	INC.w $111F
	LDA.w $111F
	CMP.b #$09
	BCS.b CODE_17D682
	CLC
	ADC.w DATA_17E187,x
	TAY
	LDA.w $030F,y
	BEQ.b CODE_17D656
	CMP.b #$F0
	BEQ.b CODE_17D682
	INC.w $1121
	DEC.w $1118
	DEC.w $1118
	JSR.w CODE_17D340
	JSR.w CODE_17D729
	JSR.w CODE_17D780
	BRA.b CODE_17D691

CODE_17D682:
	LDA.b #$80
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	STZ.w $1118
	LDA.b #$32
	STA.l $7E5C19
CODE_17D691:
	RTS

CODE_17D692:
	JSR.w CODE_17D6C4
	STZ.w $1120
	LDA.b #$80
	STA.b !RAM_YI_Global_Layer2YPosLo
	STZ.b !RAM_YI_Global_Layer2XPosLo
	INC.w $1118
	RTS

CODE_17D6A2:
	PHP
	REP.b #$30
	PHX
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17E198,x
	CLC
	ADC.b $10
	TAX
	LDA.w !RAM_YI_Map_LevelClearFlags,x
	AND.w #$0080
	BEQ.b CODE_17D6BB
	LDA.w #$1400
CODE_17D6BB:
	STA.b $10
	PLX
	PLP
	RTS

CODE_17D6C0:
	JSR.w CODE_17D6A2
	RTL

CODE_17D6C4:
	REP.b #$20
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17DC43,x
	STA.b $02
	LDA.w $111F
	AND.w #$00FF
	CLC
	ADC.w DATA_17E198,x
	TAY
	LDA.w $111F
	ASL
	TAX
	PHX
	LDA.w $030F,y
	DEC
	AND.w #$007F
	STA.b $10
	ASL
	TAY
	JSR.w CODE_17D6A2
	LDA.b $10
	BNE.b CODE_17D6F3
	LDA.b ($02),y
CODE_17D6F3:
	ORA.w DATA_17DC27,y
	LDX.w $1106
	BNE.b CODE_17D6FE
	ORA.w #$0080
CODE_17D6FE:
	STA.b $00
	PLX
	LDA.w DATA_17DCEF,x
	LDX.w $1106
	BNE.b CODE_17D70D
	CLC
	ADC.w #$0380
CODE_17D70D:
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSR.w CODE_17DC09
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	SEP.b #$20
	RTS

CODE_17D729:
	REP.b #$20
	LDA.w $111F
	ASL
	TAY
	LDA.w DATA_17DCEF,y
	LDX.w $1106
	BNE.b CODE_17D73C
	CLC
	ADC.w #$0380
CODE_17D73C:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17C9EA,x
	STA.b $06
	LDY.b #$00
CODE_17D754:
	LDA.w $111F
	CMP.w #$0003
	BEQ.b CODE_17D766
	CMP.w #$0007
	BEQ.b CODE_17D766
	JSR.w CODE_17D287
	BRA.b CODE_17D769

CODE_17D766:
	JSR.w CODE_17D29D
CODE_17D769:
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17D754
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	SEP.b #$20
	LDA.b #!Define_YI_SoundID36_CollectFlower
	JSL.l CODE_0085D2
	RTS

CODE_17D780:
	REP.b #$30
	LDX.w $6092
	LDA.w $111F
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_17E257,y
	AND.w #$00FF
	SEC
	SBC.w #$0010
	STA.w $6000,x
	STA.w $6010,x
	CLC
	ADC.w #$0010
	STA.w $6008,x
	STA.w $6018,x
	LDA.w DATA_17E257+$01,y
	AND.w #$00FF
	SEC
	SBC.w #$0016
	STA.w $6002,x
	STA.w $600A,x
	CLC
	ADC.w #$0010
	STA.w $6012,x
	STA.w $601A,x
	STZ.b $02
	LDY.w !RAM_YI_Level_CurrentWorldLo
	PHY
	LDA.w $111F
	AND.w #$00FF
	CLC
	ADC.w DATA_17E198,y
	TAY
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	CMP.w #$001E
	BCS.b CODE_17D7FA
	LDA.w $111F
	AND.w #$00FF
	CMP.w #$0008
	BNE.b CODE_17D7F0
	LDA.w !RAM_YI_Map_LevelHighScores,y
	AND.w #$00FF
	BEQ.b CODE_17D7FA
CODE_17D7F0:
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	AND.w #$007F
	BEQ.b CODE_17D7FA
	INC.b $02
CODE_17D7FA:
	PLY
	LDA.w DATA_17DC43,y
	STA.b $00
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w $111F
	AND.w #$00FF
	CLC
	ADC.w DATA_17E198,y
	TAY
	LDA.w $030F,y
	DEC
	AND.w #$007F
	STA.b $10
	ASL
	TAY
	LDA.w $1121
	AND.w #$00FF
	BEQ.b CODE_17D830
	PHX
	LDX.w #$31E0
	LDA.b $02
	BEQ.b CODE_17D82C
	LDX.w #$33E0
CODE_17D82C:
	TXA
	PLX
	BRA.b CODE_17D841

CODE_17D830:
	JSR.w CODE_17D6A2
	LDA.b $10
	BNE.b CODE_17D839
	LDA.b ($00),y
CODE_17D839:
	LSR
	SEC
	SBC.w #$0600
	ORA.w #$31E0
CODE_17D841:
	STA.w $6004,x
	INC
	INC
	STA.w $600C,x
	INC
	INC
	STA.w $6014,x
	INC
	INC
	STA.w $601C,x
	LDA.w #$4002
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $601E,x
	TXA
	CLC
	ADC.w #$0020
	STA.w $6092
	SEP.b #$30
	RTS

DATA_17D86D:
	dw CODE_17D138
	dw CODE_17D224
	dw CODE_17D2BE
	dw CODE_17D326
	dw CODE_17D606
	dw CODE_17D616
	dw CODE_17D631
	dw CODE_17D692

CODE_17D87D:
	PHB
	PHK
	PLB
	JSR.w (DATA_17D86D,x)
	PLB
	RTL

CODE_17D885:
	LDX.b #$00
	TXY
CODE_17D888:
	REP.b #$20
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	ORA.w $0224,y
	ORA.w $0226,y
	ORA.w $0228,y
	STA.b $00
	SEP.b #$20
	LDA.b $00
	ORA.b $01
	STA.w $0010,x
	TYA
	CLC
	ADC.b #$0C
	TAY
	INX
	CPX.b #$07
	BCC.b CODE_17D888
	LDX.w $1115
	INC.w $0010,x
	REP.b #$30
	LDX.w #$0000
	LDA.w #$19BF
CODE_17D8B9:
	STA.w $0A46,x
	STA.w $0DC6,x
	INX
	INX
	CPX.w #$0040
	BCC.b CODE_17D8B9
	STZ.w $1146
	LDX.w #$0000
	TXY
CODE_17D8CD:
	LDA.w $0010,y
	AND.w #$00FF
	BEQ.b CODE_17D8FC
	INC.w $1146
	LDA.w DATA_17DD33,x
	STA.w $0A4E,x
	STA.w $0DCE,x
	LDA.w DATA_17DD33+$02,x
	STA.w $0A50,x
	STA.w $0DD0,x
	LDA.w DATA_17DD33+$04,x
	STA.w $0A52,x
	STA.w $0DD2,x
	LDA.w DATA_17DD33+$06,x
	STA.w $0A54,x
	STA.w $0DD4,x
CODE_17D8FC:
	INY
	TXA
	CLC
	ADC.w #$0008
	TAX
	CPX.w #$0030
	BNE.b CODE_17D8CD
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17DD27,x
	STA.b $00
	LDA.w DATA_17C9EA,x
	STA.b $02
	LDX.w #$0000
	TXY
	LDA.w $1106
	AND.w #$0001
	BEQ.b CODE_17D924
	LDX.w #$0380
CODE_17D924:
	STX.b $10
CODE_17D926:
	LDA.b ($00),y
	STA.w $0A86,x
	LDA.w DATA_17DDE3,y
	ORA.b $02
	STA.w $0D06,x
	INX
	INX
	INY
	INY
	CPY.w #$0040
	BCC.b CODE_17D926
	LDA.w #$0009
	STA.b $0E
CODE_17D941:
	LDY.w #$0000
CODE_17D944:
	LDA.w DATA_17DDA3,y
	ORA.b $02
	STA.w $0A86,x
	INX
	INX
	INY
	INY
	CPY.w #$0040
	BCC.b CODE_17D944
	DEC.b $0E
	BNE.b CODE_17D941
	LDX.b $10
	LDY.w #$0000
CODE_17D95E:
	LDA.w DATA_17DF63,y
	STA.w $0BEE,x
	LDA.w DATA_17DF75,y
	STA.w $0C2E,x
	STA.w $0C6E,x
	STA.w $0CAE,x
	LDA.w DATA_17DF87,y
	STA.w $0CEE,x
	INX
	INX
	INY
	INY
	CPY.w #$0012
	BCC.b CODE_17D95E
	LDA.w #$21F9
	ORA.b $02
	STA.w $0B14
	STA.w $0E94
	STA.w $0B1C
	STA.w $0E9C
	STA.w $0B34
	STA.w $0EB4
	STA.w $0B3C
	STA.w $0EBC
	STA.w $0C4C
	STA.w $0FCC
	LDX.w #$0000
	LDY.w #DATA_17DD07
	LDA.w $1106
	AND.w #$0001
	BEQ.b CODE_17D9B3
	LDY.w #DATA_17DD17
CODE_17D9B3:
	STY.b $00
	LDY.w !RAM_YI_Level_CurrentWorldLo
CODE_17D9B8:
	LDA.b ($00)
	STA.b $04
	INC
	INC
	STA.b $06
	INC
	INC
	STA.b $08
	LDA.w DATA_17DCDF,y
	ORA.b $02
	STA.b ($04)
	LDA.w #$218D
	ORA.b $02
	STA.b ($06)
	LDA.w DATA_17DCDF,x
	ORA.b $02
	STA.b ($08)
	INC.b $00
	INC.b $00
	INX
	INX
	CPX.w #$0010
	BCC.b CODE_17D9B8
	LDX.b $10
	LDY.w #$0000
CODE_17D9E9:
	LDA.w !RAM_YI_Level_CurrentWorldLo
	CMP.w #!Define_YI_WorldID_World3
	BEQ.b CODE_17D9FB
	CMP.w #!Define_YI_WorldID_World4
	BEQ.b CODE_17DA00
	LDA.w DATA_17DFAB,y
	BRA.b CODE_17DA03

CODE_17D9FB:
	LDA.w DATA_17DFBF,y
	BRA.b CODE_17DA03

CODE_17DA00:
	LDA.w DATA_17DFC9,y
CODE_17DA03:
	ORA.b $02
	STA.w $0AA4,x
	LDA.w DATA_17DFB5,y
	ORA.b $02
	STA.w $0BD4,x
	LDA.w DATA_17DFD3,y
	ORA.b $02
	STA.w $0AE4,x
	STA.w $0C14,x
	LDA.w DATA_17DFDD,y
	ORA.b $02
	STA.w $0B24,x
	LDA.w DATA_17DFE7,y
	ORA.b $02
	STA.w $0C54,x
	LDA.w DATA_17DFF1,y
	ORA.b $02
	STA.w $0B64,x
	STA.w $0C94,x
	LDA.w DATA_17DFFB,y
	ORA.b $02
	STA.w $0BA4,x
	LDA.w DATA_17E005,y
	ORA.b $02
	STA.w $0CD4,x
	INX
	INX
	INY
	INY
	CPY.w #$000A
	BCC.b CODE_17D9E9
	LDX.b $10
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	ORA.w #$21E0
	ORA.b $02
	STA.w $0BA6,x
	STA.w $0CD6,x
	LDX.b $10
	LDY.w #$0000
CODE_17DA65:
	LDA.w DATA_17DF99,y
	ORA.b $02
	STA.w $0C1E,x
	STA.w $0C26,x
	LDA.w DATA_17DF9F,y
	ORA.b $02
	STA.w $0C5E,x
	STA.w $0C66,x
	LDA.w DATA_17DFA5,y
	ORA.b $02
	STA.w $0C9E,x
	STA.w $0CA6,x
	INX
	INX
	INY
	INY
	CPY.w #$0006
	BCC.b CODE_17DA65
	LDA.w !RAM_YI_Global_CurrentGameMode
	CMP.w #!Define_YI_GameMode23
	BCS.b CODE_17DAD2
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.l DATA_17E198,x
	TAX
	STA.b $02
	LDA.w $0317,x
	CMP.w #$0A09
	BEQ.b CODE_17DAD2
	LDY.w #$0008
	STZ.b $00
CODE_17DAAE:
	LDA.w !RAM_YI_Map_LevelHighScores,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.b $00
	INX
	DEY
	BNE.b CODE_17DAAE
	LDA.b $00
	CMP.w #$0320
	BCC.b CODE_17DAD2
	LDX.b $02
	LDA.w #$0A09
	STA.w $0317,x
	LDA.w #$0101
	STA.w $022A,x
CODE_17DAD2:
	SEP.b #$10
	LDA.w !RAM_YI_Level_CurrentWorldLo
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	TAX
	LDA.w #DATA_17DBAF>>16
	STA.w $6000
	LDA.w DATA_17DBA3,x
	STA.w $6002
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDA.w #$0015
	STA.w !REGISTER_SuperFX_R0_DefaultSourceOrDestinationLo
	LDX.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	LDA.w DATA_17DC03,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_08E0FA>>16
	LDA.w #FXCODE_08E0FA
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	JSR.w CODE_17C946
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDA.w DATA_17E187,x
	TAY
	REP.b #$20
	LDA.w $0317,y
	CMP.w #$0A09
	BEQ.b CODE_17DB26
	LDA.w #$F0F0
	STA.w $0317,y
CODE_17DB26:
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17DC43,x
	STA.b $04
	LDA.w #$000C
	STA.b $08
	STZ.b $06
CODE_17DB35:
	LDA.w $030F,y
	AND.w #$00FF
	CMP.w #$00F0
	BEQ.b CODE_17DB8D
	AND.w #$007F
	BEQ.b CODE_17DB8D
	DEC
	STA.b $10
	ASL
	TAX
	PHY
	LDA.w DATA_17DC27,x
	LDY.w $1106
	BEQ.b CODE_17DB56
	ORA.w #$0080
CODE_17DB56:
	STA.b $00
	LDA.b $10
	CMP.w #$0008
	BCS.b CODE_17DB66
	JSR.w CODE_17D6A2
	LDA.b $10
	BNE.b CODE_17DB69
CODE_17DB66:
	TXY
	LDA.b ($04),y
CODE_17DB69:
	ORA.b $00
	STA.b $00
	LDX.b $06
	LDA.w DATA_17DCEF,x
	LDY.w $1106
	BEQ.b CODE_17DB7B
	CLC
	ADC.w #$0380
CODE_17DB7B:
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSR.w CODE_17DC09
	PLY
CODE_17DB8D:
	INC.b $06
	INC.b $06
	INY
	DEC.b $08
	BNE.b CODE_17DB35
	SEP.b #$20
	LDA.w $1106
	EOR.b #$01
	AND.b #$01
	STA.w $1106
	RTS

DATA_17DBA3:
	dw DATA_17DBAF,DATA_17DBBB,DATA_17DBC7,DATA_17DBD3,DATA_17DBDF,DATA_17DBEB

DATA_17DBAF:
	db $11,$11,$11,$11,$11,$11,$11,$11,$11,$15,$15,$15

DATA_17DBBB:
	db $11,$11,$11,$11,$11,$11,$11,$11,$11,$15,$15,$15

DATA_17DBC7:
	db $11,$11,$11,$11,$11,$11,$11,$11,$11,$15,$15,$15

DATA_17DBD3:
	db $11,$11,$11,$11,$11,$11,$11,$11,$11,$15,$15,$15

DATA_17DBDF:
	db $15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15

DATA_17DBEB:
	db $15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15

DATA_17DBF7:
	db $11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$11,$15

DATA_17DC03:
	dw FXDATA_530000+$643C,FXDATA_530000+$6458,FXDATA_530000+$6474

CODE_17DC09:
	LDY.b #$00
CODE_17DC0B:
	TYA
	LSR
	CLC
	ADC.b $00
	STA.b ($0A),y
	INC
	INC
	INC
	STA.b ($0C),y
	INC
	INC
	INC
	STA.b ($0E),y
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17DC0B
	RTS

CODE_17DC23:
	JSR.w CODE_17DC09
	RTL

DATA_17DC27:
	dw $2000,$2009,$2012,$201B,$2024,$202D,$2036,$203F

DATA_17DC37:
	dw $2048

DATA_17DC39:
	dw $2051

DATA_17DC3B:
	dw $205A,$2070,$206C,$2075

DATA_17DC43:
	dw DATA_17DC4F,DATA_17DC67,DATA_17DC7F,DATA_17DC97,DATA_17DCAF,DATA_17DCC7

DATA_17DC4F:
	dw $0C00,$1000,$1000,$0C00,$0C00,$0C00,$1000,$1000
	dw $0C00,$0C00,$1800,$1800

DATA_17DC67:
	dw $0C00,$1000,$1000,$1000,$0C00,$1000,$0C00,$0C00
	dw $0C00,$0C00,$1800,$1800

DATA_17DC7F:
	dw $1000,$0C00,$0C00,$0C00,$0C00,$0C00,$1000,$1000
	dw $0C00,$0C00,$1800,$1800

DATA_17DC97:
	dw $0C00,$1000,$0C00,$0C00,$1000,$0C00,$0C00,$0C00
	dw $0C00,$0C00,$1800,$1800

DATA_17DCAF:
	dw $0C00,$1000,$0C00,$1000,$0C00,$0C00,$1000,$0C00
	dw $0C00,$0C00,$1800,$1800

DATA_17DCC7:
	dw $0C00,$0C00,$1000,$1000,$0C00,$0C00,$1000,$0C00
	dw $0C00,$0C00,$1800,$1800

DATA_17DCDF:
	dw $2190,$2191,$2192,$2193,$2194,$2195,$2196,$2197

DATA_17DCEF:
	dw $0ACE,$0AD6,$0ADE,$0AE6,$0AEE,$0AF6,$0C0E,$0C16
	dw $0C1E,$0C26,$0C30,$0C38

DATA_17DD07:
	dw $0B8E,$0B96,$0B9E,$0BA6,$0BAE,$0BB6,$0CCE,$0CD6

DATA_17DD17:
	dw $0F0E,$0F16,$0F1E,$0F26,$0F2E,$0F36,$104E,$1056

DATA_17DD27:
	dw DATA_17DD63,DATA_17DE23,DATA_17DE63,DATA_17DEA3,DATA_17DEE3,DATA_17DF23

DATA_17DD33:
	dw $2D86,$2D8F,$2D80,$6D86,$3186,$318F,$3181,$7186
	dw $3586,$358F,$3582,$7586,$2186,$218F,$2183,$6186
	dw $2586,$258F,$2584,$6586,$2986,$298F,$2985,$6986

DATA_17DD63:
	dw $39BF,$39BF,$AD99,$2D8F,$2D8E,$2D8E,$2D8E,$2D8E
	dw $2D8F,$2D8F,$2D8F,$2D8F,$2D8F,$2D8F,$2D8F,$2DE2
	dw $2DE3,$2DE3,$2DE3,$6DE2,$2D8F,$2D8F,$2D8F,$2D8F
	dw $2D8F,$2D8F,$2D8F,$2D8F,$2D8F,$ED99,$39BF,$39BF

DATA_17DDA3:
	dw $39BF,$39BF,$2198,$218E,$218E,$218E,$218E,$218E
	dw $218E,$218E,$218E,$218E,$218E,$218E,$218E,$218E
	dw $218E,$218E,$218E,$218E,$218E,$218E,$218E,$218E
	dw $218E,$218E,$218E,$218E,$218E,$6198,$39BF,$39BF

DATA_17DDE3:
	dw $39BF,$39BF,$21A1,$21AF,$21AF,$21AF,$21AF,$21AF
	dw $21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF
	dw $21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF,$21AF
	dw $21AF,$21AF,$21AF,$21AF,$21AF,$61A1,$39BF,$39BF

DATA_17DE23:
	dw $39BF,$39BF,$B199,$318F,$318F,$318F,$318F,$318F
	dw $318E,$318E,$318E,$318E,$318F,$318F,$318F,$31E2
	dw $31E3,$31E3,$31E3,$71E2,$318F,$318F,$318F,$318F
	dw $318F,$318F,$318F,$318F,$318F,$F199,$39BF,$39BF

DATA_17DE63:
	dw $39BF,$39BF,$B599,$358F,$358F,$358F,$358F,$358F
	dw $358F,$358F,$358F,$358F,$358E,$358E,$358E,$35E4
	dw $35E3,$35E3,$35E3,$75E2,$358F,$358F,$358F,$358F
	dw $358F,$358F,$358F,$358F,$358F,$F599,$39BF,$39BF

DATA_17DEA3:
	dw $39BF,$39BF,$A199,$218F,$218F,$218F,$218F,$218F
	dw $218F,$218F,$218F,$218F,$218F,$218F,$218F,$21E2
	dw $21E5,$21E5,$21E5,$61E4,$218F,$218F,$218F,$218F
	dw $218F,$218F,$218F,$218F,$218F,$E199,$39BF,$39BF

DATA_17DEE3:
	dw $39BF,$39BF,$A599,$258F,$258F,$258F,$258F,$258F
	dw $258F,$258F,$258F,$258F,$258F,$258F,$258F,$25E2
	dw $25E3,$25E3,$25E3,$65E2,$258E,$258E,$258E,$258E
	dw $258F,$258F,$258F,$258F,$258F,$E599,$39BF,$39BF

DATA_17DF23:
	dw $39BF,$39BF,$A999,$298F,$298F,$298F,$298F,$298F
	dw $298F,$298F,$298F,$298F,$298F,$298F,$298F,$29E2
	dw $29E3,$29E3,$29E3,$69E2,$298F,$298F,$298F,$298F
	dw $298E,$298E,$298E,$298E,$298F,$E999,$39BF,$39BF

DATA_17DF63:
	dw $399F,$398F,$398F,$398F,$398F,$398F,$398F,$398F
	dw $799F

DATA_17DF75:
	dw $3998,$398E,$398E,$398E,$398E,$398E,$398E,$398E
	dw $7998

DATA_17DF87:
	dw $B99F,$B98F,$B98F,$B98F,$B98F,$B98F,$B98F,$B98F
	dw $F99F

DATA_17DF99:
	dw $2187,$21F0,$6187

DATA_17DF9F:
	dw $21F1,$21F2,$21F3

DATA_17DFA5:
	dw $A187,$21F4,$E187

DATA_17DFAB:
	dw $21E8,$21E9,$21EA,$61E9,$61E8

DATA_17DFB5:
	dw $21EB,$21EC,$21ED,$61EC,$61EB

DATA_17DFBF:
	dw $21EB,$21E9,$21EA,$61E9,$61E8

DATA_17DFC9:
	dw $21E8,$21FA,$21FB,$61FA,$61EB

DATA_17DFD3:
	dw $21EF,$21F5,$21F5,$21F5,$61EF

DATA_17DFDD:
	dw $61F8,$21F7,$21F7,$21F7,$21F8

DATA_17DFE7:
	dw $61F8,$21F7,$21F7,$21F7,$61EF

DATA_17DFF1:
	dw $21EF,$21F7,$21F6,$21F7,$61EF

DATA_17DFFB:
	dw $21EE,$21E0,$21E6,$21E3,$61EE

DATA_17E005:
	dw $21EE,$21E0,$21E6,$21E7,$61EE

CODE_17E00F:
	LDA.w $093D
	AND.b #$20
	BEQ.b CODE_17E019
	JMP.w CODE_17E14A

CODE_17E019:
	LDA.b $37
	AND.b #$C0
	ORA.b $38
	AND.b #$D0
	BEQ.b CODE_17E03E
	LDA.w $1112
	CMP.b #$0A
	BNE.b CODE_17E032
	LDA.b #$18
	STA.w $1118
	JMP.w CODE_17E17F

CODE_17E032:
	CMP.b #$0B
	BNE.b CODE_17E03E
	LDA.b #$28
	STA.w $1118
	JMP.w CODE_17E17F

CODE_17E03E:
	LDA.b $37
	AND.b #$C0
	ORA.b $38
	AND.b #$D0
	BEQ.b CODE_17E07B
	STA.w $0979
	LDA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDA.w DATA_17E187,x
	CLC
	ADC.w $1112
	TAY
	LDA.w $030F,y
	BEQ.b CODE_17E07B
	CMP.b #$FF
	BEQ.b CODE_17E07B
	AND.b #$7F
	DEC
	CLC
	ADC.w DATA_17E187,x
	STA.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.b #$02
	STA.w $1113
	STZ.w $1114
	LDA.b #!Define_YI_SoundID5D_SelectLevel
	JSL.l CODE_0085D2
	BRA.b CODE_17E0E3

CODE_17E07B:
	STZ.w $0979
	LDA.b $93
	BNE.b CODE_17E088
	LDA.b $37
	AND.b #$30
	BEQ.b CODE_17E08B
CODE_17E088:
	JMP.w CODE_17E14A

CODE_17E08B:
	LDA.w $111C
	BEQ.b CODE_17E09D
	INC
	CMP.b #$10
	BCC.b CODE_17E09D
	LDA.b $36
	AND.b #$03
	BEQ.b CODE_17E0E6
	BRA.b CODE_17E0A9

CODE_17E09D:
	STA.w $111C
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_17E0E6
	INC.w $111C
CODE_17E0A9:
	TAX
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
	LDA.w $1112
	STA.b $00
	CLC
	ADC.w DATA_17E183-$01,x
	BPL.b CODE_17E0BD
	LDA.b #$0B
CODE_17E0BD:
	CMP.b #$0C
	BCC.b CODE_17E0C3
	LDA.b #$00
CODE_17E0C3:
	TAX
	CLC
	ADC.b $00
	CMP.b #$0B
	BEQ.b CODE_17E0D1
	JSR.w CODE_17E1A6
	JMP.w CODE_17E17F

CODE_17E0D1:
	LDA.w $111C
	INC
	AND.b #$1F
	BEQ.b CODE_17E0E3
	LDA.b $36
	AND.b #$03
	STA.w $111B
	STA.w $111C
CODE_17E0E3:
	JMP.w CODE_17E17F

CODE_17E0E6:
	LDA.b $38
	AND.b #$0C
	BEQ.b CODE_17E14A
	LSR
	LSR
	TAX
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
	LDA.w $1112
	CLC
	ADC.w DATA_17E185-$01,x
	BMI.b CODE_17E108
	CMP.b #$00
	BCC.b CODE_17E108
	CMP.b #$0C
	BCC.b CODE_17E123
	BRA.b CODE_17E13B

CODE_17E108:
	LDA.w !RAM_YI_Level_CurrentWorldLo
	ASL
	ASL
	ORA.w $1112
	TAX
	LDA.w DATA_17E4FB,x
	EOR.b #$03
	STA.w $111A
	LDA.w !RAM_YI_Level_CurrentWorldLo
	INC
	INC
	STA.w $1117
	BRA.b CODE_17E17F

CODE_17E123:
	TAY
	LDX.w !RAM_YI_Level_CurrentWorldLo
	REP.b #$20
	LDA.w DATA_17C93A,x
	STA.b $10
	SEP.b #$20
	LDA.b ($10),y
	AND.b #$0F
	BEQ.b CODE_17E13B
	STY.w $1112
	BRA.b CODE_17E17F

CODE_17E13B:
	LDA.b $38
	AND.b #$0C
	STA.w $111B
	LDA.b #!Define_YI_SoundID42
	JSL.l CODE_0085D2
	BRA.b CODE_17E17F

CODE_17E14A:
	LDA.w $093D
	AND.b #$20
	BEQ.b CODE_17E17F
	LDX.w $118E
	REP.b #$20
	LDA.b $37
	AND.w #$C0C0
	BEQ.b CODE_17E182
	CMP.w DATA_17E18E,x
	BNE.b CODE_17E179
	SEP.b #$20
	LDA.w $118E
	INC
	INC
	STA.w $118E
	CMP.b #$0A
	BCC.b CODE_17E182
	INC.w $114E
	LDA.b #!Define_YI_SoundID95_BonusChallenge
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
	BRA.b CODE_17E182

CODE_17E179:
	SEP.b #$20
	LDA.b #!Define_YI_SoundID90_Incorrect
	STA.b !RAM_YI_Global_PlaySoundHighPriorityLo
CODE_17E17F:
	STZ.w $118E
CODE_17E182:
	RTS

DATA_17E183:
	db $01,$FF

DATA_17E185:
	db $06,$FA

DATA_17E187:
	db !Define_YI_Map_LevelsPerWorld*$00
	db !Define_YI_Map_LevelsPerWorld*$01
	db !Define_YI_Map_LevelsPerWorld*$02
	db !Define_YI_Map_LevelsPerWorld*$03
	db !Define_YI_Map_LevelsPerWorld*$04
	db !Define_YI_Map_LevelsPerWorld*$05
	db !Define_YI_Map_LevelsPerWorld*$06

DATA_17E18E:
	dw $0040,$0040,$4000,$8000,$0080

DATA_17E198:
	dw !Define_YI_Map_LevelsPerWorld*$00
	dw !Define_YI_Map_LevelsPerWorld*$01
	dw !Define_YI_Map_LevelsPerWorld*$02
	dw !Define_YI_Map_LevelsPerWorld*$03
	dw !Define_YI_Map_LevelsPerWorld*$04
	dw !Define_YI_Map_LevelsPerWorld*$05
	dw !Define_YI_Map_LevelsPerWorld*$06

CODE_17E1A6:
	STX.w $1112
	LDY.w !RAM_YI_Level_CurrentWorldLo
	REP.b #$20
	LDA.w DATA_17C93A,y
	STA.b $10
	SEP.b #$20
	TXY
	LDA.b $36
	AND.b #$03
	TAX
CODE_17E1BB:
	LDA.b ($10),y
	AND.b #$0F
	BNE.b CODE_17E1C9
	TYA
	CLC
	ADC.w DATA_17E183-$01,x
	TAY
	BRA.b CODE_17E1BB

CODE_17E1C9:
	CPY.w $1112
	BEQ.b CODE_17E1DE
	STY.w $1112
	TYA
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_17E257,y
	STA.w $1109
	SEP.b #$20
CODE_17E1DE:
	RTS

CODE_17E1DF:
	LDA.w $1112
	ASL
	TAY
	REP.b #$20
	LDA.w $1117
	AND.w #$00FF
	BEQ.b CODE_17E1F7
	TAY
	LDA.w DATA_17E26D,y
	STA.w $1109
	BRA.b CODE_17E1FA

CODE_17E1F7:
	LDA.w DATA_17E257,y
CODE_17E1FA:
	STA.w $110C
	SEP.b #$20
	RTS

CODE_17E200:
	LDY.b #$00
	LDA.w $110C
	BEQ.b CODE_17E235
	CMP.w $1109
	BEQ.b CODE_17E22F
	BPL.b CODE_17E20F
	INY
CODE_17E20F:
	LDA.w $111A
	BEQ.b CODE_17E223
	REP.b #$20
	LDA.w $110C
	STA.w $1109
	STZ.w $110C
	SEP.b #$20
	BRA.b CODE_17E253

CODE_17E223:
	LDA.w $1109
	CLC
	ADC.w DATA_17E254,y
	STA.w $1109
	BRA.b CODE_17E235

CODE_17E22F:
	STZ.w $110C
	STZ.w $111A
CODE_17E235:
	LDY.b #$00
	LDA.w $110D
	BEQ.b CODE_17E253
	CMP.w $110A
	BEQ.b CODE_17E250
	BPL.b CODE_17E244
	INY
CODE_17E244:
	LDA.w $110A
	CLC
	ADC.w DATA_17E254,y
	STA.w $110A
	BRA.b CODE_17E253

CODE_17E250:
	STZ.w $110D
CODE_17E253:
	RTS

DATA_17E254:
	db $04,$FC,$04

DATA_17E257:
	dw $322C,$324C,$326C,$328C,$32AC,$32CC,$5A2C,$5A4C
	dw $5A6C,$5A8C,$5AB4

DATA_17E26D:
	dw $5AD4

DATA_17E26F:
	dw $1634,$1654,$1674,$1694,$16B4,$16D4

CODE_17E27B:
	REP.b #$30
	LDX.w $6092
	LDA.w $1109
	AND.w #$00FF
	STA.w $6000,x
	LDA.w $110A
	AND.w #$00FF
	STA.w $6002,x
	LDY.w #$33C0
	LDA.w $1118
	AND.w #$00FF
	BNE.b CODE_17E2AD
	LDA.w $1108
	AND.w #$000F
	BNE.b CODE_17E2AD
	LDA.w $0979
	AND.w #$00FF
	BEQ.b CODE_17E2C4
CODE_17E2AD:
	LDA.w $1122
	AND.w #$00FF
	BEQ.b CODE_17E2C2
	AND.w #$0080
	BNE.b CODE_17E2C4
	LDA.w $1107
	AND.w #$00FF
	BEQ.b CODE_17E2C4
CODE_17E2C2:
	INY
	INY
CODE_17E2C4:
	TYA
	STA.w $6004,x
	LDA.w #$0002
	STA.w $6006,x
	TXA
	CLC
	ADC.w #$0008
	STA.w $6092
	SEP.b #$30
	RTS

DATA_17E2D9:
	dw $0C00,$0C20,$0C40,$0C60,$2C24,$2C24,$2C44,$AC60
	dw $AC40,$AC20,$2C04

DATA_17E2EF:
	dw $0C08,$0C28,$0C48,$0C68,$AC44,$AC44,$AC24,$AC68
	dw $AC48,$AC28,$2C64

DATA_17E305:
	dw DATA_17E2D9,DATA_17E2EF

CODE_17E309:
	LDA.w $1142
	CMP.w #$0018
	BCC.b CODE_17E314
	AND.w #$0018
CODE_17E314:
	PHA
	ASL
	ASL
	STA.b $00
	SEP.b #$20
	LDA.b #$00
	CLC
	ADC.b $00
	STA.w $1144
	LDA.b #$FF
	SEC
	SBC.b $00
	STA.w $1145
	REP.b #$20
	LDX.w $6092
	LDA.w #$0000
	CLC
	ADC.b $00
	JSR.w CODE_17E3FF
	LDA.w #$0010
	CLC
	ADC.b $00
	JSR.w CODE_17E3FF
	LDA.w #$00E0
	SEC
	SBC.b $00
	JSR.w CODE_17E3FF
	LDA.w #$00F0
	SEC
	SBC.b $00
	JSR.w CODE_17E3FF
	LDX.w $6092
	LDA.w #$0030
	JSR.w CODE_17E427
	LDA.w #$0040
	JSR.w CODE_17E427
	LDA.w #$0050
	JSR.w CODE_17E427
	LDA.w #$0060
	JSR.w CODE_17E427
	LDA.w #$0070
	JSR.w CODE_17E427
	LDA.w #$0080
	JSR.w CODE_17E427
	LDA.w #$0090
	JSR.w CODE_17E427
	LDA.w #$00A0
	JSR.w CODE_17E427
	LDA.w #$00B0
	JSR.w CODE_17E427
	LDA.w #$00C0
	JSR.w CODE_17E427
	LDA.w #$00D0
	JSR.w CODE_17E427
	PLA
	BEQ.b CODE_17E3A1
	AND.w #$0004
	BRA.b CODE_17E3A7

CODE_17E3A1:
	LDA.b !RAM_YI_Global_Layer3XPosLo
	AND.w #$0008
	LSR
CODE_17E3A7:
	LSR
	TAX
	LDA.w DATA_17E305,x
	STA.b $00
	STZ.b $08
	LDX.w $6092
	LDY.w #$0000
	JSR.w CODE_17E43A
	INC.b $08
	INC.b $08
	LDY.w #$0000
	JSR.w CODE_17E43A
	LDA.w #$4002
	STA.b $08
	LDY.w #$0000
	JSR.w CODE_17E43A
	DEC.b $08
	DEC.b $08
	LDY.w #$0000
	JSR.w CODE_17E43A
	LDX.w $6092
	INX
	INX
	INX
	INX
	INX
	INX
	LDA.w #$0002
	TAY
	JSR.w CODE_17E3FF
	TYA
	JSR.w CODE_17E3FF
	TYA
	JSR.w CODE_17E3FF
	TYA
	JSR.w CODE_17E3FF
	LDA.w $6092
	CLC
	ADC.w #$0160
	STA.w $6092
	RTL

CODE_17E3FF:
	STA.w $6000,x
	STA.w $6008,x
	STA.w $6010,x
	STA.w $6018,x
	STA.w $6020,x
	STA.w $6028,x
	STA.w $6030,x
	STA.w $6038,x
	STA.w $6040,x
	STA.w $6048,x
	STA.w $6050,x
	TXA
	CLC
	ADC.w #$0058
	TAX
	RTS

CODE_17E427:
	STA.w $6002,x
	STA.w $605A,x
	STA.w $60B2,x
	STA.w $610A,x
	TXA
	CLC
	ADC.w #$0008
	TAX
	RTS

CODE_17E43A:
	STX.b $02
CODE_17E43C:
	LDA.b ($00),y
	ORA.b $08
	STA.w $6004,x
	TXA
	CLC
	ADC.w #$0008
	TAX
	INY
	INY
	CPY.w #$0016
	BCC.b CODE_17E43C
	LDA.b $02
	CLC
	ADC.w #$0058
	TAX
	RTS

CODE_17E458:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_17E4A6
	TAX
	LDA.w $1117
CODE_17E462:
	CLC
	ADC.w DATA_17E183-$01,x
	CLC
	ADC.w DATA_17E183-$01,x
	TAY
	BEQ.b CODE_17E49E
	CMP.b #$10
	BCS.b CODE_17E49E
	STA.b $00
	LSR
	TAY
	LDA.w DATA_17E187-$01,y
	TAY
	REP.b #$20
	LDA.w !RAM_YI_Map_LevelClearFlags,y
	ORA.w $0224,y
	ORA.w $0226,y
	ORA.w $0228,y
	STA.b $02
	SEP.b #$20
	LDA.b $02
	ORA.b $03
	BNE.b CODE_17E495
	LDA.b $00
	BRA.b CODE_17E462

CODE_17E495:
	LDA.b $00
	STA.w $1117
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	BRA.b CODE_17E4A0

CODE_17E49E:
	LDA.b #!Define_YI_SoundID42
CODE_17E4A0:
	JSL.l CODE_0085D2
	BRA.b CODE_17E4FA

CODE_17E4A6:
	LDA.b $38
	AND.b #$04
	BEQ.b CODE_17E4CB
	LDA.w $1117
	DEC
	DEC
	ASL
	ASL
	ORA.w $1112
	TAX
	LDA.w DATA_17E4FB,x
	STA.w $111A
	STZ.w $1117
	STZ.w $1118
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
	BRA.b CODE_17E4FA

CODE_17E4CB:
	LDA.b $37
	ORA.b $38
	AND.b #$C0
	BEQ.b CODE_17E4FA
	LDA.w $1117
	DEC
	DEC
	CMP.w !RAM_YI_Level_CurrentWorldLo
	BEQ.b CODE_17E4FA
	STA.w !RAM_YI_Level_CurrentWorldLo
	LSR
	TAX
	LDA.w DATA_17E187,x
	STA.w !RAM_YI_Level_CurrentLevelFromMapLo
	STZ.w $1112
	STZ.w $110B
	STZ.w $1123
	INC.w $1118
	LDA.b #!Define_YI_SoundID19_SelectWorld
	JSL.l CODE_0085D2
CODE_17E4FA:
	RTS

DATA_17E4FB:
	dw $0202,$0202,$0202,$0000,$0201,$0202,$0202,$0000
	dw $0101,$0202,$0202,$0000,$0101,$0201,$0202,$0000
	dw $0101,$0201,$0202,$0000,$0101,$0101,$0202,$0000
	dw $0101,$0101,$0201,$0000

CODE_17E533:
	REP.b #$30
	LDX.w $6092
	LDA.w $1109
	AND.w #$00FF
	SEC
	SBC.w #$0010
	STA.w $6000,x
	STA.w $6010,x
	CLC
	ADC.w #$0010
	STA.w $6008,x
	STA.w $6018,x
	LDA.w $110A
	AND.w #$00FF
	SEC
	SBC.w #$0016
	STA.w $6002,x
	STA.w $600A,x
	CLC
	ADC.w #$0010
	STA.w $6012,x
	STA.w $601A,x
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17DC43,y
	STA.b $04
	LDA.w $1119
	AND.w #$00FF
	BNE.b CODE_17E58D
	LDA.w DATA_17E198,y
	CLC
	ADC.w $1112
	AND.w #$00FF
	TAY
	LDA.w $030F,y
	AND.w #$007F
CODE_17E58D:
	DEC
	STA.b $10
	AND.w #$000F
	ASL
	TAY
	JSR.w CODE_17D6A2
	LDA.b $10
	BNE.b CODE_17E59E
	LDA.b ($04),y
CODE_17E59E:
	LSR
	SEC
	SBC.w #$0600
	ORA.w #$31E0
	STA.w $6004,x
	INC
	INC
	STA.w $600C,x
	INC
	INC
	STA.w $6014,x
	INC
	INC
	STA.w $601C,x
	LDA.w #$4002
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $601E,x
	TXA
	CLC
	ADC.w #$0020
	STA.w $6092
	SEP.b #$30
	RTS

CODE_17E5D2:
	LDA.w $1112
	STA.w $110B
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_17DCEF,x
	LDY.w $1106
	BNE.b CODE_17E5E8
	CLC
	ADC.w #$0380
CODE_17E5E8:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17C9EA,y
	STA.b $06
	LDY.b #$00
CODE_17E600:
	LDA.w $1112
	AND.w #$00FF
	CMP.w #$0003
	BEQ.b CODE_17E615
	CMP.w #$0007
	BEQ.b CODE_17E615
	JSR.w CODE_17D287
	BRA.b CODE_17E618

CODE_17E615:
	JSR.w CODE_17D29D
CODE_17E618:
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17E600
CODE_17E61E:
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17CC8F,y
	CLC
	ADC.w #$00C0
	TAX
	LDY.w #$1C80
	LDA.w #$0200
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

CODE_17E642:
	JSR.w CODE_17E61E
	RTL

CODE_17E646:
	REP.b #$20
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17DBA3,x
	STA.b $00
	LDA.w $1112
	AND.w #$00FF
	TAY
	LDA.b ($00),y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $1119
	AND.w #$007F
	DEC
	CLC
	ADC.w DATA_17E198,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $1107
	AND.w #$00FF
	CLC
	ADC.w #$0100
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DBDE>>16
	LDA.w #FXCODE_08DBDE
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_17E683:
	REP.b #$10
	LDA.w #$705800>>16
	STA.b $01
	LDY.w #$7E00
	LDX.w #$705800
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7F00
	LDX.w #$705A00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7E40
	LDX.w #$705C00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	LDY.w #$7F40
	LDX.w #$705E00
	LDA.w #$0080
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

DATA_17E6C1:
	dw CODE_17E6DE
	dw CODE_17E71E

CODE_17E6C5:
	LDX.b #$00
	LDA.w $111B
	AND.b #$0F
	BEQ.b CODE_17E6DA
	AND.b #$0C
	BEQ.b CODE_17E6D7
	LSR
	LSR
	TAY
	INX
	INX
CODE_17E6D7:
	JSR.w (DATA_17E6C1,x)
CODE_17E6DA:
	STZ.w $111B
	RTS

CODE_17E6DE:
	LDA.b #$0B
	LDY.w $1108
	BNE.b CODE_17E708
	SEC
	SBC.w $1112
	STA.w $1112
	TAY
	LDX.w !RAM_YI_Level_CurrentWorldLo
	REP.b #$20
	LDA.w DATA_17C93A,x
	STA.b $00
	SEP.b #$20
CODE_17E6F9:
	LDA.b ($00),y
	AND.b #$0F
	BNE.b CODE_17E702
	INY
	BRA.b CODE_17E6F9

CODE_17E702:
	TYA
	STA.w $1112
	BRA.b CODE_17E70F

CODE_17E708:
	SEC
	SBC.w $110B
	STA.w $110B
CODE_17E70F:
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_17E257,y
	STA.w $1109
	SEP.b #$20
	RTS

DATA_17E71C:
	db $08,$F8

CODE_17E71E:
	LDA.w $110A
	CLC
	ADC.w DATA_17E71C-$01,y
	STA.w $110D
	RTS

CODE_17E729:
	LDX.w !RAM_YI_Level_CurrentLevelFromMapLo
	LDA.l DATA_028000,x
	STA.w !RAM_YI_Level_CurrentYoshiColorLo
	JSR.w CODE_17E5D2
	INC.w $111D
	REP.b #$20
	STZ.w $110E
	LDA.w #$0100
	STA.w $1110
CODE_17E744:
	LDX.w !RAM_YI_Level_CurrentWorldLo
	REP.b #$20
	LDA.w DATA_17DBA3,x
	STA.b $00
	LDX.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17E198,x
	CLC
	ADC.w $1112
	AND.w #$00FF
	TAY
	LDA.w $030F,y
	AND.w #$007F
	DEC
	TAY
	CLC
	ADC.w DATA_17E198,x
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.b ($00),y
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDA.w $110E
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $1110
	BEQ.b CODE_17E7BC
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DC05>>16
	LDA.w #FXCODE_08DC05
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSR.w CODE_17E683
	REP.b #$20
	LDA.w $110E
	CLC
	ADC.w #$0008
	STA.w $110E
	LDA.w $1110
	SEC
	SBC.w #$0002
	CMP.w #$0014
	BCS.b CODE_17E7B9
	SEP.b #$20
	LDA.b #!Define_YI_MusicID_FadeMusicCommand
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.b #!Define_YI_SoundID43_MountYoshi
	JSL.l CODE_0085D2
	REP.b #$20
	LDA.w #$0000
CODE_17E7B9:
	STA.w $1110
CODE_17E7BC:
	SEP.b #$20
	RTS

CODE_17E7BF:
	LDA.w $1128
	BEQ.b CODE_17E7FA
	LDA.w $0990
	DEC
	BPL.b CODE_17E7CC
	LDA.b #$00
CODE_17E7CC:
	STA.w $0990
	LDA.w $0992
	DEC
	BPL.b CODE_17E7D7
	LDA.b #$00
CODE_17E7D7:
	STA.w $0992
	LDA.w $0994
	DEC
	DEC
	BPL.b CODE_17E7E3
	LDA.b #$00
CODE_17E7E3:
	STA.w $0994
	LDA.w $0990
	ORA.w $0992
	ORA.w $0994
	BNE.b CODE_17E7FA
	STZ.w $1128
	STZ.w $1110
	STZ.w $1111
CODE_17E7FA:
	RTS

CODE_17E7FB:
	LDY.w !RAM_YI_Level_CurrentWorldLo
	LDA.w DATA_17C93A,y
	STA.b $0A
	LDY.b #$00
	SEP.b #$20
CODE_17E807:
	LDA.b ($0A),y
	AND.b #$0F
	CMP.b $00
	BEQ.b CODE_17E816
	INY
	CPY.b #$0C
	BCC.b CODE_17E807
	LDY.b #$00
CODE_17E816:
	REP.b #$20
	RTS

DATA_17E819:
	dw $2D86,$2D65,$2D66,$2D67,$2D68,$2D75,$2D76,$2D77
	dw $6D86

DATA_17E82B:
	dw $3186,$3165,$317F,$3158,$3178,$3125,$3126,$3127
	dw $7186

DATA_17E83D:
	dw $0C00,$1000

DATA_17E841:
	dw $0008,$001A

DATA_17E845:
	dw $3920,$3921,$3922,$3923,$3924

DATA_17E84F:
	dw $3905,$3906,$3907,$3908,$3928

DATA_17E859:
	dw DATA_17E845,DATA_17E84F

CODE_17E85D:
	REP.b #$30
	LDX.w #$00FE
	LDA.w #$21BF
CODE_17E865:
	STA.w $0A06,x
	STA.w $0D86,x
	STA.w $0B06,x
	STA.w $0E86,x
	STA.w $0C06,x
	STA.w $0F86,x
	STA.w $0C86,x
	STA.w $1006,x
	DEX
	DEX
	BPL.b CODE_17E865
	LDA.w $112D
	AND.w #$0001
	ASL
	TAX
	LDA.w DATA_17E83D,x
	STA.b $00
	LDX.w #$0000
	TXY
	LDA.w $1106
	AND.w #$0001
	BEQ.b CODE_17E89D
	LDX.w #$0380
CODE_17E89D:
	STX.b $0E
CODE_17E89F:
	LDA.w DATA_17E819,y
	STA.w $0A4E,x
	LDA.w DATA_17E82B,y
	STA.w $0A60,x
	INX
	INX
	INY
	INY
	CPY.w #$0012
	BCC.b CODE_17E89F
	LDY.w #$0000
	LDX.b $0E
CODE_17E8B9:
	LDA.w DATA_17DDA3,y
	ORA.b $00
	STA.w $0AC6,x
	STA.w $0B06,x
	STA.w $0B46,x
	STA.w $0B86,x
	STA.w $0BC6,x
	STA.w $0C06,x
	STA.w $0C46,x
	STA.w $0C86,x
	STA.w $0CC6,x
	STA.w $0D06,x
	LDA.w DATA_17DDE3,y
	ORA.b $00
	STA.w $0D06,x
	INX
	INX
	INY
	INY
	CPY.w #$0040
	BCC.b CODE_17E8B9
	LDX.b $0E
	LDY.w #$0000
	LDA.w #$A199
	ORA.b $00
	STA.w $0A8A,x
	ORA.w #$4000
	STA.w $0AC0,x
	LDA.w #$218F
	ORA.b $00
CODE_17E905:
	STA.w $0A8C,x
	INX
	INX
	INY
	CPY.w #$001A
	BCC.b CODE_17E905
	LDA.w $112D
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_17E841,y
	CLC
	ADC.b $0E
	TAX
	LDY.w #$0009
	LDA.w #$218E
	ORA.b $00
CODE_17E927:
	STA.w $0A86,x
	INX
	INX
	DEY
	BNE.b CODE_17E927
	LDY.w #$0000
	LDX.b $0E
	LDA.w #$3909
CODE_17E937:
	PHA
	STA.w $0ADA,x
	CLC
	ADC.w #$0010
	STA.w $0B1A,x
	CLC
	ADC.w #$0010
	STA.w $0B5A,x
	CLC
	ADC.w #$0010
	STA.w $0B9A,x
	CLC
	ADC.w #$0010
	STA.w $0BDA,x
	CLC
	ADC.w #$0010
	STA.w $0C1A,x
	CLC
	ADC.w #$0010
	STA.w $0C5A,x
	CLC
	ADC.w #$0010
	STA.w $0C9A,x
	PLA
	INC
	INX
	INX
	INY
	CPY.w #$0007
	BCC.b CODE_17E937
	LDA.w #$B90F
	STA.w $0C98,x
	LDX.b $0E
	LDY.w #$0000
CODE_17E981:
	LDA.w #$2135
	ORA.b $00
	STA.w $0ACE,x
	STA.w $0BCE,x
	STA.w $0BEA,x
	ORA.w #$8000
	STA.w $0B8E,x
	STA.w $0C8E,x
	STA.w $0CAA,x
	LDA.w #$2145
	ORA.b $00
	STA.w $0AEA,x
	LDA.w #$2155
	ORA.b $00
	STA.w $0BAA,x
	INX
	INX
	INY
	CPY.w #$0005
	BCC.b CODE_17E981
	LDA.w #$2148
	ORA.b $00
	STA.w $0AEA,x
	LDA.w #$2156
	ORA.b $00
	STA.w $0BAA,x
	LDX.b $0E
	LDA.w #$2137
	ORA.b $00
	STA.w $0B0C,x
	STA.w $0B4C,x
	STA.w $0C0C,x
	STA.w $0C4C,x
	STA.w $0C28,x
	ORA.w #$4000
	STA.w $0B58,x
	STA.w $0C58,x
	STA.w $0C34,x
	STA.w $0C74,x
	LDA.w #$6136
	ORA.b $00
	STA.w $0B18,x
	STA.w $0C18,x
	EOR.w #$C000
	STA.w $0C68,x
	LDA.w #$2146
	ORA.b $00
	STA.w $0B28,x
	LDA.w #$A147
	ORA.b $00
	STA.w $0B68,x
	LDA.w #$2157
	ORA.b $00
	STA.w $0B34,x
	STA.w $0B74,x
	LDA.w #$2148
	ORA.b $00
	STA.w $0AF4,x
	ORA.w #$4000
	STA.w $0AE8,x
	ORA.w #$8000
	STA.w $0BA8,x
	LDA.w #$3960
	STA.b $10
	LDA.w #$3140
	STA.b $12
	LDA.w #$2D00
	STA.b $14
	LDX.b $0E
	LDY.w #$0005
CODE_17EA3C:
	LDA.b $10
	STA.w $0B0E,x
	ORA.w #$0010
	STA.w $0B4E,x
	LDA.b $12
	STA.w $0C2A,x
	ORA.w #$0010
	STA.w $0C6A,x
	LDA.b $14
	STA.w $0C0E,x
	ORA.w #$0010
	STA.w $0C4E,x
	INC.b $10
	INC.b $12
	INC.b $14
	INX
	INX
	DEY
	BNE.b CODE_17EA3C
	LDX.b $0E
	LDA.w #$399F
	STA.w $0B76,x
	PHA
	ORA.w #$8000
	STA.w $0C76,x
	PLA
	ORA.w #$4000
	STA.w $0B7E,x
	ORA.w #$8000
	STA.w $0C7E,x
	LDA.w #$398F
	STA.w $0B78,x
	STA.w $0B7A,x
	STA.w $0B7C,x
	ORA.w #$8000
	STA.w $0C78,x
	STA.w $0C7A,x
	STA.w $0C7C,x
	LDA.w #$3998
	STA.w $0BB6,x
	STA.w $0BF6,x
	STA.w $0C36,x
	ORA.w #$4000
	STA.w $0BBE,x
	STA.w $0BFE,x
	STA.w $0C3E,x
	LDA.w $1106
	AND.w #$0001
	XBA
	LSR
	STA.b $1E
	LDA.w #$2C63
	ORA.b $1E
	STA.b $10
	LDA.w #$2C66
	ORA.b $1E
	STA.b $12
	LDA.w #$2C69
	ORA.b $1E
	STA.b $14
	LDX.b $0E
	LDY.w #$0003
CODE_17EAD8:
	LDA.b $10
	STA.w $0BB8,x
	LDA.b $12
	STA.w $0BF8,x
	LDA.b $14
	STA.w $0C38,x
	INC.b $10
	INC.b $12
	INC.b $14
	INX
	INX
	DEY
	BNE.b CODE_17EAD8
	LDX.b $0E
	LDA.w $112D
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_17E859,y
	STA.b $00
	LDY.w #$0000
CODE_17EB04:
	LDA.b ($00),y
	STA.w $0B2A,x
	ORA.w #$0010
	STA.w $0B6A,x
	INX
	INX
	INY
	INY
	CPY.w #$000A
	BCC.b CODE_17EB04
	SEP.b #$30
	RTS

DATA_17EB1B:
	dw $0A06,$0D86

CODE_17EB1F:
	REP.b #$30
	LDA.w $1106
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17EB1B,y
	TAX
	LDY.w #$1E20
	LDA.w #$0380
	JSL.l CODE_00BEA6
	SEP.b #$30
	RTS

CODE_17EB3F:
	STZ.w $1122
CODE_17EB42:
	REP.b #$20
	LDA.w #$000E
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #DATA_17DBF7>>16
	STA.w $6000
	LDA.w #DATA_17DBF7
	STA.w $6002
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
CODE_17EB5F:
	REP.b #$10
	LDA.w $1106
	AND.w #$0001
	EOR.w #$0001
	ASL
	TAY
	LDX.w #$706000
	LDA.w #$706000>>16
	STA.b $01
	LDA.w DATA_17CCF1,y
	TAY
	LDA.w #$0800
	JSL.l CODE_00BEA6
	SEP.b #$30
	INC.w $1118
	RTS

DATA_17EB85:
	dw $0048,$0049,$004A

CODE_17EB8B:
	LDX.b #$16
	JSR.w CODE_17CFA2
	LDA.b #!Define_YI_SoundID32_HitMessageBox
	JSL.l CODE_0085D2
	STZ.w $1107
	LDX.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	LDA.w DATA_17EB85,x
	JSR.w CODE_17CFDA
	STZ.w $1122
	INC.w $1118
	RTS

CODE_17EBA9:
	JSR.w CODE_17ECA1
	STZ.w $6083
	LDA.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	LSR
	STA.w $112D
	BRA.b CODE_17EBCB

CODE_17EBB8:
	JSR.w CODE_17E85D
	INC.w $1118
	JSR.w CODE_17EB1F
	LDA.w $1106
	EOR.b #$01
	AND.b #$01
	STA.w $1106
CODE_17EBCB:
	LDX.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	LDA.w DATA_17EB85,x
	TAX
CODE_17EBD2:
	REP.b #$20
	LDA.w $1107
	CLC
	ADC.w #$0008
	STA.w $1107
	SEP.b #$20
	CMP.b #$40
	BCC.b CODE_17EBE7
	INC.w $1118
CODE_17EBE7:
	TXA
	JSR.w CODE_17CFDA
	RTS

CODE_17EBEC:
	LDX.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	LDA.w DATA_17EB85,x
	TAX
CODE_17EBF3:
	REP.b #$20
	LDA.w $1107
	SEC
	SBC.w #$0008
	STA.w $1107
	SEP.b #$20
	LDA.w $1107
	BPL.b CODE_17EC21
	INC.w $1118
	LDA.b #$13
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.b #$82
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	STZ.w $1107
	REP.b #$20
	LDA.w #$FF00
	STA.l $7E55C0
	SEP.b #$20
CODE_17EC21:
	TXA
	JSR.w CODE_17CFDA
	RTS

CODE_17EC26:
	REP.b #$30
	LDA.w $1107
	AND.w #$00FF
	ASL
	ASL
	TAX
	LDA.w #$EF11
	STA.l $7E55C4,x
	STA.l $7E55C8,x
	STA.l $7E55CC,x
	STA.l $7E55D0,x
	SEP.b #$30
	LDA.w $1107
	CLC
	ADC.b #$04
	STA.w $1107
	CMP.b #$50
	BCC.b CODE_17EC91
	INC.w $1118
	STZ.w $1107
	LDA.b #$00
	STA.w !RAM_YI_Global_MainScreenWindowMask
	LDA.b #$80
	STA.w !RAM_YI_Global_ObjectAndColorWindowSettings
	REP.b #$20
	LDA.w #$4AD4
	STA.w $1109
	SEP.b #$20
CODE_17EC6D:
	REP.b #$30
	LDA.w $1106
	EOR.w #$0001
	AND.w #$0001
	ASL
	TAY
	LDA.w #$0000
	STA.b $01
	LDA.w DATA_17EB1B,y
	TAX
	LDY.w #$1C20
	LDA.w #$0380
	JSL.l CODE_00BEA6
	SEP.b #$30
	BRA.b CODE_17ECA0

CODE_17EC91:
	LDA.w $1118
	CMP.b #$38
	BCS.b CODE_17ECA0
	JSR.w CODE_17D005
	LDA.b #$80
	STA.w $1122
CODE_17ECA0:
	RTS

CODE_17ECA1:
	PHB
	LDA.b #$7E55C0>>16
	PHA
	PLB
	LDY.b #$00
	REP.b #$20
	LDA.w #$00FF
CODE_17ECAD:
	STA.w $7E55C0,y
	STA.w $7E5640,y
	DEY
	DEY
	BNE.b CODE_17ECAD
	SEP.b #$20
	PLB
	INC.w $1118
	RTS

DATA_17ECBE:
	dw $175B,$17A3

CODE_17ECC2:
	LDA.b $37
	AND.b #$80
	ORA.b $38
	AND.b #$90
	BEQ.b CODE_17ECDE
	LDA.b #!Define_YI_SoundID08_1up
	JSL.l CODE_0085D2
	LDA.b #$5F
	JSR.w CODE_17CFDA
	LDA.b #$31
	STA.w $1118
	BRA.b CODE_17ED01

CODE_17ECDE:
	LDA.b $38
	AND.b #$08
	BEQ.b CODE_17ED01
	LDA.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	TAX
	LSR
	STA.w $112D
	REP.b #$20
	LDA.w DATA_17ECBE,x
	STA.w $1109
	SEP.b #$20
	LDA.b #$38
	STA.w $1118
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
CODE_17ED01:
	RTS

CODE_17ED02:
	REP.b #$30
	LDX.w #$0000
	LDA.w $1106
	AND.w #$0001
	BNE.b CODE_17ED12
	LDX.w #$0380
CODE_17ED12:
	LDA.w #$398E
	LDY.w #$0000
CODE_17ED18:
	STA.w $0BB8,x
	STA.w $0BF8,x
	STA.w $0C38,x
	INX
	INX
	INY
	CPY.w #$0003
	BCC.b CODE_17ED18
	LDA.w #$0100
	STA.w $1107
	JSR.w CODE_17EC6D
	SEP.b #$30
	INC.w $1118
CODE_17ED37:
	LDX.b #$5F
	JSR.w CODE_17EBD2
	RTS

CODE_17ED3D:
	LDX.b #$5F
	JSR.w CODE_17EBF3
	LDA.w $1107
	BPL.b CODE_17ED51
	REP.b #$20
	LDA.w #$4AD4
	STA.w $1109
	SEP.b #$20
CODE_17ED51:
	RTS

CODE_17ED52:
	JSR.w CODE_17CC69
	JSR.w CODE_17CC93
	DEC.w $1118
	JSR.w CODE_17D005
	RTS

CODE_17ED5F:
	LDA.w $1106
	AND.b #$01
	EOR.b #$01
	STA.w $1106
	REP.b #$20
	JSR.w CODE_17EB5F
	LDA.w $1106
	AND.b #$01
	EOR.b #$01
	STA.w $1106
	JSR.w CODE_17D005
	LDA.b #$13
	STA.w !RAM_YI_Global_MainScreenWindowMask
	RTS

CODE_17ED81:
	JSR.w CODE_17EC26
	LDA.w $1107
	BNE.b CODE_17ED93
	REP.b #$20
	LDA.w DATA_17E26D
	STA.w $1109
	SEP.b #$20
CODE_17ED93:
	RTS

CODE_17ED94:
	JSR.w CODE_17ECA1
	LDA.b #$00
	STA.w !RAM_YI_Global_MainScreenWindowMask
	STZ.w $1118
	STZ.w $112D
	RTS

CODE_17EDA3:
	LDA.b $38
	AND.b #$04
	BEQ.b CODE_17EDBA
	LDA.b #$30
	STA.w $1118
	REP.b #$20
	LDA.w #$4AD4
	STA.w $1109
	SEP.b #$20
	BRA.b CODE_17EE21

CODE_17EDBA:
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_17EDDF
	TAX
	LDA.w $112D
	CLC
	ADC.w DATA_17E183-$01,x
	BMI.b CODE_17EDDF
	CMP.b #$02
	BCS.b CODE_17EDDF
	STA.w $112D
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_17ECBE,x
	STA.w $1109
	SEP.b #$20
	BRA.b CODE_17EE21

CODE_17EDDF:
	LDA.b $37
	ORA.b $38
	AND.b #$C0
	BEQ.b CODE_17EE27
	LDA.w $112D
	ASL
	CMP.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	BEQ.b CODE_17EE27
	STA.w !EXRAM_YI_Global_EggThrowSetting|!EXRAMBankMirror
	JSR.w CODE_17E85D
	JSR.w CODE_17EB1F
	JSR.w CODE_17EB42
	LDA.w $1106
	EOR.b #$01
	AND.b #$01
	STA.w $1106
	STZ.w $1107
	LDA.b #!Define_YI_SoundID04_SpitOut
	JSL.l CODE_0085D2
	REP.b #$20
	LDA.w #$FF00
	STA.l $7E55C0
	SEP.b #$20
	LDA.b #$01
	STA.w !RAM_YI_Global_MainScreenWindowMask
	BRA.b CODE_17EE27

CODE_17EE21:
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
CODE_17EE27:
	RTS

CODE_17EE28:
	JSR.w CODE_17EC26
	LDA.w $1107
	BNE.b CODE_17EE41
	LDA.w $112D
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_17ECBE,x
	STA.w $1109
	SEP.b #$20
	BRA.b CODE_17EE46

CODE_17EE41:
	LDA.b #$20
	STA.w $1122
CODE_17EE46:
	RTS

CODE_17EE47:
	JSR.w CODE_17ECA1
	LDA.b #$38
	STA.w $1118
	RTS

DATA_17EE50:
	dw $2D86,$2D8F,$2DDB,$2DDC,$2DDD,$2DDE,$2DCB,$2DCC
	dw $2DCA,$2D8F,$6D86

DATA_17EE66:
	dw $2DBF,$2DBF,$AD99,$2D8F,$2D8E,$2D8E,$2D8E,$2D8E
	dw $2D8E,$2D8E,$2D8E,$2D8E,$2D8E,$2D8E,$2D8E,$2D8F
	dw $2D8F,$2D8F,$2D8F,$2D8F,$2D8F,$2D8F,$2D8F,$2D8F
	dw $0D8F,$2D8F,$2D8F,$2D8F,$2D8F,$ED99,$2DBF,$2DBF

DATA_17EEA6:
	dw $2DC0,$2DC1,$2DC2,$2DC3,$2DC4

DATA_17EEB0:
	dw $2DC0,$2DC1,$2DC2,$2DC8,$2DC9

DATA_17EEBA:
	dw $2DC5,$2DC6,$2DC7,$2DD5,$2D8C

DATA_17EEC4:
	dw $2DD0,$2DD1,$2DD2,$2DD3,$2DD4

DATA_17EECE:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	dw $2DFF,$2DD6,$2DD7,$2DD8,$2DD9
else
	dw $2D8E,$2DD6,$2DD7,$2DD8,$2DD9
endif

DATA_17EED8:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	dw $2DC0,$2DC1,$2DC2,$2DC3,$2D89
else
	dw $2DC0,$2DC1,$2DC2,$2DC3,$2DC4
endif

DATA_17EEE2:
if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	dw $2DD0,$2DD1,$2DD2,$2DD3,$2D88
else
	dw $2DD0,$2DD1,$2DD2,$2DD3,$2DD4
endif

DATA_17EEEC:
	dw $2DFC,$2DFD,$2DFD,$2DFD,$2DFD,$2DDF,$2DCD,$2DCE
	dw $2DCF,$6DDF,$2DFD,$2DFD,$2DFD,$2DFD,$6DFC

DATA_17EF0A:
	dw $399F,$398F,$398F,$398F,$799F

DATA_17EF14:
	dw $3998,$398E,$398E,$398E,$7998

DATA_17EF1E:
	dw $B99F,$B98F,$B98F,$B98F,$F99F

DATA_17EF28:
	dw $0AD0,$0ADC,$0AE8,$0AF4,$0C10,$0C1C,$0C28,$0C36

DATA_17EF38:
	dw $0C00,$0C00,$0C00,$0C00,$1000,$0C00,$0C00,$0C00

DATA_17EF48:
	db $15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15,$15

CODE_17EF54:
	REP.b #$30
	STZ.w $118E
	LDX.w #$0000
	LDA.w $1106
	AND.w #$0001
	BEQ.b CODE_17EF67
	LDX.w #$0380
CODE_17EF67:
	STX.b $20
	LDY.w #$0020
	LDA.w #$01BF
CODE_17EF6F:
	STA.w $0A46,x
	INX
	INX
	DEY
	BNE.b CODE_17EF6F
	LDX.b $20
	LDY.w #$0000
CODE_17EF7C:
	LDA.w DATA_17EE50,y
	STA.w $0A4E,x
	INX
	INX
	INY
	INY
	CPY.w #$0016
	BCC.b CODE_17EF7C
	LDY.w #$0000
	LDX.b $20
CODE_17EF90:
	LDA.w DATA_17EE66,y
	STA.w $0A86,x
	LDA.w DATA_17DDA3,y
	ORA.w #$0C00
	STA.w $0AC6,x
	STA.w $0B06,x
	STA.w $0B46,x
	STA.w $0B86,x
	STA.w $0BC6,x
	STA.w $0C06,x
	STA.w $0C46,x
	STA.w $0C86,x
	STA.w $0CC6,x
	LDA.w DATA_17DDE3,y
	ORA.w #$0C00
	STA.w $0D06,x
	INX
	INX
	INY
	INY
	CPY.w #$0040
	BCC.b CODE_17EF90
	LDY.w #$0000
	LDX.b $20
CODE_17EFCE:
	LDA.w DATA_17EEA6,y
	STA.w $0B8E,x
	LDA.w DATA_17EEB0,y
	STA.w $0B9A,x
	LDA.w DATA_17EEBA,y
	STA.w $0BA6,x
	LDA.w DATA_17EEC4,y
	STA.w $0BB2,x
	LDA.w DATA_17EECE,y
	STA.w $0CCE,x
	LDA.w DATA_17EED8,y
	STA.w $0CDA,x
	LDA.w DATA_17EEE2,y
	STA.w $0CE6,x
	INX
	INX
	INY
	INY
	CPY.w #$000A
	BCC.b CODE_17EFCE
	LDY.w #$0000
	LDX.b $20
CODE_17F006:
	LDA.w DATA_17EEEC,y
	STA.w $0BD6,x
	INX
	INX
	INY
	INY
	CPY.w #$001E
	BCC.b CODE_17F006
	LDX.b $20
	LDA.w #$2DFE
	STA.w $0C16,x
	STA.w $0C56,x
	STA.w $0C96,x
	ORA.w #$4000
	STA.w $0C32,x
	STA.w $0C72,x
	STA.w $0CB2,x
	LDA.w #$2DDA
	STA.w $0CD8,x
	ORA.w #$4000
	STA.w $0CF0,x
	LDA.w #$EDFC
	STA.w $0CF2,x
	LDY.w #$0000
	LDX.b $20
CODE_17F046:
	LDA.w DATA_17EF0A,y
	STA.w $0BF4,x
	LDA.w DATA_17EF14,y
	STA.w $0C34,x
	STA.w $0C74,x
	STA.w $0CB4,x
	LDA.w DATA_17EF1E,y
	STA.w !RAM_YI_Level_PauseScreenCursorLoc1,x
	INX
	INX
	INY
	INY
	CPY.w #$000A
	BCC.b CODE_17F046
	SEP.b #$10
	STZ.b $10
	LDX.w $1106
	BEQ.b CODE_17F075
	LDA.w #$0080
	STA.b $10
CODE_17F075:
	LDX.b #$00
CODE_17F077:
	LDA.w DATA_17DC27,x
	ORA.b $10
	ORA.w DATA_17EF38,x
	STA.b $00
	LDA.w DATA_17EF28,x
	CLC
	ADC.b $20
	STA.b $0A
	CLC
	ADC.w #$0040
	STA.b $0C
	CLC
	ADC.w #$0040
	STA.b $0E
	JSR.w CODE_17DC09
	INX
	INX
	CPX.b #$10
	BCC.b CODE_17F077
	LDA.w #$0010
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w #DATA_17EF48>>16
	STA.w $6000
	LDA.w #DATA_17EF48
	STA.w $6002
	LDX.b #FXCODE_08D995>>16
	LDA.w #FXCODE_08D995
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	SEP.b #$20
	LDA.w $1106
	EOR.b #$01
	AND.b #$01
	STA.w $1106
	JSR.w CODE_17CC6F
	INC.w $114E
	RTS

CODE_17F0CC:
	JSR.w CODE_17CC93
	BRA.b CODE_17F0D9

CODE_17F0D1:
	JSR.w CODE_17CCBA
	LDA.b #$11
	STA.w !RAM_YI_Global_MainScreenWindowMask
CODE_17F0D9:
	STZ.w $1118
	INC.w $114E
	BRA.b CODE_17F10D

CODE_17F0E1:
	JSR.w CODE_17CD12
	LDA.w $1118
	BEQ.b CODE_17F10D
	INC.w $114E
	REP.b #$20
	LDA.w $114E
	CMP.w #$000B
	BCC.b CODE_17F100
	LDA.w $1112
	ASL
	TAX
	LDA.w DATA_17E257,x
	BRA.b CODE_17F106

CODE_17F100:
	LDA.w #$5ACC
	STA.w $110C
CODE_17F106:
	STA.w $1109
	SEP.b #$20
	BRA.b CODE_17F117

CODE_17F10D:
	LDA.w $114E
	CMP.b #$0B
	BCC.b CODE_17F117
	JSR.w CODE_17D005
CODE_17F117:
	RTS

CODE_17F118:
	JSR.w CODE_17CD63
	STZ.w $1118
	INC.w $114E
	REP.b #$20
	LDA.w #$0007
	STA.w $1150
	SEP.b #$20
	RTS

DATA_17F12C:
	db $34,$32,$64,$32,$94,$32,$C4,$32,$34,$5A,$64,$5A,$94,$5A,$CC

DATA_17F13B:
	db $5A,$08

DATA_17F13D:
	db $0E,$00

DATA_17F13F:
	db $06,$04,$FC

CODE_17F142:
	LDA.w $110C
	ORA.w $110D
	BNE.b CODE_17F1C4
	LDA.b $38
	AND.b #$03
	BEQ.b CODE_17F188
	TAX
	LDA.w $1150
	CLC
	ADC.w DATA_17E183-$01,x
	BPL.b CODE_17F15C
	LDA.b #$07
CODE_17F15C:
	CMP.b #$08
	BCC.b CODE_17F162
	LDA.b #$00
CODE_17F162:
	STA.w $1150
	ASL
	TAY
	REP.b #$20
	LDA.w DATA_17F12C,y
	STA.w $110C
	SEP.b #$20
	TYA
	CMP.w DATA_17F13B,x
	BEQ.b CODE_17F17C
	CMP.w DATA_17F13D,x
	BNE.b CODE_17F186
CODE_17F17C:
	REP.b #$20
	LDA.w $110C
	STA.w $1109
	SEP.b #$20
CODE_17F186:
	BRA.b CODE_17F1AD

CODE_17F188:
	LDA.b $38
	AND.b #$0C
	BEQ.b CODE_17F1B5
	LSR
	LSR
	TAX
	LDA.w $1150
	CLC
	ADC.w DATA_17F13F,x
	BMI.b CODE_17F1B5
	CMP.b #$08
	BCS.b CODE_17F1B5
	STA.w $1150
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_17F12C,x
	STA.w $110C
	SEP.b #$20
CODE_17F1AD:
	LDA.b #!Define_YI_SoundID5C_ScrollTextbox
	JSL.l CODE_0085D2
	BRA.b CODE_17F1C4

CODE_17F1B5:
	LDA.b $37
	AND.b #$C0
	ORA.b $38
	AND.b #$D0
	BEQ.b CODE_17F1C4
	INC.w $114E
	BRA.b CODE_17F1C4

CODE_17F1C4:
	RTS

CODE_17F1C5:
	LDA.w $1150
	CMP.b #$07
	BNE.b CODE_17F1D3
	INC.w $114E
	LDA.b #!Define_YI_SoundID08_1up
	BRA.b CODE_17F1DA

CODE_17F1D3:
	LDA.b #$10
	STA.w $114E
	LDA.b #!Define_YI_SoundID5D_SelectLevel
CODE_17F1DA:
	JSL.l CODE_0085D2
	RTS

CODE_17F1DF:
	REP.b #$20
	LDA.w #$0C36
	LDX.w $1106
	BNE.b CODE_17F1ED
	CLC
	ADC.w #$0380
CODE_17F1ED:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDY.b #$00
	LDA.w #$398E
CODE_17F200:
	STA.b ($00),y
	STA.b ($02),y
	STA.b ($04),y
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17F200
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	STZ.w $1107
	LDA.w #$0067
	JSR.w CODE_17CFDA
	INC.w $114E
	SEP.b #$20
	JSR.w CODE_17D005
	RTS

CODE_17F226:
	LDA.b #$67
	JSR.w CODE_17CFDA
	LDA.w $1107
	CLC
	ADC.b #$08
	STA.w $1107
	CMP.b #$40
	BCC.b CODE_17F23B
	INC.w $114E
CODE_17F23B:
	JSR.w CODE_17D005
	RTS

CODE_17F23F:
	LDA.w $1107
	SEC
	SBC.b #$08
	STA.w $1107
	BPL.b CODE_17F250
	STZ.w $1107
	INC.w $114E
CODE_17F250:
	LDA.b #$67
	JSR.w CODE_17CFDA
	JSR.w CODE_17D005
	RTS

CODE_17F259:
	JSR.w CODE_17CC69
	STZ.w $1118
	INC.w $114E
	JSR.w CODE_17D005
	RTS

CODE_17F266:
	JSR.w CODE_17CD63
	STZ.w $1118
	STZ.w $114E
	LDA.b #$10
	STA.w !RAM_YI_Global_ColorMathInitialSettings
	STZ.w !RAM_YI_Global_MainScreenWindowMask
	REP.b #$20
	STZ.w $110C
	LDA.w $1112
	ASL
	TAX
	LDA.w DATA_17E257,x
	STA.w $1109
	SEP.b #$20
	RTS

CODE_17F28A:
	INC.w $114E
	LDA.w $1150
	ASL
	TAX
	REP.b #$20
	LDA.w DATA_17EF28,x
	LDX.w $1106
	BNE.b CODE_17F2A0
	CLC
	ADC.w #$0380
CODE_17F2A0:
	STA.b $00
	CLC
	ADC.w #$0040
	STA.b $02
	CLC
	ADC.w #$0040
	STA.b $04
	LDY.b #$00
CODE_17F2B0:
	LDA.w DATA_17C9C6,y
	ORA.w #$0C00
	STA.b ($00),y
	LDA.w DATA_17C9CC,y
	ORA.w #$0C00
	STA.b ($02),y
	LDA.w DATA_17C9D2,y
	ORA.w #$0C00
	STA.b ($04),y
	INY
	INY
	CPY.b #$06
	BCC.b CODE_17F2B0
	LDA.w #$1C20
	STA.b $04
	JSR.w CODE_17D52B
	STZ.w $110E
	LDA.w #$0100
	STA.w $1110
CODE_17F2DF:
	REP.b #$20
	LDX.w $1150
	LDA.w DATA_17EF48,x
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	TXA
	AND.w #$00FF
	CLC
	ADC.w #$0060
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w $110E
	AND.w #$00FF
	STA.w !REGISTER_SuperFX_R5_GeneralPurpose2Lo
	LDA.w $1110
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDX.b #FXCODE_08DC05>>16
	LDA.w #FXCODE_08DC05
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	JSR.w CODE_17E683
	REP.b #$20
	LDA.w $110E
	CLC
	ADC.w #$0008
	STA.w $110E
	LDA.w $1110
	DEC
	DEC
	STA.w $1110
	CMP.w #$0014
	BCS.b CODE_17F346
	SEP.b #$20
	LDA.b #!Define_YI_MusicID_FadeMusicCommand
	STA.b !RAM_YI_Global_PlayMusicLo
	LDA.b #!Define_YI_SoundID43_MountYoshi
	JSL.l CODE_0085D2
	REP.b #$20
	STZ.w $1110
	INC.w $114E
	LDA.w #$0002
	STA.w $1113
CODE_17F346:
	REP.b #$10
	LDX.w $6092
	LDA.w $1109
	AND.w #$00FF
	SEC
	SBC.w #$0010
	STA.w $6000,x
	STA.w $6010,x
	CLC
	ADC.w #$0010
	STA.w $6008,x
	STA.w $6018,x
	LDA.w $110A
	AND.w #$00FF
	SEC
	SBC.w #$0016
	STA.w $6002,x
	STA.w $600A,x
	CLC
	ADC.w #$0010
	STA.w $6012,x
	STA.w $601A,x
	LDA.w $1150
	ASL
	TAY
	LDA.w DATA_17EF38,y
	LSR
	SEC
	SBC.w #$0600
	ORA.w #$31E0
	STA.w $6004,x
	INC
	INC
	STA.w $600C,x
	INC
	INC
	STA.w $6014,x
	INC
	INC
	STA.w $601C,x
	LDA.w #$4002
	STA.w $6006,x
	STA.w $600E,x
	STA.w $6016,x
	STA.w $601E,x
	TXA
	CLC
	ADC.w #$0020
	STA.w $6092
	SEP.b #$30
	RTS

CODE_17F3BB:
	JSR.w CODE_17C9F6
	LDA.w $1114
	CMP.b #$0B
	BCC.b CODE_17F3C8
	INC.w $114E
CODE_17F3C8:
	RTS

DATA_17F3C9:
	db $00,$04,$0C,$12,$08,$16,$14

CODE_17F3D0:
	STZ.w $114E
	LDX.w $1150
	LDA.w DATA_17F3C9,x
	STA.w $03A7
	LDA.b #!Define_YI_GameMode2D
	STA.w !RAM_YI_Global_CurrentGameMode
	LDA.b #$FF
	STA.w $0374
	RTS

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($17F414, incbin, DATA_17F414_YI_U2.bin)
else
	%DATATABLE_YI_LevelDataPtrsAndEntranceData($17F3E7)
	%FREE_BYTES($17FCF7, 777, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank18-Bank19

macro YIBank4CMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)

	%InsertNextPreCompiledCodeBlock($4C0000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")

DATA_4CD61A:
	db $04 : dw $0019DA
	dw $0200,$0200,$0200,$0200,$0208,$0200,$0210,$020C
	dw $0204,$0200,$0210,$0200,$0208,$0200,$0210,$020C
	db $05 : dw $0019E2
	dw $0300,$0300,$0300,$0300,$030A,$0300,$0314,$030F
	dw $0305,$0300,$0314,$0300,$030A,$0300,$0314,$030F
	db $01 : dw $0019EC
	dw $0400,$0400,$0400,$0400,$0402,$0400,$0403,$0400
	dw $0401,$0400,$0403,$0400,$0402,$0400,$0403,$0400
	db $04 : dw $0019EE
	dw $0500,$0500,$0500,$0500,$0508,$0500,$0510,$050C
	dw $0504,$0500,$0510,$0500,$0508,$0500,$0510,$050C
	db $05 : dw $0019F6
	dw $0600,$0600,$0600,$0600,$060A,$0600,$0614,$060F
	dw $0605,$0600,$0614,$0600,$060A,$0600,$0614,$060F
	db $01 : dw $001A00
	dw $0700,$0700,$0700,$0700,$0702,$0700,$0703,$0700
	dw $0701,$0700,$0703,$0700,$0702,$0700,$0703,$0700
	db $09 : dw $001A02
	dw $0809,$0800,$0800,$0800,$0812,$0800,$0824,$081B
	dw $0809,$0800,$0824,$082D,$0812,$0836,$0824,$081B
	db $01 : dw $001A14
	dw $0901,$0900,$0900,$0900,$0902,$0900,$0904,$0903
	dw $0901,$0900,$0904,$0900,$0902,$0900,$0904,$0903
	db $09 : dw $001A16
	dw $0A09,$0A00,$0A00,$0A00,$0A12,$0A00,$0A24,$0A1B
	dw $0A09,$0A00,$0A24,$0A2D,$0A12,$0A36,$0A24,$0A1B
	db $01 : dw $001A28
	dw $0B01,$0B00,$0B00,$0B00,$0B02,$0B00,$0B04,$0B03
	dw $0B01,$0B00,$0B04,$0B00,$0B02,$0B00,$0B04,$0B03
	db $05 : dw $001A2A
	dw $0C05,$0C00,$0C00,$0C00,$0C0A,$0C00,$0C14,$0C0F
	dw $0C05,$0C00,$0C14,$0C00,$0C0A,$0C1E,$0C14,$0C0F
	db $06 : dw $001A34
	dw $0D06,$0D00,$0D00,$0D00,$0D0C,$0D00,$0D18,$0D12
	dw $0D06,$0D00,$0D18,$0D00,$0D0C,$0D24,$0D18,$0D12
	db $01 : dw $001A40
	dw $0E01,$0E00,$0E00,$0E00,$0E02,$0E00,$0E04,$0E03
	dw $0E01,$0E00,$0E04,$0E00,$0E02,$0E00,$0E04,$0E03
	db $07 : dw $001A42
	dw $0F07,$0F00,$0F00,$0F00,$0F0E,$0F00,$0F1C,$0F15
	dw $0F07,$0F00,$0F1C,$0F00,$0F0E,$0F2A,$0F1C,$0F15
	db $06 : dw $001A50
	dw $1006,$1000,$1000,$1000,$100C,$1000,$1018,$1012
	dw $1006,$1000,$1018,$1000,$100C,$1024,$1018,$1012
	db $01 : dw $001A5C
	dw $1101,$1100,$1100,$1100,$1102,$1100,$1104,$1103
	dw $1101,$1100,$1104,$1100,$1102,$1100,$1104,$1103
	db $01 : dw $001A5E
	dw $1201,$1200,$1200,$1200,$1202,$1200,$1204,$1203
	dw $1201,$1200,$1204,$1200,$1202,$1200,$1204,$1203
	db $01 : dw $001A60
	dw $1301,$1300,$1300,$1300,$1302,$1300,$1304,$1303
	dw $1301,$1300,$1304,$1300,$1302,$1300,$1304,$1303
	db $BF : dw $001A62
	dw $1A00,$1B00,$1B00,$1B00,$1B00,$1B00,$1B00,$1C00
	dw $1A00,$1B00,$1B00,$1B00,$1B00,$1B00,$1B00,$1C00
	db $32 : dw $001BE0
	dw $1900,$1D00,$1D00,$1D00,$1D00,$1D00,$1D00,$7000
	dw $1900,$1D00,$1D00,$1D00,$1D00,$1D00,$1D00,$7000
	db $01 : dw $001C44
	dw $1E00,$1E01,$1E00,$1E00,$1E00,$1E00,$1E00,$1E01
	dw $1E00,$1E01,$1E00,$1E00,$1E00,$1E00,$1E00,$1E01
	db $02 : dw $001C46
	dw $1F00,$1F02,$1F00,$1F00,$1F00,$1F00,$1F00,$1F02
	dw $1F00,$1F02,$1F00,$1F00,$1F00,$1F00,$1F00,$1F02
	db $01 : dw $001C4A
	dw $2000,$2001,$2000,$2000,$2000,$2000,$2000,$2001
	dw $2000,$2001,$2000,$2000,$2000,$2000,$2000,$2001
	db $01 : dw $001C4C
	dw $2100,$2101,$2100,$2100,$2100,$2100,$2100,$2101
	dw $2100,$2101,$2100,$2100,$2100,$2100,$2100,$2101
	db $01 : dw $001C4E
	dw $2200,$2201,$2200,$2200,$2200,$2200,$2200,$2201
	dw $2200,$2201,$2200,$2200,$2200,$2200,$2200,$2201
	db $01 : dw $001C50
	dw $2300,$2301,$2300,$2300,$2300,$2300,$2300,$2301
	dw $2300,$2301,$2300,$2300,$2300,$2300,$2300,$2301
	db $01 : dw $001C52
	dw $2400,$2401,$2400,$2400,$2400,$2400,$2400,$2401
	dw $2400,$2401,$2400,$2400,$2400,$2400,$2400,$2401
	db $01 : dw $001C54
	dw $2500,$2501,$2500,$2500,$2500,$2500,$2500,$2501
	dw $2500,$2501,$2500,$2500,$2500,$2500,$2500,$2501
	db $01 : dw $001C56
	dw $2600,$2601,$2600,$2600,$2600,$2600,$2600,$2601
	dw $2600,$2601,$2600,$2600,$2600,$2600,$2600,$2601
	db $01 : dw $001C58
	dw $2700,$2701,$2700,$2700,$2700,$2700,$2700,$2701
	dw $2700,$2701,$2700,$2700,$2700,$2700,$2700,$2701
	db $01 : dw $001C5A
	dw $2800,$2801,$2800,$2800,$2800,$2800,$2800,$2801
	dw $2800,$2801,$2800,$2800,$2800,$2800,$2800,$2801
	db $0F : dw $001C5C
	dw $2A0F,$2A00,$2A00,$2A00,$2A1E,$2A00,$2A00,$2A2D
	dw $2A0F,$2A00,$2A00,$2A00,$2A1E,$2A00,$2A00,$2A2D
	db $0C : dw $001C7A
	dw $380C,$3800,$3800,$3800,$3818,$3800,$3800,$3824
	dw $380C,$3800,$3800,$3800,$3818,$3848,$3800,$3824
	db $40 : dw $001C92
	dw $3E00,$3900,$3900,$3900,$3A00,$3900,$3900,$6E00
	dw $3E00,$3900,$3900,$3900,$3A00,$3900,$3900,$6E00
	db $0F : dw $001D12
	dw $3B0F,$3B00,$3B00,$3B00,$3B1E,$3B00,$3B00,$3B2D
	dw $3B0F,$3B00,$3B00,$3B00,$3B1E,$3B00,$3B00,$3B2D
	db $05 : dw $001D30
	dw $3F05,$3F00,$3F00,$3F00,$3F00,$3F00,$3F00,$3F0A
	dw $3F05,$3F00,$3F00,$3F00,$3F00,$3F00,$3F00,$3F0A
	db $01 : dw $001D3A
	dw $4001,$4000,$4000,$4000,$4000,$4000,$3000,$4002
	dw $4001,$4000,$4000,$4000,$4000,$4000,$3000,$4002
	db $01 : dw $001D3C
	dw $4101,$4100,$4100,$4100,$4100,$4100,$4100,$4102
	dw $4101,$4100,$4100,$4100,$4100,$4100,$4100,$4102
	db $01 : dw $001D3E
	dw $4201,$4200,$4200,$4200,$4200,$4200,$4200,$4202
	dw $4201,$4200,$4200,$4200,$4200,$4200,$4200,$4202
	db $01 : dw $001D40
	dw $4301,$4300,$4300,$4300,$4300,$4300,$4300,$4302
	dw $4301,$4300,$4300,$4300,$4300,$4300,$4300,$4302
	db $01 : dw $001D42
	dw $4401,$4400,$4400,$4400,$4400,$4400,$4400,$4402
	dw $4401,$4400,$4400,$4400,$4400,$4400,$4400,$4402
	db $01 : dw $001D44
	dw $4501,$4500,$4500,$4500,$4500,$4500,$4500,$4502
	dw $4501,$4500,$4500,$4500,$4500,$4500,$4500,$4502
	db $01 : dw $001D46
	dw $4601,$4600,$4600,$4600,$4600,$4600,$4600,$4602
	dw $4601,$4600,$4600,$4600,$4600,$4600,$4600,$4602
	db $01 : dw $001D48
	dw $4701,$4700,$4700,$4700,$4700,$4700,$4700,$4702
	dw $4701,$4700,$4700,$4700,$4700,$4700,$4700,$4702
	db $01 : dw $001D4A
	dw $4801,$4800,$4800,$4800,$4800,$4800,$4800,$4802
	dw $4801,$4800,$4800,$4800,$4800,$4800,$4800,$4802
	db $01 : dw $001D4C
	dw $4901,$4900,$4900,$4900,$4900,$4900,$4900,$4902
	dw $4901,$4900,$4900,$4900,$4900,$4900,$4900,$4902
	db $01 : dw $001D4E
	dw $4A01,$4A00,$4A00,$4A00,$4A00,$4A00,$4A00,$4A02
	dw $4A01,$4A00,$4A00,$4A00,$4A00,$4A00,$4A00,$4A02
	db $01 : dw $001D50
	dw $4B01,$4B00,$4B00,$4B00,$4B00,$4B00,$4B00,$4B02
	dw $4B01,$4B00,$4B00,$4B00,$4B00,$4B00,$4B00,$4B02
	db $01 : dw $001D52
	dw $4C01,$4C00,$4C00,$4C00,$4C00,$4C00,$4C00,$4C02
	dw $4C01,$4C00,$4C00,$4C00,$4C00,$4C00,$4C00,$4C02
	db $01 : dw $001D54
	dw $4D01,$4D00,$4D00,$4D00,$4D00,$4D00,$4D00,$4D02
	dw $4D01,$4D00,$4D00,$4D00,$4D00,$4D00,$4D00,$4D02
	db $01 : dw $001D56
	dw $4E01,$4E00,$4E00,$4E00,$4E00,$4E00,$4E00,$4E02
	dw $4E01,$4E00,$4E00,$4E00,$4E00,$4E00,$4E00,$4E02
	db $01 : dw $001D58
	dw $4F01,$4F00,$4F00,$4F00,$4F00,$4F00,$4F00,$4F02
	dw $4F01,$4F00,$4F00,$4F00,$4F00,$4F00,$4F00,$4F02
	db $01 : dw $001D5A
	dw $5001,$5000,$5000,$5000,$5000,$5000,$5000,$5002
	dw $5001,$5000,$5000,$5000,$5000,$5000,$5000,$5002
	db $01 : dw $001D5C
	dw $5101,$5100,$5100,$5100,$5100,$5100,$5100,$5102
	dw $5101,$5100,$5100,$5100,$5100,$5100,$5100,$5102
	db $01 : dw $001D5E
	dw $5201,$5200,$5200,$5200,$5200,$5200,$5200,$5202
	dw $5201,$5200,$5200,$5200,$5200,$5200,$5200,$5202
	db $02 : dw $001D60
	dw $5302,$5300,$5300,$5300,$5300,$5300,$5300,$5304
	dw $5302,$5300,$5300,$5300,$5300,$5300,$5300,$5304
	db $01 : dw $001D64
	dw $5401,$5400,$5400,$5400,$5400,$5400,$5400,$5402
	dw $5401,$5400,$5400,$5400,$5400,$5400,$5400,$5402
	db $02 : dw $001D66
	dw $5502,$5500,$5500,$5500,$5500,$5500,$5500,$5504
	dw $5502,$5500,$5500,$5500,$5500,$5500,$5500,$5504
	db $01 : dw $001D6A
	dw $5601,$5600,$5600,$5600,$5600,$5600,$5600,$5602
	dw $5601,$5600,$5600,$5600,$5600,$5600,$5600,$5602
	db $02 : dw $001D6C
	dw $5702,$5700,$5700,$5700,$5700,$5700,$5700,$5704
	dw $5702,$5700,$5700,$5700,$5700,$5700,$5700,$5704
	db $01 : dw $001D70
	dw $5801,$5800,$5800,$5800,$5800,$5800,$5800,$5802
	dw $5801,$5800,$5800,$5800,$5800,$5800,$5800,$5802
	db $02 : dw $001D72
	dw $5902,$5900,$5900,$5900,$5900,$5900,$5900,$5904
	dw $5902,$5900,$5900,$5900,$5900,$5900,$5900,$5904
	db $01 : dw $001D76
	dw $5A01,$5A00,$5A00,$5A00,$5A00,$5A00,$5A00,$5A02
	dw $5A01,$5A00,$5A00,$5A00,$5A00,$5A00,$5A00,$5A02
	db $04 : dw $001D78
	dw $5B04,$5B00,$5B00,$5B00,$5B00,$5B00,$5B00,$5B08
	dw $5B04,$5B00,$5B00,$5B0C,$5B00,$5B00,$5B00,$5B08
	db $01 : dw $001D80
	dw $5C01,$5C00,$5C00,$5C00,$5C00,$5C00,$5C00,$5C02
	dw $5C01,$5C00,$5C00,$5C00,$5C00,$5C00,$5C00,$5C02
	db $03 : dw $001D82
	dw $5D03,$5D00,$5D00,$5D00,$5D00,$5D00,$5D00,$5D06
	dw $5D03,$5D00,$5D00,$5D09,$5D00,$5D00,$5D00,$5D06
	db $01 : dw $001D88
	dw $5E00,$5E01,$5E00,$5E00,$5E00,$5E00,$5E00,$5E00
	dw $5E00,$5E01,$5E00,$5E00,$5E00,$5E00,$5E00,$5E01
	db $14 : dw $001D8A
	dw $6900,$6800,$6800,$6800,$6800,$6800,$6800,$7100
	dw $6800,$6800,$6800,$6800,$6800,$6800,$6800,$7100
	db $0E : dw $001DB2
	dw $6A0E,$6A00,$6A00,$6A00,$6A1C,$6A00,$6A00,$6A2A
	dw $6A0E,$6A00,$6A00,$6A00,$6A1C,$6A00,$6A00,$6A2A
	db $04 : dw $001DCE
	dw $6B04,$6B00,$6B00,$6B00,$6B08,$6B10,$6B00,$6B0C
	dw $6B04,$6B00,$6B00,$6B00,$6B08,$6B00,$6B00,$6B0C
	db $01 : dw $001DD6
	dw $6C01,$6C00,$6C00,$6C00,$6C02,$6C04,$6C00,$6C03
	dw $6C01,$6C00,$6C00,$6C00,$6C02,$6C00,$6C00,$6C03
	db $08 : dw $001DD8
	dw $9E08,$9E08,$9E08,$9E08,$9E08,$9E08,$9E00,$9E08
	dw $9E08,$9E08,$9E08,$9E08,$9E08,$9E08,$9E00,$9E08
	db $02 : dw $001DE8
	dw $9F00,$9F00,$9F00,$9F00,$9F00,$9F00,$9F00,$9F00
	dw $9F00,$9F00,$9F00,$9F00,$9F00,$9F00,$9F00,$9F00
	db $02 : dw $001DEC
	dw $A000,$A000,$A000,$A000,$A000,$A000,$A000,$A000
	dw $A000,$A000,$A000,$A000,$A000,$A000,$A000,$A000
	db $02 : dw $001DF0
	dw $A100,$A100,$A100,$A100,$A100,$A100,$A100,$A100
	dw $A100,$A100,$A100,$A100,$A100,$A100,$A100,$A100
	db $02 : dw $001DF4
	dw $A200,$A200,$A200,$A200,$A200,$A200,$A200,$A200
	dw $A200,$A200,$A200,$A200,$A200,$A200,$A200,$A200
	db $04 : dw $001DF8
	dw $A304,$A300,$A300,$A300,$A308,$A310,$A300,$A30C
	dw $A304,$A300,$A300,$A300,$A308,$A300,$A300,$A30C
	db $00

DATA_4CE0A2:
	incbin "LevelData/DATA_4CE0A2.bin"

DATA_4CE25E:
	incbin "LevelData/DATA_4CE25E.bin"

DATA_4CE976:
	incbin "LevelData/DATA_4CE976.bin"

DATA_4CEA17:
	incbin "LevelData/DATA_4CEA17.bin"

DATA_4CEACA:
	incbin "LevelData/DATA_4CEACA.bin"

DATA_4CF046:
	incbin "LevelData/DATA_4CF046.bin"

DATA_4CF3D9:
	incbin "LevelData/DATA_4CF3D9.bin"

DATA_4CF43B:
	incbin "LevelData/DATA_4CF43B.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
DATA_10F595:
	incbin "LevelData/DATA_10F595.bin"

DATA_10F6EF:
	incbin "LevelData/DATA_10F6EF.bin"

DATA_10F8DF:
	incbin "LevelData/DATA_10F8DF.bin"

DATA_10F9D3:
	incbin "LevelData/DATA_10F9D3.bin"

DATA_10FB77:
	incbin "LevelData/DATA_10FB77.bin"

DATA_10FBF2:
	incbin "LevelData/DATA_10FBF2.bin"

DATA_10FCE5:
	incbin "LevelData/DATA_10FCE5.bin"

DATA_10FD92:
	incbin "LevelData/DATA_10FD92.bin"

DATA_10FDA3:
	incbin "LevelData/DATA_10FDA3.bin"

DATA_10FE9E:
	incbin "LevelData/DATA_10FE9E.bin"

DATA_10FF39:
	incbin "LevelData/DATA_10FF39.bin"

DATA_10FF8F:
	incbin "LevelData/DATA_10FF8F.bin"

	%InsertGarbageData($4CFEE7, incbin, DATA_4CFEE7_YI_U2.bin)
else
DATA_4CF4D9:
	incbin "LevelData/DATA_4CF4D9.bin"

DATA_4CF9FC:
	incbin "LevelData/DATA_4CF9FC.bin"

DATA_4CFA82:
	incbin "LevelData/DATA_4CFA82.bin"

DATA_4CFC7A:
	incbin "LevelData/DATA_4CFC7A.bin"

DATA_4CFD2F:
	incbin "LevelData/DATA_4CFD2F.bin"

DATA_4CFE27:
	incbin "LevelData/DATA_4CFE27.bin"

DATA_4CFE3B:
	incbin "LevelData/DATA_4CFE3B.bin"

DATA_4CFE9A:
	incbin "LevelData/DATA_4CFE9A.bin"

	%FREE_BYTES($4CFEB7, 329, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank1A-Bank1B

macro YIBank4DMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)
	%InsertNextPreCompiledCodeBlock($4D0000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank1C-Bank1D

macro YIBank4EMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)

DATA_4E0000:
	incbin "SPC700/AthleticSampleBank.bin"

DATA_4E169C:
	incbin "SPC700/DATA_4E169C.bin"

DATA_4E23BF:
	incbin "SPC700/DATA_4E23BF.bin"

DATA_4E2C39:
	incbin "SPC700/DATA_4E2C39.bin"

DATA_4E38D2:
	incbin "SPC700/DATA_4E38D2.bin"

DATA_4E3E90:
	incbin "SPC700/EndingSampleBank.bin"

DATA_4EBBEC:
	incbin "SPC700/DATA_4EBBEC.bin"

DATA_4ED0FE:
	incbin "SPC700/DATA_4ED0FE.bin"

DATA_4ED5D0:
	incbin "SPC700/DATA_4ED5D0.bin"

DATA_4EE279:
	incbin "SPC700/CaveFortBossSampleBank.bin"

DATA_4EEC85:
	incbin "SPC700/BonusCastleBossGrasslandSampleBank.bin"

DATA_4EFEC1:
	incbin "SPC700/BowserSampleBank.bin":0-(($010000-DATA_4EFEC1)&$00FFFF)
.End:

%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank1E-Bank1F

macro YIBank4FMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)

	incbin "SPC700/BowserSampleBank.bin":(DATA_4EFEC1_End-DATA_4EFEC1)-

DATA_4F205D:
	incbin "SPC700/DATA_4F205D.bin"

DATA_4F33F0:
	incbin "SPC700/DATA_4F33F0.bin"

DATA_4F4122:
	incbin "SPC700/DATA_4F4122.bin"

DATA_4F5C48:
	incbin "SPC700/DATA_4F5C48.bin"

DATA_4F6E5A:
	incbin "SPC700/IntroMapCastleFortSampleBank.bin"

DATA_4F82E6:
	incbin "SPC700/GlobalSampleBank.bin"

DATA_4FFCB2:
	incbin "SPC700/DATA_4FFCB2.bin":0-(($010000-DATA_4FFCB2)&$00FFFF)
.End:

%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank20-Bank21

macro YIBank50Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)

	incbin "SPC700/DATA_4FFCB2.bin":(DATA_4FFCB2_End-DATA_4FFCB2)-

YI_SPCEngine:
;$500342
	incbin "SPC700/SPC700_Engine_YI.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($50B3FA, incbin, DATA_50B3FA_YI_U2.bin)
else
	%FREE_BYTES($50B3FA, 19462, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank22-Bank23

macro YIBank51Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertNextPreCompiledCodeBlock($510000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")

DATA_10F262:
	incbin "LevelData/DATA_10F262.bin"

DATA_10F4FA:
	incbin "LevelData/DATA_10F4FA.bin"

endif

DATA_510000:
	incbin "LevelData/DATA_510000.bin"

DATA_510691:
	incbin "LevelData/DATA_510691.bin"

DATA_510B51:
	incbin "LevelData/DATA_510B51.bin"

DATA_510EEC:
	incbin "LevelData/DATA_510EEC.bin"

DATA_510FDB:
	incbin "LevelData/DATA_510FDB.bin"

DATA_51106A:
	incbin "LevelData/DATA_51106A.bin"

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($51567B, incbin, DATA_51567B_YI_U2.bin)
else
	%InsertNextPreCompiledCodeBlock($5110DB, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
	%FREE_BYTES($515348, 44216, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank24-Bank25

macro YIBank52Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)
	%InsertNextPreCompiledCodeBlock($520000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank26-Bank27

macro YIBank53Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)
	%InsertNextPreCompiledCodeBlock($530000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank28-Bank29

macro YIBank54Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)
	%InsertNextPreCompiledCodeBlock($540000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank2A-Bank2B

macro YIBank55Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)
	%InsertNextPreCompiledCodeBlock($550000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank2C-Bank2D

macro YIBank56Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)
	%InsertNextPreCompiledCodeBlock($560000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")

DATA_568000:
	incbin "Graphics/GFX_568000.bin"

%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: Bank2E-Bank3F

macro YIBank57Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%EnableSuperFXHiROMMirroring(<StartBank>)
check bankcross off

	%InsertNextPreCompiledCodeBlock($570000, YI_SuperFXCode, "SuperFX/SuperFXCode_YI.bin")

DATA_573C00:
	incbin "Graphics/GFX_573C00.lz1"

DATA_5748E9:
	incbin "Graphics/GFX_5748E9.lz1"

DATA_57555B:
	incbin "Graphics/GFX_57555B.lz1"

DATA_576234:
	incbin "Graphics/GFX_576234.lz1"

DATA_576EAB:
	incbin "Graphics/GFX_576EAB.lz1"

DATA_5778F9:
	incbin "Graphics/GFX_5778F9.lz1"

DATA_57826C:
	incbin "Graphics/GFX_57826C.lz1"

DATA_578DB8:
	incbin "Graphics/GFX_578DB8.lz1"

DATA_579952:
	incbin "Graphics/GFX_579952.lz1"

DATA_57A56A:
	incbin "Graphics/GFX_57A56A.lz1"

DATA_57AECB:
	incbin "Graphics/GFX_57AECB.lz1"

DATA_57B9B0:
	incbin "Graphics/GFX_57B9B0.lz1"

DATA_57C271:
	incbin "Graphics/GFX_57C271.lz1"

DATA_57CEA1:
	incbin "Graphics/GFX_57CEA1.lz1"

DATA_57DBBA:
	incbin "Graphics/GFX_57DBBA.lz1"

DATA_57E85A:
	incbin "Graphics/GFX_57E85A.lz1"

DATA_57F3C7:
	incbin "Graphics/GFX_57F3C7.lz1"

DATA_57F85E:
	incbin "Graphics/GFX_57F85E.lz1"

DATA_57FDEA:
	incbin "Graphics/GFX_57FDEA.lz1"

DATA_58025D:
	incbin "Graphics/GFX_58025D.lz1"

DATA_5803E1:
	incbin "Graphics/GFX_5803E1.lz1"

DATA_5808D6:
	incbin "Graphics/GFX_5808D6.lz1"

DATA_580C65:
	incbin "Graphics/GFX_580C65.lz1"

DATA_580FCD:
	incbin "Graphics/GFX_580FCD.lz1"

DATA_5814E1:
	incbin "Graphics/GFX_5814E1.lz1"

DATA_581B2C:
	incbin "Graphics/GFX_581B2C.lz1"

DATA_581FDA:
	incbin "Graphics/GFX_581FDA.lz1"

DATA_5822D0:
	incbin "Graphics/GFX_5822D0.lz1"

DATA_58285E:
	incbin "Graphics/GFX_58285E.lz1"

DATA_582FC1:
	incbin "Graphics/GFX_582FC1.lz1"

DATA_5835E2:
	incbin "Graphics/GFX_5835E2.lz1"

DATA_583C34:
	incbin "Graphics/GFX_583C34.lz1"

DATA_584016:
	incbin "Graphics/GFX_584016.lz1"

DATA_58451B:
	incbin "Graphics/GFX_58451B.lz1"

DATA_584A74:
	incbin "Graphics/GFX_584A74.lz1"

DATA_584FBF:
	incbin "Graphics/GFX_584FBF.lz1"

DATA_585A68:
	incbin "Graphics/GFX_585A68.lz1"

DATA_586597:
	incbin "Graphics/GFX_586597.lz1"

DATA_58720F:
	incbin "Graphics/GFX_58720F.lz1"

DATA_587E21:
	incbin "Graphics/GFX_587E21.lz1"

DATA_5883AF:
	incbin "Graphics/GFX_5883AF.lz1"

DATA_5888CD:
	incbin "Graphics/GFX_5888CD.lz1"

DATA_588E8F:
	incbin "Graphics/GFX_588E8F.lz1"

DATA_589574:
	incbin "Graphics/GFX_589574.lz1"

DATA_589AE6:
	incbin "Graphics/GFX_589AE6.lz1"

DATA_589D4F:
	incbin "Graphics/GFX_589D4F.lz1"

DATA_589FC4:
	incbin "Graphics/GFX_589FC4.lz1"

DATA_58A2CD:
	incbin "Graphics/GFX_58A2CD.lz1"

DATA_58A5D2:
	incbin "Graphics/GFX_58A5D2.lz1"

DATA_58B241:
	incbin "Graphics/GFX_58B241.lz1"

DATA_58BE20:
	incbin "Graphics/GFX_58BE20.lz1"

DATA_58C992:
	incbin "Graphics/GFX_58C992.lz1"

DATA_58D774:
	incbin "Graphics/GFX_58D774.lz1"

DATA_58E471:
	incbin "Graphics/GFX_58E471.lz1"

DATA_58EE33:
	incbin "Graphics/GFX_58EE33.lz1"

DATA_58F928:
	incbin "Graphics/GFX_58F928.lz1"

DATA_5902AB:
	incbin "Graphics/GFX_5902AB.lz1"

DATA_590E7D:
	incbin "Graphics/GFX_590E7D.lz1"

DATA_591A64:
	incbin "Graphics/GFX_591A64.lz1"

DATA_592757:
	incbin "Graphics/GFX_592757.lz1"

DATA_593432:
	incbin "Graphics/GFX_593432.lz1"

DATA_5941AC:
	incbin "Graphics/GFX_5941AC.lz1"

DATA_594E69:
	incbin "Graphics/GFX_594E69.lz1"

DATA_595892:
	incbin "Graphics/GFX_595892.lz1"

DATA_5964EC:
	incbin "Graphics/GFX_5964EC.lz1"

DATA_597241:
	incbin "Graphics/GFX_597241.lz1"

DATA_597F14:
	incbin "Graphics/GFX_597F14.lz1"

DATA_598ABB:
	incbin "Graphics/GFX_598ABB.lz1"

DATA_5996AF:
	incbin "Graphics/GFX_5996AF.lz1"

DATA_599C37:
	incbin "Graphics/GFX_599C37.lz1"

DATA_59A7C1:
	incbin "Graphics/GFX_59A7C1.lz1"

DATA_59B3E4:
	incbin "Graphics/GFX_59B3E4.lz1"

DATA_59C08B:
	incbin "Graphics/GFX_59C08B.lz1"

DATA_59CD17:
	incbin "Graphics/GFX_59CD17.lz1"

DATA_59D92C:
	incbin "Graphics/GFX_59D92C.lz1"

DATA_59ED9E:
	incbin "Graphics/GFX_59ED9E.lz1"

DATA_5A05C4:
	incbin "Graphics/GFX_5A05C4.lz1"

DATA_5A1135:
	incbin "Graphics/GFX_5A1135.lz1"

DATA_5A17A3:
	incbin "Graphics/GFX_5A17A3.lz1"

DATA_5A1CED:
	incbin "Graphics/GFX_5A1CED.lz1"

DATA_5A235C:
	incbin "Graphics/GFX_5A235C.lz1"

DATA_5A28D6:
	incbin "Graphics/GFX_5A28D6.lz1"

DATA_5A2EE2:
	incbin "Graphics/GFX_5A2EE2.lz1"

DATA_5A3453:
	incbin "Graphics/GFX_5A3453.lz1"

DATA_5A3944:
	incbin "Graphics/GFX_5A3944.lz1"

DATA_5A4110:
	incbin "Graphics/GFX_5A4110.lz1"

DATA_5A4608:
	incbin "Graphics/GFX_5A4608.lz1"

DATA_5A4C5F:
	incbin "Graphics/GFX_5A4C5F.lz1"

DATA_5A53A6:
	incbin "Graphics/GFX_5A53A6.lz1"

DATA_5A5905:
	incbin "Graphics/GFX_5A5905.lz1"

DATA_5A5E25:
	incbin "Graphics/GFX_5A5E25.lz1"

DATA_5A64A1:
	incbin "Graphics/GFX_5A64A1.lz1"

DATA_5A6952:
	incbin "Graphics/GFX_5A6952.lz1"

DATA_5A6DE8:
	incbin "Graphics/GFX_5A6DE8.lz1"

DATA_5A736D:
	incbin "Graphics/GFX_5A736D.lz1"

DATA_5A7994:
	incbin "Graphics/GFX_5A7994.lz1"

DATA_5A8748:
	incbin "Graphics/GFX_5A8748.lz1"

DATA_5A9257:
	incbin "Graphics/GFX_5A9257.lz1"

DATA_5A97E0:
	incbin "Graphics/GFX_5A97E0.lz1"

DATA_5A9C3D:
	incbin "Graphics/GFX_5A9C3D.lz1"

DATA_5AA0EF:
	incbin "Graphics/GFX_5AA0EF.lz1"

DATA_5AA75A:
	incbin "Graphics/GFX_5AA75A.lz1"

DATA_5AAD40:
	incbin "Graphics/GFX_5AAD40.lz1"

DATA_5AB189:
	incbin "Graphics/GFX_5AB189.lz1"

DATA_5AB630:
	incbin "Graphics/GFX_5AB630.lz1"

DATA_5ABC4D:
	incbin "Graphics/GFX_5ABC4D.lz1"

DATA_5ACAD1:
	incbin "Graphics/GFX_5ACAD1.lz1"

DATA_5AD992:
	incbin "Graphics/GFX_5AD992.lz1"

DATA_5AE7A0:
	incbin "Graphics/GFX_5AE7A0.lz1"

DATA_5AF2D5:
	incbin "Graphics/GFX_5AF2D5.lz1"

DATA_5AFE28:
	incbin "Graphics/GFX_5AFE28.lz1"

DATA_5B03C0:
	incbin "Graphics/GFX_5B03C0.lz1"

DATA_5B08CC:
	incbin "Graphics/GFX_5B08CC.lz1"

DATA_5B0C94:
	incbin "Graphics/GFX_5B0C94.lz1"

DATA_5B121D:
	incbin "Graphics/GFX_5B121D.lz1"

DATA_5B17A1:
	incbin "Tilemaps/DATA_5B17A1.lz1"

DATA_5B1A25:
	incbin "Tilemaps/DATA_5B1A25.lz1"

DATA_5B1CC2:
	incbin "Tilemaps/DATA_5B1CC2.lz1"

DATA_5B2058:
	incbin "Tilemaps/DATA_5B2058.lz1"

DATA_5B2323:
	incbin "Tilemaps/DATA_5B2323.lz1"

DATA_5B25DB:
	incbin "Tilemaps/DATA_5B25DB.lz1"

DATA_5B278F:
	incbin "Tilemaps/DATA_5B278F.lz1"

DATA_5B28B2:
	incbin "Tilemaps/DATA_5B28B2.lz1"

DATA_5B2A43:
	incbin "Tilemaps/DATA_5B2A43.lz1"

DATA_5B2BAB:
	incbin "Tilemaps/DATA_5B2BAB.lz1"

DATA_5B2EA9:
	incbin "Tilemaps/DATA_5B2EA9.lz1"

DATA_5B32B7:
	incbin "Tilemaps/DATA_5B32B7.lz1"

DATA_5B35C3:
	incbin "Tilemaps/DATA_5B35C3.lz1"

DATA_5B3942:
	incbin "Tilemaps/DATA_5B3942.lz1"

DATA_5B3C69:
	incbin "Tilemaps/DATA_5B3C69.lz1"

DATA_5B40C4:
	incbin "Tilemaps/DATA_5B40C4.lz1"

DATA_5B457B:
	incbin "Tilemaps/DATA_5B457B.lz1"

DATA_5B4937:
	incbin "Tilemaps/DATA_5B4937.lz1"

DATA_5B4D88:
	incbin "Tilemaps/DATA_5B4D88.lz1"

DATA_5B51E9:
	incbin "Tilemaps/DATA_5B51E9.lz1"

DATA_5B561D:
	incbin "Tilemaps/DATA_5B561D.lz1"

DATA_5B5A43:
	incbin "Tilemaps/DATA_5B5A43.lz1"

DATA_5B5DE5:
	incbin "Tilemaps/DATA_5B5DE5.lz1"

DATA_5B6042:
	incbin "Tilemaps/DATA_5B6042.lz1"

DATA_5B6270:
	incbin "Tilemaps/DATA_5B6270.lz1"

DATA_5B6446:
	incbin "Tilemaps/DATA_5B6446.lz1"

DATA_5B6718:
	incbin "Tilemaps/DATA_5B6718.lz1"

DATA_5B69A5:
	incbin "Tilemaps/DATA_5B69A5.lz1"

DATA_5B6C06:
	incbin "Tilemaps/DATA_5B6C06.lz1"

DATA_5B6DDC:
	incbin "Tilemaps/DATA_5B6DDC.lz1"

DATA_5B70B5:
	incbin "Tilemaps/DATA_5B70B5.lz1"

DATA_5B7361:
	incbin "Tilemaps/DATA_5B7361.lz1"

DATA_5B75AB:
	incbin "Tilemaps/DATA_5B75AB.lz1"

DATA_5B77F0:
	incbin "Tilemaps/DATA_5B77F0.lz1"

DATA_5B7AA3:
	incbin "Tilemaps/DATA_5B7AA3.lz1"

DATA_5B7B89:
	incbin "Tilemaps/DATA_5B7B89.lz1"

DATA_5B7D18:
	incbin "Tilemaps/DATA_5B7D18.lz1"

DATA_5B7EBC:
	incbin "Tilemaps/DATA_5B7EBC.lz1"

DATA_5B8070:
	incbin "Tilemaps/DATA_5B8070.lz1"

DATA_5B83C7:
	incbin "Tilemaps/DATA_5B83C7.lz1"

DATA_5B85A0:
	incbin "Tilemaps/DATA_5B85A0.lz1"

DATA_5B8C16:
	incbin "Tilemaps/DATA_5B8C16.lz1"

DATA_5B8CE5:
	incbin "Tilemaps/DATA_5B8CE5.lz1"

DATA_5B8D8F:
	incbin "Tilemaps/DATA_5B8D8F.lz1"

DATA_5B8E39:
	incbin "Tilemaps/DATA_5B8E39.lz1"

DATA_5B8F62:
	incbin "Tilemaps/DATA_5B8F62.lz1"

DATA_5B9179:
	incbin "Tilemaps/DATA_5B9179.lz1"

DATA_5B92A1:
	incbin "Tilemaps/DATA_5B92A1.lz1"

DATA_5B92AD:
	incbin "Tilemaps/DATA_5B92AD.lz1"

DATA_5B93BC:
	incbin "Tilemaps/DATA_5B93BC.lz1"

DATA_5B93C8:
	incbin "Tilemaps/DATA_5B93C8.lz1"

DATA_5B94C1:
	incbin "Tilemaps/DATA_5B94C1.lz1"

DATA_5B9588:
	incbin "Tilemaps/DATA_5B9588.lz1"

DATA_5B9669:
	incbin "Tilemaps/DATA_5B9669.lz1"

DATA_5B9A2E:
	incbin "Tilemaps/DATA_5B9A2E.lz1"

DATA_5B9BF5:
	incbin "Tilemaps/DATA_5B9BF5.lz1"

DATA_5B9F48:
	incbin "Tilemaps/DATA_5B9F48.lz1"

DATA_5BA1BE:
	incbin "Tilemaps/DATA_5BA1BE.lz1"

DATA_5BA405:
	incbin "Tilemaps/DATA_5BA405.lz1"

DATA_5BA6A5:
	incbin "Tilemaps/DATA_5BA6A5.lz1"

DATA_5BA99E:
	incbin "Tilemaps/DATA_5BA99E.lz1"

DATA_5BAD4E:
	incbin "Tilemaps/DATA_5BAD4E.lz1"

DATA_5BAE23:
	incbin "Tilemaps/DATA_5BAE23.lz1"

DATA_5BBAC5:
	incbin "Tilemaps/DATA_5BBAC5.lz1"

DATA_5BBE47:
	incbin "Tilemaps/DATA_5BBE47.lz1"

DATA_5BC472:
	incbin "Tilemaps/DATA_5BC472.lz1"

DATA_5BCB3F:
	incbin "Tilemaps/DATA_5BCB3F.lz1"

DATA_5BD161:
	incbin "Tilemaps/DATA_5BD161.lz1"

DATA_5BD781:
	incbin "Tilemaps/DATA_5BD781.lz1"

DATA_5BDC95:
	incbin "Tilemaps/DATA_5BDC95.lz1"

DATA_5BE14B:
	incbin "Tilemaps/DATA_5BE14B.lz1"

DATA_5BE7E6:
	incbin "Tilemaps/DATA_5BE7E6.lz1"

DATA_5BEDDD:
	incbin "Tilemaps/DATA_5BEDDD.lz1"

DATA_5BF3C3:
	incbin "Tilemaps/DATA_5BF3C3.lz1"

DATA_5BF986:
	incbin "Tilemaps/DATA_5BF986.lz1"

DATA_5BFCA8:
	incbin "Tilemaps/DATA_5BFCA8.lz1"

DATA_5C0892:
	incbin "Tilemaps/DATA_5C0892.lz1"

DATA_5C0BEA:
	incbin "Tilemaps/DATA_5C0BEA.lz1"

DATA_5C12CD:
	incbin "Tilemaps/DATA_5C12CD.lz1"

DATA_5C145A:
	incbin "Tilemaps/DATA_5C145A.lz1"

DATA_5C1996:
	incbin "Tilemaps/DATA_5C1996.lz1"

DATA_5C1BFA:
	incbin "Tilemaps/DATA_5C1BFA.lz1"

DATA_5C1DA2:
	incbin "Tilemaps/DATA_5C1DA2.lz1"

DATA_5C1ED3:
	incbin "Tilemaps/DATA_5C1ED3.lz1"

DATA_5C24BA:
	incbin "Tilemaps/DATA_5C24BA.lz1"

DATA_5C2658:
	incbin "Tilemaps/DATA_5C2658.lz1"

DATA_5C28B0:
	incbin "Tilemaps/DATA_5C28B0.lz1"

DATA_5C2A9D:
	incbin "Tilemaps/DATA_5C2A9D.lz1"

DATA_5C340D:
	incbin "Tilemaps/DATA_5C340D.lz1"

DATA_5C3545:
	incbin "Tilemaps/DATA_5C3545.lz1"

DATA_5C3A30:
	incbin "Tilemaps/DATA_5C3A30.lz1"

DATA_5C3D29:
	incbin "Tilemaps/DATA_5C3D29.lz1"

DATA_5C3EDA:
	incbin "Tilemaps/DATA_5C3EDA.lz1"

DATA_5C437B:
	incbin "Tilemaps/DATA_5C437B.lz1"

DATA_5C4711:
	incbin "Tilemaps/DATA_5C4711.lz1"

DATA_5C490A:
	incbin "Tilemaps/DATA_5C490A.lz1"

DATA_5C50AB:
	incbin "Tilemaps/DATA_5C50AB.lz1"

DATA_5C532C:
	incbin "Tilemaps/DATA_5C532C.lz1"

DATA_5C5727:
	incbin "Tilemaps/DATA_5C5727.lz1"

DATA_5C573B:
	incbin "Tilemaps/DATA_5C573B.lz1"

DATA_5C5839:
	incbin "Tilemaps/DATA_5C5839.lz1"

DATA_5C5CA3:
	incbin "Tilemaps/DATA_5C5CA3.lz1"

DATA_5C5D18:
	incbin "Tilemaps/DATA_5C5D18.lz1"

DATA_5C6148:
	incbin "Tilemaps/DATA_5C6148.lz1"

DATA_5C63B8:
	incbin "Tilemaps/DATA_5C63B8.lz1"

DATA_5C654D:
	incbin "Tilemaps/DATA_5C654D.lz1"

DATA_5C6564:
	incbin "Tilemaps/DATA_5C6564.lz1"

DATA_5C6790:
	incbin "Tilemaps/DATA_5C6790.lz1"

DATA_5C69A5:
	incbin "Tilemaps/DATA_5C69A5.lz1"

DATA_5C6C1C:
	incbin "Tilemaps/DATA_5C6C1C.lz1"

DATA_5C6E1A:
	incbin "Tilemaps/DATA_5C6E1A.lz1"

DATA_5C6E26:
	incbin "Tilemaps/DATA_5C6E26.lz1"

DATA_5C6E32:
	incbin "Tilemaps/DATA_5C6E32.lz1"

DATA_5C6E3E:
	incbin "Tilemaps/DATA_5C6E3E.lz1"

DATA_5C7083:
	incbin "Tilemaps/DATA_5C7083.lz1"

DATA_5C7170:
	incbin "Tilemaps/DATA_5C7170.lz1"

DATA_5C7532:
	incbin "Tilemaps/DATA_5C7532.lz1"

DATA_5C7782:
	incbin "Tilemaps/DATA_5C7782.lz1"

DATA_5C7A54:
	incbin "Tilemaps/DATA_5C7A54.lz1"

DATA_5C7C40:
	incbin "Tilemaps/DATA_5C7C40.lz1"

DATA_5C7D9D:
	incbin "Tilemaps/DATA_5C7D9D.lz1"

DATA_5C7FD3:
	incbin "Tilemaps/DATA_5C7FD3.lz1"

DATA_5C84DD:
	incbin "Tilemaps/DATA_5C84DD.lz1"

DATA_5C84EE:
	incbin "Tilemaps/DATA_5C84EE.lz1"

DATA_5C8653:
	incbin "Tilemaps/DATA_5C8653.lz1"

DATA_5C86E9:
	incbin "Tilemaps/DATA_5C86E9.lz1"

DATA_5C8892:
	incbin "Tilemaps/DATA_5C8892.lz1"

DATA_5C8A60:
	incbin "Tilemaps/DATA_5C8A60.lz1"

DATA_5C8DA4:
	incbin "Tilemaps/DATA_5C8DA4.lz1"

DATA_5C8DC6:
	incbin "Tilemaps/DATA_5C8DC6.lz1"

DATA_5C8EF6:
	incbin "Tilemaps/DATA_5C8EF6.lz1"

DATA_5C9024:
	incbin "Tilemaps/DATA_5C9024.lz1"

DATA_5C90C8:
	incbin "Tilemaps/DATA_5C90C8.lz1"

DATA_5C9456:
	incbin "Tilemaps/DATA_5C9456.lz1"

DATA_5C94CD:
	incbin "Tilemaps/DATA_5C94CD.lz1"

DATA_5C97A4:
	incbin "Tilemaps/DATA_5C97A4.lz1"

DATA_5C981D:
	incbin "Tilemaps/DATA_5C981D.lz1"

DATA_5C98D3:
	incbin "Tilemaps/DATA_5C98D3.lz1"

DATA_5C9AC1:
	incbin "Tilemaps/DATA_5C9AC1.lz1"

DATA_5C9D51:
	incbin "Tilemaps/DATA_5C9D51.lz1"

DATA_5CA15C:
	incbin "Tilemaps/DATA_5CA15C.lz1"

DATA_5CA51B:
	incbin "Tilemaps/DATA_5CA51B.lz1"

DATA_5CA62A:
	incbin "Tilemaps/DATA_5CA62A.lz1"

DATA_5CA824:
	incbin "Tilemaps/DATA_5CA824.lz1"

DATA_5CACB2:
	incbin "Tilemaps/DATA_5CACB2.lz1"

DATA_5CAF37:
	incbin "Tilemaps/DATA_5CAF37.lz1"

DATA_5CB2B0:
	incbin "Tilemaps/DATA_5CB2B0.lz1"

DATA_5CB518:
	incbin "Tilemaps/DATA_5CB518.lz1"

DATA_5CB71B:
	incbin "Tilemaps/DATA_5CB71B.lz1"

DATA_5CB929:
	incbin "Tilemaps/DATA_5CB929.lz1"

DATA_5CBA89:
	incbin "Graphics/GFX_5CBA89.lz16"

DATA_5CC342:
	incbin "Graphics/GFX_5CC342.lz16"

DATA_5CCB44:
	incbin "Graphics/GFX_5CCB44.lz16"

DATA_5CD671:
	incbin "Graphics/GFX_5CD671.lz16"

DATA_5CDFC6:
	incbin "Graphics/GFX_5CDFC6.lz16"

DATA_5CE630:
	incbin "Graphics/GFX_5CE630.lz16"

DATA_5CEEE1:
	incbin "Graphics/GFX_5CEEE1.lz16"

DATA_5CF376:
	incbin "Graphics/GFX_5CF376.lz16"

DATA_5CF91E:
	incbin "Graphics/GFX_5CF91E.lz16"

DATA_5CFF0B:
	incbin "Graphics/GFX_5CFF0B.lz16"

DATA_5D04ED:
	incbin "Graphics/GFX_5D04ED.lz16"

DATA_5D0FEB:
	incbin "Graphics/GFX_5D0FEB.lz16"

DATA_5D180F:
	incbin "Graphics/GFX_5D180F.lz16"

DATA_5D1FFF:
	incbin "Graphics/GFX_5D1FFF.lz16"

DATA_5D26DE:
	incbin "Graphics/GFX_5D26DE.lz16"

DATA_5D2F69:
	incbin "Graphics/GFX_5D2F69.lz16"

DATA_5D351B:
	incbin "Graphics/GFX_5D351B.lz16"

DATA_5D3A65:
	incbin "Graphics/GFX_5D3A65.lz16"

DATA_5D3F7A:
	incbin "Graphics/GFX_5D3F7A.lz16"

DATA_5D4050:
	incbin "Graphics/GFX_5D4050.lz16"

DATA_5D46D0:
	incbin "Graphics/GFX_5D46D0.lz16"

DATA_5D4B93:
	incbin "Graphics/GFX_5D4B93.lz16"

DATA_5D511D:
	incbin "Graphics/GFX_5D511D.lz16"

DATA_5D57EE:
	incbin "Graphics/GFX_5D57EE.lz16"

DATA_5D5D3A:
	incbin "Graphics/GFX_5D5D3A.lz16"

DATA_5D6469:
	incbin "Graphics/GFX_5D6469.lz16"

DATA_5D6ACF:
	incbin "Graphics/GFX_5D6ACF.lz16"

DATA_5D6C99:
	incbin "Graphics/GFX_5D6C99.lz16"

DATA_5D6DAC:
	incbin "Graphics/GFX_5D6DAC.lz16"

DATA_5D6EA2:
	incbin "Graphics/GFX_5D6EA2.lz16"

DATA_5D7033:
	incbin "Graphics/GFX_5D7033.lz16"

DATA_5D728B:
	incbin "Graphics/GFX_5D728B.lz16"

DATA_5D7466:
	incbin "Graphics/GFX_5D7466.lz16"

DATA_5D7623:
	incbin "Graphics/GFX_5D7623.lz16"

DATA_5D7810:
	incbin "Graphics/GFX_5D7810.lz16"

DATA_5D79BB:
	incbin "Graphics/GFX_5D79BB.lz16"

DATA_5D7B30:
	incbin "Graphics/GFX_5D7B30.lz16"

DATA_5D7C85:
	incbin "Graphics/GFX_5D7C85.lz16"

DATA_5D7E57:
	incbin "Graphics/GFX_5D7E57.lz16"

DATA_5D80A3:
	incbin "Graphics/GFX_5D80A3.lz16"

DATA_5D82C8:
	incbin "Graphics/GFX_5D82C8.lz16"

DATA_5D845B:
	incbin "Graphics/GFX_5D845B.lz16"

DATA_5D86B4:
	incbin "Graphics/GFX_5D86B4.lz16"

DATA_5D87F8:
	incbin "Graphics/GFX_5D87F8.lz16"

DATA_5D8990:
	incbin "Graphics/GFX_5D8990.lz16"

DATA_5D8B43:
	incbin "Graphics/GFX_5D8B43.lz16"

DATA_5D8D2D:
	incbin "Graphics/GFX_5D8D2D.lz16"

DATA_5D8E69:
	incbin "Graphics/GFX_5D8E69.lz16"

DATA_5D8FC6:
	incbin "Graphics/GFX_5D8FC6.lz16"

DATA_5D90F8:
	incbin "Graphics/GFX_5D90F8.lz16"

DATA_5D9242:
	incbin "Graphics/GFX_5D9242.lz16"

DATA_5D93BD:
	incbin "Graphics/GFX_5D93BD.lz16"

DATA_5D952A:
	incbin "Graphics/GFX_5D952A.lz16"

DATA_5D969C:
	incbin "Graphics/GFX_5D969C.lz16"

DATA_5D98F0:
	incbin "Graphics/GFX_5D98F0.lz16"

DATA_5D9AEC:
	incbin "Graphics/GFX_5D9AEC.lz16"

DATA_5D9C49:
	incbin "Graphics/GFX_5D9C49.lz16"

DATA_5D9DC6:
	incbin "Graphics/GFX_5D9DC6.lz16"

DATA_5D9FFA:
	incbin "Graphics/GFX_5D9FFA.lz16"

DATA_5DA191:
	incbin "Graphics/GFX_5DA191.lz16"

DATA_5DA389:
	incbin "Graphics/GFX_5DA389.lz16"

DATA_5DA536:
	incbin "Graphics/GFX_5DA536.lz16"

DATA_5DA714:
	incbin "Graphics/GFX_5DA714.lz16"

DATA_5DA960:
	incbin "Graphics/GFX_5DA960.lz16"

DATA_5DAB59:
	incbin "Graphics/GFX_5DAB59.lz16"

DATA_5DACF1:
	incbin "Graphics/GFX_5DACF1.lz16"

DATA_5DAE74:
	incbin "Graphics/GFX_5DAE74.lz16"

DATA_5DAFBA:
	incbin "Graphics/GFX_5DAFBA.lz16"

DATA_5DB0F3:
	incbin "Graphics/GFX_5DB0F3.lz16"

DATA_5DB321:
	incbin "Graphics/GFX_5DB321.lz16"

DATA_5DB48B:
	incbin "Graphics/GFX_5DB48B.lz16"

DATA_5DB5F0:
	incbin "Graphics/GFX_5DB5F0.lz16"

DATA_5DB80E:
	incbin "Graphics/GFX_5DB80E.lz16"

DATA_5DBA3E:
	incbin "Graphics/GFX_5DBA3E.lz16"

DATA_5DBC21:
	incbin "Graphics/GFX_5DBC21.lz16"

DATA_5DBDC1:
	incbin "Graphics/GFX_5DBDC1.lz16"

DATA_5DBF2C:
	incbin "Graphics/GFX_5DBF2C.lz16"

DATA_5DC0DF:
	incbin "Graphics/GFX_5DC0DF.lz16"

DATA_5DC1EC:
	incbin "Graphics/GFX_5DC1EC.lz16"

DATA_5DC3EF:
	incbin "Graphics/GFX_5DC3EF.lz16"

DATA_5DC58C:
	incbin "Graphics/GFX_5DC58C.lz16"

DATA_5DC70B:
	incbin "Graphics/GFX_5DC70B.lz16"

DATA_5DC885:
	incbin "Graphics/GFX_5DC885.lz16"

DATA_5DC947:
	incbin "Graphics/GFX_5DC947.lz16"

DATA_5DCA3E:
	incbin "Graphics/GFX_5DCA3E.lz16"

DATA_5DCC2E:
	incbin "Graphics/GFX_5DCC2E.lz16"

DATA_5DCE2B:
	incbin "Graphics/GFX_5DCE2B.lz16"

DATA_5DCFDF:
	incbin "Graphics/GFX_5DCFDF.lz16"

DATA_5DD119:
	incbin "Graphics/GFX_5DD119.lz16"

DATA_5DD286:
	incbin "Graphics/GFX_5DD286.lz16"

DATA_5DD445:
	incbin "Graphics/GFX_5DD445.lz16"

DATA_5DD5FB:
	incbin "Graphics/GFX_5DD5FB.lz16"

DATA_5DD7C6:
	incbin "Graphics/GFX_5DD7C6.lz16"

DATA_5DD930:
	incbin "Graphics/GFX_5DD930.lz16"

DATA_5DDAF4:
	incbin "Graphics/GFX_5DDAF4.lz16"

DATA_5DDCCE:
	incbin "Graphics/GFX_5DDCCE.lz16"

DATA_5DDE10:
	incbin "Graphics/GFX_5DDE10.lz16"

DATA_5DDFB0:
	incbin "Graphics/GFX_5DDFB0.lz16"

DATA_5DE0E8:
	incbin "Graphics/GFX_5DE0E8.lz16"

DATA_5DE1DC:
	incbin "Graphics/GFX_5DE1DC.lz16"

DATA_5DE3A5:
	incbin "Graphics/GFX_5DE3A5.lz16"

DATA_5DE581:
	incbin "Graphics/GFX_5DE581.lz16"

DATA_5DE6E9:
	incbin "Graphics/GFX_5DE6E9.lz16"

DATA_5DE8AE:
	incbin "Graphics/GFX_5DE8AE.lz16"

DATA_5DEA53:
	incbin "Graphics/GFX_5DEA53.lz16"

DATA_5DEC4C:
	incbin "Graphics/GFX_5DEC4C.lz16"

DATA_5DEDF4:
	incbin "Graphics/GFX_5DEDF4.lz16"

DATA_5DEFCA:
	incbin "Graphics/GFX_5DEFCA.lz16"

DATA_5DF13D:
	incbin "Graphics/GFX_5DF13D.lz16"

DATA_5DF2C3:
	incbin "Graphics/GFX_5DF2C3.lz16"

DATA_5DF399:
	incbin "Graphics/GFX_5DF399.lz16"

DATA_5DF4BE:
	incbin "Graphics/GFX_5DF4BE.lz16"

DATA_5DF5A6:
	incbin "Graphics/GFX_5DF5A6.lz16"

DATA_5DF70A:
	incbin "Graphics/GFX_5DF70A.lz16"

DATA_5DF804:
	incbin "Graphics/GFX_5DF804.lz16"

DATA_5E03D3:
	incbin "Graphics/GFX_5E03D3.lz16"

DATA_5E0596:
	incbin "Graphics/GFX_5E0596.lz16"

DATA_5E0750:
	incbin "Graphics/GFX_5E0750.lz16"

DATA_5E0956:
	incbin "Graphics/GFX_5E0956.lz16"

DATA_5E0AB6:
	incbin "Graphics/GFX_5E0AB6.lz16"

DATA_5E0F30:
	incbin "Graphics/GFX_5E0F30.lz16"

DATA_5E16FA:
	incbin "Graphics/GFX_5E16FA.lz16"

DATA_5E1DD1:
	incbin "Graphics/GFX_5E1DD1.lz16"

DATA_5E2450:
	incbin "Graphics/GFX_5E2450.lz16"

DATA_5E2E3F:
	incbin "Graphics/GFX_5E2E3F.lz16"

DATA_5E3939:
	incbin "Graphics/GFX_5E3939.lz16"

DATA_5E3E16:
	incbin "Graphics/GFX_5E3E16.lz16"

DATA_5E42AC:
	incbin "Graphics/GFX_5E42AC.lz16"

DATA_5E4D55:
	incbin "Graphics/GFX_5E4D55.lz16"

DATA_5E57A7:
	incbin "Graphics/GFX_5E57A7.lz16"

DATA_5E5E4B:
	incbin "Graphics/GFX_5E5E4B.lz16"

DATA_5E6583:
	incbin "Graphics/GFX_5E6583.lz16"

DATA_5E6AAE:
	incbin "Graphics/GFX_5E6AAE.lz16"

DATA_5E70E0:
	incbin "Graphics/GFX_5E70E0.lz16"

DATA_5E77FD:
	incbin "Graphics/GFX_5E77FD.lz16"

DATA_5E829F:
	incbin "Graphics/GFX_5E829F.lz16"

DATA_5E9360:
	incbin "Graphics/GFX_5E9360.lz16"

DATA_5EA7C0:
	incbin "Graphics/GFX_5EA7C0.lz16"

DATA_5EBA21:
	incbin "Graphics/GFX_5EBA21.lz16"

DATA_5EC639:
	incbin "Graphics/GFX_5EC639.lz16"

DATA_5ED157:
	incbin "Graphics/GFX_5ED157.lz16"

DATA_5ED7BE:
	incbin "Graphics/GFX_5ED7BE.lz16"

DATA_5EE3D2:
	incbin "Graphics/GFX_5EE3D2.lz16"

DATA_5EE999:
	incbin "Graphics/GFX_5EE999.lz16"

DATA_5EEC88:
	incbin "Graphics/GFX_5EEC88.lz16"

DATA_5EF3B1:
	incbin "Graphics/GFX_5EF3B1.lz16"

DATA_5EF5DC:
	incbin "Graphics/GFX_5EF5DC.lz16"

DATA_5EF845:
	incbin "Graphics/GFX_5EF845.lz16"

DATA_5EFA6E:
	incbin "Graphics/GFX_5EFA6E.lz16"

DATA_5EFCD6:
	incbin "Graphics/GFX_5EFCD6.lz16"

DATA_5EFEFF:
	incbin "Graphics/GFX_5EFEFF.lz16"

DATA_5F01FE:
	incbin "Graphics/GFX_5F01FE.lz16"

DATA_5F0576:
	incbin "Graphics/GFX_5F0576.lz16"

DATA_5F0922:
	incbin "Graphics/GFX_5F0922.lz16"

DATA_5F0BBB:
	incbin "Graphics/GFX_5F0BBB.lz16"

DATA_5F10E1:
	incbin "Graphics/GFX_5F10E1.lz16"

DATA_5F15BA:
	incbin "Graphics/GFX_5F15BA.lz16"

DATA_5F1960:
	incbin "Graphics/GFX_5F1960.lz16"

DATA_5F1D97:
	incbin "Graphics/GFX_5F1D97.lz16"

DATA_5F21AB:
	incbin "Graphics/GFX_5F21AB.lz16"

DATA_5F25FB:
	incbin "Graphics/GFX_5F25FB.lz16"

DATA_5F2948:
	incbin "Graphics/GFX_5F2948.lz16"

DATA_5F2CAC:
	incbin "Graphics/GFX_5F2CAC.lz16"

DATA_5F2EB0:
	incbin "Graphics/GFX_5F2EB0.lz16"

DATA_5F3352:
	incbin "Graphics/GFX_5F3352.lz16"

DATA_5F3A70:
	incbin "Graphics/GFX_5F3A70.lz16"

DATA_5F4013:
	incbin "Graphics/GFX_5F4013.lz16"

DATA_5F45B7:
	incbin "Graphics/GFX_5F45B7.lz16"

DATA_5F4D68:
	incbin "Graphics/GFX_5F4D68.lz16"

DATA_5F5485:
	incbin "Graphics/GFX_5F5485.lz16"

DATA_5F55D7:
	incbin "Graphics/GFX_5F55D7.lz16"

DATA_5F5742:
	incbin "Graphics/GFX_5F5742.lz16"

DATA_5F5942:
	incbin "Graphics/GFX_5F5942.lz16"

DATA_5F5B92:
	incbin "Graphics/GFX_5F5B92.lz16"

DATA_5F5D48:
	incbin "Graphics/GFX_5F5D48.lz16"

DATA_5F5F21:
	incbin "Graphics/GFX_5F5F21.lz16"

DATA_5F6126:
	incbin "Graphics/GFX_5F6126.lz16"

DATA_5F62D2:
	incbin "Graphics/GFX_5F62D2.lz16"

DATA_5F6925:
	incbin "Graphics/GFX_5F6925.lz16"

DATA_5F6E88:
	incbin "Graphics/GFX_5F6E88.lz16"

DATA_5F725C:
	incbin "Graphics/GFX_5F725C.lz16"

DATA_5F7906:
	incbin "Graphics/GFX_5F7906.lz16"

DATA_5F7AC9:
	incbin "Graphics/GFX_5F7AC9.lz16"

DATA_5F7CE1:
	incbin "Graphics/GFX_5F7CE1.lz16"

DATA_5F7EA6:
	incbin "Graphics/GFX_5F7EA6.lz16"

DATA_5F80B8:
	incbin "Graphics/GFX_5F80B8.lz16"

DATA_5F8589:
	incbin "Graphics/GFX_5F8589.lz16"

check bankcross on

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($5F8A36, incbin, DATA_5F8A36_YI_U2.bin)
else
	%FREE_BYTES($5F8A36, 2378, $FF)
endif

DATA_5F9380:								; Note: Title screen tilemap
	dw $52E8,$52CA,$52E8,$52E8,$52CC,$52E8,$52E8,$52C0
	dw $52E8,$52CE,$52E8,$52C0,$52E8,$52CC,$52E8,$52E8
	dw $52E8,$52CA,$52E8,$52CC,$52E8,$52E8,$52E8,$52CA
	dw $52E8,$52E8,$52E8,$52E8,$52E8,$52CE,$52E8,$52E8
	dw $52E8,$12E0,$12E2,$52E8,$52E8,$52CE,$52E8,$52E8
	dw $52CA,$52EE,$52EC,$52E8,$52E8,$52E8,$52E8,$52CA
	dw $52CC,$52E8,$52E8,$52E8,$52E8,$52C0,$52CE,$52E8
	dw $52CC,$52E8,$52C0,$52E8,$52CC,$52EE,$52EC,$52C0
	dw $52E8,$12E4,$12E6,$52CC,$52CA,$52EE,$52EC,$52CC
	dw $52E8,$52E8,$52CC,$52E8,$52CA,$52E8,$52E8,$52E8
	dw $52E8,$52CE,$52E8,$52E8,$52CC,$52E8,$52EE,$52EC
	dw $52E8,$52E8,$52E8,$52E8,$52CA,$52E8,$52E8,$52E8
	dw $52CA,$52CA,$52E8,$52E8,$52E8,$52E8,$52E8,$52E8
	dw $52C0,$52E8,$52E8,$52CE,$52E8,$52E8,$52C0,$52E8
	dw $52CC,$52EE,$52EC,$52CA,$52E8,$52E8,$52E8,$52E8
	dw $52C0,$52E8,$52CC,$52CE,$52E8,$52E8,$52CC,$52E8
	dw $52E8,$52E8,$52E8,$52E8,$52C0,$52E8,$52E8,$52CA
	dw $52E8,$52E8,$52CC,$52EE,$52EC,$52CE,$52E8,$52E8
	dw $52E8,$52E8,$52CC,$52C0,$52E8,$52CA,$52E8,$52CC
	dw $52E8,$52E8,$52CA,$52EE,$52EC,$52C0,$52E8,$52CE
	dw $52EC,$52E8,$52CC,$52E8,$52E8,$52CA,$52E8,$52E8
	dw $52CC,$52E8,$52CC,$52E8,$52CA,$52EE,$52EC,$52E8
	dw $52CA,$52E8,$52E8,$52E8,$52CC,$52E8,$52E8,$52E8
	dw $52CC,$52CA,$52E8,$52E8,$52CC,$52E8,$52E8,$52EE
	dw $56C4,$56C2,$56C4,$56C2,$56C4,$56C2,$56C4,$56C2
	dw $56C4,$56C2,$56C4,$56C2,$56C4,$56C2,$56C2,$56C2
	dw $56C4,$56C2,$56C4,$56C2,$56C4,$56C2,$56C4,$56C2
	dw $56C4,$56C2,$56C4,$56C2,$56C4,$56C2,$56C4,$56C2
	dw $12C6,$12C8,$12C6,$12C8,$12C6,$12C8,$12C6,$12C8
	dw $12C6,$12C8,$12C6,$12C8,$12C6,$12C8,$12C6,$12C8
	dw $12C6,$12C8,$12C6,$12C8,$12C6,$12C8,$12C6,$12C8
	dw $12C6,$12C8,$12C6,$12C8,$12C6,$12C8,$12C6,$12C8
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA
	dw $12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA,$12EA

DATA_5F9800:
	dw $0E0E,$0E0E,$0E0E,$0E0E,$0E0E,$0E0E,$0E1E,$0E0E
	dw $000E,$1E01,$000E,$0E01,$0E0E,$0E0E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$0E0E,$0E1E,$0400,$2E05,$1E0E,$020E
	dw $1003,$0111,$1000,$0111,$1E0E,$0E0E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$0E0E,$000E,$1410,$0415,$0205,$1203
	dw $2013,$1121,$2010,$1121,$0E01,$0E0E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$1E0E,$1000,$2420,$1425,$1215,$2213
	dw $4823,$2148,$4820,$2148,$0111,$1E0E,$0E0E,$0E0E
	dw $0E0E,$1E0E,$000E,$2010,$4848,$2448,$2225,$4823
	dw $4848,$4848,$4848,$3148,$5141,$0E1E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$1000,$4820,$4848,$4848,$4848,$4848
	dw $4848,$4848,$4848,$2148,$0411,$2E05,$0E0E,$0E0E
	dw $0E0E,$060E,$0807,$4848,$4848,$4848,$4848,$4848
	dw $4848,$4848,$4848,$4848,$1421,$0115,$0E1E,$0E0E
	dw $0E0E,$161E,$1817,$4848,$4848,$0F48,$4848,$4848
	dw $485F,$4848,$4760,$4848,$2448,$1125,$0E01,$0E0E
	dw $0E0E,$1000,$4820,$0F48,$4848,$4848,$4848,$4848
	dw $4848,$4648,$574A,$4848,$4848,$2A29,$0E2B,$0E0E
	dw $000E,$2010,$4848,$4746,$4848,$4848,$4848,$4848
	dw $4848,$5648,$4A5A,$6564,$4848,$3A39,$1E3B,$0E0E
	dw $1000,$4820,$4848,$5756,$4848,$4848,$4848,$4848
	dw $4848,$7048,$7071,$7574,$4848,$0A09,$0E0B,$0E0E
	dw $4050,$4830,$4848,$6766,$6160,$4848,$4848,$4848
	dw $4848,$6460,$4865,$4848,$4848,$1A19,$2E1B,$0E0E
	dw $500E,$3040,$4848,$7776,$7170,$4848,$4848,$4848
	dw $5F48,$7470,$4875,$4848,$4848,$2148,$0111,$0E2E
	dw $001E,$2010,$4848,$5F5F,$4848,$4848,$6048,$4B4A
	dw $6261,$6463,$4865,$605F,$4861,$4848,$1121,$0E01
	dw $1000,$4808,$4848,$6160,$6160,$6160,$6648,$4A5A
	dw $4B4A,$4A5A,$614A,$4A60,$4871,$4848,$0948,$0B0A
	dw $2726,$4828,$4848,$4A70,$4A4B,$4B4B,$7647,$5A5A
	dw $4A4A,$4D4C,$4A4A,$5E4B,$4861,$4848,$190F,$1B1A
	dw $1716,$4818,$4848,$7248,$4A73,$4A4B,$6057,$4B4B
	dw $4B4B,$6C7C,$4A4D,$5A4B,$474A,$4848,$2948,$2B2A
	dw $4050,$3332,$4848,$6248,$4B63,$4B4A,$4B4B,$5E4B
	dw $4D4C,$5C4C,$4D5D,$4D4C,$575A,$4848,$3948,$3B3A
	dw $500E,$4342,$4830,$7048,$5A5B,$5A5B,$4D4C,$4C4B
	dw $5D5C,$7E5C,$3F3E,$7D6D,$714A,$4848,$4131,$0E51
	dw $0E0E,$5352,$3040,$4848,$5B70,$5B5A,$7D7C,$7C4B
	dw $4F6C,$3F7E,$7E4F,$4D5D,$4871,$2948,$2B2A,$0E0E
	dw $1E0E,$002E,$2010,$480F,$4A60,$4A4B,$4B4B,$4A4B
	dw $6C7C,$3E4F,$6C6D,$7D6D,$4861,$3948,$3B3A,$0E2E
	dw $2E0E,$1000,$4820,$485F,$4B70,$4B4A,$4B4A,$5E4A
	dw $7C4A,$6D6C,$7C7D,$5A7D,$4871,$4131,$0E51,$0E0E
	dw $060E,$0807,$4848,$6160,$7248,$7473,$7275,$5B73
	dw $5B5A,$7D7C,$5B5A,$7574,$3148,$5141,$0E0E,$0E0E
	dw $160E,$1817,$4848,$7170,$4848,$4848,$4848,$6648
	dw $4B4A,$7574,$7170,$4848,$4131,$0E51,$0E1E,$0E0E
	dw $260E,$2827,$4848,$3448,$3035,$4848,$4848,$7648
	dw $7574,$4848,$0F48,$3148,$5141,$0E1E,$0E0E,$0E0E
	dw $360E,$3837,$4848,$4431,$4045,$4830,$480F,$4848
	dw $4848,$3031,$4848,$4131,$0E51,$0E0E,$0E0E,$0E0E
	dw $1E0E,$4050,$3130,$5441,$3655,$3040,$4848,$0F48
	dw $2948,$272A,$2928,$2B2A,$0E0E,$0E1E,$0E0E,$0E0E
	dw $0E0E,$500E,$4140,$2E51,$0E2E,$4050,$4830,$4848
	dw $3948,$373A,$3938,$3B3A,$0E2E,$0E0E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$5150,$0E0E,$1E0E,$500E,$3240,$3031
	dw $4131,$2651,$2A27,$0E2B,$0E0E,$0E0E,$2E0E,$0E0E
	dw $0E0E,$0E1E,$0E1E,$0E1E,$2E0E,$1E0E,$4250,$4041
	dw $5141,$360E,$3A37,$0E3B,$0E1E,$0E1E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$0E0E,$0E0E,$0E0E,$0E0E,$520E,$5051
	dw $1E51,$0E1E,$2B26,$0E0E,$0E0E,$0E0E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$0E0E,$0E0E,$0E0E,$0E2E,$0E0E,$0E0E
	dw $0E0E,$0E0E,$3B36,$0E0E,$0E0E,$0E0E,$0E0E,$0E0E

DATA_5F9C00:
	dw $7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$4949
	dw $4949,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$4949,$5959
	dw $5959,$4949,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$4949,$5959,$5858
	dw $5858,$5959,$4949,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$7F7F,$4949,$5959,$5858,$7B7B
	dw $7B7B,$5858,$5959,$4949,$7F7F,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$497F,$5959,$5858,$7B7B,$7A7A
	dw $7A7A,$7B7B,$5858,$5959,$7F49,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$5949,$5858,$7B7B,$7A7A,$7979
	dw $7979,$7A7A,$7B7B,$5858,$4959,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$497F,$5859,$7B7B,$7A7A,$7979,$7878
	dw $7878,$7979,$7A7A,$7B7B,$5958,$7F49,$7F7F,$7F7F
	dw $7F7F,$7F7F,$5949,$7B58,$7A7B,$7979,$7878,$6B6B
	dw $6B6B,$7878,$7979,$7B7A,$587B,$4959,$7F7F,$7F7F
	dw $7F7F,$497F,$5859,$7B7B,$797A,$7879,$6B6B,$6A6A
	dw $6A6A,$6B6B,$7978,$7A79,$7B7B,$5958,$7F49,$7F7F
	dw $7F7F,$497F,$5859,$7A7B,$7979,$6B78,$6A6A,$6969
	dw $6969,$6A6A,$786B,$7979,$7B7A,$5958,$7F49,$7F7F
	dw $7F7F,$5949,$7B58,$797A,$7879,$6A6B,$6969,$0C68
	dw $680D,$6969,$6B6A,$7978,$7A79,$587B,$4959,$7F7F
	dw $7F7F,$5949,$7B58,$797A,$6B78,$696A,$6868,$1C68
	dw $0C1D,$680D,$6A69,$786B,$7A79,$587B,$4959,$7F7F
	dw $497F,$5859,$7A7B,$7879,$6A6B,$6869,$6868,$6868
	dw $5C0C,$0D5D,$6968,$6B6A,$7978,$7B7A,$5958,$7F49
	dw $497F,$5859,$7A7B,$7879,$6A6B,$6869,$6868,$6868
	dw $6C1C,$5D4F,$690D,$6B6A,$7978,$7B7A,$5958,$7F49
	dw $5949,$7B58,$797A,$6B78,$696A,$6868,$6868,$6868
	dw $5C0C,$6D4F,$681D,$6A69,$786B,$7A79,$587B,$4959
	dw $5949,$7B58,$797A,$6B78,$696A,$6868,$0D0C,$0C68
	dw $3E5C,$5D3F,$680D,$6A69,$786B,$7A79,$587B,$4959
	dw $5949,$7B58,$797A,$6B78,$696A,$6868,$1D1C,$1C68
	dw $6D6C,$6D6C,$681D,$6A69,$786B,$7A79,$587B,$4959
	dw $5949,$7B58,$797A,$6B78,$696A,$6868,$6868,$6868
	dw $1D1C,$1D1C,$6868,$6A69,$786B,$7A79,$587B,$4959
	dw $497F,$5859,$7A7B,$7879,$6A6B,$6869,$6868,$6868
	dw $6868,$6868,$6968,$6B6A,$7978,$7B7A,$5958,$7F49
	dw $497F,$5859,$7A7B,$7879,$6A6B,$6869,$6868,$6868
	dw $6868,$6868,$6968,$6B6A,$7978,$7B7A,$5958,$7F49
	dw $7F7F,$5949,$7B58,$797A,$6B78,$696A,$6868,$6868
	dw $6868,$6868,$6A69,$786B,$7A79,$587B,$4959,$7F7F
	dw $7F7F,$5949,$7B58,$797A,$7879,$6A6B,$6969,$6868
	dw $6868,$6969,$6B6A,$7978,$7A79,$587B,$4959,$7F7F
	dw $7F7F,$497F,$5859,$7A7B,$7979,$6B78,$6A6A,$6969
	dw $6969,$6A6A,$786B,$7979,$7B7A,$5958,$7F49,$7F7F
	dw $7F7F,$497F,$5859,$7B7B,$797A,$7879,$6B6B,$6A6A
	dw $6A6A,$6B6B,$7978,$7A79,$7B7B,$5958,$7F49,$7F7F
	dw $7F7F,$7F7F,$5949,$7B58,$7A7B,$7979,$7878,$6B6B
	dw $6B6B,$7878,$7979,$7B7A,$587B,$4959,$7F7F,$7F7F
	dw $7F7F,$7F7F,$497F,$5859,$7B7B,$7A7A,$7979,$7878
	dw $7878,$7979,$7A7A,$7B7B,$5958,$7F49,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$5949,$5858,$7B7B,$7A7A,$7979
	dw $7979,$7A7A,$7B7B,$5858,$4959,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$497F,$5959,$5858,$7B7B,$7A7A
	dw $7A7A,$7B7B,$5858,$5959,$7F49,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$7F7F,$4949,$5959,$5858,$7B7B
	dw $7B7B,$5858,$5959,$4949,$7F7F,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$4949,$5959,$5858
	dw $5858,$5959,$4949,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$4949,$5959
	dw $5959,$4949,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F
	dw $7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$4949
	dw $4949,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F,$7F7F

DATA_5FA000:
	dw $0000

DATA_5FA002:
	dw $46EE,$5772,$7FFF,$0000,$291F,$7F33,$03FF,$0000
	dw $7FFF,$0CDF,$03A0,$0000,$7FFF

DATA_5FA01C:
	dw $1A3F,$2BFF,$0000

DATA_5FA022:
	dw $7C1F,$7C10,$7C00,$0000,$7C1F,$7C10,$7C00,$0000
	dw $7C1F,$7C10,$7C00,$0000

DATA_5FA03A:
	dw $7FFF,$53F4,$54DB,$0000,$0180,$0012,$10D2,$02A0
	dw $001F,$467F,$111F,$03E0,$023F,$025F,$271F,$571F
	dw $6B9F,$7FFF,$0000

DATA_5FA060:
	dw $188C,$4104,$3D55,$24B5

DATA_5FA068:
	dw $65AA,$467F,$001F,$55BF

DATA_5FA070:
	dw $7E8F,$023F,$031F,$571F,$6B9F,$7FFF,$0000,$00B9
	dw $0165,$0012,$01BF,$02AB,$467F,$001F,$037F,$03F2
	dw $023F,$031F,$571F,$6B9F,$7FFF,$0000,$45A7,$01DF
	dw $0012,$6268,$03FF,$467F,$001F,$7F71,$5FFF,$023F
	dw $031F,$571F,$6B9F,$7FFF,$0000,$450A,$240C,$0012
	dw $6571,$3898,$467F,$001F,$7DF9,$615F,$023F,$031F
	dw $571F,$6B9F,$7FFF,$0000,$1D6F,$0006,$10D2,$29F5
	dw $000C,$467F,$111F,$4ABA,$0012,$023F,$271F,$571F
	dw $6B9F,$7FFF,$0000,$0C6E,$2544,$10D2,$18D7,$4E69
	dw $467F,$111F,$215F,$674E,$023F,$271F,$571F,$6B9F
	dw $7FFF,$0000,$2442,$248C,$0012,$40E7,$38F8,$467F
	dw $001F,$5D6B,$515F,$023F,$031F,$571F,$6B9F,$7FFF
	dw $0000,$1440,$64C2,$7E40,$7F96,$63BE,$38DF,$51A0
	dw $77FC,$7D93,$1463,$7C1F,$7C00,$637D,$4A75,$0000

DATA_5FA150:
	dw $4DA4,$6A88,$7FB2,$7FFF

DATA_5FA158:
	dw $7FFF,$4DA4,$6A88,$7FB2

DATA_5FA160:
	dw $7FB2,$7FFF,$4DA4,$6A88

DATA_5FA168:
	dw $6A88,$7FB2,$7FFF,$4DA4

DATA_5FA170:
	dw $4167,$4E68,$6313,$7FFF

DATA_5FA178:
	dw $7FFF,$4167,$4E68,$6313

DATA_5FA180:
	dw $6313,$7FFF,$4167,$4E68

DATA_5FA188:
	dw $4E68,$6313,$7FFF,$4167

DATA_5FA190:
	dw $0000,$0421,$0421,$0C63,$20C7,$292A,$0421,$1485
	dw $1CC7,$0421,$0421,$1485

DATA_5FA1A8:
	dw $1D09,$31CF,$3E11,$571B,$296D,$39F1,$4A75,$5B3B
	dw $39F1,$4233,$56F9,$5F5C,$4A75,$4A75,$637D,$637D

DATA_5FA1C8:
	dw $0000,$7FFF,$0180,$02A0,$03E0,$36B5,$4B7C,$63BE
	dw $40C0,$65E9,$7F72,$1D5B,$3A3F,$475F,$5BFF

DATA_5FA1E6:
	dw $0000,$7FFF,$000B,$0014,$001F,$01FF,$031F,$03FF
	dw $44EE,$6270,$7FF2,$2A26,$3B13,$57D9,$6BFF

DATA_5FA204:
	dw $0000,$7FFF,$013F,$02BF,$03FF,$76EE,$7756,$7FDC
	dw $38AA,$614F,$7E55,$31A8,$466F,$6336,$77DB,$7FF2
	dw $7FFF,$5400,$7C00,$7E20,$7EE0,$7FE0,$7FF6,$72F0
	dw $7F76,$7FFF,$62EB,$7792,$7FFA,$7FFF,$0000,$7FFF
	dw $140D,$3416,$5C1F,$5951,$7A7B,$7AFF,$1D58,$467F
	dw $633F,$0CEC,$25F3,$3A9A,$573F,$0000,$0180,$40C0
	dw $10D2,$02A0,$65E9,$36B5,$111F,$03E0,$7F0E,$025F
	dw $271F,$4B7C,$63BE,$7FFF,$7FFF,$0000,$0069,$006E
	dw $00B7,$0CDF,$017F,$10A8,$154F,$3235,$573F,$7FFF
	dw $0000,$0151,$01F6,$02BB,$035F,$03FF,$2126,$39EB
	dw $5AF4,$77DB,$7FFF,$0000,$00E0,$0180,$0240,$0320
	dw $03E0,$30E2,$4DA4,$6A88,$7FB2,$0000,$7FFF,$39C4
	dw $56A8,$6F52,$7FFA,$7C18,$0000,$1042,$1884,$2928
	dw $7FB2,$7FF9,$7FFC,$7FFF,$0000,$0842,$1084,$18C6
	dw $2108,$2D6B,$35AD,$3DEF,$4631,$4E73,$5AD6,$6318
	dw $6B5A,$739C,$7FFF,$5E10,$7FFF,$76B6,$7F1E,$7FBF
	dw $7F7A,$7FDF,$7FFF,$7C0E,$7810,$7413,$7016,$6C19
	dw $681C,$641F,$3D26,$7FFF,$352E,$4596,$5E3F,$55F2
	dw $665A,$7EFF,$7FE0,$7FF3,$7FFA,$7F9B,$7FBB,$7FDD
	dw $7FFE,$0000,$7FFF,$5C1F,$5C1F,$5C1F,$5C1F,$1195
	dw $1E3D,$3F1F,$36B5,$4B7C,$63BE,$1D58,$1E3D,$03FF
	dw $0000,$7FFF,$013F,$02BF,$03FF,$5C1F,$000B,$0014
	dw $001F,$01FF,$031F,$03FF,$44EE,$6270,$7FF2,$0000
	dw $7FFF,$013F,$02BF,$03FF,$76EE,$7756,$7FDC,$3502
	dw $49E2,$66C3,$0CF0,$25F7,$3A9D,$573F,$0000,$7FFF
	dw $7806,$7808,$740A,$740C,$740E,$7010,$7012,$7014
	dw $6C16,$31A8,$466F,$6336,$77DB,$0000,$0020,$03FF
	dw $0001,$0040,$0421,$0021,$0003,$0060,$0001,$0022
	dw $0043,$0442,$0863,$0C63,$03FF,$03FF,$03FF,$03FF
	dw $03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF
	dw $03FF,$03FF,$03FF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$0000,$7FFF,$156C,$15F0,$1E75,$26F9,$2B5C
	dw $43DF,$006B,$0134,$025F,$5C1F,$572E,$67B4,$7BFC
	dw $0000,$7FFF,$4800,$6120,$7E00,$562A,$6778,$67DD
	dw $140D,$3416,$5C1F,$7EE7,$7F8E,$7FD6,$7FFA,$0000
	dw $2972,$1A3C,$035F,$43DF,$20CC,$00F3,$001F,$4A54
	dw $5B18,$6B9C,$7FFF,$0000,$0000,$0000,$0000,$20CD
	dw $2972,$1A3C,$02DF,$1066,$20CE,$00F7,$316E,$4A54
	dw $5B18,$52DA,$5F3D,$677F,$6FDF,$7FFF,$0000,$45E9
	dw $566E,$5E94,$5F59,$73DE,$7C1B,$7C1F,$701F,$641F
	dw $501F,$381F,$1C1F,$001F,$7FFF,$0000,$1882,$31A8
	dw $466F,$6336,$77DB,$77B1,$7FFC,$7FFF,$641F,$501F
	dw $381F,$1C1F,$001F,$0000,$7FFF,$0012,$001F,$51A0
	dw $319F,$4A5F,$01FF,$51A0,$51A0,$51A0,$0014,$001F
	dw $7FFF,$7FFF,$0000,$7FFF,$2092,$3139,$399F,$4E5F
	dw $01DB,$02BF,$035F,$03FF,$7FFF,$7EFF,$381F,$1C1F
	dw $001F,$3104,$7FFF,$310F,$3118,$311F,$32FF,$33FF
	dw $33FF,$75F2,$7F74,$7FF6,$5B2A,$6BF7,$7FFD,$7FFF
	dw $0000,$7FFF,$000B,$0014,$001F,$01FF,$031F,$03FF
	dw $44EE,$6270,$7FF2,$2A26,$3B13,$57D9,$6BFF,$0000
	dw $7FFF,$000B,$0014,$001F,$01FF,$3FFF,$031F,$0200
	dw $1F6B,$2FF7,$2A26,$3B13,$57D9

DATA_5FA56E:
	dw $6BFF

DATA_5FA570:
	dw $03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF
	dw $03FF,$03FF,$03FF

DATA_5FA586:
	dw $03FF,$03FF,$03FF,$03FF

DATA_5FA58E:
	dw $0000,$7FFF,$013F,$02BF,$0000,$0000,$0000,$7FFF
	dw $7FFF,$7FFF,$0000,$0000,$0000,$0000,$0000,$03FF
	dw $03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF
	dw $03FF,$03FF,$03FF,$03FF,$03FF,$03FF

DATA_5FA5CA:
	dw $0000,$7FFF,$0013,$0016,$0018,$001B,$0CDC

DATA_5FA5D8:
	dw $475F,$433F,$3EFF,$3ABE,$3208,$3208,$3208,$3208
	dw $0000,$3F5F,$32BF,$261E,$197D,$0CDC,$001B

DATA_5FA5F6:
	dw $2E1D,$325D,$367E,$3ABE,$4188,$4188,$4188,$4188

DATA_5FA606:
	dw $0000,$7FFF,$7B9F,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $140D,$3416,$5C1F,$633F,$7FFF,$7AFF,$7FFF,$0000
	dw $7FFF,$7B9F,$467F,$633F,$69F6,$5951,$7AFF,$3416
	dw $140D,$0C07,$0000,$0000,$7AFF,$7A7B

DATA_5FA642:
	dw $0000,$7FFF,$2566,$35EA,$466F,$5AF4,$6B78,$77DB
	dw $000B,$0014,$013F,$5C1F,$76EE,$7756,$7FDC,$745D
	dw $6C9B,$64D9,$5D17,$5555,$4D93,$45D1,$3E0F,$364D
	dw $2E8B,$26C9,$1F07,$1745,$0F83,$03E0,$7FFF,$0000
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$35D0,$562E,$4EF0,$5FFE,$7FFF,$0000,$7FB2
	dw $7FFF,$4DA4,$6A88,$4EF0,$7C18,$7C18,$7C18,$7C18
	dw $7C18,$7C18,$7C18,$7C18,$3CCE,$5575,$6A99,$7F7F
	dw $39C4,$56A8,$6F52,$7FFA,$2952,$39D8,$4E7B,$6B5F
	dw $7FFF,$0000,$0D66,$1A4B,$32F0,$4B95,$53FD,$010B
	dw $01B2,$0298,$039F,$118A,$2E71,$4B79,$63FE,$77BD
	dw $6F7B,$6739,$5EF7,$56B5,$4E73,$4631,$3DEF,$35AD
	dw $2D6B,$2529,$1CE7,$14A5,$0C63,$0000,$7E00,$03F0
	dw $4F93,$67FB,$118A,$2E71,$4B79,$63FE,$11D6,$2E5E
	dw $4F93,$67FB,$7FFF,$0000,$1565,$19E5,$22AD,$2F72
	dw $43FC,$34E3,$3504,$3DA8,$528E,$314A,$4A2F,$52B4
	dw $5F7D,$7FFF,$0000,$0CA8,$0D51,$21F7,$42FC,$57BF
	dw $3000,$3C84,$4104,$4966,$4DC9,$51EC,$5A71,$5A97
	dw $641F,$501F,$381F,$1C1F,$641F,$501F,$381F,$1C1F
	dw $641F,$501F,$381F,$1C1F,$7FFF,$0000,$0005,$000F
	dw $001F,$15DF,$7C18,$1462,$2906,$49EC,$6B15,$0C87
	dw $10CB,$2978,$15DF,$7FFF,$0000,$7C05,$7C08,$7C0E
	dw $7C13,$7C18,$0C40,$0C41,$1CA3,$3968,$0C43,$1045
	dw $1487,$10CB,$1008,$148F,$3175,$567F,$218C,$3E73
	dw $5F5B,$679D,$2126,$39EB,$5AF4,$77DB,$7FFF,$0000
	dw $1D24,$31C6,$52CC,$6392,$77FA,$258E,$3A55,$4B3D
	dw $6FDF,$7F71,$7FF7,$7FFA,$7FFC,$7FFF,$0000,$7C05
	dw $7C08,$7C0E,$7C13,$7C18,$7C05,$7C08,$7C0E,$7C13
	dw $7C18,$7C05,$7C08,$7C0E,$7EF1,$7FB7,$7FFA,$77FF
	dw $7C08,$7C0E,$7C13,$7C18,$7F71,$7FF7,$7FFA,$7FFC
	dw $7FFF,$0000,$0D04,$1DC8,$3A8B,$5B53,$6B9C,$31F0
	dw $4A95,$577C,$63BF,$1D89,$2A4E,$3732,$4BF9,$7FFF
	dw $0000,$7C05,$7407,$6809,$600B,$540D,$4C0F,$4011
	dw $3414,$2C16,$2018,$181A,$0C1C,$001F,$1DC8,$3A8B
	dw $5B53,$6B9C,$1D46,$2A0A,$46F0,$4F72,$39EB,$5AF4
	dw $5B53,$6B9C,$7FFF,$0000,$08A7,$1970,$3E16,$42BD
	dw $637F,$14E3,$2585,$46AD,$6795,$1D09,$31CF,$3E11
	dw $571B,$7FFF,$0000,$3051,$30F6,$31BB,$325F,$32FF
	dw $1042,$1484,$1CE7,$254A,$298C,$31EF,$3A52,$42B5
	dw $1484,$1CE7,$3A52,$42B5,$501F,$501F,$501F,$501F
	dw $501F,$501F,$501F,$501F,$7FFF,$0000,$2DC0,$3E63
	dw $5B2E,$6FF5,$67FC,$49AF,$6692,$7B76,$7FFB,$3993
	dw $567A,$62FF,$739F,$7FFF,$0000,$45E9,$566E,$5E94
	dw $5F59,$73DE,$026E,$0332,$03B9,$67FC,$14E9,$194B
	dw $2E11,$4AB7,$3993,$567A,$3E63,$5B2E,$3993,$567A
	dw $3E63,$5B2E,$3E63,$5B2E,$6FF5,$67FC,$7FFF,$0000
	dw $1483,$2988,$322D,$3B16,$47BD,$24CE,$2D34,$41FA
	dw $56BF,$34E5,$314A,$3E11,$571B,$7FFF,$0000,$1462
	dw $2548,$3A2F,$4AF5,$5BDC,$0C41,$1061,$18C4,$24E8
	dw $292D,$2130,$2994,$3E57,$1B26,$22E8,$2AAA,$326C
	dw $1B26,$22E8,$2AAA,$326C,$1B26,$22E8,$2AAA,$326C
	dw $7FFF,$0000,$3135,$4E3F,$562D,$6B75,$67BF,$26BF
	dw $335F,$3BFF,$6BFF,$1C8C,$6BFF,$6BFF,$6BFF,$7FFF
	dw $38C1,$0CDF,$464A,$52CC,$6392,$77FA,$562D,$66CF
	dw $6B75,$67BF,$26BF,$335F,$3BFF,$6BFF,$7FF2,$0000
	dw $5F35,$7FFF,$7C08,$7C0E,$7C13,$7C18,$7C08,$7C0E
	dw $7C13,$7C18,$7FFF,$0000,$25DA,$2E3F,$2EFF,$4FFF
	dw $67FC,$49AF,$6692,$7B76,$7FFB,$1CCD,$39B4,$4639
	dw $56D9,$7FFF,$0000,$49AF,$6692,$7B76,$7FFB,$67BF
	dw $01C5,$024B,$0358,$6FF5,$10A8,$154F,$3235,$573F
	dw $1CCD,$39B4,$2E3F,$2EFF,$1CCD,$39B4,$2E3F,$2EFF
	dw $25DA,$2E3F,$2EFF,$4FFF,$7CD9,$0000,$7CD9,$10A7
	dw $214C,$29D0,$2528,$4A50,$7FFE,$0C40,$4EF5,$3E4C
	dw $2D65,$1CE2,$1480,$3104,$0000,$4167,$4E68,$6313
	dw $7FFF,$2528,$4A50,$7FFE,$3E4C,$1480,$1CE2,$2D65
	dw $3E4C,$4EF5,$6738,$6B59,$6F9B,$73BD,$4E71,$56B2
	dw $5F36,$677A,$35AA,$420C,$4ED1,$5B38,$7FFF,$0000
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$35D0,$562E,$4EF0,$5FFE,$7FFF,$0000,$02BF
	dw $037F,$001F,$01FF,$4EF0,$0CC9,$0D11,$0D1B,$467F
	dw $3E2A,$4EAB,$6772,$6FD8,$39C4,$56A8,$6F52,$7FFA
	dw $2952,$39D8,$4E7B,$6B5F,$3CCE,$5575,$6A99,$7F7F
	dw $7FFF,$0000,$1882,$31A8,$466F,$6336,$77DB,$77B1
	dw $7FFC,$7FFF,$774E,$77B1,$7FF8,$7FFC,$7FFF,$7FFF
	dw $0000,$00A8,$116E,$2A34,$42FA,$537E,$641F,$501F
	dw $381F,$641F,$501F,$381F,$1C1F,$001F,$77B1,$7FF8
	dw $7FF8,$7FFC,$774E,$77B1,$7FFF,$7FFF,$39EB,$5AF4
	dw $77B1,$7FFF,$7FFF,$0000,$0CA8,$152D,$1D91,$25D4
	dw $3A9A,$190A,$25AF,$2E33,$4AF9,$0443,$256C,$3612
	dw $4ED9,$7FFF,$0000,$104C,$1890,$1CF3,$2196,$329B
	dw $0422,$0864,$0CA5,$10C7,$10E8,$1509,$192A,$1D6C
	dw $0CA5,$10E8,$192A,$1D6C,$501F,$501F,$501F,$501F
	dw $501F,$501F,$501F,$501F,$7FFF,$0000,$0CDF,$025F
	dw $562D,$6B75,$67BF,$2F32,$3374,$43FA,$53FD,$1C8C
	dw $7FFF,$7FFF,$7FFF,$7FFF,$38C1,$0CDF,$464A,$52CC
	dw $6392,$77FA,$562D,$66CF,$6B75,$67BF,$2F32,$3374
	dw $43FA,$53FD,$7E00,$03F0,$4F93,$67FB,$0C8A,$10F0
	dw $1175,$15DB,$11D6,$2E5E,$4F93,$67FB,$7FFF,$0000
	dw $10AA,$10F0,$1978,$263F,$333F,$0C85,$14C7,$40F0
	dw $14C8,$0D0B,$15B0,$2697,$337F,$7FFF,$7BBE,$737C
	dw $6F1B,$6ADA,$6298,$5E57,$5A16,$51B4,$4D73,$4932
	dw $40F0,$3CAF,$384E,$300C,$7E00,$03F0,$4F93,$67FB
	dw $0863,$0868,$08AF,$1158,$10AA,$10F0,$1978,$263F
	dw $7FFF,$0000,$18E8,$31AE,$46B4,$5F5B,$6FBF,$0044
	dw $00AD,$0CD3,$15D8,$29AE,$29F7,$3E7D,$3F1F,$7FFF
	dw $0000,$02BF,$037F,$001F,$01FF,$4EF0,$20C9,$354F
	dw $49F6,$5E5D,$158E,$2233,$431A,$5BDF,$1DCA,$2A50
	dw $3314,$47BB,$3984,$5648,$6F12,$7FBA,$3552,$4DD8
	dw $627B,$7B5F,$7FFF,$0000,$1061,$2984,$4248,$5F12
	dw $6FBA,$1461,$41A8,$5E8E,$7FB7,$62CC,$7F93,$7FD9
	dw $7FFC,$7FFF,$0000,$7FB2,$7FFF,$4DA4,$6A88,$4EF0
	dw $20C9,$3111,$3D1B,$6E7F,$3968,$564C,$6F15,$7FBC
	dw $39C4,$56A8,$6F52,$7FFA,$2D84,$4648,$5F12,$73BA
	dw $6254,$6ED7,$7F5A,$7FDE,$7FFF,$0000,$008A,$0191
	dw $0259,$031E,$03FF,$1068,$14CF,$31B5,$565F,$118A
	dw $2E71,$4B79,$63FE,$7BBE,$777D,$733C,$6AFA,$66B9
	dw $6278,$5E37,$1068,$14CF,$31B5,$565F,$40F0,$3CAF
	dw $386E,$300C,$7E00,$03F0,$031E,$03FF,$118A,$2E71
	dw $4B79,$63FE,$11D6,$2E5E,$031E,$03FF,$4F5F,$0000
	dw $0888,$10B0,$1516,$25BA,$369F,$0048,$00EF,$0235
	dw $033F,$110D,$2DD4,$4B3C,$63FF,$7BBE,$777D,$733C
	dw $6AFA,$66B9,$6278,$5E37,$55F5,$51B4,$4D73,$4932
	dw $40F0,$3CAF,$386E,$300C,$7E00,$03F0,$25BA,$369F
	dw $110D,$2DD4,$4B3C,$63FF,$11D6,$2E5E,$25BA,$369F
	dw $7FFF,$0000,$0927,$0DAA,$1A4E,$2B33,$27F7,$2126
	dw $39EB,$5AF4,$77DB,$112A,$2E11,$4AF9,$63BE,$7FFF
	dw $0000,$45E9,$566E,$5E94,$5F59,$73DE,$164B,$1B30
	dw $27F4,$27F4,$14E9,$194B,$2E11,$4AB7,$112A,$2E11
	dw $0DAA,$1A4E,$112A,$2E11,$0DAA,$1A4E,$0DAA,$1A4E
	dw $2B33,$27F7,$7FFF,$0000,$3CA7,$498D,$6252,$6EF6
	dw $7F98,$3126,$4DCA,$6A8E,$7FB6,$316F,$41D4,$5279
	dw $6B1F,$7FFF,$0000,$45E9,$566E,$5E94,$5F59,$73DE
	dw $3957,$5E5F,$7F1D,$7F98,$150F,$1D74,$35F9,$4ABF
	dw $316F,$41D4,$498D,$6252,$316F,$41D4,$498D,$6252
	dw $498D,$6252,$6EF6,$7F98,$7FFF,$0000,$18CD,$2D93
	dw $4238,$56BC,$631F,$3574,$4A39,$62DF,$735F,$1D09
	dw $31CF,$3E11,$571B,$7FFF,$0000,$3051,$30F6,$31BB
	dw $325F,$32FF,$0000,$0800,$1040,$20A3,$28E5,$3548
	dw $41AB,$4A0E,$1484,$1CE7,$41AB,$4A0E,$501F,$501F
	dw $501F,$501F,$501F,$501F,$501F,$501F,$7FFF,$0000
	dw $0823,$1CC8,$314E,$41F2,$4E35,$110D,$1DD2,$3EDC
	dw $5F9D,$0821,$20E5,$39AC,$5AB4,$7FFF,$0000,$244A
	dw $30F1,$31B9,$325F,$32FF,$0422,$0864,$0C86,$1D0A
	dw $298D,$39F1,$4675,$56F9,$1484,$1CE7,$4675,$56F9
	dw $501F,$501F,$501F,$501F,$501F,$501F,$501F,$501F
	dw $7FFF,$0000,$1880,$2900,$3D86,$4E2A,$5A6D,$30E2
	dw $4DA4,$6A88,$7FB2,$1D09,$31CF,$3E11,$571B,$7FFF
	dw $0000,$19B0,$2A30,$3EB6,$4F5A,$5B9D,$1080,$1080
	dw $14E0,$2142,$31C5,$3E29,$4EAD,$5F31,$1484,$1CE7
	dw $4EAD,$5F31,$501F,$501F,$501F,$501F,$501F,$501F
	dw $501F,$501F,$7FFF,$0000,$0844,$0C69,$18CF,$2953
	dw $39D6,$0C27,$146D,$24B3,$3D9A,$0488,$08CE,$1197
	dw $267F,$7FFF,$0000,$04F2,$1572,$29F8,$3A99,$46D9
	dw $0022,$0024,$0866,$18EB,$254F,$2DB2,$4258,$56FD
	dw $1484,$1CE7,$4258,$56FD,$501F,$501F,$501F,$501F
	dw $501F,$501F,$501F,$501F,$5F7C,$0000,$10A0,$2124
	dw $29A4,$3A68,$534B,$10A8,$296E,$3E13,$5299,$20E0
	dw $29A2,$3A86,$2F55,$7FFF,$0000,$7C05,$7407,$6809
	dw $600B,$540D,$4C0F,$4011,$3414,$2C16,$2018,$181A
	dw $0C1C,$001F,$2C85,$1C69,$34F1,$4196,$2086,$392A
	dw $456E,$5611,$39EB,$5AF4,$3A68,$5373,$7FFF,$0000
	dw $2820,$4146,$560D,$72D4,$7F79,$6F35,$777F,$7FFF
	dw $6ED2,$6F35,$777C,$777F,$777F,$7FFF,$0000,$1046
	dw $210C,$39D2,$5298,$631C,$641F,$501F,$381F,$641F
	dw $501F,$381F,$1C1F,$001F,$6F35,$777C,$777C,$777F
	dw $6ED2,$6F35,$777F,$777F,$39EB,$5AF4,$6F35,$777F
	dw $7FFF,$0000,$20E5,$3DAB,$5690,$7356,$7FFF,$2D69
	dw $39CE,$4252,$39EF,$0CA5,$29AD,$3E52,$4ED6,$7FFF
	dw $0000,$1928,$218C,$25D0,$2A58,$36DB,$0422,$0C43
	dw $1064,$1885,$1CC7,$24E8,$2929,$316B,$1064,$1CC7
	dw $2929,$316B,$501F,$501F,$501F,$501F,$501F,$501F
	dw $501F,$501F,$03BF,$037F,$033F,$02FF,$02BF,$027F
	dw $023F,$01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F
	dw $001F,$03BF,$037F,$033F,$02FF,$02BF,$027F,$023F
	dw $01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F,$001F
	dw $7C1F,$7C15,$7C0B,$7C00,$7C1F,$7C15,$7C0B,$7C00
	dw $7C1F,$7C15,$7C0B,$7C00,$007F,$00BF,$00FF,$013F
	dw $017F,$01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F
	dw $037F,$03BF,$03FF,$007F,$00BF,$00FF,$013F,$017F
	dw $01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F,$037F
	dw $03BF,$03FF,$03FF,$02BF,$017F,$001F,$03FF,$02BF
	dw $017F,$001F,$03FF,$02BF,$017F,$001F,$7FFF,$0C00
	dw $5B2A,$5750,$5FB2,$5FD5,$77FB,$3E0D,$3EB4,$473A
	dw $67DF,$1860,$7FBB,$1860,$7C7C,$7FFF,$0C00,$7C1B
	dw $1048,$3492,$2634,$7C1F,$7C1B,$7C1B,$701F,$641F
	dw $501F,$381F,$1C1F,$001F,$7FFF,$0000,$3FF9,$08C0
	dw $1D40,$2DC0,$4680,$00A0,$0902,$1166,$2A6C,$04A6
	dw $0508,$116C,$1DD0,$7FFF,$1CA5,$7C00,$3487,$3108
	dw $396C,$4DD0,$4480,$4D00,$5581,$59C5,$5E09,$624D
	dw $6691,$6AD8,$7FFF,$5E44,$76E7,$774E,$77B1,$7FF4
	dw $7FF8,$7FFC,$7BFE,$381F,$571A,$6B9D,$3AAD,$4372
	dw $67FF,$7FFF,$73FB,$3D98,$49FB,$565D,$5EBF,$631F
	dw $6B7F,$2D13,$7C08,$7C08,$7C08,$7C08,$7C08,$77FD
	dw $7FFF,$38C1,$7FB3,$7FD6,$7FD9,$7FFC,$7FFF,$3E0D
	dw $3EB4,$473A,$67DF,$24C0,$7FD9,$7FFF,$7C7C,$7FFF
	dw $38C1,$4DA4,$628D,$6B11,$63B8,$67BF,$7C1B,$7C1F
	dw $701F,$641F,$501F,$381F,$1C1F,$001F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$1ABC,$09D2,$094E
	dw $04EB,$0488,$0443,$7C1F,$7C1F,$7C1F,$098F,$118C
	dw $0929,$04C6,$0464,$7C1F,$73F0,$63EC,$5368,$4AA4
	dw $63FE,$47FA,$4BD2,$4F9F,$3DEA,$2657,$1E15,$475F
	dw $36DB,$2E99,$3F1D,$73DF,$6B9F,$635F,$5B1F,$52DF
	dw $4A9D,$425B,$4F9F,$3A19,$2657,$1E15,$475F,$36DB
	dw $2E99,$3F1D,$501F,$501F,$501F,$501F,$501F,$501F
	dw $501F,$501F,$501F,$501F,$501F,$501F,$501F,$501F
	dw $501F,$14FB,$014A,$11F2,$229B,$2D28,$3569,$49CC
	dw $08CB,$152E,$0865,$14C8,$1D0A,$29AF,$3612,$562C
	dw $6339,$0000,$1465,$1465,$1465,$18A6,$1CC8,$20C7
	dw $501F,$501F,$501F,$501F,$501F,$501F,$501F,$6339
	dw $0000,$1064,$14A6,$18C8,$1D0A,$252B,$296D,$2DAF
	dw $2DF2,$116F,$114D,$0D0B,$0CE9,$08A7,$0C82,$108B
	dw $20EF,$2D95,$2A18,$3EDD,$53FF,$1DA8,$16CD,$2FB5
	dw $53FD,$7FFF,$033F,$43FF,$7FFF,$0C82,$1D46,$7C07
	dw $7C09,$7C0B,$3EDD,$7C0F,$1D46,$0DE5,$26EC,$27D5
	dw $53FD,$2D7F,$465F,$6FFF

DATA_5FB31A:
	dw $7FFF,$0000,$21C5,$46EE,$5772,$1522,$4FFF,$190A
	dw $2991,$3237,$429C,$73F3,$3E5F,$7F33,$03FF,$7FFF

DATA_5FB33A:
	dw $7C00,$7C18,$7C18,$7C18,$7C18,$7C18,$7C1B,$7C1F
	dw $701F,$641F,$501F,$381F,$1C1F,$001F,$7FFF,$1526
	dw $6BF9,$5B32,$4E6B,$3983,$3B96,$3AB0,$31CC,$2569
	dw $337C,$3296,$29B2,$1D7A,$0CCF,$7FFF,$7FFF,$4A8D
	dw $6751,$63F6,$67FD,$1923,$21A8,$2A2B,$2ED3,$5B51
	dw $5B11,$5711,$6791,$67B1,$4254,$0ADC,$065A,$05D6
	dw $0592,$052E,$010C,$128C,$124A,$1209,$11A7,$1166
	dw $1124,$111C,$1A5E,$6AB5,$522E,$41AB,$3529,$3529
	dw $0000,$1124,$354B,$3529,$3529,$41AB,$522E,$6293
	dw $6ED7,$77BD,$7FFF,$49EC,$3E2B,$4EEC,$5772,$6BDB
	dw $7FFF,$3A51,$42B5,$577B,$73DE,$2DF4,$2EB9,$379F
	dw $4FDF,$7FFF,$3D45,$292A,$256E,$3E75,$531C,$6FBF
	dw $2D8C,$4694,$67DF,$73FF,$31E8,$46C9,$57B6,$73FC
	dw $0D00,$1562,$19C5,$1628,$1A8B,$16CD,$0448,$04EB
	dw $114E,$19B1,$20E0,$3580,$4600,$0065,$1736,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$73F0,$63EC
	dw $5368,$4AA4,$63FE,$47FA,$4BD2,$4F9F,$3DEA,$2657
	dw $1E15,$475F,$36DB,$2E99,$3F1D,$7FFF,$73DF,$6B9F
	dw $635F,$5B1F,$52DF,$4A9D,$425B,$4BD2,$2B8E,$2A85
	dw $4DFE,$393E,$6F78,$5F14,$7FFF,$7FF6,$7F72,$730F
	dw $66AC,$631F,$529F,$421F,$63F8,$57F5,$4B92,$3F2F
	dw $32CC,$2669,$1A06,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$221F,$089F,$10EB,$196E,$15D4,$129C
	dw $1888,$20CA,$231F,$1530,$1997,$0CA8,$10EB,$22BF
	dw $227F,$318F,$1465,$1466,$1887,$1888,$1CA9,$20CA
	dw $250B,$292D,$2D4E,$121F,$15FC,$19B8,$2194,$2991
	dw $3148,$2506,$20E5,$18C4,$2D29,$28E7,$24C5,$1C83
	dw $0420,$2968,$2126,$18E5,$1CA4,$1462,$0C41,$5ED0
	dw $566E,$4A0C,$3DCA,$3DA9,$3567,$3147,$2906,$0420
	dw $1D2A,$1D26,$24E6,$18A7,$1883,$0C41,$0000,$0420
	dw $0C62,$1483,$1CC4,$2505,$2D47,$39A9,$4E2D,$6FDF
	dw $7C1B,$7C1B,$7C1B,$7C1B,$7C1B,$0000,$0000,$0000
	dw $0420,$0C62,$1483,$1CC4,$2505,$2D47,$7C1B,$7C1B
	dw $7C1B,$7C1B,$7C1B,$7C1B,$7FFF,$18C6,$28E9,$2D6C
	dw $41AF,$5671,$5F79,$6FBE,$35F0,$4675,$6EF9,$39EC
	dw $4EB1,$6F37,$7C00,$7FFF,$5BDF,$537F,$3EDF,$4F7B
	dw $42F7,$7B77,$66F5,$5E8F,$55EB,$398B,$3DFF,$77DE
	dw $73BD,$7FFF,$0000,$1C23,$3CCA,$1080,$1D01,$3984
	dw $4ACE,$08A0,$1920,$2183,$36AA,$4800,$7C00,$57F5
	dw $7FFF,$0000,$0846,$2CED,$0863,$14E7,$256B,$2E55
	dw $0103,$0D65,$1E09,$26D4,$0000,$0C00,$7C00,$7FFF
	dw $7CD9,$0000,$14A6,$2D6C,$4E74,$6F7D,$2528,$4A50
	dw $7FFE,$0063,$10E9,$216D,$0044,$10C9,$212D,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0886,$4DA7
	dw $4F75,$474B,$36E8,$6313,$6EAB,$5E09,$3D66,$2D04
	dw $539F,$475F,$431F,$369E,$090E,$0886,$7FFF,$7FFF
	dw $7FFF,$7FFF,$4F75,$474B,$36E8,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$2B3F,$0A5D,$05D8,$0131,$10C9
	dw $1885,$7C1F,$7C1F,$7C1F,$09D0,$098D,$092A,$00C7
	dw $0485,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$3B7F,$22BC,$11D6,$112E,$0D0A,$08A6,$7C1F
	dw $7C1F,$7C1F,$2ECD,$1249,$11A7,$08E5,$0882,$7C1F
	dw $67FF,$6B9F,$56BF,$45FD,$3537,$2D31,$24EB,$1CA7
	dw $577F,$2E9D,$25F7,$154F,$1509,$1085,$0C60,$67FF
	dw $4FFB,$2F6D,$26AF,$160C,$2987,$1D25,$18C0,$577F
	dw $2E9D,$25F7,$154F,$1509,$1085,$0C60,$67DF,$3BDF
	dw $3B3E,$367C,$321B,$31B9,$2557,$0C64,$0C86,$10A8
	dw $14CC,$18F0,$1D14,$2558,$7C18,$0C86,$10A8,$14CC
	dw $18F0,$1D14,$2558,$2553,$0C64,$67DF,$3BDF,$3B3E
	dw $367C,$321B,$31B9,$7C18,$7FFF,$7FB8,$7B13,$666E
	dw $61EA,$47F9,$3794,$36F1,$6F3F,$66FF,$5EBF,$567F
	dw $4E3F,$45FF,$399F,$3C1D,$401B,$4019,$4417,$4815
	dw $4C13,$5011,$500F,$540C,$580A,$5C08,$6006,$6004
	dw $6402,$6800,$0C63,$0000,$0000,$0001,$0022,$0400
	dw $0820,$0C41,$0C42,$0042,$0042,$0842,$0842,$0400
	dw $0400,$0C63,$0000,$0001,$0022,$0443,$0020,$0041
	dw $0462,$0C42,$0042,$0463,$0842,$0C63,$0400,$0821
	dw $3C1D,$401B,$4019,$4417,$4815,$4C13,$5011,$500F
	dw $540C,$580A,$5C08,$6006,$6004,$6402,$6800,$3C1D
	dw $401B,$4019,$4417,$4815,$4C13,$5011,$500F,$540C
	dw $580A,$5C08,$6006,$6004,$6402,$6800,$6402,$6004
	dw $6006,$5C08,$580A,$540C,$500F,$5011,$4C13,$4815
	dw $4417,$4019,$401B,$3C1D,$381F,$6402,$6004,$6006
	dw $5C08,$580A,$540C,$500F,$5011,$4C13,$4815,$4417
	dw $4019,$401B,$3C1D,$381F,$3C1D,$401B,$4019,$4417
	dw $4815,$4C13,$5011,$500F,$540C,$580A,$5C08,$6006
	dw $6004,$6402,$6800,$3C1D,$401B,$4019,$4417,$4815
	dw $4C13,$5011,$500F,$540C,$580A,$5C08,$6006,$6004
	dw $6402,$6800,$0C62,$0C83,$10C4,$1D45,$25A5,$31E6
	dw $3E2A,$6F7B,$66F4,$5E6D,$55E6,$6F7B,$0C62,$2D6B
	dw $4E73,$7FFF,$47DF,$2B7E,$02DF,$3379,$32B2,$535F
	dw $469C,$35D9,$3194,$2D50,$01B9,$6FDE,$6BBD,$7FFF
	dw $0863,$0C64,$1086,$14CA,$150D,$194F,$29B1,$025F
	dw $015C,$005A,$0019,$0863,$0863,$0863,$0863,$579F
	dw $579F,$579F,$579F,$579F,$579F,$579F,$579F,$579F
	dw $579F,$579F,$579F,$579F,$579F,$579F,$7FFF,$7FFE
	dw $7FDA,$7F55,$66B1,$4E0D,$3D6C,$290A,$6B7D,$4EB7
	dw $35F1,$212A,$1CE8,$1084,$0C60,$7FFF,$7FFE,$7FDA
	dw $7F55,$66B1,$4E0D,$3D6C,$290A,$6B7D,$4EB7,$35F1
	dw $212A,$1CE8,$1084,$0C60,$67FF,$6FFB,$6FB5,$6F50
	dw $5ACB,$4627,$35A7,$0C22,$1043,$1844,$24A5,$3506
	dw $4187,$45C8,$7C18,$1043,$1844,$24A5,$3506,$4187
	dw $45C8,$41C7,$0C22,$67FF,$6FFB,$6FB5,$6F50,$5ACB
	dw $4627,$55A6,$0C82,$18C9,$252C,$3DF3,$4656,$5AFC
	dw $539F,$18EF,$2197,$2EBF,$53DF,$7FFF,$0C82,$0C82
	dw $0C82,$0C82,$14C9,$7C07,$7C09,$7C0B,$3EDD,$7C0F
	dw $14A9,$2110,$2998,$2EBF,$53DF,$0C82,$0C82,$0C82
	dw $7FFF,$0864,$4997,$49FC,$4A9F,$5B5F,$6BFF,$3E0D
	dw $3EB4,$473A,$67DF,$08A9,$62DF,$08AD,$4A9F,$7FFF
	dw $0864,$7C1B,$0061,$0D48,$1DD1,$7CC0,$7C1B,$7C1B
	dw $325D,$575E,$501F,$381F,$381F,$7C7C,$529C,$1443
	dw $0C22,$1844,$2C88,$492B,$6E13,$2461,$30E1,$4944
	dw $59C4,$0000,$4A14,$0820,$6C0B,$7FFF,$1443,$6C0A
	dw $1085,$14CB,$24B2,$7C1F,$6C0A,$6C0A,$600E,$540E
	dw $400E,$280E,$0C0E,$000E,$67DF,$4F1E,$329C,$21F9
	dw $1976,$1550,$0CEA,$0486,$5F5F,$3E9D,$31F7,$214F
	dw $14E9,$0464,$0022,$679F,$46BF,$2DFE,$197B,$10F7
	dw $08D2,$088B,$0446,$5F5F,$3E9D,$31F7,$214F,$14E9
	dw $0464,$0022,$7FFF,$4D0C,$4D71,$4DB7,$4E3D,$4EDF
	dw $5F3F,$679F,$5B9F,$501F,$567A,$6B3D,$39F1,$4296
	dw $67FF,$7FFF,$7FE0,$7E20,$7C00,$4000,$1C00,$0C00
	dw $43FF,$67FF,$7FFF,$6E40,$634F,$3AFB,$1C1F,$001F
	dw $7FFF,$28C3,$3D25,$51C8,$664C,$6EAC,$7711,$7F75
	dw $570C,$381F,$4A32,$5EF8,$39A9,$424E,$67B7,$223D
	dw $223D,$223D,$223D,$223D,$223D,$223D,$223D,$223D
	dw $223D,$223D,$223D,$223D,$223D,$223D,$7FFF,$2126
	dw $2D89,$39ED,$4650,$56B4,$6317,$6F7B,$4148,$39AD
	dw $5632,$6AF5,$39A9,$424E,$67B7,$223D,$223D,$223D
	dw $223D,$223D,$223D,$223D,$223D,$223D,$223D,$223D
	dw $223D,$223D,$223D,$223D,$6339,$0000,$0441,$0C62
	dw $10A3,$14C4,$1CE5,$2106,$7C1B,$7C1B,$7C1B,$7C1B
	dw $7C1B,$7C1B,$7C1B,$6339,$0000,$0841,$10A3,$18E4
	dw $2125,$2D6A,$3DCD,$460F,$5252,$212A,$1D09,$1CE8
	dw $18A6,$1485,$7FFF,$1526,$475F,$3A3F,$1D5B,$0CB2
	dw $3B96,$3AB0,$31CC,$2569,$337C,$3296,$29B2,$1D7A
	dw $0CCF,$0000,$7FFF,$2573,$39D8,$4E9F,$4F7F,$14C8
	dw $1D4D,$25D0,$2ABF,$41B7,$41B7,$41B7,$41B7,$4E5B
	dw $7FFF,$1526,$475F,$3A3F,$1D5B,$0CB2,$3B96,$3AB0
	dw $31CC,$2569,$337C,$3296,$29B2,$1D7A,$0CCF,$0000
	dw $7FFF,$5A0E,$72B7,$7359,$73FD,$20CD,$3D74,$525A
	dw $4F3F,$6E74,$6E74,$6E74,$6E74,$7AD8,$031F,$0E74
	dw $0D50,$00EB,$0089,$027F,$0137,$00AC,$027F,$0172
	dw $004C,$0009,$0006,$0003,$0000,$7FFF,$7FF6,$7F72
	dw $730F,$66AC,$631F,$529F,$421F,$63F8,$57F5,$4B92
	dw $3F2F,$32CC,$2669,$1A06,$0000,$0001,$0423,$0425
	dw $0C47,$1069,$148B,$1CCE,$20F3,$6F9F,$401F,$401F
	dw $401F,$401F,$401F,$0000,$0000,$0000,$0001,$0423
	dw $0425,$0C47,$1069,$148B,$401F,$401F,$401F,$401F
	dw $401F,$401F,$19B5,$125D,$11F8,$0D94,$0D30,$08EC
	dw $08CA,$2214,$21D2,$2190,$1D4D,$1D0B,$1CEA,$22FF
	dw $33BF,$6AB5,$522E,$41AB,$3529,$3529,$0000,$1124
	dw $354B,$3529,$3529,$41AB,$522E,$6293,$6ED7,$77BD
	dw $63BF,$112A,$220C,$32B1,$3F17,$477C,$4FBF,$2A2F
	dw $3294,$433B,$5FFF,$114E,$1EDE,$15F4,$1A9B,$63BF
	dw $741B,$6C1B,$641C,$581C,$501C,$481C,$401D,$341D
	dw $325D,$4F1E,$1C1E,$141E,$081F,$001F,$03BF,$037F
	dw $033F,$02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F
	dw $013F,$00FF,$00BF,$007F,$001F,$03BF,$037F,$033F
	dw $02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F,$013F
	dw $00FF,$00BF,$007F,$001F,$007F,$00BF,$00FF,$013F
	dw $017F,$01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F
	dw $037F,$03BF,$03FF,$007F,$00BF,$00FF,$013F,$017F
	dw $01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F,$037F
	dw $03BF,$03FF,$03BF,$037F,$033F,$02FF,$02BF,$027F
	dw $023F,$01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F
	dw $001F,$03BF,$037F,$033F,$02FF,$02BF,$027F,$023F
	dw $01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F,$001F
	dw $007F,$00BF,$00FF,$013F,$017F,$01BF,$01FF,$023F
	dw $027F,$02BF,$02FF,$033F,$037F,$03BF,$03FF,$007F
	dw $00BF,$00FF,$013F,$017F,$01BF,$01FF,$023F,$027F
	dw $02BF,$02FF,$033F,$037F,$03BF,$03FF,$03BF,$037F
	dw $033F,$02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F
	dw $013F,$00FF,$00BF,$007F,$001F,$03BF,$037F,$033F
	dw $02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F,$013F
	dw $00FF,$00BF,$007F,$001F,$007F,$00BF,$00FF,$013F
	dw $017F,$01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F
	dw $037F,$03BF,$03FF,$007F,$00BF,$00FF,$013F,$017F
	dw $01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F,$037F
	dw $03BF,$03FF,$03BF,$037F,$033F,$02FF,$02BF,$027F
	dw $023F,$01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F
	dw $001F,$03BF,$037F,$033F,$02FF,$02BF,$027F,$023F
	dw $01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F,$001F
	dw $007F,$00BF,$00FF,$013F,$017F,$01BF,$01FF,$023F
	dw $027F,$02BF,$02FF,$033F,$037F,$03BF,$03FF,$007F
	dw $00BF,$00FF,$013F,$017F,$01BF,$01FF,$023F,$027F
	dw $02BF,$02FF,$033F,$037F,$03BF,$03FF,$03BF,$037F
	dw $033F,$02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F
	dw $013F,$00FF,$00BF,$007F,$001F,$03BF,$037F,$033F
	dw $02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F,$013F
	dw $00FF,$00BF,$007F,$001F,$007F,$00BF,$00FF,$013F
	dw $017F,$01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F
	dw $037F,$03BF,$03FF,$007F,$00BF,$00FF,$013F,$017F
	dw $01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F,$037F
	dw $03BF,$03FF,$03BF,$037F,$033F,$02FF,$02BF,$027F
	dw $023F,$01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F
	dw $001F,$03BF,$037F,$033F,$02FF,$02BF,$027F,$023F
	dw $01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F,$001F
	dw $007F,$00BF,$00FF,$013F,$017F,$01BF,$01FF,$023F
	dw $027F,$02BF,$02FF,$033F,$037F,$03BF,$03FF,$007F
	dw $00BF,$00FF,$013F,$017F,$01BF,$01FF,$023F,$027F
	dw $02BF,$02FF,$033F,$037F,$03BF,$03FF,$03BF,$037F
	dw $033F,$02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F
	dw $013F,$00FF,$00BF,$007F,$001F,$03BF,$037F,$033F
	dw $02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F,$013F
	dw $00FF,$00BF,$007F,$001F,$007F,$00BF,$00FF,$013F
	dw $017F,$01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F
	dw $037F,$03BF,$03FF,$007F,$00BF,$00FF,$013F,$017F
	dw $01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F,$037F
	dw $03BF,$03FF,$77D3,$7FF8,$7BF5,$7FF9,$7FFF,$7FF8
	dw $7FFC,$7FF2,$2585,$5B32,$7FFF,$0000,$2585,$154F
	dw $0CC9,$0000,$4B79,$63FE,$7CD9,$4F7F,$259F,$0007
	dw $7FF2,$2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9
	dw $0840,$1083,$10C6,$639E,$1D6F,$1D6D,$10C8,$639E
	dw $7FFF,$1D2B,$10C8,$639E,$0840,$54E0,$7FFF,$1482
	dw $2904,$45A9,$639E,$7FFF,$7F14,$0444,$639E,$7FF5
	dw $7FFA,$7FFF,$7FFF,$7F4E,$7EAC,$6588,$3E7A,$15B5
	dw $248D,$639E,$2928,$2928,$2928,$639E,$3E11,$314A
	dw $34E5,$0000,$3215,$46D9,$5F9F

DATA_5FC094:
	dw $46EE,$5772,$7FFF,$21C5,$291F,$7F33,$3FFF,$38DF
	dw $7E25,$73F2,$77FB,$38DF,$1CFF,$463F,$43FF,$77F8
	dw $7FFF,$62F0,$0000,$7474,$7D55,$7CD9,$0000,$2585
	dw $5B32,$7FFF,$0000,$2585,$154F,$0CC9,$4FF7,$3EED
	dw $3DAE,$7FF9,$4EFD,$4637,$3DAE,$0000,$2585,$5B32
	dw $7FFF,$0000,$2585,$154F,$0CC9,$0C23,$1465,$1CA7
	dw $7FFF,$08A5,$1508,$216B,$7FF2,$2585,$5B32,$7FFF
	dw $0000,$2585,$154F,$0CC9,$7FFF,$7FFD,$7FB9,$10C3
	dw $7FF2,$7FF8,$7FFC,$10C3,$7FFF,$7FFC,$7FF8,$10C3
	dw $7FFF,$73FC,$6BF9,$7753,$73B6,$7BF7,$7FF9,$7FFF
	dw $73B6,$7BFB,$7FF2

DATA_5FC13A:
	dw $2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9,$7FFF
	dw $6800,$3840,$2C86,$6800,$4AB9,$67FF,$7FF2,$2585
	dw $5B32,$7FFF,$0000,$2585,$154F,$0CC9,$0000,$4FFD
	dw $1773,$7FB2,$0000,$1773,$0DEC,$0000,$2585,$5B32
	dw $7FFF,$0000,$2585,$154F,$0CC9,$0000,$5773,$4235
	dw $30E2,$0000,$77F4,$6A90,$0000,$2585,$5B32,$7FFF
	dw $0000,$2585,$154F,$0CC9,$7FFF,$0000,$420F,$294D
	dw $2949,$0000,$420F,$0000,$2585,$5B32,$7FFF,$0000
	dw $2585,$154F,$0CC9,$7FFF,$0000,$4000,$639E,$3E7F
	dw $3E7D,$0C23,$7FF2,$2585,$5B32,$7FFF,$0000,$2585
	dw $154F,$0CC9,$0000,$4B79,$63FE,$7CD9,$0000,$0000
	dw $0000,$0000,$2585,$5B32,$7FFF,$0000,$2585,$154F
	dw $0CC9,$1152,$0CEB,$0CC8,$0C85,$0C85,$0CEB,$0CC8
	dw $290A,$1152,$0458,$471A,$1A9F,$1152,$0CEB,$63DF
	dw $7FFF,$573B,$027D,$7F26,$7FFF,$6F35,$0000,$420F
	dw $462E,$4E6C,$56AA,$5EE8,$6726,$7383,$7FE0,$0000
	dw $222C,$2357,$7FF9,$0000,$0934,$25DD,$0000,$2585
	dw $5B32,$7FFF,$0000,$2585,$154F,$0CC9,$0000,$0000
	dw $0000,$0000,$01FF,$00FB,$0000,$0000,$2585,$5B32
	dw $7FFF,$0000,$2585,$154F,$0CC9,$0821,$4A15,$7B78
	dw $7C05,$0821,$3570,$62AD,$7C05,$0821,$2633,$1583
	dw $7C05,$0821,$7FFF,$26A6,$0821,$152C,$0CE2,$7C05
	dw $0821,$20CA,$45C8,$7C05,$0821,$5A13,$3ADD,$7C05
	dw $0821,$3CEB,$2152,$3E32,$2DCB,$2148,$1129,$3E2C
	dw $2148,$2DCB,$1129,$3E32,$0CDF,$57BF,$1129,$1404
	dw $2DC8,$7FFF,$439E,$233B,$12FA,$1064,$11CC,$10E6
	dw $1084,$1064,$0843,$0C64,$1084,$1064,$212B,$1CA7
	dw $1485,$6B9F,$7FFF,$5B3F,$7FFF,$0886,$0D87,$0DE9
	dw $7FFF,$0886,$5153,$492E,$7FFF,$4209,$29E9,$0DE9
	dw $4DFF,$3514,$0804,$7C05,$3935,$1C8A,$0000,$420F
	dw $462E,$4E6C,$56AA,$5EE8,$6726,$7383,$7FE0

DATA_5FC328:
	dw $7E0E,$7F9C,$7EF6,$0000,$7E0E,$7EF6,$7E93,$0000
	dw $2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9,$7FFF
	dw $439F,$01BF,$0019,$437F,$01BF,$000C,$0019,$437F
	dw $0A1B,$0CA8,$0019,$335F,$097F,$5114,$7FFF,$4BFF
	dw $5F77,$6EEE,$5FFD,$6B56,$5E2C,$6EEE,$5FFD,$6357
	dw $35E6,$6EEE,$73BC,$5A52,$59F4,$2D6B,$2652,$03FF
	dw $7FF9,$2D6B,$1CE7,$0C63,$0000,$2585,$5B32,$7FFF
	dw $0000,$2585,$154F,$0CC9,$6FFF,$46D8,$190A,$0000
	dw $6FFF,$4F1A,$218E,$0000,$2585,$5B32,$7FFF,$0000
	dw $2585,$154F,$0CC9,$7CD9,$7CD9,$7CD9,$639E,$10EB
	dw $10EB,$10EB,$639E,$1D91,$152D,$0CA8,$7CD9,$7CD9
	dw $7CD9,$7CD9,$77FF,$6FDF,$675F,$7E00,$6FDF,$675F
	dw $5AFF,$0000,$2585,$5B32,$7FFF,$0000,$2585,$154F
	dw $0CC9,$7FFF,$7FDC,$7B98,$7E00,$7FDC,$7B98,$6F55
	dw $0000,$2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9
	dw $62DF,$6F5F,$671F,$6F1F,$7FFF,$6F5F,$779F,$0000
	dw $2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9,$4F9F
	dw $3657,$35AE,$7FF9,$4E9B,$39D3,$35AE,$0000,$2585
	dw $5B32,$7FFF,$0000,$2585,$154F,$0CC9,$62DF,$6F5F
	dw $671F,$6F1F,$7FFF,$6F5F,$779F,$0000,$2585,$5B32
	dw $7FFF,$0000,$2585,$154F,$0CC9,$1152,$252A,$1907
	dw $14A6,$14A6,$252A,$1907,$6E2C,$1152,$0458,$7712
	dw $67D4,$4A53,$252A,$7FB9,$1152,$0C84,$0843,$0822
	dw $0822,$0C84,$0843,$2086,$1152,$0458,$29EF,$396B
	dw $1CE7,$0C84,$3252,$46FE,$0000,$2171,$7C1F,$7C15
	dw $7C0B,$7C00,$7FF2,$2585,$5B32,$7FFF,$0000,$2585
	dw $154F,$0CC9,$7FFF,$0000,$7F79,$7FF2,$46FE,$0000
	dw $2171,$7FF2,$2585,$5B32,$7FFF,$0000,$2585,$154F
	dw $0CC9,$0A1F,$1A9F,$0997,$0000,$0A1F,$0954,$09BA
	dw $0000,$2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9
	dw $1CE7,$4210,$6739,$7C1F,$7C1F,$7C1F,$7C1F,$7FF2
	dw $2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9,$0000
	dw $0000,$0000,$7C1F,$7C1F,$7C1F,$7C1F,$7FF2,$2585
	dw $5B32,$7FFF,$0000,$2585,$154F,$0CC9,$110A,$2E55
	dw $5BBF,$7C1F,$7C1F,$7C1F,$7C1F,$7FF2,$2585,$5B32
	dw $7FFF,$0000,$2585,$154F,$0CC9,$6B7F,$7FFF,$4E3B
	dw $0000,$7474,$7D55,$7CD9,$0000,$2585,$5B32,$7FFF
	dw $0000,$2585,$154F,$0CC9,$7FFF,$0000,$2165,$7C1F
	dw $7C15,$7C0B,$7C00,$7FF2,$2585,$5B32,$7FFF,$0000
	dw $2585,$154F,$0CC9,$4F9F,$3657,$0000,$7FF9,$4E9B
	dw $39D3,$0000,$0000,$2585,$5B32,$7FFF,$0000,$2585
	dw $154F,$0CC9,$0000,$5279,$6B1F,$7CD9,$4F7F,$259F
	dw $0007,$7FF2,$2585,$5B32,$7FFF,$0000,$2585,$154F
	dw $0CC9,$24CE,$2A5F,$2532,$27F4,$27F4,$27F4,$27F4
	dw $0000,$2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9
	dw $0840,$1083,$10C6,$639E,$154F,$0089,$0046,$639E
	dw $7FFF,$1D2B,$10C8,$639E,$0840,$54E0,$7FFF,$0840
	dw $1083,$10C6,$639E,$7EEB,$5945,$1CA0,$639E,$7FFF
	dw $1D2B,$10C8,$639E,$0840,$54E0,$7FFF,$0840,$1083
	dw $10C6,$639E,$573F,$3175,$186B,$639E,$7FFF,$1D2B
	dw $10C8,$639E,$0840,$54E0,$7FFF,$46EE,$5772,$7FFF
	dw $21C5,$3E5F,$7F33,$03FF,$21C5,$2D9F,$7E0F,$7FFF
	dw $21C5,$2D9F,$2529,$03FF,$007F,$00BF,$00FF,$013F
	dw $017F,$01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F
	dw $037F,$03BF,$03FF,$03BF,$037F,$033F,$02FF,$02BF
	dw $027F,$023F,$01FF,$01BF,$017F,$013F,$00FF,$00BF
	dw $007F,$001F,$007F,$00BF,$00FF,$013F,$017F,$01BF
	dw $01FF,$023F,$027F,$02BF,$02FF,$033F,$037F,$03BF
	dw $03FF,$03BF,$037F,$033F,$02FF,$02BF,$027F,$023F
	dw $01FF,$01BF,$017F,$013F,$00FF,$00BF,$007F,$001F
	dw $007F,$00BF,$00FF,$013F,$017F,$01BF,$01FF,$023F
	dw $027F,$02BF,$02FF,$033F,$037F,$03BF,$03FF,$03BF
	dw $037F,$033F,$02FF,$02BF,$027F,$023F,$01FF,$01BF
	dw $017F,$013F,$00FF,$00BF,$007F,$001F,$007F,$00BF
	dw $00FF,$013F,$017F,$01BF,$01FF,$023F,$027F,$02BF
	dw $02FF,$033F,$037F,$03BF,$03FF,$03BF,$037F,$033F
	dw $02FF,$02BF,$027F,$023F,$01FF,$01BF,$017F,$013F
	dw $00FF,$00BF,$007F,$001F,$007F,$00BF,$00FF,$013F
	dw $017F,$01BF,$01FF,$023F,$027F,$02BF,$02FF,$033F
	dw $037F,$03BF,$03FF

DATA_5FC77E:
	dw $3BBF,$1F3F,$027F,$01DF,$027F,$1F3F,$3BBF,$7FFF
	dw $0000,$0100,$2860,$0090,$0220,$4987,$1633,$011A
	dw $0360,$5ECC,$01DD,$2039,$2AFA,$269D,$5F7D,$0000
	dw $0000,$0000,$000C,$0120,$0883,$012F,$0016,$0260
	dw $1DC8,$00D9,$0015,$01F6,$0199,$1E79,$0000,$0000
	dw $0000,$0008,$0020,$0000,$002B,$0012,$0160,$00C4
	dw $0015,$0011,$00F2,$0095,$0175,$0000,$0000,$0000
	dw $0004,$0000,$0000,$0007,$000E,$0060,$0000,$0011
	dw $000D,$000E,$0011,$0071,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0003,$000A,$0000,$0000,$000D,$0009
	dw $000A,$000D,$000D,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0006,$0000,$0000,$0009,$0005,$0006
	dw $0009,$0009,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000

DATA_5FC860:
	dw $3339,$2273,$3B46,$2281,$04DB,$6318,$4E73,$0000
	dw $7FFF,$177F,$063E,$53FC,$7F6D,$6EA7,$5DE2

DATA_5FC87E:
	dw $1A3A,$0995,$1F9F,$095D,$35AD,$7BB4,$7ACF,$0000
	dw $7FFF,$6318,$4E73,$7BB4,$47A9,$2AE4,$1E23,$56B5
	dw $4631,$6739,$4E73,$35AD,$6739,$4E73,$0000,$7FFF
	dw $5EF7,$4E73,$733F,$6739,$4E73,$35AD,$3DFF,$189D
	dw $3B46,$2281,$6716,$4E10,$7FF7,$3DCC,$5692,$1F9F
	dw $063E,$7FFF,$7F31,$7EB9,$0000,$0000,$7EE0,$03E0
	dw $7C08,$0000,$063E,$7FFF,$7C08,$0000,$7EE0,$04DF
	dw $7C08,$0000,$7EE0,$035F,$0013,$0017,$001F,$1CFF
	dw $1916,$35DE,$36DE,$0000,$0006,$0008,$000F,$088C
	dw $0D30,$3DEF,$6739,$73FF,$679F,$5F5F,$52FF,$423B
	dw $2D93,$2930,$007D,$0077,$0051,$002B,$1CE2,$7BFC
	dw $7FB7,$7ACF

DATA_5FC932:
	dw $1152,$1594,$15D6,$19F7,$1A39,$4943,$0000,$7FFF
	dw $0140,$0E20,$22A0,$3DEF,$56B5,$6B5A,$3A33,$52F9
	dw $5F7F,$4943,$55A3,$6A43,$7323,$7F70,$77FA,$7FFF
	dw $4943,$55A3,$6A43,$7FFF,$7C13,$7C1F,$7C1F,$7C1F
	dw $7C13,$7C1F,$7C1F,$7C1F,$0000,$63BF,$575C,$4AF9
	dw $3E75,$31F1,$218D,$152A,$08C6,$0463,$0022,$0000
	dw $1E3F,$1D5D,$0CB2,$7FFF,$1420,$50E7,$5FFF,$22A0
	dw $1420,$0C20,$0420,$7C13,$55A3,$6A43,$7323,$7C13
	dw $7C13,$7C13,$7C13,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$5E0F,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF

DATA_5FCB2C:
	dw $0000,$294A,$318C,$39CE,$4210,$4A52,$5294,$5AD6
	dw $6318,$6739,$6B5A,$6F7B,$739C,$77BD,$7FFF

DATA_5FCB4A:
	dw $0000,$0000,$0000,$0043,$0021,$0021,$0509,$0062
	dw $0042,$0DCE,$00A5,$0084,$1E73,$0509,$00C6,$2F19
	dw $0D8C,$0108,$3FBD,$1631,$014A,$63FF,$26D6,$018C
	dw $0000,$7FFF,$7FFF,$417F,$6B9F,$6B9F,$417F,$6B9F
	dw $7FFF,$427F,$7FFF,$7FFF,$5F3F,$4ABF,$635F,$0000
	dw $7FFF,$6AFF,$521F,$6B9F,$56BF,$4A1F,$73BF,$7BDF
	dw $427F,$6BBF,$7FFF,$635F,$4EBF,$5AFF,$0000,$7FFF
	dw $521F,$6AFF,$6B9F,$4A1F,$56BF,$7BDF,$73BF,$427F
	dw $635F,$7FFF,$6BBF,$5AFF,$4EBF,$0000,$7FFF,$417F
	dw $7FFF,$6B9F,$417F,$6B9F,$7FFF,$6B9F,$427F,$5F3F
	dw $7FFF,$7FFF,$635F,$4ABF

DATA_5FCBF2:
	dw $7FFF,$0000,$001F,$023F,$037F,$03F3,$0327,$7F20
	dw $7E66,$7D77,$7C1F,$44A6,$48C7,$4CE8,$5109

DATA_5FCC10:
	dw $0000,$3B5F,$2ABF,$1A1D,$1192,$7D32,$7D32,$7D32
	dw $7D32,$7D32,$7FFF,$7D32,$7D32,$7D32,$7D32

DATA_5FCC2E:
	dw $021F,$023F,$025F,$027F,$029F,$02BF,$02DF,$02FF
	dw $031F,$033F,$035F,$037F,$039F,$03BF,$03DF,$03FF
	dw $03FE,$03FD,$03FC,$03FB,$03FA,$03F9,$03F8,$03F7
	dw $03F6,$03F5,$03F4,$03F3,$03F2,$03F1,$03F0,$03EF
	dw $03EF,$03F0,$03F1,$03F2,$03F3,$03F4,$03F5,$03F6
	dw $03F7,$03F8,$03F9,$03FA,$03FB,$03FC,$03FD,$03FE
	dw $03FF,$03DF,$03BF,$039F,$037F,$035F,$033F,$031F
	dw $02FF,$02DF,$02BF,$029F,$027F,$025F,$023F,$021F
	dw $0000,$7FFF,$4A45,$6F6A,$0286,$0371,$3BBF,$7FEF
	dw $2112,$319F,$4E73,$6F7B,$1590,$3ABD,$5BBF,$0000
	dw $7FFF,$35F6,$531D,$0286,$0371,$3BBF,$371F,$2112
	dw $359F,$4E73,$6F7B,$4151,$59F2,$6F14

DATA_5FCCEA:
	dw $001F,$14FB,$014A,$11F2,$229B,$2508,$3149,$49CC
	dw $08CB,$152E,$0865,$14C8,$1D0A,$29AF,$3612,$562D
	dw $3EBE,$14FB,$04C7,$094C,$1635,$49CC,$2508,$3149
	dw $08CB,$152E,$0865,$14C8,$1D0A,$29AF,$3612,$49CC
	dw $21DD,$14FB,$0865,$0CE9,$11D1,$3149,$49CC,$2508
	dw $08CB,$152E,$0865,$14C8,$1D0A,$29AF,$3612,$3149
	dw $1D7B,$14FB,$04C7,$094C,$1635,$2508,$3149,$49CC
	dw $08CB,$152E,$0865,$14C8,$1D0A,$29AF,$3612,$2508

DATA_5FCD6A:
	dw $4DA4,$4DC5,$51E7,$5609,$5A2B,$5E6D,$5E8E,$62B0
	dw $66D2,$6F15,$7358,$7799,$7FDC,$7FFF,$5183,$51A4
	dw $55C6,$59E8,$5E0A,$624C,$626D,$668F,$6AB1,$72F4
	dw $7737,$7B78,$7FBB,$7FFE,$5562,$5583,$59A5,$5DC7
	dw $61E9,$662B,$664C,$6A6E,$6E90,$76D3,$7B16,$7F57
	dw $7F9A,$7FDD,$5941,$5962,$5D84,$61A6,$65C8,$6A0A
	dw $6A2B,$6E4D,$726F,$7AB2,$7EF5,$7F36,$7F79,$7FBC
	dw $0000,$0000,$679F,$6FD9,$7FED,$0000,$2144,$1D51
	dw $7FF0,$0CC3,$73FF,$7BFC,$732A,$0000,$41EC,$3DF9
	dw $0000,$5B9F,$569C,$7FED,$0000,$2DF6,$28F1,$7FED
	dw $0000,$004D,$0006,$7FED,$0000,$7FFF,$561F,$1400
	dw $1820,$2061,$2482,$2CC3,$2CC3,$3525,$3D88,$45EB
	dw $4E4E,$56B1,$6777,$73BA,$6371,$73B6,$1400,$1820
	dw $2061,$2482,$2CC3,$2CC3,$3525,$3D88,$45EB,$4E4E
	dw $56B1,$6777,$73BA,$629A,$5F1C,$1400,$1820,$2061
	dw $2482,$2CC3,$2CC3,$3525,$3D88,$45EB,$4E4E,$56B1
	dw $6777,$73BA,$7AB7,$7B17

DATA_5FCE72:
	dw $5C88,$5D0C,$5D90,$5E14,$5E98,$5F1C,$579F,$6FDF
	dw $7FFF,$77FF,$6FFF,$63FF,$7AB7,$7B9B,$63FF

DATA_5FCE90:
	dw $40C6,$4509,$4D6D,$51D0,$5A34,$5B1B,$579F,$6FDF
	dw $7FFF,$77FF,$6FFF,$63FF,$7AB7,$7B9B,$63FF

DATA_5FCEAE:
	dw $2C82,$40E6,$556A,$69F0,$7E76,$6AF9,$579F,$7FFF
	dw $6FDF,$577F,$531A,$4A95,$460F,$3D8A,$3504,$1400
	dw $2402,$3865,$48A7,$498A,$49D1,$3E36,$008E,$0D12
	dw $3DB7,$3E3A,$0EDF,$1B5F,$72D8,$63FF,$3864,$3CA6
	dw $40E8,$456C,$49AE,$4DF0,$5632,$4A76,$52B8,$56FA
	dw $5B3C,$637E,$67BF,$6FFF,$6FFF,$7FFF,$7FFF,$7FFF
	dw $7FFF,$7FFF,$0012,$0494,$0D16,$1198,$1A39,$1EBB
	dw $273D,$7FFF,$7FFF,$2B7F,$7FFF,$42D7,$08AE,$08B7
	dw $08BF,$1144,$15A4,$1A05,$26A8,$332B,$3B6F,$43B3
	dw $577C,$0010,$4FF7,$73FF,$679F,$5F5F,$52FF,$423B
	dw $2D93,$2930,$007D,$0077,$0051,$002B,$1CE2,$7FFF
	dw $6B35,$39F0,$768C,$0071,$3D23,$4D85,$5DE8,$6E4B
	dw $7ECE,$1537,$21B9,$2E3C,$3ABF,$3E56,$5AF9,$6B7C
	dw $7FFF,$000D,$0015,$14BF,$085F,$109F,$211F,$3DFF
	dw $2973,$29DF,$2ABF,$0000,$0442,$0009,$5EFF,$7FFF

DATA_5FCF9E:
	dw $000D,$0015,$14BF,$085F,$109F,$211F,$3DFF,$2973
	dw $29DF,$2ABF,$0000,$0442,$0009,$5EFF,$7FFF

DATA_5FCFBC:
	dw $110B,$0000,$0120,$0983,$11E6,$1649,$1EAC,$1D80
	dw $25C2,$3225,$3A67,$42A9,$00EF,$0152,$0DB5

DATA_5FCFDA:
	dw $110B,$0000,$452C,$3CC9,$3087,$2824,$15E3,$0DA1
	dw $0560,$2512,$2D54,$3596,$00EF,$0152,$0DB5

DATA_5FCFF8:
	dw $0000,$0A01,$1643,$1A64,$22A5,$2AE7,$3328,$3749
	dw $3F8B,$47CC,$53EE,$3238,$42DB,$535E,$63DF

DATA_5FD016:
	dw $110B,$0000,$452C,$3CC9,$3087,$2824,$15E3,$0DA1
	dw $0560,$2512,$2D54,$3596,$00EF,$0152,$0DB5

DATA_5FD034:
	dw $7FFF,$0060,$08C2,$1525,$2188,$2DEB,$3A4E,$46B1
	dw $08AE,$1511,$2174,$00A9,$012D,$0CB8,$26DC

DATA_5FD052:
	dw $5294,$0060,$08C2,$1525,$00A9,$012D,$09B1,$1A35
	dw $3CC3,$4926,$5589,$192B,$1D70,$1DB6,$21FB

DATA_5FD070:
	dw $7FFF,$0000,$5BB2,$6BD5,$77F8,$73CF,$7BF4,$7FFA
	dw $7FB9,$7FFB,$43BF,$57FF,$6FFF,$1E1C,$2E9F

DATA_5FD08E:
	dw $7FFF,$0000,$538F,$5BB2,$32E6,$3B2C,$4372,$4BB8

DATA_5FD09E:
	dw $2A7A,$3ADB,$4B1C,$5B7D,$3289,$0000,$0000,$4000
	dw $4000,$4000,$4000,$4000,$4000,$4000,$4000,$4000
	dw $4000,$4000,$4000,$78E9,$7A30

DATA_5FD0C8:
	dw $7FFF,$4400,$4400,$4400,$4400,$4400,$4400,$4400
	dw $4400,$4400,$4400,$4400,$4400,$790A,$7A51,$7FFF
	dw $4800,$4800,$4800,$4800,$4800,$4800,$4800,$4400
	dw $4400,$4400,$4400,$4400,$792B,$7A72,$7FFF,$4C00
	dw $4C00,$4C00,$4C00,$4800,$4800,$4800,$4400,$4400
	dw $4400,$4400,$4400,$794C,$7A93,$7FFF,$5000,$5000
	dw $5000,$5000,$4C00,$4C00,$4C00,$4800,$4800,$4800
	dw $4800,$4800,$796D,$7AB4,$7FFF,$5400,$5400,$5400
	dw $5000,$5000,$4C00,$4C00,$4801,$4801,$4801,$4801
	dw $4801,$798E,$7AD5,$7FFF,$5800,$5800,$5800,$5400
	dw $5401,$5002,$5003,$4C04,$4C04,$4C04,$4C04,$4C04
	dw $79AF,$7AF6,$7FFF,$5C00,$5C01,$5802,$5803,$5404
	dw $5405,$5006,$4C07,$4C07,$4C07,$4C07,$4C07,$79D0
	dw $7B17,$7FFF,$6002,$6003,$5C04,$5805,$5806,$5407
	dw $5008,$4C0A,$4C0A,$4C0A,$4C0A,$4C0A,$79F1,$7B38
	dw $7FFF,$6404,$6405,$6006,$5C07,$5809,$540A,$502B
	dw $4C8D,$5110,$4C8D,$4C8D,$4C8D,$7A12,$7B59,$7FFF
	dw $6806,$6807,$6408,$600A,$5C0B,$584D,$54AE,$5110
	dw $5193,$5110,$5110,$5110,$7A33,$7B7A,$7FFF,$6C08
	dw $6809,$640B,$600C,$5C6E,$58CF,$5531,$5193,$5216
	dw $5193,$5193,$5193,$7A54,$7B9B,$7FFF,$700A,$6C0B
	dw $680D,$646F,$60D0,$5D32,$5994,$5216,$7FFF,$5699
	dw $5216,$5216,$7A75,$7B9B,$7FFF,$740C,$700D,$6C4F
	dw $68D1,$6533,$61B5,$5E17,$5699,$7FFF,$7FFF,$571C
	dw $5699,$7A96,$7B9B,$7FFF,$780E,$7430,$70B2,$6D34
	dw $6596,$6218,$5E9A,$571C,$7FFF,$7FFF,$7FFF,$571C
	dw $7AB7,$7B9B,$7FFF,$7C10,$7892,$7514,$6D96,$6A18
	dw $629A,$5F1C,$579F,$7FFF,$7FFF,$7FFF,$7FFF,$7AB7
	dw $7B9B,$7FFF,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$78E9,$79CD

DATA_5FD2A8:
	dw $6231,$2400,$2400,$2400,$2400,$2400,$2400,$2400
	dw $2400,$2400,$2400,$2400,$2400,$790A,$79EE,$6252
	dw $2800,$2800,$2800,$2800,$2800,$2800,$2800,$2800
	dw $2800,$2800,$2800,$2800,$792B,$7A0F,$6273,$2C00
	dw $2C00,$2C00,$2C00,$2C00,$2C00,$2C00,$2C00,$2C00
	dw $2C00,$2C00,$2C00,$794C,$7A30,$6294,$3000,$3000
	dw $3000,$3000,$3000,$3000,$3000,$3000,$3000,$3000
	dw $3000,$3000,$796D,$7A51,$62B5,$3400,$3400,$3400
	dw $3400,$3400,$3400,$3400,$3400,$3400,$3400,$3400
	dw $3400,$798E,$7A72,$62D6,$3800,$3800,$3800,$3800
	dw $3800,$3800,$3800,$3800,$3800,$3800,$3800,$3800
	dw $79AF,$7A93,$62F7,$3C00,$3C00,$3C00,$3C00,$3C00
	dw $3C00,$3C00,$3C01,$3C01,$3C01,$3C01,$3C01,$79D0
	dw $7AB4,$6318,$4000,$4000,$4000,$4000,$4000,$4001
	dw $4003,$3C45,$3C45,$3C45,$3C45,$3C45,$79F1,$7AD5
	dw $6339,$4400,$4400,$4400,$4400,$4402,$4444,$4486
	dw $40C8,$40C8,$40C8,$40C8,$40C8,$7A12,$7AF6,$635A
	dw $4800,$4800,$4800,$4802,$4845,$4887,$48C9,$452C
	dw $49B0,$452C,$452C,$452C,$7A33,$7B17,$637B,$4C00
	dw $4C00,$4C03,$4C65,$4CA8,$4D0A,$4D4D,$49B0,$4E34
	dw $49B0,$49B0,$49B0,$7A54,$7B38,$639C,$5000,$5002
	dw $5065,$50C8,$510B,$516E,$51D1,$4E34,$7FFF,$5297
	dw $4E34,$4E34,$7A75,$7B59,$63BD,$5402,$5445,$54A8
	dw $550B,$556E,$55D1,$5634,$5297,$7FFF,$7FFF,$571B
	dw $5297,$7A96,$7B7A,$63DE,$5844,$58A7,$590A,$596D
	dw $59D1,$5A34,$5A97,$571B,$7FFF,$7FFF,$7FFF,$571B
	dw $7AB7,$7B9B,$63FF,$5C86,$5CE9,$5D4D,$5DD0,$5A34
	dw $5AB7,$5B1B,$579F,$7FFF,$7FFF,$7FFF,$7FFF,$7AB7
	dw $7B9B,$63FF,$1C00,$1800,$1800,$1800,$1800,$1800
	dw $1800,$0000,$0000,$0000,$0000,$0000,$0000,$0802

DATA_5FD488:
	dw $0000,$2000,$1C00,$1C00,$1C00,$1C00,$1C00,$1C00
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0802,$0000
	dw $2400,$2000,$2000,$2000,$2000,$2000,$2000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0802,$0000,$2800
	dw $2400,$2400,$2400,$2400,$2400,$2400,$0000,$0000
	dw $0400,$0400,$0000,$0800,$0802,$0000,$2C00,$2800
	dw $2800,$2800,$2800,$2800,$2800,$0000,$0400,$0C00
	dw $0C00,$0800,$1000,$1002,$0000,$3040,$2C00,$2C00
	dw $2C00,$2C00,$2C00,$2C00,$0800,$0C00,$1400,$1400
	dw $1000,$1800,$1C02,$0000,$34A3,$3040,$3020,$3000
	dw $3000,$3000,$3000,$1000,$1400,$2000,$2000,$1C00
	dw $2000,$2C02,$0000,$3907,$34A3,$3481,$3460,$3440
	dw $3420,$3400,$1400,$1800,$2400,$2400,$2000,$2420
	dw $3882,$0000,$3D6A,$3907,$38E5,$38C2,$3880,$3860
	dw $3820,$1800,$1C00,$2C00,$2C00,$2800,$2860,$4128
	dw $0000,$49CD,$3D6A,$3D48,$3D05,$3CE2,$3CA0,$3C60
	dw $1C00,$2000,$3400,$3440,$3080,$2CA0,$516E,$0000
	dw $5230,$41AE,$418B,$4148,$4125,$40E2,$40A0,$2000
	dw $2400,$3C60,$3CC0,$3901,$3924,$5E14,$0400,$5A93
	dw $4611,$45EE,$45AB,$4567,$4524,$44E0,$2440,$2840
	dw $44E3,$4546,$4187,$45AB,$6699,$0800,$66F6,$4A75
	dw $4A32,$49EE,$49AA,$4966,$4922,$2881,$2C80,$4926
	dw $4989,$4A0D,$4E31,$6EFC,$0C00,$6F59,$4ED8,$4E94
	dw $4E50,$4E0C,$4DC8,$4D64,$2CC4,$30C3,$4D69,$4DCC
	dw $4E50,$5AB8,$775F,$1000,$77BC,$533C,$52F8,$52B4
	dw $524F,$520B,$51A6,$2CC4,$3506,$51AC,$520F,$5293
	dw $5EFB,$6F9D,$1402,$7FFF,$577F,$573B,$56F6,$5692
	dw $564D,$55E8,$2CC4,$3949,$55EF,$5652,$56D6,$573B
	dw $77DF,$1845

DATA_5FD64C:
	dw $0822,$0822,$0822,$0822,$0822,$0822,$0C43,$0C64
	dw $1085,$14C7,$14E8,$1909,$192A,$1D4B,$1D4B,$192A
	dw $1909,$14E8,$14C7,$1085,$0C64,$0C43,$0822,$0822

DATA_5FD67C:
	dw $7FFF,$7F9F,$7F3C,$7EDA,$7E77,$7DF3,$6991,$554D
	dw $48A9,$3C66,$3024,$2024,$1426,$0C28,$186B,$246E
	dw $2CD1,$3D55,$5199,$5DFC,$6A9F,$72DF,$7F5F,$7FBF

DATA_5FD6AC:
	dw $7FFF,$6BBF,$5F7F,$4EFF,$427F,$31DF,$217B,$1916
	dw $10B2,$088E,$086B,$0848,$0845,$1045,$1C45,$2887
	dw $44EA,$516D,$5DF3,$6E55,$7EB7,$7F19,$7F7C,$7FBE

DATA_5FD6DC:
	dw $5ED5,$6717,$6F59,$7BBC,$7FFF,$7BBC,$6F59,$6717
	dw $5ED5,$5692,$4A2F,$41EC,$3989,$2D27,$24E4,$1CA2
	dw $1461,$0C20,$0000,$0000,$0000,$0000,$0000,$0000

DATA_5FD70C:
	dw $0C85,$0C85,$0C85,$0C85,$0C85,$0C85,$0C85,$0C85
	dw $0C85,$0C85,$0C85,$0C85,$18E9,$252D,$1DD6,$125F
	dw $161B,$19D8,$1DB4,$2171,$252D,$1CEA,$14C8,$0C85

DATA_5FD73C:
	dw $7FFF,$777F,$6B1F,$5E9F,$4DFB,$3D55,$30D0,$1C6A
	dw $1006,$1000,$1841,$2441,$2444,$3067,$38CA,$410D
	dw $4152,$4DD7,$5A7D,$62FF,$635F,$63BF,$6FFF,$7BFF

DATA_5FD76C:
	dw $0018,$0039,$005A,$007B,$009C,$00BD,$00DE,$00FF
	dw $017F,$01FF,$025F,$02DF,$035F,$031F,$02DF,$025F
	dw $01FF,$017F,$00FF,$00DE,$009C,$007B,$0039,$0018

DATA_5FD79C:
	dw $001F,$007F,$00BF,$00FF,$013F,$017F,$01BF,$01FF
	dw $023F,$027F,$02BF,$02FF,$033F,$037F,$03BF,$03FF
	dw $001F,$007F,$00BF,$00FF,$013F,$017F,$01BF,$01FF

DATA_5FD7CC:
	dw $5B51,$6397,$6BFC,$6BFF,$7FFF,$6BFF,$73FA,$7FF7
	dw $77B5,$6F52,$6EEE,$6AAC,$624A,$5E08,$55A6,$4D86
	dw $4565,$3D25,$3504,$2CE4,$24A3,$1C83,$1442,$1442

DATA_5FD7FC:
	dw $7BFF,$7BFF,$6BFF,$63BF,$5B7F,$575F,$4F3F,$46FF
	dw $46BF,$467F,$465F,$461F,$45DE,$45BC,$4179,$3957
	dw $4155,$4552,$4950,$4D4E,$514C,$554A,$5948,$5D46

DATA_5FD82C:
	dw $575F,$5F9F,$63BF,$67DF,$6BFF,$73FF,$77FF,$7FFF
	dw $7FFF,$7BFD,$77FC,$77FA,$77F8,$73D7,$6FB5,$6F72
	dw $6F50,$6B2E,$62CB,$5687,$4E45,$45E5,$3D65,$3505

DATA_5FD85C:
	dw $639F,$6FDF,$7FFF,$6FFC,$6FF7,$6FF2,$7FF2,$7F52
	dw $7ED2,$7E96,$76BA,$6A5A,$5E5C,$4E5F,$4EDF,$431F
	dw $537F,$3B5F,$4F9F,$5FDF,$73FF,$73FA,$7793,$7F13

DATA_5FD88C:
	dw $0000,$0823,$1047,$188B,$20AF,$28D3,$3117,$393B
	dw $417F,$419F,$45BF,$45DF,$4A1F,$4A3F,$4E5F,$4E7F
	dw $52BF,$56DF,$5EFF,$633F,$6B5F,$6F9F,$77BF,$7FFF

DATA_5FD8BC:
	dw $7FFF,$7FFE,$7BFD,$7BFC,$77FA,$77F9,$73F8,$6FF6
	dw $6FD6,$6FB5,$6F94,$6F73,$6F53,$6F32,$6F11,$6ED0
	dw $6AAF,$668D,$5E6C,$5A4A,$5628,$4E07,$49E5,$41A3

DATA_5FD8EC:
	dw $039F,$02BF,$01DF,$013F,$013A,$0CD6,$1891,$288E
	dw $3C8E,$4CEB,$5547,$5DA4,$5163,$4101,$28A0,$1840
	dw $1804,$2C88,$388B,$3890,$3896,$451A,$5A1F,$6ABF

DATA_5FD91C:
	dw $125F,$1E7F,$2EBF,$3ADF,$4B1F,$573F,$4F1F,$46FF
	dw $3EDF,$36DF,$2ABF,$229F,$1A7F,$125F,$123F,$121F
	dw $11FF,$11DF,$11BF,$119F,$115E,$0D1D,$0CDC,$089B

DATA_5FD94C:
	dw $001F,$0012,$0004,$7C1B,$000E,$0007,$0000,$03FF
	dw $0212,$0004,$7C1B,$01CE,$00E7,$0000,$03E0,$0202
	dw $0004,$7C1B,$01C0,$00E0,$0000,$7C00,$4002,$0004
	dw $7C1B,$3800,$1C00,$0000

DATA_5FD984:
	dw $03FF

DATA_5FD986:
	dw $03FF

DATA_5FD988:
	dw $03FF

DATA_5FD98A:
	dw $0000,$0000,$0000,$7E60,$7F2C,$7E60,$7F2C,$7F0A
	dw $7EC6,$7EC6,$7EA4,$7EE8,$7EA4,$7F2C,$7EE8,$7EE8
	dw $7F0A,$7EE8,$7EA4,$7EA4,$7F2C,$7EC6,$7F0A,$7EC6
	dw $7F2C,$7E60,$7E60,$7F2C,$7EA4,$7F2C,$7EA4,$7F2C
	dw $7E60,$7E60,$7F2C,$7EC6,$7F0A,$7EC6,$7EE8,$7EA4
	dw $7EA4,$7F2C,$7EE8,$7EE8,$7F0A,$7EA4,$7EE8,$7EA4
	dw $7F2C,$7F0A,$7EC6,$7EC6,$7E60,$7F2C,$7E60,$7F2C
	dw $7F2C,$7EA4,$7EA4

DATA_5FDA00:
	dw $7375,$6B13,$4A0C,$3DCA,$3DA9,$3567,$3147,$2906
	dw $5ED0,$566E,$5A90,$4E4E,$3DA9,$3567,$3147,$2906
	dw $5ED0,$566E,$4A0C,$3DCA,$45EB,$3DA9,$3147,$2906
	dw $5ED0,$566E,$4A0C,$3DCA,$3DA9,$3567,$3568,$2D27
	dw $5ED0,$566E,$4A0C,$3DCA,$3DA9,$3567,$3147,$2906
	dw $5ED0,$566E,$4A0C,$3DCA,$3DA9,$3567,$3147,$2906
	dw $5ED0,$566E,$4A0C,$3DCA,$3DA9,$3567,$3147,$2906
	dw $5ED0,$566E,$4A0C,$3DCA,$3DA9,$3567,$3147,$2906

DATA_5FDA80:								; Note: Hookbill the Koopa shell palette.
	dw $0000,$7FFF,$591F,$591F,$591F,$591F,$591F,$250C
	dw $2510,$1CF5,$00DA,$001F,$3DD2,$4EF7,$67BD

DATA_5FDA9E:
	dw $7EFB

DATA_5FDAA0:
	dw $0000,$2972,$1A3C,$035F,$43DF,$20CC,$00F3,$001F
	dw $4A54,$5B18,$6B9C,$7FFF,$0000,$0000,$0000

DATA_5FDABE:
	dw $7FFF

DATA_5FDAC0:
	dw $0000,$20CD,$2972,$1A3C,$02DF,$1066,$20CE,$00F7
	dw $316E,$4A54,$5B18,$52DA,$5F3D,$677F,$6FDF,$0000
	dw $4B9F,$4B9F,$3B1C,$25B3,$0000,$4B9F,$63DF,$73FF
	dw $0000,$7FFF,$7FFF,$7FFF,$731B,$7FFF,$7FFF,$7FFF
	dw $30F1,$3E38,$7FFF,$3715,$3B9A,$43FC,$1AFF,$0000
	dw $1BFF,$3958,$49FF,$7737,$66EE,$7374,$7FF9,$254D
	dw $4273,$7FFF,$3127,$45AD,$4613,$5B7E,$0000,$5BFF
	dw $38D8,$493F,$5ADD,$4D26,$7E91,$66F4,$254D,$641F
	dw $641F,$266F,$2F15,$3BBB,$641F,$641F,$641F,$3E34
	dw $52D9,$677D,$641F,$641F,$641F,$0000,$4B9F,$4B9F
	dw $3B1C,$25B3,$0000,$4B9F,$3B1C,$25B3,$0000,$7FFF
	dw $7FFF,$7FFF,$731B,$7FFF,$7FFF,$7FFF,$414A,$4253
	dw $7FFF,$4E07,$5EF0,$5778,$22FF,$0000,$2F7F,$4FFF
	dw $3958,$7737,$4EFB,$575D,$5FBF,$254D,$4273,$7FFF
	dw $3127,$45AD,$4613,$420D,$0000,$56F3,$6375,$38D8
	dw $5ADD,$4E07,$5EF0,$5778,$216E,$2273,$7FFF,$2A27
	dw $3AEA,$5BB1,$32D2,$0000,$4356,$53FE,$67DF,$177F
	dw $2A12,$3A77,$4F3F,$0000,$4B9F,$4B9F,$3B1C,$25B3
	dw $0000,$4B9F,$3B1C,$25B3,$0000,$7FFF,$7FFF,$7FFF
	dw $731B,$7FFF,$7FFF,$7FFF,$414A,$4253,$7FFF,$2EEF
	dw $2F76,$2FFC,$1E4D,$0000,$3B56,$43FC,$3958,$7737
	dw $5A99,$5ADD,$5B3F,$254D,$4273,$7FFF,$3127,$45AD
	dw $4613,$32C9,$0000,$4350,$53F9,$38D8,$5ADD,$4E07
	dw $5EF0,$5778,$150B,$2273,$7FFF,$32C9,$4350,$53F9
	dw $266F,$0000,$2F15,$3BBB,$493F,$177F,$35B2,$4E77
	dw $673D,$0000,$4B9F,$4B9F,$3B1C,$25B3,$1E9F,$2F1F
	dw $43DF,$1F3F,$0000,$2F5F,$53FF,$7FFF,$731B,$7FFF
	dw $7FFF,$7FFF,$414A,$4253,$7FFF,$25D9,$365C,$4B1E
	dw $6E96,$0000,$7F3B,$7FDF,$3958,$7737,$4EAD,$6353
	dw $6399,$254D,$4273,$7FFF,$3127,$45AD,$4613,$3AB4
	dw $0000,$3AF9,$3B7F,$38D8,$5ADD,$3916,$4E1B,$52FF
	dw $216E,$2273,$7FFF,$2539,$35DC,$4A7E,$329A,$0000
	dw $433D,$53DF,$67DD,$177F,$66D9,$6F3B,$7B9E,$0000
	dw $4B9F,$4B9F,$3B1C,$25B3,$26EF,$4353,$5FB9,$3F4F
	dw $0000,$5393,$73F9,$7FFF,$731B,$7FFF,$7FFF,$7FFF
	dw $51F0,$4EB7,$7FFF,$6F14,$7FDA,$7FDD,$6E96,$0000
	dw $7F3B,$7FDF,$3958,$7737,$66AC,$6F14,$7FDA,$254D
	dw $4273,$7FFF,$3127,$45AD,$4613,$66D9,$0000,$6F3B
	dw $7B9E,$38D8,$5ADD,$5667,$6332,$5398,$5E54,$56F9
	dw $7FFF,$7757,$7FDC,$7FDE,$329A,$0000,$433D,$53DF
	dw $67DD,$177F,$4664,$6332,$5398,$0000,$4B9F,$4B9F
	dw $3B1C,$25B3,$26EF,$4353,$5FB9,$3F4F,$0000,$5393
	dw $73F9,$7FFF,$731B,$1902,$19CE,$2E76,$51F0,$4EB7
	dw $6FFF,$35AD,$4E73,$6739,$3127,$0000,$4613,$42FD
	dw $3958,$7737,$4AD3,$4B39,$4BBE,$254D,$4273,$7FFF
	dw $177F,$17BF,$7FFF,$231F,$0000,$2F3F,$3B7F,$4A0C
	dw $5ADD,$15FF,$1A3F,$1F3F,$5E54,$56F9,$7FFF,$4A94
	dw $5B7C,$63FF,$4A6D,$0000,$4AD3,$4B39,$4A0C,$177F
	dw $28A0,$3961,$4A27,$1084,$7FFF,$223A,$338C,$22C8
	dw $09D4,$054E,$110A,$437F,$7C1F,$7C1F,$7C1F,$4B9F
	dw $3B1C,$2E78,$1084,$7FFF,$223A,$231F,$021F,$011F
	dw $0114,$110A,$437F,$7D0A,$7DCE,$7E70,$7FFF,$235D
	dw $127B,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F
	dw $7C1F,$7FFF,$431F,$01DF,$33BF,$33BF,$037F,$4FF0
	dw $4FF0,$67F7,$7F92,$7FB7,$7FFF,$7F7B,$7FFF,$7FFF
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7EFF,$7EFF,$7FFF,$5F1F
	dw $425F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$3DFF
	dw $189D,$3B46,$2281,$5692,$4E10,$6716,$0000,$7FFF
	dw $1F9F,$0ABF,$7FF7,$7F31,$7EB9,$3DCC,$1084,$7FFF
	dw $223A,$7F52,$6E88,$7DD8,$6D94,$6318,$0912,$7C1F
	dw $7C1F,$7C1F,$3388,$2F27,$2686,$1084,$7FFF,$223A
	dw $5992,$452D,$721F,$48DB,$6318,$0912,$7C1F,$7C1F
	dw $7C1F,$185F,$145B,$1032

DATA_5FDF88:
	dw $7F52,$7EED,$7E04

DATA_5FDF8E:
	dw $7DDA,$7DB7,$7D52

DATA_5FDF94:
	dw $3388,$2F27,$2686

DATA_5FDF9A:
	dw $0996,$0553,$00CE

DATA_5FDFA0:
	dw $131F,$0A1F,$0956

DATA_5FDFA6:
	dw $185F,$145B,$1032

DATA_5FDFAC:
	dw $6E1F,$599E,$309C

DATA_5FDFB2:
	dw $514E,$410B,$2086

DATA_5FDFB8:
	dw $7C1F,$7C1F,$7C1F

DATA_5FDFBE:
	dw $7C1F,$7C1F,$7C1F

CODE_5FDFC4:
	dw $7FFF,$431F,$01DF

CODE_5FDFCA:
	dw $33BF,$33BF,$037F

CODE_5FDFD0:
	dw $4FF0,$4FF0,$67F7

CODE_5FDFD6:
	dw $7F92,$7FB7,$7FFF

CODE_5FDFDC:
	dw $7F7B,$7FFF,$7FFF

CODE_5FDFE2:
	dw $7FFF,$7FFF,$7FFF

CODE_5FDFE8:
	dw $7FFF,$7EFF,$7EFF

CODE_5FDFEE:
	dw $7FFF,$5F1F,$425F

DATA_5FDFF4:
	dw $7FFF

DATA_5FDFF6:
	dw $6F35

DATA_5FDFF8:
	dw $1084,$1083

DATA_5FDFFC:
	dw $3339,$2273,$3DFF,$189D,$04DB,$5FF5,$7C0E,$0000
	dw $7FFF,$177F,$063E,$733F,$7F6D,$6EA7,$5DE2,$18C6
	dw $5B1B,$3637,$2592,$18C6,$18C6,$18C6,$18C6,$18C6
	dw $2585,$5B32,$7FFF,$18C6,$2585,$154F,$0CC9,$7FFF
	dw $0000,$001F,$023F,$037F,$03F3,$0327,$7F20,$7E66
	dw $7D77,$7C1F,$44A6,$48C7,$4CE8,$5109,$7FFF,$0000
	dw $5FFF,$7FF7,$7F73,$677F,$5EFF,$57BF,$3F3F,$3DEF
	dw $18C6,$18C6,$18C6,$18C6,$18C6,$7FFF,$0000,$36BA
	dw $2E56,$25F2,$3DF1,$252B,$0C65,$2585,$36BA,$2E56
	dw $25F2,$16FF,$167F,$15FF,$3E34,$2DB0,$1D2C,$18C6
	dw $18C6,$18C6,$18C6,$5AD7,$2585,$5B32,$7FFF,$5AD7
	dw $2585,$154F,$0CC9,$7FFF,$0000,$001F,$023F,$037F
	dw $03F3,$0327,$7F20,$7E66,$7D77,$7C1F,$44A6,$48C7
	dw $4CE8,$5109,$7FFF,$0000,$0180,$02A0,$03E0,$36B5
	dw $4B7C,$63BE,$40C0,$65E9,$7F72,$0014,$001F,$01FF
	dw $031F,$7FFF,$0000,$294A,$7FD7,$7B74,$7711,$72AE
	dw $6E4B,$2585,$259F,$14FA,$0037,$16FF,$167F,$15FF
	dw $5BDF,$3B5D,$2A99,$18C6,$18C6,$18C6,$18C6,$18C6
	dw $2585,$5B32,$7FFF,$18C6,$2585,$154F,$0CC9,$7FFF
	dw $0000,$001F,$023F,$037F,$03F3,$0327,$7F20,$7E66
	dw $7D77,$7C1F,$44A6,$48C7,$4CE8,$5109,$7FFF,$0000
	dw $36B5,$4B7C,$63BE,$7357,$7FBA,$7FBD,$40C0,$65E9
	dw $7F72,$0014,$001F,$01FF,$031F,$7FFF,$0000,$294A
	dw $4E73,$66B3,$7316,$7FBA,$5F9F,$2585,$498B,$4149
	dw $3907,$16FF,$167F,$15FF,$7FF9,$6F75,$5EF1,$18C6
	dw $18C6,$18C6,$18C6,$18C6,$2585,$5B32,$7FFF,$18C6
	dw $2585,$154F,$0CC9,$7FFF,$0000,$001F,$023F,$037F
	dw $03F3,$0327,$7F20,$7E66,$7D77,$7C1F,$44A6,$48C7
	dw $4CE8,$5109,$7FFF,$0000,$7FFD,$0368,$7E27,$087F
	dw $03BF,$5FFF,$2585,$724B,$6A09,$61C7,$001E,$001E
	dw $001E,$7FFF,$0000,$4231,$0240,$5940,$0014,$0233
	dw $0000,$2585,$71A6,$7FD9,$62B0,$16FF,$167F,$15FF
	dw $7FDE,$735A,$62D6,$18C6,$18C6,$18C6,$18C6,$18C6
	dw $2585,$5B32,$7FFF,$18C6,$2585,$154F,$0CC9,$7FFF
	dw $0000,$001F,$023F,$037F,$03F3,$0327,$7F20,$7E66
	dw $7D77,$7C1F,$44A6,$48C7,$4CE8,$5109,$7FFF,$0000
	dw $4A10,$539C,$3EF7,$2E73,$0000,$0000,$7FFF,$4A3F
	dw $7F6D,$6FFD,$5F79,$0000,$0000,$7FFF,$0000,$294A
	dw $565F,$359E,$36BA,$2E56,$579A,$2585,$3EB1,$324B
	dw $25C9,$16FF,$167F,$15FF,$6ADE,$563B,$45B7,$18C6
	dw $18C6,$18C6,$18C6,$18C6,$2585,$5B32,$7FFF,$5AD7
	dw $2585,$154F,$0CC9,$7FFF,$0000,$001F,$023F,$037F
	dw $03F3,$0327,$7F20,$7E66,$7D77,$7C1F,$44A6,$48C7
	dw $4CE8,$5109,$7FFF,$0000,$0180,$02A0,$03E0,$36B5
	dw $4B7C,$63BE,$40C0,$65E9,$7F72,$0014,$001F,$01FF
	dw $031F,$7FFF,$0000,$294A,$76F5,$7F37,$6EB3,$494B
	dw $3CE8,$2585,$38C7,$34A6,$2843,$16FF,$167F,$15FF

DATA_5FE2EC:
	dw $02BF,$037F,$001F,$01FF

DATA_5FE2F4:
	dw $01FF,$02BF,$037F,$001F

DATA_5FE2FC:
	dw $001F,$01FF,$02BF,$037F

DATA_5FE304:
	dw $037F,$001F,$01FF,$02BF

DATA_5FE30C:
	dw $7FFF,$7FFF,$7FFF

DATA_5FE312:
	dw $6B5C,$7FFF,$7FFF

DATA_5FE318:
	dw $4A53,$6B5C,$7FFF

DATA_5FE31E:
	dw $2108,$4A53,$7FFF

DATA_5FE324:
	dw $0000,$2108,$6B5C

DATA_5FE32A:
	dw $0000,$0000,$4A53

DATA_5FE330:
	dw $0000,$0000,$2108

DATA_5FE336:
	dw $0000,$0000,$0000,$7C00

DATA_5FE33E:
	dw $3E7F,$3E7D,$0000

DATA_5FE344:
	dw $7C00,$637D,$4A75,$0000

DATA_5FE34C:
	dw $7C00,$001F,$0014,$0000,$7FFF,$0000,$0CEF,$1D55
	dw $321B,$7E4C,$7F10,$30A6,$416B,$5230,$62F5,$34E5
	dw $314A,$3E11,$571B,$7FFF,$0000,$7C00,$7C00,$7C00
	dw $291F,$599F,$1991,$1A15,$08AC,$00F0,$0173,$01F6
	dw $02BB,$2B7F,$4A52,$0000,$3915,$220C,$1110,$318C
	dw $4A52,$188A,$2086,$0024,$0446,$0C88,$10CB,$14EC
	dw $1990,$4A52,$0000,$2252,$20D0,$41CA,$6336,$77DB
	dw $30CC,$18C8,$0466,$00C8,$04CA,$192B,$7C00,$7C00

DATA_5FE3CC:
	dw $7FFF,$0000,$0345,$51A0,$7FFF,$0000,$001F,$51A0
	dw $3A08,$0000,$03FF,$51A0,$7FFF,$0000,$7C00

DATA_5FE3EA:
	dw $7FFF,$0000,$0CE8,$154D,$1DD1,$2636,$2EBA,$373F
	dw $479F,$5FFF,$7FFF,$24A0,$7E60,$6F7F,$5FFF,$6FFB

DATA_5FE40A:
	dw $6C04,$0000,$7FFF,$24A0,$2CE1,$3529,$416D,$51B1
	dw $5E12,$6692,$6AF2,$6F52,$73B4,$6BF8,$63FC,$5FFF

DATA_5FE42A:
	dw $5C08,$0000,$7FFF,$154D,$1DD1,$2636,$2EBA,$373F
	dw $479F,$5FFF,$55B2,$5E12,$6692,$6AF2,$6F52,$5FFF

DATA_5FE44A:
	dw $480D,$0000,$7FFF,$0CE8,$1DD1,$2EBA,$2E71,$4B79
	dw $24A0,$2CE1,$416D,$5FFF,$7F26,$7F26,$24A0,$24A0

DATA_5FE46A:
	dw $3811,$0000,$7FFF,$6C04,$3231,$42F7,$4F7B,$55EB
	dw $5E8F,$66F5,$7B77,$3EDF,$4F5F,$57BF,$3DCC,$5FFF

DATA_5FE48A:
	dw $7BFF,$042B,$0433,$043D,$05FD,$3FDE,$0B1E,$0602
	dw $1F4C,$2FD7,$2A06,$3AF3,$57B9,$6BDF

DATA_5FE4A6:
	dw $77FF,$084B,$0852,$087B,$09FB,$3FBD,$12FC,$0A04
	dw $230D,$2F97,$29E7,$3AD3,$5799,$67BE

DATA_5FE4C2:
	dw $73FF,$0C6A,$0C71,$0C98,$11F9,$439C,$1AFB,$0DE6
	dw $22EE,$2F57,$29C8,$3AB3,$5379,$639E

DATA_5FE4DE:
	dw $6FDF,$108A,$10AF,$14D6,$15D7,$437B,$22D9,$15E8
	dw $26AF,$3337,$29A8,$3A72,$5359,$637D

DATA_5FE4FA:
	dw $6BDF,$14A9,$14CE,$18F3,$1DD5,$475A,$2AD8,$19CA
	dw $2690,$32F7,$2989,$3A52,$4F39,$5F5D

DATA_5FE516:
	dw $67DF,$18C9,$18ED,$1D31,$21D3,$4739,$32B6,$1DCC
	dw $2A51,$32B7,$296A,$3A32,$4F19,$5B3C

DATA_5FE532:
	dw $5F9F,$1CE8,$212B,$256E,$29B1,$4AF7,$3A94,$25AF
	dw $2E13,$3677,$254B,$35F1,$4AD9,$571B

DATA_5FE54E:
	dw $0000,$7FFF,$7FFF,$7FFF,$7FDF,$7FBF,$7F7D,$773B
	dw $6EB8,$6255,$59D2,$4D6F,$44EC,$3CAA,$7C1F,$7C1F
	dw $0000,$6ADF,$6ABE,$669C,$625A,$5E38,$59F7,$55D5
	dw $51B3,$4D71,$4950,$450E,$40EC,$3CAA,$7C1F

DATA_5FE58C:
	dw $3DCC,$7FFF,$429F,$435F,$3DCC,$3DCC,$3DCC,$7FFF
	dw $7FFF,$7FFF,$3DCC,$3DCC,$3DCC,$3DCC,$3DCC

DATA_5FE5AA:
	dw $24A0,$24A0,$24A0,$24A0,$24A0,$24A0,$24A0,$24A0
	dw $24A0,$24A0,$24A0,$24A0,$24A0,$24A0,$24A0

DATA_5FE5C8:
	dw $24A0,$24A0,$24A0,$24A0,$24A0,$24A0,$24A0,$24A0
	dw $24A0,$24A0,$24A0,$24A0,$24A0,$5FFF,$24A0

DATA_5FE5E6:
	dw $3DCC,$3ACE,$3E19,$4258,$3B4E,$39FF,$633F,$427F
	dw $3FEF,$3F1F,$3F1F,$537F,$6B7F,$73BF,$7FFF

DATA_5FE604:
	dw $0BBF,$137F,$1B3F,$22FF,$2ABF,$327F,$3A3F,$41FF
	dw $49BF,$517F,$593F,$60FF,$68BF,$707F,$7C1F

DATA_5FE622:
	dw $7E60,$7E60,$24A0,$24A0,$24A0,$24A0,$7E60,$7E60
	dw $7E60,$7E60,$24A0,$24A0,$24A0,$5FFF,$24A0

DATA_5FE640:
	dw $0000,$1936,$25BA,$2E1C,$367D,$3ABE,$42FE,$471E
	dw $473E,$4B5E,$4B7E,$4F9E,$53BE,$57DF,$0000,$401F
	dw $0000,$2CE0,$1D6B,$29AD,$4143,$4D85,$5DE9,$4694
	dw $4ED6,$5B18,$768E,$7AD0,$7F31,$7FFF,$0000

DATA_5FE67E:
	dw $0000,$5E32,$5E37,$5EBC,$5F1F,$5F7F,$67BF,$6FFF
	dw $77FF,$7FFF,$7FFF,$7FFF,$7FFE,$7FFD,$501F,$4400
	dw $0000,$2CE2,$3904,$4D46,$5988,$65CB,$724D,$7EB0
	dw $7EF4,$7F36,$7F78,$7FB9,$7FDA,$7FFC,$501F

DATA_5FE6BC:
	dw $0000,$5951,$69F6,$7A7B,$7ABD,$7AFF,$7B3F,$7B9F
	dw $7BBF,$7FDF,$7FFF,$7FFF,$7FFF,$7FFF,$501F

DATA_5FE6DA:
	dw $0000,$7FFF,$013F,$02BF,$0000,$0000,$0000,$7FFF
	dw $7FFF,$7FFF,$0000,$0000,$0000,$0000,$0000

DATA_5FE6F8:
	dw $03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF
	dw $03FF,$03FF,$03FF,$03FF,$03FF,$03FF,$03FF

DATA_5FE716:
	dw $0000,$7FFF,$013F,$02BF,$008D,$00B2,$0067,$00B2
	dw $00B2,$7FFF,$00B2,$7FFF,$7FFF,$00B2,$0067

DATA_5FE734:
	dw $0000,$7FFF,$013F,$02BF,$00B4,$00FF,$7FFF,$00FF
	dw $7FFF,$00FF,$7FFF,$7FFF,$00FF,$00FF,$00AB,$0000
	dw $14D5,$213B,$2D9D,$35DF,$39FF,$3E1F,$423F,$465F
	dw $4E9F,$4EBF,$52DF,$56FF,$571F,$0000,$0893,$14F6
	dw $1919,$215B,$257D,$299E,$2DBE,$31DF,$3A1F,$3A3F
	dw $3E5F,$427F,$469F,$0000,$006F,$0090,$08B2,$10D4
	dw $14F6,$1918,$1D39,$215A,$297B,$299C,$2DBD,$31DE
	dw $35FF

DATA_5FE7A6:
	dw $0000,$004D,$0050,$0053,$0075,$0077,$0078,$0079
	dw $009A,$009B,$009C,$009D,$009E,$009F,$571F,$56FF
	dw $52DF,$4EBF,$469F,$427F,$3E5F,$3A3F,$35FF,$31DE
	dw $2DBD,$299C

DATA_5FE7DA:
	dw $009F,$009E,$009D,$009C,$423F,$465F,$4E9F,$4EBF
	dw $2DBE,$31DF,$3A1F,$3A3F,$1D39,$215A,$297B,$299C

DATA_5FE7FA:
	dw $0079,$009A,$009B,$009C

DATA_5FE802:
	dw $6B1F,$779F,$7FFF,$7FFF,$779F,$6B1F,$5E9F,$4DFF
	dw $45BC,$3958,$2D14,$24B0,$186C,$0C08,$7C00,$7C00
	dw $45D9,$3D97,$3935,$34F4,$30B3,$2C72,$2831,$240F
	dw $200E,$1C0D,$180C,$140B,$100A,$0C08

DATA_5FE83E:
	dw $03FF,$0000,$56D3,$6336,$6B79,$73BB,$77DD,$7BFE
	dw $7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF

DATA_5FE85A:
	dw $7FFF,$0000,$34E9,$416C,$4E0F,$5671,$5AB2,$5EF4
	dw $6335,$6777,$6FBA,$73DC,$77FD,$7BFE,$7FFF

DATA_5FE878:
	dw $0000,$14C4,$18E5,$1D06,$2127,$2127,$2548,$2548
	dw $2548,$2548,$2548,$2548,$2548,$2548

DATA_5FE894:
	dw $0000,$0801,$0C22,$1043,$1063,$14A4,$14C4,$18E5
	dw $1D06,$1D06,$2127,$2127,$2548,$2548

DATA_5FE8B0:
	dw $001A,$001D,$001F,$001F,$001D,$001A,$0017,$0015
	dw $0012,$000F,$000D,$000A,$0007,$0004,$7C1B,$7C18
	dw $0013,$0011,$000F,$000E,$000D,$000C,$000B,$000A
	dw $0009,$0008,$0007,$0006,$0005,$0004,$7C18,$033A
	dw $039D,$03FF,$03FF,$039D,$033A,$02D7,$0275,$0212
	dw $01AF,$014D,$00EA,$0087,$0004,$7C14,$7C10,$0273
	dw $0231,$01EF,$01CE,$01AD,$018C,$016B,$014A,$0129
	dw $0108,$00E7,$00C6,$00A5,$0084,$7C10,$0320,$0380
	dw $03E0,$03E0,$0380,$0320,$02C1,$0261,$0202,$01A2
	dw $0142,$00E3,$0083,$0004,$7C0C,$7C08,$0260,$0220
	dw $01E0,$01C0,$01A0,$0180,$0160,$0140,$0120,$0100
	dw $00E0,$00C0,$00A0,$0080,$7C08,$6400,$7000,$7C00
	dw $7C00,$7000,$6400,$5801,$4C01,$4002,$3402,$2802
	dw $1C03,$1003,$0004,$7C04,$7C00,$4C00,$4400,$3C00
	dw $3800,$3400,$3000,$2C00,$2800,$2400,$2000,$1C00
	dw $1800,$1400,$1000,$7C00

DATA_5FE9A8:
	dw $7FFF,$43FF,$435F,$42BF,$421F,$621F,$7E1F,$7E1A
	dw $7E15,$7E10,$7EB0,$7F50,$7FF0,$63F0,$43F0

DATA_5FE9C6:
	dw $43F8,$0000,$53B8,$5BDB,$67FD,$6FFF,$7FFF,$7FFF
	dw $77FF,$6BFF,$67FE,$63FD,$5FFC,$5BFA

DATA_5FE9E2:
	dw $57F9,$0000,$2525,$2D86,$31E7,$3648,$3A8C,$3ED0
	dw $4312,$4354,$4775,$4B96,$4FB7,$53D8,$57F9

DATA_5FEA00:
	dw $7BDE,$296B,$2D8F,$35D5,$4A77,$522E,$6292,$7758
	dw $7B39,$3E35,$3E35,$6319,$6319,$5E72,$5E72

DATA_5FEA1E:
	dw $7BDE,$296B,$35D6,$4A7C,$5B3F,$4290,$4B13,$5FB8
	dw $7B39,$3E35,$471A,$6319,$7BDF,$5E72,$7B39

DATA_5FEA3C:
	dw $0000,$0180,$0000,$10D2,$02A0,$4A6F,$36B5,$111F
	dw $03E0,$01B9,$025F,$271F,$4B7C,$63BE,$7FFF

DATA_5FEA5A:
	dw $6AB5,$522E,$41AB,$3529,$3529,$0000,$1124,$354B
	dw $3529,$3529,$41AB,$522E,$6293,$6ED7,$77BD

DATA_5FEA78:
	dw $6AB5,$6AB5,$522E,$41AB,$3529,$0000,$1162,$77BD
	dw $354B,$3529,$3529,$41AB,$522E,$6293,$6ED7

DATA_5FEA96:
	dw $6AB5,$6AB5,$6AB5,$522E,$3529,$0000,$1162,$6ED7
	dw $77BD,$354B,$3529,$3529,$41AB,$522E,$6293

DATA_5FEAB4:
	dw $6AB5,$6AB5,$6AB5,$6AB5,$3529,$0000,$1162,$6293
	dw $6ED7,$77BD,$354B,$3529,$3529,$41AB,$522E

DATA_5FEAD2:
	dw $6AB5,$6AB5,$6AB5,$6AB5,$3529,$0000,$1162,$522E
	dw $6293,$6ED7,$77BD,$354B,$3529,$3529,$41AB

DATA_5FEAF0:
	dw $6AB5,$6AB5,$6AB5,$522E,$3529,$0000,$1162,$41AB
	dw $522E,$6293,$6ED7,$77BD,$354B,$3529,$3529

DATA_5FEB0E:
	dw $6AB5,$6AB5,$522E,$41AB,$3529,$0000,$1162,$3529
	dw $41AB,$522E,$6293,$6ED7,$77BD,$354B,$3529

DATA_5FEB2C:
	dw $6AB5,$522E,$41AB,$3529,$3529,$0000,$1162,$3529
	dw $3529,$41AB,$522E,$6293,$6ED7,$77BD,$354B

DATA_5FEB4A:
	dw $1CA1,$3526,$4E0A,$62D3,$7778,$65EE,$76B2,$7718
	dw $7FBB,$24E3,$3DA9,$5692,$7799

DATA_5FEB64:
	dw $1CA1,$3526,$4E0A,$62D3,$77BD,$65EE,$76B2,$7718
	dw $7FBB,$24E3,$3DA9,$5692,$7FFF

DATA_5FEB7E:
	dw $1CA1,$3526,$4E0A,$77BD,$77BC,$65EE,$76B2,$7718
	dw $7FFF,$24E3,$3DA9,$779A,$7FFD

DATA_5FEB98:
	dw $1CA1,$3526,$7754,$7357,$7799,$65EE,$76B2,$7FFF
	dw $7FFF,$24E3,$66F3,$6716,$7FDB

DATA_5FEBB2:
	dw $1CA1,$5E70,$5E8E,$66F4,$7778,$65EE,$7FDB,$7F9C
	dw $7FFD,$45EB,$4E2D,$5ED4,$7799

DATA_5FEBCC:
	dw $45EB,$45AA,$522B,$62D3,$7778,$7F59,$7F36,$7F5A
	dw $7FBB,$3567,$45EB,$5692,$7799

DATA_5FEBE6:
	dw $2D25,$3947,$4E0A,$62D3,$7778,$7672,$7EF4,$7718
	dw $7FBB,$2D25,$3DA9,$5692,$7799

DATA_5FEC00:
	dw $20C2,$3526,$4E0A,$62D3,$7778,$6E30,$76B2,$7718
	dw $7FBB,$24E3,$3DA9,$5692,$7799

DATA_5FEC1A:
	dw $7FFF,$439F,$01BF

DATA_5FEC20:
	dw $7FFF,$335F,$01BF

DATA_5FEC26:
	dw $7FFF,$26FF,$01BF

DATA_5FEC2C:
	dw $7FFF,$16BF,$01BF

DATA_5FEC32:
	dw $7FFF,$4BFF,$5F77

DATA_5FEC38:
	dw $7FFF,$4BDF,$5F77

DATA_5FEC3E:
	dw $7FFF,$4B9F,$5F77

DATA_5FEC44:
	dw $7FFF,$4B7F,$5F77

DATA_5FEC4A:
	dw $0000,$7FFF,$5F7F,$679F,$318A,$2DDF,$36DF,$57FF
	dw $7FF2,$2585,$5B32,$7FFF,$0000,$2585,$154F,$0CC9
	dw $4148,$7FFF,$2108,$2176,$21BF,$2DDF,$36DF,$57FF
	dw $31B0,$3657,$533D,$77FF,$7FFA,$2108,$7FFD,$7FFF
	dw $23FF,$6739,$1084,$110F,$11B4,$1279,$1319,$1175
	dw $7B97,$7FF9,$7FFE,$7FFF,$28E4,$2984,$29E4,$2A64
	dw $23FF,$7FFF,$3148,$6527,$5330,$5BB7,$67FC,$67FF
	dw $52DF,$639F,$6BFF,$73FF,$7B97,$7FF9,$7FFE,$7FFF
	dw $23FF,$6739,$1084,$3959,$4259,$4AD9,$4B39,$1319
	dw $3B14,$51E4,$5AFF,$73FF,$18EB,$2951,$35FA,$5B5F
	dw $23FF,$7FFF,$3988,$23FF,$23FF,$23FF,$47FF,$129F
	dw $7B97,$7FF9,$7FFE,$7FFF,$530F,$63D5,$73F9,$7FFE
	dw $2DDF,$6739,$1084,$3953,$4257,$4AD7,$4B37,$31B9
	dw $3B0E,$51E4,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF,$7FFF
	dw $23FF,$6739,$1084,$5D54,$6658,$6718,$6738,$31B9
	dw $5F0F,$51E4,$7FFF,$7FFF,$5330,$5FB3,$6FF6,$7BFA

DATA_5FED4A:
	dw $3ABB,$0000,$0000,$0006,$10D2,$0CA9,$000C,$467F
	dw $111F,$1570,$0012,$023F,$271F,$571F,$6B9F,$7FFF
	dw $515F,$0000,$188C,$4104,$3D55,$24B5,$65AA,$467F
	dw $001F,$55BF,$7E8F,$023F,$031F,$571F,$6B9F,$7FFF
	dw $47FF,$0000,$00B9,$0165,$0012,$01BF,$02AB,$467F
	dw $001F,$037F,$03F2,$023F,$031F,$571F,$6B9F,$7FFF
	dw $7F6B,$0000,$45A7,$01DF,$0012,$6268,$03FF,$467F
	dw $001F,$7F71,$5FFF,$023F,$031F,$571F,$6B9F,$7FFF
	dw $7E39,$0000,$450A,$240C,$0012,$6571,$3898,$467F
	dw $001F,$7DF9,$615F,$023F,$031F,$571F,$6B9F,$7FFF
	dw $03E0,$0000,$0180,$0012,$10D2,$02A0,$001F,$467F
	dw $111F,$03E0,$023F,$025F,$271F,$571F,$6B9F,$7FFF
	dw $7FFF,$0000,$0C6E,$2544,$10D2,$18D7,$4E69,$467F
	dw $111F,$215F,$674E,$023F,$271F,$571F,$6B9F,$7FFF
	dw $3186,$0000,$2442,$248C,$0012,$40E7,$38F8,$467F
	dw $001F,$5D6B,$515F,$023F,$031F,$571F,$6B9F,$7FFF

DATA_5FEE4A:
	dw $1840,$0000,$2CA0,$7FFF,$5B1A,$4EB7,$3E33,$31D0
	dw $214C,$10C8,$7FFF,$7778,$666D,$49C7,$3124,$1CA1
	dw $7F26,$0000,$3525,$7779,$5294,$4631,$35AD,$294A
	dw $18C6,$0842,$7777,$6EF0,$5DE5,$4140,$28A0,$1420
	dw $7F26,$0000,$3DAB,$6EF3,$4A0E,$3DAB,$2D27,$20C4
	dw $1040,$0000,$6EEF,$6668,$5560,$38C0,$2020,$0C00
	dw $7F26,$0000,$4631,$666D,$4188,$3525,$24A1,$1840
	dw $0800,$0000,$6667,$5DE0,$4CE0,$3040,$1800,$0400
	dw $7F26,$7FFF,$67FF,$4BDF,$7DC0,$5CA0,$4060,$2C40
	dw $2040,$1840,$7FFF,$7778,$666D,$49C7,$3124,$1CA1
	dw $7F26,$0000,$569C,$28F1,$0006,$5B9F,$2DF6,$004D
	dw $6FDF,$7F26,$7777,$6EF0,$5DE5,$4140,$28A0,$1420
	dw $7F26,$0000,$679F,$1D51,$6FD9,$2144,$7F26,$7F26
	dw $7F26,$7F26,$6EEF,$6668,$5560,$38C0,$2020,$0C00
	dw $03FF,$0000,$0842,$1084,$18C6,$2108,$2D6B,$35AD
	dw $3DEF,$4631,$6667,$5DE0,$4CE0,$3040,$1800,$0400
	dw $7F26,$0000,$2CA0,$7FFF,$6393,$5731,$4AAE,$3A2B
	dw $2DA8,$1D25,$5E76,$5214,$4591,$350E,$288B,$1808
	dw $7F26,$0000,$3525,$7779,$5B0D,$4EAB,$4228,$31A5
	dw $2522,$14A0,$55F0,$498E,$3D0B,$2C88,$2005,$1002
	dw $7F26,$0000,$3DAB,$6EF3,$5287,$4625,$39A2,$2920
	dw $1CA0,$0C20,$4D6A,$4108,$3485,$2402,$1800,$0800
	dw $7F26,$0000,$4631,$666D,$4A01,$3DA0,$3120,$20A0
	dw $1420,$0400,$44E4,$3882,$2C00,$1C00,$1000,$0000
	dw $7F26,$0000,$0842,$1084,$18C6,$2108,$2D6B,$35AD
	dw $3DEF,$4631,$4E73,$5AD6,$6318,$6B5A,$739C,$7FFF
	dw $7F26,$0000,$0000,$0000,$0800,$1040,$1CA3,$24E5
	dw $2D27,$3569,$3DAB,$4A0E,$5250,$5A92,$62D4,$6F37
	dw $03FF,$0000,$0000,$0000,$0000,$7F26,$7F26,$7F26
	dw $7F26,$7F26,$7F26,$7F26,$7F26,$7F26,$7F26,$7F26
	dw $03FF,$0000,$0000,$0000,$0000,$7F26,$7F26,$7F26
	dw $7F26,$7F26,$7F26,$7F26,$7F26,$7F26,$7F26,$7F26

DATA_5FF04A:
	dw $1840,$0000,$0842,$1084,$18C6,$2108,$2D6B,$35AD
	dw $3DEF,$4631,$4E73,$5AD6,$6318,$6B5A,$739C,$7FFF
	dw $7F26,$0000,$0400,$0C42,$1484,$1CC6,$2929,$316B
	dw $39AD,$41EF,$4A31,$5694,$5ED6,$6718,$6F5A,$7BBD
	dw $7F26,$0000,$0000,$0800,$1042,$1884,$24E7,$2D29
	dw $356B,$3DAD,$45EF,$5252,$5A94,$62D6,$6B18,$777B
	dw $7F26,$0000,$0000,$0400,$0C00,$1442,$20A5,$28E7
	dw $3129,$396B,$41AD,$4E10,$5652,$5E94,$66D6,$7339
	dw $20A3,$6BBF,$3A9B,$3A36,$39F3,$396D,$2CA8,$1443
	dw $0000,$6398,$3EB0,$3E2D,$3DCA,$2D26,$20A3,$1461
	dw $20A3,$0000,$569C,$28F1,$0006,$5B9F,$2DF6,$004D
	dw $6FDF,$20A3,$1461,$593F,$60FF,$68BF,$707F,$7C1F
	dw $20A3,$0000,$679F,$1D51,$6FD9,$2144,$7FFF,$7C00
	dw $4400,$3DCA,$20A3,$593F,$60FF,$68BF,$707F,$7C1F
	dw $20A3,$0BBF,$137F,$1B3F,$22FF,$2ABF,$327F,$3A3F
	dw $41FF,$49BF,$517F,$593F,$60FF,$68BF,$707F,$7C1F
	dw $20A3,$7FFF,$77DC,$7797,$6F33,$62B0,$5A8C,$564B
	dw $5229,$4E08,$45C6,$3D66,$3965,$3124,$2D03,$28E2
	dw $2060,$7BBD,$739A,$7355,$6AF1,$5E6E,$564A,$5209
	dw $4DE7,$49C6,$4184,$3924,$3523,$2CE2,$28C1,$24A0
	dw $2060,$777B,$6F58,$6F13,$66AF,$5A2C,$5208,$4DC7
	dw $49A5,$4584,$3D42,$34E2,$30E1,$28A0,$2480,$2060
	dw $2060,$7339,$6B16,$6AD1,$626D,$55EA,$4DC6,$4985
	dw $4563,$4142,$3900,$30A0,$2CA0,$2460,$2040,$1C20

DATA_5FF1CA:
	dw $0A1F,$6BBF,$5B5F,$3E9A,$2DF3,$0CA7,$211F,$10B8
	dw $0850,$000A,$0005,$7FFF,$7FBA,$7335,$5A6E,$3966
	dw $0A1F,$6BBF,$5B5F,$3E9A,$2DF3,$0CA7,$23E8,$1308
	dw $0A03,$0140,$00A0,$7FFF,$7FBA,$7335,$5A6E,$3966
	dw $0A1F,$6BBF,$5B5F,$3E9A,$2DF3,$0CA7,$211F,$10B8
	dw $0850,$000A,$0005,$7FFF,$337F,$52FF,$3E5E,$26FF
	dw $0A1F,$6BBF,$5B5F,$3E9A,$2DF3,$0CA7,$23E8,$1308
	dw $0A03,$0140,$00A0,$7FFF,$337F,$52FF,$3E5E,$26FF

DATA_5FF24A:
	dw $5145,$569C,$4A19,$3975,$24F0,$1CAB,$1486,$0C43
	dw $1041,$67BF,$5B3A,$4A95,$3A10,$2D6B,$1CE6,$1041
	dw $2CE4,$5A59,$4DD6,$3D32,$28AD,$2068,$1843,$1000
	dw $1400,$6B7C,$5EF7,$4E52,$3DCD,$3128,$20A3,$1400
	dw $7F26,$5E16,$5193,$40EF,$2C6A,$2425,$1C00,$1400
	dw $1800,$6F39,$62B4,$520F,$418A,$34E5,$2460,$1800
	dw $7F26,$61D3,$5550,$44AC,$3027,$2802,$2000,$1800
	dw $1C00,$72F6,$6671,$55CC,$4547,$38A2,$2820,$1C00
	dw $7F26,$76F6,$45D2,$456D,$452A,$44A4,$3800,$2000
	dw $0C00,$6ECF,$49E7,$4964,$4901,$3860,$2C00,$2000
	dw $7F26,$0000,$569C,$28F1,$0006,$5B9F,$2DF6,$004D
	dw $6FDF,$20A3,$1461,$593F,$60FF,$68BF,$707F,$7C1F
	dw $7F26,$0000,$679F,$1D51,$6FD9,$2144,$7FFF,$7C00
	dw $4400,$3DCA,$20A3,$593F,$60FF,$707F,$707F,$7C1F
	dw $7F26,$5E16,$40EF,$2847,$2843,$2443,$6F39,$66D5
	dw $51EE,$4568,$38E3,$5AF2,$4E2D,$3D67,$2CA3,$2000
	dw $20A3,$47FA,$43B8,$3F56,$3B14,$36B1,$324F,$2A0D
	dw $25AB,$2148,$1D06,$18A4,$1041,$0820,$707F,$7C1F
	dw $4FFF,$4BB7,$4775,$4313,$3ED1,$3A6E,$360C,$2DCA
	dw $2968,$2505,$20C3,$1C61,$1400,$0C00,$707F,$7C1F
	dw $7F26,$4F74,$4B32,$46D0,$428E,$3E2B,$39C9,$3187
	dw $2D25,$28C2,$2480,$2020,$1800,$1000,$707F,$7C1F
	dw $7F26,$5331,$4EEF,$4A8D,$464B,$41E8,$3D86,$3544
	dw $30E2,$2C80,$2840,$2400,$1C00,$1400,$707F,$7C1F
	dw $7F26,$22FF,$22FF,$22FF,$22FF,$1EF0,$1E8E,$1A0C
	dw $1589,$1168,$0D26,$0CE5,$08C4,$0883,$0442,$2FB3
	dw $7F26,$0BBF,$137F,$1B3F,$22FF,$22AD,$224B,$1DC9
	dw $1946,$1525,$10E3,$10A2,$0C81,$0C40,$0800,$3370
	dw $5BBF,$0000,$0000,$0000,$0000,$266A,$2608,$2186
	dw $1D03,$18E2,$14A0,$1460,$1040,$1000,$0C00,$372D
	dw $5BBF,$0000,$0000,$0000,$0000,$2A27,$29C5,$2543
	dw $20C0,$1CA0,$1860,$1820,$1400,$1400,$1000,$3AEA

DATA_5FF44A:
	dw $0C40,$0C40,$67BF,$5B3A,$4A95,$3A10,$2D6B,$1CE6
	dw $1041,$73BF,$673F,$569A,$4E55,$292D,$1065,$7FFF

DATA_5FF46A:
	dw $6FFF,$4F1A,$218E

DATA_5FF470:
	dw $6BBE,$4296,$0000

DATA_5FF476:
	dw $5F9D,$0000,$0000

DATA_5FF47C:
	dw $6BDE,$4296,$0000

DATA_5FF482:
	dw $0000,$0823,$10A6,$150B,$11B1,$6FFF,$004F,$001F
	dw $0131,$10C4,$0D43,$0221,$1CC7,$316C,$4231

DATA_5FF4A0:
	dw $0421,$0863,$0464,$08A7,$0CC9,$212C,$216F,$31D0
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F

DATA_5FF4BE:
	dw $4FFF,$3FBF,$373D,$2EBB,$1E39,$4F18,$3E73,$3610
	dw $29AD,$1D29,$10C6,$0442,$2E6D,$1DA7,$0CC4

DATA_5FF4DC:
	dw $0000,$0863,$08A7,$110C,$1970,$3E16,$42BD,$637F
	dw $7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F,$7C1F

DATA_5FF4FA:
	dw $0000,$0C23,$18E9,$25D4,$1EFF,$6FFF,$009D,$001F
	dw $01FF,$1925,$1643,$03E0,$352C,$5A75,$7FFF

DATA_5FF518:
	dw $0442,$0C43,$1464,$1C86,$24A7,$2CC9,$350A,$3D2D
	dw $354F,$2D92,$25B4,$1E37,$16B9,$175C,$37FF,$0000

DATA_5FF538:
	dw $0000,$10E7,$21EF,$36F7,$3FFF,$3FFF,$3FFF,$3FFF
	dw $3FFF,$36F7,$3FFF,$3FFF,$36F7,$3FFF,$3FFF

DATA_5FF556:
	dw $0000,$7FFF,$0C23,$352C,$5A75,$1925,$1643,$03E0
	dw $34A9,$5DAB,$7FF2,$18E9,$25F4,$1F3F,$001F,$0421
	dw $4210,$0842,$1CA7,$2D4B,$0CA3,$0D42,$0601,$1C65
	dw $30E6,$420A,$0C85,$150B,$11B0,$0430

DATA_5FF592:
	dw $0000,$7FFF,$416A,$51EC,$01FF,$031F,$03FF,$46B1
	dw $5F57,$0180,$02A0,$03E0,$467F,$571F,$6B9F

DATA_5FF5B0:
	dw $2129,$2E4B,$2129,$2D95,$330C,$5AF5,$4B19,$3A1F
	dw $2BEA,$2E7A,$32FF,$437F,$539D,$6BDF,$7FFF

DATA_5FF5CE:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$2106,$2124
	dw $2DA9,$35D0,$562E,$4EF0,$7FFF,$7FFE,$31AF,$30E2
	dw $0000,$6730,$6AD2

DATA_5FF5F4:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$35D0,$562E,$7FFF,$5FFE,$5F75,$31AF,$30E2
	dw $0000,$6730,$5E6F

DATA_5FF61A:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$35D0,$7FBA,$67B6,$5FFE,$5312,$31AF,$30E2
	dw $0000,$6730,$520C

DATA_5FF640:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$6F9E,$6EF4,$5B53,$5FFE,$46AF,$633B,$30E2
	dw $0000,$6730,$520C

DATA_5FF666:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$4E96,$6291,$4EF0,$5FFE,$46AF,$4A75,$30E2
	dw $0000,$6730,$520C

DATA_5FF68C:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$4233,$562E,$4EF0,$5FFE,$46AF,$3E12,$30E2
	dw $0000,$7FFF,$520C

DATA_5FF6B2:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$35D0,$562E,$4EF0,$5FFE,$46AF,$31AF,$30E2
	dw $0000,$7FF6,$520C

DATA_5FF6D8:
	dw $1943,$3A07,$4F0D,$73F6,$7FFB,$0082,$1CE5,$2124
	dw $2DA9,$35D0,$562E,$4EF0,$5FFE,$46AF,$31AF,$30E2
	dw $0000,$7393,$7FFB

DATA_5FF6FE:
	dw $34E3,$3524,$4DE8,$5A6B,$6F0E,$7F93,$7FFC

DATA_5FF70C:
	dw $34E3,$3524,$4DE8,$5A6B,$6F0E,$7FF7,$7FFF

DATA_5FF71A:
	dw $34E3,$3524,$4DE8,$5A6B,$7FD2,$7FFE,$7FFF

DATA_5FF728:
	dw $34E3,$3524,$4DE8,$6B2F,$7FFD,$7FFB,$7FFE

DATA_5FF736:
	dw $34E3,$3524,$4DE8,$7FF9,$7FF6,$7FD5,$7FFC

DATA_5FF744:
	dw $34E3,$3524,$4DE8,$7BB3,$7750,$7F93,$7FFC

DATA_5FF752:
	dw $34E3,$3524,$4DE8,$62AD,$6F0E,$7F93,$7FFC

DATA_5FF760:
	dw $34E3,$3524,$4DE8,$5A6B,$6F0E,$7F93,$7FFC

DATA_5FF76E:
	dw $6F7B,$66F4,$5E6D,$55E6,$6F7B,$0C62,$2D6B,$4E73
	dw $14CA,$150D,$194F,$29B1,$021D,$013A,$0037,$0015

DATA_5FF78E:
	dw $66F4,$5E6D,$55E6,$6F7B,$5EF7,$3DEF,$1CE7,$3DEF
	dw $14CA,$150D,$194F,$29B3,$017A,$0077,$0015,$025D

DATA_5FF7AE:
	dw $5E6D,$55E6,$6F7B,$66F4,$4E73,$6F7B,$0C62,$2D6B
	dw $14CA,$150D,$1951,$29B5,$00B7,$0015,$029D,$01BA

DATA_5FF7CE:
	dw $55E6,$6F7B,$66F4,$5E6D,$3DEF,$5EF7,$3DEF,$1CE7
	dw $14CA,$150F,$1953,$29B7,$0015,$02DD,$01FA,$00F7

DATA_5FF7EE:
	dw $6F7B,$66F4,$5E6D,$55E6,$2D6B,$4E73,$6F7B,$0C62
	dw $14CC,$1511,$1955,$29B9,$031D,$023A,$0137,$0015

DATA_5FF80E:
	dw $66F4,$5E6D,$55E6,$6F7B,$1CE7,$3DEF,$5EF7,$3DEF
	dw $14CA,$150F,$1953,$29B7,$01FA,$00F7,$0015,$02DD

DATA_5FF82E:
	dw $5E6D,$55E6,$6F7B,$66F4,$0C62,$2D6B,$4E73,$6F7B
	dw $14CA,$150D,$1951,$29B5,$00B7,$0015,$029D,$01BA

DATA_5FF84E:
	dw $55E6,$6F7B,$66F4,$5E6D,$3DEF,$1CE7,$3DEF,$5EF7
	dw $14CA,$150D,$194F,$29B3,$0015,$025D,$017A,$0077
	dw $0821,$4A15,$7B78,$1021,$0821,$3570,$62AD,$7C05
	dw $0821,$2633,$1583,$7C05,$0821,$7FFF,$26A6,$0821
	dw $152C,$0CE2,$7C05,$0821,$20CA,$45C8,$7C05,$0821
	dw $5A13,$3ADD,$7C05,$0821,$3CEB,$2152,$0000,$2909
	dw $5A6C,$0821,$0000,$1464,$41A1,$0821,$0000,$0527
	dw $0080,$0821,$0000,$5EF3,$05A0,$0000,$0020,$0000
	dw $0821,$0000,$0000,$24C0,$0821,$0000,$3907,$19D1
	dw $0821,$0000,$1C00,$0046,$0000,$1883,$49E6,$0821
	dw $0000,$0400,$3120,$0821,$0000,$00A1,$0000,$0821
	dw $0000,$4E6D,$0120,$0000,$0000,$0000,$0821,$0000
	dw $0000,$1440,$0821,$0000,$2881,$094B,$0821,$0000
	dw $0C00,$0000,$0000,$0800,$3960,$0821,$0000,$0000
	dw $20A0,$0821,$0000,$0020,$0000,$0821,$0000,$3DE7
	dw $00A0,$0000,$0000,$0000,$0821,$0000,$0000,$0400
	dw $0821,$0000,$1800,$00C5,$0821,$0000,$0000,$0000

DATA_5FF95E:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0023
	dw $0000,$0000,$0000,$0065,$0000,$0000,$0000,$00A7
	dw $0000,$0000,$0000,$00E9,$0000,$0000,$0001,$092B
	dw $0000,$0000,$0003,$116D,$0000,$0000,$0045,$19AF
	dw $0000,$0000,$0087,$21F1,$0000,$0000,$00C9,$2A33
	dw $0000,$0000,$050B,$3275,$0000,$0002,$0D4D,$3AB7
	dw $0000,$0044,$158F,$42F9,$0000,$0086,$1DD1,$4B3B
	dw $0000,$08C8,$2613,$537D,$0000,$110A,$2E55,$5BBF

DATA_5FF9DE:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0421
	dw $0000,$0000,$0000,$0842,$0000,$0000,$0000,$0C63
	dw $0000,$0000,$0000,$1084,$0000,$0000,$0000,$14A5
	dw $0000,$0000,$0000,$1CE7,$0000,$0000,$0000,$2529
	dw $0000,$0000,$0842,$2D6B,$0000,$0000,$1084,$35AD
	dw $0000,$0000,$18C6,$3DEF,$0000,$0000,$2108,$4631
	dw $0000,$0421,$294A,$4E73,$0000,$0C63,$318C,$56B5
	dw $0000,$14A5,$39CE,$5EF7,$0000,$1CE7,$4210,$6739

DATA_5FFA5E:
	dw $0000,$0000,$0000,$401F,$0000,$0000,$0000,$401F
	dw $0000,$0000,$0000,$401F,$0000,$0000,$0000,$401F
	dw $0000,$0000,$0000,$1800,$0000,$0000,$401F,$0000
	dw $0000,$0000,$401F,$0000,$0000,$0000,$401F,$0000
	dw $0000,$0000,$401F,$0000,$0000,$0000,$3000,$1000
	dw $0000,$401F,$0000,$0000,$0000,$401F,$0000,$0000
	dw $0000,$401F,$0000,$0000,$0000,$401F,$0000,$0000
	dw $0000,$3863,$2000,$0000,$401F,$0000,$0000,$0000
	dw $401F,$0000,$0000,$0000,$401F,$0000,$0000,$0000
	dw $401F,$0000,$0000,$0000,$3CA5,$3000,$1000,$401F
	dw $1000,$0000,$0000,$401F,$0000,$0000,$0000,$401F
	dw $0000,$0000,$0000,$401F,$0000,$0000,$0000,$44E7
	dw $3863,$2000,$401F,$2000,$0000,$0000,$401F,$0000
	dw $0000,$0000,$401F,$0000,$0000,$0000,$401F,$0000
	dw $0000,$0000,$4929,$3CA5,$3000,$401F,$3000,$1000
	dw $0000,$401F,$1000,$0000,$0000,$401F,$0000,$0000
	dw $0000,$401F,$0000,$0000,$0000,$518C,$44E7,$3863
	dw $401F,$3863,$2000,$0000,$401F,$2000,$0000,$0000
	dw $401F,$0000,$0000,$0000,$401F,$0000,$0000,$0000
	dw $55CE,$4929,$3CA5,$401F,$3CA5,$3000,$1000,$401F
	dw $3000,$1000,$0000,$401F,$1000,$0000,$0000,$401F
	dw $0000,$0000,$0000,$5A10,$518C,$44E7,$401F,$44E7
	dw $3863,$2000,$401F,$3863,$2000,$0000,$401F,$2000
	dw $0000,$0000,$401F,$0000,$0000,$0000,$5E52,$55CE
	dw $4929,$401F,$4929,$3CA5,$3000,$401F,$3CA5,$3000
	dw $1000,$401F,$3000,$1000,$0000,$401F,$1000,$0000
	dw $0000,$66B5,$5A10,$518C,$401F,$518C,$44E7,$3863
	dw $401F,$44E7,$3863,$2000,$401F,$3863,$2000,$0000
	dw $401F,$2000,$0000,$0000,$6AF7,$5E52,$55CE,$401F
	dw $55CE,$4929,$3CA5,$401F,$4929,$3CA5,$3000,$401F
	dw $3CA5,$3000,$1000,$401F,$3000,$1000,$0000,$7339
	dw $66B5,$5A10,$401F,$5A10,$518C,$44E7,$401F,$518C
	dw $44E7,$3863,$401F,$44E7,$3863,$2000,$401F,$3863
	dw $2000,$0000,$777B,$6AF7,$5E52,$401F,$5E52,$55CE
	dw $4929,$401F,$55CE,$4929,$3CA5,$401F,$4929,$3CA5
	dw $3000,$401F,$3CA5,$3000,$1000,$7BBD,$7339,$66B5
	dw $401F,$66B5,$5A10,$518C,$401F,$5A10,$518C,$44E7
	dw $401F,$518C,$44E7,$3863,$401F,$44E7,$3863,$2000
	dw $7FFF,$777B,$6AF7,$401F,$6AF7,$5E52,$55CE,$401F
	dw $5E52,$55CE,$4929,$401F,$55CE,$4929,$3CA5,$401F
	dw $4929,$3CA5,$3000

if !Define_Global_ROMToAssemble&(!ROM_YI_U2) != $00
	%InsertGarbageData($5FFCE4, incbin, DATA_5FFCE4_YI_U2.bin)
else
	%FREE_BYTES($5FFCE4, 796, $FF)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro DATATABLE_YI_LevelDataPtrsAndEntranceData(Address)
namespace YI_LevelDataPtrsAndEntranceData
%InsertMacroAtXPosition(<Address>)

DATA_17F3E7:
	dw $0000,$0004,$0008,$000C,$0010,$0014,$0018,$001C
	dw $0020,$0000,$00D8,$00DC,$0024,$0028,$002C,$0030
	dw $0034,$0038,$003C,$0040,$0044,$0000,$0000,$0000
	dw $0048,$004C,$0050,$0054,$0058,$005C,$0060,$0064
	dw $0068,$0000,$0000,$0000,$006C,$0070,$0074,$0078
	dw $007C,$0080,$0084,$0088,$008C,$0000,$0000,$0000
	dw $0090,$0094,$0098,$009C,$00A0,$00A4,$00A8,$00AC
	dw $00B0,$0000,$0000,$0000,$00B4,$00B8,$00BC,$00C0
	dw $00C4,$00C8,$00CC,$00D0,$00D4

DATA_17F471:
	db $00,$07,$77,!Define_YI_LevelID_WatchOutBelow
	db $01,$07,$7A,!Define_YI_LevelID_TheCaveOfChompRock
	db $02,$03,$7A,!Define_YI_LevelID_BurtTheBashfulsFort
	db $03,$07,$7A,!Define_YI_LevelID_HopHopDonutLifts
	db $04,$77,$6A,!Define_YI_LevelID_ShyGuysOnStilts
	db $05,$07,$7A,!Define_YI_LevelID_TouchFuzzyGetDizzy
	db $06,$07,$7A,!Define_YI_LevelID_SalvoTheSlimesCastle
	db $9B,$68,$4A,!Define_YI_LevelID_VisitKoopaAndParaKoopa
	db $08,$09,$7A,!Define_YI_LevelID_FlipCards
	db $09,$07,$5A,!Define_YI_LevelID_TheBaseballBoys
	db $0A,$07,$7A,!Define_YI_LevelID_WhatsGustyTasteLike
	db $0B,$07,$7A,!Define_YI_LevelID_BiggerBoosFort
	db $0C,$07,$7A,!Define_YI_LevelID_WatchOutForLakitu
	db $0D,$07,$7A,!Define_YI_LevelID_TheCaveOfMysteryMaze
	db $0E,$07,$18,!Define_YI_LevelID_LakitusWall
	db $0F,$F8,$2A,!Define_YI_LevelID_ThePottedGhostsCastle
	db $10,$04,$2A,!Define_YI_LevelID_WelcomeToMonkeyWorld
	db $11,$0E,$7A,!Define_YI_LevelID_HitThatSwitch
	db $12,$07,$7A,!Define_YI_LevelID_JungleRhythm
	db $13,$07,$7A,!Define_YI_LevelID_NepEnutsDomain
	db $14,$04,$6A,!Define_YI_LevelID_PrinceFroggysFort
	db $15,$07,$3A,!Define_YI_LevelID_JamminThroughTheTrees
	db $16,$07,$7A,!Define_YI_LevelID_TheCaveOfHarryHedgehog
	db $17,$07,$4A,!Define_YI_LevelID_MonkeysFavoriteLake
	db $18,$48,$7A,!Define_YI_LevelID_NavalPiranhasCastle
	db $19,$05,$7A,!Define_YI_LevelID_GoGoMario
	db $1A,$07,$7A,!Define_YI_LevelID_MoreMonkeyMadness
	db $1B,$07,$7A,!Define_YI_LevelID_TheCaveOfTheLakitus
	db $1C,$08,$7A,!Define_YI_LevelID_DontLookBack
	db $1D,$07,$5A,!Define_YI_LevelID_MarchingMildesFort
	db $1E,$07,$7A,!Define_YI_LevelID_ChompRockZone
	db $1F,$06,$1A,!Define_YI_LevelID_LakeShoreParadise
	db $20,$07,$6A,!Define_YI_LevelID_RideLikeTheWind
	db $21,$07,$6A,!Define_YI_LevelID_HookbillTheKoopasCastle
	db $22,$07,$6A,!Define_YI_LevelID_BLIZZARD
	db $5A,$7D,$1A,!Define_YI_LevelID_TheImpossibleMaze
	db $24,$07,$7A,!Define_YI_LevelID_RideTheSkiLifts
	db $25,$07,$6A,!Define_YI_LevelID_DangerIcyConditionsAhead
	db $26,$07,$3A,!Define_YI_LevelID_SluggyTheUnshavensFort
	db $27,$07,$7A,!Define_YI_LevelID_GoonieRides
	db $28,$07,$5A,!Define_YI_LevelID_WelcomeToCloudWorld
	db $29,$05,$5A,!Define_YI_LevelID_ShiftingPlatformsAhead
	db $2A,$97,$6A,!Define_YI_LevelID_RaphaelTheRavensCastle
	db $2B,$38,$5A,!Define_YI_LevelID_ScareySkeletonGoonies
	db $2C,$07,$4A,!Define_YI_LevelID_KameksRevenge
	db $2D,$07,$7A,!Define_YI_LevelID_TheCaveOfTheBandits
	db $2E,$07,$5A,!Define_YI_LevelID_BewareTheSpinningLogs
	db $2F,$07,$4A,!Define_YI_LevelID_TapTapTheRedNosesFort
	db $30,$07,$7A,!Define_YI_LevelID_TheVeryLoooooongCave
	db $31,$07,$39,!Define_YI_LevelID_TheDeepUndergroundMaze
	db $32,$07,$4A,!Define_YI_LevelID_KEEPMOVING
	db $33,$05,$7A,!Define_YI_LevelID_KingBowsersCastle
	db $34,$03,$7A,!Define_YI_LevelID_KEEPMOVING
	db $35,$07,$7A,!Define_YI_LevelID_CastlesMasterpieceSet
	db $38,$08,$7A,!Define_YI_LevelID_MakeEggsThrowEggs
	db $39,$08,$76,!Define_YI_LevelID_MakeEggsThrowEggs

DATA_17F551:
	dw $0000,$0004,$000C,$0014,$001C,$0020,$0024,$0028
	dw $0000,$0000,$0000,$0000,$0038,$003C,$0044,$004C
	dw $005C,$0064,$0074,$0084,$0000,$0000,$0000,$0000
	dw $0094,$009C,$00A0,$00AC,$00B8,$00BC,$00C0,$00C8
	dw $0000,$0000,$0000,$0000,$00D0,$00DC,$00E4,$00EC
	dw $00FC,$0100,$0108,$0110,$0000,$0000,$0000,$0000
	dw $011C,$0124,$0130,$0140,$014C,$0158,$0160,$0168
	dw $0178,$0000,$0000,$0000,$0188,$0194,$01A0,$01A8
	dw $01B8,$01C4,$01C8,$01D0,$01E0

DATA_17F5DB:
	dw $7800,$0076,$8201,$007B,$093B,$0049,$0000,$0000
	dw $753C,$0068,$F703,$0078,$EC6E,$0068,$0E04,$005B
	dw $6105,$0070,$7006,$0075,$0907,$0037,$0000,$0000
	dw $0000,$0000,$E99B,$003F,$7809,$0053,$AD0A,$004B
	dw $0C42,$0029,$0000,$0000,$0B43,$002A,$5A44,$0061
	dw $0000,$0000,$0000,$0000,$06CE,$0076,$0000,$0000
	dw $0B45,$007A,$0000,$0000,$3246,$006C,$0000,$0000
	dw $08BD,$007A,$9E0F,$0024,$0000,$0000,$0000,$0000
	dw $0377,$005A,$A448,$0077,$0478,$0027,$0CC8,$0039
	dw $1FBE,$0034,$0000,$0000,$3A4A,$0058,$AB13,$007A
	dw $F214,$0078,$864C,$0078,$057A,$006B,$ED4D,$0038
	dw $0000,$0000,$09A3,$007A,$3D4E,$006A,$624F,$0059
	dw $0000,$0000,$F150,$006B,$0000,$0000,$7151,$006B
	dw $0000,$0000,$0F52,$0067,$1D80,$006E,$0000,$0000
	dw $3D81,$004A,$6B1D,$003F,$0354,$003A,$0000,$0000
	dw $7855,$0061,$73AA,$007A,$76C1,$0079,$411F,$0052
	dw $0000,$0000,$1457,$0073,$0000,$0000,$0358,$003A
	dw $0000,$0000,$CB59,$0070,$2C86,$0059,$0000,$0000
	dw $305B,$0040,$5888,$0044,$935C,$0038,$8A25,$005E
	dw $0000,$0000,$1A5D,$0034,$0000,$0000,$04AF,$000A
	dw $B627,$0049,$085E,$004A,$44B0,$007A,$0000,$0000
	dw $0B5F,$004A,$148B,$0046,$0000,$0000,$0260,$006A
	dw $0000,$0000,$098D,$0039,$0000,$0000,$3762,$0015
	dw $0000,$0000,$4FB3,$006B,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0563,$002A,$0000,$0000,$1264,$0079
	dw $0A90,$007A,$0000,$0000,$0E65,$007A,$0891,$0078
	dw $0000,$0000,$0766,$004A,$0000,$0000,$5593,$0027
	dw $52B6,$0027,$C8C5,$0071,$0000,$0000,$0568,$0068
	dw $0A94,$0076,$4E32,$0055,$E133,$000A,$436A,$001E
	dw $F734,$007A,$756B,$000A,$0000,$0000,$04DD,$007A
	dw $D735,$001C,$676C,$004B

Ptrs:
;$17F7C3
	dl DATA_1681C7,DATA_168583
	dl DATA_4CE0A2,DATA_4CE976
	dl DATA_168671,DATA_1690B5
	dl DATA_148000,DATA_14869D
	dl DATA_10F262,DATA_10F4FA
	dl DATA_11CA15,DATA_11D2BB
	dl DATA_12C709,DATA_12CF07
	dl DATA_158000,DATA_15866B
	dl DATA_1691D5,DATA_1694A5
	dl DATA_12D00A,DATA_12D8E2
	dl DATA_1487D4,DATA_1493BF
	dl DATA_15876C,DATA_159245
	dl DATA_1593F5,DATA_159D95
	dl DATA_159F1A,DATA_15AB8E
	dl DATA_15AD93,DATA_15B8F5
	dl DATA_14960E,DATA_14A39B
	dl DATA_00EBD4,DATA_00F614
	dl DATA_12DA6C,DATA_12DD4A
	dl DATA_14A5BC,DATA_14AD4A
	dl DATA_14AEA8,DATA_14B123
	dl DATA_14B23B,DATA_14BAE3
	dl DATA_11D3EF,DATA_11DE77
	dl DATA_15BA64,DATA_15C19A
	dl DATA_16953D,DATA_169E75
	dl DATA_169F7F,DATA_16A7C0
	dl DATA_14BD23,DATA_14C6C6-$02
	dl DATA_15C307,DATA_15C4E2
	dl DATA_14C711,DATA_14D2C1
	dl DATA_14D488,DATA_14DE8F
	dl DATA_15C59E,DATA_15CA77
	dl DATA_12DDE1,DATA_12E8A7
	dl DATA_14E035,DATA_14E794
	dl DATA_16A998,DATA_16B3C1
	dl DATA_11E01E,DATA_11E767
	dl DATA_16B582,DATA_16C01C
	dl DATA_4CEACA,DATA_4CF3D9
	dl DATA_15CC16,DATA_15D759
	dl DATA_14E920,DATA_14EFF2
	dl DATA_15D90D,DATA_15E689
	dl DATA_16C17D,DATA_16CBDA
	dl DATA_16CDF5,DATA_16DD21
	dl DATA_12EB8A,DATA_12EEC2
	dl DATA_4CF4D9,DATA_4CFD2F
	dl DATA_16DF78,DATA_16EF27
	dl DATA_12F04E,DATA_12F77D
	dl DATA_11E8B1,DATA_11F1E1
	dl DATA_15E8E3,DATA_15F013
	dl DATA_12F8B1,DATA_12FE33
	dl DATA_10F595,DATA_10FCE5
	dl DATA_16F0FE,DATA_16FEC6
	dl DATA_510000,DATA_510EEC
	dl DATA_14F13E,DATA_14FCB8
	dl DATA_15F196,DATA_15FD47
	dl DATA_11F3DE,DATA_11FB9F
	dl DATA_14FEC4,DATA_14FF83
	dl DATA_14FF1F,DATA_14FF91
	dl DATA_168000,DATA_16855E
	dl DATA_168042,DATA_168560
	dl DATA_1684C5,DATA_168642
	dl DATA_4CE25E,DATA_4CEA17
	dl DATA_16873E,DATA_1690D5
	dl DATA_1484B6,DATA_14878F
	dl DATA_11CC89,DATA_11D34D
	dl DATA_12CE48,DATA_12CFBD
	dl DATA_158250,DATA_1586C7
	dl DATA_12D150,DATA_12D91D
	dl DATA_148D0D,DATA_1494B7
	dl DATA_1589F7,DATA_1592B0
	dl DATA_159527,DATA_159DC4
	dl DATA_15A301,DATA_15AC4A
	dl DATA_15AFDD,DATA_15B981
	dl DATA_149D38,DATA_14A4C3
	dl DATA_00ECA1,DATA_00F625
	dl DATA_12DC3F,DATA_12DDCA
	dl DATA_14A716,DATA_14AD7C
	dl DATA_14B0CA,DATA_14B233
	dl DATA_14B56B,DATA_14BB57
	dl DATA_11D547,DATA_11DEB5
	dl DATA_15BBE8,DATA_15C1F0
	dl DATA_1695D4,DATA_169E92
	dl DATA_16A148,DATA_16A80A
	dl DATA_14BD91,DATA_14C5D9
	dl DATA_14CA56,DATA_14D377
	dl DATA_14D4CA,DATA_14DEA0
	dl DATA_15C7F8,DATA_15CB51
	dl DATA_12DF5D,DATA_12E915
	dl DATA_14E5E9,DATA_14E88F
	dl DATA_16AD52,DATA_16B480
	dl DATA_11E511,DATA_11E802
	dl DATA_16BAE9,DATA_16C0BD
	dl DATA_4CF046,DATA_4CF43B
	dl DATA_15D16B,DATA_15D7D6
	dl DATA_14EA82,DATA_14F030
	dl DATA_15DAEC,DATA_15E6FA
	dl DATA_16C6CD,DATA_16CCD5
	dl DATA_16D3C7,DATA_16DDA7
	dl DATA_12ED05,DATA_12EF99
	dl DATA_4CF9FC,DATA_4CFE27
	dl DATA_16E0B6,DATA_16EF62
	dl DATA_12F1CB,DATA_12F7E8
	dl DATA_11EA84,DATA_11F288
	dl DATA_15EB1B,DATA_15F096
	dl DATA_12FAD5,DATA_12FEC2
	dl DATA_10F6EF,DATA_10FD92
	dl DATA_16F93D,DATA_16FF4C
	dl DATA_510691,DATA_510FDB
	dl DATA_14F40E,DATA_14FD17
	dl DATA_15F222,DATA_15FDA0
	dl DATA_11F774,DATA_11FC22
	dl DATA_168F5C,DATA_1691B5
	dl DATA_14856D,DATA_14879A
	dl DATA_11CE64,DATA_11D39A
	dl DATA_1582E6,DATA_1586DE
	dl DATA_12D53C,DATA_12D9E8
	dl DATA_148FF0,DATA_14951C
	dl DATA_159182,DATA_1593C9
	dl DATA_1598BE,DATA_159E3E
	dl DATA_15A51B,DATA_15ACD3
	dl DATA_15B666,DATA_15BA16
	dl DATA_149F1F,DATA_14A52E
	dl DATA_00EE40,DATA_00F678
	dl DATA_14AB69,DATA_14AE44
	dl DATA_14B9A1,DATA_14BC5E
	dl DATA_11D8B1,DATA_11DF32
	dl DATA_15BEA6,DATA_15C258
	dl DATA_169D23,DATA_169F63
	dl DATA_16A400,DATA_16A8A2
	dl DATA_14C445,DATA_14C6C8
	dl DATA_14CD2E,DATA_14D3B8
	dl DATA_14D9A0,DATA_14DF5C
	dl DATA_12E347,DATA_12EA22
	dl DATA_14E743,DATA_14E909
	dl DATA_16AF66,DATA_16B4F1
	dl DATA_11E6F7,DATA_11E876
	dl DATA_16BE15,DATA_16C167
	dl DATA_15D4BA,DATA_15D868
	dl DATA_14EBEC,DATA_14F095
	dl DATA_15DD93,DATA_15E7A4
	dl DATA_16CAA6,DATA_16CD9D
	dl DATA_16D8B4,DATA_16DEAE
	dl DATA_12EE6E,DATA_12F043
	dl DATA_4CFA82,DATA_4CFE3B
	dl DATA_16E763,DATA_16EFF4
	dl DATA_12F3EF,DATA_12F80B
	dl DATA_11ED0B,DATA_11F2F9
	dl DATA_15EE89,DATA_15F137
	dl DATA_12FC74,DATA_12FF39
	dl DATA_10F8DF,DATA_10FDA3
	dl DATA_16FC58,DATA_16FF96
	dl DATA_510B51,DATA_51106A
	dl DATA_14F9E1,DATA_14FDF7
	dl DATA_15F2E7,DATA_15FDC3
	dl DATA_11F92E,DATA_11FC93
	dl DATA_14861B,DATA_1487C3
	dl DATA_11CF8C,DATA_11D3B4
	dl DATA_15839D,DATA_1586E6
	dl DATA_12D623,DATA_12DA1A
	dl DATA_159917,DATA_159E43
	dl DATA_15A7E4,DATA_15AD50
	dl DATA_15B7EC,DATA_15BA30
	dl DATA_14A318,DATA_14A5A5
	dl DATA_00EFFE,DATA_00F6B3
	dl DATA_14ACFD,DATA_14AE76
	dl DATA_11DB2E,DATA_11DFA3
	dl DATA_15C0FA,DATA_15C2C9
	dl DATA_169E04,DATA_169F74
	dl DATA_16A5DE,DATA_16A916
	dl DATA_14C528,DATA_14C6CD
	dl DATA_14D10A,DATA_14D45F
	dl DATA_14DD7D,DATA_14E015
	dl DATA_12E3E1,DATA_12EA2A
	dl DATA_16B272,DATA_16B559
	dl DATA_16BFAA,DATA_16C172
	dl DATA_15D6BD,DATA_15D8D6
	dl DATA_14EEAB,DATA_14F127
	dl DATA_15DFDF,DATA_15E83C
	dl DATA_16CB5D,DATA_16CDA8
	dl DATA_16DCF4,DATA_16DF61
	dl DATA_4CFC7A,DATA_4CFE9A
	dl DATA_16E842,DATA_16F017
	dl DATA_12F4D1,DATA_12F81F
	dl DATA_11F048,DATA_11F373
	dl DATA_10F9D3,DATA_10FE9E
	dl DATA_14FBC0,DATA_14FE86
	dl DATA_15F3A1,DATA_15FDCE
	dl DATA_11FAA9,DATA_11FD6A
	dl DATA_12D89C,DATA_12DA55
	dl DATA_159BF5,DATA_159EBD
	dl DATA_15AA78,DATA_15AD64
	dl DATA_15B881,DATA_15BA4A
	dl DATA_00F2C3,DATA_00F71E
	dl DATA_11DC0F,DATA_11DFBA
	dl DATA_16A6D9,DATA_16A963
	dl DATA_12E7C7,DATA_12EB37
	dl DATA_15D6DF,DATA_15D8E7
	dl DATA_15E2C8,DATA_15E886
	dl DATA_16EBC4,DATA_16F091
	dl DATA_10FB77,DATA_10FF39
	dl DATA_15F51C,DATA_15FE39
	dl DATA_159C5F,DATA_159ED1
	dl DATA_00F40A,DATA_00F750
	dl DATA_11DC87,DATA_11DFBF
	dl DATA_15E43D,DATA_15E8A6
	dl DATA_16EC2C,DATA_16F097-$02
	dl DATA_10FBF2,DATA_10FF8F
	dl DATA_15F83A,DATA_15FEF3
	dl DATA_159CFA,DATA_159F06
	dl DATA_00F4EF,DATA_00F773
	dl DATA_11DC0F,DATA_11DFC4
	dl DATA_15E663,DATA_15E8DE
	dl DATA_16EC55,DATA_16F099
	dl DATA_15F8F7,DATA_15FF28
	dl DATA_00F50A,DATA_00F77B
	dl DATA_11DC9C,DATA_11DFC9
	dl DATA_15F9B2,DATA_15FF69
	dl DATA_11DDF6,DATA_11DFF2
	dl DATA_15F6BC,DATA_15FE9E
	dl DATA_15F7F4,DATA_15FEE8
	dl DATA_15FCEA,DATA_15FFD5
	dl DATA_15FCEA,DATA_15FFD5
	dl DATA_15FBA2,DATA_15FF7D
	dl DATA_15FCBE,DATA_15FFD0

namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro ROUTINE_YI_NorSpr03E_ThinPlatform(Address)
namespace YI_NorSpr03E_ThinPlatform
%InsertMacroAtXPosition(<Address>)

Init:
	STZ.w $7400,x
	RTL

Main:
	REP.b #$10
	LDY.w $7362,x
	LDA.w $7682,x
	STA.b $00
	LDA.w $7A36,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $6002,y
	LDA.w $7A37,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $600A,y
	LDA.w $7A38,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $6012,y
	LDA.w $7A39,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $601A,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $6022,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $602A,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $6032,y
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	AND.w #$00FF
	CLC
	ADC.b $00
	STA.w $603A,y
	SEP.b #$10
	LDA.w $60FC
	AND.w #$0003
	BNE.b CODE_00880B
	LDA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	CLC
	ADC.b $18,x
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
CODE_00880B:
	LDA.w $7A36,x
	AND.w #$00FF
	STA.w $6000
	STA.b $00
	LDA.w $7A37,x
	AND.w #$00FF
	STA.w $6002
	STA.b $02
	LDA.w $7A38,x
	AND.w #$00FF
	STA.w $6004
	STA.b $04
	LDA.w $7A39,x
	AND.w #$00FF
	STA.w $6006
	STA.b $06
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w $6008
	STA.b $08
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w $600A
	STA.b $0A
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w $600C
	STA.b $0C
	LDA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	AND.w #$00FF
	STA.w $600E
	STA.b $0E
	STZ.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	LDY.w $60AB
	BPL.b CODE_008870
	LDY.w $60C0
	BNE.b CODE_0088C7
CODE_008870:
	LDA.w $611C
	SEC
	SBC.w $70E2,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_0088CF
	STA.w !REGISTER_SuperFX_R2_PLOTYCoordinateLo
	LDA.w $70E2,x
	SEC
	SBC.w #$0018
	SEC
	SBC.w $611C
	STA.w !REGISTER_SuperFX_R3_GeneralPurposeLo
	LDA.w #$0046
	CLC
	ADC.b $78,x
	STA.w $603E
	LSR
	STA.w $603C
	STA.w !REGISTER_SuperFX_R6_MultiplierLo
	LDA.w $611E
	CLC
	ADC.w $6112
	STA.w !REGISTER_SuperFX_R8_MERGEYPosLo
	LDA.w $6122
	STA.w !REGISTER_SuperFX_R9_GeneralPurpose3Lo
	LDA.w $7182,x
	STA.w !REGISTER_SuperFX_R10_GeneralPurpose4Lo
	LDX.b #FXCODE_0B860A>>16
	LDA.w #FXCODE_0B860A
	JSL.l !RAM_YI_Global_BeginSuperFXProcessingRt
	LDX.b $12
	LDY.w !REGISTER_SuperFX_R1_PLOTXCoordinateLo
	BNE.b CODE_0088F5
CODE_0088C7:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_0088CF
	JMP.w CODE_00899F

CODE_0088CF:
	LDY.b #$0E
CODE_0088D1:
	LDA.w $7960,y
	BEQ.b CODE_0088EC
	CMP.w #$0008
	BPL.b CODE_0088DE
	LDA.w #$0008
CODE_0088DE:
	LSR
	LSR
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $7960,y
	STA.w $7960,y
CODE_0088EC:
	DEY
	DEY
	BPL.b CODE_0088D1
	STZ.b $18,x
	JMP.w CODE_008985

CODE_0088F5:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_00891A
	LDY.b #$0E
CODE_0088FC:
	LDA.w $6000,y
	SEC
	SBC.w $7960,y
	BMI.b CODE_008914
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7960,y
	STA.w $7960,y
CODE_008914:
	DEY
	DEY
	BPL.b CODE_0088FC
	BRA.b CODE_008936

CODE_00891A:
	LDY.b #$0E
CODE_00891C:
	LDA.w $6000,y
	SEC
	SBC.w $7960,y
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	CLC
	ADC.w $7960,y
	STA.w $7960,y
	DEY
	DEY
	BPL.b CODE_00891C
CODE_008936:
	LDY.b $18,x
	BNE.b CODE_00894F
	LDA.w $60AA
	LSR
	LSR
	LSR
	LSR
	STA.b $78,x
	LDY.w $60D4
	BEQ.b CODE_00894F
	LDA.w $60AA
	LSR
	STA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
CODE_00894F:
	LDA.w $60FC
	AND.w #$0003
	BNE.b CODE_008985
	LDA.w $6020
	AND.w #$FFFE
	TAY
	LDA.w $7960,y
	CLC
	ADC.w $7182,x
	SEC
	SBC.w #$001E
	SEC
	SBC.w $6112
	STA.w !EXRAM_YI_Player_YPosLo|!EXRAMBankMirror
	STZ.w $60AA
	INC.w $61B4
	LDY.b #$02
	STY.b $18,x
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_008985
	LDA.w #$0800
	STA.w $60AA
CODE_008985:
	LDA.w !EXRAM_YI_Level_NorSpr_YSpeedLo|!EXRAMBankMirror,x
	BEQ.b CODE_008992
	LDA.b $78,x
	CLC
	ADC.w #$0004
	BRA.b CODE_00899D

CODE_008992:
	LDA.b $78,x
	SEC
	SBC.w #$0008
	BPL.b CODE_00899D
	LDA.w #$0000
CODE_00899D:
	STA.b $78,x
CODE_00899F:
	SEP.b #$20
	LDA.b $00
	STA.w $7A36,x
	LDA.b $02
	STA.w $7A37,x
	LDA.b $04
	STA.w $7A38,x
	LDA.b $06
	STA.w $7A39,x
	LDA.b $08
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.b $0A
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701901|!EXRAMBankMirror,x
	LDA.b $0C
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	LDA.b $0E
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701903|!EXRAMBankMirror,x
	REP.b #$20
	RTL

namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro ROUTINE_YI_NorSpr053_KamekSayingOhMy(Address)
namespace YI_NorSpr053_KamekSayingOhMy
%InsertMacroAtXPosition(<Address>)

Init:
	RTL

DATA_0085DD:
	dw CODE_008607
	dw CODE_008641
	dw CODE_008670
	dw CODE_008691

Main:
	LDY.b #$01
	STY.w $0C1E
	LDA.b $78,x
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	CMP.w #$00F0
	BMI.b CODE_0085F8
	INC.w !RAM_YI_Global_Layer1XPosLo
CODE_0085F8:
	LDA.w !RAM_YI_Global_Layer1XPosLo
	STA.w $0C23
	TXY
	LDA.b $76,x
	ASL
	TAX
	JSR.w (DATA_0085DD,x)
	RTL

CODE_008607:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_008622
	STZ.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	STZ.w $7540,x
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$0020
	STA.w $7A96,x
	INC.b $76,x
	RTS

CODE_008622:
	CMP.w #$FF00
	BMI.b CODE_00862C
	LDA.w #$0005
	BRA.b CODE_00863D

CODE_00862C:
	LDA.w $7A98,x
	BNE.b CODE_008640
	LDA.w #$0002
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
CODE_00863D:
	STA.w $7402,x
CODE_008640:
	RTS

CODE_008641:
	TYX
	LDA.w $7A96,x
	ORA.w $7A98,x
	BNE.b CODE_00866F
	INC.w $7402,x
	LDA.w $7402,x
	CMP.w #$0004
	BNE.b CODE_008669
	LDA.w #!Define_YI_SoundID5B_KamekTalk
	JSL.l CODE_0085D2
	LDA.w #$0082
	STA.l $704070
	INC.w !RAM_YI_Level_MessageBoxState 
	INC.b $76,x
	RTS

CODE_008669:
	LDA.w #$0008
	STA.w $7A98,x
CODE_00866F:
	RTS

CODE_008670:
	TYX
	LDA.w !RAM_YI_Level_MessageBoxState 
	BNE.b CODE_008690
	LDA.w #$0002
	STA.w $7402,x
	LDA.w #$FC00
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDA.w #$0040
	STA.w $7540,x
	LDA.w #$0400
	STA.w $75E0,x
	INC.b $76,x
CODE_008690:
	RTS

CODE_008691:
	TYX
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	CLC
	ADC.w #$0080
	CMP.w #$0100
	BCS.b CODE_0086A3
	LDA.w #$0006
	BRA.b CODE_0086B4

CODE_0086A3:
	CLC
	ADC.w #$0080
	CMP.w #$0200
	BCS.b CODE_0086B1
	LDA.w #$0005
	BRA.b CODE_0086B4

CODE_0086B1:
	LDA.w #$0002
CODE_0086B4:
	STA.w $7402,x
	LDA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	BMI.b CODE_0086C2
	LDA.w #$0002
	STA.w $7400,x
CODE_0086C2:
	LDA.w $7680,x
	CMP.w #$0140
	BMI.b CODE_008690
	LDX.w $108A
	LDA.w $70E2,x
	STA.b $00
	LDA.w $7182,x
	STA.b $02
	JSL.l CODE_02E1A3
	LDX.w $108A
	JSL.l CODE_03A31E
	LDX.b $12
	PLA
	JML.l CODE_03A31E
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro ROUTINE_YI_NorSpr0AA_BackgroundShyguy(Address)
namespace YI_NorSpr0AA_BackgroundShyguy
%InsertMacroAtXPosition(<Address>)

Init:
	LDY.w $0073
	BEQ.b CODE_0086F2
	JML.l CODE_03A31E

CODE_0086F2:
	LDA.w $70E2,x
	SEC
	SBC.w !RAM_YI_Global_Layer1XPosLo
	CLC
	ADC.w !RAM_YI_Global_Layer2XPosLo
	STA.w $70E2,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	LDA.w $7182,x
	CLC
	ADC.w #$0008
	SEC
	SBC.w !RAM_YI_Global_Layer1YPosLo
	CLC
	ADC.w !RAM_YI_Global_Layer2YPosLo
	AND.w #$FFF8
	CLC
	ADC.w #$000A
	STA.w $7182,x
	STA.w !EXRAM_YI_Level_NorSpr_GenericTable701902|!EXRAMBankMirror,x
	INC.w $74A1,x
	INC.w $74A1,x
	RTL

DATA_008726:
	dw $FFE0,$0020

Main:
	JSL.l CODE_03AF23
	JSL.l CODE_03A2C7
	BCC.b CODE_008738
	JML.l CODE_03A32E

CODE_008738:
	LDA.w $7400,x
	DEC
	STA.b $00
	LDA.w $70E2,x
	SEC
	SBC.w !EXRAM_YI_Level_NorSpr_GenericTable701900|!EXRAMBankMirror,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCC.b CODE_008767
	EOR.b $00
	BMI.b CODE_008767
CODE_008752:
	LDA.b $10
	AND.w #$001F
	CLC
	ADC.w #$0030
	STA.w $7AF6,x
	LDA.w $7400,x
	EOR.w #$0002
	STA.w $7400,x
CODE_008767:
	LDY.w $7AF6,x
	BEQ.b CODE_008752
	LDY.w $7400,x
	LDA.w DATA_008726,y
	STA.w !EXRAM_YI_Level_NorSpr_XSpeedLo|!EXRAMBankMirror,x
	LDY.w $7A98,x
	BNE.b CODE_008789
	LDA.w #$0008
	STA.w $7A98,x
	LDA.w $7402,x
	EOR.w #$0001
	STA.w $7402,x
CODE_008789:
	RTL

namespace off
endmacro

;#############################################################################################################
;#############################################################################################################
