Routine_Macros_PLOK.asm
Yoshifanatic1_Plok-Disassembly/PLOK/Routine_Macros_PLOK.asm

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

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

PLOK_InitAndMainLoop:
.Main:
	CLC
	XCE
	REP.b #$20
	LDA.w #$0000
	STA.w !REGISTER_APUPort0
	STA.l $001CE0
	STA.l $001CE2
	PHA
	PLD
	LDA.w #$01FF
	TCS
	SEP.b #$20
	LDA.b #$01
	PHA
	PLB
	NOP #2
	JSR.w CODE_80B13C
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	SEP.b #$20
	LDA.b #$01
	STA.w !REGISTER_EnableFastROM
	JML.l CODE_808031

CODE_808031:
	JSR.w CODE_809F58
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	STA.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer3Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$54
	STA.w !REGISTER_BG1AddressAndSize
	LDA.b #$58
	STA.w !REGISTER_BG2AddressAndSize
	LDA.b #$5C
	STA.w !REGISTER_BG3AddressAndSize
	LDA.b #$10
	STA.w !REGISTER_BG1And2TileDataDesignation
	LDA.b #$04
	STA.w !REGISTER_BG3And4TileDataDesignation
	SEP.b #$20
	JSR.w CODE_809F67
	REP.b #$30
	STZ.w $1800
	STZ.w $0772
	STZ.w !RAM_PLOK_Global_EasyModeFlag
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	STZ.w $1814
endif
	STZ.w $1804
CODE_80806C:
	REP.b #$20
	LDA.w $0772
	BEQ.b CODE_80807B
	JSR.w CODE_80837B
	LDA.w $066C
	BPL.b CODE_8080B8
CODE_80807B:
	JSR.w CODE_809EA9
	STZ.w $084E
	LDA.w #$0006
	STA.w $0850
	JSR.w CODE_809F58
	SEP.b #$30
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	STA.b !RAM_PLOK_UnknownRAM0000A8
	REP.b #$30
	JSR.w CODE_80DAFB
	REP.b #$30
	LDA.w $0804
	AND.w #$0020
	BEQ.b CODE_8080A5
	JSR.w CODE_808CC7
CODE_8080A5:
	STZ.w $0906
	JSR.w CODE_80EE7F
	REP.b #$30
	LDA.w $1800
	ASL
	TAX
	LDA.w DATA_818010,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w #$0000
endif
	STA.w $0848
CODE_8080B8:
	SEP.b #$20
	LDA.b #$08
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b #$00
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	STA.b !RAM_PLOK_UnknownRAM0000A8
	JSL.l CODE_82D7F2
	SEP.b #$20
	LDA.b #$81
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer3Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$10
	STA.w !REGISTER_BG1And2TileDataDesignation
	REP.b #$30
	STZ.w !RAM_PLOK_Level_Player_ShellCounter
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	LDA.w #$0004
else
	LDA.w #$0003
endif
	STA.w !RAM_PLOK_Level_Player_CurrentLifeCountLo
	LDA.w #$00FF
	STA.w !RAM_PLOK_Global_CurrentLevelNum
	LDA.w #$0001
	STA.w $076E
	STZ.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	STZ.w $0770
	LDA.w $0772
	BEQ.b CODE_808122
	DEC
	ASL
	ASL
	ASL
	TAX
	LDA.w $0774,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	STZ.w !RAM_PLOK_Level_Player_ScoreMillionsDigit
else
	STA.w !RAM_PLOK_Level_Player_ScoreMillionsDigit
endif
	LDA.w $0776,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	STZ.w !RAM_PLOK_Level_Player_ScoreTenThousandsDigit
else
	STA.w !RAM_PLOK_Level_Player_ScoreTenThousandsDigit
endif
	LDA.w $0778,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	STZ.w !RAM_PLOK_Level_Player_ScoreHundredsDigit
else
	STA.w !RAM_PLOK_Level_Player_ScoreHundredsDigit
endif
	LDA.w $077A,x
	STA.w $0848
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ.b +
	LDA.w $0848
	ASL
	TAX
	LDA.w $86DC,X
	STA.w $0848
+:
endif
	INC.w $0770
CODE_808122:
	JSR.w CODE_809EBF
	SEP.b #$20
	INC.b !RAM_PLOK_UnknownRAM0000A8
	REP.b #$30
	STZ.w $07EC
	LDY.w #!Define_PLOK_Music_Map
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	STZ.w $0690
	LDX.w #$5400
	LDX.w #$5800
	JSR.w CODE_80A07C
	JSR.w CODE_80A181
	SEP.b #$20
	JSR.w CODE_809EE5
	REP.b #$20
	STZ.w $0DAA
	LDA.w $0848
	CMP.w !RAM_PLOK_Global_CurrentLevelNum
	BEQ.b CODE_8081DC
	JSR.w CODE_80E4D8
	JSL.l CODE_809FE0
	LDA.w #$0002
	STA.w $0DBC
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	INC.w $0DAA
	SEP.b #$20
	JSR.w CODE_809FBB
	REP.b #$20
	STZ.w $0DBC
	JSL.l CODE_82CC46
	JSR.w CODE_80A0D0
CODE_808186:
	LDA.w $0DBC
	CMP.w #$0002
	BCC.b CODE_808186
	LDA.w #$0002
	STA.w $0DBC
	REP.b #$30
	LDA.w #$00F0
	XBA
	AND.w #$FF00
	ORA.w #$0003
	JSL.l CODE_82E177
	JSR.w CODE_809F96
	JSR.w CODE_809EBF
	LDA.w !RAM_PLOK_Global_CurrentLevelNum
	STA.w $0848
	INC.b !RAM_PLOK_UnknownRAM0000A8
	SEP.b #$20
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer3Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$10
	STA.w !REGISTER_BG1And2TileDataDesignation
	LDA.b #$08
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b #$00
	STA.w !REGISTER_BG3VertScrollOffset
	REP.b #$20
	JSR.w CODE_80A099
	JSL.l CODE_82CCB2
	JSL.l CODE_82CCD9
	JSL.l CODE_82CD04
	STZ.w $0DAA
CODE_8081DC:
	JSR.w CODE_808448
	JSL.l CODE_82CBFE
	JSR.w CODE_80A830
	JSR.w CODE_80AA07
	JSL.l CODE_828526
	JSR.w CODE_80D8F0
	SEP.b #$10
	JSR.w CODE_80B1DC
	JSL.l CODE_82DE4F
	REP.b #$30
	STZ.b $09
	LDA.w #$003F
CODE_808200:
	PHA
	INC.b $09
	JSL.l CODE_828857
	JSR.w CODE_809B9D
	REP.b #$30
	PLA
	DEC
	BNE.b CODE_808200
	STZ.w $0766
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w #$0000
else
	LDA.w #$0064
endif
	STA.w $084C
	JSL.l CODE_828E4D
	JSL.l CODE_82DEB1
	JSR.w CODE_80A20C
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E222
endif
	JSR.w CODE_80A4B4
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	BCC.b CODE_808254
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80823B
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_808254
CODE_80823B:
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	BNE.b CODE_808248
	LDA.w #$0002
	STA.w $0EB4
	BRA.b CODE_808254

CODE_808248:
	LDA.w #$7E00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$2400
	JSR.w CODE_80A113
CODE_808254:
	SEP.b #$20
	JSL.l CODE_809FE0
	STZ.b !RAM_PLOK_UnknownRAM0000A8
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	JSR.w CODE_809A53
endif
	JSL.l CODE_82D8D6
	JSL.l CODE_809FE0
	JSR.w CODE_809304
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E222
endif
	JSR.w CODE_809ECC
	REP.b #$30
	STZ.w $066C
	STZ.w $0742
	STZ.w $0744
	STZ.w $0746
	STZ.b $09
	LDA.w #$0008
	STA.w $094E
CODE_808283:
	JSL.l CODE_809FE0
	REP.b #$30
	LDA.w $068C
	STA.b !RAM_PLOK_UnknownRAM0000AE
	JSR.w CODE_80E22F
	JSL.l CODE_828133
	JSR.w CODE_80849E
	JSL.l CODE_82D8D6
	JSR.w CODE_809B5F
	JSR.w CODE_80A62E
	REP.b #$20
	REP.b #$20							; Optimization: Redundant REP.b #$20
	JSR.w CODE_80D934
	JSR.w CODE_80BE37
	JSR.w CODE_80B26A
	JSR.w CODE_80C6DC
	JSR.w CODE_80C765
	JSR.w CODE_80BF5B
	JSR.w CODE_80B7D7
	JSR.w CODE_80B918
	JSL.l CODE_828857
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ.b CODE_8082CE
	LDA.b $09
	AND.w #$0001
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	BEQ.b CODE_8082CE
	LDA.w $09EC
	BEQ.b CODE_8082D2
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	BRA.b CODE_8082D2
else
	BNE.b CODE_8082D2
endif
CODE_8082CE:
	JSL.l CODE_828E4D
CODE_8082D2:
	JSL.l CODE_82B76D
	JSL.l CODE_82C1F3
	JSL.l CODE_82CE13
	JSL.l CODE_82DB4E
	JSL.l CODE_82D5F4
	JSL.l CODE_82DEB1
	JSL.l CODE_82E092
	JSR.w CODE_809B9D
	JSL.l CODE_809F27
	JSR.w CODE_80935F
	JSR.w CODE_80A20C
	REP.b #$20
	JSR.w CODE_808694
	LDA.w $0766
	BEQ.b CODE_808308
	JMP.w CODE_80830B

CODE_808308:
	JMP.w CODE_808283

CODE_80830B:
	LDA.w #$0708
	STA.w $09EA
	STZ.w $076E
	LDA.w $0766
	CMP.w #$0001
	BEQ.b CODE_80832C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0060
	STA.w !RAM_PLOK_Level_Player_YPosLo
	JSR.w CODE_80B26A
	JSR.w CODE_80C6DC
CODE_80832C:
	JSR.w CODE_80B26A
	LDA.w #$0007
	XBA
	ORA.w #$0006
	JSL.l CODE_82E177
	LDA.w #$000B
	JSL.l CODE_80FD81
	LDX.w #$0046
	JSR.w CODE_808405
	DEC.w !RAM_PLOK_Level_Player_CurrentLifeCountLo
	BMI.b CODE_808356
	JSR.w CODE_809F96
	JSL.l CODE_8287D9
	JMP.w CODE_808122

CODE_808356:
	JSL.l CODE_809FE0
	LDA.w #$0001
	STA.w $084C
	JSR.w CODE_809B5F
	%PLOK_WriteIndependantTextString($03, $07, !Text_Layer_3, !Text_Palette_1, GameOver, CODE_80A457)
	LDX.w #$0096
	JSR.w CODE_808405
	JSR.w CODE_809F96
	JMP.w CODE_80806C

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

CODE_80837B:
	SEP.b #$20
	LDA.b #$04
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E391
endif
	LDX.w #$5C66
	STX.w !REGISTER_VRAMAddressLo
	LDX.w #$0006
CODE_80839A:
	LDA.w DATA_81B0F4,x
	SEC
	SBC.w #$0400
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	DEX
	BPL.b CODE_80839A
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_809FBB
endif
	%PLOK_WriteIndependantTextString($01, $05, !Text_Layer_3, !Text_Palette_1, RestartOption, CODE_80A457)
	%PLOK_WriteIndependantTextString($03, $09, !Text_Layer_3, !Text_Palette_0, PressStart, CODE_80A457)
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	JSR.w CODE_809FBB
endif
	LDA.w #$0009
	STA.w $066C
	STZ.b $09
CODE_8083CB:
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w #$5D47
else
	LDA.w #$5D48
endif
	STA.w !REGISTER_VRAMAddressLo
	SEP.b #$30
	LDA.w $066C
	INC
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData,x
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData+$01,x
	ORA.b #$24
	STA.w !REGISTER_WriteToVRAMPortHi
	REP.b #$30
	LDA.w $068C
	BIT.w #$1000
	BNE.b CODE_808401
	LDA.b $09
	AND.w #$003F
	BNE.b CODE_8083CB
	DEC.w $066C
	BPL.b CODE_8083CB
CODE_808401:
	JSR.w CODE_809F96
	RTS

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

CODE_808405:
	REP.b #$30
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_80849E
	JSR.w CODE_80D934
	LDA.w $0766
	BNE.b CODE_808422
	STZ.w $0804
	STZ.b !RAM_PLOK_UnknownRAM0000AE
	JSR.w CODE_80B26A
	JSR.w CODE_80BF5B
CODE_808422:
	JSR.w CODE_80A62E
	JSL.l CODE_828E4D
	JSL.l CODE_82CE13
	JSL.l CODE_82DB4E
	JSL.l CODE_82D5F4
	JSL.l CODE_82DEB1
	JSL.l CODE_82E092
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	PLX
	DEX
	BNE.b CODE_808405
	RTS

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

CODE_808448:
	REP.b #$30
	LDA.w $0848
	ASL
	TAX
	LDA.l PLOK_LevelMusicTable,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	RTS

CODE_808466:
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BEQ.b CODE_808448
CODE_80846B:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80847F
	JSR.w CODE_808448
	LDX.w #$0005
	JSR.w CODE_809FF9
	JSL.l CODE_82C610
	BRA.b CODE_80849D

CODE_80847F:
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	ASL
	TAX
	LDY.w PLOK_CostumeMusicTable_Main,x
	CPY.w #$0000
	BEQ.b CODE_808466
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
CODE_80849D:
	RTS

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

CODE_80849E:
	PHP
	SEP.b #$30
	LDA.b #$8B
	STA.w !REGISTER_CGRAMAddress
	LDA.b $09
	AND.b #$0C
	LSR
	TAX
	LDA.w $0848
	CMP.b #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_8084BA
	CMP.b #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_8084BA
	JMP.w CODE_80859D

CODE_8084BA:
	LDY.b #$03
CODE_8084BC:
	LDA.w DATA_81DE7A,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.w DATA_81DE7A+$01,x
	STA.w !REGISTER_WriteToCGRAMPort
	INX
	INX
	DEY
	BPL.b CODE_8084BC
	LDA.b #$97
	STA.w !REGISTER_CGRAMAddress
	LDA.b $09
	AND.b #$04
	BEQ.b CODE_8084E0
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	BRA.b CODE_8084EC

CODE_8084E0:
	LDA.w DATA_81DE80
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.w DATA_81DE80+$01
	STA.w !REGISTER_WriteToCGRAMPort
CODE_8084EC:
	LDA.w $0848
	CMP.b #!Define_PLOK_LevelID_AkrillicWomackSpider
	BEQ.b CODE_8084FA
	CMP.b #!Define_PLOK_LevelID_FleapitTheFleaQueen
	BEQ.b CODE_8084FA
	JMP.w CODE_80859B

CODE_8084FA:
	LDA.b #$CA
	STA.w !REGISTER_CGRAMAddress
	LDX.b #$09
	LDA.b #$FF
CODE_808503:
	STA.w !REGISTER_WriteToCGRAMPort
	DEX
	BPL.b CODE_808503
	LDA.b #$DA
	STA.w !REGISTER_CGRAMAddress
	LDX.b #$09
	LDA.b #$FF
CODE_808512:
	STA.w !REGISTER_WriteToCGRAMPort
	DEX
	BPL.b CODE_808512
	LDA.w $094A
	CLC
	ADC.b #$CA
	STA.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	LDA.w $094C
	CLC
	ADC.b #$DA
	STA.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	INC.w $094E
	LDA.w $094E
	AND.b #$0F
	CMP.b #$09
	BNE.b CODE_808571
	LDA.w $094E
	AND.b #$30
	LSR
	LSR
	STA.b $38
	LSR
	CLC
	ADC.b $38
	STA.b $38
	LDA.b #$18
	SEC
	SBC.b $38
	TAY
	LDA.b #$53
	STA.w !REGISTER_CGRAMAddress
	LDX.b #$0B
CODE_80855E:
	LDA.w DATA_81DE9A,y
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.w DATA_81DE9A+$01,y
	STA.w !REGISTER_WriteToCGRAMPort
	INY
	INY
	DEX
	BPL.b CODE_80855E
	BRA.b CODE_80859B

CODE_808571:
	CMP.b #$0D
	BNE.b CODE_80859B
	LDA.w $094E
	AND.b #$30
	LSR
	LSR
	STA.b $38
	LSR
	CLC
	ADC.b $38
	TAY
	LDA.b #$63
	STA.w !REGISTER_CGRAMAddress
	LDX.b #$0B
CODE_80858A:
	LDA.w DATA_81DECA,y
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.w DATA_81DECA+$01,y
	STA.w !REGISTER_WriteToCGRAMPort
	INY
	INY
	DEX
	BPL.b CODE_80858A
CODE_80859B:
	PLP
	RTS

CODE_80859D:
	LDY.b #$03
CODE_80859F:
	LDA.w DATA_81DE8A,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.w DATA_81DE8A+$01,x
	STA.w !REGISTER_WriteToCGRAMPort
	INX
	INX
	DEY
	BPL.b CODE_80859F
	LDA.b #$97
	STA.w !REGISTER_CGRAMAddress
	LDA.b $09
	AND.b #$04
	BEQ.b CODE_8085C3
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	BRA.b CODE_8085CF

CODE_8085C3:
	LDA.w DATA_81DE90
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.w DATA_81DE90+$01
	STA.w !REGISTER_WriteToCGRAMPort
CODE_8085CF:
	PLP
	RTS

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

CODE_8085D1:
	PHP
	SEP.b #$30
	LDA.b #$91
	STA.w !REGISTER_CGRAMAddress
	LDA.w $084E
	ASL
	ASL
	ASL
	CLC
	ADC.w $084E
	ASL
	TAX
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_PostBobbinsBros2OverworldCutscene
	BEQ.b CODE_808612
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_8085F9
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_808612
CODE_8085F9:
	SEP.b #$30
	LDY.b #$08
CODE_8085FD:
	LDA.l DATA_85D6D2,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l DATA_85D6D2+$01,x
	STA.w !REGISTER_WriteToCGRAMPort
	INX
	INX
	DEY
	BPL.b CODE_8085FD
	PLP
	RTS

CODE_808612:
	SEP.b #$30
	LDY.b #$08
CODE_808616:
	LDA.l DATA_85D73E,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l DATA_85D73E+$01,x
	STA.w !REGISTER_WriteToCGRAMPort
	INX
	INX
	DEY
	BPL.b CODE_808616
	PLP
	RTS


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

CODE_80862B:
	REP.b #$30
	LDX.w #$061A
	LDA.w $0EB6
	BEQ.b CODE_80863B
	DEC.w $0EB6
	JMP.w CODE_808687

CODE_80863B:
	LDA.w $0848
	ASL
	ASL
	TAY
	LDA.w DATA_81818C+$02,y
	CLC
	ADC.w #$0017
	STA.b $3A
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_808660
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_808660
	LDA.w DATA_81818C+$02,y
	CLC
	ADC.w #$0038
	STA.b $3A
CODE_808660:
	LDA.w $0EB4
	CMP.w #$0002
	BEQ.b CODE_80866C
	JSL.l CODE_828466
CODE_80866C:
	LDA.w #$013A
	STA.b $04,x
	LDA.w #$0002
	STA.w $0EB4
	LDA.b $00,x
	CMP.w DATA_81818C,y
	BNE.b CODE_808684
	LDA.b $02,x
	CMP.b $3A
	BEQ.b CODE_808693
CODE_808684:
	DEC.w $0EB4
CODE_808687:
	LDA.b $09
	AND.w #$0004
	LSR
	CLC
	ADC.w #$013C
	STA.b $04,x
CODE_808693:
	RTS

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

CODE_808694:
	REP.b #$30
	LDA.w $076A
	AND.w #$0001
	BEQ.b CODE_8086C9
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	BEQ.b CODE_8086A6
	JMP.w CODE_80872A

CODE_8086A6:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen
	BEQ.b CODE_8086C9
	CMP.w #!Define_PLOK_LevelID_AkrillicThePenkinos
	BNE.b CODE_8086B8
	LDA.w #$03A0
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
CODE_8086B8:
	LDA.w $0EB4
	BEQ.b CODE_80872A
	JSR.w CODE_80862B
	LDA.w $0EB4
	CMP.w #$0002
	BEQ.b CODE_8086C9
	RTS

CODE_8086C9:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCC.b CODE_808703
	CMP.w #!Define_PLOK_LevelID_TestDriveSecretWarp
	BCS.b CODE_808703
	SEC
	SBC.w #$0020
	ASL
	ASL
	TAX
	LDA.w DATA_81E7AC,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_808703
	LDA.w DATA_81E7AC+$02,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0040
	CMP.w #$0080
	BCS.b CODE_808703
	JSR.w CODE_808D7E
	JMP.w CODE_8088A4

CODE_808703:
	LDA.w $0848
	ASL
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w DATA_81818C,x
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_808729
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w DATA_81818C+$02,x
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCC.b CODE_808794
CODE_808729:
	RTS

CODE_80872A:
	LDX.w #$061A
	LDA.b $09
	AND.w #$0004
	LSR
	CLC
	ADC.w #$0498
	STA.b $04,x
	LDA.b $00,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_808793
	LDA.b $02,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_808793
	LDA.w #$00A0
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	LDA.b $00,x
	SEC
	SBC.w #$0010
	STA.w $0C1C
	LDA.b $02,x
	SEC
	SBC.w #$0008
	STA.w $0C1E
	LDA.w #$0011
	STA.w $0C1A
	STZ.w $0C20
	STZ.w $0C22
	STZ.w $0C24
	LDA.w #$0050
	STA.w $0C26
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$FFFF
	STA.b $00,x
CODE_808793:
	RTS

CODE_808794:
	PHX
	LDA.w #$0001
	STA.w $084C
	JSL.l CODE_809FE0
	JSR.w CODE_809B5F
	STZ.w !RAM_PLOK_Level_Player_BuddyHornetCount
	STZ.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.b !RAM_PLOK_UnknownRAM0000AE
	JSL.l CODE_82DAF2
	JSR.w CODE_80C765
	JSR.w CODE_80B8E1
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BEQ.b CODE_8087BF
	JSR.w CODE_80D36B
CODE_8087BF:
	JSR.w CODE_80B26A
	JSR.w CODE_80A20C
	PLX
	STZ.w $076A
	LDA.w DATA_81818C+$02,x
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicPloksHouse
	BNE.b CODE_8087DA
	JMP.w CODE_808F8F

CODE_8087DA:
	LDA.w #$0002
	JSL.l CODE_80FD72
	LDA.w #$6000
	STA.w $042C
	JSR.w CODE_80B903
	LDA.w #$003F
	STA.w $0822
	JSR.w CODE_808F36
	INC.w $07EC
	JSL.l CODE_809FE0
	STZ.w $07EC
	REP.b #$30
	LDA.w $0848
	ASL
	TAY
	LDA.w DATA_819B4C,y
	JSR.w CODE_80F69C
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80883B
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80883B
	LDY.w #!Define_PLOK_Music_DiggingForAmulet
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	JSR.w CODE_808FC9
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandBobbinsBros
	BNE.b CODE_8088A4
	JSR.w CODE_80916B
	BRA.b CODE_8088A4

CODE_80883B:
	LDA.w #$0002
	STA.w $07EE
	STZ.w $07F0
	STZ.b $09
	LDA.w #$01A4
CODE_808849:
	PHA
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	LDA.w $076A
	CMP.w #$0046
	BCS.b CODE_808865
	LDA.b $09
	AND.w #$001C
	LSR
	CLC
	ADC.w #$019A
	BRA.b CODE_80888A

CODE_808865:
	LDA.w $076A
	CMP.w #$0064
	BCS.b CODE_808875
	LDA.w #$0000
	STA.w $07EE
	BRA.b CODE_80888A

CODE_808875:
	LDA.b $09
	AND.w #$0008
	BEQ.b CODE_80888A
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81F2BB,x
	STA.w $07EE
	LDA.w #$0044
CODE_80888A:
	STA.w $042A
	JSR.w CODE_8092D0
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	PLA
	DEC
	BNE.b CODE_808849
CODE_8088A4:
	PLA
	JSR.w CODE_808E3D
	JSR.w CODE_809F96
	JSL.l CODE_809FE0
	LDA.w $0848
	INC
	CMP.w #!Define_PLOK_LevelID_TestDriveBreezyBeach
	BCC.b CODE_8088BB
	LDA.w #!Define_PLOK_LevelID_CottonIslandBeach
CODE_8088BB:
	CMP.w #!Define_PLOK_LevelID_AkrillicBrendammiBog		;\ Note: This is the hack that prevents access to the 3 cut levels.
	BCC.b CODE_8088C8						;| Removing these lines should allow access.
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever		;|
	BCS.b CODE_8088C8						;|
	LDA.w #!Define_PLOK_LevelID_FleapitCyclingClever		;/
CODE_8088C8:
	STA.w $0848
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ.b CODE_8088DB
	LDA.w $0848
	ASL
	TAX
	LDA.w PLOK_EasyModeLevelOrder_Main,x
	STA.w $0848
CODE_8088DB:
	LDX.w #!Define_PLOK_LevelID_PostBobbinsBros1OverworldCutscene-!Define_PLOK_LevelID_TestDriveBreezyBeach
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_CottonIslandBobbinsBros+$01
	BEQ.b CODE_808902
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BNE.b CODE_808900
	LDA.w $0848
	INX
	CMP.w #!Define_PLOK_LevelID_LegacyIslandBobbinsBros+$01
	BEQ.b CODE_808902
	INX
	CMP.w #!Define_PLOK_LevelID_AkrillicBreezyBeach+$01				; Note: Due to the above level hack, this is technically checking for !Define_PLOK_LevelID_AkrillicRockyfella
	BEQ.b CODE_808902
	INX
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen+$01
	BEQ.b CODE_808902
CODE_808900:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
	JMP.w CODE_808980
else
	BRA.b CODE_808980
endif

CODE_808902:
	PHA
if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
	PHX										;\ Note: What was the point of this change?
	STZ.w $0772									;| Not to mention that preserving X here does nothing.
	PLX										;/
endif
	TXA
	CLC
	ADC.w #!Define_PLOK_LevelID_PostBobbinsBros1OverworldCutscene-$01
	STA.w $0848
if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
else
	STZ.w $0772
endif
	STZ.w $0DAA
	JSR.w CODE_80E4D8
	JSL.l CODE_809FE0
	LDY.w #!Define_PLOK_Music_Map
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	INC
	XBA
	AND.w #$FF00
	ORA.w #$0001
	JSL.l CODE_82E177
	LDA.w #$0002
	STA.w $0DBC
	INC.w $0DAA
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	SEP.b #$20
	JSR.w CODE_809FBB
	REP.b #$20
	STZ.w $0DBC
CODE_808949:
	LDA.w $0DBC
	CMP.w #$0002
	BCC.b CODE_808949
	JSR.w CODE_809F96
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_PostBobbinsBros1OverworldCutscene
	BNE.b CODE_808961
	JSR.w CODE_808AEE
	BRA.b CODE_808971

CODE_808961:
	CMP.w #!Define_PLOK_LevelID_PostBobbinsBros2OverworldCutscene
	BNE.b CODE_808969
	JSR.w CODE_808B72
CODE_808969:
	CMP.w #!Define_PLOK_LevelID_PostRockyfellaOverworldCutscene
	BNE.b CODE_808971
	JSR.w CODE_808B2A
CODE_808971:
	PLA
	STA.w $0848
	INC.w $1800
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen+$01
	BEQ.b CODE_808999
CODE_808980:
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ.b CODE_808990
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicCrashingRocks+$01
	BCC.b CODE_808990
	JMP.w CODE_808A80

CODE_808990:
	LDA.w #$00FF
	STA.w !RAM_PLOK_Global_CurrentLevelNum
	JMP.w CODE_808122

CODE_808999:
	SEP.b #$30
	JSR.w CODE_80E49E
	INC.b !RAM_PLOK_UnknownRAM0000A8
	JSL.l CODE_809FE0
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$07
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$30
	JSL.l CODE_809FE0
	LDX.w #$5800
	JSR.w CODE_80A07C
	JSL.l CODE_82832D
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
	LDX.w #$5800
	LDY.w #$7E3000
	STY.b $38
	LDA.w #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B086
	JSR.w CODE_80A1A6
	JSL.l CODE_809FE0
	LDX.w #$5400
	JSR.w CODE_80A07C
	LDA.w #$00B4
	JSR.w CODE_80F69C
	JSL.l CODE_82C62D
	JSL.l CODE_809FE0
	JSL.l CODE_82C652
	JSR.w CODE_809FBB
	LDX.w #$1770
CODE_8089FE:
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSL.l CODE_82C652
	JSL.l CODE_82C863
	PLX
	BMI.b CODE_808A14
	DEX
	BRA.b CODE_8089FE

CODE_808A14:
	LDA.w $068C
	BEQ.b CODE_8089FE
	JSR.w CODE_809F96
	SEP.b #$20
	LDA.b #!BGModeAndTileSizeSetting_Mode04Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$40
	STA.w !REGISTER_BG1And2TileDataDesignation
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.b #$07
else
	LDA.b #$03
endif
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$30
	JSL.l CODE_82837E
	LDX.w #$5800
	LDA.w #$0180
	JSR.w CODE_80A076
	LDX.w #$54E0
	LDY.w #$7E3000
	STY.b $38
	LDA.w #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B09A
	JSR.w CODE_80A1A6
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	;%PLOK_WriteIndependantTextString($02, $01, !Text_Layer_2, !Text_Palette_2, FinalScore, CODE_80A457)
	%PLOK_SetTextVRAMAddress($02, $01, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(FinalScore, !Text_InCode)
	%PLOK_SetTextTileProperties(!Text_Palette_2, !Text_InCode)
else
	%PLOK_WriteIndependantTextString($02, $01, !Text_Layer_2, !Text_Palette_2, FinalScore, CODE_80A457)
	%PLOK_WriteIndependantTextString($03, $0D, !Text_Layer_2, !Text_Palette_1, WellDone, CODE_80A457)
endif
	JSL.l CODE_82D8C6
	LDA.w #$00FE
	XBA
	AND.w #$FF00
	ORA.w #$0003
	JSL.l CODE_82E177
	JSR.w CODE_809FBB
CODE_808A7E:								; Note: Infinite loop, reached when on the Final Score screen.
	BRA.b CODE_808A7E

CODE_808A80:
	SEP.b #$20
	JSR.w CODE_80E49E
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$05
	STA.b !RAM_PLOK_UnknownRAM0000AA
	JSR.w CODE_80E1B5
	JSL.l CODE_82CBFE
	REP.b #$30
	LDA.w #$FFFF
	STA.w $0662
	LDA.w #$0005
	STA.w $0660
	JSL.l CODE_809FE0
	JSL.l CODE_82C8CE
	LDY.w #!Define_PLOK_Music_RocketeerPlok
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	REP.b #$30
	STZ.w $0DAA
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallLetters
	JSL.l CODE_87E000
	LDA.w #$00B6
	JSR.w CODE_80F69C
	JSR.w CODE_809FBB
CODE_808AE5:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	BRA.b CODE_808AE5

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

CODE_808AEE:
	SEP.b #$20
	LDA.b #$04
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$30
	STZ.w $0DAA
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_WriteIndependantTextString($07, $0B, !Text_Layer_3, !Text_Palette_1, PostCottonIslandBobbinsBrosPart2_Line1, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($06, $0D, !Text_Layer_3, !Text_Palette_1, PostCottonIslandBobbinsBrosPart2_Line2, CODE_80A4AF)
else
	%PLOK_WriteIndependantTextString($07, $0B, !Text_Layer_3, !Text_Palette_1, PostCottonIslandBobbinsBrosPart2_Line1, CODE_80A488)
	%PLOK_WriteIndependantTextString($06, $0D, !Text_Layer_3, !Text_Palette_1, PostCottonIslandBobbinsBrosPart2_Line2, CODE_80A488)
endif
	JSR.w CODE_809FBB
	LDX.w #$012C
	JSR.w CODE_809FF9
	JSR.w CODE_809F96
	RTS

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

CODE_808B2A:
	SEP.b #$20
	LDA.b #$04
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$30
	STZ.w $0DAA
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_WriteIndependantTextString($05, $0B, !Text_Layer_3, !Text_Palette_1, PostAkrillicRockyfellaPart2_Line1, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($05, $0D, !Text_Layer_3, !Text_Palette_1, PostAkrillicRockyfellaPart2_Line2, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($09, $0F, !Text_Layer_3, !Text_Palette_1, PostAkrillicRockyfellaPart2_Line3, CODE_80A4AF)
else
	%PLOK_WriteIndependantTextString($05, $0B, !Text_Layer_3, !Text_Palette_1, PostAkrillicRockyfellaPart2_Line1, CODE_80A488)
	%PLOK_WriteIndependantTextString($05, $0D, !Text_Layer_3, !Text_Palette_1, PostAkrillicRockyfellaPart2_Line2, CODE_80A488)
	%PLOK_WriteIndependantTextString($09, $0F, !Text_Layer_3, !Text_Palette_1, PostAkrillicRockyfellaPart2_Line3, CODE_80A488)
endif
	JSR.w CODE_809FBB
	LDX.w #$012C
	JSR.w CODE_809FF9
	JSR.w CODE_809F96
	RTS

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

CODE_808B72:
	SEP.b #$20
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer3Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$10
	STA.w !REGISTER_BG1And2TileDataDesignation
	LDA.b #$08
	STA.w !REGISTER_BG3VertScrollOffset
	LDA.b #$00
	STA.w !REGISTER_BG3VertScrollOffset
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	STZ.w $0DAA
	REP.b #$30
	JSR.w CODE_80A181
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.w #!Define_PLOK_LevelID_AkrillicPloksHouse
	STA.w $0848
	STA.w !RAM_PLOK_Global_CurrentLevelNum
	JSL.l CODE_82CC46
	JSR.w CODE_80A0D0
	JSR.w CODE_80A099
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$6A00
	LDY.w #!Define_PLOK_GFX_FG_Level_GrandpappyStatue
	JSL.l CODE_87E000
	JSL.l CODE_82CCB2
	JSL.l CODE_82CCD9
	JSL.l CODE_82CD04
	JSR.w CODE_808448
	JSL.l CODE_82CBFE
	JSR.w CODE_80A830
	JSR.w CODE_80AA07
	LDA.w #$0130
	STA.b !RAM_PLOK_UnknownRAM00006A
	JSR.w CODE_809A0F
	LDA.w #!Define_PLOK_LevelID_LegacyIslandBobbinsBros
	STA.w $0848
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	INC.w $07EC
	JSL.l CODE_809FE0
	STZ.w $07EC
	LDA.w #!Define_PLOK_LevelID_AkrillicPloksHouse
	STA.w $0848
	LDA.w #$00F6
	STA.w $0DBE
	LDA.w #$00B2
	JSR.w CODE_80F69C
	JSR.w CODE_80B1DC
	JSR.w CODE_80D8F0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_80A4CA
else
	JSR.w CODE_80A4B4
endif
	JSL.l CODE_82D8D6
	LDX.w #!RAM_PLOK_Level_Player_FlyingLimbTable
	LDA.w #$01D0
	STA.b $00,x
	LDA.w #$00BF
	STA.b $02,x
	LDA.w #$2800
	STA.b $06,x
	LDA.w #$00E2
	STA.b $04,x
	LDX.w #$046C
	LDA.w #$01D0
	STA.b $00,x
	LDA.w #$00F0
	STA.b $02,x
	LDA.w #$045C
	STA.b $04,x
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$0001
	STA.w $08CE
	STZ.b $42
	STZ.w $0DC0
	LDX.w #$0008
CODE_808C42:
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_80D934
	JSR.w CODE_80F068
	JSR.w CODE_80F13F
	JSR.w CODE_80F026
	JSR.w CODE_80A20C
	PLX
	DEX
	BPL.b CODE_808C42
	LDA.w #$01B4
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w #$00C2
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w #$6000
	STA.w $042C
	JSR.w CODE_809FBB
	LDX.w #$030C
CODE_808C72:
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_80849E
	JSR.w CODE_80F6AB
	JSR.w CODE_80D934
	JSR.w CODE_80F657
	JSR.w CODE_80F068
	JSR.w CODE_80F13F
	JSR.w CODE_80F026
	JSR.w CODE_808C9A
	JSR.w CODE_80A20C
	PLX
	DEX
	BPL.b CODE_808C72
	JSR.w CODE_809F96
	RTS

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

CODE_808C9A:
	LDA.w $0DBE
	CMP.w #$010E
	BCC.b CODE_808CC6
	LDX.w #$046C
	LDA.b $02,x
	CMP.w #$0080
	BCC.b CODE_808CC1
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$045C
	STA.b $04,x
	INC.b $00,x
	LDA.b $02,x
	SEC
	SBC.w #$0002
	STA.b $02,x
	RTS

CODE_808CC1:
	LDA.w #$045E
	STA.b $04,x
CODE_808CC6:
	RTS

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

CODE_808CC7:
	SEP.b #$20
	JSR.w CODE_80E49E
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer3Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$05
	STA.b !RAM_PLOK_UnknownRAM0000AA
	JSR.w CODE_80E1B5
	JSL.l CODE_82CBFE
	REP.b #$30
	LDA.w #$02BC
	STA.w $066C
	LDA.w #$FFFF
	STA.w $0662
	LDA.w #$0005
	STA.w $0660
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82CB04
else
	JSL.l CODE_82C8CE
endif
	REP.b #$30
	STZ.w $0DAA
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E222
	JSR.w CODE_809FBB
	JSR.w CODE_808D5D
else
	%PLOK_WriteIndependantTextString($02, $02, !Text_Layer_3, !Text_Palette_3, SkillLevel, CODE_80A457)
	LDA.w #$0024
	STA.b $40
	STA.b $42
	JSR.w CODE_808D5D
	JSR.w CODE_809FBB
endif
CODE_808D1F:
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_808D3A
else
	LDA.w #$0024
	STA.b $40
	STA.b $42
	LDA.b $09
	AND.w #$0008
	BNE.b CODE_808D3B
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	ASL
	TAX
	LDA.w #$0020
	STA.b $40,x
CODE_808D3B:
	JSR.w CODE_808D5D
endif
	LDA.w $068C
	BEQ.b CODE_808D1F
	BIT.w #$1000
	BNE.b CODE_808D59
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	INC
	AND.w #$0001
	STA.w !RAM_PLOK_Global_EasyModeFlag
CODE_808D52:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_809FE0
	JSR.w CODE_808D3A
endif
	LDA.w $068C
	BNE.b CODE_808D52
	BRA.b CODE_808D1F

CODE_808D59:
	JSR.w CODE_809F96
	RTS

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
CODE_808D3A:
	LDA.w #$2400
	STA.b $38
	LDA.b $09
	AND.w #$0008
	BNE.b +
	LDA.w #$2000
	STA.b $38
+:
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ.b +
	JSL.l CODE_82E84A
	LDA.w #$2000
	STA.b $38
	JSL.l CODE_82E83C
	BRA.b ++

+:
	JSL.l CODE_82E83C
	LDA.w #$2000
	STA.b $38
	JSL.l CODE_82E84A
++:
	RTS

endif

CODE_808D5D:
	REP.b #$30
	%PLOK_SetTextVRAMAddress($05, $09, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(NormalDifficultyName, !Text_InCode)
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_80A457
	%PLOK_SetTextVRAMAddress($05, $09, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(ClearLargeLetterLine, !Text_InCode)
	JSL.l CODE_809FE0
else
	LDA.b $40
endif
	JSR.w CODE_80A457
	%PLOK_SetTextVRAMAddress($02, $0B, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(EasyDifficultyName, !Text_InCode)
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDA.b $42
endif
	JSR.w CODE_80A457
	RTS

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

CODE_808D7E:
	REP.b #$30
	LDA.w #$0001
	STA.w $084C
	JSL.l CODE_809FE0
	JSR.w CODE_809B5F
	LDA.w $0848
	ASL
	TAY
	LDA.w DATA_819B4C,y
	JSR.w CODE_80F69C
	JSR.w CODE_80B8E1
	JSR.w CODE_80D36B
	LDA.w #$0002
	JSL.l CODE_80FD72
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
CODE_808DAB:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	LDA.w #$0000
	STA.b !RAM_PLOK_UnknownRAM0000AF
	JSR.w CODE_80B26A
	JSR.w CODE_80BF5B
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_808DAB
	LDA.w #$0006
	STA.w $07EE
	LDA.w #$0000
	STA.w $07F0
	LDA.w #$01A4
CODE_808DE1:
	PHA
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	LDA.b $09
	AND.w #$0008
	BEQ.b CODE_808DF3
	LDA.w #$0044
CODE_808DF3:
	STA.w $042A
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	PLA
	DEC
	BNE.b CODE_808DE1
	STZ.w !RAM_PLOK_Level_Player_BuddyHornetCount
	STZ.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	JSL.l CODE_82DAF2
	JSR.w CODE_80C765
	JSR.w CODE_80B8E1
	JSR.w CODE_80A20C
	STZ.w $076A
	JSR.w CODE_80B903
	LDA.w #$003F
	STA.w $0822
	JSR.w CODE_808F36
	REP.b #$30
	LDA.w $0848
	ASL
	TAY
	LDA.w DATA_819B4C,y
	JSR.w CODE_80F69C
	RTS

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

CODE_808E3D:
	PHP
	REP.b #$30
	JSL.l CODE_828023
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81871A,x
	BNE.b CODE_808E51
	JMP.w CODE_808F15

CODE_808E51:
	STA.w $0EC6
	LDA.w #$0008
	STA.b $38
	REP.b #$30
	LDY.w #!Define_PLOK_Music_ArsonistPlok
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	JSL.l CODE_809FE0
	LDX.w #$5C60
CODE_808E76:
	JSL.l CODE_809FE0
	STX.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
	TXA
	CLC
	ADC.w #$0020
	TAX
	DEC.b $38
	BPL.b CODE_808E76
	JSL.l CODE_809FE0
	%PLOK_WriteIndependantTextString($02, $05, !Text_Layer_3, !Text_Palette_1, SuperBonus, CODE_80A457)
	LDX.w #$003C
	JSR.w CODE_808F17
	JSL.l CODE_809FE0
	LDA.w #$0006
	STA.w $0EC0
	JSL.l CODE_8280F5
	LDX.w #$003C
	JSR.w CODE_808F17
CODE_808EB4:
	JSL.l CODE_809FE0
	LDA.w #$0006
	STA.w $0EC0
	JSL.l CODE_8280F5
	JSL.l CODE_828070
	LDA.w #$0001
	JSL.l CODE_82CBF1
	JSR.w CODE_8092D0
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_808EEB
	LDA.w #$0006
	JSL.l CODE_80FD81
CODE_808EEB:
	LDA.w $0EC2
	ORA.w $0EC4
	ORA.w $0EC6
	ORA.w $0EC8
	BNE.b CODE_808EB4
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w #$5D27
else
	LDA.w #$5D07
endif
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$2580
	STA.w !REGISTER_WriteToVRAMPortLo
	STA.w !REGISTER_WriteToVRAMPortLo
	STA.w !REGISTER_WriteToVRAMPortLo
	LDX.w #$003C
	JSR.w CODE_808F17
CODE_808F15:
	PLP
	RTS

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

CODE_808F17:
	REP.b #$30
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_8092D0
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	PLX
	DEX
	BPL.b CODE_808F17
	RTS

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

CODE_808F36:
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	LDA.w $076E
	BEQ.b CODE_808F46
	INC.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
CODE_808F46:
	LDA.w #$0001
	STA.w $076E
	JSL.l CODE_809FE0
	JSL.l CODE_80A50C
	LDA.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	CMP.w #$0004
	BCC.b CODE_808F8E
	STZ.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	LDA.w $0772
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_ScoreMillionsDigit
	STA.w $0774,x
	LDA.w !RAM_PLOK_Level_Player_ScoreTenThousandsDigit
	STA.w $0776,x
	LDA.w !RAM_PLOK_Level_Player_ScoreHundredsDigit
	STA.w $0778,x
	LDA.w $0848
	INC
	STA.w $077A,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	LDY.w $0772
-:
	LDA.w $0848
	INC
	STA.w $077A,x
	TXA
	SEC
	SBC.w #$0008
	TAX
	DEY
	BPL.b -
endif
	LDA.w $0772
	CMP.w #$000F
	BCS.b CODE_808F8E
	JSL.l CODE_80A537
	INC.w $0772
CODE_808F8E:
	RTS

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

CODE_808F8F:
	JSR.w CODE_80B903
	LDA.w #$003F
	STA.w $0822
	LDX.w #$061A
	LDA.w #$0158
	STA.b $00,x
	LDA.w #$0098
	STA.b $02,x
	INC.w $07EC
	JSL.l CODE_809FE0
	STZ.w $07EC
	REP.b #$30
	LDA.w #$5DA8
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0180
	STA.w !REGISTER_WriteToVRAMPortLo
	JSR.w CODE_80F50A
	LDA.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	STA.w $0848
	JMP.w CODE_808122

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

CODE_808FC9:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0002
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w #$000A
	STA.w $07EE
	LDA.w #$2000
	STA.w $042C
	LDA.w #$007F
	STA.w $0822
	STZ.b $09
	LDA.w #$0080
CODE_808FEA:
	PHA
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	LDA.b $09
	AND.w #$001C
	LSR
	CLC
	ADC.w #$040A
	STA.w $042A
	LDA.b $09
	AND.w #$000F
	BNE.b CODE_809009
	INC.w !RAM_PLOK_Level_Player_YPosLo
CODE_809009:
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	PLA
	DEC
	BNE.b CODE_808FEA
	STZ.w $0DBE
	STZ.w $0DC0
	STZ.w $076A
	STZ.w $0DC2
	STZ.b $09
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandSwiftyPeaks
	BNE.b CODE_809036
	INC.w $08D0
CODE_809036:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	LDA.w #$0212
else
	LDA.w #$01AE
endif
CODE_809039:
	PHA
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80D934
	INC.w $076A
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandCrouchHill
	BNE.b CODE_809054
	JSR.w CODE_8090E8
	BRA.b CODE_809057

CODE_809054:
	JSR.w CODE_809091
CODE_809057:
	LDA.w $076A
	CMP.w #$010E
	BCC.b CODE_809079
	LDA.b $09
	AND.w #$0008
	BEQ.b CODE_809074
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81F2BB,x
	STA.w $07EE
	LDA.w #$0044
CODE_809074:
	STA.w $042A
	BRA.b CODE_80907C

CODE_809079:
	JSR.w CODE_809127
CODE_80907C:
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	PLA
	DEC
	BNE.b CODE_809039
	RTS

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

CODE_809091:
	LDA.w $0DC2
	CMP.w #$0018
	BCS.b CODE_8090D6
	LDA.w $076A
	CMP.w #$008B
	BCC.b CODE_8090D6
	LDX.w #$061A
	LDY.w $0DC2
	LDA.b $02,x
	CLC
	ADC.w DATA_81F03F,y
	STA.b $02,x
	INC.b $00,x
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_8090BE
	INC.w $0DC2
	INC.w $0DC2
CODE_8090BE:
	LDA.w $0848
	ASL
	TAY
	LDA.w DATA_81EFBF,y
	STA.b $04,x
	LDA.w $0DC2
	CMP.w #$000C
	BCC.b CODE_8090D5
	LDA.w #$3C00
	STA.b $06,x
CODE_8090D5:
	RTS

CODE_8090D6:
	LDA.w $0848
	SEC
	SBC.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	ASL
	TAY
	LDX.w #$061A
	LDA.w DATA_81F02F,y
	STA.b $04,x
	RTS

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

CODE_8090E8:
	LDA.w $076A
	CMP.w #$008B
	BCC.b CODE_809126
	LDX.w #$061A
	LDA.w $0DC2
	CMP.w #$000C
	BCS.b CODE_809113
	LDA.b $02,x
	SEC
	SBC.w #$0006
	STA.b $02,x
	LDA.w #$0E80
	STA.b $00,x
	LDA.w #$6400
	STA.b $06,x
	INC.w $0DC2
	INC.w $0DC2
CODE_809113:
	LDA.w $076A
	CMP.w #$00C8
	BCS.b CODE_809121
	LDA.w #$043C
	STA.b $04,x
	RTS

CODE_809121:
	LDA.w #$043E
	STA.b $04,x
CODE_809126:
	RTS

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

CODE_809127:
	LDA.w $0DC0
	BEQ.b CODE_809131
	DEC
	STA.w $0DC0
	RTS

CODE_809131:
	LDY.w $0DBE
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandCrouchHill
	BEQ.b CODE_809150
	LDA.w DATA_81F07D,y
	STA.w $0DC0
	LDA.w DATA_81F07D+$02,y
	STA.w $042A
	LDA.w DATA_81F07D+$04,y
	STA.w $07EE
	BRA.b CODE_809162

CODE_809150:
	LDA.w DATA_81F10D,y
	STA.w $0DC0
	LDA.w DATA_81F10D+$02,y
	STA.w $042A
	LDA.w DATA_81F10D+$04,y
	STA.w $07EE
CODE_809162:
	TYA
	CLC
	ADC.w #$0006
	STA.w $0DBE
	RTS

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

CODE_80916B:
	LDX.w #$061A
	LDA.w #$FFFF
	STA.b $00,x
	LDX.w #$0462
	LDA.w #$041E
	STA.b $00,x
	LDA.w #$0138
	STA.b $02,x
	LDA.w #$0434
	STA.b $04,x
	LDA.w #$3C00
	STA.b $06,x
	JSL.l CODE_809FE0
	JSR.w CODE_80A20C
	STZ.w $0DBE
	LDA.w #$0066
	STA.w $042A
CODE_80919A:
	JSL.l CODE_809FE0
	LDY.w $0DBE
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w DATA_81F057,y
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w $0DBE
	CMP.w #$0014
	BCS.b CODE_8091B9
	INC.w !RAM_PLOK_Level_Player_XPosLo
	INC.w !RAM_PLOK_Level_Player_XPosLo
CODE_8091B9:
	JSR.w CODE_80A20C
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80919A
	INC.w $0DBE
	INC.w $0DBE
	LDA.w $0DBE
	CMP.w #$0008
	BNE.b CODE_8091D9
	LDA.w #$3000
	STA.w $042C
	BRA.b CODE_80919A

CODE_8091D9:
	CMP.w #$0016
	BCC.b CODE_80919A
	LDA.w #$7000
	STA.w $042C
	STZ.w $042A
	LDA.w #$043A
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w #$0129
	STA.w !RAM_PLOK_Level_Player_YPosLo
	STZ.w $0DBE
	STZ.w $0DC0
	LDA.w #$0384
CODE_8091FC:
	PHA
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80849E
	JSR.w CODE_80921F
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	JSR.w CODE_80C6DC
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	PLA
	DEC
	BNE.b CODE_8091FC
	RTS

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

CODE_80921F:
	LDX.w #$0462
	LDA.w $0DC0
	BEQ.b CODE_80922D
	DEC
	STA.w $0DC0
	BRA.b CODE_80924A

CODE_80922D:
	LDY.w $0DBE
	LDA.w DATA_81F19D,y
	STA.w $0DC0
	LDA.w DATA_81F19D+$02,y
	STA.w $042A
	LDA.w DATA_81F19D+$04,y
	STA.w $07EE
	TYA
	CLC
	ADC.w #$0006
	STA.w $0DBE
CODE_80924A:
	LDA.w $0DBE
	CMP.w #$0012
	BEQ.b CODE_809270
	CMP.w #$0084
	BEQ.b CODE_809270
	CMP.w #$0078
	BEQ.b CODE_80927F
	CMP.w #$008A
	BEQ.b CODE_8092B0
	CMP.w #$0096
	BEQ.b CODE_809276
	CMP.w #$0072
	BNE.b CODE_809275
	LDA.w #$045A
	BRA.b CODE_809273

CODE_809270:
	LDA.w #$0458
CODE_809273:
	STA.b $04,x
CODE_809275:
	RTS

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

CODE_809276:
	LDX.w #$046C
	LDA.w #$045E
	STA.b $04,x
	RTS

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

CODE_80927F:
	LDA.w #$3000
	STA.w $042C
	LDA.w #$0402
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w $0DC0
	AND.w #$0078
	LSR
	TAY
	LDA.w DATA_81F27B,y
	STA.b $00,x
	LDA.w DATA_81F27B+$02,y
	STA.b $02,x
	LDX.w #$046C
	LDA.w #$00E2
	STA.b $04,x
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.b $02,x
	RTS

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

CODE_8092B0:
	LDX.w #$046C
	LDA.w #$3000
	STA.b $06,x
	LDA.w #$045C
	STA.b $04,x
	DEC.b $00,x
	LDA.w $0DC0
	AND.w #$001C
	LSR
	TAY
	LDA.w DATA_81F06D,y
	CLC
	ADC.b $02,x
	STA.b $02,x
	RTS

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

CODE_8092D0:
	LDX.w #$061A
	INC.w $076A
	LDA.w $076A
	CMP.w #$0046
	BCS.b CODE_8092ED
	AND.w #$0003
	BNE.b CODE_8092E5
	INC.b $00,x
CODE_8092E5:
	DEC.b $02,x
	LDA.w #$013C
	BRA.b CODE_8092F5

CODE_8092EC:
	RTS

CODE_8092ED:
	LDA.w $0848
	ASL
	TAY
	LDA.w DATA_81EFBF,y
CODE_8092F5:
	STA.b $38
	LDA.w $076A
	AND.w #$0004
	LSR
	CLC
	ADC.b $38
	STA.b $04,x
	RTS

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

CODE_809304:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_80934E
	SEP.b #$30
else
	SEP.b #$30
	LDA.b #$01
	STA.w $0678
	STZ.w $0679
	LDA.b #$33
	STA.w $067F
	STA.w $0680
	LDA.b #$03
	STA.w $0681
	LDA.b #$80
	STA.w $067A
	LDA.b #$70
	STA.w $067B
	REP.b #$20
	LDA.w #$0000
	STA.w $0676
	JSL.l CODE_828168
	SEP.b #$20
endif
	STZ.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	LDA.b !RAM_PLOK_UnknownRAM0000AA					; Optimization: Redundant instruction
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	LDA.b #!ScreenDisplayRegister_MaxBrightness0F
	STA.w !REGISTER_ScreenDisplayRegister
	REP.b #$20
CODE_80934F:
	JSL.l CODE_809FE0
	LDA.w #$0400
	JSR.w CODE_80FADF
	BPL.b CODE_80934F
	JSR.w CODE_80FACD
	RTS

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
CODE_80934E:
	SEP.b #$30
	LDA.b #$01
	STA.w $0678
	STZ.w $0679
	LDA.b #$33
	STA.w $067F
	STA.w $0680
	LDA.b #$03
	STA.w $0681
	LDA.b #$80
	STA.w $067A
	LDA.b #$70
	STA.w $067B
	REP.b #$20
	LDA.w #$0000
	STA.w $0676
	JSL.l CODE_828168
	RTS

CODE_80937C:
	SEP.b #$30
	JSR.w CODE_80934E
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MaxBrightness0F
	STA.w !REGISTER_ScreenDisplayRegister
	REP.b #$20
-:
	JSL.l CODE_809FE0
	LDA.w #$0400
	JSR.w CODE_80FADF
	BPL.b -
	JSR.w CODE_80FACD
	RTS
endif

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

CODE_80935F:
	REP.b #$30
	LDA.w $0A10
	BNE.b CODE_809367
	RTS

CODE_809367:
	PLA
	LDA.w $0A10
	CMP.w #$0002
	BNE.b CODE_809373
	JMP.w CODE_8097B2

CODE_809373:
	REP.b #$30
	STZ.w $0742
	STZ.w $0744
	STZ.w $0746
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	JSR.w CODE_80B903
	JSR.w CODE_80B259
	LDA.w #$003F
	STA.w $0822
	JSL.l CODE_809FE0
	LDA.w $067A
	PHA
	JSR.w CODE_80F89B
	JSR.w CODE_80F922
	SEP.b #$30
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	STA.w !REGISTER_SubScreenLayers
	STA.w !REGISTER_SubScreenWindowMask
	LDA.b #$00
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.w $0848
	ASL
	CLC
	ADC.w $0848
	TAX
	LDA.b #$82
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.w DATA_81EF05,x
	STA.w !REGISTER_FixedColorData
	LDA.w DATA_81EF05+$01,x
	STA.w !REGISTER_FixedColorData
	LDA.w DATA_81EF05+$02,x
	STA.w !REGISTER_FixedColorData
	LDA.b #$80
	STA.w $067A
	LDA.b #$80
	STA.w $067B
	JSL.l CODE_809FE0
	REP.b #$30
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_8281B5
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	INC.w $0A12
	JSR.w CODE_809B9D
	LDX.w #$0008
	JSR.w CODE_809FF9
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	PHA
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	PHA
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	PHA
	LDX.w #$001E
CODE_809416:
	LDA.b !RAM_PLOK_UnknownRAM00006A,x
	PHA
	DEX
	DEX
	BPL.b CODE_809416
	LDA.w $0848
	ASL
	ASL
	TAX
	LDA.w DATA_81EB15,x
	STA.b !RAM_PLOK_UnknownRAM00006A
	LDA.w DATA_81EB15+$02,x
	STA.b !RAM_PLOK_UnknownRAM00006C
	JSR.w CODE_809A0F
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$0080
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0070
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	PHA
	LDA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	PHA
	LDA.b !RAM_PLOK_Level_HighestCameraYPosLo
	PHA
	LDA.b !RAM_PLOK_Level_LowestCameraYPosLo
	PHA
	LDA.w $0848
	ASL
	ASL
	ASL
	TAX
	LDA.w DATA_81EBF5,x
	STA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	LDA.w DATA_81EBF5+$02,x
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	LDA.w DATA_81EBF5+$04,x
	STA.b !RAM_PLOK_Level_HighestCameraYPosLo
	LDA.w DATA_81EBF5+$06,x
	STA.b !RAM_PLOK_Level_LowestCameraYPosLo
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81EE95,x
	BEQ.b CODE_8094B6
	AND.w #$007F
	STA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	JSL.l CODE_82C610
	STZ.w $0A12
	SEP.b #$20
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	REP.b #$20
	LDA.w #$00A0
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	LDA.w #$2000
	STA.w $042C
	JSR.w CODE_80B26A
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	BCS.b CODE_8094C5
	LDX.w #$007E
CODE_8094A8:
	LDA.l DATA_83DE44,x
	STA.l $7E2000,x
	DEX
	DEX
	BPL.b CODE_8094A8
	BRA.b CODE_8094C5

CODE_8094B6:
	LDX.w #$0010
CODE_8094B9:
	LDA.l DATA_81EFAD,x
	STA.l $7E2080,x
	DEX
	DEX
	BPL.b CODE_8094B9
CODE_8094C5:
	JSL.l CODE_809FE0
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	STZ.b $09
	REP.b #$30
	LDA.w #$003F
CODE_8094D6:
	PHA
	INC.b $09
	JSL.l CODE_828857
	REP.b #$30
	PLA
	DEC
	BNE.b CODE_8094D6
	LDX.w #$0008
CODE_8094E6:
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_80D934
	JSR.w CODE_809B9D
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_8094F8
	BEQ.b CODE_8094FE				; Note: This will always branch.

CODE_8094F8:
	STZ.w $080A
	JSR.w CODE_80CA34
CODE_8094FE:
	PLX
	DEX
	BPL.b CODE_8094E6
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_80950D
	JSR.w CODE_80FACD
	JMP.w CODE_8095C8

CODE_80950D:
	STZ.w $0838
	STZ.w $083A
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0808
	LDX.w #$0008
CODE_80951C:
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_80CA34
	JSR.w CODE_809B9D
	JSR.w CODE_80D934
	PLX
	DEX
	BPL.b CODE_80951C
	JSR.w CODE_80F85C
	LDY.w #!Define_PLOK_Music_BonusLevel
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	JSL.l CODE_809FE0
	%PLOK_WriteIndependantTextString($02, $05, !Text_Layer_3, !Text_Palette_0, RaceAgainst, CODE_80A457)
	%PLOK_WriteIndependantTextString($06, $0A, !Text_Layer_3, !Text_Palette_0, Time, CODE_80A457)
	LDX.w #$00C8
	JSR.w CODE_809FF9
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDX.w #$5D40
	STX.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
endif
	%PLOK_WriteIndependantTextString($01, $05, !Text_Layer_3, !Text_Palette_0, OnYourMarks, CODE_80A457)
	LDX.w #$0064
	JSR.w CODE_809FF9
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDX.w #$5CA0
	STX.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
endif
	%PLOK_WriteIndependantTextString($04, $05, !Text_Layer_3, !Text_Palette_0, GetSet, CODE_80A457)
	JSR.w CODE_80F922
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDX.w #$5CA0
	STX.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
endif
	JSL.l CODE_809FE0
	%PLOK_WriteIndependantTextString($07, $05, !Text_Layer_3, !Text_Palette_0, Go, CODE_80A457)
	LDA.w #$0064
	STA.w $084C
	JSR.w CODE_80FACD
CODE_8095C8:
	STZ.w $08F4
	JSL.l CODE_828035
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81EE25,x
	TAX
CODE_8095D8:
	LDA.w $0766
	BNE.b CODE_80964B
	PHX
	JSL.l CODE_809FE0
	REP.b #$30
	LDA.w $068C
	STA.b !RAM_PLOK_UnknownRAM0000AE
	JSR.w CODE_80849E
	JSL.l CODE_82D8D6
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_8095FD
	JSL.l CODE_828070
	JSL.l CODE_8280AC
CODE_8095FD:
	JSR.w CODE_809B5F
	JSR.w CODE_80A62E
	JSR.w CODE_80D934
	JSR.w CODE_80B26A
	JSR.w CODE_80C6DC
	JSR.w CODE_80BF5B
	JSR.w CODE_80B7D7
	JSR.w CODE_80B918
	JSL.l CODE_828857
	JSL.l CODE_828E4D
	JSL.l CODE_82B76D
	JSL.l CODE_82C1F3
	JSL.l CODE_82CE13
	JSL.l CODE_82D5F4
	JSL.l CODE_82DEB1
	JSL.l CODE_82E092
	JSR.w CODE_809B9D
	JSL.l CODE_809F27
	JSR.w CODE_80A20C
	JSR.w CODE_8099BF
	BCS.b CODE_809647
	JMP.w CODE_809742

CODE_809647:
	PLX
	DEX
	BNE.b CODE_8095D8
CODE_80964B:
	STZ.w $0766
	JSR.w CODE_80F8FC
	SEP.b #$20
	STZ.w !REGISTER_ColorMathSelectAndEnable
	REP.b #$20
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_809685
	JSR.w CODE_808448
	STZ.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	JSL.l CODE_809FE0
	%PLOK_WriteIndependantTextString($03, $05, !Text_Layer_3, !Text_Palette_0, RaceLost, CODE_80A457)
	LDA.w #$5D80
	STA.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
	LDA.w #$0064
	STA.w $084C
CODE_809685:
	JSR.w CODE_80B26A
	PLA
	STA.b !RAM_PLOK_Level_LowestCameraYPosLo
	PLA
	STA.b !RAM_PLOK_Level_HighestCameraYPosLo
	PLA
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	PLA
	STA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	LDX.w #$0000
CODE_809697:
	PLA
	STA.b !RAM_PLOK_UnknownRAM00006A,x
	INX
	INX
	CPX.w #$0020
	BCC.b CODE_809697
	PLA
	STA.w !RAM_PLOK_Level_Player_YPosLo
	PLA
	STA.w !RAM_PLOK_Level_Player_XPosLo
	PLA
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	REP.b #$30
	LDA.w $0848
	ASL
	STA.b $38
	ASL
	ASL
	CLC
	ADC.b $38
	TAX
	LDA.l DATA_83DAAA+$02,x
	STA.b $06
	LDX.w #$00FE
	JSR.w CODE_80A8B5
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	BCS.b CODE_8096E4
	ASL
	STA.b $38
	ASL
	ASL
	CLC
	ADC.b $38
	TAX
	LDA.l DATA_83DAAA,x
	STA.b $06
	LDX.w #$007E
	JSR.w CODE_80A8B5
CODE_8096E4:
	STZ.w $0A12
	STZ.w $0A10
	JSR.w CODE_809B9D
	LDX.w #$0008
	JSR.w CODE_809FF9
	SEP.b #$20
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	REP.b #$30
	JSR.w CODE_80B903
	LDA.w #$003F
	STA.w $0822
	JSL.l CODE_809FE0
	JSR.w CODE_80A20C
	PLA
	STA.w $067A
CODE_809717:
	JSL.l CODE_809FE0
	LDA.w #$0000
	JSR.w CODE_80FB33
	BPL.b CODE_809717
	LDA.w #$0000
	STA.w $0676
	JSR.w CODE_80FACD
	JSR.w CODE_80B903
	JSL.l CODE_82D3CB
	STZ.w $0842
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	JMP.w CODE_808283

CODE_809742:
	REP.b #$30
	LDX.w #$0018
CODE_809747:
	PLA
	DEX
	BPL.b CODE_809747
	STZ.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	STZ.w $0A10
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81EDB5,x
	STA.w $0848
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	CMP.w #$000A
	BEQ.b +
	CMP.w #$0022
	BNE.b ++
+:
	INC.w $1800
++:
endif
	LDA.w #$0012
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_WriteIndependantTextString($02, $08, !Text_Layer_3, !Text_Palette_1, SecretWarp, CODE_80A457)
endif
	LDA.w #$0096
CODE_80976E:
	PHA
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDA.b $09
	BIT.w #$0008
	BEQ.b CODE_809788
	%PLOK_WriteIndependantTextString($02, $08, !Text_Layer_3, !Text_Palette_1, SecretWarp, CODE_80A457)
	BRA.b CODE_809791

CODE_809788:
	LDX.w #$5D00
	STX.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
CODE_809791:
endif
	LDA.b $09
	AND.w #$000F
	BNE.b CODE_80979B
	JSR.w CODE_80C7A3
CODE_80979B:
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	PLA
	DEC
	BNE.b CODE_80976E
	LDA.w #$0001
	STA.w $076E
	JSR.w CODE_809F96
	JMP.w CODE_808122

CODE_8097B2:
	REP.b #$30
	STZ.w $0742
	STZ.w $0744
	STZ.w $0746
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	JSR.w CODE_80B903
	JSR.w CODE_80B259
	LDA.w #$003F
	STA.w $0822
	JSL.l CODE_809FE0
	LDA.w $067A
	PHA
	JSR.w CODE_80F7D2
	JSR.w CODE_80F922
	SEP.b #$20
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	STA.w !REGISTER_SubScreenLayers
	STA.w !REGISTER_SubScreenWindowMask
	LDA.b #$00
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.b #$82
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.w $0848
	ASL
	CLC
	ADC.w $0848
	TAX
	LDA.b #$82
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.w DATA_81EF05,x
	STA.w !REGISTER_FixedColorData
	LDA.w DATA_81EF05+$01,x
	STA.w !REGISTER_FixedColorData
	LDA.w DATA_81EF05+$02,x
	STA.w !REGISTER_FixedColorData
	LDA.b #$80
	STA.w $067A
	LDA.b #$80
	STA.w $067B
	JSL.l CODE_809FE0
	REP.b #$20
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_8281B5
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	PHA
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	PHA
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	PHA
	LDX.w #$001E
CODE_809856:
	LDA.b !RAM_PLOK_UnknownRAM00006A,x
	PHA
	DEX
	DEX
	BPL.b CODE_809856
	LDA.w $0848
	ASL
	ASL
	TAX
	LDA.w DATA_81EB15,x
	STA.b !RAM_PLOK_UnknownRAM00006A
	LDA.w DATA_81EB15+$02,x
	STA.b !RAM_PLOK_UnknownRAM00006C
	JSR.w CODE_809A0F
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$0080
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0070
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	PHA
	LDA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	PHA
	LDA.b !RAM_PLOK_Level_HighestCameraYPosLo
	PHA
	LDA.b !RAM_PLOK_Level_LowestCameraYPosLo
	PHA
	LDA.w $0848
	ASL
	ASL
	ASL
	TAX
	LDA.w DATA_81EBF5,x
	STA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	LDA.w DATA_81EBF5+$02,x
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	LDA.w DATA_81EBF5+$04,x
	STA.b !RAM_PLOK_Level_HighestCameraYPosLo
	LDA.w DATA_81EBF5+$06,x
	STA.b !RAM_PLOK_Level_LowestCameraYPosLo
	JSL.l CODE_809FE0
	JSR.w CODE_80A20C
	STZ.b $09
	LDA.w #$003F
CODE_8098B5:
	PHA
	INC.b $09
	JSL.l CODE_828857
	REP.b #$30
	PLA
	DEC
	BNE.b CODE_8098B5
	JSR.w CODE_80FACD
	LDA.w #$00A0
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81EE25,x
	TAX
CODE_8098D4:
	JSL.l CODE_809FE0
	REP.b #$30
	LDA.w $068C
	STA.b !RAM_PLOK_UnknownRAM0000AE
	JSR.w CODE_80849E
	JSL.l CODE_82D8D6
	JSR.w CODE_809B5F
	JSR.w CODE_80A62E
	JSR.w CODE_80D934
	JSR.w CODE_80B26A
	JSR.w CODE_80C6DC
	JSR.w CODE_80C765
	JSR.w CODE_80BF5B
	JSR.w CODE_80B7D7
	JSR.w CODE_80B918
	JSL.l CODE_828857
	JSL.l CODE_828E4D
	JSL.l CODE_82B76D
	JSL.l CODE_82C1F3
	JSL.l CODE_82CE13
	JSL.l CODE_82D5F4
	JSL.l CODE_82DB4E
	JSL.l CODE_82DEB1
	JSL.l CODE_82E092
	JSR.w CODE_809B9D
	JSL.l CODE_809F27
	JSR.w CODE_80A20C
	JSR.w CODE_8099BF
	BCC.b CODE_80993B
	LDA.w $0766
	BNE.b CODE_80993B
	BRA.b CODE_8098D4

CODE_80993B:
	STZ.w $0766
	JSR.w CODE_80F8D6
	SEP.b #$20
	STZ.w !REGISTER_ColorMathSelectAndEnable
	REP.b #$20
	PLA
	STA.b !RAM_PLOK_Level_LowestCameraYPosLo
	PLA
	STA.b !RAM_PLOK_Level_HighestCameraYPosLo
	PLA
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	PLA
	STA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	LDX.w #$0000
CODE_809957:
	PLA
	STA.b !RAM_PLOK_UnknownRAM00006A,x
	INX
	INX
	CPX.w #$0020
	BCC.b CODE_809957
	PLA
	STA.w !RAM_PLOK_Level_Player_YPosLo
	PLA
	STA.w !RAM_PLOK_Level_Player_XPosLo
	PLA
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	STZ.w $0A10
	JSR.w CODE_809B9D
	LDX.w #$0008
	JSR.w CODE_809FF9
	SEP.b #$20
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	REP.b #$30
	JSR.w CODE_80B903
	JSL.l CODE_82D3CB
	LDA.w #$003F
	STA.w $0822
	JSL.l CODE_809FE0
	JSR.w CODE_80A20C
	PLA
	STA.w $067A
CODE_8099A1:
	JSL.l CODE_809FE0
	LDA.w #$0000
	JSR.w CODE_80FB33
	BPL.b CODE_8099A1
	JSR.w CODE_80FACD
	STZ.w $0842
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	JMP.w CODE_808283

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

CODE_8099BF:
	LDA.w $0A10
	CMP.w #$0002
	BEQ.b CODE_8099D6
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_8099D6
	LDA.w $08F4
	CMP.w #$0060
	BCC.b CODE_8099D6
	CLC
	RTS

CODE_8099D6:
	LDA.w $0848
	ASL
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w DATA_81EA39,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_809A0E
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_809A00
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w DATA_81EA39+$02,x
	CLC
	ADC.w #$0040
	CMP.w #$0080
	RTS

CODE_809A00:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w DATA_81EA39+$02,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
CODE_809A0E:
	RTS

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

CODE_809A0F:
	REP.b #$30
	LDX.w #$000A
CODE_809A14:
	STZ.b !RAM_PLOK_UnknownRAM00007E,x
	DEX
	DEX
	BPL.b CODE_809A14
	LDA.b !RAM_PLOK_UnknownRAM00006A
	STZ.b !RAM_PLOK_UnknownRAM00007A
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM00006E
	STA.b !RAM_PLOK_UnknownRAM000072
	LDA.b !RAM_PLOK_UnknownRAM00006C
	STZ.b !RAM_PLOK_UnknownRAM00007C
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM000070
	STA.b !RAM_PLOK_UnknownRAM000074
	LDA.b !RAM_PLOK_UnknownRAM000070
	AND.w #$0003
	ASL
	ASL
	STA.b !RAM_PLOK_UnknownRAM000084
	LDA.b !RAM_PLOK_UnknownRAM00008E
	BPL.b CODE_809A48
	LDA.w #$FFFE
	STA.b !RAM_PLOK_UnknownRAM000072
	STZ.b !RAM_PLOK_UnknownRAM000074
	BRA.b CODE_809A52

CODE_809A48:
	DEC
	TAY
CODE_809A4A:
	LSR.b !RAM_PLOK_UnknownRAM000072
	LSR.b !RAM_PLOK_UnknownRAM000074
	DEY
	DEY
	BPL.b CODE_809A4A
CODE_809A52:
	RTS

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

CODE_809A53:
	PHP
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_809A63
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	BCC.b CODE_809A8B
endif
CODE_809A63:
	ASL
	TAX
	LDA.w DATA_81B39E,x
	STA.b $3E
	LDA.w $0848
	ASL
	ASL
	ASL
	TAX
	PHX
	LDY.w PLOK_LevelNameTable,x
	LDA.w PLOK_LevelNameTable+$02,x
	TAX
	LDA.b $3E
	JSR.w CODE_80A457
	PLX
	LDY.w PLOK_LevelNameTable+$04,x
	LDA.w PLOK_LevelNameTable+$06,x
	TAX
	LDA.b $3E
	JSR.w CODE_80A457
CODE_809A8B:
	PLP
	RTS

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

; Note: Seems to be the routine that handles the Legacy Island title card.

CODE_809A8D:
	REP.b #$30
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E222
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b ++
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b ++
endif
	SEP.b #$20
	LDX.w #$5C21
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B1B0
	STY.b $38
	LDA.b #PLOK_LegacyIslandTitleCardData_DATA_81B1B0>>16
	STA.b $3A
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B19C
	JSR.w CODE_80A1A6
	SEP.b #$20
	LDX.w #$5C2E
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B1CA
	STY.b $38
	LDA.b #PLOK_LegacyIslandTitleCardData_DATA_81B1CA>>16
	STA.b $3A
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B19C
	JSR.w CODE_80A1A6
	SEP.b #$20
	LDX.w #$5C22
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B1F8
	STY.b $38
	LDA.b #PLOK_LegacyIslandTitleCardData_DATA_81B1F8>>16
	STA.b $3A
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B1E4
	JSR.w CODE_80A1A6
	SEP.b #$20
	LDX.w #$5DA2
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B210
	STY.b $38
	LDA.b #PLOK_LegacyIslandTitleCardData_DATA_81B210>>16
	STA.b $3A
	LDY.w #PLOK_LegacyIslandTitleCardData_DATA_81B1E4
	JSR.w CODE_80A1A6
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	BRA.b +

++
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.b #$00
	STA.w !REGISTER_CGRAMAddress
	LDA.b #$82
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.b #$7D
	STA.w !REGISTER_WriteToCGRAMPort
+
else
	REP.b #$30
	LDA.w $0848
	ASL
	ASL
	ASL
	TAX
	LDY.w PLOK_LevelNameTable+$04,x
	LDA.w PLOK_LevelNameTable+$06,x
	TAX
	LDA.w #$0020
	JSR.w CODE_80A457
	%PLOK_WriteIndependantTextString($03, $04, !Text_Layer_3, !Text_Palette_0, WorldName_Legacy, CODE_80A457)
	%PLOK_WriteIndependantTextString($06, $07, !Text_Layer_3, !Text_Palette_0, WorldName_Island, CODE_80A457)
	JSL.l CODE_809FE0
endif
	SEP.b #$20
	LDA.b #$04
	STA.b !RAM_PLOK_UnknownRAM0000AA
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_809FBB
	REP.b #$30
	JSR.w CODE_809A53
endif
	REP.b #$30
	LDX.w #$0064
CODE_809B2D:
	JSL.l CODE_809FE0
	JSR.w CODE_809B41
	DEX
	BPL.b CODE_809B2D
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_809F96
else
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
endif
	REP.b #$30
	RTS

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

CODE_809B41:
	PHP
	REP.b #$20
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_809B5D
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_809B5D
	SEP.b #$20
	LDA.b $09
	AND.b #$04
	CLC
	ADC.b #$08
	STA.w !REGISTER_ScreenDisplayRegister
CODE_809B5D:
	PLP
	RTS

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

CODE_809B5F:
	PHP
	REP.b #$30
	LDA.w $084C
	BEQ.b CODE_809B8E
	DEC.w $084C
	CMP.w #$0001
	BNE.b CODE_809B8E
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E391
else
	LDA.w $0848
	ASL
	ASL
	ASL
	TAX
	LDA.w PLOK_LevelNameTable+$02,x
	AND.w #$FFE0
	STA.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
	LDA.w PLOK_LevelNameTable+$06,x
	AND.w #$FFE0
	STA.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
endif
CODE_809B8E:
	PLP
	RTS

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

CODE_809B90:
	LDY.w #$001F
	LDA.w #$2180
CODE_809B96:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEY
	BPL.b CODE_809B96
	RTS

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

CODE_809B9D:
	PHP
	REP.b #$30
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_809BB6
	LDA.w $084E
	INC
	CMP.w $0850
	BCC.b CODE_809BB3
	LDA.w #$0000
CODE_809BB3:
	STA.w $084E
CODE_809BB6:
	LDA.w $0A12
	BEQ.b CODE_809BD3
	LDA.w $084E
	ASL
	TAX
	LDA.w DATA_81EA2D,x
	XBA
	ASL
	ASL
	CLC
	ADC.w #PLOK_UncompressedGFX_AnimatedTiles_CloudyBonusLevel
	STA.b !RAM_PLOK_UnknownRAM000094
	LDA.w #(PLOK_UncompressedGFX_AnimatedTiles_CloudyBonusLevel)>>16
	STA.b !RAM_PLOK_UnknownRAM000096
	BRA.b CODE_809BF2

CODE_809BD3:
	LDA.w $0848
	ASL
	CLC
	ADC.w $0848
	TAY
	LDA.w $084E
	ASL
	TAX
	LDA.w DATA_81EA2D,x
	XBA
	ASL
	ASL
	CLC
	ADC.w DATA_81E97C,y
	STA.b !RAM_PLOK_UnknownRAM000094
	LDA.w DATA_81E97C+$02,y
	STA.b !RAM_PLOK_UnknownRAM000096
CODE_809BF2:
	LDX.w $07EE
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_809C0B
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_809C0B
	CPX.w #!Define_PLOK_LevelID_LegacyIslandLogTrail
	BCS.b CODE_809C0B
	LDA.w DATA_81A9DA,x
	TAX
CODE_809C0B:
	LDA.w DATA_81A9EC,x
	STA.b !RAM_PLOK_UnknownRAM000098
	SEP.b #$20
	LDA.b #PLOK_UncompressedGFX_Bank87>>16
	STA.b !RAM_PLOK_UnknownRAM00009A
	REP.b #$20
	LDX.w $07F0
	LDA.w DATA_81AA4C,x
	STA.b !RAM_PLOK_UnknownRAM00009C
	SEP.b #$20
	LDA.b #PLOK_UncompressedGFX_Bank86>>16
	STA.b !RAM_PLOK_UnknownRAM00009E
	REP.b #$20
	LDX.w $07F2
	LDA.w DATA_81AA9C,x
	STA.b !RAM_PLOK_UnknownRAM0000A0
	SEP.b #$20
	LDA.b #PLOK_UncompressedGFX_Bank88>>16
	STA.b !RAM_PLOK_UnknownRAM0000A2
	REP.b #$20
	LDA.w !RAM_PLOK_Level_Player_ShellCounter
	LSR
	LSR
	AND.w #$00FE
	TAX
	LDA.w DATA_81A9A6,x
	STA.b !RAM_PLOK_UnknownRAM0000A4
	SEP.b #$20
	LDA.b #DATA_85D7AA>>16
	STA.b !RAM_PLOK_UnknownRAM0000A6
	PLP
	RTS

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

CODE_809C4E:
	REP.b #$20
	LDA.w $07EC
	BEQ.b CODE_809C58
	JSR.w CODE_80A103
CODE_809C58:
	SEP.b #$30
	LDA.b $09
	AND.b #$03
	BNE.b CODE_809C92
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b !RAM_PLOK_UnknownRAM000096
	STA.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$1000
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM000094
	STA.w DMA[$01].SourceLo
	LDA.w #$0400
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	RTS

CODE_809C92:
	LDA.b $09
	AND.b #$03
	CMP.b #$01
	BNE.b CODE_809CA1
	JSR.w CODE_809D8D
	JSR.w CODE_809E1B
	RTS

CODE_809CA1:
	LDA.b $09
	AND.b #$03
	CMP.b #$02
	BNE.b CODE_809CAD
	JSR.w CODE_809CFF
	RTS

CODE_809CAD:							; Note: This updates the plok head in the top center of the HUD.
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	REP.b #$20
	LDA.w $0906
	BNE.b CODE_809CFE
endif
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b !RAM_PLOK_UnknownRAM0000A6
	STA.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$5130
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM0000A4
	STA.w DMA[$01].SourceLo
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$51B0
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM0000A4
	CLC
	ADC.w #$0100
	STA.w DMA[$01].SourceLo
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
CODE_809CFE:
	RTS

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

CODE_809CFF:
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b !RAM_PLOK_UnknownRAM0000A2
	STA.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$6080
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM0000A0
	STA.w DMA[$01].SourceLo
	LDA.w #$0100
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6180
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM0000A0
	CLC
	ADC.w #$0200
	STA.w DMA[$01].SourceLo
	LDA.w #$0100
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6280
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM0000A0
	CLC
	ADC.w #$0400
	STA.w DMA[$01].SourceLo
	LDA.w #$0100
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6380
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM0000A0
	CLC
	ADC.w #$0600
	STA.w DMA[$01].SourceLo
	LDA.w #$0100
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	RTS

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

CODE_809D8D:
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b !RAM_PLOK_UnknownRAM00009E
	STA.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$6000
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM00009C
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6100
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM00009C
	CLC
	ADC.w #$0200
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6200
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM00009C
	CLC
	ADC.w #$0400
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6300
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM00009C
	CLC
	ADC.w #$0600
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	RTS

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

CODE_809E1B:
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b !RAM_PLOK_UnknownRAM00009A
	STA.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$6040
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM000098
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6140
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM000098
	CLC
	ADC.w #$0200
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6240
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM000098
	CLC
	ADC.w #$0400
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$6340
	STA.w !REGISTER_VRAMAddressLo
	LDA.b !RAM_PLOK_UnknownRAM000098
	CLC
	ADC.w #$0600
	STA.w DMA[$01].SourceLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	RTS

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

CODE_809EA9:
	REP.b #$30
	LDX.w #$00FE
CODE_809EAE:
	STZ.b $00,x
	DEX
	DEX
	BPL.b CODE_809EAE
	LDX.w #$15FE
CODE_809EB7:
	STZ.w PLOK_Global_OAMBuffer[$00].XDisp,x
	DEX
	DEX
	BPL.b CODE_809EB7
	RTS

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

CODE_809EBF:
	REP.b #$30
	LDX.w #$07FE
CODE_809EC4:
	STZ.w !RAM_PLOK_Level_CurrentEnemyHPLo,x
	DEX
	DEX
	BPL.b CODE_809EC4
	RTS

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

CODE_809ECC:
	PHP
	SEP.b #$30
	LDA.b #$02
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.b #$02
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.b #$11
	STA.w !REGISTER_SubScreenLayers
	LDA.b #$E0
	STA.w !REGISTER_FixedColorData
	PLP
	RTS

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

CODE_809EE5:
	PHP
	SEP.b #$20
	REP.b #$10
	LDA.b #$02
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.b #$14
	LDA.b #$00
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.b #$00
	STA.w !REGISTER_FixedColorData
	LDA.b #$00
	STA.w !REGISTER_SubScreenLayers
	LDX.w #$001F
	LDA.b #$AA
CODE_809F05:
	STA.w PLOK_Global_UpperOAMBuffer[$00].Slot,x
	DEX
	BPL.b CODE_809F05
	REP.b #$30
	LDY.w #$0038
	LDX.w #$0426
CODE_809F13:
	LDA.w #$FFFF
	STA.b $00,x
	STZ.b $08,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	BPL.b CODE_809F13
	PLP
	RTS

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

DATA_809F25:
	db $01,$FF

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

CODE_809F27:
	PHX
	PHP
	SEP.b #$30
	ROR.b $35
	LDA.b $34
	PHA
	ROR
	STA.b $35
	LDA.b $33
	TAX
	ASL
	ASL
	ASL
	ASL
	STA.b $34
	LDA.b $32
	STA.b $33
	LSR
	LSR
	LSR
	LSR
	ORA.b $34
	EOR.b $35
	STX.b $34
	LDX.b $31
	STX.b $32
	STA.b $31
	PLA
	STA.b $35
	PLP
	PLX
	LDA.b $31
	RTL

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

CODE_809F58:
	PHP
	SEP.b #$30
	LDX.b #$04
CODE_809F5D:
	LDA.w DATA_81DEFA,x
	STA.b $31,x
	DEX
	BPL.b CODE_809F5D
	PLP
	RTS

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

CODE_809F67:
	LDA.b #!REGISTER_OAMDataWritePort
	STA.w DMA[$00].Destination
	STZ.w DMA[$00].Parameters
	STZ.w DMA[$00].SourceBank
	STZ.w $4307								; Glitch: This writes to open bus.
	LDA.b #!SpriteGFXLocationInVRAMLo_6000|!SpriteGFXLocationInVRAMHi_Add1000|!SpriteSize_16x16_32x32
	STA.w !REGISTER_OAMSizeAndDataAreaDesignation
	RTS

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

CODE_809F7B:
	PHP
	REP.b #$20
	STZ.w !REGISTER_OAMAddressLo
	LDA.w #!RAM_PLOK_Global_OAMBuffer
	STA.w DMA[$00].SourceLo
	LDA.w #$0220
	STA.w DMA[$00].SizeLo
	SEP.b #$20
	LDA.b #$01
	STA.w !REGISTER_DMAEnable
	PLP
	RTS

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

CODE_809F96:
	PHP
	SEP.b #$20
	JSL.l CODE_809FE0
if !Define_PLOK_Global_DisableCopyDetection == !FALSE
	JSL.l CODE_8284F1
endif
	LDA.b #$00
	STA.b $09
CODE_809FA5:
	LDA.b $09
CODE_809FA7:
	CMP.b $09
	BEQ.b CODE_809FA7
	AND.b #$0F
	EOR.b #$0F
	STA.w !REGISTER_ScreenDisplayRegister
	BNE.b CODE_809FA5
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	PLP
	RTS

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

CODE_809FBB:
	PHP
	SEP.b #$20
	JSL.l CODE_809FE0
	LDA.b #$00
	STA.b $09
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
CODE_809FCE:
	LDA.b $09
CODE_809FD0:
	CMP.b $09
CODE_809FD2:
	BEQ.b CODE_809FD0
	LSR
	AND.b #$0F
	STA.w !REGISTER_ScreenDisplayRegister
	CMP.b #!ScreenDisplayRegister_MaxBrightness0F
	BNE.b CODE_809FCE
	PLP
	RTS

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

CODE_809FE0:
	PHP
	SEP.b #$20
	LDA.b $0B
CODE_809FE5:
	PHA
	JSL.l CODE_82E1AC
	PLA
	CMP.b $0B
	BEQ.b CODE_809FE5
	JSL.l CODE_828151
DATA_809FF3:
if !Define_PLOK_Global_DisableCopyDetection == !FALSE
	JSL.l CODE_828000
endif
	PLP
	RTL

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

CODE_809FF9:
	PHP
CODE_809FFA:
	JSL.l CODE_809FE0
	DEX
	BNE.b CODE_809FFA
	PLP
	RTS

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

	%ROUTINE_PLOK_VBlankRoutine(NULLROM)					; $00A003

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

CODE_80A076:
	PHP
	REP.b #$30
	JMP.w CODE_80A082				; Optimization: This can be changed to BRA.

CODE_80A07C:
	PHP
	REP.b #$30
	LDA.w #$0000
CODE_80A082:
	STX.w !REGISTER_VRAMAddressLo
	SEP.b #$10
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$30
	LDX.w #$03FF
CODE_80A091:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	BPL.b CODE_80A091
	PLP
	RTS

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

CODE_80A099:
	PHP
	SEP.b #$20
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$30
	STZ.w !REGISTER_VRAMAddressLo
	LDX.w #$0000
CODE_80A0A9:
	LDA.l $7F1000,x
	STA.w !REGISTER_WriteToVRAMPortLo
	INX
	INX
	CPX.w #$7FFF
	BCC.b CODE_80A0A9
	LDA.w #$6000
	STA.w !REGISTER_VRAMAddressLo
	LDX.w #$0000
CODE_80A0C0:
	LDA.l $7F9000,x
	STA.w !REGISTER_WriteToVRAMPortLo
	INX
	INX
	CPX.w #$3FFF
	BCC.b CODE_80A0C0
	PLP
	RTS

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

CODE_80A0D0:
	PHP
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F9000>>16)
	LDX.w #$7F9000
	LDY.w #!Define_PLOK_GFX_Sprite_Level_Global1
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7FC800>>16)
	LDX.w #$7FC800
	LDY.w #!Define_PLOK_GFX_Sprite_Level_Global2
	JSL.l CODE_87E000
	LDA.w !RAM_PLOK_Global_CurrentLevelNum
	ASL
	TAX
	LDA.l PLOK_LevelSpriteGraphics,x
	TAY
	LDX.w #$7FA400
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7FA400>>16)
	JSL.l CODE_87E000
	PLP
	RTS

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

CODE_80A103:
	REP.b #$30
	LDA.w #$7C00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81F329,x
CODE_80A113:
	CLC
	ADC.w #PLOK_UncompressedGFX_Bank85
	STA.w DMA[$01].SourceLo
	LDA.w #$0400
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$00
	STA.w !REGISTER_HDMAEnable
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	LDA.b #PLOK_UncompressedGFX_Bank85>>16
	STA.w DMA[$01].SourceBank
	STZ.w $4317							; Glitch: This writes to open bus
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	RTS

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

CODE_80A146:
	PHP
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$6A00
	LDY.w #!Define_PLOK_GFX_Sprite_Level_BobbinsBros
	JSL.l CODE_87E000
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80A172
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80A172
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$00C0
	LDY.w #!Define_PLOK_Palette_Sprite_PastBobbinsBros
	JSL.l CODE_87E000
	BRA.b CODE_80A17F

CODE_80A172:
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$00C0
	LDY.w #!Define_PLOK_Palette_Sprite_PresentBobbinsBros
	JSL.l CODE_87E000
CODE_80A17F:
	PLP
	RTL

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

CODE_80A181:
	PHP
	REP.b #$30
	LDX.w #$007F
	LDY.w #$01FC
	LDA.w #$F000
CODE_80A18D:
	STA.w PLOK_Global_OAMBuffer[$00].XDisp,y
	DEY
	DEY
	DEY
	DEY
	DEX
	BPL.b CODE_80A18D
	LDX.w #$001F
	LDA.w #$AAAA
CODE_80A19D:
	STA.w PLOK_Global_OAMBuffer[$00].XDisp,x
	DEX
	DEX
	BPL.b CODE_80A19D
	PLP
	RTS

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

CODE_80A1A6:
	PHP
	SEP.b #$20
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$30
	PHX
	LDX.w #$0000
CODE_80A1B4:
	LDA.w $0000,y
	STA.w $0748,x
	INY
	INY
	INX
	INX
	CPX.w #$0014
	BCC.b CODE_80A1B4
	DEC.w $074A
	PLX
	LDY.w #$0000
CODE_80A1CA:
	STX.w !REGISTER_VRAMAddressLo
	PHX
	LDA.w $0748
	AND.w #$7FFF
	DEC
	TAY
CODE_80A1D6:
	LDA.b [$38]
	LDX.w $0748
	BMI.b CODE_80A1F4
	LSR
	LSR
	XBA
	AND.w #$0007
	ASL
	TAX
	LDA.w $074C,x
	ASL
	ASL
	XBA
	STA.b $3C
	LDA.b [$38]
	AND.w #$E3FF
	ORA.b $3C
CODE_80A1F4:
	STA.w !REGISTER_WriteToVRAMPortLo
	INC.b $38
	INC.b $38
	DEY
	BPL.b CODE_80A1D6
	PLX
	TXA
	CLC
	ADC.w #$0020
	TAX
	DEC.w $074A
	BPL.b CODE_80A1CA
	PLP
	RTS

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

CODE_80A20C:
	PHP
	SEP.b #$20
	LDA.b #(DATA_838000>>16)&$7F
	PHA
	PLB
	REP.b #$30
	DEC.w !RAM_PLOK_Level_Player_YPosLo
	STZ.b $1B
	STZ.b $1D
	STZ.w PLOK_Global_UpperOAMBuffer[$00].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$02].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$04].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$06].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$08].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$0A].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$0C].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$0E].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$10].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$12].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$14].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$16].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$18].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$1A].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$1C].Slot
	STZ.w PLOK_Global_UpperOAMBuffer[$1E].Slot
	LDA.w #$002B
	STA.b $21
	LDX.w #$04A8
	STX.b $1F
CODE_80A256:
	LDA.b $00,x
	BMI.b CODE_80A26F
	STZ.b $2F
	LDA.b $08,x
	BPL.b CODE_80A26C
	LDA.b $09
	AND.w #$0002
	BEQ.b CODE_80A26C
	LDA.w #$0E00
	STA.b $2F
CODE_80A26C:
	JSR.w CODE_80A2CD
CODE_80A26F:
	LDA.b $1F
	CLC
	ADC.w #$000A
	STA.b $1F
	TAX
	DEC.b $21
	BPL.b CODE_80A256
	LDA.w #$000C
	STA.b $21
	LDX.w #$0426
	STX.b $1F
CODE_80A286:
	LDA.b $00,x
	BMI.b CODE_80A29F
	STZ.b $2F
	LDA.b $08,x
	BPL.b CODE_80A29C
	LDA.b $09
	AND.w #$0002
	BEQ.b CODE_80A29C
	LDA.w #$0E00
	STA.b $2F
CODE_80A29C:
	JSR.w CODE_80A2CD
CODE_80A29F:
	LDA.b $1F
	CLC
	ADC.w #$000A
	STA.b $1F
	TAX
	DEC.b $21
	BPL.b CODE_80A286
	LDX.b $1B
	CPX.w #$0200
	BEQ.b CODE_80A2C2
	LDA.w #$F000
CODE_80A2B6:
	STA.w PLOK_Global_OAMBuffer[$00].XDisp,x
	INX
	INX
	INX
	INX
	CPX.w #$0200
	BNE.b CODE_80A2B6
CODE_80A2C2:
	INC.w !RAM_PLOK_Level_Player_YPosLo
	SEP.b #$20
	LDA.b #$01
	PHA
	PLB
	PLP
	RTS

CODE_80A2CD:						; Note: Routine that draws sprite tiles
	PHP
	REP.b #$30
	LDA.b $00,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	STA.b $23
	LDA.b $02,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	STA.b $25
	LDY.b $04,x
	LDA.w DATA_838180,y
	STA.b $38
	LDA.w #$FFFF
	STA.b $3A
	CPX.w #$0426
	BNE.b CODE_80A2F4
	LDA.w $0822
	STA.b $3A
CODE_80A2F4:
	LDA.b $06,x
	STA.b $2B
	AND.w #$4000
	BNE.b CODE_80A30D
	JMP.w CODE_80A39F

CODE_80A300:
	INY
	INY
	LDA.b ($38),y
	EOR.w #$FFFF
	SEC
	SBC.w #$001F
	BRA.b CODE_80A32B

CODE_80A30D:
	LDX.b $1B
	LDY.w #$0000
	BRA.b CODE_80A318

CODE_80A314:
	INY
	INY
CODE_80A316:
	INY
	INY
CODE_80A318:
	LDA.b ($38),y
	BMI.b CODE_80A39B
	STA.b $2D
	BNE.b CODE_80A300
	INY
	INY
	LDA.b ($38),y
	EOR.w #$FFFF
	SEC
	SBC.w #$000F
CODE_80A32B:
	INY
	INY
	CLC
	ADC.b $23
	CMP.w #$0100
	BCC.b CODE_80A33D
	CMP.w #$FFC0
	BCC.b CODE_80A314
	ORA.w #$0100
CODE_80A33D:
	STA.b $27
	AND.w #$00FF
	STA.b $29
	SEC
	ROR.b $3A
	BCC.b CODE_80A314
	LDA.b ($38),y
	INY
	INY
	CLC
	ADC.b $25
	CMP.w #$00E0
	BCC.b CODE_80A35D
	CMP.w #$FFE0
	BCC.b CODE_80A316
	AND.w #$00FF
CODE_80A35D:
	XBA
	ORA.b $29
	STA.w PLOK_Global_OAMBuffer[$00].XDisp,x
	LDA.b ($38),y
	EOR.b $2B
	ORA.b $2F
	STA.w PLOK_Global_OAMBuffer[$00].Tile,x
	PHX
	PHY
	SEP.b #$30
	LDX.b $1D
	LDA.b $28
	BEQ.b CODE_80A379
	LDA.w DATA_838080,x
CODE_80A379:
	LDY.b $2D
	BEQ.b CODE_80A380
	ORA.w DATA_838100,x
CODE_80A380:
	LDY.w DATA_838000,x
	ORA.w PLOK_Global_UpperOAMBuffer[$00].Slot,y
	STA.w PLOK_Global_UpperOAMBuffer[$00].Slot,y
	INC.b $1D
	REP.b #$30
	PLY
	PLX
	INX
	INX
	INX
	INX
	CPX.w #$0200
	BCS.b CODE_80A39B
	JMP.w CODE_80A316

CODE_80A39B:
	STX.b $1B
	PLP
	RTS

CODE_80A39F:
	LDX.b $1B
	LDY.w #$0000
	BRA.b CODE_80A3AA

CODE_80A3A6:
	INY
	INY
CODE_80A3A8:
	INY
	INY
CODE_80A3AA:
	LDA.b ($38),y
	BMI.b CODE_80A421
	INY
	INY
	STA.b $2D
	LDA.b ($38),y
	INY
	INY
	CLC
	ADC.b $23
	CMP.w #$0100
	BCC.b CODE_80A3C6
	CMP.w #$FFC0
	BCC.b CODE_80A3A6
	ORA.w #$0100
CODE_80A3C6:
	STA.b $27
	AND.w #$00FF
	STA.b $29
	SEC
	ROR.b $3A
	BCC.b CODE_80A3A6
	LDA.b ($38),y
	INY
	INY
	CLC
	ADC.b $25
	CMP.w #$00E0
	BCC.b CODE_80A3E6
	CMP.w #$FFE0
	BCC.b CODE_80A3A8
	AND.w #$00FF
CODE_80A3E6:
	XBA
	ORA.b $29
	STA.w PLOK_Global_OAMBuffer[$00].XDisp,x
	LDA.b ($38),y
	EOR.b $2B
	ORA.b $2F
	STA.w PLOK_Global_OAMBuffer[$00].Tile,x
	PHX
	PHY
	SEP.b #$30
	LDX.b $1D
	LDA.b $28
	BEQ.b CODE_80A402
	LDA.w DATA_838080,x
CODE_80A402:
	LDY.b $2D
	BEQ.b CODE_80A409
	ORA.w DATA_838100,x
CODE_80A409:
	LDY.w DATA_838000,x
	ORA.w PLOK_Global_UpperOAMBuffer[$00].Slot,y
	STA.w PLOK_Global_UpperOAMBuffer[$00].Slot,y
	INC.b $1D
	REP.b #$30
	PLY
	PLX
	INX
	INX
	INX
	INX
	CPX.w #$0200
	BCC.b CODE_80A3A8
CODE_80A421:
	STX.b $1B
	PLP
	RTS

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

CODE_80A425:
	PHP
	REP.b #$10
	STX.w !REGISTER_VRAMAddressLo
	SEP.b #$20
	LDA.b #$81
	STA.w !REGISTER_VRAMAddressIncrementValue
CODE_80A432:
	LDA.w $0000,y
	CMP.b #$FF
	BEQ.b CODE_80A455
	ASL
	STA.w !REGISTER_WriteToVRAMPortLo
	XBA
	LDA.b #$20
	STA.w !REGISTER_WriteToVRAMPortHi
	XBA
	INC
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$20
	STA.w !REGISTER_WriteToVRAMPortHi
	INX
	STX.w !REGISTER_VRAMAddressLo
	INY
	JMP.w CODE_80A432

CODE_80A455:
	PLP
	RTL

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

CODE_80A457:
	PHP
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
else
	SEP.b #$20
endif
	REP.b #$30
	STA.b !RAM_PLOK_UnknownRAM0000AB
	STX.w !REGISTER_VRAMAddressLo
	STY.b $38
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	SEP.b #$20
	PHB
	LDA.w $1814
	AND.b #$03
	BNE.b +
	LDA.b #$1F
	BRA.b ++

+:
	ASL
	ASL
++:
	PHA
	PLB
endif
	SEP.b #$30
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	REP.b #$30
	LDY.w #$0000
-:
	JSL.l CODE_809FE0
	LDA.b $09
	AND.w #$0003
	BNE.b -
	LDA.b ($38),y
	CMP.w #$FFFF
	BEQ.b CODE_80A486
	JSL.l CODE_82E4ED
	INY
	INY
	JMP.w -
else
	LDY.b #$00
CODE_80A46C:
	LDA.b ($38),y
	CMP.b #$FF
	BEQ.b CODE_80A486
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData,x
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData+$01,x
	ORA.b !RAM_PLOK_UnknownRAM0000AB
	STA.w !REGISTER_WriteToVRAMPortHi
	INY
	JMP.w CODE_80A46C
endif

CODE_80A486:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PLB
endif
	PLP
	RTS

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

; Note: This routine is called by PLOK_WriteIndependantTextString1 macros.

CODE_80A488:
	PHP
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	SEP.b #$20						; Optimization: Pointless instruction
endif
	REP.b #$30
	STA.b !RAM_PLOK_UnknownRAM0000AB
	STX.w !REGISTER_VRAMAddressLo
	STY.b $38
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	SEP.b #$20
	PHB
	LDA.w $1814
	AND.b #$03
	BNE.b +
	LDA.b #$1F
	BRA.b ++

+:
	ASL
	ASL
++:
	PHA
	PLB
endif
	SEP.b #$30
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDY.b #$00
CODE_80A49B:
	LDA.b ($38),y
	CMP.b #$FF
	BEQ.b CODE_80A4B2
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData,x
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData+$01,x
	ORA.b !RAM_PLOK_UnknownRAM0000AB
else
	CLC
	ADC.b #$80
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$01
	ORA.b !RAM_PLOK_UnknownRAM0000AB
endif
	STA.w !REGISTER_WriteToVRAMPortHi
	INY
	JMP.w CODE_80A49B					; Optimization: Replace with BRA.

CODE_80A4B2:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PLB
endif
	PLP
	RTS

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
CODE_80A4AF:
	PHP
	REP.b #$30
	STA.b !RAM_PLOK_UnknownRAM0000AB
	STX.w !REGISTER_VRAMAddressLo
	STY.b $38
	SEP.b #$30
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDY.b #$00
-:
	LDA.b ($38),y
	CMP.b #$FF
	BEQ.b +
	CLC
	ADC.b #$80
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$01
	ADC.b !RAM_PLOK_UnknownRAM0000AB
	STA.w !REGISTER_WriteToVRAMPortHi
	INY
	JMP.w -

+:
	PLP
	RTS
endif

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

CODE_80A4B4:
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80A4CA
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80A4CA
endif
	JSR.w CODE_809A8D
	JSL.l CODE_809FE0
CODE_80A4CA:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	REP.b #$30
endif
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
	LDX.w #$5C21
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	STX.w !REGISTER_VRAMAddressLo
	LDX.w #$0008
-:
	LDA.w PLOK_JapaneseTextStrings_Score,x
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	DEX
	BPL.b -
else
	%PLOK_HandlePrimaryTextPointer(Score, !Text_InCode)
	%PLOK_SetTextTileProperties(!Text_Palette_1, !Text_InCode)
	JSR.w CODE_80A457
endif
	LDA.w #$5DA1
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$2660
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w $076A
	BEQ.b CODE_80A501
	LDA.w #$5DA8
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81F407,x
	STA.w !REGISTER_WriteToVRAMPortLo
CODE_80A501:
	JSL.l CODE_80A50C
	JSR.w CODE_80A5DD
	JSR.w CODE_80A62E
	RTS

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

CODE_80A50C:
	PHP
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	LDA.w #$5C2B
	STA.w !REGISTER_VRAMAddressLo
	LDY.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	LDX.w #$0006
CODE_80A521:
	LDA.w DATA_81B0F4,x
	CPY.w #$0000
	BEQ.b CODE_80A52E
	DEY
	SEC
	SBC.w #$0400
CODE_80A52E:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	DEX
	BPL.b CODE_80A521
	PLP
	RTL

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

CODE_80A537:
	REP.b #$30
	LDA.w #$0012
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSL.l CODE_809FE0
	%PLOK_WriteIndependantTextString($03, $05, !Text_Layer_3, !Text_Palette_1, Plokontinue, CODE_80A457)
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	LDA.w #$0050
	STA.w $0C24
	LDA.w #$0050
	STA.w $0C26
	LDX.w #$0000
	LDY.w #$0001
CODE_80A57C:
	JSL.l CODE_809FE0
	PHX
	PHY
	LDA.w $0A10
	CMP.w #$0001
	BEQ.b CODE_80A58D
	JSR.w CODE_80C765
CODE_80A58D:
	JSR.w CODE_80A62E
	JSL.l CODE_82D5F4
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	PLY
	PLX
	DEY
	BNE.b CODE_80A57C
	LDA.w DATA_81DBF8,x
	CMP.w #$FFFF
	BEQ.b CODE_80A5C7
	STA.w $0C20
	INX
	INX
	LDA.w DATA_81DBF8,x
	STA.w $0C22
	INX
	INX
	LDA.w DATA_81DBF8,x
	STA.w $0C28
	INX
	INX
	LDY.w DATA_81DBF8,x
	INX
	INX
	JSL.l CODE_82D5AB
	BRA.b CODE_80A57C

CODE_80A5C7:
	JSL.l CODE_809FE0
	JSL.l CODE_80A50C
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E391
else
	LDX.w #$5CA0
	STX.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
endif
	RTL

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

CODE_80A5DD:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_CurrentLifeCountLo
	CMP.w #$0005
	BCC.b CODE_80A615
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
else
	CMP.w #$000A
	BCC.b CODE_80A5F2
	LDA.w #$0009
	STA.w !RAM_PLOK_Level_Player_CurrentLifeCountLo
endif
CODE_80A5F2:
	LDA.w #$5C4B
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$2180
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w !RAM_PLOK_Level_Player_CurrentLifeCountLo
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	CMP.w #$000A
	BCC.b +
	LDA.w #$0009
+:
endif
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData+$02,x
	ORA.w #$2400
	STA.w !REGISTER_WriteToVRAMPortLo
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w #$2180
else
	LDA.w #$2204
endif
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$0001
CODE_80A615:
	STA.b $38
	LDA.w #$5C4F
	SEC
	SBC.b $38
	STA.w !REGISTER_VRAMAddressLo
	LDX.b $38
	BEQ.b CODE_80A62D
	LDA.w #$2660
CODE_80A627:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	BNE.b CODE_80A627
CODE_80A62D:
	RTS

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

CODE_80A62E:
	PHP
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	CMP.w !RAM_PLOK_Level_Player_CurrentHPLo
	BEQ.b CODE_80A6B3
	BCS.b CODE_80A65B
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	SEC
	SBC.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	CMP.w #$0003
	BCS.b CODE_80A64F
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	STA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	BRA.b CODE_80A679

CODE_80A64F:
	LDA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	CLC
	ADC.w #$0003
	STA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	BRA.b CODE_80A679

CODE_80A65B:
	LDA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	SEC
	SBC.w !RAM_PLOK_Level_Player_CurrentHPLo
	CMP.w #$0003
	BCS.b CODE_80A66F
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	STA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	BRA.b CODE_80A679

CODE_80A66F:
	LDA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	SEC
	SBC.w #$0003
	STA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
CODE_80A679:
	LDA.w #$5DA2
	STA.w !REGISTER_VRAMAddressLo
	LDA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.b $38
	TAX
	BEQ.b CODE_80A695
	LDA.w #$2240
CODE_80A68F:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	BNE.b CODE_80A68F
CODE_80A695:
	LDA.b $38
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $38
	LDA.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	CMP.b $38
	BEQ.b CODE_80A6B3
	SEC
	SBC.b $38
	LSR
	LSR
	LSR
	ASL
	TAX
	LDA.w DATA_81B0EC,x
	STA.w !REGISTER_WriteToVRAMPortLo
CODE_80A6B3:
	LDA.w $076A
	AND.w #$0001
	BEQ.b CODE_80A6BE
	JSR.w CODE_80A717
CODE_80A6BE:
	LDA.w #$5C28
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$2226
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCS.b CODE_80A715
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	BRA.b CODE_80A715
endif
CODE_80A6D2:
	LDX.w #$000E
CODE_80A6D5:
	LDA.w DATA_81F479,x
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$2180
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	DEX
	BPL.b CODE_80A6D5
	LDA.w $09EA
	CMP.w #$00C8
	BCS.b CODE_80A715
	LDA.w $0A10
	BNE.b CODE_80A715
	LDA.w $09E8
	BEQ.b CODE_80A715
	DEC
	ASL
	TAX
	LDA.w DATA_81F479,x
	STA.w !REGISTER_VRAMAddressLo
	LDA.b $09
	AND.w #$0004
	TAY
	LDA.w DATA_81F489,x
	CPY.w #$0000
	BEQ.b CODE_80A712
	SEC
	SBC.w #$0C00
CODE_80A712:
	STA.w !REGISTER_WriteToVRAMPortLo
CODE_80A715:
	PLP
	RTS

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

CODE_80A717:
	LDA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	CMP.w !RAM_PLOK_Level_CurrentEnemyHPLo
	BEQ.b CODE_80A79C
	BCS.b CODE_80A741
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	SEC
	SBC.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	CMP.w #$0003
	BCS.b CODE_80A735
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	STA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	BRA.b CODE_80A75F

CODE_80A735:
	LDA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	CLC
	ADC.w #$0003
	STA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	BRA.b CODE_80A75F

CODE_80A741:
	LDA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	SEC
	SBC.w !RAM_PLOK_Level_CurrentEnemyHPLo
	CMP.w #$0003
	BCS.b CODE_80A755
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	STA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	BRA.b CODE_80A75F

CODE_80A755:
	LDA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	SEC
	SBC.w #$0003
	STA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
CODE_80A75F:
	LDA.w #$5DA9
	STA.w !REGISTER_VRAMAddressLo
	LDA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.b $38
	TAX
	BEQ.b CODE_80A77B
	LDA.w #$2640
CODE_80A775:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	BNE.b CODE_80A775
CODE_80A77B:
	LDA.b $38
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $38
	LDA.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	CMP.b $38
	BEQ.b CODE_80A79C
	SEC
	SBC.b $38
	LSR
	LSR
	LSR
	ASL
	TAX
	LDA.w DATA_81B0EC,x
	ORA.w #$0400
	STA.w !REGISTER_WriteToVRAMPortLo
CODE_80A79C:
	RTS

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

CODE_80A79D:
	REP.b #$30
	PHY
	STA.b $06
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	SEC
	SBC.b $06
	BPL.b CODE_80A7AD
	LDA.w #$0000
CODE_80A7AD:
	STA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	BNE.b CODE_80A82E
	LDA.w $0EB4
	BNE.b CODE_80A82E
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandBobbinsBros
	BNE.b CODE_80A7C7
	LDA.w #$0002
	STA.w $0EB4
	BRA.b CODE_80A82E

CODE_80A7C7:
	LDA.w #$00B4
	STA.w $0EB6
	INC.w $0EB4
	PHX
	JSL.l CODE_809FE0
	LDA.w #$7E00
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$2C00
	JSR.w CODE_80A113
	REP.b #$30
	PLX
	PHX
	LDA.b $00,x
	PHA
	LDA.b $02,x
	PHA
	LDX.w #$061A
	PLA
	STA.b $02,x
	PLA
	STA.b $00,x
	JSL.l CODE_8283CF
	PLX
	LDA.b $00,x
	SEC
	SBC.w #$0010
	STA.w $0C1C
	LDA.b $02,x
	SEC
	SBC.w #$0008
	STA.w $0C1E
	LDA.w #$0011
	STA.w $0C1A
	STZ.w $0C20
	STZ.w $0C22
	STZ.w $0C24
	LDA.w #$00B4
	STA.w $0C26
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	JSL.l CODE_809FE0
CODE_80A82E:
	PLY
	RTL

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

CODE_80A830:
	PHP
	REP.b #$30
	LDA.w $0848
	ASL
	TAX
	LDA.l PLOK_LevelDataIndex,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	JSL.l CODE_87E000
	LDA.w $0848
	ASL
	TAX
	LDA.l PLOK_LevelBGDataIndex,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7FD000>>16)
	LDX.w #$7FD000
	JSL.l CODE_87E000
	LDA.w $0848
	ASL
	STA.b $38
	ASL
	ASL
	CLC
	ADC.b $38
	TAX
	PHX
	LDA.l DATA_83DAAA,x
	STA.b $06
	LDX.w #$007E
	JSR.w CODE_80A8B5
	PLX
	PHX
	LDA.l DATA_83DAAA+$02,x
	STA.b $06
	LDX.w #$00FE
	JSR.w CODE_80A8B5
	PLX
	PHX
	LDA.l DATA_83DAAA+$04,x
	STA.b $06
	LDX.w #$017E
	JSR.w CODE_80A8B5
	PLX
	PHX
	LDA.l DATA_83DAAA+$06,x
	STA.b $06
	LDX.w #$01FE
	JSR.w CODE_80A8B5
	PLX
	LDA.l DATA_83DAAA+$08,x
	CMP.w #$FFFF
	BEQ.b CODE_80A8B3
	STA.b $06
	LDX.w #$007E
	LDY.w #$001E
	JSR.w CODE_80A8BA
CODE_80A8B3:
	PLP
	RTS

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

CODE_80A8B5:
	REP.b #$30
	LDY.w #$007E
CODE_80A8BA:
	SEP.b #$20
	LDA.b #(DATA_83DAAA>>16)&$7F
	STA.b $08
	REP.b #$20
CODE_80A8C2:
	LDA.b [$06],y
	STA.l $7E2000,x
	DEX
	DEY
	BPL.b CODE_80A8C2
	RTS

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

CODE_80A8CD:
	JSR.w CODE_80A8D8
	RTL

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

CODE_80A8D1:
	JSR.w CODE_80A924
	RTL

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

CODE_80A8D5:
	JSR CODE_80A8D8
CODE_80A8D8:
	PHP
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CMP.b !RAM_PLOK_Level_RightmostCameraXPosLo
	BCS.b CODE_80A8F7
	INC.b !RAM_PLOK_UnknownRAM00007A
	INC.b !RAM_PLOK_UnknownRAM00006A
	INC.b !RAM_PLOK_UnknownRAM00007E
	LDA.b !RAM_PLOK_UnknownRAM00008E
	BMI.b CODE_80A8F5
	LDA.b !RAM_PLOK_UnknownRAM00007A
	CMP.b !RAM_PLOK_UnknownRAM00008E
	BCC.b CODE_80A8F5
	STZ.b !RAM_PLOK_UnknownRAM00007A
	INC.b !RAM_PLOK_UnknownRAM000082
CODE_80A8F5:
	PLP
	RTS

CODE_80A8F7:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$00F0
	BCC.b CODE_80A91F
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80A91C
	LDA.w #$004D
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80A91C:
	DEC.w !RAM_PLOK_Level_Player_XPosLo
CODE_80A91F:
	PLP
	RTS

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

CODE_80A921:
	JSR.w CODE_80A924
CODE_80A924:
	PHP
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CMP.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	BCC.b CODE_80A944
	DEC.b !RAM_PLOK_UnknownRAM00007A
	DEC.b !RAM_PLOK_UnknownRAM00006A
	DEC.b !RAM_PLOK_UnknownRAM00007E
	LDA.b !RAM_PLOK_UnknownRAM00008E
	BMI.b CODE_80A942
	LDA.b !RAM_PLOK_UnknownRAM00007A
	BPL.b CODE_80A942
	LDA.b !RAM_PLOK_UnknownRAM00008E
	DEC
	STA.b !RAM_PLOK_UnknownRAM00007A
	DEC.b !RAM_PLOK_UnknownRAM000082
CODE_80A942:
	PLP
	RTS

CODE_80A944:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0010
	BCS.b CODE_80A96C
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80A969
	LDA.w #$004D
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80A969:
	INC.w !RAM_PLOK_Level_Player_XPosLo
CODE_80A96C:
	PLP
	RTS

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

CODE_80A96E:
	JSR.w CODE_80A971
CODE_80A971:
	PHP
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CMP.b !RAM_PLOK_Level_LowestCameraYPosLo
	BCS.b CODE_80A990
	INC.b !RAM_PLOK_UnknownRAM00007C
	INC.b !RAM_PLOK_UnknownRAM00006C
	INC.b !RAM_PLOK_UnknownRAM000080
	LDA.b !RAM_PLOK_UnknownRAM00008E
	BMI.b CODE_80A98E
	LDA.b !RAM_PLOK_UnknownRAM00007C
	CMP.b !RAM_PLOK_UnknownRAM00008E
	BCC.b CODE_80A98E
	STZ.b !RAM_PLOK_UnknownRAM00007C
	INC.b !RAM_PLOK_UnknownRAM000084
CODE_80A98E:
	PLP
	RTS

CODE_80A990:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$00F0
	BCC.b CODE_80A9B8
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80A9B5
	LDA.w #$004D
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80A9B5:
	DEC.w !RAM_PLOK_Level_Player_YPosLo
CODE_80A9B8:
	PLP
	RTS

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

CODE_80A9BA:
	JSR.w CODE_80A9BD
CODE_80A9BD:
	PHP
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CMP.b !RAM_PLOK_Level_HighestCameraYPosLo
	BCC.b CODE_80A9DD
	DEC.b !RAM_PLOK_UnknownRAM00007C
	DEC.b !RAM_PLOK_UnknownRAM00006C
	DEC.b !RAM_PLOK_UnknownRAM000080
	LDA.b !RAM_PLOK_UnknownRAM00008E
	BMI.b CODE_80A9DB
	LDA.b !RAM_PLOK_UnknownRAM00007C
	BPL.b CODE_80A9DB
	LDA.b !RAM_PLOK_UnknownRAM00008E
	DEC
	STA.b !RAM_PLOK_UnknownRAM00007C
	DEC.b !RAM_PLOK_UnknownRAM000084
CODE_80A9DB:
	PLP
	RTS

CODE_80A9DD:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$0010
	BCS.b CODE_80AA05
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80AA02
	LDA.w #$004D
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80AA02:
	INC.w !RAM_PLOK_Level_Player_YPosLo
CODE_80AA05:
	PLP
	RTS

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

CODE_80AA07:
	PHP
	REP.b #$30
	LDX.w #$0016
CODE_80AA0D:
	STZ.b !RAM_PLOK_UnknownRAM00007E,x
	DEX
	DEX
	BPL.b CODE_80AA0D
	LDA.w $0848
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.w #$FFFF
	STA.b !RAM_PLOK_UnknownRAM00008E
	LDA.l DATA_86E72C,x
	BPL.b CODE_80AA34
	XBA
	AND.w #$0070
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM00008E
	LDA.l DATA_86E72C,x
CODE_80AA34:
	AND.w #$0FFF
	STA.b !RAM_PLOK_UnknownRAM00006A
	STZ.b !RAM_PLOK_UnknownRAM00007A
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM00006E
	STA.b !RAM_PLOK_UnknownRAM000072
	LDA.l DATA_86E72C+$02,x
	STA.b !RAM_PLOK_UnknownRAM00006C
	STZ.b !RAM_PLOK_UnknownRAM00007C
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM000070
	STA.b !RAM_PLOK_UnknownRAM000074
	LDA.b !RAM_PLOK_UnknownRAM000070					; Optimization: Redundant instruction
	AND.w #$0003
	ASL
	ASL
	STA.b !RAM_PLOK_UnknownRAM000084
	LDA.b !RAM_PLOK_UnknownRAM00008E
	BPL.b CODE_80AA69
	LDA.w #$FFFE
	STA.b !RAM_PLOK_UnknownRAM000072
	STZ.b !RAM_PLOK_UnknownRAM000074
	BRA.b CODE_80AA73

CODE_80AA69:
	DEC
	TAY
CODE_80AA6B:
	LSR.b !RAM_PLOK_UnknownRAM000072
	LSR.b !RAM_PLOK_UnknownRAM000074
	DEY
	DEY
	BPL.b CODE_80AA6B
CODE_80AA73:
	LDA.l DATA_86E72C+$04,x
	STA.b !RAM_PLOK_UnknownRAM00008A
	LDA.l DATA_86E72C+$06,x
	STA.b !RAM_PLOK_UnknownRAM00008C
	LDA.l DATA_86E72C+$08,x
	STA.b !RAM_PLOK_Level_HighestCameraYPosLo
	LDA.l DATA_86E72C+$0A,x
	STA.b !RAM_PLOK_Level_LowestCameraYPosLo
	LDA.l DATA_86E72C+$0C,x
	STA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	LDA.l DATA_86E72C+$0E,x
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	PLP
	RTS

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

CODE_80AA99:
	PHP
	REP.b #$30
	LDA.b $09
	AND.w #$0003
	ASL
	TAX
	JSR.w (DATA_80AAD9,x)
	SEP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00007E
	CLC
	ADC.b #$20
	STA.w !REGISTER_BG1HorizScrollOffset
	STZ.w !REGISTER_BG1HorizScrollOffset
	LDA.b !RAM_PLOK_UnknownRAM000082
	CLC
	ADC.b #$20
	STA.w !REGISTER_BG2HorizScrollOffset
	STZ.w !REGISTER_BG2HorizScrollOffset
	LDA.b !RAM_PLOK_UnknownRAM000080
	CLC
	ADC.b !RAM_PLOK_UnknownRAM000090
	CLC
	ADC.b #$20
	STA.w !REGISTER_BG1VertScrollOffset
	STZ.w !REGISTER_BG1VertScrollOffset
	LDA.b !RAM_PLOK_UnknownRAM000084
	CLC
	ADC.b #$20
	STA.w !REGISTER_BG2VertScrollOffset
	STZ.w !REGISTER_BG2VertScrollOffset
	PLP
	RTS

DATA_80AAD9:
	dw CODE_80AAE1
	dw CODE_80AE05
	dw CODE_80AAE1
	dw CODE_80AE05

CODE_80AAE1:
	PHP
	REP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM00007E
	BMI.b CODE_80AAF7
	CMP.w #$0010
	BCC.b CODE_80AAFF
	SEC
	SBC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM00007E
	INC.b !RAM_PLOK_UnknownRAM00006E
	BRA.b CODE_80AAFF

CODE_80AAF7:
	CLC
	ADC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM00007E
	DEC.b !RAM_PLOK_UnknownRAM00006E
CODE_80AAFF:
	LDA.b !RAM_PLOK_UnknownRAM000080
	BMI.b CODE_80AB12
	CMP.w #$0010
	BCC.b CODE_80AB1A
	SEC
	SBC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000080
	INC.b !RAM_PLOK_UnknownRAM000070
	BRA.b CODE_80AB1A

CODE_80AB12:
	CLC
	ADC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000080
	DEC.b !RAM_PLOK_UnknownRAM000070
CODE_80AB1A:
	SEP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM000070
	STA.w !REGISTER_Multiplicand
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00008A
	LSR
	SEP.b #$20
	STA.w !REGISTER_Multiplier
	REP.b #$20
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	ASL
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00006E
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00006E
	CLC
	ADC.w #$3000
	STA.b $36
	SEP.b #$20
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b #$7E
	STA.w DMA[$01].SourceBank
	%PLOK_UnknownDMAMacro1($5400, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5420, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5440, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5460, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5480, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($54A0, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($54C0, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($54E0, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5500, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5520, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5540, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5560, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5580, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($55A0, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($55C0, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($55E0, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5600, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5620, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5640, !RAM_PLOK_UnknownRAM00008A)
	%PLOK_UnknownDMAMacro1($5660, !RAM_PLOK_UnknownRAM00008A)
	PLP
	RTS

CODE_80AE05:
	PHP
	REP.b #$30
	LDA.w $0848
	ASL
	TAX
	LDA.b !RAM_PLOK_UnknownRAM000082
	BMI.b CODE_80AE2B
	CMP.w #$0010
	BCC.b CODE_80AE3A
	SEC
	SBC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000082
	LDA.b !RAM_PLOK_UnknownRAM000072
	INC
	CMP.w DATA_818268,x
	BCC.b CODE_80AE27
	LDA.w #$0000
CODE_80AE27:
	STA.b !RAM_PLOK_UnknownRAM000072
	BRA.b CODE_80AE3A

CODE_80AE2B:
	CLC
	ADC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000082
	DEC.b !RAM_PLOK_UnknownRAM000072
	BPL.b CODE_80AE3A
	LDA.w DATA_818268,x
	STA.b !RAM_PLOK_UnknownRAM000072
CODE_80AE3A:
	LDA.b !RAM_PLOK_UnknownRAM000084
	BMI.b CODE_80AE4D
	CMP.w #$0010
	BCC.b CODE_80AE55
	SEC
	SBC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000084
	INC.b !RAM_PLOK_UnknownRAM000074
	BRA.b CODE_80AE55

CODE_80AE4D:
	CLC
	ADC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000084
	DEC.b !RAM_PLOK_UnknownRAM000074
CODE_80AE55:
	SEP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM000074
	STA.w !REGISTER_Multiplicand
	LDA.b !RAM_PLOK_UnknownRAM00008C
	LSR
	STA.w !REGISTER_Multiplier
	REP.b #$20
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	ASL
	CLC
	ADC.b !RAM_PLOK_UnknownRAM000072
	CLC
	ADC.b !RAM_PLOK_UnknownRAM000072
	CLC
	ADC.w #$D000
	STA.b $36
	SEP.b #$20
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b #$7F
	STA.w DMA[$01].SourceBank
	%PLOK_UnknownDMAMacro1($5800, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5820, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5840, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5860, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5880, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($58A0, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($58C0, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($58E0, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5900, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5920, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5940, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5960, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5980, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($59A0, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($59C0, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($59E0, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5A00, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5A20, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5A40, !RAM_PLOK_UnknownRAM00008C)
	%PLOK_UnknownDMAMacro1($5A60, !RAM_PLOK_UnknownRAM00008C)
	PLP
	RTS

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

CODE_80B13C:
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MaxBrightness0F|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_OAMSizeAndDataAreaDesignation
	STZ.w !REGISTER_OAMAddressLo
	STZ.w !REGISTER_OAMAddressHi
	STZ.w !REGISTER_OAMDataWritePort
	STZ.w !REGISTER_BGModeAndTileSizeSetting
	STZ.w !REGISTER_MosaicSizeAndBGEnable
	STZ.w !REGISTER_BG1AddressAndSize
	STZ.w !REGISTER_BG2AddressAndSize
	STZ.w !REGISTER_BG3AddressAndSize
	STZ.w !REGISTER_BG4AddressAndSize
	STZ.w !REGISTER_BG1And2TileDataDesignation
	STZ.w !REGISTER_BG3And4TileDataDesignation
	STZ.w !REGISTER_BG1HorizScrollOffset
	STZ.w !REGISTER_BG1HorizScrollOffset
	STZ.w !REGISTER_BG2HorizScrollOffset
	STZ.w !REGISTER_BG2HorizScrollOffset
	STZ.w !REGISTER_BG3HorizScrollOffset
	STZ.w !REGISTER_BG3HorizScrollOffset
	STZ.w !REGISTER_BG4HorizScrollOffset
	STZ.w !REGISTER_BG4HorizScrollOffset
	STZ.w !REGISTER_BG1VertScrollOffset
	STZ.w !REGISTER_BG1VertScrollOffset
	STZ.w !REGISTER_BG2VertScrollOffset
	STZ.w !REGISTER_BG2VertScrollOffset
	STZ.w !REGISTER_BG3VertScrollOffset
	STZ.w !REGISTER_BG3VertScrollOffset
	STZ.w !REGISTER_BG4VertScrollOffset
	STZ.w !REGISTER_BG4VertScrollOffset
	LDA.b #$50
	STA.w !REGISTER_VRAMAddressIncrementValue
	STZ.w !REGISTER_VRAMAddressLo
	STZ.w !REGISTER_VRAMAddressHi
	STZ.w !REGISTER_Mode7TilemapSettings
	STZ.w !REGISTER_BG1And2WindowMaskSettings
	STZ.w !REGISTER_BG3And4WindowMaskSettings
	STZ.w !REGISTER_ObjectAndColorWindowSettings
	STZ.w !REGISTER_Window1LeftPositionDesignation
	STZ.w !REGISTER_Window1RightPositionDesignation
	STZ.w !REGISTER_Window2LeftPositionDesignation
	STZ.w !REGISTER_Window2RightPositionDesignation
	STZ.w !REGISTER_BGWindowLogicSettings
	STZ.w !REGISTER_ColorAndObjectWindowLogicSettings
	STZ.w !REGISTER_MainScreenLayers
	STZ.w !REGISTER_SubScreenLayers
	STZ.w !REGISTER_MainScreenWindowMask
	STZ.w !REGISTER_SubScreenWindowMask
	STZ.w !REGISTER_ColorMathInitialSettings
	STZ.w !REGISTER_ColorMathSelectAndEnable
	STZ.w !REGISTER_FixedColorData
	STZ.w !REGISTER_InitialScreenSettings
	STZ.w !REGISTER_EnableFastROM
	RTS

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

CODE_80B1DC:
	PHP
	REP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$0080
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0070
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w #$0000
	STA.w $042A
	LDA.w #$2000
	STA.w $042C
	STZ.w $0808
	STZ.w $080A
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	STZ.w $09EC
	STZ.w $0A86
	STZ.w $0838
	STZ.w $083A
	STZ.w $0842
	STZ.w $0A98
	LDA.w #$003F
	STA.w $0822
	LDA.w #$00A0
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	STZ.w !RAM_PLOK_Level_Player_CurrentDisplayedHPLo
	STZ.w !RAM_PLOK_Level_CurrentDisplayedEnemyHPLo
	STZ.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	STZ.w $0840
	STZ.w $083E
	STZ.w $07EE
	STZ.w $07F0
	STZ.w $07F2
	STZ.w $0818
	STZ.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	STZ.w $07F8
	STZ.w $07FA
	STZ.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	JSR.w CODE_80B259
	PLP
	RTS

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

CODE_80B259:
	LDX.w #$001E
CODE_80B25C:
	STZ.w $08D2,x
	STZ.w $08B2,x
	DEX
	DEX
	BPL.b CODE_80B25C
	STZ.w $0A86
	RTS

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

CODE_80B26A:
	PHP
	REP.b #$30
	LDA.w $0740
	BEQ.b CODE_80B275
	DEC.w $0740
CODE_80B275:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80B27D
	JMP.w CODE_80C83E

CODE_80B27D:
	LDA.b !RAM_PLOK_UnknownRAM0000AF
	AND.w #$0007
	STA.w $0804
	JSR.w CODE_80B727
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80B29D
	CMP.w #$8040
	BCC.b CODE_80B2AA
	LDX.w $0958
	LDA.w DATA_8182EE,x
	STA.w $0838
	BRA.b CODE_80B2AA

CODE_80B29D:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BNE.b CODE_80B2D0
	LDA.w $0816
	BNE.b CODE_80B2AA
CODE_80B2AA:
	LDA.w #$0050
	STA.w $07EE
	LDA.w #$0040
	STA.w $07F0
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BEQ.b CODE_80B2C7
	LDA.w #$0052
	STA.w $07EE
	LDA.w #$0042
	STA.w $07F0
CODE_80B2C7:
	LDA.w $0804
	ORA.w #$0008
	STA.w $0804
CODE_80B2D0:
	JSR.w CODE_80B5EA
	LDA.w $0746
	BEQ.b CODE_80B2DB
	DEC.w $0746
CODE_80B2DB:
	LDA.w $0742
	BEQ.b CODE_80B2E5
	DEC.w $0742
	BRA.b CODE_80B2F2

CODE_80B2E5:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	ASL
	ROR.w $073A
	BIT.w $073A
	BPL.b CODE_80B2F5
	BVS.w CODE_80B2F5
CODE_80B2F2:
	JSR.w CODE_80B681
CODE_80B2F5:
	LDA.w $0744
	BEQ.b CODE_80B2FF
	DEC.w $0744
	BRA.b CODE_80B30D

CODE_80B2FF:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	XBA
	ASL
	ROR.w $073E
	BIT.w $073E
	BPL.b CODE_80B310
	BVS.b CODE_80B310
CODE_80B30D:
	JSR.w CODE_80B6C6
CODE_80B310:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	CMP.w #$0050
	BCC.b CODE_80B332
	LDA.w $0814
	BEQ.b CODE_80B328
	LDA.w $0834
	BIT.w #$0200
	BNE.b CODE_80B38E
CODE_80B325:
	JMP.w CODE_80B3CA

CODE_80B328:
	LDA.w $0834
	BIT.w #$0100
	BNE.b CODE_80B362
	BRA.b CODE_80B325

CODE_80B332:
	LDA.w $0838
	BEQ.b CODE_80B33F
	JSR.w CODE_80C2D1
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_80B34E
CODE_80B33F:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	AND.w $0834
	BIT.w #$0200
	BNE.b CODE_80B37D
	BIT.w #$0100
	BNE.b CODE_80B351
CODE_80B34E:
	JMP.w CODE_80B3CA

CODE_80B351:
	JSR.w CODE_80B3A9
	LDA.w $042C
	AND.w #$BFFF
	STA.w $042C
	LDA.w $09EC
	BNE.b CODE_80B365
CODE_80B362:
	JSR.w CODE_80B368
CODE_80B365:
	JMP.w CODE_80B3CA

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

CODE_80B368:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0098
	BCC.b CODE_80B376
	JSR.w CODE_80A8D5
CODE_80B376:
	INC.w !RAM_PLOK_Level_Player_XPosLo
	INC.w !RAM_PLOK_Level_Player_XPosLo
	RTS

CODE_80B37D:
	JSR.w CODE_80B3A9
	LDA.w $042C
	ORA.w #$4000
	STA.w $042C
	LDA.w $09EC
	BNE.b CODE_80B391
CODE_80B38E:
	JSR.w CODE_80B394
CODE_80B391:
	JMP.w CODE_80B3CA

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

CODE_80B394:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0070
	BCS.b CODE_80B3A2
	JSR.w CODE_80A921
CODE_80B3A2:
	DEC.w !RAM_PLOK_Level_Player_XPosLo
	DEC.w !RAM_PLOK_Level_Player_XPosLo
	RTS

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

CODE_80B3A9:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80B3C5
	LDA.w $0822
	AND.w #$0012
	BNE.b CODE_80B3C5
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	STA.w $0842
	LDA.w #$FA88
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80B3C5:
	RTS

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

CODE_80B3C6:
	PHP
	STZ.w $0838
CODE_80B3CA:
	LDA.w $042E
	AND.w #$7FFF
	STA.w $042E
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80B3DB
	JMP.w CODE_80B42A

CODE_80B3DB:
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BEQ.b CODE_80B3E8
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BEQ.b CODE_80B3FF
CODE_80B3E8:
	LDA.w $0952
	BEQ.b CODE_80B3FF
	LDA.w #$004D
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	STZ.w $0952
CODE_80B3FF:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BEQ.b CODE_80B42A
	LDA.w #$0000
	STA.w $07EE
	STA.w $07F2
	STA.w $07F0
	LDA.w $0956
	BNE.b CODE_80B42A
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BEQ.b CODE_80B42A
	AND.w #$0380
	ASL
	XBA
	ASL
	CLC
	ADC.w #$0044
	STA.w $07EE
CODE_80B42A:
	LDA.w $0956
	BNE.b CODE_80B442
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BEQ.b CODE_80B442
	DEC
	STA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BEQ.b CODE_80B43F
	CMP.w #$8000
	BNE.b CODE_80B442
CODE_80B43F:
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80B442:
	LDX.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BEQ.b CODE_80B45B
	ORA.w #$8000
	STA.w $042E
	DEC.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	LDA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BNE.b CODE_80B45B
	LDA.w #$0008
	STA.w $07EE
CODE_80B45B:
	INC.w $080C
	LDA.w $0822
	AND.w #$0012
	BNE.b CODE_80B46B
	LDY.w #$0004
	BRA.b CODE_80B48F

CODE_80B46B:
	LDA.w $0804
	AND.w #$000F
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_80B47D
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80B482
CODE_80B47D:
	LDY.w DATA_818312,x
	BRA.b CODE_80B485

CODE_80B482:
	LDY.w DATA_8182F2,x
CODE_80B485:
	CPY.w $0808
	BNE.b CODE_80B48F
	LDA.w $080A
	BPL.b CODE_80B49B
CODE_80B48F:
	STY.w $0808
	LDA.w DATA_818332,y
	STA.w $080A
	STZ.w $0818
CODE_80B49B:
	LDA.w $09EC
	BNE.b CODE_80B4CC
	JSR.w CODE_80B4D9
	LDX.w $0808
	LDA.w DATA_818396,x
	STA.b $38
	LDA.w $080A
	CLC
	ADC.w $07FE
	ASL
	TAY
	LDA.b ($38),y
	STA.w $042A
	LDA.w $080C
	CMP.w #$0003
	BCC.b CODE_80B4CC
	STZ.w $080C
	LDA.w $080A
	BMI.b CODE_80B4CC
	DEC.w $080A
CODE_80B4CC:
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BEQ.b CODE_80B4D4
	JMP.w CODE_80D30F

CODE_80B4D4:
	JSR.w CODE_80D81A
	PLP
	RTS

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

CODE_80B4D9:
	STZ.w $07FE
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BNE.b CODE_80B521
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BEQ.b CODE_80B520
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_80B520
	BNE.b CODE_80B521
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_80B520
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80B502
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80B521
CODE_80B502:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0001
	BNE.b CODE_80B50D
	JSR.w CODE_80B5C2
CODE_80B50D:
	LDA.w $0808
	CMP.w #$0002
	BNE.b CODE_80B518
	JSR.w CODE_80B54B
CODE_80B518:
	LDA.w $0808
	BNE.b CODE_80B520
	JSR.w CODE_80B588
CODE_80B520:
	RTS

CODE_80B521:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0001
	BEQ.b CODE_80B547
	LDA.w $0808
	BNE.b CODE_80B520
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	PHA
	LDA.w #$00A0
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	JSR.w CODE_80B588
	PLA
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0001
	BNE.b CODE_80B54A
CODE_80B547:
	JSR.w CODE_80B5C2
CODE_80B54A:
	RTS

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

CODE_80B54B:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_80B560
	INC.w $0818
	LDA.w $0818
	CMP.w #$0006
	BCC.b CODE_80B560
	STZ.w $0818
CODE_80B560:
	LDA.w $0818
	ASL
	TAX
	LDA.w DATA_818342,x
	STA.w $07F0
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	AND.w #$00C0
	ASL
	ASL
	XBA
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	CLC
	ADC.w $0818
	ASL
	TAX
	LDA.w DATA_81834E,x
	STA.w $07EE
	RTS

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

CODE_80B588:
	LDA.w $080A
	STA.b $3A
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	AND.w #$00C0
	ASL
	ASL
	XBA
	ASL
	ASL
	ASL
	STA.b $38
	ASL
	ASL
	CLC
	ADC.b $38
	STA.w $07FE
	CMP.w #$0050
	BEQ.b CODE_80B5C1
	CLC
	ADC.b $3A
	ASL
	TAX
	LDA.w DATA_8183A6,x
	SEC
	SBC.w #$04F6
	TAX
	LDA.w DATA_818372,x
	STA.w $07EE
	LDA.w DATA_818384,x
	STA.w $07F0
CODE_80B5C1:
	RTS

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

CODE_80B5C2:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_80B5DD
	AND.w #$FF00
	CMP.w #$0200
	BCS.b CODE_80B5D0
	RTS

CODE_80B5D0:
	LDA.w #$0002
	STA.w $07FE
	LDA.w #$003E
	STA.w $07F0
	RTS

CODE_80B5DD:
	LDA.w #$0001
	STA.w $07FE
	LDA.w #$003C
	STA.w $07F0
	RTS

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

CODE_80B5EA:
	LDX.w #$0004
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_80B5FA
	LDA.w $0804
	AND.w #$000C
	LSR
	TAX
CODE_80B5FA:
	LDA.w DATA_8182DE,x
CODE_80B5FD:
	STZ.b $38
	CLC
	ADC.w !RAM_PLOK_Level_Player_YSpeedLo
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_80B622
	AND.w #$00FF
	CLC
	ADC.w $0810
	STA.w $0810
	CMP.w #$0100
	BCC.b CODE_80B63E
	SEC
	SBC.w #$00FF
	STA.w $0810
	INC.b $38
	BRA.b CODE_80B63E

CODE_80B622:
	AND.w #$00FF
	EOR.w #$00FF
	STA.b $3A
	LDA.w $0810
	SEC
	SBC.b $3A
	STA.w $0810
	BPL.b CODE_80B63E
	CLC
	ADC.w #$00FF
	STA.w $0810
	INC.b $38
CODE_80B63E:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_80B646
	STZ.w $0810
CODE_80B646:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80B660
	XBA
	AND.w #$00FF
	SEC
	SBC.b $38
	STA.b $38
	XBA
	CLC
	ADC.w #$0100
	BEQ.b CODE_80B65E
	ORA.w #$00FF
CODE_80B65E:
	BRA.b CODE_80B678

CODE_80B660:
	XBA
	AND.w #$00FF
	CLC
	ADC.b $38
	STA.b $38
	XBA
	CMP.w #$0810
	BCC.b CODE_80B675
	LDA.w #$0800
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80B675:
	AND.w #$FF00
CODE_80B678:
	XBA
	CLC
	ADC.w !RAM_PLOK_Level_Player_YPosLo
	STA.w !RAM_PLOK_Level_Player_YPosLo
	RTS

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

CODE_80B681:
	LDA.w $0746
	BEQ.b CODE_80B68B
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80B690
CODE_80B68B:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80B6C1
CODE_80B690:
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_80B6C2
	LDA.w $0822
	AND.w #$0012
	BEQ.b CODE_80B6C1
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	STA.w $0842
	LDA.w #$FA88
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	LDA.w #$0001
	JSL.l CODE_80FD81
	LDA.w $0742
	CMP.w #$0001
	BCS.b CODE_80B6C1
	LDA.w #$000A
	STA.w $0742
CODE_80B6C1:
	RTS

CODE_80B6C2:
	STZ.w $073A
	RTS

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

CODE_80B6C6:
	LDA.w $0746
	BEQ.b CODE_80B6D0
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80B6D5
CODE_80B6D0:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80B722
CODE_80B6D5:
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_80B723
	LDA.w $0822
	AND.w #$0012
	BEQ.b CODE_80B722
	LDA.w #$0002
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	STA.w $0842
	LDA.w #$FA74
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	LDA.w $0744
	CMP.w #$0001
	BCS.b CODE_80B6FF
	LDA.w #$000A
	STA.w $0744
CODE_80B6FF:
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BEQ.b CODE_80B71B
	LDA.w #$0001
	STA.w $0952
	LDA.w #$004C
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	BRA.b CODE_80B722

CODE_80B71B:
	LDA.w #$0015
	JSL.l CODE_80FD81
CODE_80B722:
	RTS

CODE_80B723:
	STZ.w $073E
	RTS

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

CODE_80B727:
	REP.b #$30
	LDX.w #$0007
	LDA.b !RAM_PLOK_UnknownRAM00004C
	BEQ.b CODE_80B733
	LDX.w #$0000
CODE_80B733:
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CMP.b !RAM_PLOK_Level_HighestCameraYPosLo
	BCC.b CODE_80B74C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$0040
	BCS.b CODE_80B760
	JSR.w CODE_80A9BD
	DEX
	BPL.b CODE_80B733
	BRA.b CODE_80B760

CODE_80B74C:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$0008
	BCS.b CODE_80B760
	INC.w !RAM_PLOK_Level_Player_YPosLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
CODE_80B760:
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CMP.b !RAM_PLOK_Level_LowestCameraYPosLo
	BCS.b CODE_80B776
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$0071
	BCC.b CODE_80B7D6
	JSR.w CODE_80A971
	BRA.b CODE_80B760

CODE_80B776:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$00BE
	BCC.b CODE_80B7D6
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81EE95,x
	BNE.b CODE_80B790
	LDA.w $0A10
	BNE.b CODE_80B7D6
CODE_80B790:
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81813C,x
	BEQ.b CODE_80B7BF
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w #$0008
	STA.w $0C1E
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_80B7D6
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_80B7BF
	JSL.l CODE_82C193
	LDA.w #$0008
	JSL.l CODE_80FD81
CODE_80B7BF:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_80B7CB
	LDA.w #$0028
	JSL.l CODE_80C67C
CODE_80B7CB:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_80B7D6
	LDA.w #$FFB0
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80B7D6:
	RTS

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

CODE_80B7D7:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_80B7F9
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BEQ.b CODE_80B82B
	LDA.w #$00FF
	STA.b $38
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	ASL
	ASL
	ROR.w $0738
	BIT.w $0738
	BPL.b CODE_80B7F9
	BVC.b CODE_80B83F
CODE_80B7F9:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	CMP.w #$0001
	BEQ.b CODE_80B809
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	CMP.w #$0006
	BNE.b CODE_80B82B
CODE_80B809:
	STZ.w $0740
	LDA.w $07FC
	BEQ.b CODE_80B816
	CMP.w #$001E
	BCC.b CODE_80B83F
CODE_80B816:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	AND.w #$4000
	BNE.b CODE_80B83F
	LDA.w #$0007
	XBA
	ORA.w #$0006
	JSL.l CODE_82E177
	STZ.w $07FC
CODE_80B82B:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	XBA
	ASL
	ASL
	ROR.w $073C
	BIT.w $073C
	BPL.b CODE_80B83E
	BVS.b CODE_80B83E
	JSL.l CODE_82DB0C
CODE_80B83E:
	RTS

CODE_80B83F:
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BEQ.b CODE_80B84B
	JSR.w CODE_80D454
	JSR.w CODE_80B82B
	RTS

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

CODE_80B84B:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80B853
	JMP.w CODE_80CDA1

CODE_80B853:
	LDY.w #$0006
	LDX.w #!RAM_PLOK_Level_Player_FlyingLimbTable
CODE_80B859:
	LDA.b $00,x
	BPL.b CODE_80B89A
	LDA.w $0822
	AND.b $38
	AND.w DATA_81851C,y
	BEQ.b CODE_80B89A
	LDA.w #$0003
	JSL.l CODE_80FD81
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w DATA_818514,y
	STA.b $02,x
	CPY.w #$0004
	BCC.b CODE_80B896
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80B88E
	CMP.w #$0006
	BNE.b CODE_80B896
CODE_80B88E:
	LDA.w #$000C
	CLC
	ADC.b $02,x
	STA.b $02,x
CODE_80B896:
	JSR.w CODE_80B8A5
	RTS

CODE_80B89A:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_80B859
	RTS

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

CODE_80B8A5:
	LDA.w DATA_81850C,y
	STA.b $04,x
	LDA.w #$002A
	STA.b $08,x
	LDA.w $0822
	EOR.w DATA_81851C,y
	STA.w $0822
	LDA.w #$0014
	STA.b $08,x
	LDA.w $042C
	STA.b $06,x
	AND.w #$4000
	BEQ.b CODE_80B8D4
	LDA.w #$0064
	STA.w $082C,y
	LDA.w #$F830
	STA.w $0824,y
	RTS

CODE_80B8D4:
	LDA.w #$FF9C
	STA.w $082C,y
	LDA.w #$0898
	STA.w $0824,y
	RTS

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

CODE_80B8E1:
	LDX.w #$04A8
	LDY.w #$0026
CODE_80B8E7:
	LDA.b $00,x
	BMI.b CODE_80B8F8
	LDA.w $0AFC,y
	BIT.w #$2000
	BEQ.b CODE_80B8F8
	LDA.w #$FFFF
	STA.b $00,x
CODE_80B8F8:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_80B8E7
	RTS

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

CODE_80B903:
	LDY.w #$0003
	LDX.w #!RAM_PLOK_Level_Player_FlyingLimbTable
CODE_80B909:
	LDA.w #$FFFF
	STA.b $00,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	BPL.b CODE_80B909
	RTS

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

CODE_80B918:
	REP.b #$30
	LDY.w #$0006
	LDX.w #!RAM_PLOK_Level_Player_FlyingLimbTable
CODE_80B920:
	LDA.b $00,x
	BMI.b CODE_80B94A
	LDA.w $0A86
	AND.w DATA_81851C,y
	BNE.b CODE_80B94A
	LDA.b $08,x
	BEQ.b CODE_80B944
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	BIT.w #$0200
	BEQ.b CODE_80B93B
	DEC.b $00,x
	DEC.b $00,x
CODE_80B93B:
	BIT.w #$0100
	BEQ.b CODE_80B944
	INC.b $00,x
	INC.b $00,x
CODE_80B944:
	JSR.w CODE_80BB13
	JSR.w CODE_80B955
CODE_80B94A:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_80B920
	RTS

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

CODE_80B955:
	PHX
	PHY
	LDA.b $02,x
	CLC
	ADC.w #$002F
	TAY
	LDA.b $00,x
	CLC
	ADC.w #$0022
	TAX
	JSL.l CODE_80FC03
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80B9A8
	AND.w #$0FFF
	BNE.b CODE_80B978
	JSL.l CODE_80BCAA
	BRA.b CODE_80B989

CODE_80B978:
	CMP.w #$0007
	BNE.b CODE_80B990
	LDX.b !RAM_PLOK_UnknownRAM00004E
	LDA.l $7E3000,x
	DEC
	DEC
	STA.l $7E3000,x
CODE_80B989:
	PLY
	PLX
	JSL.l CODE_80BBC7
	RTS

CODE_80B990:
	CMP.w #$000D
	BCS.b CODE_80B99D
	CMP.w #$000A
	BCC.b CODE_80B9A8
	JMP.w CODE_80B9AB					; Optimization: Replace with BRA.

CODE_80B99D:
	CMP.w #$0010
	BNE.b CODE_80B9A8
	JSL.l CODE_80BC24
	BRA.b CODE_80B989

CODE_80B9A8:
	PLY
	PLX
	RTS

CODE_80B9AB:
	PLY
	CMP.w #$000A
	BEQ.b CODE_80B9C3
	CMP.w #$000B
	BEQ.b CODE_80B9BE
	CPY.w #$0003
	BCC.b CODE_80B9C3
CODE_80B9BB:
	JMP.w CODE_80BA8B

CODE_80B9BE:
	CPY.w #$0003
	BCC.b CODE_80B9BB
CODE_80B9C3:
	LDX.w #$0000
CODE_80B9C6:
	LDA.l $7F2000,x
	CMP.w #$FFFF
	BEQ.b CODE_80B9BB
	CMP.b !RAM_PLOK_UnknownRAM00004E
	BEQ.b CODE_80BA2D
	STA.b $38
	INC
	INC
	CMP.b !RAM_PLOK_UnknownRAM00004E
	BEQ.b CODE_80BA04
	SEC
	SBC.w #$0004
	CMP.b !RAM_PLOK_UnknownRAM00004E
	BEQ.b CODE_80BA04
	LDA.b $38
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00008A
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00008A
	CMP.b !RAM_PLOK_UnknownRAM00004E
	BEQ.b CODE_80BA04
	LDA.b $38
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00008A
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00008A
	CMP.b !RAM_PLOK_UnknownRAM00004E
	BEQ.b CODE_80BA04
	TXA
	CLC
	ADC.w #$0008
	TAX
	JMP.w CODE_80B9C6

CODE_80BA04:
	LDA.l $7F2000,x
	STA.b !RAM_PLOK_UnknownRAM00004E
	PHX
	LDX.b !RAM_PLOK_UnknownRAM00004E
	LDA.l $7E3000,x
	PLX
	CMP.w #$01C4
	BEQ.b CODE_80BA2D
	CMP.w #$01C6
	BEQ.b CODE_80BA28
	CMP.w #$01C8
	BNE.b CODE_80BA8B
	CPY.w #$0003
	BCC.b CODE_80BA2D
	BRA.b CODE_80BA8B

CODE_80BA28:
	CPY.w #$0003
	BCC.b CODE_80BA8B
CODE_80BA2D:
	LDA.l $7F2002,x
	CLC
	ADC.w DATA_81F4B3,y
	STA.b $38
	LDA.l $7F2004,x
	CLC
	ADC.w DATA_81F4BB,y
	STA.b $3A
	LDA.l $7F2006,x
	STA.b $3C
	PLX
	LDA.w $0A86
	ORA.w DATA_81851C,y
	STA.w $0A86
	LDA.b $38
	STA.b $00,x
	LDA.b $3A
	STA.b $02,x
	LDA.b $06,x
	ORA.w #$4000
	STA.b $06,x
	LDA.w DATA_81F4AB,y
	STA.b $04,x
	LDA.b $3C
	AND.w #$000F
	PHX
	ASL
	TAX
	LDA.w $08D2,x
	ORA.w DATA_81851C,y
	STA.w $08D2,x
	INC.w $08B2,x
	LDA.b $3C
	BPL.b CODE_80BA86
	LDA.w #$01C2
	LDX.b !RAM_PLOK_UnknownRAM00004E
	STA.l $7E3000,x
CODE_80BA86:
	PLX
	JSR.w CODE_80BAE4
	RTS

CODE_80BA8B:
	PLX
	RTS

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

CODE_80BA8D:
	LDX.w #$0000
CODE_80BA90:
	LDA.l $7F2000,x
	CMP.w #$FFFF
	BEQ.b CODE_80BAE3
	LDA.l $7F2002,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_80BABB
	LDA.l $7F2004,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCC.b CODE_80BAC4
CODE_80BABB:
	TXA
	CLC
	ADC.w #$0008
	TAX
	JMP.w CODE_80BA90					; Optimization: Replace with BRA.

CODE_80BAC4:
	LDA.l $7F2006,x
	ASL
	TAY
	LDA.w $08D2,y
	BEQ.b CODE_80BABB
	LDA.w $0A86
	EOR.w $08D2,y
	STA.w $0A86
	LDA.w #$0000
	STA.w $08D2,y
	JSR.w CODE_80C7A3
	BRA.b CODE_80BABB

CODE_80BAE3:
	RTS

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

CODE_80BAE4:
	LDA.b !RAM_PLOK_UnknownRAM00004E
	JSL.l CODE_82D670
	LDA.w #$0001
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_80BB13:
	LDA.b $08,x
	BNE.b CODE_80BB34
	LDA.b $09
	AND.w #$001C
	LSR
	CLC
	ADC.w DATA_81850C,y
	STA.b $04,x
	LDA.b $00,x
	CMP.w !RAM_PLOK_Level_Player_XPosLo
	BCC.b CODE_80BB2F
	LDA.w #$FF88
	BRA.b CODE_80BB39

CODE_80BB2F:
	LDA.w #$0078
	BRA.b CODE_80BB39

CODE_80BB34:
	DEC.b $08,x
	LDA.w $082C,y
CODE_80BB39:
	CLC
	ADC.w $0824,y
	STA.w $0824,y
	BPL.b CODE_80BB47
	ORA.w #$00FF
	BRA.b CODE_80BB4A

CODE_80BB47:
	AND.w #$FF00
CODE_80BB4A:
	XBA
	CLC
	ADC.b $00,x
	STA.b $00,x
	LDA.b $08,x
	BNE.b CODE_80BBC6
	LDA.w $0824,y
	BMI.b CODE_80BB63
	CMP.w #$0300
	BCC.b CODE_80BB6B
	LDA.w #$0300
	BRA.b CODE_80BB6B

CODE_80BB63:
	CMP.w #$FD00
	BCS.b CODE_80BB6B
	LDA.w #$FDFF
CODE_80BB6B:
	STA.w $0824,y
	CPY.w #$0004
	BCC.b CODE_80BB89
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80BB80
	CMP.w #$0006
	BNE.b CODE_80BB89
CODE_80BB80:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$000C
	BRA.b CODE_80BB8C

CODE_80BB89:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
CODE_80BB8C:
	STA.b $38
	CLC
	ADC.w DATA_818514,y
	CMP.b $02,x
	BEQ.b CODE_80BB9E
	BCS.b CODE_80BB9C
	DEC.b $02,x
	BRA.b CODE_80BB9E

CODE_80BB9C:
	INC.b $02,x
CODE_80BB9E:
	LDA.b $02,x
	SEC
	SBC.b $38
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_80BBC6
	LDA.b $00,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_80BBC6
	LDA.w #$0004
	JSL.l CODE_80FD81
	JSL.l CODE_80BBC7

CODE_80BBC6:
	RTS

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

CODE_80BBC7:
	LDA.w $0822
	EOR.w DATA_81851C,y
	STA.w $0822
	LDA.w #$FFFF
	STA.b $00,x
	RTL

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

CODE_80BBD6:
	REP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	BNE.b CODE_80BBE4
	JSL.l CODE_80BCAA
	RTS

CODE_80BBE4:
	CMP.w #$0001
	BNE.b CODE_80BBEC
	JMP.w CODE_80BE75

CODE_80BBEC:
	CMP.w #$0002
	BNE.b CODE_80BC0A
	LDA.w $042C
	AND.w #$4000
	EOR.w #$4000
	STA.w $0814
	LDA.w #$8007
	STA.b !RAM_PLOK_UnknownRAM00004A
	LDA.w #$0028
	JSL.l CODE_80C61C
	RTS

CODE_80BC0A:
	CMP.w #$0007
	BCS.b CODE_80BC12
	JMP.w CODE_80BDC7

CODE_80BC12:
	CMP.w #$000D
	BNE.b CODE_80BC1A
	JMP.w CODE_80BA8D

CODE_80BC1A:
	CMP.w #$0010
	BNE.b CODE_80BC23
	JSL.l CODE_80BC24
CODE_80BC23:
	RTS

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

CODE_80BC24:
	LDX.b !RAM_PLOK_UnknownRAM00004E
	LDA.w #$0000
	STA.l $7E3000,x
	LDA.w #$0006
	JSL.l CODE_80FD81
	LDA.w #$0001
	JSL.l CODE_82D83A
	JSL.l CODE_82D670
	LDA.w #$0001
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	INC.w !RAM_PLOK_Level_Player_BuddyHornetCount
	RTL

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

CODE_80BC6B:
	REP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	BNE.b CODE_80BC79
	JSL.l CODE_80BCAA
	RTS

CODE_80BC79:
	CMP.w #$0002
	BNE.b CODE_80BC97
	LDA.w $042C
	AND.w #$4000
	EOR.w #$4000
	STA.w $0814
	LDA.w #$8007
	STA.b !RAM_PLOK_UnknownRAM00004A
	LDA.w #$0028
	JSL.l CODE_80C61C
	RTS

CODE_80BC97:
	CMP.w #$0010
	BNE.b CODE_80BCA1
	JSL.l CODE_80BC24
	RTS

CODE_80BCA1:
	CMP.w #$000D
	BNE.b CODE_80BCA9
	JMP.w CODE_80BA8D

CODE_80BCA9:
	RTS

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

CODE_80BCAA:
	LDX.b !RAM_PLOK_UnknownRAM00004E
	LDA.l $7E3000,x
	AND.w #$000F
	CMP.w #$000C
	BNE.b CODE_80BCBD
	LDA.w #$0000
	BRA.b CODE_80BCC0

CODE_80BCBD:
	LDA.w #$0022
CODE_80BCC0:
	STA.b $38
	LDA.l $7E3000,x
	AND.w #$FE00
	ORA.b $38
	STA.l $7E3000,x
	LDA.w #$0006
	JSL.l CODE_80FD81
	LDA.w #$0001
	JSL.l CODE_82D83A
	JSL.l CODE_82D670
	LDA.w #$0001
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	INC.w $08F4
	LDA.w !RAM_PLOK_Level_Player_ShellCounter
	INC
	STA.w !RAM_PLOK_Level_Player_ShellCounter
	CMP.w #$00C8
	BCC.b CODE_80BD1F
	JSL.l CODE_80BD20
	STZ.w !RAM_PLOK_Level_Player_ShellCounter
CODE_80BD1F:
	RTL

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

CODE_80BD20:
	LDA.w #$0012
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSL.l CODE_809FE0
	%PLOK_WriteIndependantTextString($01, $05, !Text_Layer_3, !Text_Palette_3, BonusPlok, CODE_80A457)
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	LDA.w #$0050
	STA.w $0C24
	LDA.w #$0050
	STA.w $0C26
	LDX.w #$0000
	LDY.w #$0001
CODE_80BD63:
	JSL.l CODE_809FE0
	PHX
	PHY
	LDA.w $0A10
	CMP.w #$0001
	BEQ.b CODE_80BD74
	JSR.w CODE_80C765
CODE_80BD74:
	JSR.w CODE_80A62E
	JSL.l CODE_82D5F4
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	PLY
	PLX
	DEY
	BNE.b CODE_80BD63
	LDA.w DATA_81DBF8,x
	CMP.w #$FFFF
	BEQ.b CODE_80BDAE
	STA.w $0C20
	INX
	INX
	LDA.w DATA_81DBF8,x
	STA.w $0C22
	INX
	INX
	LDA.w DATA_81DBF8,x
	STA.w $0C28
	INX
	INX
	LDY.w DATA_81DBF8,x
	INX
	INX
	JSL.l CODE_82D5AB
	BRA.b CODE_80BD63

CODE_80BDAE:
	JSL.l CODE_809FE0
	INC.w !RAM_PLOK_Level_Player_CurrentLifeCountLo
	JSR.w CODE_80A5DD
	LDA.w #$0064
	STA.w $084C
	RTL

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

CODE_80BDBF:
	LDA.w #$0000
	STA.l $7E3000,x
	RTS

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

CODE_80BDC7:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_80BE1C
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$FFF0
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w $0A98
	BNE.b CODE_80BE1C
	LDA.w #$0008
	STA.w $0A98
	LDX.b !RAM_PLOK_UnknownRAM00004E
	LDA.l $7E3000,x
	AND.w #$000F
	CMP.w #$000E
	BEQ.b CODE_80BDBF
	LDA.l $7E3000,x
	INC
	INC
	STA.l $7E3000,x
	AND.w #$03F0
	CLC
	ADC.w #$0004
	STA.b $38
	CLC
	ADC.w #$000A
	STA.b $3A
	DEX
	DEX
	JSR.w CODE_80BE1D
	INX
	INX
	INX
	INX
	JSR.w CODE_80BE1D
CODE_80BE1C:
	RTS

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

CODE_80BE1D:
	LDA.l $7E3000,x
	AND.w #$03FF
	CMP.b $38
	BCC.b CODE_80BE36
	CMP.b $3A
	BCS.b CODE_80BE36
	LDA.l $7E3000,x
	INC
	INC
	STA.l $7E3000,x
CODE_80BE36:
	RTS

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

CODE_80BE37:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_80BE74
	LDX.w #$0000
CODE_80BE41:
	LDA.l $7F1000,x
	CMP.w #$FFFF
	BEQ.b CODE_80BE74
	LDA.l $7F1002,x
	CMP.l $7F1004,x
	BCS.b CODE_80BE6B
	LDA.l $7F1000,x
	PHX
	TAX
	LDA.l $7E3000,x
	CMP.w #$012C
	BCS.b CODE_80BE6A
	LDA.w #$0126
	STA.l $7E3000,x
CODE_80BE6A:
	PLX
CODE_80BE6B:
	TXA
	CLC
	ADC.w #$0008
	TAX
	JMP.w CODE_80BE41					; Optimization: Replace with BRA.

CODE_80BE74:
	RTS

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

CODE_80BE75:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80BE7D
	JMP.w CODE_80BF38

CODE_80BE7D:
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$FFF0
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDX.w #$0000
CODE_80BE92:
	LDA.l $7F1000,x
	CMP.w #$FFFF
	BNE.b CODE_80BE9E
CODE_80BE9B:
	JMP.w CODE_80BF38

CODE_80BE9E:
	CMP.b !RAM_PLOK_UnknownRAM00004E
	BEQ.b CODE_80BEA5
	JMP.w CODE_80BF2F

CODE_80BEA5:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_80BE9B
	LDA.l $7F1002,x
	CMP.l $7F1004,x
	BCS.b CODE_80BE9B
	INC
	STA.l $7F1002,x
	DEC
	ASL
	STA.b $38
	JSR.w CODE_80BF39
	LDA.l $7F1006,x
	AND.w #$00FF
	BNE.b CODE_80BED8
	LDA.w #$012C
	STA.b $3A
CODE_80BED0:
	LDA.b $38
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00004E
	TAX
	BRA.b CODE_80BF27

CODE_80BED8:
	DEC
	BNE.b CODE_80BEEB
	LDA.w #$012C
	STA.b $3A
CODE_80BEE0:
	LDA.b !RAM_PLOK_UnknownRAM00004E
	SEC
	SBC.b $38
	TAX
	LDA.w #$0002
	BRA.b CODE_80BF27

CODE_80BEEB:
	DEC
	BNE.b CODE_80BEF5
	LDA.w #$0024
	STA.b $3A
	BRA.b CODE_80BED0

CODE_80BEF5:
	DEC
	BNE.b CODE_80BEFF
	LDA.w #$0024
	STA.b $3A
	BRA.b CODE_80BEE0

CODE_80BEFF:
	DEC
	BNE.b CODE_80BF20
	LDA.w #$012C
	STA.b $3A
CODE_80BF07:
	LDA.l $7F1006,x
	XBA
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_81D776,y
	STA.b $06
	LDY.b $38
	LDA.b ($06),y
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00004E
	TAX
	BRA.b CODE_80BF27

CODE_80BF20:
	LDA.w #$1D20
	STA.b $3A
	BRA.b CODE_80BF07

CODE_80BF27:
	LDA.b $3A
	STA.l $7E3000,x
	BRA.b CODE_80BF38

CODE_80BF2F:
	TXA
	CLC
	ADC.w #$0008
	TAX
	JMP.w CODE_80BE92

CODE_80BF38:
	RTS

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

CODE_80BF39:
	LDA.l $7F1002,x
	CMP.l $7F1004,x
	BCC.b CODE_80BF48
	LDA.w #$012A
	BRA.b CODE_80BF4B

CODE_80BF48:
	LDA.w #$0128
CODE_80BF4B:
	STA.b $3C
	LDA.l $7F1000,x
	PHX
	TAX
	LDA.b $3C
	STA.l $7E3000,x
	PLX
	RTS

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

CODE_80BF5B:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80BF65
	JMP.w CODE_80CD9B

CODE_80BF65:
	LDA.w $0A98
	BEQ.b CODE_80BF6D
	DEC.w $0A98
CODE_80BF6D:
	LDA.w #$FFFF
	STA.w $0834
	LDA.w $042C
	PHA
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	CMP.w #$0050
	BCC.b CODE_80BF85
	LDA.w $0814
	STA.w $042C
CODE_80BF85:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_80BF9E
	LDA.w #$001E
	STA.w $0844
	LDA.w $0808
	CMP.w #$0004
	BNE.b CODE_80BF9E
	LDA.w #$0007
	STA.w $0844
CODE_80BF9E:
	JSR.w CODE_80C80E
	STZ.w $0820
	STZ.w $081A
	JSR.w CODE_80BFB8
	JSR.w CODE_80C371
	JSR.w CODE_80C464
	JSR.w CODE_80C5E0
	PLA
	STA.w $042C
	RTS

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

CODE_80BFB8:
	STZ.w $075C
	STZ.w $075E
	STZ.w $0760
	STZ.b !RAM_PLOK_UnknownRAM00004C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$FFF0
	CLC
	ADC.w #$0042
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$001E
	TAX
	JSR.w CODE_80FB76
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80BFEE
	JSR.w CODE_80BBD6
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$BFFF
	CMP.w #$8007
	BNE.b CODE_80BFED
	JMP.w CODE_80C09C

CODE_80BFED:
	RTS

CODE_80BFEE:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	STA.w $075C
	AND.w #$0FFF
	BEQ.b CODE_80BFFB
	JMP.w CODE_80C094

CODE_80BFFB:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80C006
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
CODE_80C006:
	STZ.w $0842
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0040
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$001A
	TAX
	JSR.w CODE_80FB76
	CMP.w #$0001
	BEQ.b CODE_80C02F
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C04E
	AND.w #$0FFF
	BEQ.b CODE_80C04E
	CMP.w #$0009
	BCS.b CODE_80C04E
CODE_80C02F:
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C045
	DEC
	ASL
	TAX
	LDA.w DATA_81E87E,x
	BEQ.b CODE_80C045
	LDA.w #$012C
	STA.w $0838
CODE_80C045:
	LDA.w $0834
	AND.w #$FDFF
	STA.w $0834
CODE_80C04E:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0040
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0022
	TAX
	JSR.w CODE_80FB76
	CMP.w #$0001
	BEQ.b CODE_80C074
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C093
	AND.w #$0FFF
	BEQ.b CODE_80C093
	CMP.w #$0009
	BCS.b CODE_80C093
CODE_80C074:
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C08A
	DEC
	ASL
	TAX
	LDA.w DATA_81E87E,x
	BEQ.b CODE_80C045
	LDA.w #$FED4
	STA.w $0838
CODE_80C08A:
	LDA.w $0834
	AND.w #$FEFF
	STA.w $0834
CODE_80C093:
	RTS

CODE_80C094:
	CMP.w #$0003
	BCC.b CODE_80C09C
	JMP.w CODE_80C142

CODE_80C09C:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80C0B8
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0001
	BEQ.b CODE_80C0B3
	LDA.w #$0002
	STA.w $0842
	BRA.b CODE_80C093

CODE_80C0B3:
	STZ.w $0842
	BRA.b CODE_80C093

CODE_80C0B8:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0001
	BNE.b CODE_80C0C5
	STZ.w $0842
CODE_80C0C5:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_80C0D2
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$0008
	BNE.b CODE_80C093
CODE_80C0D2:
	LDA.w $0842
	BNE.b CODE_80C093
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C0F9
	DEC
	ASL
	TAX
	LDA.w DATA_81E7EE,x
	BEQ.b CODE_80C0F9
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	LDA.w #$FED4
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80C0F9:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$FFF0
	STA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0032
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$001E
	TAX
	JSR.w CODE_80FB76
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C11A
	JSR.w CODE_80BBD6
	RTS

CODE_80C11A:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0003
	BCS.b CODE_80C138
	CMP.w #$0002
	BNE.b CODE_80C12F
	LDA.w #$0001
	STA.w $0842
CODE_80C12F:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C137
	JSR.w CODE_80C2B8
CODE_80C137:
	RTS

CODE_80C138:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w #$0008
	STA.w !RAM_PLOK_Level_Player_YPosLo
CODE_80C142:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	SEC
	SBC.w #$0003
	AND.w #$0FFF
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $38
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$001E
	AND.w #$000E
	TAX
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$4000
	BEQ.b CODE_80C16A
	TXA
	EOR.w #$000F
	BRA.b CODE_80C16C

CODE_80C16A:
	TXA
	INC
CODE_80C16C:
	ASL
	CLC
	ADC.b $38
	TAX
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80C1C2
	LDA.l DATA_83E964,x
	BPL.b CODE_80C17F
	LDA.w #$0000
CODE_80C17F:
	STA.b $38
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80C196
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$1000
	BNE.b CODE_80C196
	LDA.w #$0001
	STA.w $0842
	JMP.w CODE_80C093

CODE_80C196:
	LDA.w $0842
	BEQ.b CODE_80C1B7
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$000F
	CMP.b $38
	BCS.b CODE_80C1AA
	STZ.w $0842
	BRA.b CODE_80C1B7

CODE_80C1AA:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$1000
	BEQ.b CODE_80C1B4
	STZ.w $0842
CODE_80C1B4:
	JMP.w CODE_80C093

CODE_80C1B7:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$000F
	CMP.b $38
	BCS.b CODE_80C1C2
	RTS

CODE_80C1C2:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$3000
	CMP.w #$3000
	BNE.b CODE_80C1D4
	LDA.w #$000A
	STA.w $0746
	INC.b !RAM_PLOK_UnknownRAM00004C
CODE_80C1D4:
	LDA.w #$0001
	STA.w $0820
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	AND.w #$FFF0
	CLC
	ADC.l DATA_83E964,x
	STA.w !RAM_PLOK_Level_Player_YPosLo
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C20A
	DEC
	ASL
	TAY
	LDA.w DATA_81E7EE,y
	BEQ.b CODE_80C20A
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	LDA.w #$FED4
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80C20A:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C219
	CMP.w #$0007
	BEQ.b CODE_80C219
	CMP.w #$0005
	BNE.b CODE_80C224
CODE_80C219:
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80C224
	JMP.w CODE_80C2B4

CODE_80C224:
	TXA
	AND.w #$FFE0
	TAX
	LDA.l DATA_83E964,x
	BPL.b CODE_80C232
	LDA.w #$0000
CODE_80C232:
	STA.b $38
	TXA
	CLC
	ADC.w #$001E
	TAX
	LDA.l DATA_83E964,x
	BPL.b CODE_80C243
	LDA.w #$0000
CODE_80C243:
	CMP.b $38
	BEQ.b CODE_80C2B4
	BCC.b CODE_80C27D
	LDA.l DATA_83E964,x
	SEC
	SBC.b $38
	STA.b $38
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$4000
	BNE.b CODE_80C28D
CODE_80C259:
	LDA.b $38
	STA.w $081A
	STZ.w $0820
	LDA.w $0838
	BPL.b CODE_80C26C
	LDA.w #$0001
	STA.w $0820
CODE_80C26C:
	LDA.w $0838
	CLC
	ADC.w #$000A
	CLC
	ADC.b $38
	STA.w $0838
	RTS

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

CODE_80C27A:
	JMP.w CODE_80B368

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

CODE_80C27D:
	LDA.b $38
	SEC
	SBC.l DATA_83E964,x
	STA.b $38
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$4000
	BNE.b CODE_80C259
CODE_80C28D:
	LDA.b $38
	EOR.w #$FFFF
	STA.w $081A
	STZ.w $0820
	LDA.w $0838
	BMI.b CODE_80C2A3
	LDA.w #$0001
	STA.w $0820
CODE_80C2A3:
	LDA.w $0838
	SEC
	SBC.w #$000A
	SEC
	SBC.b $38
	STA.w $0838
	RTS

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

CODE_80C2B1:
	JMP.w CODE_80B394

CODE_80C2B4:
	STZ.w $081A
	RTS

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

CODE_80C2B8:
	LDA.w $0820
	BEQ.b CODE_80C2D0
	STZ.w $0820
	LDA.w $0838
	BMI.b CODE_80C2C8
	EOR.w #$FFFF
CODE_80C2C8:
	CMP.w #$FF00
	BCS.b CODE_80C2D0
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80C2D0:
	RTS

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

CODE_80C2D1:
	REP.b #$30
	LDA.w $0838
	BMI.b CODE_80C321
	LDA.w $0834
	AND.w #$0100
	BEQ.b CODE_80C320
	STZ.b $38
	LDA.w $0838
	AND.w #$00FF
	CLC
	ADC.w $083A
	STA.w $083A
	CMP.w #$0100
	BCC.b CODE_80C2FD
	SEC
	SBC.w #$00FF
	STA.w $083A
	INC.b $38
CODE_80C2FD:
	LDA.w $0838
	XBA
	AND.w #$00FF
	CLC
	ADC.b $38
	STA.b $38
	BEQ.b CODE_80C320
CODE_80C30B:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0098
	BCC.b CODE_80C319
	JSR.w CODE_80A8D8
CODE_80C319:
	INC.w !RAM_PLOK_Level_Player_XPosLo
	DEC.b $38
	BNE.b CODE_80C30B
CODE_80C320:
	RTS

CODE_80C321:
	LDA.w $0834
	AND.w #$0200
	BEQ.b CODE_80C370
	LDA.w $0838
	EOR.w #$FFFF
	INC
	STA.b $3A
	STZ.b $38
	LDA.b $3A
	AND.w #$00FF
	CLC
	ADC.w $083A
	STA.w $083A
	CMP.w #$0100
	BCC.b CODE_80C34E
	SEC
	SBC.w #$00FF
	STA.w $083A
	INC.b $38
CODE_80C34E:
	LDA.b $3A
	XBA
	AND.w #$00FF
	CLC
	ADC.b $38
	STA.b $38
	BEQ.b CODE_80C370
CODE_80C35B:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0070
	BCS.b CODE_80C369
	JSR.w CODE_80A924
CODE_80C369:
	DEC.w !RAM_PLOK_Level_Player_XPosLo
	DEC.b $38
	BNE.b CODE_80C35B
CODE_80C370:
	RTS

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

CODE_80C371:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0032
	TAY
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80C387
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_80C387
	TYA
	TAY
CODE_80C387:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0018
	TAX
	JSR.w CODE_80FB76
	BEQ.b CODE_80C3EB
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C3AB
	JSR.w CODE_80BC6B
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0002
	BEQ.b CODE_80C3C4
	CMP.w #$0007
	BEQ.b CODE_80C3C4
	RTS

CODE_80C3AB:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BIT.w #$2000
	BNE.b CODE_80C3C4
	AND.w #$0FFF
	CMP.w #$0001
	BEQ.b CODE_80C3C4
	CMP.w #$0002
	BNE.b CODE_80C3EB
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80C3EB
CODE_80C3C4:
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80C3CF
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80C3CF:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C3E2
	DEC
	ASL
	TAX
	LDA.w DATA_81E87E,x
	BEQ.b CODE_80C3E2
	LDA.w #$012C
	STA.w $0838
CODE_80C3E2:
	LDA.w $0834
	AND.w #$FDFF
	STA.w $0834
CODE_80C3EB:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0032
	TAY
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo					;\ Optimization: Junk code
	BEQ.b CODE_80C3FF								;|
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo						;|
	BMI.b CODE_80C3FF								;|
	TYA										;|
	TAY										;/
CODE_80C3FF:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0024
	TAX
	JSR.w CODE_80FB76
	BEQ.b CODE_80C463
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C423
	JSR.w CODE_80BC6B
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0002
	BEQ.b CODE_80C43C
	CMP.w #$0007
	BEQ.b CODE_80C43C
	RTS

CODE_80C423:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BIT.w #$2000
	BNE.b CODE_80C43C
	AND.w #$0FFF
	CMP.w #$0001
	BEQ.b CODE_80C43C
	CMP.w #$0002
	BNE.b CODE_80C463
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80C463
CODE_80C43C:
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80C447
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80C447:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C45A
	DEC
	ASL
	TAX
	LDA.w DATA_81E87E,x
	BEQ.b CODE_80C45A
	LDA.w #$FED4
	STA.w $0838
CODE_80C45A:
	LDA.w $0834
	AND.w #$FEFF
	STA.w $0834
CODE_80C463:
	RTS

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

CODE_80C464:
	REP.b #$30
	STZ.b $3C
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80C475
	CMP.w #$0006
	BNE.b CODE_80C47A
CODE_80C475:
	LDA.w #$0010
	STA.b $3C
CODE_80C47A:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$002E
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$001E
	TAX
	JSR.w CODE_80FB76
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C49C
	AND.w #$0FFF
	CMP.w #$0002
	BEQ.b CODE_80C49C
	JSR.w CODE_80BC6B
CODE_80C49C:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0001
	BNE.b CODE_80C4C4
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_80C4C4
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80C4C4
	CMP.w #$0006
	BEQ.b CODE_80C4C4
	LDA.w #$FC00
	STA.w $0834
	LDA.w #$0022
	STA.w $042A
CODE_80C4C4:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0020
	CLC
	ADC.b $3C
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$001E
	TAX
	JSR.w CODE_80FB76
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C4EB
	JSR.w CODE_80BC6B
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0007
	BEQ.b CODE_80C4F5
CODE_80C4EB:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0001
	BNE.b CODE_80C520
CODE_80C4F5:
	LDA.w $09EC
	BEQ.b CODE_80C500
	LDA.w #$FFFF
	STA.w $09EC
CODE_80C500:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80C520
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	STZ.w $0842
	STZ.w $0742
	STZ.w $0744
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C51F
	LDA.w #$012C
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80C51F:
	RTS

CODE_80C520:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0020
	CLC
	ADC.b $3C
	TAY
	LDX.w #$001A
	TXA
	CLC
	ADC.w !RAM_PLOK_Level_Player_XPosLo
	TAX
	JSR.w CODE_80FB76
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C54E
	JSR.w CODE_80BC6B
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0002
	BEQ.b CODE_80C558
	CMP.w #$0007
	BEQ.b CODE_80C558
	RTS

CODE_80C54E:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0001
	BNE.b CODE_80C580
CODE_80C558:
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80C563
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80C563:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C576
	DEC
	ASL
	TAX
	LDA.w DATA_81E87E,x
	BEQ.b CODE_80C576
	LDA.w #$012C
	STA.w $0838
CODE_80C576:
	LDA.w $0834
	AND.w #$FDFF
	STA.w $0834
	RTS

CODE_80C580:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0020
	CLC
	ADC.b $3C
	TAY
	LDX.w #$0022
	TXA
	CLC
	ADC.w !RAM_PLOK_Level_Player_XPosLo
	TAX
	JSR.w CODE_80FB76
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C5AE
	JSR.w CODE_80BC6B
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0002
	BEQ.b CODE_80C5B8
	CMP.w #$0007
	BEQ.b CODE_80C5B8
	RTS

CODE_80C5AE:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0001
	BNE.b CODE_80C5DF
CODE_80C5B8:
	STZ.w $0838
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BPL.b CODE_80C5C3
	STZ.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
CODE_80C5C3:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BEQ.b CODE_80C5D6
	DEC
	ASL
	TAX
	LDA.w DATA_81E87E,x
	BEQ.b CODE_80C5D6
	LDA.w #$FED4
	STA.w $0838
CODE_80C5D6:
	LDA.w $0834
	AND.w #$FEFF
	STA.w $0834
CODE_80C5DF:
	RTS

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

CODE_80C5E0:
	REP.b #$30
	STZ.b $3C
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80C5F1
	CMP.w #$0006
	BNE.b CODE_80C5F6
CODE_80C5F1:
	LDA.w #$0010
	STA.b $3C
CODE_80C5F6:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$001E
	CLC
	ADC.b $3C
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$001E
	TAX
	JSR.w CODE_80FB76
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80C61B
	AND.w #$0FFF
	CMP.w #$0001
	BEQ.b CODE_80C61B
	JSR.w CODE_80BC6B
CODE_80C61B:
	RTS

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

CODE_80C61C:
	REP.b #$30
	PHA
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BEQ.b CODE_80C627
	PLA
	BRA.b CODE_80C674

CODE_80C627:
	PLA
	STA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ +
	LSR.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
+:
endif
	LDA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BEQ.b CODE_80C646
	ASL.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	SEC
	SBC.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	STA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BEQ.b CODE_80C63E
	BCS.b CODE_80C675
CODE_80C63E:
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BRA.b CODE_80C675

CODE_80C646:
	LDA.w #$0002
	JSL.l CODE_80FD81
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	SEC
	SBC.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	BPL.b CODE_80C662
	STZ.w !RAM_PLOK_Level_Player_CurrentHPLo
	LDA.w #$0001
	STA.w $0766
CODE_80C662:
	LDA.w #$0032
	STA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	LDA.w #$FA88
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80C674:
	RTL

CODE_80C675:
	LDA.w #$0032
	STA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	RTL

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

CODE_80C67C:
	REP.b #$30
	PHA
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BEQ.b CODE_80C687
	PLA
	BRA.b CODE_80C6DB

CODE_80C687:
	PLA
	STA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ +
	LSR.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
+:
endif
	LDA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BEQ.b CODE_80C6A6
	ASL.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	SEC
	SBC.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	STA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BEQ.b CODE_80C69E
	BCS.b CODE_80C6C2
CODE_80C69E:
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BRA.b CODE_80C6C2

CODE_80C6A6:
	LDA.w #$0002
	JSL.l CODE_80FD81
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	SEC
	SBC.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	BPL.b CODE_80C6C2
	STZ.w !RAM_PLOK_Level_Player_CurrentHPLo
	LDA.w #$0001
	STA.w $0766
CODE_80C6C2:
	LDA.w #$0032
	STA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	PHX
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	ASL
	TAX
	LDA.w DATA_81E7CC,x
	PLX
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
CODE_80C6DB:
	RTL

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

CODE_80C6DC:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BEQ.b CODE_80C722
	LDX.w #$0624
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0008
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.b $02,x
	LDA.w #$7000
	STA.b $06,x
	JSR.w CODE_80C723
	DEC.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BNE.b CODE_80C722
	LDA.w $0840
	BEQ.b CODE_80C70B
	INC.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	BRA.b CODE_80C722

CODE_80C70B:
	JSR.w CODE_80C7A3
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$001D
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_80C722:
	RTS

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

CODE_80C723:
	LDA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	AND.w #$0F00
	XBA
	CLC
	ADC.w #$0004
	CLC
	ADC.w $083E
	STA.w $083E
	CMP.w #$0013
	BCC.b CODE_80C74B
	SEC
	SBC.w #$0013
	STA.w $083E
	LDA.w $0840
	INC
	AND.w #$000F
	STA.w $0840
CODE_80C74B:
	LDA.w $0840
	ASL
	CLC
	ADC.w #$0164
	STA.b $04,x
	STZ.b $08,x
	LDA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	CMP.w #$0E00
	BCC.b CODE_80C764
	LDA.w #$8000
	STA.b $08,x
CODE_80C764:
	RTS

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

CODE_80C765:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_BuddyHornetCount
	BEQ.b CODE_80C772
	JSL.l CODE_82DAD8
	BMI.b CODE_80C77C
CODE_80C772:
	LDX.w #$062E
	LDA.w #$FFFF
	STA.b $00,x
	BRA.b CODE_80C7A2

CODE_80C77C:
	LDX.w #$062E
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0008
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w #$0018
	STA.b $02,x
	LDA.w #$2000
	STA.b $06,x
	LDA.b $09
	AND.w #$000C
	LSR
	CLC
	ADC.w #$01EA
	STA.b $04,x
CODE_80C7A2:
	RTS

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

CODE_80C7A3:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0010
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w #$0010
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	LDA.w #$F448
	STA.w $0C20
	LDA.w #$0003
	STA.w $0C22
	LDA.w #$00C8
	STA.w $0C24
	LDA.w #$0032
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0018
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0018
	STA.w $0C1E
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_80C7FE:
	CLC
	ADC.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	CMP.w #$0FFF
	BCC.b CODE_80C80A
	LDA.w #$0FFF
CODE_80C80A:
	STA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	RTL

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

CODE_80C80E:
	REP.b #$30
	LDA.w $0844
	BEQ.b CODE_80C83D
	EOR.w #$FFFF
	INC
	STA.b $38
	LDA.w $0838
	BEQ.b CODE_80C83D
	BMI.b CODE_80C832
	CMP.w $0844
	BCS.b CODE_80C82C
CODE_80C827:
	LDA.w #$0000
	BRA.b CODE_80C83A

CODE_80C82C:
	SEC
	SBC.w $0844
	BRA.b CODE_80C83A

CODE_80C832:
	CMP.b $38
	BCS.b CODE_80C827
	CLC
	ADC.w $0844
CODE_80C83A:
	STA.w $0838
CODE_80C83D:
	RTS

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

CODE_80C83E:
	REP.b #$30
	JSR.w CODE_80C850
	JSR.w CODE_80CA34
	LDA.w $07F8
	BEQ.b CODE_80C84E
	JSR.w CODE_80CDB8
CODE_80C84E:
	PLP
	RTS

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

CODE_80C850:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	DEC
	ASL
	TAX
	LDA.w DATA_81E7FE,x
	BNE.b CODE_80C86E
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	CMP.w #$0008
	BNE.b CODE_80C869
	JSR.w CODE_80C981
	JMP.w CODE_80C93B

CODE_80C869:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80C89D
CODE_80C86E:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	AND.w $0834
	BIT.w #$0200
	BNE.b CODE_80C88E
	BIT.w #$0100
	BEQ.b CODE_80C89D
	LDA.w $042C
	AND.w #$BFFF
	STA.w $042C
	LDA.w DATA_81E81E,x
	JSR.w CODE_80C942
	BRA.b CODE_80C89D

CODE_80C88E:
	LDA.w $042C
	ORA.w #$4000
	STA.w $042C
	LDA.w DATA_81E81E,x
	JSR.w CODE_80C954
CODE_80C89D:
	LDA.w DATA_81E80E,x
	STA.w $0844
	JSR.w CODE_80C80E
	JSR.w CODE_80C2D1
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	DEC
	ASL
	TAX
	LDA.w DATA_81E7EE,x
	BNE.b CODE_80C8BE
	LDA.w DATA_81E84E,x
	BNE.b CODE_80C938
	JSR.w CODE_80C9EB
	BRA.b CODE_80C938

CODE_80C8BE:
	CMP.w #$0001
	BEQ.b CODE_80C912
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	BIT.w #$0800
	BEQ.b CODE_80C8D8
	LDA.w DATA_81E84E,x
	JSR.w CODE_80C96A
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BRA.b CODE_80C8EC

CODE_80C8D8:
	BIT.w #$0400
	BEQ.b CODE_80C8EC
	LDA.w DATA_81E84E,x
	EOR.w #$FFFF
	JSR.w CODE_80C96A
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
CODE_80C8EC:
	LDA.w DATA_81E85E,x
	STA.b $38
	EOR.w #$FFFF
	STA.b $3A
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BEQ.b CODE_80C93E
	BPL.b CODE_80C905
	CMP.b $3A
	BCS.b CODE_80C90D
	LDA.b $38
	BRA.b CODE_80C93B

CODE_80C905:
	CMP.b $38
	BCC.b CODE_80C90D
	LDA.b $3A
	BRA.b CODE_80C93B

CODE_80C90D:
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	BRA.b CODE_80C93E

CODE_80C912:
	LDA.b !RAM_PLOK_UnknownRAM0000AF
	AND.w #$0080
	BEQ.b CODE_80C938
	LDA.w DATA_81E84E,x
	JSR.w CODE_80C96A
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	CMP.w #$0003
	BNE.b CODE_80C932
	LDA.w $080A
	BPL.b CODE_80C932
	LDA.w #$000F
	STA.w $080A
CODE_80C932:
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
CODE_80C938:
	LDA.w DATA_81E85E,x
CODE_80C93B:
	JSR.w CODE_80B5FD
CODE_80C93E:
	JSR.w CODE_80B727
	RTS

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

CODE_80C942:
	CLC
	ADC.w $0838
	BMI.b CODE_80C950
	CMP.w DATA_81E82E,x
	BCC.b CODE_80C950
	LDA.w DATA_81E82E,x
CODE_80C950:
	STA.w $0838
	RTS

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

CODE_80C954:
	STA.b $38
	LDA.w $0838
	SEC
	SBC.b $38
	BPL.b CODE_80C966
	CMP.w DATA_81E83E,x
	BCS.b CODE_80C966
	LDA.w DATA_81E83E,x
CODE_80C966:
	STA.w $0838
	RTS

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

CODE_80C96A:
	REP.b #$30
	CLC
	ADC.w !RAM_PLOK_Level_Player_YSpeedLo
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80C97D
	CMP.w #$F800
	BCS.b CODE_80C97D
	LDA.w #$F800
CODE_80C97D:
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	RTS

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

CODE_80C981:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	AND.w $0834
	BIT.w #$0200
	BNE.b CODE_80C9A3
	BIT.w #$0100
	BEQ.b CODE_80C9B4
	LDA.w $042C
	AND.w #$BFFF
	STA.w $042C
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80C9B4
	JSR.w CODE_80B368
	BRA.b CODE_80C9B4

CODE_80C9A3:
	LDA.w $042C
	ORA.w #$4000
	STA.w $042C
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80C9B4
	JSR.w CODE_80B394
CODE_80C9B4:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80C9E7
	LDA.w $080A
	BMI.b CODE_80C9C3
	DEC.w $080A
	BRA.b CODE_80C9E7

CODE_80C9C3:
	LDA.w #$000A
	STA.w $080A
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	STA.w $0842
	LDA.w #$F768
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	LDA.w #$0034
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_80C9E7:
	LDA.w #$0050
	RTS

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

CODE_80C9EB:
	LDA.w $0742
	BEQ.b CODE_80C9FB
	DEC.w $0742
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	ASL
	ROR.w $073A
	BRA.b CODE_80CA08

CODE_80C9FB:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	ASL
	ROR.w $073A
	BIT.w $073A
	BPL.b CODE_80CA2F
	BVS.b CODE_80CA2F
CODE_80CA08:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80CA2F
	LDA.w DATA_81E86E,x
	BEQ.b CODE_80CA2F
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	STA.w $0842
	STZ.w $0820
	LDA.w $0742
	CMP.w #$0001
	BCS.b CODE_80CA2F
	LDA.w #$0012
	STA.w $0742
CODE_80CA2F:
	RTS

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

CODE_80CA30:
	STZ.w $073A
	RTS

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

CODE_80CA34:
	REP.b #$30
	LDA.w $042E
	AND.w #$7FFF
	STA.w $042E
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BEQ.b CODE_80CA4D
	ORA.w #$8000
	STA.w $042E
	DEC.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
CODE_80CA4D:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_TestDriveSecretWarp
	BCC.b CODE_80CA61
	DEC.w !RAM_PLOK_Level_Player_CostumeTimerLo
	BNE.b CODE_80CA61
	JSR.w CODE_80B8E1
	JSR.w CODE_80D36B
	RTS

CODE_80CA61:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	DEC
	ASL
	TAX
	JMP.w (DATA_80CA6A,x)

DATA_80CA6A:								; Info: Plok vehicle states
	dw CODE_80CBF1							; 01 - Unicycle
	dw CODE_80CC93							; 02 - Truck
	dw CODE_80CBB0							; 03 - Mini rocket
	dw CODE_80CA7A							; 04 - Motorcycle
	dw CODE_80CB5A							; 05 - Helicopter
	dw CODE_80CD17							; 06 - Tank
	dw CODE_80CB97							; 07 - UFO
	dw CODE_80CB73							; 08 - Spring shoes

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

CODE_80CA7A:
	LDA.w $0838
	BPL.b CODE_80CA83
	EOR.w #$FFFF
	INC
CODE_80CA83:
	AND.w #$07C0
	ASL
	ASL
	XBA
	CLC
	ADC.w #$0014
	TAX
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80CA99
	TXA
	CLC
	ADC.w #$000A
	TAX
CODE_80CA99:
	TXA
	XBA
	AND.w #$FF00
	ORA.w #$000B
	JSL.l CODE_82E177
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80CADF
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BRA.b CODE_80CAB7

CODE_80CAAF:
	LDA.w $081C
	STA.w $081A
	BRA.b CODE_80CADF

CODE_80CAB7:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_80CB2A
	LDA.w $080A
	BNE.b CODE_80CACB
	LDA.w #$0007
	STA.w $080A
	BRA.b CODE_80CB2A

CODE_80CACB:
	CMP.w #$000C
	BEQ.b CODE_80CB2A
	CMP.w #$0007
	BCC.b CODE_80CADA
	INC.w $080A
	BRA.b CODE_80CB2A

CODE_80CADA:
	DEC.w $080A
	BRA.b CODE_80CB2A

CODE_80CADF:
	STZ.w $080A
	LDA.w $081A
	STA.w $081C
	BMI.b CODE_80CB02
	CMP.w #$0011
	BCC.b CODE_80CAF5
	LDA.w #$0010
	STA.w $081A
CODE_80CAF5:
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CB1B
CODE_80CAFD:
	LDA.w #$0000
	BRA.b CODE_80CB1E

CODE_80CB02:
	EOR.w #$FFFF
	STA.w $081A
	CMP.w #$0011
	BCC.b CODE_80CB13
	LDA.w #$0010
	STA.w $081A
CODE_80CB13:
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CAFD
CODE_80CB1B:
	LDA.w #$0011
CODE_80CB1E:
	CLC
	ADC.w $081A
	ASL
	TAX
	LDA.w DATA_81E8E4,x
	STA.w $080A
CODE_80CB2A:
	STZ.b $3A
	LDA.b $09
	AND.w #$0004
	BEQ.b CODE_80CB38
	LDA.w #$0002
	STA.b $3A
CODE_80CB38:
	LDA.w $080A
	ASL
	ASL
	TAX
	LDA.w DATA_81E928,x
	CLC
	ADC.b $3A
	STA.w $042A
	LDA.w DATA_81E928+$02,x
	STA.w $07F0
	LDA.w #$0028
	STA.w $07EE
	LDA.w #$0012
	STA.w $07F2
	RTS

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

CODE_80CB5A:
	LDA.w #$03AA
	STA.w $042A
	LDA.w #$002A
	STA.w $07EE
	LDA.w #$002E
	STA.w $07F0
	LDA.w #$0014
	STA.w $07F2
	RTS

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

CODE_80CB73:
	LDA.w #$03D4
	STA.w $042A
	LDA.w #$0034
	STA.w $07EE
	LDA.w #$0038
	STA.w $07F0
	LDA.w #$001A
	STA.w $07F2
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BNE.b CODE_80CB96
	LDA.w #$0036
	STA.w $07EE
CODE_80CB96:
	RTS

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

CODE_80CB97:
	LDA.w #$03D2
	STA.w $042A
	LDA.w #$0032
	STA.w $07EE
	LDA.w #$0036
	STA.w $07F0
	LDA.w #$0018
	STA.w $07F2
	RTS

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

CODE_80CBB0:
	LDA.w #$0346
	STA.w $042A
	LDA.w #$0026
	STA.w $07EE
	LDA.w #$0020
	STA.w $07F0
	LDA.w #$0010
	STA.w $07F2
	LDA.w $080A
	BMI.b CODE_80CBF0
	DEC.w $080A
	BEQ.b CODE_80CBD7
	LDA.w #$0033
	BRA.b CODE_80CBDA

CODE_80CBD7:
	LDA.w #$0032
CODE_80CBDA:
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	AND.w #$000E
	TAX
	LDA.w DATA_81E8D4,x
	STA.w $042A
CODE_80CBF0:
	RTS

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

CODE_80CBF1:
	LDA.w #$0334
	STA.w $042A
	LDA.w #$0008
	STA.b $38
	LDA.w $0838
	BNE.b CODE_80CC17
	INC.w $0846
	LDA.w $0846
	AND.w #$0001
	BEQ.b CODE_80CC11
	LDA.w #$FFC0
	BRA.b CODE_80CC14

CODE_80CC11:
	LDA.w #$0040
CODE_80CC14:
	STA.w $0838
CODE_80CC17:
	BPL.b CODE_80CC1C
	EOR.w #$FF00
CODE_80CC1C:
	XBA
	AND.w #$00FF
	BEQ.b CODE_80CC27
	LDA.w #$0004
	STA.b $38
CODE_80CC27:
	LDA.b $38
	ASL
	ASL
	DEC
	AND.b $09
	BNE.b CODE_80CC3F
	LDA.w #$0047
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_80CC3F:
	INC.w $080C
	LDA.w $080C
	CMP.b $38
	BCC.b CODE_80CC7B
	STZ.w $080C
	LDA.w $0838
	BPL.b CODE_80CC64
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CC6C
CODE_80CC59:
	LDA.w $080A
	DEC
	BPL.b CODE_80CC62
	LDA.w #$0002
CODE_80CC62:
	BRA.b CODE_80CC78

CODE_80CC64:
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CC59
CODE_80CC6C:
	LDA.w $080A
	INC
	CMP.w #$0003
	BCC.b CODE_80CC78
	LDA.w #$0000
CODE_80CC78:
	STA.w $080A
CODE_80CC7B:
	LDA.w $080A
	ASL
	CLC
	ADC.w #$001A
	STA.w $07EE
	LDA.w #$0006
	STA.w $07F0
	LDA.w #$000C
	STA.w $07F2
	RTS

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

CODE_80CC93:
	STZ.w $080A
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80CCAB
	LDA.w #$0001
	STA.w $080A
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80CCD8
	LDA.w #$0002
	BRA.b CODE_80CCD5

CODE_80CCAB:
	LDA.w $081A
	BMI.b CODE_80CCC2
	CMP.w #$0002
	BCC.b CODE_80CCD8
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CCD2
CODE_80CCBD:
	LDA.w #$0001
	BRA.b CODE_80CCD5

CODE_80CCC2:
	EOR.w #$FFFF
	CMP.w #$0002
	BCC.b CODE_80CCD8
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CCBD
CODE_80CCD2:
	LDA.w #$0002
CODE_80CCD5:
	STA.w $080A
CODE_80CCD8:
	STZ.b $3A
	LDA.b $09
	AND.w #$0004
	BEQ.b CODE_80CCE6
	LDA.w #$0006
	STA.b $3A
CODE_80CCE6:
	LDA.b $09
	AND.w #$0003
	CMP.w #$0001
	BNE.b CODE_80CD10
	LDA.w $080A
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	TAX
	LDA.w DATA_81E898,x
	CLC
	ADC.b $3A
	STA.w $042A
	LDA.w DATA_81E898+$02,x
	STA.w $07EE
	LDA.w DATA_81E898+$04,x
	STA.w $07F0
CODE_80CD10:
	LDA.w #$000E
	STA.w $07F2
	RTS

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

CODE_80CD17:
	STZ.w $080A
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80CD2F
	LDA.w #$0001
	STA.w $080A
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_80CD5C
	LDA.w #$0002
	BRA.b CODE_80CD59

CODE_80CD2F:
	LDA.w $081A
	BMI.b CODE_80CD46
	CMP.w #$0002
	BCC.b CODE_80CD5C
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CD56
CODE_80CD41:
	LDA.w #$0001
	BRA.b CODE_80CD59

CODE_80CD46:
	EOR.w #$FFFF
	CMP.w #$0002
	BCC.b CODE_80CD5C
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CD41
CODE_80CD56:
	LDA.w #$0002
CODE_80CD59:
	STA.w $080A
CODE_80CD5C:
	STZ.b $3A
	LDA.b $09
	AND.w #$0004
	BEQ.b CODE_80CD6A
	LDA.w #$0006
	STA.b $3A
CODE_80CD6A:
	LDA.b $09
	AND.w #$0003
	CMP.w #$0001
	BNE.b CODE_80CD94
	LDA.w $080A
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	TAX
	LDA.w DATA_81E8B6,x
	CLC
	ADC.b $3A
	STA.w $042A
	LDA.w DATA_81E8B6+$02,x
	STA.w $07EE
	LDA.w DATA_81E8B6+$04,x
	STA.w $07F0
CODE_80CD94:
	LDA.w #$0016
	STA.w $07F2
	RTS

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

CODE_80CD9B:
	REP.b #$30
	JSR.w CODE_80BF65
	RTS

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

CODE_80CDA1:
	REP.b #$30
	DEC
	ASL
	TAX
	LDA.w $0740
	BEQ.b CODE_80CDAF
	STZ.w $0738
	RTS

CODE_80CDAF:
	LDA.w DATA_81E7DE,x
	STA.w $0740
	JMP.w (DATA_80CE0E,x)

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

CODE_80CDB8:
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	ASL
	TAX
	LDA.w DATA_81E95C,x
	STA.b $38
	LDA.w $07F8
	DEC
	ASL
	ASL
	TAY
	LDA.b ($38),y
	BPL.b CODE_80CDD4
	STZ.w $07F8
	STZ.w $07FA
	RTS

CODE_80CDD4:
	STA.w $07F0
	LDA.b $09
	AND.w #$0003
	CMP.w #$0001
	BNE.b CODE_80CDE9
	LDA.w $07FA
	BEQ.b CODE_80CDEA
	DEC.w $07FA
CODE_80CDE9:
	RTS

CODE_80CDEA:
	INY
	INY
	LDA.b ($38),y
	STA.w $07FA
	INC.w $07F8
	RTS

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

CODE_80CDF5:
	LDA.w #$0001
	STA.w $07F8
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	ASL
	TAX
	LDA.w DATA_81E95C,x
	STA.b $38
	LDY.w #$0002
	LDA.b ($38),y
	STA.w $07FA
	RTS

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

DATA_80CE0E:
	dw CODE_80CF86
	dw CODE_80CE95
	dw CODE_80CE2F
	dw CODE_80D00B
	dw CODE_80D0AE
	dw CODE_80D10D
	dw CODE_80D198
	dw CODE_80D6C7

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

CODE_80CE1E:
	REP.b #$30
	RTS

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

CODE_80CE21:
	REP.b #$30
	LDA.w #$002D
	STA.b $38
	NOP #3								; Optimization: Useless NOPs. Probably a JSR that was removed
	JSR.w CODE_80B84B
	RTS

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

CODE_80CE2F:
	LDA.w $07F8
	BNE.b CODE_80CE46
	JSR.w CODE_80CDF5
	LDA.w #$003B
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_80CE46:
	LDA.w $07FC
	INC
	STA.w $07FC
	LDX.w #$0000
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80CE61
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0018
	BRA.b CODE_80CE68

CODE_80CE61:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0018
CODE_80CE68:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$000E
	STA.w $0A9C
	LDA.w #$3810
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	STZ.w $0AA2
	STZ.w $0AA8
	STZ.w $0AA0
	LDA.w #$0013
	STA.w $0AA6
	JSL.l CODE_82CD44
	RTS

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

CODE_80CE95:
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80CEA6
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0018
	BRA.b CODE_80CEAD

CODE_80CEA6:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0018
CODE_80CEAD:
	STA.w $0A9A
	STA.w $0C1C
	LDA.w $080A
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w DATA_81E8B0,x
	STA.w $0A9C
	STA.w $0C1E
	LDA.w #$3805
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	LDA.w #$0000
	STA.w $0AA8
	LDA.w $080A
	ASL
	TAX
	LDA.w DATA_81E8AA,x
	STA.w $0AA0
	LDA.w #$0006
	STA.w $0AA2
	LDA.w #$0019
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$003C
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$000C
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$FFFC
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$0005
	STA.w $0C26
	LDA.w $042C
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_80CF2A:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_80CF85
	LDA.b $31
	AND.w #$0007
	ASL
	ASL
	CLC
	ADC.w #$0008
	STA.b $38
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80CF4E
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.b $38
	BRA.b CODE_80CF54

CODE_80CF4E:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b $38
CODE_80CF54:
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C1E
	LDA.w #$000C
	STA.w $0C1A
	LDA.w #$FFF6
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$0032
	STA.w $0C26
	LDA.w $042C
	STA.w $0C28
	JSL.l CODE_82D5AB
CODE_80CF85:
	RTS

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

CODE_80CF86:
	LDA.w $07F8
	BNE.b CODE_80CF9D
	JSR.w CODE_80CDF5
	LDA.w #$0030
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_80CF9D:
	LDA.w $07FC
	INC
	STA.w $07FC
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80D008
	LDX.w #$0000
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80CFBF
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$000C
	BRA.b CODE_80CFC6

CODE_80CFBF:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$000C
CODE_80CFC6:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0A9C
	JSR.w CODE_80D519
	LDA.w #$380B
	STA.w $0AA4
	LDA.w $042C
	AND.w #$F000
	ORA.w #$0C00
	STA.w $0A9E
	LDA.w #$0004
	STA.w $0AA2
	LDA.w #$0014
	STA.w $0AA8
	LDA.w $07FC
	AND.w #$007C
	LSR
	TAX
	LDA.w DATA_81AE8A,x
	STA.w $0AA0
	LDA.w #$001E
	STA.w $0AA6
	JSL.l CODE_82CD44
CODE_80D008:
	BRA.b CODE_80D00A

CODE_80D00A:
	RTS

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

CODE_80D00B:
	REP.b #$30
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80D01E
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0000
	BRA.b CODE_80D025

CODE_80D01E:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0000
CODE_80D025:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0008
	STA.w $0A9C
	LDA.w #$3012
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	LDA.w #$0028
	STA.w $0AA8
	LDA.w #$FCE0
	STA.w $0AA0
	LDA.w #$0002
	STA.w $0AA2
	JSR.w CODE_80D06D
	LDA.w #$0064
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0039
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	RTS

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

CODE_80D06D:
	STA.b $3A
	LDA.w $042C
	STA.w $0A9E
	LDA.w $0838
	BPL.b CODE_80D081
	EOR.w #$FF00
	CLC
	ADC.w #$0100
CODE_80D081:
	XBA
	AND.w #$00FF
	STA.b $38
	BEQ.b CODE_80D09F
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80D09A
	LDA.w $0838
	BPL.b CODE_80D09F
CODE_80D096:
	LDA.b $3A
	BRA.b CODE_80D0AA

CODE_80D09A:
	LDA.w $0838
	BPL.b CODE_80D096
CODE_80D09F:
	LDA.b $3A
	CLC
	ADC.b $38
	CMP.b $3A
	BCS.b CODE_80D0AA
	LDA.b $3A
CODE_80D0AA:
	STA.w $0AA2
	RTS

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

CODE_80D0AE:
	REP.b #$30
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80D0C1
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$000C
	BRA.b CODE_80D0C8

CODE_80D0C1:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$000C
CODE_80D0C8:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0020
	STA.w $0A9C
	LDA.w #$3011
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	LDA.w #$0028
	STA.w $0AA8
	LDA.w #$0000
	STA.w $0AA0
	LDA.w #$0002
	STA.w $0AA2
	LDA.w #$003C
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0039
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	RTS

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

CODE_80D10D:
	REP.b #$30
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80D120
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0020
	BRA.b CODE_80D127

CODE_80D120:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0020
CODE_80D127:
	STA.w $0A9A
	STA.w $0C1C
	LDA.w $080A
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w DATA_81E8CE,x
	STA.w $0A9C
	STA.w $0C1E
	LDA.w #$3013
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	LDA.w #$003C
	STA.w $0AA8
	LDA.w $080A
	ASL
	TAX
	LDA.w DATA_81E8C8,x
	STA.w $0AA0
	LDA.w #$0003
	STA.w $0AA2
	LDA.w #$0023
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0037
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	DEC
	ASL
	TAX
	LDA.w $042C
	BIT.w #$4000
	BEQ.b CODE_80D191
	LDA.w #$0200
	JSR.w CODE_80C942
	BRA.b CODE_80D197

CODE_80D191:
	LDA.w #$0200
	JSR.w CODE_80C954
CODE_80D197:
	RTS

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

CODE_80D198:
	REP.b #$30
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80D1AB
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0024
	BRA.b CODE_80D1B2

CODE_80D1AB:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0024
CODE_80D1B2:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$000A
	STA.w $0A9C
	LDA.w #$300B
	STA.w $0AA4
	LDA.w #$0000
	STA.w $0AA8
	LDA.w #$0000
	STA.w $0AA0
	LDA.w #$0006
	JSR.w CODE_80D06D
	STA.w $0AA2
	LDA.w $0A9E
	ORA.w #$0C00
	STA.w $0A9E
	LDA.w #$001C
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0036
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	RTS

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

CODE_80D1FD:
	JSL.l CODE_809FE0
	JSR.w CODE_80B903
	JSR.w CODE_80B259
	JSR.w CODE_80FACD
	JSL.l CODE_809FE0
	LDA.w #$003F
	STA.w $0822
	JSL.l CODE_809FE0
	JSR.w CODE_80F809
CODE_80D21B:
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.w $067B
	SEC
	SBC.b #$02
	STA.w $067B
	REP.b #$20
	LDA.w #$0100
	JSR.w CODE_80FADF
	BPL.b CODE_80D21B
	JSL.l CODE_809FE0
	JSR.w CODE_80A20C
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	LDA.w $066C
	BNE.b CODE_80D25F
	LDA.w #$0004
	INC
	XBA
	AND.w #$FF00
	ORA.w #$0001
	JSL.l CODE_82E177
CODE_80D25F:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	LDA.w #$0050
	STA.w $0C24
	LDA.w #$0050
	STA.w $0C26
	LDX.w #$0000
	LDY.w #$0001
CODE_80D283:
	JSL.l CODE_809FE0
	PHX
	PHY
	JSL.l CODE_82D5F4
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	PLY
	PLX
	DEY
	BNE.b CODE_80D283
	LDA.w DATA_81DBF8,x
	CMP.w #$FFFF
	BEQ.b CODE_80D2C0
	STA.w $0C20
	INX
	INX
	LDA.w DATA_81DBF8,x
	STA.w $0C22
	INX
	INX
	LDA.w DATA_81DBF8,x
	STA.w $0C28
	INX
	INX
	LDY.w DATA_81DBF8,x
	INX
	INX
	JSL.l CODE_82D5AB
	BRA.b CODE_80D283

CODE_80D2C0:
	STZ.w $07F8
	LDA.w #$001E
CODE_80D2C6:
	PHA
	JSL.l CODE_809FE0
	JSL.l CODE_82D5F4
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BNE.b CODE_80D2DC
	STZ.w $080A
	JSR.w CODE_80CA34
	BRA.b CODE_80D2DF

CODE_80D2DC:
	JSR.w CODE_80D30E
CODE_80D2DF:
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	PLA
	DEC
	BPL.b CODE_80D2C6
CODE_80D2E9:
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.w $067B
	CLC
	ADC.b #$02
	STA.w $067B
	REP.b #$20
	LDA.w #$0000
	JSR.w CODE_80FB33
	BPL.b CODE_80D2E9
	JSR.w CODE_80FACD
	LDA.w $066C
	BNE.b CODE_80D30D
	JSR.w CODE_80846B
CODE_80D30D:
	RTL

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

CODE_80D30E:
	PHP
CODE_80D30F:
	LDA.w $042E
	AND.w #$7FFF
	STA.w $042E
	LDX.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BEQ.b CODE_80D326
	ORA.w #$8000
	STA.w $042E
	DEC.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
CODE_80D326:
	DEC.w !RAM_PLOK_Level_Player_CostumeTimerLo
	BNE.b CODE_80D333
	JSR.w CODE_80B8E1
	JSR.w CODE_80D36B
	PLP
	RTS

CODE_80D333:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BEQ.b CODE_80D369
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	ASL
	TAX
	LDA.w DATA_81AABC,x
	STA.b $38
	LDY.w #$0000
	LDA.b ($38),y
	STA.w $07EE
	INY
	INY
	LDA.b ($38),y
	STA.w $07F0
	INY
	INY
	LDA.b ($38),y
	STA.w $07F2
	LDA.w #$001E
	STA.w $0822
	LDA.w $07F8
	BEQ.b CODE_80D369
	JSR.w CODE_80D403
CODE_80D369:
	PLP
	RTS

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

CODE_80D36B:
	LDA.w $066C
	BNE.b CODE_80D377
	LDA.w #$0003
	JSL.l CODE_80FD72
CODE_80D377:
	JSL.l CODE_809FE0
	JSR.w CODE_80F809
CODE_80D37E:
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.w $067B
	CMP.b #$03
	BCC.b CODE_80D391
	SEC
	SBC.b #$02
	STA.w $067B
CODE_80D391:
	REP.b #$20
	LDA.w #$0100
	JSR.w CODE_80FADF
	BPL CODE_80D37E
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	LDA.w #$003F
	STA.w $0822
	STZ.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	STZ.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	JSR.w CODE_80B3C6
	JSL.l CODE_809FE0
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	JSR.w CODE_80C7A3
	JSL.l CODE_809FE0
	JSL.l CODE_82D3CB
	JSL.l CODE_82D7D2
	JSL.l CODE_82D5F4
	JSR.w CODE_80A20C
	JSL.l CODE_809FE0
CODE_80D3DE:
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.w $067B
	CLC
	ADC.b #$02
	STA.w $067B
	REP.b #$20
	LDA.w #$0000
	JSR.w CODE_80FB33
	BPL.b CODE_80D3DE
	JSR.w CODE_80FACD
	LDA.w $066C
	BNE.b CODE_80D402
	JSR.w CODE_808448
CODE_80D402:
	RTS

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

CODE_80D403:
	LDA.w DATA_81AAEA,x
	STA.b $38
	LDA.w $07F8
	DEC
	ASL
	ASL
	TAY
	LDA.b ($38),y
	BPL.b CODE_80D41A
	STZ.w $07F8
	STZ.w $07FA
	RTS

CODE_80D41A:
	STA.w $07F0
	LDA.b $09
	AND.w #$0003
	CMP.w #$0001
	BNE.b CODE_80D42F
	LDA.w $07FA
	BEQ.b CODE_80D430
	DEC.w $07FA
CODE_80D42F:
	RTS

CODE_80D430:
	INY
	INY
	LDA.b ($38),y
	STA.w $07FA
	INC.w $07F8
	RTS

CODE_80D43B:
	LDA.w #$0001
	STA.w $07F8
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	ASL
	TAX
	LDA.w DATA_81AAEA,x
	STA.b $38
	LDY.w #$0002
	LDA.b ($38),y
	STA.w $07FA
	RTS

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

CODE_80D454:
	LDA.w $0740
	BEQ.b CODE_80D45D
	STZ.w $0738
	RTS

CODE_80D45D:
	LDA.w #$0010
	STA.w $0740
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	CMP.w #$0004
	BNE.b CODE_80D471
	LDA.w #$0026
	STA.w $0740
CODE_80D471:
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	DEC
	ASL
	TAX
	JMP.w (DATA_80D47A,x)

DATA_80D47A:								; Info: Plok Costume states
	dw CODE_80D488							; 01 - Boxer (1 fist attack)
	dw CODE_80D4A2							; 02 - Boxer (2 fist attack)
	dw CODE_80D531							; 03 - Rocket launcher (shoot in 3 directions)
	dw CODE_80D59B							; 04 - Rocket launcher (shoot in spread)
	dw CODE_80D65A							; 05 - Hunter with blunderbus
	dw CODE_80D734							; 06 - Arsonist
	dw CODE_80D7B5							; 07 - Cowboy

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

CODE_80D488:
	LDA.w #$0022
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSR.w CODE_80D43B
	JSR.w CODE_80D4CC
	JSL.l CODE_82CD44
	RTS

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

CODE_80D4A2:
	LDA.w #$0022
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSR.w CODE_80D43B
	JSR.w CODE_80D4CC
	JSL.l CODE_82CD44
	JSR.w CODE_80D4CC
	LDA.w $042C
	EOR.w #$4000
	STA.w $0A9E
	JSL.l CODE_82CD44
	RTS

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

CODE_80D4CC:
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80D4DD
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0008
	BRA.b CODE_80D4E4

CODE_80D4DD:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0008
CODE_80D4E4:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0A9C
	JSR.w CODE_80D519
	LDA.w #$3804
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	LDA.w #$0000
	STA.w $0AA8
	LDA.w #$0000
	STA.w $0AA0
	LDA.w #$0005
	STA.w $0AA2
	LDA.w #$001C
	STA.w $0AA6
	RTS

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

CODE_80D519:
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80D526
	CMP.w #$0006
	BNE.b CODE_80D530
CODE_80D526:
	LDA.w $0A9C
	CLC
	ADC.w #$0008
	STA.w $0A9C
CODE_80D530:
	RTS

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

CODE_80D531:
	LDA.w #$0024
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDX.w #$0006
CODE_80D543:
	LDA.w $042C
	AND.w #$4000
	BEQ.b CODE_80D557
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w DATA_81AD6E,x
	STA.w $0A9A
	BRA.b CODE_80D561

CODE_80D557:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w DATA_81AD66,x
	STA.w $0A9A
CODE_80D561:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w DATA_81AD76,x
	STA.w $0A9C
	JSR.w CODE_80D519
	LDA.w DATA_81AD4E,x
	STA.w $0AA4
	LDA.w DATA_81ADAE,x
	STA.w $0A9E
	LDA.w #$0000
	STA.w $0AA8
	LDA.w DATA_81ADC6,x
	STA.w $0AA0
	LDA.w DATA_81ADDE,x
	STA.w $0AA2
	LDA.w #$001E
	STA.w $0AA6
	JSL.l CODE_82CD44
	DEX
	DEX
	BPL.b CODE_80D543
	RTS

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

CODE_80D59B:
	LDA.w #$0024
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDX.w #$000E
CODE_80D5AD:
	LDA.w $042C
	AND.w #$4000
	BEQ.b CODE_80D5C1
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w DATA_81AD8E,x
	STA.w $0A9A
	BRA.b CODE_80D5CB

CODE_80D5C1:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w DATA_81AD7E,x
	STA.w $0A9A
CODE_80D5CB:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w DATA_81AD9E,x
	STA.w $0A9C
	JSR.w CODE_80D519
	LDA.w DATA_81AD56,x
	STA.w $0AA4
	LDA.w DATA_81ADB6,x
	STA.w $0A9E
	LDA.w #$0000
	STA.w $0AA8
	LDA.w DATA_81ADCE,x
	STA.w $0AA0
	LDA.w DATA_81ADE6,x
	STA.w $0AA2
	LDA.w #$001E
	STA.w $0AA6
	JSL.l CODE_82CD44
	DEX
	DEX
	BPL.b CODE_80D5AD
	RTS

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

CODE_80D605:
	LDA.b $31
	AND.w #$0007
	ASL
	ASL
	CLC
	ADC.w #$0008
	STA.b $38
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80D622
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.b $38
	BRA.b CODE_80D628

CODE_80D622:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b $38
CODE_80D628:
	STA.w $0C1C
	LDA.w $0A9C
	STA.w $0C1E
	LDA.w #$000B
	STA.w $0C1A
	LDA.w #$FFF6
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$0032
	STA.w $0C26
	LDA.w $042C
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_80D65A:
	LDA.w #$0023
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSR.w CODE_80D43B
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80D67D
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$000C
	BRA.b CODE_80D684

CODE_80D67D:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$000C
CODE_80D684:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0A9C
	JSR.w CODE_80D519
	LDA.w #$380A
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	JSR.w CODE_80D605
	LDX.w #$000C
CODE_80D6A6:
	LDA.w #$0000
	STA.w $0AA8
	LDA.w DATA_81AE04,x
	STA.w $0AA0
	LDA.w DATA_81ADF6,x
	STA.w $0AA2
	LDA.w #$000F
	STA.w $0AA6
	JSL.l CODE_82CD44
	DEX
	DEX
	BPL.b CODE_80D6A6
	RTS

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

CODE_80D6C7:
	LDA.w #$0035
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSR.w CODE_80D43B
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80D6EA
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$000C
	BRA.b CODE_80D6F1

CODE_80D6EA:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$000C
CODE_80D6F1:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0A9C
	LDA.w #$380A
	STA.w $0AA4
	LDA.w $042C
	ORA.w #$0C00
	STA.w $0A9E
	JSR.w CODE_80D605
	LDX.w #$000C
CODE_80D713:
	LDA.w #$0000
	STA.w $0AA8
	LDA.w DATA_81AE04,x
	STA.w $0AA0
	LDA.w DATA_81ADF6,x
	STA.w $0AA2
	LDA.w #$000F
	STA.w $0AA6
	JSL.l CODE_82CD44
	DEX
	DEX
	BPL.b CODE_80D713
	RTS

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

CODE_80D734:
	LDA.w $07F8
	BNE.b CODE_80D74B
	LDA.w #$0026
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSR.w CODE_80D43B
CODE_80D74B:
	LDA.w $07FC
	INC
	STA.w $07FC
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80D7B4
	LDX.w #$0000
	LDA.w $042C
	BIT.w #$4000
	BNE.b CODE_80D76D
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$000C
	BRA.b CODE_80D774

CODE_80D76D:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$000C
CODE_80D774:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0A9C
	JSR.w CODE_80D519
	LDA.w #$380B
	STA.w $0AA4
	LDA.w $042C
	STA.w $0A9E
	LDA.w #$0004
	STA.w $0AA2
	LDA.w #$0028
	STA.w $0AA8
	LDA.w $07FC
	AND.w #$007C
	LSR
	TAX
	LDA.w DATA_81AE12,x
	STA.w $0AA0
	LDA.w #$001E
	STA.w $0AA6
	JSL.l CODE_82CD44
CODE_80D7B4:
	RTS

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

CODE_80D7B5:
	LDA.w $07F8
	BNE.b CODE_80D819
	LDA.w #$0025
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSR.w CODE_80D43B
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_80D7DD
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0014
	BRA.b CODE_80D7E4

CODE_80D7DD:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0014
CODE_80D7E4:
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0012
	STA.w $0A9C
	JSR.w CODE_80D519
	LDA.w #$200F
	STA.w $0AA4
	LDA.w $042C
	ORA.w #$0C00
	STA.w $0A9E
	LDA.w #$0000
	STA.w $0AA8
	STA.w $0AA0
	STA.w $0AA2
	LDA.w #$0020
	STA.w $0AA6
	JSL.l CODE_82CD44
CODE_80D819:
	RTS

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

; Note: Related to the amulet

CODE_80D81A:
	LDA.w $0808
	BEQ.b CODE_80D822
CODE_80D81F:
	JMP.w CODE_80D8B7

CODE_80D822:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80D81F
	CMP.w #!Define_PLOK_LevelID_AkrillicWomackSpider
	BEQ.b CODE_80D897
	CMP.w #!Define_PLOK_LevelID_AkrillicThePenkinos
	BEQ.b CODE_80D897
	CMP.w #!Define_PLOK_LevelID_AkrillicRockyfella
	BEQ.b CODE_80D897
	LDA.w !RAM_PLOK_Level_Player_ShellCounter
	BEQ.b CODE_80D897
	LDA.w !RAM_PLOK_Level_Player_AmuletPowerTimerLo
	CMP.w #$02EB
	BCS.b CODE_80D897
	LDA.w $0954
	BNE.b CODE_80D872
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	BIT.w #$0020
	BEQ.b CODE_80D897
	BIT.w #$0010
	BNE.b CODE_80D897
	INC.w $0954
	LDA.w #$3200
	STA.w $0C28
	JSR.w CODE_80D8BB
	DEC.w !RAM_PLOK_Level_Player_ShellCounter
	LDA.w !RAM_PLOK_Level_Player_AmuletPowerTimerLo
	CLC
	ADC.w #$0014
	STA.w !RAM_PLOK_Level_Player_AmuletPowerTimerLo
	BRA.b CODE_80D897

CODE_80D872:
	LDA.b !RAM_PLOK_UnknownRAM0000AE
	BIT.w #$0010
	BEQ.b CODE_80D897
	BIT.w #$0020
	BNE.b CODE_80D897
	STZ.w $0954
	LDA.w #$7200
	STA.w $0C28
	JSR.w CODE_80D8BB
	DEC.w !RAM_PLOK_Level_Player_ShellCounter
	LDA.w !RAM_PLOK_Level_Player_AmuletPowerTimerLo
	CLC
	ADC.w #$0014
	STA.w !RAM_PLOK_Level_Player_AmuletPowerTimerLo
CODE_80D897:
	LDA.w $0956
	BEQ.b CODE_80D8B7
	CMP.w #$001A
	BCC.b CODE_80D8A6
	LDA.w #$0496
	BRA.b CODE_80D8A9

CODE_80D8A6:
	LDA.w #$0494
CODE_80D8A9:
	STA.w $042A
	DEC.w $0956
	LDA.w #$000E
	STA.w $07EE
	BRA.b CODE_80D8BA

CODE_80D8B7:
	STZ.w $0956
CODE_80D8BA:
	RTS

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

CODE_80D8BB:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C1E
	LDA.w #$0010
	STA.w $0C1A
	LDA.w #$0050
	STA.w $0C24
	LDA.w #$0028
	STA.w $0C26
	LDA.w #$F8F8
	STA.w $0C20
	LDA.w #$0002
	STA.w $0C22
	JSL.l CODE_82D5AB
	LDA.w #$001E
	STA.w $0956
	RTS

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

CODE_80D8F0:
	SEP.b #$20
	LDA.b #(PLOK_Tilemap_StageTransformationDataPtrs>>16)&$7F
	PHA
	PLB
	REP.b #$30
	LDA.w $0848
	ASL
	TAY
	LDX.w PLOK_SizeOfTilemap_StageTransformationData,y
	DEX
	DEX
	LDA.w PLOK_Tilemap_StageTransformationDataPtrs,y
	STA.b $06
CODE_80D907:
	TXY
	LDA.b ($06),y
	STA.l PLOK_Level_StageTransformationData[$00].LevelDataPtr,x
	DEX
	DEX
	BPL.b CODE_80D907
	SEP.b #$20
	LDA.b #$01
	PHA
	PLB
	REP.b #$30
	LDX.w #$001E
CODE_80D91D:
	LDA.w #$FFFF
	STA.w $0872,x
	STZ.w $0892,x
	STZ.w $08B2,x
	STZ.w $0852,x
	STZ.w $08D2,x
	DEX
	DEX
	BPL.b CODE_80D91D
	RTS

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

CODE_80D934:
	PHP
	REP.b #$30
	LDY.w #$001E
	LDX.w #$0000
CODE_80D93D:
	LDA.l PLOK_Level_StageTransformationData[$00].LevelDataPtr,x
	CMP.w #$FFFF
	BEQ.b CODE_80D9B0
	LDA.l PLOK_Level_StageTransformationData[$00].AnimationFlags,x
	BEQ.b CODE_80D9A6
	BIT.w #$0003
	BEQ.b CODE_80D954
	JMP.w CODE_80D9E7

CODE_80D954:
	LDA.w $08B2,y
	BEQ.b CODE_80D95F
	DEC
	STA.w $08B2,y
	BRA.b CODE_80D981

CODE_80D95F:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.l PLOK_Level_StageTransformationData[$00].Unknown1,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_80D9A6
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.l PLOK_Level_StageTransformationData[$00].Unknown2,x
	CLC
	ADC.w #$0020
	CMP.w #$0040
	BCS.b CODE_80D9A6
CODE_80D981:
	LDA.l PLOK_Level_StageTransformationData[$00].AnimationFlags,x
	LSR
	LSR
	STA.l PLOK_Level_StageTransformationData[$00].AnimationFlags,x
	BIT.w #$0003
	BNE.b CODE_80D997
	ORA.w #$0002
	STA.l PLOK_Level_StageTransformationData[$00].AnimationFlags,x
CODE_80D997:
	LDA.l PLOK_Level_StageTransformationData[$00].Unknown1,x
	CMP.w #$FFFF
	BEQ.b CODE_80D9A3
	JSR.w CODE_80D9B2
CODE_80D9A3:
	JSR.w CODE_80DA9B
CODE_80D9A6:
	TXA
	CLC
	ADC.w #$0014
	TAX
	DEY
	DEY
	BPL.b CODE_80D93D
CODE_80D9B0:
	PLP
	RTS

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

CODE_80D9B2:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C1C
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C1E
	LDA.w #$0001
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

; Note: Something related to stage transformations, like when you hit targets.

CODE_80D9E7:
	REP.b #$30
	LDA.w $0852,y
	BEQ.b CODE_80D9F5
	DEC
	STA.w $0852,y
	JMP.w CODE_80DA98

CODE_80D9F5:
	LDA.w $0872,y
	BPL.b CODE_80DA0A
	JSR.w CODE_80DA9B
	LDA.b $09
	AND.w #$0007
	CMP.l PLOK_Level_StageTransformationData[$00].FrameSlot,x
	BNE.b CODE_80D9A6
	BRA.b CODE_80DA1C

CODE_80DA0A:
	INC
	STA.w $0872,y
	LDA.l PLOK_Level_StageTransformationData[$00].FrameSpeed,x
	AND.w #$00FF
	CMP.w $0872,y
	BEQ.b CODE_80DA1C
	BCS.b CODE_80DA98
CODE_80DA1C:
	LDA.w #$0000
	STA.w $0872,y
	LDA.l PLOK_Level_StageTransformationData[$00].LevelDataPtr,x
	STA.b $19
	LDA.w $0892,y
	PHX
	PHY
	CLC
	ADC.l PLOK_Level_StageTransformationData[$00].FrameIndex,x
	STA.b $38
	ASL
	CLC
	ADC.b $38
	PHX
	TAX
	LDA.l PLOK_Tilemap_StageTransformationFrameDataPtrs,x
	STA.b $15
	LDA.l PLOK_Tilemap_StageTransformationFrameDataPtrs+$02,x
	AND.w #$00FF
	STA.b $17
	PLX
	CMP.w #$00FF
	BNE.b CODE_80DA58
	LDA.b $15
	PLY
	PLX
	STA.w $0852,y
	BRA.b CODE_80DA67

CODE_80DA58:
	LDA.l PLOK_Level_StageTransformationData[$00].FrameHeight,x
	TAY
	LDA.l PLOK_Level_StageTransformationData[$00].FrameWidth,x
	TAX
	JSR.w CODE_80DABF
	PLY
	PLX
CODE_80DA67:
	LDA.w $0892,y
	INC
	STA.w $0892,y
	CMP.l PLOK_Level_StageTransformationData[$00].FrameCount,x
	BCC.b CODE_80DA98
	LDA.l PLOK_Level_StageTransformationData[$00].AnimationFlags,x
	CMP.w #$0001
	BEQ.b CODE_80DA92
	BIT.w #$0004
	BNE.b CODE_80DA8B
	LDA.w #$0000
	STA.l PLOK_Level_StageTransformationData[$00].AnimationFlags,x
	BRA.b CODE_80DA98

CODE_80DA8B:
	LDA.w #$0010
	STA.l PLOK_Level_StageTransformationData[$00].AnimationFlags,x
CODE_80DA92:
	LDA.w #$0000
	STA.w $0892,y
CODE_80DA98:
	JMP.w CODE_80D9A6

CODE_80DA9B:
	LDA.l PLOK_Level_StageTransformationData[$00].FrameSpeed,x
	AND.w #$FF00
	BEQ.b CODE_80DABE
	XBA
	CMP.w #$004A
	BNE.b CODE_80DAB2
	LDA.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000092
	LDA.w #$004A
CODE_80DAB2:
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_80DABE:
	RTS

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

CODE_80DABF:
	PHP
	SEP.b #$30
	LDA.b #$7E
	STA.b $08
	REP.b #$30
	LDA.b $19
	STA.b $06
	STX.b $38
	STX.b $3C
	STY.b $3A
	LDX.w #$0000
CODE_80DAD5:
	LDA.b $3C
	STA.b $38
	LDY.w #$0000
CODE_80DADC:
	PHY
	TXY
	LDA.b [$15],y
	PLY
	STA.b [$06],y
	INX
	INX
	INY
	INY
	DEC.b $38
	BNE.b CODE_80DADC
	LDA.b $06
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00008A
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00008A
	STA.b $06
	DEC.b $3A
	BNE.b CODE_80DAD5
	PLP
	RTS

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

CODE_80DAFB:
	REP.b #$30					; Optimization: Unnecessary REP.b #$30
	SEP.b #$30
	JSR.w CODE_80E49E
	LDA.b #$81
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #$5E
	STA.w !REGISTER_BG3AddressAndSize
	LDA.b #$00
	STA.w $0714
	LDX.b #$0F
CODE_80DB13:
	LDA.w $1804,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	CMP.w PLOK_JapaneseTextStrings_JLDPBuckley,x
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	CMP.w PLOK_GermanTextStrings_JLDPBuckley,x
else
	CMP.w PLOK_EnglishTextStrings_JLDPBuckley,x
endif
	BNE.b CODE_80DB20
	DEX
	BPL.b CODE_80DB13
	BRA.b CODE_80DB2C

CODE_80DB20:
	STZ.w $1804
	JSR.w CODE_80DB8D
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	REP.b #$30
endif
	JSR.w PLOK_UploadSPCEngineAndSamples_Main
	JSR.w CODE_809F96
if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
	JSR.w PLOK_InitializeLanguageSelectScreen_Main
endif
CODE_80DB2C:
	REP.b #$30
	LDY.w #!Define_PLOK_Music_TitleScreen
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	TSX
	STX.w $0674
	SEP.b #$20
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #$02
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
CODE_80DB4D:
	REP.b #$30
	JSR.w CODE_80DCFB
	JSR.w CODE_809F96
	JSR.w CODE_80DDCE
	JSR.w CODE_80DD76
	JSR.w CODE_809F96
	JSR.w CODE_80DDCE
	REP.b #$30
	LDA.w #$00F0
	XBA
	AND.w #$FF00
	ORA.w #$0003
	JSL.l CODE_82E177
	JSL.l CODE_809FE0
	BRA.b CODE_80DB4D

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

CODE_80DB77:
	REP.b #$10
	SEP.b #$20
	LDX.w $0674
	TXS
	JSR.w CODE_809F96
	INC.b !RAM_PLOK_UnknownRAM0000A8
	JSR.w CODE_80FACD
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	RTS

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

CODE_80DB8D:
	SEP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	JSR.w CODE_80E49E
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$04
	STA.b !RAM_PLOK_UnknownRAM0000AA
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	LDA.b #$5E
	STA.w !REGISTER_BG3AddressAndSize
	JSL.l CODE_82CBFE
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallLetters
	JSL.l CODE_87E000
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
	SEP.b #$20
	LDA.w !REGISTER_PPUStatusFlag2
	AND.b #!PPUStatusFlag2_ConsoleRegion
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	CMP.b #$00
	BEQ.b +
	JMP.w CODE_80DBFD

+:
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	CMP.b #!PPUStatusFlag2_ConsoleRegion
	BNE.b CODE_80DBFD
else
	CMP.b #$00
	BNE.b CODE_80DBFD
endif
	JSR.w CODE_80DC8C
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_809FBB
	REP.b #$20
	LDA.w #$00A0
	STA.w $066C
-:
	SEP.b #$20
	JSL.l CODE_809FE0
	JSR.w CODE_80E0DF
	BPL.b -
	JSR.w CODE_809F96
	REP.b #$30
	LDX.w #$5400
	JSR.w CODE_80A07C
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_GFX_ActivisionScreen
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0010
	LDY.w #!Define_PLOK_Palette_ActivisionScreen
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_ActivisionScreen
	JSL.l CODE_87E000
	SEP.b #$20
	LDX.w #$5420
	LDY.w #$7E3000
	STY.b $38
	LDA.b #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81D43C
	JSR.w CODE_80A1A6
	SEP.b #$20
	LDA.b #$01
	STA.b $AE
	LDA.b $AE
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
endif
	JSR.w CODE_809FBB
	REP.b #$20
	LDA.w #$00A0
	STA.w $066C
CODE_80DBE4:
	SEP.b #$20
	JSL.l CODE_809FE0
	JSR.w CODE_80E0DF
	BPL.b CODE_80DBE4
	SEP.b #$30
	LDX.b #$0F
CODE_80DBF3:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w PLOK_JapaneseTextStrings_JLDPBuckley,x
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	LDA.w PLOK_GermanTextStrings_JLDPBuckley,x
else
	LDA.w PLOK_EnglishTextStrings_JLDPBuckley,x
endif
	STA.w $1804,x
	DEX
	BPL.b CODE_80DBF3
	RTS

CODE_80DBFD:
	SEP.b #$20
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallLetters
	JSL.l CODE_87E000
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_WriteIndependantTextString($01, $0B, !Text_Layer_3, !Text_Palette_1, RegionLockout_Line1, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($0C, $0D, !Text_Layer_3, !Text_Palette_1, RegionLockout_Line2, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($03, $0F, !Text_Layer_3, !Text_Palette_1, RegionLockout_Line3, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($01, $18, !Text_Layer_3, !Text_Palette_0, RegionLockout_Line4, CODE_80A4AF)
else
	%PLOK_WriteIndependantTextString($01, $0B, !Text_Layer_3, !Text_Palette_1, RegionLockout_Line1, CODE_80A488)
	%PLOK_WriteIndependantTextString($0C, $0D, !Text_Layer_3, !Text_Palette_1, RegionLockout_Line2, CODE_80A488)
	%PLOK_WriteIndependantTextString($03, $0F, !Text_Layer_3, !Text_Palette_1, RegionLockout_Line3, CODE_80A488)
	%PLOK_WriteIndependantTextString($01, $18, !Text_Layer_3, !Text_Palette_0, RegionLockout_Line4, CODE_80A488)
endif
	JSR.w CODE_809FBB
CODE_80DC46:
	JSL.l CODE_809FE0
	BRA.b CODE_80DC46

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

if !Define_PLOK_Global_DisableCopyDetection == !FALSE
CODE_80DC4C:
	SEP.b #$20
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$04
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallLetters
	JSL.l CODE_87E000
CODE_80DC69:
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_WriteIndependantTextString($00, $17, !Text_Layer_3, !Text_Palette_1, ClearSmallLetterLine, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($03, $17, !Text_Layer_3, !Text_Palette_1, CopyDetectionLine, CODE_80A4AF)
else
	%PLOK_WriteIndependantTextString($00, $17, !Text_Layer_3, !Text_Palette_1, ClearSmallLetterLine, CODE_80A488)
	%PLOK_WriteIndependantTextString($03, $17, !Text_Layer_3, !Text_Palette_1, CopyDetectionLine, CODE_80A488)
endif
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MaxBrightness0F
	STA.w !REGISTER_ScreenDisplayRegister
	BRA.b CODE_80DC69
endif

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

CODE_80DC8C:
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_WriteIndependantTextString($07, $03, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line1, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($01, $04, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line2, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($06, $08, !Text_Layer_3, !Text_Palette_1, SplashScreenText_Line3, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($09, $0C, !Text_Layer_3, !Text_Palette_3, SplashScreenText_Line4, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($06, $0D, !Text_Layer_3, !Text_Palette_3, SplashScreenText_Line5, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($04, $14, !Text_Layer_3, !Text_Palette_0, SublicensedByActivision, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($03, $11, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line6, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($06, $12, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line7, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($09, $13, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line8, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($06, $1A, !Text_Layer_3, !Text_Palette_1, SplashScreenText_Line9, CODE_80A4AF)
else
	%PLOK_WriteIndependantTextString($07, $03, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line1, CODE_80A488)
	%PLOK_WriteIndependantTextString($01, $04, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line2, CODE_80A488)
	%PLOK_WriteIndependantTextString($06, $08, !Text_Layer_3, !Text_Palette_1, SplashScreenText_Line3, CODE_80A488)
	%PLOK_WriteIndependantTextString($09, $0C, !Text_Layer_3, !Text_Palette_3, SplashScreenText_Line4, CODE_80A488)
	%PLOK_WriteIndependantTextString($06, $0D, !Text_Layer_3, !Text_Palette_3, SplashScreenText_Line5, CODE_80A488)
	%PLOK_WriteIndependantTextString($03, $12, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line6, CODE_80A488)
	%PLOK_WriteIndependantTextString($06, $13, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line7, CODE_80A488)
	%PLOK_WriteIndependantTextString($09, $14, !Text_Layer_3, !Text_Palette_0, SplashScreenText_Line8, CODE_80A488)
	%PLOK_WriteIndependantTextString($06, $1A, !Text_Layer_3, !Text_Palette_1, SplashScreenText_Line9, CODE_80A488)
endif
	RTS

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
PLOK_InitializeLanguageSelectScreen:
.Main:
	PHP
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	REP.b #$30
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
	%PLOK_WriteIndependantTextString($06, $03, !Text_Layer_3, !Text_Palette_1, SelectYourLanguage, CODE_80A488)
	JSR.w ++++
	JSR.w CODE_809FBB
	LDA.w #$07D0
	STA.w $066C
	STZ.w $0848
	STZ.w $1814
-:
	JSL.l CODE_809FE0
	JSR.w ++++
	LDA.w $073A
	BEQ.b +
	LDA.w $068C
	BNE.b ++
	STZ.w $073A
+:
	DEC.w $066C
	BMI.b +++
	LDA.w $068C
	BIT.w #$0800
	BEQ.b +
	INC.w $073A
	DEC.w $0848
	BPL.b ++
	LDA.w #$0001
	STA.w $0848
	BRA.b ++

+:
	LDA.w $068C
	BIT.w #$0400
	BEQ.b ++
	INC.w $073A
	INC.w $0848
	LDA.w $0848
	CMP.w #$0002
	BCC.b ++
	STZ.w $0848
++:
	LDA.w $068C
	BIT.w #$1000
	BEQ.b -
+++:
	JSR.w CODE_809F96
	LDA.w $0848
	STA.w $1814
	PLP
	RTS

++++:
	REP.b #$30
	LDA.w #$0000
	JSR.w +
	%PLOK_SetTextVRAMAddress($0A, $0C, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(EnglishLanguage, !Text_InCode)
	JSR.w CODE_80A488
	LDA.w #$0001
	JSR.w +
	%PLOK_SetTextVRAMAddress($0A, $0F, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(FrenchLanguage, !Text_InCode)
	JSR.w CODE_80A488
	RTS

+:
	REP.b #$30
	CMP.w $0848
	BNE.b +
	LDA.b $09
	AND.w #$0008
	BNE.b +
	%PLOK_SetTextTileProperties(!Text_Palette_1, !Text_InCode)
	RTS

+:
	%PLOK_SetTextTileProperties(!Text_Palette_0, !Text_InCode)
	RTS
endif

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

CODE_80DCFB:
	REP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	STZ.w $0664
	STZ.w $0662
	LDA.w #$0001
	JSL.l CODE_80FD72
	LDA.w #$0258
	STA.w $066C
	SEP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	JSR.w CODE_80E49E
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$03
	STA.b !RAM_PLOK_UnknownRAM0000AA
	JSR.w CODE_80E1B5
	REP.b #$30
	LDA.w #$02BC
	STA.w $066C
	LDA.w #$FFFF
	STA.w $0660
	STA.w $0662
	SEP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	JSR.w CODE_809FBB
CODE_80DD48:
	JSL.l CODE_809FE0
	JSL.l CODE_82C8CE
	JSL.l CODE_82CAFC
	REP.b #$30
	LDA.w $066C
	CMP.w #$0280
	BNE.b CODE_80DD70
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.b #$07
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$20
	JSR.w CODE_80E18B
CODE_80DD70:
	JSR.w CODE_80E0DF
	BPL.b CODE_80DD48
	RTS

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

CODE_80DD76:
	REP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	STZ.w $0664
	STZ.w $0662
	SEP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	JSR.w CODE_80E49E
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$07
	STA.b !RAM_PLOK_UnknownRAM0000AA
	JSR.w CODE_80E1B5
	JSR.w CODE_80E148
	REP.b #$30
	LDA.w #$02BC
	STA.w $066C
	LDA.w #$FFFF
	STA.w $0662
	LDA.w #$0005
	STA.w $0660
	JSL.l CODE_809FE0
	JSL.l CODE_82C8CE
	SEP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	JSR.w CODE_809FBB
CODE_80DDC4:
	JSL.l CODE_809FE0
	JSR.w CODE_80E0DF
	BPL.b CODE_80DDC4
	RTS

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

CODE_80DDCE:
	REP.b #$30
	LDA.w $08F8
	ASL
	TAY
	LDA.w DATA_819476,y
	STA.w $0848
	LDA.w DATA_8194A6,y
	STA.w $0672
	STZ.w $0670
	STZ.w $066E
	JSR.w CODE_80DF95
	REP.b #$30
	LDA.w $08F8
	ASL
	TAY
	LDA.w DATA_81948E,y
	JSR.w CODE_80F69C
	SEP.b #$20
	STZ.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	JSR.w CODE_809304
	REP.b #$30
	LDA.w $08F8
	ASL
	CLC
	ADC.w $08F8
	TAX
	LDA.w DATA_819452,x
	STA.b $38
	LDA.w DATA_819452+$02,x
	STA.b $3A
	LDY.w #$0000
CODE_80DE25:
	LDA.b [$38],y
	TYX
	STA.l $7F8000,x
	CMP.w #$FFFF
	BEQ.b CODE_80DE35
	INY
	INY
	BRA.b CODE_80DE25

CODE_80DE35:
	INC.w $08F8
	LDA.w $08F8
	CMP.w #$000C
	BCC.b CODE_80DE43
	STZ.w $08F8
CODE_80DE43:
	LDA.w #$2710
	STA.w $066C
	STZ.b $09
	LDX.w #$0000
	LDY.w #$0000
	LDA.w #$0000
	JSR.w CODE_80FC6B
CODE_80DE57:
	REP.b #$30
	JSR.w CODE_80DF37
	LDA.w $0766
	BNE.b CODE_80DE69
	JSR.w CODE_80DEA1
	JSR.w CODE_80E0DF
	BPL.b CODE_80DE57
CODE_80DE69:
	SEP.b #$30
	LDA.b #$33
	STA.w $067F
	STA.w $0680
	LDA.b #$03
	STA.w $0681
	LDA.b #$80
	STA.w $067A
	LDA.b #$70
	STA.w $067B
	REP.b #$30
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_828168
CODE_80DE8E:
	JSL.l CODE_809FE0
	LDA.w #$0000
	JSR.w CODE_80FB33
	BPL.b CODE_80DE8E
	JSR.w CODE_809F96
	JSR.w CODE_80FACD
	RTS

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

CODE_80DEA1:
	REP.b #$30
	INC.w $066E
	LDA.w $0672
	STA.b $38
	LDY.w $0670
	LDA.b ($38),y
	CMP.w $066E
	BCC.b CODE_80DEB6
	RTS

CODE_80DEB6:
	LDA.b $09
	PHA
	STZ.w $066E
	LDA.w $0670
	CLC
	ADC.w #$000A
	STA.w $0670
	INY
	INY
	LDA.b ($38),y
	STA.w $067A
	INY
	INY
	LDA.b ($38),y
	STA.w $067B
	INY
	INY
	LDA.b ($38),y
	STA.b $3E
	INY
	INY
	LDA.b ($38),y
	PHA
	SEP.b #$30
	LDA.b #$33
	STA.w $067F
	STZ.w $0680
	LDA.b #$03
	STA.w $0681
	REP.b #$30
	LDA.w #$0001
	STA.w $0678
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_828168
CODE_80DF00:
	JSL.l CODE_809FE0
	LDA.b $3E
	JSR.w CODE_80FB33
	BPL.b CODE_80DF00
	PLA
CODE_80DF0C:
	PHA
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80E0DF
	REP.b #$30
	BMI.b CODE_80DF21
	PLA
	DEC
	BPL.b CODE_80DF0C
	BRA.b CODE_80DF22

CODE_80DF21:
	PLA
CODE_80DF22:
	JSL.l CODE_809FE0
	REP.b #$30
	LDA.w #$0300
	JSR.w CODE_80FADF
	BPL.b CODE_80DF22
	JSR.w CODE_80FACD
	PLA
	STA.b $09
	RTS

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

CODE_80DF37:
	JSL.l CODE_809FE0
	REP.b #$30
	LDA.w #$0064
	STA.w !RAM_PLOK_Level_Player_ShellCounter
	LDA.w $068C
	STA.b !RAM_PLOK_UnknownRAM0000AE
	JSR.w CODE_80FC80
	JSR.w CODE_80849E
	JSR.w CODE_80D934
	JSR.w CODE_80B26A
	JSR.w CODE_80C6DC
	JSR.w CODE_80C765
	JSR.w CODE_80BF5B
	JSR.w CODE_80B7D7
	JSR.w CODE_80B918
	JSL.l CODE_828857
	JSL.l CODE_828E4D
	JSL.l CODE_82B76D
	JSL.l CODE_82C1F3
	JSL.l CODE_82CE13
	JSL.l CODE_82DB4E
	JSL.l CODE_82D5F4
	JSL.l CODE_82DEB1
	JSL.l CODE_82E092
	JSR.w CODE_809B9D
	JSL.l CODE_809F27
	JSR.w CODE_80935F
	JSR.w CODE_80A20C
	RTS

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

CODE_80DF95:
	PHP
	SEP.b #$20
	STZ.w !REGISTER_BG3VertScrollOffset
	STZ.w !REGISTER_BG3VertScrollOffset
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	STA.b !RAM_PLOK_UnknownRAM0000A8
	JSL.l CODE_82D7F2
	SEP.b #$20
	LDA.b #$81
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer3Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$10
	STA.w !REGISTER_BG1And2TileDataDesignation
	REP.b #$30
	LDA.w #$00FF
	STA.w !RAM_PLOK_Global_CurrentLevelNum
	LDA.w #$0001
	STA.w $076E
	STA.w $0906
	STZ.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	JSR.w CODE_809EBF
	SEP.b #$20
	INC.b !RAM_PLOK_UnknownRAM0000A8
	REP.b #$30
	STZ.w $07EC
	STZ.w $0690
	LDX.w #$5400
	LDX.w #$5800
	JSR.w CODE_80A07C
	JSL.l CODE_82CBFE
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
	JSR.w CODE_80A181
	SEP.b #$20
	JSR.w CODE_809EE5
	REP.b #$20
	STZ.w $0DAA
	LDA.w $0848
	CMP.w !RAM_PLOK_Global_CurrentLevelNum
	BEQ.b CODE_80E066
	JSR.w CODE_80E4D8
	JSL.l CODE_809FE0
	LDA.w #$0002
	STA.w $0DBC
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	INC.w $0DAA
	SEP.b #$20
	JSR.w CODE_809FBB
	REP.b #$20
	STZ.w $0DBC
	JSL.l CODE_82CC46
	JSR.w CODE_80A0D0
CODE_80E02B:
	LDA.w $0DBC
	CMP.w #$0002
	BCC.b CODE_80E02B
	CMP.w #$0003
	BNE.b CODE_80E03B
	JMP.w CODE_80DB77

CODE_80E03B:
	JSR.w CODE_809F96
	LDA.w !RAM_PLOK_Global_CurrentLevelNum
	STA.w $0848
	INC.b !RAM_PLOK_UnknownRAM0000A8
	SEP.b #$20
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$10
	STA.w !REGISTER_BG1And2TileDataDesignation
	REP.b #$20
	JSR.w CODE_80A099
	JSL.l CODE_82CCB2
	JSL.l CODE_82CCD9
	JSL.l CODE_82CD04
	STZ.w $0DAA
CODE_80E066:
	JSR.w CODE_80A830
	JSL.l CODE_82CBFE
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallSillyLetters
	JSL.l CODE_87E000
	JSR.w CODE_80AA07
	JSL.l CODE_828526
	JSR.w CODE_80D8F0
	SEP.b #$10
	JSR.w CODE_80B1DC
	JSL.l CODE_82DE4F
	REP.b #$30
	STZ.b $09
	LDA.w #$003F
CODE_80E09D:
	PHA
	INC.b $09
	JSL.l CODE_828857
	REP.b #$30
	PLA
	DEC
	BNE.b CODE_80E09D
	STZ.w $0766
	LDA.w #$0064
	STA.w $084C
	JSL.l CODE_828E4D
	JSL.l CODE_82DEB1
	JSR.w CODE_80A20C
	JSR.w CODE_809B9D
	SEP.b #$20
	JSL.l CODE_809FE0
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	REP.b #$30
	LDA.w #$0003
	STA.w !RAM_PLOK_Level_Player_CurrentLifeCountLo
	STZ.b $09
	STZ.w !RAM_PLOK_Level_Player_ShellCounter
	STZ.w $0766
	PLP
	RTS

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

CODE_80E0DF:
	SEP.b #$20
	LDA.w !REGISTER_Joypad1Hi
	ORA.w !REGISTER_Joypad2Hi
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
else
	ORA.w !REGISTER_Joypad3Hi
	ORA.w !REGISTER_Joypad4Hi
endif
	AND.b #(!Joypad_Start>>8)|(!Joypad_Select>>8)
	BNE.b CODE_80E0F9
CODE_80E0F1:
	REP.b #$20
	DEC.w $066C
	SEP.b #$20
	RTS

CODE_80E0F9:
	SEP.b #$20
	STA.w $0804
	LDA.w $1804
	BEQ.b CODE_80E0F1
	JMP.w CODE_80DB77

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

CODE_80E106:
	PHP
	REP.b #$10
	LDX.w #$5400
	JSR.w CODE_80A07C
	LDX.w #$5800
	LDA.b #$80
	JSR.w CODE_80A076
	LDX.w #$5C00
	JSR.w CODE_80A07C
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4000
	LDY.w #!Define_PLOK_GFX_Layer3_TitleScreenLogo
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4800
	LDY.w #!Define_PLOK_GFX_TitleScreenSpotlight
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_TitleScreenLogo
	JSL.l CODE_87E000
	PLP
	RTS

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

CODE_80E148:
	REP.b #$30
	LDX.w #$5C00
	JSR.w CODE_80A07C
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4000
	LDY.w #!Define_PLOK_GFX_Layer3_DemoCreditsText
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_DemoCreditsText
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_DemoCreditsText
	JSL.l CODE_87E000
	LDX.w #$5C83
	LDY.w #$7E3000
	STY.b $38
	LDA.w #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B072
	JSR.w CODE_80A1A6
	RTS

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

CODE_80E18B:
	PHP
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_PushSelectForOptionsText
	JSL.l CODE_87E000
	JSL.l CODE_809FE0
	SEP.b #$20
	LDX.w #$5860
	LDY.w #$7E3000
	STY.b $38
	LDA.b #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B0AE
	JSR.w CODE_80A1A6
if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
	JSL.l CODE_809FE0
	LDX.w #$5880
	LDY.w #$7E3080
	STY.b $38
	LDA.b #$7E3080>>16
	STA.b $3A
	LDY.w #$818595
	JSR.w CODE_80A1A6
endif
	PLP
	RTS

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

CODE_80E1B5:
	PHP
	JSR.w CODE_80E106
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_TitleScreenSpotlight
	JSL.l CODE_87E000
	SEP.b #$20
	LDX.w #$5800
	LDY.w #$7E3000
	STY.b $38
	LDA.b #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B04A
	JSR.w CODE_80A1A6
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_GFX_TitleScreenPlok1
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$0B00
	LDY.w #!Define_PLOK_GFX_TitleScreenPlok2
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_TitleScreenLogo
	JSL.l CODE_87E000
	SEP.b #$20
	LDA.b #$40
	STA.w !REGISTER_BG1And2TileDataDesignation
	LDX.w #$5E06
	LDY.w #$7E3000
	STY.b $38
	LDA.b #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B05E
	JSR.w CODE_80A1A6
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_TitleScreenPlok
	JSL.l CODE_87E000
	PLP
	RTS

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

CODE_80E22F:
	PHP
	REP.b #$30
	LDA.b $09
	PHA
	LDA.w !REGISTER_Joypad1Hi
	AND.w #!Joypad_Start>>8
	BNE.b CODE_80E240
	JMP.w CODE_80E394

CODE_80E240:
	SEP.b #$30
	LDA.b #$00
	STA.w $067F
	LDA.b #$00
	STA.w $0680
	LDA.b #$20
	STA.w $0681
	LDA.w $0848
	AND.b #$FF						; Optimization: Unnecessary AND
	CMP.b #!Define_PLOK_LevelID_AkrillicCreepyForest
	BNE.b CODE_80E25F
	LDA.b #$33
	STA.w $067F
CODE_80E25F:
	REP.b #$20
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	SEP.b #$20
	STA.w $067A
	REP.b #$20
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	SEP.b #$20
	STA.w $067B
	REP.b #$20
	LDA.w #$0003
	STA.w $0678
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_828168
	SEP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STA.w !REGISTER_MainScreenWindowMask
	STA.w !REGISTER_SubScreenLayers
	STA.w !REGISTER_SubScreenWindowMask
	LDA.b #$20
	STA.w !REGISTER_ColorMathInitialSettings
	LDA.b #$83
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.b #$2D
	STA.w !REGISTER_FixedColorData
	LDA.b #$51
	STA.w !REGISTER_FixedColorData
	LDA.b #$92
	STA.w !REGISTER_FixedColorData
	LDA.w $0848
	AND.b #$FF							; Optimization: Unnecessary AND
	CMP.b #!Define_PLOK_LevelID_AkrillicCreepyForest
	BNE.b CODE_80E2C0
	JSR.w CODE_809ECC
CODE_80E2C0:
	REP.b #$20
	STZ.b $09
CODE_80E2C4:
	JSL.l CODE_809FE0
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0003
	STA.w $0678
	JSL.l CODE_8281B5
	LDA.w $0676
	LSR
	LSR
	LSR
	STA.b $38
	LDA.w $0676
	SEC
	SBC.b $38
	STA.w $0676
	CMP.w #$0100
	BCS.b CODE_80E2C4
	LDA.w #$0100
	STA.w $0676
	JSR.w CODE_80E47D
	JSL.l CODE_809FE0
	JSR.w CODE_80E44F
	STZ.w $0ECA
	STZ.w $0ECC
	STZ.w $0ECE
	STZ.b $09
CODE_80E30C:
	JSL.l CODE_809FE0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDA.b $09
	AND.w #$0020
	BNE.b CODE_80E31C
	JSR.w CODE_80E44F
	BRA.b CODE_80E31F

CODE_80E31C:
	JSR.w CODE_80E473
CODE_80E31F:
endif
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0003
	STA.w $0678
	JSL.l CODE_8281B5
if !Define_PLOK_Global_EnableCheatCodes == !TRUE
	JSR.w CODE_80E39B
endif
	LDA.w !REGISTER_Joypad1Hi
	AND.w #!Joypad_Start>>8
	BEQ.b CODE_80E30C
	JSR.w CODE_80E47D
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_80E473
endif
	STZ.b $09
CODE_80E33F:
	JSL.l CODE_809FE0
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0003
	STA.w $0678
	JSL.l CODE_8281B5
	LDA.w $0676
	LSR
	LSR
	STA.b $38
	LDA.w $0676
	SEC
	SBC.b $38
	STA.w $0676
	CMP.w #$0040
	BCS.b CODE_80E33F
CODE_80E36B:
	JSL.l CODE_809FE0
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0003
	STA.w $0678
	LDA.w #$0400
	JSR.w CODE_80FB09
	BPL.b CODE_80E36B
	JSR.w CODE_80FACD
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	JSR.w CODE_80E473
endif
	SEP.b #$20
	STZ.w !REGISTER_ColorMathSelectAndEnable
	JSR.w CODE_809ECC
CODE_80E394:
	REP.b #$30
	PLA
	STA.b $09
	PLP
	RTS

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

CODE_80E39B:
	REP.b #$30
CODE_80E39D:
	LDA.w $0ECC
	ASL
	ASL
	ASL
	CLC
	ADC.w $0ECA
	ASL
	TAX
	LDA.w !REGISTER_Joypad1Lo					; Note: !Joypad_L|!Joypad_R|!Joypad_X|!Joypad_A
	BEQ.b CODE_80E3E2
	LDA.w $0ECE
	BNE.b CODE_80E3E1
	LDA.w !REGISTER_Joypad1Lo
	CMP.l PLOK_CheatCodeInputs,x
	BEQ.b CODE_80E3D2
	INC.w $0ECC
	LDA.w $0ECC
	CMP.w #$0004
	BCC.b CODE_80E39D
	INC.w $0ECE
	STZ.w $0ECC
	STZ.w $0ECA
	BRA.b CODE_80E3E1

CODE_80E3D2:
	INC.w $0ECE
	LDA.w $0ECA
	INC
	CMP.w #$0008
	BEQ.b CODE_80E3E6
	STA.w $0ECA
CODE_80E3E1:
	RTS

CODE_80E3E2:
	STZ.w $0ECE
	RTS

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

CODE_80E3E6:
	LDA.w !RAM_PLOK_Level_Player_CurrentHPLo
	CMP.w #$0008
	BCC.b CODE_80E41C
	LSR.w !RAM_PLOK_Level_Player_CurrentHPLo
	JSL.l CODE_809FE0
	JSR.w CODE_80E473
	LDA.w $0ECC
	ASL
	ASL
	TAX
	LDY.w DATA_81B228,x
	LDA.w DATA_81B228+$02,x
	TAX
	LDA.w #$0020
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_80A488
else
	JSR.w CODE_80A457
endif
	LDX.w #$003C
	JSR.w CODE_809FF9
	JSR.w CODE_80E473
	LDA.w $0ECC
	ASL
	TAX
	JMP.w (DATA_80E41D,x)

CODE_80E41C:
	RTS

DATA_80E41D:
	dw CODE_80E425
	dw CODE_80E43D
	dw CODE_80E434
	dw CODE_80E446

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

CODE_80E425:							; Note: This routine does a destructive return
	REP.b #$30
	PLA
	PLA
	LDA.w #!Define_PLOK_LevelID_TestDriveSecretWarp
	STA.w $0848
	PLA
	PLP
	JMP.w CODE_8080B8

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

CODE_80E434:
	REP.b #$30
	LDA.w #$00A0
	STA.w !RAM_PLOK_Level_Player_ShellCounter
	RTS

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

CODE_80E43D:
	REP.b #$30
	LDA.w #$0010
	STA.w !RAM_PLOK_Level_Player_BuddyHornetCount
	RTS

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

CODE_80E446:
	REP.b #$30
	LDA.w #$0300
	STA.w !RAM_PLOK_Level_Player_StarShieldTimerLo
	RTS

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

CODE_80E44F:
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E466
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80E466
	%PLOK_SetTextVRAMAddress($02, $0C, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(Intermission, !Text_InCode)
	BRA.b CODE_80E46C

CODE_80E466:
endif
	%PLOK_SetTextVRAMAddress($05, $0C, !Text_Layer_3, !Text_InCode)
	%PLOK_HandlePrimaryTextPointer(Paused, !Text_InCode)
CODE_80E46C:
	%PLOK_SetTextTileProperties(!Text_Palette_1, !Text_InCode)
	JSR.w CODE_80A457
	RTS

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

CODE_80E473:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E391
else
	LDX.w #$5D80
	STX.w !REGISTER_VRAMAddressLo
	JSR.w CODE_809B90
endif
	RTS

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

CODE_80E47D:
	PHP
	REP.b #$30
CODE_80E480:
	JSL.l CODE_809FE0
	LDA.b $09
	AND.w #$0018
	LSR
	LSR
	LSR
	CLC
	ADC.w #$0003
	JSL.l CODE_8281B5
	LDA.w !REGISTER_Joypad1Hi
	AND.w #!Joypad_Start>>8
	BNE.b CODE_80E480
	PLP
	RTS

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

CODE_80E49E:
	PHP
	SEP.b #$30
	STZ.w $0678
	STZ.w $0679
	STZ.w !REGISTER_ColorMathSelectAndEnable
	STZ.w !REGISTER_ColorMathInitialSettings
	STZ.w !REGISTER_BG1And2TileDataDesignation
	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
	STZ.w !REGISTER_BG3HorizScrollOffset
	STZ.w !REGISTER_BG3HorizScrollOffset
	LDA.b #$08
	STA.w !REGISTER_BG3VertScrollOffset
	STZ.w !REGISTER_BG3VertScrollOffset
	PLP
	RTS

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

CODE_80E4D8:
	JSR.w CODE_80E54E
	REP.b #$30
	JSL.l CODE_809FE0
	STZ.b $09
	STZ.w $0DBE
	STZ.w $0DC0
	LDX.w #$0458
	LDY.w #$0066
CODE_80E4EF:
	LDA.w #$FFFF
	STA.b $00,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_80E4EF
	JSR.w CODE_80E75E
	JSR.w CODE_80E7ED
	JSR.w CODE_80E900
	LDA.w $0848							;\ Note: !Define_PLOK_LevelID_CottonIslandBeach
	BNE.b CODE_80E50F						;/
	JSR.w CODE_80F459
CODE_80E50F:
	LDA.w $0770
	BNE.b CODE_80E517
	JSR.w CODE_80B1DC
CODE_80E517:
	JSR.w CODE_80EAE8
	REP.b #$30
	LDX.w #$0000
	JSL.l CODE_82887F
	JSL.l CODE_828E4D
	LDA.w DATA_81899E
	STA.w $042A
	LDA.w #$0004
	STA.w $0DC4
	JSR.w CODE_80A20C
	JSL.l CODE_809FE0
	STZ.b $09
	STZ.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	LDA.w $0848
	ASL
	TAY
	LDA.w DATA_819ACC,y
	JSR.w CODE_80F69C
	JSR.w CODE_80EBB1
	RTS

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

CODE_80E54E:
	REP.b #$30
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$00
	STA.w !REGISTER_BG1And2TileDataDesignation
	STZ.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	JSR.w CODE_80E49E
	REP.b #$30
	LDA.w $0848
	STA.w !RAM_PLOK_Global_CurrentLevelNum
	REP.b #$30
	LDX.w #$5400
	JSR.w CODE_80A07C
	LDX.w #$5800
	JSR.w CODE_80A07C
	LDX.w #$5C00
	JSR.w CODE_80A07C
	LDA.w $0848
	AND.w #$0FFF
	ASL
	STA.b $38
	TAX
	LDA.l PLOK_OverworldFGGraphics,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$0000
	JSL.l CODE_87E000
	LDA.w $0848									;\ Note: !Define_PLOK_LevelID_CottonIslandBeach
	BNE.b CODE_80E5C3								;/
	LDX.b $38
	LDA.l PLOK_OverworldLayer1TilemapIndexes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	JSL.l CODE_87E000
	BRA.b CODE_80E5D4

CODE_80E5C3:
	LDX.b $38
	LDA.l DATA_86F410,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	JSL.l CODE_87E000
CODE_80E5D4:
	LDX.b $38
	LDA.l PLOK_OverworldLayer1TilemapIndexes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E9000
	JSL.l CODE_87E000
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_PostBobbinsBros1OverworldCutscene
	BEQ.b CODE_80E5F0
	JSR.w CODE_80E6B5
CODE_80E5F0:
	LDX.b $38
	LDA.l PLOK_OverworldLayer2TilemapIndexes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7FD000>>16)
	LDX.w #$7FD000
	JSL.l CODE_87E000
	LDX.b $38
	LDA.l PLOK_OverworldWaterPalettes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0010
	JSL.l CODE_87E000
	LDX.b $38
	LDA.l PLOK_OverworldWaterPalettes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F0C00>>16)
	LDX.w #$7F0C00
	JSL.l CODE_87E000
	LDX.b $38
	LDA.l PLOK_OverworldFGPalettes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0020
	JSL.l CODE_87E000
	LDA.w $0848									;\ Optimization: Junk code.
	AND.w #$0FFF									;|
	ASL										;|
	TAY										;|
	TAY										;|
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM				;|
	LDX.w #$0010									;/
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$6000
	LDY.w #!Define_PLOK_GFX_Sprite_Overworld
	JSL.l CODE_87E000
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E68D
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80E664
	CMP.w #!Define_PLOK_LevelID_PostBobbinsBros2OverworldCutscene
	BNE.b CODE_80E68D
CODE_80E664:
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0080
	LDY.w #!Define_PLOK_Palette_Sprite_PastOverworld
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallLetters
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_PastLayer3
	JSL.l CODE_87E000
	BRA.b CODE_80E6B4

CODE_80E68D:
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0080
	LDY.w #!Define_PLOK_Palette_Sprite_PresentOverworld
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallSillyLetters
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_PresentLayer3
	JSL.l CODE_87E000
CODE_80E6B4:
	RTS

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

CODE_80E6B5:
	REP.b #$30
	LDX.w #$0000
CODE_80E6BA:
	CPX.w $0848
	BEQ.b CODE_80E6EB
	CPX.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E6D8
	CPX.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80E6D8
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E6E8
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80E6E8
	BRA.b CODE_80E6E5

CODE_80E6D8:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E6E5
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80E6E8
CODE_80E6E5:
	JSR.w CODE_80E6EC
CODE_80E6E8:
	INX
	BRA.b CODE_80E6BA

CODE_80E6EB:
	RTS

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

CODE_80E6EC:
	PHX
	TXA
	ASL
	ASL
	TAY
	LDA.w DATA_81878A+$02,y
	PHY
	SEP.b #$20
	STA.w !REGISTER_Multiplicand
	REP.b #$20
	LDA.w #$0044
	SEP.b #$20
	STA.w !REGISTER_Multiplier
	REP.b #$30
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	PLY
	CLC
	ADC.w DATA_81878A,y
	ASL
	TAX
	LDA.l $7E9000,x
	STA.l $7E3000,x
	LDA.l $7E9002,x
	STA.l $7E3002,x
	LDA.l $7E9004,x
	STA.l $7E3004,x
	LDA.l $7E9088,x
	STA.l $7E3088,x
	LDA.l $7E908A,x
	STA.l $7E308A,x
	LDA.l $7E908C,x
	STA.l $7E308C,x
	LDA.l $7E9110,x
	STA.l $7E3110,x
	LDA.l $7E9112,x
	STA.l $7E3112,x
	LDA.l $7E9114,x
	STA.l $7E3114,x
	PLX
	RTS

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

CODE_80E75E:
	REP.b #$30
	LDX.w #$0016
CODE_80E763:
	STZ.b !RAM_PLOK_UnknownRAM00007E,x
	DEX
	DEX
	BPL.b CODE_80E763
	LDA.w $0848
	AND.w #$0FFF
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.w #$FFFF
	STA.b !RAM_PLOK_UnknownRAM00008E
	LDA.l DATA_86F4FC,x
	BPL.b CODE_80E78D
	XBA
	AND.w #$0070
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM00008E
	LDA.l DATA_86F4FC,x
CODE_80E78D:
	AND.w #$0FFF
	STA.b !RAM_PLOK_UnknownRAM00006A
	STZ.b !RAM_PLOK_UnknownRAM00007A
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM00006E
	STA.b !RAM_PLOK_UnknownRAM000072
	LDA.b !RAM_PLOK_UnknownRAM00006A
	AND.w #$000F
	STA.b !RAM_PLOK_UnknownRAM00007E
	STA.b !RAM_PLOK_UnknownRAM000082
	LDA.l DATA_86F4FC+$02,x
	STA.b !RAM_PLOK_UnknownRAM00006C
	STZ.b !RAM_PLOK_UnknownRAM00007C
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM000070
	STA.b !RAM_PLOK_UnknownRAM000074
	LDA.b !RAM_PLOK_UnknownRAM00006C
	AND.w #$000F
	STA.b !RAM_PLOK_UnknownRAM000080
	STA.b !RAM_PLOK_UnknownRAM000084
	LDA.b !RAM_PLOK_UnknownRAM00008E
	BPL.b CODE_80E7C9
	LDA.w #$FFFE
	STA.b !RAM_PLOK_UnknownRAM000072
	STZ.b !RAM_PLOK_UnknownRAM000074
CODE_80E7C9:
	LDA.l DATA_86F4FC+$04,x
	STA.b !RAM_PLOK_UnknownRAM00008A
	LDA.l DATA_86F4FC+$06,x
	STA.b !RAM_PLOK_UnknownRAM00008C
	LDA.w #$0008
	STA.b !RAM_PLOK_Level_HighestCameraYPosLo
	LDA.l DATA_86F4FC+$0A,x
	STA.b !RAM_PLOK_Level_LowestCameraYPosLo
	LDA.l DATA_86F4FC+$0C,x
	STA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	LDA.l DATA_86F4FC+$0E,x
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	RTS

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

CODE_80E7ED:
	JSR.w CODE_80E896
	LDA.w $0848
	AND.w #$0FFF
	ASL
	TAX
	LDA.w DATA_8189CC,x
	STA.b $38
	LDX.w #$057A
	LDY.w #$001E
CODE_80E803:
	LDA.w $0848
	AND.w #$0FFF
	CMP.w #!Define_PLOK_LevelID_PostBobbinsBros1OverworldCutscene-$01
	BCC.b CODE_80E81F
	SEC
	SBC.w #!Define_PLOK_LevelID_PostBobbinsBros1OverworldCutscene
	PHX
	ASL
	TAX
	LDA.w DATA_8189C4,x
	PLX
	CMP.b $38
	BEQ.b CODE_80E86C
	BRA.b CODE_80E83D

CODE_80E81F:
	CMP.b $38
	BEQ.b CODE_80E86C
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E82D
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80E83D
CODE_80E82D:
	LDA.b $38
	CMP.w #$000B
	BCC.b CODE_80E83D
	CMP.w #$0013
	BCS.b CODE_80E83D
	INC.b $38
	BRA.b CODE_80E803

CODE_80E83D:
	LDA.b $38
	ASL
	STA.b $3A
	ASL
	CLC
	ADC.b $3A
	PHY
	TAY
	LDA.w DATA_818B12,y
	STA.b $00,x
	LDA.w DATA_818B12+$02,y
	STA.b $02,x
	LDA.w DATA_818B12+$04,y
	PLY
	STA.w $0DCE,y
	STA.b $04,x
	LDA.w #$3000
	STA.b $06,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	INC.b $38
	DEY
	DEY
	BPL.b CODE_80E803
CODE_80E86C:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	BCS.b CODE_80E895
	PHY
	ASL
	STA.b $3A
	ASL
	CLC
	ADC.b $3A
	TAY
	LDA.w DATA_818B12,y
	STA.b $00,x
	LDA.w DATA_818B12+$02,y
	STA.b $02,x
	LDA.w #$029E
	STA.b $04,x
	PLY
	STA.w $0DCE,y
	LDA.w #$3000
	STA.b $06,x
CODE_80E895:
	RTS

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

CODE_80E896:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	BCC.b CODE_80E8FF
	CMP.w #!Define_PLOK_LevelID_FleapitRoadHogging
	BCS.b CODE_80E8FF
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E8AD
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80E8FF
CODE_80E8AD:
	AND.w #$0FFF
	ASL
	TAX
	LDA.w DATA_8189CC,x
	STA.b $38
	LDX.w #$057A
	LDY.w #$001E
CODE_80E8BD:
	LDA.b $38
	CMP.w #$001D
	BCS.b CODE_80E8FF
	CMP.w #$000B
	BCC.b CODE_80E8D2
	CMP.w #$0013
	BCS.b CODE_80E8D2
	INC.b $38
	BRA.b CODE_80E8BD

CODE_80E8D2:
	ASL
	STA.b $3A
	ASL
	CLC
	ADC.b $3A
	PHY
	TAY
	LDA.w DATA_818B12,y
	STA.b $00,x
	LDA.w DATA_818B12+$02,y
	STA.b $02,x
	LDA.w #$0470
	PLY
	STA.w $0DCE,y
	STA.b $04,x
	LDA.w #$3000
	STA.b $06,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	INC.b $38
	DEY
	DEY
	BPL.b CODE_80E8BD
CODE_80E8FF:
	RTS

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

CODE_80E900:
	LDX.w #$061A
	LDY.w #$0000
	LDA.w $0772
	STA.b $38
CODE_80E90B:
	LDA.b $38
	BEQ.b CODE_80E975
	DEC
	STA.b $38
	ASL
	ASL
	ASL
	TAY
	LDA.w $077A,y
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E936
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80E936
	PHA
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E933
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_80E933
	BRA.b CODE_80E944

CODE_80E933:
	PLA
	BRA.b CODE_80E96D

CODE_80E936:
	PHA
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80E944
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80E933
CODE_80E944:
	PLA
	DEC
	ASL
	STA.b $3A
	ASL
	CLC
	ADC.b $3A
	TAY
	LDA.w DATA_818B12,y
	STA.b $00,x
	LDA.w DATA_818B12+$02,y
	SEC
	SBC.w #$0020
	STA.b $02,x
	LDA.b $09
	AND.w #$000C
	LSR
	CLC
	ADC.w #$02C8
	STA.b $04,x
	LDA.w #$3000
	STA.b $06,x
CODE_80E96D:
	TXA
	CLC
	ADC.w #$000A
	TAX
	BRA.b CODE_80E90B

CODE_80E975:
	RTS

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

CODE_80E976:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0A9A
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0A9C
	LDA.w #$200E
	STA.w $0AA4
	LDA.w #$0050
	STA.w $0AA6
	LDA.w #$0064
	STA.w $0AA8
	LDA.w #$FA24
	STA.w $0AA0
	LDA.w #$0002
	STA.w $0AA2
	LDA.w #$4000
	STA.w $0A9E
	JSL.l CODE_82CD44
	LDA.w #$0000
	STA.w $0A9E
	JSL.l CODE_82CD44
	LDA.w #$0001
	STA.w $0AA2
	JSL.l CODE_82CD44
	LDA.w #$4000
	STA.w $0A9E
	JSL.l CODE_82CD44
	LDA.w #$0002
	STA.w $0AA2
	LDA.w #$FC18
	STA.w $0AA0
	JSL.l CODE_82CD44
	LDA.w #$0000
	STA.w $0A9E
	JSL.l CODE_82CD44
	LDA.w #$FB50
	STA.w $0AA0
	LDA.w #$0001
	STA.w $0AA2
	JSL.l CODE_82CD44
	LDA.w #$4000
	STA.w $0A9E
	JSL.l CODE_82CD44
	RTS

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

CODE_80E9FD:
	LDA.w $0DBC
	BNE.b CODE_80EA09
	LDA.w #$0001
	STA.w $0DBE
	RTS

CODE_80EA09:
	SEP.b #$20
	LDA.b #$50
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.b #$07
	STA.w !REGISTER_SubScreenLayers
	LDA.b #$02
	STA.w !REGISTER_ColorMathInitialSettings
	REP.b #$20
	LDX.w #$061A
	LDA.w $0DBE
	BEQ.b CODE_80EA2A
	STZ.w $0DBE
	STZ.w $0DCA
CODE_80EA2A:
	LDA.w $0DCA
	LSR
	AND.w #$00FE
	CLC
	ADC.w #$02D0
	STA.b $04,x
	LDA.w #$3000
	STA.b $06,x
	INC.w $0DCA
	LDA.w $0DCA
	CMP.w #$0088
	BCC.b CODE_80EAA3
	BNE.b CODE_80EA72
	JSR.w CODE_80B1DC
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0DC6
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0DC8
	LDX.w #$061A
	LDA.b $02,x
	SEC
	SBC.w #$0010
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.b $00,x
	STA.w !RAM_PLOK_Level_Player_XPosLo
	JSR.w CODE_80E976
	LDA.w #$0272
	STA.w $042A
CODE_80EA72:
	LDA.w #$0089
	STA.w $0DCA
	LDX.w #$061A
	LDA.w #$00E2
	STA.b $04,x
	LDX.w #$0000
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CMP.w $0DC6
	BCS.b CODE_80EA96
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0003
	STA.w !RAM_PLOK_Level_Player_YPosLo
	INX
CODE_80EA96:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CMP.w $0DC8
	BEQ.b CODE_80EAAA
	BCC.b CODE_80EAA5
	DEC.w !RAM_PLOK_Level_Player_XPosLo
CODE_80EAA3:
	BRA.b CODE_80EAE7

CODE_80EAA5:
	INC.w !RAM_PLOK_Level_Player_XPosLo
	BRA.b CODE_80EAE7

CODE_80EAAA:
	CPX.w #$0000
	BNE.b CODE_80EAE7
	LDA.w $0DC6
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w $0DC8
	STA.w !RAM_PLOK_Level_Player_XPosLo
	STZ.w $0770
	LDX.w #$061A
	LDA.w #$00E2
	STA.b $04,x
	DEC.w $0772
	STZ.b $09
	STZ.w $0DBC
	LDA.w #$0004
	STA.w $0DC4
	STA.w $0DC2
	STA.w $0DBE
	SEP.b #$20
	STZ.w !REGISTER_ColorMathSelectAndEnable
	STZ.w !REGISTER_SubScreenLayers
	STZ.w !REGISTER_ColorMathInitialSettings
	REP.b #$20
CODE_80EAE7:
	RTS

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

CODE_80EAE8:
	REP.b #$30
	LDA.w $0848						;\ Optimization: Junk code
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach		;|
	BCC.b CODE_80EAF2					;/
CODE_80EAF2:
	LDA.w #DATA_81D5E6
	STA.b $06
	JSR.w CODE_80EAFB
	RTS

CODE_80EAFB:
	LDY.w #$0000
CODE_80EAFE:
	LDA.b ($06),y
	TYX
	STA.l $7F0000,x
	CMP.w #$FFFF
	BEQ.b CODE_80EB0E
	INY
	INY
	BRA.b CODE_80EAFE

CODE_80EB0E:
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81D668,x
	STA.b $06
	LDY.w #$0000
CODE_80EB1B:
	LDA.b ($06),y
	CMP.w #$FFFF
	BEQ.b CODE_80EB31
	ASL
	ASL
	ASL
	TAX
	LDA.w #$8000
	STA.l $7F0000,x
	INY
	INY
	BRA.b CODE_80EB1B

CODE_80EB31:
	RTS

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

; Note: Palette animation routine

CODE_80EB32:
	PHP
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_80EB45
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_80EB8E
	CMP.w #!Define_PLOK_LevelID_PostBobbinsBros2OverworldCutscene
	BEQ.b CODE_80EB8E
CODE_80EB45:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_80EB5B
	LDA.w $0DEE
	INC
	STA.w $0DEE
	CMP.w #$000D
	BCC.b CODE_80EB5B
	STZ.w $0DEE
CODE_80EB5B:
	SEP.b #$20
	LDA.b #$11
	STA.w !REGISTER_CGRAMAddress
	REP.b #$30
	LDA.w $0DEE
	ASL
	ASL
	ASL
	ASL
	TAY
	LDA.w #$0007
	STA.b $38
CODE_80EB71:
	LDA.w DATA_818A42,y
	ASL
	TAX
	SEP.b #$20
	LDA.l $7F0C00,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $7F0C01,x
	STA.w !REGISTER_WriteToCGRAMPort
	REP.b #$20
	INY
	INY
	DEC.b $38
	BPL.b CODE_80EB71
CODE_80EB8E:
	PLP
	RTS

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

CODE_80EB90:
	LDX.w #$057A
	LDY.w #$001E
CODE_80EB96:
	LDA.b $00,x
	BMI.b CODE_80EBA6
	LDA.b $09
	AND.w #$0004
	LSR
	CLC
	ADC.w $0DCE,y
	STA.b $04,x
CODE_80EBA6:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_80EB96
	RTS

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

CODE_80EBB1:
	PHP
	REP.b #$30
	JSR.w CODE_80AA99
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSL.l CODE_82E1AC
	LDA.w $0DBC
	BNE.b CODE_80EBDE
	LDA.w $0DBE
	BEQ.b CODE_80EBDE
	LDA.w $0906
	BNE.b CODE_80EBD3
	LDA.w $068C
CODE_80EBD3:
	STZ.b $09
	LDA.w #$0001
	STA.w $0DBC
	STA.w $0DC0
CODE_80EBDE:
	LDA.w $068C
	AND.w #$3000
	BEQ.b CODE_80EBFD
	XBA
	STA.w $0804
	LDA.w $0770
	BNE.b CODE_80EBFD
	LDA.w $0DBC
	CMP.w #$0002
	BEQ.b CODE_80EBFD
	LDA.w #$0003
	STA.w $0DBC
CODE_80EBFD:
	LDA.w $0DBC
	CMP.w #$0002
	BEQ.b CODE_80EC57
	JSR.w CODE_80E900
	JSR.w CODE_80EB90
	LDA.w $0770
	BEQ.b CODE_80EC18
	JSR.w CODE_80E9FD
	LDA.w $0770
	BNE.b CODE_80EC38
CODE_80EC18:
	LDA.w $0DBC
	BEQ.b CODE_80EC25
	LDA.w $0906
	BNE.b CODE_80EC25
	JSR.w CODE_80F6AB
CODE_80EC25:
	JSR.w CODE_80EDD4
	JSR.w CODE_80ED7C
	JSR.w CODE_80EC59
	JSR.w CODE_80EC78
	JSR.w CODE_80ECC0
	JSL.l CODE_809F27
CODE_80EC38:
	LDX.w #$0000
	JSL.l CODE_82887F
	JSL.l CODE_828E4D
	LDA.w $0848						;\ Note: !Define_PLOK_LevelID_CottonIslandBeach
	BNE.b CODE_80EC4D					;/
	JSR.w CODE_80F4E0
	BRA.b CODE_80EC51

CODE_80EC4D:
	JSL.l CODE_82CE13
CODE_80EC51:
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
CODE_80EC57:
	PLP
	RTS

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

CODE_80EC59:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_80EC77
	LDA.w $0DC2
	BIT.w #$0040
	BEQ.b CODE_80EC77
	BIT.w #$0010
	BNE.b CODE_80EC71
	STZ.w $0DCC
	RTS

CODE_80EC71:
	LDA.w #$0001
	STA.w $0DCC
CODE_80EC77:
	RTS

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

CODE_80EC78:
	LDA.w #$003C
CODE_80EC7B:
	STA.b $38
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_80EC99
	LDA.b $38
	JSR.w CODE_80B5FD
	LDA.w $0DC2
	BIT.w #$0010
	BEQ.b CODE_80EC98
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w $0810
CODE_80EC98:
	RTS

CODE_80EC99:
	LDA.w $0DC2
	AND.w #$0007
	CMP.w $0DC4
	BNE.b CODE_80ECBF
	LDA.w $0DC2
	BIT.w #$0008
	BEQ.b CODE_80ECBF
	LDA.w #$0001
	STA.w !RAM_PLOK_Level_Player_InAirFlagLo
	LDA.w #$FC2C
	STA.w !RAM_PLOK_Level_Player_YSpeedLo
	LDA.w #$0001
	JSL.l CODE_80FD81
CODE_80ECBF:
	RTS

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

CODE_80ECC0:
	LDA.b $09
	AND.w #$0007
	BEQ.b CODE_80ECC8
	RTS

CODE_80ECC8:
	LDA.b $09
	AND.w #$0018
	LSR
	LSR
	STA.b $38
	LDA.w $0DC2
	AND.w #$0007
	CMP.w $0DC4
	BEQ.b CODE_80ED13
	BCC.b CODE_80ECF8
	SEC
	SBC.w $0DC4
	CMP.w #$0004
	BCS.b CODE_80ED05
CODE_80ECE7:
	LDA.w $0DC4
	INC
	CMP.w #$0008
	BCC.b CODE_80ECF3
	LDA.w #$0000
CODE_80ECF3:
	STA.w $0DC4
	BRA.b CODE_80ED22

CODE_80ECF8:
	STA.b $3A
	LDA.w $0DC4
	SEC
	SBC.b $3A
	CMP.w #$0004
	BCS.b CODE_80ECE7
CODE_80ED05:
	LDA.w $0DC4
	DEC
	BPL.b CODE_80ED0E
	LDA.w #$0007
CODE_80ED0E:
	STA.w $0DC4
	BRA.b CODE_80ED22

CODE_80ED13:
	LDA.w $0DC2
	BIT.w #$0020
	BNE.b CODE_80ED22
	AND.w #$FF00
	BNE.b CODE_80ED22
	STZ.b $38
CODE_80ED22:
	LDA.w #$2000
	STA.w $042C
	LDA.w $0DC4
	CMP.w #$0005
	BCC.b CODE_80ED3B
	ASL
	TAX
	LDA.w #$6000
	STA.w $042C
	LDA.w DATA_81896E,x
CODE_80ED3B:
	TAY
	ASL
	ASL
	ASL
	CLC
	ADC.b $38
	TAX
	LDA.w $0DC2
	BIT.w #$0008
	BNE.b CODE_80ED61
	AND.w #$FF00
	BNE.b CODE_80ED6B
	LDA.w $0DCC
	BEQ.b CODE_80ED5A
	LDA.w #$00E2
	BRA.b CODE_80ED5D

CODE_80ED5A:
	LDA.w DATA_81897E,x
CODE_80ED5D:
	STA.w $042A
	RTS

CODE_80ED61:
	TYA
	ASL
	TAX
	LDA.w DATA_8189A6,x
	STA.w $042A
	RTS

CODE_80ED6B:
	XBA
	DEC
	ASL
	TAX
	LDA.w DATA_8189B0,x
	STA.b $06
	LDY.b $38
	LDA.b ($06),y
	STA.w $042A
	RTS

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

CODE_80ED7C:
	LDA.w $0DC2
	AND.w #$0007
	CMP.w $0DC4
	BNE.b CODE_80ED97
	LDA.w $0DC2
	BIT.w #$0020
	BEQ.b CODE_80ED97
	LDA.w $0DC4
	ASL
	TAX
	JMP.w (DATA_80EDC4,x)

CODE_80ED97:
	RTS

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

CODE_80ED98:
	JSR.w CODE_80EE4D
	RTS

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

CODE_80ED9C:
	JSR.w CODE_80EE4D
	JSR.w CODE_80EE1B
	RTS

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

CODE_80EDA3:
	JSR.w CODE_80EE1B
	RTS

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

CODE_80EDA7:
	JSR.w CODE_80EE1B
	JSR.w CODE_80EE66
	RTS

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

CODE_80EDAE:
	JSR.w CODE_80EE66
	RTS

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

CODE_80EDB2:
	JSR.w CODE_80EE34
	RTS

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

CODE_80EDB6:
	JSR.w CODE_80EE66
	JSR.w CODE_80EE34
	RTS

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

CODE_80EDBD:
	JSR.w CODE_80EE34
	JSR.w CODE_80EE4D
	RTS

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

DATA_80EDC4:
	dw CODE_80ED98
	dw CODE_80ED9C
	dw CODE_80EDA3
	dw CODE_80EDA7
	dw CODE_80EDAE
	dw CODE_80EDB6
	dw CODE_80EDB2
	dw CODE_80EDBD

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

CODE_80EDD4:
	LDA.w $0DC0
	BEQ.b CODE_80EDE3
	LDA.w $0DBC
	BNE.b CODE_80EDDF
	RTS

CODE_80EDDF:
	DEC.w $0DC0
	RTS

CODE_80EDE3:
	LDA.w $0848
	AND.w #$0FFF
	ASL
	TAX
	LDA.w DATA_818C92,x
	STA.b $38
	LDY.w $0DBE
	LDA.b ($38),y
	CMP.w #$FFFF
	BEQ.b CODE_80EE0A
	STA.w $0DC0
	INY
	INY
	LDA.b ($38),y
	STA.w $0DC2
	INY
	INY
	STY.w $0DBE
	RTS

CODE_80EE0A:
	LDA.w $0906
	BNE.b CODE_80EE14
	LDA.w $068C
	BEQ.b CODE_80EE1A
CODE_80EE14:
	LDA.w #$0002
	STA.w $0DBC
CODE_80EE1A:
	RTS

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

CODE_80EE1B:
	LDA.b $09
	AND.w #$0001
	BNE.b CODE_80EE33
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0098
	BCC.b CODE_80EE30
	JSR.w CODE_80A8D8
CODE_80EE30:
	INC.w !RAM_PLOK_Level_Player_XPosLo
CODE_80EE33:
	RTS

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

CODE_80EE34:
	LDA.b $09
	AND.w #$0001
	BNE.b CODE_80EE4C
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0070
	BCC.b CODE_80EE49
	JSR.w CODE_80A924
CODE_80EE49:
	DEC.w !RAM_PLOK_Level_Player_XPosLo
CODE_80EE4C:
	RTS

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

CODE_80EE4D:
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80EE65
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$0040
	BCC.b CODE_80EE62
	JSR.w CODE_80A9BD
CODE_80EE62:
	DEC.w !RAM_PLOK_Level_Player_YPosLo
CODE_80EE65:
	RTS

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

CODE_80EE66:
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80EE7E
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$0071
	BCC.b CODE_80EE7B
	JSR.w CODE_80A971
CODE_80EE7B:
	INC.w !RAM_PLOK_Level_Player_YPosLo
CODE_80EE7E:
	RTS

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

CODE_80EE7F:
	REP.b #$30
	JSR.w CODE_809EBF
	LDX.w #$5400
	JSR.w CODE_80A07C
	LDX.w #$5800
	JSR.w CODE_80A07C
	JSL.l CODE_82CBFE
	JSR.w CODE_80A181
	INC.b !RAM_PLOK_UnknownRAM0000A8
	JSL.l CODE_809FE0
	JSR.w CODE_80E49E
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_HDMAEnable
	LDA.b #$13
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	LDA.b #!BGModeAndTileSizeSetting_Use16x16Layer1Tiles|!BGModeAndTileSizeSetting_Use16x16Layer2Tiles|!BGModeAndTileSizeSetting_Use16x16Layer3Tiles|!BGModeAndTileSizeSetting_Use16x16Layer4Tiles|!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$10
	STA.w !REGISTER_BG1And2TileDataDesignation
	STZ.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	JSR.w CODE_809EE5
	JSR.w CODE_80EF75
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$6000
	LDY.w #!Define_PLOK_GFX_Sprite_Level_Global1
	JSL.l CODE_87E000
	JSL.l CODE_82CD04
	REP.b #$20
	INC.w $0DAC
	STZ.w $0DAA
	REP.b #$30
	JSL.l CODE_809FE0
	SEP.b #$20
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	REP.b #$20
	STZ.b !RAM_PLOK_UnknownRAM00006A
	STZ.b !RAM_PLOK_UnknownRAM00006C
	JSR.w CODE_80B1DC
	LDA.w #$0050
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w #$00A0
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDX.w #$0007
CODE_80EF07:
	PHX
	JSL.l CODE_809FE0
	JSR.w CODE_80F026
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	PLX
	DEX
	BPL.b CODE_80EF07
	JSL.l CODE_809FE0
	LDA.w #$0000
	JSR.w CODE_80F69C
	LDA.w #$07D0
	STA.w $09EA
	JSR.w CODE_809304
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_82E222
endif
	JSR.w CODE_80EF4C
	JSR.w CODE_809F96
	JSR.w CODE_80F28A
	REP.b #$30
	LDA.w #$00F0
	XBA
	AND.w #$FF00
	ORA.w #$0003
	JSL.l CODE_82E177
	JSR.w CODE_809F96
	JSR.w CODE_80FACD
	RTS

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

CODE_80EF4C:
	REP.b #$30
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80F068
	JSR.w CODE_80F13F
	JSR.w CODE_80F026
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	LDA.w $0DBC
	CMP.w #$0002
	BEQ.b CODE_80EF74
	LDA.w $068C
	AND.w #$1000
	BEQ.b CODE_80EF4C
CODE_80EF74:
	RTS

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

CODE_80EF75:
	JSR.w CODE_80EFBF
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_LevelData_IntroPloksHouse
	JSL.l CODE_87E000
	SEP.b #$20
	LDX.w #$5400
	LDY.w #$7E3000
	STY.b $38
	LDA.b #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B0C2
	JSR.w CODE_80A1A6
	REP.b #$20
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_LevelBG_AkrillicPloksHouse
	JSL.l CODE_87E000
	SEP.b #$20
	LDX.w #$57C0
	LDY.w #$7E3000
	STY.b $38
	LDA.b #$7E3000>>16
	STA.b $3A
	LDY.w #DATA_81B0C2
	JSR.w CODE_80A1A6
	RTS

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

CODE_80EFBF:
	PHP
	REP.b #$10
	LDX.w #$5400
	JSR.w CODE_80A07C
	LDX.w #$5800
	JSR.w CODE_80A07C
	LDX.w #$5C00
	JSR.w CODE_80A07C
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$1000
	LDY.w #!Define_PLOK_GFX_FG_Level_Objects
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$2000
	LDY.w #!Define_PLOK_GFX_FG_Level_GrandpappyStatue
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$3000
	LDY.w #!Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var02
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4000
	LDY.w #!Define_PLOK_GFX_BG_Level_AkrillicSleepyDale
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0010
	LDY.w #!Define_PLOK_Palette_BG_AkrillicPloksHouse
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0020
	LDY.w #!Define_PLOK_Palette_FG_AkrillicPloksHouse
	JSL.l CODE_87E000
	PLP
	RTS

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

CODE_80F026:
	REP.b #$30
	LDA.w #!Define_PLOK_Level_Player_MaxHP
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	LDA.w $0DC2
	BIT.w #$0040
	BNE.b CODE_80F067
	LDA.w $080A
	BPL.b CODE_80F044
	LDY.w $0808
	LDA.w DATA_818332,y
	STA.w $080A
CODE_80F044:
	JSR.w CODE_80B4D9
	LDX.w $0808
	LDA.w DATA_818396,x
	STA.b $38
	LDA.w $080A
	CLC
	ADC.w $07FE
	ASL
	TAY
	LDA.b ($38),y
	STA.w $042A
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80F067
	DEC.w $080A
CODE_80F067:
	RTS

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

CODE_80F068:
	REP.b #$30
	LDA.w $0DC0
	BEQ.b CODE_80F073
	DEC.w $0DC0
CODE_80F072:
	RTS

CODE_80F073:
	LDA.b $09
	AND.w #$0003
	CMP.w #$0001
	BNE.b CODE_80F072
	LDY.w $0DBE
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicPloksHouse
	BEQ.b CODE_80F0AB
	TYX
	LDA.l DATA_86F0FE,x
	CMP.w #$FFFF
	BEQ.b CODE_80F0B1
	STA.w $0DC0
	TYA
	CLC
	ADC.w #$0006
	STA.w $0DBE
	TYX
	LDA.l DATA_86F0FE+$04,x
	STA.w $042A
	LDA.l DATA_86F0FE+$02,x
	BRA.b CODE_80F0CA

CODE_80F0AB:
	LDA.w DATA_819312,y
	CMP.w #$FFFF
CODE_80F0B1:
	BNE.b CODE_80F0B6
	JMP.w CODE_80F138

CODE_80F0B6:
	STA.w $0DC0
	TYA
	CLC
	ADC.w #$0006
	STA.w $0DBE
	LDA.w DATA_819312+$04,y
	STA.w $042A
	LDA.w DATA_819312+$02,y
CODE_80F0CA:
	STA.w $0DC2
	AND.w #$0007
	STA.w $0DC4
	LDA.w $0DC2
	BIT.w #$0020
	BNE.b CODE_80F0E3
	STZ.w $0808
	STZ.w $080A
	BRA.b CODE_80F0F7

CODE_80F0E3:
	LDA.w $0808
	CMP.w #$0002
	BEQ.b CODE_80F0F7
	LDA.w #$FFFF
	STA.w $080A
	LDA.w #$0002
	STA.w $0808
CODE_80F0F7:
	LDA.w $0DC2
	AND.w #$0040
	BEQ.b CODE_80F0FF
CODE_80F0FF:
	STZ.w $07F2
	LDA.w $0DC2
	XBA
	AND.w #$00FF
	CMP.w #$00FF
	BNE.b CODE_80F11B
	STZ.w $07EE
	STZ.w $07F0
	LDA.w #$001C
	STA.w $07F2
	RTS

CODE_80F11B:
	PHA
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_8192D2,y
	STA.w $07F0
	PLA
	LSR
	LSR
	LSR
	LSR
	AND.w #$000F
	ASL
	TAY
	LDA.w DATA_8192F2,y
	STA.w $07EE
	RTS

CODE_80F138:
	LDA.w #$0002
	STA.w $0DBC
	RTS

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

CODE_80F13F:
	LDA.w $0DC2
	AND.w #$0020
	BEQ.b CODE_80F14F
	LDA.w $0DC4
	ASL
	TAX
	JMP.w (DATA_80F150,x)

CODE_80F14F:
	RTS

DATA_80F150:
	dw CODE_80F160
	dw CODE_80F160
	dw CODE_80F18E
	dw CODE_80F1A6
	dw CODE_80F168
	dw CODE_80F184
	dw CODE_80F16C
	dw CODE_80F160

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

CODE_80F160:
	JSR.w CODE_80A9BD
	RTS

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

CODE_80F164:
	DEC.w !RAM_PLOK_Level_Player_YPosLo
	RTS

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

CODE_80F168:
	JSR.w CODE_80A971
	RTS

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

CODE_80F16C:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0070
	BCS.b CODE_80F17A
	JSR.w CODE_80A924
CODE_80F17A:
	DEC.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w #$6000
	STA.w $042C
	RTS

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

CODE_80F184:
	DEC.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w #$6000
	STA.w $042C
	RTS

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

CODE_80F18E:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0098
	BCC.b CODE_80F19C
	JSR.w CODE_80A8D8
CODE_80F19C:
	INC.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w #$2000
	STA.w $042C
	RTS

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

CODE_80F1A6:
	INC.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w #$2000
	STA.w $042C
	RTS

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

CODE_80F1B0:
	REP.b #$30
	LDX.w #$0016
CODE_80F1B5:
	STZ.b !RAM_PLOK_UnknownRAM00007E,x
	DEX
	DEX
	BPL.b CODE_80F1B5
	LDA.w #$01C0
	STA.b !RAM_PLOK_UnknownRAM00006A
	STZ.b !RAM_PLOK_UnknownRAM00007A
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM00006E
	STA.b !RAM_PLOK_UnknownRAM000072
	LDA.b !RAM_PLOK_UnknownRAM00006A
	AND.w #$000F
	STA.b !RAM_PLOK_UnknownRAM00007E
	STA.b !RAM_PLOK_UnknownRAM000082
	LDA.w #$00B0
	STA.b !RAM_PLOK_UnknownRAM00006C
	STZ.b !RAM_PLOK_UnknownRAM00007C
	LSR
	LSR
	LSR
	LSR
	STA.b !RAM_PLOK_UnknownRAM000070
	STA.b !RAM_PLOK_UnknownRAM000074
	LDA.b !RAM_PLOK_UnknownRAM00006C
	AND.w #$000F
	STA.b !RAM_PLOK_UnknownRAM000080
	STA.b !RAM_PLOK_UnknownRAM000084
	STZ.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	STZ.b !RAM_PLOK_Level_HighestCameraYPosLo
	LDA.w #$0800
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	STA.b !RAM_PLOK_Level_LowestCameraYPosLo
	LDA.w #$0044
	STA.b !RAM_PLOK_UnknownRAM00008A
	STA.b !RAM_PLOK_UnknownRAM00008C
	RTS

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

CODE_80F1FE:
	SEC
	SBC.b $42
	BRA.b CODE_80F205

CODE_80F203:
	LDA.b $42
CODE_80F205:
	CLC
	ADC.b $40
	STA.b $40
CODE_80F20A:
	CMP.w #$00C0
	BCC.b CODE_80F21C
	SEC
	SBC.w #$00C0
	STA.b $40
	JSR.w CODE_80A8D8
	LDA.b $40
	BRA.b CODE_80F20A

CODE_80F21C:
	RTS

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

CODE_80F21D:
	SEC
	SBC.b $42
	BRA.b CODE_80F224

CODE_80F222:
	LDA.b $42
CODE_80F224:
	CLC
	ADC.b $40
	STA.b $40
CODE_80F229:
	CMP.w #$00C0
	BCC.b CODE_80F23B
	SEC
	SBC.w #$00C0
	STA.b $40
	JSR.w CODE_80A924
	LDA.b $40
	BRA.b CODE_80F229

CODE_80F23B:
	RTS

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

CODE_80F23C:
	SEC
	SBC.b $42
	BRA.b CODE_80F243

CODE_80F241:
	LDA.b $42
CODE_80F243:
	CLC
	ADC.b $3E
	STA.b $3E
CODE_80F248:
	CMP.w #$0140
	BCC.b CODE_80F25A
	SEC
	SBC.w #$0140
	STA.b $3E
	JSR.w CODE_80A971
	LDA.b $3E
	BRA.b CODE_80F248

CODE_80F25A:
	RTS

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

CODE_80F25B:
	SEC
	SBC.b $42
	BRA.b CODE_80F262

CODE_80F260:
	LDA.b $42
CODE_80F262:
	CLC
	ADC.b $3E
	STA.b $3E
CODE_80F267:
	CMP.w #$0140
	BCC.b CODE_80F279
	SEC
	SBC.w #$0140
	STA.b $3E
	JSR.w CODE_80A9BD
	LDA.b $3E
	BRA.b CODE_80F267

CODE_80F279:
	RTS

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

CODE_80F27A:
	LDA.b $09
	AND.w #$00F0
	LSR
	LSR
	LSR
	TAX
	LDA.w DATA_8192B2,x
	STA.w $042A
	RTS

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

CODE_80F28A:
	REP.b #$20
	LDA.w #$0002
	STA.w $0DAC
	STZ.w $0DAA
	STZ.w $0848
	JSR.w CODE_80E54E
	JSR.w CODE_80F1B0
	JSR.w CODE_80B1DC
	JSR.w CODE_80F27A
	JSR.w CODE_80F494
	JSR.w CODE_80A20C
	LDA.w #$0002
	JSR.w CODE_80F69C
	JSL.l CODE_809FE0
	SEP.b #$20
	STZ.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.b !RAM_PLOK_UnknownRAM0000A8
	REP.b #$20
	JSR.w CODE_809FBB
	STZ.b $3E
	STZ.b $40
	LDA.w #$00F0
	STA.b $42
CODE_80F2CF:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSR.w CODE_80F27A
	JSR.w CODE_80F4E0
	LDA.w #$00F0
	JSR.w CODE_80F1FE
	JSR.w CODE_80F260
	JSR.w CODE_80A20C
	LDA.w $068C
	AND.w #$1000
	BNE.b CODE_80F35B
	DEC.b $42
	BNE.b CODE_80F2CF
	STZ.b $3E
	STZ.b $40
	LDA.w #$012C
	STA.b $42
CODE_80F303:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSR.w CODE_80F27A
	JSR.w CODE_80F4E0
	JSR.w CODE_80F203
	LDA.w #$012C
	JSR.w CODE_80F23C
	JSR.w CODE_80A20C
	LDA.w $068C
	AND.w #$1000
	BNE.b CODE_80F35B
	DEC.b $42
	BNE.b CODE_80F303
	STZ.b $3E
	STZ.b $40
	LDA.w #$012C
	STA.b $42
CODE_80F337:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSR.w CODE_80F4E0
	LDA.w #$012C
	JSR.w CODE_80F21D
	JSR.w CODE_80F241
	JSR.w CODE_80A20C
	LDA.w $068C
	AND.w #$1000
	BEQ.b CODE_80F35E
CODE_80F35B:
	JMP.w CODE_80F458

CODE_80F35E:
	DEC.b $42
	BNE.b CODE_80F337
	STZ.b $3E
	STZ.b $40
	LDA.w #$0168
	STA.b $42
CODE_80F36B:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSR.w CODE_80F27A
	JSR.w CODE_80F4E0
	JSR.w CODE_80F222
	LDA.w #$0168
	JSR.w CODE_80F25B
	JSR.w CODE_80A20C
	LDA.w $068C
	AND.w #$1000
	BNE.b CODE_80F35B
	DEC.b $42
	BNE.b CODE_80F36B
	SEP.b #$30
	LDA.b #$01
	STA.w $0678
	STZ.w $0679
	LDA.b #$33
	STA.w $067F
	LDA.b #$00
	STA.w $0680
	LDA.b #$03
	STA.w $0681
	LDA.b #$30
	STA.w $067A
	LDA.b #$10
	STA.w $067B
	REP.b #$20
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_828168
CODE_80F3C5:
	JSL.l CODE_809FE0
	LDA.w #$0080
	JSR.w CODE_80FB33
	BPL.b CODE_80F3C5
	REP.b #$30
	LDA.w #$017C
	STA.b $42
CODE_80F3D8:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSR.w CODE_80F4E0
	JSR.w CODE_80A20C
	LDA.w $068C
	AND.w #$1000
	BNE.b CODE_80F458
	DEC.b $42
	BNE.b CODE_80F3D8
CODE_80F3F7:
	JSL.l CODE_809FE0
	LDA.w #$0400
	JSR.w CODE_80FADF
	BPL.b CODE_80F3F7
	JSR.w CODE_80FACD
	LDA.w #$027A
	STA.w $042A
	LDA.w #$00C8
	STA.b $42
CODE_80F411:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSR.w CODE_80F4E0
	JSR.w CODE_80A8D8
	JSR.w CODE_80A20C
	LDA.w $068C
	AND.w #$1000
	BNE.b CODE_80F458
	DEC.b $42
	BNE.b CODE_80F411
	LDA.w #$015E
	STA.b $42
CODE_80F438:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80EB32
	JSR.w CODE_8085D1
	JSR.w CODE_80F4E0
	JSR.w CODE_80A20C
	LDA.w $068C
	AND.w #$1000
	BNE.b CODE_80F458
	DEC.b $42
	BNE.b CODE_80F438
	RTS

CODE_80F458:
	RTS

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

CODE_80F459:
	LDX.w #$04A8
	LDY.w #$0000
	LDA.w #$000B
	STA.b $38
CODE_80F464:
	LDA.b $38
	ASL
	TAY
	LDA.w DATA_818C74,y
	TAY
	LDA.w DATA_818B12,y
	STA.b $00,x
	LDA.w DATA_818B12+$02,y
	STA.b $02,x
	LDA.w #$0406
	STA.b $04,x
	STA.w $0DCE,y
	LDA.w #$3000
	STA.b $06,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	TYA
	CLC
	ADC.w #$0006
	TAY
	DEC.b $38
	BPL.b CODE_80F464
	RTS

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

CODE_80F494:
	LDX.w #$04A8
	LDY.w #$0000
	LDA.w #$000B
	STA.b $38
CODE_80F49F:
	LDA.b $38
	ASL
	TAY
	LDA.w DATA_818C74,y
	TAY
	LDA.w DATA_818B12,y
	STA.b $00,x
	LDA.w DATA_818B12+$02,y
	STA.b $02,x
	LDA.w #$0406
	STA.b $04,x
	LDA.w #$3000
	STA.b $06,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	TYA
	CLC
	ADC.w #$0006
	TAY
	DEC.b $38
	BPL.b CODE_80F49F
	LDA.w DATA_818B12
	STA.b $00,x
	LDA.w DATA_818B12+$02
	STA.b $02,x
	LDA.w #$029E
	STA.b $04,x
	LDA.w #$3000
	STA.b $06,x
	RTS

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

CODE_80F4E0:
	LDX.w #$04A8
	LDY.w #$000B
CODE_80F4E6:
	TXA
	CLC
	ADC.b $09
	AND.w #$0004
	LSR
	CLC
	ADC.w #$0406
	STA.b $04,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	BPL.b CODE_80F4E6
	LDA.b $09
	AND.w #$0004
	LSR
	CLC
	ADC.w #$029E
	STA.b $04,x
	RTS

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

CODE_80F50A:
	LDA.w #$0004
	JSR.w CODE_80F69C
	LDA.w #$07D0
	STA.w $09EA
	INC.w $08D0
CODE_80F519:
	REP.b #$30
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	JSR.w CODE_80D934
	JSR.w CODE_80F068
	JSR.w CODE_80F13F
	JSR.w CODE_80F026
	JSL.l CODE_82D5F4
	LDA.w #$0038
	JSR.w CODE_80EC7B
	JSR.w CODE_80F63B
	JSR.w CODE_80F647
	JSR.w CODE_809B9D
	JSR.w CODE_80A20C
	LDA.w $0DBC
	CMP.w #$0002
	BNE.b CODE_80F519
	LDX.w #$0050
	JSR.w CODE_809FF9
CODE_80F552:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0180
	BCC.b CODE_80F567
	LDA.b !RAM_PLOK_UnknownRAM00007E
	CMP.w #$0001
	BEQ.b CODE_80F572
CODE_80F567:
	JSR.w CODE_80A8D8
	INC.w !RAM_PLOK_Level_Player_XPosLo
	JSR.w CODE_80A20C
	BRA.b CODE_80F552

CODE_80F572:
	STZ.b $09
	STZ.w $0686
	STZ.w $0684
	STZ.w $0688
	STZ.w $0682
	JSR.w CODE_80FA61
	JSL.l CODE_809FE0
	JSR.w CODE_80F9DA
	LDA.w #$01F4
	STA.w $076A
CODE_80F590:
	JSL.l CODE_809FE0
	JSR.w CODE_80F6AB
	LDA.w $0686
	CLC
	ADC.w #$0102
	AND.w #$FEFF
	STA.w $0686
	LDA.b $09
	AND.w #$001F
	BNE.b CODE_80F5B7
	LDA.w $0684
	CMP.w #$0018
	BCS.b CODE_80F5B7
	INC
	STA.w $0684
CODE_80F5B7:
	JSR.w CODE_80FA61
	DEC.w $076A
	BNE.b CODE_80F590
	JSR.w CODE_80FA0A
	JSR.w CODE_80FA00
	SEP.b #$20
	LDA.b #!BGModeAndTileSizeSetting_Mode01Enable|!BGModeAndTileSizeSetting_Mode01Layer3Priority
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$04
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	REP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	STZ.w $0DAA
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallLetters
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_PastLayer3
	JSL.l CODE_87E000
	LDX.w #$5C00
	LDA.w #$0180
	JSR.w CODE_80A076
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_WriteIndependantTextString($03, $09, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line1, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($05, $0B, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line2, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($05, $0D, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line3, CODE_80A4AF)
	%PLOK_WriteIndependantTextString($09, $0F, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line4, CODE_80A4AF)
else
	%PLOK_WriteIndependantTextString($03, $09, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line1, CODE_80A488)
	%PLOK_WriteIndependantTextString($05, $0B, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line2, CODE_80A488)
	%PLOK_WriteIndependantTextString($05, $0D, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line3, CODE_80A488)
	%PLOK_WriteIndependantTextString($09, $0F, !Text_Layer_3, !Text_Palette_1, FlashbackTransitionText_Line4, CODE_80A488)
endif
	JSR.w CODE_809FBB
	LDX.w #$01F4
	JSR.w CODE_809FF9
	JSR.w CODE_809F96
	RTS

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

CODE_80F63A:
	RTS

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

CODE_80F63B:
	LDA.w $0DBE
	CMP.w #$0066
	BCC.b CODE_80F646
	JSR.w CODE_8092D0
CODE_80F646:
	RTS

CODE_80F647:
	LDA.w $0DBE
	CMP.w #$00EA
	BCC.b CODE_80F656
	INC.w $08CE
	STZ.b $42
	STZ.b $09
CODE_80F656:
	RTS

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

CODE_80F657:
	LDA.w $0DBE
	CMP.w #$0102
	BCC.b CODE_80F69B
	LDA.w #$0001
	STA.w $08CC
	LDX.w #!RAM_PLOK_Level_Player_FlyingLimbTable
	LDA.b $42
	CMP.w #$0012
	BCS.b CODE_80F696
	LDA.w #$043A
	STA.b $04,x
	LDA.w $0DBE
	CMP.w #$0108
	BCC.b CODE_80F69B
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80F685
	INC.b $42
CODE_80F685:
	INC.b $00,x
	INC.b $00,x
	LDA.b $42
	ASL
	TAY
	LDA.w DATA_81942E,y
	CLC
	ADC.b $02,x
	STA.b $02,x
	RTS

CODE_80F696:
	LDA.w #$00E2
	STA.b $04,x
CODE_80F69B:
	RTS

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

CODE_80F69C:
	REP.b #$30
	STA.w !RAM_PLOK_Level_CurrentMessageIndex
	STZ.w $0DB2
	STZ.w $0DB0
	STZ.w $0DBA
	RTS

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

CODE_80F6AB:
	LDA.w $0DBA
	BNE.b CODE_80F71E
	INC.w $0DB2
	LDX.w !RAM_PLOK_Level_CurrentMessageIndex
	LDA.w DATA_819A14,x
	STA.b $38
	LDY.w $0DB0
	LDA.b ($38),y
	AND.w #$3FFF
	CMP.w $0DB2
	BEQ.b CODE_80F6D1
	CMP.w #$3FFF
	BNE.b CODE_80F6D0
	DEC.w $0DB2
CODE_80F6D0:
	RTS

CODE_80F6D1:
	PHY
	STZ.w $0DBA
	LDA.b ($38),y
	BIT.w #$4000
	BNE.b CODE_80F6FA
	LDA.b ($38),y
	BPL.b CODE_80F6E8
	JSR.w CODE_80F702
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSR.w CODE_80A4AF
else
	JSR.w CODE_80A488
endif
	BRA.b CODE_80F6EE

CODE_80F6E8:
	JSR.w CODE_80F702
	JSR.w CODE_80A457
CODE_80F6EE:
	PLA
	CLC
	ADC.w #$0008
	STA.w $0DB0
	STZ.w $0DB2
	RTS

CODE_80F6FA:
	STA.w $0DBA
	JSR.w CODE_80F702
	BRA.b CODE_80F6EE

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

CODE_80F702:
	INY
	INY
	LDA.b ($38),y
	STA.w $0DB4
	STA.w $0DB6
	TAX
	INY
	INY
	LDA.b ($38),y
	STA.b !RAM_PLOK_UnknownRAM0000AB
	PHA
	INY
	INY
	LDA.b ($38),y
	STA.w $0DB8
	TAY
	PLA
	RTS

CODE_80F71E:
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_80F732
	LDA.w $0DBA
	BPL.b CODE_80F72F
	JSR.w CODE_80F79A
	BRA.b CODE_80F732

CODE_80F72F:
	JSR.w CODE_80F733
CODE_80F732:
	RTS

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

CODE_80F733:
	PHP
	REP.b #$30
	LDA.w $0DB8
	STA.b $38
	LDA.w $0DB4
	STA.w !REGISTER_VRAMAddressLo
	SEP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PHB
	LDA.w $1814
	AND.b #$03
	BNE.b +
	LDA.b #$1F
	BRA.b ++

+:
	ASL
	ASL
++:
	PHA
	PLB
endif
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	REP.b #$30
	LDY.w #$0000
	LDA.b ($38),y
	CMP.w #$FFFF
	BEQ.b CODE_80F793
	CMP.w #$00FE
	BEQ.b CODE_80F76E
	REP.b #$30
	JSL.l CODE_82E4ED
	INC.w $0DB8
	INC.w $0DB8
	BRA.b CODE_80F76C
else
	LDY.b #$00
	LDA.b ($38),y
	CMP.b #$FF
	BEQ.b CODE_80F793
	CMP.b #$FE
	BEQ.b CODE_80F76E
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData,x
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData+$01,x
	ORA.b !RAM_PLOK_UnknownRAM0000AB
	STA.w !REGISTER_WriteToVRAMPortHi
endif
	REP.b #$30
	INC.w $0DB8
	INC.w $0DB4
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PLB
endif
CODE_80F76C:
	PLP
	RTS

CODE_80F76E:
	REP.b #$30
	LDA.w #$0020
	STA.b $38
	LDA.w $0DBA
	BIT.w #$8000
	BEQ.b CODE_80F782
	LDA.w #$0040
	STA.b $38
CODE_80F782:
	LDA.w $0DB6
	CLC
	ADC.b $38
	STA.w $0DB4
	STA.w $0DB6
	INC.w $0DB8
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PLB
endif
	PLP
	RTS

CODE_80F793:
	REP.b #$30
	STZ.w $0DBA
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PLB
endif
	PLP
	RTS

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

; Note: Routine that draws small letters?

CODE_80F79A:
	PHP
	REP.b #$30
	LDA.w $0DB8
	STA.b $38
	LDA.w $0DB4
	STA.w !REGISTER_VRAMAddressLo
	SEP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PHB
	LDA.w $1814
	AND.b #$03
	BNE.b +
	LDA.b #$1F
	BRA.b ++

+:
	ASL
	ASL
++:
	PHA
	PLB
endif
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDY.b #$00
	LDA.b ($38),y
	CMP.b #$FF
	BEQ.b CODE_80F793
	CMP.b #$FE
	BEQ.b CODE_80F76E
	CLC
	ADC.b #$80
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$01
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	ADC.b !RAM_PLOK_UnknownRAM0000AB
else
	ORA.b !RAM_PLOK_UnknownRAM0000AB
endif
	STA.w !REGISTER_WriteToVRAMPortHi
	REP.b #$30
	INC.w $0DB8
	INC.w $0DB4
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	PLB
endif
	PLP
	RTS

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

CODE_80F7D2:
	PHP
	REP.b #$10
	SEP.b #$20
	STZ.w !REGISTER_ColorMathInitialSettings
	STZ.w !REGISTER_ColorMathSelectAndEnable
	STZ.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	LDA.b #$05
	STA.w $0678
	STZ.w $0679
	LDA.b #$22
	STA.w $067F
	STA.w $0680
	LDA.b #$02
	STA.w $0681
	REP.b #$20
	LDA.w #$0010
	STA.w $0676
	JSL.l CODE_828168
	PLP
	RTS

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

CODE_80F809:
	PHP
	REP.b #$20
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$0005
	SEP.b #$20
	STA.w $067A
	REP.b #$20
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0008
	SEP.b #$20
	STA.w $067B
	REP.b #$10
	SEP.b #$20
	STZ.w !REGISTER_CGRAMAddress
	STZ.w !REGISTER_WriteToCGRAMPort
	STZ.w !REGISTER_WriteToCGRAMPort
	LDA.b #$06
	STA.w $0678
	STZ.w $0679
	LDA.b #$22
	STA.w $067F
	STA.w $0680
	LDA.b #$02
	STA.w $0681
	REP.b #$20
	LDA.w #$0000
	STA.w $0676
	JSL.l CODE_828168
	PLP
	RTS

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

CODE_80F85C:
	PHP
	REP.b #$10
	SEP.b #$20
	LDA.b #$14
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	STZ.w !REGISTER_ColorMathInitialSettings
	LDA.b #$01
	STA.w $0678
	STZ.w $0679
	LDA.b #$33
	STA.w $067F
	STZ.w $0680
	LDA.b #$00
	STA.w $0681
	REP.b #$20
	LDA.w #$0000
	STA.w $0676
	JSL.l CODE_828168
	SEP.b #$20
	JSL.l CODE_809FE0
	LDA.b #$17
	STA.b !RAM_PLOK_UnknownRAM0000AA
	STA.w !REGISTER_MainScreenLayers
	PLP
	RTS

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

CODE_80F89B:
	PHP
	REP.b #$10
	SEP.b #$20
	STZ.w !REGISTER_ColorMathInitialSettings
	STZ.w !REGISTER_ColorMathSelectAndEnable
	STZ.w !REGISTER_CGRAMAddress
	LDA.b #$00
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.b #$00
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.b #$01
	STA.w $0678
	STZ.w $0679
	LDA.b #$22
	STA.w $067F
	STA.w $0680
	LDA.b #$02
	STA.w $0681
	REP.b #$20
	LDA.w #$0040
	STA.w $0676
	JSL.l CODE_828168
	PLP
	RTS

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

CODE_80F8D6:
	REP.b #$10
	SEP.b #$20
	LDA.b #$05
	STA.w $0678
	STZ.w $0679
	LDA.b #$22
	STA.w $067F
	STA.w $0680
	LDA.b #$02
	STA.w $0681
	REP.b #$20
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_828168
	RTS

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

CODE_80F8FC:
	REP.b #$10
	SEP.b #$20
	LDA.b #$01
	STA.w $0678
	STZ.w $0679
	LDA.b #$22
	STA.w $067F
	STA.w $0680
	LDA.b #$02
	STA.w $0681
	REP.b #$20
	LDA.w #$0400
	STA.w $0676
	JSL.l CODE_828168
	RTS

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

CODE_80F922:
	JSL.l CODE_809FE0
	REP.b #$20
	JSL.l CODE_8281B5
	LDA.w $0676
	LSR
	LSR
	LSR
	BNE.b CODE_80F938
	CLC
	ADC.w #$0008
CODE_80F938:
	CLC
	ADC.w $0676
	STA.w $0676
	LDA.w $0677
	AND.w #$00FF
	CMP.w #$0004
	BCC.b CODE_80F922
	RTS

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

CODE_80F94B:
	REP.b #$30
	SEP.b #$20
	STZ.w !REGISTER_ColorMathInitialSettings
	STZ.w !REGISTER_ColorMathSelectAndEnable
	LDA.b #$01
	STA.w $0678
	STZ.w $0679
	LDA.b #$80
	STA.w $067A
	LDA.b #$40
	STA.w $067B
	LDA.b #$33
	STA.w $067F
	STZ.w $0680
	LDA.b #$03
	STA.w $0681
	REP.b #$20
	LDA.w #$0140
	STA.w $0676
	JSL.l CODE_828168
	RTS

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

CODE_80F981:
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MaxBrightness0F
	STA.w !REGISTER_ScreenDisplayRegister
CODE_80F988:
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_Brightness08
	STA.w !REGISTER_ScreenDisplayRegister
	REP.b #$20
	JSL.l CODE_8281B5
	LDA.w $0676
	LSR
	LSR
	LSR
	LSR
	BNE.b CODE_80F9A3
	INC
CODE_80F9A3:
	CLC
	ADC.w $0676
	STA.w $0676
	SEP.b #$20
	LDA.w $067A
	SEC
	SBC.b #$01
	STA.w $067A
	LDA.w $067B
	CMP.b #$40
	BEQ.b CODE_80F9C0
	CMP.b #$A0
	BNE.b CODE_80F9C0
CODE_80F9C0:
	SEP.b #$20
	LDA.b #!ScreenDisplayRegister_MaxBrightness0F
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.w $0677
	CMP.b #$04
	BCC.b CODE_80F988
	STZ.w $0676
	STZ.w $0677
	BRA.b CODE_80F988

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

CODE_80F9D6:
	JSR.w CODE_80FACD
	RTS

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

CODE_80F9DA:
	PHP
	REP.b #$30
	LDA.w #DATA_80FB6F
	STA.w HDMA[$06].SourceLo
	SEP.b #$20
	LDA.b #!REGISTER_BG1HorizScrollOffset
	STA.w HDMA[$06].Destination
	LDA.b #$42
	STA.w HDMA[$06].Parameters
	LDA.b #DATA_80FB6F>>16
	STA.w HDMA[$06].SourceBank
	LDA.b #$7E
	STA.w HDMA[$06].IndirectSourceBank
	LDA.b #$40
	STA.w !REGISTER_HDMAEnable
	PLP
	RTS

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

CODE_80FA00:
	PHP
	SEP.b #$20
	STZ.w !REGISTER_HDMAEnable
	REP.b #$20
	PLP
	RTS

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

CODE_80FA0A:
	PHP
	SEP.b #$20
	STZ.b $09
	LDA.b #!ScreenDisplayRegister_MaxBrightness0F
	STA.b $3E
CODE_80FA13:
	JSL.l CODE_809FE0
	JSR.w CODE_80D934
	LDA.b $09
	AND.b #$01
	BNE.b CODE_80FA28
	LDA.b $3E
	DEC
	STA.b $3E
	STA.w !REGISTER_ScreenDisplayRegister
CODE_80FA28:
	JSR.w CODE_80FA61
	LDA.b $3E
	BNE.b CODE_80FA13
	LDA.b #!ScreenDisplayRegister_MinBrightness00|!ScreenDisplayRegister_SetForceBlank
	STA.w !REGISTER_ScreenDisplayRegister
	REP.b #$20
	PLP
	RTS

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

CODE_80FA38:
	PHP
	SEP.b #$20
	STZ.b $09
	STZ.b $3E
CODE_80FA3F:
	JSL.l CODE_809FE0
	JSR.w CODE_80D934
	LDA.b $09
	AND.b #$01
	BNE.b CODE_80FA54
	LDA.b $3E
	INC
	STA.b $3E
	STA.w !REGISTER_ScreenDisplayRegister
CODE_80FA54:
	JSR.w CODE_80FA61
	LDA.b $3E
	CMP.b #$0F
	BNE.b CODE_80FA3F
	REP.b #$20
	PLP
	RTS

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

CODE_80FA61:
	PHP
	REP.b #$30
	LDA.w $0682
	CLC
	ADC.w $0684
	STA.w $0682
	AND.w #$01FE
	TAY
	LDX.w #$0000
CODE_80FA75:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	PHX
	TYX
	LDA.l DATA_81D2E6,x
	PLX
	CMP.w #$0000
else
	LDA.w DATA_81D2E6,y
endif
	BPL.b CODE_80FA95
	EOR.w #$FFFF
	INC
	XBA
	AND.w #$00FF
	LSR
	LSR
	SEC
	SBC.w #$0020
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00007E
	STA.b $38
	LDA.w #$2000
	SEC
	SBC.b $38
	BRA.b CODE_80FAA2

CODE_80FA95:
	XBA
	AND.w #$00FF
	LSR
	LSR
	CLC
	ADC.w #$0020
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00007E
CODE_80FAA2:
	STA.l $7E2800,x
	LDA.w $0686
	CLC
	ADC.w $0688
	PHA
	AND.w #$00FF
	STA.w $0688
	PLA
	XBA
	INC
	AND.w #$00FE
	STA.b $3A
	TYA
	CLC
	ADC.b $3A
	AND.w #$01FF
	TAY
	INX
	INX
	CPX.w #$0200
	BCC.b CODE_80FA75
	PLP
	RTS

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

CODE_80FACD:
	PHP
	JSL.l CODE_809FE0
	SEP.b #$20
	STZ.w !REGISTER_BG1And2WindowMaskSettings
	STZ.w !REGISTER_BG3And4WindowMaskSettings
	STZ.w !REGISTER_ObjectAndColorWindowSettings
	PLP
	RTS

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

CODE_80FADF:
	REP.b #$30
	STA.b $38
	JSL.l CODE_8281B5
	LDA.w $0676
	CMP.b $38
	BCS.b CODE_80FB05
	LDA.w $0676
	LSR
	LSR
	LSR
	CMP.w #$0008
	BCS.b CODE_80FAFD
	CLC
	ADC.w #$0008
CODE_80FAFD:
	CLC
	ADC.w $0676
	STA.w $0676
	RTS

CODE_80FB05:
	LDA #$FFFF
	RTS

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

CODE_80FB09:
	REP.b #$30
	STA.b $38
	JSL.l CODE_8281B5
	LDA.w $0676
	CMP.b $38
	BCS.b CODE_80FB2F
	LDA.w $0676
	LSR
	LSR
	LSR
	CMP.w #$0010
	BCS.b CODE_80FB27
	CLC
	ADC.w #$0010
CODE_80FB27:
	CLC
	ADC.w $0676
	STA.w $0676
	RTS

CODE_80FB2F:
	LDA.w #$FFFF
	RTS

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

CODE_80FB33:
	REP.b #$30
	STA.b $3A
	JSL.l CODE_8281B5
	LDA.w $0676
	LSR
	LSR
	LSR
	CMP.w #$0002
	BCC.b CODE_80FB56
	STA.b $38
	LDA.w $0676
	SEC
	SBC.b $38
	STA.w $0676
	CMP.b $3A
	BCC.b CODE_80FB56
	RTS

CODE_80FB56:
	LDA.b $3A
	STA.w $0676
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	LDA.w #$FFFF
	RTS

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

DATA_80FB6F:
	db $FF : dw $7E2800
	db $FF : dw $7E28FE
	db $00

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

CODE_80FB76:
	REP.b #$30
	STX.b !RAM_PLOK_UnknownRAM000050
	STY.b !RAM_PLOK_UnknownRAM000052
	TXA
	LSR
	LSR
	LSR
	LSR
	STA.b $38
	TYA
	LSR
	LSR
	LSR
	LSR
	SEP.b #$20
	STA.w !REGISTER_Multiplicand
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00008A
	LSR
	SEP.b #$20
	STA.w !REGISTER_Multiplier
	REP.b #$20
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	CLC
	ADC.b $38
	ASL
	TAX
	STA.b !RAM_PLOK_UnknownRAM00004E
	LDA.l $7E3000,x
	STA.b $38
	AND.w #$000F
	STA.b $3A
	LDA.b $38
	AND.w #$03F0
	LSR
	CLC
	ADC.b $3A
	TAX
	LDA.b $38
	AND.w #$4000
	ORA.l $7E2000,x
	STA.b !RAM_PLOK_UnknownRAM00004A
	BMI.b CODE_80FBD8
	AND.w #$0FFF
	CMP.w #$0003
	BCC.b CODE_80FBD8
	LDA.b $38
	BPL.b CODE_80FBD8
	STZ.b !RAM_PLOK_UnknownRAM00004A
CODE_80FBD8:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_80FBFD
	AND.w #$0FFF
	CMP.w #$0002
	BNE.b CODE_80FBFD
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_80FBFD
	CMP.w #$0006
	BEQ.b CODE_80FBFD
	LDA.w #$0028
	JSL.l CODE_80C61C
	LDA.w #$0001
	STA.b !RAM_PLOK_UnknownRAM00004A
CODE_80FBFD:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	RTS

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

CODE_80FC03:
	REP.b #$30
	STX.b !RAM_PLOK_UnknownRAM000050
	STY.b !RAM_PLOK_UnknownRAM000052
	TXA
	LSR
	LSR
	LSR
	LSR
	STA.b $38
	TYA
	LSR
	LSR
	LSR
	LSR
	SEP.b #$20
	STA.w !REGISTER_Multiplicand
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00008A
	LSR
	SEP.b #$20
	STA.w !REGISTER_Multiplier
	REP.b #$20
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	CLC
	ADC.b $38
	ASL
	TAX
	STA.b !RAM_PLOK_UnknownRAM00004E
	LDA.l $7E3000,x
	STA.b $38
	AND.w #$000F
	STA.b $3A
	LDA.b $38
	AND.w #$03F0
	LSR
	CLC
	ADC.b $3A
	TAX
	LDA.b $38
	AND.w #$4000
	ORA.l $7E2000,x
	STA.b !RAM_PLOK_UnknownRAM00004A
	BMI.b CODE_80FC65
	AND.w #$0FFF
	CMP.w #$0003
	BCC.b CODE_80FC65
	LDA.b $38
	BPL.b CODE_80FC65
	STZ.b !RAM_PLOK_UnknownRAM00004A
CODE_80FC65:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	RTL

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

CODE_80FC6B:
	REP.b #$30
	STA.w $0904
	STY.w $0900
	STZ.w $08FA
	STZ.w $08FC
	STZ.w $08FE
	STZ.w $0902
	RTS

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

CODE_80FC80:
	REP.b #$30
	LDA.w $0904
	BNE.b CODE_80FC8A
	JMP.w CODE_80FD1A

CODE_80FC8A:
	CMP.w #$0002
	BEQ.b CODE_80FCF1
	LDA.w $08FA
	CMP.w $0900
	BCS.b CODE_80FCA7
CODE_80FC97:
	LDA.w $08FC
	BNE.b CODE_80FCA4
	LDA.w !REGISTER_Joypad1Hi
	AND.w #!Joypad_Select>>8
	BEQ.b CODE_80FC97
CODE_80FCA4:
	JMP.w CODE_80FD1A

CODE_80FCA7:
	LDA.w !REGISTER_Joypad2Lo
	BIT.w #!Joypad_A
	BNE.b CODE_80FCF2
	LDA.w !REGISTER_Joypad1Lo
	AND.w #!Joypad_DPadR|!Joypad_DPadL|!Joypad_DPadD|!Joypad_DPadU|!Joypad_Start|!Joypad_Y|!Joypad_B|!Joypad_R|!Joypad_L|!Joypad_X|!Joypad_A|$000F
	CMP.w $0902
	BNE.b CODE_80FCC5
	INC.w $08FE
	LDA.w $08FE
	CMP.w #$00FF
	BNE.b CODE_80FCF1
CODE_80FCC5:
	LDA.w $08FA
	ASL
	CLC
	ADC.w $08FA
	TAX
	INC.w $08FA
	LDA.w $08FA
	STA.w $0900
	LDA.w $0902
	STA.l $7F8000,x
	LDA.w $08FE
	STA.l $7F8002,x
	LDA.w !REGISTER_Joypad1Lo
	STA.w $0902
	LDA.w #$0001
	STA.w $08FE
CODE_80FCF1:
	RTS

CODE_80FCF2:
	LDA.w $08FA
	ASL
	CLC
	ADC.w $08FA
	TAX
	STA.w $0900
	LDA.w $0902
	STA.l $7F8000,x
	LDA.w $08FE
	STA.l $7F8002,x
	LDA.w #$FFFF
	STA.l $7F8003,x
	LDA.w #$0002
	STA.w $0904
	RTS

CODE_80FD1A:
	PHP
	REP.b #$30
	DEC.w $08FC
	BPL.b CODE_80FD47
	LDA.w $08FA
	ASL
	CLC
	ADC.w $08FA
	TAX
	LDA.l $7F8000,x
	CMP.w #$FFFF
	BEQ.b CODE_80FD4E
	STA.w $0902
	LDA.l $7F8002,x
	AND.w #$00FF
	STA.w $08FC
	INC.w $08FA
	DEC.w $08FC
CODE_80FD47:
	LDA.w $0902
	STA.b !RAM_PLOK_UnknownRAM0000AE
	PLP
	RTS

CODE_80FD4E:
	INC.w $0766
	PLP
	RTS

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

	%ROUTINE_PLOK_UploadSPCEngineAndSamples(NULLROM)					; $80FD53

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

CODE_80FD72:
	PHP
	INC
	XBA
	AND.w #$FF00
	ORA.w #$0001
	JSL.l CODE_82E177
	PLP
	RTL

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

CODE_80FD81:
	PHP
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	PLP
	RTL

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_80FE12_PLOK_J.asm)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_80FE1C_PLOK_G.asm)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_80FF15_PLOK_F.asm)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_80FDD7_PLOK_E.asm)
else
	%InsertGarbageData(NULLROM, incsrc, ADDR_80FD90_PLOK_U.asm)
endif

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

%BANK_END(<EndBank>)
endmacro

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

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
	%DATATABLE_PLOK_PrimaryLanguageBigLetterTileDataTable(NULLROM)
endif
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	%DATATABLE_RT00_PLOK_GermanTextStrings(NULLROM)
	%DATATABLE_PLOK_LegacyIslandTitleCardData(NULLROM)
endif
	%DATATABLE_PLOK_CostumeMusicTable(NULLROM)					; $818000

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

DATA_818010:
	dw !Define_PLOK_LevelID_CottonIslandBeach,!Define_PLOK_LevelID_AkrillicGarlenBeach
	dw !Define_PLOK_LevelID_AkrillicPlokTown,!Define_PLOK_LevelID_FleapitCyclingClever

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

DATA_818018:
	dw $0001,$FFF0,$0038,$0180,$0000,$FFF8,$0028,$00AA
	dw $0000,$FFF8,$0018,$00AA,$0000,$FFF8,$0008,$00AA
	dw $0000,$FFF8,$FFF8,$00AA,$8000

DATA_818042:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	dw $0148,$0168,$AEBA,$BAB0,$B0AE,$B9AE,$BABD,$B0AE
	dw $BBB9,$BAB1,$B8C6,$C0BA,$B9B3,$B1BB,$BBB9,$BAB1
	dw $B0AE,$BAB1,$B1B0,$BAAE,$BCB7,$B0BB,$B5C4,$BCB7
	dw $BFBB,$B1C2,$7403,$7503,$6803,$7403,$2604,$9103
	dw $1804,$8603,$5403,$2703,$5103,$7003,$8703,$4003
	dw $9604,$2003
else
	dw $0148,$0168,$0B17,$170D,$0D0B,$160B,$171A,$0D0B
	dw $1816,$170E,$1523,$1D17,$1610,$0E18,$1816,$170E
	dw $0D0B,$170E,$0E0D,$170B,$1914,$0D18,$1221,$1914
	dw $1C18,$0E1F,$7403,$7503,$6803,$7403,$2604,$9103
	dw $1804,$8603,$5403,$2703,$5103,$7003,$8703,$4003
	dw $9604,$2003
endif

DATA_818096:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	dw $BBB9,$AEB1,$BDB9,$BCB7,$BABB,$C1CE
else
	dw $1816,$0B0E,$1A16,$1914,$1718,$1E2A
endif

DATA_8180A2:
	dw $0600,$120C

DATA_8180A6:
	dw $0000,$0100,$0000,$0000,$0200,$0000,$0000,$0300
	dw $0000,$0000,$0400,$0000,$0000,$0500,$0000,$0000
	dw $0600,$0000,$0000,$0700,$0000,$0000,$0800,$0000
	dw $0000,$0900,$0000,$0000,$0001,$0000

DATA_8180E2:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	dw $AEBA,$BDB0,$B6AE,$CEBA,$BAC1,$B3C0,$B9B1,$B9AF
	dw $AF00,$00B7,$B9AF,$B1BB,$00C1,$BABD,$B8C6
else
	dw $0B17,$1A0D,$130B,$2A17,$171E,$101D,$160E,$160C
	dw $0C00,$0014,$160C,$0E18,$001E,$171A,$1523
endif

DATA_818100:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	dw $0100,$0302,$0504,$0706,$0908,$B6B5,$C0CC,$BCB0
	dw $B2BF,$FFC0
else
	dw $0100,$0302,$0504,$0706,$0908,$1312,$1D28,$190D
	dw $0F1C,$FF1D
endif

DATA_818114:
	dw $5E10,$5DB0,$5D50,$5CF0,$5C90,$5E01,$5DA1,$5D41
	dw $5CE1,$5C81

DATA_818128:
	dw $5E19,$5DB9,$5D59,$5CF9,$5C99,$5E0A,$5DAA,$5D4A
	dw $5CEA,$5C8A

DATA_81813C:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0000,$0000,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0000,$0000,$0000,$0001,$0000
	dw $0000,$0000,$0001,$0001,$0000,$0000,$0000,$0000
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0000

DATA_81818C:
	dw $0938,$00A0,$06D8,$00A0,$07C8,$00A0,$07E8,$0100
	dw $07E8,$00A0,$0928,$0070,$1058,$03C0,$0408,$0120
	dw $0D08,$0130,$05F8,$0150,$0150,$00E0,$0960,$00A0
	dw $07E0,$0060,$07E0,$01E0,$0BE0,$00C0,$0C60,$0040
	dw $0B50,$0090,$0E60,$0360,$03F0,$00F0,$0858,$0060
	dw $0448,$0070,$00F8,$0260,$0A68,$0070,$0AB8,$0430
	dw $04B8,$0100,$05D8,$0080,$15F8,$0120,$1EC8,$0060
	dw $04D8,$00D0,$0408,$0120,$0408,$0120,$0408,$0120
	dw $2098,$00D0,$2008,$0090,$2028,$0210,$20C8,$00C0
	dw $2088,$0090,$2068,$00A0,$2078,$0390,$2008,$0120
	dw $14D0,$0130,$0698,$0100,$0708,$0060,$0408,$0120
	dw $0408,$0120,$0408,$0120,$0408,$0120,$0408,$0120
	dw $0408,$0120,$0408,$0120,$0408,$0120,$0408,$0120
	dw $0408,$0120,$0408,$0120,$0408,$0120

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

DATA_818268:
	dw $0400,$0400,$0400,$0400,$0400,$0400,$0400,$0400
	dw $0400,$0400,$0400,$0400,$0400,$0400,$0400,$0400
	dw $0400,$0400,$0400,$0400,$0400,$0400,$0400,$0400
	dw $0400,$0400,$0400,$0400,$0400,$0400,$0400,$0400
	dw $0400,$0400,$0400,$0400,$0400,$0400,$0400,$0400
	dw $0400,$0400,$0400,$0400,$0400,$0400,$0400,$0400
	dw $0400,$0400,$0400,$0400,$0400,$0400,$0400,$0400
	dw $0400,$0400,$0400

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

DATA_8182DE:
	dw $0050,$0078,$0028,$0078,$0050,$00C8,$0028,$0078

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

DATA_8182EE:
	dw $0700,$F900

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

DATA_8182F2:
	dw $0000,$0002,$0002,$0000,$0004,$0006,$0006,$0000
	dw $0008,$000A,$000A,$0004,$0006,$0006,$0006,$0000

DATA_818312:
	dw $000C,$000C,$000C,$0004,$0004,$0004,$0004,$0000
	dw $000E,$000E,$000E,$0000,$000E,$000E,$000E,$0000

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

DATA_818332:
	dw $0027,$000F,$0000,$000F,$0000,$000F,$0000,$0003

DATA_818342:
	dw $004C,$0000,$004A,$0048,$004A,$0000

DATA_81834E:
	dw $0058,$0056,$0000,$0054,$0000,$0056,$0056,$0056
	dw $0000,$0000,$0000,$0056,$0000,$0000,$0000,$0000
	dw $0000,$0000

DATA_818372:
	dw $0000,$0000,$0000,$0054,$0000,$0000,$0054,$0000
	dw $0058

DATA_818384:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0048,$0000
	dw $004C

DATA_818396:
	dw DATA_8183A6
	dw DATA_818496
	dw DATA_8184B6
	dw DATA_8184BC
	dw DATA_8184DC
	dw DATA_8184DE
	dw DATA_8184FE
	dw DATA_818504

DATA_8183A6:
	dw $0502,$0502,$0502,$0502,$0502,$0502,$0502,$0502
	dw $0504,$0504,$0506,$0506,$0506,$0506,$0506,$0506
	dw $0506,$0506,$0506,$0506,$0506,$0506,$0504,$0504
	dw $0502,$0502,$0502,$0502,$0502,$0502,$0502,$0502
	dw $0502,$0502,$0502,$0502,$0502,$0502,$0502,$0502
	dw $04FC,$04FC,$04FC,$04FC,$04FC,$04FC,$04FC,$04FC
	dw $04FE,$04FE,$0500,$0500,$0500,$0500,$0500,$0500
	dw $0500,$0500,$0500,$0500,$0500,$0500,$04FE,$04FE
	dw $04FC,$04FC,$04FC,$04FC,$04FC,$04FC,$04FC,$04FC
	dw $04FC,$04FC,$04FC,$04FC,$04FC,$04FC,$04FC,$04FC
	dw $04F6,$04F6,$04F6,$04F6,$04F6,$04F6,$04F6,$04F6
	dw $04F8,$04F8,$04FA,$04FA,$04FA,$04FA,$04FA,$04FA
	dw $04FA,$04FA,$04FA,$04FA,$04FA,$04FA,$04F8,$04F8
	dw $04F6,$04F6,$04F6,$04F6,$04F6,$04F6,$04F6,$04F6
	dw $04F6,$04F6,$04F6,$04F6,$04F6,$04F6,$04F6,$04F6

DATA_818496:
	dw $0020,$001E,$001C,$001A,$0018,$0016,$0014,$0012
	dw $0010,$000E,$000C,$000A,$0008,$0006,$0004,$0002

DATA_8184B6:
	dw $0022,$0022,$0022

DATA_8184BC:
	dw $0042,$0040,$003E,$003C,$003A,$0038,$0036,$0034
	dw $0032,$0030,$002E,$002C,$002A,$0028,$0026,$0024

DATA_8184DC:
	dw $0044

DATA_8184DE:
	dw $0064,$0062,$0060,$005E,$005C,$005A,$0058,$0056
	dw $0054,$0052,$0050,$004E,$004C,$004A,$0048,$0046

DATA_8184FE:
	dw $0066,$0508,$050A

DATA_818504:
	dw $03E4,$03E6,$03E8,$03EA

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

DATA_81850C:
	dw $007A,$007A,$006A,$006A

DATA_818514:
	dw $0002,$0002,$0000,$0000

DATA_81851C:
	dw $0010,$0002,$0020,$0001

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

DATA_818524:
	dw $0010,$0010,$0010,$0010,$0010,$0010,$0014,$0010
	dw $0010,$0020,$0010,$001C,$0010,$0010,$0010,$0020
	dw $0010,$0014,$0010,$0010,$0010,$0014,$0010,$0010
	dw $0010,$0010,$0010,$0010,$0010,$0018,$0010,$0010
	dw $0018,$0010,$0040,$0032,$000C,$000C,$0008,$0008
	dw $0008,$0008,$0008,$0008,$0010,$0010,$001C,$0018
	dw $0010,$0020,$0008,$0008,$0010,$0020,$0018,$0018
	dw $0014,$0014,$0000,$0000,$0010,$0014,$0010,$0014
	dw $0010,$0010,$0010,$0010,$0010,$0010,$0010,$0010
	dw $0010,$0010,$0010,$0010,$0010,$0010,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

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

DATA_8185D4:
	dw $0001,$0000,$0001,$0001,$0001,$0001,$0000,$0001
	dw $0001,$0001,$0000,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0001,$0001,$0001,$0001,$0001,$0000,$0001,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0001,$0001,$0000
	dw $0000,$0000,$0000,$0000

DATA_81862C:
	dw $0001,$0000,$0001,$0001,$0001,$0001,$0000,$0001
	dw $0001,$0001,$0000,$0000,$0001,$0000,$0001,$0001
	dw $0001,$0001,$0001,$0000,$0000,$0000,$0000,$0000
	dw $0001,$0001,$0001,$0001,$0001,$0000,$0001,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0001,$0001,$0000
	dw $0000,$0000,$0000,$0000

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

DATA_818684:
	dw $0002,$0002,$0000,$0002,$0002,$0004,$0003,$0000
	dw $0001,$0002,$0001,$0002,$0002,$0001,$0001,$0001
	dw $0000,$0000,$0001,$0001,$0001,$0001,$0001,$0002
	dw $0001,$0004,$0002,$0002,$0001,$0001,$0004,$0002
	dw $0001,$0002,$0001,$0001,$0000,$0000,$0000,$0001
	dw $0001,$0001,$0001,$0001

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

	%DATATABLE_PLOK_EasyModeLevelOrder(NULLROM)				; $8186DC

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

DATA_81871A:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0002,$0000,$0003,$0000,$0000,$0000
	dw $0005,$0000,$0000,$0000,$0007,$0000,$0000,$0000
	dw $0001,$0002,$0003,$0004,$0005,$0006,$0007,$0009
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

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

DATA_81878A:
	dw $0014,$000D,$0011,$000C,$0010,$0009,$000C,$000A
	dw $0009,$000B,$000D,$000C,$000F,$000E,$000B,$0010
	dw $001F,$0014,$0021,$0011,$0025,$0011,$002A,$0010
	dw $0027,$000F,$0027,$000C,$002A,$000B,$002D,$000C
	dw $0030,$000C,$0032,$0010,$002E,$000F,$0028,$0012
	dw $002D,$0011,$002B,$0014,$0024,$0016,$0029,$0016
	dw $002E,$0014,$0030,$0016,$0033,$0015,$0037,$0015
	dw $0034,$0017,$0031,$001B,$002C,$001D,$0025,$001D
	dw $0026,$0031,$002B,$0030,$002F,$0031,$0032,$0033
	dw $0033,$0035,$002E,$0035,$002A,$0036,$0024,$0037
	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,$019F,$0085
	dw $019F,$0085,$019F,$0085,$00BF,$0085,$00BF,$0065
	dw $024C,$0085,$02EC,$0075,$02CC,$0105,$032C,$0165
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019C,$0065,$024C,$0085
	dw $02EC,$0075,$02CC,$0105,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019C,$0065
	dw $024C,$0085,$02EC,$0075,$02CC,$0105,$032C,$0165
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085,$019F,$0085,$019F,$0085,$019F,$0085
	dw $019F,$0085

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

DATA_81894E:
	dw $02BC,$02BE,$02BE,$02C0,$02C2,$02C4,$02C4,$02C6

DATA_81895E:
	dw $02B0,$02B2,$02B2,$02B4,$02B6,$02B8,$02B8,$02BA

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

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

DATA_81897E:
	dw $0252,$0254,$0252,$0256,$025A,$025C,$025A,$025E
	dw $0262,$0264,$0262,$0266,$026A,$026C,$026A,$026E

DATA_81899E:
	dw $0272,$0274,$0272,$0276

DATA_8189A6:
	dw $0258,$0260,$0268,$0270,$0278

DATA_8189B0:
	dw $89B4,$89BC,$027A,$027C,$027A,$027C,$027E,$0280
	dw $027E,$0280

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

DATA_8189C4:
	dw $0008,$0013,$001D,$0008

DATA_8189CC:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0008,$0008,$0008,$000B,$000B,$000B,$000B,$000B
	dw $000B,$000B,$000B,$0008,$0008,$0008,$0008,$0008
	dw $0008,$0008,$0008,$0008,$0008,$0008,$0008,$0008
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0008,$0008,$0008,$0008,$0008,$0008,$0008,$0008
	dw $0008,$0008,$0008,$0008,$0008,$0008,$0008,$0000
	dw $000B,$0013,$003A

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

DATA_818A42:
	dw $0005,$0005,$0006,$0006,$0007,$0007,$0008,$0008
	dw $0005,$0005,$0006,$0006,$0007,$0007,$0007,$0008
	dw $0004,$0004,$0005,$0005,$0006,$0006,$0007,$0008
	dw $0003,$0003,$0004,$0005,$0005,$0006,$0007,$0008
	dw $0001,$0002,$0003,$0004,$0005,$0006,$0007,$0008
	dw $0002,$0001,$0003,$0004,$0005,$0006,$0007,$0008
	dw $0004,$0003,$0002,$0004,$0005,$0006,$0007,$0008
	dw $0005,$0004,$0003,$0002,$0005,$0006,$0007,$0008
	dw $0005,$0005,$0005,$0004,$0003,$0006,$0007,$0008
	dw $0005,$0005,$0006,$0006,$0005,$0004,$0007,$0008
	dw $0005,$0005,$0006,$0006,$0006,$0005,$0005,$0008
	dw $0005,$0005,$0006,$0006,$0007,$0007,$0006,$0006
	dw $0005,$0005,$0006,$0006,$0007,$0007,$0007,$0007

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

DATA_818B12:
	dw $0140,$00B3,$0282,$0111,$00A0,$0286,$00FF,$0075
	dw $028A,$00BF,$0085,$028E,$0091,$0093,$0292,$00D0
	dw $00A3,$0296,$00F0,$00C3,$029A,$00B0,$00E3,$029E
	dw $01F0,$0133,$0406,$0210,$00F3,$0406,$024F,$00F4
	dw $029E,$0298,$00DC,$0474,$0264,$00CC,$0478,$0264
	dw $0098,$047C,$0298,$0088,$0480,$02D8,$00A4,$0484
	dw $02F8,$009C,$0488,$0310,$00F8,$048C,$02D0,$00E0
	dw $0490,$0280,$0103,$0406,$02D0,$00F3,$0406,$02B0
	dw $0123,$0406,$0250,$0143,$0406,$0290,$0143,$0406
	dw $02E0,$0123,$0406,$0300,$0143,$0406,$0330,$0133
	dw $0406,$0370,$0133,$0406,$0340,$0163,$0406,$0310
	dw $0193,$0406,$02C0,$01B3,$0406,$0250,$01B3,$0406
	dw $00CF,$0125,$00E2,$0151,$0100,$00E2,$01CF,$00F5
	dw $00E2,$019F,$0085,$00E2,$0252,$00A0,$00E2,$02F0
	dw $0093,$00E2,$02CF,$0125,$00E2,$032F,$0185,$00E2
	dw $0080,$0080,$0000,$0080,$0080,$0000,$0080,$0080
	dw $0000,$0080,$0080,$0000,$0080,$0080,$0000,$0080
	dw $0080,$0000,$0080,$0080,$0000,$0080,$0080,$0000
	dw $0080,$0080,$0000,$0080,$0080,$0000,$0080,$0080
	dw $0000,$0080,$0080,$0000,$0080,$0080,$0000,$0080
	dw $0080,$0000,$032F,$0185,$0000,$032F,$0185,$029E
	dw $0080,$0080,$0000,$0080,$0080,$0000,$0080,$0080
	dw $0000

DATA_818C74:
	dw $0030,$0036,$0072,$0078,$007E,$0084,$008A,$0090
	dw $0096,$009C,$00A2,$00A8,$00AE,$00B4,$00BA

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

DATA_818C92:
	dw DATA_818D08
	dw DATA_818D5A
	dw DATA_818D78
	dw DATA_818D96
	dw DATA_818DAC
	dw DATA_818DC6
	dw DATA_818DE0
	dw DATA_818DFA
	dw DATA_818E28
	dw DATA_818E42
	dw DATA_818E70
	dw DATA_818E8E
	dw DATA_818EC4
	dw DATA_818EDA
	dw DATA_818EF0
	dw DATA_818F06
	dw DATA_818F1C
	dw DATA_818F32
	dw DATA_818F4C
	dw DATA_818F5E
	dw DATA_818F74
	dw DATA_818F92
	dw DATA_818FB8
	dw DATA_818FEA
	dw DATA_819028
	dw DATA_81904A
	dw DATA_81906C
	dw DATA_81909A
	dw DATA_8190B0
	dw DATA_8190CA
	dw DATA_8190EC
	dw DATA_81911E
	dw DATA_8191D2
	dw DATA_8191E0
	dw DATA_8191FA
	dw DATA_819218
	dw DATA_81923A
	dw DATA_819264
	dw DATA_81927E
	dw DATA_819298
	dw DATA_819298
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_818D08
	dw DATA_819144
	dw DATA_819166
	dw DATA_8191A4
	dw DATA_8191BE

DATA_818D08:
	dw $000A,$0104,$0064,$0026,$0028,$002D,$0001,$0016
	dw $0038,$0026,$0060,$0020,$0046,$0027,$0020,$002F
	dw $0002,$000F,$0003,$0057,$0014,$0007,$0096,$0027
	dw $001E,$0000,$002E,$006E,$0001,$0016,$0010,$0026
	dw $001E,$002E,$0001,$0016,$001E,$0020,$003C,$0004
	dw $FFFF

DATA_818D5A:
	dw $000A,$0104,$001F,$0004,$0046,$0020,$0050,$0027
	dw $0014,$0026,$003C,$0024,$003C,$0004,$FFFF

DATA_818D78:
	dw $000A,$0104,$001F,$0004,$0050,$0020,$0032,$0026
	dw $0032,$0027,$0050,$0020,$0050,$0004,$FFFF

DATA_818D96:
	dw $000A,$0104,$001F,$0004,$0028,$0024,$005A,$0026
	dw $0050,$0004,$FFFF

DATA_818DAC:
	dw $000A,$0104,$001F,$0004,$003C,$0026,$0050,$0024
	dw $003C,$0026,$0064,$0004,$FFFF

DATA_818DC6:
	dw $000A,$0104,$001F,$0004,$003C,$0024,$003C,$0022
	dw $0032,$0023,$0078,$0004,$FFFF

DATA_818DE0:
	dw $000A,$0104,$001F,$0004,$0050,$0022,$0028,$0023
	dw $003C,$0024,$0078,$0004,$FFFF

DATA_818DFA:
	dw $000A,$0104,$001F,$0004,$0014,$0024,$0028,$0025
	dw $002A,$002D,$0001,$0014,$0014,$0026,$001C,$002E
	dw $0001,$0014,$000A,$0026,$030C,$0004,$FFFF

DATA_818E28:
	dw $000A,$0204,$001F,$0004,$0028,$0022,$0014,$0023
	dw $0064,$0024,$00A0,$0004,$FFFF

DATA_818E42:
	dw $000A,$0204,$0046,$0021,$0024,$0022,$0022,$002A
	dw $0001,$0012,$0050,$0020,$0028,$0027,$003C,$0020
	dw $0019,$0027,$001E,$0020,$003C,$0004,$FFFF

DATA_818E70:
	dw $000A,$0204,$001F,$0004,$0024,$0022,$0050,$0024
	dw $0028,$0023,$0028,$0022,$003C,$0004,$FFFF

DATA_818E8E:
	dw $000A,$0204,$001F,$0004,$0046,$0022,$0050,$0020
	dw $0078,$0027,$0020,$002F,$0008,$0051,$0168,$0021
	dw $002E,$006F,$0001,$0017,$0028,$0027,$000A,$0026
	dw $003C,$0004,$FFFF

DATA_818EC4:
	dw $000A,$0104,$001F,$0004,$0028,$0026,$0050,$0027
	dw $003C,$0004,$FFFF

DATA_818EDA:
	dw $000A,$0104,$001F,$0004,$00B4,$0020,$0014,$0027
	dw $003C,$0004,$FFFF

DATA_818EF0:
	dw $000A,$0104,$001F,$0004,$003C,$0021,$001E,$0022
	dw $003C,$0004,$FFFF

DATA_818F06:
	dw $000A,$0104,$001F,$0004,$003C,$0021,$0032,$0022
	dw $003C,$0004,$FFFF

DATA_818F1C:
	dw $000A,$0104,$001F,$0004,$006E,$0022,$001E,$0023
	dw $003C,$0004,$FFFF

DATA_818F32:
	dw $000A,$0104,$001F,$0004,$0082,$0024,$001E,$0023
	dw $0050,$0024,$003C,$0004,$FFFF

DATA_818F4C:
	dw $000A,$0104,$001F,$0004,$006E,$0026,$035C,$0004
	dw $FFFF

DATA_818F5E:
	dw $000A,$0204,$001F,$0004,$005F,$0022,$0050,$0020
	dw $012C,$0004,$FFFF

DATA_818F74:
	dw $000A,$0204,$001F,$0004,$0050,$0020,$005A,$0021
	dw $0054,$0022,$0050,$0024,$003C,$0004,$FFFF

DATA_818F92:
	dw $000A,$0204,$001F,$0004,$0028,$0024,$0022,$002C
	dw $0001,$0014,$0028,$0025,$0050,$0024,$001E,$0025
	dw $003C,$0004,$FFFF

DATA_818FB8:
	dw $000A,$0204,$001F,$0004,$0014,$0024,$0082,$0026
	dw $0026,$002E,$0001,$0016,$000A,$0026,$0011,$002E
	dw $0014,$000E,$0001,$0016,$0014,$0025,$003C,$0004
	dw $FFFF

DATA_818FEA:
	dw $000A,$0204,$001F,$0004,$001E,$0021,$0014,$0029
	dw $000A,$0009,$0001,$0011,$0014,$0022,$0020,$002A
	dw $0001,$0012,$001E,$0023,$002D,$0024,$0014,$0023
	dw $004B,$0022,$001E,$0024,$003C,$0004,$FFFF

DATA_819028:
	dw $000A,$0204,$001F,$0004,$0032,$0021,$0028,$0022
	dw $0032,$0020,$0032,$0021,$0014,$0020,$003C,$0004
	dw $FFFF

DATA_81904A:
	dw $000A,$0204,$001F,$0004,$0028,$0022,$0028,$0023
	dw $003C,$0024,$0028,$0023,$000A,$0024,$003C,$0004
	dw $FFFF

DATA_81906C:
	dw $000A,$0204,$001F,$0004,$0032,$0020,$001E,$0021
	dw $0014,$0029,$000B,$0009,$0001,$0011,$000A,$0022
	dw $000C,$0021,$0032,$0022,$003C,$0004,$FFFF

DATA_81909A:
	dw $000A,$0204,$0050,$0022,$003C,$0023,$0014,$0024
	dw $003C,$0004,$FFFF

DATA_8190B0:
	dw $000A,$0204,$0032,$0024,$0050,$0025,$0028,$0024
	dw $0014,$0025,$00B4,$0004,$FFFF

DATA_8190CA:
	dw $000A,$0204,$001E,$0025,$0032,$0026,$0014,$0025
	dw $0046,$0024,$0030,$0025,$000A,$0024,$003C,$0004
	dw $FFFF

DATA_8190EC:
	dw $000A,$0204,$003C,$0024,$0014,$0026,$0023,$002E
	dw $0001,$0016,$0032,$0025,$0030,$0026,$0012,$0025
	dw $0021,$002D,$0001,$0015,$0028,$0024,$003C,$0004
	dw $FFFF

DATA_81911E:
	dw $000A,$0204,$0050,$0027,$0014,$0026,$0025,$002E
	dw $0001,$0016,$0028,$0026,$0014,$0025,$001E,$0024
	dw $003C,$0004,$FFFF

DATA_819144:
	dw $000A,$0204,$0012,$0023,$0028,$002B,$0002,$000B
	dw $0008,$0051,$00B4,$0023,$0096,$0021,$000F,$0001
	dw $FFFF

DATA_819166:
	dw $000A,$0204,$003C,$0025,$0064,$0024,$000F,$0023
	dw $001F,$002B,$0004,$000B,$0008,$0051,$001E,$0021
	dw $003C,$0023,$012C,$0025,$0014,$0027,$0032,$006D
	dw $0001,$0013,$0050,$0024,$003C,$0204,$FFFF

DATA_8191A4:
	dw $000A,$0004,$008C,$0026,$000F,$0025,$003C,$0204
	dw $0033,$002D,$0001,$0013,$FFFF

DATA_8191BE:
	dw $000A,$0004,$003C,$0204,$FFFF

UNK_0191C8:
	dw $000A,$0004,$003C,$0004,$FFFF

DATA_8191D2:
	dw $000A,$0004,$0046,$0022,$003C,$0004,$FFFF

DATA_8191E0:
	dw $000A,$0004,$0046,$0022,$0021,$002A,$0001,$0013
	dw $0046,$0022,$003C,$0004,$FFFF

DATA_8191FA:
	dw $000A,$0004,$003C,$0022,$0007,$0023,$0026,$002B
	dw $0001,$0013,$002C,$0022,$003C,$0004,$FFFF

DATA_819218:
	dw $000A,$0004,$004A,$0022,$000A,$0023,$000E,$0024
	dw $0028,$002C,$0001,$0014,$0030,$0022,$003C,$0004
	dw $FFFF

DATA_81923A:
	dw $000A,$0004,$004A,$0022,$000A,$0023,$000E,$0024
	dw $000E,$0025,$0021,$000D,$0007,$002D,$0001,$0015
	dw $0050,$0026,$003C,$0004,$FFFF

DATA_819264:
	dw $000A,$0004,$0050,$0026,$0025,$002E,$0001,$0016
	dw $0037,$0026,$003C,$0004,$FFFF

DATA_81927E:
	dw $000A,$0004,$003C,$0026,$0029,$002D,$0001,$0015
	dw $0037,$0026,$003C,$0004,$FFFF

DATA_819298:
	dw $000A,$0004,$005A,$0026,$0028,$002E,$0001,$0016
	dw $0028,$0026,$003C,$0004,$FFFF

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

DATA_8192B2:
	dw $03EC,$03EE,$03F0,$03EE,$03EE,$03EE,$03F0,$03F0
	dw $03EE,$03EC,$03EC,$03EC,$03EC,$03EE,$03EE,$03EE

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

DATA_8192D2:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

DATA_8192F2:
	dw $0000,$0002,$0004,$0006,$000C,$0008,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

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

DATA_819312:
	dw $000A,$0003,$0000,$0028,$0026,$0000,$0004,$0020
	dw $0000,$0002,$0000,$0000,$0004,$0020,$0000,$0002
	dw $0000,$0000,$0004,$0020,$0000,$0002,$0000,$0000
	dw $0004,$0020,$0000,$0002,$0000,$0000,$0004,$0020
	dw $0000,$0002,$0000,$0000,$0004,$0020,$0000,$0002
	dw $0000,$0000,$0004,$0020,$0000,$0028,$0000,$0000
	dw $0078,$0000,$0000,$0004,$0024,$0000,$0002,$0000
	dw $0000,$0004,$0024,$0000,$0002,$0000,$0000,$0004
	dw $0024,$0000,$0002,$0000,$0000,$0004,$0024,$0000
	dw $0002,$0000,$0000,$0004,$0024,$0000,$0002,$0000
	dw $0000,$0004,$0024,$0000,$0002,$0000,$0000,$0028
	dw $3022,$0000,$0096,$3002,$0000,$003C,$0022,$0000
	dw $0018,$006A,$0066,$0001,$0012,$0000,$00C8,$1042
	dw $03F2,$000A,$0022,$0000,$0002,$0026,$0000,$0168
	dw $4046,$0436,$0001,$4046,$0436,$0001,$0062,$00E2
	dw $FFFF,$0000,$0000,$0078,$0046,$00E2,$0029,$4046
	dw $0436,$003C,$4046,$0438,$0001,$0022,$0000,$0064
	dw $0002,$0000,$0190,$1042,$0000,$FFFF

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

DATA_81942E:
	dw $FFFC,$FFFE,$FFFF,$0000,$0001,$0002,$0004,$FFFE
	dw $FFFF,$0000,$0001,$0002,$0004,$0004,$FFFF,$FFFE
	dw $0001,$0001

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

DATA_819452:
	dl DATA_85CB7F
	dl DATA_85CEF8
	dl DATA_85CC97
	dl DATA_85CE3A
	dl DATA_85D0A7
	dl DATA_85CD8B
	dl DATA_85CB20
	dl DATA_85D2A6
	dl DATA_85CE69
	dl DATA_85D494
	dl DATA_85D395
	dl DATA_85D643

DATA_819476:
	dw !Define_PLOK_LevelID_CottonIslandBeach,!Define_PLOK_LevelID_AkrillicGarlenBeach
	dw !Define_PLOK_LevelID_CottonIslandBridge,!Define_PLOK_LevelID_CottonIslandRicketyBridge
	dw !Define_PLOK_LevelID_AkrillicSleepyDale,!Define_PLOK_LevelID_CottonIslandLogFalls
	dw !Define_PLOK_LevelID_CottonIslandColumns,!Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_CottonIslandBobbinsBros,!Define_PLOK_LevelID_AkrillicVengeThicket
	dw !Define_PLOK_LevelID_AkrillicThePenkinos,!Define_PLOK_LevelID_AkrillicCreepyCrag

DATA_81948E:
	dw $0006,$0012,$0008,$000E,$0014,$000C,$000A,$0016
	dw $0010,$0014,$0018,$0014

DATA_8194A6:
	dw DATA_8194BE
	dw DATA_8195B0
	dw DATA_819510
	dw DATA_819584
	dw DATA_81950E
	dw DATA_81955A
	dw DATA_81953A
	dw DATA_819602
	dw DATA_81959A
	dw DATA_81950E
	dw DATA_819622
	dw DATA_81950E

DATA_8194BE:
	dw $0050,$0080,$0070,$0080,$00F2,$00BE,$009C,$0060
	dw $0080,$00F4,$015A,$00B0,$0050,$0100,$00F2,$00A0
	dw $0098,$0044,$0080,$0078,$008C,$0098,$0050,$0080
	dw $00F2,$0078,$00C0,$0030,$0100,$0078,$0258,$00A8
	dw $0050,$0100,$00F2,$0280,$00C8,$0088,$0080,$00F2

DATA_81950E:
	dw $FFFF

DATA_819510:
	dw $00F0,$0080,$0080,$0100,$00F2,$0190,$0030,$0080
	dw $0080,$0078,$0032,$0048,$0078,$0080,$0078,$0212
	dw $00B0,$0078,$0100,$00F2,$FFFF

DATA_81953A:
	dw $001E,$00D0,$0080,$0080,$00F2,$0118,$00CC,$003C
	dw $0080,$0078,$0064,$00A8,$0078,$0100,$00F2,$FFFF

DATA_81955A:
	dw $041A,$0048,$0050,$0040,$00F2,$0064,$004C,$0048
	dw $0040,$0154,$0032,$004C,$004C,$0040,$013B,$0028
	dw $004C,$004C,$0100,$00F0,$FFFF

DATA_819584:
	dw $017C,$0038,$0058,$0080,$00F2,$00DA,$0088,$0078
	dw $0100,$0078,$FFFF

DATA_81959A:
	dw $00E6,$0028,$0038,$0100,$0064,$000A,$0088,$0038
	dw $0100,$008E,$FFFF

DATA_8195B0:
	dw $003C,$0044,$005A,$0080,$00AA,$0032,$0078,$0010
	dw $0100,$00AA,$0014,$00AC,$005C,$0080,$00AA,$008C
	dw $0048,$005C,$0100,$00AA,$0140,$0098,$0020,$0080
	dw $00AA,$021C,$00CA,$0058,$0080,$00AA,$00AA,$0070
	dw $0058,$0080,$00F2,$003C,$0028,$0098,$0100,$00AA
	dw $FFFF

DATA_819602:
	dw $0302,$0090,$0060,$0100,$00F2,$0064,$0090,$007C
	dw $0080,$00F2,$0032,$00B8,$0048,$0100,$0078,$FFFF

DATA_819622:
	dw $00DC,$0068,$0034,$0080,$00F4,$00E6,$00E0,$0030
	dw $0100,$00F2,$0033,$00D0,$00C0,$0080,$00AC,$FFFF

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	incsrc "Text/TextScripts_Section1_PLOK_J.asm"
else
	incsrc "Text/TextScripts_Section1_PLOK_U.asm"
endif

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

DATA_81A620:						; Note: Something overworld related
	dw $0006,$FFFF,$0001
	dw $0006,$FFFF,$0001
	dw $0004,$FFFF,$0001
	dw $0004,$FFFF,$0001
	dw $0002,$FFFF,$0001
	dw $0002,$FFFF,$0001
	dw $0004,$FFFF,$0001
	dw $0004,$FFFF,$0001
	dw $0006,$0001,$0001
	dw $0006,$0001,$0001
	dw $0004,$0001,$0001
	dw $0004,$0001,$0001
	dw $0002,$0001,$0001
	dw $0002,$0001,$0001
	dw $0004,$0001,$0001
	dw $0004,$0001,$0001
	dw $0006,$FFFF,$FFFF
	dw $0006,$FFFF,$FFFF
	dw $0004,$FFFF,$FFFF
	dw $0004,$FFFF,$FFFF
	dw $0002,$FFFF,$FFFF
	dw $0002,$FFFF,$FFFF
	dw $0004,$FFFF,$FFFF
	dw $0004,$FFFF,$FFFF
	dw $0006,$0001,$FFFF
	dw $0006,$0001,$FFFF
	dw $0004,$0001,$FFFF
	dw $0004,$0001,$FFFF
	dw $0002,$0001,$FFFF
	dw $0002,$0001,$FFFF
	dw $0004,$0001,$FFFF
	dw $0004,$0001,$FFFF
	dw $FFFF

---------------------------------------------------------------

DATA_81A6E2:
	dw $00E2,$053E,$0540,$0542,$0544,$0544,$0544,$0544
	dw $0542,$0540,$053E

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	incsrc "Text/TextScripts_Section2_PLOK_J.asm"
else
	incsrc "Text/TextScripts_Section2_PLOK_U.asm"
endif

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

DATA_81A9A6:
	dw DATA_85D7AA+$0000
	dw DATA_85D7AA+$0020
	dw DATA_85D7AA+$0040
	dw DATA_85D7AA+$0060
	dw DATA_85D7AA+$0080
	dw DATA_85D7AA+$00A0
	dw DATA_85D7AA+$00C0
	dw DATA_85D7AA+$00E0
	dw DATA_85D7AA+$0200
	dw DATA_85D7AA+$0200
	dw DATA_85D7AA+$0220
	dw DATA_85D7AA+$0240
	dw DATA_85D7AA+$0260
	dw DATA_85D7AA+$0280
	dw DATA_85D7AA+$02A0
	dw DATA_85D7AA+$02C0
	dw DATA_85D7AA+$02E0
	dw DATA_85D7AA+$0400
	dw DATA_85D7AA+$0400
	dw DATA_85D7AA+$0420
	dw DATA_85D7AA+$0440
	dw DATA_85D7AA+$0460
	dw DATA_85D7AA+$0480
	dw DATA_85D7AA+$04A0
	dw DATA_85D7AA+$04C0
	dw DATA_85D7AA+$04E0

DATA_81A9DA:
	dw $0038,$003A,$003C,$003E,$0040,$000A,$000C,$000E,$0010

DATA_81A9EC:
	dw PLOK_UncompressedGFX_Bank87+$0000
	dw PLOK_UncompressedGFX_Bank87+$0080
	dw PLOK_UncompressedGFX_Bank87+$0100
	dw PLOK_UncompressedGFX_Bank87+$0180
	dw PLOK_UncompressedGFX_Bank87+$0800
	dw PLOK_UncompressedGFX_Bank87+$0880
	dw PLOK_UncompressedGFX_Bank87+$0900
	dw PLOK_UncompressedGFX_Bank87+$0980
	dw PLOK_UncompressedGFX_Bank87+$1000
	dw PLOK_UncompressedGFX_Bank87+$1080
	dw PLOK_UncompressedGFX_Bank87+$1100
	dw PLOK_UncompressedGFX_Bank87+$1180
	dw PLOK_UncompressedGFX_Bank87+$1800
	dw PLOK_UncompressedGFX_Bank87+$1880
	dw PLOK_UncompressedGFX_Bank87+$1900
	dw PLOK_UncompressedGFX_Bank87+$1980
	dw PLOK_UncompressedGFX_Bank87+$2000
	dw PLOK_UncompressedGFX_Bank87+$2080
	dw PLOK_UncompressedGFX_Bank87+$2100
	dw PLOK_UncompressedGFX_Bank87+$2180
	dw PLOK_UncompressedGFX_Bank87+$2800
	dw PLOK_UncompressedGFX_Bank87+$2880
	dw PLOK_UncompressedGFX_Bank87+$2900
	dw PLOK_UncompressedGFX_Bank87+$2980
	dw PLOK_UncompressedGFX_Bank87+$3000
	dw PLOK_UncompressedGFX_Bank87+$3080
	dw PLOK_UncompressedGFX_Bank87+$3100
	dw PLOK_UncompressedGFX_Bank87+$3180
	dw PLOK_UncompressedGFX_Bank87+$3800
	dw PLOK_UncompressedGFX_Bank87+$3880
	dw PLOK_UncompressedGFX_Bank87+$3900
	dw PLOK_UncompressedGFX_Bank87+$3980
	dw PLOK_UncompressedGFX_Bank87+$4000
	dw PLOK_UncompressedGFX_Bank87+$4080
	dw PLOK_UncompressedGFX_Bank87+$4100
	dw PLOK_UncompressedGFX_Bank87+$4180
	dw PLOK_UncompressedGFX_Bank87+$4800
	dw PLOK_UncompressedGFX_Bank87+$4880
	dw PLOK_UncompressedGFX_Bank87+$4900
	dw PLOK_UncompressedGFX_Bank87+$4980
	dw PLOK_UncompressedGFX_Bank87+$5000
	dw PLOK_UncompressedGFX_Bank87+$5080
	dw PLOK_UncompressedGFX_Bank87+$5100
	dw PLOK_UncompressedGFX_Bank87+$5180
	dw PLOK_UncompressedGFX_Bank87+$5800
	dw PLOK_UncompressedGFX_Bank87+$5880
	dw PLOK_UncompressedGFX_Bank87+$5900
	dw PLOK_UncompressedGFX_Bank87+$5980

DATA_81AA4C:
	dw PLOK_UncompressedGFX_Bank86+$0000
	dw PLOK_UncompressedGFX_Bank86+$0080
	dw PLOK_UncompressedGFX_Bank86+$0100
	dw PLOK_UncompressedGFX_Bank86+$0180
	dw PLOK_UncompressedGFX_Bank86+$0800
	dw PLOK_UncompressedGFX_Bank86+$0880
	dw PLOK_UncompressedGFX_Bank86+$0900
	dw PLOK_UncompressedGFX_Bank86+$0980
	dw PLOK_UncompressedGFX_Bank86+$1000
	dw PLOK_UncompressedGFX_Bank86+$1080
	dw PLOK_UncompressedGFX_Bank86+$1100
	dw PLOK_UncompressedGFX_Bank86+$1180
	dw PLOK_UncompressedGFX_Bank86+$1800
	dw PLOK_UncompressedGFX_Bank86+$1880
	dw PLOK_UncompressedGFX_Bank86+$1900
	dw PLOK_UncompressedGFX_Bank86+$1980
	dw PLOK_UncompressedGFX_Bank86+$2000
	dw PLOK_UncompressedGFX_Bank86+$2080
	dw PLOK_UncompressedGFX_Bank86+$2100
	dw PLOK_UncompressedGFX_Bank86+$2180
	dw PLOK_UncompressedGFX_Bank86+$2800
	dw PLOK_UncompressedGFX_Bank86+$2880
	dw PLOK_UncompressedGFX_Bank86+$2900
	dw PLOK_UncompressedGFX_Bank86+$2980
	dw PLOK_UncompressedGFX_Bank86+$3000
	dw PLOK_UncompressedGFX_Bank86+$3080
	dw PLOK_UncompressedGFX_Bank86+$3100
	dw PLOK_UncompressedGFX_Bank86+$3180
	dw PLOK_UncompressedGFX_Bank86+$3800
	dw PLOK_UncompressedGFX_Bank86+$3880
	dw PLOK_UncompressedGFX_Bank86+$3900
	dw PLOK_UncompressedGFX_Bank86+$3980
	dw PLOK_UncompressedGFX_Bank86+$4000
	dw PLOK_UncompressedGFX_Bank86+$4080
	dw PLOK_UncompressedGFX_Bank86+$4100
	dw PLOK_UncompressedGFX_Bank86+$4180
	dw PLOK_UncompressedGFX_Bank86+$4800
	dw PLOK_UncompressedGFX_Bank86+$4880
	dw PLOK_UncompressedGFX_Bank86+$4900
	dw PLOK_UncompressedGFX_Bank86+$4980

DATA_81AA9C:
	dw PLOK_UncompressedGFX_Bank88+$0000
	dw PLOK_UncompressedGFX_Bank88+$0100
	dw PLOK_UncompressedGFX_Bank88+$0800
	dw PLOK_UncompressedGFX_Bank88+$0900
	dw PLOK_UncompressedGFX_Bank88+$1000
	dw PLOK_UncompressedGFX_Bank88+$1100
	dw PLOK_UncompressedGFX_Bank88+$1800
	dw PLOK_UncompressedGFX_Bank88+$1900
	dw PLOK_UncompressedGFX_Bank88+$2000
	dw PLOK_UncompressedGFX_Bank88+$2100
	dw PLOK_UncompressedGFX_Bank88+$2800
	dw PLOK_UncompressedGFX_Bank88+$2900
	dw PLOK_UncompressedGFX_Bank88+$3000
	dw PLOK_UncompressedGFX_Bank88+$3100
	dw PLOK_UncompressedGFX_Bank88+$3800
	dw PLOK_UncompressedGFX_Bank88+$3900

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

DATA_81AABC:
	dw DATA_81AAE4
	dw DATA_81AAE4
	dw DATA_81AAE4
	dw DATA_81AACC
	dw DATA_81AACC
	dw DATA_81AAD2
	dw DATA_81AAD8
	dw DATA_81AADE

DATA_81AACC:
	dw $0018,$0018,$000A

DATA_81AAD2:
	dw $0014,$000C,$0006

DATA_81AAD8:
	dw $0012,$0006,$0004

DATA_81AADE:
	dw $0010,$0002,$0002

DATA_81AAE4:
	dw $0016,$0012,$0008

DATA_81AAEA:
	dw DATA_81AAE4
	dw DATA_81AB08
	dw DATA_81AB08
	dw DATA_81AACC
	dw DATA_81AACC
	dw DATA_81AAFA
	dw DATA_81AB12
	dw DATA_81AB1C

DATA_81AAFA:
	dw $000E,$0001,$0010,$0003,$0010,$0001,$8000

DATA_81AB08:
	dw $0014,$0001,$0016,$0000,$8000

DATA_81AB12:
	dw $0008,$0001,$000A,$0001,$8000

DATA_81AB1C:
	dw $0004,$0007,$8000

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

DATA_81AB22:
	dw $00CC,$00CE,$00D0,$00D2,$0100,$0102,$0104,$0106
	dw $0108,$010A,$010C,$010E,$0110,$0112,$0114,$0116
	dw $01F8,$01FA,$01FC,$01FE,$0200,$0200,$0200,$0200
	dw $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
	dw $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
	dw $0200,$0200,$0200,$0200,$0208,$0208,$0208,$0208
	dw $021C,$021C,$021C,$021C,$0200,$0200,$0200,$0200
	dw $02A8,$02AA,$02AC,$02AE,$02A8,$02AA,$02AC,$02AE
	dw $02A8,$02AA,$02AC,$02AE,$02A8,$02AA,$02AC,$02AE
	dw $03AC,$03AE,$03B0,$03B2,$02A8,$02AA,$02AC,$02AE
	dw $03D8,$03DA,$03DC,$03DE,$03D8,$03DA,$03DC,$03DE
	dw $03D8,$03DA,$03DC,$03DE,$0514,$0516,$0518,$051A
	dw $0514,$0516,$0518,$051A,$0524,$0526,$0528,$052A

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

DATA_81ABF2:
	dw $049C,$049E,$04A0,$04A2,$04A4,$04A6,$04A8,$04AA

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

DATA_81AC02:
	dw $04E6,$04E8,$04EA,$04EC,$04EE,$04F0,$04F2,$04F4

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

DATA_81AC12:
	dw $0110,$0112,$0114,$0116,$0108,$010A,$010C,$010E

DATA_81AC22:
	dw $0A00,$0A00,$0A00,$0A00,$0A00,$0A00,$0800,$0600

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

DATA_81AC32:
	dw $0318,$0318,$0316,$0314

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

DATA_81AC3A:
	dw $032A,$032A,$032A,$0328,$0326,$0324,$00E2,$00E2

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

DATA_81AC4A:
	dw $00FC,$7200
	dw $00FE,$7200
	dw $00FC,$7200
	dw $00FE,$7200
	dw $00FC,$7200
	dw $00FE,$7200
	dw $00FC,$7200
	dw $00FE,$7200
	dw $032E,$7C00
	dw $032C,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $0320,$7000
	dw $00E2,$7000
	dw $031E,$7000
	dw $031A,$7000
	dw $031A,$7000
	dw $00FC,$7200
	dw $00FE,$7200
	dw $00FC,$7200
	dw $00FE,$7200
	dw $02AA,$7200
	dw $02A8,$7200
	dw $00E2,$0000
	dw $00E2,$0000
	dw $00E2,$0000
	dw $00E2,$0000
	dw $0322,$7000
	dw $0322,$7000
	dw $0322,$7000
	dw $0322,$7000
	dw $031C,$7000
	dw $031C,$7000
	dw $00FC,$7200
	dw $00FE,$7200
	dw $00FC,$7200
	dw $00FE,$7200
	dw $00FC,$7200
	dw $00FE,$7200
	dw $00FC,$7200
	dw $00FE,$7200
	dw $051C,$7000
	dw $051E,$7000
	dw $051C,$7000
	dw $051E,$7000

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

DATA_81AD1A:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0025,$003A,$0038,$0000,$0000,$0000,$0000
	dw $0000,$0000

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

DATA_81AD4E:
	dw $3809,$3805,$3808,$3805

DATA_81AD56:
	dw $3809,$3806,$3808,$3805
	dw $3807,$3806,$3807,$3805

DATA_81AD66:
	dw $FFF5,$FFEA,$FFFA,$0008

DATA_81AD6E:
	dw $000A,$FFF8,$0006,$0014

DATA_81AD76:
	dw $0020,$000E,$FFF4,$000E

DATA_81AD7E:
	dw $FFF5,$FFEC,$FFFA,$FFEA
	dw $000C,$0008,$FFF2,$0008

DATA_81AD8E:
	dw $000A,$FFF6,$0006,$FFF8
	dw $000C,$0014,$FFF2,$0014

DATA_81AD9E:
	dw $0020,$FFFC,$FFF4,$000E
	dw $0018,$FFFA,$0016,$000E

DATA_81ADAE:
	dw $2000,$6000,$2000,$2000

DATA_81ADB6:
	dw $2000,$6000,$2000,$6000
	dw $2000,$2000,$6000,$2000

DATA_81ADC6:
	dw $0300,$0000,$FD00,$0000

DATA_81ADCE:
	dw $0300,$FE00,$FD00,$0000
	dw $0200,$FE00,$0200,$0000

DATA_81ADDE:
	dw $0000,$0003,$0000,$0003

DATA_81ADE6:
	dw $0000,$0002,$0000,$0003
	dw $0002,$0002,$0002,$0003

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

DATA_81ADF6:
	dw $0008,$0008,$0007,$0006,$0008,$0007,$0006

DATA_81AE04:
	dw $0000,$FF00,$FE00,$FD00,$0100,$0200,$0300

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

DATA_81AE12:
	dw $FE3E,$FDDA,$FD76,$FD12,$FD12,$FD76,$FDDA,$FE3E
	dw $FEA2,$FF06,$FF6A,$FFCE,$FFCE,$FF6A,$FF06,$FEA2
	dw $FE3E,$FDDA,$FD76,$FD12,$FD12,$FD76,$FDDA,$FE3E
	dw $FEA2,$FF06,$FF6A,$FFCE,$FFCE,$FF6A,$FF06,$FEA2
	dw $FCAE,$FC4A,$FBE6,$FB82,$FB82,$FBE6,$FC4A,$FCAE
	dw $FD12,$FD76,$FDDA,$FE3E,$FEA2,$FF06,$FF6A,$FFCE
	dw $0032,$0096,$00FA,$015E,$015E,$00FA,$0096,$0032
	dw $FFCE,$FF6A,$FF06,$FEA2

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

DATA_81AE8A:
	dw $FEA2,$FE70,$FE3E,$FE3E,$FE3E,$FE70,$FE70,$FEA2
	dw $FEA2,$FF06,$FF6A,$FFCE,$FFCE,$FF6A,$FF06,$FEA2
	dw $FEA2,$FE70,$FE3E,$FE3E,$FE3E,$FE3E,$FE70,$FE70
	dw $FEA2,$FF06,$FF6A,$FFCE,$FFCE,$FF6A,$FF06,$FEA2
	dw $FE3E,$FE3E,$FE3E,$FE3E,$FE3E,$FE3E,$FE3E,$FE3E
	dw $FE70,$FE70,$FEA2,$FEA2,$FEA2,$FF06,$FF6A,$FFCE
	dw $0032,$0096,$00FA,$015E,$015E,$00FA,$0096,$0032
	dw $FFCE,$FF6A,$FF06,$FEA2

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

DATA_81AF02:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E) != $00
	dw $0008,$FFFF,$0004,$0000,$0004,$0001,$0004,$0002
	dw $0004,$0003,$0004,$0004,$0004,$0005,$0004,$0006
	dw $0004,$0007,$0004,$0008,$0004,$0009,$0004,$000A
	dw $0004,$000B,$0004,$000C,$0004,$000D,$8000,$0000
	dw $0004,$000E,$0004,$000F,$0004,$0010,$0004,$0011
	dw $0008,$0012,$0008,$0013,$0008,$0014,$0008,$0015
	dw $0008,$0016,$8001,$0000,$0008,$0017,$0008,$0018
	dw $0004,$0019,$0004,$0018,$0004,$001A,$0004,$0018
	dw $0004,$0019,$0004,$001B,$0004,$001C,$0004,$001B
	dw $0004,$001D,$0004,$0018,$0004,$001A,$0004,$0018
	dw $FFFF,$001C
else
	dw $0019,$FFFF,$0004,$0000,$0004,$0001,$0004,$0002
	dw $0004,$0003,$0006,$0004,$0006,$0005,$0006,$0006
	dw $0006,$0007,$0006,$0008,$0006,$0009,$0006,$000A
	dw $0006,$000B,$0006,$000C,$0006,$000D,$8000,$0000
	dw $0006,$000E,$0006,$000F,$0006,$0010,$0006,$0011
	dw $000C,$0012,$0006,$0013,$0006,$0014,$0006,$0015
	dw $0006,$0016,$8001,$0000,$0006,$0017,$000C,$0018
	dw $0006,$0019,$0006,$0018,$0006,$001A,$0006,$0018
	dw $0006,$0019,$0006,$001B,$0006,$001C,$0006,$001B
	dw $0006,$001D,$0006,$0018,$0006,$001A,$0006,$0018
	dw $FFFF,$001C
endif

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

DATA_81AFA6:
	dw $00B4,$0000,$0006,$0001,$0006,$0002,$0078,$0003
	dw $0006,$0002,$0028,$0001,$0006,$0002,$0006,$0003
	dw $0006,$0006,$0004,$0007,$0004,$0008,$0004,$0009
	dw $0004,$0008,$8004,$0109,$0006,$0007,$0006,$0006
	dw $0018,$0003,$0006,$0002,$8002,$0205,$0028,$0001
	dw $0006,$0002,$0006,$0003,$0006,$0006,$0004,$0007
	dw $0004,$0008,$0004,$0009,$0004,$0008,$8004,$0117
	dw $0006,$0007,$0006,$000A,$0006,$0009,$0006,$0008
	dw $0004,$0002,$0004,$0001,$0004,$0000,$0028,$0004
	dw $0014,$0005,$0014,$0004,$0028,$0005,$8004,$0123
	dw $8000,$FF00

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

DATA_81B04A:
	dw $0020,$0011,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B05E:
	dw $0016,$000C,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B072:
	dw $001A,$0016,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B086:
	dw $0020,$001E,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B09A:
	dw $0020,$0013,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B0AE:
	dw $0020,$0001,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B0C2:
	dw $0010,$0010,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007

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

DATA_81B0D6:
	dw $0000,$01FE,$03FC,$05FA,$07F8,$09F6,$0BF4,$0DF2
	dw $0FF0,$11EE,$13EC

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

DATA_81B0EC:
	dw $2180,$2246,$2244,$2242

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

DATA_81B0F4:
	dw $2A4E,$2A4C,$2A4A,$2A48

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
else
	%DATATABLE_PLOK_PrimaryLanguageBigLetterTileDataTable(NULLROM)			; $81B0FC
	%DATATABLE_PLOK_LegacyIslandTitleCardData(NULLROM)				; $81B19C
endif

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

DATA_81B228:
	%PLOK_HandlePrimaryTextPointer(NintendoPower, !Text_InTable)	: %PLOK_SetTextVRAMAddress($01, $0C, !Text_Layer_3, !Text_InTable)
	%PLOK_HandlePrimaryTextPointer(JohnsCheat, !Text_InTable)	: %PLOK_SetTextVRAMAddress($02, $0C, !Text_Layer_3, !Text_InTable)
	%PLOK_HandlePrimaryTextPointer(LyndonsCheat, !Text_InTable)	: %PLOK_SetTextVRAMAddress($01, $0C, !Text_Layer_3, !Text_InTable)
	%PLOK_HandlePrimaryTextPointer(BadInfluence, !Text_InTable)	: %PLOK_SetTextVRAMAddress($01, $0C, !Text_Layer_3, !Text_InTable)

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%DATATABLE_RT00_PLOK_JapaneseTextStrings(NULLROM)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
else
	%DATATABLE_RT00_PLOK_EnglishTextStrings(NULLROM)					; $81B238
endif

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

DATA_81B39E:
	dw $0024,$0024,$0024,$0024,$0024,$0024,$0024,$0024
	dw $0020,$0020,$0020,$0020,$0020,$0020,$0020,$0020
	dw $0020,$0020,$0020,$0020,$0020,$0020,$0020,$0020
	dw $0020,$0020,$0020,$0020,$0020,$0020,$0020,$0020
	dw $002C,$002C,$002C,$002C,$002C,$002C,$002C,$002C
	dw $0024,$0024,$0024,$0024,$0024,$0024,$0024,$0024
	dw $0024,$0024,$0024,$0024,$0024,$0024,$0024

PLOK_LevelNameTable:
;$81B40C
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($05, $0B, !Text_Layer_3, LevelName_Beach)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($05, $0B, !Text_Layer_3, LevelName_Bridge)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($04, $0B, !Text_Layer_3, LevelName_Columns)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_LogFalls)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_RicketyBridge)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_CrazyCradles)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_BlindLeap)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_CottonIsland)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_BobbinsBros)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_GarlenBeach)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_SleepyDale)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_PloksHouse)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_MaceCove)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_FoolsGap)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($04, $0B, !Text_Layer_3, LevelName_ZigZag)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_SpongeRocks)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_SwiftyPeaks)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_LogTrail)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_CrouchHill)
	%PLOK_WriteLevelName($01, $05, !Text_Layer_3, WorldName_Legacy)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_BobbinsBros)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_PlokTown)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_ThePenkinos)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_VengeThicket)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_DreamyCove)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_CreepyForest)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_WomackSpider)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_CreepyCrag)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_GohomeCavern)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_CrashingRocks)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_RockyFella)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_BrendammiBog)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_BadreamFens)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Akrillic)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_BreezyBeach)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_CyclingClever)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_RoadHogging)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_HighFlying)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_EasyRiding)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_InASpin)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_RealRumblings)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_SilentRunning)
	%PLOK_WriteLevelName($04, $05, !Text_Layer_3, WorldName_Fleapit)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_TheFleaQueen)
	%PLOK_WriteLevelName($03, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, SecretWarp)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_SleepyDale)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_PlokTown)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($03, $0B, !Text_Layer_3, LevelName_ThePenkinos)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_VengeThicket)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_DreamyCove)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_CreepyForest)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_WomackSpider)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_CreepyCrag)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_GohomeCavern)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_CrashingRocks)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_RockyFella)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($01, $0B, !Text_Layer_3, LevelName_BrendammiBog)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_BadreamFens)
	%PLOK_WriteLevelName($00, $05, !Text_Layer_3, WorldName_TestDrive)
	%PLOK_WriteLevelName($02, $0B, !Text_Layer_3, LevelName_BreezyBeach)

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%DATATABLE_RT01_PLOK_JapaneseTextStrings(NULLROM)

DATA_81D43C:
	dw $0020,$0019,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
DATA_81D2E6:
else
	%DATATABLE_RT01_PLOK_EnglishTextStrings(NULLROM)					; $81B5C4

DATA_81D2E6:
	dw $0000,$0324,$0647,$096A,$0C8B,$0FAB,$12C8,$15E2
	dw $18F8,$1C0B,$1F19,$2223,$2528,$2826,$2B1F,$2E11
	dw $30FB,$33DE,$36BA,$398C,$3C56,$3F17,$41CE,$447A
	dw $471C,$49B4,$4C3F,$4EBF,$5133,$539B,$55F5,$5842
	dw $5A82,$5CB4,$5ED7,$60EC,$62F2,$64E8,$66CF,$68A6
	dw $6A6D,$6C24,$6DCA,$6F5F,$70E2,$7255,$73B5,$7504
	dw $7641,$776C,$7884,$798A,$7A7D,$7B5D,$7C29,$7CE3
	dw $7D8A,$7E1D,$7E9D,$7F09,$7F62,$7FA7,$7FD8,$7FF6
	dw $7FFF,$7FF6,$7FD8,$7FA7,$7F62,$7F09,$7E9D,$7E1D
	dw $7D8A,$7CE3,$7C29,$7B5D,$7A7D,$798A,$7884,$776C
	dw $7641,$7504,$73B5,$7255,$70E2,$6F5F,$6DCA,$6C24
	dw $6A6D,$68A6,$66CF,$64E8,$62F2,$60EC,$5ED7,$5CB4
	dw $5A82,$5842,$55F5,$539B,$5133,$4EBF,$4C3F,$49B4
	dw $471C,$447A,$41CE,$3F17,$3C56,$398C,$36BA,$33DE
	dw $30FB,$2E11,$2B1F,$2826,$2528,$2223,$1F19,$1C0B
	dw $18F8,$15E2,$12C8,$0FAB,$0C8B,$096A,$0647,$0324
	dw $0000,$FCDC,$F9B9,$F696,$F375,$F055,$ED38,$EA1E
	dw $E708,$E3F5,$E0E7,$DDDD,$DAD8,$D7DA,$D4E1,$D1EF
	dw $CF05,$CC22,$C946,$C674,$C3AA,$C0E9,$BE32,$BB86
	dw $B8E4,$B64C,$B3C1,$B141,$AECD,$AC65,$AA0B,$A7BE
	dw $A57E,$A34C,$A129,$9F14,$9D0E,$9B18,$9931,$975A
	dw $9593,$93DC,$9236,$90A1,$8F1E,$8DAB,$8C4B,$8AFC
	dw $89BF,$8894,$877C,$8676,$8583,$84A3,$83D7,$831D
	dw $8276,$81E3,$8163,$80F7,$809E,$8059,$8028,$800A
	dw $8001,$800A,$8028,$8059,$809E,$80F7,$8163,$81E3
	dw $8276,$831D,$83D7,$84A3,$8583,$8676,$877C,$8894
	dw $89BF,$8AFC,$8C4B,$8DAB,$8F1E,$90A1,$9236,$93DC
	dw $9593,$975A,$9931,$9B18,$9D0E,$9F14,$A129,$A34C
	dw $A57E,$A7BE,$AA0B,$AC65,$AECD,$B141,$B3C1,$B64C
	dw $B8E4,$BB86,$BE32,$C0E9,$C3AA,$C674,$C946,$CC22
	dw $CF05,$D1EF,$D4E1,$D7DA,$DAD8,$DDDD,$E0E7,$E3F5
	dw $E708,$EA1E,$ED38,$F055,$F375,$F696,$F9B9,$FCDC
endif

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

DATA_81D4E6:
	db $00,$80,$40,$C0,$20,$A0,$60,$E0,$10,$90,$50,$D0,$30,$B0,$70,$F0
	db $08,$88,$48,$C8,$28,$A8,$68,$E8,$18,$98,$58,$D8,$38,$B8,$78,$F8
	db $04,$84,$44,$C4,$24,$A4,$64,$E4,$14,$94,$54,$D4,$34,$B4,$74,$F4
	db $0C,$8C,$4C,$CC,$2C,$AC,$6C,$EC,$1C,$9C,$5C,$DC,$3C,$BC,$7C,$FC
	db $02,$82,$42,$C2,$22,$A2,$62,$E2,$12,$92,$52,$D2,$32,$B2,$72,$F2
	db $0A,$8A,$4A,$CA,$2A,$AA,$6A,$EA,$1A,$9A,$5A,$DA,$3A,$BA,$7A,$FA
	db $06,$86,$46,$C6,$26,$A6,$66,$E6,$16,$96,$56,$D6,$36,$B6,$76,$F6
	db $0E,$8E,$4E,$CE,$2E,$AE,$6E,$EE,$1E,$9E,$5E,$DE,$3E,$BE,$7E,$FE
	db $01,$81,$41,$C1,$21,$A1,$61,$E1,$11,$91,$51,$D1,$31,$B1,$71,$F1
	db $09,$89,$49,$C9,$29,$A9,$69,$E9,$19,$99,$59,$D9,$39,$B9,$79,$F9
	db $05,$85,$45,$C5,$25,$A5,$65,$E5,$15,$95,$55,$D5,$35,$B5,$75,$F5
	db $0D,$8D,$4D,$CD,$2D,$AD,$6D,$ED,$1D,$9D,$5D,$DD,$3D,$BD,$7D,$FD
	db $03,$83,$43,$C3,$23,$A3,$63,$E3,$13,$93,$53,$D3,$33,$B3,$73,$F3
	db $0B,$8B,$4B,$CB,$2B,$AB,$6B,$EB,$1B,$9B,$5B,$DB,$3B,$BB,$7B,$FB
	db $07,$87,$47,$C7,$27,$A7,$67,$E7,$17,$97,$57,$D7,$37,$B7,$77,$F7
	db $0F,$8F,$4F,$CF,$2F,$AF,$6F,$EF,$1F,$9F,$5F,$DF,$3F,$BF,$7F,$FF

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

DATA_81D5E6:
	dw $0098,$00F6,$0022,$6000,$0084,$00F0,$0022,$2000
	dw $01B6,$0104,$0023,$0700,$00C8,$0130,$0023,$0100
	dw $02C0,$00E8,$0022,$6000,$02C8,$00E0,$0022,$2000
	dw $02B8,$00E0,$0022,$6000,$0210,$0160,$0023,$0700
	dw $02C0,$0100,$0023,$0100,$02B8,$00D0,$0027,$6000
	dw $02F0,$012C,$0028,$6000,$0330,$0184,$0029,$6000
	dw $0320,$018C,$0029,$6000,$0310,$0184,$0029,$6000
	dw $0220,$0364,$002A,$6000,$02E4,$0104,$002B,$6000
	dw $FFFF

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

DATA_81D668:
	dw DATA_81D6FC
	dw DATA_81D6E0
	dw DATA_81D6FC
	dw DATA_81D6FC
	dw DATA_81D6FC
	dw DATA_81D6FC
	dw DATA_81D6FC
	dw DATA_81D6FC
	dw DATA_81D6E0
	dw DATA_81D6E0
	dw DATA_81D6E0
	dw DATA_81D708
	dw DATA_81D708
	dw DATA_81D708
	dw DATA_81D708
	dw DATA_81D708
	dw DATA_81D708
	dw DATA_81D708
	dw DATA_81D708
	dw DATA_81D6EE
	dw DATA_81D6EE
	dw DATA_81D734
	dw DATA_81D734
	dw DATA_81D734
	dw DATA_81D734
	dw DATA_81D746
	dw DATA_81D746
	dw DATA_81D746
	dw DATA_81D746
	dw DATA_81D75A
	dw DATA_81D75A
	dw DATA_81D75A
	dw DATA_81D6DE
	dw DATA_81D6E0
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6DE
	dw DATA_81D6E8
	dw DATA_81D71A
	dw DATA_81D75A
	dw DATA_81D75A

DATA_81D6DE:
	dw $FFFF

DATA_81D6E0:
	dw $0002,$0007,$0008,$FFFF

DATA_81D6E8:
	dw $0000,$0001,$FFFF

DATA_81D6EE:
	dw $0002,$0004,$0005,$0006,$0007,$0008,$FFFF

DATA_81D6FC:
	dw $0004,$0005,$0006,$0007,$0008,$FFFF

DATA_81D708:
	dw $0002,$0009,$000A,$000B,$000C,$000D,$000E,$000F
	dw $FFFF

DATA_81D71A:
	dw $0002,$0004,$0005,$0006,$0007,$0009,$000A,$000B
	dw $000C,$000D,$000E,$000F,$FFFF

DATA_81D734:
	dw $0002,$0004,$0005,$0006,$0007,$0008,$0009,$000F
	dw $FFFF

DATA_81D746:
	dw $0002,$0004,$0005,$0006,$0007,$0008,$0009,$000A
	dw $000F,$FFFF

DATA_81D75A:
	dw $0002,$0004,$0005,$0006,$0007,$0008,$0009,$000A
	dw $000B,$000C,$000D,$000E,$000F,$FFFF

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

DATA_81D776:
	dw DATA_81D77A
	dw DATA_81D794

DATA_81D77A:
	dw $0002,$0002,$FFFE,$0004,$FFFC,$0006,$FFFA,$0008
	dw $FFF8,$000A,$FFF6,$000C,$FFF4

DATA_81D794:
	dw $0000,$03FC,$01A0,$0270,$0340,$0410,$04E0,$05B0
	dw $0680,$0750,$0820,$08F0

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

DATA_81D7AC:
	dw $FFFF

DATA_81D7AE:
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$000A,$0002,$006A,$0002,$0002
	dw $0002,$0032,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$000A,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002

DATA_81D820:
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D892
	dw DATA_81D7AC
	dw DATA_81D89C
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D906
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D892
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC

DATA_81D892:
	dw $88C2,$0001,$000B,$0001,$FFFF

DATA_81D89C:
	dw $2562,$0001,$0005,$0001,$2870,$0001,$0020,$0001
	dw $2A4C,$0001,$0009,$0001,$2F24,$0001,$0009,$0001
	dw $34EE,$0001,$0020,$0001,$416C,$0001,$0020,$0001
	dw $41BA,$0001,$000A,$0001,$41E8,$0001,$000B,$0001
	dw $4208,$0001,$000B,$0001,$4242,$0001,$000A,$0001
	dw $417E,$0001,$0009,$0000,$4294,$0001,$000A,$0001
	dw $42BC,$0001,$0010,$0001,$FFFF

DATA_81D906:
	dw $38A4,$0001,$0006,$0000,$392E,$0001,$0007,$0001
	dw $636C,$0001,$0006,$0001,$63B6,$0001,$0005,$0000
	dw $8C10,$0001,$0006,$0001,$8C52,$0001,$0005,$0000
	dw $FFFF

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

DATA_81D938:
	dw $008A,$008C,$008E,$0090,$0092,$0096,$0098,$00B8
	dw $00B6,$00B4,$00B2,$00B0,$00AE,$00AC,$00AA,$00A8
	dw $00A6,$00A4,$00A2,$00A0,$009E,$009C,$009A

DATA_81D966:
	dw $008A,$008C,$008E,$0090,$0092,$0536,$0538,$00B8
	dw $00B6,$00B4,$00B2,$00B0,$00AE,$00AC,$00AA,$00A8
	dw $00A6,$00A4,$00A2,$00A0,$009E,$009C,$009A

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

DATA_81D994:
	dw $2A00,$2800,$2600

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

DATA_81D99A:
	dw $4004,$0004,$4004,$4004,$0004,$4004,$0004,$0004

DATA_81D9AA:
	dw $FB50,$FA88,$F9C0,$F9C0,$FA88

DATA_81D9B4:
	dw $FB50,$FA88,$F830,$F830,$FA88

DATA_81D9BE:
	dw $0014,$0078,$0050,$0064,$0028,$003C,$008C

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

DATA_81D9CC:
	dw $FE0C,$FC7C,$FBB4,$FA88,$F9C0,$F8F8,$F830,$F768

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

DATA_81D9DC:
	dw $0064,$003C,$001E

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

DATA_81D9E2:
	dw $0008,$000E,$000C,$000A,$0008,$000C,$000A,$000E
	dw $0008,$000C,$000E,$0008,$000A,$0008,$000C,$000E

DATA_81DA02:
	dw $0010,$0012,$0014,$0016,$0018,$001A,$001C,$001E

DATA_81DA12:
	dw $0000,$0000,$0000,$0014,$0001,$004D,$0005,$0006
	dw $0006,$0010,$0003,$0010,$0006,$0010,$0005,$0006
	dw $0002,$004D

DATA_81DA36:
	dw $0000,$050C,$050C,$0512,$050C,$050E,$0510

DATA_81DA44:
	dw $0030,$1000,$0030,$2000,$0040,$1000,$0060,$2000
	dw $0040,$1000,$0020,$2000,$0040,$2000,$0100,$1000
	dw $FFFF

DATA_81DA66:
	dw $0032,$0005,$000A,$000F,$0014,$001E,$0032,$00D8
	dw $00DA,$00DC,$00DE,$00E0,$00DE,$00E0,$00DE,$00E0
	dw $00E2,$00E0,$00E2,$00E0,$00E2,$00E0,$00E2,$00D8
	dw $00DA,$00DC,$00E2

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

DATA_81DA9C:
	dw $0050,$0000,$0000,$0030,$0001,$0002,$0050,$0000
	dw $0000,$0022,$0001,$0002,$0022,$0001,$0001,$0050
	dw $0000,$0000,$0040,$0001,$0002,$0030,$0001,$0001
	dw $0050,$0000,$0000,$0040,$0001,$0001,$0050,$0000
	dw $0000,$0078,$0001,$0002,$0078,$0001,$0001,$FFFF

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

DATA_81DAEC:
	dw $0050,$0000,$0000,$0013,$0000,$0006,$0005,$0000
	dw $0009,$0005,$0000,$000A,$0003,$0000,$0009,$0003
	dw $0000,$000A,$0003,$0000,$0009,$0003,$0000,$000A
	dw $0005,$0000,$0009,$0005,$0000,$000A,$0013,$0000
	dw $0005,$FFFF

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

DATA_81DB30:
	dw $FFF8,$0060,$0080,$FFD0,$FFA0,$0008,$0030,$FF80

DATA_81DB40:
	dw $FFF3,$000B,$000A,$FFF4,$FFF4,$000C,$000B,$FFF5

DATA_81DB50:
	dw $000A,$0001,$FFFD,$0006,$0001,$000A,$0006,$FFFD

DATA_81DB60:
	dw $0014,$0032,$0050,$0046,$0032,$0014,$0046,$0050

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

DATA_81DB80:
	dw $4000,$0000,$0000,$4000,$4000,$0000,$0000,$4000

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

DATA_81DB90:
	dw $0002,$0001,$0000,$0001,$0002,$0003,$0004,$0003

DATA_81DBA0:
	dw $04D6,$04D4,$04AC,$04AC,$04AC,$04AC,$04AC,$04D4

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

DATA_81DBB0:
	dw $055A,$055C,$055E,$0560,$0562,$0558,$0556,$0554
	dw $0552,$0550

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

DATA_81DBC4:
	dw $0008,$0010,$0020,$FFF8,$FFF0,$FFE0

DATA_81DBD0:
	dw $3600,$3600,$3600,$7600,$7600,$7600

DATA_81DBDC:
	dw $F6A0,$F830,$F8F8,$F6A0,$F830,$F8F8

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

DATA_81DBE8:
	dw $05C0,$05B6,$05AC,$05A2,$0598,$058E,$0584,$057A

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

DATA_81DBF8:
	dw $F6A0,$0000,$3000,$0004,$FA88,$0004,$3000,$0004
	dw $FA88,$0004,$7000,$0004,$00C8,$0003,$3000,$0001
	dw $00C8,$0003,$7000,$0001,$FA88,$0006,$3000,$0004
	dw $FA88,$0006,$7000,$0004,$F830,$0002,$3000,$0004
	dw $F830,$0002,$7000,$000A,$F6A0,$0000,$3000,$0001
	dw $FA88,$0005,$3000,$0004,$FA88,$0005,$7000,$0004
	dw $0000,$0003,$3000,$0001,$0000,$0003,$7000,$0001
	dw $F830,$0004,$3000,$0004,$F6A0,$0000,$3000,$0004
	dw $FA88,$0004,$3000,$0004,$FA88,$0004,$7000,$0004
	dw $00C8,$0003,$3000,$000A,$00C8,$0003,$7000,$0001
	dw $FA88,$0006,$3000,$0004,$FA88,$0006,$7000,$0004
	dw $FA88,$0005,$3000,$0004,$FA88,$0005,$7000,$0004
	dw $0000,$0003,$3000,$0001,$0000,$0003,$7000,$000A
	dw $F6A0,$0000,$3000,$0004,$FA88,$0004,$3000,$0004
	dw $FA88,$0004,$7000,$0004,$F830,$0004,$7000,$0050
	dw $FFFF

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

DATA_81DCEA:
	dw $0032,$0046,$005A,$0064,$0064,$0064,$FA88,$F9C0
	dw $F8F8,$FA88,$F9C0,$F8F8

DATA_81DD02:
	dw $F6A0,$F5D8,$F510,$F8F8,$F830,$F768

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

DATA_81DD0E:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $8002,$8002,$8000,$8000,$8002,$8000,$8002,$8000
	dw $8001,$8001,$8001,$8001,$8001,$8001,$8001,$8001
	dw $8001,$8006,$8001,$8006,$8001,$8006,$8001,$8006

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

DATA_81DD4E:
	dw $2A00,$2400,$2600

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

DATA_81DD54:
	dw $003C,$0028,$0014

DATA_81DD5A:
	dw $0001,$0001,$0001,$0000

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

DATA_81DD62:
	dw $0118,$011A,$011E,$011C,$011E,$011A,$0118,$011A

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

DATA_81DD72:
	dw $03E2,$03E0,$03E2,$0122,$0122,$03E0

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

DATA_81DD7E:
	dw $0000,$0003,$0006,$0009,$0006,$0003

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

DATA_81DD8A:
	dw $0002,$0001,$FFFF,$FFFE,$FFFF,$0001

DATA_81DD96:
	dw $0242,$024C,$024A,$0246,$3200,$3200,$3200,$3200
	dw $7200,$7200,$7200,$7200

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

DATA_81DDAE:
	dw $0003,$FFFD,$FFFD,$0003

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

DATA_81DDB6:
	dw $00FA,$00FA,$00F6,$00F8

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

DATA_81DDBE:
	dw $00FA,$00FA,$00FA,$00FA,$00FA,$00FA,$00F6,$00F8

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

DATA_81DDCE:
	dw $0210,$0212,$0210,$0212,$0210,$0212,$0210,$0212
	dw $0210,$0212,$0214,$0212,$0214,$0212,$0214,$0212

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

DATA_81DDEE:
	dw $0530,$0532,$0534,$0532,$FCE0,$FC18,$F9C0,$F830
	dw $FCE0,$FC18,$F9C0,$F830,$0001,$0003,$0002,$0000
	dw $0000,$0001,$0003,$0002

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

DATA_81DE16:
	dw $FF38,$FF9C,$FDA8,$FE70,$FED4,$FF88,$FE0C,$FEA2

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

DATA_81DE26:
	dw $0000,$003F,$001F,$000F,$0007

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

DATA_81DE30:
	dw $0400,$0600,$0800,$0A00,$0400,$0600,$0800,$0A00

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

DATA_81DE40:
	dw $00FF,$00B0,$00A4,$0098,$0088

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

DATA_81DE4A:
	dw $0ED0,$0EFA,$0F24,$0F4E,$0F78,$0FA2,$0FCC,$0FF6

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

DATA_81DE5A:
	dw $0000,$000A,$000A,$0014,$001E,$0005,$000A,$000F

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

DATA_81DE6A:
	dw $0000,$0001,$0000,$0001,$0002,$0005,$000A,$000F

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

DATA_81DE7A:
	dw $43FF,$36FC,$25D8

DATA_81DE80:
	dw $1CF5,$43FF,$36FC,$25D8,$1CF5

DATA_81DE8A:
	dw $673B,$4E75,$39AF

DATA_81DE90:
	dw $2509,$673B,$4E75,$39AF,$2509

DATA_81DE9A:
	dw $7D76,$7C12,$5C0B,$499F,$341A,$3411,$2E7F,$01BB
	dw $0134,$33DF,$02FF,$0214,$7D76,$7C12,$5C0B,$499F
	dw $341A,$3411,$2E7F,$01BB,$0134,$33DF,$02FF,$0214

DATA_81DECA:
	dw $2E7F,$01BB,$0134,$499F,$341A,$3411,$7D76,$7C12
	dw $5C0B,$33DF,$02FF,$0214,$2E7F,$01BB,$0134,$499F
	dw $341A,$3411,$7D76,$7C12,$5C0B,$33DF,$02FF,$0214

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

DATA_81DEFA:
	db $55,$AA,$23,$F3,$3C

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

DATA_81DEFF:
	dw $000C,$001C,$001C

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

DATA_81DF05:
	dw $00D4,$00D6,$01F6

DATA_81DF0B:
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7F
	dw DATA_81DFA5
	dw DATA_81DF7D
	dw DATA_81DFD9
	dw DATA_81DF7D
	dw DATA_81DFE7
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DFCB
	dw DATA_81DF7D
	dw DATA_81DFE7
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81E00D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DFCB
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DFE7
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D
	dw DATA_81DF7D

DATA_81DF7D:
	dw $FFFF

DATA_81DF7F:
	dw $01C6,$0226,$0001,$0000,$0000,$8007,$06A4,$01F7
	dw $0001,$0002,$0000,$8008,$084A,$02AC,$0001,$0002
	dw $0000,$8009,$FFFF

DATA_81DFA5:
	dw $0709,$0415,$0001,$0002,$0000,$800A,$0778,$0583
	dw $0002,$0002,$0000,$800B,$08E0,$0583,$0002,$0002
	dw $0000,$800C,$FFFF

DATA_81DFCB:
	dw $0A50,$0460,$0001,$0002,$0000,$8003,$FFFF

DATA_81DFD9:
	dw $0AF2,$01FF,$0002,$0002,$0000,$8004,$FFFF

DATA_81DFE7:
	dw $0260,$0400,$0002,$0002,$0000,$800D,$0C00,$02A0
	dw $0002,$0002,$0000,$800E,$1024,$03A0,$0002,$0002
	dw $0000,$8006,$FFFF

DATA_81E00D:
	dw $09B2,$01BF,$0002,$0002,$0000,$800F,$0B0E,$01BE
	dw $0002,$0002,$0000,$8010,$1682,$00AF,$0002,$0002
	dw $0000,$8011,$15C0,$0190,$0002,$0002,$0000,$8012
	dw $12C0,$0130,$0002,$0002,$0000,$8013,$11B3,$0190
	dw $0002,$0002,$0000,$8014,$0F20,$0140,$0002,$0002
	dw $0000,$8015,$0D90,$0140,$0002,$0002,$0000,$8016
	dw $FFFF

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

DATA_81E06F:
	dw DATA_81E09D
	dw DATA_81E0AD
	dw DATA_81E0CB
	dw DATA_81E14B
	dw DATA_81E21F
	dw DATA_81E24B
	dw DATA_81E277
	dw DATA_81E2BF
	dw DATA_81E331
	dw DATA_81E42F
	dw DATA_81E4E7
	dw DATA_81E575
	dw DATA_81E5A1
	dw DATA_81E5CD
	dw DATA_81E5F9
	dw DATA_81E625
	dw DATA_81E651
	dw DATA_81E67D
	dw DATA_81E69B
	dw DATA_81E6B9
	dw DATA_81E6F3
	dw DATA_81E71F
	dw DATA_81E74B

DATA_81E09D:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$FFFF

DATA_81E0AD:
	dw $00C8,$0100,$0000,$0000,$0000,$0800,$0800,$00C8
	dw $FFFF,$0000,$0000,$0000,$0800,$0800,$FFFF

DATA_81E0CB:
	dw $0148,$FFFF,$0000,$0000,$0000,$0800,$0800,$0028
	dw $0000,$0100,$0000,$0000,$0800,$0800,$01C2,$FFFF
	dw $0000,$0000,$0000,$0800,$0800,$0032,$0000,$0100
	dw $0000,$0000,$0800,$0800,$0136,$FFFF,$0000,$0000
	dw $0000,$0800,$0800,$00C8,$0000,$FFFF,$0000,$0000
	dw $0800,$0800,$0050,$0000,$0300,$0000,$0000,$0800
	dw $0800,$0088,$0800,$0000,$0000,$0000,$0800,$0000
	dw $0082,$0000,$FFFF,$0000,$0000,$0800,$0800,$FFFF

DATA_81E14B:
	dw $0078,$0000,$FFFF,$0000,$FFE0,$0800,$0800,$0032
	dw $0000,$F900,$0000,$0040,$0800,$0800,$012C,$0000
	dw $0000,$0000,$0000,$8000,$8000,$0050,$0100,$FC00
	dw $0000,$0040,$0400,$0800,$0064,$0100,$F900,$0000
	dw $0020,$0400,$0800,$0064,$FFFF,$F900,$0000,$0020
	dw $0400,$0800,$0050,$0100,$FC00,$0000,$0020,$0400
	dw $0800,$0064,$0100,$F900,$0000,$0030,$0400,$0800
	dw $0064,$FFFF,$F900,$0000,$0020,$0400,$0800,$00A0
	dw $FFFF,$F900,$0000,$0020,$0400,$0800,$0032,$0000
	dw $0800,$0000,$FFE0,$0400,$0800,$0032,$0000,$0000
	dw $0000,$0000,$8000,$8000,$000A,$0000,$0800,$0000
	dw $0000,$0400,$0800,$0032,$0000,$0000,$0000,$0000
	dw $8000,$8000,$003C,$0000,$FFFF,$0000,$0000,$0400
	dw $0800,$FFFF

DATA_81E21F:
	dw $003C,$0000,$FFFF,$0000,$FFE0,$0800,$0800,$0051
	dw $0000,$F900,$0000,$0040,$0800,$0800,$001E,$0000
	dw $0700,$0000,$FFC0,$0800,$0800,$FFFF

DATA_81E24B:
	dw $0050,$0000,$0000,$0000,$0020,$0800,$0800,$0051
	dw $0000,$0700,$0000,$FFC0,$0800,$0800,$001C,$0000
	dw $F900,$0000,$0033,$0800,$0800,$FFFF

DATA_81E277:
	dw $0069,$0000,$FE00,$0000,$0000,$0800,$0800,$00C8
	dw $0000,$0000,$0000,$0000,$8000,$8000,$005A,$0000
	dw $0000,$0000,$FFE0,$0800,$0800,$008A,$0000,$F900
	dw $0000,$0040,$0800,$0800,$0026,$0000,$0700,$0000
	dw $FFC0,$0800,$0800,$FFFF

DATA_81E2BF:
	dw $0041,$0000,$0000,$0000,$FFE0,$0800,$0800,$002D
	dw $0100,$F900,$0020,$0040,$0400,$0800,$0032,$0400
	dw $0400,$FFF0,$0040,$0800,$0800,$000A,$0000,$0800
	dw $0000,$FFC0,$0800,$0800,$0023,$FFFF,$0500,$FFE0
	dw $FFF0,$0100,$0800,$0025,$FC00,$0100,$000C,$FFC0
	dw $0800,$0400,$001D,$0000,$FC00,$0000,$0026,$0800
	dw $0800,$001E,$0000,$0000,$0000,$0000,$8000,$8000
	dw $FFFF

DATA_81E331:
	dw $001E,$0000,$0000,$0000,$0060,$0800,$0800,$0030
	dw $0000,$0800,$0000,$FFD8,$0800,$0800,$001E,$FE00
	dw $0000,$0000,$FFD0,$0200,$0400,$0037,$FE00,$FC00
	dw $0000,$0030,$0200,$0800,$0032,$FE00,$0400,$0000
	dw $FFD0,$0200,$0400,$0037,$FE00,$FC00,$0000,$0030
	dw $0200,$0800,$0032,$FE00,$0400,$0000,$FFD0,$0200
	dw $0400,$0037,$FE00,$FC00,$0000,$0030,$0200,$0800
	dw $0032,$FE00,$0400,$0000,$FFD0,$0200,$0400,$0037
	dw $FE00,$FC00,$0000,$0030,$0200,$0800,$0030,$FE00
	dw $0400,$0000,$FFD0,$0200,$0400,$0014,$0000,$FD00
	dw $0000,$FFD0,$0200,$0800,$0028,$0000,$FA00,$0000
	dw $0040,$0200,$0800,$003C,$0000,$0000,$0000,$0000
	dw $8000,$8000,$0032,$0000,$0400,$0000,$0080,$0200
	dw $0800,$0070,$0800,$0000,$0000,$0000,$0800,$0800
	dw $001E,$0000,$F900,$0000,$0000,$0800,$0800,$0049
	dw $0000,$F900,$0000,$001F,$0800,$0800,$FFFF

DATA_81E42F:
	dw $0028,$0000,$0200,$0000,$0000,$0800,$0800,$008C
	dw $0200,$0000,$0000,$0000,$0800,$0800,$0014,$FF00
	dw $FF00,$0000,$FFF0,$0800,$0300,$00A0,$0000,$0000
	dw $0000,$0000,$0800,$0800,$0032,$FF00,$FF00,$0000
	dw $FFF0,$0800,$0300,$00A0,$0000,$0000,$0000,$0000
	dw $0800,$0800,$0032,$FF00,$FF00,$0000,$FFF0,$0800
	dw $0300,$00A0,$0000,$0000,$0000,$0000,$0800,$0800
	dw $0046,$FF00,$FF00,$0000,$FFF0,$0800,$0300,$003C
	dw $0000,$0000,$0000,$0000,$0800,$0800,$001E,$FD00
	dw $FB00,$0000,$00C0,$0800,$0800,$0044,$0000,$0800
	dw $0000,$FFE9,$0800,$0800,$001E,$0000,$0000,$0000
	dw $0000,$0800,$0800,$FFFF

DATA_81E4E7:
	dw $00C8,$0100,$0000,$0000,$0000,$0800,$0800,$00C8
	dw $FF00,$0000,$0000,$0000,$0800,$0800,$00C8,$0100
	dw $0000,$0000,$0000,$0800,$0800,$00C8,$FF00,$0000
	dw $0000,$0000,$0800,$0800,$0064,$0100,$0000,$0000
	dw $0000,$0800,$0800,$005C,$0000,$0000,$0000,$FFA0
	dw $0800,$0800,$00AE,$0000,$F900,$0000,$0020,$0800
	dw $0800,$005E,$0000,$0800,$0000,$FFE4,$0800,$0800
	dw $0064,$FF00,$0000,$0000,$0000,$0800,$0800,$001E
	dw $0000,$0000,$0000,$0000,$0800,$0800,$FFFF

DATA_81E575:
	dw $0032,$0000,$FE00,$0020,$FFF4,$0300,$0800,$0032
	dw $0000,$0000,$0000,$0000,$0800,$0800,$0032,$FC00
	dw $0200,$0018,$0016,$0300,$0800,$FFFF

DATA_81E5A1:
	dw $0032,$0000,$FE00,$FFE5,$FFF4,$FD00,$0800,$0032
	dw $0000,$0000,$0000,$0000,$0800,$0800,$0032,$0500
	dw $0200,$FFF3,$0016,$0800,$0800,$FFFF

DATA_81E5CD:
	dw $0050,$0100,$FE00,$0000,$FFF4,$FD00,$0800,$0032
	dw $0000,$0000,$0000,$0000,$0800,$0800,$004C,$FFFF
	dw $0200,$0000,$0014,$0800,$0800,$FFFF

DATA_81E5F9:
	dw $0040,$FFFF,$FE00,$0000,$FFF4,$FD00,$0800,$0032
	dw $0000,$0000,$0000,$0000,$0800,$0800,$003F,$0100
	dw $0200,$0000,$0014,$0800,$0800,$FFFF

DATA_81E625:
	dw $0040,$FFFF,$0200,$FFF6,$000C,$FD00,$0800,$0032
	dw $0000,$0000,$0000,$0000,$0800,$0800,$003F,$0100
	dw $FF00,$000A,$FFF4,$0800,$0800,$FFFF

DATA_81E651:
	dw $0040,$0100,$0200,$000A,$000C,$0800,$0800,$0032
	dw $0000,$0000,$0000,$0000,$0800,$0800,$003F,$FFFF
	dw $FF00,$FFF6,$FFF4,$FD00,$0800,$FFFF

DATA_81E67D:
	dw $007B,$FFFF,$0200,$0000,$0000,$0800,$0800,$007B
	dw $0100,$FE00,$0000,$0000,$FD00,$0800,$FFFF

DATA_81E69B:
	dw $00F6,$FE00,$0000,$0000,$0000,$0800,$0800,$00F6
	dw $0200,$0000,$0000,$0000,$FD00,$0800,$FFFF

DATA_81E6B9:
	dw $0032,$0000,$0000,$0000,$0000,$0800,$0800,$0064
	dw $FE00,$0100,$0000,$0000,$0800,$0800,$0064,$0200
	dw $FF00,$0000,$0000,$FD00,$0800,$0032,$0000,$0000
	dw $0000,$0000,$0800,$0800,$FFFF

DATA_81E6F3:
	dw $0064,$FC00,$FF00,$0000,$0000,$0800,$0800,$0064
	dw $0400,$0100,$0000,$0000,$FD00,$0800,$0064,$0000
	dw $0000,$0000,$0000,$0800,$0800,$FFFF

DATA_81E71F:
	dw $0032,$0000,$0000,$0000,$0000,$0800,$0800,$0140
	dw $FF00,$0000,$0000,$0000,$0800,$0800,$0140,$0100
	dw $0000,$0000,$0000,$FD00,$0800,$FFFF

DATA_81E74B:
	dw $0032,$0000,$0000,$0000,$0000,$0800,$0800,$0064
	dw $FE00,$0000,$0000,$0000,$0800,$0800,$0032,$0000
	dw $0000,$0000,$0000,$0800,$0800,$0064,$0200,$0000
	dw $0000,$0000,$FD00,$0800,$FFFF

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

DATA_81E785:
	db DATA_85DDAA>>16 : dw DATA_85DDAA
	db DATA_85DEAA>>16 : dw DATA_85DEAA
	db DATA_85DFAA>>16 : dw DATA_85DFAA
	db DATA_85E0AA>>16 : dw DATA_85E0AA
	db DATA_85E1AA>>16 : dw DATA_85E1AA
	db DATA_85E2AA>>16 : dw DATA_85E2AA
	db DATA_85E3AA>>16 : dw DATA_85E3AA

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

DATA_81E79A:
	dw $0000,$0000,$002C,$0000,$002B,$002F,$002D,$002E
	dw $0000

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

DATA_81E7AC:
	dw $13A4,$0371,$021E,$0421,$12F0,$0368,$0150,$00D0
	dw $1397,$03D9,$0723,$03D4,$0D78,$03C6,$0540,$0098

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

DATA_81E7CC:
	dw $F2B8,$F2B8,$F2B8,$F830,$F2B8,$F830,$F2B8,$F830
	dw $F2B8

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

DATA_81E7DE:
	dw $0010,$000A,$0010,$0010,$0010,$0010,$000A,$0010

DATA_81E7EE:
	dw $0000,$0000,$0001,$0000,$0002,$0000,$0002,$0000

DATA_81E7FE:
	dw $0001,$0001,$0000,$0001,$0000,$0001,$0000,$0000

DATA_81E80E:
	dw $0002,$0006,$0005,$0004,$0001,$0008,$0018,$0005

DATA_81E81E:
	dw $0020,$002C,$0014,$0032,$0018,$0028,$0064,$0014

DATA_81E82E:
	dw $0400,$0400,$0800,$0600,$0800,$0180,$0800,$0800

DATA_81E83E:
	dw $FC00,$FC00,$F800,$FA00,$F800,$FE80,$F800,$F800

DATA_81E84E:
	dw $0000,$0000,$FFCC,$0000,$FFE2,$0000,$FF9C,$0000

DATA_81E85E:
	dw $0050,$003C,$0014,$0050,$0001,$005A,$0030,$0028

DATA_81E86E:
	dw $FA88,$FA88,$0000,$FA88,$0000,$F9C0,$0000,$0000

DATA_81E87E:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0008,$0004,$0004,$0004,$0004

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

DATA_81E898:
	dw $0336,$0022,$001C,$0338,$0020,$001A,$033A,$0024
	dw $001E

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

DATA_81E8AA:
	dw $0000,$0200,$FE9C

DATA_81E8B0:
	dw $0008,$000C,$0004

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

DATA_81E8B6:
	dw $03BC,$002E,$0032,$03BE,$002C,$0030,$03C0,$0030
	dw $0034

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

DATA_81E8C8:
	dw $FED4,$0100,$FDD4

DATA_81E8CE:
	dw $0004,$0008,$0000

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

DATA_81E8D4:
	dw $034A,$034C,$034E,$034C,$034E,$034C,$034A,$0348

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

DATA_81E8E4:
	dw $0000,$0000,$0001,$0001,$0002,$0002,$0002,$0002
	dw $0003,$0003,$0003,$0003,$0003,$0004,$0004,$0004
	dw $0005,$0000,$0000,$0007,$0007,$0008,$0008,$0008
	dw $0008,$0009,$0009,$0009,$0009,$0009,$000A,$000A
	dw $000A,$000B

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

DATA_81E928:
	dw $0376,$0028,$037A,$0028,$037E,$0026,$0382,$0026
	dw $0386,$0024,$038A,$0024,$038E,$0024,$0392,$0028
	dw $0396,$002A,$039A,$002A,$039E,$002C,$03A2,$002C
	dw $03A6,$002C

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

DATA_81E95C:
	dw DATA_81AAE4
	dw DATA_81AB12
	dw DATA_81E96E
	dw DATA_81E970
	dw DATA_81AACC
	dw DATA_81AAFA
	dw DATA_81AB12
	dw DATA_81AB1C
	dw DATA_81E976

DATA_81E96E:
	dw $8000

DATA_81E970:
	dw $0022,$0001,$8000

DATA_81E976:
	dw $003A,$0004,$8000

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

DATA_81E97C:
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Beach
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Bridge
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Columns
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Log Falls
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Rickety Bridge
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Crazy Cradles
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Blind Leap
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Cotton Island Bobbins Bros
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Garlen Beach
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicSleepyDale	; Akrillic Sleepy Dale
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicSleepyDale	; Akrillic Plok's House
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Mace Cove
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Fool's Gap
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Zig Zag
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Sponge Rocks
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Swifty Peaks
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Log Trail
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Crouch Hill
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; Legacy Island Bobbins Bros
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicSleepyDale	; Akrillic Plok Town
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic The Penkinos
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Venge Thicket
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Dreamy Cove
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicCreepyForest	; Akrillic Creepy Forest
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicCreepyForest	; Akrillic Womack Spider
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Creepy Crag
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Gohome Cavern
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Crashing Rocks
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Rockyfella
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Brendammi Bog (cut level)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Badream Fens (cut level)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Akrillic Breezy Beach (cut level)
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! Cycling Clever
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! Road Hogging
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! High Flying
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! Easy Riding
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! In A Spin!
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! Real Rumblings
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! Silent Running
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Fleapit! The Flea Queen
	dl PLOK_UncompressedGFX_AnimatedTiles_Fleapit			; Test Drive Secret Warp! (Costume/vehicle test level)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicSleepyDale	; Test Drive Sleepy Dale (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicSleepyDale	; Test Drive Plok Town (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive The Penkinos (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Venge Thicket (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Dreamy Cove (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Creepy Forest (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Womack Spider (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Creepy Crag (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Gohome Cavern (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Crashing Rocks (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Rockyfella (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Brendammi Bog (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Badream Fens (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach	; Test Drive Breezy Beach (unused level ID)
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; ???
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; ???
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; ???
	dl PLOK_UncompressedGFX_AnimatedTiles_CottonIsland		; ???

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

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

DATA_81EA39:
	dw $0EE7,$0059,$0000,$0000,$1305,$0360,$0000,$0000
	dw $0D3E,$0070,$0000,$0000,$1000,$04E0,$0000,$0000
	dw $0000,$0000,$0000,$0000,$1020,$0048,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$1020,$0048
	dw $0000,$0000,$0000,$0000,$17E6,$03A0,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$1F20,$0260
	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,$1020,$0048,$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

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

DATA_81EB15:
	dw $0A80,$0380,$0070,$04B0,$0070,$0330,$0070,$04B0
	dw $0900,$0410,$0070,$04B0,$00B0,$04D0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0FA4,$0000
	dw $0070,$04B0,$0070,$0380,$0070,$0310,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0080,$01D0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0
	dw $0070,$04B0,$0070,$04B0,$0070,$04B0,$0070,$04B0

DATA_81EBF5:
	dw $0A70,$0EC0,$0010,$0390,$FFFF,$0000,$FFFF,$0000
	dw $0070,$12C0,$0300,$0370,$FFFF,$0000,$04A0,$0500
	dw $08F0,$0D20,$0010,$0430,$FFFF,$0000,$FFFF,$0000
	dw $0070,$0FC0,$048F,$04FF,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$04A0,$0500,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$04A0,$0500,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$0F68,$0FE4,$0040,$02F0
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$0370,$03D0
	dw $0080,$1760,$02E0,$0310,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$0070,$1E80,$0180,$01F0
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000	
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000
	dw $FFFF,$0000,$FFFF,$0000,$FFFF,$0000,$FFFF,$0000

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

; Note: This seems like the table controlling what levels send you where after beating a bonus stage.

DATA_81EDB5:
	dw !Define_PLOK_LevelID_CottonIslandCrazyCradles	; Cotton Island Beach
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Cotton Island Bridge
	dw !Define_PLOK_LevelID_CottonIslandBlindLeap		; Cotton Island Columns
	dw !Define_PLOK_LevelID_CottonIslandRicketyBridge	; Cotton Island Log Falls
	dw !Define_PLOK_LevelID_CottonIslandBobbinsBros		; Cotton Island Rickety Bridge
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Cotton Island Crazy Cradles
	dw !Define_PLOK_LevelID_AkrillicPloksHouse		; Cotton Island Blind Leap
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Cotton Island Bobbins Bros
	dw !Define_PLOK_LevelID_AkrillicSleepyDale		; Akrillic Garlen Beach
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Sleepy Dale
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Plok's House
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Legacy Island Mace Cove
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Legacy Island Fool's Gap
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Legacy Island Zig Zag
	dw !Define_PLOK_LevelID_LegacyIslandLogTrail		; Legacy Island Sponge Rocks
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Legacy Island Swifty Peaks
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Legacy Island Log Trail
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Legacy Island Crouch Hill
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Legacy Island Bobbins Bros
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Plok Town
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic The Penkinos
	dw !Define_PLOK_LevelID_AkrillicDreamyCove		; Akrillic Venge Thicket
	dw !Define_PLOK_LevelID_AkrillicWomackSpider		; Akrillic Dreamy Cove
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Creepy Forest
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Womack Spider
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Creepy Crag
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Gohome Cavern
	dw !Define_PLOK_LevelID_FleapitHighFlying		; Akrillic Crashing Rocks
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Rockyfella
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! Cycling Clever
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! Road Hogging
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! High Flying
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! Easy Riding
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! In A Spin!
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! Real Rumblings
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! Silent Running
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Fleapit! The Flea Queen
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_LevelID_CottonIslandBeach		; ???

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

DATA_81EE25:
	dw $09C4,$0001,$0352,$07A8,$09C4,$0001,$04B0,$0001
	dw $0730,$0001,$0190,$0001,$0001,$0001,$07A8,$0001
	dw $0001,$0001,$0001,$0190,$0001,$07A8,$06EA,$0001
	dw $0001,$0001,$0001,$0645,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$094C,$0001,$0001,$0001,$0001
	dw $0D20,$0001,$0190,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001

DATA_81EE95:
	dw $0005,$0000,$0004,$0000,$0003,$0000,$0001,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0001,$0000
	dw $0000,$0000,$0000,$0004,$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

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

DATA_81EF05:
	dw $4C2C,$2087,$8859,$4828,$2090,$8859,$442A,$2080
	dw $8859,$4020,$2090,$8859,$5920,$2088,$8859,$5920
	dw $2088,$8859,$5920,$2088,$8859,$4828,$2088,$8859
	dw $5920,$2088,$8859,$5920,$2988,$8347,$5920,$2088
	dw $8859,$4C20,$2080,$8859,$5920,$2088,$8859,$5920
	dw $3088,$8040,$5920,$2088,$8859,$5920,$2088,$8859
	dw $5920,$2088,$8859,$5920,$2088,$8859,$5920,$2088
	dw $8859,$5920,$2088,$8859,$5920,$2088,$8859,$5920
	dw $2088,$8859,$5920,$2088,$8859,$5920,$2088,$8859
	dw $5920,$2088,$8859,$5920,$2088,$8859,$5920,$2088
	dw $8859,$5920,$2088,$8859

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

DATA_81EFAD:
	dw $0002,$0043,$0044,$0045,$0000,$0000,$8000,$0000
	dw $0001

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

DATA_81EFBF:
	dw $0184,$0188,$0184,$0184,$018C,$0190,$0194,$0184
	dw $0190,$0190,$0184,$042A,$0430,$0432,$0430,$042C
	dw $0430,$0430,$0434,$0190,$0190,$0190,$0190,$0190
	dw $0190,$0190,$0190,$0190,$0190,$0190,$0190,$0190
	dw $0184,$0184,$0184,$0184,$0184,$0184,$0184,$0184
	dw $0184,$0184,$0184,$0184,$0184,$0184,$0184,$0184
	dw $0184,$0184,$0184,$0184,$0184,$0184,$0184,$0184

DATA_81F02F:
	dw $0428,$042E,$0432,$042E,$0428,$042E,$042E,$0434

DATA_81F03F:
	dw $FFF8,$FFF8,$FFFC,$FFFE,$FFFF,$0000,$0001,$0002
	dw $0004,$0004,$0006,$0006

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

DATA_81F057:
	dw $FFFA,$FFFC,$FFFE,$FFFF,$0000,$0001,$0002,$0003
	dw $0004,$0005,$0006

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

DATA_81F06D:
	dw $FFFF,$FFFF,$FFFF,$FFFE,$FFFD,$FFFC,$FFFB,$FFFA

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

DATA_81F07D:
	dw $0020,$041A,$000A,$0020,$041C,$0006,$0004,$041E
	dw $000A,$0004,$0420,$000A,$0004,$041E,$000A,$0004
	dw $0420,$000A,$0004,$041E,$000A,$0004,$0420,$000A
	dw $0004,$041E,$000A,$0004,$0420,$000A,$0004,$041E
	dw $000A,$0004,$0420,$000A,$0004,$041E,$000A,$0004
	dw $0420,$000A,$0002,$041E,$000A,$0002,$0420,$000A
	dw $0002,$041E,$000A,$0002,$0420,$000A,$0010,$0422
	dw $0002,$0010,$0424,$0002,$000A,$0426,$0002,$0004
	dw $0426,$0000,$0010,$0426,$000A,$00E8,$0426,$000A

DATA_81F10D:
	dw $0020,$041A,$000A,$0020,$041C,$0006,$0004,$041E
	dw $000A,$0004,$0420,$000A,$0004,$041E,$000A,$0004
	dw $0420,$000A,$0004,$041E,$000A,$0004,$0420,$000A
	dw $0004,$041E,$000A,$0004,$0420,$000A,$0004,$041E
	dw $000A,$0004,$0420,$000A,$0004,$041E,$000A,$0004
	dw $0420,$000A,$0002,$041E,$000A,$0002,$0420,$000A
	dw $0002,$041E,$000A,$0002,$0420,$000A,$0010,$0422
	dw $0002,$0010,$0424,$0002,$000A,$0426,$0002,$002C
	dw $0426,$0000,$0010,$0426,$0008,$00E8,$0426,$0008

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

DATA_81F19D:
	dw $0028,$0000,$0000,$0008,$0440,$0000,$0032,$0442
	dw $000A,$0008,$0444,$000A,$0018,$0442,$000A,$0028
	dw $0444,$000A,$0014,$0442,$000A,$001E,$0444,$000A
	dw $000C,$0442,$000A,$0014,$0444,$000A,$0008,$0442
	dw $000A,$0008,$0444,$000A,$0008,$0442,$000A,$0008
	dw $0444,$000A,$0008,$0446,$000A,$0008,$0448,$000A
	dw $0008,$044A,$000A,$0008,$044C,$000A,$004E,$00E2
	dw $000A,$0096,$00E2,$000A,$003C,$00E2,$000A,$0008
	dw $044E,$000A,$0020,$0450,$0002,$0050,$0452,$0002
	dw $005A,$0452,$0002,$0008,$0454,$0006,$0008,$0456
	dw $0006,$0008,$0454,$0006,$0008,$0456,$0006,$0008
	dw $0454,$0006,$0008,$0456,$0006,$0008,$0454,$0006
	dw $0008,$0456,$0006,$0008,$0454,$0006,$0008,$0456
	dw $0006,$0008,$0454,$0006,$0008,$0456,$0006

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

DATA_81F27B:
	dw $041E,$0138,$0413,$0130,$040C,$0138,$0413,$0130
	dw $041E,$0138,$0426,$0130,$042E,$0138,$0426,$0130
	dw $041E,$0138,$0413,$0130,$040C,$0138,$0413,$0130
	dw $041E,$0138,$0426,$0130,$042E,$0138,$0426,$0130

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

DATA_81F2BB:
	dw $0004,$0004,$0004,$0004,$0004,$0004,$0004,$0006
	dw $0006,$0006,$0006,$0004,$0004,$0004,$0004,$0004
	dw $0004,$0004,$0006,$0006,$0006,$0006,$0006,$0006
	dw $0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dw $0004,$0004,$0004,$0004,$0004,$0004,$0004,$0006
	dw $0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dw $0006,$0006,$0006,$0006,$0006,$0006,$0006

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

DATA_81F329:
	dw $0000,$0400,$0800,$0C00,$1000,$1400,$1800,$1C00
	dw $2000,$2000,$1C00,$3000,$3000,$3400,$3400,$3800
	dw $3800,$3800,$3C00,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $0000,$0400,$0800,$0C00,$1000,$1400,$1800,$1C00
	dw $1C00,$1C00,$1C00,$1C00,$1C00,$1C00,$1C00,$1C00
	dw $1C00,$1C00,$1C00,$1C00,$1C00,$1C00,$1C00

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

DATA_81F397:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$6401
	dw $7001,$6001,$0801,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$9601,$5001,$A001,$5001,$7801,$7001
	dw $9001,$5801,$7001,$4001,$6001,$8001,$8001,$8001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$8001
	dw $7001,$7801,$4801,$A001,$8001,$0000,$0000,$8001
	dw $8001,$0000,$0000,$0000,$8001,$0000,$0000,$0000

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

DATA_81F407:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$2664
	dw $2E62,$2E62,$2E62,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$2664,$2E62,$2666,$2E62,$2E62,$2E62
	dw $2668,$2E62,$2E62,$2E62,$266A,$2E62,$2E62,$2E62
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$2E6C
	dw $2664,$2E62,$2E62,$2E62,$2664,$2660,$2660,$2660
	dw $2660,$2660,$2660,$2660,$2660,$2660,$2660,$2660
	dw $2660

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

DATA_81F479:
	dw $5C68,$5C8C,$5CCE,$5D0C,$5D28,$5D04,$5CC2,$5C84

DATA_81F489:
	dw $2E2A,$2E2C,$2E2E,$AE2C,$AE2A,$EE2C,$EE2E,$6E2C

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

DATA_81F499:
	dw $0000,$0005,$0001,$0003,$0004,$0002,$0007,$0006
	dw $0008

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

DATA_81F4AB:
	dw $0084,$007C,$0078,$0076

DATA_81F4B3:
	dw $000C,$0006,$FFF4,$FFFC

DATA_81F4BB:
	dw $0008,$0008,$0012,$0012

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

DATA_81F4C3:
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0012,$0042,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$000A,$0012,$004A,$0002,$0002
	dw $0002,$0062,$0022,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0012,$0042,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0002

DATA_81F535:
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81F5A7
	dw DATA_81F5B9
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81F5FB
	dw DATA_81F605
	dw DATA_81F617
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81F661
	dw DATA_81F6C3
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81F5A7
	dw DATA_81F5B9
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC
	dw DATA_81D7AC

DATA_81F5A7:
	dw $6560,$0154,$0390,$000A,$172C,$08F4,$00E0,$800C
	dw $FFFF

DATA_81F5B9:
	dw $29A2,$0534,$04A0,$800F,$23F6,$0534,$04A0,$800E
	dw $2A6C,$0604,$04A0,$800D,$6022,$0604,$04A0,$800C
	dw $6E3E,$0534,$04A0,$800B,$556A,$0534,$04A0,$800A
	dw $18AC,$0604,$04A0,$8009,$6160,$0604,$04A0,$8008
	dw $FFFF

DATA_81F5FB:
	dw $6A58,$00D4,$02D0,$8006,$FFFF

DATA_81F605:
	dw $0A4A,$01D4,$00D0,$000F,$0A64,$01D4,$00D0,$000E
	dw $FFFF

DATA_81F617:
	dw $7890,$04D4,$02B0,$000F,$5FD4,$0684,$0210,$800E
	dw $7B72,$07F4,$02E0,$000D,$5DD2,$0AA4,$01C0,$800C
	dw $6F8C,$0BD4,$02E0,$000B,$4CD2,$0DD4,$0210,$800A
	dw $72C8,$11D4,$02E0,$0009,$4FCC,$11D4,$02E0,$0008
	dw $36DE,$11D4,$02E0,$0007,$FFFF

DATA_81F661:
	dw $1A70,$0364,$0160,$800F,$43E0,$0364,$0160,$800E
	dw $6D50,$0364,$0160,$800D,$95F0,$0364,$0160,$800C
	dw $0C60,$00C4,$00D0,$800B,$35D4,$00A4,$0400,$800A
	dw $364C,$00A4,$0400,$8009,$5F48,$00A4,$0400,$8008
	dw $5FB8,$00A4,$0400,$8007,$87EC,$0614,$0A50,$8006
	dw $8854,$0614,$0A50,$8005,$B1C4,$05A4,$0DA0,$8004
	dw $FFFF

DATA_81F6C3:
	dw $1A1A,$1654,$0360,$800F,$1A26,$1654,$0360,$800E
	dw $6E76,$0AA4,$01E0,$800D,$6EBA,$0AA4,$01E0,$800C
	dw $FFFF

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

	%DATATABLE_RT00_PLOK_UnsortedData(NULLROM)				; $81F6E5

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

%BANK_END(<EndBank>)
endmacro

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

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

if !Define_PLOK_Global_DisableCopyDetection == !FALSE
if !Define_Global_SRAMSize > !SRAMSize_0KB
warn "Using a non-zero SRAM size without disabling the copy detection in the ROM Map file of this ROM version is going to make this ROM unplayable. Are you sure that's what you wanted?"
endif

CODE_828000:
	PHP
	REP.b #$30
	STA.l !SRAMBankBaseAddress+!SRAMBankEnd
	CMP.l !SRAMBankBaseAddress+!SRAMBankEnd
	BNE.b CODE_82801D
	INC
	STA.l !SRAMBankBaseAddress+!SRAMBankEnd
	CMP.l !SRAMBankBaseAddress+!SRAMBankEnd
	BNE.b CODE_82801D
	PHA
	PHA
	PHA
	BRA.b CODE_82801F

CODE_82801D:
	PLP
	RTL

CODE_82801F:
	JML.l CODE_80DC4C
endif

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

CODE_828023:
	REP.b #$30
	STZ.w $0EC0
	STZ.w $0EC2
	STZ.w $0EC4
	STZ.w $0EC6
	STZ.w $0EC8
	RTL

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

CODE_828035:
	REP.b #$30
	JSL.l CODE_828023
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81EE25,x
	STA.b $38
CODE_828045:
	CMP.w #$1770
	BCC.b CODE_828053
	SEC
	SBC.w #$1770
	INC.w $0EC8
	BRA.b CODE_828045

CODE_828053:
	CMP.w #$0258
	BCC.b CODE_828061
	SEC
	SBC.w #$0258
	INC.w $0EC6
	BRA.b CODE_828053

CODE_828061:
	CMP.w #$003C
	BCC.b CODE_82806F
	SEC
	SBC.w #$003C
	INC.w $0EC4
	BRA.b CODE_828061

CODE_82806F:
	RTL

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

CODE_828070:
	REP.b #$30
	LDA.w $0EC0
	INC
	CMP.w #$0006
	BCC.b CODE_828081
	DEC.w $0EC2
	LDA.w #$0000
CODE_828081:
	STA.w $0EC0
	LDX.w #$0000
CODE_828087:
	LDA.w $0EC2,x
	BPL.b CODE_82809E
	LDA.w #$0009
	STA.w $0EC2,x
	INX
	INX
	CPX.w #$0008
	BCS.b CODE_82809F
	DEC.w $0EC2,x
	BRA.b CODE_828087

CODE_82809E:
	RTL

CODE_82809F:
	STZ.w $0EC2
	STZ.w $0EC4
	STZ.w $0EC6
	STZ.w $0EC8
	RTL

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

CODE_8280AC:
	REP.b #$30
	STZ.b $38
	LDA.w #$5D85
	STA.w !REGISTER_VRAMAddressLo
	LDX.w #$0008
CODE_8280B9:
	LDA.w $0EC0,x
	BNE.b CODE_8280CC
	LDY.b $38
	BNE.b CODE_8280CC
	CPX.w #$0004
	BEQ.b CODE_8280CC
	LDA.w #$2180
	BRA.b CODE_8280D6

CODE_8280CC:
	ASL
	TAY
	INC.b $38
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_DATA_81B0FC,y
	ORA.w #$2000
CODE_8280D6:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	DEX
	CPX.w #$0004
	BCS.b CODE_8280B9
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w #$2180
else
	LDA.w #$2224
endif
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w $0EC2
	ASL
	TAY
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_DATA_81B0FC,y
	ORA.w #$2000
	STA.w !REGISTER_WriteToVRAMPortLo
	RTL

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

CODE_8280F5:
	REP.b #$30
	STZ.b $38
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	LDA.w #$5D24
else
	LDA.w #$5D04
endif
	STA.w !REGISTER_VRAMAddressLo
	LDX.w #$0008
CODE_828102:
	LDA.w $0EC0,x
	BNE.b CODE_828115
	LDY.b $38
	BNE.b CODE_828115
	CPX.w #$0002
	BEQ.b CODE_828115
	LDA.w #$2580
	BRA.b CODE_82811F

CODE_828115:
	ASL
	TAY
	INC.b $38
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_DATA_81B0FC,y
	ORA.w #$2400
CODE_82811F:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEX
	DEX
	CPX.w #$0002
	BCS.b CODE_828102
	LDA.w #$2582
	STA.w !REGISTER_WriteToVRAMPortLo
	STA.w !REGISTER_WriteToVRAMPortLo
	RTL

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

CODE_828133:
	REP.b #$30
	LDA.w #$5DA1
	STA.w !REGISTER_VRAMAddressLo
	LDA.b $09
	AND.w #$00FF
	CMP.w #$00C0
	BCC.b CODE_82814A
	LDA.w #$2628
	BRA.b CODE_82814D

CODE_82814A:
	LDA.w #$2660
CODE_82814D:
	STA.w !REGISTER_WriteToVRAMPortLo
	RTL

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

CODE_828151:
	REP.b #$30
	PHX
	LDA.b !RAM_PLOK_UnknownRAM000092
	BEQ.b CODE_828164
	DEC.b !RAM_PLOK_UnknownRAM000092
	LDA.b !RAM_PLOK_UnknownRAM000092
	AND.w #$0003
	ASL
	TAX
	LDA.w DATA_81DDAE,x
CODE_828164:
	STA.b !RAM_PLOK_UnknownRAM000090
	PLX
	RTL

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

CODE_828168:
	PHP
	REP.b #$20
	STZ.w $067D
	LDA.w #DATA_8282FA
	STA.w HDMA[$07].SourceLo
	SEP.b #$20
	LDA.b #!REGISTER_Window1LeftPositionDesignation
	STA.w HDMA[$07].Destination
	LDA.b #$41
	STA.w HDMA[$07].Parameters
	LDA.b #DATA_8282FA>>16
	STA.w HDMA[$07].SourceBank
	LDA.b #$7E
	STA.w HDMA[$07].IndirectSourceBank
	JSL.l CODE_809FE0
	JSL.l CODE_8281B5
	JSL.l CODE_8281B5
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.w $067F
	STA.w !REGISTER_BG1And2WindowMaskSettings
	LDA.w $0680
	STA.w !REGISTER_BG3And4WindowMaskSettings
	LDA.w $0681
	STA.w !REGISTER_ObjectAndColorWindowSettings
	LDA.b #$80
	STA.w !REGISTER_HDMAEnable
	PLP
	RTL

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

CODE_8281B5:
	PHP
	REP.b #$30
	LDA.w $0678
	ASL
	CLC
	ADC.w $0678
	TAX
	LDA.w DATA_81E785+$01,x
	STA.b $06
	SEP.b #$20
	LDA.w DATA_81E785,x
	STA.b $08
	REP.b #$20
	LDA.w #DATA_8282FA
	STA.w DMA[$07].SourceLo
	LDX.w #$0406
	LDA.w $067D
	INC
	AND.w #$0001
	STA.w $067D
	BEQ.b CODE_8281ED
	LDA.w #DATA_828301
	STA.w DMA[$07].SourceLo
	LDX.w #$01FE
CODE_8281ED:
	LDY.w #$00FF
	LDY.w #$00FF
	LDA.w #$8081
CODE_8281F6:
	STA.l $7E2800,x
	DEX
	DEX
	DEY
	BPL.b CODE_8281F6
	SEP.b #$20
	LDX.w #$0000
	LDY.w #$0000
	STZ.w $067C
CODE_82820A:
	REP.b #$20
	LDA.w $0676
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	SEP.b #$20
	LDA.b #$00
	XBA
	LDA.w $067C
	CMP.b #$40
	BCS.b CODE_82822C
	LDA.b #$40
	SEC
	SBC.w $067C
	BRA.b CODE_82822F

CODE_82822C:
	SEC
	SBC.b #$40
CODE_82822F:
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w $067C
	CMP.b #$40
	BCS.b CODE_828246
	LDA.w $067B
	SEC
	SBC.w !REGISTER_PPUMultiplicationProductMid
	BCS.b CODE_828253
	LDA.b #$00
	BRA.b CODE_828253

CODE_828246:
	LDA.w $067B
	CLC
	ADC.w !REGISTER_PPUMultiplicationProductMid
	BCC.b CODE_828253
	INY
	JMP.w CODE_8282DB

CODE_828253:
	REP.b #$20
	ASL
	TAX
	LDA.w $067D
	BNE.b CODE_828262
	TXA
	CLC
	ADC.w #$0208
	TAX
CODE_828262:
	LDA.w $0676
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	SEP.b #$20
	LDA.b [$06],y
	BMI.b CODE_828284
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductMid
	CLC
	ADC.w $067A
	BCC.b CODE_828295
	LDA.b #$FF
	BRA.b CODE_828295

CODE_828284:
	EOR.b #$FF
	INC
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w $067A
	SEC
	SBC.w !REGISTER_PPUMultiplicationProductMid
	BCS.b CODE_828295
	LDA.b #$00
CODE_828295:
	STA.l $7E2800,x
	STA.l $7E2802,x
	STA.l $7E2804,x
	STA.l $7E2806,x
	INY
	LDA.b [$06],y
	BMI.b CODE_8282BA
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w !REGISTER_PPUMultiplicationProductMid
	CLC
	ADC.w $067A
	BCC.b CODE_8282CB
	LDA.b #$FF
	BRA.b CODE_8282CB

CODE_8282BA:
	EOR.b #$FF
	INC
	STA.w !REGISTER_Mode7MatrixParameterB
	LDA.w $067A
	SEC
	SBC.w !REGISTER_PPUMultiplicationProductMid
	BCS.b CODE_8282CB
	LDA.b #$00
CODE_8282CB:
	STA.l $7E2801,x
	STA.l $7E2803,x
	STA.l $7E2805,x
	STA.l $7E2807,x
CODE_8282DB:
	INC.w $067C
	INY
	CPY.w #$0100
	BCS.b CODE_8282E7
	JMP.w CODE_82820A

CODE_8282E7:
	REP.b #$20
	LDA.w #$8081
	STA.l $7E2802,x
	STA.l $7E2804,x
	STA.l $7E2806,x
	PLP
	RTL

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

DATA_8282FA:
	db $FF : dw $7E2800
	db $FF : dw $7E28FE
	db $00

DATA_828301:
	db $FF : dw $7E2A08
	db $FF : dw $7E2B06
	db $00

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

CODE_828308:
	REP.b #$30
	PHA
	AND.w #$00F0
	LSR
	LSR
	LSR
	LSR
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_DATA_81B0FC,x
	ORA.w #$2C00
	STA.w !REGISTER_WriteToVRAMPortLo
	PLA
	AND.w #$000F
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_DATA_81B0FC,x
	ORA.w #$2C00
	STA.w !REGISTER_WriteToVRAMPortLo
	RTS

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

CODE_82832D:
	REP.b #$30
	LDY.w #!Define_PLOK_Music_RocketeerPlok
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	STZ.w $0DAA
	STZ.w $1800
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_GFX_EndCreditsScreen
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_EndingCreditsScreenBG
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_EndingCreditsScreen
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_SmallLetters
	JSL.l CODE_87E000
	RTL

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

CODE_82837E:
	REP.b #$30
	LDY.w #!Define_PLOK_Music_CowboyPlok
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	JSL.l CODE_87E000
	LDA.w #$0001
	JSL.l CODE_80FD72
	STZ.w $0DAA
	STZ.w $1800
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_GFX_FinalScoreScreenPlok
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_FinalScoreScreenPlok
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_FinalScoreScreen
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_GrandpappyHUD
	JSL.l CODE_87E000
	RTL

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

CODE_8283CF:
	REP.b #$30
	LDA.w $0848
	ASL
	ASL
	TAY
	LDA.w DATA_81818C+$02,y
	CLC
	ADC.w #$0017
	STA.w $0C16
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_8283F8
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_8283F8
	LDA.w DATA_81818C+$02,y
	CLC
	ADC.w #$0038
	STA.w $0C16
CODE_8283F8:
	LDA.w DATA_81818C,y
	STA.w $0C14
	STZ.w $0EBC
	STZ.b $38
	LDA.b $00,x
	CMP.w $0C14
	BCC.b CODE_828418
	SEC
	SBC.w $0C14
	STA.w $0C14
	LDA.w #$4000
	STA.b $38
	BRA.b CODE_828421

CODE_828418:
	LDA.w $0C14
	SEC
	SBC.b $00,x
	STA.w $0C14
CODE_828421:
	LDA.b $02,x
	CMP.w $0C16
	BCC.b CODE_828438
	SEC
	SBC.w $0C16
	STA.w $0C16
	LDA.b $38
	ORA.w #$8000
	STA.b $38
	BRA.b CODE_828441

CODE_828438:
	LDA.w $0C16
	SEC
	SBC.b $02,x
	STA.w $0C16
CODE_828441:
	LDA.w $0C14
	CMP.w $0C16
	BCC.b CODE_828457
	ORA.w #$8000
	STA.w $0EB8
	LDA.w $0C16
	STA.w $0EBA
	BRA.b CODE_828460

CODE_828457:
	STA.w $0EBA
	LDA.w $0C16
	STA.w $0EB8
CODE_828460:
	LDA.b $38
	STA.w $0EBE
	RTL

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

CODE_828466:
	REP.b #$30
	LDA.b $09
	AND.w #$001F
	BNE.b CODE_82849E
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	LDA.w #$F830
	STA.w $0C20
	STZ.w $0C22
	LDA.w #$0064
	STA.w $0C24
	LDA.w #$0040
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
CODE_82849E:
	LDA.w $0EB8
	BPL.b CODE_8284A8
	JSR.w CODE_8284E3
	BRA.b CODE_8284AB

CODE_8284A8:
	JSR.w CODE_8284D5
CODE_8284AB:
	LDA.w $0EB8
	AND.w #$7FFF
	STA.b $38
	LDA.w $0EBC
	CLC
	ADC.w $0EBA
	CMP.b $38
	BCC.b CODE_8284D1
	SEC
	SBC.b $38
	STA.w $0EBC
	LDA.w $0EB8
	BPL.b CODE_8284CD
	JSR.w CODE_8284D5
	RTL

CODE_8284CD:
	JSR.w CODE_8284E3
	RTL

CODE_8284D1:
	STA.w $0EBC
	RTL

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

CODE_8284D5:
	LDA.w $0EBE
	AND.w #$8000
	BEQ.b CODE_8284E0
	DEC.b $02,x
	RTS

CODE_8284E0:
	INC.b $02,x
	RTS

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

CODE_8284E3:
	LDA.w $0EBE
	AND.w #$4000
	BEQ.b CODE_8284EE
	DEC.b $00,x
	RTS

CODE_8284EE:
	INC.b $00,x
	RTS

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

; Note: Copy detection routine.

if !Define_PLOK_Global_DisableCopyDetection == !FALSE
CODE_8284F1:
	PHP
	REP.b #$30
	PHA
	PHX
	LDX.w #CODE_82801D-CODE_828000
	LDA.w #$0000
CODE_8284FC:
	CLC
	ADC.l CODE_828000,x
	DEX
	BPL.b CODE_8284FC
CopyDetectionChecksum:
	CMP.w #$32C7
	BEQ.b CODE_828510
CODE_828509:
	PHA
	PHA
	PHA
	JML.l CODE_80DC4C

CODE_828510:
	LDA.l DATA_809FF3
	CMP.w #(CODE_828000<<8)|$0022
	BNE.b CODE_828509
	LDA.l DATA_809FF3+$02
	CMP.w #CODE_828000>>8
	BNE.b CODE_828509
	PLX
	PLA
	PLP
	RTL
endif

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

CODE_828526:
	REP.b #$30
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81F397,x
	STA.w $076A
	BEQ.b CODE_828546
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandBobbinsBros
	BEQ.b CODE_828542
	CMP.w #!Define_PLOK_LevelID_CottonIslandBobbinsBros
	BNE.b CODE_828546
CODE_828542:
	JSL.l CODE_80A146
CODE_828546:
	LDA.w $076A
	XBA
	AND.w #$00FF
	STA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	SEP.b #$20
	LDA.b #(PLOK_LevelSpriteDataSize>>16)&$7F
	PHA
	PLB
	REP.b #$20
	LDA.w $0848
	ASL
	TAY
	LDA.w PLOK_LevelSpriteDataSize,y
	SEC
	SBC.w #$0002
	TAX
	LDA.w PLOK_LevelSpriteDataPtrs,y
	STA.b $06
	LDA.w #$FFFF
	STA.l $7F0000,x
	DEX
	DEX
CODE_828573:
	LDA.w $076E
	BNE.b CODE_8285B3
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCS.b CODE_8285B3
	TXA
	SEC
	SBC.w #$0002
	TAY
	LDA.b ($06),y
	CMP.w #$0000
	BNE.b CODE_8285B3
	PHX
	TXA
	SEC
	SBC.w #$0006
	TAX
	LDA.l $7F0000,x
	BPL.b CODE_8285B2
	PLX
	TXA
	SEC
	SBC.w #$0006
	TAX
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	SEC
	SBC.w #$0008
	STA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	LDA.w #$FFFF
	STA.b $38
	BRA.b CODE_8285BF

CODE_8285B2:
	PLX
CODE_8285B3:
	LDA.w #$0003
	STA.b $38
CODE_8285B8:
	TXY
	LDA.b ($06),y
	STA.l $7F0000,x
CODE_8285BF:
	DEX
	DEX
	DEC.b $38
	BPL.b CODE_8285B8
	TXA
	BPL.b CODE_828573
	SEP.b #$20
	LDA.b #$01
	PHA
	PLB
	REP.b #$20
	LDX.w #$009E
CODE_8285D3:
	STZ.w $1020,x
	DEX
	DEX
	BPL.b CODE_8285D3
	LDX.w #$0000
CODE_8285DD:
	LDA.l $7F0004,x
	CMP.w #$0000
	BNE.b CODE_8285FC
	LDY.w #$0003
CODE_8285E9:
	LDA.l $7F0000,x
	BPL.b CODE_8285F2
	LDA.w #$0000
CODE_8285F2:
	STA.w $1020,x
	INX
	INX
	DEY
	BPL.b CODE_8285E9
	BRA.b CODE_8285DD

CODE_8285FC:
	JSR.w CODE_828751
	LDA.w $0848
	ASL
	TAY
	LDX.w DATA_81F4C3,y
	DEX
	DEX
	LDA.w DATA_81F535,y
	STA.b $06
CODE_82860E:
	TXY
	LDA.b ($06),y
	STA.l $7F2000,x
	DEX
	DEX
	BPL.b CODE_82860E
	LDA.w $0848
	ASL
	TAY
	LDX.w DATA_81D7AE,y
	DEX
	DEX
	LDA.w DATA_81D820,y
	STA.b $06
CODE_828628:
	TXY
	LDA.b ($06),y
	STA.l $7F1000,x
	DEX
	DEX
	BPL.b CODE_828628
	LDX.w #$0458
	LDY.w #$0068
CODE_828639:
	LDA.w #$FFFF
	STA.b $00,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_828639
	REP.b #$30
	LDA.w $0848
	ASL
	ASL
	TAY
	LDA.w DATA_81818C,y
	LDX.w #$061A
	STA.b $00,x
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_82867A
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_82867A
	LDA.w DATA_81818C+$02,y
	CLC
	ADC.w #$0038
	STA.b $02,x
	LDA.w #$013A
	STA.b $04,x
	LDA.w #$2C00
	STA.b $06,x
	BRA.b CODE_8286D0

CODE_82867A:
	LDA.w DATA_81818C+$02,y
	CLC
	ADC.w #$0017
	STA.b $02,x
	LDA.w #$013A
	STA.b $04,x
	LDA.w #$2C00
	STA.b $06,x
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_CottonIslandBobbinsBros
	BNE.b CODE_82869C
	LDA.w #$FFFF
	STA.b $00,x
	BRA.b CODE_8286D0

CODE_82869C:
	LDA.w !RAM_PLOK_Level_CurrentEnemyHPLo
	BEQ.b CODE_8286D0
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	BCC.b CODE_8286D0
	CMP.w #!Define_PLOK_LevelID_AkrillicPloksHouse
	BNE.b CODE_8286C0
	LDA.b $02,x
	SEC
	SBC.w #$00A0
	STA.b $02,x
	LDA.b $00,x
	CLC
	ADC.w #$0018
	STA.b $00,x
	BRA.b CODE_8286D0

CODE_8286C0:
	LDA.b $02,x
	SEC
	SBC.w #$0046
	STA.b $02,x
	LDA.b $00,x
	CLC
	ADC.w #$0012
	STA.b $00,x
CODE_8286D0:
	LDX.w #$0028
CODE_8286D3:
	LDA.w DATA_818018,x
	STA.w $0ED0,x
	STA.w $0EFA,x
	STA.w $0F24,x
	STA.w $0F4E,x
	STA.w $0F78,x
	STA.w $0FA2,x
	STA.w $0FCC,x
	STA.w $0FF6,x
	DEX
	DEX
	BPL.b CODE_8286D3
	STZ.w $0A84
	STZ.w $0EB2
	STZ.w $08F6
	LDA.b !RAM_PLOK_Level_LowestCameraYPosLo
	CLC
	ADC.w #$00A0
	STA.b !RAM_PLOK_UnknownRAM000060
	STZ.w $095A
	LDA.w $0848
	ASL
	TAX
	LDA.w DATA_81813C,x
	BNE.b CODE_82871B
	INC.w $095A
	LDA.b !RAM_PLOK_UnknownRAM000060
	CLC
	ADC.w #$0050
	STA.b !RAM_PLOK_UnknownRAM000060
CODE_82871B:
	LDA.b !RAM_PLOK_UnknownRAM000060
	CLC
	ADC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000062
	LDA.b !RAM_PLOK_Level_HighestCameraYPosLo
	STA.b !RAM_PLOK_UnknownRAM000064
	LDA.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	CLC
	ADC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000066
	LDA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	CLC
	ADC.w #$0010
	STA.b !RAM_PLOK_UnknownRAM000068
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen
	BNE.b CODE_828744
	LDA.w #$0370
	STA.b !RAM_PLOK_UnknownRAM000068
CODE_828744:
	STZ.w $0A10
	STZ.w $0A0E
	LDA.w #$1388
	STA.w $0966
	RTL

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

CODE_828751:
	DEC.w $09EA
	BPL.b CODE_82875C
	LDA.w #$0708
	STA.w $09EA
CODE_82875C:
	LDA.w $09EA
	CMP.w #$00C8
	BNE.b CODE_8287D8
	STZ.w $09E8
	STZ.b $38
	STZ.b $3A
	LDX.w #$0000
CODE_82876E:
	LDA.w $1020,x
	BEQ.b CODE_8287CD
	CMP.w !RAM_PLOK_Level_Player_XPosLo
	BCC.b CODE_828788
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CMP.w #$0080
	BCC.b CODE_828796
	LDA.w #$0002
	STA.b $38
	BRA.b CODE_828796

CODE_828788:
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CMP.w #$FF80
	BCS.b CODE_828796
	LDA.w #$0004
	STA.b $38
CODE_828796:
	LDA.w $1022,x
	CMP.w !RAM_PLOK_Level_Player_YPosLo
	BCC.b CODE_8287AE
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CMP.w #$0080
	BCC.b CODE_8287BC
	LDA.w #$0002
	STA.b $3A
	BRA.b CODE_8287BC

CODE_8287AE:
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CMP.w #$FF80
	BCS.b CODE_8287BC
	LDA.w #$0004
	STA.b $3A
CODE_8287BC:
	LDA.b $38
	ASL
	CLC
	ADC.b $38
	CLC
	ADC.b $3A
	TAY
	LDA.w DATA_81F499,y
	STA.w $09E8
	RTS

CODE_8287CD:
	TXA
	CLC
	ADC.w #$0008
	TAX
	CPX.w #$00A0
	BCC.b CODE_82876E
CODE_8287D8:
	RTS

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

CODE_8287D9:
	REP.b #$30
	LDX.w #$0458
	LDY.w #$000E
CODE_8287E1:
	LDA.b $00,x
	BMI.b CODE_828802
	PHX
	LDA.w $091A,y
	ASL
	TAX
	LDA.w DATA_818684,x
	CMP.w #$0004
	BEQ.b CODE_828801
	LDX.w $090A,y
	LDA.l $7F0000,x
	AND.w #$7FFF
	STA.l $7F0000,x
CODE_828801:
	PLX
CODE_828802:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_8287E1
	RTL

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

CODE_82880D:
	REP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$0080
	SEC
	SBC.b $38
	CLC
	ADC.w #$00C0
	CMP.w #$0180
	BCS.b CODE_828831
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0080
	SEC
	SBC.b $3A
	CLC
	ADC.w #$00C0
	CMP.w #$0180
CODE_828831:
	RTS

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

CODE_828832:
	REP.b #$30
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$0080
	SEC
	SBC.b $38
	CLC
	ADC.w #$00E0
	CMP.w #$01C0
	BCS.b CODE_828856
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0080
	SEC
	SBC.b $3A
	CLC
	ADC.w #$00E0
	CMP.w #$01C0
CODE_828856:
	RTS

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

CODE_828857:
	REP.b #$30
	SEP.b #$20
	LDA.b #(PLOK_LevelSpriteDataSize>>16)&$7F
	PHA
	PLB
	REP.b #$20
	LDA.w $0848
	ASL
	TAY
	LDA.b $09
	AND.w #$0007
	XBA
	LSR
	TAX
	BEQ.b CODE_828877
	DEC
	DEC
	CMP.w PLOK_LevelSpriteDataSize,y
	BCS.b CODE_8288A8
CODE_828877:
	SEP.b #$20
	LDA.b #$01
	PHA
	PLB
	REP.b #$20
CODE_82887F:
	LDY.w #$000F
CODE_828882:
	LDA.l $7F0000,x
	CMP.w #$FFFF
	BEQ.b CODE_8288A8
	BMI.b CODE_82889F
	STA.b $38
	LDA.l $7F0002,x
	STA.b $3A
	JSR.w CODE_82880D
	BCS.b CODE_82889F
	PHX
	JSR.w CODE_8288B1
	PLX
CODE_82889F:
	TXA
	CLC
	ADC.w #$0008
	TAX
	DEY
	BPL.b CODE_828882
CODE_8288A8:
	SEP.b #$20
	LDA.b #$01
	PHA
	PLB
	REP.b #$20
	RTL

CODE_8288B1:
	REP.b #$20
	PHX
	LDX.w #$0458
	LDY.w #$000E
CODE_8288BA:
	LDA.b $00,x
	BMI.b CODE_8288CA
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_8288BA
	PLX
	RTS

CODE_8288CA:
	STX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $38
	STA.b $00,x
	LDA.b $3A
	STA.b $02,x
	LDA.w #$2000
	STA.b $06,x
	PLX
	TXA
	STA.w $090A,y
	LDA.l $7F0006,x
	STA.w $092A,y
	LDA.l $7F0000,x
	ORA.w #$8000
	STA.l $7F0000,x
	LDA.w #$0000
	STA.w $093A,y
	LDA.l $7F0004,x
	STA.w $091A,y
	ASL
	TAX
	JMP.w (DATA_828902,x)

DATA_828902:
	dw CODE_828A66
	dw CODE_828CBE
	dw CODE_828D3D
	dw CODE_828CAD
	dw CODE_828ACF
	dw CODE_828A62
	dw CODE_828B00
	dw CODE_828B06
	dw CODE_828B63
	dw CODE_828CFA
	dw CODE_828B88
	dw CODE_828C04
	dw CODE_828C29
	dw CODE_828AB2
	dw CODE_828C52
	dw CODE_828C6E
	dw CODE_828C7F
	dw CODE_828C8F
	dw CODE_828DE0
	dw CODE_828B88
	dw CODE_828BB2
	dw CODE_828BB2
	dw CODE_828B97
	dw CODE_828BBA
	dw CODE_828CFA
	dw CODE_828A62
	dw CODE_828D60
	dw CODE_828CAB
	dw CODE_828AA4
	dw CODE_828CE7
	dw CODE_828A62
	dw CODE_828D8A
	dw CODE_828CAB
	dw CODE_828B88
	dw CODE_828B24
	dw CODE_828B4A
	dw CODE_828A62
	dw CODE_828BE2
	dw CODE_828CC8
	dw CODE_828B57
	dw CODE_828B57
	dw CODE_828B57
	dw CODE_828B57
	dw CODE_828B57

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

DATA_82895A:
	dw CODE_828F79
	dw CODE_829368
	dw CODE_829474
	dw CODE_829722
	dw CODE_829818
	dw CODE_82A903
	dw CODE_8298A6
	dw CODE_8298F7
	dw CODE_829A59
	dw CODE_82A7C1
	dw CODE_829E8B
	dw CODE_82AB99
	dw CODE_82AD88
	dw CODE_82AE57
	dw CODE_82B02A
	dw CODE_82B105
	dw CODE_82B1DD
	dw CODE_82B329
	dw CODE_82B4A7
	dw CODE_82AA32
	dw CODE_82AA52
	dw CODE_82AA85
	dw CODE_82AA42
	dw CODE_82A9E9
	dw CODE_82A80E
	dw CODE_82A8E8
	dw CODE_82AC9D
	dw CODE_8293F0
	dw CODE_82AEE4
	dw CODE_829F61
	dw CODE_82A06A
	dw CODE_82A06A
	dw CODE_829C61
	dw CODE_829EEF
	dw CODE_829C9D
	dw CODE_829C69
	dw CODE_829454
	dw CODE_82A2EA
	dw CODE_82A4C5
	dw CODE_829D3B
	dw CODE_829DAB
	dw CODE_829DDB
	dw CODE_829E37
	dw CODE_829E44

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

DATA_8289B2:
	dw CODE_82B833
	dw CODE_828A62
	dw CODE_82B91B
	dw CODE_82B9E7
	dw CODE_82B833
	dw CODE_82BA43
	dw CODE_828A62
	dw CODE_82BD17
	dw CODE_82BCCD
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_82BA6A
	dw CODE_82BC72
	dw CODE_82BA6A
	dw CODE_82BE36
	dw CODE_82BF52
	dw CODE_82BF72
	dw CODE_82BE8D
	dw CODE_82C019
	dw CODE_82BF2F
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_82BA0C
	dw CODE_82BA43
	dw CODE_82BC19
	dw CODE_82BB76
	dw CODE_82BA78
	dw CODE_828A62
	dw CODE_82BA98
	dw CODE_82BA98
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_82BBE7
	dw CODE_82BB9E
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62

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

DATA_828A0A:
	dw CODE_82C26B
	dw CODE_82C304
	dw CODE_82C2B5
	dw CODE_82C2C7
	dw CODE_82C304
	dw CODE_82C304
	dw CODE_828A62
	dw CODE_82C31B
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_82C34E
	dw CODE_82C477
	dw CODE_82C477
	dw CODE_82C304
	dw CODE_82C477
	dw CODE_82C4DD
	dw CODE_82C53E
	dw CODE_82C53E
	dw CODE_82C555
	dw CODE_82C3AE
	dw CODE_82C457
	dw CODE_82C457
	dw CODE_82C3CE
	dw CODE_82C41D
	dw CODE_828A62
	dw CODE_82C4C6
	dw CODE_82C477
	dw CODE_82C4AF
	dw CODE_82C304
	dw CODE_828A62
	dw CODE_82C48E
	dw CODE_82C48E
	dw CODE_82C2D9
	dw CODE_82C37E
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_82C477
	dw CODE_82C477
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62
	dw CODE_828A62

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

CODE_828A62:
	LDA.w #$FFFF
	RTS

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

CODE_828A66:
	LDA.w $092A,y
	AND.w #$00FF
	DEC
	ASL
	TAX
	LDA.w #$2000
	ORA.w DATA_81D994,x
	STA.w $0978,y
	LDA.w $092A,y
	BMI.b CODE_828A85
	LDA.w $0966
	STA.w $0968,y
	BPL.b CODE_828A94
CODE_828A85:
	LDA.w $0978,y
	ORA.w #$0001
	STA.w $0978,y
	LDA.w #$0000
	STA.w $0968,y
CODE_828A94:
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $092A,y
	AND.w #$00FF
	STA.w $092A,y
	RTS

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

CODE_828AA4:
	LDA.w #$801E
	STA.w $09B8,y
	LDA.w #$0014
	STA.w $09C8,y
	BRA.b CODE_828AB8

CODE_828AB2:
	LDA.w #$0001
	STA.w $09B8,y
CODE_828AB8:
	LDA.b $3A
	STA.w $09EE,y
	LDA.b $38
	STA.w $09FE,y
	LDA.w $092A,y
	XBA
	AND.w #$00FF
	STA.w $0978,y
	JMP.w CODE_828CBE

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

CODE_828ACF:
	LDA.w $092A,y
	AND.w #$00FF
	DEC
	ASL
	TAX
	LDA.w #$2000
	ORA.w DATA_81D994,x
	STA.w $0978,y
	LDA.w $0978,y
	ORA.w #$0001
	STA.w $0978,y
	LDA.w #$0000
	STA.w $0968,y
CODE_828AF0:
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $092A,y
	AND.w #$00FF
	STA.w $092A,y
	RTS

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

CODE_828B00:
	STZ.w $0A0E
	JMP.w CODE_828C5B

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

CODE_828B06:
	LDA.w #$0000
	STA.w $09B8,y
	STA.w $0998,y
	STA.w $0988,y
	LDA.w #$2000
	STA.w $0978,y
	LDA.w $092A,y
	AND.w #$FF00
	STA.w $0978,y
	JMP.w CODE_828CBE

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

CODE_828B24:
	LDA.b $3A
	STA.w $09EE,y
	LDA.w #$0000
	STA.w $0998,y
	STA.w $0988,y
	TYA
	ASL
	ASL
	STA.w $09B8,y
	LDA.w #$2000
	STA.w $0978,y
	LDA.w $092A,y
	AND.w #$FF00
	STA.w $0978,y
	JMP.w CODE_828CBE

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

CODE_828B4A:
	LDA.w $092A,y
	XBA
	AND.w #$00FF
	STA.w $0998,y
	JMP.w CODE_828CBE

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

CODE_828B57:
	LDA.w #$0000
	STA.w $0998,y
	STA.w $09B8,y
	JMP.w CODE_828CBE

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

CODE_828B63:
	LDA.w #$F830
	STA.w $09A8,y
	LDA.w #$FFD0
	STA.w $0998,y
	LDA.w #$0014
	STA.w $09B8,y
	LDA.w $092A,y
	LSR
	LSR
	LSR
	LSR
	STA.w $09C8,y
	LDA.w #$0001
	STA.w $092A,y
	JMP.w CODE_828CBE

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

CODE_828B88:
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $092A,y
	STA.w $09B8,y
	JMP.w CODE_828CBE

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

CODE_828B97:
	LDA.w #$0000
	STA.w $09A8,y
	LDA.w $092A,y
	AND.w #$FF00
	STA.w $09B8,y
	LDA.w $092A,y
	AND.w #$00FF
	STA.w $09D8,y
	JMP.w CODE_828CBE

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

CODE_828BB2:
	LDA.w #$0000
	STA.w $09A8,y
	BRA.b CODE_828B88

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

CODE_828BBA:
	LDA.w $092A,y
	AND.w #$FF00
	STA.w $09B8,y
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $092A,y
	AND.w #$000F
	STA.w $09A8,y
	LDA.w $092A,y
	AND.w #$00F0
	ASL
	ASL
	ASL
	ASL
	STA.w $09C8,y
	JMP.w CODE_828CBE

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

CODE_828BE2:
	LDA.w #$0014
	STA.w $09D8,y
	LDA.w $092A,y
	AND.w #$0001
	STA.w $0978,y
	LDA.w $092A,y
	XBA
	AND.w #$00FF
	STA.w $09A8,y
	LDA.w #$0000
	STA.w $0988,y
	JMP.w CODE_828CBE

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

CODE_828C04:
	LDA.w $092A,y
	AND.w #$0001
	STA.w $0978,y
	LDA.w $092A,y
	XBA
	PHA
	AND.w #$0007
	STA.w $09A8,y
	PLA
	AND.w #$0008
	LSR
	LSR
	LSR
	STA.w $09D8,y
	LDA.w #$0000
	STA.w $0988,y
	RTS

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

CODE_828C29:
	LDA.w $092A,y
	AND.w #$8000
	STA.w $0978,y
	LDA.w $092A,y
	XBA
	AND.w #$007F
	STA.w $09A8,y
	LDA.w #$0000
	STA.w $0988,y
	STA.w $09D8,y
	STA.w $09B8,y
	STA.w $09C8,y
	LDA.w #$0001
	STA.w $092A,y
	RTS

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

CODE_828C52:
	LDA.w #$0000
	STA.w $09B8,y
	STA.w $0998,y
CODE_828C5B:
	LDA.w #$2400
	STA.w $0978,y
	LDA.w $092A,y
	BPL.b CODE_828CBE
	LDA.w #$6400
	STA.w $0978,y
	BRA.b CODE_828CBE

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

CODE_828C6E:
	LDA.w #$0000
	STA.w $09B8,y
	LDA.w $092A,y
	AND.w #$FF00
	STA.w $09A8,y
	BRA.b CODE_828CBE

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

CODE_828C7F:
	LDA.w #$FFFF
	STA.w $09B8,y
	LDA.w $092A,y
	AND.w #$000F
	STA.w $092A,y
	RTS

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

CODE_828C8F:
	LDA.w #$0000
	STA.w $09A8,y
	STA.w $09B8,y
	STA.w $0988,y
	LDA.w $092A,y
	AND.w #$FF00
	STA.w $0978,y
	LDA.w #$0006
	STA.w $092A,y
	RTS

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

CODE_828CAB:
	BRA.b CODE_828CBE

CODE_828CAD:
	LDA.b $3A
	STA.w $09EE,y
	STA.w $09FE,y
	LDA.w $092A,y
	AND.w #$00FF
	STA.w $09B8,y
CODE_828CBE:
	LDA.w $092A,y
	AND.w #$00FF
	STA.w $092A,y
	RTS

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

CODE_828CC8:
	LDA.w #$0000
	STA.w $0998,y
	STA.w $09C8,y
	LDA.w #$000B
	STA.w $09A8,y
	LDA.w #$012C
	STA.w $09B8,y
	LDA.w $092A,y
	AND.w #$00FF
	STA.w $092A,y
	RTS

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

CODE_828CE7:
	JSR.w CODE_828D0A
	LDA.w #$0000
	STA.w $0998,y
	LDA.w $092A,y
	AND.w #$00FF
	STA.w $0988,y
	RTS

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

CODE_828CFA:
	LDA.w $092A,y
	AND.w #$00FF
	BNE.b CODE_828D0A
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$FFFF
	STA.b $00,x
	RTS

CODE_828D0A:
	LDA.w $092A,y
	XBA
	AND.w #$00FF
	PHA
	AND.w #$00F0
	BNE.b CODE_828D1C
	LDA.w #$0008
	BRA.b CODE_828D1E

CODE_828D1C:
	ASL
	ASL
CODE_828D1E:
	STA.w $09A8,y
	LDA.w #$FF00
	STA.w $09B8,y
	PLA
	AND.w #$000F
	ASL
	ASL
	STA.w $09D8,y
	CMP.w #$003C
	BCC.b CODE_828D3B
	ORA.w #$8000
	STA.w $09D8,y
CODE_828D3B:
	BRA.b CODE_828CBE

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

CODE_828D3D:
	LDA.w #$0000
	STA.w $09A8,y
	STA.w $09B8,y
	STA.w $0998,y
	LDA.w $092A,y
	AND.w #$FF00
	XBA
	STA.w $09D8,y
	STA.w $0968,y
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$04D6
	STA.b $04,x
	JMP.w CODE_828CBE

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

CODE_828D60:
	LDA.w $092A,y
	AND.w #$0080
	XBA
	ROL
	ROL
	STA.w $0978,y
	LDA.w $092A,y
	AND.w #$0070
	ASL
	STA.w $0998,y
	LDA.w $092A,y
	AND.w #$FF00
	XBA
	STA.w $09B8,y
	LDA.w #$0000
	STA.w $0988,y
	STA.w $09C8,y
	RTS

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

CODE_828D8A:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $092A,y
	AND.w #$0080
	XBA
	ROL
	ROL
	STA.w $0978,y
	LDA.w $092A,y
	AND.w #$0070
	ASL
	STA.w $0998,y
	LDA.w $092A,y
	AND.w #$FF00
	XBA
	STA.w $09B8,y
	LDA.w $092A,y
	AND.w #$000F
	STA.w $09D8,y
	AND.w #$000C
	LSR
	PHY
	TAY
	LDA.w DATA_81DD4E,y
	STA.b $06,x
	PLY
	LDA.w $0978,y
	BNE.b CODE_828DCD
	LDA.b $06,x
	ORA.w #$4000
	STA.b $06,x
CODE_828DCD:
	LDA.w #$2002
	STA.w $092A,y
	LDA.w #$0000
	STA.w $093A,y
	STA.w $09A8,y
	STA.w $09C8,y
	RTS

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

CODE_828DE0:
	LDA.w $092A,y
	STA.b $38
	AND.w #$000F
	ASL
	ASL
	ASL
	ASL
	STA.w $0A14,y
	LDA.w $092A,y
	BIT.w #$0010
	BEQ.b CODE_828E0E
	LDA.w $0A84
	CLC
	ADC.w $0A14,y
	STA.w $0A14,y
	LDA.b $38
	BPL.b CODE_828E0E
	LDA.w $0A14,y
	EOR.w #$00FF
	STA.w $0A14,y
CODE_828E0E:
	LDA.b $38
	AND.w #$00E0
	ASL
	ASL
	ASL
	STA.w $0A24,y
	LDA.b $38
	BPL.b CODE_828E2A
	LDA.w $0A24,y
	EOR.w #$FF00
	CLC
	ADC.w #$0100
	STA.w $0A24,y
CODE_828E2A:
	LDA.b $38
	AND.w #$0F00
	XBA
	ASL
	TAX
	LDA.w DATA_81DE5A,x
	STA.w $0988,y
	LDA.w DATA_81DE6A,x
	STA.w $09B8,y
	LDA.b $38
	AND.w #$7000
	STA.w $0A44,y
	LDA.w #$0000
	STA.w $0A34,y
	RTS

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

CODE_828E4D:
	REP.b #$30
	JSR.w CODE_828751
	LDA.w $0966
	BMI.b CODE_828E5A
	DEC.w $0966
CODE_828E5A:
	LDA.w $0A84
	INC
	AND.w #$00FF
	STA.w $0A84
	LDX.w #$0458
	LDY.w #$000E
CODE_828E6A:
	LDA.b $00,x
	BPL.b CODE_828E71
	JMP.w CODE_828F15

CODE_828E71:
	STX.b !RAM_PLOK_UnknownRAM000046
	STY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $093A,y
	BEQ.b CODE_828E85
	DEC
	STA.w $093A,y
	LDA.b $08,x
	ORA.w #$8000
	BRA.b CODE_828E8A

CODE_828E85:
	LDA.b $08,x
	AND.w #$7FFF
CODE_828E8A:
	STA.b $08,x
	LDA.w $091A,y
	ASL
	TAX
	JSR.w (DATA_82895A,x)
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.b $00,x
	BPL.b CODE_828E9F
	JMP.w CODE_828F15

CODE_828E9F:
	STA.b $38
	LDA.b $02,x
	STA.b $3A
	JSR.w CODE_828832
	BCC.b CODE_828F15
	LDA.w $091A,y
	ASL
	TAX
	LDA.w DATA_818684,x
	BNE.b CODE_828EB8
	LDX.b !RAM_PLOK_UnknownRAM000046
	BRA.b CODE_828F15

CODE_828EB8:
	LDX.w $090A,y
	CMP.w #$0001
	BEQ.b CODE_828ECF
	CMP.w #$0002
	BEQ.b CODE_828EDC
	CMP.w #$0003
	BEQ.b CODE_828EEC
	DEC.w $0EB2
	BRA.b CODE_828F0E

CODE_828ECF:
	LDA.l $7F0000,x
	AND.w #$7FFF
	STA.l $7F0000,x
	BRA.b CODE_828EEC

CODE_828EDC:
	LDY.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0000,y
	STA.l $7F0000,x
	LDA.w $0002,y
	STA.l $7F0002,x
CODE_828EEC:
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $091A,y
	CMP.w #$001F
	BNE.b CODE_828EF8
	BRA.b CODE_828F23

CODE_828EF8:
	LDA.l $7F0006,x
	AND.w #$FF00
	ORA.w $092A,y
	STA.l $7F0006,x
CODE_828F06:
	LDA.w $091A,y
	BNE.b CODE_828F0E
	JSR.w CODE_828F57
CODE_828F0E:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$FFFF
	STA.b $00,x
CODE_828F15:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BMI.b CODE_828F22
	JMP.w CODE_828E6A

CODE_828F22:
	RTL

CODE_828F23:
	LDA.w $09B8,y
	XBA
	STA.b $38
	LDA.w $0978,y
	AND.w #$0001
	XBA
	LSR
	STA.b $3A
	LDA.w $09D8,y
	AND.w #$000F
	ORA.b $38
	ORA.b $3A
	STA.w $092A,y
	LDA.w $092A,y
	AND.w #$FF80
	STA.b $38
	LDA.l $7F0006,x
	AND.w #$007F
	ORA.b $38
	STA.l $7F0006,x
	BRA.b CODE_828F06

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

CODE_828F57:
	LDA.w $0968,y
	CMP.w #$00B4
	BCS.b CODE_828F6A
	LDA.l $7F0006,x
	ORA.w #$8000
	STA.l $7F0006,x
CODE_828F6A:
	LDA.l $7F0000,x
	STA.w $1020,x
	LDA.l $7F0002,x
	STA.w $1022,x
	RTS

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

CODE_828F79:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	STA.b $3C
	AND.w #$0007
	BNE.b CODE_828FD8
	LDA.w $0966
	BMI.b CODE_828F95
	LDA.w $0968,y
	BEQ.b CODE_828F95
	DEC
	STA.w $0968,y
	BRA.b CODE_828FC4

CODE_828F95:
	LDA.w #$FFFF
	STA.w $0998,y
	STA.w $09A8,y
	TYA
	CLC
	ADC.b $09
	AND.w #$0007
	CMP.w #$0006
	BCC.b CODE_828FAD
	LDA.w #$0000
CODE_828FAD:
	STA.w $09B8,y
	LDA.w #$801F
	STA.w $0968,y
	LDA.w $0978,y
	ORA.w #$0001
	STA.w $0978,y
	AND.w #$0007
	BRA.b CODE_828FD8

CODE_828FC4:
	CMP.w #$00B4
	BCC.b CODE_828FCE
	LDA.w #$0000
	BRA.b CODE_82901E

CODE_828FCE:
	LDA.b $09
	AND.w #$0004
	LSR
	LSR
	INC
	BRA.b CODE_82901E

CODE_828FD8:
	LDA.w $0968,y
	BPL.b CODE_828FE7
	AND.w #$001E
	LSR
	CLC
	ADC.w #$0007
	BRA.b CODE_82901E

CODE_828FE7:
	LDA.b $3C
	AND.w #$0004
	BEQ.b CODE_828FF7
	INC
	LDX.w $0988,y
	BMI.b CODE_82901E
	INC
	BRA.b CODE_82901E

CODE_828FF7:
	LDA.w #$0003
	LDX.w $0968,y
	CPX.w #$0014
	BCS.b CODE_82901E
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCC.b CODE_829014
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen
	BCS.b CODE_829014
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_829241
CODE_829014:
	LDA.b $09
	AND.w #$0004
	BNE.b CODE_82901E
	LDA.w #$0003
CODE_82901E:
	ASL
	TAY
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCC.b CODE_829032
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen
	BCS.b CODE_829032
	LDA.w DATA_81D966,y
	BRA.b CODE_829035

CODE_829032:
	LDA.w DATA_81D938,y
CODE_829035:
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $0978,y
	AND.w #$0001
	BNE.b CODE_829052
	LDA.w $0968,y
	CMP.w #$00B4
	BCC.b CODE_829052
	LDA.b $3C
	AND.w #$FF00
	STA.b $06,x
CODE_829052:
	LDA.b $3C
	AND.w #$0007
	BNE.b CODE_82905C
CODE_829059:
	JMP.w CODE_8290ED

CODE_82905C:
	AND.w #$0004
	BNE.b CODE_829059
	LDA.w $0968,y
	AND.w #$8000
	STA.b $38
	LDA.w $0968,y
	AND.w #$7FFF
	BNE.b CODE_8290E7
	LDA.w #$0011
	JSL.l CODE_80FD81
	LDA.w $0998,y
	INC
	AND.w #$0007
	STA.w $0998,y
	ASL
	TAX
	LDA.w $0978,y
	AND.w #$BFFB
	ORA.w DATA_81D99A,x
	STA.w $0978,y
	LDA.w $09A8,y
	INC
	CMP.w #$0005
	BCC.b CODE_82909C
	LDA.w #$0000
CODE_82909C:
	STA.w $09A8,y
	ASL
	TAX
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCC.b CODE_8290B3
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen
	BCS.b CODE_8290B3
	LDA.w DATA_81D9AA,x
	BRA.b CODE_8290B6

CODE_8290B3:
	LDA.w DATA_81D9B4,x
CODE_8290B6:
	STA.w $0988,y
	LDA.w $09B8,y
	INC
	CMP.w #$0007
	BCC.b CODE_8290C5
	LDA.w #$0000
CODE_8290C5:
	STA.w $09B8,y
	ASL
	TAX
	LDA.w DATA_81D9BE,x
	STA.w $0968,y
	LDA.w #$0003
	SEC
	SBC.w $092A,y
	BEQ.b CODE_8290ED
	TAX
	LDA.w $0968,y
	AND.w #$7FFF
	LSR
	DEX
	BEQ.b CODE_8290E8
	LSR
	BRA.b CODE_8290E8

CODE_8290E7:
	DEC
CODE_8290E8:
	ORA.b $38
	STA.w $0968,y
CODE_8290ED:
	LDA.b $02,x
	CMP.b !RAM_PLOK_UnknownRAM000060
	BCC.b CODE_82913F
	LDA.w $0978,y
	AND.w #$0001
	BNE.b CODE_829101
	LDA.w #$0002
	STA.w $0968,y
CODE_829101:
	LDA.w #$0011
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.b $06,x
	AND.w #$4000
	STA.b $3A
	LDA.w $0978,y
	AND.w #$BFFF
	ORA.b $3A
	STA.w $0978,y
	LDA.w #$F830
	STA.w $0988,y
	LDA.w $095A
	BNE.b CODE_82913F
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$0038
	STA.w $0C1E
	JSL.l CODE_82C193
CODE_82913F:
	LDA.b $06,x
	AND.w #$F1FF
	STA.b $38
	LDA.w $0978,y
	AND.w #$0F00
	ORA.b $38
	STA.b $06,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $02,x
	STA.w $095E
	LDA.w #$003C
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$0FFF
	BEQ.b CODE_829195
	CMP.w #$0001
	BEQ.b CODE_82917C
	CMP.w #$0002
	BEQ.b CODE_82917C
	BRA.b CODE_829195

CODE_82917C:
	LDA.w $0988,y
	BMI.b CODE_829195
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $0978,y
	AND.w #$FFFB
	STA.w $0978,y
	LDA.w $095E
	STA.b $02,x
CODE_829195:
	LDA.w #$0022
	STA.w $0964
	LDA.w $0978,y
	AND.w #$4000
	BEQ.b CODE_8291A9
	LDA.w #$001A
	STA.w $0964
CODE_8291A9:
	JSR.w CODE_82B648
	AND.w #$0FFF
	CMP.w #$0003
	BNE.b CODE_8291C8
	LDA.w $0988,y
	BPL.b CODE_8291C8
	LDA.w $0978,y
	EOR.w #$4000
	STA.w $0978,y
	LDA.w #$0000
	STA.w $0988,y
CODE_8291C8:
	LDA.w #$003C
	STA.w $0960
	LDA.w #$0026
	STA.w $0964
	LDA.w $0978,y
	AND.w #$4000
	BEQ.b CODE_8291E2
	LDA.w #$0016
	STA.w $0964
CODE_8291E2:
	JSR.w CODE_82B73A
	AND.w #$0FFF
	BEQ.b CODE_8291F3
	LDA.w $0978,y
	EOR.w #$4000
	STA.w $0978,y
CODE_8291F3:
	LDA.w $0988,y
	BEQ.b CODE_82923B
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	BNE.b CODE_829207
	LDA.w $0978,y
	AND.w #$FF00
	STA.b $06,x
CODE_829207:
	LDA.w $0978,y
	AND.w #$4000
	BNE.b CODE_829226
	LDA.b $00,x
	CMP.b !RAM_PLOK_UnknownRAM000068
	BCC.b CODE_829220
	LDA.w $0978,y
	ORA.w #$4000
	STA.w $0978,y
	BRA.b CODE_82923B

CODE_829220:
	INC.b $00,x
	INC.b $00,x
	BRA.b CODE_82923B

CODE_829226:
	LDA.b $00,x
	CMP.b !RAM_PLOK_UnknownRAM000066
	BCS.b CODE_829237
	LDA.w $0978,y
	AND.w #$BFFF
	STA.w $0978,y
	BRA.b CODE_82923B

CODE_829237:
	DEC.b $00,x
	DEC.b $00,x
CODE_82923B:
	LDY.b !RAM_PLOK_UnknownRAM000048
	JSR.w CODE_8292F2
	RTS

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

CODE_829241:
	LDA.b $09
	AND.w #$0003
	BEQ.b CODE_829249
	RTS

CODE_829249:
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$1002
	STA.w $0AA4
	LDA.w #$3600
	STA.w $0A9E
	LDA.b $09
	AND.w #$0004
	BEQ.b CODE_82926C
	LDA.w #$7600
	STA.w $0A9E
CODE_82926C:
	LDA.w #$0032
	STA.w $0AA8
	LDA.w #$0002
	STA.w $0AA2
	LDA.w #$FA88
	STA.w $0AA0
	LDA.w #$005A
	STA.w $0AA6
	JSL.l CODE_82CD44
	RTS

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

CODE_829289:
	LDA.w $0978,y
	AND.w #$0001
	BEQ.b CODE_829296
	LDA.w #$0094
	STA.b $04,x
CODE_829296:
	LDA.w $095E
	STA.b $02,x
	LDA.w $095C
	AND.w #$FFE0
	TAX
	LDA.l DATA_83E964,x
	STA.b $38
	TXA
	CLC
	ADC.w #$001E
	TAX
	LDA.b $38
	CMP.l DATA_83E964,x
	BCS.b CODE_8292D2
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$4000
	BNE.b CODE_8292D9
CODE_8292BD:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $00,x
	CLC
	ADC.w #$0004
	STA.b $00,x
	LDA.w $0978,y
	AND.w #$BFFF
	STA.w $0978,y
	BRA.b CODE_8292EC

CODE_8292D2:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$4000
	BNE.b CODE_8292BD
CODE_8292D9:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $00,x
	SEC
	SBC.w #$0004
	STA.b $00,x
	LDA.w $0978,y
	ORA.w #$4000
	STA.w $0978,y
CODE_8292EC:
	AND.w #$FF00
	STA.b $06,x
	RTS

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

CODE_8292F2:
	LDA.b !RAM_PLOK_UnknownRAM00006C
	STA.b $38
	LDA.w #$0050
	CLC
	ADC.w $0988,y
	STA.w $0988,y
	BPL.b CODE_829307
	ORA.w #$00FF
	BRA.b CODE_829315

CODE_829307:
	CMP.w #$0800
	BCC.b CODE_829312
	LDA.w #$0800
	STA.w $0988,y
CODE_829312:
	AND.w #$FF00
CODE_829315:
	XBA
	CLC
	ADC.b $02,x
	CMP.b $38
	BCC.b CODE_82932D
	CMP.b !RAM_PLOK_UnknownRAM000062
	BCS.b CODE_829323
	STA.b $02,x
CODE_829323:
	LDA.w $0988,y
	BNE.b CODE_82932C
	INC
	STA.w $0988,y
CODE_82932C:
	RTS

CODE_82932D:
	STA.b $02,x
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CMP.w #$0010
	BCC.b CODE_829341
	LDA.w $0988,y
	BPL.b CODE_829341
	LDA.w #$0064
	STA.w $0988,y
CODE_829341:
	RTS

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

CODE_829342:
	LDA.w #$0050
CODE_829345:
	CLC
	ADC.w $0988,y
	STA.w $0988,y
	BPL.b CODE_829353
	ORA.w #$00FF
	BRA.b CODE_829361

CODE_829353:
	CMP.w #$0800
	BCC.b CODE_82935E
	LDA.w #$0800
	STA.w $0988,y
CODE_82935E:
	AND.w #$FF00
CODE_829361:
	XBA
	CLC
	ADC.b $02,x
	STA.b $02,x
	RTS

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

CODE_829368:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09B8,y
	BEQ.b CODE_829373
	DEC
	STA.w $09B8,y
CODE_829373:
	AND.w #$0018
	LSR
	LSR
	TAX
	LDA.w DATA_81DDB6,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	LDA.w #$3A00
	STA.b $06,x
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicGarlenBeach
	BCC.b CODE_82939C
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_829397
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_82939C
CODE_829397:
	LDA.w #$3400
	STA.b $06,x
CODE_82939C:
	TYA
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $09
	AND.w #$007F
	BNE.b CODE_8293B0
	LDA.w #$001F
	STA.w $09B8,y
CODE_8293B0:
	LDA.w $09B8,y
	CMP.w #$0010
	BNE.b CODE_8293EF
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$4000
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0C16
	LDA.w #$3000
	STA.w $0A9E
	LDA.w #$00C8
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0005
	JSL.l CODE_80FD81
CODE_8293EF:
	RTS

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

CODE_8293F0:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $09
	AND.w #$0078
	LSR
	LSR
	TAX
	LDA.w DATA_81DDCE,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	LDA.w #$2400
	STA.b $06,x
	LDA.b $09
	AND.w #$007F
	CMP.w #$0078
	BNE.b CODE_829453
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$400C
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0010
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0020
	STA.w $0C16
	LDA.b $09
	AND.w #$01FF
	LSR
	LSR
	CLC
	ADC.w #$012C
	STA.w $0AA6
	LDA.w #$3600
	STA.w $0A9E
	JSL.l CODE_82CD44
	LDA.w #$0005
	JSL.l CODE_80FD81
CODE_829453:
	RTS

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

CODE_829454:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$00BA
	STA.b $04,x
	LDA.w #$2600
	STA.b $06,x
	PHY
	LDY.w #$0458
	LDA.w $0000,y
	STA.b $00,x
	LDA.w $0002,y
	SEC
	SBC.w #$0020
	STA.b $02,x
	PLY
	RTS

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

CODE_829474:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$2000
	STA.b $06,x
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0260
	BCC.b CODE_8294CE
	LDA.w $092A,y
	CMP.w #$000A
	BCC.b CODE_829491
	LDA.w $093A,y
	BNE.b CODE_8294CF
	BRA.b CODE_8294C5

CODE_829491:
	LDA.w $08AE
	CMP.w #$0008
	BNE.b CODE_8294AA
	LDA.w $094E
	AND.w #$000F
	CMP.w #$0000
	BNE.b CODE_8294AA
	LDA.w #$0001
	STA.w $08D0
CODE_8294AA:
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	STA.b $38
	LDA.w #$0009
	SEC
	SBC.w $092A,y
	ASL
	ASL
	CLC
	ADC.w #$04AC
	CLC
	ADC.b $38
	STA.b $04,x
CODE_8294C5:
	JSR.w CODE_829528
	JSR.w CODE_829610
	JSR.w CODE_8295A0
CODE_8294CE:
	RTS

CODE_8294CF:
	LDA.w #$0064
	STA.w $093A,y
	LDA.w $09A8,y
	BNE.b CODE_8294F5
	LDA.b $02,x
	CMP.w #$00A0
	BCC.b CODE_8294E8
	SEC
	SBC.w #$0002
	STA.b $02,x
	RTS

CODE_8294E8:
	LDA.w #$00A0
	STA.b $02,x
	LDA.w $09A8,y
	INC
	STA.w $09A8,y
	RTS

CODE_8294F5:
	CMP.w #$0002
	BCS.b CODE_829524
	LDA.w $09B8,y
	AND.w #$0006
	TAX
	LDA.w DATA_81DDAE,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	CLC
	ADC.b $00,x
	STA.b $00,x
	LDA.w $09B8,y
	INC
	STA.w $09B8,y
	CMP.w #$003C
	BCC.b CODE_829523
	LDA.w #$0000
	STA.w $09B8,y
	LDA.w #$0006
	STA.w $09A8,y
CODE_829523:
	RTS

CODE_829524:
	JSR.w CODE_829689
	RTS

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

CODE_829528:
	LDA.w $09A8,y
	CMP.w #$0018
	BNE.b CODE_829547
	LDA.w $092A,y
	CMP.w #$000A
	BCC.b CODE_829547
	LDA.w $09B8,y
	AND.w #$001C
	LSR
	PHX
	TAX
	LDA.w DATA_81DBA0,x
	PLX
	STA.b $04,x
CODE_829547:
	LDA.w $093A,y
	BEQ.b CODE_82955C
	AND.w #$000E
	PHX
	TAX
	LDA.w DATA_81DB90,x
	PLX
	STA.w $094A
	STA.w $094C
	RTS

CODE_82955C:
	LDA.w #$0002
	STA.b $38
	LDA.b $00,x
	CMP.w !RAM_PLOK_Level_Player_XPosLo
	BCC.b CODE_82957C
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CMP.w #$0020
	BCC.b CODE_829590
	DEC.b $38
	BIT.w #$0040
	BEQ.b CODE_829590
	DEC.b $38
	BRA.b CODE_829590

CODE_82957C:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b $00,x
	CMP.w #$0020
	BCC.b CODE_829590
	INC.b $38
	BIT.w #$0040
	BEQ.b CODE_829590
	INC.b $38
CODE_829590:
	LDA.b $38
	STA.w $094A
	LDA.w #$0004
	SEC
	SBC.w $094A
	STA.w $094C
	RTS

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

CODE_8295A0:
	LDA.w $09C8,y
	BEQ.b CODE_82960F
	DEC
	STA.w $09C8,y
	AND.w #$001F
	BNE.b CODE_82960F
	LDA.w #$0000
	STA.w $0AA0
	LDA.w #$4015
	STA.w $0AA4
	LDA.w #$0096
	STA.w $0AA6
	PHY
	LDA.w #$0009
	SEC
	SBC.w $092A,y
	BEQ.b CODE_82960E
	BMI.b CODE_82960E
	DEC
	ASL
	TAY
CODE_8295CF:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w DATA_81DB30,y
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C16
	LDA.b $00,x
	CLC
	ADC.w DATA_81DB40,y
	STA.w $0A9A
	LDA.b $02,x
	CLC
	ADC.w DATA_81DB50,y
	STA.w $0A9C
	LDA.w DATA_81DB80,y
	STA.w $0A9E
	LDA.w DATA_81DB70,y
	STA.w $0AA2
	LDA.w DATA_81DB60,y
	LDA.w #$0000
	STA.w $0AA8
	JSL.l CODE_82CD44
	DEY
	DEY
	BPL.b CODE_8295CF
CODE_82960E:
	PLY
CODE_82960F:
	RTS

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

CODE_829610:
	LDA.w $09B8,y
	BEQ.b CODE_82961B
	DEC
	STA.w $09B8,y
	BRA.b CODE_829667

CODE_82961B:
	LDA.w $09A8,y
	CMP.w #$0013
	BCC.b CODE_82963B
	LDA.w $092A,y
	CMP.w #$000A
	BCC.b CODE_82963B
	LDA.w #$0000
	STA.w $09A8,y
	STA.w $09B8,y
	LDA.w #$0064
	STA.w $093A,y
	RTS

CODE_82963B:
	LDA.w $09A8,y
	PHX
	TAX
CODE_829640:
	LDA.w DATA_81DA9C,x
	CMP.w #$FFFF
	BNE.b CODE_82964D
	LDX.w #$0000
	BRA.b CODE_829640

CODE_82964D:
	STA.w $09B8,y
	INX
	INX
	LDA.w DATA_81DA9C,x
	STA.w $09C8,y
	INX
	INX
	LDA.w DATA_81DA9C,x
	STA.w $0988,y
	INX
	INX
	TXA
	STA.w $09A8,y
	PLX
CODE_829667:
	LDA.w $0988,y
	BEQ.b CODE_829688
	BIT.w #$0001
	BEQ.b CODE_829673
	DEC.b $02,x
CODE_829673:
	BIT.w #$0002
	BEQ.b CODE_82967A
	INC.b $02,x
CODE_82967A:
	BIT.w #$0004
	BEQ.b CODE_829681
	DEC.b $00,x
CODE_829681:
	BIT.w #$0008
	BEQ.b CODE_829688
	INC.b $00,x
CODE_829688:
	RTS

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

CODE_829689:
	LDA.w $09B8,y
	BEQ.b CODE_829694
	DEC
	STA.w $09B8,y
	BRA.b CODE_8296C9

CODE_829694:
	LDA.w $09A8,y
	PHX
	TAX
	LDA.w DATA_81DAEC,x
	CMP.w #$FFFF
	BNE.b CODE_8296AF
	LDA.w #$0000
	STA.w $09A8,y
	STA.w $09B8,y
	STA.w $093A,y
	PLX
	RTS

CODE_8296AF:
	STA.w $09B8,y
	INX
	INX
	LDA.w DATA_81DAEC,x
	STA.w $09C8,y
	INX
	INX
	LDA.w DATA_81DAEC,x
	STA.w $0988,y
	INX
	INX
	TXA
	STA.w $09A8,y
	PLX
CODE_8296C9:
	LDA.w $0988,y
	BEQ.b CODE_82970A
	STA.b $38
	BIT.w #$0001
	BEQ.b CODE_8296DD
	LDA.b $02,x
	SEC
	SBC.w #$0008
	STA.b $02,x
CODE_8296DD:
	LDA.b $38
	BIT.w #$0002
	BEQ.b CODE_8296EC
	LDA.b $02,x
	CLC
	ADC.w #$0008
	STA.b $02,x
CODE_8296EC:
	LDA.b $38
	BIT.w #$0004
	BEQ.b CODE_8296FB
	LDA.b $00,x
	SEC
	SBC.w #$0006
	STA.b $00,x
CODE_8296FB:
	LDA.b $38
	BIT.w #$0008
	BEQ.b CODE_82970A
	LDA.b $00,x
	CLC
	ADC.w #$0006
	STA.b $00,x
CODE_82970A:
	RTS

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

CODE_82970B:
	LDA.b $00,x
	CMP.w !RAM_PLOK_Level_Player_XPosLo
	BCC.b CODE_82971A
	LDA.b $06,x
	ORA.w #$4000
	STA.b $06,x
	RTS

CODE_82971A:
	LDA.b $06,x
	AND.w #$BFFF
	STA.b $06,x
	RTS

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

CODE_829722:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$00BE
	STA.b $04,x
	LDA.w #$2600
	STA.b $06,x
	JSR.w CODE_82970B
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CMP.w $09EE,y
	BCC.b CODE_82974E
	LDA.w $09FE,y
	CLC
	ADC.w $09B8,y
	CMP.w $09EE,y
	BCC.b CODE_829764
	LDA.w $09EE,y
	CLC
	ADC.w #$0010
	BRA.b CODE_829761

CODE_82974E:
	LDA.w $09FE,y
	SEC
	SBC.w $09B8,y
	CMP.w $09EE,y
	BCS.b CODE_829764
	LDA.w $09EE,y
	SEC
	SBC.w #$0010
CODE_829761:
	STA.w $09EE,y
CODE_829764:
	LDA.w $09EE,y
	CMP.b $02,x
	BCC.b CODE_829786
	SEC
	SBC.b $02,x
	CMP.w #$0010
	BCC.b CODE_8297AA
	STA.b $38
	LDA.w $0988,y
	BPL.b CODE_829782
	LDA.b $38
	CLC
	ADC.w #$003C
	STA.b $38
CODE_829782:
	LDA.b $38
	BRA.b CODE_8297A6

CODE_829786:
	LDA.b $02,x
	SEC
	SBC.w $09EE,y
	CMP.w #$0010
	BCC.b CODE_8297AF
	STA.b $38
	LDA.w $0988,y
	BMI.b CODE_8297A0
	LDA.b $38
	CLC
	ADC.w #$003C
	STA.b $38
CODE_8297A0:
	LDA.b $38
	EOR.w #$FFFF
	INC
CODE_8297A6:
	JSR.w CODE_829345
	RTS

CODE_8297AA:
	LDA.w #$0064
	BRA.b CODE_8297A6

CODE_8297AF:
	LDA.w #$FF9C
	BRA.b CODE_8297A6

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_8297B4_PLOK_E.asm)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_8297B4_PLOK_J.asm)
else
	%InsertGarbageData(NULLROM, incsrc, ADDR_8297B4_PLOK_U.asm)
endif

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

CODE_829818:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09B8,y
	BNE.b CODE_829828
	LDA.b $09
	AND.w #$0030
	LSR
	LSR
	BRA.b CODE_82982F

CODE_829828:
	DEC
	STA.w $09B8,y
	AND.w #$000C
CODE_82982F:
	LSR
	TAX
	LDA.w DATA_81DDEE,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	LDA.w $092A,y
	AND.w #$00FF
	DEC
	ASL
	TAX
	LDA.w #$2000
	ORA.w DATA_81D994,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $06,x
	JSR.w CODE_82970B
	TYA
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $09
	AND.w #$007F
	BNE.b CODE_829862
	LDA.w #$001F
	STA.w $09B8,y
CODE_829862:
	LDA.w $09B8,y
	CMP.w #$0010
	BNE.b CODE_8298A5
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	SEC
	SBC.w #$0010
	STA.w $0A9C
	LDA.w #$4002
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0C16
	LDA.w #$3600
	STA.w $0A9E
	LDA.w #$00C8
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0005
	JSL.l CODE_80FD81
CODE_8298A5:
	RTS

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

CODE_8298A6:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	ORA.w #$0600
	STA.b $06,x
	LDA.w #$00C6
	STA.b $04,x
	LDA.w $0A0E
	BEQ.b CODE_8298C1
	CMP.w #$0001
	BNE.b CODE_8298F2
	BRA.b CODE_8298D0

CODE_8298C1:
	LDA.b $00,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0080
	BCS.b CODE_8298F6
	INC.w $0A0E
	BRA.b CODE_8298F6

CODE_8298D0:
	LDA.b $02,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	BMI.b CODE_8298DC
	CMP.w #$0050
	BCS.b CODE_8298ED
CODE_8298DC:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b $02,x
	CMP.w #$0010
	BCC.b CODE_8298ED
	INC.b $02,x
	INC.b $02,x
	BRA.b CODE_8298F6

CODE_8298ED:
	INC.w $0A0E
	BRA.b CODE_8298F6

CODE_8298F2:
	DEC.b $02,x
	DEC.b $02,x
CODE_8298F6:
	RTS

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

CODE_8298F7:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	STA.b $06,x
	LDA.w $0A0E
	BEQ.b CODE_82990C
	CMP.w #$0002
	BEQ.b CODE_829912
	INC.b $02,x
	INC.b $02,x
CODE_82990C:
	LDA.w #$00C8
	STA.b $04,x
	RTS

CODE_829912:
	JSR.w CODE_82970B
	LDA.b $06,x
	EOR.w #$4000
	STA.b $06,x
	LDA.w $0988,y
	BNE.b CODE_82993C
	LDA.w $09B8,y
	DEC
	STA.w $09B8,y
	BPL.b CODE_829995
	LDA.w #$0021
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JSR.w CODE_829A39
CODE_82993C:
	LDA.w #$005A
	JSR.w CODE_829345
	LDA.b $00,x
	CLC
	ADC.w $0998,y
	STA.b $00,x
	LDA.b $02,x
	STA.w $095E
	LDA.w #$0044
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$00FF
	BEQ.b CODE_8299B2
	LDA.w $0988,y
	BMI.b CODE_8299B2
	LDA.w #$0008
	STA.b !RAM_PLOK_UnknownRAM000092
	LDA.w #$0028
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $0978,y
	AND.w #$FFFB
	STA.w $0978,y
	LDA.w $095E
	STA.b $02,x
CODE_829995:
	LDA.w $09B8,y
	BCC.b CODE_8299A1
	LDA.w #$0134
	STA.b $04,x
	BRA.b CODE_8299B2

CODE_8299A1:
	LDA.w #$0138
	STA.b $04,x
	TYA
	CLC
	ADC.b $09
	AND.w #$0007
	BNE.b CODE_8299B2
	JSR.w CODE_8299B3
CODE_8299B2:
	RTS

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

CODE_8299B3:
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	SEC
	SBC.w #$0020
	STA.w $0A9C
	LDA.w #$0014
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C16
	LDA.w #$003C
	STA.w $0AA6
	LDA.w #$0050
	STA.w $0AA8
	LDA.w #$F830
	STA.w $0AA0
	LDA.w #$0002
	STA.w $0AA2
	LDA.b $06,x
	AND.w #$4000
	EOR.w #$4000
	STA.w $0A9E
	JSL.l CODE_82CD44
	LDA.w #$000D
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	RTS

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

CODE_829A0A:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b $00,x
	BPL.b CODE_829A24
	EOR.w #$FFFF
	INC
	LSR
	LSR
	LSR
	LSR
	LSR
	JSR.w CODE_829A30
	EOR.w #$FFFF
	INC
	BRA.b CODE_829A2C

CODE_829A24:
	LSR
	LSR
	LSR
	LSR
	LSR
	JSR.w CODE_829A30
CODE_829A2C:
	STA.w $0998,y
	RTS

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

CODE_829A30:
	CMP.w #$0004
	BCC.b CODE_829A38
	LDA.w #$0003
CODE_829A38:
	RTS

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

CODE_829A39:
	TYA
	CLC
	ADC.b $09
	AND.w #$0007
	ASL
	TAX
	LDA.w DATA_81D9BE,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.w $09B8,y
	LDA.w #$F768
	STA.w $0988,y
	JSR.w CODE_829A0A
	LDA.w #$0136
	STA.b $04,x
	RTS

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

CODE_829A59:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $092A,y
	BNE.b CODE_829A83
	LDA.w #$0206
	STA.b $04,x
	LDA.w #$2C00
	STA.b $06,x
	LDA.w $09B8,y
	BEQ.b CODE_829A7E
	DEC
	STA.w $09B8,y
	STA.w $09A8,y
	LDA.w $09C8,y
	STA.w $0998,y
	BRA.b CODE_829A9E

CODE_829A7E:
	JSR.w CODE_829B2C
	BRA.b CODE_829A9E

CODE_829A83:
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	CLC
	ADC.w #$0202
	STA.b $04,x
	LDA.w #$2C00
	STA.b $06,x
	JSR.w CODE_829AA5
	LDA.w #$0000
	STA.w $0988,y
CODE_829A9E:
	LDA.w #$0050
	JSR.w CODE_829345
	RTS

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

CODE_829AA5:
	LDA.b $09
	AND.w #$0003
	BEQ.b CODE_829AAD
	RTS

CODE_829AAD:
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$1401
	STA.w $0AA4
	LDA.w #$3000
	STA.w $0A9E
	LDA.b $09
	AND.w #$0004
	BEQ.b CODE_829AD0
	LDA.w #$7000
	STA.w $0A9E
CODE_829AD0:
	LDA.w #$00BE
	STA.w $0AA8
	LDA.w #$0002
	STA.w $0AA2
	LDA.w $09B8,y
	BEQ.b CODE_829AEA
	DEC
	STA.w $09B8,y
	LDA.w $09A8,y
	BRA.b CODE_829B1E

CODE_829AEA:
	LDA.w $09A8,y
	CLC
	ADC.w $0998,y
	STA.w $09A8,y
	CMP.w #$F254
	BCC.b CODE_829B0F
	CMP.w #$FA88
	BCC.b CODE_829B1E
	LDA.w #$0014
	STA.w $09B8,y
	LDA.w #$FFB0
	STA.w $0998,y
	LDA.w #$FA88
	BRA.b CODE_829B1E

CODE_829B0F:
	LDA.w #$0028
	STA.w $09B8,y
	LDA.w #$00DC
	STA.w $0998,y
	LDA.w #$F254
CODE_829B1E:
	STA.w $0AA0
	LDA.w #$003C
	STA.w $0AA6
	JSL.l CODE_82CD44
	RTS

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

CODE_829B2C:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_829B34
	LDA.w $09EC
CODE_829B34:
	BPL.b CODE_829B39
CODE_829B36:
	JMP.w CODE_829BD8

CODE_829B39:
	LDA.b $00,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_829B36
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0020
	SEC
	SBC.b $02,x
	CLC
	ADC.w #$0002
	CMP.w #$0004
	BCS.b CODE_829BD8
	LDA.w #$0001
	STA.w $09A8,y
	STA.w $09EC
	LDA.w #$0000
	STA.w $042A
	LDA.w #$FFAB
	STA.w $0988,y
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	LDA.w $068C
	AND.w $0834
	BIT.w #$0200
	BEQ.b CODE_829B95
	LDA.b $00,x
	SEC
	SBC.w #$0010
	BMI.b CODE_829B95
	CMP.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	BCC.b CODE_829B95
	DEC.b $00,x
	DEC.b $00,x
	JSL.l CODE_82E132
CODE_829B95:
	LDA.w $068C
	AND.w $0834
	BIT.w #$0100
	BEQ.b CODE_829BB4
	LDA.b $00,x
	SEC
	SBC.w #$00F0
	BMI.b CODE_829BAC
	CMP.b !RAM_PLOK_Level_RightmostCameraXPosLo
	BCS.b CODE_829BB4
CODE_829BAC:
	INC.b $00,x
	INC.b $00,x
	JSL.l CODE_82E132
CODE_829BB4:
	LDA.b $00,x
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.b $02,x
	SEC
	SBC.w #$0020
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w $0822
	AND.w #$0012
	BNE.b CODE_829BD4
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$000C
	STA.w !RAM_PLOK_Level_Player_YPosLo
CODE_829BD4:
	JSR.w CODE_829BF0
	RTS

CODE_829BD8:
	LDA.w #$0000
	STA.w $0988,y
	STZ.w $09EC
	LDA.w $09A8,y
	BEQ.b CODE_829BEF
	LDA.w #$FFAB
	STA.w $0988,y
	JSR.w CODE_829BF0
CODE_829BEF:
	RTS

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

CODE_829BF0:
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_829C2D
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$0020
	STA.w $0C1E
	LDA.w #$000A
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0028
	STA.w $0C24
	LDA.w #$0014
	STA.w $0C26
	LDA.w #$2000
	STA.w $0C28
	JSL.l CODE_82D5AB
CODE_829C2D:
	LDA.w $0998,y
	DEC
	STA.w $0998,y
	BNE.b CODE_829C3F
	STZ.w $09EC
	LDA.w #$FE70
	STA.b $02,x
	RTS

CODE_829C3F:
	CMP.w #$0064
	BCS.b CODE_829C4A
	LDA.w #$0064
	STA.w $093A,y
CODE_829C4A:
	RTS

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

CODE_829C4B:
	STA.w $091A,y
	LDA.w #$FB50
	STA.w $0988,y
	LDA.w #$0032
	STA.w $09B8,y
	LDA.w #$0001
	STA.w $092A,y
	RTS

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

CODE_829C61:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$00E2
	STA.b $04,x
	RTS

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

CODE_829C69:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0DCC
	BEQ.b CODE_829C8D
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.b $02,x
	LDA.w $0DC4
	STA.w $0998,y
	ASL
	TAY
	LDA.w DATA_81894E,y
	STA.b $04,x
	LDA.w #$2200
	STA.b $06,x
	RTS

CODE_829C8D:
	LDA.w $0998,y
	ASL
	TAY
	LDA.w DATA_81895E,y
	STA.b $04,x
	LDA.w #$2200
	STA.b $06,x
	RTS

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

CODE_829C9D:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	STA.b $06,x
	LDA.w $0988,y
	BNE.b CODE_829CB5
	LDA.w $09B8,y
	DEC
	STA.w $09B8,y
	BPL.b CODE_829CCE
	JSR.w CODE_829D26
CODE_829CB5:
	LDA.w #$003C
	JSR.w CODE_829345
	LDA.b $02,x
	CMP.w $09EE,y
	BCC.b CODE_829CC8
	LDA.w #$0000
	STA.w $0988,y
CODE_829CC8:
	LDA.w #$02A4
	STA.b $04,x
	RTS

CODE_829CCE:
	LDA.w $09B8,y
	CMP.w #$001E
	BCS.b CODE_829CE8
	TYA
	CLC
	ADC.b $09
	AND.w #$0007
	BNE.b CODE_829CE2
	JSR.w CODE_829CEE
CODE_829CE2:
	LDA.w #$02A6
	STA.b $04,x
	RTS

CODE_829CE8:
	LDA.w #$02A2
	STA.b $04,x
	RTS

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

CODE_829CEE:
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$200E
	STA.w $0AA4
	LDA.w #$002D
	STA.w $0AA6
	LDA.w #$0050
	STA.w $0AA8
	LDA.w #$F9C0
	STA.w $0AA0
	LDA.w #$0001
	STA.w $0AA2
	LDA.b $06,x
	AND.w #$4000
	EOR.w #$4000
	STA.w $0A9E
	JSL.l CODE_82CD44
	RTS

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

CODE_829D26:
	LDX.b !RAM_PLOK_UnknownRAM000046
	TYA
	ASL
	ASL
	ASL
	STA.w $09B8,y
	LDA.w #$FB5A
	STA.w $0988,y
	LDA.w #$0136
	STA.b $04,x
	RTS

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

CODE_829D3B:
	LDA.w $0998,y
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	TAX
	STZ.b $38
	LDA.w $09B8,y
	BEQ.b CODE_829D53
	DEC
	STA.w $09B8,y
	BRA.b CODE_829D78

CODE_829D53:
	LDA.w $0998,y
	INC
	STA.w $0998,y
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	TAX
CODE_829D62:
	LDA.w DATA_81A620,x
	STA.w $09B8,y
	BPL.b CODE_829D73
	LDA.w #$0000
	STA.w $0998,y
	TAX
	BRA.b CODE_829D62

CODE_829D73:
	LDA.w DATA_81A620+$02,x
	STA.b $38
CODE_829D78:
	LDA.w DATA_81A620+$04,x
	STA.b $3A
	LDA.w $09B8,y
	AND.w #$0001
	BNE.b CODE_829D8E
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $3A
	CLC
	ADC.b $00,x
	STA.b $00,x
CODE_829D8E:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $02,x
	CLC
	ADC.b $38
	STA.b $02,x
	LDA.w #$2600
	STA.b $06,x
	LDA.b $3A
	BPL.b CODE_829DA5
	LDA.w #$6600
	STA.b $06,x
CODE_829DA5:
	LDA.w #$053A
	STA.b $04,x
	RTS

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

CODE_829DAB:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09B8,y
	BNE.b CODE_829DBA
	LDA.w #$0001
	STA.w $09B8,y
	BRA.b CODE_829DD0

CODE_829DBA:
	LDA.b $09
	AND.w #$000F
	BNE.b CODE_829DD5
	LDA.b $31
	AND.w #$00FF
	CMP.w #$0080
	BCC.b CODE_829DD0
	LDA.w #$2600
	BRA.b CODE_829DD3

CODE_829DD0:
	LDA.w #$6600
CODE_829DD3:
	STA.b $06,x
CODE_829DD5:
	LDA.w #$053C
	STA.b $04,x
	RTS

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

CODE_829DDB:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0998,y
	BNE.b CODE_829DED
	LDA.w $09B8,y
	BMI.b CODE_829DED
	DEC
	STA.w $09B8,y
	BRA.b CODE_829E25

CODE_829DED:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_829E25
	LDA.w #$2400
	STA.b $06,x
	LDA.w $0998,y
	ASL
	TAX
	LDA.w DATA_81A6E2,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	LDA.w $0998,y
	INC
	CMP.w #$000B
	BCC.b CODE_829E11
	LDA.w #$0000
CODE_829E11:
	STA.w $0998,y
	TYA
	ASL
	ASL
	ASL
	CMP.w #$0028
	BCS.b CODE_829E21
	CLC
	ADC.w #$001E
CODE_829E21:
	STA.w $09B8,y
	RTS

CODE_829E25:
	LDA.w #$2400
	STA.b $06,x
	LDA.w $0998,y
	ASL
	TAX
	LDA.w DATA_81A6E2,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	RTS

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

CODE_829E37:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$2600
	STA.b $06,x
	LDA.w #$0546
	STA.b $04,x
	RTS

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

CODE_829E44:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$6400
	STA.b $06,x
	LDA.w $0988,y
	BNE.b CODE_829E5F
	LDA.w $09B8,y
	DEC
	STA.w $09B8,y
	BPL.b CODE_829E85
	LDA.w #$FDA8
	STA.w $0988,y
CODE_829E5F:
	LDA.w #$002D
	JSR.w CODE_829345
	LDA.b $02,x
	CMP.w #$0104
	BCC.b CODE_829E7F
	LDA.w #$0104
	STA.b $02,x
	LDA.w #$0000
	STA.w $0988,y
	LDA.w #$003C
	STA.w $09B8,y
	BRA.b CODE_829E85

CODE_829E7F:
	LDA.w #$054A
	STA.b $04,x
	RTS

CODE_829E85:
	LDA.w #$0548
	STA.b $04,x
	RTS

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

CODE_829E8B:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09B8,y
	BMI.b CODE_829E9E
	DEC
	STA.w $09B8,y
	BPL.b CODE_829EAB
	LDA.w #$0064
	STA.w $093A,y
CODE_829E9E:
	LDA.w $093A,y
	BNE.b CODE_829EAB
	JSR.w CODE_82C14D
	LDA.w #$FFFF
	STA.b $00,x
CODE_829EAB:
	LDA.w #$0050
	JSR.w CODE_829345
	LDA.b $02,x
	STA.w $095E
	LDA.w #$003C
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$0FFF
	BEQ.b CODE_829EE4
	CMP.w #$0003
	BCS.b CODE_829EE4
	LDA.w $0988,y
	BMI.b CODE_829EE4
	LDA.w $095E
	STA.b $02,x
	LDA.w #$0000
	STA.w $0988,y
CODE_829EE4:
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$00CA
	STA.b $04,x
	RTS

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

CODE_829EEF:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09B8,y
	BMI.b CODE_829F02
	DEC
	STA.w $09B8,y
	BPL.b CODE_829F0F
	LDA.w #$0064
	STA.w $093A,y
CODE_829F02:
	LDA.w $093A,y
	BNE.b CODE_829F0F
	JSR.w CODE_82C14D
	LDA.w #$FFFF
	STA.b $00,x
CODE_829F0F:
	LDA.w #$0050
	JSR.w CODE_829345
	LDA.b $02,x
	STA.w $095E
	LDA.w #$003C
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$0FFF
	BEQ.b CODE_829F48
	CMP.w #$0003
	BCS.b CODE_829F48
	LDA.w $0988,y
	BMI.b CODE_829F48
	LDA.w $095E
	STA.b $02,x
	LDA.w #$0000
	STA.w $0988,y
CODE_829F48:
	TYA
	CLC
	ADC.b $09
	AND.w #$0008
	BEQ.b CODE_829F56
	LDA.w #$2C00
	BRA.b CODE_829F59

CODE_829F56:
	LDA.w #$6C00
CODE_829F59:
	STA.b $06,x
	LDA.w #$0250
	STA.b $04,x
	RTS

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

CODE_829F61:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0EB2
	BEQ.b CODE_829F87
	LDA.w #$00E2
	STA.b $04,x
	LDA.w $09A8,y
	CMP.w #$03C0
	BNE.b CODE_829F7B
	LDA.w #$0000
	STA.w $09B8,y
CODE_829F7B:
	LDA.w $09B8,y
	INC
	STA.w $09B8,y
	CMP.w $09A8,y
	BCC.b CODE_829FAE
CODE_829F87:
	LDA.w #$0000
	STA.w $09B8,y
	LDA.w $09D8,y
	BEQ.b CODE_829FAF
	BMI.b CODE_829F98
	DEC
	STA.w $09D8,y
CODE_829F98:
	LDA.b $00,x
	STA.b $38
	LDA.b $02,x
	STA.b $3A
	LDA.w $0988,y
	STA.b $3C
	LDA.w $0998,y
	ASL
	STA.b $3E
	JSR.w CODE_829FB5
CODE_829FAE:
	RTS

CODE_829FAF:
	LDA.w #$FFFF
	STA.b $00,x
	RTS

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

CODE_829FB5:
	PHY
	LDA.w $0EB2
	CMP.w #$0004
	BCS.b CODE_829FD2
	LDX.w #$0458
	LDY.w #$000E
CODE_829FC4:
	LDA.b $00,x
	BMI.b CODE_829FDD
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_829FC4
CODE_829FD2:
	PLY
	LDA.w $09D8,y
	BMI.b CODE_829FDC
	INC
	STA.w $09D8,y
CODE_829FDC:
	RTS

CODE_829FDD:
	INC.w $0EB2
	LDA.b $38
	STA.b $00,x
	LDA.b $3A
	STA.b $02,x
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$2002
	STA.w $092A,y
	LDA.w #$0000
	STA.w $093A,y
	STA.w $09A8,y
	STA.w $09C8,y
	LDA.w #$001E
	STA.w $091A,y
	LDA.b $3C
	AND.w #$0080
	XBA
	ROL
	ROL
	LDA.b $38
	CMP.w !RAM_PLOK_Level_Player_XPosLo
	BCC.b CODE_82A019
	LDA.w #$0000
	BRA.b CODE_82A01C

CODE_82A019:
	LDA.w #$0001
CODE_82A01C:
	STA.w $0978,y
	LDA.b $3C
	AND.w #$0070
	ASL
	STA.w $0998,y
	LSR
	STA.w $09B8,y
	LDA.b $3C
	AND.w #$000F
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $3E
	PHX
	TAX
	LDA.w DATA_81DD0E,x
	PLX
	STA.w $09D8,y
	AND.w #$8000
	BEQ.b CODE_82A04C
	LDA.w #$F830
	STA.w $0988,y
CODE_82A04C:
	LDA.w $09D8,y
	AND.w #$000C
	LSR
	TAY
	LDA.w DATA_81DD4E,y
	STA.b $06,x
	PLY
	LDA.w $0998,y
	INC
	CMP.w #$0008
	BCC.b CODE_82A066
	LDA.w #$0000
CODE_82A066:
	STA.w $0998,y
	RTS

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

CODE_82A06A:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09A8,y
	BEQ.b CODE_82A07E
	DEC
	STA.w $09A8,y
	BNE.b CODE_82A07E
	LDA.w $092A,y
	INC
	STA.w $092A,y
CODE_82A07E:
	LDA.w $09D8,y
	BPL.b CODE_82A088
	JSR.w CODE_82A0F7
	BRA.b CODE_82A08B

CODE_82A088:
	JSR.w CODE_82A1F1
CODE_82A08B:
	JSR.w CODE_82A08F
	RTS

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

CODE_82A08F:
	LDA.w $09D8,y
	AND.w #$0002
	BEQ.b CODE_82A0F6
	LDA.w $0988,y
	BEQ.b CODE_82A0F6
	TYA
	ASL
	ASL
	ASL
	CLC
	ADC.b $09
	AND.w #$003F
	BNE.b CODE_82A0F6
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C16
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$4001
	STA.w $0AA4
	LDA.w $09D8,y
	BPL.b CODE_82A0F6
	LDA.w #$0226
	JSR.w CODE_82A177
	LDA.w #$000A
	STA.w $09C8,y
	LDA.w #$0064
	STA.w $0AA6
	LDA.w #$0050
	STA.w $0AA8
	LDA.w #$0000
	STA.w $0AA0
	LDA.w #$0001
	STA.w $0AA2
	LDA.b $06,x
	STA.w $0A9E
	JSL.l CODE_82CD44
CODE_82A0F6:
	RTS

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

CODE_82A0F7:
	LDA.w $0988,y
	BMI.b CODE_82A12A
	LDA.w $09C8,y
	BEQ.b CODE_82A107
	DEC
	STA.w $09C8,y
	BRA.b CODE_82A10D

CODE_82A107:
	LDA.w #$021E
	JSR.w CODE_82A177
CODE_82A10D:
	LDA.w #$0001
	STA.b $3A
	JSR.w CODE_82A1A3
	JSR.w CODE_82A1BB
	LDA.b $09
	AND.w #$0003
	BNE.b CODE_82A142
	LDA.w #$0100
	STA.w $0988,y
	LDA.w #$0000
	BRA.b CODE_82A13F

CODE_82A12A:
	LDA.w #$0001
	JSR.w CODE_82A1A3
	LDA.b $09
	AND.w #$000C
	LSR
	CLC
	ADC.w #$0216
	STA.b $04,x
	LDA.w #$0050
CODE_82A13F:
	JSR.w CODE_829345
CODE_82A142:
	LDA.b $02,x
	STA.w $095E
	LDA.w #$004B
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$00FF
	BEQ.b CODE_82A176
	LDA.w $0988,y
	BMI.b CODE_82A176
	LDA.w $095E
	STA.b $02,x
	LDA.w $09D8,y
	AND.w #$7FFF
	STA.w $09D8,y
	JSR.w CODE_82BDD6
CODE_82A176:
	RTS

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

CODE_82A177:
	STA.b $3C
	STZ.b $3A
	LDA.w $09D8,y
	AND.w #$0001
	BEQ.b CODE_82A188
	LDA.w #$0004
	STA.b $3A
CODE_82A188:
	LDA.w $092A,y
	AND.w #$00FF
	CMP.w #$0001
	BNE.b CODE_82A19B
	LDA.b $3A
	CLC
	ADC.w #$0002
	STA.b $3A
CODE_82A19B:
	LDA.b $3C
	CLC
	ADC.b $3A
	STA.b $04,x
	RTS

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

CODE_82A1A3:
	STA.b $38
	LDA.w $0978,y
	BNE.b CODE_82A1B3
	LDA.b $00,x
	SEC
	SBC.b $38
	STA.b $00,x
	BRA.b CODE_82A1BA

CODE_82A1B3:
	LDA.b $00,x
	CLC
	ADC.b $38
	STA.b $00,x
CODE_82A1BA:
	RTS

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

CODE_82A1BB:
	LDA.w $09B8,y
	BPL.b CODE_82A1EA
	LDA.w $0978,y
	EOR.w #$0001
	STA.w $0978,y
	LDA.w $09D8,y
	AND.w #$000C
	LSR
	PHY
	TAY
	LDA.w DATA_81DD4E,y
	STA.b $06,x
	PLY
	LDA.w $0978,y
	BNE.b CODE_82A1E4
	LDA.b $06,x
	ORA.w #$4000
	STA.b $06,x
CODE_82A1E4:
	LDA.w $0998,y
	STA.w $09B8,y
CODE_82A1EA:
	SEC
	SBC.b $3A
	STA.w $09B8,y
	RTS

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

CODE_82A1F1:
	LDA.w $092A,y
	AND.w #$00FF
	CMP.w #$0001
	BNE.b CODE_82A201
	LDA.w #$0019
	BRA.b CODE_82A21E

CODE_82A201:
	LDA.w $09C8,y
	BNE.b CODE_82A21B
	LDA.w $09D8,y
	AND.w #$000C
	LSR
	PHX
	TAX
	LDA.w DATA_81DD5A,x
	STA.b $3A
	PLX
	JSR.w CODE_82A1A3
	JSR.w CODE_82A1BB
CODE_82A21B:
	LDA.w #$0050
CODE_82A21E:
	JSR.w CODE_829345
	LDA.b $02,x
	STA.w $095E
	LDA.w #$003C
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$00FF
	BEQ.b CODE_82A285
	CMP.w #$0003
	BEQ.b CODE_82A285
	LDA.w $0988,y
	BMI.b CODE_82A285
	LDA.w $095E
	STA.b $02,x
	LDA.w $092A,y
	AND.w #$FF00
	ORA.w #$0002
	STA.w $092A,y
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $09C8,y
	BNE.b CODE_82A272
	LDA.w $09D8,y
	AND.w #$000C
	LSR
	PHY
	TAY
	LDA.w DATA_81DD54,y
	PLY
CODE_82A272:
	DEC
	STA.w $09C8,y
	BNE.b CODE_82A285
	LDA.w #$FB50
	STA.w $0988,y
	LDA.w #$0001
	JSL.l CODE_80FD81
CODE_82A285:
	LDA.w $09C8,y
	BNE.b CODE_82A28F
	LDA.w #$0236
	BRA.b CODE_82A292

CODE_82A28F:
	LDA.w #$022A
CODE_82A292:
	JSR.w CODE_82A177
	RTS

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

CODE_82A296:
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	SEC
	SBC.w #$0010
	STA.w $0A9C
	LDA.w #$0016
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0C16
	LDA.w #$0078
	STA.w $0AA6
	LDA.w #$000A
	STA.w $0AA8
	LDA.w #$0000
	STA.w $0AA0
	LDA.w #$0000
	STA.w $0AA2
	LDA.b $06,x
	AND.w #$FF00
	STA.w $0A9E
	JSL.l CODE_82CD44
	LDA.w #$003E
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	RTS

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

CODE_82A2EA:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	CMP.w #$0002
	BCC.b CODE_82A2F7
	JMP.w CODE_82A3A1

CODE_82A2F7:
	LDA.w #$0001
	STA.b $38
	LDA.w $092A,y
	CMP.w #$0003
	BCS.b CODE_82A309
	LDA.w #$0002
	STA.b $38
CODE_82A309:
	LDA.w $0978,y
	BIT.w #$0001
	BNE.b CODE_82A32F
	LDA.w #$6000
	ORA.w DATA_81DE30,y
	STA.b $06,x
	LDA.b $00,x
	SEC
	SBC.b $38
	STA.b $00,x
	CMP.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	BCS.b CODE_82A351
	LDA.w $0978,y
	ORA.w #$0001
	STA.w $0978,y
	BRA.b CODE_82A351

CODE_82A32F:
	LDA.w #$2000
	ORA.w DATA_81DE30,y
	STA.b $06,x
	LDA.b $00,x
	CLC
	ADC.b $38
	STA.b $00,x
	LDA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	CLC
	ADC.w #$0100
	CMP.b $00,x
	BCS.b CODE_82A351
	LDA.w $0978,y
	AND.w #$FFFE
	STA.w $0978,y
CODE_82A351:
	LDA.b $02,x
	CMP.w #$0088
	BCS.b CODE_82A36A
	LDA.w $0988,y
	BPL.b CODE_82A362
	LDA.w #$001E
	BRA.b CODE_82A365

CODE_82A362:
	LDA.w #$0014
CODE_82A365:
	STA.w $09D8,y
	BRA.b CODE_82A37F

CODE_82A36A:
	CMP.w #$0098
	BCC.b CODE_82A37F
	LDA.w $0988,y
	BMI.b CODE_82A379
	LDA.w #$FFE2
	BRA.b CODE_82A37C

CODE_82A379:
	LDA.w #$FFEC
CODE_82A37C:
	STA.w $09D8,y
CODE_82A37F:
	LDA.w $09D8,y
	JSR.w CODE_829345
	LDA.w $0988,y
	BMI.b CODE_82A3A1
	PHX
	LDA.w $09A8,y
	ASL
	TAX
	LDA.w DATA_81DE26,x
	STA.b $38
	PLX
	TYA
	CLC
	ADC.b $09
	AND.b $38
	BNE.b CODE_82A3A1
	JSR.w CODE_82A296
CODE_82A3A1:
	LDA.b $02,x
	STA.w $095E
	LDA.w #$002F
	STA.w $0960
	LDA.w $0978,y
	CMP.w #$0002
	BCC.b CODE_82A3BA
	LDA.w #$003C
	STA.w $0960
CODE_82A3BA:
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$00FF
	BEQ.b CODE_82A3F5
	LDA.w $0988,y
	BMI.b CODE_82A3F5
	LDA.w $095E
	STA.b $02,x
	LDA.w $0978,y
	CMP.w #$0004
	BCS.b CODE_82A3F5
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $0978,y
	CLC
	ADC.w #$0002
	STA.w $0978,y
	LDA.w #$0032
	STA.w $09B8,y
CODE_82A3F5:
	LDA.w $0978,y
	CMP.w #$0002
	BCS.b CODE_82A419
	LDA.b !RAM_PLOK_UnknownRAM00004A
	CMP.w #$8011
	BNE.b CODE_82A459
	JSR.w CODE_82A495
	LDA.w $0978,y
	CLC
	ADC.w #$0002
	STA.w $0978,y
	LDA.w #$0064
	STA.w $09B8,y
	BRA.b CODE_82A459

CODE_82A419:
	LDA.w $0978,y
	CMP.w #$0004
	BCS.b CODE_82A429
	LDA.w #$000F
	JSR.w CODE_829345
	BRA.b CODE_82A459

CODE_82A429:
	CMP.w #$0006
	BCS.b CODE_82A443
	LDA.w $09B8,y
	DEC
	STA.w $09B8,y
	BPL.b CODE_82A459
	LDA.w $0978,y
	CLC
	ADC.w #$0002
	STA.w $0978,y
	BRA.b CODE_82A459

CODE_82A443:
	LDA.w #$FFF6
	JSR.w CODE_829345
	LDA.b $02,x
	CMP.w #$0100
	BCS.b CODE_82A459
	LDA.w $0978,y
	AND.w #$0001
	STA.w $0978,y
CODE_82A459:
	LDA.w $0978,y
	CMP.w #$0002
	BCC.b CODE_82A475
	CMP.w #$0004
	BCS.b CODE_82A46B
	LDA.w #$04DA
	BRA.b CODE_82A490

CODE_82A46B:
	LDA.w $09B8,y
	BMI.b CODE_82A475
	LDA.w #$04D8
	BRA.b CODE_82A490

CODE_82A475:
	PHY
	LDA.w $0988,y
	LDY.w #$0008
CODE_82A47C:
	LDA.b $02,x
	CMP.w DATA_81DE40,y
	BCC.b CODE_82A48A
	DEY
	DEY
	BPL.b CODE_82A47C
	LDY.w #$0000
CODE_82A48A:
	TYA
	CLC
	ADC.w #$04DC
	PLY
CODE_82A490:
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	RTS

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

CODE_82A495:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	LDA.w #$F830
	STA.w $0C20
	STZ.w $0C22
	LDA.w #$0064
	STA.w $0C24
	LDA.w #$0040
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82A4C5:
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82955C
	LDA.b $06,x
	BIT.w #$4000
	BEQ.b CODE_82A4DB
	LDA.w #$0004
	SEC
	SBC.w $094A
	STA.w $094A
CODE_82A4DB:
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0260
	BCS.b CODE_82A4E5
	JMP.w CODE_82A652

CODE_82A4E5:
	LDA.w $0998,y
	BEQ.b CODE_82A4ED
	JMP.w CODE_82A5BD

CODE_82A4ED:
	LDA.w $09B8,y
	BMI.b CODE_82A4F9
	DEC
	STA.w $09B8,y
	JMP.w CODE_82A5B1

CODE_82A4F9:
	LDA.w $09A8,y
	CMP.w #$000A
	BCC.b CODE_82A50B
	LDA.w $09C8,y
	CMP.w #$0012
	BCS.b CODE_82A529
	BRA.b CODE_82A54E

CODE_82A50B:
	ASL
	PHX
	TAX
	LDA.w DATA_81DBB0,x
	PLX
	STA.b $04,x
	LDA.w $09C8,y
	CMP.w #$0001
	BCS.b CODE_82A54E
	LDA.w #$0006
	STA.w $09C8,y
	LDA.w $09A8,y
	INC
	STA.w $09A8,y
CODE_82A529:
	LDA.w $092A,y
	INC
	LSR
	STA.b $38
	LDA.w $09D8,y
	CLC
	ADC.b $38
	CMP.w #$0005
	BCS.b CODE_82A591
	LDA.w $09A8,y
	CMP.w #$0005
	BEQ.b CODE_82A557
	CMP.w #$000A
	BCC.b CODE_82A54E
	LDA.w #$0000
	STA.w $09A8,y
CODE_82A54E:
	LDA.w #$0064
	STA.w $0966
	JMP.w CODE_82A652

CODE_82A557:
	LDA.w $09D8,y
	INC
	STA.w $09D8,y
	LDA.b $00,x
	STA.b $38
	LDA.b $06,x
	BIT.w #$4000
	BEQ.b CODE_82A571
	LDA.b $38
	CLC
	ADC.w #$0030
	BRA.b CODE_82A577

CODE_82A571:
	LDA.b $38
	SEC
	SBC.w #$0030
CODE_82A577:
	STA.b $38
	LDA.b $02,x
	CLC
	ADC.w #$0036
	STA.b $3A
	JSR.w CODE_82A767
	LDA.w #$0018
	JSL.l CODE_80FD81
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDY.b !RAM_PLOK_UnknownRAM000048
	BRA.b CODE_82A54E

CODE_82A591:
	LDA.w $0462
	BPL.b CODE_82A54E
	LDA.w $046C
	BPL.b CODE_82A54E
	LDA.w $0476
	BPL.b CODE_82A54E
	LDA.w $0480
	BPL.b CODE_82A54E
	LDA.w #$0000
	STA.w $09D8,y
	LDA.w #$0001
	STA.w $0998,y
CODE_82A5B1:
	JSR.w CODE_82A6B3
	LDA.w #$0064
	STA.w $0966
	JMP.w CODE_82A652

CODE_82A5BD:
	LDA.w $0998,y
	CMP.w #$0001
	BNE.b CODE_82A61D
	LDA.w #$0050
	JSR.w CODE_829345
	LDA.b $02,x
	AND.w #$FFF0
	CMP.w #$0123
	BCC.b CODE_82A652
	STA.b $02,x
	LDA.w #$0008
	STA.b !RAM_PLOK_UnknownRAM000092
	LDA.w #$0028
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0018
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0002
	STA.w $0998,y
	JSR.w CODE_82A71D
	LDA.w #$0000
	STA.w $0988,y
	LDA.w #$000B
	STA.w $09A8,y
	LDA.w #$0000
	STA.w $09C8,y
	LDA.w #$00C8
	STA.w $09B8,y
	BRA.b CODE_82A652

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

CODE_82A61D:
	LDA.w $09B8,y
	BEQ.b CODE_82A62B
	DEC
	STA.w $09B8,y
	JSR.w CODE_82A69F
	BRA.b CODE_82A652

CODE_82A62B:
	LDA.w #$FFB0
	JSR.w CODE_829345
	LDA.b $02,x
	AND.w #$FFF0
	CMP.w #$0098
	BCS.b CODE_82A652
	LDA.w #$0098
	STA.b $02,x
	LDA.w #$0000
	STA.w $0988,y
	LDA.w #$0000
	STA.w $0998,y
	LDA.w #$00C8
	STA.w $09B8,y
CODE_82A652:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $092A,y
	AND.w #$0001
	BEQ.b CODE_82A661
	LDA.w #$2000
	BRA.b CODE_82A664

CODE_82A661:
	LDA.w #$6000
CODE_82A664:
	STA.b $06,x
	LDA.w $09C8,y
	BEQ.b CODE_82A671
	DEC
	STA.w $09C8,y
	BRA.b CODE_82A69E

CODE_82A671:
	LDA.w #$0014
	STA.w $09C8,y
	LDX.w #$054C
	LDA.w $0998,y
	BNE.b CODE_82A691
	LDX.w #$0550
	LDA.b $31
	AND.w #$00FF
	CMP.w #$0050
	BCS.b CODE_82A699
	LDX.w #$0552
	BRA.b CODE_82A699

CODE_82A691:
	CMP.w #$0001
	BEQ.b CODE_82A699
	LDX.w #$054E
CODE_82A699:
	TXA
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
CODE_82A69E:
	RTS

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

CODE_82A69F:
	LDA.b $09
	AND.w #$003F
	BNE.b CODE_82A71C
	LDA.w #$054C
	STA.b $04,x
	LDA.w #$001E
	STA.w $09C8,y
	BRA.b CODE_82A6D2

CODE_82A6B3:
	LDA.b $09
	AND.w #$003F
	BNE.b CODE_82A71C
	LDA.w $09A8,y
	CMP.w #$000B
	BCS.b CODE_82A6C7
	CMP.w #$000A
	BCC.b CODE_82A71C
CODE_82A6C7:
	LDA.w #$0554
	STA.b $04,x
	LDA.w #$001E
	STA.w $09C8,y
CODE_82A6D2:
	LDA.b $06,x
	BIT.w #$4000
	BNE.b CODE_82A6E1
	LDA.b $00,x
	CLC
	ADC.w #$001A
	BRA.b CODE_82A6E7

CODE_82A6E1:
	LDA.b $00,x
	SEC
	SBC.w #$001A
CODE_82A6E7:
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$4002
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0C16
	LDA.w #$3600
	STA.w $0A9E
	LDA.w #$00C8
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0010
	JSL.l CODE_80FD81
CODE_82A71C:
	RTS

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

CODE_82A71D:
	LDA.b $00,x
	STA.b $06
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$0002
	STA.w $0AA4
	PHX
	LDX.w #$000A
CODE_82A730:
	LDA.w DATA_81DBC4,x
	CLC
	ADC.b $06
	STA.w $0A9A
	LDA.w DATA_81DBD0,x
	STA.w $0A9E
	LDA.w #$00C8
	STA.w $0AA6
	LDA.w #$0028
	STA.w $0AA8
	LDA.w DATA_81DBDC,x
	STA.w $0AA0
	LDA.w #$0001
	STA.w $0AA2
	LDA.w #$00C8
	STA.w $0AA6
	JSL.l CODE_82CD44
	DEX
	DEX
	BPL.b CODE_82A730
	PLX
	RTS

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

CODE_82A767:
	PHY
	LDX.w #$0458
	LDY.w #$000E
CODE_82A76E:
	LDA.b $00,x
	BMI.b CODE_82A77E
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82A76E
	PLY
	RTS

CODE_82A77E:
	PLA
	STA.b $06
	PHY
	LDY.b $06
	LDA.w $092A,y
	AND.w #$0001
	BNE.b CODE_82A791
	LDA.w #$3600
	BRA.b CODE_82A794

CODE_82A791:
	LDA.w #$7600
CODE_82A794:
	STA.b $06,x
	PLY
	STA.w $0978,y
	LDA.b $38
	STA.b $00,x
	LDA.b $3A
	STA.b $02,x
	LDA.w #$0080
	STA.w $0968,y
	LDA.w #$0000
	STA.w $0988,y
	LDA.w #$0003
	STA.w $092A,y
	LDA.w #$0000
	STA.w $093A,y
	LDA.w #$0000
	STA.w $091A,y
	RTS

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

CODE_82A7C1:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$2400
	STA.b $06,x
	LDA.w $09D8,y
	BNE.b CODE_82A7D4
	LDA.w #$2800
	STA.b $06,x
	BRA.b CODE_82A7E0

CODE_82A7D4:
	LDA.b $09
	AND.w #$0008
	BEQ.b CODE_82A7E0
	LDA.w #$6400
	STA.b $06,x
CODE_82A7E0:
	LDA.w #$00E2
	STA.b $04,x
	LDA.b $00,x
	STA.b $38
	LDA.b $02,x
	STA.b $3A
	LDA.w $09B8,y
	INC
	STA.w $09B8,y
	CMP.w $09A8,y
	BCC.b CODE_82A80D
	LDA.w #$0000
	STA.w $09B8,y
	LDA.w $09D8,y
	BEQ.b CODE_82A80D
	BMI.b CODE_82A80A
	DEC
	STA.w $09D8,y
CODE_82A80A:
	JSR.w CODE_82A85B
CODE_82A80D:
	RTS

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

CODE_82A80E:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$2400
	STA.b $06,x
	LDA.w $09D8,y
	BNE.b CODE_82A821
	LDA.w #$2800
	STA.b $06,x
	BRA.b CODE_82A82D

CODE_82A821:
	LDA.b $09
	AND.w #$0008
	BEQ.b CODE_82A82D
	LDA.w #$6400
	STA.b $06,x
CODE_82A82D:
	LDA.w #$020A
	STA.b $04,x
	LDA.b $00,x
	STA.b $38
	LDA.b $02,x
	STA.b $3A
	LDA.w $09B8,y
	INC
	STA.w $09B8,y
	CMP.w $09A8,y
	BCC.b CODE_82A85A
	LDA.w #$0000
	STA.w $09B8,y
	LDA.w $09D8,y
	BEQ.b CODE_82A85A
	BMI.b CODE_82A857
	DEC
	STA.w $09D8,y
CODE_82A857:
	JSR.w CODE_82A85B
CODE_82A85A:
	RTS

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

CODE_82A85B:
	PHY
	LDA.w $0EB2
	CMP.w #$0004
	BCS.b CODE_82A878
	LDX.w #$0458
	LDY.w #$000E
CODE_82A86A:
	LDA.b $00,x
	BMI.b CODE_82A883
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82A86A
CODE_82A878:
	PLY
	LDA.w $09D8,y
	BMI.b CODE_82A882
	INC
	STA.w $09D8,y
CODE_82A882:
	RTS

CODE_82A883:
	PLA
	INC.w $0EB2
	LDA.b $38
	STA.b $00,x
	STA.w $09A8,y
	LDA.b $3A
	STA.b $02,x
	STA.w $09B8,y
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$00E2
	STA.b $04,x
	LDA.w #$0001
	STA.w $092A,y
	LDA.w #$0000
	STA.w $093A,y
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCC.b CODE_82A8C7
	LDA.w #$0021
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0005
	BRA.b CODE_82A8CA

CODE_82A8C7:
	LDA.w #$0019
CODE_82A8CA:
	STA.w $091A,y
	PHY
	TYA
	CLC
	ADC.w #$0008
	TAY
	LDA.w #$0000
	STA.w $0DF2,y
	STA.w $0E0A,y
	STA.w $0E3A,y
	LDA.w #$FDA8
	STA.w $0E22,y
	PLY
	RTS

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

CODE_82A8E8:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $09
	AND.w #$0004
	LSR
	CLC
	ADC.w #$020C
	STA.b $04,x
	LDA.w #$2400
	STA.b $06,x
	JSR.w CODE_82A91F
	JSL.l CODE_82DCAB
	RTS

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

CODE_82A903:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	CLC
	ADC.w #$052C
	STA.b $04,x
	LDA.w #$3400
	STA.b $06,x
	JSR.w CODE_82A91F
	JSL.l CODE_82DCAB
	RTS

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

CODE_82A91F:
	LDA.w $091A,y
	CMP.w #$0005
	BNE.b CODE_82A947
	LDA.b $00,x
	SEC
	SBC.w $09A8,y
	CLC
	ADC.w #$0180
	CMP.w #$0300
	BCS.b CODE_82A963
	LDA.b $02,x
	SEC
	SBC.w $09B8,y
	CLC
	ADC.w #$0180
	CMP.w #$0300
	BCS.b CODE_82A9BF
	BRA.b CODE_82A965

CODE_82A947:
	LDA.b $00,x
	SEC
	SBC.w $09A8,y
	CLC
	ADC.w #$00C0
	CMP.w #$0180
	BCS.b CODE_82A9BF
	LDA.b $02,x
	SEC
	SBC.w $09B8,y
	CLC
	ADC.w #$00C0
	CMP.w #$0180
CODE_82A963:
	BCS.b CODE_82A9BF
CODE_82A965:
	LDA.w $091A,y
	CMP.w #$0005
	BNE.b CODE_82A98D
	LDA.b $00,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0090
	CMP.w #$0120
	BCS.b CODE_82A9BF
	LDA.b $02,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0090
	CMP.w #$0120
	BCS.b CODE_82A9BF
	BRA.b CODE_82A9AB

CODE_82A98D:
	LDA.b $00,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_82A9BF
	LDA.b $02,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0060
	CMP.w #$00C0
	BCS.b CODE_82A9BF
CODE_82A9AB:
	TYA
	CLC
	ADC.w #$0008
	TAY
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0E6A,y
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0E82,y
	BRA.b CODE_82A9D5

CODE_82A9BF:
	LDA.w $09B8,y
	PHA
	LDA.w $09A8,y
	PHA
	TYA
	CLC
	ADC.w #$0008
	TAY
	PLA
	STA.w $0E6A,y
	PLA
	STA.w $0E82,y
CODE_82A9D5:
	TYA
	STA.b $3C
	CLC
	ADC.w $0E6A,y
	STA.w $0E6A,y
	LDA.w $0E82,y
	CLC
	ADC.b $3C
	STA.w $0E82,y
	RTS

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

CODE_82A9E9:
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82AB78
	LDA.w #$0050
	JSR.w CODE_829345
	LDA.b $02,x
	STA.w $095E
	LDA.w #$003C
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$0FFF
	BEQ.b CODE_82AA27
	CMP.w #$0003
	BCS.b CODE_82AA27
	LDA.w $0988,y
	BMI.b CODE_82AA27
	LDA.w $095E
	STA.b $02,x
	LDA.w #$0000
	STA.w $0988,y
CODE_82AA27:
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$01E8
	STA.b $04,x
	RTS

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

CODE_82AA32:
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82AB78
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$01E0
	STA.b $04,x
	RTS

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

CODE_82AA42:
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82AB78
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$01E6
	STA.b $04,x
	RTS

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

CODE_82AA52:
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82AB78
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$01E2
	STA.b $04,x
	JSR.w CODE_82AB0D
	BEQ.b CODE_82AA84
	JSR.w CODE_82BE06
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	CMP.w #$0004
	BCS.b CODE_82AA84
	INC.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	JSL.l CODE_809FE0
	JSL.l CODE_80A50C
	JSR.w CODE_82AAC6
CODE_82AA84:
	RTS

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

CODE_82AA85:
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82AB78
	LDA.w #$2000
	STA.b $06,x
	LDA.w #$01E4
	STA.b $04,x
	JSR.w CODE_82AB0D
	BEQ.b CODE_82AAC5
	JSR.w CODE_82BE06
	LDA.b $00,x
	CLC
	ADC.w #$0020
	STA.b $00,x
	LDA.b $02,x
	SEC
	SBC.w #$0020
	STA.b $02,x
	JSR.w CODE_82BE06
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0004
	STA.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	JSL.l CODE_809FE0
	JSL.l CODE_80A50C
	JSR.w CODE_82AAC6
CODE_82AAC5:
	RTS

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

CODE_82AAC6:
	LDA.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	CMP.w #$0004
	BCC.b CODE_82AB0C
	STZ.w !RAM_PLOK_Level_Player_PlokontinueLetterCount
	LDA.w $0772
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_ScoreMillionsDigit
	STA.w $0774,x
	LDA.w !RAM_PLOK_Level_Player_ScoreTenThousandsDigit
	STA.w $0776,x
	LDA.w !RAM_PLOK_Level_Player_ScoreHundredsDigit
	STA.w $0778,x
	LDA.w $0848
	INC
	STA.w $077A,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	LDY.w $0772
-:
	LDA.w $0848
	INC
	STA.w $077A,X
	TXA
	SEC
	SBC.w #$0008
	TAX
	DEY
	BPL.b -
endif
	LDA.w $0772
	CMP.w #$000F
	BCS.b CODE_82AB0C
	LDX.b !RAM_PLOK_UnknownRAM000046
	PHX
	LDY.b !RAM_PLOK_UnknownRAM000048
	PHY
	JSL.l CODE_80A537
	PLY
	STY.b !RAM_PLOK_UnknownRAM000048
	PLX
	STX.b !RAM_PLOK_UnknownRAM000046
	INC.w $0772
CODE_82AB0C:
	RTS

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

CODE_82AB0D:
	LDA.w $09A8,y
	BEQ.b CODE_82AB74
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$00D0
	SEC
	SBC.b $00,x
	BPL.b CODE_82AB27
	LDA.b $00,x
	SEC
	SBC.w #$0004
	STA.b $00,x
	BRA.b CODE_82AB2F

CODE_82AB27:
	LDA.b $00,x
	CLC
	ADC.w #$0004
	STA.b $00,x
CODE_82AB2F:
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0010
	SEC
	SBC.b $02,x
	BPL.b CODE_82AB44
	LDA.b $02,x
	SEC
	SBC.w #$0004
	STA.b $02,x
	BRA.b CODE_82AB4C

CODE_82AB44:
	LDA.b $02,x
	CLC
	ADC.w #$0004
	STA.b $02,x
CODE_82AB4C:
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CLC
	ADC.w #$00D0
	SEC
	SBC.b $00,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_82AB74
	LDA.b !RAM_PLOK_UnknownRAM00006C
	CLC
	ADC.w #$0010
	SEC
	SBC.b $02,x
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_82AB74
	LDA.w #$FFFF
	RTS

CODE_82AB74:
	LDA.w #$0000
	RTS

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

CODE_82AB78:
	REP.b #$30
	LDA.w $09B8,y
	BMI.b CODE_82AB8B
	DEC
	STA.w $09B8,y
	BPL.b CODE_82AB98
	LDA.w #$0064
	STA.w $093A,y
CODE_82AB8B:
	LDA.w $093A,y
	BNE.b CODE_82AB98
	JSR.w CODE_82C14D
	LDA.w #$FFFF
	STA.b $00,x
CODE_82AB98:
	RTS

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

CODE_82AB99:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09D8,y
	CMP.w #$0001
	BEQ.b CODE_82ABC4
	LDA.w $0978,y
	BNE.b CODE_82ABB7
	LDA.b $00,x
	SEC
	SBC.w $09A8,y
	STA.b $00,x
	LDA.w #$6400
	STA.b $06,x
	BRA.b CODE_82ABC4

CODE_82ABB7:
	LDA.b $00,x
	CLC
	ADC.w $09A8,y
	STA.b $00,x
	LDA.w #$2400
	STA.b $06,x
CODE_82ABC4:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCC.b CODE_82ABDB
	LDA.w $095A
	BNE.b CODE_82ABDB
	LDA.b $06,x
	AND.w #$F1FF
	ORA.w #$0800
	STA.b $06,x
CODE_82ABDB:
	LDA.w #$0050
	JSR.w CODE_829345
	LDA.b $02,x
	CMP.b !RAM_PLOK_UnknownRAM000060
	BCC.b CODE_82AC09
	LDA.w $0A10
	BNE.b CODE_82AC09
	LDA.w $095A
	BNE.b CODE_82AC03
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$0030
	STA.w $0C1E
	JSL.l CODE_82C193
CODE_82AC03:
	LDA.w #$FFFF
	STA.b $00,x
	RTS

CODE_82AC09:
	LDA.b $02,x
	STA.w $095E
	LDA.w #$003C
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$00FF
	BEQ.b CODE_82AC64
	LDA.w $0988,y
	BMI.b CODE_82AC3E
	LDA.w $09D8,y
	CMP.w #$0002
	BNE.b CODE_82AC3E
	JSR.w CODE_82C10B
	LDA.w #$FFFF
	STA.b $00,x
	BRA.b CODE_82AC7F

CODE_82AC3E:
	LDA.w $095E
	STA.b $02,x
	LDA.w #$0000
	STA.w $0988,y
	LDA.w $09D8,y
	BNE.b CODE_82AC7F
	TYA
	CLC
	ADC.b $31
	AND.w #$0003
	BNE.b CODE_82AC64
	LDA.w #$FE70
	STA.w $0988,y
	LDA.w #$0009
	JSL.l CODE_80FD81
CODE_82AC64:
	LDA.w $09D8,y
	CMP.w #$0001
	BNE.b CODE_82AC7F
	LDA.w #$0009
	JSL.l CODE_80FD81
	LDA.w #$0002
	STA.w $09D8,y
	LDA.w DATA_81DE16,y
	STA.w $0988,y
CODE_82AC7F:
	LDA.w $09D8,y
	CMP.w #$0001
	BNE.b CODE_82AC8C
	LDX.w #$0000
	BRA.b CODE_82AC95

CODE_82AC8C:
	TYA
	CLC
	ADC.b $09
	AND.w #$001C
	LSR
	TAX
CODE_82AC95:
	LDA.w DATA_81DD62,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
	RTS

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

CODE_82AC9D:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09B8,y
	BNE.b CODE_82ACB3
	LDA.w $0978,y
	EOR.w #$0001
	STA.w $0978,y
	LDA.w $0998,y
	STA.w $09B8,y
CODE_82ACB3:
	DEC
	STA.w $09B8,y
	XBA
	STA.b $38
	LDA.w $0978,y
	AND.w #$0001
	XBA
	LSR
	STA.b $3A
	LDA.w $092A,y
	AND.w #$007F
	ORA.b $38
	ORA.b $3A
	STA.w $092A,y
	LDA.w $0978,y
	BNE.b CODE_82ACDF
	DEC.b $00,x
	LDA.w #$6400
	STA.b $06,x
	BRA.b CODE_82ACE6

CODE_82ACDF:
	INC.b $00,x
	LDA.w #$2400
	STA.b $06,x
CODE_82ACE6:
	LDA.w #$0050
	JSR.w CODE_829345
	LDA.b $02,x
	CMP.b !RAM_PLOK_UnknownRAM000060
	BCC.b CODE_82AD0A
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$0030
	STA.w $0C1E
	JSL.l CODE_82C193
	LDA.w #$FFFF
	STA.b $00,x
	RTS

CODE_82AD0A:
	LDA.b $02,x
	STA.w $095E
	LDA.w #$004B
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$00FF
	BEQ.b CODE_82AD3F
	LDA.w $0988,y
	BMI.b CODE_82AD3F
	LDA.w $095E
	STA.b $02,x
	LDA.w #$FCE0
	STA.w $0988,y
	LDA.w #$0009
	JSL.l CODE_80FD81
CODE_82AD3F:
	LDA.w $09C8,y
	BEQ.b CODE_82AD48
	DEC
	STA.w $09C8,y
CODE_82AD48:
	LDA.w $09D8,y
	BEQ.b CODE_82AD76
	DEC
	BPL.b CODE_82AD66
	CMP.w #$8000
	BNE.b CODE_82AD5E
	LDA.w #$0007
	STA.w $09C8,y
	LDA.w #$0000
CODE_82AD5E:
	STA.w $09D8,y
	LDA.w #$0218
	BRA.b CODE_82AD79

CODE_82AD66:
	STA.w $09D8,y
	BNE.b CODE_82AD71
	LDA.w #$0007
	STA.w $09C8,y
CODE_82AD71:
	LDA.w #$0214
	BRA.b CODE_82AD79

CODE_82AD76:
	LDA.w #$0210
CODE_82AD79:
	STA.b $38
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	CLC
	ADC.b $38
	STA.b $04,x
	RTS

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

CODE_82AD88:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09D8,y
	BEQ.b CODE_82AD95
	DEC
	STA.w $09D8,y
	BRA.b CODE_82ADB6

CODE_82AD95:
	LDA.w $0978,y
	BNE.b CODE_82ADA9
	LDA.b $00,x
	SEC
	SBC.w $09A8,y
	STA.b $00,x
	LDA.w #$6800
	STA.b $06,x
	BRA.b CODE_82ADB6

CODE_82ADA9:
	LDA.b $00,x
	CLC
	ADC.w $09A8,y
	STA.b $00,x
	LDA.w #$2800
	STA.b $06,x
CODE_82ADB6:
	LDA.w #$003C
	JSR.w CODE_829345
	LDA.b $02,x
	CMP.b !RAM_PLOK_UnknownRAM000060
	BCC.b CODE_82ADDF
	LDA.w $095A
	BNE.b CODE_82ADD9
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$0030
	STA.w $0C1E
	JSL.l CODE_82C193
CODE_82ADD9:
	LDA.w #$FFFF
	STA.b $00,x
	RTS

CODE_82ADDF:
	LDA.b $02,x
	STA.w $095E
	LDA.w #$003C
	STA.w $0960
	LDA.b $00,x
	STA.w $0962
	LDA.w #$001E
	STA.w $0964
	JSR.w CODE_82B648
	AND.w #$00FF
	BEQ.b CODE_82AE2F
	LDA.w $0988,y
	BMI.b CODE_82AE07
	LDA.w $095E
	STA.b $02,x
CODE_82AE07:
	LDA.w #$FE0C
	STA.w $0988,y
	LDA.w #$0029
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$0122
	STA.b $04,x
	LDA.w #$0006
	STA.w $09B8,y
	LDA.w #$FFFF
	STA.w $09C8,y
CODE_82AE2F:
	LDA.w $09B8,y
	DEC
	STA.w $09B8,y
	BPL.b CODE_82AE56
	LDA.w #$0004
	STA.w $09B8,y
	LDA.w $09C8,y
	CMP.w #$0004
	BEQ.b CODE_82AE4A
	INC
	STA.w $09C8,y
CODE_82AE4A:
	LDA.w $09C8,y
	ASL
	TAX
	LDA.w DATA_81DD72,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $04,x
CODE_82AE56:
	RTS

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

CODE_82AE57:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	BEQ.b CODE_82AE65
	CMP.w #$0001
	BNE.b CODE_82AE6C
	DEC.b $00,x
CODE_82AE65:
	LDA.w #$6600
	STA.b $06,x
	BRA.b CODE_82AE73

CODE_82AE6C:
	INC.b $00,x
	LDA.w #$2600
	STA.b $06,x
CODE_82AE73:
	LDA.b $02,x
	CMP.w $09EE,y
	BCC.b CODE_82AEC3
	LDA.w $0988,y
	BEQ.b CODE_82AE88
	LDA.w #$0000
	STA.w $0988,y
	JSR.w CODE_82C180
CODE_82AE88:
	LDA.w $084E
	ASL
	TAX
	LDA.w DATA_81DD7E,x
	CLC
	ADC.w $09EE,y
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $02,x
	LDA.w $09FE,y
	STA.b $00,x
	LDA.w $09B8,y
	DEC
	STA.w $09B8,y
	BNE.b CODE_82AEC9
	LDA.w $092A,y
	ASL
	TAX
	LDA.w DATA_81DCEA,x
	STA.w $09B8,y
	LDA.w DATA_81DD02,x
	STA.w $0988,y
	LDA.w #$0007
	JSL.l CODE_80FD81
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82C1BC
CODE_82AEC3:
	LDA.w #$005A
	JSR.w CODE_829345
CODE_82AEC9:
	LDA.b $09
	AND.w #$0008
	LSR
	LSR
	STA.b $38
	LDA.b $02,x
	CMP.w $09EE,y
	BCC.b CODE_82AEDB
	STZ.b $38
CODE_82AEDB:
	LDA.b $38
	CLC
	ADC.w #$00F2
	STA.b $04,x
	RTS

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

CODE_82AEE4:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	BEQ.b CODE_82AEF2
	CMP.w #$0001
	BNE.b CODE_82AEF9
	DEC.b $00,x
CODE_82AEF2:
	LDA.w #$6600
	STA.b $06,x
	BRA.b CODE_82AF00

CODE_82AEF9:
	INC.b $00,x
	LDA.w #$2600
	STA.b $06,x
CODE_82AF00:
	LDA.b $02,x
	CMP.w $09EE,y
	BCC.b CODE_82AF65
	LDA.w $0988,y
	BEQ.b CODE_82AF15
	LDA.w #$0000
	STA.w $0988,y
	JSR.w CODE_82C180
CODE_82AF15:
	LDA.w $084E
	ASL
	TAX
	LDA.w DATA_81DD7E,x
	CLC
	ADC.w $09EE,y
	LDX.b !RAM_PLOK_UnknownRAM000046
	STA.b $02,x
	LDA.w $09FE,y
	STA.b $00,x
	LDA.w #$0242
	STA.b $3A
	LDA.w $09B8,y
	BMI.b CODE_82AF3D
	DEC
	STA.w $09B8,y
	BEQ.b CODE_82AF3D
	JMP.w CODE_82AFC6

CODE_82AF3D:
	LDA.w $09C8,y
	BEQ.b CODE_82AF48
	DEC
	STA.w $09C8,y
	BRA.b CODE_82AF65

CODE_82AF48:
	LDA.w $092A,y
	ASL
	TAX
	LDA.w DATA_81DD02,x
	STA.w $0988,y
	LDA.w #$0007
	JSL.l CODE_80FD81
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82C1BC
	LDA.w #$0014
	STA.w $09C8,y
CODE_82AF65:
	JSR.w CODE_82970B
	LDA.w $0988,y
	BMI.b CODE_82AFB9
	LDA.w $09B8,y
	BEQ.b CODE_82AF74
	BPL.b CODE_82AFB9
CODE_82AF74:
	LDA.w $084E
	ASL
	TAX
	LDA.w DATA_81DD8A,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	CLC
	ADC.b $02,x
	STA.b $02,x
	TYA
	ASL
	ASL
	CLC
	ADC.b $09
	AND.w #$003F
	BNE.b CODE_82AF94
	LDA.w #$801F
	STA.w $09B8,y
CODE_82AF94:
	LDA.w $09B8,y
	BPL.b CODE_82AFC6
	DEC
	STA.w $09B8,y
	CMP.w #$8000
	BCS.b CODE_82AFAD
	JSR.w CODE_82AFE4
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$0000
	STA.w $09B8,y
CODE_82AFAD:
	AND.w #$000C
	LSR
	TAX
	LDA.w DATA_81DD96,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	BRA.b CODE_82AFE1

CODE_82AFB9:
	LDA.w #$005A
	JSR.w CODE_829345
	LDA.w #$0242
	STA.b $3A
	BRA.b CODE_82AFCB

CODE_82AFC6:
	LDA.w #$0242
	STA.b $3A
CODE_82AFCB:
	LDA.b $09
	AND.w #$0004
	LSR
	STA.b $38
	LDA.b $02,x
	CMP.w $09EE,y
	BCC.b CODE_82AFDC
	STZ.b $38
CODE_82AFDC:
	LDA.b $3A
	CLC
	ADC.b $38
CODE_82AFE1:
	STA.b $04,x
	RTS

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

CODE_82AFE4:
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$140D
	STA.w $0AA4
	LDA.b $06,x
	STA.w $0A9E
	LDA.w #$0050
	STA.w $0AA8
	LDA.b $09
	AND.w #$01C0
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.b $38
	TYA
	CLC
	ADC.b $38
	AND.w #$000E
	TAX
	LDA.w DATA_81D9CC,x
	STA.w $0AA0
	LDA.w #$0002
	STA.w $0AA2
	LDA.w #$00C8
	STA.w $0AA6
	JSL.l CODE_82CD44
	RTS

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

CODE_82B02A:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0978,y
	STA.b $06,x
	LDA.w $09B8,y
	BNE.b CODE_82B066
	LDA.b $00,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0050
	CMP.w #$00A0
	BCS.b CODE_82B054
	LDA.b $02,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0028
	CMP.w #$0050
	BCC.b CODE_82B05A
CODE_82B054:
	LDA.w #$0006
	JMP.w CODE_82B0FE

CODE_82B05A:
	LDA.w #$0000
	STA.w $0998,y
	LDA.w #$000F
	STA.w $09B8,y
CODE_82B066:
	LDA.w $09B8,y
	CMP.w #$0001
	BNE.b CODE_82B0CE
	LDA.w $092A,y
	BNE.b CODE_82B07A
	LDA.w #$000A
	JSR.w CODE_829C4B
	RTS

CODE_82B07A:
	JSR.w CODE_82970B
	LDA.b $09
	AND.w #$003F
	BNE.b CODE_82B0D2
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	CLC
	ADC.w #$0014
	STA.w $0A9C
	LDA.w #$0002
	STA.w $0AA4
	LDA.b $06,x
	AND.w #$4000
	ORA.w #$0A00
	STA.w $0A9E
	LDA.w #$0019
	STA.w $0AA8
	LDA.w #$FED4
	STA.w $0AA0
	LDA.w #$0003
	STA.w $0AA2
	LDA.w #$0064
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$000D
	JSL.l CODE_80FD81
	LDA.w #$000A
	STA.w $0998,y
	BRA.b CODE_82B0D2

CODE_82B0CE:
	DEC
	STA.w $09B8,y
CODE_82B0D2:
	LDA.w $092A,y
	BNE.b CODE_82B0E9
	JSR.w CODE_82970B
	LDA.w $09B8,y
	AND.w #$0030
	LSR
	LSR
	LSR
	CLC
	ADC.w #$012E
	BRA.b CODE_82B102

CODE_82B0E9:
	LDA.w $09B8,y
	AND.w #$003C
	LSR
	BNE.b CODE_82B0FE
	LDA.w $0998,y
	BEQ.b CODE_82B0FE
	DEC
	STA.w $0998,y
	LDA.w #$0008
CODE_82B0FE:
	CLC
	ADC.w #$00D8
CODE_82B102:
	STA.b $04,x
	RTS

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

CODE_82B105:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09B8,y
	BEQ.b CODE_82B134
	DEC
	STA.w $09B8,y
	BNE.b CODE_82B11B
	LDA.w $092A,y
	DEC
	STA.w $092A,y
	BRA.b CODE_82B131

CODE_82B11B:
	LDA.w $092A,y
	BEQ.b CODE_82B131
	LDA.w $09B8,y
	AND.w #$0006
	TAX
	LDA.w DATA_81DDAE,x
	LDX.b !RAM_PLOK_UnknownRAM000046
	CLC
	ADC.b $00,x
	STA.b $00,x
CODE_82B131:
	LDA.w $09B8,y
CODE_82B134:
	BNE.b CODE_82B175
	LDA.w $092A,y
	BNE.b CODE_82B175
	LDA.w $09A8,y
	BEQ.b CODE_82B16D
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_AkrillicCrashingRocks
	BCC.b CODE_82B14D
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BNE.b CODE_82B16D
CODE_82B14D:
	LDA.b $00,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	SEP.b #$20
	STA.w $067A
	REP.b #$20
	LDA.b $02,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	SEP.b #$20
	STA.w $067B
	REP.b #$20
	LDA.w #$0001
	STA.w $0A10
	BRA.b CODE_82B170

CODE_82B16D:
	JSR.w CODE_82B186
CODE_82B170:
	LDA.w #$FFFF
	STA.b $00,x
CODE_82B175:
	LDA.w $092A,y
	DEC
	ASL
	CLC
	ADC.w #$00E4
	STA.b $04,x
	LDA.w #$2200
	STA.b $06,x
	RTS

CODE_82B186:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0000
	STA.w $0C1A
	LDA.w #$F63C
	STA.w $0C20
	LDA.w #$0002
	STA.w $0C22
	LDA.w #$00C8
	STA.w $0C24
	LDA.w #$003C
	STA.w $0C26
	LDA.w #$3200
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$7200
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$FC18
	STA.w $0C20
	LDA.w #$B200
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$F200
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82B1DD:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$2400
	STA.b $06,x
	JSR.w CODE_82970B
	LDA.w $0940
	BNE.b CODE_82B25E
	LDA.w $09C6
	BMI.b CODE_82B1FC
	CPY.w #$000E
	BNE.b CODE_82B25E
	DEC
	STA.w $09C6
	BNE.b CODE_82B25E
CODE_82B1FC:
	LDA.w $0EB4
	BNE.b CODE_82B25E
	LDA.w $0996
	CMP.w #$0010
	BCS.b CODE_82B25E
	LDA.w $09B6
	ASL
	PHY
	TAY
	LDA.w DATA_81D9E2,y
	STA.b $38
	PLY
	CPY.b $38
	BNE.b CODE_82B25E
	LDA.w $0998,y
	BNE.b CODE_82B25E
	LDA.w DATA_81DA02,y
	PHY
	TAY
	LDA.w $0892,y
	PLY
	CMP.w #$0000
	BNE.b CODE_82B25E
	LDA.w #$0001
	STA.w $0998,y
	INC.w $0996
	LDA.w #$0000
	STA.w $09C8,y
	LDA.w $09B6
	INC
	AND.w #$000F
	STA.w $09B6
	PHY
	LDA.w $0930
	ASL
	TAY
	LDA.w DATA_81DA66,y
	PLY
	STA.w $09C6
	LDA.w DATA_81DA02,y
	PHY
	TAY
	LDA.w #$0001
	STA.w $08B2,y
	PLY
CODE_82B25E:
	LDA.w $0998,y
	BNE.b CODE_82B266
	JMP.w CODE_82B2DB

CODE_82B266:
	LDA.w $09C8,y
	DEC
	STA.w $09C8,y
	BPL.b CODE_82B297
	LDA.w $0998,y
	ASL
	ASL
	PHX
	TAX
	LDA.w DATA_81DA12,x
	STA.w $09D8,y
	LDA.w DATA_81DA12+$02,x
	STA.w $09C8,y
	PLX
	LDA.w $0998,y
	INC
	STA.w $0998,y
	CMP.w #$000A
	BCC.b CODE_82B297
	LDA.w #$0000
	STA.w $0998,y
	BRA.b CODE_82B2DB

CODE_82B297:
	LDA.w $09D8,y
	BEQ.b CODE_82B2DB
	DEC
	BEQ.b CODE_82B2CF
	DEC
	BEQ.b CODE_82B2D6
	DEC
	BEQ.b CODE_82B2CA
	DEC
	BEQ.b CODE_82B2AA
	BRA.b CODE_82B2DB

CODE_82B2AA:
	LDA.b $02,x
	CMP.w #$0160
	BCC.b CODE_82B2BE
	LDA.w #$0000
	STA.w $0998,y
	LDA.w #$0160
	STA.b $02,x
	BRA.b CODE_82B2DB

CODE_82B2BE:
	INC
	INC
	STA.b $02,x
	LDA.w #$000A
	STA.w $09C8,y
	BRA.b CODE_82B2DB

CODE_82B2CA:
	JSR.w CODE_82B2EA
	BRA.b CODE_82B2DB

CODE_82B2CF:
	LDA.b $02,x
	DEC
	STA.b $02,x
	BRA.b CODE_82B2DB

CODE_82B2D6:
	LDA.b $02,x
	INC
	STA.b $02,x
CODE_82B2DB:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09D8,y
	PHY
	ASL
	TAY
	LDA.w DATA_81DA36,y
	PLY
	STA.b $04,x
	RTS

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

CODE_82B2EA:
	LDA.b $09
	AND.w #$000F
	BNE.b CODE_82B328
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$4017
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0C16
	LDA.w #$3A00
	STA.w $0A9E
	LDA.w #$0118
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0005
	JSL.l CODE_80FD81
CODE_82B328:
	RTS

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

CODE_82B329:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$1000
	STA.b $00,x
	LDA.w $0996
	CMP.w #$0010
	BCC.b CODE_82B38C
	LDA.w $08B0
	ORA.w $08AE
	ORA.w $08AC
	ORA.w $08AA
	BNE.b CODE_82B378
	LDA.w $0988,y
	BNE.b CODE_82B363
	LDA.w #$00AA
	STA.w $093A,y
	LDA.w #$0001
	STA.w $08C4
	LDA.w #$0001
	STA.w $0988,y
	LDA.w #$0000
	STA.w $09A8,y
CODE_82B363:
	LDA.w $093A,y
	BNE.b CODE_82B378
	LDA.w #$02A8
	STA.b $00,x
	LDA.w $0978,y
	STA.b $06,x
	JSR.w CODE_82B392
	JSR.w CODE_82B3C9
CODE_82B378:
	LDA.w $093A,y
	BEQ.b CODE_82B38C
	CMP.w #$0032
	BCS.b CODE_82B38C
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_82B38C
	JSR.w CODE_82B445
CODE_82B38C:
	LDA.w #$00E2
	STA.b $04,x
	RTS

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

CODE_82B392:
	LDA.w $09B8,y
	BEQ.b CODE_82B39D
	DEC
	STA.w $09B8,y
	BRA.b CODE_82B3C8

CODE_82B39D:
	LDA.w $09A8,y
	PHX
	TAX
CODE_82B3A2:
	LDA.w DATA_81DA44,x
	CMP.w #$FFFF
	BNE.b CODE_82B3AF
	LDX.w #$0000
	BRA.b CODE_82B3A2

CODE_82B3AF:
	STA.w $09B8,y
	INX
	INX
	LDA.w DATA_81DA44,x
	STA.w $09C8,y
	INX
	INX
	TXA
	STA.w $09A8,y
	PLX
	LDA.w #$0010
	JSL.l CODE_80FD81
CODE_82B3C8:
	RTS

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

CODE_82B3C9:
	LDA.w $09C8,y
	AND.w #$0FFF
	BEQ.b CODE_82B3D9
	LDA.w $09C8,y
	DEC
	STA.w $09C8,y
	RTS

CODE_82B3D9:
	LDA.b $09
	AND.w #$0007
	BNE.b CODE_82B444
	LDA.b $00,x
	SEC
	SBC.w #$0020
	STA.w $0A9A
	LDA.b $02,x
	SEC
	SBC.w #$0010
	STA.w $0A9C
	LDA.w #$1018
	STA.w $0AA4
	LDA.w #$5400
	STA.w $0A9E
	LDA.w #$001E
	STA.w $0AA8
	LDA.w $09C8,y
	XBA
	LSR
	LSR
	LSR
	LSR
	STA.w $0AA2
	LDA.w $09B8,y
	AND.w #$007C
	STA.b $38
	LDA.w #$00A0
	SEC
	SBC.b $38
	ASL
	ASL
	ASL
	EOR.w #$FFFF
	STA.w $0AA0
	LDA.w #$00FF
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.b $09
	AND.w #$0008
	BNE.b CODE_82B43E
	LDA.w #$0001
	STA.w $08C6
	RTS

CODE_82B43E:
	LDA.w #$0001
	STA.w $08C8
CODE_82B444:
	RTS

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

CODE_82B445:
	LDA.w #$0017
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.b $00,x
	LDA.w #$02A8
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.b $09
	AND.w #$0008
	BNE.b CODE_82B46D
	LDA.w #$1019
	BRA.b CODE_82B470

CODE_82B46D:
	LDA.w #$1018
CODE_82B470:
	STA.w $0AA4
	LDA.w #$5800
	STA.w $0A9E
	LDA.w #$0014
	STA.w $0AA8
	LDA.w #$0001
	STA.w $0AA2
	LDA.w $093A,y
	ASL
	ASL
	ASL
	ASL
	EOR.w #$FFFF
	STA.w $0AA0
	LDA.w #$00B4
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0002
	STA.w $0AA2
	JSL.l CODE_82CD44
	RTS

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

CODE_82B4A7:
	LDX.b !RAM_PLOK_UnknownRAM000046
	TYA
	CLC
	ADC.w #$01D0
	STA.b $04,x
	LDA.w #$3000
	STA.b $06,x
	LDX.w DATA_81DE4A,y
	LDA.w #$FFF0
	STA.b $3C
	LDA.w $0A14,y
	STA.b $38
	LDA.w #$007F
	STA.b $3A
	JSR.w CODE_82B5EC
	LDA.w #$FFF8
	STA.b $3C
	LDA.w #$0068
	STA.b $3A
	TXA
	CLC
	ADC.w #$0008
	TAX
	JSR.w CODE_82B5EC
	JSR.w CODE_82B5B0
	LDA.w #$0050
	STA.b $3A
	TXA
	CLC
	ADC.w #$0008
	TAX
	JSR.w CODE_82B5EC
	JSR.w CODE_82B5DF
	LDA.w #$0038
	STA.b $3A
	TXA
	CLC
	ADC.w #$0008
	TAX
	JSR.w CODE_82B5EC
	JSR.w CODE_82B5DF
	LDA.w #$0020
	STA.b $3A
	TXA
	CLC
	ADC.w #$0008
	TAX
	JSR.w CODE_82B5EC
	JSR.w CODE_82B5DF
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $0988,y
	STA.b $38
	LDA.w $09B8,y
	STA.b $3A
	LDA.w $0A24,y
	CLC
	ADC.w $0A34,y
	PHA
	AND.w #$00FF
	STA.w $0A34,y
	PLA
	XBA
	AND.w #$00FF
	CLC
	ADC.w $0A14,y
	AND.w #$00FF
	STA.w $0A14,y
	LDA.b $38
	BEQ.b CODE_82B577
	LDA.w $0A14,y
	AND.w #$00FF
	BNE.b CODE_82B561
	LDA.w $0A24,y
	BPL.b CODE_82B554
	CMP.w #$FF80
	BCC.b CODE_82B577
	BRA.b CODE_82B559

CODE_82B554:
	CMP.w #$0080
	BCS.b CODE_82B577
CODE_82B559:
	LDA.w #$0000
	STA.w $0A24,y
	BRA.b CODE_82B577

CODE_82B561:
	CMP.w #$0080
	BCS.b CODE_82B56E
	LDA.w $0A24,y
	SEC
	SBC.b $38
	BRA.b CODE_82B574

CODE_82B56E:
	LDA.w $0A24,y
	CLC
	ADC.b $38
CODE_82B574:
	STA.w $0A24,y
CODE_82B577:
	LDA.b $3A
	BEQ.b CODE_82B595
	LDA.w $0A24,y
	BPL.b CODE_82B58A
	CLC
	ADC.b $3A
	BCC.b CODE_82B592
	LDA.w #$0000
	BRA.b CODE_82B592

CODE_82B58A:
	SEC
	SBC.b $3A
	BCS.b CODE_82B592
	LDA.w #$0000
CODE_82B592:
	STA.w $0A24,y
CODE_82B595:
	LDA.w $0A24,y
	BMI.b CODE_82B5A4
	CMP.w #$0800
	BCC.b CODE_82B5AF
	LDA.w #$0800
	BRA.b CODE_82B5AC

CODE_82B5A4:
	CMP.w #$F800
	BCS.b CODE_82B5AF
	LDA.w #$F800
CODE_82B5AC:
	STA.w $0A24,y
CODE_82B5AF:
	RTS

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

CODE_82B5B0:
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $0A24,y
	BEQ.b CODE_82B5C2
	BPL.b CODE_82B5BC
	EOR.w #$FFFF
CODE_82B5BC:
	ASL
	ASL
	XBA
	AND.w #$00FF
CODE_82B5C2:
	CLC
	ADC.w $0A64,y
	STA.w $0A64,y
	CMP.w #$0020
	BCC.b CODE_82B5DF
	SEC
	SBC.w #$0020
	STA.w $0A64,y
	LDA.w $0A74,y
	INC
	AND.w #$0001
	STA.w $0A74,y
CODE_82B5DF:
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $0A74,y
	ASL
	TAY
	LDA.w DATA_818042,y
	STA.b $06,x
	RTS

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

CODE_82B5EC:
	LDA.b $38
	AND.w #$00FF
	ASL
	TAY
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	PHX
	TYX
	LDA.l DATA_81D2E6,x
	PLX
else
	LDA.w DATA_81D2E6,y
endif
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b $3A
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	BPL.b CODE_82B610
	ORA.w #$00FF
	BRA.b CODE_82B613

CODE_82B610:
	AND.w #$FF00
CODE_82B613:
	XBA
	CLC
	ADC.b $3C
	STA.b $02,x
	LDA.b $38
	CLC
	ADC.w #$0040
	AND.w #$00FF
	ASL
	TAY
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	PHX
	TYX
	LDA.l DATA_81D2E6,x
	PLX
else
	LDA.w DATA_81D2E6,y
endif
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	LDA.b $3A
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w !REGISTER_PPUMultiplicationProductMid
	BPL.b CODE_82B641
	ORA.w #$00FF
	BRA.b CODE_82B644

CODE_82B641:
	AND.w #$FF00
CODE_82B644:
	XBA
	STA.b $04,x
	RTS

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

CODE_82B648:
	REP.b #$30
	PHX
	PHY
	LDA.w $095E
	AND.w #$FFF0
	CLC
	ADC.w $0960
	TAY
	LDA.w $0962
	CLC
	ADC.w $0964
	TAX
	JSL.l CODE_80FC03
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_82B677
	AND.w #$0FFF
	CMP.w #$0008
	BCS.b CODE_82B674
	CMP.w #$0000
	BNE.b CODE_82B681
CODE_82B674:
	JMP.w CODE_82B701

CODE_82B677:
	AND.w #$0FFF
	BEQ.b CODE_82B674
	CMP.w #$0003
	BCS.b CODE_82B6B5
CODE_82B681:
	LDA.w $095E
	AND.w #$FFF0
	STA.w $095E
	CLC
	ADC.w $0960
	SEC
	SBC.w #$0010
	TAY
	LDA.w $0962
	CLC
	ADC.w $0964
	TAX
	JSL.l CODE_80FC03
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BMI.b CODE_82B6FC
	AND.w #$0FFF
	CMP.w #$0003
	BCC.b CODE_82B6FC
	LDA.w $095E
	SEC
	SBC.w #$0008
	STA.w $095E
CODE_82B6B5:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	SEC
	SBC.w #$0003
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $38
	LDA.w $0962
	CLC
	ADC.w $0964
	AND.w #$000E
	TAX
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$4000
	BEQ.b CODE_82B6DD
	TXA
	EOR.w #$000F
	BRA.b CODE_82B6DF

CODE_82B6DD:
	TXA
	INC
CODE_82B6DF:
	ASL
	CLC
	ADC.b $38
	TAX
	BRA.b CODE_82B6E6

CODE_82B6E6:
	LDA.w $095E
	AND.w #$FFF0
	STX.w $095C
	CLC
	ADC.l DATA_83E964,x
	STA.w $095E
	LDA.w #$0002
	BRA.b CODE_82B737

CODE_82B6FC:
	LDA.w #$0001
	BRA.b CODE_82B737

CODE_82B701:
	LDA.w $095E
	AND.w #$FFF0
	CLC
	ADC.w $0960
	SEC
	SBC.w #$001E
	TAY
	LDA.w $0962
	CLC
	ADC.w $0964
	TAX
	JSL.l CODE_80FC03
	BEQ.b CODE_82B734
	LDA.b !RAM_PLOK_UnknownRAM00004A
	CMP.w #$0002
	BEQ.b CODE_82B734
	BPL.b CODE_82B72F
	AND.w #$0FFF
	CMP.w #$0008
	BCS.b CODE_82B734
CODE_82B72F:
	LDA.w #$0003
	BRA.b CODE_82B737

CODE_82B734:
	LDA.w #$0000
CODE_82B737:
	PLY
	PLX
	RTS

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

CODE_82B73A:
	REP.b #$30
	PHX
	PHY
	LDA.w $095E
	AND.w #$FFF0
	CLC
	ADC.w $0960
	TAY
	LDA.w $0962
	CLC
	ADC.w $0964
	TAX
	JSL.l CODE_80FC03
	BEQ.b CODE_82B737
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_82B768
	AND.w #$0FFF
	CMP.w #$0008
	BCC.b CODE_82B768
	LDA.w #$0000
	BRA.b CODE_82B737

CODE_82B768:
	LDA.w #$0001
	BRA.b CODE_82B737

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

CODE_82B76D:
	REP.b #$30
	LDY.w #$0006
	LDX.w #!RAM_PLOK_Level_Player_FlyingLimbTable
CODE_82B775:
	LDA.b $00,x
	BMI.b CODE_82B784
	LDA.w $0A86
	AND.w DATA_81851C,y
	BNE.b CODE_82B784
	JSR.w CODE_82B78F
CODE_82B784:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82B775
	RTL

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

CODE_82B78F:
	STX.b !RAM_PLOK_UnknownRAM000046
	STY.b !RAM_PLOK_UnknownRAM000048
	LDA.b $00,x
	STA.b $38
	LDA.b $02,x
	CLC
	ADC.w #$0008
	STA.b $3A
	LDX.w #$0458
	LDY.w #$000E
CODE_82B7A5:
	LDA.b $00,x
	BMI.b CODE_82B804
	JSL.l CODE_82B816
	LDA.b $00,x
	SEC
	SBC.b $38
	CLC
	ADC.b $3C
	CMP.b $3E
	BCS.b CODE_82B804
	LDA.b $02,x
	SEC
	SBC.b $3A
	CLC
	ADC.b $40
	CMP.b $42
	BCS.b CODE_82B804
	LDA.w $093A,y
	BEQ.b CODE_82B7D4
	LDA.w $091A,y
	CMP.w #$0011
	BEQ.b CODE_82B804
	BRA.b CODE_82B7FA

CODE_82B7D4:
	STX.b $38
	BRA.b CODE_82B7E1

CODE_82B7D8:
	LDA.w $091A,y
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $08,x
	BEQ.b CODE_82B811
CODE_82B7E1:
	LDA.w $091A,y
	ASL
	TAX
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BEQ.b CODE_82B7F0
	LDA.w DATA_8185D4,x
	BNE.b CODE_82B7F5
CODE_82B7F0:
	LDA.w DATA_81862C,x
	BEQ.b CODE_82B811
CODE_82B7F5:
	JSR.w (DATA_8289B2,x)
	BMI.b CODE_82B811
CODE_82B7FA:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDY.b !RAM_PLOK_UnknownRAM000048
	JSL.l CODE_80BBC7
	BRA.b CODE_82B811

CODE_82B804:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BMI.b CODE_82B811
	JMP.w CODE_82B7A5

CODE_82B811:
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDX.b !RAM_PLOK_UnknownRAM000046
	RTS

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

CODE_82B816:
	PHY
	LDA.w $091A,y
	ASL
	ASL
	TAY
	LDA.w DATA_818524,y
	STA.b $3C
	ASL
	STA.b $3E
	LDA.w DATA_818524+$02,y
	STA.b $40
	ASL
	STA.b $42
	PLY
	RTL

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

CODE_82B82F:
	JSR.w (DATA_8289B2,x)
	RTL

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

CODE_82B833:
	LDA.w #$0708
	STA.w $09EA
	LDA.w $0978,y
	AND.w #$0001
	BNE.b CODE_82B869
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.b $3A
	LDA.w $0978,y
	AND.w #$BFFF
	ORA.b $3A
	STA.w $0978,y
	LDA.w #$FC18
	STA.w $0988,y
	LDA.w #$0011
	JSL.l CODE_80FD81
	LDA.w #$03E8
	JSR.w CODE_82B901
	RTS

CODE_82B869:
	LDX.b $38
	LDA.w $0968,y
	BMI.b CODE_82B89E
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitTheFleaQueen
	BEQ.b CODE_82B8A2
	LDA.w $092A,y
	DEC
	BEQ.b CODE_82B8A2
	STA.w $092A,y
	DEC
	ASL
	TAX
	LDA.w $0978,y
	AND.w #$F1FF
	ORA.w DATA_81D994,x
	STA.w $0978,y
	LDA.w #$004B
	STA.w $093A,y
	JSR.w CODE_82B8F0
	LDX.b $38
	JSR.w CODE_82BDD6
CODE_82B89E:
	LDA.w #$0000
	RTS

CODE_82B8A2:
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCC.b CODE_82B8AF
	JSR.w CODE_82C0D2
	BRA.b CODE_82B8B2

CODE_82B8AF:
	JSR.w CODE_82C099
CODE_82B8B2:
	JSR.w CODE_82BD79
	LDA.w #$0018
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_FleapitCyclingClever
	BCS.b CODE_82B8DE
	LDA.w #$0008
	JSL.l CODE_80A79D
	PHX
	LDX.w $090A,y
	STZ.w $1020,x
	PLX
	INC.w $08F6
CODE_82B8DE:
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

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

CODE_82B8E7:
	JSR.w CODE_82C099
	LDA.w #$FFFF
	STA.b $00,x
	RTS

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

CODE_82B8F0:
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BNE.b CODE_82B8FA
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BEQ.b CODE_82B900
CODE_82B8FA:
	LDA.w #$000A
	STA.w $093A,y
CODE_82B900:
	RTS

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

CODE_82B901:
	REP.b #$30
	STA.b $40
	PHX
	LDA.w $0968,y
	CMP.w #$0064
	BCC.b CODE_82B919
	SEC
	SBC.b $40
	BCS.b CODE_82B916
	LDA.w #$005A
CODE_82B916:
	STA.w $0968,y
CODE_82B919:
	PLX
	RTS

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

CODE_82B91B:
	LDX.b $38
	LDA.w $092A,y
	CMP.w #$0009
	BCS.b CODE_82B932
	LDA.w $0968,y
	BEQ.b CODE_82B932
	DEC
	STA.w $0968,y
	LDA.w #$0000
	RTS

CODE_82B932:
	LDA.w $09D8,y
	STA.w $0968,y
	LDA.w $092A,y
	CMP.w #$000A
	BCC.b CODE_82B962
	PHA
	JSR.w CODE_82BD79
	PLA
	CMP.w #$000B
	BCC.b CODE_82B95A
	LDA.w #$04D6
	STA.b $04,x
	LDA.w #$0000
	STA.w $09A8,y
	STA.w $09B8,y
	BRA.b CODE_82B9BF

CODE_82B95A:
	LDA.w #$0001
	STA.w $08CE
	BRA.b CODE_82B9BF

CODE_82B962:
	LDA.w $092A,y
	CMP.w #$0002
	BCC.b CODE_82B9B4
	PHY
	DEC
	DEC
	ASL
	TAY
	LDA.b $00,x
	CLC
	ADC.w DATA_81DB40,y
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w DATA_81DB50,y
	STA.w $0C1E
	LDA.w #$0012
	STA.w $0C1A
	LDA.w #$FB50
	STA.w $0C20
	LDA.w #$0001
	STA.w $0C22
	LDA.w #$0050
	STA.w $0C24
	LDA.w #$0064
	STA.w $0C26
	LDA.w DATA_81DB40,y
	BMI.b CODE_82B9A9
	LDA.w #$7000
	BRA.b CODE_82B9AC

CODE_82B9A9:
	LDA.w #$3000
CODE_82B9AC:
	STA.w $0C28
	PLY
	JSL.l CODE_82D5AB
CODE_82B9B4:
	PHY
	LDX.b $38
	LDA.w #$0010
	JSL.l CODE_80A79D
	PLY
CODE_82B9BF:
	LDA.w $092A,y
	DEC
	STA.w $092A,y
	BNE.b CODE_82B9DD
	LDA.w #$0460
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	JSL.l CODE_82D3CB
	JSR.w CODE_82BD79
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

CODE_82B9DD:
	LDA.w #$0064
	STA.w $093A,y
	LDA.w #$0000
	RTS

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

CODE_82B9E7:
	LDX.b $38
	LDA.w #$000F
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$000A
	STA.w $093A,y
	LDA.w $09EE,y
	CLC
	ADC.w #$0100
	STA.w $09EE,y
	LDA.w #$0000
	RTS

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

CODE_82BA0C:
	LDX.b $38
	LDA.w $092A,y
	DEC
	BNE.b CODE_82BA27
	JSR.w CODE_82BD79
	LDA.w #$0013
	JSR.w CODE_829C4B
	LDA.w #$0000
	STA.w $092A,y
	LDA.w #$0000
	RTS

CODE_82BA27:
	STA.w $092A,y
	LDA.w #$0014
	STA.w $093A,y
	LDA.w #$0017
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

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

CODE_82BA43:
	LDX.b $38
	LDA.w $092A,y
	DEC
	BNE.b CODE_82BA5D
	DEC.w $0EB2
	JSR.w CODE_82C14D
	JSR.w CODE_82C099
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

CODE_82BA5D:
	STA.w $092A,y
	LDA.w #$0014
	STA.w $093A,y
	LDA.w #$0000
	RTS

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

CODE_82BA6A:
	LDX.b $38
	JSR.w CODE_82C10B
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

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

CODE_82BA78:
	LDX.b $38
	LDA.w $092A,y
	ASL
	TAX
	LDA.w DATA_81DCEA,x
	STA.w $09B8,y
	LDA.w #$FC18
	STA.w $0988,y
	LDA.w #$0028
	STA.w $093A,y
	JSR.w CODE_82B8F0
	LDA.w #$0000
	RTS

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

CODE_82BA98:
	LDX.b $38
	LDA.w $09D8,y
	AND.w #$0001
	BEQ.b CODE_82BAE6
	PHY
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $0824,y
	BPL.b CODE_82BAD7
	PLY
	LDA.b $06,x
	AND.w #$4000
	BNE.b CODE_82BADF
CODE_82BAB2:
	LDA.w #$004F
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	JMP.w CODE_82BB6C

CODE_82BAC4:
	LDA.w $09D8,y
	AND.w #$FFFE
	STA.w $09D8,y
	LDA.w #$0002
	STA.w $092A,y
	LDA.w #$0000
	RTS

CODE_82BAD7:
	PLY
	LDA.b $06,x
	AND.w #$4000
	BNE.b CODE_82BAB2
CODE_82BADF:
	LDA.b $06,x
	EOR.w #$4000
	STA.b $06,x
CODE_82BAE6:
	LDA.w $092A,y
	DEC
	STA.b $3C
	AND.w #$00FF
	BNE.b CODE_82BB39
	JSR.w CODE_82C060
	LDA.w $091A,y
	CMP.w #$001F
	BEQ.b CODE_82BAFF
	DEC.w $0EB2
CODE_82BAFF:
	JSR.w CODE_82BD79
	LDA.w $09D8,y
	AND.w #$0001
	BEQ.b CODE_82BB21
	LDA.w #$000A
	JSR.w CODE_829C4B
	LDA.w #$000F
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	BRA.b CODE_82BB35

CODE_82BB21:
	LDA.w #$000F
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$FFFF
	STA.b $00,x
CODE_82BB35:
	LDA.w #$0000
	RTS

CODE_82BB39:
	LDA.w #$0000
	STA.w $09C8,y
	LDA.w $09D8,y
	BPL.b CODE_82BB4C
	AND.w #$7FFF
	STA.w $09D8,y
	BRA.b CODE_82BB52

CODE_82BB4C:
	LDA.w #$FCE0
	STA.w $0988,y
CODE_82BB52:
	LDA.b $3C
	STA.w $092A,y
	LDA.w #$003C
	STA.w $09A8,y
	LDA.w #$000A
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_82BB6C:
	LDA.w #$000F
	STA.w $093A,y
	LDA.w #$0000
	RTS

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

CODE_82BB76:
	LDX.b $38
	LDA.w $092A,y
	DEC
	BNE.b CODE_82BB8E
	JSR.w CODE_82C099
	JSR.w CODE_82BD79
	LDA.w #$0013
	JSR.w CODE_829C4B
	LDA.w #$0000
	RTS

CODE_82BB8E:
	STA.w $092A,y
	LDA.w #$0028
	STA.w $093A,y
	JSR.w CODE_82B8F0
	LDA.w #$0000
	RTS

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

CODE_82BB9E:
	LDX.b $38
	LDA.w $0998,y
	BEQ.b CODE_82BBE3
	LDA.w $092A,y
	DEC
	BNE.b CODE_82BBCD
	INC.w $0EB4
	LDA.w #$0010
	JSL.l CODE_80A79D
	LDA.w #$0460
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	JSL.l CODE_82D3CB
	JSR.w CODE_82C0D2
	JSR.w CODE_82BD79
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

CODE_82BBCD:
	STA.w $092A,y
	LDA.w #$0010
	JSL.l CODE_80A79D
	LDA.w #$0104
	STA.w $093A,y
	JSR.w CODE_82BD79
	JSR.w CODE_82C099
CODE_82BBE3:
	LDA.w #$0000
	RTS

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

CODE_82BBE7:
	LDX.b $38
	LDA.w #$000A
	JSL.l CODE_80A79D
	LDA.w $092A,y
	DEC
	BNE.b CODE_82BC05
	JSR.w CODE_82C099
	JSR.w CODE_82BD79
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

CODE_82BC05:
	STA.w $092A,y
	LDA.w #$0064
	STA.w $093A,y
	LDA.w $09A8,y
	INC
	STA.w $09A8,y
	LDA.w #$0000
	RTS

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

CODE_82BC19:
	LDX.b $38
	LDA.w $09C8,y
	BNE.b CODE_82BC47
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	BNE.b CODE_82BC38
	LDA.w $0978,y
	BEQ.b CODE_82BC3D
CODE_82BC2E:
	LDA.w #$8020
	STA.w $09D8,y
	LDA.w #$0000
	RTS

CODE_82BC38:
	LDA.w $0978,y
	BEQ.b CODE_82BC2E
CODE_82BC3D:
	LDA.w #$0020
	STA.w $09D8,y
	LDA.w #$0000
	RTS

CODE_82BC47:
	LDA.w $09D8,y
	BNE.b CODE_82BC61
	LDA.w $092A,y
	AND.w #$000F
	DEC
	BNE.b CODE_82BC65
	JSR.w CODE_82C14D
	JSR.w CODE_82C099
	LDA.w #$000A
	JSR.w CODE_829C4B
CODE_82BC61:
	LDA.w #$0000
	RTS

CODE_82BC65:
	STA.w $092A,y
	LDA.w #$0014
	STA.w $093A,y
	LDA.w #$0000
	RTS

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

CODE_82BC72:
	LDX.b $38
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BNE.b CODE_82BC84
	LDA.w !RAM_PLOK_Global_EasyModeFlag
	BNE.b CODE_82BC84
	LDA.w $092A,y
	DEC
	BNE.b CODE_82BCA5
CODE_82BC84:
	LDA.w #$0000
	STA.w $092A,y
	JSR.w CODE_82C099
	LDA.w #$000F
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

CODE_82BCA5:
	STA.w $092A,y
	LDA.w #$FE0C
	STA.w $0988,y
	LDA.w #$0064
	STA.w $09D8,y
	LDA.w #$0014
	STA.w $093A,y
	LDA.w #$000A
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

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

CODE_82BCCD:
	LDX.b $38
	LDA.w $092A,y
	BEQ.b CODE_82BCE8
	DEC
	STA.w $092A,y
	LDA.w #$F966
	STA.w $0988,y
	LDA.w #$002D
	STA.w $09B8,y
	LDA.w #$0000
	RTS

CODE_82BCE8:
	LDA.w #$FFFF
	RTS

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

CODE_82BCEC:
	PHY
	LDY.b $38
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0000,y
	SEC
	SBC.b $00,x
	PHA
	LDA.w $0002,y
	SEC
	SBC.b $02,x
	LDY.b !RAM_PLOK_UnknownRAM000048
	STA.w $0A90,y
	PLA
	STA.w $0A88,y
	PLY
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $0A86
	ORA.w DATA_81851C,y
	STA.w $0A86
	LDA.w #$FFFF
	RTS

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

CODE_82BD17:
	LDX.b $38
	LDA.w $092A,y
	BEQ.b CODE_82BD75
	LDA.w #$0005
	JSL.l CODE_80A79D
	LDA.w $092A,y
	DEC
	STA.w $092A,y
	BNE.b CODE_82BD4C
	JSR.w CODE_82BD79
	JSR.w CODE_82C0D2
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0010
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

CODE_82BD4C:
	LDA.w $0988,y
	LDA.w #$F9C0
	STA.w $0988,y
	LDA.w $0998,y
	BNE.b CODE_82BD5E
	INC
	STA.w $0998,y
CODE_82BD5E:
	LDA.w #$000A
	STA.w $09B8,y
	JSR.w CODE_82BDD6
	LDA.w #$0138
	STA.b $04,x
	LDA.w #$0050
	STA.w $093A,y
	JSR.w CODE_82B8F0
CODE_82BD75:
	LDA.w #$0000
	RTS

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

CODE_82BD79:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0006
	STA.w $0C1A
	LDA.w #$F6A0
	STA.w $0C20
	LDA.w #$0001
	STA.w $0C22
	LDA.w #$0096
	STA.w $0C24
	LDA.w #$00A0
	STA.w $0C26
	LDA.w #$7200
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$F2B8
	STA.w $0C20
	LDA.w #$0002
	STA.w $0C22
	JSL.l CODE_82D5AB
	LDA.w #$3200
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$F510
	STA.w $0C20
	LDA.w #$0001
	STA.w $0C22
	JSL.l CODE_82D5AB
	RTS

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

CODE_82BDD6:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	LDA.w #$FE0C
	STA.w $0C20
	STZ.w $0C22
	LDA.w #$FF9C
	STA.w $0C24
	LDA.w #$0020
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82BE06:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0005
	STA.w $0C1A
	STZ.w $0C20
	LDA.w #$FFFE
	STA.w $0C22
	LDA.w #$0050
	STA.w $0C24
	LDA.w #$0030
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82BE36:
	LDX.b $38
	LDA.w $09B8,y
	BEQ.b CODE_82BE89
	LDA.w $092A,y
	BEQ.b CODE_82BE89
	DEC
	BNE.b CODE_82BE67
	STA.w $092A,y
	LDA.w #$002F
	STA.w $09B8,y
	JSR.w CODE_82BD79
	JSR.w CODE_82C099
	LDA.w #$0010
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

CODE_82BE67:
	STA.w $092A,y
	LDA.w #$0032
	STA.w $093A,y
	JSR.w CODE_82B8F0
	JSR.w CODE_82BDD6
	LDA.w #$000E
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

CODE_82BE89:
	LDA.w #$FFFF
	RTS

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

CODE_82BE8D:
	LDX.b $38
	LDA.w $092A,y
	BNE.b CODE_82BE97
CODE_82BE94:
	JMP.w CODE_82BF2B

CODE_82BE97:
	LDA.w $0996
	CMP.w #$0010
	BCC.b CODE_82BE94
	LDA.w $0988,y
	BEQ.b CODE_82BE94
	LDA.w #$0010
	JSL.l CODE_80A79D
	LDA.w $092A,y
	DEC
	BNE.b CODE_82BEDD
	STA.w $092A,y
	JSR.w CODE_82BD79
	JSR.w CODE_82C0D2
	LDA.w #$0001
	STA.w $08C2
	LDA.w #$0440
	STA.b !RAM_PLOK_Level_RightmostCameraXPosLo
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$004A
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

CODE_82BEDD:
	STA.w $092A,y
	LDA.w #$00C8
	STA.w $093A,y
	LDA.b $00,x
	PHA
	SEC
	SBC.w #$0020
	STA.b $00,x
	JSR.w CODE_82BFA9
	PLA
	STA.b $00,x
	LDA.w #$001E
	STA.b !RAM_PLOK_UnknownRAM000092
	LDA.w #$0001
	STA.w $08C2
	LDA.w #$0000
	STA.w $09A8,y
	STA.w $09B8,y
	STA.w $0988,y
	STA.w $09B6
	STA.w $0996
	LDA.w #$FFFF
	STA.w $09C6
	LDA.w #$004A
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

CODE_82BF2B:
	LDA.w #$FFFF
	RTS

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

CODE_82BF2F:
	LDX.b $38
	LDA.w #!Define_PLOK_Level_Player_MaxHP
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	JSR.w CODE_82C14D
	LDA.w #$0016
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0000
	RTS

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

CODE_82BF52:
	LDX.b $38
	LDA.w $09B8,y
	BNE.b CODE_82BF6E
	LDA.w #$0019
	STA.w $09B8,y
	LDA.w #$0018
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_82BF6E:
	LDA.w #$0000
	RTS

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

CODE_82BF72:
	LDX.b $38
	LDA.w $09D8,y
	CMP.w #$0004
	BEQ.b CODE_82BFA5
	JSR.w CODE_82BFA9
	LDA.w #$0004
	STA.b !RAM_PLOK_UnknownRAM000092
	LDA.w #$0028
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0004
	STA.w $09D8,y
	LDA.w #$000A
	STA.w $09C8,y
	LDA.w #$0014
	STA.w $093A,y
CODE_82BFA5:
	LDA.w #$0000
	RTS

CODE_82BFA9:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0013
	STA.w $0C1A
	LDA.w #$FA88
	STA.w $0C20
	STZ.w $0C22
	LDA.w #$0014
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$2400
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$FCE0
	STA.w $0C20
	LDA.w #$0001
	STA.w $0C22
	JSL.l CODE_82D5AB
	LDA.w #$FBB4
	STA.w $0C20
	LDA.w #$FFFF
	STA.w $0C22
	JSL.l CODE_82D5AB
	LDA.w #$FE0C
	STA.w $0C20
	LDA.w #$0002
	STA.w $0C22
	JSL.l CODE_82D5AB
	LDA.w #$FFFE
	STA.w $0C22
	LDA.w #$FF38
	STA.w $0C20
	JSL.l CODE_82D5AB
	RTS

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

CODE_82C019:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0A44,y
	AND.w #$1000
	BEQ.b CODE_82C05C
	LDA.w $0A24,y
	BEQ.b CODE_82C02C
	BPL.b CODE_82C03C
	BRA.b CODE_82C033

CODE_82C02C:
	LDA.b $06,x
	AND.w #$4000
	BEQ.b CODE_82C03C
CODE_82C033:
	LDA.w $0A24,y
	SEC
	SBC.w #$0180
	BRA.b CODE_82C043

CODE_82C03C:
	LDA.w $0A24,y
	CLC
	ADC.w #$0180
CODE_82C043:
	STA.w $0A24,y
	JSR.w CODE_82C14D
	LDA.w #$0028
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0000
	RTS

CODE_82C05C:
	LDA.w #$FFFF
	RTS

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

CODE_82C060:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0003
	STA.w $0C1A
	LDA.w #$02BC
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$FFEC
	STA.w $0C24
	LDA.w #$0064
	STA.w $0C26
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$0001
	JSR.w CODE_82D853
	RTS

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

CODE_82C099:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0002
	STA.w $0C1A
	LDA.w #$02BC
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$FFEC
	STA.w $0C24
	LDA.w #$0064
	STA.w $0C26
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$0001
	JSR.w CODE_82D86C
	RTS

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

CODE_82C0D2:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0004
	STA.w $0C1A
	LDA.w #$02BC
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$FFEC
	STA.w $0C24
	LDA.w #$0064
	STA.w $0C26
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$0005
	JSR.w CODE_82D86C
	RTS

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

CODE_82C10B:
	LDA.w #$001B
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$000F
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$001F
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82C14D:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0001
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82C180:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$0018
	STA.w $0C1E
	JSL.l CODE_82C193
	RTS

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

CODE_82C193:
	LDA.w #$0007
	STA.w $0C1A
	LDA.w #$F830
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$005A
	STA.w $0C24
	LDA.w #$0027
	STA.w $0C26
	LDA.w #$2600
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTL

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

CODE_82C1BC:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$0018
	STA.w $0C1E
	LDA.w #$0008
	STA.w $0C1A
	LDA.w #$F830
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$005A
	STA.w $0C24
	LDA.w #$001F
	STA.w $0C26
	LDA.w #$2600
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82C1F3:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.b $38
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.b $3A
	LDX.w #$0458
	LDY.w #$000E
CODE_82C209:
	LDA.b $00,x
	BMI.b CODE_82C260
	LDA.w $091A,y
	CMP.w #$0012
	BNE.b CODE_82C21B
	JSR.w CODE_82C555
	JMP.w CODE_82C260

CODE_82C21B:
	JSL.l CODE_82B816
	LDA.b $00,x
	SEC
	SBC.b $38
	CLC
	ADC.b $3C
	CMP.b $3E
	BCS.b CODE_82C260
	LDA.b $02,x
	SEC
	SBC.b $3A
	CLC
	ADC.b $40
	CMP.b $42
	BCS.b CODE_82C260
	STX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $091A,y
	ASL
	TAX
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_82C250
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BNE.b CODE_82C25B
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BEQ.b CODE_82C25B
CODE_82C250:
	LDA.b !RAM_PLOK_UnknownRAM000046
	STA.b $38
	JSR.w (DATA_8289B2,x)
	BMI.b CODE_82C26A
	BRA.b CODE_82C25E

CODE_82C25B:
	JSR.w (DATA_828A0A,x)
CODE_82C25E:
	LDX.b !RAM_PLOK_UnknownRAM000046
CODE_82C260:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82C209
CODE_82C26A:
	RTL

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

CODE_82C26B:
	LDA.w $0978,y
	AND.w #$0001
	BNE.b CODE_82C2A4
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $042C
	AND.w #$4000
	STA.b $3A
	LDA.w $0978,y
	AND.w #$BFFF
	ORA.b $3A
	STA.w $0978,y
	LDA.w #$FA24
	STA.w $0988,y
	LDA.w #$03E8
	JSR.w CODE_82B901
	LDA.w #$0011
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	RTS

CODE_82C2A4:
	LDA.w $0978,y
	AND.w #$4000
	STA.w $0814
	LDA.w #$001E
	JSL.l CODE_80C61C
	RTS

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

CODE_82C2B5:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0032
	JSL.l CODE_80C61C
	RTS

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

CODE_82C2C7:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0046
	JSL.l CODE_80C61C
	RTS

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

CODE_82C2D9:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0A10
	BNE.b CODE_82C303
	LDA.w $092A,y
	STA.w $0A10
	LDA.b $00,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	SEP.b #$20
	STA.w $067A
	REP.b #$20
	LDA.b $02,x
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006C
	SEP.b #$20
	STA.w $067B
	REP.b #$20
	LDA.w #$FFFF
	STA.b $00,x
CODE_82C303:
	RTS

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

CODE_82C304:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82C31A
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0014
	JSL.l CODE_80C61C
CODE_82C31A:
	RTS

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

CODE_82C31B:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82C331
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0026
	JSL.l CODE_80C61C
CODE_82C331:
	RTS

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

CODE_82C332:
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	BEQ.b CODE_82C34D
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_82C34D
	LDA.w $0978,y
	AND.w #$0004
	BNE.b CODE_82C34D
	STZ.w $0A86
	LDA.w #$0064
	STA.w $093A,y
CODE_82C34D:
	RTS

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

CODE_82C34E:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$00FA
	JSL.l CODE_80C7FE
	JSR.w CODE_82C099
	LDA.w #$001B
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$001C
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$FFFF
	STA.b $00,x
	RTS

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

CODE_82C37E:
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82C099
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w #$0016
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w !RAM_PLOK_Level_Player_ShellCounter
	CLC
	ADC.w #$0005
	CMP.w #$00C8
	BCC.b CODE_82C3AA
	JSL.l CODE_80BD20
	LDA.w #$0000
CODE_82C3AA:
	STA.w !RAM_PLOK_Level_Player_ShellCounter
	RTS

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

CODE_82C3AE:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #!Define_PLOK_Level_Player_MaxHP
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	JSR.w CODE_82C14D
	LDA.w #$0016
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$FFFF
	STA.b $00,x
	RTS

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

; Note: Something related to the buzzsaw state. It executes when touching a buzzsaw item.

CODE_82C3CE:
	PHY
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BNE.b CODE_82C41B
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_82C41B
	LDA.w $0822
	AND.w #$0012
	BEQ.b CODE_82C41B
	LDA.w #$FFFF
	STA.b $00,x
	PHX
	LDA.w $042C
	ROL
	ROL
	ROL
	ROL
	AND.w #$0002
	STA.w $0958
	LDA.w $09D8,y
	CLC
	ADC.w #$8040
	STA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	STZ.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	LDA.w #$004C
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$0001
	STA.w $0952
	PLX
	STX.b !RAM_PLOK_UnknownRAM000046
CODE_82C41B:
	PLY
	RTS

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

CODE_82C41D:
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BNE.b CODE_82C454
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	BNE.b CODE_82C454
	LDX.b !RAM_PLOK_UnknownRAM000046
	JSR.w CODE_82C14D
	LDA.w $09A8,y
	CMP.w #$0008
	BCC.b CODE_82C440
	SEC
	SBC.w #$0007
	STA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	STZ.w $0808
	BRA.b CODE_82C443

CODE_82C440:
	STA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
CODE_82C443:
	LDA.w $09C8,y
	STA.w !RAM_PLOK_Level_Player_CostumeTimerLo
	LDA.w #$FFFF
	STA.b $00,x
	PHY
	JSL.l CODE_80D1FD
	PLY
CODE_82C454:
	LDX.b !RAM_PLOK_UnknownRAM000046
	RTS

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

CODE_82C457:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09A8,y
	BNE.b CODE_82C476
	LDA.w #$0001
	STA.w $09A8,y
	JSR.w CODE_82C099
	LDA.w #$000C
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_82C476:
	RTS

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

CODE_82C477:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82C48D
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0032
	JSL.l CODE_80C61C
CODE_82C48D:
	RTS

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

CODE_82C48E:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82C4AE
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $09D8,y
	BPL.b CODE_82C49F
	LDA.w $0988,y
	BMI.b CODE_82C4AE
CODE_82C49F:
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0032
	JSL.l CODE_80C61C
CODE_82C4AE:
	RTS

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

CODE_82C4AF:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82C4C5
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0078
	JSL.l CODE_80C61C
CODE_82C4C5:
	RTS

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

CODE_82C4C6:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82C4DC
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0019
	JSL.l CODE_80C61C
CODE_82C4DC:
	RTS

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

CODE_82C4DD:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0001
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$7000
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$001B
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
	LDA.w #$FFFF
	STA.b $00,x
	LDA.w $092A,y
	DEC
	ASL
	TAX
	LDA.w DATA_81D9DC,x
	CLC
	ADC.w !RAM_PLOK_Level_Player_CurrentHPLo
	CMP.w #!Define_PLOK_Level_Player_MaxHP
	BCC.b CODE_82C53A
	LDA.w #!Define_PLOK_Level_Player_MaxHP
CODE_82C53A:
	STA.w !RAM_PLOK_Level_Player_CurrentHPLo
	RTS

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

CODE_82C53E:
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82C554
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $06,x
	AND.w #$4000
	STA.w $0814
	LDA.w #$0032
	JSL.l CODE_80C61C
CODE_82C554:
	RTS

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

CODE_82C555:
	STX.b !RAM_PLOK_UnknownRAM000046
	LDX.w DATA_81DE4A,y
	LDA.b $02,x
	CLC
	ADC.w #$0010
	STA.b $3C
	LDA.b $04,x
	CLC
	ADC.w #$0010
	STA.b $3E
	LDA.w $0A54,y
	BEQ.b CODE_82C595
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $00,x
	CLC
	ADC.b $3C
	SEC
	SBC.b $38
	CLC
	ADC.w #$0014
	CMP.w #$0028
	BCS.b CODE_82C5CD
	LDA.b $02,x
	CLC
	ADC.b $3E
	SEC
	SBC.b $3A
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_82C5CD
	BRA.b CODE_82C5B9

CODE_82C595:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.b $00,x
	CLC
	ADC.b $3C
	SEC
	SBC.b $38
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_82C5CD
	LDA.b $02,x
	CLC
	ADC.b $3E
	SEC
	SBC.b $3A
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_82C5CD
CODE_82C5B9:
	LDA.w $0A44,y
	AND.w #$2000
	BEQ.b CODE_82C5C5
	JSR.w CODE_82C5D4
	RTS

CODE_82C5C5:
	LDA.w #$0032
	JSL.l CODE_80C61C
	RTS

CODE_82C5CD:
	LDA.w #$0000
	STA.w $0A54,y
	RTS

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

CODE_82C5D4:
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_82C60F
	LDA.b $02,x
	CLC
	ADC.b $3E
	SEC
	SBC.w #$0014
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w $0A54,y
	BEQ.b CODE_82C5FA
	LDA.b $00,x
	CLC
	ADC.b $3C
	SEC
	SBC.w $0A54,y
	CLC
	ADC.w !RAM_PLOK_Level_Player_XPosLo
	STA.w !RAM_PLOK_Level_Player_XPosLo
CODE_82C5FA:
	LDA.b $00,x
	CLC
	ADC.b $3C
	STA.w $0A54,y
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	JSL.l CODE_82E132
CODE_82C60F:
	RTS

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

CODE_82C610:
	PHP
	REP.b #$30
	PHX
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	ASL
	TAX
	LDA.w DATA_81E79A,x
	BEQ.b CODE_82C62A
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_82C62A:
	PLX
	PLP
	RTL

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

CODE_82C62D:
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7E3000>>16)
	LDX.w #$7E3000
	LDY.w #!Define_PLOK_Tilemap_EndingCreditsScreenPlok
	JSL.l CODE_87E000
	STZ.w $0660
	STZ.w $0664
	LDA.w #$FFFF
	STA.w $0662
	STA.w $0666
	STA.w $0668
	STA.w $066A
	RTL

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

CODE_82C652:
	PHP
	REP.b #$30
	LDA.w $0660
	BPL.b CODE_82C65D
	JMP.w CODE_82C861

CODE_82C65D:
	ASL
	TAX
	LDA.w DATA_81B0D6,x
	CLC
	ADC.w #$3000
	STA.b $38
	SEP.b #$20
	LDA.b #$7E
	STA.w DMA[$01].SourceBank
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	%PLOK_UnknownDMAMacro2($54E3, $0022)
	%PLOK_UnknownDMAMacro2($5503, $0022)
	%PLOK_UnknownDMAMacro2($5523, $0022)
	%PLOK_UnknownDMAMacro2($5543, $0022)
	%PLOK_UnknownDMAMacro2($5563, $0022)
	%PLOK_UnknownDMAMacro2($5583, $0022)
	%PLOK_UnknownDMAMacro2($55A3, $0022)
	%PLOK_UnknownDMAMacro2($55C3, $0022)
	%PLOK_UnknownDMAMacro2($55E3, $0022)
	%PLOK_UnknownDMAMacro2($5603, $0022)
	%PLOK_UnknownDMAMacro2($5623, $0022)
	%PLOK_UnknownDMAMacro2($5643, $0022)
	%PLOK_UnknownDMAMacro2($5663, $0022)
	%PLOK_UnknownDMAMacro2($5683, $0022)
	%PLOK_UnknownDMAMacro2($56A3, $0022)
CODE_82C861:
	PLP
	RTL

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

CODE_82C863:
	REP.b #$30
	LDA.w $0662
	DEC
	STA.w $0662
	BPL.b CODE_82C8CD
	LDA.w $0664
	ASL
	ASL
	TAX
	LDA.w DATA_81AFA6,x
	BPL.b CODE_82C8B5
	AND.w #$00FF
	TAY
	LDA.w $0664
	STA.b $3A
	LDA.w DATA_81AFA6+$02,x
	PHA
	AND.w #$00FF
	STA.w $0664
	PLA
	XBA
	AND.w #$00FF
	CMP.w #$00FF
	STA.b $38
	BEQ.b CODE_82C8B1
	LDA.w $0666,y
	BPL.b CODE_82C8A4
	LDA.b $38
	STA.w $0666,y
	BRA.b CODE_82C8B1

CODE_82C8A4:
	DEC
	STA.w $0666,y
	BPL.b CODE_82C8B1
	LDA.b $3A
	STA.w $0664
	BRA.b CODE_82C8CA

CODE_82C8B1:
	BRA.b CODE_82C8CD

CODE_82C8B3:
	BRA.b CODE_82C8CA

CODE_82C8B5:
	STA.w $0662
	LDA.w DATA_81AFA6+$02,x
	STA.w $0660
	CMP.w #$000A
	BNE.b CODE_82C8CA
	LDA.w #$0010
	JSL.l CODE_80FD81
CODE_82C8CA:
	INC.w $0664
CODE_82C8CD:
	RTL

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

CODE_82C8CE:
	PHP
	REP.b #$30
	LDA.w $0660
	BPL.b CODE_82C8D9
	JMP.w CODE_82CAFA

CODE_82C8D9:
	ASL
	XBA
	CLC
	ADC.w #$3000
	STA.b $38
	SEP.b #$20
	LDA.b #$7E
	STA.w DMA[$01].SourceBank
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	%PLOK_UnknownDMAMacro2($5407, $0020)
	%PLOK_UnknownDMAMacro2($5427, $0020)
	%PLOK_UnknownDMAMacro2($5447, $0020)
	%PLOK_UnknownDMAMacro2($5467, $0020)
	%PLOK_UnknownDMAMacro2($5487, $0020)
	%PLOK_UnknownDMAMacro2($54A7, $0020)
	%PLOK_UnknownDMAMacro2($54C7, $0020)
	%PLOK_UnknownDMAMacro2($54E7, $0020)
	%PLOK_UnknownDMAMacro2($5507, $0020)
	%PLOK_UnknownDMAMacro2($5527, $0020)
	%PLOK_UnknownDMAMacro2($5547, $0020)
	%PLOK_UnknownDMAMacro2($5567, $0020)
	%PLOK_UnknownDMAMacro2($5587, $0020)
	%PLOK_UnknownDMAMacro2($55A7, $0020)
	%PLOK_UnknownDMAMacro2($55C7, $0020)
	%PLOK_UnknownDMAMacro2($55E7, $0020)
CODE_82CAFA:
	PLP
	RTL

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
CODE_82CB04:
	PHP
	REP.b #$30
	LDA.w $0660
	BPL.b +
	JMP.w ++

+:
	ASL
	XBA
	CLC
	ADC.w #$3000
	STA.b $38
	SEP.b #$20
	LDA.b #$7E
	STA.w DMA[$01].SourceBank
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317
	%PLOK_UnknownDMAMacro2($5367, $0020)
	%PLOK_UnknownDMAMacro2($5387, $0020)
	%PLOK_UnknownDMAMacro2($53A7, $0020)
	%PLOK_UnknownDMAMacro2($53C7, $0020)
	%PLOK_UnknownDMAMacro2($53E7, $0020)
	%PLOK_UnknownDMAMacro2($5407, $0020)
	%PLOK_UnknownDMAMacro2($5427, $0020)
	%PLOK_UnknownDMAMacro2($5447, $0020)
	%PLOK_UnknownDMAMacro2($5467, $0020)
	%PLOK_UnknownDMAMacro2($5487, $0020)
	%PLOK_UnknownDMAMacro2($54A7, $0020)
	%PLOK_UnknownDMAMacro2($54C7, $0020)
	%PLOK_UnknownDMAMacro2($54E7, $0020)
	%PLOK_UnknownDMAMacro2($5507, $0020)
	%PLOK_UnknownDMAMacro2($5527, $0020)
	%PLOK_UnknownDMAMacro2($5547, $0020)
++:
	PLP
	RTL
endif

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

CODE_82CAFC:
	REP.b #$30
	LDA.w $0662
	DEC
	STA.w $0662
	BPL.b CODE_82CB30
	LDA.w $0664
	ASL
	ASL
	TAX
	LDA.w DATA_81AF02,x
	BPL.b CODE_82CB24
	CMP.w #$FFFF
	BNE.b CODE_82CB1F
	LDA.w DATA_81AF02+$02,x
	STA.w $0664
	BRA.b CODE_82CB30

CODE_82CB1F:
	JSR.w CODE_82CB31
	BRA.b CODE_82CB2D

CODE_82CB24:
	STA.w $0662
	LDA.w DATA_81AF02+$02,x
	STA.w $0660
CODE_82CB2D:
	INC.w $0664
CODE_82CB30:
	RTL

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

CODE_82CB31:
	AND.w #$00FF
	BNE.b CODE_82CB55
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F0000>>16)
	LDX.w #$7F0000
	LDY.w #!Define_PLOK_GFX_TitleScreenPlok3
	JSL.l CODE_87E000
	JSL.l CODE_809FE0
	LDA.w #$0000
	STA.b $38
	LDA.w #$0B00
	STA.b $3C
	JSR.w CODE_82CB74
	RTS

CODE_82CB55:
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F0000>>16)
	LDX.w #$7F0000
	LDY.w #!Define_PLOK_GFX_TitleScreenPlok4
	JSL.l CODE_87E000
	JSL.l CODE_809FE0
	LDA.w #$0000
	STA.b $38
	LDA.w #$0B00
	STA.b $3C
	JSR.w CODE_82CB74
	RTS

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

CODE_82CB74:
	PHP
	REP.b #$30
	INC.b !RAM_PLOK_UnknownRAM0000A8
	LDA.b $3C
	STA.w !REGISTER_VRAMAddressLo
	LDA.b $38
	STA.w DMA[$01].SourceLo
	LDA.w #$1000
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$7F
	STA.w DMA[$01].SourceBank
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	JSL.l CODE_809FE0
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	JSL.l CODE_809FE0
	REP.b #$20
	LDA.w #$1000
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	JSL.l CODE_809FE0
	REP.b #$20
	LDA.w #$1000
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	JSL.l CODE_809FE0
	REP.b #$20
	LDA.w #$1000
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	STZ.w $4317							; Glitch: This writes to open bus
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	PLP
	RTS

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

CODE_82CBF1:
	REP.b #$30
	LDA.w #$0001
	JSR.w CODE_82D853
	JSL.l CODE_82D8D6
	RTL

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

CODE_82CBFE:
	PHP
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_82CC2A
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_82CC2A
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_PastLayer3
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_GrandpappyHUD
	JSL.l CODE_87E000
	BRA.b CODE_82CC44

CODE_82CC2A:
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4C00
	LDY.w #!Define_PLOK_GFX_Layer3_RegularHUD
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0000
	LDY.w #!Define_PLOK_Palette_PresentLayer3
	JSL.l CODE_87E000
CODE_82CC44:
	PLP
	RTL

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

CODE_82CC46:
	REP.b #$30
	LDA.w !RAM_PLOK_Global_CurrentLevelNum
	ASL
	STA.b $38
	ASL
	ASL
	CLC
	ADC.b $38
	TAX
	PHX
	LDA.l PLOK_LevelForegroundGraphicsIndexes,x
	TAY
	BMI.b CODE_82CC66
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F1000>>16)
	LDX.w #$7F1000
	JSL.l CODE_87E000
CODE_82CC66:
	PLX
	PHX
	LDA.l PLOK_LevelForegroundGraphicsIndexes+$02,x
	TAY
	BMI.b CODE_82CC79
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F2800>>16)
	LDX.w #$7F2800
	JSL.l CODE_87E000
CODE_82CC79:
	PLX
	PHX
	LDA.l PLOK_LevelForegroundGraphicsIndexes+$04,x
	TAY
	BMI.b CODE_82CC8C
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F3000>>16)
	LDX.w #$7F3000
	JSL.l CODE_87E000
CODE_82CC8C:
	PLX
	PHX
	LDA.l PLOK_LevelForegroundGraphicsIndexes+$06,x
	TAY
	BMI.b CODE_82CC9F
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F5000>>16)
	LDX.w #$7F5000
	JSL.l CODE_87E000
CODE_82CC9F:
	PLX
	LDA.l PLOK_LevelForegroundGraphicsIndexes+$08,x
	TAY
	BMI.b CODE_82CCB1
	LDA.w #!Define_PLOK_DataUploadType_TransferToWRAM|($7F7000>>16)
	LDX.w #$7F7000
	JSL.l CODE_87E000
CODE_82CCB1:
	RTL

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

CODE_82CCB2:
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	LDX.w #$4000
	LDY.w #!Define_PLOK_GFX_BG_Level_CottonIslandMain
	JSL.l CODE_87E000
	LDA.w $0848
	ASL
	ASL
	TAX
	LDA.l DATA_86EA9C+$02,x
	TAY
	LDA.l DATA_86EA9C,x
	TAX
	LDA.w #!Define_PLOK_DataUploadType_TransferToVRAM
	JSL.l CODE_87E000
	RTL

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

CODE_82CCD9:
	REP.b #$30
	LDA.w $0848
	ASL
	TAX
	LDA.l PLOK_LevelFGPalettes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0020
	JSL.l CODE_87E000
	LDA.w $0848
	ASL
	TAX
	LDA.l PLOK_LevelBGPalettes,x
	TAY
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0010
	JSL.l CODE_87E000
	RTL

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

CODE_82CD04:
	REP.b #$30
	LDA.w $0848
	CMP.w #!Define_PLOK_LevelID_LegacyIslandMaceCove
	BCC.b CODE_82CD22
	CMP.w #!Define_PLOK_LevelID_AkrillicPlokTown
	BCS.b CODE_82CD22
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0080
	LDY.w #!Define_PLOK_Palette_Sprite_GlobalPastLevel
	JSL.l CODE_87E000
	BRA.b CODE_82CD43

CODE_82CD22:
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	LDX.w #$0080
	LDY.w #!Define_PLOK_Palette_Sprite_GlobalPresentLevel
	JSL.l CODE_87E000
	LDA.w $0848
	ASL
	TAX
	LDA.l PLOK_LevelSpritePalettes,x
	TAY
	LDX.w #$00A0
	LDA.w #!Define_PLOK_DataUploadType_TransferToCGRAM
	JSL.l CODE_87E000
CODE_82CD43:
	RTL

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

CODE_82CD44:
	REP.b #$30
	PHX
	PHY
	LDX.w #$04A8
	LDY.w #$0026
CODE_82CD4E:
	LDA.b $00,x
	BMI.b CODE_82CD5F
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82CD4E
	PLY
	PLX
	RTL

CODE_82CD5F:
	LDA.w $0A9A
	STA.b $00,x
	LDA.w $0A9C
	STA.b $02,x
	LDA.w $0A9E
	AND.w #$7FFF
	ORA.w #$2000
	STA.w $0AFC,y
	LDA.w #$00CC
	STA.b $04,x
	LDA.w $0AA2
	STA.w $0B74,y
	LDA.w $0AA0
	STA.w $0B4C,y
	LDA.w $0AA6
	STA.w $0B24,y
	LDA.w $0AA8
	STA.w $0AAC,y
	LDA.w $0AA4
	STA.w $0AD4,y
	AND.w #$4000
	BEQ.b CODE_82CE10
	LDA.w #$0000
	STA.w $0B9C,y
	STZ.b $38
	LDA.b $00,x
	CMP.w $0C14
	BCC.b CODE_82CDBA
	SEC
	SBC.w $0C14
	STA.w $0C14
	LDA.w #$4000
	STA.b $38
	BRA.b CODE_82CDC3

CODE_82CDBA:
	LDA.w $0C14
	SEC
	SBC.b $00,x
	STA.w $0C14
CODE_82CDC3:
	LDA.b $02,x
	CMP.w $0C16
	BCC.b CODE_82CDDA
	SEC
	SBC.w $0C16
	STA.w $0C16
	LDA.b $38
	ORA.w #$8000
	STA.b $38
	BRA.b CODE_82CDE3

CODE_82CDDA:
	LDA.w $0C16
	SEC
	SBC.b $02,x
	STA.w $0C16
CODE_82CDE3:
	LDA.w $0C14
	CMP.w $0C16
	BCC.b CODE_82CDF9
	ORA.w #$8000
	STA.w $0BEC,y
	LDA.w $0C16
	STA.w $0BC4,y
	BRA.b CODE_82CE02

CODE_82CDF9:
	STA.w $0BC4,y
	LDA.w $0C16
	STA.w $0BEC,y
CODE_82CE02:
	LDA.w #$2000
	LDA.w $0AFC,y
	AND.w #$3FFF
	ORA.b $38
	STA.w $0AFC,y
CODE_82CE10:
	PLY
	PLX
	RTL

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

CODE_82CE13:
	REP.b #$30
	LDX.w #$04A8
	LDY.w #$0026
CODE_82CE1B:
	LDA.b $00,x
	BPL.b CODE_82CE22
	JMP.w CODE_82CEAA

CODE_82CE22:
	LDA.w $0B24,y
	CMP.w #$8008
	BNE.b CODE_82CE48
	LDA.w $0AD4,y
	AND.w #$00FF
	PHY
	ASL
	TAY
	LDA.w DATA_81AD1A,y
	BEQ.b CODE_82CE44
	DEC
	XBA
	AND.w #$FF00
	ORA.w #$0002
	JSL.l CODE_82E177
CODE_82CE44:
	PLY
	LDA.w $0B24,y
CODE_82CE48:
	DEC
	STA.w $0B24,y
	BMI.b CODE_82CE58
	BNE.b CODE_82CE89
	LDA.w #$8008
	STA.w $0B24,y
	BRA.b CODE_82CEA7

CODE_82CE58:
	LDA.w $0AD4,y
	AND.w #$00FF
	CMP.w #$000D
	BNE.b CODE_82CE77
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	CLC
	ADC.w #$000C
	STA.w $0C1E
	JSL.l CODE_82C193
	BRA.b CODE_82CE82

CODE_82CE77:
	LDA.w $0B24,y
	AND.w #$7FFF
	BEQ.b CODE_82CE82
	JMP.w CODE_82CEB8

CODE_82CE82:
	LDA.w #$FFFF
	STA.b $00,x
	BRA.b CODE_82CEAA

CODE_82CE89:
	JSR.w CODE_82D1F1
	LDA.w $0AD4,y
	AND.w #$1000
	BEQ.b CODE_82CE97
	JSR.w CODE_82D3EB
CODE_82CE97:
	LDA.w $0AD4,y
	AND.w #$2000
	BEQ.b CODE_82CEA4
	JSR.w CODE_82D295
	BRA.b CODE_82CEA7

CODE_82CEA4:
	JSR.w CODE_82D35F
CODE_82CEA7:
	JSR.w CODE_82CF5D
CODE_82CEAA:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BMI.b CODE_82CEB7
	JMP.w CODE_82CE1B

CODE_82CEB7:
	RTL

CODE_82CEB8:
	AND.w #$0004
	STA.b $38
	LDA.w $0AD4,y
	AND.w #$00FF
	ASL
	ASL
	ASL
	CLC
	ADC.b $38
	PHY
	TAY
	LDA.w DATA_81AC4A,y
	STA.b $04,x
	LDA.w DATA_81AC4A+$02,y
	PLY
	ORA.w $0AFC,y
	STA.b $06,x
	LDA.w $0B24,y
	CMP.w #$8001
	BNE.b CODE_82CEAA
	LDA.w $0AD4,y
	AND.w #$00FF
	CMP.w #$0012
	BEQ.b CODE_82CEF6
	CMP.w #$0013
	BNE.b CODE_82CEAA
	JSR.w CODE_82CF2A
	BRA.b CODE_82CEAA

CODE_82CEF6:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$000D
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$0020
	STA.w $0C26
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	BRA.b CODE_82CEAA

CODE_82CF2A:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$000E
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$0028
	STA.w $0C26
	LDA.w #$3000
	STA.w $0C28
	JSL.l CODE_82D5AB
	RTS

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

CODE_82CF5D:
	LDA.w $0AD4,y
	BIT.w #$2000
	BEQ.w CODE_82CF68
CODE_82CF65:
	JMP.w CODE_82D01A

CODE_82CF68:
	LDA.w $0AD4,y
	AND.w #$00FF
	CMP.w #$0015
	BEQ.b CODE_82CF65
	CMP.w #$0016
	BEQ.b CODE_82CF65
	CMP.w #$0018
	BEQ.b CODE_82CF65
	LDA.b $09
	AND.w #$000C
	LSR
	STA.b $38
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	LDA.w $0AD4,y
	AND.w #$00FF
	CMP.w #$000C
	BEQ.b CODE_82CFA7
	ASL
	ASL
	ASL
	CLC
	ADC.b $38
	PHX
	TAX
	LDA.w DATA_81AB22,x
	PLX
	STA.b $04,x
	RTS

CODE_82CFA7:
	LDA.w $0B24,y
	CMP.w #$0096
	BCC.b CODE_82CFC6
	BNE.b CODE_82D014
	LDA.w $0AD4,y
	AND.w #$BFFF
	STA.w $0AD4,y
	LDA.w #$0000
	STA.w $0B74,y
	STA.w $0B4C,y
	STA.w $0AAC,y
CODE_82CFC6:
	LDA.b $09
	AND.w #$0038
	LSR
	LSR
	PHY
	TAY
	LDA.w DATA_81DDBE,y
	PLY
	STA.b $04,x
	LDA.b $09
	AND.w #$003F
	BNE.b CODE_82D013
	LDA.b $00,x
	STA.w $0A9A
	LDA.b $02,x
	STA.w $0A9C
	LDA.w #$4000
	STA.w $0AA4
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0C14
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0010
	STA.w $0C16
	LDA.w #$3000
	STA.w $0A9E
	LDA.w #$00C8
	STA.w $0AA6
	JSL.l CODE_82CD44
	LDA.w #$0005
	JSL.l CODE_80FD81
CODE_82D013:
	RTS

CODE_82D014:
	LDA.w #$00F6
	STA.b $04,x
	RTS

CODE_82D01A:
	AND.w #$00FF
	ASL
	PHX
	TAX
	JMP.w (DATA_82D023,x)

DATA_82D023:
	dw CODE_82D057
	dw CODE_82D057
	dw CODE_82D057
	dw CODE_82D057
	dw CODE_82D0A6
	dw CODE_82D05B
	dw CODE_82D06A
	dw CODE_82D079
	dw CODE_82D088
	dw CODE_82D097
	dw CODE_82D145
	dw CODE_82D154
	dw CODE_82D0EC
	dw CODE_82D057
	dw CODE_82D057
	dw CODE_82D0EC
	dw CODE_82D16C
	dw CODE_82D0DA
	dw CODE_82D0C1
	dw CODE_82D088
	dw CODE_82D057
	dw CODE_82D18B
	dw CODE_82D1AF
	dw CODE_82D057
	dw CODE_82D1C6
	dw CODE_82D057

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

CODE_82D057:
	PLX
	JMP.w CODE_82CF68

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

CODE_82D05B:
	PLX
	LDA.w #$0328
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D06A:
	PLX
	LDA.w #$0326
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D079:
	PLX
	LDA.w #$0332
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D088:
	PLX
	LDA.w #$0324
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D097:
	PLX
	LDA.w #$0330
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D0A6:
	PLX
	LDA.w $0B24,y
	AND.w #$0018
	EOR.w #$0018
	LSR
	LSR
	CLC
	ADC.w #$0324
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D0C1:
	PLX
	LDA.b $09
	AND.w #$000C
	LSR
	CLC
	ADC.w #$03AC
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	ORA.w #$0C00
	STA.b $06,x
	RTS

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

CODE_82D0DA:
	PLX
	LDA.w #$0324
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	ORA.w #$0C00
	STA.b $06,x
	RTS

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

CODE_82D0EC:
	LDA.w $0B24,y
	AND.w #$001C
	LSR
	TAX
	LDA.w DATA_81AC3A,x
	PLX
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	LDA.w $042C
	AND.w #$4000
	BNE.b CODE_82D118
	LDA.w #$2C00
	STA.b $06,x
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w #$0014
	BRA.b CODE_82D124

CODE_82D118:
	LDA.w #$6C00
	STA.b $06,x
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w #$0014
CODE_82D124:
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w #$0012
	STA.b $02,x
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_82D13C
	CMP.w #$0006
	BNE.b CODE_82D144
CODE_82D13C:
	LDA.b $02,x
	CLC
	ADC.w #$0008
	STA.b $02,x
CODE_82D144:
	RTS

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

CODE_82D145:
	PLX
	LDA.w #$031C
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D154:
	LDA.w $0B24,y
	AND.w #$0018
	LSR
	LSR
	TAX
	LDA.w DATA_81AC32,x
	PLX
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D16C:
	PLX
	LDA.w $0B24,y
	BPL.b CODE_82D177
	LDA.w #$00E2
	BRA.b CODE_82D180

CODE_82D177:
	ASL
	STA.b $38
	LDA.w #$0374
	SEC
	SBC.b $38
CODE_82D180:
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D18B:
	LDA.b $09
	AND.w #$000C
	LSR
	TAX
	LDA.w $0B24,y
	CMP.w #$0082
	BCS.b CODE_82D1A0
	TXA
	CLC
	ADC.w #$0008
	TAX
CODE_82D1A0:
	LDA.w DATA_81ABF2,x
	PLX
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D1AF:
	LDA.w $0B24,y
	AND.w #$001C
	LSR
	TAX
	LDA.w DATA_81AC02,x
	PLX
	STA.b $04,x
	LDA.w $0AFC,y
	AND.w #$7FFF
	STA.b $06,x
	RTS

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

CODE_82D1C6:
	LDA.w $0B24,y
	AND.w #$001C
	LSR
	TAX
	LDA.w DATA_81AC12,x
	PLX
	STA.b $04,x
	PHX
	LDA.w $0B24,y
	AND.w #$00E0
	LSR
	LSR
	LSR
	LSR
	TAX
	LDA.w DATA_81AC22,x
	STA.b $38
	PLX
	LDA.w $0AFC,y
	AND.w #$6000
	ORA.b $38
	STA.b $06,x
	RTS

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

CODE_82D1F1:
	LDA.w $0AD4,y
	AND.w #$4000
	BNE.b CODE_82D1FE
	JSR.w CODE_82D202
	BRA.b CODE_82D201

CODE_82D1FE:
	JSR.w CODE_82D242
CODE_82D201:
	RTS

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

CODE_82D202:
	LDA.w $0AAC,y
	CLC
	ADC.w $0B4C,y
	STA.w $0B4C,y
	BPL.b CODE_82D213
	ORA.w #$00FF
	BRA.b CODE_82D221

CODE_82D213:
	CMP.w #$0800
	BCC.b CODE_82D21E
	LDA.w #$0800
	STA.w $0B4C,y
CODE_82D21E:
	AND.w #$FF00
CODE_82D221:
	XBA
	CLC
	ADC.b $02,x
	STA.b $02,x
	LDA.w $0AFC,y
	AND.w #$4000
	BNE.b CODE_82D239
	LDA.b $00,x
	CLC
	ADC.w $0B74,y
	STA.b $00,x
	BRA.b CODE_82D241

CODE_82D239:
	LDA.b $00,x
	SEC
	SBC.w $0B74,y
	STA.b $00,x
CODE_82D241:
	RTS

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

CODE_82D242:
	LDA.w $0BEC,y
	BPL.b CODE_82D24C
	JSR.w CODE_82D287
	BRA.b CODE_82D24F

CODE_82D24C:
	JSR.w CODE_82D279
CODE_82D24F:
	LDA.w $0BEC,y
	AND.w #$7FFF
	STA.b $38
	LDA.w $0B9C,y
	CLC
	ADC.w $0BC4,y
	CMP.b $38
	BCC.b CODE_82D275
	SEC
	SBC.b $38
	STA.w $0B9C,y
	LDA.w $0BEC,y
	BPL.b CODE_82D271
	JSR.w CODE_82D279
	RTS

CODE_82D271:
	JSR.w CODE_82D287
	RTS

CODE_82D275:
	STA.w $0B9C,y
	RTS

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

CODE_82D279:
	LDA.w $0AFC,y
	AND.w #$8000
	BEQ.b CODE_82D284
	DEC.b $02,x
	RTS

CODE_82D284:
	INC.b $02,x
	RTS

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

CODE_82D287:
	LDA.w $0AFC,y
	AND.w #$4000
	BEQ.b CODE_82D292
	DEC.b $00,x
	RTS

CODE_82D292:
	INC.b $00,x
	RTS

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

CODE_82D295:
	REP.b #$30
	STX.b !RAM_PLOK_UnknownRAM000046
	STY.b !RAM_PLOK_UnknownRAM000048
	LDA.w !RAM_PLOK_Level_Player_CurrentCostumeLo
	BEQ.b CODE_82D2B6
	TYA
	AND.w #$0002
	BEQ.b CODE_82D2AF
	LDA.b $09
	AND.w #$0001
	BNE.b CODE_82D2B6
	BRA.b CODE_82D329

CODE_82D2AF:
	LDA.b $09
	AND.w #$0001
	BNE.b CODE_82D329
CODE_82D2B6:
	LDA.b $00,x
	STA.b $38
	STA.b $44
	LDA.b $02,x
	STA.b $3A
	LDX.w #$0458
	LDY.w #$000E
CODE_82D2C6:
	LDA.b $00,x
	BMI.b CODE_82D31B
	LDA.w $091A,y
	ASL
	PHX
	TAX
	LDA.w DATA_8185D4,x
	PLX
	CMP.w #$0000
	BEQ.b CODE_82D31B
	JSL.l CODE_82B816
	LDA.w !RAM_PLOK_Level_Player_CurrentVehicleLo
	CMP.w #$0003
	BNE.b CODE_82D2E8
	JSR.w CODE_82D32E
CODE_82D2E8:
	LDA.b $00,x
	SEC
	SBC.b $38
	CLC
	ADC.b $3C
	CMP.b $3E
	BCS.b CODE_82D31B
	LDA.b $02,x
	SEC
	SBC.b $3A
	CLC
	ADC.b $40
	CMP.b $42
	BCS.b CODE_82D31B
	LDA.w $093A,y
	BNE.b CODE_82D31B
	STX.b $38
	LDA.w $091A,y
	ASL
	TAX
	JSR.w (DATA_8289B2,x)
	BMI.b CODE_82D329
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w #$8008
	STA.w $0B24,y
	BRA.b CODE_82D329

CODE_82D31B:
	LDA.b $44
	STA.b $38
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82D2C6
CODE_82D329:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDY.b !RAM_PLOK_UnknownRAM000048
	RTS

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

CODE_82D32E:
	PHY
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w $0B24,y
	CMP.w #$000A
	BCS.b CODE_82D35D
	LDA.w $0AFC,y
	AND.w #$4000
	BEQ.b CODE_82D34B
	LDA.b $38
	SEC
	SBC.w #$0040
	STA.b $38
	BRA.b CODE_82D353

CODE_82D34B:
	LDA.b $38
	CLC
	ADC.w #$0040
	STA.b $38
CODE_82D353:
	LDA.w #$0040
	STA.b $3C
	LDA.w #$0080
	STA.b $3E
CODE_82D35D:
	PLY
	RTS

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

CODE_82D35F:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_HurtFlashingTimerLo
	BNE.b CODE_82D3CA
	LDA.w !RAM_PLOK_Level_Player_BuzzsawStateTimerLo
	BMI.b CODE_82D3CA
	BEQ.b CODE_82D375
	LDA.w !RAM_PLOK_Level_Player_InAirFlagLo
	CMP.w #$0002
	BEQ.b CODE_82D3CA
CODE_82D375:
	LDA.b $00,x
	STA.b $38
	LDA.b $02,x
	SEC
	SBC.w #$0004
	STA.b $3A
	LDA.w $0808
	CMP.w #$0004
	BEQ.b CODE_82D38E
	CMP.w #$0006
	BNE.b CODE_82D396
CODE_82D38E:
	LDA.b $3A
	SEC
	SBC.w #$000C
	STA.b $3A
CODE_82D396:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b $38
	CLC
	ADC.w #$0008
	CMP.w #$0010
	BCS.b CODE_82D3CA
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.b $3A
	CLC
	ADC.w #$0010
	CMP.w #$0020
	BCS.b CODE_82D3CA
	LDA.w #$8008
	STA.w $0B24,y
	LDA.w $0AFC,y
	AND.w #$4000
	STA.w $0814
	LDA.w #$0032
	JSL.l CODE_80C61C
CODE_82D3CA:
	RTS

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

CODE_82D3CB:
	REP.b #$30
	PHX
	PHY
	LDX.w #$04A8
	LDY.w #$0026
CODE_82D3D5:
	LDA.b $00,x
	BMI.b CODE_82D3DE
	LDA.w #$FFFF
	STA.b $00,x
CODE_82D3DE:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82D3D5
	PLY
	PLX
	RTL

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

CODE_82D3EB:
	REP.b #$30
	LDA.w $0AD4,y
	AND.w #$2000
	BEQ.b CODE_82D40A
	TYA
	AND.w #$0002
	BEQ.b CODE_82D403
	LDA.b $09
	AND.w #$0001
	BNE.b CODE_82D40A
CODE_82D402:
	RTS

CODE_82D403:
	LDA.b $09
	AND.w #$0001
	BNE.b CODE_82D402
CODE_82D40A:
	PHY
	PHX
	STY.b $40
	LDA.w $0AD4,y
	AND.w #$00FF
	CMP.w #$0010
	BNE.b CODE_82D41E
	JSR.w CODE_82D56C
	BRA.b CODE_82D42C

CODE_82D41E:
	LDA.b $02,x
	CLC
	ADC.w #$0020
	TAY
	LDA.b $00,x
	CLC
	ADC.w #$0020
	TAX
CODE_82D42C:
	JSL.l CODE_80FC03
	LDA.b !RAM_PLOK_UnknownRAM00004A
	BPL.b CODE_82D436
	BRA.b CODE_82D49D

CODE_82D436:
	LDY.b $40
	LDA.w $0AD4,y
	AND.w #$0800
	BEQ.b CODE_82D444
	PLX
	PLY
	BRA.b CODE_82D49C

CODE_82D444:
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	CMP.w #$0003
	BCC.b CODE_82D48D
	SEC
	SBC.w #$0003
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $38
	PLX
	PHX
	LDA.b $00,x
	CLC
	ADC.w #$001E
	AND.w #$000E
	TAX
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$4000
	BEQ.b CODE_82D472
	TXA
	EOR.w #$000F
	BRA.b CODE_82D474

CODE_82D472:
	TXA
	INC
CODE_82D474:
	ASL
	CLC
	ADC.b $38
	TAX
	LDA.l DATA_83E964,x
	BPL.b CODE_82D482
	LDA.w #$0000
CODE_82D482:
	STA.b $38
	PLX
	PHX
	LDA.b $02,x
	CLC
	ADC.b $38
	STA.b $02,x
CODE_82D48D:
	PLX
	PLY
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$00FF
	BEQ.b CODE_82D49C
	LDA.w #$8008
	STA.w $0B24,y
CODE_82D49C:
	RTS

CODE_82D49D:
	LDY.b $40
	LDA.w $0AD4,y
	AND.w #$0400
	BNE.b CODE_82D4EF
	LDA.b !RAM_PLOK_UnknownRAM00004A
	AND.w #$0FFF
	BNE.b CODE_82D4B4
	JSL.l CODE_80BCAA
	BRA.b CODE_82D48D

CODE_82D4B4:
	CMP.w #$0007
	BNE.b CODE_82D4E4
	LDX.b !RAM_PLOK_UnknownRAM00004E
	LDA.l $7E3000,x
	DEC
	DEC
	STA.l $7E3000,x
	LDA.w $0AD4,y
	AND.w #$00FF
	CMP.w #$0012
	BEQ.b CODE_82D4DF
	CMP.w #$000B
	BEQ.b CODE_82D4DF
	CMP.w #$0011
	BEQ.b CODE_82D4DF
	CMP.w #$0013
	BNE.b CODE_82D4E2
CODE_82D4DF:
	JSR.w CODE_82D4F3
CODE_82D4E2:
	BRA.b CODE_82D48D

CODE_82D4E4:
	CMP.w #$0010
	BNE.b CODE_82D4EF
	JSL.l CODE_80BC24
	BRA.b CODE_82D48D

CODE_82D4EF:
	PLX
	PLY
	BRA.b CODE_82D49C

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

CODE_82D4F3:
	LDA.b !RAM_PLOK_UnknownRAM00004E
	SEC
	SBC.w #$0002
	JSR.w CODE_82D540
	LDA.b !RAM_PLOK_UnknownRAM00004E
	CLC
	ADC.w #$0002
	JSR.w CODE_82D540
	LDA.b !RAM_PLOK_UnknownRAM00004E
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00008A
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00008A
	PHA
	JSR.w CODE_82D540
	PLA
	PHA
	CLC
	ADC.w #$0002
	JSR.w CODE_82D540
	PLA
	SEC
	SBC.w #$0002
	JSR.w CODE_82D540
	LDA.b !RAM_PLOK_UnknownRAM00004E
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00008A
	CLC
	ADC.b !RAM_PLOK_UnknownRAM00008A
	PHA
	JSR.w CODE_82D540
	PLA
	PHA
	CLC
	ADC.w #$0002
	JSR.w CODE_82D540
	PLA
	SEC
	SBC.w #$0002
	JSR.w CODE_82D540
	RTS

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

CODE_82D540:
	TAX
	PHX
	LDA.l $7E3000,x
	STA.b $38
	AND.w #$000F
	STA.b $3A
	LDA.b $38
	AND.w #$03F0
	LSR
	CLC
	ADC.b $3A
	TAX
	LDA.l $7E2000,x
	PLX
	CMP.w #$8007
	BNE.b CODE_82D56B
	LDA.l $7E3000,x
	DEC
	DEC
	STA.l $7E3000,x
CODE_82D56B:
	RTS

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

CODE_82D56C:
	LDA.w $0B24,y
	LSR
	STA.b $38
	LDA.w #$0009
	SEC
	SBC.b $38
	ASL
	ASL
	ASL
	ASL
	STA.b $38
	LDA.w $0AFC,y
	AND.w #$4000
	BNE.b CODE_82D591
	LDA.b $00,x
	CLC
	ADC.b $38
	SEC
	SBC.w #$0010
	BRA.b CODE_82D59A

CODE_82D591:
	LDA.b $00,x
	SEC
	SBC.b $38
	CLC
	ADC.w #$0020
CODE_82D59A:
	STA.b $38
	LDA.b $02,x
	CLC
	ADC.w #$0020
	TAY
	LDA.b $38
	CLC
	ADC.w #$0010
	TAX
	RTS

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

CODE_82D5AB:
	REP.b #$30
	PHX
	PHY
	LDA.w $0C18
	INC
	AND.w #$0007
	STA.w $0C18
	ASL
	TAY
	LDX.w DATA_81DBE8,y
	LDA.w $0C1C
	STA.b $00,x
	LDA.w $0C1E
	STA.b $02,x
	LDA.w $0C28
	STA.b $06,x
	LDA.w $0C1A
	STA.w $0C6A,y
	LDA.w $0C20
	STA.w $0C5A,y
	LDA.w $0C24
	STA.w $0C2A,y
	LDA.w $0C22
	STA.w $0C4A,y
	LDA.w $0C26
	STA.w $0C3A,y
	LDA.w #$0000
	STA.w $0C7A,y
	PLY
	PLX
	RTL

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

CODE_82D5F4:
	REP.b #$30
	LDX.w #$057A
	LDY.w #$000E
CODE_82D5FC:
	LDA.b $00,x
	BMI.b CODE_82D626
	LDA.w $0C3A,y
	DEC
	STA.w $0C3A,y
	BPL.b CODE_82D610
	LDA.w #$FFFF
	STA.b $00,x
	BRA.b CODE_82D626

CODE_82D610:
	JSR.w CODE_82D631
	STX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C7A,y
	INC
	STA.w $0C7A,y
	LDA.w $0C6A,y
	ASL
	TAX
	JSR.w (DATA_82D689,x)
	LDX.b !RAM_PLOK_UnknownRAM000046
CODE_82D626:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82D5FC
	RTL

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

CODE_82D631:
	LDA.w $0C5A,y
	CLC
	ADC.w $0C2A,y
	STA.w $0C5A,y
	BPL.b CODE_82D642
	ORA.w #$00FF
	BRA.b CODE_82D650

CODE_82D642:
	CMP.w #$0800
	BCC.b CODE_82D64D
	LDA.w #$0800
	STA.w $0C5A,y
CODE_82D64D:
	AND.w #$FF00
CODE_82D650:
	XBA
	CLC
	ADC.b $02,x
	STA.b $02,x
	LDA.b $06,x
	AND.w #$4000
	BEQ.b CODE_82D667
	LDA.b $00,x
	CLC
	ADC.w $0C4A,y
	STA.b $00,x
	BRA.b CODE_82D66F

CODE_82D667:
	LDA.b $00,x
	SEC
	SBC.w $0C4A,y
	STA.b $00,x
CODE_82D66F:
	RTS

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

CODE_82D670:
	LDA.b !RAM_PLOK_UnknownRAM000050
	AND.w #$FFF0
	SEC
	SBC.w #$0018
	STA.w $0C1C
	LDA.b !RAM_PLOK_UnknownRAM000052
	AND.w #$FFF0
	SEC
	SBC.w #$001C
	STA.w $0C1E
	RTL

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

DATA_82D689:
	dw CODE_82D6D1
	dw CODE_82D733
	dw CODE_82D774
	dw CODE_82D77C
	dw CODE_82D784
	dw CODE_82D78C
	dw CODE_82D79B
	dw CODE_82D7AA
	dw CODE_82D7BE
	dw CODE_82D763
	dw CODE_82D6D9
	dw CODE_82D713
	dw CODE_82D723
	dw CODE_82D6E1
	dw CODE_82D6F2
	dw CODE_82D703
	dw CODE_82D744
	dw CODE_82D754
	dw CODE_82D6B1
	dw CODE_82D6C1

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

CODE_82D6B1:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$0004
	LSR
	CLC
	ADC.w #$04D0
	STA.b $04,x
	RTS

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

CODE_82D6C1:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$000C
	LSR
	CLC
	ADC.w #$051C
	STA.b $04,x
	RTS

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

CODE_82D6D1:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$00EA
	STA.b $04,x
	RTS

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

CODE_82D6D9:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$0208
	STA.b $04,x
	RTS

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

CODE_82D6E1:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$0018
	LSR
	LSR
	CLC
	ADC.w #$03B4
	STA.b $04,x
	RTS

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

CODE_82D6F2:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$0038
	LSR
	LSR
	CLC
	ADC.w #$03C8
	STA.b $04,x
	RTS

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

CODE_82D703:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$001C
	LSR
	CLC
	ADC.w #$0460
	STA.b $04,x
	RTS

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

CODE_82D713:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$0004
	LSR
	CLC
	ADC.w #$0320
	STA.b $04,x
	RTS

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

CODE_82D723:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$0004
	LSR
	CLC
	ADC.w #$0342
	STA.b $04,x
	RTS

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

CODE_82D733:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$0008
	LSR
	LSR
	CLC
	ADC.w #$0124
	STA.b $04,x
	RTS

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

CODE_82D744:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	CMP.w #$000C
	BCC.b CODE_82D733
	LDA.w #$0250
	STA.b $04,x
	RTS

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

CODE_82D754:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$001E
	CLC
	ADC.w #$0164
	STA.b $04,x
	RTS

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

CODE_82D763:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$0008
	LSR
	LSR
	CLC
	ADC.w #$00FC
	STA.b $04,x
	RTS

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

CODE_82D774:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$0128
	STA.b $04,x
	RTS

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

CODE_82D77C:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$012A
	STA.b $04,x
	RTS

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

CODE_82D784:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w #$012C
	STA.b $04,x
	RTS

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

CODE_82D78C:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C7A,y
	AND.w #$000E
	CLC
	ADC.w #$0144
	STA.b $04,x
	RTS

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

CODE_82D79B:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C7A,y
	AND.w #$000E
	CLC
	ADC.w #$0154
	STA.b $04,x
	RTS

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

CODE_82D7AA:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$003C
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$01BE
	STA.b $04,x
	RTS

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

CODE_82D7BE:
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDA.w $0C3A,y
	AND.w #$003C
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$01CE
	STA.b $04,x
	RTS

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

CODE_82D7D2:
	REP.b #$30
	PHX
	PHY
	LDX.w #$057A
	LDY.w #$000E
CODE_82D7DC:
	LDA.b $00,x
	BMI.b CODE_82D7E5
	LDA.w #$FFFF
	STA.b $00,x
CODE_82D7E5:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82D7DC
	PLY
	PLX
	RTL

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

CODE_82D7F2:
	REP.b #$30
	LDX.w #$0016
CODE_82D7F7:
	STZ.w !RAM_PLOK_Level_Player_ScoreMillionsDigit,x
	DEX
	DEX
	BPL.b CODE_82D7F7
	SEP.b #$20
	STZ.w $0690
	STZ.w $0715
	RTL

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

CODE_82D807:
	PHP
	SEP.b #$30
	LDX.b #$3B
CODE_82D80C:
	LDA.w DATA_8180A6,x
	STA.w $06AA,x
	DEX
	BPL.b CODE_82D80C
	LDX.b #$1D
CODE_82D817:
	LDA.w DATA_8180E2,x
	STA.w $06E6,x
	DEX
	BPL.b CODE_82D817
	LDX.b #$09
CODE_82D822:
	LDA.w DATA_818100,x
	STA.w $0704,x
	DEX
	BPL.b CODE_82D822
	LDX.b #$00
CODE_82D82D:
	LDA.w DATA_818096,x
	STA.w $072C,x
	INX
	CPX.b #$0C
	BCC.b CODE_82D82D
	PLP
	RTS

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

CODE_82D83A:
	PHX
	PHP
	SEP.b #$30
	STA.b $38
	LDX.w $0690
	LDA.w DATA_8180A2,x
	TAX
	LDA.b $38
	CLC
	ADC.w !RAM_PLOK_Level_Player_ScoreTensDigit,x
	STA.w !RAM_PLOK_Level_Player_ScoreTensDigit,x
	PLP
	PLX
	RTL

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

CODE_82D853:
	PHX
	PHP
	SEP.b #$30
	STA.b $38
	LDX.w $0690
	LDA.w DATA_8180A2,x
	TAX
	LDA.b $38
	CLC
	ADC.w !RAM_PLOK_Level_Player_ScoreHundredsDigit,x
	STA.w !RAM_PLOK_Level_Player_ScoreHundredsDigit,x
	PLP
	PLX
	RTS

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

CODE_82D86C:
	PHX
	PHP
	SEP.b #$30
	STA.b $38
	LDX.w $0690
	LDA.w DATA_8180A2,x
	TAX
	LDA.b $38
	CLC
	ADC.w !RAM_PLOK_Level_Player_ScoreThousandsDigit,x
	STA.w !RAM_PLOK_Level_Player_ScoreThousandsDigit,x
	PLP
	PLX
	RTS

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

CODE_82D885:
	PHP
	REP.b #$30
	PHX
	PHY
	SEP.b #$30
	LDX.w $0690
	LDA.w DATA_8180A2,x
	TAX
	TXA
	CLC
	ADC.b #$05
	TAX
	LDY.b #$05
CODE_82D89A:
	LDA.w !RAM_PLOK_Level_Player_ScoreMillionsDigit,x
CODE_82D89D:
	CMP.b #$0A
	BCC.b CODE_82D8B9
	BPL.b CODE_82D8AC
	DEC.w $0691,x
	CLC
	ADC.b #$0A
	JMP.w CODE_82D89D

CODE_82D8AC:
	CPY.b #$01
	BCC.b CODE_82D8B3
	INC.w $0691,x
CODE_82D8B3:
	SEC
	SBC.b #$0A
	JMP.w CODE_82D89D

CODE_82D8B9:
	STA.w !RAM_PLOK_Level_Player_ScoreMillionsDigit,x
	DEX
	DEY
	BPL.b CODE_82D89A
	REP.b #$30
	PLY
	PLX
	PLP
	RTS

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

CODE_82D8C6:
	PHP
	REP.b #$30
	LDA.w #!RAM_PLOK_Level_Player_ScoreMillionsDigit
	STA.b $06
	LDX.w #$5865
	JSR.w CODE_82D8F2
	PLP
	RTL

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

CODE_82D8D6:
	PHP
	SEP.b #$30
	LDA.w $0715
	ASL
	STA.w $0690
	JSR.w CODE_82D885
	REP.b #$30
	LDA.w #!RAM_PLOK_Level_Player_ScoreMillionsDigit
	STA.b $06
	LDX.w #$5C41
	JSR.w CODE_82D8F2
	PLP
	RTL

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

CODE_82D8F2:
	PHP
	REP.b #$30
	STX.w !REGISTER_VRAMAddressLo
	LDA.w #$2180
	LDY.w #$0005
CODE_82D8FE:
	STA.w !REGISTER_WriteToVRAMPortLo
	DEY
	BPL.b CODE_82D8FE
	STX.w !REGISTER_VRAMAddressLo
	SEP.b #$30
	LDX.b #$00
	LDY.b #$00
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
CODE_82D912:
	LDA.b ($06),y
	BNE.b CODE_82D91F
	CPX.b #$00
	BNE.b CODE_82D91F
	LDA.b #$00
	JMP.w CODE_82D933

CODE_82D91F:
	INX
	PHY
	INC
	ASL
	TAY
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData,y
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData+$01,y
	ORA.b #$20
	STA.w !REGISTER_WriteToVRAMPortHi
	PLY
CODE_82D933:
	INY
	CPY.b #$06
	BCC.b CODE_82D912
	REP.b #$20
	LDA.w #$2182
	STA.w !REGISTER_WriteToVRAMPortLo
	PLP
	RTS

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

CODE_82D942:
	PHP
	SEP.b #$30
	LDX.b #$03
CODE_82D947:
	STX.w $0690
	PHX
	JSR.w CODE_82D885
	JSR.w CODE_82D957
	PLX
	DEX
	BPL.b CODE_82D947
	PLP
	RTS

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

CODE_82D957:
	PHP
	SEP.b #$30
	LDX.w $0690
	LDA.w DATA_8180A2,x
	STA.b $3A
	LDX.b #$09
CODE_82D964:
	PHX
	LDA.w $0704,x
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	TAX
	LDY.b $3A
	LDA.b #$05
	STA.b $39
CODE_82D976:
	LDA.w !RAM_PLOK_Level_Player_ScoreMillionsDigit,y
	CMP.w $06AA,x
	BCC.b CODE_82D986
	BNE.b CODE_82D98C
	INX
	INY
	DEC.b $39
	BPL.b CODE_82D976
CODE_82D986:
	PLX
	DEX
	BPL.b CODE_82D964
	BRA.b CODE_82D9E5

CODE_82D98C:
	LDA.w $0704
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	TAY
	PHY
	LDX.w $0690
	LDA.w DATA_8180A2,x
	TAX
	PHX
	LDA.b #$05
	STA.b $38
CODE_82D9A4:
	LDA.w !RAM_PLOK_Level_Player_ScoreMillionsDigit,x
	STA.w $06AA,y
	INX
	INY
	DEC.b $38
	BPL.b CODE_82D9A4
	PLA
	LSR
	TAX
	PLA
	LSR
	TAY
	LDA.b #$02
	STA.b $38
CODE_82D9BA:
	LDA.w $072C,x
	STA.w $06E6,y
	INX
	INY
	DEC.b $38
	BPL.b CODE_82D9BA
	LDA.w $0704
	STA.b $38
	PLX
	PHX
	BEQ.b CODE_82D9DF
	INX
	STX.b $39
	LDX.b #$01
CODE_82D9D4:
	LDA.w $0704,x
	STA.w $0703,x
	INX
	CPX.b $39
	BNE.b CODE_82D9D4
CODE_82D9DF:
	PLX
	LDA.b $38
	STA.w $0704,x
CODE_82D9E5:
	PLP
	RTS

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

CODE_82D9E7:
	PHP
	REP.b #$10
	LDX.w #$5C0B
	LDY.w #$810A
	JSL.l CODE_80A425
	SEP.b #$30
	LDA.b #$81
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDY.b #$09
CODE_82D9FD:
	REP.b #$20
	TYA
	ASL
	TAX
	LDA.w DATA_818114,x
	STA.w !REGISTER_VRAMAddressLo
	STA.b $3A
	SEP.b #$20
	LDA.b #$00
	XBA
	LDA.w $0704,y
	PHY
	ASL
	STA.b $38
	ASL
	CLC
	ADC.b $38
	CLC
	ADC.b #$05
	TAX
	LDY.b #$05
CODE_82DA20:
	LDA.w $06AA,x
	STA.w $070E,y
	DEX
	DEY
	BPL.b CODE_82DA20
	LDY.b #$05
	LDX.b #$00
CODE_82DA2E:
	LDA.w $070E,x
	BNE.b CODE_82DA3B
	CPY.b #$05
	BNE.b CODE_82DA3B
	LDA.b #$00
	BRA.b CODE_82DA40

CODE_82DA3B:
	CLC
	ADC.b #$01
	ASL
	DEY
CODE_82DA40:
	STA.w !REGISTER_WriteToVRAMPortLo
	INC
	STA.b $38
	LDA.b #$20
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.b $38
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$20
	STA.w !REGISTER_WriteToVRAMPortHi
	REP.b #$20
	INX
	TXA
	CLC
	ADC.b $3A
	STA.w !REGISTER_VRAMAddressLo
	SEP.b #$20
	CPX.b #$06
	BCC.b CODE_82DA2E
	REP.b #$30
	TAX
	LDA.w #$2002
	STA.w !REGISTER_WriteToVRAMPortLo
	INC
	STA.w !REGISTER_WriteToVRAMPortLo
	INX
	STX.w !REGISTER_VRAMAddressLo
	DEC
	STA.w !REGISTER_WriteToVRAMPortLo
	INC
	STA.w !REGISTER_WriteToVRAMPortLo
	SEP.b #$10
	PLY
	DEY
	BMI.b CODE_82DA87
	JMP.w CODE_82D9FD

CODE_82DA87:
	LDY.b #$09
CODE_82DA89:
	REP.b #$20
	TYA
	ASL
	TAX
	LDA.w DATA_818128,x
	STA.w !REGISTER_VRAMAddressLo
	STA.b $3A
	SEP.b #$20
	LDA.b #$00
	XBA
	LDA.w $0704,y
	PHY
	STA.b $38
	ASL
	CLC
	ADC.b $38
	TAX
	LDY.b #$00
CODE_82DAA8:
	LDA.w $06E6,x
	ASL
	STA.b $38
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$20
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.b $38
	INC
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$20
	STA.w !REGISTER_WriteToVRAMPortHi
	INX
	INY
	REP.b #$20
	TYA
	CLC
	ADC.b $3A
	STA.w !REGISTER_VRAMAddressLo
	SEP.b #$20
	CPY.b #$03
	BCC.b CODE_82DAA8
	PLY
	DEY
	BPL.b CODE_82DA89
	PLP
	RTS

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

CODE_82DAD8:
	REP.b #$30
	LDX.w #$0638
	LDY.w #$0006
CODE_82DAE0:
	LDA.b $00,x
	BMI.b CODE_82DAF1
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82DAE0
	LDA.w #$0001
CODE_82DAF1:
	RTL

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

CODE_82DAF2:
	PHX
	PHY
	LDX.w #$0638
	LDY.w #$0006
CODE_82DAFA:
	LDA.w #$FFFF
	STA.b $00,x
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82DAFA
	PLY
	PLX
	RTL

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

CODE_82DB0C:
	REP.b #$30
	LDA.w $0A10
	CMP.w #$0001
	BEQ.b CODE_82DB4D
	LDA.w !RAM_PLOK_Level_Player_BuddyHornetCount
	BEQ.b CODE_82DB4D
	JSL.l CODE_82DAD8
	BPL.b CODE_82DB4D
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.b $00,x
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.b $02,x
	LDA.w #$3000
	STA.b $06,x
	LDA.w #$01F2
	STA.b $04,x
	DEC.w !RAM_PLOK_Level_Player_BuddyHornetCount
	LDA.w #$0000
	STA.w $0DF2,y
	LDA.w #$FD00
	STA.w $0E22,y
	STA.w $0E9A,y
	LDA.w #$0400
	STA.w $0E52,y
CODE_82DB4D:
	RTL

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

CODE_82DB4E:
	REP.b #$30
	LDX.w #$0638
	LDY.w #$0006
CODE_82DB56:
	LDA.b $00,x
	BMI.b CODE_82DB73
	JSR.w CODE_82DBE7
	JSL.l CODE_82DCAB
	JSR.w CODE_82DC9E
	JSR.w CODE_82DB7E
	LDA.w $0E52,y
	DEC
	STA.w $0E52,y
	BPL.b CODE_82DB73
	JSR.w CODE_82DC66
CODE_82DB73:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82DB56
	RTL

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

CODE_82DB7E:
	STX.b !RAM_PLOK_UnknownRAM000046
	STY.b !RAM_PLOK_UnknownRAM000048
	LDA.b $00,x
	STA.b $38
	LDA.b $02,x
	CLC
	ADC.w #$0008
	STA.b $3A
	LDX.w #$0458
	LDY.w #$000E
CODE_82DB94:
	LDA.b $00,x
	BMI.b CODE_82DBD8
	JSL.l CODE_82B816
	LDA.b $00,x
	SEC
	SBC.b $38
	CLC
	ADC.b $3C
	CMP.b $3E
	BCS.b CODE_82DBD8
	LDA.b $02,x
	SEC
	SBC.b $3A
	CLC
	ADC.b $40
	CMP.b $42
	BCS.b CODE_82DBD8
	LDA.w $093A,y
	BNE.b CODE_82DBD8
	STX.b $38
	LDA.w $091A,y
	ASL
	TAX
	JSL.l CODE_82B82F
	BMI.b CODE_82DBE2
	LDA.w #$000A
	JSL.l CODE_80FD81
	LDX.b !RAM_PLOK_UnknownRAM000046
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDA.w #$FFFF
	STA.w $0E52,y
	RTS

CODE_82DBD8:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82DB94
CODE_82DBE2:
	LDY.b !RAM_PLOK_UnknownRAM000048
	LDX.b !RAM_PLOK_UnknownRAM000046
	RTS

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

CODE_82DBE7:
	LDA.w $0E9A,y
	BMI.b CODE_82DBFD
	PHX
	TAX
	LDA.b $00,x
	BMI.b CODE_82DBFC
	STA.w $0E6A,y
	LDA.b $02,x
	STA.w $0E82,y
	PLX
	RTS

CODE_82DBFC:
	PLX
CODE_82DBFD:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	STA.w $0E6A,y
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	STA.w $0E82,y
	LDA.w $0E52,y
	CMP.w #$03D8
	BCS.b CODE_82DC14
	JSR.w CODE_82DC15
CODE_82DC14:
	RTS

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

CODE_82DC15:
	PHX
	PHY
	STY.b $38
	LSR.b $38
	LDX.w #$0458
	LDY.w #$0007
CODE_82DC21:
	DEC.b $38
	BMI.b CODE_82DC2E
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	BRA.b CODE_82DC21

CODE_82DC2E:
	LDA.w #$0007
	STA.b $38
CODE_82DC33:
	LDA.b $00,x
	BPL.b CODE_82DC4C
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	BPL.b CODE_82DC46
	LDY.w #$0007
	LDX.w #$0458
CODE_82DC46:
	DEC.b $38
	BPL.b CODE_82DC33
	BRA.b CODE_82DC5D

CODE_82DC4C:
	PLY
	TXA
	STA.w $0E9A,y
	LDA.b $00,x
	STA.w $0E6A,y
	LDA.b $02,x
	STA.w $0E82,y
	PLX
	RTS

CODE_82DC5D:
	PLY
	LDA.w #$FFFF
	STA.w $0E9A,y
	PLX
	RTS

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

CODE_82DC66:
	LDA.b $00,x
	STA.w $0C1C
	LDA.b $02,x
	STA.w $0C1E
	LDA.w #$0009
	STA.w $0C1A
	LDA.w #$0000
	STA.w $0C20
	LDA.w #$0000
	STA.w $0C22
	LDA.w #$0000
	STA.w $0C24
	LDA.w #$000F
	STA.w $0C26
	LDA.w #$7200
	STA.w $0C28
	JSL.l CODE_82D5AB
	LDA.w #$FFFF
	STA.b $00,x
	RTS

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

CODE_82DC9E:
	LDA.b $09
	AND.w #$0004
	LSR
	CLC
	ADC.w #$01F2
	STA.b $04,x
	RTS

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

CODE_82DCAB:
	JSR.w CODE_82DCB5
	JSR.w CODE_82DD5E
	JSR.w CODE_82DDD4
	RTL

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

CODE_82DCB5:
	LDA.b $00,x
	CMP.w $0E6A,y
	BCC.b CODE_82DCE7
	LDA.b $06,x
	ORA.w #$4000
	STA.b $06,x
	LDA.w #$0018
	STA.b $38
	LDA.w $0DF2,y
	BPL.b CODE_82DCD2
	LDA.w #$0028
	STA.b $38
CODE_82DCD2:
	LDA.w $0DF2,y
	SEC
	SBC.b $38
	BPL.b CODE_82DCE2
	CMP.w #$FD00
	BCS.b CODE_82DCE2
	LDA.w #$FD00
CODE_82DCE2:
	STA.w $0DF2,y
	BRA.b CODE_82DD10

CODE_82DCE7:
	LDA.b $06,x
	AND.w #$BFFF
	STA.b $06,x
	LDA.w #$0018
	STA.b $38
	LDA.w $0DF2,y
	BMI.b CODE_82DCFD
	LDA.w #$0028
	STA.b $38
CODE_82DCFD:
	LDA.w $0DF2,y
	CLC
	ADC.b $38
	BMI.b CODE_82DD0D
	CMP.w #$0300
	BCC.b CODE_82DD0D
	LDA.w #$0300
CODE_82DD0D:
	STA.w $0DF2,y
CODE_82DD10:
	LDA.b $02,x
	CMP.w $0E82,y
	BCC.b CODE_82DD3B
	LDA.w #$0018
	STA.b $38
	LDA.w $0E22,y
	BPL.b CODE_82DD26
	LDA.w #$0028
	STA.b $38
CODE_82DD26:
	LDA.w $0E22,y
	SEC
	SBC.b $38
	BPL.b CODE_82DD36
	CMP.w #$FD00
	BCS.b CODE_82DD36
	LDA.w #$FD00
CODE_82DD36:
	STA.w $0E22,y
	BRA.b CODE_82DD5D

CODE_82DD3B:
	LDA.w #$0018
	STA.b $38
	LDA.w $0E22,y
	BMI.b CODE_82DD4A
	LDA.w #$0028
	STA.b $38
CODE_82DD4A:
	LDA.w $0E22,y
	CLC
	ADC.b $38
	BMI.b CODE_82DD5A
	CMP.w #$0300
	BCC.b CODE_82DD5A
	LDA.w #$0300
CODE_82DD5A:
	STA.w $0E22,y
CODE_82DD5D:
	RTS

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

CODE_82DD5E:
	STZ.b $38
	LDA.w $0DF2,y
	BMI.b CODE_82DD7F
	AND.w #$00FF
	CLC
	ADC.w $0E0A,y
	STA.w $0E0A,y
	CMP.w #$0100
	BCC.b CODE_82DD9B
	SEC
	SBC.w #$00FF
	STA.w $0E0A,y
	INC.b $38
	BRA.b CODE_82DD9B

CODE_82DD7F:
	AND.w #$00FF
	EOR.w #$00FF
	STA.b $3A
	LDA.w $0E0A,y
	SEC
	SBC.b $3A
	STA.w $0E0A,y
	BPL.b CODE_82DD9B
	CLC
	ADC.w #$00FF
	STA.w $0E0A,y
	INC.b $38
CODE_82DD9B:
	LDA.w $0DF2,y
	BPL.b CODE_82DDB5
	XBA
	AND.w #$00FF
	SEC
	SBC.b $38
	STA.b $38
	XBA
	CLC
	ADC.w #$0100
	BEQ.b CODE_82DDB3
	ORA.w #$00FF
CODE_82DDB3:
	BRA.b CODE_82DDCD

CODE_82DDB5:
	XBA
	AND.w #$00FF
	CLC
	ADC.b $38
	STA.b $38
	XBA
	CMP.w #$0800
	BCC.b CODE_82DDCA
	LDA.w #$0800
	STA.w $0DF2,y
CODE_82DDCA:
	AND.w #$FF00
CODE_82DDCD:
	XBA
	CLC
	ADC.b $00,x
	STA.b $00,x
	RTS

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

CODE_82DDD4:
	STZ.b $38
	LDA.w $0E22,y
	BMI.b CODE_82DDF5
	AND.w #$00FF
	CLC
	ADC.w $0E3A,y
	STA.w $0E3A,y
	CMP.w #$0100
	BCC.b CODE_82DE11
	SEC
	SBC.w #$00FF
	STA.w $0E3A,y
	INC.b $38
	BRA.b CODE_82DE11

CODE_82DDF5:
	AND.w #$00FF
	EOR.w #$00FF
	STA.b $3A
	LDA.w $0E3A,y
	SEC
	SBC.b $3A
	STA.w $0E3A,y
	BPL.b CODE_82DE11
	CLC
	ADC.w #$00FF
	STA.w $0E3A,y
	INC.b $38
CODE_82DE11:
	LDA.w $0E22,y
	BPL.b CODE_82DE2B
	XBA
	AND.w #$00FF
	SEC
	SBC.b $38
	STA.b $38
	XBA
	CLC
	ADC.w #$0100
	BEQ.b CODE_82DE29
	ORA.w #$00FF
CODE_82DE29:
	BRA.b CODE_82DE43

CODE_82DE2B:
	XBA
	AND.w #$00FF
	CLC
	ADC.b $38
	STA.b $38
	XBA
	CMP.w #$0800
	BCC.b CODE_82DE40
	LDA.w #$0800
	STA.w $0E22,y
CODE_82DE40:
	AND.w #$FF00
CODE_82DE43:
	XBA
	CLC
	ADC.b $02,x
	BPL.b CODE_82DE4C
	LDA.w #$0000
CODE_82DE4C:
	STA.b $02,x
	RTS

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

CODE_82DE4F:
	REP.b #$30
	LDY.w #$000E
	LDA.w #$FFFF
CODE_82DE57:
	STA.w $0C8A,y
	DEY
	DEY
	BPL.b CODE_82DE57
	LDA.w $0848
	ASL
	TAY
	LDA.w DATA_81DF0B,y
	STA.b $06
	LDY.w #$0000
	LDX.w #$000E
CODE_82DE6E:
	LDA.b ($06),y
	STA.w $0C8A,x
	BMI.b CODE_82DEB0
	STA.w $0C9A,x
	INY
	INY
	LDA.b ($06),y
	STA.w $0CBA,x
	STA.w $0CAA,x
	INY
	INY
	LDA.b ($06),y
	STA.w $0CDA,x
	INY
	INY
	LDA.b ($06),y
	STA.w $0CCA,x
	INY
	INY
	LDA.b ($06),y
	STA.w $0CEA,x
	INY
	INY
	LDA.b ($06),y
	STA.w $0D0A,x
	STZ.w $0CFA,x
	STZ.w $0D1A,x
	STZ.w $0D2A,x
	STZ.w $0D9A,x
	INY
	INY
	DEX
	DEX
	BPL.b CODE_82DE6E
CODE_82DEB0:
	RTL

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

CODE_82DEB1:
	REP.b #$30
	LDX.w #$05CA
	LDY.w #$000E
CODE_82DEB9:
	LDA.w $0C8A,y
	BMI.b CODE_82DECB
	LDA.w $0D0A,y
	BPL.b CODE_82DEC8
	JSR.w CODE_82DF69
	BRA.b CODE_82DECB

CODE_82DEC8:
	JSR.w CODE_82DED6
CODE_82DECB:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82DEB9
	RTL

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

CODE_82DED6:
	LDA.w $0CDA,y
	CLC
	ADC.w $0CEA,y
	BMI.b CODE_82DEE4
	CMP.w $0CCA,y
	BCC.b CODE_82DEF0
CODE_82DEE4:
	LDA.w $0CEA,y
	EOR.w #$FFFF
	INC
	STA.w $0CEA,y
	BRA.b CODE_82DF68

CODE_82DEF0:
	STA.w $0CDA,y
	LDA.w $0CAA,y
	CLC
	ADC.w $0CEA,y
	STA.w $0CAA,y
	PHX
	LDA.w $0C8A,y
	LSR
	LSR
	LSR
	LSR
	STA.b $38
	LDA.w $0CEA,y
	BPL.b CODE_82DF15
	LDA.w $0CAA,y
	CLC
	ADC.w #$0010
	BRA.b CODE_82DF18

CODE_82DF15:
	LDA.w $0CAA,y
CODE_82DF18:
	LSR
	LSR
	LSR
	LSR
	SEP.b #$20
	STA.w !REGISTER_Multiplicand
	REP.b #$20
	LDA.b !RAM_PLOK_UnknownRAM00008A
	LSR
	SEP.b #$20
	STA.w !REGISTER_Multiplier
	REP.b #$20
	NOP #4
	LDA.w !REGISTER_ProductOrRemainderLo
	ASL
	CLC
	ADC.b $38
	ASL
	TAX
	LDA.w $0CEA,y
	BPL.b CODE_82DF44
	LDA.w #$1D24
	BRA.b CODE_82DF47

CODE_82DF44:
	LDA.w #$0000
CODE_82DF47:
	STA.l $7E3000,x
	PLX
	LDA.w $0C8A,y
	SEC
	SBC.w #$0018
	STA.b $00,x
	LDA.w $0CAA,y
	SEC
	SBC.w #$0020
	STA.b $02,x
	LDA.w #$024E
	STA.b $04,x
	LDA.w #$2000
	STA.b $06,x
CODE_82DF68:
	RTS

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

CODE_82DF69:
	REP.b #$30
	LDA.w $0D0A,y
	BPL.b CODE_82DF7D
	LDA.w $0CCA,y
	BEQ.b CODE_82DF7D
	LDA.w $0D9A,y
	BNE.b CODE_82DF7D
	JMP.w CODE_82E007

CODE_82DF7D:
	PHX
	PHY
	LDA.w $0D2A,y
	BEQ.b CODE_82DF8A
	DEC
	STA.w $0D2A,y
	BRA.b CODE_82E002

CODE_82DF8A:
	LDA.w $0D0A,y
	AND.w #$7FFF
	ASL
	TAX
	LDA.w DATA_81E06F,x
	STA.b $38
	TYA
	TAX
CODE_82DF99:
	LDY.w $0D1A,x
	LDA.b ($38),y
	BPL.b CODE_82DFC4
	STZ.w $0D1A,x
	LDA.w $0C9A,x
	STA.w $0C8A,x
	LDA.w $0CBA,x
	STA.w $0CAA,x
	STZ.w $0D3A,x
	STZ.w $0D4A,x
	LDA.w $0CCA,x
	CMP.w #$0002
	BNE.b CODE_82DF99
	STZ.w $0D9A,x
	PLY
	PLX
	BRA.b CODE_82E007

CODE_82DFC4:
	DEC
	STA.w $0D2A,x
	INY
	INY
	LDA.b ($38),y
	CMP.w #$8000
	BEQ.b CODE_82DFD4
	STA.w $0D3A,x
CODE_82DFD4:
	INY
	INY
	LDA.b ($38),y
	CMP.w #$8000
	BEQ.b CODE_82DFE0
	STA.w $0D4A,x
CODE_82DFE0:
	INY
	INY
	LDA.b ($38),y
	STA.w $0D5A,x
	INY
	INY
	LDA.b ($38),y
	STA.w $0D6A,x
	INY
	INY
	LDA.b ($38),y
	STA.w $0D7A,x
	INY
	INY
	LDA.b ($38),y
	STA.w $0D8A,x
	TYA
	INC
	INC
	STA.w $0D1A,x
CODE_82E002:
	PLY
	PLX
	JSR.w CODE_82E02D
CODE_82E007:
	LDA.w $0C8A,y
	STA.b $00,x
	LDA.w $0CAA,y
	STA.b $02,x
	LDA.w #$2000
	STA.b $06,x
	LDA.w $0D0A,y
	BPL.b CODE_82E027
	LDA.w $0CDA,y
	ASL
	PHX
	TAX
	LDA.w DATA_81DF05,x
	PLX
	BRA.b CODE_82E02A

CODE_82E027:
	LDA.w #$00BE
CODE_82E02A:
	STA.b $04,x
	RTS

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

CODE_82E02D:
	LDA.w $0D6A,y
	CLC
	ADC.w $0D4A,y
	STA.w $0D4A,y
	BPL.b CODE_82E04E
	EOR.w #$FFFF
	INC
	CMP.w $0D8A,y
	BCC.b CODE_82E045
	LDA.w $0D8A,y
CODE_82E045:
	EOR.w #$FFFF
	INC
	ORA.w #$00FF
	BRA.b CODE_82E05C

CODE_82E04E:
	CMP.w $0D8A,y
	BCC.b CODE_82E059
	LDA.w $0D8A,y
	STA.w $0D4A,y
CODE_82E059:
	AND.w #$FF00
CODE_82E05C:
	XBA
	STA.w $0CEA,y
	CLC
	ADC.w $0CAA,y
	STA.w $0CAA,y
	LDA.w $0D5A,y
	CLC
	ADC.w $0D3A,y
	STA.w $0D3A,y
	BPL.b CODE_82E078
	ORA.w #$00FF
	BRA.b CODE_82E086

CODE_82E078:
	CMP.w $0D7A,y
	BCC.b CODE_82E083
	LDA.w $0D7A,y
	STA.w $0D3A,y
CODE_82E083:
	AND.w #$FF00
CODE_82E086:
	XBA
	STA.w $0CFA,y
	CLC
	ADC.w $0C8A,y
	STA.w $0C8A,y
	RTS

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

CODE_82E092:
	REP.b #$30
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BPL.b CODE_82E09A
	RTL

CODE_82E09A:
	LDX.w #$05CA
	LDY.w #$000E
CODE_82E0A0:
	LDA.w $0CCA,y
	CMP.w #$0002
	BEQ.b CODE_82E0B0
	LDA.w #$0000
	STA.w $0D9A,y
	LDA.b $00,x
CODE_82E0B0:
	BMI.b CODE_82E100
	LDA.w #$000C
	STA.b $38
	ASL
	STA.b $3A
	LDA.w $0D0A,y
	BEQ.b CODE_82E0CE
	PHX
	LDA.w $0CDA,y
	ASL
	TAX
	LDA.w DATA_81DEFF,x
	STA.b $38
	ASL
	STA.b $3A
	PLX
CODE_82E0CE:
	LDA.b $00,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.b $38
	CMP.b $3A
	BCS.b CODE_82E100
	LDA.b $02,x
	SEC
	SBC.w !RAM_PLOK_Level_Player_YPosLo
	SEC
	SBC.w #$0020
	CLC
	ADC.w #$000A
	CMP.w #$0014
	BCS.b CODE_82E100
	LDA.w #$0001
	STA.w $0D9A,y
	JSR.w CODE_82E10B
	LDA.b $02,x
	SEC
	SBC.w #$001E
	STA.w !RAM_PLOK_Level_Player_YPosLo
CODE_82E100:
	TXA
	CLC
	ADC.w #$000A
	TAX
	DEY
	DEY
	BPL.b CODE_82E0A0
	RTL

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

CODE_82E10B:
	LDA.w !RAM_PLOK_Level_Player_YPosLo
	CLC
	ADC.w $0CEA,y
	STA.w !RAM_PLOK_Level_Player_YPosLo
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	CLC
	ADC.w $0CFA,y
	STA.w !RAM_PLOK_Level_Player_XPosLo
	LDA.w !RAM_PLOK_Level_Player_YSpeedLo
	BMI.b CODE_82E176
	STZ.w !RAM_PLOK_Level_Player_InAirFlagLo
	STZ.w !RAM_PLOK_Level_Player_YSpeedLo
	STZ.w $0810
	JSL.l CODE_82E132
	RTS

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

CODE_82E132:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$00F0
	BCS.b CODE_82E16C
	CMP.w #$0098
	BCC.b CODE_82E150
	BEQ.b CODE_82E150
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CMP.b !RAM_PLOK_Level_RightmostCameraXPosLo
	BCS.b CODE_82E150
	JSL.l CODE_80A8CD
	BRA.b CODE_82E132

CODE_82E150:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.b !RAM_PLOK_UnknownRAM00006A
	CMP.w #$0010
	BCC.b CODE_82E16C
	CMP.w #$0070
	BCS.b CODE_82E176
	LDA.b !RAM_PLOK_UnknownRAM00006A
	CMP.b !RAM_PLOK_Level_LeftmostCameraXPosLo
	BCC.b CODE_82E176
	JSL.l CODE_80A8D1
	BRA.b CODE_82E150

CODE_82E16C:
	LDA.w !RAM_PLOK_Level_Player_XPosLo
	SEC
	SBC.w $0CFA,y
	STA.w !RAM_PLOK_Level_Player_XPosLo
CODE_82E176:
	RTL

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

CODE_82E177:					; Optimization: This routine doesn't modify Y, so the PHY/PLY are unnecessary. This would also allow the removal of the code at CODE_82E1A5.
	PHP
	REP.b #$30
	PHX
	PHY
	PHA
	SEP.b #$30
	LDA.l $001CE2
	TAX
	INC
	AND.b #$0F
	CMP.l $001CE0
	BEQ.b CODE_82E1A5
	PLA
	STA.l $001CF6,x
	PLA					; Optimization: If the above change is made, this instruction can be changed to TYA.
	STA.l $001CE6,x
	INX
	TXA
	AND.b #$0F
	STA.l $001CE2
	REP.b #$30
	PLY
	PLX
	PLP
	RTL

CODE_82E1A5:
	REP.b #$30
	PLA
	PLY
	PLX
	PLP
	RTL

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

CODE_82E1AC:
	PHP
	REP.b #$30
	PHX
	PHY
	SEP.b #$30
	LDA.l $001CE4
	SEC
	SBC.w !REGISTER_APUPort0
	BEQ.b CODE_82E1C1
	CMP.b #$01
	BEQ.b CODE_82E1F9
CODE_82E1C1:
	LDA.l $001CE0
	CMP.l $001CE2
	BEQ.b CODE_82E1F9
	TAX
	LDA.l $001CE6,x
	PHA
	LDA.l $001CF6,x
	PHA
	TXA
	INC
	AND.b #$0F
	STA.l $001CE0
	REP.b #$20
	PLA
	STA.w !REGISTER_APUPort2
	SEP.b #$20
	LDA.l $001CE4
	INC
	STA.l $001CE4
	STA.w !REGISTER_APUPort0
	REP.b #$30
	PLY
	PLX
	PLP
	CLC
	RTL

CODE_82E1F9:
	REP.b #$30
	PLY
	PLX
	PLP
	SEC
	RTL

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

CODE_82E200:
	PHP
	SEP.b #$20
	LDA.b #$FA
CODE_82E205:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_82E205
	STA.l $001CE4
	STA.w !REGISTER_APUPort0
	REP.b #$20
	LDA.w #$0001
	STA.l $001CE0
	STA.l $001CE2
	PLP
	RTL

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

if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_82E233_PLOK_E.asm)
	%FREE_BYTES(NULLROM, 10, $FF)
else
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
else

CODE_82E220:
	PLP
	RTL
endif

CODE_82E222:							; Note: All the code past this point up until the end of this bank is used by the Japanese version.
	REP.b #$30
	STZ.w $1814
	STZ.w $1816
	JSL.l CODE_82E391
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_809FE0
else
	JSL.l $809FD2
endif
	JSL.l CODE_82E271
	RTL

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

CODE_82E237:
	PHP
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_809FE0
else
	JSL.l $809FD2
endif
	LDA.w $1816
	INC
	ASL
	STA.b $46
	ASL
	ASL
	CLC
	ADC.b $46
	ASL
	CLC
	ADC.w #$258B
	STA.b $46
	LDX.w #$5D86
	LDY.w #$0005
CODE_82E257:
	LDA.b $46
	CMP.w #$2603
	BCC.b CODE_82E263
	LDA.w #$258B
	STA.b $46
CODE_82E263:
	JSR.w CODE_82E2A8
	TXA
	CLC
	ADC.w #$0020
	TAX
	DEY
	BPL.b CODE_82E257
	PLP
	RTL

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

CODE_82E271:
	PHP
	REP.b #$30
	LDA.w $1816
	INC
	ASL
	STA.b $46
	ASL
	ASL
	CLC
	ADC.b $46
	CLC
	ADC.w #$000B
	STA.b $46
	LDY.w #$0002
	LDX.w #$5CC3
CODE_82E28C:
	LDA.b $46
	CMP.w #$0029
	BCC.b CODE_82E298
	LDA.w #$000B
	STA.b $46
CODE_82E298:
	LDA.b $4C
	JSR.w CODE_82E2C4
	TXA
	CLC
	ADC.w #$0020
	TAX
	DEY
	BPL.b CODE_82E28C
	PLP
	RTL

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

CODE_82E2A8:
	SEP.b #$20
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$30
	PHY
	STX.w !REGISTER_VRAMAddressLo
	LDY.w #$0013
CODE_82E2B8:
	LDA.b $46
	STA.w !REGISTER_WriteToVRAMPortLo
	INC.b $46
	DEY
	BPL.b CODE_82E2B8
	PLY
	RTS

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

CODE_82E2C4:
	SEP.b #$20
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$30
	PHX
	PHY
	STX.w !REGISTER_VRAMAddressLo
	LDY.w #$0009
CODE_82E2D5:
	LDA.b $46
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData,x
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	ORA.w #$2000
else
	ORA.w #$2400
endif
	STA.w !REGISTER_WriteToVRAMPortLo
	INC.b $46
	DEY
	BPL.b CODE_82E2D5
	PLY
	PLX
	RTS

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

CODE_82E2EA:
	REP.b #$30
	PHP
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_809FE0
else
	JSL.l $809FD2
endif
	LDA.b $AC
	PHA
	INC.b $AC
	LDA.w #$4C58
	STA.b $46
	STA.w !REGISTER_VRAMAddressLo
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$09
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	STZ.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w PLOK_LegacyIslandTitleCardData_DATA_81B19C+$04
	STA.w DMA[$01].SourceLo
	LDA.w #$0140
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$10
	LDX.w #$0004
CODE_82E32F:
	REP.b #$20
	LDA.b $46
	CLC
	ADC.w #$00A0
	STA.b $46
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0140
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	DEX
	BPL.b CODE_82E32F
	REP.b #$30
	PLA
	STA.b $AC
	PLP
	RTL

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

CODE_82E353:
	PHP
	REP.b #$30
	STA.w !REGISTER_VRAMAddressLo
	LDA.b $AC
	PHA
	INC.b $AC
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$09
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	STZ.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w PLOK_LegacyIslandTitleCardData_DATA_81B19C
	STA.w DMA[$01].SourceLo
	LDA.w #$0140
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	PLA
	STA.b $AC
	PLP
	RTL

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

CODE_82E391:
	REP.b #$30
	JSL.l CODE_82E3A0
	JSL.l CODE_82E40F
	JSL.l CODE_82E47E
	RTL

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

CODE_82E3A0:
	PHP
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_809FE0
else
	JSL.l $809FD2
endif
	LDA.b $AC
	PHA
	INC.b $AC
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$09
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	STZ.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$4D30
	STA.w !REGISTER_VRAMAddressLo
	LDA.w PLOK_LegacyIslandTitleCardData_DATA_81B19C+$04
	STA.w DMA[$01].SourceLo
	LDA.w #$00A0
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$4DB0
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0140
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$4E80
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$00A0
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	PLA
	STA.b $AC
	PLP
	RTL

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

CODE_82E40F:
	PHP
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_809FE0
else
	JSL.l $809FD2
endif
	LDA.b $AC
	PHA
	INC.b $AC
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$09
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	STZ.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$4E50
	STA.w !REGISTER_VRAMAddressLo
	LDA.w PLOK_LegacyIslandTitleCardData_DATA_81B19C+$04
	STA.w DMA[$01].SourceLo
	LDA.w #$0060
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$4ED0
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0140
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$4F80
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$00E0
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	PLA
	STA.b $AC
	PLP
	RTL

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

CODE_82E47E:
	PHP
	REP.b #$30
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	JSL.l CODE_809FE0
else
	JSL.l $809FD2
endif
	LDA.b $AC
	PHA
	INC.b $AC
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$09
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	STZ.w DMA[$01].SourceBank
	REP.b #$20
	LDA.w #$4F70
	STA.w !REGISTER_VRAMAddressLo
	LDA.w PLOK_LegacyIslandTitleCardData_DATA_81B19C+$04
	STA.w DMA[$01].SourceLo
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$4FF0
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0240
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w #$5180
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	PLA
	STA.b $AC
	PLP
	RTL

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

CODE_82E4ED:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	PHP
	REP.b #$30
	PHY
	PHX
	PHA
	REP.b #$20
	LDA.w $1814
	CMP.w #$000A
	BCC.b +++
	LDX.w $1816
	BNE.b +
	JSL.l CODE_82E40F
	BRA.b ++

+:
	DEX
	BNE.b +
	JSL.l CODE_82E47E
	BRA.b ++

+:
	JSL.l CODE_82E3A0
++:
	LDA.w $1816
	INC
	CMP.w #$0003
	BCC.b +
	LDA.w #$0000
+:
	STA.w $1816
	JSL.l CODE_82E271
	LDA.w #$0000
+++:
	STA.w $1814
	JSL.l CODE_809FE0
	REP.b #$30
	PLA
	PHA
	AND.w #$000E
	ASL
	ASL
	ASL
	ASL
	STA.b $46
	PLA
	AND.w #$03E0
	CLC
	ASL
	ASL
	ASL
	ASL 
	ADC.b $46
	ADC.w #PLOK_UnsortedData_GFX_BigJapaneseCharacterFont
	STA.w DMA[$01].SourceLo
	STA.b $48
	SEP.b #$20
	LDA.b #PLOK_UnsortedData_GFX_BigJapaneseCharacterFont>>16
	ADC.b #$00
	STA.w DMA[$01].SourceBank
	REP.b #$20
	LDA.b $AC
	PHA
	INC.b $AC
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	REP.b #$30
	LDA.w $1816
	ASL
	STA.b $46
	ASL
	ASL
	CLC
	ADC.b $46
	CLC
	ADC.w $1814
	ASL
	TAX
	LDA.l DATA_82E5C4,x
	STA.w !REGISTER_VRAMAddressLo
	STA.b $46
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.b $48
	CLC
	ADC.w #$0100
	STA.w DMA[$01].SourceLo
	LDA.b $46
	CLC
	ADC.w #$0080
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	INC.w $1814
	PLA
	STA.b $AC
	PLX
	PLY
	PLP
	RTL
else
	PHP
	REP.b #$30
	PHY
	PHX
	PHA
	AND.w #$0007
	ASL
	ASL
	ASL
	ASL
	STA.b $46
	PLA
	AND.w #$00F8
	CLC
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	ADC.b $46
	ADC.w #$0000
	STA.w DMA[$01].SourceLo
	STA.b $48
	SEP.b #$20
	LDA.b #$01
	ADC.b #$00
	STA.w DMA[$01].SourceBank
	REP.b #$20
	LDA.b $AC
	PHA
	INC.b $AC
	SEP.b #$30
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	STZ.w $4317							; Glitch: This writes to open bus
	REP.b #$30
	LDA.w $1816
	ASL
	STA.b $46
	ASL
	ASL
	CLC
	ADC.b $46
	CLC
	ADC.w $1814
	ASL
	TAX
	LDA.l DATA_82E5C4,x
	STA.w !REGISTER_VRAMAddressLo
	STA.b $46
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.b $48
	CLC
	ADC.w #$0100
	STA.w DMA[$01].SourceLo
	LDA.b $46
	CLC
	ADC.w #$0080
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0020
	STA.w DMA[$01].SizeLo
	SEP.b #$20
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$20
	LDA.w $1814
	INC
	CMP.w #$000A
	BCC.b CODE_82E5B8
	LDX.w $1816
	BNE.b CODE_82E595
	JSL.l CODE_82E40F
	BRA.b CODE_82E5A2

CODE_82E595:
	DEX
	BNE.b CODE_82E59E
	JSL.l CODE_82E47E
	BRA.b CODE_82E5A2

CODE_82E59E:
	JSL.l CODE_82E3A0
CODE_82E5A2:
	LDA.w $1816
	INC
	CMP.w #$0003
	BCC.b CODE_82E5AE
	LDA.w #$0000
CODE_82E5AE:
	STA.w $1816
	JSL.l CODE_82E271
	LDA.w #$0000
CODE_82E5B8:
	STA.w $1814
	REP.b #$30
	PLA
	STA.b $AC
	PLX
	PLY
	PLP
	RTL
endif

DATA_82E5C4:
	dw $4D30,$4D40,$4D50,$4D60,$4D70,$4E00,$4E10,$4E20
	dw $4E30,$4E40,$4E50,$4E60,$4E70,$4F00,$4F10,$4F20
	dw $4F30,$4F40,$4F50,$4F60,$4F70,$5000,$5010,$5020
	dw $5030,$5040,$5050,$5060,$5070,$5100

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
CODE_82E83C:
	REP.b #$30
	LDX.w #$5CC3
	LDA.w #$000B
	STA.b $46
	JSR.w +
	RTL

CODE_82E84A:
	REP.b #$30
	LDX.w #$5D03
	LDA.w #$001F
	STA.b $46
	JSR.w +
	RTL

+:
	SEP.b #$20
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$30
	PHX
	PHY
	STX.w !REGISTER_VRAMAddressLo
	LDY.w #$0009
-:
	LDA.b $46
	ASL
	TAX
	LDA.w PLOK_PrimaryLanguageBigLetterTileDataTable_TileData,x
	ORA.b $38
	STA.w !REGISTER_WriteToVRAMPortLo
	INC.b $46
	DEY
	BPL.b -
	PLY
	PLX
	RTS

	%InsertGarbageData(NULLROM, incbin, UNK_82E87D_PLOK_J.bin)
else
	%InsertGarbageData(NULLROM, incsrc, ADDR_82E600_PLOK_U.asm)
endif
endif

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

%BANK_END(<EndBank>)
endmacro

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

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

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

DATA_838000:
	db $00,$00,$00,$00,$01,$01,$01,$01,$02,$02,$02,$02,$03,$03,$03,$03
	db $04,$04,$04,$04,$05,$05,$05,$05,$06,$06,$06,$06,$07,$07,$07,$07
	db $08,$08,$08,$08,$09,$09,$09,$09,$0A,$0A,$0A,$0A,$0B,$0B,$0B,$0B
	db $0C,$0C,$0C,$0C,$0D,$0D,$0D,$0D,$0E,$0E,$0E,$0E,$0F,$0F,$0F,$0F
	db $10,$10,$10,$10,$11,$11,$11,$11,$12,$12,$12,$12,$13,$13,$13,$13
	db $14,$14,$14,$14,$15,$15,$15,$15,$16,$16,$16,$16,$17,$17,$17,$17
	db $18,$18,$18,$18,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$1B,$1B,$1B,$1B
	db $1C,$1C,$1C,$1C,$1D,$1D,$1D,$1D,$1E,$1E,$1E,$1E,$1F,$1F,$1F,$1F

DATA_838080:
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40
	db $01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40,$01,$04,$10,$40

DATA_838100:
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80
	db $02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80,$02,$08,$20,$80

DATA_838180:
	dw DATA_83A32E,DATA_839D82,DATA_839DB4,DATA_839DE6,DATA_839E18,DATA_839E4A,DATA_839E7C,DATA_839EAE,DATA_839EE0,DATA_839BF2,DATA_839C24,DATA_839C56,DATA_839C88,DATA_839CBA,DATA_839CEC,DATA_839D1E
	dw DATA_839D50,DATA_839F12,DATA_839F44,DATA_839F76,DATA_839FA8,DATA_839FDA,DATA_83A00C,DATA_83A03E,DATA_83A070,DATA_83A0A2,DATA_83A0D4,DATA_83A106,DATA_83A138,DATA_83A16A,DATA_83A19C,DATA_83A1CE
	dw DATA_83A200,DATA_83A232,DATA_83A264,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A296
	dw DATA_83A296,DATA_83A296,DATA_83A296,DATA_83A2CA,DATA_83A296,DATA_83A4F0,DATA_83A4FA,DATA_83A504,DATA_83A50E,DATA_83A518,DATA_83A522,DATA_83A52C,DATA_83A536,DATA_83A540,DATA_83A54A,DATA_83A554
	dw DATA_83A55E,DATA_83A568,DATA_83A572,DATA_83A57C,DATA_83A586,DATA_83A590,DATA_83A5B2,DATA_83A5BC,DATA_83A5C6,DATA_83A5D0,DATA_83A5DA,DATA_83A5E4,DATA_83A5EE,DATA_83A624,DATA_83A64E,DATA_83A678
	dw DATA_83A6A2,DATA_83A6CC,DATA_83A6F6,DATA_83A720,DATA_83A74A,DATA_83A774,DATA_83A79E,DATA_83A7C8,DATA_83A7F2,DATA_83A81C,DATA_83A846,DATA_83A870,DATA_83A89A,DATA_83A930,DATA_83A926,DATA_83A992
	dw DATA_83A99C,DATA_83A9A6,DATA_83A9C0,DATA_83A9E2,DATA_83AA34,DATA_83B1A0,DATA_83ABAC,DATA_83ABB6,DATA_83ABC0,DATA_83ABCA,DATA_83AD28,DATA_83AD32,DATA_83ADC6,DATA_83AD9C,DATA_83AD82,DATA_83AD78
	dw DATA_83ADD8,DATA_8386E4,DATA_83AFA2,DATA_83AF98,DATA_83AF8E,DATA_83AFAC,DATA_83AFB6,DATA_83AFC0,DATA_83AFCA,DATA_83AFD4,DATA_83AFDE,DATA_83AFE8,DATA_83B00A,DATA_83B02C,DATA_83B104,DATA_83B10E
	dw DATA_83ABD4,DATA_83ABDE,DATA_83ABE8,DATA_83ABF2,DATA_83ABFC,DATA_83AC06,DATA_83AC10,DATA_83AC1A,DATA_83AC24,DATA_83AC2E,DATA_83AC38,DATA_83AC42,DATA_83B118,DATA_83B122,DATA_83B12C,DATA_83B136
	dw DATA_83B140,DATA_83B14A,DATA_83B1CC,DATA_83B1D6,DATA_83B1E0,DATA_83B1EA,DATA_83B1F4,DATA_83ADFE,DATA_83ADF4,DATA_83ADEA,DATA_83AA9E,DATA_83AAF0,DATA_83AB42,DATA_83B2CE,DATA_83B2E0,DATA_83B2F2
	dw DATA_83B304,DATA_83B316,DATA_83B328,DATA_83B342,DATA_83B35C,DATA_83B376,DATA_83B390,DATA_83B3AA,DATA_83B3C4,DATA_83B3DE,DATA_83B3F8,DATA_83B41A,DATA_83B43C,DATA_83B45E,DATA_83B480,DATA_83B4A2
	dw DATA_83B4C4,DATA_83B4E6,DATA_83B508,DATA_83B53A,DATA_83B56C,DATA_83B59E,DATA_83B5D0,DATA_83B602,DATA_83B634,DATA_83B666,DATA_83B698,DATA_83B6CA,DATA_83B6FC,DATA_83B72E,DATA_83B760,DATA_83B792
	dw DATA_83B7C4,DATA_83B7F6,DATA_83B828,DATA_83B8D2,DATA_83B84A,DATA_83B8F4,DATA_83B86C,DATA_83B916,DATA_83B88E,DATA_83B938,DATA_83B8B0,DATA_83B95A,DATA_8386E4,DATA_8399FC,DATA_839A2E,DATA_839A60
	dw DATA_839A92,DATA_839AC4,DATA_839AF6,DATA_839B26,DATA_839B58,DATA_83AE24,DATA_83BA6E,DATA_83BA90,DATA_83BAC2,DATA_83BAF4,DATA_83BB36,DATA_83BB78,DATA_83BBBA,DATA_83BBEC,DATA_83BC0E,DATA_83BC28
	dw DATA_83BC3A,DATA_83BC4C,DATA_83BC6E,DATA_83BC98,DATA_83BCCA,DATA_83BCF4,DATA_83BD1E,DATA_83BD38,$000ED0,$000EFA,$000F24,$000F4E,$000F78,$000FA2,$000FCC,$000FF6
	dw DATA_83BD42,DATA_83BD4C,DATA_83BD56,DATA_83BD60,DATA_83BD6A,DATA_83BDA0,DATA_83BDAA,DATA_83BDB4,DATA_83BDBE,DATA_83BD8C,DATA_83BD96,DATA_83AD44,DATA_83AC74,DATA_83AC74,DATA_83AC74,DATA_83AC74
	dw DATA_83AC7E,DATA_83BDC8,DATA_83BDDA,DATA_83BDFC,DATA_83BE1E,DATA_83BE28,DATA_83BE3A,DATA_83BE44,DATA_83B04E,DATA_83B098,DATA_83B0E2,DATA_83BE4E,DATA_83BE4E,DATA_83BE4E,DATA_83BE4E,DATA_83BE58
	dw DATA_83BEA2,DATA_83BEEC,DATA_83BF3E,DATA_83BF88,DATA_83BFD2,DATA_83C01C,DATA_83C036,DATA_83C050,DATA_83C072,DATA_83C01C,DATA_83C01C,DATA_83C08C,DATA_83C0B6,DATA_83C0E0,DATA_83C112,DATA_83C144
	dw DATA_83C16E,DATA_83C198,DATA_83C1AA,DATA_83C198,DATA_83C1AA,DATA_83C198,DATA_83C1AA,DATA_83AD66,DATA_83B1C2,DATA_83C224,DATA_83C22E,DATA_83C238,DATA_83C242,DATA_83C24C,DATA_83C256,DATA_83C260
	dw DATA_83C26A,DATA_83C274,DATA_83C27E,DATA_83C288,DATA_83C292,DATA_83C29C,DATA_83C2A6,DATA_83C2B0,DATA_83C2BA,DATA_83C2C4,DATA_83C2CE,DATA_83C2D8,DATA_83C2E2,DATA_83C2EC,DATA_83C2F6,DATA_83C300
	dw DATA_83C30A,DATA_83C3A2,DATA_83C3AC,DATA_83C3B6,DATA_83C3C0,DATA_83C3CA,DATA_83C3D4,DATA_83C3DE,DATA_83C3E8,DATA_83C3F2,DATA_83C3FC,DATA_83C406,DATA_83C410,DATA_83C41A,DATA_83C424,DATA_83C42E
	dw DATA_83C438,DATA_83C442,DATA_83C44C,DATA_83C456,DATA_83C460,DATA_83C46A,DATA_83C474,DATA_83C47E,DATA_83C488,DATA_83C492,DATA_83C49C,DATA_83C4A6,DATA_83C4B0,DATA_83C4BA,DATA_83C4C4,DATA_83C4D6
	dw DATA_83C4E8,DATA_83C4FA,DATA_83C50C,DATA_83C51E,DATA_83C530,DATA_83C552,DATA_83C574,DATA_83C596,DATA_83C5B8,DATA_83C5DA,DATA_83C5FC,DATA_83C61E,DATA_83C640,DATA_83C662,DATA_83C684,DATA_83C6A6
	dw DATA_83C6C8,DATA_83C6EA,DATA_83C70C,DATA_83C72E,DATA_83C750,DATA_83C772,DATA_83C794,DATA_83C7B6,DATA_83C7D8,DATA_83C7FA,DATA_83C81C,DATA_83C83E,DATA_83C860,DATA_83C882,DATA_83C8A4,DATA_83C8C6
	dw DATA_83C8E8,DATA_83C90A,DATA_83C92C,DATA_83C94E,DATA_83C970,DATA_83C992,DATA_83C9B4,DATA_83C9BE,DATA_83C9C8,DATA_83C9D2,DATA_83C9DC,DATA_83C9E6,DATA_83C9F0,DATA_83C9FA,DATA_83CA04,DATA_83CA0E
	dw DATA_83CA18,DATA_83CA22,DATA_83C9DC,DATA_83C9E6,DATA_83C9F0,DATA_83C9FA,DATA_83CA2C,DATA_83CA36,DATA_83CA40,DATA_83CA4A,DATA_83CA54,DATA_83CA6E,DATA_83CA88,DATA_83CAA2,DATA_83CABC,DATA_83CAD6
	dw DATA_83CAF0,DATA_83CB0A,DATA_83CB14,DATA_83CB1E,DATA_83CB30,DATA_83CB4A,DATA_83CB64,DATA_83CB7E,DATA_83CB98,DATA_83CBAA,DATA_83CBC4,DATA_83CBE6,DATA_83CC10,DATA_83CC42,DATA_83CC7C,DATA_83CCBE
	dw DATA_83CD08,DATA_83CD52,DATA_83CD9C,DATA_83CDDE,DATA_83CE20,DATA_83CE5A,DATA_83CE8C,DATA_83CEB6,DATA_83CED8,DATA_83CEF2,DATA_83CF04,DATA_83CF0E,DATA_83CF30,DATA_83CF52,DATA_83CF74,DATA_83CF96
	dw DATA_83CFB8,DATA_83CFDA,DATA_83CFFC,DATA_83D01E,DATA_83D040,DATA_83D062,DATA_83D084,DATA_83D0A6,DATA_83D0C8,DATA_83D0EA,DATA_83D10C,DATA_83D12E,DATA_83D150,DATA_83D172,DATA_83D194,DATA_83D1B6
	dw DATA_83D1D8,DATA_83D1FA,DATA_83D21C,DATA_83D23E,DATA_83D260,DATA_83D282,DATA_83D2AC,DATA_83D2B6,DATA_83D2C0,DATA_83D2CA,DATA_83D34A,DATA_83D320,DATA_83D2F6,DATA_83D2D4,DATA_83D354,DATA_83D376
	dw DATA_83D398,DATA_83D3BA,DATA_83D3DC,DATA_83D3FE,DATA_83D4B8,DATA_83D48E,DATA_83D464,DATA_83D442,DATA_83D420,DATA_83D4C2,DATA_83D4F4,DATA_83D50E,DATA_83AC4C,DATA_83AC56,DATA_83AC60,DATA_83AC6A
	dw DATA_83B154,DATA_83B16E,DATA_839B8A,DATA_839BA4,DATA_839BBE,DATA_839BD8,DATA_83C314,DATA_83C31E,DATA_83C328,DATA_8390C0,DATA_8390F2,DATA_839124,DATA_839156,DATA_839188,DATA_8391BA,DATA_8391EC
	dw DATA_83921E,DATA_839250,DATA_839282,DATA_83C37A,DATA_83C384,DATA_8392B4,DATA_8392EE,DATA_839328,DATA_839362,DATA_83939C,DATA_8393D6,DATA_839410,DATA_83944A,DATA_839484,DATA_8394B6,DATA_8394E8
	dw DATA_83951A,DATA_83954C,DATA_83957E,DATA_8395B0,DATA_83B97C,DATA_83B98E,DATA_83B9A0,DATA_83B9C2,DATA_83B9D4,DATA_83B9E6,DATA_83BA08,DATA_8395E2,DATA_839614,DATA_8399C2,DATA_83AE10,DATA_83AE1A
	dw DATA_839646,DATA_839678,DATA_8396AA,DATA_8396DC,DATA_83971E,DATA_839750,DATA_83977A,DATA_83979C,DATA_8397C6,DATA_8397F8,DATA_83982A,DATA_83985C,DATA_8398F2,DATA_839914,DATA_839936,DATA_839940
	dw DATA_83B2B4,DATA_83B29A,DATA_83B278,DATA_83B256,DATA_83B234,DATA_83B21A,DATA_83B208,DATA_83B1FE,DATA_83C38E,DATA_83C398,DATA_83C332,DATA_83C332,DATA_83C33C,DATA_83C33C,DATA_83C346,DATA_83C346
	dw DATA_83C350,DATA_83C350,DATA_83C35A,DATA_83C35A,DATA_83C364,DATA_83C364,DATA_83C36E,DATA_83C36E,DATA_83C370,DATA_83C370,DATA_83988E,DATA_8398C0,DATA_83BA2A,DATA_83BA4C,DATA_83ACD8,DATA_83ACE2
	dw DATA_83ACEC,DATA_83ACF6,DATA_83AD00,DATA_83AD0A,DATA_83AD14,DATA_83AD1E,DATA_8388D0,DATA_838982,DATA_838A24,DATA_838AC6,DATA_838B60,DATA_838BF2,DATA_838C7C,DATA_838CFE,DATA_838D78,DATA_838DEA
	dw DATA_838E54,DATA_838EB6,DATA_838F10,DATA_838F62,DATA_838FB4,DATA_838FF6,DATA_839038,DATA_83906A,DATA_83909C,DATA_8390AE,DATA_8387DC,DATA_838866,DATA_8386E6,DATA_838700,DATA_83872A,DATA_83873C
	dw DATA_838766,DATA_838798,DATA_8387BA,DATA_83AC88,DATA_83AC92,DATA_83AC9C,DATA_83ACA6,DATA_83ACB0,DATA_83ACBA,DATA_83ACC4,DATA_83ACCE,DATA_83A32E,DATA_83A360,DATA_83A392,DATA_83A3C4,DATA_83A3F6
	dw DATA_83A428,DATA_83A45A,DATA_83A48C,DATA_83A4BE,DATA_83A298,DATA_83A2FC,DATA_83AE2E,DATA_83AE60,DATA_83AE92,DATA_83AEC4,DATA_83AEF6,DATA_83AF00,DATA_83AF0A,DATA_83AF14,DATA_83AF7C,DATA_83AF6A
	dw DATA_83AF58,DATA_83AF46,DATA_83AF1E,DATA_83AF28,DATA_83AF32,DATA_83AF3C,DATA_83A8C4,DATA_83A8CE,DATA_83A8D8,DATA_83A8F2,DATA_83A90C,DATA_83A5F8,DATA_83A612,DATA_83D528,DATA_83D532,DATA_83D53C
	dw DATA_83D546,DATA_83D550,DATA_83D55A,DATA_83D564,DATA_83D56E,DATA_83D578,DATA_83D582,DATA_83D5EC,DATA_83D63E,DATA_83D698,DATA_83D6F2,DATA_83D76C,DATA_83D7E6,DATA_83D860,DATA_83D8C2,DATA_83D924
	dw DATA_83D9A6,DATA_83DA28

DATA_8386E4:
	dw $8000

DATA_8386E6:
	dw $0000,$FFE5,$FFEF,$00A0,$0000,$FFE5,$FFFF,$00C0
	dw $0001,$FFF5,$FFEE,$00A2,$8000

DATA_838700:
	dw $0000,$FFE9,$FFE9,$00E0,$0000,$FFF9,$FFE9,$00E2
	dw $0000,$FFE6,$FFF9,$00A6,$0000,$FFE6,$0009,$00C6
	dw $0001,$FFF6,$FFF9,$00A8,$8000

DATA_83872A:
	dw $0000,$FFF0,$0010,$00E4,$0001,$FFF0,$FFF0,$00AC
	dw $8000

DATA_83873C:
	dw $0000,$FFF1,$FFE4,$00E6,$0000,$0001,$FFE4,$00E8
	dw $0000,$FFE4,$FFF4,$0100,$0000,$FFE4,$0004,$0120
	dw $0001,$FFF4,$FFF4,$0102,$8000

DATA_838766:
	dw $0000,$FFE8,$FFE7,$00EA,$0000,$FFF8,$FFE3,$00EC
	dw $0000,$0008,$FFE3,$00EE,$0000,$FFE8,$FFF7,$0106
	dw $0000,$FFE8,$0007,$0126,$0001,$FFF8,$FFF3,$0108
	dw $8000

DATA_838798:
	dw $0000,$FFEA,$FFEA,$0140,$0001,$FFFA,$FFDA,$0144
	dw $0001,$FFDC,$FFFA,$0180,$0001,$FFFC,$FFFA,$0184
	dw $8000

DATA_8387BA:
	dw $0001,$FFE0,$FFE0,$0148,$0001,$0000,$FFE0,$014C
	dw $0001,$FFE0,$0000,$0188,$0001,$0000,$0000,$018C
	dw $8000

DATA_8387DC:
	dw $0000,$FFF0,$FFE4,$0582,$0000,$FFE0,$FFEB,$0586
	dw $0001,$FFD9,$FFF1,$0748,$0000,$FFF0,$FFF4,$0584
	dw $0000,$FFF0,$0000,$0988,$0000,$FFE0,$000B,$09A0
	dw $0000,$FFF0,$0010,$098A,$0000,$FFE1,$0011,$0780
	dw $0000,$0000,$FFE4,$4582,$0000,$0010,$FFEB,$4586
	dw $0001,$0007,$FFF1,$4748,$0000,$0000,$FFF4,$4584
	dw $0000,$0000,$0000,$4B88,$0000,$0010,$000B,$4BA0
	dw $0000,$0000,$0010,$4B8A,$0000,$000F,$0011,$4780
	dw $0000,$FFF8,$FFE0,$06E0,$8000

DATA_838866:
	dw $0000,$FFF0,$FFE8,$05A2,$0001,$FFD9,$FFEF,$074C
	dw $0000,$FFF0,$FFF8,$05A4,$0000,$FFF0,$FFFB,$09A6
	dw $0000,$FFE0,$0003,$09AA,$0000,$FFF0,$000B,$09A8
	dw $0000,$0000,$FFE8,$45A2,$0001,$0007,$FFEF,$474C
	dw $0000,$0000,$FFF8,$45A4,$0000,$0000,$FFFB,$4BA6
	dw $0000,$0010,$0003,$4BAA,$0000,$0000,$000B,$4BA8
	dw $0000,$FFF8,$FFE0,$06E0,$8000

DATA_8388D0:
	dw $0001,$FFE0,$0005,$0908,$0001,$0000,$0005,$4B08
	dw $0000,$FFE1,$0009,$06AC,$0000,$FFE0,$0019,$06AE
	dw $0000,$FFE9,$0003,$06AA,$0000,$FFD9,$0003,$06A8
	dw $0000,$FFE9,$FFF3,$06A6,$0000,$FFD9,$FFF2,$06A4
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0000,$000F,$0009,$46AC,$0000,$0010,$0019,$46AE
	dw $0000,$0007,$0003,$46AA,$0000,$0017,$0003,$46A8
	dw $0000,$0007,$FFF3,$46A6,$0000,$0017,$FFF2,$46A4
	dw $0000,$0008,$FFEF,$46A2,$0000,$000F,$FFE8,$46A0
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838982:
	dw $0001,$FFE0,$0004,$0908,$0001,$0000,$0004,$4B08
	dw $0000,$FFE0,$000B,$06CC,$0000,$FFEA,$0004,$06CA
	dw $0000,$FFDA,$0003,$06C8,$0000,$FFE9,$FFF3,$06C6
	dw $0000,$FFD9,$FFF3,$06C4,$0000,$FFE7,$FFEF,$06C2
	dw $0000,$FFE2,$FFE9,$06C0,$0000,$0010,$000B,$46CC
	dw $0000,$0006,$0004,$46CA,$0000,$0016,$0003,$46C8
	dw $0000,$0007,$FFF3,$46C6,$0000,$0017,$FFF3,$46C4
	dw $0000,$0009,$FFEF,$46C2,$0000,$000E,$FFE9,$46C0
	dw $0001,$FFE0,$FFE0,$0504,$0000,$FFF0,$0000,$04EE
	dw $0001,$0000,$FFE0,$4504,$0000,$0000,$0000,$44EE
	dw $8000

DATA_838A24:
	dw $0001,$FFE0,$0005,$0908,$0001,$0000,$0005,$4B08
	dw $0000,$FFE9,$0003,$06AA,$0000,$FFD9,$0003,$06A8
	dw $0000,$FFE9,$FFF3,$06A6,$0000,$FFD9,$FFF2,$06A4
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0000,$000F,$0009,$46AC,$0000,$0010,$0019,$46AE
	dw $0000,$0007,$0003,$46AA,$0000,$0017,$0003,$46A8
	dw $0000,$0007,$FFF3,$46A6,$0000,$0017,$FFF2,$46A4
	dw $0000,$0008,$FFEF,$46A2,$0000,$000F,$FFE8,$46A0
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838AC6:
	dw $0001,$FFE0,$0004,$0908,$0001,$0000,$0004,$4B08
	dw $0000,$FFEA,$0004,$06CA,$0000,$FFDA,$0003,$06C8
	dw $0000,$FFE9,$FFF3,$06C6,$0000,$FFD9,$FFF3,$06C4
	dw $0000,$FFE7,$FFEF,$06C2,$0000,$FFE2,$FFE9,$06C0
	dw $0000,$0010,$000B,$46CC,$0000,$0006,$0004,$46CA
	dw $0000,$0016,$0003,$46C8,$0000,$0007,$FFF3,$46C6
	dw $0000,$0017,$FFF3,$46C4,$0000,$0009,$FFEF,$46C2
	dw $0000,$000E,$FFE9,$46C0,$0001,$FFE0,$FFE0,$0504
	dw $0000,$FFF0,$0000,$04EE,$0001,$0000,$FFE0,$4504
	dw $0000,$0000,$0000,$44EE,$8000

DATA_838B60:
	dw $0001,$FFE0,$0005,$0908,$0001,$0000,$0005,$4B08
	dw $0000,$FFE9,$0003,$06AA,$0000,$FFD9,$0003,$06A8
	dw $0000,$FFE9,$FFF3,$06A6,$0000,$FFD9,$FFF2,$06A4
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0000,$000F,$0009,$46AC,$0000,$0010,$0019,$46AE
	dw $0000,$0007,$0003,$46AA,$0000,$0017,$0003,$46A8
	dw $0000,$0008,$FFEF,$46A2,$0000,$000F,$FFE8,$46A0
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838BF2:
	dw $0001,$FFE0,$0004,$0908,$0001,$0000,$0004,$4B08
	dw $0000,$FFEA,$0004,$06CA,$0000,$FFDA,$0003,$06C8
	dw $0000,$FFE9,$FFF3,$06C6,$0000,$FFD9,$FFF3,$06C4
	dw $0000,$FFE7,$FFEF,$06C2,$0000,$FFE2,$FFE9,$06C0
	dw $0000,$0010,$000B,$46CC,$0000,$0006,$0004,$46CA
	dw $0000,$0016,$0003,$46C8,$0000,$0009,$FFEF,$46C2
	dw $0000,$000E,$FFE9,$46C0,$0001,$FFE0,$FFE0,$0504
	dw $0000,$FFF0,$0000,$04EE,$0001,$0000,$FFE0,$4504
	dw $0000,$0000,$0000,$44EE,$8000

DATA_838C7C:
	dw $0001,$FFE0,$0007,$090C,$0001,$0000,$0007,$4B0C
	dw $0000,$FFE9,$0003,$06AA,$0000,$FFD9,$0003,$06A8
	dw $0000,$FFE9,$FFF3,$06A6,$0000,$FFD9,$FFF2,$06A4
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0000,$000F,$0009,$46AC,$0000,$0010,$0019,$46AE
	dw $0000,$0007,$0003,$46AA,$0000,$0017,$0003,$46A8
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838CFE:
	dw $0001,$FFE0,$0006,$090C,$0001,$0000,$0006,$4B0C
	dw $0000,$FFEA,$0004,$06CA,$0000,$FFDA,$0003,$06C8
	dw $0000,$FFE9,$FFF3,$06C6,$0000,$FFD9,$FFF3,$06C4
	dw $0000,$FFE7,$FFEF,$06C2,$0000,$FFE2,$FFE9,$06C0
	dw $0000,$0010,$000B,$46CC,$0000,$0006,$0004,$46CA
	dw $0000,$0016,$0003,$46C8,$0001,$FFE0,$FFE0,$0504
	dw $0000,$FFF0,$0000,$04EE,$0001,$0000,$FFE0,$4504
	dw $0000,$0000,$0000,$44EE,$8000

DATA_838D78:
	dw $0001,$FFE0,$0007,$090C,$0001,$0000,$0007,$4B0C
	dw $0000,$FFE9,$FFF3,$06A6,$0000,$FFD9,$FFF2,$06A4
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0000,$000F,$0009,$46AC,$0000,$0010,$0019,$46AE
	dw $0000,$0007,$0003,$46AA,$0000,$0017,$0003,$46A8
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838DEA:
	dw $0001,$FFE0,$0006,$090C,$0001,$0000,$0006,$4B0C
	dw $0000,$FFE9,$FFF3,$06C6,$0000,$FFD9,$FFF3,$06C4
	dw $0000,$FFE7,$FFEF,$06C2,$0000,$FFE2,$FFE9,$06C0
	dw $0000,$0010,$000B,$46CC,$0000,$0006,$0004,$46CA
	dw $0000,$0016,$0003,$46C8,$0001,$FFE0,$FFE0,$0504
	dw $0000,$FFF0,$0000,$04EE,$0001,$0000,$FFE0,$4504
	dw $0000,$0000,$0000,$44EE,$8000

DATA_838E54:
	dw $0001,$FFE0,$0006,$0940,$0001,$0000,$0006,$4B40
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0000,$000F,$0009,$46AC,$0000,$0010,$0019,$46AE
	dw $0000,$0007,$0003,$46AA,$0000,$0017,$0003,$46A8
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838EB6:
	dw $0001,$FFE0,$0005,$0940,$0001,$0000,$0005,$4B40
	dw $0000,$FFE7,$FFEF,$06C2,$0000,$FFE2,$FFE9,$06C0
	dw $0000,$0010,$000B,$46CC,$0000,$0006,$0004,$46CA
	dw $0000,$0016,$0003,$46C8,$0001,$FFE0,$FFE0,$0504
	dw $0000,$FFF0,$0000,$04EE,$0001,$0000,$FFE0,$4504
	dw $0000,$0000,$0000,$44EE,$8000

DATA_838F10:
	dw $0001,$FFE0,$0006,$0940,$0001,$0000,$0006,$4B40
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0000,$0007,$0003,$46AA,$0000,$0017,$0003,$46A8
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838F62:
	dw $0001,$FFE0,$0005,$0940,$0001,$0000,$0005,$4B40
	dw $0000,$FFE7,$FFEF,$06C2,$0000,$FFE2,$FFE9,$06C0
	dw $0000,$0006,$0004,$46CA,$0000,$0016,$0003,$46C8
	dw $0001,$FFE0,$FFE0,$0504,$0000,$FFF0,$0000,$04EE
	dw $0001,$0000,$FFE0,$4504,$0000,$0000,$0000,$44EE
	dw $8000

DATA_838FB4:
	dw $0001,$FFE0,$0004,$0944,$0001,$0000,$0004,$4B44
	dw $0000,$FFE8,$FFEF,$06A2,$0000,$FFE1,$FFE8,$06A0
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_838FF6:
	dw $0001,$FFE0,$0003,$0944,$0001,$0000,$0003,$4B44
	dw $0000,$FFE7,$FFEF,$06C2,$0000,$FFE2,$FFE9,$06C0
	dw $0001,$FFE0,$FFE0,$0504,$0000,$FFF0,$0000,$04EE
	dw $0001,$0000,$FFE0,$4504,$0000,$0000,$0000,$44EE
	dw $8000

DATA_839038:
	dw $0001,$FFE0,$0004,$0944,$0001,$0000,$0004,$4B44
	dw $0001,$FFE0,$FFE0,$0500,$0000,$FFF0,$0000,$04EC
	dw $0001,$0000,$FFE0,$4500,$0000,$0000,$0000,$44EC
	dw $8000

DATA_83906A:
	dw $0001,$FFE0,$0003,$0944,$0001,$0000,$0003,$4B44
	dw $0001,$FFE0,$FFE0,$0504,$0000,$FFF0,$0000,$04EE
	dw $0001,$0000,$FFE0,$4504,$0000,$0000,$0000,$44EE
	dw $8000

DATA_83909C:
	dw $0000,$0009,$FFF5,$86C2,$0000,$0004,$FFFB,$86C0
	dw $8000

DATA_8390AE:
	dw $0000,$000F,$FFF8,$86A6,$0000,$FFFF,$FFF9,$86A4
	dw $8000

DATA_8390C0:
	dw $0000,$FFEF,$0008,$002A,$0000,$FFF1,$0013,$400C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFE,$0008,$0044
	dw $8000

DATA_8390F2:
	dw $0000,$FFEC,$0008,$002A,$0000,$FFF1,$0013,$400C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0000,$0008,$0044
	dw $8000

DATA_839124:
	dw $0000,$FFFF,$0008,$402A,$0000,$FFF1,$0013,$400C
	dw $0001,$FFEE,$FFF4,$4004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFEB,$0008,$4044
	dw $8000

DATA_839156:
	dw $0000,$FFFD,$0008,$402A,$0000,$FFF1,$0013,$400C
	dw $0001,$FFEF,$FFF4,$4004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFEE,$0008,$4044
	dw $8000

DATA_839188:
	dw $0000,$FFEA,$0004,$8042,$0000,$FFF1,$0013,$400C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0002,$0003,$C042
	dw $8000

DATA_8391BA:
	dw $0000,$FFFA,$0002,$0008,$0000,$000A,$0002,$000A
	dw $0000,$FFF1,$0013,$400C,$0001,$FFED,$FFF4,$0004
	dw $0001,$FFEC,$0000,$0000,$0000,$FFFD,$0013,$000C
	dw $8000

DATA_8391EC:
	dw $0000,$FFFF,$0002,$0028,$0000,$FFF5,$0002,$0008
	dw $0000,$FFF1,$0013,$400C,$0001,$FFED,$FFF4,$0004
	dw $0001,$FFEC,$0000,$0000,$0000,$FFFD,$0013,$000C
	dw $8000

DATA_83921E:
	dw $0000,$FFEE,$0002,$002A,$0000,$FFFE,$0002,$402A
	dw $0000,$FFF1,$0013,$400C,$0001,$FFED,$FFF4,$0004
	dw $0001,$FFEC,$0000,$0000,$0000,$FFFD,$0013,$000C
	dw $8000

DATA_839250:
	dw $0000,$FFEC,$0002,$4028,$0000,$FFF6,$0002,$4008
	dw $0000,$FFF1,$0013,$400C,$0001,$FFEE,$FFF4,$4004
	dw $0001,$FFEC,$0000,$0000,$0000,$FFFD,$0013,$000C
	dw $8000

DATA_839282:
	dw $0000,$FFE2,$0002,$400A,$0000,$FFF2,$0002,$4008
	dw $0000,$FFF1,$0013,$400C,$0001,$FFEF,$FFF4,$4004
	dw $0001,$FFEC,$0000,$0000,$0000,$FFFD,$0013,$000C
	dw $8000

DATA_8392B4:
	dw $0000,$FFEC,$0014,$0CCE,$0000,$FFF7,$0015,$0008
	dw $0000,$FFF5,$0013,$000C,$0001,$FFF2,$FFFE,$0004
	dw $0001,$FFEC,$0008,$0000,$0000,$FFFD,$0013,$000C
	dw $0000,$FFFB,$0001,$C040,$8000

DATA_8392EE:
	dw $0000,$FFE3,$0010,$0CEE,$0000,$FFF0,$0012,$002A
	dw $0000,$FFF5,$0013,$000C,$0001,$FFF2,$FFFE,$0004
	dw $0001,$FFEC,$0008,$0000,$0000,$FFFD,$0013,$000C
	dw $0000,$0002,$0004,$C046,$8000

DATA_839328:
	dw $0000,$FFD9,$000D,$0CEE,$0000,$FFEC,$000C,$000A
	dw $0000,$FFF5,$0013,$000C,$0001,$FFF2,$FFFE,$0004
	dw $0001,$FFEC,$0008,$0000,$0000,$FFFD,$0013,$000C
	dw $0000,$0006,$000A,$C042,$8000

DATA_839362:
	dw $0000,$FFCF,$000C,$0CEE,$0000,$FFEF,$0004,$C028
	dw $0000,$FFF5,$0013,$000C,$0001,$FFF2,$FFFE,$0004
	dw $0001,$FFEC,$0008,$0000,$0000,$FFFD,$0013,$000C
	dw $0000,$0003,$0012,$0044,$8000

DATA_83939C:
	dw $0000,$FFF6,$0000,$C008,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF2,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFC,$0016,$0040
	dw $0000,$FFF2,$0014,$0CCE,$8000

DATA_8393D6:
	dw $0000,$FFFD,$0003,$C02A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF2,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFF5,$0013,$0046
	dw $0000,$FFE9,$0010,$0CEE,$8000

DATA_839410:
	dw $0000,$0001,$0009,$C00A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF2,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFF1,$000D,$0042
	dw $0000,$FFDF,$000D,$0CEE,$8000

DATA_83944A:
	dw $0000,$FFFE,$0011,$0028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF2,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFF4,$0005,$C044
	dw $0000,$FFD5,$000C,$0CEE,$8000

DATA_839484:
	dw $0000,$FFF0,$0006,$000A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF3,$FFF7,$0004,$0001,$FFED,$0001,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0002,$000C,$0044
	dw $8000

DATA_8394B6:
	dw $0000,$FFEA,$0004,$8042,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0002,$0003,$C042
	dw $8000

DATA_8394E8:
	dw $0000,$FFFA,$000D,$0028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF4,$FFFC,$0004,$0001,$FFEF,$0003,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0004,$0010,$0044
	dw $8000

DATA_83951A:
	dw $0000,$FFF8,$000B,$0028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF2,$FFF9,$0004,$0001,$FFED,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0002,$000E,$0044
	dw $8000

DATA_83954C:
	dw $0000,$FFEF,$0000,$C008,$0000,$FFF2,$0013,$000C
	dw $0001,$FFEC,$FFF3,$0004,$0001,$FFEB,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFF,$0001,$C046
	dw $8000

DATA_83957E:
	dw $0000,$FFE9,$0006,$000A,$0000,$FFF2,$0013,$000C
	dw $0001,$FFEA,$FFF3,$0004,$0001,$FFE9,$0000,$0000
	dw $0000,$FFFA,$0013,$000C,$0000,$FFFD,$0003,$C042
	dw $8000

DATA_8395B0:
	dw $0000,$FFEC,$0008,$002A,$0000,$FFF2,$0013,$000C
	dw $0001,$FFEA,$FFF3,$0004,$0001,$FFE9,$0000,$0000
	dw $0000,$FFFA,$0013,$000C,$0000,$FFFB,$0007,$0044
	dw $8000

DATA_8395E2:
	dw $0000,$FFEB,$000A,$002A,$0000,$FFF6,$0011,$002C
	dw $0001,$FFEC,$FFF6,$0004,$0001,$FFEA,$0002,$0000
	dw $0000,$FFFC,$0011,$002C,$0000,$FFFB,$0009,$0044
	dw $8000

DATA_839614:
	dw $0000,$FFEA,$0008,$8046,$0000,$FFF2,$0013,$000C
	dw $0001,$FFEB,$FFFC,$0004,$0001,$FFE8,$0008,$0000
	dw $0000,$FFFC,$0011,$C00E,$0000,$FFFF,$0008,$C046
	dw $8000

DATA_839646:
	dw $0000,$FFF1,$0007,$002A,$0000,$FFF4,$0012,$000C
	dw $0001,$FFF0,$FFF5,$0004,$0001,$FFEE,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0002,$0003,$C042
	dw $8000

DATA_839678:
	dw $0000,$FFF4,$0005,$000A,$0000,$FFF2,$0010,$002E
	dw $0001,$FFF4,$FFF5,$0004,$0001,$FFF0,$0001,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$000A,$FFFF,$C046
	dw $8000

DATA_8396AA:
	dw $0000,$FFF7,$FFFF,$C028,$0000,$FFF3,$000F,$000E
	dw $0001,$FFF6,$FFF4,$0004,$0001,$FFF1,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$000C,$FFFF,$C046
	dw $8000

DATA_8396DC:
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0000,$0004,$FFFD,$C02A,$0000,$FFF8,$000D,$000E
	dw $0001,$FFFD,$FFF7,$0004,$0001,$FFF6,$FFFE,$0000
	dw $0000,$FFFF,$000F,$002E,$0000,$0012,$0004,$C042
	dw $8000

DATA_83971E:
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0000,$0013,$0008,$402A,$0000,$0002,$0002,$C02C
	dw $0001,$0005,$FFFE,$C000,$0000,$0004,$0009,$000E
	dw $8000

DATA_839750:
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0000,$000F,$0001,$C00C,$0001,$000D,$0001,$C000
	dw $0000,$0015,$0002,$C00C,$8000

DATA_83977A:
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0000,$000F,$0007,$C00C,$0000,$0015,$0008,$C00C
	dw $8000

DATA_83979C:
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0000,$0015,$000B,$4028,$0001,$000B,$FFF9,$4004
	dw $0001,$0010,$0000,$4000,$8000

DATA_8397C6:
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0000,$001D,$0000,$8008,$0001,$0010,$FFF3,$4004
	dw $0001,$0011,$0000,$4000,$0000,$000D,$0001,$8046
	dw $8000

DATA_8397F8:
	dw $0000,$0021,$0006,$400A,$0000,$000C,$0010,$0DCE
	dw $0000,$001C,$0010,$4DCE,$0001,$0010,$FFF3,$4004
	dw $0001,$0011,$0000,$4000,$0000,$000D,$0003,$8042
	dw $8000

DATA_83982A:
	dw $0000,$001D,$0000,$C02A,$0001,$000E,$FFF4,$4004
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0001,$0011,$0000,$4000,$0000,$000A,$0000,$8046
	dw $8000

DATA_83985C:
	dw $0000,$001D,$0007,$402A,$0001,$000E,$FFF4,$4004
	dw $0000,$000C,$0010,$0DCE,$0000,$001C,$0010,$4DCE
	dw $0001,$0011,$0000,$4000,$0000,$000D,$0007,$4044
	dw $8000

DATA_83988E:
	dw $0000,$FFF0,$0004,$8042,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF5,$FFFC,$0004,$0001,$FFEE,$0001,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0000,$000B,$0044
	dw $8000

DATA_8398C0:
	dw $0000,$FFF8,$0008,$0028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF4,$FFFA,$0004,$0001,$FFED,$0001,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFC,$000A,$0044
	dw $8000

DATA_8398F2:
	dw $0000,$FFF0,$FFF0,$01CC,$0000,$0000,$FFF0,$41CC
	dw $0000,$FFF0,$0000,$01CE,$0000,$0000,$0000,$41CE
	dw $8000

DATA_839914:
	dw $0000,$FFF0,$FFF0,$01C8,$0000,$0000,$FFF0,$41C8
	dw $0000,$FFF0,$0000,$01CE,$0000,$0000,$0000,$41CE
	dw $8000

DATA_839936:
	dw $0000,$FFF8,$FFF8,$01C0,$8000

DATA_839940:
	dw $0000,$FFE0,$FFE0,$01C2,$0000,$FFF0,$FFE0,$01C4
	dw $0000,$0000,$FFE0,$41C4,$0000,$0010,$FFE0,$41C2
	dw $0000,$FFE0,$FFF0,$81C4,$0000,$FFF0,$FFF0,$01C6
	dw $0000,$0000,$FFF0,$41C6,$0000,$0010,$FFF0,$C1C4
	dw $0000,$FFE0,$0000,$01C4,$0000,$FFF0,$0000,$81C6
	dw $0000,$0000,$0000,$C1C6,$0000,$0010,$0000,$41C4
	dw $0000,$FFE0,$0010,$81C2,$0000,$FFF0,$0010,$81C4
	dw $0000,$0000,$0010,$C1C4,$0000,$0010,$0010,$C1C2
	dw $8000

DATA_8399C2:
	dw $0000,$FFF0,$FFD0,$00E0,$0000,$0000,$FFD0,$00E2
	dw $0000,$0010,$FFD0,$00E4,$0001,$FFE0,$FFE0,$00A0
	dw $0001,$0000,$FFE0,$00A4,$0001,$FFE0,$0000,$00A8
	dw $0001,$0000,$0000,$00AC,$8000

DATA_8399FC:
	dw $0000,$FFF1,$0000,$C008,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFD,$0009,$0040
	dw $8000

DATA_839A2E:
	dw $0000,$FFF5,$0000,$C02A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFB,$0008,$0046
	dw $8000

DATA_839A60:
	dw $0000,$FFF7,$0002,$C00A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFF9,$0007,$0042
	dw $8000

DATA_839A92:
	dw $0000,$FFF7,$0007,$0028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFF9,$FFFF,$C044
	dw $8000

DATA_839AC4:
	dw $0000,$FFF3,$0009,$0008,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFC,$FFFE,$C040
	dw $8000

DATA_839AF6:
	dw $0000,$FFF1,$0008,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0001,$0002,$C046

DATA_839B26:
	dw $0000,$FFEF,$0006,$000A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0001,$0002,$C042
	dw $8000

DATA_839B58:
	dw $0000,$FFEF,$0002,$C028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0001,$0007,$0044
	dw $8000

DATA_839B8A:
	dw $0000,$FFED,$0000,$0000,$0000,$FFED,$0000,$0000
	dw $0001,$FFED,$0002,$0000,$8000

DATA_839BA4:
	dw $0000,$FFED,$0000,$0004,$0000,$FFED,$0000,$0004
	dw $0001,$FFED,$0000,$0004,$8000

DATA_839BBE:
	dw $0000,$FFFD,$0010,$C000,$0000,$FFFD,$0010,$C000
	dw $0001,$FFED,$0000,$C000,$8000

DATA_839BD8:
	dw $0000,$FFFD,$0010,$C004,$0000,$FFFD,$0010,$C004
	dw $0001,$FFED,$0000,$C004,$8000

DATA_839BF2:
	dw $0000,$FFE9,$0004,$000A,$0000,$FFF1,$0011,$002E
	dw $0001,$FFEB,$FFF3,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$0003,$000B,$C02E,$0000,$FFFB,$0005,$C042
	dw $8000

DATA_839C24:
	dw $0000,$FFE9,$0005,$000A,$0000,$FFEE,$0010,$000E
	dw $0001,$FFEB,$FFF4,$0004,$0001,$FFEC,$0002,$0000
	dw $0000,$0000,$000B,$C00E,$0000,$FFFB,$0006,$C042
	dw $8000

DATA_839C56:
	dw $0000,$FFEB,$0007,$002A,$0000,$FFF0,$000D,$C02C
	dw $0001,$FFEC,$FFF3,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$FFFE,$000F,$002C,$0000,$FFF9,$0008,$0044
	dw $8000

DATA_839C88:
	dw $0000,$FFEC,$0006,$002A,$0000,$FFF1,$000A,$C00C
	dw $0001,$FFED,$FFF2,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFA,$0011,$0044
	dw $8000

DATA_839CBA:
	dw $0000,$FFF0,$0009,$0008,$0000,$FFF5,$000B,$C02E
	dw $0001,$FFED,$FFF3,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$FFF9,$0011,$002E,$0000,$FFF8,$0009,$0040
	dw $8000

DATA_839CEC:
	dw $0000,$FFF1,$000A,$0008,$0000,$FFF8,$000B,$C00E
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0002,$0000
	dw $0000,$FFF6,$0010,$000E,$0000,$FFF9,$000A,$0040
	dw $8000

DATA_839D1E:
	dw $0000,$FFF5,$0008,$0028,$0000,$FFF6,$000F,$002C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$FFF8,$000D,$C02C,$0000,$FFF7,$0007,$0046
	dw $8000

DATA_839D50:
	dw $0000,$FFF6,$0007,$0028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFEE,$FFF3,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFF9,$000A,$C00C,$0000,$FFF8,$0006,$0046
	dw $8000

DATA_839D82:
	dw $0000,$FFF9,$0005,$C00A,$0000,$FFF1,$0011,$002E
	dw $0001,$FFEF,$FFF3,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$0003,$000B,$C02E,$0000,$FFF7,$0004,$0042
	dw $8000

DATA_839DB4:
	dw $0000,$FFF8,$0006,$C00A,$0000,$FFEE,$0010,$000E
	dw $0001,$FFEF,$FFF4,$0004,$0001,$FFEC,$0002,$0000
	dw $0000,$0000,$000B,$C00E,$0000,$FFF6,$0005,$0042
	dw $8000

DATA_839DE6:
	dw $0000,$FFF5,$0008,$0028,$0000,$FFF0,$000D,$C02C
	dw $0001,$FFEE,$FFF3,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$FFFE,$000F,$002C,$0000,$FFF7,$0007,$0046
	dw $8000

DATA_839E18:
	dw $0000,$FFF4,$0007,$0028,$0000,$FFF1,$000A,$C00C
	dw $0001,$FFED,$FFF2,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFF6,$0006,$0046
	dw $8000

DATA_839E4A:
	dw $0000,$FFF0,$0009,$0008,$0000,$FFF5,$000B,$C02E
	dw $0001,$FFED,$FFF3,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$FFF9,$0011,$002E,$0000,$FFF8,$0009,$0040
	dw $8000

DATA_839E7C:
	dw $0000,$FFEF,$000A,$0008,$0000,$FFF8,$000B,$C00E
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0002,$0000
	dw $0000,$FFF6,$0010,$000E,$0000,$FFF7,$000A,$0040
	dw $8000

DATA_839EAE:
	dw $0000,$FFEB,$0007,$002A,$0000,$FFF6,$000F,$002C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0001,$0000
	dw $0000,$FFF8,$000D,$C02C,$0000,$FFF9,$0008,$0044
	dw $8000

DATA_839EE0:
	dw $0000,$FFEB,$0006,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFEC,$FFF3,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFF9,$000A,$C00C,$0000,$FFF9,$0007,$0044
	dw $8000

DATA_839F12:
	dw $0000,$FFF3,$0011,$0008,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$0000,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFD,$0011,$0040
	dw $8000

DATA_839F44:
	dw $0000,$FFF7,$000F,$0028,$0000,$FFF1,$0013,$002E
	dw $0001,$FFED,$0000,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$0001,$000B,$C02E,$0000,$FFFB,$0010,$0046
	dw $8000

DATA_839F76:
	dw $0000,$FFF7,$000F,$0028,$0000,$FFEF,$0011,$000E
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFF,$0009,$C00E,$0000,$FFFB,$0010,$0046
	dw $8000

DATA_839FA8:
	dw $0000,$FFF7,$000A,$C00A,$0000,$FFF0,$0008,$C02C
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$0000,$0010,$002C,$0000,$FFF9,$000E,$0042
	dw $8000

DATA_839FDA:
	dw $0000,$FFF7,$000A,$C00A,$0000,$FFF1,$0007,$C00C
	dw $0001,$FFED,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFF9,$000E,$0042
	dw $8000

DATA_83A00C:
	dw $0000,$FFF7,$000F,$0028,$0000,$FFF5,$000B,$C02E
	dw $0001,$FFED,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF9,$0013,$002E,$0000,$FFFB,$0010,$0046
	dw $8000

DATA_83A03E:
	dw $0000,$FFF7,$000F,$0028,$0000,$FFF7,$000D,$C00E
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF7,$0011,$000E,$0000,$FFFB,$0010,$0046
	dw $8000

DATA_83A070:
	dw $0000,$FFF3,$0011,$0008,$0000,$FFF8,$0010,$002C
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF8,$0010,$C02C,$0000,$FFFD,$0011,$0040
	dw $8000

DATA_83A0A2:
	dw $0000,$FFF3,$0011,$0008,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$0000,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF5,$0013,$C00C,$0000,$FFFD,$0011,$0040
	dw $8000

DATA_83A0D4:
	dw $0000,$FFF1,$0010,$002A,$0000,$FFF1,$0013,$002E
	dw $0001,$FFED,$0000,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$0001,$000B,$C02E,$0000,$0001,$000F,$0044
	dw $8000

DATA_83A106:
	dw $0000,$FFF1,$0010,$002A,$0000,$FFEF,$0011,$000E
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFF,$0009,$C00E,$0000,$0001,$000F,$0044
	dw $8000

DATA_83A138:
	dw $0000,$FFEF,$000E,$000A,$0000,$FFF0,$0008,$C02C
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$0000,$0010,$002C,$0000,$0001,$000A,$C042
	dw $8000

DATA_83A16A:
	dw $0000,$FFEF,$000E,$000A,$0000,$FFF1,$0007,$C00C
	dw $0001,$FFED,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0001,$000A,$C042
	dw $8000

DATA_83A19C:
	dw $0000,$FFF1,$0010,$002A,$0000,$FFF5,$000B,$C02E
	dw $0001,$FFED,$FFFE,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF9,$0013,$002E,$0000,$0001,$000F,$0044
	dw $8000

DATA_83A1CE:
	dw $0000,$FFF1,$0010,$002A,$0000,$FFF7,$000D,$C00E
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF7,$0011,$000E,$0000,$0001,$000F,$0044
	dw $8000

DATA_83A200:
	dw $0000,$FFF3,$0011,$0008,$0000,$FFF8,$0010,$002C
	dw $0001,$FFED,$FFFF,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF8,$0010,$C02C,$0000,$FFFD,$0011,$0040
	dw $8000

DATA_83A232:
	dw $0000,$FFF3,$0011,$0008,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$0000,$0004,$0001,$FFEC,$0008,$0000
	dw $0000,$FFF5,$0013,$C00C,$0000,$FFFD,$0011,$0040
	dw $8000

DATA_83A264:
	dw $0000,$FFEF,$0000,$C028,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$0001,$0002,$C046
	dw $8000

DATA_83A296:
	dw $8000

DATA_83A298:
	dw $0000,$FFEE,$FFFC,$C028,$0000,$FFF1,$0014,$002E
	dw $0001,$FFED,$FFED,$0004,$0001,$FFED,$FFFD,$0000
	dw $0000,$FFFE,$0011,$002C,$0000,$FFFF,$FFFB,$C046
	dw $8000

DATA_83A2CA:
	dw $0000,$FFEF,$0006,$000A,$0000,$FFEF,$0011,$000E
	dw $0001,$FFED,$FFF3,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$0000,$0010,$002C,$0000,$0001,$0002,$C042
	dw $8000

DATA_83A2FC:
	dw $0000,$FFEE,$0006,$000A,$0000,$FFED,$000E,$000E
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFED,$FFFF,$0000
	dw $0000,$0002,$000D,$002C,$0000,$0002,$0003,$C042
	dw $8000

DATA_83A32E:
	dw $0000,$FFEF,$0009,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFE,$0008,$0044
	dw $8000

DATA_83A360:
	dw $0000,$FFEF,$0008,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF4,$0004,$0001,$FFEC,$FFFF,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFE,$0007,$0044
	dw $8000

DATA_83A392:
	dw $0000,$FFEF,$0007,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFED,$FFF3,$0004,$0001,$FFEC,$FFFE,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFE,$0006,$0044
	dw $8000

DATA_83A3C4:
	dw $0000,$FFEF,$000A,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFF1,$FFF4,$0004,$0001,$FFED,$0001,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFF,$0009,$0044
	dw $8000

DATA_83A3F6:
	dw $0000,$FFF0,$0009,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFEF,$FFF4,$0004,$0001,$FFED,$0000,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFF,$0008,$0044
	dw $8000

DATA_83A428:
	dw $0000,$FFF1,$0008,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFEF,$FFF3,$0004,$0001,$FFED,$FFFF,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFE,$0007,$0044
	dw $8000

DATA_83A45A:
	dw $0000,$FFEF,$000A,$002A,$0000,$FFF4,$0013,$000C
	dw $0001,$FFF2,$FFF5,$0004,$0001,$FFF1,$0003,$0000
	dw $0000,$FFFE,$0013,$000C,$0000,$FFFF,$0009,$0044
	dw $8000

DATA_83A48C:
	dw $0000,$FFEF,$0009,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFEF,$FFF5,$0004,$0001,$FFED,$0001,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFE,$0008,$0044
	dw $8000

DATA_83A4BE:
	dw $0000,$FFEF,$0008,$002A,$0000,$FFF5,$0013,$000C
	dw $0001,$FFEE,$FFF6,$0004,$0001,$FFEC,$FFFF,$0000
	dw $0000,$FFFD,$0013,$000C,$0000,$FFFD,$0007,$0044
	dw $8000

DATA_83A4F0:
	dw $0000,$FFF7,$0002,$C00A,$8000

DATA_83A4FA:
	dw $0000,$FFF5,$0000,$C02A,$8000

DATA_83A504:
	dw $0000,$FFF1,$FFFE,$C008,$8000

DATA_83A50E:
	dw $0000,$FFEF,$0000,$C028,$8000

DATA_83A518:
	dw $0000,$FFED,$0004,$000A,$8000

DATA_83A522:
	dw $0000,$FFEF,$0007,$002A,$8000

DATA_83A52C:
	dw $0000,$FFF3,$0008,$0008,$8000

DATA_83A536:
	dw $0000,$FFF5,$0006,$0028,$8000

DATA_83A540:
	dw $0000,$FFF7,$000D,$C00E,$8000

DATA_83A54A:
	dw $0000,$FFF5,$000B,$C02E,$8000

DATA_83A554:
	dw $0000,$FFF1,$0007,$C00C,$8000

DATA_83A55E:
	dw $0000,$FFF0,$0008,$C02C,$8000

DATA_83A568:
	dw $0000,$FFEF,$0011,$000E,$8000

DATA_83A572:
	dw $0000,$FFF1,$0013,$002E,$8000

DATA_83A57C:
	dw $0000,$FFF5,$0013,$000C,$8000

DATA_83A586:
	dw $0000,$FFF8,$0010,$002C,$8000

DATA_83A590:
	dw $0000,$FFF0,$FFF2,$0144,$0000,$0000,$FFF2,$4144
	dw $0000,$FFF0,$0002,$0164,$0000,$0000,$0002,$4164
	dw $8000

DATA_83A5B2:
	dw $0001,$FFF0,$FFF2,$0140,$8000

DATA_83A5BC:
	dw $0001,$FFF0,$FFF2,$4140,$8000

DATA_83A5C6:
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A5D0:
	dw $0001,$FFF0,$FFF2,$0104,$8000

DATA_83A5DA:
	dw $0001,$FFF0,$FFF2,$0108,$8000

DATA_83A5E4:
	dw $0001,$FFF0,$FFF2,$0108,$8000

DATA_83A5EE:
	dw $0001,$FFF0,$FFF2,$010C,$8000

DATA_83A5F8:
	dw $0001,$FFF0,$FFF2,$0108,$0000,$FFE8,$0012,$014A
	dw $0000,$FFF8,$0012,$016A,$8000

DATA_83A612:
	dw $0001,$FFF0,$FFF2,$010C,$0000,$FFF8,$FFE2,$00CE
	dw $8000

DATA_83A624:
	dw $0000,$FFF2,$FFF4,$0146,$0000,$0006,$FFF4,$4146
	dw $0000,$FFF0,$0008,$8146,$0000,$0008,$0008,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A64E:
	dw $0000,$FFF1,$FFE4,$0146,$0000,$0007,$FFE4,$4146
	dw $0000,$FFEF,$0000,$8146,$0000,$0009,$0000,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A678:
	dw $0000,$FFF0,$FFDC,$0146,$0000,$0008,$FFDC,$4146
	dw $0000,$FFEE,$FFF8,$8146,$0000,$000A,$FFF8,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A6A2:
	dw $0000,$FFEF,$FFD4,$0146,$0000,$0009,$FFD4,$4146
	dw $0000,$FFED,$FFF2,$8146,$0000,$000B,$FFF2,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A6CC:
	dw $0000,$FFEE,$FFCE,$0146,$0000,$000A,$FFCE,$4146
	dw $0000,$FFEC,$FFEE,$8146,$0000,$000C,$FFEE,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A6F6:
	dw $0000,$FFED,$FFCA,$0146,$0000,$000B,$FFCA,$4146
	dw $0000,$FFEB,$FFEC,$8146,$0000,$000D,$FFEC,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A720:
	dw $0000,$FFEC,$FFC8,$0146,$0000,$000C,$FFC8,$4146
	dw $0000,$FFEA,$FFEB,$8146,$0000,$000E,$FFEB,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A74A:
	dw $0000,$FFEB,$FFC6,$0146,$0000,$000D,$FFC6,$4146
	dw $0000,$FFE9,$FFEC,$8146,$0000,$000F,$FFEC,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A774:
	dw $0000,$FFEA,$FFC8,$0146,$0000,$000E,$FFC8,$4146
	dw $0000,$FFE8,$FFEE,$8146,$0000,$0010,$FFEE,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A79E:
	dw $0000,$FFE9,$FFCA,$0146,$0000,$000F,$FFCA,$4146
	dw $0000,$FFE7,$FFF2,$8146,$0000,$0011,$FFF2,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A7C8:
	dw $0000,$FFE8,$FFCE,$0146,$0000,$0010,$FFCE,$4146
	dw $0000,$FFE6,$FFF8,$8146,$0000,$0012,$FFF8,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A7F2:
	dw $0000,$FFE7,$FFD4,$0146,$0000,$0011,$FFD4,$4146
	dw $0000,$FFE5,$0000,$8146,$0000,$0013,$0000,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A81C:
	dw $0000,$FFE6,$FFDC,$0146,$0000,$0012,$FFDC,$4146
	dw $0000,$FFE4,$0008,$8146,$0000,$0014,$0008,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A846:
	dw $0000,$FFE5,$FFE4,$0146,$0000,$0013,$FFE4,$4146
	dw $0000,$FFE3,$0010,$8146,$0000,$0015,$0010,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A870:
	dw $0000,$FFE4,$FFF4,$0146,$0000,$0014,$FFF4,$4146
	dw $0000,$FFE2,$0018,$8146,$0000,$0016,$0018,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A89A:
	dw $0000,$FFE3,$0004,$0146,$0000,$0015,$0004,$4146
	dw $0000,$FFE1,$0020,$8146,$0000,$0017,$0020,$C146
	dw $0001,$FFF0,$FFF2,$0100,$8000

DATA_83A8C4:
	dw $0001,$FFF0,$FFF2,$0140,$8000

DATA_83A8CE:
	dw $0001,$FFF0,$FFF2,$0144,$8000

DATA_83A8D8:
	dw $0001,$FFF0,$FFE8,$0184,$0000,$FFF0,$0008,$00A8
	dw $0000,$0000,$0008,$00AA,$8000

DATA_83A8F2:
	dw $0001,$FFF0,$FFE8,$0188,$0000,$FFF0,$0008,$00AC
	dw $0000,$0000,$0008,$00AE,$8000

DATA_83A90C:
	dw $0001,$FFF0,$FFE8,$018C,$0000,$FFF0,$0008,$00C8
	dw $0000,$0000,$0008,$00CA,$8000

DATA_83A926:
	dw $0001,$FFF0,$FFF0,$410C,$8000

DATA_83A930:
	dw $0000,$FFF8,$FFF0,$00E0,$0000,$FFF8,$FFE0,$00E0
	dw $0000,$FFF8,$FFD0,$00E2,$0000,$FFF8,$FFC0,$00E2
	dw $0000,$FFF8,$FFB0,$00E4,$0000,$FFF8,$FFA0,$00E4
	dw $0000,$FFF8,$FF90,$00E6,$0000,$FFF8,$FF80,$00E6
	dw $0000,$FFF8,$FF70,$00E6,$0000,$FFF8,$FF60,$00E6
	dw $0000,$FFF8,$FF50,$00E6,$0000,$FFF8,$FF40,$00E6
	dw $8000

DATA_83A992:
	dw $0001,$FFF0,$FFF0,$018C,$8000

DATA_83A99C:
	dw $0001,$FFF0,$FFF0,$0000,$8000

DATA_83A9A6:
	dw $0001,$FFF0,$FFF0,$0100,$0001,$0010,$FFF0,$0104
	dw $0001,$0004,$0010,$0108,$8000

DATA_83A9C0:
	dw $0001,$FFF0,$FFF0,$0140,$0001,$0010,$FFF0,$0144
	dw $0000,$0000,$0010,$0148,$0000,$0010,$0010,$014A
	dw $8000

DATA_83A9E2:
	dw $0000,$FFE0,$003C,$00EC,$0000,$FFE0,$002C,$00EA
	dw $0000,$FFE0,$001C,$00AE,$0000,$FFE0,$000C,$00EA
	dw $0000,$FFE0,$FFFC,$00AE,$0000,$FFE0,$FFEC,$00EA
	dw $0000,$FFE0,$FFDC,$00AE,$0000,$FFE0,$FFCC,$00EA
	dw $0000,$FFE0,$FFBC,$00AE,$0000,$FFE0,$FFAC,$00EA
	dw $8000

DATA_83AA34:
	dw $0001,$FFD4,$FFEC,$00A4,$0001,$FFF4,$FFEC,$00A8
	dw $0001,$FFE4,$000C,$00C0,$0000,$FFD7,$FFDC,$00A0
	dw $0000,$FFE7,$FFDC,$00A2,$0000,$FFF4,$FFDC,$0100
	dw $0000,$0004,$FFDC,$0102,$0000,$0014,$FFDC,$0104
	dw $0000,$0014,$FFEC,$00AC,$0000,$0014,$FFFC,$00CC
	dw $0000,$0014,$000C,$00E6,$0000,$0014,$001C,$00E8
	dw $0000,$0004,$000C,$00E4,$8000

DATA_83AA9E:
	dw $0001,$FFF0,$FFE0,$0100,$0001,$0010,$FFF0,$010C
	dw $0000,$0010,$FFE0,$0104,$0000,$FFE0,$0000,$0106
	dw $0000,$FFF0,$0000,$0108,$0000,$0000,$0000,$010A
	dw $0000,$FFE8,$0010,$0124,$0000,$FFF8,$0010,$0126
	dw $0000,$0008,$0010,$0128,$0000,$0018,$0010,$012A
	dw $8000

DATA_83AAF0:
	dw $0001,$FFEB,$0000,$0146,$0001,$000B,$0000,$014A
	dw $0000,$FFF0,$FFE0,$0100,$0000,$0000,$FFE0,$0102
	dw $0000,$0010,$FFE0,$0104,$0000,$FFF0,$FFF0,$0140
	dw $0000,$0000,$FFF0,$0142,$0000,$0010,$FFF0,$0144
	dw $0000,$FFDB,$000C,$014E,$0000,$002B,$000C,$016E
	dw $8000

DATA_83AB42:
	dw $0001,$FFF0,$FFD0,$0160,$0001,$FFF0,$FFF0,$0186
	dw $0000,$0010,$FFD0,$0164,$0000,$0010,$FFE0,$0184
	dw $0000,$0010,$FFF0,$018A,$0000,$0020,$FFF0,$018C
	dw $0000,$0030,$FFF0,$018E,$0000,$0010,$0000,$01AA
	dw $0000,$0010,$0010,$01A4,$0000,$FFE0,$FFF0,$01AC
	dw $0000,$0020,$0010,$41A0,$0000,$FFF0,$0010,$01A2
	dw $0000,$FFE0,$0010,$01A0,$8000

DATA_83ABAC:
	dw $0000,$FFF8,$FFF8,$8086,$8000

DATA_83ABB6:
	dw $0000,$FFF8,$FFF8,$0086,$8000

DATA_83ABC0:
	dw $0000,$FFF8,$FFF8,$4086,$8000

DATA_83ABCA:
	dw $0000,$FFF8,$FFF8,$C086,$8000

DATA_83ABD4:
	dw $0000,$FFF8,$FFF8,$8088,$8000

DATA_83ABDE:
	dw $0000,$FFF8,$FFF8,$0088,$8000

DATA_83ABE8:
	dw $0000,$FFF8,$FFF8,$4088,$8000

DATA_83ABF2:
	dw $0000,$FFF8,$FFF8,$C088,$8000

DATA_83ABFC:
	dw $0000,$FFF8,$FFF8,$80EC,$8000

DATA_83AC06:
	dw $0000,$FFF8,$FFF8,$00EC,$8000

DATA_83AC10:
	dw $0000,$FFF8,$FFF8,$40EC,$8000

DATA_83AC1A:
	dw $0000,$FFF8,$FFF8,$C0EC,$8000

DATA_83AC24:
	dw $0000,$FFF8,$FFF8,$80EE,$8000

DATA_83AC2E:
	dw $0000,$FFF8,$FFF8,$00EE,$8000

DATA_83AC38:
	dw $0000,$FFF8,$FFF8,$40EE,$8000

DATA_83AC42:
	dw $0000,$FFF8,$FFF8,$C0EE,$8000

DATA_83AC4C:
	dw $0000,$FFF8,$FFF8,$81AE,$8000

DATA_83AC56:
	dw $0000,$FFF8,$FFF8,$01AE,$8000

DATA_83AC60:
	dw $0000,$FFF8,$FFF8,$41AE,$8000

DATA_83AC6A:
	dw $0000,$FFF8,$FFF8,$C1AE,$8000

DATA_83AC74:
	dw $0000,$FFF7,$0002,$C00A,$8000

DATA_83AC7E:
	dw $0000,$FFF8,$FFF8,$0068,$8000

DATA_83AC88:
	dw $0000,$FFF8,$FFF8,$010C,$8000

DATA_83AC92:
	dw $0000,$FFF8,$FFF8,$010E,$8000

DATA_83AC9C:
	dw $0000,$FFF8,$FFF8,$012C,$8000

DATA_83ACA6:
	dw $0000,$FFF8,$FFF8,$012E,$8000

DATA_83ACB0:
	dw $0000,$FFF8,$FFF8,$412E,$8000

DATA_83ACBA:
	dw $0000,$FFF8,$FFF8,$412C,$8000

DATA_83ACC4:
	dw $0000,$FFF8,$FFF8,$410E,$8000

DATA_83ACCE:
	dw $0000,$FFF8,$FFF8,$410C,$8000

DATA_83ACD8:
	dw $0000,$FFF8,$FFF8,$82E8,$8000

DATA_83ACE2:
	dw $0000,$FFF8,$FFF8,$02E8,$8000

DATA_83ACEC:
	dw $0000,$FFF8,$FFF8,$42E8,$8000

DATA_83ACF6:
	dw $0000,$FFF8,$FFF8,$C2E8,$8000

DATA_83AD00:
	dw $0000,$FFF8,$FFF8,$82EA,$8000

DATA_83AD0A:
	dw $0000,$FFF8,$FFF8,$02EA,$8000

DATA_83AD14:
	dw $0000,$FFF8,$FFF8,$42EA,$8000

DATA_83AD1E:
	dw $0000,$FFF8,$FFF8,$C2EA,$8000

DATA_83AD28:
	dw $0001,$FFF0,$FFF0,$01CC,$8000

DATA_83AD32:
	dw $0001,$FFE0,$FFF0,$0584,$0001,$0000,$FFF0,$4584
	dw $8000

DATA_83AD44:
	dw $0000,$FFE0,$0000,$03EC,$0000,$FFF0,$0000,$03EE
	dw $0000,$0000,$0000,$43EE,$0000,$0010,$0000,$43EC
	dw $8000

DATA_83AD66:
	dw $0000,$FFF0,$0000,$03EC,$0000,$0000,$0000,$43EC
	dw $8000

DATA_83AD78:
	dw $0001,$FFFC,$FFFF,$0140,$8000

DATA_83AD82:
	dw $0001,$FFFC,$FFEF,$0140,$0000,$FFF0,$000F,$0344
	dw $0000,$0000,$000F,$0346,$8000

DATA_83AD9C:
	dw $0001,$FFFC,$FFDF,$0140,$0000,$FFF0,$FFFF,$0344
	dw $0000,$0000,$FFFF,$0346,$0000,$FFF0,$000F,$0364
	dw $0000,$0000,$000F,$0366,$8000

DATA_83ADC6:
	dw $0001,$FFF0,$FFDF,$0180,$0001,$FFF0,$FFFF,$0308
	dw $8000

DATA_83ADD8:
	dw $0001,$FFF0,$FFFF,$030C,$0001,$FFEE,$FFE1,$0180
	dw $8000

DATA_83ADEA:
	dw $0001,$FFF0,$FFFF,$030C,$8000

DATA_83ADF4:
	dw $0001,$FFF0,$FFFF,$0308,$8000

DATA_83ADFE:
	dw $0000,$FFF0,$000F,$0308,$0000,$0000,$000F,$030A
	dw $8000

DATA_83AE10:
	dw $0001,$FFF0,$FFF0,$0308,$8000

DATA_83AE1A:
	dw $0001,$FFF0,$FFF0,$030C,$8000

DATA_83AE24:
	dw $0001,$FFF0,$FFF0,$0308,$8000

DATA_83AE2E:
	dw $0001,$FFEC,$FFE8,$00A0,$0000,$000C,$FFE8,$00A4
	dw $0000,$000C,$FFF8,$00C4,$0000,$FFEC,$0008,$00E0
	dw $0000,$FFFC,$0008,$00E2,$0000,$000C,$0008,$00E4
	dw $8000

DATA_83AE60:
	dw $0001,$FFEC,$FFE8,$00A6,$0000,$000C,$FFE8,$00AA
	dw $0000,$000C,$FFF8,$00CA,$0000,$FFEC,$0008,$00E6
	dw $0000,$FFFC,$0008,$00E8,$0000,$000C,$0008,$00EA
	dw $8000

DATA_83AE92:
	dw $0001,$FFEC,$FFE8,$0100,$0000,$000C,$FFE8,$0104
	dw $0000,$000C,$FFF8,$0124,$0000,$FFEC,$0008,$0140
	dw $0000,$FFFC,$0008,$0142,$0000,$000C,$0008,$0144
	dw $8000

DATA_83AEC4:
	dw $0001,$FFEC,$FFE8,$0106,$0000,$000C,$FFE8,$010A
	dw $0000,$000C,$FFF8,$012A,$0000,$FFEC,$0008,$0146
	dw $0000,$FFFC,$0008,$0148,$0000,$000C,$0008,$014A
	dw $8000

DATA_83AEF6:
	dw $0000,$FFF8,$FFF8,$810C,$8000

DATA_83AF00:
	dw $0000,$FFF8,$FFF8,$010C,$8000

DATA_83AF0A:
	dw $0000,$FFF8,$FFF8,$410C,$8000

DATA_83AF14:
	dw $0000,$FFF8,$FFF8,$C10C,$8000

DATA_83AF1E:
	dw $0001,$FFF8,$FFF8,$012C,$8000

DATA_83AF28:
	dw $0001,$FFF8,$FFF8,$412C,$8000

DATA_83AF32:
	dw $0001,$FFF8,$FFF8,$C12C,$8000

DATA_83AF3C:
	dw $0001,$FFF8,$FFF8,$812C,$8000

DATA_83AF46:
	dw $0000,$0000,$FFF8,$00AC,$0000,$FFF0,$FFF8,$40AC
	dw $8000

DATA_83AF58:
	dw $0000,$0000,$FFF8,$00AE,$0000,$FFF0,$FFF8,$40AE
	dw $8000

DATA_83AF6A:
	dw $0000,$0000,$FFF8,$00CC,$0000,$FFF0,$FFF8,$40CC
	dw $8000

DATA_83AF7C:
	dw $0000,$0000,$FFF8,$00CE,$0000,$FFF0,$FFF8,$40CE
	dw $8000

DATA_83AF8E:
	dw $0000,$FFF8,$FFF8,$0060,$8000

DATA_83AF98:
	dw $0000,$FFF8,$FFF8,$0062,$8000

DATA_83AFA2:
	dw $0000,$FFF8,$FFF8,$0064,$8000

DATA_83AFAC:
	dw $0000,$FFF8,$FFF8,$0066,$8000

DATA_83AFB6:
	dw $0000,$FFF8,$FFF8,$4066,$8000

DATA_83AFC0:
	dw $0000,$FFF8,$FFF8,$8066,$8000

DATA_83AFCA:
	dw $0000,$FFF8,$FFF8,$C066,$8000

DATA_83AFD4:
	dw $0001,$FFF0,$FFF0,$0100,$8000

DATA_83AFDE:
	dw $0001,$FFF0,$FFF0,$0104,$8000

DATA_83AFE8:
	dw $0000,$FFF0,$FFF0,$014E,$0000,$0000,$FFF0,$414E
	dw $0000,$FFF0,$0000,$016E,$0000,$0000,$0000,$416E
	dw $8000

DATA_83B00A:
	dw $0000,$FFF0,$FFF0,$014C,$0000,$0000,$FFF0,$414C
	dw $0000,$FFF0,$0000,$016C,$0000,$0000,$0000,$416C
	dw $8000

DATA_83B02C:
	dw $0000,$FFF0,$FFF0,$014A,$0000,$0000,$FFF0,$414A
	dw $0000,$FFF0,$0000,$016A,$0000,$0000,$0000,$416A
	dw $8000

DATA_83B04E:
	dw $0000,$FFE8,$FFE8,$00E0,$0000,$FFF8,$FFE8,$00E2
	dw $0000,$0008,$FFE8,$40E0,$0000,$FFE8,$FFF8,$00E4
	dw $0000,$FFF8,$FFF8,$00E8,$0000,$0008,$FFF8,$C0E4
	dw $0000,$FFE8,$0008,$80E0,$0000,$FFF8,$0008,$C0E2
	dw $0000,$0008,$0008,$C0E0,$8000

DATA_83B098:
	dw $0000,$FFE8,$FFE8,$00E0,$0000,$FFF8,$FFE8,$40E2
	dw $0000,$0008,$FFE8,$40E0,$0000,$FFE8,$FFF8,$80E4
	dw $0000,$FFF8,$FFF8,$00EA,$0000,$0008,$FFF8,$40E4
	dw $0000,$FFE8,$0008,$80E0,$0000,$FFF8,$0008,$80E2
	dw $0000,$0008,$0008,$C0E0,$8000

DATA_83B0E2:
	dw $0000,$FFF0,$FFF0,$00E6,$0000,$0000,$FFF0,$40E6
	dw $0000,$FFF0,$0000,$80E6,$0000,$0000,$0000,$C0E6
	dw $8000

DATA_83B104:
	dw $0000,$FFF8,$FFF8,$006C,$8000

DATA_83B10E:
	dw $0000,$FFF8,$FFF8,$006E,$8000

DATA_83B118:
	dw $0001,$FFF0,$FFF0,$00A0,$8000

DATA_83B122:
	dw $0001,$FFF0,$FFF0,$00A4,$8000

DATA_83B12C:
	dw $0001,$FFF0,$FFF0,$80A0,$8000

DATA_83B136:
	dw $0001,$FFF0,$FFF0,$80A4,$8000

DATA_83B140:
	dw $0001,$FFF0,$FFF0,$0188,$8000

DATA_83B14A:
	dw $0001,$FFF0,$FFF0,$0188,$8000

DATA_83B154:
	dw $0001,$FFF0,$FFE8,$00A8,$0000,$FFF0,$0008,$00AC
	dw $0000,$0000,$0008,$40AC,$8000

DATA_83B16E:
	dw $0000,$FFF0,$FFEC,$0148,$0000,$0000,$FFEC,$0168
	dw $0000,$FFF0,$FFFC,$00C8,$0000,$0000,$FFFC,$00CA
	dw $0000,$FFF0,$000C,$00AE,$0000,$FFFF,$000C,$40AE
	dw $8000

DATA_83B1A0:
	dw $0000,$FFF0,$FFF0,$0048,$0000,$0000,$FFF0,$4048
	dw $0000,$FFF0,$0000,$004A,$0000,$0000,$0000,$404A
	dw $8000

DATA_83B1C2:
	dw $0000,$FFF8,$FFF8,$01C2,$8000

DATA_83B1CC:
	dw $0000,$FFF8,$FFF8,$004C,$8000

DATA_83B1D6:
	dw $0000,$FFF8,$FFF8,$004E,$8000

DATA_83B1E0:
	dw $0000,$FFF8,$FFF8,$008A,$8000

DATA_83B1EA:
	dw $0000,$FFF8,$FFF8,$008C,$8000

DATA_83B1F4:
	dw $0000,$FFF8,$FFF8,$008E,$8000

DATA_83B1FE:
	dw $0000,$FFF8,$FFF8,$0268,$8000

DATA_83B208:
	dw $0000,$FFF8,$FFF8,$026A,$0000,$FFFC,$FFFC,$0268
	dw $8000

DATA_83B21A:
	dw $0000,$FFF8,$FFF8,$026C,$0000,$FFFC,$FFFC,$026A
	dw $0000,$0008,$000A,$0080,$8000

DATA_83B234:
	dw $0000,$FFF8,$FFF8,$026E,$0000,$FFFC,$FFFC,$026C
	dw $0000,$0008,$000A,$0082,$0000,$0008,$FFF0,$0080
	dw $8000

DATA_83B256:
	dw $0000,$FFFC,$FFFC,$026E,$0000,$0008,$000A,$0084
	dw $0000,$0008,$FFF0,$0082,$0000,$FFF8,$FFF0,$0268
	dw $8000

DATA_83B278:
	dw $0000,$0008,$FFF0,$0084,$0000,$FFF8,$FFF0,$026A
	dw $0000,$FFF0,$0000,$0080,$0000,$0010,$0000,$0080
	dw $8000

DATA_83B29A:
	dw $0000,$FFF8,$FFF0,$026C,$0000,$FFF0,$0000,$0082
	dw $0000,$0010,$0000,$0082,$8000

DATA_83B2B4:
	dw $0000,$FFF8,$FFF0,$026E,$0000,$FFF0,$0000,$0084
	dw $0000,$0010,$0000,$0084,$8000

DATA_83B2CE:
	dw $0000,$FFF0,$FFF8,$01E0,$0000,$0000,$FFF8,$01E2
	dw $8000

DATA_83B2E0:
	dw $0000,$FFF0,$FFF4,$01E4,$0000,$FFF0,$0004,$01E6
	dw $8000

DATA_83B2F2:
	dw $0000,$FFF0,$FFF4,$01E8,$0000,$FFF0,$0004,$01EA
	dw $8000

DATA_83B304:
	dw $0000,$FFF0,$FFF8,$00E8,$0000,$0000,$FFF8,$008E
	dw $8000

DATA_83B316:
	dw $0000,$FFF0,$FFF8,$00EE,$0000,$0000,$FFF8,$008C
	dw $8000

DATA_83B328:
	dw $0000,$0000,$FFF0,$0080,$0000,$000B,$FFF5,$0082
	dw $0000,$0010,$0000,$0084,$8000

DATA_83B342:
	dw $0000,$000B,$FFF5,$0080,$0000,$0010,$0000,$0082
	dw $0000,$000B,$000B,$0084,$8000

DATA_83B35C:
	dw $0000,$0010,$0000,$0080,$0000,$000B,$000B,$0082
	dw $0000,$0000,$0010,$0084,$8000

DATA_83B376:
	dw $0000,$000B,$000B,$0080,$0000,$0000,$0010,$0082
	dw $0000,$FFF5,$000B,$0084,$8000

DATA_83B390:
	dw $0000,$0000,$0010,$0080,$0000,$FFF5,$000B,$0082
	dw $0000,$FFF0,$0000,$0084,$8000

DATA_83B3AA:
	dw $0000,$FFF5,$000B,$0080,$0000,$FFF0,$0000,$0082
	dw $0000,$FFF5,$FFF5,$0084,$8000

DATA_83B3C4:
	dw $0000,$FFF0,$0000,$0080,$0000,$FFF5,$FFF5,$0082
	dw $0000,$0000,$FFF0,$0084,$8000

DATA_83B3DE:
	dw $0000,$FFF5,$FFF5,$0080,$0000,$0000,$FFF0,$0082
	dw $0000,$000B,$FFF5,$0084,$8000

DATA_83B3F8:
	dw $0000,$0000,$FFF0,$006E,$0000,$000B,$FFF5,$006C
	dw $0000,$0010,$0000,$006A,$0000,$000B,$000B,$0068
	dw $8000

DATA_83B41A:
	dw $0000,$000B,$FFF5,$006E,$0000,$0010,$0000,$006C
	dw $0000,$000B,$000B,$006A,$0000,$0000,$0010,$0068
	dw $8000

DATA_83B43C:
	dw $0000,$0010,$0000,$006E,$0000,$000B,$000B,$006C
	dw $0000,$0000,$0010,$006A,$0000,$FFF5,$000B,$0068
	dw $8000

DATA_83B45E:
	dw $0000,$000B,$000B,$006E,$0000,$0000,$0010,$006C
	dw $0000,$FFF5,$000B,$006A,$0000,$FFF0,$0000,$0068
	dw $8000

DATA_83B480:
	dw $0000,$0000,$0010,$006E,$0000,$FFF5,$000B,$006C
	dw $0000,$FFF0,$0000,$006A,$0000,$FFF5,$FFF5,$0068
	dw $8000

DATA_83B4A2:
	dw $0000,$FFF5,$000B,$006E,$0000,$FFF0,$0000,$006C
	dw $0000,$FFF5,$FFF5,$006A,$0000,$0000,$FFF0,$0068
	dw $8000

DATA_83B4C4:
	dw $0000,$FFF0,$0000,$006E,$0000,$FFF5,$FFF5,$006C
	dw $0000,$0000,$FFF0,$006A,$0000,$000B,$FFF5,$0068
	dw $8000

DATA_83B4E6:
	dw $0000,$FFF5,$FFF5,$006E,$0000,$0000,$FFF0,$006C
	dw $0000,$000B,$FFF5,$006A,$0000,$0010,$0000,$0068
	dw $8000

DATA_83B508:
	dw $0000,$0000,$FFE0,$0280,$0000,$000C,$FFE2,$0282
	dw $0000,$0017,$FFE9,$0284,$0000,$0000,$0020,$0280
	dw $0000,$FFF4,$001E,$0282,$0000,$FFE9,$0017,$0284
	dw $8000

DATA_83B53A:
	dw $0000,$000C,$FFE2,$0280,$0000,$0017,$FFE9,$0282
	dw $0000,$001E,$FFF4,$0284,$0000,$FFF4,$001E,$0280
	dw $0000,$FFE9,$0017,$0282,$0000,$FFE2,$000C,$0284
	dw $8000

DATA_83B56C:
	dw $0000,$0017,$FFE9,$0280,$0000,$001E,$FFF4,$0282
	dw $0000,$0020,$0000,$0284,$0000,$FFE9,$0017,$0280
	dw $0000,$FFE2,$000C,$0282,$0000,$FFE0,$0000,$0284
	dw $8000

DATA_83B59E:
	dw $0000,$001E,$FFF4,$0280,$0000,$0020,$0000,$0282
	dw $0000,$001E,$000C,$0284,$0000,$FFE2,$000C,$0280
	dw $0000,$FFE0,$0000,$0282,$0000,$FFE2,$FFF4,$0284
	dw $8000

DATA_83B5D0:
	dw $0000,$0020,$0000,$0280,$0000,$001E,$000C,$0282
	dw $0000,$0017,$0017,$0284,$0000,$FFE0,$0000,$0280
	dw $0000,$FFE2,$FFF4,$0282,$0000,$FFE9,$FFE9,$0284
	dw $8000

DATA_83B602:
	dw $0000,$001E,$000C,$0280,$0000,$0017,$0017,$0282
	dw $0000,$000C,$001E,$0284,$0000,$FFE2,$FFF4,$0280
	dw $0000,$FFE9,$FFE9,$0282,$0000,$FFF4,$FFE2,$0284
	dw $8000

DATA_83B634:
	dw $0000,$0017,$0017,$0280,$0000,$000C,$001E,$0282
	dw $0000,$0000,$0020,$0284,$0000,$FFE9,$FFE9,$0280
	dw $0000,$FFF4,$FFE2,$0282,$0000,$0000,$FFE0,$0284
	dw $8000

DATA_83B666:
	dw $0000,$000C,$001E,$0280,$0000,$0000,$0020,$0282
	dw $0000,$FFF4,$001E,$0284,$0000,$FFF4,$FFE2,$0280
	dw $0000,$0000,$FFE0,$0282,$0000,$000C,$FFE2,$0284
	dw $8000

DATA_83B698:
	dw $0000,$0000,$0020,$0280,$0000,$FFF4,$001E,$0282
	dw $0000,$FFE9,$0017,$0284,$0000,$0000,$FFE0,$0280
	dw $0000,$000C,$FFE2,$0282,$0000,$0017,$FFE9,$0284
	dw $8000

DATA_83B6CA:
	dw $0000,$FFF4,$001E,$0280,$0000,$FFE9,$0017,$0282
	dw $0000,$FFE2,$000C,$0284,$0000,$000C,$FFE2,$0280
	dw $0000,$0017,$FFE9,$0282,$0000,$001E,$FFF4,$0284
	dw $8000

DATA_83B6FC:
	dw $0000,$FFE9,$0017,$0280,$0000,$FFE2,$000C,$0282
	dw $0000,$FFE0,$0000,$0284,$0000,$0017,$FFE9,$0280
	dw $0000,$001E,$FFF4,$0282,$0000,$0020,$0000,$0284
	dw $8000

DATA_83B72E:
	dw $0000,$FFE2,$000C,$0280,$0000,$FFE0,$0000,$0282
	dw $0000,$FFE2,$FFF4,$0284,$0000,$001E,$FFF4,$0280
	dw $0000,$0020,$0000,$0282,$0000,$001E,$000C,$0284
	dw $8000

DATA_83B760:
	dw $0000,$FFE0,$0000,$0280,$0000,$FFE2,$FFF4,$0282
	dw $0000,$FFE9,$FFE9,$0284,$0000,$0020,$0000,$0280
	dw $0000,$001E,$000C,$0282,$0000,$0017,$0017,$0284
	dw $8000

DATA_83B792:
	dw $0000,$FFE2,$FFF4,$0280,$0000,$FFE9,$FFE9,$0282
	dw $0000,$FFF4,$FFE2,$0284,$0000,$001E,$000C,$0280
	dw $0000,$0017,$0017,$0282,$0000,$000C,$001E,$0284
	dw $8000

DATA_83B7C4:
	dw $0000,$FFE9,$FFE9,$0280,$0000,$FFF4,$FFE2,$0282
	dw $0000,$0000,$FFE0,$0284,$0000,$0017,$0017,$0280
	dw $0000,$000C,$001E,$0282,$0000,$0000,$0020,$0284
	dw $8000

DATA_83B7F6:
	dw $0000,$FFF4,$FFE2,$0280,$0000,$0000,$FFE0,$0282
	dw $0000,$000C,$FFE2,$0284,$0000,$000C,$001E,$0280
	dw $0000,$0000,$0020,$0282,$0000,$FFF4,$001E,$0284
	dw $8000

DATA_83B828:
	dw $0000,$FFEE,$FFF6,$01C0,$0000,$FFFE,$FFF6,$01C2
	dw $0000,$FFEE,$0006,$01C4,$0000,$FFFE,$0006,$01C6
	dw $8000

DATA_83B84A:
	dw $0000,$FFEE,$FFFC,$01C0,$0000,$FFFE,$FFFC,$01C2
	dw $0000,$000E,$FFFC,$01C4,$0000,$001E,$FFFC,$01C6
	dw $8000

DATA_83B86C:
	dw $0000,$FFEE,$FFFA,$01C0,$0000,$FFFE,$FFFA,$01C2
	dw $0000,$000E,$FFF2,$01C4,$0000,$000E,$0002,$01C6
	dw $8000

DATA_83B88E:
	dw $0000,$FFEC,$FFF6,$01C0,$0000,$FFEC,$0006,$01C2
	dw $0000,$FFFC,$FFFE,$01C4,$0000,$000C,$FFFE,$01C6
	dw $8000

DATA_83B8B0:
	dw $0000,$FFED,$FFFA,$01C0,$0000,$FFFD,$FFFA,$01C2
	dw $0000,$FFED,$000A,$01C4,$0000,$FFFD,$000A,$01C6
	dw $8000

DATA_83B8D2:
	dw $0000,$FFEE,$FFF6,$01C8,$0000,$FFFE,$FFF6,$01CA
	dw $0000,$FFEE,$0006,$01CC,$0000,$FFFE,$0006,$01CE
	dw $8000

DATA_83B8F4:
	dw $0000,$FFEE,$FFFC,$01C8,$0000,$FFFE,$FFFC,$01CA
	dw $0000,$000E,$FFFC,$01CC,$0000,$001E,$FFFC,$01CE
	dw $8000

DATA_83B916:
	dw $0000,$FFEE,$FFFA,$01C8,$0000,$FFFE,$FFFA,$01CA
	dw $0000,$000E,$FFF2,$01CC,$0000,$000E,$0002,$01CE
	dw $8000

DATA_83B938:
	dw $0000,$FFEC,$FFF6,$01C8,$0000,$FFEC,$0006,$01CA
	dw $0000,$FFFC,$FFFE,$01CC,$0000,$000C,$FFFE,$01CE
	dw $8000

DATA_83B95A:
	dw $0000,$FFED,$FFFA,$01C8,$0000,$FFFD,$FFFA,$01CA
	dw $0000,$FFED,$000A,$01CC,$0000,$FFFD,$000A,$01CE
	dw $8000

DATA_83B97C:
	dw $0000,$FFF0,$FFF8,$01C0,$0000,$0000,$FFF8,$01C2
	dw $8000

DATA_83B98E:
	dw $0000,$FFF0,$FFF6,$01C4,$0000,$0000,$FFFA,$01C6
	dw $8000

DATA_83B9A0:
	dw $0000,$FFF0,$FFF0,$01C4,$0000,$0000,$FFF0,$01C6
	dw $0000,$FFF0,$0000,$C1C6,$0000,$0000,$0000,$C1C4
	dw $8000

DATA_83B9C2:
	dw $0000,$FFF0,$FFF8,$01C8,$0000,$0000,$FFF8,$01CA
	dw $8000

DATA_83B9D4:
	dw $0000,$FFF0,$FFF6,$01CC,$0000,$0000,$FFFA,$01CE
	dw $8000

DATA_83B9E6:
	dw $0000,$FFF0,$FFF0,$01C0,$0000,$0000,$FFF0,$01C2
	dw $0000,$FFF0,$0000,$01C4,$0000,$0000,$0000,$01C6
	dw $8000

DATA_83BA08:
	dw $0000,$FFF0,$FFF0,$01C8,$0000,$0000,$FFF0,$41C8
	dw $0000,$FFF0,$0000,$01CA,$0000,$0000,$0000,$41CA
	dw $8000

DATA_83BA2A:
	dw $0000,$FFEC,$FFF6,$01E0,$0000,$FFEC,$0006,$C1E0
	dw $0000,$FFFC,$FFFE,$01E2,$0000,$000C,$FFFE,$01E4
	dw $8000

DATA_83BA4C:
	dw $0000,$FFEC,$FFF6,$01E6,$0000,$FFEC,$0006,$01E8
	dw $0000,$FFFC,$FFFE,$01EA,$0000,$000C,$FFFE,$81E4
	dw $8000

DATA_83BA6E:
	dw $0000,$FFF0,$FFF8,$00E0,$0000,$0000,$FFF8,$40E0
	dw $0000,$FFF0,$0008,$00CC,$0000,$0000,$0008,$40CC
	dw $8000

DATA_83BA90:
	dw $0000,$FFF0,$FFF8,$00E0,$0000,$0000,$FFF8,$40E0
	dw $0000,$FFF0,$0008,$00E4,$0000,$0000,$0008,$40E4
	dw $0000,$FFF0,$0018,$00CC,$0000,$0000,$0018,$40CC
	dw $8000

DATA_83BAC2:
	dw $0000,$FFF0,$FFF8,$00E0,$0000,$0000,$FFF8,$40E0
	dw $0000,$FFF0,$0008,$80E4,$0000,$0000,$0008,$C0E4
	dw $0000,$FFF8,$0018,$00E6,$0000,$FFF8,$0028,$00CC
	dw $8000

DATA_83BAF4:
	dw $0000,$FFF0,$FFF8,$00E0,$0000,$0000,$FFF8,$40E0
	dw $0000,$FFF0,$0008,$00E4,$0000,$0000,$0008,$40E4
	dw $0000,$FFF0,$0018,$00E4,$0000,$0000,$0018,$40E4
	dw $0000,$FFF8,$0028,$80E6,$0000,$FFF8,$0038,$00CC
	dw $8000

DATA_83BB36:
	dw $0000,$FFF0,$FFF8,$00E2,$0000,$0000,$FFF8,$40E2
	dw $0000,$FFF0,$0008,$80E4,$0000,$0000,$0008,$C0E4
	dw $0000,$FFF1,$0018,$80E4,$0000,$0001,$0018,$C0E4
	dw $0000,$FFF9,$0028,$00E6,$0000,$FFF9,$0038,$00E8
	dw $8000

DATA_83BB78:
	dw $0000,$FFF0,$FFF8,$00E2,$0000,$0000,$FFF8,$40E2
	dw $0000,$FFF0,$0008,$00E4,$0000,$0000,$0008,$40E4
	dw $0000,$FFF8,$0018,$80E6,$0000,$FFF7,$0028,$C0E6
	dw $0000,$FFF7,$0038,$40E8,$0000,$FFF8,$0048,$00EA
	dw $8000

DATA_83BBBA:	
	dw $0000,$FFF8,$FFF8,$80E8,$0000,$FFF8,$0008,$40E6
	dw $0000,$FFF8,$0018,$00E6,$0000,$FFF8,$0028,$00E8
	dw $0000,$FFF5,$0038,$40EA,$0000,$FFFD,$0048,$80EA
	dw $8000

DATA_83BBEC:
	dw $0000,$FFF8,$FFF8,$C0E8,$0000,$FFF6,$0008,$40E8
	dw $0000,$FFFD,$0018,$80EA,$0000,$FFF5,$0028,$00EA
	dw $8000

DATA_83BC0E:
	dw $0000,$FFF8,$FFF8,$00EA,$0000,$FFFA,$0008,$C0EA
	dw $0000,$FFF6,$0018,$40EA,$8000

DATA_83BC28:
	dw $0000,$FFF5,$FFF8,$C0EA,$0000,$FFFC,$0008,$80EA
	dw $8000

DATA_83BC3A:
	dw $0000,$FFF8,$FFF8,$80EA,$0000,$FFF8,$0008,$C0E8
	dw $8000

DATA_83BC4C:
	dw $0000,$FFF8,$FFF8,$40EA,$0000,$FFF8,$0008,$80E8
	dw $0000,$FFF0,$0018,$80E4,$0000,$0000,$0018,$C0E4
	dw $8000

DATA_83BC6E:
	dw $0000,$FFF6,$FFF8,$80EA,$0000,$FFF8,$0008,$C0E8
	dw $0000,$FFF1,$0018,$00E4,$0000,$0001,$0018,$40E4
	dw $0000,$FFF9,$0028,$40E6,$8000

DATA_83BC98:
	dw $0000,$FFF6,$FFF8,$00EA,$0000,$FFF8,$0008,$80E8
	dw $0000,$FFFA,$0018,$80E6,$0000,$FFF0,$0028,$80E4
	dw $0000,$0000,$0028,$C0E4,$0000,$FFF9,$0038,$40E8
	dw $8000

DATA_83BCCA:
	dw $0000,$FFF6,$FFF8,$40EA,$0000,$FFFA,$0008,$80EA
	dw $0000,$FFF8,$0018,$C0E8,$0000,$FFF6,$0028,$40E6
	dw $0000,$FFF5,$0038,$00E8,$8000

DATA_83BCF4:
	dw $0000,$FFF8,$FFF8,$00EA,$0000,$FFFB,$0008,$C0EA
	dw $0000,$FFF4,$0018,$80E8,$0000,$FFF5,$0028,$40E8
	dw $0000,$FFFA,$0038,$40EA,$8000

DATA_83BD1E:
	dw $0000,$FFF6,$FFF8,$C0EA,$0000,$FFFC,$0008,$80EA
	dw $0000,$FFF7,$0018,$00EA,$8000

DATA_83BD38:
	dw $0000,$FFF8,$FFF8,$40EA,$8000

DATA_83BD42:
	dw $0000,$FFF8,$FFF8,$01C6,$8000

DATA_83BD4C:
	dw $0000,$FFF8,$FFF8,$01C0,$8000

DATA_83BD56:
	dw $0000,$FFF8,$FFF8,$01C2,$8000

DATA_83BD60:
	dw $0000,$FFF8,$FFF8,$01C8,$8000

DATA_83BD6A:
	dw $0000,$FFF0,$FFF0,$01C4,$0000,$0000,$FFF0,$41C4
	dw $0000,$FFF0,$0000,$81C4,$0000,$0000,$0000,$C1C4
	dw $8000

DATA_83BD8C:
	dw $0000,$FFF8,$FFF8,$01CA,$8000

DATA_83BD96:
	dw $0000,$FFF8,$FFF8,$01CC,$8000

DATA_83BDA0:
	dw $0000,$FFF8,$FFF8,$01CE,$8000

DATA_83BDAA:
	dw $0000,$0008,$FFF8,$41CE,$8000

DATA_83BDB4:
	dw $0000,$0008,$0008,$C1CE,$8000

DATA_83BDBE:
	dw $0000,$FFF8,$0008,$81CE,$8000

DATA_83BDC8:
	dw $0000,$FFF0,$0010,$00EC,$0000,$0000,$0010,$40EC
	dw $8000

DATA_83BDDA:
	dw $0000,$FFF0,$0010,$00CE,$0000,$0000,$0010,$40CE
	dw $0000,$FFF0,$0000,$00AE,$0000,$0000,$0000,$40AE
	dw $8000

DATA_83BDFC:
	dw $0000,$FFF0,$0000,$80CE,$0000,$0000,$0000,$C0CE
	dw $0000,$FFF0,$0010,$80AE,$0000,$0000,$0010,$C0AE
	dw $8000

DATA_83BE1E:
	dw $0000,$FFF8,$FFF8,$00EE,$8000

DATA_83BE28:
	dw $0001,$FFF0,$FFE0,$00A8,$0001,$FFF0,$0000,$C0A8
	dw $8000

DATA_83BE3A:
	dw $0000,$FFF8,$FFF8,$00AC,$8000

DATA_83BE44:
	dw $0000,$FFF8,$FFF8,$00CC,$8000

DATA_83BE4E:
	dw $0000,$FFF8,$FFF8,$0068,$8000

DATA_83BE58:
	dw $0000,$FFF0,$FFD8,$0188,$0000,$FFF0,$FFE8,$01A8
	dw $0000,$0000,$FFD8,$4188,$0000,$0000,$FFE8,$41A8
	dw $0000,$FFF8,$FFE8,$0184,$0000,$FFF0,$FFF8,$0186
	dw $0000,$0000,$FFF8,$4186,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83BEA2:
	dw $0000,$FFF0,$FFD8,$0188,$0000,$FFF0,$FFE8,$01A8
	dw $0000,$0000,$FFD8,$4188,$0000,$0000,$FFE8,$41A8
	dw $0000,$FFF8,$FFE8,$018C,$0000,$FFF0,$FFF8,$0186
	dw $0000,$0000,$FFF8,$4186,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83BEEC:
	dw $0000,$0004,$FFF7,$018A,$0000,$FFF0,$FFD8,$0188
	dw $0000,$FFF0,$FFE8,$01A8,$0000,$0000,$FFD8,$4188
	dw $0000,$0000,$FFE8,$41A8,$0000,$FFF8,$FFE8,$0184
	dw $0000,$FFF0,$FFF8,$0186,$0000,$0000,$FFF8,$4186
	dw $0000,$FFF0,$0008,$01A6,$0000,$0000,$0008,$41A6
	dw $8000

DATA_83BF3E:
	dw $0000,$FFF0,$FFD8,$0188,$0000,$FFF0,$FFE8,$01A8
	dw $0000,$0000,$FFD8,$4188,$0000,$0000,$FFE8,$41A8
	dw $0000,$FFF8,$FFE8,$018C,$0000,$FFF0,$FFF8,$0186
	dw $0000,$0000,$FFF8,$01AA,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83BF88:
	dw $0000,$FFF0,$FFD8,$0188,$0000,$FFF0,$FFE8,$01A8
	dw $0000,$0000,$FFD8,$4188,$0000,$0000,$FFE8,$41A8
	dw $0000,$FFF8,$FFE8,$0184,$0000,$FFF0,$FFF8,$41AC
	dw $0000,$0000,$FFF8,$01AC,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83BFD2:
	dw $0000,$FFF0,$FFD8,$0188,$0000,$FFF0,$FFE8,$01A8
	dw $0000,$0000,$FFD8,$4188,$0000,$0000,$FFE8,$41A8
	dw $0000,$FFF8,$FFE8,$018C,$0000,$FFF0,$FFF8,$41AC
	dw $0000,$0000,$FFF8,$01AC,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83C01C:
	dw $0000,$FFF8,$FFF0,$0184,$0000,$FFF0,$0000,$01A4
	dw $0000,$0000,$0000,$41A4,$8000

DATA_83C036:
	dw $0000,$FFF8,$FFF0,$018C,$0000,$FFF0,$0000,$01A4
	dw $0000,$0000,$0000,$41A4,$8000

DATA_83C050:
	dw $0000,$0005,$0000,$018A,$0000,$FFF8,$FFF0,$0184
	dw $0000,$FFF0,$0000,$01A4,$0000,$0000,$0000,$41A4
	dw $8000

DATA_83C072:
	dw $0000,$FFF8,$FFF0,$018C,$0000,$FFF0,$0000,$01A4
	dw $0000,$0000,$0000,$018A,$8000

DATA_83C08C:
	dw $0000,$FFF8,$FFE8,$0184,$0000,$FFF0,$FFF8,$0186
	dw $0000,$0000,$FFF8,$4186,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83C0B6:
	dw $0000,$FFF8,$FFE8,$018C,$0000,$FFF0,$FFF8,$018E
	dw $0000,$0000,$FFF8,$418E,$0000,$FFF0,$0008,$01AE
	dw $0000,$0000,$0008,$41AE,$8000

DATA_83C0E0:
	dw $0000,$0004,$FFF7,$018A,$0000,$FFF8,$FFE8,$0184
	dw $0000,$FFF0,$FFF8,$0186,$0000,$0000,$FFF8,$4186
	dw $0000,$FFF0,$0008,$01A6,$0000,$0000,$0008,$41A6
	dw $8000

DATA_83C112:
	dw $0000,$0004,$FFF7,$018A,$0000,$FFF8,$FFE8,$018C
	dw $0000,$FFF0,$FFF8,$018E,$0000,$0000,$FFF8,$418E
	dw $0000,$FFF0,$0008,$01AE,$0000,$0000,$0008,$41AE
	dw $8000

DATA_83C144:
	dw $0000,$FFF8,$FFE8,$0184,$0000,$FFF0,$FFF8,$41AC
	dw $0000,$0000,$FFF8,$01AC,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83C16E:
	dw $0000,$FFF8,$FFE8,$018C,$0000,$FFF0,$FFF8,$41AC
	dw $0000,$0000,$FFF8,$01AC,$0000,$FFF0,$0008,$01A6
	dw $0000,$0000,$0008,$41A6,$8000

DATA_83C198:
	dw $0001,$FFF0,$FFF0,$00A8,$0000,$0006,$0009,$00AC
	dw $8000

DATA_83C1AA:
	dw $0001,$FFF0,$FFF0,$00A8,$0000,$0006,$0002,$80AC
	dw $8000,$0000,$FFE0,$FFF0,$40CA,$0000,$FFF0,$FFEC
	dw $00AA,$0000,$0000,$FFEC,$00AC,$8000,$0000,$FFE0
	dw $FFF0,$C0CA,$0000,$FFF0,$FFEC,$00AA,$0000,$0000
	dw $FFEC,$00AC,$8000,$0000,$0002,$0004,$C0A8,$0000
	dw $0000,$FFF4,$C0C8,$0000,$FFF0,$FFF0,$C0CA,$8000
	dw $0000,$0010,$0000,$80CA,$0000,$0000,$0004,$C0AA
	dw $0000,$FFF0,$0004,$C0AC,$8000

DATA_83C224:
	dw $0000,$FFF8,$FFF8,$0000,$8000

DATA_83C22E:
	dw $0000,$FFF8,$FFF8,$0002,$8000

DATA_83C238:
	dw $0000,$FFF8,$FFF8,$0004,$8000

DATA_83C242:
	dw $0000,$FFF8,$FFF8,$0006,$8000

DATA_83C24C:
	dw $0000,$FFF8,$FFF8,$0008,$8000

DATA_83C256:
	dw $0000,$FFF8,$FFF8,$000A,$8000

DATA_83C260:
	dw $0000,$FFF8,$FFF8,$000C,$8000

DATA_83C26A:
	dw $0000,$FFF8,$FFF8,$000E,$8000

DATA_83C274:
	dw $0000,$FFF8,$FFF8,$0020,$8000

DATA_83C27E:
	dw $0000,$FFF8,$FFF8,$0022,$8000

DATA_83C288:
	dw $0000,$FFF8,$FFF8,$0024,$8000

DATA_83C292:
	dw $0000,$FFF8,$FFF8,$0026,$8000

DATA_83C29C:
	dw $0000,$FFF8,$FFF8,$0028,$8000

DATA_83C2A6:
	dw $0000,$FFF8,$FFF8,$002A,$8000

DATA_83C2B0:
	dw $0000,$FFF8,$FFF8,$002C,$8000

DATA_83C2BA:
	dw $0000,$FFF8,$FFF8,$002E,$8000

DATA_83C2C4:
	dw $0000,$FFF8,$FFF8,$0040,$8000

DATA_83C2CE:
	dw $0000,$FFF8,$FFF8,$0042,$8000

DATA_83C2D8:
	dw $0000,$FFF8,$FFF8,$0044,$8000

DATA_83C2E2:
	dw $0000,$FFF8,$FFF8,$0046,$8000

DATA_83C2EC:
	dw $0000,$FFF8,$FFF8,$0048,$8000

DATA_83C2F6:
	dw $0000,$FFF8,$FFF8,$004A,$8000

DATA_83C300:
	dw $0000,$FFF8,$FFF8,$004C,$8000

DATA_83C30A:
	dw $0000,$FFF8,$FFF8,$004E,$8000

DATA_83C314:
	dw $0000,$FFF8,$FFF8,$01A0,$8000

DATA_83C31E:
	dw $0000,$FFF8,$FFF8,$01A2,$8000

DATA_83C328:
	dw $0000,$FFF8,$FFF8,$41A0,$8000

DATA_83C332:
	dw $0000,$FFF8,$FFF8,$0180,$8000

DATA_83C33C:
	dw $0000,$FFF8,$FFF8,$0182,$8000

DATA_83C346:
	dw $0000,$FFF8,$FFF8,$0184,$8000

DATA_83C350:
	dw $0000,$FFF8,$FFF8,$0186,$8000

DATA_83C35A:
	dw $0000,$FFF8,$FFF8,$0188,$8000

DATA_83C364:
	dw $0000,$FFF8,$FFF8,$018A,$8000

DATA_83C36E:
	dw $8000

DATA_83C370:
	dw $0000,$FFF8,$FFF8,$018E,$8000

DATA_83C37A:
	dw $0000,$FFF8,$FFF8,$01AC,$8000

DATA_83C384:
	dw $0000,$FFF8,$FFF8,$01AE,$8000

DATA_83C38E:
	dw $0000,$FFF8,$FFF8,$01A8,$8000

DATA_83C398:
	dw $0000,$FFF8,$FFF8,$01AA,$8000

DATA_83C3A2:
	dw $0000,$FFF8,$FFF8,$01C0,$8000

DATA_83C3AC:
	dw $0000,$FFF8,$FFF8,$01C2,$8000

DATA_83C3B6:
	dw $0000,$FFF8,$FFF8,$01C4,$8000

DATA_83C3C0:
	dw $0000,$FFF8,$FFF8,$01C6,$8000

DATA_83C3CA:
	dw $0000,$FFF8,$FFF8,$01C8,$8000

DATA_83C3D4:
	dw $0000,$FFF8,$FFF8,$01CA,$8000

DATA_83C3DE:
	dw $0000,$FFF8,$FFF8,$01CC,$8000

DATA_83C3E8:
	dw $0000,$FFF8,$FFF8,$01CE,$8000

DATA_83C3F2:
	dw $0000,$FFF8,$FFF8,$01E0,$8000

DATA_83C3FC:
	dw $0000,$FFF8,$FFF8,$01E2,$8000

DATA_83C406:
	dw $0000,$FFF8,$FFF8,$01E4,$8000

DATA_83C410:
	dw $0000,$FFF8,$FFF8,$01E6,$8000

DATA_83C41A:
	dw $0000,$FFF8,$FFF8,$01E8,$8000

DATA_83C424:
	dw $0000,$FFF8,$FFF8,$01EA,$8000

DATA_83C42E:
	dw $0000,$FFF8,$FFF8,$01EC,$8000

DATA_83C438:
	dw $0000,$FFF8,$FFF8,$01EE,$8000

DATA_83C442:
	dw $0001,$FFF0,$FFF0,$0100,$8000

DATA_83C44C:
	dw $0001,$FFF0,$FFF0,$0104,$8000

DATA_83C456:
	dw $0001,$FFF0,$FFF0,$0108,$8000

DATA_83C460:
	dw $0000,$FFF8,$FFF8,$010C,$8000

DATA_83C46A:
	dw $0000,$FFF8,$FFF8,$410C,$8000

DATA_83C474:
	dw $0000,$FFF8,$FFF8,$C10C,$8000

DATA_83C47E:
	dw $0000,$FFF8,$FFF8,$810C,$8000

DATA_83C488:
	dw $0001,$FFF0,$FFF0,$0064,$8000

DATA_83C492:
	dw $0001,$FFF0,$FFF0,$4060,$8000

DATA_83C49C:
	dw $0001,$FFF0,$FFF0,$0068,$8000

DATA_83C4A6:
	dw $0001,$FFF0,$FFF0,$006C,$8000

DATA_83C4B0:
	dw $0001,$FFF0,$FFF0,$4068,$8000

DATA_83C4BA:
	dw $0001,$FFF0,$FFF0,$0060,$8000

DATA_83C4C4:
	dw $0000,$FFF9,$FFFC,$02A2,$0001,$FFF0,$FFF0,$0064
	dw $8000

DATA_83C4D6:
	dw $0000,$FFF4,$FFFA,$42A0,$0001,$FFF0,$FFF0,$4060
	dw $8000

DATA_83C4E8:
	dw $0000,$FFF4,$FFF6,$02A4,$0001,$FFF0,$FFF0,$0068
	dw $8000

DATA_83C4FA:
	dw $0000,$FFFA,$FFF3,$02A6,$0001,$FFF0,$FFF0,$006C
	dw $8000

DATA_83C50C:
	dw $0000,$FFFC,$FFF6,$42A4,$0001,$FFF0,$FFF0,$4068
	dw $8000

DATA_83C51E:
	dw $0000,$FFFC,$FFFA,$02A0,$0001,$FFF0,$FFF0,$0060
	dw $8000

DATA_83C530:
	dw $0000,$FFF8,$FFF4,$02C6,$0000,$FFF8,$FFFC,$02C6
	dw $0000,$FFF0,$FFF8,$02C6,$0000,$0000,$FFF8,$02C6
	dw $8000

DATA_83C552:
	dw $0000,$FFFA,$FFF5,$02C6,$0000,$FFF6,$FFFB,$02C6
	dw $0000,$FFF2,$FFF7,$02C6,$0000,$FFFE,$FFF9,$02C6
	dw $8000

DATA_83C574:
	dw $0000,$FFFC,$FFF6,$02C6,$0000,$FFF4,$FFFA,$02C6
	dw $0000,$FFF4,$FFF6,$02C6,$0000,$FFFC,$FFFA,$02C6
	dw $8000

DATA_83C596:
	dw $0000,$FFFE,$FFF7,$02C6,$0000,$FFF2,$FFF9,$02C6
	dw $0000,$FFF6,$FFF5,$02C6,$0000,$FFFA,$FFFB,$02C6
	dw $8000

DATA_83C5B8:
	dw $0000,$FFF8,$FFF8,$00C4,$0000,$FFF8,$FFFC,$00C6
	dw $0000,$FFF0,$FFF8,$00C6,$0000,$0000,$FFF8,$00C6
	dw $8000

DATA_83C5DA:
	dw $0000,$FFF4,$FFF8,$00C2,$0000,$FFF6,$FFFB,$00C6
	dw $0000,$FFF2,$FFF7,$00C6,$0000,$FFFE,$FFF9,$00C6
	dw $8000

DATA_83C5FC:
	dw $0000,$FFF0,$FFF8,$00C0,$0000,$FFF4,$FFFA,$00C6
	dw $0000,$FFF4,$FFF6,$00C6,$0000,$FFFC,$FFFA,$00C6
	dw $8000

DATA_83C61E:
	dw $0000,$FFEC,$FFF8,$00E8,$0000,$FFF2,$FFF9,$00C6
	dw $0000,$FFF6,$FFF5,$00C6,$0000,$FFFA,$FFFB,$00C6
	dw $8000

DATA_83C640:
	dw $0000,$FFE4,$FFF8,$00C8,$0000,$FFF8,$FFFC,$00C6
	dw $0000,$FFF0,$FFF8,$00C6,$0000,$0000,$FFF8,$00C6
	dw $8000

DATA_83C662:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFF6,$FFFB,$00C6
	dw $0000,$FFF2,$FFF7,$00C6,$0000,$FFFE,$FFF9,$00C6
	dw $8000

DATA_83C684:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFF8,$FFF8,$00C4
	dw $0000,$FFF0,$FFF8,$00C6,$0000,$0000,$FFF8,$00C6
	dw $8000

DATA_83C6A6:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFF6,$FFF8,$00C2
	dw $0000,$FFF2,$FFF7,$00C6,$0000,$FFFE,$FFF9,$00C6
	dw $8000

DATA_83C6C8:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFF4,$FFF8,$00C0
	dw $0000,$FFF4,$FFF6,$00C6,$0000,$FFFC,$FFFA,$00C6
	dw $8000

DATA_83C6EA:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFF2,$FFF8,$00EA
	dw $0000,$FFF6,$FFF5,$00C6,$0000,$FFFA,$FFFB,$00C6
	dw $8000

DATA_83C70C:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFF0,$FFF8,$00CA
	dw $0000,$FFF0,$FFF8,$00C6,$0000,$0000,$FFF8,$00C6
	dw $8000

DATA_83C72E:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$FFF2,$FFF7,$00C6,$0000,$FFFE,$FFF9,$00C6
	dw $8000

DATA_83C750:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$FFF8,$FFF8,$00C4,$0000,$0000,$FFF8,$00C6
	dw $8000

DATA_83C772:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$FFFA,$FFF8,$00C2,$0000,$FFFE,$FFF9,$00C6
	dw $8000

DATA_83C794:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$FFFC,$FFF8,$00C0,$0000,$FFFC,$FFFA,$00C6
	dw $8000

DATA_83C7B6:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$FFFE,$FFF8,$00EC,$0000,$FFFA,$FFFB,$00C6
	dw $8000

DATA_83C7D8:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0000,$FFF8,$00CC,$0000,$0000,$FFF8,$00C6
	dw $8000

DATA_83C7FA:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0002,$FFF8,$00AC,$0000,$FFFE,$FFF9,$00C6
	dw $8000

DATA_83C81C:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0002,$FFF8,$00AC,$0000,$FFF8,$FFF8,$00C4
	dw $8000

DATA_83C83E:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0002,$FFF8,$00AC,$0000,$FFFC,$FFF8,$00C2
	dw $8000

DATA_83C860:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0002,$FFF8,$00AC,$0000,$0000,$FFF8,$00C0
	dw $8000

DATA_83C882:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0002,$FFF8,$00AC,$0000,$0004,$FFF8,$00EE
	dw $8000

DATA_83C8A4:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0002,$FFF8,$00AC,$0000,$000C,$FFF8,$00CE
	dw $8000

DATA_83C8C6:
	dw $0000,$FFDC,$FFF8,$00A8,$0000,$FFEF,$FFF8,$00AA
	dw $0000,$0002,$FFF8,$00AC,$0000,$0015,$FFF8,$00AE
	dw $8000

DATA_83C8E8:
	dw $0000,$FFE1,$FFF8,$00C8,$0000,$FFF1,$FFF8,$00CA
	dw $0000,$0000,$FFF8,$00CC,$0000,$0010,$FFF8,$00CE
	dw $8000

DATA_83C90A:
	dw $0000,$FFE4,$FFF8,$00E8,$0000,$FFF2,$FFF8,$00EA
	dw $0000,$FFFF,$FFF8,$00EC,$0000,$000D,$FFF8,$00EE
	dw $8000

DATA_83C92C:
	dw $0000,$FFE7,$FFF8,$00C0,$0000,$FFF3,$FFF8,$00C0
	dw $0000,$FFFE,$FFF8,$00C0,$0000,$000A,$FFF8,$00C0
	dw $8000

DATA_83C94E:
	dw $0000,$FFEA,$FFF8,$00C2,$0000,$FFF4,$FFF8,$00C2
	dw $0000,$FFFD,$FFF8,$00C2,$0000,$0007,$FFF8,$00C2
	dw $8000

DATA_83C970:
	dw $0000,$FFEC,$FFF8,$00C4,$0000,$FFF5,$FFF8,$00C4
	dw $0000,$FFFD,$FFF8,$00C4,$0000,$0005,$FFF8,$00C4
	dw $8000

DATA_83C992:
	dw $0000,$FFF5,$FFF8,$00C6,$0000,$FFF8,$FFF8,$00C6
	dw $0000,$FFFA,$FFF8,$00C6,$0000,$FFFD,$FFF8,$00C6
	dw $8000

DATA_83C9B4:
	dw $0000,$FFF8,$FFF8,$08E0,$8000

DATA_83C9BE:
	dw $0000,$FFF8,$FFF8,$08E2,$8000

DATA_83C9C8:
	dw $0000,$FFF8,$FFF8,$08E4,$8000

DATA_83C9D2:
	dw $0000,$FFF8,$FFF8,$08E6,$8000

DATA_83C9DC:
	dw $0000,$FFF8,$FFF8,$0008,$8000

DATA_83C9E6:
	dw $0000,$FFF8,$FFF8,$000A,$8000

DATA_83C9F0:
	dw $0000,$FFF8,$FFF8,$0028,$8000

DATA_83C9FA:
	dw $0000,$FFF8,$FFF8,$002A,$8000

DATA_83CA04:
	dw $0000,$FFF8,$FFF8,$000A,$8000

DATA_83CA0E:
	dw $0000,$FFF8,$FFF8,$0008,$8000

DATA_83CA18:
	dw $0000,$FFF8,$FFF8,$002A,$8000

DATA_83CA22:
	dw $0000,$FFF8,$FFF8,$0028,$8000

DATA_83CA2C:
	dw $0000,$FFF8,$FFF8,$0084,$8000

DATA_83CA36:
	dw $0000,$FFF8,$FFF8,$0080,$8000

DATA_83CA40:
	dw $0000,$FFF8,$FFF8,$8008,$8000

DATA_83CA4A:
	dw $0000,$FFF8,$FFF8,$800A,$8000

DATA_83CA54:
	dw $0001,$FFF0,$FFE2,$000C,$0001,$FFF0,$0000,$0004
	dw $0001,$FFF0,$FFF0,$0000,$8000

DATA_83CA6E:
	dw $0001,$FFE0,$0000,$0000,$0001,$0000,$0000,$0004
	dw $0001,$FFF0,$FFE5,$000C,$8000

DATA_83CA88:
	dw $0001,$FFE0,$FFFD,$0000,$0001,$0000,$0003,$0004
	dw $0001,$FFF0,$FFE6,$000C,$8000

DATA_83CAA2:
	dw $0001,$FFE0,$0004,$0000,$0001,$0000,$FFFD,$0004
	dw $0001,$FFF0,$FFE4,$000C,$8000

DATA_83CABC:
	dw $0001,$FFE0,$FFFE,$0000,$0001,$0000,$FFFE,$0004
	dw $0001,$FFF0,$FFE3,$000C,$8000

DATA_83CAD6:
	dw $0001,$FFE0,$FFFB,$0000,$0001,$0000,$0001,$0004
	dw $0001,$FFF0,$FFE4,$000C,$8000

DATA_83CAF0:
	dw $0001,$FFE0,$0002,$0000,$0001,$0000,$FFFB,$0004
	dw $0001,$FFF0,$FFE2,$000C,$8000

DATA_83CB0A:
	dw $0000,$FFF8,$FFF8,$0008,$8000

DATA_83CB14:
	dw $0000,$FFF8,$FFF8,$000A,$8000

DATA_83CB1E:
	dw $0001,$FFED,$FFEA,$0C04,$0001,$FFF0,$0000,$0000
	dw $8000

DATA_83CB30:
	dw $0001,$FFED,$FFEA,$0C04,$0001,$FFF0,$0000,$0000
	dw $0000,$FFF6,$0020,$000C,$8000

DATA_83CB4A:
	dw $0001,$FFED,$FFEA,$0C04,$0001,$FFF0,$0000,$0000
	dw $0000,$FFF6,$0020,$000E,$8000

DATA_83CB64:
	dw $0001,$FFED,$FFEA,$0C04,$0001,$FFF0,$0000,$0000
	dw $0000,$FFF6,$0020,$002C,$8000

DATA_83CB7E:
	dw $0001,$FFED,$FFEA,$0C04,$0001,$FFF0,$0000,$0000
	dw $0000,$FFF6,$0020,$002E,$8000

DATA_83CB98:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0028
	dw $8000

DATA_83CBAA:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$000A
	dw $0000,$0008,$FFF8,$0028,$8000

DATA_83CBC4:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$000A,$0000,$0018,$FFF8,$0028
	dw $8000

DATA_83CBE6:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$0008,$0000,$0018,$FFF8,$000A
	dw $0000,$0028,$FFF8,$0028,$8000

DATA_83CC10:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$0008,$0000,$0018,$FFF8,$0008
	dw $0000,$0028,$FFF8,$000A,$0000,$0038,$FFF8,$0028
	dw $8000

DATA_83CC42:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$0008,$0000,$0018,$FFF8,$0008
	dw $0000,$0028,$FFF8,$0008,$0000,$0038,$FFF8,$000A
	dw $0000,$0048,$FFF8,$0028,$8000

DATA_83CC7C:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$0008,$0000,$0018,$FFF8,$0008
	dw $0000,$0028,$FFF8,$0008,$0000,$0038,$FFF8,$0008
	dw $0000,$0048,$FFF8,$000A,$0000,$0058,$FFF8,$0028
	dw $8000

DATA_83CCBE:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$0008,$0000,$0018,$FFF8,$0008
	dw $0000,$0028,$FFF8,$0008,$0000,$0038,$FFF8,$0008
	dw $0000,$0048,$FFF8,$0008,$0000,$0058,$FFF8,$000A
	dw $0000,$0068,$FFF8,$0028,$8000

DATA_83CD08:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$0008,$0000,$0018,$FFF8,$0008
	dw $0000,$0028,$FFF8,$0008,$0000,$0038,$FFF8,$0008
	dw $0000,$0048,$FFF8,$0008,$0000,$0058,$FFF8,$0008
	dw $0000,$0068,$FFF8,$000A,$8000

DATA_83CD52:
	dw $0000,$FFF4,$FFF8,$002A,$0000,$FFF8,$FFF8,$0008
	dw $0000,$0008,$FFF8,$0008,$0000,$0018,$FFF8,$0008
	dw $0000,$0028,$FFF8,$0008,$0000,$0038,$FFF8,$0008
	dw $0000,$0048,$FFF8,$0008,$0000,$0058,$FFF8,$0008
	dw $0000,$0068,$FFF8,$0008,$8000

DATA_83CD9C:
	dw $0000,$FFF8,$FFF8,$000A,$0000,$0008,$FFF8,$0008
	dw $0000,$0018,$FFF8,$0008,$0000,$0028,$FFF8,$0008
	dw $0000,$0038,$FFF8,$0008,$0000,$0048,$FFF8,$0008
	dw $0000,$0058,$FFF8,$0008,$0000,$0068,$FFF8,$0008
	dw $8000

DATA_83CDDE:
	dw $0000,$FFF8,$FFF8,$0028,$0000,$0008,$FFF8,$000A
	dw $0000,$0018,$FFF8,$0008,$0000,$0028,$FFF8,$0008
	dw $0000,$0038,$FFF8,$0008,$0000,$0048,$FFF8,$0008
	dw $0000,$0058,$FFF8,$0008,$0000,$0068,$FFF8,$0008
	dw $8000

DATA_83CE20:
	dw $0000,$0008,$FFF8,$0028,$0000,$0018,$FFF8,$000A
	dw $0000,$0028,$FFF8,$0008,$0000,$0038,$FFF8,$0008
	dw $0000,$0048,$FFF8,$0008,$0000,$0058,$FFF8,$0008
	dw $0000,$0068,$FFF8,$0008,$8000

DATA_83CE5A:
	dw $0000,$0018,$FFF8,$0028,$0000,$0028,$FFF8,$000A
	dw $0000,$0038,$FFF8,$0008,$0000,$0048,$FFF8,$0008
	dw $0000,$0058,$FFF8,$0008,$0000,$0068,$FFF8,$0008
	dw $8000

DATA_83CE8C:
	dw $0000,$0028,$FFF8,$0028,$0000,$0038,$FFF8,$000A
	dw $0000,$0048,$FFF8,$0008,$0000,$0058,$FFF8,$0008
	dw $0000,$0068,$FFF8,$0008,$8000

DATA_83CEB6:
	dw $0000,$0038,$FFF8,$0028,$0000,$0048,$FFF8,$000A
	dw $0000,$0058,$FFF8,$0008,$0000,$0068,$FFF8,$0008
	dw $8000

DATA_83CED8:
	dw $0000,$0048,$FFF8,$0028,$0000,$0058,$FFF8,$000A
	dw $0000,$0068,$FFF8,$0008,$8000

DATA_83CEF2:
	dw $0000,$0058,$FFF8,$0028,$0000,$0068,$FFF8,$000A
	dw $8000

DATA_83CF04:
	dw $0000,$0068,$FFF8,$0028,$8000

DATA_83CF0E:
	dw $0001,$FFEC,$FFDB,$0C04,$0001,$FFEF,$FFF5,$0000
	dw $0001,$FFDB,$0006,$0C0C,$0001,$0005,$0006,$0C0C
	dw $8000

DATA_83CF30:
	dw $0001,$FFEC,$FFD8,$0C04,$0001,$FFEF,$FFF3,$0000
	dw $0001,$FFDB,$0005,$0C0C,$0001,$0005,$0005,$0C0C
	dw $8000

DATA_83CF52:
	dw $0001,$FFEE,$FFDD,$0C04,$0001,$FFF1,$FFF7,$0000
	dw $0001,$FFDB,$0003,$0C0C,$0001,$0005,$000A,$0C0C
	dw $8000

DATA_83CF74:
	dw $0001,$FFEE,$FFDA,$0C04,$0001,$FFF1,$FFF5,$0000
	dw $0001,$FFDB,$0002,$0C0C,$0001,$0005,$0009,$0C0C
	dw $8000

DATA_83CF96:
	dw $0001,$FFF4,$FFDD,$0C04,$0001,$FFF4,$FFF7,$0000
	dw $0001,$FFDD,$FFFF,$0C0C,$0001,$0004,$000E,$0C0C
	dw $8000

DATA_83CFB8:
	dw $0001,$FFF4,$FFDA,$0C04,$0001,$FFF4,$FFF5,$0000
	dw $0001,$FFDD,$FFFE,$0C0C,$0001,$0004,$000D,$0C0C
	dw $8000

DATA_83CFDA:
	dw $0001,$FFF8,$FFE0,$0C04,$0001,$FFF8,$FFFA,$0000
	dw $0001,$FFDF,$FFFC,$0C0C,$0001,$0002,$0013,$0C0C
	dw $8000

DATA_83CFFC:
	dw $0001,$FFF9,$FFDD,$0C04,$0001,$FFF9,$FFF8,$0000
	dw $0001,$FFE0,$FFFB,$0C0C,$0001,$0003,$0012,$0C0C
	dw $8000

DATA_83D01E:
	dw $0001,$FFFC,$FFDD,$0C04,$0001,$FFFA,$FFFB,$0000
	dw $0001,$FFE2,$FFF8,$0C0C,$0001,$0000,$0016,$0C0C
	dw $8000

DATA_83D040:
	dw $0001,$FFFD,$FFDB,$0C04,$0001,$FFFB,$FFF9,$0000
	dw $0001,$FFE3,$FFF7,$0C0C,$0001,$0001,$0015,$0C0C
	dw $8000

DATA_83D062:
	dw $0001,$FFFC,$FFE3,$0C04,$0001,$FFFA,$FFFE,$0000
	dw $0001,$FFE5,$FFF6,$0C0C,$0001,$FFFD,$0019,$0C0C
	dw $8000

DATA_83D084:
	dw $0001,$FFFE,$FFE1,$0C04,$0001,$FFFB,$FFFC,$0000
	dw $0001,$FFE6,$FFF5,$0C0C,$0001,$FFFE,$0018,$0C0C
	dw $8000

DATA_83D0A6:
	dw $0001,$FFFC,$FFE5,$0C04,$0001,$FFFA,$0000,$0000
	dw $0001,$FFE8,$FFF5,$0C0C,$0001,$FFFA,$001A,$0C0C
	dw $8000

DATA_83D0C8:
	dw $0001,$FFFE,$FFE3,$0C04,$0001,$FFFB,$FFFE,$0000
	dw $0001,$FFE9,$FFF4,$0C0C,$0001,$FFFB,$0019,$0C0C
	dw $8000

DATA_83D0EA:
	dw $0001,$FFEA,$FFDB,$0C04,$0001,$FFED,$FFF5,$0000
	dw $0001,$FFDB,$000A,$0C0C,$0001,$0005,$0003,$0C0C
	dw $8000

DATA_83D10C:
	dw $0001,$FFEA,$FFD8,$0C04,$0001,$FFED,$FFF3,$0000
	dw $0001,$FFDB,$0009,$0C0C,$0001,$0005,$0002,$0C0C
	dw $8000

DATA_83D12E:
	dw $0001,$FFE5,$FFDE,$0C04,$0001,$FFEB,$FFF8,$0000
	dw $0001,$FFDC,$000E,$0C0C,$0001,$0003,$FFFF,$0C0C
	dw $8000

DATA_83D150:
	dw $0001,$FFE5,$FFDB,$0C04,$0001,$FFEB,$FFF6,$0000
	dw $0001,$FFDC,$000D,$0C0C,$0001,$0003,$FFFE,$0C0C
	dw $8000

DATA_83D172:
	dw $0001,$FFE1,$FFE0,$0C04,$0001,$FFE7,$FFFA,$0000
	dw $0001,$FFDE,$0013,$0C0C,$0001,$0001,$FFFC,$0C0C
	dw $8000

DATA_83D194:
	dw $0001,$FFE0,$FFDE,$0C04,$0001,$FFE7,$FFF8,$0000
	dw $0001,$FFDD,$0012,$0C0C,$0001,$0000,$FFFB,$0C0C
	dw $8000

DATA_83D1B6:
	dw $0001,$FFDD,$FFE1,$0C04,$0001,$FFE5,$FFFA,$0000
	dw $0001,$FFE0,$0016,$0C0C,$0001,$FFFE,$FFF8,$0C0C
	dw $8000

DATA_83D1D8:
	dw $0001,$FFDC,$FFDF,$0C04,$0001,$FFE5,$FFF8,$0000
	dw $0001,$FFDF,$0015,$0C0C,$0001,$FFFD,$FFF7,$0C0C
	dw $8000

DATA_83D1FA:
	dw $0001,$FFDB,$FFE2,$0C04,$0001,$FFE3,$FFFB,$0000
	dw $0001,$FFE3,$0019,$0C0C,$0001,$FFFB,$FFF6,$0C0C
	dw $8000

DATA_83D21C:
	dw $0001,$FFD9,$FFE0,$0C04,$0001,$FFE2,$FFF9,$0000
	dw $0001,$FFE2,$0018,$0C0C,$0001,$FFFA,$FFF5,$0C0C
	dw $8000

DATA_83D23E:
	dw $0001,$FFDA,$FFE5,$0C04,$0001,$FFE2,$FFFE,$0000
	dw $0001,$FFE6,$001A,$0C0C,$0001,$FFF8,$FFF5,$0C0C
	dw $8000

DATA_83D260:
	dw $0001,$FFD8,$FFE3,$0C04,$0001,$FFE1,$FFFC,$0000
	dw $0001,$FFE5,$0019,$0C0C,$0001,$FFF7,$FFF4,$0C0C
	dw $8000

DATA_83D282:
	dw $0001,$0000,$FFE6,$0004,$0001,$FFE0,$FFE6,$0000
	dw $0001,$FFE8,$0006,$000A,$0000,$0008,$0006,$000E
	dw $0000,$0008,$0016,$002E,$8000

DATA_83D2AC:
	dw $0000,$FFF8,$FFF8,$0008,$8000

DATA_83D2B6:
	dw $0000,$FFF8,$FFF8,$4008,$8000

DATA_83D2C0:
	dw $0000,$FFF8,$FFF8,$C008,$8000

DATA_83D2CA:
	dw $0000,$FFF8,$FFF8,$8008,$8000

DATA_83D2D4:
	dw $0000,$FFF0,$FFF0,$000A,$0000,$0000,$FFF0,$400A
	dw $0000,$FFF0,$0000,$800A,$0000,$0000,$0000,$C00A
	dw $8000

DATA_83D2F6:
	dw $0000,$FFF8,$FFF8,$0028,$0000,$FFF0,$FFF0,$0028
	dw $0000,$0000,$FFF0,$4028,$0000,$FFF0,$0000,$8028
	dw $0000,$0000,$0000,$C028,$8000

DATA_83D320:
	dw $0000,$FFF8,$FFF8,$C028,$0000,$FFF0,$FFEC,$002A
	dw $0000,$0004,$FFF0,$402A,$0000,$FFF0,$0000,$802A
	dw $0000,$0000,$0000,$C02A,$8000

DATA_83D34A:
	dw $0000,$FFF8,$FFF8,$C02A,$8000

DATA_83D354:
	dw $0001,$FFE0,$0002,$0C00,$0001,$0000,$0002,$0C04
	dw $0000,$FFE7,$FFF4,$0C2C,$0000,$FFF7,$FFF4,$0C2E
	dw $8000

DATA_83D376:
	dw $0001,$FFE0,$FFFE,$0C00,$0001,$0000,$0002,$0C04
	dw $0000,$FFE7,$FFF3,$0C2C,$0000,$FFF7,$FFF3,$0C2E
	dw $8000

DATA_83D398:
	dw $0001,$FFE0,$0002,$0C00,$0001,$0000,$FFFE,$0C04
	dw $0000,$FFE6,$FFF7,$0C2C,$0000,$FFF6,$FFF7,$0C2E
	dw $8000

DATA_83D3BA:
	dw $0001,$FFE0,$0001,$0C00,$0001,$0000,$0001,$0C04
	dw $0000,$FFE7,$FFF2,$0C2C,$0000,$FFF7,$FFF2,$0C2E
	dw $8000

DATA_83D3DC:
	dw $0001,$FFE0,$FFFD,$0C00,$0001,$0000,$0001,$0C04
	dw $0000,$FFE7,$FFF1,$0C2C,$0000,$FFF7,$FFF1,$0C2E
	dw $8000

DATA_83D3FE:
	dw $0001,$FFE0,$0003,$0C00,$0001,$0000,$FFFF,$0C04
	dw $0000,$FFE6,$FFF5,$0C2C,$0000,$FFF6,$FFF5,$0C2E
	dw $8000

DATA_83D420:
	dw $0000,$FFF0,$FFF0,$0028,$0000,$0000,$FFF0,$4028
	dw $0000,$FFF0,$0000,$8028,$0000,$0000,$0000,$C028
	dw $8000

DATA_83D442:
	dw $0000,$FFF0,$FFF0,$002A,$0000,$0000,$FFF0,$402A
	dw $0000,$FFF0,$0000,$802A,$0000,$0000,$0000,$C02A
	dw $8000

DATA_83D464:
	dw $0000,$FFF8,$FFF8,$000A,$0000,$FFF0,$FFF0,$000C
	dw $0000,$0000,$FFF0,$400C,$0000,$FFF0,$0000,$800C
	dw $0000,$0000,$0000,$C00C,$8000

DATA_83D48E:
	dw $0000,$FFF8,$FFF8,$000C,$0000,$FFEE,$FFF2,$000E
	dw $0000,$FFFF,$FFEF,$400E,$0000,$FFF2,$0000,$800E
	dw $0000,$0001,$FFFF,$C00E,$8000

DATA_83D4B8:
	dw $0000,$FFF8,$FFF8,$000E,$8000

DATA_83D4C2:
	dw $0001,$FFE0,$0000,$0000,$0001,$0000,$0000,$0004
	dw $0000,$FFD0,$0008,$002C,$0000,$0020,$0008,$002E
	dw $0000,$FFF0,$FFF0,$000C,$0000,$0000,$FFF0,$000E
	dw $8000

DATA_83D4F4:
	dw $0001,$FFF5,$FFF9,$0C00,$0001,$FFF0,$0010,$0C04
	dw $0001,$FFF0,$FFEA,$0C0C,$8000

DATA_83D50E:
	dw $0001,$FFF0,$0010,$0C04,$0001,$FFF5,$FFF9,$0C00
	dw $0001,$FFF0,$FFEA,$0C0C,$8000

DATA_83D528:
	dw $0001,$FFF0,$FFF0,$0140,$8000

DATA_83D532:
	dw $0001,$FFF0,$FFF0,$0144,$8000

DATA_83D53C:
	dw $0000,$FFF0,$FFF0,$0148,$8000

DATA_83D546:
	dw $0000,$FFF0,$FFF0,$014A,$8000

DATA_83D550:
	dw $0000,$FFF0,$FFF0,$0168,$8000

DATA_83D55A:
	dw $0000,$FFF0,$FFF0,$016A,$8000

DATA_83D564:
	dw $0001,$FFF0,$FFF0,$014C,$8000

DATA_83D56E:
	dw $0000,$FFF8,$FFF8,$012C,$8000

DATA_83D578:
	dw $0000,$FFF8,$FFF8,$012E,$8000

DATA_83D582:
	dw $0001,$0000,$FFE0,$08A0,$0001,$0000,$0000,$08A4
	dw $0001,$FFD0,$0000,$04A8,$0000,$0010,$FFD0,$08AC
	dw $0000,$0020,$FFD7,$08AE,$0000,$0020,$FFE7,$08CC
	dw $0000,$0020,$FFF7,$08CE,$0000,$FFF0,$FFD0,$04E0
	dw $0000,$FFF0,$FFE0,$04E2,$0000,$FFE0,$FFF0,$04E4
	dw $0000,$FFF0,$FFF0,$04E6,$0000,$FFF0,$0000,$04E8
	dw $0000,$FFF0,$0010,$04EA,$8000

DATA_83D5EC:
	dw $0001,$FFE0,$FFE0,$0580,$0001,$0000,$FFE0,$0984
	dw $0001,$FFE0,$0000,$0588,$0001,$0000,$0000,$098C
	dw $0000,$FFD0,$FFF0,$04EE,$0000,$FFD0,$0000,$0566
	dw $0000,$FFD0,$0010,$0568,$0000,$0020,$FFE0,$096A
	dw $0000,$0020,$FFF0,$096C,$0000,$0020,$0000,$096E
	dw $8000

DATA_83D63E:
	dw $0001,$FFE0,$FFE0,$0580,$0001,$0000,$FFE0,$0984
	dw $0001,$FFE0,$0000,$0588,$0001,$0000,$0000,$098C
	dw $0000,$FFD0,$FFF0,$04EE,$0000,$FFD0,$0000,$0566
	dw $0000,$FFD0,$0010,$0568,$0000,$0020,$FFE0,$096A
	dw $0000,$0020,$FFF0,$096C,$0000,$0020,$0000,$096E
	dw $0000,$FFF8,$FFE0,$0748,$8000

DATA_83D698:
	dw $0001,$FFE0,$FFE4,$0580,$0001,$0000,$FFE4,$0984
	dw $0001,$FFE0,$0004,$0588,$0001,$0000,$0004,$098C
	dw $0000,$FFD0,$FFF4,$04EE,$0000,$FFD0,$0004,$0566
	dw $0000,$FFD0,$0014,$0568,$0000,$0020,$FFE4,$096A
	dw $0000,$0020,$FFF4,$096C,$0000,$0020,$0004,$096E
	dw $0000,$FFF8,$FFE0,$074A,$8000

DATA_83D6F2:
	dw $0001,$FFFC,$FFF4,$08A0,$0001,$FFFC,$0014,$08A4
	dw $0001,$FFCC,$0014,$04A8,$0000,$000C,$FFE4,$08AC
	dw $0000,$001C,$FFEB,$08AE,$0000,$001C,$FFFB,$08CC
	dw $0000,$001C,$000B,$08CE,$0000,$FFEC,$FFE4,$04E0
	dw $0000,$FFEC,$FFF4,$04E2,$0000,$FFDC,$0004,$04E4
	dw $0000,$FFEC,$0004,$04E6,$0000,$FFEC,$0014,$04E8
	dw $0000,$FFEC,$0024,$04EA,$0000,$FFF8,$FFE0,$074C
	dw $0000,$FFF8,$FFF0,$074C,$8000

DATA_83D76C:
	dw $0001,$FFFC,$FFFD,$08A0,$0001,$FFFC,$001D,$08A4
	dw $0001,$FFCC,$001D,$04A8,$0000,$000C,$FFED,$08AC
	dw $0000,$001C,$FFF4,$08AE,$0000,$001C,$0004,$08CC
	dw $0000,$001C,$0014,$08CE,$0000,$FFEC,$FFED,$04E0
	dw $0000,$FFEC,$FFFD,$04E2,$0000,$FFDC,$000D,$04E4
	dw $0000,$FFEC,$000D,$04E6,$0000,$FFEC,$001D,$04E8
	dw $0000,$FFEC,$002D,$04EA,$0000,$FFF8,$FFE0,$074E
	dw $0000,$FFF8,$FFF0,$074E,$8000

DATA_83D7E6:
	dw $0001,$FFFC,$FFFF,$08A0,$0001,$FFFC,$001F,$08A4
	dw $0001,$FFCC,$001F,$04A8,$0000,$000C,$FFEF,$08AC
	dw $0000,$001C,$FFF6,$08AE,$0000,$001C,$0006,$08CC
	dw $0000,$001C,$0016,$08CE,$0000,$FFEC,$FFEF,$04E0
	dw $0000,$FFEC,$FFFF,$04E2,$0000,$FFDC,$000F,$04E4
	dw $0000,$FFEC,$000F,$04E6,$0000,$FFEC,$001F,$04E8
	dw $0000,$FFEC,$002F,$04EA,$0000,$FFF8,$FFE0,$074E
	dw $0000,$FFF8,$FFF0,$074E,$8000

DATA_83D860:
	dw $0001,$FFE0,$FFE0,$0580,$0001,$0000,$FFE0,$0984
	dw $0001,$FFE0,$0000,$0588,$0001,$0000,$0000,$098C
	dw $0000,$FFD0,$FFF0,$04EE,$0000,$FFD0,$0000,$0566
	dw $0000,$FFD0,$0010,$0568,$0000,$0020,$FFE0,$096A
	dw $0000,$0020,$FFF0,$096C,$0000,$0020,$0000,$096E
	dw $0000,$FFF8,$FFE0,$0748,$0001,$FFC5,$0002,$4740
	dw $8000

DATA_83D8C2:
	dw $0001,$FFE0,$FFE4,$0580,$0001,$0000,$FFE4,$0984
	dw $0001,$FFE0,$0004,$0588,$0001,$0000,$0004,$098C
	dw $0000,$FFD0,$FFF4,$04EE,$0000,$FFD0,$0004,$0566
	dw $0000,$FFD0,$0014,$0568,$0000,$0020,$FFE4,$096A
	dw $0000,$0020,$FFF4,$096C,$0000,$0020,$0004,$096E
	dw $0000,$FFF8,$FFE0,$074A,$0001,$FFC4,$0007,$4740
	dw $8000

DATA_83D924:
	dw $0001,$FFFC,$FFF4,$08A0,$0001,$FFFC,$0014,$08A4
	dw $0001,$FFCC,$0014,$04A8,$0000,$000C,$FFE4,$08AC
	dw $0000,$001C,$FFEB,$08AE,$0000,$001C,$FFFB,$08CC
	dw $0000,$001C,$000B,$08CE,$0000,$FFEC,$FFE4,$04E0
	dw $0000,$FFEC,$FFF4,$04E2,$0000,$FFDC,$0004,$04E4
	dw $0000,$FFEC,$0004,$04E6,$0000,$FFEC,$0014,$04E8
	dw $0000,$FFEC,$0024,$04EA,$0000,$FFF8,$FFE0,$074C
	dw $0000,$FFF8,$FFF0,$074C,$0001,$FFC0,$0019,$4740
	dw $8000

DATA_83D9A6:
	dw $0001,$FFFC,$FFFD,$08A0,$0001,$FFFC,$001D,$08A4
	dw $0001,$FFCC,$001D,$04A8,$0000,$000C,$FFED,$08AC
	dw $0000,$001C,$FFF4,$08AE,$0000,$001C,$0004,$08CC
	dw $0000,$001C,$0014,$08CE,$0000,$FFEC,$FFED,$04E0
	dw $0000,$FFEC,$FFFD,$04E2,$0000,$FFDC,$000D,$04E4
	dw $0000,$FFEC,$000D,$04E6,$0000,$FFEC,$001D,$04E8
	dw $0000,$FFEC,$002D,$04EA,$0000,$FFF8,$FFE0,$074E
	dw $0000,$FFF8,$FFF0,$074E,$0001,$FFBF,$0023,$4740
	dw $8000

DATA_83DA28:
	dw $0001,$FFFC,$FFFF,$08A0,$0001,$FFFC,$001F,$08A4
	dw $0001,$FFCC,$001F,$04A8,$0000,$000C,$FFEF,$08AC
	dw $0000,$001C,$FFF6,$08AE,$0000,$001C,$0006,$08CC
	dw $0000,$001C,$0016,$08CE,$0000,$FFEC,$FFEF,$04E0
	dw $0000,$FFEC,$FFFF,$04E2,$0000,$FFDC,$000F,$04E4
	dw $0000,$FFEC,$000F,$04E6,$0000,$FFEC,$001F,$04E8
	dw $0000,$FFEC,$002F,$04EA,$0000,$FFF8,$FFE0,$074E
	dw $0000,$FFF8,$FFF0,$074E,$0001,$FFBE,$0028,$4740
	dw $8000

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

DATA_83DAAA:
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83E644,DATA_83DEC4,DATA_83DFC4,DATA_83E1C4,$E6A4
	dw DATA_83E644,DATA_83DEC4,DATA_83DFC4,DATA_83E344,DATA_83E6C4
	dw DATA_83E644,DATA_83DEC4,DATA_83E444,DATA_83E344,DATA_83E6C4
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83DC44,DATA_83DCC4,DATA_83DD44,DATA_83DDC4,$FFFF
	dw DATA_83E644,DATA_83DEC4,DATA_83DFC4,DATA_83E344,DATA_83E6C4
	dw DATA_83E644,DATA_83DEC4,DATA_83DFC4,DATA_83E5C4,DATA_83E2C4
	dw DATA_83E644,DATA_83DEC4,DATA_83DFC4,DATA_83E044,DATA_83E6E4
	dw DATA_83E644,DATA_83DEC4,DATA_83E244,DATA_83E044,DATA_83E6E4
	dw DATA_83E644,DATA_83E144,DATA_83E0C4,DATA_83E044,DATA_83E704
	dw DATA_83E2C4,DATA_83DEC4,DATA_83E2C4,DATA_83E044,DATA_83E2C4
	dw DATA_83E644,DATA_83DEC4,DATA_83DF44,DATA_83E3C4,DATA_83E724
	dw DATA_83E644,DATA_83DEC4,DATA_83E4C4,DATA_83E3C4,DATA_83E724
	dw DATA_83E644,DATA_83DEC4,DATA_83E4C4,DATA_83E3C4,DATA_83E724
	dw DATA_83E644,DATA_83DEC4,DATA_83E544,DATA_83E3C4,DATA_83E744
	dw DATA_83E644,DATA_83DEC4,DATA_83E044,DATA_83E2C4,DATA_83E2C4
	dw DATA_83E644,DATA_83DEC4,DATA_83E2C4,DATA_83E2C4,DATA_83E2C4
	dw DATA_83E644,DATA_83DEC4,DATA_83E2C4,DATA_83E1C4,DATA_83E744
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF
	dw DATA_83E764,DATA_83E7E4,DATA_83E864,DATA_83E8E4,$FFFF

DATA_83DC44:
	dw $0000,$8002,$0002,$0002,$0002,$0000,$0000,$0000
	dw $0000,$0000,$8002,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0003,$0004
	dw $0002,$0002,$0000,$0005,$0002,$0002,$0000,$0000
	dw $0000,$0006,$0002,$0002,$0000,$0000,$0007,$0008
	dw $0002,$0002,$0002,$0000,$0000,$0009,$0002,$0000
	dw $000A,$000B,$0002,$0000,$0000,$000C,$0002,$0000
	dw $0000,$0000,$0000,$000D,$000E,$0007,$001F,$0002

DATA_83DCC4:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$8000,$8000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0002,$0002,$8003,$8003,$8003,$8003,$8003,$8003
	dw $0000,$0002,$0000,$0000,$1045,$0000,$0000,$1064
	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,$0002,$0000
	dw $000F,$0012,$0013,$0002,$0010,$0011,$0012,$0013

DATA_83DD44:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0014,$0015,$0000,$0016,$0017,$0018,$001A
	dw $0019,$0000,$0022,$001B,$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,$0002,$0002,$0002,$0001,$0001,$0000
	dw $0000,$0002,$0000,$0000,$0000,$0000,$0000,$0000

DATA_83DDC4:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0002
	dw $101C,$101D,$101E,$0001,$0001,$0000,$0000,$1021
	dw $0001,$0001,$0001,$0002,$0001,$0001,$0001,$0001
	dw $0000,$1023,$1024,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0000,$0001,$0001,$0001,$1028,$1020,$0001
	dw $0002,$0000,$0000,$0000,$0002,$0000,$0000,$0000
	dw $0000,$0001,$0018,$0002,$0000,$001C,$0001,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$001A

DATA_83DE44:
	dw $0000,$8002,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$8002,$0001,$0001,$0001,$0000,$0000
	dw $0000,$0001,$0000,$0000,$0000,$0000,$1003,$1004
	dw $0001,$0001,$0001,$1005,$0001,$0001,$0001,$0001
	dw $0001,$1006,$0001,$0001,$0001,$0000,$1007,$1008
	dw $0002,$0001,$0001,$0001,$0000,$1009,$0001,$0000
	dw $100A,$100B,$0001,$0001,$0001,$000C,$0001,$0001
	dw $0001,$0001,$0001,$100D,$100E,$1007,$101F,$0001

DATA_83DEC4:
	dw $0000,$0000,$0000,$0000,$0001,$0000,$8000,$8010
	dw $8002,$0000,$0001,$8001,$0001,$0001,$0001,$0002
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0002,$0002,$0002,$0000,$0000,$0000,$0000,$0001
	dw $0000,$0000,$0029,$0000,$0000,$0000,$001C,$0001
	dw $8002,$0001,$0000,$800D,$0000,$800D,$0000,$800A
	dw $800A,$0000,$800A,$800B,$800C,$0000,$0000,$0001
	dw $0002,$0000,$0000,$0000,$8003,$8003,$8003,$8003

DATA_83DF44:
	dw $0001,$0001,$1087,$1088,$0001,$0001,$0001,$1089
	dw $0001,$1046,$1047,$0001,$0000,$0000,$0000,$0000
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$107A,$0001,$1089
	dw $1080,$1081,$1082,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

DATA_83DFC4:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0031,$0002,$0000,$0000,$0032,$0002
	dw $0000,$0000,$0033,$0002,$0000,$0000,$0034,$0002
	dw $0000,$0035,$0036,$0002,$0000,$0037,$0038,$0002
	dw $0000,$0000,$0039,$003A,$0002,$0000,$0000,$003B
	dw $003C,$0002,$0000,$003D,$0000,$0000,$003E,$0000
	dw $0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002

DATA_83E044:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $103F,$1040,$1041,$1042,$0001,$0001,$0001,$0001
	dw $1043,$1044,$0001,$0001,$1045,$0001,$1045,$0001
	dw $1046,$1047,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$305A,$305B,$305C,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0000,$0000,$1041,$0000,$0000
	dw $0000,$0000,$0063,$0004,$0008,$0001,$0002,$0000
	dw $8002,$8002,$305D,$305E,$3062,$3060,$3061,$3062

DATA_83E0C4:
	dw $0000,$0001,$0000,$0000,$0000,$0000,$0000,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0001,$0000,$0000
	dw $0000,$0000,$0000,$0001,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0001,$0001
	dw $0000,$0001,$0001,$0000,$0001,$0001,$0001,$0001
	dw $005F,$0001,$0001,$0002,$005F,$0001,$0001,$0002
	dw $0002,$005F,$0001,$0001,$0002,$0002,$0002,$0071
	dw $1055,$1056,$1057,$0001,$0001,$0001,$0001,$8002

DATA_83E144:
	dw $0000,$0000,$0000,$0000,$0000,$0072,$8000,$0002
	dw $8002,$0000,$0001,$8001,$0001,$0001,$0001,$0002
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0002,$0002,$0002,$0000,$0000,$0000,$0000,$0001
	dw $0000,$0000,$0029,$0000,$0000,$0000,$001C,$0001
	dw $8002,$0001,$800D,$800D,$0000,$800D,$0000,$0000
	dw $0000,$0000,$800A,$800B,$800C,$0000,$0000,$0001
	dw $0002,$0000,$0001,$0000,$8003,$8003,$8003,$8003

DATA_83E1C4:
	dw $0001,$0001,$103F,$1040,$1041,$1042,$0001,$0001
	dw $1043,$1044,$0001,$1045,$0001,$1046,$1047,$0001
	dw $0001,$0001,$0001,$0001,$0000,$0000,$0000,$1045
	dw $0001,$104A,$104B,$104C,$0000,$104D,$0001,$104E
	dw $104F,$1050,$1051,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0000,$0000,$0000,$0000,$1045
	dw $0001,$0001,$0001,$0001,$1048,$1052,$1053,$0001
	dw $0001,$0001,$0001,$0000,$0000,$1041,$0001,$0001

DATA_83E244:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$1065,$1066,$0000,$0000
	dw $0001,$0001,$1067,$1068,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1069,$106A,$106B,$106C,$106D,$0001,$0001,$0014
	dw $0000,$0000,$0000,$0000,$0000,$0000,$006E,$006E
	dw $0002,$0002,$006F,$0070,$0000,$0002,$0002,$0001

DATA_83E2C4:
	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,$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,$0000,$0000,$0000,$0000,$0000,$0000

DATA_83E344:
	dw $0001,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0001,$0000,$0000
	dw $0000,$0000,$0000,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$1055,$1056,$1057,$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,$0054,$0058,$0054

DATA_83E3C4:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$108A
	dw $108A,$1074,$1075,$1076,$1077,$0001,$0001,$0001
	dw $1078,$1079,$0001,$0001,$108A,$107B,$0001,$107C
	dw $107D,$0001,$0001,$107E,$0001,$107F,$0001,$0001
	dw $0001,$0001,$0001,$1083,$1084,$1085,$1086,$0001
	dw $0001,$0001,$0001,$0001,$1087,$1088,$1089,$0001
	dw $1046,$1047,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0000

DATA_83E444:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0031
	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,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

DATA_83E4C4:
	dw $0001,$0001,$1029,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$1029,$1029
	dw $1029,$1029,$1029,$0001,$0001,$0001,$0001,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0001,$0001
	dw $0001,$0000,$0000,$0001,$0001,$8002,$108E,$0001
	dw $1083,$1084,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$008B,$008C,$008D,$0002,$0002,$0002

DATA_83E544:
	dw $1090,$0001,$0001,$0001,$0001,$1091,$1092,$0001
	dw $0001,$0001,$0001,$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,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0001
	dw $0001,$0001,$0001,$0001,$0000,$0000,$0000,$0000

DATA_83E5C4:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$800A,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$800A,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$8011
	dw $8011,$8011,$8011,$8011,$8011,$8011,$8011,$0000
	dw $8011,$8011,$8011,$8011,$8011,$8011,$8011,$8011

DATA_83E644:
	dw $0000,$8007,$8007,$8007,$8002,$8007,$8001,$8007
	dw $0001,$0001,$0000,$8003,$8003,$8003,$8003,$8003
	dw $103F,$1040,$1041,$1042,$0001,$0001,$0001,$1043
	dw $1044,$1045,$0001,$1046,$1047,$0001,$0002,$0002
	dw $0000,$0043,$0044,$0002,$0045,$0002,$0046,$0047
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0001,$0001,$0001,$0001,$0001,$1043,$0001,$0001
	dw $0001,$1045,$0001,$0000,$0000,$0000,$0000,$0000

DATA_83E6C4:
	dw $1043,$1044,$1045,$1046,$1047,$800D,$0045,$0059
	dw $0002,$1045,$0001,$0000,$0000,$0000,$0002,$0000

DATA_83E6E4:
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$1043
	dw $0001,$0001,$1045,$305B,$0001,$0000,$0000,$0000

DATA_83E704:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$8002,$8002
	dw $8002,$8002,$0001,$0001,$0001,$1073,$1073,$0001

DATA_83E724:
	dw $0001,$0001,$0001,$1087,$1089,$1087,$1088,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

DATA_83E744:
	dw $1093,$1094,$0001,$0001,$0001,$0001,$0001,$0001
	dw $1093,$0001,$0001,$1093,$1094,$0001,$0001,$108F

DATA_83E764:
	dw $0000,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0000,$0000,$0000,$0000,$1093,$1094,$0001,$0001
	dw $0000,$0000,$0000,$0000,$0000,$1095,$1096,$1097
	dw $1098,$0001,$0001,$0001,$0001,$0001,$0000,$0000
	dw $1099,$109A,$0001,$0001,$0000,$109B,$0001,$0000
	dw $109C,$109D,$0000,$109E,$109F,$0000,$0000,$0001
	dw $10A0,$10A1,$10A2,$0001,$10A3,$10A4,$10A5,$10A6
	dw $10A7,$0001,$0001,$0001,$0000,$0000,$0000,$0000

DATA_83E7E4:
	dw $0000,$0000,$0000,$0000,$0001,$0001,$8000,$0000
	dw $0000,$10A8,$10A9,$10AA,$10AB,$10AC,$0000,$0000
	dw $0001,$10AD,$10AE,$10AF,$0000,$0000,$0001,$10B0
	dw $10B1,$0000,$10B2,$10B3,$0001,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001

DATA_83E864:
	dw $0001,$0001,$0001,$0001,$0000,$0000,$0001,$0001
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1088,$1088,$0000,$0001,$0000,$0001,$0000,$0001
	dw $0001,$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 $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

DATA_83E8E4:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$1094,$1093
	dw $1094,$1093,$1094,$0001,$0001,$0001,$0001,$0000
	dw $0000,$8007,$8007,$8007,$8007,$8007,$8007,$8007
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0001,$0001,$0001,$0001,$109B
	dw $0001,$10B4,$0001,$0001,$8002,$8002,$0000,$0000
	dw $1098,$0000,$0000,$1095,$1096,$1097,$1098,$0001

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

DATA_83E964:
	dw $0010,$0010,$000E,$000D,$000C,$000C,$000B,$000A
	dw $000A,$0009,$0009,$0008,$0008,$0007,$0006,$0006
	dw $0006,$0006,$0005,$0005,$0004,$0004,$0003,$0003
	dw $0003,$0002,$0002,$0002,$0001,$0001,$0000,$0000
	dw $0006,$0006,$0005,$0005,$0004,$0004,$0004,$0003
	dw $0003,$0002,$0002,$0001,$0001,$0001,$0001,$0001
	dw $0010,$0010,$000F,$000E,$000D,$000C,$000B,$000A
	dw $0009,$0007,$0006,$0005,$0003,$0002,$0000,$0000
	dw $0011,$0011,$0011,$0011,$000F,$000D,$000C,$000A
	dw $0008,$0007,$0006,$0004,$0002,$0001,$0000,$0000
	dw $0009,$0005,$0003,$0001,$0000,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0010,$000E,$000C,$000A,$0008,$0007,$0006,$0005
	dw $0004,$0003,$0002,$0002,$0001,$0001,$0000,$0000
	dw $0010,$0010,$000F,$000E,$000E,$000E,$000D,$000D
	dw $000D,$000C,$000C,$000B,$000B,$000A,$000A,$0009
	dw $0009,$0009,$0008,$0007,$0007,$0006,$0005,$0005
	dw $0004,$0003,$0003,$0002,$0001,$0001,$0001,$0001
	dw $0004,$0004,$0005,$0006,$0006,$0007,$0007,$0007
	dw $0007,$0006,$0006,$0005,$0004,$0003,$0000,$0000
	dw $0006,$0006,$0007,$0007,$0007,$0008,$0008,$0009
	dw $0009,$0009,$000A,$000A,$000B,$000C,$000E,$0010
	dw $0000,$0000,$0000,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007,$0008,$0009,$000A,$000C,$000E,$0010
	dw $000C,$000C,$000C,$000C,$000C,$000C,$000C,$000C
	dw $000C,$000C,$000C,$000C,$000C,$000C,$000C,$000C
	dw $0010,$0010,$0010,$000F,$000F,$000F,$000E,$000E
	dw $000E,$000E,$000E,$000D,$000D,$000D,$000D,$000D
	dw $000C,$000C,$000C,$000C,$000C,$000B,$000B,$000B
	dw $000B,$000B,$000A,$000A,$000A,$000A,$0009,$0009
	dw $0009,$0009,$0008,$0008,$0008,$0007,$0007,$0006
	dw $0006,$0005,$0005,$0004,$0004,$0003,$0003,$0003
	dw $0002,$0002,$0002,$0002,$0001,$0001,$0001,$0001
	dw $0001,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0010,$0010,$000F,$000F,$000C,$000A,$0008,$0007
	dw $0006,$0005,$0004,$0004,$0004,$0004,$0004,$0004
	dw $0004,$0004,$0006,$0006,$0008,$0008,$000B,$000B
	dw $000D,$000D,$0010,$0011,$0011,$0011,$0011,$0011
	dw $FFF4,$FFF4,$FFF6,$FFF6,$FFF8,$FFF8,$FFFB,$FFFB
	dw $FFFD,$FFFD,$0000,$0001,$0002,$0003,$0004,$0004
	dw $0004,$0004,$0004,$0005,$0005,$0005,$0005,$0005
	dw $0005,$0005,$0005,$0005,$0005,$0004,$0004,$0004
	dw $0011,$0011,$0011,$0010,$0010,$000F,$000E,$000E
	dw $000E,$000E,$000F,$000F,$0010,$0011,$0011,$0011
	dw $0010,$000E,$000C,$000B,$000A,$0009,$0009,$0008
	dw $0007,$0007,$0006,$0005,$0005,$0004,$0004,$0004
	dw $0004,$0004,$0002,$0000,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$0000,$0002,$0004,$0004
	dw $0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dw $0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dw $0004,$0004,$0004,$0005,$0005,$0005,$0005,$0006
	dw $0006,$0006,$0006,$0006,$0007,$0007,$0007,$0007
	dw $0007,$0007,$0007,$0008,$0008,$0008,$0008,$0008
	dw $0008,$0009,$0009,$0009,$0009,$0009,$000A,$000A
	dw $000A,$000A,$000A,$000B,$000B,$000B,$000B,$000B
	dw $000C,$000C,$000C,$000C,$000C,$000D,$000E,$0010
	dw $0010,$000A,$0006,$0003,$0000,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0000,$0000,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$0007,$0007
	dw $0011,$0011,$000B,$0009,$0008,$0007,$0006,$0005
	dw $0004,$0003,$0003,$0002,$0001,$0001,$0000,$0000
	dw $0004,$0004,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $000F,$000F,$000F,$000F,$000F,$000F,$000F,$000F
	dw $0010,$0010,$0010,$0010,$0010,$0010,$0011,$0011
	dw $0011,$0011,$0011,$000D,$000B,$000A,$0009,$0008
	dw $0007,$0006,$0006,$0005,$0005,$0004,$0003,$0002
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0011,$0011,$0011,$0010,$000E,$000D,$000C,$000B
	dw $000B,$000A,$000A,$0009,$0009,$0008,$0008,$0008
	dw $0007,$0006,$0006,$0005,$0005,$0004,$0004,$0003
	dw $0002,$0001,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0010,$0010,$000E,$000E,$0007,$0007,$0007,$0007
	dw $0008,$0008,$0009,$0009,$000A,$000C,$0011,$0011
	dw $000F,$000C,$000A,$0008,$0007,$0006,$0005,$0004
	dw $0004,$0003,$0003,$0002,$0002,$0001,$0000,$0000
	dw $0010,$000C,$0008,$0004,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0010,$000C,$0008,$0004
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $0010,$000C,$0008,$0004,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $0011,$0011,$0011,$0011,$0010,$000C,$0008,$0004
	dw $0010,$000E,$000C,$000A,$0008,$0006,$0004,$0002
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $0010,$000E,$000C,$000A,$0008,$0006,$0004,$0002
	dw $0010,$000F,$000E,$000D,$000C,$000B,$000A,$0009
	dw $0008,$0007,$0006,$0005,$0004,$0003,$0002,$0001
	dw $0007,$0007,$0006,$0006,$0005,$0005,$0004,$0004
	dw $0004,$0004,$0005,$0005,$0006,$0007,$0008,$0008
	dw $0008,$0008,$0008,$0008,$0007,$0006,$0006,$0007
	dw $0007,$0008,$0009,$0009,$0008,$0006,$0005,$0005
	dw $0005,$0005,$0004,$0003,$0002,$0002,$0001,$0001
	dw $0001,$0001,$0002,$0002,$0002,$0003,$0004,$0004
	dw $0004,$0004,$0005,$0007,$0009,$000A,$000B,$000B
	dw $000B,$000C,$000A,$0009,$0008,$0008,$0007,$0007
	dw $0011,$0011,$0010,$000E,$000D,$000C,$000B,$000B
	dw $000A,$0009,$0009,$0008,$0008,$0008,$0007,$0007
	dw $0004,$0004,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0010,$000E
	dw $000C,$000B,$000A,$0009,$0007,$0006,$0005,$0005
	dw $0008,$0008,$0007,$0005,$0004,$0003,$0001,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0010,$000F,$000E,$000D
	dw $000C,$000B,$000B,$000B,$000A,$0009,$0008,$0008
	dw $0007,$0007,$0005,$0003,$0001,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0011,$0011,$000E,$000B
	dw $0009,$0007,$0006,$0005,$0005,$0004,$0004,$0004
	dw $0005,$0005,$0004,$0004,$0003,$0001,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$000C,$000A,$0008,$0007,$0007,$0006
	dw $0005,$0004,$0003,$0003,$0002,$0002,$0001,$0001
	dw $0001,$0001,$0001,$0001,$0002,$0002,$0003,$0003
	dw $0004,$0005,$0006,$0006,$0006,$0007,$0007,$0007
	dw $0000,$0000,$0000,$0001,$0001,$0002,$0002,$0003
	dw $0003,$0003,$0004,$0004,$0005,$0005,$0006,$0006
	dw $0006,$0006,$0007,$0007,$0008,$0008,$0008,$0009
	dw $0009,$0009,$0009,$000A,$000A,$000A,$000A,$000A
	dw $000B,$000B,$000B,$000B,$000B,$000B,$000B,$000B
	dw $000B,$000C,$000C,$000C,$000C,$000C,$000D,$000D
	dw $000D,$000D,$000D,$000E,$000E,$000E,$000E,$000F
	dw $000F,$000F,$000F,$0010,$0010,$0010,$0010,$0010
	dw $0000,$0000,$0001,$0002,$0002,$0003,$0003,$0004
	dw $0004,$0005,$0005,$0006,$0007,$0007,$0008,$0008
	dw $0009,$0009,$000A,$000A,$000B,$000B,$000C,$000C
	dw $000D,$000D,$000E,$000E,$000F,$000F,$0010,$0010
	dw $0000,$0000,$0002,$0003,$0005,$0006,$0007,$0009
	dw $000A,$000B,$000C,$000D,$000E,$000F,$0010,$0010
	dw $0000,$0000,$0003,$0006,$0009,$000D,$0010,$0010
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$0000,$0000
	dw $0001,$0001,$0003,$0006,$0009,$000D,$0010,$0010
	dw $0010,$000F,$000D,$000C,$000A,$000A,$0007,$0004
	dw $0002,$0001,$0001,$0001,$0000,$0000,$0000,$0000
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $0011,$0011,$0011,$000E,$000D,$000B,$0009,$0009
	dw $0008,$0008,$0006,$0005,$0004,$0003,$0002,$0002
	dw $0003,$0005,$0007,$0008,$0009,$000A,$000C,$000C
	dw $000D,$000D,$000E,$000F,$0010,$0011,$0011,$0011
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $0011,$0011,$0011,$0011,$0011,$0011,$000C,$0009
	dw $0006,$0004,$0001,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$0001,$0001,$0002
	dw $0003,$0003,$0004,$0004,$0005,$0005,$0006,$0006
	dw $0006,$0006,$0007,$0007,$0007,$0008,$0008,$0008
	dw $0009,$0009,$0009,$0009,$0009,$0009,$000A,$000A
	dw $000A,$000A,$000A,$000A,$000A,$000A,$000A,$000B
	dw $000B,$000B,$000B,$000B,$000B,$000B,$000B,$000B
	dw $0010,$0010,$000E,$000C,$0009,$0005,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0000,$0000,$0002,$0003,$0006,$0008,$0008,$0008
	dw $0008,$0008,$0007,$0007,$0006,$0006,$0005,$0006
	dw $0006,$0006,$0007,$0008,$0009,$0009,$0007,$0004
	dw $0002,$0001,$0001,$0001,$0000,$0000,$0000,$0000
	dw $0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dw $0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dw $0000,$0000,$0001,$0002,$0002,$0002,$0003,$0003
	dw $0003,$0009,$0009,$0008,$0008,$0009,$000B,$000B
	dw $000B,$000C,$000A,$0008,$0008,$0009,$0009,$000A
	dw $000A,$000B,$000B,$000E,$000F,$000F,$0010,$0010
	dw $0000,$0001,$0002,$0003,$0004,$0004,$0003,$0003
	dw $0005,$0007,$0009,$000C,$000E,$000F,$000F,$0010
	dw $0006,$0006,$0005,$0005,$0004,$0004,$0003,$0003
	dw $0002,$0002,$0001,$0001,$0000,$0000,$0000,$0000
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0000,$0000,$0001,$0001,$0002,$0002,$0003,$0003
	dw $000E,$000C,$0009,$0007,$0006,$0005,$0004,$0003
	dw $0003,$0004,$0004,$0005,$0006,$0007,$0008,$0008
	dw $0000,$0000,$0000,$0001,$0002,$0003,$0003,$0004
	dw $0004,$0004,$0005,$0005,$0006,$0007,$0008,$0008
	dw $0008,$0008,$0007,$0006,$0005,$0005,$0005,$0006
	dw $0006,$0006,$0005,$0003,$0002,$0001,$0000,$0000
	dw $000E,$000D,$000B,$000A,$000A,$0009,$0009,$0008
	dw $0008,$0008,$0008,$0009,$000A,$000B,$000C,$000C
	dw $000C,$000C,$000B,$000A,$0009,$0009,$0009,$000A
	dw $000A,$000B,$000B,$000A,$0009,$0007,$0006,$0006
	dw $0000,$0000,$0002,$0003,$0004,$0005,$0006,$0007
	dw $0009,$000A,$000B,$000C,$000D,$000E,$0010,$0010
	dw $0010,$0010,$000E,$000D,$000D,$000C,$000C,$000C
	dw $000C,$000C,$000D,$000D,$000E,$000F,$000E,$000E
	dw $000E,$000E,$000E,$000D,$000D,$000D,$000D,$000E
	dw $000F,$000E,$000E,$000D,$000C,$000B,$000A,$000A
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0010,$000E,$000C,$000B
	dw $000A,$0009,$0008,$0008,$0007,$0007,$0006,$0006
	dw $0000,$0000,$0002,$0004,$0005,$0005,$0004,$0002
	dw $0001,$0001,$0002,$0003,$0003,$0002,$0000,$0000
	dw $0010,$0010,$000F,$000F,$000E,$000D,$000D,$000C
	dw $000C,$000B,$000B,$000B,$000A,$000A,$000A,$000A
	dw $000A,$000A,$000A,$000B,$000B,$000B,$000C,$000C
	dw $000D,$000D,$000E,$000E,$000F,$000F,$0010,$0010
	dw $0000,$0000,$0001,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0007,$0007,$0008,$0008,$0008,$0008,$0008
	dw $0008,$0008,$0007,$0007,$0007,$0006,$0006,$0005
	dw $0004,$0003,$0003,$0002,$0001,$0001,$0000,$0000
	dw $0010,$0010,$000F,$000E,$000D,$000C,$000B,$000B
	dw $000A,$000A,$000A,$000A,$000B,$000B,$000C,$000C
	dw $000C,$000C,$000D,$000E,$000F,$0010,$0011,$0011
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $0010,$0010,$000F,$000E,$000D,$000C,$000C,$000C
	dw $000C,$000D,$000E,$000E,$000C,$000A,$0009,$0009
	dw $0009,$0009,$000A,$000A,$000B,$000B,$000B,$000C
	dw $000C,$000D,$000D,$000D,$000E,$000E,$000E,$000E
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$0000,$0002,$0003
	dw $0004,$0004,$0004,$0003,$0002,$0001,$0000,$0000
	dw $0008,$0008,$0008,$0009,$0009,$000A,$000A,$000B
	dw $000B,$000C,$000D,$000E,$000F,$0010,$0011,$0011
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $000E,$000D,$000C,$000B,$000A,$0009,$0008,$0008
	dw $0008,$0008,$0007,$0006,$0006,$0005,$0005,$0004
	dw $0004,$0004,$0004,$0005,$0006,$0008,$000A,$0011
	dw $0000,$0000,$0002,$0003,$0004,$0006,$0008,$0008
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $000A,$000A,$0008,$0006,$0006,$0006,$0006,$0006
	dw $0005,$0005,$0004,$0003,$0003,$0002,$0002,$0002
	dw $0000,$0000,$0001,$0001,$0001,$0003,$0005,$0005
	dw $0006,$0007,$0008,$000A,$000D,$000E,$0010,$0010
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0001,$0001
	dw $0001,$0001,$0001,$0002,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0002,$0003,$0003,$0003,$0003,$0003
	dw $0004,$0004,$0004,$0005,$0005,$0005,$0006,$0006
	dw $0006,$0006,$0006,$0007,$0007,$0007,$0008,$0008
	dw $0009,$0009,$000A,$000A,$000B,$000B,$000C,$000C
	dw $000C,$000C,$000D,$000D,$000E,$000E,$000F,$000F
	dw $0010,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$0001,$0001,$0002,$0003,$0004,$0005,$0005
	dw $0005,$0005,$0006,$0007,$0008,$0008,$0009,$000A
	dw $000B,$000C,$000D,$000E,$000F,$000F,$0011,$0011
	dw $0000,$0000,$0002,$0001,$0001,$0002,$0003,$0003
	dw $0002,$0002,$0003,$0004,$0004,$0005,$0006,$0006
	dw $0002,$0002,$0004,$0005,$0006,$0007,$0009,$000A
	dw $000C,$000D,$000F,$000F,$0011,$0011,$0011,$0011
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$0002,$0002,$0007,$0007
	dw $0007,$0007,$000A,$000F,$000F,$0011,$0011,$0011
	dw $0011,$0011,$0011,$0011,$0011,$0011,$0011,$0011
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$0003,$0003,$0007
	dw $000A,$000E,$000E,$0011,$0011,$0011,$0011,$0011
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$0003,$0003,$0009,$000C,$000F
	dw $0000,$0000,$0001,$0002,$0003,$0003,$0002,$0002
	dw $0002,$0002,$0003,$0003,$0004,$0005,$0006,$0006
	dw $0006,$0006,$0007,$0007,$0008,$0008,$0008,$0009
	dw $0009,$0009,$0009,$000A,$000B,$000E,$0010,$0010
	dw $0000,$0000,$0001,$0002,$0003,$0003,$0003,$0003
	dw $0003,$0003,$0002,$0002,$0002,$0002,$0002,$0002
	dw $0000,$0000,$0001,$0003,$0003,$0002,$0001,$0001
	dw $0002,$0002,$0003,$0004,$0004,$0003,$0004,$0004
	dw $0004,$0004,$0005,$0005,$0006,$0004,$0004,$0005
	dw $0006,$0006,$0007,$0006,$0007,$0007,$0008,$0008
	dw $0008,$0008,$0009,$000A,$000A,$0008,$0009,$000B
	dw $000C,$000D,$000B,$000B,$000A,$000C,$000C,$000C
	dw $000C,$000C,$000D,$000E,$000D,$000D,$000E,$000F
	dw $000F,$000D,$000E,$000F,$000F,$000F,$0010,$0010
	dw $0000,$0000,$0001,$0003,$0004,$0004,$0003,$0003
	dw $0005,$0006,$0007,$0007,$0005,$0005,$0008,$0008
	dw $0008,$0008,$0009,$000A,$000B,$0009,$0009,$000B
	dw $000D,$000E,$000E,$000C,$000C,$000F,$0010,$0010
	dw $0000,$0000,$0002,$0003,$0005,$0007,$0007,$0006
	dw $0008,$000B,$000C,$000C,$000A,$000D,$0010,$0010
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$0002,$0002
	dw $0009,$0009,$0009,$000A,$000A,$000A,$000B,$000B
	dw $000C,$000D,$000E,$000E,$000D,$000C,$000B,$000B
	dw $000B,$000B,$000A,$000A,$000A,$000A,$000A,$000B
	dw $000C,$000C,$000B,$000A,$0009,$0009,$0008,$0008
	dw $0008,$0008,$0007,$0007,$0006,$0006,$0007,$0007
	dw $0008,$0009,$000A,$000B,$000C,$000E,$0010,$0010
	dw $0000,$0000,$0001,$0001,$0002,$0002,$0002,$0002
	dw $0003,$0003,$0002,$0002,$0001,$0001,$0000,$0000
	dw $0010,$0010,$0010,$0010,$0010,$0010,$0010,$0010
	dw $0010,$0010,$000F,$000F,$000F,$000F,$000E,$000E
	dw $000E,$000E,$000E,$000E,$000D,$000D,$000D,$000D
	dw $000D,$000D,$000D,$000D,$000D,$000D,$000D,$000D
	dw $0010,$0010,$000F,$000F,$000E,$000E,$000D,$000D
	dw $000D,$000C,$000C,$000C,$000B,$000B,$000B,$000B
	dw $000B,$000B,$000A,$000A,$000A,$000A,$000A,$0009
	dw $0009,$0009,$0009,$0009,$0009,$0009,$0009,$0009
	dw $0000,$0000,$0001,$0002,$0002,$0002,$0002,$0002
	dw $0003,$0003,$0003,$0002,$0002,$0001,$0000,$0000
	dw $0000,$0000,$0001,$0001,$0002,$0002,$0002,$0002
	dw $0002,$0002,$0001,$0001,$0001,$0001,$0000,$0000
	dw $0000,$0000,$0001,$0001,$0002,$0002,$0003,$0003
	dw $0003,$0002,$0001,$0001,$0002,$0003,$0004,$0004
	dw $0004,$0004,$0005,$0005,$0006,$0007,$0007,$0007
	dw $0007,$0008,$0008,$0008,$0007,$0007,$0008,$0008
	dw $0008,$0008,$0009,$0009,$0009,$000A,$000A,$000B
	dw $000B,$000B,$000C,$000C,$000C,$000C,$000C,$000C
	dw $000C,$000C,$000D,$000D,$000E,$000E,$000F,$000F
	dw $000F,$0010,$0010,$0010,$0010,$0010,$0010,$0010
	dw $0000,$0000,$0001,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0006,$0006,$0007,$0007,$0007,$0008,$0008
	dw $0008,$0008,$0009,$0009,$000A,$000B,$000B,$000B
	dw $000C,$000C,$000D,$000D,$000E,$000F,$0010,$0010
	dw $0000,$0000,$0001,$0002,$0004,$0005,$0006,$0007
	dw $0008,$0008,$000A,$000B,$000D,$000F,$0010,$0010
	dw $0000,$0000,$0001,$0002,$0003,$0004,$0005,$0005
	dw $0006,$0006,$0007,$0008,$0009,$000B,$000D,$000D
	dw $000D,$000D,$000E,$000F,$0010,$0011,$0012,$0013
	dw $0014,$0014,$0014,$0015,$0016,$0017,$0018,$0018
	dw $FFFD,$FFFD,$FFFE,$FFFF,$0000,$0001,$0002,$0003
	dw $0004,$0004,$0004,$0005,$0006,$0007,$0008,$0008
	dw $0008,$0008,$0009,$0009,$000A,$000A,$000B,$000C
	dw $000D,$000E,$000F,$000F,$0010,$0011,$0012,$0012
	dw $FFF8,$FFF8,$FFF9,$FFF9,$FFFA,$FFFA,$FFFB,$FFFC
	dw $FFFD,$FFFE,$FFFF,$FFFF,$0000,$0001,$0002,$0002
	dw $0002,$0002,$0003,$0003,$0004,$0004,$0005,$0005
	dw $0006,$0007,$0008,$0009,$000A,$000A,$000A,$000A
	dw $000A,$000A,$000B,$000B,$000B,$000B,$000C,$000C
	dw $000C,$000D,$000D,$000D,$000E,$000F,$0010,$0010
	dw $0000,$0000,$0001,$0001,$0001,$0002,$0002,$0003
	dw $0004,$0005,$0006,$0006,$0005,$0005,$0006,$0006
	dw $0006,$0006,$0007,$0007,$0008,$0008,$0009,$0009
	dw $0009,$0008,$0007,$0007,$0008,$0009,$000A,$000A
	dw $000A,$000A,$000A,$000B,$000B,$000B,$000C,$000C
	dw $000C,$000D,$000E,$000E,$000E,$000E,$000E,$000E
	dw $000E,$000E,$000E,$000E,$000E,$000D,$000D,$000D
	dw $000D,$000D,$000E,$000F,$0010,$0010,$0010,$0010
	dw $0010,$0010,$000F,$000F,$000F,$000F,$000F,$000F
	dw $000F,$000F,$0010,$0010,$0010,$0010,$0010,$0010
	dw $0000,$0000,$0001,$0001,$0002,$0003,$0004,$0005
	dw $0005,$0004,$0004,$0004,$0003,$0003,$0002,$0002
	dw $0002,$0002,$0002,$0003,$0003,$0004,$0004,$0004
	dw $0003,$0002,$0003,$0003,$0004,$0004,$0004,$0004
	dw $0004,$0004,$0004,$0004,$0005,$0005,$0005,$0006
	dw $0007,$0007,$0008,$0008,$0008,$0008,$0008,$0008
	dw $0008,$0008,$0009,$0009,$0009,$0009,$000A,$000A
	dw $000B,$000C,$000C,$000C,$000C,$000C,$000C,$000C
	dw $000C,$000C,$000D,$000D,$000E,$000E,$000D,$000D
	dw $000E,$000F,$0010,$0010,$0010,$0010,$0011,$0011
	dw $FFFC,$FFFC,$FFFD,$FFFD,$FFFE,$FFFE,$FFFD,$FFFD
	dw $FFFE,$FFFF,$0000,$0000,$0000,$0000,$0001,$0001
	dw $0001,$0001,$0002,$0002,$0003,$0004,$0005,$0006
	dw $0006,$0006,$0006,$0006,$0007,$0007,$0008,$0008
	dw $0008,$0008,$0009,$0009,$000A,$000B,$000C,$000D
	dw $000D,$000E,$000E,$000E,$000F,$000F,$0010,$0010
	dw $0000,$0000,$0001,$0001,$0002,$0003,$0004,$0005
	dw $0006,$0006,$0007,$0007,$0008,$0008,$0009,$0009
	dw $0009,$0009,$000A,$000A,$000B,$000C,$000D,$000F
	dw $0010,$0011,$0012,$0012,$0013,$0013,$0014,$0014
	dw $FFF9,$FFF9,$FFFA,$FFFA,$FFFB,$FFFC,$FFFD,$FFFF
	dw $0000,$0001,$0002,$0002,$0003,$0003,$0004,$0004
	dw $0004,$0004,$0005,$0006,$0007,$0009,$000B,$000C
	dw $000D,$000D,$000E,$000E,$000F,$000F,$0010,$0010
	dw $0010,$0010,$000F,$000D,$000B,$000A,$0009,$0009
	dw $0008,$0008,$0007,$0007,$0007,$0006,$0006,$0006
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	dw $4FD2,$0EE1,$EE00,$E0B4,$DC34,$F341,$E04F,$A441
	dw $FBC0,$3CF2,$4FB4,$FAE2,$00B4,$0FFD,$0C05,$1102
	dw $A422,$37FC,$00FE,$32DE,$33BD,$DFA4,$E11E,$E0ED
	dw $37EF,$A4AB,$0161,$C171,$E261,$D11C,$4EA4,$4EB1
	dw $1DE1,$FBF1,$A411,$75BD,$518D,$71D3,$52C0,$B394
	dw $943B,$937D,$132D,$A4FC,$FEF1,$DFE2
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F) != $00
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0011,$0011,$0011,$0011,$0010,$000E,$000C,$000B
	dw $000A,$0009,$0008,$0008,$0007,$0007,$0006,$0006
	dw $0000,$0000,$0002,$0004,$0005,$0005,$0004,$0002
	dw $0001,$0001,$0002,$0003,$0003,$0002
else
	dw $F000,$0009,$F000,$000C,$F000,$000D,$F000,$000E
	dw $F000,$000F,$F000,$0010,$F000,$0010,$F000,$000D
	dw $F000,$000A,$F000,$0009,$F000,$0008,$F000,$0007
	dw $F000,$0006,$F000,$0006,$F000,$FFFF,$F000,$FFFF
	dw $F000,$FFFF,$F000,$FFFF,$F000,$FFFF,$F000,$FFFF
	dw $F000,$FFFF,$F000,$FFFF,$F000,$FAFF
endif

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

%BANK_END(<EndBank>)
endmacro

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

macro PLOKBank84Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
	%DATATABLE_PLOK_FrenchTextStrings(NULLROM)
endif

PLOK_UncompressedGFX_AnimatedTiles_CottonIsland:
;$848000
	incbin "Graphics/GFX_AnimatedTiles_CottonIsland.bin"

PLOK_UncompressedGFX_AnimatedTiles_CloudyBonusLevel:
;$849000
	incbin "Graphics/GFX_AnimatedTiles_CloudBonusLevel.bin"

PLOK_UncompressedGFX_AnimatedTiles_AkrillicGarlenBeach:
;$84A000
	incbin "Graphics/GFX_AnimatedTiles_AkrillicGarlenBeach.bin"

PLOK_UncompressedGFX_AnimatedTiles_AkrillicSleepyDale:
;$84B000
	incbin "Graphics/GFX_AnimatedTiles_AkrillicSleepyDale.bin"

if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
else
PLOK_UncompressedGFX_AnimatedTiles_AkrillicCreepyForest:
;$84C000
	incbin "Graphics/GFX_AnimatedTiles_AkrillicCreepyForest.bin"

PLOK_UncompressedGFX_AnimatedTiles_Fleapit:
;$84D000
	incbin "Graphics/GFX_AnimatedTiles_Fleapit.bin"
endif

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
DATA_81D2E6:
	dw $0000,$0324,$0647,$096A,$0C8B,$0FAB,$12C8,$15E2
	dw $18F8,$1C0B,$1F19,$2223,$2528,$2826,$2B1F,$2E11
	dw $30FB,$33DE,$36BA,$398C,$3C56,$3F17,$41CE,$447A
	dw $471C,$49B4,$4C3F,$4EBF,$5133,$539B,$55F5,$5842
	dw $5A82,$5CB4,$5ED7,$60EC,$62F2,$64E8,$66CF,$68A6
	dw $6A6D,$6C24,$6DCA,$6F5F,$70E2,$7255,$73B5,$7504
	dw $7641,$776C,$7884,$798A,$7A7D,$7B5D,$7C29,$7CE3
	dw $7D8A,$7E1D,$7E9D,$7F09,$7F62,$7FA7,$7FD8,$7FF6
	dw $7FFF,$7FF6,$7FD8,$7FA7,$7F62,$7F09,$7E9D,$7E1D
	dw $7D8A,$7CE3,$7C29,$7B5D,$7A7D,$798A,$7884,$776C
	dw $7641,$7504,$73B5,$7255,$70E2,$6F5F,$6DCA,$6C24
	dw $6A6D,$68A6,$66CF,$64E8,$62F2,$60EC,$5ED7,$5CB4
	dw $5A82,$5842,$55F5,$539B,$5133,$4EBF,$4C3F,$49B4
	dw $471C,$447A,$41CE,$3F17,$3C56,$398C,$36BA,$33DE
	dw $30FB,$2E11,$2B1F,$2826,$2528,$2223,$1F19,$1C0B
	dw $18F8,$15E2,$12C8,$0FAB,$0C8B,$096A,$0647,$0324
	dw $0000,$FCDC,$F9B9,$F696,$F375,$F055,$ED38,$EA1E
	dw $E708,$E3F5,$E0E7,$DDDD,$DAD8,$D7DA,$D4E1,$D1EF
	dw $CF05,$CC22,$C946,$C674,$C3AA,$C0E9,$BE32,$BB86
	dw $B8E4,$B64C,$B3C1,$B141,$AECD,$AC65,$AA0B,$A7BE
	dw $A57E,$A34C,$A129,$9F14,$9D0E,$9B18,$9931,$975A
	dw $9593,$93DC,$9236,$90A1,$8F1E,$8DAB,$8C4B,$8AFC
	dw $89BF,$8894,$877C,$8676,$8583,$84A3,$83D7,$831D
	dw $8276,$81E3,$8163,$80F7,$809E,$8059,$8028,$800A
	dw $8001,$800A,$8028,$8059,$809E,$80F7,$8163,$81E3
	dw $8276,$831D,$83D7,$84A3,$8583,$8676,$877C,$8894
	dw $89BF,$8AFC,$8C4B,$8DAB,$8F1E,$90A1,$9236,$93DC
	dw $9593,$975A,$9931,$9B18,$9D0E,$9F14,$A129,$A34C
	dw $A57E,$A7BE,$AA0B,$AC65,$AECD,$B141,$B3C1,$B64C
	dw $B8E4,$BB86,$BE32,$C0E9,$C3AA,$C674,$C946,$CC22
	dw $CF05,$D1EF,$D4E1,$D7DA,$DAD8,$DDDD,$E0E7,$E3F5
	dw $E708,$EA1E,$ED38,$F055,$F375,$F696,$F9B9,$FCDC

	%InsertGarbageData(NULLROM, incbin, UNK_84E200_PLOK_J.bin)
	%InsertGarbageData(NULLROM, incbin, GFX_84E203_PLOK_J.bin)
	%InsertGarbageData(NULLROM, incbin, UNK_84E9C3_PLOK_J.bin)

elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E) != $00
UNK_84E000:
	%InsertGarbageData(NULLROM, incbin, UNK_84E000_PLOK_E.bin)
	%InsertGarbageData(NULLROM, incsrc, ADDR_84FEC6_PLOK_E.asm)
	%FREE_BYTES(NULLROM, 12, $FF)
else
	%FREE_BYTES(NULLROM, 1, $1F)
	%InsertGarbageData(NULLROM, incbin, GFX_84E001.bin)			; Note: Duplicate of most of the graphics at $84C000
	%InsertGarbageData(NULLROM, incsrc, ADDR_84FEA1_PLOK_U.asm)
	%FREE_BYTES(NULLROM, 298, $FF)
	%FREE_BYTES(NULLROM, 1, $FA)
endif
%BANK_END(<EndBank>)
endmacro

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

macro PLOKBank85Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

PLOK_UncompressedGFX_Bank85:
;$858000
	incbin "Graphics/GFX_858000.bin"

;--------------------------------------------------------------------

if !Define_Global_ROMToAssemble&(!ROM_PLOK_G|!ROM_PLOK_F) != $00
PLOK_UncompressedGFX_AnimatedTiles_AkrillicCreepyForest:
;$85CB20
	;incbin "Graphics/GFX_AnimatedTiles_AkrillicCreepyForest.bin"

PLOK_UncompressedGFX_AnimatedTiles_Fleapit:
;$85DB20
	;incbin "Graphics/GFX_AnimatedTiles_Fleapit.bin"
else

UNK_85C000:
	dw $0000,$0000,$0000,$0000,$9B4A,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$9B4A,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $9B4A,$0000,$0000,$0000,$0000,$0000,$1D02,$5D02
	dw $5D00,$1D00,$9B4A,$5D02,$5D00,$1D00,$1D02,$5D02
	dw $3D06,$7D06,$7D04,$3D04,$7D08,$7D06,$7D04,$3D04
	dw $3D06,$7D06,$0000,$0000,$0000,$0000,$9B4A,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $9B4A,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$9B4A,$0000,$0000,$0000,$0000,$0000
	dw $1D02,$5D02,$5D00,$1D00,$9B4A,$5D02,$5D00,$1D00
	dw $1D02,$5D02,$3D06,$7D06,$7D04,$3D08,$7D08,$3D08
	dw $7D04,$3D04,$3D06,$7D06,$0000,$0000,$0000,$0000
	dw $9B4A,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$9B4A,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$9B4A,$0000,$0000,$0000
	dw $0000,$0000,$1D02,$5D02,$5D00,$1984,$1962,$1964
	dw $5984,$1D00,$1D02,$5D02,$3D06,$7D06,$3D0A,$3D08
	dw $7D08,$3D08,$7D08,$7D0A,$3D06,$7D06,$0000,$0000
	dw $0000,$0000,$9B4A,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$9B4A,$1D0C,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$1984,$1962,$1964
	dw $5984,$0000,$0000,$0000,$1D02,$5D02,$5D00,$1986
	dw $1966,$196E,$5986,$1D00,$1D02,$5D02,$3D06,$7D06
	dw $3D0A,$3D08,$7D08,$3D08,$7D08,$7D0A,$3D06,$7D06
	dw $0000,$0000,$0000,$1D0C,$9B4A,$0000,$1D0C,$0000
	dw $0000,$0000,$0000,$0000,$0000,$1984,$1962,$1964
	dw $5984,$0000,$0000,$0000,$0000,$0000,$0000,$1986
	dw $1966,$196E,$5986,$0000,$0000,$0000,$1D02,$5D02
	dw $5D00,$1988,$196A,$596A,$5988,$1D00,$1D02,$5D02
	dw $3D06,$7D06,$3D0A,$3D08,$7D08,$3D08,$7D08,$7D0A
	dw $3D06,$7D06,$0000,$0000,$1D0C,$0000,$9B4A,$1D0C
	dw $0000,$1D0C,$0000,$0000,$0000,$0000,$1984,$1962
	dw $1964,$5964,$1964,$5984,$0000,$0000,$0000,$0000
	dw $198A,$1980,$1968,$5968,$1982,$598A,$0000,$0000
	dw $1D02,$5D02,$5D00,$1988,$196A,$596A,$5988,$1D00
	dw $1D02,$5D02,$3D06,$7D06,$3D0A,$3D08,$7D08,$3D08
	dw $7D08,$7D0A,$3D06,$7D06,$0000,$1D0C,$0000,$1D0C
	dw $9B4A,$0000,$1D0C,$0000,$1D0C,$0000,$0000,$1984
	dw $1962,$1964,$5964,$1964,$5964,$1964,$5984,$0000
	dw $0000,$198A,$1980,$1980,$5980,$1980,$5980,$1982
	dw $598A,$0000,$1D02,$5D02,$5D00,$1988,$196A,$596A
	dw $5988,$1D00,$1D02,$5D02,$3D06,$7D06,$3D0A,$3D08
	dw $7D08,$3D08,$7D08,$7D0A,$3D06,$7D06,$1D0C,$0000
	dw $1D0C,$0000,$9B4A,$1D0C,$0000,$1D0C,$0000,$1D0C
	dw $1984,$1962,$1964,$5964,$1964,$5964,$1964,$5964
	dw $1964,$5984,$198A,$1980,$1980,$5980,$1980,$5980
	dw $1980,$5980,$1982,$598A,$1D02,$5D02,$5D00,$1988
	dw $196A,$596A,$5988,$1D00,$1D02,$5D02,$3D06,$7D06
	dw $3D0A,$3D08,$7D08,$3D08,$7D08,$7D0A,$3D06,$7D06
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1D20,$4AC8,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0A60,$0A80,$4ACA,$1D20,$4000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0A40,$0A88
	dw $0A62,$0A82,$4ACC,$4AC6,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0A60,$0A80,$0A42,$0A8A
	dw $0A64,$0A84,$4AEA,$4000,$0000,$0000,$0000,$0000
	dw $0000,$0AC8,$0A40,$0A88,$0A62,$0A82,$0A44,$0A8C
	dw $0A66,$0A86,$4A0E,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0ACA,$0A42,$0A8A,$0A64,$0A84,$0A46,$0A8E
	dw $0A00,$0A00,$4A22,$4A20,$0000,$0000,$0000,$0000
	dw $0AC6,$0ACC,$0A44,$0A8C,$0A66,$0A86,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$4A0E,$0000,$0000,$0000,$0000
	dw $0000,$0ACE,$8AE8,$0A8E,$0A00,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$4A22,$4A20,$0000,$0000,$0000
	dw $0000,$0000,$8A20,$8A22,$0A00,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$0A00,$4A0E,$0000,$0000,$0000
	dw $0000,$0000,$0000,$8A0E,$0A00,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$0A00,$4A22,$4A20,$0000,$0000
	dw $0000,$0000,$0000,$8A20,$8A22,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$0A00,$0A00,$4A0E,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1D20,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$4000,$1D20,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$4AC8,$4000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0A40
	dw $0A48,$0A60,$0A80,$4ACA,$4000,$0000,$0000,$0000
	dw $0000,$0000,$0AC8,$0A40,$0A48,$0A60,$0A80,$0A42
	dw $0A4A,$0A62,$0A82,$4ACC,$4AC6,$0000,$0000,$0000
	dw $0000,$0000,$0ACA,$0A42,$0A4A,$0A62,$0A82,$0A44
	dw $0A4C,$0A64,$0A84,$4AE6,$0000,$0000,$0000,$0000
	dw $0000,$0AC6,$0ACC,$0A44,$0A4C,$0A64,$0A84,$0A46
	dw $0A4E,$0A66,$0A86,$4A08,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0ACE,$8AE4,$0A4E,$0A66,$0A86,$0A00
	dw $0A00,$0A00,$0A00,$4A06,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$8A06,$0A00,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$4A04,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$8A08,$0A00,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$4A0C,$4A0A,$0000,$0000,$0000
	dw $0000,$0000,$0000,$8A0A,$8A0C,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$0A00,$4A08,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1D20,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$4000,$1D20,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$4000,$4000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$4000,$4000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0AC8,$0A40,$0A48,$0A60,$0A68
	dw $0A40,$0A48,$0A60,$0A68,$4AC8,$4000,$0000,$0000
	dw $0000,$0000,$0000,$0ACA,$0A42,$0A4A,$0A62,$0A6A
	dw $0A42,$0A4A,$0A62,$0A6A,$4ACA,$4000,$0000,$0000
	dw $0000,$0000,$0AC6,$0ACC,$0A44,$0A4C,$0A64,$0A6C
	dw $0A44,$0A4C,$0A64,$0A6C,$4ACC,$4AC6,$0000,$0000
	dw $0000,$0000,$0000,$0ACE,$0AE0,$0A4E,$0A66,$0A6E
	dw $0A46,$0A4E,$0A66,$0AE2,$4ACE,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0A02,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$4A02,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0A02,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$4A02,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0A02,$0A00,$0A00,$0A00
	dw $0A00,$0A00,$0A00,$4A02,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1D20,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$1D20,$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,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0AC8,$4000,$4000,$4000
	dw $4000,$4000,$4000,$4000,$4000,$4000,$4000,$0000
	dw $0000,$0000,$0000,$0000,$0ACA,$4A80,$4A60,$4A48
	dw $4A40,$4000,$4000,$4000,$4000,$4000,$4000,$0000
	dw $0000,$0000,$0000,$0AC6,$0ACC,$4A82,$4A62,$4A4A
	dw $4A42,$4A80,$4A60,$4A48,$4A40,$4AC8,$4000,$0000
	dw $0000,$0000,$0000,$4000,$0AE6,$4A84,$4A64,$4A4C
	dw $4A44,$4A82,$4A62,$4A4A,$4A42,$4ACA,$4000,$0000
	dw $0000,$0000,$0000,$4000,$0A08,$4A86,$4A66,$4A4E
	dw $4A46,$4A84,$4A64,$4A4C,$4A44,$4ACC,$4AC6,$0000
	dw $0000,$0000,$0000,$4000,$0A06,$4A00,$4A00,$4A00
	dw $4A00,$4A86,$4A66,$4A4E,$CAE4,$4ACE,$4000,$0000
	dw $0000,$0000,$0000,$4000,$0A04,$4A00,$4A00,$4A00
	dw $4A00,$4A00,$4A00,$4A00,$CA06,$4000,$4000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1D20,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$1D20,$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,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$4000,$0AC8,$4000,$4000
	dw $4000,$4000,$4000,$4000,$4000,$4000,$4000,$4000
	dw $0000,$0000,$0000,$0000,$4000,$0ACA,$4A80,$4A60
	dw $4000,$4000,$4000,$4000,$4000,$4000,$4000,$4000
	dw $0000,$0000,$0000,$0000,$0AC6,$0ACC,$4A82,$4A62
	dw $4A88,$4A40,$4000,$4000,$4000,$4000,$4000,$4000
	dw $0000,$0000,$0000,$0000,$0000,$0AEA,$4A84,$4A64
	dw $4A8A,$4A42,$4A80,$4A60,$4000,$4000,$4000,$4000
	dw $0000,$0000,$0000,$0000,$4000,$0A0E,$4A86,$4A66
	dw $4A8C,$4A44,$4A82,$4A62,$4A88,$4A40,$4AC8,$4000
	dw $0000,$0000,$0000,$0000,$0A20,$0A22,$4A00,$4A00
	dw $4A8E,$4A46,$4A84,$4A64,$4A8A,$4A42,$4ACA,$4000
	dw $0000,$0000,$0000,$0000,$0A0E,$4A00,$4A00,$4A00
	dw $4A00,$4A00,$4A86,$4A66,$4A8C,$4A44,$4ACC,$4AC6
	dw $0000,$1984,$5964,$1964,$5984,$0000,$0000,$9988
	dw $D96C,$996C,$D988,$0000,$5D00,$9986,$9966,$D966
	dw $D986,$1D00,$3D0A,$3D08,$7D08,$3D08,$7D08,$7D0A
	dw $0000,$0000,$DB48,$0000,$0000,$0000,$0000,$1984
	dw $5964,$1964,$5984,$0000,$5D00,$9988,$D96C,$996C
	dw $D988,$1D00,$3D0A,$3D08,$7D08,$3D08,$7D08,$7D0A
	dw $0000,$0000,$DB48,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$5D00,$1984,$5964,$1964
	dw $5984,$1D00,$3D0A,$3D08,$7D08,$3D08,$7D08,$7D0A
	dw $0000,$0000,$DB48,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$5D00,$1D00,$1D02,$5D02
	dw $5D00,$1D00,$7D04,$3D08,$7D08,$3D08,$7D08,$3D04
	dw $0000,$0000,$DB48,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$5D00,$1D00,$1D02,$5D02
	dw $5D00,$1D00,$7D04,$3D04,$7D08,$3D08,$7D04,$3D04
	dw $0000,$0000,$DB48,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$5D00,$1D00,$1D02,$5D02
	dw $5D00,$1D00,$7D04,$3D04,$3D06,$7D06,$7D04,$3D04
endif

;--------------------------------------------------------------------

DATA_85CB20:
	db $00,$00,$23,$00,$01,$13,$00,$00,$02,$00,$0A,$04,$00,$02,$13,$00
	db $00,$02,$00,$80,$0C,$00,$81,$02,$00,$01,$0E,$00,$00,$0B,$00,$40
	db $0A,$00,$00,$05,$00,$02,$04,$00,$82,$0B,$00,$80,$01,$00,$81,$01
	db $00,$01,$0C,$00,$00,$10,$00,$40,$09,$00,$00,$07,$00,$02,$05,$00
	db $82,$09,$00,$8A,$01,$00,$88,$01,$00,$81,$0C,$00,$01,$04,$00,$00
	db $0F,$00,$40,$0B,$00,$00,$63,$00,$01,$26,$00,$00,$63,$FF,$FF

DATA_85CB7F:
	db $00,$00,$5B,$00,$01,$22,$00,$00,$02,$00,$02,$1D,$00,$00,$06,$00
	db $01,$11,$00,$00,$18,$00,$01,$33,$00,$00,$14,$00,$04,$58,$00,$00
	db $20,$00,$01,$92,$00,$00,$4C,$00,$40,$09,$00,$00,$2C,$00,$40,$0A
	db $00,$00,$5D,$00,$80,$0F,$00,$00,$3C,$00,$80,$0A,$00,$00,$30,$00
	db $01,$05,$80,$01,$0E,$00,$01,$71,$00,$00,$26,$00,$80,$0B,$00,$81
	db $12,$00,$01,$28,$00,$00,$07,$00,$88,$01,$00,$80,$01,$00,$82,$06
	db $00,$02,$15,$00,$00,$05,$00,$01,$60,$00,$40,$09,$00,$00,$09,$00
	db $40,$08,$00,$00,$05,$00,$40,$08,$00,$00,$08,$80,$00,$0B,$00,$01
	db $77,$00,$00,$16,$80,$00,$0E,$00,$00,$45,$80,$00,$09,$00,$00,$04
	db $00,$01,$37,$80,$01,$08,$00,$01,$0E,$00,$00,$0C,$00,$01,$13,$00
	db $00,$1C,$00,$02,$0A,$00,$08,$02,$00,$00,$01,$00,$01,$14,$00,$00
	db $12,$00,$02,$1B,$00,$00,$05,$80,$00,$04,$80,$01,$08,$00,$01,$53
	db $00,$00,$07,$00,$40,$09,$00,$42,$02,$00,$02,$15,$00,$0A,$01,$00
	db $08,$02,$00,$01,$04,$00,$41,$06,$00,$40,$04,$00,$00,$0B,$00,$01
	db $21,$80,$01,$0A,$00,$01,$19,$00,$00,$0E,$00,$01,$1E,$00,$00,$17
	db $80,$00,$02,$80,$02,$0A,$80,$0A,$02,$80,$08,$01,$80,$09,$02,$80
	db $01,$08,$00,$01,$16,$00,$00,$1E,$00,$01,$10,$80,$01,$0B,$00,$01
	db $54,$00,$00,$10,$FF,$FF,$FF,$FF

DATA_85CC97:
	db $00,$00,$2E,$80,$00,$01,$80,$02,$09,$00,$02,$32,$00,$00,$0E,$00
	db $01,$0C,$00,$00,$07,$00,$40,$0A,$00,$00,$05,$00,$40,$08,$00,$00
	db $06,$00,$40,$0E,$00,$00,$07,$00,$40,$09,$00,$00,$07,$00,$40,$09
	db $00,$00,$04,$00,$40,$06,$00,$00,$06,$00,$40,$08,$00,$00,$3F,$00
	db $01,$55,$00,$00,$6B,$00,$01,$0B,$00,$00,$02,$00,$02,$16,$80,$02
	db $09,$00,$02,$21,$00,$00,$0D,$00,$02,$24,$00,$82,$07,$00,$02,$09
	db $00,$00,$1C,$00,$02,$17,$00,$01,$3B,$00,$81,$07,$00,$01,$11,$00
	db $00,$05,$00,$01,$01,$00,$41,$09,$00,$01,$06,$00,$00,$01,$00,$08
	db $02,$00,$0A,$07,$00,$8A,$06,$00,$88,$01,$00,$80,$01,$00,$01,$94
	db $00,$41,$02,$00,$40,$08,$00,$00,$06,$00,$40,$09,$00,$00,$05,$00
	db $40,$07,$00,$00,$05,$00,$40,$07,$00,$00,$05,$00,$40,$08,$00,$00
	db $53,$00,$40,$0A,$00,$00,$29,$00,$01,$28,$00,$00,$0C,$00,$40,$0B
	db $00,$00,$11,$00,$01,$4B,$00,$41,$06,$00,$01,$08,$00,$41,$07,$00
	db $00,$06,$00,$40,$08,$00,$00,$05,$00,$40,$07,$00,$00,$06,$00,$40
	db $08,$00,$00,$04,$00,$40,$08,$00,$00,$06,$00,$40,$08,$00,$00,$04
	db $FF,$FF,$FF,$FF

DATA_85CD8B:
	db $00,$00,$12,$00,$01,$55,$80,$01,$0E,$00,$01,$3C,$00,$00,$12,$80
	db $00,$0E,$80,$01,$01,$00,$01,$28,$00,$00,$4D,$80,$00,$01,$80,$01
	db $14,$00,$01,$28,$00,$00,$3C,$00,$81,$0C,$00,$01,$1E,$00,$00,$10
	db $80,$00,$08,$80,$01,$02,$80,$09,$05,$80,$01,$0C,$00,$01,$19,$00
	db $00,$2C,$00,$01,$0C,$00,$00,$0D,$80,$01,$0D,$00,$01,$25,$00,$00
	db $10,$80,$00,$11,$80,$01,$01,$80,$09,$0A,$80,$01,$03,$00,$01,$30
	db $00,$00,$16,$00,$81,$18,$00,$01,$38,$00,$00,$0E,$00,$40,$0A,$00
	db $00,$06,$00,$40,$06,$00,$00,$07,$00,$40,$05,$00,$00,$04,$00,$40
	db $07,$00,$00,$05,$00,$01,$30,$00,$00,$0D,$00,$02,$0A,$00,$00,$0F
	db $00,$80,$09,$00,$00,$13,$00,$40,$0B,$00,$00,$11,$00,$80,$08,$00
	db $00,$10,$00,$40,$09,$00,$00,$3C,$00,$80,$09,$FF,$FF,$FF,$3F

DATA_85CE3A:
	db $00,$00,$19,$00,$01,$A5,$00,$00,$21,$00,$02,$A4,$80,$02,$0A,$00
	db $02,$1F,$00,$00,$2F,$00,$01,$03,$00,$00,$1D,$00,$01,$1F,$00,$00
	db $B5,$00,$02,$0A,$00,$00,$14,$00,$01,$02,$00,$00,$19,$FF,$FF

DATA_85CE69:
	db $00,$00,$1B,$00,$01,$D2,$00,$00,$17,$00,$02,$30,$00,$08,$01,$00
	db $01,$0B,$00,$41,$0B,$00,$01,$11,$00,$00,$01,$00,$08,$01,$00,$00
	db $01,$00,$02,$0A,$00,$42,$0A,$00,$02,$2C,$00,$0A,$01,$00,$08,$02
	db $00,$00,$02,$00,$01,$03,$00,$41,$09,$00,$01,$2A,$00,$00,$01,$00
	db $08,$01,$00,$0A,$01,$00,$02,$03,$00,$42,$06,$00,$02,$0A,$00,$42
	db $05,$00,$02,$10,$00,$0A,$01,$00,$08,$02,$00,$00,$01,$00,$01,$08
	db $00,$41,$07,$00,$01,$2A,$00,$08,$03,$00,$0A,$02,$00,$4A,$08,$00
	db $0A,$07,$00,$02,$2B,$00,$0A,$02,$00,$08,$02,$00,$01,$03,$00,$41
	db $08,$00,$01,$09,$00,$41,$07,$00,$01,$1D,$00,$00,$24,$FF,$FF

DATA_85CEF8:
	db $00,$00,$0D,$00,$01,$18,$00,$02,$08,$00,$00,$0A,$00,$80,$0C,$00
	db $00,$13,$00,$40,$0C,$00,$00,$19,$00,$01,$13,$00,$81,$01,$00,$80
	db $09,$00,$00,$1B,$00,$02,$18,$00,$00,$0D,$00,$80,$0A,$00,$00,$17
	db $00,$40,$0A,$00,$00,$0F,$00,$80,$08,$00,$00,$18,$00,$40,$0D,$00
	db $00,$0C,$00,$80,$08,$00,$00,$12,$00,$40,$0C,$00,$00,$20,$00,$01
	db $17,$00,$00,$02,$00,$80,$0F,$00,$00,$2E,$80,$00,$02,$80,$08,$04
	db $80,$0A,$1C,$80,$08,$05,$80,$00,$01,$80,$01,$01,$00,$01,$08,$00
	db $09,$01,$00,$00,$12,$00,$01,$16,$80,$01,$02,$80,$09,$04,$80,$08
	db $0A,$80,$00,$09,$00,$00,$08,$00,$01,$0D,$00,$08,$02,$00,$0A,$0D
	db $00,$02,$0B,$00,$0A,$27,$80,$0A,$20,$80,$08,$02,$80,$01,$01,$00
	db $01,$23,$00,$00,$0A,$80,$00,$18,$80,$02,$01,$80,$0A,$0D,$80,$08
	db $02,$80,$01,$02,$00,$01,$29,$80,$01,$14,$00,$01,$74,$00,$00,$08
	db $80,$00,$01,$80,$01,$08,$00,$01,$5D,$00,$00,$1C,$00,$80,$08,$00
	db $00,$1D,$00,$40,$0A,$00,$00,$04,$00,$01,$03,$00,$41,$06,$00,$40
	db $01,$00,$00,$0A,$00,$40,$07,$00,$00,$02,$00,$01,$02,$00,$00,$02
	db $00,$02,$11,$00,$82,$10,$00,$02,$07,$00,$42,$02,$00,$40,$02,$00
	db $41,$06,$00,$01,$0B,$00,$00,$02,$00,$02,$0A,$00,$0A,$01,$00,$02
	db $06,$00,$00,$05,$40,$00,$09,$00,$00,$18,$40,$00,$0A,$00,$00,$0B
	db $40,$00,$09,$00,$00,$24,$00,$80,$02,$00,$82,$09,$00,$8A,$02,$00
	db $02,$08,$00,$00,$02,$00,$04,$05,$00,$05,$03,$00,$01,$09,$00,$00
	db $01,$00,$42,$03,$00,$02,$01,$00,$0A,$0A,$00,$08,$03,$00,$00,$06
	db $00,$40,$04,$00,$41,$07,$00,$01,$0A,$00,$05,$0B,$00,$04,$01,$00
	db $84,$01,$00,$82,$06,$00,$02,$04,$00,$00,$1A,$00,$40,$0C,$00,$00
	db $2B,$00,$80,$01,$00,$81,$06,$00,$01,$07,$00,$00,$01,$00,$02,$09
	db $00,$0A,$03,$00,$02,$0D,$00,$00,$02,$00,$40,$0B,$00,$00,$0C,$00
	db $40,$0D,$00,$00,$07,$00,$01,$13,$00,$04,$01,$00,$02,$06,$00,$42
	db $03,$00,$40,$08,$00,$00,$C0,$FF,$FF,$FF,$FF,$00,$FF,$00,$FF

DATA_85D0A7:
	db $00,$00,$1B,$00,$02,$06,$00,$00,$0E,$00,$02,$40,$80,$00,$17,$80
	db $01,$1A,$00,$01,$1D,$00,$00,$1E,$00,$02,$06,$00,$00,$0A,$00,$01
	db $04,$00,$00,$8F,$00,$01,$10,$00,$00,$0D,$00,$02,$0A,$00,$00,$09
	db $00,$01,$06,$00,$00,$1F,$00,$80,$15,$00,$00,$2C,$00,$02,$05,$00
	db $00,$A8,$80,$02,$09,$00,$02,$33,$00,$00,$32,$00,$02,$4F,$00,$00
	db $0A,$00,$01,$0D,$00,$00,$0D,$00,$02,$09,$00,$00,$10,$00,$40,$05
	db $00,$00,$04,$00,$02,$22,$00,$00,$06,$00,$01,$08,$00,$00,$0F,$00
	db $01,$19,$00,$00,$19,$00,$02,$1E,$00,$00,$07,$00,$01,$07,$00,$00
	db $01,$00,$08,$01,$00,$02,$0F,$00,$00,$05,$00,$02,$09,$00,$00,$04
	db $00,$01,$21,$00,$00,$02,$00,$82,$02,$00,$C2,$07,$00,$C0,$03,$00
	db $80,$05,$00,$82,$02,$00,$02,$16,$00,$00,$07,$00,$01,$06,$00,$41
	db $04,$00,$40,$04,$00,$00,$02,$00,$02,$D8,$00,$82,$03,$00,$C2,$0B
	db $00,$C0,$05,$00,$80,$01,$00,$81,$02,$00,$01,$3E,$80,$01,$15,$80
	db $09,$03,$80,$08,$03,$80,$0A,$03,$80,$02,$11,$00,$02,$13,$00,$00
	db $0B,$00,$02,$07,$80,$02,$2B,$00,$02,$0E,$00,$00,$0D,$00,$80,$01
	db $00,$82,$0D,$00,$02,$0E,$00,$00,$02,$00,$01,$1E,$00,$81,$20,$00
	db $01,$07,$00,$00,$02,$00,$08,$01,$00,$00,$37,$00,$02,$10,$00,$00
	db $07,$00,$01,$33,$00,$00,$0C,$00,$01,$0E,$00,$00,$2F,$00,$01,$1D
	db $00,$41,$06,$00,$40,$03,$00,$00,$26,$00,$80,$07,$00,$C0,$05,$00
	db $40,$06,$00,$00,$12,$00,$40,$0D,$00,$00,$19,$00,$80,$0F,$00,$81
	db $28,$00,$C1,$08,$00,$81,$12,$00,$01,$04,$00,$81,$06,$00,$C1,$0B
	db $00,$81,$03,$00,$01,$17,$00,$41,$0B,$00,$01,$02,$00,$81,$16,$00
	db $01,$05,$00,$08,$01,$00,$00,$01,$00,$02,$1A,$00,$42,$08,$00,$02
	db $04,$00,$00,$10,$00,$40,$01,$00,$44,$09,$00,$00,$01,$00,$02,$1F
	db $00,$00,$1C,$FF,$FF,$B0,$D0,$B0,$E0,$A0,$E0,$A0,$20,$60,$A0,$60
	db $B0,$F0,$B0,$F0,$70,$F0,$70,$F0,$60,$E0,$60,$E0,$E0,$E0,$E0,$E0
	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,$01,$01,$01,$01,$01,$01,$01,$01
	db $00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$01,$01,$01,$01,$01,$01
	db $3D,$3B,$5D,$47,$8F,$83,$AB,$A5,$63,$6D,$63,$6D,$F3,$ED,$D3,$CD
	db $3F,$3F,$7F,$7F,$FF,$FF,$DF,$FF,$9F,$FF,$9F,$FF,$1F,$FF,$3F

DATA_85D2A6:
	db $00,$00,$0E,$00,$01,$14,$00,$81,$15,$00,$01,$0E,$80,$01,$13,$00
	db $01,$07,$00,$00,$11,$00,$01,$11,$00,$00,$31,$00,$02,$09,$00,$00
	db $55,$00,$01,$04,$00,$41,$05,$00,$40,$04,$00,$00,$18,$00,$01,$24
	db $00,$00,$07,$00,$02,$07,$00,$00,$1B,$00,$40,$0A,$00,$00,$02,$00
	db $02,$35,$00,$00,$03,$00,$01,$0B,$00,$00,$0E,$00,$40,$0A,$00,$00
	db $1B,$00,$80,$0D,$00,$C0,$09,$00,$80,$06,$00,$00,$09,$00,$01,$37
	db $00,$81,$0A,$00,$01,$26,$00,$81,$0C,$00,$01,$12,$00,$00,$12,$00
	db $02,$0C,$00,$00,$0A,$00,$01,$07,$00,$00,$12,$20,$00,$06,$30,$00
	db $01,$10,$00,$06,$30,$00,$02,$20,$00,$04,$00,$00,$02,$10,$00,$06
	db $30,$00,$02,$20,$00,$04,$00,$00,$02,$10,$00,$06,$30,$00,$01,$20
	db $00,$05,$00,$00,$02,$10,$00,$07,$20,$00,$06,$00,$00,$01,$10,$00
	db $06,$20,$00,$07,$10,$00,$07,$00,$00,$2D,$80,$00,$03,$80,$01,$20
	db $80,$05,$0E,$00,$05,$09,$00,$01,$0B,$00,$00,$09,$00,$02,$0A,$00
	db $08,$01,$00,$01,$02,$80,$01,$1C,$00,$01,$22,$00,$00,$01,$00,$02
	db $0A,$00,$00,$63,$FF,$FF,$5D,$33,$B9,$7F,$66,$26,$60,$20,$60

DATA_85D395:
	db $00,$00,$1C,$00,$01,$62,$00,$00,$0F,$00,$02,$09,$00,$00,$20,$00
	db $80,$0A,$00,$00,$1D,$00,$80,$07,$00,$00,$15,$00,$40,$09,$00,$00
	db $06,$00,$02,$14,$00,$00,$03,$00,$01,$0A,$00,$81,$0A,$00,$01,$03
	db $00,$05,$03,$00,$04,$03,$00,$06,$02,$00,$02,$05,$00,$42,$01,$00
	db $40,$08,$00,$00,$0D,$00,$01,$11,$00,$81,$0C,$00,$01,$05,$00,$00
	db $10,$00,$01,$07,$00,$81,$0C,$00,$01,$0B,$00,$00,$09,$00,$40,$0B
	db $00,$00,$0C,$00,$02,$05,$00,$00,$0A,$00,$02,$08,$00,$00,$02,$00
	db $01,$0A,$00,$41,$04,$00,$40,$05,$00,$00,$16,$00,$01,$09,$00,$00
	db $06,$00,$82,$0C,$00,$02,$20,$00,$82,$04,$00,$8A,$01,$00,$88,$04
	db $00,$81,$07,$00,$01,$07,$00,$00,$5A,$00,$01,$0A,$00,$81,$07,$00
	db $01,$06,$00,$00,$12,$00,$40,$0C,$00,$00,$07,$00,$01,$13,$00,$00
	db $07,$00,$02,$0C,$00,$00,$09,$00,$02,$1B,$00,$00,$21,$00,$01,$0D
	db $00,$00,$0A,$00,$01,$07,$00,$00,$12,$00,$80,$0A,$00,$00,$14,$00
	db $40,$0E,$00,$00,$1A,$00,$80,$08,$00,$00,$10,$00,$40,$0A,$00,$00
	db $64,$00,$40,$0C,$00,$00,$06,$00,$02,$1B,$80,$02,$0B,$00,$02,$01
	db $00,$00,$64,$FF,$FF,$38,$FF,$38,$FF,$30,$FF,$60,$FE,$41,$FE

DATA_85D494:
	db $00,$00,$08,$00,$01,$7C,$00,$81,$06,$00,$01,$9B,$00,$81,$1F,$00
	db $01,$10,$00,$00,$06,$00,$80,$05,$00,$82,$06,$00,$02,$0F,$00,$00
	db $08,$00,$40,$0C,$00,$00,$01,$00,$01,$19,$00,$81,$02,$00,$88,$02
	db $00,$8A,$0F,$00,$0A,$03,$00,$02,$05,$00,$00,$0A,$80,$00,$02,$80
	db $09,$0E,$80,$01,$14,$00,$01,$17,$80,$01,$0F,$00,$01,$35,$00,$00
	db $0E,$00,$02,$2F,$80,$02,$02,$80,$0A,$01,$80,$02,$01,$80,$00,$03
	db $80,$01,$09,$00,$01,$57,$80,$01,$0D,$00,$01,$1F,$00,$00,$20,$00
	db $02,$12,$80,$02,$10,$80,$00,$05,$00,$00,$04,$00,$01,$14,$00,$00
	db $07,$00,$02,$36,$00,$00,$09,$10,$00,$04,$30,$00,$06,$20,$00,$02
	db $00,$00,$04,$10,$00,$05,$30,$00,$01,$20,$00,$04,$00,$00,$02,$10
	db $00,$06,$30,$00,$01,$20,$00,$04,$00,$00,$07,$00,$0A,$01,$40,$0A
	db $01,$C0,$08,$02,$C0,$09,$02,$C0,$01,$04,$80,$01,$0A,$00,$01,$28
	db $00,$00,$01,$00,$02,$02,$40,$02,$07,$00,$02,$03,$00,$00,$06,$40
	db $00,$09,$00,$00,$05,$40,$00,$08,$00,$00,$01,$40,$00,$09,$00,$00
	db $07,$00,$01,$14,$00,$00,$04,$00,$08,$01,$00,$00,$01,$00,$02,$07
	db $00,$08,$01,$00,$00,$01,$00,$01,$01,$00,$81,$0B,$00,$01,$07,$00
	db $05,$05,$00,$04,$03,$00,$00,$09,$00,$02,$07,$00,$42,$02,$00,$40
	db $0A,$00,$00,$02,$00,$01,$17,$00,$04,$01,$00,$00,$01,$00,$02,$04
	db $00,$42,$08,$00,$40,$01,$00,$42,$01,$00,$00,$0D,$00,$40,$0B,$00
	db $00,$04,$00,$08,$03,$00,$00,$01,$00,$02,$13,$00,$82,$01,$00,$80
	db $02,$00,$81,$08,$00,$01,$0C,$00,$00,$0D,$00,$40,$0A,$00,$42,$01
	db $00,$02,$1B,$00,$00,$17,$00,$80,$05,$00,$81,$03,$00,$01,$09,$00
	db $00,$0F,$00,$40,$0C,$00,$00,$0E,$00,$01,$14,$00,$00,$15,$00,$80
	db $0C,$00,$81,$09,$00,$80,$01,$00,$00,$1A,$00,$80,$02,$00,$81,$0C
	db $00,$01,$18,$00,$00,$46,$00,$01,$0E,$00,$00,$16,$00,$01,$0A,$00
	db $00,$0C,$00,$80,$03,$00,$81,$0B,$00,$01,$55,$00,$81,$02,$00,$82
	db $06,$00,$02,$08,$00,$00,$3F,$FF,$FF,$1C,$23,$3D,$E3,$FB,$E8

DATA_85D643:
	db $00,$00,$2F,$00,$08,$03,$00,$09,$02,$00,$01,$AE,$00,$00,$2A,$00
	db $01,$02,$80,$01,$15,$00,$01,$18,$00,$00,$01,$00,$04,$02,$00,$00
	db $18,$00,$02,$19,$00,$00,$19,$80,$00,$03,$80,$01,$03,$80,$09,$20
	db $00,$09,$01,$00,$01,$3A,$00,$00,$21,$00,$01,$34,$00,$00,$0B,$80
	db $02,$04,$80,$0A,$2F,$00,$0A,$0D,$00,$02,$16,$00,$00,$16,$00,$80
	db $05,$00,$81,$04,$00,$01,$48,$00,$00,$24,$00,$01,$25,$00,$00,$11
	db $00,$80,$0B,$00,$00,$13,$00,$40,$0D,$00,$00,$07,$00,$02,$0F,$00
	db $00,$18,$00,$01,$25,$00,$00,$1D,$00,$80,$09,$00,$81,$01,$00,$01
	db $11,$00,$00,$17,$00,$02,$1D,$00,$00,$4C,$FF,$FF,$FF,$00,$FF

;--------------------------------------------------------------------

DATA_85D6D2:
	dw $6B5F,$567E,$4178,$6B5F,$567E,$4178,$6B5F,$567E,$4178
	dw $6B5F,$5ABE,$49FA,$631F,$567E,$45BA,$569D,$4E1C,$4178
	dw $6B5F,$631F,$569D,$5ABE,$567E,$4E1C,$49FA,$45BA,$4178
	dw $6B5F,$6B5F,$6B5F,$567E,$567E,$567E,$4178,$4178,$4178
	dw $6B5F,$631F,$569D,$5ABE,$567E,$4E1C,$49FA,$45BA,$4178
	dw $6B5F,$5ABE,$49FA,$631F,$567E,$45BA,$569D,$4E1C,$4178

DATA_85D73E:
	dw $5F5B,$4674,$2D8D,$5F5B,$4674,$2D8D,$5F5B,$4674,$2D8D
	dw $5F5B,$4EB6,$3E12,$56F9,$4674,$35CF,$4EB6,$3E12,$2D8D
	dw $5F5B,$56F9,$4EB6,$4EB6,$4674,$3E12,$3E12,$35CF,$2D8D
	dw $5F5B,$5F5B,$5F5B,$4674,$4674,$4674,$2D8D,$2D8D,$2D8D
	dw $5F5B,$56F9,$4EB6,$4EB6,$4674,$3E12,$3E12,$35CF,$2D8D
	dw $5F5B,$4EB6,$3E12,$56F9,$4674,$35CF,$4EB6,$3E12,$2D8D

;--------------------------------------------------------------------

DATA_85D7AA:
	incbin "Graphics/GFX_85D7AA.bin"

;--------------------------------------------------------------------

DATA_85DDAA:
	dw $3FDE,$3FDA,$3ED8,$3ED6,$3DD4,$3DD2,$3CD1,$3CCF
	dw $3BCE,$3BCD,$3ACC,$3ACB,$39CA,$39C9,$38C8,$38C8
	dw $37C7,$37C6,$36C6,$36C5,$35C5,$35C4,$34C4,$34C3
	dw $33C3,$33C2,$32C2,$32C2,$31C2,$31C1,$30C1,$30C1
	dw $2FC1,$2FC1,$2EC1,$2EC1,$FAC1,$F9C1,$F8C1,$F8C1
	dw $F7C1,$F7C1,$F7C1,$F7C1,$F8C1,$F8C1,$F9C1,$FAC1
	dw $22C1,$26C1,$28C1,$2AC2,$2CC2,$2EC2,$2FC2,$31C3
	dw $32C3,$33C4,$34C4,$35C5,$36C5,$37C6,$38C6,$38C7
	dw $39C8,$3AC8,$3AC9,$3BCA,$3BCB,$3CCC,$3CCD,$3DCE
	dw $3DCF,$3ED1,$3ED2,$3ED4,$3ED6,$3FD8,$3FDA,$3FDE
	dw $3F06,$3F07,$3F08,$3F08,$3F09,$3F09,$3F09,$3F09
	dw $3F08,$3F08,$3F07,$3F06,$3FC1,$3FC1,$3FC1,$3FC1
	dw $3FC1,$3FC1,$3FC1,$3EC1,$3EC1,$3EC1,$3EC1,$3DC1
	dw $3DC1,$3CC1,$3CC1,$3BC1,$3BC1,$3AC1,$3AC1,$39C1
	dw $38C1,$38C1,$37C1,$36C1,$35C1,$34C1,$33C1,$32C1
	dw $31C1,$2FC1,$2EC1,$2CC1,$2AC1,$28C1,$26C1,$22C1

DATA_85DEAA:
	dw $07F9,$0CF4,$10F0,$14EC,$16EA,$19E7,$1BE5,$1DE3
	dw $1FE1,$20E0,$22DE,$23DD,$25DB,$26DA,$27D9,$28D8
	dw $2AD6,$2BD5,$2CD4,$2DD3,$2ED2,$2FD1,$2FD1,$30D0
	dw $31CF,$32CE,$33CD,$33CD,$34CC,$35CB,$35CB,$36CA
	dw $37C9,$37C9,$38C8,$38C8,$39C7,$39C7,$3AC6,$3AC6
	dw $3AC6,$3BC5,$3BC5,$3CC4,$3CC4,$3CC4,$3CC4,$3DC3
	dw $3DC3,$3DC3,$3DC3,$3EC2,$3EC2,$3EC2,$3EC2,$3EC2
	dw $3FC1,$3FC1,$3FC1,$3FC1,$3FC1,$3FC1,$3FC1,$3FC1
	dw $3FC1,$3FC1,$3FC1,$3FC1,$3FC1,$3FC1,$3FC1,$3FC1
	dw $3EC2,$3EC2,$3EC2,$3EC2,$3EC2,$3DC3,$3DC3,$3DC3
	dw $3DC3,$3CC4,$3CC4,$3CC4,$3CC4,$3BC5,$3BC5,$3AC6
	dw $3AC6,$3AC6,$39C7,$39C7,$38C8,$38C8,$37C9,$37C9
	dw $36CA,$35CB,$35CB,$34CC,$33CD,$33CD,$32CE,$31CF
	dw $30D0,$2FD1,$2FD1,$2ED2,$2DD3,$2CD4,$2BD5,$2AD6
	dw $28D8,$27D9,$26DA,$25DB,$23DD,$22DE,$20E0,$1FE1
	dw $1DE3,$1BE5,$19E7,$16EA,$14EC,$10F0,$0CF4,$07F9

DATA_85DFAA:
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040
	dw $07F9,$0CF4,$10F0,$14EC,$1FE1,$20E0,$22DE,$23DD
	dw $2AD6,$2BD5,$2CD4,$2DD3,$31CF,$32CE,$33CD,$33CD
	dw $37C9,$37C9,$38C8,$38C8,$3AC6,$3BC5,$3BC5,$3CC4
	dw $3DC3,$3DC3,$3DC3,$3EC2,$3FC1,$3FC1,$3FC1,$3FC1
	dw $3FC1,$3FC1,$3FC1,$3FC1,$3EC2,$3EC2,$3EC2,$3EC2
	dw $3DC3,$3CC4,$3CC4,$3CC4,$3AC6,$3AC6,$39C7,$39C7
	dw $36CA,$35CB,$35CB,$34CC,$30D0,$2FD1,$2FD1,$2ED2
	dw $28D8,$27D9,$26DA,$25DB,$1DE3,$1BE5,$19E7,$16EA
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040
	dw $C040,$C040,$C040,$C040,$C040,$C040,$C040,$C040

DATA_85E0AA:
	dw $0C0A,$0D09,$0D08,$0D05,$0D01,$0CF7,$0CF4,$0BF2
	dw $0AF1,$09F0,$08EF,$06EE,$05ED,$03EC,$FFEB,$FCEB
	dw $FBEA,$FAEA,$FBE9,$08E8,$0BE8,$0DE7,$0FE6,$10E5
	dw $11E5,$12E4,$13E4,$14E3,$15E3,$16E3,$16E2,$17E2
	dw $18E2,$1AE2,$1BE1,$1CE1,$1DE1,$1DE1,$1EE1,$1EE1
	dw $1EE1,$1FE1,$1FE1,$1FE1,$1FE1,$1FE0,$1FE0,$1FDF
	dw $1EDE,$1EDD,$1EDC,$1DDA,$1DD8,$1CD7,$1BD7,$1CD8
	dw $1ED9,$1FDA,$1FDA,$1EDA,$1CDA,$1BD4,$23D2,$26D1
	dw $29D0,$2BD0,$2DD0,$2FD0,$30CF,$31CF,$31CE,$32CD
	dw $32CC,$32CB,$32C9,$33C7,$34C6,$34C5,$35C5,$35C4
	dw $35C4,$35C4,$35C4,$35C4,$35C4,$35C4,$35C4,$35C5
	dw $35C5,$34C6,$33C8,$31C9,$30C9,$30CA,$2FCC,$2DCD
	dw $2CCD,$2CCE,$2BD0,$2AD3,$28D3,$27D4,$26D4,$24D5
	dw $1FD6,$1FD7,$1ED8,$1CDA,$19DC,$1DDE,$22E2,$25E2
	dw $27E2,$29E1,$2AE1,$2BE1,$2CE1,$2DE1,$2DE0,$2EE0
	dw $2FE0,$2FE0,$30E0,$30DF,$30DF,$31DF,$31DE,$31DE

DATA_85E1AA:
	dw $0C0A,$0D09,$0D08,$0D05,$0D01,$0CF7,$0CF4,$0BF2
	dw $0AF1,$09F0,$08EF,$06EE,$05ED,$03EC,$FFEB,$FCEB
	dw $FBEA,$FAEA,$FBE9,$08E8,$0BE8,$0DE7,$0FE6,$10E5
	dw $11E5,$12E4,$13E4,$14E3,$15E3,$16E3,$16E2,$17E2
	dw $18E2,$1AE2,$1BE1,$1CE1,$1DE1,$1DE1,$1EE1,$1EE1
	dw $1EE1,$1FE1,$1FE1,$1FE1,$1FE1,$1FE0,$1FE0,$1FDF
	dw $1EDE,$1EDD,$1EDC,$1DDA,$1DCE,$23C9,$30C7,$33C5
	dw $34C4,$35C3,$35C2,$36C2,$3BC1,$3EC1,$3FC1,$3FC1
	dw $40C1,$40C2,$40C2,$40C1,$3FC1,$3FC1,$40C1,$40C1
	dw $40C2,$40C2,$40C1,$40C1,$3FC1,$3FC1,$3FC1,$3EC2
	dw $3EC2,$3FC3,$3FC4,$3FC5,$3EC8,$3DCD,$3CCE,$3BCE
	dw $39CE,$23CF,$21D0,$21D3,$21DE,$21DD,$21DC,$22DA
	dw $22D6,$22D4,$22D3,$22D3,$22D4,$21D5,$21D6,$20D7
	dw $1FD9,$1EDA,$1CDC,$1ADF,$1DE2,$20E2,$23E2,$26E1
	dw $28E1,$29E1,$2AE1,$2BE1,$2CE0,$2DE0,$2DE0,$2EE0
	dw $2FE0,$2FDF,$30DF,$30DF,$30DF,$31DE,$31DE,$31DE

DATA_85E2AA:
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8
	dw $28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8,$28D8

DATA_85E3AA:
	dw $09E6,$12DC,$18D5,$1DD0,$20CC,$23CA,$26C8,$28C6
	dw $2AC5,$2CC4,$2EC3,$30C2,$31C2,$33C1,$34C1,$35C1
	dw $36C1,$37C1,$38C1,$39C1,$3AC2,$3AC2,$3BC3,$3BC4
	dw $3CC5,$3CC7,$3DCA,$3DCE,$3EDD,$3E0B,$3E10,$3F14
	dw $3F16,$3F18,$3F19,$401A,$401A,$401A,$4019,$4017
	dw $4014,$3F11,$3F0D,$3F09,$3E05,$3EFE,$3DF9,$3DF5
	dw $3CF2,$3CF0,$3BEE,$3AED,$39EC,$38EB,$37EA,$36E9
	dw $35E9,$34E8,$32E8,$31E8,$2FE8,$2DE7,$2BE7,$29E7
	dw $26E7,$23E7,$20E7,$1DE7,$1AE7,$18E8,$15E8,$13E8
	dw $10E9,$0EE9,$0CEA,$0BEB,$09EC,$08ED,$07EE,$06EF
	dw $04F1,$01F4,$C13F,$C13F,$C13F,$FEF6,$01F3,$03F1
	dw $05EF,$07ED,$08EC,$09EB,$0AEA,$0BE9,$0BE9,$0CE8
	dw $0DE8,$0DE7,$0DE7,$0EE6,$0EE6,$0EE6,$0FE5,$0FE5
	dw $0FE5,$0FE5,$0FE5,$0FE5,$0FE5,$0FE5,$0FE5,$0EE6
	dw $0EE6,$0EE6,$0DE7,$0DE7,$0CE8,$0CE8,$0BE9,$0BE9
	dw $0AEA,$09EB,$08EC,$07ED,$05EF,$03F1,$01F3,$FEF6

;--------------------------------------------------------------------

; Note: Unknown data

UNK_85E4AA:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%InsertGarbageData(NULLROM, incbin, UNK_85E4AA_PLOK_J.bin)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E) != $00
	%InsertGarbageData(NULLROM, incbin, UNK_85E4AA_PLOK_E.bin)
else
	%InsertGarbageData(NULLROM, incbin, UNK_85E4AA_PLOK_U.bin)
endif

;--------------------------------------------------------------------

%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro PLOKBank86Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

PLOK_UncompressedGFX_Bank86:
;$868000
	incbin "Graphics/GFX_868000.bin"

PLOK_Tilemap_StageTransformationFrameDataPtrs:
;$86D000
.Index00:
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$0064
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$00C8
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$012C
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$0190
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$01F4
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$0258
	dl PLOK_UnsortedData_Tilemap_StageTransform00FrameData+$02BC

.Index08:
	dl PLOK_UnsortedData_Tilemap_StageTransform01FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform01FrameData+$0160
	dl PLOK_UnsortedData_Tilemap_StageTransform01FrameData+$02C0
	dl PLOK_UnsortedData_Tilemap_StageTransform01FrameData+$0420

.Index0C:
	dl PLOK_UnsortedData_Tilemap_StageTransform02FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform02FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform02FrameData+$0060
	dl PLOK_UnsortedData_Tilemap_StageTransform02FrameData+$0090
	dl PLOK_UnsortedData_Tilemap_StageTransform02FrameData+$00C0
	dl PLOK_UnsortedData_Tilemap_StageTransform02FrameData+$00F0

.Index12:
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0060
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0090
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$00C0
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$00F0
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0120
	dl $FF0096
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$00F0
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$00C0
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0090
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0060
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform03FrameData+$0000

.Index20:
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0C60
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0948
	dl $FF0001
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0F78
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$1290
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$15A8
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0948
	dl $FF0001
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0C60
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0F78
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0F78
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2520

.Index2F:
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0C60
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0948
	dl $FF0001
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0F78
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$1EF0
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2208
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2520
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0630
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$1290
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2520
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0630
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0F78

.Index3E:
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2520
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2520
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0630
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$1290
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$15A8
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$18C0
	dl $FF0001
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2520
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0630
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$1BD8
	dl $FF0001
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$2520

.Index4D:
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$18C0
	dl $FF0001
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$1BD8
	dl $FF0001
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$18C0
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0318
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$1BD8
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0C60
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0F78
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0F78
	dl PLOK_UnsortedData_Tilemap_StageTransform04FrameData+$0C60

.Index5C:
	dl PLOK_UnsortedData_Tilemap_StageTransform05FrameData+$0604
	dl PLOK_UnsortedData_Tilemap_StageTransform05FrameData+$04D0
	dl PLOK_UnsortedData_Tilemap_StageTransform05FrameData+$039C
	dl PLOK_UnsortedData_Tilemap_StageTransform05FrameData+$0268
	dl PLOK_UnsortedData_Tilemap_StageTransform05FrameData+$0134
	dl PLOK_UnsortedData_Tilemap_StageTransform05FrameData+$0000

.Index62:
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0604
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$04D0
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$039C
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0268
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0134
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0000

.Index68:
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0604
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$04D0
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$039C
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0268
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0134
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0134
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0268
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$039C
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$04D0
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$039C
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0268
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0134
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0268

.Index76:
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0134
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0268
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$039C
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$04D0
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0604
	dl PLOK_UnsortedData_Tilemap_StageTransform06FrameData+$0738

.Index7C:
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0014
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$003C
	dl $FF0078
.Index81:
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0050
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0064
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0078
	dl $FF000A
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$008C
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$00A0
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$00B4
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$00C8
	dl $FF0078
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0014
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform07FrameData+$003C
	dl $FF0078

.Index8F:
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$0034
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$0068
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$009C
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$00D0
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$0104
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$0138
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$016C
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$01A0
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$01D4
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$0208
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$023C
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$0270
	dl PLOK_UnsortedData_Tilemap_StageTransform08FrameData+$02A4

.Index9D:
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$0034
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$0068
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$009C
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$00D0
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$0104
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$0138
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$016C
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$01A0
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$01D4
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$0208
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$023C
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$0270
	dl PLOK_UnsortedData_Tilemap_StageTransform09FrameData+$02A4

.IndexAB:
	dl $FF07D0
	dl PLOK_UnsortedData_Tilemap_StageTransform0AFrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform0AFrameData+$0018

.IndexAE:
	dl PLOK_UnsortedData_Tilemap_StageTransform0AFrameData+$0030

.IndexAF:
	dl PLOK_UnsortedData_Tilemap_StageTransform0BFrameData+$0000

.IndexB0:
	dl PLOK_UnsortedData_Tilemap_StageTransform0CFrameData+$0000

.IndexB1:
	dl PLOK_UnsortedData_Tilemap_StageTransform0DFrameData+$0000

.IndexB2:
	dl PLOK_UnsortedData_Tilemap_StageTransform0EFrameData+$0000

.IndexB3:
	dl $FF0078
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0000
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0048
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0090
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$00D8
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0120
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$0168
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform0FFrameData+$01B0

.IndexDD:
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1680

.IndexF5:
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1000
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0980
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0900
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0880
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0780
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0700
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0700
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0780
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0880
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0900
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0980
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1000
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1680

.Index14F:
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1000
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0980
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0900
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0980
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1000
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1680

.Index185:
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0700
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0780
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0880
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0900
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0980
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1000
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1000
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0F00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0E00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0D00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0C00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0B00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0A00
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0980
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0900
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0880
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0780
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0700
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$0000

.Index1DF:
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1700
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1780
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl $FF0078

.Index1F1:
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1780
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1700
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1100
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1180
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1680
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1700
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1780
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1800

.Index214:
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1600
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1580
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1480
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1400
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1300
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1280
	dl PLOK_UnsortedData_Tilemap_StageTransform10FrameData+$1200

.Index21D:
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0060
	dl $FF0078

.Index22F:
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform11FrameData+$0060

.Index251:
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl $FF0002
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl $FF0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0040
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0020
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0010
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0028
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform12FrameData+$0008

.Index369:
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0120
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0240
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0360

.Index36D:
	dl $FF0168
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0A20
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0900
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$07E0
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$06C0
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$05A0
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0480
	dl PLOK_UnsortedData_Tilemap_StageTransform13FrameData+$0000

.Index375:
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0150
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$02A0
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$03F0
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0540
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0690
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$07E0
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0930
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0BD0
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0D20
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0E70
	dl PLOK_UnsortedData_Tilemap_StageTransform14FrameData+$0FC0

.Index382:
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$00B4
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$0168
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$021C
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$02D0
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$0384
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$0438
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$04EC
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$05A0
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$0654
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$0708
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$07BC
	dl PLOK_UnsortedData_Tilemap_StageTransform15FrameData+$0870

.Index38F:
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$0090
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$00D8
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$0120
	dl $FF0006
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$00D8
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$0090
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$0048
	dl $FF0004
	dl PLOK_UnsortedData_Tilemap_StageTransform16FrameData+$0000
	dl $FF0004

.Index39C:
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$0038
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$0070
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$00A8
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$00E0
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$0118
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$0150
	dl PLOK_UnsortedData_Tilemap_StageTransform17FrameData+$0188

.Index3A4:
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$00FC
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$01F8
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$02F4
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$03F0
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$04EC
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$05E8
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$06E4
	dl PLOK_UnsortedData_Tilemap_StageTransform18FrameData+$07E0
	dl $FF0014

.Index3AE:
	dl $FF0014
.Index3AF:
	dl $FF0014
.Index3B0:
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$00C0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0180
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0240
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0300
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$03C0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0480
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0540
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0600
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$06C0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0780
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0840
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0900
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$09C0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0A80
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0B40
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0C00
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0CC0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0D80
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0E40
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0F00
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$0FC0
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014

.Index3D3:
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
.Index3D7:
	dl $FF0014
.Index3D8:
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1080
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1140
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1200
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$12C0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1380
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1440
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1500
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$15C0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1680
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1740
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1800
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$18C0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1980
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1A40
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1B00
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1BC0
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1C80
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1D40
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1E00
	dl PLOK_UnsortedData_Tilemap_StageTransform19FrameData+$1EC0
	dl $FF0004
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014

.Index3F4:
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
.Index3F8:
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$0078
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$00F0
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$0168
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$01E0
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$0258
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$02D0
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$0348
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$03C0
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$0438
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$04B0
	dl PLOK_UnsortedData_Tilemap_StageTransform1AFrameData+$0528
	dl $FF0024
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014
	dl $FF0014

.Index40F:
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0060
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0078
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0090
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$00A8
	dl $FF0078
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0090
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0078
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0060
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0030
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0018
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$0000

.Index41E:
	dl PLOK_UnsortedData_Tilemap_StageTransform1BFrameData+$00D8

.Index41F:
	dl PLOK_UnsortedData_Tilemap_StageTransform1CFrameData+$0000

.Index420:
	dl $FF0078
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0310
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$02A0
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0230
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$01C0
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0150
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$00E0
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0070
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0000

.Index429:
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0070
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$00E0
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0150
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$01C0
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0230
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$02A0
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0310
	dl PLOK_UnsortedData_Tilemap_StageTransform1DFrameData+$0380

.Index431:
	dl PLOK_UnsortedData_Tilemap_StageTransform1EFrameData+$0000
	dl PLOK_UnsortedData_Tilemap_StageTransform1EFrameData+$0048
	dl PLOK_UnsortedData_Tilemap_StageTransform1EFrameData+$0090
	dl PLOK_UnsortedData_Tilemap_StageTransform1EFrameData+$00D8
	dl PLOK_UnsortedData_Tilemap_StageTransform1EFrameData+$0120
	dl PLOK_UnsortedData_Tilemap_StageTransform1EFrameData+$0168
	dl PLOK_UnsortedData_Tilemap_StageTransform1EFrameData+$01B0

PLOK_SizeOfTilemap_StageTransformationData:
;$86DCA8
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD8A_End-DATA_86DD8A
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DDCC_End-DATA_86DDCC
	dw DATA_86DE46_End-DATA_86DE46
	dw $86EF32-DATA_86E6EE			; Glitch: The devs accidentally set the size of this level's stage transformation data block to be much larger than necessary.
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DDA0_End-DATA_86DDA0
	dw DATA_86DDB6_End-DATA_86DDB6
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DEE8_End-DATA_86DEE8
	dw DATA_86E3F4_End-DATA_86E3F4
	dw DATA_86DFC6_End-DATA_86DFC6
	dw DATA_86E090_End-DATA_86E090
	dw DATA_86E1AA_End-DATA_86E1AA
	dw DATA_86E2D8_End-DATA_86E2D8
	dw DATA_86E302_End-DATA_86E302
	dw DATA_86E41E_End-DATA_86E41E
	dw DATA_86E470_End-DATA_86E470
	dw DATA_86E5B2_End-DATA_86E5B2
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86E654_End-DATA_86E654
	dw DATA_86E66A_End-DATA_86E66A
	dw DATA_86E680_End-DATA_86E680
	dw DATA_86E696_End-DATA_86E696
	dw DATA_86E6AC_End-DATA_86E6AC
	dw DATA_86E6C2_End-DATA_86E6C2
	dw DATA_86E6D8_End-DATA_86E6D8
	dw DATA_86E654_End-DATA_86E654
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DE46_End-DATA_86DE46
	dw DATA_86DEE8_End-DATA_86DEE8
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88
	dw DATA_86DD88_End-DATA_86DD88

PLOK_Tilemap_StageTransformationDataPtrs:
;$86DD18
	dw DATA_86DD88		; Cotton Island Beach
	dw DATA_86DD88		; Cotton Island Bridge
	dw DATA_86DD88		; Cotton Island Columns
	dw DATA_86DD8A		; Cotton Island Log Falls
	dw DATA_86DD88		; Cotton Island Rickety Bridge
	dw DATA_86DD88		; Cotton Island Crazy Cradles
	dw DATA_86DD88		; Cotton Island Blind Leap
	dw DATA_86DD88		; Cotton Island Bobbins Bros
	dw DATA_86DDCC		; Akrillic Garlen Beach
	dw DATA_86DE46		; Akrillic Sleepy Dale
	dw DATA_86E6EE		; Akrillic Plok's House
	dw DATA_86DD88		; Legacy Island Mace Cove
	dw DATA_86DD88		; Legacy Island Fool's Gap
	dw DATA_86DD88		; Legacy Island Zig Zag
	dw DATA_86DDA0		; Legacy Island Sponge Rocks
	dw DATA_86DDB6		; Legacy Island Swifty Peaks
	dw DATA_86DD88		; Legacy Island Log Trail
	dw DATA_86DD88		; Legacy Island Crouch Hill
	dw DATA_86DD88		; Legacy Island Bobbins Bros
	dw DATA_86DEE8		; Akrillic Plok Town
	dw DATA_86E3F4		; Akrillic The Penkinos
	dw DATA_86DFC6		; Akrillic Venge Thicket
	dw DATA_86E090		; Akrillic Dreamy Cove
	dw DATA_86E1AA		; Akrillic Creepy Forest
	dw DATA_86E2D8		; Akrillic Womack Spider
	dw DATA_86E302		; Akrillic Creepy Crag
	dw DATA_86E41E		; Akrillic Gohome Cavern
	dw DATA_86E470		; Akrillic Crashing Rocks
	dw DATA_86E5B2		; Akrillic Rockyfella
	dw DATA_86DD88		; Akrillic Brendammi Bog (cut level)
	dw DATA_86DD88		; Akrillic Badream Fens (cut level)
	dw DATA_86DD88		; Akrillic Breezy Beach (cut level)
	dw DATA_86E654		; Fleapit! Cycling Clever
	dw DATA_86E66A		; Fleapit! Road Hogging
	dw DATA_86E680		; Fleapit! High Flying
	dw DATA_86E696		; Fleapit! Easy Riding
	dw DATA_86E6AC		; Fleapit! In A Spin!
	dw DATA_86E6C2		; Fleapit! Real Rumblings
	dw DATA_86E6D8		; Fleapit! Silent Running
	dw DATA_86E654		; Fleapit! The Flea Queen
	dw DATA_86DD88		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw DATA_86DE46		; Test Drive Sleepy Dale (unused level ID)
	dw DATA_86DEE8		; Test Drive Plok Town (unused level ID)
	dw DATA_86DD88		; Test Drive The Penkinos (unused level ID)
	dw DATA_86DD88		; Test Drive Venge Thicket (unused level ID)
	dw DATA_86DD88		; Test Drive Dreamy Cove (unused level ID)
	dw DATA_86DD88		; Test Drive Creepy Forest (unused level ID)
	dw DATA_86DD88		; Test Drive Womack Spider (unused level ID)
	dw DATA_86DD88		; Test Drive Creepy Crag (unused level ID)
	dw DATA_86DD88		; Test Drive Gohome Cavern (unused level ID)
	dw DATA_86DD88		; Test Drive Crashing Rocks (unused level ID)
	dw DATA_86DD88		; Test Drive Rockyfella (unused level ID)
	dw DATA_86DD88		; Test Drive Brendammi Bog (unused level ID)
	dw DATA_86DD88		; Test Drive Badream Fens (unused level ID)
	dw DATA_86DD88		; Test Drive Breezy Beach (unused level ID)
	dw DATA_86DD88		; ???

; Info: Stage transformation data table:
; Byte 00-01: Lower two bytes of the pointer to the level data table. If $FFFF, that marks the end of the table.
; Byte 02-03: Index to PLOK_Tilemap_StageTransformationFrameDataPtrs
; Byte 04-05: Width of the area to affect, in 16x16 tiles
; Byte 06-07: Height of the area to affect, in 16x16 tiles
; Byte 08-09: ???
; Byte 10-11: ???
; Byte 12-13: Speed of animation
; Byte 14-15: Animation slot (ie. which frame the animation should run)
; Byte 16-17: Number of animation frames of the affected area
; Byte 18-19: Flags. If = $0001, loop animation.

DATA_86DD88:
	dw $FFFF
.End:

DATA_86DD8A:
	dw $7E8344,$0020,$0012,$0016,$00F0,$0520,$0078,$0000,$000F,$0008
	dw $FFFF
.End:

DATA_86DDA0:
	dw $7EA540,$003E,$0012,$0016,$00F0,$0520,$0078,$0000,$000F,$0008
	dw $FFFF
.End:

DATA_86DDB6:
	dw $7E399C,$00B3,$0006,$0006,$FFFF,$FFFF,$0003,$0001,$002A,$0008
	dw $FFFF
.End:

DATA_86DDCC:
	dw $7E97FA,$0000,$000A,$0005,$0818,$03C6,$3F04,$0000,$0008,$0008
	dw $7E9812,$0000,$000A,$0005,$08E0,$03C0,$3F04,$0000,$0008,$0008
	dw $7E99D6,$000C,$0006,$0004,$09D0,$03B0,$4504,$0000,$0006,$0008
	dw $7E4720,$0008,$0010,$000B,$FFFF,$FFFF,$4104,$0000,$0004,$0008
	dw $7EAEA0,$002F,$0012,$0016,$00F0,$0520,$0078,$0000,$000F,$0008
	dw $7E904C,$0012,$000C,$0002,$FFFF,$FFFF,$3F04,$0000,$000E,$0010
	dw $FFFF
.End:

DATA_86DE46:
	dw $7E5144,$005C,$000E,$000B,$FFFF,$FFFF,$4106,$0000,$0006,$0008
	dw $7E4A38,$005C,$000E,$000B,$FFFF,$FFFF,$4106,$0001,$0006,$0008
	dw $7E58EC,$005C,$000E,$000B,$FFFF,$FFFF,$4106,$0002,$0006,$0008
	dw $7E7F9E,$005C,$000E,$000B,$FFFF,$FFFF,$4106,$0003,$0006,$0008
	dw $7E9342,$0068,$000E,$000B,$FFFF,$FFFF,$4104,$0000,$000E,$0008
	dw $7E7378,$0062,$000E,$000B,$FFFF,$FFFF,$4106,$0001,$0006,$0008
	dw $7E4B5E,$0068,$000E,$000B,$FFFF,$FFFF,$4104,$0002,$000E,$0008
	dw $7E9412,$0076,$000E,$000B,$FFFF,$FFFF,$4106,$0003,$0006,$0008
	dw $FFFF
.End:

DATA_86DEE8:
	dw $7E5DB0,$007C,$0002,$0005,$0710,$0044,$0006,$0000,$000E,$0001
	dw $7E5DBC,$0081,$0002,$0005,$0710,$0044,$0006,$0001,$000E,$0001
	dw $7E5DC8,$007C,$0002,$0005,$0710,$0044,$0006,$0002,$000E,$0001
	dw $7E5DDA,$0081,$0002,$0005,$0710,$0044,$0006,$0003,$000E,$0001
	dw $7E5DE6,$007C,$0002,$0005,$0710,$0044,$0006,$0004,$000E,$0001
	dw $7E5DF2,$0081,$0002,$0005,$0710,$0044,$0006,$0005,$000E,$0001
	dw $7E460E,$008F,$000D,$0002,$0710,$0044,$4008,$0002,$000E,$0008
	dw $7E4630,$009D,$000D,$0002,$0780,$0044,$4008,$0003,$000E,$0008
	dw $7E7468,$00AF,$0004,$0004,$1024,$0070,$0001,$0001,$0001,$0008
	dw $7EB40A,$00AE,$0006,$0002,$FFFF,$FFFF,$4208,$0001,$0001,$0008
	dw $7E95E2,$00AB,$0006,$0002,$1034,$02B0,$0008,$0001,$0003,$0008
	dw $FFFF
.End:

DATA_86DFC6:
	dw $7E8814,$00DD,$0004,$0010,$FFFF,$FFFF,$4806,$0000,$0018,$0010
	dw $7E80DA,$0185,$0004,$0010,$FFFF,$FFFF,$4806,$0001,$005A,$0004
	dw $7E8B06,$014F,$0004,$0010,$FFFF,$FFFF,$4806,$0002,$0036,$0010
	dw $7E8156,$0185,$0004,$0010,$FFFF,$FFFF,$4806,$0003,$005A,$0004
	dw $7E8B82,$00F5,$0004,$0010,$FFFF,$FFFF,$4806,$0004,$005A,$0010
	dw $7E86D4,$0185,$0004,$0010,$FFFF,$FFFF,$4806,$0005,$005A,$0004
	dw $7E84CC,$00F5,$0004,$0010,$FFFF,$FFFF,$4806,$0001,$005A,$0010
	dw $7E70DC,$00F5,$0004,$0010,$FFFF,$FFFF,$4806,$0002,$005A,$0010
	dw $7E5CEC,$00F5,$0004,$0010,$FFFF,$FFFF,$4806,$0003,$005A,$0010
	dw $7EBC10,$004D,$0012,$0016,$00F0,$03F0,$0078,$0000,$000F,$0008
	dw $FFFF
.End:

DATA_86E090:
	dw $7E844C,$01DF,$0004,$0010,$0CE0,$0222,$4806,$0000,$0022,$0010
	dw $7EB54A,$021D,$0006,$0002,$0CE0,$0222,$4506,$0000,$0022,$0010
	dw $7E8480,$01DF,$0004,$0010,$0E84,$0210,$4806,$0000,$0022,$0010
	dw $7EB57E,$021D,$0006,$0002,$0E84,$0212,$4506,$0000,$0022,$0010
	dw $7E84C4,$01DF,$0004,$0010,$1090,$020A,$4806,$0000,$0022,$0010
	dw $7EB5C2,$021D,$0006,$0002,$1090,$020A,$4506,$0000,$0022,$0010
	dw $7E8500,$01F1,$0004,$0010,$1288,$0223,$4806,$0000,$0022,$0010
	dw $7EB5FE,$022F,$0006,$0002,$1288,$0223,$4506,$0000,$0022,$0010
	dw $7E8530,$01F1,$0004,$0010,$1414,$0223,$4806,$0000,$0022,$0010
	dw $7EB62E,$022F,$0006,$0002,$1414,$0223,$4506,$0000,$0022,$0010
	dw $7E8574,$01F1,$0004,$0010,$1610,$0210,$4806,$0000,$0022,$0010
	dw $7EB672,$022F,$0006,$0002,$1610,$0210,$4506,$0000,$0022,$0010
	dw $7E437E,$0214,$0004,$0010,$08F4,$0111,$4806,$0000,$0009,$0008
	dw $7E43DA,$0214,$0004,$0010,$0BCC,$0111,$4806,$0000,$0009,$0008
	dw $FFFF
.End:

DATA_86E1AA:
	dw $7E4ABE,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $7E652E,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0001,$0118,$0001
	dw $7E7B36,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $7E4DE8,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0001,$0118,$0001
	dw $7E5E10,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $7E7880,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0001,$0118,$0001
	dw $7E4E0A,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $7E4E22,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0001,$0118,$0001
	dw $7E46EC,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $7E5424,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0001,$0118,$0001
	dw $7E615C,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $7E489E,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0001,$0118,$0001
	dw $7E55D6,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $7E65FE,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0001,$0118,$0001
	dw $7E4D32,$0251,$0002,$0002,$FFFF,$FFFF,$0002,$0000,$0118,$0001
	dw $FFFF
.End:

DATA_86E2D8:
	dw $7E3734,$0369,$000C,$000C,$FFFF,$FFFF,$4904,$0000,$0004,$0004
	dw $7E3734,$036D,$000C,$000C,$FFFF,$FFFF,$0004,$0000,$0008,$0008
	dw $FFFF
.End:

DATA_86E302:
	dw $7E4656,$0375,$000C,$000E,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7E6FC6,$0375,$000C,$000E,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7E9936,$0375,$000C,$000E,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7EC1D6,$0375,$000C,$000E,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7E39E8,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7E635C,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7E63D4,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7E8CD0,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7E8D40,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7EB574,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7EB5DC,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $7EDF4C,$0382,$0009,$000A,$FFFF,$FFFF,$4A04,$0000,$000D,$0008
	dw $FFFF
.End:

DATA_86E3F4:
	dw $7E3582,$038F,$0006,$0006,$FFFF,$FFFF,$4301,$0000,$000D,$0010
	dw $7E35A2,$038F,$0006,$0006,$FFFF,$FFFF,$4401,$0000,$000D,$0010
	dw $FFFF
.End:

DATA_86E41E:
	dw $7E417C,$039C,$0004,$0007,$FFFF,$FFFF,$4104,$0000,$0008,$0008
	dw $7E4188,$039C,$0004,$0007,$FFFF,$FFFF,$4104,$0000,$0008,$0008
	dw $7E8766,$03A4,$0012,$0007,$FFFF,$FFFF,$4104,$0000,$0009,$0008
	dw $7E87AA,$03A4,$0012,$0007,$FFFF,$FFFF,$4104,$0000,$0009,$0008
	dw $FFFF
.End:

DATA_86E470:
	dw $7E768C,$03B0,$0010,$0006,$FFFF,$FFFF,$0004,$0002,$001D,$0001
	dw $7E766C,$03AF,$0010,$0006,$FFFF,$FFFF,$0004,$0002,$001D,$0001
	dw $7E764C,$03AE,$0010,$0006,$FFFF,$FFFF,$0004,$0002,$001D,$0001
	dw $7E758C,$03B0,$0010,$0006,$FFFF,$FFFF,$0004,$0001,$001D,$0001
	dw $7E754C,$03AE,$0010,$0006,$FFFF,$FFFF,$0004,$0001,$001D,$0001
	dw $7E74AC,$03B0,$0010,$0006,$FFFF,$FFFF,$0004,$0000,$001D,$0001
	dw $7E748C,$03AF,$0010,$0006,$FFFF,$FFFF,$0004,$0000,$001D,$0001
	dw $7E746C,$03AE,$0010,$0006,$FFFF,$FFFF,$0004,$0000,$001D,$0001
	dw $7E756C,$03D3,$0010,$0006,$FFFF,$FFFF,$0004,$0001,$001C,$0001
	dw $7E772C,$03D6,$0010,$0006,$FFFF,$FFFF,$0004,$0003,$001C,$0001
	dw $7E774C,$03D7,$0010,$0006,$FFFF,$FFFF,$0004,$0003,$001C,$0001
	dw $7E776C,$03D8,$0010,$0006,$FFFF,$FFFF,$0004,$0003,$001C,$0001
	dw $7E7458,$03F4,$000A,$0006,$FFFF,$FFFF,$0004,$0000,$0014,$0001
	dw $7E7538,$03F4,$000A,$0006,$FFFF,$FFFF,$0004,$0001,$0014,$0001
	dw $7E7638,$03F4,$000A,$0006,$FFFF,$FFFF,$0004,$0002,$0014,$0001
	dw $7E7718,$03F8,$000A,$0006,$FFFF,$FFFF,$0004,$0003,$0014,$0001
	dw $FFFF
.End:

DATA_86E5B2:
	dw $7E3DFC,$040F,$0004,$0003,$FFFF,$FFFF,$0006,$0002,$000F,$0010
	dw $7E3E04,$040F,$0004,$0003,$FFFF,$FFFF,$0006,$0002,$000F,$0010
	dw $7E3E0C,$040F,$0004,$0003,$FFFF,$FFFF,$0006,$0002,$000F,$0010
	dw $7E3E14,$040F,$0004,$0003,$FFFF,$FFFF,$0006,$0002,$000F,$0010
	dw $7E3B52,$041E,$0003,$0004,$FFFF,$FFFF,$0006,$0000,$0001,$0010
	dw $7E3B52,$041F,$0003,$0004,$FFFF,$FFFF,$0006,$0000,$0001,$0010
	dw $7E3B4C,$0420,$0008,$0007,$FFFF,$FFFF,$0006,$0000,$0009,$0010
	dw $7E3B4C,$0429,$0008,$0007,$FFFF,$FFFF,$0006,$0000,$0008,$0010
	dw $FFFF
.End:

DATA_86E654:
	dw $7E6EC6,$0431,$0004,$0009,$0295,$01C2,$4002,$0000,$0007,$0008
	dw $FFFF
.End:

DATA_86E66A:
	dw $7E4454,$0431,$0004,$0009,$0300,$00B1,$4002,$0000,$0007,$0008
	dw $FFFF
.End:

DATA_86E680:
	dw $7E4474,$0431,$0004,$0009,$0400,$00B1,$4002,$0000,$0007,$0008
	dw $FFFF
.End:

DATA_86E696:
	dw $7E8546,$0431,$0004,$0009,$0290,$0254,$4002,$0000,$0007,$0008
	dw $FFFF
.End:

DATA_86E6AC:
	dw $7E71A8,$0431,$0004,$0009,$0598,$01D1,$4002,$0000,$0007,$0008
	dw $FFFF
.End:

DATA_86E6C2:
	dw $7E6246,$0431,$0004,$0009,$0298,$0170,$4002,$0000,$0007,$0008
	dw $FFFF
.End:

DATA_86E6D8:
	dw $7E3F56,$0431,$0004,$0009,$031B,$0093,$4002,$0000,$0007,$0008
	dw $FFFF
.End:

DATA_86E6EE:
	dw $7E34A6,$00B0,$0005,$0006,$FFFF,$FFFF,$0000,$0001,$0001,$0008
	dw $7E3578,$00B1,$0003,$0002,$FFFF,$FFFF,$0000,$0001,$0001,$0008
	dw $7E3458,$00B2,$0006,$0007,$FFFF,$FFFF,$0000,$0001,$0001,$0008
	dw $FFFF
;.End:

;--------------------------------------------------------------------

DATA_86E72C:
	dw $0150,$0110,$0100,$0010,$0008,$013F,$0070,$08E0
	dw $00C0,$0050,$007C,$0010,$0008,$019F,$0070,$06A0
	dw $0070,$0030,$0140,$0010,$0008,$021F,$0070,$07A0
	dw $0070,$0090,$008E,$0010,$0008,$01BF,$0070,$07C0
	dw $0070,$0030,$00E4,$0010,$0008,$019F,$0070,$07C0
	dw $0070,$00A0,$00A2,$0010,$0008,$029F,$0070,$0900
	dw $0090,$0020,$010E,$0010,$0008,$039F,$0070,$0FC0
	dw $0070,$0070,$0058,$0010,$0008,$007F,$0160,$0360
	dw $0092,$0320,$00D8,$0010,$0008,$034F,$0070,$0C60
	dw $C520,$0440,$00B0,$003A,$0008,$047F,$0070,$09E0
	dw $0080,$0040,$0030,$0010,$0008,$003F,$0070,$01E0
	dw $00D0,$00F0,$00A4,$0010,$0008,$011F,$0070,$0920
	dw $0070,$0110,$0088,$0010,$0008,$019F,$0070,$0760
	dw $0070,$02C0,$0088,$0010,$0008,$031F,$0070,$0760
	dw $00C0,$0000,$00C8,$0010,$0008,$015F,$0070,$0B60
	dw $0070,$00B0,$00D0,$0010,$0008,$011F,$0070,$0BE0
	dw $0070,$0380,$00C0,$0010,$0008,$041F,$0070,$0AE0
	dw $0080,$0020,$00F0,$0010,$0008,$03BF,$0070,$0DE0
	dw $0070,$0070,$0058,$0010,$0008,$007F,$0160,$0360
	dw $C0A0,$0350,$0110,$0052,$0008,$03FF,$0070,$0B60
	dw $0070,$0040,$004C,$0010,$0008,$005F,$0070,$0250
	dw $C1C0,$01D0,$0140,$005E,$0028,$027F,$0070,$12E0
	dw $C9A0,$0110,$0188,$0070,$0008,$01EF,$0070,$1760
	dw $A0B0,$03D0,$00BC,$0068,$0028,$03EF,$0070,$0AA0
	dw $A070,$0070,$0058,$0036,$0008,$007F,$0261,$0260
	dw $C090,$0CC0,$0068,$0028,$0008,$0F7F,$0070,$0560
	dw $C0C0,$00C0,$0170,$006A,$0008,$033F,$0070,$15E0
	dw $C180,$0070,$01FE,$008E,$0008,$009F,$0070,$1EC0
	dw $0070,$0070,$0058,$0010,$0008,$007F,$0220,$01C0
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $C0C0,$0260,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $C100,$01E0,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $C080,$0150,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $C0C0,$0370,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $C240,$01B0,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $C0C0,$0290,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $C0C0,$01B0,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $0070,$0070,$0058,$0010,$0008,$007F,$0261,$0260
	dw $C9A0,$01C0,$0140,$005E,$0008,$03FF,$0070,$12E0
	dw $C080,$0500,$00C8,$0040,$0008,$053F,$0070,$0B60
	dw $C0A0,$0380,$0110,$0052,$0008,$03FF,$0070,$0B60
	dw $9070,$0780,$008C,$0010,$0008,$07BF,$0070,$07A0
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0160,$0360
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260
	dw $9070,$0070,$0058,$0010,$0008,$007F,$0280,$0260

;--------------------------------------------------------------------

DATA_86EA9C:
	dw $4800,!Define_PLOK_GFX_BG_Level_CottonIslandBeach		; Cotton Island Beach
	dw $4800,!Define_PLOK_GFX_BG_Level_CottonIslandBridge		; Cotton Island Bridge
	dw $4800,!Define_PLOK_GFX_BG_Level_CottonIslandColumns		; Cotton Island Columns
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandLogFalls		; Cotton Island Log Falls
	dw $4200,!Define_PLOK_GFX_BG_Level_CottonIslandRicketyBridge	; Cotton Island Rickety Bridge
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandCrazyCradles	; Cotton Island Crazy Cradles
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandBlindLeap	; Cotton Island Blind Leap
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandBlindLeap	; Cotton Island Bobbins Bros
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGarlenBeach		; Akrillic Garlen Beach
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicSleepyDale		; Akrillic Sleepy Dale
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicSleepyDale		; Akrillic Plok's House
	dw $4800,!Define_PLOK_GFX_BG_Level_CottonIslandBeach		; Legacy Island Mace Cove
	dw $4800,!Define_PLOK_GFX_BG_Level_CottonIslandBridge		; Legacy Island Fool's Gap
	dw $4800,!Define_PLOK_GFX_BG_Level_CottonIslandColumns		; Legacy Island Zig Zag
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandLogFalls		; Legacy Island Sponge Rocks
	dw $4200,!Define_PLOK_GFX_BG_Level_CottonIslandRicketyBridge	; Legacy Island Swifty Peaks
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandCrazyCradles	; Legacy Island Log Trail
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandBlindLeap	; Legacy Island Crouch Hill
	dw $4600,!Define_PLOK_GFX_BG_Level_CottonIslandBlindLeap	; Legacy Island Bobbins Bros
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicSleepyDale		; Akrillic Plok Town
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicThePenkinos		; Akrillic The Penkinos
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicVengeThicket		; Akrillic Venge Thicket
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicVengeThicket		; Akrillic Dreamy Cove
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyForest		; Akrillic Creepy Forest
	dw $4000,!Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var03		; Akrillic Womack Spider
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyCrag		; Akrillic Creepy Crag
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Akrillic Gohome Cavern
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyCrag		; Akrillic Crashing Rocks
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyCrag		; Akrillic Rockyfella
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyCrag		; Akrillic Brendammi Bog (cut level)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGarlenBeach		; Akrillic Badream Fens (cut level)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGarlenBeach		; Akrillic Breezy Beach (cut level)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! Cycling Clever
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! Road Hogging
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! High Flying
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! Easy Riding
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! In A Spin!
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! Real Rumblings
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! Silent Running
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Fleapit! The Flea Queen
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicSleepyDale		; Test Drive Sleepy Dale (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicSleepyDale		; Test Drive Plok Town (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicSleepyDale		; Test Drive The Penkinos (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicThePenkinos		; Test Drive Venge Thicket (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicVengeThicket		; Test Drive Dreamy Cove (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicVengeThicket		; Test Drive Creepy Forest (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyForest		; Test Drive Womack Spider (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicVengeThicket		; Test Drive Creepy Crag (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyCrag		; Test Drive Gohome Cavern (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGohomeCavern		; Test Drive Crashing Rocks (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGarlenBeach		; Test Drive Rockyfella (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyCrag		; Test Drive Brendammi Bog (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicCreepyCrag		; Test Drive Badream Fens (unused level ID)
	dw $4000,!Define_PLOK_GFX_BG_Level_AkrillicGarlenBeach		; Test Drive Breezy Beach (unused level ID)

;--------------------------------------------------------------------

PLOK_LevelForegroundGraphicsIndexes:
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Beach
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Bridge
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Columns
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Log Falls
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Rickety Bridge
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Crazy Cradles
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Blind Leap
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Cotton Island Bobbins Bros
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Garlen Beach
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var01	;/	
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Sleepy Dale
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var02	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Plok's House
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_GrandpappyStatue		;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var02	;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Mace Cove
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Fool's Gap
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Zig Zag
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Sponge Rocks
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Swifty Peaks
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Log Trail
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Crouch Hill
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_CottonIsland		;\ Legacy Island Bobbins Bros
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Plok Town
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var02	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic The Penkinos
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var03	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Venge Thicket
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Dreamy Cove
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Creepy Forest
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var04	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var02	;\ Akrillic Womack Spider
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var05	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var04	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Creepy Crag
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var05	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Gohome Cavern
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Crashing Rocks
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Rockyfella
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var07	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var07	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var08	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var08	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Badream Fens (cut level)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var09	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var08	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var09	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! Cycling Clever
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! Road Hogging
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! High Flying
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! Easy Riding
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! In A Spin!
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! Real Rumblings
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! Silent Running
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Fleapit! The Flea Queen
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Fleapit			;\ Test Drive Secret Warp! (Costume/vehicle test level)
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;|
	dw $FFFF						;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var02	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var02	;/
	dw !Define_PLOK_GFX_FG_Level_Objects			;\ Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var01	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var02	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var04	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var05	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var03	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var06	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var07	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var07	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var08	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var04	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var08	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot4_Var08	;|
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot5_Var05	;/
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot1_Var01	;\ Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_GFX_FG_Level_Akrillic_Slot2_Var09	;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;|
	dw !Define_PLOK_GFX_FG_Level_Objects			;/

;--------------------------------------------------------------------

PLOK_LevelMusicTable:
	dw !Define_PLOK_Music_CottonIsland	; Cotton Island Beach
	dw !Define_PLOK_Music_CottonIsland	; Cotton Island Bridge
	dw !Define_PLOK_Music_CottonIsland	; Cotton Island Columns
	dw !Define_PLOK_Music_CottonIsland	; Cotton Island Log Falls
	dw !Define_PLOK_Music_CottonIsland	; Cotton Island Rickety Bridge
	dw !Define_PLOK_Music_CottonIsland	; Cotton Island Crazy Cradles
	dw !Define_PLOK_Music_CottonIsland	; Cotton Island Blind Leap
	dw !Define_PLOK_Music_Boss		; Cotton Island Bobbins Bros
	dw !Define_PLOK_Music_Beach		; Akrillic Garlen Beach
	dw !Define_PLOK_Music_Akrillic		; Akrillic Sleepy Dale
	dw !Define_PLOK_Music_PloksHouse	; Akrillic Plok's House
	dw !Define_PLOK_Music_LegacyIsland	; Legacy Island Mace Cove
	dw !Define_PLOK_Music_LegacyIsland	; Legacy Island Fool's Gap
	dw !Define_PLOK_Music_LegacyIsland	; Legacy Island Zig Zag
	dw !Define_PLOK_Music_LegacyIsland	; Legacy Island Sponge Rocks
	dw !Define_PLOK_Music_LegacyIsland	; Legacy Island Swifty Peaks
	dw !Define_PLOK_Music_LegacyIsland	; Legacy Island Log Trail
	dw !Define_PLOK_Music_LegacyIsland	; Legacy Island Crouch Hill
	dw !Define_PLOK_Music_Boss		; Legacy Island Bobbins Bros
	dw !Define_PLOK_Music_Akrillic		; Akrillic Plok Town
	dw !Define_PLOK_Music_Boss		; Akrillic The Penkinos
	dw !Define_PLOK_Music_PloksHouse	; Akrillic Venge Thicket
	dw !Define_PLOK_Music_Beach		; Akrillic Dreamy Cove
	dw !Define_PLOK_Music_Fleapit		; Akrillic Creepy Forest
	dw !Define_PLOK_Music_Boss		; Akrillic Womack Spider
	dw !Define_PLOK_Music_CreepyCrag	; Akrillic Creepy Crag
	dw !Define_PLOK_Music_Cavern		; Akrillic Gohome Cavern
	dw !Define_PLOK_Music_Beach		; Akrillic Crashing Rocks
	dw !Define_PLOK_Music_Boss		; Akrillic Rockyfella
	dw !Define_PLOK_Music_PloksHouse	; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Music_PloksHouse	; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Music_PloksHouse	; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Music_Fleapit		; Fleapit! Cycling Clever
	dw !Define_PLOK_Music_Fleapit		; Fleapit! Road Hogging
	dw !Define_PLOK_Music_Fleapit		; Fleapit! High Flying
	dw !Define_PLOK_Music_Fleapit		; Fleapit! Easy Riding
	dw !Define_PLOK_Music_Fleapit		; Fleapit! In A Spin!
	dw !Define_PLOK_Music_Fleapit		; Fleapit! Real Rumblings
	dw !Define_PLOK_Music_Fleapit		; Fleapit! Silent Running
	dw !Define_PLOK_Music_Boss		; Fleapit! The Flea Queen
	dw !Define_PLOK_Music_Boss		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???
	dw !Define_PLOK_Music_PloksHouse	; ???

;--------------------------------------------------------------------

PLOK_LevelFGPalettes:
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Beach
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Bridge
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Columns
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Log Falls
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Rickety Bridge
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Crazy Cradles
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Blind Leap
	dw !Define_PLOK_Palette_FG_CottonIsland			; Cotton Island Bobbins Bros
	dw !Define_PLOK_Palette_FG_AkrillicGarlenBeach		; Akrillic Garlen Beach
	dw !Define_PLOK_Palette_FG_AkrillicSleepyDale		; Akrillic Sleepy Dale
	dw !Define_PLOK_Palette_FG_AkrillicPloksHouse		; Akrillic Plok's House
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Mace Cove
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Fool's Gap
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Zig Zag
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Sponge Rocks
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Swifty Peaks
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Log Trail
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Crouch Hill
	dw !Define_PLOK_Palette_FG_LegacyIsland			; Legacy Island Bobbins Bros
	dw !Define_PLOK_Palette_FG_AkrillicPlokTown		; Akrillic Plok Town
	dw !Define_PLOK_Palette_FG_AkrillicThePenkinos		; Akrillic The Penkinos
	dw !Define_PLOK_Palette_FG_AkrillicVengeThicket		; Akrillic Venge Thicket
	dw !Define_PLOK_Palette_FG_AkrillicDreamyCove		; Akrillic Dreamy Cove
	dw !Define_PLOK_Palette_FG_AkrillicCreepyForest		; Akrillic Creepy Forest
	dw !Define_PLOK_Palette_FG_AkrillicWomackSpider		; Akrillic Womack Spider
	dw !Define_PLOK_Palette_FG_AkrillicCreepyCrag		; Akrillic Creepy Crag
	dw !Define_PLOK_Palette_FG_AkrillicGohomeCavern		; Akrillic Gohome Cavern
	dw !Define_PLOK_Palette_FG_AkrillicCrashingRocks	; Akrillic Crashing Rocks
	dw !Define_PLOK_Palette_FG_AkrillicRockyfella		; Akrillic Rockyfella
	dw !Define_PLOK_Palette_FG_AkrillicBrendammiBog		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Palette_FG_AkrillicBadreamFens		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Palette_FG_AkrillicBadreamFens		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! Cycling Clever
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! Road Hogging
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! High Flying
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! Easy Riding
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! In A Spin!
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! Real Rumblings
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! Silent Running
	dw !Define_PLOK_Palette_FG_Fleapit			; Fleapit! The Flea Queen
	dw !Define_PLOK_Palette_FG_Fleapit			; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Palette_FG_AkrillicSleepyDale		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicPloksHouse		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicPlokTown		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicThePenkinos		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicVengeThicket		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicDreamyCove		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicCreepyForest		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicWomackSpider		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicCreepyCrag		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicGohomeCavern		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicCrashingRocks	; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicRockyfella		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicBrendammiBog		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Palette_FG_AkrillicBadreamFens		; Test Drive Breezy Beach (unused level ID)

PLOK_LevelBGPalettes:
	dw !Define_PLOK_Palette_BG_CottonIslandBeach		; Cotton Island Beach
	dw !Define_PLOK_Palette_BG_CottonIslandBridge		; Cotton Island Bridge
	dw !Define_PLOK_Palette_BG_CottonIslandColumns		; Cotton Island Columns
	dw !Define_PLOK_Palette_BG_CottonIslandLogFalls		; Cotton Island Log Falls
	dw !Define_PLOK_Palette_BG_CottonIslandRicketyBridge	; Cotton Island Rickety Bridge
	dw !Define_PLOK_Palette_BG_CottonIslandCrazyCradles	; Cotton Island Crazy Cradles
	dw !Define_PLOK_Palette_BG_CottonIslandBlindLeap	; Cotton Island Blind Leap
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; Cotton Island Bobbins Bros
	dw !Define_PLOK_Palette_BG_AkrillicGarlenBeach		; Akrillic Garlen Beach
	dw !Define_PLOK_Palette_BG_AkrillicSleepyDale		; Akrillic Sleepy Dale
	dw !Define_PLOK_Palette_BG_AkrillicPloksHouse		; Akrillic Plok's House
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Mace Cove
	dw !Define_PLOK_Palette_BG_LegacyIslandFoolsGap		; Legacy Island Fool's Gap
	dw !Define_PLOK_Palette_BG_LegacyIslandZigZag		; Legacy Island Zig Zag
	dw !Define_PLOK_Palette_BG_LegacyIslandSpongeRocks	; Legacy Island Sponge Rocks
	dw !Define_PLOK_Palette_BG_LegacyIslandSwiftyPeaks	; Legacy Island Swifty Peaks
	dw !Define_PLOK_Palette_BG_LegacyIslandLogTrail		; Legacy Island Log Trail
	dw !Define_PLOK_Palette_BG_LegacyIslandCrouchHill	; Legacy Island Crouch Hill
	dw !Define_PLOK_Palette_BG_LegacyIslandBobbinsBros	; Legacy Island Bobbins Bros
	dw !Define_PLOK_Palette_BG_AkrillicPlokTown		; Akrillic Plok Town
	dw !Define_PLOK_Palette_BG_AkrillicThePenkinos		; Akrillic The Penkinos
	dw !Define_PLOK_Palette_BG_AkrillicVengeThicket		; Akrillic Venge Thicket
	dw !Define_PLOK_Palette_BG_AkrillicDreamyCove		; Akrillic Dreamy Cove
	dw !Define_PLOK_Palette_BG_AkrillicCreepyForest		; Akrillic Creepy Forest
	dw !Define_PLOK_Palette_BG_AkrillicWomackSpider		; Akrillic Womack Spider
	dw !Define_PLOK_Palette_BG_AkrillicCreepyCrag		; Akrillic Creepy Crag
	dw !Define_PLOK_Palette_BG_AkrillicGohomeCavern		; Akrillic Gohome Cavern
	dw !Define_PLOK_Palette_BG_AkrillicCrashingRocks	; Akrillic Crashing Rocks
	dw !Define_PLOK_Palette_BG_AkrillicRockyfella		; Akrillic Rockyfella
	dw !Define_PLOK_Palette_BG_AkrillicBrendammiBog		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Palette_BG_AkrillicBadreamFens		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Palette_BG_AkrillicBreezyBeach		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Palette_BG_FleapitCyclingClever		; Fleapit! Cycling Clever
	dw !Define_PLOK_Palette_BG_FleapitRoadHogging		; Fleapit! Road Hogging
	dw !Define_PLOK_Palette_BG_FleapitHighFlying		; Fleapit! High Flying
	dw !Define_PLOK_Palette_BG_FleapitEasyRiding		; Fleapit! Easy Riding
	dw !Define_PLOK_Palette_BG_FleapitInASpin		; Fleapit! In A Spin!
	dw !Define_PLOK_Palette_BG_FleapitRealRumblings		; Fleapit! Real Rumblings
	dw !Define_PLOK_Palette_BG_FleapitSilentRunning		; Fleapit! Silent Running
	dw !Define_PLOK_Palette_BG_FleapitTheFleaQueen		; Fleapit! The Flea Queen
	dw !Define_PLOK_Palette_BG_AkrillicGohomeCavern		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Palette_BG_AkrillicSleepyDale		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicPloksHouse		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicPlokTown		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicThePenkinos		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicVengeThicket		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicDreamyCove		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicCreepyForest		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicWomackSpider		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicCreepyCrag		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicGohomeCavern		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicCrashingRocks	; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicRockyfella		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicBrendammiBog		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicBadreamFens		; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; ???
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; ???
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; ???
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; ???

;--------------------------------------------------------------------

PLOK_CheatCodeInputs:													; Note: Cheats
	dw !Joypad_DPadR,!Joypad_DPadU,!Joypad_B,!Joypad_B,!Joypad_A,!Joypad_DPadD,!Joypad_DPadU,!Joypad_X		; "RUBBADUX" cheat
	dw !Joypad_Y,!Joypad_A,!Joypad_B,!Joypad_A,!Joypad_DPadD,!Joypad_A,!Joypad_B,!Joypad_A				; "YABADABA" cheat
	dw !Joypad_B,!Joypad_DPadR,!Joypad_DPadU,!Joypad_X,!Joypad_Y,!Joypad_A,!Joypad_DPadL,!Joypad_DPadL		; "BRUXYALL" cheat
	dw !Joypad_DPadU,!Joypad_DPadR,!Joypad_B,!Joypad_A,!Joypad_DPadD,!Joypad_DPadL,!Joypad_A,!Joypad_DPadD		; "URBADLAD" cheat

;--------------------------------------------------------------------

PLOK_LevelSpritePalettes:
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Beach
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Bridge
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Columns
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Log Falls
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Rickety Bridge
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Crazy Cradles
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Blind Leap
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Cotton Island Bobbins Bros
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Garlen Beach
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Sleepy Dale
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Plok's House
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Mace Cove
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Fool's Gap
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Zig Zag
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Sponge Rocks
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Swifty Peaks
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Log Trail
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Crouch Hill
	dw !Define_PLOK_Palette_Sprite_CottonIsland		; Legacy Island Bobbins Bros
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Plok Town
	dw !Define_PLOK_Palette_Sprite_ThePenkinos		; Akrillic The Penkinos
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Venge Thicket
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Dreamy Cove
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Creepy Forest
	dw !Define_PLOK_Palette_Sprite_WomackSpider		; Akrillic Womack Spider
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Creepy Crag
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Gohome Cavern
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Crashing Rocks
	dw !Define_PLOK_Palette_Sprite_Rockyfella		; Akrillic Rockyfella
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Fleapit! Cycling Clever
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Fleapit! Road Hogging
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Fleapit! High Flying
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Fleapit! Easy Riding
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Fleapit! In A Spin!
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Fleapit! Real Rumblings
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Fleapit! Silent Running
	dw !Define_PLOK_Palette_Sprite_TheFleaQueen		; Fleapit! The Flea Queen
	dw !Define_PLOK_Palette_Sprite_Fleapit			; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Palette_Sprite_Akrillic			; Test Drive Breezy Beach (unused level ID)

;--------------------------------------------------------------------

PLOK_LevelSpriteGraphics:
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Beach
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Bridge
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Columns
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Log Falls
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Rickety Bridge
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Crazy Cradles
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Blind Leap
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Cotton Island Bobbins Bros
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicGarlenBeach		; Akrillic Garlen Beach
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Akrillic Sleepy Dale
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Akrillic Plok's House
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Mace Cove
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Fool's Gap
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Zig Zag
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Sponge Rocks
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Swifty Peaks
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Log Trail
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Crouch Hill
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Legacy Island Bobbins Bros
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Akrillic Plok Town
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicThePenkinos		; Akrillic The Penkinos
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Akrillic Venge Thicket
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicGarlenBeach		; Akrillic Dreamy Cove
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Akrillic Creepy Forest
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicWomackSpider		; Akrillic Womack Spider
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Akrillic Creepy Crag
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicGarlenBeach		; Akrillic Gohome Cavern
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicGarlenBeach		; Akrillic Crashing Rocks
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicRockyfella		; Akrillic Rockyfella
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Fleapit! Cycling Clever
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Fleapit! Road Hogging
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Fleapit! High Flying
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Fleapit! Easy Riding
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Fleapit! In A Spin!
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Fleapit! Real Rumblings
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Fleapit! Silent Running
	dw !Define_PLOK_GFX_Sprite_Level_FleaQueen			; Fleapit! The Flea Queen
	dw !Define_PLOK_GFX_Sprite_Level_Fleapit			; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_AkrillicSleepyDale		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_GFX_Sprite_Level_CottonIsland			; Test Drive Breezy Beach (unused level ID)

;--------------------------------------------------------------------

PLOK_LevelDataIndex:
	dw !Define_PLOK_LevelData_CottonIslandBeach		; Cotton Island Beach
	dw !Define_PLOK_LevelData_CottonIslandBridge		; Cotton Island Bridge
	dw !Define_PLOK_LevelData_CottonIslandColumns		; Cotton Island Columns
	dw !Define_PLOK_LevelData_CottonIslandLogFalls		; Cotton Island Log Falls
	dw !Define_PLOK_LevelData_CottonIslandRicketyBridge	; Cotton Island Rickety Bridge
	dw !Define_PLOK_LevelData_CottonIslandCrazyCradles	; Cotton Island Crazy Cradles
	dw !Define_PLOK_LevelData_CottonIslandBlindLeap		; Cotton Island Blind Leap
	dw !Define_PLOK_LevelData_CottonIslandBobbinsBros	; Cotton Island Bobbins Bros
	dw !Define_PLOK_LevelData_AkrillicGarlenBeach		; Akrillic Garlen Beach
	dw !Define_PLOK_LevelData_AkrillicSleepyDale		; Akrillic Sleepy Dale
	dw !Define_PLOK_LevelData_AkrillicPloksHouse		; Akrillic Plok's House
	dw !Define_PLOK_LevelData_LegacyIslandMaceCove		; Legacy Island Mace Cove
	dw !Define_PLOK_LevelData_LegacyIslandFoolsGap		; Legacy Island Fool's Gap
	dw !Define_PLOK_LevelData_LegacyIslandZigZag		; Legacy Island Zig Zag
	dw !Define_PLOK_LevelData_LegacyIslandSpongeRocks	; Legacy Island Sponge Rocks
	dw !Define_PLOK_LevelData_LegacyIslandSwiftyPeaks	; Legacy Island Swifty Peaks
	dw !Define_PLOK_LevelData_LegacyIslandLogTrail		; Legacy Island Log Trail
	dw !Define_PLOK_LevelData_LegacyIslandCrouchHill	; Legacy Island Crouch Hill
	dw !Define_PLOK_LevelData_LegacyIslandBobbinsBros	; Legacy Island Bobbins Bros
	dw !Define_PLOK_LevelData_AkrillicPlokTown		; Akrillic Plok Town
	dw !Define_PLOK_LevelData_AkrillicThePenkinos		; Akrillic The Penkinos
	dw !Define_PLOK_LevelData_AkrillicVengeThicket		; Akrillic Venge Thicket
	dw !Define_PLOK_LevelData_AkrillicDreamyCove		; Akrillic Dreamy Cove
	dw !Define_PLOK_LevelData_AkrillicCreepyForest		; Akrillic Creepy Forest
	dw !Define_PLOK_LevelData_AkrillicWomackSpider		; Akrillic Womack Spider
	dw !Define_PLOK_LevelData_AkrillicCreepyCrag 		; Akrillic Creepy Crag
	dw !Define_PLOK_LevelData_AkrillicGohomeCavern		; Akrillic Gohome Cavern
	dw !Define_PLOK_LevelData_AkrillicCrashingRocks		; Akrillic Crashing Rocks
	dw !Define_PLOK_LevelData_AkrillicRockyfella		; Akrillic Rockyfella
	dw !Define_PLOK_LevelData_AkrillicBrendammiBog		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_LevelData_AkrillicBadreamFens		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_LevelData_AkrillicBreezyBeach		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_LevelData_FleapitCyclingClever		; Fleapit! Cycling Clever
	dw !Define_PLOK_LevelData_FleapitRoadHogging		; Fleapit! Road Hogging
	dw !Define_PLOK_LevelData_FleapitHighFlying		; Fleapit! High Flying
	dw !Define_PLOK_LevelData_FleapitEasyRiding		; Fleapit! Easy Riding
	dw !Define_PLOK_LevelData_FleapitInASpin		; Fleapit! In A Spin!
	dw !Define_PLOK_LevelData_FleapitRealRumblings		; Fleapit! Real Rumblings
	dw !Define_PLOK_LevelData_FleapitSilentRunning		; Fleapit! Silent Running
	dw !Define_PLOK_LevelData_FleapitTheFleaQueen		; Fleapit! The Flea Queen
	dw !Define_PLOK_LevelData_TestDriveSecretWarp		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_LevelData_AkrillicSleepyDale		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicPloksHouse		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicPlokTown		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicThePenkinos		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicVengeThicket		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicDreamyCove		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicCreepyForest		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicWomackSpider		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicCreepyCrag 		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicGohomeCavern		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicCrashingRocks		; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicRockyfella		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicBrendammiBog		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_LevelData_AkrillicBadreamFens		; Test Drive Breezy Beach (unused level ID)

PLOK_LevelBGDataIndex:
	dw !Define_PLOK_LevelBG_CottonIslandBeach		; Cotton Island Beach
	dw !Define_PLOK_LevelBG_CottonIslandBridge		; Cotton Island Bridge
	dw !Define_PLOK_LevelBG_CottonIslandColumns		; Cotton Island Columns
	dw !Define_PLOK_LevelBG_CottonIslandLogFalls		; Cotton Island Log Falls
	dw !Define_PLOK_LevelBG_CottonIslandRicketyBridge	; Cotton Island Rickety Bridge
	dw !Define_PLOK_LevelBG_CottonIslandCrazyCradles	; Cotton Island Crazy Cradles
	dw !Define_PLOK_LevelBG_CottonIslandBlindLeap		; Cotton Island Blind Leap
	dw !Define_PLOK_LevelBG_CottonIslandBobbinsBros		; Cotton Island Bobbins Bros
	dw !Define_PLOK_LevelBG_AkrillicGarlenBeach		; Akrillic Garlen Beach
	dw !Define_PLOK_LevelBG_AkrillicSleepyDale		; Akrillic Sleepy Dale
	dw !Define_PLOK_LevelBG_AkrillicPloksHouse		; Akrillic Plok's House
	dw !Define_PLOK_LevelBG_CottonIslandBeach		; Legacy Island Mace Cove
	dw !Define_PLOK_LevelBG_CottonIslandBridge		; Legacy Island Fool's Gap
	dw !Define_PLOK_LevelBG_CottonIslandColumns		; Legacy Island Zig Zag
	dw !Define_PLOK_LevelBG_CottonIslandLogFalls		; Legacy Island Sponge Rocks
	dw !Define_PLOK_LevelBG_CottonIslandRicketyBridge	; Legacy Island Swifty Peaks
	dw !Define_PLOK_LevelBG_CottonIslandCrazyCradles	; Legacy Island Log Trail
	dw !Define_PLOK_LevelBG_CottonIslandBlindLeap		; Legacy Island Crouch Hill
	dw !Define_PLOK_LevelBG_CottonIslandBobbinsBros		; Legacy Island Bobbins Bros
	dw !Define_PLOK_LevelBG_AkrillicPlokTown		; Akrillic Plok Town
	dw !Define_PLOK_LevelBG_AkrillicThePenkinos		; Akrillic The Penkinos
	dw !Define_PLOK_LevelBG_AkrillicVengeThicket		; Akrillic Venge Thicket
	dw !Define_PLOK_LevelBG_AkrillicDreamyCove		; Akrillic Dreamy Cove
	dw !Define_PLOK_LevelBG_AkrillicCreepyForest		; Akrillic Creepy Forest
	dw !Define_PLOK_LevelBG_AkrillicWomackSpider		; Akrillic Womack Spider
	dw !Define_PLOK_LevelBG_AkrillicCreepyCrag		; Akrillic Creepy Crag
	dw !Define_PLOK_LevelBG_AkrillicGohomeCavern		; Akrillic Gohome Cavern
	dw !Define_PLOK_LevelBG_AkrillicCrashingRocks		; Akrillic Crashing Rocks
	dw !Define_PLOK_LevelBG_AkrillicRockyfella		; Akrillic Rockyfella
	dw !Define_PLOK_LevelBG_AkrillicBrendammiBog		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_LevelBG_AkrillicBadreamFens		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_LevelBG_AkrillicBreezyBeach		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Fleapit! Cycling Clever
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Fleapit! Road Hogging
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Fleapit! High Flying
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Fleapit! Easy Riding
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Fleapit! In A Spin!
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Fleapit! Real Rumblings
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Fleapit! Silent Running
	dw !Define_PLOK_LevelBG_FleapitTheFleaQueen		; Fleapit! The Flea Queen
	dw !Define_PLOK_LevelBG_FleapitCyclingClever		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_LevelBG_AkrillicSleepyDale		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicPloksHouse		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicPlokTown		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicThePenkinos		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicVengeThicket		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicDreamyCove		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicCreepyForest		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicWomackSpider		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicCreepyCrag		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicGohomeCavern		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicCrashingRocks		; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicRockyfella		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicBrendammiBog		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_LevelBG_AkrillicBadreamFens		; Test Drive Breezy Beach (unused level ID)

;--------------------------------------------------------------------

DATA_86F0FE:
	dw $003C,$0003,$0000,$003C,$0022,$0000,$0096,$3002
	dw $0000,$0004,$0046,$03F2,$0004,$4046,$03F4,$00A0
	dw $4046,$03FA,$0004,$4046,$03F4,$0032,$0046,$03F2
	dw $0004,$4046,$03F4,$00A0,$4046,$03FA,$0023,$0023
	dw $0000,$0002,$0002,$0000,$0001,$0026,$0000,$0032
	dw $0006,$0000,$0032,$1006,$0000,$00A0,$5002,$0000
	dw $0004,$0046,$03F2,$0004,$4046,$03F4,$006E,$4046
	dw $03FA,$0004,$4046,$03F4,$00A0,$0046,$03F2,$0004
	dw $4046,$03F4,$0004,$4046,$03F6,$0064,$0046,$03F8
	dw $0004,$4046,$03F6,$0004,$4046,$03F4,$0004,$0046
	dw $03F2,$0096,$2006,$0000,$0064,$2025,$0000,$00C8
	dw $0000,$0000,$0032,$0022,$0000,$003C,$FF42,$03FC
	dw $0004,$FF42,$03FE,$0004,$FF42,$0400,$0004,$FF42
	dw $0402,$0082,$FF42,$0404,$0004,$FF42,$0402,$0004
	dw $FF42,$0400,$0004,$FF42,$03FE,$0082,$FF42,$03FC
	dw $0004,$FF42,$03FE,$0004,$FF42,$0400,$0004,$FF42
	dw $0402,$0082,$FF42,$0404,$0004,$FF42,$0402,$0004
	dw $FF42,$0400,$0004,$FF42,$03FE,$0082,$FF42,$03FC
	dw $0004,$FF42,$03FE,$0004,$FF42,$0400,$0004,$FF42
	dw $0402,$0064,$FF42,$0404,$FFFF

;--------------------------------------------------------------------

; Note: This table controls what graphics are loaded on the overworld based on the current level, yet they're all set to load the same graphics.
; Perhaps the devs originally planned on having Plok occasionally appear at a different place on the overworld after beating a level?
; Either that, or Legacy Island and/or the Fleapit originally used separate graphics files before the devs realized all the graphics could fit in VRAM all at once?

PLOK_OverworldFGGraphics:
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Beach
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Bridge
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Columns
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Log Falls
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Rickety Bridge
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Crazy Cradles
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Blind Leap
	dw !Define_PLOK_GFX_FG_Overworld	; Cotton Island Bobbins Bros
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Garlen Beach
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Sleepy Dale
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Plok's House
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Mace Cove
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Fool's Gap
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Zig Zag
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Sponge Rocks
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Swifty Peaks
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Log Trail
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Crouch Hill
	dw !Define_PLOK_GFX_FG_Overworld	; Legacy Island Bobbins Bros
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Plok Town
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic The Penkinos
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Venge Thicket
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Dreamy Cove
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Creepy Forest
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Womack Spider
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Creepy Crag
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Gohome Cavern
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Crashing Rocks
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Rockyfella
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_GFX_FG_Overworld	; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! Cycling Clever
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! Road Hogging
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! High Flying
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! Easy Riding
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! In A Spin!
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! Real Rumblings
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! Silent Running
	dw !Define_PLOK_GFX_FG_Overworld	; Fleapit! The Flea Queen
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_GFX_FG_Overworld	; ???
	dw !Define_PLOK_GFX_FG_Overworld	; ???
	dw !Define_PLOK_GFX_FG_Overworld	; ???
	dw !Define_PLOK_GFX_FG_Overworld	; ???

PLOK_OverworldFGPalettes:
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Beach
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Bridge
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Columns
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Log Falls
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Rickety Bridge
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Crazy Cradles
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Blind Leap
	dw !Define_PLOK_Palette_FG_Overworld	; Cotton Island Bobbins Bros
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Garlen Beach
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Sleepy Dale
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Plok's House
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Mace Cove
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Fool's Gap
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Zig Zag
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Sponge Rocks
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Swifty Peaks
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Log Trail
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Crouch Hill
	dw !Define_PLOK_Palette_FG_Overworld	; Legacy Island Bobbins Bros
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Plok Town
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic The Penkinos
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Venge Thicket
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Dreamy Cove
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Creepy Forest
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Womack Spider
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Creepy Crag
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Gohome Cavern
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Crashing Rocks
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Rockyfella
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Palette_FG_Overworld	; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! Cycling Clever
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! Road Hogging
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! High Flying
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! Easy Riding
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! In A Spin!
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! Real Rumblings
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! Silent Running
	dw !Define_PLOK_Palette_FG_Overworld	; Fleapit! The Flea Queen
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_Palette_FG_Overworld	; ???
	dw !Define_PLOK_Palette_FG_Overworld	; ???
	dw !Define_PLOK_Palette_FG_Overworld	; ???
	dw !Define_PLOK_Palette_FG_Overworld	; ???

PLOK_OverworldWaterPalettes:
	dw !Define_PLOK_Palette_BG_CottonIslandBeach		; Cotton Island Beach
	dw !Define_PLOK_Palette_BG_CottonIslandBridge		; Cotton Island Bridge
	dw !Define_PLOK_Palette_BG_CottonIslandColumns		; Cotton Island Columns
	dw !Define_PLOK_Palette_BG_CottonIslandLogFalls		; Cotton Island Log Falls
	dw !Define_PLOK_Palette_BG_CottonIslandRicketyBridge	; Cotton Island Rickety Bridge
	dw !Define_PLOK_Palette_BG_CottonIslandCrazyCradles	; Cotton Island Crazy Cradles
	dw !Define_PLOK_Palette_BG_CottonIslandBlindLeap	; Cotton Island Blind Leap
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; Cotton Island Bobbins Bros
	dw !Define_PLOK_Palette_BG_AkrillicGarlenBeach		; Akrillic Garlen Beach
	dw !Define_PLOK_Palette_BG_AkrillicGarlenBeach		; Akrillic Sleepy Dale
	dw !Define_PLOK_Palette_BG_CottonIslandBeach		; Akrillic Plok's House
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Mace Cove
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Fool's Gap
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Zig Zag
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Sponge Rocks
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Swifty Peaks
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Log Trail
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Crouch Hill
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; Legacy Island Bobbins Bros
	dw !Define_PLOK_Palette_BG_CottonIslandBeach		; Akrillic Plok Town
	dw !Define_PLOK_Palette_BG_AkrillicThePenkinos		; Akrillic The Penkinos
	dw !Define_PLOK_Palette_BG_CottonIslandBridge		; Akrillic Venge Thicket
	dw !Define_PLOK_Palette_BG_CottonIslandBridge		; Akrillic Dreamy Cove
	dw !Define_PLOK_Palette_BG_CottonIslandBridge		; Akrillic Creepy Forest
	dw !Define_PLOK_Palette_BG_CottonIslandBridge		; Akrillic Womack Spider
	dw !Define_PLOK_Palette_BG_AkrillicCreepyCrag		; Akrillic Creepy Crag
	dw !Define_PLOK_Palette_BG_AkrillicGohomeCavern		; Akrillic Gohome Cavern
	dw !Define_PLOK_Palette_BG_AkrillicCrashingRocks	; Akrillic Crashing Rocks
	dw !Define_PLOK_Palette_BG_AkrillicCrashingRocks	; Akrillic Rockyfella
	dw !Define_PLOK_Palette_BG_AkrillicRockyfella		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Palette_BG_AkrillicBrendammiBog		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Palette_BG_AkrillicBadreamFens		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Palette_BG_FleapitCyclingClever		; Fleapit! Cycling Clever
	dw !Define_PLOK_Palette_BG_FleapitRoadHogging		; Fleapit! Road Hogging
	dw !Define_PLOK_Palette_BG_FleapitHighFlying		; Fleapit! High Flying
	dw !Define_PLOK_Palette_BG_FleapitEasyRiding		; Fleapit! Easy Riding
	dw !Define_PLOK_Palette_BG_FleapitInASpin		; Fleapit! In A Spin!
	dw !Define_PLOK_Palette_BG_FleapitRealRumblings		; Fleapit! Real Rumblings
	dw !Define_PLOK_Palette_BG_FleapitSilentRunning		; Fleapit! Silent Running
	dw !Define_PLOK_Palette_BG_FleapitTheFleaQueen		; Fleapit! The Flea Queen
	dw !Define_PLOK_Palette_BG_AkrillicGarlenBeach		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Palette_BG_AkrillicSleepyDale		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicPloksHouse		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicPlokTown		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicThePenkinos		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicVengeThicket		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicDreamyCove		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicCreepyForest		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicWomackSpider		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicCreepyCrag		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicGohomeCavern		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicCrashingRocks	; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicRockyfella		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicBrendammiBog		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Palette_BG_AkrillicBadreamFens		; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; ???
	dw !Define_PLOK_Palette_BG_LegacyIslandMaceCove		; ???
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; ???
	dw !Define_PLOK_Palette_BG_CottonIslandBobbinsBros	; ???

PLOK_OverworldLayer1TilemapIndexes:
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Beach
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Bridge
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Columns
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Log Falls
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Rickety Bridge
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Crazy Cradles
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Blind Leap
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Cotton Island Bobbins Bros
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Garlen Beach
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Sleepy Dale
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Plok's House
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Mace Cove
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Fool's Gap
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Zig Zag
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Sponge Rocks
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Swifty Peaks
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Log Trail
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Crouch Hill
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; Legacy Island Bobbins Bros
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Plok Town
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic The Penkinos
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Venge Thicket
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Dreamy Cove
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Creepy Forest
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Womack Spider
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Creepy Crag
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Gohome Cavern
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Crashing Rocks
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Rockyfella
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! Cycling Clever
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! Road Hogging
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! High Flying
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! Easy Riding
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! In A Spin!
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! Real Rumblings
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! Silent Running
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Fleapit! The Flea Queen
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; ???
	dw !Define_PLOK_Tilemap_PastOverworldLayer1		; ???
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; ???
	dw !Define_PLOK_Tilemap_PresentOverworldLayer1		; ???

DATA_86F410:								; Todo: This also apparently has something to do with overworld layer 1 tilemaps?
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Beach
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Bridge
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Columns
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Log Falls
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Rickety Bridge
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Crazy Cradles
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Blind Leap
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Cotton Island Bobbins Bros
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Garlen Beach
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Sleepy Dale
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Plok's House
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Mace Cove
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Fool's Gap
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Zig Zag
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Sponge Rocks
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Swifty Peaks
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Log Trail
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Crouch Hill
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; Legacy Island Bobbins Bros
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Plok Town
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic The Penkinos
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Venge Thicket
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Dreamy Cove
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Creepy Forest
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Womack Spider
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Creepy Crag
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Gohome Cavern
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Crashing Rocks
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Rockyfella
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! Cycling Clever
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! Road Hogging
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! High Flying
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! Easy Riding
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! In A Spin!
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! Real Rumblings
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! Silent Running
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Fleapit! The Flea Queen
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; ???
	dw !Define_PLOK_Tilemap_AltPastOverworldLayer1			; ???
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; ???
	dw !Define_PLOK_Tilemap_AltPresentOverworldLayer1		; ???

PLOK_OverworldLayer2TilemapIndexes:
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Beach
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Bridge
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Columns
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Log Falls
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Rickety Bridge
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Crazy Cradles
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Blind Leap
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Cotton Island Bobbins Bros
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Garlen Beach
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Sleepy Dale
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Plok's House
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Mace Cove
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Fool's Gap
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Zig Zag
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Sponge Rocks
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Swifty Peaks
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Log Trail
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Crouch Hill
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; Legacy Island Bobbins Bros
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Plok Town
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic The Penkinos
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Venge Thicket
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Dreamy Cove
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Creepy Forest
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Womack Spider
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Creepy Crag
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Gohome Cavern
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Crashing Rocks
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Rockyfella
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Brendammi Bog (cut level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Badream Fens (cut level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Akrillic Breezy Beach (cut level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! Cycling Clever
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! Road Hogging
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! High Flying
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! Easy Riding
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! In A Spin!
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! Real Rumblings
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! Silent Running
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Fleapit! The Flea Queen
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Secret Warp! (Costume/vehicle test level)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Sleepy Dale (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Plok Town (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive The Penkinos (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Venge Thicket (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Dreamy Cove (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Creepy Forest (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Womack Spider (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Creepy Crag (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Gohome Cavern (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Crashing Rocks (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Rockyfella (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Brendammi Bog (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Badream Fens (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; Test Drive Breezy Beach (unused level ID)
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; ???
	dw !Define_PLOK_Tilemap_PastOverworldLayer2		; ???
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; ???
	dw !Define_PLOK_Tilemap_PresentOverworldLayer2		; ???

;--------------------------------------------------------------------

DATA_86F4FC:
	dw $91C0,$00B0,$0044,$0044,$0008,$011F,$0070,$02A0
	dw $90C0,$0050,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9090,$0040,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9068,$0018,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9040,$0020,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9010,$0034,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9040,$0050,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9074,$0060,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9160,$00B0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9170,$00D0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9190,$0094,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $91C0,$0130,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9220,$0080,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $91F8,$0068,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $91F8,$0038,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9220,$0030,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9248,$0028,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9288,$0030,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9298,$0068,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $91C0,$00B0,$0044,$0044,$0008,$0080,$0070,$02E0
	dw $91E6,$00A0,$0044,$0044,$0008,$0080,$0070,$02E0
	dw $9238,$0090,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9216,$00C4,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $91B4,$00E8,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9214,$00DE,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9250,$00C0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9280,$00E4,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $92B0,$00C8,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $92F0,$00D8,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $92BC,$0108,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9278,$0130,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9224,$0156,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $91CC,$029A,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $91E8,$0292,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9238,$0284,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9278,$0294,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $92A8,$02B4,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9298,$02D4,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9248,$02D4,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9208,$02E4,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9208,$02E4,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$0000,$0044,$0044,$0008,$0080,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $90B0,$00F0,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9030,$0088,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9244,$0060,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $92B0,$0108,$0044,$0044,$0008,$011F,$0070,$02E0
	dw $9198,$02F6,$0044,$0044,$0008,$011F,$0070,$02E0
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_J) != $00
else
	dw $9208,$02E4,$0044,$0044,$0008,$011F,$0070,$02E0
endif

;--------------------------------------------------------------------

; Note: Unreferenced routine? Probably some unmaintained code, since many of the JSRs/JMPs/JSLs/JMLs point to bad addresses.

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%InsertGarbageData(NULLROM, incbin, UNK_86F8AC_PLOK_J.bin)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E) != $00
	%InsertGarbageData(NULLROM, incsrc, ADDR_86F8AC_PLOK_E.asm)
	%FREE_BYTES(NULLROM, 16, $FF)
else
	%InsertGarbageData(NULLROM, incsrc, ADDR_86F8AC_PLOK_U.asm)
	%FREE_BYTES(NULLROM, 1178, $FF)
	%FREE_BYTES(NULLROM, 1, $FA)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro PLOKBank87Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

PLOK_UncompressedGFX_Bank87:
;$878000
	incbin "Graphics/GFX_878000.bin"

;--------------------------------------------------------------------

CODE_87E000:
	JSR.w CODE_87F352
	STZ.w $1FEB
	LDX.b $F0
	JSR.w (DATA_87E786,x)
	LDX.w $1F92
	JSR.w (DATA_87E044,x)
	REP.b #$30
	RTL

;--------------------------------------------------------------------

ADDR_87E014:
	JSR.w CODE_87F352
	LDA.w #$0001
	STA.w $1FEB
	LDX.b $F0
	JSR.w (DATA_87E786,x)
	LDX.w $1F92
	JSR.w (DATA_87E044,x)
	REP.b #$30
	RTL

;--------------------------------------------------------------------

ADDR_87E027:
	STA.w $1F9B
	STX.w $1F9D
	STY.w $1F9F
	RTL

;--------------------------------------------------------------------

ADDR_87E035:
	SEP.b #$10
	LDX.w $1F92
	JSR.w (DATA_87E050,x)
	RTL

;--------------------------------------------------------------------

ADDR_87E03E:
	JSR.w CODE_87F36F
	LDX.b $E2
	RTL

;--------------------------------------------------------------------

DATA_87E044:
	dw CODE_87E05C
	dw CODE_87E0E6
	dw CODE_87E167
	dw CODE_87E538
	dw CODE_87E581
	dw CODE_87E645

DATA_87E050:
	dw CODE_87E05C
	dw CODE_87E0E6
	dw CODE_87E189
	dw CODE_87E538
	dw CODE_87E581
	dw CODE_87E645

;--------------------------------------------------------------------

CODE_87E05C:
	SEP.b #$30
	LDY.b #$20
	LDX.b #$00
CODE_87E062:
	LDA.b [$E2]
	STA.b $EA
	LDA.b #$08
	STA.b $EB
CODE_87E06A:
	LDA.b #$00
	LSR.b $EA
	BCC.b CODE_87E071
	DEC
CODE_87E071:
	STA.l $001D44,x
	INX
	DEC.b $EB
	BNE.b CODE_87E06A
	INC.b $E2
	BNE.b CODE_87E087
	INC.b $E3
	BNE.b CODE_87E087
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E087:
	DEY
	BNE.b CODE_87E062
	REP.b #$20
	LDA.b $EE
	SEC
	SBC.w #$0020
	STA.b $EE
	SEP.b #$30
CODE_87E096:
	LDA.b [$E2]
	TAX
	INC.b $E2
	BNE.b CODE_87E0A6
	INC.b $E3
	BNE.b CODE_87E0A6
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E0A6:
	LDA.l $001D44,x
	BPL.b CODE_87E0D7
	STX.b $EA
	LDA.b [$E2]
	TAY
	INC.b $E2
	BNE.b CODE_87E0BE
	INC.b $E3
	BNE.b CODE_87E0BE
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E0BE:
	LDX.b $F0
CODE_87E0C0:
	LDA.b $EA
	JSR.w (DATA_87E815,x)
	DEY
	BNE.b CODE_87E0C0
	REP.b #$20
	LDA.b $EE
	SEC
	SBC.w #$0002
	STA.b $EE
	SEP.b #$20
	BNE.b CODE_87E096
	RTS

CODE_87E0D7:
	TXA
	LDX.b $F0
	JSR.w (DATA_87E815,x)
	REP.b #$20
	DEC.b $EE
	SEP.b #$20
	BNE.b CODE_87E096
	RTS

;--------------------------------------------------------------------

CODE_87E0E6:
	SEP.b #$30
	LDA.b [$E2]
	STA.b $EC
	INC.b $E2
	BNE.b CODE_87E0F9
	INC.b $E3
	BNE.b CODE_87E0F9
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E0F9:
	REP.b #$20
	DEC.b $EE
	SEP.b #$20
CODE_87E0FF:
	LDA.b [$E2]
	CMP.b $EC
	BNE.b CODE_87E14C
	INC.b $E2
	BNE.b CODE_87E112
	INC.b $E3
	BNE.b CODE_87E112
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E112:
	LDA.b [$E2]
	STA.b $EA
	INC.b $E2
	BNE.b CODE_87E123
	INC.b $E3
	BNE.b CODE_87E123
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E123:
	LDA.b [$E2]
	TAY
	INC.b $E2
	BNE.b CODE_87E133
	INC.b $E3
	BNE.b CODE_87E133
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E133:
	LDX.b $F0
CODE_87E135:
	LDA.b $EA
	JSR.w (DATA_87E815,x)
	DEY
	BNE.b CODE_87E135
	REP.b #$20
	LDA.b $EE
	SEC
	SBC.w #$0003
	STA.b $EE
	SEP.b #$20
	BNE.b CODE_87E0FF
	RTS

CODE_87E14C:
	LDX.b $F0
	JSR.w (DATA_87E815,x)
	INC.b $E2
	BNE.b CODE_87E15E
	INC.b $E3
	BNE.b CODE_87E15E
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E15E:
	REP.b #$20
	DEC.b $EE
	SEP.b #$20
	BNE.b CODE_87E0FF
	RTS

;--------------------------------------------------------------------

CODE_87E167:
	REP.b #$30
	LDA.b $E2
	STA.w $1F88
	LDA.b $E4
	STA.w $1F8A
	LDA.b $EE
	CLC
	ADC.b $E2
	ORA.w #$8000
	STA.w $1F8C
	LDA.b $E4
	ADC.w #$0000
	STA.w $1F8E
	STZ.w $1F97
CODE_87E189:
	SEP.b #$30
	LDA.b [$E2]
	STA.w $1F95
	INC.b $E2
	BNE.b CODE_87E19D
	INC.b $E3
	BNE.b CODE_87E19D
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E19D:
	LDA.w $1F95
	BIT.b #$40
	BNE.b CODE_87E1A7
	JMP.w CODE_87E279

CODE_87E1A7:
	STZ.b $F6
	BIT.b #$20
	BEQ.b CODE_87E1D8
	STZ.b $EA
	LDA.b [$E2]
	STA.b $F2
	ORA.b $F6
	STA.b $F6
	LDX.b #$00
	LDA.b $EA
CODE_87E1BB:
	LSR.b $F2
	BCC.b CODE_87E1C3
	STA.l $001D44,x
CODE_87E1C3:
	INX
	CPX.b #$08
	BNE.b CODE_87E1BB
	INC.b $E2
	BNE.b CODE_87E1D5
	INC.b $E3
	BNE.b CODE_87E1D5
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E1D5:
	LDA.w $1F95
CODE_87E1D8:
	BIT.b #$10
	BEQ.b CODE_87E209
	LDA.b #$FF
	STA.b $EA
	LDA.b [$E2]
	STA.b $F2
	ORA.b $F6
	STA.b $F6
	LDX.b #$00
	LDA.b $EA
CODE_87E1EC:
	LSR.b $F2
	BCC.b CODE_87E1F4
	STA.l $001D44,x
CODE_87E1F4:
	INX
	CPX.b #$08
	BNE.b CODE_87E1EC
	INC.b $E2
	BNE.b CODE_87E206
	INC.b $E3
	BNE.b CODE_87E206
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E206:
	LDA.w $1F95
CODE_87E209:
	LDX.b #$00
CODE_87E20B:
	LSR.b $F6
	BCS.b CODE_87E222
	LDA.b [$E2]
	STA.l $001D44,x
	INC.b $E2
	BNE.b CODE_87E222
	INC.b $E3
	BNE.b CODE_87E222
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E222:
	INX
	CPX.b #$08
	BNE.b CODE_87E20B
	LDX.w $1F95
	TXA
	LSR
	ROR
	TAX
	AND.b #$80
	STA.b $F2
	TXA
	ROR
	TAX
	AND.b #$80
	STA.b $F3
	TXA
	ROR
	TAX
	AND.b #$80
	STA.b $F4
	TXA
	ROR
	AND.b #$80
	STA.b $F5
	LDX.b #$07
CODE_87E248:
	SEP.b #$20
	LDA.l $001D44,x
	STA.b $EA
	LDY.b #$08
	REP.b #$20
	LDA.w #$0000
CODE_87E257:
	LSR
	LSR.b $EA
	BCC.b CODE_87E263
	ORA.b $F4
	DEY
	BNE.b CODE_87E257
	BRA.b CODE_87E268

CODE_87E263:
	ORA.b $F2
	DEY
	BNE.b CODE_87E257
CODE_87E268:
	PHA
	TXY
	TXA
	ASL
	TAX
	PLA
	STA.l $001D44,x
	TYX
	DEX
	BPL.b CODE_87E248
	JMP.w CODE_87E3C5

CODE_87E279:
	BIT.b #$30
	BEQ.b CODE_87E2DF
	LDA.b [$E2]
	STA.b $EA
	INC.b $E2
	BNE.b CODE_87E28E
	INC.b $E3
	BNE.b CODE_87E28E
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E28E:
	LDA.b [$E2]
	STA.b $EB
	INC.b $E2
	BNE.b CODE_87E29F
	INC.b $E3
	BNE.b CODE_87E29F
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E29F:
	REP.b #$10
	LDX.w $1F97
	LDA.w $1F95
	STA.l $001D64,x
	LDA.b $E2
	STA.l $001D65,x
	LDA.b $E3
	STA.l $001D66,x
	LDA.b $E4
	STA.l $001D67,x
	REP.b #$20
	LDA.w $1F97
	CLC
	ADC.w #$0004
	STA.w $1F97
	LDA.w $1F88
	CLC
	ADC.b $EA
	ORA.w #$8000
	STA.b $E2
	LDA.w $1F8A
	ADC.w #$0000
	STA.b $E4
	JMP.w CODE_87E189

CODE_87E2DF:
	REP.b #$20
	STZ.b $F2
	STZ.b $F4
	STZ.b $F6
	SEP.b #$20
	BIT.b #$04
	BEQ.b CODE_87E312
	LDA.b [$E2]
	STA.b $F2
	INC.b $E2
	BNE.b CODE_87E2FE
	INC.b $E3
	BNE.b CODE_87E2FE
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E2FE:
	LDA.b [$E2]
	STA.b $F3
	INC.b $E2
	BNE.b CODE_87E30F
	INC.b $E3
	BNE.b CODE_87E30F
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E30F:
	LDA.w $1F95
CODE_87E312:
	BIT.b #$02
	BEQ.b CODE_87E33B
	LDA.b [$E2]
	STA.b $F4
	INC.b $E2
	BNE.b CODE_87E327
	INC.b $E3
	BNE.b CODE_87E327
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E327:
	LDA.b [$E2]
	STA.b $F5
	INC.b $E2
	BNE.b CODE_87E338
	INC.b $E3
	BNE.b CODE_87E338
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E338:
	LDA.w $1F95
CODE_87E33B:
	LSR
	BCC.b CODE_87E371
	LDA.b [$E2]
	STA.b $EA
	INC.b $E2
	BNE.b CODE_87E34F
	INC.b $E3
	BNE.b CODE_87E34F
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E34F:
	LDA.b [$E2]
	STA.b $F6
	INC.b $E2
	BNE.b CODE_87E360
	INC.b $E3
	BNE.b CODE_87E360
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E360:
	LDA.b [$E2]
	STA.b $F7
	INC.b $E2
	BNE.b CODE_87E371
	INC.b $E3
	BNE.b CODE_87E371
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E371:
	REP.b #$20
	LDX.b #$00
CODE_87E375:
	LSR.b $F2
	BCC.b CODE_87E389
	SEP.b #$20
	LDA.b #$00
	STA.l $001D44,x
	REP.b #$20
	LSR.b $F4
	LSR.b $F6
	BRA.b CODE_87E3C0

CODE_87E389:
	LSR.b $F4
	BCC.b CODE_87E39B
	SEP.b #$20
	LDA.b #$FF
	STA.l $001D44,x
	REP.b #$20
	LSR.b $F6
	BRA.b CODE_87E3C0

CODE_87E39B:
	LSR.b $F6
	BCC.b CODE_87E3A9
	SEP.b #$20
	LDA.b $EA
	STA.l $001D44,x
	BRA.b CODE_87E3BE

CODE_87E3A9:
	SEP.b #$20
	LDA.b [$E2]
	STA.l $001D44,x
	INC.b $E2
	BNE.b CODE_87E3BE
	INC.b $E3
	BNE.b CODE_87E3BE
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E3BE:
	REP.b #$20
CODE_87E3C0:
	INX
	CPX.b #$10
	BNE.b CODE_87E375
CODE_87E3C5:
	SEP #$30
	BIT.w $1F95
	BPL.b CODE_87E3CF
	JSR.w CODE_87E4DA
CODE_87E3CF:
	REP.b #$10
	LDX.w $1F97
	BNE.b CODE_87E3D9
	JMP.w CODE_87E4B4

CODE_87E3D9:
	DEX
	DEX
	DEX
	DEX
	LDA.l $001D64,x
	STA.w $1F95
	LDA.l $001D65,x
	STA.b $E2
	LDA.l $001D66,x
	STA.b $E3
	LDA.l $001D67,x
	STA.b $E4
	STX.w $1F97
	SEP.b #$10
	LDA.w $1F95
	BIT.b #$20
	BEQ.b CODE_87E444
	LDA.b [$E2]
	STA.b $F2
	INC.b $E2
	BNE.b CODE_87E413
	INC.b $E3
	BNE.b CODE_87E413
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E413:
	LDA.b [$E2]
	STA.b $F3
	INC.b $E2
	BNE.b CODE_87E424
	INC.b $E3
	BNE.b CODE_87E424
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E424:
	LDX.b #$00
CODE_87E426:
	LSR.b $F3
	ROR.b $F2
	BCC.b CODE_87E43F
	LDA.b [$E2]
	STA.l $001D44,x
	INC.b $E2
	BNE.b CODE_87E43F
	INC.b $E3
	BNE.b CODE_87E43F
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E43F:
	INX
	CPX.b #$10
	BNE.b CODE_87E426
CODE_87E444:
	LDA.w $1F95
	BIT.b #$01
	BEQ.b CODE_87E49A
	REP.b #$30
	LDA.l $001D44
	TAX
	LDA.l $001D52
	STA.l $001D44
	TXA
	STA.l $001D52
	LDA.l $001D46
	TAX
	LDA.l $001D50
	STA.l $001D46
	TXA
	STA.l $001D50
	LDA.l $001D48
	TAX
	LDA.l $001D4E
	STA.l $001D48
	TXA
	STA.l $001D4E
	LDA.l $001D4A
	TAX
	LDA.l $001D4C
	STA.l $001D4A
	TXA
	STA.l $001D4C
	SEP.b #$30
	LDA.w $1F95
CODE_87E49A:
	BIT.b #$02
	BEQ.b CODE_87E4B1
	LDX.b #$00
CODE_87E4A0:
	LDA.l $001D44,x
	TAY
	LDA.w DATA_81D4E6,y
	STA.l $001D44,x
	INX
	CPX.b #$10
	BNE.b CODE_87E4A0
CODE_87E4B1:
	JMP.w CODE_87E3C5

CODE_87E4B4:
	SEP.b #$30
	LDX.b $F0
	JSR.w (DATA_87EF3B,x)
	REP.b #$30
	LDA.w $1FEB
	BMI.b CODE_87E4D6
	LDA.b $E2
	CMP.w $1F8C
	LDA.b $E4
	SBC.w $1F8E
	BCS.b CODE_87E4D6
	LDA.w $1FEB
	BNE.b CODE_87E4D8
	JMP.w CODE_87E189

CODE_87E4D6:
	SEC
	RTS

CODE_87E4D8:
	CLC
	RTS

CODE_87E4DA:
	SEP.b #$30
	LDX.b #$0F
	LDA.b #$00
CODE_87E4E0:
	STA.l $001D54,x
	DEX
	BPL.b CODE_87E4E0
	STZ.b $EA
	LDA.b #$80
	STA.b $EB
CODE_87E4ED:
	LDX.b $EA
	LDA.l $001D44,x
	STA.b $EC
	LDA.l $001D45,x
	STA.b $ED
	INX
	INX
	STX.b $EA
	LDX.b #$0E
CODE_87E501:
	ASL.b $EC
	BCC.b CODE_87E50F
	LDA.l $001D54,x
	ORA.b $EB
	STA.l $001D54,x
CODE_87E50F:
	ASL.b $ED
	BCC.b CODE_87E51D
	LDA.l $001D55,x
	ORA.b $EB
	STA.l $001D55,x
CODE_87E51D:
	DEX
	DEX
	BPL.b CODE_87E501
	LSR.b $EB
	BCC.b CODE_87E4ED
	LDX.b #$0E
	REP.b #$20
CODE_87E529:
	LDA.l $001D54,x
	STA.l $001D44,x
	DEX
	DEX
	BPL.b CODE_87E529
	SEP.b #$30
	RTS

;--------------------------------------------------------------------

CODE_87E538:
	REP.b #$10
	SEP.b #$20
	LDX.b $F0
	LDY.b $EE
	BEQ.b CODE_87E557
CODE_87E542:
	LDA.b [$E2]
	JSR.w (DATA_87E815,x)
	INC.b $E2
	BNE.b CODE_87E554
	INC.b $E3
	BNE.b CODE_87E554
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E554:
	DEY
	BNE.b CODE_87E542
CODE_87E557:
	RTS

;--------------------------------------------------------------------

CODE_87E558:
	LDX.b $F0
	JSR.w (DATA_87E815,x)
	INC.b $E2
	BNE.b CODE_87E56A
	INC.b $E3
	BNE.b CODE_87E56A
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E56A:
	LDA.b [$E2]
	JSR.w (DATA_87E815,x)
	INC.b $E2
	BNE.b CODE_87E57C
	INC.b $E3
	BNE.b CODE_87E57C
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E57C:
	DEY
	DEY
	BNE.b CODE_87E5AB
	RTS

;--------------------------------------------------------------------

CODE_87E581:
	SEP.b #$20
	REP.b #$10
	LDA.b [$E2]
	STA.b $EC
	INC.b $E2
	BNE.b CODE_87E596
	INC.b $E3
	BNE.b CODE_87E596
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E596:
	LDA.b [$E2]
	STA.b $ED
	INC.b $E2
	BNE.b CODE_87E5A7
	INC.b $E3
	BNE.b CODE_87E5A7
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E5A7:
	LDY.b $EE
	DEY
	DEY
CODE_87E5AB:
	LDA.b [$E2]
	CMP.b $EC
	BNE.b CODE_87E558
	STA.b $EA
	INC.b $E2
	BNE.b CODE_87E5C0
	INC.b $E3
	BNE.b CODE_87E5C0
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E5C0:
	LDA.b [$E2]
	CMP.b $ED
	BNE.b CODE_87E625
	INC.b $E2
	BNE.b CODE_87E5D3
	INC.b $E3
	BNE.b CODE_87E5D3
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E5D3:
	LDA.b [$E2]
	STA.b $EA
	INC.b $E2
	BNE.b CODE_87E5E4
	INC.b $E3
	BNE.b CODE_87E5E4
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E5E4:
	LDA.b [$E2]
	STA.b $EB
	INC.b $E2
	BNE.b CODE_87E5F5
	INC.b $E3
	BNE.b CODE_87E5F5
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E5F5:
	PHY
	LDA.b [$E2]
	SEP.b #$10
	TAY
	INC.b $E2
	BNE.b CODE_87E608
	INC.b $E3
	BNE.b CODE_87E608
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E608:
	LDX.b $F0
CODE_87E60A:
	LDA.b $EA
	JSR.w (DATA_87E815,x)
	LDA.b $EB
	JSR.w (DATA_87E815,x)
	DEY
	BNE.b CODE_87E60A
	REP.b #$10
	PLY
	DEY
	DEY
	DEY
	DEY
	DEY
	BEQ.b CODE_87E624
	JMP.w CODE_87E5AB

CODE_87E624:
	RTS

CODE_87E625:
	PHA
	LDA.b $EA
	LDX.b $F0
	JSR.w (DATA_87E815,x)
	PLA
	JSR.w (DATA_87E815,x)
	INC.b $E2
	BNE.b CODE_87E63E
	INC.b $E3
	BNE.b CODE_87E63E
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E63E:
	DEY
	DEY
	BEQ.b CODE_87E624
	JMP.w CODE_87E5AB

;--------------------------------------------------------------------

CODE_87E645:
	SEP.b #$20
	REP.b #$10
	LDX.b $E6
	STX.w $1F88
	LDX.b $E8
	STX.b $EC
	LDX.b $F0
	LDY.b $EE
CODE_87E656:
	LDA.b [$E2]
	STA.b $F4
	INC.b $E2
	BNE.b CODE_87E667
	INC.b $E3
	BNE.b CODE_87E667
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E667:
	LDA.b [$E2]
	STA.b $F3
	INC.b $E2
	BNE.b CODE_87E678
	INC.b $E3
	BNE.b CODE_87E678
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E678:
	LDA.b $F4
	AND.b #$EE
	STA.b $F2
	CMP.b $F4
	BNE.b CODE_87E68F
	JSR.w (DATA_87E815,x)
	LDA.b $F3
	JSR.w (DATA_87E815,x)
	DEY
	DEY
	BNE.b CODE_87E656
	RTS

CODE_87E68F:
	LDA.b $F4
	BIT.b #$10
	BNE.b CODE_87E6C1
	STY.b $F6
	SEP.b #$10
	LDA.b [$E2]
	TAY
	INY
	INC.b $E2
	BNE.b CODE_87E6AA
	INC.b $E3
	BNE.b CODE_87E6AA
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E6AA:
	LDA.b $F2
	JSR.w (DATA_87E815,x)
	LDA.b $F3
	JSR.w (DATA_87E815,x)
	DEY
	BNE.b CODE_87E6AA
	REP.b #$10
	LDY.b $F6
	DEY
	DEY
	DEY
	BNE.b CODE_87E656
	RTS

CODE_87E6C1:
	BIT.b #$01
	BEQ.b CODE_87E716
	LDA.b [$E2]
	CLC
	ADC.w $1F88
	STA.b $EA
	PHP
	INC.b $E2
	BNE.b CODE_87E6DB
	INC.b $E3
	BNE.b CODE_87E6DB
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E6DB:
	PLP
	LDA.b [$E2]
	ADC.w $1F89
	STA.b $EB
	INC.b $E2
	BNE.b CODE_87E6F0
	INC.b $E3
	BNE.b CODE_87E6F0
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E6F0:
	INC.b $F3
CODE_87E6F2:
	LDA.b [$EA]
	JSR.w (DATA_87E815,x)
	INC.b $EA
	BNE.b CODE_87E6FD
	INC.b $EB
CODE_87E6FD:
	LDA.b [$EA]
	JSR.w (DATA_87E815,x)
	INC.b $EA
	BNE.b CODE_87E708
	INC.b $EB
CODE_87E708:
	DEC.b $F3
	BNE.b CODE_87E6F2
	DEY
	DEY
	DEY
	DEY
	BEQ.b CODE_87E715
	JMP.w CODE_87E656

CODE_87E715:
	RTS

CODE_87E716:
	LDA.b [$E2]
	STA.b $F5
	AND.b #$7F
	STA.b $F4
	INC.b $E2
	BNE.b CODE_87E72B
	INC.b $E3
	BNE.b CODE_87E72B
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E72B:
	BIT.b $F5
	BPL.b CODE_87E75A
CODE_87E72F:
	LDA.b $F2
	JSR.w (DATA_87E815,x)
	LDA.b $F3
	JSR.w (DATA_87E815,x)
	REP.b #$20
	LDA.b $F2
	SEC
	SBC.w #$0002
	BIT.w #$0010
	BEQ.b CODE_87E74A
	SEC
	SBC.w #$0010
CODE_87E74A:
	STA.b $F2
	SEP.b #$20
	DEC.b $F4
	BPL.b CODE_87E72F
	DEY
	DEY
	DEY
	BEQ.b CODE_87E785
	JMP.w CODE_87E656

CODE_87E75A:
	LDA.b $F2
	JSR.w (DATA_87E815,x)
	LDA.b $F3
	JSR.w (DATA_87E815,x)
	REP.b #$20
	LDA.b $F2
	CLC
	ADC.w #$0002
	BIT.w #$0010
	BEQ.b CODE_87E775
	CLC
	ADC.w #$0010
CODE_87E775:
	STA.b $F2
	SEP.b #$20
	DEC.b $F4
	BPL.b CODE_87E75A
	DEY
	DEY
	DEY
	BEQ.b CODE_87E785
	JMP.w CODE_87E656

CODE_87E785:
	RTS

;--------------------------------------------------------------------

DATA_87E786:
	dw CODE_87E7E6				; Initialize WRAM transfer
	dw CODE_87E7C8				; Initialize VRAM transfer (increment address after high byte write)
	dw CODE_87E7CE				; Initialize VRAM transfer (increment address after low byte write)
	dw CODE_87E7C8				; Initialize VRAM transfer (increment address after high byte write)
	dw CODE_87E80C				; No setup
	dw CODE_87E80D				; Initialize CGRAM transfer
	dw CODE_87E7C0				; Initialize VRAM transfer (increment address after high byte write, set other thing up)
	dw CODE_87E7E0				; Initialize WRAM transfer (set other thing up)
	dw CODE_87E7F7				; Initialize WRAM or VRAM transfer (increment VRAM address after high byte write)

;--------------------------------------------------------------------

CODE_87E798:
	REP.b #$30
	LDA.b $E6
	STA.w $1FA9
	LDA.w $1F9B
	STA.w $1FA1
	AND.w #$00FF
	ASL
	STA.w $1FA3
	STA.w $1FA5
	LDA.w $1F9B
	AND.w #$7F00
	CLC
	ADC.w #$0100
	LSR
	LSR
	LSR
	STA.w $1FA7
	RTS

;--------------------------------------------------------------------

CODE_87E7C0:
	JSR.w CODE_87E798
	BIT.w $1FA1
	BMI.b CODE_87E7CE
CODE_87E7C8:
	SEP.b #$20
	LDA.b #$80
	BRA.b CODE_87E7D2

CODE_87E7CE:
	SEP.b #$20
	LDA.b #$00
CODE_87E7D2:
	STA.w !REGISTER_VRAMAddressIncrementValue
	STZ.w $1F94
	REP.b #$20
	LDA.b $E6
	STA.w !REGISTER_VRAMAddressLo
	RTS

;--------------------------------------------------------------------

CODE_87E7E0:
	JSR.w CODE_87E798
	ASL.w $1FA7
CODE_87E7E6:
	REP.b #$20
	LDA.b $E6
	STA.w !REGISTER_WRAMAddressLo
	SEP.b #$20
	LDA.b $E8
	AND.b #$01
	STA.w !REGISTER_WRAMAddressBank
	RTS

;--------------------------------------------------------------------

CODE_87E7F7:
	SEP.b #$20
	LDA.w $1F9C
	ASL
	ASL
	ASL
	STA.w $1FA3
	JSR.w CODE_87E9C9
	BIT.w $1F9C
	BMI.b CODE_87E7C8
	BRA.b CODE_87E7E6

;--------------------------------------------------------------------

CODE_87E80C:
	RTS

;--------------------------------------------------------------------

CODE_87E80D:
	SEP.b #$20
	LDA.b $E6
	STA.w !REGISTER_CGRAMAddress
	RTS

;--------------------------------------------------------------------

DATA_87E815:
	dw CODE_87E827
	dw CODE_87E83F
	dw CODE_87E854
	dw CODE_87E858
	dw CODE_87E85C					; SPC700 upload
	dw CODE_87E903
	dw CODE_87E907
	dw CODE_87E966
	dw CODE_87E9B9

;--------------------------------------------------------------------

CODE_87E827:
	STA.b [$E6]
	INC.b $E6
	BEQ.b CODE_87E82E
	RTS

CODE_87E82E:
	INC.b $E7
	BEQ.b CODE_87E833
	RTS

CODE_87E833:
	REP.b #$20
	LDA.w #$8000
	STA.b $E6
	INC.b $E8
	SEP.b #$20
	RTS

;--------------------------------------------------------------------

CODE_87E83F:
	BIT.w $1F94
	BPL.b CODE_87E84B
	STA.w !REGISTER_WriteToVRAMPortHi
	STZ.w $1F94
	RTS

CODE_87E84B:
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$80
	STA.w $1F94
	RTS

;--------------------------------------------------------------------

CODE_87E854:
	STA.w !REGISTER_WriteToVRAMPortLo
	RTS

;--------------------------------------------------------------------

CODE_87E858:
	STA.w !REGISTER_WriteToVRAMPortHi
	RTS

;--------------------------------------------------------------------

CODE_87E85C:
	LDA.b #$55
	STA.w !REGISTER_APUPort1
	REP.b #$20
	LDA.w #$BBAA
CODE_87E866:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_87E866
	REP.b #$20
	LDA.b [$E2]
	STA.w !REGISTER_APUPort2
	LDA.w #$01CC
	STA.w !REGISTER_APUPort0
	SEP.b #$20
	INC.b $E2
	BNE.b CODE_87E887
	INC.b $E3
	BNE.b CODE_87E887
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E887:
	INC.b $E2
	BNE.b CODE_87E894
	INC.b $E3
	BNE.b CODE_87E894
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E894:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_87E894
	DEY
	DEY
	LDA.b [$E2]
	INC.b $E2
	BNE.b CODE_87E8AA
	INC.b $E3
	BNE.b CODE_87E8AA
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E8AA:
	XBA
	LDA.b #$00
	BRA.b CODE_87E8C6

CODE_87E8AF:
	XBA
	LDA.b [$E2]
	INC.b $E2
	BNE.b CODE_87E8BF
	INC.b $E3
	BNE.b CODE_87E8BF
	INC.b $E4
	SEC
	ROR.b $E3
CODE_87E8BF:
	XBA
CODE_87E8C0:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_87E8C0
	INC
CODE_87E8C6:
	REP.b #$20
	STA.w !REGISTER_APUPort0
	SEP.b #$20
	DEY
	BNE.b CODE_87E8AF
CODE_87E8D0:
	CMP.w !REGISTER_APUPort0
	BNE.b CODE_87E8D0
CODE_87E8D5:
	ADC.b #$03
	BEQ.b CODE_87E8D5
	CMP.b #$FA
	BEQ.b CODE_87E8D5
	PHA
	REP.b #$20
	LDA.b $E6
	BNE.b CODE_87E8E7
	LDA.w #$FFC0
CODE_87E8E7:
	STA.w !REGISTER_APUPort2
	SEP.b #$20
	LDA.b #$00
	STA.w !REGISTER_APUPort1
	PLA
	STA.w !REGISTER_APUPort0
	REP.b #$20
	LDA.b $E6
	BEQ.b CODE_87E8FF
	JSL.l CODE_82E200
CODE_87E8FF:
	SEP.b #$20
	INY
	RTS

;--------------------------------------------------------------------

CODE_87E903:
	STA.w !REGISTER_WriteToCGRAMPort
	RTS

;--------------------------------------------------------------------

CODE_87E907:
	BIT.w $1FA2
	BMI.b CODE_87E94E
	BIT.w $1F94
	BPL.b CODE_87E91D
	CLC
	ADC.w $1F9E
	STA.w !REGISTER_WriteToVRAMPortHi
	STZ.w $1F94
	BRA.b CODE_87E929

CODE_87E91D:
	CLC
	ADC.w $1F9D
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$80
	STA.w $1F94
CODE_87E929:
	DEC.w $1FA5
	BNE.b CODE_87E94D
	LDA.w $1FA3
	STA.w $1FA5
	LDA.w $1FA9
	CLC
	ADC.w $1FA7
	STA.w $1FA9
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $1FAA
	ADC.w $1FA8
	STA.w $1FAA
	STA.w !REGISTER_VRAMAddressHi
CODE_87E94D:
	RTS

CODE_87E94E:
	BIT.w $1F94
	BPL.b CODE_87E958
	STZ.w $1F94
	BRA.b CODE_87E929

CODE_87E958:
	CLC
	ADC.w $1F9D
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.b #$80
	STA.w $1F94
	BRA.b CODE_87E929

;--------------------------------------------------------------------

CODE_87E966:
	BIT.w $1FA2
	BMI.b CODE_87E9AD
	BIT.w $1F94
	BPL.b CODE_87E97C
	CLC
	ADC.w $1F9E
	STA.w !REGISTER_ReadOrWriteToWRAMPort
	STZ.w $1F94
	BRA.b CODE_87E988

CODE_87E97C:
	CLC
	ADC.w $1F9D
	STA.w !REGISTER_ReadOrWriteToWRAMPort
	LDA.b #$80
	STA.w $1F94
CODE_87E988:
	DEC.w $1FA5
	BNE.b CODE_87E9AC
	LDA.w $1FA3
	STA.w $1FA5
	LDA.w $1FA9
	CLC
	ADC.w $1FA7
	STA.w $1FA9
	STA.w !REGISTER_WRAMAddressLo
	LDA.w $1FAA
	ADC.w $1FA8
	STA.w $1FAA
	STA.w !REGISTER_WRAMAddressHi
CODE_87E9AC:
	RTS

CODE_87E9AD:
	CLC
	ADC.w $1F9D
	STA.w !REGISTER_ReadOrWriteToWRAMPort
	LDA.w !REGISTER_ReadOrWriteToWRAMPort
	BRA.b CODE_87E988

;--------------------------------------------------------------------

CODE_87E9B9:
	STA.b ($F8)
	INC.b $F8
	BNE.b CODE_87E9C1
	INC.b $F9
CODE_87E9C1:
	DEC.w $1FA5
	BNE.b CODE_87E9D7
CODE_87E9C6:
	JSR.w CODE_87E9D8
CODE_87E9C9:
	LDA.w $1FA3
	STA.w $1FA5
	LDA.b #$AB
	STA.b $F8
	LDA.b #$1F
	STA.b $F9
CODE_87E9D7:
	RTS

;--------------------------------------------------------------------

CODE_87E9D8:
	PHP
	REP.b #$30
	PHA
	PHX
	PHY
	SEP.b #$30
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBB, $001FAB)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBD, $001FAD)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FBF, $001FAF)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC1, $001FB1)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC3, $001FB3)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC5, $001FB5)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC7, $001FB7)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	%PLOK_UnknownFunction1($001FC9, $001FB9)
	REP #$30
	PLY
	PLX
	PLA
	PLP
	RTS

CODE_87EF27:
	CLC
	ADC.w $1F9B
	BIT.w $1F9C
	BPL.b CODE_87EF34
	STA.w !REGISTER_WriteToVRAMPortHi
	RTS

CODE_87EF34:
	STA.w !REGISTER_ReadOrWriteToWRAMPort
	LDA.w !REGISTER_ReadOrWriteToWRAMPort
	RTS

;--------------------------------------------------------------------

DATA_87EF3B:
	dw CODE_87EF4D
	dw CODE_87F04E
	dw CODE_87F08B
	dw CODE_87F0FC
	dw CODE_87F16D
	dw CODE_87F16E
	dw CODE_87F1DF
	dw CODE_87F250
	dw CODE_87F2C1

;--------------------------------------------------------------------

CODE_87EF4D:
	%PLOK_UnknownFunction2($001D44)
	%PLOK_UnknownFunction2($001D45)
	%PLOK_UnknownFunction2($001D46)
	%PLOK_UnknownFunction2($001D47)
	%PLOK_UnknownFunction2($001D48)
	%PLOK_UnknownFunction2($001D49)
	%PLOK_UnknownFunction2($001D4A)
	%PLOK_UnknownFunction2($001D4B)
	%PLOK_UnknownFunction2($001D4C)
	%PLOK_UnknownFunction2($001D4D)
	%PLOK_UnknownFunction2($001D4E)
	%PLOK_UnknownFunction2($001D4F)
	%PLOK_UnknownFunction2($001D50)
	%PLOK_UnknownFunction2($001D51)
	%PLOK_UnknownFunction2($001D52)
	%PLOK_UnknownFunction2($001D53)
	RTS

;--------------------------------------------------------------------

CODE_87F04E:
	REP.b #$20
	LDA.l $001D44
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D46
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D48
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4A
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4C
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4E
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D50
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D52
	STA.w !REGISTER_WriteToVRAMPortLo
	SEP.b #$20
	RTS

;--------------------------------------------------------------------

CODE_87F08B:
	LDA.l $001D44
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D45
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D46
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D47
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D48
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D49
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4A
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4B
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4C
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4D
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4E
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D4F
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D50
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D51
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D52
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $001D53
	STA.w !REGISTER_WriteToVRAMPortLo
	RTS

;--------------------------------------------------------------------

CODE_87F0FC:
	LDA.l $001D44
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D45
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D46
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D47
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D48
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D49
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D4A
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D4B
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D4C
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D4D
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D4E
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D4F
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D50
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D51
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D52
	STA.w !REGISTER_WriteToVRAMPortHi
	LDA.l $001D53
	STA.w !REGISTER_WriteToVRAMPortHi
	RTS

;--------------------------------------------------------------------

CODE_87F16D:
	RTS

;--------------------------------------------------------------------

CODE_87F16E:
	LDA.l $001D44
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D45
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D46
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D47
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D48
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D49
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D4A
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D4B
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D4C
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D4D
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D4E
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D4F
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D50
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D51
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D52
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l $001D53
	STA.w !REGISTER_WriteToCGRAMPort
	RTS

;--------------------------------------------------------------------

CODE_87F1DF:
	LDA.l $001D44
	JSR.w CODE_87E907
	LDA.l $001D45
	JSR.w CODE_87E907
	LDA.l $001D46
	JSR.w CODE_87E907
	LDA.l $001D47
	JSR.w CODE_87E907
	LDA.l $001D48
	JSR.w CODE_87E907
	LDA.l $001D49
	JSR.w CODE_87E907
	LDA.l $001D4A
	JSR.w CODE_87E907
	LDA.l $001D4B
	JSR.w CODE_87E907
	LDA.l $001D4C
	JSR.w CODE_87E907
	LDA.l $001D4D
	JSR.w CODE_87E907
	LDA.l $001D4E
	JSR.w CODE_87E907
	LDA.l $001D4F
	JSR.w CODE_87E907
	LDA.l $001D50
	JSR.w CODE_87E907
	LDA.l $001D51
	JSR.w CODE_87E907
	LDA.l $001D52
	JSR.w CODE_87E907
	LDA.l $001D53
	JSR.w CODE_87E907
	RTS

;--------------------------------------------------------------------

CODE_87F250:
	LDA.l $001D44
	JSR.w CODE_87E966
	LDA.l $001D45
	JSR.w CODE_87E966
	LDA.l $001D46
	JSR.w CODE_87E966
	LDA.l $001D47
	JSR.w CODE_87E966
	LDA.l $001D48
	JSR.w CODE_87E966
	LDA.l $001D49
	JSR.w CODE_87E966
	LDA.l $001D4A
	JSR.w CODE_87E966
	LDA.l $001D4B
	JSR.w CODE_87E966
	LDA.l $001D4C
	JSR.w CODE_87E966
	LDA.l $001D4D
	JSR.w CODE_87E966
	LDA.l $001D4E
	JSR.w CODE_87E966
	LDA.l $001D4F
	JSR.w CODE_87E966
	LDA.l $001D50
	JSR.w CODE_87E966
	LDA.l $001D51
	JSR.w CODE_87E966
	LDA.l $001D52
	JSR.w CODE_87E966
	LDA.l $001D53
	JSR.w CODE_87E966
	RTS

;--------------------------------------------------------------------

CODE_87F2C1:
	PHP
	REP.b #$10
	PHX
	SEP.b #$30
	LDA.w $1FA3
	SEC
	SBC.w $1FA5
	TAX
	LDA.l $001D44
	STA.w $1FAB,x
	LDA.l $001D45
	STA.w $1FAC,x
	LDA.l $001D46
	STA.w $1FAD,x
	LDA.l $001D47
	STA.w $1FAE,x
	LDA.l $001D48
	STA.w $1FAF,x
	LDA.l $001D49
	STA.w $1FB0,x
	LDA.l $001D4A
	STA.w $1FB1,x
	LDA.l $001D4B
	STA.w $1FB2,x
	LDA.l $001D4C
	STA.w $1FB3,x
	LDA.l $001D4D
	STA.w $1FB4,x
	LDA.l $001D4E
	STA.w $1FB5,x
	LDA.l $001D4F
	STA.w $1FB6,x
	LDA.l $001D50
	STA.w $1FB7,x
	LDA.l $001D51
	STA.w $1FB8,x
	LDA.l $001D52
	STA.w $1FB9,x
	LDA.l $001D53
	STA.w $1FBA,x
	LDA.w $1FA5
	SEC
	SBC.b #$10
	STA.w $1FA5
	BNE.b CODE_87F34D
	JSR.w CODE_87E9C6
CODE_87F34D:
	REP.b #$10
	PLX
	PLP
	RTS

;--------------------------------------------------------------------

CODE_87F352:
	STX.b $E6	
	STY.w $1F90
	TAX
	XBA
	AND.w #$00FE
	STA.b $F0
	TXA
	AND.w #$00FF
	STA.b $E8
	LDA.w PLOK_UnsortedData_DATA_81F6E5,y
	STA.w $1F92
	LDA.w PLOK_UnsortedData_DataBlockSize,y
	STA.b $EE
CODE_87F36F:
	TYA
	ASL
	TAY
	LDA.w PLOK_UnsortedData_Ptrs,y
	CLC
	ADC.w #PLOK_UnsortedData_Main&$8000
	ORA.w #PLOK_UnsortedData_Main&$8000
	STA.b $E2
	PHP
	LDA.w PLOK_UnsortedData_Ptrs+$02,y
	ASL
	PLP
	ADC.w #PLOK_UnsortedData_Main>>16
	STA.b $E4
	RTS

;--------------------------------------------------------------------

UNK_87F38A:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%InsertGarbageData(NULLROM, incbin, UNK_87F38A_PLOK_J.bin)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E) != $00
	%InsertGarbageData(NULLROM, incbin, UNK_87F38A_PLOK_E.bin)

	%FREE_BYTES(NULLROM, 292, $FF)
else
	db $E4,$60,$E4,$60,$1F

ADDR_87F38F:
	LDA.l $001D4E
	STA.w $1FB5,x
	LDA.l $001D4F
	STA.w $1FB6,x
	LDA.l $001D50
	STA.w $1FB7,x
	LDA.l $001D51
	STA.w $1FB8,x
	LDA.l $001D52
	STA.w $1FB9,x
	LDA.l $001D53
	STA.w $1FBA,x
	LDA.w $1FA5
	SEC
	SBC.w #$8D10
	LDA.b $1F
	BNE.b ADDR_87F3C7
	JSR.w $87EAD0
ADDR_87F3C7:
	REP.b #$10
	PLX
	PLP
	RTS

;--------------------------------------------------------------------

ADDR_87F3CC:
	STX.b $E6
	STY.w $1F90
	TAX
	XBA
	AND.w #$00FE
	STA.b $F0
	TXA
	AND.w #$00FF
	STA.b $E8
	LDA.w $81F6B2,y
	STA.w $1F92
	LDA.w $81FD5A,y
	STA.b $EE
	TYA
	ASL
	TAY
	LDA.w $81F8EA,y
	CLC
	ADC.w #$8000
	ORA.w #$8000
	STA.b $E2
	PHP
	LDA.w $81F8EA+$02,y
	ASL
	PLP
	ADC.w #$0089
	STA.b $E4
	RTS

;--------------------------------------------------------------------

UNK_87F404:
	%InsertGarbageData(NULLROM, incbin, UNK_87F404_PLOK_U.bin)

	%FREE_BYTES(NULLROM, 394, $FF)
	%FREE_BYTES(NULLROM, 1, $FA)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro PLOKBank88Macros(StartBank, EndBank)
%BANK_START(<StartBank>)

if !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
	%DATATABLE_PLOK_DutchTextStrings(NULLROM)
endif

PLOK_LevelSpriteDataSize:
	dw PLOK_SpriteData_CottonIslandBeach_End-PLOK_SpriteData_CottonIslandBeach
	dw PLOK_SpriteData_CottonIslandBridge_End-PLOK_SpriteData_CottonIslandBridge
	dw PLOK_SpriteData_CottonIslandColumns_End-PLOK_SpriteData_CottonIslandColumns
	dw PLOK_SpriteData_CottonIslandLogFalls_End-PLOK_SpriteData_CottonIslandLogFalls
	dw PLOK_SpriteData_CottonIslandRicketyBridge_End-PLOK_SpriteData_CottonIslandRicketyBridge
	dw PLOK_SpriteData_CottonIslandCrazyCradles_End-PLOK_SpriteData_CottonIslandCrazyCradles
	dw PLOK_SpriteData_CottonIslandBlindLeap_End-PLOK_SpriteData_CottonIslandBlindLeap
	dw PLOK_SpriteData_CottonIslandBobbinsBros_End-PLOK_SpriteData_CottonIslandBobbinsBros
	dw PLOK_SpriteData_AkrillicGarlenBeach_End-PLOK_SpriteData_AkrillicGarlenBeach
	dw PLOK_SpriteData_AkrillicSleepyDale_End-PLOK_SpriteData_AkrillicSleepyDale
	dw PLOK_SpriteData_AkrillicPloksHouse_End-PLOK_SpriteData_AkrillicPloksHouse
	dw PLOK_SpriteData_LegacyIslandMaceCove_End-PLOK_SpriteData_LegacyIslandMaceCove
	dw PLOK_SpriteData_LegacyIslandFoolsGap_End-PLOK_SpriteData_LegacyIslandFoolsGap
	dw PLOK_SpriteData_LegacyIslandZigZag_End-PLOK_SpriteData_LegacyIslandZigZag
	dw PLOK_SpriteData_LegacyIslandSpongeRocks_End-PLOK_SpriteData_LegacyIslandSpongeRocks
	dw PLOK_SpriteData_LegacyIslandSwiftyPeaks_End-PLOK_SpriteData_LegacyIslandSwiftyPeaks
	dw PLOK_SpriteData_LegacyIslandLogTrail_End-PLOK_SpriteData_LegacyIslandLogTrail
	dw PLOK_SpriteData_LegacyIslandCrouchHill_End-PLOK_SpriteData_LegacyIslandCrouchHill
	dw PLOK_SpriteData_LegacyIslandBobbinsBros_End-PLOK_SpriteData_LegacyIslandBobbinsBros
	dw PLOK_SpriteData_AkrillicPlokTown_End-PLOK_SpriteData_AkrillicPlokTown
	dw PLOK_SpriteData_AkrillicThePenkinos_End-PLOK_SpriteData_AkrillicThePenkinos
	dw PLOK_SpriteData_AkrillicVengeThicket_End-PLOK_SpriteData_AkrillicVengeThicket
	dw PLOK_SpriteData_AkrillicDreamyCove_End-PLOK_SpriteData_AkrillicDreamyCove
	dw PLOK_SpriteData_AkrillicCreepyForest_End-PLOK_SpriteData_AkrillicCreepyForest
	dw PLOK_SpriteData_AkrillicWomackSpider_End-PLOK_SpriteData_AkrillicWomackSpider
	dw PLOK_SpriteData_AkrillicCreepyCrag_End-PLOK_SpriteData_AkrillicCreepyCrag
	dw PLOK_SpriteData_AkrillicGohomeCavern_End-PLOK_SpriteData_AkrillicGohomeCavern
	dw PLOK_SpriteData_AkrillicCrashingRocks_End-PLOK_SpriteData_AkrillicCrashingRocks
	dw PLOK_SpriteData_AkrillicRockyfella_End-PLOK_SpriteData_AkrillicRockyfella
	dw PLOK_SpriteData_AkrillicBrendammiBog_End-PLOK_SpriteData_AkrillicBrendammiBog
	dw PLOK_SpriteData_AkrillicBadreamFens_End-PLOK_SpriteData_AkrillicBadreamFens
	dw PLOK_SpriteData_AkrillicBreezyBeach_End-PLOK_SpriteData_AkrillicBreezyBeach
	dw PLOK_SpriteData_FleapitCyclingClever_End-PLOK_SpriteData_FleapitCyclingClever
	dw PLOK_SpriteData_FleapitRoadHogging_End-PLOK_SpriteData_FleapitRoadHogging
	dw PLOK_SpriteData_FleapitHighFlying_End-PLOK_SpriteData_FleapitHighFlying
	dw PLOK_SpriteData_FleapitEasyRiding_End-PLOK_SpriteData_FleapitEasyRiding
	dw PLOK_SpriteData_FleapitInASpin_End-PLOK_SpriteData_FleapitInASpin
	dw PLOK_SpriteData_FleapitRealRumblings_End-PLOK_SpriteData_FleapitRealRumblings
	dw PLOK_SpriteData_FleapitSilentRunning_End-PLOK_SpriteData_FleapitSilentRunning
	dw PLOK_SpriteData_FleapitTheFleaQueen_End-PLOK_SpriteData_FleapitTheFleaQueen
	dw PLOK_SpriteData_TestDriveSecretWarp_End-PLOK_SpriteData_TestDriveSecretWarp
	dw PLOK_SpriteData_TestDriveSleepyDale_End-PLOK_SpriteData_TestDriveSleepyDale
	dw PLOK_SpriteData_TestDrivePlokTown_End-PLOK_SpriteData_TestDrivePlokTown
	dw PLOK_SpriteData_TestDriveThePenkinos_End-PLOK_SpriteData_TestDriveThePenkinos
	dw PLOK_SpriteData_TestDriveVengeThicket_End-PLOK_SpriteData_TestDriveVengeThicket
	dw PLOK_SpriteData_TestDriveDreamyCove_End-PLOK_SpriteData_TestDriveDreamyCove
	dw PLOK_SpriteData_TestDriveCreepyForest_End-PLOK_SpriteData_TestDriveCreepyForest
	dw PLOK_SpriteData_TestDriveWomackSpider_End-PLOK_SpriteData_TestDriveWomackSpider
	dw PLOK_SpriteData_TestDriveCreepyCrag_End-PLOK_SpriteData_TestDriveCreepyCrag
	dw PLOK_SpriteData_TestDriveGohomeCavern_End-PLOK_SpriteData_TestDriveGohomeCavern
	dw PLOK_SpriteData_TestDriveCrashingRocks_End-PLOK_SpriteData_TestDriveCrashingRocks
	dw PLOK_SpriteData_TestDriveRockyfella_End-PLOK_SpriteData_TestDriveRockyfella
	dw PLOK_SpriteData_TestDriveBrendammiBog_End-PLOK_SpriteData_TestDriveBrendammiBog
	dw PLOK_SpriteData_TestDriveBadreamFens_End-PLOK_SpriteData_TestDriveBadreamFens
	dw PLOK_SpriteData_TestDriveBreezyBeach_End-PLOK_SpriteData_TestDriveBreezyBeach
	dw PLOK_SpriteData_UnknownLevel_End-PLOK_SpriteData_UnknownLevel

PLOK_LevelSpriteDataPtrs:
	dw PLOK_SpriteData_CottonIslandBeach
	dw PLOK_SpriteData_CottonIslandBridge
	dw PLOK_SpriteData_CottonIslandColumns
	dw PLOK_SpriteData_CottonIslandLogFalls
	dw PLOK_SpriteData_CottonIslandRicketyBridge
	dw PLOK_SpriteData_CottonIslandCrazyCradles
	dw PLOK_SpriteData_CottonIslandBlindLeap
	dw PLOK_SpriteData_CottonIslandBobbinsBros
	dw PLOK_SpriteData_AkrillicGarlenBeach
	dw PLOK_SpriteData_AkrillicSleepyDale
	dw PLOK_SpriteData_AkrillicPloksHouse
	dw PLOK_SpriteData_LegacyIslandMaceCove
	dw PLOK_SpriteData_LegacyIslandFoolsGap
	dw PLOK_SpriteData_LegacyIslandZigZag
	dw PLOK_SpriteData_LegacyIslandSpongeRocks
	dw PLOK_SpriteData_LegacyIslandSwiftyPeaks
	dw PLOK_SpriteData_LegacyIslandLogTrail
	dw PLOK_SpriteData_LegacyIslandCrouchHill
	dw PLOK_SpriteData_LegacyIslandBobbinsBros
	dw PLOK_SpriteData_AkrillicPlokTown
	dw PLOK_SpriteData_AkrillicThePenkinos
	dw PLOK_SpriteData_AkrillicVengeThicket
	dw PLOK_SpriteData_AkrillicDreamyCove
	dw PLOK_SpriteData_AkrillicCreepyForest
	dw PLOK_SpriteData_AkrillicWomackSpider
	dw PLOK_SpriteData_AkrillicCreepyCrag
	dw PLOK_SpriteData_AkrillicGohomeCavern
	dw PLOK_SpriteData_AkrillicCrashingRocks
	dw PLOK_SpriteData_AkrillicRockyfella
	dw PLOK_SpriteData_AkrillicBrendammiBog
	dw PLOK_SpriteData_AkrillicBadreamFens
	dw PLOK_SpriteData_AkrillicBreezyBeach
	dw PLOK_SpriteData_FleapitCyclingClever
	dw PLOK_SpriteData_FleapitRoadHogging
	dw PLOK_SpriteData_FleapitHighFlying
	dw PLOK_SpriteData_FleapitEasyRiding
	dw PLOK_SpriteData_FleapitInASpin
	dw PLOK_SpriteData_FleapitRealRumblings
	dw PLOK_SpriteData_FleapitSilentRunning
	dw PLOK_SpriteData_FleapitTheFleaQueen
	dw PLOK_SpriteData_TestDriveSecretWarp
	dw PLOK_SpriteData_TestDriveSleepyDale
	dw PLOK_SpriteData_TestDrivePlokTown
	dw PLOK_SpriteData_TestDriveThePenkinos
	dw PLOK_SpriteData_TestDriveVengeThicket
	dw PLOK_SpriteData_TestDriveDreamyCove
	dw PLOK_SpriteData_TestDriveCreepyForest
	dw PLOK_SpriteData_TestDriveWomackSpider
	dw PLOK_SpriteData_TestDriveCreepyCrag
	dw PLOK_SpriteData_TestDriveGohomeCavern
	dw PLOK_SpriteData_TestDriveCrashingRocks
	dw PLOK_SpriteData_TestDriveRockyfella
	dw PLOK_SpriteData_TestDriveBrendammiBog
	dw PLOK_SpriteData_TestDriveBadreamFens
	dw PLOK_SpriteData_TestDriveBreezyBeach
	dw PLOK_SpriteData_UnknownLevel

PLOK_SpriteData:
.FleapitCyclingClever:
	dw $0100,$02A8,$0012,$3123,$043E,$02A0,$0009,$410A
	dw $0A46,$03F8,$0009,$440A,$0D11,$034C,$0004,$0003
	dw $1250,$0458,$0004,$0003,$02B0,$01E1,$0017,$7018
	dw $0900,$0428,$0012,$2023,$11C0,$0428,$0012,$2033
	dw $1230,$03B8,$0012,$2037,$FFFF
..End:

.FleapitRoadHogging:
	dw $0130,$0218,$0012,$3123,$0120,$0148,$0012,$3320
	dw $0580,$0180,$0009,$340A,$04A7,$0150,$0009,$340A
	dw $128E,$0380,$0009,$1A0A,$09FD,$0472,$0009,$360A
	dw $0812,$0462,$0009,$360A,$068D,$0462,$0009,$360A
	dw $0320,$00D1,$0017,$7079,$12F8,$02F2,$000F,$0003
	dw $1159,$0102,$0000,$8003,$0CE8,$0413,$0000,$8003
	dw $04A9,$03DB,$0000,$8003,$040A,$0403,$0000,$8003
	dw $FFFF
..End:

.FleapitHighFlying:
	dw $0160,$0198,$0012,$3320,$09CE,$03A5,$0004,$0003
	dw $08A5,$039C,$0004,$0003,$0892,$0204,$0004,$0003
	dw $095D,$020F,$0004,$0003,$0A15,$00E8,$0009,$310A
	dw $0ACF,$0120,$0009,$310A,$0E91,$0100,$0009,$2A0A
	dw $0F4D,$0140,$0009,$2A0A,$0E61,$0398,$0004,$0003
	dw $0E15,$03C8,$0004,$0003,$0D37,$03A8,$0004,$0003
	dw $0E18,$01F0,$0004,$0003,$0DBD,$021C,$0004,$0003
	dw $0CEC,$01F0,$0004,$0003,$0D4A,$0224,$0004,$0003
	dw $0420,$00D9,$0017,$707A,$0292,$00B0,$0000,$8003
	dw $0B05,$0072,$000F,$0003,$FFFF
..End:

.FleapitEasyRiding:
	dw $0100,$03B8,$0012,$3320,$00E0,$0308,$0012,$2030
	dw $04E0,$03C0,$0009,$2F0A,$0580,$0450,$0009,$2F0A
	dw $0E7F,$01D8,$0009,$2F0A,$0DE1,$0260,$0009,$2F0A
	dw $02A0,$0274,$0017,$407B,$0BBD,$03A7,$0000,$8003
	dw $0C39,$03AB,$0000,$8003,$10BF,$022F,$0000,$8003
	dw $0EEC,$0139,$0000,$8003,$07E8,$013F,$0000,$8003
	dw $0777,$0132,$0000,$8003,$0797,$0131,$0004,$0003
	dw $1380,$034C,$000F,$0003,$FFFF
..End:

.FleapitInASpin:
	dw $0340,$01C8,$0012,$3420,$0C10,$0218,$0009,$320A
	dw $0D31,$0218,$0009,$320A,$0E95,$0218,$0009,$320A
	dw $0EB3,$0020,$0009,$120A,$0D12,$0020,$0009,$120A
	dw $0831,$0020,$0009,$120A,$0694,$0020,$0009,$120A
	dw $0700,$0410,$0009,$320A,$079F,$0160,$0004,$0003
	dw $0866,$01D1,$0004,$0003,$0958,$0154,$0004,$0003
	dw $0B42,$01AC,$0004,$0003,$0CA3,$0164,$0004,$0003
	dw $0F68,$0154,$0004,$0003,$119B,$0198,$0004,$0003
	dw $1242,$01CE,$0004,$0003,$12DD,$01A1,$0004,$0003
	dw $12FF,$00CA,$0004,$0003,$122B,$0080,$0004,$0003
	dw $00DC,$00E7,$0004,$0003,$0145,$01D3,$0004,$0003
	dw $00F4,$02D6,$0004,$0003,$00CD,$02B0,$0004,$0003
	dw $0136,$03BD,$0004,$0003,$0158,$03A3,$0004,$0003
	dw $02B7,$0400,$0004,$0003,$037F,$03C0,$0004,$0003
	dw $03EC,$035C,$0004,$0003,$0428,$0390,$0004,$0003
	dw $04DD,$03D0,$0004,$0003,$0555,$0368,$0004,$0003
	dw $0589,$03C0,$0004,$0003,$063D,$03BC,$0004,$0003
	dw $066F,$0364,$0004,$0003,$0AA8,$0358,$0004,$0003
	dw $0C68,$038C,$0004,$0003,$0D06,$03CB,$0004,$0003
	dw $0D90,$03B8,$0004,$0003,$10C6,$03CD,$0004,$0003
	dw $11A0,$03C0,$0004,$0003,$121F,$017D,$000F,$0003
	dw $05B0,$01F8,$0017,$407C,$0460,$0174,$0000,$8003
	dw $04D6,$01C2,$0000,$8003,$0A23,$0180,$0000,$8003
	dw $0A0F,$03C5,$0000,$8003,$1102,$03CE,$0000,$8003
	dw $10A6,$03CD,$0000,$8003,$10C6,$03CD,$0000,$8003
	dw $FFFF
..End:

.FleapitRealRumblings:
	dw $0100,$02D8,$0012,$3120,$00E0,$0238,$0012,$300E
	dw $0FB0,$0418,$0012,$203E,$0DF0,$0418,$0012,$203E
	dw $0C30,$0418,$0012,$203E,$0A70,$0418,$0012,$203E
	dw $05F0,$0370,$0009,$8F0A,$05AF,$00BC,$0004,$0003
	dw $06DB,$007E,$0004,$0003,$07EC,$0064,$0004,$0003
	dw $090D,$00A4,$0004,$0003,$09BE,$017A,$0004,$0003
	dw $0A49,$017A,$0004,$0003,$09BE,$02AA,$0004,$0003
	dw $0A49,$02AA,$0004,$0003,$0C7D,$02EA,$0004,$0003
	dw $0DB5,$02B0,$0004,$0003,$0EED,$0294,$0004,$0003
	dw $102C,$02D4,$0004,$0003,$10FB,$03AA,$0004,$0003
	dw $118C,$03AA,$0004,$0003,$02A0,$0190,$0017,$407D
	dw $04FC,$00E2,$0000,$8003,$0BB0,$0314,$0000,$8003
	dw $0C33,$02F4,$0000,$8003,$00BC,$0331,$0000,$8003
	dw $08BA,$03FB,$0000,$8003,$0857,$03E2,$0000,$8003
	dw $0A98,$0329,$000F,$0003,$0BB3,$0084,$0014,$4000
	dw $FFFF
..End:

.FleapitSilentRunning:
	dw $0190,$01F8,$0012,$A040,$0120,$0188,$0012,$3100
	dw $0E0F,$02B8,$0009,$110A,$0C8E,$02A0,$0009,$110A
	dw $0B11,$0280,$0009,$110A,$089A,$0258,$0009,$340A
	dw $0710,$0270,$0009,$340A,$0597,$0298,$0009,$340A
	dw $0816,$0420,$0009,$240A,$0A31,$0420,$0009,$340A
	dw $0AA6,$03C0,$0009,$340A,$092C,$0380,$0009,$210A
	dw $07E2,$00C0,$0004,$0003,$0825,$00A4,$0004,$0003
	dw $09FB,$00C0,$0004,$0003,$0A45,$00A4,$0004,$0003
	dw $0B9A,$00A4,$0004,$0003,$0BE4,$00A4,$0004,$0003
	dw $0C13,$0094,$0004,$0003,$0DD9,$00E0,$0004,$0003
	dw $0EE1,$0126,$0004,$0003,$0FEC,$00DE,$0004,$0003
	dw $1102,$00B8,$0004,$0003,$1129,$0252,$0004,$0003
	dw $111A,$034C,$0004,$0003,$1192,$03D0,$0004,$0003
	dw $0FBF,$03D0,$0004,$0003,$0F74,$025A,$0004,$0003
	dw $09CD,$01D0,$0004,$0003,$037A,$0274,$0004,$0003
	dw $03F6,$0274,$0004,$0003,$037B,$0312,$0004,$0003
	dw $03F1,$0312,$0004,$0003,$038D,$03A0,$0004,$0003
	dw $03E7,$03A0,$0004,$0003,$045C,$0432,$0004,$0003
	dw $0380,$02C4,$000F,$0003,$091F,$042C,$0004,$0003
	dw $0B07,$038C,$0004,$0003,$0330,$00B3,$0017,$407E
	dw $06B3,$007E,$0000,$8003,$08D1,$007F,$0000,$8003
	dw $0AED,$0081,$0000,$8003,$0C5D,$0081,$0000,$8003
	dw $0CB6,$0081,$0000,$8003,$0E9F,$0121,$0000,$8003
	dw $0F1D,$0120,$0000,$8003,$FFFF
..End:

.FleapitTheFleaQueen:
	dw $02E4,$0098,$0026,$0008,$015E,$0101,$0017,$407F
	dw $FFFF
..End:

.TestDriveSecretWarp:
	dw $0924,$01F1,$0017,$7078,$020B,$0192,$0017,$707B
	dw $0B1C,$01F2,$0017,$707C,$1244,$0191,$0017,$707F
	dw $0C83,$0420,$0017,$707D,$016D,$0442,$0017,$707E
	dw $0D9C,$03E0,$0017,$7079,$12E8,$0440,$0017,$707A
	dw $07BA,$0421,$0017,$7047,$0698,$03E1,$0017,$7042
	dw $108D,$03B1,$0017,$7044,$03AD,$03B0,$0017,$7046
	dw $068B,$01C2,$0017,$7041,$0401,$028C,$0017,$7043
	dw $0EC6,$01EE,$0017,$7045,$FFFF
..End:

.CottonIslandBeach:
	dw $0090,$012C,$000F,$8003,$03A0,$0160,$000C,$0102
	dw $0486,$0100,$000B,$0100,$058C,$0120,$000C,$0102
	dw $056C,$0120,$000C,$0102,$0668,$00CA,$000B,$0100
	dw $06AA,$00C0,$000B,$0100,$0758,$00E0,$000C,$0102
	dw $0780,$00E0,$000C,$0102,$07A8,$00E0,$000C,$0102
	dw $0880,$0081,$000B,$0200,$0880,$0081,$000B,$0100
	dw $08BC,$0080,$000B,$0100,$0E8C,$02F5,$0003,$0020
	dw $0BB7,$0204,$0003,$0020,$0E6C,$02F5,$0003,$0010
	dw $0B97,$0204,$0003,$0010,$FFFF
..End:

.CottonIslandBridge:
	dw $0098,$0088,$0016,$0180,$009C,$0080,$000B,$0201
	dw $009C,$0080,$000B,$0101,$009E,$0160,$0017,$4071
	dw $0080,$0160,$000C,$8102,$0070,$0160,$000C,$8102
	dw $02B0,$01D8,$000D,$0002,$0330,$01D8,$000D,$0102
	dw $03E6,$0140,$000C,$0102,$0416,$0140,$000C,$0102
	dw $0446,$0140,$000C,$0102,$03F0,$00B8,$000F,$0003
	dw $03E6,$00E0,$000C,$0102,$0416,$00E0,$000C,$0102
	dw $04F0,$01D8,$000D,$0102,$0530,$01D8,$000D,$0200
	dw $06D0,$0160,$000C,$0102,$0700,$0160,$000C,$0102
	dw $0698,$0100,$000B,$0200,$070C,$0100,$000C,$0102
	dw $075C,$0100,$000C,$0102,$0700,$00A0,$000B,$0200
	dw $0710,$00A0,$000B,$0100,$FFFF
..End:

.CottonIslandColumns:
	dw $014C,$00A0,$000E,$8003,$0288,$00E2,$000C,$0102
	dw $02B2,$0100,$000C,$0102,$02A0,$02B8,$000D,$0000
	dw $02E0,$02B8,$000D,$0001,$0360,$0120,$000E,$8003
	dw $04B8,$0162,$000C,$0102,$04C8,$0162,$000C,$0102
	dw $03E0,$02B8,$000D,$0102,$0420,$02B8,$000D,$0202
	dw $04E0,$02B8,$000D,$0002,$0520,$02B8,$000D,$0202
	dw $05A0,$0120,$000E,$8003,$06CC,$00E0,$000C,$0102
	dw $06E0,$00E0,$000C,$0102,$0620,$02B8,$000D,$0202
	dw $0720,$02B8,$000D,$0102,$0760,$020C,$000F,$8003
	dw $07B0,$00A0,$000E,$8003,$FFFF
..End:

.CottonIslandLogFalls:
	dw $0050,$00C0,$000B,$0201,$0050,$00C0,$000B,$0101
	dw $028D,$008C,$000B,$0100,$0280,$0080,$000B,$0100
	dw $03A3,$01A6,$000C,$0102,$03C9,$01C7,$000C,$0102
	dw $0475,$0156,$000B,$0100,$049F,$0183,$000B,$0100
	dw $0559,$008B,$000B,$0100,$059B,$00CD,$000B,$0200
	dw $0591,$01A0,$000C,$0102,$051F,$01A7,$000C,$8102
	dw $0554,$017A,$000F,$8003,$06CF,$0113,$000B,$0100
	dw $06CF,$0113,$000B,$0200,$0805,$0100,$000B,$0200
	dw $0805,$0100,$000B,$0100,$0820,$00CC,$000B,$0200
	dw $0354,$00A5,$0017,$4075,$FFFF
..End:

.CottonIslandRicketyBridge:
	dw $00B0,$01D0,$0016,$0180,$0880,$0060,$0016,$01A0
	dw $0100,$003F,$0001,$0001,$01C0,$0238,$000D,$0202
	dw $0280,$0238,$000D,$0101,$0112,$0160,$0001,$0001
	dw $02FA,$01C0,$000E,$8003,$0400,$0238,$000D,$0101
	dw $0440,$0238,$000D,$0201,$0480,$0238,$000D,$0002
	dw $04C0,$0238,$000D,$0101,$0530,$01C0,$000E,$8003
	dw $03C0,$0170,$0001,$0001,$0640,$0238,$000D,$0001
	dw $0680,$0238,$000D,$0002,$06C0,$0238,$000D,$0000
	dw $05F8,$0170,$0001,$0001,$0700,$0238,$000D,$0001
	dw $0821,$0150,$0001,$0001,$06DB,$0059,$0001,$0001
	dw $0470,$0059,$0001,$0001,$05A4,$00A0,$000E,$0003
	dw $0388,$00A0,$000E,$0003,$034C,$007C,$000F,$8003
	dw $0AE0,$03B0,$000B,$0100,$0B00,$03B0,$000B,$0100
	dw $0B20,$03B0,$000B,$0100,$0AE0,$03B0,$000B,$0200
	dw $0B40,$03B0,$000B,$0100,$0B20,$03B0,$000B,$0200
	dw $0BF0,$0220,$000B,$0201,$0BD0,$0220,$000B,$0201
	dw $0C10,$0220,$000B,$0201,$0BF0,$0220,$000B,$0301
	dw $0C20,$0220,$000B,$0201,$0C00,$0220,$000B,$0201
	dw $0B16,$0090,$000B,$0300,$0B36,$0090,$000B,$0300
	dw $0AF6,$0090,$000B,$0300,$0AD6,$0090,$000B,$0300
	dw $0AB6,$0090,$000B,$0300,$0B56,$0090,$000B,$0300
	dw $FFFF
..End:

.CottonIslandCrazyCradles:
	dw $0280,$0180,$0016,$0160,$015E,$012E,$000C,$0102
	dw $0173,$012E,$000C,$0102,$0249,$020E,$0001,$0001
	dw $0172,$02BF,$0017,$40C6,$0140,$0338,$000D,$0201
	dw $02C0,$0338,$000D,$0202,$0600,$0338,$000D,$0202
	dw $0700,$0338,$000D,$0102,$0800,$0338,$000D,$0201
	dw $08C0,$0338,$000D,$0102,$0940,$0338,$000D,$0000
	dw $0740,$025C,$000F,$0003,$036C,$0190,$000E,$8003
	dw $05AC,$0190,$000E,$8003,$0470,$0166,$000C,$0102
	dw $050E,$0193,$000C,$0102,$0841,$008B,$0001,$0001
	dw $FFFF
..End:

.CottonIslandBlindLeap:
	dw $0100,$002B,$0001,$0001,$0260,$0070,$000B,$0200
	dw $0260,$0070,$000B,$0300,$0260,$0070,$000B,$0100
	dw $0410,$0170,$000B,$0200,$0410,$0170,$000B,$0300
	dw $0410,$0170,$000B,$0100,$05B0,$0260,$000B,$0200
	dw $05B0,$0260,$000B,$0300,$05B0,$0260,$000B,$0100
	dw $0680,$0320,$000B,$0200,$0680,$0320,$000B,$0300
	dw $0680,$0320,$000B,$0100,$0730,$0448,$000D,$0002
	dw $07B0,$0448,$000D,$0002,$0A7C,$027B,$000B,$0100
	dw $0A7C,$027B,$000B,$0200,$0A30,$027B,$000B,$0100
	dw $0BA2,$01E6,$000C,$0102,$0BB2,$01E6,$000C,$0102
	dw $0CBC,$0148,$000E,$8003,$0770,$006E,$000F,$8003
	dw $0E2C,$0060,$000F,$0003,$0E00,$0020,$0001,$0001
	dw $FFFF
..End:

.CottonIslandBobbinsBros:
	dw $0200,$0050,$0007,$680A,$0200,$0050,$0006,$8003
	dw $0280,$0050,$0007,$2A0A,$0280,$0050,$0006,$0003
	dw $FFFF
..End:

.LegacyIslandMaceCove:
	dw $027A,$013C,$000B,$0100,$0144,$0110,$0001,$0001
	dw $0340,$0160,$0001,$0001,$0434,$00A0,$0003,$0010
	dw $0530,$00D0,$0001,$0001,$0652,$00A0,$0003,$0010
	dw $0860,$00E0,$000B,$0100,$0850,$00E0,$000B,$0200
	dw $0840,$00E0,$000B,$0100,$0910,$0140,$0001,$0001
	dw $FFFF
..End:

.LegacyIslandFoolsGap:
	dw $03F0,$0130,$0016,$4060,$0165,$0170,$000C,$0102
	dw $0181,$0160,$0003,$0050,$0247,$016C,$000C,$0202
	dw $0281,$0160,$0003,$0050,$036B,$0167,$000C,$0202
	dw $03C0,$00CA,$0001,$0001,$047F,$00F1,$000C,$0202
	dw $0503,$00B0,$000C,$0202,$0547,$0090,$000C,$0202
	dw $07F2,$013B,$0001,$0001,$06DA,$010D,$0001,$0001
	dw $FFFF
..End:

.LegacyIslandZigZag:
	dw $012C,$0348,$0016,$4050,$01A0,$03B8,$000D,$0000
	dw $0200,$03B8,$000D,$0001,$0260,$03B8,$000D,$0002
	dw $02C0,$03B8,$000D,$0001,$0320,$03B8,$000D,$0000
	dw $0380,$03B8,$000D,$0001,$03E0,$03B8,$000D,$0002
	dw $04E0,$03B8,$000D,$0000,$0540,$03B8,$000D,$0001
	dw $05A0,$03B8,$000D,$0002,$0600,$03B8,$000D,$0001
	dw $0660,$03B8,$000D,$0000,$06C0,$03B8,$000D,$0001
	dw $0720,$03B8,$000D,$0002,$0572,$02F4,$0001,$0001
	dw $062A,$0314,$0001,$0001,$06EA,$02AC,$0016,$4040
	dw $0626,$0272,$000B,$0301,$0586,$0272,$000B,$0301
	dw $0546,$0272,$000B,$0301,$05C6,$0272,$000B,$0301
	dw $02ED,$02B0,$000B,$0301,$02CD,$02B0,$000B,$0201
	dw $02DC,$028D,$000F,$0003,$025D,$027C,$000B,$0301
	dw $025D,$027C,$000B,$0201,$01C9,$0270,$000B,$0301
	dw $0197,$018C,$0016,$4050,$0251,$0166,$000C,$0202
	dw $02AD,$01A0,$000C,$0202,$037D,$017B,$000C,$0202
	dw $04F9,$017D,$000C,$0102,$0561,$0166,$000C,$0202
	dw $0484,$02F0,$0001,$0001,$01DC,$01F9,$0001,$0001
	dw $0484,$013F,$0001,$0001,$0657,$0200,$0001,$0001
	dw $06D7,$0200,$0001,$0001,$FFFF
..End:

.LegacyIslandSpongeRocks:
	dw $00B0,$0050,$000B,$0101,$0090,$0060,$000B,$0301
	dw $00A0,$0060,$000B,$0201,$0268,$0160,$0001,$0001
	dw $0300,$01A0,$0001,$0001,$0368,$01F8,$000D,$0002
	dw $0420,$01F8,$000D,$0102,$0520,$00A4,$0001,$0001
	dw $0580,$0160,$0001,$0001,$09A6,$0171,$000C,$0102
	dw $04F0,$0068,$000B,$0201,$0510,$0068,$000B,$0101
	dw $04E0,$0068,$000B,$0301,$07A8,$01F8,$000D,$0000
	dw $07E0,$01F8,$000D,$0002,$0876,$0109,$0001,$0001
	dw $08DE,$0118,$000F,$8003,$0A20,$01F8,$000D,$0102
	dw $0C00,$00A0,$000B,$0100,$0BD0,$00A0,$000B,$0300
	dw $0BF0,$00A0,$000B,$0200,$0C00,$0090,$000B,$0200
	dw $FFFF
..End:

.LegacyIslandSwiftyPeaks:
	dw $0198,$00FA,$0003,$0050,$01E8,$00D0,$0016,$4000
	dw $0200,$00D0,$0016,$4040,$021E,$00C1,$0016,$4000
	dw $0536,$0116,$0003,$0050,$057C,$00C6,$0003,$0050
	dw $05A8,$00D0,$0016,$4040,$05C0,$00D0,$0016,$4000
	dw $05DE,$00C1,$0016,$4000,$090B,$0107,$0003,$0050
	dw $092B,$00E7,$0003,$0050,$0968,$00D0,$0016,$4000
	dw $0990,$00D0,$0016,$4000,$09A8,$00C1,$0016,$4040
	dw $08BF,$00FA,$000F,$0003,$0B58,$017A,$0001,$0001
	dw $0B84,$0047,$0001,$0001,$FFFF
..End:

.LegacyIslandLogTrail:
	dw $00F0,$0360,$000B,$0200,$00F0,$0368,$000B,$0300
	dw $00F0,$0370,$000B,$0100,$00E8,$0360,$000B,$0101
	dw $00E8,$0368,$000B,$0201,$00E8,$0370,$000B,$0301
	dw $0210,$0450,$0003,$0050,$0230,$0450,$0003,$0050
	dw $02F0,$0391,$0001,$0001,$02F0,$0480,$0001,$0001
	dw $0460,$0450,$0003,$0050,$0490,$0450,$0003,$0050
	dw $04C0,$0450,$0003,$0050,$05BC,$030E,$000F,$0003
	dw $0710,$0260,$000B,$0200,$0720,$0260,$000B,$0200
	dw $0710,$0260,$000B,$0100,$0710,$0260,$000E,$8003
	dw $0710,$0260,$0016,$4000,$07E6,$0220,$000B,$0200
	dw $07E6,$0220,$000B,$0300,$07E6,$0220,$000B,$0100
	dw $0930,$0140,$000B,$0300,$0930,$0140,$000B,$0200
	dw $0930,$0140,$000B,$0100,$0930,$0140,$000E,$8003
	dw $0930,$0140,$0016,$4010,$0A2A,$00E0,$000B,$0300
	dw $0A2A,$00E0,$000B,$0200,$0A2A,$00E0,$000B,$0100
	dw $FFFF
..End:

.LegacyIslandCrouchHill:
	dw $00E0,$0040,$0001,$0001,$0180,$0070,$0001,$0001
	dw $01C0,$00C0,$0001,$0001,$00C0,$0020,$000B,$0301
	dw $0040,$0060,$000B,$0301,$0100,$0130,$0016,$40F0
	dw $0108,$0198,$0001,$0001,$02E0,$0180,$0001,$0001
	dw $0340,$01E0,$0001,$0001,$04C8,$029C,$0001,$0001
	dw $0546,$033F,$0001,$0001,$091E,$0345,$0001,$0001
	dw $0850,$01C0,$0001,$0001,$0A50,$00C0,$0001,$0001
	dw $0E50,$0390,$000B,$0200,$0E50,$0390,$000B,$0100
	dw $0E70,$0390,$000B,$0300,$0E90,$0410,$0001,$0001
	dw $0B8C,$03B0,$000F,$0003,$0AF4,$03D2,$000C,$0102
	dw $0BB2,$03D0,$000C,$0102,$0C0E,$0402,$000C,$0202
	dw $0D3C,$0420,$000C,$0202,$0D3C,$0420,$000C,$0302
	dw $FFFF
..End:

.LegacyIslandBobbinsBros:
	dw $0200,$0050,$0007,$680A,$0200,$0050,$0006,$8003
	dw $0260,$0050,$0007,$2A0A,$0260,$0050,$0006,$0003
	dw $02B0,$0050,$0007,$2A0A,$02B0,$0050,$0006,$0003
	dw $FFFF
..End:

.AkrillicGarlenBeach:
	dw $0342,$035A,$0000,$0003,$03E4,$035A,$0000,$0003
	dw $0471,$02EA,$0000,$0003,$0542,$028A,$0000,$0003
	dw $0592,$02FA,$0000,$0003,$06E2,$033A,$0000,$0003
	dw $00A2,$013A,$0000,$0003,$00A2,$00CA,$0000,$0003
	dw $02C1,$0200,$0000,$0003,$02F2,$026A,$0000,$0003
	dw $06D2,$017A,$0000,$0003,$06F2,$016A,$0000,$0003
	dw $0932,$011A,$0000,$0003,$0AEF,$01E0,$0000,$0003
	dw $0B40,$0050,$000A,$4000,$0B60,$0050,$000A,$4000
	dw $0B80,$0050,$000A,$4000,$07B5,$03B8,$0008,$1B00
	dw $0819,$0106,$000F,$0003,$09B9,$0398,$000F,$8003
	dw $0C35,$00FE,$0014,$4000,$FFFF
..End:

.AkrillicSleepyDale:
	dw $01B2,$0413,$0000,$0003,$0231,$0278,$0000,$0003
	dw $0273,$01F0,$0000,$0003,$02A1,$0080,$0000,$0003
	dw $0372,$004F,$0000,$0003,$03B8,$0050,$0000,$0003
	dw $0700,$0038,$0000,$0003,$0751,$0048,$0000,$0003
	dw $08B2,$00B8,$0000,$0003,$0852,$024A,$0000,$0003
	dw $0952,$02B8,$0000,$0003,$09E3,$0474,$0000,$0003
	dw $05A0,$0450,$0016,$0140,$03B0,$047A,$0018,$8F0A
	dw $0798,$045A,$0018,$8F0A,$0140,$0118,$0017,$4075
	dw $05A2,$0070,$000F,$0003,$05A0,$0268,$0012,$A03C
	dw $04F0,$0368,$0012,$A030,$0650,$0368,$0012,$A038
	dw $04F0,$02D8,$0012,$2030,$0650,$02D8,$0012,$203C
	dw $05A0,$03E8,$0012,$2030,$016D,$046A,$0001,$0001
	dw $021B,$0106,$0001,$0001,$0AA1,$0173,$0001,$0001
	dw $08B2,$04A0,$0001,$0001,$FFFF
..End:

.AkrillicPloksHouse:
	dw $0174,$00E0,$0000,$0003,$FFFF
..End:

.AkrillicPlokTown:
	dw $068C,$03B0,$0000,$0003,$075A,$03B0,$0000,$0003
	dw $0AF8,$03B0,$0000,$0003,$0A80,$0428,$0000,$0003
	dw $0617,$0440,$0000,$0003,$056D,$0400,$0000,$0003
	dw $05FF,$0280,$0000,$0003,$0672,$0270,$0000,$0003
	dw $07E1,$0266,$0000,$0003,$095C,$0130,$0000,$0003
	dw $0B40,$0440,$0016,$0494,$0218,$03B0,$001F,$8040
	dw $0308,$03B0,$001F,$8040,$037E,$03B0,$001F,$8040
	dw $0498,$0390,$001F,$80C0,$0560,$0300,$001F,$2090
	dw $08DA,$0356,$001F,$A050,$087C,$03A6,$001F,$A0D0
	dw $08AE,$0376,$001F,$A050,$094E,$0340,$001F,$A0D0
	dw $09BF,$0340,$001F,$A0D0,$063D,$0060,$001F,$6030
	dw $08AA,$0060,$001F,$6030,$0813,$04A0,$000B,$0301
	dw $0890,$0491,$000B,$0101,$0850,$0490,$000B,$0201
	dw $0648,$0490,$000B,$0201,$0674,$0490,$000B,$0101
	dw $03FC,$04A0,$000B,$0301,$048C,$0490,$000B,$0201
	dw $048C,$0490,$000B,$0101,$0932,$0320,$000F,$0003
	dw $0A50,$0320,$000F,$0003,$0AD4,$01E4,$000F,$0003
	dw $033E,$0310,$001D,$4270,$0B42,$0310,$001D,$4270
	dw $04B0,$0200,$001D,$2361,$0950,$0200,$001D,$2361
	dw $0740,$0068,$0012,$2223,$0340,$0200,$0020,$0002
	dw $0608,$0054,$0014,$7FFF,$0121,$0450,$0014,$4000
	dw $1026,$0250,$001B,$000A,$1026,$0220,$0020,$0002
	dw $1026,$0220,$0020,$0002,$1026,$0220,$0020,$0002
	dw $1026,$0220,$0020,$0002,$1026,$0220,$0020,$0002
	dw $1026,$0220,$0020,$0002,$1054,$0270,$0021,$0096
	dw $0FF4,$0270,$0021,$0096,$0FA4,$0270,$0021,$0096
	dw $1054,$0270,$0021,$0096,$0FA4,$0270,$0021,$0096
	dw $0FF4,$0270,$0021,$0096,$10A4,$0270,$0021,$0096
	dw $0FF4,$0270,$0021,$0096,$1054,$0270,$0021,$0096
	dw $0FF4,$0270,$0021,$0096,$10A4,$0270,$0021,$0096
	dw $0FA4,$0270,$0021,$0096,$10A4,$0270,$0021,$0096
	dw $1054,$0270,$0021,$0096,$0FF4,$0270,$0021,$0096
	dw $1054,$0270,$0021,$0096,$10A4,$0270,$0021,$0096
	dw $0FF4,$0270,$0021,$0096,$1054,$0270,$0017,$40C3
	dw $10A4,$0270,$0021,$0096,$0FF4,$0270,$000A,$0096
	dw $0FA4,$0270,$000A,$0096,$0FF4,$0270,$000A,$0096
	dw $10A4,$0270,$000A,$0096,$107C,$0320,$0014,$4000
	dw $0FF4,$0270,$0021,$0096,$10A4,$0270,$0021,$0096
	dw $0FF4,$0270,$0021,$0096,$1044,$03A0,$001D,$2161
	dw $FFFF
..End:

.AkrillicThePenkinos:
	dw $018B,$0090,$0025,$0104,$020B,$0090,$0025,$0104
	dw $028B,$0070,$0025,$0104,$008B,$00B0,$0025,$0104
	dw $FFFF
..End:

.AkrillicVengeThicket:
	dw $0634,$024D,$0000,$0003,$09A1,$0248,$0000,$0003
	dw $09D2,$0248,$0000,$0003,$0D71,$0210,$0000,$0003
	dw $0DD1,$022A,$0000,$0003,$0E32,$020D,$0000,$0003
	dw $0CBE,$00E0,$0000,$0003,$0A90,$00E0,$0000,$0003
	dw $05F6,$00E6,$0000,$0003,$03C2,$00D0,$0000,$0003
	dw $1291,$003F,$0018,$8F0A,$0F8C,$00AF,$0018,$4F0A
	dw $0242,$010F,$0018,$4F0A,$13C5,$0090,$0017,$4053
	dw $1385,$0090,$0017,$40A2,$1398,$01B4,$000F,$8003
	dw $FFFF
..End:

.AkrillicDreamyCove:
	dw $014F,$0273,$0000,$0003,$0267,$00F6,$0000,$0003
	dw $02B3,$011D,$0000,$0003,$0341,$0140,$0000,$0003
	dw $04ED,$017D,$0000,$0003,$0571,$01A0,$0000,$0003
	dw $05A1,$019B,$0000,$0003,$0623,$0170,$0000,$0003
	dw $0742,$019B,$0000,$0003,$0764,$01A0,$0000,$0003
	dw $0796,$018D,$0000,$0003,$0A62,$00E8,$0000,$0003
	dw $1790,$0277,$0000,$0003,$0FB2,$0148,$0000,$0003
	dw $0BC3,$0110,$0000,$0003,$0C98,$02A7,$001C,$0004
	dw $0E38,$02A7,$001C,$0004,$1058,$02A7,$001C,$0000
	dw $1248,$02A7,$001C,$0004,$13B8,$02A7,$001C,$0004
	dw $15C8,$02A7,$001C,$0000,$087C,$026D,$000B,$0101
	dw $082A,$0273,$000B,$0201,$06AE,$0278,$000B,$0101
	dw $06AE,$0278,$000B,$0201,$0652,$026A,$000B,$0201
	dw $0622,$026A,$000B,$0301,$0412,$0278,$000B,$0301
	dw $03E8,$0278,$000B,$0201,$03D1,$0278,$000B,$0201
	dw $03B0,$0278,$000B,$0201,$0390,$0278,$000B,$0201
	dw $0330,$0200,$000B,$0301,$041A,$00FC,$0017,$4086
	dw $00D8,$0266,$0008,$1B00,$1809,$0266,$0008,$1B00
	dw $0A61,$0214,$000F,$8003,$01E0,$01AC,$000F,$0003
	dw $1703,$01CE,$000F,$0003,$150F,$0080,$0016,$0460
	dw $0AC0,$03B0,$000B,$0200,$0B18,$03B0,$000B,$0200
	dw $0B60,$0378,$0012,$A050,$0CA0,$0378,$0012,$A050
	dw $0DD2,$03A0,$000B,$0200,$0E00,$03A0,$000B,$0200
	dw $FFFF
..End:

.AkrillicCreepyForest:
	dw $02C2,$0408,$0000,$0003,$0322,$0448,$0000,$0003
	dw $0402,$0468,$0000,$0003,$0362,$0220,$0000,$0003
	dw $02E1,$0220,$0000,$0003,$0732,$0468,$0000,$0003
	dw $0781,$0428,$0000,$0003,$0842,$0408,$0000,$0003
	dw $07DA,$01DB,$0000,$0003,$0852,$01BB,$0000,$0003
	dw $074F,$0169,$0000,$0003,$0AF7,$016C,$0000,$0003
	dw $0A6B,$018A,$0000,$0003,$0AF7,$01DC,$0000,$0003
	dw $0134,$03D5,$0001,$0001,$04F0,$02C0,$0001,$0001
	dw $01A0,$01E8,$0001,$0001,$053D,$03A0,$0001,$0001
	dw $060B,$03A0,$0001,$0001,$0644,$024D,$0001,$0001
	dw $0983,$016A,$0001,$0001,$068B,$0070,$0001,$0001
	dw $0394,$0303,$001B,$000A,$0350,$0100,$001B,$000A
	dw $07F8,$02A0,$001B,$000A,$07F8,$008E,$001B,$000A
	dw $00EC,$014C,$0017,$40F4,$0402,$0260,$0017,$4086
	dw $0506,$0402,$0014,$4000,$0639,$0402,$0014,$4000
	dw $FFFF
..End:

.AkrillicCreepyCrag:
	dw $00D7,$0AA0,$0000,$0003,$0128,$0ACB,$0000,$0003
	dw $0572,$0AC8,$0000,$0003,$0116,$07A0,$0000,$0003
	dw $05D8,$0786,$0000,$0003,$05A2,$07A0,$0000,$0003
	dw $0601,$0438,$0000,$0003,$05A1,$0471,$0000,$0003
	dw $00F2,$0450,$0000,$0003,$00A5,$0423,$0000,$0003
	dw $0127,$0464,$0000,$0003,$02A0,$0D30,$000B,$0801
	dw $02D8,$0D60,$000B,$0900,$0390,$0CA0,$000B,$0801
	dw $0380,$0CA0,$000B,$0801,$02FB,$0940,$000B,$0801
	dw $030B,$0940,$000B,$0801,$0318,$0940,$000B,$0801
	dw $0308,$0940,$000B,$0801,$03E0,$054C,$000B,$0A01
	dw $03F0,$054C,$000B,$0A01,$0288,$0140,$000B,$0801
	dw $02A8,$0140,$000B,$0801,$03C8,$0140,$000B,$0801
	dw $00C0,$0738,$0017,$4057,$0600,$0738,$0017,$4036
	dw $0421,$0C50,$0008,$1600,$0204,$0973,$0008,$1800
	dw $0432,$0608,$0008,$1600,$04B0,$0300,$0008,$1600
	dw $01F2,$0134,$000A,$4000,$0202,$0124,$000A,$4000
	dw $0212,$0124,$000A,$4000,$047E,$0DEF,$000A,$4000
	dw $046E,$0DCF,$000A,$4000,$045E,$0DCF,$000A,$4000
	dw $00E0,$00CF,$0014,$4000,$0372,$0BC0,$0018,$4F01
	dw $0372,$08A0,$0018,$4F02,$0372,$0570,$0018,$4F03
	dw $0362,$0240,$0018,$4F04,$FFFF
..End:

.AkrillicGohomeCavern:
	dw $0960,$01D0,$0000,$0003,$09A0,$01D0,$0000,$0003
	dw $09E0,$01D0,$0000,$0003,$0940,$01D0,$0000,$0003
	dw $0980,$01D0,$0000,$0003,$0B80,$01D0,$0000,$0003
	dw $0BF0,$01D0,$0000,$0003,$0BC2,$01D0,$0000,$0003
	dw $0AA1,$0148,$0000,$0003,$0AE1,$0130,$0000,$0003
	dw $1031,$0140,$0000,$0003,$106C,$0157,$0000,$0003
	dw $1561,$0148,$0000,$0003,$1661,$0138,$0000,$0003
	dw $16A0,$0360,$000F,$0003,$12A4,$02E6,$0016,$04E0
	dw $00C4,$0130,$001D,$FF42,$08CF,$0110,$001D,$8F63
	dw $0E1F,$0120,$001D,$6F63,$137D,$0110,$001D,$4F63
	dw $13F8,$03DC,$001C,$0002,$14E0,$03DC,$001C,$0002
	dw $15E4,$03DC,$001C,$0001,$0F68,$02BA,$001F,$C061
	dw $0F68,$02BA,$001F,$C064,$0882,$02A0,$001F,$E070
	dw $0882,$02A0,$001F,$E074,$05CF,$01B1,$001F,$E070
	dw $05CF,$01B1,$001F,$E074,$1242,$0310,$001F,$C065
	dw $1242,$0310,$001F,$C068,$058B,$00A8,$001F,$6030
	dw $07C0,$0104,$001F,$6030,$0FD4,$0153,$001F,$A054
	dw $1090,$0154,$001F,$A0D4,$151B,$0141,$001F,$8048
	dw $153D,$0142,$001F,$80C8,$162F,$0120,$001F,$8045
	dw $FFFF
..End:

.AkrillicCrashingRocks:
	dw $06DD,$0100,$0000,$0003,$14DE,$0100,$0000,$0003
	dw $15E2,$0100,$0000,$0003,$16DC,$0100,$0000,$0003
	dw $1170,$00C0,$0000,$0003,$11B4,$00C0,$0000,$0003
	dw $1F7D,$0125,$0000,$0003,$1F9D,$0125,$0000,$0003
	dw $0318,$0070,$0001,$0001,$023A,$004B,$000B,$0300
	dw $023A,$0050,$000B,$0200,$0280,$0050,$000B,$0300
	dw $0493,$0058,$000B,$0200,$04B3,$0058,$000B,$0300
	dw $0493,$0058,$000B,$0100,$0A00,$0080,$000B,$0100
	dw $0A00,$0080,$000B,$0200,$0A00,$0080,$000B,$0300
	dw $0BB0,$0060,$000B,$0200,$0BE0,$0060,$000B,$0300
	dw $0BB0,$0060,$000B,$0300,$0BB0,$0060,$000B,$0100
	dw $108F,$00A3,$000B,$0100,$10B6,$00A3,$000B,$0200
	dw $10D6,$00A3,$000B,$0300,$116A,$0051,$0001,$0001
	dw $11CA,$0051,$0001,$0001,$13CA,$006E,$000B,$0100
	dw $13CA,$006E,$000B,$0200,$13EA,$006E,$000B,$0200
	dw $13EA,$006E,$000B,$0300,$18D7,$00AE,$000B,$0200
	dw $1920,$00A0,$000B,$0300,$1960,$00A0,$000B,$0300
	dw $18D0,$00A0,$000B,$0100,$1AED,$007C,$000B,$0200
	dw $1ADD,$007C,$000B,$0200,$1ADD,$007C,$000B,$0300
	dw $0D70,$00C8,$0012,$2223,$0E50,$00C8,$0012,$2223
	dw $1B90,$00B8,$0012,$2023,$1C60,$00D8,$0012,$2243
	dw $1D60,$00D8,$0012,$2243,$00A0,$007D,$000F,$8003
	dw $FFFF
..End:

.AkrillicRockyfella:
	dw $01E0,$0158,$0010,$000A,$0220,$0158,$0010,$000A
	dw $0260,$0158,$0010,$000A,$02A0,$0158,$0010,$000A
	dw $02A8,$00F0,$0011,$0008,$FFFF
..End:

.AkrillicWomackSpider:
	dw $02E0,$00A0,$0002,$000B,$02E0,$0080,$0024,$0000
	dw $FFFF
..End:

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_AkrillicBrendammiBog)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_AkrillicBrendammiBog_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_AkrillicBadreamFens)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_AkrillicBadreamFens_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_AkrillicBreezyBeach)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_AkrillicBreezyBeach_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale, PLOK_SpriteData_TestDriveSleepyDale)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale_End, PLOK_SpriteData_TestDriveSleepyDale_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale, PLOK_SpriteData_TestDrivePlokTown)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale_End, PLOK_SpriteData_TestDrivePlokTown_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveThePenkinos)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveThePenkinos_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveVengeThicket)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveVengeThicket_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveDreamyCove)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveDreamyCove_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveCreepyForest)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveCreepyForest_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicWomackSpider, PLOK_SpriteData_TestDriveWomackSpider)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicWomackSpider_End, PLOK_SpriteData_TestDriveWomackSpider_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveCreepyCrag)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveCreepyCrag_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveGohomeCavern)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveGohomeCavern_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveCrashingRocks)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveCrashingRocks_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicPlokTown, PLOK_SpriteData_TestDriveRockyfella)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicPlokTown_End, PLOK_SpriteData_TestDriveRockyfella_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveBrendammiBog)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveBrendammiBog_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveBadreamFens)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveBadreamFens_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_TestDriveBreezyBeach)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_TestDriveBreezyBeach_End)
%SetDuplicateOrNullPointer($88D716, PLOK_SpriteData_UnknownLevel)
%SetDuplicateOrNullPointer($88D718, PLOK_SpriteData_UnknownLevel_End)
else
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_AkrillicBrendammiBog)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_AkrillicBrendammiBog_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_AkrillicBadreamFens)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_AkrillicBadreamFens_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_AkrillicBreezyBeach)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_AkrillicBreezyBeach_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale, PLOK_SpriteData_TestDriveSleepyDale)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale_End, PLOK_SpriteData_TestDriveSleepyDale_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale, PLOK_SpriteData_TestDrivePlokTown)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicSleepyDale_End, PLOK_SpriteData_TestDrivePlokTown_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveThePenkinos)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveThePenkinos_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveVengeThicket)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveVengeThicket_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveDreamyCove)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveDreamyCove_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveCreepyForest)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveCreepyForest_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicWomackSpider, PLOK_SpriteData_TestDriveWomackSpider)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicWomackSpider_End, PLOK_SpriteData_TestDriveWomackSpider_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveCreepyCrag)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveCreepyCrag_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveGohomeCavern)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveGohomeCavern_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveCrashingRocks)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveCrashingRocks_End)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicPlokTown, PLOK_SpriteData_TestDriveRockyfella)
%SetDuplicateOrNullPointer(PLOK_SpriteData_AkrillicPlokTown_End, PLOK_SpriteData_TestDriveRockyfella_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveBrendammiBog)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveBrendammiBog_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveBadreamFens)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveBadreamFens_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_TestDriveBreezyBeach)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_TestDriveBreezyBeach_End)
%SetDuplicateOrNullPointer($88D7AC, PLOK_SpriteData_UnknownLevel)
%SetDuplicateOrNullPointer($88D7AE, PLOK_SpriteData_UnknownLevel_End)
endif

;--------------------------------------------------------------------

UNK_889CAC:
	dw $0100,$00E0,$0003,$0040,$0130,$0100,$0003,$0020
	dw $0160,$00C0,$0003,$0040

;--------------------------------------------------------------------

PLOK_UncompressedGFX_Bank88:
;$889CC4
	incbin "Graphics/GFX_889CC4.bin"

if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%FREE_BYTES(NULLROM, 9020, $00)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_F) != $00
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E) != $00
UNK_889CC4:
	%InsertGarbageData(NULLROM, incbin, UNK_889CC4_PLOK_E.bin)

	%FREE_BYTES(NULLROM, 271, $FF)
else
	%FREE_BYTES(NULLROM, 1, $00)

UNK_88DCC5:
;$88DCC5
	%InsertGarbageData(NULLROM, incbin, GFX_88DCC5.bin)			; Note: Duplicate of some of the graphics in GFX_889CC4.bin

;--------------------------------------------------------------------

UNK_88FB65:
	%InsertGarbageData(NULLROM, incbin, UNK_88FB65_PLOK_U.bin)
endif
%BANK_END(<EndBank>)
endmacro

;#############################################################################################################
;#############################################################################################################

macro ROUTINE_PLOK_VBlankRoutine(Address)
namespace PLOK_VBlankRoutine
%InsertMacroAtXPosition(<Address>)

Main:							; Optimization: This routine doesn't run under FastROM addressing. A JML to the next instruction would fix that.
	REP.b #$30
	CLD
	PHA
	PHX
	PHY
	PHB
	SEP.b #$20
	LDA.b #$01
	PHA
	PLB
	LDA.b !RAM_PLOK_UnknownRAM0000A8
	BNE.b CODE_80A04E
	REP.b #$20
	JSR.w CODE_809F7B
	LDA.w $0DAA
	BNE.b CODE_80A035
	LDA.w $0DAC
	BEQ.b CODE_80A02D
	CMP.w #$0002
	BEQ.b CODE_80A030
	JSR.w CODE_809C4E
	BRA.b CODE_80A04E

CODE_80A02D:
	JSR.w CODE_809C4E
CODE_80A030:
	JSR.w CODE_80AA99
	BRA.b CODE_80A04E

CODE_80A035:
	JSR.w CODE_80EBB1
	LDA.w $0DBC
	CMP.w #$0003
	BNE.b CODE_80A04E
	LDA.w $0906
	BEQ.b CODE_80A04E
	SEP.b #$20
	LDA.b #$01
	STA.w $1FEB
	REP.b #$20
CODE_80A04E:
	REP.b #$20
	INC.b $0B
	INC.b $09
CODE_80A054:
	LDA.w !REGISTER_HVBlankFlagsAndJoypadStatus
	AND.w #$0001
	BNE.b CODE_80A054
	REP.b #$30
	LDA.w !REGISTER_Joypad1Lo
	AND.w #$000F
	BEQ.b CODE_80A06B
	LDA.w #$0000
	BRA.b CODE_80A06E

CODE_80A06B:
	LDA.w !REGISTER_Joypad1Lo
CODE_80A06E:
	STA.w $068C
	PLB
	PLY
	PLX
	PLA
EndofVBlank:
	RTI
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro ROUTINE_PLOK_IRQRoutine(Address)
namespace PLOK_IRQRoutine
%InsertMacroAtXPosition(<Address>)

Main:
	RTI
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro DATATABLE_PLOK_LegacyIslandTitleCardData(Address)
namespace PLOK_LegacyIslandTitleCardData
%InsertMacroAtXPosition(<Address>)

DATA_81B19C:
	dw $0001,$000D,$0000,$0001
	dw $0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B1B0:
	dw $0266,$026A,$026E,$026E
	dw $026E,$026E,$026E,$026E
	dw $026E,$026E,$026E,$026E
	dw $0262

DATA_81B1CA:
	dw $C262,$426E,$426E,$426E
	dw $426E,$426E,$426E,$426E
	dw $426E,$426E,$426E,$C26A
	dw $C266

DATA_81B1E4:
	dw $000C,$0001,$0000,$0001
	dw $0002,$0003,$0004,$0005
	dw $0006,$0007

DATA_81B1F8:
	dw $0268,$026C,$026C,$026C
	dw $026C,$026C,$026C,$026C
	dw $026C,$026C,$026C,$026C

DATA_81B210:
	dw $826C,$826C,$826C,$826C
	dw $826C,$826C,$826C,$826C
	dw $826C,$826C,$826C,$C268

namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro DATATABLE_RT00_PLOK_EnglishTextStrings(Address)
namespace PLOK_EnglishTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/EnglishText_Section1.asm"
namespace off
endmacro

macro DATATABLE_RT01_PLOK_EnglishTextStrings(Address)
namespace PLOK_EnglishTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/EnglishText_Section2.asm"
namespace off
endmacro

;--------------------------------------------------------------------

macro DATATABLE_RT00_PLOK_JapaneseTextStrings(Address)
namespace PLOK_JapaneseTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/JapaneseText_Section1.asm"
namespace off
endmacro

macro DATATABLE_RT01_PLOK_JapaneseTextStrings(Address)
namespace PLOK_JapaneseTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/JapaneseText_Section2.asm"
namespace off
endmacro

;--------------------------------------------------------------------

macro DATATABLE_RT00_PLOK_GermanTextStrings(Address)
namespace PLOK_GermanTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/GermanText_Section1.asm"
namespace off
endmacro

macro DATATABLE_RT01_PLOK_GermanTextStrings(Address)
namespace PLOK_GermanTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/GermanText_Section2.asm"
namespace off
endmacro

;--------------------------------------------------------------------

macro DATATABLE_PLOK_FrenchTextStrings(Address)
namespace PLOK_FrenchTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/FrenchText.asm"
namespace off
endmacro

;--------------------------------------------------------------------

macro DATATABLE_PLOK_DutchTextStrings(Address)
namespace PLOK_DutchTextStrings
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/DutchText.asm"
namespace off
endmacro

;--------------------------------------------------------------------

macro DATATABLE_PLOK_LanguageSelectScreenText(Address)
namespace PLOK_LanguageSelectScreenText
%InsertMacroAtXPosition(<Address>)

	incsrc "Text/LanguageSelectScreen.asm"
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro DATATABLE_PLOK_CostumeMusicTable(Address)
namespace PLOK_CostumeMusicTable
%InsertMacroAtXPosition(<Address>)

Main:
;$818000
	dw $0000
	dw !Define_PLOK_Music_BoxerPlok
	dw !Define_PLOK_Music_BoxerPlok
	dw !Define_PLOK_Music_RocketeerPlok
	dw !Define_PLOK_Music_RocketeerPlok
	dw !Define_PLOK_Music_HunterPlok
	dw !Define_PLOK_Music_ArsonistPlok
	dw !Define_PLOK_Music_CowboyPlok
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro DATATABLE_PLOK_EasyModeLevelOrder(Address)
namespace PLOK_EasyModeLevelOrder
%InsertMacroAtXPosition(<Address>)

Main:
	dw !Define_PLOK_LevelID_CottonIslandBeach
	dw !Define_PLOK_LevelID_CottonIslandBridge
	dw !Define_PLOK_LevelID_CottonIslandColumns
	dw !Define_PLOK_LevelID_CottonIslandLogFalls
	dw !Define_PLOK_LevelID_CottonIslandRicketyBridge
	dw !Define_PLOK_LevelID_CottonIslandCrazyCradles
	dw !Define_PLOK_LevelID_CottonIslandBlindLeap
	dw !Define_PLOK_LevelID_CottonIslandBobbinsBros
	dw !Define_PLOK_LevelID_AkrillicGarlenBeach
	dw !Define_PLOK_LevelID_AkrillicSleepyDale
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicPlokTown
	dw !Define_PLOK_LevelID_AkrillicVengeThicket
	dw !Define_PLOK_LevelID_AkrillicVengeThicket
	dw !Define_PLOK_LevelID_AkrillicDreamyCove
	dw !Define_PLOK_LevelID_AkrillicCreepyForest
	dw !Define_PLOK_LevelID_AkrillicCreepyCrag
	dw !Define_PLOK_LevelID_AkrillicCreepyCrag
	dw !Define_PLOK_LevelID_AkrillicGohomeCavern
	dw !Define_PLOK_LevelID_AkrillicCrashingRocks
	dw !Define_PLOK_LevelID_AkrillicRockyfella
	dw !Define_PLOK_LevelID_AkrillicRockyfella
	dw !Define_PLOK_LevelID_AkrillicRockyfella
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

; Note: This affects the tile number and YXPCCCTT properties of each letter tile.

macro DATATABLE_PLOK_PrimaryLanguageBigLetterTileDataTable(Address)
namespace PLOK_PrimaryLanguageBigLetterTileDataTable
%InsertMacroAtXPosition(<Address>)

DATA_81B0FC:
	dw $0182,$0184,$0186,$0188,$018A,$018C,$018E,$01A0
	dw $01A2,$01A4,$01A6,$01A8,$01AA,$01AC,$01AE,$01C0

TileData:
	dw $0180,$0182,$0184,$0186,$0188,$018A,$018C,$018E
	dw $01A0,$01A2,$01A4,$01A6,$01A8,$01AA,$01AC,$01AE
	dw $01C0,$01C2,$01C4,$01C6,$01C8,$01CA,$01CC,$01CE
	dw $01E0,$01E2,$01E4,$01E6,$01E8,$01EA,$01EC,$01EE
	dw $0200,$0202,$0204,$0206,$0208,$020A,$020C,$020E
	dw $0220,$0222,$0224,$0226,$0228,$022A,$022C,$022E
	dw $0240,$0242,$0244,$0246,$0248,$024A,$024C,$024E
	dw $0260,$0262,$0264,$0266,$0268,$026A,$026C,$026E
namespace off
endmacro

;--------------------------------------------------------------------

macro DATATABLE_PLOK_SecondaryLanguageBigLetterTileDataTable(Address)
namespace PLOK_SecondaryLanguageBigLetterTileDataTable
%InsertMacroAtXPosition(<Address>)

DATA_81B0FC:
	dw $0182,$0184,$0186,$0188,$018A,$018C,$018E,$01A0
	dw $01A2,$01A4,$01A6,$01A8,$01AA,$01AC,$01AE,$01C0

TileData:
	dw $0180,$0182,$0184,$0186,$0188,$018A,$018C,$018E
	dw $01A0,$01A2,$01A4,$01A6,$01A8,$01AA,$01AC,$01AE
	dw $01C0,$01C2,$01C4,$01C6,$01C8,$01CA,$01CC,$01CE
	dw $01E0,$01E2,$01E4,$01E6,$01E8,$01EA,$01EC,$01EE
	dw $0200,$0202,$0204,$0206,$0208,$020A,$020C,$020E
	dw $0220,$0222,$0224,$0226,$0228,$022A,$022C,$022E
	dw $0240,$0242,$0244,$0246,$0248,$024A,$024C,$024E
	dw $0260,$0262,$0264,$0266,$0268,$026A,$026C,$026E
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro ROUTINE_PLOK_UploadSPCEngineAndSamples(Address)
namespace PLOK_UploadSPCEngineAndSamples
%InsertMacroAtXPosition(<Address>)

Main:
	PHP
	REP.b #$30
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	LDY.w #!Define_PLOK_SPC700_EngineLoc
	JSL.l CODE_87E000
	LDA.w #!Define_PLOK_DataUploadType_TransferToSPC700
	LDX.w #$!Define_PLOK_SPC700_EngineStartAddress
	LDY.w #!Define_PLOK_SPC700_SampleBankLoc
	JSL.l CODE_87E000
	PLP
	RTS
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################

macro DATATABLE_RT00_PLOK_UnsortedData(Address)
%InsertMacroAtXPosition(<Address>)
namespace PLOK_UnsortedData

DATA_81F6E5:
	%PLOK_UnsortedDataTableEntry($0006, SPCEngine, "SPC700/Engine.bin")
	%PLOK_UnsortedDataTableEntry($0006, UnknownData, "UnsortedData/UnknownData.bin")
	%PLOK_UnsortedDataTableEntry($0006, SPCSampleBank, "SPC700/Samples.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_TitleScreen, "SPC700/Music/TitleScreen.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_Map, "SPC700/Music/Map.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_CottonIsland, "SPC700/Music/CottonIsland.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_Akrillic, "SPC700/Music/Akrillic.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_Beach, "SPC700/Music/Beach.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_PloksHouse, "SPC700/Music/PloksHouse.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_CreepyCrag, "SPC700/Music/CreepyCrag.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_Cavern, "SPC700/Music/Cavern.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_Boss, "SPC700/Music/Boss.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_Fleapit, "SPC700/Music/Fleapit.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_BonusLevel, "SPC700/Music/BonusLevel.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_DiggingForAmulet, "SPC700/Music/DiggingForAmulet.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_LegacyIsland, "SPC700/Music/LegacyIsland.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_BoxerPlok, "SPC700/Music/BoxerPlok.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_ArsonistPlok, "SPC700/Music/ArsonistPlok.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_CowboyPlok, "SPC700/Music/CowboyPlok.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_HunterPlok, "SPC700/Music/HunterPlok.bin")
	%PLOK_UnsortedDataTableEntry($0006, Music_RocketeerPlok, "SPC700/Music/RocketeerPlok.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0006, GFX_BigJapaneseCharacterFont, "Graphics/GFX_BigJapaneseCharacterFont.bin")
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_F) != $00
else
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform04FrameData, "Tilemaps/StageTransform04FrameData.bin")
endif
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform00FrameData, "Tilemaps/StageTransform00FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform01FrameData, "Tilemaps/StageTransform01FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform02FrameData, "Tilemaps/StageTransform02FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform03FrameData, "Tilemaps/StageTransform03FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform05FrameData, "Tilemaps/StageTransform05FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform06FrameData, "Tilemaps/StageTransform06FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform0CFrameData, "Tilemaps/StageTransform0CFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform0DFrameData, "Tilemaps/StageTransform0DFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform0EFrameData, "Tilemaps/StageTransform0EFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform07FrameData, "Tilemaps/StageTransform07FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform08FrameData, "Tilemaps/StageTransform08FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform09FrameData, "Tilemaps/StageTransform09FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform0AFrameData, "Tilemaps/StageTransform0AFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform0BFrameData, "Tilemaps/StageTransform0BFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform16FrameData, "Tilemaps/StageTransform16FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform10FrameData, "Tilemaps/StageTransform10FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform11FrameData, "Tilemaps/StageTransform11FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform12FrameData, "Tilemaps/StageTransform12FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform13FrameData, "Tilemaps/StageTransform13FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform14FrameData, "Tilemaps/StageTransform14FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform15FrameData, "Tilemaps/StageTransform15FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform17FrameData, "Tilemaps/StageTransform17FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform18FrameData, "Tilemaps/StageTransform18FrameData.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_F|!ROM_PLOK_J) != $00
else
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform19FrameData, "Tilemaps/StageTransform19FrameData.bin")
endif
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform1AFrameData, "Tilemaps/StageTransform1AFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform1BFrameData, "Tilemaps/StageTransform1BFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform1CFrameData, "Tilemaps/StageTransform1CFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform1DFrameData, "Tilemaps/StageTransform1DFrameData.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_F|!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform19FrameData, "Tilemaps/StageTransform19FrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform04FrameData, "Tilemaps/StageTransform04FrameData.bin")
endif
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform1EFrameData, "Tilemaps/StageTransform1EFrameData.bin")
	%PLOK_UnsortedDataTableEntry($0006, Tilemap_StageTransform0FFrameData, "Tilemaps/StageTransform0FFrameData.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0004, GFX_ActivisionScreen, "Graphics/Compressed/GFX_ActivisionScreen.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_ActivisionScreen, "Palettes/ActivisionScreen.bin")
endif
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_F|!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0004, GFX_TitleScreenSpotlight, "Graphics/Compressed/GFX_TitleScreenSpotlight_PLOK_E.bin")
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	%PLOK_UnsortedDataTableEntry($0004, GFX_TitleScreenSpotlight, "Graphics/Compressed/GFX_TitleScreenSpotlight_PLOK_G.bin")
else
	%PLOK_UnsortedDataTableEntry($0004, GFX_TitleScreenSpotlight, "Graphics/Compressed/GFX_TitleScreenSpotlight_PLOK_U.bin")
endif
	%PLOK_UnsortedDataTableEntry($0004, Palette_TitleScreenLogo, "Palettes/TitleScreenLogo.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_TitleScreenLogo, "Graphics/Compressed/GFX_Layer3_TitleScreenLogo.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_DemoCreditsText, "Graphics/Compressed/GFX_Layer3_DemoCreditsText.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_DemoCreditsText, "Palettes/DemoCreditsText.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_RegularHUD, "Graphics/Compressed/GFX_Layer3_RegularHUD_PLOK_J.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_SmallSillyLetters, "Graphics/Compressed/GFX_Layer3_SmallSillyLetters_PLOK_J.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_GrandpappyHUD, "Graphics/Compressed/GFX_Layer3_GrandpappyHUD_PLOK_J.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_SmallLetters, "Graphics/Compressed/GFX_Layer3_SmallLetters_PLOK_J.bin")
else
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_RegularHUD, "Graphics/Compressed/GFX_Layer3_RegularHUD_PLOK_G.bin")		; Note: The only difference between this and the USA version is 2 bytes, probably header related. The actual graphics don't seem different. 
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_SmallSillyLetters, "Graphics/Compressed/GFX_Layer3_SmallSillyLetters_PLOK_G.bin")
else
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_RegularHUD, "Graphics/Compressed/GFX_Layer3_RegularHUD.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_SmallSillyLetters, "Graphics/Compressed/GFX_Layer3_SmallSillyLetters.bin")
endif
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_GrandpappyHUD, "Graphics/Compressed/GFX_Layer3_GrandpappyHUD.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_SmallLetters, "Graphics/Compressed/GFX_Layer3_SmallLetters_PLOK_G.bin")
else
	%PLOK_UnsortedDataTableEntry($0004, GFX_Layer3_SmallLetters, "Graphics/Compressed/GFX_Layer3_SmallLetters.bin")
endif
endif
	%PLOK_UnsortedDataTableEntry($0004, Palette_PresentLayer3, "Palettes/PresentLayer3.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	%PLOK_UnsortedDataTableEntry($0004, Palette_PastLayer3, "Palettes/PastLayer3_PLOK_G.bin")
else
	%PLOK_UnsortedDataTableEntry($0004, Palette_PastLayer3, "Palettes/PastLayer3.bin")
endif
	%PLOK_UnsortedDataTableEntry($0004, GFX_TitleScreenPlok1, "Graphics/Compressed/GFX_TitleScreenPlok1.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_TitleScreenPlok2, "Graphics/Compressed/GFX_TitleScreenPlok2.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_TitleScreenPlok3, "Graphics/Compressed/GFX_TitleScreenPlok3.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_TitleScreenPlok4, "Graphics/Compressed/GFX_TitleScreenPlok4.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F|!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0004, GFX_FinalScoreScreenPlok, "Graphics/Compressed/GFX_FinalScoreScreenPlok_PLOK_E.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_FinalScoreScreen, "Palettes/FinalScoreScreen.bin")
endif
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_ActivisionScreen, "Tilemaps/ActivisionScreen.bin")
endif
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_TitleScreenSpotlight, "Tilemaps/TitleScreenSpotlight.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_F|!ROM_PLOK_J) != $00
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_PushSelectForOptionsText, "Tilemaps/PushSelectForOptionsText_PLOK_E.bin")
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_PushSelectForOptionsText, "Tilemaps/PushSelectForOptionsText_PLOK_G.bin")
else
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_PushSelectForOptionsText, "Tilemaps/PushSelectForOptionsText_PLOK_U.bin")
endif
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_TitleScreenLogo, "Tilemaps/TitleScreenLogo.bin")
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_DemoCreditsText, "Tilemaps/DemoCreditsText.bin")
	%PLOK_UnsortedDataTableEntry($0000, Tilemap_TitleScreenPlok, "Tilemaps/TitleScreenPlok.bin")
	%PLOK_UnsortedDataTableEntry($0008, GFX_EndCreditsScreen, "Graphics/Compressed/GFX_EndCreditsScreen.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_EndingCreditsScreen, "Palettes/EndingCreditsScreen.bin")
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_EndingCreditsScreenBG, "Tilemaps/EndingCreditsScreenBG.bin")
	%PLOK_UnsortedDataTableEntry($0008, Tilemap_EndingCreditsScreenPlok, "Tilemaps/EndingCreditsScreenPlok.bin")
if !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_G|!ROM_PLOK_F|!ROM_PLOK_J) != $00
else
	%PLOK_UnsortedDataTableEntry($0008, GFX_FinalScoreScreenPlok, "Graphics/Compressed/GFX_FinalScoreScreenPlok_PLOK_U.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_FinalScoreScreen, "Palettes/FinalScoreScreen.bin")
endif
	%PLOK_UnsortedDataTableEntry($0002, Tilemap_FinalScoreScreenPlok, "Tilemaps/FinalScoreScreenPlok.bin")
	%PLOK_UnsortedDataTableEntry($0008, GFX_FG_Overworld, "Graphics/Compressed/GFX_FG_Overworld.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_FG_Overworld, "Palettes/FG_Overworld.bin")
	%PLOK_UnsortedDataTableEntry($0002, GFX_Sprite_Overworld, "Graphics/Compressed/GFX_Sprite_Overworld.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_Sprite_PresentOverworld, "Palettes/Sprite_PresentOverworld.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_Sprite_PastOverworld, "Palettes/Sprite_PastOverworld.bin")
	%PLOK_UnsortedDataTableEntry($000A, Tilemap_PresentOverworldLayer1, "Tilemaps/PresentOverworldLayer1.bin")
	%PLOK_UnsortedDataTableEntry($000A, Tilemap_PresentOverworldLayer2, "Tilemaps/PresentOverworldLayer2.bin")
	%PLOK_UnsortedDataTableEntry($000A, Tilemap_PastOverworldLayer1, "Tilemaps/PastOverworldLayer1.bin")
	%PLOK_UnsortedDataTableEntry($000A, Tilemap_PastOverworldLayer2, "Tilemaps/PastOverworldLayer2.bin")
	%PLOK_UnsortedDataTableEntry($000A, Tilemap_AltPresentOverworldLayer1, "Tilemaps/AltPresentOverworldLayer1.bin")
	%PLOK_UnsortedDataTableEntry($000A, Tilemap_AltPastOverworldLayer1, "Tilemaps/AltPastOverworldLayer1.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_IntroPloksHouse, "LevelData/IntroPloksHouse.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandBeach, "LevelData/CottonIslandBeach.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandBridge, "LevelData/CottonIslandBridge.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandColumns, "LevelData/CottonIslandColumns.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandLogFalls, "LevelData/CottonIslandLogFalls.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandRicketyBridge, "LevelData/CottonIslandRicketyBridge.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandCrazyCradles, "LevelData/CottonIslandCrazyCradles.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandBlindLeap, "LevelData/CottonIslandBlindLeap.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_CottonIslandBobbinsBros, "LevelData/CottonIslandBobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandBeach, "Tilemaps/LevelBG_CottonIslandBeach.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandBridge, "Tilemaps/LevelBG_CottonIslandBridge.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandColumns, "Tilemaps/LevelBG_CottonIslandColumns.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandLogFalls, "Tilemaps/LevelBG_CottonIslandLogFalls.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandRicketyBridge, "Tilemaps/LevelBG_CottonIslandRicketyBridge.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandCrazyCradles, "Tilemaps/LevelBG_CottonIslandCrazyCradles.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandBlindLeap, "Tilemaps/LevelBG_CottonIslandBlindLeap.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_CottonIslandBobbinsBros, "Tilemaps/LevelBG_CottonIslandBobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandMaceCove, "LevelData/LegacyIslandMaceCove.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandFoolsGap, "LevelData/LegacyIslandFoolsGap.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandZigZag, "LevelData/LegacyIslandZigZag.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandSpongeRocks, "LevelData/LegacyIslandSpongeRocks.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandSwiftyPeaks, "LevelData/LegacyIslandSwiftyPeaks.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandLogTrail, "LevelData/LegacyIslandLogTrail.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandCrouchHill, "LevelData/LegacyIslandCrouchHill.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_LegacyIslandBobbinsBros, "LevelData/LegacyIslandBobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicGarlenBeach, "LevelData/AkrillicGarlenBeach.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicSleepyDale, "LevelData/AkrillicSleepyDale.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicPloksHouse, "LevelData/AkrillicPloksHouse.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicPlokTown, "LevelData/AkrillicPlokTown.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicThePenkinos, "LevelData/AkrillicThePenkinos.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicVengeThicket, "LevelData/AkrillicVengeThicket.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicDreamyCove, "LevelData/AkrillicDreamyCove.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicCreepyForest, "LevelData/AkrillicCreepyForest.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicWomackSpider, "LevelData/AkrillicWomackSpider.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicCreepyCrag, "LevelData/AkrillicCreepyCrag.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicGohomeCavern, "LevelData/AkrillicGohomeCavern.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicCrashingRocks, "LevelData/AkrillicCrashingRocks.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_AkrillicRockyfella, "LevelData/AkrillicRockyfella.bin")
	%PLOK_UnsortedDataTableEntry($0008, LevelData_AkrillicBrendammiBog, "LevelData/AkrillicBrendammiBog.bin")
	%PLOK_UnsortedDataTableEntry($0008, LevelData_AkrillicBadreamFens, "LevelData/AkrillicBadreamFens.bin")
	%PLOK_UnsortedDataTableEntry($0008, LevelData_AkrillicBreezyBeach, "LevelData/AkrillicBreezyBeach.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicGarlenBeach, "Tilemaps/LevelBG_AkrillicGarlenBeach.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicSleepyDale, "Tilemaps/LevelBG_AkrillicSleepyDale.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicPloksHouse, "Tilemaps/LevelBG_AkrillicPloksHouse.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicPlokTown, "Tilemaps/LevelBG_AkrillicPlokTown.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicThePenkinos, "Tilemaps/LevelBG_AkrillicThePenkinos.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicVengeThicket, "Tilemaps/LevelBG_AkrillicVengeThicket.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicDreamyCove, "Tilemaps/LevelBG_AkrillicDreamyCove.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicCreepyForest, "Tilemaps/LevelBG_AkrillicCreepyForest.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicWomackSpider, "Tilemaps/LevelBG_AkrillicWomackSpider.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicCreepyCrag, "Tilemaps/LevelBG_AkrillicCreepyCrag.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicGohomeCavern, "Tilemaps/LevelBG_AkrillicGohomeCavern.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicCrashingRocks, "Tilemaps/LevelBG_AkrillicCrashingRocks.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_AkrillicRockyfella, "Tilemaps/LevelBG_AkrillicRockyfella.bin")
	%PLOK_UnsortedDataTableEntry($0008, LevelBG_AkrillicBrendammiBog, "Tilemaps/LevelBG_AkrillicBrendammiBog.bin")
	%PLOK_UnsortedDataTableEntry($0008, LevelBG_AkrillicBadreamFens, "Tilemaps/LevelBG_AkrillicBadreamFens.bin")
	%PLOK_UnsortedDataTableEntry($0008, LevelBG_AkrillicBreezyBeach, "Tilemaps/LevelBG_AkrillicBreezyBeach.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitCyclingClever, "LevelData/FleapitCyclingClever.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitRoadHogging, "LevelData/FleapitRoadHogging.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitHighFlying, "LevelData/FleapitHighFlying.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitEasyRiding, "LevelData/FleapitEasyRiding.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitInASpin, "LevelData/FleapitInASpin.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitRealRumblings, "LevelData/FleapitRealRumblings.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitSilentRunning, "LevelData/FleapitSilentRunning.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_FleapitTheFleaQueen, "LevelData/FleapitTheFleaQueen.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelData_TestDriveSecretWarp, "LevelData/TestDriveSecretWarp.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_FleapitCyclingClever, "Tilemaps/LevelBG_FleapitCyclingClever.bin")
	%PLOK_UnsortedDataTableEntry($000A, LevelBG_FleapitTheFleaQueen, "Tilemaps/LevelBG_FleapitTheFleaQueen.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_CottonIsland, "Graphics/Compressed/GFX_FG_Level_CottonIsland.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_CottonIsland, "Palettes/FG_CottonIsland.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandMain, "Graphics/Compressed/GFX_BG_Level_CottonIslandMain.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandBeach, "Graphics/Compressed/GFX_BG_Level_CottonIslandBeach.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandBridge, "Graphics/Compressed/GFX_BG_Level_CottonIslandBridge.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandColumns, "Graphics/Compressed/GFX_BG_Level_CottonIslandColumns.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandLogFalls, "Graphics/Compressed/GFX_BG_Level_CottonIslandLogFalls.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandRicketyBridge, "Graphics/Compressed/GFX_BG_Level_CottonIslandRicketyBridge.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandCrazyCradles, "Graphics/Compressed/GFX_BG_Level_CottonIslandCrazyCradles.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_CottonIslandBlindLeap, "Graphics/Compressed/GFX_BG_Level_CottonIslandBlindLeap.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_CottonIslandBeach, "Palettes/BG_CottonIslandBeach.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_CottonIslandBridge, "Palettes/BG_CottonIslandBridge.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_CottonIslandColumns, "Palettes/BG_CottonIslandColumns.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_CottonIslandLogFalls, "Palettes/BG_CottonIslandLogFalls.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_CottonIslandRicketyBridge, "Palettes/BG_CottonIslandRicketyBridge.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_CottonIslandCrazyCradles, "Palettes/BG_CottonIslandCrazyCradles.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_CottonIslandBlindLeap, "Palettes/BG_CottonIslandBlindLeap.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_BG_CottonIslandBobbinsBros, "Palettes/BG_CottonIslandBobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_LegacyIsland, "Palettes/FG_LegacyIsland.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_LegacyIslandMaceCove, "Palettes/BG_LegacyIslandMaceCove.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_LegacyIslandFoolsGap, "Palettes/BG_LegacyIslandFoolsGap.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_LegacyIslandZigZag, "Palettes/BG_LegacyIslandZigZag.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_LegacyIslandSpongeRocks, "Palettes/BG_LegacyIslandSpongeRocks.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_LegacyIslandSwiftyPeaks, "Palettes/BG_LegacyIslandSwiftyPeaks.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_LegacyIslandLogTrail, "Palettes/BG_LegacyIslandLogTrail.bin")
	%PLOK_UnsortedDataTableEntry($0002, Palette_BG_LegacyIslandCrouchHill, "Palettes/BG_LegacyIslandCrouchHill.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_BG_LegacyIslandBobbinsBros, "Palettes/BG_LegacyIslandBobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($0002, Palette_FG_UnusedLegacyIsland, "Palettes/FG_UnusedLegacyIsland.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var05, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var05.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var01, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var01.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot5_Var04, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot5_Var04.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var03, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var03.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot5_Var01, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot5_Var01.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var02, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var02.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot5_Var02, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot5_Var02.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot5_Var05, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot5_Var05.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_GrandpappyStatue, "Graphics/Compressed/GFX_FG_Level_GrandpappyStatue.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var04, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var04.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var06, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var06.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var08, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var08.bin")	; Note: This is a GFX file unique to the cut levels, but sadly, it only has placeholder tiles
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot4_Var07, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot4_Var07.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot5_Var03, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot5_Var03.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Objects, "Graphics/Compressed/GFX_FG_Level_Objects.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var01, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var01.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var02, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var02.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var03, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var03.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var04, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var04.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var05, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var05.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot1_Var02, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot1_Var02.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var06, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var06.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var07, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var07.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var08, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var08.bin")	;\ Note: These are the GFX files unique to the cut levels, but sadly, they only have placeholder tiles
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot2_Var09, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot2_Var09.bin")	;/	
	%PLOK_UnsortedDataTableEntry($0004, GFX_UnusedBlankFile, "Graphics/Compressed/GFX_UnusedBlankFile.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Akrillic_Slot1_Var01, "Graphics/Compressed/GFX_FG_Level_Akrillic_Slot1_Var01.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_FG_AkrillicGarlenBeach, "Palettes/FG_AkrillicGarlenBeach.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicSleepyDale, "Palettes/FG_AkrillicSleepyDale.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_FG_AkrillicPloksHouse, "Palettes/FG_AkrillicPloksHouse.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_FG_AkrillicPlokTown, "Palettes/FG_AkrillicPlokTown.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicThePenkinos, "Palettes/FG_AkrillicThePenkinos.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicVengeThicket, "Palettes/FG_AkrillicVengeThicket.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_FG_AkrillicDreamyCove, "Palettes/FG_AkrillicDreamyCove.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicCreepyForest, "Palettes/FG_AkrillicCreepyForest.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_FG_AkrillicWomackSpider, "Palettes/FG_AkrillicWomackSpider.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicCreepyCrag, "Palettes/FG_AkrillicCreepyCrag.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_FG_AkrillicGohomeCavern, "Palettes/FG_AkrillicGohomeCavern.bin")
	%PLOK_UnsortedDataTableEntry($0008, Palette_FG_AkrillicCrashingRocks, "Palettes/FG_AkrillicCrashingRocks.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicRockyfella, "Palettes/FG_AkrillicRockyfella.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicBrendammiBog, "Palettes/FG_AkrillicBrendammiBog.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_AkrillicBadreamFens, "Palettes/FG_AkrillicBadreamFens.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_UnusedPalette, "Palettes/FG_UnusedPalette.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_AkrillicGarlenBeach, "Graphics/Compressed/GFX_BG_Level_AkrillicGarlenBeach.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_AkrillicSleepyDale, "Graphics/Compressed/GFX_BG_Level_AkrillicSleepyDale.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_AkrillicThePenkinos, "Graphics/Compressed/GFX_BG_Level_AkrillicThePenkinos.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_AkrillicVengeThicket, "Graphics/Compressed/GFX_BG_Level_AkrillicVengeThicket.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_AkrillicCreepyForest, "Graphics/Compressed/GFX_BG_Level_AkrillicCreepyForest.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_AkrillicCreepyCrag, "Graphics/Compressed/GFX_BG_Level_AkrillicCreepyCrag.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_BG_Level_AkrillicGohomeCavern, "Graphics/Compressed/GFX_BG_Level_AkrillicGohomeCavern.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicGarlenBeach, "Palettes/BG_AkrillicGarlenBeach.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicSleepyDale, "Palettes/BG_AkrillicSleepyDale.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicPloksHouse, "Palettes/BG_AkrillicPloksHouse.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicPlokTown, "Palettes/BG_AkrillicPlokTown.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_BG_AkrillicThePenkinos, "Palettes/BG_AkrillicThePenkinos.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicVengeThicket, "Palettes/BG_AkrillicVengeThicket.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicDreamyCove, "Palettes/BG_AkrillicDreamyCove.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicCreepyForest, "Palettes/BG_AkrillicCreepyForest.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicWomackSpider, "Palettes/BG_AkrillicWomackSpider.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicCreepyCrag, "Palettes/BG_AkrillicCreepyCrag.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicGohomeCavern, "Palettes/BG_AkrillicGohomeCavern.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicCrashingRocks, "Palettes/BG_AkrillicCrashingRocks.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicRockyfella, "Palettes/BG_AkrillicRockyfella.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicBrendammiBog, "Palettes/BG_AkrillicBrendammiBog.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicBadreamFens, "Palettes/BG_AkrillicBadreamFens.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_AkrillicBreezyBeach, "Palettes/BG_AkrillicBreezyBeach.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_FG_Level_Fleapit, "Graphics/Compressed/GFX_FG_Level_Fleapit.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_FG_Fleapit, "Palettes/FG_Fleapit.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitCyclingClever, "Palettes/BG_FleapitCyclingClever.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitRoadHogging, "Palettes/BG_FleapitRoadHogging.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitHighFlying, "Palettes/BG_FleapitHighFlying.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitEasyRiding, "Palettes/BG_FleapitEasyRiding.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitInASpin, "Palettes/BG_FleapitInASpin.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitRealRumblings, "Palettes/BG_FleapitRealRumblings.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitSilentRunning, "Palettes/BG_FleapitSilentRunning.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_BG_FleapitTheFleaQueen, "Palettes/BG_FleapitTheFleaQueen.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_Global1, "Graphics/Compressed/GFX_Sprite_Level_Global1.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_Global2, "Graphics/Compressed/GFX_Sprite_Level_Global2.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_GlobalPresentLevel, "Palettes/Sprite_GlobalPresentLevel.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_CottonIsland, "Graphics/Compressed/GFX_Sprite_Level_CottonIsland.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_CottonIsland, "Palettes/Sprite_CottonIsland.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_Sprite_GlobalPastLevel, "Palettes/Sprite_GlobalPastLevel.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_AkrillicGarlenBeach, "Graphics/Compressed/GFX_Sprite_Level_AkrillicGarlenBeach.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_AkrillicSleepyDale, "Graphics/Compressed/GFX_Sprite_Level_AkrillicSleepyDale.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_Akrillic, "Palettes/Sprite_Akrillic.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_Fleapit, "Graphics/Compressed/GFX_Sprite_Level_Fleapit.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_Fleapit, "Palettes/Sprite_Fleapit.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_BobbinsBros, "Graphics/Compressed/GFX_Sprite_Level_BobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_PresentBobbinsBros, "Palettes/Sprite_PresentBobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($0006, Palette_Sprite_PastBobbinsBros, "Palettes/Sprite_PastBobbinsBros.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_AkrillicThePenkinos, "Graphics/Compressed/GFX_Sprite_Level_AkrillicThePenkinos.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_ThePenkinos, "Palettes/Sprite_ThePenkinos.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_AkrillicWomackSpider, "Graphics/Compressed/GFX_Sprite_Level_AkrillicWomackSpider.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_WomackSpider, "Palettes/Sprite_WomackSpider.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_AkrillicRockyfella, "Graphics/Compressed/GFX_Sprite_Level_AkrillicRockyfella.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_Rockyfella, "Palettes/Sprite_Rockyfella.bin")
	%PLOK_UnsortedDataTableEntry($0004, GFX_Sprite_Level_FleaQueen, "Graphics/Compressed/GFX_Sprite_Level_FleaQueen.bin")
	%PLOK_UnsortedDataTableEntry($0004, Palette_Sprite_TheFleaQueen, "Palettes/Sprite_TheFleaQueen.bin")

	%PLOK_GenerateUnsortedDataPointersAndSize()

UNK_81FFC5:
if !Define_Global_ROMToAssemble&(!ROM_PLOK_J) != $00
	%InsertGarbageData(NULLROM, incbin, UNK_81FF4F_PLOK_J.bin)
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_G) != $00
elseif !Define_Global_ROMToAssemble&(!ROM_PLOK_E|!ROM_PLOK_F) != $00
	%InsertGarbageData(NULLROM, incbin, UNK_81FFC5_PLOK_E.bin)
else
	%InsertGarbageData(NULLROM, incbin, UNK_81FFC5_PLOK_U.bin)
endif
namespace off
endmacro

;#############################################################################################################
;#############################################################################################################
