Routine_Macros_JP.asm
Yoshifanatic1_Jurassic-Park-1-SNES-disassembly/JP/Routine_Macros_JP.asm

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

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

if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%DATATABLE_JP_DyanmicSpritePointersAndData($808000)
endif

CODE_808000:
	SEI
	CLD
	CLC
	XCE
	REP.b #$30
	LDA.w #$01FE
	TCS
	LDA.w #$0000
	TCD
	SEP.b #$20
	LDA.b #$7E
	PHA
	PLB
	LDA.b #$8F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	STA.b $EE
	LDA.b #$01
	STA.l !REGISTER_EnableFastROM|!FastROMAddressOffset
	REP.b #$30
	LDX.w #CODE_808151
	STX.b $00
	LDA.w #CODE_808151>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	REP.b #$30
	LDA.w #$0000
	STA.l !REGISTER_APUPort0
	STA.l !REGISTER_APUPort2
	LDX.w #DATA_80F9D5
	LDY.w #DATA_80F9D5>>16
	JSL.l CODE_839C2B
	REP.b #$30
	LDA.w #$0000
	STA.l !REGISTER_APUPort0
	STA.l !REGISTER_APUPort2
	JSL.l CODE_819B3B
	SEP.b #$30
	LDA.b #$01
	STA.l !REGISTER_EnableFastROM|!FastROMAddressOffset
	REP.b #$30
	STZ.b $08
	LDA.w #$1FF7
	LDX.w #$000008
	LDY.w #$000009
	MVN $000009>>16,$000008>>16
	SEP.b #$20
	LDA.b #$7E
	PHA
	PLB
	JSL.l CODE_819E01
	REP.b #$30
	LDA.w #$0002
	STA.w $02F1
	LDA.w #!Define_JP_SoundCommand_Unknown07+($01<<8)
	STA.w $037B
	STZ.w $03B8
	SEP.b #$30
	LDA.l !REGISTER_PPUStatusFlag2|!FastROMAddressOffset
	AND.b #!PPUStatusFlag2_ConsoleRegion
	CMP.b #$00
	BEQ.b CODE_8080C1
	REP.b #$30
	LDX.w #JP_SPCEngine
	LDY.w #JP_SPCEngine>>16
	JSL.l CODE_839C31
	REP.b #$30
	LDA.w #$FFFF
	STA.w $03B8
	JSL.l CODE_83DE70
CODE_8080C1:
	REP.b #$30
	STZ.w $0391
	LDA.w #$0000
	JSL.l CODE_81A880
	REP.b #$30
	LDA.w #$FFFF
	STA.w $0391
	JSL.l CODE_81DF23
	JSL.l CODE_8187FC
	JML.l CODE_81D59E

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

CODE_8080E1:
	REP.b #$30
	PHB
	PHA
	PHX
	PHY
	SEP.b #$20
	LDA.b #$7E
	PHA
	PLB
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.b $EE
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	LDA.b $0A
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b $0C
	STA.l !REGISTER_MosaicSizeAndBGEnable|!FastROMAddressOffset
	LDA.b $0E
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	LDA.b $10
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	JSL.l CODE_8189A7
	JSL.l CODE_819F28
	JSL.l CODE_819C70
	JSL.l CODE_819E70
	SEP.b #$20
	REP.b #$10
	LDX.w $7E0AFB
	LDA.b $0C
	AND.b #$F0
	CMP.b #$70
	BCC.b CODE_808131
	LDX.w $7E049D
CODE_808131:
	TXA
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	REP.b #$30
	INC.w $7E049D
	PLY
	PLX
	PLA
	PLB
	RTI

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

CODE_808145:
	SEP.b #$20
	PHA
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	INC.w $049D
	PLA
	RTI

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

CODE_808151:
	SEP.b #$20
	PHA
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	PLA
	RTI

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

CODE_80815A:
	JSL.l CODE_8189A7
	JSL.l CODE_8189CB
	JSL.l CODE_83C4F3
	SEP.b #$20
	LDA.w $0B3B
	STA.l !REGISTER_BG2HorizScrollOffset|!FastROMAddressOffset
	LDA.w $0B3C
	STA.l !REGISTER_BG2HorizScrollOffset|!FastROMAddressOffset
	LDA.w $0B3D
	STA.l !REGISTER_BG2VertScrollOffset|!FastROMAddressOffset
	LDA.w $0B3A
	STA.l !REGISTER_BG2VertScrollOffset|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B37
	SEC
	SBC.w #$0004
	SEP.b #$20
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.w $0B39
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.w $0B3A
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b $0C
	STA.l !REGISTER_MosaicSizeAndBGEnable|!FastROMAddressOffset
	LDA.b $0E
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	LDA.b $10
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	LDA.b $11
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	LDA.b #$FB
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	JSL.l CODE_819CC0
	REP.b #$30
	INC.w $049D
	LDA.w $049D
	AND.w #$0003
	STA.b $68
	ASL
	STA.b $6A
	BNE.b CODE_8081EE
	STZ.b $78
	STZ.b $7A
	STZ.b $7C
	STZ.b $7E
	STZ.b $80
	STZ.b $82
	STZ.b $84
CODE_8081EE:
	RTS

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

CODE_8081EF:
	SEP.b #$20
	PHA
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	PLA
	RTI

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

CODE_8081F8:
	REP.b #$30
	PHB
	PHA
	PHX
	PHY
	SEP.b #$20
	LDA.b #$7E
	PHA
	PLB
	LDA.b #$8F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	JSR.w CODE_80815A
	REP.b #$30
	LDA.w #CODE_808237
	STA.b $04
	LDA.w #CODE_808237>>16
	STA.b $06
	LDA.w #$0010
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	LDA.w #$0000
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	CLI
	JSL.l CODE_818366
	REP.b #$30
	PLY
	PLX
	PLA
	PLB
	RTI

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

CODE_808237:
	REP.b #$20
	PHB
	PHA
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b #$7E
	STA.b $F0
	PHA
	PLB
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w #$0011
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	LDA.w #$014A
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b $0A
	WAI
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w #CODE_808287
	STA.b $04
	LDA.w #CODE_808287>>16
	STA.b $06
	LDA.w #$00A6
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	LDA.w #$00F0
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	PLA
	PLB
	RTI

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

CODE_808287:
	REP.b #$20
	PHB
	PHA
	SEP.b #$20
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDA.l $00000C
	AND.b #$FB
	STA.l !REGISTER_MosaicSizeAndBGEnable|!FastROMAddressOffset
	LDA.b #$13
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	LDA.b #$FE
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	REP.b #$20
	LDA.w #CODE_8081F8
	STA.b $04
	LDA.w #CODE_8081F8>>16
	STA.b $06
	LDA.w #$00D0
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	LDA.w #$00C6
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	PLA
	PLB
	RTI

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

if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
else
	%DATATABLE_JP_DyanmicSpritePointersAndData($8082CA)
endif

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

DATA_808DEA:
	dw CODE_808E04
	dw CODE_808E87
	dw CODE_808E87
	dw CODE_808F2E
	dw CODE_808FB3
	dw CODE_809063
	dw CODE_80918E
	dw CODE_809347
	dw CODE_809712
	dw CODE_809B29
	dw CODE_809D42
	dw CODE_809917
	dw CODE_809712

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

CODE_808E04:
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_808E15
	LDA.b $68
	CMP.w #$0001
	BEQ.b CODE_808E16
	LDA.w $7E76AC,y
	BPL.b CODE_808E16
CODE_808E15:
	RTS

CODE_808E16:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_808E25
	CMP.w #$FFF0
	BCS.b CODE_808E2A
	BRA.b CODE_808E3D

CODE_808E25:
	CMP.w #$0100
	BCS.b CODE_808E3D
CODE_808E2A:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	BPL.b CODE_808E47
	CMP.w #$FFF0
	BCS.b CODE_808E4C
CODE_808E3D:
	LDA.w #$FFFF
	STA.w $7E8654,y
	STA.w $7E76AC,y
	RTS

CODE_808E47:
	CMP.w #$00E0
	BCS.b CODE_808E3D
CODE_808E4C:
	SEP.b #$20
	LDX.b $58
	STA.b $01,x
	LDA.b $52
	STA.b $00,x
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	REP.b #$20
	AND.w #$00FF
	STA.w $7E76AC,y
	STA.w $7E8654,y
	ASL
	TAY
	LDA.w $7EF6E0,y
	ORA.b $56
	STA.b $02,x
	TXA
	ADC.w #$0004
	STA.b $58
	BIT.b $52
	BMI.b CODE_808E78
	RTS

CODE_808E78:
	SEP.b #$20
	LDY.w $7EF041,x
	LDA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	ORA.w $7EF044,x
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_808E87:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_808E96
	CMP.w #$FFF0
	BCS.b CODE_808E9B
	BRA.b CODE_808EAE

CODE_808E96:
	CMP.w #$0100
	BCS.b CODE_808EAE
CODE_808E9B:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	BPL.b CODE_808EBF
	CMP.w #$FFF0
	BCS.b CODE_808EC4
CODE_808EAE:
	LDA.w #$FFFF
	STA.w $7E8654,y
	STA.w $7E76AC,y
	RTS

CODE_808EB8:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_808EBF:
	CMP.w #$00E0
	BCS.b CODE_808EAE
CODE_808EC4:
	STA.b $54
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_808EB8
	LDA.b $68
	CMP.w #$0000
	BEQ.b CODE_808EDE
	LDA.w $7E76AC,y
	BPL.b CODE_808EFC
	RTS

CODE_808EDE:
	LDX.b $78
	LDA.l DATA_80A0CA,x
	BMI.b CODE_808EAE
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $8A,x
	INX
	INX
	STX.b $78
CODE_808EFC:
	SEP.b #$20
	LDX.b $58
	LDA.b $54
	STA.b $01,x
	LDA.b $52
	STA.b $00,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	STA.b $02,x
	TXA
	ADC.w #$0004
	STA.b $58
	BIT.b $52
	BMI.b CODE_808F1F
	RTS

CODE_808F1F:
	SEP.b #$20
	LDY.w $7EF041,x
	LDA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	ORA.w $7EF044,x
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_808F2E:
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_808F3F
	LDA.b $68
	CMP.w #$0001
	BEQ.b CODE_808F40
	LDA.w $7E76AC,y
	BPL.b CODE_808F40
CODE_808F3F:
	RTS

CODE_808F40:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_808F4F
	CMP.w #$FFE0
	BCS.b CODE_808F54
	BRA.b CODE_808F67

CODE_808F4F:
	CMP.w #$0100
	BCS.b CODE_808F67
CODE_808F54:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	BPL.b CODE_808F71
	CMP.w #$FFE0
	BCS.b CODE_808F76
CODE_808F67:
	LDA.w #$FFFF
	STA.w $7E8654,y
	STA.w $7E76AC,y
	RTS

CODE_808F71:
	CMP.w #$00E0
	BCS.b CODE_808F67
CODE_808F76:
	SEP.b #$20
	LDX.b $58
	STA.b $01,x
	LDA.b $52
	STA.b $00,x
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	REP.b #$20
	AND.w #$00FF
	STA.w $7E8654,y
	STA.w $7E76AC,y
	ASL
	TAY
	LDA.w $7EF72C,y
	ORA.b $56
	STA.b $02,x
	TXA
	ADC.w #$0004
	STA.b $58
	SEP.b #$20
	LDY.w $7EF041,x
	LDA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	ORA.w $7EF043,x
	BIT.b $53
	BPL.b CODE_808FAF
	ORA.w $7EF044,x
CODE_808FAF:
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_808FB3:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_808FC2
	CMP.w #$FFE0
	BCS.b CODE_808FC7
	BRA.b CODE_808FDA

CODE_808FC2:
	CMP.w #$0100
	BCS.b CODE_808FDA
CODE_808FC7:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	BPL.b CODE_808FEB
	CMP.w #$FFE0
	BCS.b CODE_808FF0
CODE_808FDA:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	STA.w $7E8654,y
	RTS

CODE_808FE4:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_808FEB:
	CMP.w #$00E0
	BCS.b CODE_808FDA
CODE_808FF0:
	STA.b $54
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_808FE4
	LDX.b $6C
	CPX.w #$0002
	BNE.b CODE_808FE4
	LDA.b $68
	CMP.w #$0001
	BEQ.b CODE_809011
	LDA.w $7E76AC,y
	BPL.b CODE_80902F
	RTS

CODE_809011:
	LDX.b $7A
	LDA.l DATA_80A0DC,x
	BMI.b CODE_808FDA
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $B2,x
	INX
	INX
	STX.b $7A
CODE_80902F:
	LDA.b $54
	SEP.b #$20
	LDX.b $58
	STA.b $01,x
	LDA.b $52
	STA.b $00,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	STA.b $02,x
	TXA
	ADC.w #$0004
	STA.b $58
	SEP.b #$20
	LDY.w $7EF041,x
	LDA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	ORA.w $7EF043,x
	BIT.b $53
	BPL.b CODE_80905F
	ORA.w $7EF044,x
CODE_80905F:
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_809063:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_809072
	CMP.w #$FFE0
	BCS.b CODE_809077
	BRA.b CODE_80908C

CODE_809072:
	CMP.w #$0100
	BCS.b CODE_80908C
CODE_809077:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	STA.b $54
	BMI.b $13
	CMP.w #$00E0
	BCC.b CODE_8090A7
CODE_80908C:
	LDA.w #$FFFF
	STA.w $7E8654,y
	RTS

CODE_809093:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_80909A:
	CMP.w #$FFD0
	BCC.b CODE_80908C
	CMP.w #$FFE0
	BCS.b CODE_8090A7
	LDA.w #$00E0
CODE_8090A7:
	STA.b $54
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_809093
	LDA.b $68
	BEQ.b CODE_8090BE
	LDA.w $7E76AC,y
	BPL.b CODE_8090DC
	RTS

CODE_8090BE:
	LDX.b $7C
	LDA.l DATA_80A0C6,x
	BMI.b CODE_80908C
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $88,x
	INX
	INX
	STX.b $7C
CODE_8090DC:
	LDA.b $54
	LDX.b $58
	STA.b $01,x
	LDA.b $54
	CLC
	ADC.w #$0020
	BMI.b CODE_8090F2
	CMP.w #$00E0
	BCC.b CODE_8090F2
	LDA.w #$00E0
CODE_8090F2:
	STA.b $05,x
	STA.b $09,x
	LDA.b $52
	SEP.b #$20
	STA.b $00,x
	STA.b $04,x
	REP.b #$21
	ADC.w #$0010
	STA.b $5A
	SEP.b #$20
	STA.b $08,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	BIT.b $56
	BMI.b CODE_809135
	BVS.b CODE_809127
	STA.b $02,x
	ADC.w #$0040
	STA.b $06,x
	ADC.w #$0002
	STA.b $0A,x
	BRA.b CODE_809151

CODE_809127:
	STA.b $02,x
	ADC.w #$0040
	STA.b $0A,x
	ADC.w #$0002
	STA.b $06,x
	BRA.b CODE_809151

CODE_809135:
	BVS.b CODE_809145
	STA.b $06,x
	ADC.w #$0002
	STA.b $0A,x
	ADC.w #$001E
	STA.b $02,x
	BRA.b CODE_809151

CODE_809145:
	STA.b $0A,x
	ADC.w #$0002
	STA.b $06,x
	ADC.w #$001E
	STA.b $02,x
CODE_809151:
	TXA
	ADC.w #$000C
	STA.b $58
	SEP.b #$20
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	BIT.b $53
	BPL.b CODE_809167
	ORA.l DATA_00874E,x
CODE_809167:
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $53
	BEQ.b CODE_80917D
	LDY.w $7EF045,x
	LDA.w $7EF048,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
CODE_80917D:
	LDA.b $5B
	BEQ.b CODE_80918D
	LDY.w $7EF049,x
	LDA.w $7EF04C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
CODE_80918D:
	RTS

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

CODE_80918E:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_80919D
	CMP.w #$FFD0
	BCS.b CODE_8091A2
	BRA.b CODE_8091B7

CODE_80919D:
	CMP.w #$0100
	BCS.b CODE_8091B7
CODE_8091A2:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	STA.b $54
	BMI.b CODE_8091C8
	CMP.w #$00E0
	BCC.b CODE_8091D5
CODE_8091B7:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	STA.w $7E8654,y
	RTS

CODE_8091C1:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_8091C8:
	CMP.w #$FFD0
	BCC.b CODE_8091B7
	CMP.w #$FFE0
	BCS.b CODE_8091D5
	LDA.w #$00E0
CODE_8091D5:
	STA.b $54
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_8091C1
	LDX.b $6C
	CPX.w #$0001
	BNE.b CODE_8091C1
	LDA.b $68
	CMP.w #$0001
	BEQ.b CODE_8091F6
	LDA.w $7E76AC,y
	BPL.b CODE_809214
	RTS

CODE_8091F6:
	LDX.b $7E
	LDA.l DATA_80A0E4,x
	BMI.b CODE_8091B7
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $A2,x
	INX
	INX
	STX.b $7E
CODE_809214:
	LDA.b $54
	LDX.b $58
	STA.b $01,x
	STA.b $05,x
	CLC
	ADC.w #$0010
	STA.b $09,x
	LDA.b $54
	CLC
	ADC.w #$0020
	BMI.b CODE_809232
	CMP.w #$00E0
	BCC.b CODE_809232
	LDA.w #$00E0
CODE_809232:
	STA.b $0D,x
	STA.b $11,x
	STA.b $15,x
	LDA.b $52
	SEP.b #$20
	STA.b $00,x
	STA.b $0C,x
	REP.b #$21
	ADC.w #$0010
	STA.b $5A
	SEP.b #$20
	STA.b $10,x
	REP.b #$21
	ADC.w #$0010
	STA.b $5C
	SEP.b #$20
	STA.b $04,x
	STA.b $08,x
	STA.b $14,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	STA.b $86
	BIT.b $86
	BMI.b CODE_8092A8
	BVS.b CODE_80928A
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0020
	STA.b $0A,x
	ADC.w #$001C
	STA.b $0E,x
	ADC.w #$0002
	STA.b $12,x
	ADC.w #$0002
	STA.b $16,x
	BRL.w CODE_8092E2

CODE_80928A:
	STA.b $06,x
	ADC.w #$0002
	STA.b $02,x
	ADC.w #$001E
	STA.b $0A,x
	ADC.w #$0020
	STA.b $16,x
	ADC.w #$0002
	STA.b $12,x
	ADC.w #$0002
	STA.b $0E,x
	BRL.w CODE_8092E2

CODE_8092A8:
	BVS.b CODE_8092C7
	STA.b $0E,x
	ADC.w #$0002
	STA.b $12,x
	ADC.w #$0002
	STA.b $16,x
	ADC.w #$001C
	STA.b $02,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0020
	STA.b $06,x
	BRA.b CODE_8092E2

CODE_8092C7:
	STA.b $16,x
	ADC.w #$0002
	STA.b $12,x
	ADC.w #$0002
	STA.b $0E,x
	ADC.w #$001C
	STA.b $0A,x
	ADC.w #$0002
	STA.b $02,x
	ADC.w #$001E
	STA.b $06,x
CODE_8092E2:
	TXA
	ADC.w #$0018
	STA.b $58
	SEP.b #$20
	LDA.w $7EF043,x
	BIT.b $53
	BPL.b CODE_8092F4
	ORA.w $7EF044,x
CODE_8092F4:
	LDY.w $7EF041,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $53
	BEQ.b CODE_80930D
	LDY.w $7EF04D,x
	LDA.w $7EF050,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
CODE_80930D:
	LDA.b $5B
	BEQ.b CODE_80931D
	LDY.w $7EF051,x
	LDA.w $7EF054,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
CODE_80931D:
	LDA.b $5D
	BNE.b CODE_809322
	RTS

CODE_809322:
	LDY.w $7EF045,x
	LDA.w $7EF048,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF049,x
	LDA.w $7EF04C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF058,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_809347:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_809356
	CMP.w #$FFC0
	BCS.b CODE_80935B
	BRA.b CODE_809370

CODE_809356:
	CMP.w #$0100
	BCS.b CODE_809370
CODE_80935B:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	STA.b $54
	BMI.b CODE_809381
	CMP.w #$00E0
	BCC.b CODE_80938E
CODE_809370:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	STA.w $7E8654,y
	RTS

CODE_80937A:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_809381:
	CMP.w #$FFC0
	BCC.b CODE_809370
	CMP.w #$FFE0
	BCS.b CODE_80938E
	LDA.w #$00E0
CODE_80938E:
	STA.b $F5
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_80937A
	LDX.b $72
	CPX.w #$0004
	BNE.b CODE_80937A
	LDA.b $68
	CMP.w #$0003
	BEQ.b CODE_8093AF
	LDA.w $7E76AC,y
	BPL.b CODE_8093CF
	RTS

CODE_8093AF:
	LDX.b $84
	LDA.l DATA_80A0EE,x
	BMI.b CODE_809370
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$4FFF
	STA.w $7E7A96,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $A6,x
	TXA
	STA.w $7E76AC,y
	INX
	INX
	STX.b $84
CODE_8093CF:
	LDX.w $7E76AC,y
	LDA.b $56
	AND.w #$3000
	ORA.w $7E7A96,y
	AND.w #$7E00
	ORA.l DATA_80A0EE,x
	STA.b $86
	LDA.b $F5
	LDX.b $58
	STA.b $01,x
	STA.b $05,x
	LDA.b $54
	CLC
	ADC.w #$0020
	BMI.b CODE_8093FB
	CMP.w #$00E0
	BCC.b CODE_8093FB
	LDA.w #$00E0
CODE_8093FB:
	STA.b $09,x
	STA.b $0D,x
	LDA.b $52
	SEP.b #$20
	STA.b $00,x
	STA.b $08,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5A
	SEP.b #$20
	STA.b $04,x
	STA.b $0C,x
	REP.b #$21
	LDA.b $86
	BIT.b $86
	BMI.b CODE_809446
	BVS.b CODE_809432
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	BRL.w CODE_80946C

CODE_809432:
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	BRL.w CODE_80946C

CODE_809446:
	BVS.b CODE_80945B
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$0004
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	BRA.b CODE_80946C

CODE_80945B:
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
CODE_80946C:
	TXA
	ADC.w #$0010
	STA.b $58
	PHY
	SEP.b #$20
	LDA.b $53
	BEQ.b CODE_80947C
	LDA.w $7EF044,x
CODE_80947C:
	ORA.w $7EF043,x
	LDY.w $7EF041,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $53
	BEQ.b CODE_80948F
	LDA.w $7EF04C,x
CODE_80948F:
	ORA.w $7EF04B,x
	LDY.w $7EF049,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BEQ.b CODE_8094A2
	LDA.w $7EF048,x
CODE_8094A2:
	ORA.w $7EF047,x
	LDY.w $7EF045,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BEQ.b CODE_8094B5
	LDA.w $7EF050,x
CODE_8094B5:
	ORA.w $7EF04F,x
	LDY.w $7EF04D,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	REP.b #$30
	PLY
	LDA.w $7E7A96,y
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_80967E,x
	BPL.b CODE_8094D3
	RTS

CODE_8094D3:
	LDX.w $7E76AC,y
	STA.b $AC,x
	LDA.b $56
	AND.w #$3000
	ORA.w $7E7A96,y
	AND.w #$7E00
	ORA.l DATA_80A0F6,x
	STA.b $86
	LDA.w $7E7A96,y
	AND.w #$00FF
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_809556,x
	SEC
	SBC.b $4E
	BPL.b CODE_809505
	CMP.w #$FFF0
	BCS.b CODE_80950A
	BRA.b CODE_809522

CODE_809505:
	CMP.w #$0100
	BCS.b CODE_809522
CODE_80950A:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_8095EA,x
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	BPL.b CODE_809523
	CMP.w #$FFF0
	BCS.b CODE_809528
CODE_809522:
	RTS

CODE_809523:
	CMP.w #$00E0
	BCS.b CODE_809522
CODE_809528:
	STA.b $54
	SEP.b #$20
	LDX.b $58
	LDA.b $54
	STA.b $01,x
	LDA.b $52
	STA.b $00,x
	REP.b #$21
	LDA.b $86
	STA.b $02,x
	TXA
	ADC.w #$0004
	STA.b $58
	SEP.b #$20
	LDA.b $53
	BNE.b CODE_809549
	RTS

CODE_809549:
	LDY.w $7EF041,x
	LDA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	ORA.w $7EF044,x
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

DATA_809556:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$FFF0,$FFF0,$FFF0,$FFF0
	dw $FFF0,$FFF0,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0040,$0040,$0040,$0040
	dw $0040,$0040,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$FFF0,$FFF0,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0040,$0040,$0000,$0000
	dw $FFF0,$0040,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000

DATA_8095EA:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0010,$0010,$0010,$0010
	dw $0010,$0010,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0010,$0010,$0010,$0010
	dw $0010,$0010,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0010,$0010,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0010,$0010,$0000,$0000
	dw $0020,$0020,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000

DATA_80967E:
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$0000,$0004,$0008,$000C
	dw $0010,$0014,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$0000,$0004,$0008,$000C
	dw $0010,$0014,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$0018,$0020,$FFFF,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$0018,$0020,$FFFF,$FFFF
	dw $001C,$001C,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $FFFF,$FFFF

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

CODE_809712:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_809721
	CMP.w #$FFA0
	BCS.b CODE_809726
	BRA.b CODE_80973B

CODE_809721:
	CMP.w #$0100
	BCS.b CODE_80973B
CODE_809726:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	STA.b $54
	BMI.b CODE_80974C
	CMP.w #$00E0
	BCC.b CODE_809759
CODE_80973B:
	LDA.w #$FFFF
	STA.w $7E8654,y
	STA.w $7E76AC,y
	RTS

CODE_809745:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_80974C:
	CMP.w #$FFC0
	BCC.b CODE_80973B
	CMP.w #$FFE0
	BCS.b CODE_809759
	LDA.w #$00E0
CODE_809759:
	STA.b $F5
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_809745
	LDA.b $68
	CMP.w #$0001
	BEQ.b CODE_809773
	LDA.w $7E76AC,y
	BPL.b CODE_809791
	RTS

CODE_809773:
	LDX.b $80
	LDA.l DATA_80A0EA,x
	BMI.b CODE_80973B
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $9E,x
	INX
	INX
	STX.b $80
CODE_809791:
	LDA.b $F5
	LDX.b $58
	STA.b $01,x
	STA.b $05,x
	STA.b $09,x
	LDA.b $54
	CLC
	ADC.w #$0020
	BMI.b CODE_8097AB
	CMP.w #$00E0
	BCC.b CODE_8097AB
	LDA.w #$00E0
CODE_8097AB:
	STA.b $0D,x
	STA.b $11,x
	STA.b $15,x
	LDA.b $52
	SEP.b #$20
	STA.b $00,x
	STA.b $0C,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5A
	SEP.b #$20
	STA.b $04,x
	STA.b $10,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5C
	SEP.b #$20
	STA.b $08,x
	STA.b $14,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	BIT.b $56
	BMI.b CODE_80981D
	BVS.b CODE_809800
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0038
	STA.b $0E,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0004
	STA.b $16,x
	BRA.b CODE_809857

CODE_809800:
	STA.b $0A,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
	ADC.w #$0038
	STA.b $16,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0004
	STA.b $0E,x
	BRA.b CODE_809857

CODE_80981D:
	BVS.b CODE_80983C
	STA.b $0E,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$0038
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $0A,x
	BRA.b CODE_809857

CODE_80983C:
	STA.b $16,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$003C
	STA.b $0A,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
CODE_809857:
	TXA
	ADC.w #$0018
	STA.b $58
	SEP.b #$20
	LDA.b $53
	BNE.b CODE_8098B4
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BNE.b CODE_8098D6
CODE_80987F:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5D
	BNE.b CODE_8098F8
CODE_80989B:
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

CODE_8098B4:
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w $7EF044,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w $7EF050,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BEQ.b CODE_80987F
CODE_8098D6:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w $7EF048,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w $7EF054,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5D
	BEQ.b CODE_80989B
CODE_8098F8:
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w $7EF04C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w $7EF058,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_809917:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_809926
	CMP.w #$FFC0
	BCS.b CODE_80992B
	BRA.b CODE_809940

CODE_809926:
	CMP.w #$0100
	BCS.b CODE_809940
CODE_80992B:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	STA.b $54
	BMI.b CODE_809951
	CMP.w #$00E0
	BCC.b CODE_80995E
CODE_809940:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	STA.w $7E8654,y
	RTS

CODE_80994A:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_809951:
	CMP.w #$FFA0
	BCC.b CODE_809940
	CMP.w #$FFE0
	BCS.b CODE_80995E
	LDA.w #$00E0
CODE_80995E:
	STA.b $F5
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_80994A
	LDA.b $68
	CMP.w #$0001
	BEQ.b CODE_809978
	LDA.w $7E76AC,y
	BPL.b CODE_809996
	RTS

CODE_809978:
	LDX.b $80
	LDA.l DATA_80A0EA,x
	BMI.b CODE_809940
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $9E,x
	INX
	INX
	STX.b $80
CODE_809996:
	LDA.b $F5
	LDX.b $58
	STA.b $01,x
	STA.b $05,x
	LDA.b $54
	CLC
	ADC.w #$0020
	BMI.b CODE_8099AD
	CMP.w #$00E0
	BCC.b CODE_8099B5
	BRA.b CODE_8099B2

CODE_8099AD:
	CMP.w #$FFE0
	BCS.b CODE_8099B5
CODE_8099B2:
	LDA.w #$00E0
CODE_8099B5:
	STA.b $09,x
	STA.b $0D,x
	LDA.b $54
	CLC
	ADC.w #$0040
	BMI.b CODE_8099C8
	CMP.w #$00E0
	BCC.b CODE_8099D0
	BRA.b CODE_8099CD

CODE_8099C8:
	CMP.w #$FFE0
	BCS.b CODE_8099D0
CODE_8099CD:
	LDA.w #$00E0
CODE_8099D0:
	STA.b $11,x
	STA.b $15,x
	LDA.b $52
	SEP.b #$20
	STA.b $00,x
	STA.b $08,x
	STA.b $10,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5A
	SEP.b #$20
	STA.b $04,x
	STA.b $0C,x
	STA.b $14,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	BIT.b $56
	BMI.b CODE_809A37
	BVS.b CODE_809A1A
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0038
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$0004
	STA.b $16,x
	BRA.b CODE_809A71

CODE_809A1A:
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$0038
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $12,x
	BRA.b CODE_809A71

CODE_809A37:
	BVS.b CODE_809A56
	STA.b $12,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$0004
	STA.b $02,x
	ADC.w #$0038
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$0004
	STA.b $06,x
	BRA.b CODE_809A71

CODE_809A56:
	STA.b $16,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$003C
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $02,x
CODE_809A71:
	TXA
	ADC.w #$0018
	STA.b $58
	SEP.b #$20
	LDA.b $53
	BNE.b CODE_809ACA
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BNE.b CODE_809AFB
CODE_809AA5:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

CODE_809ACA:
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w $7EF044,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w $7EF04C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w $7EF054,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BEQ.b CODE_809AA5
CODE_809AFB:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w $7EF048,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w $7EF050,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w $7EF058,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_809B29:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_809B38
	CMP.w #$FFC0
	BCS.b CODE_809B3D
	BRA.b CODE_809B52

CODE_809B38:
	CMP.w #$0100
	BCS.b CODE_809B52
CODE_809B3D:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	STA.b $54
	BMI.b CODE_809B63
	CMP.w #$00E0
	BCC.b CODE_809B70
CODE_809B52:
	LDA.w #$FFFF
	STA.w $7E8654,y
	STA.w $7E76AC,y
	RTS

CODE_809B5C:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_809B63:
	CMP.w #$FFA0
	BCC.b CODE_809B52
	CMP.w #$FFE0
	BCS.b CODE_809B70
	LDA.w #$00E0
CODE_809B70:
	STA.b $F5
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_809B5C
	LDX.b $72
	CPX.w #$0003
	BNE.b CODE_809B5C
	LDA.b $68
	CMP.w #$0003
	BEQ.b CODE_809B91
	LDA.w $7E76AC,y
	BPL.b CODE_809BAF
	RTS

CODE_809B91:
	LDX.b $82
	LDA.l DATA_80A0FE,x
	BMI.b CODE_809B52
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $A0,x
	INX
	INX
	STX.b $82
CODE_809BAF:
	LDA.b $F5
	LDX.b $58
	STA.b $01,x
	STA.b $05,x
	LDA.b $54
	CLC
	ADC.w #$0020
	BMI.b CODE_809BC6
	CMP.w #$00E0
	BCC.b CODE_809BCE
	BRA.b CODE_809BCB

CODE_809BC6:
	CMP.w #$FFE0
	BCS.b CODE_809BCE
CODE_809BCB:
	LDA.w #$00E0
CODE_809BCE:
	STA.b $09,x
	STA.b $0D,x
	LDA.b $54
	CLC
	ADC.w #$0040
	BMI.b CODE_809BE1
	CMP.w #$00E0
	BCC.b CODE_809BE9
	BRA.b CODE_809BE6

CODE_809BE1:
	CMP.w #$FFE0
	BCS.b CODE_809BE9
CODE_809BE6:
	LDA.w #$00E0
CODE_809BE9:
	STA.b $11,x
	STA.b $15,x
	LDA.b $52
	SEP.b #$20
	STA.b $00,x
	STA.b $08,x
	STA.b $10,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5A
	SEP.b #$20
	STA.b $04,x
	STA.b $0C,x
	STA.b $14,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	BIT.b $56
	BMI.b CODE_809C50
	BVS.b CODE_809C33
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$003C
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$003C
	STA.b $12,x
	ADC.w #$0004
	STA.b $16,x
	BRA.b CODE_809C8A

CODE_809C33:
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
	ADC.w #$003C
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$003C
	STA.b $16,x
	ADC.w #$0004
	STA.b $12,x
	BRA.b CODE_809C8A

CODE_809C50:
	BVS.b CODE_809C6F
	STA.b $12,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$003C
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$003C
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	BRA.b CODE_809C8A

CODE_809C6F:
	STA.b $16,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$003C
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$003C
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
CODE_809C8A:
	TXA
	ADC.w #$0018
	STA.b $58
	SEP.b #$20
	LDA.b $53
	BNE.b CODE_809CE3
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BNE.b CODE_809D14
CODE_809CBE:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

CODE_809CE3:
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w $7EF044,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w $7EF04C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w $7EF054,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BEQ.b CODE_809CBE
CODE_809D14:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w $7EF048,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w $7EF050,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w $7EF058,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_809D42:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.b $4E
	BPL.b CODE_809D51
	CMP.w #$FF80
	BCS.b CODE_809D56
	BRA.b CODE_809D6B

CODE_809D51:
	CMP.w #$0100
	BCS.b CODE_809D6B
CODE_809D56:
	STA.b $52
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	SEC
	SBC.b $50
	STA.b $54
	BMI.b CODE_809D7C
	CMP.w #$00E0
	BCC.b CODE_809D89
CODE_809D6B:
	LDA.w #$FFFF
	STA.w $7E8654,y
	STA.w $7E76AC,y
	RTS

CODE_809D75:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	RTS

CODE_809D7C:
	CMP.w #$FFA0
	BCC.b CODE_809D6B
	CMP.w #$FFE0
	BCS.b CODE_809D89
	LDA.w #$00E0
CODE_809D89:
	STA.b $54
	LDA.w #$0000
	STA.w $7E8654,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	BMI.b CODE_809D75
	LDX.b $72
	CPX.w #$0001
	BNE.b CODE_809D75
	LDA.b $68
	CMP.w #$0003
	BEQ.b CODE_809DAA
	LDA.w $7E76AC,y
	BPL.b CODE_809DC8
	RTS

CODE_809DAA:
	LDX.b $82
	LDA.l DATA_80A0FE,x
	BMI.b CODE_809D6B
	ORA.b $56
	AND.w #$4FFF
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$00FF
	ASL
	ASL
	STA.b $A0,x
	INX
	INX
	STX.b $82
CODE_809DC8:
	LDA.b $54
	LDX.b $58
	STA.b $01,x
	STA.b $05,x
	STA.b $09,x
	STA.b $0D,x
	LDA.b $54
	CLC
	ADC.w #$0020
	BMI.b CODE_809DE3
	CMP.w #$00E0
	BCC.b CODE_809DEB
	BRA.b CODE_809DE8

CODE_809DE3:
	CMP.w #$FFE0
	BCS.b CODE_809DEB
CODE_809DE8:
	LDA.w #$00E0
CODE_809DEB:
	STA.b $11,x
	STA.b $15,x
	STA.b $19,x
	STA.b $1D,x
	LDA.b $54
	CLC
	ADC.w #$0040
	BMI.b CODE_809E02
	CMP.w #$00E0
	BCC.b CODE_809E0A
	BRA.b CODE_809E07

CODE_809E02:
	CMP.w #$FFE0
	BCS.b CODE_809E0A
CODE_809E07:
	LDA.w #$00E0
CODE_809E0A:
	STA.b $21,x
	STA.b $25,x
	STA.b $29,x
	STA.b $2D,x
	LDA.b $52
	SEP.b #$20
	STA.b $00,x
	STA.b $10,x
	STA.b $20,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5A
	SEP.b #$20
	STA.b $04,x
	STA.b $14,x
	STA.b $24,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5C
	SEP.b #$20
	STA.b $08,x
	STA.b $18,x
	STA.b $28,x
	REP.b #$21
	ADC.w #$0020
	STA.b $5E
	SEP.b #$20
	STA.b $0C,x
	STA.b $1C,x
	STA.b $2C,x
	REP.b #$21
	LDA.b $56
	AND.w #$3000
	ORA.w $7E76AC,y
	BIT.b $56
	BMI.b CODE_809ED0
	BVS.b CODE_809E95
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	ADC.w #$0034
	STA.b $12,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$0004
	STA.b $1A,x
	ADC.w #$0004
	STA.b $1E,x
	ADC.w #$0034
	STA.b $22,x
	ADC.w #$0004
	STA.b $26,x
	ADC.w #$0004
	STA.b $2A,x
	ADC.w #$0004
	STA.b $2E,x
	BRL.w CODE_809F46

CODE_809E95:
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
	ADC.w #$0034
	STA.b $1E,x
	ADC.w #$0004
	STA.b $1A,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0034
	STA.b $2E,x
	ADC.w #$0004
	STA.b $2A,x
	ADC.w #$0004
	STA.b $26,x
	ADC.w #$0004
	STA.b $22,x
	BRA.b CODE_809F46

CODE_809ED0:
	BVS.b CODE_809F0D
	STA.b $22,x
	ADC.w #$0004
	STA.b $26,x
	ADC.w #$0004
	STA.b $2A,x
	ADC.w #$0004
	STA.b $2E,x
	ADC.w #$0034
	STA.b $12,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$0004
	STA.b $1A,x
	ADC.w #$0004
	STA.b $1E,x
	ADC.w #$0034
	STA.b $02,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $0E,x
	BRA.b CODE_809F46

CODE_809F0D:
	STA.b $2E,x
	ADC.w #$0004
	STA.b $2A,x
	ADC.w #$0004
	STA.b $26,x
	ADC.w #$0004
	STA.b $22,x
	ADC.w #$0034
	STA.b $1E,x
	ADC.w #$0004
	STA.b $1A,x
	ADC.w #$0004
	STA.b $16,x
	ADC.w #$0004
	STA.b $12,x
	ADC.w #$0034
	STA.b $0E,x
	ADC.w #$0004
	STA.b $0A,x
	ADC.w #$0004
	STA.b $06,x
	ADC.w #$0004
	STA.b $02,x
CODE_809F46:
	TXA
	CLC
	ADC.w #$0030
	STA.b $58
	SEP.b #$20
	LDA.b $53
	BEQ.b CODE_809F56
	BRL.w CODE_809FFC

CODE_809F56:
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF061,x
	LDA.w $7EF063,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BEQ.b CODE_809F81
	BRL.w CODE_80A030

CODE_809F81:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF065,x
	LDA.w $7EF067,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5D
	BEQ.b CODE_809FAC
	BRL.w CODE_80A064

CODE_809FAC:
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF059,x
	LDA.w $7EF05B,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF069,x
	LDA.w $7EF06B,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5F
	BEQ.b CODE_809FD7
	BRL.w CODE_80A098

CODE_809FD7:
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF05D,x
	LDA.w $7EF05F,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF06D,x
	LDA.w $7EF06F,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

CODE_809FFC:
	LDY.w $7EF041,x
	LDA.w $7EF043,x
	ORA.w $7EF044,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF051,x
	LDA.w $7EF053,x
	ORA.w $7EF054,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF061,x
	LDA.w $7EF063,x
	ORA.w $7EF064,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5B
	BNE.b CODE_80A030
	BRL.w CODE_809F81

CODE_80A030:
	LDY.w $7EF045,x
	LDA.w $7EF047,x
	ORA.w $7EF048,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF055,x
	LDA.w $7EF057,x
	ORA.w $7EF058,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF065,x
	LDA.w $7EF067,x
	ORA.w $7EF068,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5D
	BNE.b CODE_80A064
	BRL.w CODE_809FAC

CODE_80A064:
	LDY.w $7EF049,x
	LDA.w $7EF04B,x
	ORA.w $7EF04C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF059,x
	LDA.w $7EF05B,x
	ORA.w $7EF05C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF069,x
	LDA.w $7EF06B,x
	ORA.w $7EF06C,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDA.b $5F
	BNE.b CODE_80A098
	BRL.w CODE_809FD7

CODE_80A098:
	LDY.w $7EF04D,x
	LDA.w $7EF04F,x
	ORA.w $7EF050,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF05D,x
	LDA.w $7EF05F,x
	ORA.w $7EF060,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	LDY.w $7EF06D,x
	LDA.w $7EF06F,x
	ORA.w $7EF070,x
	ORA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	STA.w JP_Global_UpperOAMBuffer[$00].Slot,y
	RTS

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

DATA_80A0C6:
	dw $0000,$FFFF

DATA_80A0CA:
	dw $00E0,$00E2,$00E4,$00E6,$0100,$0102,$0120,$0122
	dw $FFFF

DATA_80A0DC:
	dw $0004,$0008,$000C,$FFFF

DATA_80A0E4:
	dw $0004,$000A,$FFFF

DATA_80A0EA:
	dw $0060,$FFFF

DATA_80A0EE:
	dw $0140,$0180,$01C0,$FFFF

DATA_80A0F6:
	dw $010E,$012C,$012E,$FFFF

DATA_80A0FE:
	dw $0140,$FFFF

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

CODE_80A102:
	REP.b #$30
	PHB
	LDX.w #DATA_8082CA
	LDY.w #$7EF6E0
	LDA.w #$091F
	MVN $7EF6E0>>16,DATA_8082CA>>16
	LDX.w #DATA_808BEA
	LDY.w #$7EF4E0
	LDA.w #$01FF
	MVN $7EF4E0>>16,DATA_808BEA>>16
	PLB
	RTL

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

CODE_80A11F:
	LSR
	LSR
	LSR
	AND.w #$FFFE
	STA.b $26
	TYA
	LSR
	LSR
	LSR
	AND.w #$FFFE
	STA.b $24
	RTS

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

CODE_80A131:
	PHX
	CLC
	ADC.b $24
	TAX
	LDA.l DATA_83D197,x
	STA.b $1B
	PLX
	TYA
	ADC.b $26
	TAY
	LDA.b [$1A],y
	AND.w #$F800
	RTS

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

CODE_80A147:
	LSR
	LSR
	LSR
	AND.w #$FFFE
	STA.b $26
	PHA
	TYA
	LSR
	LSR
	LSR
	AND.w #$FFFE
	STA.b $24
	PHX
	TAX
	LDA.l DATA_83D197,x
	STA.b $1B
	PLX
	PLY
	LDA.b [$1A],y
	AND.w #$F800
	RTL

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

DATA_80A169:
	dw $000E,$000E,$0010,$0020,$0020,$002A,$0030,$0040
	dw $0040,$0060,$0060,$0060,$0040

DATA_80A183:
	dw $0002,$0002,$0002,$0003,$0003,$0003,$0004,$0005
	dw $0007,$0005,$0009,$0005,$FFFF

CODE_80A19D:
	LDA.w $7E6ED8,y
	AND.w #$7FFF
	STA.b $36
	PHY
	LDX.w $7E380C,y
	LDA.l DATA_80A183,x
	BMI.b CODE_80A20C
	STA.b $34
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80A169,x
	LSR
	LSR
	LSR
	AND.w #$FFFE
	STA.b $24
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.w #$0004
	LSR
	LSR
	LSR
	AND.w #$FFFE
	TAY
	LDX.b $24
	LDA.l DATA_83D197,x
	STA.b $1B
	STZ.b $38
	LDX.b $34
CODE_80A1DB:
	LDA.b [$1A],y
	AND.w #$7800
	CMP.w #$7000
	BCS.b CODE_80A1EB
	CMP.b $36
	BEQ.b CODE_80A1EB
	BCS.b CODE_80A1FB
CODE_80A1EB:
	INY
	INY
	DEX
	BNE.b CODE_80A1DB
	PLY
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	ORA.w #$3000
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	RTS

CODE_80A1FB:
	CMP.w #$1800
	BNE.b CODE_80A20C
	LDA.b [$1A],y
	BMI.b CODE_80A20C
	LDA.b $38
	BNE.b CODE_80A20C
	INC.b $38
	BRA.b CODE_80A1EB

CODE_80A20C:
	PLY
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$CFFF
	ORA.w #$2000
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	RTS

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

DATA_80A21A:
	incbin "Palettes/TyrannosaurusRex.bin"

DATA_80A23A:
	incbin "Palettes/Velociraptor.bin"

DATA_80A25A:
	incbin "Palettes/Triceratops.bin"

DATA_80A27A:
	incbin "Palettes/Player.bin"

UNK_80A29A:
	incbin "Palettes/DATA_80A29A.bin"

DATA_80A33A:
	incbin "Palettes/ElectrifiedPlayer.bin"

DATA_80A35A:
	dw $0E00,$0E08,$0E10,$0E18,$0E20,$0E28,$0E30,$0E38

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

CODE_80A36A:
	REP.b #$30
	LDA.w #$004A
	STA.w $7E341E
	LDA.w !RAM_JP_Exterior_Player_CheckpointXPosLo
	STA.w !RAM_JP_Exterior_Player_SubXPosLo
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w !RAM_JP_Exterior_Player_CheckpointYPosLo
	STA.w !RAM_JP_Exterior_Player_SubYPosLo
	STA.w !RAM_JP_Exterior_Player_YPosLo
	LDA.w !RAM_JP_Exterior_Player_CheckpointZPosLo
	STA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	LDA.w #$000A
	STA.w $7E3BF2
	LDA.w #$FFFF
	STA.w $7E7A92
	STZ.w $7E4B9A
	LDA.w #$0004
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STA.w $0B23
	LDA.w #$0E20
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
	STA.w $7E7C
	STZ.w !RAM_JP_Exterior_Player_WalkingFrameLo
	STZ.w $0E0B
	STZ.w !RAM_JP_Exterior_Player_InAirFlagLo
	STZ.w !RAM_JP_Exterior_Player_OnStairsFlagLo
	STZ.w $7E6ED4
	STZ.w $7E6AEA
	STZ.w !RAM_JP_Exterior_Player_ZPosLo
	STZ.w $03BE
	LDA.w #$03C0
	STA.w !RAM_JP_Exterior_WaitBeforeMrDNATriviaAppearsLo
	LDA.w #$0078
	STA.w $0E31
	RTL

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

CODE_80A3D0:
	LDA.w $7E4B9A
	BEQ.b CODE_80A3D8
	JSR.w CODE_80ABC9
CODE_80A3D8:
	RTS

CODE_80A3D9:
	JSR.w CODE_80A3DD
	RTL

CODE_80A3DD:
	REP.b #$30
	INC.w $0E3B
	JSR.w CODE_80F003
	LDA.w $0E0D
	BNE.b CODE_80A3D0
	LDA.w $03BE
	BEQ.b CODE_80A40C
	LDA.w $03C0
	EOR.w $0AEF
	STA.w $0AEF
	DEC.w $03BE
	LDA.w $049D
	AND.w #$000F
	BNE.b CODE_80A40C
	LDA.w $0B2F
	AND.w #$0F00
	STA.w $03C0
CODE_80A40C:
	LDA.b $68
	BNE.b CODE_80A413
	STZ.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
CODE_80A413:
	LDA.w $7E4B9A
	BEQ.b CODE_80A41B
	JSR.w CODE_80ABC9
CODE_80A41B:
	LDA.w $0E0B
	BEQ.b CODE_80A42B
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BEQ.b CODE_80A428
	JSR.w CODE_80A92C
CODE_80A428:
	BRL.w CODE_80A5C0

CODE_80A42B:
	LDX.w !RAM_JP_Global_Player_DamageTakenLo
	CPX.w #$0100
	BCC.b CODE_80A459
	LDA.w #$0001
	STA.w $0E0B
	STZ.w !RAM_JP_Exterior_Player_ZPosLo
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80A449,x
	TAX
	JMP.w CODE_80ABAE

DATA_80A449:
	dw $00A0,$00B8,$00D2,$00EE,$010C,$012C,$014A,$0166

CODE_80A459:
	LDA.w $0E31
	BEQ.b CODE_80A461
	DEC.w $0E31
CODE_80A461:
	LDA.w $0E2F
	BEQ.b CODE_80A469
	BRL.w CODE_80A530

CODE_80A469:
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.w #$0020
	TAY
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.w #$000C
	JSL.l CODE_80A147
	AND.w #$7800
	CMP.w #$7800
	BEQ.b CODE_80A48C
	CMP.w #$0000
	BEQ.b CODE_80A48C
	BRL.w CODE_80A530

CODE_80A48C:
	LDA.b [$1A],y
	AND.w #$07FF
	CMP.w #$01ED
	BCC.b CODE_80A49B
	CMP.w #$0296
	BCC.b CODE_80A4C5
CODE_80A49B:
	CMP.w #$0587
	BCC.b CODE_80A4A5
	CMP.w #$05FD
	BCC.b CODE_80A4D3
CODE_80A4A5:
	CMP.w #$02C3
	BCC.b CODE_80A4AF
	CMP.w #$02FD
	BCC.b CODE_80A502
CODE_80A4AF:
	CMP.w #$0473
	BCC.b CODE_80A4B9
	CMP.w #$0500
	BCC.b CODE_80A50A
CODE_80A4B9:
	CMP.w #$0700
	BCC.b CODE_80A4C3
	CMP.w #$0800
	BCC.b CODE_80A50A
CODE_80A4C3:
	BRA.b CODE_80A530

CODE_80A4C5:
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80A530
	LDY.w #$03E6
	LDA.w #!Define_JP_Player_PoisonVineDamage
	JMP.w CODE_80AAC4

CODE_80A4D3:
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80A530
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	ADC.w #!Define_JP_Player_ElectricShockDamage
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	CMP.w #$0100
	BCC.b CODE_80A4FF
	LDA.w #$0218
	LDY.w #$F00A
	JSL.l CODE_839B59
	LDA.w #$0001
	STA.w $0E0B
	LDX.w #$0262
	STA.w $0E0B
	JMP.w CODE_80ABAE

CODE_80A4FF:
	JMP.w CODE_80AA89

CODE_80A502:
	LDA.w #$FFFF
	STA.w $0E27
	BRA.b CODE_80A530

CODE_80A50A:
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80A530
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_WaterSplash&$007F
	JSL.l CODE_839BA2
	LDA.w #$0001
	STA.w $0E0B
	LDX.w #$0284
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	CMP.w #$0004
	BCC.b CODE_80A52D
	LDX.w #$0296
CODE_80A52D:
	JMP.w CODE_80ABAE

CODE_80A530:
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	STA.w $0DFB
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	STA.w $0DFD
	JSR.w CODE_80A678
	REP.b #$30
	STZ.w $0E2F
	LDX.w #$03E6
	JSR.w CODE_80F595
	BCS.b CODE_80A565
	LDA.w $0E27
	BEQ.b CODE_80A56B
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
	STZ.w !RAM_JP_Exterior_Player_WalkingFrameLo
	INC.w $0E2F
	BRA.b CODE_80A56B

CODE_80A565:
	STZ.w $0E27
	INC.w $0E2F
CODE_80A56B:
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	CMP.w #$FFFE
	BEQ.b CODE_80A5C0
	LDX.w #$03E6
	JSR.w CODE_80F4D9
	BCC.b CODE_80A5C0
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	ADC.w #!Define_JP_Player_ElectricShockDamage
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	CMP.w #$0100
	BCC.b CODE_80A5A2
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_ExplodingDinosaur&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839B59
	LDA.w #$0001
	STA.w $0E0B
	LDX.w #$0262
	STA.w $0E0B
	JMP.w CODE_80ABAE

CODE_80A5A2:
	LDX.w #$0000
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	CLC
	ADC.w #$0002
	AND.w #$0007
	CMP.w #$0004
	BCC.b CODE_80A5B7
	LDX.w #$0004
CODE_80A5B7:
	STX.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STX.w $0B23
	JSR.w CODE_80AA0D
CODE_80A5C0:
	JSR.w CODE_80EE8E
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.w #$0010
	STA.w $0B51
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.w #$0018
	STA.w $0B53
	RTS

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

DATA_80A5D8:
	dw $FFFF,$0002,$0006,$FFFF,$0004,$0003,$0005,$FFFF
	dw $0000,$0001,$0007,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0000,$0000,$87C0,$0000,$C000,$0000,$87C0,$0000
	dw $0000,$0000,$7840,$FFFF,$4000,$FFFF,$7840,$FFFF
	dw $4000,$FFFF,$7840,$FFFF,$0000,$0000,$87C0,$0000
	dw $C000,$0000,$87C0,$0000,$0000,$0000,$7840,$FFFF

DATA_80A638:
	dw $0004,$0016

DATA_80A63C:
	dw $0014,$0016,$0004,$0016,$0014,$0016,$0014,$0026
	dw $0014,$0016,$0004,$0026,$0014,$0026,$0004,$0026
	dw $0014,$0026,$0004,$0026,$0014,$0026,$0004,$0026
	dw $0004,$0016,$0004,$0016,$0014,$0016

CODE_80A678:
	LDY.w $0AF1
	TYA
	AND.w #$2000
	BEQ.b CODE_80A699
	LDA.w $037D
	EOR.w #$FFFF
	STA.w $037D
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_80A699
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PickupItem&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839B59
CODE_80A699:
	LDA.w !RAM_JP_Exterior_Player_OnStairsFlagLo
	BEQ.b CODE_80A6A1
	BRL.w CODE_80A96C

CODE_80A6A1:
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BEQ.b CODE_80A6AE
	BMI.b CODE_80A6AB
	JSR.w CODE_80B2B2
CODE_80A6AB:
	BRL.w CODE_80A8FA

CODE_80A6AE:
	STZ.w $0B25
	LDA.w $7E4B9A
	BEQ.b CODE_80A6B7
	RTS

CODE_80A6B7:
	JSR.w CODE_80B2B2
	REP.b #$30
	STZ.w !RAM_JP_Exterior_Player_SpeedLo
	LDA.w $0AF1
	AND.w #$0040
	BEQ.b CODE_80A6E4
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80A6D4,x
	TAX
	JMP.w CODE_80ABAE

DATA_80A6D4:
	dw $0030,$003E,$004C,$005A,$0068,$0076,$0084,$0092

CODE_80A6E4:
	LDA.w $0AF1
	AND.w #$8000
	BEQ.b CODE_80A6EF
	JSR.w CODE_80A9F3
CODE_80A6EF:
	LDA.w $0AEF
	XBA
	AND.w #$000F
	ASL
	TAX
	LDA.l DATA_80A5D8,x
	BMI.b CODE_80A704
	DEC.w $0B25
	STA.w $0B23
CODE_80A704:
	LDA.w $0E3B
	AND.w #$0001
	BNE.b CODE_80A730
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	TAX
	SEC
	SBC.w $0B23
	BEQ.b CODE_80A730
	BPL.b CODE_80A720
	CMP.w #$FFFC
	BCC.b CODE_80A728
	INX
	BRA.b CODE_80A729

CODE_80A720:
	CMP.w #$0004
	BCC.b CODE_80A728
	INX
	BRA.b CODE_80A729

CODE_80A728:
	DEX
CODE_80A729:
	TXA
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
CODE_80A730:
	LDA.w $0B25
	BNE.b CODE_80A748
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	ASL
	ASL
	ORA.w #$0E00
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
	LDA.w #$0001
	STA.w !RAM_JP_Exterior_Player_WalkingFrameLo
	RTS

CODE_80A748:
	LDA.w #$0006
	STA.w !RAM_JP_Exterior_Player_SpeedLo
	LDA.b $68
	BNE.b CODE_80A769
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Player_WalkingFrameLo
	INC
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Player_WalkingFrameLo
	CLC
	ADC.l DATA_80A35A,x
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
CODE_80A769:
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Player_SpeedLo
	SEP.b #$30
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w !RAM_JP_Exterior_Player_SubXPosHi
	STA.w !RAM_JP_Exterior_Player_SubXPosHi
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Player_XPosLo
	STA.w !RAM_JP_Exterior_Player_XPosLo
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w !RAM_JP_Exterior_Player_SubYPosHi
	STA.w !RAM_JP_Exterior_Player_SubYPosHi
	REP.b #$30
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Player_YPosLo
	STA.w !RAM_JP_Exterior_Player_YPosLo
	STZ.w !RAM_JP_Exterior_Player_OnStairsFlagLo
	LDA.w $0E2F
	BEQ.b CODE_80A7CB
	BRL.w CODE_80A876

CODE_80A7CB:
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.l DATA_80A638+$02,x
	TAY
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.l DATA_80A638,x
	JSL.l CODE_80A147
	STA.w $0DF3
	AND.w #$7800
	STA.w $0DF1
	LDA.b [$1A],y
	AND.w #$07FF
	STA.w $0E2B
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.l DATA_80A63C+$02,x
	TAY
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.l DATA_80A63C,x
	JSL.l CODE_80A147
	STA.w $0DE9
	STA.w $0DF7
	AND.w #$7800
	STA.w $0DF5
	LDA.b [$1A],y
	AND.w #$07FF
	STA.w $0E29
	LDA.w $0DF5
	LDY.w #$0000
	CMP.w $0DF1
	BNE.b CODE_80A877
	CMP.w #$1000
	BNE.b CODE_80A84A
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	BNE.b CODE_80A847
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80A847
	LDA.w $0DFB
	STA.w $0E46
	LDA.w $0DFD
	STA.w $0E48
CODE_80A847:
	BRL.w CODE_80A8D8

CODE_80A84A:
	CMP.w #$7000
	BNE.b CODE_80A877
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BEQ.b CODE_80A857
	BRL.w CODE_80A8D8

CODE_80A857:
	LDA.w #$7000
	STA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w !RAM_JP_Exterior_Player_OnStairsFlagLo
	STZ.w $0411
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	CMP.w #$0002
	BCC.b CODE_80A876
	CMP.w #$0006
	BCS.b CODE_80A876
	LDA.w #$0050
	STA.w $0411
CODE_80A876:
	RTS

CODE_80A877:
	CMP.w #$6800
	BCS.b CODE_80A87F
	JSR.w CODE_80A8E9
CODE_80A87F:
	LDA.w $0DF1
	CMP.w #$6800
	BCS.b CODE_80A876
	LDX.w $0E2B
	STX.w $0E29
	LDX.w $0DF3
	STX.w $0DE9
	JSR.w CODE_80A8E9
	TYA
	BEQ.b CODE_80A876
	RTS

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

CODE_80A89A:
	LDX.w !RAM_JP_Exterior_Player_InAirFlagLo
	BEQ.b CODE_80A8BB
	CMP.w #$0000
	BNE.b CODE_80A8BB
	LDX.w $0E29
	CPX.w #$0473
	BCC.b CODE_80A8B1
	CPX.w #$0500
	BCC.b CODE_80A876
CODE_80A8B1:
	CPX.w #$0700
	BCC.b CODE_80A8BB
	CPX.w #$0800
	BCC.b CODE_80A876
CODE_80A8BB:
	CMP.w #$3000
	BNE.b CODE_80A8D8
	STA.w !RAM_JP_Exterior_TouchedPoleFlagLo
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_CheckpointXPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_CheckpointYPosLo
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w !RAM_JP_Exterior_Player_CheckpointZPosLo
	STZ.w $0E39
CODE_80A8D8:
	STZ.w !RAM_JP_Exterior_Player_WalkingFrameLo
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
	INY
	RTS

CODE_80A8E9:
	BIT.w $0DE9
	BMI.b CODE_80A8F4
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BNE.b CODE_80A89A
	RTS

CODE_80A8F4:
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BCC.b CODE_80A89A
	RTS

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

CODE_80A8FA:
	BMI.b CODE_80A920
	LDA.w $7E4B9A
	BNE.b CODE_80A929
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	ASL
	ORA.w #$0E40
	STA.b $34
	LDX.w #$0002
	LDA.w $7E6AEA
	BPL.b CODE_80A919
	CMP.w #$FF80
	BCS.b CODE_80A919
	INX
CODE_80A919:
	TXA
	CLC
	ADC.b $34
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
CODE_80A920:
	LDA.w #$FFFF
	STA.w $7E8650
	JSR.w CODE_80A92C
CODE_80A929:
	JMP.w CODE_80A769

CODE_80A92C:
	LDA.w $7E6ED4
	CLC
	ADC.w $7E6AEA
	BMI.b CODE_80A950
	TAX
	XBA
	AND.w #$00FF
	CMP.w #$0018
	BCS.b CODE_80A945
	STA.w !RAM_JP_Exterior_Player_ZPosLo
	STX.w $7E6ED4
CODE_80A945:
	LDA.w $7E6AEA
	SEC
	SBC.w #$0018
	STA.w $7E6AEA
	RTS

CODE_80A950:
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BPL.b CODE_80A95B
	LDA.w $0B23
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
CODE_80A95B:
	STZ.w !RAM_JP_Exterior_Player_InAirFlagLo
	STZ.w !RAM_JP_Exterior_Player_ZPosLo
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_Land
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

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

CODE_80A96C:
	STZ.w !RAM_JP_Exterior_Player_InAirFlagLo
	LDA.w #$7000
	STA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	LDY.w $0AEF
	TYA
	AND.w #$0800
	BEQ.b CODE_80A993
	STZ.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STZ.w $0B23
	INC.w $0411
	DEC.w !RAM_JP_Exterior_Player_YPosLo
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.w #$0028
	BRA.b CODE_80A9AF

CODE_80A993:
	TYA
	AND.w #$0400
	BEQ.b CODE_80A9CE
	LDA.w #$0004
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STA.w $0B23
	DEC.w $0411
	INC.w !RAM_JP_Exterior_Player_YPosLo
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.w #$0019
CODE_80A9AF:
	TAY
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.w #$000B
	JSL.l CODE_80A147
	CMP.w #$7000
	BEQ.b CODE_80A9CE
	CMP.w #$6800
	BCS.b CODE_80A9CE
	STA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STZ.w !RAM_JP_Exterior_Player_OnStairsFlagLo
	STZ.w $0411
CODE_80A9CE:
	LDA.w #$0E7B
	LDX.w !RAM_JP_Exterior_Player_MovementDirectionLo
	BEQ.b CODE_80A9D9
	LDA.w #$0E7F
CODE_80A9D9:
	STA.b $34
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	LSR
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.b $34
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
	RTS

CODE_80A9EB:
	LDA.w #$7001
	STA.w !RAM_JP_Exterior_Player_OnStairsFlagLo
	BRA.b CODE_80A9CE

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

CODE_80A9F3:
	LDA.w #$0200
	STA.w !RAM_JP_Exterior_Player_InAirFlagLo
	STA.w $7E6AEA
	RTS

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

DATA_80A9FD:
	dw $0000,$0006,$000C,$0012,$0018,$001E,$0024,$002A

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

CODE_80AA0D:
	LDA.w #$003C
	STA.w $0E31
	LDA.w #$0140
	STA.w $7E6AEA
	LDA.w #$FFFE
	STA.w !RAM_JP_Exterior_Player_InAirFlagLo
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_ElectricShock
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #$0250
CODE_80AA2C:
	STA.w $7E4B9A
	LDA.w #$0007
	STA.w $0DF9
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	CLC
	ADC.w #$0004
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	LDA.w #$0008
	STA.w !RAM_JP_Exterior_Player_SpeedLo
CODE_80AA48:
	RTS

CODE_80AA49:
	BIT.w !RAM_JP_Exterior_Player_InAirFlagLo
	BMI.b CODE_80AA48
	CLC
	ADC.w !RAM_JP_Global_Player_DamageTakenLo
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #$003C
	STA.w $0E31
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Player_InAirFlagLo
	LDA.w #$0140
	STA.w $7E6AEA
	LDA.w #!Define_JP_SoundID_PlayerHurt
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80AA79,x
	BRA.b CODE_80AA2C

DATA_80AA79:
	dw $02A8,$02B4,$02C0,$02CC,$02D8,$02E4,$02F0,$02FC

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

CODE_80AA89:
	LDA.w #$003C
	STA.w $0E31
	LDA.w #$0140
	STA.w $7E6AEA
	LDA.w #$FFFE
	STA.w !RAM_JP_Exterior_Player_InAirFlagLo
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_ElectricShock
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #$0250
	STA.w $7E4B9A
	LDA.w #$0007
	STA.w $0DF9
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80AB0B,x
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	LDA.w #$0008
	STA.w !RAM_JP_Exterior_Player_SpeedLo
	RTS

CODE_80AAC4:
	BIT.w !RAM_JP_Exterior_Player_InAirFlagLo
	BMI.b CODE_80AB0A
	CLC
	ADC.w !RAM_JP_Global_Player_DamageTakenLo
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #$003C
	STA.w $0E31
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Player_InAirFlagLo
	LDA.w #$0140
	STA.w $7E6AEA
	LDA.w #!Define_JP_SoundID_PlayerHurt
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80AB0B,x
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80AB1B,x
	STA.w $7E4B9A
	LDA.w #$0007
	STA.w $0DF9
	LDA.w #$0008
	STA.w !RAM_JP_Exterior_Player_SpeedLo
CODE_80AB0A:
	RTS

DATA_80AB0B:
	dw $0006,$0006,$0006,$0006,$0002,$0002,$0002,$0002

DATA_80AB1B:
	dw $02F0,$02F0,$02F0,$02F0,$02C0,$02C0,$02C0,$02C0

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

CODE_80AB2B:
	BIT.w !RAM_JP_Exterior_Player_InAirFlagLo
	BMI.b CODE_80AB6E
	CLC
	ADC.w !RAM_JP_Global_Player_DamageTakenLo
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #$003C
	STA.w $0E31
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Player_InAirFlagLo
	LDA.w #$0140
	STA.w $7E6AEA
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80AA79,x
	STA.w $7E4B9A
	LDA.w #$0007
	STA.w $0DF9
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	LDA.w #$0008
	STA.w !RAM_JP_Exterior_Player_SpeedLo
	LDA.w #!Define_JP_SoundID_PlayerHurt
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80AB6E:
	RTS

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

CODE_80AB6F:
	RTS

CODE_80AB70:
	BIT.w !RAM_JP_Exterior_Player_InAirFlagLo
	BMI.b CODE_80AB6F
	CLC
	ADC.w !RAM_JP_Global_Player_DamageTakenLo
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #$003C
	STA.w $0E31
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Player_InAirFlagLo
	LDA.w #$0140
	STA.w $7E6AEA
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	TAX
	LDA.l DATA_80AA79,x
	STA.w $7E4B9A
	LDA.w #$0007
	STA.w $0DF9
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	LDA.w #!Define_JP_SoundID_PlayerHurt
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

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

CODE_80ABAE:
	STZ.w $0DF9
	LDA.l DATA_80AC1B,x
	BPL.b CODE_80ABC0
	STA.w $0B59
	INX
	INX
	LDA.l DATA_80AC1B,x
CODE_80ABC0:
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
	INX
	INX
	STX.w $7E4B9A
	RTS

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

CODE_80ABC9:
	INC.w $0DF9
	LDA.w $0DF9
	AND.w #$0007
	BNE.b CODE_80ABE5
	LDX.w $7E4B9A
CODE_80ABD7:
	LDA.l DATA_80AC1B,x
	BMI.b CODE_80ABE6
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
	INX
	INX
	STX.w $7E4B9A
CODE_80ABE5:
	RTS

CODE_80ABE6:
	CMP.w #$FFFE
	BEQ.b CODE_80AC0B
	CMP.w #$FFFF
	BEQ.b CODE_80AC08
	CMP.w #$FFE2
	BEQ.b CODE_80AC0F
	CMP.w #$FFEC
	BCS.b CODE_80AC01
	STA.w $0B59
	INX
	INX
	BRA.b CODE_80ABD7

CODE_80AC01:
	STA.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	INX
	INX
	BRA.b CODE_80ABD7

CODE_80AC08:
	STA.w $0E0B
CODE_80AC0B:
	STZ.w $7E4B9A
	RTS

CODE_80AC0F:
	LDA.w $0AEF
	AND.w #$0040
	BNE.b CODE_80ABE5
	INX
	INX
	BRA.b CODE_80ABD7

DATA_80AC1B:
	dw $0E40,$0E41,$FFFE,$0E44,$0E45,$FFFE,$0E48,$0E49
	dw $FFFE,$0E4C,$0E4D,$FFFE,$0E50,$0E51,$FFFE,$0E54
	dw $0E55,$FFFE,$0E58,$0E59,$FFFE,$0E5C,$0E5D,$FFFE
	dw $0E60,$0E61,$FFEC,$0E61,$FFE2,$0E60,$FFFE,$0E62
	dw $0E63,$FFEC,$0E63,$FFE2,$0E62,$FFFE,$0E64,$0E65
	dw $FFEC,$0E65,$FFE2,$0E64,$FFFE,$0E66,$0E67,$FFEC
	dw $0E67,$FFE2,$0E66,$FFFE,$0E68,$0E69,$FFEC,$0E69
	dw $FFE2,$0E68,$FFFE,$0E6A,$0E6B,$FFEC,$0E6B,$FFE2
	dw $0E6A,$FFFE,$0E6C,$0E6D,$FFEC,$0E6D,$FFE2,$0E6C
	dw $FFFE,$0E6E,$0E6F,$FFEC,$0E6F,$FFE2,$0E6E,$FFFE
	dw DATA_80A27A,$0E70,$0E71,$0E72,$0E73,$0E74,$0E74,$0E74
	dw $0E74,$0E74,$FFFF,$FFFE,DATA_80A27A,$0E00,$0E70,$0E71
	dw $0E72,$0E73,$0E74,$0E74,$0E74,$0E74,$0E74,$FFFF
	dw $FFFE,DATA_80A27A,$0E08,$0E00,$0E70,$0E71,$0E72,$0E73
	dw $0E74,$0E74,$0E74,$0E74,$0E74,$FFFF,$FFFE,DATA_80A27A
	dw $0E10,$0E08,$0E00,$0E70,$0E71,$0E72,$0E73,$0E74
	dw $0E74,$0E74,$0E74,$0E74,$FFFF,$FFFE,DATA_80A27A,$0E18
	dw $0E10,$0E08,$0E00,$0E70,$0E71,$0E72,$0E73,$0E74
	dw $0E74,$0E74,$0E74,$0E74,$FFFF,$FFFE,DATA_80A27A,$0E30
	dw $0E38,$0E00,$0E70,$0E71,$0E72,$0E73,$0E74,$0E74
	dw $0E74,$0E74,$0E74,$FFFF,$FFFE,DATA_80A27A,$0E38,$0E00
	dw $0E70,$0E71,$0E72,$0E73,$0E74,$0E74,$0E74,$0E74
	dw $0E74,$FFFF,$FFFE,DATA_80A27A,$0E00,$0E70,$0E71,$0E72
	dw $0E73,$0E74,$0E74,$0E74,$0E74,$0E74,$FFFF,$FFFE
	dw DATA_80A27A,$0E75,$0E76,$0E77,$0E78,$0E78,$0E78,$0E78
	dw $0E78,$FFFF,$FFFE,DATA_80A27A,$0E00,$0E75,$0E76,$0E77
	dw $0E78,$0E78,$0E78,$0E78,$0E78,$FFFF,$FFFE,DATA_80A27A
	dw $0E08,$0E00,$0E75,$0E76,$0E77,$0E78,$0E78,$0E78
	dw $0E78,$0E78,$FFFF,$FFFE,DATA_80A27A,$0E10,$0E08,$0E00
	dw $0E75,$0E76,$0E77,$0E78,$0E78,$0E78,$0E78,$0E78
	dw $FFFF,$FFFE,DATA_80A27A,$0E18,$0E10,$0E08,$0E00,$0E75
	dw $0E76,$0E77,$0E78,$0E78,$0E78,$0E78,$0E78,$FFFF
	dw $FFFE,DATA_80A27A,$0E30,$0E38,$0E00,$0E75,$0E76,$0E77
	dw $0E78,$0E78,$0E78,$0E78,$0E78,$FFFF,$FFFE,DATA_80A27A
	dw $0E38,$0E00,$0E75,$0E76,$0E77,$0E78,$0E78,$0E78
	dw $0E78,$0E78,$FFFF,$FFFE,DATA_80A27A,$0E00,$0E75,$0E76
	dw $0E77,$0E78,$0E78,$0E78,$0E78,$0E78,$FFFF,$FFFE
	dw DATA_80A33A,$0E83,$0E84,$0E83,$0E84,$0E83,$0E84,DATA_80A27A
	dw $FFFE,DATA_80A33A,$0E83,$0E84,$0E83,DATA_80A33A,$0E85,$0E86
	dw $0E87,$0E88,$0E89,$0E8A,$0E8B,$0E8C,$0E8C,DATA_80A27A
	dw $FFFF,$FFFE,$0E9D,$0E9E,$0E9F,$0EA0,$0EA1,$0EA2
	dw $0EA2,$FFFF,$FFFE,$4E9D,$4E9E,$4E9F,$4EA0,$4EA1
	dw $4EA2,$4EA2,$FFFF,$FFFE,DATA_80A27A,$0E8D,$0E8D,$0E8E
	dw $0E8E,$FFFE,DATA_80A27A,$0E8F,$0E8F,$0E90,$0E90,$FFFE
	dw DATA_80A27A,$0E91,$0E91,$0E92,$0E92,$FFFE,DATA_80A27A,$0E93
	dw $0E93,$0E94,$0E94,$FFFE,DATA_80A27A,$0E95,$0E95,$0E96
	dw $0E96,$FFFE,DATA_80A27A,$0E97,$0E97,$0E98,$0E98,$FFFE
	dw DATA_80A27A,$0E99,$0E99,$0E9A,$0E9A,$FFFE,DATA_80A27A,$0E9B
	dw $0E9B,$0E9C,$0E9C,$FFFE,$0E79,$0E7A,$FFFF,$FFFE
	dw $0E74,$FFFF,$FFFE

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

CODE_80AF31:
	LDA.w $037D
	BNE.b CODE_80AF3B
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BNE.b CODE_80AF3F
CODE_80AF3B:
	JMP.w CODE_80B1E8

CODE_80AF3E:
	RTS

CODE_80AF3F:
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	TAX
	CMP.w #!Define_JP_WeaponID_Shotgun
	BNE.b CODE_80AF5D
	LDA.w $0AF1
	AND.w #$0080
	BNE.b CODE_80AF6C
	DEC.w $0B1F
	BNE.b CODE_80AF3E
	LDA.w #$0008
	STA.w $0B1F
	BRA.b CODE_80AF72

CODE_80AF5D:
	LDA.w $0AF1
	AND.w #$0080
	BEQ.b CODE_80AF3E
	CPX.w #$0002
	BEQ.b CODE_80AF8A
	BRA.b CODE_80AF72

CODE_80AF6C:
	LDA.w #$0010
	STA.w $0B1F
CODE_80AF72:
	LDY.w #$03D2
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80AF99					; Note: !Define_JP_ExteriorSpriteID00_None
	LDY.w #$03D4
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80AF99
	LDY.w #$03D6
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80AF99
CODE_80AF8A:
	LDY.w #$03D8
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80AF99
	LDA.w #$00B4
	STA.w $0B1F
	RTS

CODE_80AF99:
	DEC.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.l DATA_80B282,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.l DATA_80B282+$02,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	TXA
	ASL
	ASL
	ASL
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LDA.w #$0002
	STA.w $7E380C,y
	LDA.w #$0000
	STA.w $7E3FE0,y
	STA.w $7E8654,y
	DEC
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Player_ZPosLo
	CLC
	ADC.w #$0018
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	STA.w $7E826A,y
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	TAX
	STA.w $7E6704,y
	LDA.l DATA_8199A4,x
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	LDA.l DATA_8199C2,x
	STA.w $7E3BF6,y
	LDA.l DATA_8199CC,x
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	LDA.l DATA_8199D6,x
	STA.w $7E5B46,y
	LDA.l DATA_8199AE,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	STA.w $7E47B4,y
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w $7E6ED8,y
	LDA.w #$0006
	STA.w $7E6AEE,y
	LDA.w #$282E
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	STA.w $0E05
	LDY.w #$03E6
	LDA.l DATA_8199EA,x
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

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

CODE_80B037:
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BNE.b CODE_80B03D
CODE_80B03C:
	RTS

CODE_80B03D:
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	CMP.w #!Define_JP_WeaponID_BolasSnareRifle
	BEQ.b CODE_80B048
	BRL.w CODE_80B130

CODE_80B048:
	LDA.w $7E340A
	ORA.w $7E340C
	ORA.w $7E340E
	BNE.b CODE_80B03C
	DEC.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.l DATA_80B282,x
	STA.w $7E2462
	STA.w $7E284C
	STA.w $7E2464
	STA.w $7E284E
	STA.w $7E2466
	STA.w $7E2850
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.l DATA_80B282+$02,x
	STA.w $7E2C36
	STA.w $7E3020
	STA.w $7E2C38
	STA.w $7E3022
	STA.w $7E2C3A
	STA.w $7E3024
	TXA
	ASL
	ASL
	ASL
	STA.w $7E5744
	STA.w $7E5746
	STA.w $7E5748
	STZ.w $7E479C
	LDA.w #$0055
	STA.w $7E479E
	LDA.w #$00AA
	STA.w $7E47A0
	STZ.w $7E43B2
	STZ.w $7E43B4
	STZ.w $7E43B6
	STZ.w $7E8A26
	STZ.w $7E8A28
	STZ.w $7E8A2A
	LDA.w #$0002
	STA.w $7E3BDE
	STA.w $7E3BE0
	STA.w $7E3BE2
	LDA.w #$0054
	STA.w $7E340A
	LDA.w #$0056
	STA.w $7E340C
	STA.w $7E340E
	LDA.w !RAM_JP_Exterior_Player_ZPosLo
	CLC
	ADC.w #$0018
	STA.w $7E535A
	STA.w $7E535C
	STA.w $7E535E
	STA.w $7E863C
	STA.w $7E863E
	STA.w $7E8640
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w $7E72AA
	STA.w $7E72AC
	STA.w $7E72AE
	LDA.w #$0A24
	STA.w $7E37F4
	STA.w $7E37F6
	STA.w $7E37F8
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	STA.w $7E6AD6
	STA.w $7E6AD8
	STA.w $7E6ADA
	LDA.w #$0003
	STA.w $03F6
	LDA.w #$0040
	STA.w $02A5
	STA.w $0E05
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_FireBolasSnareRifle
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

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

CODE_80B130:
	CMP.w #$0006
	BEQ.b CODE_80B14D
	LDY.w #$03D2
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80B156				; Note: !Define_JP_ExteriorSpriteID00_None
	LDY.w #$03D4
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80B156
	LDY.w #$03D6
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80B156
CODE_80B14D:
	LDY.w #$03D8
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80B156
	RTS

CODE_80B156:
	DEC.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.l DATA_80B282,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.l DATA_80B282+$02,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	TXA
	ASL
	ASL
	ASL
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LDA.w #$0002
	STA.w $7E380C,y
	LDA.w #$0000
	STA.w $7E3FE0,y
	STA.w $7E8654,y
	STA.w $7E6AEE,y
	DEC
	STA.w $7E76AC,y
	LDA.w !RAM_JP_Exterior_Player_ZPosLo
	CLC
	ADC.w #$0018
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	STA.w $7E826A,y
	STA.w $0E05
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	TAX
	STA.w $7E6704,y
	LDA.l DATA_8199A4,x
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	LDA.l DATA_8199C2,x
	STA.w $7E3BF6,y
	LDA.l DATA_8199CC,x
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	LDA.l DATA_8199D6,x
	STA.w $7E5B46,y
	LDA.l DATA_8199AE,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w $7E6ED8,y
	STZ.w $0399
	LDY.w #$03E6
	LDA.l DATA_8199EA,x
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80B1E7:
	RTS

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

CODE_80B1E8:
	LDA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	BEQ.b CODE_80B1E7
	LDA.w $7E340A
	CMP.w #$0042
	BEQ.b CODE_80B21E
	ORA.w $7E340C
	ORA.w $7E340E
	BNE.b CODE_80B1E7
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_FireCattleProd
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #$FFFF
	STA.w $7E37F4
	STA.w $7E37F6
	STA.w $7E37F8
	STA.w $7E7A7E
	STA.w $7E7A80
	STA.w $7E7A82
	BRA.b CODE_80B21E

CODE_80B21E:
	LDA.w #$0042
	STA.w $7E340A
	LDA.w #$0044
	STA.w $7E340C
	STA.w $7E340E
	LDA.w #$0002
	STA.w $7E3BDE
	STA.w $7E3BE0
	STA.w $7E3BE2
	LDA.w !RAM_JP_Exterior_Player_ZPosLo
	CLC
	ADC.w #$0018
	STA.w $7E535A
	STA.w $7E535C
	STA.w $7E535E
	STA.w $7E863C
	STA.w $7E863E
	STA.w $7E8640
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w $7E72AA
	STA.w $7E72AC
	STA.w $7E72AE
	LDA.w #$000A
	STA.w $7E6AD6
	STA.w $7E6AD8
	STA.w $7E6ADA
	LDA.w #$0003
	STA.w $7E3FC8
	STA.w $7E3FCA
	STA.w $7E3FCC
	LDA.w $049D
	AND.w #$0007
	BNE.b CODE_80B281
	DEC.w !RAM_JP_Global_Payer_CattleProdAmmoLo
CODE_80B281:
	RTS

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

DATA_80B282:
	dw $0010,$0016,$0014,$001E,$0016,$0024,$000E,$002A
	dw $0003,$0028,$FFFC,$0024,$FFFA,$001C,$0002,$001A
	dw $0000,$0020,$0040,$0060,$0080,$00A0,$00C0,$00E0

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

CODE_80B2B2:
	LDA.w $0AEF
	AND.w #$0080
	BEQ.b CODE_80B2C9
	JSR.w CODE_80AF31
CODE_80B2BC:
	LDA.w $037D
	BNE.b CODE_80B2DE
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BNE.b CODE_80B2C9
	BRA.b CODE_80B2DE

CODE_80B2C9:
	REP.b #$30
	LDA.w $049D
	AND.w #$000F
	BNE.b CODE_80B2DE
	LDA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	CMP.w #$001F
	BCS.b CODE_80B2DE
	INC.w !RAM_JP_Global_Payer_CattleProdAmmoLo
CODE_80B2DE:
	LDA.w $0AF1
	AND.w #$4000
	BEQ.b CODE_80B2E9
	JSR.w CODE_80B037
CODE_80B2E9:
	RTS

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

DATA_80B2EA:
	dw $0000				; 00 - 
	dw CODE_80B346				; 02 - Unused?
	dw CODE_80C56B				; 04 - Compsognathus
	dw CODE_80C844				; 06 - Gallimimus
	dw CODE_80C9A3				; 08 - Big Gallimimus
	dw CODE_80CE41				; 0A - Collectable Egg
	dw CODE_80C205				; 0C - Primary Weapon Pickup (shotgun/rocket launcher/tranquilizer gun)
	dw CODE_80C270				; 0E - Secondary Weapon Pickup (bolas snare rifle/gas grenade launcher)
	dw CODE_80C2D8				; 10 - ID Card/First Aid/Extra Life
	dw CODE_80D5F6				; 12 - Velociraptor
	dw CODE_80DBD0				; 14 - Stunned Velociraptor
	dw CODE_80BE4A				; 16 - Tyrannosaurus Rex
	dw CODE_80C063				; 18 - Triceratops
	dw CODE_80CADD				; 1A - Pachycephalosaurus
	dw CODE_80E799				; 1C - Dilophosaur
	dw CODE_80CE71				; 1E - Dragonfly
	dw CODE_80CFD7				; 20 - Big Boulder
	dw CODE_80D183				; 22 - Boulder
	dw CODE_80C42E				; 24 - Bridge Rotating Mechanism
	dw CODE_80C4B6				; 26 - Horizontal Bridge
	dw CODE_80C51B				; 28 - Vertical Bridge
	dw CODE_80C32F				; 2A - Gate Rotating Mechanism
	dw CODE_80C3F2				; 2C - Electric Gate
	dw CODE_80B37E				; 2E - End Game Trigger
	dw CODE_80CD8E				; 30 - Dead Pachycephalosaurus
	dw CODE_80CDAB				; 32 - Dead Dilophosaur
	dw CODE_80CD6E				; 34 - Dying Velociraptor
	dw CODE_80CDE8				; 36 - Dead Velociraptor
	dw CODE_80CDC8				; 38 - Dead Gallimimus
	dw CODE_80DC52				; 3A - Unused?
	dw CODE_80DC9E				; 3C - Unused?
	dw CODE_80C82D				; 3E - Killed Enemy Smoke Puff
	dw CODE_80C837				; 40 - Exploding Gallimimus
	dw CODE_80B82D				; 42 - Cattle Prod?
	dw CODE_80B8BF				; 44 - Cattle Prod?
	dw CODE_80B698				; 46 - Gas Grenade Smoke Trail
	dw CODE_80B6A8				; 48 - Gas Grenade Smoke Explosion
	dw CODE_80B37D				; 4A - ???
	dw CODE_80B490				; 4C - Shotgun Shot
	dw CODE_80B4B6				; 4E - Rocket Launcher Shot
	dw CODE_80B4E2				; 50 - Tranquilizer Shot
	dw CODE_80B556				; 52 - Gas Grenade Shot
	dw CODE_80B741				; 54 - Initial Bolas Snare Rifle Shot
	dw CODE_80B724				; 56 - Bolas Snare Rifle Shot
	dw CODE_80E6B2				; 58 - Dilophosaur Spit
	dw CODE_80B3A1				; 5A - Main Gate Flames

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

CODE_80B346:
	TYX
	LDA.w #$0004
	STA.b $72
	LDA.w #DATA_80A23A
	STA.b $70
	LDA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

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

JP_ProcessExteriorSprites:
.Main:
;$80B358
	JSR.w CODE_80F33C
	REP.b #$30
	LDX.w $09ED
	BEQ.b CODE_80B37C
CODE_80B362:
	LDY.b $00,x
	CPY.w #$FFFF
	BEQ.b CODE_80B37C
	PHX
	LDX.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80B377					; Note: !Define_JP_ExteriorSpriteID00_None
	PHY
	JSR.w (DATA_80B2EA,x)
	PLY
	JSR.w CODE_80A19D
CODE_80B377:
	PLX
	INX
	INX
	BRA.b CODE_80B362

CODE_80B37C:
	RTL

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

CODE_80B37D:
	RTS

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

CODE_80B37E:
	TYX
	JSR.w CODE_80EFB8
	BCC.b CODE_80B3A0
	LDA.w !RAM_JP_Global_MainlandContactedFlagLo
	BEQ.b CODE_80B3A0
	LDA.w !RAM_JP_Exterior_AllEggsCollectedFlagLo
	BNE.b CODE_80B39A
	LDA.w $06C5
	BNE.b CODE_80B399
	LDA.w #$FFFF
	STA.w !RAM_JP_Global_Player_PickedUpEggFlagLo
CODE_80B399:
	RTS

CODE_80B39A:
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
CODE_80B3A0:
	RTS

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

CODE_80B3A1:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_SubXPosLo,x
	CLC
	ADC.w $7E43CA,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	CLC
	ADC.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.b $68
	BNE.b CODE_80B3D0
	JSL.l CODE_819D85
	LDA.w $0B2F
	XBA
	AND.w #$0003
	CMP.w #$0003
	BNE.b CODE_80B3CD
	LDA.w #$0001
CODE_80B3CD:
	STA.w $7E47B4,x
CODE_80B3D0:
	LDA.w $7E47B4,x
	CLC
	ADC.w #$0822
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

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

CODE_80B3DB:
	DEC.w $7E3BF6,x
	BNE.b CODE_80B3E4
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80B3E4:
	LDX.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosHi,y
	STA.w !RAM_JP_Exterior_Sprites_SubXPosHi,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosHi,y
	STA.w !RAM_JP_Exterior_Sprites_SubYPosHi,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	TYX
	RTS

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

; Note: Routine that updates exterior sprite position.

CODE_80B437:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	ASL
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosHi,y
	STA.w !RAM_JP_Exterior_Sprites_SubXPosHi,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosHi,y
	STA.w !RAM_JP_Exterior_Sprites_SubYPosHi,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	TYX
	RTS

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

CODE_80B490:
	TYX
	LDA.w $7E8654,x
	BPL.b CODE_80B49A
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80B49A:
	DEC.w $7E6AEE,x
	BPL.b CODE_80B4A5
	LDA.w $7E47B4,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
CODE_80B4A5:
	JSR.w CODE_80B3E4
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0006
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	JMP.w CODE_80C7E5

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

CODE_80B4B6:
	TYX
	LDA.w $7E8654,x
	BPL.b CODE_80B4C0
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80B4C0:
	DEC.w $7E6AEE,x
	BPL.b CODE_80B4CB
	LDA.w $7E47B4,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
CODE_80B4CB:
	JSR.w CODE_80B3E4
	LDA.w #$0003
	JSR.w CODE_80B508
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0006
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	JMP.w CODE_80C7E5

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

CODE_80B4E2:
	TYX
	LDA.w $7E8654,x
	BPL.b CODE_80B4EC
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80B4EC:
	DEC.w $7E6AEE,x
	BPL.b CODE_80B4F7
	LDA.w $7E47B4,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
CODE_80B4F7:
	JSR.w CODE_80B3E4
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0006
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	JMP.w CODE_80C7E5

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

CODE_80B508:
	AND.w $049D
	BNE.b CODE_80B555
	LDY.w #$03E4
	LDA.w $7E341C
	BEQ.b CODE_80B525
	LDY.w #$03E2
	LDA.w $7E341A
	BEQ.b CODE_80B525
	LDY.w #$03E0
	LDA.w $7E3418
	BNE.b CODE_80B555
CODE_80B525:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	LDA.w $7E6ED8,x
	STA.w $7E6ED8,y
	LDA.w #$0000
	STA.w $7E380C,y
	LDA.w #$000C
	STA.w $7E3BF6,y
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	LDA.w #!Define_JP_ExteriorSpriteID46_GasGrenadeSmokeTrail
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
CODE_80B555:
	RTS

CODE_80B556:
	TYX
	LDA.w $0399
	BNE.b CODE_80B58E
	JSR.w CODE_80B3DB
	TYX
	LDA.w $7E5B46,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w $7E826A,x
	BEQ.b CODE_80B58E
	BMI.b CODE_80B58E
	INC.w $7E6AEE,x
	LDA.w $7E6AEE,x
	AND.w #$0007
	BNE.b CODE_80B57F
	DEC.w $7E5B46,x
CODE_80B57F:
	LDY.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	JSR.w CODE_80C7E5
	LDA.w #$0003
	JMP.w CODE_80B508

CODE_80B58E:
	STZ.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	INC.w $7E3FE0,x
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	SBC.w #$0008
	STA.w $7E2474
	STA.w $7E246E
	SBC.w #$0010
	STA.w $7E246C
	STA.w $7E246A
	ADC.w #$0020
	STA.w $7E2472
	STA.w $7E2470
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w $7E2C44
	STA.w $7E2C40
	SBC.w #$0018
	STA.w $7E2C46
	STA.w $7E2C3E
	SBC.w #$0008
	STA.w $7E2C48
	ADC.w #$0028
	STA.w $7E2C42
	LDA.w $7E6ED8,x
	STA.w $7E72BC
	STA.w $7E72BA
	STA.w $7E72B8
	STA.w $7E72B6
	STA.w $7E72B4
	STA.w $7E72B2
	STZ.w $7E536C
	STZ.w $7E536A
	STZ.w $7E5368
	STZ.w $7E5366
	STZ.w $7E5364
	STZ.w $7E5362
	LDA.w #$0040
	STA.w $7E3FDA
	STA.w $7E3FD8
	STA.w $7E3FD6
	STA.w $7E3FD4
	STA.w $7E3FD2
	STA.w $7E3FD0
	LDA.w #$0006
	STA.w $7E3BF0
	STA.w $7E3BEE
	STA.w $7E3BEC
	STA.w $7E3BEA
	STA.w $7E3BE8
	STA.w $7E3BE6
	LDA.w #$0800
	STA.w $7E43C4
	STA.w $7E43C2
	STA.w $7E43C0
	STA.w $7E43BE
	STA.w $7E43BC
	STA.w $7E43BA
	LDA.w #$FFFF
	STA.w $7E3806
	STA.w $7E3804
	STA.w $7E3802
	STA.w $7E3800
	STA.w $7E37FE
	STA.w $7E37FC
	STZ.w $7E5756
	LDA.w #$002C
	STA.w $7E5754
	LDA.w #$0054
	STA.w $7E5752
	LDA.w #$0080
	STA.w $7E5750
	LDA.w #$00AC
	STA.w $7E574E
	LDA.w #$00D4
	STA.w $7E574C
	LDA.w #$0048
	STA.w $7E341C
	STA.w $7E341A
	STA.w $7E3418
	STA.w $7E3416
	STA.w $7E3414
	STA.w $7E3412
	LDA.w #$0000
	STA.w $03C6
	STA.b $9C
	STZ.w $03C8
	TXY
	LDA.w #!Define_JP_SoundID_ShotHitsWall
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

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

CODE_80B698:
	TYX
	LDA.w #$0800
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	DEC.w $7E3BF6,x
	BNE.b CODE_80B6A7
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
CODE_80B6A7:
	RTS

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

CODE_80B6A8:
	TYX
	LDA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w #$0002
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	JSR.w CODE_80B3DB
	PHX
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LSR
	LSR
	LSR
	LSR
	AND.w #$000E
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_80B6EE,x
	PHA
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80B6FE,x
	TAY
	PLA
	PLX
	JSL.l CODE_80A147
	BPL.b CODE_80B70E
	RTS

CODE_80B6DF:
	AND.w #$7800
	CMP.w #$6800
	BCS.b CODE_80B723
	CMP.w $7E6ED8,x
	BCS.b CODE_80B723
	BRA.b CODE_80B71A

DATA_80B6EE:
	dw $0010,$0018,$0018,$0018,$0010,$0008,$0008,$0008

DATA_80B6FE:
	dw $0008,$0008,$0008,$0018,$0018,$0018,$0008,$0008

CODE_80B70E:
	CMP.w #$6800
	BCS.b CODE_80B723
	CMP.w $7E6ED8,x
	BCC.b CODE_80B723
	BEQ.b CODE_80B723
CODE_80B71A:
	LDA.w #$FFFF
	STA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
CODE_80B723:
	RTS

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

CODE_80B724:
	TYX
	LDA.w $7E340A
	CLC
	ADC.w $7E340C
	ADC.w $7E340E
	CMP.w #$0100
	BNE.b CODE_80B737
	BRL.w CODE_80B7CB

CODE_80B737:
	STZ.w $7E340A
	STZ.w $7E340C
	STZ.w $7E340E
	RTS

CODE_80B741:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80B737
	LDA.w $7E340A
	CLC
	ADC.w $7E340C
	ADC.w $7E340E
	CMP.w #$0100
	BNE.b CODE_80B737
	LDX.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	SEP.b #$20
	LDA.b #$0C
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w $02A7
	STA.w $02A7
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	STA.w $7E284E
	STA.w $7E2850
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w $02A8
	STA.w $02A8
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	STA.w $7E3022
	STA.w $7E3024
	DEC.w $02A5
	BNE.b CODE_80B7BB
	BRL.w CODE_80B737

CODE_80B7BB:
	LDA.w $02A5
	AND.w #$0007
	BNE.b CODE_80B7CA
	LDA.w #!Define_JP_SoundID_FlyingBolasSnareRifleShot
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80B7CA:
	TYX
CODE_80B7CB:
	LDA.w $7E43CA,x
	CLC
	ADC.w #$000A
	AND.w #$00FF
	STA.w $7E43CA,x
	LDA.w $7E3FE0,x
	CMP.w #$0040
	BCS.b CODE_80B7E7
	CLC
	ADC.w #$0002
	STA.w $7E3FE0,x
CODE_80B7E7:
	LDX.w $7E43CA,y
	SEP.b #$20
	LDA.w $7E3FE0,y
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	TYX
	LDY.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_SubXPosLo,x
	JMP.w CODE_80C756

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

CODE_80B82D:
	TYX
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BPL.b CODE_80B847
	STZ.w $7E340A
	STZ.w $7E340C
	STZ.w $7E340E
	LDA.w #!Define_JP_SoundCommand_Unknown08
	LDY.w #$0000
	JSL.l CODE_839B59
	RTS

CODE_80B847:
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	CMP.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	BEQ.b CODE_80B85B
	LDA.w #$FFFF
	STA.w $7E76AC,x
	STA.w $7E76AE,x
	STA.w $7E76B0,x
CODE_80B85B:
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.l DATA_80B905,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	ADC.l DATA_80B945,x
	STA.w $7E2092,y
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	ADC.l DATA_80B985,x
	STA.w $7E2094,y
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.l DATA_80B905+$02,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	ADC.l DATA_80B945+$02,x
	STA.w $7E2866,y
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	ADC.l DATA_80B985+$02,x
	STA.w $7E2868,y
	LDA.w $0B2F
	BPL.b CODE_80B8AA
	INX
	INX
CODE_80B8AA:
	LDA.l DATA_80B905+$04,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	LDA.l DATA_80B945+$04,x
	STA.w $7E3424,y
	LDA.l DATA_80B985+$04,x
	STA.w $7E3426,y
CODE_80B8BF:
	TYX
	DEC.w $7E3BF6,x
	BEQ.b CODE_80B8F9
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$0004
	JSL.l CODE_80A147
	BMI.b CODE_80B8F8
	CMP.w #$6800
	BCS.b CODE_80B8F8
	CMP.w #$1800
	BEQ.b CODE_80B8F8
	CMP.w $7E6ED8,x
	BCC.b CODE_80B8F8
	BEQ.b CODE_80B8F8
	CPX.w #$03D2
	BNE.b CODE_80B8EE
	INX
	INX
CODE_80B8EE:
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	INX
	INX
	CPX.w #$03D8
	BNE.b CODE_80B8EE
CODE_80B8F8:
	RTS

CODE_80B8F9:
	LDA.w #!Define_JP_SoundCommand_Unknown08
	LDY.w #$0000
	JSL.l CODE_839B59
	BRA.b CODE_80B8EE

DATA_80B905:
	dw $0010,$000F,$082F,$0832,$001A,$001A,$0835,$0838
	dw $001C,$0024,$083B,$083E,$0014,$0031,$0841,$0844
	dw $0002,$002F,$0847,$084A,$FFF6,$0029,$484D,$4850
	dw $FFF4,$001D,$4853,$4856,$FFFC,$0014,$4859,$485C

DATA_80B945:
	dw $0010,$0000,$0830,$0833,$0024,$0010,$0836,$0839
	dw $002B,$0024,$083C,$083F,$001E,$003B,$0842,$0845
	dw $0002,$003E,$0848,$084B,$FFEC,$0033,$484E,$4851
	dw $FFE5,$001D,$4854,$4857,$FFF2,$000A,$485A,$485D

DATA_80B985:
	dw $0010,$FFF1,$0831,$0834,$002F,$0005,$0837,$083A
	dw $003A,$0024,$083D,$0840,$0029,$0046,$0843,$0846
	dw $0002,$004D,$0849,$084C,$FFE1,$003E,$484F,$4852
	dw $FFD6,$001D,$4855,$4858,$FFE7,$FFFF,$485B,$485E

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

DATA_80B9C5:
	dw $0000,$FFB8,$001E,$4004,$6000,$3800,$0000,$0400
	dw $0040,$0000,$FFF8,$000A,$1010,$0000,$3800,$3E00
	dw $1000,$0010,$0060,$FFB8,$0000,$4004,$0000,$F800
	dw $3CFF,$1000,$0010,$0000,$FFB8,$801E,$1010,$0000
	dw $6000,$3800,$1E00,$0400,$0040,$FFA8,$0038,$0000
	dw $4004,$0000,$F800,$1AFF,$1000,$0010,$0060,$FFB8
	dw $002E,$1010,$A800,$B8FF,$00FF,$0400,$0040,$0000
	dw $FFF8,$003C,$1010,$6000,$3800,$1E00,$1080,$0010
	dw $0041,$FFA8,$0038,$001E,$4004,$0000,$B800,$00FF
	dw $0400,$0040,$0000,$FFF8,$002A,$1010,$A800,$B8FF
	dw $1EFF,$1000,$0010,$0000,$0038,$0000,$4004,$0000
	dw $F800,$3CFF,$1000,$0010,$FFA8,$0038,$801E,$1010
	dw $8200,$C000,$00FF,$0000,$8000,$0002,$0040,$0000
	dw $0000,$8002,$C000,$40FF,$0000,$0400,$0040,$0040
	dw $0040,$0000,$8002,$C000,$00FF,$0000,$0180,$0100
	dw $00C3,$FFA0,$FF98,$0000,$4004,$9800,$A8FF,$00FF
	dw $0400,$0040,$FFB0,$FFA0,$0000,$4004,$A000,$C0FF
	dw $00FF,$0400,$0040,$FFD0,$FFA8,$0000,$4004,$A800
	dw $E0FF,$00FF,$0400,$0040,$0000,$FFB8,$0000,$4004
	dw $B000,$10FF,$0000,$0400,$0040,$0040,$FFD0,$0000
	dw $4004,$B800,$50FF,$0000,$0400,$0040,$0038,$0010
	dw $0000,$4004,$F800,$50FF,$0000,$0400,$0040,$0040
	dw $0030,$0000,$4004,$2000,$5800,$0000,$0400,$0040
	dw $0048,$0048,$0000,$4004,$3800,$6000,$0000,$0480
	dw $0040,$00F2,$0030,$FFC0,$0000,$2008,$2800,$B000
	dw $00FF,$0800,$0020,$0030,$FFA0,$0000,$2008,$4000
	dw $9800,$00FF,$0800,$0020,$0058,$FFA0,$0000,$2008
	dw $6800,$B800,$00FF,$0800,$0020,$0070,$FFD8,$0000
	dw $2008,$6800,$F800,$00FF,$0800,$0020,$0058,$0018
	dw $0000,$2008,$4000,$2800,$0000,$0800,$0020,$FFE8
	dw $0048,$0000,$4004,$D800,$50FF,$0000,$1000,$0010
	dw $FFD0,$0060,$0000,$2008,$D000,$70FF,$0000,$0880
	dw $0020,$0184,$0000,$0000,$0000,$1010,$0000,$1800
	dw $0000,$2000,$0008,$FFF0,$0008,$0000,$0440,$F800
	dw $F0FF,$00FF,$4000,$0004,$0008,$FFE8,$0000,$0440
	dw $1000,$0000,$0000,$4000,$0004,$0008,$0010,$0000
	dw $0440,$0000,$1800,$0000,$4080,$0004,$020D,$0000
	dw $0000,$0000,$1010,$F800,$F0FF,$00FF,$2000,$0008
	dw $0008,$FFE8,$0000,$0440,$1000,$0000,$0000,$4000
	dw $0004,$0008,$0010,$0000,$0440,$0000,$1800,$0000
	dw $4000,$0004,$FFF0,$0008,$0000,$0440,$F800,$F0FF
	dw $00FF,$4080,$0004,$0257,$0000,$0000,$0000,$1010
	dw $1000,$0000,$0000,$2000,$0008,$0008,$0010,$0000
	dw $0440,$0000,$1800,$0000,$4000,$0004,$FFF0,$0008
	dw $0000,$0440,$F800,$F0FF,$00FF,$4000,$0004,$0008
	dw $FFE8,$0000,$0440,$1000,$0000,$0000,$4080,$0004
	dw $02A1

CODE_80BCA7:
	TYX
	BRA.b CODE_80BCC6

CODE_80BCAA:
	TYX
	LDA.w #$0000
	STA.w $7E380C,x
	LDA.w #$2200
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	JSR.w CODE_80F084
	TXY
	BCC.b CODE_80BCC6
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDX.b $BE
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80BCC6:
	LDA.w $7E6AEE,x
	AND.w #$7FFF
	BEQ.b CODE_80BCD1
	BRL.w CODE_80BD84

CODE_80BCD1:
	LDA.w $7E6AEE,x
	BEQ.b CODE_80BCFD
	STZ.w $7E5F30,x
	STZ.w $7E631A,x
	STZ.w $7E6AEE,x
	LDX.w $7E3BF6,y
	LDA.l DATA_80B9C5,x
	XBA
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	LDA.l DATA_80B9C5+$02,x
	XBA
	STA.w $7E5B46,y
	TXA
	CLC
	ADC.w #$0009
	STA.w $7E3BF6,y
	BRL.w CODE_80BD9B

CODE_80BCFD:
	LDA.w $7E3FE0,y
	BEQ.b CODE_80BD07
	DEC
	STA.w $7E3FE0,y
	RTS

CODE_80BD07:
	LDX.w $7E3BF6,y
	LDA.l DATA_80B9C5+$07,x
	STA.w $7E6AEE,y
	LDA.l DATA_80B9C5,x
	SEC
	SBC.l DATA_80B9C5-$09,x
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_80B9C5+$06,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.w $7E5F30,y
	LDA.l DATA_80B9C5+$02,x
	SEC
	SBC.l DATA_80B9C5-$07,x
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_80B9C5+$06,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.w $7E631A,y
	LDA.w $7E3BF6,y
	CLC
	ADC.w #$0009
	STA.w $7E3BF6,y
	LDA.l DATA_80B9C5+$04,x
	BPL.b CODE_80BD80
	AND.w #$7FFF
	PHA
	LDA.l DATA_80B9C5+$09,x
	STA.w $7E3BF6,y
	LDA.w $7E6AEE,y
	ORA.w #$8000
	STA.w $7E6AEE,y
	PLA
CODE_80BD80:
	STA.w $7E3FE0,y
	RTS

CODE_80BD84:
	DEC.w $7E6AEE,x
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	CLC
	ADC.w $7E5F30,x
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	LDA.w $7E5B46,x
	CLC
	ADC.w $7E631A,x
	STA.w $7E5B46,x
CODE_80BD9B:
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	BMI.b CODE_80BDAD
	XBA
	AND.w #$00FF
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	BRA.b CODE_80BDB8

CODE_80BDAD:
	XBA
	ORA.w #$FF00
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
CODE_80BDB8:
	LDA.w $7E5B46,y
	BMI.b CODE_80BDC9
	XBA
	AND.w #$00FF
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	RTS

CODE_80BDC9:
	XBA
	ORA.w #$FF00
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	RTS

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

CODE_80BDD5:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	INC
	BRA.b CODE_80BDF3

CODE_80BDDC:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	INC
	INC
	BRA.b CODE_80BDF3

CODE_80BDE4:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	DEC
	BRA.b CODE_80BDF3

CODE_80BDEB:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	DEC
	DEC
	BRA.b CODE_80BDF3

CODE_80BDF3:
	AND.w #$00FF
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	LDA.w #$2000
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w #$0000
	STA.w $7E380C,x
	LDA.w $7E3BF6,y
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDX.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$31
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	LDX.w $7E3FE0,y
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDX.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$31
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	LDX.w $7E3FE0,y
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	RTS

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

CODE_80BE4A:
	TYX
	LDA.b $72
	BEQ.b CODE_80BE5B
	CMP.w #$0001
	BEQ.b CODE_80BE5B
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80BE5B:
	LDA.w #$0001
	STA.b $72
	LDA.w #DATA_80A21A
	STA.b $70
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CurrentState,x
	BNE.b CODE_80BEB9
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	TXY
	LDA.w #!Define_JP_SoundID_TyrannosaurusRexRoar+($80<<8)
	JSL.l CODE_839BA2
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	SEC
	SBC.w #$0020
	CMP.w !RAM_JP_Exterior_Player_YPosLo
	BCS.b CODE_80BEA1
	CLC
	ADC.w #$0090
	CMP.w !RAM_JP_Exterior_Player_YPosLo
	BCC.b CODE_80BEA1
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$00F8
	CMP.w !RAM_JP_Exterior_Player_XPosLo
	BCS.b CODE_80BEA1
	ADC.w #$0020
	CMP.w !RAM_JP_Exterior_Player_XPosLo
	BCS.b CODE_80BEA2
CODE_80BEA1:
	RTS

CODE_80BEA2:
	STZ.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_TyrannosaurusRexRoar&$007F
	JSL.l CODE_839BA2
	INC.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CurrentState,x
	LDA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_ChaseTimer,x
	RTS

CODE_80BEB9:
	CMP.w #$0001
	BEQ.b CODE_80BEC1
	BRL.w CODE_80BF92

CODE_80BEC1:
	DEC.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_ChaseTimer,x
	BNE.b CODE_80BECA
	INC.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CurrentState,x
	RTS

CODE_80BECA:
	JSR.w CODE_80F2C8
	BCC.b CODE_80BEE7
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80BEE7
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BNE.b CODE_80BEE4
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_KnockbackTimer,x
	ADC.w #!Define_JP_Exterior_Sprite16_TyrannosaurusRex_TranquilizerKnockback
	STA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_KnockbackTimer,x
CODE_80BEE4:
	JSR.w CODE_80C7BA
CODE_80BEE7:
	TXY
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_KnockbackTimer,x
	BEQ.b CODE_80BEFC
	DEC.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_KnockbackTimer,x
	DEC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	DEC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80BEF9
	RTS

CODE_80BEF9:
	BRL.w CODE_80BF9C

CODE_80BEFC:
	LDA.w $7E5F30,x
	CLC
	ADC.w #$F311
	STA.w $7E5F30,x
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	ADC.w #$0001
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$0068
	CMP.w !RAM_JP_Exterior_Player_XPosLo
	BCC.b CODE_80BF2E
	LDA.w #$0003
	STA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CurrentState,x
	STZ.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	STZ.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CanRoarWhenChasingFlag,x
	LDA.w #$0003
	STA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_EatAnimationTimer,x
	RTS

CODE_80BF2E:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0026
	CMP.w !RAM_JP_Exterior_Player_YPosLo
	BEQ.b CODE_80BF44
	BCC.b CODE_80BF41
	DEC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	BRA.b CODE_80BF44

CODE_80BF41:
	INC.w !RAM_JP_Exterior_Sprites_YPosLo,x
CODE_80BF44:
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CanRoarWhenChasingFlag,x
	BNE.b CODE_80BF5C
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_ChaseTimer,x
	AND.w #$007F
	BNE.b CODE_80BF5C
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_TyrannosaurusRexRoar&$007F
	JSL.l CODE_839BA2
	TXY
CODE_80BF5C:
	LDA.b $68
	CMP.w #$0003
	BNE.b CODE_80BF86
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	INC
	CMP.w #$000C
	BCC.b CODE_80BF6F
	LDA.w #$0000
CODE_80BF6F:
	STA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	BEQ.b CODE_80BF79
	CMP.w #$0006
	BNE.b CODE_80BF86
CODE_80BF79:
	LDA.w #$0002
	STA.w $03CA
	LDA.w #!Define_JP_SoundID_HeavyFootstep
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80BF86:
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	LSR
	CLC
	ADC.w #$0000
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
CODE_80BF91:
	RTS

CODE_80BF92:
	CMP.w #$0002
	BNE.b CODE_80BFC6
	LDA.w $7E8654,x
	BPL.b CODE_80BFAC
CODE_80BF9C:
	LDA.w !RAM_JP_Exterior_Sprites_SubXPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STZ.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CurrentState,x
	RTS

CODE_80BFAC:
	DEC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	DEC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80BF9C
	LDA.b $68
	CMP.w #$0003
	BNE.b CODE_80BF91
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	DEC
	BPL.b CODE_80BF6F
	LDA.w #$000B
	BRA.b CODE_80BF6F

CODE_80BFC6:
	LDA.w #$FFFF
	STA.w $0E0D
	STZ.w $7E4B9A
	STZ.w !RAM_JP_Exterior_Player_ZPosLo
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	CMP.w #$0004
	BEQ.b CODE_80C044
	CLC
	ADC.w #$0006
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	ORA.w #$8000
	STA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	ASL
	TAX
	LDA.l DATA_80C04B,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.l DATA_80C053,x
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Player_YPosLo
	LDA.w !RAM_JP_Exterior_Player_AnimationFrameLo
	AND.w #$3000
	ORA.l DATA_80C05B,x
	STA.w !RAM_JP_Exterior_Player_AnimationFrameLo
	LDA.w #$FFFF
	STA.w $0E0D
	STZ.w $7E4B9A
	TYX
	INC.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_EatAnimationTimer,x
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_EatAnimationTimer,x
	AND.w #$000F
	CMP.w #$0003
	BNE.b CODE_80C043
	INC.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_CanRoarWhenChasingFlag,x
	BNE.b CODE_80C043
	LDA.w !RAM_JP_Exterior_Sprite16_TyrannosaurusRex_AnimationFrame,x
	CMP.w #$0001
	BNE.b CODE_80C043
	LDY.w #$03E6
	LDA.w #!Define_JP_SoundID_TyrannosaurusRexRoar&$007F			; Note: This is where !Define_JP_SoundID_BoneCrunch would have been used.
	JSL.l CODE_839BA2
CODE_80C043:
	RTS

CODE_80C044:
	LDA.w #$FFFF
	STA.w $0E0B
	RTS

DATA_80C04B:
	dw $0060,$0050,$0050,$0050

DATA_80C053:
	dw $003B,$0038,$0040,$0033

DATA_80C05B:
	dw $0EA9,$0EAA,$0EAB,$0EAC

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

CODE_80C063:
	TYX
	LDA.w $7E5F30,x
	BEQ.b CODE_80C088
	DEC.w $7E5F30,x
CODE_80C06C:
	LDA.w #$0000
	STA.w $7E4B9E,y
	LDA.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	STA.w $7E76AC,y
	RTS

CODE_80C088:
	BIT.w $7E8654,x
	BMI.b CODE_80C06C
	LDA.b $72
	BEQ.b CODE_80C096
	CMP.w #$0003
	BNE.b CODE_80C06C
CODE_80C096:
	LDA.w #$0003
	STA.b $72
	LDA.w #DATA_80A25A
	STA.b $70
	LDA.w $7E4B9E,x
	BNE.b CODE_80C10F
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.w #$0018
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80C0CE
	CMP.w #$0058
	BCS.b CODE_80C0CE
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$00C0
	SEC
	SBC.w !RAM_JP_Exterior_Player_YPosLo
	BMI.b CODE_80C0CE
	CMP.w #$0020
	BCC.b CODE_80C0CF
CODE_80C0CE:
	RTS

CODE_80C0CF:
	INC.w $7E4B9E,x
	LDA.w $7E3FE0,x
	STA.w $7E3BF6,x
	RTS

CODE_80C0D9:
	LDA.w $049D
	AND.w #$0003
	BEQ.b CODE_80C0E4
	INC.w !RAM_JP_Exterior_Sprites_YPosLo,x
CODE_80C0E4:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LSR
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.w #$0004
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	TXY
CODE_80C0F5:
	CMP.w $7E826A,y
	BEQ.b CODE_80C10E
	STA.w $7E826A,y
	CMP.w #$0004
	BEQ.b CODE_80C107
	CMP.w #$0006
	BNE.b CODE_80C10E
CODE_80C107:
	LDA.w #!Define_JP_SoundID_HeavyFootstep
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80C10E:
	RTS

CODE_80C10F:
	CMP.w #$0001
	BNE.b CODE_80C0D9
	INC.w $7E6AEE,x
	LDA.w $7E6AEE,x
	LDX.w $7E3BF6,y
	CMP.l DATA_80C1B5,x
	BNE.b CODE_80C13F
	LDA.w #$0001
	STA.w $7E6AEE,y
	TXA
	CLC
	ADC.w #$0004
	STA.w $7E3BF6,y
	TAX
	LDA.l DATA_80C1B5,x
	BPL.b CODE_80C13F
	LDA.w #$01E0
	STA.w $7E5F30,y
	RTS

CODE_80C13F:
	LDA.l DATA_80C1B5+$02,x
	XBA
	ADC.w $7E631A,y
	STA.w $7E631A,y
	LDA.l DATA_80C1B5+$02,x
	XBA
	AND.w #$00FF
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LSR
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.w #$0004
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	JSR.w CODE_80C0F5
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CMP.w !RAM_JP_Exterior_Player_YPosLo
	BCS.b CODE_80C1B4
	CLC
	ADC.w #$0040
	CMP.w !RAM_JP_Exterior_Player_YPosLo
	BCC.b CODE_80C1B4
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.w #$0010
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	BMI.b CODE_80C1B4
	CMP.w #$0040
	BCS.b CODE_80C1B4
	LDX.w #$0310
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	INC
	AND.w #$0007
	CMP.w #$0003
	BCC.b CODE_80C19C
	LDX.w #$0308
CODE_80C19C:
	STX.w $7E4B9A
	LDA.w #$0007
	STA.w $0DF9
	LDA.w #$FFFF
	STA.w $0E0B
	STA.w $0E0D
	LDA.w #$0002
	STA.w $7E4B9E,y
CODE_80C1B4:
	RTS

DATA_80C1B5:
	dw $0020,$0230,$0040,$0200,$0048,$0190,$0050,$021C
	dw $005A,$0180,$FFFF,$FFFF,$0020,$0230,$005A,$0180
	dw $0040,$0200,$0048,$0190,$0046,$021C,$FFFF,$FFFF
	dw $002C,$0197,$0040,$0200,$0048,$0190,$005A,$0180
	dw $0046,$021C,$0040,$0200,$0028,$0180,$FFFF,$FFFF

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

CODE_80C205:
	TYX
	LDA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	JSR.w CODE_80EF16
	BCC.b CODE_80C24C
	LDA.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	CMP.w #$FFEC
	BNE.b CODE_80C24C
	STZ.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	LDA.w #!Define_JP_SoundID_PickupItem
	JSL.l JP_Exterior_BufferSoundEffect_Main
	STZ.w $037D
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_80C259
	PHA
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	CMP.w $7E43CA,x
	BEQ.b CODE_80C24D
	PHA
	LDA.w $0293
	PHA
	JSR.w CODE_80C25C
	TYX
	PLA
	STA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	PLA
	STA.w $7E43CA,x
	PLA
	STA.w $7E3BF6,x
CODE_80C24C:
	RTS

CODE_80C24D:
	PLA
	CLC
	ADC.w $7E3BF6,x
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80C259:
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
CODE_80C25C:
	LDA.w $7E3BF6,x
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w $7E3FE0,x
	STA.w $0293
	LDA.w $7E43CA,x
	JSL.l CODE_8199F4
	RTS

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

CODE_80C270:
	TYX
	LDA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	JSR.w CODE_80EF16
	BCC.b CODE_80C2B4
	LDA.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	CMP.w #$FFEC
	BNE.b CODE_80C2B4
	STZ.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	LDA.w #!Define_JP_SoundID_PickupItem
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BEQ.b CODE_80C2C1
	PHA
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	CMP.w $7E43CA,x
	BEQ.b CODE_80C2B5
	PHA
	LDA.w $029D
	PHA
	JSR.w CODE_80C2C4
	TYX
	PLA
	STA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	PLA
	STA.w $7E43CA,x
	PLA
	STA.w $7E3BF6,x
CODE_80C2B4:
	RTS

CODE_80C2B5:
	PLA
	CLC
	ADC.w $7E3BF6,x
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80C2C1:
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
CODE_80C2C4:
	LDA.w $7E3BF6,x
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w $7E3FE0,x
	STA.w $029D
	LDA.w $7E43CA,x
	JSL.l CODE_819A13
	RTS

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

CODE_80C2D8:
	TYX
	LDA.w $7E3FE0,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	JSR.w CODE_80EF16
	BCC.b CODE_80C307
	LDA.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	CMP.w #$FFEC
	BNE.b CODE_80C307
	STZ.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w $7E3FE0,x
	AND.w #$01FF
	CMP.w #$002A
	BEQ.b CODE_80C308
	CMP.w #$002C
	BEQ.b CODE_80C313
	CMP.w #$002B
	BEQ.b CODE_80C31E
CODE_80C307:
	RTS

CODE_80C308:
	INC.w !RAM_JP_Global_Player_CurrentLifeCountLo
	LDA.w #!Define_JP_SoundID_GetExtraLife
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

CODE_80C313:
	STZ.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #!Define_JP_SoundID_GetFirstAidKit
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

CODE_80C31E:
	LDA.w $7E43CA,x
	TAX
	INC.b $00,x			; Note: !RAM_JP_Global_Player_CollectedIDCardTable
	LDA.w #!Define_JP_SoundID_GetIDCard
	STA.w $0B57
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

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

CODE_80C32F:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80C33E
	LDA.b $6C
	BEQ.b CODE_80C346
	CMP.w #$0002
	BEQ.b CODE_80C346
CODE_80C33E:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	BRA.b CODE_80C384

CODE_80C346:
	LDA.w #$0002
	STA.b $6C
	JSR.w CODE_80EF3F
	BCC.b CODE_80C35C
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
CODE_80C35C:
	JSR.w CODE_80F0F7
	BCC.b CODE_80C384
	STX.b $4A
	LDY.b $BE
	LDA.w $7E43CA,x
	TAX
	LDA.b $00,x
	BEQ.b CODE_80C37F
	LDX.w $7E6704,y
	BMI.b CODE_80C37F
	LDA.l DATA_80C3E6,x
	LDX.b $4A
	CLC
	ADC.w $7E6AEE,x
	STA.w $7E6AEE,x
CODE_80C37F:
	JSR.w CODE_80C7BA
	LDX.b $4A
CODE_80C384:
	TXY
	LDA.w $7E6AEE,x
	BEQ.b CODE_80C3A4
	STZ.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	DEC.w $7E6AEE,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CMP.w $7E3FE0,x
	BEQ.b CODE_80C3A0
	INC.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	INC.w $7E47B4,x
	BRA.b CODE_80C3C3

CODE_80C3A0:
	STZ.w $7E6AEE,x
CODE_80C3A3:
	RTS

CODE_80C3A4:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	BEQ.b CODE_80C3A3
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	BPL.b CODE_80C3B2
	LDA.w #$0000
CODE_80C3B2:
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	DEC.w $7E47B4,x
	LDA.w $049D
	AND.w #$001F
	BNE.b CODE_80C3C3
	INC.w !RAM_JP_Exterior_Sprites_SpeedLo,x
CODE_80C3C3:
	LDA.w $7E47B4,x
	LSR
	LSR
	LSR
	AND.w #$0007
	CLC
	ADC.w $7E3BF6,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w $049D
	AND.w #$000F
	BNE.b CODE_80C3E5
	TXY
	INY
	INY
	LDA.w #!Define_JP_SoundID_MovingMechanism
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80C3E5:
	RTS

DATA_80C3E6:
	dw $0038,$01C0,$0000,$0000,$0000,$0001

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

CODE_80C3F2:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ORA.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDY.w $7E3FE0,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LSR
	LSR
	BIT.w $7E3BF6,x
	BPL.b CODE_80C40D
	EOR.w #$FFFF
	INC
CODE_80C40D:
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.w $0E13
	ADC.w #$0060
	STA.w $0E15
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0034
	STA.w $0E17
	ADC.w #$0008
	STA.w $0E19
	RTS

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

CODE_80C42E:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80C43D
	LDA.b $6C
	BEQ.b CODE_80C445
	CMP.w #$0002
	BEQ.b CODE_80C445
CODE_80C43D:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	BRA.b CODE_80C47B

CODE_80C445:
	LDA.w #$0002
	STA.b $6C
	JSR.w CODE_80EF3F
	BCC.b CODE_80C45B
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
CODE_80C45B:
	JSR.w CODE_80F0F7
	BCC.b CODE_80C47B
	STX.b $4A
	LDY.b $BE
	LDX.w $7E6704,y
	BMI.b CODE_80C476
	LDA.l DATA_80C3E6,x
	LDX.b $4A
	CLC
	ADC.w $7E6AEE,x
	STA.w $7E6AEE,x
CODE_80C476:
	JSR.w CODE_80C7BA
	LDX.b $4A
CODE_80C47B:
	TXY
	LDA.w $7E6AEE,x
	BEQ.b CODE_80C4B5
	DEC.w $7E6AEE,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CMP.w $7E3FE0,x
	BEQ.b CODE_80C4B2
	INC.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	LSR
	LSR
	LSR
	AND.w #$0007
	CLC
	ADC.w $7E3BF6,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w $049D
	AND.w #$0007
	BNE.b CODE_80C4B5
	TXY
	INY
	INY
	LDA.w #!Define_JP_SoundID_MovingMechanism
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

CODE_80C4B2:
	STZ.w $7E6AEE,x
CODE_80C4B5:
	RTS

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

CODE_80C4B6:
	TYX
	LDA.w #$FFFF
	STA.w $7E6ED8,x
	STZ.w $0E23
	STZ.w $0E25
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.b $34
	LDY.w $7E3FE0,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LSR
	LSR
	BIT.w $7E3BF6,x
	BPL.b CODE_80C4D9
	EOR.w #$FFFF
	INC
CODE_80C4D9:
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	ADC.w #$0008
	STA.w $0E1B
	ADC.w #$0050
	STA.w $0E1D
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w $0E1F
	ADC.w #$0040
	STA.w $0E21
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	SEC
	SBC.b $34
	STA.w $0E23
CODE_80C501:
	LDA.w $0E2F
	BEQ.b CODE_80C51A
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.w $0E23
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CLC
	ADC.w $0E25
	STA.w !RAM_JP_Exterior_Player_YPosLo
CODE_80C51A:
	RTS

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

CODE_80C51B:
	TYX
	LDA.w #$FFFF
	STA.w $7E6ED8,x
	STZ.w $0E23
	STZ.w $0E25
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.b $34
	LDY.w $7E3FE0,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LSR
	LSR
	BIT.w $7E3BF6,x
	BPL.b CODE_80C53E
	EOR.w #$FFFF
	INC
CODE_80C53E:
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0003
	STA.w $0E1F
	ADC.w #$0057
	STA.w $0E21
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	ADC.w #$0010
	STA.w $0E1B
	ADC.w #$0020
	STA.w $0E1D
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	SEC
	SBC.b $34
	STA.w $0E25
	BRA.b CODE_80C501

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

; Note: Compsognathus sprite code.

CODE_80C56B:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80C5C8
	LDA.w $049D
	AND.w #$0007
	BNE.b CODE_80C588
	LDA.w $0B2F
	CMP.w #$1000
	BCS.b CODE_80C588
	LDA.w #!Define_JP_SoundID_CompsognathusCry
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80C588:
	LDA.w #$000C
	STA.b $9E
	JSR.w CODE_80F372
	BCS.b CODE_80C5A6
	JSR.w CODE_80F084
	BCC.b CODE_80C5CF
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80C5CF
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BEQ.b CODE_80C5CF
	JSR.w CODE_80C7BA
CODE_80C5A6:
	LDA.w #$0000
	STA.w $7E380C,x
	LDA.w #$0009
	STA.w $7E6AEE,x
	LDA.w #!Define_JP_ExteriorSpriteID3E_KilledEnemySmokePuff
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #$0800
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w #!Define_JP_SoundID_ShotHitsWall
	JSL.l JP_Exterior_BufferSoundEffect_Main
	JMP.w CODE_80D5B9

CODE_80C5C8:
	LDA.w #$FFFF
	STA.w $7E76AC,x
CODE_80C5CE:
	RTS

CODE_80C5CF:
	TXY
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80C5E1
	JSR.w CODE_80EF12
	BCC.b CODE_80C5E1
	LDA.w #!Define_JP_Player_CompsognathusDamage
	JSR.w CODE_80AA49
	TYX
CODE_80C5E1:
	JSL.l CODE_819D85
	JSL.l CODE_819FAE
	TYX
	STA.b $34
	LDA.w $7E4B9E,x
	BNE.b CODE_80C5FC
	LDA.w $0B4F
	CMP.w #$4000
	BCS.b CODE_80C5CE
	INC.w $7E4B9E,x
CODE_80C5FC:
	BIT.w !RAM_JP_Exterior_Player_InAirFlagLo
	BMI.b CODE_80C617
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	SEC
	SBC.b $34
	BPL.b CODE_80C60D
	EOR.w #$FFFF
	INC
CODE_80C60D:
	CMP.w #$0004
	BNE.b CODE_80C63F
	LDA.w $7E43CA,x
	BNE.b CODE_80C62E
CODE_80C617:
	LDA.b $34
	CLC
	ADC.w #$0004
	AND.w #$0007
	STA.w $7E3FE0,x
	ASL
	CLC
	ADC.w $7E3FE0,x
	ADC.w #$0406
	STA.w $7E3BF6,x
CODE_80C62E:
	LDA.w #$0010
	STA.w $7E6AEE,x
	LDA.w #$0005
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	STA.w $7E43CA,x
	BRA.b CODE_80C673

CODE_80C63F:
	STZ.w $7E43CA,x
	LDA.w $7E6AEE,x
	BNE.b CODE_80C673
	LDA.b $34
	STA.w $7E3FE0,x
	ASL
	CLC
	ADC.w $7E3FE0,x
	ADC.w #$0406
	STA.w $7E3BF6,x
	LDA.w $0B2F
	AND.w #$001F
	ADC.w #$0018
	STA.w $7E6AEE,x
	LDA.w $0B31
	AND.w #$0003
	ADC.w #$0003
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	STZ.w $7E47B4,x
	RTS

CODE_80C673:
	TXY
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CMP.w $7E3FE0,x
	BEQ.b CODE_80C6AE
	LDY.b $68
	BNE.b CODE_80C6AD
	TAY
	SEC
	SBC.w $7E3FE0,x
	BPL.b CODE_80C68F
	CMP.w #$FFFC
	BCC.b CODE_80C697
	INY
	BRA.b CODE_80C698

CODE_80C68F:
	CMP.w #$0004
	BCC.b CODE_80C697
	INY
	BRA.b CODE_80C698

CODE_80C697:
	DEY
CODE_80C698:
	TYA
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ASL
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ADC.w #$0406
	STA.w $7E3BF6,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
CODE_80C6AD:
	RTS

CODE_80C6AE:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.b $34
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.b $36
	JSR.w CODE_80B437
	PHX
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_80C6EA,x
	PHA
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80C6FA,x
	TAY
	PLA
	PLX
	JSL.l CODE_80A147
	BPL.b CODE_80C70A
	CMP.w #$E800
	BCS.b CODE_80C70F
	AND.w #$7800
	CMP.w $7E6ED8,x
	BCS.b CODE_80C72E
	BRA.b CODE_80C70F

DATA_80C6EA:
	dw $0004,$0006,$0006,$0006,$0004,$FFFC,$FFFC,$FFFC

DATA_80C6FA:
	dw $0004,$0004,$000A,$000E,$000E,$000E,$000A,$0004

CODE_80C70A:
	CMP.w $7E6ED8,x
	BEQ.b CODE_80C72E
CODE_80C70F:
	LDA.b $34
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LDA.b $36
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.w $0B31
	AND.w #$0007
	STA.w $7E3FE0,x
	ASL
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ADC.w #$0406
	STA.w $7E3BF6,x
	RTS

CODE_80C72E:
	DEC.w $7E6AEE,x
	LDA.w $049D
	AND.w #$0003
	BNE.b CODE_80C743
	LDA.w $7E47B4,x
	INC
	AND.w #$0003
	STA.w $7E47B4,x
CODE_80C743:
	LDA.w $7E47B4,x
	CMP.w #$0003
	BNE.b CODE_80C74E
	LDA.w #$0001
CODE_80C74E:
	CLC
	ADC.w $7E3BF6,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

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

CODE_80C756:
	JSL.l CODE_80A147
	BMI.b CODE_80C789
	CMP.w #$6800
	BCS.b CODE_80C789
	CMP.w #$1800
	BEQ.b CODE_80C789
	CMP.w $7E6ED8,x
	BCC.b CODE_80C78A
	BNE.b CODE_80C7B2
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	BNE.b CODE_80C789
	LDA.w $7E826A,x
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
CODE_80C789:
	RTS

CODE_80C78A:
	LDA.w $7E6ED8,x
	CMP.w #$0800
	BEQ.b CODE_80C7B1
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	BEQ.b CODE_80C789
	STA.w $7E826A,x
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	STZ.w !RAM_JP_Exterior_Sprites_ZPosLo,x
CODE_80C7B1:
	RTS

CODE_80C7B2:
	TXY
	LDA.w #!Define_JP_SoundID_ShotHitsWall
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80C7BA:
	LDA.w $7E6704,y
	CMP.w #!Define_JP_WeaponID_CattleProd
	BEQ.b CODE_80C7E4
	CMP.w #!Define_JP_WeaponID_BolasSnareRifle
	BNE.b CODE_80C7CC
	DEC.w $03F6
	BPL.b CODE_80C7E4
CODE_80C7CC:
	LDA.w #$FFFF
	STA.w $7E6704,y
	LDA.w #$082D
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	LDA.w #$0009
	STA.w $7E6AEE,y
	LDA.w #!Define_JP_ExteriorSpriteID3E_KilledEnemySmokePuff
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
CODE_80C7E4:
	RTS

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

CODE_80C7E5:
	JSL.l CODE_80A147
	BMI.b CODE_80C80E
	CMP.w #$6800
	BCS.b CODE_80C80E
	CMP.w #$1800
	BEQ.b CODE_80C80E
	CMP.w $7E6ED8,x
	BCC.b CODE_80C80F
	BNE.b CODE_80C7B2
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	BNE.b CODE_80C80E
	LDA.w $7E826A,x
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
CODE_80C80E:
	RTS

CODE_80C80F:
	LDA.w $7E6ED8,x
	CMP.w #$0800
	BEQ.b CODE_80C82C
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	BEQ.b CODE_80C80E
	STA.w $7E826A,x
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STZ.w !RAM_JP_Exterior_Sprites_ZPosLo,x
CODE_80C82C:
	RTS

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

CODE_80C82D:
	TYX
	DEC.w $7E6AEE,x
	BNE.b CODE_80C836
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
CODE_80C836:
	RTS

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

CODE_80C837:
	TYX
	LDA.w $7E7E80,x
	BEQ.b CODE_80C840
	JMP.w CODE_80D25C

CODE_80C840:
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

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

CODE_80C844:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80C853
	LDA.b $72
	BEQ.b CODE_80C85A
	CMP.w #$0002
	BEQ.b CODE_80C85A
CODE_80C853:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80C85A:
	LDA.w #$0002
	STA.b $72
	LDA.w #$0028
	STA.b $A0
	JSR.w CODE_80EF3B
	BCC.b CODE_80C870
	LDA.w #!Define_JP_Player_GallimimusDamage
	JSR.w CODE_80AB70
	TYX
CODE_80C870:
	JSR.w CODE_80F0F7
	BCC.b CODE_80C8E8
	LDA.w $7E3FE0,x
	STA.w $0E03
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80C8E8
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BEQ.b CODE_80C8E8
	CMP.w #!Define_JP_WeaponID_CattleProd
	BEQ.b CODE_80C8B8
	PHA
	JSR.w CODE_80C7BA
	PLA
	TXY
	CMP.w #!Define_JP_WeaponID_Shotgun
	BEQ.b CODE_80C8C6
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BEQ.b CODE_80C8C6
	LDA.w #$019E
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80C8A7
	LDA.w #$01A6
CODE_80C8A7:
	STA.w $7E7E80,x
	LDA.w #!Define_JP_ExteriorSpriteID40_ExplodingGallimimus
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #!Define_JP_SoundID_ExplodingDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

CODE_80C8B8:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite06_Gallimimus_MaxDamage
	BCC.b CODE_80C8E8
CODE_80C8C6:
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #$01AE
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80C8D8
	LDA.w #$01B8
CODE_80C8D8:
	STA.w $7E7E80,x
	LDA.w #!Define_JP_ExteriorSpriteID38_DeadGallimimus
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #$00B4
	STA.w $7E3FE0,x
	RTS

CODE_80C8E8:
	TXY
	JSR.w CODE_80F3AB
	BCC.b CODE_80C8F3
	CMP.w #!Define_JP_Exterior_Sprite06_Gallimimus_MaxDamage
	BCS.b CODE_80C8C6
CODE_80C8F3:
	LDA.w $7E7E80,x
	BEQ.b CODE_80C8FB
	JMP.w CODE_80D25C

CODE_80C8FB:
	LDA.w $7E4B9E,x
	BNE.b CODE_80C958
	LDA.w $0E03
	CMP.w $7E3FE0,x
	BEQ.b CODE_80C943
	JSL.l CODE_81A076
	TYX
	LDA.w $0B4F
	CMP.w #$0400
	BCC.b CODE_80C933
	CMP.w #$1000
	BCS.b CODE_80C932
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	CMP.w #$0800
	BNE.b CODE_80C92D
	LDA.w $0B55
	BNE.b CODE_80C92D
	LDA.w #$04B0
	STA.w $0B55
CODE_80C92D:
	LDA.w $0E05
	BNE.b CODE_80C933
CODE_80C932:
	RTS

CODE_80C933:
	LDA.w #!Define_JP_SoundID_Unknown1&$007F
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80C93E
	LDA.w #!Define_JP_SoundID_Unknown2&$007F
CODE_80C93E:
	JSL.l CODE_839BA2
	TXY
CODE_80C943:
	INC.w $7E4B9E,x
	LDA.w $7E3FE0,x
	STA.w $0E03
	LDA.w $7E3BF6,x
	STA.w $7E6AEE,x
	LDA.w $7E43CA,x
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
CODE_80C958:
	JSR.w CODE_80B437
CODE_80C959:
	DEC.w $7E6AEE,x
	BNE.b CODE_80C982
	LDA.w #$018E
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80C96B
	LDA.w #$0196
CODE_80C96B:
	STA.w $7E7E80,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CLC
	ADC.w #$0004
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	STZ.w $0E03
	STZ.w $7E4B9E,x
	RTS

CODE_80C982:
	LDY.w #$0601
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CMP.w #$0002
	BEQ.b CODE_80C990
	LDY.w #$4601
CODE_80C990:
	STY.b $34
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.b $34
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

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

CODE_80C9A3:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80C9B2
	LDA.b $6C
	BEQ.b CODE_80C9B3
	CMP.w #$0001
	BEQ.b CODE_80C9B3
CODE_80C9B2:
	RTS

CODE_80C9B3:
	LDA.w #$0001
	STA.b $6C
	JSR.w CODE_80EF64
	BCC.b CODE_80C9C4
	LDA.w #!Define_JP_Player_BigGallimimusDamage
	JSR.w CODE_80AB70
	TYX
CODE_80C9C4:
	JSR.w CODE_80F16C
	BCC.b CODE_80CA35
	LDA.w $7E3FE0,x
	STA.w $0E03
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80CA35
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BEQ.b CODE_80CA35
	CMP.w #!Define_JP_WeaponID_CattleProd
	BEQ.b CODE_80CA05
	PHA
	JSR.w CODE_80C7BA
	PLA
	TXY
	CMP.w #!Define_JP_WeaponID_Shotgun
	BEQ.b CODE_80CA13
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BEQ.b CODE_80CA13
	LDA.w #$01D2
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80C9FB
	LDA.w #$01DC
CODE_80C9FB:
	STA.w $7E7E80,x
	LDA.w #!Define_JP_ExteriorSpriteID40_ExplodingGallimimus
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80CA05:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite08_BigGallimimus_MaxDamage
	BCC.b CODE_80CA35
CODE_80CA13:
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #$01E6
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80CA25
	LDA.w #$01F0
CODE_80CA25:
	STA.w $7E7E80,x
	LDA.w #!Define_JP_ExteriorSpriteID32_DeadDilophosaur
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #$00B4
	STA.w $7E3FE0,x
	RTS

CODE_80CA35:
	TXY
	JSR.w CODE_80F3E4
	BCC.b CODE_80CA40
	CMP.w #!Define_JP_Exterior_Sprite08_BigGallimimus_MaxDamage
	BCS.b CODE_80CA13
CODE_80CA40:
	LDA.w $7E7E80,x
	BEQ.b CODE_80CA48
	JMP.w CODE_80D25C

CODE_80CA48:
	LDA.w $7E4B9E,x
	BNE.b CODE_80CA92
	LDA.w $0E03
	CMP.w $7E3FE0,x
	BEQ.b CODE_80CA7D
	JSL.l CODE_81A076
	TYX
	LDA.w $0B4F
	CMP.w #$0400
	BCC.b CODE_80CA6D
	CMP.w #$0C40
	BCS.b CODE_80CA6C
	LDA.w $0E05
	BNE.b CODE_80CA6D
CODE_80CA6C:
	RTS

CODE_80CA6D:
	LDA.w #!Define_JP_SoundID_Unknown1&$007F
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80CA78
	LDA.w #!Define_JP_SoundID_Unknown2&$007F
CODE_80CA78:
	JSL.l CODE_839BA2
	TXY
CODE_80CA7D:
	INC.w $7E4B9E,x
	LDA.w $7E3FE0,x
	STA.w $0E03
	LDA.w $7E3BF6,x
	STA.w $7E6AEE,x
	LDA.w #$000A
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
CODE_80CA92:
	JSR.w CODE_80B437
	DEC.w $7E6AEE,x
	BNE.b CODE_80CABC
	LDA.w #$01C2
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80CAA5
	LDA.w #$01CA
CODE_80CAA5:
	STA.w $7E7E80,x
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CLC
	ADC.w #$0004
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	STZ.w $0E03
	STZ.w $7E4B9E,x
	RTS

CODE_80CABC:
	LDY.w #$0600
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CMP.w #$0002
	BEQ.b CODE_80CACA
	LDY.w #$4600
CODE_80CACA:
	STY.b $34
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LSR
	LSR
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.b $34
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

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

CODE_80CADD:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80CAEC
	LDA.b $6C
	BEQ.b CODE_80CAF3
	CMP.w #$0002
	BEQ.b CODE_80CAF3
CODE_80CAEC:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80CAF3:
	LDA.w #$0002
	STA.b $6C
	JSL.l CODE_819D85
	JSR.w CODE_80EF3B
	BCC.b CODE_80CB17
	BIT.w !RAM_JP_Exterior_Player_InAirFlagLo
	BMI.b CODE_80CB17
	LDA.w #!Define_JP_Player_PachycephalosaurusHeadbuttDamage
	JSR.w CODE_80AB2B
	LDA.w #!Define_JP_SoundID_HeavyThud
	JSL.l JP_Exterior_BufferSoundEffect_Main
	TYX
	BRL.w CODE_80CD20

CODE_80CB17:
	JSR.w CODE_80F0F7
	BCS.b CODE_80CB22
	STZ.w $7E47B4,x
CODE_80CB1F:
	BRL.w CODE_80CBB4

CODE_80CB22:
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80CB1F
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BNE.b CODE_80CB31
	BRL.w CODE_80CBB4

CODE_80CB31:
	CMP.w #!Define_JP_WeaponID_CattleProd
	BEQ.b CODE_80CB74
	PHA
	JSR.w CODE_80C7BA
	PLA
	TXY
	CMP.w #!Define_JP_WeaponID_Shotgun
	BEQ.b CODE_80CB5C
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BEQ.b CODE_80CB8B
	LDA.w #$0122
	STA.w $7E7E80,y
	LDA.w #!Define_JP_ExteriorSpriteID30_DeadPachycephalosaurus
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	LDA.w #!Define_JP_SoundID_ExplodingDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	JMP.w CODE_80D5C1

CODE_80CB5C:
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CLC
	ADC.w #!Define_JP_Exterior_Sprite1A_Pachycephalosaurus_ShotgunDamage
	STA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite1A_Pachycephalosaurus_MaxDamage
	BCS.b CODE_80CB8B
	BRA.b CODE_80CBB4

CODE_80CB74:
	TXY
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite1A_Pachycephalosaurus_MaxDamage
	BCS.b CODE_80CB8B
	LDA.w $7E47B4,x
	BNE.b CODE_80CBB4
	INC.w $7E47B4,x
	BRL.w CODE_80CD20

CODE_80CB8B:
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ASL
	TAX
	LDA.l DATA_80CC1C,x
	STA.w $7E7E80,y
	LDA.w #!Define_JP_ExteriorSpriteID30_DeadPachycephalosaurus
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	LDA.w #$00B4
	STA.w $7E3FE0,y
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	JMP.w CODE_80D5C1

CODE_80CBB4:
	TXY
	JSR.w CODE_80F3AB
	BCC.b CODE_80CBBF
	CMP.w #!Define_JP_Exterior_Sprite1A_Pachycephalosaurus_MaxDamage
	BCS.b CODE_80CB8B
CODE_80CBBF:
	LDA.w $7E7E80,x
	BEQ.b CODE_80CBC7
	JMP.w CODE_80D25C

CODE_80CBC7:
	LDA.w $7E4B9E,x
	BNE.b CODE_80CC40
	LDA.w #$0006
	STA.w $7E43CA,x
	STZ.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	JSL.l CODE_819FAE
	TYX
	STA.w $7E3BF6,x
	LDA.w $0B4F
	CMP.w #$0900
	BCC.b CODE_80CC3C
	CMP.w #$1000
	BCS.b CODE_80CBEF
	LDA.w $0E05
	BNE.b CODE_80CC3C
CODE_80CBEF:
	LDA.w $0B2F
	CMP.w #$0C00
	BCS.b CODE_80CC1B
	CMP.w #$0400
	BCC.b CODE_80CC09
	CMP.w #$0800
	BCC.b CODE_80CC06
	INC.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	BRA.b CODE_80CC09

CODE_80CC06:
	DEC.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
CODE_80CC09:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ASL
	TAX
	LDA.l DATA_80CC2C,x
	STA.w $7E7E80,y
CODE_80CC1B:
	RTS

DATA_80CC1C:
	dw $012A,$0138,$0144,$0150,$015C,$016A,$0176,$0182

DATA_80CC2C:
	dw $00B2,$00C0,$00CE,$00DC,$00EA,$00F8,$0106,$0114

CODE_80CC3C:
	INC.w $7E4B9E,x
	RTS

CODE_80CC40:
	CMP.w #$0002
	BEQ.b CODE_80CCB3
	LDA.b $68
	BNE.b CODE_80CC8A
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	CMP.w #$0008
	BEQ.b CODE_80CC59
	JSL.l CODE_819FAE
	TYX
	STA.w $7E3BF6,x
CODE_80CC59:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	TAY
	SEC
	SBC.w $7E3BF6,x
	BEQ.b CODE_80CC9D
	BPL.b CODE_80CC6D
	CMP.w #$FFFC
	BCC.b CODE_80CC75
	INY
	BRA.b CODE_80CC76

CODE_80CC6D:
	CMP.w #$0004
	BCC.b CODE_80CC75
	INY
	BRA.b CODE_80CC76

CODE_80CC75:
	DEY
CODE_80CC76:
	TYA
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	TXY
	ASL
	TAX
	LDA.l DATA_80CC8D,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	TYX
	BRA.b CODE_80CCD6

CODE_80CC8A:
	TXY
	BRA.b CODE_80CCD6

DATA_80CC8D:
	dw $0613,$0617,$061B,$061F,$0623,$461F,$461B,$4617

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

CODE_80CC9D:
	INC.w $7E4B9E,x
	LDA.w #$0008
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	LDA.w $0B33
	AND.w #$001F
	ADC.w #$0020
	STA.w $7E6AEE,x
	RTS

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

CODE_80CCB3:
	DEC.w $7E6AEE,x
	BNE.b CODE_80CCD6
	DEC.w $7E43CA,x
	BNE.b CODE_80CCC1
	STZ.w $7E4B9E,x
	RTS

CODE_80CCC1:
	LDA.w #$0001
	STA.w $7E4B9E,x
	LDA.w #$0004
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	JSL.l CODE_819FAE
	TYX
	STA.w $7E3BF6,x
	RTS

CODE_80CCD6:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.b $34
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.b $36
	JSR.w CODE_80B437
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_80CD36,x
	PHA
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80CD46,x
	TYX
	TAY
	PLA
	JSL.l CODE_80A147
	BPL.b CODE_80CD09
	CMP.w #$E800
	BCC.b CODE_80CD56
	BRA.b CODE_80CD0E

CODE_80CD09:
	CMP.w $7E6ED8,x
	BEQ.b CODE_80CD56
CODE_80CD0E:
	LDA.b $34
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LDA.b $36
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.w $7E4B9E,x
	CMP.w #$0001
	BEQ.b CODE_80CD35
CODE_80CD20:
	JSL.l CODE_819D85
	AND.w #$0007
	CMP.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	BEQ.b CODE_80CD20
	STA.w $7E3BF6,x
	LDA.w #$0001
	STA.w $7E4B9E,x
CODE_80CD35:
	RTS

DATA_80CD36:
	dw $0010,$0018,$0018,$0018,$0010,$0000,$0000,$0000

DATA_80CD46:
	dw $0006,$0006,$0012,$0018,$0018,$0018,$0012,$0006

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

CODE_80CD56:
	TXY
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ASL
	TAX
	LDA.w $7E6AEE,y
	LSR
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.l DATA_80CC8D,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	RTS

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

CODE_80CD6E:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80CD7D
	LDA.b $72
	BEQ.b CODE_80CD87
	CMP.w #$0004
	BEQ.b CODE_80CD87
CODE_80CD7D:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80CD87:
	LDA.w #$0004
	STA.b $72
	BRA.b CODE_80CDE8

CODE_80CD8E:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80CD9D
	LDA.b $6C
	BEQ.b CODE_80CDA4
	CMP.w #$0002
	BEQ.b CODE_80CDA4
CODE_80CD9D:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80CDA4:
	LDA.w #$0002
	STA.b $6C
	BRA.b CODE_80CDE8

CODE_80CDAB:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80CDBA
	LDA.b $6C
	BEQ.b CODE_80CDC1
	CMP.w #$0001
	BEQ.b CODE_80CDC1
CODE_80CDBA:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80CDC1:
	LDA.w #$0001
	STA.b $6C
	BRA.b CODE_80CDE8

CODE_80CDC8:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80CDD7
	LDA.b $72
	BEQ.b CODE_80CDDE
	CMP.w #$0002
	BEQ.b CODE_80CDDE
CODE_80CDD7:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80CDDE:
	LDA.w #$0002
	STA.b $72
	LDA.w #$0028
	STA.b $A0
CODE_80CDE8:
	TYX
	LDA.w $7E7E80,x
	BEQ.b CODE_80CDF1
	JSR.w CODE_80D25C
CODE_80CDF1:
	TYX
	LDX.w $7E380C,y
	JSR.w (DATA_80CE27,x)
	BCC.b CODE_80CE1B
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80CE14
	LDA.w $7E47B4,y
	BNE.b CODE_80CE13
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
	STZ.w !RAM_JP_Exterior_Player_WalkingFrameLo
CODE_80CE13:
	RTS

CODE_80CE14:
	LDA.w #$FFFF
	STA.w $7E47B4,y
	RTS

CODE_80CE1B:
	LDA.w $0E31
	BNE.b CODE_80CE26
	LDA.w #$0000
	STA.w $7E47B4,y
CODE_80CE26:
	RTS

DATA_80CE27:
	dw CODE_80EF0F
	dw CODE_80EF0F
	dw CODE_80EF0F
	dw CODE_80EF38
	dw CODE_80EF38
	dw CODE_80EF8A
	dw CODE_80EF61
	dw CODE_80EFB1
	dw CODE_80EFDA
	dw $0000
	dw $0000
	dw $0000
	dw $0000

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

CODE_80CE41:
	TYX
	JSR.w CODE_80EF16
	BCC.b CODE_80CE70
	LDA.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	CMP.w #$FFEC
	BNE.b CODE_80CE70
	STZ.w !RAM_JP_Exterior_Player_CanPickUpItemFlagLo
	DEC.w !RAM_JP_Global_Player_RemainingEggsToCollectLo
	BNE.b CODE_80CE5D
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_AllEggsCollectedFlagLo
CODE_80CE5D:
	LDA.w #$FFFF
	STA.w !RAM_JP_Global_Player_PickedUpEggFlagLo
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #!Define_JP_SoundID_PickupItem
	JSL.l JP_Exterior_BufferSoundEffect_Main
	JMP.w CODE_80D5D6

CODE_80CE70:
	RTS

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

CODE_80CE71:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80CE80
	LDA.b $6C
	BEQ.b CODE_80CE87
	CMP.w #$0002
	BEQ.b CODE_80CE87
CODE_80CE80:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80CE87:
	LDA.w #$0002
	STA.b $6C
	LDA.w $7E4B9A
	CMP.w #$0030
	BCC.b CODE_80CE99
	CMP.w #$00A0
	BCC.b CODE_80CEA8
CODE_80CE99:
	JSR.w CODE_80EF3B
	BCC.b CODE_80CEA8
	LDA.w #!Define_JP_Player_DragonflyDamage
	JSR.w CODE_80AB2B
	TYX
	BRL.w CODE_80CF6B

CODE_80CEA8:
	JSR.w CODE_80F0F7
	BCC.b CODE_80CEE9
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80CEE9
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BNE.b CODE_80CEBC
	BRL.w CODE_80CEEA

CODE_80CEBC:
	CMP.w #!Define_JP_WeaponID_CattleProd
	BEQ.b CODE_80CEDD
	PHA
	JSR.w CODE_80C7BA
	PLA
	TXY
CODE_80CEC7:
	LDA.w #$02EE
	STA.w $7E7E80,y
	LDA.w #!Define_JP_ExteriorSpriteID30_DeadPachycephalosaurus
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	LDA.w #!Define_JP_SoundID_ExplodingDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	JMP.w CODE_80D5CE

CODE_80CEDD:
	TXY
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite1E_Dragonfly_MaxDamage
	BCS.b CODE_80CEC7
CODE_80CEE9:
	TXY
CODE_80CEEA:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	ASL
	TAX
	LDA.w $049D
	LSR
	LSR
	AND.w #$0001
	CLC
	ADC.l DATA_80CF8F,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	TYX
	LDA.w $7E4B9E,x
	BNE.b CODE_80CF08
	BRL.w CODE_80CF9F

CODE_80CF08:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.b $34
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.b $36
	JSR.w CODE_80B437
	PHX
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_80CF3C,x
	PHA
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80CF4C,x
	TAY
	PLA
	PLX
	JSL.l CODE_80A147
	BPL.b CODE_80CF5C
	CMP.w #$E800
	BCC.b CODE_80CF75
	BRA.b CODE_80CF61

DATA_80CF3C:
	dw $0010,$0014,$0014,$0014,$0010,$0000,$0000,$0000

DATA_80CF4C:
	dw $0008,$0008,$0014,$001C,$001C,$001C,$0014,$0008

CODE_80CF5C:
	CMP.w $7E6ED8,x
	BEQ.b CODE_80CF75
CODE_80CF61:
	LDA.b $34
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LDA.b $36
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
CODE_80CF6B:
	LDA.w $0B2F
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	RTS

CODE_80CF75:
	TXY
	LDA.b $68
	BNE.b CODE_80CFD6
	DEC.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	BNE.b CODE_80CFD6
	STZ.w $7E4B9E,x
	LDA.w $0B2F
	AND.w #$000F
	ADC.w #$0014
	STA.w $7E6AEE,x
	RTS

DATA_80CF8F:
	dw $0846,$0848,$084A,$084C,$084E,$484C,$484A,$4848

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

CODE_80CF9F:
	LDA.w $049D
	AND.w #$0007
	BNE.b CODE_80CFB0
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	EOR.w #$0001
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
CODE_80CFB0:
	DEC.w $7E6AEE,x
	BPL.b CODE_80CFD6
	JSL.l CODE_819FAE
	TYX
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	LDA.w #$0018
	STA.w $7E6AEE,x
	LDA.w #$000C
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	LDA.w #$0001
	STA.w $7E4B9E,x
	LDA.w #!Define_JP_SoundID_BuzzingDragonfly
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80CFD6:
	RTS

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

CODE_80CFD7:
	TYX
	BIT.w $7E8654,x
	BPL.b CODE_80CFE4
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80CFE4:
	LDA.w #$0020
	STA.b $9E
	LDA.w $7E4B9E,x
	BEQ.b CODE_80CFF5
	CMP.w #$0004
	BEQ.b CODE_80D026
	BNE.b CODE_80D03B					; Note: This will always branch.

CODE_80CFF5:
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	CMP.w $7E6ED8,x
	BCS.b CODE_80D026
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CLC
	ADC.w #$0020
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80D026
	CMP.w #$0040
	BCS.b CODE_80D026
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0020
	CMP.w !RAM_JP_Exterior_Player_YPosLo
	BCS.b CODE_80D026
	ADC.w #$0080
	CMP.w !RAM_JP_Exterior_Player_YPosLo
	BCC.b CODE_80D026
	INC.w $7E4B9E,x
	RTS

CODE_80D026:
	JSR.w CODE_80EF3F
	BCC.b CODE_80D03A
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
	STZ.w !RAM_JP_Exterior_Player_WalkingFrameLo
CODE_80D03A:
	RTS

CODE_80D03B:
	JSR.w CODE_80EF47
	BCC.b CODE_80D06B
	LDX.w #$0310
	LDA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	INC
	AND.w #$0007
	CMP.w #$0003
	BCC.b CODE_80D052
	LDX.w #$0308
CODE_80D052:
	STX.w $7E4B9A
	LDA.w #$0007
	STA.w $0DF9
	STZ.w !RAM_JP_Exterior_Player_ZPosLo
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w $0E0D
	TYX
	BRL.w CODE_80D0F7

CODE_80D06B:
	LDA.w $7E4B9E,x
	CMP.w #$0001
	BNE.b CODE_80D0A5
	INC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LSR
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.w #$060D
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0010
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$000C
	JSL.l CODE_80A147
	CMP.w $7E6ED8,x
	BEQ.b CODE_80D0A4
	INC.w $7E4B9E,x
	STZ.w $7E5B46,x
CODE_80D0A4:
	RTS

CODE_80D0A5:
	CMP.w #$0002
	BNE.b CODE_80D105
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w $7E5B46,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.b $68
	BNE.b CODE_80D0BB
	INC.w $7E5B46,x
CODE_80D0BB:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0010
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$000C
	JSL.l CODE_80A147
	TXY
	AND.w #$7800
	CMP.w #$0800
	BEQ.b CODE_80D0F4
	CMP.w #$4000
	BEQ.b CODE_80D0E6
	CMP.w #$5000
	BEQ.b CODE_80D0E6
	CMP.w #$6000
	BNE.b CODE_80D0F3
CODE_80D0E6:
	STA.w $7E6ED8,x
	INC.w $7E4B9E,x
	LDA.w #!Define_JP_SoundID_LandingBoulder
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80D0F3:
	RTS

CODE_80D0F4:
	STA.w $7E6ED8,x
CODE_80D0F7:
	LDA.w #$0004
	STA.w $7E4B9E,x
	LDA.w #!Define_JP_SoundID_LandingBoulder
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

CODE_80D105:
	LDA.b $68
	CMP.w #$0000
	BNE.b CODE_80D0F3
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0008
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0008
	STA.w $7E2866,x
	STA.w $7E2868,x
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.w $7E2092,x
	CLC
	ADC.w #$0008
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	ADC.w #$0008
	STA.w $7E2094,x
	LDA.w #$0000
	STA.w $7E380C,x
	STA.w $7E380E,x
	STA.w $7E3810,x
	LDA.w $7E6ED8,x
	STA.w $7E6EDA,x
	STA.w $7E6EDC,x
	LDA.w #$0005
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	STA.w $7E575E,x
	STA.w $7E5760,x
	LDA.w #$0005
	STA.w $7E5374,x
	DEC
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	DEC
	STA.w $7E5376,x
	STZ.w $7E4B9E,x
	STZ.w $7E4BA0,x
	STZ.w $7E4BA2,x
	LDA.w #$061E
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	STA.w $7E3424,x
	STA.w $7E3426,x
	LDA.w #!Define_JP_ExteriorSpriteID22_Boulder
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	STA.w !RAM_JP_Exterior_Sprites_IDLo+$02,x
	STA.w !RAM_JP_Exterior_Sprites_IDLo+$04,x
	RTS

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

CODE_80D183:
	TYX
	BIT.w $7E8654,x
	BPL.b CODE_80D198
	LDA.w #$FFFF
	STA.w $7E76AC,x
	LDA.w $7E4B9E,x
	BEQ.b CODE_80D197
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
CODE_80D197:
	RTS

CODE_80D198:
	LDA.w #$0020
	STA.b $9E
	LDA.w $7E4B9E,x
	CMP.w #$0002
	BNE.b CODE_80D1BF
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80D1BE
	JSR.w CODE_80EF12
	BCC.b CODE_80D1BE
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
	STZ.w !RAM_JP_Exterior_Player_WalkingFrameLo
CODE_80D1BE:
	RTS

CODE_80D1BF:
	JSR.w CODE_80EF12
	BCC.b CODE_80D1CB
	LDA.w #!Define_JP_Player_BoulderDamage
	JSR.w CODE_80AA49
	TYX
CODE_80D1CB:
	LDA.w $7E4B9E,x
	BNE.b CODE_80D204
	JSR.w CODE_80B437
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$000C
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$0006
	JSL.l CODE_80A147
	AND.w #$7800
	CMP.w $7E6ED8,x
	BEQ.b CODE_80D1F4
	INC.w $7E4B9E,x
	STZ.w $7E5B46,x
CODE_80D1F4:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LSR
	LSR
	AND.w #$0003
	CLC
	ADC.w #$061E
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

CODE_80D204:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w $7E5B46,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.b $68
	BNE.b CODE_80D215
	INC.w $7E5B46,x
CODE_80D215:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$000C
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$0006
	JSL.l CODE_80A147
	TXY
	AND.w #$7800
	CMP.w #$0800
	BEQ.b CODE_80D24E
	CMP.w #$4000
	BEQ.b CODE_80D240
	CMP.w #$5000
	BEQ.b CODE_80D240
	CMP.w #$6000
	BNE.b CODE_80D24D
CODE_80D240:
	STA.w $7E6ED8,x
	STZ.w $7E4B9E,x
	LDA.w #!Define_JP_SoundID_LandingBoulder
	JSL.l JP_Exterior_BufferSoundEffect_Main
CODE_80D24D:
	RTS

CODE_80D24E:
	STA.w $7E6ED8,x
	INC.w $7E4B9E,x
	LDA.w #!Define_JP_SoundID_LandingBoulder
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

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

CODE_80D25C:
	LDX.w $7E7E80,y
CODE_80D25F:
	LDA.l DATA_80D2C3,x
	BPL.b CODE_80D2A8
	CMP.w #$FFFF
	BEQ.b CODE_80D2BE
	CMP.w #$FFFE
	BEQ.b CODE_80D2A1
	CMP.w #$FFFD
	BEQ.b CODE_80D29A
	CMP.w #$FFFB
	BEQ.b CODE_80D291
	CMP.w #$FFFC
	BEQ.b CODE_80D286
	INX
	INX
	TXA
	STA.w $7E7E80,y
	BRA.b CODE_80D25F

CODE_80D286:
	STA.w $7E6704,y
CODE_80D289:
	INX
	INX
	TXA
	STA.w $7E7E80,y
	BRA.b CODE_80D25F

CODE_80D291:
	LDA.w #!Define_JP_SoundID_HeavyThud
	JSL.l JP_Exterior_BufferSoundEffect_Main
	BRA.b CODE_80D289

CODE_80D29A:
	LDA.w #!Define_JP_ExteriorSpriteID00_None
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	RTS

CODE_80D2A1:
	LDA.w #!Define_JP_ExteriorSpriteID4A_Unknown
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	RTS

CODE_80D2A8:
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	LDA.w $7E826A,y
	INC
	AND.w #$0007
	STA.w $7E826A,y
	BNE.b CODE_80D2BD
	INX
	INX
	TXA
	STA.w $7E7E80,y
CODE_80D2BD:
	RTS

CODE_80D2BE:
	INC
	STA.w $7E7E80,y
	RTS

DATA_80D2C3:
	dw $0000,$0006,$000C,$0040,$FFFB,$FFFF,$000C,$0040
	dw $FFFB,$FFFF,$0040,$FFFB,$FFFF,$000C,$0040,$FFFB
	dw $FFFF,$401E,$4024,$4041,$FFFB,$FFFF,$4024,$4041
	dw $FFFB,$FFFF,$4041,$FFFB,$FFFF,$4024,$4041,$FFFB
	dw $FFFF,$0031,$0030,$0030,$0030,$FFFF,$0033,$0032
	dw $0032,$0032,$FFFF,$0035,$0034,$0034,$0034,$FFFF
	dw $0037,$0036,$0036,$0036,$FFFF,$0039,$0038,$0038
	dw $0038,$FFFF,$403B,$403A,$403A,$403A,$FFFF,$403D
	dw $403C,$403C,$403C,$FFFF,$403F,$403E,$403E,$403E
	dw $FFFF,$0031,$0030,$FFFF,$0039,$0038,$FFFF,$0042
	dw $0043,$0044,$0045,$FFFD,$4046,$4047,$4048,$4049
	dw $FFFD,$062E,$062F,$0630,$0630,$062F,$062E,$FFFF
	dw $0631,$0632,$0633,$0633,$0632,$0631,$FFFF,$0634
	dw $0635,$0636,$0636,$0635,$0634,$FFFF,$0637,$0638
	dw $0639,$0639,$0638,$0637,$FFFF,$063A,$063B,$063C
	dw $063C,$063B,$063A,$FFFF,$4637,$4638,$4639,$4639
	dw $4638,$4637,$FFFF,$4634,$4635,$4636,$4636,$4635
	dw $4634,$FFFF,$4631,$4632,$4633,$4633,$4632,$4631
	dw $FFFF,$0627,$0628,$0629,$FFFD,$0617,$062A,$062B
	dw $062C,$FFFB,$062D,$FFFF,$062A,$062B,$062C,$FFFB
	dw $062D,$FFFF,$062A,$062B,$062C,$FFFB,$062D,$FFFF
	dw $062A,$062B,$062C,$FFFB,$062D,$FFFF,$061F,$062A
	dw $062B,$062C,$FFFB,$062D,$FFFF,$462A,$462B,$462C
	dw $FFFB,$462D,$FFFF,$462A,$462B,$462C,$FFFB,$462D
	dw $FFFF,$462A,$462B,$462C,$FFFB,$462D,$FFFF,$060B
	dw $060C,$4601,$FFFF,$460B,$460C,$0601,$FFFF,$0608
	dw $0609,$060A,$FFFF,$4608,$4609,$460A,$FFFF,$0605
	dw $0606,$FFFB,$0607,$FFFF,$4605,$4606,$FFFB,$4607
	dw $FFFF,$060B,$460B,$4600,$FFFF,$460B,$060B,$0600
	dw $FFFF,$0607,$0608,$0609,$060A,$FFFF,$4607,$4608
	dw $4609,$460A,$FFFF,$0604,$0605,$FFFB,$0606,$FFFF
	dw $4604,$4605,$FFFB,$4606,$FFFF,$020C,$020D,$020E
	dw $020F,$FFFF,$0210,$0211,$0212,$0213,$FFFF,$0214
	dw $0215,$0216,$0217,$FFFF,$0218,$0219,$021A,$021B
	dw $FFFF,$021C,$021D,$021E,$021F,$FFFF,$4218,$4219
	dw $421A,$421B,$FFFF,$4214,$4215,$4216,$4217,$FFFF
	dw $4210,$4211,$4212,$4213,$FFFF,$0220,$0221,$0222
	dw $0223,$0223,$FFFC,$0222,$FFFF,$0224,$0225,$0226
	dw $0227,$0227,$FFFC,$0226,$FFFF,$0228,$0229,$022A
	dw $022B,$022B,$FFFC,$022A,$FFFF,$022C,$022D,$022E
	dw $022F,$022F,$FFFC,$022E,$FFFF,$0230,$0231,$0232
	dw $0233,$0233,$FFFC,$0232,$FFFF,$422C,$422D,$422E
	dw $422F,$422F,$FFFC,$422E,$FFFF,$4228,$4229,$422A
	dw $422B,$422B,$FFFC,$422A,$FFFF,$4224,$4225,$4226
	dw $4227,$4227,$FFFC,$4226,$FFFF,$0234,$0235,$0236
	dw $FFFD,$4234,$4235,$4236,$FFFD,$0237,$0238,$FFFB
	dw $0239,$FFFF,$4237,$4238,$FFFB,$4239,$FFFF,$0850
	dw $0851,$0852,$FFFD

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

CODE_80D5B9:
	SEP.b #$20
	INC.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	REP.b #$20
	RTS

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

CODE_80D5C1:
	SEP.b #$21
	LDA.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	ADC.b #$04
	STA.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	REP.b #$20
	RTS

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

CODE_80D5CE:
	SEP.b #$20
	INC.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	REP.b #$20
	RTS

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

CODE_80D5D6:
	SEP.b #$20
	INC.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	INC.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	REP.b #$20
	RTS

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

CODE_80D5E1:
	SEP.b #$21
	LDA.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	ADC.b #$04
	STA.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	REP.b #$20
	RTS

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

CODE_80D5EE:
	SEP.b #$20
	INC.w !RAM_JP_Global_Player_PointsToGiveHundredsDigit
	REP.b #$20
	RTS

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

CODE_80D5F6:
	TYX
	LDA.b $72
	BEQ.b CODE_80D60A
	CMP.w #$0004
	BEQ.b CODE_80D60F
CODE_80D600:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

CODE_80D60A:
	BIT.w $7E8654,x
	BMI.b CODE_80D600
CODE_80D60F:
	LDA.w #$0004
	STA.b $72
	LDA.w #DATA_80A23A
	STA.b $70
	PHX
	JSR.w CODE_80DA9D
	PLX
	TXY
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,x
	CMP.w #!Define_JP_ExteriorSpriteID12_Velociraptor
	BEQ.b CODE_80D628
	RTS

CODE_80D628:
	LDA.w $7E43CA,x
	CMP.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	BEQ.b CODE_80D633
	JSR.w CODE_80D63B
CODE_80D633:
	LDA.w $7E4B9E,x
	ASL
	TAX
	JMP.w (DATA_80D6B9,x)

CODE_80D63B:
	LDY.b $68
	CPY.w #$0003
	BNE.b CODE_80D664
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	TAY
	SEC
	SBC.w $7E43CA,x
	BPL.b CODE_80D654
	CMP.w #$FFF8
	BCC.b CODE_80D65C
	INY
	BRA.b CODE_80D65D

CODE_80D654:
	CMP.w #$0008
	BCC.b CODE_80D65C
	INY
	BRA.b CODE_80D65D

CODE_80D65C:
	DEY
CODE_80D65D:
	TYA
	AND.w #$000F
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
CODE_80D664:
	TXY
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	AND.w #$000E
	TAX
	LDA.l DATA_80D689,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	TYX
	LDA.w $7E43CA,x
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	BPL.b CODE_80D681
	EOR.w #$FFFF
	INC
CODE_80D681:
	CMP.w #$0002
	BCS.b CODE_80D687
	RTS

CODE_80D687:
	PLA
	RTS

DATA_80D689:
	dw $0000,$0006,$000C,$0012,$0018,$401E,$4024,$402A
	dw $004A,$004B,$004C,$004D,$004E,$404D,$404C,$404B
	dw $004F,$0050,$0051,$0052,$0053,$4052,$4051,$4050

DATA_80D6B9:
	dw CODE_80D6CD
	dw CODE_80D8BC
	dw CODE_80DA2E
	dw CODE_80D7F5
	dw CODE_80D802
	dw CODE_80D7B6
	dw CODE_80D7CB
	dw CODE_80D851
	dw CODE_80D8A5
	dw CODE_80DA20

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

CODE_80D6CD:
	LDX.w $7E3BF6,y
	BRA.b CODE_80D6DA

CODE_80D6D2:
	CLC
	ADC.w $7E3BF6,y
	STA.w $7E3BF6,y
	TAX
CODE_80D6DA:
	LDA.l DATA_80DD96,x
	BMI.b CODE_80D6FF
	CMP.w #$1000
	BCS.b CODE_80D6EC
	LDA.w #$0001
	STA.w $7E4B9E,y
	RTS

CODE_80D6EC:
	AND.w #$0FFF
	STA.w $7E6AEE,y
	LDA.w #$0003
	STA.w $7E4B9E,y
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	RTS

CODE_80D6FF:
	CMP.w #$FFFF
	BEQ.b CODE_80D71A
	CMP.w #$FF04
	BEQ.b CODE_80D753
	CMP.w #$FF07
	BEQ.b CODE_80D77F
	CMP.w #$FF03
	BEQ.b CODE_80D747
	AND.w #$00FF
	STA.w $7E4B9E,y
	RTS

CODE_80D71A:
	LDA.l DATA_80DD96+$04,x
	BMI.b CODE_80D730
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.l DATA_80DD96+$06,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
CODE_80D730:
	LDA.w #$0000
	STA.w $7E5F30,y
	STA.w $7E631A,y
	STA.w $7E6704,y
	LDA.l DATA_80DD96+$02,x
	STA.w $7E3BF6,y
	TAX
	BRL.w CODE_80D6DA

CODE_80D747:
	STA.w $7E6704,y
	INX
	INX
	TXA
	STA.w $7E3BF6,y
	BRL.w CODE_80D6DA

CODE_80D753:
	LDA.w $7E6ED8,y
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BCS.b CODE_80D7B0
	LDA.w #$0004
	STA.w $7E4B9E,y
	LDA.l DATA_80DD96+$02,x
	STA.w $7E3BF6,y
	LDA.w #$0000
	STA.w $7E43CA,y
	STA.w $7E826A,y
	LDA.w #$0092
	STA.w $7E7E80,y
CODE_80D777:
	LDA.w #!Define_JP_SoundID_VelociraptorGrowl&$007F
	JSL.l CODE_839BA2
	RTS

CODE_80D77F:
	LDA.w $7E6ED8,y
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BEQ.b CODE_80D7B0
	BCC.b CODE_80D7B0
	LDA.w #$0007
	STA.w $7E4B9E,y
	LDA.l DATA_80DD96+$02,x
	STA.w $7E3BF6,y
	LDA.w #$0000
	STA.w $7E5B46,y
	LDA.w #$0008
	STA.w $7E43CA,y
	LDA.w #$0000
	STA.w $7E826A,y
	LDA.w #$0098
	STA.w $7E7E80,y
	BRA.b CODE_80D777

CODE_80D7B0:
	LDA.w #$0004
	BRL.w CODE_80D6D2

CODE_80D7B6:
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	LDX.w $7E3FE0,y
	LDA.w $7E6704,x
	BEQ.b CODE_80D7CA			; Note: !Define_JP_WeaponID_Shotgun?
	LDA.w #$0002
	BRL.w CODE_80D6D2

CODE_80D7CA:
	RTS

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

CODE_80D7CB:
	TYX
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	JSL.l CODE_819FAE
	LDX.w $7E3BF6,y
	CMP.l DATA_80DD96+$02,x
	BNE.b CODE_80D7CA
	LDA.w $0B4F
	CMP.l DATA_80DD96+$04,x
	BCS.b CODE_80D7CA
	LDA.w #!Define_JP_SoundID_VelociraptorGrowl&$007F
	JSL.l CODE_839BA2
	LDA.w #$0006
	BRL.w CODE_80D6D2

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

CODE_80D7F5:
	TYX
	DEC.w $7E6AEE,x
	BNE.b CODE_80D801
	LDA.w #$0002
	BRL.w CODE_80D6D2

CODE_80D801:
	RTS

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

CODE_80D802:
	TYX
	LDA.w $7E7E80,x
	BEQ.b CODE_80D80B
	JMP.w CODE_80D25C

CODE_80D80B:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	SEC
	SBC.w #$0004
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0030
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$0020
	JSL.l CODE_80A147
	TXY
	AND.w #$7800
	CMP.w $7E6ED8,x
	BEQ.b CODE_80D840
	CMP.w #$4000
	BEQ.b CODE_80D841
	CMP.w #$5000
	BEQ.b CODE_80D841
	CMP.w #$6000
	BEQ.b CODE_80D841
	STA.w $7E6ED8,x
CODE_80D840:
	RTS

CODE_80D841:
	STA.w $7E6ED8,x
	LDA.w #$0008
	STA.w $7E4B9E,x
	LDA.w #$FFFC
	STA.w $7E5B46,x
	RTS

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

CODE_80D851:
	TYX
	LDA.w $7E7E80,x
	BEQ.b CODE_80D85A
	JMP.w CODE_80D25C

CODE_80D85A:
	LDA.b $68
	BNE.b CODE_80D869
	LDA.w $7E5B46,x
	CMP.w #$0004
	BCS.b CODE_80D869
	INC.w $7E5B46,x
CODE_80D869:
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w $7E5B46,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CLC
	ADC.w #$0030
	TAY
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CLC
	ADC.w #$0020
	JSL.l CODE_80A147
	TXY
	AND.w #$7800
	CMP.w $7E6ED8,x
	BEQ.b CODE_80D89E
	CMP.w #$0800
	BEQ.b CODE_80D89F
	CMP.w #$4000
	BEQ.b CODE_80D89F
	CMP.w #$5000
	BEQ.b CODE_80D89F
	STA.w $7E6ED8,x
CODE_80D89E:
	RTS

CODE_80D89F:
	STA.w $7E6ED8,x
	BRL.w CODE_80D6CD

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

CODE_80D8A5:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	CLC
	ADC.w $7E5B46,x
	BMI.b CODE_80D8B6
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	INC.w $7E5B46,x
	RTS

CODE_80D8B6:
	STZ.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	BRL.w CODE_80D6CD

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

CODE_80D8BC:
	LDX.w $7E3BF6,y
	LDA.l DATA_80DD96,x
	STA.b $34
	LDA.l DATA_80DD96+$02,x
	STA.b $36
	LDA.l DATA_80DD96+$04,x
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.w #$0004
	SEC
	SBC.b $34
	BMI.b CODE_80D8FB
CODE_80D8DE:
	CMP.w #$0009
	BCS.b CODE_80D8FB
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.w #$0004
	SEC
	SBC.b $36
	BMI.b CODE_80D8FB
	CMP.w #$0009
	BCS.b CODE_80D8FB
	LDA.w #$0006
	BRL.w CODE_80D6D2

CODE_80D8FB:
	DEC.w $7E6AEE,x
	BPL.b CODE_80D90E
	LDA.w #$0004
	STA.w $7E6AEE,x
	JSR.w CODE_80DCA9
	BMI.b CODE_80D90E
	STA.w $7E43CA,y
CODE_80D90E:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.b $4A
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.b $4C
	JSR.w CODE_80DA42
	BIT.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	BMI.b CODE_80D990
	LDA.w $7E4B9E,x
	CMP.w #$0002
	BEQ.b CODE_80D92D
	JSR.w CODE_80D9DC
	BCS.b CODE_80D98F
CODE_80D92D:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	AND.w #$000E
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_80D9BC,x
	PHA
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80D9CC,x
	TYX
	TAY
	PLA
	JSL.l CODE_80A147
	BPL.b CODE_80D95B
	CMP.w #$F000
	BCS.b CODE_80D965
	CMP.l $00A000					; Glitch: I don't think this was meant to be where this references.
	BNE.b CODE_80D990
	BRA.b CODE_80D965

CODE_80D95B:
	CMP.w #$6800
	BEQ.b CODE_80D990
	CMP.w $7E6ED8,x
	BEQ.b CODE_80D990
CODE_80D965:
	LDA.w $7E4B9E,x
	CMP.w #$0002
	BNE.b CODE_80D976
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	STA.w $7E4B9E,x
	STZ.w $7E7E80,x
CODE_80D976:
	LDA.b $4A
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	LDA.b $4C
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.w $0B2F
	AND.w #$000F
	STA.w $7E43CA,x
	LDA.w #$0018
	STA.w $7E6AEE,x
CODE_80D98F:
	RTS

CODE_80D990:
	TXY
	LDA.w $7E4B9E,x
	CMP.w #$0002
	BEQ.b CODE_80D98F
	LDA.b $68
	BNE.b CODE_80D98F
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	AND.w #$000E
	TAX
	LDA.w $7E47B4,y
	INC
	CMP.w #$0006
	BCC.b CODE_80D9B0
	LDA.w #$0000
CODE_80D9B0:
	STA.w $7E47B4,y
	CLC
	ADC.l DATA_80D689,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	RTS

DATA_80D9BC:
	dw $0020,$0030,$0030,$0030,$0020,$0008,$0008,$0008

DATA_80D9CC:
	dw $0020,$0020,$0030,$0040,$0040,$0040,$0030,$0020

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

CODE_80D9DC:
	JSL.l CODE_819FAE
	TYX
	STA.b $38
	LDA.w $0B4F
	CMP.w #$0800
	BCS.b CODE_80DA0E
	LDA.w $7E4B9E,x
	STA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	LDA.w #$0009
	STA.w $7E4B9E,x
	LDA.w #$000A
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	LDA.b $38
	ASL
	STA.w $7E43CA,x
	TAX
	LDA.l DATA_80DA10,x
	STA.w $7E7E80,y
	TYX
	SEC
	RTS

CODE_80DA0E:
	CLC
	RTS

DATA_80DA10:
	dw $0042,$004C,$0056,$0060,$006A,$0074,$007E,$0088

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

CODE_80DA20:
	TYX
	LDA.w #!Define_JP_SoundID_VelociraptorRoar&$007F
	JSL.l CODE_839BA2
	LDA.w #$0002
	STA.w $7E4B9E,x
CODE_80DA2E:
	TYX
	LDA.w $7E7E80,x
	BEQ.b CODE_80DA3B
	JSR.w CODE_80D25C
	TYX
	JMP.w CODE_80D90E

CODE_80DA3B:
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	STA.w $7E4B9E,x
	RTS

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

CODE_80DA42:
	LDA.w $7E43CA,y
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	AND.w #$00FF
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w $7E5F31,y
	STA.w $7E5F31,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w $7E631B,y
	STA.w $7E631B,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	TYX
	RTS

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

CODE_80DA9D:
	TYX
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BPL.b CODE_80DAA4
	RTS

CODE_80DAA4:
	JSR.w CODE_80EFB4
	BCC.b CODE_80DAEC
	LDA.w $7E4B9E,x
	CMP.w #$0002
	BEQ.b CODE_80DAB8
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,x
	BMI.b CODE_80DAB8
	BRA.b CODE_80DAEC

CODE_80DAB8:
	LDA.w #!Define_JP_Player_ExteriorVelociraptorDamage
	JSR.w CODE_80AA49
	TYX
	STZ.w $7E7E80,x
	LDA.w $7E4B9E,x
	CMP.w #$0002
	BNE.b CODE_80DAD0
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,x
	STA.w $7E4B9E,x
CODE_80DAD0:
	LDA.w $7E43CA,x
	CMP.w #$0008
	BCS.b CODE_80DAE3
	SBC.w #$0006
	AND.w #$000F
	STA.w $7E43CA,x
	BRA.b CODE_80DAEC

CODE_80DAE3:
	ADC.w #$0004
	AND.w #$000F
	STA.w $7E43CA,x
CODE_80DAEC:
	JSR.w CODE_80F1E1
	BCC.b CODE_80DAF4
	JSR.w CODE_80DB03
CODE_80DAF4:
	JSR.w CODE_80F41D
	BCC.b CODE_80DB02
	CMP.w #$0046
	BCC.b CODE_80DB02
	TXY
	JMP.w CODE_80DBA1

CODE_80DB02:
	RTS

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

CODE_80DB03:
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80DB2E
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BEQ.b CODE_80DB2B
	CMP.w #!Define_JP_WeaponID_CattleProd
	BEQ.b CODE_80DB30
	PHA
	JSR.w CODE_80C7BA
	PLA
	TXY
	CMP.w #!Define_JP_WeaponID_Shotgun
	BEQ.b CODE_80DB82
	CMP.w #!Define_JP_WeaponID_RocketLauncher
	BEQ.b CODE_80DB3D
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BEQ.b CODE_80DB5F
	BRA.b CODE_80DB3D

CODE_80DB2B:
	INC.w $0399
CODE_80DB2E:
	TXY
	RTS

CODE_80DB30:
	TXY
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite12_Velociraptor_MaxDamage
	BCS.b CODE_80DB5F
	RTS

CODE_80DB3D:
	LDA.w #$009E
	LDY.w !RAM_JP_Exterior_Player_MovementDirectionLo
	CPY.w #$0008
	BCC.b CODE_80DB4B
	LDA.w #$00A8
CODE_80DB4B:
	STA.w $7E7E80,x
	LDA.w #!Define_JP_ExteriorSpriteID34_DyingVelociraptor
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	TXY
	LDA.w #!Define_JP_SoundID_ExplodingDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	JMP.w CODE_80D5D6

CODE_80DB5F:
	LDA.w #!Define_JP_Exterior_Sprite12_Velociraptor_StunnedTimer
	STA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,x
	CMP.w #!Define_JP_ExteriorSpriteID14_StunnedVelociraptor
	BEQ.b CODE_80DB2E
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #!Define_JP_ExteriorSpriteID14_StunnedVelociraptor
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #$FFFF
	STA.w $7E47B4,x
	BRA.b CODE_80DBB0

CODE_80DB82:
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,x
	CMP.w #!Define_JP_ExteriorSpriteID14_StunnedVelociraptor
	BEQ.b CODE_80DB2E
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CLC
	ADC.w #!Define_JP_Exterior_Sprite12_Velociraptor_ShotgunDamage
	STA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite12_Velociraptor_MaxDamage
	BCS.b CODE_80DBA1
	RTS

CODE_80DBA1:
	LDA.w #!Define_JP_ExteriorSpriteID34_DyingVelociraptor
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #$00B4
	STA.w $7E3FE0,x
	JSR.w CODE_80D5D6
CODE_80DBB0:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	AND.w #$000E
	TAX
	LDA.l DATA_80DBC0,x
	STA.w $7E7E80,y
	TYX
	RTS

DATA_80DBC0:
	dw $0002,$000C,$0014,$001A,$0022,$002C,$0034,$003A

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

CODE_80DBD0:
	TYX
	LDA.b $72
	BEQ.b CODE_80DBE4
	CMP.w #$0004
	BEQ.b CODE_80DBE9
CODE_80DBDA:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	RTS

CODE_80DBE4:
	BIT.w $7E8654,x
	BMI.b CODE_80DBDA
CODE_80DBE9:
	LDA.w #$0004
	STA.b $72
	LDA.w #DATA_80A23A
	STA.b $70
	STZ.w $7E6704,x
	JSR.w CODE_80EFB4
	BCC.b CODE_80DC1C
	LDA.w !RAM_JP_Exterior_Player_InAirFlagLo
	BNE.b CODE_80DC16
	LDA.w $7E47B4,y
	BNE.b CODE_80DC14
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
	STZ.w !RAM_JP_Exterior_Player_WalkingFrameLo
CODE_80DC14:
	BRA.b CODE_80DC27

CODE_80DC16:
	LDA.w #$FFFF
	STA.w $7E47B4,y
CODE_80DC1C:
	LDA.w $0E31
	BNE.b CODE_80DC27
	LDA.w #$0000
	STA.w $7E47B4,y
CODE_80DC27:
	JSR.w CODE_80F1E1
	BCC.b CODE_80DC2F
	JSR.w CODE_80DB03
CODE_80DC2F:
	TXY
	LDA.w $7E7E80,x
	BEQ.b CODE_80DC38
	JMP.w CODE_80D25C

CODE_80DC38:
	LDA.w #!Define_JP_Exterior_Sprite12_Velociraptor_StunnedTimer
	CMP.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	BCS.b CODE_80DC43
	STA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
CODE_80DC43:
	DEC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	BNE.b CODE_80DC51
	LDA.w #!Define_JP_ExteriorSpriteID12_Velociraptor
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	STZ.w $7E47B4,x
CODE_80DC51:
	RTS

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

CODE_80DC52:
	TYX
	STZ.w $7E6704,x
	LDA.w $7E7E80,x
	BEQ.b CODE_80DC5F
	JSR.w CODE_80D25C
	TYX
CODE_80DC5F:
	JSR.w CODE_80EFB4
	BCC.b CODE_80DC70
	LDA.w $0DFB
	STA.w !RAM_JP_Exterior_Player_XPosLo
	LDA.w $0DFD
	STA.w !RAM_JP_Exterior_Player_YPosLo
CODE_80DC70:
	LDA.w $7E3FE0,x
	BNE.b CODE_80DC90
	LDA.w $7E8654,x
	BPL.b CODE_80DC8F
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	STA.w $7E76AC,x
	LDA.w #!Define_JP_ExteriorSpriteID3C_Unknown
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	LDA.w #$0000
	STA.w $7E380C,x
CODE_80DC8F:
	RTS

CODE_80DC90:
	DEC.w $7E3FE0,x
	JSR.w CODE_80F1E1
	BCC.b CODE_80DC9D
	LDY.b $BE
	JSR.w CODE_80C7BA
CODE_80DC9D:
	RTS

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

CODE_80DC9E:
	TYX
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	STA.w $7E76AC,x
	RTS

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

CODE_80DCA9:
	LDA.b $34
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w $0437
	BPL.b CODE_80DCB8
	EOR.w #$FFFF
	INC
CODE_80DCB8:
	STA.w $0439
	ASL
	STA.w $043B
	ASL
	STA.w $043F
	SEC
	SBC.w $0439
	STA.w $043D
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.b $36
	STA.w $0441
	BPL.b CODE_80DCD9
	EOR.w #$FFFF
	INC
CODE_80DCD9:
	STA.w $0443
	ASL
	STA.w $0445
	ASL
	STA.w $0449
	SEC
	SBC.w $0443
	STA.w $0447
	LDA.w $043F
	CMP.w $0443
	BCS.b CODE_80DCFA
	LDA.w $0441
	BPL.b CODE_80DD6A
	BMI.b CODE_80DD5A			; Note: This will always branch.

CODE_80DCFA:
	LDA.w $043D
	CMP.w $0445
	BCS.b CODE_80DD15
	LDA.w $0441
	BPL.b CODE_80DD0E
	LDA.w $0437
	BPL.b CODE_80DD56
	BMI.b CODE_80DD5E			; Note: This will always branch.

CODE_80DD0E:
	LDA.w $0437
	BPL.b CODE_80DD6E
	BMI.b CODE_80DD66			; Note: This will always branch.

CODE_80DD15:
	LDA.w $043B
	CMP.w $0447
	BCS.b CODE_80DD30
	LDA.w $0441
	BPL.b CODE_80DD29
	LDA.w $0437
	BPL.b CODE_80DD82
	BMI.b CODE_80DD86			; Note: This will always branch.

CODE_80DD29:
	LDA.w $0437
	BPL.b CODE_80DD72
	BMI.b CODE_80DD62			; Note: This will always branch.

CODE_80DD30:
	LDA.w $0439
	CMP.w $0449
	BCS.b CODE_80DD4B
	LDA.w $0441
	BPL.b CODE_80DD44
	LDA.w $0437
	BPL.b CODE_80DD7E
	BMI.b CODE_80DD8A			; Note: This will always branch.

CODE_80DD44:
	LDA.w $0437
	BPL.b CODE_80DD76
	BMI.b CODE_80DD92			; Note: This will always branch.

CODE_80DD4B:
	LDA.w $0437
	BPL.b CODE_80DD7A
	BMI.b CODE_80DD8E			; Note: This will always branch.

CODE_80DD52:
	LDA.w #$FFFF
	RTS

CODE_80DD56:
	LDA.w #$0007
	RTS

CODE_80DD5A:
	LDA.w #$0008
	RTS

CODE_80DD5E:
	LDA.w #$0009
	RTS

CODE_80DD62:
	LDA.w #$000E
	RTS

CODE_80DD66:
	LDA.w #$000F
	RTS

CODE_80DD6A:
	LDA.w #$0000
	RTS

CODE_80DD6E:
	LDA.w #$0001
	RTS

CODE_80DD72:
	LDA.w #$0002
	RTS

CODE_80DD76:
	LDA.w #$0003
	RTS

CODE_80DD7A:
	LDA.w #$0004
	RTS

CODE_80DD7E:
	LDA.w #$0005
	RTS

CODE_80DD82:
	LDA.w #$0006
	RTS

CODE_80DD86:
	LDA.w #$000A
	RTS

CODE_80DD8A:
	LDA.w #$000B
	RTS

CODE_80DD8E:
	LDA.w #$000C
	RTS

CODE_80DD92:
	LDA.w #$000D
	RTS

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

DATA_80DD96:
	dw $10F0,$FF06,$0003,$3200,$FF03,$0250,$00A0,$8004
	dw $02E0,$00E0,$0008,$02E0,$0150,$0008,$0250,$0100
	dw $8006,$FFFF,$0000,$0250,$0100,$10F0,$FF05,$02B0
	dw $0100,$8004,$02F0,$0190,$0008,$02D0,$01E0,$0008
	dw $0290,$0200,$0008,$0240,$0220,$8006,$FFFF,$002A
	dw $0330,$00E0,$10F0,$FF05,$01C0,$02F0,$8004,$01D0
	dw $0290,$0008,$0230,$0290,$0008,$0270,$02F0,$0008
	dw $02B0,$0310,$8006,$FFFF,$0054,$0170,$0330,$10F0
	dw $FF06,$0007,$3200,$FF03,$0270,$02E0,$8004,$0200
	dw $02E0,$0008,$01B0,$0310,$0008,$0160,$0330,$8006
	dw $FFFF,$007E,$02A0,$0310,$10F0,$FF05,$0230,$03F0
	dw $8004,$02F0,$03F0,$0008,$0320,$0410,$8006,$FFFF
	dw $00A8,$0260,$0440,$10F0,$FF06,$0006,$3200,$FF03
	dw $0300,$03D0,$8004,$02B0,$03F0,$0008,$0270,$0430
	dw $8006,$FFFF,$00C6,$0310,$0420,$10F0,$FF06,$0001
	dw $3200,$0380,$0340,$8004,$0380,$0300,$0008,$0440
	dw $0320,$0008,$0450,$0350,$0008,$0450,$0350,$8006
	dw $FFFF,$00EA,$03B0,$0370,$10F0,$FF06,$0007,$3200
	dw $0490,$0340,$8004,$04C0,$0300,$0008,$0420,$02E0
	dw $0008,$03D0,$0330,$0008,$03D0,$0360,$8006,$FFFF
	dw $0118,$0450,$0370,$10F0,$FF06,$0007,$3200,$FF04
	dw $015A,$FFFF,$0146,$0550,$01E0,$04E0,$0170,$8006
	dw $04E0,$0110,$0008,$0490,$00C0,$0008,$0490,$0100
	dw $0008,$0540,$0100,$0008,$0540,$0180,$0008,$FFFF
	dw $015A,$FFFF,$FFFF,$10F0,$FF06,$0001,$3200,$0840
	dw $0270,$8004,$08A0,$0270,$0008,$08E0,$0260,$8006
	dw $FFFF,$0186,$0800,$0270,$10F0,$FF06,$0007,$3200
	dw $08E0,$0230,$8004,$0890,$0200,$0008,$0830,$0240
	dw $0008,$0800,$0260,$8006,$FFFF,$01A8,$08E0,$0260
	dw $10F0,$FF06,$0001,$3200,$0DE0,$0170,$8004,$0E10
	dw $0130,$0008,$0EA0,$0130,$0008,$0EE0,$0140,$8006
	dw $FFFF,$01D0,$0E00,$0190,$10F0,$FF06,$0006,$3200
	dw $0EA0,$00E0,$8004,$0E50,$00E0,$0008,$0E50,$0170
	dw $0008,$0E10,$0190,$8006,$FFFF,$01F8,$0ED0,$0110
	dw $10F0,$FF05,$0D80,$0320,$8004,$0DF0,$02F0,$0008
	dw $0E40,$02F0,$0008,$0E80,$02F0,$8006,$FFFF,$0220
	dw $0D40,$0320,$10F0,$FF06,$0001,$3200,$FF03,$0DE0
	dw $0330,$8004,$0DB0,$0360,$0008,$0D90,$0320,$0008
	dw $0DF0,$0300,$0008,$0E10,$0330,$8006,$FFFF,$0244
	dw $0E10,$0330,$10F0,$FF05,$0E90,$0460,$8004,$0ED0
	dw $0470,$0008,$0EE0,$0400,$0008,$0F20,$0400,$8006
	dw $FFFF,$0274,$0E60,$0440,$10F0,$FF06,$0006,$3200
	dw $FF03,$0EF0,$03E0,$8004,$0EB0,$03F0,$0008,$0E90
	dw $0450,$0008,$0E50,$0470,$8006,$FFFF,$0298,$0F10
	dw $0410,$10F0,$FF06,$0005,$3200,$0DA0,$05A0,$8004
	dw $0D20,$05F0,$0008,$0CA0,$0580,$0008,$0C50,$0590
	dw $8006,$FFFF,$02C2,$0DD0,$05A0,$10F0,$FF06,$0002
	dw $3200,$0F10,$0530,$8004,$0F40,$04F0,$0008,$0F70
	dw $04F0,$0008,$0FA0,$04F0,$8006,$FFFF,$02EA,$0EF0
	dw $0560,$10F0,$FF05,$0ED0,$05C0,$8004,$0F20,$05C0
	dw $0008,$0F60,$0620,$0008,$0F90,$0630,$8006,$FFFF
	dw $0312,$0ED0,$0600,$10F0,$FF06,$0007,$3200,$FF03
	dw $0F50,$0660,$8004,$0F10,$0640,$0008,$0F10,$0610
	dw $0008,$0F60,$0610,$0008,$0F90,$0610,$8006,$FFFF
	dw $0336,$0F80,$0670,$10F0,$FF05,$0200,$06D0,$8004
	dw $0230,$06A0,$0008,$0250,$06F0,$0008,$0280,$06F0
	dw $8006,$FFFF,$0366,$01E0,$06F0,$10F0,$FF06,$0006
	dw $3200,$FF03,$0260,$0750,$8004,$0220,$0770,$0008
	dw $0210,$0730,$0008,$01E0,$0700,$8006,$FFFF,$038A
	dw $0290,$0720,$10F0,$FF05,$02B0,$0250,$8004,$02E0
	dw $0880,$0008,$0310,$0870,$8006,$FFFF,$03B4,$0280
	dw $08C0,$10F0,$FF06,$0007,$3200,$02D0,$0950,$8004
	dw $02C0,$08F0,$0008,$03A0,$37EC,$0008,$03D0,$0930
	dw $8006,$FFFF,$03D2,$0310,$0940,$10F0,$FF06,$0005
	dw $3200,$0380,$0AF0,$8004,$0380,$0B80,$0008,$03A0
	dw $0BA0,$8006,$FFFF,$03FA,$03D0,$0B10,$10F0,$FF06
	dw $0006,$3200,$0310,$0BC0,$8004,$0280,$0BC0,$0008
	dw $0250,$0BE0,$0008,$0250,$0C10,$8006,$FFFF,$041C
	dw $0340,$0BB0,$10F0,$FF05,$0520,$0A20,$8004,$FF03
	dw $05F0,$0A20,$0008,$05C0,$0A40,$0008,$05A0,$0A70
	dw $8006,$FFFF,$0444,$04D0,$0A20,$10F0,$FF06,$0006
	dw $3200,$FF03,$FF05,$0560,$0A90,$8004,$04D0,$0A90
	dw $0008,$04A0,$0AC0,$8006,$FFFF,$046A,$0590,$0A90
	dw $10F0,$FF05,$0480,$0BB0,$8004,$0480,$0B70,$0008
	dw $0510,$0B70,$0008,$0520,$0BA0,$8006,$FFFF,$0490
	dw $0440,$0BB0,$10F0,$FF06,$0006,$3200,$FF03,$0550
	dw $0B70,$8004,$0510,$0B70,$0008,$04F0,$0BB0,$8006
	dw $FFFF,$04B4,$0580,$0B70,$10F0,$FF06,$0003,$3200
	dw $0080,$0C30,$8004,$00A0,$0BE0,$0008,$00D0,$0BE0
	dw $0008,$00D0,$0C60,$0008,$0080,$0C90,$0008,$0040
	dw $0CB0,$8006,$FFFF,$04D8,$0040,$0C70,$10F0,$FF06
	dw $0005,$3200,$00E0,$0C20,$8004,$00B0,$0C20,$0008
	dw $00B0,$0C80,$0008,$00D0,$0CA0,$0008,$0100,$0CC0
	dw $8006,$FFFF,$050C,$0110,$0C50,$10F0,$FF06,$0000
	dw $3200,$FF04,$054E,$FFFF,$053A,$0300,$0DE0,$0300
	dw $0CF0,$0008,$0370,$0D30,$0008,$0370,$0D80,$0008
	dw $0300,$0D80,$0008,$FF07,$0572,$FFFF,$054E,$FFFF
	dw $FFFF,$03A0,$0DF0,$0008,$0370,$0E50,$0008,$FFFF
	dw $053A,$0300,$0DE0,$10F0,$FF06,$0005,$3200,$0530
	dw $0EB0,$8004,$04E0,$0ED0,$0008,$04B0,$0F10,$0008
	dw $04B0,$0F70,$0008,$04D0,$0FA0,$8006,$FFFF,$0586
	dw $0570,$0EC0,$10F0,$FF06,$0007,$3200,$0520,$0F40
	dw $8004,$0520,$0ED0,$0008,$0570,$0EC0,$8006,$FFFF
	dw $05B4,$02A0,$0310,$10F0,$FF06,$0001,$3200,$FF04
	dw $05EA,$FFFF,$05D6,$06C0,$05D0,$0720,$0510,$0008
	dw $07A0,$0510,$0008,$0760,$05A0,$0008,$06D0,$0520
	dw $0008,$06D0,$0570,$0008,$FFFF,$05EA,$FFFF,$FFFF
	dw $03A0,$0DF0,$0008,$0370,$0E50,$0008,$FFFF,$05D6
	dw $0300,$0DE0,$10F0,$FF05,$0A30,$0680,$8004,$FF03
	dw $0A70,$06C0,$0008,$0A70,$0760,$0008,$0A40,$0790
	dw $0008,$0A30,$07C0,$8006,$FFFF,$0624,$09E0,$06A0
	dw $10F0,$FF05,$0AA0,$0680,$8004,$0A70,$06C0,$0008
	dw $0A70,$0700,$0008,$0AA0,$0710,$0008,$FF03,$0AD0
	dw $0710,$8006,$FFFF,$0650,$0AE0,$06A0,$10F0,$FF06
	dw $0006,$3200,$FF03,$FF05,$0AB0,$0710,$8004,$0A70
	dw $0710,$0008,$0A10,$06F0,$8006,$FFFF,$067C,$0AD0
	dw $0710,$10F0,$FF06,$0000,$3200,$0970,$0790,$8004
	dw $0970,$0730,$0008,$09B0,$06F0,$0008,$09E0,$06F0
	dw $8006,$FFFF,$06A2,$09B0,$07B0,$10F0,$FF05,$0770
	dw $0B20,$8004,$07D0,$0B60,$0008,$07D0,$0B80,$0008
	dw $07A0,$0BA0,$8006,$FFFF,$06CA,$0730,$0B20,$10F0
	dw $FF05,$07E0,$0BC0,$8004,$0820,$0BA0,$0008,$0840
	dw $0BA0,$0008,$0870,$0BA0,$8006,$FFFF,$06EE,$07A0
	dw $0BA0,$10F0,$FF06,$0007,$3200,$FF03,$0880,$0B70
	dw $8004,$0880,$0B30,$0008,$07E0,$0B30,$0008,$07B0
	dw $0B70,$0008,$07A0,$0B90,$8006,$FFFF,$0712,$0870
	dw $0BA0,$10F0,$FF06,$0005,$3200,$FF03,$0930,$0A70
	dw $8004,$0930,$0AC0,$0008,$08E0,$0AC0,$8006,$FFFF
	dw $0742,$0970,$0A50,$10F0,$FF06,$0007,$3200,$08E0
	dw $0A80,$8004,$0860,$0A80,$0008,$0830,$0A90,$0008
	dw $0820,$0AB0,$8006,$FFFF,$0766,$08E0,$0AB0,$10F0
	dw $FF05,$0940,$0B60,$8004,$0940,$0B10,$0008,$0970
	dw $0AF0,$8006,$FFFF,$078E,$0970,$0B60,$10F0,$FF06
	dw $0000,$3200,$FF04,$07C0,$FFFF,$07AC,$0B20,$0A70
	dw $0AE0,$09F0,$0008,$0AB0,$0A50,$0008,$0AE0,$09F0
	dw $0008,$0B50,$09F0,$0008,$0BD0,$09A0,$0008,$0B50
	dw $09F0,$0008,$FFFF,$07C0,$FFFF,$FFFF,$10F0,$03A0
	dw $0DF0,$0008,$0370,$0E50,$0008,$FFFF,$07AC,$0B20
	dw $0A70,$10F0,$FF06,$0001,$3200,$FF04,$0816,$FFFF
	dw $0802,$0BC0,$0B70,$0C30,$0AE0,$0008,$0BC0,$0AF0
	dw $0008,$0B70,$0AF0,$0008,$0B70,$0B60,$0008,$0AF0
	dw $0B60,$0008,$0B70,$0B60,$0008,$0B70,$0AF0,$0008
	dw $0BC0,$0AF0,$0008,$FFFF,$0816,$FFFF,$FFFF,$03A0
	dw $0DF0,$0008,$0370,$0E50,$0008,$FFFF,$0802,$0BC0
	dw $0B70,$10F0,$FF05,$0B00,$0D70,$8004,$0B20,$0D50
	dw $0008,$0B60,$0D50,$8006,$FFFF,$0862,$0AD0,$0D90
	dw $10F0,$FF06,$0007,$3200,$FF03,$0B80,$0D30,$8004
	dw $0B00,$0D10,$0008,$0AD0,$0D30,$0008,$0A90,$0D50
	dw $8006,$FFFF,$0880,$0B50,$0D60,$10F0,$FF06,$0001
	dw $3200,$0BA0,$0DD0,$8004,$0C30,$0DD0,$0008,$0C60
	dw $0E10,$8006,$FFFF,$08AA,$0BC0,$0E00,$10F0,$FF06
	dw $0007,$3200,$0C80,$0DE0,$8004,$0C40,$0DC0,$0008
	dw $0BF0,$0DD0,$0008,$0BD0,$0E00,$8006,$FFFF,$08CC
	dw $0C60,$0E10,$10F0,$FF06,$0002,$3200,$0C20,$0F30
	dw $8004,$0CA0,$0F30,$0008,$0D00,$0F90,$0008,$0D00
	dw $0FC0,$8006,$FFFF,$08F4,$0C20,$0F60

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

CODE_80E6B2:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80E6D0
	JSR.w CODE_80EF12
	BCC.b CODE_80E6D4
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	ADC.w #!Define_JP_Player_DilophosaurSpitDamage
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #$005A
	CLC
	ADC.w $03BE
	STA.w $03BE
CODE_80E6D0:
	STZ.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

CODE_80E6D4:
	PHX
	LDY.w !RAM_JP_Exterior_Sprites_YPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	JSR.w CODE_80E6F2
	PLX
	TXY
	LDA.w $049D
	LSR
	LSR
	AND.w #$0001
	CLC
	ADC.w $7E43CA,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	JMP.w CODE_80B437

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

CODE_80E6F2:
	JSL.l CODE_80A147
	BMI.b CODE_80E716
	CMP.w #$6800
	BCS.b CODE_80E716
	CMP.w $7E6ED8,x
	BCC.b CODE_80E717
	BNE.b CODE_80E732
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	BNE.b CODE_80E716
	LDA.w #$0018
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
CODE_80E716:
	RTS

CODE_80E717:
	LDA.w $7E6ED8,x
	CMP.w #$0800
	BEQ.b CODE_80E731
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	BEQ.b CODE_80E716
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STZ.w !RAM_JP_Exterior_Sprites_ZPosLo,x
CODE_80E731:
	RTS

CODE_80E732:
	LDA.w #$FFFF
	STA.w $7E6704,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	INC
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	RTS

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

CODE_80E740:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	ASL
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w $7E5F31,y
	STA.w $7E5F31,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.w $7E631B,y
	STA.w $7E631B,y
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	TYX
	RTS

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

CODE_80E799:
	TYX
	BIT.w $7E8654,x
	BMI.b CODE_80E7A8
	LDA.b $6C
	BEQ.b CODE_80E7AF
	CMP.w #$0001
	BEQ.b CODE_80E7AF
CODE_80E7A8:
	LDA.w #$FFFF
	STA.w $7E76AC,x
	RTS

CODE_80E7AF:
	LDA.w #$0001
	STA.b $6C
	JSR.w CODE_80EF64
	BCC.b CODE_80E7C0
	LDA.w #!Define_JP_Player_DilophosaurDamage
	JSR.w CODE_80AA49
	TYX
CODE_80E7C0:
	JSR.w CODE_80F16C
	BCS.b CODE_80E7C8
	BRL.w CODE_80E84E

CODE_80E7C8:
	LDY.b $BE
	LDA.w $7E6704,y
	BMI.b CODE_80E84E
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BEQ.b CODE_80E84B
	CMP.w #!Define_JP_WeaponID_CattleProd
	BEQ.b CODE_80E81F
	PHA
	JSR.w CODE_80C7BA
	TXY
	PLA
	CMP.w #!Define_JP_WeaponID_Shotgun
	BEQ.b CODE_80E807
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BEQ.b CODE_80E82D
	LDA.w #!Define_JP_SoundID_ExplodingDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #$02CA
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80E7FB
	LDA.w #$02D2
CODE_80E7FB:
	STA.w $7E7E80,x
	LDA.w #!Define_JP_ExteriorSpriteID32_DeadDilophosaur
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	JMP.w CODE_80D5CE

CODE_80E807:
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CLC
	ADC.w #!Define_JP_Exterior_Sprite1C_Dilophosaur_ShotgunDamage
	STA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite1C_Dilophosaur_MaxDamage
	BCC.b CODE_80E84E
	BRA.b CODE_80E82D

CODE_80E81F:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	CMP.w #!Define_JP_Exterior_Sprite1C_Dilophosaur_MaxDamage
	BCC.b CODE_80E84E
CODE_80E82D:
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSL.l JP_Exterior_BufferSoundEffect_Main
	LDA.w #$02DA
	BIT.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	BVC.b CODE_80E83F
	LDA.w #$02E4
CODE_80E83F:
	STA.w $7E7E80,x
	LDA.w #!Define_JP_ExteriorSpriteID32_DeadDilophosaur
	STA.w !RAM_JP_Exterior_Sprites_IDLo,x
	JMP.w CODE_80D5CE

CODE_80E84B:
	INC.w $0399
CODE_80E84E:
	TXY
	JSR.w CODE_80F3E4
	BCC.b CODE_80E859
	CMP.w #!Define_JP_Exterior_Sprite1C_Dilophosaur_MaxDamage
	BCS.b CODE_80E82D
CODE_80E859:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	CMP.w $7E3BF6,x
	BEQ.b CODE_80E8A9
	LDA.w $7E4B9E,x
	BEQ.b CODE_80E873
	JSL.l CODE_819FAE
	STA.w $7E3BF6,y
	TYX
	CMP.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	BEQ.b CODE_80E8A9
CODE_80E873:
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	TAY
	LDA.w $049D
	AND.w #$0007
	BNE.b CODE_80E8A8
	TYA
	SEC
	SBC.w $7E3BF6,x
	BPL.b CODE_80E88E
	CMP.w #$FFFC
	BCC.b CODE_80E896
	INY
	BRA.b CODE_80E897

CODE_80E88E:
	CMP.w #$0004
	BCC.b CODE_80E896
	INY
	BRA.b CODE_80E897

CODE_80E896:
	DEY
CODE_80E897:
	TYA
	AND.w #$0007
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	TXY
	ASL
	TAX
	LDA.l DATA_80E9C2,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
CODE_80E8A8:
	RTS

CODE_80E8A9:
	LDA.w $7E4B9E,x
	BEQ.b CODE_80E8BE
	STZ.w $7E4B9E,x
	LDA.w $7E3BF6,x
	ASL
	TAX
	LDA.l DATA_80E9B2,x
	STA.w $7E7E80,y
	TYX
CODE_80E8BE:
	LDA.w $7E7E80,x
	BNE.b CODE_80E8C6
	BRL.w CODE_80E94D

CODE_80E8C6:
	JSR.w CODE_80D25C
	TYX
	LDA.w $7E6704,x
	BEQ.b CODE_80E94A
	STZ.w $7E6704,x
	LDY.w #$03D0
	LDA.w $7E3408
	BEQ.b CODE_80E8E2
	LDY.w #$03CE
	LDA.w $7E3406
	BNE.b CODE_80E949
CODE_80E8E2:
	LDA.w #!Define_JP_ExteriorSpriteID58_DilophosaurSpit
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	LDA.w #$0002
	STA.w $7E380C,y
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	STA.w $7E76AC,y
	INC
	STA.w $7E8654,y
	LDA.w #$0010
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	LDA.w $7E6ED8,x
	STA.w $7E6ED8,y
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LDA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,x
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	ASL
	TAX
	LDA.l DATA_80E9D2,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.l DATA_80E9E2,x
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LDA.l DATA_80E9F2,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	STA.w $7E43CA,y
	LDA.w #$0018
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	LDA.w #!Define_JP_SoundID_DilophosaurSpitting
	JSL.l JP_Exterior_BufferSoundEffect_Main
	RTS

CODE_80E949:
	TXY
CODE_80E94A:
	JMP.w CODE_80E740

CODE_80E94D:
	STZ.w $7E6704,x
CODE_80E950:
	LDX.w $7E3FE0,y
	LDA.l DATA_80EA02,x
	BPL.b CODE_80E96E
	LDA.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	LDA.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	LDA.l DATA_80EA02+$02,x
	STA.w $7E3FE0,y
	BRA.b CODE_80E950

CODE_80E96E:
	PHA
	INX
	INX
	TXA
	STA.w $7E3FE0,y
	PLA
	CMP.w #$0200
	BEQ.b CODE_80E9A1
	AND.w #$00FF
	STA.w $7E3BF6,y
	ASL
	TAX
	LDA.l DATA_80E991,x
	STA.w $7E7E80,y
	LDA.w #$0006
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	RTS

DATA_80E991:
	dw $01FA,$0204,$020E,$0218,$0222,$022C,$0236,$0240

CODE_80E9A1:
	STA.w $7E4B9E,y
	JSL.l CODE_819FAE
	STA.w $7E3BF6,y
	LDA.w #$0000
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	RTS

DATA_80E9B2:
	dw $024A,$025A,$026A,$027A,$028A,$029A,$02AA,$02BA

DATA_80E9C2:
	dw $020C,$0210,$0214,$0218,$021C,$4218,$4214,$4210

DATA_80E9D2:
	dw $0010,$0028,$0028,$0028,$0010,$FFF8,$FFF8,$FFF8

DATA_80E9E2:
	dw $0018,$0018,$0020,$0028,$0038,$0028,$0020,$0018

DATA_80E9F2:
	dw $0A60,$0A62,$0A64,$0A66,$0A68,$4A66,$4A64,$4A62

DATA_80EA02:
	dw $0107,$0106,$0200,$0107,$0107,$0106,$0200,$0104
	dw $0103,$0103,$0104,$0200,$0103,$0102,$0102,$0200
	dw $0100,$0100,$FFFF,$0000,$0103,$0101,$0200,$0105
	dw $0104,$0200,$0100,$0107,$0200,$FFFF,$0028,$0200
	dw $0104,$0200,$0106,$0106,$0200,$0102,$0102,$0100
	dw $0107,$0200,$0103,$FFFF,$003E,$0107,$0200,$0105
	dw $0105,$0103,$0104,$0200,$0103,$0102,$0101,$0200
	dw $0101,$0100,$0107,$0200,$0106,$FFFF,$005A,$0102
	dw $0100,$0200,$0102,$0100,$0107,$0106,$0200,$0107
	dw $0106,$0104,$0200,$0104,$0103,$0103,$FFFF,$007E
	dw $0102,$0102,$0200,$0102,$0103,$0105,$0200,$0103
	dw $0106,$0106,$0107,$0200,$0101,$0107,$0106,$0200
	dw $FFFF,$00A0,$0104,$0104,$0103,$0200,$0102,$0102
	dw $0102,$0102,$0200,$0102,$0102,$0100,$0100,$0200
	dw $0104,$0104,$0106,$0106,$0106,$0200,$0106,$0106
	dw $0106,$0107,$0200,$0100,$0100,$FFFF,$00C4,$0103
	dw $0104,$0104,$0200,$0104,$0104,$0104,$0106,$0106
	dw $0200,$0106,$0102,$0102,$0102,$0200,$0100,$0100
	dw $0100,$0100,$0100,$0107,$0200,$FFFF,$00FE,$0104
	dw $0106,$0200,$0106,$0100,$0100,$0200,$0107,$0107
	dw $0200,$0103,$0103,$0102,$0102,$0200,$0104,$FFFF
	dw $012E,$0102,$0103,$0200,$0104,$0200,$0100,$0107
	dw $0200,$0106,$0200,$FFFF,$0152,$0107,$0106,$0200
	dw $0105,$0105,$0106,$0106,$0200,$0107,$0100,$0101
	dw $0102,$0200,$0101,$0102,$0102,$0103,$0200,$0103
	dw $0104,$FFFF,$016A,$0200,$0107,$0200,$0105,$0200
	dw $0103,$0200,$0101,$FFFF,$0196,$0200,$0105,$0105
	dw $0104,$0105,$0106,$0106,$0106,$0200,$0200,$0102
	dw $0102,$0102,$0101,$0100,$0101,$0101,$FFFF,$01AA
	dw $0102,$0102,$0103,$0200,$0102,$0101,$0101,$0200
	dw $0105,$0105,$0104,$0105,$0104,$0200,$0106,$0106
	dw $0106,$0107,$0200,$0100,$0101,$0100,$0200,$FFFF
	dw $01D0,$0107,$0107,$0200,$0105,$0107,$0105,$0101
	dw $0103,$0103,$0200,$0101,$0103,$FFFF,$0202,$0200
	dw $0104,$0103,$0200,$0105,$0107,$0101,$0200,$0100
	dw $0100,$0107,$0200,$0103,$0104,$FFFF,$021E,$0106
	dw $0106,$0106,$0200,$0106,$0106,$0104,$0100,$0200
	dw $0102,$0102,$0102,$0102,$0102,$0200,$FFFF,$023E
	dw $0104,$0105,$0106,$0107,$0200,$0103,$0103,$0104
	dw $0200,$0102,$0101,$0100,$0200,$0100,$0107,$0200
	dw $FFFF,$0260,$0100,$0100,$0107,$0200,$0105,$0103
	dw $0101,$0104,$0104,$0200,$FFFF,$0284,$0200,$0200
	dw $0107,$0100,$0200,$0101,$0102,$0102,$0200,$0103
	dw $0104,$0105,$0200,$0106,$0106,$FFFF,$029C,$0103
	dw $0200,$0105,$0106,$0107,$0200,$0106,$0107,$0100
	dw $0200,$0103,$0104,$0102,$0200,$0102,$0101,$FFFF
	dw $02BE,$0107,$0105,$0104,$0200,$0103,$0102,$0200
	dw $0101,$0103,$0101,$0200,$0103,$0101,$0100,$0200
	dw $0107,$0106,$0200,$0105,$0107,$0105,$0200,$FFFF
	dw $02E2,$0200,$0200,$0106,$0200,$0200,$0102,$FFFF
	dw $0312,$0105,$0107,$0200,$0100,$0101,$0200,$0107
	dw $0101,$0107,$0200,$0101,$0103,$0101,$0200,$0103
	dw $0104,$0200,$0105,$0103,$0105,$0200,$0103,$0105
	dw $0107,$0200,$FFFF,$0322,$0101,$0100,$0100,$0107
	dw $0200,$0106,$0106,$0106,$0200,$0106,$0106,$0105
	dw $0104,$0104,$0200,$0103,$0102,$0102,$0200,$0102
	dw $0102,$0102,$0200,$FFFF,$0358,$0107,$0200,$0105
	dw $0200,$0103,$0200,$0101,$0200,$FFFF,$038A,$0102
	dw $0102,$0102,$0200,$0103,$0104,$0104,$0105,$0200
	dw $0106,$0107,$0100,$0101,$0200,$0106,$0106,$0100
	dw $0200,$FFFF,$039E,$0100,$0100,$0200,$0107,$0101
	dw $0200,$0103,$0105,$0200,$0104,$0104,$0200,$FFFF
	dw $03C6,$0107,$0107,$0200,$0102,$0102,$0102,$0102
	dw $0200,$0105,$0105,$0103,$0103,$0200,$0106,$0106
	dw $0106,$0106,$0200,$0101,$0101,$0200,$FFFF,$03E2
	dw $0100,$0101,$0200,$0105,$0104,$0106,$0200,$0106
	dw $0104,$0200,$0104,$0102,$0102,$0200,$0100,$0100
	dw $FFFF,$0410,$0104,$0100,$0200,$0200,$FFFF,$0434
	dw $0102,$0102,$0200,$0101,$0101,$0102,$0200,$0104
	dw $0104,$0106,$0106,$0200,$0106,$0105,$0105,$0200
	dw $0100,$0100,$FFFF,$0440,$0101,$0101,$0100,$0100
	dw $0200,$0104,$0104,$0200,$0104,$0104,$0105,$0105
	dw $0200,$0100,$0100,$0200,$FFFF,$0468

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

CODE_80EE8E:
	LDA.w $0E0B					;\ Optimization: Junk code
	ORA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo	;|
	ORA.w $0E31					;/
	STA.b $BC
	STZ.b $D2
	STZ.b $D4
	STZ.b $D6
	STZ.b $D8
	STZ.b $DA
	STZ.b $E0
	STZ.b $E2
	STZ.b $E4
	STZ.b $E6
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	TAX
	CLC
	ADC.w #$0008
	STA.b $D0
	ADC.w #$0008
	STA.b $DE
	SEC
	SBC.w #$001C
	BMI.b CODE_80EEDE
	STA.b $D2
	SBC.w #$0010
	BMI.b CODE_80EEDE
	STA.b $D4
	SBC.w #$0010
	BMI.b CODE_80EEDE
	STA.b $D6
	SBC.w #$0010
	BMI.b CODE_80EEDE
	STA.b $D8
	SBC.w #$0020
	BMI.b CODE_80EEDE
	STA.b $DA
CODE_80EEDE:
	TXA
	CLC
	ADC.w #$0016
	STA.b $DC
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	SEC
	SBC.w #$0003
	TAX
	STA.b $E2
	SEC
	SBC.w #$0010
	STA.b $E4
	SBC.w #$0010
	STA.b $E6
	TXA
	CLC
	ADC.w #$0010
	STA.b $EC
	STA.b $E0
	ADC.w #$0008
	STA.b $EA
	ADC.w #$000C
	STA.b $E8
	SEC
	RTS

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

CODE_80EF0F:
	TYX
	BRA.b CODE_80EF16

CODE_80EF12:
	LDA.b $BC
	BNE.b CODE_80EF5F
CODE_80EF16:					; Note: Seems like some sort of sprite collision routine.
	LDA.w $7E6ED8,x
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BNE.b CODE_80EF36
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.b $D2
	BCC.b CODE_80EF36
	CMP.b $DC
	BCS.b CODE_80EF36
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.b $E0
	BCC.b CODE_80EF36
	CMP.b $E8
	BCS.b CODE_80EF36
	SEC
	RTS

CODE_80EF36:
	CLC
	RTS

CODE_80EF38:
	TYX
	BRA.b CODE_80EF3F

CODE_80EF3B:
	LDA.b $BC
	BNE.b CODE_80EF5F
CODE_80EF3F:
	LDA.w $7E6ED8,x
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BNE.b CODE_80EF36
CODE_80EF47:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.b $D4
	BCC.b CODE_80EF5F
	CMP.b $DC
	BCS.b CODE_80EF5F
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.b $E2
	BCC.b CODE_80EF5F
	CMP.b $EA
	BCS.b CODE_80EF5F
	SEC
	RTS

CODE_80EF5F:
	CLC
	RTS

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

CODE_80EF61:
	TYX
	BRA.b CODE_80EF68

CODE_80EF64:
	LDA.b $BC
	BNE.b CODE_80EF5F
CODE_80EF68:
	LDA.w $7E6ED8,x
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BNE.b CODE_80EF88
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.b $D6
	BCC.b CODE_80EF88
	CMP.b $DC
	BCS.b CODE_80EF88
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.b $E4
	BCC.b CODE_80EF88
	CMP.b $EC
	BCS.b CODE_80EF88
	SEC
	RTS

CODE_80EF88:
	CLC
	RTS

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

CODE_80EF8A:
	TYX
	LDA.b $BC
	BNE.b CODE_80EFAF
	LDA.w $7E6ED8,x
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BNE.b CODE_80EFAF
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.b $D4
	BCC.b CODE_80EFAF
	CMP.b $DC
	BCS.b CODE_80EFAF
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.b $E4
	BCC.b CODE_80EFAF
	CMP.b $EC
	BCS.b CODE_80EFAF
	SEC
	RTS

CODE_80EFAF:
	CLC
	RTS

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

CODE_80EFB1:
	TYX
	BRA.b CODE_80EFB8

CODE_80EFB4:
	LDA.b $BC
	BNE.b CODE_80EFAF
CODE_80EFB8:
	LDA.w $7E6ED8,x
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BNE.b CODE_80EFD8
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.b $D8
	BCC.b CODE_80EFD8
	CMP.b $DC
	BCS.b CODE_80EFD8
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.b $E6
	BCC.b CODE_80EFD8
	CMP.b $EC
	BCS.b CODE_80EFD8
	SEC
	RTS

CODE_80EFD8:
	CLC
	RTS

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

CODE_80EFDA:
	TYX
	BRA.b CODE_80EFE1

CODE_80EFDD:
	LDA.b $BC
	BNE.b CODE_80EFAF
CODE_80EFE1:
	LDA.w $7E6ED8,x
	CMP.w !RAM_JP_Exterior_Player_InteractionZPosLo
	BNE.b CODE_80F001
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.b $DA
	BCC.b CODE_80F001
	CMP.b $DC
	BCS.b CODE_80F001
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.b $E6
	BCC.b CODE_80F001
	CMP.b $EC
	BCS.b CODE_80F001
	SEC
	RTS

CODE_80F001:
	CLC
	RTS

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

CODE_80F003:
	LDA.w #$FFFF
	STA.b $C0
	STA.b $C4
	STA.b $C8
	STA.b $CC
	LDA.w $7E340A
	CMP.w #$0042
	BCC.b CODE_80F02B
	LDA.w $7E2462
	CLC
	ADC.w #$0008
	STA.b $C0
	LDA.w $7E2C36
	ADC.w #$0008
	SEC
	SBC.w $7E535A
	STA.b $C2
CODE_80F02B:
	LDA.w $7E340C
	CMP.w #$0042
	BCC.b CODE_80F048
	LDA.w $7E2464
	CLC
	ADC.w #$0008
	STA.b $C4
	LDA.w $7E2C38
	ADC.w #$0008
	SEC
	SBC.w $7E535C
	STA.b $C6
CODE_80F048:
	LDA.w $7E340E
	CMP.w #$0042
	BCC.b CODE_80F065
	LDA.w $7E2466
	CLC
	ADC.w #$0008
	STA.b $C8
	LDA.w $7E2C3A
	ADC.w #$0008
	SEC
	SBC.w $7E535E
	STA.b $CA
CODE_80F065:
	LDA.w $7E3410
	CMP.w #$0042
	BCC.b CODE_80F082
	LDA.w $7E2468
	CLC
	ADC.w #$0008
	STA.b $CC
	LDA.w $7E2C3C
	ADC.w #$0008
	SEC
	SBC.w $7E5360
	STA.b $CE
CODE_80F082:
	RTS

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

CODE_80F083:
	TYX
CODE_80F084:
	LDA.b $C0
	BMI.b CODE_80F09A
	LDY.w $7E6ED8,x
	CPY.w $7E72AA
	BNE.b CODE_80F09A
	LDY.w #$03D2
	STY.b $BE
	LDY.b $C2
	JSR.w CODE_80F0DE
CODE_80F09A:
	LDA.b $C4
	BMI.b CODE_80F0B0
	LDY.w $7E6ED8,x
	CPY.w $7E72AC
	BNE.b CODE_80F0B0
	LDY.w #$03D4
	STY.b $BE
	LDY.b $C6
	JSR.w CODE_80F0DE
CODE_80F0B0:
	LDA.b $C8
	BMI.b CODE_80F0C6
	LDY.w $7E6ED8,x
	CPY.w $7E72AE
	BNE.b CODE_80F0C6
	LDY.w #$03D6
	STY.b $BE
	LDY.b $CA
	JSR.w CODE_80F0DE
CODE_80F0C6:
	LDA.b $CC
	BMI.b CODE_80F0DC
	LDY.w $7E6ED8,x
	CPY.w $7E72B0
	BNE.b CODE_80F0DC
	LDY.w #$03D8
	STY.b $BE
	LDY.b $CE
	JSR.w CODE_80F0DE
CODE_80F0DC:
	CLC
	RTS

CODE_80F0DE:
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80F0F5
	CMP.w #$0010
	BCS.b CODE_80F0F5
	TYA
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	BMI.b CODE_80F0F5
	CMP.w #$0010
	BCS.b CODE_80F0F5
	PLY
	SEC
CODE_80F0F5:
	RTS

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

CODE_80F0F6:
	TYX
CODE_80F0F7:
	LDA.b $C0
	BMI.b CODE_80F10D
	LDY.w $7E6ED8,x
	CPY.w $7E72AA
	BNE.b CODE_80F10D
	LDY.w #$03D2
	STY.b $BE
	LDY.b $C2
	JSR.w CODE_80F151
CODE_80F10D:
	LDA.b $C4
	BMI.b CODE_80F123
	LDY.w $7E6ED8,x
	CPY.w $7E72AC
	BNE.b CODE_80F123
	LDY.w #$03D4
	STY.b $BE
	LDY.b $C6
	JSR.w CODE_80F151
CODE_80F123:
	LDA.b $C8
	BMI.b CODE_80F139
	LDY.w $7E6ED8,x
	CPY.w $7E72AE
	BNE.b CODE_80F139
	LDY.w #$03D6
	STY.b $BE
	LDY.b $CA
	JSR.w CODE_80F151
CODE_80F139:
	LDA.b $CC
	BMI.b CODE_80F14F
	LDY.w $7E6ED8,x
	CPY.w $7E72B0
	BNE.b CODE_80F14F
	LDY.w #$03D8
	STY.b $BE
	LDY.b $CE
	JSR.w CODE_80F151
CODE_80F14F:
	CLC
	RTS

CODE_80F151:
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80F169
	CMP.w #$0020
	BCS.b CODE_80F169
	TYA
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	BMI.b CODE_80F169
	CMP.w #$0014
	BCS.b CODE_80F169
	PLY
	SEC
	RTS

CODE_80F169:
	CLC
	RTS

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

CODE_80F16B:
	TYX
CODE_80F16C:
	LDA.b $C0
	BMI.b CODE_80F182
	LDY.w $7E6ED8,x
	CPY.w $7E72AA
	BNE.b CODE_80F182
	LDY.w #$03D2
	STY.b $BE
	LDY.b $C2
	JSR.w CODE_80F1C6
CODE_80F182:
	LDA.b $C4
	BMI.b CODE_80F198
	LDY.w $7E6ED8,x
	CPY.w $7E72AC
	BNE.b CODE_80F198
	LDY.w #$03D4
	STY.b $BE
	LDY.b $C6
	JSR.w CODE_80F1C6
CODE_80F198:
	LDA.b $C8
	BMI.b CODE_80F1AE
	LDY.w $7E6ED8,x
	CPY.w $7E72AE
	BNE.b CODE_80F1AE
	LDY.w #$03D6
	STY.b $BE
	LDY.b $CA
	JSR.w CODE_80F1C6
CODE_80F1AE:
	LDA.b $CC
	BMI.b CODE_80F1C4
	LDY.w $7E6ED8,x
	CPY.w $7E72B0
	BNE.b CODE_80F1C4
	LDY.w #$03D8
	STY.b $BE
	LDY.b $CE
	JSR.w CODE_80F1C6
CODE_80F1C4:
	CLC
	RTS

CODE_80F1C6:
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80F1DE
	CMP.w #$0028
	BCS.b CODE_80F1DE
	TYA
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	BMI.b CODE_80F1DE
	CMP.w #$0028
	BCS.b CODE_80F1DE
	PLY
	SEC
	RTS

CODE_80F1DE:
	CLC
	RTS

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

CODE_80F1E0:
	TYX
CODE_80F1E1:
	LDA.b $C0
	BMI.b CODE_80F1F7
	LDY.w $7E6ED8,x
	CPY.w $7E72AA
	BNE.b CODE_80F1F7
	LDY.w #$03D2
	STY.b $BE
	LDY.b $C2
	JSR.w CODE_80F23B
CODE_80F1F7:
	LDA.b $C4
	BMI.b CODE_80F20D
	LDY.w $7E6ED8,x
	CPY.w $7E72AC
	BNE.b CODE_80F20D
	LDY.w #$03D4
	STY.b $BE
	LDY.b $C6
	JSR.w CODE_80F23B
CODE_80F20D:
	LDA.b $C8
	BMI.b CODE_80F223
	LDY.w $7E6ED8,x
	CPY.w $7E72AE
	BNE.b CODE_80F223
	LDY.w #$03D6
	STY.b $BE
	LDY.b $CA
	JSR.w CODE_80F23B
CODE_80F223:
	LDA.b $CC
	BMI.b CODE_80F239
	LDY.w $7E6ED8,x
	CPY.w $7E72B0
	BNE.b CODE_80F239
	LDY.w #$03D8
	STY.b $BE
	LDY.b $CE
	JSR.w CODE_80F23B
CODE_80F239:
	CLC
	RTS

CODE_80F23B:
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80F253
	CMP.w #$0040
	BCS.b CODE_80F253
	TYA
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	BMI.b CODE_80F253
	CMP.w #$0040
	BCS.b CODE_80F253
	PLY
	SEC
	RTS

CODE_80F253:
	CLC
	RTS

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

CODE_80F255:
	BMI.b CODE_80F269
	LDY.w $7E6ED8,x
	CPY.w $7E72AA
	BNE.b CODE_80F269
	LDY.w #$03D2
	STY.b $BE
	LDY.b $C2
	JSR.w CODE_80F2AD
CODE_80F269:
	LDA.b $C4
	BMI.b CODE_80F27F
	LDY.w $7E6ED8,x
	CPY.w $7E72AC
	BNE.b CODE_80F27F
	LDY.w #$03D4
	STY.b $BE
	LDY.b $C6
	JSR.w CODE_80F2AD
CODE_80F27F:
	LDA.b $C8
	BMI.b CODE_80F295
	LDY.w $7E6ED8,x
	CPY.w $7E72AE
	BNE.b CODE_80F295
	LDY.w #$03D6
	STY.b $BE
	LDY.b $CA
	JSR.w CODE_80F2AD
CODE_80F295:
	LDA.b $CC
	BMI.b CODE_80F2AB
	LDY.w $7E6ED8,x
	CPY.w $7E72B0
	BNE.b CODE_80F2AB
	LDY.w #$03D8
	STY.b $BE
	LDY.b $CE
	JSR.w CODE_80F2AD
CODE_80F2AB:
	CLC
	RTS

CODE_80F2AD:
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80F2C5
	CMP.w #$0060
	BCS.b CODE_80F2C5
	TYA
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	BMI.b CODE_80F2C5
	CMP.w #$0040
	BCS.b CODE_80F2C5
	PLY
	SEC
	RTS

CODE_80F2C5:
	CLC
	RTS

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

CODE_80F2C7:
	TYX
CODE_80F2C8:
	LDA.b $C0
	BMI.b CODE_80F2DE
	LDY.w $7E6ED8,x
	CPY.w $7E72AA
	BNE.b CODE_80F2DE
	LDY.w #$03D2
	STY.b $BE
	LDY.b $C2
	JSR.w CODE_80F322
CODE_80F2DE:
	LDA.b $C4
	BMI.b CODE_80F2F4
	LDY.w $7E6ED8,x
	CPY.w $7E72AC
	BNE.b CODE_80F2F4
	LDY.w #$03D4
	STY.b $BE
	LDY.b $C6
	JSR.w CODE_80F322
CODE_80F2F4:
	LDA.b $C8
	BMI.b CODE_80F30A
	LDY.w $7E6ED8,x
	CPY.w $7E72AE
	BNE.b CODE_80F30A
	LDY.w #$03D6
	STY.b $BE
	LDY.b $CA
	JSR.w CODE_80F322
CODE_80F30A:
	LDA.b $CC
	BMI.b CODE_80F320
	LDY.w $7E6ED8,x
	CPY.w $7E72B0
	BNE.b CODE_80F320
	LDY.w #$03D8
	STY.b $BE
	LDY.b $CE
	JSR.w CODE_80F322
CODE_80F320:
	CLC
	RTS

CODE_80F322:
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,x
	BMI.b CODE_80F33A
	CMP.w #$0050
	BCS.b CODE_80F33A
	TYA
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,x
	BMI.b CODE_80F33A
	CMP.w #$0050
	BCS.b CODE_80F33A
	PLY
	SEC
	RTS

CODE_80F33A:
	CLC
	RTS

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

CODE_80F33C:
	LDA.w $7E341C
	CMP.w #$0048
	BNE.b CODE_80F36B
	LDA.w $7E72BC
	STA.w $0B63
	CLC
	LDY.w #$0010
	TYA
	ADC.w $7E2C48
	STA.w $0B5F
	TYA
	ADC.w $7E2C42
	STA.w $0B61
	TYA
	ADC.w $7E2472
	STA.w $0B5D
	TYA
	ADC.w $7E246C
	STA.w $0B5B
	RTS

CODE_80F36B:
	LDA.w #$FFFF
	STA.w $0B5B
	RTS

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

CODE_80F372:
	BIT.w $0B5B
	BMI.b CODE_80F3A1
	LDA.w $7E6ED8,x
	CMP.w $0B63
	BNE.b CODE_80F3A1
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0B5D
	BCS.b CODE_80F3A1
	CLC
	ADC.w #$0010
	CMP.w $0B5B
	BCC.b CODE_80F3A1
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.w $0B61
	BCS.b CODE_80F3A1
	CLC
	ADC.w #$0010
	CMP.w $0B5F
	BCS.b CODE_80F3A3
CODE_80F3A1:
	CLC
	RTS

CODE_80F3A3:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	SEC
	RTS

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

CODE_80F3AB:
	BIT.w $0B5B
	BMI.b CODE_80F3DA
	LDA.w $7E6ED8,x
	CMP.w $0B63
	BNE.b CODE_80F3DA
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0B5D
	BCS.b CODE_80F3DA
	CLC
	ADC.w #$0020
	CMP.w $0B5B
	BCC.b CODE_80F3DA
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.w $0B61
	BCS.b CODE_80F3DA
	CLC
	ADC.w #$0020
	CMP.w $0B5F
	BCS.b CODE_80F3DC
CODE_80F3DA:
	CLC
	RTS

CODE_80F3DC:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	SEC
	RTS

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

CODE_80F3E4:
	BIT.w $0B5B
	BMI.b CODE_80F413
	LDA.w $7E6ED8,x
	CMP.w $0B63
	BNE.b CODE_80F413
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0B5D
	BCS.b CODE_80F413
	CLC
	ADC.w #$0030
	CMP.w $0B5B
	BCC.b CODE_80F413
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.w $0B61
	BCS.b CODE_80F413
	CLC
	ADC.w #$0030
	CMP.w $0B5F
	BCS.b CODE_80F415
CODE_80F413:
	CLC
	RTS

CODE_80F415:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	SEC
	RTS

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

CODE_80F41D:
	BIT.w $0B5B
	BMI.b CODE_80F44C
	LDA.w $7E6ED8,x
	CMP.w $0B63
	BNE.b CODE_80F44C
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0B5D
	BCS.b CODE_80F44C
	CLC
	ADC.w #$0040
	CMP.w $0B5B
	BCC.b CODE_80F44C
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.w $0B61
	BCS.b CODE_80F44C
	CLC
	ADC.w #$0040
	CMP.w $0B5F
	BCS.b CODE_80F44E
CODE_80F44C:
	CLC
	RTS

CODE_80F44E:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	SEC
	RTS

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

CODE_80F456:
	BIT.w $0B5B
	BMI.b CODE_80F485
	LDA.w $7E6ED8,x
	CMP.w $0B63
	BNE.b CODE_80F485
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0B5D
	BCS.b CODE_80F485
	CLC
	ADC.w #$0060
	CMP.w $0B5B
	BCC.b CODE_80F485
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.w $0B61
	BCS.b CODE_80F485
	CLC
	ADC.w #$0040
	CMP.w $0B5F
	BCS.b CODE_80F487
CODE_80F485:
	CLC
	RTS

CODE_80F487:
	INC.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	LDA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,x
	SEC
	RTS

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

CODE_80F48F:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E15
	BCS.b CODE_80F4B2
	CLC
	ADC.w #$0010
	CMP.w $0E13
	BCC.b CODE_80F4B2
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0008
	CMP.w $0E19
	BCS.b CODE_80F4B2
	CMP.w $0E17
	BCC.b CODE_80F4B2
	SEC
	RTS

CODE_80F4B2:
	CLC
	RTS

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

CODE_80F4B4:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E15
	BCS.b CODE_80F4D7
	CLC
	ADC.w #$0020
	CMP.w $0E13
	BCC.b CODE_80F4D7
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0018
	CMP.w $0E19
	BCS.b CODE_80F4D7
	CMP.w $0E17
	BCC.b CODE_80F4D7
	SEC
	RTS

CODE_80F4D7:
	CLC
	RTS

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

CODE_80F4D9:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E15
	BCS.b CODE_80F4FF
	CLC
	ADC.w #$0020
	CMP.w $0E13
	BCC.b CODE_80F4FF
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0018
	CMP.w $0E19
	BCS.b CODE_80F4FF
	ADC.w #$0008
	CMP.w $0E17
	BCC.b CODE_80F4FF
	SEC
	RTS

CODE_80F4FF:
	CLC
	RTS

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

CODE_80F501:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E15
	BCS.b CODE_80F524
	CLC
	ADC.w #$0030
	CMP.w $0E13
	BCC.b CODE_80F524
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0028
	CMP.w $0E19
	BCS.b CODE_80F524
	CMP.w $0E17
	BCC.b CODE_80F524
	SEC
	RTS

CODE_80F524:
	CLC
	RTS

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

CODE_80F526:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E15
	BCS.b CODE_80F549
	CLC
	ADC.w #$0040
	CMP.w $0E13
	BCC.b CODE_80F549
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0030
	CMP.w $0E19
	BCS.b CODE_80F549
	CMP.w $0E17
	BCC.b CODE_80F549
	SEC
	RTS

CODE_80F549:
	CLC
	RTS

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

CODE_80F54B:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E1D
	BCS.b CODE_80F56E
	CLC
	ADC.w #$0010
	CMP.w $0E1B
	BCC.b CODE_80F56E
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0008
	CMP.w $0E21
	BCS.b CODE_80F56E
	CMP.w $0E1F
	BCC.b CODE_80F56E
	SEC
	RTS

CODE_80F56E:
	CLC
	RTS

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

CODE_80F570:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E1D
	BCS.b CODE_80F593
	CLC
	ADC.w #$0020
	CMP.w $0E1B
	BCC.b CODE_80F593
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0018
	CMP.w $0E21
	BCS.b CODE_80F593
	CMP.w $0E1F
	BCC.b CODE_80F593
	SEC
	RTS

CODE_80F593:
	CLC
	RTS

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

CODE_80F595:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E1D
	BCS.b CODE_80F5BB
	CLC
	ADC.w #$0020
	CMP.w $0E1B
	BCC.b CODE_80F5BB
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0018
	CMP.w $0E21
	BCS.b CODE_80F5BB
	ADC.w #$000C
	CMP.w $0E1F
	BCC.b CODE_80F5BB
	SEC
	RTS

CODE_80F5BB:
	CLC
	RTS

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

CODE_80F5BD:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E1D
	BCS.b CODE_80F5E0
	CLC
	ADC.w #$0030
	CMP.w $0E1B
	BCC.b CODE_80F5E0
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0028
	CMP.w $0E21
	BCS.b CODE_80F5E0
	CMP.w $0E1F
	BCC.b CODE_80F5E0
	SEC
	RTS

CODE_80F5E0:
	CLC
	RTS

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

CODE_80F5E2:
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.w $0E1D
	BCS.b CODE_80F605
	CLC
	ADC.w #$0040
	CMP.w $0E1B
	BCC.b CODE_80F605
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	ADC.w #$0030
	CMP.w $0E21
	BCS.b CODE_80F605
	CMP.w $0E1F
	BCC.b CODE_80F605
	SEC
	RTS

CODE_80F605:
	CLC
	RTS

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

DATA_80F607:
	dw $000C,$000C,$000C,$001C,$001C,$0023,$0020,$0032
	dw $0040,$0058,$0060,$0060,$0040

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

CODE_80F621:
	SEP.b #$20
	LDA.b #$E0
	STA.w JP_Global_OAMBuffer[$00].YDisp
	STA.w JP_Global_OAMBuffer[$01].YDisp
	STA.w JP_Global_OAMBuffer[$02].YDisp
	STA.w JP_Global_OAMBuffer[$03].YDisp
	STA.w JP_Global_OAMBuffer[$04].YDisp
	STA.w JP_Global_OAMBuffer[$05].YDisp
	STA.w JP_Global_OAMBuffer[$06].YDisp
	STA.w JP_Global_OAMBuffer[$07].YDisp
	STA.w JP_Global_OAMBuffer[$08].YDisp
	STA.w JP_Global_OAMBuffer[$09].YDisp
	STA.w JP_Global_OAMBuffer[$0A].YDisp
	STA.w JP_Global_OAMBuffer[$0B].YDisp
	STA.w JP_Global_OAMBuffer[$0C].YDisp
	STA.w JP_Global_OAMBuffer[$0D].YDisp
	STA.w JP_Global_OAMBuffer[$0E].YDisp
	STA.w JP_Global_OAMBuffer[$0F].YDisp
	STA.w JP_Global_OAMBuffer[$10].YDisp
	STA.w JP_Global_OAMBuffer[$11].YDisp
	STA.w JP_Global_OAMBuffer[$12].YDisp
	STA.w JP_Global_OAMBuffer[$13].YDisp
	STA.w JP_Global_OAMBuffer[$14].YDisp
	STA.w JP_Global_OAMBuffer[$15].YDisp
	STA.w JP_Global_OAMBuffer[$16].YDisp
	STA.w JP_Global_OAMBuffer[$17].YDisp
	STA.w JP_Global_OAMBuffer[$18].YDisp
	STA.w JP_Global_OAMBuffer[$19].YDisp
	STA.w JP_Global_OAMBuffer[$1A].YDisp
	STA.w JP_Global_OAMBuffer[$1B].YDisp
	STA.w JP_Global_OAMBuffer[$1C].YDisp
	STA.w JP_Global_OAMBuffer[$1D].YDisp
	STA.w JP_Global_OAMBuffer[$1E].YDisp
	STA.w JP_Global_OAMBuffer[$1F].YDisp
	STA.w JP_Global_OAMBuffer[$20].YDisp
	STA.w JP_Global_OAMBuffer[$21].YDisp
	STA.w JP_Global_OAMBuffer[$22].YDisp
	STA.w JP_Global_OAMBuffer[$23].YDisp
	STA.w JP_Global_OAMBuffer[$24].YDisp
	STA.w JP_Global_OAMBuffer[$25].YDisp
	STA.w JP_Global_OAMBuffer[$26].YDisp
	STA.w JP_Global_OAMBuffer[$27].YDisp
	STA.w JP_Global_OAMBuffer[$28].YDisp
	STA.w JP_Global_OAMBuffer[$29].YDisp
	STA.w JP_Global_OAMBuffer[$2A].YDisp
	STA.w JP_Global_OAMBuffer[$2B].YDisp
	STA.w JP_Global_OAMBuffer[$2C].YDisp
	STA.w JP_Global_OAMBuffer[$2D].YDisp
	STA.w JP_Global_OAMBuffer[$2E].YDisp
	STA.w JP_Global_OAMBuffer[$2F].YDisp
	STA.w JP_Global_OAMBuffer[$30].YDisp
	STA.w JP_Global_OAMBuffer[$31].YDisp
	STA.w JP_Global_OAMBuffer[$32].YDisp
	STA.w JP_Global_OAMBuffer[$33].YDisp
	STA.w JP_Global_OAMBuffer[$34].YDisp
	STA.w JP_Global_OAMBuffer[$35].YDisp
	STA.w JP_Global_OAMBuffer[$36].YDisp
	STA.w JP_Global_OAMBuffer[$37].YDisp
	STA.w JP_Global_OAMBuffer[$38].YDisp
	STA.w JP_Global_OAMBuffer[$39].YDisp
	STA.w JP_Global_OAMBuffer[$3A].YDisp
	STA.w JP_Global_OAMBuffer[$3B].YDisp
	STA.w JP_Global_OAMBuffer[$3C].YDisp
	STA.w JP_Global_OAMBuffer[$3D].YDisp
	STA.w JP_Global_OAMBuffer[$3E].YDisp
	STA.w JP_Global_OAMBuffer[$3F].YDisp
	STA.w JP_Global_OAMBuffer[$40].YDisp
	STA.w JP_Global_OAMBuffer[$41].YDisp
	STA.w JP_Global_OAMBuffer[$42].YDisp
	STA.w JP_Global_OAMBuffer[$43].YDisp
	STA.w JP_Global_OAMBuffer[$44].YDisp
	STA.w JP_Global_OAMBuffer[$45].YDisp
	STA.w JP_Global_OAMBuffer[$46].YDisp
	STA.w JP_Global_OAMBuffer[$47].YDisp
	STA.w JP_Global_OAMBuffer[$48].YDisp
	STA.w JP_Global_OAMBuffer[$49].YDisp
	STA.w JP_Global_OAMBuffer[$4A].YDisp
	STA.w JP_Global_OAMBuffer[$4B].YDisp
	STA.w JP_Global_OAMBuffer[$4C].YDisp
	STA.w JP_Global_OAMBuffer[$4D].YDisp
	STA.w JP_Global_OAMBuffer[$4E].YDisp
	STA.w JP_Global_OAMBuffer[$4F].YDisp
	STA.w JP_Global_OAMBuffer[$50].YDisp
	STA.w JP_Global_OAMBuffer[$51].YDisp
	STA.w JP_Global_OAMBuffer[$52].YDisp
	STA.w JP_Global_OAMBuffer[$53].YDisp
	STA.w JP_Global_OAMBuffer[$54].YDisp
	STA.w JP_Global_OAMBuffer[$55].YDisp
	STA.w JP_Global_OAMBuffer[$56].YDisp
	STA.w JP_Global_OAMBuffer[$57].YDisp
	STA.w JP_Global_OAMBuffer[$58].YDisp
	STA.w JP_Global_OAMBuffer[$59].YDisp
	STA.w JP_Global_OAMBuffer[$5A].YDisp
	STA.w JP_Global_OAMBuffer[$5B].YDisp
	STA.w JP_Global_OAMBuffer[$5C].YDisp
	STA.w JP_Global_OAMBuffer[$5D].YDisp
	STA.w JP_Global_OAMBuffer[$5E].YDisp
	STA.w JP_Global_OAMBuffer[$5F].YDisp
	STA.w JP_Global_OAMBuffer[$60].YDisp
	STA.w JP_Global_OAMBuffer[$61].YDisp
	STA.w JP_Global_OAMBuffer[$62].YDisp
	STA.w JP_Global_OAMBuffer[$63].YDisp
	STA.w JP_Global_OAMBuffer[$64].YDisp
	STA.w JP_Global_OAMBuffer[$65].YDisp
	STA.w JP_Global_OAMBuffer[$66].YDisp
	STA.w JP_Global_OAMBuffer[$67].YDisp
	STA.w JP_Global_OAMBuffer[$68].YDisp
	STA.w JP_Global_OAMBuffer[$69].YDisp
	STA.w JP_Global_OAMBuffer[$6A].YDisp
	STA.w JP_Global_OAMBuffer[$6B].YDisp
	STA.w JP_Global_OAMBuffer[$6C].YDisp
	STA.w JP_Global_OAMBuffer[$6D].YDisp
	STA.w JP_Global_OAMBuffer[$6E].YDisp
	STA.w JP_Global_OAMBuffer[$6F].YDisp
	STA.w JP_Global_OAMBuffer[$70].YDisp
	STA.w JP_Global_OAMBuffer[$71].YDisp
	STA.w JP_Global_OAMBuffer[$72].YDisp
	STA.w JP_Global_OAMBuffer[$73].YDisp
	STA.w JP_Global_OAMBuffer[$74].YDisp
	STA.w JP_Global_OAMBuffer[$75].YDisp
	STA.w JP_Global_OAMBuffer[$76].YDisp
	STA.w JP_Global_OAMBuffer[$77].YDisp
	STA.w JP_Global_OAMBuffer[$78].YDisp
	STA.w JP_Global_OAMBuffer[$79].YDisp
	STA.w JP_Global_OAMBuffer[$7A].YDisp
	STA.w JP_Global_OAMBuffer[$7B].YDisp
	STA.w JP_Global_OAMBuffer[$7C].YDisp
	STA.w JP_Global_OAMBuffer[$7D].YDisp
	STA.w JP_Global_OAMBuffer[$7E].YDisp
	STA.w JP_Global_OAMBuffer[$7F].YDisp
	REP.b #$20
	STZ.w JP_Global_UpperOAMBuffer[$00].Slot
	STZ.w JP_Global_UpperOAMBuffer[$02].Slot
	STZ.w JP_Global_UpperOAMBuffer[$04].Slot
	STZ.w JP_Global_UpperOAMBuffer[$06].Slot
	STZ.w JP_Global_UpperOAMBuffer[$08].Slot
	STZ.w JP_Global_UpperOAMBuffer[$0A].Slot
	STZ.w JP_Global_UpperOAMBuffer[$0C].Slot
	STZ.w JP_Global_UpperOAMBuffer[$0E].Slot
	STZ.w JP_Global_UpperOAMBuffer[$10].Slot
	STZ.w JP_Global_UpperOAMBuffer[$12].Slot
	STZ.w JP_Global_UpperOAMBuffer[$14].Slot
	STZ.w JP_Global_UpperOAMBuffer[$16].Slot
	STZ.w JP_Global_UpperOAMBuffer[$18].Slot
	STZ.w JP_Global_UpperOAMBuffer[$1A].Slot
	STZ.w JP_Global_UpperOAMBuffer[$1C].Slot
	STZ.w JP_Global_UpperOAMBuffer[$1E].Slot
	RTL

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

CODE_80F7D8:
	REP.b #$30
	LDX.w #$03FE
	LDA.w #$FFFF
CODE_80F7E0:
	STA.w $0E54,x
	DEX
	DEX
	BPL.b CODE_80F7E0
	RTL

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

CODE_80F7E8:
	JSL.l CODE_80F621
	JSR.w CODE_80F7F3
	JSR.w CODE_80F8C5
	RTL

CODE_80F7F3:
	REP.b #$30
	LDA.w #!RAM_JP_Global_OAMBuffer
	STA.b $58
	LDA.w $0AFB
	STA.b $4E
	TAX
	SEC
	SBC.w #$0070
	BPL.b CODE_80F809
	LDA.w #$0000
CODE_80F809:
	STA.b $34
	TXA
	CLC
	ADC.w #$0110
	STA.b $36
	LDA.w $0AFD
	STA.b $50
	TAX
	SEC
	SBC.w #$0070
	BPL.b CODE_80F821
	LDA.w #$0000
CODE_80F821:
	STA.b $38
	TXA
	CLC
	ADC.w #$00E8
	STA.b $3A
	LDX.w $09ED
	BEQ.b CODE_80F862
CODE_80F82F:
	LDY.b $00,x
	CPY.w #$FFFF
	BEQ.b CODE_80F862
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_80F855					; Note: !Define_JP_ExteriorSpriteID00_None
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CMP.b $34
	BMI.b CODE_80F855
	CMP.b $36
	BCS.b CODE_80F855
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	CMP.b $38
	BMI.b CODE_80F855
	CMP.b $3A
	BCC.b CODE_80F863
CODE_80F855:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	STA.w $7E8654,y
	INX
	INX
	BRA.b CODE_80F82F

CODE_80F862:
	RTS

CODE_80F863:
	PHX
	STZ.w $0413
	LDA.w $7E6ED8,y
	BMI.b CODE_80F883
	XBA
	LSR
	LSR
	AND.w #$001E
	TAX
	LDA.l DATA_80F9B5,x
	CPY.w #$03E6
	BNE.b CODE_80F880
	CLC
	ADC.w $0411
CODE_80F880:
	STA.w $0413
CODE_80F883:
	LDA.w $7E6ED8,y
	BPL.b CODE_80F897
	CMP.w #$FFFF
	BNE.b CODE_80F892
	LDA.w #$0000
	BRA.b CODE_80F8AD

CODE_80F892:
	LDA.w #$01E0
	BRA.b CODE_80F8B0

CODE_80F897:
	LDX.w $7E380C,y
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80F607,x
	ADC.w $0413
	SEC
	SBC.b $38
	BPL.b CODE_80F8AD
	LDA.w #$0000
CODE_80F8AD:
	AND.w #$FFFC
CODE_80F8B0:
	ASL
	TAX
CODE_80F8B2:
	LDA.w $0E54,x
	BMI.b CODE_80F8BB
	INX
	INX
	BRA.b CODE_80F8B2

CODE_80F8BB:
	TYA
	STA.w $0E54,x
	PLX
	INX
	INX
	BRL.w CODE_80F82F

CODE_80F8C5:
	JSL.l CODE_81CEC6
	REP.b #$30
	LDA.w #$03F8
CODE_80F8CE:
	TAX
	LDY.w $0E54,x
	BPL.b CODE_80F8DB
	SEC
	SBC.w #$0008
	BPL.b CODE_80F8CE
	RTS

CODE_80F8DB:
	STA.w $0E50
CODE_80F8DE:
	LDA.w #$FFFF
	STA.w $0E54,x
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$FE00
	STA.b $56
	PHX
	LDX.w $7E380C,y
	PHY
	JSR.w (DATA_808DEA,x)
	REP.b #$30
	PLY
	JSR.w CODE_80F91E
	REP.b #$30
	PLX
	INX
	INX
	LDY.w $0E54,x
	BPL.b CODE_80F8DE
	LDA.w $0E50
	BRA.b CODE_80F8CE

CODE_80F909:
	LDA.w #$FFFF
	STA.w $7E76AC,y
	STA.w $7E8654,y
	INX
	INX
	LDY.w $0E54,x
	BPL.b CODE_80F8DE
	LDA.w $0E50
	BRA.b CODE_80F8CE

CODE_80F91E:
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	CMP.w #!Define_JP_ExteriorSpriteID4A_Unknown
	BCC.b CODE_80F980
	LDA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	AND.w #$3000
	ORA.w #$0E01
	STA.b $34
	CPY.w #$03E6
	BNE.b CODE_80F952
	LDA.w $7E8650
	BEQ.b CODE_80F952
	LDA.w $7E4B9A
	BNE.b CODE_80F94D
	LDA.b $68
	BNE.b CODE_80F94D
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	BNE.b CODE_80F957
	STZ.w $7E8650
	RTS

CODE_80F94D:
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	BRA.b CODE_80F957

CODE_80F952:
	LDA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	BEQ.b CODE_80F980
CODE_80F957:
	LSR
	LSR
	LSR
	LSR
	CLC
	ADC.b $34
	STA.w $7E380A
	LDX.w $7E380C,y
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_80F981,x
	STA.w $7E2478
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l DATA_80F99B,x
	STA.w $7E2C4C
	LDY.w #$03E8
	JMP.w CODE_808E16

CODE_80F980:
	RTS

DATA_80F981:
	dw $0000,$0000,$0000,$0008,$0008,$0008,$0010,$0018
	dw $0028,$0018,$0038,$0018,$0028

DATA_80F99B:
	dw $FFF8,$FFF8,$FFF8,$0010,$0010,$0018,$0018,$0020
	dw $0020,$0030,$0030,$0030,$0020

DATA_80F9B5:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0020
	dw $0048,$0048,$0048,$0048,$0048,$0000,$0000,$0000

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

DATA_80F9D5:
	incbin "SPC700/InitializeSPC700.bin"

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

CODE_80FA0A:
	JML.l $70800B				; Glitch: This jumps to invalid code in bank 30.

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

CODE_80FA0E:
	JMP.w [$0000]

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

CODE_80FA11:
	JMP.w [$0004]

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

UNK_80FA14:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
else
	%InsertGarbageData($80FA14, incbin, DATA_80FA14_JP_U1.bin)
endif

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

CODE_80FBF4:
	SEI
	CLD
	CLC
	XCE
	REP.b #$30
	LDA.w #$01FE
	TCS
	LDA.w #$0000
	TCD
CODE_80FC02:
	SEP.b #$20
	LDA.b #$80
	PHA
	PLB
	REP.b #$30
	LDA.w #$0000
	TCD
	SEP.b #$30
	PHK
	PLB
	JSL.l CODE_A4B6CF
	JSL.l CODE_A4B78D
	REP.b #$20
	LDA.w #$0000
	STA.w $1731
	JML.l CODE_80FC26

CODE_80FC26:
	JSL.l CODE_A4B5E2
	SEP.b #$20
	REP.b #$10
	SEI
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	STZ.w !REGISTER_HDMAEnable
	LDX.w #CODE_80FC42
	STX.b $00
	LDA.b #CODE_80FC42>>16
	STA.b $02
	JML.l CODE_A48004

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

CODE_80FC42:
	SEP.b #$20
	PHA
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	PLA
	RTI

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

CODE_80FC4B:
	REP.b #$30
	PHA
	PHX
	PHY
	PHB
	SEP.b #$20
	LDA.b #$00
	PHA
	PLB
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDX.w #CODE_80FC81
	STX.b $04
	LDA.b #CODE_80FC81>>16
	STA.b $06
	LDX.w #$0025
	STX.w !REGISTER_VCountTimerLo
	LDX.w #$0078
	STX.w !REGISTER_HCountTimerLo
	CLI
	SEP.b #$20
	LDA.b $F5
	BNE.b CODE_80FC7A
	JSR.w CODE_80FD54
CODE_80FC7A:
	REP.b #$30
	PLB
	PLY
	PLX
	PLA
	RTI

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

CODE_80FC81:
	REP.b #$30
	PHA
	PHX
	PHY
	PHB
	SEP.b #$20
	LDA.b #$00
	PHA
	PLB
	SEP.b #$20
	LDA.b $F5
	BNE.b CODE_80FCF6
	JSR.w CODE_80FD5B
	REP.b #$30
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_80FCB3
	LDA.b $18
	AND.w #$2000
	BEQ.b CODE_80FCB3
	LDA.w $037D
	EOR.w #$FFFF
	STA.w $037D
	LDA.w #$FFFF
	STA.w $1837
CODE_80FCB3:
	SEP.b #$20
	LDA.b $F6
	BEQ.b CODE_80FCF9
	REP.b #$30
	LDA.w $1791
	AND.w #$000F
	BNE.b CODE_80FCE1
	LDA.b $16
	AND.w #$0080
	BNE.b CODE_80FCE1
	LDA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	AND.w #$FFE0
	BNE.b CODE_80FCDB
	LDA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	INC
	STA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	BRA.b CODE_80FCE1

CODE_80FCDB:
	LDA.w #$0020
	STA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
CODE_80FCE1:
	REP.b #$30
	LDA.w $1791
	AND.w #$0007
	BNE.b CODE_80FCEF
	JSL.l CODE_A1BB35
CODE_80FCEF:
	REP.b #$30
	INC.w $1791
	BRA.b CODE_80FCF9

CODE_80FCF6:
	JSR.w CODE_80FDD7
CODE_80FCF9:
	SEP.b #$20
	LDX.w #CODE_80FD20
	STX.b $04
	LDA.b #CODE_80FD20>>16
	STA.b $06
	LDX.w #$00B8
	STX.w !REGISTER_VCountTimerLo
	LDX.w #$0078
	STX.w !REGISTER_HCountTimerLo
	CLI
	JSL.l CODE_A4EF2B
	REP.b #$30
	SEP.b #$20
	REP.b #$20
	PLB
	PLY
	PLX
	PLA
	RTI

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

CODE_80FD20:
	REP.b #$30
	PHA
	PHX
	PHY
	PHB
	SEP.b #$20
	LDA.b #$00
	PHA
	PLB
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDX.w #CODE_80FC4B
	STX.b $04
	LDA.b #CODE_80FC4B>>16
	STA.b $06
	LDX.w #$001F
	STX.w !REGISTER_VCountTimerLo
	LDX.w #$0078
	STX.w !REGISTER_HCountTimerLo
	CLI
	JSL.l CODE_A4EF2B
	JSR.w CODE_80FE3C
	REP.b #$30
	PLB
	PLY
	PLX
	PLA
	RTI

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

CODE_80FD54:
	SEP.b #$20
	LDA.b #$FF
	STA.b $C0
	RTS

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

CODE_80FD5B:
	JSR.w CODE_80FDD7
	REP.b #$20
	LDA.w $172D
	BNE.b CODE_80FD76
	JSL.l CODE_A48BC5
	SEP.b #$20
	SEP.b #$20
	LDA.w $16C5
	BNE.b CODE_80FD7D
	JSL.l CODE_A48ACE
CODE_80FD76:
	SEP.b #$20
	LDA.w $16B4
	BEQ.b CODE_80FDA9
CODE_80FD7D:
	SEP.b #$20
	LDA.w $16C5
	BEQ.b CODE_80FD93
	SEP.b #$20
	LDA.w $16B1
	BEQ.b CODE_80FD90
	LDA.b #$96
	STA.w $16B1
CODE_80FD90:
	BRL.w CODE_80FDA9

CODE_80FD93:
	REP.b #$20
	LDA.b $71
	AND.w #$001F
	BNE.b CODE_80FDA5
	LDA.w $16BD
	EOR.w #$001F
	STA.w $16BD
CODE_80FDA5:
	JSL.l CODE_A4B9F6
CODE_80FDA9:
	REP.b #$20
	LDA.b $18
	AND.w #$1000
	BEQ.b CODE_80FDD2
	SEP.b #$20
	LDA.b #$FF
	EOR.w $16C5
	STA.w $16C5
	BEQ.b CODE_80FDC9
	REP.b #$20
	LDA.w #DATA_A4EA06
	JSL.l CODE_A4DF0D
	BRA.b CODE_80FDD2

CODE_80FDC9:
	REP.b #$20
	LDA.w #$0000
	JSL.l CODE_A4DF0D
CODE_80FDD2:
	JSL.l CODE_A4DF0C
	RTS

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

CODE_80FDD7:
	SEP.b #$20
	JSL.l CODE_A4B1FC
	LDA.b #$07
	STA.w !REGISTER_BGModeAndTileSizeSetting
	JSL.l CODE_A4B67C
	SEP.b #$20
	LDA.b #$E0
	STA.w !REGISTER_FixedColorData
	LDA.b #$9F
	STA.w !REGISTER_ColorMathSelectAndEnable
	LDA.w $16E0
	BEQ.b CODE_80FDFC
	LDA.b #$E0
	INC.w $16E0
CODE_80FDFC:
	LDX.w $1799
	BEQ.b CODE_80FE0E
	CLC
	ADC.b #$AF
	STA.w !REGISTER_FixedColorData
	LDA.b #$8F
	STA.w !REGISTER_ColorMathSelectAndEnable
	BRA.b CODE_80FE1C

CODE_80FE0E:
	EOR.b #$FF
	INC
	CLC
	ADC.b #$0F
	STA.w !REGISTER_FixedColorData
	LDA.b #$0F
	STA.w !REGISTER_ColorMathSelectAndEnable
CODE_80FE1C:
	JSL.l CODE_A4DD83
	JSL.l CODE_A4DEA6
	REP.b #$20
	LDA.w $172F
	CMP.w #$0001
	BEQ.b CODE_80FE3B
	LDA.w $172D
	BNE.b CODE_80FE3B
	JSL.l CODE_A4B7E5
	JSL.l CODE_A4EC17
CODE_80FE3B:
	RTS

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

CODE_80FE3C:
	SEP.b #$20
	LDA.b #$80
	STA.w !REGISTER_ScreenDisplayRegister
	JSL.l CODE_A4DD5C
	SEP.b #$20
	LDA.w $1637
	BEQ.b CODE_80FE5B
	JSL.l CODE_A48A8B
	JSL.l CODE_A4B85C
	REP.b #$30
	INC.b $71
	RTS

CODE_80FE5B:
	SEP.b #$20
	LDA.b $79
	BEQ.b CODE_80FE6D
	STZ.b $C0
	PHB
	LDA.b #$7E
	PHA
	PLB
	JSL.l CODE_A4AC50
	PLB
CODE_80FE6D:
	REP.b #$30
	INC.b $71
	RTS

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

CODE_80FE72:
	REP.b #$30
	PHA
	PHX
	PHY
	PHB
	SEP.b #$20
	LDA.b #$00
	PHA
	PLB
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDA.w $1841
	BEQ.b CODE_80FE9C
	LDX.w #CODE_80FD20
	STX.b $04
	LDA.b #CODE_80FD20>>16
	STA.b $06
	LDX.w #$0025
	STX.w !REGISTER_VCountTimerLo
	LDX.w #$0078
	STX.w !REGISTER_HCountTimerLo
CODE_80FE9C:
	INC.b $71
	REP.b #$30
	PLB
	PLY
	PLX
	PLA
	RTI

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

CODE_80FEA5:
	JML.l $70800B				; Glitch: This jumps to invalid code in bank 30.

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

CODE_80FEA9:
	JMP.w [$0000]

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

CODE_80FEAC:
	JMP.w [$0004]

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

UNK_80FEAF:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($80FEE5, incbin, DATA_80FEE5_JP_U2.bin)
else
	%InsertGarbageData($80FEAF, incbin, DATA_80FEAF_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

CODE_818000:
	REP.b #$30
	LDA.w $0E4E
	BEQ.b CODE_81800B
	JML.l CODE_81D59E

CODE_81800B:
	LDA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	BEQ.b CODE_818014
	JML.l CODE_83DE70

CODE_818014:
	LDA.w $0E0B
	CMP.w #$FFFF
	BNE.b CODE_81801F
	BRL.w CODE_8180C1

CODE_81801F:
	CMP.w #$FFFE
	BEQ.b CODE_818027
	BRL.w CODE_8180DA

CODE_818027:
	REP.b #$30
	STZ.w $0E0B
	STZ.w $0E46
	SEP.b #$30
	SEI
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	STA.b $EE
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	JSL.l CODE_A48000
	SEP.b #$30
	LDA.b #$7E
	PHA
	PLB
	JSL.l CODE_819E01
	LDA.b #$00
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.b #$81
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	SEI
	JSL.l CODE_819EE6
	REP.b #$30
	STZ.w $03FB
	STZ.w $03FD
	STZ.w $03FF
	STZ.w $0401
	STZ.w $0403
	LDA.w #$FFFF
	STA.w $0200
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	REP.b #$30
	LDA.w !RAM_JP_Exterior_BuildingEntranceLo
	BMI.b CODE_8180C1
	ASL
	ASL
	ASL
	TAX
	LDA.l DATA_81893F,x
	STA.w !RAM_JP_Exterior_Player_CheckpointXPosLo
	LDA.l DATA_81893F+$02,x
	STA.w !RAM_JP_Exterior_Player_CheckpointYPosLo
	LDA.l DATA_81893F+$04,x
	STA.w !RAM_JP_Exterior_Player_CheckpointZPosLo
	LDA.w #$0004
	STA.w !RAM_JP_Exterior_Player_MovementDirectionLo
	STA.w $0B23
	BRA.b CODE_8180EF

CODE_8180C1:
	LDA.w #$001F
	STA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	STA.w $0393
	STZ.w !RAM_JP_Global_Player_DamageTakenLo
	DEC.w !RAM_JP_Global_Player_CurrentLifeCountLo
	BPL.b CODE_8180EF
	SEP.b #$20
	JSL.l CODE_819196
	BCS.b CODE_8180EF
CODE_8180DA:
	REP.b #$30
	LDA.w $0E4E
	BNE.b CODE_8180EB
	LDA.w #$FFFF
	STA.w $03B6
	JML.l CODE_83DE70

CODE_8180EB:
	JML.l CODE_81E1DE

CODE_8180EF:
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown01+($00<<8)
	LDY.w #$A0FF
	JSL.l CODE_839D6A
	LDA.w #!Define_JP_SoundCommand_EndRepeatingSound
	LDY.w #$0000
	JSL.l CODE_839D6A
CODE_818105:
	JSL.l CODE_839DBF
	SEI
	JSL.l CODE_819EE6
	REP.b #$30
	LDA.w #$FFFF
	STA.w $0200
	LDA.w #CODE_8080E1
	STA.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDA.w #CODE_8081EF
	STA.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	SEP.b #$20
	LDA.b #$01
	STA.l !REGISTER_EnableFastROM|!FastROMAddressOffset
	LDA.b #$00
	STA.b $EE
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.b #$81
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	REP.b #$30
	LDX.w #$7E8A3E
	LDY.w #$7E8A3F
	LDA.w #$03FF
	STZ.w $7E8A3E
	PHB
	MVN $7E8A3F>>16,$7E8A3E>>16
	PLB
	JSL.l CODE_81B3E6
	JSL.l CODE_819D64
	JSL.l CODE_80A102
	JSL.l CODE_80F7D8
	REP.b #$30
	LDA.w #$FFF8
	STA.w $0B3B
	STZ.w $0B3D
	STZ.w $0B37
	STZ.w $0B39
	STZ.w $06CD
	STZ.w $0E0D
	STZ.w $06C5
	STZ.w $0397
	LDA.w #$03C0
	STA.w !RAM_JP_Exterior_WaitBeforeMrDNATriviaAppearsLo
	STZ.w $0E41
	STZ.b $6C
	STZ.b $72
	JSL.l CODE_80A36A
	REP.b #$30
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	JSL.l CODE_8199F4
	REP.b #$30
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	JSL.l CODE_819A13
	SEP.b #$30
	INC.b $09
CODE_8181AB:
	LDA.b $09
	BNE.b CODE_8181AB
	JSL.l CODE_819EE6
	LDA.b #$40
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$44
	STA.l !REGISTER_BG2AddressAndSize|!FastROMAddressOffset
	LDA.b #$48
	STA.l !REGISTER_BG3AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$05
	STA.l !REGISTER_BG3And4TileDataDesignation|!FastROMAddressOffset
	LDA.b #$09
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$A0
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$08
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	LDA.b #$17
	STA.b $10
	LDA.b #$13
	STA.b $11
	REP.b #$30
	LDX.w #JP_Palette_ExteriorAreas
	LDA.w #JP_Palette_ExteriorAreas>>16
	JSL.l CODE_81B3A6
	REP.b #$30
	LDX.w #JP_Tilemap_Layer3_ExteriorAreas
	LDA.w #JP_Tilemap_Layer3_ExteriorAreas>>16
	LDY.w #$4800
	JSL.l CODE_81B378
	REP.b #$30
	LDX.w #JP_GFX_Layer3_ExteriorAreasStatusBar
	LDA.w #JP_GFX_Layer3_ExteriorAreasStatusBar>>16
	LDY.w #$5000
	JSL.l CODE_81B31C
	REP.b #$30
	LDX.w #DATA_81EC8B
	LDA.w #DATA_81EC8B>>16
	LDY.w #$4400
	JSL.l CODE_81B378
	REP.b #$30
	LDX.w #DATA_81F0A3
	LDA.w #DATA_81F0A3>>16
	LDY.w #$4C00
	JSL.l CODE_81B31C
	REP.b #$30
	LDX.w #JP_GFX_Sprite_FlamesAndShadows
	LDA.w #JP_GFX_Sprite_FlamesAndShadows>>16
	LDY.w #$6000
	JSL.l CODE_81B34A
	JSR.w CODE_81847D
	REP.b #$30
CODE_81824D:
	LDA.w $0467
	BNE.b CODE_81824D
	LDA.w #$00D0
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	LDA.w #$00C6
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	JSL.l CODE_83A166
	JSL.l CODE_819EE6
	STZ.w $049D
	STZ.b $68
	STZ.b $6A
	STZ.w $0E3B
	JSL.l CODE_819D64
	LDA.w $0385
	STA.w !RAM_JP_Exterior_Player_UseDemoMovementsFlagLo
	STZ.w $0385
	STZ.w $0AF1
	STZ.w $0AEF
	SEP.b #$20
	STZ.b $0F
	LDA.b #$0F
	STA.b $0B
	LDA.b #$00
	STA.b $0D
	LDA.b #$0A
	STA.w $03D2
	JSL.l CODE_819EE6
	REP.b #$30
	STZ.b $9A
	STZ.b $9C
	LDX.w #CODE_808151
	STX.b $00
	LDA.w #CODE_808151>>16
	STA.b $02
	LDX.w #CODE_8081F8
	STX.b $04
	LDA.w #CODE_8081F8>>16
	STA.b $06
	LDA.w #$00D0
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	LDA.w #$00C6
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b #$3F
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$A0
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$FE
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	LDA.b #$08
	STA.l !REGISTER_BG3VertScrollOffset|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_BG3VertScrollOffset|!FastROMAddressOffset
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDA.b #$B1
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	CLI
	JSR.w CODE_8184B9
CODE_8182FA:
	REP.b #$30
	LDA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	BNE.b CODE_81830E
	LDA.w $0E4E
	BMI.b CODE_81830E
	LDA.w $0E0B
	CMP.w #$FFF6
	BCC.b CODE_81832A
CODE_81830E:
	SEP.b #$30
	LDA.b $0A
	BNE.b CODE_818318
	JML.l CODE_818000

CODE_818318:
	LDA.b $0B
	BEQ.b CODE_81832A
	STZ.b $0B
	REP.b #$30
	STZ.w !RAM_JP_Global_SoundTableIndexLo
	STZ.w $02F7
	JSL.l CODE_839D62
CODE_81832A:
	SEP.b #$30
	LDA.w $049D
	STA.w $06C1
	JSL.l CODE_81B4EE
	JSL.l CODE_839F42
	JSL.l CODE_819350
	JSL.l CODE_828000
	JSL.l CODE_83DD9F
	JSL.l CODE_8188A2
	JSL.l CODE_83D397
	JSL.l CODE_81C63A
	SEP.b #$20
	LDA.w $049D
	SEC
	SBC.w $06C1
	STA.w $06C3
	STZ.b $F0
CODE_818360:
	LDA.b $F0
	BEQ.b CODE_818360
	BRA.b CODE_8182FA

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

CODE_818366:
	REP.b #$30
	STZ.b $14
	STZ.b $12
	JSL.l CODE_819E70
	REP.b #$30
	LDA.w $0B1D
	BEQ.b CODE_81837A
	BRL.w CODE_818443

CODE_81837A:
	LDA.w $049D
	AND.w #$0003
	BNE.b CODE_8183BB
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	CMP.w $03CC
	BNE.b CODE_818392
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	CMP.w $03CE
	BEQ.b CODE_8183BB
CODE_818392:
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	STA.w $03CC
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	STA.w $03CE
	SEP.b #$20
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	XBA
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	TAY
	LDA.w $7E2477
	ASL
	ASL
	ASL
	ASL
	ORA.w $7E2C4B
	XBA
	LDA.b #!Define_JP_SoundCommand_Unknown02
	REP.b #$20
	JSL.l CODE_839B59
CODE_8183BB:
	JSL.l CODE_839ADA
	JSL.l CODE_80A3D9
	JSL.l JP_ProcessExteriorSprites_Main
	JSL.l CODE_83A1BB
	JSL.l CODE_80F7E8
	JSL.l CODE_8194CD
	JSL.l CODE_839ADA
	JSL.l CODE_819D85
	REP.b #$30
	LDA.w $049D
	AND.w #$000C
	STA.b $9A
	INC.w $03C8
	LDA.w $03C8
	AND.w #$000F
	BNE.b CODE_818401
	LDA.w $03C6
	CMP.w #$000C
	BEQ.b CODE_818401
	CLC
	ADC.w #$0004
	STA.w $03C6
	STA.b $9C
CODE_818401:
	LDA.w $0AF1
	AND.w #$1000
	BEQ.b CODE_81842C
	LDA.b $0B
	AND.w #$00FF
	CMP.w #$000F
	BNE.b CODE_81842C
	INC.w $0B1D
	LDA.w #!Define_JP_SoundCommand_Unknown03+($40<<8)
	LDY.w #$0030
	JSL.l CODE_839B59
	SEP.b #$20
	LDA.b #$0B
	STA.b $0B
	LDA.b #$17
	STA.b $11
	REP.b #$20
CODE_81842C:
	LDA.w $06C5
	BEQ.b CODE_818442
	LDA.w $0AF1
	AND.w #$0030
	BEQ.b CODE_818442
	STZ.w $06C7
	LDA.w #$0002
	STA.w $06C5
CODE_818442:
	RTL

CODE_818443:
	JSL.l CODE_80F7E8
	JSL.l CODE_839ADA
	REP.b #$30
	LDA.w $0AF1
	AND.w #$1000
	BEQ.b CODE_81847C
	STZ.w $0B1D
	LDA.w #!Define_JP_SoundCommand_Unknown03+($40<<8)
	LDY.w #$00FF
	JSL.l CODE_839B59
	LDA.w $06C5
	BEQ.b CODE_818470
	STZ.w $06C7
	LDA.w #$0002
	STA.w $06C5
CODE_818470:
	SEP.b #$20
	LDA.b #$0F
	STA.b $0B
	LDA.b #$13
	STA.b $11
	REP.b #$20
CODE_81847C:
	RTL

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

CODE_81847D:
	REP.b #$30
	LDA.w #$0000
	LDX.w #$0000
CODE_818485:
	STA.l $7F0000,x
	INC
	INX
	INX
	CPX.w #$0800
	BNE.b CODE_818485
CODE_818491:
	LDA.w $0467
	BNE.b CODE_818491
	SEP.b #$20
	LDA.b #$7F0000>>16
	STA.w $0465
	REP.b #$30
	LDA.w #$7F0000
	STA.w $0463
	LDA.l !REGISTER_VRAMAddressLo
	STA.w $045F
	LDA.w #$4000
	STA.w $0461
	LDA.w #$0800
	STA.w $0467
	RTS

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

CODE_8184B9:
	SEP.b #$20
	LDA.b #$33
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	LDA.b #$33
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_BGWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ColorAndObjectWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$08
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FA
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$1F
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
	RTS

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

ADDR_8184EE:
	SEP.b #$30
	SEI
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	LDA.b #$8F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	JSL.l CODE_819E01
	SEP.b #$20
	REP.b #$10
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.b #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081F8
	STX.b $04
	LDA.b #CODE_8081F8>>16
	STA.b $06
	REP.b #$30
	PHB
	LDX.w #JP_GFX_BG_TitleScreen_Part1
	LDY.w #$7E2000
	LDA.w #JP_GFX_BG_TitleScreen_Part1_End-JP_GFX_BG_TitleScreen_Part1-$01
	MVN $7E2000>>16,JP_GFX_BG_TitleScreen_Part1>>16
	LDX.w #JP_GFX_BG_TitleScreen_Part2
	LDY.w #$7EA000
	LDA.w #JP_GFX_BG_TitleScreen_Part2_End-JP_GFX_BG_TitleScreen_Part2-$01
	MVN $7EA000>>16,JP_GFX_BG_TitleScreen_Part2>>16
	PLB
	REP.b #$30
	LDX.w #JP_Palette_TitleScreen
	LDA.w #JP_Palette_TitleScreen>>16
	JSL.l CODE_81B270
	REP.b #$30
	LDX.w #JP_Tilemap_BG_TitleScreen
	LDA.w #JP_Tilemap_BG_TitleScreen>>16
	LDY.w #$7C00
	JSL.l CODE_81B22C
	REP.b #$30
	LDX.w #$7E2000
	LDA.w #$7E2000>>16
	LDY.w #$0000
	JSL.l CODE_81B22C
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	LDA.b #$7C
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$03
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	LDA.b #$1B
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.b $0B
	STZ.b $0A
	LDA.b #$81
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
CODE_81859F:
	SEP.b #$20
	JSL.l CODE_819EF1
	JSL.l CODE_819E87
	REP.b #$30
	LDA.w $0AEF
	AND.w #$1000
	BEQ.b CODE_81859F
	JML.l CODE_819E57

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

CODE_8185B7:
	SEP.b #$20
	SEI
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	LDA.b #$8F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	JSL.l CODE_819E01
	SEP.b #$20
	REP.b #$10
	LDX.w #CODE_808151
	STX.b $00
	LDA.b #CODE_808151>>16
	STA.b $02
	LDX.w #CODE_8081F8
	STX.b $04
	LDA.b #CODE_8081F8>>16
	STA.b $06
	REP.b #$30
	LDX.w #JP_Palette_HighScoreScreen
	LDA.w #JP_Palette_HighScoreScreen>>16
	JSL.l CODE_81B270
	REP.b #$30
	LDX.w #JP_Tilemap_BG_HighScoreScreen
	LDA.w #JP_Tilemap_BG_HighScoreScreen>>16
	LDY.w #$4000
	JSL.l CODE_81B22C
	REP.b #$30
	LDX.w #JP_GFX_BG_HighScoreScreen
	LDA.w #JP_GFX_BG_HighScoreScreen>>16
	LDY.w #$0000
	JSL.l CODE_81B22C
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	LDA.b #$1B
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
CODE_818646:
	JSL.l $708008				; Glitch: This jumps to invalid code in bank 30.
	BRA.b CODE_818646

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

CODE_81864C:
	SEP.b #$20
CODE_81864E:
	LDA.b #DATA_81867E>>16
	STA.w DMA[$02].SourceBank
	INC.w $0B0F
	JSR.w CODE_81865A
	RTL

CODE_81865A:
	REP.b #$20
	LDA.l $7E0B0F
	ASL
	AND.w #$000E
	CLC
	ADC.w #DATA_81867E
	STA.w DMA[$02].SourceLo
	LDA.w #$0010
	STA.w DMA[$02].SizeLo
	SEP.b #$20
	LDA.b #$71
	STA.w !REGISTER_CGRAMAddress
	LDA.b #$04
	STA.w !REGISTER_DMAEnable
	RTS

DATA_81867E:
	incbin "Palettes/AnimatedFlowingWater.bin"

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

CODE_81869E:
	REP.b #$30
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo
	CMP.w $0DFB
	BNE.b CODE_8186B5
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo
	CMP.w $0DFD
	BNE.b CODE_8186B5
	LDA.w $0AF1
	BEQ.b CODE_8186C5
CODE_8186B5:
	STZ.w !RAM_JP_TitleScreen_WaitBeforeAutoFadeOutLo
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo
	STA.w $0DFB
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo
	STA.w $0DFD
CODE_8186C4:
	RTL

CODE_8186C5:
	INC.w !RAM_JP_TitleScreen_WaitBeforeAutoFadeOutLo
	LDA.w !RAM_JP_TitleScreen_WaitBeforeAutoFadeOutLo
	CMP.w #$04B0
	BCC.b CODE_8186C4
	STZ.w !RAM_JP_TitleScreen_WaitBeforeAutoFadeOutLo
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown14+($02<<8)
	LDY.w #$0000
	JSL.l CODE_839D6A
	INC.w !RAM_JP_TitleScreen_ScreenToFadeOutToLo
	LDA.w !RAM_JP_TitleScreen_ScreenToFadeOutToLo
	CMP.w #$0001
	BEQ.b CODE_818726
	CMP.w #$0002
	BNE.b CODE_8186F2
	BRL.w CODE_818770

CODE_8186F2:
	CMP.w #$0003
	BNE.b CODE_8186FB
	INC
	STA.w !RAM_JP_TitleScreen_ScreenToFadeOutToLo
CODE_8186FB:
	CMP.w #$0004
	BEQ.b CODE_81873C
	CMP.w #$0005
	BEQ.b CODE_818757
	CMP.w #$0006
	BEQ.b CODE_81870E
	STZ.w !RAM_JP_TitleScreen_ScreenToFadeOutToLo
	RTL

CODE_81870E:
	SEP.b #$20
	LDA.b #$F0
	STA.b $0D
	STZ.b $0B
	LDA.b #$01
	STA.b $10
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	JSL.l CODE_8187FC
	JML.l CODE_81D59E

CODE_818726:
	SEP.b #$20
	LDA.b #$F0
	STA.b $0D
	LDA.b #$08
	STA.b $0B
	LDA.b #$01
	STA.b $10
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	JML.l CODE_81DD2F

CODE_81873C:
	REP.b #$30
	STZ.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	STZ.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit
	STZ.w !RAM_JP_Global_Player_CurrentScoreTensDigit
	SEP.b #$20
	STZ.b $0B
	LDA.b #$01
	STA.b $10
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	JML.l CODE_83DE70

CODE_818757:
	SEP.b #$20
	STZ.b $0B
CODE_81875B:
	JSL.l CODE_819EF1
	LDA.b $09
	BNE.b CODE_81875B
	REP.b #$30
	LDA.w #$0000
	JSL.l CODE_81A880
	JML.l CODE_81D59E

CODE_818770:
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	STA.b $0B
	LDA.b #$3F
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	JSL.l CODE_81A0EC
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown14+($02<<8)
	LDY.w #$0000
	JSL.l CODE_839D6A
	REP.b #$30
	STZ.w $0B1D
	LDA.w #!Define_JP_Player_StartingXPos
	STA.w !RAM_JP_Exterior_Player_CheckpointXPosLo
	LDA.w #!Define_JP_Player_StartingYPos
	STA.w !RAM_JP_Exterior_Player_CheckpointYPosLo
	LDA.w #!Define_JP_Player_StartingZPos
	STA.w !RAM_JP_Exterior_Player_CheckpointZPosLo
	STZ.w $0E39
	STZ.w !RAM_JP_Exterior_CurrentPoleMessageLo
	LDA.w #$001F
	STA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	STZ.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #$0012
	STA.w !RAM_JP_Global_Player_RemainingEggsToCollectLo
	LDA.w #$0004
	STA.w !RAM_JP_Global_Player_CurrentLifeCountLo
	STZ.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	STZ.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w #$0000
	STA.w $0387
	STZ.w $0389
	LDA.w #$0001
	STA.w $0385
	STA.w $0E4E
	JSL.l CODE_81B586
	JSL.l CODE_81B3CF
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Gate3OpenFlagLo
	LDA.w #$0000
	STA.w !RAM_JP_Exterior_Gate2OpenFlagLo
	STA.w !RAM_JP_Exterior_Gate2OpenFlagLo		; Glitch: This should be !RAM_JP_Exterior_Gate1OpenFlagLo!
	SEP.b #$30
	LDA.b #$00
	STA.w $0E43
	JML.l CODE_818105

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

CODE_8187FC:
	JSL.l CODE_819EF1
	REP.b #$30
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	SEI
	SEP.b #$20
CODE_818819:
	LDA.b $09
	BNE.b CODE_818819
	STZ.b $0D
	STZ.b $0C
	REP.b #$30
	LDX.w #JP_GFX_OceanLogo
	LDA.w #JP_GFX_OceanLogo>>16
	LDY.w #$0000
	JSL.l CODE_81B31C
	REP.b #$30
	LDX.w #JP_Tilemap_OceanLogo
	LDA.w #JP_Tilemap_OceanLogo>>16
	LDY.w #$4000
	JSL.l CODE_81B378
	REP.b #$30
	LDX.w #JP_Palette_OceanLogo
	LDA.w #JP_Palette_OceanLogo>>16
	JSL.l CODE_81B3A6
	JSL.l CODE_819EF1
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$01
	STA.b $10
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$81
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	LDA.b #$A0
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.b $0B
	REP.b #$30
	LDY.w #$0078
CODE_818896:
	JSL.l CODE_819EF1
	DEY
	BNE.b CODE_818896
	SEP.b #$20
	STZ.b $0B
	RTL

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

CODE_8188A2:
	REP.b #$30
	LDA.w $0E46
	BNE.b CODE_8188AA
	RTL

CODE_8188AA:
	CLC
	LDA.w $0E46
	XBA
	CMP.w #$8000
	BCC.b CODE_8188B5
	SEC
CODE_8188B5:
	ROL
	AND.w #$001F
	STA.w $06D3
	CLC
	LDA.w $0E48
	LSR
	LSR
	AND.w #$3FE0
	ORA.w $06D3
	STA.w $06D3
	LDX.w #$0038
CODE_8188CE:
	LDA.l DATA_818903,x
	CMP.w $06D3
	BEQ.b CODE_8188E1
	DEX
	DEX
	DEX
	DEX
	BPL.b CODE_8188CE
	STZ.w $0E46
	RTL

CODE_8188E1:
	LDA.l DATA_818903+$02,x
	STA.w !RAM_JP_Exterior_BuildingEntranceLo
	LDA.w $0E46
	STA.w !RAM_JP_Exterior_Player_CheckpointXPosLo
	LDA.w $0E48
	STA.w !RAM_JP_Exterior_Player_CheckpointYPosLo
	LDA.w !RAM_JP_Exterior_Player_InteractionZPosLo
	STA.w !RAM_JP_Exterior_Player_CheckpointZPosLo
	LDA.w #$FFFE
	STA.w $0E0B
	REP.b #$20
	RTL

DATA_818903:
	dw $0000,$0000
	dw $006A,!Define_JP_InteriorFloorID_NorthUtilityShedGroundLevel
	dw $00B4,!Define_JP_InteriorFloorID_RaptorPenEntryLevel
	dw $014C,!Define_JP_InteriorFloorID_VisitorCenterRoofLevel
	dw $016C,!Define_JP_InteriorFloorID_VisitorCenterGroundLevel
	dw $0366,!Define_JP_InteriorFloorID_BeachUtilityShedGroundLevel
	dw $0370,!Define_JP_InteriorFloorID_NublarUtilityShedGroundLevel
	dw $02DD,!Define_JP_InteriorFloorID_ShipEntryLevel
	dw $0017,!Define_JP_InteriorFloorID_RaptorNestNorthEntrance
	dw $0016,!Define_JP_InteriorFloorID_RaptorNestNorthEntrance
	dw $017E,!Define_JP_InteriorFloorID_RaptorNestEastEntrance
	dw $017D,!Define_JP_InteriorFloorID_RaptorNestEastEntrance
	dw $02B6,!Define_JP_InteriorFloorID_SecretLevel
	dw $014D,!Define_JP_InteriorFloorID_VisitorCenterRoofLevel
	dw $016D,!Define_JP_InteriorFloorID_VisitorCenterGroundLevel

DATA_81893F:
	dw $0000,$0000,$0000,$0000
	dw $0520,$01F0,$0800,$0000
	dw $0A70,$02C0,$4000,$0000
	dw $0670,$0530,$4000,$0000
	dw $0670,$05D0,$0800,$0000
	dw $0340,$0DF0,$0800,$0000
	dw $0820,$0DF0,$0800,$0000
	dw $0ED0,$0B70,$0800,$0000
	dw $0BB0,$0070,$0800,$0000
	dw $0BB0,$0070,$0800,$0000
	dw $0F00,$05C0,$0800,$0000
	dw $0F00,$05C0,$0800,$0000
	dw $0B74,$0B00,$4000,$0000

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

CODE_8189A7:
	REP.b #$30
	LDA.w #!RAM_JP_Global_OAMBuffer
	STA.l DMA[$00].SourceLo|!FastROMAddressOffset
	LDA.w #$0220
	STA.l DMA[$00].SizeLo|!FastROMAddressOffset
	LDA.w #$0000
	STA.l !REGISTER_OAMAddressLo|!FastROMAddressOffset
	SEP.b #$20
	STA.l DMA[$00].SourceBank|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

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

CODE_8189CB:
	PHB
	LDA.b #DATA_80833A>>16
	PHA
	PLB
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDX.b $6A
	JMP.w (DATA_8189DA,x)

DATA_8189DA:
	dw CODE_8189E2
	dw CODE_818B97
	dw CODE_818DD9
	dw CODE_818EFA

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

CODE_8189E2:
	JSR.w CODE_819112
	LDA.b #DATA_979080>>16
	STA.w DMA[$01].SourceBank
	LDA.b #$02
	LDX.b $8A
	BMI.b CODE_818A11
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$6E00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6F00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818A11:
	LDX.b $8C
	BMI.b CODE_818A36
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$6E20
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6F20
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818A36:
	LDX.b $8E
	BMI.b CODE_818A5B
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$6E40
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6F40
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818A5B:
	LDX.b $90
	BMI.b CODE_818A80
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$6E60
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6F60
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818A80:
	LDX.b $92
	BMI.b CODE_818AA5
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$7000
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7100
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818AA5:
	LDX.b $94
	BMI.b CODE_818ACA
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$7020
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7120
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818ACA:
	LDX.b $96
	BMI.b CODE_818AEF
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$7200
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7300
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818AEF:
	LDX.b $98
	BMI.b CODE_818B14
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$7220
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7320
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818B14:
	LDX.b $9A
	BMI.b CODE_818B39
	LDY.w DATA_80833A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDY.w #$6E80
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6F80
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818B39:
	LDX.b $9C
	BMI.b CODE_818B7E
	LDA.w DATA_80851E+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_80851E,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0080
	LDA.b #$02
	LDY.w #$6AC0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6BC0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6CC0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6DC0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818B7E:
	LDY.w #$FFFF
	STY.b $9C
	STY.b $9A
	STY.b $8A
	STY.b $8C
	STY.b $8E
	STY.b $90
	STY.b $92
	STY.b $94
	STY.b $96
	STY.b $98
	PLB
	RTL

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

CODE_818B97:
	LDX.b $9E
	BMI.b CODE_818C11
	LDA.w DATA_808B9A+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_808B9A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0180
	LDA.b #$02
	LDY.w #$6600
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6700
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6800
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6900
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6A00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6B00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6C00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6D00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$FFFF
	STY.b $9E
CODE_818C11:
	STZ.b $6E
	LDA.w $006C
	BEQ.b CODE_818C1F
	CMP.b #$01
	BEQ.b CODE_818C24
	BRL.w CODE_818CF2

CODE_818C1F:
	STZ.w $006C
	PLB
	RTL

CODE_818C24:
	LDX.b $A2
	BMI.b CODE_818C83
	LDA.w DATA_80895E+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_80895E,x
	STY.w DMA[$01].SourceLo
	LDX.w #$00C0
	LDA.b #$02
	STA.b $6E
	LDY.w #$6040
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6140
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6240
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6340
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6440
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6540
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818C83:
	LDX.b $A4
	BMI.b CODE_818CE2
	LDA.w DATA_80895E+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_80895E,x
	STY.w DMA[$01].SourceLo
	LDX.w #$00C0
	LDA.b #$02
	STA.b $6E
	LDY.w #$60A0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$61A0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$62A0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$63A0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$64A0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$65A0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818CE2:
	LDA.b $6E
	BNE.b CODE_818CE9
	STZ.w $006C
CODE_818CE9:
	LDY.w #$FFFF
	STY.b $A2
	STY.b $A4
	PLB
	RTL

CODE_818CF2:
	LDX.b $B2
	BMI.b CODE_818D39
	LDA.w DATA_80851E+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_80851E,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0080
	LDA.b #$02
	STA.b $6E
	LDY.w #$6040
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6140
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6240
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6340
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818D39:
	LDX.b $B4
	BMI.b CODE_818D80
	LDA.w DATA_80851E+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_80851E,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0080
	LDA.b #$02
	STA.b $6E
	LDY.w #$6080
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6180
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6280
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6380
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818D80:
	LDX.b $B6
	BMI.b CODE_818DC7
	LDA.w DATA_80851E+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_80851E,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0080
	LDA.b #$02
	STA.b $6E
	LDY.w #$60C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$61C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$62C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$63C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_818DC7:
	LDA.b $6E
	BNE.b CODE_818DCE
	STZ.w $006C
CODE_818DCE:
	LDY.w #$FFFF
	STY.b $B2
	STY.b $B4
	STY.b $B6
	PLB
	RTL

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

CODE_818DD9:
	STZ.b $BA
	LDX.b $B8
	BMI.b CODE_818E42
	LDA.w DATA_80851E+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_80851E,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0080
	LDA.b #$02
	LDY.w #$66C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$67C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$68C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$69C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	STA.b $BA
	LDY.w #$FFFF
	STY.b $B8
	LDA.b #DATA_81CFB9>>16
	STA.w DMA[$02].SourceBank
	LDY.w $06CF
	STY.w DMA[$02].SourceLo
	LDY.w #$0020
	STY.w DMA[$02].SizeLo
	LDA.b #$E0
	STA.w !REGISTER_CGRAMAddress
	LDA.b #$04
	STA.w !REGISTER_DMAEnable
CODE_818E42:
	JSL.l CODE_8196D2
	JSL.l CODE_81864C
	SEP.b #$10
	REP.b #$20
	LDA.l $7E06E9
	BEQ.b CODE_818E70
	LDX.b #$7E06EB>>16
	STX.w DMA[$01].SourceBank
	LDA.w #$7E06EB
	STA.w DMA[$01].SourceLo
	LDA.w #$5008
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0300
	STA.w DMA[$01].SizeLo
	LDX.b #$02
	STX.w !REGISTER_DMAEnable
CODE_818E70:
	LDA.l $7E02A1
	BEQ.b CODE_818E8F
	STA.w DMA[$01].SourceLo
	LDX.b #DATA_978000>>16
	STX.w DMA[$01].SourceBank
	LDA.w #$5460
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0080
	STA.w DMA[$01].SizeLo
	LDX.b #$02
	STX.w !REGISTER_DMAEnable
CODE_818E8F:
	LDA.w $06D1
	BEQ.b CODE_818EAF
	STA.w DMA[$02].SourceLo
	LDY.b #DATA_81D1B9>>16
	STY.w DMA[$02].SourceBank
	LDA.w #$0020
	STA.w DMA[$02].SizeLo
	LDY.b #$10
	STY.w !REGISTER_CGRAMAddress
	LDY.b #$04
	STY.w !REGISTER_DMAEnable
	STZ.w $06D1
CODE_818EAF:
	LDA.w $0028
	BEQ.b CODE_818ED2
	LDX.b $2C
	STX.w DMA[$01].SourceBank
	LDA.b $2A
	STA.w DMA[$01].SourceLo
	LDA.w $002E
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $0030
	STA.w DMA[$01].SizeLo
	LDX.b #$02
	STX.w !REGISTER_DMAEnable
	STZ.w $0028
CODE_818ED2:
	STZ.w !REGISTER_WRAMAddressHi
	LDA.w #$06EB
	STA.w !REGISTER_WRAMAddressLo
	LDA.w #JP_GFX_Layer3_RadarTiles
	STA.w DMA[$03].SourceLo
	LDX.b #JP_GFX_Layer3_RadarTiles>>16
	STX.w DMA[$03].SourceBank
	LDA.w #$0300
	STA.w DMA[$03].SizeLo
	LDX.b #$08
	STX.w !REGISTER_DMAEnable
	LDA.w #$0000
	STA.l $7E06E9
	PLB
	RTL

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

CODE_818EFA:
	LDX.w $0070
	BEQ.b CODE_818F1D
	STX.w DMA[$02].SourceLo
	LDA.b #DATA_80A21A>>16
	STA.w DMA[$02].SourceBank
	LDX.w #$0020
	STX.w DMA[$02].SizeLo
	LDA.b #$80
	STA.w !REGISTER_CGRAMAddress
	LDA.b #$04
	STA.w !REGISTER_DMAEnable
	LDX.w #$0000
	STX.w $0070
CODE_818F1D:
	LDA.w $0072
	BEQ.b CODE_818F2B
	CMP.b #$03
	BCC.b CODE_818F30
	BEQ.b CODE_818F58
	BRL.w CODE_819004

CODE_818F2B:
	STZ.w $0072
	PLB
	RTL

CODE_818F30:
	LDX.b $A0
	BMI.b CODE_818F2B
	LDA.w DATA_808BBE+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_808BBE,x
	STY.w DMA[$01].SourceLo
	LDX.w #$1800
	LDA.b #$02
	LDY.w #$7400
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$FFFF
	STY.b $A0
	PLB
	RTL

CODE_818F58:
	LDX.b $A0
	BMI.b CODE_818F2B
	LDA.w DATA_808B9A+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_808B9A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0100
	LDA.b #$02
	LDY.w #$7400
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7500
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7600
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7700
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7800
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7900
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7A00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7B00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7C00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7D00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7E00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$7F00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$FFFF
	STY.b $A0
	PLB
	RTL

CODE_819004:
	STZ.w $0076
	LDX.b $A6
	BMI.b CODE_819058
	LDA.w DATA_808A4A+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_808A4A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0800
	LDA.b #$02
	STA.w $0076
	LDY.w #$7400
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDX.b $AC
	BMI.b CODE_819058
	LDA.w DATA_8084E2+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_8084E2,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDA.b #$02
	LDY.w #$70E0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$71E0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_819058:
	LDX.b $A8
	BMI.b CODE_8190A9
	LDA.w DATA_808A4A+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_808A4A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0800
	LDA.b #$02
	STA.w $0076
	LDY.w #$7800
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDX.b $AE
	BMI.b CODE_8190A9
	LDA.w DATA_8084E2+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_8084E2,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDA.b #$02
	LDY.w #$72C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$73C0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_8190A9:
	LDX.b $AA
	BMI.b CODE_8190FA
	LDA.w DATA_808A4A+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_808A4A,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0800
	LDA.b #$02
	STA.w $0076
	LDY.w #$7C00
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDX.b $B0
	BMI.b CODE_8190FA
	LDA.w DATA_8084E2+$02,x
	STA.w DMA[$01].SourceBank
	LDY.w DATA_8084E2,x
	STY.w DMA[$01].SourceLo
	LDX.w #$0040
	LDA.b #$02
	LDY.w #$72E0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$73E0
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
CODE_8190FA:
	LDA.b $76
	BNE.b CODE_819101
	STZ.w $0072
CODE_819101:
	LDY.w #$FFFF
	STY.b $A6
	STY.b $AC
	STY.b $A8
	STY.b $AE
	STY.b $AA
	STY.b $B0
	PLB
	RTL

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

CODE_819112:
	REP.b #$30
	LDA.w $0B59
	BEQ.b CODE_819138
	STA.w DMA[$02].SourceLo
	STZ.w $0B59
	LDA.w #$0020
	STA.w DMA[$02].SizeLo
	SEP.b #$20
	LDA.b #DATA_80A27A>>16
	STA.w DMA[$02].SourceBank
	LDA.b #$F0
	STA.w !REGISTER_CGRAMAddress
	LDA.b #$04
	STA.w !REGISTER_DMAEnable
	REP.b #$30
CODE_819138:
	LDY.b $88
	SEP.b #$20
	LDX.w DATA_8086AA,y
	STX.w DMA[$01].SourceLo
	LDA.w DATA_8086AA+$02,y
	STA.w DMA[$01].SourceBank
	LDX.w #$0080
	LDA.b #$02
	LDY.w #$6000
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6100
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6200
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6300
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6400
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	LDY.w #$6500
	STY.w !REGISTER_VRAMAddressLo
	STX.w DMA[$01].SizeLo
	STA.w !REGISTER_DMAEnable
	RTS

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

CODE_819196:
	SEI
	JSL.l CODE_819EE6
	REP.b #$30
	STZ.w $0AFB
	STZ.w $0AFD
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	PHB
	LDX.w #JP_GFX_BG_GameOverScreenPart1
	LDY.w #$7F4000
	LDA.w #JP_GFX_BG_GameOverScreenPart1_End-JP_GFX_BG_GameOverScreenPart1-$01
	MVN $7F4000>>16,JP_GFX_BG_GameOverScreenPart1>>16
	LDX.w #JP_GFX_BG_GameOverScreenPart2
	LDY.w #(JP_GFX_BG_GameOverScreenPart1_End-JP_GFX_BG_GameOverScreenPart1)+$7F4000
	LDA.w #JP_GFX_BG_GameOverScreenPart2_End-JP_GFX_BG_GameOverScreenPart2-$01
	MVN $7FC000>>16,JP_GFX_BG_GameOverScreenPart2>>16
	PLB
	LDX.w #$7F4000
	LDA.w #$7F4000>>16
	LDY.w #$0000
	JSL.l CODE_81B18B
	TYA
	SEC
	SBC.w #$7F0000
	TAY
	STZ.w $0461
	LDA.w #$7F0000
	STA.w $0463
	LDA.w #$7F0000>>16
	STA.w $0465
	LDA.w #!REGISTER_WriteToVRAMPortLo
	STA.w $045F
	SEP.b #$20
	INC.b $09
CODE_8191FD:
	LDA.b $09
	BNE.b CODE_8191FD
	REP.b #$20
	TYA
	STA.w $0467
CODE_819207:
	LDA.w $0467
	BNE.b CODE_819207
	LDX.w #JP_Tilemap_BG_GameOverScreen
	LDA.w #JP_Tilemap_BG_GameOverScreen>>16
	LDY.w #$7C00
	JSL.l CODE_81B378
	REP.b #$30
	LDX.w #JP_GFX_Sprite_GameOverScreenNumbers
	LDA.w #JP_GFX_Sprite_GameOverScreenNumbers>>16
	LDY.w #$7000
	JSL.l CODE_81B34A
	REP.b #$30
	LDX.w #JP_Palette_GameOverScreen
	LDA.w #JP_Palette_GameOverScreen>>16
	JSL.l CODE_81B3A6
	REP.b #$30
	LDY.w #DATA_B4EFFB>>16
	LDX.w #DATA_B4EFFB
	JSL.l CODE_839C4A
	JSL.l CODE_819EF1
	SEP.b #$30
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b #$7C
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$03
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$11
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	STA.b $10
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$3F
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$A0
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$01
	STA.b $0C
	LDA.b #$0F
	STA.b $0B
	LDA.b #$00
	STA.b $0D
	STA.b $0F
	STZ.w $0E44
	LDA.b #$05
	STA.w $0E45
	LDA.b #$03
	LDX.w $0E43
	CPX.b #$02
	BEQ.b CODE_8192AD
	LDA.b #$02
CODE_8192AD:
	STA.w !RAM_JP_Global_Player_CurrentLifeCountLo
	STZ.w !RAM_JP_Global_Player_CurrentLifeCountHi
	LDA.w $0E43
	BEQ.b CODE_8192BB
	DEC.w $0E43
CODE_8192BB:
	JSL.l CODE_80F621
CODE_8192BF:
	JSL.l CODE_819EF1
	SEP.b #$30
	INC.w $0E44
	LDA.w $0E44
	CMP.b #$A0
	BNE.b CODE_8192D7
	STZ.w $0E44
	DEC.w $0E45
	BMI.b CODE_8192F0
CODE_8192D7:
	JSR.w CODE_8192FC
	REP.b #$30
	LDA.w $0AF1
	AND.w #$F0C0
	BEQ.b CODE_8192BF
	SEP.b #$20
	STZ.b $0B
	REP.b #$30
	JSL.l CODE_839D62
	SEC
	RTL

CODE_8192F0:
	SEP.b #$30
	STZ.b $0B
	REP.b #$30
	JSL.l CODE_839D62
	CLC
	RTL

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

CODE_8192FC:
	LDA.b #$E0
	STA.w JP_Global_OAMBuffer[$00].YDisp
	STA.w JP_Global_OAMBuffer[$01].YDisp
	LDA.w $0E44
	CMP.b #$64
	BCC.b CODE_819345
	BNE.b CODE_81931B
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_GameOverCountdown&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
	SEP.b #$30
CODE_81931B:
	LDX.w $0E45
	LDA.l DATA_819346,x
	STA.w JP_Global_OAMBuffer[$00].Tile
	CLC
	ADC.b #$20
	STA.w JP_Global_OAMBuffer[$01].Tile
	LDA.b #$70
	STA.w JP_Global_OAMBuffer[$00].XDisp
	STA.w JP_Global_OAMBuffer[$01].XDisp
	LDA.b #$78
	STA.w JP_Global_OAMBuffer[$00].YDisp
	LDA.b #$88
	STA.w JP_Global_OAMBuffer[$01].YDisp
	LDA.b #$3F
	STA.w JP_Global_OAMBuffer[$00].Prop
	STA.w JP_Global_OAMBuffer[$01].Prop
CODE_819345:
	RTS

DATA_819346:
	db $00,$02,$04,$06,$08,$0A,$0C,$0E
	db $40,$42

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

CODE_819350:
	REP.b #$30
	LDA.w $06E9
	BEQ.b CODE_819358
CODE_819357:
	RTL

CODE_819358:
	LDA.w !RAM_JP_Exterior_MotionSensorActiveFlagLo
	BNE.b CODE_819360
	BRL.w CODE_8193FD

CODE_819360:
	LDA.w $049D
	AND.w #$0007
	CMP.w #$0002
	BCS.b CODE_819357
	LDA.w $0AFB
	SEC
	SBC.w #$0100
	STA.w $06E1
	LDA.w $0AFD
	SEC
	SBC.w #$0080
	STA.w $06E3
	LDX.w $09ED
	BEQ.b CODE_8193FD
CODE_819384:
	LDY.w $0000,x
	CPY.w #$FFFF
	BEQ.b CODE_8193FD
	PHX
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	BEQ.b CODE_8193F8					; Note: !Define_JP_ExteriorSpriteID00_None
	CMP.w #!Define_JP_ExteriorSpriteID24_BridgeRotatingMechanism
	BCS.b CODE_8193F8
	LDX.w #$0020
	CMP.w #!Define_JP_ExteriorSpriteID12_Velociraptor
	BCS.b CODE_8193AA
	LDX.w #$0010
	CMP.w #!Define_JP_ExteriorSpriteID0A_Egg
	BCS.b CODE_8193AA
	LDX.w #$0000
CODE_8193AA:
	STX.w $02A9
	LDX.w $7E380C,y
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	CLC
	ADC.l DATA_819499,x
	SEC
	SBC.w $06E1
	BMI.b CODE_8193F8
	CMP.w #$02F8
	BCS.b CODE_8193F8
	LSR
	LSR
	LSR
	STA.w $06E5
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	CLC
	ADC.l $8194B3,x
	SEC
	SBC.w $06E3
	BMI.b CODE_8193F8
	CMP.w #$01F0
	BCS.b CODE_8193F8
	LSR
	LSR
	LSR
	LSR
	STA.w $06E7
	JSR.w CODE_819401
	INC.w $06E5
	JSR.w CODE_819401
	INC.w $06E7
	JSR.w CODE_819401
	DEC.w $06E5
	JSR.w CODE_819401
CODE_8193F8:
	PLX
	INX
	INX
	BRA.b CODE_819384

CODE_8193FD:
	INC.w $06E9
	RTL

CODE_819401:
	LDA.w $06E7
	ASL
	TAX
	LDA.w $06E5
	ASL
	AND.w #$FFF0
	ADC.l DATA_819459,x
	TAY
	LDA.w $06E5
	AND.w #$0007
	ASL
	ORA.w $02A9
	TAX
	LDA.l DATA_819429,x
	TYX
	ORA.w $06EB,x
	STA.w $06EB,x
	RTS

DATA_819429:
	dw $0080,$0040,$0020,$0010,$0008,$0004,$0002,$0001
	dw $8000,$4000,$2000,$1000,$0800,$0400,$0200,$0100
	dw $8080,$4040,$2020,$1010,$0808,$0404,$0202,$0101

DATA_819459:
	dw $0000,$0002,$0004,$0006,$0008,$000A,$000C,$000E
	dw $00C0,$00C2,$00C4,$00C6,$00C8,$00CA,$00CC,$00CE
	dw $0180,$0182,$0184,$0186,$0188,$018A,$018C,$018E
	dw $0240,$0242,$0244,$0246,$0248,$024A,$024C,$024E

DATA_819499:
	dw $0008,$0008,$0008,$0010,$0010,$0010,$0018,$0018
	dw $0030,$0020,$0040,$0020,$0030

DATA_8194B3:
	dw $0008,$0008,$0008,$0010,$0010,$0018,$0018,$0018
	dw $0020,$0030,$0030,$0030,$0020

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

CODE_8194CD:
	SEP.b #$30
	LDX.b #$03
CODE_8194D1:
	LDA.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit,x
	CLC
	ADC.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit,x
CODE_8194D8:
	CMP.b #$0A
	BCC.b CODE_8194E4
	INC.w $0202,x
	SEC
	SBC.b #$0A
	BRA.b CODE_8194D8

CODE_8194E4:
	STA.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit,x
	STZ.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit,x
	DEX
	BPL.b CODE_8194D1
	LDA.w $049D
	AND.b #$07
	CMP.b #$02
	BNE.b CODE_8194F9
	JSR.w CODE_8194FC
CODE_8194F9:
	RTL

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

DATA_8194FA:
	dw $0000

CODE_8194FC:
	REP.b #$30
	LDA.w #DATA_8194FA
	STA.l DMA[$04].SourceLo|!FastROMAddressOffset
	LDA.w #$02AB
	STA.l !REGISTER_WRAMAddressLo|!FastROMAddressOffset
	LDA.w #$003F
	STA.l DMA[$04].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b #DATA_8194FA>>16
	STA.l DMA[$04].SourceBank|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_WRAMAddressBank|!FastROMAddressOffset
	STZ.w $02AB
	LDA.b #$10
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$30
	JSR.w CODE_8195AD
	JSR.w CODE_819613
	JSR.w CODE_8195DB
	REP.b #$30
	LDX.w !RAM_JP_Global_Player_DamageTakenLo
	TXA
	CMP.w #$0101
	BCC.b CODE_819543
	LDA.w #$0100
CODE_819543:
	ASL
	AND.w #$FFF0
	CLC
	ADC.w #JP_Tilemap_HealthBarTilemaps
	STA.w $02ED
	LDY.w #$0000
	LDA.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit
	JSR.w CODE_819566
	LDA.w !RAM_JP_Global_Player_CurrentScoreHundredsDigit
	JSR.w CODE_819566
	LDA.w !RAM_JP_Global_Player_CurrentScoreTensDigit
	JSR.w CODE_819566
	LDA.w !RAM_JP_Global_Player_CurrentScoreOnesDigit
CODE_819566:
	AND.w #$000F
	ASL
	ASL
	ASL
	ASL
	TAX
	LDA.l DATA_8198F0,x
	STA.w $020B,y
	LDA.l DATA_8198F0+$02,x
	STA.w $020D,y
	LDA.l DATA_8198F0+$04,x
	STA.w $020F,y
	LDA.l DATA_8198F0+$06,x
	STA.w $0211,y
	LDA.l DATA_8198F0+$08,x
	STA.w $0213,y
	LDA.l DATA_8198F0+$0A,x
	STA.w $0215,y
	LDA.l DATA_8198F0+$0C,x
	STA.w $0217,y
	LDA.l DATA_8198F0+$0E,x
	STA.w $0219,y
	TYA
	CLC
	ADC.w #$0010
	TAY
	RTS

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

CODE_8195AD:
	LDY.w #$0000
	LDX.w !RAM_JP_Global_Player_CurrentLifeCountLo
	CPX.w #$0005
	BCC.b CODE_8195BB
	LDX.w #$0004
CODE_8195BB:
	DEX
	BMI.b CODE_8195DA
	LDA.w #$303B
	STA.w $02AB,y
	LDA.w #$303C
	STA.w $02B3,y
	LDA.w #$303D
	STA.w $02BB,y
	LDA.w #$303E
	STA.w $02C3,y
	INY
	INY
	BRA.b CODE_8195BB

CODE_8195DA:
	RTS

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

CODE_8195DB:
	LDY.w #$0000
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BEQ.b CODE_819612
	LDX.w !RAM_JP_Global_Player_SecondaryWeaponLo
	LDA.l DATA_8199E0,x
	TAX
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	DEC
CODE_8195EF:
	DEX
	BMI.b CODE_8195F5
	LSR
	BRA.b CODE_8195EF

CODE_8195F5:
	INC
	TAX
	CPX.w #$0005
	BCC.b CODE_8195FF
	LDX.w #$0004
CODE_8195FF:
	DEX
	BMI.b CODE_819612
	LDA.w $0299
	STA.w $02DB,y
	LDA.w $029B
	STA.w $02E3,y
	INY
	INY
	BRA.b CODE_8195FF

CODE_819612:
	RTS

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

CODE_819613:
	LDA.w $037D
	BNE.b CODE_819653
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_819653
	LDX.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.l DATA_8199E0,x
	TAX
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	DEC
CODE_819629:
	DEX
	BMI.b CODE_81962F
	LSR
	BRA.b CODE_819629

CODE_81962F:
	INC
	TAX
	LDY.w #$0000
	STZ.w $02A1
	CPX.w #$0005
	BCC.b CODE_81963F
	LDX.w #$0004
CODE_81963F:
	DEX
	BMI.b CODE_819652
	LDA.w $028F
	STA.w $02CB,y
	LDA.w $0291
	STA.w $02D3,y
	INY
	INY
	BRA.b CODE_81963F

CODE_819652:
	RTS

CODE_819653:
	LDA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	ASL
	TAX
	LDA.l DATA_819690,x
	STA.w $02A1
	LDA.w #$208C
	STA.w $02CB
	LDA.w #$348D
	STA.w $02CD
	LDA.w #$348E
	STA.w $02CF
	LDA.w #$348F
	STA.w $02D1
	LDA.w #$2090
	STA.w $02D3
	LDA.w #$3491
	STA.w $02D5
	LDA.w #$3492
	STA.w $02D7
	LDA.w #$3493
	STA.w $02D9
	RTS

DATA_819690:
	dw DATA_978000+$0000,DATA_978000+$0080,DATA_978000+$0100,DATA_978000+$0180
	dw DATA_978000+$0200,DATA_978000+$0280,DATA_978000+$0300,DATA_978000+$0380
	dw DATA_978000+$0400,DATA_978000+$0480,DATA_978000+$0500,DATA_978000+$0580
	dw DATA_978000+$0600,DATA_978000+$0680,DATA_978000+$0700,DATA_978000+$0780
	dw DATA_978000+$0800,DATA_978000+$0880,DATA_978000+$0900,DATA_978000+$0980
	dw DATA_978000+$0A00,DATA_978000+$0A80,DATA_978000+$0B00,DATA_978000+$0B80
	dw DATA_978000+$0C00,DATA_978000+$0C80,DATA_978000+$0D00,DATA_978000+$0D80
	dw DATA_978000+$0E00,DATA_978000+$0E80,DATA_978000+$0F00,DATA_978000+$0F80
	dw DATA_978000+$0F80

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

CODE_8196D2:
	REP.b #$30
	LDA.w #$4AE1
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E020B
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E020D
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E021B
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E021D
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E022B
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E022D
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E023B
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E023D
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B01
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E020F
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0211
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E021F
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0221
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E022F
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0231
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E023F
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0241
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B21
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E0213
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0215
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0223
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0225
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0233
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0235
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0243
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0245
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B41
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E0217
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0219
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0227
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0229
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0237
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0239
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0247
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E0249
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B37
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E02CB
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02CD
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02CF
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02D1
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B57
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E02D3
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02D5
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02D7
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02D9
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B3B
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E02DB
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02DD
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02DF
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02E1
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B5B
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E02E3
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02E5
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02E7
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02E9
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4AF7
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E02AB
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02B3
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02AD
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02B5
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02AF
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02B7
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02B1
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02B9
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.w #$4B17
	STA.w !REGISTER_VRAMAddressLo
	LDA.l $7E02BB
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02C3
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02BD
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02C5
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02BF
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02C7
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02C1
	STA.w !REGISTER_WriteToVRAMPortLo
	LDA.l $7E02C9
	STA.w !REGISTER_WriteToVRAMPortLo
	SEP.b #$10
	LDA.l $7E02ED
	STA.w DMA[$01].SourceLo
	LDX.b #JP_Tilemap_HealthBarTilemaps>>16
	STX.w DMA[$01].SourceBank
	LDA.w #$4B4C
	STA.w !REGISTER_VRAMAddressLo
	LDA.w #$0010
	STA.w DMA[$01].SizeLo
	LDX.b #$02
	STX.w !REGISTER_DMAEnable
	RTL

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

DATA_8198F0:
	dw $303F,$3040,$304B,$304C,$304B,$304C,$B03F,$B040
	dw $3041,$3042,$304D,$304E,$304D,$305B,$306A,$306B
	dw $3043,$3040,$304F,$3050,$305C,$305D,$B03F,$306C
	dw $3043,$3040,$304F,$3051,$305E,$305F,$B043,$B040
	dw $3044,$3045,$304B,$3052,$3060,$3061,$3000,$306D
	dw $3046,$3047,$3053,$3054,$3062,$3063,$B043,$B040
	dw $3044,$3000,$304B,$3000,$3064,$3065,$B03F,$306E
	dw $3043,$3040,$3055,$3056,$3066,$3067,$306F,$3070
	dw $3048,$3049,$3057,$3058,$3068,$3069,$B03F,$B040
	dw $304A,$3040,$3059,$305A,$3000,$304C,$3000,$3071

DATA_819990:  
	dw $2C31,$2C36,$2832,$2837,$3C33,$3C38,$2434,$2439
	dw $2435,$243A

DATA_8199A4:
	dw !Define_JP_ExteriorSpriteID4C_ShotgunShot
	dw !Define_JP_ExteriorSpriteID4E_RocketLauncherShot
	dw !Define_JP_ExteriorSpriteID50_TranquilizerShot
	dw !Define_JP_ExteriorSpriteID52_GasGrenadeShot
	dw !Define_JP_ExteriorSpriteID54_InitialBolasSnareRifleShot

DATA_8199AE:
	dw $0804,$080C,$0814,$081C,$0A24

DATA_8199B8:
	dw $0825,$0826,$0827,$0A29,$0A28

DATA_8199C2:
	dw $0028,$0028,$0028,$0050,$0050

DATA_8199CC:
	dw $0011,$0011,$0011,$000A,$0011

DATA_8199D6:
	dw $0000,$0000,$0000,$0002,$0000

DATA_8199E0:
	dw $0003,$0001,$0002,$0002,$0001

DATA_8199EA:
	dw !Define_JP_SoundID_FireShotgun
	dw !Define_JP_SoundID_FireRocketLauncherOrTranquilizerGun
	dw !Define_JP_SoundID_FireRocketLauncherOrTranquilizerGun
	dw !Define_JP_SoundID_FireGasGrenade
	dw !Define_JP_SoundID_FireBolasSnareRifle

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

CODE_8199F4:
	REP.b #$30
	STA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	TAX
	LDA.l DATA_8199B8,x
	STA.w $0293
	TXA
	ASL
	TAX
	LDA.l DATA_819990,x
	STA.w $028F
	LDA.l DATA_819990+$02,x
	STA.w $0291
	RTL

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

CODE_819A13:
	REP.b #$30
	STA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	TAX
	LDA.l DATA_8199B8,x
	STA.w $029D
	TXA
	ASL
	TAX
	LDA.l DATA_819990,x
	STA.w $0299
	LDA.l DATA_819990+$02,x
	STA.w $029B
	RTL

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

CODE_819A32:
	PHP
	SEP.b #$30
	JSL.l CODE_819EF1
	LDA.b #$33
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	LDA.b #$33
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_BGWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ColorAndObjectWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$A2
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.b $34
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FF
	STA.b $36
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$1F
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
CODE_819A75:
	JSL.l CODE_819EF1
	LDA.b $34
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b $36
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b $36
	SEC
	SBC.b #$04
	STA.b $36
	LDA.b $34
	CLC
	ADC.b #$04
	STA.b $34
	CMP.b #$84
	BNE.b CODE_819A75
	JSL.l CODE_819EF1
	LDA.b #$0F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
	PLP
	RTL

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

CODE_819AAD:
	PHP
	SEP.b #$30
	JSL.l CODE_819EF1
	LDA.b #$33
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	LDA.b #$33
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_BGWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ColorAndObjectWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$A2
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$80
	STA.b $34
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$80
	STA.b $36
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b #$1F
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
CODE_819AF6:
	JSL.l CODE_819EF1
	LDA.b $34
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b $36
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b $36
	CLC
	ADC.b #$04
	STA.b $36
	LDA.b $34
	SEC
	SBC.b #$04
	STA.b $34
	BNE.b CODE_819AF6
	JSL.l CODE_819EF1
	LDA.b #$00
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	PLP
	RTL

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

CODE_819B32:
	JSL.l CODE_819EF1
	DEX
	BNE.b CODE_819B32
	RTL

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

CODE_819B3A:
	RTL

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

CODE_819B3B:
	SEP.b #$20
	LDA.b #$8F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	STA.l !REGISTER_OAMAddressLo|!FastROMAddressOffset
	STA.l !REGISTER_OAMAddressHi|!FastROMAddressOffset
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG2HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG2HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG2VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG2VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG3VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG3VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG4HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG4HorizScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG4VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG4VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_Mode7TilemapSettings|!FastROMAddressOffset
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	STA.l !REGISTER_Mode7MatrixParameterC|!FastROMAddressOffset
	STA.l !REGISTER_Mode7MatrixParameterC|!FastROMAddressOffset
	STA.l !REGISTER_Mode7MatrixParameterD|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_Mode7MatrixParameterD|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	STA.l !REGISTER_Window2LeftPositionDesignation|!FastROMAddressOffset
	STA.l !REGISTER_Window2RightPositionDesignation|!FastROMAddressOffset
	STA.l !REGISTER_BGWindowLogicSettings|!FastROMAddressOffset
	STA.l !REGISTER_ColorAndObjectWindowLogicSettings|!FastROMAddressOffset
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_ProgrammableIOPortOutput|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	STA.l !REGISTER_DividendLo|!FastROMAddressOffset
	STA.l !REGISTER_DividendHi|!FastROMAddressOffset
	STA.l !REGISTER_Divisor|!FastROMAddressOffset
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	STA.l !REGISTER_HCountTimerHi|!FastROMAddressOffset
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	STA.l !REGISTER_VCountTimerHi|!FastROMAddressOffset
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	STA.l !REGISTER_MosaicSizeAndBGEnable|!FastROMAddressOffset
	RTL

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

CODE_819C36:
	REP.b #$30
	LDX.w #$00FE
	LDA.w #$0000
CODE_819C3E:
	STA.b $00,x
	DEX
	DEX
	BPL.b CODE_819C3E
	LDX.w #$0200
	LDA.w #$0000
CODE_819C4A:
	STA.b $00,x
	INX
	INX
	CPX.w #$2000
	BNE.b CODE_819C4A
	LDX.w #$2000
	LDA.w #$0000
CODE_819C59:
	STA.l $7E0000,x
	INX
	INX
	BNE.b CODE_819C59
	LDX.w #$0000
	LDA.w #$0000
CODE_819C67:
	STA.l $7F0000,x
	INX
	INX
	BNE.b CODE_819C67
	RTL

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

CODE_819C70:
	SEP.b #$20
CODE_819C72:
	LDA.l !REGISTER_HVBlankFlagsAndJoypadStatus|!FastROMAddressOffset
	ROR
	BCS.b CODE_819C72
	LDA.l !REGISTER_Joypad1Lo|!FastROMAddressOffset
	AND.b #$0F
	BEQ.b CODE_819C84
	REP.b #$30
	RTL

CODE_819C84:
	REP.b #$30
	LDA.l !REGISTER_Joypad1Lo|!FastROMAddressOffset
	STA.w $0AEF
	LDA.l !REGISTER_Joypad2Lo|!FastROMAddressOffset
	STA.w $0AF5
	SEP.b #$20
	LDA.w $03A9
	AND.b #$01
	BEQ.b CODE_819CA8
	REP.b #$20
	LDA.w $0AEF
	ORA.w #$0080
	STA.w $0AEF
CODE_819CA8:
	SEP.b #$20
	LDA.w $03A9
	AND.b #$02
	BEQ.b CODE_819CBC
	REP.b #$20
	LDA.w $0AEF
	ORA.w #$8000
	STA.w $0AEF
CODE_819CBC:
	REP.b #$30
	BRA.b CODE_819CE4

CODE_819CC0:
	SEP.b #$20
CODE_819CC2:
	LDA.l !REGISTER_HVBlankFlagsAndJoypadStatus|!FastROMAddressOffset
	ROR
	BCS.b CODE_819CC2
	LDA.l !REGISTER_Joypad1Lo|!FastROMAddressOffset
	AND.b #$0F
	BEQ.b CODE_819CD4
	REP.b #$30
	RTL

CODE_819CD4:
	REP.b #$30
	LDA.l !REGISTER_Joypad1Lo|!FastROMAddressOffset
	STA.w $0AEF
	LDA.l !REGISTER_Joypad2Lo|!FastROMAddressOffset
	STA.w $0AF5
CODE_819CE4:
	LDA.w !RAM_JP_Exterior_Player_UseDemoMovementsFlagLo
	BEQ.b CODE_819CF5
	BPL.b CODE_819CF1
	JSL.l CODE_81E598
	BRA.b CODE_819CF5

CODE_819CF1:
	JSL.l CODE_81E5C5
CODE_819CF5:
	LDA.w $0AF3
	AND.w $0AEF
	EOR.w $0AEF
	STA.w $0AF1
	LDA.w $0AF9
	AND.w $0AF5
	EOR.w $0AF5
	STA.w $0AF7
	LDA.w $0AEF
	STA.w $0AF3
	LDA.w $0AF5
	STA.w $0AF9
	RTL

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

CODE_819D1A:
	STA.l !REGISTER_CGRAMAddress|!FastROMAddressOffset
	LDY.w #$0000
CODE_819D21:
	LDA.b [$3C],y
	STA.l !REGISTER_WriteToCGRAMPort|!FastROMAddressOffset
	INY
	LDA.b [$3C],y
	STA.l !REGISTER_WriteToCGRAMPort|!FastROMAddressOffset
	INY
	DEX
	BNE.b CODE_819D21
	RTL

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

CODE_819D33:
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	REP.b #$20
	TXA
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	LDA.b $3C
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b #$01
	STA.l DMA[$01].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.l DMA[$01].Destination|!FastROMAddressOffset
	LDA.b $3E
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

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

CODE_819D64:
	REP.b #$20
	LDA.w #$5B13
	STA.w $0B2D
	LDA.w #$164D
	STA.w $0B2F
	LDA.w #$656B
	STA.w $0B31
	LDA.w #$3CA7
	STA.w $0B33
	LDA.w #$6935
	STA.w $0B35
	RTL

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

CODE_819D85:
	REP.b #$21
	LDA.w $0B31
	ADC.w #$3737
	EOR.w $0B33
	STA.w $0B33
	ROR
	SBC.w $0B35
	ROL
	STA.w $0B35
	ROL.w $0B31
	SBC.w $049D
	STA.w $0B31
	SBC.w $0B2F
	STA.w $0B2F
	RTL

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

CODE_819DAB:
	REP.b #$10
	SEP.b #$20
	STZ.b $34
	LDX.w #$0000
CODE_819DB4:
	LDA.b $34
	LDY.w #$003F
CODE_819DB9:
	STA.l $7F0000,x
	INX
	DEY
	BPL.b CODE_819DB9
	INC.b $34
	LDA.b $34
	BNE.b CODE_819DB4
	REP.b #$30
	LDA.w #$4000
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	LDA.w #$0000
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w #$7F0000
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDA.b #$00
	STA.l DMA[$01].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_WriteToVRAMPortHi
	STA.l DMA[$01].Destination|!FastROMAddressOffset
	LDA.b #$7F0000>>16
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$30
	RTS

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

CODE_819E01:
	SEP.b #$30
	LDA.b #$00
	STA.l DMA[$00].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_OAMDataWritePort
	STA.l DMA[$00].Destination|!FastROMAddressOffset
	LDA.b #$01
	STA.l DMA[$01].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.l DMA[$01].Destination|!FastROMAddressOffset
	LDA.b #$00
	STA.l DMA[$02].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_WriteToCGRAMPort
	STA.l DMA[$02].Destination|!FastROMAddressOffset
	LDA.b #$00
	STA.l DMA[$03].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_ReadOrWriteToWRAMPort
	STA.l DMA[$03].Destination|!FastROMAddressOffset
	LDA.b #$08
	STA.l DMA[$04].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_ReadOrWriteToWRAMPort
	STA.l DMA[$04].Destination|!FastROMAddressOffset
	RTL

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

CODE_819E40:
	SEP.b #$30
	LDA.b #$0F
CODE_819E44:
	STA.b $0B
CODE_819E46:
	JSL.l CODE_819EF1
	JSL.l CODE_819E70
	SEP.b #$20
	LDA.b $0A
	CMP.b $0B
	BNE.b CODE_819E46
	RTL

CODE_819E57:
	SEP.b #$30
	LDA.b #$00
	BRA.b CODE_819E44

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

CODE_819E5D:
	JSL.l CODE_819EF1
	JSL.l CODE_819E70
	SEP.b #$20
	LDA.b $0C
	AND.b #$F0
	CMP.b $0D
	BNE.b CODE_819E5D
	RTL

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

CODE_819E70:
	SEP.b #$20
	STZ.b $09
	LDA.w $03D2
	BEQ.b CODE_819E7F
	INC.b $09
	DEC.w $03D2
	RTL

CODE_819E7F:
	JSL.l CODE_819EA2
	JSL.l CODE_819EC8
CODE_819E87:
	SEP.b #$20
	LDA.w $049D
	AND.b #$03
	BNE.b CODE_819E9F
	LDA.b $0A
	CMP.b $0B
	BEQ.b CODE_819EA1
	BCS.b CODE_819E9D
	INC.b $0A
	INC.b $09
	RTL

CODE_819E9D:
	DEC.b $0A
CODE_819E9F:
	INC.b $09
CODE_819EA1:
	RTL

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

CODE_819EA2:
	SEP.b #$30
	LDA.w $049D
	AND.b #$01
	BNE.b CODE_819EC5
	LDA.b $0C
	TAX
	AND.b #$F0
	CMP.b $0D
	BEQ.b CODE_819EC7
	BCS.b CODE_819EBF
	TXA
	CLC
	ADC.b #$10
	STA.b $0C
	INC.b $09
	RTL

CODE_819EBF:
	TXA
	SEC
	SBC.b #$10
	STA.b $0C
CODE_819EC5:
	INC.b $09
CODE_819EC7:
	RTL

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

CODE_819EC8:
	SEP.b #$30
	LDA.w $049D
	AND.b #$03
	BNE.b CODE_819EE3
	LDA.b $0E
	TAX
	AND.b #$1F
	CMP.b $0F
	BEQ.b CODE_819EE5
	BCS.b CODE_819EE1
	INC.b $0E
	INC.b $09
	RTL

CODE_819EE1:
	DEC.b $0E
CODE_819EE3:
	INC.b $09
CODE_819EE5:
	RTL

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

CODE_819EE6:
	PHP
	SEP.b #$20
CODE_819EE9:
	LDA.l !REGISTER_HVBlankFlagsAndJoypadStatus|!FastROMAddressOffset
	BPL.b CODE_819EE9
	PLP
	RTL

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

CODE_819EF1:
	LDX.w $049D
CODE_819EF4:
	CPX.w $049D
	BEQ.b CODE_819EF4
	RTL

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

CODE_819EFA:
	JSL.l CODE_819EF1
	DEY
	BNE.b CODE_819EFA
	RTL

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

CODE_819F02:
	JSL.l CODE_819EF1
	REP.b #$20
	LDA.w $0AF1
	AND.w #$C0C0
	BNE.b CODE_819F13
	DEY
	BNE.b CODE_819F02
CODE_819F13:
	RTL

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

CODE_819F14:
	LDA.w $0B31
	ADC.w $0B2F
	ROL
	ADC.w #$24A3
	STA.w $0B31
	SBC.w $0B2F
	STA.w $0B2F
	RTL

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

CODE_819F28:
	REP.b #$30
	LDA.w $0467
	BNE.b CODE_819F30
	RTL

CODE_819F30:
	LDA.w $045F
	CMP.w #!REGISTER_WriteToCGRAMPort
	BEQ.b CODE_819F87
	LDA.w $0463
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	LDA.w $0461
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0467
	CMP.w #$1400
	BCC.b CODE_819F51
	LDA.w #$1400
CODE_819F51:
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	STA.b $34
	CLC
	ADC.w $0463
	STA.w $0463
	LDA.w $0467
	SEC
	SBC.b $34
	STA.w $0467
	LDA.b $34
	LSR
	CLC
	ADC.w $0461
	STA.w $0461
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDA.w $0465
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

CODE_819F87:
	LDA.w $0467
	STA.l DMA[$02].SizeLo|!FastROMAddressOffset
	STZ.w $0467
	LDA.w $0463
	STA.l DMA[$02].SourceLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0465
	STA.l DMA[$02].SourceBank|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_CGRAMAddress|!FastROMAddressOffset
	LDA.b #$04
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

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

CODE_819FAE:
	LDX.w $7E380C,y
	LDA.w $0B51
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.l DATA_819499,x
	STA.w $0B43
	BPL.b CODE_819FC6
	EOR.w #$FFFF
	INC
CODE_819FC6:
	STA.w $0B47
	ASL
	STA.w $0B4B
	LDA.w $0B53
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.l DATA_8194B3,x
	STA.w $0B45
	BPL.b CODE_819FE2
	EOR.w #$FFFF
	INC
CODE_819FE2:
	STA.w $0B49
	ASL
	STA.w $0B4D
	LDA.w #$FFFF
	STA.w $0B4F
	LDA.w $0B47
	CMP.w #$0100
	BCS.b CODE_81A02B
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	REP.b #$20
	LDX.w $0B49
	CPX.w #$0100
	BCS.b CODE_81A02B
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	LSR
	STA.b $34
	TXA
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	REP.b #$21
	NOP #2
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	LSR
	ADC.b $34
	STA.w $0B4F
CODE_81A02B:
	LDA.w $0B49
	SEC
	SBC.w $0B4B
	BPL.b CODE_81A05C
	LDA.w $0B47
	SEC
	SBC.w $0B4D
	BPL.b CODE_81A069
	LDA.w $0B43
	BMI.b CODE_81A04F
	LDA.w $0B45
	BMI.b CODE_81A04B
	LDA.w #$0003
	RTL

CODE_81A04B:
	LDA.w #$0001
	RTL

CODE_81A04F:
	LDA.w $0B45
	BMI.b CODE_81A058
	LDA.w #$0005
	RTL

CODE_81A058:
	LDA.w #$0007
	RTL

CODE_81A05C:
	LDA.w $0B45
	BMI.b CODE_81A065
	LDA.w #$0004
	RTL

CODE_81A065:
	LDA.w #$0000
	RTL

CODE_81A069:
	LDA.w $0B43
	BMI.b CODE_81A072
	LDA.w #$0002
	RTL

CODE_81A072:
	LDA.w #$0006
	RTL

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

CODE_81A076:
	LDA.w #$FFFF
	STA.w $0B4F
	LDX.w $7E380C,y
	LDA.w $0B51
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_XPosLo,y
	SEC
	SBC.l DATA_819499,x
	STA.w $0B43
	BPL.b CODE_81A094
	EOR.w #$FFFF
	INC
CODE_81A094:
	STA.w $0B47
	CMP.w #$0100
	BCS.b CODE_81A0EB
	LDA.w $0B53
	SEC
	SBC.w !RAM_JP_Exterior_Sprites_YPosLo,y
	SEC
	SBC.l DATA_8194B3,x
	STA.w $0B45
	BPL.b CODE_81A0B1
	EOR.w #$FFFF
	INC
CODE_81A0B1:
	STA.w $0B49
	CMP.w #$0100
	BCS.b CODE_81A0EB
	SEP.b #$20
	LDA.w $0B47
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	LDX.w $0B49
	REP.b #$20
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	LSR
	STA.b $34
	SEP.b #$20
	TXA
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	REP.b #$21
	NOP #2
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	LSR
	ADC.b $34
	STA.w $0B4F
CODE_81A0EB:
	RTL

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

CODE_81A0EC:
	REP.b #$30
	LDX.w #$0012
	LDY.w #$0013
	LDA.w #$00E3
	STZ.b $12
	PHB
	MVN $00,$00
	PLB
	LDX.w #$0393
	LDY.w #$0394
	LDA.w #$1C6B
	STZ.w $0393
	PHB
	MVN $7E,$7E
	PLB
	LDX.w #$024B
	LDY.w #$024C
	LDA.w #$003E
	STZ.w !RAM_JP_Exterior_BuildingEntranceLo
	PHB
	MVN $7E,$7E
	PLB
	RTL

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

CODE_81A121:
	REP.b #$10
	SEP.b #$20
	LDX.w #$0001
	LDA.w $03A6,x
	BPL.b CODE_81A138
	REP.b #$20
	AND.w #$007F
	EOR.w #$FFFF
	INC
	BRA.b CODE_81A13D

CODE_81A138:
	REP.b #$20
	AND.w #$00FF
CODE_81A13D:
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo
	STA.w !RAM_JP_Exterior_Sprites_XPosLo
	SEP.b #$20
	LDA.w $03A4,x
	BPL.b CODE_81A156
	REP.b #$20
	AND.w #$007F
	EOR.w #$FFFF
	INC
	BRA.b CODE_81A15B

CODE_81A156:
	REP.b #$20
	AND.w #$00FF
CODE_81A15B:
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo
	STA.w !RAM_JP_Exterior_Sprites_YPosLo
	REP.b #$20
	RTL

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

DATA_81A165:
	db "START OF MOUSE BIOS"

CODE_81A178:
	PHP
	SEP.b #$30
CODE_81A17B:
	LDA.l !REGISTER_HVBlankFlagsAndJoypadStatus
	AND.b #$01
	BNE.b CODE_81A17B
	LDX.b #$01
	LDA.l !REGISTER_Joypad2Lo
	JSR.w CODE_81A1AE
	LDA.w $03B1
	BEQ.b CODE_81A199
	JSR.w CODE_81A20D
	STZ.w $03B1
	PLP
	RTL

CODE_81A199:
	DEX
	LDA.l !REGISTER_Joypad1Lo
	JSR.w CODE_81A1AE
	LDA.w $03B0
	BEQ.b CODE_81A1AC
	JSR.w CODE_81A20D
	STZ.w $03B0
CODE_81A1AC:
	PLP
	RTL

CODE_81A1AE:
	STA.w $039B
	AND.b #$0F
	CMP.b #$01
	BEQ.b CODE_81A1CA
	STZ.w $039E,x
	STZ.w $03A6,x
	STZ.w $03A4,x
	STZ.w $03A8,x
	STZ.w $03AA,x
	STZ.w $03AC,x
	RTS

CODE_81A1CA:
	LDA.w $039E,x
	BNE.b CODE_81A1D8
	LDA.b #$01
	STA.w $039E,x
	STA.w $03B0,x
	RTS

CODE_81A1D8:
	LDY.b #$10
CODE_81A1DA:
	LDA.l !REGISTER_JoypadSerialPort1,x
	LSR
	ROL.w $03A6,x
	ROL.w $03A4,x
	DEY
	BNE.b CODE_81A1DA
	STZ.w $03A8,x
	ROL.w $039B
	ROL.w $03A8,x
	ROL.w $039B
	ROL.w $03A8,x
	LDA.w $03A8,x
	EOR.w $03AC,x
	BNE.b CODE_81A203
	STZ.w $03AA,x
	RTS

CODE_81A203:
	LDA.w $03A8,x
	STA.w $03AA,x
	STA.w $03AC,x
	RTS

CODE_81A20D:
	PHP
	SEP.b #$30
	LDA.w $039D,x
	BEQ.b CODE_81A25F
	LDA.b #$10
	STA.w $039C
CODE_81A21A:
	LDA.b #$01
	STA.l !REGISTER_JoypadSerialPort1
	LDA.l !REGISTER_JoypadSerialPort1,x
	LDA.b #$00
	STA.l !REGISTER_JoypadSerialPort1
	LDA.b #$01
	STA.l !REGISTER_JoypadSerialPort1
	LDA.b #$00
	STA.l !REGISTER_JoypadSerialPort1
	STA.w $03A2,x
	LDY.b #$0A
CODE_81A23B:
	LDA.l !REGISTER_JoypadSerialPort1,x
	DEY
	BNE.b CODE_81A23B
	LDA.l !REGISTER_JoypadSerialPort1,x
	LSR
	ROL.w $03A2,x
	LDA.l !REGISTER_JoypadSerialPort1,x
	LSR
	ROL.w $03A2,x
	LDA.w $03A2,x
	CMP.w $03A0,x
	BEQ.b CODE_81A264
	DEC.w $039C
	BNE.b CODE_81A21A
CODE_81A25F:
	LDA.b #$80
	STA.w $03A2,x
CODE_81A264:
	PLP
	RTS

DATA_81A266:
	db "MODIFIED FROM SHVC MOUSE BIOS Ver1.00END OF MOUSE BIOS"

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

DATA_81A29C:
	db $00,$02,$03,$05,$06,$08,$09,$0B,$0C,$0E,$10,$11,$13,$14,$16,$17
	db $18,$1A,$1B,$1D,$1E,$20,$21,$22,$24,$25,$26,$27,$29,$2A,$2B,$2C
	db $2D,$2E,$2F,$30,$31,$32,$33,$34,$35,$36,$37,$38,$38,$39,$3A,$3B
	db $3B,$3C,$3C,$3D,$3D,$3E,$3E,$3E,$3F,$3F,$3F,$40,$40,$40,$40,$40

DATA_81A2DC:
	db $40,$40,$40,$40,$40,$40,$3F,$3F,$3F,$3E,$3E,$3E,$3D,$3D,$3C,$3C
	db $3B,$3B,$3A,$39,$38,$38,$37,$36,$35,$34,$33,$32,$31,$30,$2F,$2E
	db $2D,$2C,$2B,$2A,$29,$27,$26,$25,$24,$22,$21,$20,$1E,$1D,$1B,$1A
	db $18,$17,$16,$14,$13,$11,$10,$0E,$0C,$0B,$09,$08,$06,$05,$03,$02
	db $00,$FE,$FD,$FB,$FA,$F8,$F7,$F5,$F4,$F2,$F0,$EF,$ED,$EC,$EA,$E9
	db $E8,$E6,$E5,$E3,$E2,$E0,$DF,$DE,$DC,$DB,$DA,$D9,$D7,$D6,$D5,$D4
	db $D3,$D2,$D1,$D0,$CF,$CE,$CD,$CC,$CB,$CA,$C9,$C8,$C8,$C7,$C6,$C5
	db $C5,$C4,$C4,$C3,$C3,$C2,$C2,$C2,$C1,$C1,$C1,$C0,$C0,$C0,$C0,$C0

DATA_81A35C:
	db $C0,$C0,$C0,$C0,$C0,$C0,$C1,$C1,$C1,$C2,$C2,$C2,$C3,$C3,$C4,$C4
	db $C5,$C5,$C6,$C7,$C8,$C8,$C9,$CA,$CB,$CC,$CD,$CE,$CF,$D0,$D1,$D2
	db $D3,$D4,$D5,$D6,$D7,$D9,$DA,$DB,$DC,$DE,$DF,$E0,$E2,$E3,$E5,$E6
	db $E8,$E9,$EA,$EC,$ED,$EF,$F0,$F2,$F4,$F5,$F7,$F8,$FA,$FB,$FD,$FE
	db $00,$02,$03,$05,$06,$08,$09,$0B,$0C,$0E,$10,$11,$13,$14,$16,$17
	db $18,$1A,$1B,$1D,$1E,$20,$21,$22,$24,$25,$26,$27,$29,$2A,$2B,$2C
	db $2D,$2E,$2F,$30,$31,$32,$33,$34,$35,$36,$37,$38,$38,$39,$3A,$3B
	db $3B,$3C,$3C,$3D,$3D,$3E,$3E,$3E,$3F,$3F,$3F,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$3F,$3F,$3F,$3E,$3E,$3E,$3D,$3D,$3C,$3C
	db $3B,$3B,$3A,$39,$38,$38,$37,$36,$35,$34,$33,$32,$31,$30,$2F,$2E
	db $2D,$2C,$2B,$2A,$29,$27,$26,$25,$24,$22,$21,$20,$1E,$1D,$1B,$1A
	db $18,$17,$16,$14,$13,$11,$10,$0E,$0C,$0B,$09,$08,$06,$05,$03,$02
	db $00,$FE,$FD,$FB,$FA,$F8,$F7,$F5,$F4,$F2,$F0,$EF,$ED,$EC,$EA,$E9
	db $E8,$E6,$E5,$E3,$E2,$E0,$DF,$DE,$DC,$DB,$DA,$D9,$D7,$D6,$D5,$D4
	db $D3,$D2,$D1,$D0,$CF,$CE,$CD,$CC,$CB,$CA,$C9,$C8,$C8,$C7,$C6,$C5
	db $C5,$C4,$C4,$C3,$C3,$C2,$C2,$C2,$C1,$C1,$C1,$C0,$C0,$C0,$C0,$C0
	db $C0,$C0,$C0,$C0,$C0,$C0,$C1,$C1,$C1,$C2,$C2,$C2,$C3,$C3,$C4,$C4
	db $C5,$C5,$C6,$C7,$C8,$C8,$C9,$CA,$CB,$CC,$CD,$CE,$CF,$D0,$D1,$D2
	db $D3,$D4,$D5,$D6,$D7,$D9,$DA,$DB,$DC,$DE,$DF,$E0,$E2,$E3,$E5,$E6
	db $E8,$E9,$EA,$EC,$ED,$EF,$F0,$F2,$F4,$F5,$F7,$F8,$FA,$FB,$FD,$FE

DATA_81A49C:
	db $00,$02,$03,$05,$06,$08,$09,$0B,$0C,$0E,$10,$11,$13,$14,$16,$17
	db $18,$1A,$1B,$1D,$1E,$20,$21,$22,$24,$25,$26,$27,$29,$2A,$2B,$2C
	db $2D,$2E,$2F,$30,$31,$32,$33,$34,$35,$36,$37,$38,$38,$39,$3A,$3B
	db $3B,$3C,$3C,$3D,$3D,$3E,$3E,$3E,$3F,$3F,$3F,$40,$40,$40,$40,$40

DATA_81A4DC:
	db $40,$40,$40,$40,$40,$40,$3F,$3F,$3F,$3E,$3E,$3E,$3D,$3D,$3C,$3C
	db $3B,$3B,$3A,$39,$38,$38,$37,$36,$35,$34,$33,$32,$31,$30,$2F,$2E
	db $2D,$2C,$2B,$2A,$29,$27,$26,$25,$24,$22,$21,$20,$1E,$1D,$1B,$1A
	db $18,$17,$16,$14,$13,$11,$10,$0E,$0C,$0B,$09,$08,$06,$05,$03,$02
	db $00,$02,$03,$05,$06,$08,$09,$0B,$0C,$0E,$10,$11,$13,$14,$16,$17
	db $18,$1A,$1B,$1D,$1E,$20,$21,$22,$24,$25,$26,$27,$29,$2A,$2B,$2C
	db $2D,$2E,$2F,$30,$31,$32,$33,$34,$35,$36,$37,$38,$38,$39,$3A,$3B
	db $3B,$3C,$3C,$3D,$3D,$3E,$3E,$3E,$3F,$3F,$3F,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$3F,$3F,$3F,$3E,$3E,$3E,$3D,$3D,$3C,$3C
	db $3B,$3B,$3A,$39,$38,$38,$37,$36,$35,$34,$33,$32,$31,$30,$2F,$2E
	db $2D,$2C,$2B,$2A,$29,$27,$26,$25,$24,$22,$21,$20,$1E,$1D,$1B,$1A
	db $18,$17,$16,$14,$13,$11,$10,$0E,$0C,$0B,$09,$08,$06,$05,$03,$02
	db $00,$02,$03,$05,$06,$08,$09,$0B,$0C,$0E,$10,$11,$13,$14,$16,$17
	db $18,$1A,$1B,$1D,$1E,$20,$21,$22,$24,$25,$26,$27,$29,$2A,$2B,$2C
	db $2D,$2E,$2F,$30,$31,$32,$33,$34,$35,$36,$37,$38,$38,$39,$3A,$3B
	db $3B,$3C,$3C,$3D,$3D,$3E,$3E,$3E,$3F,$3F,$3F,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$3F,$3F,$3F,$3E,$3E,$3E,$3D,$3D,$3C,$3C
	db $3B,$3B,$3A,$39,$38,$38,$37,$36,$35,$34,$33,$32,$31,$30,$2F,$2E
	db $2D,$2C,$2B,$2A,$29,$27,$26,$25,$24,$22,$21,$20,$1E,$1D,$1B,$1A
	db $18,$17,$16,$14,$13,$11,$10,$0E,$0C,$0B,$09,$08,$06,$05,$03,$02
	db $00,$02,$03,$05,$06,$08,$09,$0B,$0C,$0E,$10,$11,$13,$14,$16,$17
	db $18,$1A,$1B,$1D,$1E,$20,$21,$22,$24,$25,$26,$27,$29,$2A,$2B,$2C
	db $2D,$2E,$2F,$30,$31,$32,$33,$34,$35,$36,$37,$38,$38,$39,$3A,$3B
	db $3B,$3C,$3C,$3D,$3D,$3E,$3E,$3E,$3F,$3F,$3F,$40,$40,$40,$40,$40
	db $40,$40,$40,$40,$40,$40,$3F,$3F,$3F,$3E,$3E,$3E,$3D,$3D,$3C,$3C
	db $3B,$3B,$3A,$39,$38,$38,$37,$36,$35,$34,$33,$32,$31,$30,$2F,$2E
	db $2D,$2C,$2B,$2A,$29,$27,$26,$25,$24,$22,$21,$20,$1E,$1D,$1B,$1A
	db $18,$17,$16,$14,$13,$11,$10,$0E,$0C,$0B,$09,$08,$06,$05,$03,$02

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

CODE_81A69C:
	SEP.b #$20
	SEI
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	STA.b $EE
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	REP.b #$10
	LDX.w #CODE_81AE0A
	STX.b $04
	LDA.b #CODE_81AE0A>>16
	STA.b $06
	LDX.w #CODE_81AD38
	STX.b $00
	LDA.b #CODE_81AD38>>16
	STA.b $02
	LDA.b #$11
	LDX.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	BEQ.b CODE_81A6D2
	LDA.b #$01
CODE_81A6D2:
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	STA.b $10
	LDA.b #$00
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_BGWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_ColorAndObjectWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	LDA.b #$00
	STA.b $0C
	LDA.b #$00
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	REP.b #$30
	LDA.w #$00C8
	STA.l !REGISTER_HCountTimerLo|!FastROMAddressOffset
	LDX.w #JP_GFX_Mode7_IsleNublar
	LDA.w #JP_GFX_Mode7_IsleNublar>>16
	JSL.l CODE_81B28C
	REP.b #$30
	LDX.w #JP_Tilemap_Mode7_IsleNublar
	LDA.w #JP_Tilemap_Mode7_IsleNublar>>16
	JSL.l CODE_81B2D1
	REP.b #$30
	LDX.w #JP_Palette_Mode7Intro
	LDA.w #JP_Palette_Mode7Intro>>16
	JSL.l CODE_81B270
	REP.b #$30
	LDX.w #JP_GFX_Sprite_Mode7IntroText
	LDA.w #JP_GFX_Sprite_Mode7IntroText>>16
	LDY.w #$6000
	JSL.l CODE_81B22C
	REP.b #$30
	LDX.w #JP_GFX_BG_Mode7IntroMountains
	LDA.w #JP_GFX_BG_Mode7IntroMountains>>16
	LDY.w #$4000
	JSL.l CODE_81B22C
	REP.b #$30
	LDX.w #JP_Tilemap_BG_Mode7IntroMountains
	LDA.w #JP_Tilemap_BG_Mode7IntroMountains>>16
	LDY.w #$5C00
	JSL.l CODE_81B22C
	SEP.b #$30
	LDA.b #$5C
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$44
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	SEP.b #$20
	REP.b #$10
	LDA.b #$43
	STA.l HDMA[$06].Parameters|!FastROMAddressOffset
	LDA.b #$43
	STA.l HDMA[$07].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_Mode7MatrixParameterA
	STA.l HDMA[$06].Destination|!FastROMAddressOffset
	LDA.b #!REGISTER_Mode7MatrixParameterC
	STA.l HDMA[$07].Destination|!FastROMAddressOffset
	LDA.b #DATA_81AE65>>16
	STA.l HDMA[$06].SourceBank|!FastROMAddressOffset
	LDA.b #DATA_81AE6C>>16
	STA.l HDMA[$07].SourceBank|!FastROMAddressOffset
	LDA.b #$7E8F46>>16
	STA.l HDMA[$06].IndirectSourceBank|!FastROMAddressOffset
	STA.l HDMA[$07].IndirectSourceBank|!FastROMAddressOffset
	REP.b #$30
	LDA.w #DATA_81AE65
	STA.b $E2
	STA.l HDMA[$06].SourceLo|!FastROMAddressOffset
	LDA.w #DATA_81AE6C
	STA.b $E4
	STA.l HDMA[$07].SourceLo|!FastROMAddressOffset
	LDX.b $F3
	LDA.l DATA_81AF59,x
	STA.b $DE
	LDA.l DATA_81AF59+$02,x
	STA.w $03DE
	LDA.l DATA_81AF59+$04,x
	STA.w $03E0
	LDA.l DATA_81AF59+$06,x
	STA.w $03E2
	LDA.l DATA_81AF59+$08,x
	STA.w $03DC
	LDA.l DATA_81AF59+$0A,x
	STA.w $03DA
	LDA.l DATA_81AF59+$0C,x
	STA.b $CA
	LDA.l DATA_81AF59+$0E,x
	STA.w $03D5
	LDA.l DATA_81AF59+$10,x
	STA.w $03D8
	LDA.l DATA_81AF59+$12,x
	STA.b $C4
	LDA.l DATA_81AF59+$14,x
	STA.b $C6
	LDA.w #$0080
	STA.b $C0
	LDA.w #$0070
	STA.b $C2
	TXA
	CLC
	ADC.w #$0016
	STA.w $0415
	STZ.w $0417
	STZ.w $041B
	STZ.w $041F
	STZ.w $0423
	STZ.w $0427
	STZ.w $042B
	STZ.w $042F
	STZ.w $044D
	JSL.l CODE_80F621
	LDX.w #$0000
CODE_81A858:
	LDA.l JP_Mode7IntroTextSpriteData,x
	CMP.w #$FFFF
	BEQ.b CODE_81A871
	STA.w JP_Global_OAMBuffer[$00].XDisp,x
	LDA.l JP_Mode7IntroTextSpriteData+$02,x
	STA.w JP_Global_OAMBuffer[$00].Tile,x
	INX
	INX
	INX
	INX
	BRA.b CODE_81A858

CODE_81A871:
	LDA.w #$0078
	STA.w $03D0
	SEP.b #$20
	LDA.b #$03
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	RTS

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

CODE_81A880:
	REP.b #$30
	STA.b $F3
	LDA.w #$00C2
	STA.w $038F
	LDA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	BEQ.b CODE_81A8A7
	REP.b #$30
	LDY.w #DATA_B5DFD3>>16
	LDX.w #DATA_B5DFD3
	JSL.l CODE_839C4A
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_HelicopterTakeoff&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
CODE_81A8A7:
	JSR.w CODE_81A69C
	SEP.b #$30
	LDA.b #$07
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$C0
	STA.l !REGISTER_Mode7TilemapSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.b $0B
	STZ.b $0A
	LDA.b #$C0
	STA.b $EE
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.b #$B1
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	CLI
	LDA.w $049D
	ORA.b #$03
	STA.w $049D
CODE_81A8DD:
	JSL.l CODE_819EF1
	JSL.l CODE_819E70
	LDA.w $038D
	BNE.b CODE_81A90D
	LDA.b $0A
	CMP.b #$0F
	BNE.b CODE_81A90D
	REP.b #$30
	INC.w $038D
	LDX.w #JP_SPCEngine
	LDY.w #JP_SPCEngine>>16
	JSL.l CODE_839C31
	REP.b #$30
	LDY.w #DATA_BE8000>>16
	LDX.w #DATA_BE8000
	JSL.l CODE_839C4A
	BRA.b CODE_81A8DD

CODE_81A90D:
	REP.b #$30
	JSR.w CODE_81AE81
	LDA.w $0391
	BNE.b CODE_81A926
	DEC.w $038F
	BNE.b CODE_81A926
	LDA.w #!Define_JP_SoundCommand_Unknown01+($01<<8)
	LDY.w #$A0FF
	JSL.l CODE_839D6A
CODE_81A926:
	LDA.w $044D
	BEQ.b CODE_81A932
	SEP.b #$20
	LDA.b $09
	BNE.b CODE_81A932
	RTL

CODE_81A932:
	JSL.l CODE_81AA5A
	JSL.l CODE_81ABE6
	REP.b #$31
	LDA.w $03D4
	ADC.w $03E8
	STA.w $03D4
	SEP.b #$20
	LDA.w $03D6
	ADC.w $03EA
	STA.w $03D6
	REP.b #$31
	LDA.w $03D7
	SEC
	SBC.w $03EB
	STA.w $03D7
	SEP.b #$20
	LDA.w $03D9
	SBC.w $03ED
	STA.w $03D9
	REP.b #$31
	LDX.b $E6
	LDA.w $03D5
	ADC.w $03E4
	STA.b $C4
	STA.w $7E8F3E,x
	LDA.w $03D8
	CLC
	ADC.w $03E6
	STA.b $C6
	SEC
	SBC.b $DE
	STA.w $7E8F40,x
	LDA.b $C4
	CLC
	ADC.b $C0
	STA.w $7E8F42,x
	LDA.b $C6
	CLC
	ADC.b $C2
	STA.w $7E8F44,x
	LDA.w $03D0
	BEQ.b CODE_81A99F
	DEC.w $03D0
	BRA.b CODE_81A9BA

CODE_81A99F:
	LDA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	BNE.b CODE_81A9BA
	LDA.w $0391
	BEQ.b CODE_81A9BA
	LDA.w $0AF1
	AND.w #$F0C0
	BEQ.b CODE_81A9BA
	INC.w $044D
	SEP.b #$20
	STZ.b $0B
	REP.b #$20
CODE_81A9BA:
	BRL.w CODE_81A8DD

CODE_81A9BD:
	RTL

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

CODE_81A9BE:
	SEP.b #$30
	LDX.b $C8
	LDA.b $CA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $CB
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.b $D0
	SEP.b #$20
	LDA.l DATA_81A35C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.b $D2
	SEP.b #$20
	LDA.b $D2
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $D3
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $D0
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.b $D1
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.w #$0000
	SEC
	SBC.b $D0
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterC|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterC|!FastROMAddressOffset
	LDA.b $D2
	STA.l !REGISTER_Mode7MatrixParameterD|!FastROMAddressOffset
	LDA.b $D3
	STA.l !REGISTER_Mode7MatrixParameterD|!FastROMAddressOffset
	LDA.b $BC
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	LDA.b $BD
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	LDA.b $BE
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
	LDA.b $BF
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
	LDA.b $C4
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.b $C5
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.b $C6
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b $C7
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	RTL

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

CODE_81AA5A:
	REP.b #$30
	LDY.w #$0000
	LDA.w #DATA_81AE65
	STA.b $E2
	LDA.w #DATA_81AE6C
	STA.b $E4
	INC.w !RAM_JP_Exterior_Player_WalkingFrameLo
	LDA.w !RAM_JP_Exterior_Player_WalkingFrameLo
	ROR
	BCC.b CODE_81AA7F
	LDY.w #$0710
	LDA.w #DATA_81AE73
	STA.b $E2
	LDA.w #DATA_81AE7A
	STA.b $E4
CODE_81AA7F:
	STY.b $E6
	SEP.b #$30
	LDX.w $03DA
	LDA.w $03DC
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.w $03DD
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.w $03E8
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.w $03E9
	SEP.b #$20
	LDA.l DATA_81A2DC,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.w $03EB
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.w $03EC
	REP.b #$20
	LDA.w $03DC
	ASL
	SEP.b #$20
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDX.w $03DA
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	ADC.w $03F0
	STA.w $03F0
	LDA.w #$0000
	SEP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductHi|!FastROMAddressOffset
	REP.b #$20
	BPL.b CODE_81AAFE
	ORA.w #$FF00
CODE_81AAFE:
	ADC.w $03F2
	STA.w $03F2
	LDA.w $03DE
	SEP.b #$30
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDX.w $03E0
	LDA.l DATA_81A29C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.w $03E4
	SEP.b #$20
	LDA.l DATA_81A2DC,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.w $03E6
	SEP.b #$30
	LDA.w $03E2
	STA.b $C8
	TAX
	LDA.b $CA
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $CB
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l DATA_81A49C,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $D0
	SEP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	LSR
	LSR
	LSR
	ORA.b $D0
	STA.b $D0
	LDA.l DATA_81A4DC,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.b $D2
	SEP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	LSR
	LSR
	LSR
	ORA.b $D2
	STA.b $D2
	SEP.b #$30
	LSR.w $03EA
	ROR.w $03E9
	ROR.w $03E8
	LSR.w $03EA
	ROR.w $03E9
	ROR.w $03E8
	LSR.w $03ED
	ROR.w $03EC
	ROR.w $03EB
	LSR.w $03ED
	ROR.w $03EC
	ROR.w $03EB
	REP.b #$10
	LDX.w #$0000
	STZ.w $03F4
	REP.b #$20
	LDA.w #$7FF8
	STA.l !REGISTER_DividendLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b $DE
	CMP.b #$92
	BCC.b CODE_81ABE5
	STA.l !REGISTER_Divisor|!FastROMAddressOffset
	NOP #4
	REP.b #$20
	LDA.w #$00E3
	SEC
	SBC.l !REGISTER_QuotientLo|!FastROMAddressOffset
	STA.w $03F4
CODE_81ABE5:
	RTL

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

CODE_81ABE6:
	REP.b #$30
	LDY.b $E6
	LDA.b $DE
	STA.b $E0
	LDA.w #$2000
	STA.b $DC
	STZ.b $DA
	STZ.b $D8
	LDY.w #$FFFF
	SEP.b #$20
	LDA.b $C8
	CMP.b #$40
	BCC.b CODE_81AC08
	CMP.b #$C0
	BCS.b CODE_81AC08
	STY.b $DA
CODE_81AC08:
	CMP.b #$80
	BCS.b CODE_81AC0E
	STY.b $D8
CODE_81AC0E:
	REP.b #$20
	LDA.b $D2
	ORA.b $D0
	CMP.w #$2000
	BCC.b CODE_81AC41
	LDA.b $D0
	CMP.b $D2
	BCC.b CODE_81AC30
	LDA.b $D0
	BMI.b CODE_81AC2C
CODE_81AC23:
	ASL.b $D2
	ASL.b $DC
	ASL.b $E0
	ASL
	BPL.b CODE_81AC23
CODE_81AC2C:
	STA.b $D0
	BRA.b CODE_81AC51

CODE_81AC30:
	LDA.b $D2
	BMI.b CODE_81AC3D
CODE_81AC34:
	ASL.b $D0
	ASL.b $DC
	ASL.b $E0
	ASL
	BPL.b CODE_81AC34
CODE_81AC3D:
	STA.b $D2
	BRA.b CODE_81AC51

CODE_81AC41:
	ASL.b $D0
	ASL.b $D2
	ASL.b $DC
	ASL.b $E0
	ASL.b $D0
	ASL.b $D2
	ASL.b $DC
	ASL.b $E0
CODE_81AC51:
	REP.b #$31
	LDA.b $E6
	ADC.w #$0390
	TAX
	LDY.w #$0039
CODE_81AC5C:
	LDA.b $D2
	STA.l !REGISTER_DividendLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b $DD
	STA.l !REGISTER_Divisor|!FastROMAddressOffset
	REP.b #$20
	TXA
	SEC
	SBC.w #$0010
	TAX
	LDA.b $DA
	EOR.l !REGISTER_QuotientLo|!FastROMAddressOffset
	STA.w $7E8F46,x
	STA.w $7E92CC,x
	LDA.b $D0
	STA.l !REGISTER_DividendLo|!FastROMAddressOffset
	SEP.b #$21
	LDA.b $DD
	STA.l !REGISTER_Divisor|!FastROMAddressOffset
	REP.b #$20
	LDA.b $DC
	SBC.b $E0
	BCC.b CODE_81ACA8
	STA.b $DC
	LDA.l !REGISTER_QuotientLo|!FastROMAddressOffset
	EOR.b $D8
	STA.w $7E8F48,x
	EOR.w #$FFFF
	STA.w $7E92CA,x
	DEY
	BNE.b CODE_81AC5C
CODE_81ACA8:
	REP.b #$31
	LDA.b $E6
	ADC.w #$0380
	TAX
	LDY.w #$0038
CODE_81ACB3:
	LDA.w $7E8F46,x
	CLC
	ADC.w $7E8F36,x
	ROR
	STA.w $7E8F3E,x
	STA.w $7E92C4,x
	CLC
	ADC.w $7E8F46,x
	ROR
	STA.w $7E8F42,x
	STA.w $7E92C8,x
	LDA.w $7E8F3E,x
	CLC
	ADC.w $7E8F36,x
	ROR
	STA.w $7E8F3A,x
	STA.w $7E92C0,x
	LDA.w $7E8F48,x
	CLC
	ADC.w $7E8F38,x
	ROR
	STA.w $7E8F40,x
	EOR.w #$FFFF
	STA.w $7E92C2,x
	LDA.w $7E8F40,x
	CLC
	ADC.w $7E8F48,x
	ROR
	STA.w $7E8F44,x
	EOR.w #$FFFF
	STA.w $7E92C6,x
	LDA.w $7E8F40,x
	CLC
	ADC.w $7E8F38,x
	ROR
	STA.w $7E8F3C,x
	EOR.w #$FFFF
	STA.w $7E92BE,x
	TXA
	SEC
	SBC.w #$0010
	TAX
	DEY
	BNE.b CODE_81ACB3
	RTL

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

CODE_81AD17:
	SEP.b #$30
	LDA.b #$00
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	STA.l !REGISTER_VRAMAddressHi|!FastROMAddressOffset
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDA.b #$00
CODE_81AD2B:
	LDX.b #$40
CODE_81AD2D:
	STA.l !REGISTER_WriteToVRAMPortHi|!FastROMAddressOffset
	DEX
	BNE.b CODE_81AD2D
	INC
	BNE.b CODE_81AD2B
	RTS

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

CODE_81AD38:
	REP.b #$30
	PHB
	PHA
	PHX
	PHY
	SEP.b #$20
	LDA.b #$7E
	PHA
	PLB
	REP.b #$20
	LDA.b $E2
	STA.l HDMA[$06].SourceLo|!FastROMAddressOffset
	LDA.b $E4
	STA.l HDMA[$07].SourceLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.b $EE
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	LDA.b $0A
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b $0C
	STA.l !REGISTER_MosaicSizeAndBGEnable|!FastROMAddressOffset
	LDA.b $0E
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	REP.b #$30
	LDX.b $E6
	STX.b $CC
	LDA.w $03F4
	BEQ.b CODE_81ADB2
	STA.l !REGISTER_VCountTimerLo|!FastROMAddressOffset
	EOR.w #$FFFF
	INC
	SEP.b #$20
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b #$03
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	REP.b #$20
	LDA.b $C8
	ASL
	ASL
	CLC
	ADC.b $C8
	ADC.b $C8
	SBC.w $03F2
	AND.w #$00FF
	SEP.b #$20
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	XBA
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	BRA.b CODE_81ADF8

CODE_81ADB2:
	SEP.b #$20
	LDA.b #$07
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	REP.b #$10
	SEP.b #$20
	LDX.b $CC
	LDA.w $7E8F3E,x
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F3F,x
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F40,x
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F41,x
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F42,x
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	LDA.w $7E8F43,x
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	LDA.w $7E8F44,x
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
	LDA.w $7E8F45,x
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
CODE_81ADF8:
	JSL.l CODE_8189A7
	JSL.l CODE_819CC0
	REP.b #$30
	INC.w $049D
	PLY
	PLX
	PLA
	PLB
	RTI

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

CODE_81AE0A:
	REP.b #$30
	PHB
	PHA
	PHX
	PHY
	SEP.b #$30
	LDA.b #$7E8F3E>>16
	PHA
	PLB
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDA.b #$07
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	REP.b #$10
	SEP.b #$20
	LDX.b $CC
	LDA.w $7E8F3E,x
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F3F,x
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F40,x
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F41,x
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.w $7E8F42,x
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	LDA.w $7E8F43,x
	STA.l !REGISTER_Mode7CenterX|!FastROMAddressOffset
	LDA.w $7E8F44,x
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
	LDA.w $7E8F45,x
	STA.l !REGISTER_Mode7CenterY|!FastROMAddressOffset
	REP.b #$30
	PLY
	PLX
	PLA
	PLB
	RTI

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

DATA_81AE65:
	db $F0 : dw $7E8F46
	db $F0 : dw $7E9106
	db $00

DATA_81AE6C:
	db $F0 : dw $7E92CA
	db $F0 : dw $7E948A
	db $00

DATA_81AE73:
	db $F0 : dw $7E9656
	db $F0 : dw $7E9816
	db $00

DATA_81AE7A:
	db $F0 : dw $7E99DA
	db $F0 : dw $7E9B9A
	db $00

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

CODE_81AE81:
	REP.b #$30
	LDA.w $0417
	BEQ.b CODE_81AE95
	DEC.w $0417
	LDA.w $03E0
	CLC
	ADC.w $0419
	STA.w $03E0
CODE_81AE95:
	LDA.w $041B
	BEQ.b CODE_81AEA7
	DEC.w $041B
	LDA.w $03E2
	CLC
	ADC.w $041D
	STA.w $03E2
CODE_81AEA7:
	LDA.w $041F
	BEQ.b CODE_81AEB9
	DEC.w $041F
	LDA.w $03DE
	CLC
	ADC.w $0421
	STA.w $03DE
CODE_81AEB9:
	LDA.w $0423
	BEQ.b CODE_81AEC9
	DEC.w $0423
	LDA.b $CA
	CLC
	ADC.w $0425
	STA.b $CA
CODE_81AEC9:
	LDA.w $0427
	BEQ.b CODE_81AED9
	DEC.w $0427
	LDA.b $DE
	CLC
	ADC.w $0429
	STA.b $DE
CODE_81AED9:
	LDA.w $042B
	BEQ.b CODE_81AEEB
	DEC.w $042B
	LDA.w $03DA
	CLC
	ADC.w $042D
	STA.w $03DA
CODE_81AEEB:
	LDA.w $042F
	BEQ.b CODE_81AEFD
	DEC.w $042F
	LDA.w $03DC
	CLC
	ADC.w $0431
	STA.w $03DC
CODE_81AEFD:
	LDA.w $0433
	BEQ.b CODE_81AF0C
	DEC.w $0433
	BNE.b CODE_81AF0B
	SEP.b #$20
	LDA.b #$01
CODE_81AF0B:
	RTS

CODE_81AF0C:
	REP.b #$30
	LDA.w $044D
	BEQ.b CODE_81AF14
	RTS

CODE_81AF14:
	LDX.w $0415
	LDA.l DATA_81AF59,x
	CMP.w #$FFFF
	BEQ.b CODE_81AF3F
	TAY
	LDA.w $0000,y
	BNE.b CODE_81AF3E
	LDA.l DATA_81AF59+$02,x
	STA.w $0000,y
	LDA.l DATA_81AF59+$04,x
	STA.w $0002,y
	TXA
	CLC
	ADC.w #$0006
	STA.w $0415
	BRA.b CODE_81AF14

CODE_81AF3E:
	RTS

CODE_81AF3F:
	STZ.w $0415
	INC.w $044D
	SEP.b #$20
	LDA.b #$00
	STA.b $0B
	INC.b $09
	LDA.w $0391
	BEQ.b CODE_81AF58
	PHP
	JSL.l CODE_839D62
	PLP
CODE_81AF58:
	RTS

DATA_81AF59:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0400,$0180
	dw $0190,$0180,$0190,$0433,$003C,$0000,$0433,$0000
	dw $0000,$0423,$0037,$FFF6,$041F,$0037,$000A,$0427
	dw $0037,$0003,$0427,$0000,$0000,$041F,$001E,$0004
	dw $0433,$001E,$0000,$0433,$0000,$0000,$041B,$0100
	dw $0001,$0417,$0100,$FFFF,$041F,$0100,$0002,$0423
	dw $0100,$0002,$0417,$0000,$0000,$041F,$0036,$FFF0
	dw $0427,$0036,$FFFE,$0427,$0000,$0000,$041F,$0038
	dw $FFF8,$0423,$0038,$FFF0,$FFFF,$00FE,$00A4,$0000
	dw $0000,$0000,$0000,$0008,$0180,$0190,$0180,$01B9
	dw $0423,$0115,$0001,$0423,$0032,$0001,$0427,$0050
	dw $FFFE,$041F,$0050,$FFFE,$0427,$0000,$0000,$041F
	dw $0028,$FFFD,$041F,$0028,$FFFC,$041F,$0028,$FFFB
	dw $041F,$0014,$FFE8,$041F,$0000,$0000,$041B,$0080
	dw $0001,$0427,$00A0,$0001,$041B,$0000,$0000,$041F
	dw $0053,$0008,$0423,$0053,$FFFE,$0423,$0032,$0003
	dw $041F,$004B,$0008,$FFFF

JP_Mode7IntroTextSpriteData:
;$81B061
	dw $B530,$3C0B,$B538,$3C08,$B540,$3C02,$B548,$3C04
	dw $B550,$3C0D,$B558,$3C12,$B560,$3C04,$B568,$3C03
	dw $B578,$3C01,$B580,$3C18,$B590,$3C0D,$B598,$3C08
	dw $B5A0,$3C0D,$B5A8,$3C13,$B5B0,$3C04,$B5B8,$3C0D
	dw $B5C0,$3C03,$B5C8,$3C0E,$BF40,$3C30,$BF48,$3C31
	dw $BF50,$3C32,$BF58,$3C33,$BF60,$3C34,$BF68,$3C35
	dw $BF70,$3C36,$BF78,$3C37,$BF80,$3C38,$BF88,$3C39
	dw $BF90,$3C3A,$BF98,$3C3B,$BFA0,$3C3C,$BFA8,$3C3D
	dw $BFB0,$3C3E,$BFB8,$3C3F,$BFC0,$3C2B,$C740,$3C40
	dw $C748,$3C41,$C750,$3C42,$C758,$3C43,$C760,$3C44
	dw $C768,$3C45,$C770,$3C46,$C778,$3C47,$C780,$3C48
	dw $C788,$3C49,$C790,$3C4A,$C798,$3C4B,$C7A0,$3C4C
	dw $C7A8,$3C4D,$C7B0,$3C4E,$C7B8,$3C4F,$D018,$3C2A
	dw $D020,$3C1B,$D028,$3C23,$D030,$3C23,$D038,$3C1D
	dw $D048,$3C0E,$D050,$3C02,$D058,$3C04,$D060,$3C00
	dw $D068,$3C0D,$D078,$3C0E,$D080,$3C05,$D090,$3C00
	dw $D098,$3C0C,$D0A0,$3C04,$D0A8,$3C11,$D0B0,$3C08
	dw $D0B8,$3C02,$D0C0,$3C00,$D0D0,$3C08,$D0D8,$3C0D
	dw $D0E0,$3C02,$D0E8,$3C24,$FFFF

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

; Note: This looks like a decompression routine.

CODE_81B18B:
	STX.b $40
	STA.b $42
	PHB
	LDA.w #$7F7F
	PHA
	PLB
	PLB
	LDA.w #$8000
	BRA.b CODE_81B1B6

CODE_81B19B:
	LDX.w #$0100
	STX.b $44
CODE_81B1A0:
	ASL
	BNE.b CODE_81B1AA
	LDA.b [$40]
	INC.b $40
	INC.b $40
	ROL
CODE_81B1AA:
	ROL.b $44
	BCC.b CODE_81B1A0
	TAX
	LDA.b $44
	STA.w $0000,y
	INY
	TXA
CODE_81B1B6:
	ASL
	BNE.b CODE_81B1C0
	LDA.b [$40]
	INC.b $40
	INC.b $40
	ROL
CODE_81B1C0:
	BCC.b CODE_81B19B
	ASL
	BNE.b CODE_81B1CC
	LDA.b [$40]
	INC.b $40
	INC.b $40
	ROL
CODE_81B1CC:
	BCS.b CODE_81B1D5
	LDX.w #$0000
	STX.b $46
	BRA.b CODE_81B208

CODE_81B1D5:
	LDX.w #$2000
	STX.b $46
CODE_81B1DA:
	ASL
	BNE.b CODE_81B1E4
	LDA.b [$40]
	INC.b $40
	INC.b $40
	ROL
CODE_81B1E4:
	ROL.b $46
	BCC.b CODE_81B1DA
	BNE.b CODE_81B208
	LDX.w #$0100
	STX.b $46
CODE_81B1EF:
	ASL
	BNE.b CODE_81B1F9
	LDA.b [$40]
	INC.b $40
	INC.b $40
	ROL
CODE_81B1F9:
	ROL.b $46
	BCC.b CODE_81B1EF
	BEQ.b CODE_81B22A
	TAX
	LDA.w #$0006
	ADC.b $46
	STA.b $46
	TXA
CODE_81B208:
	LDX.w #$0040
	STX.b $48
CODE_81B20D:
	ASL
	BNE.b CODE_81B217
	LDA.b [$40]
	INC.b $40
	INC.b $40
	ROL
CODE_81B217:
	ROL.b $48
	BCC.b CODE_81B20D
	PHA
	TYA
	SBC.b $48
	DEC
	TAX
	LDA.b $46
	INC
	MVN $7F,$7F
	PLA
	BRA.b CODE_81B1B6

CODE_81B22A:
	PLB
	RTL

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

CODE_81B22C:
	PHY
	LDY.w #$0000
	JSL.l CODE_81B18B
	TYA
	SEC
	SBC.w #$0000
	TAY
	PLX
	LDA.w #$0000
	STA.w $003C
	LDA.w #$007F
	STA.w $003E
	SEP.b #$20
	LDA.b #$80
	JML.l CODE_819D33

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

CODE_81B24F:
	PHY
	LDY.w #$0000
	JSL.l CODE_81B18B
	TYA
	SEC
	SBC.w #$0004
	TAY
	PLX
	LDA.w #$0004
	STA.b $3C
	LDA.w #$007F
	STA.b $3E
	SEP.b #$20
	LDA.b #$80
	JML.l CODE_819D33

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

CODE_81B270:
	LDY.w #$0000
	JSL.l CODE_81B18B
	LDX.w #$0000
	STX.b $3C
	LDX.w #$007F
	STX.b $3E
	SEP.b #$20
	LDX.w #$0100
	LDA.b #$00
	JML.l CODE_819D1A

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

CODE_81B28C:
	LDY.w #$0000
	JSL.l CODE_81B18B
	TYA
	SEC
	SBC.w #$0000
	TAY
	REP.b #$20
	LDA.w #$0000
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w #$4000
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	LDA.w #$7F0000
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDA.b #$00
	STA.l DMA[$01].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_WriteToVRAMPortHi
	STA.l DMA[$01].Destination|!FastROMAddressOffset
	LDA.b #$7F0000>>16
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

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

CODE_81B2D1:
	LDY.w #$0000
	JSL.l CODE_81B18B
	TYA
	SEC
	SBC.w #$0000
	TAY
	REP.b #$20
	LDA.w #$0000
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w #$7F0000
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	LDA.w #$4000
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDA.b #$00
	STA.l DMA[$01].Parameters|!FastROMAddressOffset
	LDA.b #$00
	STA.l DMA[$01].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.l DMA[$01].Destination|!FastROMAddressOffset
	LDA.b #$7F0000>>16
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

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

CODE_81B31C:
	PHY
	LDY.w #$7F0000
	JSL.l CODE_81B18B
CODE_81B324:
	LDA.w $0467
	BNE.b CODE_81B324
	TYA
	SEC
	SBC.w #$7F0000
	TAY
	PLA
	STA.w $0461
	LDA.w #$7F0000
	STA.w $0463
	LDA.w #$7F0000>>16
	STA.w $0465
	LDA.w #!REGISTER_WriteToVRAMPortLo
	STA.w $045F
	TYA
	STA.w $0467
	RTL

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

CODE_81B34A:
	PHY
	LDY.w #$7F8000
	JSL.l CODE_81B18B
CODE_81B352:
	LDA.w $0467
	BNE.b CODE_81B352
	TYA
	SEC
	SBC.w #$7F8000
	TAY
	PLA
	STA.w $0461
	LDA.w #$7F8000
	STA.w $0463
	LDA.w #$7F8000>>16
	STA.w $0465
	LDA.w #!REGISTER_WriteToVRAMPortLo
	STA.w $045F
	TYA
	STA.w $0467
	RTL

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

CODE_81B378:
	PHY
	LDY.w #$7FC000
	JSL.l CODE_81B18B
CODE_81B380:
	LDA.w $0467
	BNE.b CODE_81B380
	TYA
	SEC
	SBC.w #$7FC000
	TAY
	PLA
	STA.w $0461
	LDA.w #$7FC000
	STA.w $0463
	LDA.w #$7FC000>>16
	STA.w $0465
	LDA.w #!REGISTER_WriteToVRAMPortLo
	STA.w $045F
	TYA
	STA.w $0467
	RTL

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

CODE_81B3A6:
	LDY.w #$7FE000
	JSL.l CODE_81B18B
CODE_81B3AD:
	LDA.w $0467
	BNE.b CODE_81B3AD
	TYA
	SEC
	SBC.w #$7FE000
	TAY
	LDA.w #$7FE000
	STA.w $0463
	LDA.w #$7FE000>>16
	STA.w $0465
	LDA.w #!REGISTER_WriteToCGRAMPort
	STA.w $045F
	TYA
	STA.w $0467
	RTL

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

CODE_81B3CF:
	REP.b #$30
	LDY.w #$0000
	LDX.w #$0000
CODE_81B3D7:
	LDA.l DATA_81BA6F,x
	CMP.w #$FFFF
	BNE.b CODE_81B3E1
	RTL

CODE_81B3E1:
	JSR.w CODE_81B44C
	BRA.b CODE_81B3D7

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

CODE_81B3E6:
	REP.b #$30
	LDX.w #$0000
	LDA.w #$FFFF
CODE_81B3EE:
	STA.w $7E76AC,x
	STA.w $7E8654,x
	INX
	INX
	CPX.w #$03E6
	BNE.b CODE_81B3EE
	LDY.w #$0000
	LDX.w #$0000
CODE_81B401:
	CPY.w #$0082
	BCS.b CODE_81B42A
	LDA.l DATA_81BA6F,x
	BMI.b CODE_81B41B
	LDA.w !RAM_JP_Exterior_Sprites_IDLo,y
	CMP.w #!Define_JP_ExteriorSpriteID30_DeadPachycephalosaurus
	BCS.b CODE_81B420
	LDA.l DATA_81BA6F,x
	BRA.b CODE_81B41B

CODE_81B41A:
	RTL

CODE_81B41B:
	JSR.w CODE_81B44C
	BRA.b CODE_81B401

CODE_81B420:
	TXA
	CLC
	ADC.w #$0007
	TAX
	INY
	INY
	BRA.b CODE_81B401

CODE_81B42A:
	LDA.w $0393
	BEQ.b CODE_81B41A
	STZ.w $0393
CODE_81B432:
	LDA.l DATA_81BA6F,x
	BMI.b CODE_81B442
	TXA
	CLC
	ADC.w #$0007
	TAX
	INY
	INY
	BRA.b CODE_81B432

CODE_81B442:
	CMP.w #$FFFF
	BEQ.b CODE_81B41A
	JSR.w CODE_81B44C
	BRA.b CODE_81B432

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

CODE_81B44C:
	PHX
	AND.w #$3FFF
	TAX
	LDA.l DATA_81B5B3,x
	STA.w !RAM_JP_Exterior_Sprites_MovementDirectionLo,y
	LDA.l DATA_81B5B3+$02,x
	STA.w $7E3BF6,y
	LDA.l DATA_81B5B3+$04,x
	STA.w $7E43CA,y
	LDA.l DATA_81B5B3+$06,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,y
	LDA.l DATA_81B5B3+$08,x
	STA.w !RAM_JP_Exterior_Sprites_IDLo,y
	LDA.l DATA_81B5B3+$0A,x
	STA.w $7E380C,y
	PLX
	LDA.l DATA_81BA6F+$04,x
	STA.w $7E3FE0,y
	LDA.l DATA_81BA6F+$02,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.w #$0004
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_SubXPosLo,y
	LDA.l DATA_81BA6F+$02,x
	AND.w #$FF00
	LSR
	LSR
	LSR
	LSR
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_SubYPosLo,y
	LDA.l DATA_81BA6F+$06,x
	XBA
	AND.w #$FF00
	STA.w $7E6ED8,y
	LDA.w #$0000
	STA.w $7E47B4,y
	STA.w $7E4B9E,y
	STA.w !RAM_JP_Exterior_Sprites_ZPosLo,y
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo,y
	STA.w $7E5B46,y
	STA.w $7E5F30,y
	STA.w $7E631A,y
	STA.w $7E6704,y
	STA.w $7E6AEE,y
	STA.w !RAM_JP_Exterior_Sprites_DamageTakenLo,y
	STA.w $7E7A96,y
	STA.w $7E7E80,y
	STA.w $7E826A,y
	DEC
	STA.w $7E76AC,y
	STA.w $7E8654,y
	TXA
	CLC
	ADC.w #$0007
	TAX
	INY
	INY
	RTS

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

CODE_81B4EE:
	REP.b #$30
	LDA.w $0AFB
	SEC
	SBC.w #$0100
	BPL.b CODE_81B4FC
	LDA.w #$0000
CODE_81B4FC:
	STA.b $60
	LDA.w $0AFB
	CLC
	ADC.w #$0200
	STA.b $62
	LDA.w $0AFD
	SEC
	SBC.w #$0080
	BPL.b CODE_81B513
	LDA.w #$0000
CODE_81B513:
	STA.b $64
	LDA.w $0AFD
	CLC
	ADC.w #$0180
	STA.b $66
	LDY.w #$09EF
	CPY.w $09ED
	BNE.b CODE_81B529
	LDY.w #$0A6F
CODE_81B529:
	PHY
	LDX.w #$03CE
CODE_81B52D:
	STX.b $00,y
	INY
	INY
	INX
	INX
	CPX.w #$03E8
	BNE.b CODE_81B52D
	LDX.w #$03CC
CODE_81B53B:
	LDA.l !RAM_JP_Exterior_Sprites_XPosLo,x
	CMP.b $60
	BCC.b CODE_81B56E
	CMP.b $62
	BCS.b CODE_81B56E
	LDA.l !RAM_JP_Exterior_Sprites_YPosLo,x
	CMP.b $64
	BCC.b CODE_81B56E
	CMP.b $66
	BCS.b CODE_81B56E
	LDA.l !RAM_JP_Exterior_Sprites_IDLo,x
	BEQ.b CODE_81B56E					; Note: !Define_JP_ExteriorSpriteID00_None
	TXA
	STA.w $0000,y
	INY
	INY
	DEX
	DEX
	BPL.b CODE_81B53B
	LDA.w #$FFFF
	STA.w $0000,y
	PLA
	STA.w $09ED
	RTL

CODE_81B56E:
	LDA.w #$FFFF
	STA.w $7E8654,x
	STA.w $7E76AC,x
	DEX
	DEX
	BPL.b CODE_81B53B
	LDA.w #$FFFF
	STA.w $0000,y
	PLA
	STA.w $09ED
	RTL

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

CODE_81B586:
	REP.b #$30
	LDX.w #$2090
	LDY.w #$2091
	LDA.w #$69AC
	STZ.w !RAM_JP_Exterior_Sprites_XPosLo
	PHB
	MVN $7E,$7E
	PLB
	LDX.w #$0000
CODE_81B59C:
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Sprites_XPosLo,x
	STA.w !RAM_JP_Exterior_Sprites_YPosLo,x
	STA.w $7E76AC,x
	STA.w !RAM_JP_Exterior_Sprites_AnimationFrameLo,x
	INX
	INX
	CPX.w #$03E8
	BNE.b CODE_81B59C
	RTL

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

DATA_81B5B3:						; Note: Seems to be the data for all the sprites in the exterior areas.
	dw $0000,$0020,!Define_JP_WeaponID_Shotgun,$0C04,!Define_JP_ExteriorSpriteID0C_PrimaryWeaponPickup,$0004
	dw $0000,$0010,!Define_JP_WeaponID_GasGrenadeLauncher,$0C1C,!Define_JP_ExteriorSpriteID0E_SecondaryWeaponPickup,$0004
	dw $0000,$0010,!Define_JP_WeaponID_TranquilizerGun,$0C14,!Define_JP_ExteriorSpriteID0C_PrimaryWeaponPickup,$0004
	dw $0000,$0008,!Define_JP_WeaponID_BolasSnareRifle,$0C24,!Define_JP_ExteriorSpriteID0E_SecondaryWeaponPickup,$0004
	dw $0000,$0008,!Define_JP_WeaponID_RocketLauncher,$0C0C,!Define_JP_ExteriorSpriteID0C_PrimaryWeaponPickup,$0004
	dw $0000,$0000,$0000,$085F,!Define_JP_ExteriorSpriteID0A_Egg,$0002
	dw $0000,$0000,$0000,$FFFF,!Define_JP_ExteriorSpriteID10_IDCardFirstAidOrLife,$0002
	dw $0000,$0000,$0000,$FFFF,!Define_JP_ExteriorSpriteID10_IDCardFirstAidOrLife,$0002
	dw $0000,$0000,!RAM_JP_Global_Player_CollectedIDCardTable,$FFFF,!Define_JP_ExteriorSpriteID10_IDCardFirstAidOrLife,$0002
	dw $0000,$0000,$FFFC,$FFFF,!Define_JP_ExteriorSpriteID5A_MainGateFlames,$0000
	dw $0000,$0000,$0004,$FFFF,!Define_JP_ExteriorSpriteID5A_MainGateFlames,$0000
	dw $0002,$0000,$1FA4,$FFFF,!Define_JP_ExteriorSpriteID16_TyrannosaurusRex,$0014
	dw $0002,$0001,$0000,$0A00,!Define_JP_ExteriorSpriteID2C_ElectricGate,$0018
	dw $0006,$FFFF,$0000,$0A00,!Define_JP_ExteriorSpriteID2C_ElectricGate,$0018
	dw $0000,$0404,!RAM_JP_Exterior_Gate1OpenFlagLo,$0404,!Define_JP_ExteriorSpriteID2A_GateRotatingMechanism,$0008
	dw $0000,$0404,!RAM_JP_Exterior_Gate2OpenFlagLo,$0404,!Define_JP_ExteriorSpriteID2A_GateRotatingMechanism,$0008
	dw $0000,$0404,!RAM_JP_Exterior_Gate3OpenFlagLo,$0404,!Define_JP_ExteriorSpriteID2A_GateRotatingMechanism,$0008
	dw $0000,$FFFF,$0000,$0A02,!Define_JP_ExteriorSpriteID28_VerticalBridge,$0016
	dw $0000,$0001,$0000,$0A02,!Define_JP_ExteriorSpriteID28_VerticalBridge,$0016
	dw $0000,$FFFF,$0000,$0A01,!Define_JP_ExteriorSpriteID26_HorizontalBridge,$0010
	dw $0000,$0001,$0000,$0A01,!Define_JP_ExteriorSpriteID26_HorizontalBridge,$0010
	dw $0000,$0404,$0000,$0404,!Define_JP_ExteriorSpriteID24_BridgeRotatingMechanism,$0008
	dw $0000,$0000,$0000,$0406,!Define_JP_ExteriorSpriteID04_Compsognathus,$0000
	dw $0001,$0000,$0000,$062E,!Define_JP_ExteriorSpriteID1A_Pachycephalosaurus,$0008
	dw $0006,$00C7,$0009,$4601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0002,$00C7,$0009,$0601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0006,$00A2,$000B,$4601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0002,$00A2,$000B,$0601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0006,$0089,$000D,$4601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0002,$0089,$000D,$0601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0006,$0077,$000F,$4601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0002,$0077,$000F,$0601,!Define_JP_ExteriorSpriteID06_Gallimimus,$0006
	dw $0006,$00C7,$0009,$4600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0002,$00C7,$0009,$0600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0006,$00A2,$000B,$4600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0002,$00A2,$000B,$0600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0006,$0089,$000D,$4600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0002,$0089,$000D,$0600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0006,$0077,$000F,$4600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0002,$0077,$000F,$0600,!Define_JP_ExteriorSpriteID08_BigGallimimus,$000C
	dw $0004,$0000,$0000,$060D,!Define_JP_ExteriorSpriteID20_BigBoulder,$0006
	dw $0000,$0000,$0000,$FFFF,!Define_JP_ExteriorSpriteID00_None,$0000
	dw $0000,$0000,$0000,$020C,!Define_JP_ExteriorSpriteID1C_Dilophosaur,$000C
	dw $0004,$0000,$0000,$0000,!Define_JP_ExteriorSpriteID18_Triceratops,$0012
	dw $0000,$0000,$0000,$0046,!Define_JP_ExteriorSpriteID1E_Dragonfly,$0008
	dw $0000,$0000,$0000,$FFFF,!Define_JP_ExteriorSpriteID2E_EndGameTrigger,$0000
	dw $0000,$0002,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$002C,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0056,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0080,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$00AA,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$00C8,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$00EC,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$011A,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0148,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0188,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$01AA,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$01D2,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$01FA,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0222,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0246,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0276,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$029A,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$02C4,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$02EC,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0314,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0338,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0368,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$038C,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$03B6,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$03D4,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$03FC,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$041E,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0446,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$046C,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0492,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$04B6,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$04DA,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$050E,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$053C,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0588,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$05B6,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$05D8,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0626,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0652,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$067E,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$06A4,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$06CC,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$06F0,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0714,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0744,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0768,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0790,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$07AE,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0804,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0864,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$0882,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$08AC,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$08CE,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0002,$08F6,$0000,$FFFF,!Define_JP_ExteriorSpriteID12_Velociraptor,$000E
	dw $0000,$0000,$0000,$0000,!Define_JP_ExteriorSpriteID02_Unknown,$000E

DATA_81BA6F:
	dw $821C,$EAAC,$0000 : db $08
	dw $0228,$1025,$0000 : db $08
	dw $0234,$0E33,$0002 : db $08
	dw $8240,$3317,$0008 : db $08
	dw $824C,$312A,$0000 : db $08
	dw $0258,$4426,$000C : db $08
	dw $0264,$4231,$0000 : db $08
	dw $0270,$373B,$0000 : db $08
	dw $027C,$3745,$0000 : db $08
	dw $0288,$1E55,$0000 : db $08
	dw $0294,$2780,$0000 : db $08
	dw $02A0,$268E,$0000 : db $08
	dw $82AC,$19E0,$0000 : db $08
	dw $82B8,$11ED,$0000 : db $08
	dw $02C4,$32D4,$001E : db $08
	dw $02D0,$33E1,$0000 : db $08
	dw $82DC,$44E6,$0022 : db $08
	dw $82E8,$41F1,$0000 : db $08
	dw $02F4,$5ADD,$0000 : db $08
	dw $0300,$56EF,$0000 : db $08
	dw $030C,$60ED,$002A : db $08
	dw $0318,$67F8,$0000 : db $08
	dw $0324,$6F1E,$002E : db $08
	dw $0330,$7229,$0000 : db $08
	dw $833C,$8C28,$0032 : db $08
	dw $8348,$9431,$0000 : db $08
	dw $8354,$B13D,$0000 : db $08
	dw $8360,$BB35,$0000 : db $08
	dw $036C,$A24D,$003A : db $08
	dw $0378,$A959,$0038 : db $08
	dw $8384,$B646,$003E : db $08
	dw $8390,$B758,$0000 : db $08
	dw $039C,$C704,$0000 : db $08
	dw $03A8,$C511,$0000 : db $08
	dw $03B4,$DE30,$0000 : db $08
	dw $03C0,$EC57,$0000 : db $08
	dw $03CC,$F754,$0000 : db $08
	dw $83D8,$5D6C,$0000 : db $08
	dw $03E4,$6A9E,$0050 : db $08
	dw $03F0,$6AAE,$004C : db $08
	dw $03FC,$71AD,$004E : db $08
	dw $0408,$7B9B,$0000 : db $08
	dw $0414,$B273,$0058 : db $08
	dw $0420,$BA7A,$0058 : db $08
	dw $042C,$BB87,$0000 : db $08
	dw $8438,$A597,$0000 : db $08
	dw $0444,$AB8E,$0000 : db $08
	dw $8450,$B697,$005A : db $08
	dw $045C,$A7B2,$0000 : db $50
	dw $8468,$B7BC,$0000 : db $08
	dw $0474,$D9AD,$0066 : db $08
	dw $0480,$D6B5,$0000 : db $08
	dw $8498,$E1C6,$0000 : db $08
	dw $04A4,$F6C2,$0000 : db $08
	dw $8084,$22C2,$0100 : db $08
	dw $8084,$EF00,$0100 : db $08
	dw $8204,$0808,$0000 : db $08
	dw $8204,$D5D5,$0018 : db $08
	dw $8204,$8A68,$0030 : db $08
	dw $006C,$927D,$FFF8 : db $40
	dw $006C,$947D,$0000 : db $40
	dw $006C,$967D,$0000 : db $38
	dw $0078,$9284,$FFF8 : db $40
	dw $0078,$9484,$0000 : db $40
	dw $0078,$9684,$0000 : db $38
	dw $00A8,$2E4C,$0180 : db $08
	dw $009C,$2B45,$0082 : db $08
	dw $00B4,$4FC7,$0180 : db $08
	dw $0090,$4CCA,$0086 : db $08
	dw $00C0,$868B,$0180 : db $08
	dw $009C,$8384,$008A : db $08
	dw $00FC,$B0E8,$0170 : db $08
	dw $00F0,$B4DC,$008E : db $08
	dw $00FC,$4E18,$0130 : db $08
	dw $00D8,$4B1D,$0092 : db $08
	dw $00FC,$6896,$0158 : db $08
	dw $00CC,$6891,$0096 : db $08
	dw $01F8,$1255,$0000 : db $40
	dw $81F8,$0E86,$0028 : db $40
	dw $01F8,$12AB,$003E : db $40
	dw $01F8,$5276,$005A : db $40
	dw $01F8,$6255,$007E : db $40
	dw $01F8,$D02D,$00A0 : db $40
	dw $01F8,$CE45,$00C4 : db $50
	dw $81F8,$CC5C,$00FE : db $40
	dw $01F8,$D585,$012E : db $40
	dw $01F8,$C6A0,$0152 : db $08
	dw $81F8,$C1D1,$016A : db $08
	dw $01F8,$D6ED,$0196 : db $08
	dw $01F8,$A6D2,$01AA : db $40
	dw $81F8,$96B8,$01D0 : db $60
	dw $01F8,$85C1,$0202 : db $40
	dw $01F8,$7DD2,$021E : db $60
	dw $81F8,$70E6,$023E : db $50
	dw $01F8,$0918,$0260 : db $08
	dw $01F8,$1D1B,$0284 : db $08
	dw $01F8,$483A,$029C : db $08
	dw $01F8,$0C61,$02BE : db $08
	dw $01F8,$71F6,$0312 : db $08
	dw $01F8,$F1AD,$0322 : db $08
	dw $81F8,$CD95,$0358 : db $08
	dw $01F8,$DC1A,$038A : db $08
	dw $01F8,$D709,$039E : db $08
	dw $01F8,$C718,$03C6 : db $08
	dw $81F8,$B818,$03E2 : db $08
	dw $01F8,$A930,$0410 : db $08
	dw $01F8,$94A1,$0434 : db $08
	dw $01F8,$8AA0,$0440 : db $08
	dw $81F8,$1A37,$0468 : db $08
	dw $0114,$370D,$0000 : db $08
	dw $8114,$3C12,$0000 : db $08
	dw $0114,$3A53,$0000 : db $08
	dw $0114,$7909,$0000 : db $08
	dw $8114,$7414,$0000 : db $08
	dw $0114,$8949,$0000 : db $08
	dw $8114,$964A,$0000 : db $08
	dw $0114,$9561,$0000 : db $08
	dw $0114,$EC31,$0000 : db $08
	dw $0114,$F23B,$0000 : db $08
	dw $0114,$3A87,$0000 : db $08
	dw $8114,$3387,$0000 : db $08
	dw $0114,$0DE9,$0000 : db $08
	dw $8114,$12E4,$0000 : db $08
	dw $0114,$49C0,$0000 : db $08
	dw $8114,$49DD,$0000 : db $08
	dw $8114,$ADEE,$0000 : db $40
	dw $0114,$5A86,$0000 : db $08
	dw $01E0,$1278,$0000 : db $50
	dw $01EC,$0000,$0000 : db $00
	dw $01EC,$0000,$0000 : db $00
	dw $81E0,$1381,$0000 : db $50
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $81E0,$1193,$0000 : db $50
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $01E0,$1298,$0000 : db $50
	dw $01EC,$0000,$0000 : db $00
	dw $01EC,$0000,$0000 : db $00
	dw $81E0,$119D,$0000 : db $50
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $01E0,$12A5,$0000 : db $50
	dw $01EC,$0000,$0000 : db $00
	dw $01EC,$0000,$0000 : db $00
	dw $81E0,$A9A9,$0000 : db $60
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $01E0,$B0A6,$0000 : db $50
	dw $01EC,$0000,$0000 : db $00
	dw $01EC,$0000,$0000 : db $00
	dw $81E0,$B0B4,$0000 : db $50
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $81E0,$A2B5,$0000 : db $60
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $01E0,$A2C0,$0000 : db $60
	dw $01EC,$0000,$0000 : db $00
	dw $01EC,$0000,$0000 : db $00
	dw $81E0,$A2C4,$0000 : db $60
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $81E0,$D14C,$0000 : db $60
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $81E0,$D353,$0000 : db $60
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $81E0,$D74E,$0000 : db $50
	dw $81EC,$0000,$0000 : db $00
	dw $81EC,$0000,$0000 : db $00
	dw $8210,$9808,$0000 : db $08
	dw $0210,$50AC,$0000 : db $08
	dw $0210,$5CB7,$0000 : db $08
	dw $0210,$3FB8,$0000 : db $08
	dw $0210,$3EEC,$0000 : db $08
	dw $8210,$55E9,$0000 : db $08
	dw $0210,$EEF3,$0000 : db $08
	dw $0210,$3E21,$0000 : db $08
	dw $0210,$9A21,$0000 : db $08
	dw $0210,$8031,$0000 : db $08
	dw $0210,$6985,$0000 : db $08
	dw $0210,$376D,$0000 : db $08
	dw $0210,$F3F6,$0000 : db $08
	dw $0210,$18F6,$0000 : db $08
	dw $003C,$0B08,$0000 : db $08
	dw $003C,$0B43,$0000 : db $08
	dw $003C,$1292,$0000 : db $50
	dw $003C,$0BDB,$0000 : db $08
	dw $003C,$3753,$0000 : db $08
	dw $003C,$657D,$0000 : db $40
	dw $003C,$8768,$0000 : db $08
	dw $003C,$9622,$0000 : db $08
	dw $003C,$CC0B,$0000 : db $08
	dw $003C,$D24A,$0000 : db $60
	dw $003C,$F55E,$0000 : db $08
	dw $003C,$CBA2,$0000 : db $08
	dw $003C,$9BA2,$0000 : db $08
	dw $003C,$77D4,$0000 : db $60
	dw $003C,$73FA,$0000 : db $08
	dw $003C,$67F6,$0000 : db $08
	dw $003C,$AEEC,$0000 : db $40
	dw $003C,$D8EC,$0000 : db $08
	dw $0030,$3021,$0826 : db $08
	dw $0030,$1279,$0826 : db $50
	dw $0030,$35F7,$0826 : db $08
	dw $0030,$A654,$0826 : db $08
	dw $0030,$AE93,$0826 : db $08
	dw $0030,$AEF9,$0826 : db $40
	dw $800C,$2F60,$0A29 : db $08
	dw $000C,$427C,$0A29 : db $40
	dw $000C,$AC10,$0A29 : db $08
	dw $000C,$B66A,$0A29 : db $08
	dw $000C,$7592,$0A29 : db $08
	dw $000C,$8DDD,$0A29 : db $40
	dw $0024,$31E3,$0A28 : db $08
	dw $0024,$657A,$0A28 : db $40
	dw $0024,$7531,$0A28 : db $08
	dw $8024,$D480,$0A28 : db $40
	dw $0024,$6BBF,$0A28 : db $08
	dw $8024,$8ECE,$0A28 : db $60
	dw $0018,$150A,$0827 : db $08
	dw $0018,$6C23,$0827 : db $08
	dw $0018,$E10D,$0827 : db $08
	dw $0018,$9E61,$0827 : db $08
	dw $0018,$F09A,$0827 : db $08
	dw $0018,$DECC,$0827 : db $08
	dw $0000,$5920,$0825 : db $08
	dw $0000,$7A0E,$0825 : db $08
	dw $8000,$999E,$0825 : db $08
	dw $0000,$C9C1,$0825 : db $08
	dw $0000,$D9A7,$0825 : db $08
	dw $0000,$4A49,$0825 : db $08
	dw $0000,$50AF,$0825 : db $08
	dw $0000,$25E4,$0825 : db $08
	dw $0000,$9F3C,$0825 : db $08
	dw $0000,$F129,$0825 : db $08
	dw $0000,$D659,$0825 : db $50
	dw $8030,$1854,$0826 : db $40
	dw $0030,$2F71,$0826 : db $08
	dw $0030,$2DA5,$0826 : db $40
	dw $0030,$6156,$0826 : db $40
	dw $8030,$D033,$0826 : db $40
	dw $0030,$B9A8,$0826 : db $40
	dw $0018,$1268,$0827 : db $08
	dw $0018,$0788,$0827 : db $08
	dw $8018,$45C1,$0827 : db $08
	dw $0018,$80DD,$0827 : db $40
	dw $0018,$9CE2,$0827 : db $08
	dw $0018,$7727,$0827 : db $08
	dw $000C,$4E04,$0A29 : db $08
	dw $000C,$0AB3,$0A29 : db $08
	dw $000C,$28B3,$0A29 : db $08
	dw $000C,$6568,$0A29 : db $08
	dw $000C,$70DE,$0A29 : db $50
	dw $000C,$CA41,$0A29 : db $08
	dw $8024,$2510,$0A28 : db $08
	dw $0024,$0949,$0A28 : db $08
	dw $0024,$4F4E,$0A28 : db $08
	dw $0024,$8656,$0A28 : db $08
	dw $0024,$9472,$0A28 : db $08
	dw $0024,$F766,$0A28 : db $08
	dw $0060,$4252,$082B : db $40
	dw $8054,$076E,$082C : db $08
	dw $8054,$BFA1,$082C : db $08
	dw $8054,$C119,$082C : db $08
	dw $0054,$2E0C,$082C : db $08
	dw $0054,$B37A,$082C : db $08
	dw $0048,$5193,$082A : db $08
	dw $0048,$72FD,$082A : db $08
	dw $0048,$F5F7,$082A : db $08
	dw $0048,$B40B,$082A : db $08
	dw $0108,$4252,$0000 : db $40
	dw $8108,$4758,$0000 : db $40
	dw $0108,$4266,$0000 : db $40
	dw $0108,$437D,$0000 : db $40
	dw $8108,$4777,$0000 : db $40
	dw $0108,$4D71,$0000 : db $40
	dw $0108,$4C5E,$0000 : db $40
	dw $0108,$5452,$0000 : db $40
	dw $8108,$5758,$0000 : db $40
	dw $0108,$5564,$0000 : db $40
	dw $0108,$566B,$0000 : db $40
	dw $8108,$557C,$0000 : db $40
	dw $0108,$5D78,$0000 : db $40
	dw $8108,$5B70,$0000 : db $40
	dw $0108,$6572,$0000 : db $40
	dw $0108,$637D,$0000 : db $40
	dw $0108,$5F56,$0000 : db $40
	dw $0108,$6553,$0000 : db $40
	dw $0108,$5B5C,$0000 : db $40
	dw $8108,$5A5F,$0000 : db $40
	dw $0108,$0C48,$0000 : db $40
	dw $8108,$0F47,$0000 : db $40
	dw $8108,$0D4F,$0000 : db $40
	dw $0108,$1257,$0000 : db $40
	dw $0108,$1956,$0000 : db $40
	dw $0108,$1B4E,$0000 : db $40
	dw $0108,$2FA0,$0000 : db $40
	dw $8108,$38A0,$0000 : db $40
	dw $8108,$2EAF,$0000 : db $40
	dw $0108,$3CAF,$0000 : db $40
	dw $0108,$CF2A,$0000 : db $40
	dw $0108,$D329,$0000 : db $40
	dw $8108,$CF2F,$0000 : db $40
	dw $8108,$D138,$0000 : db $40
	dw $0108,$D534,$0000 : db $40
	dw $0108,$DA2F,$0000 : db $40
	dw $0108,$CF77,$0000 : db $40
	dw $8108,$CE80,$0000 : db $40
	dw $0108,$D286,$0000 : db $40
	dw $8108,$DB7D,$0000 : db $40
	dw $0108,$DA83,$0000 : db $40
	dw $0108,$D887,$0000 : db $40
	dw $0108,$81B4,$0000 : db $40
	dw $8108,$82BC,$0000 : db $40
	dw $8108,$87BE,$0000 : db $40
	dw $0108,$89C6,$0000 : db $40
	dw $0108,$71C3,$0000 : db $40
	dw $0108,$72D0,$0000 : db $40
	dw $0108,$70EB,$0000 : db $40
	dw $0108,$7CDD,$0000 : db $40
	dw $8108,$74D8,$0000 : db $50
	dw $0108,$7FD7,$0000 : db $50
	dw $0108,$83DC,$0000 : db $50
	dw $0108,$77C8,$0000 : db $50
	dw $0108,$7ACD,$0000 : db $60
	dw $0108,$78D3,$0000 : db $60
	dw $8108,$85D2,$0000 : db $60
	dw $0108,$0F5C,$0000 : db $08
	dw $0108,$115F,$0000 : db $08
	dw $0108,$135E,$0000 : db $08
	dw $0108,$1764,$0000 : db $08
	dw $0108,$1661,$0000 : db $08
	dw $0108,$155E,$0000 : db $08
	dw $0108,$DE0B,$0000 : db $08
	dw $0108,$E00D,$0000 : db $08
	dw $0108,$E10B,$0000 : db $08
	dw $0108,$E20E,$0000 : db $08
	dw $0108,$DF0E,$0000 : db $08
	dw $0108,$DD0D,$0000 : db $08
	dw $0108,$9974,$0000 : db $08
	dw $0108,$9877,$0000 : db $08
	dw $0108,$A880,$0000 : db $08
	dw $0108,$9E73,$0000 : db $08
	dw $0108,$AB85,$0000 : db $08
	dw $0108,$A88A,$0000 : db $08
	dw $0108,$B47E,$0000 : db $08
	dw $8108,$9F87,$0000 : db $08
	dw $0108,$B77B,$0000 : db $08
	dw $8108,$9A91,$0000 : db $08
	dw $8108,$999B,$0000 : db $08
	dw $0108,$F987,$0000 : db $08
	dw $0108,$F88A,$0000 : db $08
	dw $0108,$F68A,$0000 : db $08
	dw $0108,$F787,$0000 : db $08
	dw $0108,$F8C8,$0000 : db $08
	dw $0108,$F9CF,$0000 : db $08
	dw $0108,$F7D4,$0000 : db $08
	dw $0108,$EBCF,$0000 : db $08
	dw $0108,$E9D0,$0000 : db $08
	dw $0108,$EACD,$0000 : db $08
	dw $0108,$EBCB,$0000 : db $08
	dw $0108,$E9C9,$0000 : db $08
	dw $0108,$EBC8,$0000 : db $08
	dw $0108,$7CB6,$0000 : db $08
	dw $8108,$79BC,$0000 : db $08
	dw $0108,$78B7,$0000 : db $08
	dw $0108,$8BA4,$0000 : db $08
	dw $0108,$6DBD,$0000 : db $08
	dw $0108,$6CB7,$0000 : db $08
	dw $0108,$6FB5,$0000 : db $08
	dw $0108,$6AC5,$0000 : db $08
	dw $0108,$6BCF,$0000 : db $08
	dw $8108,$87AB,$0000 : db $08
	dw $0108,$6CD5,$0000 : db $08
	dw $0108,$81AC,$0000 : db $08
	dw $0108,$68E7,$0000 : db $08
	dw $0108,$6EEF,$0000 : db $08
	dw $0108,$81E2,$0000 : db $08
	dw $0108,$83E3,$0000 : db $08
	dw $0108,$85E1,$0000 : db $08
	dw $0108,$54F4,$0000 : db $08
	dw $8108,$52F7,$0000 : db $08
	dw $0108,$4EF3,$0000 : db $08
	dw $0108,$4BF6,$0000 : db $08
	dw $0108,$4BEF,$0000 : db $08
	dw $8108,$48ED,$0000 : db $08
	dw $0120,$5443,$0001 : db $08
	dw $0138,$5540,$0001 : db $08
	dw $0150,$5644,$0001 : db $08
	dw $0168,$5547,$0001 : db $08
	dw $0120,$5749,$0001 : db $08
	dw $0138,$5845,$0001 : db $08
	dw $0150,$5740,$0001 : db $08
	dw $0168,$5A3E,$0001 : db $08
	dw $0120,$5941,$0001 : db $08
	dw $0138,$5B43,$0001 : db $08
	dw $0168,$5C47,$0001 : db $08
	dw $0138,$563D,$0001 : db $08
	dw $01B0,$5A4A,$0001 : db $08
	dw $0198,$5945,$0001 : db $08
	dw $0120,$EB9A,$0002 : db $08
	dw $0138,$EA96,$0002 : db $08
	dw $0150,$EC94,$0002 : db $08
	dw $0168,$ED98,$0002 : db $08
	dw $0120,$EE95,$0002 : db $08
	dw $0138,$ED91,$0002 : db $08
	dw $01B0,$EE8F,$0002 : db $08
	dw $01C8,$EF94,$0002 : db $08
	dw $0120,$F091,$0002 : db $08
	dw $0138,$EF95,$0002 : db $08
	dw $0138,$F097,$0002 : db $08
	dw $0120,$F193,$0002 : db $08
	dw $0150,$F296,$0002 : db $08
	dw $0138,$F19A,$0002 : db $08
	dw $012C,$6F58,$0003 : db $08
	dw $0144,$705B,$0003 : db $08
	dw $015C,$6F5E,$0003 : db $08
	dw $0174,$715C,$0003 : db $08
	dw $012C,$7259,$0003 : db $08
	dw $0144,$7155,$0003 : db $08
	dw $012C,$7353,$0003 : db $08
	dw $0144,$7456,$0003 : db $08
	dw $015C,$7359,$0003 : db $08
	dw $0144,$745C,$0003 : db $08
	dw $012C,$7654,$0003 : db $08
	dw $0144,$7757,$0003 : db $08
	dw $0174,$765A,$0003 : db $08
	dw $0144,$775D,$0003 : db $08
	dw $FFFF

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

CODE_81C63A:
	REP.b #$30
	LDX.w $06C5
	BNE.b CODE_81C645
	JSR.w CODE_81D3B9
	RTL

CODE_81C645:
	LDA.w $0B1D
	BEQ.b CODE_81C650
	LDA.w $0E41
	BNE.b CODE_81C650
	RTL

CODE_81C650:
	LDA.w $06C7
	BEQ.b CODE_81C659
	DEC.w $06C7
CODE_81C658:
	RTL

CODE_81C659:
	LDA.b $28
	BNE.b CODE_81C658
CODE_81C65D:
	LDA.l DATA_81C70C-$02,x
	CMP.w #$FF00
	BCC.b CODE_81C6CB
	CMP.w #$FFFF
	BEQ.b CODE_81C6C7
	CMP.w #$FFFE
	BEQ.b CODE_81C69B
	TAY
	AND.w #$00FF
	STA.w $06CD
	CPY.w #$FF00
	BNE.b CODE_81C686
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_CloseMessageBox&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
CODE_81C686:
	LDA.l DATA_81C70C,x
	BMI.b CODE_81C6A8
	LDY.w #$03E6
	DEC.w $0397
	JSL.l CODE_839BA7
	INC.w $0397
	BRA.b CODE_81C6A2

CODE_81C69B:
	LDA.l DATA_81C70C,x
	STA.w $06D1
CODE_81C6A2:
	INX
	INX
	INX
	INX
	BRA.b CODE_81C65D

CODE_81C6A8:
	CMP.w #$FFFE
	BNE.b CODE_81C6A2
	LDA.w $03FB
	CMP.w #$0052
	BNE.b CODE_81C6BB
	LDA.w #$FFFF
	STA.w $03FF
CODE_81C6BB:
	LDA.w #!Define_JP_SoundCommand_EndRepeatingSound
	LDY.w #$0000
	JSL.l CODE_839D6A
	BRA.b CODE_81C6A2

CODE_81C6C7:
	STZ.w $06C5
	RTL

CODE_81C6CB:
	STA.b $2A
	LDA.l DATA_81C70C,x
	STA.b $2C
	LDA.l DATA_81C70C+$02,x
	STA.b $2E
	CMP.w #$5800
	BNE.b CODE_81C6E8
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_OpenMessageBox&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
CODE_81C6E8:
	LDA.l DATA_81C70C+$04,x
	STA.b $30
	LDA.l DATA_81C70C+$06,x
	STA.w $06C7
	LDA.l DATA_81C70C+$08,x
	BEQ.b CODE_81C6FD
	STA.b $0C
CODE_81C6FD:
	LDA.b $30
	STA.b $28
	TXA
	CLC
	ADC.w #$000C
	STA.w $06C5
	RTL

	%FREE_BYTES($81C70A, 2, $00)

DATA_81C70C:
	dw $FF00
	dw $FFFE
	dd $7E8A3E : 	dw $4880,$0400,$0000,$0004
	dw $FFFF
	dd $7F0000 : 	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1B9
	dw $FF02 :	dw !Define_JP_SoundID_MrDNAChatter&$007F
	dd $7F1000 :	dw $4880,$0400,$02D0,$00F4
	dw $FF00
	dw $FFFE
	dd $000000 : 	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1B9
	dw $FF02 :	dw !Define_JP_SoundID_MrDNAChatter&$007F
	dd $7F1000 :	dw $4880,$0400,$02D0,$00F4
	dw $FF00
	dw $FFFE
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1B9
	dw $FF02 :	dw !Define_JP_SoundID_MrDNAChatter&$007F
	dd $7F1000 :	dw $4880,$0400,$02D0,$00F4
	dw $FF00
	dw $FFFE
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF87 :	dw $FFFF
	dd $7F1000 :	dw $4880,$0400,$00F0,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF41 :	dw !Define_JP_SoundID_DennisNedryVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$00F0,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF48 :	dw !Define_JP_SoundID_DennisNedryVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$00F0,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF80 :	dw !Define_JP_SoundID_IanMalcolmVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$0168,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF87 :	dw !Define_JP_SoundID_IanMalcolmVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$0168,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF8E :	dw !Define_JP_SoundID_IanMalcolmVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$0168,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF95 :	dw !Define_JP_SoundID_DennisNedryVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$00F0,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF9C :	dw !Define_JP_SoundID_DennisNedryVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$00F0,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FFA3 :	dw !Define_JP_SoundID_DennisNedryVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$012C,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF5D :	dw !Define_JP_SoundID_EllieSattlerVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$0168,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF64 :	dw !Define_JP_SoundID_EllieSattlerVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$0168,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF4F :	dw !Define_JP_SoundID_AlexMurphyVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$0168,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF56 :	dw !Define_JP_SoundID_AlexMurphyVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$0168,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FFAA :	dw $FFFF
	dd $7F1000 :	dw $4880,$0400,$00F0,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF6B :	dw !Define_JP_SoundID_JohHammondVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$012C,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF72 :	dw !Define_JP_SoundID_JohHammondVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$012C,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF
	dd $7F0000 :	dw $5800,$0400,$0000,$0000
	dd $7F0400 :	dw $5A00,$0400,$0000,$0000
	dd $7F0800 :	dw $5C00,$0400,$0000,$0000
	dd $7F0C00 :	dw $5E00,$0400,$0000,$0000
	dw $FFFE
	dw DATA_81D1D9
	dw $FF79 :	dw !Define_JP_SoundID_JohHammondVoiceClip&$007F
	dd $7F1000 :	dw $4880,$0400,$012C,$0004
	dw $FF00
	dw $FFFF
	dd $000000 :	dw $0000,$0000,$001C,$F004
	dd $7E8A3E :	dw $4880,$0400,$0000,$F0F4
	dw $FFFF

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

; Note: Something related to the message boxes.

CODE_81CEC6:
	REP.b #$30
	LDX.w $06CD
	BEQ.b CODE_81CF07
	LDA.b $BA
	BEQ.b CODE_81CEE9
	LDA.l DATA_81CF0A-$02,x
	STA.w JP_Global_OAMBuffer[$00].XDisp
	LDA.w #$3C6C
	STA.w JP_Global_OAMBuffer[$00].Tile
	LDA.w #JP_Global_OAMBuffer[$01].XDisp
	STA.b $58
	LDA.w #$0002
	STA.w JP_Global_UpperOAMBuffer[$00].Slot
CODE_81CEE9:
	SEP.b #$20
	LDA.w $049D
	LSR
	LSR
	LSR
	AND.l DATA_81CF0A,x
	REP.b #$20
	CLC
	ADC.l DATA_81CF0A+$01,x
	ASL
	ASL
	STA.b $B8
	LDA.l DATA_81CF0A+$03,x
	STA.w $06CF
CODE_81CF07:
	RTL

	%FREE_BYTES($81CF08, 2, $00)

DATA_81CF0A:
	db $C5,$28 : db $07 : dw $0053,DATA_81D099
	db $60,$70 : db $00 : dw $005B,DATA_81D099
	db $60,$70 : db $00 : dw $005C,DATA_81D099
	db $60,$70 : db $00 : dw $005D,DATA_81D099
	db $60,$70 : db $00 : dw $005E,DATA_81D099
	db $60,$70 : db $00 : dw $005F,DATA_81D099
	db $60,$70 : db $00 : dw $0060,DATA_81D099
	db $60,$70 : db $00 : dw $0061,DATA_81D099
	db $60,$70 : db $00 : dw $0062,DATA_81D099
	db $36,$37 : db $00 : dw $000C,DATA_81CFB9
	db $36,$3F : db $00 : dw $000C,DATA_81CFB9
	db $2E,$3F : db $00 : dw $000D,DATA_81CFD9
	db $36,$3F : db $00 : dw $000D,DATA_81CFD9
	db $36,$3F : db $00 : dw $000E,DATA_81CFF9
	db $36,$37 : db $00 : dw $000E,DATA_81CFF9
	db $36,$3F : db $00 : dw $000F,DATA_81D019
	db $2E,$3F : db $00 : dw $000F,DATA_81D019
	db $26,$3F : db $00 : dw $000F,DATA_81D019
	db $36,$3F : db $00 : dw $0010,DATA_81D039
	db $36,$37 : db $00 : dw $0010,DATA_81D039
	db $2E,$3F : db $00 : dw $0010,DATA_81D039
	db $36,$3F : db $00 : dw $0011,DATA_81D059
	db $36,$37 : db $00 : dw $0011,DATA_81D059
	db $2E,$3F : db $00 : dw $0011,DATA_81D059
	db $36,$3F : db $00 : dw $0012,DATA_81D079

DATA_81CFB9:
	incbin "Palettes/DennisNedryPortrait.bin"

DATA_81CFD9:
	incbin "Palettes/AlexMurphyPortrait.bin"

DATA_81CFF9:
	incbin "Palettes/EllieSattlerPortrait.bin"

DATA_81D019:
	incbin "Palettes/JohnHammondPortrait.bin"

DATA_81D039:
	incbin "Palettes/IanMalcolmPortrait.bin"

DATA_81D059:
	incbin "Palettes/RobertMuldoonPortrait.bin"

DATA_81D079:
	incbin "Palettes/TimMurphyPortrait.bin"

DATA_81D099:
	incbin "Palettes/MrDNA.bin"

UNK_81D0B9:
	incbin "Palettes/DATA_81D0B9.bin"

DATA_81D1B9:
	incbin "Palettes/MrDNAMessageBox.bin"

DATA_81D1D9:
	incbin "Palettes/RegularMessageBox.bin"

UNK_81D1F9:
	incbin "Palettes/DATA_81D1F9.bin"

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

CODE_81D3B9:
	LDA.w #$0000
	SEP.b #$20
	LDA.w $7E2C4B
	ASL
	ASL
	ASL
	ASL
	ORA.w $7E2477
	TAX
	LDA.l DATA_81D478,x
	BEQ.b CODE_81D3FE
	CMP.w $040D
	BEQ.b CODE_81D3FD
	STA.w $040D
	REP.b #$20
	TAX
	LDA.l DATA_81D400-$01,x
	STA.w $06C5
	LDA.l DATA_81D400+$01,x
	TAX
	LDA.w #JP_Tilemap_RegularMessageBoxes_Main>>16
	LDY.w #$1000
	JSL.l CODE_81B18B
	LDA.w #JP_GFX_Layer3_RegularMessageBoxTiles>>16
	LDX.w #JP_GFX_Layer3_RegularMessageBoxTiles
	LDY.w #$0000
	JSL.l CODE_81B18B
CODE_81D3FD:
	RTS

CODE_81D3FE:
	RTS

	%FREE_BYTES($81D3FF, 1, $00)

DATA_81D400:
	dw $019C,JP_Tilemap_RegularMessageBoxes_DATA_82BE10
	dw $019C,JP_Tilemap_RegularMessageBoxes_DATA_82C040
	dw $01FE,JP_Tilemap_RegularMessageBoxes_DATA_82C27E
	dw $019C,JP_Tilemap_RegularMessageBoxes_DATA_82C4CA
	dw $01FE,JP_Tilemap_RegularMessageBoxes_DATA_82C6C2
	dw $0260,JP_Tilemap_RegularMessageBoxes_DATA_82C904
	dw $0324,JP_Tilemap_RegularMessageBoxes_DATA_82CB3E
	dw $02C2,JP_Tilemap_RegularMessageBoxes_DATA_82CD5E
	dw $02C2,JP_Tilemap_RegularMessageBoxes_DATA_82CF92
	dw $0386,JP_Tilemap_RegularMessageBoxes_DATA_82D1B6
	dw $0386,JP_Tilemap_RegularMessageBoxes_DATA_82D1B6
	dw $03E8,JP_Tilemap_RegularMessageBoxes_DATA_82D400
	dw $03E8,JP_Tilemap_RegularMessageBoxes_DATA_82D602
	dw $0386,JP_Tilemap_RegularMessageBoxes_DATA_82D802
	dw $0386,JP_Tilemap_RegularMessageBoxes_DATA_82DA5A
	dw $044A,JP_Tilemap_RegularMessageBoxes_DATA_82DC9A
	dw $04AC,JP_Tilemap_RegularMessageBoxes_DATA_82DEDA
	dw $04AC,JP_Tilemap_RegularMessageBoxes_DATA_82E104
	dw $050E,JP_Tilemap_RegularMessageBoxes_DATA_82E344
	dw $04AC,JP_Tilemap_RegularMessageBoxes_DATA_82E568
	dw $0570,JP_Tilemap_RegularMessageBoxes_DATA_82E7A4
	dw $05D2,JP_Tilemap_RegularMessageBoxes_DATA_82E9CA
	dw $0634,JP_Tilemap_RegularMessageBoxes_DATA_82EC0C
	dw $0634,JP_Tilemap_RegularMessageBoxes_DATA_82EE46
	dw $0634,JP_Tilemap_RegularMessageBoxes_DATA_82F06E
	dw $075A,JP_Tilemap_RegularMessageBoxes_DATA_82F296
	dw $0696,JP_Tilemap_RegularMessageBoxes_DATA_82F4C2
	dw $06F8,JP_Tilemap_RegularMessageBoxes_DATA_82F702
	dw $06F8,JP_Tilemap_RegularMessageBoxes_DATA_82F936
	dw $06F8,JP_Tilemap_RegularMessageBoxes_DATA_82FB5E

DATA_81D478:
	db $00,$61,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $61,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$41
	db $00,$00,$00,$00,$00,$00,$00,$00,$45,$00,$00,$00,$41,$41,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$59,$00,$00
	db $00,$00,$00,$45,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$61,$00,$00,$00,$00,$59,$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,$59,$00,$00,$61,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$61,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$61,$00,$00

DATA_81D578:
	dw $0000,$5868,$3F4C,$5878,$3F4E,$5888,$3F6C,$FFFF
	dw $5860,$3F6E,$5870,$3F8C,$5880,$3F8E,$5890,$3FAC
	dw $58A0,$3FAE,$FFFF

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

CODE_81D59E:
	SEP.b #$20
	LDA.b #$0F
	STA.b $08
	SEI
	JSL.l CODE_819EE6
	REP.b #$30
	LDA.w #$01FE
	TCS
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	JSR.w CODE_81DAEB
	REP.b #$30
	STZ.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit
	STZ.w !RAM_JP_Global_Player_CurrentScoreTensDigit
	STZ.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit
	STZ.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	STZ.w !RAM_JP_TitleScreen_WaitBeforeAutoFadeOutLo
	STZ.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	STZ.w $040F
	REP.b #$30
	PHB
	LDX.w #JP_GFX_BG_TitleScreen_Part1
	LDY.w #$7F4000
	LDA.w #JP_GFX_BG_TitleScreen_Part1_End-JP_GFX_BG_TitleScreen_Part1-$01
	MVN $7F4000>>16,JP_GFX_BG_TitleScreen_Part1>>16
	LDX.w #JP_GFX_BG_TitleScreen_Part2
	LDY.w #(JP_GFX_BG_TitleScreen_Part1_End-JP_GFX_BG_TitleScreen_Part1)+$7F4000
	LDA.w #JP_GFX_BG_TitleScreen_Part2_End-JP_GFX_BG_TitleScreen_Part2-$01
	MVN $7FC000>>16,JP_GFX_BG_TitleScreen_Part2>>16
	PLB
	LDX.w #$7F4000
	LDA.w #$7F4000>>16
	LDY.w #$7F0000
	JSL.l CODE_81B18B
	TYA
	SEC
	SBC.w #$7F0000
	TAY
	STZ.w $0461
	LDA.w #$7F0000
	STA.w $0463
	LDA.w #$7F0000>>16
	STA.w $0465
	LDA.w #!REGISTER_WriteToVRAMPortLo
	STA.w $045F
	SEP.b #$20
	INC.b $09
CODE_81D625:
	LDA.b $09
	BNE.b CODE_81D625
	REP.b #$20
	TYA
	STA.w $0467
	REP.b #$30
CODE_81D631:
	LDA.w $0467
	BNE.b CODE_81D631
	REP.b #$30
	LDX.w #JP_Tilemap_BG_TitleScreen
	LDA.w #JP_Tilemap_BG_TitleScreen>>16
	LDY.w #$7C00
	JSL.l CODE_81B378
	REP.b #$30
	LDX.w #JP_GFX_Sprite_TitleScreen_ClosedMenu
	LDA.w #JP_GFX_Sprite_TitleScreen_ClosedMenu>>16
	LDY.w #$7000
	JSL.l CODE_81B34A
	REP.b #$30
	LDX.w #JP_GFX_Sprite_TitleScreen_OpenedMenu
	LDA.w #JP_GFX_Sprite_TitleScreen_OpenedMenu>>16
	LDY.w #$0000
	JSL.l CODE_81B18B
	REP.b #$30
	LDX.w #JP_Palette_TitleScreen
	LDA.w #JP_Palette_TitleScreen>>16
	JSL.l CODE_81B3A6
	STZ.w !RAM_JP_Exterior_Sprites_SpeedLo
	STZ.w $7E5B46
	LDA.w #$0080
	STA.w !RAM_JP_Exterior_Sprites_XPosLo
	LDA.w #$00D0
	STA.w !RAM_JP_Exterior_Sprites_YPosLo
	LDA.w #$FFFF
	STA.w $046F
	REP.b #$30
	LDY.w #DATA_BF8000>>16
	LDX.w #DATA_BF8000
	JSL.l CODE_839C8D
	SEP.b #$20
	LDA.b #$00
	STA.b $EE
	STA.l !REGISTER_HDMAEnable|!FastROMAddressOffset
	REP.b #$30
	STZ.w !RAM_JP_TitleScreen_SelectedStartOrHighScoreMenuOption
	STZ.w $0AFB
	LDA.w #DATA_81DD09
	STA.l HDMA[$06].SourceLo|!FastROMAddressOffset
	LDA.w #DATA_81DD1C
	STA.l HDMA[$07].SourceLo|!FastROMAddressOffset
	SEP.b #$30
	LDA.b #$43
	STA.l HDMA[$06].Parameters|!FastROMAddressOffset
	STA.l HDMA[$07].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_CGRAMAddress
	STA.l HDMA[$06].Destination|!FastROMAddressOffset
	STA.l HDMA[$07].Destination|!FastROMAddressOffset
	LDA.b #DATA_81DD09>>16
	STA.l HDMA[$06].SourceBank|!FastROMAddressOffset
	STA.l HDMA[$07].SourceBank|!FastROMAddressOffset
	LDA.b #$7E0475>>16
	STA.l HDMA[$06].IndirectSourceBank|!FastROMAddressOffset
	STA.l HDMA[$07].IndirectSourceBank|!FastROMAddressOffset
	LDA.b #$C0
	STA.b $EE
	JSL.l CODE_819EF1
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	LDA.b #$7C
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$03
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	STA.b $10
	LDA.b #$10
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$41
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	STA.b $0E
	LDA.b #$A2
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b $0C
	AND.b #$F0
	ORA.b #$01
	STA.b $0C
	LDA.b #$0F
	STA.b $0B
	LDA.b #$00
	STA.b $0D
	LDA.b #$00
	STA.b $0F
CODE_81D74F:
	SEP.b #$20
	JSL.l CODE_819EF1
	JSL.l CODE_81A178
	JSL.l CODE_81A121
	REP.b #$30
	STZ.w $0E4E
	STZ.w !RAM_JP_Exterior_Player_UseDemoMovementsFlagLo
	STZ.w $0385
	JSL.l CODE_81869E
	JSR.w CODE_81D81D
	JSR.w CODE_81D9D1
	JSR.w CODE_81DB09
	REP.b #$30
	LDA.w !RAM_JP_TitleScreen_SelectedStartOrHighScoreMenuOption
	BEQ.b CODE_81D74F
	CMP.w #$0001
	BEQ.b CODE_81D7A3
	SEP.b #$20
	LDA.b #$F0
	STA.b $0D
	LDA.b #$08
	STA.b $0B
	LDA.b #$01
	STA.b $10
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown14+($02<<8)
	LDY.w #$0000
	JSL.l CODE_839D6A
	JML.l CODE_81DD2F

CODE_81D7A3:
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	STA.b $0B
	LDA.b #$3F
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	JSL.l CODE_81A0EC
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown14+($02<<8)
	LDY.w #$0000
	JSL.l CODE_839D6A
	REP.b #$30
	STZ.w $0B1D
	LDA.w #!Define_JP_Player_StartingXPos
	STA.w !RAM_JP_Exterior_Player_CheckpointXPosLo
	LDA.w #!Define_JP_Player_StartingYPos
	STA.w !RAM_JP_Exterior_Player_CheckpointYPosLo
	LDA.w #!Define_JP_Player_StartingZPos
	STA.w !RAM_JP_Exterior_Player_CheckpointZPosLo
	STZ.w $0E39
	STZ.w !RAM_JP_Exterior_CurrentPoleMessageLo
	LDA.w #$001F
	STA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	STZ.w !RAM_JP_Global_Player_DamageTakenLo
	LDA.w #$0012
	STA.w !RAM_JP_Global_Player_RemainingEggsToCollectLo
	LDA.w #$0004
	STA.w !RAM_JP_Global_Player_CurrentLifeCountLo
	STZ.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	STZ.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	JSL.l CODE_81B586
	JSL.l CODE_81B3CF
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_Gate3OpenFlagLo
	LDA.w #$0000
	STA.w !RAM_JP_Exterior_Gate2OpenFlagLo
	STA.w !RAM_JP_Exterior_Gate2OpenFlagLo		; Glitch: This should be !RAM_JP_Exterior_Gate1OpenFlagLo!
	SEP.b #$30
	LDA.b #$02
	STA.w $0E43
	JML.l CODE_818105

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

CODE_81D81D:
	REP.b #$30
	LDA.w #$F2F2
	STA.w $0475
	STA.w $0479
	STA.w $047D
	STA.w $0481
	STA.w $0485
	LDA.w #$F3F3
	STA.w $0489
	STA.w $048D
	STA.w $0491
	STA.w $0495
	STA.w $0499
	LDA.w #$01DA
	STA.w $0477
	STA.w $047B
	STA.w $047F
	STA.w $0483
	STA.w $0487
	LDA.w #$1EBF
	STA.w $048B
	STA.w $048F
	STA.w $0493
	STA.w $0497
	STA.w $049B
	STZ.w $044B
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo
	STA.b !RAM_JP_TitleScreen_CursorXPosLo
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo
	STA.b !RAM_JP_TitleScreen_CursorYPosLo
	LDA.w $0AF1
	CMP.w #$1000
	BNE.b CODE_81D87F
	BRL.w CODE_81D90A

CODE_81D87F:
	LDA.w !RAM_JP_TitleScreen_MenuSizeChangeTimerLo
	EOR.w $046F
	BEQ.b CODE_81D8B8
	CMP.w #$FFFF
	BNE.b CODE_81D8B7
	LDA.w $0AF1
	AND.w #$E0C0
	BEQ.b CODE_81D8B7
CODE_81D894:
	LDA.w #$0020
	STA.w !RAM_JP_TitleScreen_MenuSizeChangeTimerLo
	LDA.w $046F
	EOR.w #$FFFF
	STA.w $046F
	SEP.b #$20
	LDA.b #$01
	STA.b $10
	REP.b #$20
	LDA.w #$7F8000
	JSR.w CODE_81DC15
	LDA.w #$001E
	STA.w $0471
CODE_81D8B7:
	RTS

CODE_81D8B8:
	LDX.w #$0114
	LDY.w #$05F9
	LDA.b !RAM_JP_TitleScreen_CursorXPosLo
	CMP.w #$0060
	BCC.b CODE_81D8ED
	CMP.w #$00A0
	BCS.b CODE_81D8ED
	LDA.b !RAM_JP_TitleScreen_CursorYPosLo
	CMP.w #$0018
	BCC.b CODE_81D8ED
	CMP.w #$0028
	BCC.b CODE_81D8F6
	CMP.w #$0038
	BCC.b CODE_81D91D
	CMP.w #$0048
	BCC.b CODE_81D8ED
	CMP.w #$0058
	BCC.b CODE_81D944
	CMP.w #$0068
	BCS.b CODE_81D8ED
	BRL.w CODE_81D96E

CODE_81D8ED:
	LDA.w $0AF1
	AND.w #$E0C0
	BNE.b CODE_81D894
	RTS

CODE_81D8F6:
	LDA.w #$0001
	STA.w $044B
	STX.w $047B
	STY.w $048F
	LDA.w $0AF1
	AND.w #$E0C0
	BEQ.b CODE_81D8B7
CODE_81D90A:
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_OpenMessageBox&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
	LDA.w #$0001
	STA.w !RAM_JP_TitleScreen_SelectedStartOrHighScoreMenuOption
	RTS

CODE_81D91D:
	LDA.w #$0002
	STA.w $044B
	STX.w $047F
	STY.w $0493
	LDA.w $0AF1
	AND.w #$E0C0
	BEQ.b CODE_81D8B7
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_OpenMessageBox&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
	LDA.w #$0002
	STA.w !RAM_JP_TitleScreen_SelectedStartOrHighScoreMenuOption
	RTS

CODE_81D944:
	LDA.w #$0003
	STA.w $044B
	STX.w $0483
	STY.w $0497
	LDA.w $0AF1
	AND.w #$E0C0
	BEQ.b CODE_81D96D
	LDA.w !RAM_JP_Global_MusicSetting
	EOR.w #$00FF
	STA.w !RAM_JP_Global_MusicSetting
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_OpenMessageBox&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
CODE_81D96D:
	RTS

CODE_81D96E:
	LDA.w #$0004
	STA.w $044B
	STX.w $0487
	STY.w $049B
	LDA.w $0AF1
	AND.w #$E0C0
	BEQ.b CODE_81D96D
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_OpenMessageBox&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
	LDA.w $02F1
	BEQ.b CODE_81D9A9
	CMP.w #$0002
	BEQ.b CODE_81D9BD
	STZ.w $02F1
	LDA.w #!Define_JP_SoundCommand_Unknown07+($00<<8)
	STA.w $037B
	LDY.w #$0000
	JSL.l CODE_839D6A
	RTS

CODE_81D9A9:
	LDA.w #$0002
	STA.w $02F1
	LDA.w #!Define_JP_SoundCommand_Unknown07+($01<<8)
	STA.w $037B
	LDY.w #$0101
	JSL.l CODE_839D6A
	RTS

CODE_81D9BD:
	LDA.w #$0010
	STA.w $02F1
	LDA.w #!Define_JP_SoundCommand_Unknown07+($02<<8)
	STA.w $037B
	LDY.w #$0202
	JSL.l CODE_839D6A
	RTS

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

; Note: Routine that handles the title screen cursor.

CODE_81D9D1:
	REP.b #$30
	LDA.w $0AEF
	TAY
	AND.w #$0300
	BNE.b CODE_81D9FC
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo
	BEQ.b CODE_81DA2B
	BPL.b CODE_81D9F1
	CLC
	ADC.w #$0060
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo
	BMI.b CODE_81DA2B
CODE_81D9EC:
	STZ.w !RAM_JP_Exterior_Sprites_SpeedLo
	BRA.b CODE_81DA2B

CODE_81D9F1:
	SEC
	SBC.w #$0060
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo
	BMI.b CODE_81D9EC
	BRA.b CODE_81DA2B

CODE_81D9FC:
	AND.w #$0200
	BEQ.b CODE_81DA14
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo
	BPL.b CODE_81DA0D
	CMP.w #$FC00
	BEQ.b CODE_81DA14
	BCC.b CODE_81DA14
CODE_81DA0D:
	SEC
	SBC.w #$0040
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo
CODE_81DA14:
	TYA
	AND.w #$0100
	BEQ.b CODE_81DA2B
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo
	BMI.b CODE_81DA24
	CMP.w #$0400
	BCS.b CODE_81DA2B
CODE_81DA24:
	CLC
	ADC.w #$0040
	STA.w !RAM_JP_Exterior_Sprites_SpeedLo
CODE_81DA2B:
	TYA
	AND.w #$0C00
	BNE.b CODE_81DA51
	LDA.w $7E5B46
	BEQ.b CODE_81DA7E
	BPL.b CODE_81DA46
	CLC
	ADC.w #$0060
	STA.w $7E5B46
	BMI.b CODE_81DA7E
CODE_81DA41:
	STZ.w $7E5B46
	BRA.b CODE_81DA7E

CODE_81DA46:
	SEC
	SBC.w #$0060
	STA.w $7E5B46
	BMI.b CODE_81DA41
	BRA.b CODE_81DA7E

CODE_81DA51:
	AND.w #$0800
	BEQ.b CODE_81DA67
	LDA.w $7E5B46
	BPL.b CODE_81DA60
	CMP.w #$FC00
	BCC.b CODE_81DA67
CODE_81DA60:
	SEC
	SBC.w #$0040
	STA.w $7E5B46
CODE_81DA67:
	TYA
	AND.w #$0400
	BEQ.b CODE_81DA7E
	LDA.w $7E5B46
	BMI.b CODE_81DA77
	CMP.w #$0400
	BCS.b CODE_81DA7E
CODE_81DA77:
	CLC
	ADC.w #$0040
	STA.w $7E5B46
CODE_81DA7E:
	LDA.w !RAM_JP_Exterior_Sprites_SpeedLo
	XBA
	TAY
	AND.w #$FF00
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubXPosLo
	STA.w !RAM_JP_Exterior_Sprites_SubXPosLo
	TYA
	AND.w #$00FF
	LDY.w !RAM_JP_Exterior_Sprites_SpeedLo
	BPL.b CODE_81DA99
	ORA.w #$FF00
CODE_81DA99:
	ADC.w !RAM_JP_Exterior_Sprites_XPosLo
	STA.w !RAM_JP_Exterior_Sprites_XPosLo
	BMI.b CODE_81DAAE
	CMP.w #$00F1
	BCC.b CODE_81DAB4
	LDA.w #$00F0
	STA.w !RAM_JP_Exterior_Sprites_XPosLo
	BRA.b CODE_81DAB1

CODE_81DAAE:
	STZ.w !RAM_JP_Exterior_Sprites_XPosLo
CODE_81DAB1:
	STZ.w !RAM_JP_Exterior_Sprites_SpeedLo
CODE_81DAB4:
	LDA.w $7E5B46
	XBA
	TAY
	AND.w #$FF00
	CLC
	ADC.w !RAM_JP_Exterior_Sprites_SubYPosLo
	STA.w !RAM_JP_Exterior_Sprites_SubYPosLo
	TYA
	AND.w #$00FF
	LDY.w $7E5B46
	BPL.b CODE_81DACF
	ORA.w #$FF00
CODE_81DACF:
	ADC.w !RAM_JP_Exterior_Sprites_YPosLo
	STA.w !RAM_JP_Exterior_Sprites_YPosLo
	BMI.b CODE_81DAE4
	CMP.w #$00D1
	BCC.b CODE_81DAEA
	LDA.w #$00D0
	STA.w !RAM_JP_Exterior_Sprites_YPosLo
	BRA.b CODE_81DAE7

CODE_81DAE4:
	STZ.w !RAM_JP_Exterior_Sprites_YPosLo
CODE_81DAE7:
	STZ.w $7E5B46
CODE_81DAEA:
	RTS

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

CODE_81DAEB:
	REP.b #$30
	LDX.w #$0000
CODE_81DAF0:
	LDA.w #$7800
	STA.w $7E8E3E,x
	LDA.w #$C000
	STA.w $7E8E40,x
	INX
	INX
	INX
	INX
	CPX.w #$0090
	BNE.b CODE_81DAF0
	STZ.w !RAM_JP_TitleScreen_MenuSizeChangeTimerLo
	RTS

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

CODE_81DB09:
	JSL.l CODE_80F621
	SEP.b #$20
	LDA.w !RAM_JP_TitleScreen_MenuSizeChangeTimerLo
	BNE.b CODE_81DB28
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo
	STA.w JP_Global_OAMBuffer[$00].XDisp
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo
	STA.w JP_Global_OAMBuffer[$00].YDisp
	REP.b #$20
	LDA.w #$3F0E
	STA.w JP_Global_OAMBuffer[$00].Tile
CODE_81DB28:
	REP.b #$30
	LDY.w #$0004
	STZ.w $046D
	LDA.w !RAM_JP_TitleScreen_MenuSizeChangeTimerLo
	BEQ.b CODE_81DB3E
	DEC.w !RAM_JP_TitleScreen_MenuSizeChangeTimerLo
	DEC.w $046D
	BRL.w CODE_81DBBA

CODE_81DB3E:
	LDA.w $046F
	BPL.b CODE_81DB60
	SEP.b #$20
	LDA.b #$11
	STA.b $10
	LDA.b #$78
	STA.w JP_Global_OAMBuffer[$00].XDisp,y
	LDA.b #$C0
	STA.w JP_Global_OAMBuffer[$00].YDisp,y
	LDA.b #$0C
	STA.w JP_Global_OAMBuffer[$00].Tile,y
	LDA.b #$3F
	STA.w JP_Global_OAMBuffer[$00].Prop,y
	BRL.w CODE_81DAEB

CODE_81DB60:
	SEP.b #$20
	LDA.b #$11
	STA.b $10
	REP.b #$20
	LDA.w $0471
	BEQ.b CODE_81DB78
	DEC.w $0471
	BNE.b CODE_81DBBA
	LDA.w #$7F0000
	JSR.w CODE_81DC15
CODE_81DB78:
	LDA.w !RAM_JP_Global_MusicSetting
	BEQ.b CODE_81DB9B
	LDA.w #$4888
	STA.w JP_Global_OAMBuffer[$00].XDisp,y
	LDA.w #$3F2C
	STA.w JP_Global_OAMBuffer[$00].Tile,y
	LDA.w #$4898
	STA.w JP_Global_OAMBuffer[$01].XDisp,y
	LDA.w #$3F2E
	STA.w JP_Global_OAMBuffer[$01].Tile,y
	TYA
	CLC
	ADC.w #$0008
	TAY
CODE_81DB9B:
	LDX.w $02F1
	BEQ.b CODE_81DBBA
CODE_81DBA0:
	LDA.l DATA_81D578,x
	BMI.b CODE_81DBBA
	STA.w JP_Global_OAMBuffer[$00].XDisp,y
	LDA.l DATA_81D578+$02,x
	STA.w JP_Global_OAMBuffer[$00].Tile,y
	INX
	INX
	INX
	INX
	INY
	INY
	INY
	INY
	BRA.b CODE_81DBA0

CODE_81DBBA:
	TYA
	CLC
	ADC.w #!RAM_JP_Global_OAMBuffer
	STA.b $3C
	LDY.w #$0000
	LDX.w #$0000
CODE_81DBC7:
	LDA.w $046F
	ASL
	EOR.l DATA_81DC31,x
	ADC.w #$0000
	AND.w $046D
	CLC
	ADC.w $7E8E3E,y
	STA.w $7E8E3E,y
	SEP.b #$20
	XBA
	STA.b ($3C),y
	REP.b #$20
	LDA.w $046F
	ASL
	EOR.l DATA_81DC31+$02,x
	ADC.w #$0000
	AND.w $046D
	CLC
	ADC.w $7E8E40,y
	STA.w $7E8E40,y
	SEP.b #$20
	XBA
	INY
	STA.b ($3C),y
	REP.b #$20
	LDA.l DATA_81DC31+$04,x
	INY
	STA.b ($3C),y
	INY
	INY
	TXA
	CLC
	ADC.w #$0006
	TAX
	CMP.w #$00D8
	BNE.b CODE_81DBC7
	RTS

CODE_81DC15:
	STA.w $0463
	LDA.w #$7F0000>>16
	STA.w $0465
	LDA.w #$7000
	STA.w $0461
	LDA.w #!REGISTER_WriteToVRAMPortLo
	STA.w $045F
	LDA.w #$1800
	STA.w $0467
	RTS

DATA_81DC31:
	dw $FEC0,$FB80,$3F40,$0140,$FB80,$3F4A,$FF40,$FB80
	dw $3F42,$00C0,$FB80,$3F48,$FFC0,$FB80,$3F44,$0040
	dw $FB80,$3F46,$FEC0,$FB00,$3F20,$0140,$FB00,$3F2A
	dw $FF40,$FB00,$3F22,$00C0,$FB00,$3F28,$FFC0,$FB00
	dw $3F24,$0040,$FB00,$3F26,$FEC0,$FC80,$3F80,$0140
	dw $FC80,$3F8A,$FF40,$FC80,$3F82,$00C0,$FC80,$3F88
	dw $FFC0,$FC80,$3F84,$0040,$FC80,$3F86,$FEC0,$FC00
	dw $3F60,$0140,$FC00,$3F6A,$FF40,$FC00,$3F62,$00C0
	dw $FC00,$3F68,$FFC0,$FC00,$3F64,$0040,$FC00,$3F66
	dw $FEC0,$FA80,$3F00,$0140,$FA80,$3F0A,$FF40,$FA80
	dw $3F02,$00C0,$FA80,$3F08,$FFC0,$FA80,$3F04,$0040
	dw $FA80,$3F06,$FEC0,$FD00,$3FA0,$0140,$FD00,$3FAA
	dw $FF40,$FD00,$3FA2,$00C0,$FD00,$3FA8,$FFC0,$FD00
	dw $3FA4,$0040,$FD00,$3FA6

DATA_81DD09:
	db $18 : dw $7E0475
	db $10 : dw $7E0479
	db $20 : dw $7E047D
	db $10 : dw $7E0481
	db $10 : dw $7E0485
	db $01 : dw $7E0475
	db $00

DATA_81DD1C:
	db $18 : dw $7E0489
	db $10 : dw $7E048D
	db $20 : dw $7E0491
	db $10 : dw $7E0495
	db $10 : dw $7E0499
	db $01 : dw $7E0489
	db $00

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

CODE_81DD2F:
	REP.b #$30
	LDX.w #JP_GFX_BG_HighScoreScreen
	LDA.w #JP_GFX_BG_HighScoreScreen>>16
	LDY.w #$0000
	JSL.l CODE_81B31C
	REP.b #$30
	LDX.w #JP_GFX_Sprite_JurassicParkFont
	LDA.w #JP_GFX_Sprite_JurassicParkFont>>16
	LDY.w #$6000
	JSL.l CODE_81B34A
	REP.b #$30
	LDX.w #JP_Tilemap_BG_HighScoreScreen
	LDA.w #JP_Tilemap_BG_HighScoreScreen>>16
	LDY.w #$4000
	JSL.l CODE_81B378
	REP.b #$30
	LDX.w #JP_Palette_HighScoreScreen
	LDA.w #JP_Palette_HighScoreScreen>>16
	JSL.l CODE_81B3A6
	JSL.l CODE_819EF1
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$01
	STA.b $10
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$81
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	STA.b $0E
	LDA.b #$A0
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.b $0B
	LDA.b #$00
	STA.b $0D
	STZ.b $0F
	REP.b #$30
	LDA.w #$0078
	STA.w $0471
	LDA.w #$0258
	STA.w $0473
	JSR.w CODE_81DE43
CODE_81DDD3:
	JSL.l CODE_819EF1
	JSR.w CODE_81DEAF
	JSL.l CODE_819B3A
	REP.b #$20
	DEC.w $0473
	BEQ.b CODE_81DDED
	LDA.w $0AF1
	AND.w #$F0C0
	BEQ.b CODE_81DDD3
CODE_81DDED:
	SEP.b #$20
	LDA.b #$00
	STA.b $0B
	JSL.l CODE_839D62
	JML.l CODE_81D59E

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

DATA_81DDFB:
	dw $3E00,$3E02,$3E04,$3E06,$3E08,$3E0A,$3E0C,$3E0E
	dw $3E20,$3E22,$3E24,$3E26,$3E28,$3E2A,$3E2C,$3E2E
	dw $3E40,$3E42,$3E44,$3E46,$3E48,$3E4A,$3E4C,$3E4E
	dw $3E60,$3E62

DATA_81DE2F:
	dw $3E64,$3E66,$3E68,$3E6A,$3E6C,$3E6E,$3E80,$3E82
	dw $3E84,$3E86

CODE_81DE43:
	JSL.l CODE_80F621
	REP.b #$30
	LDX.w #$0000
	LDY.w #$0000
CODE_81DE4F:
	LDA.w !RAM_JP_Global_HighScoreScreenOAMData,x
	PHX
	CMP.w #$000A
	BCS.b CODE_81DE60
	PHX
	ASL
	TAX
	LDA.l DATA_81DE2F,x
	PLX
CODE_81DE60:
	STA.w JP_Global_OAMBuffer[$00].Tile,y
	INY
	INY
	INY
	INY
	PLX
	INX
	INX
	CPX.w #$007E
	BNE.b CODE_81DE4F
	LDX.w #$0000
	LDY.w #$0000
CODE_81DE75:
	LDA.l DATA_81DFE6,x
	SEP.b #$20
	STA.w JP_Global_OAMBuffer[$00].XDisp,y
	REP.b #$20
	XBA
	STA.w $7E8E3E,y
	LDA.l DATA_81DFE6+$02,x
	SEP.b #$20
	STA.w JP_Global_OAMBuffer[$00].YDisp,y
	REP.b #$20
	XBA
	STA.w $7E8E40,y
	INY
	INY
	INY
	INY
	TXA
	CLC
	ADC.w #$0008
	TAX
	CMP.w #$01F8
	BNE.b CODE_81DE75
	LDA.w #$0040
	STA.w $046B
	LDA.w #$0004
	STA.w $0469
	RTS

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

CODE_81DEAF:
	REP.b #$30
	LDA.w $0471
	BEQ.b CODE_81DEC6
	DEC.w $0471
	BNE.b CODE_81DF22
	SEP.b #$20
	LDA.b #$11
	STA.b $10
	LDA.b #$08
	STA.b $0F
	RTS

CODE_81DEC6:
	REP.b #$30
	LDX.w $0469
	BMI.b CODE_81DF22
	LDY.w #$0000
CODE_81DED0:
	LDA.l DATA_81DFE6,x
	CLC
	ADC.w $7E8E3E,y
	STA.w $7E8E3E,y
	SEP.b #$20
	XBA
	STA.w JP_Global_OAMBuffer[$00].XDisp,y
	REP.b #$20
	LDA.l DATA_81DFE6+$02,x
	CLC
	ADC.w $7E8E40,y
	STA.w $7E8E40,y
	SEP.b #$20
	XBA
	STA.w JP_Global_OAMBuffer[$00].YDisp,y
	REP.b #$20
	INY
	INY
	INY
	INY
	TXA
	CLC
	ADC.w #$0008
	TAX
	CMP.w #$01F8
	BCC.b CODE_81DED0
	DEC.w $046B
	BNE.b CODE_81DF22
	LDA.w #$0040
	STA.w $046B
	LDA.w $0469
	CLC
	ADC.w #$0004
	CMP.w #$0008
	BNE.b CODE_81DF1F
	LDA.w #$FFFF
CODE_81DF1F:
	STA.w $0469
CODE_81DF22:
	RTS

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

CODE_81DF23:
	REP.b #$30
	LDX.w #$0000
CODE_81DF28:
	LDA.l JP_InitialHighScoresAndNames,x
	CMP.w #$000A
	BCC.b CODE_81DF5D
	PHX
	CMP.w #$0020
	BNE.b CODE_81DF3C
	LDA.w #$3EAC
	BRA.b CODE_81DF5C

CODE_81DF3C:
	CMP.w #$0041
	BCC.b CODE_81DF52
	CMP.w #$005B
	BCS.b CODE_81DF52
	SEC
	SBC.w #$0041
	ASL
	TAX
	LDA.l DATA_81DDFB,x
	BRA.b CODE_81DF5C

CODE_81DF52:
	SEC
	SBC.w #$0030
	ASL
	TAX
	LDA.l DATA_81DE2F,x
CODE_81DF5C:
	PLX
CODE_81DF5D:
	STA.w !RAM_JP_Global_HighScoreScreenOAMData,x
	INX
	INX
	CPX.w #JP_InitialHighScoresAndNames_End-JP_InitialHighScoresAndNames
	BNE.b CODE_81DF28
	RTL

JP_InitialHighScoresAndNames:
;$81DF68
	dw "CHRIS",$0003,$0005,$0007,$0005
	dw "JAY  ",$0003,$0000,$0005,$0000
	dw "JON D",$0002,$0005,$0002,$0005
	dw "ALAN ",$0002,$0001,$0000,$0000
	dw "PAUL ",$0001,$0005,$0007,$0005
	dw "STEVE",$0001,$0000,$0005,$0000
	dw "MARK ",$0000,$0005,$0002,$0005
.End:

DATA_81DFE6:
	dw $00F0,$00D0,$FCE0,$FD40,$0080,$00C0,$FEE0,$FD80
	dw $00F0,$0000,$FD60,$0080,$0030,$00D0,$00A0,$FD40
	dw $00F0,$0090,$FDE0,$FE40,$0000,$0070,$0260,$FEC0
	dw $0000,$0020,$02A0,$0000,$0080,$00D0,$00E0,$FD40
	dw $00F0,$00A0,$FF60,$FE00,$00F0,$0020,$FCE0,$0060
	dw $00B0,$00D0,$FE20,$FDA0,$0050,$00D0,$FFE0,$FDA0
	dw $0000,$00A0,$0160,$FE60,$00C0,$0000,$FEA0,$00E0
	dw $0040,$0000,$0160,$00E0,$00A0,$00D0,$0020,$FDA0
	dw $0000,$0080,$02E0,$FEE0,$0010,$0000,$02E0,$00E0
	dw $00B0,$0000,$FDE0,$0140,$00F0,$0030,$FD20,$0080
	dw $00F0,$0080,$FD60,$FF40,$0090,$00D0,$FF20,$FE00
	dw $0010,$00D0,$0160,$FE00,$0000,$0050,$0260,$0000
	dw $0030,$0000,$01E0,$0140,$0070,$0000,$0120,$0140
	dw $00D0,$00D0,$FFE0,$FE00,$00F0,$0050,$FCE0,$0060
	dw $00A0,$0000,$FE60,$01A0,$0070,$00D0,$FF60,$FE60
	dw $0000,$0090,$0160,$FF60,$0000,$0000,$01A0,$01A0
	dw $0060,$00D0,$00E0,$FE60,$00E0,$0000,$FF20,$01A0
	dw $0000,$0030,$02E0,$00E0,$00F0,$00B0,$FF60,$FEE0
	dw $00F0,$0010,$FCE0,$01C0,$0090,$0000,$FEA0,$0200
	dw $0000,$0010,$0120,$01C0,$0000,$00B0,$0160,$FF40
	dw $0040,$00D0,$00A0,$FEC0,$00F0,$0060,$FEA0,$0080
	dw $0020,$00D0,$0220,$FEC0,$0000,$0060,$02E0,$0080
	dw $0050,$0000,$01E0,$0200,$00F0,$0070,$FCE0,$00A0
	dw $00E0,$00D0,$FD60,$FF20,$0060,$0000,$FFA0,$0260
	dw $0000,$0040,$0160,$0160,$0000,$00C0,$01A0,$FF60
	dw $0080,$0000,$0060,$0260,$00F0,$0040,$FEE0,$0160
	dw $0010,$00C0,$02A0,$FF60,$0020,$0000,$02A0,$0260
	dw $0080,$0010,$FEA0,$0280,$00F0,$00C0,$FD20,$FFC0
	dw $00C0,$00D0,$FE20,$FF80,$0010,$0010,$0120,$0280
	dw $00E0,$00C0,$FE20,$FFC0,$00D0,$0000,$FF20,$02C0
	dw $0070,$0010,$00E0,$0280,$0070,$00C0,$0120,$FFC0
	dw $00E0,$0010,$FFA0,$0280

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

CODE_81E1DE:
	SEP.b #$30
	LDA.w $0E4E
	BNE.b CODE_81E247
	LDA.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit
	STA.w $0455
	STZ.w $0456
	LDA.w !RAM_JP_Global_Player_CurrentScoreHundredsDigit
	STA.w $0457
	STZ.w $0458
	LDA.w !RAM_JP_Global_Player_CurrentScoreTensDigit
	STA.w $0459
	STZ.w $045A
	LDA.w !RAM_JP_Global_Player_CurrentScoreOnesDigit
	STA.w $045B
	STZ.w $045C
	REP.b #$30
	LDX.w #$000A
CODE_81E20E:
	LDA.w $0455
	CMP.w !RAM_JP_Global_HighScoreScreenOAMData,x
	BEQ.b CODE_81E21A
	BCS.b CODE_81E251
	BRA.b CODE_81E23C

CODE_81E21A:
	LDA.w $0457
	CMP.w !RAM_JP_Global_HighScoreScreenOAMData+$02,x
	BEQ.b CODE_81E226
	BCS.b CODE_81E251
	BRA.b CODE_81E23C

CODE_81E226:
	LDA.w $0459
	CMP.w !RAM_JP_Global_HighScoreScreenOAMData+$04,x
	BEQ.b CODE_81E232
	BCS.b CODE_81E251
	BRA.b CODE_81E23C

CODE_81E232:
	LDA.w $045B
	CMP.w !RAM_JP_Global_HighScoreScreenOAMData+$06,x
	BEQ.b CODE_81E23C
	BCS.b CODE_81E251
CODE_81E23C:
	TXA
	CLC
	ADC.w #$0012
	TAX
	CMP.w #$0088
	BNE.b CODE_81E20E
CODE_81E247:
	SEP.b #$20
	LDA.b #$00
	STA.b $0B
	JML.l CODE_81D59E

CODE_81E251:
	PHX
	TXA
	SEC
	SBC.w #$000A
	STA.w $044F
	LDX.w #$7E207D
	LDY.w #$7E208F
	LDA.w #$0090
	CLC
	SBC.w $044F
	PHB
	MVP $7E208F>>16,$7E207D>>16
	PLB
	PLX
	LDA.w $0455
	STA.w !RAM_JP_Global_HighScoreScreenOAMData,x
	LDA.w $0457
	STA.w !RAM_JP_Global_HighScoreScreenOAMData+$02,x
	LDA.w $0459
	STA.w !RAM_JP_Global_HighScoreScreenOAMData+$04,x
	LDA.w $045B
	STA.w !RAM_JP_Global_HighScoreScreenOAMData+$06,x
	SEI
	JSL.l CODE_819EE6
	REP.b #$30
	STZ.w $0AFB
	STZ.w $0AFD
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	REP.b #$30
	LDY.w #DATA_B68000>>16
	LDX.w #DATA_B68000
	JSL.l CODE_839C8D
	REP.b #$30
	LDX.w #JP_GFX_BG_HighScoreScreen
	LDA.w #JP_GFX_BG_HighScoreScreen>>16
	LDY.w #$0000
	JSL.l CODE_81B31C
	REP.b #$30
	LDX.w #JP_GFX_Sprite_JurassicParkFont
	LDA.w #JP_GFX_Sprite_JurassicParkFont>>16
	LDY.w #$6000
	JSL.l CODE_81B34A
	REP.b #$30
	LDX.w #JP_Tilemap_BG_HighScoreScreen
	LDA.w #JP_Tilemap_BG_HighScoreScreen>>16
	LDY.w #$4000
	JSL.l CODE_81B378
	REP.b #$30
	LDX.w #JP_Palette_HighScoreScreen
	LDA.w #JP_Palette_HighScoreScreen>>16
	JSL.l CODE_81B3A6
	JSL.l CODE_819EF1
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$11
	STA.b $10
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$81
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	STA.b $0E
	LDA.b #$A0
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$08
	STA.b $0F
	LDA.b #$0F
	STA.b $0B
	LDA.b #$00
	STA.b $0D
	LDA.b #$01
	STA.b $0C
	REP.b #$30
	LDA.w #$0078
	STA.w $0471
	LDA.w #$0E10
	STA.w $0473
	STZ.w $0453
	JSR.w CODE_81E4B5
CODE_81E35F:
	REP.b #$30
	JSL.l CODE_819EF1
	JSR.w CODE_81E3AF
	LDA.w $0AF1
	BEQ.b CODE_81E373
	LDA.w #$0E10
	STA.w $0473
CODE_81E373:
	DEC.w $0473
	BEQ.b CODE_81E37D
	LDA.w $0453
	BPL.b CODE_81E35F
CODE_81E37D:
	LDY.w $044F
	LDX.w #$0000
CODE_81E383:
	LDA.w $0455,x
	BPL.b CODE_81E38B
	LDA.w #$3EAC
CODE_81E38B:
	STA.w !RAM_JP_Global_HighScoreScreenOAMData,y
	INY
	INY
	INX
	INX
	CPX.w #$000A
	BNE.b CODE_81E383
	JSL.l CODE_819EF1
	SEP.b #$20
	LDA.b #$F0
	STA.b $0D
	LDA.b #$01
	STA.l !REGISTER_SubScreenLayers|!FastROMAddressOffset
	STA.b $10
	STZ.b $0F
	JML.l CODE_81DD2F

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

CODE_81E3AF:
	REP.b #$30
	LDA.w $0AF1
	TAY
	AND.w #$0F00
	BEQ.b CODE_81E3FB
	LDX.w $0451
	AND.w #$0100
	BEQ.b CODE_81E3C8
	CPX.w #$0029
	BEQ.b CODE_81E3C8
	INX
CODE_81E3C8:
	TYA
	AND.w #$0200
	BEQ.b CODE_81E3D4
	CPX.w #$0000
	BEQ.b CODE_81E3D4
	DEX
CODE_81E3D4:
	TYA
	AND.w #$0800
	BEQ.b CODE_81E3E5
	CPX.w #$0007
	BCC.b CODE_81E3E5
	TXA
	SEC
	SBC.w #$0007
	TAX
CODE_81E3E5:
	TYA
	AND.w #$0400
	BEQ.b CODE_81E3F6
	CPX.w #$0023
	BCS.b CODE_81E3F6
	TXA
	CLC
	ADC.w #$0007
	TAX
CODE_81E3F6:
	STX.w $0451
	BRA.b CODE_81E44C

CODE_81E3FB:
	TYA
	AND.w #$F0C0
	BEQ.b CODE_81E44C
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PickupItem&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
	LDY.w $0453
	LDA.w $0451
	CMP.w #$0028
	BEQ.b CODE_81E431
	CMP.w #$0029
	BEQ.b CODE_81E446
	ASL
	ASL
	TAX
	LDA.l DATA_81E4F0+$02,x
	STA.w $0455,y
	INY
	INY
	CPY.w #$000A
	BEQ.b CODE_81E446
	STY.w $0453
	BRA.b CODE_81E44C

CODE_81E431:
	CPY.w #$0000
	BEQ.b CODE_81E444
	LDA.w #$FFFF
	STA.w $0455,y
	DEY
	DEY
	STA.w $0455,y
	STY.w $0453
CODE_81E444:
	BRA.b CODE_81E44C

CODE_81E446:
	LDA.w #$FFFF
	STA.w $0453
CODE_81E44C:
	LDY.w #$3EA2
	LDA.w $0455
	BPL.b CODE_81E455
	TYA
CODE_81E455:
	STA.w JP_Global_OAMBuffer[$01].Tile
	LDA.w $0457
	BPL.b CODE_81E45E
	TYA
CODE_81E45E:
	STA.w $04A9
	LDA.w $0459
	BPL.b CODE_81E467
	TYA
CODE_81E467:
	STA.w $04AD
	LDA.w $045B
	BPL.b CODE_81E470
	TYA
CODE_81E470:
	STA.w $04B1
	LDA.w $045D
	BPL.b CODE_81E479
	TYA
CODE_81E479:
	STA.w $04B5
	LDA.w $0453
	BMI.b CODE_81E497
	ASL
	TAX
	LDA.w #$3EAC
	STA.w JP_Global_OAMBuffer[$01].Tile,x
	LDA.w $049D
	AND.w #$0008
	BEQ.b CODE_81E497
	LDA.w #$3EA2
	STA.w JP_Global_OAMBuffer[$01].Tile,x
CODE_81E497:
	LDA.w $0451
	ASL
	ASL
	TAX
	LDA.l DATA_81E4F0,x
	SEC
	SBC.w #$0808
	STA.w JP_Global_OAMBuffer[$00].XDisp
	LDA.w #$3EA4
	STA.w JP_Global_OAMBuffer[$00].Tile
	LDA.w #$0002
	STA.w JP_Global_UpperOAMBuffer[$00].Slot
	RTS

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

CODE_81E4B5:
	REP.b #$30
	JSL.l CODE_80F621
	LDA.w #$FFFF
	STA.w $0455
	STA.w $0457
	STA.w $0459
	STA.w $045B
	STA.w $045D
	LDX.w #DATA_81E4DC
	LDY.w #$7E04A3
	LDA.w #$00BB
	PHB
	MVN $7E04A3>>16,DATA_81E4DC>>16
	PLB
	RTS

DATA_81E4DC:
	dw $B848,$3EA2,$B860,$3EA2,$B878,$3EA2,$B890,$3EA2
	dw $B8A8,$3EA2

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

DATA_81E4F0:
	dw $1830,$3E00,$1848,$3E02,$1860,$3E04,$1878,$3E06
	dw $1890,$3E08,$18A8,$3E0A,$18C0,$3E0C,$3030,$3E0E
	dw $3048,$3E20,$3060,$3E22,$3078,$3E24,$3090,$3E26
	dw $30A8,$3E28,$30C0,$3E2A,$4830,$3E2C,$4848,$3E2E
	dw $4860,$3E40,$4878,$3E42,$4890,$3E44,$48A8,$3E46
	dw $48C0,$3E48,$6030,$3E4A,$6048,$3E4C,$6060,$3E4E
	dw $6078,$3E60,$6090,$3E62,$60A8,$3E64,$60C0,$3E66
	dw $7830,$3E68,$7848,$3E6A,$7860,$3E6C,$7878,$3E6E
	dw $7890,$3E80,$78A8,$3E82,$78C0,$3E84,$9030,$3E86
	dw $9048,$3EAC,$9060,$3EA2,$9078,$3E88,$9090,$3E8A
	dw $90A8,$3EA8,$90C0,$3EAA

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

CODE_81E598:
	REP.b #$30
	LDA.w $0E4E
	BMI.b CODE_81E5C4
	LDX.w $0387
	LDA.w $0AEF
	CMP.w $7E9D5E,x
	BEQ.b CODE_81E5C1
	INX
	INX
	INX
	INX
	STX.w $0387
	STA.w $7E9D5E,x
	STZ.w $7E9D60,x
	LDA.w #$FFFF
	STA.w $7E9D62,x
	STA.w $7E9D64,x
	RTL

CODE_81E5C1:
	INC.w $7E9D60,x
CODE_81E5C4:
	RTL

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

CODE_81E5C5:
	REP.b #$30
	LDA.w $0E4E
	BMI.b CODE_81E5FF
	LDX.w $0387
	DEC.w $0389
	BMI.b CODE_81E5E4
CODE_81E5D4:
	LDA.w $0AEF
	AND.w #$1000
	BNE.b CODE_81E5F9
	LDA.l DATA_81E603-$04,x
	STA.w $0AEF
	RTL

CODE_81E5E4:
	LDA.l DATA_81E603+$02,x
	CMP.w #$FFFF
	BEQ.b CODE_81E5F9
	STA.w $0389
	INX
	INX
	INX
	INX
	STX.w $0387
	BRA.b CODE_81E5D4

CODE_81E5F9:
	LDA.w #$FFFF
	STA.w $0E4E
CODE_81E5FF:
	STZ.w $0AEF
	RTL

DATA_81E603:
	dw $0000,$009F,$0400,$0068,$0500,$0008,$0180,$000E
	dw $0100,$0000,$0900,$0001,$0800,$0000,$0200,$005E
	dw $0A00,$000B,$0A80,$0013,$0000,$0000,$0880,$0000
	dw $0980,$0001,$0000,$0000,$0980,$0003,$0900,$0000
	dw $0800,$0001,$0A00,$000B,$0200,$0004,$0A00,$000F
	dw $0200,$0004,$0600,$0001,$0680,$0000,$0280,$0002
	dw $0000,$0000,$0280,$0002,$0000,$0000,$0280,$0002
	dw $0000,$0000,$0280,$0000,$0A80,$0005,$0280,$0003
	dw $0000,$0000,$0680,$0006,$0000,$0000,$0680,$0006
	dw $0000,$0000,$0500,$0015,$0580,$000E,$0500,$0003
	dw $0100,$000D,$0500,$000C,$0100,$004F,$0500,$0024
	dw $0100,$0087,$0900,$0006,$0800,$0000,$0880,$0007
	dw $0A80,$0005,$0A00,$0000,$0800,$0002,$0900,$0029
	dw $0100,$003F,$0500,$0009,$0100,$0003,$0500,$0003
	dw $0100,$002C,$0900,$0008,$0800,$0004,$0880,$0008
	dw $0980,$0013,$0800,$0001,$0000,$000D,$0200,$0000
	dw $0600,$000B,$0400,$0000,$0440,$0003,$0040,$0005
	dw $0000,$0010,$0400,$0006,$0500,$0001,$0100,$0000
	dw $0900,$000A,$0980,$0006,$0900,$0004,$0980,$0005
	dw $0900,$0009,$0400,$0003,$0600,$001E,$0200,$0054
	dw $0600,$0006,$0400,$00CC,$0200,$0000,$0A00,$0001
	dw $0800,$000D,$0880,$0006,$0000,$0003,$0080,$0003
	dw $0000,$0002,$0080,$0003,$0000,$0000,$0080,$0003
	dw $0500,$0006,$0400,$000B,$0480,$0004,$0400,$0004
	dw $0480,$0002,$0400,$000E,$0000,$0008,$0200,$0006
	dw $0A00,$0015,$0800,$0002,$0840,$000B,$0040,$0003
	dw $0000,$0017,$0800,$0003,$0840,$0003,$0040,$0002
	dw $0000,$0013,$0400,$0050,$0600,$000C,$0200,$001C
	dw $8200,$0009,$0200,$0063,$0600,$000E,$0200,$0008
	dw $0400,$0001,$0500,$0000,$0100,$0001,$0800,$0009
	dw $0A00,$001B,$0800,$0001,$0900,$0001,$0100,$0006
	dw $0500,$000F,$0100,$0008,$0900,$0001,$0980,$0009
	dw $0100,$0009,$0500,$0000,$0580,$0008,$0500,$0004
	dw $0100,$0000,$0000,$000D,$0400,$0013,$0500,$0009
	dw $0400,$0002,$0600,$0007,$0200,$001B,$0600,$001E
	dw $0200,$0008,$0A00,$0006,$0200,$0002,$0600,$001C
	dw $0200,$000C,$0A00,$0011,$0800,$0002,$0900,$0003
	dw $0100,$000D,$0000,$000B,$0200,$0009,$0A00,$0037
	dw $0200,$0001,$0000,$014C,$FFFF,$FFFF,$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
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

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

JP_Palette_ExteriorAreas:
;$81E903
	incbin "Palettes/Compressed/ExteriorAreas.bin"

JP_GFX_Sprite_FlamesAndShadows:
;$81EAD7
	incbin "Graphics/Compressed/GFX_Sprite_FlamesAndShadows.bin"

DATA_81EC8B:
;$81EC8B
	incbin "Tilemaps/Compressed/Layer2_ExteriorAreasGrass.bin"

DATA_81F0A3:
;$81F0A3
	incbin "Graphics/Compressed/GFX_Layer2_ExteriorAreasGrassTiles.bin"

JP_GFX_Layer3_RadarTiles:
;$81F397
	incbin "Graphics/GFX_Layer3_RadarTiles.bin"

JP_Tilemap_Layer3_ExteriorAreas:
;$81F697
	incbin "Tilemaps/Compressed/Layer3_ExteriorAreas.bin"

JP_GFX_Layer3_ExteriorAreasStatusBar:
;$81F7D1
	incbin "Graphics/Compressed/GFX_Layer3_ExteriorAreasStatusBar.bin"

JP_Tilemap_HealthBarTilemaps:
;$81FBD7
	dw $2C72,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C72
	dw $2C74,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C74
	dw $2C75,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C75
	dw $2C76,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C76
	dw $2C76,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C76
	dw $2C77,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C77
	dw $2C78,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C78
	dw $2C79,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C79
	dw $2C7A,$2C73,$2C73,$2C73,$2C73,$2C73,$2C73,$6C7A
	dw $2C7A,$2C7B,$2C73,$2C73,$2C73,$2C73,$6C7B,$6C7A
	dw $2C7A,$2C7C,$2C73,$2C73,$2C73,$2C73,$6C7C,$6C7A
	dw $2C7A,$2C7D,$2C73,$2C73,$2C73,$2C73,$6C7D,$6C7A
	dw $2C7A,$2C7E,$2C73,$2C73,$2C73,$2C73,$6C7E,$6C7A
	dw $2C7A,$2C7F,$2C73,$2C73,$2C73,$2C73,$6C7F,$6C7A
	dw $2C7A,$2C80,$2C73,$2C73,$2C73,$2C73,$6C80,$6C7A
	dw $2C7A,$2C81,$2C73,$2C73,$2C73,$2C73,$6C81,$6C7A
	dw $2C7A,$2C82,$2C73,$2C73,$2C73,$2C73,$2C82,$6C7A
	dw $2C7A,$2C82,$2C7B,$2C73,$2C73,$6C7B,$2C82,$6C7A
	dw $2C7A,$2C82,$2C7C,$2C73,$2C73,$6C7C,$2C82,$6C7A
	dw $2C7A,$2C82,$2C7D,$2C73,$2C73,$6C7D,$2C82,$6C7A
	dw $2C7A,$2C82,$2C7E,$2C73,$2C73,$6C7E,$2C82,$6C7A
	dw $2C7A,$2C82,$2C7F,$2C73,$2C73,$6C7F,$2C82,$6C7A
	dw $2C7A,$2C82,$2C80,$2C73,$2C73,$6C80,$2C82,$6C7A
	dw $2C7A,$2C82,$2C81,$2C73,$2C73,$6C81,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C73,$2C73,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C7B,$6C7B,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C7C,$6C7C,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C7D,$6C7D,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C7E,$6C7E,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C7F,$6C7F,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C80,$6C80,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C81,$6C81,$2C82,$2C82,$6C7A
	dw $2C7A,$2C82,$2C82,$2C82,$2C82,$2C82,$2C82,$6C7A

UNK_81FDE7:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($81FDE7, incbin, DATA_81FDE7_JP_U2.bin)
else
	%InsertGarbageData($81FDE7, incbin, DATA_81FDE7_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

CODE_828000:
	REP.b #$30
	LDA.w $0B1D
	BNE.b CODE_828024
	LDA.w $0AEF
	BEQ.b CODE_828024
	LDA.w #$03C0
	STA.w !RAM_JP_Exterior_WaitBeforeMrDNATriviaAppearsLo
	LDA.w $0E41
	BEQ.b CODE_828023
	STZ.w $06C7
	STZ.w $0E41
	LDA.w #$0002
	STA.w $06C5
CODE_828023:
	RTL

CODE_828024:
	LDA.w $06C5
	BNE.b CODE_828023
	DEC.w !RAM_JP_Exterior_WaitBeforeMrDNATriviaAppearsLo
	BPL.b CODE_828023
	LDA.w #$00F0
	STA.w !RAM_JP_Exterior_WaitBeforeMrDNATriviaAppearsLo
	LDX.w !RAM_JP_Exterior_MrDNATriviaTilemapIndexLo
CODE_828037:
	LDA.l DATA_82806C,x
	BPL.b CODE_828042
	LDX.w #$0000
	BRA.b CODE_828037

CODE_828042:
	INX
	INX
	INX
	INX
	STX.w !RAM_JP_Exterior_MrDNATriviaTilemapIndexLo
	STA.w $06C5
	STA.w $0E41
	LDA.l DATA_82806C-$02,x
	TAX
	LDA.w #JP_Tilemap_MrDNAMessageBoxes_Main>>16
	LDY.w #$1000
	JSL.l CODE_81B18B
	LDA.w #JP_GFX_Layer3_MrDNAMessageBoxTiles>>16
	LDX.w #JP_GFX_Layer3_MrDNAMessageBoxTiles
	LDY.w #$0000
	JSL.l CODE_81B18B
	RTL

DATA_82806C:
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_8280D0
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_828338
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_82857E
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_8287DA
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_828A14
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_828C66
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_828EB4
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_8290FA
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_82933A
	dw $00D8,JP_Tilemap_MrDNAMessageBoxes_DATA_82958C
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_8297C4
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_829A1E
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_829C54
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_829E8C
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_82A0C8
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_82A30A
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_82A530
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_82A76A
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_82A99C
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_82ABE2
	dw $00D8,JP_Tilemap_MrDNAMessageBoxes_DATA_82AE18
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_82B05A
	dw $0014,JP_Tilemap_MrDNAMessageBoxes_DATA_82B292
	dw $0076,JP_Tilemap_MrDNAMessageBoxes_DATA_82B4DA
	dw $FFFF,$FFFF

JP_Tilemap_MrDNAMessageBoxes:
.Main:
;$8280D0

.DATA_8280D0:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_8280D0.bin"

.DATA_828338:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_828338.bin"

.DATA_82857E:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82857E.bin"

.DATA_8287DA:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_8287DA.bin"

.DATA_828A14:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_828A14.bin"

.DATA_828C66:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_828C66.bin"

.DATA_828EB4:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_828EB4.bin"

.DATA_8290FA:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_8290FA.bin"

.DATA_82933A:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82933A.bin"

.DATA_82958C:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82958C.bin"

.DATA_8297C4:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_8297C4.bin"

.DATA_829A1E:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_829A1E.bin"

.DATA_829C54:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_829C54.bin"

.DATA_829E8C:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_829E8C.bin"

.DATA_82A0C8:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82A0C8.bin"

.DATA_82A30A:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82A30A.bin"

.DATA_82A530:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82A530.bin"

.DATA_82A76A:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82A76A.bin"

.DATA_82A99C:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82A99C.bin"

.DATA_82ABE2:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82ABE2.bin"

.DATA_82AE18:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82AE18.bin"

.DATA_82B05A:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82B05A.bin"

.DATA_82B292:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82B292.bin"

.DATA_82B4DA:									; Note: ""
	incbin "Tilemaps/Compressed/MrDNAMessageBox/DATA_82B4DA.bin"

JP_GFX_Layer3_MrDNAMessageBoxTiles:
;$82B72C
	incbin "Graphics/Compressed/GFX_Layer3_MrDNAMessageBoxTiles.bin"

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

JP_Tilemap_RegularMessageBoxes:
.Main:
;$82BE10

.DATA_82BE10:									; Note: "Grant... Touch the fence for a free life!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82BE10.bin"

.DATA_82C040:									; Note: "Grant... Shut down the power in the utility shed!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82C040.bin"

.DATA_82C27E:									; Note: "Hi Grant... Spitters will not hurt you. Their spit gives you more power!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82C27E.bin"

.DATA_82C4CA:									; Note: "SUCKER!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82C4CA.bin"

.DATA_82C6C2:									; Note: "Hey Grant... Raptors will not attack unless you shoot at them!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82C6C2.bin"

.DATA_82C904:									; Note: "Grant... Raptors are breeding! Collect all their eggs or they will hatch!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82C904.bin"

.DATA_82CB3E:									; Note: ""YOUR TASK... Turn on the generator in the Nublar utility shed!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82CB3E.bin"

.DATA_82CD5E:									; Note: "Secure the visitor center!Find out how the raptors get in and stop them!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82CD5E.bin"

.DATA_82CF92:									; Note: "Well done Grant! The visitor center is now free of raptors!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82CF92.bin"

.DATA_82D1B6:									; Note: "Grant... The T-rex can only be tranquilized Bullets and missles are useless!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82D1B6.bin"

.DATA_82D400:									; Note: "Great shot Grant!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82D400.bin"

.DATA_82D602:									; Note: "Good shooting Grant!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82D602.bin"

.DATA_82D802:									; Note: "YOUR TASK... Clear the ship of dinosaurs! Access a terminal to stop it from sailing!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82D802.bin"

.DATA_82DA5A:									; Note: "YOUR TASK... Destroy the raptor nest in the east forest. Use the nerve gas!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82DA5A.bin"

.DATA_82DC9A:									; Note: "Thats it Grant.The gas bomb will go off automatically. Get out of there quickly!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82DC9A.bin"

.DATA_82DEDA:									; Note: "Alan... Be careful around blind corners. The T-Rex is free!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82DEDA.bin"

.DATA_82E104:									; Note: "Alan... The pachyce-phalosaurus are very territorial. Stay out of their way!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82E104.bin"

.DATA_82E344:									; Note: "Good Alan... The ship is now free of raptors!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82E344.bin"

.DATA_82E568:									; Note: "YOUR TASK... Use the ship terminal to contact the mainland for help!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82E568.bin"

.DATA_82E7A4:									; Note: "YOUR TASK... Reboot the computer in the visitor center!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82E7A4.bin"

.DATA_82E9CA:									; Note: "Mr Grant... Your motion sensor will only work when the computer is rebooted!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82E9CA.bin"

.DATA_82EC0C:									; Note: "Mr Grant... Do not get close to the Dilophosaurs Their spit is deadly!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82EC0C.bin"

.DATA_82EE46:									; Note: "Mr Grant... Do not shoot the Gallimimus. They may stampede!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82EE46.bin"

.DATA_82F06E:									; Note: "Mr Grant... If you see the Triceratops, run like crazy!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82F06E.bin"

.DATA_82F296:									; Note: "YOUR TASK... Block the tunnel the raptors are using to enter the visitor center!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82F296.bin"

.DATA_82F4C2:									; Note: "Mr Grant... The Raptors have escaped! Do what you can to stop them!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82F4C2.bin"

.DATA_82F702:									; Note: "Mr Grant... You will need computer clearance to access certain areas."
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82F702.bin"

.DATA_82F936:									; Note: "YOUR TASK... A helicopter is coming. Get to the helipad!"
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82F936.bin"

.DATA_82FB5E:									; Note: "You have found Hammond's I.D. card."
	incbin "Tilemaps/Compressed/RegularMessageBox/DATA_82FB5E.bin"

UNK_82FD6A:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($82FD6A, incbin, DATA_82FD6A_JP_U2.bin)
else
	%InsertGarbageData($82FD6A, incbin, DATA_82FD6A_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_838000:						; Note: Unused bone crunching and pained grunt noise. According to pre-release material, this was intended for when Grant is eated by the T-Rex, but it was removed because Nintendo thought it sounded too realistic.
	incbin "SPC700/BoneCrunchSamples.bin"

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

DATA_839A6E:
	dw $0000,$FFFF,$FFFF,$FFFF,$003A,$FFFF,$FFFF,$FFFF
	dw $006A,$006A,$FFFF,$FFFF,$FFFF,$004C,$004C,$FFFF
	dw $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF
	dw $0032,$FFFF,$FFFF,$FFFF,$FFFF,$0046,$0040,$FFFF
	dw $FFFF,$FFFF,$FFFF,$0052,$0058,$0058,$0064,$FFFF
	dw $FFFF,$FFFF,$FFFF,$005E,$0064,$FFFF,$FFFF,$FFFF
	dw $0070,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF

CODE_839ADA:
	JSL.l CODE_839BAE
	SEP.b #$20
	LDA.w $02F9
	BNE.b CODE_839B4E
	REP.b #$10
	LDX.w $02F7
	CPX.w !RAM_JP_Global_SoundTableIndexLo
	BEQ.b CODE_839B4E
	TXY
	LDA.b #$00
	XBA
	LDA.w JP_Global_SoundTable[$00].ID,x
	BPL.b CODE_839B07
	AND.b #$7F
	ASL
	TAX
	LDA.l DATA_839A6E,x
	BMI.b CODE_839B07
	CMP.w $0401
	BNE.b CODE_839B4F
CODE_839B07:
	TYX
	LDA.w $02F3
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839B4E
	INC
	AND.b #$8F
	STA.w $02F3
	LDA.w JP_Global_SoundTable[$00].YPosLo,x
	STA.l !REGISTER_APUPort3
	LDA.w JP_Global_SoundTable[$00].XPosLo,x
	STA.l !REGISTER_APUPort2
	LDA.w JP_Global_SoundTable[$00].PosHi,x
	STA.l !REGISTER_APUPort1
	LDA.w !RAM_JP_Global_MusicSetting
	BEQ.b CODE_839B3E
	LDA.w JP_Global_SoundTable[$00].ID,x
	CMP.b #$01
	BNE.b CODE_839B3E
	LDA.b #$00
	STA.l !REGISTER_APUPort1
CODE_839B3E:
	LDA.w JP_Global_SoundTable[$00].ID,x
	STA.l !REGISTER_APUPort0
	TXA
	CLC
	ADC.b #$04
	AND.b #$7F
	STA.w $02F7
CODE_839B4E:
	RTL

CODE_839B4F:
	TYA
	CLC
	ADC.b #$04
	AND.b #$7F
	STA.w $02F7
	RTL

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

CODE_839B59:
	PHX
	LDX.w !RAM_JP_Global_SoundTableIndexLo
	STA.w JP_Global_SoundTable[$00].ID,x
	TYA
	STA.w JP_Global_SoundTable[$00].XPosLo,x
	TXA
	CLC
	ADC.w #$0004
	AND.w #$007F
	STA.w !RAM_JP_Global_SoundTableIndexLo
	PLX
	RTL

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

; Note: Routine that sets the sound ID and position of sounds to play (exerior areas)

JP_Exterior_BufferSoundEffect:
.Main:
;$839B71
	PHX
CODE_839B72:
	LDX.w !RAM_JP_Global_SoundTableIndexLo
	SEP.b #$20
	STA.w JP_Global_SoundTable[$00].ID,x
	LDA.w $7E2091,y
	ASL
	ASL
	ASL
	ASL
	ORA.w $7E2865,y
	STA.w JP_Global_SoundTable[$00].PosHi,x
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.w JP_Global_SoundTable[$00].XPosLo,x
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.w JP_Global_SoundTable[$00].YPosLo,x
	REP.b #$20
	TXA
	CLC
	ADC.w #$0004
	AND.w #$007F
	STA.w !RAM_JP_Global_SoundTableIndexLo
	PLX
	RTL

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

CODE_839BA2:
	BIT.w $0397
	BMI.b CODE_839BAD
CODE_839BA7:
	STY.w $03C4
	STA.w $03C2
CODE_839BAD:
	RTL

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

CODE_839BAE:
	REP.b #$30
	BIT.w $0397
	BMI.b CODE_839BDF
	LDY.w $03C4
	BEQ.b CODE_839BDF
	STZ.w $03C4
	LDA.w $03C2
	AND.w #$007F
	ASL
	TAX
	LDA.l DATA_839A6E,x
	CMP.w $0401
	BEQ.b CODE_839BE0
	LDY.w $03FB
	BNE.b CODE_839BDF
	STA.w $03FD
	LDA.w $03C2
	STA.w $03FF
	STZ.w $0401
CODE_839BDF:
	RTL

CODE_839BE0:
	LDA.w $03C2
	BMI.b CODE_839BEC
	ORA.w #$0080
	PHX
	BRL.w CODE_839B72

CODE_839BEC:
	RTL

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

ADDR_839BED:
	PHP
	SEP.b #$20
	PHA
	LDA.b #$FF
	STA.w $02F9
	LDA.w $02F3
ADDR_839BF9:
	CMP.l !REGISTER_APUPort0
	BNE.b ADDR_839BF9
	INC
	AND.b #$8F
	STA.w $02F3
	LDA.w $7E2091,y
	ASL
	ASL
	ASL
	ASL
	ORA.w $7E2865,y
	STA.l !REGISTER_APUPort1
	LDA.w !RAM_JP_Exterior_Sprites_XPosLo,y
	STA.l !REGISTER_APUPort2
	LDA.w !RAM_JP_Exterior_Sprites_YPosLo,y
	STA.l !REGISTER_APUPort3
	PLA
	STA.l !REGISTER_APUPort0
	STZ.w $02F9
	PLP
	RTL

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

CODE_839C2B:
	SEP.b #$20
	JSR.w CODE_839CED
	RTL

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

CODE_839C31:
	SEP.b #$20
	JSR.w CODE_839CED
	LDA.b #$80
	STA.w $02F3
CODE_839C3B:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839C3B
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	RTL

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

CODE_839C4A:
	SEP.b #$20
	LDA.w $02F3
	STA.w $02F9
CODE_839C52:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839C52
	LDA.b #$0B
	STA.w $02F9
	STA.l !REGISTER_APUPort0
	JSR.w CODE_839CED
	SEP.b #$30
	LDA.b #$80
CODE_839C68:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839C68
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	REP.b #$30
	LDA.w $037B
	LDY.w #$0000
	JSL.l CODE_839D6A
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown01+($00<<8)
	LDY.w #$A0FF
	BRL.w CODE_839D6A

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

CODE_839C8D:
	REP.b #$30
	PHX
	PHY
	LDA.w #$0000
	STA.w $0409
	STA.w $040B
	STA.w $03F8
	STA.w $03FB
	STA.w $0401
	STA.w $03FD
	STA.w $03FF
	SEP.b #$20
	LDA.w $02F3
CODE_839CAE:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839CAE
	LDA.b #$0B
	STA.w $02F9
	STA.l !REGISTER_APUPort0
	REP.b #$30
	PLY
	PLX
	JSR.w CODE_839CED
	SEP.b #$20
	LDA.b #$80
CODE_839CC8:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839CC8
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	REP.b #$30
	LDA.w $037B
	LDY.w #$0000
	JSL.l CODE_839D6A
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown01+($01<<8)
	LDY.w #$A0FF
	BRL.w CODE_839D6A

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

CODE_839CED:
	STY.b $3E
	STX.b $3C
	JSR.w CODE_839CF7
	SEP.b #$20
	RTS

CODE_839CF7:
	PHP
	REP.b #$30
	LDY.w #$0000
	LDA.w #$BBAA
CODE_839D00:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839D00
	SEP.b #$20
	LDA.b #$CC
	BRA.b CODE_839D35

CODE_839D0C:
	LDA.b [$3C],y
	INY
	XBA
	LDA.b #$00
	BRA.b CODE_839D20

CODE_839D14:
	XBA
	LDA.b [$3C],y
	INY
	XBA
CODE_839D19:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839D19
	INC
CODE_839D20:
	REP.b #$20
	STA.l !REGISTER_APUPort0
	SEP.b #$20
	DEX
	BNE.b CODE_839D14
CODE_839D2B:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839D2B
CODE_839D31:
	ADC.b #$03
	BEQ.b CODE_839D31
CODE_839D35:
	PHA
	REP.b #$20
	LDA.b [$3C],y
	INY
	INY
	TAX
	LDA.b [$3C],y
	INY
	INY
	STA.l !REGISTER_APUPort2
	SEP.b #$20
	CPX.w #$0001
	LDA.b #$00
	ROL
	STA.l !REGISTER_APUPort1
	ADC.b #$7F
	PLA
	STA.l !REGISTER_APUPort0
CODE_839D58:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839D58
	BVS.b CODE_839D0C
	PLP
	RTS

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

CODE_839D62:
	REP.b #$30
	LDA.w #$4003
	LDY.w #$0000
CODE_839D6A:
	PHP
	PHA
	PHY
	SEP.b #$20
	LDA.b #$FF
	STA.w $02F9
	LDA.w $02F3
CODE_839D77:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839D77
	INC
	AND.b #$8F
	STA.w $02F3
	REP.b #$20
	PLA
	STA.l !REGISTER_APUPort2
	LDA.w !RAM_JP_Global_MusicSetting
	BNE.b CODE_839DA1
	PLA
	SEP.b #$20
	XBA
	STA.l !REGISTER_APUPort1
	XBA
	STA.l !REGISTER_APUPort0
	STZ.w $02F9
	PLP
	RTL

CODE_839DA1:
	PLA
	SEP.b #$20
	XBA
	STA.l !REGISTER_APUPort1
	XBA
	CMP.b #$01
	BNE.b CODE_839DB6
	PHA
	LDA.b #$00
	STA.l !REGISTER_APUPort1
	PLA
CODE_839DB6:
	STA.l !REGISTER_APUPort0
	STZ.w $02F9
	PLP
	RTL

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

CODE_839DBF:
	REP.b #$30
	STZ.w $03F8
	STZ.w $03FB
	STZ.w $03C4
	STZ.w $040B
	STZ.w $0401
	STZ.w $03FD
	STZ.w $03FF
	STZ.w !RAM_JP_Global_SoundTableIndexLo
	STZ.w $02F7
	LDA.w #$00FF
	STA.w $0407
	LDA.w #$0127
	STA.w $0409
	RTL

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

CODE_839DE9:
	REP.b #$30
	LDA.w !RAM_JP_Global_MusicSetting
	BEQ.b CODE_839DF1
	RTS

CODE_839DF1:
	LDA.w #$0000
	SEP.b #$20
	LDA.w $7E2C4B
	ASL
	ASL
	ASL
	ASL
	ORA.w $7E2477
	REP.b #$21
	TAX
	SEP.b #$20
	LDA.l DATA_839E42,x
	CMP.w $0407
	BEQ.b CODE_839E3B
	LDX.w $0409
	INX
	STX.w $0409
	CPX.w #$012C
	BCC.b CODE_839E3A
	LDX.w $03FB
	BNE.b CODE_839E3A
	STA.w $03FB
	STA.w $0407
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown14+($02<<8)
	LDY.w #$0000
	JSL.l CODE_839D6A
	LDA.w #$0064
	STA.w $040B
	STZ.w $0409
CODE_839E3A:
	RTS

CODE_839E3B:
	LDX.w #$0000
	STX.w $0409
	RTS

DATA_839E42:				; Note: This determines what music to play on the exterior map.
	db $02,$02,$02,$02,$02,$02,$02,$1A,$1A,$1A,$1A,$02,$02,$02,$02,$02
	db $02,$02,$02,$02,$02,$02,$02,$1A,$1A,$1A,$1A,$02,$02,$02,$12,$12
	db $02,$02,$02,$02,$02,$02,$02,$1A,$1A,$1A,$1A,$02,$12,$12,$12,$12
	db $02,$02,$02,$02,$02,$02,$02,$1A,$1A,$1A,$1A,$1A,$12,$12,$12,$12
	db $02,$02,$02,$02,$2A,$2A,$2A,$2A,$2A,$1A,$1A,$1A,$12,$02,$02,$02
	db $02,$02,$02,$02,$2A,$2A,$2A,$2A,$2A,$1A,$1A,$1A,$1A,$1A,$02,$02
	db $02,$02,$02,$02,$2A,$2A,$2A,$2A,$2A,$2A,$1A,$1A,$1A,$1A,$1A,$02
	db $02,$02,$02,$02,$2A,$2A,$2A,$2A,$2A,$2A,$1A,$1A,$1A,$1A,$1A,$22
	db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$1A,$1A,$1A,$1A,$22,$22
	db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$1A,$1A,$1A,$1A,$22,$22
	db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$1A,$1A,$1A,$22,$22
	db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$1A,$1A,$22,$22,$22
	db $02,$02,$02,$02,$02,$02,$02,$2A,$2A,$2A,$2A,$1A,$1A,$22,$22,$22
	db $12,$12,$12,$12,$1A,$1A,$1A,$2A,$2A,$2A,$2A,$2A,$2A,$02,$02,$02
	db $12,$12,$12,$12,$1A,$1A,$1A,$2A,$2A,$2A,$2A,$2A,$2A,$02,$02,$02
	db $12,$12,$12,$12,$1A,$1A,$1A,$2A,$2A,$2A,$2A,$2A,$2A,$02,$02,$02

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

CODE_839F42:						; Note: Seems to be the routine for uploading music during gameplay.
	JSR.w CODE_839DE9
	SEP.b #$30
	LDA.w $0E0B
	BEQ.b CODE_839F50
	LDA.b $0B
	BEQ.b CODE_839F6D
CODE_839F50:
	REP.b #$30
	LDY.w $03F8
	BEQ.b CODE_839F65
	PHB
	SEP.b #$20
	LDA.w $03FA
	PHA
	PLB
	STA.w $02F9
	BRL.w CODE_839FE5

CODE_839F65:
	LDA.w $040B
	BEQ.b CODE_839F6E
	DEC.w $040B
CODE_839F6D:
	RTL

CODE_839F6E:
	LDX.w $03FB
	BNE.b CODE_839F8C
	LDA.w $040F
	BNE.b CODE_839F80
	INC.w $040F
	LDA.w #$0032
	BRA.b CODE_839F88

CODE_839F80:
	LDA.w $03FD
	BEQ.b CODE_839F6D
	STZ.w $0401
CODE_839F88:
	STA.w $03FB
	TAX
CODE_839F8C:
	PHB
	SEP.b #$20
	LDA.l DATA_83A0B2,x
	STA.w $0405
	STA.w $02F9
	LDA.l DATA_83A0B2+$01,x
	STA.w $03FA
	PHA
	PLB
	REP.b #$20
	LDA.l DATA_83A0B2+$02,x
	TAY
	CLC
	ADC.w $0000,y
	ADC.w #$0004
	STA.b $F1
	INY
	INY
	SEP.b #$20
	LDA.l $7E02F3
CODE_839FBA:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839FBA
	INC
	AND.b #$8F
	STA.l $7E02F3
	LDA.w $0000,y
	STA.l !REGISTER_APUPort1
	INY
	LDA.w $0000,y
	STA.l !REGISTER_APUPort2
	INY
	LDA.l $7E0405
	STA.l !REGISTER_APUPort3
	LDA.b #$0F
	STA.l !REGISTER_APUPort0
CODE_839FE5:
	LDX.w $0405
CODE_839FE8:
	LDA.l $7E02F3
CODE_839FEC:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_839FEC
	INC
	AND.b #$8F
	STA.l $7E02F3
	LDA.w $0000,y
	STA.l !REGISTER_APUPort1
	INY
	LDA.w $0000,y
	STA.l !REGISTER_APUPort2
	INY
	LDA.w $0000,y
	STA.l !REGISTER_APUPort3
	INY
	LDA.b #$10
	STA.l !REGISTER_APUPort0
	CPY.b $F1
	BCS.b CODE_83A02E
	DEX
	BNE.b CODE_839FE8
	REP.b #$30
	LDA.w #$0000
	STA.l $7E02F9
	TYA
	STA.l $7E03F8
	PLB
	RTL

CODE_83A02E:
	LDA.l $7E02F3
CODE_83A032:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_83A032
	INC
	AND.b #$8F
	STA.l $7E02F3
	LDA.b #$11
	STA.l !REGISTER_APUPort0
	REP.b #$30
	LDA.l $7E03FB
	TAX
	CMP.w #$003A
	BCS.b CODE_83A07A
	LDA.l DATA_83A0B2+$06,x
	TAY
	LDA.l $7E0B1D
	BEQ.b CODE_83A05F
	LDY.w #$A030
CODE_83A05F:
	LDA.l DATA_83A0B2+$04,x
	BMI.b CODE_83A069
	JSL.l CODE_839D6A
CODE_83A069:
	LDA.w #$0000
	STA.l $7E03FB
	STA.l $7E03F8
	STA.l $7E02F9
	PLB
	RTL

CODE_83A07A:
	STA.l $7E0401
	LDA.l DATA_83A0B2+$04,x
	CMP.w #$FFFF
	BEQ.b CODE_83A09B
	LDY.w #$F00A
	SEP.b #$20
	LDA.l $7E03FF
	BMI.b CODE_83A09B
	XBA
	LDA.b #$18
	REP.b #$20
	JSL.l CODE_839D6A
CODE_83A09B:
	REP.b #$20
	LDA.w #$0000
	STA.l $7E03FD
	STA.l $7E03FB
	STA.l $7E03F8
	STA.l $7E02F9
	PLB
	RTL

DATA_83A0B2:
	%FREE_BYTES($83A0B2, 2, $00)
	db $55 : db DATA_B78000>>16 : dw DATA_B78000,$0101,$B0FF
	db $55 : db DATA_B68000>>16 : dw DATA_B68000,$0101,$A0FF
	db $55 : db DATA_B48000>>16 : dw DATA_B48000,$0101,$A0FF
	db $55 : db DATA_B88000>>16 : dw DATA_B88000,$0101,$A0FF
	db $55 : db DATA_B98000>>16 : dw DATA_B98000,$0101,$A0FF
	db $55 : db DATA_BA8000>>16 : dw DATA_BA8000,$0101,$A0FF
	db $34 : db DATA_B4D212>>16 : dw DATA_B4D212,!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_WelcomeToJurassicPark&$7F)<<8),$FF0A
	db $34 : db DATA_B9CACE>>16 : dw DATA_B9CACE,$FFFF
	db $34 : db DATA_838000>>16 : dw DATA_838000,$0000
	db $34 : db DATA_B8F660>>16 : dw DATA_B8F660,$0000
	db $34 : db DATA_BDE792>>16 : dw DATA_BDE792,$0000
	db $34 : db DATA_BFF19D>>16 : dw DATA_BFF19D,$0000
	db $34 : db DATA_B9E92C>>16 : dw DATA_B9E92C,$0000
	db $34 : db DATA_B9F206>>16 : dw DATA_B9F206,$0000
	db $34 : db DATA_B5D7B6>>16 : dw DATA_B5D7B6,$FFFF
	db $34 : db DATA_BEE361>>16 : dw DATA_BEE361,$0000
	db $34 : db DATA_B5DFD3>>16 : dw DATA_B5DFD3,$0000

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

CODE_83A128:
	LDA.w $0E0D
	BNE.b CODE_83A165
CODE_83A12D:
	LDA.w !RAM_JP_Exterior_Player_XPosLo
	SEC
	SBC.w #$0070
	BPL.b CODE_83A13B
	STZ.w $0AFB
	BRA.b CODE_83A146

CODE_83A13B:
	CMP.w #$0F08
	BCC.b CODE_83A143
	LDA.w #$0F08
CODE_83A143:
	STA.w $0AFB
CODE_83A146:
	LDA.w !RAM_JP_Exterior_Player_YPosLo
	SEC
	SBC.w #$0058
	BPL.b CODE_83A153
	STZ.w $0AFD
	RTL

CODE_83A153:
	CMP.w #$0F20
	BCC.b CODE_83A15B
	LDA.w #$0F20
CODE_83A15B:
	SEC
	SBC.w $03CA
	STA.w $0AFD
	STZ.w $03CA
CODE_83A165:
	RTL

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

CODE_83A166:
	REP.b #$30
	JSL.l CODE_83A12D
	STZ.w $06D9
	STZ.w $06DB
	STZ.w $06DD
	STZ.w $06DF
	LDA.w $0AFB
	STA.w $0B37
	STA.w $0B3B
	STA.w $0AFF
	LSR
	LSR
	LSR
	STA.w $0B03
	STA.w $0B07
	LDA.w $0AFD
	STA.w $0B39
	STA.w $0B3D
	STA.w $0B01
	LSR
	LSR
	LSR
	STA.w $0B05
	STA.w $0B09
	LDY.w #$001F
CODE_83A1A2:
	PHY
	JSR.w CODE_83A2A2
	JSL.l CODE_819EF1
	JSL.l CODE_83C501
	REP.b #$30
	INC.w $0B07
	PLY
	DEY
	BPL.b CODE_83A1A2
	RTL

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

CODE_83A1BB:
	REP.b #$30
	JSL.l CODE_83A128
	JSR.w CODE_83A1C8
	JSR.w CODE_83A21D
	RTL

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

CODE_83A1C8:
	LDA.w $0AFB
	CMP.w $0AFF
	BEQ.b CODE_83A1E0
	BMI.b CODE_83A1DA
	LDA.w #$0001
	STA.w $0B0D
	BRA.b CODE_83A1E0

CODE_83A1DA:
	LDA.w #$0002
	STA.w $0B0D
CODE_83A1E0:
	LDA.w $0AFB
	STA.w $0B37
	STA.w $0B3B
	STA.w $0AFF
	LSR
	LSR
	LSR
	STA.w $0B03
	LDA.w $0AFD
	CMP.w $0B01
	BEQ.b CODE_83A20A
	BMI.b CODE_83A204
	LDA.w #$0002
	STA.w $0B0B
	BRA.b CODE_83A20A

CODE_83A204:
	LDA.w #$0001
	STA.w $0B0B
CODE_83A20A:
	LDA.w $0AFD
	STA.w $0B39
	STA.w $0B3D
	STA.w $0B01
	LSR
	LSR
	LSR
	STA.w $0B05
	RTS

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

CODE_83A21D:
	LDA.w $049D
	AND.w #$0001
	BEQ.b CODE_83A23A
	LDA.w $0B0D
	BEQ.b CODE_83A22F
	DEC
	BEQ.b CODE_83A24F
	BRA.b CODE_83A261

CODE_83A22F:
	LDA.w $0B0B
	BEQ.b CODE_83A239
	DEC
	BEQ.b CODE_83A282
	BRA.b CODE_83A26F

CODE_83A239:
	RTS

CODE_83A23A:
	LDA.w $0B0B
	BEQ.b CODE_83A244
	DEC
	BEQ.b CODE_83A282
	BRA.b CODE_83A26F

CODE_83A244:
	LDA.w $0B0D
	BEQ.b CODE_83A24E
	DEC
	BEQ.b CODE_83A24F
	BRA.b CODE_83A261

CODE_83A24E:
	RTS

CODE_83A24F:
	LDA.w $0B05
	STA.w $0B09
	LDA.w $0B03
	CLC
	ADC.w #$001F
	STA.w $0B07
	BRA.b CODE_83A291

CODE_83A261:
	LDA.w $0B05
	STA.w $0B09
	LDA.w $0B03
	STA.w $0B07
	BRA.b CODE_83A291

CODE_83A26F:
	LDA.w $0B05
	CLC
	ADC.w #$001F
	STA.w $0B09
	LDA.w $0B03
	STA.w $0B07
	BRL.w CODE_83B460

CODE_83A282:
	LDA.w $0B05
	STA.w $0B09
	LDA.w $0B03
	STA.w $0B07
	BRL.w CODE_83B460

CODE_83A291:
	LDA.w $0B07
	CMP.w $06D9
	BNE.b CODE_83A2A2
	LDA.w $0B09
	CMP.w $06DB
	BNE.b CODE_83A2A2
	RTS

CODE_83A2A2:
	STZ.b $16
	LDA.w $0B09
	STA.w $06DB
	AND.w #$FFFE
	TAX
	LDA.l DATA_83D197,x
	STA.b $17
	LDA.w $0B07
	STA.w $06D9
	AND.w #$FFFE
	CLC
	ADC.b $16
	STA.b $16
	LDA.w $0B09
	AND.w #$001F
	ASL
	ASL
	ASL
	ASL
	ASL
	EOR.w $0B07
	AND.w #$FFE0
	EOR.w $0B07
	ORA.w #$4000
	STA.b $1E
	AND.w #$0001
	ASL
	STA.b $22
	LDA.w $0B09
	LSR
	BCC.b CODE_83A2EA
	BRL.w CODE_83AB98

CODE_83A2EA:
	LDA.b $1E
	%UnknownMacro00($800B65+$00, $800C25+$00, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$00, $800C25+$00, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$04, $800C25+$04, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$04, $800C25+$04, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$08, $800C25+$08, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$08, $800C25+$08, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$0C, $800C25+$0C, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$0C, $800C25+$0C, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$10, $800C25+$10, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$10, $800C25+$10, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$14, $800C25+$14, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$14, $800C25+$14, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$18, $800C25+$18, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$18, $800C25+$18, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$1C, $800C25+$1C, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$1C, $800C25+$1C, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$20, $800C25+$20, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$20, $800C25+$20, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$24, $800C25+$24, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$24, $800C25+$24, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$28, $800C25+$28, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$28, $800C25+$28, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$2C, $800C25+$2C, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$2C, $800C25+$2C, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$30, $800C25+$30, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$30, $800C25+$30, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$34, $800C25+$34, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$34, $800C25+$34, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$38, $800C25+$38, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$38, $800C25+$38, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$3C, $800C25+$3C, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$3C, $800C25+$3C, DATA_8C8000+$04)
	STZ.w $0B0D
	INC.b $14
	RTS

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

CODE_83AB98:
	LDA.b $1E
	%UnknownMacro00($800B65+$00, $800C25+$00, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$02, $800C25+$02, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$02, $800C25+$02, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$06, $800C25+$06, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$06, $800C25+$06, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$0A, $800C25+$0A, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$0A, $800C25+$0A, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$0E, $800C25+$0E, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$0E, $800C25+$0E, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$12, $800C25+$12, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$12, $800C25+$12, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$16, $800C25+$16, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$16, $800C25+$16, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$1A, $800C25+$1A, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$1A, $800C25+$1A, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$1E, $800C25+$1E, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$1E, $800C25+$1E, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$22, $800C25+$22, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$22, $800C25+$22, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$26, $800C25+$26, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$26, $800C25+$26, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$2A, $800C25+$2A, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$2A, $800C25+$2A, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$2E, $800C25+$2E, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$2E, $800C25+$2E, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$32, $800C25+$32, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$32, $800C25+$32, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$36, $800C25+$36, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$36, $800C25+$36, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$3A, $800C25+$3A, DATA_8C8000) : %UnknownMacro02() : %UnknownMacro01($800B65+$3A, $800C25+$3A, DATA_8C8000+$04) : %UnknownMacro03() : %UnknownMacro02()
	%UnknownMacro00($800B65+$3E, $800C25+$3E, DATA_8C8000)
	STZ.w $0B0D
	INC.b $14
	RTS

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

CODE_83B460:
	LDA.w $0B07
	CMP.w $06DD
	BNE.b CODE_83B471
	LDA.w $0B09
	CMP.w $06DF
	BNE.b CODE_83B471
	RTS

CODE_83B471:
	STZ.b $16
	LDA.w $0B09
	STA.w $06DF
	AND.w #$FFFE
	TAX
	LDA.l DATA_83D197,x
	STA.b $17
	LDA.w $0B07
	STA.w $06DD
	AND.w #$FFFE
	CLC
	ADC.b $16
	STA.b $16
	LDA.w $0B09
	AND.w #$0001
	ASL
	ASL
	STA.b $22
	LDA.w $0B09
	AND.w #$001F
	ASL
	ASL
	ASL
	ASL
	ASL
	EOR.w $0B07
	AND.w #$FFE0
	EOR.w $0B07
	ORA.w #$4000
	STA.b $1E
	AND.w #$FFE0
	STA.b $20
	LDA.w $0B07
	LSR
	BCC.b CODE_83B4C2
	BRL.w CODE_83BCDA

CODE_83B4C2:
	LDA.b $1E
	%UnknownMacro00($800CA5+$00, $800D65+$00, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$00, $800D65+$00, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$04, $800D65+$04, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$04, $800D65+$04, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$08, $800D65+$08, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$08, $800D65+$08, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$0C, $800D65+$0C, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$0C, $800D65+$0C, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$10, $800D65+$10, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$10, $800D65+$10, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$14, $800D65+$14, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$14, $800D65+$14, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$18, $800D65+$18, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$18, $800D65+$18, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$1C, $800D65+$1C, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$1C, $800D65+$1C, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$20, $800D65+$20, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$20, $800D65+$20, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$24, $800D65+$24, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$24, $800D65+$24, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$28, $800D65+$28, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$28, $800D65+$28, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$2C, $800D65+$2C, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$2C, $800D65+$2C, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$30, $800D65+$30, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$30, $800D65+$30, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$34, $800D65+$34, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$34, $800D65+$34, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$38, $800D65+$38, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$38, $800D65+$38, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$3C, $800D65+$3C, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$3C, $800D65+$3C, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	STZ.w $0B0B
	INC.b $12
	RTS

CODE_83BCDA:
	LDA.b $1E
	%UnknownMacro00($800CA5+$00, $800D65+$00, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$02, $800D65+$02, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$02, $800D65+$02, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$06, $800D65+$06, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$06, $800D65+$06, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$0A, $800D65+$0A, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$0A, $800D65+$0A, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$0E, $800D65+$0E, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$0E, $800D65+$0E, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$12, $800D65+$12, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$12, $800D65+$12, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$16, $800D65+$16, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$16, $800D65+$16, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$1A, $800D65+$1A, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$1A, $800D65+$1A, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$1E, $800D65+$1E, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$1E, $800D65+$1E, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$22, $800D65+$22, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$22, $800D65+$22, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$26, $800D65+$26, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$26, $800D65+$26, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$2A, $800D65+$2A, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$2A, $800D65+$2A, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$2E, $800D65+$2E, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$2E, $800D65+$2E, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$32, $800D65+$32, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$32, $800D65+$32, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$36, $800D65+$36, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$36, $800D65+$36, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$3A, $800D65+$3A, DATA_8C8000) : %UnknownMacro04() : %UnknownMacro01($800CA5+$3A, $800D65+$3A, DATA_8C8000+$02) : %UnknownMacro05() : %UnknownMacro04()
	%UnknownMacro00($800CA5+$3E, $800D65+$3E, DATA_8C8000)
	STZ.w $0B0B
	INC.b $12
	RTS

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

CODE_83C4F3:
	SEP.b #$30
	LDA.b $14
	BNE.b CODE_83C501
	LDA.b $12
	BEQ.b CODE_83C500
	BRL.w CODE_83CB4C

CODE_83C500:
	RTL

CODE_83C501:
	SEP.b #$30
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDY.b #$20
	REP.b #$20
	LDA.w $0B65
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BA5
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BE5
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C25
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C65
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B67
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BA7
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BE7
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C27
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C67
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B69
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BA9
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BE9
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C29
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C69
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B6B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BAB
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BEB
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C2B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C6B
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B6D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BAD
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BED
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C2D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C6D
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B6F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BAF
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BEF
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C2F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C6F
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B71
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BB1
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BF1
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C31
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C71
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B73
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BB3
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BF3
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C33
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C73
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B75
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BB5
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BF5
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C35
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C75
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B77
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BB7
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BF7
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C37
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C77
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B79
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BB9
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BF9
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C39
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C79
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B7B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BBB
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BFB
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C3B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C7B
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B7D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BBD
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BFD
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C3D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C7D
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B7F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BBF
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0BFF
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C3F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C7F
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B81
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BC1
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C01
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C41
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C81
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B83
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BC3
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C03
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C43
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C83
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B85
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BC5
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C05
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C45
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C85
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B87
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BC7
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C07
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C47
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C87
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B89
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BC9
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C09
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C49
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C89
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B8B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BCB
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C0B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C4B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C8B
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B8D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BCD
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C0D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C4D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C8D
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B8F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BCF
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C0F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C4F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C8F
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B91
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BD1
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C11
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C51
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C91
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B93
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BD3
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C13
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C53
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C93
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B95
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BD5
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C15
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C55
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C95
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B97
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BD7
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C17
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C57
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C97
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B99
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BD9
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C19
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C59
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C99
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B9B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BDB
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C1B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C5B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C9B
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B9D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BDD
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C1D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C5D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C9D
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0B9F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BDF
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C1F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C5F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0C9F
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0BA1
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BE1
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C21
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C61
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0CA1
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0BA3
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0BE3
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0C23
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0C63
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0CA3
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

CODE_83CB4C:
	SEP.b #$30
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDY.b #$20
	REP.b #$20
	LDA.w $0CA5
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CE5
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D25
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D65
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DA5
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CA7
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CE7
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D27
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D67
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DA7
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CA9
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CE9
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D29
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D69
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DA9
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CAB
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CEB
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D2B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D6B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DAB
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CAD
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CED
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D2D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D6D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DAD
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CAF
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CEF
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D2F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D6F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DAF
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CB1
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CF1
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D31
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D71
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DB1
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CB3
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CF3
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D33
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D73
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DB3
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CB5
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CF5
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D35
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D75
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DB5
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CB7
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CF7
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D37
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D77
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DB7
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CB9
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CF9
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D39
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D79
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DB9
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CBB
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CFB
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D3B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D7B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DBB
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CBD
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CFD
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D3D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D7D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DBD
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CBF
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0CFF
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D3F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D7F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DBF
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CC1
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D01
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D41
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D81
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DC1
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CC3
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D03
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D43
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D83
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DC3
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CC5
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D05
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D45
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D85
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DC5
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CC7
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D07
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D47
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D87
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DC7
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CC9
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D09
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D49
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D89
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DC9
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CCB
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D0B
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D4B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D8B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DCB
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CCD
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D0D
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D4D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D8D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DCD
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CCF
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D0F
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D4F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D8F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DCF
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CD1
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D11
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D51
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D91
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DD1
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CD3
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D13
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D53
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D93
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DD3
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CD5
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D15
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D55
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D95
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DD5
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CD7
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D17
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D57
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D97
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DD7
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CD9
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D19
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D59
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D99
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DD9
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CDB
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D1B
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D5B
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D9B
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DDB
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CDD
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D1D
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D5D
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D9D
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DDD
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CDF
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D1F
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D5F
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D9F
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DDF
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CE1
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D21
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D61
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0DA1
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DE1
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	REP.b #$20
	LDA.w $0CE3
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0D23
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.w $0D63
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.w $0DA3
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	TYA
	STA.l DMA[$01].SizeLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.w $0DE3
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

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

DATA_83D197:
	dw (JP_Tilemap_ExteriorAreaMap+$000000)>>8,(JP_Tilemap_ExteriorAreaMap+$000200)>>8,(JP_Tilemap_ExteriorAreaMap+$000400)>>8,(JP_Tilemap_ExteriorAreaMap+$000600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$000800)>>8,(JP_Tilemap_ExteriorAreaMap+$000A00)>>8,(JP_Tilemap_ExteriorAreaMap+$000C00)>>8,(JP_Tilemap_ExteriorAreaMap+$000E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$001000)>>8,(JP_Tilemap_ExteriorAreaMap+$001200)>>8,(JP_Tilemap_ExteriorAreaMap+$001400)>>8,(JP_Tilemap_ExteriorAreaMap+$001600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$001800)>>8,(JP_Tilemap_ExteriorAreaMap+$001A00)>>8,(JP_Tilemap_ExteriorAreaMap+$001C00)>>8,(JP_Tilemap_ExteriorAreaMap+$001E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$002000)>>8,(JP_Tilemap_ExteriorAreaMap+$002200)>>8,(JP_Tilemap_ExteriorAreaMap+$002400)>>8,(JP_Tilemap_ExteriorAreaMap+$002600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$002800)>>8,(JP_Tilemap_ExteriorAreaMap+$002A00)>>8,(JP_Tilemap_ExteriorAreaMap+$002C00)>>8,(JP_Tilemap_ExteriorAreaMap+$002E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$003000)>>8,(JP_Tilemap_ExteriorAreaMap+$003200)>>8,(JP_Tilemap_ExteriorAreaMap+$003400)>>8,(JP_Tilemap_ExteriorAreaMap+$003600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$003800)>>8,(JP_Tilemap_ExteriorAreaMap+$003A00)>>8,(JP_Tilemap_ExteriorAreaMap+$003C00)>>8,(JP_Tilemap_ExteriorAreaMap+$003E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$004000)>>8,(JP_Tilemap_ExteriorAreaMap+$004200)>>8,(JP_Tilemap_ExteriorAreaMap+$004400)>>8,(JP_Tilemap_ExteriorAreaMap+$004600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$004800)>>8,(JP_Tilemap_ExteriorAreaMap+$004A00)>>8,(JP_Tilemap_ExteriorAreaMap+$004C00)>>8,(JP_Tilemap_ExteriorAreaMap+$004E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$005000)>>8,(JP_Tilemap_ExteriorAreaMap+$005200)>>8,(JP_Tilemap_ExteriorAreaMap+$005400)>>8,(JP_Tilemap_ExteriorAreaMap+$005600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$005800)>>8,(JP_Tilemap_ExteriorAreaMap+$005A00)>>8,(JP_Tilemap_ExteriorAreaMap+$005C00)>>8,(JP_Tilemap_ExteriorAreaMap+$005E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$006000)>>8,(JP_Tilemap_ExteriorAreaMap+$006200)>>8,(JP_Tilemap_ExteriorAreaMap+$006400)>>8,(JP_Tilemap_ExteriorAreaMap+$006600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$006800)>>8,(JP_Tilemap_ExteriorAreaMap+$006A00)>>8,(JP_Tilemap_ExteriorAreaMap+$006C00)>>8,(JP_Tilemap_ExteriorAreaMap+$006E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$007000)>>8,(JP_Tilemap_ExteriorAreaMap+$007200)>>8,(JP_Tilemap_ExteriorAreaMap+$007400)>>8,(JP_Tilemap_ExteriorAreaMap+$007600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$007800)>>8,(JP_Tilemap_ExteriorAreaMap+$007A00)>>8,(JP_Tilemap_ExteriorAreaMap+$007C00)>>8,(JP_Tilemap_ExteriorAreaMap+$007E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$010000)>>8,(JP_Tilemap_ExteriorAreaMap+$010200)>>8,(JP_Tilemap_ExteriorAreaMap+$010400)>>8,(JP_Tilemap_ExteriorAreaMap+$010600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$010800)>>8,(JP_Tilemap_ExteriorAreaMap+$010A00)>>8,(JP_Tilemap_ExteriorAreaMap+$010C00)>>8,(JP_Tilemap_ExteriorAreaMap+$010E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$011000)>>8,(JP_Tilemap_ExteriorAreaMap+$011200)>>8,(JP_Tilemap_ExteriorAreaMap+$011400)>>8,(JP_Tilemap_ExteriorAreaMap+$011600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$011800)>>8,(JP_Tilemap_ExteriorAreaMap+$011A00)>>8,(JP_Tilemap_ExteriorAreaMap+$011C00)>>8,(JP_Tilemap_ExteriorAreaMap+$011E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$012000)>>8,(JP_Tilemap_ExteriorAreaMap+$012200)>>8,(JP_Tilemap_ExteriorAreaMap+$012400)>>8,(JP_Tilemap_ExteriorAreaMap+$012600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$012800)>>8,(JP_Tilemap_ExteriorAreaMap+$012A00)>>8,(JP_Tilemap_ExteriorAreaMap+$012C00)>>8,(JP_Tilemap_ExteriorAreaMap+$012E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$013000)>>8,(JP_Tilemap_ExteriorAreaMap+$013200)>>8,(JP_Tilemap_ExteriorAreaMap+$013400)>>8,(JP_Tilemap_ExteriorAreaMap+$013600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$013800)>>8,(JP_Tilemap_ExteriorAreaMap+$013A00)>>8,(JP_Tilemap_ExteriorAreaMap+$013C00)>>8,(JP_Tilemap_ExteriorAreaMap+$013E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$014000)>>8,(JP_Tilemap_ExteriorAreaMap+$014200)>>8,(JP_Tilemap_ExteriorAreaMap+$014400)>>8,(JP_Tilemap_ExteriorAreaMap+$014600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$014800)>>8,(JP_Tilemap_ExteriorAreaMap+$014A00)>>8,(JP_Tilemap_ExteriorAreaMap+$014C00)>>8,(JP_Tilemap_ExteriorAreaMap+$014E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$015000)>>8,(JP_Tilemap_ExteriorAreaMap+$015200)>>8,(JP_Tilemap_ExteriorAreaMap+$015400)>>8,(JP_Tilemap_ExteriorAreaMap+$015600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$015800)>>8,(JP_Tilemap_ExteriorAreaMap+$015A00)>>8,(JP_Tilemap_ExteriorAreaMap+$015C00)>>8,(JP_Tilemap_ExteriorAreaMap+$015E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$016000)>>8,(JP_Tilemap_ExteriorAreaMap+$016200)>>8,(JP_Tilemap_ExteriorAreaMap+$016400)>>8,(JP_Tilemap_ExteriorAreaMap+$016600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$016800)>>8,(JP_Tilemap_ExteriorAreaMap+$016A00)>>8,(JP_Tilemap_ExteriorAreaMap+$016C00)>>8,(JP_Tilemap_ExteriorAreaMap+$016E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$017000)>>8,(JP_Tilemap_ExteriorAreaMap+$017200)>>8,(JP_Tilemap_ExteriorAreaMap+$017400)>>8,(JP_Tilemap_ExteriorAreaMap+$017600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$017800)>>8,(JP_Tilemap_ExteriorAreaMap+$017A00)>>8,(JP_Tilemap_ExteriorAreaMap+$017C00)>>8,(JP_Tilemap_ExteriorAreaMap+$017E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$020000)>>8,(JP_Tilemap_ExteriorAreaMap+$020200)>>8,(JP_Tilemap_ExteriorAreaMap+$020400)>>8,(JP_Tilemap_ExteriorAreaMap+$020600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$020800)>>8,(JP_Tilemap_ExteriorAreaMap+$020A00)>>8,(JP_Tilemap_ExteriorAreaMap+$020C00)>>8,(JP_Tilemap_ExteriorAreaMap+$020E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$021000)>>8,(JP_Tilemap_ExteriorAreaMap+$021200)>>8,(JP_Tilemap_ExteriorAreaMap+$021400)>>8,(JP_Tilemap_ExteriorAreaMap+$021600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$021800)>>8,(JP_Tilemap_ExteriorAreaMap+$021A00)>>8,(JP_Tilemap_ExteriorAreaMap+$021C00)>>8,(JP_Tilemap_ExteriorAreaMap+$021E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$022000)>>8,(JP_Tilemap_ExteriorAreaMap+$022200)>>8,(JP_Tilemap_ExteriorAreaMap+$022400)>>8,(JP_Tilemap_ExteriorAreaMap+$022600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$022800)>>8,(JP_Tilemap_ExteriorAreaMap+$022A00)>>8,(JP_Tilemap_ExteriorAreaMap+$022C00)>>8,(JP_Tilemap_ExteriorAreaMap+$022E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$023000)>>8,(JP_Tilemap_ExteriorAreaMap+$023200)>>8,(JP_Tilemap_ExteriorAreaMap+$023400)>>8,(JP_Tilemap_ExteriorAreaMap+$023600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$023800)>>8,(JP_Tilemap_ExteriorAreaMap+$023A00)>>8,(JP_Tilemap_ExteriorAreaMap+$023C00)>>8,(JP_Tilemap_ExteriorAreaMap+$023E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$024000)>>8,(JP_Tilemap_ExteriorAreaMap+$024200)>>8,(JP_Tilemap_ExteriorAreaMap+$024400)>>8,(JP_Tilemap_ExteriorAreaMap+$024600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$024800)>>8,(JP_Tilemap_ExteriorAreaMap+$024A00)>>8,(JP_Tilemap_ExteriorAreaMap+$024C00)>>8,(JP_Tilemap_ExteriorAreaMap+$024E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$025000)>>8,(JP_Tilemap_ExteriorAreaMap+$025200)>>8,(JP_Tilemap_ExteriorAreaMap+$025400)>>8,(JP_Tilemap_ExteriorAreaMap+$025600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$025800)>>8,(JP_Tilemap_ExteriorAreaMap+$025A00)>>8,(JP_Tilemap_ExteriorAreaMap+$025C00)>>8,(JP_Tilemap_ExteriorAreaMap+$025E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$026000)>>8,(JP_Tilemap_ExteriorAreaMap+$026200)>>8,(JP_Tilemap_ExteriorAreaMap+$026400)>>8,(JP_Tilemap_ExteriorAreaMap+$026600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$026800)>>8,(JP_Tilemap_ExteriorAreaMap+$026A00)>>8,(JP_Tilemap_ExteriorAreaMap+$026C00)>>8,(JP_Tilemap_ExteriorAreaMap+$026E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$027000)>>8,(JP_Tilemap_ExteriorAreaMap+$027200)>>8,(JP_Tilemap_ExteriorAreaMap+$027400)>>8,(JP_Tilemap_ExteriorAreaMap+$027600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$027800)>>8,(JP_Tilemap_ExteriorAreaMap+$027A00)>>8,(JP_Tilemap_ExteriorAreaMap+$027C00)>>8,(JP_Tilemap_ExteriorAreaMap+$027E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$030000)>>8,(JP_Tilemap_ExteriorAreaMap+$030200)>>8,(JP_Tilemap_ExteriorAreaMap+$030400)>>8,(JP_Tilemap_ExteriorAreaMap+$030600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$030800)>>8,(JP_Tilemap_ExteriorAreaMap+$030A00)>>8,(JP_Tilemap_ExteriorAreaMap+$030C00)>>8,(JP_Tilemap_ExteriorAreaMap+$030E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$031000)>>8,(JP_Tilemap_ExteriorAreaMap+$031200)>>8,(JP_Tilemap_ExteriorAreaMap+$031400)>>8,(JP_Tilemap_ExteriorAreaMap+$031600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$031800)>>8,(JP_Tilemap_ExteriorAreaMap+$031A00)>>8,(JP_Tilemap_ExteriorAreaMap+$031C00)>>8,(JP_Tilemap_ExteriorAreaMap+$031E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$032000)>>8,(JP_Tilemap_ExteriorAreaMap+$032200)>>8,(JP_Tilemap_ExteriorAreaMap+$032400)>>8,(JP_Tilemap_ExteriorAreaMap+$032600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$032800)>>8,(JP_Tilemap_ExteriorAreaMap+$032A00)>>8,(JP_Tilemap_ExteriorAreaMap+$032C00)>>8,(JP_Tilemap_ExteriorAreaMap+$032E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$033000)>>8,(JP_Tilemap_ExteriorAreaMap+$033200)>>8,(JP_Tilemap_ExteriorAreaMap+$033400)>>8,(JP_Tilemap_ExteriorAreaMap+$033600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$033800)>>8,(JP_Tilemap_ExteriorAreaMap+$033A00)>>8,(JP_Tilemap_ExteriorAreaMap+$033C00)>>8,(JP_Tilemap_ExteriorAreaMap+$033E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$034000)>>8,(JP_Tilemap_ExteriorAreaMap+$034200)>>8,(JP_Tilemap_ExteriorAreaMap+$034400)>>8,(JP_Tilemap_ExteriorAreaMap+$034600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$034800)>>8,(JP_Tilemap_ExteriorAreaMap+$034A00)>>8,(JP_Tilemap_ExteriorAreaMap+$034C00)>>8,(JP_Tilemap_ExteriorAreaMap+$034E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$035000)>>8,(JP_Tilemap_ExteriorAreaMap+$035200)>>8,(JP_Tilemap_ExteriorAreaMap+$035400)>>8,(JP_Tilemap_ExteriorAreaMap+$035600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$035800)>>8,(JP_Tilemap_ExteriorAreaMap+$035A00)>>8,(JP_Tilemap_ExteriorAreaMap+$035C00)>>8,(JP_Tilemap_ExteriorAreaMap+$035E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$036000)>>8,(JP_Tilemap_ExteriorAreaMap+$036200)>>8,(JP_Tilemap_ExteriorAreaMap+$036400)>>8,(JP_Tilemap_ExteriorAreaMap+$036600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$036800)>>8,(JP_Tilemap_ExteriorAreaMap+$036A00)>>8,(JP_Tilemap_ExteriorAreaMap+$036C00)>>8,(JP_Tilemap_ExteriorAreaMap+$036E00)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$037000)>>8,(JP_Tilemap_ExteriorAreaMap+$037200)>>8,(JP_Tilemap_ExteriorAreaMap+$037400)>>8,(JP_Tilemap_ExteriorAreaMap+$037600)>>8
	dw (JP_Tilemap_ExteriorAreaMap+$037800)>>8,(JP_Tilemap_ExteriorAreaMap+$037A00)>>8,(JP_Tilemap_ExteriorAreaMap+$037C00)>>8,(JP_Tilemap_ExteriorAreaMap+$037E00)>>8

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

CODE_83D397:
	REP.b #$30
	LDA.w !RAM_JP_Global_Player_PickedUpEggFlagLo
	BNE.b CODE_83D39F
CODE_83D39E:
	RTL

CODE_83D39F:
	LDA.w $06C5
	BNE.b CODE_83D39E
	LDA.w #$013A
	STA.w $06C5
	LDX.w #JP_Tilemap_Layer3_DinoEggMessageBox
	LDA.w #JP_Tilemap_Layer3_DinoEggMessageBox>>16
	LDY.w #$1000
	JSL.l CODE_81B18B
	LDX.w #JP_GFX_Layer3_DinoEggMessageBox
	LDA.w #JP_GFX_Layer3_DinoEggMessageBox>>16
	LDY.w #$0000
	JSL.l CODE_81B18B
	PHB
	PHK
	PLB
	LDA.l !RAM_JP_Global_Player_RemainingEggsToCollectLo
	CMP.w #$000A
	BCS.b CODE_83D3DB
	LDX.w #$00AE
	JSR.w CODE_83D3F7
	STZ.w !RAM_JP_Global_Player_PickedUpEggFlagLo
	PLB
	RTL

CODE_83D3DB:
	LDA.w #$0001
	LDX.w #$00AC
	JSR.w CODE_83D3F7
	LDA.l !RAM_JP_Global_Player_RemainingEggsToCollectLo
	SEC
	SBC.w #$000A
	LDX.w #$00B0
	JSR.w CODE_83D3F7
	STZ.w !RAM_JP_Global_Player_PickedUpEggFlagLo
	PLB
	RTL

CODE_83D3F7:
	ASL
	ASL
	ASL
	ASL
	TAY
	LDA.w DATA_83D435,y
	STA.l $7F1000,x
	LDA.w DATA_83D435+$02,y
	STA.l $7F1002,x
	LDA.w DATA_83D435+$04,y
	STA.l $7F1040,x
	LDA.w DATA_83D435+$06,y
	STA.l $7F1042,x
	LDA.w DATA_83D435+$08,y
	STA.l $7F1080,x
	LDA.w DATA_83D435+$0A,y
	STA.l $7F1082,x
	LDA.w DATA_83D435+$0C,y
	STA.l $7F10C0,x
	LDA.w DATA_83D435+$0E,y
	STA.l $7F10C2,x
	RTS

DATA_83D435:
	dw $3900,$3901,$390E,$390F,$390E,$390F,$B900,$B901
	dw $3902,$3903,$3910,$3911,$3910,$391E,$392D,$392E
	dw $3904,$3901,$3912,$3913,$391F,$3920,$B900,$392F
	dw $3904,$3901,$3912,$3914,$3921,$3922,$B904,$B901
	dw $3905,$3906,$390E,$3915,$3923,$3924,$3909,$3930
	dw $3907,$3908,$3916,$3917,$3925,$3926,$B904,$B901
	dw $3905,$3909,$390E,$3909,$3927,$3928,$B900,$3931
	dw $3904,$3901,$3918,$3919,$3929,$392A,$3932,$3933
	dw $390A,$390B,$391A,$391B,$392B,$392C,$B900,$B901
	dw $390C,$3901,$391C,$391D,$3909,$390F,$3909,$3934

JP_Tilemap_Layer3_DinoEggMessageBox:
;$83D4D5
	incbin "Tilemaps/Compressed/Layer3_DinoEggMessageBox.bin"

JP_GFX_Layer3_DinoEggMessageBox:
;$83D6F5
	incbin "Graphics/Compressed/GFX_Layer3_DinoEggMessageBox.bin"

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

CODE_83DD9F:
	REP.b #$30
	LDA.w $06C5
	BNE.b CODE_83DDD9
	LDA.w $0E01
	BEQ.b CODE_83DDB3
	STZ.w !RAM_JP_Exterior_TouchedPoleFlagLo
	DEC.w $0E01
	BEQ.b CODE_83DDB8
CODE_83DDB3:
	LDA.w !RAM_JP_Exterior_TouchedPoleFlagLo
	BNE.b CODE_83DDDA
CODE_83DDB8:
	LDA.w $0B55
	BEQ.b CODE_83DDCB
	DEC.w $0B55
	CMP.w #$04B0
	BNE.b CODE_83DDCB
	LDX.w #$005D
	BRL.w CODE_83DE00

CODE_83DDCB:
	LDA.w $0B57
	BEQ.b CODE_83DDD9
	STZ.w $0B57
	LDX.w #$0075
	BRL.w CODE_83DE00

CODE_83DDD9:
	RTL

CODE_83DDDA:
	STZ.w !RAM_JP_Exterior_TouchedPoleFlagLo
	LDX.w !RAM_JP_Exterior_CurrentPoleMessageLo
	LDA.l DATA_83DE24+$02,x
	BMI.b CODE_83DDD9
	TAY
	LDA.w $0000,y
	BEQ.b CODE_83DDF3
	INX
	INX
	INX
	INX
	STX.w !RAM_JP_Exterior_CurrentPoleMessageLo
CODE_83DDF3:
	LDA.l DATA_83DE24,x
	BMI.b CODE_83DDD9
	TAX
	LDA.w #$0078
	STA.w $0E01
CODE_83DE00:
	LDA.l DATA_81D400-$01,x
	STA.w $06C5
	LDA.l DATA_81D400+$01,x
	TAX
	LDA.w #JP_Tilemap_RegularMessageBoxes_Main>>16
	LDY.w #$1000
	JSL.l CODE_81B18B
	LDA.w #JP_GFX_Layer3_RegularMessageBoxTiles>>16
	LDX.w #JP_GFX_Layer3_RegularMessageBoxTiles
	LDY.w #$0000
	JSL.l CODE_81B18B
	RTL

DATA_83DE24:
	dw $0000,$0200
	dw $0069,$0200
	dw $0015,$0200
	dw $0019,!RAM_JP_Global_GeneratorIsOnFlagLo
	dw $0011,$0200
	dw $0055,$0200
	dw $000D,$0200
	dw $0051,!RAM_JP_Global_MainSystemRestoredFlagLo
	dw $001D,$0200
	dw $0001,$0200
	dw $006D,$0200
	dw $0065,!RAM_JP_Global_VisitorCenterSecuredLo
	dw $0035,!RAM_JP_Global_ShipObjectivesClearFlagLo
	dw $0009,$0200
	dw $0039,!RAM_JP_Global_NerveGasDeployedFlagLo
	dw $0005,$0200
	dw $004D,!RAM_JP_Global_MainlandContactedFlagLo
	dw $0071,!RAM_JP_Global_BoardHelicopterFlagLo
	dw $FFFF,$FFFF

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

CODE_83DE70:
	SEI
	JSL.l CODE_819EE6
	REP.b #$30
	STZ.w $0AFB
	STZ.w $0AFD
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
	SEP.b #$30
	STZ.b $0B
CODE_83DE95:
	JSL.l CODE_819EE6
	LDA.b $0A
	BNE.b CODE_83DE95
	REP.b #$30
	STZ.w $0395
	LDA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	BEQ.b CODE_83DEC9
	LDA.w #$008A
	JSL.l CODE_81A880
	SEI
	JSL.l CODE_819EE6
	REP.b #$30
	LDX.w #CODE_8080E1
	STX.b $00
	LDA.w #CODE_8080E1>>16
	STA.b $02
	LDX.w #CODE_8081EF
	STX.b $04
	LDA.w #CODE_8081EF>>16
	STA.b $06
CODE_83DEC9:
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.w #$0081
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	CLI
	REP.b #$30
	LDX.w #JP_GFX_Sprite_JurassicParkFont
	LDA.w #JP_GFX_Sprite_JurassicParkFont>>16
	LDY.w #$6000
	JSL.l CODE_81B34A
	REP.b #$30
	LDX.w #JP_Palette_HighScoreScreen
	LDA.w #JP_Palette_HighScoreScreen>>16
	JSL.l CODE_81B3A6
	REP.b #$30
	LDY.w #DATA_B4EFFB>>16
	LDX.w #DATA_B4EFFB
	JSL.l CODE_839C4A
	JSL.l CODE_819EF1
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$40
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$00
	STA.b $10
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$81
	STA.l !REGISTER_ColorMathSelectAndEnable|!FastROMAddressOffset
	LDA.b #$E0
	STA.l !REGISTER_FixedColorData|!FastROMAddressOffset
	STA.b $0E
	LDA.b #$A0
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.b $0B
	LDA.b #$00
	STA.b $0D
	STZ.b $0F
	REP.b #$30
	LDA.w #$0001
	STA.w $0471
	LDA.w $03B8
	BEQ.b CODE_83DF71
	LDA.w #$0B1A
	JSR.w CODE_83DFC6
CODE_83DF71:
	LDA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	BEQ.b CODE_83DF7E
	LDA.w #$0868
	JSR.w CODE_83DFC6
	BRA.b CODE_83DF90

CODE_83DF7E:
	LDA.w $03B6
	BEQ.b CODE_83DF90
	LDA.w #$0AA8
	JSR.w CODE_83DFC6
	STZ.w $03B6
	JML.l CODE_81E1DE

CODE_83DF90:
	LDA.w #$0000
	JSR.w CODE_83DFC6
	LDA.w $0395
	BNE.b CODE_83DFC2
	LDA.w #$01DE
	JSR.w CODE_83DFC6
	LDA.w $0395
	BNE.b CODE_83DFC2
	LDA.w #$0322
	JSR.w CODE_83DFC6
	LDA.w $0395
	BNE.b CODE_83DFC2
	LDA.w #$0474
	JSR.w CODE_83DFC6
	LDA.w $0395
	BNE.b CODE_83DFC2
	LDA.w #$05AA
	JSR.w CODE_83DFC6
CODE_83DFC2:
	JML.l CODE_81E1DE

CODE_83DFC6:
	STA.w $03BA
	JSR.w CODE_83E03D
	SEP.b #$20
	STZ.b $0A
	LDA.b #$0F
	STA.b $0B
	REP.b #$20
	LDA.w #$0040
	STA.w $046B
	LDA.w $03BA
	CLC
	ADC.w #$0006
	STA.w $03BA
	JSR.w CODE_83E07E
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_GameOverCountdown&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_839D6A
CODE_83DFF3:
	LDA.w $03B8
	BNE.b CODE_83DFF3
	LDY.w #$00D2
CODE_83DFFB:
	JSL.l CODE_819EF1
	JSL.l CODE_819B3A
	REP.b #$30
	LDA.w !RAM_JP_Exterior_FadeOutToEndingFlagLo
	ORA.w $03B6
	BNE.b CODE_83E01A
	LDA.w $0AF1
	AND.w #$F0C0
	BEQ.b CODE_83E01A
	STA.w $0395
	BRA.b CODE_83E01D

CODE_83E01A:
	DEY
	BNE.b CODE_83DFFB
CODE_83E01D:
	SEP.b #$20
	STZ.b $0B
	REP.b #$20
	LDA.w #$0040
	STA.w $046B
	LDA.w #$000A
	STA.w $0471
	LDA.w $03BA
	CLC
	ADC.w #$0004
	STA.w $03BA
	JSR.w CODE_83E07E
	RTS

CODE_83E03D:
	JSL.l CODE_80F621
	LDX.w $03BA
	LDY.w #$0000
CODE_83E047:
	LDA.l JP_CreditsOAMData,x
	BPL.b CODE_83E051
	STX.w $03BC
	RTS

CODE_83E051:
	STA.w JP_Global_OAMBuffer[$00].Tile,y
	LDA.l JP_CreditsOAMData+$02,x
	SEP.b #$20
	STA.w JP_Global_OAMBuffer[$00].XDisp,y
	REP.b #$20
	XBA
	STA.w $7E8E3E,y
	LDA.l JP_CreditsOAMData+$04,x
	SEP.b #$20
	STA.w JP_Global_OAMBuffer[$00].YDisp,y
	REP.b #$20
	XBA
	STA.w $7E8E40,y
	INY
	INY
	INY
	INY
	TXA
	CLC
	ADC.w #$000E
	TAX
	BRA.b CODE_83E047

CODE_83E07E:
	JSL.l CODE_819EF1
	JSR.w CODE_83E08B
	LDA.w $046B
	BNE.b CODE_83E07E
	RTS

CODE_83E08B:
	REP.b #$30
	LDA.w $0471
	BEQ.b CODE_83E09D
	DEC.w $0471
	BNE.b CODE_83E0DF
	SEP.b #$20
	LDA.b #$10
	STA.b $10
CODE_83E09D:
	REP.b #$30
	LDX.w $03BA
	BMI.b CODE_83E0DF
	LDY.w #$0000
CODE_83E0A7:
	LDA.l JP_CreditsOAMData,x
	CLC
	ADC.w $7E8E3E,y
	STA.w $7E8E3E,y
	SEP.b #$20
	XBA
	STA.w JP_Global_OAMBuffer[$00].XDisp,y
	REP.b #$20
	LDA.l JP_CreditsOAMData+$02,x
	CLC
	ADC.w $7E8E40,y
	STA.w $7E8E40,y
	SEP.b #$20
	XBA
	STA.w JP_Global_OAMBuffer[$00].YDisp,y
	REP.b #$20
	INY
	INY
	INY
	INY
	TXA
	CLC
	ADC.w #$000E
	TAX
	CMP.w $03BC
	BCC.b CODE_83E0A7
	DEC.w $046B
CODE_83E0DF:
	RTS

JP_CreditsOAMData:
;$83E0E0
	dw $3E0C,$00F0,$00D0,$FCC4,$FDE0,$013C,$FEE0,$3E00
	dw $00F0,$00D0,$FD00,$FDE0,$0100,$FEE0,$3E28,$00F0
	dw $00D0,$FD40,$FDDC,$00C0,$FEE4,$3E08,$00F0,$00D0
	dw $FD80,$FDE0,$0080,$FEE0,$3E04,$0000,$00D0,$01CC
	dw $FDE0,$FFF4,$FEE0,$3E2C,$0000,$00D0,$0200,$FDE0
	dw $FFC0,$FEE0,$3E2A,$0000,$00D0,$0240,$FDE0,$FF80
	dw $FEE0,$3E04,$0000,$00D0,$027C,$FDE0,$FF44,$FEE0
	dw $3E08,$0000,$00D0,$02B0,$FDE4,$FF10,$FEDC,$3E2E
	dw $0000,$00D0,$02EC,$FDE0,$FED4,$FEE0,$3E46,$0000
	dw $00D0,$0328,$FDE0,$FE98,$FEE0,$3E00,$0070,$00D0
	dw $FF00,$FE40,$FF40,$FFC0,$3E2A,$0070,$00D0,$FF40
	dw $FE3C,$FF00,$FFC4,$3E06,$0070,$00D0,$FF80,$FE40
	dw $FEC0,$FFC0,$3E06,$0070,$00D0,$0008,$FE40,$01F8
	dw $FFC0,$3E08,$0070,$00D0,$0040,$FE40,$01C0,$FFC0
	dw $3E44,$0070,$00D0,$0074,$FE3C,$018C,$FFC4,$3E20
	dw $0070,$00D0,$00A8,$FE40,$0158,$FFC0,$3E0C,$0070
	dw $00D0,$00D8,$FE40,$0128,$FFC0,$3E2A,$0070,$00D0
	dw $011C,$FE3C,$00E4,$FFC4,$3E22,$00F0,$0000,$FC6C
	dw $01FC,$0194,$0144,$3E0E,$00F0,$0000,$FCB8,$0200
	dw $0148,$0140,$3E02,$00F0,$0000,$FD08,$0200,$00F8
	dw $0140,$3E08,$00F0,$0000,$FD40,$0200,$00C0,$0140
	dw $3E00,$00F0,$0000,$FD78,$0200,$0088,$0140,$3E42
	dw $00F0,$0000,$FDBC,$01FC,$0044,$0144,$3E06,$00F0
	dw $0000,$FDF8,$0200,$0008,$0140,$3E04,$0000,$0000
	dw $0238,$0200,$FF88,$0140,$3E88,$0000,$0000,$0260
	dw $0200,$FF60,$0140,$3E24,$0000,$0000,$02A0,$0200
	dw $FF20,$0140,$3E08,$0000,$0000,$02D8,$0204,$FEE8
	dw $013C,$3E42,$0000,$0000,$0314,$0200,$FEAC,$0140
	dw $3E42,$0000,$0000,$0350,$0200,$FE70,$0140,$3E60
	dw $0000,$0000,$038C,$0200,$FE34,$0140,$FFFF,$3E04
	dw $0050,$00D0,$0000,$FE00,$0080,$0080,$3E2C,$005D
	dw $00D0,$0000,$FE00,$004C,$0080,$3E06,$006C,$00D0
	dw $0000,$FE04,$0010,$007C,$3E20,$0078,$00D0,$0000
	dw $FE04,$FFE0,$007C,$3E2A,$0087,$00D0,$0000,$FE00
	dw $FFA4,$0080,$3E0C,$0097,$00D0,$0000,$FE04,$FF64
	dw $007C,$3E04,$00F0,$0000,$FC60,$01C0,$01A0,$0000
	dw $3E88,$00F0,$0000,$FC7C,$01C0,$0184,$0000,$3E24
	dw $00F0,$0000,$FCB4,$01C0,$014C,$0000,$3E08,$00F0
	dw $0000,$FCEC,$01C4,$0114,$FFFC,$3E42,$00F0,$0000
	dw $FD28,$01C0,$00D8,$0000,$3E42,$00F0,$0000,$FD60
	dw $01C0,$00A0,$0000,$3E60,$00F0,$0000,$FD98,$01C0
	dw $0068,$0000,$3E2E,$0000,$00D0,$01C0,$FE80,$0000
	dw $0000,$3E88,$0000,$00D0,$01E4,$FE80,$FFDC,$0000
	dw $3E42,$0000,$00D0,$0220,$FE80,$FFA0,$0000,$3E2C
	dw $0000,$00D0,$0258,$FE80,$FF68,$0000,$3E02,$0000
	dw $00D0,$0290,$FE84,$FF30,$FFFC,$3E20,$0000,$00D0
	dw $02C4,$FE84,$FEFC,$FFFC,$3E2A,$0000,$00D0,$02FC
	dw $FE80,$FEC4,$0000,$3E44,$0000,$00D0,$0334,$FE80
	dw $FE8C,$0000,$3E2C,$0000,$00D0,$0368,$FE80,$FE58
	dw $0000,$3E2A,$0000,$00D0,$03A8,$FE80,$FE18,$0000
	dw $FFFF,$3E0C,$0070,$00D0,$FF54,$FE00,$0000,$FEC0
	dw $3E42,$0070,$00D0,$FF90,$FDFC,$0000,$FEC4,$3E00
	dw $0070,$00D0,$FFC8,$FE00,$0000,$FEC0,$3E2E,$0070
	dw $00D0,$0004,$FDFC,$0000,$FEC4,$3E0E,$0070,$00D0
	dw $0040,$FE00,$0000,$FEC0,$3E20,$0070,$00D0,$0074
	dw $FE00,$0000,$FEC0,$3E04,$0070,$00D0,$00A4,$FE00
	dw $0000,$FEC0,$3E44,$0070,$00D0,$00D4,$FDFC,$0000
	dw $FEC4,$3E22,$00F0,$0000,$FC60,$01BC,$0000,$0184
	dw $3E0E,$00F0,$0000,$FCAC,$01C0,$0000,$0180,$3E02
	dw $00F0,$0000,$FCF4,$01C0,$0000,$0180,$3E08,$00F0
	dw $0000,$FD2C,$01C0,$0000,$0180,$3E00,$00F0,$0000
	dw $FD64,$01C0,$0000,$0180,$3E42,$00F0,$0000,$FDA4
	dw $01BC,$0000,$0184,$3E06,$00F0,$0000,$FDE0,$01C0
	dw $0000,$0180,$3E00,$0000,$0000,$0200,$01C4,$0000
	dw $017C,$3E88,$0000,$0000,$022C,$01C0,$0000,$0180
	dw $3E2E,$0000,$0000,$0264,$01C0,$0000,$0180,$3E00
	dw $0000,$0000,$0298,$01C4,$0000,$017C,$3E44,$0000
	dw $0000,$02D0,$01C0,$0000,$0180,$3E0E,$0000,$0000
	dw $030C,$01C4,$0000,$017C,$3E26,$0000,$0000,$034C
	dw $01C0,$0000,$0180,$3E08,$0000,$0000,$0380,$01C4
	dw $0000,$017C,$3E60,$0000,$0000,$03C0,$01C0,$0000
	dw $0180,$FFFF,$3E28,$00F0,$0000,$FDA0,$0120,$FEA0
	dw $FEE0,$3E48,$00F0,$0000,$FDE0,$0120,$FF40,$FEE0
	dw $3E44,$00F0,$0000,$FE18,$0120,$FFE8,$FEE0,$3E20
	dw $00F0,$0000,$FE48,$0124,$0098,$FEDC,$3E04,$00F0
	dw $0000,$FE74,$0120,$018C,$FEE0,$3E00,$00F0,$00D0
	dw $FCE0,$FE44,$0120,$FFBC,$3E2A,$00F0,$00D0,$FD20
	dw $FE40,$00E0,$FFC0,$3E06,$00F0,$00D0,$FD60,$FE44
	dw $00A0,$FFBC,$3E44,$0000,$0000,$018C,$0180,$0034
	dw $FFC0,$3E2C,$0000,$0000,$01C0,$0180,$0000,$FFC0
	dw $3E48,$0000,$0000,$01F8,$0180,$FFC8,$FFC0,$3E2A
	dw $0000,$0000,$023C,$0180,$FF84,$FFC0,$3E06,$0000
	dw $0000,$027C,$0184,$FF44,$FFBC,$3E0A,$0000,$00D0
	dw $02E0,$FE44,$FEE0,$FFBC,$3E4E,$0000,$00D0,$031C
	dw $FE40,$FEA4,$FFC0,$3E22,$0070,$00D0,$FF50,$FEC0
	dw $FEF0,$0140,$3E2C,$0070,$00D0,$FF84,$FEC0,$FEBC
	dw $0140,$3E2A,$0070,$00D0,$FFC0,$FEC0,$FE80,$0140
	dw $3E06,$0070,$00D0,$002C,$FEC4,$01D4,$013C,$3E48
	dw $0070,$00D0,$0060,$FEC0,$01A0,$0140,$3E2A,$0070
	dw $00D0,$00A0,$FEC0,$0160,$0140,$3E2A,$0070,$00D0
	dw $00E0,$FEC0,$0120,$0140,$FFFF,$3E00,$0070,$0000
	dw $FF24,$00E0,$FF1C,$FF20,$3E06,$0070,$0000,$FF64
	dw $00E0,$FEDC,$FF20,$3E06,$0070,$0000,$FFA0,$00E0
	dw $FEA0,$FF20,$3E20,$0070,$0000,$FFD0,$00E0,$FE70
	dw $FF20,$3E46,$0070,$0000,$0000,$00DC,$FE40,$FF24
	dw $3E20,$0070,$0000,$0038,$00E0,$FE08,$FF20,$3E2C
	dw $0070,$0000,$0070,$00E0,$FDD0,$FF20,$3E2A,$0070
	dw $0000,$00AC,$00E0,$FD94,$FF20,$3E00,$0070,$0000
	dw $00E8,$00E4,$FD58,$FF1C,$3E26,$0070,$0000,$012C
	dw $00E0,$FD14,$FF20,$3E0C,$0070,$0000,$FEDC,$0140
	dw $FF64,$FEC0,$3E42,$0070,$0000,$FF18,$013C,$FF28
	dw $FEC4,$3E00,$0070,$0000,$FF50,$0140,$FEF0,$FEC0
	dw $3E2E,$0070,$0000,$FF8C,$013C,$FEB4,$FEC4,$3E0E
	dw $0070,$0000,$FFCC,$0140,$FE74,$FEC0,$3E20,$0070
	dw $0000,$0000,$0140,$FE40,$FEC0,$3E04,$0070,$0000
	dw $002C,$0140,$FE14,$FEC0,$3E44,$0070,$0000,$005C
	dw $0140,$FDE4,$FEC0,$3E00,$0070,$0000,$00F0,$0140
	dw $FD50,$FEC0,$3E2A,$0070,$0000,$0134,$013C,$FD0C
	dw $FEC4,$3E06,$0070,$0000,$0174,$0140,$FCCC,$FEC0
	dw $3E04,$0070,$0000,$FFCC,$01A0,$FE74,$FE60,$3E2C
	dw $0070,$0000,$0000,$01A0,$FE40,$FE60,$3E06,$0070
	dw $0000,$0038,$01A4,$FE08,$FE5C,$3E08,$0070,$0000
	dw $006C,$01A4,$FDD4,$FE5C,$3E44,$0070,$00D0,$FE80
	dw $FEE0,$FFC0,$FDE0,$3E88,$0070,$00D0,$FEA4,$FEE0
	dw $FF9C,$FDE0,$3E24,$0070,$00D0,$FEE0,$FEE0,$FF60
	dw $FDE0,$3E08,$0070,$00D0,$FF18,$FEE4,$FF28,$FDDC
	dw $3E42,$0070,$00D0,$FF50,$FEE0,$FEF0,$FDE0,$3E42
	dw $0070,$00D0,$FF88,$FEE0,$FEB8,$FDE0,$3E60,$0070
	dw $00D0,$FFC0,$FEE0,$FE80,$FDE0,$3E28,$0070,$00D0
	dw $0040,$FEE0,$FE00,$FDE0,$3E88,$0070,$00D0,$0070
	dw $FEE0,$FDD0,$FDE0,$3E42,$0070,$00D0,$00AC,$FEE0
	dw $FD94,$FDE0,$3E2C,$0070,$00D0,$00E4,$FEE0,$FD5C
	dw $FDE0,$3E0C,$0070,$00D0,$011C,$FEE4,$FD24,$FDDC
	dw $3E08,$0070,$00D0,$0154,$FEE4,$FCEC,$FDDC,$3E42
	dw $0070,$00D0,$0190,$FEE0,$FCB0,$FDE0,$3E44,$0070
	dw $00D0,$01C0,$FEE0,$FC80,$FDE0,$3E00,$0070,$00D0
	dw $FEE0,$FF40,$FF60,$FD80,$3E2A,$0070,$00D0,$FF20
	dw $FF3C,$FF20,$FD84,$3E06,$0070,$00D0,$FF60,$FF40
	dw $FEE0,$FD80,$3E2C,$0070,$00D0,$FFD0,$FF40,$FE70
	dw $FD80,$3E04,$0070,$00D0,$0000,$FF40,$FE40,$FD80
	dw $3E08,$0070,$00D0,$0030,$FF44,$FE10,$FD7C,$3E00
	dw $0070,$00D0,$006C,$FF44,$FDD4,$FD7C,$3E2A,$0070
	dw $00D0,$00B0,$FF40,$FD90,$FD80,$3E48,$0070,$00D0
	dw $011C,$FF40,$FD24,$FD80,$3E24,$0070,$00D0,$0160
	dw $FF40,$FCE0,$FD80,$FFFF,$3E04,$0070,$0000,$FE88
	dw $00E0,$FFB8,$FF20,$3E2C,$0070,$0000,$FEBC,$00E0
	dw $FF84,$FF20,$3E2A,$0070,$0000,$FEF8,$00E0,$FF48
	dw $FF20,$3E0C,$0070,$0000,$FF34,$00E4,$FF0C,$FF1C
	dw $3E42,$0070,$0000,$FF70,$00E0,$FED0,$FF20,$3E00
	dw $0070,$0000,$FFA8,$00E4,$FE98,$FF1C,$3E46,$0070
	dw $0000,$FFE0,$00E0,$FE60,$FF20,$3E48,$0070,$0000
	dw $0020,$00E0,$01E0,$FF20,$3E26,$0070,$0000,$0060
	dw $00E0,$01A0,$FF20,$3E00,$0070,$0000,$0094,$00E4
	dw $016C,$FF1C,$3E46,$0070,$0000,$00D0,$00E0,$0130
	dw $FF20,$3E20,$0070,$0000,$010C,$00E4,$00F4,$FF1C
	dw $3E2C,$0070,$0000,$0140,$00E0,$00C0,$FF20,$3E2A
	dw $0070,$0000,$017C,$00E0,$0084,$FF20,$3E44,$0070
	dw $0000,$01B4,$00E0,$004C,$FF20,$3E60,$0078,$0050
	dw $FF30,$0020,$00B0,$FEA0,$3E2C,$0078,$0050,$FF68
	dw $0020,$0078,$FEA0,$3E48,$0078,$0050,$FFA0,$0020
	dw $0040,$FEA0,$3E0E,$0078,$0050,$0020,$0020,$FFC0
	dw $FEA0,$3E00,$0078,$0050,$0058,$0020,$FF88,$FEA0
	dw $3E4A,$0078,$0050,$0094,$001C,$FF4C,$FEA4,$3E08
	dw $0078,$0050,$00D0,$0020,$FF10,$FEA0,$3E08,$0078
	dw $0050,$FF64,$00A0,$007C,$FE20,$3E44,$0078,$0050
	dw $FF94,$009C,$004C,$FE24,$3E04,$0078,$0050,$FFC8
	dw $00A0,$0018,$FE20,$3E00,$0078,$0050,$FFF8,$00A0
	dw $FFE8,$FE20,$3E2E,$0078,$0050,$0034,$009C,$FFAC
	dw $FE24,$3E08,$0078,$0050,$006C,$00A0,$FF74,$FE20
	dw $3E06,$0078,$0050,$00A8,$00A0,$FF38,$FE20,$3E22
	dw $00F0,$00D0,$FCD8,$FF20,$FF68,$00E0,$3E48,$00F0
	dw $00D0,$FD10,$FF20,$FF30,$00E0,$3E42,$00F0,$00D0
	dw $FD50,$FF20,$FF30,$00E0,$3E00,$00F0,$00D0,$FD88
	dw $FF24,$FEF8,$00DC,$3E44,$00F0,$00D0,$FDC0,$FF20
	dw $FF00,$00E0,$3E44,$00F0,$00D0,$FDF0,$FF20,$FED0
	dw $00E0,$3E20,$00F0,$00D0,$FE20,$FF24,$FEE0,$00DC
	dw $3E04,$00F0,$00D0,$FE4C,$FF20,$FEB4,$00E0,$3E2E
	dw $0000,$00D0,$0280,$FF20,$FE80,$00E0,$3E00,$0000
	dw $00D0,$02B8,$FF24,$FE48,$00DC,$3E42,$0000,$00D0
	dw $02F8,$FF20,$FE48,$00E0,$3E24,$0000,$00D0,$0334
	dw $FF20,$FE0C,$00E0,$FFFF,$3E0C,$0000,$0000,$00E4
	dw $01A0,$02DC,$01A0,$3E00,$0000,$0000,$0120,$01A0
	dw $02A0,$01A0,$3E28,$0000,$0000,$0160,$019C,$0260
	dw $01A4,$3E08,$0000,$0000,$01A0,$01A0,$0220,$01A0
	dw $3E2C,$00F0,$00D0,$FE60,$FE60,$FDE0,$FE60,$3E4A
	dw $00F0,$00D0,$FEA0,$FE60,$FDA0,$FE60,$3E08,$00F0
	dw $00D0,$FEE0,$FE64,$FD60,$FE5C,$3E42,$00F0,$00D0
	dw $FF20,$FE60,$FD20,$FE60,$FFFF,$3E46,$0070,$0068
	dw $FEC0,$FEDC,$FF80,$FF84,$3E0E,$0070,$0068,$FF08
	dw $FEE0,$FF38,$FF80,$3E20,$0070,$0068,$FF40,$FEE0
	dw $FF00,$FF80,$3E44,$0070,$0068,$FF74,$FEDC,$FECC
	dw $FF84,$3E0C,$0070,$0068,$FFE0,$FEE0,$FE60,$FF80
	dw $3E00,$0070,$0068,$0020,$FEE0,$FE20,$FF80,$3E28
	dw $0070,$0068,$0060,$FEDC,$FDE0,$FF84,$3E08,$0070
	dw $0068,$00A0,$FEE0,$0160,$FF80,$3E2E,$0070,$0068
	dw $0100,$FEDC,$0100,$FF84,$3E00,$0070,$0068,$0138
	dw $FEE0,$00C8,$FF80,$3E24,$0070,$0068,$0180,$FEDC
	dw $0080,$FF84,$3E20,$0070,$0068,$FF70,$FF44,$0290
	dw $FF1C,$3E44,$0070,$0068,$FFA0,$FF40,$0260,$FF20
	dw $3E0A,$0070,$0068,$0000,$FF44,$0200,$FF1C,$3E2C
	dw $0070,$0068,$0040,$FF40,$01C0,$FF20,$3E42,$0070
	dw $0068,$0080,$FF40,$FF80,$FF20,$3E48,$0070,$0068
	dw $FFC0,$FFA0,$0040,$FEC0,$3E88,$0070,$0068,$FFF0
	dw $FFA0,$0010,$FEC0,$3E44,$0070,$0068,$0020,$FFA0
	dw $FFE0,$FEC0,$3E88,$0070,$0068,$0040,$FFA0,$FFC0
	dw $FEC0,$3E2C,$0070,$0068,$FFA0,$0020,$0060,$FE40
	dw $3E2A,$0070,$0068,$FFE0,$0020,$0020,$FE40,$3E26
	dw $0070,$0068,$0020,$0020,$FFE0,$FE40,$3E60,$0070
	dw $0068,$0058,$0020,$FFA8,$FE40,$3E2C,$0070,$0068
	dw $FF80,$0140,$0080,$FD20,$3E04,$0070,$0068,$FFBC
	dw $0140,$0044,$FD20,$3E08,$0070,$0068,$FFF4,$0144
	dw $000C,$FD1C,$3E00,$0070,$0068,$0030,$0144,$FFD0
	dw $FD1C,$3E2A,$0070,$0068,$0074,$0140,$FF8C,$FD20
	dw $FFFF

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

JP_GFX_Layer3_RegularMessageBoxTiles:
;$83ED92
	incbin "Graphics/Compressed/GFX_Layer3_RegularMessageBoxTiles.bin"

UNK_83F4F2:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($83F4F2, incbin, DATA_83F4F2_JP_U2.bin)
else
	%InsertGarbageData($83F4F2, incbin, DATA_83F4F2_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_848000:						; Note: This file must be inserted in a bank that's a multiple of 4. Otherwise, the routine that loads these tiles will break.
	%InsertVersionExclusiveFile(incbin, Graphics/GFX_LayerX_ExteriorAreas_, !ROMID.bin, :0-8000)

%BANK_END(<EndBank>)
endmacro

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

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

	%InsertVersionExclusiveFile(incbin, Graphics/GFX_LayerX_ExteriorAreas_, !ROMID.bin, :8000-10000)

%BANK_END(<EndBank>)
endmacro

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

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

	%InsertVersionExclusiveFile(incbin, Graphics/GFX_LayerX_ExteriorAreas_, !ROMID.bin, :10000-18000)

%BANK_END(<EndBank>)
endmacro

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

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

	%InsertVersionExclusiveFile(incbin, Graphics/GFX_LayerX_ExteriorAreas_, !ROMID.bin, :18000-20000)

%BANK_END(<EndBank>)
endmacro

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

macro JPBank88Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%BeginROMMirroring($888000, $00, !FastROMAddressOffset)

JP_Tilemap_ExteriorAreaMap:
	%InsertVersionExclusiveFile(incbin, Tilemaps/ExteriorAreaMap_, !ROMID.bin, :0-8000)

%EndROMMirroring()
%BANK_END(<EndBank>)
endmacro

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

macro JPBank89Macros(StartBank, EndBank)
%BANK_START(<StartBank>)
%BeginROMMirroring($898000, $00, !FastROMAddressOffset)

	%InsertVersionExclusiveFile(incbin, Tilemaps/ExteriorAreaMap_, !ROMID.bin, :8000-10000)

%EndROMMirroring()
%BANK_END(<EndBank>)
endmacro

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

macro JPBank8AMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
%BeginROMMirroring($8A8000, $00, !FastROMAddressOffset)

	%InsertVersionExclusiveFile(incbin, Tilemaps/ExteriorAreaMap_, !ROMID.bin, :10000-18000)

%EndROMMirroring()
%BANK_END(<EndBank>)
endmacro

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

macro JPBank8BMacros(StartBank, EndBank)
%BANK_START(<StartBank>)
%BeginROMMirroring($8B8000, $00, !FastROMAddressOffset)

	%InsertVersionExclusiveFile(incbin, Tilemaps/ExteriorAreaMap_, !ROMID.bin, :18000-20000)

%EndROMMirroring()
%BANK_END(<EndBank>)
endmacro

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

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

DATA_8C8000:
;$8C8000
	incbin "Tilemaps/ExteriorAreaMap16.bin"

JP_Tilemap_Mode7_IsleNublar:
;$8CC000
	incbin "Tilemaps/Compressed/Mode7_IsleNublar.bin"

JP_Palette_Mode7Intro:
;$8CC23A
	incbin "Palettes/Compressed/Mode7Intro.bin"

JP_GFX_Sprite_Mode7IntroText:
;$8CC44E
	incbin "Graphics/Compressed/GFX_Sprite_Mode7IntroText.bin"

JP_GFX_Mode7_IsleNublar:
;$8CC87E
	incbin "Graphics/Compressed/GFX_Mode7_IsleNublar.bin"

JP_Palette_GameOverScreen:
;$8CDD86
	incbin "Palettes/Compressed/GameOverScreen.bin"

JP_Tilemap_BG_GameOverScreen:
;$8CDF9A
	incbin "Tilemaps/Compressed/BG_GameOverScreen.bin"

JP_Tilemap_BG_TitleScreen:
;$8CE768
	incbin "Tilemaps/Compressed/BG_TitleScreen.bin"

JP_Palette_TitleScreen:
;$8CEE74
	incbin "Palettes/Compressed/TitleScreen.bin"

JP_Palette_HighScoreScreen:
;$8CF0A6
	incbin "Palettes/Compressed/HighScoreScreen.bin"

JP_Tilemap_BG_HighScoreScreen:
;$8CF2B0
	incbin "Tilemaps/Compressed/BG_HighScoreScreen.bin"

UNK_8CFA84:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($8CFA84, incbin, DATA_8CFA84_JP_U2.bin)
else
	%InsertGarbageData($8CFA84, incbin, DATA_8CFA84_JP_U1.bin)
endif

%BANK_END(<EndBank>)
endmacro

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

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

JP_GFX_BG_TitleScreen_Part1:
;$8D8000
	incbin "Graphics/Compressed/GFX_BG_TitleScreen.bin":0-(($010000-JP_GFX_BG_TitleScreen_Part1)&$00FFFF)
.End:

%BANK_END(<EndBank>)
endmacro

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

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

JP_GFX_BG_TitleScreen_Part2:
;$8E8000
	incbin "Graphics/Compressed/GFX_BG_TitleScreen.bin":(JP_GFX_BG_TitleScreen_Part1_End-JP_GFX_BG_TitleScreen_Part1)-
.End:

JP_GFX_BG_HighScoreScreen:
;$8E8E94
	incbin "Graphics/Compressed/GFX_BG_HighScoreScreen.bin"

UNK_8EFA66:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($8EFA66, incbin, DATA_8EFA66_JP_U2.bin)
else
	%InsertGarbageData($8EFA66, incbin, DATA_8EFA66_JP_U1.bin)
endif

%BANK_END(<EndBank>)
endmacro

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

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

JP_GFX_Sprite_TitleScreen_OpenedMenu:
;$8F8000
	incbin "Graphics/Compressed/GFX_Sprite_TitleScreen_OpenedMenu.bin"

JP_GFX_Sprite_TitleScreen_ClosedMenu:
;$8F93E2
	incbin "Graphics/Compressed/GFX_Sprite_TitleScreen_ClosedMenu.bin"

JP_Tilemap_BG_Mode7IntroMountains:
;$8FA72C
	incbin "Tilemaps/Compressed/BG_Mode7IntroMountains.bin"

JP_GFX_BG_Mode7IntroMountains:
;$8FA860
	incbin "Graphics/Compressed/GFX_BG_Mode7IntroMountains.bin"

JP_GFX_Sprite_GameOverScreenNumbers:
;$8FC28E
	incbin "Graphics/Compressed/GFX_Sprite_GameOverScreenNumbers.bin"

JP_GFX_Sprite_JurassicParkFont:
;$8FC4C2
	incbin "Graphics/Compressed/GFX_Sprite_JurassicParkFont.bin"

JP_GFX_OceanLogo:
;$8FD4AA
	incbin "Graphics/Compressed/GFX_OceanLogo.bin"

JP_Tilemap_OceanLogo:
;$8FDFFE
	incbin "Tilemaps/Compressed/OceanLogo.bin"

JP_Palette_OceanLogo:
;$8FE218
	incbin "Palettes/Compressed/OceanLogo.bin"

DATA_8FE358:
	incbin "Graphics/GFX_Sprite_BigSmokeCloud.bin"

DATA_8FEB58:
	incbin "Graphics/GFX_Sprite_RotatingMechanism.bin"

UNK_8FFB58:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($8FFB58, incbin, DATA_8FFB58_JP_U2.bin)
else
	%InsertGarbageData($8FFB58, incbin, DATA_8FFB58_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

JP_GFX_BG_GameOverScreenPart1:
;$908000
	incbin "Graphics/Compressed/GFX_BG_GameOverScreen.bin":0-(($010000-JP_GFX_BG_GameOverScreenPart1)&$00FFFF)
.End:

%BANK_END(<EndBank>)
endmacro

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

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

JP_GFX_BG_GameOverScreenPart2:
;$918000
	incbin "Graphics/Compressed/GFX_BG_GameOverScreen.bin":(JP_GFX_BG_GameOverScreenPart1_End-JP_GFX_BG_GameOverScreenPart1)-
.End:

DATA_91A1DC:
	incbin "Graphics/GFX_Sprite_Pachycephalosaurus.bin"

UNK_91F5DC:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($91F5DC, incbin, DATA_91F5DC_JP_U2.bin)
else
	%InsertGarbageData($91F5DC, incbin, DATA_91F5DC_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_928000:
	incbin "Graphics/GFX_Sprite_Triceratops.bin"

DATA_92B000:
	incbin "Graphics/GFX_Sprite_Compsognathus.bin"

DATA_92BC00:
	incbin "Graphics/GFX_Sprite_MetalDoorBridge.bin"

DATA_92D400:
	incbin "Graphics/GFX_Sprite_ElectricFenceGate.bin"

DATA_92E000:
	incbin "Graphics/GFX_Sprite_Boulders.bin"

DATA_92EC00:
	incbin "Graphics/GFX_Sprite_MrDNA.bin"

UNK_92FC00:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($92FC00, incbin, DATA_92FC00_JP_U2.bin)
else
	%InsertGarbageData($92FC00, incbin, DATA_92FC00_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_938000:
	incbin "Graphics/GFX_Sprite_Player.bin":0-7E00

UNK_93FE00:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($93FE00, incbin, DATA_93FE00_JP_U2.bin)
else
	%InsertGarbageData($93FE00, incbin, DATA_93FE00_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_948000:
	incbin "Graphics/GFX_Sprite_Player.bin":7E00-FC00

UNK_94FE00:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($94FE00, incbin, DATA_94FE00_JP_U2.bin)
else
	%InsertGarbageData($94FE00, incbin, DATA_94FE00_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_958000:
	incbin "Graphics/GFX_Sprite_Player.bin":FC00-17700

UNK_95FB00:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($95FB00, incbin, DATA_95FB00_JP_U2.bin)
else
	%InsertGarbageData($95FB00, incbin, DATA_95FB00_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_968000:
	incbin "Graphics/GFX_Sprite_Player.bin":17700-

UNK_96FE00:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($96FE00, incbin, DATA_96FE00_JP_U2.bin)
else
	%InsertGarbageData($96FE00, incbin, DATA_96FE00_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_978000:
	incbin "Graphics/GFX_Layer3_CattleProdAmmoDisplay.bin"

DATA_979080:
	incbin "Graphics/GFX_Sprite_CattleProd.bin"

DATA_979F80:
	incbin "Graphics/GFX_Sprite_ShotgunShots.bin"

DATA_97A380:
	incbin "Graphics/GFX_Sprite_RocketLauncherShots.bin"

DATA_97A780:
	incbin "Graphics/GFX_Sprite_TranquilizerShots.bin"

DATA_97AB80:
	incbin "Graphics/GFX_Sprite_GasGrenadeShots.bin"

DATA_97AF80:
	incbin "Graphics/GFX_Sprite_BolasSnareRifleShots.bin"

DATA_97B000:
	incbin "Graphics/GFX_Sprite_Items.bin":0-300

DATA_97B300:
	incbin "Graphics/GFX_Sprite_Unknown1.bin"

DATA_97B700:
	incbin "Graphics/GFX_Sprite_Items.bin":300-

DATA_97B880:
	incbin "Graphics/GFX_Sprite_MiniExplosions.bin"

DATA_97B980:
	incbin "Graphics/GFX_Sprite_DilophosaurSpit.bin"

DATA_97BE80:
	incbin "Graphics/GFX_Sprite_SmallSmokeCloud.bin"

DATA_97C080:
	incbin "Graphics/GFX_Sprite_Dragonfly.bin"

JP_GFX_DennisNedryPortrait:
;$97DA80
	incbin "Graphics/GFX_Sprite_DennisNedryPortrait.bin"

JP_GFX_AlexMurphyPortrait:
;$97DC80
	incbin "Graphics/GFX_Sprite_AlexMurphyPortrait.bin"

JP_GFX_EllieSattlerPortrait:
;$97DE80
	incbin "Graphics/GFX_Sprite_EllieSattlerPortrait.bin"

JP_GFX_JohnHammondPortrait:
;$97E080
	incbin "Graphics/GFX_Sprite_JohnHammondPortrait.bin"

JP_GFX_IanMalcolmPortrait:
;$97E280
	incbin "Graphics/GFX_Sprite_IanMalcolmPortrait.bin"

JP_GFX_RobertMuldoonPortrait:
;$97E480
	incbin "Graphics/GFX_Sprite_RobertMuldoonPortrait.bin"

JP_GFX_TimMurphyPortrait:
;$97E680
	incbin "Graphics/GFX_Sprite_TimMurphyPortrait.bin"

UNK_97E880:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($97E880, incbin, DATA_97E880_JP_U2.bin)
else
	%InsertGarbageData($97E880, incbin, DATA_97E880_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_988000:
	incbin "Graphics/GFX_Sprite_Gallimimus.bin"

DATA_98CE00:
	incbin "Graphics/GFX_Sprite_Unknown2.bin"

UNK_98D580:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($98D580, incbin, DATA_98D580_JP_U2.bin)
else
	%InsertGarbageData($98D580, incbin, DATA_98D580_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_998000:
	incbin "Graphics/GFX_Sprite_Dilophosaur.bin":0-5A00

UNK_99DA00:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($99DA00, incbin, DATA_99DA00_JP_U2.bin)
else
	%InsertGarbageData($99DA00, incbin, DATA_99DA00_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_9A8000:
	incbin "Graphics/GFX_Sprite_Dilophosaur.bin":5A00-

UNK_9AF500:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($9AF500, incbin, DATA_9AF500_JP_U2.bin)
else
	%InsertGarbageData($9AF500, incbin, DATA_9AF500_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_9B8000:
	incbin "Graphics/GFX_Sprite_TyrannosaurusRex.bin":0-7800

UNK_9BF800:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($9BF800, incbin, DATA_9BF800_JP_U2.bin)
else
	%InsertGarbageData($9BF800, incbin, DATA_9BF800_JP_U1.bin)
endif

%BANK_END(<EndBank>)
endmacro

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

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

DATA_9C8000:
	incbin "Graphics/GFX_Sprite_TyrannosaurusRex.bin":7800-

UNK_9CF800:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($9CF800, incbin, DATA_9CF800_JP_U2.bin)
else
	%InsertGarbageData($9CF800, incbin, DATA_9CF800_JP_U1.bin)
endif

%BANK_END(<EndBank>)
endmacro

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

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

DATA_9D8000:
	incbin "Graphics/GFX_Sprite_Velociraptor.bin":0-8000

%BANK_END(<EndBank>)
endmacro

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

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

DATA_9E8000:
	incbin "Graphics/GFX_Sprite_Velociraptor.bin":8000-10000

%BANK_END(<EndBank>)
endmacro

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

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

DATA_9F8000:
	incbin "Graphics/GFX_Sprite_Velociraptor.bin":10000-

UNK_9FE800:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($9FE800, incbin, DATA_9FE800_JP_U2.bin)
else
	%InsertGarbageData($9FE800, incbin, DATA_9FE800_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_A08000:
	incbin "InteriorMaps/Ship_EntryLevel_RoomDataPtrs.rnc"

DATA_A08204:
	incbin "InteriorMaps/Ship_EntryLevel_Entities.rnc"

DATA_A09EAD:
	incbin "InteriorMaps/Ship_SubLevel2_RoomDataPtrs.rnc"

DATA_A0A033:
	incbin "InteriorMaps/Ship_SubLevel2_Entities_JP_U1.rnc"

DATA_A0BAA0:
	incbin "InteriorMaps/NorthUtilityShed_GroundLevel_RoomDataPtrs.rnc"

DATA_A0BB51:
	incbin "InteriorMaps/NorthUtilityShed_GroundLevel_Entities.rnc"

DATA_A0C983:
	incbin "InteriorMaps/NorthUtilityShed_GroundLevel_MapLayout.rnc"

DATA_A0CA42:
	incbin "InteriorMaps/VisitorCenter_GroundLevel_Entities.rnc"

DATA_A0DB6D:
	incbin "InteriorMaps/VisitorCenter_GroundLevel_MapLayout.rnc"

DATA_A0DCBE:
	incbin "InteriorMaps/Ship_SubLevel4_Entities.rnc"

DATA_A0ED7D:
	incbin "InteriorMaps/BeachUtilityShed_GroundLevel_RoomDataPtrs.rnc"

DATA_A0EE17:
	incbin "InteriorMaps/VisitorCenter_SubLevel_Entities.rnc"

DATA_A0FD55:
	incbin "InteriorMaps/NublarUtilityShed_SubLevel_RoomDataPtrs.rnc"

DATA_A0FDD7:
	incbin "InteriorMaps/Ship_SubLevel2_MapLayout_JP_U1.rnc"

UNK_A0FF77:
	%InsertGarbageData($A0FF77, incbin, DATA_A0FF77.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_A18000:
	incbin "Textures/RefridgeratorWall_Left.bin"

DATA_A18600:
	incbin "Textures/RefridgeratorWall_Right.bin"

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

if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
else
DATA_A18C00:
	incbin "Graphics/Compressed/GFX_Sprite_InteriorHUD.rnc"
endif

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

CODE_A19DC4:
	LDX.w JP_Interior_EntityTable[$00].IDLo,y
	JMP.w (DATA_A19DDB,x)

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

CODE_A19DCA:
	REP.b #$31
	LDA.w !RAM_JP_Interior_EntityLoadStatusBuildingIndexLo
	ADC.w !RAM_JP_Interior_EntityLoadStatusByteIndexLo
	TAX
	LDA.l !RAM_JP_Interior_EntityLoadStatusTable,x
	AND.w !RAM_JP_Interior_EntityLoadStatusBitIndexLo
	RTS

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

DATA_A19DDB:					; Info: Entity...
	dw CODE_A19FED				; 00 - IdleRaptor
	dw CODE_A1A373				; 02 - ID Card
	dw CODE_A1A7A4				; 04 - Food
	dw CODE_A1A215				; 06 - Exploding dinosaur
	dw CODE_A1A7CC				; 08 - First aid kit
	dw CODE_A1B109				; 0A - Rocket launcher smoke
	dw CODE_A1AABC				; 0C - Gas grenade smoke
	dw CODE_A1A800				; 0E - ???
	dw CODE_A1ADCE				; 10 - Inactive primary weapon shot
	dw CODE_A1B080				; 12 - Shotgun/tranquilizer shot
	dw CODE_A1AC69				; 14 - Bolas snare rifle shot
	dw CODE_A1AC46				; 16 - Bolas snare rifle related?
	dw CODE_A1AD19				; 18 - Bolas snare rifle effects
	dw CODE_A1B17D				; 1A - Rocket launcher shot
	dw CODE_A1A343				; 1C - Raptor getting up
	dw CODE_A1A320				; 1E - Stunned raptor
	dw CODE_A1A129				; 20 - Lunging raptor
	dw CODE_A1A26B				; 22 - Dead raptor
	dw CODE_A1A28A				; 24 - Dead raptor falling over
	dw CODE_A1A2CA				; 26 - Initialize stunned raptor
	dw CODE_A1A2E9				; 28 - Stunned raptor falling over
	dw CODE_A19E3D				; 2A - Dead dinosaur/deleted entity
	dw CODE_A1A0A2				; 2C - Raptor backing away
	dw CODE_A1AA25				; 2E - Gas grenade shot smoke
	dw CODE_A1A839				; 30 - Inactive secondary weapon effect
	dw CODE_A1A815				; 32 - Inactive secondary weapon shot
	dw CODE_A1A8F1				; 34 - Gas grenade shot
	dw CODE_A19E3E				; 36 - Idle dilophosaur
	dw CODE_A1A844				; 38 - Gas grenade related?
	dw CODE_A1A99A				; 3A - Gas grenade explosion
	dw CODE_A1A3A8				; 3C - Gas grenade ammo
	dw CODE_A1A448				; 3E - Shotgun ammo
	dw CODE_A1A588				; 40 - Tranquilizer gun ammo
	dw CODE_A1A4E8				; 42 - Rocket launcher ammo
	dw CODE_A1A628				; 44 - Night vision goggles battery
	dw CODE_A1A68A				; 46 - Nerve gas canister
	dw CODE_A1A706				; 48 - Bolas snare rifle ammo
	dw CODE_A19F1F				; 4A - Inactive dilophosaur spit
	dw CODE_A19F5F				; 4C - Flying Dilophosaur spit
	dw CODE_A19EDD				; 4E - Dead dilophosaur falling over
	dw CODE_A1A048				; 50 - Left/Right walking raptor
	dw CODE_A1A0D3				; 52 - Down/Up walking raptor
	dw CODE_A1A7EB				; 54 - Extra life
	dw CODE_A19E6F				; 56 - Spitting dilophosaur
	dw CODE_A1AE2C				; 58 - Active gun smoke?
	dw CODE_A1AE0B				; 5A - Rocket launcher smoke?
	dw CODE_A1AE16				; 5C - Rocket launcher smoke?
	dw CODE_A1AE21				; 5E - Rocket launcher smoke?
	dw CODE_A1B16C				; 60 - Inactive gun smoke?

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

CODE_A19E3D:
	RTL

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

CODE_A19E3E:
	JSR.w CODE_A19DCA
	BEQ.b CODE_A19E4D
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	STA.w JP_Interior_EntityTable[$00].Unknown1,y
	RTL

CODE_A19E4D:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	REP.b #$30
	LDA.w #$3F01
	JSR.w CODE_A1B46F
	BCC.b CODE_A19E68
	REP.b #$30
	LDA.w #$000C
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_SpittingDilophosaur
	STA.w JP_Interior_EntityTable[$00].IDLo,y
CODE_A19E68:
	JSR.w CODE_A1B979
	JSR.w CODE_A1BA71
	RTL

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

CODE_A19E6F:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	TAX
	LDA.l DATA_A1C25C,x
	SEP.b #$20
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	INC
	CMP.w #$0018
	BNE.b CODE_A19EA9
	REP.b #$30
	LDA.w #$3F01
	JSR.w CODE_A1B46F
	BCS.b CODE_A19EA4
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_IdleDilophosaur
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #!Define_JP_TextureID00F8_IdleDilophosaur
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	BRA.b CODE_A19ED6

CODE_A19EA4:
	REP.b #$20
	LDA.w #$0000
CODE_A19EA9:
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	CMP.w #$0012
	BNE.b CODE_A19ED6
	LDA.w #!Define_JP_SoundID_DilophosaurSpitting
	JSR.w CODE_A1B54D
	LDA.w #$FFFF
	STA.w $1839
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w $183B
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w $183D
CODE_A19ED6:
	JSR.w CODE_A1B979
	JSR.w CODE_A1BA71
	RTL

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

CODE_A19EDD:
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	LSR
	CLC
	ADC.w #!Define_JP_TextureID009E_DilophosaurDying1
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	CMP.w #$0001
	BNE.b CODE_A19EFB
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSR.w CODE_A1B54D
	RTL

CODE_A19EFB:
	CMP.w #$0004
	BNE.b CODE_A19F1E
	LDA.w #!Define_JP_InteriorEntityID_DeadOrDeletedEntity
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	REP.b #$31
	LDA.w !RAM_JP_Interior_EntityLoadStatusBuildingIndexLo
	ADC.w !RAM_JP_Interior_EntityLoadStatusByteIndexLo
	TAX
	LDA.w !RAM_JP_Interior_EntityLoadStatusTable,x
	ORA.w !RAM_JP_Interior_EntityLoadStatusBitIndexLo
	STA.w !RAM_JP_Interior_EntityLoadStatusTable,x
	LDA.w #!Define_JP_SoundID_HeavyThud
	JSR.w CODE_A1B54D
CODE_A19F1E:
	RTL

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

CODE_A19F1F:
	LDA.w $1839
	BEQ.b CODE_A19F5B
	LDA.w #$0000
	STA.w $1839
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w $183B
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w $183D
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	JSR.w CODE_A1B740
	ASL
	TAX
	LDA.l DATA_A1C1FC,x
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.w #!Define_JP_InteriorEntityID_FlyingDilophosaurSpit
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
CODE_A19F5B:
	JSR.w CODE_A1B3FB
	RTL

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

CODE_A19F5F:
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A19F8E
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BNE.b CODE_A19F8E
CODE_A19F82:
	REP.b #$20
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_InactiveDilophosaurSpit
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTL

CODE_A19F8E:
	REP.b #$30
	LDA.w #$00FF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A19FC1
	SEP.b #$20
	LDA.b #$FC
	STA.w $16E0
	REP.b #$20
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	CLC
	ADC.w #!Define_JP_Player_DilophosaurSpitDamage
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	REP.b #$30
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PlayerHurt&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
	BRA.b CODE_A19F82

CODE_A19FC1:
	REP.b #$30
	JSR.w CODE_A1B2AF
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	TAX
	LDA.l DATA_A19FDF,x
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	CMP.w #$000E
	BEQ.b CODE_A19F82
	INC
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	RTL

DATA_A19FDF:
	dw $0000,$FFFE,$FFFA,$FFF4,$FFEC,$FFE2,$FFD8

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

CODE_A19FED:				; Note: Interior raptor AI related
	JSR.w CODE_A19DCA
	BEQ.b CODE_A19FFC
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	STA.w JP_Interior_EntityTable[$00].Unknown1,y
	RTL

CODE_A19FFC:
	REP.b #$30
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$3F
	CMP.b !RAM_JP_Interior_CurrentRoom
	BNE.b CODE_A1A01C
	REP.b #$20
	LDA.b $7A
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.w #!Define_JP_TextureID0080_RaptorWalk_Towards2
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	BRL.w CODE_A1A033

CODE_A1A01C:
	REP.b #$20
	LDA.w #!Define_JP_TextureID0080_RaptorWalk_Towards2
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.b $7A
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	REP.b #$30
	LDA.w #$2400
	JSR.w CODE_A1B46F
	BCC.b CODE_A1A041
CODE_A1A033:
	REP.b #$20
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_LungingRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
CODE_A1A041:
	JSR.w CODE_A1BA71
	JSR.w CODE_A1B83C
	RTL

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

CODE_A1A048:
	JSR.w CODE_A19DCA
	BEQ.b CODE_A1A057
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	STA.w JP_Interior_EntityTable[$00].Unknown1,y
	RTL

CODE_A1A057:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
CODE_A1A05A:
	LDA.w JP_Interior_EntityTable[$00].Unknown4,y
	AND.w #$0400
	CLC
	ADC.w #$0200
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	JSR.w CODE_A1B227
	JSR.w CODE_A1B5CA
	BCC.b CODE_A1A07E
	REP.b #$30
	JSR.w CODE_A1B339
	REP.b #$30
	LDA.w #$0400
	JSR.w CODE_A1B3E6
	BRA.b CODE_A1A05A

CODE_A1A07E:
	REP.b #$30
	JSR.w CODE_A1B3C1
	JSR.w CODE_A1BA71
	JSR.w CODE_A1B83C
	REP.b #$30
	LDA.w #$2400
	JSR.w CODE_A1B46F
	BCC.b CODE_A1A0A1
	REP.b #$20
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_LungingRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
CODE_A1A0A1:
	RTL

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

CODE_A1A0A2:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	JSR.w CODE_A1B227
	JSR.w CODE_A1B5FD
	BCC.b CODE_A1A0C7
	REP.b #$30
	LDA.w #$0400
	JSR.w CODE_A1B3E6
	JSR.w CODE_A1B227
	REP.b #$20
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_IdleRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTL

CODE_A1A0C7:
	REP.b #$30
	JSR.w CODE_A1B3C1
	JSR.w CODE_A1BA71
	JSR.w CODE_A1B83C
	RTL

CODE_A1A0D3:
	JSR.w CODE_A19DCA
	BEQ.b CODE_A1A0E2
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	STA.w JP_Interior_EntityTable[$00].Unknown1,y
	RTL

CODE_A1A0E2:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
CODE_A1A0E5:
	LDA.w JP_Interior_EntityTable[$00].Unknown4,y
	AND.w #$0400
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	JSR.w CODE_A1B227
	JSR.w CODE_A1B599
	BCC.b CODE_A1A105
	REP.b #$30
	JSR.w CODE_A1B339
	REP.b #$30
	LDA.w #$0400
	JSR.w CODE_A1B3E6
	BRA.b CODE_A1A0E5

CODE_A1A105:
	REP.b #$30
	JSR.w CODE_A1B3C1
	JSR.w CODE_A1BA71
	JSR.w CODE_A1B83C
	REP.b #$30
	LDA.w #$2400
	JSR.w CODE_A1B46F
	BCC.b CODE_A1A128
	REP.b #$20
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_LungingRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
CODE_A1A128:
	RTL

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

CODE_A1A129:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	AND.w #$000F
	TAX
	INC
	CMP.w #$000C
	BNE.b CODE_A1A13C
	LDA.w #$0000
CODE_A1A13C:
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	SEP.b #$20
	LDA.l DATA_A1A1FD,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.b #!Define_JP_TextureID00A1_RaptorPrepareLunge_Left>>8
	STA.w JP_Interior_EntityTable[$00].TextureIndexHi,y
	CPX.w #$0005
	BNE.b CODE_A1A157
	LDA.b #!Define_JP_SoundID_VelociraptorRoar
	JSR.w CODE_A1B54D
CODE_A1A157:
	CPX.w #$0000
	BNE.b CODE_A1A161
	LDA.b #!Define_JP_SoundID_VelociraptorGrowl
	JSR.w CODE_A1B54D
CODE_A1A161:
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	AND.w #$000F
	TAX
	LDA.l DATA_A1A209,x
	BEQ.b CODE_A1A1D8
	JSR.w CODE_A1B740
	ASL
	TAX
	LDA.l DATA_A1C1FC,x
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	JSR.w CODE_A1B2AF
	JSR.w CODE_A1B5FD
	BCS.b CODE_A1A1E1
	REP.b #$30
	LDA.w #$0900
	JSR.w CODE_A1B402
	BCC.b CODE_A1A1D8
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	CMP.w #$000D
	BNE.b CODE_A1A1A4
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PlayerHurt&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
CODE_A1A1A4:
	SEP.b #$20
	LDA.b #$FC
	STA.w $16E0
	REP.b #$20
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	CLC
	ADC.w #!Define_JP_Player_InteriorVelociraptorDamage
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown4,y
	CLC
	ADC.w #$0400
	AND.w #$07FF
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	JSR.w CODE_A1B2AF
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown4,y
	CLC
	ADC.w #$0400
	AND.w #$07FF
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
CODE_A1A1D8:
	REP.b #$30
	JSR.w CODE_A1BA71
	JSR.w CODE_A1B83C
	RTL

CODE_A1A1E1:
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown4,y
	CLC
	ADC.w #$0400
	AND.w #$07FF
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	JSR.w CODE_A1B2AF
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_RaptorBackingUp
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	BRA.b CODE_A1A1D8

DATA_A1A1FD:
	db !Define_JP_TextureID00A1_RaptorPrepareLunge_Left
	db !Define_JP_TextureID00A1_RaptorPrepareLunge_Left
	db !Define_JP_TextureID00A1_RaptorPrepareLunge_Left
	db !Define_JP_TextureID00A1_RaptorPrepareLunge_Left
	db !Define_JP_TextureID00A1_RaptorPrepareLunge_Left
	db !Define_JP_TextureID00A2_RaptorLunge1
	db !Define_JP_TextureID00A3_RaptorLunge2_Left
	db !Define_JP_TextureID00A4_RaptorLunge3_Left
	db !Define_JP_TextureID00A4_RaptorLunge3_Left
	db !Define_JP_TextureID00A3_RaptorLunge2_Left
	db !Define_JP_TextureID00A2_RaptorLunge1
	db !Define_JP_TextureID00A1_RaptorPrepareLunge_Left

DATA_A1A209:
	db $00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF

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

CODE_A1A215:
	REP.b #$30
	LDX.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.l DATA_A1A253,x
	BMI.b CODE_A1A23D
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	TXA
	INC
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	CMP.w #$0002
	BEQ.b CODE_A1A233
	CMP.w #$000E
	BNE.b CODE_A1A239
CODE_A1A233:
	LDA.w #!Define_JP_SoundID_ExplodingDinosaur
	JSR.w CODE_A1B54D
CODE_A1A239:
	JSR.w CODE_A1B83C
	RTL

CODE_A1A23D:
	JSR.w CODE_A1B3F1
	REP.b #$31
	LDA.w !RAM_JP_Interior_EntityLoadStatusBuildingIndexLo
	ADC.w !RAM_JP_Interior_EntityLoadStatusByteIndexLo
	TAX
	LDA.w !RAM_JP_Interior_EntityLoadStatusTable,x
	ORA.w !RAM_JP_Interior_EntityLoadStatusBitIndexLo
	STA.w !RAM_JP_Interior_EntityLoadStatusTable,x
	RTL

DATA_A1A253:
	dw !Define_JP_TextureID00E0_RaptorExploding
	dw !Define_JP_TextureID00E1_BigExplosionCloud
	dw !Define_JP_TextureID00E2_MediumExplosionCloud
	dw !Define_JP_TextureID00E3_SmallExplosionCloud
	dw !Define_JP_TextureID00E4_TinyExplosionCloud
	dw $FFFF
	dw !Define_JP_TextureID0102_DilophosaurExploding
	dw !Define_JP_TextureID00E1_BigExplosionCloud
	dw !Define_JP_TextureID00E2_MediumExplosionCloud
	dw !Define_JP_TextureID00E3_SmallExplosionCloud
	dw !Define_JP_TextureID00E4_TinyExplosionCloud
	dw $FFFF

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

CODE_A1A26B:
	LDA.b $7A
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown4,y
	XBA
	DEC
	AND.w #$0006
	TAX
	LDA.l DATA_A1C224,x
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_FallingDeadRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSR.w CODE_A1B54D
CODE_A1A28A:
	REP.b #$30
	LDX.w JP_Interior_EntityTable[$00].Unknown5,y
	SEP.b #$20
	LDA.l DATA_A1C1CA,x
	BEQ.b CODE_A1A2A9
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C1DF,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexHi,y
	REP.b #$20
	INX
	TXA
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	RTL

CODE_A1A2A9:
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_DeadOrDeletedEntity
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #!Define_JP_SoundID_HeavyThud
	JSR.w CODE_A1B54D
	REP.b #$31
	LDA.w !RAM_JP_Interior_EntityLoadStatusBuildingIndexLo
	ADC.w !RAM_JP_Interior_EntityLoadStatusByteIndexLo
	TAX
	LDA.w !RAM_JP_Interior_EntityLoadStatusTable,x
	ORA.w !RAM_JP_Interior_EntityLoadStatusBitIndexLo
	STA.w !RAM_JP_Interior_EntityLoadStatusTable,x
	RTL

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

CODE_A1A2CA:
	LDA.b $7A
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown4,y
	XBA
	DEC
	AND.w #$0006
	TAX
	LDA.l DATA_A1C224,x
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_FallingStunnedRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #!Define_JP_SoundID_HurtDinosaur
	JSR.w CODE_A1B54D
CODE_A1A2E9:
	REP.b #$30
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	LDX.w JP_Interior_EntityTable[$00].Unknown5,y
	SEP.b #$20
	LDA.l DATA_A1C1CA,x
	BEQ.b CODE_A1A30B
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C1DF,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexHi,y
	REP.b #$20
	INX
	TXA
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	RTL

CODE_A1A30B:
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_StunnedRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	SEP.b #$20
	LDA.b #$90
	STA.w JP_Interior_EntityTable[$00].Unknown6,y
	LDA.b #!Define_JP_SoundID_HeavyThud
	JSR.w CODE_A1B54D
	RTL

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

CODE_A1A320:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	SEP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown6,y
	DEC
	CMP.b #$00
	BEQ.b CODE_A1A331
	STA.w JP_Interior_EntityTable[$00].Unknown6,y
	RTL

CODE_A1A331:
	STA.w JP_Interior_EntityTable[$00].Unknown6,y
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_RaptorGettingUp
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	RTL

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

CODE_A1A343:
	INC.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	REP.b #$30
	LDX.w JP_Interior_EntityTable[$00].Unknown5,y
	DEX
	SEP.b #$20
	LDA.l DATA_A1C1CA,x
	BEQ.b CODE_A1A365
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C1DF,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexHi,y
	REP.b #$20
	TXA
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	RTL

CODE_A1A365:
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_IdleRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	RTL

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

CODE_A1A371:
	REP.b #$20
CODE_A1A373:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	TAX
	LDA.l !RAM_JP_Global_Player_CollectedIDCardTable,x
	BNE.b CODE_A1A3A2
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A3A1
	JSR.w CODE_A1B3F1
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	TAX
	LDA.w #$FFFF
	STA.l !RAM_JP_Global_Player_CollectedIDCardTable,x
	LDA.l DATA_A4DFB0,x
	JSL.l CODE_A4DF0D
	LDA.w #!Define_JP_SoundID_GetIDCard
	JSR.w CODE_A1B54D
CODE_A1A3A1:
	RTL

CODE_A1A3A2:
	JSR.w CODE_A1B3F1
	RTL

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

CODE_A1A3A6:
	REP.b #$20
CODE_A1A3A8:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	BEQ.b CODE_A1A3BD
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A3B6
	RTL

CODE_A1A3B6:
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	RTL

CODE_A1A3BD:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A430
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	LDA.w #$0000
	STA.w $037D
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BEQ.b CODE_A1A431
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	STA.b $56
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $58
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BEQ.b CODE_A1A41A
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	TAX
	LDA.l DATA_A1C136,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C140,x
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	LDA.b $56
	BEQ.b CODE_A1A41D
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.b $58
	STA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	LDA.w #DATA_A4E66E
	JSL.l CODE_A4DF0D
	RTL

CODE_A1A41A:
	JSR.w CODE_A1B3F1
CODE_A1A41D:
	LDA.w #$0010
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w #!Define_JP_WeaponID_GasGrenadeLauncher
	STA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	LDA.w #DATA_A4E66E
	JSL.l CODE_A4DF0D
CODE_A1A430:
	RTL

CODE_A1A431:
	JSR.w CODE_A1B3F1
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	CLC
	ADC.w #$0010
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w #DATA_A4E6AB
	JSL.l CODE_A4DF0D
	RTL

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

CODE_A1A446:
	REP.b #$20
CODE_A1A448:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	BEQ.b CODE_A1A45D
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A456
	RTL

CODE_A1A456:
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	RTL

CODE_A1A45D:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A4D0
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	LDA.w #$0000
	STA.w $037D
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	CMP.w #!Define_JP_WeaponID_Shotgun
	BEQ.b CODE_A1A4D1
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	STA.b $56
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $58
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_A1A4BA
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	TAX
	LDA.l DATA_A1C136,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C140,x
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	LDA.b $56
	BEQ.b CODE_A1A4BD
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.b $58
	STA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.w #DATA_A4E6E2
	JSL.l CODE_A4DF0D
	RTL

CODE_A1A4BA:
	JSR.w CODE_A1B3F1
CODE_A1A4BD:
	LDA.w #$0020
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #!Define_JP_WeaponID_Shotgun
	STA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.w #DATA_A4E6E2
	JSL.l CODE_A4DF0D
CODE_A1A4D0:
	RTL

CODE_A1A4D1:
	JSR.w CODE_A1B3F1
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	CLC
	ADC.w #$0020
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #DATA_A4E712
	JSL.l CODE_A4DF0D
	RTL

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

CODE_A1A4E6:
	REP.b #$20
CODE_A1A4E8:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	BEQ.b CODE_A1A4FD
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A4F6
	RTL

CODE_A1A4F6:
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	RTL

CODE_A1A4FD:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A570
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	LDA.w #$0000
	STA.w $037D
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	CMP.w #!Define_JP_WeaponID_RocketLauncher
	BEQ.b CODE_A1A571
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	STA.b $56
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $58
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_A1A55A
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	TAX
	LDA.l DATA_A1C136,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C140,x
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	LDA.b $56
	BEQ.b CODE_A1A55D
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.b $58
	STA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.w #DATA_A4E796
	JSL.l CODE_A4DF0D
	RTL

CODE_A1A55A:
	JSR.w CODE_A1B3F1
CODE_A1A55D:
	LDA.w #$0008
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #!Define_JP_WeaponID_RocketLauncher
	STA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.w #DATA_A4E796
	JSL.l CODE_A4DF0D
CODE_A1A570:
	RTL

CODE_A1A571:
	JSR.w CODE_A1B3F1
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	CLC
	ADC.w #$0008
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #DATA_A4E7CE
	JSL.l CODE_A4DF0D
	RTL

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

CODE_A1A586:
	REP.b #$20
CODE_A1A588:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	BEQ.b CODE_A1A59D
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A596
	RTL

CODE_A1A596:
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	RTL

CODE_A1A59D:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A610
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	LDA.w #$0000
	STA.w $037D
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BEQ.b CODE_A1A611
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	STA.b $56
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $58
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_A1A5FA
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	TAX
	LDA.l DATA_A1C136,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C140,x
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	LDA.b $56
	BEQ.b CODE_A1A5FD
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.b $58
	STA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.w #DATA_A4E73C
	JSL.l CODE_A4DF0D
	RTL

CODE_A1A5FA:
	JSR.w CODE_A1B3F1
CODE_A1A5FD:
	LDA.w #$0010
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #!Define_JP_WeaponID_TranquilizerGun
	STA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.w #DATA_A4E73C
	JSL.l CODE_A4DF0D
CODE_A1A610:
	RTL

CODE_A1A611:
	JSR.w CODE_A1B3F1
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	CLC
	ADC.w #$0010
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #DATA_A4E76C
	JSL.l CODE_A4DF0D
	RTL

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

CODE_A1A626:
	REP.b #$20
CODE_A1A628:
	LDX.w !RAM_JP_Interior_CurrentAreaLo
	LDA.l DATA_A1A670,x
	AND.w #$00FF
	TAX
	LDA.w !RAM_JP_Global_Player_CollectedBatteryTable,x
	AND.w #$00FF
	BNE.b CODE_A1A66C
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A66F
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	LDA.w #DATA_A4E800
	JSL.l CODE_A4DF0D
	REP.b #$30
	LDX.w !RAM_JP_Interior_CurrentAreaLo
	LDA.l DATA_A1A670,x
	AND.w #$00FF
	TAX
	SEP.b #$20
	LDA.b #$FF
	STA.w !RAM_JP_Global_Player_CollectedBatteryTable,x
	REP.b #$20
	LDA.w #$FFFF
	STA.w !RAM_JP_Interior_CanEnterDarkRoomSafelyFlagLo
CODE_A1A66C:
	JSR.w CODE_A1B3F1
CODE_A1A66F:
	RTL

DATA_A1A670:
	db $07,$00,$01,$02,$02,$03,$04,$05,$06,$06,$07,$01,$01,$01,$01,$02
	db $02,$04,$03,$00,$05,$05,$05,$05

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

CODE_A1A688:
	REP.b #$20
CODE_A1A68A:
	LDA.w !RAM_JP_Interior_CollectedNerveGasFlagLo
	BNE.b CODE_A1A692
	BRL.w CODE_A1A6E8

CODE_A1A692:
	CMP.w #$0002
	BEQ.b CODE_A1A6E7
	LDA.w !RAM_JP_Global_ShipObjectivesClearFlagLo
	BEQ.b CODE_A1A6E6
	LDA.w #$FFFF
	STA.w !RAM_JP_Global_NerveGasDeployedFlagLo
	LDA.b !RAM_JP_Interior_CurrentRoom
	CMP.w #$0033
	BNE.b CODE_A1A6E6
	INC.w !RAM_JP_Interior_CollectedNerveGasFlagLo
	LDA.w #DATA_A4E866
	JSL.l CODE_A4DF0D
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PickupItem&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
CODE_A1A6E6:
	RTL

CODE_A1A6E7:
	RTL

CODE_A1A6E8:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A703
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	JSR.w CODE_A1B3F1
	LDA.w #DATA_A4E838
	JSL.l CODE_A4DF0D
	INC.w !RAM_JP_Interior_CollectedNerveGasFlagLo
CODE_A1A703:
	RTL

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

CODE_A1A704:
	REP.b #$20
CODE_A1A706:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	BEQ.b CODE_A1A71B
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A714
	RTL

CODE_A1A714:
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	RTL

CODE_A1A71B:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A78E
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	LDA.w #$0000
	STA.w $037D
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	CMP.w #!Define_JP_WeaponID_BolasSnareRifle
	BEQ.b CODE_A1A78F
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	STA.b $56
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $58
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BEQ.b CODE_A1A778
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	TAX
	LDA.l DATA_A1C136,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.l DATA_A1C140,x
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	LDA.b $56
	BEQ.b CODE_A1A77B
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.b $58
	STA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	LDA.w #DATA_A4E8A2
	JSL.l CODE_A4DF0D
	RTL

CODE_A1A778:
	JSR.w CODE_A1B3F1
CODE_A1A77B:
	LDA.w #$0008
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w #!Define_JP_WeaponID_BolasSnareRifle
	STA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	LDA.w #DATA_A4E8A2
	JSL.l CODE_A4DF0D
CODE_A1A78E:
	RTL

CODE_A1A78F:
	JSR.w CODE_A1B3F1
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	CLC
	ADC.w #$0008
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w #DATA_A4E8DC
	JSL.l CODE_A4DF0D
	RTL

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

CODE_A1A7A4:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A7CB
	LDA.w #!Define_JP_SoundID_PickupItem
	JSR.w CODE_A1B54D
	JSR.w CODE_A1B3F1
	LDA.w #DATA_A4E910
	JSL.l CODE_A4DF0D
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	SEC
	SBC.w #!Define_JP_Player_DamageRecoveredFromFood
	BPL.b CODE_A1A7C8
	LDA.w #$0000
CODE_A1A7C8:
	STA.w !RAM_JP_Global_Player_DamageTakenLo
CODE_A1A7CB:
	RTL

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

CODE_A1A7CC:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A7EA
	LDA.w #!Define_JP_SoundID_GetFirstAidKit
	JSR.w CODE_A1B54D
	JSR.w CODE_A1B3F1
	LDA.w #DATA_A4E930
	JSL.l CODE_A4DF0D
	LDA.w #$0000
	STA.w !RAM_JP_Global_Player_DamageTakenLo
CODE_A1A7EA:
	RTL

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

CODE_A1A7EB:
	LDA.w #$1000
	JSR.w CODE_A1B402
	BCC.b CODE_A1A7FF
	LDA.w #!Define_JP_SoundID_GetExtraLife
	JSR.w CODE_A1B54D
	JSR.w CODE_A1B3F1
	INC.w !RAM_JP_Global_Player_CurrentLifeCountLo
CODE_A1A7FF:
	RTL

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

CODE_A1A800:
	RTL

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

DATA_A1A801:
	db $06,$01,$07,$01,$08,$01,$09,$01,$0A,$01,$80,$00,$18,$02,$B2,$03
	db $4C,$05

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

CODE_A1A813:
	INC.b $06
CODE_A1A815:
	LDA.w $1745
	BNE.b CODE_A1A836
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	CMP.w #!Define_JP_WeaponID_GasGrenadeLauncher
	BNE.b CODE_A1A825
	BRL.w CODE_A1A844

CODE_A1A825:
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	CMP.w #!Define_JP_WeaponID_BolasSnareRifle
	BNE.b CODE_A1A830
	BRL.w CODE_A1AB6C

CODE_A1A830:
	LDA.w #$0001
	STA.w $1745
CODE_A1A836:
	BRL.w CODE_A1AE02

CODE_A1A839:
	LDA.w $1767
	BEQ.b CODE_A1A841
	BRL.w CODE_A1A9C2

CODE_A1A841:
	BRL.w CODE_A1AE02

CODE_A1A844:
	LDA.b $1A
	AND.w #$4000
	BNE.b CODE_A1A84E
	BRL.w CODE_A1A8EE

CODE_A1A84E:
	LDA.b $1A
	AND.w #$FF7F
	STA.b $1A
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BNE.b CODE_A1A85D
	BRL.w CODE_A1A8EE

CODE_A1A85D:
	DEC
	STA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w #!Define_JP_TextureID0078_GasGrenadeProjectile
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.w $7E6EAEC8,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEP.b #$20
	LDA.b $A7
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	REP.b #$20
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	SEP.b #$20
	LDA.b $AA
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_34
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.b $7A
	EOR.w #$FFFF
	INC
	AND.w #$07FF
	STA.w $1769
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$0003
	STA.w $1709,x
	LDA.b $A8
	STA.w $176F
	EOR.w #$FFFF
	INC
	STA.w $16E9,x
	LDA.b $AB
	STA.w $1771
	EOR.w #$FFFF
	INC
	STA.w $16F9,x
	REP.b #$30
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_FireGasGrenade&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
	LDA.w #$0001
	STA.w $1767
	STA.w $1745
CODE_A1A8EE:
	BRL.w CODE_A1AE02

CODE_A1A8F1:
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1A934
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BNE.b CODE_A1A934
	LDA.w #!Define_JP_SoundID_ShotHitsWall
	JSR.w CODE_A1B54D
CODE_A1A91A:
	REP.b #$30
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_32
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	STZ.w $1767
	BRL.w CODE_A1AE02

CODE_A1A934:
	REP.b #$30
	LDA.w #$00FF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	JSR.w CODE_A1B227
	JSR.w CODE_A1B227
	REP.b #$30
	INC.w $1767
	LDX.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.l DATA_A1AB46,x
	CMP.w #$0080
	BNE.b CODE_A1A983
	LDA.w #!Define_JP_InteriorEntityID_3A
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w $1719,x
	BPL.b CODE_A1A964
	BRL.w CODE_A1A91A

CODE_A1A964:
	LDA.b $3D
	STA.w $16E9,x
	LDA.b $40
	STA.w $16F9,x
	LDA.w #$0004
	STA.w $1709,x
	LDA.w #$0005
	STA.w $176D
	LDA.w #!Define_JP_SoundID_ExplodingDinosaur
	JSR.w CODE_A1B54D
	BRL.w CODE_A1AE02

CODE_A1A983:
	AND.w #$FFFE
	CLC
	ADC.l DATA_A2FB34
	STA.l $7F320C
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	INC
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	BRL.w CODE_A1AE02

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

CODE_A1A99A:
	REP.b #$30
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	LDX.w $16E7
	LDA.w #$0004
	STA.w $1709,x
	STZ.w $1719,x
	STZ.w $1767
	LDA.w $176D
	BNE.b CODE_A1A9BF
	LDA.w #!Define_JP_InteriorEntityID_32
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	STZ.w $176D
CODE_A1A9BF:
	BRL.w CODE_A1AE02

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

CODE_A1A9C2:
	STZ.w $1767
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w $176F
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEP.b #$20
	LDA.b $A7
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	REP.b #$20
	LDA.w $1771
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	SEP.b #$20
	LDA.b $AA
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_2E
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w $1769
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$000A
	STA.w $1709,x
	LDA.w $176F
	STA.w $16E9,x
	LDA.w $1771
	STA.w $16F9,x
	BRL.w CODE_A1AE02

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

CODE_A1AA25:
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1AA5F
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BNE.b CODE_A1AA5F
	REP.b #$30
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_30
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	BRL.w CODE_A1AE02

CODE_A1AA5F:
	REP.b #$30
	LDA.w #$00FF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	JSR.w CODE_A1B227
	JSR.w CODE_A1B227
	LDX.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.l DATA_A1AB46,x
	CMP.w #$0080
	BNE.b CODE_A1AA97
	LDA.w $1773
	SEC
	SBC.w #!Define_JP_TextureID0106_GunSmoke*$02
	TAX
	LDA.l DATA_A1AB60,x
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.w #!Define_JP_InteriorEntityID_0C
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$FFD4
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	BRL.w CODE_A1AE02

CODE_A1AA97:
	AND.w #$FFFE
	CLC
	ADC.l DATA_A2FC28
	LDX.w $1773
	STA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	TXA
	LSR
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	INC.w $1773
	INC.w $1773
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	INC
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	BRL.w CODE_A1AE02

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

CODE_A1AABC:
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1AAF9
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BNE.b CODE_A1AAF9
CODE_A1AADF:
	REP.b #$20
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_30
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	DEC.w $176D
	BRL.w CODE_A1AE02

CODE_A1AAF9:
	REP.b #$30
	JSR.w CODE_A1B227
	JSR.w CODE_A1B227
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	CLC
	ADC.l DATA_A2FC28+$02
	LDX.w $1773
	STA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	TXA
	LSR
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	INC.w $1773
	INC.w $1773
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	INC
	INC
	INC
	INC
	INC
	INC
	INC
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	AND.w #$FFF8
	CMP.w #$0000
	BEQ.b CODE_A1AADF
	BRL.w CODE_A1AE02

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

DATA_A1AB34:
	dw $FFD3,$FFD3,$FFD3,$FFD3,$FFD3,$FFD3,$FFD3,$FFD3
	dw $FFD3

DATA_A1AB46:
        dw $FFD3,$FFDC,$FFE4,$FFF1,$FFFA,$FFFF,$0000,$FFFD
        dw $FFF6,$FFEB,$FFDC,$FFD3,$0080

DATA_A1AB60:
	dw $0000,$0199,$0333,$04CC,$0666,$20C2

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

CODE_A1AB6C:
	REP.b #$30
	LDA.b $1A
	AND.w #$4000
	BNE.b CODE_A1AB78
CODE_A1AB75:
	BRL.w CODE_A1AE02

CODE_A1AB78:
	LDA.b $1A
	AND.w #$BFFF
	STA.b $1A
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BEQ.b CODE_A1AB75
	DEC.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	LDA.w #$0003
	STA.w $1745
	LDA.w #$00F4
	STA.w $7EAEE8,y
	STA.w $7EAEFA,y
	STA.w $7EAF0C,y
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w JP_Interior_EntityTable[$00].Unknown3,x
	STA.w JP_Interior_EntityTable[$00].Unknown4,x
	STA.w JP_Interior_EntityTable[$00].Unknown7,x
	SEP.b #$20
	LDA.b $A7
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.w $7EAEE6,y
	STA.w $7EAEF8,y
	STA.w $7EAF0A,y
	REP.b #$20
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w JP_Interior_EntityTable[$00].IDLo,x
	STA.w JP_Interior_EntityTable[$00].Unknown5,x
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,x
	SEP.b #$20
	LDA.b $AA
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	STA.w $7EAEE7,y
	STA.w $7EAEF9,y
	STA.w $7EAF0B,y
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_14
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$0016
	STA.w $7EAEE0,y
	STA.w $7EAEF2,y
	STA.w $7EAF04,y
	LDA.b $7A
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	REP.b #$30
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_FireBolasSnareRifle&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$0005
	STA.w $1709,x
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w $16E9,x
	STA.w $1747
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w $16F9,x
	STA.w $1749
	BRL.w CODE_A1AE02

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

CODE_A1AC46:
	REP.b #$30
	LDA.w #!Define_JP_InteriorEntityID_18
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$0005
	STA.w $1709,x
	LDA.w $1747
	STA.w $16E9,x
	LDA.w $1749
	STA.w $16F9,x
	BRL.w CODE_A1AE02

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

CODE_A1AC69:
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1AC8C
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BEQ.b CODE_A1ACB2
CODE_A1AC8C:
	JSR.w CODE_A1BAB9
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1ACD2
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BNE.b CODE_A1ACD2
CODE_A1ACB2:
	LDA.w #!Define_JP_SoundID_ShotHitsWall
	JSR.w CODE_A1B54D
	REP.b #$30
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_32
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	STZ.w $1745
	BRL.w CODE_A1AE02

CODE_A1ACD2:
	REP.b #$30
	JSR.w CODE_A1BAB9
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	STA.w $174F
	CLC
	ADC.w #$00C0
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDX.w $16E7
	LDA.w $1719,x
	BPL.b CODE_A1ACEF
	STZ.w $1719,x
CODE_A1ACEF:
	LDA.b $3D
	STA.w $16E9,x
	STA.w $1747
	LDA.b $40
	STA.w $16F9,x
	STA.w $1749
	LDA.w #$0001
	STA.w $1745
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	EOR.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	BNE.b CODE_A1AD16
	LDA.w #!Define_JP_SoundID_FlyingBolasSnareRifleShot
	JSR.w CODE_A1B54D
CODE_A1AD16:
	BRL.w CODE_A1AE02

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

CODE_A1AD19:
	LDA.w $1745
	BNE.b CODE_A1AD38
	REP.b #$20
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_30
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	STZ.w $1745
	BRL.w CODE_A1AE02

CODE_A1AD38:
	REP.b #$30
	LDA.w #$00FF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	LDA.w $174F
	AND.w #$07FF
	TAX
	SEP.b #$20
	LDA.l $7FC84C,x
	XBA
	LDA.l $7FBA4C,x
	REP.b #$20
	LSR
	LSR
	SEP.b #$20
	XBA
	LDA.l $7FC84C,x
	XBA
	REP.b #$20
	CLC
	ADC.w $1747
	STA.w $174B
	SEP.b #$20
	LDA.l $7FCA4C,x
	XBA
	LDA.l $7FBC4C,x
	REP.b #$20
	LSR
	LSR
	SEP.b #$20
	XBA
	LDA.l $7FCA4C,x
	XBA
	REP.b #$20
	CLC
	ADC.w $1749
	STA.w $174D
	LDA.w $174F
	CLC
	ADC.w #$02AA
	STA.w $174F
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w $174B
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w $174D
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDX.w $16E7
	LDA.w $1719,x
	BPL.b CODE_A1ADB7
	STZ.w $1719,x
CODE_A1ADB7:
	LDA.w $174B
	STA.w $16E9,x
	LDA.w $174D
	STA.w $16F9,x
	LDA.w #$0001
	STA.w $1745
	BRL.w CODE_A1AE02

CODE_A1ADCC:
	REP.b #$20
CODE_A1ADCE:
	LDA.w $1743
	BNE.b CODE_A1ADF9
	LDA.w $037D
	BNE.b CODE_A1ADF6
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	BNE.b CODE_A1ADE0						; Note: !Define_JP_WeaponID_Shotgun
	BRL.w CODE_A1AE8F

CODE_A1ADE0:
	CMP.w #!Define_JP_WeaponID_RocketLauncher
	BNE.b CODE_A1ADE8
	BRL.w CODE_A1AF9F

CODE_A1ADE8:
	CMP.w #!Define_JP_WeaponID_TranquilizerGun
	BNE.b CODE_A1ADF0
	BRL.w CODE_A1AF17

CODE_A1ADF0:
	LDA.w #$0001
	STA.w $1743
CODE_A1ADF6:
	BRL.w CODE_A1AE02

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

CODE_A1ADF9:
	LDA.w #$0001
	STA.w $1743
	BRL.w CODE_A1AE02

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

CODE_A1AE02:
	REP.b #$30
	INC.w $16E7
	INC.w $16E7
	RTL

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

CODE_A1AE0B:
	REP.b #$30
	LDA.w #!Define_JP_InteriorEntityID_58
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	BRL.w CODE_A1AE02

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

CODE_A1AE16:
	REP.b #$30
	LDA.w #!Define_JP_InteriorEntityID_5A
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	BRL.w CODE_A1AE02

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

CODE_A1AE21:
	REP.b #$30
	LDA.w #!Define_JP_InteriorEntityID_5C
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	BRL.w CODE_A1AE02

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

CODE_A1AE2C:
	LDA.w #!Define_JP_TextureID0121_GunSmoke
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	STZ.w $1755
	LDA.l DATA_A2FC28
	SEC
	SBC.w #$0020
	STA.l $7F335E
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w $175F
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEP.b #$20
	LDA.w $1763
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	REP.b #$20
	LDA.w $1761
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	SEP.b #$20
	LDA.w $1764
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_0A
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$000A
	STA.w $1709,x
	LDA.w $175F
	STA.w $16E9,x
	LDA.w $1761
	STA.w $16F9,x
	BRL.w CODE_A1AE02

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

CODE_A1AE8F:
	LDA.b $1A
	AND.w #$0080
	BEQ.b CODE_A1AF14
	LDA.b $1A
	AND.w #$FF7F
	STA.b $1A
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_A1AF14
	DEC
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #!Define_JP_TextureID00F5_ShotgunBullet
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEP.b #$20
	LDA.b $A7
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	REP.b #$20
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	SEP.b #$20
	LDA.b $AA
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_12
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.b $7A
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$0001
	STA.w $1709,x
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w $16E9,x
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w $16F9,x
	REP.b #$30
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_FireShotgun&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
CODE_A1AF14:
	BRL.w CODE_A1AE02

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

CODE_A1AF17:
	LDA.b $1A
	AND.w #$0080
	BEQ.b CODE_A1AF9C
	LDA.b $1A
	AND.w #$FF7F
	STA.b $1A
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_A1AF9C
	DEC
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #!Define_JP_TextureID00F7_Dart
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEP.b #$20
	LDA.b $A7
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	REP.b #$20
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	SEP.b #$20
	LDA.b $AA
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_12
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.b $7A
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$0002
	STA.w $1709,x
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w $16E9,x
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w $16F9,x
	REP.b #$30
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_FireRocketLauncherOrTranquilizerGun&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
CODE_A1AF9C:
	BRL.w CODE_A1AE02

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

CODE_A1AF9F:
	LDA.w $1757
	BEQ.b CODE_A1AFA7
	BRL.w CODE_A1B07D

CODE_A1AFA7:
	LDA.b $1A
	AND.w #$0080
	BNE.b CODE_A1AFB1
	BRL.w CODE_A1B07D

CODE_A1AFB1:
	LDA.b $1A
	AND.w #$FF7F
	STA.b $1A
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BNE.b CODE_A1AFC0
	BRL.w CODE_A1B07D

CODE_A1AFC0:
	DEC
	STA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	LDA.w #!Define_JP_TextureID00F6_Rocket
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEP.b #$20
	LDA.b $A7
	EOR.b #$FF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.w $1763
	REP.b #$20
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	SEP.b #$20
	LDA.b $AA
	EOR.b #$FF
	INC
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	STA.w $1764
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_1A
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$005A
	STA.w $7EAEE0,y
	LDA.w #$005C
	STA.w $7EAEF2,y
	LDA.w #$005E
	STA.w $7EAF04,y
	LDA.w #$FFFF
	STA.w $7EAEDE,y
	STA.w $7EAEF0,y
	STA.w $7EAF02,y
	LDA.b $7A
	STA.w $1759
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	STA.w $7EAEE2,y
	STA.w $7EAEF4,y
	STA.w $7EAF06,y
	LDX.w $16E7
	STZ.w $1719,x
	LDA.w #$0003
	STA.w $1709,x
	LDA.b $A8
	EOR.w #$FFFF
	INC
	STA.w $16E9,x
	STA.w $175B
	STA.w $175F
	LDA.b $AB
	EOR.w #$FFFF
	INC
	STA.w $16F9,x
	STA.w $175D
	STA.w $1761
	REP.b #$30
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_FireGasGrenade&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
	LDA.w #$0001
	STA.w $1757
	STA.w $1743
CODE_A1B07D:
	BRL.w CODE_A1AE02

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

CODE_A1B080:
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1B0A3
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BEQ.b CODE_A1B0C9
CODE_A1B0A3:
	JSR.w CODE_A1BAB9
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1B0E6
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BNE.b CODE_A1B0E6
CODE_A1B0C9:
	LDA.w #!Define_JP_SoundID_ShotHitsWall
	JSR.w CODE_A1B54D
CODE_A1B0CF:
	REP.b #$30
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_10
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	BRL.w CODE_A1AE02

CODE_A1B0E6:
	REP.b #$30
	LDA.w #$00FF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	JSR.w CODE_A1BAB9
	LDX.w $16E7
	LDA.w $1719,x
	BPL.b CODE_A1B0FC
	BRL.w CODE_A1B0CF

CODE_A1B0FC:
	LDA.b $3D
	STA.w $16E9,x
	LDA.b $40
	STA.w $16F9,x
	BRL.w CODE_A1AE02

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

CODE_A1B109:
	LDA.w JP_Interior_EntityTable[$00].Unknown5,y
	BEQ.b CODE_A1B136
	INC
	CMP.w #$0006
	BEQ.b CODE_A1B119
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	BRA.b CODE_A1B136

CODE_A1B119:
	REP.b #$30
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_60
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	BRL.w CODE_A1AE02

CODE_A1B136:
	REP.b #$30
	LDA.w #$00FF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	JSR.w CODE_A1BAB9
	JSR.w CODE_A1BAB9
	LDA.b $3D
	CMP.w $175B
	BNE.b CODE_A1B154
	LDA.b $40
	CMP.w $175D
	BNE.b CODE_A1B154
	BRA.b CODE_A1B119

CODE_A1B154:
	LDX.w $16E7
	LDA.w $1719,x
	BPL.b CODE_A1B15F
	BRL.w CODE_A1B119

CODE_A1B15F:
	LDA.b $3D
	STA.w $16E9,x
	LDA.b $40
	STA.w $16F9,x
	BRL.w CODE_A1AE02

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

CODE_A1B16C:
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	CMP.w #!Define_JP_WeaponID_RocketLauncher
	BEQ.b CODE_A1B17A
	LDA.w #!Define_JP_InteriorEntityID_10
	STA.w JP_Interior_EntityTable[$00].IDLo,y
CODE_A1B17A:
	BRL.w CODE_A1AE02

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

CODE_A1B17D:
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1B1A0
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BEQ.b CODE_A1B1C6
CODE_A1B1A0:
	JSR.w CODE_A1BAB9
	JSR.w CODE_A1B6B0
	SEP.b #$20
	AND.b #$40
	BEQ.b CODE_A1B1FB
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHY
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	PLY
	AND.w #$00FF
	BNE.b CODE_A1B1FB
CODE_A1B1C6:
	LDA.w #!Define_JP_SoundID_ShotHitsWall
	JSR.w CODE_A1B54D
CODE_A1B1CC:
	REP.b #$30
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_10
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$0004
	STA.w $7EAEE4,y
	LDA.w #$0003
	STA.w $7EAEF6,y
	LDA.w #$0002
	STA.w $7EAF08,y
	LDX.w $16E7
	LDA.w #$FFFF
	STA.w $1719,x
	STZ.w $1755
	STZ.w $1757
	BRL.w CODE_A1AE02

CODE_A1B1FB:
	REP.b #$30
	LDA.w #$00FF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	JSR.w CODE_A1BAB9
	LDX.w $16E7
	LDA.w $1719,x
	BPL.b CODE_A1B211
	BRL.w CODE_A1B1CC

CODE_A1B211:
	INC.w $1755
	LDA.w #$0001
	STA.w $1743
	LDA.b $3D
	STA.w $16E9,x
	LDA.b $40
	STA.w $16F9,x
	BRL.w CODE_A1AE02

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

CODE_A1B227:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $3D
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $40
	SEP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $3C
	LDA.w JP_Interior_EntityTable[$00].Unknown8,y
	STA.b $3F
	REP.b #$20
	TXA
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	SEP.b #$20
	LDX.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.l $7FCC4C,x
	XBA
	LDA.l $7FBE4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $3C
	STA.b $3C
	SEP.b #$20
	LDA.l $7FCC4C,x
	ADC.b $3E
	STA.b $3E
	LDA.l $7FCA4C,x
	XBA
	LDA.l $7FBC4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $3F
	STA.b $3F
	SEP.b #$20
	LDA.l $7FCA4C,x
	ADC.b $41
	STA.b $41
	LDX.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $3C
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $3F
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.b $3D
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.b $40
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	RTS

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

CODE_A1B2AF:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $3D
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $40
	SEP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $3C
	LDA.w JP_Interior_EntityTable[$00].Unknown8,y
	STA.b $3F
	REP.b #$20
	TXA
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	SEP.b #$20
	LDX.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.l $7FCC4C,x
	XBA
	LDA.l $7FBE4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $3C
	STA.b $3C
	SEP.b #$20
	LDA.l $7FCC4C,x
	ADC.b $3E
	STA.b $3E
	LDA.l $7FCA4C,x
	XBA
	LDA.l $7FBC4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $3F
	STA.b $3F
	SEP.b #$20
	LDA.l $7FCA4C,x
	ADC.b $41
	STA.b $41
	LDX.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $3C
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $3F
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.b $3D
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.b $40
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	RTS

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

CODE_A1B339:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $3D
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $40
	SEP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $3C
	LDA.w JP_Interior_EntityTable[$00].Unknown8,y
	STA.b $3F
	REP.b #$20
	TXA
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	SEP.b #$20
	LDX.w JP_Interior_EntityTable[$00].Unknown4,y
	LDA.l $7FC84C,x
	XBA
	LDA.l $7FBA4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $3C
	STA.b $3C
	SEP.b #$20
	LDA.l $7FC84C,x
	ADC.b $3E
	STA.b $3E
	LDA.l $7FCE4C,x
	XBA
	LDA.l $7FC04C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $3F
	STA.b $3F
	SEP.b #$20
	LDA.l $7FCE4C,x
	ADC.b $41
	STA.b $41
	LDX.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $3C
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $3F
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	REP.b #$20
	LDA.b $3D
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.b $40
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	RTS

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

CODE_A1B3C1:
	LDA.b $7A
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown4,y
	XBA
	DEC
	AND.w #$0006
	TAX
	LDA.l DATA_A1C21C,x
	CLC
	ADC.b $6F
	TAX
	SEP.b #$20
	LDA.l DATA_A1C244,x
	XBA
	LDA.l DATA_A1C22C,x
	REP.b #$20
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	RTS

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

CODE_A1B3E6:
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown4,y
	AND.w #$07FF
	STA.w JP_Interior_EntityTable[$00].Unknown4,y
	RTS

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

CODE_A1B3F1:
	JSR.w CODE_A1B3FB
	LDA.w #!Define_JP_InteriorEntityID_DeadOrDeletedEntity
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

CODE_A1B3FB:
	LDA.w #$FFFF
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	RTS

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

CODE_A1B402:
	REP.b #$30
	PHA
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.b $A8
	BPL.b CODE_A1B41E
	EOR.w #$FFFF
	INC
CODE_A1B41E:
	LSR
	CMP.w #$0080
	BCS.b CODE_A1B46A
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	NOP #3
	REP.b #$20
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	STA.b $54
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $AB
	BPL.b CODE_A1B445
	EOR.w #$FFFF
	INC
CODE_A1B445:
	LSR
	CMP.w #$0080
	BCS.b CODE_A1B46A
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	NOP #3
	REP.b #$20
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	CLC
	ADC.b $54
	STA.b $54
	PLA
	CMP.b $54
	BCS.b CODE_A1B46D
	CLC
	RTS

CODE_A1B46A:
	PLA
	CLC
	RTS

CODE_A1B46D:
	SEC
	RTS

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

; Note: Routine that checks how close the player is to an entity.

CODE_A1B46F:
	REP.b #$30
	PHA
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.b $A8
	BPL.b CODE_A1B48B
	EOR.w #$FFFF
	INC
CODE_A1B48B:
	LSR
	LSR
	CMP.w #$0080
	BCS.b CODE_A1B4D9
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	NOP #3
	REP.b #$20
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	STA.b $54
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $AB
	BPL.b CODE_A1B4B3
	EOR.w #$FFFF
	INC
CODE_A1B4B3:
	LSR
	LSR
	CMP.w #$0080
	BCS.b CODE_A1B4D9
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	NOP #3
	REP.b #$20
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	CLC
	ADC.b $54
	STA.b $54
	PLA
	CMP.b $54
	BCS.b CODE_A1B4DC
	CLC
	RTS

CODE_A1B4D9:
	PLA
	CLC
	RTS

CODE_A1B4DC:
	SEC
	RTS

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

CODE_A1B4DE:
	REP.b #$20
	PHA
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEC
	SBC.w $1729
	BPL.b CODE_A1B4FB
	EOR.w #$FFFF
	INC
CODE_A1B4FB:
	LSR
	CMP.w #$0080
	BCS.b CODE_A1B548
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	NOP #3
	REP.b #$20
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	STA.b $54
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	SEC
	SBC.w $172B
	BPL.b CODE_A1B523
	EOR.w #$FFFF
	INC
CODE_A1B523:
	LSR
	CMP.w #$0080
	BCS.b CODE_A1B548
	SEP.b #$20
	STA.l !REGISTER_Multiplicand|!FastROMAddressOffset
	STA.l !REGISTER_Multiplier|!FastROMAddressOffset
	NOP #3
	REP.b #$20
	LDA.l !REGISTER_ProductOrRemainderLo|!FastROMAddressOffset
	CLC
	ADC.b $54
	STA.b $54
	PLA
	CMP.b $54
	BCS.b CODE_A1B54B
	CLC
	RTS

CODE_A1B548:
	PLA
	CLC
	RTS

CODE_A1B54B:
	SEC
	RTS

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

CODE_A1B54D:
	SEP.b #$20
	PHA
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	CLC
	ADC.b $DA
	TAX
	LDA.w $7EA0A4,x
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	CMP.w #$0901
	BCS.b CODE_A1B595
	CMP.w #$0700
	BCC.b CODE_A1B595
	STA.w $173F
	LDA.w $7EA0A8,x
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	CMP.w #$0901
	BCS.b CODE_A1B595
	CMP.w #$0700
	BCC.b CODE_A1B595
	STA.w $1741
	SEP.b #$20
	PLA
	REP.b #$30
	JSL.l CODE_A4EF9B
	RTS

CODE_A1B595:
	SEP.b #$20
	PLA
	RTS

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

CODE_A1B599:
	REP.b #$20
	LDA.w #$0000
	STA.b $61
	LDA.w #$007F
	STA.b $63
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B5C8
	REP.b #$20
	LDA.w #$FF81
	STA.b $63
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B5C8
	CLC
	RTS

CODE_A1B5C8:
	SEC
	RTS

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

CODE_A1B5CA:
	REP.b #$20
	LDA.w #$007F
	STA.b $61
	LDA.w #$0000
	STA.b $63
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B5F9
	REP.b #$20
	LDA.w #$FF81
	STA.b $61
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B5F9
	CLC
	RTS

CODE_A1B5F9:
	SEC
	RTS

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

CODE_A1B5FB:
	SEC
	RTS

CODE_A1B5FD:
	REP.b #$20
	LDA.w #$FFD0
	STA.b $61
	LDA.w #$FFD0
	STA.b $63
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B5FB
	REP.b #$20
	LDA.w #$0000
	STA.b $61
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B5FB
	REP.b #$20
	LDA.w #$0030
	STA.b $61
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B6AE
	REP.b #$20
	LDA.w #$FFD0
	STA.b $61
	LDA.w #$0000
	STA.b $63
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B6AE
	REP.b #$20
	LDA.w #$0030
	STA.b $61
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B6AE
	REP.b #$20
	LDA.w #$FFD0
	STA.b $61
	LDA.w #$0030
	STA.b $63
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B6AE
	REP.b #$20
	LDA.w #$0000
	STA.b $61
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B6AE
	REP.b #$20
	LDA.w #$0030
	STA.b $61
	JSR.w CODE_A1B6FD
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$C0
	BNE.b CODE_A1B6AE
	CLC
	RTS

CODE_A1B6AE:
	SEC
	RTS

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

CODE_A1B6B0:
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.l $80169E
	BPL.b CODE_A1B6CC
	LDA.w #$0000
CODE_A1B6CC:
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.b $3C
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	EOR.w #$FFFF
	INC
	CLC
	ADC.l $8016A0
	BPL.b CODE_A1B6E5
	LDA.w #$0000
CODE_A1B6E5:
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.b $3C
	TAX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	RTS

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

CODE_A1B6FD:
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.l $80169E
	CLC
	ADC.b $61
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.b $3C
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	EOR.w #$FFFF
	INC
	CLC
	ADC.l $8016A0
	CLC
	ADC.b $63
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.b $3C
	TAX
	RTS

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

CODE_A1B740:
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.b $A8
	STA.w $16CC
	BPL.b CODE_A1B75E
	EOR.w #$FFFF
	INC
CODE_A1B75E:
	STA.w $16CE
	ASL
	STA.w $16D0
	ASL
	STA.w $16D4
	SEC
	SBC.w $16CE
	STA.w $16D2
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $AB
	STA.w $16D6
	BPL.b CODE_A1B77F
	EOR.w #$FFFF
	INC
CODE_A1B77F:
	STA.w $16D8
	ASL
	STA.w $16DA
	ASL
	STA.w $16DE
	SEC
	SBC.w $16D8
	STA.w $16DC
	LDA.w $16D4
	CMP.w $16D8
	BCS.b CODE_A1B7A0
	LDA.w $16D6
	BPL.b CODE_A1B810
	BMI.b CODE_A1B800				; Note: This will always branch.

CODE_A1B7A0:
	LDA.w $16D2
	CMP.w $16DA
	BCS.b CODE_A1B7BB
	LDA.w $16D6
	BPL.b CODE_A1B7B4
	LDA.w $16CC
	BPL.b CODE_A1B7FC
	BMI.b CODE_A1B804				; Note: This will always branch.

CODE_A1B7B4:
	LDA.w $16CC
	BPL.b CODE_A1B814
	BMI.b CODE_A1B80C				; Note: This will always branch.

CODE_A1B7BB:
	LDA.w $16D0
	CMP.w $16DC
	BCS.b CODE_A1B7D6
	LDA.w $16D6
	BPL.b CODE_A1B7CF
	LDA.w $16CC
	BPL.b CODE_A1B828
	BMI.b CODE_A1B82C				; Note: This will always branch.

CODE_A1B7CF:
	LDA.w $16CC
	BPL.b CODE_A1B818
	BMI.b CODE_A1B808				; Note: This will always branch.

CODE_A1B7D6:
	LDA.w $16CE
	CMP.w $16DE
	BCS.b CODE_A1B7F1
	LDA.w $16D6
	BPL.b CODE_A1B7EA
	LDA.w $16CC
	BPL.b CODE_A1B824
	BMI.b CODE_A1B830				; Note: This will always branch.

CODE_A1B7EA:
	LDA.w $16CC
	BPL.b CODE_A1B81C
	BMI.b CODE_A1B838				; Note: This will always branch.

CODE_A1B7F1:
	LDA.w $16CC
	BPL.b CODE_A1B820
	BMI.b CODE_A1B834				; Note: This will always branch.

CODE_A1B7F8:
	LDA.w #$FFFF
	RTS

CODE_A1B7FC:
	LDA.w #$0007
	RTS

CODE_A1B800:
	LDA.w #$0008
	RTS

CODE_A1B804:
	LDA.w #$0009
	RTS

CODE_A1B808:
	LDA.w #$000E
	RTS

CODE_A1B80C:
	LDA.w #$000F
	RTS

CODE_A1B810:
	LDA.w #$0000
	RTS

CODE_A1B814:
	LDA.w #$0001
	RTS

CODE_A1B818:
	LDA.w #$0002
	RTS

CODE_A1B81C:
	LDA.w #$0003
	RTS

CODE_A1B820:
	LDA.w #$0004
	RTS

CODE_A1B824:
	LDA.w #$0005
	RTS

CODE_A1B828:
	LDA.w #$0006
	RTS

CODE_A1B82C:
	LDA.w #$000A
	RTS

CODE_A1B830:
	LDA.w #$000B
	RTS

CODE_A1B834:
	LDA.w #$000C
	RTS

CODE_A1B838:
	LDA.w #$000D
	RTS

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

CODE_A1B83C:
	REP.b #$30
	LDX.w #$0000
CODE_A1B841:
	LDA.w $1719,x
	BMI.b CODE_A1B86E
	LDA.w $16E9,x
	STA.w $1729
	LDA.w $16F9,x
	STA.w $172B
	PHX
	LDA.w $1709,x
	CMP.w #$0004
	BNE.b CODE_A1B860
	LDA.w #$2710
	BRA.b CODE_A1B863

CODE_A1B860:
	LDA.w #$0900
CODE_A1B863:
	JSR.w CODE_A1B4DE
	REP.b #$30
	PLX
	BCC.b CODE_A1B86E
	BRL.w CODE_A1B876

CODE_A1B86E:
	INX
	INX
	CPX.w #$0010
	BNE.b CODE_A1B841
	RTS

CODE_A1B876:
	LDA.w #$FFFF
	STA.w $1719,x
	LDA.w $1709,x
	CMP.w #$0000
	BEQ.b CODE_A1B8A0
	CMP.w #$0001
	BEQ.b CODE_A1B8B7
	CMP.w #$0002
	BEQ.b CODE_A1B8C8
	CMP.w #$0003
	BEQ.b CODE_A1B8CA
	CMP.w #$0004
	BEQ.b CODE_A1B8CC
	CMP.w #$0005
	BEQ.b CODE_A1B8DD
	BRL.w CODE_A1B86E

CODE_A1B8A0:
	LDA.w #!Define_JP_TextureID00A4_RaptorLunge3_Left
	STA.w JP_Interior_EntityTable[$00].TextureIndexLo,y
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	CLC
	ADC.w #$0008
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	CMP.w #$0046
	BCC.b CODE_A1B8DF
	BRA.b CODE_A1B921

CODE_A1B8B7:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	CLC
	ADC.w #$0018
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	CMP.w #$0046
	BCC.b CODE_A1B8E5
	BRA.b CODE_A1B8FC

CODE_A1B8C8:
	BRA.b CODE_A1B921

CODE_A1B8CA:
	BRA.b CODE_A1B946

CODE_A1B8CC:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	CLC
	ADC.w #$0008
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	CMP.w #$0046
	BCC.b CODE_A1B8F9
	BRA.b CODE_A1B921

CODE_A1B8DD:
	BRA.b CODE_A1B946

CODE_A1B8DF:
	LDA.w #$0000
	STA.w $1719,x
CODE_A1B8E5:
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	CMP.w #!Define_JP_InteriorEntityID_LungingRaptor
	BEQ.b CODE_A1B8F9
	LDA.w #!Define_JP_InteriorEntityID_LungingRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w #$0009
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
CODE_A1B8F9:
	BRL.w CODE_A1B86E

CODE_A1B8FC:
	REP.b #$30
	LDA.w #!Define_JP_InteriorEntityID_DeadRaptor
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	SEP.b #$20
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveHundredsDigit
	LDA.b #$02
	STA.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	JSL.l CODE_A4B9CD
	BRL.w CODE_A1B86E

CODE_A1B921:
	REP.b #$30
	LDA.w #!Define_JP_InteriorEntityID_26
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	SEP.b #$20
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveHundredsDigit
	LDA.b #$02
	STA.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	JSL.l CODE_A4B9CD
	BRL.w CODE_A1B86E

CODE_A1B946:
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	CMP.w #!Define_JP_InteriorEntityID_ExplodingDino
	BEQ.b CODE_A1B976
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_ExplodingDino
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	SEP.b #$20
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveHundredsDigit
	LDA.b #$02
	STA.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	JSL.l CODE_A4B9CD
CODE_A1B976:
	BRL.w CODE_A1B86E

CODE_A1B979:
	REP.b #$30
	LDX.w #$0000
CODE_A1B97E:
	LDA.w $1719,x
	BMI.b CODE_A1B9A9
	LDA.w $16E9,x
	STA.w $1729
	LDA.w $16F9,x
	STA.w $172B
	PHX
	LDA.w $1709,x
	CMP.w #$0004
	BNE.b CODE_A1B99D
	LDA.w #$2710
	BRA.b CODE_A1B9A0

CODE_A1B99D:
	LDA.w #$0640
CODE_A1B9A0:
	JSR.w CODE_A1B4DE
	PLX
	BCC.b CODE_A1B9A9
	BRL.w CODE_A1B9B1

CODE_A1B9A9:
	INX
	INX
	CPX.w #$0010
	BNE.b CODE_A1B97E
	RTS

CODE_A1B9B1:
	LDA.w #$FFFF
	STA.w $1719,x
	LDA.w $1709,x
	CMP.w #$0000
	BEQ.b CODE_A1B9DB
	CMP.w #$0001
	BEQ.b CODE_A1B9EC
	CMP.w #$0002
	BEQ.b CODE_A1B9FD
	CMP.w #$0003
	BEQ.b CODE_A1B9FF
	CMP.w #$0004
	BEQ.b CODE_A1BA01
	CMP.w #$0005
	BEQ.b CODE_A1BA12
	BRL.w CODE_A1B9A9

CODE_A1B9DB:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	CLC
	ADC.w #$0008
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	CMP.w #$003C
	BCC.b CODE_A1BA14
	BRA.b CODE_A1BA1D

CODE_A1B9EC:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	CLC
	ADC.w #$001F
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	CMP.w #$003C
	BCC.b CODE_A1BA1A
	BRA.b CODE_A1BA1D

CODE_A1B9FD:
	BRA.b CODE_A1BA1D

CODE_A1B9FF:
	BRA.b CODE_A1BA46

CODE_A1BA01:
	LDA.w JP_Interior_EntityTable[$00].Unknown9,y
	CLC
	ADC.w #$0008
	STA.w JP_Interior_EntityTable[$00].Unknown9,y
	CMP.w #$003C
	BCC.b CODE_A1BA1A
	BRA.b CODE_A1BA1D

CODE_A1BA12:
	BRA.b CODE_A1BA46

CODE_A1BA14:
	LDA.w #$0000
	STA.w $1719,x
CODE_A1BA1A:
	BRL.w CODE_A1B9A9

CODE_A1BA1D:
	LDA.w #$0000
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_FallingDeadDilophosaur
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	SEP.b #$20
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveHundredsDigit
	LDA.b #$01
	STA.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	JSL.l CODE_A4B9CD
	BRL.w CODE_A1B9A9

CODE_A1BA46:
	REP.b #$30
	LDA.w #$000C
	STA.w JP_Interior_EntityTable[$00].Unknown5,y
	LDA.w #!Define_JP_InteriorEntityID_ExplodingDino
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	SEP.b #$20
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveHundredsDigit
	LDA.b #$01
	STA.w !RAM_JP_Global_Player_PointsToGiveTensDigit
	LDA.b #$00
	STA.w !RAM_JP_Global_Player_PointsToGiveOnesDigit
	JSL.l CODE_A4B9CD
	BRL.w CODE_A1B9A9

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

CODE_A1BA71:
	REP.b #$30
	LDA.w #$0400
	JSR.w CODE_A1B402
	BCC.b CODE_A1BAB7
	REP.b #$30
	SEI
	LDA.b $B3
	STA.b $AD
	STA.b $95
	STA.b $A7
	STA.b $8F
	LDA.b $B6
	STA.b $B0
	STA.b $98
	STA.b $AA
	STA.b $92
	SEP.b #$20
	LDA.b $B5
	STA.b $AF
	STA.b $97
	STA.b $A9
	STA.b $91
	LDA.b $B8
	STA.b $B2
	STA.b $9A
	STA.b $AC
	STA.b $94
	JSL.l CODE_A489DB
	SEP.b #$20
	LDA.b #$FF
	STA.b $F4
	CLI
	REP.b #$30
	SEC
	RTS

CODE_A1BAB7:
	CLC
	RTS

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

CODE_A1BAB9:
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.b $D8
CODE_A1BAC6:
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $3D
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $40
	SEP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown7,y
	STA.b $3C
	LDA.w JP_Interior_EntityTable[$00].Unknown8,y
	STA.b $3F
	PHX
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown4,y
	AND.w #$07FF
	TAX
	LDA.w #$0000
	SEP.b #$20
	LDA.l DATA_A4F0AA,x
	REP.b #$20
	BPL.b CODE_A1BAF8
	ORA.w #$FF00
CODE_A1BAF8:
	CLC
	ADC.b $3D
	STA.b $3D
	TXA
	CLC
	ADC.w #$0200
	AND.w #$07FF
	TAX
	LDA.w #$0000
	SEP.b #$20
	LDA.l DATA_A4F0AA,x
	REP.b #$20
	BPL.b CODE_A1BB16
	ORA.w #$FF00
CODE_A1BB16:
	CLC
	ADC.b $40
	STA.b $40
	SEP.b #$20
	LDA.b $3C
	STA.w JP_Interior_EntityTable[$00].Unknown7,y
	LDA.b $3F
	STA.w JP_Interior_EntityTable[$00].Unknown8,y
	PLX
	REP.b #$20
	LDA.b $3D
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.b $40
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	RTS

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

CODE_A1BB35:
	JSR.w CODE_A1BEBF
	REP.b #$30
	LDA.w !RAM_JP_Global_Player_CurrentLifeCountLo
	CMP.w #$0005
	BCC.b CODE_A1BB45
	LDA.w #$0004
CODE_A1BB45:
	ASL
	ASL
	ASL
	TAX
	LDA.l DATA_A1BE64,x
	STA.w $1626
	LDA.w #$000A
	STA.w $1622
	LDA.w #$0071
	STA.w $1624
	LDA.w #$0008
	PHX
	JSL.l CODE_A4D574
	PLX
	REP.b #$30
	LDA.l DATA_A1BE64+$02,x
	STA.w $1626
	LDA.w #$00E7
	STA.w $1622
	LDA.w #$0009
	PHX
	JSL.l CODE_A4D574
	PLX
	REP.b #$30
	LDA.l DATA_A1BE64+$04,x
	STA.w $1626
	LDA.w #$000A
	STA.w $1622
	LDA.w #$008D
	STA.w $1624
	LDA.w #$000A
	PHX
	JSL.l CODE_A4D574
	PLX
	REP.b #$30
	LDA.l DATA_A1BE64+$06,x
	STA.w $1626
	LDA.w #$00E7
	STA.w $1622
	LDA.w #$000B
	PHX
	JSL.l CODE_A4D574
	PLX
	REP.b #$30
	LDA.w #$0070
	STA.w $1622
	LDA.w #$002C
	STA.w $1624
	LDA.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit
	AND.w #$00FF
	CLC
	ADC.w #$3E10
	STA.w $1626
	LDA.w #$FFB4
	JSL.l CODE_A4D5CC
	REP.b #$31
	LDA.w $1622
	ADC.w #$0008
	STA.w $1622
	LDA.w !RAM_JP_Global_Player_CurrentScoreHundredsDigit
	AND.w #$00FF
	CLC
	ADC.w #$3E10
	STA.w $1626
	LDA.w #$FFB5
	JSL.l CODE_A4D5CC
	REP.b #$31
	LDA.w $1622
	ADC.w #$0008
	STA.w $1622
	LDA.w !RAM_JP_Global_Player_CurrentScoreTensDigit
	AND.w #$00FF
	CLC
	ADC.w #$3E10
	STA.w $1626
	LDA.w #$FFB6
	JSL.l CODE_A4D5CC
	REP.b #$31
	LDA.w $1622
	ADC.w #$0008
	STA.w $1622
	LDA.w !RAM_JP_Global_Player_CurrentScoreOnesDigit
	AND.w #$00FF
	CLC
	ADC.w #$3E10
	STA.w $1626
	LDA.w #$FFB7
	JSL.l CODE_A4D5CC
	REP.b #$30
	LDA.w #$00A0
	STA.w $1622
	LDA.w #$00A8
	STA.w $1624
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	LSR
	LSR
	LSR
	LSR
	CMP.w #$0010
	BCC.b CODE_A1BC4F
	LDA.w #$0010
CODE_A1BC4F:
	STA.b $56
	ASL
	CLC
	ADC.b $56
	TAX
	SEP.b #$20
	LDA.l DATA_A1BE8C,x
	REP.b #$20
	AND.w #$00FF
	ORA.w #$3E00
	STA.w $1626
	LDA.w #$0047
	PHX
	JSL.l CODE_A4D574
	PLX
	SEP.b #$20
	LDA.l DATA_A1BE8C+$01,x
	REP.b #$20
	AND.w #$00FF
	ORA.w #$3E00
	STA.w $1626
	LDA.w #$00B0
	STA.w $1622
	LDA.w #$0048
	PHX
	JSL.l CODE_A4D574
	PLX
	SEP.b #$20
	LDA.l DATA_A1BE8C+$02,x
	REP.b #$20
	AND.w #$00FF
	ORA.w #$3E00
	STA.w $1626
	LDA.w #$00C0
	STA.w $1622
	LDA.w #$0049
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w $037D
	BNE.b CODE_A1BCBD
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BEQ.b CODE_A1BCBD
	BRL.w CODE_A1BDC5

CODE_A1BCBD:
	LDA.b $16
	AND.w #$0080
	BNE.b CODE_A1BCC7
	BRL.w CODE_A1BDC5

CODE_A1BCC7:
	LDA.b $16
	AND.w #$FF7F
	STA.b $16
	LDA.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	BNE.b CODE_A1BCD6
	BRL.w CODE_A1BDC5

CODE_A1BCD6:
	DEC.w !RAM_JP_Global_Payer_CattleProdAmmoLo
	LDX.w $1789
	LDA.l DATA_A1BE24,x
	STA.w $1626
	LDA.w #$0078
	CLC
	ADC.l DATA_A1BE24+$0A,x
	STA.w $1622
	LDA.w #$0080
	STA.w $1624
	LDA.w #$007B
	JSL.l CODE_A4D574
	REP.b #$30
	LDX.w $1789
	LDA.l DATA_A1BE24+$02,x
	STA.w $1626
	LDA.w #$0070
	STA.w $1622
	LDA.w #$0090
	STA.w $1624
	LDA.w #$007C
	JSL.l CODE_A4D574
	REP.b #$30
	LDX.w $1789
	LDA.l DATA_A1BE24+$04,x
	STA.w $1626
	LDA.w #$0080
	STA.w $1622
	LDA.w #$007D
	JSL.l CODE_A4D574
	REP.b #$30
	LDX.w $1789
	LDA.l DATA_A1BE24+$06,x
	STA.w $1626
	LDA.w #$0068
	STA.w $1622
	LDA.w #$00A0
	STA.w $1624
	LDA.w #$007E
	JSL.l CODE_A4D574
	REP.b #$30
	LDX.w $1789
	LDA.l DATA_A1BE24+$08,x
	STA.w $1626
	LDA.w #$0088
	STA.w $1622
	LDA.w #$007F
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w $1789
	CLC
	ADC.w #$0010
	AND.w #$0030
	STA.w $1789
	LDA.w $1775
	BNE.b CODE_A1BD91
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_FireCattleProd&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_A4EF83
	PLY
	LDA.w #$FFFF
	STA.w $1775
CODE_A1BD91:
	REP.b #$30
	LDX.b $7A
	SEP.b #$20
	LDA.l $7FC84C,x
	XBA
	LDA.l $7FBA4C,x
	REP.b #$20
	SEC
	SBC.b $A8
	STA.w $16F7
	SEP.b #$20
	LDA.l $7FCA4C,x
	XBA
	LDA.l $7FBC4C,x
	REP.b #$20
	SEC
	SBC.b $AB
	STA.w $1707
	LDA.w #$0000
	STA.w $1717
	STA.w $1727
	RTL

CODE_A1BDC5:
	REP.b #$30
	LDA.w #$FFFF
	STA.w $1727
	LDA.w #$3C2F
	STA.w $1626
	LDA.w #$00FF
	STA.w $1622
	LDA.w #$00FF
	STA.w $1624
	LDA.w #$007B
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w #$007C
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w #$007D
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w #$007E
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w #$007F
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w $1775
	BEQ.b CODE_A1BE23
	PHY
	LDA.w #!Define_JP_SoundCommand_Unknown08
	LDY.w #$0000
	JSL.l CODE_A4EF83
	PLY
	LDA.w #$0000
	STA.w $1775
CODE_A1BE23:
	RTL

DATA_A1BE24:
	db $1E,$36,$72,$36,$73,$36,$29,$36,$6E,$36,$FE,$FF,$00,$00,$00,$00
	db $1F,$36,$74,$36,$75,$36,$2A,$36,$6F,$36,$00,$00,$00,$00,$00,$00
	db $28,$36,$76,$36,$77,$36,$2B,$36,$70,$36,$00,$00,$00,$00,$00,$00
	db $1E,$76,$78,$36,$79,$36,$6D,$36,$71,$36,$02,$00,$00,$00,$00,$00

DATA_A1BE64:
	db $2F,$3C,$2F,$3C,$2F,$3C,$2F,$3C,$20,$3C,$2F,$3C,$2F,$3C,$2F,$3C
	db $20,$3C,$20,$3C,$2F,$3C,$2F,$3C,$20,$3C,$20,$3C,$20,$3C,$2F,$3C
	db $20,$3C,$20,$3C,$20,$3C,$20,$3C

DATA_A1BE8C:
	db $50,$51,$52,$53,$51,$54,$55,$51,$56,$57,$51,$58,$59,$51,$5A,$5B
	db $51,$5C,$5D,$5E,$5C,$5F,$60,$5C,$61,$62,$5C,$63,$64,$5C,$65,$66
	db $5C,$67,$68,$5C,$67,$69,$5C,$67,$6A,$5C,$67,$6B,$5C,$67,$6C,$5C
	db $67,$16,$5C

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

CODE_A1BEBF:
	REP.b #$30
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	BNE.b CODE_A1BEF0
	LDA.w #$00E7
	STA.w $1622
	LDA.w #$0044
	STA.w $1624
	LDA.w #$3C2F
	STA.w $1626
	LDA.w #$0006
	JSL.l CODE_A4D574
	REP.b #$30
	LDA.w #$0054
	STA.w $1624
	LDA.w #$0007
	JSL.l CODE_A4D574
	BRA.b CODE_A1BF5D

CODE_A1BEF0:
	LDX.w !RAM_JP_Global_Player_SecondaryWeaponLo
	LDA.l DATA_A1C098,x
	TAX
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	DEC
CODE_A1BEFC:
	DEX
	BMI.b CODE_A1BF02
	LSR
	BRA.b CODE_A1BEFC

CODE_A1BF02:
	INC
	CMP.w #$0005
	BCC.b CODE_A1BF0B
	LDA.w #$0004
CODE_A1BF0B:
	ASL
	ASL
	STA.b $56
	BRA.b CODE_A1BF20

CODE_A1BF11:
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponAmmoLo
	CMP.w #$0005
	BCC.b CODE_A1BF1C
	LDA.w #$0004
CODE_A1BF1C:
	ASL
	ASL
	STA.b $56
CODE_A1BF20:
	LDA.w !RAM_JP_Global_Player_SecondaryWeaponLo
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $56
	TAX
	LDA.l DATA_A1C0A2,x
	STA.w $1626
	LDA.w #$00E7
	STA.w $1622
	LDA.w #$0044
	STA.w $1624
	LDA.w #$0006
	PHX
	JSL.l CODE_A4D574
	REP.b #$30
	PLX
	LDA.l DATA_A1C0A2+$02,x
	STA.w $1626
	LDA.w #$0054
	STA.w $1624
	LDA.w #$0007
	JSL.l CODE_A4D574
CODE_A1BF5D:
	REP.b #$30
	LDA.w $037D
	BNE.b CODE_A1BF69
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	BNE.b CODE_A1BFA4
CODE_A1BF69:
	LDA.l !RAM_JP_Global_Payer_CattleProdAmmoLo
	ASL
	ASL
	TAX
	LDA.l DATA_A1C014,x
	STA.w $1626
	LDA.w #$0009
	STA.w $1622
	LDA.w #$0044
	STA.w $1624
	LDA.w #$0004
	PHX
	JSL.l CODE_A4D574
	REP.b #$30
	PLX
	LDA.l DATA_A1C014+$02,x
	STA.w $1626
	LDA.w #$0054
	STA.w $1624
	LDA.w #$0005
	JSL.l CODE_A4D574
	BRA.b CODE_A1C011

CODE_A1BFA4:
	LDX.w !RAM_JP_Global_Player_PrimaryWeaponLo
	LDA.l DATA_A1C098,x
	TAX
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	DEC
CODE_A1BFB0:
	DEX
	BMI.b CODE_A1BFB6
	LSR
	BRA.b CODE_A1BFB0

CODE_A1BFB6:
	INC
	CMP.w #$0005
	BCC.b CODE_A1BFBF
	LDA.w #$0004
CODE_A1BFBF:
	ASL
	ASL
	STA.b $56
	BRA.b CODE_A1BFD4

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

CODE_A1BFC5:
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponAmmoLo
	CMP.w #$0005
	BCC.b CODE_A1BFD0
	LDA.w #$0004
CODE_A1BFD0:
	ASL
	ASL
	STA.b $56
CODE_A1BFD4:
	LDA.w !RAM_JP_Global_Player_PrimaryWeaponLo
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $56
	TAX
	LDA.l DATA_A1C0A2,x
	STA.w $1626
	LDA.w #$000A
	STA.w $1622
	LDA.w #$0044
	STA.w $1624
	LDA.w #$0004
	PHX
	JSL.l CODE_A4D574
	REP.b #$30
	PLX
	LDA.l DATA_A1C0A2+$02,x
	STA.w $1626
	LDA.w #$0054
	STA.w $1624
	LDA.w #$0005
	JSL.l CODE_A4D574
CODE_A1C011:
	REP.b #$30
	RTS

DATA_A1C014:
	dw $3E2F,$3E2F,$3E2F,$3E4F,$3E2F,$3E4E,$3E2F,$3E4D
	dw $3E2F,$3E4C,$3E2F,$3E4B,$3E2F,$3E4A,$3E2F,$3E49
	dw $3E2F,$3E48,$3E2F,$3E47,$3E2F,$3E46,$3E2F,$3E45
	dw $3E2F,$3E44,$3E2F,$3E43,$3E2F,$3E42,$3E2F,$3E41
	dw $3E2F,$3E40,$3E4F,$3E40,$3E4E,$3E40,$3E4D,$3E40
	dw $3E4C,$3E40,$3E4B,$3E40,$3E4A,$3E40,$3E49,$3E40
	dw $3E48,$3E40,$3E47,$3E40,$3E46,$3E40,$3E45,$3E40
	dw $3E44,$3E40,$3E43,$3E40,$3E42,$3E40,$3E41,$3E40
	dw $3E40,$3E40

DATA_A1C098:
	dw $0003,$0001,$0002,$0002,$0001

DATA_A1C0A2:
	dw $3C2F,$3C2F,$3C2F,$3C21,$3C2F,$3C26,$3C21,$3C26
	dw $3C26,$3C26,$0000,$0000,$0000,$0000,$0000,$0000
	dw $3C2F,$3C2F,$3C2F,$3C22,$3C2F,$3C27,$3C22,$3C27
	dw $3C27,$3C27,$0000,$0000,$0000,$0000,$0000,$0000
	dw $3C2F,$3C2F,$3C2F,$3C23,$3C2F,$3C2C,$3C23,$3C2C
	dw $3C2C,$3C2C,$0000,$0000,$0000,$0000,$0000,$0000
	dw $3E2F,$3E2F,$3E2F,$3E24,$3E2F,$3E2D,$3E24,$3E2D
	dw $3E2D,$3E2D,$0000,$0000,$0000,$0000,$0000,$0000
	dw $3E2F,$3E2F,$3E2F,$3E25,$3E2F,$3E2E,$3E25,$3E2E
	dw $3E2E,$3E2E

DATA_A1C136:
	dw !Define_JP_TextureID00EB_ShotgunAmmo
	dw !Define_JP_TextureID00ED_RocketLauncherAmmo
	dw !Define_JP_TextureID00EC_TranquilizerGunAmmo
	dw !Define_JP_TextureID00EA_GasGrenadeAmmo
	dw !Define_JP_TextureID0100_BolasSnareRifleAmmo

DATA_A1C140:
	dw !Define_JP_InteriorEntityID_ShotgunAmmo
	dw !Define_JP_InteriorEntityID_RocketLauncherAmmo
	dw !Define_JP_InteriorEntityID_Tranquilizer
	dw !Define_JP_InteriorEntityID_GasGrenadeAmmo
	dw !Define_JP_InteriorEntityID_BolasSnareRifleAmmo

UNK_A1C14A:
	dw $0000,$07E0,$07C0,$07A0,$0780,$0760,$0740,$0720
	dw $0700,$06E0,$06C0,$06A0,$0680,$0660,$0640,$0620
	dw $0600,$05E0,$05C0,$05A0,$0580,$0560,$0540,$0520
	dw $0500,$04E0,$04C0,$04A0,$0480,$0460,$0440,$0420
	dw $0400,$03E0,$03C0,$03A0,$0380,$0360,$0340,$0320
	dw $0300,$02E0,$02C0,$02A0,$0280,$0260,$0240,$0220
	dw $0200,$01E0,$01C0,$01A0,$0180,$0160,$0140,$0120
	dw $0100,$00E0,$00C0,$00A0,$0080,$0060,$0040,$0020

DATA_A1C1CA:
	db $00
	db !Define_JP_TextureID0097_RaptorDying2_TowardsTail2
	db !Define_JP_TextureID009C_RaptorDying_SideBody
	db !Define_JP_TextureID0095_RaptorDying_Towards1
	db !Define_JP_TextureID0098_RaptorDying3_Head
	db !Define_JP_TextureID009A_RaptorDying4_HeadAndBody
	db $00
	db !Define_JP_TextureID0091_RaptorDying_Away1
	db !Define_JP_TextureID0092_RaptorDying_AwayBody2
	db !Define_JP_TextureID0095_RaptorDying_Towards1
	db !Define_JP_TextureID0098_RaptorDying3_Head
	db !Define_JP_TextureID009A_RaptorDying4_HeadAndBody
	db $00
	db !Define_JP_TextureID0095_RaptorDying_Towards1
	db !Define_JP_TextureID0098_RaptorDying3_Head
	db !Define_JP_TextureID009A_RaptorDying4_HeadAndBody
	db $00
	db !Define_JP_TextureID00C0_RaptorDying_Towards1
	db !Define_JP_TextureID00C2_RaptorDying3_Head
	db !Define_JP_TextureID00C4_RaptorDying4_HeadAndBody
	db $00

DATA_A1C1DF:
	db $00
	db $00
	db !Define_JP_TextureID009D_RaptorDying_SideTail
	db !Define_JP_TextureID0096_RaptorDying2_TowardsBody2
	db !Define_JP_TextureID0099_RaptorDying3_Tail
	db !Define_JP_TextureID009B_RaptorDying4_Legs
	db $00
	db $00
	db !Define_JP_TextureID0093_RaptorDying_AwayTail2
	db !Define_JP_TextureID0096_RaptorDying2_TowardsBody2
	db !Define_JP_TextureID0099_RaptorDying3_Tail
	db !Define_JP_TextureID009B_RaptorDying4_Legs
	db $00
	db !Define_JP_TextureID0096_RaptorDying2_TowardsBody2
	db !Define_JP_TextureID0099_RaptorDying3_Tail
	db !Define_JP_TextureID009B_RaptorDying4_Legs
	db $00
	db !Define_JP_TextureID00C1_RaptorDying2_TowardsBody2
	db !Define_JP_TextureID00C3_RaptorDying3_Tail
	db !Define_JP_TextureID00C5_RaptorDying4_Legs
	db $00
	db !Define_JP_TextureID0080_RaptorWalk_Towards2
	db !Define_JP_TextureID00A2_RaptorLunge1
	db !Define_JP_TextureID00A3_RaptorLunge2_Left
	db !Define_JP_TextureID00A4_RaptorLunge3_Left
	db !Define_JP_TextureID00A5_RaptorPenWindowFerns_Left
	db !Define_JP_TextureID0080_RaptorWalk_Towards2
	db !Define_JP_TextureID0080_RaptorWalk_Towards2
	db !Define_JP_TextureID0080_RaptorWalk_Towards2

DATA_A1C1FC:
	dw $0400,$0380,$0300,$0280,$0200,$0180,$0100,$0080
	dw $0000,$0780,$0700,$0680,$0600,$0580,$0500,$0480

DATA_A1C21C:
	dw $0000,$0006,$000C,$0012

DATA_A1C224:
	dw $000D,$0001,$0011,$0007

DATA_A1C22C:
	db !Define_JP_TextureID0085_RaptorWalk_BodySide1
	db !Define_JP_TextureID0086_RaptorWalk_BodySide2
	db !Define_JP_TextureID0087_RaptorWalk_BodySide3
	db !Define_JP_TextureID0088_RaptorWalk_BodySide4
	db !Define_JP_TextureID0089_RaptorWalk_BodySide5
	db !Define_JP_TextureID008A_RaptorWalk_BodySide6
	db !Define_JP_TextureID007F_RaptorWalk_Towards1
	db !Define_JP_TextureID0080_RaptorWalk_Towards2
	db !Define_JP_TextureID0081_RaptorWalk_Towards3
	db !Define_JP_TextureID0082_RaptorWalk_Towards4
	db !Define_JP_TextureID0083_RaptorWalk_Towards5
	db !Define_JP_TextureID0084_RaptorWalk_Towards6
	db !Define_JP_TextureID00B4_RaptorWalk_BodySide1
	db !Define_JP_TextureID00B5_RaptorWalk_BodySide2
	db !Define_JP_TextureID00B6_RaptorWalk_BodySide3
	db !Define_JP_TextureID00B7_RaptorWalk_BodySide4
	db !Define_JP_TextureID00B8_RaptorWalk_BodySide5
	db !Define_JP_TextureID00B9_RaptorWalk_BodySide6
	db !Define_JP_TextureID0079_RaptorWalk_Away1
	db !Define_JP_TextureID007A_RaptorWalk_Away2
	db !Define_JP_TextureID007B_RaptorWalk_Away3
	db !Define_JP_TextureID007C_RaptorWalk_Away4
	db !Define_JP_TextureID007D_RaptorWalk_Away5
	db !Define_JP_TextureID007E_RaptorWalk_Away6

DATA_A1C244:
	db !Define_JP_TextureID008B_RaptorWalk_TailSide1
	db !Define_JP_TextureID008C_RaptorWalk_TailSide2
	db !Define_JP_TextureID008D_RaptorWalk_TailSide3
	db !Define_JP_TextureID008E_RaptorWalk_TailSide4
	db !Define_JP_TextureID008F_RaptorWalk_TailSide5
	db !Define_JP_TextureID0090_RaptorWalk_TailSide6
	db !Define_JP_TextureID007F_RaptorWalk_Towards1>>8
	db !Define_JP_TextureID0080_RaptorWalk_Towards2>>8
	db !Define_JP_TextureID0081_RaptorWalk_Towards3>>8
	db !Define_JP_TextureID0082_RaptorWalk_Towards4>>8
	db !Define_JP_TextureID0083_RaptorWalk_Towards5>>8
	db !Define_JP_TextureID0084_RaptorWalk_Towards6>>8
	db !Define_JP_TextureID00BA_RaptorWalk_TailSide1
	db !Define_JP_TextureID00BB_RaptorWalk_TailSide2
	db !Define_JP_TextureID00BC_RaptorWalk_TailSide3
	db !Define_JP_TextureID00BD_RaptorWalk_TailSide4
	db !Define_JP_TextureID00BE_RaptorWalk_TailSide5
	db !Define_JP_TextureID00BF_RaptorWalk_TailSide6
	db !Define_JP_TextureID0079_RaptorWalk_Away1>>8
	db !Define_JP_TextureID007A_RaptorWalk_Away2>>8
	db !Define_JP_TextureID007B_RaptorWalk_Away3>>8
	db !Define_JP_TextureID007C_RaptorWalk_Away4>>8
	db !Define_JP_TextureID007D_RaptorWalk_Away5>>8
	db !Define_JP_TextureID007E_RaptorWalk_Away6>>8

DATA_A1C25C:
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F8_IdleDilophosaur
	db !Define_JP_TextureID00F9_DilophosaurSpitting1
	db !Define_JP_TextureID00FA_DilophosaurSpitting2
	db !Define_JP_TextureID00FB_DilophosaurSpitting3
	db !Define_JP_TextureID00FC_DilophosaurSpitting4
	db !Define_JP_TextureID00FD_DilophosaurSpitting5
	db !Define_JP_TextureID00FA_DilophosaurSpitting2
	db !Define_JP_TextureID00FA_DilophosaurSpitting2
	db !Define_JP_TextureID00FA_DilophosaurSpitting2
	db !Define_JP_TextureID00FA_DilophosaurSpitting2
	db !Define_JP_TextureID00FA_DilophosaurSpitting2
	db !Define_JP_TextureID00F9_DilophosaurSpitting1

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

DATA_A1C274:
	incbin "InteriorMaps/NublarUtilityShed_GroundLevel_Entities.rnc"

DATA_A1CFA4:
	incbin "InteriorMaps/NublarUtilityShed_SubLevel_Entities.rnc"

DATA_A1DC71:
	incbin "InteriorMaps/BeachUtilityShed_SubLevel_Entities.rnc"

DATA_A1EAAC:
	incbin "InteriorMaps/BeachUtilityShed_GroundLevel_Entities.rnc"

DATA_A1F895:
	incbin "InteriorMaps/RaptorPen_GroundLevel_MapLayout.rnc"

DATA_A1F99D:
	incbin "InteriorMaps/RaptorPen_UpperLevel_RoomDataPtrs_JP_U1.rnc"

DATA_A1FA07:
	incbin "InteriorMaps/RaptorPen_UpperLevel_Entities_JP_U1.rnc"

DATA_A1FE19:
	incbin "InteriorMaps/RaptorPen_SubLevel1_MapLayout_JP_U1.rnc"

UNK_A1FFB2:
	%InsertGarbageData($A1FFB2, incbin, DATA_A1FFB2.bin)
%BANK_END(<EndBank>)
endmacro

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

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

DATA_A28000:
	incbin "Textures/RaptorPenWindowFerns_Left.bin"

DATA_A28600:
	incbin "Textures/RaptorPenWindowFerns_Right.bin"

DATA_A28C00:
	incbin "Textures/RaptorPenWindowPalmTrees_Left.bin"

DATA_A29200:
	incbin "Textures/RaptorPenWindowPalmTrees_Right.bin"

DATA_A29800:
	incbin "Textures/RaptorPrepareLunge_Left_Battery.bin"

DATA_A29E00:
	incbin "Textures/RaptorPrepareLunge_Right_NerveGasBomb.bin"

DATA_A2A400:
	incbin "Textures/RaptorLunge1.bin"

DATA_A2B000:
	incbin "Textures/RaptorLunge2_Left_RocketLauncher.bin"

DATA_A2B600:
	incbin "Textures/RaptorLunge2_Right_BolasSnareRifle.bin"

DATA_A2BC00:
	incbin "Textures/RaptorLunge3_Left_Shotgun.bin"

DATA_A2C200:
	incbin "Textures/RaptorLunge3_Right_TranquilizerGun.bin"

DATA_A2C800:
	incbin "Textures/GunSmoke.bin"

DATA_A2CE00:
	incbin "Textures/GasGrenadeSmoke.bin"

DATA_A2D400:
	incbin "Textures/ShotgunBulletAndBolasSnareRifleBall.bin"

DATA_A2DA00:
	incbin "Textures/DartAndRocket.bin"

DATA_A2E000:
	incbin "Textures/IdleDilophosaur.bin"

DATA_A2E600:
	incbin "Textures/DilophosaurSpitting1.bin"

DATA_A2EC00:
	incbin "Textures/DilophosaurSpitting2.bin"

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

DATA_A2F800:
	dw (DATA_AC8000+$00)>>16
	dw (DATA_AC8600+$00)>>16
	dw (DATA_AC8C00+$00)>>16
	dw (DATA_AC9200+$00)>>16
	dw (DATA_AC9800+$00)>>16
	dw (DATA_AC9E00+$00)>>16
	dw (DATA_ACA400+$00)>>16
	dw (DATA_ACA400+$00)>>16
	dw (DATA_ACAA00+$00)>>16
	dw (DATA_ACB000+$00)>>16
	dw (DATA_ACB600+$00)>>16
	dw (DATA_ACB600+$00)>>16
	dw (DATA_ACAA00+$00)>>16
	dw (DATA_ACB000+$00)>>16
	dw (DATA_AC8000+$00)>>16
	dw (DATA_AC8600+$00)>>16
	dw (DATA_AC8C00+$00)>>16
	dw (DATA_ACBC00+$00)>>16
	dw (DATA_ACBC00+$00)>>16
	dw (DATA_ACC200+$00)>>16
	dw (DATA_ACC800+$00)>>16
	dw (DATA_ACCE00+$00)>>16
	dw (DATA_ACC800+$00)>>16
	dw (DATA_ACCE00+$00)>>16
	dw (DATA_ACD400+$00)>>16
	dw (DATA_ACDA00+$00)>>16
	dw (DATA_ACE000+$00)>>16
	dw (DATA_ACE600+$00)>>16
	dw (DATA_ACEC00+$00)>>16
	dw (DATA_ACF200+$00)>>16
	dw (DATA_AD8000+$00)>>16
	dw (DATA_AD8000+$00)>>16
	dw (DATA_AD8600+$00)>>16
	dw (DATA_AD8C00+$00)>>16
	dw (DATA_AD9200+$00)>>16
	dw (DATA_AD9800+$00)>>16
	dw (DATA_AD9E00+$00)>>16
	dw (DATA_ADA400+$00)>>16
	dw (DATA_ADAA00+$00)>>16
	dw (DATA_ADB000+$00)>>16
	dw (DATA_ADB600+$00)>>16
	dw (DATA_ADB600+$00)>>16
	dw (DATA_ADBC00+$00)>>16
	dw (DATA_ADC200+$00)>>16
	dw (DATA_ADC800+$00)>>16
	dw (DATA_ADCE00+$00)>>16
	dw (DATA_ADD400+$00)>>16
	dw (DATA_ADDA00+$00)>>16
	dw (DATA_ADE000+$00)>>16
	dw (DATA_ADE600+$00)>>16
	dw (DATA_ADEC00+$00)>>16
	dw (DATA_ADF200+$00)>>16
	dw (DATA_AE8000+$00)>>16
	dw (DATA_AE8600+$00)>>16
	dw (DATA_AE8600+$00)>>16
	dw (DATA_AE8C00+$00)>>16
	dw (DATA_AE8C00+$00)>>16
	dw (DATA_AE9200+$00)>>16
	dw (DATA_AE9200+$00)>>16
	dw (DATA_AE9800+$00)>>16
	dw (DATA_AE9E00+$00)>>16
	dw (DATA_AEA400+$00)>>16
	dw (DATA_AEAA00+$00)>>16
	dw (DATA_AEB000+$00)>>16
	dw (DATA_AEB600+$00)>>16
	dw (DATA_AEBC00+$00)>>16
	dw (DATA_AEBC00+$00)>>16
	dw (DATA_AEC200+$00)>>16
	dw (DATA_AEC200+$00)>>16
	dw (DATA_AEC800+$00)>>16
	dw (DATA_AECE00+$00)>>16
	dw (DATA_AED400+$00)>>16
	dw (DATA_AED400+$00)>>16
	dw (DATA_AEDA00+$00)>>16
	dw (DATA_AEE000+$00)>>16
	dw (DATA_AEE600+$00)>>16
	dw (DATA_AEEC00+$00)>>16
	dw (DATA_AEEC00+$00)>>16
	dw (DATA_AEF200+$00)>>16
	dw (DATA_AEF200+$00)>>16
	dw (DATA_AF8000+$00)>>16
	dw (DATA_AF8600+$00)>>16
	dw (DATA_AF8C00+$00)>>16
	dw (DATA_AF9200+$00)>>16
	dw (DATA_AF9200+$00)>>16
	dw (DATA_AF9800+$00)>>16
	dw (DATA_AF9800+$00)>>16
	dw (DATA_AF9E00+$00)>>16
	dw (DATA_AF9E00+$00)>>16
	dw (DATA_AFA400+$00)>>16
	dw (DATA_AFA400+$00)>>16
	dw (DATA_AFAA00+$00)>>16
	dw (DATA_AFAA00+$00)>>16
	dw (DATA_AFB000+$00)>>16
	dw (DATA_AFB000+$00)>>16
	dw (DATA_AFB600+$00)>>16
	dw (DATA_AFB600+$00)>>16
	dw (DATA_A3D400+$00)>>16
	dw (DATA_A3DA00+$00)>>16
	dw (DATA_A3E000+$00)>>16
	dw (DATA_AFBC00+$00)>>16
	dw (DATA_AFC200+$00)>>16
	dw (DATA_AFBC00+$00)>>16
	dw (DATA_AFC200+$00)>>16
	dw (DATA_AFC800+$00)>>16
	dw (DATA_AFCE00+$00)>>16
	dw (DATA_AFC800+$00)>>16
	dw (DATA_AFCE00+$00)>>16
	dw (DATA_AFD400+$00)>>16
	dw (DATA_AFDA00+$00)>>16
	dw (DATA_AFD400+$00)>>16
	dw (DATA_AFDA00+$00)>>16
	dw (DATA_AFE000+$00)>>16
	dw (DATA_AFE600+$00)>>16
	dw (DATA_AFE000+$00)>>16
	dw (DATA_AFE600+$00)>>16
	dw (DATA_AFEC00+$00)>>16
	dw (DATA_AFF200+$00)>>16
	dw (DATA_AFEC00+$00)>>16
	dw (DATA_AFF200+$00)>>16
	dw (DATA_B3CE00+$00)>>16
	dw (DATA_B1B000+$00)>>16
	dw (DATA_B1B600+$00)>>16
	dw (DATA_B1BC00+$00)>>16
	dw (DATA_B1C200+$00)>>16
	dw (DATA_B1C800+$00)>>16
	dw (DATA_B1CE00+$00)>>16
	dw (DATA_B1D400+$00)>>16
	dw (DATA_B1DA00+$00)>>16
	dw (DATA_B1E000+$00)>>16
	dw (DATA_B1E600+$00)>>16
	dw (DATA_B1EC00+$00)>>16
	dw (DATA_B1F200+$00)>>16
	dw (DATA_B28000+$01)>>16
	dw (DATA_B28C00+$01)>>16
	dw (DATA_B29800+$01)>>16
	dw (DATA_B2A400+$01)>>16
	dw (DATA_B2B000+$01)>>16
	dw (DATA_B2BC00+$01)>>16
	dw (DATA_B2C800-$1F)>>16
	dw (DATA_B2C800+$01)>>16
	dw (DATA_B2D400-$1F)>>16
	dw (DATA_B2D400+$01)>>16
	dw (DATA_B2E000-$1F)>>16
	dw (DATA_B2E000+$01)>>16
	dw (DATA_B2EC00+$01)>>16
	dw (DATA_B38000+$01)>>16
	dw (DATA_B38C00+$00)>>16
	dw (DATA_B39200+$00)>>16
	dw (DATA_B39800+$01)>>16
	dw (DATA_B3A400+$01)>>16
	dw (DATA_B3B000+$01)>>16
	dw (DATA_B3BC00-$0F)>>16
	dw (DATA_B3C800-$10)>>16
	dw (DATA_B3D400-$1F)>>16
	dw (DATA_B3D400+$00)>>16
	dw (DATA_B3E000+$01)>>16
	dw (DATA_B3EC00-$20)>>16
	dw (DATA_A3B000-$0F)>>16
	dw (DATA_A3B000+$01)>>16
	dw (DATA_AC9E00+$00)>>16
	dw (DATA_A29800-$0F)>>16
	dw (DATA_A2A400+$01)>>16
	dw (DATA_A2B000-$0F)>>16
	dw (DATA_A2BC00-$0F)>>16
	dw (DATA_A28000+$00)>>16
	dw (DATA_A28600+$00)>>16
	dw (DATA_A28000+$00)>>16
	dw (DATA_A28600+$00)>>16
	dw (DATA_A28C00+$00)>>16
	dw (DATA_A29200+$00)>>16
	dw (DATA_A28C00+$00)>>16
	dw (DATA_A29200+$00)>>16
	dw (DATA_A18000+$00)>>16
	dw (DATA_A18600+$00)>>16
	dw (DATA_A18000+$00)>>16
	dw (DATA_A18600+$00)>>16
	dw (DATA_B0A400-$0F)>>16
	dw (DATA_B0A400+$01)>>16
	dw (DATA_B0B000-$10)>>16
	dw (DATA_B28000+$01)>>16
	dw (DATA_B28C00+$01)>>16
	dw (DATA_B29800+$01)>>16
	dw (DATA_B2A400+$01)>>16
	dw (DATA_B2B000+$01)>>16
	dw (DATA_B2BC00+$01)>>16
	dw (DATA_B2C800+$01)>>16
	dw (DATA_B2C800+$01)>>16
	dw (DATA_B2D400+$01)>>16
	dw (DATA_B2D400+$01)>>16
	dw (DATA_B2E000+$01)>>16
	dw (DATA_B2E000+$01)>>16
	dw (DATA_B39800+$01)>>16
	dw (DATA_B3A400+$01)>>16
	dw (DATA_B3BC00-$0F)>>16
	dw (DATA_B3C800-$10)>>16
	dw (DATA_B3D400-$1F)>>16
	dw (DATA_B3D400+$00)>>16
	dw (DATA_B08000-$20)>>16
	dw (DATA_A3EC00+$00)>>16
	dw (DATA_A3F200+$00)>>16
	dw (DATA_B0B000+$00)>>16
	dw (DATA_BBF7F5+$00)>>16
	dw (DATA_A3F200+$00)>>16
	dw (DATA_B3F200+$00)>>16
	dw (DATA_B08000+$00)>>16
	dw (DATA_B0C200-$20)>>16
	dw (DATA_B0C200+$00)>>16
	dw (DATA_B0C800+$00)>>16
	dw (DATA_B0CE00+$00)>>16
	dw (DATA_B0D400+$01)>>16
	dw (DATA_B0E600-$20)>>16
	dw (DATA_B0E000-$20)>>16
	dw (DATA_B0E000-$20)>>16
	dw (DATA_B0E000+$00)>>16
	dw (DATA_B0E600+$00)>>16
	dw (DATA_B0E600+$00)>>16
	dw (DATA_B0EC00+$00)>>16
	dw (DATA_B0F200+$00)>>16
	dw (DATA_B0F200+$00)>>16
	dw (DATA_B0F200-$20)>>16
	dw (DATA_B0F200-$20)>>16
	dw (DATA_B0F200+$00)>>16
	dw (DATA_B0F200+$00)>>16
	dw (DATA_B18000+$01)>>16
	dw (DATA_B18C00+$01)>>16
	dw (DATA_B19800+$01)>>16
	dw (DATA_B1A400+$01)>>16
	dw (DATA_B0A400-$20)>>16
	dw (DATA_B3EC00+$00)>>16
	dw (DATA_A3C800-$20)>>16
	dw (DATA_A3CE00-$20)>>16
	dw (DATA_B3BC00+$00)>>16
	dw (DATA_B3C200+$00)>>16
	dw (DATA_B3C800+$00)>>16
	dw (DATA_A2BC00+$00)>>16
	dw (DATA_A2C200+$00)>>16
	dw (DATA_A2B000+$00)>>16
	dw (DATA_A29800+$00)>>16
	dw (DATA_A29E00+$00)>>16
	dw (DATA_A3CE00+$00)>>16
	dw (DATA_A3CE00+$00)>>16
	dw (DATA_A2C800+$00)>>16
	dw (DATA_A2CE00+$00)>>16
	dw (DATA_A2D400-$20)>>16
	dw (DATA_A2D400+$00)>>16
	dw (DATA_A2DA00-$20)>>16
	dw (DATA_A2DA00+$00)>>16
	dw (DATA_A2E000+$00)>>16
	dw (DATA_A2E600+$00)>>16
	dw (DATA_A2EC00+$01)>>16
	dw (DATA_A38000+$01)>>16
	dw (DATA_A38C00+$01)>>16
	dw (DATA_A39800+$01)>>16
	dw (DATA_B09200-$20)>>16
	dw (DATA_A28C00+$01)>>16
	dw (DATA_A2B600+$00)>>16
	dw (DATA_A3C800+$00)>>16
	dw (DATA_A3A400+$01)>>16
	dw (DATA_A3E600-$20)>>16
	dw (DATA_A3E600+$00)>>16
	dw (DATA_A3E000+$01)>>16
	dw (DATA_A2C800+$00)>>16
	dw (DATA_A2C800+$00)>>16
	dw (DATA_A2C800+$00)>>16
	dw (DATA_A2C800+$00)>>16
	dw (DATA_A2C800+$00)>>16
	dw (DATA_A2C800+$00)>>16
	dw (DATA_B0B600-$10)>>16
	dw (DATA_B08600-$20)>>16
	dw (DATA_B08600+$00)>>16
	dw (DATA_B08C00-$20)>>16
	dw (DATA_B08C00+$00)>>16
	dw (DATA_B09200+$00)>>16
	dw (DATA_B09800-$1F)>>16
	dw (DATA_B09800+$01)>>16
	dw (DATA_B0A400+$05E0)>>16
	dw (DATA_B0BC00+$00)>>16
	dw (DATA_B0BC00+$00)>>16
	dw (DATA_B3DA00+$00)>>16
	dw (DATA_B3DA00+$00)>>16
	dw (DATA_B3D400-$10)>>16
	dw (DATA_B3F200-$20)>>16
	dw (DATA_A3BC00+$00)>>16
	dw (DATA_A3C200+$00)>>16
	dw (DATA_B0BC00+$00)>>16
	dw (DATA_B0BC00+$00)>>16
	dw (DATA_B0B600+$00)>>16
	dw (DATA_ACE000+$00)>>16
	dw (DATA_A2C800+$00)>>16

DATA_A2FA44:
	dw DATA_AC8000+$00
	dw DATA_AC8600+$00
	dw DATA_AC8C00+$00
	dw DATA_AC9200+$00
	dw DATA_AC9800+$00
	dw DATA_AC9E00+$00
	dw DATA_ACA400+$00
	dw DATA_ACA400+$00
	dw DATA_ACAA00+$00
	dw DATA_ACB000+$00
	dw DATA_ACB600+$00
	dw DATA_ACB600+$00
	dw DATA_ACAA00+$00
	dw DATA_ACB000+$00
	dw DATA_AC8000+$00
	dw DATA_AC8600+$00
	dw DATA_AC8C00+$00
	dw DATA_ACBC00+$00
	dw DATA_ACBC00+$00
	dw DATA_ACC200+$00
	dw DATA_ACC800+$00
	dw DATA_ACCE00+$00
	dw DATA_ACC800+$00
	dw DATA_ACCE00+$00
	dw DATA_ACD400+$00
DATA_A2FA76:
	dw DATA_ACDA00+$00
	dw DATA_ACE000+$00
	dw DATA_ACE600+$00
	dw DATA_ACEC00+$00
	dw DATA_ACF200+$00
	dw DATA_AD8000+$00
	dw DATA_AD8000+$00
	dw DATA_AD8600+$00
	dw DATA_AD8C00+$00
	dw DATA_AD9200+$00
	dw DATA_AD9800+$00
	dw DATA_AD9E00+$00
	dw DATA_ADA400+$00
	dw DATA_ADAA00+$00
	dw DATA_ADB000+$00
	dw DATA_ADB600+$00
	dw DATA_ADB600+$00
	dw DATA_ADBC00+$00
	dw DATA_ADC200+$00
	dw DATA_ADC800+$00
	dw DATA_ADCE00+$00
	dw DATA_ADD400+$00
	dw DATA_ADDA00+$00
	dw DATA_ADE000+$00
	dw DATA_ADE600+$00
	dw DATA_ADEC00+$00
	dw DATA_ADF200+$00
	dw DATA_AE8000+$00
	dw DATA_AE8600+$00
	dw DATA_AE8600+$00
	dw DATA_AE8C00+$00
	dw DATA_AE8C00+$00
	dw DATA_AE9200+$00
	dw DATA_AE9200+$00
	dw DATA_AE9800+$00
	dw DATA_AE9E00+$00
	dw DATA_AEA400+$00
	dw DATA_AEAA00+$00
	dw DATA_AEB000+$00
	dw DATA_AEB600+$00
	dw DATA_AEBC00+$00
	dw DATA_AEBC00+$00
	dw DATA_AEC200+$00
	dw DATA_AEC200+$00
	dw DATA_AEC800+$00
	dw DATA_AECE00+$00
	dw DATA_AED400+$00
	dw DATA_AED400+$00
	dw DATA_AEDA00+$00
	dw DATA_AEE000+$00
	dw DATA_AEE600+$00
	dw DATA_AEEC00+$00
	dw DATA_AEEC00+$00
	dw DATA_AEF200+$00
	dw DATA_AEF200+$00
	dw DATA_AF8000+$00
	dw DATA_AF8600+$00
	dw DATA_AF8C00+$00
	dw DATA_AF9200+$00
	dw DATA_AF9200+$00
	dw DATA_AF9800+$00
	dw DATA_AF9800+$00
	dw DATA_AF9E00+$00
	dw DATA_AF9E00+$00
	dw DATA_AFA400+$00
	dw DATA_AFA400+$00
	dw DATA_AFAA00+$00
	dw DATA_AFAA00+$00
	dw DATA_AFB000+$00
	dw DATA_AFB000+$00
	dw DATA_AFB600+$00
	dw DATA_AFB600+$00
	dw DATA_A3D400+$00
	dw DATA_A3DA00+$00
	dw DATA_A3E000+$00
	dw DATA_AFBC00+$00
	dw DATA_AFC200+$00
	dw DATA_AFBC00+$00
	dw DATA_AFC200+$00
	dw DATA_AFC800+$00
	dw DATA_AFCE00+$00
	dw DATA_AFC800+$00
	dw DATA_AFCE00+$00
	dw DATA_AFD400+$00
	dw DATA_AFDA00+$00
	dw DATA_AFD400+$00
	dw DATA_AFDA00+$00
	dw DATA_AFE000+$00
	dw DATA_AFE600+$00
	dw DATA_AFE000+$00
	dw DATA_AFE600+$00
	dw DATA_AFEC00+$00
	dw DATA_AFF200+$00
	dw DATA_AFEC00+$00
	dw DATA_AFF200+$00
DATA_A2FB34:
	dw DATA_B3CE00+$00
	dw DATA_B1B000+$00
	dw DATA_B1B600+$00
	dw DATA_B1BC00+$00
	dw DATA_B1C200+$00
	dw DATA_B1C800+$00
	dw DATA_B1CE00+$00
	dw DATA_B1D400+$00
	dw DATA_B1DA00+$00
	dw DATA_B1E000+$00
	dw DATA_B1E600+$00
	dw DATA_B1EC00+$00
	dw DATA_B1F200+$00
	dw DATA_B28000+$01
	dw DATA_B28C00+$01
	dw DATA_B29800+$01
	dw DATA_B2A400+$01
	dw DATA_B2B000+$01
	dw DATA_B2BC00+$01
	dw DATA_B2C800-$1F
	dw DATA_B2C800+$01
	dw DATA_B2D400-$1F
	dw DATA_B2D400+$01
	dw DATA_B2E000-$1F
	dw DATA_B2E000+$01
	dw DATA_B2EC00+$01
	dw DATA_B38000+$01
	dw DATA_B38C00+$00
DATA_A2FB6C:
	dw DATA_B39200+$00
	dw DATA_B39800+$01
	dw DATA_B3A400+$01
	dw DATA_B3B000+$01
	dw DATA_B3BC00-$0F
	dw DATA_B3C800-$10
	dw DATA_B3D400-$1F
	dw DATA_B3D400+$00
	dw DATA_B3E000+$01
	dw DATA_B3EC00-$20
	dw DATA_A3B000-$0F
	dw DATA_A3B000+$01
	dw DATA_AC9E00+$00
	dw DATA_A29800-$0F
	dw DATA_A2A400+$01
	dw DATA_A2B000-$0F
	dw DATA_A2BC00-$0F
	dw DATA_A28000+$00
	dw DATA_A28600+$00
	dw DATA_A28000+$00
	dw DATA_A28600+$00
	dw DATA_A28C00+$00
	dw DATA_A29200+$00
	dw DATA_A28C00+$00
	dw DATA_A29200+$00
	dw DATA_A18000+$00
	dw DATA_A18600+$00
	dw DATA_A18000+$00
	dw DATA_A18600+$00
	dw DATA_B0A400-$0F
	dw DATA_B0A400+$01
	dw DATA_B0B000-$10
	dw DATA_B28000+$01
	dw DATA_B28C00+$01
	dw DATA_B29800+$01
	dw DATA_B2A400+$01
	dw DATA_B2B000+$01
	dw DATA_B2BC00+$01
	dw DATA_B2C800+$01
	dw DATA_B2C800+$01
	dw DATA_B2D400+$01
	dw DATA_B2D400+$01
	dw DATA_B2E000+$01
	dw DATA_B2E000+$01
	dw DATA_B39800+$01
	dw DATA_B3A400+$01
	dw DATA_B3BC00-$0F
	dw DATA_B3C800-$10
	dw DATA_B3D400-$1F
	dw DATA_B3D400+$00
	dw DATA_B08000-$20
	dw DATA_A3EC00+$00
	dw DATA_A3F200+$00
	dw DATA_B0B000+$00
	dw DATA_BBF7F5+$00
	dw DATA_A3F200+$00
	dw DATA_B3F200+$00
	dw DATA_B08000+$00
	dw DATA_B0C200-$20
	dw DATA_B0C200+$00
	dw DATA_B0C800+$00
	dw DATA_B0CE00+$00
	dw DATA_B0D400+$01
	dw DATA_B0E600-$20
	dw DATA_B0E000-$20
	dw DATA_B0E000-$20
	dw DATA_B0E000+$00
	dw DATA_B0E600+$00
	dw DATA_B0E600+$00
	dw DATA_B0EC00+$00
	dw DATA_B0F200+$00
	dw DATA_B0F200+$00
	dw DATA_B0F200-$20
	dw DATA_B0F200-$20
	dw DATA_B0F200+$00
	dw DATA_B0F200+$00
	dw DATA_B18000+$01
	dw DATA_B18C00+$01
	dw DATA_B19800+$01
	dw DATA_B1A400+$01
	dw DATA_B0A400-$20
	dw DATA_B3EC00+$00
	dw DATA_A3C800-$20
	dw DATA_A3CE00-$20
	dw DATA_B3BC00+$00
	dw DATA_B3C200+$00
	dw DATA_B3C800+$00
	dw DATA_A2BC00+$00
	dw DATA_A2C200+$00
	dw DATA_A2B000+$00
	dw DATA_A29800+$00
	dw DATA_A29E00+$00
	dw DATA_A3CE00+$00
	dw DATA_A3CE00+$00
DATA_A2FC28:
	dw DATA_A2C800+$00
	dw DATA_A2CE00+$00
	dw DATA_A2D400-$20
	dw DATA_A2D400+$00
	dw DATA_A2DA00-$20
	dw DATA_A2DA00+$00
	dw DATA_A2E000+$00
	dw DATA_A2E600+$00
	dw DATA_A2EC00+$01
	dw DATA_A38000+$01
	dw DATA_A38C00+$01
	dw DATA_A39800+$01
	dw DATA_B09200-$20
	dw DATA_A28C00+$01
	dw DATA_A2B600+$00
	dw DATA_A3C800+$00
	dw DATA_A3A400+$01
	dw DATA_A3E600-$20
	dw DATA_A3E600+$00
	dw DATA_A3E000+$01
	dw DATA_A2C800+$00
	dw DATA_A2C800+$00
	dw DATA_A2C800+$00
	dw DATA_A2C800+$00
	dw DATA_A2C800+$00
	dw DATA_A2C800+$00
	dw DATA_B0B600-$10
	dw DATA_B08600-$20
	dw DATA_B08600+$00
	dw DATA_B08C00-$20
	dw DATA_B08C00+$00
	dw DATA_B09200+$00
	dw DATA_B09800-$1F
	dw DATA_B09800+$01
	dw DATA_B0A400+$05E0
	dw DATA_B0BC00+$00
	dw DATA_B0BC00+$00
	dw DATA_B3DA00+$00
	dw DATA_B3DA00+$00
	dw DATA_B3D400-$10
	dw DATA_B3F200-$20
	dw DATA_A3BC00+$00
	dw DATA_A3C200+$00
	dw DATA_B0BC00+$00
	dw DATA_B0BC00+$00
	dw DATA_B0B600+$00
	dw DATA_ACE000+$00
	dw DATA_A2C800+$00

DATA_A2FC88:
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$1540
	dw $0000,$0000,$0000,$1540,$1540,$1540,$1540,$1540
	dw $1540,$0000,$1540,$0000,$0000,$0000,$1540,$1540
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$1540
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1540,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$1540,$0000
	dw $1540,$0000,$1540,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$1540,$0000,$1540,$0000,$0000,$0000
	dw $1540,$0000,$0000,$0000,$0000,$1540,$0000,$1540
	dw $0000,$0000,$0000,$0000,$1540,$0000,$1540,$0000
	dw $1540,$0000,$1540,$0000,$1540,$0000,$1540,$0000
	dw $1540,$0000,$0000,$0000,$0000,$0000,$1540,$1540
	dw $0000,$0000,$1540,$1540,$0000,$0000,$1540,$1540
	dw $0000,$0000,$1540,$1540,$0000,$0000,$1540,$1540
	dw $02A8,$02A8,$02A8,$02A8,$02A8,$02A8,$02A8,$02A8
	dw $02A8,$02A8,$02A8,$02A8,$02A8,$02A8,$02A8,$02A8
	dw $02A8,$02A8,$02A8,$0FF0,$0FF0,$0FF0,$0FF0,$0FF0
	dw $0FF0,$02A8,$02A8,$02A8,$02A8,$02A8,$02A8,$02A8
	dw $0550,$0550,$07F8,$0AA0,$02A8,$0FF0,$0550,$0AA0
	dw $17E8,$0550,$02A8,$0550,$0550,$0000,$0000,$1540
	dw $1540,$0000,$0000,$1540,$1540,$0000,$0000,$1540
	dw $1540,$0AA0,$0AA0,$0550,$17E8,$17E8,$17E8,$17E8
	dw $17E8,$17E8,$2530,$2530,$2530,$2530,$2530,$2530
	dw $17E8,$17E8,$1A90,$1A90,$1D38,$1FE0,$07F8,$02A8
	dw $0000,$0AA0,$0000,$1540,$0FF0,$07F8,$07F8,$07F8
	dw $02A8,$02A8,$02A8,$07F8,$07F8,$1D38,$07F8,$07F8
	dw $1D38,$02A8,$0000,$1540,$0FF0,$2530,$07F8,$1D38
	dw $02A8,$02A8,$02A8,$02A8,$0FF0,$0FF0,$07F8,$07F8
	dw $0AA0,$0AA0,$0AA0,$0AA0,$0AA0,$0AA0,$0AA0,$0AA0
	dw $0FF0,$2530,$02A8,$02A8,$07F8,$07F8,$07F8,$07F8
	dw $02A8,$02A8,$02A8,$02A8,$02A8,$02A8,$0FF0,$0000
	dw $0AA0,$0FF0,$02A8,$07F8,$07F8,$0000,$02A8,$02A8
	dw $02A8,$02A8,$02A8,$02A8,$0550,$0FF0,$0FF0,$0FF0
	dw $0FF0,$07F8,$07F8,$07F8,$0FF0,$0000,$1540,$07F8
	dw $1D38,$0AA0,$07F8,$02A8,$02A8,$0000,$1540,$0AA0
	dw $1540,$02A8

DATA_A2FECC:
	incbin "InteriorMaps/VisitorCenter_GroundFloor_RoomDataPtrs.rnc"

UNK_A2FFE4:
	%InsertGarbageData($A2FFE4, incbin, DATA_A2FFE4.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_A38000:
	incbin "Textures/DilophosaurSpitting3.bin"

DATA_A38C00:
	incbin "Textures/DilophosaurSpitting4.bin"

DATA_A39800:
	incbin "Textures/DilophosaurSpitting5.bin"

DATA_A3A400:
	incbin "Textures/DilophosaurExploding.bin"

DATA_A3B000:
	incbin "Textures/DilophosaurDying.bin"

DATA_A3BC00:
	incbin "Textures/ComputerTerminal_Left.bin"

DATA_A3C200:
	incbin "Textures/ComputerTerminal_Right.bin"

DATA_A3C800:
	incbin "Textures/WoodBox_Front_StovePot.bin"

DATA_A3CE00:
	incbin "Textures/WoodBox_Side_MiniFridge_Side.bin"

DATA_A3D400:
	incbin "Textures/LabWall_RedDNADisplay.bin"

DATA_A3DA00:
	incbin "Textures/LabWall_Light.bin"

DATA_A3E000:
	incbin "Textures/LabWall_Pillar.bin"

DATA_A3E600:
	incbin "Textures/StoveFront.bin"

DATA_A3EC00:
	incbin "Textures/DarkMetalWall1.bin"

DATA_A3F200:
	incbin "Textures/DarkMetalWall_Pillar.bin"

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

JP_GFX_BG_ComputerTerminalPart6:
;$A3F800
	incbin "Graphics/Compressed/GFX_BG_ComputerTerminal.bin":2800-

DATA_A3FCAC:
	incbin "InteriorMaps/VisitorCenter_SubLevel_MapLayout.rnc"

DATA_A3FD78:
	incbin "InteriorMaps/Ship_SubLevel3_MapLayout_JP_U1.rnc"

DATA_A3FF51:
	incbin "InteriorMaps/NorthUtilityShed_SubLevel_RoomDataPtrs_JP_U1.rnc"

UNK_A3FFF0:
	%InsertGarbageData($A3FFF0, incbin, DATA_A3FFF0.bin)

%BANK_END(<EndBank>)
endmacro

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

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

CODE_A48000:
	JML.l CODE_80FC02

CODE_A48004:
	SEP.b #$20
	LDA.b #$00
	STA.b $F5
	REP.b #$20
	LDA.w !RAM_JP_Exterior_BuildingEntranceLo
	AND.w #$000F
	STA.w !RAM_JP_Interior_CurrentAreaLo
	LDA.w #$FFFF
	STA.l $7E9050
	STA.l $7E987A
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	SEI
	JSL.l CODE_A4ED47
	REP.b #$30
	LDX.w #CODE_80FC42
	STX.b $00
	LDA.w #CODE_80FC42>>16
	STA.b $02
	LDA.w #$0080
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	SEI
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	STZ.w !REGISTER_HDMAEnable
	SEP.b #$20
	LDA.b #$FF
	STA.w $1797
CODE_A48054:
	REP.b #$30
	LDA.w #$0000
	STA.w $1841
	REP.b #$30
	LDA.w #$0000
	STA.w $1755
	STA.w $1757
	STA.w $1765
	STA.w $1767
	STA.w $176D
	LDX.w !RAM_JP_Interior_CurrentAreaLo
	LDA.l DATA_A1A670,x
	AND.w #$00FF
	TAX
	LDA.w !RAM_JP_Global_Player_CollectedBatteryTable,x
	AND.w #$00FF
	STA.w !RAM_JP_Interior_CanEnterDarkRoomSafelyFlagLo
	SEP.b #$20
	STZ.w $16B0
	STZ.w $16B1
	STZ.w $16C5
	REP.b #$20
	STZ.w $16A2
	STZ.w $16A4
	STZ.w $16A6
	STZ.w $16A8
	STZ.w $16AA
	STZ.w $16AC
	STZ.w $16AE
	STZ.w $16B2
	SEP.b #$20
	REP.b #$10
	LDX.w #$0020
CODE_A480B0:
	LDA.l $000020,x
	LDA.b #$00
	STA.l $000020,x
	STA.l $7FFBCC,x
	DEX
	BPL.b CODE_A480B0
	REP.b #$30
	PEA.w DATA_A18C00
	PEA.w DATA_A18C00>>16
	PEA.w $7F75CC
	PEA.w $7F75CC>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	LDA.w #$7F75CC
	STA.b $46
	LDA.w #$7F75CC>>16
	STA.b $48
	SEP.b #$20
	LDA.b #$80
	LDX.w #$6000
	LDY.w #$4000
	JSL.l CODE_A4B90E
	PEA.w DATA_A68000
	PEA.w DATA_A68000>>16
	PEA.w $7FD64C
	PEA.w $7FD64C>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	PEA.w DATA_A68286
	PEA.w DATA_A68286>>16
	PEA.w $7FE2CC
	PEA.w $7FE2CC>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	PEA.w DATA_A682AE
	PEA.w DATA_A682AE>>16
	PEA.w $7FEF4C
	PEA.w $7FEF4C>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	REP.b #$30
	PEA.w DATA_A6C954
	PEA.w DATA_A6C954>>16
	PEA.w $7FCA4C
	PEA.w $7FCA4C>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	PEA.w DATA_A6C934
	PEA.w DATA_A6C934>>16
	PEA.w $7FC84C
	PEA.w $7FC84C>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	PEA.w DATA_A6C550
	PEA.w DATA_A6C550>>16
	PEA.w $7FBC4C
	PEA.w $7FBC4C>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	PEA.w DATA_A6C462
	PEA.w DATA_A6C462>>16
	PEA.w $7FBA4C
	PEA.w $7FBA4C>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	SEP.b #$20
	REP.b #$10
	LDX.w #$0020
CODE_A48184:
	LDA.l $7FFBCC,x
	STA.l $000020,x
	DEX
	BPL.b CODE_A48184
	REP.b #$20
	LDA.w #$35CC
	STA.w $177F
	LDA.w #$75CC
	STA.w $1781
	SEP.b #$20
	LDA.b #$00
	STA.w !REGISTER_InitialScreenSettings
	LDA.b #$58
	STA.w !REGISTER_BG1AddressAndSize
	LDA.b #$00
	STA.w !REGISTER_BG1And2TileDataDesignation
	LDA.b #$07
	STA.w !REGISTER_BGModeAndTileSizeSetting
	LDA.b #$03
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$80
	STA.w !REGISTER_Mode7TilemapSettings
	LDA.b #$11
	STA.w !REGISTER_MainScreenLayers
	STZ.w !REGISTER_SubScreenLayers
	STZ.w !REGISTER_ColorMathInitialSettings
	STZ.w !REGISTER_ColorMathSelectAndEnable
	STZ.w !REGISTER_FixedColorData
	REP.b #$20
	JSL.l CODE_A4B931
	REP.b #$30
	LDX.w #JP_Palette_InteriorAreas
	LDA.w #JP_Palette_InteriorAreas>>16
	JSL.l CODE_A4B43E
	JSL.l CODE_A4D61F
	REP.b #$30
	LDX.w #DATA_A4DBDA
	LDA.w #$000C
	JSL.l CODE_A4D537
	REP.b #$20
	LDA.w #$FFFF
	STA.w $1632
	SEP.b #$20
	LDA.b #$FF
	STA.w $16B0
	LDA.b #$96
	STA.w $16B1
	JSR.w CODE_A48A44
	REP.b #$30
	LDA.w #$FFFF
	STA.w $172D
	REP.b #$30
	LDX.w #$0000
	LDY.w #$0122
CODE_A48218:
	LDA.l DATA_A2F800,x
	STA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	INX
	INX
	DEY
	BNE.b CODE_A48218
	LDX.w #$0000
	LDY.w #$0122
CODE_A4822B:
	LDA.l DATA_A2FA44,x
	STA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	INX
	INX
	DEY
	BNE.b CODE_A4822B
	LDX.w #$0000
	LDY.w #$0122
CODE_A4823E:
	LDA.l DATA_A2FC88,x
	STA.l !RAM_JP_Interior_TexturePropTable,x
	INX
	INX
	DEY
	BNE.b CODE_A4823E
	SEP.b #$20
	LDA.w $1797
	BNE.b CODE_A48255
	BRL.w CODE_A483B2

CODE_A48255:
	SEP.b #$20
	REP.b #$10
	LDX.w #$0020
CODE_A4825C:
	LDA.l $000020,x
	STA.l $7FFBCC,x
	DEX
	BPL.b CODE_A4825C
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	LDA.l (DATA_A58034&$FF0000)+$06,x
	PHA
	LDA.l (DATA_A58034&$FF0000)+$08,x
	AND.w #$00FF
	PHA
	PEA.w !RAM_JP_Interior_MapDataBuffer
	PEA.w !RAM_JP_Interior_MapDataBuffer>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	LDA.l (DATA_A58034&$FF0000)+$00,x
	PHA
	LDA.l (DATA_A58034&$FF0000)+$02,x
	AND.w #$00FF
	PHA
	PEA.w !RAM_JP_Interior_RoomDataPtrTable
	PEA.w !RAM_JP_Interior_RoomDataPtrTable>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	LDA.l (DATA_A58034&$FF0000)+$03,x
	PHA
	LDA.l (DATA_A58034&$FF0000)+$05,x
	AND.w #$00FF
	PHA
	PEA.w JP_Interior_EntityTable[$00].Unknown1
	PEA.w JP_Interior_EntityTable[$00].Unknown1>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	SEP.b #$20
	REP.b #$10
	LDX.w #$0020
CODE_A482E3:
	LDA.l $7FFBCC,x
	STA.l $000020,x
	DEX
	BPL.b CODE_A482E3
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	LDA.l (DATA_A58034&$FF0000)+$0F,x
	AND.w #$00FF
	CLC
	ADC.w #DATA_A58000
	STA.l $80177D
	SEI
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	LDA.l (DATA_A58034&$FF0000)+$09,x
	STA.b $90
	STA.b $96
	STA.b $A2
	STA.b $AE
	LDA.l (DATA_A58034&$FF0000)+$0B,x
	STA.b $93
	STA.b $99
	STA.b $A5
	STA.b $B1
	REP.b #$30
	LDA.l (DATA_A58034&$FF0000)+$0D,x
	STA.b $7A
	STA.b $7C
	CLI
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer
	STA.w !RAM_JP_Interior_MapWidthLo
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01
	STA.w !RAM_JP_Interior_MapLengthLo
	LDA.b #$00
	STA.w !RAM_JP_Interior_MapWidthHi
	STA.w !RAM_JP_Interior_MapLengthHi
	REP.b #$30
	LDA.w #$0000
	LDX.w #$0000
	LDY.w #$0080
CODE_A4835A:
	STA.l $7EA8B4,x
	CLC
	ADC.w !RAM_JP_Interior_MapWidthLo
	INX
	INX
	DEY
	BNE.b CODE_A4835A
	REP.b #$20
	LDA.w !RAM_JP_Interior_MapWidthLo
	AND.w #$FFFE
	LSR
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.w $169E
	REP.b #$20
	LDA.w !RAM_JP_Interior_MapLengthLo
	INC
	AND.w #$FFFE
	LSR
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.w $16A0
	REP.b #$30
	LDA.w #$0000
	STA.w $172D
	JSL.l CODE_A4B9F6
	REP.b #$30
	LDA.w #$FFFF
	STA.w $172D
	REP.b #$20
	LDA.w !RAM_JP_Interior_CurrentRoom
	STA.w $0069
	STA.w $00EC
	SEP.b #$20
	LDA.b #$00
	STA.w $1797
CODE_A483B2:
	LDA.w $1731
	STA.w $172F
	SEP.b #$20
	LDA.b #$01
	STA.w $16B4
	JSL.l CODE_A4B9CD
	REP.b #$20
	LDA.l !RAM_JP_Interior_CurrentRoom
	STA.l $000069
	STA.l $0000EC
	JSL.l CODE_A1BB35
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	JSL.l CODE_A4DD5C
	REP.b #$20
	LDA.w #$45F6
	STA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	LDA.w #$F64B
	STA.w $16C8
	LDA.w #$BBA7
	STA.w $16CA
	REP.b #$30
	LDX.w #$002E
	LDA.w #$0000
CODE_A483FD:
	LDA.l DATA_A4EB04,x
	STA.l !RAM_JP_Interior_BufferedDinosaursOnFloorMessageData,x
	DEX
	DEX
	BPL.b CODE_A483FD
	REP.b #$30
	LDA.w #$0000
	STA.w $172D
	JSL.l CODE_A4DF47
	REP.b #$30
	STZ.w $16BB
	LDX.w #$003E
	LDA.w #$0000
CODE_A48420:
	STA.l $8017B7,x
	DEX
	DEX
	BPL.b CODE_A48420
	REP.b #$30
	LDA.w #$FFFF
	STA.w $1719
	STA.w $171B
	STA.w $171D
	STA.w $171F
	STA.w $1721
	STA.w $1723
	STA.w $1725
	LDX.w #$0000
	LDY.w #$00AC
CODE_A48448:
	STZ.w $7E8AD0,x
	INX
	INX
	DEY
	BNE.b CODE_A48448
	STZ.w $172D
	LDA.w #$FFFF
	STA.w $16B2
	SEP.b #$20
	LDA.b #$FF
	STA.b $F6
	LDA.b #$00
	STA.w $17A1
	SEP.b #$20
	REP.b #$10
	LDX.w #CODE_80FE72
	STX.b $04
	LDA.b #CODE_80FE72>>16
	STA.b $06
	LDX.w #$0010
	STX.w !REGISTER_VCountTimerLo
	LDX.w #$0078
	STX.w !REGISTER_HCountTimerLo
	LDA.b #$31
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.w !REGISTER_NMIEnable
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	CLI
	REP.b #$20
	LDA.b $71
CODE_A4848E:
	CMP.b $71
	BEQ.b CODE_A4848E
	REP.b #$30
	LDA.w #$FFFF
	STA.w $1841
	SEP.b #$20
	DEC.b $79
	JSL.l CODE_A4F057
	JSL.l CODE_A4F04B
CODE_A484A6:
	JSR.w CODE_A48A6D
	SEP.b #$20
CODE_A484AB:
	LDA.b $79
	BNE.b CODE_A484AB
	LDA.b $BF
	EOR.b #$FF
	STA.b $BF
	REP.b #$20
	LDA.b $1A
	PHA
	LDA.b $1C
	STA.b $1A
	PLA
	STA.b $1C
	JSL.l CODE_A489DB
	STZ.w $16E7
	JSL.l CODE_A49147
	REP.b #$20
	LDA.b $1A
	AND.w #$FF7F
	STA.b $1A
	LDA.l !RAM_JP_Interior_CurrentRoom
	STA.l $000069
	STA.l $0000EC
	JSL.l CODE_A4BD79
	JSL.l CODE_A4CAA3
	SEP.b #$20
	LDA.w $16C5
	BEQ.b CODE_A48545
	JSL.l CODE_A4F07E
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	JSL.l CODE_A4B62E
	LDA.b #$00
	STA.b $F6
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	REP.b #$30
	LDA.w #$4003
	LDY.w #$0030
	JSL.l CODE_A4EED6
CODE_A4851A:
	SEP.b #$20
	LDA.w $16C5
	BNE.b CODE_A4851A
	JSL.l CODE_A4B604
	SEP.b #$20
	LDA.b #$FF
	STA.b $F6
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	JSL.l CODE_A1BB35
	REP.b #$30
	LDA.w #$4003
	LDY.w #$00FF
	JSL.l CODE_A4EED6
CODE_A48545:
	SEP.b #$20
	DEC.b $79
	JSL.l CODE_A4B97F
	JSL.l CODE_A48CC2
	JSL.l CODE_A48E68
	REP.b #$30
	LDA.w $16BB
	BEQ.b CODE_A48588
	DEC.w $16BB
	LDA.l $7EA9B8
	TAX
	LDA.l $7E0000,x
	TAX
	LDA.l JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w #$003A
	TAX
	LDY.w #$0008
CODE_A48575:
	LDA.l JP_Interior_EntityTable[$00].Unknown1,x
	SEC
	SBC.w #$0020
	STA.l JP_Interior_EntityTable[$00].Unknown1,x
	INX
	INX
	INX
	INX
	DEY
	BNE.b CODE_A48575
CODE_A48588:
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	CMP.w #!Define_JP_InteriorFloorID_RaptorPenSubLevel2
	BNE.b CODE_A485BB
	LDA.w $16BB
	CMP.w #$0000
	BNE.b CODE_A485BB
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BEQ.b CODE_A485AD
	SEP.b #$20
	LDA.b #$00
	STA.l $8017F5
	LDA.b #$FF
	STA.l $8017F6
	BRA.b CODE_A485BB

CODE_A485AD:
	SEP.b #$20
	LDA.b #$FF
	STA.l $8017F5
	LDA.b #$00
	STA.l $8017F6
CODE_A485BB:
	REP.b #$30
	SEP.b #$20
	LDA.b !RAM_JP_Interior_TilePlayerIsTouching
	CMP.b #!Define_JP_InteriorWall_Generator
	BNE.b CODE_A485E6
	REP.b #$30
	LDA.w !RAM_JP_Global_GeneratorIsOnFlagLo
	BNE.b CODE_A485E6
	LDA.w #DATA_A4EABB
	JSL.l CODE_A4DF0D
	LDA.w #$FFFF
	STA.w !RAM_JP_Global_GeneratorIsOnFlagLo
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PickupItem&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	BRL.w CODE_A4893B

CODE_A485E6:
	REP.b #$20
	LDA.w !RAM_JP_Global_MainSystemRestoredFlagLo
	BEQ.b CODE_A48623
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BNE.b CODE_A48623
	SEP.b #$20
	LDA.b !RAM_JP_Interior_TilePlayerIsTouching
	CMP.b #!Define_JP_InteriorWall_PushableBox
	BNE.b CODE_A48623
	LDA.w !RAM_JP_Interior_CurrentRoom
	CMP.b #$03
	BNE.b CODE_A48623
	REP.b #$20
	LDA.w #$0006
	STA.w $16BB
	LDA.w #DATA_A4EBC7
	JSL.l CODE_A4DF0D
	LDA.w #$FFFF
	STA.w !RAM_JP_Global_VisitorCenterSecuredLo
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_ElevatorDoorOpen&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	BRL.w CODE_A4893B

CODE_A48623:
	REP.b #$20
	LDA.w !RAM_JP_Interior_ShipContactedFlagLo
	BEQ.b CODE_A48635
	LDA.w !RAM_JP_Interior_ShipFreeOfDinosFlagLo
	BEQ.b CODE_A48635
	LDA.w #$FFFF
	STA.w !RAM_JP_Global_ShipObjectivesClearFlagLo
CODE_A48635:
	REP.b #$20
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BEQ.b CODE_A48678
	LDA.w !RAM_JP_Interior_ShipFreeOfDinosFlagLo
	BNE.b CODE_A48678
	SEP.b #$20
	LDA.w !RAM_JP_Interior_KilledAllDinosaursOnFloorFlagTable+!Define_JP_InteriorFloorID_ShipEntryLevel
	BEQ.b CODE_A48678
	LDA.w !RAM_JP_Interior_KilledAllDinosaursOnFloorFlagTable+!Define_JP_InteriorFloorID_ShipSubLevel1
	BEQ.b CODE_A48678
	LDA.w !RAM_JP_Interior_KilledAllDinosaursOnFloorFlagTable+!Define_JP_InteriorFloorID_ShipSubLevel2
	BEQ.b CODE_A48678
	LDA.w !RAM_JP_Interior_KilledAllDinosaursOnFloorFlagTable+!Define_JP_InteriorFloorID_ShipSubLevel3
	BEQ.b CODE_A48678
	LDA.w !RAM_JP_Interior_KilledAllDinosaursOnFloorFlagTable+!Define_JP_InteriorFloorID_ShipSubLevel4
	BEQ.b CODE_A48678
	REP.b #$20
	LDA.w #DATA_A4EAD4
	JSL.l CODE_A4DF0D
	LDA.w #$FFFF
	STA.w !RAM_JP_Interior_ShipFreeOfDinosFlagLo
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PickupItem&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	BRL.w CODE_A4893B

CODE_A48678:
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	CMP.w #!Define_JP_InteriorFloorID_ShipEntryLevel
	BEQ.b CODE_A48696
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel1
	BEQ.b CODE_A48696
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel2
	BEQ.b CODE_A48696
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel3
	BEQ.b CODE_A48696
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel4
	BNE.b CODE_A486E9
CODE_A48696:
	TAX
	LDA.w !RAM_JP_Interior_DinosaursOnFloorTable,x
	AND.w #$00FF
	CMP.w #$0000
	BNE.b CODE_A486AE
	SEP.b #$20
	LDA.b #$FF
	STA.w !RAM_JP_Interior_KilledAllDinosaursOnFloorFlagTable,x
	REP.b #$20
	LDA.w #$0000
CODE_A486AE:
	CMP.w $17A3
	BEQ.b CODE_A486E9
	CMP.w $17A5
	BEQ.b CODE_A486E9
	PHA
	LDA.w $17A3
	STA.w $17A5
	PLA
	STA.w $17A3
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BEQ.b CODE_A486E9
	LDA.w !RAM_JP_Global_ShipObjectivesClearFlagLo
	BNE.b CODE_A486E9
	LDA.w $17A3
	ASL
	TAX
	LDA.l DATA_A4DFC2,x
	STA.l !RAM_JP_Interior_BufferedDinosaursOnFloorMessageData+$03
	REP.b #$20
	LDA.w #$FFFF
	STA.w $16A2
	LDA.w #!RAM_JP_Interior_BufferedDinosaursOnFloorMessageData
	JSL.l CODE_A4DF0D
CODE_A486E9:
	REP.b #$30
	LDA.w $1837
	BEQ.b CODE_A486FD
	STZ.w $1837
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_PickupItem&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
CODE_A486FD:
	JSR.w CODE_A4895C
	REP.b #$30
	LDA.w $173D
	INC
	STA.w $173D
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	CLC
	ADC.l (DATA_A58034&$FF0000)+$11,x
	TAX
CODE_A4871B:
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$00,x
	BMI.b CODE_A48761
	CMP.b !RAM_JP_Interior_CurrentRoom
	BNE.b CODE_A4875A
	LDA.l (DATA_A58034&$FF0000)+$02,x
	CMP.b #!Define_JP_InteriorDoorType_DarkRoom
	BNE.b CODE_A4875A
	LDA.w !RAM_JP_Interior_CanEnterDarkRoomSafelyFlagLo
	BEQ.b CODE_A4873E
	REP.b #$20
	LDA.w #$FFFF
	STA.w !RAM_JP_Interior_UseNightVisionFlagLo
	BRA.b CODE_A48768

CODE_A4873E:
	SEP.b #$20
	STZ.b !RAM_JP_Interior_TilePlayerIsTouching
	REP.b #$30
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_VelociraptorRoar&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	PLY
	REP.b #$20
	LDA.w #!Define_JP_Player_EnterDarkRoomDamage
	STA.w !RAM_JP_Global_Player_DamageTakenLo
	BRA.b CODE_A48768

CODE_A4875A:
	INX
	INX
	INX
	INX
	INX
	BRA.b CODE_A4871B

CODE_A48761:
	REP.b #$20
	REP.b #$20
	STZ.w !RAM_JP_Interior_UseNightVisionFlagLo
CODE_A48768:
	REP.b #$20
	REP.b #$20
	LDA.w !RAM_JP_Global_Player_DamageTakenLo
	CMP.w #$0100
	BCC.b CODE_A487C2
	SEP.b #$20
	STZ.b !RAM_JP_Interior_TilePlayerIsTouching
	LDA.b #$00
	STA.b $F6
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	JSL.l CODE_A1BB35
	REP.b #$20
	LDA.w #$FFFF
	STA.w !RAM_JP_Exterior_BuildingEntranceLo
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	JSL.l CODE_A4B619
	JSL.l CODE_A4F08E
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	JSL.l CODE_A4B643
	SEP.b #$20
	LDA.b #$00
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	JSL.l CODE_A4B78D
	RTL

CODE_A487C2:
	SEP.b #$20
	LDA.b !RAM_JP_Interior_TilePlayerIsTouching
	BMI.b CODE_A487CB
	BRL.w CODE_A4893B

CODE_A487CB:
	CMP.b #!Define_JP_InteriorWall_Generator
	BNE.b CODE_A487D2
	BRL.w CODE_A4893B

CODE_A487D2:
	AND.b #$F0
	CMP.b #!Define_JP_InteriorWall_ExitDoor
	BNE.b CODE_A487DB
	BRL.w CODE_A488A7

CODE_A487DB:
	CMP.b #!Define_JP_InteriorWall_Computer
	BEQ.b CODE_A487E2
	BRL.w CODE_A4893B

CODE_A487E2:
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	JSL.l CODE_A4B619
	JSL.l CODE_A4F08E
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	REP.b #$30
	STZ.b $71
	LDA.w #$0114
	LDY.w #$0000
	JSL.l CODE_A4EED6
	JSL.l CODE_A4B643
	REP.b #$30
CODE_A48810:
	LDA.b $71
	CMP.w #$003C
	BCC.b CODE_A48810
	STZ.b $71
	JSL.l CODE_A4B619
	JSL.l CODE_A4F08E
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	JSL.l CODE_A4B643
	JSL.l CODE_A4EE93
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_UnknownComputerSound&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	SEP.b #$20
	LDA.b !RAM_JP_Interior_TilePlayerIsTouching
	STZ.b !RAM_JP_Interior_TilePlayerIsTouching
	REP.b #$20
	AND.w #$000F
	JSL.l CODE_A68BC9
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	LDA.w #!Define_JP_SoundCommand_Unknown08
	LDY.w #$0000
	JSL.l CODE_A4EF83
	STZ.b $71
	REP.b #$30
CODE_A48862:
	LDA.b $71
	CMP.w #$0005
	BCC.b CODE_A48862
	STZ.b $71
	JSL.l CODE_A4ED47
	REP.b #$30
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	SEI
	REP.b #$30
	LDX.w #CODE_80FC42
	STX.b $00
	LDA.w #CODE_80FC42>>16
	STA.b $02
	LDA.w #$0080
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	SEI
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	STZ.w !REGISTER_HDMAEnable
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	JMP.w CODE_A48054

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

CODE_A488A7:
	LDA.b !RAM_JP_Interior_TilePlayerIsTouching
	STZ.b !RAM_JP_Interior_TilePlayerIsTouching
	REP.b #$20
	EOR.w #$FFFF
	INC
	AND.w #$00FF
	STA.w !RAM_JP_Exterior_BuildingEntranceLo
	SEP.b #$20
	LDA.b #$00
	STA.b $F6
	REP.b #$30
	STZ.b $18
	STZ.b $1A
	STZ.b $16
	STZ.b $1C
	REP.b #$30
	STZ.b $71
	LDA.w #$0114
	LDY.w #$0000
	JSL.l CODE_A4EED6
	JSL.l CODE_A4B619
	JSL.l CODE_A4F08E
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	JSL.l CODE_A4B643
	REP.b #$30
CODE_A488EB:
	LDA.b $71
	CMP.w #$003C
	BCC.b CODE_A488EB
	STZ.b $71
	REP.b #$30
	LDA.w !RAM_JP_Global_GeneratorIsOnFlagLo
	BEQ.b CODE_A48929
	LDX.w #$000C
	LDA.w !RAM_JP_Global_MainSystemRestoredFlagLo
	BEQ.b CODE_A48926
	LDX.w #$001C
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BEQ.b CODE_A48926
	LDX.w #$002C
	LDA.w !RAM_JP_Global_ShipObjectivesClearFlagLo
	BEQ.b CODE_A48926
	LDX.w #$0030
	LDA.w !RAM_JP_Global_NerveGasDeployedFlagLo
	BEQ.b CODE_A48926
	LDX.w #$0038
	LDA.w !RAM_JP_Global_MainlandContactedFlagLo
	BEQ.b CODE_A48926
	LDX.w #$0040
CODE_A48926:
	STX.w !RAM_JP_Exterior_CurrentPoleMessageLo
CODE_A48929:
	SEP.b #$20
	LDA.b #$00
	STA.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	JSL.l CODE_A4B78D
	RTL

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

CODE_A4893B:
	LDA.w !RAM_JP_Global_GeneratorIsOnFlagLo
	BEQ.b CODE_A4894A
	REP.b #$20
	LDA.l DATA_A2FA76
	STA.l $7F314C
CODE_A4894A:
	REP.b #$20
	LDA.b $6F
	INC
	CMP.w #$0006
	BNE.b CODE_A48957
	LDA.w #$0000
CODE_A48957:
	STA.b $6F
	BRL.w CODE_A484A6

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

; Note: Routine that animates wall textures in interior areas.

CODE_A4895C:
	SEP.b #$20
	PHB
	LDA.b #DATA_A489C5>>16
	PHA
	PLB
	REP.b #$30
	LDY.w #$0000
CODE_A48968:
	LDA.w DATA_A489C5,y
	CMP.w #$00FF
	BEQ.b CODE_A489C3
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	PHA
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	PHA
	LDA.l !RAM_JP_Interior_TexturePropTable,x
	PHA
	LDA.w DATA_A489C5+$02,y
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	PHA
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	PHA
	LDA.l !RAM_JP_Interior_TexturePropTable,x
	PHA
	LDA.w DATA_A489C5,y
	ASL
	TAX
	PLA
	STA.l !RAM_JP_Interior_TexturePropTable,x
	PLA
	STA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	PLA
	STA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	LDA.w DATA_A489C5+$02,y
	ASL
	TAX
	PLA
	STA.l !RAM_JP_Interior_TexturePropTable,x
	PLA
	STA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	PLA
	STA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	INY
	INY
	INY
	INY
	BRA.b CODE_A48968

CODE_A489C3:
	PLB
	RTS

DATA_A489C5:
	dw $010D,$010E,$002D,$002E,$002E,$002F,$003B,$003C
	dw $003C,$003D,$00FF

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

CODE_A489DB:
	REP.b #$30
	SEI
	LDA.b $AE
	STA.b $BA
	LDA.b $B1
	STA.b $BD
	SEP.b #$20
	LDA.b $AD
	STA.b $B9
	LDA.b $B0
	STA.b $BC
	SEP.b #$20
	LDA.b $AD
	STA.b $A1
	LDA.b $B0
	STA.b $A4
	REP.b #$30
	LDX.b $7C
	SEP.b #$20
	LDA.l $7FC84C,x
	XBA
	LDA.l $7FBA4C,x
	REP.b #$20
	CMP.w #$0000
	BPL.b CODE_A48A17
	LSR
	ORA.w #$8000
	JMP.w CODE_A48A18

CODE_A48A17:
	LSR
CODE_A48A18:
	LDA.w #$0000
	CLC
	ADC.b $AE
	STA.b $A2
	SEP.b #$20
	LDA.l $7FCA4C,x
	XBA
	LDA.l $7FBC4C,x
	REP.b #$20
	CMP.w #$0000
	BPL.b CODE_A48A39
	LSR
	ORA.w #$8000
	JMP.w CODE_A48A3A

CODE_A48A39:
	LSR
CODE_A48A3A:
	LDA.w #$0000
	CLC
	ADC.b $B1
	STA.b $A5
	CLI
	RTL

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

CODE_A48A44:
	REP.b #$30
	LDA.w #$FFE0
	STA.w $1641
	LDA.w #$FFCF
	STA.w $1643
	SEP.b #$20
	LDA.w $1641
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.w $1642
	STA.w !REGISTER_BG1HorizScrollOffset
	LDA.w $1643
	STA.w !REGISTER_BG1VertScrollOffset
	LDA.w $1644
	STA.w !REGISTER_BG1VertScrollOffset
	RTS

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

CODE_A48A6D:
	SEP.b #$20
CODE_A48A6F:
	LDA.w $1637
	BNE.b CODE_A48A6F
	INC.w $1637
	REP.b #$20
	LDA.w $177F
	STA.w $1783
	PHA
	LDA.w $1781
	STA.w $177F
	PLA
	STA.w $1781
	RTS

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

CODE_A48A8B:
	SEP.b #$20
	REP.b #$10
	LDA.b #$00
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$00
	STA.w DMA[$01].Parameters
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDX.w #$4000
	STX.w DMA[$01].SizeLo
	LDX.w #$0000
	STX.w !REGISTER_VRAMAddressLo
	LDX.w $1783
	STX.w DMA[$01].SourceLo
	LDA.b #$7F
	STA.w DMA[$01].SourceBank
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	STZ.w $1637
	REP.b #$20
	LDA.w !RAM_JP_Interior_UseNightVisionFlagLo
	PHA
	LDA.w $179B
	STA.w $1799
	PLA
	STA.w $179B
	RTL

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

CODE_A48ACE:
	REP.b #$30
	LDA.w $172D
	BEQ.b CODE_A48AD6
	RTL

CODE_A48AD6:
	LDA.b $16
	AND.w #$0100
	BEQ.b CODE_A48AE8
	LDA.b $7A
	CLC
	ADC.w #$0008
	STA.b $7A
	STZ.w $16E1
CODE_A48AE8:
	REP.b #$20
	LDA.b $16
	AND.w #$0200
	BEQ.b CODE_A48AFC
	LDA.b $7A
	SEC
	SBC.w #$0008
	STA.b $7A
	STZ.w $16E1
CODE_A48AFC:
	LDA.b $16
	AND.w #$0010
	BEQ.b CODE_A48B0E
	LDA.b $7A
	CLC
	ADC.w #$0002
	STA.b $7A
	STZ.w $16E1
CODE_A48B0E:
	REP.b #$20
	LDA.b $16
	AND.w #$0020
	BEQ.b CODE_A48B22
	LDA.b $7A
	SEC
	SBC.w #$0002
	STA.b $7A
	STZ.w $16E1
CODE_A48B22:
	LDA.b $7A
	AND.w #$07FF
	STA.b $7A
	REP.b #$20
	LDA.b $16
	AND.w #$0800
	BEQ.b CODE_A48B76
	LDX.b $7A
	SEP.b #$20
	LDA.l $7FCC4C,x
	XBA
	LDA.l $7FBE4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $95
	STA.b $95
	SEP.b #$20
	LDA.l $7FCC4C,x
	ADC.b $97
	STA.b $97
	SEP.b #$20
	LDA.l $7FCE4C,x
	XBA
	LDA.l $7FC04C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $98
	STA.b $98
	SEP.b #$20
	LDA.l $7FCE4C,x
	ADC.b $9A
	STA.b $9A
	REP.b #$20
CODE_A48B76:
	REP.b #$20
	LDA.b $16
	AND.w #$0400
	BEQ.b CODE_A48BC3
	LDX.b $7A
	SEP.b #$20
	LDA.l $7FC84C,x
	XBA
	LDA.l $7FBA4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $95
	STA.b $95
	SEP.b #$20
	LDA.l $7FC84C,x
	ADC.b $97
	STA.b $97
	SEP.b #$20
	LDA.l $7FCA4C,x
	XBA
	LDA.l $7FBC4C,x
	REP.b #$20
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.b $98
	STA.b $98
	SEP.b #$20
	LDA.l $7FCA4C,x
	ADC.b $9A
	STA.b $9A
	REP.b #$20
CODE_A48BC3:
	RTL

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

CODE_A48BC4:
	RTL

CODE_A48BC5:
	REP.b #$10
	SEP.b #$20
	LDA.w $166B
	BEQ.b CODE_A48BC4
	LDA.w $1673
	BPL.b CODE_A48BDE
	REP.b #$20
	AND.w #$007F
	EOR.w #$FFFF
	INC
	BRA.b CODE_A48BE3

CODE_A48BDE:
	REP.b #$20
	AND.w #$00FF
CODE_A48BE3:
	ASL
	BEQ.b CODE_A48BE9
	STZ.w $16E1
CODE_A48BE9:
	CLC
	ADC.b $7A
	AND.w #$07FF
	STA.b $7A
	SEP.b #$20
	LDA.w $1671
	BPL.b CODE_A48C5D
	REP.b #$20
	AND.w #$007F
	BEQ.b CODE_A48C5C
	CMP.w #$000C
	BCC.b CODE_A48C07
	LDA.w #$000C
CODE_A48C07:
	TAY
	LDX.b $7A
	SEP.b #$20
	LDA.l $7FCC4C,x
	XBA
	LDA.l $7FBE4C,x
	REP.b #$20
	STA.b $5A
	LDA.w #$0000
	PHY
CODE_A48C1D:
	CLC
	ADC.b $5A
	DEY
	BNE.b CODE_A48C1D
	ASL
	ASL
	ASL
	CLC
	ADC.b $95
	STA.b $95
	LDA.l $7FCC4C,x
	ADC.b $97
	STA.b $97
	PLY
	SEP.b #$20
	LDA.l $7FCE4C,x
	XBA
	LDA.l $7FC04C,x
	REP.b #$20
	STA.b $5A
	LDA.w #$0000
CODE_A48C46:
	CLC
	ADC.b $5A
	DEY
	BNE.b CODE_A48C46
	ASL
	ASL
	ASL
	CLC
	ADC.b $98
	STA.b $98
	LDA.l $7FCE4C,x
	ADC.b $9A
	STA.b $9A
CODE_A48C5C:
	RTL

CODE_A48C5D:
	REP.b #$20
	AND.w #$007F
	BEQ.b CODE_A48C5C
	CMP.w #$000C
	BCC.b CODE_A48C6C
	LDA.w #$000C
CODE_A48C6C:
	TAY
	LDX.b $7A
	SEP.b #$20
	LDA.l $7FC84C,x
	XBA
	LDA.l $7FBA4C,x
	REP.b #$20
	STA.b $5A
	LDA.w #$0000
	PHY
CODE_A48C82:
	CLC
	ADC.b $5A
	DEY
	BNE.b CODE_A48C82
	ASL
	ASL
	ASL
	CLC
	ADC.b $95
	STA.b $95
	LDA.l $7FC84C,x
	ADC.b $97
	STA.b $97
	PLY
	SEP.b #$20
	LDA.l $7FCA4C,x
	XBA
	LDA.l $7FBC4C,x
	REP.b #$20
	STA.b $5A
	LDA.w #$0000
CODE_A48CAB:
	CLC
	ADC.b $5A
	DEY
	BNE.b CODE_A48CAB
	ASL
	ASL
	ASL
	CLC
	ADC.b $98
	STA.b $98
	LDA.l $7FCA4C,x
	ADC.b $9A
	STA.b $9A
	RTL

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

CODE_A48CC2:
	SEP.b #$20
	PHB
	LDA.b #$7FB5CC>>16
	PHA
	PLB
	REP.b #$20
	STZ.w $7FB5CC
	STZ.w $7FB5CE
	STZ.w $7FB5D0
	STZ.w $7FB5D2
	STZ.w $7FB5D4
	STZ.w $7FB5D6
	STZ.w $7FB5D8
	STZ.w $7FB5DA
	STZ.w $7FB5DC
	STZ.w $7FB5DE
	STZ.w $7FB5E0
	STZ.w $7FB5E2
	STZ.w $7FB5E4
	STZ.w $7FB5E6
	STZ.w $7FB5E8
	STZ.w $7FB5EA
	STZ.w $7FB5EC
	STZ.w $7FB5EE
	STZ.w $7FB5F0
	STZ.w $7FB5F2
	STZ.w $7FB5F4
	STZ.w $7FB5F6
	STZ.w $7FB5F8
	STZ.w $7FB5FA
	STZ.w $7FB5FC
	STZ.w $7FB5FE
	STZ.w $7FB600
	STZ.w $7FB602
	STZ.w $7FB604
	STZ.w $7FB606
	STZ.w $7FB608
	STZ.w $7FB60A
	STZ.w $7FB60C
	STZ.w $7FB60E
	STZ.w $7FB610
	STZ.w $7FB612
	STZ.w $7FB614
	STZ.w $7FB616
	STZ.w $7FB618
	STZ.w $7FB61A
	STZ.w $7FB61C
	STZ.w $7FB61E
	STZ.w $7FB620
	STZ.w $7FB622
	STZ.w $7FB624
	STZ.w $7FB626
	STZ.w $7FB628
	STZ.w $7FB62A
	STZ.w $7FB62C
	STZ.w $7FB62E
	STZ.w $7FB630
	STZ.w $7FB632
	STZ.w $7FB634
	STZ.w $7FB636
	STZ.w $7FB638
	STZ.w $7FB63A
	STZ.w $7FB63C
	STZ.w $7FB63E
	STZ.w $7FB640
	STZ.w $7FB642
	STZ.w $7FB644
	STZ.w $7FB646
	STZ.w $7FB648
	STZ.w $7FB64A
	PLB
	RTL

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

CODE_A48D8D:
	REP.b #$30
	STZ.w $00D0
	SEP.b #$20
	LDA.b $BF
	BNE.b CODE_A48DA0
	LDY.w #$987C
	LDX.w $7E987A
	BRA.b CODE_A48DA6

CODE_A48DA0:
	LDY.w #$9052
	LDX.w $7E9050
CODE_A48DA6:
	REP.b #$20
	STY.b $D6
	BPL.b CODE_A48DB0
	STX.w $178B
	RTS

CODE_A48DB0:
	STX.w $178B
	LDA.l !RAM_JP_Interior_RoomDataPtrTable,x
	TAX
	LDA.l $7E0000,x
	INX
	INX
	STX.w $006D
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	BNE.b CODE_A48DCA
	BRL.w CODE_A48E41

CODE_A48DCA:
	ASL
	STA.b $65
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	TAX
	INX
	INX
CODE_A48DD3:
	LDA.w $00D0
	CLC
	ADC.b $D6
	TAY
	LDA.w $0810,y
	CLC
	ADC.b $D6
	STA.b $EA
CODE_A48DE2:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.b $EA
	TAY
	LDA.w $0004,y
	CMP.w #$0B54
	BCS.b CODE_A48E34
	LDA.w $0000,y
	STA.b $4A
	LDA.w $0002,y
	STA.b $4C
	CMP.w #$0005
	BCC.b CODE_A48E34
	CMP.w #$00E0
	BCS.b CODE_A48E34
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $EA
	TAY
	LDA.w $0004,y
	CMP.w #$0B54
	BCS.b CODE_A48E34
	LDA.w $0000,y
	STA.b $4E
	LDA.w $0002,y
	STA.b $50
	CMP.w #$0005
	BCC.b CODE_A48E34
	CMP.w #$00E0
	BCS.b CODE_A48E34
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	PHX
	PHB
	JSR.w CODE_A493A6
	PLB
	REP.b #$30
	PLX
CODE_A48E34:
	TXA
	CLC
	ADC.w #$0006
	TAX
	DEC.b $65
	BEQ.b CODE_A48E41
	BRL.w CODE_A48DE2

CODE_A48E41:
	INC.w $00D0
	INC.w $00D0
	LDX.w $006D
	LDA.l $7E0000,x
	BMI.b CODE_A48E67
	INX
	INX
	STX.w $006D
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	BEQ.b CODE_A48E41
	ASL
	STA.b $65
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	TAX
	INX
	INX
	BRL.w CODE_A48DD3

CODE_A48E67:
	RTS

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

CODE_A48E68:				; Note: Related to interior rendering.
	REP.b #$20
	LDA.l $7F349C
	EOR.w #$1540
	STA.l $7F349C
	SEP.b #$20
	PHB
	LDA.b #!RAM_JP_Interior_RoomDataPtrTable>>16
	PHA
	PLB
	JSR.w CODE_A48D8D
	REP.b #$30
	LDX.w $178B
	BPL.b CODE_A48E88
	PLB
	RTL

CODE_A48E88:
	LDA.l !RAM_JP_Interior_RoomDataPtrTable,x
	TAX
	LDA.l $7E0000,x
	INX
	INX
	STX.w $006D
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	INC
	INC
	STA.b $D8
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	ASL
	STA.b $42
	ASL
	STA.b $44
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEC
	SBC.b $42
	BEQ.b CODE_A48EB5
	BPL.b CODE_A48EB8
CODE_A48EB5:
	BRL.w CODE_A4901E

CODE_A48EB8:
	STA.b $65
	TXA
	CLC
	ADC.b $44
	ADC.b $44
	ADC.b $44
	TAX
	INX
	INX
	STZ.w $00D0
CODE_A48EC8:
	LDA.w $00D0
	CLC
	ADC.b $D6
	TAY
	LDA.w $0810,y
	STA.b $D8
	CLC
	ADC.b $D6
	STA.b $EA
CODE_A48ED9:
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	BPL.b CODE_A48EE1
	BRL.w CODE_A48F4F

CODE_A48EE1:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	ASL
	PHX
	TAX
	LDA.l !RAM_JP_Interior_TexturePropTable,x
	PLX
	CMP.w #$07F8
	BEQ.b CODE_A48F00
	CMP.w #$2530
	BEQ.b CODE_A48F00
	CMP.w #$1D38
	BEQ.b CODE_A48F00
	CMP.w #$0FF0
	BNE.b CODE_A48F4A
CODE_A48F00:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.b $EA
	TAY
	LDA.w $0004,y
	BMI.b CODE_A48F43
	LDA.w $0002,y
	BMI.b CODE_A48F43
	PHA
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $EA
	TAY
	LDA.w $0004,y
	BMI.b CODE_A48F46
	PLA
	CMP.w $0002,y
	BCC.b CODE_A48F29
	LDA.w $0002,y
	BMI.b CODE_A48F43
CODE_A48F29:
	CMP.w #$008C
	BCS.b CODE_A48F43
	ASL
	ASL
	TAY
CODE_A48F31:
	LDA.w $7E8AD0,y
	BEQ.b CODE_A48F3A
	INY
	INY
	BRA.b CODE_A48F31

CODE_A48F3A:
	TXA
	STA.w $7E8AD0,y
	LDA.b $EA
	STA.w $7E8D90,y
CODE_A48F43:
	BRL.w CODE_A48FFB

CODE_A48F46:
	PLA
	BRL.w CODE_A48FFB

CODE_A48F4A:
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	BPL.b CODE_A48FA9
CODE_A48F4F:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	BPL.b CODE_A48F57
	BRL.w CODE_A48FFB

CODE_A48F57:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	BPL.b CODE_A48F5F
	BRL.w CODE_A48FFB

CODE_A48F5F:
	CLC
	ADC.b $EA
	TAY
	LDA.w $0004,y
	BPL.b CODE_A48F6B
	BRL.w CODE_A48FFB

CODE_A48F6B:
	CMP.w #$0B54
	BCC.b CODE_A48F73
	BRL.w CODE_A48FFB

CODE_A48F73:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	CMP.w #$00B1
	BEQ.b CODE_A48F80
	CMP.w #$00B2
	BNE.b CODE_A48F85
CODE_A48F80:
	LDA.w #$0000
	BRA.b CODE_A48F88

CODE_A48F85:
	LDA.w $0002,y
CODE_A48F88:
	BMI.b CODE_A48FFB
	CMP.w #$008C
	BCC.b CODE_A48F92
	BRL.w CODE_A48FFB

CODE_A48F92:
	ASL
	ASL
	TAY
CODE_A48F95:
	LDA.w $7E8AD0,y
	BEQ.b CODE_A48F9E
	INY
	INY
	BRA.b CODE_A48F95

CODE_A48F9E:
	TXA
	STA.w $7E8AD0,y
	LDA.b $EA
	STA.w $7E8D90,y
	BRA.b CODE_A48FFB

CODE_A48FA9:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.b $EA
	TAY
	LDA.w $0004,y
	CMP.w #$0B54
	BCS.b CODE_A48FFB
	LDA.w $0000,y
	STA.b $4A
	LDA.w $0002,y
	STA.b $4C
	CMP.w #$0005
	BCC.b CODE_A48FFB
	CMP.w #$00E0
	BCS.b CODE_A48FFB
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $EA
	TAY
	LDA.w $0004,y
	CMP.w #$0B54
	BCS.b CODE_A48FFB
	LDA.w $0000,y
	STA.b $4E
	LDA.w $0002,y
	STA.b $50
	CMP.w #$0005
	BCC.b CODE_A48FFB
	CMP.w #$00E0
	BCS.b CODE_A48FFB
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	PHX
	PHB
	JSR.w CODE_A493A6
	PLB
	REP.b #$30
	PLX
CODE_A48FFB:
	SEP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	INC
	AND.b #$FF
	BNE.b CODE_A4900F
	REP.b #$20
	TXA
	CLC
	ADC.w #$0012
	TAX
	BRA.b CODE_A49017

CODE_A4900F:
	REP.b #$20
	TXA
	CLC
	ADC.w #$0006
	TAX
CODE_A49017:
	DEC.b $65
	BEQ.b CODE_A4901E
	BRL.w CODE_A48ED9

CODE_A4901E:
	INC.w $00D0
	INC.w $00D0
	LDX.w $006D
	LDA.l $7E0000,x
	BMI.b CODE_A49061
	INX
	INX
	STX.w $006D
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	INC
	INC
	STA.b $D8
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	ASL
	STA.b $42
	ASL
	STA.b $44
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	SEC
	SBC.b $42
	BEQ.b CODE_A4901E
	BMI.b CODE_A4901E
	STA.b $65
	TXA
	CLC
	ADC.b $44
	ADC.b $44
	ADC.b $44
	TAX
	INX
	INX
	BRL.w CODE_A48EC8

CODE_A49061:
	JSR.w CODE_A49066
	PLB
	RTL

CODE_A49066:
	REP.b #$30
	LDX.w #$0000
CODE_A4906B:
	PHX
	LDA.w $7E8AD0,x
	BEQ.b CODE_A490C3
	STZ.w $7E8AD0,x
	LDY.w $7E8D90,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	BMI.b CODE_A490C3
	TYA
	STA.b $EA
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	PHA
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	BMI.b CODE_A4908C
	BRA.b CODE_A490F1

CODE_A4908C:
	PLY
	LDA.w $0000,y
	STA.b $4A
	LDA.w $0002,y
	STA.b $4C
	PHX
	LDA.b $4C
	ASL
	TAX
	LDA.l DATA_A4928D,x
	STA.b $36
	PLX
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	INC
	AND.w #$00FF
	BNE.b CODE_A490CF
	LDA.w JP_Interior_EntityTable[$00].TextureIndexLo,x
	AND.w #$FE00
	BEQ.b CODE_A4911B
	LDA.w JP_Interior_EntityTable[$00].TextureIndexLo,x
	AND.w #$00FF
	PHY
	PHB
	JSR.w CODE_A4996B
	PLB
	REP.b #$30
	PLY
CODE_A490C3:
	PLX
	INX
	INX
	CPX.w #$0270
	BEQ.b CODE_A490CE
	BRL.w CODE_A4906B

CODE_A490CE:
	RTS

CODE_A490CF:
	PHY
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	CMP.w #$00B1
	BEQ.b CODE_A490DD
	CMP.w #$00B2
	BNE.b CODE_A490DD
CODE_A490DD:
	PHB
	JSR.w CODE_A49A2B
	PLB
	REP.b #$30
	PLY
	PLX
	INX
	INX
	CPX.w #$0270
	BEQ.b CODE_A490F0
	BRL.w CODE_A4906B

CODE_A490F0:
	RTS

CODE_A490F1:
	PLY
	LDA.w $0000,y
	STA.b $4A
	LDA.w $0002,y
	STA.b $4C
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $EA
	TAY
	LDA.w $0000,y
	STA.b $4E
	LDA.w $0002,y
	STA.b $50
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	PHX
	PHB
	JSR.w CODE_A49599
	PLB
	REP.b #$30
	PLX
	BRA.b CODE_A490C3

CODE_A4911B:
	PHY
	LDA.w JP_Interior_EntityTable[$00].TextureIndexLo,x
	CMP.w #!Define_JP_TextureID0094_DilophosaurSpit
	BNE.b CODE_A49133
	LDA.w JP_Interior_EntityTable[$00].Unknown9,x
	CLC
	ADC.l DATA_A2FB6C
	STA.l $7F3244
	LDA.w JP_Interior_EntityTable[$00].TextureIndexLo,x
CODE_A49133:
	PHB
	JSR.w CODE_A49A2B
	PLB
	REP.b #$30
	PLY
	PLX
	INX
	INX
	CPX.w #$0270
	BEQ.b CODE_A49146
	BRL.w CODE_A4906B

CODE_A49146:
	RTS

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

CODE_A49147:				; Note: Related to the interior enemy AI. Putting an RTL here freezes all enemies.
	SEP.b #$20
	LDA.b #$00
	STA.l $8017B7
	STA.b $F4
	PHB
	LDA.b #$7E9050>>16
	PHA
	PLB
	REP.b #$30
	LDA.b $71
	STA.b $73
	STZ.b $71
	STZ.w $1743
	STZ.w $1745
	STZ.w $00D0
	STZ.w $00D2
	STZ.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	LDA.w #!Define_JP_TextureID0106_GunSmoke*$02
	STA.w $1773
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.w !RAM_JP_Interior_EntityLoadStatusBuildingIndexLo
	LDA.w #$8000
	STA.w !RAM_JP_Interior_EntityLoadStatusBitIndexLo
	STZ.w !RAM_JP_Interior_EntityLoadStatusByteIndexLo
	REP.b #$30
	SEI
	LDA.b $AE
	STA.b $A8
	LDA.b $B1
	STA.b $AB
	SEP.b #$20
	LDA.b $AD
	STA.b $A7
	LDA.b $B0
	STA.b $AA
	CLI
	REP.b #$30
	SEP.b #$20
	LDA.b $BF
	BNE.b CODE_A491AD
	LDY.w #$987C
	LDX.w $7E987A
	BRA.b CODE_A491B3

CODE_A491AD:
	LDY.w #$9052
	LDX.w $7E9050
CODE_A491B3:
	REP.b #$20
	STY.b $D6
	TXA
	BPL.b CODE_A491BC
	PLB
	RTL

CODE_A491BC:
	LDA.l !RAM_JP_Interior_RoomDataPtrTable,x
	TAX
	LDA.l $7E0000,x
	INX
	INX
	STX.w $006D
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	INC
	INC
	STA.b $D8
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $65
	INX
	INX
CODE_A491DD:
	REP.b #$30
	LDA.w $00D0
	CLC
	ADC.b $D6
	TAY
	LDA.w $0810,y
	STA.b $DA
	CLC
	ADC.b $D6
	STA.b $EA
CODE_A491F0:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	INC
	AND.w #$00FF
	BNE.b CODE_A49222
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	BMI.b CODE_A49207
	PHX
	TXY
	JSL.l CODE_A19DC4
	REP.b #$30
	PLX
CODE_A49207:
	LDA.w $00D2
	CMP.w #$0001
	BNE.b CODE_A4921A
	ROR.w !RAM_JP_Interior_EntityLoadStatusBitIndexLo
	BPL.b CODE_A4921A
	INC.w !RAM_JP_Interior_EntityLoadStatusByteIndexLo
	INC.w !RAM_JP_Interior_EntityLoadStatusByteIndexLo
CODE_A4921A:
	TXA
	CLC
	ADC.w #$0012
	TAX
	BRA.b CODE_A49228

CODE_A49222:
	TXA
	CLC
	ADC.w #$0006
	TAX
CODE_A49228:
	DEC.b $65
	BEQ.b CODE_A4922F
	BRL.w CODE_A491F0

CODE_A4922F:
	INC.w $00D2
	INC.w $00D0
	INC.w $00D0
	LDX.w $006D
	LDA.l $7E0000,x
	BMI.b CODE_A4925C
	INX
	INX
	STX.w $006D
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	INC
	INC
	STA.b $D8
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $65
	INX
	INX
	BRL.w CODE_A491DD

CODE_A4925C:
	PLB
	REP.b #$20
	DEC.w $1745
	LDA.b $1A
	AND.w #$BFFF
	STA.b $1A
	LDA.b $BA
	STA.b $B4
	LDA.b $BD
	STA.b $B7
	SEP.b #$20
	LDA.b $B9
	STA.b $B3
	LDA.b $BC
	STA.b $B6
	LDA.b $F4
	STA.b $F3
	REP.b #$10
	SEP.b #$20
	LDX.w !RAM_JP_Interior_CurrentAreaLo
	LDA.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	STA.w !RAM_JP_Interior_DinosaursOnFloorTable,x
	RTL

DATA_A4928D:
	dw $0000,$0001,$0002,$0003,$0004,$0005,$0006,$0007
	dw $0008,$0009,$000A,$000C,$000D,$000E,$000F,$0010
	dw $0011,$0012,$0013,$0014,$0015,$0016,$0018,$0019
	dw $001A,$001B,$001C,$001D,$001E,$001F,$0020,$0021
	dw $0022,$0024,$0025,$0026,$0027,$0028,$0029,$002A
	dw $002B,$002C,$002D,$002E,$0030,$0031,$0032,$0033
	dw $0034,$0035,$0036,$0037,$0038,$0039,$003A,$003C
	dw $003D,$003E,$003F,$0040,$0041,$0042,$0043,$0044
	dw $0045,$0046,$0048,$0049,$004A,$004B,$004C,$004D
	dw $004E,$004F,$0050,$0051,$0052,$0054,$0055,$0056
	dw $0057,$0058,$0059,$005A,$005B,$005C,$005D,$005E
	dw $0060,$0061,$0062,$0063,$0064,$0065,$0066,$0067
	dw $0068,$0069,$006A,$006C,$006D,$006E,$006F,$0070
	dw $0071,$0072,$0073,$0074,$0075,$0076,$0078,$0079
	dw $007A,$007B,$007C,$007D,$007E,$007F,$0080,$0081
	dw $0082,$0084,$0085,$0086,$0087,$0088,$0089,$008A
	dw $008B,$008C,$008D,$008E,$0090,$0091,$0092,$0093
	dw $0094,$0095,$0096,$0097

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

CODE_A493A5:
	RTS

CODE_A493A6:
	REP.b #$30
	CMP.w #$00CA
	BNE.b CODE_A493B5
	LDA.w !RAM_JP_Interior_UseNightVisionFlagLo
	BNE.b CODE_A493A5
	LDA.w #$00CA
CODE_A493B5:
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePropTable,x
	CMP.w #$1540
	BCC.b CODE_A493C3
	BRL.w CODE_A494A9

CODE_A493C3:
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	SEP.b #$20
	LDA.b $4B
	BMI.b CODE_A493DB
	BNE.b CODE_A493A5
CODE_A493DB:
	REP.b #$20
	LDA.b $4E
	BMI.b CODE_A493A5
	SEC
	SBC.b $4A
	BEQ.b CODE_A493A5
	BMI.b CODE_A493A5
	STA.b $36
	TAY
	LDA.b $50
	SEC
	SBC.b $4C
	STA.b $7E
	BPL.b CODE_A493F8
	EOR.w #$FFFF
	INC
CODE_A493F8:
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2D
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2C
	LDA.w #$0018
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	BIT.b $7E
	BPL.b CODE_A49463
	LDA.b $2C
	EOR.w #$FFFF
	INC
	STA.b $2C
CODE_A49463:
	LDA.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	STZ.b $30
	LDA.b $38
	BMI.b CODE_A4947E
	CMP.w #$0080
	BCS.b CODE_A494A5
	JSL.l CODE_A49E1F
CODE_A4947E:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A494A5
CODE_A49484:
	LDA.b $33
	CLC
	ADC.b $2C
	STA.b $33
	LDA.b $30
	CLC
	ADC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A4949F
	CMP.w #$0080
	BCS.b CODE_A494A5
	JSL.l CODE_A49E1F
CODE_A4949F:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49484
CODE_A494A5:
	RTS

CODE_A494A6:
	REP.b #$30
CODE_A494A8:
	RTS

CODE_A494A9:
	SEC
	SBC.w #$1540
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	SEP.b #$20
	LDA.b $4B
	BMI.b CODE_A494C5
	BNE.b CODE_A494A8
CODE_A494C5:
	REP.b #$20
	LDA.b $4E
	BMI.b CODE_A494A8
	SEC
	SBC.b $4A
	BEQ.b CODE_A494A8
	BMI.b CODE_A494A8
	STA.b $36
	TAY
	LDA.b $50
	SEC
	SBC.b $4C
	STA.b $7E
	BPL.b CODE_A494E2
	EOR.w #$FFFF
	INC
CODE_A494E2:
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2D
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2C
	LDA.w #$0018
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	BIT.b $7E
	BPL.b CODE_A4954D
	LDA.b $2C
	EOR.w #$FFFF
	INC
	STA.b $2C
CODE_A4954D:
	LDA.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	LDA.w #$1800
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A4956E
	CMP.w #$0080
	BCS.b CODE_A49595
	JSL.l CODE_A49E1F
CODE_A4956E:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A49595
CODE_A49574:
	LDA.b $33
	CLC
	ADC.b $2C
	STA.b $33
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A4958F
	CMP.w #$0080
	BCS.b CODE_A49595
	JSL.l CODE_A49E1F
CODE_A4958F:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49574
CODE_A49595:
	RTS

CODE_A49596:
	REP.b #$30
CODE_A49598:
	RTS

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

CODE_A49599:
	REP.b #$30
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePropTable,x
	CMP.w #$07F8
	BEQ.b CODE_A495AB
	CMP.w #$1D38
	BNE.b CODE_A495AE
CODE_A495AB:
	BRL.w CODE_A4978E

CODE_A495AE:
	CMP.w #$1540
	BCC.b CODE_A495B6
	BRL.w CODE_A4969F

CODE_A495B6:
	LDA.w #$07F8
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	SEP.b #$20
	LDA.b $4B
	BMI.b CODE_A495D1
	BNE.b CODE_A49598
CODE_A495D1:
	REP.b #$20
	LDA.b $4E
	BMI.b CODE_A49598
	SEC
	SBC.b $4A
	BEQ.b CODE_A49598
	BMI.b CODE_A49598
	STA.b $36
	TAY
	LDA.b $50
	SEC
	SBC.b $4C
	STA.b $7E
	BPL.b CODE_A495EE
	EOR.w #$FFFF
	INC
CODE_A495EE:
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2D
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2C
	LDA.w #$0018
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	BIT.b $7E
	BPL.b CODE_A49659
	LDA.b $2C
	EOR.w #$FFFF
	INC
	STA.b $2C
CODE_A49659:
	LDA.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	STZ.b $30
	LDA.b $38
	BMI.b CODE_A49674
	CMP.w #$0080
	BCS.b CODE_A4969B
	JSL.l CODE_A49DCD
CODE_A49674:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A4969B
CODE_A4967A:
	LDA.b $33
	CLC
	ADC.b $2C
	STA.b $33
	LDA.b $30
	CLC
	ADC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49695
	CMP.w #$0080
	BCS.b CODE_A4969B
	JSL.l CODE_A49DCD
CODE_A49695:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A4967A
CODE_A4969B:
	RTS

CODE_A4969C:
	REP.b #$30
CODE_A4969E:
	RTS

CODE_A4969F:
	LDA.w #$07F8
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	SEP.b #$20
	LDA.b $4B
	BMI.b CODE_A496BA
	BNE.b CODE_A4969E
CODE_A496BA:
	REP.b #$20
	LDA.b $4E
	BMI.b CODE_A4969E
	SEC
	SBC.b $4A
	BEQ.b CODE_A4969E
	BMI.b CODE_A4969E
	STA.b $36
	TAY
	LDA.b $50
	SEC
	SBC.b $4C
	STA.b $7E
	BPL.b CODE_A496D7
	EOR.w #$FFFF
	INC
CODE_A496D7:
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2D
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2C
	LDA.w #$0018
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	BIT.b $7E
	BPL.b CODE_A49742
	LDA.b $2C
	EOR.w #$FFFF
	INC
	STA.b $2C
CODE_A49742:
	LDA.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	LDA.w #$1800
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49763
	CMP.w #$0080
	BCS.b CODE_A4978A
	JSL.l CODE_A49DCD
CODE_A49763:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A4978A
CODE_A49769:
	LDA.b $33
	CLC
	ADC.b $2C
	STA.b $33
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49784
	CMP.w #$0080
	BCS.b CODE_A4978A
	JSL.l CODE_A49DCD
CODE_A49784:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49769
CODE_A4978A:
	RTS

CODE_A4978B:
	REP.b #$30
CODE_A4978D:
	RTS

CODE_A4978E:
	CMP.w #$1540
	BCC.b CODE_A49796
	BRL.w CODE_A4987F

CODE_A49796:
	LDA.w #$07F8
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	SEP.b #$20
	LDA.b $4B
	BMI.b CODE_A497B1
	BNE.b CODE_A4978D
CODE_A497B1:
	REP.b #$20
	LDA.b $4E
	BMI.b CODE_A4978D
	SEC
	SBC.b $4A
	BEQ.b CODE_A4978D
	BMI.b CODE_A4978D
	STA.b $36
	TAY
	LDA.b $50
	SEC
	SBC.b $4C
	STA.b $7E
	BPL.b CODE_A497CE
	EOR.w #$FFFF
	INC
CODE_A497CE:
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2D
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2C
	LDA.w #$0018
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	BIT.b $7E
	BPL.b CODE_A49839
	LDA.b $2C
	EOR.w #$FFFF
	INC
	STA.b $2C
CODE_A49839:
	LDA.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	STZ.b $30
	LDA.b $38
	BMI.b CODE_A49854
	CMP.w #$0080
	BCS.b CODE_A4987B
	JSL.l CODE_A49E65
CODE_A49854:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A4987B
CODE_A4985A:
	LDA.b $33
	CLC
	ADC.b $2C
	STA.b $33
	LDA.b $30
	CLC
	ADC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49875
	CMP.w #$0080
	BCS.b CODE_A4987B
	JSL.l CODE_A49E65
CODE_A49875:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A4985A
CODE_A4987B:
	RTS

CODE_A4987C:
	REP.b #$30
CODE_A4987E:
	RTS

CODE_A4987F:
	LDA.w #$07F8
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	SEP.b #$20
	LDA.b $4B
	BMI.b CODE_A4989A
	BNE.b CODE_A4987E
CODE_A4989A:
	REP.b #$20
	LDA.b $4E
	BMI.b CODE_A4987E
	SEC
	SBC.b $4A
	BEQ.b CODE_A4987E
	BMI.b CODE_A4987E
	STA.b $36
	TAY
	LDA.b $50
	SEC
	SBC.b $4C
	STA.b $7E
	BPL.b CODE_A498B7
	EOR.w #$FFFF
	INC
CODE_A498B7:
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2D
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2C
	LDA.w #$0018
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	BIT.b $7E
	BPL.b CODE_A49922
	LDA.b $2C
	EOR.w #$FFFF
	INC
	STA.b $2C
CODE_A49922:
	LDA.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	LDA.w #$1800
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49943
	CMP.w #$0080
	BCS.b CODE_A4996A
	JSL.l CODE_A49E65
CODE_A49943:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A4996A
CODE_A49949:
	LDA.b $33
	CLC
	ADC.b $2C
	STA.b $33
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49964
	CMP.w #$0080
	BCS.b CODE_A4996A
	JSL.l CODE_A49E65
CODE_A49964:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49949
CODE_A4996A:
	RTS

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

CODE_A4996B:
	REP.b #$30
	LDA.l JP_Interior_EntityTable[$00].TextureIndexLo,x
	INC
	AND.w #$00FF
	BNE.b CODE_A49978
	RTS

CODE_A49978:
	LDA.l JP_Interior_EntityTable[$00].TextureIndexLo,x
	AND.w #$00FF
	TXY
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePropTable,x
	CMP.w #$1540
	BCC.b CODE_A499D9
	REP.b #$30
	TYX
	LDA.b $36
	PHA
	LDA.l JP_Interior_EntityTable[$00].TextureIndexLo,x
	AND.w #$00FF
	PHX
	PHB
	JSR.w CODE_A49A2B
	PLB
	REP.b #$30
	PLX
	PLA
	STA.b $36
	REP.b #$20
	LDA.b $4A
	SEC
	SBC.b $36
	INC
	INC
	STA.b $4A
	LDA.l JP_Interior_EntityTable[$00].TextureIndexHi,x
	AND.w #$00FF
	BEQ.b CODE_A499D8
	PHX
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	AND.w #$0001
	BNE.b CODE_A499CD
	LDA.b $36
	LSR
	LSR
	CLC
	ADC.b $4A
	STA.b $4A
CODE_A499CD:
	PLX
	LDA.l JP_Interior_EntityTable[$00].TextureIndexHi,x
	AND.w #$00FF
	JSR.w CODE_A49A2B
CODE_A499D8:
	RTS

CODE_A499D9:
	REP.b #$30
	TYX
	LDA.b $36
	PHA
	LDA.l JP_Interior_EntityTable[$00].TextureIndexLo,x
	AND.w #$00FF
	PHX
	PHB
	JSR.w CODE_A49A2B
	PLB
	REP.b #$30
	PLX
	PLA
	STA.b $36
	REP.b #$20
	LDA.b $4A
	CLC
	ADC.b $36
	DEC
	STA.b $4A
	LDA.l JP_Interior_EntityTable[$00].TextureIndexHi,x
	AND.w #$00FF
	BEQ.b CODE_A49A29
	PHX
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	AND.w #$0001
	BNE.b CODE_A49A1E
	LDA.b $36
	LSR
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.b $4A
	STA.b $4A
CODE_A49A1E:
	PLX
	LDA.l JP_Interior_EntityTable[$00].TextureIndexHi,x
	AND.w #$00FF
	JSR.w CODE_A49A2B
CODE_A49A29:
	RTS

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

CODE_A49A2A:
	RTS

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

CODE_A49A2B:
	REP.b #$30
	AND.w #$01FF
	ASL
	TAX
	LDA.l !RAM_JP_Interior_TexturePropTable,x
	CMP.w #$1540
	BCC.b CODE_A49A3E
	BRL.w CODE_A49BB6

CODE_A49A3E:
	CMP.w #$0FF0
	BNE.b CODE_A49A46
	BRL.w CODE_A49B01

CODE_A49A46:
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	REP.b #$20
	LDA.w #$0030
	STA.w !REGISTER_DividendLo
	LDA.b $36
	TAY
	LDA.b $3A
	AND.w #$0001
	BNE.b CODE_A49A70
	TYA
	LSR
	STA.b $36
	BRA.b CODE_A49A70

ADDR_A49A6E:
	DEC.b $3A
CODE_A49A70:
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	LDA.b $36
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	STZ.b $30
	LDA.b $34
	CMP.w #$008C
	BCS.b CODE_A49AFE
	ASL
	CLC
	ADC.b $2A
	TAX
	LDA.l DATA_A49F05,x
	STA.b $46
	LDA.l DATA_A4A059,x
	STA.b $48
	LDA.b $3A
	AND.w #$FFFE
	STA.b $3A
	LDA.b $38
	BMI.b CODE_A49ADE
	CMP.w #$0080
	BCS.b CODE_A49AFE
	JSL.l CODE_A49D65
CODE_A49ADE:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A49AFE
CODE_A49AE4:
	LDA.b $30
	CLC
	ADC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49AF8
	CMP.w #$0080
	BCS.b CODE_A49AFE
	JSL.l CODE_A49D65
CODE_A49AF8:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49AE4
CODE_A49AFE:
	RTS

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

CODE_A49AFF:
	REP.b #$20
CODE_A49B01:
	LDA.w #$07F8
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	REP.b #$20
	LDA.w #$0030
	STA.w !REGISTER_DividendLo
	LDA.b $36
	TAY
	LDA.b $3A
	AND.w #$0001
	BNE.b CODE_A49B2E
	TYA
	LSR
	STA.b $36
	BRA.b CODE_A49B2E

CODE_A49B2C:
	DEC.b $3A
CODE_A49B2E:
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	LDA.b $36
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	STZ.b $30
	LDA.b $34
	CMP.w #$008C
	BCS.b CODE_A49BB5
	ASL
	CLC
	ADC.b $2A
	TAX
	LDA.l DATA_A49F05,x
	STA.b $46
	LDA.l DATA_A4A059,x
	STA.b $48
	LDA.b $38
	BMI.b CODE_A49B95
	CMP.w #$0080
	BCS.b CODE_A49BB5
	JSL.l CODE_A49D91
CODE_A49B95:
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A49BB5
CODE_A49B9B:
	LDA.b $30
	CLC
	ADC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49BAF
	CMP.w #$0080
	BCS.b CODE_A49BB5
	JSL.l CODE_A49D91
CODE_A49BAF:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49B9B
CODE_A49BB5:
	RTS

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

CODE_A49BB6:
	SEC
	SBC.w #$1540
	CMP.w #$0FF0
	BNE.b CODE_A49BC2
	BRL.w CODE_A49C91

CODE_A49BC2:
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	REP.b #$20
	LDA.w #$0030
	STA.w !REGISTER_DividendLo
	LDA.b $36
	TAY
	LDA.b $3A
	AND.w #$0001
	BNE.b CODE_A49BE8
	TYA
	LSR
	STA.b $36
CODE_A49BE8:
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	LDA.b $36
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	LDA.w #$1800
	STA.b $30
	LDA.b $3A
	AND.w #$0001
	BEQ.b CODE_A49C3B
	DEC.b $3A
	LDA.w #$3000
	STA.b $30
CODE_A49C3B:
	LDA.b $34
	CMP.w #$008C
	BCS.b CODE_A49C90
	ASL
	CLC
	ADC.b $2A
	TAX
	LDA.l DATA_A49F05,x
	STA.b $46
	LDA.l DATA_A4A059,x
	STA.b $48
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	DEC.b $36
	LDA.b $38
	BMI.b CODE_A49C69
	CMP.w #$0080
	BCS.b CODE_A49C90
	JSL.l CODE_A49D65
CODE_A49C69:
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A49C90
CODE_A49C76:
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49C8A
	CMP.w #$0080
	BCS.b CODE_A49C90
	JSL.l CODE_A49D65
CODE_A49C8A:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49C76
CODE_A49C90:
	RTS

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

CODE_A49C91:
	LDA.w #$07F8
	STA.b $2A
	LDA.l !RAM_JP_Interior_TexturePtrsTableLoHi,x
	STA.b $3A
	LDA.l !RAM_JP_Interior_TexturePtrsTableBank,x
	SEP.b #$30
	PHA
	PLB
	REP.b #$20
	LDA.w #$0030
	STA.w !REGISTER_DividendLo
	LDA.b $36
	TAY
	LDA.b $3A
	AND.w #$0001
	BNE.b CODE_A49CBA
	TYA
	LSR
	STA.b $36
CODE_A49CBA:
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2F
	LDA.w !REGISTER_ProductOrRemainderLo
	XBA
	AND.w #$FF00
	STA.w !REGISTER_DividendLo
	STY.w !REGISTER_Divisor
	NOP #8
	LDX.w !REGISTER_QuotientLo
	STX.b $2E
	REP.b #$30
	LDA.b $36
	LSR
	EOR.w #$FFFF
	INC
	CLC
	ADC.b $4A
	STA.b $38
	LDA.b $4C
	AND.w #$00FF
	XBA
	STA.b $33
	LDA.w #$1800
	STA.b $30
	LDA.b $3A
	AND.w #$0001
	BEQ.b CODE_A49D0D
	DEC.b $3A
	LDA.w #$3000
	STA.b $30
CODE_A49D0D:
	LDA.b $34
	CMP.w #$008C
	BCS.b CODE_A49D62
	ASL
	CLC
	ADC.b $2A
	TAX
	LDA.l DATA_A49F05,x
	STA.b $46
	LDA.l DATA_A4A059,x
	STA.b $48
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	DEC.b $36
	LDA.b $38
	BMI.b CODE_A49D3B
	CMP.w #$0080
	BCS.b CODE_A49D62
	JSL.l CODE_A49D91
CODE_A49D3B:
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	INC.b $38
	DEC.b $36
	BEQ.b CODE_A49D62
CODE_A49D48:
	LDA.b $30
	SEC
	SBC.b $2E
	STA.b $30
	LDA.b $38
	BMI.b CODE_A49D5C
	CMP.w #$0080
	BCS.b CODE_A49D62
	JSL.l CODE_A49D91
CODE_A49D5C:
	INC.b $38
	DEC.b $36
	BNE.b CODE_A49D48
CODE_A49D62:
	RTS

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

ADDR_A49D63:					; Note: Routine that draws light/items/enemies
	REP.b #$20
CODE_A49D65:
	LDA.b $34
	INC
	LDX.b $38
	SEP.b #$20
	CMP.l $7FB5CC,x
	BCC.b CODE_A49D8C
	REP.b #$20
	LDA.b $31
	ASL
	TAX
	LDA.l DATA_A49EA5,x
	CLC
	ADC.b $3A
	TAY
	LDA.b $38
	CLC
	ADC.w $177F
	TAX
	SEP.b #$20
	JMP.w [$0046]

CODE_A49D8C:
	REP.b #$20
	RTL

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

ADDR_A49D8F:					; Note: Routine that draws ceiling lights
	REP.b #$20
CODE_A49D91:
	LDA.b $34
	INC
	LDX.b $38
	SEP.b #$20
	CMP.l $7FB5CC,x
	BCC.b CODE_A49DC8
	REP.b #$20
	LDA.b $31
	ASL
	TAX
	LDA.l DATA_A49EA5,x
	CLC
	ADC.b $3A
	PHA
	LDA.b $34
	ASL
	TAX
	PLA
	CLC
	ADC.l DATA_A683F2,x
	TAY
	LDA.b $38
	CLC
	ADC.w $177F
	SEC
	SBC.l DATA_A6850A,x
	TAX
	SEP.b #$20
	JMP.w [$0046]

CODE_A49DC8:
	REP.b #$20
	RTL

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

ADDR_A49DCB:
	REP.b #$20
CODE_A49DCD:
	LDA.b $34
	CMP.w #$008C
	BCS.b CODE_A49E1C
	INC
	LDX.b $38
	SEP.b #$20
	CMP.l $7FB5CC,x
	BCC.b CODE_A49E1A
	REP.b #$20
	DEC
	ASL
	ADC.b $2A
	TAX
	LDA.l DATA_A49F05,x
	STA.b $46
	LDA.l DATA_A4A059,x
	STA.b $48
	LDA.b $31
	ASL
	TAX
	LDA.l DATA_A49EA5,x
	CLC
	ADC.b $3A
	PHA
	LDA.b $34
	ASL
	TAX
	PLA
	CLC
	ADC.l DATA_A683F2,x
	TAY
	LDA.b $38
	SEC
	SBC.l DATA_A6850A,x
	CLC
	ADC.w $177F
	TAX
	SEP.b #$20
	JMP.w [$0046]

CODE_A49E1A:
	REP.b #$20
CODE_A49E1C:
	RTL

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

CODE_A49E1D:					; Note: Routine that handles drawing a wall
	REP.b #$20
CODE_A49E1F:
	LDA.b $34
	CMP.w #$009E
	BCS.b CODE_A49E62
	LDX.b $38
	SEP.b #$20
	CMP.l $7FB5CC,x
	BCC.b CODE_A49E60
	INC
	STA.l $7FB5CC,x
	REP.b #$20
	DEC
	ASL
	ADC.b $2A
	TAX
	LDA.l DATA_A49F05,x
	STA.b $46
	LDA.l DATA_A4A059,x
	STA.b $48
	LDA.b $31
	ASL
	TAX
	LDA.l DATA_A49EA5,x
	CLC
	ADC.b $3A
	TAY
	LDA.b $38
	CLC
	ADC.w $177F
	TAX
	SEP.b #$20
	JMP.w [$0046]

CODE_A49E60:
	REP.b #$20
CODE_A49E62:
	RTL

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

ADDR_A49E63:
	REP.b #$20
CODE_A49E65:
	LDA.b $34
	CMP.w #$008C
	BCS.b CODE_A49EA4
	LDX.b $38
	SEP.b #$20
	INC
	CMP.l $7FB5CC,x
	BCC.b CODE_A49EA2
	REP.b #$20
	DEC
	ASL
	ADC.b $2A
	TAX
	LDA.l DATA_A49F05,x
	STA.b $46
	LDA.l DATA_A4A059,x
	STA.b $48
	LDA.b $31
	ASL
	TAX
	LDA.l DATA_A49EA5,x
	CLC
	ADC.b $3A
	TAY
	LDA.b $38
	CLC
	ADC.w $177F
	TAX
	SEP.b #$20
	JMP.w [$0046]

CODE_A49EA2:
	REP.b #$20
CODE_A49EA4:
	RTL

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

DATA_A49EA5:
	dw $0000,$0040,$0080,$00C0,$0100,$0140,$0180,$01C0
	dw $0200,$0240,$0280,$02C0,$0300,$0340,$0380,$03C0
	dw $0400,$0440,$0480,$04C0,$0500,$0540,$0580,$05C0
	dw $0600,$0640,$0680,$06C0,$0700,$0740,$0780,$07C0
	dw $0800,$0840,$0880,$08C0,$0900,$0940,$0980,$09C0
	dw $0A00,$0A40,$0A80,$0AC0,$0B00,$0B40,$0B80,$0BC0

DATA_A49F05:
	dw CODE_A78000,CODE_A78000,CODE_A78001,CODE_A78014,CODE_A78035,CODE_A78064,CODE_A780A1,CODE_A780EC
	dw CODE_A78145,CODE_A781AC,CODE_A78221,CODE_A782A4,CODE_A78335,CODE_A783D4,CODE_A78481,CODE_A7853C
	dw CODE_A78605,CODE_A786DC,CODE_A787C1,CODE_A788B4,CODE_A789B5,CODE_A78AC4,CODE_A78BE1,CODE_A78D0C
	dw CODE_A78E45,CODE_A78F8C,CODE_A790E1,CODE_A79244,CODE_A793B5,CODE_A79534,CODE_A796C1,CODE_A7985C
	dw CODE_A79A05,CODE_A79BBC,CODE_A79D81,CODE_A79F4B,CODE_A7A11D,CODE_A7A2FA,CODE_A7A4DC,CODE_A7A6C9
	dw CODE_A7A8BB,CODE_A7AAB8,CODE_A7ACBA,CODE_A7AEC4,CODE_A7B0D9,CODE_A7B2F6,CODE_A7B51B,CODE_A7B748
	dw CODE_A7B97D,CODE_A7BBBA,CODE_A7BDFF,CODE_A7C04C,CODE_A7C2A1,CODE_A7C4FE,CODE_A7C763,CODE_A7C9D0
	dw CODE_A7CC45,CODE_A7CEC2,CODE_A7D147,CODE_A7D3D4,CODE_A7D669,CODE_A7D906,CODE_A7DBAB,CODE_A7DE58
	dw CODE_A7E10D,CODE_A7E3CA,CODE_A7E68F,CODE_A7E954,CODE_A7EC16,CODE_A7EED2,CODE_A7F18E,CODE_A7F444
	dw CODE_A7F6FA,CODE_A7F9AD,CODE_A7FC5D,CODE_A88000,CODE_A882AA,CODE_A88554,CODE_A887FB,CODE_A88A9F
	dw CODE_A88D43,CODE_A88FE4,CODE_A89282,CODE_A89520,CODE_A897BE,CODE_A89A56,CODE_A89CEE,CODE_A89F86
	dw CODE_A8A21B,CODE_A8A4B0,CODE_A8A742,CODE_A8A9D4,CODE_A8AC63,CODE_A8AEF2,CODE_A8B17E,CODE_A8B40A
	dw CODE_A8B693,CODE_A8B91C,CODE_A8BBA2,CODE_A8BE28,CODE_A8C0AB,CODE_A8C32B,CODE_A8C5AB,CODE_A8C82B
	dw CODE_A8CAAB,CODE_A8CD28,CODE_A8CFA2,CODE_A8D21F,CODE_A8D499,CODE_A8D713,CODE_A8D98D,CODE_A8DC04
	dw CODE_A8DE7B,CODE_A8E0EF,CODE_A8E363,CODE_A8E5D7,CODE_A8E84B,CODE_A8EABC,CODE_A8ED2A,CODE_A8EF9B
	dw CODE_A8F209,CODE_A8F477,CODE_A8F6E5,CODE_A8F953,CODE_A8FBBE,CODE_A98000,CODE_A9826B,CODE_A984D3
	dw CODE_A9873B,CODE_A989A3,CODE_A98C08,CODE_A98E70,CODE_A990D5,CODE_A99337,CODE_A9959C,CODE_A997FE
	dw CODE_A99A60,CODE_A99CC2,CODE_A99F24,CODE_A9A186,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5
	dw CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5
	dw CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5
	dw CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5,CODE_A9A3E5
	dw CODE_A9A3E5,CODE_A9A3E5

DATA_A4A059:
	dw CODE_A78000>>16,CODE_A78000>>16,CODE_A78001>>16,CODE_A78014>>16,CODE_A78035>>16,CODE_A78064>>16,CODE_A780A1>>16,CODE_A780EC>>16
	dw CODE_A78145>>16,CODE_A781AC>>16,CODE_A78221>>16,CODE_A782A4>>16,CODE_A78335>>16,CODE_A783D4>>16,CODE_A78481>>16,CODE_A7853C>>16
	dw CODE_A78605>>16,CODE_A786DC>>16,CODE_A787C1>>16,CODE_A788B4>>16,CODE_A789B5>>16,CODE_A78AC4>>16,CODE_A78BE1>>16,CODE_A78D0C>>16
	dw CODE_A78E45>>16,CODE_A78F8C>>16,CODE_A790E1>>16,CODE_A79244>>16,CODE_A793B5>>16,CODE_A79534>>16,CODE_A796C1>>16,CODE_A7985C>>16
	dw CODE_A79A05>>16,CODE_A79BBC>>16,CODE_A79D81>>16,CODE_A79F4B>>16,CODE_A7A11D>>16,CODE_A7A2FA>>16,CODE_A7A4DC>>16,CODE_A7A6C9>>16
	dw CODE_A7A8BB>>16,CODE_A7AAB8>>16,CODE_A7ACBA>>16,CODE_A7AEC4>>16,CODE_A7B0D9>>16,CODE_A7B2F6>>16,CODE_A7B51B>>16,CODE_A7B748>>16
	dw CODE_A7B97D>>16,CODE_A7BBBA>>16,CODE_A7BDFF>>16,CODE_A7C04C>>16,CODE_A7C2A1>>16,CODE_A7C4FE>>16,CODE_A7C763>>16,CODE_A7C9D0>>16
	dw CODE_A7CC45>>16,CODE_A7CEC2>>16,CODE_A7D147>>16,CODE_A7D3D4>>16,CODE_A7D669>>16,CODE_A7D906>>16,CODE_A7DBAB>>16,CODE_A7DE58>>16
	dw CODE_A7E10D>>16,CODE_A7E3CA>>16,CODE_A7E68F>>16,CODE_A7E954>>16,CODE_A7EC16>>16,CODE_A7EED2>>16,CODE_A7F18E>>16,CODE_A7F444>>16
	dw CODE_A7F6FA>>16,CODE_A7F9AD>>16,CODE_A7FC5D>>16,CODE_A88000>>16,CODE_A882AA>>16,CODE_A88554>>16,CODE_A887FB>>16,CODE_A88A9F>>16
	dw CODE_A88D43>>16,CODE_A88FE4>>16,CODE_A89282>>16,CODE_A89520>>16,CODE_A897BE>>16,CODE_A89A56>>16,CODE_A89CEE>>16,CODE_A89F86>>16
	dw CODE_A8A21B>>16,CODE_A8A4B0>>16,CODE_A8A742>>16,CODE_A8A9D4>>16,CODE_A8AC63>>16,CODE_A8AEF2>>16,CODE_A8B17E>>16,CODE_A8B40A>>16
	dw CODE_A8B693>>16,CODE_A8B91C>>16,CODE_A8BBA2>>16,CODE_A8BE28>>16,CODE_A8C0AB>>16,CODE_A8C32B>>16,CODE_A8C5AB>>16,CODE_A8C82B>>16
	dw CODE_A8CAAB>>16,CODE_A8CD28>>16,CODE_A8CFA2>>16,CODE_A8D21F>>16,CODE_A8D499>>16,CODE_A8D713>>16,CODE_A8D98D>>16,CODE_A8DC04>>16
	dw CODE_A8DE7B>>16,CODE_A8E0EF>>16,CODE_A8E363>>16,CODE_A8E5D7>>16,CODE_A8E84B>>16,CODE_A8EABC>>16,CODE_A8ED2A>>16,CODE_A8EF9B>>16
	dw CODE_A8F209>>16,CODE_A8F477>>16,CODE_A8F6E5>>16,CODE_A8F953>>16,CODE_A8FBBE>>16,CODE_A98000>>16,CODE_A9826B>>16,CODE_A984D3>>16
	dw CODE_A9873B>>16,CODE_A989A3>>16,CODE_A98C08>>16,CODE_A98E70>>16,CODE_A990D5>>16,CODE_A99337>>16,CODE_A9959C>>16,CODE_A997FE>>16
	dw CODE_A99A60>>16,CODE_A99CC2>>16,CODE_A99F24>>16,CODE_A9A186>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16
	dw CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16
	dw CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16
	dw CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16,CODE_A9A3E5>>16
	dw CODE_A9A3E5>>16,CODE_A9A3E5>>16

DATA_A4A1AD:
	dw CODE_A9A644,CODE_A9A646,CODE_A9A65D,CODE_A9A686,CODE_A9A6C1,CODE_A9A70E,CODE_A9A76D,CODE_A9A7DE
	dw CODE_A9A861,CODE_A9A8F6,CODE_A9A99D,CODE_A9AA56,CODE_A9AB21,CODE_A9ABFE,CODE_A9ACED,CODE_A9ADEE
	dw CODE_A9AF01,CODE_A9B026,CODE_A9B15D,CODE_A9B2A6,CODE_A9B401,CODE_A9B56E,CODE_A9B6ED,CODE_A9B87E
	dw CODE_A9BA21,CODE_A9BBD6,CODE_A9BD9D,CODE_A9BF76,CODE_A9C161,CODE_A9C35E,CODE_A9C56D,CODE_A9C78E
	dw CODE_A9C9C1,CODE_A9CC06,CODE_A9CE4E,CODE_A9D09E,CODE_A9D2FB,CODE_A9D55B,CODE_A9D7C8,CODE_A9DA38
	dw CODE_A9DCB5,CODE_A9DF35,CODE_A9E1BD,CODE_A9E452,CODE_A9E6EF,CODE_A9E994,CODE_A9EC41,CODE_A9EEF6
	dw CODE_A9F1B3,CODE_A9F478,CODE_A9F745,CODE_A9FA1A,CODE_AA8000,CODE_AA82E5,CODE_AA85D2,CODE_AA88C7
	dw CODE_AA8BC4,CODE_AA8EC9,CODE_AA91D6,CODE_AA94EB,CODE_AA9808,CODE_AA9B2D,CODE_AA9E5A,CODE_AAA18F
	dw CODE_AAA4CC,CODE_AAA811,CODE_AAAB56,CODE_AAAE96,CODE_AAB1CC,CODE_AAB502,CODE_AAB82E,CODE_AABB5A
	dw CODE_AABE81,CODE_AAC1A3,CODE_AAC4C5,CODE_AAC7DD,CODE_AACAF5,CODE_AACE08,CODE_AAD116,CODE_AAD424
	dw CODE_AAD72D,CODE_AADA31,CODE_AADD35,CODE_AAE039,CODE_AAE333,CODE_AAE62D,CODE_AAE927,CODE_AAEC1C
	dw CODE_AAEF11,CODE_AAF201,CODE_AAF4F1,CODE_AAF7DC,CODE_AAFAC7,CODE_AB8000,CODE_AB82E6,CODE_AB85C7
	dw CODE_AB88A8,CODE_AB8B84,CODE_AB8E60,CODE_AB9137,CODE_AB9409,CODE_AB96DB,CODE_AB99AD,CODE_AB9C7F
	dw CODE_AB9F4C,CODE_ABA214,CODE_ABA4E1,CODE_ABA7A9,CODE_ABAA71,CODE_ABAD39,CODE_ABAFFC,CODE_ABB2BF
	dw CODE_ABB57D,CODE_ABB83B,CODE_ABBAF9,CODE_ABBDB7,CODE_ABC070,CODE_ABC324,CODE_ABC5DD,CODE_ABC891
	dw CODE_ABCB45,CODE_ABCDF9,CODE_ABD0AD,CODE_ABD35C,CODE_ABD606,CODE_ABD8B5,CODE_ABDB5F,CODE_ABDE09
	dw CODE_ABE0B3,CODE_ABE358,CODE_ABE602,CODE_ABE8A7,CODE_ABEB47,CODE_ABEDEC,CODE_ABF08C,CODE_ABF32C
	dw CODE_ABF5CC,CODE_ABF86C,CODE_ABFB0C,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D

DATA_A4A301:
	dw CODE_A9A644>>16,CODE_A9A646>>16,CODE_A9A65D>>16,CODE_A9A686>>16,CODE_A9A6C1>>16,CODE_A9A70E>>16,CODE_A9A76D>>16,CODE_A9A7DE>>16
	dw CODE_A9A861>>16,CODE_A9A8F6>>16,CODE_A9A99D>>16,CODE_A9AA56>>16,CODE_A9AB21>>16,CODE_A9ABFE>>16,CODE_A9ACED>>16,CODE_A9ADEE>>16
	dw CODE_A9AF01>>16,CODE_A9B026>>16,CODE_A9B15D>>16,CODE_A9B2A6>>16,CODE_A9B401>>16,CODE_A9B56E>>16,CODE_A9B6ED>>16,CODE_A9B87E>>16
	dw CODE_A9BA21>>16,CODE_A9BBD6>>16,CODE_A9BD9D>>16,CODE_A9BF76>>16,CODE_A9C161>>16,CODE_A9C35E>>16,CODE_A9C56D>>16,CODE_A9C78E>>16
	dw CODE_A9C9C1>>16,CODE_A9CC06>>16,CODE_A9CE4E>>16,CODE_A9D09E>>16,CODE_A9D2FB>>16,CODE_A9D55B>>16,CODE_A9D7C8>>16,CODE_A9DA38>>16
	dw CODE_A9DCB5>>16,CODE_A9DF35>>16,CODE_A9E1BD>>16,CODE_A9E452>>16,CODE_A9E6EF>>16,CODE_A9E994>>16,CODE_A9EC41>>16,CODE_A9EEF6>>16
	dw CODE_A9F1B3>>16,CODE_A9F478>>16,CODE_A9F745>>16,CODE_A9FA1A>>16,CODE_AA8000>>16,CODE_AA82E5>>16,CODE_AA85D2>>16,CODE_AA88C7>>16
	dw CODE_AA8BC4>>16,CODE_AA8EC9>>16,CODE_AA91D6>>16,CODE_AA94EB>>16,CODE_AA9808>>16,CODE_AA9B2D>>16,CODE_AA9E5A>>16,CODE_AAA18F>>16
	dw CODE_AAA4CC>>16,CODE_AAA811>>16,CODE_AAAB56>>16,CODE_AAAE96>>16,CODE_AAB1CC>>16,CODE_AAB502>>16,CODE_AAB82E>>16,CODE_AABB5A>>16
	dw CODE_AABE81>>16,CODE_AAC1A3>>16,CODE_AAC4C5>>16,CODE_AAC7DD>>16,CODE_AACAF5>>16,CODE_AACE08>>16,CODE_AAD116>>16,CODE_AAD424>>16
	dw CODE_AAD72D>>16,CODE_AADA31>>16,CODE_AADD35>>16,CODE_AAE039>>16,CODE_AAE333>>16,CODE_AAE62D>>16,CODE_AAE927>>16,CODE_AAEC1C>>16
	dw CODE_AAEF11>>16,CODE_AAF201>>16,CODE_AAF4F1>>16,CODE_AAF7DC>>16,CODE_AAFAC7>>16,CODE_AB8000>>16,CODE_AB82E6>>16,CODE_AB85C7>>16
	dw CODE_AB88A8>>16,CODE_AB8B84>>16,CODE_AB8E60>>16,CODE_AB9137>>16,CODE_AB9409>>16,CODE_AB96DB>>16,CODE_AB99AD>>16,CODE_AB9C7F>>16
	dw CODE_AB9F4C>>16,CODE_ABA214>>16,CODE_ABA4E1>>16,CODE_ABA7A9>>16,CODE_ABAA71>>16,CODE_ABAD39>>16,CODE_ABAFFC>>16,CODE_ABB2BF>>16
	dw CODE_ABB57D>>16,CODE_ABB83B>>16,CODE_ABBAF9>>16,CODE_ABBDB7>>16,CODE_ABC070>>16,CODE_ABC324>>16,CODE_ABC5DD>>16,CODE_ABC891>>16
	dw CODE_ABCB45>>16,CODE_ABCDF9>>16,CODE_ABD0AD>>16,CODE_ABD35C>>16,CODE_ABD606>>16,CODE_ABD8B5>>16,CODE_ABDB5F>>16,CODE_ABDE09>>16
	dw CODE_ABE0B3>>16,CODE_ABE358>>16,CODE_ABE602>>16,CODE_ABE8A7>>16,CODE_ABEB47>>16,CODE_ABEDEC>>16,CODE_ABF08C>>16,CODE_ABF32C>>16
	dw CODE_ABF5CC>>16,CODE_ABF86C>>16,CODE_ABFB0C>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16

DATA_A4A455:
	dw CODE_A9A645,CODE_A9A651,CODE_A9A668,CODE_A9A69A,CODE_A9A6D5,CODE_A9A72B,CODE_A9A793,CODE_A9A804
	dw CODE_A9A887,CODE_A9A925,CODE_A9A9D5,CODE_A9AA8E,CODE_A9AB62,CODE_A9AC3F,CODE_A9AD37,CODE_A9AE38
	dw CODE_A9AF4B,CODE_A9B079,CODE_A9B1B9,CODE_A9B302,CODE_A9B466,CODE_A9B5D3,CODE_A9B75B,CODE_A9B8EC
	dw CODE_A9BA98,CODE_A9BC4D,CODE_A9BE1D,CODE_A9BFF6,CODE_A9C1EA,CODE_A9C3E7,CODE_A9C5FF,CODE_A9C820
	dw CODE_A9CA53,CODE_A9CC9C,CODE_A9CEE8,CODE_A9D138,CODE_A9D399,CODE_A9D5F9,CODE_A9D86A,CODE_A9DADA
	dw CODE_A9DD5B,CODE_A9DFDB,CODE_A9E267,CODE_A9E4FC,CODE_A9E79D,CODE_A9EA42,CODE_A9ECF3,CODE_A9EFA8
	dw CODE_A9F269,CODE_A9F52E,CODE_A9F7FF,CODE_A9FAD4,CODE_AA80BE,CODE_AA83A3,CODE_AA8694,CODE_AA8989
	dw CODE_AA8C8A,CODE_AA8F8F,CODE_AA92A0,CODE_AA95B5,CODE_AA98D6,CODE_AA9BFB,CODE_AA9F2C,CODE_AAA261
	dw CODE_AAA59E,CODE_AAA8E3,CODE_AAAC28,CODE_AAAF5F,CODE_AAB295,CODE_AAB5C2,CODE_AAB8EE,CODE_AABC11
	dw CODE_AABF38,CODE_AAC256,CODE_AAC573,CODE_AAC887,CODE_AACB9A,CODE_AACEA9,CODE_AAD1B7,CODE_AAD4BC
	dw CODE_AAD7C5,CODE_AADAC5,CODE_AADDC9,CODE_AAE0C4,CODE_AAE3BE,CODE_AAE6B4,CODE_AAE9A9,CODE_AAEC9A
	dw CODE_AAEF8F,CODE_AAF27B,CODE_AAF566,CODE_AAF84D,CODE_AAFB38,CODE_AB806D,CODE_AB834E,CODE_AB862B
	dw CODE_AB890C,CODE_AB8BE4,CODE_AB8EBB,CODE_AB918E,CODE_AB9460,CODE_AB972E,CODE_AB9A00,CODE_AB9CC9
	dw CODE_AB9F96,CODE_ABA25A,CODE_ABA527,CODE_ABA7EB,CODE_ABAAB3,CODE_ABAD72,CODE_ABB035,CODE_ABB2F8
	dw CODE_ABB5B2,CODE_ABB86C,CODE_ABBB2A,CODE_ABBDDF,CODE_ABC098,CODE_ABC348,CODE_ABC601,CODE_ABC8B5
	dw CODE_ABCB65,CODE_ABCE19,CODE_ABD0C4,CODE_ABD373,CODE_ABD619,CODE_ABD8C8,CODE_ABDB6E,CODE_ABDE14
	dw CODE_ABE0B5,CODE_ABE363,CODE_ABE604,CODE_ABE8A9,CODE_ABEB5A,CODE_ABEDFF,CODE_ABF09B,CODE_ABF33B
	dw CODE_ABF5D7,CODE_ABF877,CODE_ABFB0E,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D

DATA_A4A5A9:
	dw CODE_A9A645>>16,CODE_A9A651>>16,CODE_A9A668>>16,CODE_A9A69A>>16,CODE_A9A6D5>>16,CODE_A9A72B>>16,CODE_A9A793>>16,CODE_A9A804>>16
	dw CODE_A9A887>>16,CODE_A9A925>>16,CODE_A9A9D5>>16,CODE_A9AA8E>>16,CODE_A9AB62>>16,CODE_A9AC3F>>16,CODE_A9AD37>>16,CODE_A9AE38>>16
	dw CODE_A9AF4B>>16,CODE_A9B079>>16,CODE_A9B1B9>>16,CODE_A9B302>>16,CODE_A9B466>>16,CODE_A9B5D3>>16,CODE_A9B75B>>16,CODE_A9B8EC>>16
	dw CODE_A9BA98>>16,CODE_A9BC4D>>16,CODE_A9BE1D>>16,CODE_A9BFF6>>16,CODE_A9C1EA>>16,CODE_A9C3E7>>16,CODE_A9C5FF>>16,CODE_A9C820>>16
	dw CODE_A9CA53>>16,CODE_A9CC9C>>16,CODE_A9CEE8>>16,CODE_A9D138>>16,CODE_A9D399>>16,CODE_A9D5F9>>16,CODE_A9D86A>>16,CODE_A9DADA>>16
	dw CODE_A9DD5B>>16,CODE_A9DFDB>>16,CODE_A9E267>>16,CODE_A9E4FC>>16,CODE_A9E79D>>16,CODE_A9EA42>>16,CODE_A9ECF3>>16,CODE_A9EFA8>>16
	dw CODE_A9F269>>16,CODE_A9F52E>>16,CODE_A9F7FF>>16,CODE_A9FAD4>>16,CODE_AA80BE>>16,CODE_AA83A3>>16,CODE_AA8694>>16,CODE_AA8989>>16
	dw CODE_AA8C8A>>16,CODE_AA8F8F>>16,CODE_AA92A0>>16,CODE_AA95B5>>16,CODE_AA98D6>>16,CODE_AA9BFB>>16,CODE_AA9F2C>>16,CODE_AAA261>>16
	dw CODE_AAA59E>>16,CODE_AAA8E3>>16,CODE_AAAC28>>16,CODE_AAAF5F>>16,CODE_AAB295>>16,CODE_AAB5C2>>16,CODE_AAB8EE>>16,CODE_AABC11>>16
	dw CODE_AABF38>>16,CODE_AAC256>>16,CODE_AAC573>>16,CODE_AAC887>>16,CODE_AACB9A>>16,CODE_AACEA9>>16,CODE_AAD1B7>>16,CODE_AAD4BC>>16
	dw CODE_AAD7C5>>16,CODE_AADAC5>>16,CODE_AADDC9>>16,CODE_AAE0C4>>16,CODE_AAE3BE>>16,CODE_AAE6B4>>16,CODE_AAE9A9>>16,CODE_AAEC9A>>16
	dw CODE_AAEF8F>>16,CODE_AAF27B>>16,CODE_AAF566>>16,CODE_AAF84D>>16,CODE_AAFB38>>16,CODE_AB806D>>16,CODE_AB834E>>16,CODE_AB862B>>16
	dw CODE_AB890C>>16,CODE_AB8BE4>>16,CODE_AB8EBB>>16,CODE_AB918E>>16,CODE_AB9460>>16,CODE_AB972E>>16,CODE_AB9A00>>16,CODE_AB9CC9>>16
	dw CODE_AB9F96>>16,CODE_ABA25A>>16,CODE_ABA527>>16,CODE_ABA7EB>>16,CODE_ABAAB3>>16,CODE_ABAD72>>16,CODE_ABB035>>16,CODE_ABB2F8>>16
	dw CODE_ABB5B2>>16,CODE_ABB86C>>16,CODE_ABBB2A>>16,CODE_ABBDDF>>16,CODE_ABC098>>16,CODE_ABC348>>16,CODE_ABC601>>16,CODE_ABC8B5>>16
	dw CODE_ABCB65>>16,CODE_ABCE19>>16,CODE_ABD0C4>>16,CODE_ABD373>>16,CODE_ABD619>>16,CODE_ABD8C8>>16,CODE_ABDB6E>>16,CODE_ABDE14>>16
	dw CODE_ABE0B5>>16,CODE_ABE363>>16,CODE_ABE604>>16,CODE_ABE8A9>>16,CODE_ABEB5A>>16,CODE_ABEDFF>>16,CODE_ABF09B>>16,CODE_ABF33B>>16
	dw CODE_ABF5D7>>16,CODE_ABF877>>16,CODE_ABFB0E>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16

DATA_A4A6FD:
	dw CODE_A9A645,CODE_A9A651,CODE_A9A671,CODE_A9A6AC,CODE_A9A6E7,CODE_A9A746,CODE_A9A7AE,CODE_A9A828
	dw CODE_A9A8AB,CODE_A9A952,CODE_A9AA02,CODE_A9AAC4,CODE_A9AB98,CODE_A9AC7E,CODE_A9AD76,CODE_A9AE80
	dw CODE_A9AF93,CODE_A9B0CA,CODE_A9B20A,CODE_A9B35C,CODE_A9B4C0,CODE_A9B636,CODE_A9B7BE,CODE_A9B958
	dw CODE_A9BB04,CODE_A9BCC2,CODE_A9BE92,CODE_A9C074,CODE_A9C268,CODE_A9C46E,CODE_A9C686,CODE_A9C8B0
	dw CODE_A9CAE3,CODE_A9CD30,CODE_A9CF7C,CODE_A9D1D0,CODE_A9D431,CODE_A9D695,CODE_A9D906,CODE_A9DB7A
	dw CODE_A9DDFB,CODE_A9E07F,CODE_A9E30B,CODE_A9E5A4,CODE_A9E845,CODE_A9EAEE,CODE_A9ED9F,CODE_A9F058
	dw CODE_A9F319,CODE_A9F5E2,CODE_A9F8B3,CODE_A9FB8C,CODE_AA8176,CODE_AA845F,CODE_AA8750,CODE_AA8A49
	dw CODE_AA8D4A,CODE_AA9053,CODE_AA9364,CODE_AA967D,CODE_AA999E,CODE_AA9CC7,CODE_AA9FF8,CODE_AAA331
	dw CODE_AAA66E,CODE_AAA9B7,CODE_AAACFC,CODE_AAB037,CODE_AAB36D,CODE_AAB69E,CODE_AAB9CA,CODE_AABCF1
	dw CODE_AAC018,CODE_AAC33A,CODE_AAC657,CODE_AAC96F,CODE_AACC82,CODE_AACF95,CODE_AAD2A3,CODE_AAD5AC
	dw CODE_AAD8B5,CODE_AADBB9,CODE_AADEBD,CODE_AAE1BC,CODE_AAE4B6,CODE_AAE7B0,CODE_AAEAA5,CODE_AAED9A
	dw CODE_AAF08F,CODE_AAF37F,CODE_AAF66A,CODE_AAF955,CODE_AAFC40,CODE_AB8179,CODE_AB845A,CODE_AB873B
	dw CODE_AB8A1C,CODE_AB8CF8,CODE_AB8FCF,CODE_AB92A6,CODE_AB957C,CODE_AB984A,CODE_AB9B1C,CODE_AB9DE9
	dw CODE_ABA0BA,CODE_ABA37E,CODE_ABA64B,CODE_ABA913,CODE_ABABDF,CODE_ABAE9E,CODE_ABB161,CODE_ABB428
	dw CODE_ABB6E2,CODE_ABB9A0,CODE_ABBC62,CODE_ABBF17,CODE_ABC1D4,CODE_ABC484,CODE_ABC73D,CODE_ABC9F5
	dw CODE_ABCCA5,CODE_ABCF5D,CODE_ABD208,CODE_ABD4BB,CODE_ABD761,CODE_ABDA14,CODE_ABDCBA,CODE_ABDF64
	dw CODE_ABE205,CODE_ABE4B7,CODE_ABE758,CODE_ABEA01,CODE_ABEC9D,CODE_ABEF46,CODE_ABF1E2,CODE_ABF486
	dw CODE_ABF722,CODE_ABF9C6,CODE_ABFC5D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D

DATA_A4A851:
	dw CODE_A9A645>>16,CODE_A9A651>>16,CODE_A9A671>>16,CODE_A9A6AC>>16,CODE_A9A6E7>>16,CODE_A9A746>>16,CODE_A9A7AE>>16,CODE_A9A828>>16
	dw CODE_A9A8AB>>16,CODE_A9A952>>16,CODE_A9AA02>>16,CODE_A9AAC4>>16,CODE_A9AB98>>16,CODE_A9AC7E>>16,CODE_A9AD76>>16,CODE_A9AE80>>16
	dw CODE_A9AF93>>16,CODE_A9B0CA>>16,CODE_A9B20A>>16,CODE_A9B35C>>16,CODE_A9B4C0>>16,CODE_A9B636>>16,CODE_A9B7BE>>16,CODE_A9B958>>16
	dw CODE_A9BB04>>16,CODE_A9BCC2>>16,CODE_A9BE92>>16,CODE_A9C074>>16,CODE_A9C268>>16,CODE_A9C46E>>16,CODE_A9C686>>16,CODE_A9C8B0>>16
	dw CODE_A9CAE3>>16,CODE_A9CD30>>16,CODE_A9CF7C>>16,CODE_A9D1D0>>16,CODE_A9D431>>16,CODE_A9D695>>16,CODE_A9D906>>16,CODE_A9DB7A>>16
	dw CODE_A9DDFB>>16,CODE_A9E07F>>16,CODE_A9E30B>>16,CODE_A9E5A4>>16,CODE_A9E845>>16,CODE_A9EAEE>>16,CODE_A9ED9F>>16,CODE_A9F058>>16
	dw CODE_A9F319>>16,CODE_A9F5E2>>16,CODE_A9F8B3>>16,CODE_A9FB8C>>16,CODE_AA8176>>16,CODE_AA845F>>16,CODE_AA8750>>16,CODE_AA8A49>>16
	dw CODE_AA8D4A>>16,CODE_AA9053>>16,CODE_AA9364>>16,CODE_AA967D>>16,CODE_AA999E>>16,CODE_AA9CC7>>16,CODE_AA9FF8>>16,CODE_AAA331>>16
	dw CODE_AAA66E>>16,CODE_AAA9B7>>16,CODE_AAACFC>>16,CODE_AAB037>>16,CODE_AAB36D>>16,CODE_AAB69E>>16,CODE_AAB9CA>>16,CODE_AABCF1>>16
	dw CODE_AAC018>>16,CODE_AAC33A>>16,CODE_AAC657>>16,CODE_AAC96F>>16,CODE_AACC82>>16,CODE_AACF95>>16,CODE_AAD2A3>>16,CODE_AAD5AC>>16
	dw CODE_AAD8B5>>16,CODE_AADBB9>>16,CODE_AADEBD>>16,CODE_AAE1BC>>16,CODE_AAE4B6>>16,CODE_AAE7B0>>16,CODE_AAEAA5>>16,CODE_AAED9A>>16
	dw CODE_AAF08F>>16,CODE_AAF37F>>16,CODE_AAF66A>>16,CODE_AAF955>>16,CODE_AAFC40>>16,CODE_AB8179>>16,CODE_AB845A>>16,CODE_AB873B>>16
	dw CODE_AB8A1C>>16,CODE_AB8CF8>>16,CODE_AB8FCF>>16,CODE_AB92A6>>16,CODE_AB957C>>16,CODE_AB984A>>16,CODE_AB9B1C>>16,CODE_AB9DE9>>16
	dw CODE_ABA0BA>>16,CODE_ABA37E>>16,CODE_ABA64B>>16,CODE_ABA913>>16,CODE_ABABDF>>16,CODE_ABAE9E>>16,CODE_ABB161>>16,CODE_ABB428>>16
	dw CODE_ABB6E2>>16,CODE_ABB9A0>>16,CODE_ABBC62>>16,CODE_ABBF17>>16,CODE_ABC1D4>>16,CODE_ABC484>>16,CODE_ABC73D>>16,CODE_ABC9F5>>16
	dw CODE_ABCCA5>>16,CODE_ABCF5D>>16,CODE_ABD208>>16,CODE_ABD4BB>>16,CODE_ABD761>>16,CODE_ABDA14>>16,CODE_ABDCBA>>16,CODE_ABDF64>>16
	dw CODE_ABE205>>16,CODE_ABE4B7>>16,CODE_ABE758>>16,CODE_ABEA01>>16,CODE_ABEC9D>>16,CODE_ABEF46>>16,CODE_ABF1E2>>16,CODE_ABF486>>16
	dw CODE_ABF722>>16,CODE_ABF9C6>>16,CODE_ABFC5D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16

DATA_A4A9A5:
	dw CODE_A9A645,CODE_A9A65A,CODE_A9A67A,CODE_A9A6B5,CODE_A9A6F9,CODE_A9A758,CODE_A9A7C9,CODE_A9A843
	dw CODE_A9A8CF,CODE_A9A976,CODE_A9AA2F,CODE_A9AAF1,CODE_A9ABCE,CODE_A9ACB4,CODE_A9ADB5,CODE_A9AEBF
	dw CODE_A9AFDB,CODE_A9B112,CODE_A9B25B,CODE_A9B3AD,CODE_A9B51A,CODE_A9B690,CODE_A9B821,CODE_A9B9BB
	dw CODE_A9BB70,CODE_A9BD2E,CODE_A9BF07,CODE_A9C0E9,CODE_A9C2E6,CODE_A9C4EC,CODE_A9C70D,CODE_A9C937
	dw CODE_A9CB73,CODE_A9CDC0,CODE_A9D010,CODE_A9D264,CODE_A9D4C9,CODE_A9D72D,CODE_A9D9A2,CODE_A9DC16
	dw CODE_A9DE9B,CODE_A9E11F,CODE_A9E3AF,CODE_A9E648,CODE_A9E8ED,CODE_A9EB96,CODE_A9EE4B,CODE_A9F104
	dw CODE_A9F3C9,CODE_A9F692,CODE_A9F967,CODE_A9FC40,CODE_AA822E,CODE_AA8517,CODE_AA880C,CODE_AA8B09
	dw CODE_AA8E0A,CODE_AA9113,CODE_AA9428,CODE_AA9745,CODE_AA9A66,CODE_AA9D8F,CODE_AAA0C4,CODE_AAA3FD
	dw CODE_AAA73E,CODE_AAAA87,CODE_AAADD0,CODE_AAB10B,CODE_AAB445,CODE_AAB77A,CODE_AABAA6,CODE_AABDCD
	dw CODE_AAC0F8,CODE_AAC41A,CODE_AAC73B,CODE_AACA53,CODE_AACD6A,CODE_AAD07D,CODE_AAD38F,CODE_AAD69C
	dw CODE_AAD9A5,CODE_AADCA9,CODE_AADFB5,CODE_AAE2B4,CODE_AAE5AE,CODE_AAE8A8,CODE_AAEBA1,CODE_AAEE96
	dw CODE_AAF18F,CODE_AAF47F,CODE_AAF76E,CODE_AAFA59,CODE_AAFD48,CODE_AB8281,CODE_AB8566,CODE_AB8847
	dw CODE_AB8B2C,CODE_AB8E0C,CODE_AB90E7,CODE_AB93BE,CODE_AB9694,CODE_AB9962,CODE_AB9C38,CODE_AB9F09
	dw CODE_ABA1DA,CODE_ABA49E,CODE_ABA76F,CODE_ABAA3B,CODE_ABAD07,CODE_ABAFC6,CODE_ABB291,CODE_ABB558
	dw CODE_ABB812,CODE_ABBAD4,CODE_ABBD9A,CODE_ABC04F,CODE_ABC30C,CODE_ABC5BC,CODE_ABC87D,CODE_ABCB35
	dw CODE_ABCDE5,CODE_ABD0A1,CODE_ABD34C,CODE_ABD603,CODE_ABD8A9,CODE_ABDB5C,CODE_ABDE06,CODE_ABE0B0
	dw CODE_ABE355,CODE_ABE5FF,CODE_ABE8A4,CODE_ABEB44,CODE_ABEDE9,CODE_ABF089,CODE_ABF329,CODE_ABF5C9
	dw CODE_ABF869,CODE_ABFB09,CODE_ABFDA4,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D,CODE_A4AC4D
	dw CODE_A4AC4D,CODE_A4AC4D

DATA_A4AAF9:
	dw CODE_A9A645>>16,CODE_A9A65A>>16,CODE_A9A67A>>16,CODE_A9A6B5>>16,CODE_A9A6F9>>16,CODE_A9A758>>16,CODE_A9A7C9>>16,CODE_A9A843>>16
	dw CODE_A9A8CF>>16,CODE_A9A976>>16,CODE_A9AA2F>>16,CODE_A9AAF1>>16,CODE_A9ABCE>>16,CODE_A9ACB4>>16,CODE_A9ADB5>>16,CODE_A9AEBF>>16
	dw CODE_A9AFDB>>16,CODE_A9B112>>16,CODE_A9B25B>>16,CODE_A9B3AD>>16,CODE_A9B51A>>16,CODE_A9B690>>16,CODE_A9B821>>16,CODE_A9B9BB>>16
	dw CODE_A9BB70>>16,CODE_A9BD2E>>16,CODE_A9BF07>>16,CODE_A9C0E9>>16,CODE_A9C2E6>>16,CODE_A9C4EC>>16,CODE_A9C70D>>16,CODE_A9C937>>16
	dw CODE_A9CB73>>16,CODE_A9CDC0>>16,CODE_A9D010>>16,CODE_A9D264>>16,CODE_A9D4C9>>16,CODE_A9D72D>>16,CODE_A9D9A2>>16,CODE_A9DC16>>16
	dw CODE_A9DE9B>>16,CODE_A9E11F>>16,CODE_A9E3AF>>16,CODE_A9E648>>16,CODE_A9E8ED>>16,CODE_A9EB96>>16,CODE_A9EE4B>>16,CODE_A9F104>>16
	dw CODE_A9F3C9>>16,CODE_A9F692>>16,CODE_A9F967>>16,CODE_A9FC40>>16,CODE_AA822E>>16,CODE_AA8517>>16,CODE_AA880C>>16,CODE_AA8B09>>16
	dw CODE_AA8E0A>>16,CODE_AA9113>>16,CODE_AA9428>>16,CODE_AA9745>>16,CODE_AA9A66>>16,CODE_AA9D8F>>16,CODE_AAA0C4>>16,CODE_AAA3FD>>16
	dw CODE_AAA73E>>16,CODE_AAAA87>>16,CODE_AAADD0>>16,CODE_AAB10B>>16,CODE_AAB445>>16,CODE_AAB77A>>16,CODE_AABAA6>>16,CODE_AABDCD>>16
	dw CODE_AAC0F8>>16,CODE_AAC41A>>16,CODE_AAC73B>>16,CODE_AACA53>>16,CODE_AACD6A>>16,CODE_AAD07D>>16,CODE_AAD38F>>16,CODE_AAD69C>>16
	dw CODE_AAD9A5>>16,CODE_AADCA9>>16,CODE_AADFB5>>16,CODE_AAE2B4>>16,CODE_AAE5AE>>16,CODE_AAE8A8>>16,CODE_AAEBA1>>16,CODE_AAEE96>>16
	dw CODE_AAF18F>>16,CODE_AAF47F>>16,CODE_AAF76E>>16,CODE_AAFA59>>16,CODE_AAFD48>>16,CODE_AB8281>>16,CODE_AB8566>>16,CODE_AB8847>>16
	dw CODE_AB8B2C>>16,CODE_AB8E0C>>16,CODE_AB90E7>>16,CODE_AB93BE>>16,CODE_AB9694>>16,CODE_AB9962>>16,CODE_AB9C38>>16,CODE_AB9F09>>16
	dw CODE_ABA1DA>>16,CODE_ABA49E>>16,CODE_ABA76F>>16,CODE_ABAA3B>>16,CODE_ABAD07>>16,CODE_ABAFC6>>16,CODE_ABB291>>16,CODE_ABB558>>16
	dw CODE_ABB812>>16,CODE_ABBAD4>>16,CODE_ABBD9A>>16,CODE_ABC04F>>16,CODE_ABC30C>>16,CODE_ABC5BC>>16,CODE_ABC87D>>16,CODE_ABCB35>>16
	dw CODE_ABCDE5>>16,CODE_ABD0A1>>16,CODE_ABD34C>>16,CODE_ABD603>>16,CODE_ABD8A9>>16,CODE_ABDB5C>>16,CODE_ABDE06>>16,CODE_ABE0B0>>16
	dw CODE_ABE355>>16,CODE_ABE5FF>>16,CODE_ABE8A4>>16,CODE_ABEB44>>16,CODE_ABEDE9>>16,CODE_ABF089>>16,CODE_ABF329>>16,CODE_ABF5C9>>16
	dw CODE_ABF869>>16,CODE_ABFB09>>16,CODE_ABFDA4>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16,CODE_A4AC4D>>16
	dw CODE_A4AC4D>>16,CODE_A4AC4D>>16

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

CODE_A4AC4D:
	REP.b #$20
	RTL

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

CODE_A4AC50:
	REP.b #$30
	SEP.b #$20
	LDA.b $BF
	BEQ.b CODE_A4AC5B
	BRL.w CODE_A4AF2D

CODE_A4AC5B:
	SEP.b #$20
	LDA.b $C1
	BEQ.b CODE_A4AC79
	CMP.b #$02
	BNE.b CODE_A4AC68
	BRL.w CODE_A4ADFE

CODE_A4AC68:
	CMP.b #$03
	BNE.b CODE_A4AC6F
	BRL.w CODE_A4AE14

CODE_A4AC6F:
	REP.b #$20
	LDX.w $00C3
	LDY.w $00C5
	BRA.b CODE_A4ACC4

CODE_A4AC79:
	REP.b #$20
	LDA.w $0069
	ASL
	STA.w $7E9050
	TAX
	LDA.l !RAM_JP_Interior_RoomDataPtrTable,x
	TAX
	LDA.l $7E0000,x
	INX
	INX
	STX.w $006B
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $75
	INX
	INX
	LDY.w #$0000
	STY.w $00CE
	STY.w $7E9862
	LDA.w #$0002
	STA.b $D4
	PHX
	LDX.w $007C
	SEP.b #$20
	LDA.l $7FBC4C,x
	STA.b $5C
	LDA.l $7FBA4C,x
	STA.b $5D
	LDA.l $7FBE4C,x
	STA.b $5E
	PLX
CODE_A4ACC4:
	REP.b #$21
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	ADC.b $A2
	STA.b $86
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $A5
	STA.b $89
	LDA.w #$0040
	STA.w $7EA0A6,y
	PHX
	SEP.b #$20
	LDA.b $86
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $87
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5C
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $80
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.b $81
	SEP.b #$20
	LDA.b $89
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $8A
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5E
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.b $80
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $81
	STA.b $80
	STA.w $7EA0A4,y
	SEP.b #$20
	LDA.b $86
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $87
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5D
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $83
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.b $84
	SEP.b #$20
	LDA.b $89
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $8A
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5C
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.b $83
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $84
	ASL.w $0083
	ROL
	STA.w $7E9056,y
	STA.w $7EA0A8,y
	TAX
	SEP.b #$20
	LDA.l $7FEF4C,x
	STA.w $7E9054,y
	LDA.b $80
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $81
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l $7FE2CC,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $87
	SEP.b #$20
	LDA.l $7FD64C,x
	BPL.b CODE_A4ADB8
	LSR
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	ASL
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ROL
	ADC.b $87
	BRA.b CODE_A4ADC4

CODE_A4ADB8:
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $87
CODE_A4ADC4:
	CLC
	ADC.w #$0043
	STA.w $7E9052,y
	PLX
	INX
	INX
	INX
	INX
	TYA
	CLC
	ADC.w #$0006
	TAY
	DEC.w $0075
	BEQ.b CODE_A4ADEF
	SEP.b #$20
	LDA.b $C0
	BEQ.b CODE_A4ADEC
	LDA.b #$01
	STA.b $C1
	STX.w $00C3
	STY.w $00C5
	RTL

CODE_A4ADEC:
	BRL.w CODE_A4ACC4

CODE_A4ADEF:
	SEP.b #$20
	LDA.b #$02
	STA.b $C1
	STX.w $00C3
	STY.w $00C5
	BRL.w CODE_A4AC5B

CODE_A4ADFE:
	REP.b #$30
	LDX.w $00C3
	LDY.w $00C5
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	BNE.b CODE_A4AE0E
	BRL.w CODE_A4AEE1

CODE_A4AE0E:
	INX
	INX
	STA.b $77
	BRA.b CODE_A4AE1C

CODE_A4AE14:
	REP.b #$30
	LDX.w $00C3
	LDY.w $00C5
CODE_A4AE1C:
	REP.b #$31
	PHX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	ADC.w $00CE
	TAX
	LDA.w $7EA0A4,x
	STA.b $86
	LDA.w $7EA0A8,x
	STA.b $8C
	PLX
	PHX
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00CE
	TAX
	LDA.w $7EA0A4,x
	CLC
	ADC.b $86
	BPL.b CODE_A4AE45
	SEC
	BRA.b CODE_A4AE46

CODE_A4AE45:
	CLC
CODE_A4AE46:
	ROR
	STA.w $7EA0A4,y
	STA.b $86
	LDA.w $7EA0A6,x
	STA.w $7EA0A6,y
	LDA.w $7EA0A8,x
	CLC
	ADC.b $8C
	BPL.b CODE_A4AE5D
	SEC
	BRA.b CODE_A4AE5E

CODE_A4AE5D:
	CLC
CODE_A4AE5E:
	ROR
	STA.w $7EA0A8,y
	STA.b $8C
	STA.w $7E9056,y
	TAX
	SEP.b #$20
	LDA.l $7FEF4C,x
	STA.w $7E9054,y
	LDA.b $86
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $87
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l $7FE2CC,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $87
	SEP.b #$20
	LDA.l $7FD64C,x
	BPL.b CODE_A4AEAA
	LSR
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	ASL
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ROL
	ADC.b $87
	BRA.b CODE_A4AEB6

CODE_A4AEAA:
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $87
CODE_A4AEB6:
	CLC
	ADC.w #$0043
	STA.w $7E9052,y
	PLX
	INX
	INX
	INX
	INX
	TYA
	CLC
	ADC.w #$0006
	TAY
	DEC.w $0077
	BEQ.b CODE_A4AEE1
	SEP.b #$20
	LDA.b $C0
	BEQ.b CODE_A4AEDE
	LDA.b #$03
	STA.b $C1
	STX.w $00C3
	STY.w $00C5
	RTL

CODE_A4AEDE:
	BRL.w CODE_A4AE1C

CODE_A4AEE1:
	REP.b #$30
	STY.w $00C5
	STY.w $00CE
	LDX.w $00D4
	TYA
	STA.w $7E9862,x
	INC.w $00D4
	INC.w $00D4
	REP.b #$20
	LDA.w $006B
	TAX
	LDA.l $7E0000,x
	BMI.b CODE_A4AF24
	INX
	INX
	STX.w $006B
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $75
	INX
	INX
	STX.w $00C3
	SEP.b #$20
	LDA.b #$01
	STA.b $C1
	LDA.b $C0
	BEQ.b CODE_A4AF21
	RTL

CODE_A4AF21:
	BRL.w CODE_A4AC5B

CODE_A4AF24:
	SEP.b #$20
	STZ.w $00C1
	STZ.w $0079
	RTL

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

CODE_A4AF2D:
	SEP.b #$20
	LDA.b $C1
	BEQ.b CODE_A4AF4B
	CMP.b #$02
	BNE.b CODE_A4AF3A
	BRL.w CODE_A4B0D0

CODE_A4AF3A:
	CMP.b #$03
	BNE.b CODE_A4AF41
	BRL.w CODE_A4B0E6

CODE_A4AF41:
	REP.b #$20
	LDX.w $00C3
	LDY.w $00C5
	BRA.b CODE_A4AF96

CODE_A4AF4B:
	REP.b #$20
	LDA.w $0069
	ASL
	STA.w $7E987A
	TAX
	LDA.l !RAM_JP_Interior_RoomDataPtrTable,x
	TAX
	LDA.l $7E0000,x
	INX
	INX
	STX.w $006B
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $75
	INX
	INX
	LDY.w #$0000
	STY.w $00CE
	STY.w $7EA08C
	LDA.w #$0002
	STA.b $D4
	PHX
	LDX.w $007C
	SEP.b #$20
	LDA.l $7FBC4C,x
	STA.b $5C
	LDA.l $7FBA4C,x
	STA.b $5D
	LDA.l $7FBE4C,x
	STA.b $5E
	PLX
CODE_A4AF96:
	REP.b #$21
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	ADC.b $A2
	STA.b $86
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.b $A5
	STA.b $89
	LDA.w #$0040
	STA.w $7EA0A6,y
	PHX
	SEP.b #$20
	LDA.b $86
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $87
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5C
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $80
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.b $81
	SEP.b #$20
	LDA.b $89
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $8A
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5E
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.b $80
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $81
	STA.b $80
	STA.w $7EA0A4,y
	SEP.b #$20
	LDA.b $86
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $87
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5D
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $83
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	STA.b $84
	SEP.b #$20
	LDA.b $89
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $8A
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $5C
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	CLC
	ADC.b $83
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $84
	ASL.w $0083
	ROL
	STA.w $7E9880,y
	STA.w $7EA0A8,y
	TAX
	SEP.b #$20
	LDA.l $7FEF4C,x
	STA.w $7E987E,y
	LDA.b $80
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $81
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l $7FE2CC,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $87
	SEP.b #$20
	LDA.l $7FD64C,x
	BPL.b CODE_A4B08A
	LSR
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	ASL
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ROL
	ADC.b $87
	BRA.b CODE_A4B096

CODE_A4B08A:
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $87
CODE_A4B096:
	CLC
	ADC.w #$0043
	STA.w $7E987C,y
	PLX
	INX
	INX
	INX
	INX
	TYA
	CLC
	ADC.w #$0006
	TAY
	DEC.w $0075
	BEQ.b CODE_A4B0C1
	SEP.b #$20
	LDA.b $C0
	BEQ.b CODE_A4B0BE
	LDA.b #$01
	STA.b $C1
	STX.w $00C3
	STY.w $00C5
	RTL

CODE_A4B0BE:
	BRL.w CODE_A4AF96

CODE_A4B0C1:
	SEP.b #$20
	LDA.b #$02
	STA.b $C1
	STX.w $00C3
	STY.w $00C5
	BRL.w CODE_A4AF2D

CODE_A4B0D0:
	REP.b #$30
	LDX.w $00C3
	LDY.w $00C5
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	BNE.b CODE_A4B0E0
	BRL.w CODE_A4B1B0

CODE_A4B0E0:
	INX
	INX
	STA.b $77
	BRA.b CODE_A4B0EE

CODE_A4B0E6:
	REP.b #$30
	LDX.w $00C3
	LDY.w $00C5
CODE_A4B0EE:
	REP.b #$31
	PHX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	ADC.w $00CE
	TAX
	LDA.w $7EA0A4,x
	STA.b $86
	LDA.w $7EA0A8,x
	STA.b $8C
	PLX
	PHX
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00CE
	TAX
	LDA.w $7EA0A4,x
	CLC
	ADC.b $86
	BPL.b CODE_A4B117
	SEC
	BRA.b CODE_A4B118

CODE_A4B117:
	CLC
CODE_A4B118:
	ROR
	STA.w $7EA0A4,y
	STA.b $86
	LDA.w $7EA0A6,x
	STA.w $7EA0A6,y
	LDA.w $7EA0A8,x
	CLC
	ADC.b $8C
	BPL.b CODE_A4B12F
	SEC
	BRA.b CODE_A4B130

CODE_A4B12F:
	CLC
CODE_A4B130:
	ROR
	STA.w $7EA0A8,y
	STA.w $7E9880,y
	TAX
	SEP.b #$20
	LDA.l $7FEF4C,x
	STA.w $7E987E,y
	LDA.b $86
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.b $87
	STA.l !REGISTER_Mode7MatrixParameterA|!FastROMAddressOffset
	LDA.l $7FE2CC,x
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$21
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	STA.b $87
	SEP.b #$20
	LDA.l $7FD64C,x
	BPL.b CODE_A4B17A
	LSR
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	LDA.l !REGISTER_PPUMultiplicationProductLo|!FastROMAddressOffset
	ASL
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ROL
	ADC.b $87
	BRA.b CODE_A4B186

CODE_A4B17A:
	STA.l !REGISTER_Mode7MatrixParameterB|!FastROMAddressOffset
	REP.b #$20
	LDA.l !REGISTER_PPUMultiplicationProductMid|!FastROMAddressOffset
	ADC.b $87
CODE_A4B186:
	CLC
	ADC.w #$0043
	STA.w $7E987C,y
	PLX
	INX
	INX
	INX
	INX
	TYA
	CLC
	ADC.w #$0006
	TAY
	DEC.b $77
	BEQ.b CODE_A4B1B0
	SEP.b #$20
	LDA.b $C0
	BEQ.b CODE_A4B1AD
	LDA.b #$03
	STA.b $C1
	STX.w $00C3
	STY.w $00C5
	RTL

CODE_A4B1AD:
	BRL.w CODE_A4B0EE

CODE_A4B1B0:
	REP.b #$30
	STY.w $00C5
	STY.w $00CE
	LDX.w $00D4
	TYA
	STA.w $7EA08C,x
	INC.w $00D4
	INC.w $00D4
	REP.b #$20
CODE_A4B1C6:
	LDA.w $006B
	TAX
	LDA.l $7E0000,x
	BMI.b CODE_A4B1F3
	INX
	INX
	STX.w $006B
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $75
	INX
	INX
	STX.w $00C3
	SEP.b #$20
	LDA.b #$01
	STA.b $C1
	LDA.b $C0
	BEQ.b CODE_A4B1F0
	RTL

CODE_A4B1F0:
	BRL.w CODE_A4AF2D

CODE_A4B1F3:
	SEP.b #$20
	STZ.w $00C1
	STZ.w $0079
	RTL

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

CODE_A4B1FC:
	REP.b #$30
	REP.b #$20
	LDA.w #$0558
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterA
	XBA
	STA.w !REGISTER_Mode7MatrixParameterA
	REP.b #$20
	LDA.w #$0000
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterB
	XBA
	STA.w !REGISTER_Mode7MatrixParameterB
	REP.b #$20
	LDA.w #$0000
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterC
	XBA
	STA.w !REGISTER_Mode7MatrixParameterC
	REP.b #$20
	LDA.w #$0800
	SEP.b #$20
	STA.w !REGISTER_Mode7MatrixParameterD
	XBA
	STA.w !REGISTER_Mode7MatrixParameterD
	RTL

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

; Note: This looks like a decompression routine.

CODE_A4B237:
	STX.b $20
	STA.b $22
	PHB
	LDA.w #$7E7E
	PHA
	PLB
	PLB
	LDA.w #$8000
	BRA.b CODE_A4B262

CODE_A4B247:
	LDX.w #$0100
	STX.b $24
CODE_A4B24C:
	ASL
	BNE.b CODE_A4B256
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B256:
	ROL.b $24
	BCC.b CODE_A4B24C
	TAX
	LDA.b $24
	STA.w $0000,y
	INY
	TXA
CODE_A4B262:
	ASL
	BNE.b CODE_A4B26C
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B26C:
	BCC.b CODE_A4B247
	ASL
	BNE.b CODE_A4B278
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B278:
	BCS.b CODE_A4B281
	LDX.w #$0000
	STX.b $26
	BRA.b CODE_A4B2B4

CODE_A4B281:
	LDX.w #$2000
	STX.b $26
CODE_A4B286:
	ASL
	BNE.b CODE_A4B290
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B290:
	ROL.b $26
	BCC.b CODE_A4B286
	BNE.b CODE_A4B2B4
	LDX.w #$0100
	STX.b $26
CODE_A4B29B:
	ASL
	BNE.b CODE_A4B2A5
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B2A5:
	ROL.b $26
	BCC.b CODE_A4B29B
	BEQ.b CODE_A4B2D6
	TAX
	LDA.w #$0006
	ADC.b $26
	STA.b $26
	TXA
CODE_A4B2B4:
	LDX.w #$0040
	STX.b $28
CODE_A4B2B9:
	ASL
	BNE.b CODE_A4B2C3
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B2C3:
	ROL.b $28
	BCC.b CODE_A4B2B9
	PHA
	TYA
	SBC.b $28
	DEC
	TAX
	LDA.b $26
	INC
	MVN $7E,$7E
	PLA
	BRA.b CODE_A4B262

CODE_A4B2D6:
	PLB
	RTL

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

CODE_A4B2D8:
	STX.b $20
	STA.b $22
	PHB
	LDA.w #$7F7F
	PHA
	PLB
	PLB
	LDA.w #$8000
	BRA.b CODE_A4B303

CODE_A4B2E8:
	LDX.w #$0100
	STX.b $24
CODE_A4B2ED:
	ASL
	BNE.b CODE_A4B2F7
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B2F7:
	ROL.b $24
	BCC.b CODE_A4B2ED
	TAX
	LDA.b $24
	STA.w $0000,y
	INY
	TXA
CODE_A4B303:
	ASL
	BNE.b CODE_A4B30D
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B30D:
	BCC.b CODE_A4B2E8
	ASL
	BNE.b CODE_A4B319
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B319:
	BCS.b CODE_A4B322
	LDX.w #$0000
	STX.b $26
	BRA.b CODE_A4B355

CODE_A4B322:
	LDX.w #$2000
	STX.b $26
CODE_A4B327:
	ASL
	BNE.b CODE_A4B331
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B331:
	ROL.b $26
	BCC.b CODE_A4B327
	BNE.b CODE_A4B355
	LDX.w #$0100
	STX.b $26
CODE_A4B33C:
	ASL
	BNE.b CODE_A4B346
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B346:
	ROL.b $26
	BCC.b CODE_A4B33C
	BEQ.b CODE_A4B377
	TAX
	LDA.w #$0006
	ADC.b $26
	STA.b $26
	TXA
CODE_A4B355:
	LDX.w #$0040
	STX.b $28
CODE_A4B35A:
	ASL
	BNE.b CODE_A4B364
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B364:
	ROL.b $28
	BCC.b CODE_A4B35A
	PHA
	TYA
	SBC.b $28
	DEC
	TAX
	LDA.b $26
	INC
	MVN $7F,$7F
	PLA
	BRA.b CODE_A4B303

CODE_A4B377:
	PLB
	RTL

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

CODE_A4B379:
	LDY.w #$35CC
	STX.b $20
	STA.b $22
	PHB
	LDA.w #$7F7F
	PHA
	PLB
	PLB
	LDA.w #$8000
	BRA.b CODE_A4B3A7

CODE_A4B38C:
	LDX.w #$0100
	STX.b $24
CODE_A4B391:
	ASL
	BNE.b CODE_A4B39B
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B39B:
	ROL.b $24
	BCC.b CODE_A4B391
	TAX
	LDA.b $24
	STA.w $0000,y
	INY
	TXA
CODE_A4B3A7:
	ASL
	BNE.b CODE_A4B3B1
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B3B1:
	BCC.b CODE_A4B38C
	ASL
	BNE.b CODE_A4B3BD
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B3BD:
	BCS.b CODE_A4B3C6
	LDX.w #$0000
	STX.b $26
	BRA.b CODE_A4B3F9

CODE_A4B3C6:
	LDX.w #$2000
	STX.b $26
CODE_A4B3CB:
	ASL
	BNE.b CODE_A4B3D5
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B3D5:
	ROL.b $26
	BCC.b CODE_A4B3CB
	BNE.b CODE_A4B3F9
	LDX.w #$0100
	STX.b $26
CODE_A4B3E0:
	ASL
	BNE.b CODE_A4B3EA
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B3EA:
	ROL.b $26
	BCC.b CODE_A4B3E0
	BEQ.b CODE_A4B41B
	TAX
	LDA.w #$0006
	ADC.b $26
	STA.b $26
	TXA
CODE_A4B3F9:
	LDX.w #$0040
	STX.b $28
CODE_A4B3FE:
	ASL
	BNE.b CODE_A4B408
	LDA.b [$20]
	INC.b $20
	INC.b $20
	ROL
CODE_A4B408:
	ROL.b $28
	BCC.b CODE_A4B3FE
	PHA
	TYA
	SBC.b $28
	DEC
	TAX
	LDA.b $26
	INC
	MVN $7F,$7F
	PLA
	BRA.b CODE_A4B3A7

CODE_A4B41B:
	PLB
	RTL

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

CODE_A4B41D:
	PHY
	JSL.l CODE_A4B379
	TYA
	SEC
	SBC.w #$7F35CC
	TAY
	PLX
	LDA.w #$7F35CC
	STA.b $46
	LDA.w #$7F35CC>>16
	STA.b $48
	SEP.b #$20
	LDA.b #$80
	JSL.l CODE_A4B90E
	REP.b #$20
	RTL

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

CODE_A4B43E:
	JSL.l CODE_A4B379
	LDX.w #$7F35CC
	STX.b $46
	LDX.w #$7F35CC>>16
	STX.b $48
	SEP.b #$20
	LDX.w #$0100
	LDA.b #$00
	JSL.l CODE_A4B83D
	REP.b #$20
	RTL

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

CODE_A4B45A:
	JSL.l CODE_A4B379
	TYA
	SEC
	SBC.w #$7F35CC
	TAY
	SEP.b #$20
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDX.w #$0000
	STX.w !REGISTER_VRAMAddressLo
	LDA.b #$00
	STA.w DMA[$01].Parameters
	LDA.b #!REGISTER_WriteToVRAMPortHi
	STA.w DMA[$01].Destination
	LDX.w #$7F35CC
	STX.w DMA[$01].SourceLo
	LDA.b #$7F35CC>>16
	STA.w DMA[$01].SourceBank
	LDX.w #$4000
	STX.w DMA[$01].SizeLo
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	RTL

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

CODE_A4B494:
	JSL.l CODE_A4B379
	TYA
	SEC
	SBC.w #$7F35CC
	TAY
	SEP.b #$20
	LDA.b #$00
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$00
	STA.w DMA[$01].Parameters
	LDX.w #$0000
	STX.w !REGISTER_VRAMAddressLo
	LDA.b #$00
	STA.w DMA[$01].Parameters
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDX.w #$7F35CC
	STX.w DMA[$01].SourceLo
	LDA.b #$7F35CC>>16
	STA.w DMA[$01].SourceBank
	LDX.w #$4000
	STX.w DMA[$01].SizeLo
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	RTL

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

CODE_A4B4D3:
	PHP
	PHY
	JSL.l CODE_A4B379
	TYA
	SEC
	SBC.w #$35CC
	STA.w $1639
	PLA
	STA.w $163B
	LDA.w #$35CC
	STA.w $163D
	LDA.w #$007F
	STA.w $163F
CODE_A4B4F1:
	JSL.l CODE_A4B5D0
	LDA.w $1639
	BNE.b CODE_A4B4F1
	PLP
	RTL

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

CODE_A4B4FC:
	PHP
	PHY
	JSL.l CODE_A4B379
	TYA
	SEC
	SBC.w #$35D0
	STA.w $1639
	PLA
	STA.w $163B
	LDA.w #$35D0
	STA.w $163D
	LDA.w #$007F
	STA.w $163F
CODE_A4B51A:
	JSL.l CODE_A4B5D0
	LDA.w $1639
	BNE.b CODE_A4B51A
	PLP
	RTL

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

CODE_A4B525:
	REP.b #$20
	LDA.w $1639
	BEQ.b CODE_A4B56D
	CMP.w #$0C00
	BCC.b CODE_A4B53D
	SEC
	SBC.w #$0C00
	STA.w $1639
	LDA.w #$17D6
	BRA.b CODE_A4B540

CODE_A4B53D:
	STZ.w $1639
CODE_A4B540:
	STA.w DMA[$01].SizeLo
	LDA.w $163B
	STA.w !REGISTER_VRAMAddressLo
	LDA.w $163D
	STA.w DMA[$01].SourceLo
	SEP.b #$20
	LDA.w $163F
	STA.w DMA[$01].SourceBank
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	SEC
	RTL

CODE_A4B56D:
	CLC
	RTL

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

CODE_A4B56F:
	REP.b #$20
	LDA.w #$5B13
	STA.w $1A13
	LDA.w #$164D
	STA.w $1A15
	LDA.w #$656B
	STA.w $1A17
	LDA.w #$3CA7
	STA.w $1A19
	LDA.w #$6935
	STA.w $1A1B
	RTL

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

CODE_A4B590:
	REP.b #$30
	LDA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	ROR
	STA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	LDA.w $16C8
	ROL
	STA.w $16C8
	EOR.w $16CA
	ROR
	STA.w $16CA
	LDA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	PHA
	LDA.w $16C8
	SBC.w $16CA
	STA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	PLA
	ADC.w $16C8
	PHA
	LDA.w $16CA
	SBC.w !RAM_JP_Interior_ElevatorMusicToUseLo
	STA.w $16C8
	PLA
	STA.w $16CA
	LDA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	CLC
	ADC.b $71
	STA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	RTL

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

CODE_A4B5D0:
	LDA.b $71
CODE_A4B5D2:
	CMP.b $71
	BEQ.b CODE_A4B5D2
	RTL

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

CODE_A4B5D7:
	PHP
	SEP.b #$20
	LDA.b #$00
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	PLP
	RTL

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

CODE_A4B5E2:
	PHP
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	PLP
	RTL

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

CODE_A4B5ED:
	SEP.b #$20
	STZ.b $CC
	STZ.b $C9
	LDA.b #$0F
	STA.b $CD
	LDA.b #$02
	STA.b $CA
CODE_A4B5FB:
	LDA.b $CB
	BNE.b CODE_A4B5FB
	LDA.b #$FF
	STA.b $CB
	RTL

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

CODE_A4B604:
	SEP.b #$20
	STZ.b $C9
	LDA.b #$0F
	STA.b $CD
	LDA.b #$08
	STA.b $CA
CODE_A4B610:
	LDA.b $CB
	BNE.b CODE_A4B610
	LDA.b #$FF
	STA.b $CB
	RTL

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

CODE_A4B619:
	SEP.b #$20
	STZ.b $C9
	LDA.b #$00
	STA.b $CD
	LDA.b #$02
	STA.b $CA
CODE_A4B625:
	LDA.b $CB
	BNE.b CODE_A4B625
	LDA.b #$FF
	STA.b $CB
	RTL

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

CODE_A4B62E:
	SEP.b #$20
	STZ.b $C9
	LDA.b #$0A
	STA.b $CD
	LDA.b #$08
	STA.b $CA
CODE_A4B63A:
	LDA.b $CB
	BNE.b CODE_A4B63A
	LDA.b #$FF
	STA.b $CB
	RTL

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

CODE_A4B643:
	SEP.b #$20
	LDA.b $CB
	BNE.b CODE_A4B643
	RTL

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

CODE_A4B64A:
	PHP
	SEP.b #$30
	STZ.b $56
CODE_A4B64F:
	LDX.b #$02
	JSL.l CODE_A69A48
	LDA.b $56
	STA.w !REGISTER_ScreenDisplayRegister
	INC.b $56
	LDA.b $56
	CMP.b #$10
	BNE.b CODE_A4B64F
	PLP
	RTL

CODE_A4B664:
	PHP
	SEP.b #$30
	LDA.b #$0F
	STA.b $56
CODE_A4B66B:
	LDX.b #$02
	JSL.l CODE_A69A48
	LDA.b $56
	STA.w !REGISTER_ScreenDisplayRegister
	DEC.b $56
	BPL.b CODE_A4B66B
	PLP
	RTL

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

CODE_A4B67C:
	SEP.b #$20
	INC.b $C9
	LDA.b $C9
	CMP.b $CA
	BNE.b CODE_A4B69F
	STZ.b $C9
	LDA.b $CB
	BEQ.b CODE_A4B69F
	LDA.b $CC
	SEC
	SBC.b #$04
	BMI.b CODE_A4B69D
	CMP.b $CD
	BEQ.b CODE_A4B6CB
	BCC.b CODE_A4B69D
	DEC.b $CC
	BRA.b CODE_A4B69F

CODE_A4B69D:
	INC.b $CC
CODE_A4B69F:
	REP.b #$20
	LDA.w #$0027
	STA.w !REGISTER_VCountTimerLo
	LDA.w #$0118
	STA.w !REGISTER_HCountTimerLo
	SEP.b #$30
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDA.b $CC
	SEC
	SBC.b #$04
	BPL.b CODE_A4B6BC
	LDA.b #$00
CODE_A4B6BC:
	CMP.b #$00
	BNE.b CODE_A4B6C2
	LDA.b #$80
CODE_A4B6C2:
	WAI
	STA.w !REGISTER_ScreenDisplayRegister
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	RTL

CODE_A4B6CB:
	STZ.b $CB
	BRA.b CODE_A4B69F

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

CODE_A4B6CF:
	SEP.b #$20
	LDA.b #$8F
	STA.w !REGISTER_ScreenDisplayRegister
	STZ.w !REGISTER_OAMAddressLo
	STZ.w !REGISTER_OAMAddressHi
	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
	STZ.w !REGISTER_BG3VertScrollOffset
	STZ.w !REGISTER_BG3VertScrollOffset
	STZ.w !REGISTER_BG4HorizScrollOffset
	STZ.w !REGISTER_BG4HorizScrollOffset
	STZ.w !REGISTER_BG4VertScrollOffset
	STZ.w !REGISTER_BG4VertScrollOffset
	STZ.w !REGISTER_Mode7TilemapSettings
	STZ.w !REGISTER_Mode7MatrixParameterA
	LDA.b #$01
	STA.w !REGISTER_Mode7MatrixParameterA
	STZ.w !REGISTER_Mode7MatrixParameterB
	STZ.w !REGISTER_Mode7MatrixParameterB
	STZ.w !REGISTER_Mode7MatrixParameterC
	STZ.w !REGISTER_Mode7MatrixParameterC
	STZ.w !REGISTER_Mode7MatrixParameterD
	STA.w !REGISTER_Mode7MatrixParameterD
	STZ.w !REGISTER_Mode7CenterX
	STZ.w !REGISTER_Mode7CenterX
	STZ.w !REGISTER_Mode7CenterY
	STZ.w !REGISTER_Mode7CenterY
	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_MainScreenWindowMask
	STZ.w !REGISTER_SubScreenWindowMask
	STZ.w !REGISTER_InitialScreenSettings
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	LDA.b #$FF
	STA.w !REGISTER_ProgrammableIOPortOutput
	STZ.w !REGISTER_Multiplicand
	STZ.w !REGISTER_Multiplier
	STZ.w !REGISTER_DividendLo
	STZ.w !REGISTER_DividendHi
	STZ.w !REGISTER_Divisor
	STZ.w !REGISTER_HCountTimerLo
	STZ.w !REGISTER_HCountTimerHi
	STZ.w !REGISTER_VCountTimerLo
	STZ.w !REGISTER_VCountTimerHi
	STZ.w !REGISTER_DMAEnable
	STZ.w !REGISTER_HDMAEnable
	STZ.w !REGISTER_MosaicSizeAndBGEnable
	LDA.b #$01
	STA.w !REGISTER_EnableFastROM
	REP.b #$30
	RTL

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

CODE_A4B78D:
	REP.b #$10
	SEP.b #$20
	LDX.w #$0000
	LDA.b #$00
CODE_A4B796:
	STA.l $000016,x
	INX
	CPX.w #$00E1
	BNE.b CODE_A4B796
	LDX.w #$0000
	LDA.b #$00
CODE_A4B7A5:
	STA.l $801400,x
	INX
	CPX.w #$06C4
	BNE.b CODE_A4B7A5
	LDX.w #$0000
	LDA.b #$00
CODE_A4B7B4:
	STA.l $7E8AD0,x
	INX
	CPX.w #$73F8
	BNE.b CODE_A4B7B4
	REP.b #$20
	RTL

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

CODE_A4B7C1:
	SEP.b #$20
	REP.b #$10
	STZ.w !REGISTER_VRAMAddressLo
	STZ.w !REGISTER_VRAMAddressHi
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	REP.b #$20
	LDX.w #$8000
CODE_A4B7D5:
	STZ.w !REGISTER_WriteToVRAMPortLo
	DEX
	BNE.b CODE_A4B7D5
	RTL

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

CODE_A4B7DC:
	REP.b #$20
	STZ.b $16
	STZ.b $1E
	STZ.b $18
	RTL

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

CODE_A4B7E5:
	REP.b #$20
	LDA.w !REGISTER_Joypad1Lo
	STA.b $16
	SEP.b #$20
	LDA.w $1675
	AND.b #$01
	BEQ.b CODE_A4B80C
	REP.b #$20
	LDA.w $178D
	BEQ.b CODE_A4B803
	LDA.b $16
	ORA.w #$0080
	BRA.b CODE_A4B808

CODE_A4B803:
	LDA.b $16
	ORA.w #$0080
CODE_A4B808:
	STA.b $16
	SEP.b #$20
CODE_A4B80C:
	LDA.w $1675
	AND.b #$02
	BEQ.b CODE_A4B82A
	REP.b #$20
	LDA.w $178D
	BEQ.b CODE_A4B821
	LDA.b $16
	ORA.w #$8000
	BRA.b CODE_A4B826

CODE_A4B821:
	LDA.b $16
	ORA.w #$4000
CODE_A4B826:
	STA.b $16
	SEP.b #$20
CODE_A4B82A:
	REP.b #$20
	LDA.b $1E
	AND.b $16
	EOR.b $16
	STA.b $18
	ORA.b $1C
	STA.b $1C
	LDA.b $16
	STA.b $1E
	RTL

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

CODE_A4B83D:
	STA.w !REGISTER_CGRAMAddress
	LDY.w #$0000
	REP.b #$20
	LDA.w #$0000
	STA.b [$46],y
	SEP.b #$20
CODE_A4B84C:
	LDA.b [$46],y
	STA.w !REGISTER_WriteToCGRAMPort
	INY
	LDA.b [$46],y
	STA.w !REGISTER_WriteToCGRAMPort
	INY
	DEX
	BNE.b CODE_A4B84C
	RTL

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

; Note: Routine that handles the red palette animations in interior sections

CODE_A4B85C:
	REP.b #$10
	SEP.b #$20
	LDX.w $179F
	LDA.l DATA_A4B908
	STA.w !REGISTER_CGRAMAddress
	LDA.l CODE_A4B8F0,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l CODE_A4B8F0+$01,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l DATA_A4B908+$01
	STA.w !REGISTER_CGRAMAddress
	LDA.l CODE_A4B8F0+$02,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l CODE_A4B8F0+$03,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l DATA_A4B908+$02
	STA.w !REGISTER_CGRAMAddress
	LDA.l CODE_A4B8F0+$04,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l CODE_A4B8F0+$05,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l DATA_A4B908+$03
	STA.w !REGISTER_CGRAMAddress
	LDA.l CODE_A4B8F0+$06,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l CODE_A4B8F0+$07,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l DATA_A4B908+$04
	STA.w !REGISTER_CGRAMAddress
	LDA.l CODE_A4B8F0+$08,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l CODE_A4B8F0+$09,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l DATA_A4B908+$05
	STA.w !REGISTER_CGRAMAddress
	LDA.l CODE_A4B8F0+$0A,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.l CODE_A4B8F0+$0B,x
	STA.w !REGISTER_WriteToCGRAMPort
	LDA.w $179F
	INC
	INC
	CMP.b #$0C
	BNE.b CODE_A4B8EC
	LDA.b #$00
CODE_A4B8EC:
	STA.w $179F
	RTL

CODE_A4B8F0:
	dw $001D,$0009,$0007,$0005,$0007,$0009
	dw $001D,$0009,$0007,$0005,$0007,$0009

DATA_A4B908:
	db $5D,$7D,$81,$8E,$E6,$F0

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

CODE_A4B90E:
	STX.w !REGISTER_VRAMAddressLo
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$01
	STA.w DMA[$01].Parameters
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.w DMA[$01].Destination
	LDX.b $46
	STX.w DMA[$01].SourceLo
	LDA.b $48
	STA.w DMA[$01].SourceBank
	STY.w DMA[$01].SizeLo
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	RTL

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

CODE_A4B931:
	REP.b #$10
	SEP.b #$20
	STZ.b $56
	LDX.w #$0000
CODE_A4B93A:
	LDA.b $56
	LDY.w #$003F
CODE_A4B93F:
	STA.l $7F35CC,x
	INX
	DEY
	BPL.b CODE_A4B93F
	INC.b $56
	LDA.b $56
	BNE.b CODE_A4B93A
	SEP.b #$20
	REP.b #$10
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDA.b #$00
	STA.w DMA[$01].Parameters
	LDA.b #!REGISTER_WriteToVRAMPortHi
	STA.w DMA[$01].Destination
	LDX.w #$4000
	STX.w DMA[$01].SizeLo
	LDX.w #$0000
	STX.w !REGISTER_VRAMAddressLo
	LDX.w #$7F35CC
	STX.w DMA[$01].SourceLo
	LDA.b #$7F35CC>>16
	STA.w DMA[$01].SourceBank
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	REP.b #$30
	RTL

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

CODE_A4B97F:
	REP.b #$10
	SEP.b #$20
	LDA.b #$08
	STA.w DMA[$05].Parameters
	LDA.b #!REGISTER_ReadOrWriteToWRAMPort
	STA.w DMA[$05].Destination
	LDA.b #DATA_A58000>>16
	STA.w DMA[$05].SourceBank
	LDX.w $177D
	STX.w DMA[$05].SourceLo
	LDA.b #$01
	STA.w !REGISTER_WRAMAddressBank
	LDX.w $177F
	STX.w !REGISTER_WRAMAddressLo
	LDY.w #$0040
CODE_A4B9A6:
	LDX.w #$0080
	STX.w DMA[$05].SizeLo
	LDA.b #$20
	STA.w !REGISTER_DMAEnable
	DEY
	BNE.b CODE_A4B9A6
	LDX.w $177D
	INX
	STX.w DMA[$05].SourceLo
	LDY.w #$0040
CODE_A4B9BE:
	LDX.w #$0080
	STX.w DMA[$05].SizeLo
	LDA.b #$20
	STA.w !REGISTER_DMAEnable
	DEY
	BNE.b CODE_A4B9BE
	RTL

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

CODE_A4B9CD:
	REP.b #$30
	PHX
	SEP.b #$30
	LDX.b #$03
CODE_A4B9D4:
	LDA.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit,x
	CLC
	ADC.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit,x
CODE_A4B9DB:
	CMP.b #$0A
	BCC.b CODE_A4B9E7
	INC.w $0202,x
	SEC
	SBC.b #$0A
	BRA.b CODE_A4B9DB

CODE_A4B9E7:
	STA.w !RAM_JP_Global_Player_CurrentScoreThousandsDigit,x
	STZ.w !RAM_JP_Global_Player_PointsToGiveThousandsDigit,x
	DEX
	BPL.b CODE_A4B9D4
	SEP.b #$20
	REP.b #$30
	PLX
	RTL

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

CODE_A4B9F6:
	REP.b #$30
	LDA.w $172D
	BEQ.b CODE_A4BA14
	LDA.b $7A
	STA.b $7C
	LDA.b $95
	STA.b $AD
	LDA.b $98
	STA.b $B0
	SEP.b #$20
	LDA.b $97
	STA.b $AF
	LDA.b $9A
	STA.b $B2
	RTL

CODE_A4BA14:
	SEP.b #$20
	LDA.b $F3
	BEQ.b CODE_A4BA21
	REP.b #$30
	LDA.b $7A
	STA.b $7C
	RTL

CODE_A4BA21:
	LDA.b $96
	CMP.b $90
	BNE.b CODE_A4BA2D
	LDA.b $99
	CMP.b $93
	BEQ.b CODE_A4BA2F
CODE_A4BA2D:
	STZ.b !RAM_JP_Interior_TilePlayerIsTouching
CODE_A4BA2F:
	REP.b #$30
	LDA.b $7A
	STA.b $7C
	JSR.w CODE_A4BC14
	JSR.w CODE_A4BAA0
	REP.b #$20
	LDA.b $AD
	STA.b $95
	STA.b $8F
	LDA.b $B0
	STA.b $98
	STA.b $92
	SEP.b #$20
	LDA.b $AF
	STA.b $97
	STA.b $91
	LDA.b $B2
	STA.b $9A
	STA.b $94
	REP.b #$30
	LDA.b $AE
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $169E
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.b $52
	LDA.b $B1
	CLC
	ADC.w $16A0
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.b $52
	TAX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$7E
	CMP.b #$7E
	BNE.b CODE_A4BA95
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	CMP.b #!Define_JP_InteriorFloorID_RaptorPenSubLevel2
	BEQ.b CODE_A4BA9F
CODE_A4BA95:
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	STA.l !RAM_JP_Interior_CurrentRoom
CODE_A4BA9F:
	RTL

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

CODE_A4BAA0:
	REP.b #$30
	LDA.b $96
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $169E
	STA.w $168E
	CLC
	ADC.w #$FFA8
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1686
	LDA.w $168E
	CLC
	ADC.w #$0058
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $168E
	LDA.b $93
	CLC
	ADC.w $16A0
	STA.w $1698
	CLC
	ADC.w #$FFA8
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	STA.w $1690
	LDA.w $1698
	CLC
	ADC.w #$FFD4
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	STA.w $1692
	LDA.w $1698
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	STA.w $1694
	LDA.w $1698
	CLC
	ADC.w #$002C
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	STA.w $1696
	LDA.w $1698
	CLC
	ADC.w #$0058
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	STA.w $1698
	LDY.w #$0008
CODE_A4BB44:
	REP.b #$30
	LDA.w $1686
	CLC
	ADC.w $1690,y
	TAX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	CMP.b #$40
	BEQ.b CODE_A4BB75
	AND.b #$C0
	BEQ.b CODE_A4BB82
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	CMP.b #$00
	BNE.b CODE_A4BB82
CODE_A4BB75:
	REP.b #$30
	LDA.w $1686
	CLC
	ADC.w $1694
	TAX
	BRL.w CODE_A4BBD3

CODE_A4BB82:
	REP.b #$30
	LDA.w $168E
	CLC
	ADC.w $1690,y
	TAX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	CMP.b #$40
	BEQ.b CODE_A4BBB3
	AND.b #$C0
	BEQ.b CODE_A4BBC0
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	CMP.b #$00
	BNE.b CODE_A4BBC0
CODE_A4BBB3:
	REP.b #$30
	LDA.w $168E
	CLC
	ADC.w $1694
	TAX
	BRL.w CODE_A4BBD3

CODE_A4BBC0:
	DEY
	DEY
	BPL.b CODE_A4BB44
	REP.b #$20
	LDA.b $95
	STA.b $AD
	SEP.b #$20
	LDA.b $97
	STA.b $AF
	RTS

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

CODE_A4BBD1:
	SEP.b #$20
CODE_A4BBD3:
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	STA.b !RAM_JP_Interior_TilePlayerIsTouching
	AND.b #$F0
	CMP.b #!Define_JP_InteriorWall_Computer
	BNE.b CODE_A4BBE9
	REP.b #$20
	LDA.w #$FFFF
	STA.w $172D
CODE_A4BBE9:
	REP.b #$20
	LDA.b $8F
	STA.b $AD
	SEP.b #$20
	LDA.b $91
	STA.b $AF
	REP.b #$20
	LDA.b $99
	SEC
	SBC.b $93
	BPL.b CODE_A4BC02
	EOR.w #$FFFF
	INC
CODE_A4BC02:
	CMP.w #$0001
	BCS.b CODE_A4BC13
	REP.b #$20
	LDA.b $92
	STA.b $B0
	SEP.b #$20
	LDA.b $94
	STA.b $B2
CODE_A4BC13:
	RTS

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

; Note: Somethingg related to player movement in interior areas

CODE_A4BC14:
	REP.b #$30
	LDA.b $90
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $169E
	STA.w $168E
	CLC
	ADC.w #$FFA8
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1686
	LDA.w $168E
	CLC
	ADC.w #$FFD4
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1688
	LDA.w $168E
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $168A
	LDA.w $168E
	CLC
	ADC.w #$002C
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $168C
	LDA.w $168E
	CLC
	ADC.w #$0058
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $168E
	LDA.b $99
	CLC
	ADC.w $16A0
	STA.w $1698
	CLC
	ADC.w #$FFA8
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	STA.w $1690
	LDA.w $1698
	CLC
	ADC.w #$0058
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	STA.w $1698
	LDY.w #$0008
CODE_A4BCA3:
	REP.b #$30
	LDA.w $1686,y
	CLC
	ADC.w $1690
	TAX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	CMP.b #$40
	BEQ.b CODE_A4BCD4
	AND.b #$C0
	BEQ.b CODE_A4BCE1
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	CMP.b #$00
	BNE.b CODE_A4BCE1
CODE_A4BCD4:
	REP.b #$30
	LDA.w $168A
	CLC
	ADC.w $1690
	TAX
	BRL.w CODE_A4BD30

CODE_A4BCE1:
	REP.b #$30
	LDA.w $1686,y
	CLC
	ADC.w $1698
	TAX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	CMP.b #$40
	BEQ.b CODE_A4BD12
	AND.b #$C0
	BEQ.b CODE_A4BD1F
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	AND.b #$3F
	REP.b #$30
	PHX
	SEP.b #$30
	TAX
	LDA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	CMP.b #$00
	BNE.b CODE_A4BD1F
CODE_A4BD12:
	REP.b #$30
	LDA.w $168A
	CLC
	ADC.w $1698
	TAX
	BRL.w CODE_A4BD30

CODE_A4BD1F:
	DEY
	DEY
	BPL.b CODE_A4BCA3
	REP.b #$20
	LDA.b $98
	STA.b $B0
	SEP.b #$20
	LDA.b $9A
	STA.b $B2
	RTS

CODE_A4BD30:
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	STA.b !RAM_JP_Interior_TilePlayerIsTouching
	CMP.b #!Define_JP_InteriorWall_Generator
	BEQ.b CODE_A4BD4A
	AND.b #$F0
	CMP.b #!Define_JP_InteriorWall_Computer
	BNE.b CODE_A4BD4A
	REP.b #$20
	LDA.w #$FFFF
	STA.w $172D
CODE_A4BD4A:
	REP.b #$20
	LDA.b $92
	STA.b $B0
	SEP.b #$20
	LDA.b $94
	STA.b $B2
	REP.b #$20
	LDA.b $96
	SEC
	SBC.b $90
	BPL.b CODE_A4BD63
	EOR.w #$FFFF
	INC
CODE_A4BD63:
	CMP.w #$0001
	BCS.b CODE_A4BD78
	REP.b #$20
	LDA.b $8F
	STA.b $AD
	STA.b $95
	SEP.b #$20
	LDA.b $91
	STA.b $AF
	STA.b $97
CODE_A4BD78:
	RTS

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

CODE_A4BD79:
	REP.b #$20
	STZ.w $183F
	STZ.w $1785
	SEP.b #$20
	PHB
	LDA.b #$7E9050>>16
	PHA
	PLB
	REP.b #$30
	STZ.w $00D0
	STZ.w $1633
	STZ.w $1635
	SEP.b #$20
	LDA.b $BF
	BNE.b CODE_A4BDA1
	LDY.w #$987C
	LDX.w $7E987A
	BRA.b CODE_A4BDA7

CODE_A4BDA1:
	LDY.w #$9052
	LDX.w $7E9050
CODE_A4BDA7:
	REP.b #$20
	STY.b $D6
	BPL.b CODE_A4BDAF
	PLB
	RTL

CODE_A4BDAF:
	LDA.l !RAM_JP_Interior_RoomDataPtrTable,x
	TAX
	LDA.l $7E0000,x
	INX
	INX
	STX.w $00EE
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	INC
	INC
	STA.b $DC
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	BNE.b CODE_A4BDCD
	BRL.w CODE_A4BE25

CODE_A4BDCD:
	TAY
CODE_A4BDCE:
	PHY
	LDA.w $00D0
	CLC
	ADC.b $D6
	TAY
	LDA.w $0810,y
	STA.b $DA
	PLY
	TXA
	CLC
	ADC.w #$0006
CODE_A4BDE1:
	PHY
	PHA
	TAY
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	AND.w #$001F
	CMP.w #$0003
	BMI.b CODE_A4BDF7
	LDA.w #$FFFF
	STA.w $1785
	BRA.b CODE_A4BDFC

CODE_A4BDF7:
	LDA.w $1635
	BNE.b CODE_A4BE16
CODE_A4BDFC:
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	AND.w #$001F
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0008
	CLC
	ADC.l DATA_A4D515,x
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_A4BE67,x)
CODE_A4BE16:
	INC.w $1633
	PLA
	CLC
	ADC.w #$0008
	PLY
	DEY
	BEQ.b CODE_A4BE25
	BRL.w CODE_A4BDE1

CODE_A4BE25:
	STZ.w $1633
	INC.w $00D0
	INC.w $00D0
	LDX.w $00EE
	LDA.l $7E0000,x
	BMI.b CODE_A4BE4D
	INX
	INX
	STX.w $00EE
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	INC
	INC
	STA.b $DC
	LDA.w JP_Interior_EntityTable[$00].Unknown3,x
	BEQ.b CODE_A4BE25
	TAY
	BRL.w CODE_A4BDCE

CODE_A4BE4D:
	PLB
	REP.b #$20
	SEI
	LDA.b $96
	STA.b $9C
	LDA.b $99
	STA.b $9F
	SEP.b #$20
	LDA.b $95
	STA.b $9B
	LDA.b $98
	STA.b $9E
	CLI
	REP.b #$20
	RTL

DATA_A4BE67:
	dw CODE_A4BE89
	dw CODE_A4BFFC
	dw CODE_A4C13A
	dw CODE_A4C1FB
	dw CODE_A4C20A
	dw CODE_A4C37F
	dw CODE_A4CA3C
	dw CODE_A4C202
	dw CODE_A4C40F
	dw CODE_A4C5AB
	dw CODE_A4C60E
	dw CODE_A4C709
	dw CODE_A4C723
	dw CODE_A4C9D2
	dw CODE_A4CA35
	dw CODE_A4C202

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

CODE_A4BE87:
	REP.b #$30
CODE_A4BE89:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D161,x
	BEQ.b CODE_A4BEAA
	LDA.l DATA_A4D131,x
	STA.w $00E0
	SEC
	SBC.w #$0010
	AND.w #$003F
	STA.w $00DE
	BRA.b CODE_A4BEBB

CODE_A4BEAA:
	LDA.l DATA_A4D131,x
	STA.w $00E0
	CLC
	ADC.w #$0010
	AND.w #$003F
	STA.w $00DE
CODE_A4BEBB:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w $00EA
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D051,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E2
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D031,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E6
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w $00EA
	LDX.w $00DE
	LDA.l DATA_A4D061,x
	SEC
	SBC.w $00EA
	STA.b $E4
	LDX.w $00DE
	LDA.l DATA_A4D041,x
	SEC
	SBC.w $00EA
	STA.b $E8
	TYX
	LDY.w #$0000
	JSR.w CODE_A4CA48
	BCS.b CODE_A4BF2D
	BRL.w CODE_A4BFDE

CODE_A4BF2D:
	TXY
	PHY
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	CLC
	ADC.l (DATA_A58034&$FF0000)+$11,x
	TAX
CODE_A4BF3F:
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$00,x
	BMI.b CODE_A4BF92
	CMP.w $00EC
	BNE.b CODE_A4BF8B
	LDA.l (DATA_A58034&$FF0000)+$01,x
	CMP.w $1633
	BNE.b CODE_A4BF8B
	LDA.l (DATA_A58034&$FF0000)+$02,x
	CMP.b #!Define_JP_InteriorDoorType_DarkRoom
	BEQ.b CODE_A4BF8B
	CMP.b #!Define_JP_InteriorDoorType_DisplayMessage
	BNE.b CODE_A4BF6D
	REP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$03,x
	JSL.l CODE_A4DF0D
	BRA.b CODE_A4BF8B

CODE_A4BF6D:
	REP.b #$20
	ASL
	AND.w #$00FE
	TAY
	LDA.w !RAM_JP_Global_Player_CollectedIDCardTable,y
	BNE.b CODE_A4BF8B
	LDA.l (DATA_A58034&$FF0000)+$03,x
	JSL.l CODE_A4DF0D
	LDA.w #$FFFF
	STA.w $1635
	REP.b #$20
	PLY
	RTS

CODE_A4BF8B:
	INX
	INX
	INX
	INX
	INX
	BRA.b CODE_A4BF3F

CODE_A4BF92:
	REP.b #$20
	PLY
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$000F
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	LDA.w $183F
	BNE.b CODE_A4BFDD
	LDA.w #$FFFF
	STA.w $183F
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	CLC
	ADC.w $00DA
	TAX
	LDA.w $7EA0A4,x
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $173F
	LDA.w $7EA0A8,x
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $1741
	LDA.w #!Define_JP_SoundID_OpenDoor
	JSL.l CODE_A4EF9B
CODE_A4BFDD:
	RTS

CODE_A4BFDE:
	LDY.w #$0004
	JSR.w CODE_A4CA48
	BCC.b CODE_A4BFFA
	TXY
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	ORA.w #$0010
	STA.w JP_Interior_EntityTable[$00].Unknown3,y
	RTS

CODE_A4BFFA:
	TXY
	RTS

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

CODE_A4BFFC:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D161,x
	BEQ.b CODE_A4C01D
	LDA.l DATA_A4D131,x
	STA.w $00E0
	SEC
	SBC.w #$0010
	AND.w #$003F
	STA.w $00DE
	BRA.b CODE_A4C02E

CODE_A4C01D:
	LDA.l DATA_A4D131,x
	STA.w $00E0
	CLC
	ADC.w #$0010
	AND.w #$003F
	STA.w $00DE
CODE_A4C02E:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w $00EA
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D051,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E2
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D031,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E6
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w $00EA
	LDX.w $00DE
	LDA.l DATA_A4D061,x
	SEC
	SBC.w $00EA
	STA.b $E4
	LDX.w $00DE
	LDA.l DATA_A4D041,x
	SEC
	SBC.w $00EA
	STA.b $E8
	TYX
	LDY.w #$0000
	JSR.w CODE_A4CA48
	BCS.b CODE_A4C0B1
	LDY.w #$0004
	JSR.w CODE_A4CA48
	BCS.b CODE_A4C0B1
	TXY
	LDA.w #$0022
	SEC
	SBC.w JP_Interior_EntityTable[$00].IDLo,y
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

CODE_A4C0B1:
	TXY
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0017
	ASL
	TAX
	LDA.l DATA_A4D161,x
	BEQ.b CODE_A4C0D9
	TXA
	AND.w #$000E
	TAX
	LDA.l DATA_A4D141,x
	CLC
	ADC.w JP_Interior_EntityTable[$00].IDLo,y
	CLC
	ADC.w JP_Interior_EntityTable[$00].IDLo,y
	AND.w #$003F
	STA.w $00E0
	BRA.b CODE_A4C0F0

CODE_A4C0D9:
	TXA
	AND.w #$000E
	TAX
	LDA.l DATA_A4D151,x
	SEC
	SBC.w JP_Interior_EntityTable[$00].IDLo,y
	SEC
	SBC.w JP_Interior_EntityTable[$00].IDLo,y
	AND.w #$003F
	STA.w $00E0
CODE_A4C0F0:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $E2
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	PHA
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PLA
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.b $E2
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4C13A:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D131,x
	STA.w $00E0
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $E2
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $E4
	LDA.b $E2
	CLC
	ADC.w $169E
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1686
	LDA.b $E4
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $16A0
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.w $1686
	TAX
	SEI
	PHY
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLA
	SEC
	SBC.w !RAM_JP_Interior_MapWidthLo
	TAX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLY
	CLI
CODE_A4C1FB:
	LDA.w #!Define_JP_InteriorEntityID_18
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4C202:
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

; Note: Something related to closing a door in the interior areas

CODE_A4C20A:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D161,x
	BEQ.b CODE_A4C22B
	LDA.l DATA_A4D131,x
	STA.w $00E0
	SEC
	SBC.w #$0010
	AND.w #$003F
	STA.w $00DE
	BRA.b CODE_A4C23C

CODE_A4C22B:
	LDA.l DATA_A4D131,x
	STA.w $00E0
	CLC
	ADC.w #$0010
	AND.w #$003F
	STA.w $00DE
CODE_A4C23C:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w $00EA
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D051,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E2
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D031,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E6
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w $00EA
	LDX.w $00DE
	LDA.l DATA_A4D061,x
	SEC
	SBC.w $00EA
	STA.b $E4
	LDX.w $00DE
	LDA.l DATA_A4D041,x
	SEC
	SBC.w $00EA
	STA.b $E8
	TYX
	LDY.w #$0000
	JSR.w CODE_A4CA48
	BCS.b CODE_A4C2B3
	LDY.w #$0004
	JSR.w CODE_A4CA48
	BCC.b CODE_A4C2B4
CODE_A4C2B3:
	RTS

CODE_A4C2B4:
	TXY
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D131,x
	STA.w $00E0
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $E2
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $E4
	LDA.b $E2
	CLC
	ADC.w $169E
	CLC
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1686
	LDA.b $E4
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $16A0
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.w $1686
	TAX
	SEI
	PHY
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLA
	SEC
	SBC.w !RAM_JP_Interior_MapWidthLo
	TAX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLY
	CLI
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4C37F:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0017
	ASL
	TAX
	LDA.l DATA_A4D161,x
	BEQ.b CODE_A4C3A7
	TXA
	AND.w #$000E
	TAX
	LDA.w #$001F
	SEC
	SBC.w JP_Interior_EntityTable[$00].IDLo,y
	ASL
	CLC
	ADC.l DATA_A4D131,x
	AND.w #$003F
	STA.w $00E0
	BRA.b CODE_A4C3C3

CODE_A4C3A7:
	TXA
	AND.w #$000E
	TAX
	LDA.w #$001F
	SEC
	SBC.w JP_Interior_EntityTable[$00].IDLo,y
	ASL
	EOR.w #$FFFF
	INC
	CLC
	ADC.l DATA_A4D131,x
	AND.w #$003F
	STA.w $00E0
CODE_A4C3C3:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $E2
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	PHA
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PLA
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.b $E2
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4C40D:
	REP.b #$30
CODE_A4C40F:
	LDA.w $172D
	BEQ.b CODE_A4C415
	RTS

CODE_A4C415:
	SEP.b #$20
	LDA.w $17A1
	BEQ.b CODE_A4C41F
	BRL.w CODE_A4C567

CODE_A4C41F:
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D161,x
	BEQ.b CODE_A4C442
	LDA.l DATA_A4D131,x
	STA.w $00E0
	SEC
	SBC.w #$0010
	AND.w #$003F
	STA.w $00DE
	BRA.b CODE_A4C453

CODE_A4C442:
	LDA.l DATA_A4D131,x
	STA.w $00E0
	CLC
	ADC.w #$0010
	AND.w #$003F
	STA.w $00DE
CODE_A4C453:
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w $00EA
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D051,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E2
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D031,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E6
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w $00EA
	LDX.w $00DE
	LDA.l DATA_A4D061,x
	SEC
	SBC.w $00EA
	STA.b $E4
	LDX.w $00DE
	LDA.l DATA_A4D041,x
	SEC
	SBC.w $00EA
	STA.b $E8
	TYX
	LDY.w #$0000
	JSR.w CODE_A4CA48
	BCC.b CODE_A4C50A
	TXY
	PHY
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	CLC
	ADC.l (DATA_A58034&$FF0000)+$11,x
	TAX
CODE_A4C4D4:
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$00,x
	BMI.b CODE_A4C522
	CMP.w $00EC
	BNE.b CODE_A4C51B
	LDA.l (DATA_A58034&$FF0000)+$01,x
	CMP.w $1633
	BNE.b CODE_A4C51B
	LDA.l (DATA_A58034&$FF0000)+$02,x
	REP.b #$20
	ASL
	AND.w #$00FF
	TAY
	LDA.w !RAM_JP_Global_Player_CollectedIDCardTable,y
	BNE.b CODE_A4C51B
	LDA.l (DATA_A58034&$FF0000)+$03,x
	JSL.l CODE_A4DF0D
	LDA.w #$FFFF
	STA.w $1635
	PLY
	RTS

CODE_A4C50A:
	LDY.w #$0004
	JSR.w CODE_A4CA48
	BCC.b CODE_A4C565
	TXY
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

CODE_A4C51B:
	INX
	INX
	INX
	INX
	INX
	BRA.b CODE_A4C4D4

CODE_A4C522:
	REP.b #$20
	PLY
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w $183F
	BNE.b CODE_A4C564
	LDA.w #$FFFF
	STA.w $183F
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	CLC
	ADC.w $00DA
	TAX
	LDA.w $7EA0A4,x
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $173F
	LDA.w $7EA0A8,x
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $1741
	LDA.w #!Define_JP_SoundID_ElevatorDoorOpen
	JSL.l CODE_A4EF9B
CODE_A4C564:
	RTS

CODE_A4C565:
	TXY
	RTS

CODE_A4C567:
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	LDA.w $183F
	BNE.b CODE_A4C5A8
	LDA.w #$FFFF
	STA.w $183F
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	CLC
	ADC.w $00DA
	TAX
	LDA.w $7EA0A4,x
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $173F
	LDA.w $7EA0A8,x
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $1741
	LDA.w #!Define_JP_SoundID_ElevatorDoorOpen
	JSL.l CODE_A4EF9B
CODE_A4C5A8:
	RTS

CODE_A4C5A9:
	TXY
	RTS

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

CODE_A4C5AB:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	ASL
	TAX
	LDA.l DATA_A4D0B1,x
	STA.w $00E0
	LDA.l DATA_A4D0B1+$02,x
	STA.w $00DE
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w $00E0
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00DE
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w $00E0
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00DE
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4C60E:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	ASL
	TAX
	LDA.l DATA_A4D0B1,x
	STA.w $00E0
	LDA.l DATA_A4D0B1+$02,x
	STA.w $00DE
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w $00E0
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00DE
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D131,x
	STA.w $00E0
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $E2
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $E4
	LDA.b $E2
	CLC
	ADC.w $169E
	CLC
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1686
	LDA.b $E4
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $16A0
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.w $1686
	TAX
	SEI
	PHY
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLA
	SEC
	SBC.w !RAM_JP_Interior_MapWidthLo
	TAX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLY
	CLI
CODE_A4C709:
	SEP.b #$20
	LDA.w $17A1
	BEQ.b CODE_A4C71A
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

CODE_A4C71A:
	REP.b #$20
	LDA.w #!Define_JP_InteriorEntityID_18
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4C723:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D161,x
	BEQ.b CODE_A4C744
	LDA.l DATA_A4D131,x
	STA.w $00E0
	SEC
	SBC.w #$0010
	AND.w #$003F
	STA.w $00DE
	BRA.b CODE_A4C755

CODE_A4C744:
	LDA.l DATA_A4D131,x
	STA.w $00E0
	CLC
	ADC.w #$0010
	AND.w #$003F
	STA.w $00DE
CODE_A4C755:
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.w $00EA
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D051,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E2
	PHX
	LDX.w $00DE
	LDA.l DATA_A4D031,x
	PLX
	SEC
	SBC.w $00EA
	STA.b $E6
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.w $00EA
	LDX.w $00DE
	LDA.l DATA_A4D061,x
	SEC
	SBC.w $00EA
	STA.b $E4
	LDX.w $00DE
	LDA.l DATA_A4D041,x
	SEC
	SBC.w $00EA
	STA.b $E8
	TYX
	LDY.w #$0000
	JSR.w CODE_A4CA48
	BCS.b CODE_A4C7CC
	LDY.w #$0004
	JSR.w CODE_A4CA48
	BCC.b CODE_A4C7CF
CODE_A4C7CC:
	BRL.w CODE_A4C90D

CODE_A4C7CF:
	TXY
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D131,x
	STA.w $00E0
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $E2
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $E4
	LDA.b $E2
	CLC
	ADC.w $169E
	CLC
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1686
	LDA.b $E4
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $16A0
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.w $1686
	TAX
	CLI
	PHY
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLA
	SEC
	SBC.w !RAM_JP_Interior_MapWidthLo
	TAX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$00
	STA.l $8017B7,x
	REP.b #$30
	PLY
	CLI
	LDA.w $183F
	BNE.b CODE_A4C8CC
	LDA.w #$FFFF
	STA.w $183F
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	CLC
	ADC.w $00DA
	TAX
	LDA.w $7EA0A4,x
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $173F
	LDA.w $7EA0A8,x
	EOR.w #$FFFF
	INC
	CLC
	ADC.w #$4000
	LSR
	LSR
	LSR
	STA.w $1741
	LDA.w #!Define_JP_SoundID_ElevatorDoorOpen
	JSL.l CODE_A4EF9B
CODE_A4C8CC:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	ASL
	TAX
	LDA.l DATA_A4D0D1,x
	STA.w $00E0
	LDA.l DATA_A4D0D1+$02,x
	STA.w $00DE
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w $00E0
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00DE
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

CODE_A4C90D:
	REP.b #$30
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	TAX
	LDA.l DATA_A4D131,x
	STA.w $00E0
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF31,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown1,x
	STA.b $E2
	PHX
	LDX.w $00E0
	LDA.l DATA_A4CF41,x
	PLX
	CLC
	ADC.w JP_Interior_EntityTable[$00].Unknown2,x
	STA.b $E4
	LDA.b $E2
	CLC
	ADC.w $169E
	CLC
	LSR
	LSR
	LSR
	LSR
	LSR
	LSR
	STA.w $1686
	LDA.b $E4
	EOR.w #$FFFF
	INC
	CLC
	ADC.w $16A0
	ROR
	ROR
	ROR
	ROR
	ROR
	AND.w #$07FE
	TAX
	LDA.l $7EA8B4,x
	CLC
	ADC.w $1686
	TAX
	CLI
	PHY
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLA
	SEC
	SBC.w !RAM_JP_Interior_MapWidthLo
	TAX
	PHX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer+$02,x
	SEP.b #$10
	AND.b #$3F
	TAX
	LDA.b #$FF
	STA.l $8017B7,x
	REP.b #$30
	PLY
	CLI
	RTS

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

CODE_A4C9D2:
	LDA.w JP_Interior_EntityTable[$00].Unknown3,y
	AND.w #$0007
	ASL
	ASL
	TAX
	LDA.l DATA_A4D0D1,x
	STA.w $00E0
	LDA.l DATA_A4D0D1+$02,x
	STA.w $00DE
	LDA.w JP_Interior_EntityTable[$00].Unknown1,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w $00E0
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00DE
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,y
	LSR
	TAX
	LDA.l DATA_A4D191,x
	CLC
	ADC.w $00DC
	TAX
	LDA.w JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w $00E0
	STA.w JP_Interior_EntityTable[$00].Unknown1,x
	LDA.w JP_Interior_EntityTable[$00].Unknown2,x
	CLC
	ADC.w $00DE
	STA.w JP_Interior_EntityTable[$00].Unknown2,x
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4CA35:
	SEP.b #$20
	LDA.b #$00
	STA.w $17A1
CODE_A4CA3C:
	REP.b #$20
	LDA.w JP_Interior_EntityTable[$00].IDLo,y
	INC
	STA.w JP_Interior_EntityTable[$00].IDLo,y
	RTS

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

CODE_A4CA46:
	REP.b #$30
CODE_A4CA48:
	LDA.b $9C
	SEC
	SBC.w #$0058
	SEC
	SBC.w $00E2,y
	BPL.b CODE_A4CA7A
	LDA.b $9C
	CLC
	ADC.w #$0058
	SEC
	SBC.w $00E2,y
	BMI.b CODE_A4CA7A
	LDA.b $9F
	SEC
	SBC.w #$0058
	SEC
	SBC.w $00E4,y
	BPL.b CODE_A4CA7A
	LDA.b $9F
	CLC
	ADC.w #$0058
	SEC
	SBC.w $00E4,y
	BMI.b CODE_A4CA7A
	SEC
	RTS

CODE_A4CA7A:
	CLC
	RTS

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

CODE_A4CA7C:
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
CODE_A4CA88:
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$13,x
	CMP.w $00EC
	BNE.b CODE_A4CA96
	BRL.w CODE_A4CBD0

CODE_A4CA96:
	REP.b #$20
	TXA
	CLC
	ADC.w #$0015
	TAX
	BRA.b CODE_A4CA88

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

CODE_A4CAA0:
	BRL.w CODE_A4CF26

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

CODE_A4CAA3:
	SEP.b #$20
	LDA.w $1785
	BNE.b CODE_A4CACF
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
CODE_A4CAB6:
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$13,x
	BMI.b CODE_A4CACF
	CMP.w $00EC
	BNE.b CODE_A4CAC5
	BRA.b CODE_A4CAD0

CODE_A4CAC5:
	REP.b #$20
	TXA
	CLC
	ADC.w #$0015
	TAX
	BRA.b CODE_A4CAB6

CODE_A4CACF:
	RTL

CODE_A4CAD0:
	REP.b #$30
	LDA.w #$FFFF
	STA.w $172D
	REP.b #$30
	LDA.w #$0000
	STA.b $71
	REP.b #$30
	LDA.w #$0114
	LDY.w #$0000
	JSL.l CODE_A4EED6
	REP.b #$30
	PHX
	JSL.l CODE_A4F07E
	REP.b #$30
	PLX
CODE_A4CAF5:
	REP.b #$30
	PHX
	LDA.w #$0000
	STA.b $16
	STA.b $18
	STA.b $1A
	STA.b $1E
	LDA.b $7A
	CMP.l (DATA_A58034&$FF0000)+$1E,x
	BEQ.b CODE_A4CB32
	LDA.b $7A
	AND.w #$07C0
	SEC
	SBC.l (DATA_A58034&$FF0000)+$1E,x
	CMP.w #$0400
	BCS.b CODE_A4CB27
	LDA.b $7A
	SEC
	SBC.w #$0040
	AND.w #$07C0
	STA.b $7A
	BRA.b CODE_A4CB32

CODE_A4CB27:
	LDA.b $7A
	CLC
	ADC.w #$0040
	AND.w #$07C0
	STA.b $7A
CODE_A4CB32:
	LDA.l (DATA_A58034&$FF0000)+$20,x
	EOR.w #$FFFF
	INC
	CMP.b $96
	BEQ.b CODE_A4CB58
	BPL.b CODE_A4CB4D
	LDA.b $96
	AND.w #$FFF0
	SEC
	SBC.w #$0010
	STA.b $96
	BRA.b CODE_A4CB58

CODE_A4CB4D:
	LDA.b $96
	AND.w #$FFF0
	CLC
	ADC.w #$0010
	STA.b $96
CODE_A4CB58:
	LDA.l (DATA_A58034&$FF0000)+$22,x
	EOR.w #$FFFF
	INC
	CMP.b $99
	BEQ.b CODE_A4CB7E
	BPL.b CODE_A4CB73
	LDA.b $99
	AND.w #$FFF0
	SEC
	SBC.w #$0010
	STA.b $99
	BRA.b CODE_A4CB7E

CODE_A4CB73:
	LDA.b $99
	AND.w #$FFF0
	CLC
	ADC.w #$0010
	STA.b $99
CODE_A4CB7E:
	LDA.b $7A
	CMP.l (DATA_A58034&$FF0000)+$1E,x
	BNE.b CODE_A4CB9E
	LDA.l (DATA_A58034&$FF0000)+$20,x
	EOR.w #$FFFF
	INC
	CMP.b $96
	BNE.b CODE_A4CB9E
	LDA.l (DATA_A58034&$FF0000)+$22,x
	EOR.w #$FFFF
	INC
	CMP.b $99
	BEQ.b CODE_A4CBA8
CODE_A4CB9E:
	JSL.l CODE_A4F054
	REP.b #$30
	PLX
	BRL.w CODE_A4CAF5

CODE_A4CBA8:
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	JSL.l CODE_A4F054
	REP.b #$30
	PLX
	SEP.b #$20
	LDA.b #$FF
	STA.b $F5
	REP.b #$30
CODE_A4CBC3:
	LDA.b $71
	CMP.w #$003C
	BCC.b CODE_A4CBC3
	STZ.b $71
	JSL.l CODE_A4EDDE
CODE_A4CBD0:
	REP.b #$20
	STZ.w $172D
	SEP.b #$20
	LDA.b #$00
	STA.b $F6
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$14,x
	BPL.b CODE_A4CC01
	REP.b #$20
	LDA.w #$8000
	STA.w $178D
	LDA.l (DATA_A58034&$FF0000)+$26,x
	CLC
	ADC.l (DATA_A58034&$FF0000)+$1E,x
	AND.w #$07FF
	STA.w $1AC2
	LDA.w #DATA_A4EA5C
	BRA.b CODE_A4CC30

CODE_A4CBFF:
	SEP.b #$20
CODE_A4CC01:
	LDA.l (DATA_A58034&$FF0000)+$15,x
	BPL.b CODE_A4CC25
	REP.b #$20
	LDA.w #$0080
	STA.w $178D
	LDA.l (DATA_A58034&$FF0000)+$24,x
	CLC
	ADC.l (DATA_A58034&$FF0000)+$1E,x
	AND.w #$07FF
	STA.w $1AC2
	LDA.w #DATA_A4EA8C
	BRA.b CODE_A4CC30

CODE_A4CC23:
	SEP.b #$20
CODE_A4CC25:
	REP.b #$20
	LDA.w #$8080
	STA.w $178D
	LDA.w #DATA_A4EA12
CODE_A4CC30:
	JSL.l CODE_A4DF0D
CODE_A4CC34:
	REP.b #$30
	LDA.b $16
	AND.w #$2000
	BEQ.b CODE_A4CC47
	LDA.w #$0000
	JSL.l CODE_A4DF0D
	BRL.w CODE_A4CDEF

CODE_A4CC47:
	LDA.b $16
	AND.w $178D
	BNE.b CODE_A4CC5E
	SEP.b #$20
	LDA.w $16B1
	BEQ.b CODE_A4CC5A
	LDA.b #$96
	STA.w $16B1
CODE_A4CC5A:
	BRA.b CODE_A4CC34

CODE_A4CC5C:
	REP.b #$20
CODE_A4CC5E:
	PHA
	LDA.w #$0000
	JSL.l CODE_A4DF0D
	PLA
	AND.w #$0080
	BEQ.b CODE_A4CC79
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$14,x
	STA.w !RAM_JP_Interior_CurrentAreaLo
	BRA.b CODE_A4CC86

CODE_A4CC77:
	REP.b #$20
CODE_A4CC79:
	SEP.b #$20
	LDA.l (DATA_A58034&$FF0000)+$15,x
	STA.w !RAM_JP_Interior_CurrentAreaLo
	INX
	INX
	INX
	INX
CODE_A4CC86:
	REP.b #$30
	STZ.b $71
	LDA.w $1AC2
	STA.b $7A
	STA.b $7C
	LDA.b $AE
	SEC
	SBC.l (DATA_A58034&$FF0000)+$16,x
	STA.b $90
	STA.b $96
	STA.b $A2
	STA.b $96
	LDA.b $B1
	SEC
	SBC.l (DATA_A58034&$FF0000)+$18,x
	STA.b $93
	STA.b $99
	STA.b $A5
	STA.b $99
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_MovingElevator&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_A4EF83
	SEP.b #$20
	REP.b #$10
	LDX.w #$0020
CODE_A4CCC0:
	LDA.l $000020,x
	STA.l $7FFBCC,x
	DEX
	BPL.b CODE_A4CCC0
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_A58004,x
	TAX
	REP.b #$30
	PHX
	LDA.l (DATA_A58034&$FF0000)+$06,x
	PHA
	LDA.l (DATA_A58034&$FF0000)+$08,x
	AND.w #$00FF
	PHA
	PEA.w !RAM_JP_Interior_MapDataBuffer
	PEA.w !RAM_JP_Interior_MapDataBuffer>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	REP.b #$30
	PLX
	PHX
	LDA.l (DATA_A58034&$FF0000)+$00,x
	PHA
	LDA.l (DATA_A58034&$FF0000)+$02,x
	AND.w #$00FF
	PHA
	PEA.w !RAM_JP_Interior_RoomDataPtrTable
	PEA.w !RAM_JP_Interior_RoomDataPtrTable>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	REP.b #$30
	PLX
	PHX
	LDA.l (DATA_A58034&$FF0000)+$03,x
	PHA
	LDA.l (DATA_A58034&$FF0000)+$05,x
	AND.w #$00FF
	PHA
	PEA.w JP_Interior_EntityTable[$00].Unknown1
	PEA.w JP_Interior_EntityTable[$00].Unknown1>>16
	JSL.l CODE_A6C224
	PLA
	PLA
	PLA
	PLA
	SEP.b #$20
	REP.b #$10
	LDX.w #$0020
CODE_A4CD3D:
	LDA.l $7FFBCC,x
	STA.l $000020,x
	DEX
	BPL.b CODE_A4CD3D
	REP.b #$30
	PLX
	SEP.b #$20
	LDA.l !RAM_JP_Interior_MapDataBuffer
	STA.w !RAM_JP_Interior_MapWidthLo
	LDA.l !RAM_JP_Interior_MapDataBuffer+$01
	STA.w !RAM_JP_Interior_MapLengthLo
	REP.b #$30
	LDA.w #$0000
	LDX.w #$0000
	LDY.w #$0080
CODE_A4CD66:
	STA.l $7EA8B4,x
	CLC
	ADC.w !RAM_JP_Interior_MapWidthLo
	INX
	INX
	DEY
	BNE.b CODE_A4CD66
	REP.b #$20
	LDA.w !RAM_JP_Interior_MapWidthLo
	AND.w #$FFFE
	LSR
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.w $169E
	REP.b #$20
	LDA.w !RAM_JP_Interior_MapLengthLo
	INC
	AND.w #$FFFE
	LSR
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	STA.w $16A0
	REP.b #$20
	LDA.w !RAM_JP_Interior_CurrentRoom
	STA.w $0069
	STA.w $00EC
	JSL.l CODE_A489DB
	JSL.l CODE_A4B9F6
	LDA.w !RAM_JP_Interior_CurrentRoom
	STA.w $0069
	STA.w $00EC
	REP.b #$30
CODE_A4CDB6:
	LDA.b $71
	CMP.w #$0080
	BCC.b CODE_A4CDB6
	STZ.b $71
	LDA.w #!Define_JP_SoundCommand_Unknown08
	LDY.w #$0000
	JSL.l CODE_A4EF83
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_ElevatorStop&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_A4EF83
	REP.b #$20
	STZ.b $1A
	STZ.b $1C
	STZ.b $16
	STZ.b $18
	STZ.b $1E
	JSL.l CODE_A4B9F6
	LDA.w !RAM_JP_Interior_CurrentRoom
	STA.w $0069
	STA.w $00EC
	BRL.w CODE_A4CA7C

CODE_A4CDEF:
	REP.b #$30
	LDA.w #$0114
	LDY.w #$0000
	JSL.l CODE_A4EED6
	REP.b #$30
	STZ.b $71
CODE_A4CDFF:
	LDA.b $71
	CMP.w #$003C
	BCC.b CODE_A4CDFF
	STZ.b $71
	LDA.w #$0000
	STA.w $178D
	JSL.l CODE_A4EE46
	LDA.l (DATA_A58034&$FF0000)+$1E,x
	AND.w #$07FF
	STA.b $7C
	STA.b $7A
	SEP.b #$20
	LDA.b #$00
	STA.b $F5
	SEP.b #$20
	DEC.b $79
CODE_A4CE27:
	LDA.b $79
	BNE.b CODE_A4CE27
	LDA.b $BF
	EOR.b #$FF
	STA.b $BF
	DEC.b $79
CODE_A4CE33:
	LDA.b $79
	BNE.b CODE_A4CE33
	LDA.b $BF
	EOR.b #$FF
	STA.b $BF
	REP.b #$20
	LDA.w $00EC
	STA.w $178F
	REP.b #$20
	STZ.b $1A
	STZ.b $1C
	STZ.b $16
	STZ.b $18
	STZ.b $1E
	JSL.l CODE_A4F057
	JSL.l CODE_A4F057
	SEP.b #$20
	LDA.b #$FF
	STA.b $F6
	LDA.b #$FF
	STA.w $17A1
	REP.b #$30
	LDX.w #$001E
	LDA.w #$0000
CODE_A4CE6C:
	STA.l $8017B7,x
	DEX
	DEX
	BPL.b CODE_A4CE6C
	JSL.l CODE_A4BD79
	REP.b #$30
	PHA
	PHX
	PHY
	STZ.w $16BB
	LDX.w #$003E
	LDA.w #$0000
CODE_A4CE86:
	STA.l $8017B7,x
	DEX
	DEX
	BPL.b CODE_A4CE86
	PLY
	PLX
	PLA
	LDA.w #$FFFF
	STA.w !RAM_JP_Interior_DinosaursOnFloorCountLo
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	CMP.w #!Define_JP_InteriorFloorID_RaptorPenSubLevel2
	BNE.b CODE_A4CEE0
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BEQ.b CODE_A4CEE0
	LDA.l $7EA9B8
	TAX
	LDA.l $7E0000,x
	TAX
	LDA.l JP_Interior_EntityTable[$00].Unknown1,x
	CLC
	ADC.w #$003A
	TAX
	LDA.w #$FB40
	STA.l JP_Interior_EntityTable[$00].Unknown1,x
	STA.l $7EAEE4,x
	LDA.w #$FB80
	STA.l JP_Interior_EntityTable[$00].Unknown4,x
	STA.l JP_Interior_EntityTable[$00].Unknown9,x
	STA.l $7EAEE0,x
	LDA.w #$FB00
	STA.l JP_Interior_EntityTable[$00].Unknown3,x
	STA.l JP_Interior_EntityTable[$00].Unknown7,x
	STA.l $7EAEDC,x
CODE_A4CEE0:
	LDA.w #$00C8
	STA.w $17A3
	LDA.w #$0000
	STA.w $1755
	STA.w $1757
	STA.w $1765
	STA.w $1767
	STA.w $176D
	REP.b #$30
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BEQ.b CODE_A4CF21
	LDA.w !RAM_JP_Global_ShipObjectivesClearFlagLo
	BNE.b CODE_A4CF21
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	CMP.w #!Define_JP_InteriorFloorID_ShipEntryLevel
	BEQ.b CODE_A4CF20
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel1
	BEQ.b CODE_A4CF20
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel2
	BEQ.b CODE_A4CF20
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel3
	BEQ.b CODE_A4CF20
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel4
	BNE.b CODE_A4CF21
CODE_A4CF20:
	RTL

CODE_A4CF21:
	JSL.l CODE_A4DF47
	RTL

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

CODE_A4CF26:
	SEP.b #$20
	AND.b #$0F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	INC
	BRA.b CODE_A4CF26

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

DATA_A4CF31:
	dw $0000,$0019,$0031,$0047,$005B,$006A,$0076,$007E

DATA_A4CF41:
	dw $0080,$007E,$0076,$006A,$005B,$0047,$0031,$0019
	dw $0000,$FFE7,$FFCF,$FFB9,$FFA5,$FF96,$FF8A,$FF82
	dw $FF80,$FF82,$FF8A,$FF96,$FFA5,$FFB9,$FFCF,$FFE7
	dw $0000,$0019,$0031,$0047,$005B,$006A,$0076,$007E
	dw $0080,$007E,$0076,$006A,$005B,$0047,$0031,$0019
	dw $0000,$FFE7,$FFCF,$FFB9,$FFA5,$FF96,$FF8A,$FF82
	dw $FF80,$FF82,$FF8A,$FF96,$FFA5,$FFB9,$FFCF,$FFE7
	dw $0000,$0019,$0031,$0047,$005B,$006A,$0076,$007E
	dw $007F,$007E,$0076,$006A,$005B,$0047,$0031,$0019
	dw $0000,$FFE7,$FFCF,$FFB9,$FFA5,$FF96,$FF8A,$FF82
	dw $FF81,$FF82,$FF8A,$FF96,$FFA5,$FFB9,$FFCF,$FFE7
	dw $0000,$0019,$0031,$0047,$005B,$006A,$0076,$007E
	dw $007F,$007E,$0076,$006A,$005B,$0047,$0031,$0019
	dw $0000,$FFE7,$FFCF,$FFB9,$FFA5,$FF96,$FF8A,$FF82
	dw $FF81,$FF82,$FF8A,$FF96,$FFA5,$FFB9,$FFCF,$FFE7

DATA_A4D031:
	dw $0000,$0010,$0020,$002F,$003C,$0046,$004E,$0054

DATA_A4D041:
	dw $0055,$0054,$004E,$0046,$003C,$002F,$0020,$0010

DATA_A4D051:
	dw $0000,$FFF0,$FFE0,$FFD1,$FFC4,$FFBA,$FFB2,$FFAC

DATA_A4D061:
	dw $FFAB,$FFAC,$FFB2,$FFBA,$FFC4,$FFD1,$FFE0,$FFF0
	dw $0000,$0010,$0020,$002F,$003C,$0046,$004E,$0054
	dw $0055,$0054,$004E,$0046,$003C,$002F,$0020,$0010
	dw $0000,$FFF0,$FFE0,$FFD1,$FFC4,$FFBA,$FFB2,$FFAC
	dw $FFAB,$FFAC,$FFB2,$FFBA,$FFC4,$FFD1,$FFE0,$FFF0

DATA_A4D0B1:
	dw $0000,$FFF0,$0000,$FFF0,$0000,$0010,$0000,$0010
	dw $0010,$0000,$FFF0,$0000,$0010,$0000,$FFF0,$0000

DATA_A4D0D1:
	dw $0000,$0010,$0000,$0010,$0000,$FFF0,$0000,$FFF0
	dw $FFF0,$0000,$0010,$0000,$FFF0,$0000,$0010,$0000
	dw $0000,$FF80,$0000,$FF80,$0000,$0080,$0000,$0080
	dw $0080,$0000,$FF80,$0000,$0080,$0000,$FF80,$0000
	dw $0000,$0080,$0000,$0080,$0000,$FF80,$0000,$FF80
	dw $FF80,$0000,$0080,$0000,$FF80,$0000,$0080,$0000

DATA_A4D131:
	dw $0000,$0000,$0020,$0020,$0030,$0010,$0030,$0010

DATA_A4D141:
	dw $FFFC,$FFFC,$001C,$001C,$002C,$000C,$002C,$000C

DATA_A4D151:
	dw $0004,$0004,$0024,$0024,$0034,$0014,$0034,$0014

DATA_A4D161:
	dw $0000,$FFFF,$FFFF,$0000,$FFFF,$0000,$0000,$FFFF
	dw $007B,$007B,$007B,$007B,$007B,$007B,$007B,$007B
	dw $FFFF,$0000,$0000,$FFFF,$0000,$FFFF,$FFFF,$0000

DATA_A4D191:
	dw $0000,$0400,$0000,$0008,$0C00,$0000,$0010,$1400
	dw $0000,$0018,$1C00,$0000,$0020,$2400,$0000,$0028
	dw $2C00,$0000,$0030,$3400,$0000,$0038,$3C00,$0000
	dw $0040,$4400,$0000,$0048,$4C00,$0000,$0050,$5400
	dw $0000,$0058,$5C00,$0000,$0060,$6400,$0000,$0068
	dw $6C00,$0000,$0070,$7400,$0000,$0078,$7C00,$0000
	dw $0080,$8400,$0000,$0088,$8C00,$0000,$0090,$9400
	dw $0000,$0098,$9C00,$0000,$00A0,$A400,$0000,$00A8
	dw $AC00,$0000,$00B0,$B400,$0000,$00B8,$BC00,$0000
	dw $00C0,$C400,$0000,$00C8,$CC00,$0000,$00D0,$D400
	dw $0000,$00D8,$DC00,$0000,$00E0,$E400,$0000,$00E8
	dw $EC00,$0000,$00F0,$F400,$0000,$00F8,$FC00,$0000
	dw $0100,$0400,$0001,$0108,$0C00,$0001,$0110,$1400
	dw $0001,$0118,$1C00,$0001,$0120,$2400,$0001,$0128
	dw $2C00,$0001,$0130,$3400,$0001,$0138,$3C00,$0001
	dw $0140,$4400,$0001,$0148,$4C00,$0001,$0150,$5400
	dw $0001,$0158,$5C00,$0001,$0160,$6400,$0001,$0168
	dw $6C00,$0001,$0170,$7400,$0001,$0178,$7C00,$0001
	dw $0180,$8400,$0001,$0188,$8C00,$0001,$0190,$9400
	dw $0001,$0198,$9C00,$0001,$01A0,$A400,$0001,$01A8
	dw $AC00,$0001,$01B0,$B400,$0001,$01B8,$BC00,$0001
	dw $01C0,$C400,$0001,$01C8,$CC00,$0001,$01D0,$D400
	dw $0001,$01D8,$DC00,$0001,$01E0,$E400,$0001,$01E8
	dw $EC00,$0001,$01F0,$F400,$0001,$01F8,$FC00,$0001
	dw $0200,$0400,$0002,$0208,$0C00,$0002,$0210,$1400
	dw $0002,$0218,$1C00,$0002,$0220,$2400,$0002,$0228
	dw $2C00,$0002,$0230,$3400,$0002,$0238,$3C00,$0002
	dw $0240,$4400,$0002,$0248,$4C00,$0002,$0250,$5400
	dw $0002,$0258,$5C00,$0002,$0260,$6400,$0002,$0268
	dw $6C00,$0002,$0270,$7400,$0002,$0278,$7C00,$0002
	dw $0280,$8400,$0002,$0288,$8C00,$0002,$0290,$9400
	dw $0002,$0298,$9C00,$0002,$02A0,$A400,$0002,$02A8
	dw $AC00,$0002,$02B0,$B400,$0002,$02B8,$BC00,$0002
	dw $02C0,$C400,$0002,$02C8,$CC00,$0002,$02D0,$D400
	dw $0002,$02D8,$DC00,$0002,$02E0,$E400,$0002,$02E8
	dw $EC00,$0002,$02F0,$F400,$0002,$02F8,$FC00,$0002
	dw $0300,$0400,$0003,$0308,$0C00,$0003,$0310,$1400
	dw $0003,$0318,$1C00,$0003,$0320,$2400,$0003,$0328
	dw $2C00,$0003,$0330,$3400,$0003,$0338,$3C00,$0003
	dw $0340,$4400,$0003,$0348,$4C00,$0003,$0350,$5400
	dw $0003,$0358,$5C00,$0003,$0360,$6400,$0003,$0368
	dw $6C00,$0003,$0370,$7400,$0003,$0378,$7C00,$0003
	dw $0380,$8400,$0003,$0388,$8C00,$0003,$0390,$9400
	dw $0003,$0398,$9C00,$0003,$03A0,$A400,$0003,$03A8
	dw $AC00,$0003,$03B0,$B400,$0003,$03B8,$BC00,$0003
	dw $03C0,$C400,$0003,$03C8,$CC00,$0003,$03D0,$D400
	dw $0003,$03D8,$DC00,$0003,$03E0,$E400,$0003,$03E8
	dw $EC00,$0003,$03F0,$F400,$0003,$03F8,$FC00,$0003
	dw $0400,$0400,$0004,$0408,$0C00,$0004,$0410,$1400
	dw $0004,$0418,$1C00,$0004,$0420,$2400,$0004,$0428
	dw $2C00,$0004,$0430,$3400,$0004,$0438,$3C00,$0004
	dw $0440,$4400,$0004,$0448,$4C00,$0004,$0450,$5400
	dw $0004,$0458,$5C00,$0004,$0460,$6400,$0004,$0468
	dw $6C00,$0004,$0470,$7400,$0004,$0478,$7C00,$0004
	dw $0480,$8400,$0004,$0488,$8C00,$0004,$0490,$9400
	dw $0004,$0498,$9C00,$0004,$04A0,$A400,$0004,$04A8
	dw $AC00,$0004

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

DATA_A4D515:
	db $07,$07,$00,$01,$01,$01,$01,$01
	db $01,$01,$02,$03,$03,$03,$03,$03
	db $03,$03,$03,$03,$03,$03,$03,$06
	db $04,$05,$05,$05,$05,$05,$05,$05

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

CODE_A4D535:
	REP.b #$30
CODE_A4D537:
	ASL
	ASL
	CLC
	ADC.w #!RAM_JP_Interior_OAMBuffer
	STA.w $1628
	SEP.b #$20
	PHB
	LDA.b #DATA_A4DBDA>>16
	PHA
	PLB
	REP.b #$30
	LDY.w $0000,x
	INX
	INX
CODE_A4D54E:
	PHY
	LDA.w $0000,x
	STA.w $1622
	LDA.w $0002,x
	STA.w $1624
	LDA.w $0004,x
	STA.w $1626
	PHX
	JSR.w CODE_A4D7D6
	PLX
	REP.b #$30
	TXA
	CLC
	ADC.w #$0006
	TAX
	PLY
	DEY
	BNE.b CODE_A4D54E
	PLB
	RTL

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

CODE_A4D574:
	ASL
	ASL
	CLC
	ADC.w #!RAM_JP_Interior_OAMBuffer
	STA.w $1628
	SEP.b #$20
	PHB
	LDA.b #DATA_A4D852>>16
	PHA
	PLB
	JSR.w CODE_A4D7D6
	PLB
	RTL

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

CODE_A4D589:
	REP.b #$30
	ASL
	ASL
	CLC
	ADC.w #!RAM_JP_Interior_OAMBuffer
	STA.w $1628
	SEP.b #$20
	PHB
	LDA.b #DATA_A4DA52>>16
	PHA
	PLB
	REP.b #$30
	LDY.w $0000,x
	INX
	INX
CODE_A4D5A2:
	PHY
	LDA.w $0000,x
	STA.w $1622
	LDA.w $0002,x
	STA.w $1624
	LDA.w $0004,x
	STA.w $1626
	PHX
	JSR.w CODE_A4D820
	PLX
	REP.b #$30
	TXA
	CLC
	ADC.w #$0006
	TAX
	PLY
	DEY
	BNE.b CODE_A4D5A2
	SEP.b #$20
	PLB
	RTL

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

CODE_A4D5CA:
	REP.b #$30
CODE_A4D5CC:
	ASL
	ASL
	CLC
	ADC.w #$1530
	STA.w $1628
	SEP.b #$20
	PHB
	LDA.b #DATA_A4DA52>>16
	PHA
	PLB
	REP.b #$30
	JSR.w CODE_A4D820
	SEP.b #$20
	PLB
	RTL

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

CODE_A4D5E5:
	SEP.b #$20
	PHB
	LDA.b #CODE_A4D5E5>>16
	PHA
	PLB
	REP.b #$30
	JSL.l CODE_A4D61F
	LDA.w #!RAM_JP_Interior_OAMBuffer
	STA.w $1628
	LDA.w $167E
	CLC
	ADC.w $1682
	AND.w #$00FF
	STA.w $1622
	LDA.w $1680
	CLC
	ADC.w $1684
	AND.w #$00FF
	STA.w $1624
	LDA.w #$3E00
	STA.w $1626
	JSR.w CODE_A4D7D6
	SEP.b #$20
	PLB
	RTL

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

CODE_A4D61F:
	SEP.b #$20
	LDA.b #$E0
	STA.w JP_Interior_OAMBuffer[$00].YDisp
	STA.w JP_Interior_OAMBuffer[$01].YDisp
	STA.w JP_Interior_OAMBuffer[$02].YDisp
	STA.w JP_Interior_OAMBuffer[$03].YDisp
	STA.w JP_Interior_OAMBuffer[$04].YDisp
	STA.w JP_Interior_OAMBuffer[$05].YDisp
	STA.w JP_Interior_OAMBuffer[$06].YDisp
	STA.w JP_Interior_OAMBuffer[$07].YDisp
	STA.w JP_Interior_OAMBuffer[$08].YDisp
	STA.w JP_Interior_OAMBuffer[$09].YDisp
	STA.w JP_Interior_OAMBuffer[$0A].YDisp
	STA.w JP_Interior_OAMBuffer[$0B].YDisp
	STA.w JP_Interior_OAMBuffer[$0C].YDisp
	STA.w JP_Interior_OAMBuffer[$0D].YDisp
	STA.w JP_Interior_OAMBuffer[$0E].YDisp
	STA.w JP_Interior_OAMBuffer[$0F].YDisp
	STA.w JP_Interior_OAMBuffer[$10].YDisp
	STA.w JP_Interior_OAMBuffer[$11].YDisp
	STA.w JP_Interior_OAMBuffer[$12].YDisp
	STA.w JP_Interior_OAMBuffer[$13].YDisp
	STA.w JP_Interior_OAMBuffer[$14].YDisp
	STA.w JP_Interior_OAMBuffer[$15].YDisp
	STA.w JP_Interior_OAMBuffer[$16].YDisp
	STA.w JP_Interior_OAMBuffer[$17].YDisp
	STA.w JP_Interior_OAMBuffer[$18].YDisp
	STA.w JP_Interior_OAMBuffer[$19].YDisp
	STA.w JP_Interior_OAMBuffer[$1A].YDisp
	STA.w JP_Interior_OAMBuffer[$1B].YDisp
	STA.w JP_Interior_OAMBuffer[$1C].YDisp
	STA.w JP_Interior_OAMBuffer[$1D].YDisp
	STA.w JP_Interior_OAMBuffer[$1E].YDisp
	STA.w JP_Interior_OAMBuffer[$1F].YDisp
	STA.w JP_Interior_OAMBuffer[$20].YDisp
	STA.w JP_Interior_OAMBuffer[$21].YDisp
	STA.w JP_Interior_OAMBuffer[$22].YDisp
	STA.w JP_Interior_OAMBuffer[$23].YDisp
	STA.w JP_Interior_OAMBuffer[$24].YDisp
	STA.w JP_Interior_OAMBuffer[$25].YDisp
	STA.w JP_Interior_OAMBuffer[$26].YDisp
	STA.w JP_Interior_OAMBuffer[$27].YDisp
	STA.w JP_Interior_OAMBuffer[$28].YDisp
	STA.w JP_Interior_OAMBuffer[$29].YDisp
	STA.w JP_Interior_OAMBuffer[$2A].YDisp
	STA.w JP_Interior_OAMBuffer[$2B].YDisp
	STA.w JP_Interior_OAMBuffer[$2C].YDisp
	STA.w JP_Interior_OAMBuffer[$2D].YDisp
	STA.w JP_Interior_OAMBuffer[$2E].YDisp
	STA.w JP_Interior_OAMBuffer[$2F].YDisp
	STA.w JP_Interior_OAMBuffer[$30].YDisp
	STA.w JP_Interior_OAMBuffer[$31].YDisp
	STA.w JP_Interior_OAMBuffer[$32].YDisp
	STA.w JP_Interior_OAMBuffer[$33].YDisp
	STA.w JP_Interior_OAMBuffer[$34].YDisp
	STA.w JP_Interior_OAMBuffer[$35].YDisp
	STA.w JP_Interior_OAMBuffer[$36].YDisp
	STA.w JP_Interior_OAMBuffer[$37].YDisp
	STA.w JP_Interior_OAMBuffer[$38].YDisp
	STA.w JP_Interior_OAMBuffer[$39].YDisp
	STA.w JP_Interior_OAMBuffer[$3A].YDisp
	STA.w JP_Interior_OAMBuffer[$3B].YDisp
	STA.w JP_Interior_OAMBuffer[$3C].YDisp
	STA.w JP_Interior_OAMBuffer[$3D].YDisp
	STA.w JP_Interior_OAMBuffer[$3E].YDisp
	STA.w JP_Interior_OAMBuffer[$3F].YDisp
	STA.w JP_Interior_OAMBuffer[$40].YDisp
	STA.w JP_Interior_OAMBuffer[$41].YDisp
	STA.w JP_Interior_OAMBuffer[$42].YDisp
	STA.w JP_Interior_OAMBuffer[$43].YDisp
	STA.w JP_Interior_OAMBuffer[$44].YDisp
	STA.w JP_Interior_OAMBuffer[$45].YDisp
	STA.w JP_Interior_OAMBuffer[$46].YDisp
	STA.w JP_Interior_OAMBuffer[$47].YDisp
	STA.w JP_Interior_OAMBuffer[$48].YDisp
	STA.w JP_Interior_OAMBuffer[$49].YDisp
	STA.w JP_Interior_OAMBuffer[$4A].YDisp
	STA.w JP_Interior_OAMBuffer[$4B].YDisp
	STA.w JP_Interior_OAMBuffer[$4C].YDisp
	STA.w JP_Interior_OAMBuffer[$4D].YDisp
	STA.w JP_Interior_OAMBuffer[$4E].YDisp
	STA.w JP_Interior_OAMBuffer[$4F].YDisp
	STA.w JP_Interior_OAMBuffer[$50].YDisp
	STA.w JP_Interior_OAMBuffer[$51].YDisp
	STA.w JP_Interior_OAMBuffer[$52].YDisp
	STA.w JP_Interior_OAMBuffer[$53].YDisp
	STA.w JP_Interior_OAMBuffer[$54].YDisp
	STA.w JP_Interior_OAMBuffer[$55].YDisp
	STA.w JP_Interior_OAMBuffer[$56].YDisp
	STA.w JP_Interior_OAMBuffer[$57].YDisp
	STA.w JP_Interior_OAMBuffer[$58].YDisp
	STA.w JP_Interior_OAMBuffer[$59].YDisp
	STA.w JP_Interior_OAMBuffer[$5A].YDisp
	STA.w JP_Interior_OAMBuffer[$5B].YDisp
	STA.w JP_Interior_OAMBuffer[$5C].YDisp
	STA.w JP_Interior_OAMBuffer[$5D].YDisp
	STA.w JP_Interior_OAMBuffer[$5E].YDisp
	STA.w JP_Interior_OAMBuffer[$5F].YDisp
	STA.w JP_Interior_OAMBuffer[$60].YDisp
	STA.w JP_Interior_OAMBuffer[$61].YDisp
	STA.w JP_Interior_OAMBuffer[$62].YDisp
	STA.w JP_Interior_OAMBuffer[$63].YDisp
	STA.w JP_Interior_OAMBuffer[$64].YDisp
	STA.w JP_Interior_OAMBuffer[$65].YDisp
	STA.w JP_Interior_OAMBuffer[$66].YDisp
	STA.w JP_Interior_OAMBuffer[$67].YDisp
	STA.w JP_Interior_OAMBuffer[$68].YDisp
	STA.w JP_Interior_OAMBuffer[$69].YDisp
	STA.w JP_Interior_OAMBuffer[$6A].YDisp
	STA.w JP_Interior_OAMBuffer[$6B].YDisp
	STA.w JP_Interior_OAMBuffer[$6C].YDisp
	STA.w JP_Interior_OAMBuffer[$6D].YDisp
	STA.w JP_Interior_OAMBuffer[$6E].YDisp
	STA.w JP_Interior_OAMBuffer[$6F].YDisp
	STA.w JP_Interior_OAMBuffer[$70].YDisp
	STA.w JP_Interior_OAMBuffer[$71].YDisp
	STA.w JP_Interior_OAMBuffer[$72].YDisp
	STA.w JP_Interior_OAMBuffer[$73].YDisp
	STA.w JP_Interior_OAMBuffer[$74].YDisp
	STA.w JP_Interior_OAMBuffer[$75].YDisp
	STA.w JP_Interior_OAMBuffer[$76].YDisp
	STA.w JP_Interior_OAMBuffer[$77].YDisp
	STA.w JP_Interior_OAMBuffer[$78].YDisp
	STA.w JP_Interior_OAMBuffer[$79].YDisp
	STA.w JP_Interior_OAMBuffer[$7A].YDisp
	STA.w JP_Interior_OAMBuffer[$7B].YDisp
	STA.w JP_Interior_OAMBuffer[$7C].YDisp
	STA.w JP_Interior_OAMBuffer[$7D].YDisp
	STA.w JP_Interior_OAMBuffer[$7E].YDisp
	STA.w JP_Interior_OAMBuffer[$7F].YDisp
	REP.b #$20
	STZ.w JP_Interior_UpperOAMBuffer[$00].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$02].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$04].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$06].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$08].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$0A].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$0C].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$0E].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$10].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$12].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$14].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$16].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$18].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$1A].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$1C].Slot
	STZ.w JP_Interior_UpperOAMBuffer[$1E].Slot
	RTL

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

CODE_A4D7D6:					; Note: Routine that draws the goggles sprite overlay
	REP.b #$10
	SEP.b #$20
	LDX.w $1628
	LDA.w $1624
	STA.b $01,x
	LDA.w $1622
	STA.b $00,x
	REP.b #$20
	LDA.w $1626
	AND.w #$FE00
	STA.w $1793
	LDA.w $1626
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_A4DADA,y
	ORA.w $1793
	STA.b $02,x
	TXA
	ADC.w #$0004
	STA.w $1628
	SEP.b #$20
	LDY.w DATA_A4D852-!RAM_JP_Interior_OAMBuffer,x
	LDA.w JP_Interior_UpperOAMBuffer[$00].Slot,y
	ORA.w DATA_A4D852-!RAM_JP_Interior_OAMBuffer+$02,x
	BIT.w $1623
	BPL.b CODE_A4D81C
	ORA.w DATA_A4D852-!RAM_JP_Interior_OAMBuffer+$03,x
CODE_A4D81C:
	STA.w JP_Interior_UpperOAMBuffer[$00].Slot,y
	RTS

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

CODE_A4D820:
	REP.b #$10
	SEP.b #$20
	LDX.w $1628
	LDA.w $1624
	STA.b $01,x
	LDA.w $1622
	STA.b $00,x
	REP.b #$20
	LDA.w $1626
	AND.w #$FE00
	STA.b $5A
	LDA.w $1626
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_A4DA52,y
	ORA.b $5A
	STA.b $02,x
	TXA
	ADC.w #$0004
	STA.w $1628
	RTS

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

DATA_A4D852:
	dw $0000,$0102,$0000,$0408,$0000,$1020,$0000,$4080
	dw $0001,$0102,$0001,$0408,$0001,$1020,$0001,$4080
	dw $0002,$0102,$0002,$0408,$0002,$1020,$0002,$4080
	dw $0003,$0102,$0003,$0408,$0003,$1020,$0003,$4080
	dw $0004,$0102,$0004,$0408,$0004,$1020,$0004,$4080
	dw $0005,$0102,$0005,$0408,$0005,$1020,$0005,$4080
	dw $0006,$0102,$0006,$0408,$0006,$1020,$0006,$4080
	dw $0007,$0102,$0007,$0408,$0007,$1020,$0007,$4080
	dw $0008,$0102,$0008,$0408,$0008,$1020,$0008,$4080
	dw $0009,$0102,$0009,$0408,$0009,$1020,$0009,$4080
	dw $000A,$0102,$000A,$0408,$000A,$1020,$000A,$4080
	dw $000B,$0102,$000B,$0408,$000B,$1020,$000B,$4080
	dw $000C,$0102,$000C,$0408,$000C,$1020,$000C,$4080
	dw $000D,$0102,$000D,$0408,$000D,$1020,$000D,$4080
	dw $000E,$0102,$000E,$0408,$000E,$1020,$000E,$4080
	dw $000F,$0102,$000F,$0408,$000F,$1020,$000F,$4080
	dw $0010,$0102,$0010,$0408,$0010,$1020,$0010,$4080
	dw $0011,$0102,$0011,$0408,$0011,$1020,$0011,$4080
	dw $0012,$0102,$0012,$0408,$0012,$1020,$0012,$4080
	dw $0013,$0102,$0013,$0408,$0013,$1020,$0013,$4080
	dw $0014,$0102,$0014,$0408,$0014,$1020,$0014,$4080
	dw $0015,$0102,$0015,$0408,$0015,$1020,$0015,$4080
	dw $0016,$0102,$0016,$0408,$0016,$1020,$0016,$4080
	dw $0017,$0102,$0017,$0408,$0017,$1020,$0017,$4080
	dw $0018,$0102,$0018,$0408,$0018,$1020,$0018,$4080
	dw $0019,$0102,$0019,$0408,$0019,$1020,$0019,$4080
	dw $001A,$0102,$001A,$0408,$001A,$1020,$001A,$4080
	dw $001B,$0102,$001B,$0408,$001B,$1020,$001B,$4080
	dw $001C,$0102,$001C,$0408,$001C,$1020,$001C,$4080
	dw $001D,$0102,$001D,$0408,$001D,$1020,$001D,$4080
	dw $001E,$0102,$001E,$0408,$001E,$1020,$001E,$4080
	dw $001F,$0102,$001F,$0408,$001F,$1020,$001F,$4080

DATA_A4DA52:
	dw $0040,$0071,$0072,$0040,$0040,$0040,$0040,$0073
	dw $007A,$007B,$0040,$0040,$0075,$0076,$0074,$0077
	dw $0063,$0064,$0065,$0066,$0067,$0068,$0069,$006A
	dw $006B,$0070,$0078,$0040,$0040,$0040,$0040,$0079
	dw $0040,$0041,$0042,$0043,$0044,$0045,$0046,$0047
	dw $0048,$0049,$004A,$004B,$0050,$0051,$0052,$0053
	dw $0054,$0055,$0056,$0057,$0058,$0059,$005A,$005B
	dw $0060,$0061,$0062,$0040,$01E4,$01F4,$01E5,$01F5
	dw $01E6,$01F6,$01E7,$01F7

DATA_A4DADA:
	dw $0000,$0002,$0004,$0006,$0008,$000A,$000C,$000E
	dw $0020,$0022,$0024,$0026,$0028,$002A,$002C,$002E
	dw $0040,$0042,$0044,$0046,$0048,$004A,$004C,$004E
	dw $0060,$0062,$0064,$0066,$0068,$006A,$006C,$006E
	dw $0080,$0082,$0084,$0086,$0088,$008A,$008C,$008E
	dw $00A0,$00A2,$00A4,$00A6,$00A8,$00AA,$00AC,$00AE
	dw $00C0,$00C2,$00C4,$00C6,$00C8,$00CA,$00CC,$00CE
	dw $00E0,$00E2,$00E4,$00E6,$00E8,$00EA,$00EC,$00EE
	dw $0100,$0102,$0104,$0106,$0108,$010A,$010C,$010E
	dw $0120,$0122,$0124,$0126,$0128,$012A,$012C,$012E
	dw $0140,$0142,$0144,$0146,$0148,$014A,$014C,$014E
	dw $0160,$0162,$0164,$0166,$0168,$016A,$016C,$016E
	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

DATA_A4DBDA:
	dw $0040,$0010,$0028,$3E00,$0020,$0028,$3E01,$0030
	dw $0028,$3E02,$0040,$0028,$3E03,$0050,$0028,$3E04
	dw $0060,$0028,$3E05,$0070,$0028,$3E06,$0080,$0028
	dw $7E06,$0090,$0028,$7E05,$00A0,$0028,$7E04,$00B0
	dw $0028,$7E03,$00C0,$0028,$7E02,$00D0,$0028,$7E01
	dw $00E0,$0028,$7E00,$0000,$0038,$3E09,$0010,$0038
	dw $3E0A,$0020,$0038,$3E0B,$00D0,$0038,$7E0B,$00E0
	dw $0038,$7E0A,$00F0,$0038,$7E09,$0000,$0048,$3E0C
	dw $0010,$0048,$3E0D,$00E0,$0048,$7E0D,$00F0,$0048
	dw $7E0C,$0000,$0058,$3E0E,$0010,$0058,$3E0F,$00E0
	dw $0058,$7E0F,$00F0,$0058,$7E0E,$0000,$0068,$3E30
	dw $0010,$0068,$3E31,$00E0,$0068,$7E31,$00F0,$0068
	dw $7E30,$0000,$0078,$3E32,$0010,$0078,$3E33,$00E0
	dw $0078,$7E33,$00F0,$0078,$7E32,$0000,$0088,$3E34
	dw $0010,$0088,$3E35,$0070,$0088,$3E07,$0080,$0088
	dw $7E07,$00E0,$0088,$7E35,$00F0,$0088,$7E34,$0000
	dw $0098,$3E36,$0010,$0098,$3E37,$0020,$0098,$3E38
	dw $0070,$0098,$3E08,$0080,$0098,$7E08,$00D0,$0098
	dw $7E38,$00E0,$0098,$7E37,$00F0,$0098,$7E36,$0010
	dw $00A8,$3E39,$0020,$00A8,$3E3A,$0030,$00A8,$3E3B
	dw $0040,$00A8,$3E3C,$0050,$00A8,$3E3D,$0060,$00A8
	dw $3E3E,$0070,$00A8,$3E3F,$0080,$00A8,$7E3F,$0090
	dw $00A8,$3E17,$00A0,$00A8,$3E67,$00B0,$00A8,$3E16
	dw $00C0,$00A8,$3E5C,$00D0,$00A8,$7E3A,$00E0,$00A8
	dw $7E39

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

CODE_A4DD5C:
	SEP.b #$20
	REP.b #$10
	STZ.w !REGISTER_OAMAddressLo
	STZ.w !REGISTER_OAMAddressHi
	LDA.b #!REGISTER_OAMDataWritePort
	STA.w DMA[$01].Destination
	STZ.w DMA[$01].Parameters
	LDX.w #!RAM_JP_Interior_OAMBuffer
	STX.w DMA[$01].SourceLo
	STZ.w DMA[$01].SourceBank
	LDX.w #$0220
	STX.w DMA[$01].SizeLo
	LDA.b #$02
	STA.w !REGISTER_DMAEnable
	RTL

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

CODE_A4DD83:
	LDA.b $71
	AND.b #$01
	BEQ.b CODE_A4DD8A
	RTL

CODE_A4DD8A:
	SEP.b #$20
	LDA.w $16B0
	BEQ.b CODE_A4DDCF
	REP.b #$30
	LDA.w $16A4
	BEQ.b CODE_A4DDCF
	SEP.b #$20
	PHB
	LDA.b #DATA_A4DFFE>>16
	PHA
	PLB
CODE_A4DD9F:
	REP.b #$30
	LDA.w $16A4
	CLC
	ADC.w $16AC
	TAX
	SEP.b #$20
	LDA.w $0000,x
	CMP.b #$20
	BCC.b CODE_A4DDB5
	BRL.w CODE_A4DE39

CODE_A4DDB5:
	CMP.b #$00
	BNE.b CODE_A4DDD0
	REP.b #$20
	LDA.w #$FFFF
	STA.w $16A2
	STZ.w $16A4
	STZ.w $16AC
	SEP.b #$20
	LDA.b #$96
	STA.w $16B1
	PLB
CODE_A4DDCF:
	RTL

CODE_A4DDD0:
	SEP.b #$20
	CMP.b #$01
	BNE.b CODE_A4DE07
	INX
	LDA.w $0000,x
	REP.b #$20
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.w $16A8
	STA.w $16A6
	INX
	SEP.b #$20
	LDA.w $0000,x
	REP.b #$20
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.w $16AA
	INX
	INC.w $16AC
	INC.w $16AC
	INC.w $16AC
	BRA.b CODE_A4DD9F

CODE_A4DE05:
	SEP.b #$20
CODE_A4DE07:
	CMP.b #$0A
	BNE.b CODE_A4DE24
	REP.b #$20
	INX
	INC.w $16AC
	REP.b #$20
	LDA.w $16AA
	CLC
	ADC.w #$0008
	STA.w $16AA
	JSR.w CODE_A4DE8A
	BRA.b CODE_A4DE7A

CODE_A4DE22:
	SEP.b #$20
CODE_A4DE24:
	CMP.b #$0D
	BNE.b CODE_A4DE39
	REP.b #$20
	INX
	INC.w $16AC
	REP.b #$20
	LDA.w $16A6
	STA.w $16A8
	BRL.w CODE_A4DD9F

CODE_A4DE39:
	REP.b #$20
	LDA.w $16A8
	STA.w $1622
	LDA.w $16AA
	STA.w $1624
	SEP.b #$20
	LDA.w $0000,x
	REP.b #$20
	AND.w #$00FF
	SEC
	SBC.w #$0020
	BEQ.b CODE_A4DE85
	CLC
	ADC.w #$3E00
	STA.w $1626
	LDA.w $16AE
	INC.w $16AC
	INC.w $16AE
	JSL.l CODE_A4D5CC
CODE_A4DE6B:
	REP.b #$20
	LDA.w $16A8
	CLC
	ADC.w #$0008
	STA.w $16A8
	JSR.w CODE_A4DE8A
CODE_A4DE7A:
	SEP.b #$20
	LDA.b #$FF
	STA.w $1632
	SEP.b #$20
	PLB
	RTL

CODE_A4DE85:
	INC.w $16AC
	BRA.b CODE_A4DE6B

CODE_A4DE8A:
	REP.b #$20
	LDA.w $16A8
	STA.w $1622
	LDA.w $16AA
	STA.w $1624
	LDA.w #$3E3B
	STA.w $1626
	LDA.w $16AE
	JSL.l CODE_A4D5CC
	RTS

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

CODE_A4DEA6:
	SEP.b #$20
	LDA.w $16B0
	BEQ.b CODE_A4DEB5
	REP.b #$30
	LDA.w $16A4
	BEQ.b CODE_A4DEB5
	RTL

CODE_A4DEB5:
	SEP.b #$20
	PHB
	LDA.b #DATA_A4DFFE>>16
	PHA
	PLB
	LDA.b #$FF
	STA.w $16B0
	REP.b #$30
	LDX.w #$1530
	LDY.w $16AE
	BEQ.b CODE_A4DF0A
	INY
	SEP.b #$20
	LDA.w $16B1
	BEQ.b CODE_A4DED8
	DEC.w $16B1
	BRA.b CODE_A4DF0A

CODE_A4DED8:
	LDA.w $0000,x
	CMP.b #$18
	BEQ.b CODE_A4DEEB
	DEC
	DEC
	DEC
	DEC
	STA.w $0000,x
	STZ.w $16B0
	BRA.b CODE_A4DEF0

CODE_A4DEEB:
	LDA.b #$E6
	STA.w $0001,x
CODE_A4DEF0:
	INX
	INX
	INX
	INX
	DEY
	BNE.b CODE_A4DED8
	SEP.b #$20
	LDA.w $16B0
	BEQ.b CODE_A4DF0A
	LDA.b #$96
	STA.w $16B1
	REP.b #$20
	STZ.w $16AE
	PLB
	RTL

CODE_A4DF0A:
	PLB
	RTL

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

CODE_A4DF0C:
	RTL

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

CODE_A4DF0D:					; Note: Routine that initializes an interior message
	REP.b #$30
	PHY
	CMP.w $16A2
	BEQ.b CODE_A4DF28
	SEP.b #$20
	STZ.w $16B0
	STZ.w $16B1
	REP.b #$20
	STA.w $16A4
	STA.w $16A2
	STZ.w $16AC
CODE_A4DF28:
	PLY
	RTL

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

ADDR_A4DF2A:
	REP.b #$30
	PHY
	CMP.w $16A2
	BEQ.b ADDR_A4DF45
	SEP.b #$20
	STZ.w $16B0
	STZ.w $16B1
	REP.b #$20
	STA.w $16A4
	STA.w $16A2
	STZ.w $16AC
ADDR_A4DF45:
	PLY
	RTL

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

CODE_A4DF47:
	REP.b #$30
	LDA.w !RAM_JP_Global_VisitorCenterSecuredLo
	BEQ.b CODE_A4DF70
	LDA.w !RAM_JP_Global_ShipObjectivesClearFlagLo
	BNE.b CODE_A4DF70
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	CMP.w #!Define_JP_InteriorFloorID_ShipEntryLevel
	BEQ.b CODE_A4DF6F
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel1
	BEQ.b CODE_A4DF6F
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel2
	BEQ.b CODE_A4DF6F
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel3
	BEQ.b CODE_A4DF6F
	CMP.w #!Define_JP_InteriorFloorID_ShipSubLevel4
	BNE.b CODE_A4DF70
CODE_A4DF6F:
	RTL

CODE_A4DF70:
	REP.b #$30
	LDA.w !RAM_JP_Interior_CurrentAreaLo
	ASL
	TAX
	LDA.l DATA_A4DF80,x
	JSL.l CODE_A4DF0D
	RTL

DATA_A4DF80:
	dw $0000,DATA_A4DFFE,DATA_A4E026,DATA_A4EB41,DATA_A4EB63,DATA_A4E045,DATA_A4E06D,DATA_A4E096
	dw DATA_A4E0AF,DATA_A4E0D2,DATA_A4E0F4,DATA_A4E107,DATA_A4E127,DATA_A4E146,DATA_A4E165,DATA_A4EB87
	dw DATA_A4EBA6,DATA_A4E184,DATA_A4E1AA,DATA_A4E1CF,DATA_A4E1F4,DATA_A4E20D,DATA_A4E226,DATA_A4E23F

DATA_A4DFB0:
	dw DATA_A4E4B3,DATA_A4E4E5,DATA_A4E517,DATA_A4E54B,DATA_A4E57B,DATA_A4E5AF,DATA_A4E5DF,DATA_A4E611
	dw DATA_A4E63D

DATA_A4DFC2:
	db "00"
	db "01"
	db "02"
	db "03"
	db "04"
	db "05"
	db "06"
	db "07"
	db "08"
	db "09"
	db "10"
	db "11"
	db "12"
	db "13"
	db "14"
	db "15"
	db "16"
	db "17"
	db "18"
	db "19"
	db "20"
	db "21"
	db "22"
	db "23"
	db "24"
	db "25"
	db "26"
	db "27"
	db "28"
	db "29"

DATA_A4DFFE:
	db $01
	db $05
	db $08
	db "NORTH UTILITY SHED"
	db $0D
	db $0A
	db $0A
	db "GROUND LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E026:
	db $01
	db $05
	db $08
	db "RAPTOR PEN"
	db $0D
	db $0A
	db $0A
	db "ENTRY LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E045:
	db $01
	db $05
	db $08
	db "BEACH UTILITY SHED"
	db $0D
	db $0A
	db $0A
	db "GROUND LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E06D:
	db $01
	db $05
	db $08
	db "NUBLAR UTILITY SHED"
	db $0D
	db $0A
	db $0A
	db "GROUND LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E096:
	db $01
	db $05
	db $08
	db "SHIP"
	db $0D
	db $0A
	db $0A
	db "ENTRY LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E0AF:
	db $01
	db $05
	db $08
	db "RAPTOR NEST"
	db $0D
	db $0A
	db $0A
	db "NORTH ENTRANCE"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E0D2:
	db $01
	db $05
	db $08
	db "RAPTOR NEST"
	db $0D
	db $0A
	db $0A
	db "EAST ENTRANCE"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E0F4:
	db $01
	db $05
	db $08
	db "SECRET LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E107:
	db $01
	db $05
	db $08
	db "RAPTOR PEN"
	db $0D
	db $0A
	db $0A
	db "GROUND LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E127:
	db $01
	db $05
	db $08
	db "RAPTOR PEN"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL 1"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E146:
	db $01
	db $05
	db $08
	db "RAPTOR PEN"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL 2"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E165:
	db $01
	db $05
	db $08
	db "RAPTOR PEN"
	db $0D
	db $0A
	db $0A
	db "UPPER LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E184:
	db $01
	db $05
	db $08
	db "NUBLAR UTILITY SHED"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E1AA:
	db $01
	db $05
	db $08
	db "BEACH UTILITY SHED"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E1CF:
	db $01
	db $05
	db $08
	db "NORTH UTILITY SHED"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E1F4:
	db $01
	db $05
	db $08
	db "SHIP"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL 1"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E20D:
	db $01
	db $05
	db $08
	db "SHIP"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL 2"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E226:
	db $01
	db $05
	db $08
	db "SHIP"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL 3"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E23F:
	db $01
	db $05
	db $08
	db "SHIP"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL 4"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E258:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "JOHN HAMMOND'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E291:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "ELLIE SATTLER'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E2CB:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "ROBERT MULDOON'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E306:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "ALAN GRANT'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E33D:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "DONALD GENNARO'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E378:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "RAY ARNOLD'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E3AF:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "DENNIS NEDRY'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E3E8:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "DR. WU'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E41B:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "IAN MALCOLM'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E453:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "SECURITY LEVEL 1"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E483:
	db $01
	db $05
	db $08
	db "ACCESS DENIED"
	db $0D
	db $0A
	db "YOU NEED"
	db $0D
	db $0A
	db "SECURITY LEVEL 2"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E4B3:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "JOHN HAMMOND'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E4E5:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "ELLIE SATLER'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E517:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "ROBERT MULDOON'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E54B:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "ALAN GRANT'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E57B:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "DONALD GENNARO'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E5AF:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "RAY ARNOLD'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E5DF:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "DENNIS NEDRY'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E611:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "DR. WU'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E63D:
	db $01
	db $05
	db $08
	db "YOU HAVE LOCATED"
	db $0D
	db $0A
	db "IAN MALCOLM'S"
	db $0D
	db $0A
	db "I.D. CARD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E66E:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND A"
	db $0D
	db $0A
	db "GAS GRENADE LAUNCHER"
	db $0D
	db $0A
	db "AND AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E6AB:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND"
	db $0D
	db $0A
	db "GAS GRENADE LAUNCHER"
	db $0D
	db $0A
	db "AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E6E2:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND A"
	db $0D
	db $0A
	db "SHOTGUN"
	db $0D
	db $0A
	db "AND AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E712:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND"
	db $0D
	db $0A
	db "SHOTGUN"
	db $0D
	db $0A
	db "AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E73C:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND A"
	db $0D
	db $0A
	db "DARTGUN"
	db $0D
	db $0A
	db "AND AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E76C:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND"
	db $0D
	db $0A
	db "DARTGUN"
	db $0D
	db $0A
	db "AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E796:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND A"
	db $0D
	db $0A
	db "ROCKET LAUNCHER"
	db $0D
	db $0A
	db "AND AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E7CE:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND"
	db $0D
	db $0A
	db "ROCKET LAUNCHER"
	db $0D
	db $0A
	db "AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E800:
	db $01
	db $05
	db $08
	db "NIGHT VISION GOGGLES"
	db $0D
	db $0A
	db "ACTIVATED"
	db $0D
	db $0A
	db $0A
	db "BATTERY CHARGED"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E838:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND A"
	db $0D
	db $0A
	db "CANISTER OF NERVE GAS"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E866:
	db $01
	db $05
	db $08
	db "NERVE GAS DEPLOYED."
	db $0D
	db $0A
	db "VACATE RAPTOR NEST"
	db $0D
	db $0A
	db "IMMEDIATELY."
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E8A2:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND A"
	db $0D
	db $0A
	db "BOLAS SNARE RIFLE"
	db $0D
	db $0A
	db "AND AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E8DC:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND"
	db $0D
	db $0A
	db "BOLAS SNARE RIFLE"
	db $0D
	db $0A
	db "AMMUNITION"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E910:
	db $01
	db $05
	db $08
	db "YOU HAVE FOUND"
	db $0D
	db $0A
	db "SOME FOOD"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E930:
	db $01
	db $05
	db $08
	db "ENERGY INCREASED"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E947:
	db $01
	db $0C
	db $08
	db "WARNING!"
	db $01
	db $06
	db $0A
	db "NIGHT VISION GOGGLES"
	db $01
	db $05
	db $0B
	db "REQUIRED FOR THIS AREA"
	db $0D
	db $0A
	db $00

DATA_A4E985:
	db $01
	db $05
	db $08
	db "KITCHEN"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E993:
	db $01
	db $05
	db $08
	db "INCUBATOR ROOM"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E9A8:
	db $01
	db $05
	db $08
	db "GENERATOR ROOM"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E9BD:
	db $01
	db $05
	db $08
	db "LABORATORY"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E9CE:
	db $01
	db $05
	db $08
	db "CONTROL ROOM"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E9E1:
	db $01
	db $05
	db $08
	db "REFRIDGERATOR"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4E9F5:
	db $01
	db $05
	db $08
	db "RESTAURANT"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EA06:
	db $01
	db $0D
	db $0D
	db "PAUSED"
	db $0D
	db $0A
	db $00

DATA_A4EA12:
	db $01
	db $0A
	db $08
	db "( BUTTON A"
	db $01
	db $0C
	db $09
	db "LEFT MOUSE"
	db $01
	db $0A
	db $0B
	db ") BUTTON B"
	db $01
	db $0C
	db $0C
	db "RIGHT MOUSE"
	db $01
	db $06
	db $0E
	db "EXIT: SELECT"
	db $01
	db $05
	db $0F
	db $0D
	db $0A
	db $00

DATA_A4EA5C:
	db $01
	db $0A
	db $08
	db ") BUTTON B"
	db $01
	db $0C
	db $09
	db "RIGHT MOUSE"
	db $01
	db $06
	db $0B
	db "EXIT: SELECT"
	db $01
	db $05
	db $0C
	db $0D
	db $0A
	db $00

DATA_A4EA8C:
	db $01
	db $0A
	db $08
	db "( BUTTON A"
	db $01
	db $0C
	db $09
	db "LEFT MOUSE"
	db $01
	db $06
	db $0B
	db "EXIT: SELECT"
	db $01
	db $05
	db $0C
	db $0D
	db $0A
	db $00

DATA_A4EABB:
	db $01
	db $05
	db $08
	db "GENERATOR POWER ON"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EAD4:
	db $01
	db $05
	db $08
	db "GOOD ALAN..."
	db $0D
	db $0A
	db $0A
	db "THE SHIP IS"
	db $0D
	db $0A
	db "FREE OF DINOS"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EB04:
	db $01
	db $05
	db $08
	db "00 DINOS LEFT ON"
	db $0D
	db $0A
	db "THIS LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EB27:
	db $01
	db $05
	db $08
	db "MAIN POWER RESTORED"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EB41:
	db $01
	db $05
	db $08
	db "VISITOR CENTER"
	db $0D
	db $0A
	db $0A
	db "ROOF LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EB63:
	db $01
	db $05
	db $08
	db "VISITOR CENTER"
	db $0D
	db $0A
	db $0A
	db "GROUND LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EB87:
	db $01
	db $05
	db $08
	db "VISITOR CENTER"
	db $0D
	db $0A
	db $0A
	db "FLOOR 1"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EBA6:
	db $01
	db $05
	db $08
	db "VISITOR CENTER"
	db $0D
	db $0A
	db $0A
	db "SUB LEVEL"
	db $0D
	db $0A
	db $0A
	db $00

DATA_A4EBC7:
	db $01
	db $05
	db $08
	db "THE RAPTORS HAVE"
	db $0D
	db $0A
	db "STOPPED ENTERING THE"
	db $0D
	db $0A
	db "VISITOR CENTER"
	db $0D
	db $0A
	db $0A
	db $00

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

DATA_A4EC04:
	db "START OF MOUSE BIOS"

CODE_A4EC17:
	PHP
	SEP.b #$30
CODE_A4EC1A:
	LDA.l !REGISTER_HVBlankFlagsAndJoypadStatus
	AND.b #$01
	BNE.b CODE_A4EC1A
	LDX.b #$01
	LDA.l !REGISTER_Joypad2Lo
	JSR.w CODE_A4EC4D
	LDA.w $167D
	BEQ.b CODE_A4EC38
	JSR.w CODE_A4ECAC
	STZ.w $167D
	PLP
	RTL

CODE_A4EC38:
	DEX
	LDA.l !REGISTER_Joypad1Lo
	JSR.w CODE_A4EC4D
	LDA.w $167C
	BEQ.b CODE_A4EC4B
	JSR.w CODE_A4ECAC
	STZ.w $167C
CODE_A4EC4B:
	PLP
	RTL

CODE_A4EC4D:
	STA.w $1667
	AND.b #$0F
	CMP.b #$01
	BEQ.b CODE_A4EC69
	STZ.w $166A,x
	STZ.w $1672,x
	STZ.w $1670,x
	STZ.w $1674,x
	STZ.w $1676,x
	STZ.w $1678,x
	RTS

CODE_A4EC69:
	LDA.w $166A,x
	BNE.b CODE_A4EC77
	LDA.b #$01
	STA.w $166A,x
	STA.w $167C,x
	RTS

CODE_A4EC77:
	LDY.b #$10
CODE_A4EC79:
	LDA.l !REGISTER_JoypadSerialPort1,x
	LSR
	ROL.w $1672,x
	ROL.w $1670,x
	DEY
	BNE.b CODE_A4EC79
	STZ.w $1674,x
	ROL.w $1667
	ROL.w $1674,x
	ROL.w $1667
	ROL.w $1674,x
	LDA.w $1674,x
	EOR.w $1678,x
CODE_A4EC9A:
	BNE.b CODE_A4ECA2
	STZ.w $1676,x
	RTS

CODE_A4ECA2:
	LDA.w $1674,x
	STA.w $1676,x
	STA.w $1678,x
	RTS

CODE_A4ECAC:
	PHP
	SEP.b #$30
	LDA.w $1669,x
	BEQ.b CODE_A4ECFE
	LDA.b #$10
	STA.w $1668
CODE_A4ECB9:
	LDA.b #$01
	STA.l !REGISTER_JoypadSerialPort1
	LDA.l !REGISTER_JoypadSerialPort1,x
	LDA.b #$00
	STA.l !REGISTER_JoypadSerialPort1
	LDA.b #$01
	STA.l !REGISTER_JoypadSerialPort1
	LDA.b #$00
	STA.l !REGISTER_JoypadSerialPort1
	STA.w $166E,x
	LDY.b #$0A
CODE_A4ECDA:
	LDA.l !REGISTER_JoypadSerialPort1,x
	DEY
	BNE.b CODE_A4ECDA
	LDA.l !REGISTER_JoypadSerialPort1,x
	LSR
	ROL.w $166E,x
	LDA.l !REGISTER_JoypadSerialPort1,x
	LSR
	ROL.w $166E,x
	LDA.w $166E,x
	CMP.w $166C,x
	BEQ.b CODE_A4ED03
	DEC.w $1668
	BNE.b CODE_A4ECB9
CODE_A4ECFE:
	LDA.b #$80
	STA.w $166E,x
CODE_A4ED03:
	PLP
	RTS

DATA_A4ED05:
	db "MODIFIED FROM SHVC MOUSE BIOS Ver1.00END OF MOUSE BIOS"

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

CODE_A4ED3B:
	SEP.b #$20
	LDA.b #$0A
	STA.l !REGISTER_APUPort0
	JSR.w CODE_A4EFD6
	RTL

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

CODE_A4ED47:
	SEP.b #$20
	SEP.b #$30
	LDA.b #$FF
	STA.w $02F9
	LDA.w $02F3
CODE_A4ED53:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4ED53
	SEP.b #$20
	LDA.b #$0B
	STA.l !REGISTER_APUPort0
	REP.b #$30
	LDY.w #DATA_BEE361>>16
	LDX.w #DATA_BEE361
	JSR.w CODE_A4EFD6
	SEP.b #$30
	LDA.b #$80
CODE_A4ED70:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4ED70
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	SEP.b #$30
	LDA.w $02F3
CODE_A4ED83:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4ED83
	SEP.b #$20
	LDA.b #$0B
	STA.l !REGISTER_APUPort0
	REP.b #$30
	LDY.w #DATA_BD8000>>16
	LDX.w #DATA_BD8000
	JSR.w CODE_A4EFD6
	SEP.b #$30
	LDA.b #$80
CODE_A4EDA0:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EDA0
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	JSR.w CODE_A4EDC5
	REP.b #$30
	LDY.w #$A0FF
	LDA.w #!Define_JP_SoundCommand_Unknown01+($01<<8)
	JSL.l CODE_A4EF83
	SEP.b #$20
	LDA.b #$00
	STA.w $02F9
	RTL

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

CODE_A4EDC5:
	REP.b #$30
	LDA.w #!Define_JP_SoundCommand_Unknown02+($88<<8)
	LDY.w #$0000
	JSL.l CODE_A4EF83
	REP.b #$30
	LDA.w $037B
	LDY.w #$0000
	JSL.l CODE_A4EF83
	RTS

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

CODE_A4EDDE:
	REP.b #$30
	PHX
	SEP.b #$30
	LDA.b #$FF
	STA.w $02F9
	LDA.w $02F3
CODE_A4EDEB:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EDEB
	SEP.b #$20
	LDA.b #$0B
	STA.l !REGISTER_APUPort0
	REP.b #$30
	LDA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	AND.w #$0001
	BEQ.b CODE_A4EE0B
	LDY.w #DATA_BB8000>>16
	LDX.w #DATA_BB8000
	BRA.b CODE_A4EE11

CODE_A4EE0B:
	LDY.w #DATA_BC8000>>16
	LDX.w #DATA_BC8000
CODE_A4EE11:
	EOR.w #$FFFF
	STA.w !RAM_JP_Interior_ElevatorMusicToUseLo
	JSR.w CODE_A4EFD6
	SEP.b #$30
	LDA.b #$80
CODE_A4EE1E:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EE1E
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	JSR.w CODE_A4EDC5
	REP.b #$30
	LDY.w #$80FF
	LDA.w #!Define_JP_SoundCommand_Unknown01+($01<<8)
	JSL.l CODE_A4EF83
	SEP.b #$20
	LDA.b #$00
	STA.w $02F9
	REP.b #$30
	PLX
	RTL

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

CODE_A4EE46:
	REP.b #$30
	PHX
	SEP.b #$30
	LDA.w $02F3
CODE_A4EE4E:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EE4E
	SEP.b #$20
	LDA.b #$0B
	STA.l !REGISTER_APUPort0
	REP.b #$30
	LDY.w #DATA_BD8000>>16
	LDX.w #DATA_BD8000
	JSR.w CODE_A4EFD6
	SEP.b #$30
	LDA.b #$80
CODE_A4EE6B:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EE6B
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	JSR.w CODE_A4EDC5
	REP.b #$30
	LDY.w #$A0FF
	LDA.w #!Define_JP_SoundCommand_Unknown01+($01<<8)
	JSL.l CODE_A4EF83
	SEP.b #$20
	LDA.b #$00
	STA.w $02F9
	REP.b #$30
	PLX
	RTL

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

CODE_A4EE93:
	LDA.w $02F3
CODE_A4EE96:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EE96
	SEP.b #$20
	LDA.b #$0B
	STA.l !REGISTER_APUPort0
	REP.b #$30
	LDY.w #DATA_BFD6D8>>16
	LDX.w #DATA_BFD6D8
	JSR.w CODE_A4EFD6
	SEP.b #$30
	LDA.b #$80
CODE_A4EEB3:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EEB3
	STA.l !REGISTER_APUPort0
	INC
	STA.w $02F3
	REP.b #$30
	LDY.w #$00FF
	LDA.w #!Define_JP_SoundCommand_Unknown01+($00<<8)
	JSL.l CODE_A4EF83
	RTL

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

CODE_A4EECE:
	REP.b #$30
	LDA.w #$4003
	LDY.w #$0000
CODE_A4EED6:
	PHP
	PHA
	PHY
	SEP.b #$20
	LDA.b #$FF
	STA.w $02F9
	LDA.w $02F3
CODE_A4EEE3:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EEE3
	INC
	AND.b #$8F
	STA.w $02F3
	REP.b #$20
	PLA
	STA.l !REGISTER_APUPort2
	LDA.w !RAM_JP_Global_MusicSetting
	BNE.b CODE_A4EF0D
	PLA
	SEP.b #$20
	XBA
	STA.l !REGISTER_APUPort1
	XBA
	STA.l !REGISTER_APUPort0
	STZ.w $02F9
	PLP
	RTL

CODE_A4EF0D:
	PLA
	SEP.b #$20
	XBA
	STA.l !REGISTER_APUPort1
	XBA
	CMP.b #$01
	BNE.b CODE_A4EF22
	PHA
	LDA.b #$00
	STA.l !REGISTER_APUPort1
	PLA
CODE_A4EF22:
	STA.l !REGISTER_APUPort0
	STZ.w $02F9
	PLP
	RTL

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

CODE_A4EF2B:
	SEP.b #$20
	LDA.w $02F9
	BNE.b CODE_A4EF82
	REP.b #$10
	LDX.w $02F7
	CPX.w !RAM_JP_Global_SoundTableIndexLo
	BEQ.b CODE_A4EF82
	LDA.w $02F3
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EF82
	INC
	AND.b #$8F
	STA.w $02F3
	LDA.w JP_Global_SoundTable[$00].YPosLo,x
	STA.l !REGISTER_APUPort3
	LDA.w JP_Global_SoundTable[$00].XPosLo,x
	STA.l !REGISTER_APUPort2
	LDA.w JP_Global_SoundTable[$00].PosHi,x
	STA.l !REGISTER_APUPort1
	LDA.w !RAM_JP_Global_MusicSetting
	BEQ.b CODE_A4EF72
	LDA.w JP_Global_SoundTable[$00].ID,x
	CMP.b #$01
	BNE.b CODE_A4EF72
	LDA.b #$00
	STA.l !REGISTER_APUPort1
CODE_A4EF72:
	LDA.w JP_Global_SoundTable[$00].ID,x
	STA.l !REGISTER_APUPort0
	TXA
	CLC
	ADC.b #$04
	AND.b #$7F
	STA.w $02F7
CODE_A4EF82:
	RTL

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

; Note: Routine that sets the sound ID and position of sounds to play (interior areas)

CODE_A4EF83:
	PHX
	LDX.w !RAM_JP_Global_SoundTableIndexLo
	STA.w JP_Global_SoundTable[$00].ID,x
	TYA
	STA.w JP_Global_SoundTable[$00].XPosLo,x
	TXA
	CLC
	ADC.w #$0004
	AND.w #$007F
	STA.w !RAM_JP_Global_SoundTableIndexLo
	PLX
	RTL

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

CODE_A4EF9B:
	PHX
	LDX.w !RAM_JP_Global_SoundTableIndexLo
	SEP.b #$20
	STA.w JP_Global_SoundTable[$00].ID,x
	LDA.w $1740
	ASL
	ASL
	ASL
	ASL
	AND.b #$F0
	STA.w $1740
	LDA.w $1742
	AND.b #$0F
	ORA.w $1740
	STA.w JP_Global_SoundTable[$00].PosHi,x
	LDA.w $173F
	STA.w JP_Global_SoundTable[$00].XPosLo,x
	LDA.w $1741
	STA.w JP_Global_SoundTable[$00].YPosLo,x
	REP.b #$20
	TXA
	CLC
	ADC.w #$0004
	AND.w #$007F
	STA.w !RAM_JP_Global_SoundTableIndexLo
	PLX
	RTL

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

CODE_A4EFD6:
	STY.b $48
	STX.b $46
	JSR.w CODE_A4EFE0
	SEP.b #$20
	RTS

CODE_A4EFE0:
	PHP
	REP.b #$30
	LDY.w #$0000
	LDA.w #$BBAA
CODE_A4EFE9:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4EFE9
	SEP.b #$20
	LDA.b #$CC
	BRA.b CODE_A4F01E

CODE_A4EFF5:
	LDA.b [$46],y
	INY
	XBA
	LDA.b #$00
	BRA.b CODE_A4F009

CODE_A4EFFD:
	XBA
	LDA.b [$46],y
	INY
	XBA
CODE_A4F002:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4F002
	INC
CODE_A4F009:
	REP.b #$20
	STA.l !REGISTER_APUPort0
	SEP.b #$20
	DEX
	BNE.b CODE_A4EFFD
CODE_A4F014:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4F014
CODE_A4F01A:
	ADC.b #$03
	BEQ.b CODE_A4F01A
CODE_A4F01E:
	PHA
	REP.b #$20
	LDA.b [$46],y
	INY
	INY
	TAX
	LDA.b [$46],y
	INY
	INY
	STA.l !REGISTER_APUPort2
	SEP.b #$20
	CPX.w #$0001
	LDA.b #$00
	ROL
	STA.l !REGISTER_APUPort1
	ADC.b #$7F
	PLA
	STA.l !REGISTER_APUPort0
CODE_A4F041:
	CMP.l !REGISTER_APUPort0
	BNE.b CODE_A4F041
	BVS.b CODE_A4EFF5
	PLP
	RTS

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

CODE_A4F04B:
	JSR.w CODE_A48A6D
	JSL.l CODE_A4B5ED
	BRA.b CODE_A4F057

CODE_A4F054:
	JSR.w CODE_A48A6D
CODE_A4F057:
	SEP.b #$20
CODE_A4F059:
	LDA.b $79
	BNE.b CODE_A4F059
	LDA.b $BF
	EOR.b #$FF
	STA.b $BF
	JSL.l CODE_A489DB
	STZ.w $16E7
	JSL.l CODE_A49147
	LDA.l !RAM_JP_Interior_CurrentRoom
	STA.l $000069
	STA.l $0000EC
	JSL.l CODE_A4BD79
CODE_A4F07E:
	SEP.b #$20
	DEC.b $79
	JSL.l CODE_A4B97F
	JSL.l CODE_A48CC2
	JSL.l CODE_A48E68
CODE_A4F08E:
	JSR.w CODE_A4895C
	REP.b #$30
	LDA.w $173D
	INC
	STA.w $173D
	REP.b #$20
	LDA.b $6F
	INC
	CMP.w #$0006
	BNE.b CODE_A4F0A7
	LDA.w #$0000
CODE_A4F0A7:
	STA.b $6F
	RTL

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

DATA_A4F0AA:
	db $00,$00,$00,$00,$01,$01,$01,$01,$01,$02,$02,$02,$02,$02,$02,$03
	db $03,$03,$03,$03,$04,$04,$04,$04,$04,$05,$05,$05,$05,$05,$06,$06
	db $06,$06,$06,$07,$07,$07,$07,$07,$08,$08,$08,$08,$08,$08,$09,$09
	db $09,$09,$09,$0A,$0A,$0A,$0A,$0A,$0B,$0B,$0B,$0B,$0B,$0C,$0C,$0C
	db $0C,$0C,$0D,$0D,$0D,$0D,$0D,$0D,$0E,$0E,$0E,$0E,$0E,$0F,$0F,$0F
	db $0F,$0F,$10,$10,$10,$10,$10,$10,$11,$11,$11,$11,$11,$12,$12,$12
	db $12,$12,$13,$13,$13,$13,$13,$13,$14,$14,$14,$14,$14,$15,$15,$15
	db $15,$15,$16,$16,$16,$16,$16,$16,$17,$17,$17,$17,$17,$18,$18,$18
	db $18,$18,$18,$19,$19,$19,$19,$19,$19,$1A,$1A,$1A,$1A,$1A,$1B,$1B
	db $1B,$1B,$1B,$1B,$1C,$1C,$1C,$1C,$1C,$1C,$1D,$1D,$1D,$1D,$1D,$1E
	db $1E,$1E,$1E,$1E,$1E,$1F,$1F,$1F,$1F,$1F,$1F,$20,$20,$20,$20,$20
	db $20,$21,$21,$21,$21,$21,$21,$22,$22,$22,$22,$22,$22,$23,$23,$23
	db $23,$23,$23,$24,$24,$24,$24,$24,$24,$24,$25,$25,$25,$25,$25,$25
	db $26,$26,$26,$26,$26,$26,$27,$27,$27,$27,$27,$27,$27,$28,$28,$28
	db $28,$28,$28,$28,$29,$29,$29,$29,$29,$29,$2A,$2A,$2A,$2A,$2A,$2A
	db $2A,$2B,$2B,$2B,$2B,$2B,$2B,$2B,$2C,$2C,$2C,$2C,$2C,$2C,$2C,$2D
	db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2E,$2E,$2E,$2E,$2E,$2E,$2E,$2F,$2F
	db $2F,$2F,$2F,$2F,$2F,$2F,$30,$30,$30,$30,$30,$30,$30,$30,$31,$31
	db $31,$31,$31,$31,$31,$31,$32,$32,$32,$32,$32,$32,$32,$32,$33,$33
	db $33,$33,$33,$33,$33,$33,$33,$34,$34,$34,$34,$34,$34,$34,$34,$34
	db $35,$35,$35,$35,$35,$35,$35,$35,$35,$36,$36,$36,$36,$36,$36,$36
	db $36,$36,$36,$37,$37,$37,$37,$37,$37,$37,$37,$37,$37,$37,$38,$38
	db $38,$38,$38,$38,$38,$38,$38,$38,$38,$39,$39,$39,$39,$39,$39,$39
	db $39,$39,$39,$39,$39,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A
	db $3A,$3A,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B
	db $3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C
	db $3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D
	db $3D,$3D,$3D,$3D,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E
	db $3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3F,$3F
	db $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
	db $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
	db $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
	db $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
	db $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
	db $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
	db $3F,$3F,$3F,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E
	db $3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3E,$3D,$3D,$3D
	db $3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D
	db $3D,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C
	db $3C,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B,$3A
	db $3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A,$39,$39,$39,$39
	db $39,$39,$39,$39,$39,$39,$39,$39,$38,$38,$38,$38,$38,$38,$38,$38
	db $38,$38,$38,$37,$37,$37,$37,$37,$37,$37,$37,$37,$37,$37,$36,$36
	db $36,$36,$36,$36,$36,$36,$36,$36,$35,$35,$35,$35,$35,$35,$35,$35
	db $35,$34,$34,$34,$34,$34,$34,$34,$34,$34,$33,$33,$33,$33,$33,$33
	db $33,$33,$33,$32,$32,$32,$32,$32,$32,$32,$32,$31,$31,$31,$31,$31
	db $31,$31,$31,$30,$30,$30,$30,$30,$30,$30,$30,$2F,$2F,$2F,$2F,$2F
	db $2F,$2F,$2F,$2E,$2E,$2E,$2E,$2E,$2E,$2E,$2D,$2D,$2D,$2D,$2D,$2D
	db $2D,$2D,$2C,$2C,$2C,$2C,$2C,$2C,$2C,$2B,$2B,$2B,$2B,$2B,$2B,$2B
	db $2A,$2A,$2A,$2A,$2A,$2A,$2A,$29,$29,$29,$29,$29,$29,$28,$28,$28
	db $28,$28,$28,$28,$27,$27,$27,$27,$27,$27,$27,$26,$26,$26,$26,$26
	db $26,$25,$25,$25,$25,$25,$25,$24,$24,$24,$24,$24,$24,$24,$23,$23
	db $23,$23,$23,$23,$22,$22,$22,$22,$22,$22,$21,$21,$21,$21,$21,$21
	db $20,$20,$20,$20,$20,$20,$1F,$1F,$1F,$1F,$1F,$1F,$1E,$1E,$1E,$1E
	db $1E,$1E,$1D,$1D,$1D,$1D,$1D,$1C,$1C,$1C,$1C,$1C,$1C,$1B,$1B,$1B
	db $1B,$1B,$1B,$1A,$1A,$1A,$1A,$1A,$19,$19,$19,$19,$19,$19,$18,$18
	db $18,$18,$18,$18,$17,$17,$17,$17,$17,$16,$16,$16,$16,$16,$16,$15
	db $15,$15,$15,$15,$14,$14,$14,$14,$14,$13,$13,$13,$13,$13,$13,$12
	db $12,$12,$12,$12,$11,$11,$11,$11,$11,$10,$10,$10,$10,$10,$10,$0F
	db $0F,$0F,$0F,$0F,$0E,$0E,$0E,$0E,$0E,$0D,$0D,$0D,$0D,$0D,$0D,$0C
	db $0C,$0C,$0C,$0C,$0B,$0B,$0B,$0B,$0B,$0A,$0A,$0A,$0A,$0A,$09,$09
	db $09,$09,$09,$08,$08,$08,$08,$08,$08,$07,$07,$07,$07,$07,$06,$06
	db $06,$06,$06,$05,$05,$05,$05,$05,$04,$04,$04,$04,$04,$03,$03,$03
	db $03,$03,$02,$02,$02,$02,$02,$02,$01,$01,$01,$01,$01,$00,$00,$00
	db $00,$00,$00,$00,$FF,$FF,$FF,$FF,$FF,$FE,$FE,$FE,$FE,$FE,$FE,$FD
	db $FD,$FD,$FD,$FD,$FC,$FC,$FC,$FC,$FC,$FB,$FB,$FB,$FB,$FB,$FA,$FA
	db $FA,$FA,$FA,$F9,$F9,$F9,$F9,$F9,$F8,$F8,$F8,$F8,$F8,$F8,$F7,$F7
	db $F7,$F7,$F7,$F6,$F6,$F6,$F6,$F6,$F5,$F5,$F5,$F5,$F5,$F4,$F4,$F4
	db $F4,$F4,$F3,$F3,$F3,$F3,$F3,$F3,$F2,$F2,$F2,$F2,$F2,$F1,$F1,$F1
	db $F1,$F1,$F0,$F0,$F0,$F0,$F0,$F0,$EF,$EF,$EF,$EF,$EF,$EE,$EE,$EE
	db $EE,$EE,$ED,$ED,$ED,$ED,$ED,$ED,$EC,$EC,$EC,$EC,$EC,$EB,$EB,$EB
	db $EB,$EB,$EA,$EA,$EA,$EA,$EA,$EA,$E9,$E9,$E9,$E9,$E9,$E8,$E8,$E8
	db $E8,$E8,$E8,$E7,$E7,$E7,$E7,$E7,$E7,$E6,$E6,$E6,$E6,$E6,$E5,$E5
	db $E5,$E5,$E5,$E5,$E4,$E4,$E4,$E4,$E4,$E4,$E3,$E3,$E3,$E3,$E3,$E2
	db $E2,$E2,$E2,$E2,$E2,$E1,$E1,$E1,$E1,$E1,$E1,$E0,$E0,$E0,$E0,$E0
	db $E0,$DF,$DF,$DF,$DF,$DF,$DF,$DE,$DE,$DE,$DE,$DE,$DE,$DD,$DD,$DD
	db $DD,$DD,$DD,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DB,$DB,$DB,$DB,$DB,$DB
	db $DA,$DA,$DA,$DA,$DA,$DA,$D9,$D9,$D9,$D9,$D9,$D9,$D9,$D8,$D8,$D8
	db $D8,$D8,$D8,$D8,$D7,$D7,$D7,$D7,$D7,$D7,$D6,$D6,$D6,$D6,$D6,$D6
	db $D6,$D5,$D5,$D5,$D5,$D5,$D5,$D5,$D4,$D4,$D4,$D4,$D4,$D4,$D4,$D3
	db $D3,$D3,$D3,$D3,$D3,$D3,$D3,$D2,$D2,$D2,$D2,$D2,$D2,$D2,$D1,$D1
	db $D1,$D1,$D1,$D1,$D1,$D1,$D0,$D0,$D0,$D0,$D0,$D0,$D0,$D0,$CF,$CF
	db $CF,$CF,$CF,$CF,$CF,$CF,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CD,$CD
	db $CD,$CD,$CD,$CD,$CD,$CD,$CD,$CC,$CC,$CC,$CC,$CC,$CC,$CC,$CC,$CC
	db $CB,$CB,$CB,$CB,$CB,$CB,$CB,$CB,$CB,$CA,$CA,$CA,$CA,$CA,$CA,$CA
	db $CA,$CA,$CA,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C8,$C8
	db $C8,$C8,$C8,$C8,$C8,$C8,$C8,$C8,$C8,$C7,$C7,$C7,$C7,$C7,$C7,$C7
	db $C7,$C7,$C7,$C7,$C7,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6
	db $C6,$C6,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5
	db $C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4
	db $C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3
	db $C3,$C3,$C3,$C3,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2
	db $C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C1,$C1
	db $C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1
	db $C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1
	db $C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1
	db $C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1
	db $C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1
	db $C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1,$C1
	db $C1,$C1,$C1,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2
	db $C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C2,$C3,$C3,$C3
	db $C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3,$C3
	db $C3,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4,$C4
	db $C4,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C5,$C6
	db $C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C7,$C7,$C7,$C7
	db $C7,$C7,$C7,$C7,$C7,$C7,$C7,$C7,$C8,$C8,$C8,$C8,$C8,$C8,$C8,$C8
	db $C8,$C8,$C8,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$C9,$CA,$CA
	db $CA,$CA,$CA,$CA,$CA,$CA,$CA,$CA,$CB,$CB,$CB,$CB,$CB,$CB,$CB,$CB
	db $CB,$CC,$CC,$CC,$CC,$CC,$CC,$CC,$CC,$CC,$CD,$CD,$CD,$CD,$CD,$CD
	db $CD,$CD,$CD,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CF,$CF,$CF,$CF,$CF
	db $CF,$CF,$CF,$D0,$D0,$D0,$D0,$D0,$D0,$D0,$D0,$D1,$D1,$D1,$D1,$D1
	db $D1,$D1,$D1,$D2,$D2,$D2,$D2,$D2,$D2,$D2,$D3,$D3,$D3,$D3,$D3,$D3
	db $D3,$D3,$D4,$D4,$D4,$D4,$D4,$D4,$D4,$D5,$D5,$D5,$D5,$D5,$D5,$D5
	db $D6,$D6,$D6,$D6,$D6,$D6,$D6,$D7,$D7,$D7,$D7,$D7,$D7,$D8,$D8,$D8
	db $D8,$D8,$D8,$D8,$D9,$D9,$D9,$D9,$D9,$D9,$D9,$DA,$DA,$DA,$DA,$DA
	db $DA,$DB,$DB,$DB,$DB,$DB,$DB,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DD,$DD
	db $DD,$DD,$DD,$DD,$DE,$DE,$DE,$DE,$DE,$DE,$DF,$DF,$DF,$DF,$DF,$DF
	db $E0,$E0,$E0,$E0,$E0,$E0,$E1,$E1,$E1,$E1,$E1,$E1,$E2,$E2,$E2,$E2
	db $E2,$E2,$E3,$E3,$E3,$E3,$E3,$E4,$E4,$E4,$E4,$E4,$E4,$E5,$E5,$E5
	db $E5,$E5,$E5,$E6,$E6,$E6,$E6,$E6,$E7,$E7,$E7,$E7,$E7,$E7,$E8,$E8
	db $E8,$E8,$E8,$E8,$E9,$E9,$E9,$E9,$E9,$EA,$EA,$EA,$EA,$EA,$EA,$EB
	db $EB,$EB,$EB,$EB,$EC,$EC,$EC,$EC,$EC,$ED,$ED,$ED,$ED,$ED,$ED,$EE
	db $EE,$EE,$EE,$EE,$EF,$EF,$EF,$EF,$EF,$F0,$F0,$F0,$F0,$F0,$F0,$F1
	db $F1,$F1,$F1,$F1,$F2,$F2,$F2,$F2,$F2,$F3,$F3,$F3,$F3,$F3,$F3,$F4
	db $F4,$F4,$F4,$F4,$F5,$F5,$F5,$F5,$F5,$F6,$F6,$F6,$F6,$F6,$F7,$F7
	db $F7,$F7,$F7,$F8,$F8,$F8,$F8,$F8,$F8,$F9,$F9,$F9,$F9,$F9,$FA,$FA
	db $FA,$FA,$FA,$FB,$FB,$FB,$FB,$FB,$FC,$FC,$FC,$FC,$FC,$FD,$FD,$FD
	db $FD,$FD,$FE,$FE,$FE,$FE,$FE,$FE,$FF,$FF,$FF,$FF,$FF,$00,$00,$00

DATA_A4F8AA:
	incbin "InteriorMaps/RaptorPen_SubLevel2_RoomDataPtrs_JP_U1.rnc"

UNK_A4FA72:
	db $40,$3E,$E9,$3F,$08,$0C,$AA,$06,$80,$8F,$6A,$AE,$5E,$EA,$99,$EE
	db $33,$41,$6E,$06,$05,$32,$0D,$06,$80,$5B,$77,$CC,$7A,$C8,$71,$A5
	db $6B,$E0,$E1,$84,$1A,$B8,$6E,$34,$8A,$B9,$06,$8A,$DE,$AE,$CB,$81
	db $5F,$FA,$6F,$81,$81,$1C,$4D,$2F,$79,$91,$74,$01,$1C,$77,$3C,$AE
	db $EF,$B1,$29,$32,$72,$1F,$C9,$C3,$5A,$CD,$D1,$E2,$F4,$1D,$5E,$9A
	db $ED,$1D,$CE,$23,$46,$24,$F7,$A9,$9F,$34,$F3,$F7,$6E,$7E,$41,$29
	db $80,$87,$B9,$09,$C0,$FF,$8D,$04,$9C,$50,$97,$96,$06,$DB,$0A,$C0
	db $DC,$75,$0F,$9C,$E6,$1F,$03,$FD,$1A,$6A,$F6,$A3,$5A,$29,$98,$E6
	db $2E,$E4,$46,$C0,$38,$72,$04,$42,$ED,$D0,$54,$AB,$FB,$D4,$7F,$D4
	db $61,$EA,$24,$EE,$24,$0D,$E7,$E6,$F6,$F6,$24,$FA,$91,$9B,$02,$25
	db $06,$25,$9B,$DB,$0E,$25,$12,$9B,$DB,$1A,$25,$1E,$9B,$DB,$26,$25
	db $2A,$9B,$DB,$32,$25,$36,$9B,$DB,$3E,$25,$42,$9B,$DB,$4A,$25,$4E
	db $9B,$DB,$56,$25,$5A,$9B,$DB,$62,$25,$66,$9B,$DB,$6E,$25,$72,$C7
	db $B9,$7A,$25,$A6,$25,$76,$2E,$20,$F9,$A0,$04,$60,$04,$C9,$A0,$E0
	db $45,$4E,$FA,$A8,$7F,$4E,$51,$EE,$E4,$FB,$84,$20,$E0,$00,$BA,$D6
	db $94,$9A,$FF,$E3,$A9,$89,$C6,$F5,$54,$BC,$06,$AB,$78,$0C,$57,$F1
	db $12,$9E,$E2,$77,$2A,$FF,$32,$96,$0A,$78,$DD,$5F,$74,$2A,$FF,$30
	db $96,$0A,$D1,$2A,$DE,$24,$54,$50,$D2,$2A,$F1,$A6,$D3,$82,$8A,$30
	db $37,$15,$D4,$54,$BC,$36,$A9,$10,$D5

UNK_A4FB9B:					; Note: Unused room data pointers?
	incbin "InteriorMaps/DATA_A4FB9B_JP_U1.rnc"

UNK_A4FBEC:					; Note: Unused map data?
	incbin "InteriorMaps/DATA_A4FBEC_JP_U1.rnc"

UNK_A4FC40:					; Note: Unused room data pointers?
	incbin "InteriorMaps/DATA_A4FC40_JP_U1.rnc"

UNK_A4FCFC:					; Note: Unused map data?
	incbin "InteriorMaps/DATA_A4FCFC_JP_U1.rnc"

UNK_A4FDBD:					; Note: Unused room data pointers?
	incbin "InteriorMaps/DATA_A4FDBD_JP_U1.rnc"

UNK_A4FF3F:
	%InsertGarbageData($A4FF3F, incbin, DATA_A4FF3F.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_A58000:				; Note: Floor/Ceiling tiles to use
	db $22,$25,$01,$03

DATA_A58004:
	dw $0000,DATA_A583EE,DATA_A58451,DATA_A58283,DATA_A581C5,DATA_A583BF,DATA_A5833E,DATA_A58070
	dw DATA_A5805C,DATA_A58048,DATA_A58034,DATA_A584B9,DATA_A5850C,DATA_A5855A,DATA_A5847B,DATA_A58231
	dw DATA_A582AD,DATA_A58305,DATA_A58386,DATA_A58422,DATA_A5809A,DATA_A580CE,DATA_A5813A,DATA_A58173

DATA_A58034:
	dl DATA_B5EB6B
	dl DATA_B7F4B4
	dl DATA_B7F8E4
	dw $0180,$FE40,$0200,$0000,$0013
	db $FF

DATA_A58048:
	dl DATA_A585F3
	dl DATA_A588ED
	dl DATA_B4FA8E
	dw $0D40,$F3C0,$0200,$0000,$0013
	db $FF

DATA_A5805C:
	dl DATA_A585F3
	dl DATA_A588ED
	dl DATA_B4FA8E
	dw $F480,$F400,$0400,$0000,$0013
	db $FF

DATA_A58070:
	dl DATA_A08000
	dl DATA_A08204
	dl DATA_B7F9D6
	dw $0000,$F500,$0400,$0002,$0029
	db $04
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_ShipSubLevel1
	dw $FFFF,$FFFF,$0600,$07C0,$0200,$FBC0,$FBC0,$0000,$0200
	db $FF
	db $FF

DATA_A5809A:
	dl DATA_B7FE07
	dl DATA_A5AFAB
	dl DATA_B7F93B
	dw $0000,$F800,$0400,$0002,$0029
	db $02
	db !Define_JP_InteriorFloorID_ShipEntryLevel
	db !Define_JP_InteriorFloorID_ShipSubLevel2
	dw $FA00,$F840,$FF40,$0080,$0400,$01C0,$0380,$0258,$0000
	db $FF
	db $04,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $03,$02,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A580CE:
	dl DATA_A09EAD
	dl DATA_A0A033
	dl DATA_A0FDD7
	dw $FF00,$0000,$0400,$0002,$003E
	db $05
	db !Define_JP_InteriorFloorID_ShipSubLevel1
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $00C0,$FF80,$FFFF,$FFFF,$0400,$0100,$0400,$0000,$0000
	db $0E
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_ShipSubLevel3
	dw $FFFF,$FFFF,$02C0,$0000,$0600,$0140,$F500,$0000,$0000
	db $FF
	db $0D,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $23,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $24,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $1F,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $0F,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $0C,$02,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $07,$03,!Define_JP_InteriorDoorType_NeedRayArnoldID : dw DATA_A4E378
	db $0A,$02,!Define_JP_InteriorDoorType_NeedRayArnoldID : dw DATA_A4E378
	db $0D,$02,!Define_JP_InteriorDoorType_NeedSecurityLevel2 : dw DATA_A4E483
	db $FF

DATA_A5813A:
	dl DATA_B7FB2F
	dl DATA_A6DDCF
	dl DATA_A3FD78
	dw $FD80,$0980,$0600,$0000,$0029
	db $10
	db !Define_JP_InteriorFloorID_ShipSubLevel2
	db !Define_JP_InteriorFloorID_ShipSubLevel4
	dw $FD40,$0000,$FEC0,$00C0,$0600,$0400,$F500,$0000,$0200
	db $FF
	db $07,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $08,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $06,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A58173:
	dl DATA_B7FCD4
	dl DATA_A0DCBE
	dl DATA_BAFDE1
	dw $0500,$0100,$0400,$0000,$0029
	db $0F
	db !Define_JP_InteriorFloorID_ShipSubLevel3
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $0140,$FF40,$FFFF,$FFFF,$0000,$02C0,$F5C0,$0600,$0000
	db $FF
	db $03,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $04,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $05,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $06,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $07,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $08,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $01,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $02,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A581C5:
	dl DATA_A2FECC
	dl DATA_A0CA42
	dl DATA_A0DB6D
	dw $FF80,$01C0,$0000,$0000,$003E
	db $14
	db !Define_JP_InteriorFloorID_VisitorCenterFloor1
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $0100,$0180,$FFFF,$FFFF,$0600,$0100,$0040,$0600,$0000
	db $01
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_VisitorCenterSubLevel
	dw $FFFF,$FFFF,$0100,$FB40,$0400,$FA40,$0580,$0000,$0200
	db $FF
	db $08,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $07,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $05,$00,!Define_JP_InteriorDoorType_NeedJohnHammondID : dw DATA_A4E258
	db $15,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E985
	db $16,$02,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E985
	db $10,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9E1
	db $12,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9F5
	db $0D,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9F5
	db $13,$02,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9F5
	db $FF

DATA_A58231:
	dl DATA_A6C982
	dl DATA_A6CA94
	dl DATA_BBFEB2
	dw $0500,$0100,$0400,$0000,$0029
	db $09
	db !Define_JP_InteriorFloorID_VisitorCenterRoofLevel
	db !Define_JP_InteriorFloorID_VisitorCenterGroundLevel
	dw $FCC0,$FC40,$FF00,$FE80,$0600,$0200,$01C0,$0200,$0600
	db $FF
	db $16,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $14,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $05,$00,!Define_JP_InteriorDoorType_NeedDennisNedryID : dw DATA_A4E3AF
	db $11,$00,!Define_JP_InteriorDoorType_NeedDrWuID : dw DATA_A4E3E8
	db $0B,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9BD
	db $04,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E993
	db $06,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E993
	db $08,$02,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E993
	db $FF

DATA_A58283:
	dl DATA_B7F40E
	dl DATA_BFFB71
	dl DATA_B7F45F
	dw $FEC0,$0040,$0000,$0000,$0029
	db $03
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_VisitorCenterFloor1
	dw $FFFF,$FFFF,$0340,$03C0,$0000,$FEC0,$FE00,$0000,$0600
	db $FF
	db $FF

DATA_A582AD:
	dl DATA_BAFEE8
	dl DATA_A0EE17
	dl DATA_A3FCAC
	dw $0500,$0100,$0400,$0000,$003E
	db $0D
	db !Define_JP_InteriorFloorID_VisitorCenterGroundLevel
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $FF00,$04C0,$FFFF,$FFFF,$0200,$FB40,$00C0,$0200,$0000
	db $11
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_RaptorPenSubLevel2
	dw $FFFF,$FFFF,$FD00,$03C0,$0200,$FB40,$0400,$0000,$0000
	db $FF
	db $0F,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $10,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $0E,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $01,$00,!Define_JP_InteriorDoorType_NeedEllieSattlerID : dw DATA_A4E291
	db $03,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9CE
	db $FF

DATA_A58305:
	dl DATA_A0FD55
	dl DATA_A1CFA4
	dl DATA_A9FEC6
	dw $0140,$FF00,$0400,$0000,$0029
	db $03
	db !Define_JP_InteriorFloorID_NublarUtilityShedGroundLevel
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $FB40,$FD00,$FFFF,$FFFF,$0400,$FF80,$0380,$0600,$0000
	db $FF
	db $07,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $06,$01,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $08,$00,!Define_JP_InteriorDoorType_NeedIanMalcolmID : dw DATA_A4E41B
	db $FF

DATA_A5833E:
	dl DATA_A6FADA
	dl DATA_A1C274
	dl DATA_BBFDF5
	dw $FEC0,$03C0,$0000,$0000,$0029
	db $0C
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_NublarUtilityShedSubLevel
	dw $FFFF,$FFFF,$04C0,$0300,$0200,$FAC0,$0080,$0000,$0200
	db $FF
	db $01,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $02,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $0E,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $01,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9A8
	db $02,$02,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9A8
	db $05,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E9A8
	db $FF

DATA_A58386:
	dl DATA_B7FF55
	dl DATA_A1DC71
	dl DATA_A8FE26
	dw $03C0,$FE00,$0400,$0000,$0029
	db $0B
	db !Define_JP_InteriorFloorID_BeachUtilityShedGroundLevel
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $0700,$FCC0,$FFFF,$FFFF,$0400,$FEC0,$0380,$0000,$0000
	db $FF
	db $01,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $02,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $03,$02,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A583BF:
	dl DATA_A0ED7D
	dl DATA_A1EAAC
	dl DATA_ABFF2E
	dw $FEC0,$03C0,$0000,$0000,$0029
	db $08
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_BeachUtilityShedSubLevel
	dw $FFFF,$FFFF,$F900,$0340,$0400,$05C0,$0040,$0000,$0000
	db $FF
	db $09,$00,!Define_JP_InteriorDoorType_NeedDonaldGennaroID : dw DATA_A4E33D
	db $FF

DATA_A583EE:
	dl DATA_A0BAA0
	dl DATA_A0BB51
	dl DATA_A0C983
	dw $FEC0,$03C0,$0000,$0000,$0029
	db $08
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_NorthUtilityShedSubLevel
	dw $FFFF,$FFFF,$0480,$0200,$0200,$FB00,$0100,$0000,$0200
	db $FF
	db $01,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $02,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A58422:
	dl DATA_A3FF51
	dl DATA_A5F1C0
	dl DATA_B7FE96
	dw $0340,$0080,$0400,$0000,$0029
	db $05
	db !Define_JP_InteriorFloorID_NorthUtilityShedGroundLevel
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $FB80,$FE00,$FFFF,$FFFF,$0400,$FF80,$0300,$0600,$0000
	db $FF
	db $0C,$00,!Define_JP_InteriorDoorType_NeedRobertMuldoonID : dw DATA_A4E2CB
	db $FF

DATA_A58451:
	dl DATA_A7FF0D
	dl DATA_B6FB63
	dl DATA_A7FF55
	dw $0080,$0080,$0000,$0000,$0029
	db $01
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_RaptorPenUpperLevel
	dw $FFFF,$FFFF,$0000,$0000,$0200,$FDC0,$0140,$0000,$0000
	db $FF
	db $FF

DATA_A5847B:
	dl DATA_A1F99D
	dl DATA_A1FA07
	dl DATA_B5FEAE
	dw $0000,$00C0,$0000,$0000,$0029
	db $01
	db !Define_JP_InteriorFloorID_RaptorPenEntryLevel
	db !Define_JP_InteriorFloorID_RaptorPenGroundLevel
	dw $0000,$0000,$0000,$0800,$0200,$FDC0,$0140,$0000,$0000
	db $FF
	db $05,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $06,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $07,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $03,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A584B9:
	dl DATA_A5BAA3
	dl DATA_B5EBA2
	dl DATA_A1F895
	dw $0500,$F800,$0000,$0000,$003E
	db $07
	db !Define_JP_InteriorFloorID_RaptorPenUpperLevel
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $0000,$F800,$FFFF,$FFFF,$0200,$FDC0,$0940,$0000,$0000
	db $1C
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_RaptorPenSubLevel1
	dw $0000,$0000,$F7C0,$F900,$0200,$0400,$0940,$0000,$0000
	db $FF
	db $0F,$02,!Define_JP_InteriorDoorType_NeedSecurityLevel1 : dw DATA_A4E453
	db $1A,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $1B,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $19,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A5850C:
	dl DATA_A6FB80
	dl DATA_A5BC0E
	dl DATA_A1FE19
	dw $FCC0,$FC40,$0000,$0000,$003E
	db $15
	db !Define_JP_InteriorFloorID_RaptorPenGroundLevel
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $0840,$0700,$0000,$0000,$0200,$FBC0,$0240,$0000,$0000
	db $03
	db !Define_JP_InteriorFloorID_InvalidFloor
	db !Define_JP_InteriorFloorID_RaptorPenSubLevel2
	dw $0000,$0000,$0140,$FE40,$0200,$0180,$06C0,$0000,$0200
	db $FF
	db $22,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $23,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $21,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A5855A:
	dl DATA_A4F8AA
	dl DATA_A5D849
	dl DATA_A9FCFA
	dw $02C0,$0500,$0000,$0000,$003E
	db $19
	db !Define_JP_InteriorFloorID_RaptorPenSubLevel1
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $FEC0,$01C0,$0000,$0000,$0400,$02C0,$0500,$0600,$0000
	db $2A
	db !Define_JP_InteriorFloorID_VisitorCenterSubLevel
	db !Define_JP_InteriorFloorID_InvalidFloor
	dw $0300,$FC40,$FFFF,$FFFF,$0200,$F840,$07C0,$0000,$0000
	db $FF
	db $1A,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $1B,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $1C,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $1D,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $1E,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $1F,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $20,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $21,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $22,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $23,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $24,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $25,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $26,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $27,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $28,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $29,$00,!Define_JP_InteriorDoorType_DarkRoom : dw $0000
	db $04,$00,!Define_JP_InteriorDoorType_NeedAlanGrantID : dw DATA_A4E306
	db $02,$00,!Define_JP_InteriorDoorType_DisplayMessage : dw DATA_A4E947
	db $FF

DATA_A585F3:
	incbin "InteriorMaps/RaptorNest_RoomDataPtrs.rnc"

DATA_A588ED:
	incbin "InteriorMaps/RaptorNest_Entities.rnc"

DATA_A5AFAB:
	incbin "InteriorMaps/Ship_SubLevel1_Entities.rnc"

DATA_A5BAA3:
	incbin "InteriorMaps/RaptorPen_GroundLevel_RoomDataPtrs.rnc"

DATA_A5BC0E:
	incbin "InteriorMaps/RaptorPen_SubLevel1_Entities.rnc"

DATA_A5D849:
	incbin "InteriorMaps/RaptorPen_SubLevel2_Entities.rnc"

DATA_A5F1C0:
	incbin "InteriorMaps/NorthUtilityShed_SubLevel_Entities_JP_U1.rnc"

UNK_A5FF4A:
	%InsertGarbageData($A5FF4A, incbin, DATA_A5FF4A.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_A68000:
	incbin "UnsortedData/DATA_A68000_JP_U1.rnc"

DATA_A68286:
	incbin "UnsortedData/DATA_A68286_JP_U1.rnc"

DATA_A682AE:
	incbin "UnsortedData/DATA_A682AE_JP_U1.rnc"

DATA_A683F2:
	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
	dw $0000,$0000,$0000,$0001,$0001,$0002,$0002,$0003
	dw $0003,$0003,$0004,$0004,$0005,$0005,$0005,$0006
	dw $0006,$0006,$0006,$0007,$0007,$0007,$0008,$0008
	dw $0008,$0008,$0009,$0009,$0009,$0009,$000A,$000A
	dw $000A,$000A,$000B,$000B,$000B,$000B,$000B,$000C
	dw $000C,$000C,$000C,$000C,$000C,$000D,$000D,$000D
	dw $000D,$000D,$000D,$000E,$000E,$000E,$000E,$000E
	dw $000E,$000E,$000F,$000F,$000F,$000F,$000F,$000F
	dw $0010,$000F,$0010,$0010,$0010,$0010,$0010,$0010
	dw $0010,$0010,$0011,$0010

DATA_A6850A:
	dw $0000,$0080,$0100,$0180,$0200,$0280,$0300,$0380
	dw $0400,$0480,$0500,$0580,$0600,$0680,$0700,$0780
	dw $0800,$0880,$0900,$0980,$0A00,$0A80,$0B00,$0B80
	dw $0C00,$0C80,$0D00,$0D80,$0E00,$0E80,$0F00,$0F80
	dw $1000,$1080,$1100,$1180,$1200,$1280,$1300,$1380
	dw $1400,$1480,$1500,$1580,$1600,$1680,$1700,$1780
	dw $1800,$1880,$1900,$1980,$1A00,$1A80,$1B00,$1B80
	dw $1C00,$1C80,$1D00,$1D80,$1E00,$1E80,$1F00,$1F80
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000
	dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000

JP_Tilemap_BG_ComputerTerminal:
;$A6864A
	incbin "Tilemaps/Compressed/BG_ComputerTerminal.bin"

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

CODE_A68A5C:
	REP.b #$30
	PHA
	PHX
	PHY
	PHB
	SEP.b #$20
	LDA.b #CODE_A68A5C>>16
	PHA
	PLB
	SEP.b #$20
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.l $801641
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.l $801642
	STA.l !REGISTER_BG1HorizScrollOffset|!FastROMAddressOffset
	LDA.l $801643
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.l $801644
	STA.l !REGISTER_BG1VertScrollOffset|!FastROMAddressOffset
	LDA.l $801645
	STA.l !REGISTER_BG2HorizScrollOffset|!FastROMAddressOffset
	LDA.l $801646
	STA.l !REGISTER_BG2HorizScrollOffset|!FastROMAddressOffset
	LDA.l $801647
	STA.l !REGISTER_BG2VertScrollOffset|!FastROMAddressOffset
	LDA.l $801648
	STA.l !REGISTER_BG2VertScrollOffset|!FastROMAddressOffset
	LDA.l $801649
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	LDA.l $80164A
	STA.l !REGISTER_BG3HorizScrollOffset|!FastROMAddressOffset
	LDA.l $80164B
	STA.l !REGISTER_BG3VertScrollOffset|!FastROMAddressOffset
	LDA.l $80164C
	STA.l !REGISTER_BG3VertScrollOffset|!FastROMAddressOffset
	JSL.l CODE_A68B4D
	JSL.l CODE_A68B15
	JSR.w CODE_A69E53
	JSR.w CODE_A6AE04
	JSR.w CODE_A6C1C7
	JSR.w CODE_A6C108
	JSL.l CODE_A68B03
	JSL.l CODE_A4B7E5
	REP.b #$30
	REP.b #$30
	INC.w $00EA
	INC.w $0071
	LDA.b $16
	AND.w #$2000
	BEQ.b CODE_A68AFE
	DEC.w $164D
CODE_A68AFE:
	PLB
	PLY
	PLX
	PLA
	RTI

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

CODE_A68B03:
	REP.b #$30
	LDX.w #$FFFF
	STX.w $00EC
	STX.w $1891
	STX.w $18C5
	STZ.w $18D3
	RTL

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

CODE_A68B15:
	SEP.b #$20
	REP.b #$10
	LDX.w $00EC
	BMI.b CODE_A68B32
	STX.w !REGISTER_VRAMAddressLo
	LDA.b #$80
	STA.w !REGISTER_VRAMAddressIncrementValue
	LDX.w $005F
	STX.w !REGISTER_WriteToVRAMPortLo
	LDX.w $0061
	STX.w !REGISTER_WriteToVRAMPortLo
CODE_A68B32:
	LDX.w $1891
	BMI.b CODE_A68B4C
	STX.w !REGISTER_VRAMAddressLo
	LDA.b #$81
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDY.w #$0012
	LDX.w #$0000
CODE_A68B46:
	STX.w !REGISTER_WriteToVRAMPortLo
	DEY
	BPL.b CODE_A68B46
CODE_A68B4C:
	RTL

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

CODE_A68B4D:
	SEP.b #$20
	REP.b #$10
	STZ.w !REGISTER_OAMAddressLo
	STZ.w !REGISTER_OAMAddressHi
	LDA.b #!REGISTER_OAMDataWritePort
	STA.l DMA[$01].Destination|!FastROMAddressOffset
	STZ.w DMA[$01].Parameters
	LDX.w #!RAM_JP_Interior_OAMBuffer
	STX.w DMA[$01].SourceLo
	STZ.w DMA[$01].SourceBank
	LDX.w #$0220
	STX.w DMA[$01].SizeLo
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTL

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

CODE_A68B76:
	REP.b #$30
	PHA
	PHX
	PHY
	PHB
	SEP.b #$20
	LDA.b #CODE_A68B76>>16
	PHA
	PLB
	LDA.l !REGISTER_IRQEnable|!FastROMAddressOffset
	LDX.w #CODE_A68B76
	STX.b $04
	LDA.b #CODE_A68B76>>16
	STA.b $06
	LDX.w #$000B
	STX.w !REGISTER_VCountTimerLo
	LDX.w #$0000
	STX.w !REGISTER_HCountTimerLo
	CLI
	JSR.w CODE_A68BAA
	JSL.l CODE_A4EF2B
	REP.b #$30
	PLB
	PLY
	PLX
	PLA
	RTI

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

CODE_A68BAA:
	REP.b #$30
	JSL.l CODE_A4EC17
	JSR.w CODE_A69E04
	REP.b #$30
	JSR.w CODE_A6AAC3
	JSR.w CODE_A6BCCD
	JSR.w CODE_A6C0BC
	JSR.w CODE_A6AE28
	JSR.w CODE_A6A7EF
	JSL.l CODE_A6B987
	RTS

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

CODE_A68BC9:
	REP.b #$30
	STA.l !RAM_JP_Interior_ComputerTerminalID
	JSL.l CODE_A4B5E2
	SEP.b #$20
	REP.b #$10
	SEI
	STZ.w !REGISTER_IRQNMIAndJoypadEnableFlags
	STZ.w !REGISTER_HDMAEnable
	LDX.w #CODE_A68A5C
	STX.b $00
	LDA.b #CODE_A68A5C>>16
	STA.b $02
	LDX.w #CODE_A68B76
	STX.b $04
	LDA.b #CODE_A68B76>>16
	STA.b $06
	LDX.w #$000B
	STX.w !REGISTER_VCountTimerLo
	LDX.w #$0000
	STX.w !REGISTER_HCountTimerLo
	LDA.b #$00
	STA.l !REGISTER_InitialScreenSettings|!FastROMAddressOffset
	LDA.b #$58
	STA.l !REGISTER_BG1AddressAndSize|!FastROMAddressOffset
	LDA.b #$5C
	STA.l !REGISTER_BG2AddressAndSize|!FastROMAddressOffset
	LDA.b #$03
	STA.l !REGISTER_BG1And2TileDataDesignation|!FastROMAddressOffset
	LDA.b #$05
	STA.l !REGISTER_BG3And4TileDataDesignation|!FastROMAddressOffset
	LDA.b #$01
	STA.l !REGISTER_BGModeAndTileSizeSetting|!FastROMAddressOffset
	LDA.b #$63
	STA.l !REGISTER_OAMSizeAndDataAreaDesignation|!FastROMAddressOffset
	LDA.b #$80
	STA.l !REGISTER_Mode7TilemapSettings|!FastROMAddressOffset
	LDA.b #$13
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	STZ.w !REGISTER_SubScreenLayers
	STZ.w !REGISTER_ColorMathInitialSettings
	STZ.w !REGISTER_ColorMathSelectAndEnable
	STZ.w !REGISTER_FixedColorData
	JSL.l CODE_A4B7C1
	REP.b #$30
	LDX.w #JP_Palette_ComputerTerminal
	LDA.w #JP_Palette_ComputerTerminal>>16
	JSL.l CODE_A4B43E
	LDX.w #JP_Tilemap_BG_ComputerTerminal
	LDA.w #JP_Tilemap_BG_ComputerTerminal>>16
	LDY.w #$5800
	JSL.l CODE_A4B41D
	LDX.w #$0000
	LDY.w #$0400
CODE_A68C61:
	LDA.l JP_GFX_BG_ComputerTerminalPart1,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68C61
	LDY.w #$0400
CODE_A68C71:
	LDA.l JP_GFX_BG_ComputerTerminalPart2-$0800,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68C71
	LDY.w #$0400
CODE_A68C81:
	LDA.l JP_GFX_BG_ComputerTerminalPart3-$1000,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68C81
	LDY.w #$0400
CODE_A68C91:
	LDA.l JP_GFX_BG_ComputerTerminalPart4-$1800,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68C91
	LDY.w #$0400
CODE_A68CA1:
	LDA.l JP_GFX_BG_ComputerTerminalPart5-$2000,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68CA1
	LDY.w #$0400
CODE_A68CB1:
	LDA.l JP_GFX_BG_ComputerTerminalPart6-$2800,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68CB1
	LDX.w #$7F75CC
	LDA.w #$7F75CC>>16
	LDY.w #$3000
	JSL.l CODE_A4B41D
	LDX.w #$0000
	LDY.w #$0400
CODE_A68CD1:
	LDA.l JP_GFX_Sprite_AlanGrantHandPart1,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68CD1
	LDY.w #$0400
CODE_A68CE1:
	LDA.l JP_GFX_Sprite_AlanGrantHandPart2-$0800,x
	STA.l $7F75CC,x
	INX
	INX
	DEY
	BNE.b CODE_A68CE1
	LDX.w #$7F75CC
	LDA.w #$7F75CC>>16
	LDY.w #$6000
	JSL.l CODE_A4B41D
	JSR.w CODE_A68E18
	JSL.l CODE_A69A50
	JSR.w CODE_A68DAA
	SEP.b #$20
	LDA.l !REGISTER_NMIEnable|!FastROMAddressOffset
	LDA.b #$B1
	STA.l !REGISTER_IRQNMIAndJoypadEnableFlags|!FastROMAddressOffset
	CLI
	REP.b #$20
	JSL.l CODE_A4B5D7
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_UnknownComputerSound&$7F)<<8)
	LDY.w #$F00A
	JSL.l CODE_A4EF83
	JSL.l CODE_A4B64A
	REP.b #$30
	LDA.w #$0020
	STA.l $801A29
	STA.l $801A2D
	STA.l $801A2B
	STA.l $801A2F
	JSL.l CODE_A4B56F
	STZ.w $1A6A
CODE_A68D42:
	REP.b #$30
	JSL.l CODE_A4B5D0
	REP.b #$30
	JSR.w CODE_A68E55
	SEP.b #$30
	PHB
	LDA.b #DATA_A69486>>16
	PHA
	PLB
	REP.b #$30
	LDA.l $801A6A
	ASL
	TAX
	LDA.l DATA_A69486,x
	JSR.w CODE_A69049
	PLB
	REP.b #$30
	LDA.l $80164D
	BEQ.b CODE_A68D7F
	BMI.b CODE_A68D7F
	LDA.l $8018D5
	STA.l $801A6A
	LDA.w #$0000
	STA.l $80164D
	BRA.b CODE_A68D42

CODE_A68D7F:
	INC.w $1A6A
	LDA.l $801A6A
	ASL
	TAX
	LDA.l DATA_A69486,x
	BPL.b CODE_A68D91
	STZ.w $1A6A
CODE_A68D91:
	REP.b #$30
	LDX.w #$00F0
CODE_A68D96:
	JSL.l CODE_A4B5D0
	LDA.l $80164D
	BMI.b CODE_A68DA5
	DEX
	BPL.b CODE_A68D96
	BRA.b CODE_A68D42

CODE_A68DA5:
	JSL.l CODE_A4B664
	RTL

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

CODE_A68DAA:
	REP.b #$30
	LDX.w #$53FE
	LDA.w #$0000
CODE_A68DB2:
	STA.l $7F35CC,x
	DEX
	DEX
	BPL.b CODE_A68DB2
	LDX.w #$03FE
	LDA.w #$0000
CODE_A68DC0:
	STA.l $7FB64C,x
	DEX
	DEX
	BPL.b CODE_A68DC0
	LDA.w #$FFFF
	STA.l $801A80
	LDA.w #$0000
	STA.l $80164D
	STA.l $801641
	STA.l $801643
	STA.l $801649
	STA.l $80164B
	STA.b $DC
	STA.b $DE
	LDA.w #$FFF0
	STA.l $801645
	LDA.w #$FFD0
	STA.l $801647
	LDA.w #!Define_JP_ComputerMessage_RebootMainSystemPrompt
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	LDA.l !RAM_JP_Global_MainSystemRestoredFlagLo
	BEQ.b CODE_A68E0C
	LDA.w #!Define_JP_ComputerMessage_MainMenu
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A68E0C:
	JSR.w CODE_A6BCAA
	JSR.w CODE_A6A843
	JSR.w CODE_A6C0B0
	REP.b #$30
	RTS

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

CODE_A68E18:
	REP.b #$30
	LDA.w #$0C00
	LDX.w #$0000
CODE_A68E20:
	STA.l $7F35CC,x
	INX
	INX
	CPX.w #$0800
	BNE.b CODE_A68E20
	LDA.w #$0C00
	LDX.w #$0000
CODE_A68E31:
	STA.l $7F35CC,x
	INC
	INX
	INX
	CPX.w #$0500
	BNE.b CODE_A68E31
	SEP.b #$20
	LDX.w #$7F35CC
	STX.b $46
	LDA.b #$7F35CC>>16
	STA.b $48
	LDA.b #$80
	LDX.w #$5C00
	LDY.w #$0800
	JSL.l CODE_A4B90E
	RTS

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

CODE_A68E55:
	JSL.l CODE_A4B5D0
	SEP.b #$20
	LDA.b #$11
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	REP.b #$30
	LDX.w #$4FFE
	LDA.w #$0000
CODE_A68E69:
	STA.l $7F35CC,x
	DEX
	DEX
	BPL.b CODE_A68E69
	JSR.w CODE_A69DEC
	JSL.l CODE_A4B5D0
	REP.b #$20
CODE_A68E7A:
	JSL.l CODE_A4B5D0
	LDA.l $801A7E
	BNE.b CODE_A68E7A
	SEP.b #$20
	LDA.b #$13
	STA.l !REGISTER_MainScreenLayers|!FastROMAddressOffset
	REP.b #$30
	RTS

	%FREE_BYTES($A68E8F, 1, $00)

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

CODE_A68E90:
	REP.b #$30
	LDA.b $EA
	AND.w #$0007
	ASL
	TAX
	LDA.w DATA_A68ECE,x
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	LDA.w DATA_A68EDE,x
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	SEP.b #$20
	LDA.b #$7F35CC>>16
	STA.l DMA[$01].SourceBank|!FastROMAddressOffset
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	LDA.b #$01
	STA.l DMA[$01].Parameters|!FastROMAddressOffset
	LDA.b #!REGISTER_WriteToVRAMPortLo
	STA.l DMA[$01].Destination|!FastROMAddressOffset
	LDX.w #$1000
	STX.w DMA[$01].SizeLo
	LDA.b #$02
	STA.l !REGISTER_DMAEnable|!FastROMAddressOffset
	RTS

DATA_A68ECE:
	dw $7F35CC,$7F45CC,$7F55CC,$7F65CC,$7F75CC,$7F85CC,$7F95CC,$7FA5CC

DATA_A68EDE:
	dw $0000,$0800,$1000,$1800,$2000,$2800,$3000,$3800

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

CODE_A68EEE:
	REP.b #$30
	LDA.l $801A29
	CMP.l $801A2B
	BNE.b CODE_A68F18
	LDA.l $801A2D
	CMP.l $801A2F
	BNE.b CODE_A68F18
	LDA.l $801A29
	STA.l $801A1D
	LDA.l $801A2D
	STA.l $801A1F
	JSR.w CODE_A69E98
	RTS

CODE_A68F18:
	LDA.l $801A29
	STA.l $801A3D
	LDA.l $801A2D
	STA.l $801A3F
	LDA.l $801A2B
	SEC
	SBC.l $801A29
	STA.l $801A41
	BPL.b CODE_A68F3B
	EOR.w #$FFFF
	INC
CODE_A68F3B:
	STA.l $801A45
	LDA.l $801A2F
	SEC
	SBC.l $801A2D
	STA.l $801A43
	BPL.b CODE_A68F52
	EOR.w #$FFFF
	INC
CODE_A68F52:
	STA.l $801A47
	LDX.w #$0000
	LDA.l $801A41
	BEQ.b CODE_A68F6B
	LDX.w #$0001
	LDA.l $801A41
	BPL.b CODE_A68F6B
	LDX.w #$FFFF
CODE_A68F6B:
	STX.w $1A41
	LDX.w #$0000
	LDA.l $801A43
	BEQ.b CODE_A68F83
	LDX.w #$0001
	LDA.l $801A43
	BPL.b CODE_A68F83
	LDX.w #$FFFF
CODE_A68F83:
	STX.w $1A43
	STZ.w $1A4B
	LDA.l $801A47
	CMP.l $801A45
	BCC.b CODE_A68FA8
	LDA.l $801A45
	PHA
	LDA.l $801A47
	STA.l $801A45
	PLA
	STA.l $801A47
	INC.w $1A4B
CODE_A68FA8:
	LDA.l $801A47
	ASL
	SEC
	SBC.l $801A45
	STA.l $801A49
	LDA.l $801A45
	STA.b $58
CODE_A68FBC:
	LDA.l $801A49
	BMI.b CODE_A68FFB
	LDA.l $801A4B
	CMP.w #$0001
	BNE.b CODE_A68FDA
	LDA.l $801A3D
	CLC
	ADC.l $801A41
	STA.l $801A3D
	BRA.b CODE_A68FE7

CODE_A68FDA:
	LDA.l $801A3F
	CLC
	ADC.l $801A43
	STA.l $801A3F
CODE_A68FE7:
	LDA.l $801A45
	ASL
	STA.b $56
	LDA.l $801A49
	SEC
	SBC.b $56
	STA.l $801A49
	BRA.b CODE_A68FBC

CODE_A68FFB:
	LDA.l $801A4B
	CMP.w #$0001
	BNE.b CODE_A69013
	LDA.l $801A3F
	CLC
	ADC.l $801A43
	STA.l $801A3F
	BRA.b CODE_A69020

CODE_A69013:
	LDA.l $801A3D
	CLC
	ADC.l $801A41
	STA.l $801A3D
CODE_A69020:
	LDA.l $801A3D
	STA.l $801A1D
	LDA.l $801A3F
	STA.l $801A1F
	JSR.w CODE_A69E98
	LDA.l $801A47
	ASL
	CLC
	ADC.l $801A49
	STA.l $801A49
	DEC.b $58
	BEQ.b CODE_A69048
	BRL.w CODE_A68FBC

CODE_A69048:
	RTS

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

CODE_A69049:				; Note: Routine that draws fractal patterns.
	REP.b #$30
	ASL
	TAX
	LDA.l DATA_A694A4,x
	STA.l $801A64
	LDA.l DATA_A694DC,x
	STA.l $801A4D
	LDA.l DATA_A694F8,x
	STA.l $801A66
	LDA.l DATA_A69514,x
	STA.l $801A57
	LDA.l DATA_A69530,x
	STA.l $801A5B
	STZ.w $1A59
	STZ.w $1A5D
	LDA.l DATA_A6954C,x
	STA.l $801A53
	LDA.l DATA_A69568,x
	STA.l $801A55
	LDA.l DATA_A69584,x
	STA.l $801A61
	LDA.l DATA_A695A0,x
	STA.l $801A68
	STZ.w $1A5F
	STZ.w $1A4F
	STZ.w $1A51
CODE_A690A4:
	REP.b #$20
	LDA.l $80164D
	BNE.b CODE_A69102
	SEP.b #$20
	LDX.w $1A4D
	LDA.w $0000,x
	CMP.b #$FF
	BEQ.b CODE_A690EE
	STA.l $801A63
	LDY.w $1A53
	BEQ.b CODE_A69103
	LDX.w $1A66
CODE_A690C4:
	LDA.w $0000,x
	BMI.b CODE_A69103
	LDA.l $801A63
	CMP.w $0000,x
	BEQ.b CODE_A690D7
	INX
	INX
	INX
	BRA.b CODE_A690C4

CODE_A690D7:
	REP.b #$20
	DEC.w $1A53
	LDA.l $801A4D
	INC
	JSR.w CODE_A69380
	INX
	LDA.w $0000,x
	STA.l $801A4D
	BRA.b CODE_A690A4

CODE_A690EE:
	REP.b #$20
	INC.w $1A53
	LDA.l $801A4F
	BEQ.b CODE_A69102
	JSR.w CODE_A6938F
	STA.l $801A4D
	BRA.b CODE_A690A4

CODE_A69102:
	RTS

CODE_A69103:
	SEP.b #$20
	LDA.l $801A63
	CMP.b #$46
	BNE.b CODE_A69110
	BRL.w CODE_A69142

CODE_A69110:
	CMP.b #$66
	BNE.b CODE_A69117
	BRL.w CODE_A69209

CODE_A69117:
	CMP.b #$2B
	BNE.b CODE_A6911E
	BRL.w CODE_A692CF

CODE_A6911E:
	CMP.b #$2D
	BNE.b CODE_A69125
	BRL.w CODE_A692AD

CODE_A69125:
	CMP.b #$7C
	BNE.b CODE_A6912C
	BRL.w CODE_A692EE

CODE_A6912C:
	CMP.b #$5B
	BNE.b CODE_A69133
	BRL.w CODE_A6930C

CODE_A69133:
	CMP.b #$5D
	BNE.b CODE_A6913A
	BRL.w CODE_A69337

CODE_A6913A:
	REP.b #$20
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A69142:
	REP.b #$20
	LDA.l $801A57
	STA.l $801A29
	LDA.l $801A5B
	STA.l $801A2D
	LDY.w #$0000
	LDA.l $801A55
	ASL
	TAX
	LDA.w DATA_A69A68,x
	BPL.b CODE_A69163
	DEY
CODE_A69163:
	STA.l $801A74
	STY.w $1A76
	LDA.l $801A5F
	STA.l $801A78
	LDA.l $801A61
	STA.l $801A7A
	JSR.w CODE_A693C0
	ASL.w $1A6C
	ROL.w $1A6E
	ASL.w $1A6C
	ROL.w $1A6E
	LDA.l $801A59
	CLC
	ADC.l $801A6C
	STA.l $801A59
	LDA.l $801A57
	ADC.l $801A6E
	STA.l $801A57
	LDY.w #$0000
	LDA.l $801A55
	ASL
	TAX
	LDA.w DATA_A69B1C,x
	BPL.b CODE_A691B1
	DEY
CODE_A691B1:
	STA.l $801A74
	STY.w $1A76
	LDA.l $801A5F
	STA.l $801A78
	LDA.l $801A61
	STA.l $801A7A
	JSR.w CODE_A693C0
	ASL.w $1A6C
	ROL.w $1A6E
	ASL.w $1A6C
	ROL.w $1A6E
	LDA.l $801A5D
	CLC
	ADC.l $801A6C
	STA.l $801A5D
	LDA.l $801A5B
	ADC.l $801A6E
	STA.l $801A5B
	LDA.l $801A57
	STA.l $801A2B
	LDA.l $801A5B
	STA.l $801A2F
	JSR.w CODE_A68EEE
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A69209:
	REP.b #$20
	LDY.w #$0000
	LDA.l $801A55
	ASL
	TAX
	LDA.w DATA_A69A68,x
	BPL.b CODE_A6921A
	DEY
CODE_A6921A:
	STA.l $801A74
	STY.w $1A76
	LDA.l $801A5F
	STA.l $801A78
	LDA.l $801A61
	STA.l $801A7A
	JSR.w CODE_A693C0
	ASL.w $1A6C
	ROL.w $1A6E
	ASL.w $1A6C
	ROL.w $1A6E
	LDA.l $801A59
	CLC
	ADC.l $801A6C
	STA.l $801A59
	LDA.l $801A57
	ADC.l $801A6E
	STA.l $801A57
	LDY.w #$0000
	LDA.l $801A55
	ASL
	TAX
	LDA.w DATA_A69B1C,x
	BPL.b CODE_A69268
	DEY
CODE_A69268:
	STA.l $801A74
	STY.w $1A76
	LDA.l $801A5F
	STA.l $801A78
	LDA.l $801A61
	STA.l $801A7A
	JSR.w CODE_A693C0
	ASL.w $1A6C
	ROL.w $1A6E
	ASL.w $1A6C
	ROL.w $1A6E
	LDA.l $801A5D
	CLC
	ADC.l $801A6C
	STA.l $801A5D
	LDA.l $801A5B
	ADC.l $801A6E
	STA.l $801A5B
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A692AD:
	REP.b #$20
	LDA.l $801A55
	CLC
	ADC.l $801A64
	STA.l $801A55
	CMP.w #$0168
	BCC.b CODE_A692C9
	SEC
	SBC.w #$0168
	STA.l $801A55
CODE_A692C9:
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A692CF:
	REP.b #$20
	LDA.l $801A55
	SEC
	SBC.l $801A64
	STA.l $801A55
	BPL.b CODE_A692E8
	CLC
	ADC.w #$0168
	STA.l $801A55
CODE_A692E8:
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A692EE:
	REP.b #$20
	LDA.l $801A55
	SEC
	SBC.w #$00B4
	STA.l $801A55
	BPL.b CODE_A69306
	CLC
	ADC.w #$0168
	STA.l $801A55
CODE_A69306:
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A6930C:
	REP.b #$20
	LDA.l $801A59
	JSR.w CODE_A69362
	LDA.l $801A57
	JSR.w CODE_A69362
	LDA.l $801A5D
	JSR.w CODE_A69362
	LDA.l $801A5B
	JSR.w CODE_A69362
	LDA.l $801A55
	JSR.w CODE_A69362
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A69337:
	REP.b #$20
	JSR.w CODE_A69371
	STA.l $801A55
	JSR.w CODE_A69371
	STA.l $801A5B
	JSR.w CODE_A69371
	STA.l $801A5D
	JSR.w CODE_A69371
	STA.l $801A57
	JSR.w CODE_A69371
	STA.l $801A59
	INC.w $1A4D
	BRL.w CODE_A690A4

CODE_A69362:
	PHX
	LDX.w $1A51
	STA.l $7FFBEE,x
	INX
	INX
	STX.w $1A51
	PLX
	RTS

CODE_A69371:
	PHX
	LDX.w $1A51
	DEX
	DEX
	STX.w $1A51
	LDA.l $7FFBEE,x
	PLX
	RTS

CODE_A69380:
	PHX
	LDX.w $1A4F
	STA.l $7FFCEE,x
	INX
	INX
	STX.w $1A4F
	PLX
	RTS

CODE_A6938F:
	PHX
	LDX.w $1A4F
	DEX
	DEX
	STX.w $1A4F
	LDA.l $7FFCEE,x
	PLX
	RTS

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

CODE_A6939E:
	REP.b #$30
	LDA.w #$0000
	STA.l $801A74
	LDA.w #$0010
	STA.l $801A76
	LDA.w #$0000
	STA.l $801A7A
	LDA.w #$4000
	STA.l $801A78
	JSR.w CODE_A693C0
	RTS

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

CODE_A693C0:
	STZ.b $56
	LDA.l $801A76
	BPL.b CODE_A693E7
	LDA.l $801A74
	EOR.w #$FFFF
	CLC
	ADC.w #$0001
	STA.l $801A74
	LDA.l $801A76
	EOR.w #$FFFF
	ADC.w #$0000
	STA.l $801A76
	INC.b $56
CODE_A693E7:
	LDA.l $801A7A
	BPL.b CODE_A6940C
	LDA.l $801A78
	EOR.w #$FFFF
	CLC
	ADC.w #$0001
	STA.l $801A78
	LDA.l $801A7A
	EOR.w #$FFFF
	ADC.w #$0000
	STA.l $801A7A
	INC.b $56
CODE_A6940C:
	STZ.w $1A6C
	STZ.w $1A6E
	STZ.w $1A70
	LDX.w #$001F
CODE_A69418:
	ASL.w $1A6C
	ROL.w $1A6E
	ROL.w $1A70
	ASL.w $1A74
	ROL.w $1A76
	BCC.b CODE_A6944D
	LDA.l $801A6C
	CLC
	ADC.l $801A78
	STA.l $801A6C
	LDA.l $801A6E
	ADC.l $801A7A
	STA.l $801A6E
	LDA.l $801A70
	ADC.w #$0000
	STA.l $801A70
CODE_A6944D:
	DEX
	BPL.b CODE_A69418
	LDA.b $56
	CMP.w #$0001
	BNE.b CODE_A69475
	LDA.l $801A6E
	EOR.w #$FFFF
	CLC
	ADC.w #$0001
	STA.l $801A6C
	LDA.l $801A70
	EOR.w #$FFFF
	ADC.w #$0000
	STA.l $801A6E
	RTS

CODE_A69475:
	LDA.l $801A6E
	STA.l $801A6C
	LDA.l $801A70
	STA.l $801A6E
	RTS

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

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

DATA_A694A4:
	dw $003C,$0024,$0024,$003C,$0024,$003C,$005A,$000F
	dw $0016,$0016,$005A,$005A,$0012,$003C,$0000,$1C00
	dw $1C00,$0000,$0000,$0000,$0000,$0000,$1000,$1000
	dw $1C00,$1C00,$1000,$0000

DATA_A694DC:
	dw DATA_A695BC,DATA_A695F8,DATA_A6968C,DATA_A6970A,DATA_A6971F,DATA_A697AF,DATA_A697C9,DATA_A697E5
	dw DATA_A69868,DATA_A69887,DATA_A698A4,DATA_A698C5,DATA_A698DA,DATA_A69920

DATA_A694F8:
	dw DATA_A695BF,DATA_A6961F,DATA_A6969D,DATA_A69712,DATA_A69746,DATA_A697B2,DATA_A697D2,DATA_A69815
	dw DATA_A6986E,DATA_A69889,DATA_A698A6,DATA_A698C7,DATA_A698E0,DATA_A6992C

DATA_A69514:
	dw $0068,$0050,$0018,$0018,$0050,$0010,$0060,$0050
	dw $0028,$0060,$0010,$0068,$0050,$0010

DATA_A69530:
	dw $00A0,$0050,$0050,$0070,$0050,$0020,$0090,$0050
	dw $00A0,$00A0,$0090,$0030,$00A0,$0088

DATA_A6954C:
	dw $0004,$0005,$0005,$0003,$0005,$0006,$0003,$0004
	dw $0004,$0004,$0006,$000B,$000A,$0005

DATA_A69568:
	dw $005A,$005A,$005A,$005A,$005A,$005A,$005A,$005A
	dw $0046,$00B4,$005A,$005A,$00B4,$005A

DATA_A69584:
	dw $0003,$0006,$0006,$0004,$0003,$0002,$0003,$0005
	dw $0003,$0003,$0002,$0002,$0003,$0002

DATA_A695A0:
	dw $0000,$FFFF,$FFFF,$0000,$FFFF,$0000,$0000,$0000
	dw $FFFF,$FFFF,$0000,$0000,$FFFF,$0000

DATA_A695BC:
	db $46,$4C,$FF

DATA_A695BF:
	db $4C : dw DATA_A695CA
	db $52 : dw DATA_A695E1
	db $46 : dw DATA_A695C9
	db $FF

DATA_A695C9:
	db $FF

DATA_A695CA:
	db $46,$4C,$2D,$46,$52,$2D,$2D,$46,$52,$2B,$46,$4C,$2B,$2B,$46,$4C
	db $46,$4C,$2B,$46,$52,$2D,$FF

DATA_A695E1:
	db $2B,$46,$4C,$2D,$46,$52,$46,$52,$2D,$2D,$46,$52,$2D,$46,$4C,$2B
	db $2B,$46,$4C,$2B,$46,$52,$FF

DATA_A695F8:
	db $5B,$58,$5D,$5B,$59,$5D,$2B,$2B,$5B,$58,$5D,$5B,$59,$5D,$2B,$2B
	db $5B,$58,$5D,$5B,$59,$5D,$2B,$2B,$5B,$58,$5D,$5B,$59,$5D,$2B,$2B
	db $5B,$58,$5D,$5B,$59,$5D,$FF

DATA_A6961F:
	db $57 : dw DATA_A6962F
	db $58 : dw DATA_A69649
	db $59 : dw DATA_A6965D
	db $5A : dw DATA_A69671
	db $46 : dw DATA_A6968B
	db $FF

DATA_A6962F:
	db $59,$46,$2B,$2B,$5A,$46,$2D,$2D,$2D,$2D,$58,$46,$5B,$2D,$59,$46
	db $2D,$2D,$2D,$2D,$57,$46,$5D,$2B,$2B,$FF

DATA_A69649:
	db $2B,$59,$46,$2D,$2D,$5A,$46,$5B,$2D,$2D,$2D,$57,$46,$2D,$2D,$58
	db $46,$5D,$2B,$FF

DATA_A6965D:
	db $2D,$57,$46,$2B,$2B,$58,$46,$5B,$2B,$2B,$2B,$59,$46,$2B,$2B,$5A
	db $46,$5D,$2D,$FF

DATA_A69671:
	db $2D,$2D,$59,$46,$2B,$2B,$2B,$2B,$57,$46,$5B,$2B,$5A,$46,$2B,$2B
	db $2B,$2B,$58,$46,$5D,$2D,$2D,$58,$46,$FF

DATA_A6968B:
	db $FF

DATA_A6968C:
	db $2B,$57,$46,$2D,$2D,$58,$46,$2D,$2D,$2D,$59,$46,$2D,$2D,$5A,$46
	db $FF

DATA_A6969D:
	db $57 : dw DATA_A696AD
	db $58 : dw DATA_A696C7
	db $59 : dw DATA_A696DB
	db $5A : dw DATA_A696EF
	db $46 : dw DATA_A69709
	db $FF

DATA_A696AD:
	db $59,$46,$2B,$2B,$5A,$46,$2D,$2D,$2D,$2D,$58,$46,$5B,$2D,$59,$46
	db $2D,$2D,$2D,$2D,$57,$46,$5D,$2B,$2B,$FF

DATA_A696C7:
	db $2B,$59,$46,$2D,$2D,$5A,$46,$5B,$2D,$2D,$2D,$57,$46,$2D,$2D,$58
	db $46,$5D,$2B,$FF

DATA_A696DB:
	db $2D,$57,$46,$2B,$2B,$58,$46,$5B,$2B,$2B,$2B,$59,$46,$2B,$2B,$5A
	db $46,$5D,$2D,$FF

DATA_A696EF:
	db $2D,$2D,$59,$46,$2B,$2B,$2B,$2B,$57,$46,$5B,$2B,$5A,$46,$2B,$2B
	db $2B,$2B,$58,$46,$5D,$2D,$2D,$58,$46,$FF

DATA_A69709:
	db $FF

DATA_A6970A:
	db $46,$2D,$2D,$46,$2D,$2D,$46,$FF

DATA_A69712:
	db $46 : dw DATA_A69716
	db $FF

DATA_A69716:
	db $46,$2B,$46,$2D,$2D,$46,$2B,$46,$FF

DATA_A6971F:
	db $5B,$58,$5D,$5B,$59,$5D,$2B,$2B,$5B,$58,$5D,$5B,$59,$5D,$2B,$2B
	db $5B,$58,$5D,$5B,$59,$5D,$2B,$2B,$5B,$58,$5D,$5B,$59,$5D,$2B,$2B
	db $5B,$58,$5D,$5B,$59,$5D,$FF

DATA_A69746:
	db $57 : dw DATA_A69753
	db $58 : dw DATA_A6976D
	db $59 : dw DATA_A69781
	db $5A : dw DATA_A69795
	db $FF

DATA_A69753:
	db $59,$46,$2B,$2B,$5A,$46,$2D,$2D,$2D,$2D,$58,$46,$5B,$2D,$59,$46
	db $2D,$2D,$2D,$2D,$57,$46,$5D,$2B,$2B,$FF

DATA_A6976D:
	db $2B,$59,$46,$2D,$2D,$5A,$46,$5B,$2D,$2D,$2D,$57,$46,$2D,$2D,$58
	db $46,$5D,$2B,$FF

DATA_A69781:
	db $2D,$57,$46,$2B,$2B,$58,$46,$5B,$2B,$2B,$2B,$59,$46,$2B,$2B,$5A
	db $46,$5D,$2D,$FF

DATA_A69795:
	db $2D,$2D,$59,$46,$2B,$2B,$2B,$2B,$57,$46,$5B,$2B,$5A,$46,$2B,$2B
	db $2B,$2B,$58,$46,$5D,$2D,$2D,$58,$46,$FF

DATA_A697AF:
	db $59,$46,$FF

DATA_A697B2:
	db $58 : dw DATA_A697B9
	db $59 : dw DATA_A697C1
	db $FF

DATA_A697B9:
	db $59,$46,$2B,$58,$46,$2B,$59,$FF

DATA_A697C1:
	db $58,$46,$2D,$59,$46,$2D,$58,$FF

DATA_A697C9:
	db $46,$2D,$46,$2D,$46,$2D,$46,$2D,$FF

DATA_A697D2:
	db $46 : dw DATA_A697D6
	db $FF

DATA_A697D6:
	db $46,$46,$2D,$46,$2D,$46,$2D,$46,$2D,$46,$2D,$46,$2B,$46,$FF

DATA_A697E5:
	db $58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B
	db $58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B
	db $58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$2B,$58,$FF

DATA_A69815:
	db $58 : dw DATA_A6981C
	db $59 : dw DATA_A69843
	db $FF

DATA_A6981C:
	db $5B,$46,$2B,$46,$2B,$46,$2B,$46,$5B,$2D,$2D,$2D,$58,$2D,$59,$5D
	db $2B,$2B,$2B,$2B,$2B,$46,$2B,$2B,$2B,$2B,$2B,$2B,$2B,$2B,$46,$2D
	db $46,$2D,$46,$2D,$46,$5D,$FF

DATA_A69843:
	db $5B,$46,$2B,$46,$2B,$46,$2B,$46,$5B,$2D,$2D,$2D,$59,$5D,$2B,$2B
	db $2B,$2B,$2B,$46,$2B,$2B,$2B,$2B,$2B,$2B,$2B,$2B,$46,$2D,$46,$2D
	db $46,$2D,$46,$5D,$FF

DATA_A69868:
	db $2D,$2D,$2D,$2D,$46,$FF

DATA_A6986E:
	db $46 : dw DATA_A69872
	db $FF

DATA_A69872:
	db $46,$46,$2B,$5B,$2B,$46,$2D,$46,$2D,$46,$5D,$2D,$5B,$2D,$46,$2B
	db $46,$2B,$46,$5D,$FF

DATA_A69887:
	db $46,$FF

DATA_A69889:
	db $46 : dw DATA_A6988D
	db $FF

DATA_A6988D:
	db $46,$46,$2D,$5B,$2D,$46,$2B,$46,$2B,$46,$5D,$2B,$5B,$2B,$46,$2D
	db $46,$2D,$46,$2D,$46,$5D,$FF

DATA_A698A4:
	db $58,$FF

DATA_A698A6:
	db $58 : dw DATA_A698AD
	db $59 : dw DATA_A698B9
	db $FF

DATA_A698AD:
	db $2D,$59,$46,$2B,$58,$46,$58,$2B,$46,$59,$2D,$FF

DATA_A698B9:
	db $2B,$58,$46,$2D,$59,$46,$59,$2D,$46,$58,$2B,$FF

DATA_A698C5:
	db $58,$FF

DATA_A698C7:
	db $58 : dw DATA_A698CE
	db $59 : dw DATA_A698D4
	db $FF

DATA_A698CE:
	db $58,$2B,$59,$46,$2B,$FF

DATA_A698D4:
	db $2D,$46,$58,$2D,$59,$FF

DATA_A698DA:
	db $53,$4C,$46,$46,$46,$FF

DATA_A698E0:
	db $53 : dw DATA_A698F0
	db $47 : dw DATA_A698FF
	db $48 : dw DATA_A69907
	db $54 : dw DATA_A6990F
	db $4C : dw DATA_A69912
	db $FF

DATA_A698F0:
	db $5B,$2B,$2B,$2B,$47,$5D,$5B,$2D,$2D,$2D,$47,$5D,$54,$53,$FF

DATA_A698FF:
	db $2B,$48,$5B,$2D,$47,$5D,$4C,$FF

DATA_A69907:
	db $2D,$47,$5B,$2B,$48,$5D,$4C,$FF

DATA_A6990F:
	db $54,$4C,$FF

DATA_A69912:
	db $5B,$2D,$46,$46,$46,$5D,$5B,$2B,$46,$46,$46,$5D,$46,$FF

DATA_A69920:
	db $46,$58,$46,$2D,$2D,$46,$46,$2D,$2D,$46,$46,$FF

DATA_A6992C:
	db $58 : dw DATA_A69933
	db $46 : dw DATA_A69945
	db $FF

DATA_A69933:
	db $2D,$2D,$46,$58,$46,$2B,$2B,$46,$58,$46,$2B,$2B,$46,$58,$46,$2D
	db $2D,$FF

DATA_A69945:
	db $46,$46,$FF

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

CODE_A69948:
	PHP
	SEP.b #$30
	JSL.l CODE_A4B5D0
	LDA.b #$33
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	LDA.b #$33
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_BGWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ColorAndObjectWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$A2
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$00
	STA.b $56
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$FF
	STA.b $58
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$1F
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
CODE_A6998B:
	JSL.l CODE_A4B5D0
	LDA.b $56
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b $58
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b $58
	SEC
	SBC.b #$04
	STA.b $58
	LDA.b $56
	CLC
	ADC.b #$04
	STA.b $56
	CMP.b #$84
	BNE.b CODE_A6998B
	JSL.l CODE_A4B5D0
	LDA.b #$0F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b #$00
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
	PLP
	RTL

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

CODE_A699C3:
	PHP
	SEP.b #$30
	JSL.l CODE_A4B5D0
	LDA.b #$33
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	LDA.b #$33
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	LDA.b #$FF
	STA.l !REGISTER_BGWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ColorAndObjectWindowLogicSettings|!FastROMAddressOffset
	LDA.b #$A2
	STA.l !REGISTER_ColorMathInitialSettings|!FastROMAddressOffset
	LDA.b #$80
	STA.b $56
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b #$80
	STA.b $58
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b #$0F
	STA.l !REGISTER_ScreenDisplayRegister|!FastROMAddressOffset
	LDA.b #$1F
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
CODE_A69A0C:
	JSL.l CODE_A4B5D0
	LDA.b $56
	STA.l !REGISTER_Window1LeftPositionDesignation|!FastROMAddressOffset
	LDA.b $58
	STA.l !REGISTER_Window1RightPositionDesignation|!FastROMAddressOffset
	LDA.b $58
	CLC
	ADC.b #$04
	STA.b $58
	LDA.b $56
	SEC
	SBC.b #$04
	STA.b $56
	BNE.b CODE_A69A0C
	JSL.l CODE_A4B5D0
	LDA.b #$00
	STA.l !REGISTER_MainScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_SubScreenWindowMask|!FastROMAddressOffset
	STA.l !REGISTER_BG1And2WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_BG3And4WindowMaskSettings|!FastROMAddressOffset
	STA.l !REGISTER_ObjectAndColorWindowSettings|!FastROMAddressOffset
	PLP
	RTL

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

CODE_A69A48:
	JSL.l CODE_A4B5D0
	DEX
	BNE.b CODE_A69A48
	RTL

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

CODE_A69A50:
	JSL.l CODE_A4D61F
	REP.b #$30
	LDX.w #$003A
CODE_A69A59:
	STZ.w $18D7,x
	LDA.w #$FF38
	STA.l $801622,x
	DEX
	DEX
	BPL.b CODE_A69A59
	RTL

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

DATA_A69A68:
	dw $0000,$011E,$023C,$0359,$0477,$0594,$06B1,$07CD
	dw $08E8,$0A03,$0B1D,$0C36,$0D4E,$0E66,$0F7C,$1090
	dw $11A4,$12B6,$13C7,$14D6,$15E4,$16F0,$17FA,$1902
	dw $1A08,$1B0C,$1C0E,$1D0E,$1E0C,$1F07,$2000,$20F6
	dw $21EA,$22DB,$23CA,$24B5,$259E,$2684,$2767,$2847
	dw $2923,$29FD,$2AD3,$2BA6,$2C75,$2D41,$2E0A,$2ECE
	dw $2F90,$304D,$3107,$31BD,$326F,$331D,$33C7,$346D
	dw $350F,$35AD,$3646,$36DC,$376D,$37FA,$3882,$3906
	dw $3986,$3A01,$3A78,$3AEA,$3B57,$3BC0,$3C24,$3C83
	dw $3CDE,$3D34,$3D85,$3DD2,$3E19,$3E5C,$3E9A,$3ED3
	dw $3F07,$3F36,$3F61,$3F86,$3FA6,$3FC2,$3FD8,$3FEA
	dw $3FF6,$3FFE

DATA_A69B1C:
	dw $4000,$3FFE,$3FF6,$3FEA,$3FD8,$3FC2,$3FA6,$3F86
	dw $3F61,$3F36,$3F07,$3ED3,$3E9A,$3E5C,$3E19,$3DD2
	dw $3D85,$3D34,$3CDE,$3C83,$3C24,$3BC0,$3B57,$3AEA
	dw $3A78,$3A01,$3986,$3906,$3882,$37FA,$376D,$36DC
	dw $3646,$35AD,$350F,$346D,$33C7,$331D,$326F,$31BD
	dw $3107,$304D,$2F90,$2ECE,$2E0A,$2D41,$2C75,$2BA6
	dw $2AD3,$29FD,$2923,$2847,$2767,$2684,$259E,$24B5
	dw $23CA,$22DB,$21EA,$20F6,$2000,$1F07,$1E0C,$1D0E
	dw $1C0E,$1B0C,$1A08,$1902,$17FA,$16F0,$15E4,$14D6
	dw $13C7,$12B6,$11A4,$1090,$0F7C,$0E66,$0D4E,$0C36
	dw $0B1D,$0A03,$08E8,$07CD,$06B1,$0594,$0477,$0359
	dw $023C,$011E,$0000,$FEE2,$FDC4,$FCA7,$FB89,$FA6C
	dw $F94F,$F833,$F718,$F5FD,$F4E3,$F3CA,$F2B2,$F19A
	dw $F084,$EF70,$EE5C,$ED4A,$EC39,$EB2A,$EA1C,$E910
	dw $E806,$E6FE,$E5F8,$E4F4,$E3F2,$E2F2,$E1F4,$E0F9
	dw $E000,$DF0A,$DE16,$DD25,$DC36,$DB4B,$DA62,$D97C
	dw $D899,$D7B9,$D6DD,$D603,$D52D,$D45A,$D38B,$D2BF
	dw $D1F6,$D132,$D070,$CFB3,$CEF9,$CE43,$CD91,$CCE3
	dw $CC39,$CB93,$CAF1,$CA53,$C9BA,$C924,$C893,$C806
	dw $C77E,$C6FA,$C67A,$C5FF,$C588,$C516,$C4A9,$C440
	dw $C3DC,$C37D,$C322,$C2CC,$C27B,$C22E,$C1E7,$C1A4
	dw $C166,$C12D,$C0F9,$C0CA,$C09F,$C07A,$C05A,$C03E
	dw $C028,$C016,$C00A,$C002,$C000,$C002,$C00A,$C016
	dw $C028,$C03E,$C05A,$C07A,$C09F,$C0CA,$C0F9,$C12D
	dw $C166,$C1A4,$C1E7,$C22E,$C27B,$C2CC,$C322,$C37D
	dw $C3DC,$C440,$C4A9,$C516,$C588,$C5FF,$C67A,$C6FA
	dw $C77E,$C806,$C893,$C924,$C9BA,$CA53,$CAF1,$CB93
	dw $CC39,$CCE3,$CD91,$CE43,$CEF9,$CFB3,$D070,$D132
	dw $D1F6,$D2BF,$D38B,$D45A,$D52D,$D603,$D6DD,$D7B9
	dw $D899,$D97C,$DA62,$DB4B,$DC36,$DD25,$DE16,$DF0A
	dw $E000,$E0F9,$E1F4,$E2F2,$E3F2,$E4F4,$E5F8,$E6FE
	dw $E806,$E910,$EA1C,$EB2A,$EC39,$ED4A,$EE5C,$EF70
	dw $F084,$F19A,$F2B2,$F3CA,$F4E3,$F5FD,$F718,$F833
	dw $F94F,$FA6C,$FB89,$FCA7,$FDC4,$FEE2,$0000,$011E
	dw $023C,$0359,$0477,$0594,$06B1,$07CD,$08E8,$0A03
	dw $0B1D,$0C36,$0D4E,$0E66,$0F7C,$1090,$11A4,$12B6
	dw $13C7,$14D6,$15E4,$16F0,$17FA,$1902,$1A08,$1B0C
	dw $1C0E,$1D0E,$1E0C,$1F07,$2000,$20F6,$21EA,$22DB
	dw $23CA,$24B5,$259E,$2684,$2767,$2847,$2923,$29FD
	dw $2AD3,$2BA6,$2C75,$2D41,$2E0A,$2ECE,$2F90,$304D
	dw $3107,$31BD,$326F,$331D,$33C7,$346D,$350F,$35AD
	dw $3646,$36DC,$376D,$37FA,$3882,$3906,$3986,$3A01
	dw $3A78,$3AEA,$3B57,$3BC0,$3C24,$3C83,$3CDE,$3D34
	dw $3D85,$3DD2,$3E19,$3E5C,$3E9A,$3ED3,$3F07,$3F36
	dw $3F61,$3F86,$3FA6,$3FC2,$3FD8,$3FEA,$3FF6,$3FFE

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

CODE_A69DEC:
	REP.b #$30
	LDX.w #$03FE
	LDA.w #$FFFF
CODE_A69DF4:
	STA.l $7FB64C,x
	DEX
	DEX
	BPL.b CODE_A69DF4
	LDA.w #$FFFF
	STA.l $801A80
	RTS

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

CODE_A69E04:
	REP.b #$30
	STZ.w $1A7E
	LDA.w #$FFFF
	STA.l $801A80
	LDY.w #$0004
	LDX.w #$027E
CODE_A69E16:
	LDA.l $7FB64C,x
	BNE.b CODE_A69E21
CODE_A69E1C:
	DEX
	DEX
	BPL.b CODE_A69E16
CODE_A69E20:
	RTS

CODE_A69E21:
	DEY
	BMI.b CODE_A69E20
	LDA.w #$0000
	STA.l $7FB64C,x
	REP.b #$20
	PHX
	PHY
	LDA.l $801A7E
	ASL
	ASL
	TAY
	TXA
	ASL
	TAX
	LDA.w DATA_A69FAF,x
	STA.w $1A80,y
	CLC
	ADC.w #$0020
	STA.w $1A82,y
	LDA.w #$FFFF
	STA.w $1A84,y
	PLY
	PLX
	INC.w $1A7E
	BRA.b CODE_A69E1C

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

CODE_A69E53:
	REP.b #$20
	SEP.b #$10
	LDX.b #$80
	STX.w !REGISTER_VRAMAddressIncrementValue
	LDX.b #$01
	STX.w DMA[$01].Parameters
	LDX.b #!REGISTER_WriteToVRAMPortLo
	STX.w DMA[$01].Destination
	LDX.b #$7F35CC>>16
	STX.w DMA[$01].SourceBank
	LDX.b #$00
CODE_A69E6D:
	LDA.l $801A80,x
	CMP.w #$FFFF
	BEQ.b CODE_A69E97
	LSR
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.l $801A80,x
	CLC
	ADC.w #$7F35CC
	STA.l DMA[$01].SourceLo|!FastROMAddressOffset
	LDY.b #$20
	STY.w DMA[$01].SizeLo
	LDY.b #$02
	STY.w !REGISTER_DMAEnable
	INX
	INX
	CPX.b #$20
	BNE.b CODE_A69E6D
CODE_A69E97:
	RTS

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

CODE_A69E98:					; Note: Routine that draws a fractal pattern.
	LDA.l $801A1D
	CMP.w #$0100
	BCS.b CODE_A69F09
	LDA.l $801A1F
	CMP.w #$00E1
	BCS.b CODE_A69F09
	LDA.l $801A1F
	LSR
	LSR
	AND.w #$FFFE
	TAX
	LDA.l $801A1D
	LSR
	LSR
	LSR
	STA.b $56
	CLC
	ADC.w DATA_A69FAF,x
	TAY
	SEP.b #$20
	LDA.b #$01
	PHX
	TYX
	STA.l $7FB64C,x
	TXY
	PLX
	REP.b #$20
	LDA.b $56
	ASL
	TAY
	LDA.w DATA_A69FAF,y
	CLC
	ADC.w DATA_A6A7AF,x
	STA.b $56
	LDA.l $801A1F
	AND.w #$0007
	ASL
	CLC
	ADC.b $56
	TAX
	LDA.l $801A1D
	AND.w #$0007
	TAY
	LDA.l $801A68
	BMI.b CODE_A69F0A
	SEP.b #$20
	LDA.l $7F35DD,x
	AND.w DATA_A69F9F,y
	ORA.w DATA_A69FA7,y
	STA.l $7F35DD,x
	REP.b #$20
CODE_A69F09:
	RTS

CODE_A69F0A:
	SEP.b #$20
	CLC
	LDA.l $7F35DD,x
	AND.w DATA_A69FA7,y
	BEQ.b CODE_A69F17
	SEC
CODE_A69F17:
	ROL.b $56
	CLC
	LDA.l $7F35DC,x
	AND.w DATA_A69FA7,y
	BEQ.b CODE_A69F24
	SEC
CODE_A69F24:
	ROL.b $56
	CLC
	LDA.l $7F35CD,x
	AND.w DATA_A69FA7,y
	BEQ.b CODE_A69F31
	SEC
CODE_A69F31:
	ROL.b $56
	CLC
	LDA.l $7F35CC,x
	AND.w DATA_A69FA7,y
	BEQ.b CODE_A69F3E
	SEC
CODE_A69F3E:
	ROL.b $56
	LDA.b $56
	AND.b #$0F
	CMP.b #$00
	BNE.b CODE_A69F4E
	INC.b $56
	INC.b $56
	BRA.b CODE_A69F54

CODE_A69F4E:
	CMP.b #$0E
	BEQ.b CODE_A69F54
	INC.b $56
CODE_A69F54:
	LDA.l $7F35CC,x
	AND.w DATA_A69F9F,y
	LSR.b $56
	BCC.b CODE_A69F62
	ORA.w DATA_A69FA7,y
CODE_A69F62:
	STA.l $7F35CC,x
	LDA.l $7F35CD,x
	AND.w DATA_A69F9F,y
	LSR.b $56
	BCC.b CODE_A69F74
	ORA.w DATA_A69FA7,y
CODE_A69F74:
	STA.l $7F35CD,x
	LDA.l $7F35DC,x
	AND.w DATA_A69F9F,y
	LSR.b $56
	BCC.b CODE_A69F86
	ORA.w DATA_A69FA7,y
CODE_A69F86:
	STA.l $7F35DC,x
	LDA.l $7F35DD,x
	AND.w DATA_A69F9F,y
	LSR.b $56
	BCC.b CODE_A69F98
	ORA.w DATA_A69FA7,y
CODE_A69F98:
	STA.l $7F35DD,x
	REP.b #$30
	RTS

DATA_A69F9F:
	db $7F,$BF,$DF,$EF,$F7,$FB,$FD,$FE

DATA_A69FA7:
	db $80,$40,$20,$10,$08,$04,$02,$01

DATA_A69FAF:
	dw $0000,$0020,$0040,$0060,$0080,$00A0,$00C0,$00E0
	dw $0100,$0120,$0140,$0160,$0180,$01A0,$01C0,$01E0
	dw $0200,$0220,$0240,$0260,$0280,$02A0,$02C0,$02E0
	dw $0300,$0320,$0340,$0360,$0380,$03A0,$03C0,$03E0
	dw $0400,$0420,$0440,$0460,$0480,$04A0,$04C0,$04E0
	dw $0500,$0520,$0540,$0560,$0580,$05A0,$05C0,$05E0
	dw $0600,$0620,$0640,$0660,$0680,$06A0,$06C0,$06E0
	dw $0700,$0720,$0740,$0760,$0780,$07A0,$07C0,$07E0
	dw $0800,$0820,$0840,$0860,$0880,$08A0,$08C0,$08E0
	dw $0900,$0920,$0940,$0960,$0980,$09A0,$09C0,$09E0
	dw $0A00,$0A20,$0A40,$0A60,$0A80,$0AA0,$0AC0,$0AE0
	dw $0B00,$0B20,$0B40,$0B60,$0B80,$0BA0,$0BC0,$0BE0
	dw $0C00,$0C20,$0C40,$0C60,$0C80,$0CA0,$0CC0,$0CE0
	dw $0D00,$0D20,$0D40,$0D60,$0D80,$0DA0,$0DC0,$0DE0
	dw $0E00,$0E20,$0E40,$0E60,$0E80,$0EA0,$0EC0,$0EE0
	dw $0F00,$0F20,$0F40,$0F60,$0F80,$0FA0,$0FC0,$0FE0
	dw $1000,$1020,$1040,$1060,$1080,$10A0,$10C0,$10E0
	dw $1100,$1120,$1140,$1160,$1180,$11A0,$11C0,$11E0
	dw $1200,$1220,$1240,$1260,$1280,$12A0,$12C0,$12E0
	dw $1300,$1320,$1340,$1360,$1380,$13A0,$13C0,$13E0
	dw $1400,$1420,$1440,$1460,$1480,$14A0,$14C0,$14E0
	dw $1500,$1520,$1540,$1560,$1580,$15A0,$15C0,$15E0
	dw $1600,$1620,$1640,$1660,$1680,$16A0,$16C0,$16E0
	dw $1700,$1720,$1740,$1760,$1780,$17A0,$17C0,$17E0
	dw $1800,$1820,$1840,$1860,$1880,$18A0,$18C0,$18E0
	dw $1900,$1920,$1940,$1960,$1980,$19A0,$19C0,$19E0
	dw $1A00,$1A20,$1A40,$1A60,$1A80,$1AA0,$1AC0,$1AE0
	dw $1B00,$1B20,$1B40,$1B60,$1B80,$1BA0,$1BC0,$1BE0
	dw $1C00,$1C20,$1C40,$1C60,$1C80,$1CA0,$1CC0,$1CE0
	dw $1D00,$1D20,$1D40,$1D60,$1D80,$1DA0,$1DC0,$1DE0
	dw $1E00,$1E20,$1E40,$1E60,$1E80,$1EA0,$1EC0,$1EE0
	dw $1F00,$1F20,$1F40,$1F60,$1F80,$1FA0,$1FC0,$1FE0
	dw $2000,$2020,$2040,$2060,$2080,$20A0,$20C0,$20E0
	dw $2100,$2120,$2140,$2160,$2180,$21A0,$21C0,$21E0
	dw $2200,$2220,$2240,$2260,$2280,$22A0,$22C0,$22E0
	dw $2300,$2320,$2340,$2360,$2380,$23A0,$23C0,$23E0
	dw $2400,$2420,$2440,$2460,$2480,$24A0,$24C0,$24E0
	dw $2500,$2520,$2540,$2560,$2580,$25A0,$25C0,$25E0
	dw $2600,$2620,$2640,$2660,$2680,$26A0,$26C0,$26E0
	dw $2700,$2720,$2740,$2760,$2780,$27A0,$27C0,$27E0
	dw $2800,$2820,$2840,$2860,$2880,$28A0,$28C0,$28E0
	dw $2900,$2920,$2940,$2960,$2980,$29A0,$29C0,$29E0
	dw $2A00,$2A20,$2A40,$2A60,$2A80,$2AA0,$2AC0,$2AE0
	dw $2B00,$2B20,$2B40,$2B60,$2B80,$2BA0,$2BC0,$2BE0
	dw $2C00,$2C20,$2C40,$2C60,$2C80,$2CA0,$2CC0,$2CE0
	dw $2D00,$2D20,$2D40,$2D60,$2D80,$2DA0,$2DC0,$2DE0
	dw $2E00,$2E20,$2E40,$2E60,$2E80,$2EA0,$2EC0,$2EE0
	dw $2F00,$2F20,$2F40,$2F60,$2F80,$2FA0,$2FC0,$2FE0
	dw $3000,$3020,$3040,$3060,$3080,$30A0,$30C0,$30E0
	dw $3100,$3120,$3140,$3160,$3180,$31A0,$31C0,$31E0
	dw $3200,$3220,$3240,$3260,$3280,$32A0,$32C0,$32E0
	dw $3300,$3320,$3340,$3360,$3380,$33A0,$33C0,$33E0
	dw $3400,$3420,$3440,$3460,$3480,$34A0,$34C0,$34E0
	dw $3500,$3520,$3540,$3560,$3580,$35A0,$35C0,$35E0
	dw $3600,$3620,$3640,$3660,$3680,$36A0,$36C0,$36E0
	dw $3700,$3720,$3740,$3760,$3780,$37A0,$37C0,$37E0
	dw $3800,$3820,$3840,$3860,$3880,$38A0,$38C0,$38E0
	dw $3900,$3920,$3940,$3960,$3980,$39A0,$39C0,$39E0
	dw $3A00,$3A20,$3A40,$3A60,$3A80,$3AA0,$3AC0,$3AE0
	dw $3B00,$3B20,$3B40,$3B60,$3B80,$3BA0,$3BC0,$3BE0
	dw $3C00,$3C20,$3C40,$3C60,$3C80,$3CA0,$3CC0,$3CE0
	dw $3D00,$3D20,$3D40,$3D60,$3D80,$3DA0,$3DC0,$3DE0
	dw $3E00,$3E20,$3E40,$3E60,$3E80,$3EA0,$3EC0,$3EE0
	dw $3F00,$3F20,$3F40,$3F60,$3F80,$3FA0,$3FC0,$3FE0
	dw $4000,$4020,$4040,$4060,$4080,$40A0,$40C0,$40E0
	dw $4100,$4120,$4140,$4160,$4180,$41A0,$41C0,$41E0
	dw $4200,$4220,$4240,$4260,$4280,$42A0,$42C0,$42E0
	dw $4300,$4320,$4340,$4360,$4380,$43A0,$43C0,$43E0
	dw $4400,$4420,$4440,$4460,$4480,$44A0,$44C0,$44E0
	dw $4500,$4520,$4540,$4560,$4580,$45A0,$45C0,$45E0
	dw $4600,$4620,$4640,$4660,$4680,$46A0,$46C0,$46E0
	dw $4700,$4720,$4740,$4760,$4780,$47A0,$47C0,$47E0
	dw $4800,$4820,$4840,$4860,$4880,$48A0,$48C0,$48E0
	dw $4900,$4920,$4940,$4960,$4980,$49A0,$49C0,$49E0
	dw $4A00,$4A20,$4A40,$4A60,$4A80,$4AA0,$4AC0,$4AE0
	dw $4B00,$4B20,$4B40,$4B60,$4B80,$4BA0,$4BC0,$4BE0
	dw $4C00,$4C20,$4C40,$4C60,$4C80,$4CA0,$4CC0,$4CE0
	dw $4D00,$4D20,$4D40,$4D60,$4D80,$4DA0,$4DC0,$4DE0
	dw $4E00,$4E20,$4E40,$4E60,$4E80,$4EA0,$4EC0,$4EE0
	dw $4F00,$4F20,$4F40,$4F60,$4F80,$4FA0,$4FC0,$4FE0
	dw $5000,$5020,$5040,$5060,$5080,$50A0,$50C0,$50E0
	dw $5100,$5120,$5140,$5160,$5180,$51A0,$51C0,$51E0
	dw $5200,$5220,$5240,$5260,$5280,$52A0,$52C0,$52E0
	dw $5300,$5320,$5340,$5360,$5380,$53A0,$53C0,$53E0
	dw $5400,$5420,$5440,$5460,$5480,$54A0,$54C0,$54E0
	dw $5500,$5520,$5540,$5560,$5580,$55A0,$55C0,$55E0
	dw $5600,$5620,$5640,$5660,$5680,$56A0,$56C0,$56E0
	dw $5700,$5720,$5740,$5760,$5780,$57A0,$57C0,$57E0
	dw $5800,$5820,$5840,$5860,$5880,$58A0,$58C0,$58E0
	dw $5900,$5920,$5940,$5960,$5980,$59A0,$59C0,$59E0
	dw $5A00,$5A20,$5A40,$5A60,$5A80,$5AA0,$5AC0,$5AE0
	dw $5B00,$5B20,$5B40,$5B60,$5B80,$5BA0,$5BC0,$5BE0
	dw $5C00,$5C20,$5C40,$5C60,$5C80,$5CA0,$5CC0,$5CE0
	dw $5D00,$5D20,$5D40,$5D60,$5D80,$5DA0,$5DC0,$5DE0
	dw $5E00,$5E20,$5E40,$5E60,$5E80,$5EA0,$5EC0,$5EE0
	dw $5F00,$5F20,$5F40,$5F60,$5F80,$5FA0,$5FC0,$5FE0
	dw $6000,$6020,$6040,$6060,$6080,$60A0,$60C0,$60E0
	dw $6100,$6120,$6140,$6160,$6180,$61A0,$61C0,$61E0
	dw $6200,$6220,$6240,$6260,$6280,$62A0,$62C0,$62E0
	dw $6300,$6320,$6340,$6360,$6380,$63A0,$63C0,$63E0
	dw $6400,$6420,$6440,$6460,$6480,$64A0,$64C0,$64E0
	dw $6500,$6520,$6540,$6560,$6580,$65A0,$65C0,$65E0
	dw $6600,$6620,$6640,$6660,$6680,$66A0,$66C0,$66E0
	dw $6700,$6720,$6740,$6760,$6780,$67A0,$67C0,$67E0
	dw $6800,$6820,$6840,$6860,$6880,$68A0,$68C0,$68E0
	dw $6900,$6920,$6940,$6960,$6980,$69A0,$69C0,$69E0
	dw $6A00,$6A20,$6A40,$6A60,$6A80,$6AA0,$6AC0,$6AE0
	dw $6B00,$6B20,$6B40,$6B60,$6B80,$6BA0,$6BC0,$6BE0
	dw $6C00,$6C20,$6C40,$6C60,$6C80,$6CA0,$6CC0,$6CE0
	dw $6D00,$6D20,$6D40,$6D60,$6D80,$6DA0,$6DC0,$6DE0
	dw $6E00,$6E20,$6E40,$6E60,$6E80,$6EA0,$6EC0,$6EE0
	dw $6F00,$6F20,$6F40,$6F60,$6F80,$6FA0,$6FC0,$6FE0
	dw $7000,$7020,$7040,$7060,$7080,$70A0,$70C0,$70E0
	dw $7100,$7120,$7140,$7160,$7180,$71A0,$71C0,$71E0
	dw $7200,$7220,$7240,$7260,$7280,$72A0,$72C0,$72E0
	dw $7300,$7320,$7340,$7360,$7380,$73A0,$73C0,$73E0
	dw $7400,$7420,$7440,$7460,$7480,$74A0,$74C0,$74E0
	dw $7500,$7520,$7540,$7560,$7580,$75A0,$75C0,$75E0
	dw $7600,$7620,$7640,$7660,$7680,$76A0,$76C0,$76E0
	dw $7700,$7720,$7740,$7760,$7780,$77A0,$77C0,$77E0
	dw $7800,$7820,$7840,$7860,$7880,$78A0,$78C0,$78E0
	dw $7900,$7920,$7940,$7960,$7980,$79A0,$79C0,$79E0
	dw $7A00,$7A20,$7A40,$7A60,$7A80,$7AA0,$7AC0,$7AE0
	dw $7B00,$7B20,$7B40,$7B60,$7B80,$7BA0,$7BC0,$7BE0
	dw $7C00,$7C20,$7C40,$7C60,$7C80,$7CA0,$7CC0,$7CE0
	dw $7D00,$7D20,$7D40,$7D60,$7D80,$7DA0,$7DC0,$7DE0
	dw $7E00,$7E20,$7E40,$7E60,$7E80,$7EA0,$7EC0,$7EE0
	dw $7F00,$7F20,$7F40,$7F60,$7F80,$7FA0,$7FC0,$7FE0

DATA_A6A7AF:
	dw $0000,$0400,$0800,$0C00,$1000,$1400,$1800,$1C00
	dw $2000,$2400,$2800,$2C00,$3000,$3400,$3800,$3C00
	dw $4000,$4400,$4800,$4C00,$5000,$5400,$5800,$5C00
	dw $6000,$6400,$6800,$6C00,$7000,$7400,$7800,$7C00

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

CODE_A6A7EF:
	REP.b #$30
	LDA.l $8018B5
	BEQ.b CODE_A6A842
	LDA.l $8018AF
	CLC
	ADC.w #$0020
	STA.b $E2
	LDA.l $8018B3
	CLC
	ADC.w #$0008
	STA.b $E4
	LDA.w #$00C8
	CMP.b $E2
	BCS.b CODE_A6A842
	CLC
	ADC.w #$0028
	CMP.b $E2
	BCC.b CODE_A6A842
	LDA.w #$00A8
	CMP.b $E4
	BCS.b CODE_A6A842
	CLC
	ADC.w #$0018
	CMP.b $E4
	BCC.b CODE_A6A842
	LDA.w #$FFFF
	STA.l $80164D
	PHA
	PHX
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_ConfirmComputerSelection&$7F)<<8)
	LDY.w #$C00A
	JSL.l CODE_A4EF83
	REP.b #$20
	PLY
	PLX
	PLA
CODE_A6A842:
	RTS

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

CODE_A6A843:
	JSR.w CODE_A6A879
	REP.b #$30
	STZ.w $188B
	STZ.w $188F
	STZ.w $18A3
	STZ.w $1885
	LDA.w #$0003
	STA.l $801887
	LDA.w #$0007
	STA.l $801889
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	ASL
	TAX
	LDA.l DATA_A6AF4F,x
	STA.b $EE
	JSR.w CODE_A6ADC6
	LDA.w #$0001
	STA.l $801893
	RTS

CODE_A6A879:
	REP.b #$30
	LDA.l !RAM_JP_Interior_ComputerTerminalID
	CMP.w #!Define_JP_ComputerID_ShipSublevel2
	BEQ.b CODE_A6A8C1
	CMP.w #!Define_JP_ComputerID_ShipSublevel3
	BEQ.b CODE_A6A8F3
	CMP.w #!Define_JP_ComputerID_RaptorPenGroundLevel
	BNE.b CODE_A6A891
	BRL.w CODE_A6A926

CODE_A6A891:
	CMP.w #!Define_JP_ComputerID_NublarUtilityShed
	BNE.b CODE_A6A899
	BRL.w CODE_A6A959

CODE_A6A899:
	CMP.w #!Define_JP_ComputerID_Misc
	BNE.b CODE_A6A8A1
	BRL.w CODE_A6A96F

CODE_A6A8A1:
	CMP.w #!Define_JP_ComputerID_NorthUtilityShed
	BNE.b CODE_A6A8A9
	BRL.w CODE_A6A985

CODE_A6A8A9:
	CMP.w #!Define_JP_ComputerID_DennisNedryComputer
	BNE.b CODE_A6A8B1
	BRL.w CODE_A6A99B

CODE_A6A8B1:
	CMP.w #!Define_JP_ComputerID_DrWuComputer
	BNE.b CODE_A6A8B9
	BRL.w CODE_A6A9D4

CODE_A6A8B9:
	LDA.w #!Define_JP_ComputerMessage_NoPower
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	RTS

CODE_A6A8C1:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_GiveSecurityLevel2
	BNE.b CODE_A6A8E0
	LDA.l !RAM_JP_Interior_Player_SecurityLevel1FlagLo
	BEQ.b CODE_A6A8D9
	LDA.w #$FFFF
	STA.l !RAM_JP_Interior_Player_SecurityLevel2FlagLo
	BRA.b CODE_A6A8E0

CODE_A6A8D9:
	LDA.w #!Define_JP_ComputerMessage_NeedSecurityLevel1First
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6A8E0:
	JSR.w CODE_A6A9F4
	JSR.w CODE_A6AA24
	JSR.w CODE_A6AA35
	JSR.w CODE_A6AA46
	JSR.w CODE_A6AA65
	JSR.w CODE_A6AAB2
	RTS

CODE_A6A8F3:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_MainlandCommunicationEstablished
	BNE.b CODE_A6A913
	LDA.l !RAM_JP_Global_NerveGasDeployedFlagLo
	BNE.b CODE_A6A90C
	LDA.w #!Define_JP_ComputerMessage_AccessDenied
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	JMP.w CODE_A6A913

CODE_A6A90C:
	LDA.w #$FFFF
	STA.l !RAM_JP_Global_MainlandContactedFlagLo
CODE_A6A913:
	JSR.w CODE_A6A9F4
	JSR.w CODE_A6AA05
	JSR.w CODE_A6AA35
	JSR.w CODE_A6AA46
	JSR.w CODE_A6AA65
	JSR.w CODE_A6AAB2
	RTS

CODE_A6A926:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_ShipCommunicationEstablished
	BNE.b CODE_A6A946
	LDA.l !RAM_JP_Global_VisitorCenterSecuredLo
	BNE.b CODE_A6A93F
	LDA.w #!Define_JP_ComputerMessage_AccessDenied
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	JMP.w CODE_A6A946

CODE_A6A93F:
	LDA.w #$FFFF
	STA.l !RAM_JP_Interior_ShipContactedFlagLo
CODE_A6A946:
	JSR.w CODE_A6A9F4
	JSR.w CODE_A6AA05
	JSR.w CODE_A6AA24
	JSR.w CODE_A6AA46
	JSR.w CODE_A6AA65
	JSR.w CODE_A6AAB2
	RTS

CODE_A6A959:
	JSR.w CODE_A6A9F4
	JSR.w CODE_A6AA05
	JSR.w CODE_A6AA24
	JSR.w CODE_A6AA35
	JSR.w CODE_A6AA46
	JSR.w CODE_A6AA65
	JSR.w CODE_A6AAB2
	RTS

CODE_A6A96F:
	JSR.w CODE_A6A9F4
	JSR.w CODE_A6AA05
	JSR.w CODE_A6AA24
	JSR.w CODE_A6AA35
	JSR.w CODE_A6AA46
	JSR.w CODE_A6AA65
	JSR.w CODE_A6AAB2
	RTS

CODE_A6A985:
	JSR.w CODE_A6A9F4
	JSR.w CODE_A6AA05
	JSR.w CODE_A6AA24
	JSR.w CODE_A6AA35
	JSR.w CODE_A6AA46
	JSR.w CODE_A6AA65
	JSR.w CODE_A6AAB2
	RTS

CODE_A6A99B:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_MainMenu
	BNE.b CODE_A6A9AB
	LDA.w #$FFFF
	STA.l !RAM_JP_Global_MainSystemRestoredFlagLo
CODE_A6A9AB:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_RebootMainSystemPrompt
	BNE.b CODE_A6A9C1
	LDA.l !RAM_JP_Global_GeneratorIsOnFlagLo
	BNE.b CODE_A6A9C1
	LDA.w #!Define_JP_ComputerMessage_NoPower
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6A9C1:
	JSR.w CODE_A6A9F4
	JSR.w CODE_A6AA05
	JSR.w CODE_A6AA24
	JSR.w CODE_A6AA35
	JSR.w CODE_A6AA65
	JSR.w CODE_A6AAB2
	RTS

CODE_A6A9D4:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_GiveSecurityLevel1
	BNE.b CODE_A6A9E4
	LDA.w #$FFFF
	STA.l !RAM_JP_Interior_Player_SecurityLevel1FlagLo
CODE_A6A9E4:
	JSR.w CODE_A6AA05
	JSR.w CODE_A6AA24
	JSR.w CODE_A6AA35
	JSR.w CODE_A6AA46
	JSR.w CODE_A6AAB2
	RTS

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

CODE_A6A9F4:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_GiveSecurityLevel1
	BNE.b CODE_A6AA04
	LDA.w #!Define_JP_ComputerMessage_ClearanceDeniedFromThisConsole
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6AA04:
	RTS

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

CODE_A6AA05:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_GiveSecurityLevel2
	BNE.b CODE_A6AA1B
	LDA.l !RAM_JP_Interior_Player_SecurityLevel1FlagLo
	BEQ.b CODE_A6AA1C
	LDA.w #!Define_JP_ComputerMessage_ClearanceDeniedFromThisConsole
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6AA1B:
	RTS

CODE_A6AA1C:
	LDA.w #!Define_JP_ComputerMessage_NeedSecurityLevel1First
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	RTS

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

CODE_A6AA24:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_MainlandCommunicationEstablished
	BNE.b CODE_A6AA34
	LDA.w #!Define_JP_ComputerMessage_AccessDeniedFromThisConsole
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6AA34:
	RTS

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

CODE_A6AA35:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_ShipCommunicationEstablished
	BNE.b CODE_A6AA45
	LDA.w #!Define_JP_ComputerMessage_AccessDeniedFromThisConsole
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6AA45:
	RTS

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

CODE_A6AA46:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_RebootMainSystemPrompt
	BNE.b CODE_A6AA5C
	LDA.l !RAM_JP_Global_GeneratorIsOnFlagLo
	BEQ.b CODE_A6AA5D
	LDA.w #!Define_JP_ComputerMessage_CantBootFromThisConsole
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6AA5C:
	RTS

CODE_A6AA5D:
	LDA.w #!Define_JP_ComputerMessage_NoPower
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	RTS

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

CODE_A6AA65:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_Gate1Open
	BEQ.b CODE_A6AA79
	CMP.w #!Define_JP_ComputerMessage_Gate2Open
	BEQ.b CODE_A6AA8C
	CMP.w #!Define_JP_ComputerMessage_Gate3Open
	BEQ.b CODE_A6AA9F
	RTS

CODE_A6AA79:
	LDA.w #$0001
	STA.l !RAM_JP_Exterior_Gate1OpenFlagLo
	LDA.w #$0000
	STA.l !RAM_JP_Exterior_Gate2OpenFlagLo
	STA.l !RAM_JP_Exterior_Gate3OpenFlagLo
	RTS

CODE_A6AA8C:
	LDA.w #$0001
	STA.l !RAM_JP_Exterior_Gate2OpenFlagLo
	LDA.w #$0000
	STA.l !RAM_JP_Exterior_Gate1OpenFlagLo
	STA.l !RAM_JP_Exterior_Gate3OpenFlagLo
	RTS

CODE_A6AA9F:
	LDA.w #$0001
	STA.l !RAM_JP_Exterior_Gate3OpenFlagLo
	LDA.w #$0000
	STA.l !RAM_JP_Exterior_Gate1OpenFlagLo
	STA.l !RAM_JP_Exterior_Gate2OpenFlagLo
	RTS

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

CODE_A6AAB2:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	CMP.w #!Define_JP_ComputerMessage_EnableMotionSensors
	BNE.b CODE_A6AAC2
	LDA.w #$FFFF
	STA.l !RAM_JP_Exterior_MotionSensorActiveFlagLo
CODE_A6AAC2:
	RTS

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

CODE_A6AAC3:
	REP.b #$30
	JSR.w CODE_A6ADD8
	LDA.l $80188B
	BEQ.b CODE_A6AAEA
	LDA.w #$58E2
	CLC
	ADC.l $80188D
	STA.l $801891
	INC.w $188D
	LDA.l $80188D
	CMP.w #$0014
	BNE.b CODE_A6AAE9
	STZ.w $188B
CODE_A6AAE9:
	RTS

CODE_A6AAEA:
	JSR.w CODE_A6AAF7
	LDA.l $80188B
	BNE.b CODE_A6AAE9
	JSR.w CODE_A6AAF7
	RTS

CODE_A6AAF7:
	LDA.l $801893
	BEQ.b CODE_A6AB06
	LDA.l $80188F
	BEQ.b CODE_A6AB07
	DEC.w $188F
CODE_A6AB06:
	RTS

CODE_A6AB07:
	LDA.l $8018A3
	BNE.b CODE_A6AB10
	BRL.w CODE_A6AB97

CODE_A6AB10:
	LDY.w $1885
	LDA.l $801899
	CLC
	ADC.l $8018A1
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.l $801897
	CLC
	ADC.l $80189F
	CLC
	ADC.w #$5800
	STA.w $1865,y
	LDA.l $8018A9
	CLC
	ADC.l $8018A1
	ASL
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.l $8018A7
	CLC
	ADC.l $80189F
	CLC
	ADC.l $8018A7
	CLC
	ADC.l $80189F
	TAX
	LDA.l DATA_ACF800,x
	AND.w #$E3FF
	STA.w $1845,y
	INC.w $18A5
	INC.w $18A5
	INC.w $189F
	LDA.w $189F
	CMP.l $80189B
	BNE.b CODE_A6AB85
	STZ.w $189F
	INC.w $18A1
	LDA.l $8018A1
	CMP.l $80189D
	BNE.b CODE_A6AB85
	STZ.w $18A3
CODE_A6AB85:
	INC.w $1885
	INC.w $1885
	LDA.l $801885
	AND.w #$001F
	STA.l $801885
	RTS

CODE_A6AB97:
	LDY.w $00EE
	LDA.w DATA_A6AFB3,y
	AND.w #$00FF
	CMP.w #$0002
	BNE.b CODE_A6ABC3
	LDA.w #$0003
	STA.l $801887
	LDA.w #$0007
	STA.l $801889
	STZ.w $188D
	JSR.w CODE_A6ADC6
	LDA.w #$0001
	STA.l $80188B
	JMP.w CODE_A6AD9E

CODE_A6ABC3:
	CMP.w #$0004
	BNE.b CODE_A6AC3B
	REP.b #$20
	PHA
	PHX
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_ComputerBeep&$7F)<<8)
	LDY.w #$C00A
	JSL.l CODE_A4EF83
	REP.b #$20
	PLY
	PLX
	PLA
	LDA.w DATA_A6AFB3+$01,y
	AND.w #$00FF
	STA.l $801897
	LDA.w DATA_A6AFB3+$02,y
	AND.w #$00FF
	STA.l $801899
	LDA.w DATA_A6AFB3+$03,y
	AND.w #$00FF
	TAX
	LDA.w DATA_A6AF1F,x
	AND.w #$00FF
	STA.l $80189B
	LDA.w DATA_A6AF1F+$01,x
	AND.w #$00FF
	STA.l $80189D
	LDA.w DATA_A6AF1F+$02,x
	AND.w #$00FF
	STA.l $8018A7
	LDA.w DATA_A6AF1F+$03,x
	AND.w #$00FF
	STA.l $8018A9
	STZ.w $189F
	STZ.w $18A1
	LDA.w #$0001
	STA.l $8018A3
	INC.w $00EE
	INC.w $00EE
	INC.w $00EE
	INC.w $00EE
	BRL.w CODE_A6ADA1

CODE_A6AC3B:
	CMP.w #$0005
	BNE.b CODE_A6AC60
	LDA.w DATA_A6AFB3+$01,y
	AND.w #$00FF
	STA.l $801887
	LDA.w DATA_A6AFB3+$02,y
	AND.w #$00FF
	STA.l $801889
	INC.w $00EE
	INC.w $00EE
	INC.w $00EE
	BRL.w CODE_A6ADA1

CODE_A6AC60:
	CMP.w #$0000
	BNE.b CODE_A6AC72
	INC.w $1889
	LDA.w #$0003
	STA.l $801887
	JMP.w CODE_A6AD9E

CODE_A6AC72:
	CMP.w #$0003
	BNE.b CODE_A6AC81
	LDA.w #$0000
	STA.l $801893
	JMP.w CODE_A6ADA1

CODE_A6AC81:
	CMP.w #$0001
	BNE.b CODE_A6AC90
	LDA.w #$003C
	STA.l $80188F
	JMP.w CODE_A6AD9E

CODE_A6AC90:
	CMP.w #$0020
	BNE.b CODE_A6AC9B
	INC.w $1887
	JMP.w CODE_A6AD9E

CODE_A6AC9B:
	CMP.w #$002E
	BNE.b CODE_A6ACA6
	LDA.w #$0025
	BRL.w CODE_A6AD6D

CODE_A6ACA6:
	CMP.w #$002D
	BNE.b CODE_A6ACB1
	LDA.w #$0026
	BRL.w CODE_A6AD6D

CODE_A6ACB1:
	CMP.w #$0027
	BNE.b CODE_A6ACBC
	LDA.w #$0034
	BRL.w CODE_A6AD6D

CODE_A6ACBC:
	CMP.w #$0006
	BNE.b CODE_A6ACDA
	LDA.l !RAM_JP_Interior_Player_SecurityLevel2FlagLo
	BNE.b CODE_A6ACD2
	LDA.l !RAM_JP_Interior_Player_SecurityLevel1FlagLo
	BNE.b CODE_A6ACD7
	LDA.w #$0030
	BRA.b CODE_A6ACDA

CODE_A6ACD2:
	LDA.w #$0032
	BRA.b CODE_A6ACDA

CODE_A6ACD7:
	LDA.w #$0031
CODE_A6ACDA:
	CMP.w #$0007
	BCC.b CODE_A6AD00
	CMP.w #$0010
	BCS.b CODE_A6AD00
	SEC
	SBC.w #$0007
	ASL
	TAX
	LDA.l !RAM_JP_Global_Player_CollectedIDCardTable,x
	BEQ.b CODE_A6ACF3
	BRL.w CODE_A6AD9E

CODE_A6ACF3:
	LDA.w $00EE
	CLC
	ADC.w #$0008
	STA.w $00EE
	BRL.w CODE_A6AD9E

CODE_A6AD00:
	CMP.w #$0011
	BNE.b CODE_A6AD1B
	LDA.l !RAM_JP_Interior_CanEnterDarkRoomSafelyFlagLo
	BEQ.b CODE_A6AD0E
	BRL.w CODE_A6AD9E

CODE_A6AD0E:
	LDA.w $00EE
	CLC
	ADC.w #$000F
	STA.w $00EE
	BRL.w CODE_A6AD9E

CODE_A6AD1B:
	CMP.w #$0030
	BCC.b CODE_A6AD2C
	CMP.w #$003A
	BCS.b CODE_A6AD2C
	SEC
	SBC.w #$0015
	JMP.w CODE_A6AD6D

CODE_A6AD2C:
	CMP.w #$007F
	BCC.b CODE_A6AD4E
	SEC
	SBC.w #$0080
	REP.b #$30
	AND.w #$00FF
	TAX
	LDA.l DATA_A6ADA2,x
	AND.w #$00FF
	ASL
	TAX
	LDA.l DATA_ACF800,x
	AND.w #$E3FF
	BRL.w CODE_A6AD6D

CODE_A6AD4E:
	SEC
	SBC.w #$0060
	REP.b #$20
	PHA
	PHX
	PHY
	LDA.b $EA
	AND.w #$0003
	BNE.b CODE_A6AD6A
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_ComputerPrintText&$7F)<<8)
	LDY.w #$FF0A
	JSL.l CODE_A4EF83
	REP.b #$20
CODE_A6AD6A:
	PLY
	PLX
	PLA
CODE_A6AD6D:
	LDX.w $1885
	STA.l $801845,x
	LDA.l $801889
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.l $801887
	CLC
	ADC.w #$5800
	STA.l $801865,x
	INC.w $1887
	INC.w $1885
	INC.w $1885
	LDA.l $801885
	AND.w #$001F
	STA.l $801885
CODE_A6AD9E:
	INC.w $00EE
CODE_A6ADA1:
	RTS

DATA_A6ADA2:
	dw $3300,$2B27,$2932,$0000,$0000,$002A,$0000,$0032
	dw $2F27,$2800,$3531,$0000,$3100,$0033,$0000,$0000
	dw $002E,$2D2C

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

CODE_A6ADC6:
	LDX.w #$001E
	LDA.w #$FFFF
CODE_A6ADCC:
	STA.l $801865,x
	DEX
	DEX
	BPL.b CODE_A6ADCC
	STZ.w $1885
	RTS

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

CODE_A6ADD8:
	REP.b #$30
	LDX.w #$001E
CODE_A6ADDD:
	LDA.l $801845,x
	AND.w #$1C00
	CLC
	ADC.w #$0400
	AND.w #$1C00
	BNE.b CODE_A6ADF0
	LDA.w #$1C00
CODE_A6ADF0:
	STA.b $E2
	LDA.l $801845,x
	AND.w #$E3FF
	ORA.b $E2
	STA.l $801845,x
	DEX
	DEX
	BPL.b CODE_A6ADDD
	RTS

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

CODE_A6AE04:
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	REP.b #$30
	LDX.w #$001E
CODE_A6AE11:
	LDA.l $801865,x
	BMI.b CODE_A6AE23
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.l $801845,x
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
CODE_A6AE23:
	DEX
	DEX
	BPL.b CODE_A6AE11
	RTS

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

CODE_A6AE28:
	REP.b #$30
	JSR.w CODE_A6AE6B
	BCC.b CODE_A6AE57
	REP.b #$20
	PHA
	PHX
	PHY
	LDA.w #!Define_JP_SoundCommand_PlaySound+((!Define_JP_SoundID_ConfirmComputerSelection&$7F)<<8)
	LDY.w #$C00A
	JSL.l CODE_A4EF83
	REP.b #$20
	PLY
	PLX
	PLA
	LDA.l $8018AB
	AND.w #$0080
	BNE.b CODE_A6AE58
	LDA.l $8018AB
	STA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	JSR.w CODE_A6A843
CODE_A6AE57:
	RTS

CODE_A6AE58:
	LDA.l $8018AB
	AND.w #$007F
	STA.l $8018D5
	LDA.w #$0001
	STA.l $80164D
	RTS

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

CODE_A6AE6B:
	REP.b #$30
	LDA.l $8018B5
	BEQ.b CODE_A6AE79
	LDA.l $801893
	BEQ.b CODE_A6AE7B
CODE_A6AE79:
	CLC
	RTS

CODE_A6AE7B:
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
	ASL
	TAX
	LDA.l DATA_A6AF81,x
	TAX
CODE_A6AE86:
	TXY
	LDA.l DATA_A6AFB3,x
	AND.w #$00FF
	CMP.w #$0003
	BEQ.b CODE_A6AE79
	LDA.l DATA_A6AFB3+$01,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.l $801897
	LDA.l DATA_A6AFB3+$02,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.l $801899
	LDA.l DATA_A6AFB3+$04,x
	AND.w #$00FF
	STA.l $8018AB
	LDA.l DATA_A6AFB3+$03,x
	AND.w #$00FF
	TAX
	LDA.l DATA_A6AF1F,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.l $80189B
	LDA.l DATA_A6AF1F+$01,x
	AND.w #$00FF
	ASL
	ASL
	ASL
	STA.l $80189D
	LDA.l $8018AF
	CLC
	ADC.w #$0020
	STA.b $E2
	LDA.l $8018B3
	CLC
	ADC.w #$0008
	STA.b $E4
	LDA.l $801897
	CMP.b $E2
	BCS.b CODE_A6AF16
	CLC
	ADC.l $80189B
	CMP.b $E2
	BCC.b CODE_A6AF16
	LDA.l $801899
	CMP.b $E4
	BCS.b CODE_A6AF16
	CLC
	ADC.l $80189D
	CMP.b $E4
	BCC.b CODE_A6AF16
	SEC
	RTS

CODE_A6AF16:
	TYA
	CLC
	ADC.w #$0005
	TAX
	BRL.w CODE_A6AE86

DATA_A6AF1F:
	db $02,$02,$00,$02,$03,$03,$02,$02
	db $14,$04,$00,$05,$06,$04,$00,$0A
	db $03,$03,$11,$02,$03,$03,$0E,$02
	db $03,$03,$0B,$02,$03,$03,$08,$02
	db $03,$03,$05,$02,$10,$0F,$00,$0C
	db $03,$03,$14,$02,$03,$03,$17,$02

DATA_A6AF4F:
	dw $0000,$0080,$00D9,$0130,$0199,$01EF,$0245,$027B
	dw $02DC,$037F,$03B7,$043E,$0470,$04A2,$04D8,$0517
	dw $058C,$0600,$068D,$071A,$07A7,$07DB,$087E,$0922
	dw $09B5

DATA_A6AF81:
	dw $007F,$00D3,$011B,$0184,$01DF,$0230,$0275,$02C7
	dw $0351,$03B1,$042E,$046A,$049C,$04D2,$0511,$0586
	dw $05FA,$0687,$0714,$07A1,$07DA,$0878,$091C,$09AF
	dw $09CC

DATA_A6AFB3:
	db $02
	db "bios load.."
	db $01,$00,$00
	db "message"
	db $00,$00
	db "error-"
	db $00
	db "main system down."
	db $00,$00
	db "action-"
	db $00
	db "turn on generator."
	db $00
	db "before trying to"
	db $00
	db "reboot system"
	db $00,$00,$00
	db "message ends..."
	db $01,$03,$03,$02
	db "bios load.."
	db $01,$00,$00
	db "power on"
	db $00
	db "jurassic park v1.0"
	db $00,$00
	db "go fract."
	db $00,$04,$03,$0F,$10,$05,$07,$0F
	db "reboot"
	db $05,$07,$10
	db "main system"
	db $01,$03,$04,$03,$0F,$04,$02,$03,$02,$04,$02,$07,$08,$04,$03,$0D
	db $28,$04,$03,$11,$18,$04,$03,$15
	db " "
	db $05,$07,$0E
	db "park control"
	db $05,$07,$12
	db "communications"
	db $05,$07,$16
	db "user options"
	db $01,$03,$04,$03,$07,$04,$02,$04,$03,$0D,$04,$03,$04,$03,$11,$04
	db $04,$04,$03,$15,$04,$05,$03,$02,$04,$03,$07,$28,$05,$07,$08
	db "control menu"
	db $04,$03,$0D,$14,$04,$03,$11,$14,$04,$03,$15,$14,$05,$07,$0E
	db "motion sensors"
	db $05,$07,$12
	db "gate operation"
	db $05,$07,$16
	db "park security"
	db $01,$03,$04,$03,$07,$04,$02,$04,$03,$0D,$04,$09,$04,$03,$11,$04
	db $07,$04,$03,$15,$04,$0A,$03,$02,$04,$03,$07,$18,$05,$07,$07
	db "communications"
	db $05,$07,$08
	db "menu"
	db $00,$04,$03,$0D,$14,$04,$03,$11,$14,$05,$07,$0E
	db "mainland comms"
	db $05,$07,$12
	db "ship comms"
	db $01,$03,$04,$03,$07,$04,$02,$04,$03,$0D,$04,$10,$04,$03,$11,$04
	db $0F,$03,$02,$04,$03,$07
	db " "
	db $05,$07,$08
	db "user options"
	db $00,$04,$03,$0D,$2C,$04,$03,$11,$14,$04,$03,$15,$04,$05,$07,$0E
	db "fractals"
	db $05,$07,$12
	db "inventory"
	db $05,$07,$16
	db "help"
	db $01,$03,$04,$03,$07,$04,$02,$04,$03,$0D,$04,$08,$04,$03,$11,$04
	db $17,$04,$03,$15,$04,$15,$03,$02,$04,$03,$0D,$1C,$05,$07,$0D
	db "access denied"
	db $05,$07,$0E
	db "from this"
	db $05,$07,$0F
	db "console..."
	db $01,$03,$04,$03,$0D,$1C,$02,$03,$02,$04,$12,$07,$04,$05,$13,$08
	db "1"
	db $04,$12,$0B,$04,$05,$13,$0C
	db "2"
	db $04,$12,$0F,$04,$05,$13,$10
	db "3"
	db $04,$02,$07,$24,$04,$03,$16,$28,$05,$07,$16
	db "click on box to"
	db $05,$07,$17
	db "open selected"
	db $05,$07,$18
	db "gate"
	db $01,$03,$04,$12,$07,$04,$11,$04,$12,$0B,$04,$12,$04,$12,$0F,$04
	db $13,$04,$03,$16,$04,$02,$03,$02,$04,$03,$07,$2C,$05,$07,$08
	db "fractals"
	db $00,$04,$03,$0C,$14,$04,$03,$0F,$14,$04,$03,$12,$14,$04,$03,$15
	db $14,$05,$06,$0D
	db "tree"
	db $05,$06,$10
	db "bush"
	db $05,$06,$13
	db "dragon"
	db $05,$06,$16
	db "flow"
	db $04,$0D,$0C,$14,$04,$0D,$0F,$14,$04,$0D,$12,$14,$04,$0D,$15,$14
	db $05,$10,$0D
	db "pen"
	db $05,$10,$10
	db "spikey"
	db $05,$10,$11
	db "tree"
	db $05,$10,$13
	db "burt"
	db $05,$10,$16
	db "tile"
	db $01,$03,$04,$03,$07,$2C,$02,$04,$03,$0C,$14,$8C,$04,$03,$0F,$14
	db $89,$04,$03,$12,$14,$8B,$04,$03,$15,$14,$80,$04,$0D,$0C,$14,$81
	db $04,$0D,$0F,$14,$83,$04,$0D,$12,$14,$8A,$04,$0D,$15,$14,$88,$03
	db $02,$04,$03,$0D,$28,$05,$07,$0D
	db "the motion"
	db $05,$07,$0E
	db "sensors have"
	db $05,$07,$0F
	db "been enabled"
	db $01,$03,$04,$03,$0D,$28,$02,$03,$02,$04,$03,$07,$1C,$05,$07,$09
	db "park security"
	db $00,$00
	db "user has security"
	db $00
	db "level "
	db $06,$00,$04,$03,$0E,$04,$04,$03,$12,$04,$05,$07,$0E
	db "request level 1"
	db $05,$07,$0F
	db "clearance"
	db $05,$07,$12
	db "request level 2"
	db $05,$07,$13
	db "clearance"
	db $01,$03,$04,$03,$07,$04,$02,$04,$03,$0E,$04,$0B,$04,$03,$12,$04
	db $0C,$03,$02,$04,$03,$0D,$1C,$05,$07,$0D
	db "user now has"
	db $05,$07,$0E
	db "level 1"
	db $05,$07,$0F
	db "clearance"
	db $01,$03,$04,$03,$0D,$1C,$02,$03,$02,$04,$03,$0D,$1C,$05,$07,$0D
	db "user now has"
	db $05,$07,$0E
	db "level 2"
	db $05,$07,$0F
	db "clearance"
	db $01,$03,$04,$03,$0D,$1C,$02,$03,$02,$04,$03,$0D,$1C,$05,$07,$0D
	db "clearance"
	db $05,$07,$0E
	db "denied from"
	db $05,$07,$0F
	db "this console"
	db $01,$03,$04,$03,$0D,$1C,$02,$03,$02,$04,$03,$0D,$1C,$05,$03,$11
	db "clearance 2 denied"
	db $00
	db "user must have"
	db $00
	db "level 1 first"
	db $01,$03,$04,$03,$0D,$1C,$02,$03,$02,$04,$03,$07,$18,$05,$03,$0B
	db "ship auto pilot"
	db $00
	db "engaged."
	db $01,$00,$00
	db "sailing procedure"
	db $00
	db "cancelled."
	db $01,$00,$00
	db "ship will remain"
	db $00
	db "in dock."
	db $01,$00,$00
	db "message ends..."
	db $01,$03,$04,$03,$07,$1C,$02,$03,$02,$04,$03,$07,$18,$05,$03,$0B
	db "mainland contacted."
	db $00,$00
	db "sos sent..."
	db $01,$01,$00,$00
	db "the helicopter is"
	db $00
	db "on its way."
	db $01,$00,$00
	db "go to helipad."
	db $01,$00,$00
	db "message ends..."
	db $01,$03,$04,$03,$07,$1C,$02,$03,$02,$04,$03,$07,$28,$05,$03,$0B
	db "warning.."
	db $01,$00
	db "gate 1 lock has"
	db $00
	db "been disabled and"
	db $00
	db "now can be opened."
	db $01,$00,$00
	db "locks on gates 2"
	db $00
	db "and 3 have been"
	db $00
	db "closed..."
	db $00,$00
	db "message ends..."
	db $01,$03,$04,$03,$07,$1C,$07,$03,$02,$04,$03,$07,$28,$05,$03,$0B
	db "warning.."
	db $01,$00
	db "gate 2 lock has"
	db $00
	db "been disabled and"
	db $00
	db "now can be opened."
	db $01,$00,$00
	db "locks on gates 1"
	db $00
	db "and 3 have been"
	db $00
	db "closed..."
	db $00,$00
	db "message ends..."
	db $01,$03,$04,$03,$07,$1C,$07,$03,$02,$04,$03,$07,$28,$05,$03,$0B
	db "warning.."
	db $01,$00
	db "gate 3 lock has"
	db $00
	db "been disabled and"
	db $00
	db "now can be opened."
	db $01,$00,$00
	db "locks on gates 1"
	db $00
	db "and 2 have been"
	db $00
	db "closed..."
	db $00,$00
	db "message ends..."
	db $01,$03,$04,$03,$07,$1C,$07,$03,$02,$04,$03,$0D,$1C,$05,$07,$0D
	db "system cannot"
	db $05,$07,$0E
	db "boot from this"
	db $05,$07,$0F
	db "console."
	db $01,$03,$03,$02,$04,$03,$07
	db " "
	db $05,$07,$08
	db "system help"
	db $00,$05,$03,$0B
	db "use select button"
	db $00
	db "to toggle between"
	db $00
	db "weapon 1 and"
	db $00
	db "cattle prod."
	db $00,$00
	db "clicking on the"
	db $00
	db "icon in the top"
	db $00
	db "left will take you"
	db $00
	db "to the main menu."
	db $00,$01,$03,$04,$03,$07,$04,$16,$03,$02,$04,$03,$07
	db " "
	db $05,$07,$08
	db "system help"
	db $00,$05,$03,$0B
	db "on the outside"
	db $00
	db "the l or r buttons"
	db $00
	db "will remove any"
	db $00
	db "message box."
	db $00,$00
	db "use the l and r"
	db $00
	db "buttons to fine"
	db $00
	db "tune your"
	db $00
	db "direction in the"
	db $00
	db "interiors."
	db $01,$03,$04,$03,$07,$04,$02,$03,$02,$04,$03,$07
	db " "
	db $05,$07,$08
	db "user inventory"
	db $00,$05,$03,$0B
	db "id cards held"
	db $00,$00,$07
	db "hammond"
	db $00,$08
	db "ellie  "
	db $00,$09
	db "muldoon"
	db $00,$0A
	db "grant  "
	db $00,$0B
	db "gennaro"
	db $00,$0C
	db "arnold "
	db $00,$0D
	db "nedry  "
	db $00,$0E
	db "wu     "
	db $00,$0F
	db "malcolm"
	db $00,$00,$11
	db "goggles charged"
	db $01,$03,$04,$03,$07,$04,$02,$03,$02,$04,$03,$0D,$1C,$05,$07,$0D
	db "access denied"
	db $01,$03,$04,$03,$0D,$1C,$02,$03

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

DATA_A6B985:
	dw CODE_A6BA29

CODE_A6B987:
	JSL.l CODE_A4D61F
	REP.b #$30
	LDA.w #!RAM_JP_Interior_OAMBuffer
	STA.l $801628
	LDA.b $DC
	STA.l $801A03
	TAX
	SEC
	SBC.w #$0060
	BPL.b CODE_A6B9A4
	LDA.w #$0000
CODE_A6B9A4:
	STA.b $E2
	TXA
	CLC
	ADC.w #$0120
	STA.b $E4
	LDA.b $DE
	STA.l $801A05
	TAX
	SEC
	SBC.w #$0060
	BPL.b CODE_A6B9BD
	LDA.w #$0000
CODE_A6B9BD:
	STA.b $E6
	TXA
	CLC
	ADC.w #$0100
	STA.b $E8
	LDY.w #$003A
CODE_A6B9C9:
	LDA.w $1913,y
	CMP.b $E2
	BMI.b CODE_A6B9DF
	CMP.b $E4
	BCS.b CODE_A6B9DF
	LDA.w $194F,y
	CMP.b $E6
	BMI.b CODE_A6B9DF
	CMP.b $E8
	BCC.b CODE_A6B9E4
CODE_A6B9DF:
	DEY
	DEY
	BPL.b CODE_A6B9C9
	RTL

CODE_A6B9E4:
	LDA.w $198B,y
	AND.w #$00FF
	CMP.w #$FFFF
	BEQ.b CODE_A6B9DF
	LDA.w $18D7,y
	BEQ.b CODE_A6B9DF
	LDA.w $1913,y
	SEC
	SBC.l $801A03
	BPL.b CODE_A6BA05
	CMP.w #$FFC0
	BCS.b CODE_A6BA0A
	BRA.b CODE_A6B9DF

CODE_A6BA05:
	CMP.w #$0100
	BCS.b CODE_A6B9DF
CODE_A6BA0A:
	STA.l $801A07
	LDA.w $198B,y
	AND.w #$FE00
	STA.l $801A0B
	STY.b $C7
	LDX.w $19C7,y
	JSR.w (DATA_A6B985,x)
	REP.b #$30
	LDY.b $C7
	DEY
	DEY
	BPL.b CODE_A6B9C9
	RTL

CODE_A6BA29:
	LDA.w $194F,y
	SEC
	SBC.l $801A05
	BPL.b CODE_A6BA39
	CMP.w #$FFE0
	BCS.b CODE_A6BA3E
CODE_A6BA38:
	RTS

CODE_A6BA39:					; Note: Routine that draws Alan Grant's hand.
	CMP.w #$00E0
	BCS.b CODE_A6BA38
CODE_A6BA3E:
	SEP.b #$20
	LDX.w $1628
	STA.b $01,x
	LDA.l $801A07
	STA.b $00,x
	LDA.w $198B,y
	REP.b #$20
	AND.w #$00FF
	ASL
	TAY
	LDA.w DATA_A6BC7E,y
	ORA.l $801A0B
	STA.b $02,x
	TXA
	CLC
	ADC.w #$0004
	STA.l $801628
	SEP.b #$20
	LDY.w DATA_A6BA7E-!RAM_JP_Interior_OAMBuffer,x
	LDA.w JP_Interior_UpperOAMBuffer[$00].Slot,y
	ORA.w DATA_A6BA7E-!RAM_JP_Interior_OAMBuffer+$02,x
	BIT.w $1A08
	BPL.b CODE_A6BA7A
	ORA.w DATA_A6BA7E-!RAM_JP_Interior_OAMBuffer+$03,x
CODE_A6BA7A:
	STA.w JP_Interior_UpperOAMBuffer[$00].Slot,y
	RTS

DATA_A6BA7E:
	dw $0000,$0102,$0000,$0408,$0000,$1020,$0000,$4080
	dw $0001,$0102,$0001,$0408,$0001,$1020,$0001,$4080
	dw $0002,$0102,$0002,$0408,$0002,$1020,$0002,$4080
	dw $0003,$0102,$0003,$0408,$0003,$1020,$0003,$4080
	dw $0004,$0102,$0004,$0408,$0004,$1020,$0004,$4080
	dw $0005,$0102,$0005,$0408,$0005,$1020,$0005,$4080
	dw $0006,$0102,$0006,$0408,$0006,$1020,$0006,$4080
	dw $0007,$0102,$0007,$0408,$0007,$1020,$0007,$4080
	dw $0008,$0102,$0008,$0408,$0008,$1020,$0008,$4080
	dw $0009,$0102,$0009,$0408,$0009,$1020,$0009,$4080
	dw $000A,$0102,$000A,$0408,$000A,$1020,$000A,$4080
	dw $000B,$0102,$000B,$0408,$000B,$1020,$000B,$4080
	dw $000C,$0102,$000C,$0408,$000C,$1020,$000C,$4080
	dw $000D,$0102,$000D,$0408,$000D,$1020,$000D,$4080
	dw $000E,$0102,$000E,$0408,$000E,$1020,$000E,$4080
	dw $000F,$0102,$000F,$0408,$000F,$1020,$000F,$4080
	dw $0010,$0102,$0010,$0408,$0010,$1020,$0010,$4080
	dw $0011,$0102,$0011,$0408,$0011,$1020,$0011,$4080
	dw $0012,$0102,$0012,$0408,$0012,$1020,$0012,$4080
	dw $0013,$0102,$0013,$0408,$0013,$1020,$0013,$4080
	dw $0014,$0102,$0014,$0408,$0014,$1020,$0014,$4080
	dw $0015,$0102,$0015,$0408,$0015,$1020,$0015,$4080
	dw $0016,$0102,$0016,$0408,$0016,$1020,$0016,$4080
	dw $0017,$0102,$0017,$0408,$0017,$1020,$0017,$4080
	dw $0018,$0102,$0018,$0408,$0018,$1020,$0018,$4080
	dw $0019,$0102,$0019,$0408,$0019,$1020,$0019,$4080
	dw $001A,$0102,$001A,$0408,$001A,$1020,$001A,$4080
	dw $001B,$0102,$001B,$0408,$001B,$1020,$001B,$4080
	dw $001C,$0102,$001C,$0408,$001C,$1020,$001C,$4080
	dw $001D,$0102,$001D,$0408,$001D,$1020,$001D,$4080
	dw $001E,$0102,$001E,$0408,$001E,$1020,$001E,$4080
	dw $001F,$0102,$001F,$0408,$001F,$1020,$001F,$4080

DATA_A6BC7E:
	dw $0000,$0004,$0008,$0040,$0044,$0048,$0080,$0084
	dw $0088,$00C0,$00C4,$00C8,$0100,$0104,$0108,$0140
	dw $0144,$0148,$000C,$008C,$004C,$00CC

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

CODE_A6BCAA:
	REP.b #$30
	STZ.w $18B7
	STZ.w $18B9
	STZ.w $18BB
	STZ.w $18BD
	STZ.w $18AD
	STZ.w $18B1
	LDA.w #$0080
	STA.l $8018AF
	LDA.w #$0080
	STA.l $8018B3
	RTS

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

CODE_A6BCCD:
	REP.b #$30
	JSR.w CODE_A6BCD6
	JSR.w CODE_A6BEBC
	RTS

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

; Note: Routine for moving your hand while in a computer terminal.

CODE_A6BCD6:
	LDA.b $16
	AND.w #$0800
	BEQ.b CODE_A6BCF4
	LDA.l $8018BB
	SEC
	SBC.w #$8000
	STA.l $8018BB
	LDA.l $8018BD
	SBC.w #$0000
	STA.l $8018BD
CODE_A6BCF4:
	LDA.b $16
	AND.w #$0400
	BEQ.b CODE_A6BD12
	LDA.l $8018BB
	CLC
	ADC.w #$8000
	STA.l $8018BB
	LDA.l $8018BD
	ADC.w #$0000
	STA.l $8018BD
CODE_A6BD12:
	LDA.b $16
	AND.w #$0200
	BEQ.b CODE_A6BD30
	LDA.l $8018B7
	SEC
	SBC.w #$8000
	STA.l $8018B7
	LDA.l $8018B9
	SBC.w #$0000
	STA.l $8018B9
CODE_A6BD30:
	LDA.b $16
	AND.w #$0100
	BEQ.b CODE_A6BD4E
	LDA.l $8018B7
	CLC
	ADC.w #$8000
	STA.l $8018B7
	LDA.l $8018B9
	ADC.w #$0000
	STA.l $8018B9
CODE_A6BD4E:
	STZ.w $18B5
	LDA.b $16
	AND.w #$8080
	BEQ.b CODE_A6BD5F
	LDA.w #$0001
	STA.l $8018B5
CODE_A6BD5F:
	LDA.l $8018B9
	BMI.b CODE_A6BD80
	LDA.l $8018B7
	SEC
	SBC.w #$4000
	STA.l $8018B7
	LDA.l $8018B9
	SBC.w #$0000
	STA.l $8018B9
	BMI.b CODE_A6BD99
	BRA.b CODE_A6BD9F

CODE_A6BD80:
	LDA.l $8018B7
	CLC
	ADC.w #$4000
	STA.l $8018B7
	LDA.l $8018B9
	ADC.w #$0000
	STA.l $8018B9
	BMI.b CODE_A6BD9F
CODE_A6BD99:
	STZ.w $18B7
	STZ.w $18B9
CODE_A6BD9F:
	LDA.l $8018BD
	BMI.b CODE_A6BDC0
	LDA.l $8018BB
	SEC
	SBC.w #$4000
	STA.l $8018BB
	LDA.l $8018BD
	SBC.w #$0000
	STA.l $8018BD
	BMI.b CODE_A6BDD9
	BRA.b CODE_A6BDDF

CODE_A6BDC0:
	LDA.l $8018BB
	CLC
	ADC.w #$4000
	STA.l $8018BB
	LDA.l $8018BD
	ADC.w #$0000
	STA.l $8018BD
	BMI.b CODE_A6BDDF
CODE_A6BDD9:
	STZ.w $18BB
	STZ.w $18BD
CODE_A6BDDF:
	REP.b #$10
	SEP.b #$20
	LDX.w #$0000
	LDA.l $80166A
	BNE.b CODE_A6BDF5
	LDA.l $80166B
	BEQ.b CODE_A6BE35
	LDX.w #$0001
CODE_A6BDF5:
	LDA.l $801672,x
	BPL.b CODE_A6BE06
	REP.b #$20
	AND.w #$007F
	EOR.w #$FFFF
	INC
	BRA.b CODE_A6BE0B

CODE_A6BE06:
	REP.b #$20
	AND.w #$00FF
CODE_A6BE0B:
	CLC
	ADC.l $8018AF
	STA.l $8018AF
	SEP.b #$20
	LDA.l $801670,x
	BPL.b CODE_A6BE27
	REP.b #$20
	AND.w #$007F
	EOR.w #$FFFF
	INC
	BRA.b CODE_A6BE2C

CODE_A6BE27:
	REP.b #$20
	AND.w #$00FF
CODE_A6BE2C:
	CLC
	ADC.l $8018B3
	STA.l $8018B3
CODE_A6BE35:
	REP.b #$20
	LDA.l $8018AD
	CLC
	ADC.l $8018B7
	STA.l $8018AD
	LDA.l $8018AF
	ADC.l $8018B9
	STA.l $8018AF
	BPL.b CODE_A6BE60
	STZ.w $18AF
	STZ.w $18AD
	STZ.w $18B7
	STZ.w $18B9
	BRA.b CODE_A6BE75

CODE_A6BE60:
	CMP.w #$00D0
	BCC.b CODE_A6BE75
	LDA.w #$00D0
	STA.l $8018AF
	STZ.w $18AD
	STZ.w $18B7
	STZ.w $18B9
CODE_A6BE75:
	LDA.l $8018B1
	CLC
	ADC.l $8018BB
	STA.l $8018B1
	LDA.l $8018B3
	ADC.l $8018BD
	STA.l $8018B3
	CMP.w #$0030
	BCS.b CODE_A6BEA5
	LDA.w #$0030
	STA.l $8018B3
	STZ.w $18B1
	STZ.w $18BB
	STZ.w $18BD
	BRA.b CODE_A6BEBA

CODE_A6BEA5:
	CMP.w #$00B0
	BCC.b CODE_A6BEBA
	LDA.w #$00B0
	STA.l $8018B3
	STZ.w $18B1
	STZ.w $18BB
	STZ.w $18BD
CODE_A6BEBA:
	RTS

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

CODE_A6BEBB:
	RTS

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

CODE_A6BEBC:
	LDA.l $8018AF
	STA.l $801913
	STA.l $801919
	STA.l $80191F
	STA.l $801925
	STA.l $80192B
	STA.l $801931
	CLC
	ADC.w #$0020
	STA.l $801915
	STA.l $80191B
	STA.l $801921
	STA.l $801927
	STA.l $80192D
	STA.l $801933
	CLC
	ADC.w #$0020
	STA.l $801917
	STA.l $80191D
	STA.l $801923
	STA.l $801929
	STA.l $80192F
	STA.l $801935
	LDA.l $8018B3
	LDX.w $18B5
	BEQ.b CODE_A6BF1D
	SEC
	SBC.w #$0004
CODE_A6BF1D:
	STA.l $80194F
	STA.l $801951
	STA.l $801953
	CLC
	ADC.w #$0020
	STA.l $801955
	STA.l $801957
	STA.l $801959
	CLC
	ADC.w #$0020
	STA.l $80195B
	STA.l $80195D
	STA.l $80195F
	CLC
	ADC.w #$0020
	STA.l $801961
	STA.l $801963
	STA.l $801965
	CLC
	ADC.w #$0020
	STA.l $801967
	STA.l $801969
	STA.l $80196B
	CLC
	ADC.w #$0020
	STA.l $80196D
	STA.l $80196F
	STA.l $801971
	LDA.w #$0000
	STA.l $8019C7
	STA.l $8019C9
	STA.l $8019CB
	STA.l $8019CD
	STA.l $8019CF
	STA.l $8019D1
	STA.l $8019D3
	STA.l $8019D5
	STA.l $8019D7
	STA.l $8019D9
	STA.l $8019DB
	STA.l $8019DD
	STA.l $8019DF
	STA.l $8019E1
	STA.l $8019E3
	STA.l $8019E5
	STA.l $8019E7
	STA.l $8019E9
	LDA.w #$0001
	STA.l $8018D7
	STA.l $8018D9
	STA.l $8018DB
	STA.l $8018DD
	STA.l $8018DF
	STA.l $8018E1
	STA.l $8018E3
	STA.l $8018E5
	STA.l $8018E7
	STA.l $8018E9
	STA.l $8018EB
	STA.l $8018ED
	STA.l $8018EF
	STA.l $8018F1
	STA.l $8018F3
	STA.l $8018F5
	STA.l $8018F7
	STA.l $8018F9
	LDA.w #$3000
	STA.l $80198B
	LDA.w #$3001
	STA.l $80198D
	LDA.w #$3003
	STA.l $801991
	LDA.w #$3004
	STA.l $801993
	LDA.l $8018B5
	BEQ.b CODE_A6C04D
	LDA.w #$3012
	STA.l $80198B
	LDA.w #$3013
	STA.l $80198D
	LDA.w #$3014
	STA.l $801991
	LDA.w #$3015
	STA.l $801993
CODE_A6C04D:
	LDA.w #$3002
	STA.l $80198F
	LDA.w #$3005
	STA.l $801995
	LDA.w #$3006
	STA.l $801997
	LDA.w #$3007
	STA.l $801999
	LDA.w #$3008
	STA.l $80199B
	LDA.w #$3009
	STA.l $80199D
	LDA.w #$300A
	STA.l $80199F
	LDA.w #$300B
	STA.l $8019A1
	LDA.w #$300C
	STA.l $8019A3
	LDA.w #$300D
	STA.l $8019A5
	LDA.w #$300E
	STA.l $8019A7
	LDA.w #$300F
	STA.l $8019A9
	LDA.w #$3010
	STA.l $8019AB
	LDA.w #$3011
	STA.l $8019AD
	RTS

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

CODE_A6C0B0:
	REP.b #$20
	STZ.w $18BF
	STZ.w $18C1
	STZ.w $18C3
	RTS

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

CODE_A6C0BC:
	REP.b #$30
	LDA.l !RAM_JP_Interior_ComputerTerminalID
	STA.w $18C3
	LDX.w #$0000
	LDA.l !RAM_JP_Interior_ComputerTerminalMessageIndex
CODE_A6C0CC:
	SEC
	SBC.w #$000A
	BMI.b CODE_A6C0D6
	INX
	JMP.w CODE_A6C0CC

CODE_A6C0D6:
	STX.w $18C1
	CLC
	ADC.w #$000A
	STA.w $18BF
	JSR.w CODE_A6C124
	JSR.w CODE_A6C0E7
	RTS

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

CODE_A6C0E7:
	REP.b #$30
	LDA.b $EA
	LSR
	LSR
	LSR
	LSR
	AND.w #$0001
	ASL
	TAX
	LDA.l DATA_A6C102,x
	TAX
	LDA.l DATA_ACF800,x
	STA.l $8018D3
	RTS

DATA_A6C102:
	dw $0100,$0102,$0602

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

CODE_A6C108:
	REP.b #$30
	LDX.w $18D3
	BEQ.b CODE_A6C123
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	REP.b #$20
	LDA.w #$5848
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	STX.w !REGISTER_WriteToVRAMPortLo
CODE_A6C123:
	RTS

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

CODE_A6C124:
	REP.b #$30
	LDA.b $EA
	AND.w #$0003
	BEQ.b CODE_A6C14C
	CMP.w #$0001
	BEQ.b CODE_A6C13F
	LDA.w #$58F9
	STA.l $8018C5
	LDA.l $8018C3
	BRA.b CODE_A6C157

CODE_A6C13F:
	LDA.w #$58FB
	STA.l $8018C5
	LDA.l $8018C1
	BRA.b CODE_A6C157

CODE_A6C14C:
	LDA.w #$58FD
	STA.l $8018C5
	LDA.l $8018BF
CODE_A6C157:
	ASL
	TAX
	LDA.l DATA_A6C1B3,x
	TAY
	PHX
	TYX
	LDA.l DATA_ACF800,x
	TXY
	PLX
	STA.l $8018C7
	PHX
	TYX
	LDA.l DATA_ACF800+$02,x
	TXY
	PLX
	STA.l $8018C9
	TYA
	CLC
	ADC.w #$0040
	TAY
	PHX
	TYX
	LDA.l DATA_ACF800,x
	TXY
	PLX
	STA.l $8018CB
	PHX
	TYX
	LDA.l DATA_ACF800+$02,x
	TXY
	PLX
	STA.l $8018CD
	TYA
	CLC
	ADC.w #$0040
	TAY
	PHX
	TYX
	LDA.l DATA_ACF800,x
	TXY
	PLX
	STA.l $8018CF
	PHX
	TYX
	LDA.l DATA_ACF800+$02,x
	TXY
	PLX
	STA.l $8018D1
	RTS

DATA_A6C1B3:
	dw $0240,$0244,$0248,$024C,$0250,$0254,$0258,$025C
	dw $0260,$0264

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

CODE_A6C1C7:
	SEP.b #$20
	LDA.b #$80
	STA.l !REGISTER_VRAMAddressIncrementValue|!FastROMAddressOffset
	REP.b #$30
	LDA.l $8018C5
	BMI.b CODE_A6C223
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.l $8018C7
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.l $8018C9
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.l $8018C5
	CLC
	ADC.w #$0020
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.l $8018CB
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.l $8018CD
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.l $8018C5
	CLC
	ADC.w #$0040
	STA.l !REGISTER_VRAMAddressLo|!FastROMAddressOffset
	LDA.l $8018CF
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
	LDA.l $8018D1
	STA.l !REGISTER_WriteToVRAMPortLo|!FastROMAddressOffset
CODE_A6C223:
	RTS

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

CODE_A6C224:
	REP.b #$39
	LDA.b $06,S
	STA.b $24
	LDA.b $08,S
	STA.b $22
	LDA.b $0A,S
	STA.b $20
	LDA.b $04,S
	PHB
	XBA
	PHA
	PLB
	PLB
	LDA.w #$7F35CC
	STA.b $26
	LDA.w #$7F35CC>>16
	STA.b $28
	LDA.b $20
	ADC.w #$0011
	STA.b $20
	LDA.b [$20]
	AND.w #$00FF
	STA.b $2B
	INC.b $20
	LDA.b [$20]
	STA.b $2D
	STZ.b $31
	LDA.w #$0002
	JSR.w CODE_A6C379
CODE_A6C25F:
	LDY.w #$0020
	JSR.w CODE_A6C3CF
	LDY.w #$00A0
	JSR.w CODE_A6C3CF
	LDY.w #$0120
	JSR.w CODE_A6C3CF
	LDA.w #$0010
	JSR.w CODE_A6C379
	STA.b $29
	JMP.w CODE_A6C2C7

CODE_A6C27C:
	LDY.w #$00A0
	JSR.w CODE_A6C325
	STA.b $3B
	LDA.b $24
	CLC
	SBC.b $3B
	STA.b $3D
	LDY.w #$0120
	JSR.w CODE_A6C325
	INC
	INC
	LSR
	TAX
	LDY.w #$0000
	LDA.b $3B
	BNE.b CODE_A6C2AE
	SEP.b #$20
	LDA.b ($3D),y
	XBA
	LDA.b ($3D),y
	REP.b #$20
CODE_A6C2A5:
	STA.b ($24),y
	INY
	INY
	DEX
	BNE.b CODE_A6C2A5
	BRA.b CODE_A6C2B7

CODE_A6C2AE:
	LDA.b ($3D),y
	STA.b ($24),y
	INY
	INY
	DEX
	BNE.b CODE_A6C2AE
CODE_A6C2B7:
	BCC.b CODE_A6C2C2
	SEP.b #$20
	LDA.b ($3D),y
	STA.b ($24),y
	INY
	REP.b #$21
CODE_A6C2C2:
	TYA
	ADC.b $24
	STA.b $24
CODE_A6C2C7:
	LDY.w #$0020
	JSR.w CODE_A6C325
	TAX
	BEQ.b CODE_A6C315
	LDY.w #$0000
	LSR
	BEQ.b CODE_A6C2E0
	TAX
CODE_A6C2D7:
	LDA.b [$20],y
	STA.b ($24),y
	INY
	INY
	DEX
	BNE.b CODE_A6C2D7
CODE_A6C2E0:
	BCC.b CODE_A6C2EB
	SEP.b #$20
	LDA.b [$20],y
	STA.b ($24),y
	REP.b #$21
	INY
CODE_A6C2EB:
	TYA
	ADC.b $20
	STA.b $20
	TYA
	ADC.b $24
	STA.b $24
	STZ.b $2F
	LDA.b $31
	TAY
	ASL
	TAX
	LDA.b [$20]
	CPY.w #$0000
	BEQ.b CODE_A6C309
CODE_A6C303:
	ASL
	ROL.b $2F
	DEY
	BNE.b CODE_A6C303
CODE_A6C309:
	STA.b $39
	LDA.l DATA_A6C3AD,x
	AND.b $2D
	ORA.b $39
	STA.b $2D
CODE_A6C315:
	DEC.b $29
	BEQ.b CODE_A6C31C
	JMP.w CODE_A6C27C

CODE_A6C31C:
	DEC.b $2B
	BEQ.b CODE_A6C323
	JMP.w CODE_A6C25F

CODE_A6C323:
	PLB
	RTL

CODE_A6C325:
	LDX.b $2D
	BRA.b CODE_A6C32B

CODE_A6C329:
	INY
	INY
CODE_A6C32B:
	TXA
	AND.b [$26],y
	INY
	INY
	CMP.b [$26],y
	BNE.b CODE_A6C329
	TYA
	ADC.w #$003D
	TAY
	LDA.b [$26],y
	PHA
	XBA
	AND.w #$00FF
	JSR.w CODE_A6C379
	PLA
	AND.w #$00FF
	CMP.w #$0002
	BCC.b CODE_A6C358
	DEC
	ASL
	PHA
	LSR
	JSR.w CODE_A6C379
	PLX
	ORA.l DATA_A6C359,x
CODE_A6C358:
	RTS

DATA_A6C359:
	dw $0001,$0002,$0004,$0008,$0010,$0020,$0040,$0080
	dw $0100,$0200,$0400,$0800,$1000,$2000,$4000,$8000

CODE_A6C379:
	TAY
	ASL
	TAX
	LDA.l DATA_A6C3AD,x
	AND.b $2D
	PHA
	LDA.b $2F
	LDX.b $31
	BEQ.b CODE_A6C39B
CODE_A6C389:
	LSR
	ROR.b $2D
	DEY
	BEQ.b CODE_A6C3A6
	DEX
	BEQ.b CODE_A6C39B
	LSR
	ROR.b $2D
	DEY
	BEQ.b CODE_A6C3A6
	DEX
	BNE.b CODE_A6C389
CODE_A6C39B:
	INC.b $20
	INC.b $20
	LDA.b [$20]
	LDX.w #$0010
	BRA.b CODE_A6C389

CODE_A6C3A6:
	DEX
	STX.b $31
	STA.b $2F
	PLA
CODE_A6C3AC:
	RTS

DATA_A6C3AD:
	dw $0000,$0001,$0003,$0007,$000F,$001F,$003F,$007F
	dw $00FF,$01FF,$03FF,$07FF,$0FFF,$1FFF,$3FFF,$7FFF
	dw $FFFF

CODE_A6C3CF:
	STY.b $3F
	LDA.w #$0005
	JSR.w CODE_A6C379
	BEQ.b CODE_A6C3AC
	STA.b $39
	STA.b $3B
	LDY.w #$0000
CODE_A6C3E0:
	PHY
	LDA.w #$0004
	JSR.w CODE_A6C379
	PLY
	STA.b [$26],y
	INY
	INY
	DEC.b $3B
	BNE.b CODE_A6C3E0
	STZ.b $35
	LDA.w #$8000
	STA.b $37
	LDA.w #$0001
	STA.b $33
CODE_A6C3FC:
	LDA.b $33
	LDX.b $39
	LDY.w #$0000
CODE_A6C403:
	CMP.b [$26],y
	BNE.b CODE_A6C453
	PHX
	STY.b $3D
	ASL
	TAX
	LDA.l DATA_A6C3AD,x
	LDY.b $3F
	STA.b [$26],y
	INY
	INY
	LDA.w #$0010
	SEC
	SBC.b $33
	PHA
	LDA.b $35
	STA.b $3B
	LDX.b $33
CODE_A6C423:
	ASL.b $3B
	ROR
	DEX
	BNE.b CODE_A6C423
	PLX
	BEQ.b CODE_A6C430
CODE_A6C42C:
	LSR
	DEX
	BNE.b CODE_A6C42C
CODE_A6C430:
	STA.b [$26],y
	INY
	INY
	STY.b $3F
	TYA
	CLC
	ADC.w #$003C
	TAY
	LDA.b $33
	XBA
	SEP.b #$20
	LDA.b $3D
	LSR
	REP.b #$21
	STA.b [$26],y
	LDA.b $37
	ADC.b $35
	STA.b $35
	LDA.b $33
	LDY.b $3D
	PLX
CODE_A6C453:
	INY
	INY
	DEX
	BNE.b CODE_A6C403
	LSR.b $37
	INC.b $33
	CMP.w #$0010
	BNE.b CODE_A6C3FC
	RTS

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

DATA_A6C462:
	incbin "UnsortedData/DATA_A6C462_JP_U1.rnc"

DATA_A6C550:
	incbin "UnsortedData/DATA_A6C550_JP_U1.rnc"

DATA_A6C934:
	incbin "UnsortedData/DATA_A6C934_JP_U1.rnc"

DATA_A6C954:
	incbin "UnsortedData/DATA_A6C954_JP_U1.rnc"

DATA_A6C982:
	incbin "InteriorMaps/VisitorCenter_Floor1_RoomDataPtrs.rnc"

DATA_A6CA94:
	incbin "InteriorMaps/VisitorCenter_Floor1_Entities.rnc"

DATA_A6DDCF:
	incbin "InteriorMaps/Ship_SubLevel3_Entities_JP_U1.rnc"

DATA_A6FADA:
	incbin "InteriorMaps/NublarUtilityShed_GroundLevel_RoomDataPtrs.rnc"

DATA_A6FB80:
	incbin "InteriorMaps/RaptorPen_SubLevel1_RoomDataPtrs_JP_U1.rnc"

UNK_A6FD16:
	db $8E,$28,$5E,$8C,$AD,$43,$F1,$98,$6C,$30,$EB,$4F,$1A,$0D,$FF,$5B
	db $03

UNK_A6FD27:					; Note: Unused map data?
	incbin "InteriorMaps/DATA_A6FD27_JP_U1.rnc"

UNK_A6FE11:					; Note: Unused map data?
	incbin "InteriorMaps/DATA_A6FE11_JP_U1.rnc"

UNK_A6FF8C:					; Note: Unused room data pointers?
	incbin "InteriorMaps/DATA_A6FF8C_JP_U1.rnc"

UNK_A6FFC5:
	%InsertGarbageData($A6FFC5, incbin, DATA_A6FFC5.bin)

%BANK_END(<EndBank>)
endmacro

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

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

CODE_A78000:
	RTL

CODE_A78001:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	REP.b #$20
	RTL

CODE_A78014:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1F00,x
	LDA.w $0010,y
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	LDA.w $0030,y
	STA.l $7F2080,x
	REP.b #$20
	RTL

CODE_A78035:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1E80,x
	LDA.w $000A,y
	STA.l $7F1F00,x
	LDA.w $0015,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $002A,y
	STA.l $7F2080,x
	LDA.w $0035,y
	STA.l $7F2100,x
	REP.b #$20
	RTL

CODE_A78064:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1E00,x
	LDA.w $0008,y
	STA.l $7F1E80,x
	LDA.w $0010,y
	STA.l $7F1F00,x
	LDA.w $0018,y
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	LDA.w $0028,y
	STA.l $7F2080,x
	LDA.w $0030,y
	STA.l $7F2100,x
	LDA.w $0038,y
	STA.l $7F2180,x
	REP.b #$20
	RTL

CODE_A780A1:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1D80,x
	LDA.w $0006,y
	STA.l $7F1E00,x
	LDA.w $000C,y
	STA.l $7F1E80,x
	LDA.w $0013,y
	STA.l $7F1F00,x
	LDA.w $0019,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0026,y
	STA.l $7F2080,x
	LDA.w $002C,y
	STA.l $7F2100,x
	LDA.w $0033,y
	STA.l $7F2180,x
	LDA.w $0039,y
	STA.l $7F2200,x
	REP.b #$20
	RTL

CODE_A780EC:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1D00,x
	LDA.w $0005,y
	STA.l $7F1D80,x
	LDA.w $000A,y
	STA.l $7F1E00,x
	LDA.w $000F,y
	STA.l $7F1E80,x
	LDA.w $0015,y
	STA.l $7F1F00,x
	LDA.w $001A,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0025,y
	STA.l $7F2080,x
	LDA.w $002A,y
	STA.l $7F2100,x
	LDA.w $002F,y
	STA.l $7F2180,x
	LDA.w $0035,y
	STA.l $7F2200,x
	LDA.w $003A,y
	STA.l $7F2280,x
	REP.b #$20
	RTL

CODE_A78145:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1C80,x
	LDA.w $0004,y
	STA.l $7F1D00,x
	LDA.w $0009,y
	STA.l $7F1D80,x
	LDA.w $000D,y
	STA.l $7F1E00,x
	LDA.w $0012,y
	STA.l $7F1E80,x
	LDA.w $0016,y
	STA.l $7F1F00,x
	LDA.w $001B,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0024,y
	STA.l $7F2080,x
	LDA.w $0029,y
	STA.l $7F2100,x
	LDA.w $002D,y
	STA.l $7F2180,x
	LDA.w $0032,y
	STA.l $7F2200,x
	LDA.w $0036,y
	STA.l $7F2280,x
	LDA.w $003B,y
	STA.l $7F2300,x
	REP.b #$20
	RTL

CODE_A781AC:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1C00,x
	LDA.w $0004,y
	STA.l $7F1C80,x
	LDA.w $0008,y
	STA.l $7F1D00,x
	LDA.w $000C,y
	STA.l $7F1D80,x
	LDA.w $0010,y
	STA.l $7F1E00,x
	LDA.w $0014,y
	STA.l $7F1E80,x
	LDA.w $0018,y
	STA.l $7F1F00,x
	LDA.w $001C,y
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	LDA.w $0024,y
	STA.l $7F2080,x
	LDA.w $0028,y
	STA.l $7F2100,x
	LDA.w $002C,y
	STA.l $7F2180,x
	LDA.w $0030,y
	STA.l $7F2200,x
	LDA.w $0034,y
	STA.l $7F2280,x
	LDA.w $0038,y
	STA.l $7F2300,x
	LDA.w $003C,y
	STA.l $7F2380,x
	REP.b #$20
	RTL

CODE_A78221:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1B80,x
	LDA.w $0003,y
	STA.l $7F1C00,x
	LDA.w $0007,y
	STA.l $7F1C80,x
	LDA.w $000A,y
	STA.l $7F1D00,x
	LDA.w $000E,y
	STA.l $7F1D80,x
	LDA.w $0011,y
	STA.l $7F1E00,x
	LDA.w $0015,y
	STA.l $7F1E80,x
	LDA.w $0018,y
	STA.l $7F1F00,x
	LDA.w $001C,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0023,y
	STA.l $7F2080,x
	LDA.w $0027,y
	STA.l $7F2100,x
	LDA.w $002A,y
	STA.l $7F2180,x
	LDA.w $002E,y
	STA.l $7F2200,x
	LDA.w $0031,y
	STA.l $7F2280,x
	LDA.w $0035,y
	STA.l $7F2300,x
	LDA.w $0038,y
	STA.l $7F2380,x
	LDA.w $003C,y
	STA.l $7F2400,x
	REP.b #$20
	RTL

CODE_A782A4:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1B00,x
	LDA.w $0003,y
	STA.l $7F1B80,x
	LDA.w $0006,y
	STA.l $7F1C00,x
	LDA.w $0009,y
	STA.l $7F1C80,x
	LDA.w $000C,y
	STA.l $7F1D00,x
	LDA.w $000F,y
	STA.l $7F1D80,x
	LDA.w $0013,y
	STA.l $7F1E00,x
	LDA.w $0016,y
	STA.l $7F1E80,x
	LDA.w $0019,y
	STA.l $7F1F00,x
	LDA.w $001C,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0023,y
	STA.l $7F2080,x
	LDA.w $0026,y
	STA.l $7F2100,x
	LDA.w $0029,y
	STA.l $7F2180,x
	LDA.w $002C,y
	STA.l $7F2200,x
	LDA.w $002F,y
	STA.l $7F2280,x
	LDA.w $0033,y
	STA.l $7F2300,x
	LDA.w $0036,y
	STA.l $7F2380,x
	LDA.w $0039,y
	STA.l $7F2400,x
	LDA.w $003C,y
	STA.l $7F2480,x
	REP.b #$20
	RTL

CODE_A78335:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1A80,x
	LDA.w $0002,y
	STA.l $7F1B00,x
	LDA.w $0005,y
	STA.l $7F1B80,x
	LDA.w $0008,y
	STA.l $7F1C00,x
	LDA.w $000B,y
	STA.l $7F1C80,x
	LDA.w $000E,y
	STA.l $7F1D00,x
	LDA.w $0011,y
	STA.l $7F1D80,x
	LDA.w $0014,y
	STA.l $7F1E00,x
	LDA.w $0017,y
	STA.l $7F1E80,x
	LDA.w $001A,y
	STA.l $7F1F00,x
	LDA.w $001D,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0022,y
	STA.l $7F2080,x
	LDA.w $0025,y
	STA.l $7F2100,x
	LDA.w $0028,y
	STA.l $7F2180,x
	LDA.w $002B,y
	STA.l $7F2200,x
	LDA.w $002E,y
	STA.l $7F2280,x
	LDA.w $0031,y
	STA.l $7F2300,x
	LDA.w $0034,y
	STA.l $7F2380,x
	LDA.w $0037,y
	STA.l $7F2400,x
	LDA.w $003A,y
	STA.l $7F2480,x
	LDA.w $003D,y
	STA.l $7F2500,x
	REP.b #$20
	RTL

CODE_A783D4:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1A00,x
	LDA.w $0002,y
	STA.l $7F1A80,x
	LDA.w $0005,y
	STA.l $7F1B00,x
	LDA.w $0007,y
	STA.l $7F1B80,x
	LDA.w $000A,y
	STA.l $7F1C00,x
	LDA.w $000D,y
	STA.l $7F1C80,x
	LDA.w $000F,y
	STA.l $7F1D00,x
	LDA.w $0012,y
	STA.l $7F1D80,x
	LDA.w $0015,y
	STA.l $7F1E00,x
	LDA.w $0017,y
	STA.l $7F1E80,x
	LDA.w $001A,y
	STA.l $7F1F00,x
	LDA.w $001D,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0022,y
	STA.l $7F2080,x
	LDA.w $0025,y
	STA.l $7F2100,x
	LDA.w $0027,y
	STA.l $7F2180,x
	LDA.w $002A,y
	STA.l $7F2200,x
	LDA.w $002D,y
	STA.l $7F2280,x
	LDA.w $002F,y
	STA.l $7F2300,x
	LDA.w $0032,y
	STA.l $7F2380,x
	LDA.w $0035,y
	STA.l $7F2400,x
	LDA.w $0037,y
	STA.l $7F2480,x
	LDA.w $003A,y
	STA.l $7F2500,x
	LDA.w $003D,y
	STA.l $7F2580,x
	REP.b #$20
	RTL

CODE_A78481:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1980,x
	LDA.w $0002,y
	STA.l $7F1A00,x
	LDA.w $0004,y
	STA.l $7F1A80,x
	LDA.w $0007,y
	STA.l $7F1B00,x
	LDA.w $0009,y
	STA.l $7F1B80,x
	LDA.w $000C,y
	STA.l $7F1C00,x
	LDA.w $000E,y
	STA.l $7F1C80,x
	LDA.w $0011,y
	STA.l $7F1D00,x
	LDA.w $0013,y
	STA.l $7F1D80,x
	LDA.w $0016,y
	STA.l $7F1E00,x
	LDA.w $0018,y
	STA.l $7F1E80,x
	LDA.w $001B,y
	STA.l $7F1F00,x
	LDA.w $001D,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0022,y
	STA.l $7F2080,x
	LDA.w $0024,y
	STA.l $7F2100,x
	LDA.w $0027,y
	STA.l $7F2180,x
	LDA.w $0029,y
	STA.l $7F2200,x
	LDA.w $002C,y
	STA.l $7F2280,x
	LDA.w $002E,y
	STA.l $7F2300,x
	LDA.w $0031,y
	STA.l $7F2380,x
	LDA.w $0033,y
	STA.l $7F2400,x
	LDA.w $0036,y
	STA.l $7F2480,x
	LDA.w $0038,y
	STA.l $7F2500,x
	LDA.w $003B,y
	STA.l $7F2580,x
	LDA.w $003D,y
	STA.l $7F2600,x
	REP.b #$20
	RTL

CODE_A7853C:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1900,x
	LDA.w $0002,y
	STA.l $7F1980,x
	LDA.w $0004,y
	STA.l $7F1A00,x
	LDA.w $0006,y
	STA.l $7F1A80,x
	LDA.w $0009,y
	STA.l $7F1B00,x
	LDA.w $000B,y
	STA.l $7F1B80,x
	LDA.w $000D,y
	STA.l $7F1C00,x
	LDA.w $000F,y
	STA.l $7F1C80,x
	LDA.w $0012,y
	STA.l $7F1D00,x
	LDA.w $0014,y
	STA.l $7F1D80,x
	LDA.w $0016,y
	STA.l $7F1E00,x
	LDA.w $0019,y
	STA.l $7F1E80,x
	LDA.w $001B,y
	STA.l $7F1F00,x
	LDA.w $001D,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0022,y
	STA.l $7F2080,x
	LDA.w $0024,y
	STA.l $7F2100,x
	LDA.w $0026,y
	STA.l $7F2180,x
	LDA.w $0029,y
	STA.l $7F2200,x
	LDA.w $002B,y
	STA.l $7F2280,x
	LDA.w $002D,y
	STA.l $7F2300,x
	LDA.w $002F,y
	STA.l $7F2380,x
	LDA.w $0032,y
	STA.l $7F2400,x
	LDA.w $0034,y
	STA.l $7F2480,x
	LDA.w $0036,y
	STA.l $7F2500,x
	LDA.w $0039,y
	STA.l $7F2580,x
	LDA.w $003B,y
	STA.l $7F2600,x
	LDA.w $003D,y
	STA.l $7F2680,x
	REP.b #$20
	RTL

CODE_A78605:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1880,x
	LDA.w $0002,y
	STA.l $7F1900,x
	LDA.w $0004,y
	STA.l $7F1980,x
	LDA.w $0006,y
	STA.l $7F1A00,x
	LDA.w $0008,y
	STA.l $7F1A80,x
	LDA.w $000A,y
	STA.l $7F1B00,x
	LDA.w $000C,y
	STA.l $7F1B80,x
	LDA.w $000E,y
	STA.l $7F1C00,x
	LDA.w $0011,y
	STA.l $7F1C80,x
	LDA.w $0013,y
	STA.l $7F1D00,x
	LDA.w $0015,y
	STA.l $7F1D80,x
	LDA.w $0017,y
	STA.l $7F1E00,x
	LDA.w $0019,y
	STA.l $7F1E80,x
	LDA.w $001B,y
	STA.l $7F1F00,x
	LDA.w $001D,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0022,y
	STA.l $7F2080,x
	LDA.w $0024,y
	STA.l $7F2100,x
	LDA.w $0026,y
	STA.l $7F2180,x
	LDA.w $0028,y
	STA.l $7F2200,x
	LDA.w $002A,y
	STA.l $7F2280,x
	LDA.w $002C,y
	STA.l $7F2300,x
	LDA.w $002E,y
	STA.l $7F2380,x
	LDA.w $0031,y
	STA.l $7F2400,x
	LDA.w $0033,y
	STA.l $7F2480,x
	LDA.w $0035,y
	STA.l $7F2500,x
	LDA.w $0037,y
	STA.l $7F2580,x
	LDA.w $0039,y
	STA.l $7F2600,x
	LDA.w $003B,y
	STA.l $7F2680,x
	LDA.w $003D,y
	STA.l $7F2700,x
	REP.b #$20
	RTL

CODE_A786DC:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1800,x
	LDA.w $0002,y
	STA.l $7F1880,x
	LDA.w $0004,y
	STA.l $7F1900,x
	LDA.w $0006,y
	STA.l $7F1980,x
	LDA.w $0008,y
	STA.l $7F1A00,x
	LDA.w $000A,y
	STA.l $7F1A80,x
	LDA.w $000C,y
	STA.l $7F1B00,x
	LDA.w $000E,y
	STA.l $7F1B80,x
	LDA.w $0010,y
	STA.l $7F1C00,x
	LDA.w $0012,y
	STA.l $7F1C80,x
	LDA.w $0014,y
	STA.l $7F1D00,x
	LDA.w $0016,y
	STA.l $7F1D80,x
	LDA.w $0018,y
	STA.l $7F1E00,x
	LDA.w $001A,y
	STA.l $7F1E80,x
	LDA.w $001C,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	LDA.w $0022,y
	STA.l $7F2080,x
	LDA.w $0024,y
	STA.l $7F2100,x
	LDA.w $0026,y
	STA.l $7F2180,x
	LDA.w $0028,y
	STA.l $7F2200,x
	LDA.w $002A,y
	STA.l $7F2280,x
	LDA.w $002C,y
	STA.l $7F2300,x
	LDA.w $002E,y
	STA.l $7F2380,x
	LDA.w $0030,y
	STA.l $7F2400,x
	LDA.w $0032,y
	STA.l $7F2480,x
	LDA.w $0034,y
	STA.l $7F2500,x
	LDA.w $0036,y
	STA.l $7F2580,x
	LDA.w $0038,y
	STA.l $7F2600,x
	LDA.w $003A,y
	STA.l $7F2680,x
	LDA.w $003C,y
	STA.l $7F2700,x
	LDA.w $003E,y
	STA.l $7F2780,x
	REP.b #$20
	RTL

CODE_A787C1:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1780,x
	LDA.w $0001,y
	STA.l $7F1800,x
	LDA.w $0003,y
	STA.l $7F1880,x
	LDA.w $0005,y
	STA.l $7F1900,x
	LDA.w $0007,y
	STA.l $7F1980,x
	LDA.w $0009,y
	STA.l $7F1A00,x
	LDA.w $000B,y
	STA.l $7F1A80,x
	LDA.w $000D,y
	STA.l $7F1B00,x
	LDA.w $000F,y
	STA.l $7F1B80,x
	LDA.w $0010,y
	STA.l $7F1C00,x
	LDA.w $0012,y
	STA.l $7F1C80,x
	LDA.w $0014,y
	STA.l $7F1D00,x
	LDA.w $0016,y
	STA.l $7F1D80,x
	LDA.w $0018,y
	STA.l $7F1E00,x
	LDA.w $001A,y
	STA.l $7F1E80,x
	LDA.w $001C,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0023,y
	STA.l $7F2100,x
	LDA.w $0025,y
	STA.l $7F2180,x
	LDA.w $0027,y
	STA.l $7F2200,x
	LDA.w $0029,y
	STA.l $7F2280,x
	LDA.w $002B,y
	STA.l $7F2300,x
	LDA.w $002D,y
	STA.l $7F2380,x
	LDA.w $002E,y
	STA.l $7F2400,x
	LDA.w $0030,y
	STA.l $7F2480,x
	LDA.w $0032,y
	STA.l $7F2500,x
	LDA.w $0034,y
	STA.l $7F2580,x
	LDA.w $0036,y
	STA.l $7F2600,x
	LDA.w $0038,y
	STA.l $7F2680,x
	LDA.w $003A,y
	STA.l $7F2700,x
	LDA.w $003C,y
	STA.l $7F2780,x
	LDA.w $003E,y
	STA.l $7F2800,x
	REP.b #$20
	RTL

CODE_A788B4:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1700,x
	LDA.w $0001,y
	STA.l $7F1780,x
	LDA.w $0003,y
	STA.l $7F1800,x
	LDA.w $0005,y
	STA.l $7F1880,x
	LDA.w $0007,y
	STA.l $7F1900,x
	LDA.w $0008,y
	STA.l $7F1980,x
	LDA.w $000A,y
	STA.l $7F1A00,x
	LDA.w $000C,y
	STA.l $7F1A80,x
	LDA.w $000E,y
	STA.l $7F1B00,x
	LDA.w $000F,y
	STA.l $7F1B80,x
	LDA.w $0011,y
	STA.l $7F1C00,x
	LDA.w $0013,y
	STA.l $7F1C80,x
	LDA.w $0015,y
	STA.l $7F1D00,x
	LDA.w $0017,y
	STA.l $7F1D80,x
	LDA.w $0018,y
	STA.l $7F1E00,x
	LDA.w $001A,y
	STA.l $7F1E80,x
	LDA.w $001C,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0023,y
	STA.l $7F2100,x
	LDA.w $0025,y
	STA.l $7F2180,x
	LDA.w $0027,y
	STA.l $7F2200,x
	LDA.w $0028,y
	STA.l $7F2280,x
	LDA.w $002A,y
	STA.l $7F2300,x
	LDA.w $002C,y
	STA.l $7F2380,x
	LDA.w $002E,y
	STA.l $7F2400,x
	LDA.w $002F,y
	STA.l $7F2480,x
	LDA.w $0031,y
	STA.l $7F2500,x
	LDA.w $0033,y
	STA.l $7F2580,x
	LDA.w $0035,y
	STA.l $7F2600,x
	LDA.w $0037,y
	STA.l $7F2680,x
	LDA.w $0038,y
	STA.l $7F2700,x
	LDA.w $003A,y
	STA.l $7F2780,x
	LDA.w $003C,y
	STA.l $7F2800,x
	LDA.w $003E,y
	STA.l $7F2880,x
	REP.b #$20
	RTL

CODE_A789B5:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1680,x
	LDA.w $0001,y
	STA.l $7F1700,x
	LDA.w $0003,y
	STA.l $7F1780,x
	LDA.w $0005,y
	STA.l $7F1800,x
	LDA.w $0006,y
	STA.l $7F1880,x
	LDA.w $0008,y
	STA.l $7F1900,x
	LDA.w $000A,y
	STA.l $7F1980,x
	LDA.w $000B,y
	STA.l $7F1A00,x
	LDA.w $000D,y
	STA.l $7F1A80,x
	LDA.w $000F,y
	STA.l $7F1B00,x
	LDA.w $0010,y
	STA.l $7F1B80,x
	LDA.w $0012,y
	STA.l $7F1C00,x
	LDA.w $0014,y
	STA.l $7F1C80,x
	LDA.w $0015,y
	STA.l $7F1D00,x
	LDA.w $0017,y
	STA.l $7F1D80,x
	LDA.w $0019,y
	STA.l $7F1E00,x
	LDA.w $001A,y
	STA.l $7F1E80,x
	LDA.w $001C,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0023,y
	STA.l $7F2100,x
	LDA.w $0025,y
	STA.l $7F2180,x
	LDA.w $0026,y
	STA.l $7F2200,x
	LDA.w $0028,y
	STA.l $7F2280,x
	LDA.w $002A,y
	STA.l $7F2300,x
	LDA.w $002B,y
	STA.l $7F2380,x
	LDA.w $002D,y
	STA.l $7F2400,x
	LDA.w $002F,y
	STA.l $7F2480,x
	LDA.w $0030,y
	STA.l $7F2500,x
	LDA.w $0032,y
	STA.l $7F2580,x
	LDA.w $0034,y
	STA.l $7F2600,x
	LDA.w $0035,y
	STA.l $7F2680,x
	LDA.w $0037,y
	STA.l $7F2700,x
	LDA.w $0039,y
	STA.l $7F2780,x
	LDA.w $003A,y
	STA.l $7F2800,x
	LDA.w $003C,y
	STA.l $7F2880,x
	LDA.w $003E,y
	STA.l $7F2900,x
	REP.b #$20
	RTL

CODE_A78AC4:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1600,x
	LDA.w $0001,y
	STA.l $7F1680,x
	LDA.w $0003,y
	STA.l $7F1700,x
	LDA.w $0004,y
	STA.l $7F1780,x
	LDA.w $0006,y
	STA.l $7F1800,x
	LDA.w $0007,y
	STA.l $7F1880,x
	LDA.w $0009,y
	STA.l $7F1900,x
	LDA.w $000B,y
	STA.l $7F1980,x
	LDA.w $000C,y
	STA.l $7F1A00,x
	LDA.w $000E,y
	STA.l $7F1A80,x
	LDA.w $000F,y
	STA.l $7F1B00,x
	LDA.w $0011,y
	STA.l $7F1B80,x
	LDA.w $0013,y
	STA.l $7F1C00,x
	LDA.w $0014,y
	STA.l $7F1C80,x
	LDA.w $0016,y
	STA.l $7F1D00,x
	LDA.w $0017,y
	STA.l $7F1D80,x
	LDA.w $0019,y
	STA.l $7F1E00,x
	LDA.w $001B,y
	STA.l $7F1E80,x
	LDA.w $001C,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0023,y
	STA.l $7F2100,x
	LDA.w $0024,y
	STA.l $7F2180,x
	LDA.w $0026,y
	STA.l $7F2200,x
	LDA.w $0027,y
	STA.l $7F2280,x
	LDA.w $0029,y
	STA.l $7F2300,x
	LDA.w $002B,y
	STA.l $7F2380,x
	LDA.w $002C,y
	STA.l $7F2400,x
	LDA.w $002E,y
	STA.l $7F2480,x
	LDA.w $002F,y
	STA.l $7F2500,x
	LDA.w $0031,y
	STA.l $7F2580,x
	LDA.w $0033,y
	STA.l $7F2600,x
	LDA.w $0034,y
	STA.l $7F2680,x
	LDA.w $0036,y
	STA.l $7F2700,x
	LDA.w $0037,y
	STA.l $7F2780,x
	LDA.w $0039,y
	STA.l $7F2800,x
	LDA.w $003B,y
	STA.l $7F2880,x
	LDA.w $003C,y
	STA.l $7F2900,x
	LDA.w $003E,y
	STA.l $7F2980,x
	REP.b #$20
	RTL

CODE_A78BE1:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1580,x
	LDA.w $0001,y
	STA.l $7F1600,x
	LDA.w $0003,y
	STA.l $7F1680,x
	LDA.w $0004,y
	STA.l $7F1700,x
	LDA.w $0006,y
	STA.l $7F1780,x
	LDA.w $0007,y
	STA.l $7F1800,x
	LDA.w $0009,y
	STA.l $7F1880,x
	LDA.w $000A,y
	STA.l $7F1900,x
	LDA.w $000C,y
	STA.l $7F1980,x
	LDA.w $000D,y
	STA.l $7F1A00,x
	LDA.w $000F,y
	STA.l $7F1A80,x
	LDA.w $0010,y
	STA.l $7F1B00,x
	LDA.w $0012,y
	STA.l $7F1B80,x
	LDA.w $0013,y
	STA.l $7F1C00,x
	LDA.w $0015,y
	STA.l $7F1C80,x
	LDA.w $0016,y
	STA.l $7F1D00,x
	LDA.w $0018,y
	STA.l $7F1D80,x
	LDA.w $0019,y
	STA.l $7F1E00,x
	LDA.w $001B,y
	STA.l $7F1E80,x
	LDA.w $001C,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0023,y
	STA.l $7F2100,x
	LDA.w $0024,y
	STA.l $7F2180,x
	LDA.w $0026,y
	STA.l $7F2200,x
	LDA.w $0027,y
	STA.l $7F2280,x
	LDA.w $0029,y
	STA.l $7F2300,x
	LDA.w $002A,y
	STA.l $7F2380,x
	LDA.w $002C,y
	STA.l $7F2400,x
	LDA.w $002D,y
	STA.l $7F2480,x
	LDA.w $002F,y
	STA.l $7F2500,x
	LDA.w $0030,y
	STA.l $7F2580,x
	LDA.w $0032,y
	STA.l $7F2600,x
	LDA.w $0033,y
	STA.l $7F2680,x
	LDA.w $0035,y
	STA.l $7F2700,x
	LDA.w $0036,y
	STA.l $7F2780,x
	LDA.w $0038,y
	STA.l $7F2800,x
	LDA.w $0039,y
	STA.l $7F2880,x
	LDA.w $003B,y
	STA.l $7F2900,x
	LDA.w $003C,y
	STA.l $7F2980,x
	LDA.w $003E,y
	STA.l $7F2A00,x
	REP.b #$20
	RTL

CODE_A78D0C:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1500,x
	LDA.w $0001,y
	STA.l $7F1580,x
	LDA.w $0002,y
	STA.l $7F1600,x
	LDA.w $0004,y
	STA.l $7F1680,x
	LDA.w $0005,y
	STA.l $7F1700,x
	LDA.w $0007,y
	STA.l $7F1780,x
	LDA.w $0008,y
	STA.l $7F1800,x
	LDA.w $000A,y
	STA.l $7F1880,x
	LDA.w $000B,y
	STA.l $7F1900,x
	LDA.w $000D,y
	STA.l $7F1980,x
	LDA.w $000E,y
	STA.l $7F1A00,x
	LDA.w $000F,y
	STA.l $7F1A80,x
	LDA.w $0011,y
	STA.l $7F1B00,x
	LDA.w $0012,y
	STA.l $7F1B80,x
	LDA.w $0014,y
	STA.l $7F1C00,x
	LDA.w $0015,y
	STA.l $7F1C80,x
	LDA.w $0017,y
	STA.l $7F1D00,x
	LDA.w $0018,y
	STA.l $7F1D80,x
	LDA.w $001A,y
	STA.l $7F1E00,x
	LDA.w $001B,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0024,y
	STA.l $7F2180,x
	LDA.w $0025,y
	STA.l $7F2200,x
	LDA.w $0027,y
	STA.l $7F2280,x
	LDA.w $0028,y
	STA.l $7F2300,x
	LDA.w $002A,y
	STA.l $7F2380,x
	LDA.w $002B,y
	STA.l $7F2400,x
	LDA.w $002D,y
	STA.l $7F2480,x
	LDA.w $002E,y
	STA.l $7F2500,x
	LDA.w $002F,y
	STA.l $7F2580,x
	LDA.w $0031,y
	STA.l $7F2600,x
	LDA.w $0032,y
	STA.l $7F2680,x
	LDA.w $0034,y
	STA.l $7F2700,x
	LDA.w $0035,y
	STA.l $7F2780,x
	LDA.w $0037,y
	STA.l $7F2800,x
	LDA.w $0038,y
	STA.l $7F2880,x
	LDA.w $003A,y
	STA.l $7F2900,x
	LDA.w $003B,y
	STA.l $7F2980,x
	LDA.w $003D,y
	STA.l $7F2A00,x
	LDA.w $003E,y
	STA.l $7F2A80,x
	REP.b #$20
	RTL

CODE_A78E45:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1480,x
	LDA.w $0001,y
	STA.l $7F1500,x
	LDA.w $0002,y
	STA.l $7F1580,x
	LDA.w $0004,y
	STA.l $7F1600,x
	LDA.w $0005,y
	STA.l $7F1680,x
	LDA.w $0006,y
	STA.l $7F1700,x
	LDA.w $0008,y
	STA.l $7F1780,x
	LDA.w $0009,y
	STA.l $7F1800,x
	LDA.w $000B,y
	STA.l $7F1880,x
	LDA.w $000C,y
	STA.l $7F1900,x
	LDA.w $000D,y
	STA.l $7F1980,x
	LDA.w $000F,y
	STA.l $7F1A00,x
	LDA.w $0010,y
	STA.l $7F1A80,x
	LDA.w $0012,y
	STA.l $7F1B00,x
	LDA.w $0013,y
	STA.l $7F1B80,x
	LDA.w $0014,y
	STA.l $7F1C00,x
	LDA.w $0016,y
	STA.l $7F1C80,x
	LDA.w $0017,y
	STA.l $7F1D00,x
	LDA.w $0019,y
	STA.l $7F1D80,x
	LDA.w $001A,y
	STA.l $7F1E00,x
	LDA.w $001B,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0024,y
	STA.l $7F2180,x
	LDA.w $0025,y
	STA.l $7F2200,x
	LDA.w $0026,y
	STA.l $7F2280,x
	LDA.w $0028,y
	STA.l $7F2300,x
	LDA.w $0029,y
	STA.l $7F2380,x
	LDA.w $002B,y
	STA.l $7F2400,x
	LDA.w $002C,y
	STA.l $7F2480,x
	LDA.w $002D,y
	STA.l $7F2500,x
	LDA.w $002F,y
	STA.l $7F2580,x
	LDA.w $0030,y
	STA.l $7F2600,x
	LDA.w $0032,y
	STA.l $7F2680,x
	LDA.w $0033,y
	STA.l $7F2700,x
	LDA.w $0034,y
	STA.l $7F2780,x
	LDA.w $0036,y
	STA.l $7F2800,x
	LDA.w $0037,y
	STA.l $7F2880,x
	LDA.w $0039,y
	STA.l $7F2900,x
	LDA.w $003A,y
	STA.l $7F2980,x
	LDA.w $003B,y
	STA.l $7F2A00,x
	LDA.w $003D,y
	STA.l $7F2A80,x
	LDA.w $003E,y
	STA.l $7F2B00,x
	REP.b #$20
	RTL

CODE_A78F8C:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1400,x
	LDA.w $0001,y
	STA.l $7F1480,x
	LDA.w $0002,y
	STA.l $7F1500,x
	LDA.w $0003,y
	STA.l $7F1580,x
	LDA.w $0005,y
	STA.l $7F1600,x
	LDA.w $0006,y
	STA.l $7F1680,x
	LDA.w $0007,y
	STA.l $7F1700,x
	LDA.w $0009,y
	STA.l $7F1780,x
	LDA.w $000A,y
	STA.l $7F1800,x
	LDA.w $000B,y
	STA.l $7F1880,x
	LDA.w $000D,y
	STA.l $7F1900,x
	LDA.w $000E,y
	STA.l $7F1980,x
	LDA.w $000F,y
	STA.l $7F1A00,x
	LDA.w $0011,y
	STA.l $7F1A80,x
	LDA.w $0012,y
	STA.l $7F1B00,x
	LDA.w $0013,y
	STA.l $7F1B80,x
	LDA.w $0015,y
	STA.l $7F1C00,x
	LDA.w $0016,y
	STA.l $7F1C80,x
	LDA.w $0017,y
	STA.l $7F1D00,x
	LDA.w $0019,y
	STA.l $7F1D80,x
	LDA.w $001A,y
	STA.l $7F1E00,x
	LDA.w $001B,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0025,y
	STA.l $7F2200,x
	LDA.w $0026,y
	STA.l $7F2280,x
	LDA.w $0027,y
	STA.l $7F2300,x
	LDA.w $0029,y
	STA.l $7F2380,x
	LDA.w $002A,y
	STA.l $7F2400,x
	LDA.w $002B,y
	STA.l $7F2480,x
	LDA.w $002D,y
	STA.l $7F2500,x
	LDA.w $002E,y
	STA.l $7F2580,x
	LDA.w $002F,y
	STA.l $7F2600,x
	LDA.w $0031,y
	STA.l $7F2680,x
	LDA.w $0032,y
	STA.l $7F2700,x
	LDA.w $0033,y
	STA.l $7F2780,x
	LDA.w $0035,y
	STA.l $7F2800,x
	LDA.w $0036,y
	STA.l $7F2880,x
	LDA.w $0037,y
	STA.l $7F2900,x
	LDA.w $0039,y
	STA.l $7F2980,x
	LDA.w $003A,y
	STA.l $7F2A00,x
	LDA.w $003B,y
	STA.l $7F2A80,x
	LDA.w $003D,y
	STA.l $7F2B00,x
	LDA.w $003E,y
	STA.l $7F2B80,x
	REP.b #$20
	RTL

CODE_A790E1:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1380,x
	LDA.w $0001,y
	STA.l $7F1400,x
	LDA.w $0002,y
	STA.l $7F1480,x
	LDA.w $0003,y
	STA.l $7F1500,x
	LDA.w $0005,y
	STA.l $7F1580,x
	LDA.w $0006,y
	STA.l $7F1600,x
	LDA.w $0007,y
	STA.l $7F1680,x
	LDA.w $0008,y
	STA.l $7F1700,x
	LDA.w $000A,y
	STA.l $7F1780,x
	LDA.w $000B,y
	STA.l $7F1800,x
	LDA.w $000C,y
	STA.l $7F1880,x
	LDA.w $000E,y
	STA.l $7F1900,x
	LDA.w $000F,y
	STA.l $7F1980,x
	LDA.w $0010,y
	STA.l $7F1A00,x
	LDA.w $0011,y
	STA.l $7F1A80,x
	LDA.w $0013,y
	STA.l $7F1B00,x
	LDA.w $0014,y
	STA.l $7F1B80,x
	LDA.w $0015,y
	STA.l $7F1C00,x
	LDA.w $0016,y
	STA.l $7F1C80,x
	LDA.w $0018,y
	STA.l $7F1D00,x
	LDA.w $0019,y
	STA.l $7F1D80,x
	LDA.w $001A,y
	STA.l $7F1E00,x
	LDA.w $001C,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0025,y
	STA.l $7F2200,x
	LDA.w $0026,y
	STA.l $7F2280,x
	LDA.w $0027,y
	STA.l $7F2300,x
	LDA.w $0028,y
	STA.l $7F2380,x
	LDA.w $002A,y
	STA.l $7F2400,x
	LDA.w $002B,y
	STA.l $7F2480,x
	LDA.w $002C,y
	STA.l $7F2500,x
	LDA.w $002D,y
	STA.l $7F2580,x
	LDA.w $002F,y
	STA.l $7F2600,x
	LDA.w $0030,y
	STA.l $7F2680,x
	LDA.w $0031,y
	STA.l $7F2700,x
	LDA.w $0033,y
	STA.l $7F2780,x
	LDA.w $0034,y
	STA.l $7F2800,x
	LDA.w $0035,y
	STA.l $7F2880,x
	LDA.w $0036,y
	STA.l $7F2900,x
	LDA.w $0038,y
	STA.l $7F2980,x
	LDA.w $0039,y
	STA.l $7F2A00,x
	LDA.w $003A,y
	STA.l $7F2A80,x
	LDA.w $003C,y
	STA.l $7F2B00,x
	LDA.w $003D,y
	STA.l $7F2B80,x
	LDA.w $003E,y
	STA.l $7F2C00,x
	REP.b #$20
	RTL

CODE_A79244:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1300,x
	LDA.w $0001,y
	STA.l $7F1380,x
	LDA.w $0002,y
	STA.l $7F1400,x
	LDA.w $0003,y
	STA.l $7F1480,x
	LDA.w $0004,y
	STA.l $7F1500,x
	LDA.w $0006,y
	STA.l $7F1580,x
	LDA.w $0007,y
	STA.l $7F1600,x
	LDA.w $0008,y
	STA.l $7F1680,x
	LDA.w $0009,y
	STA.l $7F1700,x
	LDA.w $000B,y
	STA.l $7F1780,x
	LDA.w $000C,y
	STA.l $7F1800,x
	LDA.w $000D,y
	STA.l $7F1880,x
	LDA.w $000E,y
	STA.l $7F1900,x
	LDA.w $000F,y
	STA.l $7F1980,x
	LDA.w $0011,y
	STA.l $7F1A00,x
	LDA.w $0012,y
	STA.l $7F1A80,x
	LDA.w $0013,y
	STA.l $7F1B00,x
	LDA.w $0014,y
	STA.l $7F1B80,x
	LDA.w $0016,y
	STA.l $7F1C00,x
	LDA.w $0017,y
	STA.l $7F1C80,x
	LDA.w $0018,y
	STA.l $7F1D00,x
	LDA.w $0019,y
	STA.l $7F1D80,x
	LDA.w $001B,y
	STA.l $7F1E00,x
	LDA.w $001C,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0024,y
	STA.l $7F2200,x
	LDA.w $0026,y
	STA.l $7F2280,x
	LDA.w $0027,y
	STA.l $7F2300,x
	LDA.w $0028,y
	STA.l $7F2380,x
	LDA.w $0029,y
	STA.l $7F2400,x
	LDA.w $002B,y
	STA.l $7F2480,x
	LDA.w $002C,y
	STA.l $7F2500,x
	LDA.w $002D,y
	STA.l $7F2580,x
	LDA.w $002E,y
	STA.l $7F2600,x
	LDA.w $002F,y
	STA.l $7F2680,x
	LDA.w $0031,y
	STA.l $7F2700,x
	LDA.w $0032,y
	STA.l $7F2780,x
	LDA.w $0033,y
	STA.l $7F2800,x
	LDA.w $0034,y
	STA.l $7F2880,x
	LDA.w $0036,y
	STA.l $7F2900,x
	LDA.w $0037,y
	STA.l $7F2980,x
	LDA.w $0038,y
	STA.l $7F2A00,x
	LDA.w $0039,y
	STA.l $7F2A80,x
	LDA.w $003B,y
	STA.l $7F2B00,x
	LDA.w $003C,y
	STA.l $7F2B80,x
	LDA.w $003D,y
	STA.l $7F2C00,x
	LDA.w $003E,y
	STA.l $7F2C80,x
	REP.b #$20
	RTL

CODE_A793B5:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1280,x
	LDA.w $0001,y
	STA.l $7F1300,x
	LDA.w $0002,y
	STA.l $7F1380,x
	LDA.w $0003,y
	STA.l $7F1400,x
	LDA.w $0004,y
	STA.l $7F1480,x
	LDA.w $0005,y
	STA.l $7F1500,x
	LDA.w $0007,y
	STA.l $7F1580,x
	LDA.w $0008,y
	STA.l $7F1600,x
	LDA.w $0009,y
	STA.l $7F1680,x
	LDA.w $000A,y
	STA.l $7F1700,x
	LDA.w $000B,y
	STA.l $7F1780,x
	LDA.w $000D,y
	STA.l $7F1800,x
	LDA.w $000E,y
	STA.l $7F1880,x
	LDA.w $000F,y
	STA.l $7F1900,x
	LDA.w $0010,y
	STA.l $7F1980,x
	LDA.w $0011,y
	STA.l $7F1A00,x
	LDA.w $0012,y
	STA.l $7F1A80,x
	LDA.w $0014,y
	STA.l $7F1B00,x
	LDA.w $0015,y
	STA.l $7F1B80,x
	LDA.w $0016,y
	STA.l $7F1C00,x
	LDA.w $0017,y
	STA.l $7F1C80,x
	LDA.w $0018,y
	STA.l $7F1D00,x
	LDA.w $001A,y
	STA.l $7F1D80,x
	LDA.w $001B,y
	STA.l $7F1E00,x
	LDA.w $001C,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0024,y
	STA.l $7F2200,x
	LDA.w $0025,y
	STA.l $7F2280,x
	LDA.w $0027,y
	STA.l $7F2300,x
	LDA.w $0028,y
	STA.l $7F2380,x
	LDA.w $0029,y
	STA.l $7F2400,x
	LDA.w $002A,y
	STA.l $7F2480,x
	LDA.w $002B,y
	STA.l $7F2500,x
	LDA.w $002C,y
	STA.l $7F2580,x
	LDA.w $002E,y
	STA.l $7F2600,x
	LDA.w $002F,y
	STA.l $7F2680,x
	LDA.w $0030,y
	STA.l $7F2700,x
	LDA.w $0031,y
	STA.l $7F2780,x
	LDA.w $0032,y
	STA.l $7F2800,x
	LDA.w $0034,y
	STA.l $7F2880,x
	LDA.w $0035,y
	STA.l $7F2900,x
	LDA.w $0036,y
	STA.l $7F2980,x
	LDA.w $0037,y
	STA.l $7F2A00,x
	LDA.w $0038,y
	STA.l $7F2A80,x
	LDA.w $0039,y
	STA.l $7F2B00,x
	LDA.w $003B,y
	STA.l $7F2B80,x
	LDA.w $003C,y
	STA.l $7F2C00,x
	LDA.w $003D,y
	STA.l $7F2C80,x
	LDA.w $003E,y
	STA.l $7F2D00,x
	REP.b #$20
	RTL

CODE_A79534:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1200,x
	LDA.w $0001,y
	STA.l $7F1280,x
	LDA.w $0002,y
	STA.l $7F1300,x
	LDA.w $0003,y
	STA.l $7F1380,x
	LDA.w $0004,y
	STA.l $7F1400,x
	LDA.w $0005,y
	STA.l $7F1480,x
	LDA.w $0006,y
	STA.l $7F1500,x
	LDA.w $0007,y
	STA.l $7F1580,x
	LDA.w $0009,y
	STA.l $7F1600,x
	LDA.w $000A,y
	STA.l $7F1680,x
	LDA.w $000B,y
	STA.l $7F1700,x
	LDA.w $000C,y
	STA.l $7F1780,x
	LDA.w $000D,y
	STA.l $7F1800,x
	LDA.w $000E,y
	STA.l $7F1880,x
	LDA.w $000F,y
	STA.l $7F1900,x
	LDA.w $0011,y
	STA.l $7F1980,x
	LDA.w $0012,y
	STA.l $7F1A00,x
	LDA.w $0013,y
	STA.l $7F1A80,x
	LDA.w $0014,y
	STA.l $7F1B00,x
	LDA.w $0015,y
	STA.l $7F1B80,x
	LDA.w $0016,y
	STA.l $7F1C00,x
	LDA.w $0017,y
	STA.l $7F1C80,x
	LDA.w $0019,y
	STA.l $7F1D00,x
	LDA.w $001A,y
	STA.l $7F1D80,x
	LDA.w $001B,y
	STA.l $7F1E00,x
	LDA.w $001C,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0024,y
	STA.l $7F2200,x
	LDA.w $0025,y
	STA.l $7F2280,x
	LDA.w $0026,y
	STA.l $7F2300,x
	LDA.w $0027,y
	STA.l $7F2380,x
	LDA.w $0029,y
	STA.l $7F2400,x
	LDA.w $002A,y
	STA.l $7F2480,x
	LDA.w $002B,y
	STA.l $7F2500,x
	LDA.w $002C,y
	STA.l $7F2580,x
	LDA.w $002D,y
	STA.l $7F2600,x
	LDA.w $002E,y
	STA.l $7F2680,x
	LDA.w $002F,y
	STA.l $7F2700,x
	LDA.w $0031,y
	STA.l $7F2780,x
	LDA.w $0032,y
	STA.l $7F2800,x
	LDA.w $0033,y
	STA.l $7F2880,x
	LDA.w $0034,y
	STA.l $7F2900,x
	LDA.w $0035,y
	STA.l $7F2980,x
	LDA.w $0036,y
	STA.l $7F2A00,x
	LDA.w $0037,y
	STA.l $7F2A80,x
	LDA.w $0039,y
	STA.l $7F2B00,x
	LDA.w $003A,y
	STA.l $7F2B80,x
	LDA.w $003B,y
	STA.l $7F2C00,x
	LDA.w $003C,y
	STA.l $7F2C80,x
	LDA.w $003D,y
	STA.l $7F2D00,x
	LDA.w $003E,y
	STA.l $7F2D80,x
	REP.b #$20
	RTL

CODE_A796C1:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1180,x
	LDA.w $0001,y
	STA.l $7F1200,x
	LDA.w $0002,y
	STA.l $7F1280,x
	LDA.w $0003,y
	STA.l $7F1300,x
	LDA.w $0004,y
	STA.l $7F1380,x
	LDA.w $0005,y
	STA.l $7F1400,x
	LDA.w $0006,y
	STA.l $7F1480,x
	LDA.w $0007,y
	STA.l $7F1500,x
	LDA.w $0008,y
	STA.l $7F1580,x
	LDA.w $0009,y
	STA.l $7F1600,x
	LDA.w $000B,y
	STA.l $7F1680,x
	LDA.w $000C,y
	STA.l $7F1700,x
	LDA.w $000D,y
	STA.l $7F1780,x
	LDA.w $000E,y
	STA.l $7F1800,x
	LDA.w $000F,y
	STA.l $7F1880,x
	LDA.w $0010,y
	STA.l $7F1900,x
	LDA.w $0011,y
	STA.l $7F1980,x
	LDA.w $0012,y
	STA.l $7F1A00,x
	LDA.w $0013,y
	STA.l $7F1A80,x
	LDA.w $0014,y
	STA.l $7F1B00,x
	LDA.w $0016,y
	STA.l $7F1B80,x
	LDA.w $0017,y
	STA.l $7F1C00,x
	LDA.w $0018,y
	STA.l $7F1C80,x
	LDA.w $0019,y
	STA.l $7F1D00,x
	LDA.w $001A,y
	STA.l $7F1D80,x
	LDA.w $001B,y
	STA.l $7F1E00,x
	LDA.w $001C,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0024,y
	STA.l $7F2200,x
	LDA.w $0025,y
	STA.l $7F2280,x
	LDA.w $0026,y
	STA.l $7F2300,x
	LDA.w $0027,y
	STA.l $7F2380,x
	LDA.w $0028,y
	STA.l $7F2400,x
	LDA.w $0029,y
	STA.l $7F2480,x
	LDA.w $002A,y
	STA.l $7F2500,x
	LDA.w $002C,y
	STA.l $7F2580,x
	LDA.w $002D,y
	STA.l $7F2600,x
	LDA.w $002E,y
	STA.l $7F2680,x
	LDA.w $002F,y
	STA.l $7F2700,x
	LDA.w $0030,y
	STA.l $7F2780,x
	LDA.w $0031,y
	STA.l $7F2800,x
	LDA.w $0032,y
	STA.l $7F2880,x
	LDA.w $0033,y
	STA.l $7F2900,x
	LDA.w $0034,y
	STA.l $7F2980,x
	LDA.w $0035,y
	STA.l $7F2A00,x
	LDA.w $0037,y
	STA.l $7F2A80,x
	LDA.w $0038,y
	STA.l $7F2B00,x
	LDA.w $0039,y
	STA.l $7F2B80,x
	LDA.w $003A,y
	STA.l $7F2C00,x
	LDA.w $003B,y
	STA.l $7F2C80,x
	LDA.w $003C,y
	STA.l $7F2D00,x
	LDA.w $003D,y
	STA.l $7F2D80,x
	LDA.w $003E,y
	STA.l $7F2E00,x
	REP.b #$20
	RTL

CODE_A7985C:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1100,x
	LDA.w $0001,y
	STA.l $7F1180,x
	LDA.w $0002,y
	STA.l $7F1200,x
	LDA.w $0003,y
	STA.l $7F1280,x
	LDA.w $0004,y
	STA.l $7F1300,x
	LDA.w $0005,y
	STA.l $7F1380,x
	LDA.w $0006,y
	STA.l $7F1400,x
	LDA.w $0007,y
	STA.l $7F1480,x
	LDA.w $0008,y
	STA.l $7F1500,x
	LDA.w $0009,y
	STA.l $7F1580,x
	LDA.w $000A,y
	STA.l $7F1600,x
	LDA.w $000B,y
	STA.l $7F1680,x
	LDA.w $000C,y
	STA.l $7F1700,x
	LDA.w $000D,y
	STA.l $7F1780,x
	LDA.w $000E,y
	STA.l $7F1800,x
	LDA.w $000F,y
	STA.l $7F1880,x
	LDA.w $0011,y
	STA.l $7F1900,x
	LDA.w $0012,y
	STA.l $7F1980,x
	LDA.w $0013,y
	STA.l $7F1A00,x
	LDA.w $0014,y
	STA.l $7F1A80,x
	LDA.w $0015,y
	STA.l $7F1B00,x
	LDA.w $0016,y
	STA.l $7F1B80,x
	LDA.w $0017,y
	STA.l $7F1C00,x
	LDA.w $0018,y
	STA.l $7F1C80,x
	LDA.w $0019,y
	STA.l $7F1D00,x
	LDA.w $001A,y
	STA.l $7F1D80,x
	LDA.w $001B,y
	STA.l $7F1E00,x
	LDA.w $001C,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0024,y
	STA.l $7F2200,x
	LDA.w $0025,y
	STA.l $7F2280,x
	LDA.w $0026,y
	STA.l $7F2300,x
	LDA.w $0027,y
	STA.l $7F2380,x
	LDA.w $0028,y
	STA.l $7F2400,x
	LDA.w $0029,y
	STA.l $7F2480,x
	LDA.w $002A,y
	STA.l $7F2500,x
	LDA.w $002B,y
	STA.l $7F2580,x
	LDA.w $002C,y
	STA.l $7F2600,x
	LDA.w $002D,y
	STA.l $7F2680,x
	LDA.w $002E,y
	STA.l $7F2700,x
	LDA.w $002F,y
	STA.l $7F2780,x
	LDA.w $0031,y
	STA.l $7F2800,x
	LDA.w $0032,y
	STA.l $7F2880,x
	LDA.w $0033,y
	STA.l $7F2900,x
	LDA.w $0034,y
	STA.l $7F2980,x
	LDA.w $0035,y
	STA.l $7F2A00,x
	LDA.w $0036,y
	STA.l $7F2A80,x
	LDA.w $0037,y
	STA.l $7F2B00,x
	LDA.w $0038,y
	STA.l $7F2B80,x
	LDA.w $0039,y
	STA.l $7F2C00,x
	LDA.w $003A,y
	STA.l $7F2C80,x
	LDA.w $003B,y
	STA.l $7F2D00,x
	LDA.w $003C,y
	STA.l $7F2D80,x
	LDA.w $003D,y
	STA.l $7F2E00,x
	LDA.w $003E,y
	STA.l $7F2E80,x
	REP.b #$20
	RTL

CODE_A79A05:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1080,x
	LDA.w $0001,y
	STA.l $7F1100,x
	LDA.w $0002,y
	STA.l $7F1180,x
	LDA.w $0003,y
	STA.l $7F1200,x
	LDA.w $0004,y
	STA.l $7F1280,x
	LDA.w $0005,y
	STA.l $7F1300,x
	LDA.w $0006,y
	STA.l $7F1380,x
	LDA.w $0007,y
	STA.l $7F1400,x
	LDA.w $0008,y
	STA.l $7F1480,x
	LDA.w $0009,y
	STA.l $7F1500,x
	LDA.w $000A,y
	STA.l $7F1580,x
	LDA.w $000B,y
	STA.l $7F1600,x
	LDA.w $000C,y
	STA.l $7F1680,x
	LDA.w $000D,y
	STA.l $7F1700,x
	LDA.w $000E,y
	STA.l $7F1780,x
	LDA.w $000F,y
	STA.l $7F1800,x
	LDA.w $0010,y
	STA.l $7F1880,x
	LDA.w $0011,y
	STA.l $7F1900,x
	LDA.w $0012,y
	STA.l $7F1980,x
	LDA.w $0013,y
	STA.l $7F1A00,x
	LDA.w $0014,y
	STA.l $7F1A80,x
	LDA.w $0015,y
	STA.l $7F1B00,x
	LDA.w $0016,y
	STA.l $7F1B80,x
	LDA.w $0017,y
	STA.l $7F1C00,x
	LDA.w $0018,y
	STA.l $7F1C80,x
	LDA.w $0019,y
	STA.l $7F1D00,x
	LDA.w $001A,y
	STA.l $7F1D80,x
	LDA.w $001B,y
	STA.l $7F1E00,x
	LDA.w $001C,y
	STA.l $7F1E80,x
	LDA.w $001D,y
	STA.l $7F1F00,x
	LDA.w $001E,y
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0024,y
	STA.l $7F2200,x
	LDA.w $0025,y
	STA.l $7F2280,x
	LDA.w $0026,y
	STA.l $7F2300,x
	LDA.w $0027,y
	STA.l $7F2380,x
	LDA.w $0028,y
	STA.l $7F2400,x
	LDA.w $0029,y
	STA.l $7F2480,x
	LDA.w $002A,y
	STA.l $7F2500,x
	LDA.w $002B,y
	STA.l $7F2580,x
	LDA.w $002C,y
	STA.l $7F2600,x
	LDA.w $002D,y
	STA.l $7F2680,x
	LDA.w $002E,y
	STA.l $7F2700,x
	LDA.w $002F,y
	STA.l $7F2780,x
	LDA.w $0030,y
	STA.l $7F2800,x
	LDA.w $0031,y
	STA.l $7F2880,x
	LDA.w $0032,y
	STA.l $7F2900,x
	LDA.w $0033,y
	STA.l $7F2980,x
	LDA.w $0034,y
	STA.l $7F2A00,x
	LDA.w $0035,y
	STA.l $7F2A80,x
	LDA.w $0036,y
	STA.l $7F2B00,x
	LDA.w $0037,y
	STA.l $7F2B80,x
	LDA.w $0038,y
	STA.l $7F2C00,x
	LDA.w $0039,y
	STA.l $7F2C80,x
	LDA.w $003A,y
	STA.l $7F2D00,x
	LDA.w $003B,y
	STA.l $7F2D80,x
	LDA.w $003C,y
	STA.l $7F2E00,x
	LDA.w $003D,y
	STA.l $7F2E80,x
	LDA.w $003E,y
	STA.l $7F2F00,x
	REP.b #$20
	RTL

CODE_A79BBC:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F1000,x
	LDA.w $0001,y
	STA.l $7F1080,x
	LDA.w $0002,y
	STA.l $7F1100,x
	LDA.w $0003,y
	STA.l $7F1180,x
	LDA.w $0004,y
	STA.l $7F1200,x
	LDA.w $0005,y
	STA.l $7F1280,x
	LDA.w $0006,y
	STA.l $7F1300,x
	LDA.w $0007,y
	STA.l $7F1380,x
	LDA.w $0008,y
	STA.l $7F1400,x
	LDA.w $0009,y
	STA.l $7F1480,x
	LDA.w $000A,y
	STA.l $7F1500,x
	LDA.w $000B,y
	STA.l $7F1580,x
	LDA.w $000C,y
	STA.l $7F1600,x
	LDA.w $000D,y
	STA.l $7F1680,x
	LDA.w $000E,y
	STA.l $7F1700,x
	LDA.w $000F,y
	STA.l $7F1780,x
	LDA.w $0010,y
	STA.l $7F1800,x
	LDA.w $0011,y
	STA.l $7F1880,x
	LDA.w $0012,y
	STA.l $7F1900,x
	LDA.w $0013,y
	STA.l $7F1980,x
	LDA.w $0014,y
	STA.l $7F1A00,x
	LDA.w $0015,y
	STA.l $7F1A80,x
	LDA.w $0016,y
	STA.l $7F1B00,x
	LDA.w $0017,y
	STA.l $7F1B80,x
	LDA.w $0018,y
	STA.l $7F1C00,x
	LDA.w $0019,y
	STA.l $7F1C80,x
	LDA.w $001A,y
	STA.l $7F1D00,x
	LDA.w $001B,y
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	LDA.w $0021,y
	STA.l $7F2080,x
	LDA.w $0022,y
	STA.l $7F2100,x
	LDA.w $0023,y
	STA.l $7F2180,x
	LDA.w $0024,y
	STA.l $7F2200,x
	LDA.w $0025,y
	STA.l $7F2280,x
	LDA.w $0026,y
	STA.l $7F2300,x
	LDA.w $0027,y
	STA.l $7F2380,x
	LDA.w $0028,y
	STA.l $7F2400,x
	LDA.w $0029,y
	STA.l $7F2480,x
	LDA.w $002A,y
	STA.l $7F2500,x
	LDA.w $002B,y
	STA.l $7F2580,x
	LDA.w $002C,y
	STA.l $7F2600,x
	LDA.w $002D,y
	STA.l $7F2680,x
	LDA.w $002E,y
	STA.l $7F2700,x
	LDA.w $002F,y
	STA.l $7F2780,x
	LDA.w $0030,y
	STA.l $7F2800,x
	LDA.w $0031,y
	STA.l $7F2880,x
	LDA.w $0032,y
	STA.l $7F2900,x
	LDA.w $0033,y
	STA.l $7F2980,x
	LDA.w $0034,y
	STA.l $7F2A00,x
	LDA.w $0035,y
	STA.l $7F2A80,x
	LDA.w $0036,y
	STA.l $7F2B00,x
	LDA.w $0037,y
	STA.l $7F2B80,x
	LDA.w $0038,y
	STA.l $7F2C00,x
	LDA.w $0039,y
	STA.l $7F2C80,x
	LDA.w $003A,y
	STA.l $7F2D00,x
	LDA.w $003B,y
	STA.l $7F2D80,x
	LDA.w $003C,y
	STA.l $7F2E00,x
	LDA.w $003D,y
	STA.l $7F2E80,x
	LDA.w $003E,y
	STA.l $7F2F00,x
	LDA.w $003F,y
	STA.l $7F2F80,x
	REP.b #$20
	RTL

CODE_A79D81:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0001,y
	STA.l $7F1080,x
	LDA.w $0002,y
	STA.l $7F1100,x
	LDA.w $0003,y
	STA.l $7F1180,x
	LDA.w $0004,y
	STA.l $7F1200,x
	LDA.w $0005,y
	STA.l $7F1280,x
	LDA.w $0006,y
	STA.l $7F1300,x
	LDA.w $0007,y
	STA.l $7F1380,x
	LDA.w $0008,y
	STA.l $7F1400,x
	LDA.w $0009,y
	STA.l $7F1480,x
	LDA.w $000A,y
	STA.l $7F1500,x
	LDA.w $000B,y
	STA.l $7F1580,x
	LDA.w $000C,y
	STA.l $7F1600,x
	LDA.w $000D,y
	STA.l $7F1680,x
	LDA.w $000E,y
	STA.l $7F1700,x
	LDA.w $000F,y
	STA.l $7F1780,x
	LDA.w $0010,y
	STA.l $7F1800,x
	LDA.w $0011,y
	STA.l $7F1880,x
	LDA.w $0012,y
	STA.l $7F1900,x
	LDA.w $0013,y
	STA.l $7F1980,x
	LDA.w $0014,y
	STA.l $7F1A00,x
	LDA.w $0015,y
	STA.l $7F1A80,x
	LDA.w $0016,y
	STA.l $7F1B00,x
	LDA.w $0017,y
	STA.l $7F1B80,x
	LDA.w $0018,y
	STA.l $7F1C00,x
	LDA.w $0019,y
	STA.l $7F1C80,x
	LDA.w $001A,y
	STA.l $7F1D00,x
	LDA.w $001B,y
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	LDA.w $0024,y
	STA.l $7F2280,x
	LDA.w $0025,y
	STA.l $7F2300,x
	LDA.w $0026,y
	STA.l $7F2380,x
	LDA.w $0027,y
	STA.l $7F2400,x
	LDA.w $0028,y
	STA.l $7F2480,x
	LDA.w $0029,y
	STA.l $7F2500,x
	LDA.w $002A,y
	STA.l $7F2580,x
	LDA.w $002B,y
	STA.l $7F2600,x
	LDA.w $002C,y
	STA.l $7F2680,x
	LDA.w $002D,y
	STA.l $7F2700,x
	LDA.w $002E,y
	STA.l $7F2780,x
	LDA.w $002F,y
	STA.l $7F2800,x
	LDA.w $0030,y
	STA.l $7F2880,x
	LDA.w $0031,y
	STA.l $7F2900,x
	LDA.w $0032,y
	STA.l $7F2980,x
	LDA.w $0033,y
	STA.l $7F2A00,x
	LDA.w $0034,y
	STA.l $7F2A80,x
	LDA.w $0035,y
	STA.l $7F2B00,x
	LDA.w $0036,y
	STA.l $7F2B80,x
	LDA.w $0037,y
	STA.l $7F2C00,x
	LDA.w $0038,y
	STA.l $7F2C80,x
	LDA.w $0039,y
	STA.l $7F2D00,x
	LDA.w $003A,y
	STA.l $7F2D80,x
	LDA.w $003B,y
	STA.l $7F2E00,x
	LDA.w $003C,y
	STA.l $7F2E80,x
	LDA.w $003D,y
	STA.l $7F2F00,x
	LDA.w $003E,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	REP.b #$20
	RTL

CODE_A79F4B:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0001,y
	STA.l $7F1000,x
	LDA.w $0002,y
	STA.l $7F1080,x
	LDA.w $0003,y
	STA.l $7F1100,x
	LDA.w $0004,y
	STA.l $7F1180,x
	LDA.w $0005,y
	STA.l $7F1200,x
	LDA.w $0006,y
	STA.l $7F1280,x
	LDA.w $0007,y
	STA.l $7F1300,x
	LDA.w $0008,y
	STA.l $7F1380,x
	LDA.w $0009,y
	STA.l $7F1400,x
	LDA.w $000A,y
	STA.l $7F1480,x
	LDA.w $000B,y
	STA.l $7F1500,x
	LDA.w $000C,y
	STA.l $7F1580,x
	LDA.w $000D,y
	STA.l $7F1600,x
	LDA.w $000E,y
	STA.l $7F1680,x
	LDA.w $000F,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0010,y
	STA.l $7F1800,x
	LDA.w $0011,y
	STA.l $7F1880,x
	LDA.w $0012,y
	STA.l $7F1900,x
	LDA.w $0013,y
	STA.l $7F1980,x
	LDA.w $0014,y
	STA.l $7F1A00,x
	LDA.w $0015,y
	STA.l $7F1A80,x
	LDA.w $0016,y
	STA.l $7F1B00,x
	LDA.w $0017,y
	STA.l $7F1B80,x
	LDA.w $0018,y
	STA.l $7F1C00,x
	LDA.w $0019,y
	STA.l $7F1C80,x
	LDA.w $001A,y
	STA.l $7F1D00,x
	LDA.w $001B,y
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	LDA.w $001F,y
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	LDA.w $0024,y
	STA.l $7F2280,x
	LDA.w $0025,y
	STA.l $7F2300,x
	LDA.w $0026,y
	STA.l $7F2380,x
	LDA.w $0027,y
	STA.l $7F2400,x
	LDA.w $0028,y
	STA.l $7F2480,x
	LDA.w $0029,y
	STA.l $7F2500,x
	LDA.w $002A,y
	STA.l $7F2580,x
	LDA.w $002B,y
	STA.l $7F2600,x
	LDA.w $002C,y
	STA.l $7F2680,x
	LDA.w $002D,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $002E,y
	STA.l $7F2800,x
	LDA.w $002F,y
	STA.l $7F2880,x
	LDA.w $0030,y
	STA.l $7F2900,x
	LDA.w $0031,y
	STA.l $7F2980,x
	LDA.w $0032,y
	STA.l $7F2A00,x
	LDA.w $0033,y
	STA.l $7F2A80,x
	LDA.w $0034,y
	STA.l $7F2B00,x
	LDA.w $0035,y
	STA.l $7F2B80,x
	LDA.w $0036,y
	STA.l $7F2C00,x
	LDA.w $0037,y
	STA.l $7F2C80,x
	LDA.w $0038,y
	STA.l $7F2D00,x
	LDA.w $0039,y
	STA.l $7F2D80,x
	LDA.w $003A,y
	STA.l $7F2E00,x
	LDA.w $003B,y
	STA.l $7F2E80,x
	LDA.w $003C,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $003D,y
	STA.l $7F3000,x
	LDA.w $003E,y
	STA.l $7F3080,x
	REP.b #$20
	RTL

CODE_A7A11D:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0001,y
	STA.l $7F0F80,x
	LDA.w $0002,y
	STA.l $7F1000,x
	LDA.w $0003,y
	STA.l $7F1080,x
	LDA.w $0004,y
	STA.l $7F1100,x
	LDA.w $0005,y
	STA.l $7F1180,x
	LDA.w $0006,y
	STA.l $7F1200,x
	LDA.w $0007,y
	STA.l $7F1280,x
	LDA.w $0008,y
	STA.l $7F1300,x
	LDA.w $0009,y
	STA.l $7F1380,x
	LDA.w $000A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $000B,y
	STA.l $7F1500,x
	LDA.w $000C,y
	STA.l $7F1580,x
	LDA.w $000D,y
	STA.l $7F1600,x
	LDA.w $000E,y
	STA.l $7F1680,x
	LDA.w $000F,y
	STA.l $7F1700,x
	LDA.w $0010,y
	STA.l $7F1780,x
	LDA.w $0011,y
	STA.l $7F1800,x
	LDA.w $0012,y
	STA.l $7F1880,x
	LDA.w $0013,y
	STA.l $7F1900,x
	LDA.w $0014,y
	STA.l $7F1980,x
	LDA.w $0015,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $0016,y
	STA.l $7F1B00,x
	LDA.w $0017,y
	STA.l $7F1B80,x
	LDA.w $0018,y
	STA.l $7F1C00,x
	LDA.w $0019,y
	STA.l $7F1C80,x
	LDA.w $001A,y
	STA.l $7F1D00,x
	LDA.w $001B,y
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	LDA.w $0024,y
	STA.l $7F2280,x
	LDA.w $0025,y
	STA.l $7F2300,x
	LDA.w $0026,y
	STA.l $7F2380,x
	LDA.w $0027,y
	STA.l $7F2400,x
	LDA.w $0028,y
	STA.l $7F2480,x
	LDA.w $0029,y
	STA.l $7F2500,x
	LDA.w $002A,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $002B,y
	STA.l $7F2680,x
	LDA.w $002C,y
	STA.l $7F2700,x
	LDA.w $002D,y
	STA.l $7F2780,x
	LDA.w $002E,y
	STA.l $7F2800,x
	LDA.w $002F,y
	STA.l $7F2880,x
	LDA.w $0030,y
	STA.l $7F2900,x
	LDA.w $0031,y
	STA.l $7F2980,x
	LDA.w $0032,y
	STA.l $7F2A00,x
	LDA.w $0033,y
	STA.l $7F2A80,x
	LDA.w $0034,y
	STA.l $7F2B00,x
	LDA.w $0035,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0036,y
	STA.l $7F2C80,x
	LDA.w $0037,y
	STA.l $7F2D00,x
	LDA.w $0038,y
	STA.l $7F2D80,x
	LDA.w $0039,y
	STA.l $7F2E00,x
	LDA.w $003A,y
	STA.l $7F2E80,x
	LDA.w $003B,y
	STA.l $7F2F00,x
	LDA.w $003C,y
	STA.l $7F2F80,x
	LDA.w $003D,y
	STA.l $7F3000,x
	LDA.w $003E,y
	STA.l $7F3080,x
	LDA.w $003F,y
	STA.l $7F3100,x
	REP.b #$20
	RTL

CODE_A7A2FA:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0001,y
	STA.l $7F0F00,x
	LDA.w $0002,y
	STA.l $7F0F80,x
	LDA.w $0003,y
	STA.l $7F1000,x
	LDA.w $0004,y
	STA.l $7F1080,x
	LDA.w $0005,y
	STA.l $7F1100,x
	LDA.w $0006,y
	STA.l $7F1180,x
	LDA.w $0007,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0008,y
	STA.l $7F1300,x
	LDA.w $0009,y
	STA.l $7F1380,x
	LDA.w $000A,y
	STA.l $7F1400,x
	LDA.w $000B,y
	STA.l $7F1480,x
	LDA.w $000C,y
	STA.l $7F1500,x
	LDA.w $000D,y
	STA.l $7F1580,x
	LDA.w $000E,y
	STA.l $7F1600,x
	LDA.w $000F,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0010,y
	STA.l $7F1780,x
	LDA.w $0011,y
	STA.l $7F1800,x
	LDA.w $0012,y
	STA.l $7F1880,x
	LDA.w $0013,y
	STA.l $7F1900,x
	LDA.w $0014,y
	STA.l $7F1980,x
	LDA.w $0015,y
	STA.l $7F1A00,x
	LDA.w $0016,y
	STA.l $7F1A80,x
	LDA.w $0017,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $0018,y
	STA.l $7F1C00,x
	LDA.w $0019,y
	STA.l $7F1C80,x
	LDA.w $001A,y
	STA.l $7F1D00,x
	LDA.w $001B,y
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	LDA.w $0024,y
	STA.l $7F2280,x
	LDA.w $0025,y
	STA.l $7F2300,x
	LDA.w $0026,y
	STA.l $7F2380,x
	LDA.w $0027,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0028,y
	STA.l $7F2500,x
	LDA.w $0029,y
	STA.l $7F2580,x
	LDA.w $002A,y
	STA.l $7F2600,x
	LDA.w $002B,y
	STA.l $7F2680,x
	LDA.w $002C,y
	STA.l $7F2700,x
	LDA.w $002D,y
	STA.l $7F2780,x
	LDA.w $002E,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002F,y
	STA.l $7F2900,x
	LDA.w $0030,y
	STA.l $7F2980,x
	LDA.w $0031,y
	STA.l $7F2A00,x
	LDA.w $0032,y
	STA.l $7F2A80,x
	LDA.w $0033,y
	STA.l $7F2B00,x
	LDA.w $0034,y
	STA.l $7F2B80,x
	LDA.w $0035,y
	STA.l $7F2C00,x
	LDA.w $0036,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0037,y
	STA.l $7F2D80,x
	LDA.w $0038,y
	STA.l $7F2E00,x
	LDA.w $0039,y
	STA.l $7F2E80,x
	LDA.w $003A,y
	STA.l $7F2F00,x
	LDA.w $003B,y
	STA.l $7F2F80,x
	LDA.w $003C,y
	STA.l $7F3000,x
	LDA.w $003D,y
	STA.l $7F3080,x
	LDA.w $003E,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	REP.b #$20
	RTL

CODE_A7A4DC:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0001,y
	STA.l $7F0E80,x
	LDA.w $0002,y
	STA.l $7F0F00,x
	LDA.w $0003,y
	STA.l $7F0F80,x
	LDA.w $0004,y
	STA.l $7F1000,x
	LDA.w $0005,y
	STA.l $7F1080,x
	LDA.w $0006,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0007,y
	STA.l $7F1200,x
	LDA.w $0008,y
	STA.l $7F1280,x
	LDA.w $0009,y
	STA.l $7F1300,x
	LDA.w $000A,y
	STA.l $7F1380,x
	LDA.w $000B,y
	STA.l $7F1400,x
	LDA.w $000C,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $000D,y
	STA.l $7F1580,x
	LDA.w $000E,y
	STA.l $7F1600,x
	LDA.w $000F,y
	STA.l $7F1680,x
	LDA.w $0010,y
	STA.l $7F1700,x
	LDA.w $0011,y
	STA.l $7F1780,x
	LDA.w $0012,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0013,y
	STA.l $7F1900,x
	LDA.w $0014,y
	STA.l $7F1980,x
	LDA.w $0015,y
	STA.l $7F1A00,x
	LDA.w $0016,y
	STA.l $7F1A80,x
	LDA.w $0017,y
	STA.l $7F1B00,x
	LDA.w $0018,y
	STA.l $7F1B80,x
	LDA.w $0019,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001A,y
	STA.l $7F1D00,x
	LDA.w $001B,y
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	LDA.w $0024,y
	STA.l $7F2280,x
	LDA.w $0025,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0026,y
	STA.l $7F2400,x
	LDA.w $0027,y
	STA.l $7F2480,x
	LDA.w $0028,y
	STA.l $7F2500,x
	LDA.w $0029,y
	STA.l $7F2580,x
	LDA.w $002A,y
	STA.l $7F2600,x
	LDA.w $002B,y
	STA.l $7F2680,x
	LDA.w $002C,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $002D,y
	STA.l $7F2800,x
	LDA.w $002E,y
	STA.l $7F2880,x
	LDA.w $002F,y
	STA.l $7F2900,x
	LDA.w $0030,y
	STA.l $7F2980,x
	LDA.w $0031,y
	STA.l $7F2A00,x
	LDA.w $0032,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0033,y
	STA.l $7F2B80,x
	LDA.w $0034,y
	STA.l $7F2C00,x
	LDA.w $0035,y
	STA.l $7F2C80,x
	LDA.w $0036,y
	STA.l $7F2D00,x
	LDA.w $0037,y
	STA.l $7F2D80,x
	LDA.w $0038,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0039,y
	STA.l $7F2F00,x
	LDA.w $003A,y
	STA.l $7F2F80,x
	LDA.w $003B,y
	STA.l $7F3000,x
	LDA.w $003C,y
	STA.l $7F3080,x
	LDA.w $003D,y
	STA.l $7F3100,x
	LDA.w $003E,y
	STA.l $7F3180,x
	LDA.w $003F,y
	STA.l $7F3200,x
	REP.b #$20
	RTL

CODE_A7A6C9:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0001,y
	STA.l $7F0E00,x
	LDA.w $0002,y
	STA.l $7F0E80,x
	LDA.w $0003,y
	STA.l $7F0F00,x
	LDA.w $0004,y
	STA.l $7F0F80,x
	LDA.w $0005,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0006,y
	STA.l $7F1100,x
	LDA.w $0007,y
	STA.l $7F1180,x
	LDA.w $0008,y
	STA.l $7F1200,x
	LDA.w $0009,y
	STA.l $7F1280,x
	LDA.w $000A,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $000B,y
	STA.l $7F1400,x
	LDA.w $000C,y
	STA.l $7F1480,x
	LDA.w $000D,y
	STA.l $7F1500,x
	LDA.w $000E,y
	STA.l $7F1580,x
	LDA.w $000F,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0010,y
	STA.l $7F1700,x
	LDA.w $0011,y
	STA.l $7F1780,x
	LDA.w $0012,y
	STA.l $7F1800,x
	LDA.w $0013,y
	STA.l $7F1880,x
	LDA.w $0014,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0015,y
	STA.l $7F1A00,x
	LDA.w $0016,y
	STA.l $7F1A80,x
	LDA.w $0017,y
	STA.l $7F1B00,x
	LDA.w $0018,y
	STA.l $7F1B80,x
	LDA.w $0019,y
	STA.l $7F1C00,x
	LDA.w $001A,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001B,y
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	LDA.w $0024,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0025,y
	STA.l $7F2380,x
	LDA.w $0026,y
	STA.l $7F2400,x
	LDA.w $0027,y
	STA.l $7F2480,x
	LDA.w $0028,y
	STA.l $7F2500,x
	LDA.w $0029,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $002A,y
	STA.l $7F2680,x
	LDA.w $002B,y
	STA.l $7F2700,x
	LDA.w $002C,y
	STA.l $7F2780,x
	LDA.w $002D,y
	STA.l $7F2800,x
	LDA.w $002E,y
	STA.l $7F2880,x
	LDA.w $002F,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0030,y
	STA.l $7F2A00,x
	LDA.w $0031,y
	STA.l $7F2A80,x
	LDA.w $0032,y
	STA.l $7F2B00,x
	LDA.w $0033,y
	STA.l $7F2B80,x
	LDA.w $0034,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0035,y
	STA.l $7F2D00,x
	LDA.w $0036,y
	STA.l $7F2D80,x
	LDA.w $0037,y
	STA.l $7F2E00,x
	LDA.w $0038,y
	STA.l $7F2E80,x
	LDA.w $0039,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $003A,y
	STA.l $7F3000,x
	LDA.w $003B,y
	STA.l $7F3080,x
	LDA.w $003C,y
	STA.l $7F3100,x
	LDA.w $003D,y
	STA.l $7F3180,x
	LDA.w $003E,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	REP.b #$20
	RTL

CODE_A7A8BB:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0001,y
	STA.l $7F0D80,x
	LDA.w $0002,y
	STA.l $7F0E00,x
	LDA.w $0003,y
	STA.l $7F0E80,x
	LDA.w $0004,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0005,y
	STA.l $7F1000,x
	LDA.w $0006,y
	STA.l $7F1080,x
	LDA.w $0007,y
	STA.l $7F1100,x
	LDA.w $0008,y
	STA.l $7F1180,x
	LDA.w $0009,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $000A,y
	STA.l $7F1300,x
	LDA.w $000B,y
	STA.l $7F1380,x
	LDA.w $000C,y
	STA.l $7F1400,x
	LDA.w $000D,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $000E,y
	STA.l $7F1580,x
	LDA.w $000F,y
	STA.l $7F1600,x
	LDA.w $0010,y
	STA.l $7F1680,x
	LDA.w $0011,y
	STA.l $7F1700,x
	LDA.w $0012,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0013,y
	STA.l $7F1880,x
	LDA.w $0014,y
	STA.l $7F1900,x
	LDA.w $0015,y
	STA.l $7F1980,x
	LDA.w $0016,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $0017,y
	STA.l $7F1B00,x
	LDA.w $0018,y
	STA.l $7F1B80,x
	LDA.w $0019,y
	STA.l $7F1C00,x
	LDA.w $001A,y
	STA.l $7F1C80,x
	LDA.w $001B,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	LDA.w $0024,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0025,y
	STA.l $7F2380,x
	LDA.w $0026,y
	STA.l $7F2400,x
	LDA.w $0027,y
	STA.l $7F2480,x
	LDA.w $0028,y
	STA.l $7F2500,x
	LDA.w $0029,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $002A,y
	STA.l $7F2680,x
	LDA.w $002B,y
	STA.l $7F2700,x
	LDA.w $002C,y
	STA.l $7F2780,x
	LDA.w $002D,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002E,y
	STA.l $7F2900,x
	LDA.w $002F,y
	STA.l $7F2980,x
	LDA.w $0030,y
	STA.l $7F2A00,x
	LDA.w $0031,y
	STA.l $7F2A80,x
	LDA.w $0032,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0033,y
	STA.l $7F2C00,x
	LDA.w $0034,y
	STA.l $7F2C80,x
	LDA.w $0035,y
	STA.l $7F2D00,x
	LDA.w $0036,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0037,y
	STA.l $7F2E80,x
	LDA.w $0038,y
	STA.l $7F2F00,x
	LDA.w $0039,y
	STA.l $7F2F80,x
	LDA.w $003A,y
	STA.l $7F3000,x
	LDA.w $003B,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $003C,y
	STA.l $7F3180,x
	LDA.w $003D,y
	STA.l $7F3200,x
	LDA.w $003E,y
	STA.l $7F3280,x
	LDA.w $003F,y
	STA.l $7F3300,x
	REP.b #$20
	RTL

CODE_A7AAB8:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0001,y
	STA.l $7F0D00,x
	LDA.w $0002,y
	STA.l $7F0D80,x
	LDA.w $0003,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0004,y
	STA.l $7F0F00,x
	LDA.w $0005,y
	STA.l $7F0F80,x
	LDA.w $0006,y
	STA.l $7F1000,x
	LDA.w $0007,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0008,y
	STA.l $7F1180,x
	LDA.w $0009,y
	STA.l $7F1200,x
	LDA.w $000A,y
	STA.l $7F1280,x
	LDA.w $000B,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $000C,y
	STA.l $7F1400,x
	LDA.w $000D,y
	STA.l $7F1480,x
	LDA.w $000E,y
	STA.l $7F1500,x
	LDA.w $000F,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0010,y
	STA.l $7F1680,x
	LDA.w $0011,y
	STA.l $7F1700,x
	LDA.w $0012,y
	STA.l $7F1780,x
	LDA.w $0013,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0014,y
	STA.l $7F1900,x
	LDA.w $0015,y
	STA.l $7F1980,x
	LDA.w $0016,y
	STA.l $7F1A00,x
	LDA.w $0017,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $0018,y
	STA.l $7F1B80,x
	LDA.w $0019,y
	STA.l $7F1C00,x
	LDA.w $001A,y
	STA.l $7F1C80,x
	LDA.w $001B,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	LDA.w $0025,y
	STA.l $7F2380,x
	LDA.w $0026,y
	STA.l $7F2400,x
	LDA.w $0027,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0028,y
	STA.l $7F2580,x
	LDA.w $0029,y
	STA.l $7F2600,x
	LDA.w $002A,y
	STA.l $7F2680,x
	LDA.w $002B,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $002C,y
	STA.l $7F2800,x
	LDA.w $002D,y
	STA.l $7F2880,x
	LDA.w $002E,y
	STA.l $7F2900,x
	LDA.w $002F,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0030,y
	STA.l $7F2A80,x
	LDA.w $0031,y
	STA.l $7F2B00,x
	LDA.w $0032,y
	STA.l $7F2B80,x
	LDA.w $0033,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0034,y
	STA.l $7F2D00,x
	LDA.w $0035,y
	STA.l $7F2D80,x
	LDA.w $0036,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0037,y
	STA.l $7F2F00,x
	LDA.w $0038,y
	STA.l $7F2F80,x
	LDA.w $0039,y
	STA.l $7F3000,x
	LDA.w $003A,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $003B,y
	STA.l $7F3180,x
	LDA.w $003C,y
	STA.l $7F3200,x
	LDA.w $003D,y
	STA.l $7F3280,x
	LDA.w $003E,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	REP.b #$20
	RTL

CODE_A7ACBA:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0001,y
	STA.l $7F0C80,x
	LDA.w $0002,y
	STA.l $7F0D00,x
	LDA.w $0003,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0004,y
	STA.l $7F0E80,x
	LDA.w $0005,y
	STA.l $7F0F00,x
	LDA.w $0006,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0007,y
	STA.l $7F1080,x
	LDA.w $0008,y
	STA.l $7F1100,x
	LDA.w $0009,y
	STA.l $7F1180,x
	LDA.w $000A,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $000B,y
	STA.l $7F1300,x
	LDA.w $000C,y
	STA.l $7F1380,x
	LDA.w $000D,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $000E,y
	STA.l $7F1500,x
	LDA.w $000F,y
	STA.l $7F1580,x
	LDA.w $0010,y
	STA.l $7F1600,x
	LDA.w $0011,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0012,y
	STA.l $7F1780,x
	LDA.w $0013,y
	STA.l $7F1800,x
	LDA.w $0014,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0015,y
	STA.l $7F1980,x
	LDA.w $0016,y
	STA.l $7F1A00,x
	LDA.w $0017,y
	STA.l $7F1A80,x
	LDA.w $0018,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $0019,y
	STA.l $7F1C00,x
	LDA.w $001A,y
	STA.l $7F1C80,x
	LDA.w $001B,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001C,y
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	LDA.w $0025,y
	STA.l $7F2380,x
	LDA.w $0026,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0027,y
	STA.l $7F2500,x
	LDA.w $0028,y
	STA.l $7F2580,x
	LDA.w $0029,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $002A,y
	STA.l $7F2700,x
	LDA.w $002B,y
	STA.l $7F2780,x
	LDA.w $002C,y
	STA.l $7F2800,x
	LDA.w $002D,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002E,y
	STA.l $7F2980,x
	LDA.w $002F,y
	STA.l $7F2A00,x
	LDA.w $0030,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0031,y
	STA.l $7F2B80,x
	LDA.w $0032,y
	STA.l $7F2C00,x
	LDA.w $0033,y
	STA.l $7F2C80,x
	LDA.w $0034,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0035,y
	STA.l $7F2E00,x
	LDA.w $0036,y
	STA.l $7F2E80,x
	LDA.w $0037,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0038,y
	STA.l $7F3000,x
	LDA.w $0039,y
	STA.l $7F3080,x
	LDA.w $003A,y
	STA.l $7F3100,x
	LDA.w $003B,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $003C,y
	STA.l $7F3280,x
	LDA.w $003D,y
	STA.l $7F3300,x
	LDA.w $003E,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	REP.b #$20
	RTL

CODE_A7AEC4:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0001,y
	STA.l $7F0C00,x
	LDA.w $0002,y
	STA.l $7F0C80,x
	LDA.w $0003,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0004,y
	STA.l $7F0E00,x
	LDA.w $0005,y
	STA.l $7F0E80,x
	LDA.w $0006,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0007,y
	STA.l $7F1000,x
	LDA.w $0008,y
	STA.l $7F1080,x
	LDA.w $0009,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $000A,y
	STA.l $7F1200,x
	LDA.w $000B,y
	STA.l $7F1280,x
	LDA.w $000C,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $000D,y
	STA.l $7F1400,x
	LDA.w $000E,y
	STA.l $7F1480,x
	LDA.w $000F,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0010,y
	STA.l $7F1600,x
	LDA.w $0011,y
	STA.l $7F1680,x
	LDA.w $0012,y
	STA.l $7F1700,x
	LDA.w $0013,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0014,y
	STA.l $7F1880,x
	LDA.w $0015,y
	STA.l $7F1900,x
	LDA.w $0016,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $0017,y
	STA.l $7F1A80,x
	LDA.w $0018,y
	STA.l $7F1B00,x
	LDA.w $0019,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001A,y
	STA.l $7F1C80,x
	LDA.w $001B,y
	STA.l $7F1D00,x
	LDA.w $001C,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	LDA.w $0023,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	LDA.w $0025,y
	STA.l $7F2380,x
	LDA.w $0026,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0027,y
	STA.l $7F2500,x
	LDA.w $0028,y
	STA.l $7F2580,x
	LDA.w $0029,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $002A,y
	STA.l $7F2700,x
	LDA.w $002B,y
	STA.l $7F2780,x
	LDA.w $002C,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002D,y
	STA.l $7F2900,x
	LDA.w $002E,y
	STA.l $7F2980,x
	LDA.w $002F,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0030,y
	STA.l $7F2B00,x
	LDA.w $0031,y
	STA.l $7F2B80,x
	LDA.w $0032,y
	STA.l $7F2C00,x
	LDA.w $0033,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0034,y
	STA.l $7F2D80,x
	LDA.w $0035,y
	STA.l $7F2E00,x
	LDA.w $0036,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0037,y
	STA.l $7F2F80,x
	LDA.w $0038,y
	STA.l $7F3000,x
	LDA.w $0039,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $003A,y
	STA.l $7F3180,x
	LDA.w $003B,y
	STA.l $7F3200,x
	LDA.w $003C,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $003D,y
	STA.l $7F3380,x
	LDA.w $003E,y
	STA.l $7F3400,x
	LDA.w $003F,y
	STA.l $7F3480,x
	REP.b #$20
	RTL

CODE_A7B0D9:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0001,y
	STA.l $7F0B80,x
	LDA.w $0002,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0003,y
	STA.l $7F0D00,x
	LDA.w $0004,y
	STA.l $7F0D80,x
	LDA.w $0005,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0006,y
	STA.l $7F0F00,x
	LDA.w $0007,y
	STA.l $7F0F80,x
	LDA.w $0008,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0009,y
	STA.l $7F1100,x
	LDA.w $000A,y
	STA.l $7F1180,x
	LDA.w $000B,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $000C,y
	STA.l $7F1300,x
	LDA.w $000D,y
	STA.l $7F1380,x
	LDA.w $000E,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $000F,y
	STA.l $7F1500,x
	LDA.w $0010,y
	STA.l $7F1580,x
	LDA.w $0011,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0012,y
	STA.l $7F1700,x
	LDA.w $0013,y
	STA.l $7F1780,x
	LDA.w $0014,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0015,y
	STA.l $7F1900,x
	LDA.w $0016,y
	STA.l $7F1980,x
	LDA.w $0017,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $0018,y
	STA.l $7F1B00,x
	LDA.w $0019,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001A,y
	STA.l $7F1C80,x
	LDA.w $001B,y
	STA.l $7F1D00,x
	LDA.w $001C,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001D,y
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	LDA.w $0025,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0026,y
	STA.l $7F2480,x
	LDA.w $0027,y
	STA.l $7F2500,x
	LDA.w $0028,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0029,y
	STA.l $7F2680,x
	LDA.w $002A,y
	STA.l $7F2700,x
	LDA.w $002B,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $002C,y
	STA.l $7F2880,x
	LDA.w $002D,y
	STA.l $7F2900,x
	LDA.w $002E,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002F,y
	STA.l $7F2A80,x
	LDA.w $0030,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0031,y
	STA.l $7F2C00,x
	LDA.w $0032,y
	STA.l $7F2C80,x
	LDA.w $0033,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0034,y
	STA.l $7F2E00,x
	LDA.w $0035,y
	STA.l $7F2E80,x
	LDA.w $0036,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0037,y
	STA.l $7F3000,x
	LDA.w $0038,y
	STA.l $7F3080,x
	LDA.w $0039,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $003A,y
	STA.l $7F3200,x
	LDA.w $003B,y
	STA.l $7F3280,x
	LDA.w $003C,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $003D,y
	STA.l $7F3400,x
	LDA.w $003E,y
	STA.l $7F3480,x
	LDA.w $003F,y
	STA.l $7F3500,x
	REP.b #$20
	RTL

CODE_A7B2F6:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0001,y
	STA.l $7F0B00,x
	LDA.w $0002,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0003,y
	STA.l $7F0C80,x
	LDA.w $0004,y
	STA.l $7F0D00,x
	LDA.w $0005,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0006,y
	STA.l $7F0E80,x
	LDA.w $0007,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0008,y
	STA.l $7F1000,x
	LDA.w $0009,y
	STA.l $7F1080,x
	LDA.w $000A,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $000B,y
	STA.l $7F1200,x
	LDA.w $000C,y
	STA.l $7F1280,x
	LDA.w $000D,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $000E,y
	STA.l $7F1400,x
	LDA.w $000F,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0010,y
	STA.l $7F1580,x
	LDA.w $0011,y
	STA.l $7F1600,x
	LDA.w $0012,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0013,y
	STA.l $7F1780,x
	LDA.w $0014,y
	STA.l $7F1800,x
	LDA.w $0015,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0016,y
	STA.l $7F1980,x
	LDA.w $0017,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $0018,y
	STA.l $7F1B00,x
	LDA.w $0019,y
	STA.l $7F1B80,x
	LDA.w $001A,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001B,y
	STA.l $7F1D00,x
	LDA.w $001C,y
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	LDA.w $0025,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0026,y
	STA.l $7F2480,x
	LDA.w $0027,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0028,y
	STA.l $7F2600,x
	LDA.w $0029,y
	STA.l $7F2680,x
	LDA.w $002A,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $002B,y
	STA.l $7F2800,x
	LDA.w $002C,y
	STA.l $7F2880,x
	LDA.w $002D,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002E,y
	STA.l $7F2A00,x
	LDA.w $002F,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0030,y
	STA.l $7F2B80,x
	LDA.w $0031,y
	STA.l $7F2C00,x
	LDA.w $0032,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0033,y
	STA.l $7F2D80,x
	LDA.w $0034,y
	STA.l $7F2E00,x
	LDA.w $0035,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0036,y
	STA.l $7F2F80,x
	LDA.w $0037,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0038,y
	STA.l $7F3100,x
	LDA.w $0039,y
	STA.l $7F3180,x
	LDA.w $003A,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $003B,y
	STA.l $7F3300,x
	LDA.w $003C,y
	STA.l $7F3380,x
	LDA.w $003D,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $003E,y
	STA.l $7F3500,x
	LDA.w $003F,y
	STA.l $7F3580,x
	REP.b #$20
	RTL

CODE_A7B51B:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0001,y
	STA.l $7F0A80,x
	LDA.w $0002,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0003,y
	STA.l $7F0C00,x
	LDA.w $0004,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0005,y
	STA.l $7F0D80,x
	LDA.w $0006,y
	STA.l $7F0E00,x
	LDA.w $0007,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0008,y
	STA.l $7F0F80,x
	LDA.w $0009,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $000A,y
	STA.l $7F1100,x
	LDA.w $000B,y
	STA.l $7F1180,x
	LDA.w $000C,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $000D,y
	STA.l $7F1300,x
	LDA.w $000E,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $000F,y
	STA.l $7F1480,x
	LDA.w $0010,y
	STA.l $7F1500,x
	LDA.w $0011,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0012,y
	STA.l $7F1680,x
	LDA.w $0013,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0014,y
	STA.l $7F1800,x
	LDA.w $0015,y
	STA.l $7F1880,x
	LDA.w $0016,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0017,y
	STA.l $7F1A00,x
	LDA.w $0018,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $0019,y
	STA.l $7F1B80,x
	LDA.w $001A,y
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001C,y
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0025,y
	STA.l $7F2400,x
	LDA.w $0026,y
	STA.l $7F2480,x
	LDA.w $0027,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0028,y
	STA.l $7F2600,x
	LDA.w $0029,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $002A,y
	STA.l $7F2780,x
	LDA.w $002B,y
	STA.l $7F2800,x
	LDA.w $002C,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002D,y
	STA.l $7F2980,x
	LDA.w $002E,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002F,y
	STA.l $7F2B00,x
	LDA.w $0030,y
	STA.l $7F2B80,x
	LDA.w $0031,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0032,y
	STA.l $7F2D00,x
	LDA.w $0033,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0034,y
	STA.l $7F2E80,x
	LDA.w $0035,y
	STA.l $7F2F00,x
	LDA.w $0036,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0037,y
	STA.l $7F3080,x
	LDA.w $0038,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0039,y
	STA.l $7F3200,x
	LDA.w $003A,y
	STA.l $7F3280,x
	LDA.w $003B,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $003C,y
	STA.l $7F3400,x
	LDA.w $003D,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $003E,y
	STA.l $7F3580,x
	LDA.w $003F,y
	STA.l $7F3600,x
	REP.b #$20
	RTL

CODE_A7B748:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0001,y
	STA.l $7F0A00,x
	LDA.w $0002,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0003,y
	STA.l $7F0B80,x
	LDA.w $0004,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0005,y
	STA.l $7F0D00,x
	LDA.w $0006,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0007,y
	STA.l $7F0E80,x
	LDA.w $0008,y
	STA.l $7F0F00,x
	LDA.w $0009,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000A,y
	STA.l $7F1080,x
	LDA.w $000B,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $000C,y
	STA.l $7F1200,x
	LDA.w $000D,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $000E,y
	STA.l $7F1380,x
	LDA.w $000F,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0010,y
	STA.l $7F1500,x
	LDA.w $0011,y
	STA.l $7F1580,x
	LDA.w $0012,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0013,y
	STA.l $7F1700,x
	LDA.w $0014,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0015,y
	STA.l $7F1880,x
	LDA.w $0016,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0017,y
	STA.l $7F1A00,x
	LDA.w $0018,y
	STA.l $7F1A80,x
	LDA.w $0019,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001A,y
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001C,y
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	LDA.w $0022,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0025,y
	STA.l $7F2400,x
	LDA.w $0026,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0027,y
	STA.l $7F2580,x
	LDA.w $0028,y
	STA.l $7F2600,x
	LDA.w $0029,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $002A,y
	STA.l $7F2780,x
	LDA.w $002B,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002C,y
	STA.l $7F2900,x
	LDA.w $002D,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002E,y
	STA.l $7F2A80,x
	LDA.w $002F,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0030,y
	STA.l $7F2C00,x
	LDA.w $0031,y
	STA.l $7F2C80,x
	LDA.w $0032,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0033,y
	STA.l $7F2E00,x
	LDA.w $0034,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0035,y
	STA.l $7F2F80,x
	LDA.w $0036,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0037,y
	STA.l $7F3100,x
	LDA.w $0038,y
	STA.l $7F3180,x
	LDA.w $0039,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $003A,y
	STA.l $7F3300,x
	LDA.w $003B,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $003C,y
	STA.l $7F3480,x
	LDA.w $003D,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $003E,y
	STA.l $7F3600,x
	LDA.w $003F,y
	STA.l $7F3680,x
	REP.b #$20
	RTL

CODE_A7B97D:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0001,y
	STA.l $7F0980,x
	LDA.w $0002,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0003,y
	STA.l $7F0B00,x
	LDA.w $0004,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0005,y
	STA.l $7F0C80,x
	LDA.w $0006,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0007,y
	STA.l $7F0E00,x
	LDA.w $0008,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0009,y
	STA.l $7F0F80,x
	LDA.w $000A,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $000B,y
	STA.l $7F1100,x
	LDA.w $000C,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $000D,y
	STA.l $7F1280,x
	LDA.w $000E,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $000F,y
	STA.l $7F1400,x
	LDA.w $0010,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0011,y
	STA.l $7F1580,x
	LDA.w $0012,y
	STA.l $7F1600,x
	LDA.w $0013,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0014,y
	STA.l $7F1780,x
	LDA.w $0015,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0016,y
	STA.l $7F1900,x
	LDA.w $0017,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $0018,y
	STA.l $7F1A80,x
	LDA.w $0019,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001A,y
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001C,y
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	LDA.w $0024,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0025,y
	STA.l $7F2400,x
	LDA.w $0026,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0027,y
	STA.l $7F2580,x
	LDA.w $0028,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0029,y
	STA.l $7F2700,x
	LDA.w $002A,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $002B,y
	STA.l $7F2880,x
	LDA.w $002C,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002D,y
	STA.l $7F2A00,x
	LDA.w $002E,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002F,y
	STA.l $7F2B80,x
	LDA.w $0030,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0031,y
	STA.l $7F2D00,x
	LDA.w $0032,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0033,y
	STA.l $7F2E80,x
	LDA.w $0034,y
	STA.l $7F2F00,x
	LDA.w $0035,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0036,y
	STA.l $7F3080,x
	LDA.w $0037,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0038,y
	STA.l $7F3200,x
	LDA.w $0039,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $003A,y
	STA.l $7F3380,x
	LDA.w $003B,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $003C,y
	STA.l $7F3500,x
	LDA.w $003D,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $003E,y
	STA.l $7F3680,x
	LDA.w $003F,y
	STA.l $7F3700,x
	REP.b #$20
	RTL

CODE_A7BBBA:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0001,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0002,y
	STA.l $7F0A00,x
	LDA.w $0003,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0004,y
	STA.l $7F0B80,x
	LDA.w $0005,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0006,y
	STA.l $7F0D00,x
	LDA.w $0007,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0008,y
	STA.l $7F0E80,x
	LDA.w $0009,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $000A,y
	STA.l $7F1000,x
	LDA.w $000B,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $000C,y
	STA.l $7F1180,x
	LDA.w $000D,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $000E,y
	STA.l $7F1300,x
	LDA.w $000F,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0010,y
	STA.l $7F1480,x
	LDA.w $0011,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0012,y
	STA.l $7F1600,x
	LDA.w $0013,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0014,y
	STA.l $7F1780,x
	LDA.w $0015,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0016,y
	STA.l $7F1900,x
	LDA.w $0017,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $0018,y
	STA.l $7F1A80,x
	LDA.w $0019,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001A,y
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001C,y
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0024,y
	STA.l $7F2380,x
	LDA.w $0025,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0026,y
	STA.l $7F2500,x
	LDA.w $0027,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0028,y
	STA.l $7F2680,x
	LDA.w $0029,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $002A,y
	STA.l $7F2800,x
	LDA.w $002B,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002C,y
	STA.l $7F2980,x
	LDA.w $002D,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002E,y
	STA.l $7F2B00,x
	LDA.w $002F,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0030,y
	STA.l $7F2C80,x
	LDA.w $0031,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0032,y
	STA.l $7F2E00,x
	LDA.w $0033,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0034,y
	STA.l $7F2F80,x
	LDA.w $0035,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0036,y
	STA.l $7F3100,x
	LDA.w $0037,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0038,y
	STA.l $7F3280,x
	LDA.w $0039,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $003A,y
	STA.l $7F3400,x
	LDA.w $003B,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $003C,y
	STA.l $7F3580,x
	LDA.w $003D,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $003E,y
	STA.l $7F3700,x
	LDA.w $003F,y
	STA.l $7F3780,x
	REP.b #$20
	RTL

CODE_A7BDFF:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0001,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0002,y
	STA.l $7F0980,x
	LDA.w $0003,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0004,y
	STA.l $7F0B00,x
	LDA.w $0005,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0006,y
	STA.l $7F0C80,x
	LDA.w $0007,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0008,y
	STA.l $7F0E00,x
	LDA.w $0009,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $000A,y
	STA.l $7F0F80,x
	LDA.w $000B,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $000C,y
	STA.l $7F1100,x
	LDA.w $000D,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $000E,y
	STA.l $7F1280,x
	LDA.w $000F,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0010,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0011,y
	STA.l $7F1500,x
	LDA.w $0012,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0013,y
	STA.l $7F1680,x
	LDA.w $0014,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0015,y
	STA.l $7F1800,x
	LDA.w $0016,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0017,y
	STA.l $7F1980,x
	LDA.w $0018,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $0019,y
	STA.l $7F1B00,x
	LDA.w $001A,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0024,y
	STA.l $7F2380,x
	LDA.w $0025,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0026,y
	STA.l $7F2500,x
	LDA.w $0027,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0028,y
	STA.l $7F2680,x
	LDA.w $0029,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $002A,y
	STA.l $7F2800,x
	LDA.w $002B,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002C,y
	STA.l $7F2980,x
	LDA.w $002D,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002E,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002F,y
	STA.l $7F2C00,x
	LDA.w $0030,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0031,y
	STA.l $7F2D80,x
	LDA.w $0032,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0033,y
	STA.l $7F2F00,x
	LDA.w $0034,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0035,y
	STA.l $7F3080,x
	LDA.w $0036,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0037,y
	STA.l $7F3200,x
	LDA.w $0038,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0039,y
	STA.l $7F3380,x
	LDA.w $003A,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $003B,y
	STA.l $7F3500,x
	LDA.w $003C,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $003D,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $003E,y
	STA.l $7F3780,x
	LDA.w $003F,y
	STA.l $7F3800,x
	REP.b #$20
	RTL

CODE_A7C04C:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0001,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0002,y
	STA.l $7F0900,x
	LDA.w $0003,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0004,y
	STA.l $7F0A80,x
	LDA.w $0005,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0006,y
	STA.l $7F0C00,x
	LDA.w $0007,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0008,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0009,y
	STA.l $7F0E80,x
	LDA.w $000A,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $000B,y
	STA.l $7F1000,x
	LDA.w $000C,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $000D,y
	STA.l $7F1180,x
	LDA.w $000E,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $000F,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0010,y
	STA.l $7F1400,x
	LDA.w $0011,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0012,y
	STA.l $7F1580,x
	LDA.w $0013,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0014,y
	STA.l $7F1700,x
	LDA.w $0015,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0016,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0017,y
	STA.l $7F1980,x
	LDA.w $0018,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $0019,y
	STA.l $7F1B00,x
	LDA.w $001A,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001E,y
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0024,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0025,y
	STA.l $7F2480,x
	LDA.w $0026,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0027,y
	STA.l $7F2600,x
	LDA.w $0028,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0029,y
	STA.l $7F2780,x
	LDA.w $002A,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002B,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002C,y
	STA.l $7F2A00,x
	LDA.w $002D,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002E,y
	STA.l $7F2B80,x
	LDA.w $002F,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0030,y
	STA.l $7F2D00,x
	LDA.w $0031,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0032,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0033,y
	STA.l $7F2F80,x
	LDA.w $0034,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0035,y
	STA.l $7F3100,x
	LDA.w $0036,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0037,y
	STA.l $7F3280,x
	LDA.w $0038,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0039,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $003A,y
	STA.l $7F3500,x
	LDA.w $003B,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $003C,y
	STA.l $7F3680,x
	LDA.w $003D,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $003E,y
	STA.l $7F3800,x
	LDA.w $003F,y
	STA.l $7F3880,x
	REP.b #$20
	RTL

CODE_A7C2A1:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0001,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0002,y
	STA.l $7F0880,x
	LDA.w $0003,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0004,y
	STA.l $7F0A00,x
	LDA.w $0005,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0006,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0007,y
	STA.l $7F0C80,x
	LDA.w $0008,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0009,y
	STA.l $7F0E00,x
	LDA.w $000A,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $000B,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000C,y
	STA.l $7F1080,x
	LDA.w $000D,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $000E,y
	STA.l $7F1200,x
	LDA.w $000F,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0010,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0011,y
	STA.l $7F1480,x
	LDA.w $0012,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0013,y
	STA.l $7F1600,x
	LDA.w $0014,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0015,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0016,y
	STA.l $7F1880,x
	LDA.w $0017,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0018,y
	STA.l $7F1A00,x
	LDA.w $0019,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001A,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	LDA.w $0023,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0024,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0025,y
	STA.l $7F2480,x
	LDA.w $0026,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0027,y
	STA.l $7F2600,x
	LDA.w $0028,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0029,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $002A,y
	STA.l $7F2880,x
	LDA.w $002B,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002C,y
	STA.l $7F2A00,x
	LDA.w $002D,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002E,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002F,y
	STA.l $7F2C80,x
	LDA.w $0030,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0031,y
	STA.l $7F2E00,x
	LDA.w $0032,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0033,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0034,y
	STA.l $7F3080,x
	LDA.w $0035,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0036,y
	STA.l $7F3200,x
	LDA.w $0037,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0038,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0039,y
	STA.l $7F3480,x
	LDA.w $003A,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $003B,y
	STA.l $7F3600,x
	LDA.w $003C,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $003D,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $003E,y
	STA.l $7F3880,x
	LDA.w $003F,y
	STA.l $7F3900,x
	REP.b #$20
	RTL

CODE_A7C4FE:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0001,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0002,y
	STA.l $7F0800,x
	LDA.w $0003,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0004,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0005,y
	STA.l $7F0A80,x
	LDA.w $0006,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0007,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0008,y
	STA.l $7F0D00,x
	LDA.w $0009,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000A,y
	STA.l $7F0E80,x
	LDA.w $000B,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $000C,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $000D,y
	STA.l $7F1100,x
	LDA.w $000E,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $000F,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0010,y
	STA.l $7F1380,x
	LDA.w $0011,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0012,y
	STA.l $7F1500,x
	LDA.w $0013,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0014,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0015,y
	STA.l $7F1780,x
	LDA.w $0016,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0017,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0018,y
	STA.l $7F1A00,x
	LDA.w $0019,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001A,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001B,y
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	LDA.w $0024,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0025,y
	STA.l $7F2480,x
	LDA.w $0026,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0027,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0028,y
	STA.l $7F2700,x
	LDA.w $0029,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $002A,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002B,y
	STA.l $7F2980,x
	LDA.w $002C,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002D,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002E,y
	STA.l $7F2C00,x
	LDA.w $002F,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0030,y
	STA.l $7F2D80,x
	LDA.w $0031,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0032,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0033,y
	STA.l $7F3000,x
	LDA.w $0034,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0035,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0036,y
	STA.l $7F3280,x
	LDA.w $0037,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0038,y
	STA.l $7F3400,x
	LDA.w $0039,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $003A,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $003B,y
	STA.l $7F3680,x
	LDA.w $003C,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $003D,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $003E,y
	STA.l $7F3900,x
	LDA.w $003F,y
	STA.l $7F3980,x
	REP.b #$20
	RTL

CODE_A7C763:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0001,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0002,y
	STA.l $7F0780,x
	LDA.w $0003,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0004,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0005,y
	STA.l $7F0A00,x
	LDA.w $0006,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0007,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0008,y
	STA.l $7F0C80,x
	LDA.w $0009,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000A,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000B,y
	STA.l $7F0F00,x
	LDA.w $000C,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000D,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $000E,y
	STA.l $7F1180,x
	LDA.w $000F,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0010,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0011,y
	STA.l $7F1400,x
	LDA.w $0012,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0013,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0014,y
	STA.l $7F1680,x
	LDA.w $0015,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0016,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0017,y
	STA.l $7F1900,x
	LDA.w $0018,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $0019,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001A,y
	STA.l $7F1B80,x
	LDA.w $001B,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	LDA.w $0024,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0025,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0026,y
	STA.l $7F2580,x
	LDA.w $0027,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0028,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0029,y
	STA.l $7F2800,x
	LDA.w $002A,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002B,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002C,y
	STA.l $7F2A80,x
	LDA.w $002D,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002E,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002F,y
	STA.l $7F2D00,x
	LDA.w $0030,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0031,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0032,y
	STA.l $7F2F80,x
	LDA.w $0033,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0034,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0035,y
	STA.l $7F3200,x
	LDA.w $0036,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0037,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0038,y
	STA.l $7F3480,x
	LDA.w $0039,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $003A,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $003B,y
	STA.l $7F3700,x
	LDA.w $003C,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $003D,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $003E,y
	STA.l $7F3980,x
	LDA.w $003F,y
	STA.l $7F3A00,x
	REP.b #$20
	RTL

CODE_A7C9D0:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0001,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0002,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0003,y
	STA.l $7F0800,x
	LDA.w $0004,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0005,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0006,y
	STA.l $7F0A80,x
	LDA.w $0007,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0008,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0009,y
	STA.l $7F0D00,x
	LDA.w $000A,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000B,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $000C,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000D,y
	STA.l $7F1080,x
	LDA.w $000E,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $000F,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0010,y
	STA.l $7F1300,x
	LDA.w $0011,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0012,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0013,y
	STA.l $7F1580,x
	LDA.w $0014,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0015,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0016,y
	STA.l $7F1800,x
	LDA.w $0017,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0018,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $0019,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001A,y
	STA.l $7F1B80,x
	LDA.w $001B,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	LDA.w $0025,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0026,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0027,y
	STA.l $7F2680,x
	LDA.w $0028,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0029,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002A,y
	STA.l $7F2900,x
	LDA.w $002B,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002C,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002D,y
	STA.l $7F2B80,x
	LDA.w $002E,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002F,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0030,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0031,y
	STA.l $7F2F00,x
	LDA.w $0032,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0033,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0034,y
	STA.l $7F3180,x
	LDA.w $0035,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0036,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0037,y
	STA.l $7F3400,x
	LDA.w $0038,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0039,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $003A,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $003B,y
	STA.l $7F3780,x
	LDA.w $003C,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $003D,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $003E,y
	STA.l $7F3A00,x
	LDA.w $003F,y
	STA.l $7F3A80,x
	REP.b #$20
	RTL

CODE_A7CC45:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0001,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0002,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0003,y
	STA.l $7F0780,x
	LDA.w $0004,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0005,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0006,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0007,y
	STA.l $7F0B00,x
	LDA.w $0008,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0009,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000A,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000B,y
	STA.l $7F0E80,x
	LDA.w $000C,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $000D,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $000E,y
	STA.l $7F1100,x
	LDA.w $000F,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0010,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0011,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0012,y
	STA.l $7F1480,x
	LDA.w $0013,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0014,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0015,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0016,y
	STA.l $7F1800,x
	LDA.w $0017,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0018,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $0019,y
	STA.l $7F1A80,x
	LDA.w $001A,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001B,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001D,y
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	LDA.w $0025,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0026,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0027,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0028,y
	STA.l $7F2780,x
	LDA.w $0029,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002A,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002B,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002C,y
	STA.l $7F2B00,x
	LDA.w $002D,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002E,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002F,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0030,y
	STA.l $7F2E80,x
	LDA.w $0031,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0032,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0033,y
	STA.l $7F3100,x
	LDA.w $0034,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0035,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0036,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0037,y
	STA.l $7F3480,x
	LDA.w $0038,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0039,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $003A,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $003B,y
	STA.l $7F3800,x
	LDA.w $003C,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $003D,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $003E,y
	STA.l $7F3A80,x
	LDA.w $003F,y
	STA.l $7F3B00,x
	REP.b #$20
	RTL

CODE_A7CEC2:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0001,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0002,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0003,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0004,y
	STA.l $7F0800,x
	LDA.w $0005,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0006,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0007,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0008,y
	STA.l $7F0B80,x
	LDA.w $0009,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000A,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000B,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000C,y
	STA.l $7F0F00,x
	LDA.w $000D,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000E,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $000F,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0010,y
	STA.l $7F1280,x
	LDA.w $0011,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0012,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0013,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0014,y
	STA.l $7F1600,x
	LDA.w $0015,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0016,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0017,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0018,y
	STA.l $7F1980,x
	LDA.w $0019,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001A,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001B,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	LDA.w $0025,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0026,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0027,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0028,y
	STA.l $7F2780,x
	LDA.w $0029,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $002A,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002B,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002C,y
	STA.l $7F2B00,x
	LDA.w $002D,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002E,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002F,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0030,y
	STA.l $7F2E80,x
	LDA.w $0031,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0032,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0033,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0034,y
	STA.l $7F3200,x
	LDA.w $0035,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0036,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0037,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0038,y
	STA.l $7F3580,x
	LDA.w $0039,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $003A,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $003B,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $003C,y
	STA.l $7F3900,x
	LDA.w $003D,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $003E,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $003F,y
	STA.l $7F3B80,x
	REP.b #$20
	RTL

CODE_A7D147:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0001,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0002,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0003,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0004,y
	STA.l $7F0780,x
	LDA.w $0005,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0006,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0007,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0008,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0009,y
	STA.l $7F0C00,x
	LDA.w $000A,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000B,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000C,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $000D,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000E,y
	STA.l $7F1080,x
	LDA.w $000F,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0010,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0011,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0012,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0013,y
	STA.l $7F1500,x
	LDA.w $0014,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0015,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0016,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0017,y
	STA.l $7F1880,x
	LDA.w $0018,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0019,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001A,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001B,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001C,y
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0026,y
	STA.l $7F2600,x
	LDA.w $0027,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0028,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0029,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002A,y
	STA.l $7F2980,x
	LDA.w $002B,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002C,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002D,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002E,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002F,y
	STA.l $7F2E00,x
	LDA.w $0030,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0031,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0032,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0033,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0034,y
	STA.l $7F3280,x
	LDA.w $0035,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0036,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0037,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0038,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0039,y
	STA.l $7F3700,x
	LDA.w $003A,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $003B,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $003C,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $003D,y
	STA.l $7F3A80,x
	LDA.w $003E,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $003F,y
	STA.l $7F3C00,x
	REP.b #$20
	RTL

CODE_A7D3D4:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0001,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0002,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0003,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0004,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0005,y
	STA.l $7F0800,x
	LDA.w $0006,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0007,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0008,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0009,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000A,y
	STA.l $7F0C80,x
	LDA.w $000B,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000C,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000D,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $000E,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $000F,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0010,y
	STA.l $7F1200,x
	LDA.w $0011,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0012,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0013,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0014,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0015,y
	STA.l $7F1680,x
	LDA.w $0016,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0017,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0018,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0019,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001A,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001B,y
	STA.l $7F1C00,x
	LDA.w $001C,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	LDA.w $0026,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0027,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0028,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0029,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $002A,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002B,y
	STA.l $7F2A80,x
	LDA.w $002C,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002D,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002E,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002F,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0030,y
	STA.l $7F2F00,x
	LDA.w $0031,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0032,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0033,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0034,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0035,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0036,y
	STA.l $7F3480,x
	LDA.w $0037,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0038,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0039,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $003A,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $003B,y
	STA.l $7F3900,x
	LDA.w $003C,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $003D,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $003E,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003F,y
	STA.l $7F3C80,x
	REP.b #$20
	RTL

CODE_A7D669:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0001,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0002,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0003,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0004,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0005,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0006,y
	STA.l $7F0880,x
	LDA.w $0007,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0008,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0009,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000A,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000B,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000C,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000D,y
	STA.l $7F0F00,x
	LDA.w $000E,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000F,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0010,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0011,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0012,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0013,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0014,y
	STA.l $7F1580,x
	LDA.w $0015,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0016,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0017,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0018,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0019,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001A,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001B,y
	STA.l $7F1C00,x
	LDA.w $001C,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0026,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0027,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0028,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0029,y
	STA.l $7F2900,x
	LDA.w $002A,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002B,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002C,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002D,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002E,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002F,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0030,y
	STA.l $7F2F80,x
	LDA.w $0031,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0032,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0033,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0034,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0035,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0036,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0037,y
	STA.l $7F3600,x
	LDA.w $0038,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0039,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $003A,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $003B,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $003C,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $003D,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003E,y
	STA.l $7F3C80,x
	LDA.w $003F,y
	STA.l $7F3D00,x
	REP.b #$20
	RTL

CODE_A7D906:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0001,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0002,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0003,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0004,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0005,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0006,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0007,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0008,y
	STA.l $7F0A00,x
	LDA.w $0009,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000A,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000B,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000C,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000D,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $000E,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $000F,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0010,y
	STA.l $7F1180,x
	LDA.w $0011,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0012,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0013,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0014,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0015,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0016,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0017,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0018,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $0019,y
	STA.l $7F1A00,x
	LDA.w $001A,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001B,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001C,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0026,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0027,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0028,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0029,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002A,y
	STA.l $7F2A00,x
	LDA.w $002B,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002C,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002D,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002E,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002F,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0030,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0031,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0032,y
	STA.l $7F3180,x
	LDA.w $0033,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0034,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0035,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0036,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0037,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0038,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0039,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $003A,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $003B,y
	STA.l $7F3A00,x
	LDA.w $003C,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $003D,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003E,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $003F,y
	STA.l $7F3D80,x
	REP.b #$20
	RTL

CODE_A7DBAB:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0001,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0002,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0003,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0004,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0005,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0006,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0007,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0008,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0009,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000A,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000B,y
	STA.l $7F0C80,x
	LDA.w $000C,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000D,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000E,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $000F,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0010,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0011,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0012,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0013,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0014,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0015,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0016,y
	STA.l $7F1700,x
	LDA.w $0017,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0018,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0019,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001A,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001B,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001C,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0026,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0027,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0028,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0029,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002A,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002B,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002C,y
	STA.l $7F2C00,x
	LDA.w $002D,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002E,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002F,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0030,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0031,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0032,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0033,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0034,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0035,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0036,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0037,y
	STA.l $7F3680,x
	LDA.w $0038,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0039,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $003A,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $003B,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $003C,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $003D,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $003E,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003F,y
	STA.l $7F3E00,x
	REP.b #$20
	RTL

CODE_A7DE58:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0001,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0002,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0003,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0004,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0005,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0006,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0007,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0008,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0009,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000A,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000B,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000C,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000D,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000E,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $000F,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0010,y
	STA.l $7F1100,x
	LDA.w $0011,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0012,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0013,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0014,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0015,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0016,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0017,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0018,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0019,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001A,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001B,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001C,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0026,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0027,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0028,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0029,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002A,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002B,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002C,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002D,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002E,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002F,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0030,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0031,y
	STA.l $7F3100,x
	LDA.w $0032,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0033,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0034,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0035,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0036,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0037,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0038,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0039,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $003A,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $003B,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $003C,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003D,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $003E,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $003F,y
	STA.l $7F3E80,x
	REP.b #$20
	RTL

CODE_A7E10D:
	SEP.b #$20
	LDA.w $0000,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0001,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0002,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0003,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0004,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0005,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0006,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0007,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0008,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0009,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000A,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000B,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000C,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000D,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000E,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $000F,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0010,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0011,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0012,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0013,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0014,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0015,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0016,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0017,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0018,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $0019,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001A,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001B,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001C,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001D,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0026,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0027,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0028,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0029,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002A,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002B,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002C,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002D,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002E,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002F,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0030,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0031,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0032,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0033,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0034,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0035,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0036,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0037,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0038,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0039,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $003A,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $003B,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $003C,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $003D,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003E,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003F,y
	STA.l $7F3F00,x
	REP.b #$20
	RTL

CODE_A7E3CA:
	SEP.b #$20
	LDA.w $0000,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0001,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0002,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0003,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0004,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0005,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0006,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0007,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0008,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0009,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000A,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000B,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000C,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000D,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000E,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000F,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0010,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0011,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0012,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0013,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0014,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0015,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0016,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0017,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0018,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0019,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001A,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0021,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0022,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0023,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0024,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0025,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0026,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0027,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0028,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0029,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $002A,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002B,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002C,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002D,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002E,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002F,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0030,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0031,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0032,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0033,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0034,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0035,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0036,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0037,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0038,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0039,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $003A,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $003B,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $003C,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $003D,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003E,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003F,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7E68F:
	SEP.b #$20
	LDA.w $0000,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0001,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0002,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0003,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0004,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0005,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0006,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0007,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0008,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0009,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000A,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000B,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000C,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000D,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000E,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $000F,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0010,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0011,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0012,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0013,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0014,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0015,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0016,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0017,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0018,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0019,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001A,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0024,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0025,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0026,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0027,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0028,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0029,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002A,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002B,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002C,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002D,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002E,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002F,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0030,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0031,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0032,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0033,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0034,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0035,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0036,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0037,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0038,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0039,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $003A,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $003B,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003C,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $003D,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $003E,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $003F,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7E954:
	SEP.b #$20
	LDA.w $0000,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0001,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0002,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0003,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0004,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0005,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0006,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0007,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0008,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0009,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000A,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000B,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000C,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000D,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000E,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000F,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0010,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0011,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0012,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0013,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0014,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0015,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0016,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0017,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0018,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0019,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001A,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0024,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0025,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0026,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0027,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0028,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0029,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $002A,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002B,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002C,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002D,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002E,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002F,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0030,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0031,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0032,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0033,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0034,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0035,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0036,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0037,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0038,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0039,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $003A,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $003B,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $003C,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003D,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003E,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7EC16:
	SEP.b #$20
	LDA.w $0001,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0002,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0003,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0004,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0005,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0006,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0007,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0008,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0009,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000A,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000B,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000C,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000D,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000E,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $000F,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0010,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0011,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0012,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0013,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0014,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0015,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0016,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0017,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0018,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0019,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001A,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0024,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0025,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0026,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0027,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0028,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0029,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002A,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002B,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002C,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002D,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002E,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002F,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0030,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0031,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0032,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0033,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0034,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0035,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0036,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0037,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0038,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0039,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $003A,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003B,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $003C,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $003D,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7EED2:
	SEP.b #$20
	LDA.w $0001,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0002,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0003,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0004,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0005,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0006,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0007,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0008,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0009,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000A,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000B,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000C,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000D,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000E,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000F,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0010,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0011,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0012,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0013,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0014,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0015,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0016,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0017,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0018,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0019,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001A,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0024,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0025,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0026,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0027,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0028,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0029,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002A,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002B,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002C,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002D,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002E,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002F,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0030,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0031,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0032,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0033,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0034,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0035,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0036,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0037,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0038,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0039,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $003A,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $003B,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003C,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $003D,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7F18E:
	SEP.b #$20
	LDA.w $0002,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0003,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0004,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0005,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0006,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0007,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0008,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0009,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000A,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000B,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000C,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000D,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000E,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $000F,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0010,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0011,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0012,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0013,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0014,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0015,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0016,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0017,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0018,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $0019,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001A,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001E,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0025,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0026,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0027,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0028,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0029,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002A,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002B,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002C,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002D,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002E,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002F,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0030,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0031,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0032,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0033,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0034,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0035,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0036,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0037,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0038,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0039,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003A,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $003B,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003C,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7F444:
	SEP.b #$20
	LDA.w $0002,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0003,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0004,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0005,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0006,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0007,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0008,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0009,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000A,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000B,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000C,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000D,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000E,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000F,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0010,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0011,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0012,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0013,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0014,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0015,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0016,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0017,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0018,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0019,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001A,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0024,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0025,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0026,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0027,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0028,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0029,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $002A,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002B,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002C,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002D,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002E,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002F,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0030,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0031,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0032,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0033,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0034,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0035,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0036,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0037,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0038,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0039,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $003A,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003B,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003C,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7F6FA:
	SEP.b #$20
	LDA.w $0003,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0004,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0005,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0006,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0007,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0008,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0009,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000A,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000B,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000C,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000D,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000E,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $000F,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0010,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0011,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0012,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0013,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0014,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0015,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0016,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0017,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0018,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0019,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001A,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0025,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0026,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0027,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0028,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0029,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002A,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002B,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002C,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002D,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002E,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002F,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0030,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0031,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0032,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0033,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0034,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0035,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0036,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0037,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0038,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0039,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $003A,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $003B,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $003C,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7F9AD:
	SEP.b #$20
	LDA.w $0003,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0004,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0005,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0006,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0007,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0008,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0009,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000A,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000B,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000C,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000D,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000E,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000F,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0010,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0011,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0012,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0013,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0014,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0015,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0016,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0017,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0018,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0019,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001A,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001B,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0025,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0026,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0027,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0028,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0029,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002A,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002B,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002C,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002D,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002E,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002F,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0030,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0031,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0032,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0033,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0034,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0035,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0036,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0037,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0038,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0039,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003A,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003B,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A7FC5D:
	SEP.b #$20
	LDA.w $0003,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0004,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0005,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0006,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0007,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0008,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0009,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000A,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000B,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000C,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000D,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000E,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $000F,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0010,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0011,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0012,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0013,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0014,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0015,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0016,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0017,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0018,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0019,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001A,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001B,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0023,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0025,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0026,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0027,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0028,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0029,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $002A,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002B,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002C,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002D,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002E,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002F,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0030,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0031,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0032,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0033,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0034,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0035,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0036,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0037,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0038,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0039,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $003A,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003B,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

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

DATA_A7FF0D:
	incbin "InteriorMaps/RaptorPen_EntryLevel_RoomDataPtrs.rnc"

DATA_A7FF55:
	incbin "InteriorMaps/RaptorPen_EntryLevel_MapLayout_JP_U1.rnc"

UNK_A7FFA7:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($A7FFA7, incbin, DATA_A7FFDC_JP_U2.bin)
else
	%InsertGarbageData($A7FFA7, incbin, DATA_A7FFA7_JP_U1.bin)
endif

%BANK_END(<EndBank>)
endmacro

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

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

CODE_A88000:
	SEP.b #$20
	LDA.w $0004,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0005,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0006,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0007,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0008,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0009,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000A,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000B,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000C,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000D,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000E,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000F,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0010,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0011,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0012,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0013,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0014,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0015,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0016,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0017,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0018,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $0019,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001A,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001B,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001C,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0025,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0026,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0027,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0028,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0029,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002A,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002B,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002C,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002D,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002E,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002F,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0030,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0031,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0032,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0033,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0034,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0035,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0036,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0037,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0038,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0039,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $003A,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A882AA:
	SEP.b #$20
	LDA.w $0004,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0005,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0006,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0007,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0008,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0009,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000A,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000B,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000C,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000D,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000E,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $000F,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0010,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0011,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0012,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0013,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0014,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0015,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0016,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0017,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0018,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0019,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001A,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001B,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0025,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0026,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0027,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0028,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0029,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $002A,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002B,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002C,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002D,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002E,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002F,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0030,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0031,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0032,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0033,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0034,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0035,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0036,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0037,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0038,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0039,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $003A,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A88554:
	SEP.b #$20
	LDA.w $0005,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0006,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0007,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0008,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0009,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000A,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000B,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000C,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000D,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000E,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000F,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0010,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0011,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0012,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0013,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0014,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0015,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0016,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0017,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0018,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0019,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001A,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001B,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0024,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0025,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0026,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0027,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0028,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0029,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002A,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002B,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002C,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002D,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002E,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002F,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0030,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0031,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0032,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0033,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0034,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0035,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0036,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0037,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0038,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0039,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $003A,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A887FB:
	SEP.b #$20
	LDA.w $0005,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0006,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0007,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0008,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0009,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000A,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000B,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000C,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000D,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000E,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $000F,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0010,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0011,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0012,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0013,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0014,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0015,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0016,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0017,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0018,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0019,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001A,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001B,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0025,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0026,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0027,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0028,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0029,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002A,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002B,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002C,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002D,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002E,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002F,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0030,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0031,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0032,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0033,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0034,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0035,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0036,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0037,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0038,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0039,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A88A9F:
	SEP.b #$20
	LDA.w $0005,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0006,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0007,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0008,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0009,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000A,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000B,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000C,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000D,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000E,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000F,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0010,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0011,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0012,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0013,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0014,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0015,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0016,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0017,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0018,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0019,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001A,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001B,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0022,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0024,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0025,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0026,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0027,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0028,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0029,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $002A,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002B,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002C,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002D,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002E,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002F,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0030,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0031,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0032,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0033,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0034,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0035,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0036,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0037,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0038,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0039,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A88D43:
	SEP.b #$20
	LDA.w $0006,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0007,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0008,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0009,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000A,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000B,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000C,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000D,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000E,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $000F,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0010,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0011,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0012,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0013,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0014,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0015,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0016,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0017,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0018,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $0019,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001A,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001B,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001D,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0024,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0025,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0026,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0027,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0028,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0029,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002A,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002B,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002C,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002D,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002E,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002F,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0030,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0031,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0032,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0033,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0034,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0035,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0036,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0037,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0038,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0039,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A88FE4:
	SEP.b #$20
	LDA.w $0006,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0007,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0008,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0009,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000A,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000B,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000C,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000D,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000E,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000F,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0010,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0011,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0012,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0013,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0014,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0015,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0016,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0017,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0018,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0019,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001A,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001B,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0024,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0025,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0026,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0027,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0028,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0029,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002A,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002B,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002C,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002D,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002E,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002F,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0030,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0031,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0032,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0033,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0034,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0035,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0036,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0037,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0038,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A89282:
	SEP.b #$20
	LDA.w $0006,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0007,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0008,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0009,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000A,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000B,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000C,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000D,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000E,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $000F,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0010,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0011,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0012,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0013,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0014,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0015,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0016,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0017,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0018,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0019,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001A,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001B,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001C,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0023,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0024,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0025,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0026,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0027,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0028,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0029,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $002A,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002B,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002C,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002D,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002E,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002F,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0030,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0031,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0032,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0033,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0034,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0035,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0036,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0037,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0038,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A89520:
	SEP.b #$20
	LDA.w $0006,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0007,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0008,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0009,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000A,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000B,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000C,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000D,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000E,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000F,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0010,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0011,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0012,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0013,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0014,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0015,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0016,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0017,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0018,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0019,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001A,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001B,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	LDA.w $001F,y
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0027,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0028,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0029,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002A,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002B,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002C,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002D,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002E,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002F,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0030,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0031,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0032,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0033,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0034,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0035,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0036,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0037,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0038,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A897BE:
	SEP.b #$20
	LDA.w $0007,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0008,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0009,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000A,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000B,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000C,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000D,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000E,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $000F,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0010,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0011,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0012,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0013,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0014,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0015,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0016,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0017,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0018,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $0019,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001A,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001B,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001C,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0027,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0028,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0029,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002A,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002B,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002C,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002D,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002E,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002F,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0030,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0031,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0032,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0033,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0034,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0035,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0036,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0037,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A89A56:
	SEP.b #$20
	LDA.w $0007,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0008,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0009,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000A,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000B,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000C,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000D,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000E,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $000F,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0010,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0011,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0012,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0013,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0014,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0015,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0016,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0017,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0018,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0019,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001A,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001B,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001C,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001E,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0027,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0028,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0029,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002A,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002B,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002C,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002D,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002E,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002F,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0030,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0031,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0032,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0033,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0034,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0035,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0036,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0037,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A89CEE:
	SEP.b #$20
	LDA.w $0007,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0008,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0009,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000A,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000B,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000C,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000D,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000E,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000F,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0010,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0011,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0012,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0013,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0014,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0015,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0016,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0017,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0018,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0019,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001A,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001B,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001C,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0024,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0027,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0028,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0029,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $002A,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002B,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002C,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002D,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002E,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002F,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $0030,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0031,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0032,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0033,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0034,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0035,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0036,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0037,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A89F86:
	SEP.b #$20
	LDA.w $0008,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0009,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000A,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000B,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000C,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000D,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000E,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $000F,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0010,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0011,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0012,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0013,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0014,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0015,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0016,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0017,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0018,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0019,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001A,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001B,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001C,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001D,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0027,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0028,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0029,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002A,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002B,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002C,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002D,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002E,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002F,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0030,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0031,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0032,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0033,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0034,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0035,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0036,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0037,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8A21B:
	SEP.b #$20
	LDA.w $0008,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0009,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000A,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000B,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000C,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000D,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000E,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000F,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0010,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0011,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0012,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0013,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0014,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0015,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0016,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0017,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0018,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $0019,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001A,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001B,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001C,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0027,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0028,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0029,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002A,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002B,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002C,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002D,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002E,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002F,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $0030,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0031,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0032,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0033,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0034,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0035,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0036,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0037,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8A4B0:
	SEP.b #$20
	LDA.w $0008,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0009,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000A,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000B,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000C,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000D,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000E,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $000F,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0010,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0011,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0012,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0013,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0014,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0015,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0016,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0017,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0018,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0019,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001A,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001B,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001C,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0027,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0028,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0029,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002A,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002B,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002C,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002D,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002E,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002F,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0030,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0031,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0032,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0033,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0034,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0035,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0036,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8A742:
	SEP.b #$20
	LDA.w $0008,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0009,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000A,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000B,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000C,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000D,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000E,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000F,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0010,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0011,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0012,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0013,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0014,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0015,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0016,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0017,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0018,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0019,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001A,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001B,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0025,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0027,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0028,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0029,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $002A,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002B,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002C,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002D,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002E,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002F,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $0030,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0031,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0032,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0033,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0034,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0035,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0036,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8A9D4:
	SEP.b #$20
	LDA.w $0009,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000A,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000B,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000C,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000D,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000E,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $000F,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0010,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0011,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0012,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0013,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0014,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0015,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0016,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0017,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0018,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0019,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001A,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0025,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0026,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0027,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0028,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0029,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002A,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002B,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002C,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002D,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002E,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002F,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0030,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0031,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0032,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0033,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0034,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0035,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0036,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8AC63:
	SEP.b #$20
	LDA.w $0009,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000A,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000B,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000C,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000D,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000E,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000F,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0010,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0011,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0012,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0013,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0014,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0015,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0016,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0017,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0018,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $0019,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0025,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0026,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0027,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0028,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0029,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002A,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002B,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002C,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002D,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002E,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002F,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $0030,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0031,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0032,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0033,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0034,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0035,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0036,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8AEF2:
	SEP.b #$20
	LDA.w $0009,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000A,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000B,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000C,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000D,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000E,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $000F,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0010,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0011,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0012,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0013,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0014,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0015,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0016,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0017,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0018,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0025,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0026,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0027,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0028,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0029,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $002A,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002B,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002C,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002D,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002E,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002F,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0030,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0031,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0032,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0033,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0034,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0035,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8B17E:
	SEP.b #$20
	LDA.w $0009,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000A,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000B,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000C,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000D,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000E,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000F,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0010,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0011,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0012,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0013,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0014,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0015,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0016,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0017,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0018,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0021,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0022,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0025,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0026,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0027,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0028,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0029,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002A,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002B,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002C,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002D,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002E,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002F,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $0030,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0031,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0032,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0033,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0034,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0035,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8B40A:
	SEP.b #$20
	LDA.w $000A,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000B,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000C,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000D,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000E,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $000F,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0010,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0011,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0012,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0013,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0014,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0015,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0016,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0017,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0018,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0023,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0024,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0025,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0026,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0027,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0028,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0029,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $002A,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002B,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002C,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002D,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002E,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002F,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0030,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0031,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0032,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0033,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0034,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0035,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8B693:
	SEP.b #$20
	LDA.w $000A,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000B,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000C,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000D,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000E,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000F,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0010,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0011,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0012,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0013,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0014,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0015,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0016,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0017,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0018,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0023,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0024,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0025,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0026,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0027,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0028,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0029,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002A,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002B,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002C,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002D,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002E,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002F,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $0030,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0031,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0032,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0033,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0034,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0035,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8B91C:
	SEP.b #$20
	LDA.w $000A,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000B,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000C,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000D,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000E,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $000F,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0010,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0011,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0012,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0013,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0014,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0015,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0016,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0017,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0018,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0023,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0024,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0025,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0026,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0027,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0028,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0029,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002A,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002B,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002C,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002D,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002E,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002F,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $0030,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0031,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0032,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0033,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0034,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8BBA2:
	SEP.b #$20
	LDA.w $000A,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000B,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000C,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000D,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000E,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000F,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0010,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0011,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0012,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0013,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0014,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0015,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0016,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0017,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0018,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0023,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0024,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0025,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0026,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0027,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0028,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0029,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $002A,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002B,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002C,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002D,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002E,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002F,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $0030,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0031,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0032,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0033,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0034,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8BE28:
	SEP.b #$20
	LDA.w $000B,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000C,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000D,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000E,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $000F,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0010,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0011,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0012,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0013,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0014,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0015,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0016,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0017,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0018,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0023,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0025,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0026,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0027,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0028,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0029,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002A,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002B,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002C,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002D,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002E,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002F,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0030,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0031,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0032,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0033,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0034,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8C0AB:
	SEP.b #$20
	LDA.w $000B,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000C,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000D,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000E,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000F,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0010,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0011,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0012,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0013,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0014,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0015,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0016,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0017,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0018,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0025,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0026,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0027,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0028,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0029,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002A,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002B,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002C,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002D,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002E,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002F,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0030,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0031,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0032,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0033,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8C32B:
	SEP.b #$20
	LDA.w $000B,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000C,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000D,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000E,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $000F,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0010,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0011,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0012,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0013,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0014,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0015,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0016,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0017,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0018,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $0019,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001A,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001B,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001C,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0025,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0026,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0027,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0028,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0029,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002A,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002B,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002C,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002D,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002E,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002F,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0030,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0031,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0032,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0033,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8C5AB:
	SEP.b #$20
	LDA.w $000B,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000C,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000D,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000E,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $000F,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0010,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0011,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0012,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0013,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0014,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0015,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0016,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0017,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0018,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0019,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001A,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001B,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0023,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0024,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0025,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0026,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0027,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0028,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0029,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $002A,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002B,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002C,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002D,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002E,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002F,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $0030,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0031,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0032,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0033,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8C82B:
	SEP.b #$20
	LDA.w $000B,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000C,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000D,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000E,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000F,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0010,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0011,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0012,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0013,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0014,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0015,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0016,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0017,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0018,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0019,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001A,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001B,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0023,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0025,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0026,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0027,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0028,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0029,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002A,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002B,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002C,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002D,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002E,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002F,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $0030,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0031,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0032,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0033,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8CAAB:
	SEP.b #$20
	LDA.w $000C,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000D,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000E,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000F,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0010,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0011,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0012,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0013,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0014,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0015,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0016,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0017,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0018,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0019,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001A,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001B,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0025,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0026,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0027,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0028,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0029,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002A,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002B,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002C,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002D,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002E,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002F,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0030,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0031,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0032,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0033,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8CD28:
	SEP.b #$20
	LDA.w $000C,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000D,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000E,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $000F,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0010,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0011,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0012,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0013,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0014,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0015,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0016,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0017,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0018,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $0019,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001A,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001B,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001D,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0025,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0026,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0027,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0028,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0029,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002A,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002B,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002C,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002D,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002E,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002F,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0030,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0031,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0032,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8CFA2:
	SEP.b #$20
	LDA.w $000C,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000D,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000E,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $000F,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0010,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0011,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0012,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0013,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0014,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0015,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0016,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0017,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0018,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0019,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001A,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001B,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0022,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0023,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0025,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0026,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0027,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0028,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0029,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $002A,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002B,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002C,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002D,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002E,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002F,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $0030,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0031,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0032,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0033,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8D21F:
	SEP.b #$20
	LDA.w $000C,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000D,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000E,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000F,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0010,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0011,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0012,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0013,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0014,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0015,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0016,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0017,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0018,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0019,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001A,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001B,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0025,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0026,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0027,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0028,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0029,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $002A,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002B,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002C,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002D,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002E,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002F,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $0030,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0031,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0032,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8D499:
	SEP.b #$20
	LDA.w $000C,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000D,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000E,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000F,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0010,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0011,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0012,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0013,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0014,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0015,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0016,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0017,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0018,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0019,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001A,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001B,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0025,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0026,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0027,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0028,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0029,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002A,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002B,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002C,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002D,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002E,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002F,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0030,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0031,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0032,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8D713:
	SEP.b #$20
	LDA.w $000C,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000D,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000E,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $000F,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0010,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0011,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0012,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0013,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0014,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0015,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0016,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0017,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0018,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $0019,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001A,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001B,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0025,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0026,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0027,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0028,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0029,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002A,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002B,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002C,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002D,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002E,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002F,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $0030,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0031,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0032,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8D98D:
	SEP.b #$20
	LDA.w $000D,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000E,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $000F,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0010,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0011,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0012,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0013,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0014,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0015,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0016,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0017,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0018,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0019,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001A,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001B,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0024,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0025,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0026,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0027,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0028,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0029,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $002A,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002B,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002C,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002D,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002E,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002F,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $0030,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0031,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0032,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8DC04:
	SEP.b #$20
	LDA.w $000D,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000E,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000F,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0010,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0011,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0012,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0013,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0014,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0015,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0016,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0017,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0018,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0019,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001A,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001B,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0025,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0026,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0027,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0028,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0029,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002A,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002B,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002C,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002D,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002E,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002F,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0030,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0031,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0032,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8DE7B:
	SEP.b #$20
	LDA.w $000D,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000E,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $000F,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0010,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0011,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0012,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0013,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0014,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0015,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0016,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0017,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0018,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0019,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001A,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001B,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001C,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0025,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0026,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0027,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0028,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0029,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002A,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002B,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002C,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002D,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002E,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $002F,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0030,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0031,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8E0EF:
	SEP.b #$20
	LDA.w $000D,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000E,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000F,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0010,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0011,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0012,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0013,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0014,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0015,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0016,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0017,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0018,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0019,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001A,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001B,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0025,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0026,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0027,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0028,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0029,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $002A,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002B,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002C,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002D,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002E,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002F,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $0030,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0031,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8E363:
	SEP.b #$20
	LDA.w $000D,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000E,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000F,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0010,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0011,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0012,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0013,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0014,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0015,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0016,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0017,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0018,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0019,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001A,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001B,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0025,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0026,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0027,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0028,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0029,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002A,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002B,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002C,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002D,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002E,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002F,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $0030,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0031,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8E5D7:
	SEP.b #$20
	LDA.w $000D,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000E,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $000F,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0010,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0011,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0012,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0013,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0014,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0015,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0016,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0017,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0018,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $0019,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001A,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001B,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	LDA.w $001E,y
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0026,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0027,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0028,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0029,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002A,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002B,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002C,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002D,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002E,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002F,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0030,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0031,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8E84B:
	SEP.b #$20
	LDA.w $000E,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $000F,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0010,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0011,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0012,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0013,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0014,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0015,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0016,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0017,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0018,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0019,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $001A,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001B,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001C,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0025,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0026,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0027,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0028,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0029,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002A,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002B,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002C,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002D,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002E,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002F,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0030,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0031,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8EABC:
	SEP.b #$20
	LDA.w $000E,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $000F,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0010,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0011,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0012,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0013,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0014,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0015,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0016,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0017,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0018,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0019,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001A,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001B,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0026,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0027,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0028,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0029,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002A,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002B,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002C,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002D,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002E,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002F,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $0030,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8ED2A:
	SEP.b #$20
	LDA.w $000E,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000F,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0010,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0011,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0012,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0013,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0014,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0015,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0016,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0017,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0018,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0019,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $001A,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001B,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001C,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0023,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0024,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0025,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0026,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0027,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0028,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0029,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $002A,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002B,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002C,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002D,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002E,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002F,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $0030,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0031,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8EF9B:
	SEP.b #$20
	LDA.w $000E,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000F,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0010,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0011,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0012,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0013,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0014,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0015,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0016,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0017,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0018,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0019,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $001A,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001B,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001C,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0026,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0027,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0028,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0029,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $002A,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002B,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002C,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002D,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002E,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $002F,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0030,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8F209:
	SEP.b #$20
	LDA.w $000E,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $000F,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0010,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0011,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0012,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0013,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0014,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0015,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0016,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0017,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0018,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $0019,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $001A,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001B,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	LDA.w $001C,y
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	LDA.w $001D,y
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0021,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0024,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0025,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0026,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0027,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0028,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0029,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002A,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002B,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002C,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002D,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002E,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $002F,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0030,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8F477:
	SEP.b #$20
	LDA.w $000E,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000F,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0010,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0011,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0012,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0013,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0014,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0015,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0016,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0017,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0018,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0019,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $001A,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001B,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001C,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0026,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0027,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0028,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0029,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002A,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002B,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002C,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002D,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $002E,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $002F,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $0030,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8F6E5:
	SEP.b #$20
	LDA.w $000E,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $000F,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0010,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0011,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0012,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0013,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0014,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0015,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0016,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0017,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0018,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $0019,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	LDA.w $001A,y
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	LDA.w $001B,y
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001C,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0021,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0024,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0025,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0026,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0027,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0028,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0029,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002A,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002B,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002C,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002D,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002E,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $002F,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0030,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8F953:
	SEP.b #$20
	LDA.w $000F,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0010,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0011,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0012,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0013,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0014,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0015,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0016,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0017,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0018,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0019,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $001A,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001B,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0026,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0027,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0028,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0029,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002A,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002B,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002C,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002D,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $002E,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $002F,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $0030,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A8FBBE:
	SEP.b #$20
	LDA.w $000F,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0010,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0011,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0012,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0013,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0014,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0015,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0016,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0017,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0018,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0019,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $001A,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001B,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001C,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0024,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0025,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0026,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0027,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0028,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0029,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002A,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002B,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002C,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002D,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002E,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $002F,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

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

DATA_A8FE26:
	incbin "InteriorMaps/BeachUtilityShed_SubLevel_MapLayout_JP_U1.rnc"

UNK_A8FED8:
	db $10,$14,$7C,$D2,$63,$BA,$15,$0B,$1F,$AB,$B4,$38,$73,$FB,$CD,$0E
	db $61,$90,$9D,$4C,$15,$16,$A9,$3A,$18,$71,$E6,$5E,$B3,$58,$DB,$14
	db $5E,$95,$45,$6E,$18,$2F,$7B,$35,$6E,$15,$DB,$58,$6A,$14,$2A,$82
	db $0D,$96,$E9,$78,$36,$30,$71,$C2,$F0,$6F,$C4,$DB,$F2,$12,$A1,$31
	db $D1,$31,$38,$FE,$97,$43,$CE,$BF,$31,$6B,$A1,$E3,$1E,$07

UNK_A8FF26:					; Note: Unused map data?
	incbin "InteriorMaps/DATA_A8FF26_JP_U1.rnc"

UNK_A8FFD8:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%FREE_BYTES($A8FFFF, 1, $FF)
else
	%InsertGarbageData($A8FFD8, incbin, DATA_A8FFD8_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

CODE_A98000:
	SEP.b #$20
	LDA.w $000F,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0010,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0011,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0012,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0013,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0014,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0015,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0016,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0017,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0018,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0019,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $001A,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0026,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0027,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0028,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0029,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $002A,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002B,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002C,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002D,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002E,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $002F,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $0030,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A9826B:
	SEP.b #$20
	LDA.w $000F,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0010,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0011,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0012,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0013,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0014,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0015,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0016,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	LDA.w $0017,y
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	LDA.w $0018,y
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	LDA.w $0019,y
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	LDA.w $001A,y
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	LDA.w $001B,y
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	LDA.w $001C,y
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	LDA.w $001D,y
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0024,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0025,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0026,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0027,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0028,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0029,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002A,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002B,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002C,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002D,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $002E,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $002F,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A984D3:
	SEP.b #$20
	LDA.w $000F,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0010,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0011,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0012,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0013,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0014,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0015,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0016,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0017,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0018,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0019,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $001A,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0026,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0027,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0028,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0029,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002A,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002B,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002C,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002D,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002E,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $002F,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A9873B:
	SEP.b #$20
	LDA.w $000F,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0010,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0011,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0012,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0013,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0014,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0015,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0016,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0017,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0018,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0019,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $001A,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0024,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0025,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0026,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0027,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0028,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0029,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002A,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002B,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002C,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002D,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $002E,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $002F,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A989A3:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0011,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0012,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0013,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0014,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0015,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0016,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0017,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0018,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0019,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $001A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001B,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001C,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001D,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001E,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001F,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	LDA.w $0020,y
	STA.l $7F2000,x
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	LDA.w $0021,y
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	LDA.w $0022,y
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0023,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0024,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0025,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0026,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0027,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0028,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0029,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $002A,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002B,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002C,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002D,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002E,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $002F,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A98C08:
	SEP.b #$20
	LDA.w $000F,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0010,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0011,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0012,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0013,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	LDA.w $0014,y
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	LDA.w $0015,y
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	LDA.w $0016,y
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	LDA.w $0017,y
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0018,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0019,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $001A,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0021,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0022,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0023,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0024,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0025,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0026,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0027,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0028,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0029,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002A,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002B,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002C,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $002D,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $002E,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $002F,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A98E70:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0011,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0012,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0013,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0014,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0015,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0016,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0017,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0018,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0019,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $001A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001B,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001C,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001D,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001E,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001F,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0024,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0025,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0026,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0027,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0028,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0029,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $002A,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002B,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002C,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002D,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $002E,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $002F,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A990D5:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	LDA.w $0011,y
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	LDA.w $0012,y
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	LDA.w $0013,y
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	LDA.w $0014,y
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0015,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0016,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0017,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	LDA.w $0018,y
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	LDA.w $0019,y
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $001A,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0021,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0022,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0023,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0024,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0025,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0026,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0027,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0028,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0029,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002A,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002B,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002C,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002D,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $002E,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A99337:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0011,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0012,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0013,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0014,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0015,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0016,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0017,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0018,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0019,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $001A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001B,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001C,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001D,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001E,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	LDA.w $001F,y
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	LDA.w $0024,y
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	LDA.w $0025,y
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0026,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0027,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0028,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0029,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $002A,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002B,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002C,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $002D,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $002E,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $002F,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A9959C:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	LDA.w $0011,y
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	LDA.w $0012,y
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0013,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0014,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	LDA.w $0015,y
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	LDA.w $0016,y
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0017,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0018,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0019,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	LDA.w $001A,y
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0021,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0022,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0023,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0024,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0025,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0026,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0027,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0028,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0029,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002A,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002B,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002C,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002D,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $002E,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A997FE:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0011,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0012,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0013,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0014,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0015,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0016,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0017,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0018,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0019,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $001A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001B,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001C,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001D,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001E,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	LDA.w $0022,y
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	LDA.w $0023,y
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0024,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0025,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	LDA.w $0026,y
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	LDA.w $0027,y
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0028,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0029,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	LDA.w $002A,y
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002B,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002C,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	LDA.w $002D,y
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $002E,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A99A60:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	LDA.w $0011,y
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0012,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	LDA.w $0013,y
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	LDA.w $0014,y
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0015,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0016,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	LDA.w $0017,y
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0018,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0019,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $001A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0021,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0022,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0023,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0024,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0025,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0026,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0027,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0028,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0029,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002A,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002B,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002C,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	LDA.w $002D,y
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $002E,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A99CC2:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0011,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0012,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0013,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0014,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0015,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0016,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0017,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0018,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0019,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $001A,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001B,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001C,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001D,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	LDA.w $001E,y
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	LDA.w $0021,y
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0022,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0023,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	LDA.w $0024,y
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	LDA.w $0025,y
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0026,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	LDA.w $0027,y
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	LDA.w $0028,y
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	LDA.w $0029,y
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	LDA.w $002A,y
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	LDA.w $002B,y
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	LDA.w $002C,y
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002D,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	LDA.w $002E,y
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A99F24:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0011,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	LDA.w $0012,y
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	LDA.w $0013,y
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0014,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	LDA.w $0015,y
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0016,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0017,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	LDA.w $0018,y
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0019,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $001A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	LDA.w $0020,y
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0021,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	LDA.w $0022,y
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	LDA.w $0023,y
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0024,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	LDA.w $0025,y
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	LDA.w $0026,y
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	LDA.w $0027,y
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	LDA.w $0028,y
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	LDA.w $0029,y
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	LDA.w $002A,y
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	LDA.w $002B,y
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	LDA.w $002C,y
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	LDA.w $002D,y
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	LDA.w $002E,y
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A9A186:
	SEP.b #$20
	LDA.w $0011,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0012,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0013,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	LDA.w $0014,y
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0015,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	LDA.w $0016,y
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	LDA.w $0017,y
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0018,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	LDA.w $0019,y
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	LDA.w $001A,y
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	LDA.w $001B,y
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	LDA.w $001C,y
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	LDA.w $001D,y
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	LDA.w $001E,y
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	LDA.w $001F,y
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	LDA.w $0020,y
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	LDA.w $0021,y
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	LDA.w $0022,y
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	LDA.w $0023,y
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	LDA.w $0024,y
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	LDA.w $0025,y
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	LDA.w $0026,y
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	LDA.w $0027,y
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	LDA.w $0028,y
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	LDA.w $0029,y
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	LDA.w $002A,y
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	LDA.w $002B,y
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	LDA.w $002C,y
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	LDA.w $002D,y
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	LDA.w $002E,y
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A9A3E5:
	SEP.b #$20
	LDA.w $0010,y
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	LDA.w $0011,y
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	LDA.w $0012,y
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	LDA.w $0013,y
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	LDA.w $0014,y
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	LDA.w $0015,y
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	LDA.w $0016,y
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	LDA.w $0017,y
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	LDA.w $0018,y
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	LDA.w $0019,y
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	LDA.w $001A,y
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	LDA.w $001B,y
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	LDA.w $001C,y
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	LDA.w $001D,y
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	LDA.w $001E,y
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	LDA.w $001F,y
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
	STA.l $7F2100,x
	LDA.w $0020,y
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	LDA.w $0021,y
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	LDA.w $0022,y
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	LDA.w $0023,y
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	LDA.w $0024,y
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	LDA.w $0025,y
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	LDA.w $0026,y
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	LDA.w $0027,y
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	LDA.w $0028,y
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	LDA.w $0029,y
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	LDA.w $002A,y
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	LDA.w $002B,y
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	LDA.w $002C,y
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	LDA.w $002D,y
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
	REP.b #$20
	RTL

CODE_A9A644:
	RTL

CODE_A9A645:
	RTL

CODE_A9A646:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A651
	STA.l $7F1F80,x
CODE_A9A651:
	LDA.w $0020,y
	BEQ.b CODE_A9A65A
	STA.l $7F2000,x
CODE_A9A65A:
	REP.b #$20
	RTL

CODE_A9A65D:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A668
	STA.l $7F1F00,x
CODE_A9A668:
	LDA.w $0010,y
	BEQ.b CODE_A9A671
	STA.l $7F1F80,x
CODE_A9A671:
	LDA.w $0020,y
	BEQ.b CODE_A9A67A
	STA.l $7F2000,x
CODE_A9A67A:
	LDA.w $0030,y
	BEQ.b CODE_A9A683
	STA.l $7F2080,x
CODE_A9A683:
	REP.b #$20
	RTL

CODE_A9A686:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A691
	STA.l $7F1E80,x
CODE_A9A691:
	LDA.w $000A,y
	BEQ.b CODE_A9A69A
	STA.l $7F1F00,x
CODE_A9A69A:
	LDA.w $0015,y
	BEQ.b CODE_A9A6A3
	STA.l $7F1F80,x
CODE_A9A6A3:
	LDA.w $001F,y
	BEQ.b CODE_A9A6AC
	STA.l $7F2000,x
CODE_A9A6AC:
	LDA.w $002A,y
	BEQ.b CODE_A9A6B5
	STA.l $7F2080,x
CODE_A9A6B5:
	LDA.w $0035,y
	BEQ.b CODE_A9A6BE
	STA.l $7F2100,x
CODE_A9A6BE:
	REP.b #$20
	RTL

CODE_A9A6C1:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A6CC
	STA.l $7F1E00,x
CODE_A9A6CC:
	LDA.w $0008,y
	BEQ.b CODE_A9A6D5
	STA.l $7F1E80,x
CODE_A9A6D5:
	LDA.w $0010,y
	BEQ.b CODE_A9A6DE
	STA.l $7F1F00,x
CODE_A9A6DE:
	LDA.w $0018,y
	BEQ.b CODE_A9A6E7
	STA.l $7F1F80,x
CODE_A9A6E7:
	LDA.w $0020,y
	BEQ.b CODE_A9A6F0
	STA.l $7F2000,x
CODE_A9A6F0:
	LDA.w $0028,y
	BEQ.b CODE_A9A6F9
	STA.l $7F2080,x
CODE_A9A6F9:
	LDA.w $0030,y
	BEQ.b CODE_A9A702
	STA.l $7F2100,x
CODE_A9A702:
	LDA.w $0038,y
	BEQ.b CODE_A9A70B
	STA.l $7F2180,x
CODE_A9A70B:
	REP.b #$20
	RTL

CODE_A9A70E:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A719
	STA.l $7F1D80,x
CODE_A9A719:
	LDA.w $0006,y
	BEQ.b CODE_A9A722
	STA.l $7F1E00,x
CODE_A9A722:
	LDA.w $000C,y
	BEQ.b CODE_A9A72B
	STA.l $7F1E80,x
CODE_A9A72B:
	LDA.w $0013,y
	BEQ.b CODE_A9A734
	STA.l $7F1F00,x
CODE_A9A734:
	LDA.w $0019,y
	BEQ.b CODE_A9A73D
	STA.l $7F1F80,x
CODE_A9A73D:
	LDA.w $001F,y
	BEQ.b CODE_A9A746
	STA.l $7F2000,x
CODE_A9A746:
	LDA.w $0026,y
	BEQ.b CODE_A9A74F
	STA.l $7F2080,x
CODE_A9A74F:
	LDA.w $002C,y
	BEQ.b CODE_A9A758
	STA.l $7F2100,x
CODE_A9A758:
	LDA.w $0033,y
	BEQ.b CODE_A9A761
	STA.l $7F2180,x
CODE_A9A761:
	LDA.w $0039,y
	BEQ.b CODE_A9A76A
	STA.l $7F2200,x
CODE_A9A76A:
	REP.b #$20
	RTL

CODE_A9A76D:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A778
	STA.l $7F1D00,x
CODE_A9A778:
	LDA.w $0005,y
	BEQ.b CODE_A9A781
	STA.l $7F1D80,x
CODE_A9A781:
	LDA.w $000A,y
	BEQ.b CODE_A9A78A
	STA.l $7F1E00,x
CODE_A9A78A:
	LDA.w $000F,y
	BEQ.b CODE_A9A793
	STA.l $7F1E80,x
CODE_A9A793:
	LDA.w $0015,y
	BEQ.b CODE_A9A79C
	STA.l $7F1F00,x
CODE_A9A79C:
	LDA.w $001A,y
	BEQ.b CODE_A9A7A5
	STA.l $7F1F80,x
CODE_A9A7A5:
	LDA.w $001F,y
	BEQ.b CODE_A9A7AE
	STA.l $7F2000,x
CODE_A9A7AE:
	LDA.w $0025,y
	BEQ.b CODE_A9A7B7
	STA.l $7F2080,x
CODE_A9A7B7:
	LDA.w $002A,y
	BEQ.b CODE_A9A7C0
	STA.l $7F2100,x
CODE_A9A7C0:
	LDA.w $002F,y
	BEQ.b CODE_A9A7C9
	STA.l $7F2180,x
CODE_A9A7C9:
	LDA.w $0035,y
	BEQ.b CODE_A9A7D2
	STA.l $7F2200,x
CODE_A9A7D2:
	LDA.w $003A,y
	BEQ.b CODE_A9A7DB
	STA.l $7F2280,x
CODE_A9A7DB:
	REP.b #$20
	RTL

CODE_A9A7DE:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A7E9
	STA.l $7F1C80,x
CODE_A9A7E9:
	LDA.w $0004,y
	BEQ.b CODE_A9A7F2
	STA.l $7F1D00,x
CODE_A9A7F2:
	LDA.w $0009,y
	BEQ.b CODE_A9A7FB
	STA.l $7F1D80,x
CODE_A9A7FB:
	LDA.w $000D,y
	BEQ.b CODE_A9A804
	STA.l $7F1E00,x
CODE_A9A804:
	LDA.w $0012,y
	BEQ.b CODE_A9A80D
	STA.l $7F1E80,x
CODE_A9A80D:
	LDA.w $0016,y
	BEQ.b CODE_A9A816
	STA.l $7F1F00,x
CODE_A9A816:
	LDA.w $001B,y
	BEQ.b CODE_A9A81F
	STA.l $7F1F80,x
CODE_A9A81F:
	LDA.w $001F,y
	BEQ.b CODE_A9A828
	STA.l $7F2000,x
CODE_A9A828:
	LDA.w $0024,y
	BEQ.b CODE_A9A831
	STA.l $7F2080,x
CODE_A9A831:
	LDA.w $0029,y
	BEQ.b CODE_A9A83A
	STA.l $7F2100,x
CODE_A9A83A:
	LDA.w $002D,y
	BEQ.b CODE_A9A843
	STA.l $7F2180,x
CODE_A9A843:
	LDA.w $0032,y
	BEQ.b CODE_A9A84C
	STA.l $7F2200,x
CODE_A9A84C:
	LDA.w $0036,y
	BEQ.b CODE_A9A855
	STA.l $7F2280,x
CODE_A9A855:
	LDA.w $003B,y
	BEQ.b CODE_A9A85E
	STA.l $7F2300,x
CODE_A9A85E:
	REP.b #$20
	RTL

CODE_A9A861:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A86C
	STA.l $7F1C00,x
CODE_A9A86C:
	LDA.w $0004,y
	BEQ.b CODE_A9A875
	STA.l $7F1C80,x
CODE_A9A875:
	LDA.w $0008,y
	BEQ.b CODE_A9A87E
	STA.l $7F1D00,x
CODE_A9A87E:
	LDA.w $000C,y
	BEQ.b CODE_A9A887
	STA.l $7F1D80,x
CODE_A9A887:
	LDA.w $0010,y
	BEQ.b CODE_A9A890
	STA.l $7F1E00,x
CODE_A9A890:
	LDA.w $0014,y
	BEQ.b CODE_A9A899
	STA.l $7F1E80,x
CODE_A9A899:
	LDA.w $0018,y
	BEQ.b CODE_A9A8A2
	STA.l $7F1F00,x
CODE_A9A8A2:
	LDA.w $001C,y
	BEQ.b CODE_A9A8AB
	STA.l $7F1F80,x
CODE_A9A8AB:
	LDA.w $0020,y
	BEQ.b CODE_A9A8B4
	STA.l $7F2000,x
CODE_A9A8B4:
	LDA.w $0024,y
	BEQ.b CODE_A9A8BD
	STA.l $7F2080,x
CODE_A9A8BD:
	LDA.w $0028,y
	BEQ.b CODE_A9A8C6
	STA.l $7F2100,x
CODE_A9A8C6:
	LDA.w $002C,y
	BEQ.b CODE_A9A8CF
	STA.l $7F2180,x
CODE_A9A8CF:
	LDA.w $0030,y
	BEQ.b CODE_A9A8D8
	STA.l $7F2200,x
CODE_A9A8D8:
	LDA.w $0034,y
	BEQ.b CODE_A9A8E1
	STA.l $7F2280,x
CODE_A9A8E1:
	LDA.w $0038,y
	BEQ.b CODE_A9A8EA
	STA.l $7F2300,x
CODE_A9A8EA:
	LDA.w $003C,y
	BEQ.b CODE_A9A8F3
	STA.l $7F2380,x
CODE_A9A8F3:
	REP.b #$20
	RTL

CODE_A9A8F6:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A901
	STA.l $7F1B80,x
CODE_A9A901:
	LDA.w $0003,y
	BEQ.b CODE_A9A90A
	STA.l $7F1C00,x
CODE_A9A90A:
	LDA.w $0007,y
	BEQ.b CODE_A9A913
	STA.l $7F1C80,x
CODE_A9A913:
	LDA.w $000A,y
	BEQ.b CODE_A9A91C
	STA.l $7F1D00,x
CODE_A9A91C:
	LDA.w $000E,y
	BEQ.b CODE_A9A925
	STA.l $7F1D80,x
CODE_A9A925:
	LDA.w $0011,y
	BEQ.b CODE_A9A92E
	STA.l $7F1E00,x
CODE_A9A92E:
	LDA.w $0015,y
	BEQ.b CODE_A9A937
	STA.l $7F1E80,x
CODE_A9A937:
	LDA.w $0018,y
	BEQ.b CODE_A9A940
	STA.l $7F1F00,x
CODE_A9A940:
	LDA.w $001C,y
	BEQ.b CODE_A9A949
	STA.l $7F1F80,x
CODE_A9A949:
	LDA.w $001F,y
	BEQ.b CODE_A9A952
	STA.l $7F2000,x
CODE_A9A952:
	LDA.w $0023,y
	BEQ.b CODE_A9A95B
	STA.l $7F2080,x
CODE_A9A95B:
	LDA.w $0027,y
	BEQ.b CODE_A9A964
	STA.l $7F2100,x
CODE_A9A964:
	LDA.w $002A,y
	BEQ.b CODE_A9A96D
	STA.l $7F2180,x
CODE_A9A96D:
	LDA.w $002E,y
	BEQ.b CODE_A9A976
	STA.l $7F2200,x
CODE_A9A976:
	LDA.w $0031,y
	BEQ.b CODE_A9A97F
	STA.l $7F2280,x
CODE_A9A97F:
	LDA.w $0035,y
	BEQ.b CODE_A9A988
	STA.l $7F2300,x
CODE_A9A988:
	LDA.w $0038,y
	BEQ.b CODE_A9A991
	STA.l $7F2380,x
CODE_A9A991:
	LDA.w $003C,y
	BEQ.b CODE_A9A99A
	STA.l $7F2400,x
CODE_A9A99A:
	REP.b #$20
	RTL

CODE_A9A99D:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9A9A8
	STA.l $7F1B00,x
CODE_A9A9A8:
	LDA.w $0003,y
	BEQ.b CODE_A9A9B1
	STA.l $7F1B80,x
CODE_A9A9B1:
	LDA.w $0006,y
	BEQ.b CODE_A9A9BA
	STA.l $7F1C00,x
CODE_A9A9BA:
	LDA.w $0009,y
	BEQ.b CODE_A9A9C3
	STA.l $7F1C80,x
CODE_A9A9C3:
	LDA.w $000C,y
	BEQ.b CODE_A9A9CC
	STA.l $7F1D00,x
CODE_A9A9CC:
	LDA.w $000F,y
	BEQ.b CODE_A9A9D5
	STA.l $7F1D80,x
CODE_A9A9D5:
	LDA.w $0013,y
	BEQ.b CODE_A9A9DE
	STA.l $7F1E00,x
CODE_A9A9DE:
	LDA.w $0016,y
	BEQ.b CODE_A9A9E7
	STA.l $7F1E80,x
CODE_A9A9E7:
	LDA.w $0019,y
	BEQ.b CODE_A9A9F0
	STA.l $7F1F00,x
CODE_A9A9F0:
	LDA.w $001C,y
	BEQ.b CODE_A9A9F9
	STA.l $7F1F80,x
CODE_A9A9F9:
	LDA.w $001F,y
	BEQ.b CODE_A9AA02
	STA.l $7F2000,x
CODE_A9AA02:
	LDA.w $0023,y
	BEQ.b CODE_A9AA0B
	STA.l $7F2080,x
CODE_A9AA0B:
	LDA.w $0026,y
	BEQ.b CODE_A9AA14
	STA.l $7F2100,x
CODE_A9AA14:
	LDA.w $0029,y
	BEQ.b CODE_A9AA1D
	STA.l $7F2180,x
CODE_A9AA1D:
	LDA.w $002C,y
	BEQ.b CODE_A9AA26
	STA.l $7F2200,x
CODE_A9AA26:
	LDA.w $002F,y
	BEQ.b CODE_A9AA2F
	STA.l $7F2280,x
CODE_A9AA2F:
	LDA.w $0033,y
	BEQ.b CODE_A9AA38
	STA.l $7F2300,x
CODE_A9AA38:
	LDA.w $0036,y
	BEQ.b CODE_A9AA41
	STA.l $7F2380,x
CODE_A9AA41:
	LDA.w $0039,y
	BEQ.b CODE_A9AA4A
	STA.l $7F2400,x
CODE_A9AA4A:
	LDA.w $003C,y
	BEQ.b CODE_A9AA53
	STA.l $7F2480,x
CODE_A9AA53:
	REP.b #$20
	RTL

CODE_A9AA56:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9AA61
	STA.l $7F1A80,x
CODE_A9AA61:
	LDA.w $0002,y
	BEQ.b CODE_A9AA6A
	STA.l $7F1B00,x
CODE_A9AA6A:
	LDA.w $0005,y
	BEQ.b CODE_A9AA73
	STA.l $7F1B80,x
CODE_A9AA73:
	LDA.w $0008,y
	BEQ.b CODE_A9AA7C
	STA.l $7F1C00,x
CODE_A9AA7C:
	LDA.w $000B,y
	BEQ.b CODE_A9AA85
	STA.l $7F1C80,x
CODE_A9AA85:
	LDA.w $000E,y
	BEQ.b CODE_A9AA8E
	STA.l $7F1D00,x
CODE_A9AA8E:
	LDA.w $0011,y
	BEQ.b CODE_A9AA97
	STA.l $7F1D80,x
CODE_A9AA97:
	LDA.w $0014,y
	BEQ.b CODE_A9AAA0
	STA.l $7F1E00,x
CODE_A9AAA0:
	LDA.w $0017,y
	BEQ.b CODE_A9AAA9
	STA.l $7F1E80,x
CODE_A9AAA9:
	LDA.w $001A,y
	BEQ.b CODE_A9AAB2
	STA.l $7F1F00,x
CODE_A9AAB2:
	LDA.w $001D,y
	BEQ.b CODE_A9AABB
	STA.l $7F1F80,x
CODE_A9AABB:
	LDA.w $001F,y
	BEQ.b CODE_A9AAC4
	STA.l $7F2000,x
CODE_A9AAC4:
	LDA.w $0022,y
	BEQ.b CODE_A9AACD
	STA.l $7F2080,x
CODE_A9AACD:
	LDA.w $0025,y
	BEQ.b CODE_A9AAD6
	STA.l $7F2100,x
CODE_A9AAD6:
	LDA.w $0028,y
	BEQ.b CODE_A9AADF
	STA.l $7F2180,x
CODE_A9AADF:
	LDA.w $002B,y
	BEQ.b CODE_A9AAE8
	STA.l $7F2200,x
CODE_A9AAE8:
	LDA.w $002E,y
	BEQ.b CODE_A9AAF1
	STA.l $7F2280,x
CODE_A9AAF1:
	LDA.w $0031,y
	BEQ.b CODE_A9AAFA
	STA.l $7F2300,x
CODE_A9AAFA:
	LDA.w $0034,y
	BEQ.b CODE_A9AB03
	STA.l $7F2380,x
CODE_A9AB03:
	LDA.w $0037,y
	BEQ.b CODE_A9AB0C
	STA.l $7F2400,x
CODE_A9AB0C:
	LDA.w $003A,y
	BEQ.b CODE_A9AB15
	STA.l $7F2480,x
CODE_A9AB15:
	LDA.w $003D,y
	BEQ.b CODE_A9AB1E
	STA.l $7F2500,x
CODE_A9AB1E:
	REP.b #$20
	RTL

CODE_A9AB21:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9AB2C
	STA.l $7F1A00,x
CODE_A9AB2C:
	LDA.w $0002,y
	BEQ.b CODE_A9AB35
	STA.l $7F1A80,x
CODE_A9AB35:
	LDA.w $0005,y
	BEQ.b CODE_A9AB3E
	STA.l $7F1B00,x
CODE_A9AB3E:
	LDA.w $0007,y
	BEQ.b CODE_A9AB47
	STA.l $7F1B80,x
CODE_A9AB47:
	LDA.w $000A,y
	BEQ.b CODE_A9AB50
	STA.l $7F1C00,x
CODE_A9AB50:
	LDA.w $000D,y
	BEQ.b CODE_A9AB59
	STA.l $7F1C80,x
CODE_A9AB59:
	LDA.w $000F,y
	BEQ.b CODE_A9AB62
	STA.l $7F1D00,x
CODE_A9AB62:
	LDA.w $0012,y
	BEQ.b CODE_A9AB6B
	STA.l $7F1D80,x
CODE_A9AB6B:
	LDA.w $0015,y
	BEQ.b CODE_A9AB74
	STA.l $7F1E00,x
CODE_A9AB74:
	LDA.w $0017,y
	BEQ.b CODE_A9AB7D
	STA.l $7F1E80,x
CODE_A9AB7D:
	LDA.w $001A,y
	BEQ.b CODE_A9AB86
	STA.l $7F1F00,x
CODE_A9AB86:
	LDA.w $001D,y
	BEQ.b CODE_A9AB8F
	STA.l $7F1F80,x
CODE_A9AB8F:
	LDA.w $001F,y
	BEQ.b CODE_A9AB98
	STA.l $7F2000,x
CODE_A9AB98:
	LDA.w $0022,y
	BEQ.b CODE_A9ABA1
	STA.l $7F2080,x
CODE_A9ABA1:
	LDA.w $0025,y
	BEQ.b CODE_A9ABAA
	STA.l $7F2100,x
CODE_A9ABAA:
	LDA.w $0027,y
	BEQ.b CODE_A9ABB3
	STA.l $7F2180,x
CODE_A9ABB3:
	LDA.w $002A,y
	BEQ.b CODE_A9ABBC
	STA.l $7F2200,x
CODE_A9ABBC:
	LDA.w $002D,y
	BEQ.b CODE_A9ABC5
	STA.l $7F2280,x
CODE_A9ABC5:
	LDA.w $002F,y
	BEQ.b CODE_A9ABCE
	STA.l $7F2300,x
CODE_A9ABCE:
	LDA.w $0032,y
	BEQ.b CODE_A9ABD7
	STA.l $7F2380,x
CODE_A9ABD7:
	LDA.w $0035,y
	BEQ.b CODE_A9ABE0
	STA.l $7F2400,x
CODE_A9ABE0:
	LDA.w $0037,y
	BEQ.b CODE_A9ABE9
	STA.l $7F2480,x
CODE_A9ABE9:
	LDA.w $003A,y
	BEQ.b CODE_A9ABF2
	STA.l $7F2500,x
CODE_A9ABF2:
	LDA.w $003D,y
	BEQ.b CODE_A9ABFB
	STA.l $7F2580,x
CODE_A9ABFB:
	REP.b #$20
	RTL

CODE_A9ABFE:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9AC09
	STA.l $7F1980,x
CODE_A9AC09:
	LDA.w $0002,y
	BEQ.b CODE_A9AC12
	STA.l $7F1A00,x
CODE_A9AC12:
	LDA.w $0004,y
	BEQ.b CODE_A9AC1B
	STA.l $7F1A80,x
CODE_A9AC1B:
	LDA.w $0007,y
	BEQ.b CODE_A9AC24
	STA.l $7F1B00,x
CODE_A9AC24:
	LDA.w $0009,y
	BEQ.b CODE_A9AC2D
	STA.l $7F1B80,x
CODE_A9AC2D:
	LDA.w $000C,y
	BEQ.b CODE_A9AC36
	STA.l $7F1C00,x
CODE_A9AC36:
	LDA.w $000E,y
	BEQ.b CODE_A9AC3F
	STA.l $7F1C80,x
CODE_A9AC3F:
	LDA.w $0011,y
	BEQ.b CODE_A9AC48
	STA.l $7F1D00,x
CODE_A9AC48:
	LDA.w $0013,y
	BEQ.b CODE_A9AC51
	STA.l $7F1D80,x
CODE_A9AC51:
	LDA.w $0016,y
	BEQ.b CODE_A9AC5A
	STA.l $7F1E00,x
CODE_A9AC5A:
	LDA.w $0018,y
	BEQ.b CODE_A9AC63
	STA.l $7F1E80,x
CODE_A9AC63:
	LDA.w $001B,y
	BEQ.b CODE_A9AC6C
	STA.l $7F1F00,x
CODE_A9AC6C:
	LDA.w $001D,y
	BEQ.b CODE_A9AC75
	STA.l $7F1F80,x
CODE_A9AC75:
	LDA.w $001F,y
	BEQ.b CODE_A9AC7E
	STA.l $7F2000,x
CODE_A9AC7E:
	LDA.w $0022,y
	BEQ.b CODE_A9AC87
	STA.l $7F2080,x
CODE_A9AC87:
	LDA.w $0024,y
	BEQ.b CODE_A9AC90
	STA.l $7F2100,x
CODE_A9AC90:
	LDA.w $0027,y
	BEQ.b CODE_A9AC99
	STA.l $7F2180,x
CODE_A9AC99:
	LDA.w $0029,y
	BEQ.b CODE_A9ACA2
	STA.l $7F2200,x
CODE_A9ACA2:
	LDA.w $002C,y
	BEQ.b CODE_A9ACAB
	STA.l $7F2280,x
CODE_A9ACAB:
	LDA.w $002E,y
	BEQ.b CODE_A9ACB4
	STA.l $7F2300,x
CODE_A9ACB4:
	LDA.w $0031,y
	BEQ.b CODE_A9ACBD
	STA.l $7F2380,x
CODE_A9ACBD:
	LDA.w $0033,y
	BEQ.b CODE_A9ACC6
	STA.l $7F2400,x
CODE_A9ACC6:
	LDA.w $0036,y
	BEQ.b CODE_A9ACCF
	STA.l $7F2480,x
CODE_A9ACCF:
	LDA.w $0038,y
	BEQ.b CODE_A9ACD8
	STA.l $7F2500,x
CODE_A9ACD8:
	LDA.w $003B,y
	BEQ.b CODE_A9ACE1
	STA.l $7F2580,x
CODE_A9ACE1:
	LDA.w $003D,y
	BEQ.b CODE_A9ACEA
	STA.l $7F2600,x
CODE_A9ACEA:
	REP.b #$20
	RTL

CODE_A9ACED:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9ACF8
	STA.l $7F1900,x
CODE_A9ACF8:
	LDA.w $0002,y
	BEQ.b CODE_A9AD01
	STA.l $7F1980,x
CODE_A9AD01:
	LDA.w $0004,y
	BEQ.b CODE_A9AD0A
	STA.l $7F1A00,x
CODE_A9AD0A:
	LDA.w $0006,y
	BEQ.b CODE_A9AD13
	STA.l $7F1A80,x
CODE_A9AD13:
	LDA.w $0009,y
	BEQ.b CODE_A9AD1C
	STA.l $7F1B00,x
CODE_A9AD1C:
	LDA.w $000B,y
	BEQ.b CODE_A9AD25
	STA.l $7F1B80,x
CODE_A9AD25:
	LDA.w $000D,y
	BEQ.b CODE_A9AD2E
	STA.l $7F1C00,x
CODE_A9AD2E:
	LDA.w $000F,y
	BEQ.b CODE_A9AD37
	STA.l $7F1C80,x
CODE_A9AD37:
	LDA.w $0012,y
	BEQ.b CODE_A9AD40
	STA.l $7F1D00,x
CODE_A9AD40:
	LDA.w $0014,y
	BEQ.b CODE_A9AD49
	STA.l $7F1D80,x
CODE_A9AD49:
	LDA.w $0016,y
	BEQ.b CODE_A9AD52
	STA.l $7F1E00,x
CODE_A9AD52:
	LDA.w $0019,y
	BEQ.b CODE_A9AD5B
	STA.l $7F1E80,x
CODE_A9AD5B:
	LDA.w $001B,y
	BEQ.b CODE_A9AD64
	STA.l $7F1F00,x
CODE_A9AD64:
	LDA.w $001D,y
	BEQ.b CODE_A9AD6D
	STA.l $7F1F80,x
CODE_A9AD6D:
	LDA.w $001F,y
	BEQ.b CODE_A9AD76
	STA.l $7F2000,x
CODE_A9AD76:
	LDA.w $0022,y
	BEQ.b CODE_A9AD7F
	STA.l $7F2080,x
CODE_A9AD7F:
	LDA.w $0024,y
	BEQ.b CODE_A9AD88
	STA.l $7F2100,x
CODE_A9AD88:
	LDA.w $0026,y
	BEQ.b CODE_A9AD91
	STA.l $7F2180,x
CODE_A9AD91:
	LDA.w $0029,y
	BEQ.b CODE_A9AD9A
	STA.l $7F2200,x
CODE_A9AD9A:
	LDA.w $002B,y
	BEQ.b CODE_A9ADA3
	STA.l $7F2280,x
CODE_A9ADA3:
	LDA.w $002D,y
	BEQ.b CODE_A9ADAC
	STA.l $7F2300,x
CODE_A9ADAC:
	LDA.w $002F,y
	BEQ.b CODE_A9ADB5
	STA.l $7F2380,x
CODE_A9ADB5:
	LDA.w $0032,y
	BEQ.b CODE_A9ADBE
	STA.l $7F2400,x
CODE_A9ADBE:
	LDA.w $0034,y
	BEQ.b CODE_A9ADC7
	STA.l $7F2480,x
CODE_A9ADC7:
	LDA.w $0036,y
	BEQ.b CODE_A9ADD0
	STA.l $7F2500,x
CODE_A9ADD0:
	LDA.w $0039,y
	BEQ.b CODE_A9ADD9
	STA.l $7F2580,x
CODE_A9ADD9:
	LDA.w $003B,y
	BEQ.b CODE_A9ADE2
	STA.l $7F2600,x
CODE_A9ADE2:
	LDA.w $003D,y
	BEQ.b CODE_A9ADEB
	STA.l $7F2680,x
CODE_A9ADEB:
	REP.b #$20
	RTL

CODE_A9ADEE:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9ADF9
	STA.l $7F1880,x
CODE_A9ADF9:
	LDA.w $0002,y
	BEQ.b CODE_A9AE02
	STA.l $7F1900,x
CODE_A9AE02:
	LDA.w $0004,y
	BEQ.b CODE_A9AE0B
	STA.l $7F1980,x
CODE_A9AE0B:
	LDA.w $0006,y
	BEQ.b CODE_A9AE14
	STA.l $7F1A00,x
CODE_A9AE14:
	LDA.w $0008,y
	BEQ.b CODE_A9AE1D
	STA.l $7F1A80,x
CODE_A9AE1D:
	LDA.w $000A,y
	BEQ.b CODE_A9AE26
	STA.l $7F1B00,x
CODE_A9AE26:
	LDA.w $000C,y
	BEQ.b CODE_A9AE2F
	STA.l $7F1B80,x
CODE_A9AE2F:
	LDA.w $000E,y
	BEQ.b CODE_A9AE38
	STA.l $7F1C00,x
CODE_A9AE38:
	LDA.w $0011,y
	BEQ.b CODE_A9AE41
	STA.l $7F1C80,x
CODE_A9AE41:
	LDA.w $0013,y
	BEQ.b CODE_A9AE4A
	STA.l $7F1D00,x
CODE_A9AE4A:
	LDA.w $0015,y
	BEQ.b CODE_A9AE53
	STA.l $7F1D80,x
CODE_A9AE53:
	LDA.w $0017,y
	BEQ.b CODE_A9AE5C
	STA.l $7F1E00,x
CODE_A9AE5C:
	LDA.w $0019,y
	BEQ.b CODE_A9AE65
	STA.l $7F1E80,x
CODE_A9AE65:
	LDA.w $001B,y
	BEQ.b CODE_A9AE6E
	STA.l $7F1F00,x
CODE_A9AE6E:
	LDA.w $001D,y
	BEQ.b CODE_A9AE77
	STA.l $7F1F80,x
CODE_A9AE77:
	LDA.w $001F,y
	BEQ.b CODE_A9AE80
	STA.l $7F2000,x
CODE_A9AE80:
	LDA.w $0022,y
	BEQ.b CODE_A9AE89
	STA.l $7F2080,x
CODE_A9AE89:
	LDA.w $0024,y
	BEQ.b CODE_A9AE92
	STA.l $7F2100,x
CODE_A9AE92:
	LDA.w $0026,y
	BEQ.b CODE_A9AE9B
	STA.l $7F2180,x
CODE_A9AE9B:
	LDA.w $0028,y
	BEQ.b CODE_A9AEA4
	STA.l $7F2200,x
CODE_A9AEA4:
	LDA.w $002A,y
	BEQ.b CODE_A9AEAD
	STA.l $7F2280,x
CODE_A9AEAD:
	LDA.w $002C,y
	BEQ.b CODE_A9AEB6
	STA.l $7F2300,x
CODE_A9AEB6:
	LDA.w $002E,y
	BEQ.b CODE_A9AEBF
	STA.l $7F2380,x
CODE_A9AEBF:
	LDA.w $0031,y
	BEQ.b CODE_A9AEC8
	STA.l $7F2400,x
CODE_A9AEC8:
	LDA.w $0033,y
	BEQ.b CODE_A9AED1
	STA.l $7F2480,x
CODE_A9AED1:
	LDA.w $0035,y
	BEQ.b CODE_A9AEDA
	STA.l $7F2500,x
CODE_A9AEDA:
	LDA.w $0037,y
	BEQ.b CODE_A9AEE3
	STA.l $7F2580,x
CODE_A9AEE3:
	LDA.w $0039,y
	BEQ.b CODE_A9AEEC
	STA.l $7F2600,x
CODE_A9AEEC:
	LDA.w $003B,y
	BEQ.b CODE_A9AEF5
	STA.l $7F2680,x
CODE_A9AEF5:
	LDA.w $003D,y
	BEQ.b CODE_A9AEFE
	STA.l $7F2700,x
CODE_A9AEFE:
	REP.b #$20
	RTL

CODE_A9AF01:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9AF0C
	STA.l $7F1800,x
CODE_A9AF0C:
	LDA.w $0002,y
	BEQ.b CODE_A9AF15
	STA.l $7F1880,x
CODE_A9AF15:
	LDA.w $0004,y
	BEQ.b CODE_A9AF1E
	STA.l $7F1900,x
CODE_A9AF1E:
	LDA.w $0006,y
	BEQ.b CODE_A9AF27
	STA.l $7F1980,x
CODE_A9AF27:
	LDA.w $0008,y
	BEQ.b CODE_A9AF30
	STA.l $7F1A00,x
CODE_A9AF30:
	LDA.w $000A,y
	BEQ.b CODE_A9AF39
	STA.l $7F1A80,x
CODE_A9AF39:
	LDA.w $000C,y
	BEQ.b CODE_A9AF42
	STA.l $7F1B00,x
CODE_A9AF42:
	LDA.w $000E,y
	BEQ.b CODE_A9AF4B
	STA.l $7F1B80,x
CODE_A9AF4B:
	LDA.w $0010,y
	BEQ.b CODE_A9AF54
	STA.l $7F1C00,x
CODE_A9AF54:
	LDA.w $0012,y
	BEQ.b CODE_A9AF5D
	STA.l $7F1C80,x
CODE_A9AF5D:
	LDA.w $0014,y
	BEQ.b CODE_A9AF66
	STA.l $7F1D00,x
CODE_A9AF66:
	LDA.w $0016,y
	BEQ.b CODE_A9AF6F
	STA.l $7F1D80,x
CODE_A9AF6F:
	LDA.w $0018,y
	BEQ.b CODE_A9AF78
	STA.l $7F1E00,x
CODE_A9AF78:
	LDA.w $001A,y
	BEQ.b CODE_A9AF81
	STA.l $7F1E80,x
CODE_A9AF81:
	LDA.w $001C,y
	BEQ.b CODE_A9AF8A
	STA.l $7F1F00,x
CODE_A9AF8A:
	LDA.w $001E,y
	BEQ.b CODE_A9AF93
	STA.l $7F1F80,x
CODE_A9AF93:
	LDA.w $0020,y
	BEQ.b CODE_A9AF9C
	STA.l $7F2000,x
CODE_A9AF9C:
	LDA.w $0022,y
	BEQ.b CODE_A9AFA5
	STA.l $7F2080,x
CODE_A9AFA5:
	LDA.w $0024,y
	BEQ.b CODE_A9AFAE
	STA.l $7F2100,x
CODE_A9AFAE:
	LDA.w $0026,y
	BEQ.b CODE_A9AFB7
	STA.l $7F2180,x
CODE_A9AFB7:
	LDA.w $0028,y
	BEQ.b CODE_A9AFC0
	STA.l $7F2200,x
CODE_A9AFC0:
	LDA.w $002A,y
	BEQ.b CODE_A9AFC9
	STA.l $7F2280,x
CODE_A9AFC9:
	LDA.w $002C,y
	BEQ.b CODE_A9AFD2
	STA.l $7F2300,x
CODE_A9AFD2:
	LDA.w $002E,y
	BEQ.b CODE_A9AFDB
	STA.l $7F2380,x
CODE_A9AFDB:
	LDA.w $0030,y
	BEQ.b CODE_A9AFE4
	STA.l $7F2400,x
CODE_A9AFE4:
	LDA.w $0032,y
	BEQ.b CODE_A9AFED
	STA.l $7F2480,x
CODE_A9AFED:
	LDA.w $0034,y
	BEQ.b CODE_A9AFF6
	STA.l $7F2500,x
CODE_A9AFF6:
	LDA.w $0036,y
	BEQ.b CODE_A9AFFF
	STA.l $7F2580,x
CODE_A9AFFF:
	LDA.w $0038,y
	BEQ.b CODE_A9B008
	STA.l $7F2600,x
CODE_A9B008:
	LDA.w $003A,y
	BEQ.b CODE_A9B011
	STA.l $7F2680,x
CODE_A9B011:
	LDA.w $003C,y
	BEQ.b CODE_A9B01A
	STA.l $7F2700,x
CODE_A9B01A:
	LDA.w $003E,y
	BEQ.b CODE_A9B023
	STA.l $7F2780,x
CODE_A9B023:
	REP.b #$20
	RTL

CODE_A9B026:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9B031
	STA.l $7F1780,x
CODE_A9B031:
	LDA.w $0001,y
	BEQ.b CODE_A9B03A
	STA.l $7F1800,x
CODE_A9B03A:
	LDA.w $0003,y
	BEQ.b CODE_A9B043
	STA.l $7F1880,x
CODE_A9B043:
	LDA.w $0005,y
	BEQ.b CODE_A9B04C
	STA.l $7F1900,x
CODE_A9B04C:
	LDA.w $0007,y
	BEQ.b CODE_A9B055
	STA.l $7F1980,x
CODE_A9B055:
	LDA.w $0009,y
	BEQ.b CODE_A9B05E
	STA.l $7F1A00,x
CODE_A9B05E:
	LDA.w $000B,y
	BEQ.b CODE_A9B067
	STA.l $7F1A80,x
CODE_A9B067:
	LDA.w $000D,y
	BEQ.b CODE_A9B070
	STA.l $7F1B00,x
CODE_A9B070:
	LDA.w $000F,y
	BEQ.b CODE_A9B079
	STA.l $7F1B80,x
CODE_A9B079:
	LDA.w $0010,y
	BEQ.b CODE_A9B082
	STA.l $7F1C00,x
CODE_A9B082:
	LDA.w $0012,y
	BEQ.b CODE_A9B08B
	STA.l $7F1C80,x
CODE_A9B08B:
	LDA.w $0014,y
	BEQ.b CODE_A9B094
	STA.l $7F1D00,x
CODE_A9B094:
	LDA.w $0016,y
	BEQ.b CODE_A9B09D
	STA.l $7F1D80,x
CODE_A9B09D:
	LDA.w $0018,y
	BEQ.b CODE_A9B0A6
	STA.l $7F1E00,x
CODE_A9B0A6:
	LDA.w $001A,y
	BEQ.b CODE_A9B0AF
	STA.l $7F1E80,x
CODE_A9B0AF:
	LDA.w $001C,y
	BEQ.b CODE_A9B0B8
	STA.l $7F1F00,x
CODE_A9B0B8:
	LDA.w $001E,y
	BEQ.b CODE_A9B0C1
	STA.l $7F1F80,x
CODE_A9B0C1:
	LDA.w $001F,y
	BEQ.b CODE_A9B0CA
	STA.l $7F2000,x
CODE_A9B0CA:
	LDA.w $0021,y
	BEQ.b CODE_A9B0D3
	STA.l $7F2080,x
CODE_A9B0D3:
	LDA.w $0023,y
	BEQ.b CODE_A9B0DC
	STA.l $7F2100,x
CODE_A9B0DC:
	LDA.w $0025,y
	BEQ.b CODE_A9B0E5
	STA.l $7F2180,x
CODE_A9B0E5:
	LDA.w $0027,y
	BEQ.b CODE_A9B0EE
	STA.l $7F2200,x
CODE_A9B0EE:
	LDA.w $0029,y
	BEQ.b CODE_A9B0F7
	STA.l $7F2280,x
CODE_A9B0F7:
	LDA.w $002B,y
	BEQ.b CODE_A9B100
	STA.l $7F2300,x
CODE_A9B100:
	LDA.w $002D,y
	BEQ.b CODE_A9B109
	STA.l $7F2380,x
CODE_A9B109:
	LDA.w $002E,y
	BEQ.b CODE_A9B112
	STA.l $7F2400,x
CODE_A9B112:
	LDA.w $0030,y
	BEQ.b CODE_A9B11B
	STA.l $7F2480,x
CODE_A9B11B:
	LDA.w $0032,y
	BEQ.b CODE_A9B124
	STA.l $7F2500,x
CODE_A9B124:
	LDA.w $0034,y
	BEQ.b CODE_A9B12D
	STA.l $7F2580,x
CODE_A9B12D:
	LDA.w $0036,y
	BEQ.b CODE_A9B136
	STA.l $7F2600,x
CODE_A9B136:
	LDA.w $0038,y
	BEQ.b CODE_A9B13F
	STA.l $7F2680,x
CODE_A9B13F:
	LDA.w $003A,y
	BEQ.b CODE_A9B148
	STA.l $7F2700,x
CODE_A9B148:
	LDA.w $003C,y
	BEQ.b CODE_A9B151
	STA.l $7F2780,x
CODE_A9B151:
	LDA.w $003E,y
	BEQ.b CODE_A9B15A
	STA.l $7F2800,x
CODE_A9B15A:
	REP.b #$20
	RTL

CODE_A9B15D:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9B168
	STA.l $7F1700,x
CODE_A9B168:
	LDA.w $0001,y
	BEQ.b CODE_A9B171
	STA.l $7F1780,x
CODE_A9B171:
	LDA.w $0003,y
	BEQ.b CODE_A9B17A
	STA.l $7F1800,x
CODE_A9B17A:
	LDA.w $0005,y
	BEQ.b CODE_A9B183
	STA.l $7F1880,x
CODE_A9B183:
	LDA.w $0007,y
	BEQ.b CODE_A9B18C
	STA.l $7F1900,x
CODE_A9B18C:
	LDA.w $0008,y
	BEQ.b CODE_A9B195
	STA.l $7F1980,x
CODE_A9B195:
	LDA.w $000A,y
	BEQ.b CODE_A9B19E
	STA.l $7F1A00,x
CODE_A9B19E:
	LDA.w $000C,y
	BEQ.b CODE_A9B1A7
	STA.l $7F1A80,x
CODE_A9B1A7:
	LDA.w $000E,y
	BEQ.b CODE_A9B1B0
	STA.l $7F1B00,x
CODE_A9B1B0:
	LDA.w $000F,y
	BEQ.b CODE_A9B1B9
	STA.l $7F1B80,x
CODE_A9B1B9:
	LDA.w $0011,y
	BEQ.b CODE_A9B1C2
	STA.l $7F1C00,x
CODE_A9B1C2:
	LDA.w $0013,y
	BEQ.b CODE_A9B1CB
	STA.l $7F1C80,x
CODE_A9B1CB:
	LDA.w $0015,y
	BEQ.b CODE_A9B1D4
	STA.l $7F1D00,x
CODE_A9B1D4:
	LDA.w $0017,y
	BEQ.b CODE_A9B1DD
	STA.l $7F1D80,x
CODE_A9B1DD:
	LDA.w $0018,y
	BEQ.b CODE_A9B1E6
	STA.l $7F1E00,x
CODE_A9B1E6:
	LDA.w $001A,y
	BEQ.b CODE_A9B1EF
	STA.l $7F1E80,x
CODE_A9B1EF:
	LDA.w $001C,y
	BEQ.b CODE_A9B1F8
	STA.l $7F1F00,x
CODE_A9B1F8:
	LDA.w $001E,y
	BEQ.b CODE_A9B201
	STA.l $7F1F80,x
CODE_A9B201:
	LDA.w $001F,y
	BEQ.b CODE_A9B20A
	STA.l $7F2000,x
CODE_A9B20A:
	LDA.w $0021,y
	BEQ.b CODE_A9B213
	STA.l $7F2080,x
CODE_A9B213:
	LDA.w $0023,y
	BEQ.b CODE_A9B21C
	STA.l $7F2100,x
CODE_A9B21C:
	LDA.w $0025,y
	BEQ.b CODE_A9B225
	STA.l $7F2180,x
CODE_A9B225:
	LDA.w $0027,y
	BEQ.b CODE_A9B22E
	STA.l $7F2200,x
CODE_A9B22E:
	LDA.w $0028,y
	BEQ.b CODE_A9B237
	STA.l $7F2280,x
CODE_A9B237:
	LDA.w $002A,y
	BEQ.b CODE_A9B240
	STA.l $7F2300,x
CODE_A9B240:
	LDA.w $002C,y
	BEQ.b CODE_A9B249
	STA.l $7F2380,x
CODE_A9B249:
	LDA.w $002E,y
	BEQ.b CODE_A9B252
	STA.l $7F2400,x
CODE_A9B252:
	LDA.w $002F,y
	BEQ.b CODE_A9B25B
	STA.l $7F2480,x
CODE_A9B25B:
	LDA.w $0031,y
	BEQ.b CODE_A9B264
	STA.l $7F2500,x
CODE_A9B264:
	LDA.w $0033,y
	BEQ.b CODE_A9B26D
	STA.l $7F2580,x
CODE_A9B26D:
	LDA.w $0035,y
	BEQ.b CODE_A9B276
	STA.l $7F2600,x
CODE_A9B276:
	LDA.w $0037,y
	BEQ.b CODE_A9B27F
	STA.l $7F2680,x
CODE_A9B27F:
	LDA.w $0038,y
	BEQ.b CODE_A9B288
	STA.l $7F2700,x
CODE_A9B288:
	LDA.w $003A,y
	BEQ.b CODE_A9B291
	STA.l $7F2780,x
CODE_A9B291:
	LDA.w $003C,y
	BEQ.b CODE_A9B29A
	STA.l $7F2800,x
CODE_A9B29A:
	LDA.w $003E,y
	BEQ.b CODE_A9B2A3
	STA.l $7F2880,x
CODE_A9B2A3:
	REP.b #$20
	RTL

CODE_A9B2A6:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9B2B1
	STA.l $7F1680,x
CODE_A9B2B1:
	LDA.w $0001,y
	BEQ.b CODE_A9B2BA
	STA.l $7F1700,x
CODE_A9B2BA:
	LDA.w $0003,y
	BEQ.b CODE_A9B2C3
	STA.l $7F1780,x
CODE_A9B2C3:
	LDA.w $0005,y
	BEQ.b CODE_A9B2CC
	STA.l $7F1800,x
CODE_A9B2CC:
	LDA.w $0006,y
	BEQ.b CODE_A9B2D5
	STA.l $7F1880,x
CODE_A9B2D5:
	LDA.w $0008,y
	BEQ.b CODE_A9B2DE
	STA.l $7F1900,x
CODE_A9B2DE:
	LDA.w $000A,y
	BEQ.b CODE_A9B2E7
	STA.l $7F1980,x
CODE_A9B2E7:
	LDA.w $000B,y
	BEQ.b CODE_A9B2F0
	STA.l $7F1A00,x
CODE_A9B2F0:
	LDA.w $000D,y
	BEQ.b CODE_A9B2F9
	STA.l $7F1A80,x
CODE_A9B2F9:
	LDA.w $000F,y
	BEQ.b CODE_A9B302
	STA.l $7F1B00,x
CODE_A9B302:
	LDA.w $0010,y
	BEQ.b CODE_A9B30B
	STA.l $7F1B80,x
CODE_A9B30B:
	LDA.w $0012,y
	BEQ.b CODE_A9B314
	STA.l $7F1C00,x
CODE_A9B314:
	LDA.w $0014,y
	BEQ.b CODE_A9B31D
	STA.l $7F1C80,x
CODE_A9B31D:
	LDA.w $0015,y
	BEQ.b CODE_A9B326
	STA.l $7F1D00,x
CODE_A9B326:
	LDA.w $0017,y
	BEQ.b CODE_A9B32F
	STA.l $7F1D80,x
CODE_A9B32F:
	LDA.w $0019,y
	BEQ.b CODE_A9B338
	STA.l $7F1E00,x
CODE_A9B338:
	LDA.w $001A,y
	BEQ.b CODE_A9B341
	STA.l $7F1E80,x
CODE_A9B341:
	LDA.w $001C,y
	BEQ.b CODE_A9B34A
	STA.l $7F1F00,x
CODE_A9B34A:
	LDA.w $001E,y
	BEQ.b CODE_A9B353
	STA.l $7F1F80,x
CODE_A9B353:
	LDA.w $001F,y
	BEQ.b CODE_A9B35C
	STA.l $7F2000,x
CODE_A9B35C:
	LDA.w $0021,y
	BEQ.b CODE_A9B365
	STA.l $7F2080,x
CODE_A9B365:
	LDA.w $0023,y
	BEQ.b CODE_A9B36E
	STA.l $7F2100,x
CODE_A9B36E:
	LDA.w $0025,y
	BEQ.b CODE_A9B377
	STA.l $7F2180,x
CODE_A9B377:
	LDA.w $0026,y
	BEQ.b CODE_A9B380
	STA.l $7F2200,x
CODE_A9B380:
	LDA.w $0028,y
	BEQ.b CODE_A9B389
	STA.l $7F2280,x
CODE_A9B389:
	LDA.w $002A,y
	BEQ.b CODE_A9B392
	STA.l $7F2300,x
CODE_A9B392:
	LDA.w $002B,y
	BEQ.b CODE_A9B39B
	STA.l $7F2380,x
CODE_A9B39B:
	LDA.w $002D,y
	BEQ.b CODE_A9B3A4
	STA.l $7F2400,x
CODE_A9B3A4:
	LDA.w $002F,y
	BEQ.b CODE_A9B3AD
	STA.l $7F2480,x
CODE_A9B3AD:
	LDA.w $0030,y
	BEQ.b CODE_A9B3B6
	STA.l $7F2500,x
CODE_A9B3B6:
	LDA.w $0032,y
	BEQ.b CODE_A9B3BF
	STA.l $7F2580,x
CODE_A9B3BF:
	LDA.w $0034,y
	BEQ.b CODE_A9B3C8
	STA.l $7F2600,x
CODE_A9B3C8:
	LDA.w $0035,y
	BEQ.b CODE_A9B3D1
	STA.l $7F2680,x
CODE_A9B3D1:
	LDA.w $0037,y
	BEQ.b CODE_A9B3DA
	STA.l $7F2700,x
CODE_A9B3DA:
	LDA.w $0039,y
	BEQ.b CODE_A9B3E3
	STA.l $7F2780,x
CODE_A9B3E3:
	LDA.w $003A,y
	BEQ.b CODE_A9B3EC
	STA.l $7F2800,x
CODE_A9B3EC:
	LDA.w $003C,y
	BEQ.b CODE_A9B3F5
	STA.l $7F2880,x
CODE_A9B3F5:
	LDA.w $003E,y
	BEQ.b CODE_A9B3FE
	STA.l $7F2900,x
CODE_A9B3FE:
	REP.b #$20
	RTL

CODE_A9B401:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9B40C
	STA.l $7F1600,x
CODE_A9B40C:
	LDA.w $0001,y
	BEQ.b CODE_A9B415
	STA.l $7F1680,x
CODE_A9B415:
	LDA.w $0003,y
	BEQ.b CODE_A9B41E
	STA.l $7F1700,x
CODE_A9B41E:
	LDA.w $0004,y
	BEQ.b CODE_A9B427
	STA.l $7F1780,x
CODE_A9B427:
	LDA.w $0006,y
	BEQ.b CODE_A9B430
	STA.l $7F1800,x
CODE_A9B430:
	LDA.w $0007,y
	BEQ.b CODE_A9B439
	STA.l $7F1880,x
CODE_A9B439:
	LDA.w $0009,y
	BEQ.b CODE_A9B442
	STA.l $7F1900,x
CODE_A9B442:
	LDA.w $000B,y
	BEQ.b CODE_A9B44B
	STA.l $7F1980,x
CODE_A9B44B:
	LDA.w $000C,y
	BEQ.b CODE_A9B454
	STA.l $7F1A00,x
CODE_A9B454:
	LDA.w $000E,y
	BEQ.b CODE_A9B45D
	STA.l $7F1A80,x
CODE_A9B45D:
	LDA.w $000F,y
	BEQ.b CODE_A9B466
	STA.l $7F1B00,x
CODE_A9B466:
	LDA.w $0011,y
	BEQ.b CODE_A9B46F
	STA.l $7F1B80,x
CODE_A9B46F:
	LDA.w $0013,y
	BEQ.b CODE_A9B478
	STA.l $7F1C00,x
CODE_A9B478:
	LDA.w $0014,y
	BEQ.b CODE_A9B481
	STA.l $7F1C80,x
CODE_A9B481:
	LDA.w $0016,y
	BEQ.b CODE_A9B48A
	STA.l $7F1D00,x
CODE_A9B48A:
	LDA.w $0017,y
	BEQ.b CODE_A9B493
	STA.l $7F1D80,x
CODE_A9B493:
	LDA.w $0019,y
	BEQ.b CODE_A9B49C
	STA.l $7F1E00,x
CODE_A9B49C:
	LDA.w $001B,y
	BEQ.b CODE_A9B4A5
	STA.l $7F1E80,x
CODE_A9B4A5:
	LDA.w $001C,y
	BEQ.b CODE_A9B4AE
	STA.l $7F1F00,x
CODE_A9B4AE:
	LDA.w $001E,y
	BEQ.b CODE_A9B4B7
	STA.l $7F1F80,x
CODE_A9B4B7:
	LDA.w $001F,y
	BEQ.b CODE_A9B4C0
	STA.l $7F2000,x
CODE_A9B4C0:
	LDA.w $0021,y
	BEQ.b CODE_A9B4C9
	STA.l $7F2080,x
CODE_A9B4C9:
	LDA.w $0023,y
	BEQ.b CODE_A9B4D2
	STA.l $7F2100,x
CODE_A9B4D2:
	LDA.w $0024,y
	BEQ.b CODE_A9B4DB
	STA.l $7F2180,x
CODE_A9B4DB:
	LDA.w $0026,y
	BEQ.b CODE_A9B4E4
	STA.l $7F2200,x
CODE_A9B4E4:
	LDA.w $0027,y
	BEQ.b CODE_A9B4ED
	STA.l $7F2280,x
CODE_A9B4ED:
	LDA.w $0029,y
	BEQ.b CODE_A9B4F6
	STA.l $7F2300,x
CODE_A9B4F6:
	LDA.w $002B,y
	BEQ.b CODE_A9B4FF
	STA.l $7F2380,x
CODE_A9B4FF:
	LDA.w $002C,y
	BEQ.b CODE_A9B508
	STA.l $7F2400,x
CODE_A9B508:
	LDA.w $002E,y
	BEQ.b CODE_A9B511
	STA.l $7F2480,x
CODE_A9B511:
	LDA.w $002F,y
	BEQ.b CODE_A9B51A
	STA.l $7F2500,x
CODE_A9B51A:
	LDA.w $0031,y
	BEQ.b CODE_A9B523
	STA.l $7F2580,x
CODE_A9B523:
	LDA.w $0033,y
	BEQ.b CODE_A9B52C
	STA.l $7F2600,x
CODE_A9B52C:
	LDA.w $0034,y
	BEQ.b CODE_A9B535
	STA.l $7F2680,x
CODE_A9B535:
	LDA.w $0036,y
	BEQ.b CODE_A9B53E
	STA.l $7F2700,x
CODE_A9B53E:
	LDA.w $0037,y
	BEQ.b CODE_A9B547
	STA.l $7F2780,x
CODE_A9B547:
	LDA.w $0039,y
	BEQ.b CODE_A9B550
	STA.l $7F2800,x
CODE_A9B550:
	LDA.w $003B,y
	BEQ.b CODE_A9B559
	STA.l $7F2880,x
CODE_A9B559:
	LDA.w $003C,y
	BEQ.b CODE_A9B562
	STA.l $7F2900,x
CODE_A9B562:
	LDA.w $003E,y
	BEQ.b CODE_A9B56B
	STA.l $7F2980,x
CODE_A9B56B:
	REP.b #$20
	RTL

CODE_A9B56E:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9B579
	STA.l $7F1580,x
CODE_A9B579:
	LDA.w $0001,y
	BEQ.b CODE_A9B582
	STA.l $7F1600,x
CODE_A9B582:
	LDA.w $0003,y
	BEQ.b CODE_A9B58B
	STA.l $7F1680,x
CODE_A9B58B:
	LDA.w $0004,y
	BEQ.b CODE_A9B594
	STA.l $7F1700,x
CODE_A9B594:
	LDA.w $0006,y
	BEQ.b CODE_A9B59D
	STA.l $7F1780,x
CODE_A9B59D:
	LDA.w $0007,y
	BEQ.b CODE_A9B5A6
	STA.l $7F1800,x
CODE_A9B5A6:
	LDA.w $0009,y
	BEQ.b CODE_A9B5AF
	STA.l $7F1880,x
CODE_A9B5AF:
	LDA.w $000A,y
	BEQ.b CODE_A9B5B8
	STA.l $7F1900,x
CODE_A9B5B8:
	LDA.w $000C,y
	BEQ.b CODE_A9B5C1
	STA.l $7F1980,x
CODE_A9B5C1:
	LDA.w $000D,y
	BEQ.b CODE_A9B5CA
	STA.l $7F1A00,x
CODE_A9B5CA:
	LDA.w $000F,y
	BEQ.b CODE_A9B5D3
	STA.l $7F1A80,x
CODE_A9B5D3:
	LDA.w $0010,y
	BEQ.b CODE_A9B5DC
	STA.l $7F1B00,x
CODE_A9B5DC:
	LDA.w $0012,y
	BEQ.b CODE_A9B5E5
	STA.l $7F1B80,x
CODE_A9B5E5:
	LDA.w $0013,y
	BEQ.b CODE_A9B5EE
	STA.l $7F1C00,x
CODE_A9B5EE:
	LDA.w $0015,y
	BEQ.b CODE_A9B5F7
	STA.l $7F1C80,x
CODE_A9B5F7:
	LDA.w $0016,y
	BEQ.b CODE_A9B600
	STA.l $7F1D00,x
CODE_A9B600:
	LDA.w $0018,y
	BEQ.b CODE_A9B609
	STA.l $7F1D80,x
CODE_A9B609:
	LDA.w $0019,y
	BEQ.b CODE_A9B612
	STA.l $7F1E00,x
CODE_A9B612:
	LDA.w $001B,y
	BEQ.b CODE_A9B61B
	STA.l $7F1E80,x
CODE_A9B61B:
	LDA.w $001C,y
	BEQ.b CODE_A9B624
	STA.l $7F1F00,x
CODE_A9B624:
	LDA.w $001E,y
	BEQ.b CODE_A9B62D
	STA.l $7F1F80,x
CODE_A9B62D:
	LDA.w $001F,y
	BEQ.b CODE_A9B636
	STA.l $7F2000,x
CODE_A9B636:
	LDA.w $0021,y
	BEQ.b CODE_A9B63F
	STA.l $7F2080,x
CODE_A9B63F:
	LDA.w $0023,y
	BEQ.b CODE_A9B648
	STA.l $7F2100,x
CODE_A9B648:
	LDA.w $0024,y
	BEQ.b CODE_A9B651
	STA.l $7F2180,x
CODE_A9B651:
	LDA.w $0026,y
	BEQ.b CODE_A9B65A
	STA.l $7F2200,x
CODE_A9B65A:
	LDA.w $0027,y
	BEQ.b CODE_A9B663
	STA.l $7F2280,x
CODE_A9B663:
	LDA.w $0029,y
	BEQ.b CODE_A9B66C
	STA.l $7F2300,x
CODE_A9B66C:
	LDA.w $002A,y
	BEQ.b CODE_A9B675
	STA.l $7F2380,x
CODE_A9B675:
	LDA.w $002C,y
	BEQ.b CODE_A9B67E
	STA.l $7F2400,x
CODE_A9B67E:
	LDA.w $002D,y
	BEQ.b CODE_A9B687
	STA.l $7F2480,x
CODE_A9B687:
	LDA.w $002F,y
	BEQ.b CODE_A9B690
	STA.l $7F2500,x
CODE_A9B690:
	LDA.w $0030,y
	BEQ.b CODE_A9B699
	STA.l $7F2580,x
CODE_A9B699:
	LDA.w $0032,y
	BEQ.b CODE_A9B6A2
	STA.l $7F2600,x
CODE_A9B6A2:
	LDA.w $0033,y
	BEQ.b CODE_A9B6AB
	STA.l $7F2680,x
CODE_A9B6AB:
	LDA.w $0035,y
	BEQ.b CODE_A9B6B4
	STA.l $7F2700,x
CODE_A9B6B4:
	LDA.w $0036,y
	BEQ.b CODE_A9B6BD
	STA.l $7F2780,x
CODE_A9B6BD:
	LDA.w $0038,y
	BEQ.b CODE_A9B6C6
	STA.l $7F2800,x
CODE_A9B6C6:
	LDA.w $0039,y
	BEQ.b CODE_A9B6CF
	STA.l $7F2880,x
CODE_A9B6CF:
	LDA.w $003B,y
	BEQ.b CODE_A9B6D8
	STA.l $7F2900,x
CODE_A9B6D8:
	LDA.w $003C,y
	BEQ.b CODE_A9B6E1
	STA.l $7F2980,x
CODE_A9B6E1:
	LDA.w $003E,y
	BEQ.b CODE_A9B6EA
	STA.l $7F2A00,x
CODE_A9B6EA:
	REP.b #$20
	RTL

CODE_A9B6ED:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9B6F8
	STA.l $7F1500,x
CODE_A9B6F8:
	LDA.w $0001,y
	BEQ.b CODE_A9B701
	STA.l $7F1580,x
CODE_A9B701:
	LDA.w $0002,y
	BEQ.b CODE_A9B70A
	STA.l $7F1600,x
CODE_A9B70A:
	LDA.w $0004,y
	BEQ.b CODE_A9B713
	STA.l $7F1680,x
CODE_A9B713:
	LDA.w $0005,y
	BEQ.b CODE_A9B71C
	STA.l $7F1700,x
CODE_A9B71C:
	LDA.w $0007,y
	BEQ.b CODE_A9B725
	STA.l $7F1780,x
CODE_A9B725:
	LDA.w $0008,y
	BEQ.b CODE_A9B72E
	STA.l $7F1800,x
CODE_A9B72E:
	LDA.w $000A,y
	BEQ.b CODE_A9B737
	STA.l $7F1880,x
CODE_A9B737:
	LDA.w $000B,y
	BEQ.b CODE_A9B740
	STA.l $7F1900,x
CODE_A9B740:
	LDA.w $000D,y
	BEQ.b CODE_A9B749
	STA.l $7F1980,x
CODE_A9B749:
	LDA.w $000E,y
	BEQ.b CODE_A9B752
	STA.l $7F1A00,x
CODE_A9B752:
	LDA.w $000F,y
	BEQ.b CODE_A9B75B
	STA.l $7F1A80,x
CODE_A9B75B:
	LDA.w $0011,y
	BEQ.b CODE_A9B764
	STA.l $7F1B00,x
CODE_A9B764:
	LDA.w $0012,y
	BEQ.b CODE_A9B76D
	STA.l $7F1B80,x
CODE_A9B76D:
	LDA.w $0014,y
	BEQ.b CODE_A9B776
	STA.l $7F1C00,x
CODE_A9B776:
	LDA.w $0015,y
	BEQ.b CODE_A9B77F
	STA.l $7F1C80,x
CODE_A9B77F:
	LDA.w $0017,y
	BEQ.b CODE_A9B788
	STA.l $7F1D00,x
CODE_A9B788:
	LDA.w $0018,y
	BEQ.b CODE_A9B791
	STA.l $7F1D80,x
CODE_A9B791:
	LDA.w $001A,y
	BEQ.b CODE_A9B79A
	STA.l $7F1E00,x
CODE_A9B79A:
	LDA.w $001B,y
	BEQ.b CODE_A9B7A3
	STA.l $7F1E80,x
CODE_A9B7A3:
	LDA.w $001D,y
	BEQ.b CODE_A9B7AC
	STA.l $7F1F00,x
CODE_A9B7AC:
	LDA.w $001E,y
	BEQ.b CODE_A9B7B5
	STA.l $7F1F80,x
CODE_A9B7B5:
	LDA.w $001F,y
	BEQ.b CODE_A9B7BE
	STA.l $7F2000,x
CODE_A9B7BE:
	LDA.w $0021,y
	BEQ.b CODE_A9B7C7
	STA.l $7F2080,x
CODE_A9B7C7:
	LDA.w $0022,y
	BEQ.b CODE_A9B7D0
	STA.l $7F2100,x
CODE_A9B7D0:
	LDA.w $0024,y
	BEQ.b CODE_A9B7D9
	STA.l $7F2180,x
CODE_A9B7D9:
	LDA.w $0025,y
	BEQ.b CODE_A9B7E2
	STA.l $7F2200,x
CODE_A9B7E2:
	LDA.w $0027,y
	BEQ.b CODE_A9B7EB
	STA.l $7F2280,x
CODE_A9B7EB:
	LDA.w $0028,y
	BEQ.b CODE_A9B7F4
	STA.l $7F2300,x
CODE_A9B7F4:
	LDA.w $002A,y
	BEQ.b CODE_A9B7FD
	STA.l $7F2380,x
CODE_A9B7FD:
	LDA.w $002B,y
	BEQ.b CODE_A9B806
	STA.l $7F2400,x
CODE_A9B806:
	LDA.w $002D,y
	BEQ.b CODE_A9B80F
	STA.l $7F2480,x
CODE_A9B80F:
	LDA.w $002E,y
	BEQ.b CODE_A9B818
	STA.l $7F2500,x
CODE_A9B818:
	LDA.w $002F,y
	BEQ.b CODE_A9B821
	STA.l $7F2580,x
CODE_A9B821:
	LDA.w $0031,y
	BEQ.b CODE_A9B82A
	STA.l $7F2600,x
CODE_A9B82A:
	LDA.w $0032,y
	BEQ.b CODE_A9B833
	STA.l $7F2680,x
CODE_A9B833:
	LDA.w $0034,y
	BEQ.b CODE_A9B83C
	STA.l $7F2700,x
CODE_A9B83C:
	LDA.w $0035,y
	BEQ.b CODE_A9B845
	STA.l $7F2780,x
CODE_A9B845:
	LDA.w $0037,y
	BEQ.b CODE_A9B84E
	STA.l $7F2800,x
CODE_A9B84E:
	LDA.w $0038,y
	BEQ.b CODE_A9B857
	STA.l $7F2880,x
CODE_A9B857:
	LDA.w $003A,y
	BEQ.b CODE_A9B860
	STA.l $7F2900,x
CODE_A9B860:
	LDA.w $003B,y
	BEQ.b CODE_A9B869
	STA.l $7F2980,x
CODE_A9B869:
	LDA.w $003D,y
	BEQ.b CODE_A9B872
	STA.l $7F2A00,x
CODE_A9B872:
	LDA.w $003E,y
	BEQ.b CODE_A9B87B
	STA.l $7F2A80,x
CODE_A9B87B:
	REP.b #$20
	RTL

CODE_A9B87E:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9B889
	STA.l $7F1480,x
CODE_A9B889:
	LDA.w $0001,y
	BEQ.b CODE_A9B892
	STA.l $7F1500,x
CODE_A9B892:
	LDA.w $0002,y
	BEQ.b CODE_A9B89B
	STA.l $7F1580,x
CODE_A9B89B:
	LDA.w $0004,y
	BEQ.b CODE_A9B8A4
	STA.l $7F1600,x
CODE_A9B8A4:
	LDA.w $0005,y
	BEQ.b CODE_A9B8AD
	STA.l $7F1680,x
CODE_A9B8AD:
	LDA.w $0006,y
	BEQ.b CODE_A9B8B6
	STA.l $7F1700,x
CODE_A9B8B6:
	LDA.w $0008,y
	BEQ.b CODE_A9B8BF
	STA.l $7F1780,x
CODE_A9B8BF:
	LDA.w $0009,y
	BEQ.b CODE_A9B8C8
	STA.l $7F1800,x
CODE_A9B8C8:
	LDA.w $000B,y
	BEQ.b CODE_A9B8D1
	STA.l $7F1880,x
CODE_A9B8D1:
	LDA.w $000C,y
	BEQ.b CODE_A9B8DA
	STA.l $7F1900,x
CODE_A9B8DA:
	LDA.w $000D,y
	BEQ.b CODE_A9B8E3
	STA.l $7F1980,x
CODE_A9B8E3:
	LDA.w $000F,y
	BEQ.b CODE_A9B8EC
	STA.l $7F1A00,x
CODE_A9B8EC:
	LDA.w $0010,y
	BEQ.b CODE_A9B8F5
	STA.l $7F1A80,x
CODE_A9B8F5:
	LDA.w $0012,y
	BEQ.b CODE_A9B8FE
	STA.l $7F1B00,x
CODE_A9B8FE:
	LDA.w $0013,y
	BEQ.b CODE_A9B907
	STA.l $7F1B80,x
CODE_A9B907:
	LDA.w $0014,y
	BEQ.b CODE_A9B910
	STA.l $7F1C00,x
CODE_A9B910:
	LDA.w $0016,y
	BEQ.b CODE_A9B919
	STA.l $7F1C80,x
CODE_A9B919:
	LDA.w $0017,y
	BEQ.b CODE_A9B922
	STA.l $7F1D00,x
CODE_A9B922:
	LDA.w $0019,y
	BEQ.b CODE_A9B92B
	STA.l $7F1D80,x
CODE_A9B92B:
	LDA.w $001A,y
	BEQ.b CODE_A9B934
	STA.l $7F1E00,x
CODE_A9B934:
	LDA.w $001B,y
	BEQ.b CODE_A9B93D
	STA.l $7F1E80,x
CODE_A9B93D:
	LDA.w $001D,y
	BEQ.b CODE_A9B946
	STA.l $7F1F00,x
CODE_A9B946:
	LDA.w $001E,y
	BEQ.b CODE_A9B94F
	STA.l $7F1F80,x
CODE_A9B94F:
	LDA.w $001F,y
	BEQ.b CODE_A9B958
	STA.l $7F2000,x
CODE_A9B958:
	LDA.w $0021,y
	BEQ.b CODE_A9B961
	STA.l $7F2080,x
CODE_A9B961:
	LDA.w $0022,y
	BEQ.b CODE_A9B96A
	STA.l $7F2100,x
CODE_A9B96A:
	LDA.w $0024,y
	BEQ.b CODE_A9B973
	STA.l $7F2180,x
CODE_A9B973:
	LDA.w $0025,y
	BEQ.b CODE_A9B97C
	STA.l $7F2200,x
CODE_A9B97C:
	LDA.w $0026,y
	BEQ.b CODE_A9B985
	STA.l $7F2280,x
CODE_A9B985:
	LDA.w $0028,y
	BEQ.b CODE_A9B98E
	STA.l $7F2300,x
CODE_A9B98E:
	LDA.w $0029,y
	BEQ.b CODE_A9B997
	STA.l $7F2380,x
CODE_A9B997:
	LDA.w $002B,y
	BEQ.b CODE_A9B9A0
	STA.l $7F2400,x
CODE_A9B9A0:
	LDA.w $002C,y
	BEQ.b CODE_A9B9A9
	STA.l $7F2480,x
CODE_A9B9A9:
	LDA.w $002D,y
	BEQ.b CODE_A9B9B2
	STA.l $7F2500,x
CODE_A9B9B2:
	LDA.w $002F,y
	BEQ.b CODE_A9B9BB
	STA.l $7F2580,x
CODE_A9B9BB:
	LDA.w $0030,y
	BEQ.b CODE_A9B9C4
	STA.l $7F2600,x
CODE_A9B9C4:
	LDA.w $0032,y
	BEQ.b CODE_A9B9CD
	STA.l $7F2680,x
CODE_A9B9CD:
	LDA.w $0033,y
	BEQ.b CODE_A9B9D6
	STA.l $7F2700,x
CODE_A9B9D6:
	LDA.w $0034,y
	BEQ.b CODE_A9B9DF
	STA.l $7F2780,x
CODE_A9B9DF:
	LDA.w $0036,y
	BEQ.b CODE_A9B9E8
	STA.l $7F2800,x
CODE_A9B9E8:
	LDA.w $0037,y
	BEQ.b CODE_A9B9F1
	STA.l $7F2880,x
CODE_A9B9F1:
	LDA.w $0039,y
	BEQ.b CODE_A9B9FA
	STA.l $7F2900,x
CODE_A9B9FA:
	LDA.w $003A,y
	BEQ.b CODE_A9BA03
	STA.l $7F2980,x
CODE_A9BA03:
	LDA.w $003B,y
	BEQ.b CODE_A9BA0C
	STA.l $7F2A00,x
CODE_A9BA0C:
	LDA.w $003D,y
	BEQ.b CODE_A9BA15
	STA.l $7F2A80,x
CODE_A9BA15:
	LDA.w $003E,y
	BEQ.b CODE_A9BA1E
	STA.l $7F2B00,x
CODE_A9BA1E:
	REP.b #$20
	RTL

CODE_A9BA21:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9BA2C
	STA.l $7F1400,x
CODE_A9BA2C:
	LDA.w $0001,y
	BEQ.b CODE_A9BA35
	STA.l $7F1480,x
CODE_A9BA35:
	LDA.w $0002,y
	BEQ.b CODE_A9BA3E
	STA.l $7F1500,x
CODE_A9BA3E:
	LDA.w $0003,y
	BEQ.b CODE_A9BA47
	STA.l $7F1580,x
CODE_A9BA47:
	LDA.w $0005,y
	BEQ.b CODE_A9BA50
	STA.l $7F1600,x
CODE_A9BA50:
	LDA.w $0006,y
	BEQ.b CODE_A9BA59
	STA.l $7F1680,x
CODE_A9BA59:
	LDA.w $0007,y
	BEQ.b CODE_A9BA62
	STA.l $7F1700,x
CODE_A9BA62:
	LDA.w $0009,y
	BEQ.b CODE_A9BA6B
	STA.l $7F1780,x
CODE_A9BA6B:
	LDA.w $000A,y
	BEQ.b CODE_A9BA74
	STA.l $7F1800,x
CODE_A9BA74:
	LDA.w $000B,y
	BEQ.b CODE_A9BA7D
	STA.l $7F1880,x
CODE_A9BA7D:
	LDA.w $000D,y
	BEQ.b CODE_A9BA86
	STA.l $7F1900,x
CODE_A9BA86:
	LDA.w $000E,y
	BEQ.b CODE_A9BA8F
	STA.l $7F1980,x
CODE_A9BA8F:
	LDA.w $000F,y
	BEQ.b CODE_A9BA98
	STA.l $7F1A00,x
CODE_A9BA98:
	LDA.w $0011,y
	BEQ.b CODE_A9BAA1
	STA.l $7F1A80,x
CODE_A9BAA1:
	LDA.w $0012,y
	BEQ.b CODE_A9BAAA
	STA.l $7F1B00,x
CODE_A9BAAA:
	LDA.w $0013,y
	BEQ.b CODE_A9BAB3
	STA.l $7F1B80,x
CODE_A9BAB3:
	LDA.w $0015,y
	BEQ.b CODE_A9BABC
	STA.l $7F1C00,x
CODE_A9BABC:
	LDA.w $0016,y
	BEQ.b CODE_A9BAC5
	STA.l $7F1C80,x
CODE_A9BAC5:
	LDA.w $0017,y
	BEQ.b CODE_A9BACE
	STA.l $7F1D00,x
CODE_A9BACE:
	LDA.w $0019,y
	BEQ.b CODE_A9BAD7
	STA.l $7F1D80,x
CODE_A9BAD7:
	LDA.w $001A,y
	BEQ.b CODE_A9BAE0
	STA.l $7F1E00,x
CODE_A9BAE0:
	LDA.w $001B,y
	BEQ.b CODE_A9BAE9
	STA.l $7F1E80,x
CODE_A9BAE9:
	LDA.w $001D,y
	BEQ.b CODE_A9BAF2
	STA.l $7F1F00,x
CODE_A9BAF2:
	LDA.w $001E,y
	BEQ.b CODE_A9BAFB
	STA.l $7F1F80,x
CODE_A9BAFB:
	LDA.w $001F,y
	BEQ.b CODE_A9BB04
	STA.l $7F2000,x
CODE_A9BB04:
	LDA.w $0021,y
	BEQ.b CODE_A9BB0D
	STA.l $7F2080,x
CODE_A9BB0D:
	LDA.w $0022,y
	BEQ.b CODE_A9BB16
	STA.l $7F2100,x
CODE_A9BB16:
	LDA.w $0023,y
	BEQ.b CODE_A9BB1F
	STA.l $7F2180,x
CODE_A9BB1F:
	LDA.w $0025,y
	BEQ.b CODE_A9BB28
	STA.l $7F2200,x
CODE_A9BB28:
	LDA.w $0026,y
	BEQ.b CODE_A9BB31
	STA.l $7F2280,x
CODE_A9BB31:
	LDA.w $0027,y
	BEQ.b CODE_A9BB3A
	STA.l $7F2300,x
CODE_A9BB3A:
	LDA.w $0029,y
	BEQ.b CODE_A9BB43
	STA.l $7F2380,x
CODE_A9BB43:
	LDA.w $002A,y
	BEQ.b CODE_A9BB4C
	STA.l $7F2400,x
CODE_A9BB4C:
	LDA.w $002B,y
	BEQ.b CODE_A9BB55
	STA.l $7F2480,x
CODE_A9BB55:
	LDA.w $002D,y
	BEQ.b CODE_A9BB5E
	STA.l $7F2500,x
CODE_A9BB5E:
	LDA.w $002E,y
	BEQ.b CODE_A9BB67
	STA.l $7F2580,x
CODE_A9BB67:
	LDA.w $002F,y
	BEQ.b CODE_A9BB70
	STA.l $7F2600,x
CODE_A9BB70:
	LDA.w $0031,y
	BEQ.b CODE_A9BB79
	STA.l $7F2680,x
CODE_A9BB79:
	LDA.w $0032,y
	BEQ.b CODE_A9BB82
	STA.l $7F2700,x
CODE_A9BB82:
	LDA.w $0033,y
	BEQ.b CODE_A9BB8B
	STA.l $7F2780,x
CODE_A9BB8B:
	LDA.w $0035,y
	BEQ.b CODE_A9BB94
	STA.l $7F2800,x
CODE_A9BB94:
	LDA.w $0036,y
	BEQ.b CODE_A9BB9D
	STA.l $7F2880,x
CODE_A9BB9D:
	LDA.w $0037,y
	BEQ.b CODE_A9BBA6
	STA.l $7F2900,x
CODE_A9BBA6:
	LDA.w $0039,y
	BEQ.b CODE_A9BBAF
	STA.l $7F2980,x
CODE_A9BBAF:
	LDA.w $003A,y
	BEQ.b CODE_A9BBB8
	STA.l $7F2A00,x
CODE_A9BBB8:
	LDA.w $003B,y
	BEQ.b CODE_A9BBC1
	STA.l $7F2A80,x
CODE_A9BBC1:
	LDA.w $003D,y
	BEQ.b CODE_A9BBCA
	STA.l $7F2B00,x
CODE_A9BBCA:
	LDA.w $003E,y
	BEQ.b CODE_A9BBD3
	STA.l $7F2B80,x
CODE_A9BBD3:
	REP.b #$20
	RTL

CODE_A9BBD6:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9BBE1
	STA.l $7F1380,x
CODE_A9BBE1:
	LDA.w $0001,y
	BEQ.b CODE_A9BBEA
	STA.l $7F1400,x
CODE_A9BBEA:
	LDA.w $0002,y
	BEQ.b CODE_A9BBF3
	STA.l $7F1480,x
CODE_A9BBF3:
	LDA.w $0003,y
	BEQ.b CODE_A9BBFC
	STA.l $7F1500,x
CODE_A9BBFC:
	LDA.w $0005,y
	BEQ.b CODE_A9BC05
	STA.l $7F1580,x
CODE_A9BC05:
	LDA.w $0006,y
	BEQ.b CODE_A9BC0E
	STA.l $7F1600,x
CODE_A9BC0E:
	LDA.w $0007,y
	BEQ.b CODE_A9BC17
	STA.l $7F1680,x
CODE_A9BC17:
	LDA.w $0008,y
	BEQ.b CODE_A9BC20
	STA.l $7F1700,x
CODE_A9BC20:
	LDA.w $000A,y
	BEQ.b CODE_A9BC29
	STA.l $7F1780,x
CODE_A9BC29:
	LDA.w $000B,y
	BEQ.b CODE_A9BC32
	STA.l $7F1800,x
CODE_A9BC32:
	LDA.w $000C,y
	BEQ.b CODE_A9BC3B
	STA.l $7F1880,x
CODE_A9BC3B:
	LDA.w $000E,y
	BEQ.b CODE_A9BC44
	STA.l $7F1900,x
CODE_A9BC44:
	LDA.w $000F,y
	BEQ.b CODE_A9BC4D
	STA.l $7F1980,x
CODE_A9BC4D:
	LDA.w $0010,y
	BEQ.b CODE_A9BC56
	STA.l $7F1A00,x
CODE_A9BC56:
	LDA.w $0011,y
	BEQ.b CODE_A9BC5F
	STA.l $7F1A80,x
CODE_A9BC5F:
	LDA.w $0013,y
	BEQ.b CODE_A9BC68
	STA.l $7F1B00,x
CODE_A9BC68:
	LDA.w $0014,y
	BEQ.b CODE_A9BC71
	STA.l $7F1B80,x
CODE_A9BC71:
	LDA.w $0015,y
	BEQ.b CODE_A9BC7A
	STA.l $7F1C00,x
CODE_A9BC7A:
	LDA.w $0016,y
	BEQ.b CODE_A9BC83
	STA.l $7F1C80,x
CODE_A9BC83:
	LDA.w $0018,y
	BEQ.b CODE_A9BC8C
	STA.l $7F1D00,x
CODE_A9BC8C:
	LDA.w $0019,y
	BEQ.b CODE_A9BC95
	STA.l $7F1D80,x
CODE_A9BC95:
	LDA.w $001A,y
	BEQ.b CODE_A9BC9E
	STA.l $7F1E00,x
CODE_A9BC9E:
	LDA.w $001C,y
	BEQ.b CODE_A9BCA7
	STA.l $7F1E80,x
CODE_A9BCA7:
	LDA.w $001D,y
	BEQ.b CODE_A9BCB0
	STA.l $7F1F00,x
CODE_A9BCB0:
	LDA.w $001E,y
	BEQ.b CODE_A9BCB9
	STA.l $7F1F80,x
CODE_A9BCB9:
	LDA.w $001F,y
	BEQ.b CODE_A9BCC2
	STA.l $7F2000,x
CODE_A9BCC2:
	LDA.w $0021,y
	BEQ.b CODE_A9BCCB
	STA.l $7F2080,x
CODE_A9BCCB:
	LDA.w $0022,y
	BEQ.b CODE_A9BCD4
	STA.l $7F2100,x
CODE_A9BCD4:
	LDA.w $0023,y
	BEQ.b CODE_A9BCDD
	STA.l $7F2180,x
CODE_A9BCDD:
	LDA.w $0025,y
	BEQ.b CODE_A9BCE6
	STA.l $7F2200,x
CODE_A9BCE6:
	LDA.w $0026,y
	BEQ.b CODE_A9BCEF
	STA.l $7F2280,x
CODE_A9BCEF:
	LDA.w $0027,y
	BEQ.b CODE_A9BCF8
	STA.l $7F2300,x
CODE_A9BCF8:
	LDA.w $0028,y
	BEQ.b CODE_A9BD01
	STA.l $7F2380,x
CODE_A9BD01:
	LDA.w $002A,y
	BEQ.b CODE_A9BD0A
	STA.l $7F2400,x
CODE_A9BD0A:
	LDA.w $002B,y
	BEQ.b CODE_A9BD13
	STA.l $7F2480,x
CODE_A9BD13:
	LDA.w $002C,y
	BEQ.b CODE_A9BD1C
	STA.l $7F2500,x
CODE_A9BD1C:
	LDA.w $002D,y
	BEQ.b CODE_A9BD25
	STA.l $7F2580,x
CODE_A9BD25:
	LDA.w $002F,y
	BEQ.b CODE_A9BD2E
	STA.l $7F2600,x
CODE_A9BD2E:
	LDA.w $0030,y
	BEQ.b CODE_A9BD37
	STA.l $7F2680,x
CODE_A9BD37:
	LDA.w $0031,y
	BEQ.b CODE_A9BD40
	STA.l $7F2700,x
CODE_A9BD40:
	LDA.w $0033,y
	BEQ.b CODE_A9BD49
	STA.l $7F2780,x
CODE_A9BD49:
	LDA.w $0034,y
	BEQ.b CODE_A9BD52
	STA.l $7F2800,x
CODE_A9BD52:
	LDA.w $0035,y
	BEQ.b CODE_A9BD5B
	STA.l $7F2880,x
CODE_A9BD5B:
	LDA.w $0036,y
	BEQ.b CODE_A9BD64
	STA.l $7F2900,x
CODE_A9BD64:
	LDA.w $0038,y
	BEQ.b CODE_A9BD6D
	STA.l $7F2980,x
CODE_A9BD6D:
	LDA.w $0039,y
	BEQ.b CODE_A9BD76
	STA.l $7F2A00,x
CODE_A9BD76:
	LDA.w $003A,y
	BEQ.b CODE_A9BD7F
	STA.l $7F2A80,x
CODE_A9BD7F:
	LDA.w $003C,y
	BEQ.b CODE_A9BD88
	STA.l $7F2B00,x
CODE_A9BD88:
	LDA.w $003D,y
	BEQ.b CODE_A9BD91
	STA.l $7F2B80,x
CODE_A9BD91:
	LDA.w $003E,y
	BEQ.b CODE_A9BD9A
	STA.l $7F2C00,x
CODE_A9BD9A:
	REP.b #$20
	RTL

CODE_A9BD9D:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9BDA8
	STA.l $7F1300,x
CODE_A9BDA8:
	LDA.w $0001,y
	BEQ.b CODE_A9BDB1
	STA.l $7F1380,x
CODE_A9BDB1:
	LDA.w $0002,y
	BEQ.b CODE_A9BDBA
	STA.l $7F1400,x
CODE_A9BDBA:
	LDA.w $0003,y
	BEQ.b CODE_A9BDC3
	STA.l $7F1480,x
CODE_A9BDC3:
	LDA.w $0004,y
	BEQ.b CODE_A9BDCC
	STA.l $7F1500,x
CODE_A9BDCC:
	LDA.w $0006,y
	BEQ.b CODE_A9BDD5
	STA.l $7F1580,x
CODE_A9BDD5:
	LDA.w $0007,y
	BEQ.b CODE_A9BDDE
	STA.l $7F1600,x
CODE_A9BDDE:
	LDA.w $0008,y
	BEQ.b CODE_A9BDE7
	STA.l $7F1680,x
CODE_A9BDE7:
	LDA.w $0009,y
	BEQ.b CODE_A9BDF0
	STA.l $7F1700,x
CODE_A9BDF0:
	LDA.w $000B,y
	BEQ.b CODE_A9BDF9
	STA.l $7F1780,x
CODE_A9BDF9:
	LDA.w $000C,y
	BEQ.b CODE_A9BE02
	STA.l $7F1800,x
CODE_A9BE02:
	LDA.w $000D,y
	BEQ.b CODE_A9BE0B
	STA.l $7F1880,x
CODE_A9BE0B:
	LDA.w $000E,y
	BEQ.b CODE_A9BE14
	STA.l $7F1900,x
CODE_A9BE14:
	LDA.w $000F,y
	BEQ.b CODE_A9BE1D
	STA.l $7F1980,x
CODE_A9BE1D:
	LDA.w $0011,y
	BEQ.b CODE_A9BE26
	STA.l $7F1A00,x
CODE_A9BE26:
	LDA.w $0012,y
	BEQ.b CODE_A9BE2F
	STA.l $7F1A80,x
CODE_A9BE2F:
	LDA.w $0013,y
	BEQ.b CODE_A9BE38
	STA.l $7F1B00,x
CODE_A9BE38:
	LDA.w $0014,y
	BEQ.b CODE_A9BE41
	STA.l $7F1B80,x
CODE_A9BE41:
	LDA.w $0016,y
	BEQ.b CODE_A9BE4A
	STA.l $7F1C00,x
CODE_A9BE4A:
	LDA.w $0017,y
	BEQ.b CODE_A9BE53
	STA.l $7F1C80,x
CODE_A9BE53:
	LDA.w $0018,y
	BEQ.b CODE_A9BE5C
	STA.l $7F1D00,x
CODE_A9BE5C:
	LDA.w $0019,y
	BEQ.b CODE_A9BE65
	STA.l $7F1D80,x
CODE_A9BE65:
	LDA.w $001B,y
	BEQ.b CODE_A9BE6E
	STA.l $7F1E00,x
CODE_A9BE6E:
	LDA.w $001C,y
	BEQ.b CODE_A9BE77
	STA.l $7F1E80,x
CODE_A9BE77:
	LDA.w $001D,y
	BEQ.b CODE_A9BE80
	STA.l $7F1F00,x
CODE_A9BE80:
	LDA.w $001E,y
	BEQ.b CODE_A9BE89
	STA.l $7F1F80,x
CODE_A9BE89:
	LDA.w $001F,y
	BEQ.b CODE_A9BE92
	STA.l $7F2000,x
CODE_A9BE92:
	LDA.w $0021,y
	BEQ.b CODE_A9BE9B
	STA.l $7F2080,x
CODE_A9BE9B:
	LDA.w $0022,y
	BEQ.b CODE_A9BEA4
	STA.l $7F2100,x
CODE_A9BEA4:
	LDA.w $0023,y
	BEQ.b CODE_A9BEAD
	STA.l $7F2180,x
CODE_A9BEAD:
	LDA.w $0024,y
	BEQ.b CODE_A9BEB6
	STA.l $7F2200,x
CODE_A9BEB6:
	LDA.w $0026,y
	BEQ.b CODE_A9BEBF
	STA.l $7F2280,x
CODE_A9BEBF:
	LDA.w $0027,y
	BEQ.b CODE_A9BEC8
	STA.l $7F2300,x
CODE_A9BEC8:
	LDA.w $0028,y
	BEQ.b CODE_A9BED1
	STA.l $7F2380,x
CODE_A9BED1:
	LDA.w $0029,y
	BEQ.b CODE_A9BEDA
	STA.l $7F2400,x
CODE_A9BEDA:
	LDA.w $002B,y
	BEQ.b CODE_A9BEE3
	STA.l $7F2480,x
CODE_A9BEE3:
	LDA.w $002C,y
	BEQ.b CODE_A9BEEC
	STA.l $7F2500,x
CODE_A9BEEC:
	LDA.w $002D,y
	BEQ.b CODE_A9BEF5
	STA.l $7F2580,x
CODE_A9BEF5:
	LDA.w $002E,y
	BEQ.b CODE_A9BEFE
	STA.l $7F2600,x
CODE_A9BEFE:
	LDA.w $002F,y
	BEQ.b CODE_A9BF07
	STA.l $7F2680,x
CODE_A9BF07:
	LDA.w $0031,y
	BEQ.b CODE_A9BF10
	STA.l $7F2700,x
CODE_A9BF10:
	LDA.w $0032,y
	BEQ.b CODE_A9BF19
	STA.l $7F2780,x
CODE_A9BF19:
	LDA.w $0033,y
	BEQ.b CODE_A9BF22
	STA.l $7F2800,x
CODE_A9BF22:
	LDA.w $0034,y
	BEQ.b CODE_A9BF2B
	STA.l $7F2880,x
CODE_A9BF2B:
	LDA.w $0036,y
	BEQ.b CODE_A9BF34
	STA.l $7F2900,x
CODE_A9BF34:
	LDA.w $0037,y
	BEQ.b CODE_A9BF3D
	STA.l $7F2980,x
CODE_A9BF3D:
	LDA.w $0038,y
	BEQ.b CODE_A9BF46
	STA.l $7F2A00,x
CODE_A9BF46:
	LDA.w $0039,y
	BEQ.b CODE_A9BF4F
	STA.l $7F2A80,x
CODE_A9BF4F:
	LDA.w $003B,y
	BEQ.b CODE_A9BF58
	STA.l $7F2B00,x
CODE_A9BF58:
	LDA.w $003C,y
	BEQ.b CODE_A9BF61
	STA.l $7F2B80,x
CODE_A9BF61:
	LDA.w $003D,y
	BEQ.b CODE_A9BF6A
	STA.l $7F2C00,x
CODE_A9BF6A:
	LDA.w $003E,y
	BEQ.b CODE_A9BF73
	STA.l $7F2C80,x
CODE_A9BF73:
	REP.b #$20
	RTL

CODE_A9BF76:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9BF81
	STA.l $7F1280,x
CODE_A9BF81:
	LDA.w $0001,y
	BEQ.b CODE_A9BF8A
	STA.l $7F1300,x
CODE_A9BF8A:
	LDA.w $0002,y
	BEQ.b CODE_A9BF93
	STA.l $7F1380,x
CODE_A9BF93:
	LDA.w $0003,y
	BEQ.b CODE_A9BF9C
	STA.l $7F1400,x
CODE_A9BF9C:
	LDA.w $0004,y
	BEQ.b CODE_A9BFA5
	STA.l $7F1480,x
CODE_A9BFA5:
	LDA.w $0005,y
	BEQ.b CODE_A9BFAE
	STA.l $7F1500,x
CODE_A9BFAE:
	LDA.w $0007,y
	BEQ.b CODE_A9BFB7
	STA.l $7F1580,x
CODE_A9BFB7:
	LDA.w $0008,y
	BEQ.b CODE_A9BFC0
	STA.l $7F1600,x
CODE_A9BFC0:
	LDA.w $0009,y
	BEQ.b CODE_A9BFC9
	STA.l $7F1680,x
CODE_A9BFC9:
	LDA.w $000A,y
	BEQ.b CODE_A9BFD2
	STA.l $7F1700,x
CODE_A9BFD2:
	LDA.w $000B,y
	BEQ.b CODE_A9BFDB
	STA.l $7F1780,x
CODE_A9BFDB:
	LDA.w $000D,y
	BEQ.b CODE_A9BFE4
	STA.l $7F1800,x
CODE_A9BFE4:
	LDA.w $000E,y
	BEQ.b CODE_A9BFED
	STA.l $7F1880,x
CODE_A9BFED:
	LDA.w $000F,y
	BEQ.b CODE_A9BFF6
	STA.l $7F1900,x
CODE_A9BFF6:
	LDA.w $0010,y
	BEQ.b CODE_A9BFFF
	STA.l $7F1980,x
CODE_A9BFFF:
	LDA.w $0011,y
	BEQ.b CODE_A9C008
	STA.l $7F1A00,x
CODE_A9C008:
	LDA.w $0012,y
	BEQ.b CODE_A9C011
	STA.l $7F1A80,x
CODE_A9C011:
	LDA.w $0014,y
	BEQ.b CODE_A9C01A
	STA.l $7F1B00,x
CODE_A9C01A:
	LDA.w $0015,y
	BEQ.b CODE_A9C023
	STA.l $7F1B80,x
CODE_A9C023:
	LDA.w $0016,y
	BEQ.b CODE_A9C02C
	STA.l $7F1C00,x
CODE_A9C02C:
	LDA.w $0017,y
	BEQ.b CODE_A9C035
	STA.l $7F1C80,x
CODE_A9C035:
	LDA.w $0018,y
	BEQ.b CODE_A9C03E
	STA.l $7F1D00,x
CODE_A9C03E:
	LDA.w $001A,y
	BEQ.b CODE_A9C047
	STA.l $7F1D80,x
CODE_A9C047:
	LDA.w $001B,y
	BEQ.b CODE_A9C050
	STA.l $7F1E00,x
CODE_A9C050:
	LDA.w $001C,y
	BEQ.b CODE_A9C059
	STA.l $7F1E80,x
CODE_A9C059:
	LDA.w $001D,y
	BEQ.b CODE_A9C062
	STA.l $7F1F00,x
CODE_A9C062:
	LDA.w $001E,y
	BEQ.b CODE_A9C06B
	STA.l $7F1F80,x
CODE_A9C06B:
	LDA.w $001F,y
	BEQ.b CODE_A9C074
	STA.l $7F2000,x
CODE_A9C074:
	LDA.w $0021,y
	BEQ.b CODE_A9C07D
	STA.l $7F2080,x
CODE_A9C07D:
	LDA.w $0022,y
	BEQ.b CODE_A9C086
	STA.l $7F2100,x
CODE_A9C086:
	LDA.w $0023,y
	BEQ.b CODE_A9C08F
	STA.l $7F2180,x
CODE_A9C08F:
	LDA.w $0024,y
	BEQ.b CODE_A9C098
	STA.l $7F2200,x
CODE_A9C098:
	LDA.w $0025,y
	BEQ.b CODE_A9C0A1
	STA.l $7F2280,x
CODE_A9C0A1:
	LDA.w $0027,y
	BEQ.b CODE_A9C0AA
	STA.l $7F2300,x
CODE_A9C0AA:
	LDA.w $0028,y
	BEQ.b CODE_A9C0B3
	STA.l $7F2380,x
CODE_A9C0B3:
	LDA.w $0029,y
	BEQ.b CODE_A9C0BC
	STA.l $7F2400,x
CODE_A9C0BC:
	LDA.w $002A,y
	BEQ.b CODE_A9C0C5
	STA.l $7F2480,x
CODE_A9C0C5:
	LDA.w $002B,y
	BEQ.b CODE_A9C0CE
	STA.l $7F2500,x
CODE_A9C0CE:
	LDA.w $002C,y
	BEQ.b CODE_A9C0D7
	STA.l $7F2580,x
CODE_A9C0D7:
	LDA.w $002E,y
	BEQ.b CODE_A9C0E0
	STA.l $7F2600,x
CODE_A9C0E0:
	LDA.w $002F,y
	BEQ.b CODE_A9C0E9
	STA.l $7F2680,x
CODE_A9C0E9:
	LDA.w $0030,y
	BEQ.b CODE_A9C0F2
	STA.l $7F2700,x
CODE_A9C0F2:
	LDA.w $0031,y
	BEQ.b CODE_A9C0FB
	STA.l $7F2780,x
CODE_A9C0FB:
	LDA.w $0032,y
	BEQ.b CODE_A9C104
	STA.l $7F2800,x
CODE_A9C104:
	LDA.w $0034,y
	BEQ.b CODE_A9C10D
	STA.l $7F2880,x
CODE_A9C10D:
	LDA.w $0035,y
	BEQ.b CODE_A9C116
	STA.l $7F2900,x
CODE_A9C116:
	LDA.w $0036,y
	BEQ.b CODE_A9C11F
	STA.l $7F2980,x
CODE_A9C11F:
	LDA.w $0037,y
	BEQ.b CODE_A9C128
	STA.l $7F2A00,x
CODE_A9C128:
	LDA.w $0038,y
	BEQ.b CODE_A9C131
	STA.l $7F2A80,x
CODE_A9C131:
	LDA.w $0039,y
	BEQ.b CODE_A9C13A
	STA.l $7F2B00,x
CODE_A9C13A:
	LDA.w $003B,y
	BEQ.b CODE_A9C143
	STA.l $7F2B80,x
CODE_A9C143:
	LDA.w $003C,y
	BEQ.b CODE_A9C14C
	STA.l $7F2C00,x
CODE_A9C14C:
	LDA.w $003D,y
	BEQ.b CODE_A9C155
	STA.l $7F2C80,x
CODE_A9C155:
	LDA.w $003E,y
	BEQ.b CODE_A9C15E
	STA.l $7F2D00,x
CODE_A9C15E:
	REP.b #$20
	RTL

CODE_A9C161:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9C16C
	STA.l $7F1200,x
CODE_A9C16C:
	LDA.w $0001,y
	BEQ.b CODE_A9C175
	STA.l $7F1280,x
CODE_A9C175:
	LDA.w $0002,y
	BEQ.b CODE_A9C17E
	STA.l $7F1300,x
CODE_A9C17E:
	LDA.w $0003,y
	BEQ.b CODE_A9C187
	STA.l $7F1380,x
CODE_A9C187:
	LDA.w $0004,y
	BEQ.b CODE_A9C190
	STA.l $7F1400,x
CODE_A9C190:
	LDA.w $0005,y
	BEQ.b CODE_A9C199
	STA.l $7F1480,x
CODE_A9C199:
	LDA.w $0006,y
	BEQ.b CODE_A9C1A2
	STA.l $7F1500,x
CODE_A9C1A2:
	LDA.w $0007,y
	BEQ.b CODE_A9C1AB
	STA.l $7F1580,x
CODE_A9C1AB:
	LDA.w $0009,y
	BEQ.b CODE_A9C1B4
	STA.l $7F1600,x
CODE_A9C1B4:
	LDA.w $000A,y
	BEQ.b CODE_A9C1BD
	STA.l $7F1680,x
CODE_A9C1BD:
	LDA.w $000B,y
	BEQ.b CODE_A9C1C6
	STA.l $7F1700,x
CODE_A9C1C6:
	LDA.w $000C,y
	BEQ.b CODE_A9C1CF
	STA.l $7F1780,x
CODE_A9C1CF:
	LDA.w $000D,y
	BEQ.b CODE_A9C1D8
	STA.l $7F1800,x
CODE_A9C1D8:
	LDA.w $000E,y
	BEQ.b CODE_A9C1E1
	STA.l $7F1880,x
CODE_A9C1E1:
	LDA.w $000F,y
	BEQ.b CODE_A9C1EA
	STA.l $7F1900,x
CODE_A9C1EA:
	LDA.w $0011,y
	BEQ.b CODE_A9C1F3
	STA.l $7F1980,x
CODE_A9C1F3:
	LDA.w $0012,y
	BEQ.b CODE_A9C1FC
	STA.l $7F1A00,x
CODE_A9C1FC:
	LDA.w $0013,y
	BEQ.b CODE_A9C205
	STA.l $7F1A80,x
CODE_A9C205:
	LDA.w $0014,y
	BEQ.b CODE_A9C20E
	STA.l $7F1B00,x
CODE_A9C20E:
	LDA.w $0015,y
	BEQ.b CODE_A9C217
	STA.l $7F1B80,x
CODE_A9C217:
	LDA.w $0016,y
	BEQ.b CODE_A9C220
	STA.l $7F1C00,x
CODE_A9C220:
	LDA.w $0017,y
	BEQ.b CODE_A9C229
	STA.l $7F1C80,x
CODE_A9C229:
	LDA.w $0019,y
	BEQ.b CODE_A9C232
	STA.l $7F1D00,x
CODE_A9C232:
	LDA.w $001A,y
	BEQ.b CODE_A9C23B
	STA.l $7F1D80,x
CODE_A9C23B:
	LDA.w $001B,y
	BEQ.b CODE_A9C244
	STA.l $7F1E00,x
CODE_A9C244:
	LDA.w $001C,y
	BEQ.b CODE_A9C24D
	STA.l $7F1E80,x
CODE_A9C24D:
	LDA.w $001D,y
	BEQ.b CODE_A9C256
	STA.l $7F1F00,x
CODE_A9C256:
	LDA.w $001E,y
	BEQ.b CODE_A9C25F
	STA.l $7F1F80,x
CODE_A9C25F:
	LDA.w $001F,y
	BEQ.b CODE_A9C268
	STA.l $7F2000,x
CODE_A9C268:
	LDA.w $0021,y
	BEQ.b CODE_A9C271
	STA.l $7F2080,x
CODE_A9C271:
	LDA.w $0022,y
	BEQ.b CODE_A9C27A
	STA.l $7F2100,x
CODE_A9C27A:
	LDA.w $0023,y
	BEQ.b CODE_A9C283
	STA.l $7F2180,x
CODE_A9C283:
	LDA.w $0024,y
	BEQ.b CODE_A9C28C
	STA.l $7F2200,x
CODE_A9C28C:
	LDA.w $0025,y
	BEQ.b CODE_A9C295
	STA.l $7F2280,x
CODE_A9C295:
	LDA.w $0026,y
	BEQ.b CODE_A9C29E
	STA.l $7F2300,x
CODE_A9C29E:
	LDA.w $0027,y
	BEQ.b CODE_A9C2A7
	STA.l $7F2380,x
CODE_A9C2A7:
	LDA.w $0029,y
	BEQ.b CODE_A9C2B0
	STA.l $7F2400,x
CODE_A9C2B0:
	LDA.w $002A,y
	BEQ.b CODE_A9C2B9
	STA.l $7F2480,x
CODE_A9C2B9:
	LDA.w $002B,y
	BEQ.b CODE_A9C2C2
	STA.l $7F2500,x
CODE_A9C2C2:
	LDA.w $002C,y
	BEQ.b CODE_A9C2CB
	STA.l $7F2580,x
CODE_A9C2CB:
	LDA.w $002D,y
	BEQ.b CODE_A9C2D4
	STA.l $7F2600,x
CODE_A9C2D4:
	LDA.w $002E,y
	BEQ.b CODE_A9C2DD
	STA.l $7F2680,x
CODE_A9C2DD:
	LDA.w $002F,y
	BEQ.b CODE_A9C2E6
	STA.l $7F2700,x
CODE_A9C2E6:
	LDA.w $0031,y
	BEQ.b CODE_A9C2EF
	STA.l $7F2780,x
CODE_A9C2EF:
	LDA.w $0032,y
	BEQ.b CODE_A9C2F8
	STA.l $7F2800,x
CODE_A9C2F8:
	LDA.w $0033,y
	BEQ.b CODE_A9C301
	STA.l $7F2880,x
CODE_A9C301:
	LDA.w $0034,y
	BEQ.b CODE_A9C30A
	STA.l $7F2900,x
CODE_A9C30A:
	LDA.w $0035,y
	BEQ.b CODE_A9C313
	STA.l $7F2980,x
CODE_A9C313:
	LDA.w $0036,y
	BEQ.b CODE_A9C31C
	STA.l $7F2A00,x
CODE_A9C31C:
	LDA.w $0037,y
	BEQ.b CODE_A9C325
	STA.l $7F2A80,x
CODE_A9C325:
	LDA.w $0039,y
	BEQ.b CODE_A9C32E
	STA.l $7F2B00,x
CODE_A9C32E:
	LDA.w $003A,y
	BEQ.b CODE_A9C337
	STA.l $7F2B80,x
CODE_A9C337:
	LDA.w $003B,y
	BEQ.b CODE_A9C340
	STA.l $7F2C00,x
CODE_A9C340:
	LDA.w $003C,y
	BEQ.b CODE_A9C349
	STA.l $7F2C80,x
CODE_A9C349:
	LDA.w $003D,y
	BEQ.b CODE_A9C352
	STA.l $7F2D00,x
CODE_A9C352:
	LDA.w $003E,y
	BEQ.b CODE_A9C35B
	STA.l $7F2D80,x
CODE_A9C35B:
	REP.b #$20
	RTL

CODE_A9C35E:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9C369
	STA.l $7F1180,x
CODE_A9C369:
	LDA.w $0001,y
	BEQ.b CODE_A9C372
	STA.l $7F1200,x
CODE_A9C372:
	LDA.w $0002,y
	BEQ.b CODE_A9C37B
	STA.l $7F1280,x
CODE_A9C37B:
	LDA.w $0003,y
	BEQ.b CODE_A9C384
	STA.l $7F1300,x
CODE_A9C384:
	LDA.w $0004,y
	BEQ.b CODE_A9C38D
	STA.l $7F1380,x
CODE_A9C38D:
	LDA.w $0005,y
	BEQ.b CODE_A9C396
	STA.l $7F1400,x
CODE_A9C396:
	LDA.w $0006,y
	BEQ.b CODE_A9C39F
	STA.l $7F1480,x
CODE_A9C39F:
	LDA.w $0007,y
	BEQ.b CODE_A9C3A8
	STA.l $7F1500,x
CODE_A9C3A8:
	LDA.w $0008,y
	BEQ.b CODE_A9C3B1
	STA.l $7F1580,x
CODE_A9C3B1:
	LDA.w $0009,y
	BEQ.b CODE_A9C3BA
	STA.l $7F1600,x
CODE_A9C3BA:
	LDA.w $000B,y
	BEQ.b CODE_A9C3C3
	STA.l $7F1680,x
CODE_A9C3C3:
	LDA.w $000C,y
	BEQ.b CODE_A9C3CC
	STA.l $7F1700,x
CODE_A9C3CC:
	LDA.w $000D,y
	BEQ.b CODE_A9C3D5
	STA.l $7F1780,x
CODE_A9C3D5:
	LDA.w $000E,y
	BEQ.b CODE_A9C3DE
	STA.l $7F1800,x
CODE_A9C3DE:
	LDA.w $000F,y
	BEQ.b CODE_A9C3E7
	STA.l $7F1880,x
CODE_A9C3E7:
	LDA.w $0010,y
	BEQ.b CODE_A9C3F0
	STA.l $7F1900,x
CODE_A9C3F0:
	LDA.w $0011,y
	BEQ.b CODE_A9C3F9
	STA.l $7F1980,x
CODE_A9C3F9:
	LDA.w $0012,y
	BEQ.b CODE_A9C402
	STA.l $7F1A00,x
CODE_A9C402:
	LDA.w $0013,y
	BEQ.b CODE_A9C40B
	STA.l $7F1A80,x
CODE_A9C40B:
	LDA.w $0014,y
	BEQ.b CODE_A9C414
	STA.l $7F1B00,x
CODE_A9C414:
	LDA.w $0016,y
	BEQ.b CODE_A9C41D
	STA.l $7F1B80,x
CODE_A9C41D:
	LDA.w $0017,y
	BEQ.b CODE_A9C426
	STA.l $7F1C00,x
CODE_A9C426:
	LDA.w $0018,y
	BEQ.b CODE_A9C42F
	STA.l $7F1C80,x
CODE_A9C42F:
	LDA.w $0019,y
	BEQ.b CODE_A9C438
	STA.l $7F1D00,x
CODE_A9C438:
	LDA.w $001A,y
	BEQ.b CODE_A9C441
	STA.l $7F1D80,x
CODE_A9C441:
	LDA.w $001B,y
	BEQ.b CODE_A9C44A
	STA.l $7F1E00,x
CODE_A9C44A:
	LDA.w $001C,y
	BEQ.b CODE_A9C453
	STA.l $7F1E80,x
CODE_A9C453:
	LDA.w $001D,y
	BEQ.b CODE_A9C45C
	STA.l $7F1F00,x
CODE_A9C45C:
	LDA.w $001E,y
	BEQ.b CODE_A9C465
	STA.l $7F1F80,x
CODE_A9C465:
	LDA.w $001F,y
	BEQ.b CODE_A9C46E
	STA.l $7F2000,x
CODE_A9C46E:
	LDA.w $0021,y
	BEQ.b CODE_A9C477
	STA.l $7F2080,x
CODE_A9C477:
	LDA.w $0022,y
	BEQ.b CODE_A9C480
	STA.l $7F2100,x
CODE_A9C480:
	LDA.w $0023,y
	BEQ.b CODE_A9C489
	STA.l $7F2180,x
CODE_A9C489:
	LDA.w $0024,y
	BEQ.b CODE_A9C492
	STA.l $7F2200,x
CODE_A9C492:
	LDA.w $0025,y
	BEQ.b CODE_A9C49B
	STA.l $7F2280,x
CODE_A9C49B:
	LDA.w $0026,y
	BEQ.b CODE_A9C4A4
	STA.l $7F2300,x
CODE_A9C4A4:
	LDA.w $0027,y
	BEQ.b CODE_A9C4AD
	STA.l $7F2380,x
CODE_A9C4AD:
	LDA.w $0028,y
	BEQ.b CODE_A9C4B6
	STA.l $7F2400,x
CODE_A9C4B6:
	LDA.w $0029,y
	BEQ.b CODE_A9C4BF
	STA.l $7F2480,x
CODE_A9C4BF:
	LDA.w $002A,y
	BEQ.b CODE_A9C4C8
	STA.l $7F2500,x
CODE_A9C4C8:
	LDA.w $002C,y
	BEQ.b CODE_A9C4D1
	STA.l $7F2580,x
CODE_A9C4D1:
	LDA.w $002D,y
	BEQ.b CODE_A9C4DA
	STA.l $7F2600,x
CODE_A9C4DA:
	LDA.w $002E,y
	BEQ.b CODE_A9C4E3
	STA.l $7F2680,x
CODE_A9C4E3:
	LDA.w $002F,y
	BEQ.b CODE_A9C4EC
	STA.l $7F2700,x
CODE_A9C4EC:
	LDA.w $0030,y
	BEQ.b CODE_A9C4F5
	STA.l $7F2780,x
CODE_A9C4F5:
	LDA.w $0031,y
	BEQ.b CODE_A9C4FE
	STA.l $7F2800,x
CODE_A9C4FE:
	LDA.w $0032,y
	BEQ.b CODE_A9C507
	STA.l $7F2880,x
CODE_A9C507:
	LDA.w $0033,y
	BEQ.b CODE_A9C510
	STA.l $7F2900,x
CODE_A9C510:
	LDA.w $0034,y
	BEQ.b CODE_A9C519
	STA.l $7F2980,x
CODE_A9C519:
	LDA.w $0035,y
	BEQ.b CODE_A9C522
	STA.l $7F2A00,x
CODE_A9C522:
	LDA.w $0037,y
	BEQ.b CODE_A9C52B
	STA.l $7F2A80,x
CODE_A9C52B:
	LDA.w $0038,y
	BEQ.b CODE_A9C534
	STA.l $7F2B00,x
CODE_A9C534:
	LDA.w $0039,y
	BEQ.b CODE_A9C53D
	STA.l $7F2B80,x
CODE_A9C53D:
	LDA.w $003A,y
	BEQ.b CODE_A9C546
	STA.l $7F2C00,x
CODE_A9C546:
	LDA.w $003B,y
	BEQ.b CODE_A9C54F
	STA.l $7F2C80,x
CODE_A9C54F:
	LDA.w $003C,y
	BEQ.b CODE_A9C558
	STA.l $7F2D00,x
CODE_A9C558:
	LDA.w $003D,y
	BEQ.b CODE_A9C561
	STA.l $7F2D80,x
CODE_A9C561:
	LDA.w $003E,y
	BEQ.b CODE_A9C56A
	STA.l $7F2E00,x
CODE_A9C56A:
	REP.b #$20
	RTL

CODE_A9C56D:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9C578
	STA.l $7F1100,x
CODE_A9C578:
	LDA.w $0001,y
	BEQ.b CODE_A9C581
	STA.l $7F1180,x
CODE_A9C581:
	LDA.w $0002,y
	BEQ.b CODE_A9C58A
	STA.l $7F1200,x
CODE_A9C58A:
	LDA.w $0003,y
	BEQ.b CODE_A9C593
	STA.l $7F1280,x
CODE_A9C593:
	LDA.w $0004,y
	BEQ.b CODE_A9C59C
	STA.l $7F1300,x
CODE_A9C59C:
	LDA.w $0005,y
	BEQ.b CODE_A9C5A5
	STA.l $7F1380,x
CODE_A9C5A5:
	LDA.w $0006,y
	BEQ.b CODE_A9C5AE
	STA.l $7F1400,x
CODE_A9C5AE:
	LDA.w $0007,y
	BEQ.b CODE_A9C5B7
	STA.l $7F1480,x
CODE_A9C5B7:
	LDA.w $0008,y
	BEQ.b CODE_A9C5C0
	STA.l $7F1500,x
CODE_A9C5C0:
	LDA.w $0009,y
	BEQ.b CODE_A9C5C9
	STA.l $7F1580,x
CODE_A9C5C9:
	LDA.w $000A,y
	BEQ.b CODE_A9C5D2
	STA.l $7F1600,x
CODE_A9C5D2:
	LDA.w $000B,y
	BEQ.b CODE_A9C5DB
	STA.l $7F1680,x
CODE_A9C5DB:
	LDA.w $000C,y
	BEQ.b CODE_A9C5E4
	STA.l $7F1700,x
CODE_A9C5E4:
	LDA.w $000D,y
	BEQ.b CODE_A9C5ED
	STA.l $7F1780,x
CODE_A9C5ED:
	LDA.w $000E,y
	BEQ.b CODE_A9C5F6
	STA.l $7F1800,x
CODE_A9C5F6:
	LDA.w $000F,y
	BEQ.b CODE_A9C5FF
	STA.l $7F1880,x
CODE_A9C5FF:
	LDA.w $0011,y
	BEQ.b CODE_A9C608
	STA.l $7F1900,x
CODE_A9C608:
	LDA.w $0012,y
	BEQ.b CODE_A9C611
	STA.l $7F1980,x
CODE_A9C611:
	LDA.w $0013,y
	BEQ.b CODE_A9C61A
	STA.l $7F1A00,x
CODE_A9C61A:
	LDA.w $0014,y
	BEQ.b CODE_A9C623
	STA.l $7F1A80,x
CODE_A9C623:
	LDA.w $0015,y
	BEQ.b CODE_A9C62C
	STA.l $7F1B00,x
CODE_A9C62C:
	LDA.w $0016,y
	BEQ.b CODE_A9C635
	STA.l $7F1B80,x
CODE_A9C635:
	LDA.w $0017,y
	BEQ.b CODE_A9C63E
	STA.l $7F1C00,x
CODE_A9C63E:
	LDA.w $0018,y
	BEQ.b CODE_A9C647
	STA.l $7F1C80,x
CODE_A9C647:
	LDA.w $0019,y
	BEQ.b CODE_A9C650
	STA.l $7F1D00,x
CODE_A9C650:
	LDA.w $001A,y
	BEQ.b CODE_A9C659
	STA.l $7F1D80,x
CODE_A9C659:
	LDA.w $001B,y
	BEQ.b CODE_A9C662
	STA.l $7F1E00,x
CODE_A9C662:
	LDA.w $001C,y
	BEQ.b CODE_A9C66B
	STA.l $7F1E80,x
CODE_A9C66B:
	LDA.w $001D,y
	BEQ.b CODE_A9C674
	STA.l $7F1F00,x
CODE_A9C674:
	LDA.w $001E,y
	BEQ.b CODE_A9C67D
	STA.l $7F1F80,x
CODE_A9C67D:
	LDA.w $001F,y
	BEQ.b CODE_A9C686
	STA.l $7F2000,x
CODE_A9C686:
	LDA.w $0021,y
	BEQ.b CODE_A9C68F
	STA.l $7F2080,x
CODE_A9C68F:
	LDA.w $0022,y
	BEQ.b CODE_A9C698
	STA.l $7F2100,x
CODE_A9C698:
	LDA.w $0023,y
	BEQ.b CODE_A9C6A1
	STA.l $7F2180,x
CODE_A9C6A1:
	LDA.w $0024,y
	BEQ.b CODE_A9C6AA
	STA.l $7F2200,x
CODE_A9C6AA:
	LDA.w $0025,y
	BEQ.b CODE_A9C6B3
	STA.l $7F2280,x
CODE_A9C6B3:
	LDA.w $0026,y
	BEQ.b CODE_A9C6BC
	STA.l $7F2300,x
CODE_A9C6BC:
	LDA.w $0027,y
	BEQ.b CODE_A9C6C5
	STA.l $7F2380,x
CODE_A9C6C5:
	LDA.w $0028,y
	BEQ.b CODE_A9C6CE
	STA.l $7F2400,x
CODE_A9C6CE:
	LDA.w $0029,y
	BEQ.b CODE_A9C6D7
	STA.l $7F2480,x
CODE_A9C6D7:
	LDA.w $002A,y
	BEQ.b CODE_A9C6E0
	STA.l $7F2500,x
CODE_A9C6E0:
	LDA.w $002B,y
	BEQ.b CODE_A9C6E9
	STA.l $7F2580,x
CODE_A9C6E9:
	LDA.w $002C,y
	BEQ.b CODE_A9C6F2
	STA.l $7F2600,x
CODE_A9C6F2:
	LDA.w $002D,y
	BEQ.b CODE_A9C6FB
	STA.l $7F2680,x
CODE_A9C6FB:
	LDA.w $002E,y
	BEQ.b CODE_A9C704
	STA.l $7F2700,x
CODE_A9C704:
	LDA.w $002F,y
	BEQ.b CODE_A9C70D
	STA.l $7F2780,x
CODE_A9C70D:
	LDA.w $0031,y
	BEQ.b CODE_A9C716
	STA.l $7F2800,x
CODE_A9C716:
	LDA.w $0032,y
	BEQ.b CODE_A9C71F
	STA.l $7F2880,x
CODE_A9C71F:
	LDA.w $0033,y
	BEQ.b CODE_A9C728
	STA.l $7F2900,x
CODE_A9C728:
	LDA.w $0034,y
	BEQ.b CODE_A9C731
	STA.l $7F2980,x
CODE_A9C731:
	LDA.w $0035,y
	BEQ.b CODE_A9C73A
	STA.l $7F2A00,x
CODE_A9C73A:
	LDA.w $0036,y
	BEQ.b CODE_A9C743
	STA.l $7F2A80,x
CODE_A9C743:
	LDA.w $0037,y
	BEQ.b CODE_A9C74C
	STA.l $7F2B00,x
CODE_A9C74C:
	LDA.w $0038,y
	BEQ.b CODE_A9C755
	STA.l $7F2B80,x
CODE_A9C755:
	LDA.w $0039,y
	BEQ.b CODE_A9C75E
	STA.l $7F2C00,x
CODE_A9C75E:
	LDA.w $003A,y
	BEQ.b CODE_A9C767
	STA.l $7F2C80,x
CODE_A9C767:
	LDA.w $003B,y
	BEQ.b CODE_A9C770
	STA.l $7F2D00,x
CODE_A9C770:
	LDA.w $003C,y
	BEQ.b CODE_A9C779
	STA.l $7F2D80,x
CODE_A9C779:
	LDA.w $003D,y
	BEQ.b CODE_A9C782
	STA.l $7F2E00,x
CODE_A9C782:
	LDA.w $003E,y
	BEQ.b CODE_A9C78B
	STA.l $7F2E80,x
CODE_A9C78B:
	REP.b #$20
	RTL

CODE_A9C78E:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9C799
	STA.l $7F1080,x
CODE_A9C799:
	LDA.w $0001,y
	BEQ.b CODE_A9C7A2
	STA.l $7F1100,x
CODE_A9C7A2:
	LDA.w $0002,y
	BEQ.b CODE_A9C7AB
	STA.l $7F1180,x
CODE_A9C7AB:
	LDA.w $0003,y
	BEQ.b CODE_A9C7B4
	STA.l $7F1200,x
CODE_A9C7B4:
	LDA.w $0004,y
	BEQ.b CODE_A9C7BD
	STA.l $7F1280,x
CODE_A9C7BD:
	LDA.w $0005,y
	BEQ.b CODE_A9C7C6
	STA.l $7F1300,x
CODE_A9C7C6:
	LDA.w $0006,y
	BEQ.b CODE_A9C7CF
	STA.l $7F1380,x
CODE_A9C7CF:
	LDA.w $0007,y
	BEQ.b CODE_A9C7D8
	STA.l $7F1400,x
CODE_A9C7D8:
	LDA.w $0008,y
	BEQ.b CODE_A9C7E1
	STA.l $7F1480,x
CODE_A9C7E1:
	LDA.w $0009,y
	BEQ.b CODE_A9C7EA
	STA.l $7F1500,x
CODE_A9C7EA:
	LDA.w $000A,y
	BEQ.b CODE_A9C7F3
	STA.l $7F1580,x
CODE_A9C7F3:
	LDA.w $000B,y
	BEQ.b CODE_A9C7FC
	STA.l $7F1600,x
CODE_A9C7FC:
	LDA.w $000C,y
	BEQ.b CODE_A9C805
	STA.l $7F1680,x
CODE_A9C805:
	LDA.w $000D,y
	BEQ.b CODE_A9C80E
	STA.l $7F1700,x
CODE_A9C80E:
	LDA.w $000E,y
	BEQ.b CODE_A9C817
	STA.l $7F1780,x
CODE_A9C817:
	LDA.w $000F,y
	BEQ.b CODE_A9C820
	STA.l $7F1800,x
CODE_A9C820:
	LDA.w $0010,y
	BEQ.b CODE_A9C829
	STA.l $7F1880,x
CODE_A9C829:
	LDA.w $0011,y
	BEQ.b CODE_A9C832
	STA.l $7F1900,x
CODE_A9C832:
	LDA.w $0012,y
	BEQ.b CODE_A9C83B
	STA.l $7F1980,x
CODE_A9C83B:
	LDA.w $0013,y
	BEQ.b CODE_A9C844
	STA.l $7F1A00,x
CODE_A9C844:
	LDA.w $0014,y
	BEQ.b CODE_A9C84D
	STA.l $7F1A80,x
CODE_A9C84D:
	LDA.w $0015,y
	BEQ.b CODE_A9C856
	STA.l $7F1B00,x
CODE_A9C856:
	LDA.w $0016,y
	BEQ.b CODE_A9C85F
	STA.l $7F1B80,x
CODE_A9C85F:
	LDA.w $0017,y
	BEQ.b CODE_A9C868
	STA.l $7F1C00,x
CODE_A9C868:
	LDA.w $0018,y
	BEQ.b CODE_A9C871
	STA.l $7F1C80,x
CODE_A9C871:
	LDA.w $0019,y
	BEQ.b CODE_A9C87A
	STA.l $7F1D00,x
CODE_A9C87A:
	LDA.w $001A,y
	BEQ.b CODE_A9C883
	STA.l $7F1D80,x
CODE_A9C883:
	LDA.w $001B,y
	BEQ.b CODE_A9C88C
	STA.l $7F1E00,x
CODE_A9C88C:
	LDA.w $001C,y
	BEQ.b CODE_A9C895
	STA.l $7F1E80,x
CODE_A9C895:
	LDA.w $001D,y
	BEQ.b CODE_A9C89E
	STA.l $7F1F00,x
CODE_A9C89E:
	LDA.w $001E,y
	BEQ.b CODE_A9C8A7
	STA.l $7F1F80,x
CODE_A9C8A7:
	LDA.w $001F,y
	BEQ.b CODE_A9C8B0
	STA.l $7F2000,x
CODE_A9C8B0:
	LDA.w $0021,y
	BEQ.b CODE_A9C8B9
	STA.l $7F2080,x
CODE_A9C8B9:
	LDA.w $0022,y
	BEQ.b CODE_A9C8C2
	STA.l $7F2100,x
CODE_A9C8C2:
	LDA.w $0023,y
	BEQ.b CODE_A9C8CB
	STA.l $7F2180,x
CODE_A9C8CB:
	LDA.w $0024,y
	BEQ.b CODE_A9C8D4
	STA.l $7F2200,x
CODE_A9C8D4:
	LDA.w $0025,y
	BEQ.b CODE_A9C8DD
	STA.l $7F2280,x
CODE_A9C8DD:
	LDA.w $0026,y
	BEQ.b CODE_A9C8E6
	STA.l $7F2300,x
CODE_A9C8E6:
	LDA.w $0027,y
	BEQ.b CODE_A9C8EF
	STA.l $7F2380,x
CODE_A9C8EF:
	LDA.w $0028,y
	BEQ.b CODE_A9C8F8
	STA.l $7F2400,x
CODE_A9C8F8:
	LDA.w $0029,y
	BEQ.b CODE_A9C901
	STA.l $7F2480,x
CODE_A9C901:
	LDA.w $002A,y
	BEQ.b CODE_A9C90A
	STA.l $7F2500,x
CODE_A9C90A:
	LDA.w $002B,y
	BEQ.b CODE_A9C913
	STA.l $7F2580,x
CODE_A9C913:
	LDA.w $002C,y
	BEQ.b CODE_A9C91C
	STA.l $7F2600,x
CODE_A9C91C:
	LDA.w $002D,y
	BEQ.b CODE_A9C925
	STA.l $7F2680,x
CODE_A9C925:
	LDA.w $002E,y
	BEQ.b CODE_A9C92E
	STA.l $7F2700,x
CODE_A9C92E:
	LDA.w $002F,y
	BEQ.b CODE_A9C937
	STA.l $7F2780,x
CODE_A9C937:
	LDA.w $0030,y
	BEQ.b CODE_A9C940
	STA.l $7F2800,x
CODE_A9C940:
	LDA.w $0031,y
	BEQ.b CODE_A9C949
	STA.l $7F2880,x
CODE_A9C949:
	LDA.w $0032,y
	BEQ.b CODE_A9C952
	STA.l $7F2900,x
CODE_A9C952:
	LDA.w $0033,y
	BEQ.b CODE_A9C95B
	STA.l $7F2980,x
CODE_A9C95B:
	LDA.w $0034,y
	BEQ.b CODE_A9C964
	STA.l $7F2A00,x
CODE_A9C964:
	LDA.w $0035,y
	BEQ.b CODE_A9C96D
	STA.l $7F2A80,x
CODE_A9C96D:
	LDA.w $0036,y
	BEQ.b CODE_A9C976
	STA.l $7F2B00,x
CODE_A9C976:
	LDA.w $0037,y
	BEQ.b CODE_A9C97F
	STA.l $7F2B80,x
CODE_A9C97F:
	LDA.w $0038,y
	BEQ.b CODE_A9C988
	STA.l $7F2C00,x
CODE_A9C988:
	LDA.w $0039,y
	BEQ.b CODE_A9C991
	STA.l $7F2C80,x
CODE_A9C991:
	LDA.w $003A,y
	BEQ.b CODE_A9C99A
	STA.l $7F2D00,x
CODE_A9C99A:
	LDA.w $003B,y
	BEQ.b CODE_A9C9A3
	STA.l $7F2D80,x
CODE_A9C9A3:
	LDA.w $003C,y
	BEQ.b CODE_A9C9AC
	STA.l $7F2E00,x
CODE_A9C9AC:
	LDA.w $003D,y
	BEQ.b CODE_A9C9B5
	STA.l $7F2E80,x
CODE_A9C9B5:
	LDA.w $003E,y
	BEQ.b CODE_A9C9BE
	STA.l $7F2F00,x
CODE_A9C9BE:
	REP.b #$20
	RTL

CODE_A9C9C1:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9C9CC
	STA.l $7F1000,x
CODE_A9C9CC:
	LDA.w $0001,y
	BEQ.b CODE_A9C9D5
	STA.l $7F1080,x
CODE_A9C9D5:
	LDA.w $0002,y
	BEQ.b CODE_A9C9DE
	STA.l $7F1100,x
CODE_A9C9DE:
	LDA.w $0003,y
	BEQ.b CODE_A9C9E7
	STA.l $7F1180,x
CODE_A9C9E7:
	LDA.w $0004,y
	BEQ.b CODE_A9C9F0
	STA.l $7F1200,x
CODE_A9C9F0:
	LDA.w $0005,y
	BEQ.b CODE_A9C9F9
	STA.l $7F1280,x
CODE_A9C9F9:
	LDA.w $0006,y
	BEQ.b CODE_A9CA02
	STA.l $7F1300,x
CODE_A9CA02:
	LDA.w $0007,y
	BEQ.b CODE_A9CA0B
	STA.l $7F1380,x
CODE_A9CA0B:
	LDA.w $0008,y
	BEQ.b CODE_A9CA14
	STA.l $7F1400,x
CODE_A9CA14:
	LDA.w $0009,y
	BEQ.b CODE_A9CA1D
	STA.l $7F1480,x
CODE_A9CA1D:
	LDA.w $000A,y
	BEQ.b CODE_A9CA26
	STA.l $7F1500,x
CODE_A9CA26:
	LDA.w $000B,y
	BEQ.b CODE_A9CA2F
	STA.l $7F1580,x
CODE_A9CA2F:
	LDA.w $000C,y
	BEQ.b CODE_A9CA38
	STA.l $7F1600,x
CODE_A9CA38:
	LDA.w $000D,y
	BEQ.b CODE_A9CA41
	STA.l $7F1680,x
CODE_A9CA41:
	LDA.w $000E,y
	BEQ.b CODE_A9CA4A
	STA.l $7F1700,x
CODE_A9CA4A:
	LDA.w $000F,y
	BEQ.b CODE_A9CA53
	STA.l $7F1780,x
CODE_A9CA53:
	LDA.w $0010,y
	BEQ.b CODE_A9CA5C
	STA.l $7F1800,x
CODE_A9CA5C:
	LDA.w $0011,y
	BEQ.b CODE_A9CA65
	STA.l $7F1880,x
CODE_A9CA65:
	LDA.w $0012,y
	BEQ.b CODE_A9CA6E
	STA.l $7F1900,x
CODE_A9CA6E:
	LDA.w $0013,y
	BEQ.b CODE_A9CA77
	STA.l $7F1980,x
CODE_A9CA77:
	LDA.w $0014,y
	BEQ.b CODE_A9CA80
	STA.l $7F1A00,x
CODE_A9CA80:
	LDA.w $0015,y
	BEQ.b CODE_A9CA89
	STA.l $7F1A80,x
CODE_A9CA89:
	LDA.w $0016,y
	BEQ.b CODE_A9CA92
	STA.l $7F1B00,x
CODE_A9CA92:
	LDA.w $0017,y
	BEQ.b CODE_A9CA9B
	STA.l $7F1B80,x
CODE_A9CA9B:
	LDA.w $0018,y
	BEQ.b CODE_A9CAA4
	STA.l $7F1C00,x
CODE_A9CAA4:
	LDA.w $0019,y
	BEQ.b CODE_A9CAAD
	STA.l $7F1C80,x
CODE_A9CAAD:
	LDA.w $001A,y
	BEQ.b CODE_A9CAB6
	STA.l $7F1D00,x
CODE_A9CAB6:
	LDA.w $001B,y
	BEQ.b CODE_A9CABF
	STA.l $7F1D80,x
CODE_A9CABF:
	LDA.w $001C,y
	BEQ.b CODE_A9CAC8
	STA.l $7F1E00,x
CODE_A9CAC8:
	LDA.w $001D,y
	BEQ.b CODE_A9CAD1
	STA.l $7F1E80,x
CODE_A9CAD1:
	LDA.w $001E,y
	BEQ.b CODE_A9CADA
	STA.l $7F1F00,x
CODE_A9CADA:
	LDA.w $001F,y
	BEQ.b CODE_A9CAE3
	STA.l $7F1F80,x
CODE_A9CAE3:
	LDA.w $0020,y
	BEQ.b CODE_A9CAEC
	STA.l $7F2000,x
CODE_A9CAEC:
	LDA.w $0021,y
	BEQ.b CODE_A9CAF5
	STA.l $7F2080,x
CODE_A9CAF5:
	LDA.w $0022,y
	BEQ.b CODE_A9CAFE
	STA.l $7F2100,x
CODE_A9CAFE:
	LDA.w $0023,y
	BEQ.b CODE_A9CB07
	STA.l $7F2180,x
CODE_A9CB07:
	LDA.w $0024,y
	BEQ.b CODE_A9CB10
	STA.l $7F2200,x
CODE_A9CB10:
	LDA.w $0025,y
	BEQ.b CODE_A9CB19
	STA.l $7F2280,x
CODE_A9CB19:
	LDA.w $0026,y
	BEQ.b CODE_A9CB22
	STA.l $7F2300,x
CODE_A9CB22:
	LDA.w $0027,y
	BEQ.b CODE_A9CB2B
	STA.l $7F2380,x
CODE_A9CB2B:
	LDA.w $0028,y
	BEQ.b CODE_A9CB34
	STA.l $7F2400,x
CODE_A9CB34:
	LDA.w $0029,y
	BEQ.b CODE_A9CB3D
	STA.l $7F2480,x
CODE_A9CB3D:
	LDA.w $002A,y
	BEQ.b CODE_A9CB46
	STA.l $7F2500,x
CODE_A9CB46:
	LDA.w $002B,y
	BEQ.b CODE_A9CB4F
	STA.l $7F2580,x
CODE_A9CB4F:
	LDA.w $002C,y
	BEQ.b CODE_A9CB58
	STA.l $7F2600,x
CODE_A9CB58:
	LDA.w $002D,y
	BEQ.b CODE_A9CB61
	STA.l $7F2680,x
CODE_A9CB61:
	LDA.w $002E,y
	BEQ.b CODE_A9CB6A
	STA.l $7F2700,x
CODE_A9CB6A:
	LDA.w $002F,y
	BEQ.b CODE_A9CB73
	STA.l $7F2780,x
CODE_A9CB73:
	LDA.w $0030,y
	BEQ.b CODE_A9CB7C
	STA.l $7F2800,x
CODE_A9CB7C:
	LDA.w $0031,y
	BEQ.b CODE_A9CB85
	STA.l $7F2880,x
CODE_A9CB85:
	LDA.w $0032,y
	BEQ.b CODE_A9CB8E
	STA.l $7F2900,x
CODE_A9CB8E:
	LDA.w $0033,y
	BEQ.b CODE_A9CB97
	STA.l $7F2980,x
CODE_A9CB97:
	LDA.w $0034,y
	BEQ.b CODE_A9CBA0
	STA.l $7F2A00,x
CODE_A9CBA0:
	LDA.w $0035,y
	BEQ.b CODE_A9CBA9
	STA.l $7F2A80,x
CODE_A9CBA9:
	LDA.w $0036,y
	BEQ.b CODE_A9CBB2
	STA.l $7F2B00,x
CODE_A9CBB2:
	LDA.w $0037,y
	BEQ.b CODE_A9CBBB
	STA.l $7F2B80,x
CODE_A9CBBB:
	LDA.w $0038,y
	BEQ.b CODE_A9CBC4
	STA.l $7F2C00,x
CODE_A9CBC4:
	LDA.w $0039,y
	BEQ.b CODE_A9CBCD
	STA.l $7F2C80,x
CODE_A9CBCD:
	LDA.w $003A,y
	BEQ.b CODE_A9CBD6
	STA.l $7F2D00,x
CODE_A9CBD6:
	LDA.w $003B,y
	BEQ.b CODE_A9CBDF
	STA.l $7F2D80,x
CODE_A9CBDF:
	LDA.w $003C,y
	BEQ.b CODE_A9CBE8
	STA.l $7F2E00,x
CODE_A9CBE8:
	LDA.w $003D,y
	BEQ.b CODE_A9CBF1
	STA.l $7F2E80,x
CODE_A9CBF1:
	LDA.w $003E,y
	BEQ.b CODE_A9CBFA
	STA.l $7F2F00,x
CODE_A9CBFA:
	LDA.w $003F,y
	BEQ.b CODE_A9CC03
	STA.l $7F2F80,x
CODE_A9CC03:
	REP.b #$20
	RTL

CODE_A9CC06:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9CC15
	STA.l $7F0F80,x
CODE_A9CC11:
	STA.l $7F1000,x
CODE_A9CC15:
	LDA.w $0001,y
	BEQ.b CODE_A9CC1E
	STA.l $7F1080,x
CODE_A9CC1E:
	LDA.w $0002,y
	BEQ.b CODE_A9CC27
	STA.l $7F1100,x
CODE_A9CC27:
	LDA.w $0003,y
	BEQ.b CODE_A9CC30
	STA.l $7F1180,x
CODE_A9CC30:
	LDA.w $0004,y
	BEQ.b CODE_A9CC39
	STA.l $7F1200,x
CODE_A9CC39:
	LDA.w $0005,y
	BEQ.b CODE_A9CC42
	STA.l $7F1280,x
CODE_A9CC42:
	LDA.w $0006,y
	BEQ.b CODE_A9CC4B
	STA.l $7F1300,x
CODE_A9CC4B:
	LDA.w $0007,y
	BEQ.b CODE_A9CC54
	STA.l $7F1380,x
CODE_A9CC54:
	LDA.w $0008,y
	BEQ.b CODE_A9CC5D
	STA.l $7F1400,x
CODE_A9CC5D:
	LDA.w $0009,y
	BEQ.b CODE_A9CC66
	STA.l $7F1480,x
CODE_A9CC66:
	LDA.w $000A,y
	BEQ.b CODE_A9CC6F
	STA.l $7F1500,x
CODE_A9CC6F:
	LDA.w $000B,y
	BEQ.b CODE_A9CC78
	STA.l $7F1580,x
CODE_A9CC78:
	LDA.w $000C,y
	BEQ.b CODE_A9CC81
	STA.l $7F1600,x
CODE_A9CC81:
	LDA.w $000D,y
	BEQ.b CODE_A9CC8A
	STA.l $7F1680,x
CODE_A9CC8A:
	LDA.w $000E,y
	BEQ.b CODE_A9CC93
	STA.l $7F1700,x
CODE_A9CC93:
	LDA.w $000F,y
	BEQ.b CODE_A9CC9C
	STA.l $7F1780,x
CODE_A9CC9C:
	LDA.w $0010,y
	BEQ.b CODE_A9CCA5
	STA.l $7F1800,x
CODE_A9CCA5:
	LDA.w $0011,y
	BEQ.b CODE_A9CCAE
	STA.l $7F1880,x
CODE_A9CCAE:
	LDA.w $0012,y
	BEQ.b CODE_A9CCB7
	STA.l $7F1900,x
CODE_A9CCB7:
	LDA.w $0013,y
	BEQ.b CODE_A9CCC0
	STA.l $7F1980,x
CODE_A9CCC0:
	LDA.w $0014,y
	BEQ.b CODE_A9CCC9
	STA.l $7F1A00,x
CODE_A9CCC9:
	LDA.w $0015,y
	BEQ.b CODE_A9CCD2
	STA.l $7F1A80,x
CODE_A9CCD2:
	LDA.w $0016,y
	BEQ.b CODE_A9CCDB
	STA.l $7F1B00,x
CODE_A9CCDB:
	LDA.w $0017,y
	BEQ.b CODE_A9CCE4
	STA.l $7F1B80,x
CODE_A9CCE4:
	LDA.w $0018,y
	BEQ.b CODE_A9CCED
	STA.l $7F1C00,x
CODE_A9CCED:
	LDA.w $0019,y
	BEQ.b CODE_A9CCF6
	STA.l $7F1C80,x
CODE_A9CCF6:
	LDA.w $001A,y
	BEQ.b CODE_A9CCFF
	STA.l $7F1D00,x
CODE_A9CCFF:
	LDA.w $001B,y
	BEQ.b CODE_A9CD08
	STA.l $7F1D80,x
CODE_A9CD08:
	LDA.w $001C,y
	BEQ.b CODE_A9CD11
	STA.l $7F1E00,x
CODE_A9CD11:
	LDA.w $001D,y
	BEQ.b CODE_A9CD1A
	STA.l $7F1E80,x
CODE_A9CD1A:
	LDA.w $001E,y
	BEQ.b CODE_A9CD23
	STA.l $7F1F00,x
CODE_A9CD23:
	LDA.w $001F,y
	BEQ.b CODE_A9CD30
	STA.l $7F1F80,x
CODE_A9CD2C:
	STA.l $7F2000,x
CODE_A9CD30:
	LDA.w $0020,y
	BEQ.b CODE_A9CD39
	STA.l $7F2080,x
CODE_A9CD39:
	LDA.w $0021,y
	BEQ.b CODE_A9CD42
	STA.l $7F2100,x
CODE_A9CD42:
	LDA.w $0022,y
	BEQ.b CODE_A9CD4B
	STA.l $7F2180,x
CODE_A9CD4B:
	LDA.w $0023,y
	BEQ.b CODE_A9CD54
	STA.l $7F2200,x
CODE_A9CD54:
	LDA.w $0024,y
	BEQ.b CODE_A9CD5D
	STA.l $7F2280,x
CODE_A9CD5D:
	LDA.w $0025,y
	BEQ.b CODE_A9CD66
	STA.l $7F2300,x
CODE_A9CD66:
	LDA.w $0026,y
	BEQ.b CODE_A9CD6F
	STA.l $7F2380,x
CODE_A9CD6F:
	LDA.w $0027,y
	BEQ.b CODE_A9CD78
	STA.l $7F2400,x
CODE_A9CD78:
	LDA.w $0028,y
	BEQ.b CODE_A9CD81
	STA.l $7F2480,x
CODE_A9CD81:
	LDA.w $0029,y
	BEQ.b CODE_A9CD8A
	STA.l $7F2500,x
CODE_A9CD8A:
	LDA.w $002A,y
	BEQ.b CODE_A9CD93
	STA.l $7F2580,x
CODE_A9CD93:
	LDA.w $002B,y
	BEQ.b CODE_A9CD9C
	STA.l $7F2600,x
CODE_A9CD9C:
	LDA.w $002C,y
	BEQ.b CODE_A9CDA5
	STA.l $7F2680,x
CODE_A9CDA5:
	LDA.w $002D,y
	BEQ.b CODE_A9CDAE
	STA.l $7F2700,x
CODE_A9CDAE:
	LDA.w $002E,y
	BEQ.b CODE_A9CDB7
	STA.l $7F2780,x
CODE_A9CDB7:
	LDA.w $002F,y
	BEQ.b CODE_A9CDC0
	STA.l $7F2800,x
CODE_A9CDC0:
	LDA.w $0030,y
	BEQ.b CODE_A9CDC9
	STA.l $7F2880,x
CODE_A9CDC9:
	LDA.w $0031,y
	BEQ.b CODE_A9CDD2
	STA.l $7F2900,x
CODE_A9CDD2:
	LDA.w $0032,y
	BEQ.b CODE_A9CDDB
	STA.l $7F2980,x
CODE_A9CDDB:
	LDA.w $0033,y
	BEQ.b CODE_A9CDE4
	STA.l $7F2A00,x
CODE_A9CDE4:
	LDA.w $0034,y
	BEQ.b CODE_A9CDED
	STA.l $7F2A80,x
CODE_A9CDED:
	LDA.w $0035,y
	BEQ.b CODE_A9CDF6
	STA.l $7F2B00,x
CODE_A9CDF6:
	LDA.w $0036,y
	BEQ.b CODE_A9CDFF
	STA.l $7F2B80,x
CODE_A9CDFF:
	LDA.w $0037,y
	BEQ.b CODE_A9CE08
	STA.l $7F2C00,x
CODE_A9CE08:
	LDA.w $0038,y
	BEQ.b CODE_A9CE11
	STA.l $7F2C80,x
CODE_A9CE11:
	LDA.w $0039,y
	BEQ.b CODE_A9CE1A
	STA.l $7F2D00,x
CODE_A9CE1A:
	LDA.w $003A,y
	BEQ.b CODE_A9CE23
	STA.l $7F2D80,x
CODE_A9CE23:
	LDA.w $003B,y
	BEQ.b CODE_A9CE2C
	STA.l $7F2E00,x
CODE_A9CE2C:
	LDA.w $003C,y
	BEQ.b CODE_A9CE35
	STA.l $7F2E80,x
CODE_A9CE35:
	LDA.w $003D,y
	BEQ.b CODE_A9CE3E
	STA.l $7F2F00,x
CODE_A9CE3E:
	LDA.w $003E,y
	BEQ.b CODE_A9CE4B
	STA.l $7F2F80,x
CODE_A9CE47:
	STA.l $7F3000,x
CODE_A9CE4B:
	REP.b #$20
	RTL

CODE_A9CE4E:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9CE5D
	STA.l $7F0F00,x
CODE_A9CE59:
	STA.l $7F0F80,x
CODE_A9CE5D:
	LDA.w $0001,y
	BEQ.b CODE_A9CE66
	STA.l $7F1000,x
CODE_A9CE66:
	LDA.w $0002,y
	BEQ.b CODE_A9CE6F
	STA.l $7F1080,x
CODE_A9CE6F:
	LDA.w $0003,y
	BEQ.b CODE_A9CE78
	STA.l $7F1100,x
CODE_A9CE78:
	LDA.w $0004,y
	BEQ.b CODE_A9CE81
	STA.l $7F1180,x
CODE_A9CE81:
	LDA.w $0005,y
	BEQ.b CODE_A9CE8A
	STA.l $7F1200,x
CODE_A9CE8A:
	LDA.w $0006,y
	BEQ.b CODE_A9CE93
	STA.l $7F1280,x
CODE_A9CE93:
	LDA.w $0007,y
	BEQ.b CODE_A9CE9C
	STA.l $7F1300,x
CODE_A9CE9C:
	LDA.w $0008,y
	BEQ.b CODE_A9CEA5
	STA.l $7F1380,x
CODE_A9CEA5:
	LDA.w $0009,y
	BEQ.b CODE_A9CEAE
	STA.l $7F1400,x
CODE_A9CEAE:
	LDA.w $000A,y
	BEQ.b CODE_A9CEB7
	STA.l $7F1480,x
CODE_A9CEB7:
	LDA.w $000B,y
	BEQ.b CODE_A9CEC0
	STA.l $7F1500,x
CODE_A9CEC0:
	LDA.w $000C,y
	BEQ.b CODE_A9CEC9
	STA.l $7F1580,x
CODE_A9CEC9:
	LDA.w $000D,y
	BEQ.b CODE_A9CED2
	STA.l $7F1600,x
CODE_A9CED2:
	LDA.w $000E,y
	BEQ.b CODE_A9CEDB
	STA.l $7F1680,x
CODE_A9CEDB:
	LDA.w $000F,y
	BEQ.b CODE_A9CEE8
	STA.l $7F1700,x
CODE_A9CEE4:
	STA.l $7F1780,x
CODE_A9CEE8:
	LDA.w $0010,y
	BEQ.b CODE_A9CEF1
	STA.l $7F1800,x
CODE_A9CEF1:
	LDA.w $0011,y
	BEQ.b CODE_A9CEFA
	STA.l $7F1880,x
CODE_A9CEFA:
	LDA.w $0012,y
	BEQ.b CODE_A9CF03
	STA.l $7F1900,x
CODE_A9CF03:
	LDA.w $0013,y
	BEQ.b CODE_A9CF0C
	STA.l $7F1980,x
CODE_A9CF0C:
	LDA.w $0014,y
	BEQ.b CODE_A9CF15
	STA.l $7F1A00,x
CODE_A9CF15:
	LDA.w $0015,y
	BEQ.b CODE_A9CF1E
	STA.l $7F1A80,x
CODE_A9CF1E:
	LDA.w $0016,y
	BEQ.b CODE_A9CF27
	STA.l $7F1B00,x
CODE_A9CF27:
	LDA.w $0017,y
	BEQ.b CODE_A9CF30
	STA.l $7F1B80,x
CODE_A9CF30:
	LDA.w $0018,y
	BEQ.b CODE_A9CF39
	STA.l $7F1C00,x
CODE_A9CF39:
	LDA.w $0019,y
	BEQ.b CODE_A9CF42
	STA.l $7F1C80,x
CODE_A9CF42:
	LDA.w $001A,y
	BEQ.b CODE_A9CF4B
	STA.l $7F1D00,x
CODE_A9CF4B:
	LDA.w $001B,y
	BEQ.b CODE_A9CF54
	STA.l $7F1D80,x
CODE_A9CF54:
	LDA.w $001C,y
	BEQ.b CODE_A9CF5D
	STA.l $7F1E00,x
CODE_A9CF5D:
	LDA.w $001D,y
	BEQ.b CODE_A9CF66
	STA.l $7F1E80,x
CODE_A9CF66:
	LDA.w $001E,y
	BEQ.b CODE_A9CF73
	STA.l $7F1F00,x
CODE_A9CF6F:
	STA.l $7F1F80,x
CODE_A9CF73:
	LDA.w $001F,y
	BEQ.b CODE_A9CF7C
	STA.l $7F2000,x
CODE_A9CF7C:
	LDA.w $0020,y
	BEQ.b CODE_A9CF85
	STA.l $7F2080,x
CODE_A9CF85:
	LDA.w $0021,y
	BEQ.b CODE_A9CF8E
	STA.l $7F2100,x
CODE_A9CF8E:
	LDA.w $0022,y
	BEQ.b CODE_A9CF97
	STA.l $7F2180,x
CODE_A9CF97:
	LDA.w $0023,y
	BEQ.b CODE_A9CFA0
	STA.l $7F2200,x
CODE_A9CFA0:
	LDA.w $0024,y
	BEQ.b CODE_A9CFA9
	STA.l $7F2280,x
CODE_A9CFA9:
	LDA.w $0025,y
	BEQ.b CODE_A9CFB2
	STA.l $7F2300,x
CODE_A9CFB2:
	LDA.w $0026,y
	BEQ.b CODE_A9CFBB
	STA.l $7F2380,x
CODE_A9CFBB:
	LDA.w $0027,y
	BEQ.b CODE_A9CFC4
	STA.l $7F2400,x
CODE_A9CFC4:
	LDA.w $0028,y
	BEQ.b CODE_A9CFCD
	STA.l $7F2480,x
CODE_A9CFCD:
	LDA.w $0029,y
	BEQ.b CODE_A9CFD6
	STA.l $7F2500,x
CODE_A9CFD6:
	LDA.w $002A,y
	BEQ.b CODE_A9CFDF
	STA.l $7F2580,x
CODE_A9CFDF:
	LDA.w $002B,y
	BEQ.b CODE_A9CFE8
	STA.l $7F2600,x
CODE_A9CFE8:
	LDA.w $002C,y
	BEQ.b CODE_A9CFF1
	STA.l $7F2680,x
CODE_A9CFF1:
	LDA.w $002D,y
	BEQ.b CODE_A9CFFE
	STA.l $7F2700,x
CODE_A9CFFA:
	STA.l $7F2780,x
CODE_A9CFFE:
	LDA.w $002E,y
	BEQ.b CODE_A9D007
	STA.l $7F2800,x
CODE_A9D007:
	LDA.w $002F,y
	BEQ.b CODE_A9D010
	STA.l $7F2880,x
CODE_A9D010:
	LDA.w $0030,y
	BEQ.b CODE_A9D019
	STA.l $7F2900,x
CODE_A9D019:
	LDA.w $0031,y
	BEQ.b CODE_A9D022
	STA.l $7F2980,x
CODE_A9D022:
	LDA.w $0032,y
	BEQ.b CODE_A9D02B
	STA.l $7F2A00,x
CODE_A9D02B:
	LDA.w $0033,y
	BEQ.b CODE_A9D034
	STA.l $7F2A80,x
CODE_A9D034:
	LDA.w $0034,y
	BEQ.b CODE_A9D03D
	STA.l $7F2B00,x
CODE_A9D03D:
	LDA.w $0035,y
	BEQ.b CODE_A9D046
	STA.l $7F2B80,x
CODE_A9D046:
	LDA.w $0036,y
	BEQ.b CODE_A9D04F
	STA.l $7F2C00,x
CODE_A9D04F:
	LDA.w $0037,y
	BEQ.b CODE_A9D058
	STA.l $7F2C80,x
CODE_A9D058:
	LDA.w $0038,y
	BEQ.b CODE_A9D061
	STA.l $7F2D00,x
CODE_A9D061:
	LDA.w $0039,y
	BEQ.b CODE_A9D06A
	STA.l $7F2D80,x
CODE_A9D06A:
	LDA.w $003A,y
	BEQ.b CODE_A9D073
	STA.l $7F2E00,x
CODE_A9D073:
	LDA.w $003B,y
	BEQ.b CODE_A9D07C
	STA.l $7F2E80,x
CODE_A9D07C:
	LDA.w $003C,y
	BEQ.b CODE_A9D089
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_A9D089:
	LDA.w $003D,y
	BEQ.b CODE_A9D092
	STA.l $7F3000,x
CODE_A9D092:
	LDA.w $003E,y
	BEQ.b CODE_A9D09B
	STA.l $7F3080,x
CODE_A9D09B:
	REP.b #$20
	RTL

CODE_A9D09E:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9D0AD
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_A9D0AD:
	LDA.w $0001,y
	BEQ.b CODE_A9D0B6
	STA.l $7F0F80,x
CODE_A9D0B6:
	LDA.w $0002,y
	BEQ.b CODE_A9D0BF
	STA.l $7F1000,x
CODE_A9D0BF:
	LDA.w $0003,y
	BEQ.b CODE_A9D0C8
	STA.l $7F1080,x
CODE_A9D0C8:
	LDA.w $0004,y
	BEQ.b CODE_A9D0D1
	STA.l $7F1100,x
CODE_A9D0D1:
	LDA.w $0005,y
	BEQ.b CODE_A9D0DA
	STA.l $7F1180,x
CODE_A9D0DA:
	LDA.w $0006,y
	BEQ.b CODE_A9D0E3
	STA.l $7F1200,x
CODE_A9D0E3:
	LDA.w $0007,y
	BEQ.b CODE_A9D0EC
	STA.l $7F1280,x
CODE_A9D0EC:
	LDA.w $0008,y
	BEQ.b CODE_A9D0F5
	STA.l $7F1300,x
CODE_A9D0F5:
	LDA.w $0009,y
	BEQ.b CODE_A9D0FE
	STA.l $7F1380,x
CODE_A9D0FE:
	LDA.w $000A,y
	BEQ.b CODE_A9D10B
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_A9D10B:
	LDA.w $000B,y
	BEQ.b CODE_A9D114
	STA.l $7F1500,x
CODE_A9D114:
	LDA.w $000C,y
	BEQ.b CODE_A9D11D
	STA.l $7F1580,x
CODE_A9D11D:
	LDA.w $000D,y
	BEQ.b CODE_A9D126
	STA.l $7F1600,x
CODE_A9D126:
	LDA.w $000E,y
	BEQ.b CODE_A9D12F
	STA.l $7F1680,x
CODE_A9D12F:
	LDA.w $000F,y
	BEQ.b CODE_A9D138
	STA.l $7F1700,x
CODE_A9D138:
	LDA.w $0010,y
	BEQ.b CODE_A9D141
	STA.l $7F1780,x
CODE_A9D141:
	LDA.w $0011,y
	BEQ.b CODE_A9D14A
	STA.l $7F1800,x
CODE_A9D14A:
	LDA.w $0012,y
	BEQ.b CODE_A9D153
	STA.l $7F1880,x
CODE_A9D153:
	LDA.w $0013,y
	BEQ.b CODE_A9D15C
	STA.l $7F1900,x
CODE_A9D15C:
	LDA.w $0014,y
	BEQ.b CODE_A9D165
	STA.l $7F1980,x
CODE_A9D165:
	LDA.w $0015,y
	BEQ.b CODE_A9D172
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_A9D172:
	LDA.w $0016,y
	BEQ.b CODE_A9D17B
	STA.l $7F1B00,x
CODE_A9D17B:
	LDA.w $0017,y
	BEQ.b CODE_A9D184
	STA.l $7F1B80,x
CODE_A9D184:
	LDA.w $0018,y
	BEQ.b CODE_A9D18D
	STA.l $7F1C00,x
CODE_A9D18D:
	LDA.w $0019,y
	BEQ.b CODE_A9D196
	STA.l $7F1C80,x
CODE_A9D196:
	LDA.w $001A,y
	BEQ.b CODE_A9D19F
	STA.l $7F1D00,x
CODE_A9D19F:
	LDA.w $001B,y
	BEQ.b CODE_A9D1A8
	STA.l $7F1D80,x
CODE_A9D1A8:
	LDA.w $001C,y
	BEQ.b CODE_A9D1B1
	STA.l $7F1E00,x
CODE_A9D1B1:
	LDA.w $001D,y
	BEQ.b CODE_A9D1BA
	STA.l $7F1E80,x
CODE_A9D1BA:
	LDA.w $001E,y
	BEQ.b CODE_A9D1C3
	STA.l $7F1F00,x
CODE_A9D1C3:
	LDA.w $001F,y
	BEQ.b CODE_A9D1D0
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9D1D0:
	LDA.w $0020,y
	BEQ.b CODE_A9D1D9
	STA.l $7F2080,x
CODE_A9D1D9:
	LDA.w $0021,y
	BEQ.b CODE_A9D1E2
	STA.l $7F2100,x
CODE_A9D1E2:
	LDA.w $0022,y
	BEQ.b CODE_A9D1EB
	STA.l $7F2180,x
CODE_A9D1EB:
	LDA.w $0023,y
	BEQ.b CODE_A9D1F4
	STA.l $7F2200,x
CODE_A9D1F4:
	LDA.w $0024,y
	BEQ.b CODE_A9D1FD
	STA.l $7F2280,x
CODE_A9D1FD:
	LDA.w $0025,y
	BEQ.b CODE_A9D206
	STA.l $7F2300,x
CODE_A9D206:
	LDA.w $0026,y
	BEQ.b CODE_A9D20F
	STA.l $7F2380,x
CODE_A9D20F:
	LDA.w $0027,y
	BEQ.b CODE_A9D218
	STA.l $7F2400,x
CODE_A9D218:
	LDA.w $0028,y
	BEQ.b CODE_A9D221
	STA.l $7F2480,x
CODE_A9D221:
	LDA.w $0029,y
	BEQ.b CODE_A9D22A
	STA.l $7F2500,x
CODE_A9D22A:
	LDA.w $002A,y
	BEQ.b CODE_A9D237
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_A9D237:
	LDA.w $002B,y
	BEQ.b CODE_A9D240
	STA.l $7F2680,x
CODE_A9D240:
	LDA.w $002C,y
	BEQ.b CODE_A9D249
	STA.l $7F2700,x
CODE_A9D249:
	LDA.w $002D,y
	BEQ.b CODE_A9D252
	STA.l $7F2780,x
CODE_A9D252:
	LDA.w $002E,y
	BEQ.b CODE_A9D25B
	STA.l $7F2800,x
CODE_A9D25B:
	LDA.w $002F,y
	BEQ.b CODE_A9D264
	STA.l $7F2880,x
CODE_A9D264:
	LDA.w $0030,y
	BEQ.b CODE_A9D26D
	STA.l $7F2900,x
CODE_A9D26D:
	LDA.w $0031,y
	BEQ.b CODE_A9D276
	STA.l $7F2980,x
CODE_A9D276:
	LDA.w $0032,y
	BEQ.b CODE_A9D27F
	STA.l $7F2A00,x
CODE_A9D27F:
	LDA.w $0033,y
	BEQ.b CODE_A9D288
	STA.l $7F2A80,x
CODE_A9D288:
	LDA.w $0034,y
	BEQ.b CODE_A9D291
	STA.l $7F2B00,x
CODE_A9D291:
	LDA.w $0035,y
	BEQ.b CODE_A9D29E
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_A9D29E:
	LDA.w $0036,y
	BEQ.b CODE_A9D2A7
	STA.l $7F2C80,x
CODE_A9D2A7:
	LDA.w $0037,y
	BEQ.b CODE_A9D2B0
	STA.l $7F2D00,x
CODE_A9D2B0:
	LDA.w $0038,y
	BEQ.b CODE_A9D2B9
	STA.l $7F2D80,x
CODE_A9D2B9:
	LDA.w $0039,y
	BEQ.b CODE_A9D2C2
	STA.l $7F2E00,x
CODE_A9D2C2:
	LDA.w $003A,y
	BEQ.b CODE_A9D2CB
	STA.l $7F2E80,x
CODE_A9D2CB:
	LDA.w $003B,y
	BEQ.b CODE_A9D2D4
	STA.l $7F2F00,x
CODE_A9D2D4:
	LDA.w $003C,y
	BEQ.b CODE_A9D2DD
	STA.l $7F2F80,x
CODE_A9D2DD:
	LDA.w $003D,y
	BEQ.b CODE_A9D2E6
	STA.l $7F3000,x
CODE_A9D2E6:
	LDA.w $003E,y
	BEQ.b CODE_A9D2EF
	STA.l $7F3080,x
CODE_A9D2EF:
	LDA.w $003F,y
	BEQ.b CODE_A9D2F8
	STA.l $7F3100,x
CODE_A9D2F8:
	REP.b #$20
	RTL

CODE_A9D2FB:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9D30A
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_A9D30A:
	LDA.w $0001,y
	BEQ.b CODE_A9D313
	STA.l $7F0F00,x
CODE_A9D313:
	LDA.w $0002,y
	BEQ.b CODE_A9D31C
	STA.l $7F0F80,x
CODE_A9D31C:
	LDA.w $0003,y
	BEQ.b CODE_A9D325
	STA.l $7F1000,x
CODE_A9D325:
	LDA.w $0004,y
	BEQ.b CODE_A9D32E
	STA.l $7F1080,x
CODE_A9D32E:
	LDA.w $0005,y
	BEQ.b CODE_A9D337
	STA.l $7F1100,x
CODE_A9D337:
	LDA.w $0006,y
	BEQ.b CODE_A9D340
	STA.l $7F1180,x
CODE_A9D340:
	LDA.w $0007,y
	BEQ.b CODE_A9D34D
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_A9D34D:
	LDA.w $0008,y
	BEQ.b CODE_A9D356
	STA.l $7F1300,x
CODE_A9D356:
	LDA.w $0009,y
	BEQ.b CODE_A9D35F
	STA.l $7F1380,x
CODE_A9D35F:
	LDA.w $000A,y
	BEQ.b CODE_A9D368
	STA.l $7F1400,x
CODE_A9D368:
	LDA.w $000B,y
	BEQ.b CODE_A9D371
	STA.l $7F1480,x
CODE_A9D371:
	LDA.w $000C,y
	BEQ.b CODE_A9D37A
	STA.l $7F1500,x
CODE_A9D37A:
	LDA.w $000D,y
	BEQ.b CODE_A9D383
	STA.l $7F1580,x
CODE_A9D383:
	LDA.w $000E,y
	BEQ.b CODE_A9D38C
	STA.l $7F1600,x
CODE_A9D38C:
	LDA.w $000F,y
	BEQ.b CODE_A9D399
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_A9D399:
	LDA.w $0010,y
	BEQ.b CODE_A9D3A2
	STA.l $7F1780,x
CODE_A9D3A2:
	LDA.w $0011,y
	BEQ.b CODE_A9D3AB
	STA.l $7F1800,x
CODE_A9D3AB:
	LDA.w $0012,y
	BEQ.b CODE_A9D3B4
	STA.l $7F1880,x
CODE_A9D3B4:
	LDA.w $0013,y
	BEQ.b CODE_A9D3BD
	STA.l $7F1900,x
CODE_A9D3BD:
	LDA.w $0014,y
	BEQ.b CODE_A9D3C6
	STA.l $7F1980,x
CODE_A9D3C6:
	LDA.w $0015,y
	BEQ.b CODE_A9D3CF
	STA.l $7F1A00,x
CODE_A9D3CF:
	LDA.w $0016,y
	BEQ.b CODE_A9D3D8
	STA.l $7F1A80,x
CODE_A9D3D8:
	LDA.w $0017,y
	BEQ.b CODE_A9D3E5
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_A9D3E5:
	LDA.w $0018,y
	BEQ.b CODE_A9D3EE
	STA.l $7F1C00,x
CODE_A9D3EE:
	LDA.w $0019,y
	BEQ.b CODE_A9D3F7
	STA.l $7F1C80,x
CODE_A9D3F7:
	LDA.w $001A,y
	BEQ.b CODE_A9D400
	STA.l $7F1D00,x
CODE_A9D400:
	LDA.w $001B,y
	BEQ.b CODE_A9D409
	STA.l $7F1D80,x
CODE_A9D409:
	LDA.w $001C,y
	BEQ.b CODE_A9D412
	STA.l $7F1E00,x
CODE_A9D412:
	LDA.w $001D,y
	BEQ.b CODE_A9D41B
	STA.l $7F1E80,x
CODE_A9D41B:
	LDA.w $001E,y
	BEQ.b CODE_A9D424
	STA.l $7F1F00,x
CODE_A9D424:
	LDA.w $001F,y
	BEQ.b CODE_A9D431
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9D431:
	LDA.w $0020,y
	BEQ.b CODE_A9D43A
	STA.l $7F2080,x
CODE_A9D43A:
	LDA.w $0021,y
	BEQ.b CODE_A9D443
	STA.l $7F2100,x
CODE_A9D443:
	LDA.w $0022,y
	BEQ.b CODE_A9D44C
	STA.l $7F2180,x
CODE_A9D44C:
	LDA.w $0023,y
	BEQ.b CODE_A9D455
	STA.l $7F2200,x
CODE_A9D455:
	LDA.w $0024,y
	BEQ.b CODE_A9D45E
	STA.l $7F2280,x
CODE_A9D45E:
	LDA.w $0025,y
	BEQ.b CODE_A9D467
	STA.l $7F2300,x
CODE_A9D467:
	LDA.w $0026,y
	BEQ.b CODE_A9D470
	STA.l $7F2380,x
CODE_A9D470:
	LDA.w $0027,y
	BEQ.b CODE_A9D47D
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_A9D47D:
	LDA.w $0028,y
	BEQ.b CODE_A9D486
	STA.l $7F2500,x
CODE_A9D486:
	LDA.w $0029,y
	BEQ.b CODE_A9D48F
	STA.l $7F2580,x
CODE_A9D48F:
	LDA.w $002A,y
	BEQ.b CODE_A9D498
	STA.l $7F2600,x
CODE_A9D498:
	LDA.w $002B,y
	BEQ.b CODE_A9D4A1
	STA.l $7F2680,x
CODE_A9D4A1:
	LDA.w $002C,y
	BEQ.b CODE_A9D4AA
	STA.l $7F2700,x
CODE_A9D4AA:
	LDA.w $002D,y
	BEQ.b CODE_A9D4B3
	STA.l $7F2780,x
CODE_A9D4B3:
	LDA.w $002E,y
	BEQ.b CODE_A9D4C0
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_A9D4C0:
	LDA.w $002F,y
	BEQ.b CODE_A9D4C9
	STA.l $7F2900,x
CODE_A9D4C9:
	LDA.w $0030,y
	BEQ.b CODE_A9D4D2
	STA.l $7F2980,x
CODE_A9D4D2:
	LDA.w $0031,y
	BEQ.b CODE_A9D4DB
	STA.l $7F2A00,x
CODE_A9D4DB:
	LDA.w $0032,y
	BEQ.b CODE_A9D4E4
	STA.l $7F2A80,x
CODE_A9D4E4:
	LDA.w $0033,y
	BEQ.b CODE_A9D4ED
	STA.l $7F2B00,x
CODE_A9D4ED:
	LDA.w $0034,y
	BEQ.b CODE_A9D4F6
	STA.l $7F2B80,x
CODE_A9D4F6:
	LDA.w $0035,y
	BEQ.b CODE_A9D4FF
	STA.l $7F2C00,x
CODE_A9D4FF:
	LDA.w $0036,y
	BEQ.b CODE_A9D50C
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_A9D50C:
	LDA.w $0037,y
	BEQ.b CODE_A9D515
	STA.l $7F2D80,x
CODE_A9D515:
	LDA.w $0038,y
	BEQ.b CODE_A9D51E
	STA.l $7F2E00,x
CODE_A9D51E:
	LDA.w $0039,y
	BEQ.b CODE_A9D527
	STA.l $7F2E80,x
CODE_A9D527:
	LDA.w $003A,y
	BEQ.b CODE_A9D530
	STA.l $7F2F00,x
CODE_A9D530:
	LDA.w $003B,y
	BEQ.b CODE_A9D539
	STA.l $7F2F80,x
CODE_A9D539:
	LDA.w $003C,y
	BEQ.b CODE_A9D542
	STA.l $7F3000,x
CODE_A9D542:
	LDA.w $003D,y
	BEQ.b CODE_A9D54B
	STA.l $7F3080,x
CODE_A9D54B:
	LDA.w $003E,y
	BEQ.b CODE_A9D558
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_A9D558:
	REP.b #$20
	RTL

CODE_A9D55B:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9D56A
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_A9D56A:
	LDA.w $0001,y
	BEQ.b CODE_A9D573
	STA.l $7F0E80,x
CODE_A9D573:
	LDA.w $0002,y
	BEQ.b CODE_A9D57C
	STA.l $7F0F00,x
CODE_A9D57C:
	LDA.w $0003,y
	BEQ.b CODE_A9D585
	STA.l $7F0F80,x
CODE_A9D585:
	LDA.w $0004,y
	BEQ.b CODE_A9D58E
	STA.l $7F1000,x
CODE_A9D58E:
	LDA.w $0005,y
	BEQ.b CODE_A9D597
	STA.l $7F1080,x
CODE_A9D597:
	LDA.w $0006,y
	BEQ.b CODE_A9D5A4
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_A9D5A4:
	LDA.w $0007,y
	BEQ.b CODE_A9D5AD
	STA.l $7F1200,x
CODE_A9D5AD:
	LDA.w $0008,y
	BEQ.b CODE_A9D5B6
	STA.l $7F1280,x
CODE_A9D5B6:
	LDA.w $0009,y
	BEQ.b CODE_A9D5BF
	STA.l $7F1300,x
CODE_A9D5BF:
	LDA.w $000A,y
	BEQ.b CODE_A9D5C8
	STA.l $7F1380,x
CODE_A9D5C8:
	LDA.w $000B,y
	BEQ.b CODE_A9D5D1
	STA.l $7F1400,x
CODE_A9D5D1:
	LDA.w $000C,y
	BEQ.b CODE_A9D5DE
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_A9D5DE:
	LDA.w $000D,y
	BEQ.b CODE_A9D5E7
	STA.l $7F1580,x
CODE_A9D5E7:
	LDA.w $000E,y
	BEQ.b CODE_A9D5F0
	STA.l $7F1600,x
CODE_A9D5F0:
	LDA.w $000F,y
	BEQ.b CODE_A9D5F9
	STA.l $7F1680,x
CODE_A9D5F9:
	LDA.w $0010,y
	BEQ.b CODE_A9D602
	STA.l $7F1700,x
CODE_A9D602:
	LDA.w $0011,y
	BEQ.b CODE_A9D60B
	STA.l $7F1780,x
CODE_A9D60B:
	LDA.w $0012,y
	BEQ.b CODE_A9D618
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_A9D618:
	LDA.w $0013,y
	BEQ.b CODE_A9D621
	STA.l $7F1900,x
CODE_A9D621:
	LDA.w $0014,y
	BEQ.b CODE_A9D62A
	STA.l $7F1980,x
CODE_A9D62A:
	LDA.w $0015,y
	BEQ.b CODE_A9D633
	STA.l $7F1A00,x
CODE_A9D633:
	LDA.w $0016,y
	BEQ.b CODE_A9D63C
	STA.l $7F1A80,x
CODE_A9D63C:
	LDA.w $0017,y
	BEQ.b CODE_A9D645
	STA.l $7F1B00,x
CODE_A9D645:
	LDA.w $0018,y
	BEQ.b CODE_A9D64E
	STA.l $7F1B80,x
CODE_A9D64E:
	LDA.w $0019,y
	BEQ.b CODE_A9D65B
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_A9D65B:
	LDA.w $001A,y
	BEQ.b CODE_A9D664
	STA.l $7F1D00,x
CODE_A9D664:
	LDA.w $001B,y
	BEQ.b CODE_A9D66D
	STA.l $7F1D80,x
CODE_A9D66D:
	LDA.w $001C,y
	BEQ.b CODE_A9D676
	STA.l $7F1E00,x
CODE_A9D676:
	LDA.w $001D,y
	BEQ.b CODE_A9D67F
	STA.l $7F1E80,x
CODE_A9D67F:
	LDA.w $001E,y
	BEQ.b CODE_A9D688
	STA.l $7F1F00,x
CODE_A9D688:
	LDA.w $001F,y
	BEQ.b CODE_A9D695
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9D695:
	LDA.w $0020,y
	BEQ.b CODE_A9D69E
	STA.l $7F2080,x
CODE_A9D69E:
	LDA.w $0021,y
	BEQ.b CODE_A9D6A7
	STA.l $7F2100,x
CODE_A9D6A7:
	LDA.w $0022,y
	BEQ.b CODE_A9D6B0
	STA.l $7F2180,x
CODE_A9D6B0:
	LDA.w $0023,y
	BEQ.b CODE_A9D6B9
	STA.l $7F2200,x
CODE_A9D6B9:
	LDA.w $0024,y
	BEQ.b CODE_A9D6C2
	STA.l $7F2280,x
CODE_A9D6C2:
	LDA.w $0025,y
	BEQ.b CODE_A9D6CF
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_A9D6CF:
	LDA.w $0026,y
	BEQ.b CODE_A9D6D8
	STA.l $7F2400,x
CODE_A9D6D8:
	LDA.w $0027,y
	BEQ.b CODE_A9D6E1
	STA.l $7F2480,x
CODE_A9D6E1:
	LDA.w $0028,y
	BEQ.b CODE_A9D6EA
	STA.l $7F2500,x
CODE_A9D6EA:
	LDA.w $0029,y
	BEQ.b CODE_A9D6F3
	STA.l $7F2580,x
CODE_A9D6F3:
	LDA.w $002A,y
	BEQ.b CODE_A9D6FC
	STA.l $7F2600,x
CODE_A9D6FC:
	LDA.w $002B,y
	BEQ.b CODE_A9D705
	STA.l $7F2680,x
CODE_A9D705:
	LDA.w $002C,y
	BEQ.b CODE_A9D712
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_A9D712:
	LDA.w $002D,y
	BEQ.b CODE_A9D71B
	STA.l $7F2800,x
CODE_A9D71B:
	LDA.w $002E,y
	BEQ.b CODE_A9D724
	STA.l $7F2880,x
CODE_A9D724:
	LDA.w $002F,y
	BEQ.b CODE_A9D72D
	STA.l $7F2900,x
CODE_A9D72D:
	LDA.w $0030,y
	BEQ.b CODE_A9D736
	STA.l $7F2980,x
CODE_A9D736:
	LDA.w $0031,y
	BEQ.b CODE_A9D73F
	STA.l $7F2A00,x
CODE_A9D73F:
	LDA.w $0032,y
	BEQ.b CODE_A9D74C
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_A9D74C:
	LDA.w $0033,y
	BEQ.b CODE_A9D755
	STA.l $7F2B80,x
CODE_A9D755:
	LDA.w $0034,y
	BEQ.b CODE_A9D75E
	STA.l $7F2C00,x
CODE_A9D75E:
	LDA.w $0035,y
	BEQ.b CODE_A9D767
	STA.l $7F2C80,x
CODE_A9D767:
	LDA.w $0036,y
	BEQ.b CODE_A9D770
	STA.l $7F2D00,x
CODE_A9D770:
	LDA.w $0037,y
	BEQ.b CODE_A9D779
	STA.l $7F2D80,x
CODE_A9D779:
	LDA.w $0038,y
	BEQ.b CODE_A9D786
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_A9D786:
	LDA.w $0039,y
	BEQ.b CODE_A9D78F
	STA.l $7F2F00,x
CODE_A9D78F:
	LDA.w $003A,y
	BEQ.b CODE_A9D798
	STA.l $7F2F80,x
CODE_A9D798:
	LDA.w $003B,y
	BEQ.b CODE_A9D7A1
	STA.l $7F3000,x
CODE_A9D7A1:
	LDA.w $003C,y
	BEQ.b CODE_A9D7AA
	STA.l $7F3080,x
CODE_A9D7AA:
	LDA.w $003D,y
	BEQ.b CODE_A9D7B3
	STA.l $7F3100,x
CODE_A9D7B3:
	LDA.w $003E,y
	BEQ.b CODE_A9D7BC
	STA.l $7F3180,x
CODE_A9D7BC:
	LDA.w $003F,y
	BEQ.b CODE_A9D7C5
	STA.l $7F3200,x
CODE_A9D7C5:
	REP.b #$20
	RTL

CODE_A9D7C8:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9D7D7
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_A9D7D7:
	LDA.w $0001,y
	BEQ.b CODE_A9D7E0
	STA.l $7F0E00,x
CODE_A9D7E0:
	LDA.w $0002,y
	BEQ.b CODE_A9D7E9
	STA.l $7F0E80,x
CODE_A9D7E9:
	LDA.w $0003,y
	BEQ.b CODE_A9D7F2
	STA.l $7F0F00,x
CODE_A9D7F2:
	LDA.w $0004,y
	BEQ.b CODE_A9D7FB
	STA.l $7F0F80,x
CODE_A9D7FB:
	LDA.w $0005,y
	BEQ.b CODE_A9D808
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_A9D808:
	LDA.w $0006,y
	BEQ.b CODE_A9D811
	STA.l $7F1100,x
CODE_A9D811:
	LDA.w $0007,y
	BEQ.b CODE_A9D81A
	STA.l $7F1180,x
CODE_A9D81A:
	LDA.w $0008,y
	BEQ.b CODE_A9D823
	STA.l $7F1200,x
CODE_A9D823:
	LDA.w $0009,y
	BEQ.b CODE_A9D82C
	STA.l $7F1280,x
CODE_A9D82C:
	LDA.w $000A,y
	BEQ.b CODE_A9D839
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_A9D839:
	LDA.w $000B,y
	BEQ.b CODE_A9D842
	STA.l $7F1400,x
CODE_A9D842:
	LDA.w $000C,y
	BEQ.b CODE_A9D84B
	STA.l $7F1480,x
CODE_A9D84B:
	LDA.w $000D,y
	BEQ.b CODE_A9D854
	STA.l $7F1500,x
CODE_A9D854:
	LDA.w $000E,y
	BEQ.b CODE_A9D85D
	STA.l $7F1580,x
CODE_A9D85D:
	LDA.w $000F,y
	BEQ.b CODE_A9D86A
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_A9D86A:
	LDA.w $0010,y
	BEQ.b CODE_A9D873
	STA.l $7F1700,x
CODE_A9D873:
	LDA.w $0011,y
	BEQ.b CODE_A9D87C
	STA.l $7F1780,x
CODE_A9D87C:
	LDA.w $0012,y
	BEQ.b CODE_A9D885
	STA.l $7F1800,x
CODE_A9D885:
	LDA.w $0013,y
	BEQ.b CODE_A9D88E
	STA.l $7F1880,x
CODE_A9D88E:
	LDA.w $0014,y
	BEQ.b CODE_A9D89B
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_A9D89B:
	LDA.w $0015,y
	BEQ.b CODE_A9D8A4
	STA.l $7F1A00,x
CODE_A9D8A4:
	LDA.w $0016,y
	BEQ.b CODE_A9D8AD
	STA.l $7F1A80,x
CODE_A9D8AD:
	LDA.w $0017,y
	BEQ.b CODE_A9D8B6
	STA.l $7F1B00,x
CODE_A9D8B6:
	LDA.w $0018,y
	BEQ.b CODE_A9D8BF
	STA.l $7F1B80,x
CODE_A9D8BF:
	LDA.w $0019,y
	BEQ.b CODE_A9D8C8
	STA.l $7F1C00,x
CODE_A9D8C8:
	LDA.w $001A,y
	BEQ.b CODE_A9D8D5
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_A9D8D5:
	LDA.w $001B,y
	BEQ.b CODE_A9D8DE
	STA.l $7F1D80,x
CODE_A9D8DE:
	LDA.w $001C,y
	BEQ.b CODE_A9D8E7
	STA.l $7F1E00,x
CODE_A9D8E7:
	LDA.w $001D,y
	BEQ.b CODE_A9D8F0
	STA.l $7F1E80,x
CODE_A9D8F0:
	LDA.w $001E,y
	BEQ.b CODE_A9D8F9
	STA.l $7F1F00,x
CODE_A9D8F9:
	LDA.w $001F,y
	BEQ.b CODE_A9D906
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9D906:
	LDA.w $0020,y
	BEQ.b CODE_A9D90F
	STA.l $7F2080,x
CODE_A9D90F:
	LDA.w $0021,y
	BEQ.b CODE_A9D918
	STA.l $7F2100,x
CODE_A9D918:
	LDA.w $0022,y
	BEQ.b CODE_A9D921
	STA.l $7F2180,x
CODE_A9D921:
	LDA.w $0023,y
	BEQ.b CODE_A9D92A
	STA.l $7F2200,x
CODE_A9D92A:
	LDA.w $0024,y
	BEQ.b CODE_A9D937
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_A9D937:
	LDA.w $0025,y
	BEQ.b CODE_A9D940
	STA.l $7F2380,x
CODE_A9D940:
	LDA.w $0026,y
	BEQ.b CODE_A9D949
	STA.l $7F2400,x
CODE_A9D949:
	LDA.w $0027,y
	BEQ.b CODE_A9D952
	STA.l $7F2480,x
CODE_A9D952:
	LDA.w $0028,y
	BEQ.b CODE_A9D95B
	STA.l $7F2500,x
CODE_A9D95B:
	LDA.w $0029,y
	BEQ.b CODE_A9D968
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_A9D968:
	LDA.w $002A,y
	BEQ.b CODE_A9D971
	STA.l $7F2680,x
CODE_A9D971:
	LDA.w $002B,y
	BEQ.b CODE_A9D97A
	STA.l $7F2700,x
CODE_A9D97A:
	LDA.w $002C,y
	BEQ.b CODE_A9D983
	STA.l $7F2780,x
CODE_A9D983:
	LDA.w $002D,y
	BEQ.b CODE_A9D98C
	STA.l $7F2800,x
CODE_A9D98C:
	LDA.w $002E,y
	BEQ.b CODE_A9D995
	STA.l $7F2880,x
CODE_A9D995:
	LDA.w $002F,y
	BEQ.b CODE_A9D9A2
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_A9D9A2:
	LDA.w $0030,y
	BEQ.b CODE_A9D9AB
	STA.l $7F2A00,x
CODE_A9D9AB:
	LDA.w $0031,y
	BEQ.b CODE_A9D9B4
	STA.l $7F2A80,x
CODE_A9D9B4:
	LDA.w $0032,y
	BEQ.b CODE_A9D9BD
	STA.l $7F2B00,x
CODE_A9D9BD:
	LDA.w $0033,y
	BEQ.b CODE_A9D9C6
	STA.l $7F2B80,x
CODE_A9D9C6:
	LDA.w $0034,y
	BEQ.b CODE_A9D9D3
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_A9D9D3:
	LDA.w $0035,y
	BEQ.b CODE_A9D9DC
	STA.l $7F2D00,x
CODE_A9D9DC:
	LDA.w $0036,y
	BEQ.b CODE_A9D9E5
	STA.l $7F2D80,x
CODE_A9D9E5:
	LDA.w $0037,y
	BEQ.b CODE_A9D9EE
	STA.l $7F2E00,x
CODE_A9D9EE:
	LDA.w $0038,y
	BEQ.b CODE_A9D9F7
	STA.l $7F2E80,x
CODE_A9D9F7:
	LDA.w $0039,y
	BEQ.b CODE_A9DA04
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_A9DA04:
	LDA.w $003A,y
	BEQ.b CODE_A9DA0D
	STA.l $7F3000,x
CODE_A9DA0D:
	LDA.w $003B,y
	BEQ.b CODE_A9DA16
	STA.l $7F3080,x
CODE_A9DA16:
	LDA.w $003C,y
	BEQ.b CODE_A9DA1F
	STA.l $7F3100,x
CODE_A9DA1F:
	LDA.w $003D,y
	BEQ.b CODE_A9DA28
	STA.l $7F3180,x
CODE_A9DA28:
	LDA.w $003E,y
	BEQ.b CODE_A9DA35
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_A9DA35:
	REP.b #$20
	RTL

CODE_A9DA38:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9DA47
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_A9DA47:
	LDA.w $0001,y
	BEQ.b CODE_A9DA50
	STA.l $7F0D80,x
CODE_A9DA50:
	LDA.w $0002,y
	BEQ.b CODE_A9DA59
	STA.l $7F0E00,x
CODE_A9DA59:
	LDA.w $0003,y
	BEQ.b CODE_A9DA62
	STA.l $7F0E80,x
CODE_A9DA62:
	LDA.w $0004,y
	BEQ.b CODE_A9DA6F
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_A9DA6F:
	LDA.w $0005,y
	BEQ.b CODE_A9DA78
	STA.l $7F1000,x
CODE_A9DA78:
	LDA.w $0006,y
	BEQ.b CODE_A9DA81
	STA.l $7F1080,x
CODE_A9DA81:
	LDA.w $0007,y
	BEQ.b CODE_A9DA8A
	STA.l $7F1100,x
CODE_A9DA8A:
	LDA.w $0008,y
	BEQ.b CODE_A9DA93
	STA.l $7F1180,x
CODE_A9DA93:
	LDA.w $0009,y
	BEQ.b CODE_A9DAA0
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_A9DAA0:
	LDA.w $000A,y
	BEQ.b CODE_A9DAA9
	STA.l $7F1300,x
CODE_A9DAA9:
	LDA.w $000B,y
	BEQ.b CODE_A9DAB2
	STA.l $7F1380,x
CODE_A9DAB2:
	LDA.w $000C,y
	BEQ.b CODE_A9DABB
	STA.l $7F1400,x
CODE_A9DABB:
	LDA.w $000D,y
	BEQ.b CODE_A9DAC8
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_A9DAC8:
	LDA.w $000E,y
	BEQ.b CODE_A9DAD1
	STA.l $7F1580,x
CODE_A9DAD1:
	LDA.w $000F,y
	BEQ.b CODE_A9DADA
	STA.l $7F1600,x
CODE_A9DADA:
	LDA.w $0010,y
	BEQ.b CODE_A9DAE3
	STA.l $7F1680,x
CODE_A9DAE3:
	LDA.w $0011,y
	BEQ.b CODE_A9DAEC
	STA.l $7F1700,x
CODE_A9DAEC:
	LDA.w $0012,y
	BEQ.b CODE_A9DAF9
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_A9DAF9:
	LDA.w $0013,y
	BEQ.b CODE_A9DB02
	STA.l $7F1880,x
CODE_A9DB02:
	LDA.w $0014,y
	BEQ.b CODE_A9DB0B
	STA.l $7F1900,x
CODE_A9DB0B:
	LDA.w $0015,y
	BEQ.b CODE_A9DB14
	STA.l $7F1980,x
CODE_A9DB14:
	LDA.w $0016,y
	BEQ.b CODE_A9DB21
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_A9DB21:
	LDA.w $0017,y
	BEQ.b CODE_A9DB2A
	STA.l $7F1B00,x
CODE_A9DB2A:
	LDA.w $0018,y
	BEQ.b CODE_A9DB33
	STA.l $7F1B80,x
CODE_A9DB33:
	LDA.w $0019,y
	BEQ.b CODE_A9DB3C
	STA.l $7F1C00,x
CODE_A9DB3C:
	LDA.w $001A,y
	BEQ.b CODE_A9DB45
	STA.l $7F1C80,x
CODE_A9DB45:
	LDA.w $001B,y
	BEQ.b CODE_A9DB52
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_A9DB52:
	LDA.w $001C,y
	BEQ.b CODE_A9DB5B
	STA.l $7F1E00,x
CODE_A9DB5B:
	LDA.w $001D,y
	BEQ.b CODE_A9DB64
	STA.l $7F1E80,x
CODE_A9DB64:
	LDA.w $001E,y
	BEQ.b CODE_A9DB6D
	STA.l $7F1F00,x
CODE_A9DB6D:
	LDA.w $001F,y
	BEQ.b CODE_A9DB7A
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9DB7A:
	LDA.w $0020,y
	BEQ.b CODE_A9DB83
	STA.l $7F2080,x
CODE_A9DB83:
	LDA.w $0021,y
	BEQ.b CODE_A9DB8C
	STA.l $7F2100,x
CODE_A9DB8C:
	LDA.w $0022,y
	BEQ.b CODE_A9DB95
	STA.l $7F2180,x
CODE_A9DB95:
	LDA.w $0023,y
	BEQ.b CODE_A9DB9E
	STA.l $7F2200,x
CODE_A9DB9E:
	LDA.w $0024,y
	BEQ.b CODE_A9DBAB
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_A9DBAB:
	LDA.w $0025,y
	BEQ.b CODE_A9DBB4
	STA.l $7F2380,x
CODE_A9DBB4:
	LDA.w $0026,y
	BEQ.b CODE_A9DBBD
	STA.l $7F2400,x
CODE_A9DBBD:
	LDA.w $0027,y
	BEQ.b CODE_A9DBC6
	STA.l $7F2480,x
CODE_A9DBC6:
	LDA.w $0028,y
	BEQ.b CODE_A9DBCF
	STA.l $7F2500,x
CODE_A9DBCF:
	LDA.w $0029,y
	BEQ.b CODE_A9DBDC
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_A9DBDC:
	LDA.w $002A,y
	BEQ.b CODE_A9DBE5
	STA.l $7F2680,x
CODE_A9DBE5:
	LDA.w $002B,y
	BEQ.b CODE_A9DBEE
	STA.l $7F2700,x
CODE_A9DBEE:
	LDA.w $002C,y
	BEQ.b CODE_A9DBF7
	STA.l $7F2780,x
CODE_A9DBF7:
	LDA.w $002D,y
	BEQ.b CODE_A9DC04
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_A9DC04:
	LDA.w $002E,y
	BEQ.b CODE_A9DC0D
	STA.l $7F2900,x
CODE_A9DC0D:
	LDA.w $002F,y
	BEQ.b CODE_A9DC16
	STA.l $7F2980,x
CODE_A9DC16:
	LDA.w $0030,y
	BEQ.b CODE_A9DC1F
	STA.l $7F2A00,x
CODE_A9DC1F:
	LDA.w $0031,y
	BEQ.b CODE_A9DC28
	STA.l $7F2A80,x
CODE_A9DC28:
	LDA.w $0032,y
	BEQ.b CODE_A9DC35
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_A9DC35:
	LDA.w $0033,y
	BEQ.b CODE_A9DC3E
	STA.l $7F2C00,x
CODE_A9DC3E:
	LDA.w $0034,y
	BEQ.b CODE_A9DC47
	STA.l $7F2C80,x
CODE_A9DC47:
	LDA.w $0035,y
	BEQ.b CODE_A9DC50
	STA.l $7F2D00,x
CODE_A9DC50:
	LDA.w $0036,y
	BEQ.b CODE_A9DC5D
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_A9DC5D:
	LDA.w $0037,y
	BEQ.b CODE_A9DC66
	STA.l $7F2E80,x
CODE_A9DC66:
	LDA.w $0038,y
	BEQ.b CODE_A9DC6F
	STA.l $7F2F00,x
CODE_A9DC6F:
	LDA.w $0039,y
	BEQ.b CODE_A9DC78
	STA.l $7F2F80,x
CODE_A9DC78:
	LDA.w $003A,y
	BEQ.b CODE_A9DC81
	STA.l $7F3000,x
CODE_A9DC81:
	LDA.w $003B,y
	BEQ.b CODE_A9DC8E
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_A9DC8E:
	LDA.w $003C,y
	BEQ.b CODE_A9DC97
	STA.l $7F3180,x
CODE_A9DC97:
	LDA.w $003D,y
	BEQ.b CODE_A9DCA0
	STA.l $7F3200,x
CODE_A9DCA0:
	LDA.w $003E,y
	BEQ.b CODE_A9DCA9
	STA.l $7F3280,x
CODE_A9DCA9:
	LDA.w $003F,y
	BEQ.b CODE_A9DCB2
	STA.l $7F3300,x
CODE_A9DCB2:
	REP.b #$20
	RTL

CODE_A9DCB5:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9DCC4
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_A9DCC4:
	LDA.w $0001,y
	BEQ.b CODE_A9DCCD
	STA.l $7F0D00,x
CODE_A9DCCD:
	LDA.w $0002,y
	BEQ.b CODE_A9DCD6
	STA.l $7F0D80,x
CODE_A9DCD6:
	LDA.w $0003,y
	BEQ.b CODE_A9DCE3
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_A9DCE3:
	LDA.w $0004,y
	BEQ.b CODE_A9DCEC
	STA.l $7F0F00,x
CODE_A9DCEC:
	LDA.w $0005,y
	BEQ.b CODE_A9DCF5
	STA.l $7F0F80,x
CODE_A9DCF5:
	LDA.w $0006,y
	BEQ.b CODE_A9DCFE
	STA.l $7F1000,x
CODE_A9DCFE:
	LDA.w $0007,y
	BEQ.b CODE_A9DD0B
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_A9DD0B:
	LDA.w $0008,y
	BEQ.b CODE_A9DD14
	STA.l $7F1180,x
CODE_A9DD14:
	LDA.w $0009,y
	BEQ.b CODE_A9DD1D
	STA.l $7F1200,x
CODE_A9DD1D:
	LDA.w $000A,y
	BEQ.b CODE_A9DD26
	STA.l $7F1280,x
CODE_A9DD26:
	LDA.w $000B,y
	BEQ.b CODE_A9DD33
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_A9DD33:
	LDA.w $000C,y
	BEQ.b CODE_A9DD3C
	STA.l $7F1400,x
CODE_A9DD3C:
	LDA.w $000D,y
	BEQ.b CODE_A9DD45
	STA.l $7F1480,x
CODE_A9DD45:
	LDA.w $000E,y
	BEQ.b CODE_A9DD4E
	STA.l $7F1500,x
CODE_A9DD4E:
	LDA.w $000F,y
	BEQ.b CODE_A9DD5B
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_A9DD5B:
	LDA.w $0010,y
	BEQ.b CODE_A9DD64
	STA.l $7F1680,x
CODE_A9DD64:
	LDA.w $0011,y
	BEQ.b CODE_A9DD6D
	STA.l $7F1700,x
CODE_A9DD6D:
	LDA.w $0012,y
	BEQ.b CODE_A9DD76
	STA.l $7F1780,x
CODE_A9DD76:
	LDA.w $0013,y
	BEQ.b CODE_A9DD83
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_A9DD83:
	LDA.w $0014,y
	BEQ.b CODE_A9DD8C
	STA.l $7F1900,x
CODE_A9DD8C:
	LDA.w $0015,y
	BEQ.b CODE_A9DD95
	STA.l $7F1980,x
CODE_A9DD95:
	LDA.w $0016,y
	BEQ.b CODE_A9DD9E
	STA.l $7F1A00,x
CODE_A9DD9E:
	LDA.w $0017,y
	BEQ.b CODE_A9DDAB
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_A9DDAB:
	LDA.w $0018,y
	BEQ.b CODE_A9DDB4
	STA.l $7F1B80,x
CODE_A9DDB4:
	LDA.w $0019,y
	BEQ.b CODE_A9DDBD
	STA.l $7F1C00,x
CODE_A9DDBD:
	LDA.w $001A,y
	BEQ.b CODE_A9DDC6
	STA.l $7F1C80,x
CODE_A9DDC6:
	LDA.w $001B,y
	BEQ.b CODE_A9DDD3
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_A9DDD3:
	LDA.w $001C,y
	BEQ.b CODE_A9DDDC
	STA.l $7F1E00,x
CODE_A9DDDC:
	LDA.w $001D,y
	BEQ.b CODE_A9DDE5
	STA.l $7F1E80,x
CODE_A9DDE5:
	LDA.w $001E,y
	BEQ.b CODE_A9DDEE
	STA.l $7F1F00,x
CODE_A9DDEE:
	LDA.w $001F,y
	BEQ.b CODE_A9DDFB
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9DDFB:
	LDA.w $0020,y
	BEQ.b CODE_A9DE04
	STA.l $7F2080,x
CODE_A9DE04:
	LDA.w $0021,y
	BEQ.b CODE_A9DE0D
	STA.l $7F2100,x
CODE_A9DE0D:
	LDA.w $0022,y
	BEQ.b CODE_A9DE16
	STA.l $7F2180,x
CODE_A9DE16:
	LDA.w $0023,y
	BEQ.b CODE_A9DE23
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_A9DE23:
	LDA.w $0024,y
	BEQ.b CODE_A9DE2C
	STA.l $7F2300,x
CODE_A9DE2C:
	LDA.w $0025,y
	BEQ.b CODE_A9DE35
	STA.l $7F2380,x
CODE_A9DE35:
	LDA.w $0026,y
	BEQ.b CODE_A9DE3E
	STA.l $7F2400,x
CODE_A9DE3E:
	LDA.w $0027,y
	BEQ.b CODE_A9DE4B
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_A9DE4B:
	LDA.w $0028,y
	BEQ.b CODE_A9DE54
	STA.l $7F2580,x
CODE_A9DE54:
	LDA.w $0029,y
	BEQ.b CODE_A9DE5D
	STA.l $7F2600,x
CODE_A9DE5D:
	LDA.w $002A,y
	BEQ.b CODE_A9DE66
	STA.l $7F2680,x
CODE_A9DE66:
	LDA.w $002B,y
	BEQ.b CODE_A9DE73
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_A9DE73:
	LDA.w $002C,y
	BEQ.b CODE_A9DE7C
	STA.l $7F2800,x
CODE_A9DE7C:
	LDA.w $002D,y
	BEQ.b CODE_A9DE85
	STA.l $7F2880,x
CODE_A9DE85:
	LDA.w $002E,y
	BEQ.b CODE_A9DE8E
	STA.l $7F2900,x
CODE_A9DE8E:
	LDA.w $002F,y
	BEQ.b CODE_A9DE9B
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_A9DE9B:
	LDA.w $0030,y
	BEQ.b CODE_A9DEA4
	STA.l $7F2A80,x
CODE_A9DEA4:
	LDA.w $0031,y
	BEQ.b CODE_A9DEAD
	STA.l $7F2B00,x
CODE_A9DEAD:
	LDA.w $0032,y
	BEQ.b CODE_A9DEB6
	STA.l $7F2B80,x
CODE_A9DEB6:
	LDA.w $0033,y
	BEQ.b CODE_A9DEC3
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_A9DEC3:
	LDA.w $0034,y
	BEQ.b CODE_A9DECC
	STA.l $7F2D00,x
CODE_A9DECC:
	LDA.w $0035,y
	BEQ.b CODE_A9DED5
	STA.l $7F2D80,x
CODE_A9DED5:
	LDA.w $0036,y
	BEQ.b CODE_A9DEE2
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_A9DEE2:
	LDA.w $0037,y
	BEQ.b CODE_A9DEEB
	STA.l $7F2F00,x
CODE_A9DEEB:
	LDA.w $0038,y
	BEQ.b CODE_A9DEF4
	STA.l $7F2F80,x
CODE_A9DEF4:
	LDA.w $0039,y
	BEQ.b CODE_A9DEFD
	STA.l $7F3000,x
CODE_A9DEFD:
	LDA.w $003A,y
	BEQ.b CODE_A9DF0A
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_A9DF0A:
	LDA.w $003B,y
	BEQ.b CODE_A9DF13
	STA.l $7F3180,x
CODE_A9DF13:
	LDA.w $003C,y
	BEQ.b CODE_A9DF1C
	STA.l $7F3200,x
CODE_A9DF1C:
	LDA.w $003D,y
	BEQ.b CODE_A9DF25
	STA.l $7F3280,x
CODE_A9DF25:
	LDA.w $003E,y
	BEQ.b CODE_A9DF32
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_A9DF32:
	REP.b #$20
	RTL

CODE_A9DF35:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9DF44
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_A9DF44:
	LDA.w $0001,y
	BEQ.b CODE_A9DF4D
	STA.l $7F0C80,x
CODE_A9DF4D:
	LDA.w $0002,y
	BEQ.b CODE_A9DF56
	STA.l $7F0D00,x
CODE_A9DF56:
	LDA.w $0003,y
	BEQ.b CODE_A9DF63
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_A9DF63:
	LDA.w $0004,y
	BEQ.b CODE_A9DF6C
	STA.l $7F0E80,x
CODE_A9DF6C:
	LDA.w $0005,y
	BEQ.b CODE_A9DF75
	STA.l $7F0F00,x
CODE_A9DF75:
	LDA.w $0006,y
	BEQ.b CODE_A9DF82
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_A9DF82:
	LDA.w $0007,y
	BEQ.b CODE_A9DF8B
	STA.l $7F1080,x
CODE_A9DF8B:
	LDA.w $0008,y
	BEQ.b CODE_A9DF94
	STA.l $7F1100,x
CODE_A9DF94:
	LDA.w $0009,y
	BEQ.b CODE_A9DF9D
	STA.l $7F1180,x
CODE_A9DF9D:
	LDA.w $000A,y
	BEQ.b CODE_A9DFAA
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_A9DFAA:
	LDA.w $000B,y
	BEQ.b CODE_A9DFB3
	STA.l $7F1300,x
CODE_A9DFB3:
	LDA.w $000C,y
	BEQ.b CODE_A9DFBC
	STA.l $7F1380,x
CODE_A9DFBC:
	LDA.w $000D,y
	BEQ.b CODE_A9DFC9
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_A9DFC9:
	LDA.w $000E,y
	BEQ.b CODE_A9DFD2
	STA.l $7F1500,x
CODE_A9DFD2:
	LDA.w $000F,y
	BEQ.b CODE_A9DFDB
	STA.l $7F1580,x
CODE_A9DFDB:
	LDA.w $0010,y
	BEQ.b CODE_A9DFE4
	STA.l $7F1600,x
CODE_A9DFE4:
	LDA.w $0011,y
	BEQ.b CODE_A9DFF1
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_A9DFF1:
	LDA.w $0012,y
	BEQ.b CODE_A9DFFA
	STA.l $7F1780,x
CODE_A9DFFA:
	LDA.w $0013,y
	BEQ.b CODE_A9E003
	STA.l $7F1800,x
CODE_A9E003:
	LDA.w $0014,y
	BEQ.b CODE_A9E010
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_A9E010:
	LDA.w $0015,y
	BEQ.b CODE_A9E019
	STA.l $7F1980,x
CODE_A9E019:
	LDA.w $0016,y
	BEQ.b CODE_A9E022
	STA.l $7F1A00,x
CODE_A9E022:
	LDA.w $0017,y
	BEQ.b CODE_A9E02B
	STA.l $7F1A80,x
CODE_A9E02B:
	LDA.w $0018,y
	BEQ.b CODE_A9E038
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_A9E038:
	LDA.w $0019,y
	BEQ.b CODE_A9E041
	STA.l $7F1C00,x
CODE_A9E041:
	LDA.w $001A,y
	BEQ.b CODE_A9E04A
	STA.l $7F1C80,x
CODE_A9E04A:
	LDA.w $001B,y
	BEQ.b CODE_A9E057
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_A9E057:
	LDA.w $001C,y
	BEQ.b CODE_A9E060
	STA.l $7F1E00,x
CODE_A9E060:
	LDA.w $001D,y
	BEQ.b CODE_A9E069
	STA.l $7F1E80,x
CODE_A9E069:
	LDA.w $001E,y
	BEQ.b CODE_A9E072
	STA.l $7F1F00,x
CODE_A9E072:
	LDA.w $001F,y
	BEQ.b CODE_A9E07F
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9E07F:
	LDA.w $0020,y
	BEQ.b CODE_A9E088
	STA.l $7F2080,x
CODE_A9E088:
	LDA.w $0021,y
	BEQ.b CODE_A9E091
	STA.l $7F2100,x
CODE_A9E091:
	LDA.w $0022,y
	BEQ.b CODE_A9E09E
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_A9E09E:
	LDA.w $0023,y
	BEQ.b CODE_A9E0A7
	STA.l $7F2280,x
CODE_A9E0A7:
	LDA.w $0024,y
	BEQ.b CODE_A9E0B0
	STA.l $7F2300,x
CODE_A9E0B0:
	LDA.w $0025,y
	BEQ.b CODE_A9E0B9
	STA.l $7F2380,x
CODE_A9E0B9:
	LDA.w $0026,y
	BEQ.b CODE_A9E0C6
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_A9E0C6:
	LDA.w $0027,y
	BEQ.b CODE_A9E0CF
	STA.l $7F2500,x
CODE_A9E0CF:
	LDA.w $0028,y
	BEQ.b CODE_A9E0D8
	STA.l $7F2580,x
CODE_A9E0D8:
	LDA.w $0029,y
	BEQ.b CODE_A9E0E5
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_A9E0E5:
	LDA.w $002A,y
	BEQ.b CODE_A9E0EE
	STA.l $7F2700,x
CODE_A9E0EE:
	LDA.w $002B,y
	BEQ.b CODE_A9E0F7
	STA.l $7F2780,x
CODE_A9E0F7:
	LDA.w $002C,y
	BEQ.b CODE_A9E100
	STA.l $7F2800,x
CODE_A9E100:
	LDA.w $002D,y
	BEQ.b CODE_A9E10D
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_A9E10D:
	LDA.w $002E,y
	BEQ.b CODE_A9E116
	STA.l $7F2980,x
CODE_A9E116:
	LDA.w $002F,y
	BEQ.b CODE_A9E11F
	STA.l $7F2A00,x
CODE_A9E11F:
	LDA.w $0030,y
	BEQ.b CODE_A9E12C
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_A9E12C:
	LDA.w $0031,y
	BEQ.b CODE_A9E135
	STA.l $7F2B80,x
CODE_A9E135:
	LDA.w $0032,y
	BEQ.b CODE_A9E13E
	STA.l $7F2C00,x
CODE_A9E13E:
	LDA.w $0033,y
	BEQ.b CODE_A9E147
	STA.l $7F2C80,x
CODE_A9E147:
	LDA.w $0034,y
	BEQ.b CODE_A9E154
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_A9E154:
	LDA.w $0035,y
	BEQ.b CODE_A9E15D
	STA.l $7F2E00,x
CODE_A9E15D:
	LDA.w $0036,y
	BEQ.b CODE_A9E166
	STA.l $7F2E80,x
CODE_A9E166:
	LDA.w $0037,y
	BEQ.b CODE_A9E173
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_A9E173:
	LDA.w $0038,y
	BEQ.b CODE_A9E17C
	STA.l $7F3000,x
CODE_A9E17C:
	LDA.w $0039,y
	BEQ.b CODE_A9E185
	STA.l $7F3080,x
CODE_A9E185:
	LDA.w $003A,y
	BEQ.b CODE_A9E18E
	STA.l $7F3100,x
CODE_A9E18E:
	LDA.w $003B,y
	BEQ.b CODE_A9E19B
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_A9E19B:
	LDA.w $003C,y
	BEQ.b CODE_A9E1A4
	STA.l $7F3280,x
CODE_A9E1A4:
	LDA.w $003D,y
	BEQ.b CODE_A9E1AD
	STA.l $7F3300,x
CODE_A9E1AD:
	LDA.w $003E,y
	BEQ.b CODE_A9E1BA
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_A9E1BA:
	REP.b #$20
	RTL

CODE_A9E1BD:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9E1CC
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_A9E1CC:
	LDA.w $0001,y
	BEQ.b CODE_A9E1D5
	STA.l $7F0C00,x
CODE_A9E1D5:
	LDA.w $0002,y
	BEQ.b CODE_A9E1DE
	STA.l $7F0C80,x
CODE_A9E1DE:
	LDA.w $0003,y
	BEQ.b CODE_A9E1EB
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_A9E1EB:
	LDA.w $0004,y
	BEQ.b CODE_A9E1F4
	STA.l $7F0E00,x
CODE_A9E1F4:
	LDA.w $0005,y
	BEQ.b CODE_A9E1FD
	STA.l $7F0E80,x
CODE_A9E1FD:
	LDA.w $0006,y
	BEQ.b CODE_A9E20A
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_A9E20A:
	LDA.w $0007,y
	BEQ.b CODE_A9E213
	STA.l $7F1000,x
CODE_A9E213:
	LDA.w $0008,y
	BEQ.b CODE_A9E21C
	STA.l $7F1080,x
CODE_A9E21C:
	LDA.w $0009,y
	BEQ.b CODE_A9E229
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_A9E229:
	LDA.w $000A,y
	BEQ.b CODE_A9E232
	STA.l $7F1200,x
CODE_A9E232:
	LDA.w $000B,y
	BEQ.b CODE_A9E23B
	STA.l $7F1280,x
CODE_A9E23B:
	LDA.w $000C,y
	BEQ.b CODE_A9E248
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_A9E248:
	LDA.w $000D,y
	BEQ.b CODE_A9E251
	STA.l $7F1400,x
CODE_A9E251:
	LDA.w $000E,y
	BEQ.b CODE_A9E25A
	STA.l $7F1480,x
CODE_A9E25A:
	LDA.w $000F,y
	BEQ.b CODE_A9E267
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_A9E267:
	LDA.w $0010,y
	BEQ.b CODE_A9E270
	STA.l $7F1600,x
CODE_A9E270:
	LDA.w $0011,y
	BEQ.b CODE_A9E279
	STA.l $7F1680,x
CODE_A9E279:
	LDA.w $0012,y
	BEQ.b CODE_A9E282
	STA.l $7F1700,x
CODE_A9E282:
	LDA.w $0013,y
	BEQ.b CODE_A9E28F
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_A9E28F:
	LDA.w $0014,y
	BEQ.b CODE_A9E298
	STA.l $7F1880,x
CODE_A9E298:
	LDA.w $0015,y
	BEQ.b CODE_A9E2A1
	STA.l $7F1900,x
CODE_A9E2A1:
	LDA.w $0016,y
	BEQ.b CODE_A9E2AE
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_A9E2AE:
	LDA.w $0017,y
	BEQ.b CODE_A9E2B7
	STA.l $7F1A80,x
CODE_A9E2B7:
	LDA.w $0018,y
	BEQ.b CODE_A9E2C0
	STA.l $7F1B00,x
CODE_A9E2C0:
	LDA.w $0019,y
	BEQ.b CODE_A9E2CD
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_A9E2CD:
	LDA.w $001A,y
	BEQ.b CODE_A9E2D6
	STA.l $7F1C80,x
CODE_A9E2D6:
	LDA.w $001B,y
	BEQ.b CODE_A9E2DF
	STA.l $7F1D00,x
CODE_A9E2DF:
	LDA.w $001C,y
	BEQ.b CODE_A9E2EC
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_A9E2EC:
	LDA.w $001D,y
	BEQ.b CODE_A9E2F5
	STA.l $7F1E80,x
CODE_A9E2F5:
	LDA.w $001E,y
	BEQ.b CODE_A9E2FE
	STA.l $7F1F00,x
CODE_A9E2FE:
	LDA.w $001F,y
	BEQ.b CODE_A9E30B
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9E30B:
	LDA.w $0020,y
	BEQ.b CODE_A9E314
	STA.l $7F2080,x
CODE_A9E314:
	LDA.w $0021,y
	BEQ.b CODE_A9E31D
	STA.l $7F2100,x
CODE_A9E31D:
	LDA.w $0022,y
	BEQ.b CODE_A9E326
	STA.l $7F2180,x
CODE_A9E326:
	LDA.w $0023,y
	BEQ.b CODE_A9E333
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_A9E333:
	LDA.w $0024,y
	BEQ.b CODE_A9E33C
	STA.l $7F2300,x
CODE_A9E33C:
	LDA.w $0025,y
	BEQ.b CODE_A9E345
	STA.l $7F2380,x
CODE_A9E345:
	LDA.w $0026,y
	BEQ.b CODE_A9E352
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_A9E352:
	LDA.w $0027,y
	BEQ.b CODE_A9E35B
	STA.l $7F2500,x
CODE_A9E35B:
	LDA.w $0028,y
	BEQ.b CODE_A9E364
	STA.l $7F2580,x
CODE_A9E364:
	LDA.w $0029,y
	BEQ.b CODE_A9E371
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_A9E371:
	LDA.w $002A,y
	BEQ.b CODE_A9E37A
	STA.l $7F2700,x
CODE_A9E37A:
	LDA.w $002B,y
	BEQ.b CODE_A9E383
	STA.l $7F2780,x
CODE_A9E383:
	LDA.w $002C,y
	BEQ.b CODE_A9E390
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_A9E390:
	LDA.w $002D,y
	BEQ.b CODE_A9E399
	STA.l $7F2900,x
CODE_A9E399:
	LDA.w $002E,y
	BEQ.b CODE_A9E3A2
	STA.l $7F2980,x
CODE_A9E3A2:
	LDA.w $002F,y
	BEQ.b CODE_A9E3AF
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_A9E3AF:
	LDA.w $0030,y
	BEQ.b CODE_A9E3B8
	STA.l $7F2B00,x
CODE_A9E3B8:
	LDA.w $0031,y
	BEQ.b CODE_A9E3C1
	STA.l $7F2B80,x
CODE_A9E3C1:
	LDA.w $0032,y
	BEQ.b CODE_A9E3CA
	STA.l $7F2C00,x
CODE_A9E3CA:
	LDA.w $0033,y
	BEQ.b CODE_A9E3D7
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_A9E3D7:
	LDA.w $0034,y
	BEQ.b CODE_A9E3E0
	STA.l $7F2D80,x
CODE_A9E3E0:
	LDA.w $0035,y
	BEQ.b CODE_A9E3E9
	STA.l $7F2E00,x
CODE_A9E3E9:
	LDA.w $0036,y
	BEQ.b CODE_A9E3F6
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_A9E3F6:
	LDA.w $0037,y
	BEQ.b CODE_A9E3FF
	STA.l $7F2F80,x
CODE_A9E3FF:
	LDA.w $0038,y
	BEQ.b CODE_A9E408
	STA.l $7F3000,x
CODE_A9E408:
	LDA.w $0039,y
	BEQ.b CODE_A9E415
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_A9E415:
	LDA.w $003A,y
	BEQ.b CODE_A9E41E
	STA.l $7F3180,x
CODE_A9E41E:
	LDA.w $003B,y
	BEQ.b CODE_A9E427
	STA.l $7F3200,x
CODE_A9E427:
	LDA.w $003C,y
	BEQ.b CODE_A9E434
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_A9E434:
	LDA.w $003D,y
	BEQ.b CODE_A9E43D
	STA.l $7F3380,x
CODE_A9E43D:
	LDA.w $003E,y
	BEQ.b CODE_A9E446
	STA.l $7F3400,x
CODE_A9E446:
	LDA.w $003F,y
	BEQ.b CODE_A9E44F
	STA.l $7F3480,x
CODE_A9E44F:
	REP.b #$20
	RTL

CODE_A9E452:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9E461
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_A9E461:
	LDA.w $0001,y
	BEQ.b CODE_A9E46A
	STA.l $7F0B80,x
CODE_A9E46A:
	LDA.w $0002,y
	BEQ.b CODE_A9E477
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_A9E477:
	LDA.w $0003,y
	BEQ.b CODE_A9E480
	STA.l $7F0D00,x
CODE_A9E480:
	LDA.w $0004,y
	BEQ.b CODE_A9E489
	STA.l $7F0D80,x
CODE_A9E489:
	LDA.w $0005,y
	BEQ.b CODE_A9E496
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_A9E496:
	LDA.w $0006,y
	BEQ.b CODE_A9E49F
	STA.l $7F0F00,x
CODE_A9E49F:
	LDA.w $0007,y
	BEQ.b CODE_A9E4A8
	STA.l $7F0F80,x
CODE_A9E4A8:
	LDA.w $0008,y
	BEQ.b CODE_A9E4B5
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_A9E4B5:
	LDA.w $0009,y
	BEQ.b CODE_A9E4BE
	STA.l $7F1100,x
CODE_A9E4BE:
	LDA.w $000A,y
	BEQ.b CODE_A9E4C7
	STA.l $7F1180,x
CODE_A9E4C7:
	LDA.w $000B,y
	BEQ.b CODE_A9E4D4
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_A9E4D4:
	LDA.w $000C,y
	BEQ.b CODE_A9E4DD
	STA.l $7F1300,x
CODE_A9E4DD:
	LDA.w $000D,y
	BEQ.b CODE_A9E4E6
	STA.l $7F1380,x
CODE_A9E4E6:
	LDA.w $000E,y
	BEQ.b CODE_A9E4F3
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_A9E4F3:
	LDA.w $000F,y
	BEQ.b CODE_A9E4FC
	STA.l $7F1500,x
CODE_A9E4FC:
	LDA.w $0010,y
	BEQ.b CODE_A9E505
	STA.l $7F1580,x
CODE_A9E505:
	LDA.w $0011,y
	BEQ.b CODE_A9E512
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_A9E512:
	LDA.w $0012,y
	BEQ.b CODE_A9E51B
	STA.l $7F1700,x
CODE_A9E51B:
	LDA.w $0013,y
	BEQ.b CODE_A9E524
	STA.l $7F1780,x
CODE_A9E524:
	LDA.w $0014,y
	BEQ.b CODE_A9E531
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_A9E531:
	LDA.w $0015,y
	BEQ.b CODE_A9E53A
	STA.l $7F1900,x
CODE_A9E53A:
	LDA.w $0016,y
	BEQ.b CODE_A9E543
	STA.l $7F1980,x
CODE_A9E543:
	LDA.w $0017,y
	BEQ.b CODE_A9E550
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_A9E550:
	LDA.w $0018,y
	BEQ.b CODE_A9E559
	STA.l $7F1B00,x
CODE_A9E559:
	LDA.w $0019,y
	BEQ.b CODE_A9E566
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_A9E566:
	LDA.w $001A,y
	BEQ.b CODE_A9E56F
	STA.l $7F1C80,x
CODE_A9E56F:
	LDA.w $001B,y
	BEQ.b CODE_A9E578
	STA.l $7F1D00,x
CODE_A9E578:
	LDA.w $001C,y
	BEQ.b CODE_A9E585
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_A9E585:
	LDA.w $001D,y
	BEQ.b CODE_A9E58E
	STA.l $7F1E80,x
CODE_A9E58E:
	LDA.w $001E,y
	BEQ.b CODE_A9E597
	STA.l $7F1F00,x
CODE_A9E597:
	LDA.w $001F,y
	BEQ.b CODE_A9E5A4
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9E5A4:
	LDA.w $0020,y
	BEQ.b CODE_A9E5AD
	STA.l $7F2080,x
CODE_A9E5AD:
	LDA.w $0021,y
	BEQ.b CODE_A9E5B6
	STA.l $7F2100,x
CODE_A9E5B6:
	LDA.w $0022,y
	BEQ.b CODE_A9E5C3
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_A9E5C3:
	LDA.w $0023,y
	BEQ.b CODE_A9E5CC
	STA.l $7F2280,x
CODE_A9E5CC:
	LDA.w $0024,y
	BEQ.b CODE_A9E5D5
	STA.l $7F2300,x
CODE_A9E5D5:
	LDA.w $0025,y
	BEQ.b CODE_A9E5E2
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_A9E5E2:
	LDA.w $0026,y
	BEQ.b CODE_A9E5EB
	STA.l $7F2480,x
CODE_A9E5EB:
	LDA.w $0027,y
	BEQ.b CODE_A9E5F4
	STA.l $7F2500,x
CODE_A9E5F4:
	LDA.w $0028,y
	BEQ.b CODE_A9E601
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_A9E601:
	LDA.w $0029,y
	BEQ.b CODE_A9E60A
	STA.l $7F2680,x
CODE_A9E60A:
	LDA.w $002A,y
	BEQ.b CODE_A9E613
	STA.l $7F2700,x
CODE_A9E613:
	LDA.w $002B,y
	BEQ.b CODE_A9E620
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_A9E620:
	LDA.w $002C,y
	BEQ.b CODE_A9E629
	STA.l $7F2880,x
CODE_A9E629:
	LDA.w $002D,y
	BEQ.b CODE_A9E632
	STA.l $7F2900,x
CODE_A9E632:
	LDA.w $002E,y
	BEQ.b CODE_A9E63F
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_A9E63F:
	LDA.w $002F,y
	BEQ.b CODE_A9E648
	STA.l $7F2A80,x
CODE_A9E648:
	LDA.w $0030,y
	BEQ.b CODE_A9E655
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_A9E655:
	LDA.w $0031,y
	BEQ.b CODE_A9E65E
	STA.l $7F2C00,x
CODE_A9E65E:
	LDA.w $0032,y
	BEQ.b CODE_A9E667
	STA.l $7F2C80,x
CODE_A9E667:
	LDA.w $0033,y
	BEQ.b CODE_A9E674
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_A9E674:
	LDA.w $0034,y
	BEQ.b CODE_A9E67D
	STA.l $7F2E00,x
CODE_A9E67D:
	LDA.w $0035,y
	BEQ.b CODE_A9E686
	STA.l $7F2E80,x
CODE_A9E686:
	LDA.w $0036,y
	BEQ.b CODE_A9E693
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_A9E693:
	LDA.w $0037,y
	BEQ.b CODE_A9E69C
	STA.l $7F3000,x
CODE_A9E69C:
	LDA.w $0038,y
	BEQ.b CODE_A9E6A5
	STA.l $7F3080,x
CODE_A9E6A5:
	LDA.w $0039,y
	BEQ.b CODE_A9E6B2
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_A9E6B2:
	LDA.w $003A,y
	BEQ.b CODE_A9E6BB
	STA.l $7F3200,x
CODE_A9E6BB:
	LDA.w $003B,y
	BEQ.b CODE_A9E6C4
	STA.l $7F3280,x
CODE_A9E6C4:
	LDA.w $003C,y
	BEQ.b CODE_A9E6D1
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_A9E6D1:
	LDA.w $003D,y
	BEQ.b CODE_A9E6DA
	STA.l $7F3400,x
CODE_A9E6DA:
	LDA.w $003E,y
	BEQ.b CODE_A9E6E3
	STA.l $7F3480,x
CODE_A9E6E3:
	LDA.w $003F,y
	BEQ.b CODE_A9E6EC
	STA.l $7F3500,x
CODE_A9E6EC:
	REP.b #$20
	RTL

CODE_A9E6EF:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9E6FE
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_A9E6FE:
	LDA.w $0001,y
	BEQ.b CODE_A9E707
	STA.l $7F0B00,x
CODE_A9E707:
	LDA.w $0002,y
	BEQ.b CODE_A9E714
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_A9E714:
	LDA.w $0003,y
	BEQ.b CODE_A9E71D
	STA.l $7F0C80,x
CODE_A9E71D:
	LDA.w $0004,y
	BEQ.b CODE_A9E726
	STA.l $7F0D00,x
CODE_A9E726:
	LDA.w $0005,y
	BEQ.b CODE_A9E733
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_A9E733:
	LDA.w $0006,y
	BEQ.b CODE_A9E73C
	STA.l $7F0E80,x
CODE_A9E73C:
	LDA.w $0007,y
	BEQ.b CODE_A9E749
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_A9E749:
	LDA.w $0008,y
	BEQ.b CODE_A9E752
	STA.l $7F1000,x
CODE_A9E752:
	LDA.w $0009,y
	BEQ.b CODE_A9E75B
	STA.l $7F1080,x
CODE_A9E75B:
	LDA.w $000A,y
	BEQ.b CODE_A9E768
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_A9E768:
	LDA.w $000B,y
	BEQ.b CODE_A9E771
	STA.l $7F1200,x
CODE_A9E771:
	LDA.w $000C,y
	BEQ.b CODE_A9E77A
	STA.l $7F1280,x
CODE_A9E77A:
	LDA.w $000D,y
	BEQ.b CODE_A9E787
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_A9E787:
	LDA.w $000E,y
	BEQ.b CODE_A9E790
	STA.l $7F1400,x
CODE_A9E790:
	LDA.w $000F,y
	BEQ.b CODE_A9E79D
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_A9E79D:
	LDA.w $0010,y
	BEQ.b CODE_A9E7A6
	STA.l $7F1580,x
CODE_A9E7A6:
	LDA.w $0011,y
	BEQ.b CODE_A9E7AF
	STA.l $7F1600,x
CODE_A9E7AF:
	LDA.w $0012,y
	BEQ.b CODE_A9E7BC
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_A9E7BC:
	LDA.w $0013,y
	BEQ.b CODE_A9E7C5
	STA.l $7F1780,x
CODE_A9E7C5:
	LDA.w $0014,y
	BEQ.b CODE_A9E7CE
	STA.l $7F1800,x
CODE_A9E7CE:
	LDA.w $0015,y
	BEQ.b CODE_A9E7DB
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_A9E7DB:
	LDA.w $0016,y
	BEQ.b CODE_A9E7E4
	STA.l $7F1980,x
CODE_A9E7E4:
	LDA.w $0017,y
	BEQ.b CODE_A9E7F1
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_A9E7F1:
	LDA.w $0018,y
	BEQ.b CODE_A9E7FA
	STA.l $7F1B00,x
CODE_A9E7FA:
	LDA.w $0019,y
	BEQ.b CODE_A9E803
	STA.l $7F1B80,x
CODE_A9E803:
	LDA.w $001A,y
	BEQ.b CODE_A9E810
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_A9E810:
	LDA.w $001B,y
	BEQ.b CODE_A9E819
	STA.l $7F1D00,x
CODE_A9E819:
	LDA.w $001C,y
	BEQ.b CODE_A9E822
	STA.l $7F1D80,x
CODE_A9E822:
	LDA.w $001D,y
	BEQ.b CODE_A9E82F
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_A9E82F:
	LDA.w $001E,y
	BEQ.b CODE_A9E838
	STA.l $7F1F00,x
CODE_A9E838:
	LDA.w $001F,y
	BEQ.b CODE_A9E845
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9E845:
	LDA.w $0020,y
	BEQ.b CODE_A9E84E
	STA.l $7F2080,x
CODE_A9E84E:
	LDA.w $0021,y
	BEQ.b CODE_A9E857
	STA.l $7F2100,x
CODE_A9E857:
	LDA.w $0022,y
	BEQ.b CODE_A9E864
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_A9E864:
	LDA.w $0023,y
	BEQ.b CODE_A9E86D
	STA.l $7F2280,x
CODE_A9E86D:
	LDA.w $0024,y
	BEQ.b CODE_A9E876
	STA.l $7F2300,x
CODE_A9E876:
	LDA.w $0025,y
	BEQ.b CODE_A9E883
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_A9E883:
	LDA.w $0026,y
	BEQ.b CODE_A9E88C
	STA.l $7F2480,x
CODE_A9E88C:
	LDA.w $0027,y
	BEQ.b CODE_A9E899
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_A9E899:
	LDA.w $0028,y
	BEQ.b CODE_A9E8A2
	STA.l $7F2600,x
CODE_A9E8A2:
	LDA.w $0029,y
	BEQ.b CODE_A9E8AB
	STA.l $7F2680,x
CODE_A9E8AB:
	LDA.w $002A,y
	BEQ.b CODE_A9E8B8
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_A9E8B8:
	LDA.w $002B,y
	BEQ.b CODE_A9E8C1
	STA.l $7F2800,x
CODE_A9E8C1:
	LDA.w $002C,y
	BEQ.b CODE_A9E8CA
	STA.l $7F2880,x
CODE_A9E8CA:
	LDA.w $002D,y
	BEQ.b CODE_A9E8D7
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_A9E8D7:
	LDA.w $002E,y
	BEQ.b CODE_A9E8E0
	STA.l $7F2A00,x
CODE_A9E8E0:
	LDA.w $002F,y
	BEQ.b CODE_A9E8ED
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_A9E8ED:
	LDA.w $0030,y
	BEQ.b CODE_A9E8F6
	STA.l $7F2B80,x
CODE_A9E8F6:
	LDA.w $0031,y
	BEQ.b CODE_A9E8FF
	STA.l $7F2C00,x
CODE_A9E8FF:
	LDA.w $0032,y
	BEQ.b CODE_A9E90C
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_A9E90C:
	LDA.w $0033,y
	BEQ.b CODE_A9E915
	STA.l $7F2D80,x
CODE_A9E915:
	LDA.w $0034,y
	BEQ.b CODE_A9E91E
	STA.l $7F2E00,x
CODE_A9E91E:
	LDA.w $0035,y
	BEQ.b CODE_A9E92B
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_A9E92B:
	LDA.w $0036,y
	BEQ.b CODE_A9E934
	STA.l $7F2F80,x
CODE_A9E934:
	LDA.w $0037,y
	BEQ.b CODE_A9E941
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_A9E941:
	LDA.w $0038,y
	BEQ.b CODE_A9E94A
	STA.l $7F3100,x
CODE_A9E94A:
	LDA.w $0039,y
	BEQ.b CODE_A9E953
	STA.l $7F3180,x
CODE_A9E953:
	LDA.w $003A,y
	BEQ.b CODE_A9E960
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_A9E960:
	LDA.w $003B,y
	BEQ.b CODE_A9E969
	STA.l $7F3300,x
CODE_A9E969:
	LDA.w $003C,y
	BEQ.b CODE_A9E972
	STA.l $7F3380,x
CODE_A9E972:
	LDA.w $003D,y
	BEQ.b CODE_A9E97F
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_A9E97F:
	LDA.w $003E,y
	BEQ.b CODE_A9E988
	STA.l $7F3500,x
CODE_A9E988:
	LDA.w $003F,y
	BEQ.b CODE_A9E991
	STA.l $7F3580,x
CODE_A9E991:
	REP.b #$20
	RTL

CODE_A9E994:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9E9A3
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_A9E9A3:
	LDA.w $0001,y
	BEQ.b CODE_A9E9AC
	STA.l $7F0A80,x
CODE_A9E9AC:
	LDA.w $0002,y
	BEQ.b CODE_A9E9B9
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_A9E9B9:
	LDA.w $0003,y
	BEQ.b CODE_A9E9C2
	STA.l $7F0C00,x
CODE_A9E9C2:
	LDA.w $0004,y
	BEQ.b CODE_A9E9CF
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_A9E9CF:
	LDA.w $0005,y
	BEQ.b CODE_A9E9D8
	STA.l $7F0D80,x
CODE_A9E9D8:
	LDA.w $0006,y
	BEQ.b CODE_A9E9E1
	STA.l $7F0E00,x
CODE_A9E9E1:
	LDA.w $0007,y
	BEQ.b CODE_A9E9EE
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_A9E9EE:
	LDA.w $0008,y
	BEQ.b CODE_A9E9F7
	STA.l $7F0F80,x
CODE_A9E9F7:
	LDA.w $0009,y
	BEQ.b CODE_A9EA04
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_A9EA04:
	LDA.w $000A,y
	BEQ.b CODE_A9EA0D
	STA.l $7F1100,x
CODE_A9EA0D:
	LDA.w $000B,y
	BEQ.b CODE_A9EA16
	STA.l $7F1180,x
CODE_A9EA16:
	LDA.w $000C,y
	BEQ.b CODE_A9EA23
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_A9EA23:
	LDA.w $000D,y
	BEQ.b CODE_A9EA2C
	STA.l $7F1300,x
CODE_A9EA2C:
	LDA.w $000E,y
	BEQ.b CODE_A9EA39
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_A9EA39:
	LDA.w $000F,y
	BEQ.b CODE_A9EA42
	STA.l $7F1480,x
CODE_A9EA42:
	LDA.w $0010,y
	BEQ.b CODE_A9EA4B
	STA.l $7F1500,x
CODE_A9EA4B:
	LDA.w $0011,y
	BEQ.b CODE_A9EA58
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_A9EA58:
	LDA.w $0012,y
	BEQ.b CODE_A9EA61
	STA.l $7F1680,x
CODE_A9EA61:
	LDA.w $0013,y
	BEQ.b CODE_A9EA6E
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_A9EA6E:
	LDA.w $0014,y
	BEQ.b CODE_A9EA77
	STA.l $7F1800,x
CODE_A9EA77:
	LDA.w $0015,y
	BEQ.b CODE_A9EA80
	STA.l $7F1880,x
CODE_A9EA80:
	LDA.w $0016,y
	BEQ.b CODE_A9EA8D
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_A9EA8D:
	LDA.w $0017,y
	BEQ.b CODE_A9EA96
	STA.l $7F1A00,x
CODE_A9EA96:
	LDA.w $0018,y
	BEQ.b CODE_A9EAA3
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_A9EAA3:
	LDA.w $0019,y
	BEQ.b CODE_A9EAAC
	STA.l $7F1B80,x
CODE_A9EAAC:
	LDA.w $001A,y
	BEQ.b CODE_A9EAB5
	STA.l $7F1C00,x
CODE_A9EAB5:
	LDA.w $001B,y
	BEQ.b CODE_A9EAC2
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_A9EAC2:
	LDA.w $001C,y
	BEQ.b CODE_A9EACB
	STA.l $7F1D80,x
CODE_A9EACB:
	LDA.w $001D,y
	BEQ.b CODE_A9EAD8
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_A9EAD8:
	LDA.w $001E,y
	BEQ.b CODE_A9EAE1
	STA.l $7F1F00,x
CODE_A9EAE1:
	LDA.w $001F,y
	BEQ.b CODE_A9EAEE
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9EAEE:
	LDA.w $0020,y
	BEQ.b CODE_A9EAF7
	STA.l $7F2080,x
CODE_A9EAF7:
	LDA.w $0021,y
	BEQ.b CODE_A9EB00
	STA.l $7F2100,x
CODE_A9EB00:
	LDA.w $0022,y
	BEQ.b CODE_A9EB0D
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_A9EB0D:
	LDA.w $0023,y
	BEQ.b CODE_A9EB16
	STA.l $7F2280,x
CODE_A9EB16:
	LDA.w $0024,y
	BEQ.b CODE_A9EB23
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_A9EB23:
	LDA.w $0025,y
	BEQ.b CODE_A9EB2C
	STA.l $7F2400,x
CODE_A9EB2C:
	LDA.w $0026,y
	BEQ.b CODE_A9EB35
	STA.l $7F2480,x
CODE_A9EB35:
	LDA.w $0027,y
	BEQ.b CODE_A9EB42
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_A9EB42:
	LDA.w $0028,y
	BEQ.b CODE_A9EB4B
	STA.l $7F2600,x
CODE_A9EB4B:
	LDA.w $0029,y
	BEQ.b CODE_A9EB58
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_A9EB58:
	LDA.w $002A,y
	BEQ.b CODE_A9EB61
	STA.l $7F2780,x
CODE_A9EB61:
	LDA.w $002B,y
	BEQ.b CODE_A9EB6A
	STA.l $7F2800,x
CODE_A9EB6A:
	LDA.w $002C,y
	BEQ.b CODE_A9EB77
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_A9EB77:
	LDA.w $002D,y
	BEQ.b CODE_A9EB80
	STA.l $7F2980,x
CODE_A9EB80:
	LDA.w $002E,y
	BEQ.b CODE_A9EB8D
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_A9EB8D:
	LDA.w $002F,y
	BEQ.b CODE_A9EB96
	STA.l $7F2B00,x
CODE_A9EB96:
	LDA.w $0030,y
	BEQ.b CODE_A9EB9F
	STA.l $7F2B80,x
CODE_A9EB9F:
	LDA.w $0031,y
	BEQ.b CODE_A9EBAC
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_A9EBAC:
	LDA.w $0032,y
	BEQ.b CODE_A9EBB5
	STA.l $7F2D00,x
CODE_A9EBB5:
	LDA.w $0033,y
	BEQ.b CODE_A9EBC2
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_A9EBC2:
	LDA.w $0034,y
	BEQ.b CODE_A9EBCB
	STA.l $7F2E80,x
CODE_A9EBCB:
	LDA.w $0035,y
	BEQ.b CODE_A9EBD4
	STA.l $7F2F00,x
CODE_A9EBD4:
	LDA.w $0036,y
	BEQ.b CODE_A9EBE1
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_A9EBE1:
	LDA.w $0037,y
	BEQ.b CODE_A9EBEA
	STA.l $7F3080,x
CODE_A9EBEA:
	LDA.w $0038,y
	BEQ.b CODE_A9EBF7
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_A9EBF7:
	LDA.w $0039,y
	BEQ.b CODE_A9EC00
	STA.l $7F3200,x
CODE_A9EC00:
	LDA.w $003A,y
	BEQ.b CODE_A9EC09
	STA.l $7F3280,x
CODE_A9EC09:
	LDA.w $003B,y
	BEQ.b CODE_A9EC16
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_A9EC16:
	LDA.w $003C,y
	BEQ.b CODE_A9EC1F
	STA.l $7F3400,x
CODE_A9EC1F:
	LDA.w $003D,y
	BEQ.b CODE_A9EC2C
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_A9EC2C:
	LDA.w $003E,y
	BEQ.b CODE_A9EC35
	STA.l $7F3580,x
CODE_A9EC35:
	LDA.w $003F,y
	BEQ.b CODE_A9EC3E
	STA.l $7F3600,x
CODE_A9EC3E:
	REP.b #$20
	RTL

CODE_A9EC41:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9EC50
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_A9EC50:
	LDA.w $0001,y
	BEQ.b CODE_A9EC59
	STA.l $7F0A00,x
CODE_A9EC59:
	LDA.w $0002,y
	BEQ.b CODE_A9EC66
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_A9EC66:
	LDA.w $0003,y
	BEQ.b CODE_A9EC6F
	STA.l $7F0B80,x
CODE_A9EC6F:
	LDA.w $0004,y
	BEQ.b CODE_A9EC7C
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_A9EC7C:
	LDA.w $0005,y
	BEQ.b CODE_A9EC85
	STA.l $7F0D00,x
CODE_A9EC85:
	LDA.w $0006,y
	BEQ.b CODE_A9EC92
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_A9EC92:
	LDA.w $0007,y
	BEQ.b CODE_A9EC9B
	STA.l $7F0E80,x
CODE_A9EC9B:
	LDA.w $0008,y
	BEQ.b CODE_A9ECA4
	STA.l $7F0F00,x
CODE_A9ECA4:
	LDA.w $0009,y
	BEQ.b CODE_A9ECB1
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_A9ECB1:
	LDA.w $000A,y
	BEQ.b CODE_A9ECBA
	STA.l $7F1080,x
CODE_A9ECBA:
	LDA.w $000B,y
	BEQ.b CODE_A9ECC7
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_A9ECC7:
	LDA.w $000C,y
	BEQ.b CODE_A9ECD0
	STA.l $7F1200,x
CODE_A9ECD0:
	LDA.w $000D,y
	BEQ.b CODE_A9ECDD
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_A9ECDD:
	LDA.w $000E,y
	BEQ.b CODE_A9ECE6
	STA.l $7F1380,x
CODE_A9ECE6:
	LDA.w $000F,y
	BEQ.b CODE_A9ECF3
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_A9ECF3:
	LDA.w $0010,y
	BEQ.b CODE_A9ECFC
	STA.l $7F1500,x
CODE_A9ECFC:
	LDA.w $0011,y
	BEQ.b CODE_A9ED05
	STA.l $7F1580,x
CODE_A9ED05:
	LDA.w $0012,y
	BEQ.b CODE_A9ED12
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_A9ED12:
	LDA.w $0013,y
	BEQ.b CODE_A9ED1B
	STA.l $7F1700,x
CODE_A9ED1B:
	LDA.w $0014,y
	BEQ.b CODE_A9ED28
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_A9ED28:
	LDA.w $0015,y
	BEQ.b CODE_A9ED31
	STA.l $7F1880,x
CODE_A9ED31:
	LDA.w $0016,y
	BEQ.b CODE_A9ED3E
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_A9ED3E:
	LDA.w $0017,y
	BEQ.b CODE_A9ED47
	STA.l $7F1A00,x
CODE_A9ED47:
	LDA.w $0018,y
	BEQ.b CODE_A9ED50
	STA.l $7F1A80,x
CODE_A9ED50:
	LDA.w $0019,y
	BEQ.b CODE_A9ED5D
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_A9ED5D:
	LDA.w $001A,y
	BEQ.b CODE_A9ED66
	STA.l $7F1C00,x
CODE_A9ED66:
	LDA.w $001B,y
	BEQ.b CODE_A9ED73
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_A9ED73:
	LDA.w $001C,y
	BEQ.b CODE_A9ED7C
	STA.l $7F1D80,x
CODE_A9ED7C:
	LDA.w $001D,y
	BEQ.b CODE_A9ED89
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_A9ED89:
	LDA.w $001E,y
	BEQ.b CODE_A9ED92
	STA.l $7F1F00,x
CODE_A9ED92:
	LDA.w $001F,y
	BEQ.b CODE_A9ED9F
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9ED9F:
	LDA.w $0020,y
	BEQ.b CODE_A9EDA8
	STA.l $7F2080,x
CODE_A9EDA8:
	LDA.w $0021,y
	BEQ.b CODE_A9EDB1
	STA.l $7F2100,x
CODE_A9EDB1:
	LDA.w $0022,y
	BEQ.b CODE_A9EDBE
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_A9EDBE:
	LDA.w $0023,y
	BEQ.b CODE_A9EDC7
	STA.l $7F2280,x
CODE_A9EDC7:
	LDA.w $0024,y
	BEQ.b CODE_A9EDD4
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_A9EDD4:
	LDA.w $0025,y
	BEQ.b CODE_A9EDDD
	STA.l $7F2400,x
CODE_A9EDDD:
	LDA.w $0026,y
	BEQ.b CODE_A9EDEA
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_A9EDEA:
	LDA.w $0027,y
	BEQ.b CODE_A9EDF3
	STA.l $7F2580,x
CODE_A9EDF3:
	LDA.w $0028,y
	BEQ.b CODE_A9EDFC
	STA.l $7F2600,x
CODE_A9EDFC:
	LDA.w $0029,y
	BEQ.b CODE_A9EE09
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_A9EE09:
	LDA.w $002A,y
	BEQ.b CODE_A9EE12
	STA.l $7F2780,x
CODE_A9EE12:
	LDA.w $002B,y
	BEQ.b CODE_A9EE1F
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_A9EE1F:
	LDA.w $002C,y
	BEQ.b CODE_A9EE28
	STA.l $7F2900,x
CODE_A9EE28:
	LDA.w $002D,y
	BEQ.b CODE_A9EE35
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_A9EE35:
	LDA.w $002E,y
	BEQ.b CODE_A9EE3E
	STA.l $7F2A80,x
CODE_A9EE3E:
	LDA.w $002F,y
	BEQ.b CODE_A9EE4B
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_A9EE4B:
	LDA.w $0030,y
	BEQ.b CODE_A9EE54
	STA.l $7F2C00,x
CODE_A9EE54:
	LDA.w $0031,y
	BEQ.b CODE_A9EE5D
	STA.l $7F2C80,x
CODE_A9EE5D:
	LDA.w $0032,y
	BEQ.b CODE_A9EE6A
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_A9EE6A:
	LDA.w $0033,y
	BEQ.b CODE_A9EE73
	STA.l $7F2E00,x
CODE_A9EE73:
	LDA.w $0034,y
	BEQ.b CODE_A9EE80
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_A9EE80:
	LDA.w $0035,y
	BEQ.b CODE_A9EE89
	STA.l $7F2F80,x
CODE_A9EE89:
	LDA.w $0036,y
	BEQ.b CODE_A9EE96
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_A9EE96:
	LDA.w $0037,y
	BEQ.b CODE_A9EE9F
	STA.l $7F3100,x
CODE_A9EE9F:
	LDA.w $0038,y
	BEQ.b CODE_A9EEA8
	STA.l $7F3180,x
CODE_A9EEA8:
	LDA.w $0039,y
	BEQ.b CODE_A9EEB5
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_A9EEB5:
	LDA.w $003A,y
	BEQ.b CODE_A9EEBE
	STA.l $7F3300,x
CODE_A9EEBE:
	LDA.w $003B,y
	BEQ.b CODE_A9EECB
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_A9EECB:
	LDA.w $003C,y
	BEQ.b CODE_A9EED4
	STA.l $7F3480,x
CODE_A9EED4:
	LDA.w $003D,y
	BEQ.b CODE_A9EEE1
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_A9EEE1:
	LDA.w $003E,y
	BEQ.b CODE_A9EEEA
	STA.l $7F3600,x
CODE_A9EEEA:
	LDA.w $003F,y
	BEQ.b CODE_A9EEF3
	STA.l $7F3680,x
CODE_A9EEF3:
	REP.b #$20
	RTL

CODE_A9EEF6:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9EF05
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_A9EF05:
	LDA.w $0001,y
	BEQ.b CODE_A9EF0E
	STA.l $7F0980,x
CODE_A9EF0E:
	LDA.w $0002,y
	BEQ.b CODE_A9EF1B
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_A9EF1B:
	LDA.w $0003,y
	BEQ.b CODE_A9EF24
	STA.l $7F0B00,x
CODE_A9EF24:
	LDA.w $0004,y
	BEQ.b CODE_A9EF31
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_A9EF31:
	LDA.w $0005,y
	BEQ.b CODE_A9EF3A
	STA.l $7F0C80,x
CODE_A9EF3A:
	LDA.w $0006,y
	BEQ.b CODE_A9EF47
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_A9EF47:
	LDA.w $0007,y
	BEQ.b CODE_A9EF50
	STA.l $7F0E00,x
CODE_A9EF50:
	LDA.w $0008,y
	BEQ.b CODE_A9EF5D
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_A9EF5D:
	LDA.w $0009,y
	BEQ.b CODE_A9EF66
	STA.l $7F0F80,x
CODE_A9EF66:
	LDA.w $000A,y
	BEQ.b CODE_A9EF73
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_A9EF73:
	LDA.w $000B,y
	BEQ.b CODE_A9EF7C
	STA.l $7F1100,x
CODE_A9EF7C:
	LDA.w $000C,y
	BEQ.b CODE_A9EF89
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_A9EF89:
	LDA.w $000D,y
	BEQ.b CODE_A9EF92
	STA.l $7F1280,x
CODE_A9EF92:
	LDA.w $000E,y
	BEQ.b CODE_A9EF9F
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_A9EF9F:
	LDA.w $000F,y
	BEQ.b CODE_A9EFA8
	STA.l $7F1400,x
CODE_A9EFA8:
	LDA.w $0010,y
	BEQ.b CODE_A9EFB5
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_A9EFB5:
	LDA.w $0011,y
	BEQ.b CODE_A9EFBE
	STA.l $7F1580,x
CODE_A9EFBE:
	LDA.w $0012,y
	BEQ.b CODE_A9EFC7
	STA.l $7F1600,x
CODE_A9EFC7:
	LDA.w $0013,y
	BEQ.b CODE_A9EFD4
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_A9EFD4:
	LDA.w $0014,y
	BEQ.b CODE_A9EFDD
	STA.l $7F1780,x
CODE_A9EFDD:
	LDA.w $0015,y
	BEQ.b CODE_A9EFEA
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_A9EFEA:
	LDA.w $0016,y
	BEQ.b CODE_A9EFF3
	STA.l $7F1900,x
CODE_A9EFF3:
	LDA.w $0017,y
	BEQ.b CODE_A9F000
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_A9F000:
	LDA.w $0018,y
	BEQ.b CODE_A9F009
	STA.l $7F1A80,x
CODE_A9F009:
	LDA.w $0019,y
	BEQ.b CODE_A9F016
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_A9F016:
	LDA.w $001A,y
	BEQ.b CODE_A9F01F
	STA.l $7F1C00,x
CODE_A9F01F:
	LDA.w $001B,y
	BEQ.b CODE_A9F02C
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_A9F02C:
	LDA.w $001C,y
	BEQ.b CODE_A9F035
	STA.l $7F1D80,x
CODE_A9F035:
	LDA.w $001D,y
	BEQ.b CODE_A9F042
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_A9F042:
	LDA.w $001E,y
	BEQ.b CODE_A9F04B
	STA.l $7F1F00,x
CODE_A9F04B:
	LDA.w $001F,y
	BEQ.b CODE_A9F058
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9F058:
	LDA.w $0020,y
	BEQ.b CODE_A9F061
	STA.l $7F2080,x
CODE_A9F061:
	LDA.w $0021,y
	BEQ.b CODE_A9F06E
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_A9F06E:
	LDA.w $0022,y
	BEQ.b CODE_A9F077
	STA.l $7F2200,x
CODE_A9F077:
	LDA.w $0023,y
	BEQ.b CODE_A9F080
	STA.l $7F2280,x
CODE_A9F080:
	LDA.w $0024,y
	BEQ.b CODE_A9F08D
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_A9F08D:
	LDA.w $0025,y
	BEQ.b CODE_A9F096
	STA.l $7F2400,x
CODE_A9F096:
	LDA.w $0026,y
	BEQ.b CODE_A9F0A3
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_A9F0A3:
	LDA.w $0027,y
	BEQ.b CODE_A9F0AC
	STA.l $7F2580,x
CODE_A9F0AC:
	LDA.w $0028,y
	BEQ.b CODE_A9F0B9
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_A9F0B9:
	LDA.w $0029,y
	BEQ.b CODE_A9F0C2
	STA.l $7F2700,x
CODE_A9F0C2:
	LDA.w $002A,y
	BEQ.b CODE_A9F0CF
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_A9F0CF:
	LDA.w $002B,y
	BEQ.b CODE_A9F0D8
	STA.l $7F2880,x
CODE_A9F0D8:
	LDA.w $002C,y
	BEQ.b CODE_A9F0E5
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_A9F0E5:
	LDA.w $002D,y
	BEQ.b CODE_A9F0EE
	STA.l $7F2A00,x
CODE_A9F0EE:
	LDA.w $002E,y
	BEQ.b CODE_A9F0FB
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_A9F0FB:
	LDA.w $002F,y
	BEQ.b CODE_A9F104
	STA.l $7F2B80,x
CODE_A9F104:
	LDA.w $0030,y
	BEQ.b CODE_A9F111
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_A9F111:
	LDA.w $0031,y
	BEQ.b CODE_A9F11A
	STA.l $7F2D00,x
CODE_A9F11A:
	LDA.w $0032,y
	BEQ.b CODE_A9F127
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_A9F127:
	LDA.w $0033,y
	BEQ.b CODE_A9F130
	STA.l $7F2E80,x
CODE_A9F130:
	LDA.w $0034,y
	BEQ.b CODE_A9F139
	STA.l $7F2F00,x
CODE_A9F139:
	LDA.w $0035,y
	BEQ.b CODE_A9F146
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_A9F146:
	LDA.w $0036,y
	BEQ.b CODE_A9F14F
	STA.l $7F3080,x
CODE_A9F14F:
	LDA.w $0037,y
	BEQ.b CODE_A9F15C
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_A9F15C:
	LDA.w $0038,y
	BEQ.b CODE_A9F165
	STA.l $7F3200,x
CODE_A9F165:
	LDA.w $0039,y
	BEQ.b CODE_A9F172
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_A9F172:
	LDA.w $003A,y
	BEQ.b CODE_A9F17B
	STA.l $7F3380,x
CODE_A9F17B:
	LDA.w $003B,y
	BEQ.b CODE_A9F188
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_A9F188:
	LDA.w $003C,y
	BEQ.b CODE_A9F191
	STA.l $7F3500,x
CODE_A9F191:
	LDA.w $003D,y
	BEQ.b CODE_A9F19E
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_A9F19E:
	LDA.w $003E,y
	BEQ.b CODE_A9F1A7
	STA.l $7F3680,x
CODE_A9F1A7:
	LDA.w $003F,y
	BEQ.b CODE_A9F1B0
	STA.l $7F3700,x
CODE_A9F1B0:
	REP.b #$20
	RTL

CODE_A9F1B3:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9F1C2
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_A9F1C2:
	LDA.w $0001,y
	BEQ.b CODE_A9F1CF
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_A9F1CF:
	LDA.w $0002,y
	BEQ.b CODE_A9F1D8
	STA.l $7F0A00,x
CODE_A9F1D8:
	LDA.w $0003,y
	BEQ.b CODE_A9F1E5
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_A9F1E5:
	LDA.w $0004,y
	BEQ.b CODE_A9F1EE
	STA.l $7F0B80,x
CODE_A9F1EE:
	LDA.w $0005,y
	BEQ.b CODE_A9F1FB
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_A9F1FB:
	LDA.w $0006,y
	BEQ.b CODE_A9F204
	STA.l $7F0D00,x
CODE_A9F204:
	LDA.w $0007,y
	BEQ.b CODE_A9F211
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_A9F211:
	LDA.w $0008,y
	BEQ.b CODE_A9F21A
	STA.l $7F0E80,x
CODE_A9F21A:
	LDA.w $0009,y
	BEQ.b CODE_A9F227
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_A9F227:
	LDA.w $000A,y
	BEQ.b CODE_A9F230
	STA.l $7F1000,x
CODE_A9F230:
	LDA.w $000B,y
	BEQ.b CODE_A9F23D
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_A9F23D:
	LDA.w $000C,y
	BEQ.b CODE_A9F246
	STA.l $7F1180,x
CODE_A9F246:
	LDA.w $000D,y
	BEQ.b CODE_A9F253
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_A9F253:
	LDA.w $000E,y
	BEQ.b CODE_A9F25C
	STA.l $7F1300,x
CODE_A9F25C:
	LDA.w $000F,y
	BEQ.b CODE_A9F269
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_A9F269:
	LDA.w $0010,y
	BEQ.b CODE_A9F272
	STA.l $7F1480,x
CODE_A9F272:
	LDA.w $0011,y
	BEQ.b CODE_A9F27F
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_A9F27F:
	LDA.w $0012,y
	BEQ.b CODE_A9F288
	STA.l $7F1600,x
CODE_A9F288:
	LDA.w $0013,y
	BEQ.b CODE_A9F295
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_A9F295:
	LDA.w $0014,y
	BEQ.b CODE_A9F29E
	STA.l $7F1780,x
CODE_A9F29E:
	LDA.w $0015,y
	BEQ.b CODE_A9F2AB
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_A9F2AB:
	LDA.w $0016,y
	BEQ.b CODE_A9F2B4
	STA.l $7F1900,x
CODE_A9F2B4:
	LDA.w $0017,y
	BEQ.b CODE_A9F2C1
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_A9F2C1:
	LDA.w $0018,y
	BEQ.b CODE_A9F2CA
	STA.l $7F1A80,x
CODE_A9F2CA:
	LDA.w $0019,y
	BEQ.b CODE_A9F2D7
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_A9F2D7:
	LDA.w $001A,y
	BEQ.b CODE_A9F2E0
	STA.l $7F1C00,x
CODE_A9F2E0:
	LDA.w $001B,y
	BEQ.b CODE_A9F2ED
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_A9F2ED:
	LDA.w $001C,y
	BEQ.b CODE_A9F2F6
	STA.l $7F1D80,x
CODE_A9F2F6:
	LDA.w $001D,y
	BEQ.b CODE_A9F303
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_A9F303:
	LDA.w $001E,y
	BEQ.b CODE_A9F30C
	STA.l $7F1F00,x
CODE_A9F30C:
	LDA.w $001F,y
	BEQ.b CODE_A9F319
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9F319:
	LDA.w $0020,y
	BEQ.b CODE_A9F322
	STA.l $7F2080,x
CODE_A9F322:
	LDA.w $0021,y
	BEQ.b CODE_A9F32F
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_A9F32F:
	LDA.w $0022,y
	BEQ.b CODE_A9F338
	STA.l $7F2200,x
CODE_A9F338:
	LDA.w $0023,y
	BEQ.b CODE_A9F345
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_A9F345:
	LDA.w $0024,y
	BEQ.b CODE_A9F34E
	STA.l $7F2380,x
CODE_A9F34E:
	LDA.w $0025,y
	BEQ.b CODE_A9F35B
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_A9F35B:
	LDA.w $0026,y
	BEQ.b CODE_A9F364
	STA.l $7F2500,x
CODE_A9F364:
	LDA.w $0027,y
	BEQ.b CODE_A9F371
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_A9F371:
	LDA.w $0028,y
	BEQ.b CODE_A9F37A
	STA.l $7F2680,x
CODE_A9F37A:
	LDA.w $0029,y
	BEQ.b CODE_A9F387
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_A9F387:
	LDA.w $002A,y
	BEQ.b CODE_A9F390
	STA.l $7F2800,x
CODE_A9F390:
	LDA.w $002B,y
	BEQ.b CODE_A9F39D
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_A9F39D:
	LDA.w $002C,y
	BEQ.b CODE_A9F3A6
	STA.l $7F2980,x
CODE_A9F3A6:
	LDA.w $002D,y
	BEQ.b CODE_A9F3B3
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_A9F3B3:
	LDA.w $002E,y
	BEQ.b CODE_A9F3BC
	STA.l $7F2B00,x
CODE_A9F3BC:
	LDA.w $002F,y
	BEQ.b CODE_A9F3C9
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_A9F3C9:
	LDA.w $0030,y
	BEQ.b CODE_A9F3D2
	STA.l $7F2C80,x
CODE_A9F3D2:
	LDA.w $0031,y
	BEQ.b CODE_A9F3DF
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_A9F3DF:
	LDA.w $0032,y
	BEQ.b CODE_A9F3E8
	STA.l $7F2E00,x
CODE_A9F3E8:
	LDA.w $0033,y
	BEQ.b CODE_A9F3F5
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_A9F3F5:
	LDA.w $0034,y
	BEQ.b CODE_A9F3FE
	STA.l $7F2F80,x
CODE_A9F3FE:
	LDA.w $0035,y
	BEQ.b CODE_A9F40B
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_A9F40B:
	LDA.w $0036,y
	BEQ.b CODE_A9F414
	STA.l $7F3100,x
CODE_A9F414:
	LDA.w $0037,y
	BEQ.b CODE_A9F421
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_A9F421:
	LDA.w $0038,y
	BEQ.b CODE_A9F42A
	STA.l $7F3280,x
CODE_A9F42A:
	LDA.w $0039,y
	BEQ.b CODE_A9F437
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_A9F437:
	LDA.w $003A,y
	BEQ.b CODE_A9F440
	STA.l $7F3400,x
CODE_A9F440:
	LDA.w $003B,y
	BEQ.b CODE_A9F44D
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_A9F44D:
	LDA.w $003C,y
	BEQ.b CODE_A9F456
	STA.l $7F3580,x
CODE_A9F456:
	LDA.w $003D,y
	BEQ.b CODE_A9F463
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_A9F463:
	LDA.w $003E,y
	BEQ.b CODE_A9F46C
	STA.l $7F3700,x
CODE_A9F46C:
	LDA.w $003F,y
	BEQ.b CODE_A9F475
	STA.l $7F3780,x
CODE_A9F475:
	REP.b #$20
	RTL

CODE_A9F478:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9F487
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_A9F487:
	LDA.w $0001,y
	BEQ.b CODE_A9F494
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_A9F494:
	LDA.w $0002,y
	BEQ.b CODE_A9F49D
	STA.l $7F0980,x
CODE_A9F49D:
	LDA.w $0003,y
	BEQ.b CODE_A9F4AA
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_A9F4AA:
	LDA.w $0004,y
	BEQ.b CODE_A9F4B3
	STA.l $7F0B00,x
CODE_A9F4B3:
	LDA.w $0005,y
	BEQ.b CODE_A9F4C0
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_A9F4C0:
	LDA.w $0006,y
	BEQ.b CODE_A9F4C9
	STA.l $7F0C80,x
CODE_A9F4C9:
	LDA.w $0007,y
	BEQ.b CODE_A9F4D6
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_A9F4D6:
	LDA.w $0008,y
	BEQ.b CODE_A9F4DF
	STA.l $7F0E00,x
CODE_A9F4DF:
	LDA.w $0009,y
	BEQ.b CODE_A9F4EC
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_A9F4EC:
	LDA.w $000A,y
	BEQ.b CODE_A9F4F5
	STA.l $7F0F80,x
CODE_A9F4F5:
	LDA.w $000B,y
	BEQ.b CODE_A9F502
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_A9F502:
	LDA.w $000C,y
	BEQ.b CODE_A9F50B
	STA.l $7F1100,x
CODE_A9F50B:
	LDA.w $000D,y
	BEQ.b CODE_A9F518
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_A9F518:
	LDA.w $000E,y
	BEQ.b CODE_A9F521
	STA.l $7F1280,x
CODE_A9F521:
	LDA.w $000F,y
	BEQ.b CODE_A9F52E
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_A9F52E:
	LDA.w $0010,y
	BEQ.b CODE_A9F53B
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_A9F53B:
	LDA.w $0011,y
	BEQ.b CODE_A9F544
	STA.l $7F1500,x
CODE_A9F544:
	LDA.w $0012,y
	BEQ.b CODE_A9F551
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_A9F551:
	LDA.w $0013,y
	BEQ.b CODE_A9F55A
	STA.l $7F1680,x
CODE_A9F55A:
	LDA.w $0014,y
	BEQ.b CODE_A9F567
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_A9F567:
	LDA.w $0015,y
	BEQ.b CODE_A9F570
	STA.l $7F1800,x
CODE_A9F570:
	LDA.w $0016,y
	BEQ.b CODE_A9F57D
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_A9F57D:
	LDA.w $0017,y
	BEQ.b CODE_A9F586
	STA.l $7F1980,x
CODE_A9F586:
	LDA.w $0018,y
	BEQ.b CODE_A9F593
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_A9F593:
	LDA.w $0019,y
	BEQ.b CODE_A9F59C
	STA.l $7F1B00,x
CODE_A9F59C:
	LDA.w $001A,y
	BEQ.b CODE_A9F5A9
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_A9F5A9:
	LDA.w $001B,y
	BEQ.b CODE_A9F5B2
	STA.l $7F1C80,x
CODE_A9F5B2:
	LDA.w $001C,y
	BEQ.b CODE_A9F5BF
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_A9F5BF:
	LDA.w $001D,y
	BEQ.b CODE_A9F5C8
	STA.l $7F1E00,x
CODE_A9F5C8:
	LDA.w $001E,y
	BEQ.b CODE_A9F5D5
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_A9F5D5:
	LDA.w $001F,y
	BEQ.b CODE_A9F5E2
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9F5E2:
	LDA.w $0020,y
	BEQ.b CODE_A9F5EB
	STA.l $7F2080,x
CODE_A9F5EB:
	LDA.w $0021,y
	BEQ.b CODE_A9F5F8
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_A9F5F8:
	LDA.w $0022,y
	BEQ.b CODE_A9F601
	STA.l $7F2200,x
CODE_A9F601:
	LDA.w $0023,y
	BEQ.b CODE_A9F60E
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_A9F60E:
	LDA.w $0024,y
	BEQ.b CODE_A9F617
	STA.l $7F2380,x
CODE_A9F617:
	LDA.w $0025,y
	BEQ.b CODE_A9F624
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_A9F624:
	LDA.w $0026,y
	BEQ.b CODE_A9F62D
	STA.l $7F2500,x
CODE_A9F62D:
	LDA.w $0027,y
	BEQ.b CODE_A9F63A
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_A9F63A:
	LDA.w $0028,y
	BEQ.b CODE_A9F643
	STA.l $7F2680,x
CODE_A9F643:
	LDA.w $0029,y
	BEQ.b CODE_A9F650
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_A9F650:
	LDA.w $002A,y
	BEQ.b CODE_A9F659
	STA.l $7F2800,x
CODE_A9F659:
	LDA.w $002B,y
	BEQ.b CODE_A9F666
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_A9F666:
	LDA.w $002C,y
	BEQ.b CODE_A9F66F
	STA.l $7F2980,x
CODE_A9F66F:
	LDA.w $002D,y
	BEQ.b CODE_A9F67C
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_A9F67C:
	LDA.w $002E,y
	BEQ.b CODE_A9F689
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_A9F689:
	LDA.w $002F,y
	BEQ.b CODE_A9F692
	STA.l $7F2C00,x
CODE_A9F692:
	LDA.w $0030,y
	BEQ.b CODE_A9F69F
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_A9F69F:
	LDA.w $0031,y
	BEQ.b CODE_A9F6A8
	STA.l $7F2D80,x
CODE_A9F6A8:
	LDA.w $0032,y
	BEQ.b CODE_A9F6B5
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_A9F6B5:
	LDA.w $0033,y
	BEQ.b CODE_A9F6BE
	STA.l $7F2F00,x
CODE_A9F6BE:
	LDA.w $0034,y
	BEQ.b CODE_A9F6CB
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_A9F6CB:
	LDA.w $0035,y
	BEQ.b CODE_A9F6D4
	STA.l $7F3080,x
CODE_A9F6D4:
	LDA.w $0036,y
	BEQ.b CODE_A9F6E1
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_A9F6E1:
	LDA.w $0037,y
	BEQ.b CODE_A9F6EA
	STA.l $7F3200,x
CODE_A9F6EA:
	LDA.w $0038,y
	BEQ.b CODE_A9F6F7
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_A9F6F7:
	LDA.w $0039,y
	BEQ.b CODE_A9F700
	STA.l $7F3380,x
CODE_A9F700:
	LDA.w $003A,y
	BEQ.b CODE_A9F70D
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_A9F70D:
	LDA.w $003B,y
	BEQ.b CODE_A9F716
	STA.l $7F3500,x
CODE_A9F716:
	LDA.w $003C,y
	BEQ.b CODE_A9F723
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_A9F723:
	LDA.w $003D,y
	BEQ.b CODE_A9F730
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_A9F730:
	LDA.w $003E,y
	BEQ.b CODE_A9F739
	STA.l $7F3780,x
CODE_A9F739:
	LDA.w $003F,y
	BEQ.b CODE_A9F742
	STA.l $7F3800,x
CODE_A9F742:
	REP.b #$20
	RTL

CODE_A9F745:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9F754
	STA.l $7F0700,x
CODE_A9F750:
	STA.l $7F0780,x
CODE_A9F754:
	LDA.w $0001,y
	BEQ.b CODE_A9F761
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_A9F761:
	LDA.w $0002,y
	BEQ.b CODE_A9F76A
	STA.l $7F0900,x
CODE_A9F76A:
	LDA.w $0003,y
	BEQ.b CODE_A9F777
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_A9F777:
	LDA.w $0004,y
	BEQ.b CODE_A9F780
	STA.l $7F0A80,x
CODE_A9F780:
	LDA.w $0005,y
	BEQ.b CODE_A9F78D
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_A9F78D:
	LDA.w $0006,y
	BEQ.b CODE_A9F796
	STA.l $7F0C00,x
CODE_A9F796:
	LDA.w $0007,y
	BEQ.b CODE_A9F7A3
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_A9F7A3:
	LDA.w $0008,y
	BEQ.b CODE_A9F7B0
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_A9F7B0:
	LDA.w $0009,y
	BEQ.b CODE_A9F7B9
	STA.l $7F0E80,x
CODE_A9F7B9:
	LDA.w $000A,y
	BEQ.b CODE_A9F7C6
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_A9F7C6:
	LDA.w $000B,y
	BEQ.b CODE_A9F7CF
	STA.l $7F1000,x
CODE_A9F7CF:
	LDA.w $000C,y
	BEQ.b CODE_A9F7DC
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_A9F7DC:
	LDA.w $000D,y
	BEQ.b CODE_A9F7E5
	STA.l $7F1180,x
CODE_A9F7E5:
	LDA.w $000E,y
	BEQ.b CODE_A9F7F2
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_A9F7F2:
	LDA.w $000F,y
	BEQ.b CODE_A9F7FF
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_A9F7FF:
	LDA.w $0010,y
	BEQ.b CODE_A9F808
	STA.l $7F1400,x
CODE_A9F808:
	LDA.w $0011,y
	BEQ.b CODE_A9F815
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_A9F815:
	LDA.w $0012,y
	BEQ.b CODE_A9F81E
	STA.l $7F1580,x
CODE_A9F81E:
	LDA.w $0013,y
	BEQ.b CODE_A9F82B
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_A9F82B:
	LDA.w $0014,y
	BEQ.b CODE_A9F834
	STA.l $7F1700,x
CODE_A9F834:
	LDA.w $0015,y
	BEQ.b CODE_A9F841
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_A9F841:
	LDA.w $0016,y
	BEQ.b CODE_A9F84E
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_A9F84E:
	LDA.w $0017,y
	BEQ.b CODE_A9F857
	STA.l $7F1980,x
CODE_A9F857:
	LDA.w $0018,y
	BEQ.b CODE_A9F864
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_A9F864:
	LDA.w $0019,y
	BEQ.b CODE_A9F86D
	STA.l $7F1B00,x
CODE_A9F86D:
	LDA.w $001A,y
	BEQ.b CODE_A9F87A
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_A9F87A:
	LDA.w $001B,y
	BEQ.b CODE_A9F883
	STA.l $7F1C80,x
CODE_A9F883:
	LDA.w $001C,y
	BEQ.b CODE_A9F890
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_A9F890:
	LDA.w $001D,y
	BEQ.b CODE_A9F89D
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_A9F89D:
	LDA.w $001E,y
	BEQ.b CODE_A9F8A6
	STA.l $7F1F00,x
CODE_A9F8A6:
	LDA.w $001F,y
	BEQ.b CODE_A9F8B3
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9F8B3:
	LDA.w $0020,y
	BEQ.b CODE_A9F8BC
	STA.l $7F2080,x
CODE_A9F8BC:
	LDA.w $0021,y
	BEQ.b CODE_A9F8C9
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_A9F8C9:
	LDA.w $0022,y
	BEQ.b CODE_A9F8D2
	STA.l $7F2200,x
CODE_A9F8D2:
	LDA.w $0023,y
	BEQ.b CODE_A9F8DF
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_A9F8DF:
	LDA.w $0024,y
	BEQ.b CODE_A9F8EC
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_A9F8EC:
	LDA.w $0025,y
	BEQ.b CODE_A9F8F5
	STA.l $7F2480,x
CODE_A9F8F5:
	LDA.w $0026,y
	BEQ.b CODE_A9F902
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_A9F902:
	LDA.w $0027,y
	BEQ.b CODE_A9F90B
	STA.l $7F2600,x
CODE_A9F90B:
	LDA.w $0028,y
	BEQ.b CODE_A9F918
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_A9F918:
	LDA.w $0029,y
	BEQ.b CODE_A9F921
	STA.l $7F2780,x
CODE_A9F921:
	LDA.w $002A,y
	BEQ.b CODE_A9F92E
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_A9F92E:
	LDA.w $002B,y
	BEQ.b CODE_A9F93B
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_A9F93B:
	LDA.w $002C,y
	BEQ.b CODE_A9F944
	STA.l $7F2A00,x
CODE_A9F944:
	LDA.w $002D,y
	BEQ.b CODE_A9F951
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_A9F951:
	LDA.w $002E,y
	BEQ.b CODE_A9F95A
	STA.l $7F2B80,x
CODE_A9F95A:
	LDA.w $002F,y
	BEQ.b CODE_A9F967
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_A9F967:
	LDA.w $0030,y
	BEQ.b CODE_A9F970
	STA.l $7F2D00,x
CODE_A9F970:
	LDA.w $0031,y
	BEQ.b CODE_A9F97D
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_A9F97D:
	LDA.w $0032,y
	BEQ.b CODE_A9F98A
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_A9F98A:
	LDA.w $0033,y
	BEQ.b CODE_A9F993
	STA.l $7F2F80,x
CODE_A9F993:
	LDA.w $0034,y
	BEQ.b CODE_A9F9A0
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_A9F9A0:
	LDA.w $0035,y
	BEQ.b CODE_A9F9A9
	STA.l $7F3100,x
CODE_A9F9A9:
	LDA.w $0036,y
	BEQ.b CODE_A9F9B6
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_A9F9B6:
	LDA.w $0037,y
	BEQ.b CODE_A9F9BF
	STA.l $7F3280,x
CODE_A9F9BF:
	LDA.w $0038,y
	BEQ.b CODE_A9F9CC
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_A9F9CC:
	LDA.w $0039,y
	BEQ.b CODE_A9F9D9
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_A9F9D9:
	LDA.w $003A,y
	BEQ.b CODE_A9F9E2
	STA.l $7F3500,x
CODE_A9F9E2:
	LDA.w $003B,y
	BEQ.b CODE_A9F9EF
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_A9F9EF:
	LDA.w $003C,y
	BEQ.b CODE_A9F9F8
	STA.l $7F3680,x
CODE_A9F9F8:
	LDA.w $003D,y
	BEQ.b CODE_A9FA05
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_A9FA05:
	LDA.w $003E,y
	BEQ.b CODE_A9FA0E
	STA.l $7F3800,x
CODE_A9FA0E:
	LDA.w $003F,y
	BEQ.b CODE_A9FA17
	STA.l $7F3880,x
CODE_A9FA17:
	REP.b #$20
	RTL

CODE_A9FA1A:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_A9FA29
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_A9FA29:
	LDA.w $0001,y
	BEQ.b CODE_A9FA36
	STA.l $7F0780,x
CODE_A9FA32:
	STA.l $7F0800,x
CODE_A9FA36:
	LDA.w $0002,y
	BEQ.b CODE_A9FA3F
	STA.l $7F0880,x
CODE_A9FA3F:
	LDA.w $0003,y
	BEQ.b CODE_A9FA4C
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_A9FA4C:
	LDA.w $0004,y
	BEQ.b CODE_A9FA55
	STA.l $7F0A00,x
CODE_A9FA55:
	LDA.w $0005,y
	BEQ.b CODE_A9FA62
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_A9FA62:
	LDA.w $0006,y
	BEQ.b CODE_A9FA6F
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_A9FA6F:
	LDA.w $0007,y
	BEQ.b CODE_A9FA78
	STA.l $7F0C80,x
CODE_A9FA78:
	LDA.w $0008,y
	BEQ.b CODE_A9FA85
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_A9FA85:
	LDA.w $0009,y
	BEQ.b CODE_A9FA8E
	STA.l $7F0E00,x
CODE_A9FA8E:
	LDA.w $000A,y
	BEQ.b CODE_A9FA9B
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_A9FA9B:
	LDA.w $000B,y
	BEQ.b CODE_A9FAA8
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_A9FAA8:
	LDA.w $000C,y
	BEQ.b CODE_A9FAB1
	STA.l $7F1080,x
CODE_A9FAB1:
	LDA.w $000D,y
	BEQ.b CODE_A9FABE
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_A9FABE:
	LDA.w $000E,y
	BEQ.b CODE_A9FAC7
	STA.l $7F1200,x
CODE_A9FAC7:
	LDA.w $000F,y
	BEQ.b CODE_A9FAD4
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_A9FAD4:
	LDA.w $0010,y
	BEQ.b CODE_A9FAE1
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_A9FAE1:
	LDA.w $0011,y
	BEQ.b CODE_A9FAEA
	STA.l $7F1480,x
CODE_A9FAEA:
	LDA.w $0012,y
	BEQ.b CODE_A9FAF7
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_A9FAF7:
	LDA.w $0013,y
	BEQ.b CODE_A9FB00
	STA.l $7F1600,x
CODE_A9FB00:
	LDA.w $0014,y
	BEQ.b CODE_A9FB0D
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_A9FB0D:
	LDA.w $0015,y
	BEQ.b CODE_A9FB1A
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_A9FB1A:
	LDA.w $0016,y
	BEQ.b CODE_A9FB23
	STA.l $7F1880,x
CODE_A9FB23:
	LDA.w $0017,y
	BEQ.b CODE_A9FB30
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_A9FB30:
	LDA.w $0018,y
	BEQ.b CODE_A9FB39
	STA.l $7F1A00,x
CODE_A9FB39:
	LDA.w $0019,y
	BEQ.b CODE_A9FB46
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_A9FB46:
	LDA.w $001A,y
	BEQ.b CODE_A9FB53
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_A9FB53:
	LDA.w $001B,y
	BEQ.b CODE_A9FB5C
	STA.l $7F1C80,x
CODE_A9FB5C:
	LDA.w $001C,y
	BEQ.b CODE_A9FB69
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_A9FB69:
	LDA.w $001D,y
	BEQ.b CODE_A9FB72
	STA.l $7F1E00,x
CODE_A9FB72:
	LDA.w $001E,y
	BEQ.b CODE_A9FB7F
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_A9FB7F:
	LDA.w $001F,y
	BEQ.b CODE_A9FB8C
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_A9FB8C:
	LDA.w $0020,y
	BEQ.b CODE_A9FB95
	STA.l $7F2080,x
CODE_A9FB95:
	LDA.w $0021,y
	BEQ.b CODE_A9FBA2
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_A9FBA2:
	LDA.w $0022,y
	BEQ.b CODE_A9FBAB
	STA.l $7F2200,x
CODE_A9FBAB:
	LDA.w $0023,y
	BEQ.b CODE_A9FBB8
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_A9FBB8:
	LDA.w $0024,y
	BEQ.b CODE_A9FBC5
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_A9FBC5:
	LDA.w $0025,y
	BEQ.b CODE_A9FBCE
	STA.l $7F2480,x
CODE_A9FBCE:
	LDA.w $0026,y
	BEQ.b CODE_A9FBDB
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_A9FBDB:
	LDA.w $0027,y
	BEQ.b CODE_A9FBE4
	STA.l $7F2600,x
CODE_A9FBE4:
	LDA.w $0028,y
	BEQ.b CODE_A9FBF1
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_A9FBF1:
	LDA.w $0029,y
	BEQ.b CODE_A9FBFE
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_A9FBFE:
	LDA.w $002A,y
	BEQ.b CODE_A9FC07
	STA.l $7F2880,x
CODE_A9FC07:
	LDA.w $002B,y
	BEQ.b CODE_A9FC14
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_A9FC14:
	LDA.w $002C,y
	BEQ.b CODE_A9FC1D
	STA.l $7F2A00,x
CODE_A9FC1D:
	LDA.w $002D,y
	BEQ.b CODE_A9FC2A
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_A9FC2A:
	LDA.w $002E,y
	BEQ.b CODE_A9FC37
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_A9FC37:
	LDA.w $002F,y
	BEQ.b CODE_A9FC40
	STA.l $7F2C80,x
CODE_A9FC40:
	LDA.w $0030,y
	BEQ.b CODE_A9FC4D
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_A9FC4D:
	LDA.w $0031,y
	BEQ.b CODE_A9FC56
	STA.l $7F2E00,x
CODE_A9FC56:
	LDA.w $0032,y
	BEQ.b CODE_A9FC63
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_A9FC63:
	LDA.w $0033,y
	BEQ.b CODE_A9FC70
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_A9FC70:
	LDA.w $0034,y
	BEQ.b CODE_A9FC79
	STA.l $7F3080,x
CODE_A9FC79:
	LDA.w $0035,y
	BEQ.b CODE_A9FC86
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_A9FC86:
	LDA.w $0036,y
	BEQ.b CODE_A9FC8F
	STA.l $7F3200,x
CODE_A9FC8F:
	LDA.w $0037,y
	BEQ.b CODE_A9FC9C
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_A9FC9C:
	LDA.w $0038,y
	BEQ.b CODE_A9FCA9
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_A9FCA9:
	LDA.w $0039,y
	BEQ.b CODE_A9FCB2
	STA.l $7F3480,x
CODE_A9FCB2:
	LDA.w $003A,y
	BEQ.b CODE_A9FCBF
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_A9FCBF:
	LDA.w $003B,y
	BEQ.b CODE_A9FCC8
	STA.l $7F3600,x
CODE_A9FCC8:
	LDA.w $003C,y
	BEQ.b CODE_A9FCD5
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_A9FCD5:
	LDA.w $003D,y
	BEQ.b CODE_A9FCE2
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_A9FCE2:
	LDA.w $003E,y
	BEQ.b CODE_A9FCEB
	STA.l $7F3880,x
CODE_A9FCEB:
	LDA.w $003F,y
	BEQ.b CODE_A9FCF4
	STA.l $7F3900,x
CODE_A9FCF4:
	REP.b #$20
	RTL

CODE_A9FCF7:
	REP.b #$20
	RTL

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

DATA_A9FCFA:
	incbin "InteriorMaps/RaptorPen_SubLevel2_MapLayout_JP_U1.rnc"

DATA_A9FEC6:
	incbin "InteriorMaps/NublarUtilityShed_SubLevel_MapLayout_JP_U1.rnc"

UNK_A9FF74:
	%InsertGarbageData($A9FF74, incbin, DATA_A9FF74.bin)

%BANK_END(<EndBank>)
endmacro

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

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

CODE_AA8000:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA800F
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AA800F:
	LDA.w $0001,y
	BEQ.b CODE_AA801C
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AA801C:
	LDA.w $0002,y
	BEQ.b CODE_AA8025
	STA.l $7F0800,x
CODE_AA8025:
	LDA.w $0003,y
	BEQ.b CODE_AA8032
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AA8032:
	LDA.w $0004,y
	BEQ.b CODE_AA803F
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AA803F:
	LDA.w $0005,y
	BEQ.b CODE_AA8048
	STA.l $7F0A80,x
CODE_AA8048:
	LDA.w $0006,y
	BEQ.b CODE_AA8055
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AA8055:
	LDA.w $0007,y
	BEQ.b CODE_AA8062
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AA8062:
	LDA.w $0008,y
	BEQ.b CODE_AA806B
	STA.l $7F0D00,x
CODE_AA806B:
	LDA.w $0009,y
	BEQ.b CODE_AA8078
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AA8078:
	LDA.w $000A,y
	BEQ.b CODE_AA8081
	STA.l $7F0E80,x
CODE_AA8081:
	LDA.w $000B,y
	BEQ.b CODE_AA808E
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AA808E:
	LDA.w $000C,y
	BEQ.b CODE_AA809B
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AA809B:
	LDA.w $000D,y
	BEQ.b CODE_AA80A4
	STA.l $7F1100,x
CODE_AA80A4:
	LDA.w $000E,y
	BEQ.b CODE_AA80B1
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AA80B1:
	LDA.w $000F,y
	BEQ.b CODE_AA80BE
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AA80BE:
	LDA.w $0010,y
	BEQ.b CODE_AA80C7
	STA.l $7F1380,x
CODE_AA80C7:
	LDA.w $0011,y
	BEQ.b CODE_AA80D4
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AA80D4:
	LDA.w $0012,y
	BEQ.b CODE_AA80DD
	STA.l $7F1500,x
CODE_AA80DD:
	LDA.w $0013,y
	BEQ.b CODE_AA80EA
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AA80EA:
	LDA.w $0014,y
	BEQ.b CODE_AA80F7
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AA80F7:
	LDA.w $0015,y
	BEQ.b CODE_AA8100
	STA.l $7F1780,x
CODE_AA8100:
	LDA.w $0016,y
	BEQ.b CODE_AA810D
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AA810D:
	LDA.w $0017,y
	BEQ.b CODE_AA811A
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AA811A:
	LDA.w $0018,y
	BEQ.b CODE_AA8123
	STA.l $7F1A00,x
CODE_AA8123:
	LDA.w $0019,y
	BEQ.b CODE_AA8130
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AA8130:
	LDA.w $001A,y
	BEQ.b CODE_AA813D
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AA813D:
	LDA.w $001B,y
	BEQ.b CODE_AA8146
	STA.l $7F1C80,x
CODE_AA8146:
	LDA.w $001C,y
	BEQ.b CODE_AA8153
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AA8153:
	LDA.w $001D,y
	BEQ.b CODE_AA815C
	STA.l $7F1E00,x
CODE_AA815C:
	LDA.w $001E,y
	BEQ.b CODE_AA8169
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA8169:
	LDA.w $001F,y
	BEQ.b CODE_AA8176
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA8176:
	LDA.w $0020,y
	BEQ.b CODE_AA817F
	STA.l $7F2080,x
CODE_AA817F:
	LDA.w $0021,y
	BEQ.b CODE_AA818C
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AA818C:
	LDA.w $0022,y
	BEQ.b CODE_AA8199
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA8199:
	LDA.w $0023,y
	BEQ.b CODE_AA81A2
	STA.l $7F2300,x
CODE_AA81A2:
	LDA.w $0024,y
	BEQ.b CODE_AA81AF
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AA81AF:
	LDA.w $0025,y
	BEQ.b CODE_AA81B8
	STA.l $7F2480,x
CODE_AA81B8:
	LDA.w $0026,y
	BEQ.b CODE_AA81C5
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AA81C5:
	LDA.w $0027,y
	BEQ.b CODE_AA81D2
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AA81D2:
	LDA.w $0028,y
	BEQ.b CODE_AA81DB
	STA.l $7F2700,x
CODE_AA81DB:
	LDA.w $0029,y
	BEQ.b CODE_AA81E8
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AA81E8:
	LDA.w $002A,y
	BEQ.b CODE_AA81F5
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AA81F5:
	LDA.w $002B,y
	BEQ.b CODE_AA81FE
	STA.l $7F2980,x
CODE_AA81FE:
	LDA.w $002C,y
	BEQ.b CODE_AA820B
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AA820B:
	LDA.w $002D,y
	BEQ.b CODE_AA8218
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AA8218:
	LDA.w $002E,y
	BEQ.b CODE_AA8221
	STA.l $7F2C00,x
CODE_AA8221:
	LDA.w $002F,y
	BEQ.b CODE_AA822E
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AA822E:
	LDA.w $0030,y
	BEQ.b CODE_AA8237
	STA.l $7F2D80,x
CODE_AA8237:
	LDA.w $0031,y
	BEQ.b CODE_AA8244
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AA8244:
	LDA.w $0032,y
	BEQ.b CODE_AA8251
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AA8251:
	LDA.w $0033,y
	BEQ.b CODE_AA825A
	STA.l $7F3000,x
CODE_AA825A:
	LDA.w $0034,y
	BEQ.b CODE_AA8267
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AA8267:
	LDA.w $0035,y
	BEQ.b CODE_AA8274
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AA8274:
	LDA.w $0036,y
	BEQ.b CODE_AA827D
	STA.l $7F3280,x
CODE_AA827D:
	LDA.w $0037,y
	BEQ.b CODE_AA828A
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AA828A:
	LDA.w $0038,y
	BEQ.b CODE_AA8293
	STA.l $7F3400,x
CODE_AA8293:
	LDA.w $0039,y
	BEQ.b CODE_AA82A0
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AA82A0:
	LDA.w $003A,y
	BEQ.b CODE_AA82AD
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AA82AD:
	LDA.w $003B,y
	BEQ.b CODE_AA82B6
	STA.l $7F3680,x
CODE_AA82B6:
	LDA.w $003C,y
	BEQ.b CODE_AA82C3
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AA82C3:
	LDA.w $003D,y
	BEQ.b CODE_AA82D0
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AA82D0:
	LDA.w $003E,y
	BEQ.b CODE_AA82D9
	STA.l $7F3900,x
CODE_AA82D9:
	LDA.w $003F,y
	BEQ.b CODE_AA82E2
	STA.l $7F3980,x
CODE_AA82E2:
	REP.b #$20
	RTL

CODE_AA82E5:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA82F4
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AA82F4:
	LDA.w $0001,y
	BEQ.b CODE_AA8301
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AA8301:
	LDA.w $0002,y
	BEQ.b CODE_AA830A
	STA.l $7F0780,x
CODE_AA830A:
	LDA.w $0003,y
	BEQ.b CODE_AA8317
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AA8317:
	LDA.w $0004,y
	BEQ.b CODE_AA8324
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AA8324:
	LDA.w $0005,y
	BEQ.b CODE_AA832D
	STA.l $7F0A00,x
CODE_AA832D:
	LDA.w $0006,y
	BEQ.b CODE_AA833A
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AA833A:
	LDA.w $0007,y
	BEQ.b CODE_AA8347
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AA8347:
	LDA.w $0008,y
	BEQ.b CODE_AA8350
	STA.l $7F0C80,x
CODE_AA8350:
	LDA.w $0009,y
	BEQ.b CODE_AA835D
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AA835D:
	LDA.w $000A,y
	BEQ.b CODE_AA836A
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AA836A:
	LDA.w $000B,y
	BEQ.b CODE_AA8373
	STA.l $7F0F00,x
CODE_AA8373:
	LDA.w $000C,y
	BEQ.b CODE_AA8380
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AA8380:
	LDA.w $000D,y
	BEQ.b CODE_AA838D
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AA838D:
	LDA.w $000E,y
	BEQ.b CODE_AA8396
	STA.l $7F1180,x
CODE_AA8396:
	LDA.w $000F,y
	BEQ.b CODE_AA83A3
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AA83A3:
	LDA.w $0010,y
	BEQ.b CODE_AA83B0
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AA83B0:
	LDA.w $0011,y
	BEQ.b CODE_AA83B9
	STA.l $7F1400,x
CODE_AA83B9:
	LDA.w $0012,y
	BEQ.b CODE_AA83C6
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AA83C6:
	LDA.w $0013,y
	BEQ.b CODE_AA83D3
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AA83D3:
	LDA.w $0014,y
	BEQ.b CODE_AA83DC
	STA.l $7F1680,x
CODE_AA83DC:
	LDA.w $0015,y
	BEQ.b CODE_AA83E9
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AA83E9:
	LDA.w $0016,y
	BEQ.b CODE_AA83F6
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AA83F6:
	LDA.w $0017,y
	BEQ.b CODE_AA83FF
	STA.l $7F1900,x
CODE_AA83FF:
	LDA.w $0018,y
	BEQ.b CODE_AA840C
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AA840C:
	LDA.w $0019,y
	BEQ.b CODE_AA8419
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AA8419:
	LDA.w $001A,y
	BEQ.b CODE_AA8422
	STA.l $7F1B80,x
CODE_AA8422:
	LDA.w $001B,y
	BEQ.b CODE_AA842F
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AA842F:
	LDA.w $001C,y
	BEQ.b CODE_AA843C
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AA843C:
	LDA.w $001D,y
	BEQ.b CODE_AA8445
	STA.l $7F1E00,x
CODE_AA8445:
	LDA.w $001E,y
	BEQ.b CODE_AA8452
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA8452:
	LDA.w $001F,y
	BEQ.b CODE_AA845F
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA845F:
	LDA.w $0020,y
	BEQ.b CODE_AA8468
	STA.l $7F2080,x
CODE_AA8468:
	LDA.w $0021,y
	BEQ.b CODE_AA8475
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AA8475:
	LDA.w $0022,y
	BEQ.b CODE_AA8482
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA8482:
	LDA.w $0023,y
	BEQ.b CODE_AA848B
	STA.l $7F2300,x
CODE_AA848B:
	LDA.w $0024,y
	BEQ.b CODE_AA8498
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AA8498:
	LDA.w $0025,y
	BEQ.b CODE_AA84A5
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AA84A5:
	LDA.w $0026,y
	BEQ.b CODE_AA84AE
	STA.l $7F2580,x
CODE_AA84AE:
	LDA.w $0027,y
	BEQ.b CODE_AA84BB
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AA84BB:
	LDA.w $0028,y
	BEQ.b CODE_AA84C8
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AA84C8:
	LDA.w $0029,y
	BEQ.b CODE_AA84D1
	STA.l $7F2800,x
CODE_AA84D1:
	LDA.w $002A,y
	BEQ.b CODE_AA84DE
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AA84DE:
	LDA.w $002B,y
	BEQ.b CODE_AA84EB
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AA84EB:
	LDA.w $002C,y
	BEQ.b CODE_AA84F4
	STA.l $7F2A80,x
CODE_AA84F4:
	LDA.w $002D,y
	BEQ.b CODE_AA8501
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AA8501:
	LDA.w $002E,y
	BEQ.b CODE_AA850E
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AA850E:
	LDA.w $002F,y
	BEQ.b CODE_AA8517
	STA.l $7F2D00,x
CODE_AA8517:
	LDA.w $0030,y
	BEQ.b CODE_AA8524
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AA8524:
	LDA.w $0031,y
	BEQ.b CODE_AA8531
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AA8531:
	LDA.w $0032,y
	BEQ.b CODE_AA853A
	STA.l $7F2F80,x
CODE_AA853A:
	LDA.w $0033,y
	BEQ.b CODE_AA8547
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AA8547:
	LDA.w $0034,y
	BEQ.b CODE_AA8554
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AA8554:
	LDA.w $0035,y
	BEQ.b CODE_AA855D
	STA.l $7F3200,x
CODE_AA855D:
	LDA.w $0036,y
	BEQ.b CODE_AA856A
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AA856A:
	LDA.w $0037,y
	BEQ.b CODE_AA8577
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AA8577:
	LDA.w $0038,y
	BEQ.b CODE_AA8580
	STA.l $7F3480,x
CODE_AA8580:
	LDA.w $0039,y
	BEQ.b CODE_AA858D
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AA858D:
	LDA.w $003A,y
	BEQ.b CODE_AA859A
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AA859A:
	LDA.w $003B,y
	BEQ.b CODE_AA85A3
	STA.l $7F3700,x
CODE_AA85A3:
	LDA.w $003C,y
	BEQ.b CODE_AA85B0
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AA85B0:
	LDA.w $003D,y
	BEQ.b CODE_AA85BD
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AA85BD:
	LDA.w $003E,y
	BEQ.b CODE_AA85C6
	STA.l $7F3980,x
CODE_AA85C6:
	LDA.w $003F,y
	BEQ.b CODE_AA85CF
	STA.l $7F3A00,x
CODE_AA85CF:
	REP.b #$20
	RTL

CODE_AA85D2:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA85E1
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AA85E1:
	LDA.w $0001,y
	BEQ.b CODE_AA85EE
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AA85EE:
	LDA.w $0002,y
	BEQ.b CODE_AA85FB
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AA85FB:
	LDA.w $0003,y
	BEQ.b CODE_AA8604
	STA.l $7F0800,x
CODE_AA8604:
	LDA.w $0004,y
	BEQ.b CODE_AA8611
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AA8611:
	LDA.w $0005,y
	BEQ.b CODE_AA861E
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AA861E:
	LDA.w $0006,y
	BEQ.b CODE_AA8627
	STA.l $7F0A80,x
CODE_AA8627:
	LDA.w $0007,y
	BEQ.b CODE_AA8634
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AA8634:
	LDA.w $0008,y
	BEQ.b CODE_AA8641
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AA8641:
	LDA.w $0009,y
	BEQ.b CODE_AA864A
	STA.l $7F0D00,x
CODE_AA864A:
	LDA.w $000A,y
	BEQ.b CODE_AA8657
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AA8657:
	LDA.w $000B,y
	BEQ.b CODE_AA8664
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AA8664:
	LDA.w $000C,y
	BEQ.b CODE_AA8671
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AA8671:
	LDA.w $000D,y
	BEQ.b CODE_AA867A
	STA.l $7F1080,x
CODE_AA867A:
	LDA.w $000E,y
	BEQ.b CODE_AA8687
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AA8687:
	LDA.w $000F,y
	BEQ.b CODE_AA8694
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AA8694:
	LDA.w $0010,y
	BEQ.b CODE_AA869D
	STA.l $7F1300,x
CODE_AA869D:
	LDA.w $0011,y
	BEQ.b CODE_AA86AA
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AA86AA:
	LDA.w $0012,y
	BEQ.b CODE_AA86B7
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AA86B7:
	LDA.w $0013,y
	BEQ.b CODE_AA86C0
	STA.l $7F1580,x
CODE_AA86C0:
	LDA.w $0014,y
	BEQ.b CODE_AA86CD
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AA86CD:
	LDA.w $0015,y
	BEQ.b CODE_AA86DA
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AA86DA:
	LDA.w $0016,y
	BEQ.b CODE_AA86E3
	STA.l $7F1800,x
CODE_AA86E3:
	LDA.w $0017,y
	BEQ.b CODE_AA86F0
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AA86F0:
	LDA.w $0018,y
	BEQ.b CODE_AA86FD
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AA86FD:
	LDA.w $0019,y
	BEQ.b CODE_AA870A
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AA870A:
	LDA.w $001A,y
	BEQ.b CODE_AA8713
	STA.l $7F1B80,x
CODE_AA8713:
	LDA.w $001B,y
	BEQ.b CODE_AA8720
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AA8720:
	LDA.w $001C,y
	BEQ.b CODE_AA872D
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AA872D:
	LDA.w $001D,y
	BEQ.b CODE_AA8736
	STA.l $7F1E00,x
CODE_AA8736:
	LDA.w $001E,y
	BEQ.b CODE_AA8743
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA8743:
	LDA.w $001F,y
	BEQ.b CODE_AA8750
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA8750:
	LDA.w $0020,y
	BEQ.b CODE_AA8759
	STA.l $7F2080,x
CODE_AA8759:
	LDA.w $0021,y
	BEQ.b CODE_AA8766
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AA8766:
	LDA.w $0022,y
	BEQ.b CODE_AA8773
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA8773:
	LDA.w $0023,y
	BEQ.b CODE_AA8780
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA8780:
	LDA.w $0024,y
	BEQ.b CODE_AA8789
	STA.l $7F2400,x
CODE_AA8789:
	LDA.w $0025,y
	BEQ.b CODE_AA8796
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AA8796:
	LDA.w $0026,y
	BEQ.b CODE_AA87A3
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AA87A3:
	LDA.w $0027,y
	BEQ.b CODE_AA87AC
	STA.l $7F2680,x
CODE_AA87AC:
	LDA.w $0028,y
	BEQ.b CODE_AA87B9
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AA87B9:
	LDA.w $0029,y
	BEQ.b CODE_AA87C6
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AA87C6:
	LDA.w $002A,y
	BEQ.b CODE_AA87CF
	STA.l $7F2900,x
CODE_AA87CF:
	LDA.w $002B,y
	BEQ.b CODE_AA87DC
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AA87DC:
	LDA.w $002C,y
	BEQ.b CODE_AA87E9
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AA87E9:
	LDA.w $002D,y
	BEQ.b CODE_AA87F2
	STA.l $7F2B80,x
CODE_AA87F2:
	LDA.w $002E,y
	BEQ.b CODE_AA87FF
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AA87FF:
	LDA.w $002F,y
	BEQ.b CODE_AA880C
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AA880C:
	LDA.w $0030,y
	BEQ.b CODE_AA8819
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AA8819:
	LDA.w $0031,y
	BEQ.b CODE_AA8822
	STA.l $7F2F00,x
CODE_AA8822:
	LDA.w $0032,y
	BEQ.b CODE_AA882F
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AA882F:
	LDA.w $0033,y
	BEQ.b CODE_AA883C
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AA883C:
	LDA.w $0034,y
	BEQ.b CODE_AA8845
	STA.l $7F3180,x
CODE_AA8845:
	LDA.w $0035,y
	BEQ.b CODE_AA8852
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AA8852:
	LDA.w $0036,y
	BEQ.b CODE_AA885F
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AA885F:
	LDA.w $0037,y
	BEQ.b CODE_AA8868
	STA.l $7F3400,x
CODE_AA8868:
	LDA.w $0038,y
	BEQ.b CODE_AA8875
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AA8875:
	LDA.w $0039,y
	BEQ.b CODE_AA8882
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AA8882:
	LDA.w $003A,y
	BEQ.b CODE_AA888F
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AA888F:
	LDA.w $003B,y
	BEQ.b CODE_AA8898
	STA.l $7F3780,x
CODE_AA8898:
	LDA.w $003C,y
	BEQ.b CODE_AA88A5
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AA88A5:
	LDA.w $003D,y
	BEQ.b CODE_AA88B2
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AA88B2:
	LDA.w $003E,y
	BEQ.b CODE_AA88BB
	STA.l $7F3A00,x
CODE_AA88BB:
	LDA.w $003F,y
	BEQ.b CODE_AA88C4
	STA.l $7F3A80,x
CODE_AA88C4:
	REP.b #$20
	RTL

CODE_AA88C7:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA88D6
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AA88D6:
	LDA.w $0001,y
	BEQ.b CODE_AA88E3
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AA88E3:
	LDA.w $0002,y
	BEQ.b CODE_AA88F0
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AA88F0:
	LDA.w $0003,y
	BEQ.b CODE_AA88F9
	STA.l $7F0780,x
CODE_AA88F9:
	LDA.w $0004,y
	BEQ.b CODE_AA8906
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AA8906:
	LDA.w $0005,y
	BEQ.b CODE_AA8913
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AA8913:
	LDA.w $0006,y
	BEQ.b CODE_AA8920
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AA8920:
	LDA.w $0007,y
	BEQ.b CODE_AA8929
	STA.l $7F0B00,x
CODE_AA8929:
	LDA.w $0008,y
	BEQ.b CODE_AA8936
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AA8936:
	LDA.w $0009,y
	BEQ.b CODE_AA8943
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AA8943:
	LDA.w $000A,y
	BEQ.b CODE_AA8950
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AA8950:
	LDA.w $000B,y
	BEQ.b CODE_AA8959
	STA.l $7F0E80,x
CODE_AA8959:
	LDA.w $000C,y
	BEQ.b CODE_AA8966
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AA8966:
	LDA.w $000D,y
	BEQ.b CODE_AA8973
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AA8973:
	LDA.w $000E,y
	BEQ.b CODE_AA897C
	STA.l $7F1100,x
CODE_AA897C:
	LDA.w $000F,y
	BEQ.b CODE_AA8989
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AA8989:
	LDA.w $0010,y
	BEQ.b CODE_AA8996
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AA8996:
	LDA.w $0011,y
	BEQ.b CODE_AA89A3
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AA89A3:
	LDA.w $0012,y
	BEQ.b CODE_AA89AC
	STA.l $7F1480,x
CODE_AA89AC:
	LDA.w $0013,y
	BEQ.b CODE_AA89B9
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AA89B9:
	LDA.w $0014,y
	BEQ.b CODE_AA89C6
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AA89C6:
	LDA.w $0015,y
	BEQ.b CODE_AA89D3
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AA89D3:
	LDA.w $0016,y
	BEQ.b CODE_AA89DC
	STA.l $7F1800,x
CODE_AA89DC:
	LDA.w $0017,y
	BEQ.b CODE_AA89E9
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AA89E9:
	LDA.w $0018,y
	BEQ.b CODE_AA89F6
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AA89F6:
	LDA.w $0019,y
	BEQ.b CODE_AA89FF
	STA.l $7F1A80,x
CODE_AA89FF:
	LDA.w $001A,y
	BEQ.b CODE_AA8A0C
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AA8A0C:
	LDA.w $001B,y
	BEQ.b CODE_AA8A19
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AA8A19:
	LDA.w $001C,y
	BEQ.b CODE_AA8A26
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AA8A26:
	LDA.w $001D,y
	BEQ.b CODE_AA8A2F
	STA.l $7F1E00,x
CODE_AA8A2F:
	LDA.w $001E,y
	BEQ.b CODE_AA8A3C
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA8A3C:
	LDA.w $001F,y
	BEQ.b CODE_AA8A49
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA8A49:
	LDA.w $0020,y
	BEQ.b CODE_AA8A56
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AA8A56:
	LDA.w $0021,y
	BEQ.b CODE_AA8A5F
	STA.l $7F2180,x
CODE_AA8A5F:
	LDA.w $0022,y
	BEQ.b CODE_AA8A6C
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA8A6C:
	LDA.w $0023,y
	BEQ.b CODE_AA8A79
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA8A79:
	LDA.w $0024,y
	BEQ.b CODE_AA8A82
	STA.l $7F2400,x
CODE_AA8A82:
	LDA.w $0025,y
	BEQ.b CODE_AA8A8F
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AA8A8F:
	LDA.w $0026,y
	BEQ.b CODE_AA8A9C
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AA8A9C:
	LDA.w $0027,y
	BEQ.b CODE_AA8AA9
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AA8AA9:
	LDA.w $0028,y
	BEQ.b CODE_AA8AB2
	STA.l $7F2780,x
CODE_AA8AB2:
	LDA.w $0029,y
	BEQ.b CODE_AA8ABF
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AA8ABF:
	LDA.w $002A,y
	BEQ.b CODE_AA8ACC
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AA8ACC:
	LDA.w $002B,y
	BEQ.b CODE_AA8AD9
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AA8AD9:
	LDA.w $002C,y
	BEQ.b CODE_AA8AE2
	STA.l $7F2B00,x
CODE_AA8AE2:
	LDA.w $002D,y
	BEQ.b CODE_AA8AEF
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AA8AEF:
	LDA.w $002E,y
	BEQ.b CODE_AA8AFC
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AA8AFC:
	LDA.w $002F,y
	BEQ.b CODE_AA8B09
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AA8B09:
	LDA.w $0030,y
	BEQ.b CODE_AA8B12
	STA.l $7F2E80,x
CODE_AA8B12:
	LDA.w $0031,y
	BEQ.b CODE_AA8B1F
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AA8B1F:
	LDA.w $0032,y
	BEQ.b CODE_AA8B2C
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AA8B2C:
	LDA.w $0033,y
	BEQ.b CODE_AA8B35
	STA.l $7F3100,x
CODE_AA8B35:
	LDA.w $0034,y
	BEQ.b CODE_AA8B42
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AA8B42:
	LDA.w $0035,y
	BEQ.b CODE_AA8B4F
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AA8B4F:
	LDA.w $0036,y
	BEQ.b CODE_AA8B5C
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AA8B5C:
	LDA.w $0037,y
	BEQ.b CODE_AA8B65
	STA.l $7F3480,x
CODE_AA8B65:
	LDA.w $0038,y
	BEQ.b CODE_AA8B72
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AA8B72:
	LDA.w $0039,y
	BEQ.b CODE_AA8B7F
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AA8B7F:
	LDA.w $003A,y
	BEQ.b CODE_AA8B8C
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AA8B8C:
	LDA.w $003B,y
	BEQ.b CODE_AA8B95
	STA.l $7F3800,x
CODE_AA8B95:
	LDA.w $003C,y
	BEQ.b CODE_AA8BA2
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AA8BA2:
	LDA.w $003D,y
	BEQ.b CODE_AA8BAF
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AA8BAF:
	LDA.w $003E,y
	BEQ.b CODE_AA8BB8
	STA.l $7F3A80,x
CODE_AA8BB8:
	LDA.w $003F,y
	BEQ.b CODE_AA8BC1
	STA.l $7F3B00,x
CODE_AA8BC1:
	REP.b #$20
	RTL

CODE_AA8BC4:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA8BD3
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AA8BD3:
	LDA.w $0001,y
	BEQ.b CODE_AA8BE0
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AA8BE0:
	LDA.w $0002,y
	BEQ.b CODE_AA8BED
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AA8BED:
	LDA.w $0003,y
	BEQ.b CODE_AA8BFA
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AA8BFA:
	LDA.w $0004,y
	BEQ.b CODE_AA8C03
	STA.l $7F0800,x
CODE_AA8C03:
	LDA.w $0005,y
	BEQ.b CODE_AA8C10
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AA8C10:
	LDA.w $0006,y
	BEQ.b CODE_AA8C1D
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AA8C1D:
	LDA.w $0007,y
	BEQ.b CODE_AA8C2A
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AA8C2A:
	LDA.w $0008,y
	BEQ.b CODE_AA8C33
	STA.l $7F0B80,x
CODE_AA8C33:
	LDA.w $0009,y
	BEQ.b CODE_AA8C40
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AA8C40:
	LDA.w $000A,y
	BEQ.b CODE_AA8C4D
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AA8C4D:
	LDA.w $000B,y
	BEQ.b CODE_AA8C5A
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AA8C5A:
	LDA.w $000C,y
	BEQ.b CODE_AA8C63
	STA.l $7F0F00,x
CODE_AA8C63:
	LDA.w $000D,y
	BEQ.b CODE_AA8C70
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AA8C70:
	LDA.w $000E,y
	BEQ.b CODE_AA8C7D
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AA8C7D:
	LDA.w $000F,y
	BEQ.b CODE_AA8C8A
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AA8C8A:
	LDA.w $0010,y
	BEQ.b CODE_AA8C93
	STA.l $7F1280,x
CODE_AA8C93:
	LDA.w $0011,y
	BEQ.b CODE_AA8CA0
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AA8CA0:
	LDA.w $0012,y
	BEQ.b CODE_AA8CAD
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AA8CAD:
	LDA.w $0013,y
	BEQ.b CODE_AA8CBA
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AA8CBA:
	LDA.w $0014,y
	BEQ.b CODE_AA8CC3
	STA.l $7F1600,x
CODE_AA8CC3:
	LDA.w $0015,y
	BEQ.b CODE_AA8CD0
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AA8CD0:
	LDA.w $0016,y
	BEQ.b CODE_AA8CDD
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AA8CDD:
	LDA.w $0017,y
	BEQ.b CODE_AA8CEA
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AA8CEA:
	LDA.w $0018,y
	BEQ.b CODE_AA8CF3
	STA.l $7F1980,x
CODE_AA8CF3:
	LDA.w $0019,y
	BEQ.b CODE_AA8D00
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AA8D00:
	LDA.w $001A,y
	BEQ.b CODE_AA8D0D
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AA8D0D:
	LDA.w $001B,y
	BEQ.b CODE_AA8D1A
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AA8D1A:
	LDA.w $001C,y
	BEQ.b CODE_AA8D23
	STA.l $7F1D00,x
CODE_AA8D23:
	LDA.w $001D,y
	BEQ.b CODE_AA8D30
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AA8D30:
	LDA.w $001E,y
	BEQ.b CODE_AA8D3D
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA8D3D:
	LDA.w $001F,y
	BEQ.b CODE_AA8D4A
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA8D4A:
	LDA.w $0020,y
	BEQ.b CODE_AA8D53
	STA.l $7F2080,x
CODE_AA8D53:
	LDA.w $0021,y
	BEQ.b CODE_AA8D60
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AA8D60:
	LDA.w $0022,y
	BEQ.b CODE_AA8D6D
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA8D6D:
	LDA.w $0023,y
	BEQ.b CODE_AA8D7A
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA8D7A:
	LDA.w $0024,y
	BEQ.b CODE_AA8D83
	STA.l $7F2400,x
CODE_AA8D83:
	LDA.w $0025,y
	BEQ.b CODE_AA8D90
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AA8D90:
	LDA.w $0026,y
	BEQ.b CODE_AA8D9D
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AA8D9D:
	LDA.w $0027,y
	BEQ.b CODE_AA8DAA
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AA8DAA:
	LDA.w $0028,y
	BEQ.b CODE_AA8DB3
	STA.l $7F2780,x
CODE_AA8DB3:
	LDA.w $0029,y
	BEQ.b CODE_AA8DC0
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AA8DC0:
	LDA.w $002A,y
	BEQ.b CODE_AA8DCD
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AA8DCD:
	LDA.w $002B,y
	BEQ.b CODE_AA8DDA
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AA8DDA:
	LDA.w $002C,y
	BEQ.b CODE_AA8DE3
	STA.l $7F2B00,x
CODE_AA8DE3:
	LDA.w $002D,y
	BEQ.b CODE_AA8DF0
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AA8DF0:
	LDA.w $002E,y
	BEQ.b CODE_AA8DFD
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AA8DFD:
	LDA.w $002F,y
	BEQ.b CODE_AA8E0A
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AA8E0A:
	LDA.w $0030,y
	BEQ.b CODE_AA8E13
	STA.l $7F2E80,x
CODE_AA8E13:
	LDA.w $0031,y
	BEQ.b CODE_AA8E20
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AA8E20:
	LDA.w $0032,y
	BEQ.b CODE_AA8E2D
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AA8E2D:
	LDA.w $0033,y
	BEQ.b CODE_AA8E3A
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AA8E3A:
	LDA.w $0034,y
	BEQ.b CODE_AA8E43
	STA.l $7F3200,x
CODE_AA8E43:
	LDA.w $0035,y
	BEQ.b CODE_AA8E50
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AA8E50:
	LDA.w $0036,y
	BEQ.b CODE_AA8E5D
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AA8E5D:
	LDA.w $0037,y
	BEQ.b CODE_AA8E6A
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AA8E6A:
	LDA.w $0038,y
	BEQ.b CODE_AA8E73
	STA.l $7F3580,x
CODE_AA8E73:
	LDA.w $0039,y
	BEQ.b CODE_AA8E80
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AA8E80:
	LDA.w $003A,y
	BEQ.b CODE_AA8E8D
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AA8E8D:
	LDA.w $003B,y
	BEQ.b CODE_AA8E9A
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AA8E9A:
	LDA.w $003C,y
	BEQ.b CODE_AA8EA3
	STA.l $7F3900,x
CODE_AA8EA3:
	LDA.w $003D,y
	BEQ.b CODE_AA8EB0
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AA8EB0:
	LDA.w $003E,y
	BEQ.b CODE_AA8EBD
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AA8EBD:
	LDA.w $003F,y
	BEQ.b CODE_AA8EC6
	STA.l $7F3B80,x
CODE_AA8EC6:
	REP.b #$20
	RTL

CODE_AA8EC9:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA8ED8
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AA8ED8:
	LDA.w $0001,y
	BEQ.b CODE_AA8EE5
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AA8EE5:
	LDA.w $0002,y
	BEQ.b CODE_AA8EF2
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AA8EF2:
	LDA.w $0003,y
	BEQ.b CODE_AA8EFF
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AA8EFF:
	LDA.w $0004,y
	BEQ.b CODE_AA8F08
	STA.l $7F0780,x
CODE_AA8F08:
	LDA.w $0005,y
	BEQ.b CODE_AA8F15
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AA8F15:
	LDA.w $0006,y
	BEQ.b CODE_AA8F22
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AA8F22:
	LDA.w $0007,y
	BEQ.b CODE_AA8F2F
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AA8F2F:
	LDA.w $0008,y
	BEQ.b CODE_AA8F3C
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AA8F3C:
	LDA.w $0009,y
	BEQ.b CODE_AA8F45
	STA.l $7F0C00,x
CODE_AA8F45:
	LDA.w $000A,y
	BEQ.b CODE_AA8F52
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AA8F52:
	LDA.w $000B,y
	BEQ.b CODE_AA8F5F
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AA8F5F:
	LDA.w $000C,y
	BEQ.b CODE_AA8F6C
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AA8F6C:
	LDA.w $000D,y
	BEQ.b CODE_AA8F79
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AA8F79:
	LDA.w $000E,y
	BEQ.b CODE_AA8F82
	STA.l $7F1080,x
CODE_AA8F82:
	LDA.w $000F,y
	BEQ.b CODE_AA8F8F
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AA8F8F:
	LDA.w $0010,y
	BEQ.b CODE_AA8F9C
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AA8F9C:
	LDA.w $0011,y
	BEQ.b CODE_AA8FA9
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AA8FA9:
	LDA.w $0012,y
	BEQ.b CODE_AA8FB6
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AA8FB6:
	LDA.w $0013,y
	BEQ.b CODE_AA8FBF
	STA.l $7F1500,x
CODE_AA8FBF:
	LDA.w $0014,y
	BEQ.b CODE_AA8FCC
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AA8FCC:
	LDA.w $0015,y
	BEQ.b CODE_AA8FD9
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AA8FD9:
	LDA.w $0016,y
	BEQ.b CODE_AA8FE6
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AA8FE6:
	LDA.w $0017,y
	BEQ.b CODE_AA8FEF
	STA.l $7F1880,x
CODE_AA8FEF:
	LDA.w $0018,y
	BEQ.b CODE_AA8FFC
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AA8FFC:
	LDA.w $0019,y
	BEQ.b CODE_AA9009
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AA9009:
	LDA.w $001A,y
	BEQ.b CODE_AA9016
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AA9016:
	LDA.w $001B,y
	BEQ.b CODE_AA9023
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AA9023:
	LDA.w $001C,y
	BEQ.b CODE_AA902C
	STA.l $7F1D00,x
CODE_AA902C:
	LDA.w $001D,y
	BEQ.b CODE_AA9039
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AA9039:
	LDA.w $001E,y
	BEQ.b CODE_AA9046
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA9046:
	LDA.w $001F,y
	BEQ.b CODE_AA9053
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA9053:
	LDA.w $0020,y
	BEQ.b CODE_AA9060
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AA9060:
	LDA.w $0021,y
	BEQ.b CODE_AA9069
	STA.l $7F2180,x
CODE_AA9069:
	LDA.w $0022,y
	BEQ.b CODE_AA9076
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA9076:
	LDA.w $0023,y
	BEQ.b CODE_AA9083
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA9083:
	LDA.w $0024,y
	BEQ.b CODE_AA9090
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AA9090:
	LDA.w $0025,y
	BEQ.b CODE_AA909D
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AA909D:
	LDA.w $0026,y
	BEQ.b CODE_AA90A6
	STA.l $7F2600,x
CODE_AA90A6:
	LDA.w $0027,y
	BEQ.b CODE_AA90B3
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AA90B3:
	LDA.w $0028,y
	BEQ.b CODE_AA90C0
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AA90C0:
	LDA.w $0029,y
	BEQ.b CODE_AA90CD
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AA90CD:
	LDA.w $002A,y
	BEQ.b CODE_AA90D6
	STA.l $7F2980,x
CODE_AA90D6:
	LDA.w $002B,y
	BEQ.b CODE_AA90E3
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AA90E3:
	LDA.w $002C,y
	BEQ.b CODE_AA90F0
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AA90F0:
	LDA.w $002D,y
	BEQ.b CODE_AA90FD
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AA90FD:
	LDA.w $002E,y
	BEQ.b CODE_AA910A
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AA910A:
	LDA.w $002F,y
	BEQ.b CODE_AA9113
	STA.l $7F2E00,x
CODE_AA9113:
	LDA.w $0030,y
	BEQ.b CODE_AA9120
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AA9120:
	LDA.w $0031,y
	BEQ.b CODE_AA912D
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AA912D:
	LDA.w $0032,y
	BEQ.b CODE_AA913A
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AA913A:
	LDA.w $0033,y
	BEQ.b CODE_AA9147
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AA9147:
	LDA.w $0034,y
	BEQ.b CODE_AA9150
	STA.l $7F3280,x
CODE_AA9150:
	LDA.w $0035,y
	BEQ.b CODE_AA915D
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AA915D:
	LDA.w $0036,y
	BEQ.b CODE_AA916A
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AA916A:
	LDA.w $0037,y
	BEQ.b CODE_AA9177
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AA9177:
	LDA.w $0038,y
	BEQ.b CODE_AA9184
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AA9184:
	LDA.w $0039,y
	BEQ.b CODE_AA918D
	STA.l $7F3700,x
CODE_AA918D:
	LDA.w $003A,y
	BEQ.b CODE_AA919A
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AA919A:
	LDA.w $003B,y
	BEQ.b CODE_AA91A7
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AA91A7:
	LDA.w $003C,y
	BEQ.b CODE_AA91B4
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AA91B4:
	LDA.w $003D,y
	BEQ.b CODE_AA91BD
	STA.l $7F3A80,x
CODE_AA91BD:
	LDA.w $003E,y
	BEQ.b CODE_AA91CA
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AA91CA:
	LDA.w $003F,y
	BEQ.b CODE_AA91D3
	STA.l $7F3C00,x
CODE_AA91D3:
	REP.b #$20
	RTL

CODE_AA91D6:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA91E5
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AA91E5:
	LDA.w $0001,y
	BEQ.b CODE_AA91F2
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AA91F2:
	LDA.w $0002,y
	BEQ.b CODE_AA91FF
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AA91FF:
	LDA.w $0003,y
	BEQ.b CODE_AA920C
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AA920C:
	LDA.w $0004,y
	BEQ.b CODE_AA9219
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AA9219:
	LDA.w $0005,y
	BEQ.b CODE_AA9222
	STA.l $7F0800,x
CODE_AA9222:
	LDA.w $0006,y
	BEQ.b CODE_AA922F
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AA922F:
	LDA.w $0007,y
	BEQ.b CODE_AA923C
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AA923C:
	LDA.w $0008,y
	BEQ.b CODE_AA9249
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AA9249:
	LDA.w $0009,y
	BEQ.b CODE_AA9256
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AA9256:
	LDA.w $000A,y
	BEQ.b CODE_AA925F
	STA.l $7F0C80,x
CODE_AA925F:
	LDA.w $000B,y
	BEQ.b CODE_AA926C
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AA926C:
	LDA.w $000C,y
	BEQ.b CODE_AA9279
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AA9279:
	LDA.w $000D,y
	BEQ.b CODE_AA9286
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AA9286:
	LDA.w $000E,y
	BEQ.b CODE_AA9293
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AA9293:
	LDA.w $000F,y
	BEQ.b CODE_AA92A0
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AA92A0:
	LDA.w $0010,y
	BEQ.b CODE_AA92A9
	STA.l $7F1200,x
CODE_AA92A9:
	LDA.w $0011,y
	BEQ.b CODE_AA92B6
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AA92B6:
	LDA.w $0012,y
	BEQ.b CODE_AA92C3
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AA92C3:
	LDA.w $0013,y
	BEQ.b CODE_AA92D0
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AA92D0:
	LDA.w $0014,y
	BEQ.b CODE_AA92DD
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AA92DD:
	LDA.w $0015,y
	BEQ.b CODE_AA92E6
	STA.l $7F1680,x
CODE_AA92E6:
	LDA.w $0016,y
	BEQ.b CODE_AA92F3
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AA92F3:
	LDA.w $0017,y
	BEQ.b CODE_AA9300
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AA9300:
	LDA.w $0018,y
	BEQ.b CODE_AA930D
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AA930D:
	LDA.w $0019,y
	BEQ.b CODE_AA931A
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AA931A:
	LDA.w $001A,y
	BEQ.b CODE_AA9327
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AA9327:
	LDA.w $001B,y
	BEQ.b CODE_AA9330
	STA.l $7F1C00,x
CODE_AA9330:
	LDA.w $001C,y
	BEQ.b CODE_AA933D
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AA933D:
	LDA.w $001D,y
	BEQ.b CODE_AA934A
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AA934A:
	LDA.w $001E,y
	BEQ.b CODE_AA9357
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA9357:
	LDA.w $001F,y
	BEQ.b CODE_AA9364
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA9364:
	LDA.w $0020,y
	BEQ.b CODE_AA936D
	STA.l $7F2080,x
CODE_AA936D:
	LDA.w $0021,y
	BEQ.b CODE_AA937A
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AA937A:
	LDA.w $0022,y
	BEQ.b CODE_AA9387
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA9387:
	LDA.w $0023,y
	BEQ.b CODE_AA9394
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA9394:
	LDA.w $0024,y
	BEQ.b CODE_AA93A1
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AA93A1:
	LDA.w $0025,y
	BEQ.b CODE_AA93AA
	STA.l $7F2500,x
CODE_AA93AA:
	LDA.w $0026,y
	BEQ.b CODE_AA93B7
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AA93B7:
	LDA.w $0027,y
	BEQ.b CODE_AA93C4
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AA93C4:
	LDA.w $0028,y
	BEQ.b CODE_AA93D1
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AA93D1:
	LDA.w $0029,y
	BEQ.b CODE_AA93DE
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AA93DE:
	LDA.w $002A,y
	BEQ.b CODE_AA93EB
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AA93EB:
	LDA.w $002B,y
	BEQ.b CODE_AA93F4
	STA.l $7F2A80,x
CODE_AA93F4:
	LDA.w $002C,y
	BEQ.b CODE_AA9401
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AA9401:
	LDA.w $002D,y
	BEQ.b CODE_AA940E
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AA940E:
	LDA.w $002E,y
	BEQ.b CODE_AA941B
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AA941B:
	LDA.w $002F,y
	BEQ.b CODE_AA9428
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AA9428:
	LDA.w $0030,y
	BEQ.b CODE_AA9431
	STA.l $7F2F00,x
CODE_AA9431:
	LDA.w $0031,y
	BEQ.b CODE_AA943E
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AA943E:
	LDA.w $0032,y
	BEQ.b CODE_AA944B
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AA944B:
	LDA.w $0033,y
	BEQ.b CODE_AA9458
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AA9458:
	LDA.w $0034,y
	BEQ.b CODE_AA9465
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AA9465:
	LDA.w $0035,y
	BEQ.b CODE_AA9472
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AA9472:
	LDA.w $0036,y
	BEQ.b CODE_AA947B
	STA.l $7F3480,x
CODE_AA947B:
	LDA.w $0037,y
	BEQ.b CODE_AA9488
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AA9488:
	LDA.w $0038,y
	BEQ.b CODE_AA9495
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AA9495:
	LDA.w $0039,y
	BEQ.b CODE_AA94A2
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AA94A2:
	LDA.w $003A,y
	BEQ.b CODE_AA94AF
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AA94AF:
	LDA.w $003B,y
	BEQ.b CODE_AA94B8
	STA.l $7F3900,x
CODE_AA94B8:
	LDA.w $003C,y
	BEQ.b CODE_AA94C5
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AA94C5:
	LDA.w $003D,y
	BEQ.b CODE_AA94D2
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AA94D2:
	LDA.w $003E,y
	BEQ.b CODE_AA94DF
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AA94DF:
	LDA.w $003F,y
	BEQ.b CODE_AA94E8
	STA.l $7F3C80,x
CODE_AA94E8:
	REP.b #$20
	RTL

CODE_AA94EB:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA94FA
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AA94FA:
	LDA.w $0001,y
	BEQ.b CODE_AA9507
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AA9507:
	LDA.w $0002,y
	BEQ.b CODE_AA9514
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AA9514:
	LDA.w $0003,y
	BEQ.b CODE_AA9521
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AA9521:
	LDA.w $0004,y
	BEQ.b CODE_AA952E
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AA952E:
	LDA.w $0005,y
	BEQ.b CODE_AA953B
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AA953B:
	LDA.w $0006,y
	BEQ.b CODE_AA9544
	STA.l $7F0880,x
CODE_AA9544:
	LDA.w $0007,y
	BEQ.b CODE_AA9551
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AA9551:
	LDA.w $0008,y
	BEQ.b CODE_AA955E
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AA955E:
	LDA.w $0009,y
	BEQ.b CODE_AA956B
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AA956B:
	LDA.w $000A,y
	BEQ.b CODE_AA9578
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AA9578:
	LDA.w $000B,y
	BEQ.b CODE_AA9585
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AA9585:
	LDA.w $000C,y
	BEQ.b CODE_AA9592
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AA9592:
	LDA.w $000D,y
	BEQ.b CODE_AA959B
	STA.l $7F0F00,x
CODE_AA959B:
	LDA.w $000E,y
	BEQ.b CODE_AA95A8
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AA95A8:
	LDA.w $000F,y
	BEQ.b CODE_AA95B5
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AA95B5:
	LDA.w $0010,y
	BEQ.b CODE_AA95C2
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AA95C2:
	LDA.w $0011,y
	BEQ.b CODE_AA95CF
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AA95CF:
	LDA.w $0012,y
	BEQ.b CODE_AA95DC
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AA95DC:
	LDA.w $0013,y
	BEQ.b CODE_AA95E9
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AA95E9:
	LDA.w $0014,y
	BEQ.b CODE_AA95F2
	STA.l $7F1580,x
CODE_AA95F2:
	LDA.w $0015,y
	BEQ.b CODE_AA95FF
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AA95FF:
	LDA.w $0016,y
	BEQ.b CODE_AA960C
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AA960C:
	LDA.w $0017,y
	BEQ.b CODE_AA9619
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AA9619:
	LDA.w $0018,y
	BEQ.b CODE_AA9626
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AA9626:
	LDA.w $0019,y
	BEQ.b CODE_AA9633
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AA9633:
	LDA.w $001A,y
	BEQ.b CODE_AA9640
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AA9640:
	LDA.w $001B,y
	BEQ.b CODE_AA9649
	STA.l $7F1C00,x
CODE_AA9649:
	LDA.w $001C,y
	BEQ.b CODE_AA9656
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AA9656:
	LDA.w $001D,y
	BEQ.b CODE_AA9663
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AA9663:
	LDA.w $001E,y
	BEQ.b CODE_AA9670
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA9670:
	LDA.w $001F,y
	BEQ.b CODE_AA967D
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA967D:
	LDA.w $0020,y
	BEQ.b CODE_AA968A
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AA968A:
	LDA.w $0021,y
	BEQ.b CODE_AA9697
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AA9697:
	LDA.w $0022,y
	BEQ.b CODE_AA96A0
	STA.l $7F2280,x
CODE_AA96A0:
	LDA.w $0023,y
	BEQ.b CODE_AA96AD
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA96AD:
	LDA.w $0024,y
	BEQ.b CODE_AA96BA
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AA96BA:
	LDA.w $0025,y
	BEQ.b CODE_AA96C7
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AA96C7:
	LDA.w $0026,y
	BEQ.b CODE_AA96D4
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AA96D4:
	LDA.w $0027,y
	BEQ.b CODE_AA96E1
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AA96E1:
	LDA.w $0028,y
	BEQ.b CODE_AA96EE
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AA96EE:
	LDA.w $0029,y
	BEQ.b CODE_AA96F7
	STA.l $7F2900,x
CODE_AA96F7:
	LDA.w $002A,y
	BEQ.b CODE_AA9704
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AA9704:
	LDA.w $002B,y
	BEQ.b CODE_AA9711
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AA9711:
	LDA.w $002C,y
	BEQ.b CODE_AA971E
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AA971E:
	LDA.w $002D,y
	BEQ.b CODE_AA972B
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AA972B:
	LDA.w $002E,y
	BEQ.b CODE_AA9738
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AA9738:
	LDA.w $002F,y
	BEQ.b CODE_AA9745
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AA9745:
	LDA.w $0030,y
	BEQ.b CODE_AA974E
	STA.l $7F2F80,x
CODE_AA974E:
	LDA.w $0031,y
	BEQ.b CODE_AA975B
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AA975B:
	LDA.w $0032,y
	BEQ.b CODE_AA9768
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AA9768:
	LDA.w $0033,y
	BEQ.b CODE_AA9775
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AA9775:
	LDA.w $0034,y
	BEQ.b CODE_AA9782
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AA9782:
	LDA.w $0035,y
	BEQ.b CODE_AA978F
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AA978F:
	LDA.w $0036,y
	BEQ.b CODE_AA979C
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AA979C:
	LDA.w $0037,y
	BEQ.b CODE_AA97A5
	STA.l $7F3600,x
CODE_AA97A5:
	LDA.w $0038,y
	BEQ.b CODE_AA97B2
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AA97B2:
	LDA.w $0039,y
	BEQ.b CODE_AA97BF
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AA97BF:
	LDA.w $003A,y
	BEQ.b CODE_AA97CC
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AA97CC:
	LDA.w $003B,y
	BEQ.b CODE_AA97D9
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AA97D9:
	LDA.w $003C,y
	BEQ.b CODE_AA97E6
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AA97E6:
	LDA.w $003D,y
	BEQ.b CODE_AA97F3
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AA97F3:
	LDA.w $003E,y
	BEQ.b CODE_AA97FC
	STA.l $7F3C80,x
CODE_AA97FC:
	LDA.w $003F,y
	BEQ.b CODE_AA9805
	STA.l $7F3D00,x
CODE_AA9805:
	REP.b #$20
	RTL

CODE_AA9808:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA9817
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AA9817:
	LDA.w $0001,y
	BEQ.b CODE_AA9824
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AA9824:
	LDA.w $0002,y
	BEQ.b CODE_AA9831
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AA9831:
	LDA.w $0003,y
	BEQ.b CODE_AA983E
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AA983E:
	LDA.w $0004,y
	BEQ.b CODE_AA984B
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AA984B:
	LDA.w $0005,y
	BEQ.b CODE_AA9858
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AA9858:
	LDA.w $0006,y
	BEQ.b CODE_AA9865
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AA9865:
	LDA.w $0007,y
	BEQ.b CODE_AA9872
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AA9872:
	LDA.w $0008,y
	BEQ.b CODE_AA987B
	STA.l $7F0A00,x
CODE_AA987B:
	LDA.w $0009,y
	BEQ.b CODE_AA9888
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AA9888:
	LDA.w $000A,y
	BEQ.b CODE_AA9895
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AA9895:
	LDA.w $000B,y
	BEQ.b CODE_AA98A2
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AA98A2:
	LDA.w $000C,y
	BEQ.b CODE_AA98AF
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AA98AF:
	LDA.w $000D,y
	BEQ.b CODE_AA98BC
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AA98BC:
	LDA.w $000E,y
	BEQ.b CODE_AA98C9
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AA98C9:
	LDA.w $000F,y
	BEQ.b CODE_AA98D6
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AA98D6:
	LDA.w $0010,y
	BEQ.b CODE_AA98DF
	STA.l $7F1180,x
CODE_AA98DF:
	LDA.w $0011,y
	BEQ.b CODE_AA98EC
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AA98EC:
	LDA.w $0012,y
	BEQ.b CODE_AA98F9
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AA98F9:
	LDA.w $0013,y
	BEQ.b CODE_AA9906
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AA9906:
	LDA.w $0014,y
	BEQ.b CODE_AA9913
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AA9913:
	LDA.w $0015,y
	BEQ.b CODE_AA9920
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AA9920:
	LDA.w $0016,y
	BEQ.b CODE_AA992D
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AA992D:
	LDA.w $0017,y
	BEQ.b CODE_AA993A
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AA993A:
	LDA.w $0018,y
	BEQ.b CODE_AA9947
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AA9947:
	LDA.w $0019,y
	BEQ.b CODE_AA9950
	STA.l $7F1A00,x
CODE_AA9950:
	LDA.w $001A,y
	BEQ.b CODE_AA995D
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AA995D:
	LDA.w $001B,y
	BEQ.b CODE_AA996A
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AA996A:
	LDA.w $001C,y
	BEQ.b CODE_AA9977
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AA9977:
	LDA.w $001D,y
	BEQ.b CODE_AA9984
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AA9984:
	LDA.w $001E,y
	BEQ.b CODE_AA9991
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA9991:
	LDA.w $001F,y
	BEQ.b CODE_AA999E
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA999E:
	LDA.w $0020,y
	BEQ.b CODE_AA99AB
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AA99AB:
	LDA.w $0021,y
	BEQ.b CODE_AA99B4
	STA.l $7F2180,x
CODE_AA99B4:
	LDA.w $0022,y
	BEQ.b CODE_AA99C1
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA99C1:
	LDA.w $0023,y
	BEQ.b CODE_AA99CE
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA99CE:
	LDA.w $0024,y
	BEQ.b CODE_AA99DB
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AA99DB:
	LDA.w $0025,y
	BEQ.b CODE_AA99E8
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AA99E8:
	LDA.w $0026,y
	BEQ.b CODE_AA99F5
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AA99F5:
	LDA.w $0027,y
	BEQ.b CODE_AA9A02
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AA9A02:
	LDA.w $0028,y
	BEQ.b CODE_AA9A0F
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AA9A0F:
	LDA.w $0029,y
	BEQ.b CODE_AA9A1C
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AA9A1C:
	LDA.w $002A,y
	BEQ.b CODE_AA9A25
	STA.l $7F2A00,x
CODE_AA9A25:
	LDA.w $002B,y
	BEQ.b CODE_AA9A32
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AA9A32:
	LDA.w $002C,y
	BEQ.b CODE_AA9A3F
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AA9A3F:
	LDA.w $002D,y
	BEQ.b CODE_AA9A4C
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AA9A4C:
	LDA.w $002E,y
	BEQ.b CODE_AA9A59
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AA9A59:
	LDA.w $002F,y
	BEQ.b CODE_AA9A66
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AA9A66:
	LDA.w $0030,y
	BEQ.b CODE_AA9A73
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AA9A73:
	LDA.w $0031,y
	BEQ.b CODE_AA9A80
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AA9A80:
	LDA.w $0032,y
	BEQ.b CODE_AA9A89
	STA.l $7F3180,x
CODE_AA9A89:
	LDA.w $0033,y
	BEQ.b CODE_AA9A96
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AA9A96:
	LDA.w $0034,y
	BEQ.b CODE_AA9AA3
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AA9AA3:
	LDA.w $0035,y
	BEQ.b CODE_AA9AB0
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AA9AB0:
	LDA.w $0036,y
	BEQ.b CODE_AA9ABD
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AA9ABD:
	LDA.w $0037,y
	BEQ.b CODE_AA9ACA
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AA9ACA:
	LDA.w $0038,y
	BEQ.b CODE_AA9AD7
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AA9AD7:
	LDA.w $0039,y
	BEQ.b CODE_AA9AE4
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AA9AE4:
	LDA.w $003A,y
	BEQ.b CODE_AA9AF1
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AA9AF1:
	LDA.w $003B,y
	BEQ.b CODE_AA9AFA
	STA.l $7F3A00,x
CODE_AA9AFA:
	LDA.w $003C,y
	BEQ.b CODE_AA9B07
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AA9B07:
	LDA.w $003D,y
	BEQ.b CODE_AA9B14
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AA9B14:
	LDA.w $003E,y
	BEQ.b CODE_AA9B21
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AA9B21:
	LDA.w $003F,y
	BEQ.b CODE_AA9B2A
	STA.l $7F3D80,x
CODE_AA9B2A:
	REP.b #$20
	RTL

CODE_AA9B2D:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA9B3C
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AA9B3C:
	LDA.w $0001,y
	BEQ.b CODE_AA9B49
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AA9B49:
	LDA.w $0002,y
	BEQ.b CODE_AA9B56
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AA9B56:
	LDA.w $0003,y
	BEQ.b CODE_AA9B63
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AA9B63:
	LDA.w $0004,y
	BEQ.b CODE_AA9B70
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AA9B70:
	LDA.w $0005,y
	BEQ.b CODE_AA9B7D
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AA9B7D:
	LDA.w $0006,y
	BEQ.b CODE_AA9B8A
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AA9B8A:
	LDA.w $0007,y
	BEQ.b CODE_AA9B97
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AA9B97:
	LDA.w $0008,y
	BEQ.b CODE_AA9BA4
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AA9BA4:
	LDA.w $0009,y
	BEQ.b CODE_AA9BB1
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AA9BB1:
	LDA.w $000A,y
	BEQ.b CODE_AA9BBE
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AA9BBE:
	LDA.w $000B,y
	BEQ.b CODE_AA9BC7
	STA.l $7F0C80,x
CODE_AA9BC7:
	LDA.w $000C,y
	BEQ.b CODE_AA9BD4
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AA9BD4:
	LDA.w $000D,y
	BEQ.b CODE_AA9BE1
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AA9BE1:
	LDA.w $000E,y
	BEQ.b CODE_AA9BEE
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AA9BEE:
	LDA.w $000F,y
	BEQ.b CODE_AA9BFB
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AA9BFB:
	LDA.w $0010,y
	BEQ.b CODE_AA9C08
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AA9C08:
	LDA.w $0011,y
	BEQ.b CODE_AA9C15
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AA9C15:
	LDA.w $0012,y
	BEQ.b CODE_AA9C22
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AA9C22:
	LDA.w $0013,y
	BEQ.b CODE_AA9C2F
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AA9C2F:
	LDA.w $0014,y
	BEQ.b CODE_AA9C3C
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AA9C3C:
	LDA.w $0015,y
	BEQ.b CODE_AA9C49
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AA9C49:
	LDA.w $0016,y
	BEQ.b CODE_AA9C52
	STA.l $7F1700,x
CODE_AA9C52:
	LDA.w $0017,y
	BEQ.b CODE_AA9C5F
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AA9C5F:
	LDA.w $0018,y
	BEQ.b CODE_AA9C6C
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AA9C6C:
	LDA.w $0019,y
	BEQ.b CODE_AA9C79
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AA9C79:
	LDA.w $001A,y
	BEQ.b CODE_AA9C86
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AA9C86:
	LDA.w $001B,y
	BEQ.b CODE_AA9C93
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AA9C93:
	LDA.w $001C,y
	BEQ.b CODE_AA9CA0
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AA9CA0:
	LDA.w $001D,y
	BEQ.b CODE_AA9CAD
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AA9CAD:
	LDA.w $001E,y
	BEQ.b CODE_AA9CBA
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA9CBA:
	LDA.w $001F,y
	BEQ.b CODE_AA9CC7
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA9CC7:
	LDA.w $0020,y
	BEQ.b CODE_AA9CD4
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AA9CD4:
	LDA.w $0021,y
	BEQ.b CODE_AA9CDD
	STA.l $7F2180,x
CODE_AA9CDD:
	LDA.w $0022,y
	BEQ.b CODE_AA9CEA
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AA9CEA:
	LDA.w $0023,y
	BEQ.b CODE_AA9CF7
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AA9CF7:
	LDA.w $0024,y
	BEQ.b CODE_AA9D04
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AA9D04:
	LDA.w $0025,y
	BEQ.b CODE_AA9D11
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AA9D11:
	LDA.w $0026,y
	BEQ.b CODE_AA9D1E
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AA9D1E:
	LDA.w $0027,y
	BEQ.b CODE_AA9D2B
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AA9D2B:
	LDA.w $0028,y
	BEQ.b CODE_AA9D38
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AA9D38:
	LDA.w $0029,y
	BEQ.b CODE_AA9D45
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AA9D45:
	LDA.w $002A,y
	BEQ.b CODE_AA9D52
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AA9D52:
	LDA.w $002B,y
	BEQ.b CODE_AA9D5F
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AA9D5F:
	LDA.w $002C,y
	BEQ.b CODE_AA9D68
	STA.l $7F2C00,x
CODE_AA9D68:
	LDA.w $002D,y
	BEQ.b CODE_AA9D75
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AA9D75:
	LDA.w $002E,y
	BEQ.b CODE_AA9D82
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AA9D82:
	LDA.w $002F,y
	BEQ.b CODE_AA9D8F
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AA9D8F:
	LDA.w $0030,y
	BEQ.b CODE_AA9D9C
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AA9D9C:
	LDA.w $0031,y
	BEQ.b CODE_AA9DA9
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AA9DA9:
	LDA.w $0032,y
	BEQ.b CODE_AA9DB6
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AA9DB6:
	LDA.w $0033,y
	BEQ.b CODE_AA9DC3
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AA9DC3:
	LDA.w $0034,y
	BEQ.b CODE_AA9DD0
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AA9DD0:
	LDA.w $0035,y
	BEQ.b CODE_AA9DDD
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AA9DDD:
	LDA.w $0036,y
	BEQ.b CODE_AA9DEA
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AA9DEA:
	LDA.w $0037,y
	BEQ.b CODE_AA9DF3
	STA.l $7F3680,x
CODE_AA9DF3:
	LDA.w $0038,y
	BEQ.b CODE_AA9E00
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AA9E00:
	LDA.w $0039,y
	BEQ.b CODE_AA9E0D
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AA9E0D:
	LDA.w $003A,y
	BEQ.b CODE_AA9E1A
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AA9E1A:
	LDA.w $003B,y
	BEQ.b CODE_AA9E27
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AA9E27:
	LDA.w $003C,y
	BEQ.b CODE_AA9E34
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AA9E34:
	LDA.w $003D,y
	BEQ.b CODE_AA9E41
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AA9E41:
	LDA.w $003E,y
	BEQ.b CODE_AA9E4E
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AA9E4E:
	LDA.w $003F,y
	BEQ.b CODE_AA9E57
	STA.l $7F3E00,x
CODE_AA9E57:
	REP.b #$20
	RTL

CODE_AA9E5A:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AA9E69
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AA9E69:
	LDA.w $0001,y
	BEQ.b CODE_AA9E76
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AA9E76:
	LDA.w $0002,y
	BEQ.b CODE_AA9E83
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AA9E83:
	LDA.w $0003,y
	BEQ.b CODE_AA9E90
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AA9E90:
	LDA.w $0004,y
	BEQ.b CODE_AA9E9D
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AA9E9D:
	LDA.w $0005,y
	BEQ.b CODE_AA9EAA
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AA9EAA:
	LDA.w $0006,y
	BEQ.b CODE_AA9EB7
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AA9EB7:
	LDA.w $0007,y
	BEQ.b CODE_AA9EC4
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AA9EC4:
	LDA.w $0008,y
	BEQ.b CODE_AA9ED1
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AA9ED1:
	LDA.w $0009,y
	BEQ.b CODE_AA9EDE
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AA9EDE:
	LDA.w $000A,y
	BEQ.b CODE_AA9EEB
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AA9EEB:
	LDA.w $000B,y
	BEQ.b CODE_AA9EF8
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AA9EF8:
	LDA.w $000C,y
	BEQ.b CODE_AA9F05
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AA9F05:
	LDA.w $000D,y
	BEQ.b CODE_AA9F12
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AA9F12:
	LDA.w $000E,y
	BEQ.b CODE_AA9F1F
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AA9F1F:
	LDA.w $000F,y
	BEQ.b CODE_AA9F2C
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AA9F2C:
	LDA.w $0010,y
	BEQ.b CODE_AA9F35
	STA.l $7F1100,x
CODE_AA9F35:
	LDA.w $0011,y
	BEQ.b CODE_AA9F42
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AA9F42:
	LDA.w $0012,y
	BEQ.b CODE_AA9F4F
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AA9F4F:
	LDA.w $0013,y
	BEQ.b CODE_AA9F5C
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AA9F5C:
	LDA.w $0014,y
	BEQ.b CODE_AA9F69
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AA9F69:
	LDA.w $0015,y
	BEQ.b CODE_AA9F76
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AA9F76:
	LDA.w $0016,y
	BEQ.b CODE_AA9F83
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AA9F83:
	LDA.w $0017,y
	BEQ.b CODE_AA9F90
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AA9F90:
	LDA.w $0018,y
	BEQ.b CODE_AA9F9D
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AA9F9D:
	LDA.w $0019,y
	BEQ.b CODE_AA9FAA
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AA9FAA:
	LDA.w $001A,y
	BEQ.b CODE_AA9FB7
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AA9FB7:
	LDA.w $001B,y
	BEQ.b CODE_AA9FC4
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AA9FC4:
	LDA.w $001C,y
	BEQ.b CODE_AA9FD1
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AA9FD1:
	LDA.w $001D,y
	BEQ.b CODE_AA9FDE
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AA9FDE:
	LDA.w $001E,y
	BEQ.b CODE_AA9FEB
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AA9FEB:
	LDA.w $001F,y
	BEQ.b CODE_AA9FF8
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AA9FF8:
	LDA.w $0020,y
	BEQ.b CODE_AAA001
	STA.l $7F2080,x
CODE_AAA001:
	LDA.w $0021,y
	BEQ.b CODE_AAA00E
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AAA00E:
	LDA.w $0022,y
	BEQ.b CODE_AAA01B
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAA01B:
	LDA.w $0023,y
	BEQ.b CODE_AAA028
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAA028:
	LDA.w $0024,y
	BEQ.b CODE_AAA035
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAA035:
	LDA.w $0025,y
	BEQ.b CODE_AAA042
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAA042:
	LDA.w $0026,y
	BEQ.b CODE_AAA04F
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAA04F:
	LDA.w $0027,y
	BEQ.b CODE_AAA05C
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AAA05C:
	LDA.w $0028,y
	BEQ.b CODE_AAA069
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAA069:
	LDA.w $0029,y
	BEQ.b CODE_AAA076
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAA076:
	LDA.w $002A,y
	BEQ.b CODE_AAA083
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAA083:
	LDA.w $002B,y
	BEQ.b CODE_AAA090
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAA090:
	LDA.w $002C,y
	BEQ.b CODE_AAA09D
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAA09D:
	LDA.w $002D,y
	BEQ.b CODE_AAA0AA
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAA0AA:
	LDA.w $002E,y
	BEQ.b CODE_AAA0B7
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAA0B7:
	LDA.w $002F,y
	BEQ.b CODE_AAA0C4
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAA0C4:
	LDA.w $0030,y
	BEQ.b CODE_AAA0D1
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAA0D1:
	LDA.w $0031,y
	BEQ.b CODE_AAA0DA
	STA.l $7F3100,x
CODE_AAA0DA:
	LDA.w $0032,y
	BEQ.b CODE_AAA0E7
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAA0E7:
	LDA.w $0033,y
	BEQ.b CODE_AAA0F4
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAA0F4:
	LDA.w $0034,y
	BEQ.b CODE_AAA101
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAA101:
	LDA.w $0035,y
	BEQ.b CODE_AAA10E
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAA10E:
	LDA.w $0036,y
	BEQ.b CODE_AAA11B
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AAA11B:
	LDA.w $0037,y
	BEQ.b CODE_AAA128
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAA128:
	LDA.w $0038,y
	BEQ.b CODE_AAA135
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAA135:
	LDA.w $0039,y
	BEQ.b CODE_AAA142
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAA142:
	LDA.w $003A,y
	BEQ.b CODE_AAA14F
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAA14F:
	LDA.w $003B,y
	BEQ.b CODE_AAA15C
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAA15C:
	LDA.w $003C,y
	BEQ.b CODE_AAA169
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAA169:
	LDA.w $003D,y
	BEQ.b CODE_AAA176
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAA176:
	LDA.w $003E,y
	BEQ.b CODE_AAA183
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAA183:
	LDA.w $003F,y
	BEQ.b CODE_AAA18C
	STA.l $7F3E80,x
CODE_AAA18C:
	REP.b #$20
	RTL

CODE_AAA18F:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AAA19E
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAA19E:
	LDA.w $0001,y
	BEQ.b CODE_AAA1AB
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAA1AB:
	LDA.w $0002,y
	BEQ.b CODE_AAA1B8
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAA1B8:
	LDA.w $0003,y
	BEQ.b CODE_AAA1C5
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AAA1C5:
	LDA.w $0004,y
	BEQ.b CODE_AAA1D2
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAA1D2:
	LDA.w $0005,y
	BEQ.b CODE_AAA1DF
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAA1DF:
	LDA.w $0006,y
	BEQ.b CODE_AAA1EC
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAA1EC:
	LDA.w $0007,y
	BEQ.b CODE_AAA1F9
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAA1F9:
	LDA.w $0008,y
	BEQ.b CODE_AAA206
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAA206:
	LDA.w $0009,y
	BEQ.b CODE_AAA213
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAA213:
	LDA.w $000A,y
	BEQ.b CODE_AAA220
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAA220:
	LDA.w $000B,y
	BEQ.b CODE_AAA22D
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAA22D:
	LDA.w $000C,y
	BEQ.b CODE_AAA23A
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAA23A:
	LDA.w $000D,y
	BEQ.b CODE_AAA247
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AAA247:
	LDA.w $000E,y
	BEQ.b CODE_AAA254
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AAA254:
	LDA.w $000F,y
	BEQ.b CODE_AAA261
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAA261:
	LDA.w $0010,y
	BEQ.b CODE_AAA26E
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAA26E:
	LDA.w $0011,y
	BEQ.b CODE_AAA27B
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAA27B:
	LDA.w $0012,y
	BEQ.b CODE_AAA288
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAA288:
	LDA.w $0013,y
	BEQ.b CODE_AAA295
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AAA295:
	LDA.w $0014,y
	BEQ.b CODE_AAA2A2
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAA2A2:
	LDA.w $0015,y
	BEQ.b CODE_AAA2AF
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAA2AF:
	LDA.w $0016,y
	BEQ.b CODE_AAA2BC
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AAA2BC:
	LDA.w $0017,y
	BEQ.b CODE_AAA2C9
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAA2C9:
	LDA.w $0018,y
	BEQ.b CODE_AAA2D6
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAA2D6:
	LDA.w $0019,y
	BEQ.b CODE_AAA2E3
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAA2E3:
	LDA.w $001A,y
	BEQ.b CODE_AAA2F0
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AAA2F0:
	LDA.w $001B,y
	BEQ.b CODE_AAA2FD
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AAA2FD:
	LDA.w $001C,y
	BEQ.b CODE_AAA30A
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAA30A:
	LDA.w $001D,y
	BEQ.b CODE_AAA317
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AAA317:
	LDA.w $001E,y
	BEQ.b CODE_AAA324
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AAA324:
	LDA.w $001F,y
	BEQ.b CODE_AAA331
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAA331:
	LDA.w $0020,y
	BEQ.b CODE_AAA33A
	STA.l $7F2080,x
CODE_AAA33A:
	LDA.w $0021,y
	BEQ.b CODE_AAA347
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AAA347:
	LDA.w $0022,y
	BEQ.b CODE_AAA354
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAA354:
	LDA.w $0023,y
	BEQ.b CODE_AAA361
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAA361:
	LDA.w $0024,y
	BEQ.b CODE_AAA36E
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAA36E:
	LDA.w $0025,y
	BEQ.b CODE_AAA37B
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAA37B:
	LDA.w $0026,y
	BEQ.b CODE_AAA388
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAA388:
	LDA.w $0027,y
	BEQ.b CODE_AAA395
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AAA395:
	LDA.w $0028,y
	BEQ.b CODE_AAA3A2
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAA3A2:
	LDA.w $0029,y
	BEQ.b CODE_AAA3AF
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAA3AF:
	LDA.w $002A,y
	BEQ.b CODE_AAA3BC
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAA3BC:
	LDA.w $002B,y
	BEQ.b CODE_AAA3C9
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAA3C9:
	LDA.w $002C,y
	BEQ.b CODE_AAA3D6
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAA3D6:
	LDA.w $002D,y
	BEQ.b CODE_AAA3E3
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAA3E3:
	LDA.w $002E,y
	BEQ.b CODE_AAA3F0
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAA3F0:
	LDA.w $002F,y
	BEQ.b CODE_AAA3FD
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAA3FD:
	LDA.w $0030,y
	BEQ.b CODE_AAA40A
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAA40A:
	LDA.w $0031,y
	BEQ.b CODE_AAA417
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAA417:
	LDA.w $0032,y
	BEQ.b CODE_AAA424
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAA424:
	LDA.w $0033,y
	BEQ.b CODE_AAA431
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAA431:
	LDA.w $0034,y
	BEQ.b CODE_AAA43E
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAA43E:
	LDA.w $0035,y
	BEQ.b CODE_AAA44B
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAA44B:
	LDA.w $0036,y
	BEQ.b CODE_AAA458
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAA458:
	LDA.w $0037,y
	BEQ.b CODE_AAA465
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAA465:
	LDA.w $0038,y
	BEQ.b CODE_AAA472
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AAA472:
	LDA.w $0039,y
	BEQ.b CODE_AAA47F
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAA47F:
	LDA.w $003A,y
	BEQ.b CODE_AAA48C
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAA48C:
	LDA.w $003B,y
	BEQ.b CODE_AAA499
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAA499:
	LDA.w $003C,y
	BEQ.b CODE_AAA4A6
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAA4A6:
	LDA.w $003D,y
	BEQ.b CODE_AAA4B3
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAA4B3:
	LDA.w $003E,y
	BEQ.b CODE_AAA4C0
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAA4C0:
	LDA.w $003F,y
	BEQ.b CODE_AAA4C9
	STA.l $7F3F00,x
CODE_AAA4C9:
	REP.b #$20
	RTL

CODE_AAA4CC:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AAA4DB
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAA4DB:
	LDA.w $0001,y
	BEQ.b CODE_AAA4E8
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAA4E8:
	LDA.w $0002,y
	BEQ.b CODE_AAA4F5
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAA4F5:
	LDA.w $0003,y
	BEQ.b CODE_AAA502
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAA502:
	LDA.w $0004,y
	BEQ.b CODE_AAA50F
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAA50F:
	LDA.w $0005,y
	BEQ.b CODE_AAA51C
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAA51C:
	LDA.w $0006,y
	BEQ.b CODE_AAA529
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAA529:
	LDA.w $0007,y
	BEQ.b CODE_AAA536
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAA536:
	LDA.w $0008,y
	BEQ.b CODE_AAA543
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAA543:
	LDA.w $0009,y
	BEQ.b CODE_AAA550
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAA550:
	LDA.w $000A,y
	BEQ.b CODE_AAA55D
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAA55D:
	LDA.w $000B,y
	BEQ.b CODE_AAA56A
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AAA56A:
	LDA.w $000C,y
	BEQ.b CODE_AAA577
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAA577:
	LDA.w $000D,y
	BEQ.b CODE_AAA584
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAA584:
	LDA.w $000E,y
	BEQ.b CODE_AAA591
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAA591:
	LDA.w $000F,y
	BEQ.b CODE_AAA59E
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAA59E:
	LDA.w $0010,y
	BEQ.b CODE_AAA5AB
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAA5AB:
	LDA.w $0011,y
	BEQ.b CODE_AAA5B8
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAA5B8:
	LDA.w $0012,y
	BEQ.b CODE_AAA5C5
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAA5C5:
	LDA.w $0013,y
	BEQ.b CODE_AAA5D2
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAA5D2:
	LDA.w $0014,y
	BEQ.b CODE_AAA5DF
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAA5DF:
	LDA.w $0015,y
	BEQ.b CODE_AAA5EC
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAA5EC:
	LDA.w $0016,y
	BEQ.b CODE_AAA5F9
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAA5F9:
	LDA.w $0017,y
	BEQ.b CODE_AAA606
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAA606:
	LDA.w $0018,y
	BEQ.b CODE_AAA613
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAA613:
	LDA.w $0019,y
	BEQ.b CODE_AAA620
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAA620:
	LDA.w $001A,y
	BEQ.b CODE_AAA62D
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAA62D:
	LDA.w $001B,y
	BEQ.b CODE_AAA63A
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAA63A:
	LDA.w $001C,y
	BEQ.b CODE_AAA647
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAA647:
	LDA.w $001D,y
	BEQ.b CODE_AAA654
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAA654:
	LDA.w $001E,y
	BEQ.b CODE_AAA661
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAA661:
	LDA.w $001F,y
	BEQ.b CODE_AAA66E
	STA.l $7F1F00,x
	STA.l $7F1F80,x
CODE_AAA66E:
	LDA.w $0020,y
	BEQ.b CODE_AAA67B
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_AAA67B:
	LDA.w $0021,y
	BEQ.b CODE_AAA688
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AAA688:
	LDA.w $0022,y
	BEQ.b CODE_AAA695
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAA695:
	LDA.w $0023,y
	BEQ.b CODE_AAA6A2
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAA6A2:
	LDA.w $0024,y
	BEQ.b CODE_AAA6AF
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAA6AF:
	LDA.w $0025,y
	BEQ.b CODE_AAA6BC
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAA6BC:
	LDA.w $0026,y
	BEQ.b CODE_AAA6C9
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAA6C9:
	LDA.w $0027,y
	BEQ.b CODE_AAA6D6
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AAA6D6:
	LDA.w $0028,y
	BEQ.b CODE_AAA6E3
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAA6E3:
	LDA.w $0029,y
	BEQ.b CODE_AAA6F0
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAA6F0:
	LDA.w $002A,y
	BEQ.b CODE_AAA6FD
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAA6FD:
	LDA.w $002B,y
	BEQ.b CODE_AAA70A
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAA70A:
	LDA.w $002C,y
	BEQ.b CODE_AAA717
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAA717:
	LDA.w $002D,y
	BEQ.b CODE_AAA724
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAA724:
	LDA.w $002E,y
	BEQ.b CODE_AAA731
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAA731:
	LDA.w $002F,y
	BEQ.b CODE_AAA73E
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAA73E:
	LDA.w $0030,y
	BEQ.b CODE_AAA74B
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAA74B:
	LDA.w $0031,y
	BEQ.b CODE_AAA758
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAA758:
	LDA.w $0032,y
	BEQ.b CODE_AAA765
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAA765:
	LDA.w $0033,y
	BEQ.b CODE_AAA772
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAA772:
	LDA.w $0034,y
	BEQ.b CODE_AAA77F
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAA77F:
	LDA.w $0035,y
	BEQ.b CODE_AAA78C
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAA78C:
	LDA.w $0036,y
	BEQ.b CODE_AAA799
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAA799:
	LDA.w $0037,y
	BEQ.b CODE_AAA7A6
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAA7A6:
	LDA.w $0038,y
	BEQ.b CODE_AAA7B3
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AAA7B3:
	LDA.w $0039,y
	BEQ.b CODE_AAA7C0
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAA7C0:
	LDA.w $003A,y
	BEQ.b CODE_AAA7CD
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAA7CD:
	LDA.w $003B,y
	BEQ.b CODE_AAA7DA
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAA7DA:
	LDA.w $003C,y
	BEQ.b CODE_AAA7E7
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAA7E7:
	LDA.w $003D,y
	BEQ.b CODE_AAA7F4
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAA7F4:
	LDA.w $003E,y
	BEQ.b CODE_AAA801
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAA801:
	LDA.w $003F,y
	BEQ.b CODE_AAA80E
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAA80E:
	REP.b #$20
	RTL

CODE_AAA811:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AAA820
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAA820:
	LDA.w $0001,y
	BEQ.b CODE_AAA82D
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAA82D:
	LDA.w $0002,y
	BEQ.b CODE_AAA83A
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAA83A:
	LDA.w $0003,y
	BEQ.b CODE_AAA847
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAA847:
	LDA.w $0004,y
	BEQ.b CODE_AAA854
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAA854:
	LDA.w $0005,y
	BEQ.b CODE_AAA861
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAA861:
	LDA.w $0006,y
	BEQ.b CODE_AAA86E
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAA86E:
	LDA.w $0007,y
	BEQ.b CODE_AAA87B
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAA87B:
	LDA.w $0008,y
	BEQ.b CODE_AAA888
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAA888:
	LDA.w $0009,y
	BEQ.b CODE_AAA895
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAA895:
	LDA.w $000A,y
	BEQ.b CODE_AAA8A2
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAA8A2:
	LDA.w $000B,y
	BEQ.b CODE_AAA8AF
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AAA8AF:
	LDA.w $000C,y
	BEQ.b CODE_AAA8BC
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAA8BC:
	LDA.w $000D,y
	BEQ.b CODE_AAA8C9
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAA8C9:
	LDA.w $000E,y
	BEQ.b CODE_AAA8D6
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAA8D6:
	LDA.w $000F,y
	BEQ.b CODE_AAA8E3
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAA8E3:
	LDA.w $0010,y
	BEQ.b CODE_AAA8F0
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAA8F0:
	LDA.w $0011,y
	BEQ.b CODE_AAA8FD
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAA8FD:
	LDA.w $0012,y
	BEQ.b CODE_AAA90A
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAA90A:
	LDA.w $0013,y
	BEQ.b CODE_AAA917
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAA917:
	LDA.w $0014,y
	BEQ.b CODE_AAA924
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAA924:
	LDA.w $0015,y
	BEQ.b CODE_AAA931
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAA931:
	LDA.w $0016,y
	BEQ.b CODE_AAA93E
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAA93E:
	LDA.w $0017,y
	BEQ.b CODE_AAA94B
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAA94B:
	LDA.w $0018,y
	BEQ.b CODE_AAA958
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAA958:
	LDA.w $0019,y
	BEQ.b CODE_AAA965
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAA965:
	LDA.w $001A,y
	BEQ.b CODE_AAA972
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAA972:
	LDA.w $001B,y
	BEQ.b CODE_AAA97F
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAA97F:
	LDA.w $001C,y
	BEQ.b CODE_AAA98C
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAA98C:
	LDA.w $001D,y
	BEQ.b CODE_AAA999
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAA999:
	LDA.w $001E,y
	BEQ.b CODE_AAA9A6
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAA9A6:
	LDA.w $001F,y
	BEQ.b CODE_AAA9B7
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAA9B7:
	LDA.w $0020,y
	BEQ.b CODE_AAA9C4
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAA9C4:
	LDA.w $0021,y
	BEQ.b CODE_AAA9D1
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAA9D1:
	LDA.w $0022,y
	BEQ.b CODE_AAA9DE
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AAA9DE:
	LDA.w $0023,y
	BEQ.b CODE_AAA9EB
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAA9EB:
	LDA.w $0024,y
	BEQ.b CODE_AAA9F8
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AAA9F8:
	LDA.w $0025,y
	BEQ.b CODE_AAAA05
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AAAA05:
	LDA.w $0026,y
	BEQ.b CODE_AAAA12
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAAA12:
	LDA.w $0027,y
	BEQ.b CODE_AAAA1F
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAAA1F:
	LDA.w $0028,y
	BEQ.b CODE_AAAA2C
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAAA2C:
	LDA.w $0029,y
	BEQ.b CODE_AAAA39
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AAAA39:
	LDA.w $002A,y
	BEQ.b CODE_AAAA46
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAAA46:
	LDA.w $002B,y
	BEQ.b CODE_AAAA53
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAAA53:
	LDA.w $002C,y
	BEQ.b CODE_AAAA60
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAAA60:
	LDA.w $002D,y
	BEQ.b CODE_AAAA6D
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AAAA6D:
	LDA.w $002E,y
	BEQ.b CODE_AAAA7A
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAAA7A:
	LDA.w $002F,y
	BEQ.b CODE_AAAA87
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAAA87:
	LDA.w $0030,y
	BEQ.b CODE_AAAA94
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAAA94:
	LDA.w $0031,y
	BEQ.b CODE_AAAAA1
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAAAA1:
	LDA.w $0032,y
	BEQ.b CODE_AAAAAE
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAAAAE:
	LDA.w $0033,y
	BEQ.b CODE_AAAABB
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAAABB:
	LDA.w $0034,y
	BEQ.b CODE_AAAAC8
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAAAC8:
	LDA.w $0035,y
	BEQ.b CODE_AAAAD5
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AAAAD5:
	LDA.w $0036,y
	BEQ.b CODE_AAAAE2
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAAAE2:
	LDA.w $0037,y
	BEQ.b CODE_AAAAEF
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAAAEF:
	LDA.w $0038,y
	BEQ.b CODE_AAAAFC
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAAAFC:
	LDA.w $0039,y
	BEQ.b CODE_AAAB09
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAAB09:
	LDA.w $003A,y
	BEQ.b CODE_AAAB16
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAAB16:
	LDA.w $003B,y
	BEQ.b CODE_AAAB23
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAAB23:
	LDA.w $003C,y
	BEQ.b CODE_AAAB30
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAAB30:
	LDA.w $003D,y
	BEQ.b CODE_AAAB3D
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAAB3D:
	LDA.w $003E,y
	BEQ.b CODE_AAAB4A
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AAAB4A:
	LDA.w $003F,y
	BEQ.b CODE_AAAB53
	STA.l $7F3F80,x
CODE_AAAB53:
	REP.b #$20
	RTL

CODE_AAAB56:
	SEP.b #$20
	LDA.w $0000,y
	BEQ.b CODE_AAAB61
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAAB61:
	LDA.w $0001,y
	BEQ.b CODE_AAAB6E
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAAB6E:
	LDA.w $0002,y
	BEQ.b CODE_AAAB7B
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAAB7B:
	LDA.w $0003,y
	BEQ.b CODE_AAAB88
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAAB88:
	LDA.w $0004,y
	BEQ.b CODE_AAAB95
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AAAB95:
	LDA.w $0005,y
	BEQ.b CODE_AAABA2
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAABA2:
	LDA.w $0006,y
	BEQ.b CODE_AAABAF
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAABAF:
	LDA.w $0007,y
	BEQ.b CODE_AAABBC
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAABBC:
	LDA.w $0008,y
	BEQ.b CODE_AAABC9
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAABC9:
	LDA.w $0009,y
	BEQ.b CODE_AAABD6
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAABD6:
	LDA.w $000A,y
	BEQ.b CODE_AAABE3
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAABE3:
	LDA.w $000B,y
	BEQ.b CODE_AAABF0
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAABF0:
	LDA.w $000C,y
	BEQ.b CODE_AAABFD
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAABFD:
	LDA.w $000D,y
	BEQ.b CODE_AAAC0A
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAAC0A:
	LDA.w $000E,y
	BEQ.b CODE_AAAC17
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AAAC17:
	LDA.w $000F,y
	BEQ.b CODE_AAAC28
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAAC28:
	LDA.w $0010,y
	BEQ.b CODE_AAAC35
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAAC35:
	LDA.w $0011,y
	BEQ.b CODE_AAAC42
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAAC42:
	LDA.w $0012,y
	BEQ.b CODE_AAAC4F
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAAC4F:
	LDA.w $0013,y
	BEQ.b CODE_AAAC5C
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAAC5C:
	LDA.w $0014,y
	BEQ.b CODE_AAAC69
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAAC69:
	LDA.w $0015,y
	BEQ.b CODE_AAAC76
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAAC76:
	LDA.w $0016,y
	BEQ.b CODE_AAAC83
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAAC83:
	LDA.w $0017,y
	BEQ.b CODE_AAAC90
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAAC90:
	LDA.w $0018,y
	BEQ.b CODE_AAAC9D
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAAC9D:
	LDA.w $0019,y
	BEQ.b CODE_AAACAA
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAACAA:
	LDA.w $001A,y
	BEQ.b CODE_AAACB7
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAACB7:
	LDA.w $001B,y
	BEQ.b CODE_AAACC4
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAACC4:
	LDA.w $001C,y
	BEQ.b CODE_AAACD1
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAACD1:
	LDA.w $001D,y
	BEQ.b CODE_AAACDE
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAACDE:
	LDA.w $001E,y
	BEQ.b CODE_AAACEB
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAACEB:
	LDA.w $001F,y
	BEQ.b CODE_AAACFC
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAACFC:
	LDA.w $0020,y
	BEQ.b CODE_AAAD09
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAAD09:
	LDA.w $0021,y
	BEQ.b CODE_AAAD16
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAAD16:
	LDA.w $0022,y
	BEQ.b CODE_AAAD23
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AAAD23:
	LDA.w $0023,y
	BEQ.b CODE_AAAD30
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAAD30:
	LDA.w $0024,y
	BEQ.b CODE_AAAD3D
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AAAD3D:
	LDA.w $0025,y
	BEQ.b CODE_AAAD4A
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AAAD4A:
	LDA.w $0026,y
	BEQ.b CODE_AAAD57
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAAD57:
	LDA.w $0027,y
	BEQ.b CODE_AAAD64
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAAD64:
	LDA.w $0028,y
	BEQ.b CODE_AAAD71
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAAD71:
	LDA.w $0029,y
	BEQ.b CODE_AAAD7E
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AAAD7E:
	LDA.w $002A,y
	BEQ.b CODE_AAAD8B
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAAD8B:
	LDA.w $002B,y
	BEQ.b CODE_AAAD98
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAAD98:
	LDA.w $002C,y
	BEQ.b CODE_AAADA5
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAADA5:
	LDA.w $002D,y
	BEQ.b CODE_AAADB2
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AAADB2:
	LDA.w $002E,y
	BEQ.b CODE_AAADC3
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAADC3:
	LDA.w $002F,y
	BEQ.b CODE_AAADD0
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAADD0:
	LDA.w $0030,y
	BEQ.b CODE_AAADDD
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAADDD:
	LDA.w $0031,y
	BEQ.b CODE_AAADEA
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAADEA:
	LDA.w $0032,y
	BEQ.b CODE_AAADF7
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAADF7:
	LDA.w $0033,y
	BEQ.b CODE_AAAE04
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAAE04:
	LDA.w $0034,y
	BEQ.b CODE_AAAE11
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAAE11:
	LDA.w $0035,y
	BEQ.b CODE_AAAE1E
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAAE1E:
	LDA.w $0036,y
	BEQ.b CODE_AAAE2B
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAAE2B:
	LDA.w $0037,y
	BEQ.b CODE_AAAE38
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AAAE38:
	LDA.w $0038,y
	BEQ.b CODE_AAAE45
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAAE45:
	LDA.w $0039,y
	BEQ.b CODE_AAAE52
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAAE52:
	LDA.w $003A,y
	BEQ.b CODE_AAAE5F
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAAE5F:
	LDA.w $003B,y
	BEQ.b CODE_AAAE6C
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAAE6C:
	LDA.w $003C,y
	BEQ.b CODE_AAAE79
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAAE79:
	LDA.w $003D,y
	BEQ.b CODE_AAAE86
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAAE86:
	LDA.w $003E,y
	BEQ.b CODE_AAAE93
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAAE93:
	REP.b #$20
	RTL

CODE_AAAE96:
	SEP.b #$20
	LDA.w $0001,y
	BEQ.b CODE_AAAEA5
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAAEA5:
	LDA.w $0002,y
	BEQ.b CODE_AAAEB2
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAAEB2:
	LDA.w $0003,y
	BEQ.b CODE_AAAEBF
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAAEBF:
	LDA.w $0004,y
	BEQ.b CODE_AAAECC
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAAECC:
	LDA.w $0005,y
	BEQ.b CODE_AAAED9
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAAED9:
	LDA.w $0006,y
	BEQ.b CODE_AAAEE6
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAAEE6:
	LDA.w $0007,y
	BEQ.b CODE_AAAEF3
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAAEF3:
	LDA.w $0008,y
	BEQ.b CODE_AAAF00
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAAF00:
	LDA.w $0009,y
	BEQ.b CODE_AAAF0D
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAAF0D:
	LDA.w $000A,y
	BEQ.b CODE_AAAF1E
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAAF1E:
	LDA.w $000B,y
	BEQ.b CODE_AAAF2B
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAAF2B:
	LDA.w $000C,y
	BEQ.b CODE_AAAF38
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAAF38:
	LDA.w $000D,y
	BEQ.b CODE_AAAF45
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAAF45:
	LDA.w $000E,y
	BEQ.b CODE_AAAF52
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AAAF52:
	LDA.w $000F,y
	BEQ.b CODE_AAAF5F
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AAAF5F:
	LDA.w $0010,y
	BEQ.b CODE_AAAF6C
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAAF6C:
	LDA.w $0011,y
	BEQ.b CODE_AAAF79
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAAF79:
	LDA.w $0012,y
	BEQ.b CODE_AAAF86
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAAF86:
	LDA.w $0013,y
	BEQ.b CODE_AAAF93
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAAF93:
	LDA.w $0014,y
	BEQ.b CODE_AAAFA4
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAAFA4:
	LDA.w $0015,y
	BEQ.b CODE_AAAFB1
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAAFB1:
	LDA.w $0016,y
	BEQ.b CODE_AAAFBE
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAAFBE:
	LDA.w $0017,y
	BEQ.b CODE_AAAFCB
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAAFCB:
	LDA.w $0018,y
	BEQ.b CODE_AAAFD8
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAAFD8:
	LDA.w $0019,y
	BEQ.b CODE_AAAFE5
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAAFE5:
	LDA.w $001A,y
	BEQ.b CODE_AAAFF2
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAAFF2:
	LDA.w $001B,y
	BEQ.b CODE_AAAFFF
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAAFFF:
	LDA.w $001C,y
	BEQ.b CODE_AAB00C
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAB00C:
	LDA.w $001D,y
	BEQ.b CODE_AAB019
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAB019:
	LDA.w $001E,y
	BEQ.b CODE_AAB02A
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AAB02A:
	LDA.w $001F,y
	BEQ.b CODE_AAB037
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAB037:
	LDA.w $0020,y
	BEQ.b CODE_AAB044
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAB044:
	LDA.w $0021,y
	BEQ.b CODE_AAB051
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAB051:
	LDA.w $0022,y
	BEQ.b CODE_AAB05E
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AAB05E:
	LDA.w $0023,y
	BEQ.b CODE_AAB06B
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAB06B:
	LDA.w $0024,y
	BEQ.b CODE_AAB078
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AAB078:
	LDA.w $0025,y
	BEQ.b CODE_AAB085
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AAB085:
	LDA.w $0026,y
	BEQ.b CODE_AAB092
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAB092:
	LDA.w $0027,y
	BEQ.b CODE_AAB09F
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAB09F:
	LDA.w $0028,y
	BEQ.b CODE_AAB0B0
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAB0B0:
	LDA.w $0029,y
	BEQ.b CODE_AAB0BD
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAB0BD:
	LDA.w $002A,y
	BEQ.b CODE_AAB0CA
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAB0CA:
	LDA.w $002B,y
	BEQ.b CODE_AAB0D7
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAB0D7:
	LDA.w $002C,y
	BEQ.b CODE_AAB0E4
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAB0E4:
	LDA.w $002D,y
	BEQ.b CODE_AAB0F1
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAB0F1:
	LDA.w $002E,y
	BEQ.b CODE_AAB0FE
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAB0FE:
	LDA.w $002F,y
	BEQ.b CODE_AAB10B
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAB10B:
	LDA.w $0030,y
	BEQ.b CODE_AAB118
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAB118:
	LDA.w $0031,y
	BEQ.b CODE_AAB125
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAB125:
	LDA.w $0032,y
	BEQ.b CODE_AAB136
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAB136:
	LDA.w $0033,y
	BEQ.b CODE_AAB143
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAB143:
	LDA.w $0034,y
	BEQ.b CODE_AAB150
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AAB150:
	LDA.w $0035,y
	BEQ.b CODE_AAB15D
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAB15D:
	LDA.w $0036,y
	BEQ.b CODE_AAB16A
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAB16A:
	LDA.w $0037,y
	BEQ.b CODE_AAB177
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAB177:
	LDA.w $0038,y
	BEQ.b CODE_AAB184
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAB184:
	LDA.w $0039,y
	BEQ.b CODE_AAB191
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAB191:
	LDA.w $003A,y
	BEQ.b CODE_AAB19E
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAB19E:
	LDA.w $003B,y
	BEQ.b CODE_AAB1AB
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAB1AB:
	LDA.w $003C,y
	BEQ.b CODE_AAB1B8
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAB1B8:
	LDA.w $003D,y
	BEQ.b CODE_AAB1C9
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAB1C9:
	REP.b #$20
	RTL

CODE_AAB1CC:
	SEP.b #$20
	LDA.w $0001,y
	BEQ.b CODE_AAB1D7
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAB1D7:
	LDA.w $0002,y
	BEQ.b CODE_AAB1E4
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAB1E4:
	LDA.w $0003,y
	BEQ.b CODE_AAB1F1
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAB1F1:
	LDA.w $0004,y
	BEQ.b CODE_AAB1FE
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAB1FE:
	LDA.w $0005,y
	BEQ.b CODE_AAB20B
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AAB20B:
	LDA.w $0006,y
	BEQ.b CODE_AAB218
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAB218:
	LDA.w $0007,y
	BEQ.b CODE_AAB229
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAB229:
	LDA.w $0008,y
	BEQ.b CODE_AAB236
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAB236:
	LDA.w $0009,y
	BEQ.b CODE_AAB243
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAB243:
	LDA.w $000A,y
	BEQ.b CODE_AAB250
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAB250:
	LDA.w $000B,y
	BEQ.b CODE_AAB25D
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAB25D:
	LDA.w $000C,y
	BEQ.b CODE_AAB26A
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AAB26A:
	LDA.w $000D,y
	BEQ.b CODE_AAB277
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAB277:
	LDA.w $000E,y
	BEQ.b CODE_AAB284
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAB284:
	LDA.w $000F,y
	BEQ.b CODE_AAB295
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AAB295:
	LDA.w $0010,y
	BEQ.b CODE_AAB2A2
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAB2A2:
	LDA.w $0011,y
	BEQ.b CODE_AAB2AF
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAB2AF:
	LDA.w $0012,y
	BEQ.b CODE_AAB2BC
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAB2BC:
	LDA.w $0013,y
	BEQ.b CODE_AAB2C9
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAB2C9:
	LDA.w $0014,y
	BEQ.b CODE_AAB2D6
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AAB2D6:
	LDA.w $0015,y
	BEQ.b CODE_AAB2E3
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAB2E3:
	LDA.w $0016,y
	BEQ.b CODE_AAB2F4
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAB2F4:
	LDA.w $0017,y
	BEQ.b CODE_AAB301
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAB301:
	LDA.w $0018,y
	BEQ.b CODE_AAB30E
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAB30E:
	LDA.w $0019,y
	BEQ.b CODE_AAB31B
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAB31B:
	LDA.w $001A,y
	BEQ.b CODE_AAB328
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAB328:
	LDA.w $001B,y
	BEQ.b CODE_AAB335
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAB335:
	LDA.w $001C,y
	BEQ.b CODE_AAB342
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAB342:
	LDA.w $001D,y
	BEQ.b CODE_AAB34F
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAB34F:
	LDA.w $001E,y
	BEQ.b CODE_AAB360
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AAB360:
	LDA.w $001F,y
	BEQ.b CODE_AAB36D
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAB36D:
	LDA.w $0020,y
	BEQ.b CODE_AAB37A
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAB37A:
	LDA.w $0021,y
	BEQ.b CODE_AAB387
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAB387:
	LDA.w $0022,y
	BEQ.b CODE_AAB394
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AAB394:
	LDA.w $0023,y
	BEQ.b CODE_AAB3A1
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAB3A1:
	LDA.w $0024,y
	BEQ.b CODE_AAB3AE
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AAB3AE:
	LDA.w $0025,y
	BEQ.b CODE_AAB3BF
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAB3BF:
	LDA.w $0026,y
	BEQ.b CODE_AAB3CC
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AAB3CC:
	LDA.w $0027,y
	BEQ.b CODE_AAB3D9
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAB3D9:
	LDA.w $0028,y
	BEQ.b CODE_AAB3E6
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAB3E6:
	LDA.w $0029,y
	BEQ.b CODE_AAB3F3
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAB3F3:
	LDA.w $002A,y
	BEQ.b CODE_AAB400
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAB400:
	LDA.w $002B,y
	BEQ.b CODE_AAB40D
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAB40D:
	LDA.w $002C,y
	BEQ.b CODE_AAB41A
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAB41A:
	LDA.w $002D,y
	BEQ.b CODE_AAB42B
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAB42B:
	LDA.w $002E,y
	BEQ.b CODE_AAB438
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAB438:
	LDA.w $002F,y
	BEQ.b CODE_AAB445
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAB445:
	LDA.w $0030,y
	BEQ.b CODE_AAB452
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAB452:
	LDA.w $0031,y
	BEQ.b CODE_AAB45F
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAB45F:
	LDA.w $0032,y
	BEQ.b CODE_AAB46C
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAB46C:
	LDA.w $0033,y
	BEQ.b CODE_AAB479
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAB479:
	LDA.w $0034,y
	BEQ.b CODE_AAB48A
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAB48A:
	LDA.w $0035,y
	BEQ.b CODE_AAB497
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAB497:
	LDA.w $0036,y
	BEQ.b CODE_AAB4A4
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AAB4A4:
	LDA.w $0037,y
	BEQ.b CODE_AAB4B1
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAB4B1:
	LDA.w $0038,y
	BEQ.b CODE_AAB4BE
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAB4BE:
	LDA.w $0039,y
	BEQ.b CODE_AAB4CB
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAB4CB:
	LDA.w $003A,y
	BEQ.b CODE_AAB4D8
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAB4D8:
	LDA.w $003B,y
	BEQ.b CODE_AAB4E5
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAB4E5:
	LDA.w $003C,y
	BEQ.b CODE_AAB4F6
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AAB4F6:
	LDA.w $003D,y
	BEQ.b CODE_AAB4FF
	STA.l $7F3F80,x
CODE_AAB4FF:
	REP.b #$20
	RTL

CODE_AAB502:
	SEP.b #$20
	LDA.w $0002,y
	BEQ.b CODE_AAB511
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAB511:
	LDA.w $0003,y
	BEQ.b CODE_AAB51E
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAB51E:
	LDA.w $0004,y
	BEQ.b CODE_AAB52B
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAB52B:
	LDA.w $0005,y
	BEQ.b CODE_AAB53C
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AAB53C:
	LDA.w $0006,y
	BEQ.b CODE_AAB549
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAB549:
	LDA.w $0007,y
	BEQ.b CODE_AAB556
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAB556:
	LDA.w $0008,y
	BEQ.b CODE_AAB563
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAB563:
	LDA.w $0009,y
	BEQ.b CODE_AAB570
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAB570:
	LDA.w $000A,y
	BEQ.b CODE_AAB57D
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAB57D:
	LDA.w $000B,y
	BEQ.b CODE_AAB58E
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAB58E:
	LDA.w $000C,y
	BEQ.b CODE_AAB59B
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AAB59B:
	LDA.w $000D,y
	BEQ.b CODE_AAB5A8
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAB5A8:
	LDA.w $000E,y
	BEQ.b CODE_AAB5B5
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAB5B5:
	LDA.w $000F,y
	BEQ.b CODE_AAB5C2
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAB5C2:
	LDA.w $0010,y
	BEQ.b CODE_AAB5CF
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAB5CF:
	LDA.w $0011,y
	BEQ.b CODE_AAB5E0
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAB5E0:
	LDA.w $0012,y
	BEQ.b CODE_AAB5ED
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAB5ED:
	LDA.w $0013,y
	BEQ.b CODE_AAB5FA
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAB5FA:
	LDA.w $0014,y
	BEQ.b CODE_AAB607
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AAB607:
	LDA.w $0015,y
	BEQ.b CODE_AAB614
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAB614:
	LDA.w $0016,y
	BEQ.b CODE_AAB621
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAB621:
	LDA.w $0017,y
	BEQ.b CODE_AAB632
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAB632:
	LDA.w $0018,y
	BEQ.b CODE_AAB63F
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAB63F:
	LDA.w $0019,y
	BEQ.b CODE_AAB64C
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAB64C:
	LDA.w $001A,y
	BEQ.b CODE_AAB659
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAB659:
	LDA.w $001B,y
	BEQ.b CODE_AAB666
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAB666:
	LDA.w $001C,y
	BEQ.b CODE_AAB673
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAB673:
	LDA.w $001D,y
	BEQ.b CODE_AAB684
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AAB684:
	LDA.w $001E,y
	BEQ.b CODE_AAB691
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AAB691:
	LDA.w $001F,y
	BEQ.b CODE_AAB69E
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAB69E:
	LDA.w $0020,y
	BEQ.b CODE_AAB6AB
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAB6AB:
	LDA.w $0021,y
	BEQ.b CODE_AAB6B8
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAB6B8:
	LDA.w $0022,y
	BEQ.b CODE_AAB6C5
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AAB6C5:
	LDA.w $0023,y
	BEQ.b CODE_AAB6D6
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAB6D6:
	LDA.w $0024,y
	BEQ.b CODE_AAB6E3
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAB6E3:
	LDA.w $0025,y
	BEQ.b CODE_AAB6F0
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAB6F0:
	LDA.w $0026,y
	BEQ.b CODE_AAB6FD
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AAB6FD:
	LDA.w $0027,y
	BEQ.b CODE_AAB70A
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAB70A:
	LDA.w $0028,y
	BEQ.b CODE_AAB717
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAB717:
	LDA.w $0029,y
	BEQ.b CODE_AAB728
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAB728:
	LDA.w $002A,y
	BEQ.b CODE_AAB735
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAB735:
	LDA.w $002B,y
	BEQ.b CODE_AAB742
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAB742:
	LDA.w $002C,y
	BEQ.b CODE_AAB74F
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AAB74F:
	LDA.w $002D,y
	BEQ.b CODE_AAB75C
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAB75C:
	LDA.w $002E,y
	BEQ.b CODE_AAB769
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAB769:
	LDA.w $002F,y
	BEQ.b CODE_AAB77A
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAB77A:
	LDA.w $0030,y
	BEQ.b CODE_AAB787
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAB787:
	LDA.w $0031,y
	BEQ.b CODE_AAB794
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAB794:
	LDA.w $0032,y
	BEQ.b CODE_AAB7A1
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAB7A1:
	LDA.w $0033,y
	BEQ.b CODE_AAB7AE
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAB7AE:
	LDA.w $0034,y
	BEQ.b CODE_AAB7BB
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAB7BB:
	LDA.w $0035,y
	BEQ.b CODE_AAB7CC
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAB7CC:
	LDA.w $0036,y
	BEQ.b CODE_AAB7D9
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAB7D9:
	LDA.w $0037,y
	BEQ.b CODE_AAB7E6
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAB7E6:
	LDA.w $0038,y
	BEQ.b CODE_AAB7F3
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAB7F3:
	LDA.w $0039,y
	BEQ.b CODE_AAB800
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAB800:
	LDA.w $003A,y
	BEQ.b CODE_AAB80D
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAB80D:
	LDA.w $003B,y
	BEQ.b CODE_AAB81E
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAB81E:
	LDA.w $003C,y
	BEQ.b CODE_AAB82B
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAB82B:
	REP.b #$20
	RTL

CODE_AAB82E:
	SEP.b #$20
	LDA.w $0002,y
	BEQ.b CODE_AAB839
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAB839:
	LDA.w $0003,y
	BEQ.b CODE_AAB846
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAB846:
	LDA.w $0004,y
	BEQ.b CODE_AAB853
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAB853:
	LDA.w $0005,y
	BEQ.b CODE_AAB864
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAB864:
	LDA.w $0006,y
	BEQ.b CODE_AAB871
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAB871:
	LDA.w $0007,y
	BEQ.b CODE_AAB87E
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAB87E:
	LDA.w $0008,y
	BEQ.b CODE_AAB88B
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAB88B:
	LDA.w $0009,y
	BEQ.b CODE_AAB898
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAB898:
	LDA.w $000A,y
	BEQ.b CODE_AAB8A9
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAB8A9:
	LDA.w $000B,y
	BEQ.b CODE_AAB8B6
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAB8B6:
	LDA.w $000C,y
	BEQ.b CODE_AAB8C3
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAB8C3:
	LDA.w $000D,y
	BEQ.b CODE_AAB8D0
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAB8D0:
	LDA.w $000E,y
	BEQ.b CODE_AAB8DD
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAB8DD:
	LDA.w $000F,y
	BEQ.b CODE_AAB8EE
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAB8EE:
	LDA.w $0010,y
	BEQ.b CODE_AAB8FB
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAB8FB:
	LDA.w $0011,y
	BEQ.b CODE_AAB908
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAB908:
	LDA.w $0012,y
	BEQ.b CODE_AAB915
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAB915:
	LDA.w $0013,y
	BEQ.b CODE_AAB922
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAB922:
	LDA.w $0014,y
	BEQ.b CODE_AAB92F
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAB92F:
	LDA.w $0015,y
	BEQ.b CODE_AAB940
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAB940:
	LDA.w $0016,y
	BEQ.b CODE_AAB94D
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAB94D:
	LDA.w $0017,y
	BEQ.b CODE_AAB95A
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AAB95A:
	LDA.w $0018,y
	BEQ.b CODE_AAB967
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAB967:
	LDA.w $0019,y
	BEQ.b CODE_AAB974
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAB974:
	LDA.w $001A,y
	BEQ.b CODE_AAB985
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAB985:
	LDA.w $001B,y
	BEQ.b CODE_AAB992
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAB992:
	LDA.w $001C,y
	BEQ.b CODE_AAB99F
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAB99F:
	LDA.w $001D,y
	BEQ.b CODE_AAB9AC
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAB9AC:
	LDA.w $001E,y
	BEQ.b CODE_AAB9B9
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAB9B9:
	LDA.w $001F,y
	BEQ.b CODE_AAB9CA
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAB9CA:
	LDA.w $0020,y
	BEQ.b CODE_AAB9D7
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAB9D7:
	LDA.w $0021,y
	BEQ.b CODE_AAB9E4
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAB9E4:
	LDA.w $0022,y
	BEQ.b CODE_AAB9F1
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AAB9F1:
	LDA.w $0023,y
	BEQ.b CODE_AAB9FE
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAB9FE:
	LDA.w $0024,y
	BEQ.b CODE_AABA0B
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AABA0B:
	LDA.w $0025,y
	BEQ.b CODE_AABA1C
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AABA1C:
	LDA.w $0026,y
	BEQ.b CODE_AABA29
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AABA29:
	LDA.w $0027,y
	BEQ.b CODE_AABA36
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AABA36:
	LDA.w $0028,y
	BEQ.b CODE_AABA43
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AABA43:
	LDA.w $0029,y
	BEQ.b CODE_AABA50
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AABA50:
	LDA.w $002A,y
	BEQ.b CODE_AABA61
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AABA61:
	LDA.w $002B,y
	BEQ.b CODE_AABA6E
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AABA6E:
	LDA.w $002C,y
	BEQ.b CODE_AABA7B
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AABA7B:
	LDA.w $002D,y
	BEQ.b CODE_AABA88
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AABA88:
	LDA.w $002E,y
	BEQ.b CODE_AABA95
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AABA95:
	LDA.w $002F,y
	BEQ.b CODE_AABAA6
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AABAA6:
	LDA.w $0030,y
	BEQ.b CODE_AABAB3
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AABAB3:
	LDA.w $0031,y
	BEQ.b CODE_AABAC0
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AABAC0:
	LDA.w $0032,y
	BEQ.b CODE_AABACD
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AABACD:
	LDA.w $0033,y
	BEQ.b CODE_AABADA
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AABADA:
	LDA.w $0034,y
	BEQ.b CODE_AABAE7
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AABAE7:
	LDA.w $0035,y
	BEQ.b CODE_AABAF8
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AABAF8:
	LDA.w $0036,y
	BEQ.b CODE_AABB05
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AABB05:
	LDA.w $0037,y
	BEQ.b CODE_AABB12
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AABB12:
	LDA.w $0038,y
	BEQ.b CODE_AABB1F
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AABB1F:
	LDA.w $0039,y
	BEQ.b CODE_AABB2C
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AABB2C:
	LDA.w $003A,y
	BEQ.b CODE_AABB3D
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AABB3D:
	LDA.w $003B,y
	BEQ.b CODE_AABB4A
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AABB4A:
	LDA.w $003C,y
	BEQ.b CODE_AABB57
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AABB57:
	REP.b #$20
	RTL

CODE_AABB5A:
	SEP.b #$20
	LDA.w $0003,y
	BEQ.b CODE_AABB69
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AABB69:
	LDA.w $0004,y
	BEQ.b CODE_AABB7A
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AABB7A:
	LDA.w $0005,y
	BEQ.b CODE_AABB87
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AABB87:
	LDA.w $0006,y
	BEQ.b CODE_AABB94
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AABB94:
	LDA.w $0007,y
	BEQ.b CODE_AABBA1
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AABBA1:
	LDA.w $0008,y
	BEQ.b CODE_AABBB2
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AABBB2:
	LDA.w $0009,y
	BEQ.b CODE_AABBBF
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AABBBF:
	LDA.w $000A,y
	BEQ.b CODE_AABBCC
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AABBCC:
	LDA.w $000B,y
	BEQ.b CODE_AABBD9
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AABBD9:
	LDA.w $000C,y
	BEQ.b CODE_AABBE6
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AABBE6:
	LDA.w $000D,y
	BEQ.b CODE_AABBF7
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AABBF7:
	LDA.w $000E,y
	BEQ.b CODE_AABC04
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AABC04:
	LDA.w $000F,y
	BEQ.b CODE_AABC11
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AABC11:
	LDA.w $0010,y
	BEQ.b CODE_AABC1E
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AABC1E:
	LDA.w $0011,y
	BEQ.b CODE_AABC2F
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AABC2F:
	LDA.w $0012,y
	BEQ.b CODE_AABC3C
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AABC3C:
	LDA.w $0013,y
	BEQ.b CODE_AABC49
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AABC49:
	LDA.w $0014,y
	BEQ.b CODE_AABC56
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AABC56:
	LDA.w $0015,y
	BEQ.b CODE_AABC63
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AABC63:
	LDA.w $0016,y
	BEQ.b CODE_AABC74
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AABC74:
	LDA.w $0017,y
	BEQ.b CODE_AABC81
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AABC81:
	LDA.w $0018,y
	BEQ.b CODE_AABC8E
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AABC8E:
	LDA.w $0019,y
	BEQ.b CODE_AABC9B
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AABC9B:
	LDA.w $001A,y
	BEQ.b CODE_AABCAC
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AABCAC:
	LDA.w $001B,y
	BEQ.b CODE_AABCB9
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AABCB9:
	LDA.w $001C,y
	BEQ.b CODE_AABCC6
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AABCC6:
	LDA.w $001D,y
	BEQ.b CODE_AABCD3
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AABCD3:
	LDA.w $001E,y
	BEQ.b CODE_AABCE4
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AABCE4:
	LDA.w $001F,y
	BEQ.b CODE_AABCF1
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AABCF1:
	LDA.w $0020,y
	BEQ.b CODE_AABCFE
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AABCFE:
	LDA.w $0021,y
	BEQ.b CODE_AABD0B
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AABD0B:
	LDA.w $0022,y
	BEQ.b CODE_AABD18
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AABD18:
	LDA.w $0023,y
	BEQ.b CODE_AABD29
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AABD29:
	LDA.w $0024,y
	BEQ.b CODE_AABD36
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AABD36:
	LDA.w $0025,y
	BEQ.b CODE_AABD43
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AABD43:
	LDA.w $0026,y
	BEQ.b CODE_AABD50
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AABD50:
	LDA.w $0027,y
	BEQ.b CODE_AABD61
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AABD61:
	LDA.w $0028,y
	BEQ.b CODE_AABD6E
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AABD6E:
	LDA.w $0029,y
	BEQ.b CODE_AABD7B
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AABD7B:
	LDA.w $002A,y
	BEQ.b CODE_AABD88
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AABD88:
	LDA.w $002B,y
	BEQ.b CODE_AABD95
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AABD95:
	LDA.w $002C,y
	BEQ.b CODE_AABDA6
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AABDA6:
	LDA.w $002D,y
	BEQ.b CODE_AABDB3
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AABDB3:
	LDA.w $002E,y
	BEQ.b CODE_AABDC0
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AABDC0:
	LDA.w $002F,y
	BEQ.b CODE_AABDCD
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AABDCD:
	LDA.w $0030,y
	BEQ.b CODE_AABDDE
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AABDDE:
	LDA.w $0031,y
	BEQ.b CODE_AABDEB
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AABDEB:
	LDA.w $0032,y
	BEQ.b CODE_AABDF8
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AABDF8:
	LDA.w $0033,y
	BEQ.b CODE_AABE05
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AABE05:
	LDA.w $0034,y
	BEQ.b CODE_AABE12
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AABE12:
	LDA.w $0035,y
	BEQ.b CODE_AABE23
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AABE23:
	LDA.w $0036,y
	BEQ.b CODE_AABE30
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AABE30:
	LDA.w $0037,y
	BEQ.b CODE_AABE3D
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AABE3D:
	LDA.w $0038,y
	BEQ.b CODE_AABE4A
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AABE4A:
	LDA.w $0039,y
	BEQ.b CODE_AABE5B
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AABE5B:
	LDA.w $003A,y
	BEQ.b CODE_AABE68
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AABE68:
	LDA.w $003B,y
	BEQ.b CODE_AABE75
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AABE75:
	LDA.w $003C,y
	BEQ.b CODE_AABE7E
	STA.l $7F3F80,x
CODE_AABE7E:
	REP.b #$20
	RTL

CODE_AABE81:
	SEP.b #$20
	LDA.w $0003,y
	BEQ.b CODE_AABE90
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AABE90:
	LDA.w $0004,y
	BEQ.b CODE_AABE9D
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AABE9D:
	LDA.w $0005,y
	BEQ.b CODE_AABEAA
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AABEAA:
	LDA.w $0006,y
	BEQ.b CODE_AABEB7
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AABEB7:
	LDA.w $0007,y
	BEQ.b CODE_AABEC8
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AABEC8:
	LDA.w $0008,y
	BEQ.b CODE_AABED5
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AABED5:
	LDA.w $0009,y
	BEQ.b CODE_AABEE2
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AABEE2:
	LDA.w $000A,y
	BEQ.b CODE_AABEEF
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AABEEF:
	LDA.w $000B,y
	BEQ.b CODE_AABF00
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AABF00:
	LDA.w $000C,y
	BEQ.b CODE_AABF0D
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AABF0D:
	LDA.w $000D,y
	BEQ.b CODE_AABF1A
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AABF1A:
	LDA.w $000E,y
	BEQ.b CODE_AABF27
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AABF27:
	LDA.w $000F,y
	BEQ.b CODE_AABF38
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AABF38:
	LDA.w $0010,y
	BEQ.b CODE_AABF45
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AABF45:
	LDA.w $0011,y
	BEQ.b CODE_AABF52
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AABF52:
	LDA.w $0012,y
	BEQ.b CODE_AABF63
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AABF63:
	LDA.w $0013,y
	BEQ.b CODE_AABF70
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AABF70:
	LDA.w $0014,y
	BEQ.b CODE_AABF7D
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AABF7D:
	LDA.w $0015,y
	BEQ.b CODE_AABF8A
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AABF8A:
	LDA.w $0016,y
	BEQ.b CODE_AABF9B
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AABF9B:
	LDA.w $0017,y
	BEQ.b CODE_AABFA8
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AABFA8:
	LDA.w $0018,y
	BEQ.b CODE_AABFB5
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AABFB5:
	LDA.w $0019,y
	BEQ.b CODE_AABFC2
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AABFC2:
	LDA.w $001A,y
	BEQ.b CODE_AABFD3
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AABFD3:
	LDA.w $001B,y
	BEQ.b CODE_AABFE0
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AABFE0:
	LDA.w $001C,y
	BEQ.b CODE_AABFED
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AABFED:
	LDA.w $001D,y
	BEQ.b CODE_AABFFA
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AABFFA:
	LDA.w $001E,y
	BEQ.b CODE_AAC00B
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AAC00B:
	LDA.w $001F,y
	BEQ.b CODE_AAC018
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAC018:
	LDA.w $0020,y
	BEQ.b CODE_AAC025
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAC025:
	LDA.w $0021,y
	BEQ.b CODE_AAC036
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAC036:
	LDA.w $0022,y
	BEQ.b CODE_AAC043
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAC043:
	LDA.w $0023,y
	BEQ.b CODE_AAC050
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAC050:
	LDA.w $0024,y
	BEQ.b CODE_AAC05D
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAC05D:
	LDA.w $0025,y
	BEQ.b CODE_AAC06E
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAC06E:
	LDA.w $0026,y
	BEQ.b CODE_AAC07B
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAC07B:
	LDA.w $0027,y
	BEQ.b CODE_AAC088
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAC088:
	LDA.w $0028,y
	BEQ.b CODE_AAC095
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AAC095:
	LDA.w $0029,y
	BEQ.b CODE_AAC0A6
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAC0A6:
	LDA.w $002A,y
	BEQ.b CODE_AAC0B3
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAC0B3:
	LDA.w $002B,y
	BEQ.b CODE_AAC0C0
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAC0C0:
	LDA.w $002C,y
	BEQ.b CODE_AAC0CD
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAC0CD:
	LDA.w $002D,y
	BEQ.b CODE_AAC0DE
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAC0DE:
	LDA.w $002E,y
	BEQ.b CODE_AAC0EB
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAC0EB:
	LDA.w $002F,y
	BEQ.b CODE_AAC0F8
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAC0F8:
	LDA.w $0030,y
	BEQ.b CODE_AAC109
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAC109:
	LDA.w $0031,y
	BEQ.b CODE_AAC116
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAC116:
	LDA.w $0032,y
	BEQ.b CODE_AAC123
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAC123:
	LDA.w $0033,y
	BEQ.b CODE_AAC130
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAC130:
	LDA.w $0034,y
	BEQ.b CODE_AAC141
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAC141:
	LDA.w $0035,y
	BEQ.b CODE_AAC14E
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAC14E:
	LDA.w $0036,y
	BEQ.b CODE_AAC15B
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAC15B:
	LDA.w $0037,y
	BEQ.b CODE_AAC168
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAC168:
	LDA.w $0038,y
	BEQ.b CODE_AAC179
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAC179:
	LDA.w $0039,y
	BEQ.b CODE_AAC186
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAC186:
	LDA.w $003A,y
	BEQ.b CODE_AAC193
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAC193:
	LDA.w $003B,y
	BEQ.b CODE_AAC1A0
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAC1A0:
	REP.b #$20
	RTL

CODE_AAC1A3:
	SEP.b #$20
	LDA.w $0003,y
	BEQ.b CODE_AAC1AE
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAC1AE:
	LDA.w $0004,y
	BEQ.b CODE_AAC1BB
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAC1BB:
	LDA.w $0005,y
	BEQ.b CODE_AAC1C8
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAC1C8:
	LDA.w $0006,y
	BEQ.b CODE_AAC1D5
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAC1D5:
	LDA.w $0007,y
	BEQ.b CODE_AAC1E6
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAC1E6:
	LDA.w $0008,y
	BEQ.b CODE_AAC1F3
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAC1F3:
	LDA.w $0009,y
	BEQ.b CODE_AAC200
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAC200:
	LDA.w $000A,y
	BEQ.b CODE_AAC211
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAC211:
	LDA.w $000B,y
	BEQ.b CODE_AAC21E
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAC21E:
	LDA.w $000C,y
	BEQ.b CODE_AAC22B
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAC22B:
	LDA.w $000D,y
	BEQ.b CODE_AAC238
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAC238:
	LDA.w $000E,y
	BEQ.b CODE_AAC249
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAC249:
	LDA.w $000F,y
	BEQ.b CODE_AAC256
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAC256:
	LDA.w $0010,y
	BEQ.b CODE_AAC263
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAC263:
	LDA.w $0011,y
	BEQ.b CODE_AAC274
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAC274:
	LDA.w $0012,y
	BEQ.b CODE_AAC281
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAC281:
	LDA.w $0013,y
	BEQ.b CODE_AAC28E
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAC28E:
	LDA.w $0014,y
	BEQ.b CODE_AAC29B
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAC29B:
	LDA.w $0015,y
	BEQ.b CODE_AAC2AC
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAC2AC:
	LDA.w $0016,y
	BEQ.b CODE_AAC2B9
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAC2B9:
	LDA.w $0017,y
	BEQ.b CODE_AAC2C6
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAC2C6:
	LDA.w $0018,y
	BEQ.b CODE_AAC2D7
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAC2D7:
	LDA.w $0019,y
	BEQ.b CODE_AAC2E4
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAC2E4:
	LDA.w $001A,y
	BEQ.b CODE_AAC2F1
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAC2F1:
	LDA.w $001B,y
	BEQ.b CODE_AAC2FE
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AAC2FE:
	LDA.w $001C,y
	BEQ.b CODE_AAC30F
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAC30F:
	LDA.w $001D,y
	BEQ.b CODE_AAC31C
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAC31C:
	LDA.w $001E,y
	BEQ.b CODE_AAC329
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAC329:
	LDA.w $001F,y
	BEQ.b CODE_AAC33A
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAC33A:
	LDA.w $0020,y
	BEQ.b CODE_AAC347
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAC347:
	LDA.w $0021,y
	BEQ.b CODE_AAC354
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAC354:
	LDA.w $0022,y
	BEQ.b CODE_AAC361
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AAC361:
	LDA.w $0023,y
	BEQ.b CODE_AAC372
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAC372:
	LDA.w $0024,y
	BEQ.b CODE_AAC37F
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAC37F:
	LDA.w $0025,y
	BEQ.b CODE_AAC38C
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAC38C:
	LDA.w $0026,y
	BEQ.b CODE_AAC39D
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAC39D:
	LDA.w $0027,y
	BEQ.b CODE_AAC3AA
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAC3AA:
	LDA.w $0028,y
	BEQ.b CODE_AAC3B7
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AAC3B7:
	LDA.w $0029,y
	BEQ.b CODE_AAC3C4
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAC3C4:
	LDA.w $002A,y
	BEQ.b CODE_AAC3D5
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAC3D5:
	LDA.w $002B,y
	BEQ.b CODE_AAC3E2
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAC3E2:
	LDA.w $002C,y
	BEQ.b CODE_AAC3EF
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAC3EF:
	LDA.w $002D,y
	BEQ.b CODE_AAC400
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAC400:
	LDA.w $002E,y
	BEQ.b CODE_AAC40D
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAC40D:
	LDA.w $002F,y
	BEQ.b CODE_AAC41A
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAC41A:
	LDA.w $0030,y
	BEQ.b CODE_AAC427
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAC427:
	LDA.w $0031,y
	BEQ.b CODE_AAC438
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAC438:
	LDA.w $0032,y
	BEQ.b CODE_AAC445
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAC445:
	LDA.w $0033,y
	BEQ.b CODE_AAC452
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAC452:
	LDA.w $0034,y
	BEQ.b CODE_AAC463
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAC463:
	LDA.w $0035,y
	BEQ.b CODE_AAC470
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAC470:
	LDA.w $0036,y
	BEQ.b CODE_AAC47D
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAC47D:
	LDA.w $0037,y
	BEQ.b CODE_AAC48A
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAC48A:
	LDA.w $0038,y
	BEQ.b CODE_AAC49B
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAC49B:
	LDA.w $0039,y
	BEQ.b CODE_AAC4A8
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAC4A8:
	LDA.w $003A,y
	BEQ.b CODE_AAC4B5
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAC4B5:
	LDA.w $003B,y
	BEQ.b CODE_AAC4C2
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAC4C2:
	REP.b #$20
	RTL

CODE_AAC4C5:
	SEP.b #$20
	LDA.w $0004,y
	BEQ.b CODE_AAC4D4
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAC4D4:
	LDA.w $0005,y
	BEQ.b CODE_AAC4E1
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAC4E1:
	LDA.w $0006,y
	BEQ.b CODE_AAC4F2
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAC4F2:
	LDA.w $0007,y
	BEQ.b CODE_AAC4FF
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AAC4FF:
	LDA.w $0008,y
	BEQ.b CODE_AAC50C
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAC50C:
	LDA.w $0009,y
	BEQ.b CODE_AAC51D
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAC51D:
	LDA.w $000A,y
	BEQ.b CODE_AAC52A
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAC52A:
	LDA.w $000B,y
	BEQ.b CODE_AAC537
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAC537:
	LDA.w $000C,y
	BEQ.b CODE_AAC548
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAC548:
	LDA.w $000D,y
	BEQ.b CODE_AAC555
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAC555:
	LDA.w $000E,y
	BEQ.b CODE_AAC562
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAC562:
	LDA.w $000F,y
	BEQ.b CODE_AAC573
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAC573:
	LDA.w $0010,y
	BEQ.b CODE_AAC580
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAC580:
	LDA.w $0011,y
	BEQ.b CODE_AAC58D
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAC58D:
	LDA.w $0012,y
	BEQ.b CODE_AAC59E
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAC59E:
	LDA.w $0013,y
	BEQ.b CODE_AAC5AB
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAC5AB:
	LDA.w $0014,y
	BEQ.b CODE_AAC5B8
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAC5B8:
	LDA.w $0015,y
	BEQ.b CODE_AAC5C9
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAC5C9:
	LDA.w $0016,y
	BEQ.b CODE_AAC5D6
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAC5D6:
	LDA.w $0017,y
	BEQ.b CODE_AAC5E3
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAC5E3:
	LDA.w $0018,y
	BEQ.b CODE_AAC5F4
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAC5F4:
	LDA.w $0019,y
	BEQ.b CODE_AAC601
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAC601:
	LDA.w $001A,y
	BEQ.b CODE_AAC60E
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAC60E:
	LDA.w $001B,y
	BEQ.b CODE_AAC61F
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAC61F:
	LDA.w $001C,y
	BEQ.b CODE_AAC62C
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAC62C:
	LDA.w $001D,y
	BEQ.b CODE_AAC639
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAC639:
	LDA.w $001E,y
	BEQ.b CODE_AAC64A
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AAC64A:
	LDA.w $001F,y
	BEQ.b CODE_AAC657
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAC657:
	LDA.w $0020,y
	BEQ.b CODE_AAC664
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAC664:
	LDA.w $0021,y
	BEQ.b CODE_AAC675
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAC675:
	LDA.w $0022,y
	BEQ.b CODE_AAC682
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAC682:
	LDA.w $0023,y
	BEQ.b CODE_AAC68F
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAC68F:
	LDA.w $0024,y
	BEQ.b CODE_AAC6A0
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AAC6A0:
	LDA.w $0025,y
	BEQ.b CODE_AAC6AD
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAC6AD:
	LDA.w $0026,y
	BEQ.b CODE_AAC6BA
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAC6BA:
	LDA.w $0027,y
	BEQ.b CODE_AAC6CB
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAC6CB:
	LDA.w $0028,y
	BEQ.b CODE_AAC6D8
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAC6D8:
	LDA.w $0029,y
	BEQ.b CODE_AAC6E5
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAC6E5:
	LDA.w $002A,y
	BEQ.b CODE_AAC6F6
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAC6F6:
	LDA.w $002B,y
	BEQ.b CODE_AAC703
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AAC703:
	LDA.w $002C,y
	BEQ.b CODE_AAC710
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAC710:
	LDA.w $002D,y
	BEQ.b CODE_AAC721
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAC721:
	LDA.w $002E,y
	BEQ.b CODE_AAC72E
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAC72E:
	LDA.w $002F,y
	BEQ.b CODE_AAC73B
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAC73B:
	LDA.w $0030,y
	BEQ.b CODE_AAC74C
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAC74C:
	LDA.w $0031,y
	BEQ.b CODE_AAC759
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAC759:
	LDA.w $0032,y
	BEQ.b CODE_AAC766
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AAC766:
	LDA.w $0033,y
	BEQ.b CODE_AAC777
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAC777:
	LDA.w $0034,y
	BEQ.b CODE_AAC784
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AAC784:
	LDA.w $0035,y
	BEQ.b CODE_AAC791
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAC791:
	LDA.w $0036,y
	BEQ.b CODE_AAC79E
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAC79E:
	LDA.w $0037,y
	BEQ.b CODE_AAC7AF
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAC7AF:
	LDA.w $0038,y
	BEQ.b CODE_AAC7BC
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAC7BC:
	LDA.w $0039,y
	BEQ.b CODE_AAC7C9
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAC7C9:
	LDA.w $003A,y
	BEQ.b CODE_AAC7DA
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAC7DA:
	REP.b #$20
	RTL

CODE_AAC7DD:
	SEP.b #$20
	LDA.w $0004,y
	BEQ.b CODE_AAC7E8
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAC7E8:
	LDA.w $0005,y
	BEQ.b CODE_AAC7F9
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAC7F9:
	LDA.w $0006,y
	BEQ.b CODE_AAC806
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAC806:
	LDA.w $0007,y
	BEQ.b CODE_AAC813
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAC813:
	LDA.w $0008,y
	BEQ.b CODE_AAC824
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAC824:
	LDA.w $0009,y
	BEQ.b CODE_AAC831
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAC831:
	LDA.w $000A,y
	BEQ.b CODE_AAC83E
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAC83E:
	LDA.w $000B,y
	BEQ.b CODE_AAC84F
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAC84F:
	LDA.w $000C,y
	BEQ.b CODE_AAC85C
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAC85C:
	LDA.w $000D,y
	BEQ.b CODE_AAC869
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAC869:
	LDA.w $000E,y
	BEQ.b CODE_AAC87A
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAC87A:
	LDA.w $000F,y
	BEQ.b CODE_AAC887
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAC887:
	LDA.w $0010,y
	BEQ.b CODE_AAC894
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AAC894:
	LDA.w $0011,y
	BEQ.b CODE_AAC8A5
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAC8A5:
	LDA.w $0012,y
	BEQ.b CODE_AAC8B2
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAC8B2:
	LDA.w $0013,y
	BEQ.b CODE_AAC8BF
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAC8BF:
	LDA.w $0014,y
	BEQ.b CODE_AAC8D0
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAC8D0:
	LDA.w $0015,y
	BEQ.b CODE_AAC8DD
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AAC8DD:
	LDA.w $0016,y
	BEQ.b CODE_AAC8EE
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAC8EE:
	LDA.w $0017,y
	BEQ.b CODE_AAC8FB
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAC8FB:
	LDA.w $0018,y
	BEQ.b CODE_AAC908
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAC908:
	LDA.w $0019,y
	BEQ.b CODE_AAC919
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAC919:
	LDA.w $001A,y
	BEQ.b CODE_AAC926
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAC926:
	LDA.w $001B,y
	BEQ.b CODE_AAC933
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AAC933:
	LDA.w $001C,y
	BEQ.b CODE_AAC944
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAC944:
	LDA.w $001D,y
	BEQ.b CODE_AAC951
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAC951:
	LDA.w $001E,y
	BEQ.b CODE_AAC95E
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAC95E:
	LDA.w $001F,y
	BEQ.b CODE_AAC96F
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAC96F:
	LDA.w $0020,y
	BEQ.b CODE_AAC97C
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAC97C:
	LDA.w $0021,y
	BEQ.b CODE_AAC989
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAC989:
	LDA.w $0022,y
	BEQ.b CODE_AAC99A
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAC99A:
	LDA.w $0023,y
	BEQ.b CODE_AAC9A7
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAC9A7:
	LDA.w $0024,y
	BEQ.b CODE_AAC9B4
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAC9B4:
	LDA.w $0025,y
	BEQ.b CODE_AAC9C5
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAC9C5:
	LDA.w $0026,y
	BEQ.b CODE_AAC9D2
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAC9D2:
	LDA.w $0027,y
	BEQ.b CODE_AAC9DF
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAC9DF:
	LDA.w $0028,y
	BEQ.b CODE_AAC9F0
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAC9F0:
	LDA.w $0029,y
	BEQ.b CODE_AAC9FD
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAC9FD:
	LDA.w $002A,y
	BEQ.b CODE_AACA0A
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AACA0A:
	LDA.w $002B,y
	BEQ.b CODE_AACA1B
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AACA1B:
	LDA.w $002C,y
	BEQ.b CODE_AACA28
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AACA28:
	LDA.w $002D,y
	BEQ.b CODE_AACA39
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AACA39:
	LDA.w $002E,y
	BEQ.b CODE_AACA46
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AACA46:
	LDA.w $002F,y
	BEQ.b CODE_AACA53
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AACA53:
	LDA.w $0030,y
	BEQ.b CODE_AACA64
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AACA64:
	LDA.w $0031,y
	BEQ.b CODE_AACA71
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AACA71:
	LDA.w $0032,y
	BEQ.b CODE_AACA7E
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AACA7E:
	LDA.w $0033,y
	BEQ.b CODE_AACA8F
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AACA8F:
	LDA.w $0034,y
	BEQ.b CODE_AACA9C
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AACA9C:
	LDA.w $0035,y
	BEQ.b CODE_AACAA9
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AACAA9:
	LDA.w $0036,y
	BEQ.b CODE_AACABA
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AACABA:
	LDA.w $0037,y
	BEQ.b CODE_AACAC7
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AACAC7:
	LDA.w $0038,y
	BEQ.b CODE_AACAD4
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AACAD4:
	LDA.w $0039,y
	BEQ.b CODE_AACAE5
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AACAE5:
	LDA.w $003A,y
	BEQ.b CODE_AACAF2
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AACAF2:
	REP.b #$20
	RTL

CODE_AACAF5:
	SEP.b #$20
	LDA.w $0005,y
	BEQ.b CODE_AACB08
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AACB08:
	LDA.w $0006,y
	BEQ.b CODE_AACB15
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AACB15:
	LDA.w $0007,y
	BEQ.b CODE_AACB26
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AACB26:
	LDA.w $0008,y
	BEQ.b CODE_AACB33
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AACB33:
	LDA.w $0009,y
	BEQ.b CODE_AACB40
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AACB40:
	LDA.w $000A,y
	BEQ.b CODE_AACB51
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AACB51:
	LDA.w $000B,y
	BEQ.b CODE_AACB5E
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AACB5E:
	LDA.w $000C,y
	BEQ.b CODE_AACB6F
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AACB6F:
	LDA.w $000D,y
	BEQ.b CODE_AACB7C
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AACB7C:
	LDA.w $000E,y
	BEQ.b CODE_AACB89
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AACB89:
	LDA.w $000F,y
	BEQ.b CODE_AACB9A
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AACB9A:
	LDA.w $0010,y
	BEQ.b CODE_AACBA7
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AACBA7:
	LDA.w $0011,y
	BEQ.b CODE_AACBB8
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AACBB8:
	LDA.w $0012,y
	BEQ.b CODE_AACBC5
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AACBC5:
	LDA.w $0013,y
	BEQ.b CODE_AACBD2
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AACBD2:
	LDA.w $0014,y
	BEQ.b CODE_AACBE3
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AACBE3:
	LDA.w $0015,y
	BEQ.b CODE_AACBF0
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AACBF0:
	LDA.w $0016,y
	BEQ.b CODE_AACC01
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AACC01:
	LDA.w $0017,y
	BEQ.b CODE_AACC0E
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AACC0E:
	LDA.w $0018,y
	BEQ.b CODE_AACC1B
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AACC1B:
	LDA.w $0019,y
	BEQ.b CODE_AACC2C
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AACC2C:
	LDA.w $001A,y
	BEQ.b CODE_AACC39
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AACC39:
	LDA.w $001B,y
	BEQ.b CODE_AACC46
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AACC46:
	LDA.w $001C,y
	BEQ.b CODE_AACC57
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AACC57:
	LDA.w $001D,y
	BEQ.b CODE_AACC64
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AACC64:
	LDA.w $001E,y
	BEQ.b CODE_AACC75
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AACC75:
	LDA.w $001F,y
	BEQ.b CODE_AACC82
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AACC82:
	LDA.w $0020,y
	BEQ.b CODE_AACC8F
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AACC8F:
	LDA.w $0021,y
	BEQ.b CODE_AACCA0
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AACCA0:
	LDA.w $0022,y
	BEQ.b CODE_AACCAD
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AACCAD:
	LDA.w $0023,y
	BEQ.b CODE_AACCBE
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AACCBE:
	LDA.w $0024,y
	BEQ.b CODE_AACCCB
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AACCCB:
	LDA.w $0025,y
	BEQ.b CODE_AACCD8
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AACCD8:
	LDA.w $0026,y
	BEQ.b CODE_AACCE9
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AACCE9:
	LDA.w $0027,y
	BEQ.b CODE_AACCF6
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AACCF6:
	LDA.w $0028,y
	BEQ.b CODE_AACD07
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AACD07:
	LDA.w $0029,y
	BEQ.b CODE_AACD14
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AACD14:
	LDA.w $002A,y
	BEQ.b CODE_AACD21
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AACD21:
	LDA.w $002B,y
	BEQ.b CODE_AACD32
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AACD32:
	LDA.w $002C,y
	BEQ.b CODE_AACD3F
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AACD3F:
	LDA.w $002D,y
	BEQ.b CODE_AACD50
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AACD50:
	LDA.w $002E,y
	BEQ.b CODE_AACD5D
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AACD5D:
	LDA.w $002F,y
	BEQ.b CODE_AACD6A
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AACD6A:
	LDA.w $0030,y
	BEQ.b CODE_AACD7B
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AACD7B:
	LDA.w $0031,y
	BEQ.b CODE_AACD88
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AACD88:
	LDA.w $0032,y
	BEQ.b CODE_AACD99
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AACD99:
	LDA.w $0033,y
	BEQ.b CODE_AACDA6
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AACDA6:
	LDA.w $0034,y
	BEQ.b CODE_AACDB3
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AACDB3:
	LDA.w $0035,y
	BEQ.b CODE_AACDC4
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AACDC4:
	LDA.w $0036,y
	BEQ.b CODE_AACDD1
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AACDD1:
	LDA.w $0037,y
	BEQ.b CODE_AACDDE
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AACDDE:
	LDA.w $0038,y
	BEQ.b CODE_AACDEF
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AACDEF:
	LDA.w $0039,y
	BEQ.b CODE_AACDFC
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AACDFC:
	LDA.w $003A,y
	BEQ.b CODE_AACE05
	STA.l $7F3F80,x
CODE_AACE05:
	REP.b #$20
	RTL

CODE_AACE08:
	SEP.b #$20
	LDA.w $0005,y
	BEQ.b CODE_AACE17
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AACE17:
	LDA.w $0006,y
	BEQ.b CODE_AACE24
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AACE24:
	LDA.w $0007,y
	BEQ.b CODE_AACE35
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AACE35:
	LDA.w $0008,y
	BEQ.b CODE_AACE42
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AACE42:
	LDA.w $0009,y
	BEQ.b CODE_AACE53
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AACE53:
	LDA.w $000A,y
	BEQ.b CODE_AACE60
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AACE60:
	LDA.w $000B,y
	BEQ.b CODE_AACE6D
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AACE6D:
	LDA.w $000C,y
	BEQ.b CODE_AACE7E
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AACE7E:
	LDA.w $000D,y
	BEQ.b CODE_AACE8B
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AACE8B:
	LDA.w $000E,y
	BEQ.b CODE_AACE9C
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AACE9C:
	LDA.w $000F,y
	BEQ.b CODE_AACEA9
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AACEA9:
	LDA.w $0010,y
	BEQ.b CODE_AACEBA
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AACEBA:
	LDA.w $0011,y
	BEQ.b CODE_AACEC7
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AACEC7:
	LDA.w $0012,y
	BEQ.b CODE_AACED4
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AACED4:
	LDA.w $0013,y
	BEQ.b CODE_AACEE5
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AACEE5:
	LDA.w $0014,y
	BEQ.b CODE_AACEF2
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AACEF2:
	LDA.w $0015,y
	BEQ.b CODE_AACF03
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AACF03:
	LDA.w $0016,y
	BEQ.b CODE_AACF10
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AACF10:
	LDA.w $0017,y
	BEQ.b CODE_AACF1D
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AACF1D:
	LDA.w $0018,y
	BEQ.b CODE_AACF2E
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AACF2E:
	LDA.w $0019,y
	BEQ.b CODE_AACF3B
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AACF3B:
	LDA.w $001A,y
	BEQ.b CODE_AACF4C
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AACF4C:
	LDA.w $001B,y
	BEQ.b CODE_AACF59
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AACF59:
	LDA.w $001C,y
	BEQ.b CODE_AACF6A
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AACF6A:
	LDA.w $001D,y
	BEQ.b CODE_AACF77
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AACF77:
	LDA.w $001E,y
	BEQ.b CODE_AACF84
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AACF84:
	LDA.w $001F,y
	BEQ.b CODE_AACF95
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AACF95:
	LDA.w $0020,y
	BEQ.b CODE_AACFA2
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AACFA2:
	LDA.w $0021,y
	BEQ.b CODE_AACFB3
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AACFB3:
	LDA.w $0022,y
	BEQ.b CODE_AACFC0
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AACFC0:
	LDA.w $0023,y
	BEQ.b CODE_AACFCD
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AACFCD:
	LDA.w $0024,y
	BEQ.b CODE_AACFDE
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AACFDE:
	LDA.w $0025,y
	BEQ.b CODE_AACFEB
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AACFEB:
	LDA.w $0026,y
	BEQ.b CODE_AACFFC
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AACFFC:
	LDA.w $0027,y
	BEQ.b CODE_AAD009
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAD009:
	LDA.w $0028,y
	BEQ.b CODE_AAD01A
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAD01A:
	LDA.w $0029,y
	BEQ.b CODE_AAD027
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAD027:
	LDA.w $002A,y
	BEQ.b CODE_AAD034
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAD034:
	LDA.w $002B,y
	BEQ.b CODE_AAD045
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAD045:
	LDA.w $002C,y
	BEQ.b CODE_AAD052
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAD052:
	LDA.w $002D,y
	BEQ.b CODE_AAD063
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAD063:
	LDA.w $002E,y
	BEQ.b CODE_AAD070
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAD070:
	LDA.w $002F,y
	BEQ.b CODE_AAD07D
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAD07D:
	LDA.w $0030,y
	BEQ.b CODE_AAD08E
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAD08E:
	LDA.w $0031,y
	BEQ.b CODE_AAD09B
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAD09B:
	LDA.w $0032,y
	BEQ.b CODE_AAD0AC
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAD0AC:
	LDA.w $0033,y
	BEQ.b CODE_AAD0B9
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAD0B9:
	LDA.w $0034,y
	BEQ.b CODE_AAD0C6
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAD0C6:
	LDA.w $0035,y
	BEQ.b CODE_AAD0D7
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAD0D7:
	LDA.w $0036,y
	BEQ.b CODE_AAD0E4
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAD0E4:
	LDA.w $0037,y
	BEQ.b CODE_AAD0F5
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAD0F5:
	LDA.w $0038,y
	BEQ.b CODE_AAD102
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAD102:
	LDA.w $0039,y
	BEQ.b CODE_AAD113
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAD113:
	REP.b #$20
	RTL

CODE_AAD116:
	SEP.b #$20
	LDA.w $0005,y
	BEQ.b CODE_AAD121
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAD121:
	LDA.w $0006,y
	BEQ.b CODE_AAD132
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAD132:
	LDA.w $0007,y
	BEQ.b CODE_AAD13F
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAD13F:
	LDA.w $0008,y
	BEQ.b CODE_AAD14C
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAD14C:
	LDA.w $0009,y
	BEQ.b CODE_AAD15D
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAD15D:
	LDA.w $000A,y
	BEQ.b CODE_AAD16A
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAD16A:
	LDA.w $000B,y
	BEQ.b CODE_AAD17B
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAD17B:
	LDA.w $000C,y
	BEQ.b CODE_AAD188
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAD188:
	LDA.w $000D,y
	BEQ.b CODE_AAD199
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAD199:
	LDA.w $000E,y
	BEQ.b CODE_AAD1A6
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAD1A6:
	LDA.w $000F,y
	BEQ.b CODE_AAD1B7
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAD1B7:
	LDA.w $0010,y
	BEQ.b CODE_AAD1C4
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAD1C4:
	LDA.w $0011,y
	BEQ.b CODE_AAD1D1
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAD1D1:
	LDA.w $0012,y
	BEQ.b CODE_AAD1E2
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAD1E2:
	LDA.w $0013,y
	BEQ.b CODE_AAD1EF
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAD1EF:
	LDA.w $0014,y
	BEQ.b CODE_AAD200
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAD200:
	LDA.w $0015,y
	BEQ.b CODE_AAD20D
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAD20D:
	LDA.w $0016,y
	BEQ.b CODE_AAD21E
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAD21E:
	LDA.w $0017,y
	BEQ.b CODE_AAD22B
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAD22B:
	LDA.w $0018,y
	BEQ.b CODE_AAD238
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AAD238:
	LDA.w $0019,y
	BEQ.b CODE_AAD249
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAD249:
	LDA.w $001A,y
	BEQ.b CODE_AAD256
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAD256:
	LDA.w $001B,y
	BEQ.b CODE_AAD267
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AAD267:
	LDA.w $001C,y
	BEQ.b CODE_AAD274
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AAD274:
	LDA.w $001D,y
	BEQ.b CODE_AAD285
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAD285:
	LDA.w $001E,y
	BEQ.b CODE_AAD292
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAD292:
	LDA.w $001F,y
	BEQ.b CODE_AAD2A3
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAD2A3:
	LDA.w $0020,y
	BEQ.b CODE_AAD2B0
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAD2B0:
	LDA.w $0021,y
	BEQ.b CODE_AAD2BD
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AAD2BD:
	LDA.w $0022,y
	BEQ.b CODE_AAD2CE
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAD2CE:
	LDA.w $0023,y
	BEQ.b CODE_AAD2DB
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AAD2DB:
	LDA.w $0024,y
	BEQ.b CODE_AAD2EC
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AAD2EC:
	LDA.w $0025,y
	BEQ.b CODE_AAD2F9
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAD2F9:
	LDA.w $0026,y
	BEQ.b CODE_AAD30A
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAD30A:
	LDA.w $0027,y
	BEQ.b CODE_AAD317
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAD317:
	LDA.w $0028,y
	BEQ.b CODE_AAD324
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAD324:
	LDA.w $0029,y
	BEQ.b CODE_AAD335
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAD335:
	LDA.w $002A,y
	BEQ.b CODE_AAD342
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAD342:
	LDA.w $002B,y
	BEQ.b CODE_AAD353
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAD353:
	LDA.w $002C,y
	BEQ.b CODE_AAD360
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAD360:
	LDA.w $002D,y
	BEQ.b CODE_AAD371
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAD371:
	LDA.w $002E,y
	BEQ.b CODE_AAD37E
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAD37E:
	LDA.w $002F,y
	BEQ.b CODE_AAD38F
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAD38F:
	LDA.w $0030,y
	BEQ.b CODE_AAD39C
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAD39C:
	LDA.w $0031,y
	BEQ.b CODE_AAD3A9
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAD3A9:
	LDA.w $0032,y
	BEQ.b CODE_AAD3BA
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAD3BA:
	LDA.w $0033,y
	BEQ.b CODE_AAD3C7
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAD3C7:
	LDA.w $0034,y
	BEQ.b CODE_AAD3D8
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAD3D8:
	LDA.w $0035,y
	BEQ.b CODE_AAD3E5
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAD3E5:
	LDA.w $0036,y
	BEQ.b CODE_AAD3F6
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAD3F6:
	LDA.w $0037,y
	BEQ.b CODE_AAD403
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAD403:
	LDA.w $0038,y
	BEQ.b CODE_AAD410
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAD410:
	LDA.w $0039,y
	BEQ.b CODE_AAD421
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAD421:
	REP.b #$20
	RTL

CODE_AAD424:
	SEP.b #$20
	LDA.w $0006,y
	BEQ.b CODE_AAD437
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAD437:
	LDA.w $0007,y
	BEQ.b CODE_AAD444
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAD444:
	LDA.w $0008,y
	BEQ.b CODE_AAD455
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAD455:
	LDA.w $0009,y
	BEQ.b CODE_AAD462
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAD462:
	LDA.w $000A,y
	BEQ.b CODE_AAD473
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAD473:
	LDA.w $000B,y
	BEQ.b CODE_AAD480
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAD480:
	LDA.w $000C,y
	BEQ.b CODE_AAD491
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAD491:
	LDA.w $000D,y
	BEQ.b CODE_AAD49E
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAD49E:
	LDA.w $000E,y
	BEQ.b CODE_AAD4AF
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAD4AF:
	LDA.w $000F,y
	BEQ.b CODE_AAD4BC
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAD4BC:
	LDA.w $0010,y
	BEQ.b CODE_AAD4CD
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAD4CD:
	LDA.w $0011,y
	BEQ.b CODE_AAD4DA
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAD4DA:
	LDA.w $0012,y
	BEQ.b CODE_AAD4EB
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAD4EB:
	LDA.w $0013,y
	BEQ.b CODE_AAD4F8
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAD4F8:
	LDA.w $0014,y
	BEQ.b CODE_AAD509
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAD509:
	LDA.w $0015,y
	BEQ.b CODE_AAD516
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAD516:
	LDA.w $0016,y
	BEQ.b CODE_AAD527
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAD527:
	LDA.w $0017,y
	BEQ.b CODE_AAD534
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAD534:
	LDA.w $0018,y
	BEQ.b CODE_AAD545
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAD545:
	LDA.w $0019,y
	BEQ.b CODE_AAD552
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAD552:
	LDA.w $001A,y
	BEQ.b CODE_AAD563
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAD563:
	LDA.w $001B,y
	BEQ.b CODE_AAD570
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AAD570:
	LDA.w $001C,y
	BEQ.b CODE_AAD581
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AAD581:
	LDA.w $001D,y
	BEQ.b CODE_AAD58E
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAD58E:
	LDA.w $001E,y
	BEQ.b CODE_AAD59F
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AAD59F:
	LDA.w $001F,y
	BEQ.b CODE_AAD5AC
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAD5AC:
	LDA.w $0020,y
	BEQ.b CODE_AAD5BD
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AAD5BD:
	LDA.w $0021,y
	BEQ.b CODE_AAD5CA
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAD5CA:
	LDA.w $0022,y
	BEQ.b CODE_AAD5D7
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAD5D7:
	LDA.w $0023,y
	BEQ.b CODE_AAD5E8
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AAD5E8:
	LDA.w $0024,y
	BEQ.b CODE_AAD5F5
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AAD5F5:
	LDA.w $0025,y
	BEQ.b CODE_AAD606
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AAD606:
	LDA.w $0026,y
	BEQ.b CODE_AAD613
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAD613:
	LDA.w $0027,y
	BEQ.b CODE_AAD624
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AAD624:
	LDA.w $0028,y
	BEQ.b CODE_AAD631
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAD631:
	LDA.w $0029,y
	BEQ.b CODE_AAD642
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAD642:
	LDA.w $002A,y
	BEQ.b CODE_AAD64F
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAD64F:
	LDA.w $002B,y
	BEQ.b CODE_AAD660
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAD660:
	LDA.w $002C,y
	BEQ.b CODE_AAD66D
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAD66D:
	LDA.w $002D,y
	BEQ.b CODE_AAD67E
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAD67E:
	LDA.w $002E,y
	BEQ.b CODE_AAD68B
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAD68B:
	LDA.w $002F,y
	BEQ.b CODE_AAD69C
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAD69C:
	LDA.w $0030,y
	BEQ.b CODE_AAD6A9
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAD6A9:
	LDA.w $0031,y
	BEQ.b CODE_AAD6BA
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAD6BA:
	LDA.w $0032,y
	BEQ.b CODE_AAD6C7
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAD6C7:
	LDA.w $0033,y
	BEQ.b CODE_AAD6D8
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAD6D8:
	LDA.w $0034,y
	BEQ.b CODE_AAD6E5
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAD6E5:
	LDA.w $0035,y
	BEQ.b CODE_AAD6F6
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAD6F6:
	LDA.w $0036,y
	BEQ.b CODE_AAD703
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAD703:
	LDA.w $0037,y
	BEQ.b CODE_AAD714
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAD714:
	LDA.w $0038,y
	BEQ.b CODE_AAD721
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AAD721:
	LDA.w $0039,y
	BEQ.b CODE_AAD72A
	STA.l $7F3F80,x
CODE_AAD72A:
	REP.b #$20
	RTL

CODE_AAD72D:
	SEP.b #$20
	LDA.w $0006,y
	BEQ.b CODE_AAD73C
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAD73C:
	LDA.w $0007,y
	BEQ.b CODE_AAD74D
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAD74D:
	LDA.w $0008,y
	BEQ.b CODE_AAD75A
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAD75A:
	LDA.w $0009,y
	BEQ.b CODE_AAD76B
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAD76B:
	LDA.w $000A,y
	BEQ.b CODE_AAD778
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAD778:
	LDA.w $000B,y
	BEQ.b CODE_AAD789
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAD789:
	LDA.w $000C,y
	BEQ.b CODE_AAD796
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAD796:
	LDA.w $000D,y
	BEQ.b CODE_AAD7A7
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAD7A7:
	LDA.w $000E,y
	BEQ.b CODE_AAD7B4
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAD7B4:
	LDA.w $000F,y
	BEQ.b CODE_AAD7C5
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAD7C5:
	LDA.w $0010,y
	BEQ.b CODE_AAD7D2
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAD7D2:
	LDA.w $0011,y
	BEQ.b CODE_AAD7E3
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAD7E3:
	LDA.w $0012,y
	BEQ.b CODE_AAD7F0
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAD7F0:
	LDA.w $0013,y
	BEQ.b CODE_AAD801
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAD801:
	LDA.w $0014,y
	BEQ.b CODE_AAD80E
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAD80E:
	LDA.w $0015,y
	BEQ.b CODE_AAD81F
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAD81F:
	LDA.w $0016,y
	BEQ.b CODE_AAD82C
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAD82C:
	LDA.w $0017,y
	BEQ.b CODE_AAD83D
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAD83D:
	LDA.w $0018,y
	BEQ.b CODE_AAD84A
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AAD84A:
	LDA.w $0019,y
	BEQ.b CODE_AAD85B
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAD85B:
	LDA.w $001A,y
	BEQ.b CODE_AAD868
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAD868:
	LDA.w $001B,y
	BEQ.b CODE_AAD879
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AAD879:
	LDA.w $001C,y
	BEQ.b CODE_AAD886
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AAD886:
	LDA.w $001D,y
	BEQ.b CODE_AAD897
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAD897:
	LDA.w $001E,y
	BEQ.b CODE_AAD8A4
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAD8A4:
	LDA.w $001F,y
	BEQ.b CODE_AAD8B5
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAD8B5:
	LDA.w $0020,y
	BEQ.b CODE_AAD8C2
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAD8C2:
	LDA.w $0021,y
	BEQ.b CODE_AAD8D3
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAD8D3:
	LDA.w $0022,y
	BEQ.b CODE_AAD8E0
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AAD8E0:
	LDA.w $0023,y
	BEQ.b CODE_AAD8F1
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AAD8F1:
	LDA.w $0024,y
	BEQ.b CODE_AAD8FE
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AAD8FE:
	LDA.w $0025,y
	BEQ.b CODE_AAD90F
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AAD90F:
	LDA.w $0026,y
	BEQ.b CODE_AAD91C
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAD91C:
	LDA.w $0027,y
	BEQ.b CODE_AAD92D
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AAD92D:
	LDA.w $0028,y
	BEQ.b CODE_AAD93A
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAD93A:
	LDA.w $0029,y
	BEQ.b CODE_AAD94B
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAD94B:
	LDA.w $002A,y
	BEQ.b CODE_AAD958
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAD958:
	LDA.w $002B,y
	BEQ.b CODE_AAD969
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAD969:
	LDA.w $002C,y
	BEQ.b CODE_AAD976
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAD976:
	LDA.w $002D,y
	BEQ.b CODE_AAD987
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAD987:
	LDA.w $002E,y
	BEQ.b CODE_AAD994
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAD994:
	LDA.w $002F,y
	BEQ.b CODE_AAD9A5
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAD9A5:
	LDA.w $0030,y
	BEQ.b CODE_AAD9B2
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAD9B2:
	LDA.w $0031,y
	BEQ.b CODE_AAD9C3
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAD9C3:
	LDA.w $0032,y
	BEQ.b CODE_AAD9D0
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAD9D0:
	LDA.w $0033,y
	BEQ.b CODE_AAD9E1
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAD9E1:
	LDA.w $0034,y
	BEQ.b CODE_AAD9F2
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAD9F2:
	LDA.w $0035,y
	BEQ.b CODE_AAD9FF
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAD9FF:
	LDA.w $0036,y
	BEQ.b CODE_AADA10
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AADA10:
	LDA.w $0037,y
	BEQ.b CODE_AADA1D
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AADA1D:
	LDA.w $0038,y
	BEQ.b CODE_AADA2E
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AADA2E:
	REP.b #$20
	RTL

CODE_AADA31:
	SEP.b #$20
	LDA.w $0006,y
	BEQ.b CODE_AADA3C
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AADA3C:
	LDA.w $0007,y
	BEQ.b CODE_AADA4D
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AADA4D:
	LDA.w $0008,y
	BEQ.b CODE_AADA5A
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AADA5A:
	LDA.w $0009,y
	BEQ.b CODE_AADA6B
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AADA6B:
	LDA.w $000A,y
	BEQ.b CODE_AADA78
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AADA78:
	LDA.w $000B,y
	BEQ.b CODE_AADA89
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AADA89:
	LDA.w $000C,y
	BEQ.b CODE_AADA96
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AADA96:
	LDA.w $000D,y
	BEQ.b CODE_AADAA7
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AADAA7:
	LDA.w $000E,y
	BEQ.b CODE_AADAB8
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AADAB8:
	LDA.w $000F,y
	BEQ.b CODE_AADAC5
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AADAC5:
	LDA.w $0010,y
	BEQ.b CODE_AADAD6
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AADAD6:
	LDA.w $0011,y
	BEQ.b CODE_AADAE3
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AADAE3:
	LDA.w $0012,y
	BEQ.b CODE_AADAF4
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AADAF4:
	LDA.w $0013,y
	BEQ.b CODE_AADB01
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AADB01:
	LDA.w $0014,y
	BEQ.b CODE_AADB12
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AADB12:
	LDA.w $0015,y
	BEQ.b CODE_AADB1F
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AADB1F:
	LDA.w $0016,y
	BEQ.b CODE_AADB30
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AADB30:
	LDA.w $0017,y
	BEQ.b CODE_AADB3D
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AADB3D:
	LDA.w $0018,y
	BEQ.b CODE_AADB4E
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AADB4E:
	LDA.w $0019,y
	BEQ.b CODE_AADB5B
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AADB5B:
	LDA.w $001A,y
	BEQ.b CODE_AADB6C
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AADB6C:
	LDA.w $001B,y
	BEQ.b CODE_AADB79
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AADB79:
	LDA.w $001C,y
	BEQ.b CODE_AADB8A
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AADB8A:
	LDA.w $001D,y
	BEQ.b CODE_AADB9B
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AADB9B:
	LDA.w $001E,y
	BEQ.b CODE_AADBA8
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AADBA8:
	LDA.w $001F,y
	BEQ.b CODE_AADBB9
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AADBB9:
	LDA.w $0020,y
	BEQ.b CODE_AADBC6
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AADBC6:
	LDA.w $0021,y
	BEQ.b CODE_AADBD7
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AADBD7:
	LDA.w $0022,y
	BEQ.b CODE_AADBE4
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AADBE4:
	LDA.w $0023,y
	BEQ.b CODE_AADBF5
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AADBF5:
	LDA.w $0024,y
	BEQ.b CODE_AADC02
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AADC02:
	LDA.w $0025,y
	BEQ.b CODE_AADC13
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AADC13:
	LDA.w $0026,y
	BEQ.b CODE_AADC20
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AADC20:
	LDA.w $0027,y
	BEQ.b CODE_AADC31
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AADC31:
	LDA.w $0028,y
	BEQ.b CODE_AADC3E
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AADC3E:
	LDA.w $0029,y
	BEQ.b CODE_AADC4F
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AADC4F:
	LDA.w $002A,y
	BEQ.b CODE_AADC5C
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AADC5C:
	LDA.w $002B,y
	BEQ.b CODE_AADC6D
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AADC6D:
	LDA.w $002C,y
	BEQ.b CODE_AADC7E
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AADC7E:
	LDA.w $002D,y
	BEQ.b CODE_AADC8B
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AADC8B:
	LDA.w $002E,y
	BEQ.b CODE_AADC9C
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AADC9C:
	LDA.w $002F,y
	BEQ.b CODE_AADCA9
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AADCA9:
	LDA.w $0030,y
	BEQ.b CODE_AADCBA
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AADCBA:
	LDA.w $0031,y
	BEQ.b CODE_AADCC7
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AADCC7:
	LDA.w $0032,y
	BEQ.b CODE_AADCD8
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AADCD8:
	LDA.w $0033,y
	BEQ.b CODE_AADCE5
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AADCE5:
	LDA.w $0034,y
	BEQ.b CODE_AADCF6
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AADCF6:
	LDA.w $0035,y
	BEQ.b CODE_AADD03
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AADD03:
	LDA.w $0036,y
	BEQ.b CODE_AADD14
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AADD14:
	LDA.w $0037,y
	BEQ.b CODE_AADD21
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AADD21:
	LDA.w $0038,y
	BEQ.b CODE_AADD32
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AADD32:
	REP.b #$20
	RTL

CODE_AADD35:
	SEP.b #$20
	LDA.w $0006,y
	BEQ.b CODE_AADD40
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AADD40:
	LDA.w $0007,y
	BEQ.b CODE_AADD4D
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AADD4D:
	LDA.w $0008,y
	BEQ.b CODE_AADD5E
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AADD5E:
	LDA.w $0009,y
	BEQ.b CODE_AADD6B
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AADD6B:
	LDA.w $000A,y
	BEQ.b CODE_AADD7C
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AADD7C:
	LDA.w $000B,y
	BEQ.b CODE_AADD8D
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AADD8D:
	LDA.w $000C,y
	BEQ.b CODE_AADD9A
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AADD9A:
	LDA.w $000D,y
	BEQ.b CODE_AADDAB
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AADDAB:
	LDA.w $000E,y
	BEQ.b CODE_AADDB8
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AADDB8:
	LDA.w $000F,y
	BEQ.b CODE_AADDC9
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AADDC9:
	LDA.w $0010,y
	BEQ.b CODE_AADDD6
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AADDD6:
	LDA.w $0011,y
	BEQ.b CODE_AADDE7
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AADDE7:
	LDA.w $0012,y
	BEQ.b CODE_AADDF8
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AADDF8:
	LDA.w $0013,y
	BEQ.b CODE_AADE05
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AADE05:
	LDA.w $0014,y
	BEQ.b CODE_AADE16
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AADE16:
	LDA.w $0015,y
	BEQ.b CODE_AADE23
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AADE23:
	LDA.w $0016,y
	BEQ.b CODE_AADE34
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AADE34:
	LDA.w $0017,y
	BEQ.b CODE_AADE45
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AADE45:
	LDA.w $0018,y
	BEQ.b CODE_AADE52
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AADE52:
	LDA.w $0019,y
	BEQ.b CODE_AADE63
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AADE63:
	LDA.w $001A,y
	BEQ.b CODE_AADE70
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AADE70:
	LDA.w $001B,y
	BEQ.b CODE_AADE81
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AADE81:
	LDA.w $001C,y
	BEQ.b CODE_AADE8E
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AADE8E:
	LDA.w $001D,y
	BEQ.b CODE_AADE9F
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AADE9F:
	LDA.w $001E,y
	BEQ.b CODE_AADEB0
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
CODE_AADEB0:
	LDA.w $001F,y
	BEQ.b CODE_AADEBD
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AADEBD:
	LDA.w $0020,y
	BEQ.b CODE_AADECE
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AADECE:
	LDA.w $0021,y
	BEQ.b CODE_AADEDB
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AADEDB:
	LDA.w $0022,y
	BEQ.b CODE_AADEEC
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AADEEC:
	LDA.w $0023,y
	BEQ.b CODE_AADEFD
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AADEFD:
	LDA.w $0024,y
	BEQ.b CODE_AADF0A
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AADF0A:
	LDA.w $0025,y
	BEQ.b CODE_AADF1B
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AADF1B:
	LDA.w $0026,y
	BEQ.b CODE_AADF28
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AADF28:
	LDA.w $0027,y
	BEQ.b CODE_AADF39
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AADF39:
	LDA.w $0028,y
	BEQ.b CODE_AADF4A
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AADF4A:
	LDA.w $0029,y
	BEQ.b CODE_AADF57
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AADF57:
	LDA.w $002A,y
	BEQ.b CODE_AADF68
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AADF68:
	LDA.w $002B,y
	BEQ.b CODE_AADF75
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AADF75:
	LDA.w $002C,y
	BEQ.b CODE_AADF86
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AADF86:
	LDA.w $002D,y
	BEQ.b CODE_AADF93
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AADF93:
	LDA.w $002E,y
	BEQ.b CODE_AADFA4
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AADFA4:
	LDA.w $002F,y
	BEQ.b CODE_AADFB5
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AADFB5:
	LDA.w $0030,y
	BEQ.b CODE_AADFC2
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AADFC2:
	LDA.w $0031,y
	BEQ.b CODE_AADFD3
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AADFD3:
	LDA.w $0032,y
	BEQ.b CODE_AADFE0
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AADFE0:
	LDA.w $0033,y
	BEQ.b CODE_AADFF1
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AADFF1:
	LDA.w $0034,y
	BEQ.b CODE_AAE002
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAE002:
	LDA.w $0035,y
	BEQ.b CODE_AAE00F
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAE00F:
	LDA.w $0036,y
	BEQ.b CODE_AAE020
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAE020:
	LDA.w $0037,y
	BEQ.b CODE_AAE02D
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AAE02D:
	LDA.w $0038,y
	BEQ.b CODE_AAE036
	STA.l $7F3F80,x
CODE_AAE036:
	REP.b #$20
	RTL

CODE_AAE039:
	SEP.b #$20
	LDA.w $0007,y
	BEQ.b CODE_AAE048
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAE048:
	LDA.w $0008,y
	BEQ.b CODE_AAE059
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAE059:
	LDA.w $0009,y
	BEQ.b CODE_AAE06A
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAE06A:
	LDA.w $000A,y
	BEQ.b CODE_AAE077
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAE077:
	LDA.w $000B,y
	BEQ.b CODE_AAE088
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAE088:
	LDA.w $000C,y
	BEQ.b CODE_AAE095
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAE095:
	LDA.w $000D,y
	BEQ.b CODE_AAE0A6
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAE0A6:
	LDA.w $000E,y
	BEQ.b CODE_AAE0B7
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAE0B7:
	LDA.w $000F,y
	BEQ.b CODE_AAE0C4
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAE0C4:
	LDA.w $0010,y
	BEQ.b CODE_AAE0D5
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAE0D5:
	LDA.w $0011,y
	BEQ.b CODE_AAE0E6
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AAE0E6:
	LDA.w $0012,y
	BEQ.b CODE_AAE0F3
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AAE0F3:
	LDA.w $0013,y
	BEQ.b CODE_AAE104
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAE104:
	LDA.w $0014,y
	BEQ.b CODE_AAE111
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAE111:
	LDA.w $0015,y
	BEQ.b CODE_AAE122
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAE122:
	LDA.w $0016,y
	BEQ.b CODE_AAE133
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAE133:
	LDA.w $0017,y
	BEQ.b CODE_AAE140
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAE140:
	LDA.w $0018,y
	BEQ.b CODE_AAE151
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AAE151:
	LDA.w $0019,y
	BEQ.b CODE_AAE15E
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAE15E:
	LDA.w $001A,y
	BEQ.b CODE_AAE16F
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAE16F:
	LDA.w $001B,y
	BEQ.b CODE_AAE180
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AAE180:
	LDA.w $001C,y
	BEQ.b CODE_AAE18D
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AAE18D:
	LDA.w $001D,y
	BEQ.b CODE_AAE19E
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAE19E:
	LDA.w $001E,y
	BEQ.b CODE_AAE1AB
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAE1AB:
	LDA.w $001F,y
	BEQ.b CODE_AAE1BC
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAE1BC:
	LDA.w $0020,y
	BEQ.b CODE_AAE1CD
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AAE1CD:
	LDA.w $0021,y
	BEQ.b CODE_AAE1DA
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAE1DA:
	LDA.w $0022,y
	BEQ.b CODE_AAE1EB
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAE1EB:
	LDA.w $0023,y
	BEQ.b CODE_AAE1FC
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAE1FC:
	LDA.w $0024,y
	BEQ.b CODE_AAE209
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAE209:
	LDA.w $0025,y
	BEQ.b CODE_AAE21A
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAE21A:
	LDA.w $0026,y
	BEQ.b CODE_AAE227
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAE227:
	LDA.w $0027,y
	BEQ.b CODE_AAE238
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAE238:
	LDA.w $0028,y
	BEQ.b CODE_AAE249
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAE249:
	LDA.w $0029,y
	BEQ.b CODE_AAE256
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAE256:
	LDA.w $002A,y
	BEQ.b CODE_AAE267
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAE267:
	LDA.w $002B,y
	BEQ.b CODE_AAE274
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAE274:
	LDA.w $002C,y
	BEQ.b CODE_AAE285
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAE285:
	LDA.w $002D,y
	BEQ.b CODE_AAE296
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAE296:
	LDA.w $002E,y
	BEQ.b CODE_AAE2A3
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAE2A3:
	LDA.w $002F,y
	BEQ.b CODE_AAE2B4
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAE2B4:
	LDA.w $0030,y
	BEQ.b CODE_AAE2C1
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AAE2C1:
	LDA.w $0031,y
	BEQ.b CODE_AAE2D2
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAE2D2:
	LDA.w $0032,y
	BEQ.b CODE_AAE2E3
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAE2E3:
	LDA.w $0033,y
	BEQ.b CODE_AAE2F0
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAE2F0:
	LDA.w $0034,y
	BEQ.b CODE_AAE301
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAE301:
	LDA.w $0035,y
	BEQ.b CODE_AAE312
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAE312:
	LDA.w $0036,y
	BEQ.b CODE_AAE31F
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAE31F:
	LDA.w $0037,y
	BEQ.b CODE_AAE330
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAE330:
	REP.b #$20
	RTL

CODE_AAE333:
	SEP.b #$20
	LDA.w $0007,y
	BEQ.b CODE_AAE342
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAE342:
	LDA.w $0008,y
	BEQ.b CODE_AAE34F
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAE34F:
	LDA.w $0009,y
	BEQ.b CODE_AAE360
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAE360:
	LDA.w $000A,y
	BEQ.b CODE_AAE371
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAE371:
	LDA.w $000B,y
	BEQ.b CODE_AAE37E
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAE37E:
	LDA.w $000C,y
	BEQ.b CODE_AAE38F
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAE38F:
	LDA.w $000D,y
	BEQ.b CODE_AAE39C
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAE39C:
	LDA.w $000E,y
	BEQ.b CODE_AAE3AD
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAE3AD:
	LDA.w $000F,y
	BEQ.b CODE_AAE3BE
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAE3BE:
	LDA.w $0010,y
	BEQ.b CODE_AAE3CB
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAE3CB:
	LDA.w $0011,y
	BEQ.b CODE_AAE3DC
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAE3DC:
	LDA.w $0012,y
	BEQ.b CODE_AAE3ED
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AAE3ED:
	LDA.w $0013,y
	BEQ.b CODE_AAE3FA
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAE3FA:
	LDA.w $0014,y
	BEQ.b CODE_AAE40B
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAE40B:
	LDA.w $0015,y
	BEQ.b CODE_AAE41C
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAE41C:
	LDA.w $0016,y
	BEQ.b CODE_AAE429
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AAE429:
	LDA.w $0017,y
	BEQ.b CODE_AAE43A
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAE43A:
	LDA.w $0018,y
	BEQ.b CODE_AAE447
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAE447:
	LDA.w $0019,y
	BEQ.b CODE_AAE458
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAE458:
	LDA.w $001A,y
	BEQ.b CODE_AAE469
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AAE469:
	LDA.w $001B,y
	BEQ.b CODE_AAE476
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAE476:
	LDA.w $001C,y
	BEQ.b CODE_AAE487
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AAE487:
	LDA.w $001D,y
	BEQ.b CODE_AAE498
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_AAE498:
	LDA.w $001E,y
	BEQ.b CODE_AAE4A5
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAE4A5:
	LDA.w $001F,y
	BEQ.b CODE_AAE4B6
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAE4B6:
	LDA.w $0020,y
	BEQ.b CODE_AAE4C7
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AAE4C7:
	LDA.w $0021,y
	BEQ.b CODE_AAE4D4
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAE4D4:
	LDA.w $0022,y
	BEQ.b CODE_AAE4E5
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAE4E5:
	LDA.w $0023,y
	BEQ.b CODE_AAE4F6
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAE4F6:
	LDA.w $0024,y
	BEQ.b CODE_AAE503
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAE503:
	LDA.w $0025,y
	BEQ.b CODE_AAE514
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAE514:
	LDA.w $0026,y
	BEQ.b CODE_AAE521
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAE521:
	LDA.w $0027,y
	BEQ.b CODE_AAE532
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAE532:
	LDA.w $0028,y
	BEQ.b CODE_AAE543
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAE543:
	LDA.w $0029,y
	BEQ.b CODE_AAE550
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAE550:
	LDA.w $002A,y
	BEQ.b CODE_AAE561
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAE561:
	LDA.w $002B,y
	BEQ.b CODE_AAE572
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAE572:
	LDA.w $002C,y
	BEQ.b CODE_AAE57F
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAE57F:
	LDA.w $002D,y
	BEQ.b CODE_AAE590
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAE590:
	LDA.w $002E,y
	BEQ.b CODE_AAE5A1
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAE5A1:
	LDA.w $002F,y
	BEQ.b CODE_AAE5AE
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAE5AE:
	LDA.w $0030,y
	BEQ.b CODE_AAE5BF
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAE5BF:
	LDA.w $0031,y
	BEQ.b CODE_AAE5CC
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAE5CC:
	LDA.w $0032,y
	BEQ.b CODE_AAE5DD
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAE5DD:
	LDA.w $0033,y
	BEQ.b CODE_AAE5EE
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAE5EE:
	LDA.w $0034,y
	BEQ.b CODE_AAE5FB
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAE5FB:
	LDA.w $0035,y
	BEQ.b CODE_AAE60C
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAE60C:
	LDA.w $0036,y
	BEQ.b CODE_AAE61D
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAE61D:
	LDA.w $0037,y
	BEQ.b CODE_AAE62A
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAE62A:
	REP.b #$20
	RTL

CODE_AAE62D:
	SEP.b #$20
	LDA.w $0007,y
	BEQ.b CODE_AAE638
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAE638:
	LDA.w $0008,y
	BEQ.b CODE_AAE645
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAE645:
	LDA.w $0009,y
	BEQ.b CODE_AAE656
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAE656:
	LDA.w $000A,y
	BEQ.b CODE_AAE667
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AAE667:
	LDA.w $000B,y
	BEQ.b CODE_AAE674
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAE674:
	LDA.w $000C,y
	BEQ.b CODE_AAE685
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAE685:
	LDA.w $000D,y
	BEQ.b CODE_AAE696
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAE696:
	LDA.w $000E,y
	BEQ.b CODE_AAE6A3
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAE6A3:
	LDA.w $000F,y
	BEQ.b CODE_AAE6B4
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAE6B4:
	LDA.w $0010,y
	BEQ.b CODE_AAE6C5
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAE6C5:
	LDA.w $0011,y
	BEQ.b CODE_AAE6D2
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAE6D2:
	LDA.w $0012,y
	BEQ.b CODE_AAE6E3
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAE6E3:
	LDA.w $0013,y
	BEQ.b CODE_AAE6F4
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAE6F4:
	LDA.w $0014,y
	BEQ.b CODE_AAE701
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAE701:
	LDA.w $0015,y
	BEQ.b CODE_AAE712
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAE712:
	LDA.w $0016,y
	BEQ.b CODE_AAE723
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AAE723:
	LDA.w $0017,y
	BEQ.b CODE_AAE730
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAE730:
	LDA.w $0018,y
	BEQ.b CODE_AAE741
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAE741:
	LDA.w $0019,y
	BEQ.b CODE_AAE752
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAE752:
	LDA.w $001A,y
	BEQ.b CODE_AAE75F
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAE75F:
	LDA.w $001B,y
	BEQ.b CODE_AAE770
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAE770:
	LDA.w $001C,y
	BEQ.b CODE_AAE781
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AAE781:
	LDA.w $001D,y
	BEQ.b CODE_AAE78E
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAE78E:
	LDA.w $001E,y
	BEQ.b CODE_AAE79F
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAE79F:
	LDA.w $001F,y
	BEQ.b CODE_AAE7B0
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAE7B0:
	LDA.w $0020,y
	BEQ.b CODE_AAE7BD
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAE7BD:
	LDA.w $0021,y
	BEQ.b CODE_AAE7CE
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAE7CE:
	LDA.w $0022,y
	BEQ.b CODE_AAE7DF
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAE7DF:
	LDA.w $0023,y
	BEQ.b CODE_AAE7EC
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AAE7EC:
	LDA.w $0024,y
	BEQ.b CODE_AAE7FD
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAE7FD:
	LDA.w $0025,y
	BEQ.b CODE_AAE80E
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAE80E:
	LDA.w $0026,y
	BEQ.b CODE_AAE81B
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AAE81B:
	LDA.w $0027,y
	BEQ.b CODE_AAE82C
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAE82C:
	LDA.w $0028,y
	BEQ.b CODE_AAE83D
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAE83D:
	LDA.w $0029,y
	BEQ.b CODE_AAE84A
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AAE84A:
	LDA.w $002A,y
	BEQ.b CODE_AAE85B
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAE85B:
	LDA.w $002B,y
	BEQ.b CODE_AAE86C
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAE86C:
	LDA.w $002C,y
	BEQ.b CODE_AAE879
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAE879:
	LDA.w $002D,y
	BEQ.b CODE_AAE88A
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAE88A:
	LDA.w $002E,y
	BEQ.b CODE_AAE89B
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAE89B:
	LDA.w $002F,y
	BEQ.b CODE_AAE8A8
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAE8A8:
	LDA.w $0030,y
	BEQ.b CODE_AAE8B9
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAE8B9:
	LDA.w $0031,y
	BEQ.b CODE_AAE8CA
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAE8CA:
	LDA.w $0032,y
	BEQ.b CODE_AAE8D7
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAE8D7:
	LDA.w $0033,y
	BEQ.b CODE_AAE8E8
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAE8E8:
	LDA.w $0034,y
	BEQ.b CODE_AAE8F9
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAE8F9:
	LDA.w $0035,y
	BEQ.b CODE_AAE906
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAE906:
	LDA.w $0036,y
	BEQ.b CODE_AAE917
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAE917:
	LDA.w $0037,y
	BEQ.b CODE_AAE924
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAE924:
	REP.b #$20
	RTL

CODE_AAE927:
	SEP.b #$20
	LDA.w $0008,y
	BEQ.b CODE_AAE93A
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAE93A:
	LDA.w $0009,y
	BEQ.b CODE_AAE947
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAE947:
	LDA.w $000A,y
	BEQ.b CODE_AAE958
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAE958:
	LDA.w $000B,y
	BEQ.b CODE_AAE969
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAE969:
	LDA.w $000C,y
	BEQ.b CODE_AAE97A
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAE97A:
	LDA.w $000D,y
	BEQ.b CODE_AAE987
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAE987:
	LDA.w $000E,y
	BEQ.b CODE_AAE998
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAE998:
	LDA.w $000F,y
	BEQ.b CODE_AAE9A9
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAE9A9:
	LDA.w $0010,y
	BEQ.b CODE_AAE9B6
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AAE9B6:
	LDA.w $0011,y
	BEQ.b CODE_AAE9C7
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAE9C7:
	LDA.w $0012,y
	BEQ.b CODE_AAE9D8
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAE9D8:
	LDA.w $0013,y
	BEQ.b CODE_AAE9E5
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAE9E5:
	LDA.w $0014,y
	BEQ.b CODE_AAE9F6
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAE9F6:
	LDA.w $0015,y
	BEQ.b CODE_AAEA07
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AAEA07:
	LDA.w $0016,y
	BEQ.b CODE_AAEA14
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAEA14:
	LDA.w $0017,y
	BEQ.b CODE_AAEA25
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAEA25:
	LDA.w $0018,y
	BEQ.b CODE_AAEA36
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAEA36:
	LDA.w $0019,y
	BEQ.b CODE_AAEA47
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AAEA47:
	LDA.w $001A,y
	BEQ.b CODE_AAEA54
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAEA54:
	LDA.w $001B,y
	BEQ.b CODE_AAEA65
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAEA65:
	LDA.w $001C,y
	BEQ.b CODE_AAEA76
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_AAEA76:
	LDA.w $001D,y
	BEQ.b CODE_AAEA83
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAEA83:
	LDA.w $001E,y
	BEQ.b CODE_AAEA94
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAEA94:
	LDA.w $001F,y
	BEQ.b CODE_AAEAA5
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAEAA5:
	LDA.w $0020,y
	BEQ.b CODE_AAEAB2
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAEAB2:
	LDA.w $0021,y
	BEQ.b CODE_AAEAC3
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAEAC3:
	LDA.w $0022,y
	BEQ.b CODE_AAEAD4
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAEAD4:
	LDA.w $0023,y
	BEQ.b CODE_AAEAE5
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAEAE5:
	LDA.w $0024,y
	BEQ.b CODE_AAEAF2
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAEAF2:
	LDA.w $0025,y
	BEQ.b CODE_AAEB03
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAEB03:
	LDA.w $0026,y
	BEQ.b CODE_AAEB14
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAEB14:
	LDA.w $0027,y
	BEQ.b CODE_AAEB21
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAEB21:
	LDA.w $0028,y
	BEQ.b CODE_AAEB32
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAEB32:
	LDA.w $0029,y
	BEQ.b CODE_AAEB43
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAEB43:
	LDA.w $002A,y
	BEQ.b CODE_AAEB50
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AAEB50:
	LDA.w $002B,y
	BEQ.b CODE_AAEB61
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAEB61:
	LDA.w $002C,y
	BEQ.b CODE_AAEB72
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAEB72:
	LDA.w $002D,y
	BEQ.b CODE_AAEB7F
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAEB7F:
	LDA.w $002E,y
	BEQ.b CODE_AAEB90
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAEB90:
	LDA.w $002F,y
	BEQ.b CODE_AAEBA1
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAEBA1:
	LDA.w $0030,y
	BEQ.b CODE_AAEBB2
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAEBB2:
	LDA.w $0031,y
	BEQ.b CODE_AAEBBF
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAEBBF:
	LDA.w $0032,y
	BEQ.b CODE_AAEBD0
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAEBD0:
	LDA.w $0033,y
	BEQ.b CODE_AAEBE1
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAEBE1:
	LDA.w $0034,y
	BEQ.b CODE_AAEBEE
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAEBEE:
	LDA.w $0035,y
	BEQ.b CODE_AAEBFF
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAEBFF:
	LDA.w $0036,y
	BEQ.b CODE_AAEC10
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AAEC10:
	LDA.w $0037,y
	BEQ.b CODE_AAEC19
	STA.l $7F3F80,x
CODE_AAEC19:
	REP.b #$20
	RTL

CODE_AAEC1C:
	SEP.b #$20
	LDA.w $0008,y
	BEQ.b CODE_AAEC2B
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAEC2B:
	LDA.w $0009,y
	BEQ.b CODE_AAEC3C
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAEC3C:
	LDA.w $000A,y
	BEQ.b CODE_AAEC49
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAEC49:
	LDA.w $000B,y
	BEQ.b CODE_AAEC5A
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAEC5A:
	LDA.w $000C,y
	BEQ.b CODE_AAEC6B
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAEC6B:
	LDA.w $000D,y
	BEQ.b CODE_AAEC7C
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAEC7C:
	LDA.w $000E,y
	BEQ.b CODE_AAEC89
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAEC89:
	LDA.w $000F,y
	BEQ.b CODE_AAEC9A
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAEC9A:
	LDA.w $0010,y
	BEQ.b CODE_AAECAB
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AAECAB:
	LDA.w $0011,y
	BEQ.b CODE_AAECBC
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAECBC:
	LDA.w $0012,y
	BEQ.b CODE_AAECC9
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AAECC9:
	LDA.w $0013,y
	BEQ.b CODE_AAECDA
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAECDA:
	LDA.w $0014,y
	BEQ.b CODE_AAECEB
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AAECEB:
	LDA.w $0015,y
	BEQ.b CODE_AAECF8
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAECF8:
	LDA.w $0016,y
	BEQ.b CODE_AAED09
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAED09:
	LDA.w $0017,y
	BEQ.b CODE_AAED1A
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAED1A:
	LDA.w $0018,y
	BEQ.b CODE_AAED2B
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AAED2B:
	LDA.w $0019,y
	BEQ.b CODE_AAED38
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAED38:
	LDA.w $001A,y
	BEQ.b CODE_AAED49
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAED49:
	LDA.w $001B,y
	BEQ.b CODE_AAED5A
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAED5A:
	LDA.w $001C,y
	BEQ.b CODE_AAED67
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAED67:
	LDA.w $001D,y
	BEQ.b CODE_AAED78
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAED78:
	LDA.w $001E,y
	BEQ.b CODE_AAED89
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAED89:
	LDA.w $001F,y
	BEQ.b CODE_AAED9A
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAED9A:
	LDA.w $0020,y
	BEQ.b CODE_AAEDA7
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAEDA7:
	LDA.w $0021,y
	BEQ.b CODE_AAEDB8
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAEDB8:
	LDA.w $0022,y
	BEQ.b CODE_AAEDC9
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAEDC9:
	LDA.w $0023,y
	BEQ.b CODE_AAEDDA
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAEDDA:
	LDA.w $0024,y
	BEQ.b CODE_AAEDE7
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAEDE7:
	LDA.w $0025,y
	BEQ.b CODE_AAEDF8
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAEDF8:
	LDA.w $0026,y
	BEQ.b CODE_AAEE09
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAEE09:
	LDA.w $0027,y
	BEQ.b CODE_AAEE16
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AAEE16:
	LDA.w $0028,y
	BEQ.b CODE_AAEE27
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAEE27:
	LDA.w $0029,y
	BEQ.b CODE_AAEE38
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAEE38:
	LDA.w $002A,y
	BEQ.b CODE_AAEE49
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAEE49:
	LDA.w $002B,y
	BEQ.b CODE_AAEE56
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AAEE56:
	LDA.w $002C,y
	BEQ.b CODE_AAEE67
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAEE67:
	LDA.w $002D,y
	BEQ.b CODE_AAEE78
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAEE78:
	LDA.w $002E,y
	BEQ.b CODE_AAEE85
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAEE85:
	LDA.w $002F,y
	BEQ.b CODE_AAEE96
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAEE96:
	LDA.w $0030,y
	BEQ.b CODE_AAEEA7
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAEEA7:
	LDA.w $0031,y
	BEQ.b CODE_AAEEB8
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AAEEB8:
	LDA.w $0032,y
	BEQ.b CODE_AAEEC5
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAEEC5:
	LDA.w $0033,y
	BEQ.b CODE_AAEED6
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAEED6:
	LDA.w $0034,y
	BEQ.b CODE_AAEEE7
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAEEE7:
	LDA.w $0035,y
	BEQ.b CODE_AAEEF8
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAEEF8:
	LDA.w $0036,y
	BEQ.b CODE_AAEF05
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AAEF05:
	LDA.w $0037,y
	BEQ.b CODE_AAEF0E
	STA.l $7F3F80,x
CODE_AAEF0E:
	REP.b #$20
	RTL

CODE_AAEF11:
	SEP.b #$20
	LDA.w $0008,y
	BEQ.b CODE_AAEF1C
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAEF1C:
	LDA.w $0009,y
	BEQ.b CODE_AAEF2D
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAEF2D:
	LDA.w $000A,y
	BEQ.b CODE_AAEF3E
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAEF3E:
	LDA.w $000B,y
	BEQ.b CODE_AAEF4F
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAEF4F:
	LDA.w $000C,y
	BEQ.b CODE_AAEF5C
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAEF5C:
	LDA.w $000D,y
	BEQ.b CODE_AAEF6D
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AAEF6D:
	LDA.w $000E,y
	BEQ.b CODE_AAEF7E
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AAEF7E:
	LDA.w $000F,y
	BEQ.b CODE_AAEF8F
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAEF8F:
	LDA.w $0010,y
	BEQ.b CODE_AAEF9C
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAEF9C:
	LDA.w $0011,y
	BEQ.b CODE_AAEFAD
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAEFAD:
	LDA.w $0012,y
	BEQ.b CODE_AAEFBE
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AAEFBE:
	LDA.w $0013,y
	BEQ.b CODE_AAEFCF
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AAEFCF:
	LDA.w $0014,y
	BEQ.b CODE_AAEFDC
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAEFDC:
	LDA.w $0015,y
	BEQ.b CODE_AAEFED
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAEFED:
	LDA.w $0016,y
	BEQ.b CODE_AAEFFE
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AAEFFE:
	LDA.w $0017,y
	BEQ.b CODE_AAF00F
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AAF00F:
	LDA.w $0018,y
	BEQ.b CODE_AAF01C
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAF01C:
	LDA.w $0019,y
	BEQ.b CODE_AAF02D
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAF02D:
	LDA.w $001A,y
	BEQ.b CODE_AAF03E
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAF03E:
	LDA.w $001B,y
	BEQ.b CODE_AAF04F
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_AAF04F:
	LDA.w $001C,y
	BEQ.b CODE_AAF05C
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAF05C:
	LDA.w $001D,y
	BEQ.b CODE_AAF06D
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAF06D:
	LDA.w $001E,y
	BEQ.b CODE_AAF07E
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAF07E:
	LDA.w $001F,y
	BEQ.b CODE_AAF08F
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAF08F:
	LDA.w $0020,y
	BEQ.b CODE_AAF09C
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAF09C:
	LDA.w $0021,y
	BEQ.b CODE_AAF0AD
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAF0AD:
	LDA.w $0022,y
	BEQ.b CODE_AAF0BE
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAF0BE:
	LDA.w $0023,y
	BEQ.b CODE_AAF0CF
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAF0CF:
	LDA.w $0024,y
	BEQ.b CODE_AAF0DC
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAF0DC:
	LDA.w $0025,y
	BEQ.b CODE_AAF0ED
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAF0ED:
	LDA.w $0026,y
	BEQ.b CODE_AAF0FE
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAF0FE:
	LDA.w $0027,y
	BEQ.b CODE_AAF10F
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAF10F:
	LDA.w $0028,y
	BEQ.b CODE_AAF11C
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AAF11C:
	LDA.w $0029,y
	BEQ.b CODE_AAF12D
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAF12D:
	LDA.w $002A,y
	BEQ.b CODE_AAF13E
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAF13E:
	LDA.w $002B,y
	BEQ.b CODE_AAF14F
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAF14F:
	LDA.w $002C,y
	BEQ.b CODE_AAF15C
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AAF15C:
	LDA.w $002D,y
	BEQ.b CODE_AAF16D
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAF16D:
	LDA.w $002E,y
	BEQ.b CODE_AAF17E
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAF17E:
	LDA.w $002F,y
	BEQ.b CODE_AAF18F
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AAF18F:
	LDA.w $0030,y
	BEQ.b CODE_AAF19C
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAF19C:
	LDA.w $0031,y
	BEQ.b CODE_AAF1AD
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AAF1AD:
	LDA.w $0032,y
	BEQ.b CODE_AAF1BE
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAF1BE:
	LDA.w $0033,y
	BEQ.b CODE_AAF1CF
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAF1CF:
	LDA.w $0034,y
	BEQ.b CODE_AAF1DC
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAF1DC:
	LDA.w $0035,y
	BEQ.b CODE_AAF1ED
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAF1ED:
	LDA.w $0036,y
	BEQ.b CODE_AAF1FE
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAF1FE:
	REP.b #$20
	RTL

CODE_AAF201:
	SEP.b #$20
	LDA.w $0008,y
	BEQ.b CODE_AAF20C
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAF20C:
	LDA.w $0009,y
	BEQ.b CODE_AAF219
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAF219:
	LDA.w $000A,y
	BEQ.b CODE_AAF22A
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AAF22A:
	LDA.w $000B,y
	BEQ.b CODE_AAF23B
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AAF23B:
	LDA.w $000C,y
	BEQ.b CODE_AAF24C
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AAF24C:
	LDA.w $000D,y
	BEQ.b CODE_AAF259
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAF259:
	LDA.w $000E,y
	BEQ.b CODE_AAF26A
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAF26A:
	LDA.w $000F,y
	BEQ.b CODE_AAF27B
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAF27B:
	LDA.w $0010,y
	BEQ.b CODE_AAF28C
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AAF28C:
	LDA.w $0011,y
	BEQ.b CODE_AAF29D
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AAF29D:
	LDA.w $0012,y
	BEQ.b CODE_AAF2AA
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAF2AA:
	LDA.w $0013,y
	BEQ.b CODE_AAF2BB
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AAF2BB:
	LDA.w $0014,y
	BEQ.b CODE_AAF2CC
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAF2CC:
	LDA.w $0015,y
	BEQ.b CODE_AAF2DD
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AAF2DD:
	LDA.w $0016,y
	BEQ.b CODE_AAF2EA
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAF2EA:
	LDA.w $0017,y
	BEQ.b CODE_AAF2FB
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAF2FB:
	LDA.w $0018,y
	BEQ.b CODE_AAF30C
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAF30C:
	LDA.w $0019,y
	BEQ.b CODE_AAF31D
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAF31D:
	LDA.w $001A,y
	BEQ.b CODE_AAF32E
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_AAF32E:
	LDA.w $001B,y
	BEQ.b CODE_AAF33B
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAF33B:
	LDA.w $001C,y
	BEQ.b CODE_AAF34C
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAF34C:
	LDA.w $001D,y
	BEQ.b CODE_AAF35D
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAF35D:
	LDA.w $001E,y
	BEQ.b CODE_AAF36E
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAF36E:
	LDA.w $001F,y
	BEQ.b CODE_AAF37F
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAF37F:
	LDA.w $0020,y
	BEQ.b CODE_AAF38C
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAF38C:
	LDA.w $0021,y
	BEQ.b CODE_AAF39D
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAF39D:
	LDA.w $0022,y
	BEQ.b CODE_AAF3AE
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAF3AE:
	LDA.w $0023,y
	BEQ.b CODE_AAF3BF
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAF3BF:
	LDA.w $0024,y
	BEQ.b CODE_AAF3CC
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AAF3CC:
	LDA.w $0025,y
	BEQ.b CODE_AAF3DD
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAF3DD:
	LDA.w $0026,y
	BEQ.b CODE_AAF3EE
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAF3EE:
	LDA.w $0027,y
	BEQ.b CODE_AAF3FF
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAF3FF:
	LDA.w $0028,y
	BEQ.b CODE_AAF410
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAF410:
	LDA.w $0029,y
	BEQ.b CODE_AAF41D
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AAF41D:
	LDA.w $002A,y
	BEQ.b CODE_AAF42E
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAF42E:
	LDA.w $002B,y
	BEQ.b CODE_AAF43F
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAF43F:
	LDA.w $002C,y
	BEQ.b CODE_AAF450
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAF450:
	LDA.w $002D,y
	BEQ.b CODE_AAF45D
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AAF45D:
	LDA.w $002E,y
	BEQ.b CODE_AAF46E
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AAF46E:
	LDA.w $002F,y
	BEQ.b CODE_AAF47F
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AAF47F:
	LDA.w $0030,y
	BEQ.b CODE_AAF490
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAF490:
	LDA.w $0031,y
	BEQ.b CODE_AAF4A1
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAF4A1:
	LDA.w $0032,y
	BEQ.b CODE_AAF4AE
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AAF4AE:
	LDA.w $0033,y
	BEQ.b CODE_AAF4BF
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AAF4BF:
	LDA.w $0034,y
	BEQ.b CODE_AAF4D0
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AAF4D0:
	LDA.w $0035,y
	BEQ.b CODE_AAF4E1
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAF4E1:
	LDA.w $0036,y
	BEQ.b CODE_AAF4EE
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAF4EE:
	REP.b #$20
	RTL

CODE_AAF4F1:
	SEP.b #$20
	LDA.w $0009,y
	BEQ.b CODE_AAF504
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AAF504:
	LDA.w $000A,y
	BEQ.b CODE_AAF511
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAF511:
	LDA.w $000B,y
	BEQ.b CODE_AAF522
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAF522:
	LDA.w $000C,y
	BEQ.b CODE_AAF533
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AAF533:
	LDA.w $000D,y
	BEQ.b CODE_AAF544
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AAF544:
	LDA.w $000E,y
	BEQ.b CODE_AAF555
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AAF555:
	LDA.w $000F,y
	BEQ.b CODE_AAF566
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AAF566:
	LDA.w $0010,y
	BEQ.b CODE_AAF573
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAF573:
	LDA.w $0011,y
	BEQ.b CODE_AAF584
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAF584:
	LDA.w $0012,y
	BEQ.b CODE_AAF595
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAF595:
	LDA.w $0013,y
	BEQ.b CODE_AAF5A6
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AAF5A6:
	LDA.w $0014,y
	BEQ.b CODE_AAF5B7
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AAF5B7:
	LDA.w $0015,y
	BEQ.b CODE_AAF5C4
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAF5C4:
	LDA.w $0016,y
	BEQ.b CODE_AAF5D5
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAF5D5:
	LDA.w $0017,y
	BEQ.b CODE_AAF5E6
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAF5E6:
	LDA.w $0018,y
	BEQ.b CODE_AAF5F7
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAF5F7:
	LDA.w $0019,y
	BEQ.b CODE_AAF608
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_AAF608:
	LDA.w $001A,y
	BEQ.b CODE_AAF615
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAF615:
	LDA.w $001B,y
	BEQ.b CODE_AAF626
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAF626:
	LDA.w $001C,y
	BEQ.b CODE_AAF637
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAF637:
	LDA.w $001D,y
	BEQ.b CODE_AAF648
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAF648:
	LDA.w $001E,y
	BEQ.b CODE_AAF659
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAF659:
	LDA.w $001F,y
	BEQ.b CODE_AAF66A
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAF66A:
	LDA.w $0020,y
	BEQ.b CODE_AAF677
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAF677:
	LDA.w $0021,y
	BEQ.b CODE_AAF688
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAF688:
	LDA.w $0022,y
	BEQ.b CODE_AAF699
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAF699:
	LDA.w $0023,y
	BEQ.b CODE_AAF6AA
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAF6AA:
	LDA.w $0024,y
	BEQ.b CODE_AAF6BB
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAF6BB:
	LDA.w $0025,y
	BEQ.b CODE_AAF6C8
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AAF6C8:
	LDA.w $0026,y
	BEQ.b CODE_AAF6D9
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAF6D9:
	LDA.w $0027,y
	BEQ.b CODE_AAF6EA
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAF6EA:
	LDA.w $0028,y
	BEQ.b CODE_AAF6FB
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAF6FB:
	LDA.w $0029,y
	BEQ.b CODE_AAF70C
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AAF70C:
	LDA.w $002A,y
	BEQ.b CODE_AAF719
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AAF719:
	LDA.w $002B,y
	BEQ.b CODE_AAF72A
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AAF72A:
	LDA.w $002C,y
	BEQ.b CODE_AAF73B
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAF73B:
	LDA.w $002D,y
	BEQ.b CODE_AAF74C
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAF74C:
	LDA.w $002E,y
	BEQ.b CODE_AAF75D
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAF75D:
	LDA.w $002F,y
	BEQ.b CODE_AAF76E
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAF76E:
	LDA.w $0030,y
	BEQ.b CODE_AAF77B
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AAF77B:
	LDA.w $0031,y
	BEQ.b CODE_AAF78C
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AAF78C:
	LDA.w $0032,y
	BEQ.b CODE_AAF79D
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AAF79D:
	LDA.w $0033,y
	BEQ.b CODE_AAF7AE
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAF7AE:
	LDA.w $0034,y
	BEQ.b CODE_AAF7BF
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAF7BF:
	LDA.w $0035,y
	BEQ.b CODE_AAF7CC
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AAF7CC:
	LDA.w $0036,y
	BEQ.b CODE_AAF7D9
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAF7D9:
	REP.b #$20
	RTL

CODE_AAF7DC:
	SEP.b #$20
	LDA.w $0009,y
	BEQ.b CODE_AAF7EB
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AAF7EB:
	LDA.w $000A,y
	BEQ.b CODE_AAF7FC
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AAF7FC:
	LDA.w $000B,y
	BEQ.b CODE_AAF80D
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AAF80D:
	LDA.w $000C,y
	BEQ.b CODE_AAF81A
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAF81A:
	LDA.w $000D,y
	BEQ.b CODE_AAF82B
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAF82B:
	LDA.w $000E,y
	BEQ.b CODE_AAF83C
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAF83C:
	LDA.w $000F,y
	BEQ.b CODE_AAF84D
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAF84D:
	LDA.w $0010,y
	BEQ.b CODE_AAF85E
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AAF85E:
	LDA.w $0011,y
	BEQ.b CODE_AAF86F
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AAF86F:
	LDA.w $0012,y
	BEQ.b CODE_AAF880
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AAF880:
	LDA.w $0013,y
	BEQ.b CODE_AAF88D
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAF88D:
	LDA.w $0014,y
	BEQ.b CODE_AAF89E
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAF89E:
	LDA.w $0015,y
	BEQ.b CODE_AAF8AF
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAF8AF:
	LDA.w $0016,y
	BEQ.b CODE_AAF8C0
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAF8C0:
	LDA.w $0017,y
	BEQ.b CODE_AAF8D1
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAF8D1:
	LDA.w $0018,y
	BEQ.b CODE_AAF8E2
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_AAF8E2:
	LDA.w $0019,y
	BEQ.b CODE_AAF8EF
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AAF8EF:
	LDA.w $001A,y
	BEQ.b CODE_AAF900
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAF900:
	LDA.w $001B,y
	BEQ.b CODE_AAF911
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAF911:
	LDA.w $001C,y
	BEQ.b CODE_AAF922
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAF922:
	LDA.w $001D,y
	BEQ.b CODE_AAF933
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAF933:
	LDA.w $001E,y
	BEQ.b CODE_AAF944
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAF944:
	LDA.w $001F,y
	BEQ.b CODE_AAF955
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAF955:
	LDA.w $0020,y
	BEQ.b CODE_AAF962
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAF962:
	LDA.w $0021,y
	BEQ.b CODE_AAF973
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAF973:
	LDA.w $0022,y
	BEQ.b CODE_AAF984
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAF984:
	LDA.w $0023,y
	BEQ.b CODE_AAF995
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAF995:
	LDA.w $0024,y
	BEQ.b CODE_AAF9A6
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAF9A6:
	LDA.w $0025,y
	BEQ.b CODE_AAF9B7
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAF9B7:
	LDA.w $0026,y
	BEQ.b CODE_AAF9C4
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AAF9C4:
	LDA.w $0027,y
	BEQ.b CODE_AAF9D5
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AAF9D5:
	LDA.w $0028,y
	BEQ.b CODE_AAF9E6
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAF9E6:
	LDA.w $0029,y
	BEQ.b CODE_AAF9F7
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AAF9F7:
	LDA.w $002A,y
	BEQ.b CODE_AAFA08
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAFA08:
	LDA.w $002B,y
	BEQ.b CODE_AAFA19
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAFA19:
	LDA.w $002C,y
	BEQ.b CODE_AAFA26
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AAFA26:
	LDA.w $002D,y
	BEQ.b CODE_AAFA37
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AAFA37:
	LDA.w $002E,y
	BEQ.b CODE_AAFA48
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AAFA48:
	LDA.w $002F,y
	BEQ.b CODE_AAFA59
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AAFA59:
	LDA.w $0030,y
	BEQ.b CODE_AAFA6A
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAFA6A:
	LDA.w $0031,y
	BEQ.b CODE_AAFA7B
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAFA7B:
	LDA.w $0032,y
	BEQ.b CODE_AAFA8C
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAFA8C:
	LDA.w $0033,y
	BEQ.b CODE_AAFA99
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AAFA99:
	LDA.w $0034,y
	BEQ.b CODE_AAFAAA
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AAFAAA:
	LDA.w $0035,y
	BEQ.b CODE_AAFABB
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AAFABB:
	LDA.w $0036,y
	BEQ.b CODE_AAFAC4
	STA.l $7F3F80,x
CODE_AAFAC4:
	REP.b #$20
	RTL

CODE_AAFAC7:
	SEP.b #$20
	LDA.w $0009,y
	BEQ.b CODE_AAFAD2
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AAFAD2:
	LDA.w $000A,y
	BEQ.b CODE_AAFAE3
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AAFAE3:
	LDA.w $000B,y
	BEQ.b CODE_AAFAF4
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AAFAF4:
	LDA.w $000C,y
	BEQ.b CODE_AAFB05
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AAFB05:
	LDA.w $000D,y
	BEQ.b CODE_AAFB16
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AAFB16:
	LDA.w $000E,y
	BEQ.b CODE_AAFB27
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AAFB27:
	LDA.w $000F,y
	BEQ.b CODE_AAFB38
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AAFB38:
	LDA.w $0010,y
	BEQ.b CODE_AAFB45
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AAFB45:
	LDA.w $0011,y
	BEQ.b CODE_AAFB56
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AAFB56:
	LDA.w $0012,y
	BEQ.b CODE_AAFB67
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AAFB67:
	LDA.w $0013,y
	BEQ.b CODE_AAFB78
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AAFB78:
	LDA.w $0014,y
	BEQ.b CODE_AAFB89
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AAFB89:
	LDA.w $0015,y
	BEQ.b CODE_AAFB9A
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AAFB9A:
	LDA.w $0016,y
	BEQ.b CODE_AAFBAB
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AAFBAB:
	LDA.w $0017,y
	BEQ.b CODE_AAFBBC
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AAFBBC:
	LDA.w $0018,y
	BEQ.b CODE_AAFBC9
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AAFBC9:
	LDA.w $0019,y
	BEQ.b CODE_AAFBDA
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AAFBDA:
	LDA.w $001A,y
	BEQ.b CODE_AAFBEB
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AAFBEB:
	LDA.w $001B,y
	BEQ.b CODE_AAFBFC
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AAFBFC:
	LDA.w $001C,y
	BEQ.b CODE_AAFC0D
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AAFC0D:
	LDA.w $001D,y
	BEQ.b CODE_AAFC1E
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AAFC1E:
	LDA.w $001E,y
	BEQ.b CODE_AAFC2F
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AAFC2F:
	LDA.w $001F,y
	BEQ.b CODE_AAFC40
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AAFC40:
	LDA.w $0020,y
	BEQ.b CODE_AAFC4D
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AAFC4D:
	LDA.w $0021,y
	BEQ.b CODE_AAFC5E
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AAFC5E:
	LDA.w $0022,y
	BEQ.b CODE_AAFC6F
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AAFC6F:
	LDA.w $0023,y
	BEQ.b CODE_AAFC80
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AAFC80:
	LDA.w $0024,y
	BEQ.b CODE_AAFC91
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AAFC91:
	LDA.w $0025,y
	BEQ.b CODE_AAFCA2
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AAFCA2:
	LDA.w $0026,y
	BEQ.b CODE_AAFCB3
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AAFCB3:
	LDA.w $0027,y
	BEQ.b CODE_AAFCC4
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AAFCC4:
	LDA.w $0028,y
	BEQ.b CODE_AAFCD1
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AAFCD1:
	LDA.w $0029,y
	BEQ.b CODE_AAFCE2
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AAFCE2:
	LDA.w $002A,y
	BEQ.b CODE_AAFCF3
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AAFCF3:
	LDA.w $002B,y
	BEQ.b CODE_AAFD04
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AAFD04:
	LDA.w $002C,y
	BEQ.b CODE_AAFD15
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AAFD15:
	LDA.w $002D,y
	BEQ.b CODE_AAFD26
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AAFD26:
	LDA.w $002E,y
	BEQ.b CODE_AAFD37
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AAFD37:
	LDA.w $002F,y
	BEQ.b CODE_AAFD48
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AAFD48:
	LDA.w $0030,y
	BEQ.b CODE_AAFD55
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AAFD55:
	LDA.w $0031,y
	BEQ.b CODE_AAFD66
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AAFD66:
	LDA.w $0032,y
	BEQ.b CODE_AAFD77
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AAFD77:
	LDA.w $0033,y
	BEQ.b CODE_AAFD88
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AAFD88:
	LDA.w $0034,y
	BEQ.b CODE_AAFD99
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AAFD99:
	LDA.w $0035,y
	BEQ.b CODE_AAFDAA
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AAFDAA:
	REP.b #$20
	RTL

CODE_AAFDAD:
	REP.b #$20
	RTL

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

JP_Palette_InteriorAreas:
;$AAFDB0
	incbin "Palettes/Compressed/InteriorAreas.bin"

UNK_AAFFE2:
	%InsertGarbageData($AAFFE2, incbin, DATA_AAFFE2.bin)

%BANK_END(<EndBank>)
endmacro

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

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

CODE_AB8000:
	SEP.b #$20
	LDA.w $0009,y
	BEQ.b CODE_AB800B
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AB800B:
	LDA.w $000A,y
	BEQ.b CODE_AB8018
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AB8018:
	LDA.w $000B,y
	BEQ.b CODE_AB8029
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AB8029:
	LDA.w $000C,y
	BEQ.b CODE_AB803A
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AB803A:
	LDA.w $000D,y
	BEQ.b CODE_AB804B
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AB804B:
	LDA.w $000E,y
	BEQ.b CODE_AB805C
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AB805C:
	LDA.w $000F,y
	BEQ.b CODE_AB806D
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AB806D:
	LDA.w $0010,y
	BEQ.b CODE_AB807E
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AB807E:
	LDA.w $0011,y
	BEQ.b CODE_AB808F
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AB808F:
	LDA.w $0012,y
	BEQ.b CODE_AB80A0
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AB80A0:
	LDA.w $0013,y
	BEQ.b CODE_AB80B1
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AB80B1:
	LDA.w $0014,y
	BEQ.b CODE_AB80C2
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AB80C2:
	LDA.w $0015,y
	BEQ.b CODE_AB80CF
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AB80CF:
	LDA.w $0016,y
	BEQ.b CODE_AB80E0
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AB80E0:
	LDA.w $0017,y
	BEQ.b CODE_AB80F1
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AB80F1:
	LDA.w $0018,y
	BEQ.b CODE_AB8102
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB8102:
	LDA.w $0019,y
	BEQ.b CODE_AB8113
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB8113:
	LDA.w $001A,y
	BEQ.b CODE_AB8124
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB8124:
	LDA.w $001B,y
	BEQ.b CODE_AB8135
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB8135:
	LDA.w $001C,y
	BEQ.b CODE_AB8146
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB8146:
	LDA.w $001D,y
	BEQ.b CODE_AB8157
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB8157:
	LDA.w $001E,y
	BEQ.b CODE_AB8168
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB8168:
	LDA.w $001F,y
	BEQ.b CODE_AB8179
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB8179:
	LDA.w $0020,y
	BEQ.b CODE_AB8186
	STA.l $7F2080,x
	STA.l $7F2100,x
CODE_AB8186:
	LDA.w $0021,y
	BEQ.b CODE_AB8197
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_AB8197:
	LDA.w $0022,y
	BEQ.b CODE_AB81A8
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AB81A8:
	LDA.w $0023,y
	BEQ.b CODE_AB81B9
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AB81B9:
	LDA.w $0024,y
	BEQ.b CODE_AB81CA
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AB81CA:
	LDA.w $0025,y
	BEQ.b CODE_AB81DB
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AB81DB:
	LDA.w $0026,y
	BEQ.b CODE_AB81EC
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AB81EC:
	LDA.w $0027,y
	BEQ.b CODE_AB81FD
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AB81FD:
	LDA.w $0028,y
	BEQ.b CODE_AB820E
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AB820E:
	LDA.w $0029,y
	BEQ.b CODE_AB821F
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AB821F:
	LDA.w $002A,y
	BEQ.b CODE_AB8230
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AB8230:
	LDA.w $002B,y
	BEQ.b CODE_AB823D
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AB823D:
	LDA.w $002C,y
	BEQ.b CODE_AB824E
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AB824E:
	LDA.w $002D,y
	BEQ.b CODE_AB825F
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AB825F:
	LDA.w $002E,y
	BEQ.b CODE_AB8270
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AB8270:
	LDA.w $002F,y
	BEQ.b CODE_AB8281
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AB8281:
	LDA.w $0030,y
	BEQ.b CODE_AB8292
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AB8292:
	LDA.w $0031,y
	BEQ.b CODE_AB82A3
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AB82A3:
	LDA.w $0032,y
	BEQ.b CODE_AB82B4
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AB82B4:
	LDA.w $0033,y
	BEQ.b CODE_AB82C5
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AB82C5:
	LDA.w $0034,y
	BEQ.b CODE_AB82D6
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AB82D6:
	LDA.w $0035,y
	BEQ.b CODE_AB82E3
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB82E3:
	REP.b #$20
	RTL

CODE_AB82E6:
	SEP.b #$20
	LDA.w $000A,y
	BEQ.b CODE_AB82F9
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AB82F9:
	LDA.w $000B,y
	BEQ.b CODE_AB830A
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AB830A:
	LDA.w $000C,y
	BEQ.b CODE_AB831B
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AB831B:
	LDA.w $000D,y
	BEQ.b CODE_AB832C
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AB832C:
	LDA.w $000E,y
	BEQ.b CODE_AB833D
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AB833D:
	LDA.w $000F,y
	BEQ.b CODE_AB834E
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AB834E:
	LDA.w $0010,y
	BEQ.b CODE_AB835F
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AB835F:
	LDA.w $0011,y
	BEQ.b CODE_AB836C
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AB836C:
	LDA.w $0012,y
	BEQ.b CODE_AB837D
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AB837D:
	LDA.w $0013,y
	BEQ.b CODE_AB838E
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AB838E:
	LDA.w $0014,y
	BEQ.b CODE_AB839F
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AB839F:
	LDA.w $0015,y
	BEQ.b CODE_AB83B0
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AB83B0:
	LDA.w $0016,y
	BEQ.b CODE_AB83C1
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AB83C1:
	LDA.w $0017,y
	BEQ.b CODE_AB83D2
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AB83D2:
	LDA.w $0018,y
	BEQ.b CODE_AB83E3
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB83E3:
	LDA.w $0019,y
	BEQ.b CODE_AB83F4
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB83F4:
	LDA.w $001A,y
	BEQ.b CODE_AB8405
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB8405:
	LDA.w $001B,y
	BEQ.b CODE_AB8416
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB8416:
	LDA.w $001C,y
	BEQ.b CODE_AB8427
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB8427:
	LDA.w $001D,y
	BEQ.b CODE_AB8438
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB8438:
	LDA.w $001E,y
	BEQ.b CODE_AB8449
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB8449:
	LDA.w $001F,y
	BEQ.b CODE_AB845A
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB845A:
	LDA.w $0020,y
	BEQ.b CODE_AB846B
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB846B:
	LDA.w $0021,y
	BEQ.b CODE_AB847C
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AB847C:
	LDA.w $0022,y
	BEQ.b CODE_AB8489
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_AB8489:
	LDA.w $0023,y
	BEQ.b CODE_AB849A
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_AB849A:
	LDA.w $0024,y
	BEQ.b CODE_AB84AB
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_AB84AB:
	LDA.w $0025,y
	BEQ.b CODE_AB84BC
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_AB84BC:
	LDA.w $0026,y
	BEQ.b CODE_AB84CD
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AB84CD:
	LDA.w $0027,y
	BEQ.b CODE_AB84DE
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AB84DE:
	LDA.w $0028,y
	BEQ.b CODE_AB84EF
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AB84EF:
	LDA.w $0029,y
	BEQ.b CODE_AB8500
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AB8500:
	LDA.w $002A,y
	BEQ.b CODE_AB8511
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AB8511:
	LDA.w $002B,y
	BEQ.b CODE_AB8522
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AB8522:
	LDA.w $002C,y
	BEQ.b CODE_AB8533
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AB8533:
	LDA.w $002D,y
	BEQ.b CODE_AB8544
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AB8544:
	LDA.w $002E,y
	BEQ.b CODE_AB8555
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AB8555:
	LDA.w $002F,y
	BEQ.b CODE_AB8566
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AB8566:
	LDA.w $0030,y
	BEQ.b CODE_AB8577
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AB8577:
	LDA.w $0031,y
	BEQ.b CODE_AB8588
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AB8588:
	LDA.w $0032,y
	BEQ.b CODE_AB8599
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AB8599:
	LDA.w $0033,y
	BEQ.b CODE_AB85AA
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AB85AA:
	LDA.w $0034,y
	BEQ.b CODE_AB85B7
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AB85B7:
	LDA.w $0035,y
	BEQ.b CODE_AB85C4
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB85C4:
	REP.b #$20
	RTL

CODE_AB85C7:
	SEP.b #$20
	LDA.w $000A,y
	BEQ.b CODE_AB85D6
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AB85D6:
	LDA.w $000B,y
	BEQ.b CODE_AB85E7
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AB85E7:
	LDA.w $000C,y
	BEQ.b CODE_AB85F8
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AB85F8:
	LDA.w $000D,y
	BEQ.b CODE_AB8609
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AB8609:
	LDA.w $000E,y
	BEQ.b CODE_AB861A
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AB861A:
	LDA.w $000F,y
	BEQ.b CODE_AB862B
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AB862B:
	LDA.w $0010,y
	BEQ.b CODE_AB863C
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AB863C:
	LDA.w $0011,y
	BEQ.b CODE_AB864D
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AB864D:
	LDA.w $0012,y
	BEQ.b CODE_AB865E
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AB865E:
	LDA.w $0013,y
	BEQ.b CODE_AB866F
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AB866F:
	LDA.w $0014,y
	BEQ.b CODE_AB8680
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AB8680:
	LDA.w $0015,y
	BEQ.b CODE_AB8691
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AB8691:
	LDA.w $0016,y
	BEQ.b CODE_AB86A2
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AB86A2:
	LDA.w $0017,y
	BEQ.b CODE_AB86B3
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AB86B3:
	LDA.w $0018,y
	BEQ.b CODE_AB86C4
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB86C4:
	LDA.w $0019,y
	BEQ.b CODE_AB86D5
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB86D5:
	LDA.w $001A,y
	BEQ.b CODE_AB86E6
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB86E6:
	LDA.w $001B,y
	BEQ.b CODE_AB86F7
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB86F7:
	LDA.w $001C,y
	BEQ.b CODE_AB8708
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB8708:
	LDA.w $001D,y
	BEQ.b CODE_AB8719
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB8719:
	LDA.w $001E,y
	BEQ.b CODE_AB872A
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB872A:
	LDA.w $001F,y
	BEQ.b CODE_AB873B
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB873B:
	LDA.w $0020,y
	BEQ.b CODE_AB874C
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB874C:
	LDA.w $0021,y
	BEQ.b CODE_AB875D
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AB875D:
	LDA.w $0022,y
	BEQ.b CODE_AB876E
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AB876E:
	LDA.w $0023,y
	BEQ.b CODE_AB877F
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AB877F:
	LDA.w $0024,y
	BEQ.b CODE_AB8790
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AB8790:
	LDA.w $0025,y
	BEQ.b CODE_AB87A1
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AB87A1:
	LDA.w $0026,y
	BEQ.b CODE_AB87B2
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AB87B2:
	LDA.w $0027,y
	BEQ.b CODE_AB87C3
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AB87C3:
	LDA.w $0028,y
	BEQ.b CODE_AB87D4
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AB87D4:
	LDA.w $0029,y
	BEQ.b CODE_AB87E5
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AB87E5:
	LDA.w $002A,y
	BEQ.b CODE_AB87F2
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AB87F2:
	LDA.w $002B,y
	BEQ.b CODE_AB8803
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AB8803:
	LDA.w $002C,y
	BEQ.b CODE_AB8814
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AB8814:
	LDA.w $002D,y
	BEQ.b CODE_AB8825
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AB8825:
	LDA.w $002E,y
	BEQ.b CODE_AB8836
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AB8836:
	LDA.w $002F,y
	BEQ.b CODE_AB8847
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AB8847:
	LDA.w $0030,y
	BEQ.b CODE_AB8858
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AB8858:
	LDA.w $0031,y
	BEQ.b CODE_AB8869
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AB8869:
	LDA.w $0032,y
	BEQ.b CODE_AB887A
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AB887A:
	LDA.w $0033,y
	BEQ.b CODE_AB888B
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AB888B:
	LDA.w $0034,y
	BEQ.b CODE_AB889C
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AB889C:
	LDA.w $0035,y
	BEQ.b CODE_AB88A5
	STA.l $7F3F80,x
CODE_AB88A5:
	REP.b #$20
	RTL

CODE_AB88A8:
	SEP.b #$20
	LDA.w $000A,y
	BEQ.b CODE_AB88B7
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AB88B7:
	LDA.w $000B,y
	BEQ.b CODE_AB88C8
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AB88C8:
	LDA.w $000C,y
	BEQ.b CODE_AB88D9
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AB88D9:
	LDA.w $000D,y
	BEQ.b CODE_AB88EA
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AB88EA:
	LDA.w $000E,y
	BEQ.b CODE_AB88FB
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AB88FB:
	LDA.w $000F,y
	BEQ.b CODE_AB890C
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AB890C:
	LDA.w $0010,y
	BEQ.b CODE_AB891D
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AB891D:
	LDA.w $0011,y
	BEQ.b CODE_AB892E
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AB892E:
	LDA.w $0012,y
	BEQ.b CODE_AB893F
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AB893F:
	LDA.w $0013,y
	BEQ.b CODE_AB8950
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AB8950:
	LDA.w $0014,y
	BEQ.b CODE_AB8961
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_AB8961:
	LDA.w $0015,y
	BEQ.b CODE_AB8972
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AB8972:
	LDA.w $0016,y
	BEQ.b CODE_AB8983
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AB8983:
	LDA.w $0017,y
	BEQ.b CODE_AB8994
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AB8994:
	LDA.w $0018,y
	BEQ.b CODE_AB89A5
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB89A5:
	LDA.w $0019,y
	BEQ.b CODE_AB89B6
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB89B6:
	LDA.w $001A,y
	BEQ.b CODE_AB89C7
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB89C7:
	LDA.w $001B,y
	BEQ.b CODE_AB89D8
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB89D8:
	LDA.w $001C,y
	BEQ.b CODE_AB89E9
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB89E9:
	LDA.w $001D,y
	BEQ.b CODE_AB89FA
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB89FA:
	LDA.w $001E,y
	BEQ.b CODE_AB8A0B
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB8A0B:
	LDA.w $001F,y
	BEQ.b CODE_AB8A1C
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB8A1C:
	LDA.w $0020,y
	BEQ.b CODE_AB8A2D
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB8A2D:
	LDA.w $0021,y
	BEQ.b CODE_AB8A3E
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AB8A3E:
	LDA.w $0022,y
	BEQ.b CODE_AB8A4F
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AB8A4F:
	LDA.w $0023,y
	BEQ.b CODE_AB8A60
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AB8A60:
	LDA.w $0024,y
	BEQ.b CODE_AB8A71
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AB8A71:
	LDA.w $0025,y
	BEQ.b CODE_AB8A82
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AB8A82:
	LDA.w $0026,y
	BEQ.b CODE_AB8A93
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AB8A93:
	LDA.w $0027,y
	BEQ.b CODE_AB8AA4
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AB8AA4:
	LDA.w $0028,y
	BEQ.b CODE_AB8AB5
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AB8AB5:
	LDA.w $0029,y
	BEQ.b CODE_AB8AC6
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AB8AC6:
	LDA.w $002A,y
	BEQ.b CODE_AB8AD7
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AB8AD7:
	LDA.w $002B,y
	BEQ.b CODE_AB8AE8
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AB8AE8:
	LDA.w $002C,y
	BEQ.b CODE_AB8AF9
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AB8AF9:
	LDA.w $002D,y
	BEQ.b CODE_AB8B0A
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AB8B0A:
	LDA.w $002E,y
	BEQ.b CODE_AB8B1B
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AB8B1B:
	LDA.w $002F,y
	BEQ.b CODE_AB8B2C
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AB8B2C:
	LDA.w $0030,y
	BEQ.b CODE_AB8B3D
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AB8B3D:
	LDA.w $0031,y
	BEQ.b CODE_AB8B4E
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AB8B4E:
	LDA.w $0032,y
	BEQ.b CODE_AB8B5F
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AB8B5F:
	LDA.w $0033,y
	BEQ.b CODE_AB8B70
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AB8B70:
	LDA.w $0034,y
	BEQ.b CODE_AB8B81
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB8B81:
	REP.b #$20
	RTL

CODE_AB8B84:
	SEP.b #$20
	LDA.w $000A,y
	BEQ.b CODE_AB8B8F
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AB8B8F:
	LDA.w $000B,y
	BEQ.b CODE_AB8BA0
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AB8BA0:
	LDA.w $000C,y
	BEQ.b CODE_AB8BB1
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AB8BB1:
	LDA.w $000D,y
	BEQ.b CODE_AB8BC2
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AB8BC2:
	LDA.w $000E,y
	BEQ.b CODE_AB8BD3
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AB8BD3:
	LDA.w $000F,y
	BEQ.b CODE_AB8BE4
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AB8BE4:
	LDA.w $0010,y
	BEQ.b CODE_AB8BF5
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AB8BF5:
	LDA.w $0011,y
	BEQ.b CODE_AB8C06
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AB8C06:
	LDA.w $0012,y
	BEQ.b CODE_AB8C17
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AB8C17:
	LDA.w $0013,y
	BEQ.b CODE_AB8C28
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AB8C28:
	LDA.w $0014,y
	BEQ.b CODE_AB8C39
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AB8C39:
	LDA.w $0015,y
	BEQ.b CODE_AB8C4E
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_AB8C4E:
	LDA.w $0016,y
	BEQ.b CODE_AB8C5F
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_AB8C5F:
	LDA.w $0017,y
	BEQ.b CODE_AB8C70
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AB8C70:
	LDA.w $0018,y
	BEQ.b CODE_AB8C81
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB8C81:
	LDA.w $0019,y
	BEQ.b CODE_AB8C92
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB8C92:
	LDA.w $001A,y
	BEQ.b CODE_AB8CA3
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB8CA3:
	LDA.w $001B,y
	BEQ.b CODE_AB8CB4
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB8CB4:
	LDA.w $001C,y
	BEQ.b CODE_AB8CC5
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB8CC5:
	LDA.w $001D,y
	BEQ.b CODE_AB8CD6
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB8CD6:
	LDA.w $001E,y
	BEQ.b CODE_AB8CE7
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB8CE7:
	LDA.w $001F,y
	BEQ.b CODE_AB8CF8
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB8CF8:
	LDA.w $0020,y
	BEQ.b CODE_AB8D09
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB8D09:
	LDA.w $0021,y
	BEQ.b CODE_AB8D1A
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AB8D1A:
	LDA.w $0022,y
	BEQ.b CODE_AB8D2B
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AB8D2B:
	LDA.w $0023,y
	BEQ.b CODE_AB8D3C
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AB8D3C:
	LDA.w $0024,y
	BEQ.b CODE_AB8D4D
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AB8D4D:
	LDA.w $0025,y
	BEQ.b CODE_AB8D5E
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_AB8D5E:
	LDA.w $0026,y
	BEQ.b CODE_AB8D6F
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_AB8D6F:
	LDA.w $0027,y
	BEQ.b CODE_AB8D80
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_AB8D80:
	LDA.w $0028,y
	BEQ.b CODE_AB8D91
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_AB8D91:
	LDA.w $0029,y
	BEQ.b CODE_AB8DA2
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_AB8DA2:
	LDA.w $002A,y
	BEQ.b CODE_AB8DB7
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AB8DB7:
	LDA.w $002B,y
	BEQ.b CODE_AB8DC8
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AB8DC8:
	LDA.w $002C,y
	BEQ.b CODE_AB8DD9
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AB8DD9:
	LDA.w $002D,y
	BEQ.b CODE_AB8DEA
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AB8DEA:
	LDA.w $002E,y
	BEQ.b CODE_AB8DFB
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AB8DFB:
	LDA.w $002F,y
	BEQ.b CODE_AB8E0C
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AB8E0C:
	LDA.w $0030,y
	BEQ.b CODE_AB8E1D
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AB8E1D:
	LDA.w $0031,y
	BEQ.b CODE_AB8E2E
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AB8E2E:
	LDA.w $0032,y
	BEQ.b CODE_AB8E3F
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AB8E3F:
	LDA.w $0033,y
	BEQ.b CODE_AB8E50
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AB8E50:
	LDA.w $0034,y
	BEQ.b CODE_AB8E5D
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB8E5D:
	REP.b #$20
	RTL

CODE_AB8E60:
	SEP.b #$20
	LDA.w $000B,y
	BEQ.b CODE_AB8E77
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AB8E77:
	LDA.w $000C,y
	BEQ.b CODE_AB8E88
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AB8E88:
	LDA.w $000D,y
	BEQ.b CODE_AB8E99
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AB8E99:
	LDA.w $000E,y
	BEQ.b CODE_AB8EAA
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AB8EAA:
	LDA.w $000F,y
	BEQ.b CODE_AB8EBB
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AB8EBB:
	LDA.w $0010,y
	BEQ.b CODE_AB8ECC
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AB8ECC:
	LDA.w $0011,y
	BEQ.b CODE_AB8EDD
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AB8EDD:
	LDA.w $0012,y
	BEQ.b CODE_AB8EEE
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AB8EEE:
	LDA.w $0013,y
	BEQ.b CODE_AB8EFF
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AB8EFF:
	LDA.w $0014,y
	BEQ.b CODE_AB8F10
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AB8F10:
	LDA.w $0015,y
	BEQ.b CODE_AB8F21
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AB8F21:
	LDA.w $0016,y
	BEQ.b CODE_AB8F32
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AB8F32:
	LDA.w $0017,y
	BEQ.b CODE_AB8F47
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_AB8F47:
	LDA.w $0018,y
	BEQ.b CODE_AB8F58
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB8F58:
	LDA.w $0019,y
	BEQ.b CODE_AB8F69
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB8F69:
	LDA.w $001A,y
	BEQ.b CODE_AB8F7A
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB8F7A:
	LDA.w $001B,y
	BEQ.b CODE_AB8F8B
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB8F8B:
	LDA.w $001C,y
	BEQ.b CODE_AB8F9C
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB8F9C:
	LDA.w $001D,y
	BEQ.b CODE_AB8FAD
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB8FAD:
	LDA.w $001E,y
	BEQ.b CODE_AB8FBE
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB8FBE:
	LDA.w $001F,y
	BEQ.b CODE_AB8FCF
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB8FCF:
	LDA.w $0020,y
	BEQ.b CODE_AB8FE0
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB8FE0:
	LDA.w $0021,y
	BEQ.b CODE_AB8FF1
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AB8FF1:
	LDA.w $0022,y
	BEQ.b CODE_AB9002
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AB9002:
	LDA.w $0023,y
	BEQ.b CODE_AB9017
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AB9017:
	LDA.w $0024,y
	BEQ.b CODE_AB9028
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AB9028:
	LDA.w $0025,y
	BEQ.b CODE_AB9039
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AB9039:
	LDA.w $0026,y
	BEQ.b CODE_AB904A
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AB904A:
	LDA.w $0027,y
	BEQ.b CODE_AB905B
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AB905B:
	LDA.w $0028,y
	BEQ.b CODE_AB906C
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AB906C:
	LDA.w $0029,y
	BEQ.b CODE_AB907D
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AB907D:
	LDA.w $002A,y
	BEQ.b CODE_AB908E
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AB908E:
	LDA.w $002B,y
	BEQ.b CODE_AB909F
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_AB909F:
	LDA.w $002C,y
	BEQ.b CODE_AB90B0
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_AB90B0:
	LDA.w $002D,y
	BEQ.b CODE_AB90C1
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_AB90C1:
	LDA.w $002E,y
	BEQ.b CODE_AB90D2
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AB90D2:
	LDA.w $002F,y
	BEQ.b CODE_AB90E7
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AB90E7:
	LDA.w $0030,y
	BEQ.b CODE_AB90F8
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AB90F8:
	LDA.w $0031,y
	BEQ.b CODE_AB9109
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_AB9109:
	LDA.w $0032,y
	BEQ.b CODE_AB911A
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AB911A:
	LDA.w $0033,y
	BEQ.b CODE_AB912B
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AB912B:
	LDA.w $0034,y
	BEQ.b CODE_AB9134
	STA.l $7F3F80,x
CODE_AB9134:
	REP.b #$20
	RTL

CODE_AB9137:
	SEP.b #$20
	LDA.w $000B,y
	BEQ.b CODE_AB914A
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AB914A:
	LDA.w $000C,y
	BEQ.b CODE_AB915B
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AB915B:
	LDA.w $000D,y
	BEQ.b CODE_AB916C
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AB916C:
	LDA.w $000E,y
	BEQ.b CODE_AB917D
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AB917D:
	LDA.w $000F,y
	BEQ.b CODE_AB918E
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AB918E:
	LDA.w $0010,y
	BEQ.b CODE_AB91A3
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_AB91A3:
	LDA.w $0011,y
	BEQ.b CODE_AB91B4
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_AB91B4:
	LDA.w $0012,y
	BEQ.b CODE_AB91C5
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AB91C5:
	LDA.w $0013,y
	BEQ.b CODE_AB91D6
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AB91D6:
	LDA.w $0014,y
	BEQ.b CODE_AB91E7
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AB91E7:
	LDA.w $0015,y
	BEQ.b CODE_AB91F8
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AB91F8:
	LDA.w $0016,y
	BEQ.b CODE_AB9209
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AB9209:
	LDA.w $0017,y
	BEQ.b CODE_AB921A
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AB921A:
	LDA.w $0018,y
	BEQ.b CODE_AB922F
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB922F:
	LDA.w $0019,y
	BEQ.b CODE_AB9240
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB9240:
	LDA.w $001A,y
	BEQ.b CODE_AB9251
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB9251:
	LDA.w $001B,y
	BEQ.b CODE_AB9262
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB9262:
	LDA.w $001C,y
	BEQ.b CODE_AB9273
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB9273:
	LDA.w $001D,y
	BEQ.b CODE_AB9284
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB9284:
	LDA.w $001E,y
	BEQ.b CODE_AB9295
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB9295:
	LDA.w $001F,y
	BEQ.b CODE_AB92A6
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB92A6:
	LDA.w $0020,y
	BEQ.b CODE_AB92BB
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AB92BB:
	LDA.w $0021,y
	BEQ.b CODE_AB92CC
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AB92CC:
	LDA.w $0022,y
	BEQ.b CODE_AB92DD
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AB92DD:
	LDA.w $0023,y
	BEQ.b CODE_AB92EE
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AB92EE:
	LDA.w $0024,y
	BEQ.b CODE_AB92FF
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AB92FF:
	LDA.w $0025,y
	BEQ.b CODE_AB9310
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AB9310:
	LDA.w $0026,y
	BEQ.b CODE_AB9321
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AB9321:
	LDA.w $0027,y
	BEQ.b CODE_AB9332
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AB9332:
	LDA.w $0028,y
	BEQ.b CODE_AB9343
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AB9343:
	LDA.w $0029,y
	BEQ.b CODE_AB9358
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AB9358:
	LDA.w $002A,y
	BEQ.b CODE_AB9369
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AB9369:
	LDA.w $002B,y
	BEQ.b CODE_AB937A
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AB937A:
	LDA.w $002C,y
	BEQ.b CODE_AB938B
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AB938B:
	LDA.w $002D,y
	BEQ.b CODE_AB939C
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AB939C:
	LDA.w $002E,y
	BEQ.b CODE_AB93AD
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AB93AD:
	LDA.w $002F,y
	BEQ.b CODE_AB93BE
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AB93BE:
	LDA.w $0030,y
	BEQ.b CODE_AB93CF
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AB93CF:
	LDA.w $0031,y
	BEQ.b CODE_AB93E4
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AB93E4:
	LDA.w $0032,y
	BEQ.b CODE_AB93F5
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AB93F5:
	LDA.w $0033,y
	BEQ.b CODE_AB9406
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB9406:
	REP.b #$20
	RTL

CODE_AB9409:
	SEP.b #$20
	LDA.w $000B,y
	BEQ.b CODE_AB9418
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_AB9418:
	LDA.w $000C,y
	BEQ.b CODE_AB942D
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AB942D:
	LDA.w $000D,y
	BEQ.b CODE_AB943E
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_AB943E:
	LDA.w $000E,y
	BEQ.b CODE_AB944F
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_AB944F:
	LDA.w $000F,y
	BEQ.b CODE_AB9460
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_AB9460:
	LDA.w $0010,y
	BEQ.b CODE_AB9471
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_AB9471:
	LDA.w $0011,y
	BEQ.b CODE_AB9482
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_AB9482:
	LDA.w $0012,y
	BEQ.b CODE_AB9497
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_AB9497:
	LDA.w $0013,y
	BEQ.b CODE_AB94A8
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_AB94A8:
	LDA.w $0014,y
	BEQ.b CODE_AB94B9
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_AB94B9:
	LDA.w $0015,y
	BEQ.b CODE_AB94CA
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_AB94CA:
	LDA.w $0016,y
	BEQ.b CODE_AB94DB
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_AB94DB:
	LDA.w $0017,y
	BEQ.b CODE_AB94EC
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_AB94EC:
	LDA.w $0018,y
	BEQ.b CODE_AB9501
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_AB9501:
	LDA.w $0019,y
	BEQ.b CODE_AB9512
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_AB9512:
	LDA.w $001A,y
	BEQ.b CODE_AB9523
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_AB9523:
	LDA.w $001B,y
	BEQ.b CODE_AB9534
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_AB9534:
	LDA.w $001C,y
	BEQ.b CODE_AB9545
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_AB9545:
	LDA.w $001D,y
	BEQ.b CODE_AB9556
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB9556:
	LDA.w $001E,y
	BEQ.b CODE_AB9567
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB9567:
	LDA.w $001F,y
	BEQ.b CODE_AB957C
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_AB957C:
	LDA.w $0020,y
	BEQ.b CODE_AB958D
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_AB958D:
	LDA.w $0021,y
	BEQ.b CODE_AB959E
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AB959E:
	LDA.w $0022,y
	BEQ.b CODE_AB95AF
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AB95AF:
	LDA.w $0023,y
	BEQ.b CODE_AB95C0
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AB95C0:
	LDA.w $0024,y
	BEQ.b CODE_AB95D1
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AB95D1:
	LDA.w $0025,y
	BEQ.b CODE_AB95E6
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AB95E6:
	LDA.w $0026,y
	BEQ.b CODE_AB95F7
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AB95F7:
	LDA.w $0027,y
	BEQ.b CODE_AB9608
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AB9608:
	LDA.w $0028,y
	BEQ.b CODE_AB9619
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AB9619:
	LDA.w $0029,y
	BEQ.b CODE_AB962A
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AB962A:
	LDA.w $002A,y
	BEQ.b CODE_AB963B
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AB963B:
	LDA.w $002B,y
	BEQ.b CODE_AB9650
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AB9650:
	LDA.w $002C,y
	BEQ.b CODE_AB9661
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AB9661:
	LDA.w $002D,y
	BEQ.b CODE_AB9672
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AB9672:
	LDA.w $002E,y
	BEQ.b CODE_AB9683
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AB9683:
	LDA.w $002F,y
	BEQ.b CODE_AB9694
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AB9694:
	LDA.w $0030,y
	BEQ.b CODE_AB96A5
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AB96A5:
	LDA.w $0031,y
	BEQ.b CODE_AB96BA
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_AB96BA:
	LDA.w $0032,y
	BEQ.b CODE_AB96CB
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AB96CB:
	LDA.w $0033,y
	BEQ.b CODE_AB96D8
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB96D8:
	REP.b #$20
	RTL

CODE_AB96DB:
	SEP.b #$20
	LDA.w $000B,y
	BEQ.b CODE_AB96E6
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AB96E6:
	LDA.w $000C,y
	BEQ.b CODE_AB96FB
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_AB96FB:
	LDA.w $000D,y
	BEQ.b CODE_AB970C
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_AB970C:
	LDA.w $000E,y
	BEQ.b CODE_AB971D
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_AB971D:
	LDA.w $000F,y
	BEQ.b CODE_AB972E
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AB972E:
	LDA.w $0010,y
	BEQ.b CODE_AB973F
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AB973F:
	LDA.w $0011,y
	BEQ.b CODE_AB9750
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AB9750:
	LDA.w $0012,y
	BEQ.b CODE_AB9765
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_AB9765:
	LDA.w $0013,y
	BEQ.b CODE_AB9776
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_AB9776:
	LDA.w $0014,y
	BEQ.b CODE_AB9787
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AB9787:
	LDA.w $0015,y
	BEQ.b CODE_AB9798
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AB9798:
	LDA.w $0016,y
	BEQ.b CODE_AB97A9
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AB97A9:
	LDA.w $0017,y
	BEQ.b CODE_AB97BA
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AB97BA:
	LDA.w $0018,y
	BEQ.b CODE_AB97CF
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AB97CF:
	LDA.w $0019,y
	BEQ.b CODE_AB97E0
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AB97E0:
	LDA.w $001A,y
	BEQ.b CODE_AB97F1
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AB97F1:
	LDA.w $001B,y
	BEQ.b CODE_AB9802
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AB9802:
	LDA.w $001C,y
	BEQ.b CODE_AB9813
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AB9813:
	LDA.w $001D,y
	BEQ.b CODE_AB9824
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AB9824:
	LDA.w $001E,y
	BEQ.b CODE_AB9835
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_AB9835:
	LDA.w $001F,y
	BEQ.b CODE_AB984A
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB984A:
	LDA.w $0020,y
	BEQ.b CODE_AB985B
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB985B:
	LDA.w $0021,y
	BEQ.b CODE_AB986C
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AB986C:
	LDA.w $0022,y
	BEQ.b CODE_AB987D
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AB987D:
	LDA.w $0023,y
	BEQ.b CODE_AB988E
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_AB988E:
	LDA.w $0024,y
	BEQ.b CODE_AB989F
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_AB989F:
	LDA.w $0025,y
	BEQ.b CODE_AB98B4
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AB98B4:
	LDA.w $0026,y
	BEQ.b CODE_AB98C5
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AB98C5:
	LDA.w $0027,y
	BEQ.b CODE_AB98D6
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AB98D6:
	LDA.w $0028,y
	BEQ.b CODE_AB98E7
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_AB98E7:
	LDA.w $0029,y
	BEQ.b CODE_AB98F8
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_AB98F8:
	LDA.w $002A,y
	BEQ.b CODE_AB9909
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_AB9909:
	LDA.w $002B,y
	BEQ.b CODE_AB991E
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AB991E:
	LDA.w $002C,y
	BEQ.b CODE_AB992F
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AB992F:
	LDA.w $002D,y
	BEQ.b CODE_AB9940
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_AB9940:
	LDA.w $002E,y
	BEQ.b CODE_AB9951
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_AB9951:
	LDA.w $002F,y
	BEQ.b CODE_AB9962
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_AB9962:
	LDA.w $0030,y
	BEQ.b CODE_AB9973
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_AB9973:
	LDA.w $0031,y
	BEQ.b CODE_AB9988
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AB9988:
	LDA.w $0032,y
	BEQ.b CODE_AB9999
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_AB9999:
	LDA.w $0033,y
	BEQ.b CODE_AB99AA
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB99AA:
	REP.b #$20
	RTL

CODE_AB99AD:
	SEP.b #$20
	LDA.w $000B,y
	BEQ.b CODE_AB99B8
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_AB99B8:
	LDA.w $000C,y
	BEQ.b CODE_AB99C9
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AB99C9:
	LDA.w $000D,y
	BEQ.b CODE_AB99DA
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AB99DA:
	LDA.w $000E,y
	BEQ.b CODE_AB99EB
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AB99EB:
	LDA.w $000F,y
	BEQ.b CODE_AB9A00
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_AB9A00:
	LDA.w $0010,y
	BEQ.b CODE_AB9A11
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AB9A11:
	LDA.w $0011,y
	BEQ.b CODE_AB9A22
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AB9A22:
	LDA.w $0012,y
	BEQ.b CODE_AB9A33
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AB9A33:
	LDA.w $0013,y
	BEQ.b CODE_AB9A44
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AB9A44:
	LDA.w $0014,y
	BEQ.b CODE_AB9A59
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AB9A59:
	LDA.w $0015,y
	BEQ.b CODE_AB9A6A
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AB9A6A:
	LDA.w $0016,y
	BEQ.b CODE_AB9A7B
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AB9A7B:
	LDA.w $0017,y
	BEQ.b CODE_AB9A8C
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AB9A8C:
	LDA.w $0018,y
	BEQ.b CODE_AB9A9D
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_AB9A9D:
	LDA.w $0019,y
	BEQ.b CODE_AB9AB2
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AB9AB2:
	LDA.w $001A,y
	BEQ.b CODE_AB9AC3
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AB9AC3:
	LDA.w $001B,y
	BEQ.b CODE_AB9AD4
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AB9AD4:
	LDA.w $001C,y
	BEQ.b CODE_AB9AE5
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AB9AE5:
	LDA.w $001D,y
	BEQ.b CODE_AB9AF6
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_AB9AF6:
	LDA.w $001E,y
	BEQ.b CODE_AB9B0B
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB9B0B:
	LDA.w $001F,y
	BEQ.b CODE_AB9B1C
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB9B1C:
	LDA.w $0020,y
	BEQ.b CODE_AB9B2D
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB9B2D:
	LDA.w $0021,y
	BEQ.b CODE_AB9B3E
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_AB9B3E:
	LDA.w $0022,y
	BEQ.b CODE_AB9B4F
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_AB9B4F:
	LDA.w $0023,y
	BEQ.b CODE_AB9B64
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AB9B64:
	LDA.w $0024,y
	BEQ.b CODE_AB9B75
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AB9B75:
	LDA.w $0025,y
	BEQ.b CODE_AB9B86
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_AB9B86:
	LDA.w $0026,y
	BEQ.b CODE_AB9B97
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_AB9B97:
	LDA.w $0027,y
	BEQ.b CODE_AB9BA8
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_AB9BA8:
	LDA.w $0028,y
	BEQ.b CODE_AB9BBD
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AB9BBD:
	LDA.w $0029,y
	BEQ.b CODE_AB9BCE
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_AB9BCE:
	LDA.w $002A,y
	BEQ.b CODE_AB9BDF
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_AB9BDF:
	LDA.w $002B,y
	BEQ.b CODE_AB9BF0
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_AB9BF0:
	LDA.w $002C,y
	BEQ.b CODE_AB9C01
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_AB9C01:
	LDA.w $002D,y
	BEQ.b CODE_AB9C16
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_AB9C16:
	LDA.w $002E,y
	BEQ.b CODE_AB9C27
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_AB9C27:
	LDA.w $002F,y
	BEQ.b CODE_AB9C38
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_AB9C38:
	LDA.w $0030,y
	BEQ.b CODE_AB9C49
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_AB9C49:
	LDA.w $0031,y
	BEQ.b CODE_AB9C5A
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_AB9C5A:
	LDA.w $0032,y
	BEQ.b CODE_AB9C6F
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_AB9C6F:
	LDA.w $0033,y
	BEQ.b CODE_AB9C7C
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_AB9C7C:
	REP.b #$20
	RTL

CODE_AB9C7F:
	SEP.b #$20
	LDA.w $000C,y
	BEQ.b CODE_AB9C96
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_AB9C96:
	LDA.w $000D,y
	BEQ.b CODE_AB9CA7
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_AB9CA7:
	LDA.w $000E,y
	BEQ.b CODE_AB9CB8
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AB9CB8:
	LDA.w $000F,y
	BEQ.b CODE_AB9CC9
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AB9CC9:
	LDA.w $0010,y
	BEQ.b CODE_AB9CDE
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_AB9CDE:
	LDA.w $0011,y
	BEQ.b CODE_AB9CEF
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AB9CEF:
	LDA.w $0012,y
	BEQ.b CODE_AB9D00
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AB9D00:
	LDA.w $0013,y
	BEQ.b CODE_AB9D11
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AB9D11:
	LDA.w $0014,y
	BEQ.b CODE_AB9D26
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_AB9D26:
	LDA.w $0015,y
	BEQ.b CODE_AB9D37
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_AB9D37:
	LDA.w $0016,y
	BEQ.b CODE_AB9D48
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_AB9D48:
	LDA.w $0017,y
	BEQ.b CODE_AB9D59
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_AB9D59:
	LDA.w $0018,y
	BEQ.b CODE_AB9D6E
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_AB9D6E:
	LDA.w $0019,y
	BEQ.b CODE_AB9D7F
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_AB9D7F:
	LDA.w $001A,y
	BEQ.b CODE_AB9D90
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_AB9D90:
	LDA.w $001B,y
	BEQ.b CODE_AB9DA1
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_AB9DA1:
	LDA.w $001C,y
	BEQ.b CODE_AB9DB2
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_AB9DB2:
	LDA.w $001D,y
	BEQ.b CODE_AB9DC7
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_AB9DC7:
	LDA.w $001E,y
	BEQ.b CODE_AB9DD8
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_AB9DD8:
	LDA.w $001F,y
	BEQ.b CODE_AB9DE9
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_AB9DE9:
	LDA.w $0020,y
	BEQ.b CODE_AB9DFA
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_AB9DFA:
	LDA.w $0021,y
	BEQ.b CODE_AB9E0F
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_AB9E0F:
	LDA.w $0022,y
	BEQ.b CODE_AB9E20
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_AB9E20:
	LDA.w $0023,y
	BEQ.b CODE_AB9E31
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_AB9E31:
	LDA.w $0024,y
	BEQ.b CODE_AB9E42
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_AB9E42:
	LDA.w $0025,y
	BEQ.b CODE_AB9E57
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_AB9E57:
	LDA.w $0026,y
	BEQ.b CODE_AB9E68
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_AB9E68:
	LDA.w $0027,y
	BEQ.b CODE_AB9E79
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_AB9E79:
	LDA.w $0028,y
	BEQ.b CODE_AB9E8A
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_AB9E8A:
	LDA.w $0029,y
	BEQ.b CODE_AB9E9F
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_AB9E9F:
	LDA.w $002A,y
	BEQ.b CODE_AB9EB0
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_AB9EB0:
	LDA.w $002B,y
	BEQ.b CODE_AB9EC1
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_AB9EC1:
	LDA.w $002C,y
	BEQ.b CODE_AB9ED2
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_AB9ED2:
	LDA.w $002D,y
	BEQ.b CODE_AB9EE7
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_AB9EE7:
	LDA.w $002E,y
	BEQ.b CODE_AB9EF8
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_AB9EF8:
	LDA.w $002F,y
	BEQ.b CODE_AB9F09
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_AB9F09:
	LDA.w $0030,y
	BEQ.b CODE_AB9F1A
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_AB9F1A:
	LDA.w $0031,y
	BEQ.b CODE_AB9F2F
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_AB9F2F:
	LDA.w $0032,y
	BEQ.b CODE_AB9F40
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_AB9F40:
	LDA.w $0033,y
	BEQ.b CODE_AB9F49
	STA.l $7F3F80,x
CODE_AB9F49:
	REP.b #$20
	RTL

CODE_AB9F4C:
	SEP.b #$20
	LDA.w $000C,y
	BEQ.b CODE_AB9F5F
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_AB9F5F:
	LDA.w $000D,y
	BEQ.b CODE_AB9F70
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_AB9F70:
	LDA.w $000E,y
	BEQ.b CODE_AB9F85
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_AB9F85:
	LDA.w $000F,y
	BEQ.b CODE_AB9F96
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_AB9F96:
	LDA.w $0010,y
	BEQ.b CODE_AB9FA7
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_AB9FA7:
	LDA.w $0011,y
	BEQ.b CODE_AB9FBC
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_AB9FBC:
	LDA.w $0012,y
	BEQ.b CODE_AB9FCD
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_AB9FCD:
	LDA.w $0013,y
	BEQ.b CODE_AB9FDE
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_AB9FDE:
	LDA.w $0014,y
	BEQ.b CODE_AB9FEF
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_AB9FEF:
	LDA.w $0015,y
	BEQ.b CODE_ABA004
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABA004:
	LDA.w $0016,y
	BEQ.b CODE_ABA015
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABA015:
	LDA.w $0017,y
	BEQ.b CODE_ABA026
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_ABA026:
	LDA.w $0018,y
	BEQ.b CODE_ABA03B
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_ABA03B:
	LDA.w $0019,y
	BEQ.b CODE_ABA04C
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_ABA04C:
	LDA.w $001A,y
	BEQ.b CODE_ABA05D
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABA05D:
	LDA.w $001B,y
	BEQ.b CODE_ABA06E
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABA06E:
	LDA.w $001C,y
	BEQ.b CODE_ABA083
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_ABA083:
	LDA.w $001D,y
	BEQ.b CODE_ABA094
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_ABA094:
	LDA.w $001E,y
	BEQ.b CODE_ABA0A5
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABA0A5:
	LDA.w $001F,y
	BEQ.b CODE_ABA0BA
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABA0BA:
	LDA.w $0020,y
	BEQ.b CODE_ABA0CB
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABA0CB:
	LDA.w $0021,y
	BEQ.b CODE_ABA0DC
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABA0DC:
	LDA.w $0022,y
	BEQ.b CODE_ABA0ED
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABA0ED:
	LDA.w $0023,y
	BEQ.b CODE_ABA102
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABA102:
	LDA.w $0024,y
	BEQ.b CODE_ABA113
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABA113:
	LDA.w $0025,y
	BEQ.b CODE_ABA124
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABA124:
	LDA.w $0026,y
	BEQ.b CODE_ABA135
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABA135:
	LDA.w $0027,y
	BEQ.b CODE_ABA14A
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABA14A:
	LDA.w $0028,y
	BEQ.b CODE_ABA15B
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABA15B:
	LDA.w $0029,y
	BEQ.b CODE_ABA16C
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_ABA16C:
	LDA.w $002A,y
	BEQ.b CODE_ABA181
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABA181:
	LDA.w $002B,y
	BEQ.b CODE_ABA192
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABA192:
	LDA.w $002C,y
	BEQ.b CODE_ABA1A3
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABA1A3:
	LDA.w $002D,y
	BEQ.b CODE_ABA1B4
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABA1B4:
	LDA.w $002E,y
	BEQ.b CODE_ABA1C9
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABA1C9:
	LDA.w $002F,y
	BEQ.b CODE_ABA1DA
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABA1DA:
	LDA.w $0030,y
	BEQ.b CODE_ABA1EB
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABA1EB:
	LDA.w $0031,y
	BEQ.b CODE_ABA200
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABA200:
	LDA.w $0032,y
	BEQ.b CODE_ABA211
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABA211:
	REP.b #$20
	RTL

CODE_ABA214:
	SEP.b #$20
	LDA.w $000C,y
	BEQ.b CODE_ABA223
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABA223:
	LDA.w $000D,y
	BEQ.b CODE_ABA234
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABA234:
	LDA.w $000E,y
	BEQ.b CODE_ABA249
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_ABA249:
	LDA.w $000F,y
	BEQ.b CODE_ABA25A
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABA25A:
	LDA.w $0010,y
	BEQ.b CODE_ABA26B
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABA26B:
	LDA.w $0011,y
	BEQ.b CODE_ABA280
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABA280:
	LDA.w $0012,y
	BEQ.b CODE_ABA291
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABA291:
	LDA.w $0013,y
	BEQ.b CODE_ABA2A2
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABA2A2:
	LDA.w $0014,y
	BEQ.b CODE_ABA2B3
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABA2B3:
	LDA.w $0015,y
	BEQ.b CODE_ABA2C8
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABA2C8:
	LDA.w $0016,y
	BEQ.b CODE_ABA2D9
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABA2D9:
	LDA.w $0017,y
	BEQ.b CODE_ABA2EA
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABA2EA:
	LDA.w $0018,y
	BEQ.b CODE_ABA2FF
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABA2FF:
	LDA.w $0019,y
	BEQ.b CODE_ABA310
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABA310:
	LDA.w $001A,y
	BEQ.b CODE_ABA321
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABA321:
	LDA.w $001B,y
	BEQ.b CODE_ABA332
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABA332:
	LDA.w $001C,y
	BEQ.b CODE_ABA347
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABA347:
	LDA.w $001D,y
	BEQ.b CODE_ABA358
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABA358:
	LDA.w $001E,y
	BEQ.b CODE_ABA369
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABA369:
	LDA.w $001F,y
	BEQ.b CODE_ABA37E
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABA37E:
	LDA.w $0020,y
	BEQ.b CODE_ABA38F
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABA38F:
	LDA.w $0021,y
	BEQ.b CODE_ABA3A0
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_ABA3A0:
	LDA.w $0022,y
	BEQ.b CODE_ABA3B1
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_ABA3B1:
	LDA.w $0023,y
	BEQ.b CODE_ABA3C6
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABA3C6:
	LDA.w $0024,y
	BEQ.b CODE_ABA3D7
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABA3D7:
	LDA.w $0025,y
	BEQ.b CODE_ABA3E8
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABA3E8:
	LDA.w $0026,y
	BEQ.b CODE_ABA3F9
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABA3F9:
	LDA.w $0027,y
	BEQ.b CODE_ABA40E
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABA40E:
	LDA.w $0028,y
	BEQ.b CODE_ABA41F
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABA41F:
	LDA.w $0029,y
	BEQ.b CODE_ABA430
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABA430:
	LDA.w $002A,y
	BEQ.b CODE_ABA445
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABA445:
	LDA.w $002B,y
	BEQ.b CODE_ABA456
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABA456:
	LDA.w $002C,y
	BEQ.b CODE_ABA467
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABA467:
	LDA.w $002D,y
	BEQ.b CODE_ABA478
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABA478:
	LDA.w $002E,y
	BEQ.b CODE_ABA48D
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABA48D:
	LDA.w $002F,y
	BEQ.b CODE_ABA49E
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABA49E:
	LDA.w $0030,y
	BEQ.b CODE_ABA4AF
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABA4AF:
	LDA.w $0031,y
	BEQ.b CODE_ABA4C4
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABA4C4:
	LDA.w $0032,y
	BEQ.b CODE_ABA4D5
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABA4D5:
	LDA.w $0033,y
	BEQ.b CODE_ABA4DE
	STA.l $7F3F80,x
CODE_ABA4DE:
	REP.b #$20
	RTL

CODE_ABA4E1:
	SEP.b #$20
	LDA.w $000C,y
	BEQ.b CODE_ABA4F0
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABA4F0:
	LDA.w $000D,y
	BEQ.b CODE_ABA501
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABA501:
	LDA.w $000E,y
	BEQ.b CODE_ABA512
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABA512:
	LDA.w $000F,y
	BEQ.b CODE_ABA527
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABA527:
	LDA.w $0010,y
	BEQ.b CODE_ABA538
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABA538:
	LDA.w $0011,y
	BEQ.b CODE_ABA549
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABA549:
	LDA.w $0012,y
	BEQ.b CODE_ABA55E
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABA55E:
	LDA.w $0013,y
	BEQ.b CODE_ABA56F
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABA56F:
	LDA.w $0014,y
	BEQ.b CODE_ABA580
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABA580:
	LDA.w $0015,y
	BEQ.b CODE_ABA595
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABA595:
	LDA.w $0016,y
	BEQ.b CODE_ABA5A6
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABA5A6:
	LDA.w $0017,y
	BEQ.b CODE_ABA5B7
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABA5B7:
	LDA.w $0018,y
	BEQ.b CODE_ABA5CC
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABA5CC:
	LDA.w $0019,y
	BEQ.b CODE_ABA5DD
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABA5DD:
	LDA.w $001A,y
	BEQ.b CODE_ABA5EE
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABA5EE:
	LDA.w $001B,y
	BEQ.b CODE_ABA603
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABA603:
	LDA.w $001C,y
	BEQ.b CODE_ABA614
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABA614:
	LDA.w $001D,y
	BEQ.b CODE_ABA625
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABA625:
	LDA.w $001E,y
	BEQ.b CODE_ABA63A
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABA63A:
	LDA.w $001F,y
	BEQ.b CODE_ABA64B
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABA64B:
	LDA.w $0020,y
	BEQ.b CODE_ABA65C
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABA65C:
	LDA.w $0021,y
	BEQ.b CODE_ABA671
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABA671:
	LDA.w $0022,y
	BEQ.b CODE_ABA682
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABA682:
	LDA.w $0023,y
	BEQ.b CODE_ABA693
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABA693:
	LDA.w $0024,y
	BEQ.b CODE_ABA6A8
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABA6A8:
	LDA.w $0025,y
	BEQ.b CODE_ABA6B9
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABA6B9:
	LDA.w $0026,y
	BEQ.b CODE_ABA6CA
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABA6CA:
	LDA.w $0027,y
	BEQ.b CODE_ABA6DB
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABA6DB:
	LDA.w $0028,y
	BEQ.b CODE_ABA6F0
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABA6F0:
	LDA.w $0029,y
	BEQ.b CODE_ABA701
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_ABA701:
	LDA.w $002A,y
	BEQ.b CODE_ABA712
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABA712:
	LDA.w $002B,y
	BEQ.b CODE_ABA727
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABA727:
	LDA.w $002C,y
	BEQ.b CODE_ABA738
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABA738:
	LDA.w $002D,y
	BEQ.b CODE_ABA749
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABA749:
	LDA.w $002E,y
	BEQ.b CODE_ABA75E
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABA75E:
	LDA.w $002F,y
	BEQ.b CODE_ABA76F
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABA76F:
	LDA.w $0030,y
	BEQ.b CODE_ABA780
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABA780:
	LDA.w $0031,y
	BEQ.b CODE_ABA795
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABA795:
	LDA.w $0032,y
	BEQ.b CODE_ABA7A6
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABA7A6:
	REP.b #$20
	RTL

CODE_ABA7A9:
	SEP.b #$20
	LDA.w $000C,y
	BEQ.b CODE_ABA7B4
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABA7B4:
	LDA.w $000D,y
	BEQ.b CODE_ABA7C9
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABA7C9:
	LDA.w $000E,y
	BEQ.b CODE_ABA7DA
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABA7DA:
	LDA.w $000F,y
	BEQ.b CODE_ABA7EB
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABA7EB:
	LDA.w $0010,y
	BEQ.b CODE_ABA800
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABA800:
	LDA.w $0011,y
	BEQ.b CODE_ABA811
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABA811:
	LDA.w $0012,y
	BEQ.b CODE_ABA822
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABA822:
	LDA.w $0013,y
	BEQ.b CODE_ABA837
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABA837:
	LDA.w $0014,y
	BEQ.b CODE_ABA848
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABA848:
	LDA.w $0015,y
	BEQ.b CODE_ABA85D
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABA85D:
	LDA.w $0016,y
	BEQ.b CODE_ABA86E
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABA86E:
	LDA.w $0017,y
	BEQ.b CODE_ABA87F
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABA87F:
	LDA.w $0018,y
	BEQ.b CODE_ABA894
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABA894:
	LDA.w $0019,y
	BEQ.b CODE_ABA8A5
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABA8A5:
	LDA.w $001A,y
	BEQ.b CODE_ABA8B6
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABA8B6:
	LDA.w $001B,y
	BEQ.b CODE_ABA8CB
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABA8CB:
	LDA.w $001C,y
	BEQ.b CODE_ABA8DC
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABA8DC:
	LDA.w $001D,y
	BEQ.b CODE_ABA8F1
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_ABA8F1:
	LDA.w $001E,y
	BEQ.b CODE_ABA902
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABA902:
	LDA.w $001F,y
	BEQ.b CODE_ABA913
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABA913:
	LDA.w $0020,y
	BEQ.b CODE_ABA928
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABA928:
	LDA.w $0021,y
	BEQ.b CODE_ABA939
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABA939:
	LDA.w $0022,y
	BEQ.b CODE_ABA94A
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABA94A:
	LDA.w $0023,y
	BEQ.b CODE_ABA95F
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABA95F:
	LDA.w $0024,y
	BEQ.b CODE_ABA970
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABA970:
	LDA.w $0025,y
	BEQ.b CODE_ABA981
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABA981:
	LDA.w $0026,y
	BEQ.b CODE_ABA996
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABA996:
	LDA.w $0027,y
	BEQ.b CODE_ABA9A7
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABA9A7:
	LDA.w $0028,y
	BEQ.b CODE_ABA9BC
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABA9BC:
	LDA.w $0029,y
	BEQ.b CODE_ABA9CD
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABA9CD:
	LDA.w $002A,y
	BEQ.b CODE_ABA9DE
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABA9DE:
	LDA.w $002B,y
	BEQ.b CODE_ABA9F3
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABA9F3:
	LDA.w $002C,y
	BEQ.b CODE_ABAA04
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABAA04:
	LDA.w $002D,y
	BEQ.b CODE_ABAA15
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABAA15:
	LDA.w $002E,y
	BEQ.b CODE_ABAA2A
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABAA2A:
	LDA.w $002F,y
	BEQ.b CODE_ABAA3B
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABAA3B:
	LDA.w $0030,y
	BEQ.b CODE_ABAA50
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABAA50:
	LDA.w $0031,y
	BEQ.b CODE_ABAA61
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABAA61:
	LDA.w $0032,y
	BEQ.b CODE_ABAA6E
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABAA6E:
	REP.b #$20
	RTL

CODE_ABAA71:
	SEP.b #$20
	LDA.w $000C,y
	BEQ.b CODE_ABAA7C
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABAA7C:
	LDA.w $000D,y
	BEQ.b CODE_ABAA8D
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_ABAA8D:
	LDA.w $000E,y
	BEQ.b CODE_ABAAA2
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABAAA2:
	LDA.w $000F,y
	BEQ.b CODE_ABAAB3
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABAAB3:
	LDA.w $0010,y
	BEQ.b CODE_ABAAC8
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABAAC8:
	LDA.w $0011,y
	BEQ.b CODE_ABAAD9
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABAAD9:
	LDA.w $0012,y
	BEQ.b CODE_ABAAEA
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABAAEA:
	LDA.w $0013,y
	BEQ.b CODE_ABAAFF
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABAAFF:
	LDA.w $0014,y
	BEQ.b CODE_ABAB10
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABAB10:
	LDA.w $0015,y
	BEQ.b CODE_ABAB25
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABAB25:
	LDA.w $0016,y
	BEQ.b CODE_ABAB36
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABAB36:
	LDA.w $0017,y
	BEQ.b CODE_ABAB47
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABAB47:
	LDA.w $0018,y
	BEQ.b CODE_ABAB5C
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABAB5C:
	LDA.w $0019,y
	BEQ.b CODE_ABAB6D
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABAB6D:
	LDA.w $001A,y
	BEQ.b CODE_ABAB82
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABAB82:
	LDA.w $001B,y
	BEQ.b CODE_ABAB93
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABAB93:
	LDA.w $001C,y
	BEQ.b CODE_ABABA4
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABABA4:
	LDA.w $001D,y
	BEQ.b CODE_ABABB9
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_ABABB9:
	LDA.w $001E,y
	BEQ.b CODE_ABABCA
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABABCA:
	LDA.w $001F,y
	BEQ.b CODE_ABABDF
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABABDF:
	LDA.w $0020,y
	BEQ.b CODE_ABABF0
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABABF0:
	LDA.w $0021,y
	BEQ.b CODE_ABAC05
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABAC05:
	LDA.w $0022,y
	BEQ.b CODE_ABAC16
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABAC16:
	LDA.w $0023,y
	BEQ.b CODE_ABAC27
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABAC27:
	LDA.w $0024,y
	BEQ.b CODE_ABAC3C
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABAC3C:
	LDA.w $0025,y
	BEQ.b CODE_ABAC4D
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABAC4D:
	LDA.w $0026,y
	BEQ.b CODE_ABAC62
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABAC62:
	LDA.w $0027,y
	BEQ.b CODE_ABAC73
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABAC73:
	LDA.w $0028,y
	BEQ.b CODE_ABAC84
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABAC84:
	LDA.w $0029,y
	BEQ.b CODE_ABAC99
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABAC99:
	LDA.w $002A,y
	BEQ.b CODE_ABACAA
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABACAA:
	LDA.w $002B,y
	BEQ.b CODE_ABACBF
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABACBF:
	LDA.w $002C,y
	BEQ.b CODE_ABACD0
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABACD0:
	LDA.w $002D,y
	BEQ.b CODE_ABACE5
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABACE5:
	LDA.w $002E,y
	BEQ.b CODE_ABACF6
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABACF6:
	LDA.w $002F,y
	BEQ.b CODE_ABAD07
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABAD07:
	LDA.w $0030,y
	BEQ.b CODE_ABAD1C
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABAD1C:
	LDA.w $0031,y
	BEQ.b CODE_ABAD2D
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABAD2D:
	LDA.w $0032,y
	BEQ.b CODE_ABAD36
	STA.l $7F3F80,x
CODE_ABAD36:
	REP.b #$20
	RTL

CODE_ABAD39:
	SEP.b #$20
	LDA.w $000D,y
	BEQ.b CODE_ABAD4C
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABAD4C:
	LDA.w $000E,y
	BEQ.b CODE_ABAD61
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_ABAD61:
	LDA.w $000F,y
	BEQ.b CODE_ABAD72
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABAD72:
	LDA.w $0010,y
	BEQ.b CODE_ABAD87
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABAD87:
	LDA.w $0011,y
	BEQ.b CODE_ABAD98
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABAD98:
	LDA.w $0012,y
	BEQ.b CODE_ABADA9
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABADA9:
	LDA.w $0013,y
	BEQ.b CODE_ABADBE
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABADBE:
	LDA.w $0014,y
	BEQ.b CODE_ABADCF
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABADCF:
	LDA.w $0015,y
	BEQ.b CODE_ABADE4
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABADE4:
	LDA.w $0016,y
	BEQ.b CODE_ABADF5
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_ABADF5:
	LDA.w $0017,y
	BEQ.b CODE_ABAE06
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABAE06:
	LDA.w $0018,y
	BEQ.b CODE_ABAE1B
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABAE1B:
	LDA.w $0019,y
	BEQ.b CODE_ABAE2C
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABAE2C:
	LDA.w $001A,y
	BEQ.b CODE_ABAE41
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABAE41:
	LDA.w $001B,y
	BEQ.b CODE_ABAE52
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABAE52:
	LDA.w $001C,y
	BEQ.b CODE_ABAE63
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABAE63:
	LDA.w $001D,y
	BEQ.b CODE_ABAE78
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABAE78:
	LDA.w $001E,y
	BEQ.b CODE_ABAE89
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABAE89:
	LDA.w $001F,y
	BEQ.b CODE_ABAE9E
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABAE9E:
	LDA.w $0020,y
	BEQ.b CODE_ABAEAF
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABAEAF:
	LDA.w $0021,y
	BEQ.b CODE_ABAEC4
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABAEC4:
	LDA.w $0022,y
	BEQ.b CODE_ABAED5
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABAED5:
	LDA.w $0023,y
	BEQ.b CODE_ABAEE6
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABAEE6:
	LDA.w $0024,y
	BEQ.b CODE_ABAEFB
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABAEFB:
	LDA.w $0025,y
	BEQ.b CODE_ABAF0C
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABAF0C:
	LDA.w $0026,y
	BEQ.b CODE_ABAF21
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABAF21:
	LDA.w $0027,y
	BEQ.b CODE_ABAF32
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABAF32:
	LDA.w $0028,y
	BEQ.b CODE_ABAF43
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABAF43:
	LDA.w $0029,y
	BEQ.b CODE_ABAF58
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABAF58:
	LDA.w $002A,y
	BEQ.b CODE_ABAF69
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABAF69:
	LDA.w $002B,y
	BEQ.b CODE_ABAF7E
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABAF7E:
	LDA.w $002C,y
	BEQ.b CODE_ABAF8F
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABAF8F:
	LDA.w $002D,y
	BEQ.b CODE_ABAFA4
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABAFA4:
	LDA.w $002E,y
	BEQ.b CODE_ABAFB5
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABAFB5:
	LDA.w $002F,y
	BEQ.b CODE_ABAFC6
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABAFC6:
	LDA.w $0030,y
	BEQ.b CODE_ABAFDB
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABAFDB:
	LDA.w $0031,y
	BEQ.b CODE_ABAFEC
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABAFEC:
	LDA.w $0032,y
	BEQ.b CODE_ABAFF9
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABAFF9:
	REP.b #$20
	RTL

CODE_ABAFFC:
	SEP.b #$20
	LDA.w $000D,y
	BEQ.b CODE_ABB00F
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABB00F:
	LDA.w $000E,y
	BEQ.b CODE_ABB020
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABB020:
	LDA.w $000F,y
	BEQ.b CODE_ABB035
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABB035:
	LDA.w $0010,y
	BEQ.b CODE_ABB046
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABB046:
	LDA.w $0011,y
	BEQ.b CODE_ABB05B
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABB05B:
	LDA.w $0012,y
	BEQ.b CODE_ABB06C
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABB06C:
	LDA.w $0013,y
	BEQ.b CODE_ABB081
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABB081:
	LDA.w $0014,y
	BEQ.b CODE_ABB092
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABB092:
	LDA.w $0015,y
	BEQ.b CODE_ABB0A7
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABB0A7:
	LDA.w $0016,y
	BEQ.b CODE_ABB0B8
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_ABB0B8:
	LDA.w $0017,y
	BEQ.b CODE_ABB0CD
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABB0CD:
	LDA.w $0018,y
	BEQ.b CODE_ABB0DE
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABB0DE:
	LDA.w $0019,y
	BEQ.b CODE_ABB0EF
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABB0EF:
	LDA.w $001A,y
	BEQ.b CODE_ABB104
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABB104:
	LDA.w $001B,y
	BEQ.b CODE_ABB115
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABB115:
	LDA.w $001C,y
	BEQ.b CODE_ABB12A
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABB12A:
	LDA.w $001D,y
	BEQ.b CODE_ABB13B
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABB13B:
	LDA.w $001E,y
	BEQ.b CODE_ABB150
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABB150:
	LDA.w $001F,y
	BEQ.b CODE_ABB161
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABB161:
	LDA.w $0020,y
	BEQ.b CODE_ABB176
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABB176:
	LDA.w $0021,y
	BEQ.b CODE_ABB187
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABB187:
	LDA.w $0022,y
	BEQ.b CODE_ABB19C
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABB19C:
	LDA.w $0023,y
	BEQ.b CODE_ABB1AD
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABB1AD:
	LDA.w $0024,y
	BEQ.b CODE_ABB1BE
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABB1BE:
	LDA.w $0025,y
	BEQ.b CODE_ABB1D3
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABB1D3:
	LDA.w $0026,y
	BEQ.b CODE_ABB1E4
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABB1E4:
	LDA.w $0027,y
	BEQ.b CODE_ABB1F9
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABB1F9:
	LDA.w $0028,y
	BEQ.b CODE_ABB20A
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABB20A:
	LDA.w $0029,y
	BEQ.b CODE_ABB21F
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABB21F:
	LDA.w $002A,y
	BEQ.b CODE_ABB230
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABB230:
	LDA.w $002B,y
	BEQ.b CODE_ABB245
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABB245:
	LDA.w $002C,y
	BEQ.b CODE_ABB256
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABB256:
	LDA.w $002D,y
	BEQ.b CODE_ABB26B
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABB26B:
	LDA.w $002E,y
	BEQ.b CODE_ABB27C
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABB27C:
	LDA.w $002F,y
	BEQ.b CODE_ABB291
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABB291:
	LDA.w $0030,y
	BEQ.b CODE_ABB2A2
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABB2A2:
	LDA.w $0031,y
	BEQ.b CODE_ABB2B3
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABB2B3:
	LDA.w $0032,y
	BEQ.b CODE_ABB2BC
	STA.l $7F3F80,x
CODE_ABB2BC:
	REP.b #$20
	RTL

CODE_ABB2BF:
	SEP.b #$20
	LDA.w $000D,y
	BEQ.b CODE_ABB2D2
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABB2D2:
	LDA.w $000E,y
	BEQ.b CODE_ABB2E3
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABB2E3:
	LDA.w $000F,y
	BEQ.b CODE_ABB2F8
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABB2F8:
	LDA.w $0010,y
	BEQ.b CODE_ABB309
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABB309:
	LDA.w $0011,y
	BEQ.b CODE_ABB31E
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABB31E:
	LDA.w $0012,y
	BEQ.b CODE_ABB32F
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABB32F:
	LDA.w $0013,y
	BEQ.b CODE_ABB344
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABB344:
	LDA.w $0014,y
	BEQ.b CODE_ABB355
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABB355:
	LDA.w $0015,y
	BEQ.b CODE_ABB36A
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABB36A:
	LDA.w $0016,y
	BEQ.b CODE_ABB37B
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_ABB37B:
	LDA.w $0017,y
	BEQ.b CODE_ABB390
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABB390:
	LDA.w $0018,y
	BEQ.b CODE_ABB3A1
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABB3A1:
	LDA.w $0019,y
	BEQ.b CODE_ABB3B6
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABB3B6:
	LDA.w $001A,y
	BEQ.b CODE_ABB3C7
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABB3C7:
	LDA.w $001B,y
	BEQ.b CODE_ABB3DC
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABB3DC:
	LDA.w $001C,y
	BEQ.b CODE_ABB3ED
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABB3ED:
	LDA.w $001D,y
	BEQ.b CODE_ABB402
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_ABB402:
	LDA.w $001E,y
	BEQ.b CODE_ABB413
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABB413:
	LDA.w $001F,y
	BEQ.b CODE_ABB428
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABB428:
	LDA.w $0020,y
	BEQ.b CODE_ABB439
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABB439:
	LDA.w $0021,y
	BEQ.b CODE_ABB44E
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABB44E:
	LDA.w $0022,y
	BEQ.b CODE_ABB45F
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABB45F:
	LDA.w $0023,y
	BEQ.b CODE_ABB474
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABB474:
	LDA.w $0024,y
	BEQ.b CODE_ABB485
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABB485:
	LDA.w $0025,y
	BEQ.b CODE_ABB49A
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABB49A:
	LDA.w $0026,y
	BEQ.b CODE_ABB4AB
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABB4AB:
	LDA.w $0027,y
	BEQ.b CODE_ABB4C0
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABB4C0:
	LDA.w $0028,y
	BEQ.b CODE_ABB4D1
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABB4D1:
	LDA.w $0029,y
	BEQ.b CODE_ABB4E6
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABB4E6:
	LDA.w $002A,y
	BEQ.b CODE_ABB4F7
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABB4F7:
	LDA.w $002B,y
	BEQ.b CODE_ABB50C
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABB50C:
	LDA.w $002C,y
	BEQ.b CODE_ABB51D
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABB51D:
	LDA.w $002D,y
	BEQ.b CODE_ABB532
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABB532:
	LDA.w $002E,y
	BEQ.b CODE_ABB543
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABB543:
	LDA.w $002F,y
	BEQ.b CODE_ABB558
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_ABB558:
	LDA.w $0030,y
	BEQ.b CODE_ABB569
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABB569:
	LDA.w $0031,y
	BEQ.b CODE_ABB57A
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABB57A:
	REP.b #$20
	RTL

CODE_ABB57D:
	SEP.b #$20
	LDA.w $000D,y
	BEQ.b CODE_ABB58C
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABB58C:
	LDA.w $000E,y
	BEQ.b CODE_ABB59D
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABB59D:
	LDA.w $000F,y
	BEQ.b CODE_ABB5B2
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_ABB5B2:
	LDA.w $0010,y
	BEQ.b CODE_ABB5C3
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABB5C3:
	LDA.w $0011,y
	BEQ.b CODE_ABB5D8
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_ABB5D8:
	LDA.w $0012,y
	BEQ.b CODE_ABB5E9
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABB5E9:
	LDA.w $0013,y
	BEQ.b CODE_ABB5FE
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABB5FE:
	LDA.w $0014,y
	BEQ.b CODE_ABB60F
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_ABB60F:
	LDA.w $0015,y
	BEQ.b CODE_ABB624
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_ABB624:
	LDA.w $0016,y
	BEQ.b CODE_ABB635
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABB635:
	LDA.w $0017,y
	BEQ.b CODE_ABB64A
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABB64A:
	LDA.w $0018,y
	BEQ.b CODE_ABB65B
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABB65B:
	LDA.w $0019,y
	BEQ.b CODE_ABB670
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABB670:
	LDA.w $001A,y
	BEQ.b CODE_ABB681
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_ABB681:
	LDA.w $001B,y
	BEQ.b CODE_ABB696
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABB696:
	LDA.w $001C,y
	BEQ.b CODE_ABB6A7
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABB6A7:
	LDA.w $001D,y
	BEQ.b CODE_ABB6BC
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABB6BC:
	LDA.w $001E,y
	BEQ.b CODE_ABB6CD
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABB6CD:
	LDA.w $001F,y
	BEQ.b CODE_ABB6E2
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABB6E2:
	LDA.w $0020,y
	BEQ.b CODE_ABB6F3
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABB6F3:
	LDA.w $0021,y
	BEQ.b CODE_ABB708
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABB708:
	LDA.w $0022,y
	BEQ.b CODE_ABB719
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABB719:
	LDA.w $0023,y
	BEQ.b CODE_ABB72E
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABB72E:
	LDA.w $0024,y
	BEQ.b CODE_ABB73F
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABB73F:
	LDA.w $0025,y
	BEQ.b CODE_ABB754
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABB754:
	LDA.w $0026,y
	BEQ.b CODE_ABB765
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABB765:
	LDA.w $0027,y
	BEQ.b CODE_ABB77A
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABB77A:
	LDA.w $0028,y
	BEQ.b CODE_ABB78B
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABB78B:
	LDA.w $0029,y
	BEQ.b CODE_ABB7A0
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABB7A0:
	LDA.w $002A,y
	BEQ.b CODE_ABB7B1
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABB7B1:
	LDA.w $002B,y
	BEQ.b CODE_ABB7C6
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABB7C6:
	LDA.w $002C,y
	BEQ.b CODE_ABB7D7
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABB7D7:
	LDA.w $002D,y
	BEQ.b CODE_ABB7EC
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABB7EC:
	LDA.w $002E,y
	BEQ.b CODE_ABB7FD
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABB7FD:
	LDA.w $002F,y
	BEQ.b CODE_ABB812
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABB812:
	LDA.w $0030,y
	BEQ.b CODE_ABB823
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABB823:
	LDA.w $0031,y
	BEQ.b CODE_ABB838
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABB838:
	REP.b #$20
	RTL

CODE_ABB83B:
	SEP.b #$20
	LDA.w $000D,y
	BEQ.b CODE_ABB846
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABB846:
	LDA.w $000E,y
	BEQ.b CODE_ABB85B
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABB85B:
	LDA.w $000F,y
	BEQ.b CODE_ABB86C
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABB86C:
	LDA.w $0010,y
	BEQ.b CODE_ABB881
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABB881:
	LDA.w $0011,y
	BEQ.b CODE_ABB892
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABB892:
	LDA.w $0012,y
	BEQ.b CODE_ABB8A7
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABB8A7:
	LDA.w $0013,y
	BEQ.b CODE_ABB8BC
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABB8BC:
	LDA.w $0014,y
	BEQ.b CODE_ABB8CD
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_ABB8CD:
	LDA.w $0015,y
	BEQ.b CODE_ABB8E2
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_ABB8E2:
	LDA.w $0016,y
	BEQ.b CODE_ABB8F3
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABB8F3:
	LDA.w $0017,y
	BEQ.b CODE_ABB908
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABB908:
	LDA.w $0018,y
	BEQ.b CODE_ABB919
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABB919:
	LDA.w $0019,y
	BEQ.b CODE_ABB92E
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABB92E:
	LDA.w $001A,y
	BEQ.b CODE_ABB93F
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_ABB93F:
	LDA.w $001B,y
	BEQ.b CODE_ABB954
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABB954:
	LDA.w $001C,y
	BEQ.b CODE_ABB969
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABB969:
	LDA.w $001D,y
	BEQ.b CODE_ABB97A
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABB97A:
	LDA.w $001E,y
	BEQ.b CODE_ABB98F
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABB98F:
	LDA.w $001F,y
	BEQ.b CODE_ABB9A0
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABB9A0:
	LDA.w $0020,y
	BEQ.b CODE_ABB9B5
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABB9B5:
	LDA.w $0021,y
	BEQ.b CODE_ABB9C6
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABB9C6:
	LDA.w $0022,y
	BEQ.b CODE_ABB9DB
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABB9DB:
	LDA.w $0023,y
	BEQ.b CODE_ABB9EC
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABB9EC:
	LDA.w $0024,y
	BEQ.b CODE_ABBA01
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABBA01:
	LDA.w $0025,y
	BEQ.b CODE_ABBA16
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABBA16:
	LDA.w $0026,y
	BEQ.b CODE_ABBA27
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABBA27:
	LDA.w $0027,y
	BEQ.b CODE_ABBA3C
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABBA3C:
	LDA.w $0028,y
	BEQ.b CODE_ABBA4D
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABBA4D:
	LDA.w $0029,y
	BEQ.b CODE_ABBA62
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABBA62:
	LDA.w $002A,y
	BEQ.b CODE_ABBA73
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABBA73:
	LDA.w $002B,y
	BEQ.b CODE_ABBA88
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABBA88:
	LDA.w $002C,y
	BEQ.b CODE_ABBA99
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABBA99:
	LDA.w $002D,y
	BEQ.b CODE_ABBAAE
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABBAAE:
	LDA.w $002E,y
	BEQ.b CODE_ABBAC3
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABBAC3:
	LDA.w $002F,y
	BEQ.b CODE_ABBAD4
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_ABBAD4:
	LDA.w $0030,y
	BEQ.b CODE_ABBAE9
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABBAE9:
	LDA.w $0031,y
	BEQ.b CODE_ABBAF6
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABBAF6:
	REP.b #$20
	RTL

CODE_ABBAF9:
	SEP.b #$20
	LDA.w $000D,y
	BEQ.b CODE_ABBB04
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABBB04:
	LDA.w $000E,y
	BEQ.b CODE_ABBB19
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABBB19:
	LDA.w $000F,y
	BEQ.b CODE_ABBB2A
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABBB2A:
	LDA.w $0010,y
	BEQ.b CODE_ABBB3F
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABBB3F:
	LDA.w $0011,y
	BEQ.b CODE_ABBB50
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABBB50:
	LDA.w $0012,y
	BEQ.b CODE_ABBB65
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABBB65:
	LDA.w $0013,y
	BEQ.b CODE_ABBB7A
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABBB7A:
	LDA.w $0014,y
	BEQ.b CODE_ABBB8B
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_ABBB8B:
	LDA.w $0015,y
	BEQ.b CODE_ABBBA0
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_ABBBA0:
	LDA.w $0016,y
	BEQ.b CODE_ABBBB1
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABBBB1:
	LDA.w $0017,y
	BEQ.b CODE_ABBBC6
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABBBC6:
	LDA.w $0018,y
	BEQ.b CODE_ABBBDB
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABBBDB:
	LDA.w $0019,y
	BEQ.b CODE_ABBBEC
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABBBEC:
	LDA.w $001A,y
	BEQ.b CODE_ABBC01
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABBC01:
	LDA.w $001B,y
	BEQ.b CODE_ABBC12
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABBC12:
	LDA.w $001C,y
	BEQ.b CODE_ABBC27
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABBC27:
	LDA.w $001D,y
	BEQ.b CODE_ABBC3C
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
CODE_ABBC3C:
	LDA.w $001E,y
	BEQ.b CODE_ABBC4D
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABBC4D:
	LDA.w $001F,y
	BEQ.b CODE_ABBC62
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABBC62:
	LDA.w $0020,y
	BEQ.b CODE_ABBC73
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABBC73:
	LDA.w $0021,y
	BEQ.b CODE_ABBC88
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABBC88:
	LDA.w $0022,y
	BEQ.b CODE_ABBC9D
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABBC9D:
	LDA.w $0023,y
	BEQ.b CODE_ABBCAE
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABBCAE:
	LDA.w $0024,y
	BEQ.b CODE_ABBCC3
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABBCC3:
	LDA.w $0025,y
	BEQ.b CODE_ABBCD8
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABBCD8:
	LDA.w $0026,y
	BEQ.b CODE_ABBCE9
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABBCE9:
	LDA.w $0027,y
	BEQ.b CODE_ABBCFE
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABBCFE:
	LDA.w $0028,y
	BEQ.b CODE_ABBD0F
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_ABBD0F:
	LDA.w $0029,y
	BEQ.b CODE_ABBD24
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABBD24:
	LDA.w $002A,y
	BEQ.b CODE_ABBD39
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABBD39:
	LDA.w $002B,y
	BEQ.b CODE_ABBD4A
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABBD4A:
	LDA.w $002C,y
	BEQ.b CODE_ABBD5F
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABBD5F:
	LDA.w $002D,y
	BEQ.b CODE_ABBD70
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABBD70:
	LDA.w $002E,y
	BEQ.b CODE_ABBD85
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABBD85:
	LDA.w $002F,y
	BEQ.b CODE_ABBD9A
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABBD9A:
	LDA.w $0030,y
	BEQ.b CODE_ABBDAB
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABBDAB:
	LDA.w $0031,y
	BEQ.b CODE_ABBDB4
	STA.l $7F3F80,x
CODE_ABBDB4:
	REP.b #$20
	RTL

CODE_ABBDB7:
	SEP.b #$20
	LDA.w $000E,y
	BEQ.b CODE_ABBDCE
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_ABBDCE:
	LDA.w $000F,y
	BEQ.b CODE_ABBDDF
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_ABBDDF:
	LDA.w $0010,y
	BEQ.b CODE_ABBDF4
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABBDF4:
	LDA.w $0011,y
	BEQ.b CODE_ABBE05
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABBE05:
	LDA.w $0012,y
	BEQ.b CODE_ABBE1A
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABBE1A:
	LDA.w $0013,y
	BEQ.b CODE_ABBE2F
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABBE2F:
	LDA.w $0014,y
	BEQ.b CODE_ABBE40
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABBE40:
	LDA.w $0015,y
	BEQ.b CODE_ABBE55
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_ABBE55:
	LDA.w $0016,y
	BEQ.b CODE_ABBE66
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABBE66:
	LDA.w $0017,y
	BEQ.b CODE_ABBE7B
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABBE7B:
	LDA.w $0018,y
	BEQ.b CODE_ABBE90
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABBE90:
	LDA.w $0019,y
	BEQ.b CODE_ABBEA1
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_ABBEA1:
	LDA.w $001A,y
	BEQ.b CODE_ABBEB6
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_ABBEB6:
	LDA.w $001B,y
	BEQ.b CODE_ABBEC7
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_ABBEC7:
	LDA.w $001C,y
	BEQ.b CODE_ABBEDC
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABBEDC:
	LDA.w $001D,y
	BEQ.b CODE_ABBEF1
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABBEF1:
	LDA.w $001E,y
	BEQ.b CODE_ABBF02
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABBF02:
	LDA.w $001F,y
	BEQ.b CODE_ABBF17
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABBF17:
	LDA.w $0020,y
	BEQ.b CODE_ABBF28
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABBF28:
	LDA.w $0021,y
	BEQ.b CODE_ABBF3D
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABBF3D:
	LDA.w $0022,y
	BEQ.b CODE_ABBF52
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABBF52:
	LDA.w $0023,y
	BEQ.b CODE_ABBF63
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABBF63:
	LDA.w $0024,y
	BEQ.b CODE_ABBF78
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABBF78:
	LDA.w $0025,y
	BEQ.b CODE_ABBF8D
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABBF8D:
	LDA.w $0026,y
	BEQ.b CODE_ABBF9E
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABBF9E:
	LDA.w $0027,y
	BEQ.b CODE_ABBFB3
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABBFB3:
	LDA.w $0028,y
	BEQ.b CODE_ABBFC4
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABBFC4:
	LDA.w $0029,y
	BEQ.b CODE_ABBFD9
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABBFD9:
	LDA.w $002A,y
	BEQ.b CODE_ABBFEE
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABBFEE:
	LDA.w $002B,y
	BEQ.b CODE_ABBFFF
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABBFFF:
	LDA.w $002C,y
	BEQ.b CODE_ABC014
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABC014:
	LDA.w $002D,y
	BEQ.b CODE_ABC025
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABC025:
	LDA.w $002E,y
	BEQ.b CODE_ABC03A
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABC03A:
	LDA.w $002F,y
	BEQ.b CODE_ABC04F
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABC04F:
	LDA.w $0030,y
	BEQ.b CODE_ABC060
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABC060:
	LDA.w $0031,y
	BEQ.b CODE_ABC06D
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABC06D:
	REP.b #$20
	RTL

CODE_ABC070:
	SEP.b #$20
	LDA.w $000E,y
	BEQ.b CODE_ABC083
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABC083:
	LDA.w $000F,y
	BEQ.b CODE_ABC098
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_ABC098:
	LDA.w $0010,y
	BEQ.b CODE_ABC0AD
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABC0AD:
	LDA.w $0011,y
	BEQ.b CODE_ABC0BE
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABC0BE:
	LDA.w $0012,y
	BEQ.b CODE_ABC0D3
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABC0D3:
	LDA.w $0013,y
	BEQ.b CODE_ABC0E8
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABC0E8:
	LDA.w $0014,y
	BEQ.b CODE_ABC0F9
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABC0F9:
	LDA.w $0015,y
	BEQ.b CODE_ABC10E
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_ABC10E:
	LDA.w $0016,y
	BEQ.b CODE_ABC123
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABC123:
	LDA.w $0017,y
	BEQ.b CODE_ABC134
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABC134:
	LDA.w $0018,y
	BEQ.b CODE_ABC149
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABC149:
	LDA.w $0019,y
	BEQ.b CODE_ABC15E
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABC15E:
	LDA.w $001A,y
	BEQ.b CODE_ABC16F
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_ABC16F:
	LDA.w $001B,y
	BEQ.b CODE_ABC184
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABC184:
	LDA.w $001C,y
	BEQ.b CODE_ABC199
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABC199:
	LDA.w $001D,y
	BEQ.b CODE_ABC1AA
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABC1AA:
	LDA.w $001E,y
	BEQ.b CODE_ABC1BF
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABC1BF:
	LDA.w $001F,y
	BEQ.b CODE_ABC1D4
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABC1D4:
	LDA.w $0020,y
	BEQ.b CODE_ABC1E5
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABC1E5:
	LDA.w $0021,y
	BEQ.b CODE_ABC1FA
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABC1FA:
	LDA.w $0022,y
	BEQ.b CODE_ABC20B
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABC20B:
	LDA.w $0023,y
	BEQ.b CODE_ABC220
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABC220:
	LDA.w $0024,y
	BEQ.b CODE_ABC235
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABC235:
	LDA.w $0025,y
	BEQ.b CODE_ABC246
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABC246:
	LDA.w $0026,y
	BEQ.b CODE_ABC25B
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABC25B:
	LDA.w $0027,y
	BEQ.b CODE_ABC270
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABC270:
	LDA.w $0028,y
	BEQ.b CODE_ABC281
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_ABC281:
	LDA.w $0029,y
	BEQ.b CODE_ABC296
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABC296:
	LDA.w $002A,y
	BEQ.b CODE_ABC2AB
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABC2AB:
	LDA.w $002B,y
	BEQ.b CODE_ABC2BC
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABC2BC:
	LDA.w $002C,y
	BEQ.b CODE_ABC2D1
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABC2D1:
	LDA.w $002D,y
	BEQ.b CODE_ABC2E6
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABC2E6:
	LDA.w $002E,y
	BEQ.b CODE_ABC2F7
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABC2F7:
	LDA.w $002F,y
	BEQ.b CODE_ABC30C
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABC30C:
	LDA.w $0030,y
	BEQ.b CODE_ABC321
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABC321:
	REP.b #$20
	RTL

CODE_ABC324:
	SEP.b #$20
	LDA.w $000E,y
	BEQ.b CODE_ABC333
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABC333:
	LDA.w $000F,y
	BEQ.b CODE_ABC348
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABC348:
	LDA.w $0010,y
	BEQ.b CODE_ABC35D
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABC35D:
	LDA.w $0011,y
	BEQ.b CODE_ABC36E
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABC36E:
	LDA.w $0012,y
	BEQ.b CODE_ABC383
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABC383:
	LDA.w $0013,y
	BEQ.b CODE_ABC398
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABC398:
	LDA.w $0014,y
	BEQ.b CODE_ABC3A9
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABC3A9:
	LDA.w $0015,y
	BEQ.b CODE_ABC3BE
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABC3BE:
	LDA.w $0016,y
	BEQ.b CODE_ABC3D3
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABC3D3:
	LDA.w $0017,y
	BEQ.b CODE_ABC3E4
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABC3E4:
	LDA.w $0018,y
	BEQ.b CODE_ABC3F9
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_ABC3F9:
	LDA.w $0019,y
	BEQ.b CODE_ABC40E
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_ABC40E:
	LDA.w $001A,y
	BEQ.b CODE_ABC41F
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_ABC41F:
	LDA.w $001B,y
	BEQ.b CODE_ABC434
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_ABC434:
	LDA.w $001C,y
	BEQ.b CODE_ABC449
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABC449:
	LDA.w $001D,y
	BEQ.b CODE_ABC45A
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABC45A:
	LDA.w $001E,y
	BEQ.b CODE_ABC46F
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABC46F:
	LDA.w $001F,y
	BEQ.b CODE_ABC484
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABC484:
	LDA.w $0020,y
	BEQ.b CODE_ABC495
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABC495:
	LDA.w $0021,y
	BEQ.b CODE_ABC4AA
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABC4AA:
	LDA.w $0022,y
	BEQ.b CODE_ABC4BB
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABC4BB:
	LDA.w $0023,y
	BEQ.b CODE_ABC4D0
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABC4D0:
	LDA.w $0024,y
	BEQ.b CODE_ABC4E5
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABC4E5:
	LDA.w $0025,y
	BEQ.b CODE_ABC4F6
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABC4F6:
	LDA.w $0026,y
	BEQ.b CODE_ABC50B
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABC50B:
	LDA.w $0027,y
	BEQ.b CODE_ABC520
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABC520:
	LDA.w $0028,y
	BEQ.b CODE_ABC531
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABC531:
	LDA.w $0029,y
	BEQ.b CODE_ABC546
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABC546:
	LDA.w $002A,y
	BEQ.b CODE_ABC55B
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABC55B:
	LDA.w $002B,y
	BEQ.b CODE_ABC56C
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABC56C:
	LDA.w $002C,y
	BEQ.b CODE_ABC581
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABC581:
	LDA.w $002D,y
	BEQ.b CODE_ABC596
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABC596:
	LDA.w $002E,y
	BEQ.b CODE_ABC5A7
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABC5A7:
	LDA.w $002F,y
	BEQ.b CODE_ABC5BC
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABC5BC:
	LDA.w $0030,y
	BEQ.b CODE_ABC5D1
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABC5D1:
	LDA.w $0031,y
	BEQ.b CODE_ABC5DA
	STA.l $7F3F80,x
CODE_ABC5DA:
	REP.b #$20
	RTL

CODE_ABC5DD:
	SEP.b #$20
	LDA.w $000E,y
	BEQ.b CODE_ABC5EC
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABC5EC:
	LDA.w $000F,y
	BEQ.b CODE_ABC601
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABC601:
	LDA.w $0010,y
	BEQ.b CODE_ABC616
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABC616:
	LDA.w $0011,y
	BEQ.b CODE_ABC627
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABC627:
	LDA.w $0012,y
	BEQ.b CODE_ABC63C
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABC63C:
	LDA.w $0013,y
	BEQ.b CODE_ABC651
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABC651:
	LDA.w $0014,y
	BEQ.b CODE_ABC662
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABC662:
	LDA.w $0015,y
	BEQ.b CODE_ABC677
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABC677:
	LDA.w $0016,y
	BEQ.b CODE_ABC68C
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABC68C:
	LDA.w $0017,y
	BEQ.b CODE_ABC6A1
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABC6A1:
	LDA.w $0018,y
	BEQ.b CODE_ABC6B2
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_ABC6B2:
	LDA.w $0019,y
	BEQ.b CODE_ABC6C7
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_ABC6C7:
	LDA.w $001A,y
	BEQ.b CODE_ABC6DC
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_ABC6DC:
	LDA.w $001B,y
	BEQ.b CODE_ABC6ED
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_ABC6ED:
	LDA.w $001C,y
	BEQ.b CODE_ABC702
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABC702:
	LDA.w $001D,y
	BEQ.b CODE_ABC717
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABC717:
	LDA.w $001E,y
	BEQ.b CODE_ABC72C
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABC72C:
	LDA.w $001F,y
	BEQ.b CODE_ABC73D
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABC73D:
	LDA.w $0020,y
	BEQ.b CODE_ABC752
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABC752:
	LDA.w $0021,y
	BEQ.b CODE_ABC767
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABC767:
	LDA.w $0022,y
	BEQ.b CODE_ABC778
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABC778:
	LDA.w $0023,y
	BEQ.b CODE_ABC78D
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABC78D:
	LDA.w $0024,y
	BEQ.b CODE_ABC7A2
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABC7A2:
	LDA.w $0025,y
	BEQ.b CODE_ABC7B3
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABC7B3:
	LDA.w $0026,y
	BEQ.b CODE_ABC7C8
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABC7C8:
	LDA.w $0027,y
	BEQ.b CODE_ABC7DD
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABC7DD:
	LDA.w $0028,y
	BEQ.b CODE_ABC7F2
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABC7F2:
	LDA.w $0029,y
	BEQ.b CODE_ABC803
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABC803:
	LDA.w $002A,y
	BEQ.b CODE_ABC818
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABC818:
	LDA.w $002B,y
	BEQ.b CODE_ABC82D
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABC82D:
	LDA.w $002C,y
	BEQ.b CODE_ABC83E
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABC83E:
	LDA.w $002D,y
	BEQ.b CODE_ABC853
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABC853:
	LDA.w $002E,y
	BEQ.b CODE_ABC868
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABC868:
	LDA.w $002F,y
	BEQ.b CODE_ABC87D
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABC87D:
	LDA.w $0030,y
	BEQ.b CODE_ABC88E
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABC88E:
	REP.b #$20
	RTL

CODE_ABC891:
	SEP.b #$20
	LDA.w $000E,y
	BEQ.b CODE_ABC8A0
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABC8A0:
	LDA.w $000F,y
	BEQ.b CODE_ABC8B5
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABC8B5:
	LDA.w $0010,y
	BEQ.b CODE_ABC8C6
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_ABC8C6:
	LDA.w $0011,y
	BEQ.b CODE_ABC8DB
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABC8DB:
	LDA.w $0012,y
	BEQ.b CODE_ABC8F0
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABC8F0:
	LDA.w $0013,y
	BEQ.b CODE_ABC905
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABC905:
	LDA.w $0014,y
	BEQ.b CODE_ABC91A
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABC91A:
	LDA.w $0015,y
	BEQ.b CODE_ABC92B
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABC92B:
	LDA.w $0016,y
	BEQ.b CODE_ABC940
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABC940:
	LDA.w $0017,y
	BEQ.b CODE_ABC955
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABC955:
	LDA.w $0018,y
	BEQ.b CODE_ABC96A
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABC96A:
	LDA.w $0019,y
	BEQ.b CODE_ABC97B
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_ABC97B:
	LDA.w $001A,y
	BEQ.b CODE_ABC990
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_ABC990:
	LDA.w $001B,y
	BEQ.b CODE_ABC9A5
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
CODE_ABC9A5:
	LDA.w $001C,y
	BEQ.b CODE_ABC9BA
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
CODE_ABC9BA:
	LDA.w $001D,y
	BEQ.b CODE_ABC9CB
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABC9CB:
	LDA.w $001E,y
	BEQ.b CODE_ABC9E0
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABC9E0:
	LDA.w $001F,y
	BEQ.b CODE_ABC9F5
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABC9F5:
	LDA.w $0020,y
	BEQ.b CODE_ABCA0A
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_ABCA0A:
	LDA.w $0021,y
	BEQ.b CODE_ABCA1B
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABCA1B:
	LDA.w $0022,y
	BEQ.b CODE_ABCA30
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABCA30:
	LDA.w $0023,y
	BEQ.b CODE_ABCA45
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABCA45:
	LDA.w $0024,y
	BEQ.b CODE_ABCA5A
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABCA5A:
	LDA.w $0025,y
	BEQ.b CODE_ABCA6F
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABCA6F:
	LDA.w $0026,y
	BEQ.b CODE_ABCA80
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABCA80:
	LDA.w $0027,y
	BEQ.b CODE_ABCA95
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABCA95:
	LDA.w $0028,y
	BEQ.b CODE_ABCAAA
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABCAAA:
	LDA.w $0029,y
	BEQ.b CODE_ABCABF
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABCABF:
	LDA.w $002A,y
	BEQ.b CODE_ABCAD0
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABCAD0:
	LDA.w $002B,y
	BEQ.b CODE_ABCAE5
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABCAE5:
	LDA.w $002C,y
	BEQ.b CODE_ABCAFA
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABCAFA:
	LDA.w $002D,y
	BEQ.b CODE_ABCB0F
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABCB0F:
	LDA.w $002E,y
	BEQ.b CODE_ABCB20
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_ABCB20:
	LDA.w $002F,y
	BEQ.b CODE_ABCB35
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABCB35:
	LDA.w $0030,y
	BEQ.b CODE_ABCB42
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABCB42:
	REP.b #$20
	RTL

CODE_ABCB45:
	SEP.b #$20
	LDA.w $000E,y
	BEQ.b CODE_ABCB50
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABCB50:
	LDA.w $000F,y
	BEQ.b CODE_ABCB65
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABCB65:
	LDA.w $0010,y
	BEQ.b CODE_ABCB76
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABCB76:
	LDA.w $0011,y
	BEQ.b CODE_ABCB8B
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABCB8B:
	LDA.w $0012,y
	BEQ.b CODE_ABCBA0
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_ABCBA0:
	LDA.w $0013,y
	BEQ.b CODE_ABCBB5
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABCBB5:
	LDA.w $0014,y
	BEQ.b CODE_ABCBCA
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABCBCA:
	LDA.w $0015,y
	BEQ.b CODE_ABCBDB
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABCBDB:
	LDA.w $0016,y
	BEQ.b CODE_ABCBF0
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABCBF0:
	LDA.w $0017,y
	BEQ.b CODE_ABCC05
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABCC05:
	LDA.w $0018,y
	BEQ.b CODE_ABCC1A
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_ABCC1A:
	LDA.w $0019,y
	BEQ.b CODE_ABCC2B
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABCC2B:
	LDA.w $001A,y
	BEQ.b CODE_ABCC40
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_ABCC40:
	LDA.w $001B,y
	BEQ.b CODE_ABCC55
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_ABCC55:
	LDA.w $001C,y
	BEQ.b CODE_ABCC6A
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABCC6A:
	LDA.w $001D,y
	BEQ.b CODE_ABCC7B
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABCC7B:
	LDA.w $001E,y
	BEQ.b CODE_ABCC90
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABCC90:
	LDA.w $001F,y
	BEQ.b CODE_ABCCA5
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABCCA5:
	LDA.w $0020,y
	BEQ.b CODE_ABCCBA
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABCCBA:
	LDA.w $0021,y
	BEQ.b CODE_ABCCCB
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABCCCB:
	LDA.w $0022,y
	BEQ.b CODE_ABCCE0
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABCCE0:
	LDA.w $0023,y
	BEQ.b CODE_ABCCF5
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABCCF5:
	LDA.w $0024,y
	BEQ.b CODE_ABCD0A
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABCD0A:
	LDA.w $0025,y
	BEQ.b CODE_ABCD1F
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABCD1F:
	LDA.w $0026,y
	BEQ.b CODE_ABCD30
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABCD30:
	LDA.w $0027,y
	BEQ.b CODE_ABCD45
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABCD45:
	LDA.w $0028,y
	BEQ.b CODE_ABCD5A
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABCD5A:
	LDA.w $0029,y
	BEQ.b CODE_ABCD6F
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABCD6F:
	LDA.w $002A,y
	BEQ.b CODE_ABCD80
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABCD80:
	LDA.w $002B,y
	BEQ.b CODE_ABCD95
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABCD95:
	LDA.w $002C,y
	BEQ.b CODE_ABCDAA
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABCDAA:
	LDA.w $002D,y
	BEQ.b CODE_ABCDBF
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABCDBF:
	LDA.w $002E,y
	BEQ.b CODE_ABCDD0
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABCDD0:
	LDA.w $002F,y
	BEQ.b CODE_ABCDE5
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABCDE5:
	LDA.w $0030,y
	BEQ.b CODE_ABCDF6
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABCDF6:
	REP.b #$20
	RTL

CODE_ABCDF9:
	SEP.b #$20
	LDA.w $000E,y
	BEQ.b CODE_ABCE04
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABCE04:
	LDA.w $000F,y
	BEQ.b CODE_ABCE19
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABCE19:
	LDA.w $0010,y
	BEQ.b CODE_ABCE2A
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABCE2A:
	LDA.w $0011,y
	BEQ.b CODE_ABCE3F
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABCE3F:
	LDA.w $0012,y
	BEQ.b CODE_ABCE54
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_ABCE54:
	LDA.w $0013,y
	BEQ.b CODE_ABCE69
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABCE69:
	LDA.w $0014,y
	BEQ.b CODE_ABCE7E
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABCE7E:
	LDA.w $0015,y
	BEQ.b CODE_ABCE93
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABCE93:
	LDA.w $0016,y
	BEQ.b CODE_ABCEA4
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABCEA4:
	LDA.w $0017,y
	BEQ.b CODE_ABCEB9
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABCEB9:
	LDA.w $0018,y
	BEQ.b CODE_ABCECE
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_ABCECE:
	LDA.w $0019,y
	BEQ.b CODE_ABCEE3
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
CODE_ABCEE3:
	LDA.w $001A,y
	BEQ.b CODE_ABCEF8
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
CODE_ABCEF8:
	LDA.w $001B,y
	BEQ.b CODE_ABCF09
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_ABCF09:
	LDA.w $001C,y
	BEQ.b CODE_ABCF1E
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABCF1E:
	LDA.w $001D,y
	BEQ.b CODE_ABCF33
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABCF33:
	LDA.w $001E,y
	BEQ.b CODE_ABCF48
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABCF48:
	LDA.w $001F,y
	BEQ.b CODE_ABCF5D
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABCF5D:
	LDA.w $0020,y
	BEQ.b CODE_ABCF72
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_ABCF72:
	LDA.w $0021,y
	BEQ.b CODE_ABCF83
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABCF83:
	LDA.w $0022,y
	BEQ.b CODE_ABCF98
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABCF98:
	LDA.w $0023,y
	BEQ.b CODE_ABCFAD
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABCFAD:
	LDA.w $0024,y
	BEQ.b CODE_ABCFC2
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABCFC2:
	LDA.w $0025,y
	BEQ.b CODE_ABCFD7
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABCFD7:
	LDA.w $0026,y
	BEQ.b CODE_ABCFEC
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABCFEC:
	LDA.w $0027,y
	BEQ.b CODE_ABCFFD
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABCFFD:
	LDA.w $0028,y
	BEQ.b CODE_ABD012
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABD012:
	LDA.w $0029,y
	BEQ.b CODE_ABD027
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABD027:
	LDA.w $002A,y
	BEQ.b CODE_ABD03C
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABD03C:
	LDA.w $002B,y
	BEQ.b CODE_ABD051
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABD051:
	LDA.w $002C,y
	BEQ.b CODE_ABD062
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABD062:
	LDA.w $002D,y
	BEQ.b CODE_ABD077
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABD077:
	LDA.w $002E,y
	BEQ.b CODE_ABD08C
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABD08C:
	LDA.w $002F,y
	BEQ.b CODE_ABD0A1
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABD0A1:
	LDA.w $0030,y
	BEQ.b CODE_ABD0AA
	STA.l $7F3F80,x
CODE_ABD0AA:
	REP.b #$20
	RTL

CODE_ABD0AD:
	SEP.b #$20
	LDA.w $000F,y
	BEQ.b CODE_ABD0C4
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_ABD0C4:
	LDA.w $0010,y
	BEQ.b CODE_ABD0D5
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_ABD0D5:
	LDA.w $0011,y
	BEQ.b CODE_ABD0EA
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABD0EA:
	LDA.w $0012,y
	BEQ.b CODE_ABD0FF
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABD0FF:
	LDA.w $0013,y
	BEQ.b CODE_ABD114
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABD114:
	LDA.w $0014,y
	BEQ.b CODE_ABD129
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABD129:
	LDA.w $0015,y
	BEQ.b CODE_ABD13E
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABD13E:
	LDA.w $0016,y
	BEQ.b CODE_ABD14F
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_ABD14F:
	LDA.w $0017,y
	BEQ.b CODE_ABD164
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_ABD164:
	LDA.w $0018,y
	BEQ.b CODE_ABD179
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABD179:
	LDA.w $0019,y
	BEQ.b CODE_ABD18E
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABD18E:
	LDA.w $001A,y
	BEQ.b CODE_ABD1A3
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_ABD1A3:
	LDA.w $001B,y
	BEQ.b CODE_ABD1B4
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABD1B4:
	LDA.w $001C,y
	BEQ.b CODE_ABD1C9
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABD1C9:
	LDA.w $001D,y
	BEQ.b CODE_ABD1DE
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABD1DE:
	LDA.w $001E,y
	BEQ.b CODE_ABD1F3
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABD1F3:
	LDA.w $001F,y
	BEQ.b CODE_ABD208
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABD208:
	LDA.w $0020,y
	BEQ.b CODE_ABD21D
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABD21D:
	LDA.w $0021,y
	BEQ.b CODE_ABD22E
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABD22E:
	LDA.w $0022,y
	BEQ.b CODE_ABD243
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABD243:
	LDA.w $0023,y
	BEQ.b CODE_ABD258
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABD258:
	LDA.w $0024,y
	BEQ.b CODE_ABD26D
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABD26D:
	LDA.w $0025,y
	BEQ.b CODE_ABD282
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABD282:
	LDA.w $0026,y
	BEQ.b CODE_ABD297
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABD297:
	LDA.w $0027,y
	BEQ.b CODE_ABD2A8
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABD2A8:
	LDA.w $0028,y
	BEQ.b CODE_ABD2BD
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABD2BD:
	LDA.w $0029,y
	BEQ.b CODE_ABD2D2
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABD2D2:
	LDA.w $002A,y
	BEQ.b CODE_ABD2E7
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABD2E7:
	LDA.w $002B,y
	BEQ.b CODE_ABD2FC
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABD2FC:
	LDA.w $002C,y
	BEQ.b CODE_ABD30D
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABD30D:
	LDA.w $002D,y
	BEQ.b CODE_ABD322
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABD322:
	LDA.w $002E,y
	BEQ.b CODE_ABD337
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_ABD337:
	LDA.w $002F,y
	BEQ.b CODE_ABD34C
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABD34C:
	LDA.w $0030,y
	BEQ.b CODE_ABD359
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABD359:
	REP.b #$20
	RTL

CODE_ABD35C:
	SEP.b #$20
	LDA.w $000F,y
	BEQ.b CODE_ABD373
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_ABD373:
	LDA.w $0010,y
	BEQ.b CODE_ABD384
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_ABD384:
	LDA.w $0011,y
	BEQ.b CODE_ABD399
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABD399:
	LDA.w $0012,y
	BEQ.b CODE_ABD3AE
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABD3AE:
	LDA.w $0013,y
	BEQ.b CODE_ABD3C3
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABD3C3:
	LDA.w $0014,y
	BEQ.b CODE_ABD3D8
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABD3D8:
	LDA.w $0015,y
	BEQ.b CODE_ABD3ED
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABD3ED:
	LDA.w $0016,y
	BEQ.b CODE_ABD402
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABD402:
	LDA.w $0017,y
	BEQ.b CODE_ABD417
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABD417:
	LDA.w $0018,y
	BEQ.b CODE_ABD428
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABD428:
	LDA.w $0019,y
	BEQ.b CODE_ABD43D
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABD43D:
	LDA.w $001A,y
	BEQ.b CODE_ABD452
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_ABD452:
	LDA.w $001B,y
	BEQ.b CODE_ABD467
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_ABD467:
	LDA.w $001C,y
	BEQ.b CODE_ABD47C
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABD47C:
	LDA.w $001D,y
	BEQ.b CODE_ABD491
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABD491:
	LDA.w $001E,y
	BEQ.b CODE_ABD4A6
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABD4A6:
	LDA.w $001F,y
	BEQ.b CODE_ABD4BB
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABD4BB:
	LDA.w $0020,y
	BEQ.b CODE_ABD4CC
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABD4CC:
	LDA.w $0021,y
	BEQ.b CODE_ABD4E1
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABD4E1:
	LDA.w $0022,y
	BEQ.b CODE_ABD4F6
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABD4F6:
	LDA.w $0023,y
	BEQ.b CODE_ABD50B
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABD50B:
	LDA.w $0024,y
	BEQ.b CODE_ABD520
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABD520:
	LDA.w $0025,y
	BEQ.b CODE_ABD535
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABD535:
	LDA.w $0026,y
	BEQ.b CODE_ABD54A
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABD54A:
	LDA.w $0027,y
	BEQ.b CODE_ABD55F
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABD55F:
	LDA.w $0028,y
	BEQ.b CODE_ABD574
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABD574:
	LDA.w $0029,y
	BEQ.b CODE_ABD585
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABD585:
	LDA.w $002A,y
	BEQ.b CODE_ABD59A
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABD59A:
	LDA.w $002B,y
	BEQ.b CODE_ABD5AF
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABD5AF:
	LDA.w $002C,y
	BEQ.b CODE_ABD5C4
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABD5C4:
	LDA.w $002D,y
	BEQ.b CODE_ABD5D9
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABD5D9:
	LDA.w $002E,y
	BEQ.b CODE_ABD5EE
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABD5EE:
	LDA.w $002F,y
	BEQ.b CODE_ABD603
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABD603:
	REP.b #$20
	RTL

CODE_ABD606:
	SEP.b #$20
	LDA.w $000F,y
	BEQ.b CODE_ABD619
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABD619:
	LDA.w $0010,y
	BEQ.b CODE_ABD62A
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABD62A:
	LDA.w $0011,y
	BEQ.b CODE_ABD63F
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABD63F:
	LDA.w $0012,y
	BEQ.b CODE_ABD654
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABD654:
	LDA.w $0013,y
	BEQ.b CODE_ABD669
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABD669:
	LDA.w $0014,y
	BEQ.b CODE_ABD67E
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABD67E:
	LDA.w $0015,y
	BEQ.b CODE_ABD693
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_ABD693:
	LDA.w $0016,y
	BEQ.b CODE_ABD6A8
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_ABD6A8:
	LDA.w $0017,y
	BEQ.b CODE_ABD6BD
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_ABD6BD:
	LDA.w $0018,y
	BEQ.b CODE_ABD6CE
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABD6CE:
	LDA.w $0019,y
	BEQ.b CODE_ABD6E3
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABD6E3:
	LDA.w $001A,y
	BEQ.b CODE_ABD6F8
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABD6F8:
	LDA.w $001B,y
	BEQ.b CODE_ABD70D
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABD70D:
	LDA.w $001C,y
	BEQ.b CODE_ABD722
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABD722:
	LDA.w $001D,y
	BEQ.b CODE_ABD737
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABD737:
	LDA.w $001E,y
	BEQ.b CODE_ABD74C
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABD74C:
	LDA.w $001F,y
	BEQ.b CODE_ABD761
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABD761:
	LDA.w $0020,y
	BEQ.b CODE_ABD772
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABD772:
	LDA.w $0021,y
	BEQ.b CODE_ABD787
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABD787:
	LDA.w $0022,y
	BEQ.b CODE_ABD79C
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABD79C:
	LDA.w $0023,y
	BEQ.b CODE_ABD7B1
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABD7B1:
	LDA.w $0024,y
	BEQ.b CODE_ABD7C6
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABD7C6:
	LDA.w $0025,y
	BEQ.b CODE_ABD7DB
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABD7DB:
	LDA.w $0026,y
	BEQ.b CODE_ABD7F0
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABD7F0:
	LDA.w $0027,y
	BEQ.b CODE_ABD805
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABD805:
	LDA.w $0028,y
	BEQ.b CODE_ABD81A
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABD81A:
	LDA.w $0029,y
	BEQ.b CODE_ABD82B
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABD82B:
	LDA.w $002A,y
	BEQ.b CODE_ABD840
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABD840:
	LDA.w $002B,y
	BEQ.b CODE_ABD855
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABD855:
	LDA.w $002C,y
	BEQ.b CODE_ABD86A
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABD86A:
	LDA.w $002D,y
	BEQ.b CODE_ABD87F
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABD87F:
	LDA.w $002E,y
	BEQ.b CODE_ABD894
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABD894:
	LDA.w $002F,y
	BEQ.b CODE_ABD8A9
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABD8A9:
	LDA.w $0030,y
	BEQ.b CODE_ABD8B2
	STA.l $7F3F80,x
CODE_ABD8B2:
	REP.b #$20
	RTL

CODE_ABD8B5:
	SEP.b #$20
	LDA.w $000F,y
	BEQ.b CODE_ABD8C8
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABD8C8:
	LDA.w $0010,y
	BEQ.b CODE_ABD8D9
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABD8D9:
	LDA.w $0011,y
	BEQ.b CODE_ABD8EE
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABD8EE:
	LDA.w $0012,y
	BEQ.b CODE_ABD903
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABD903:
	LDA.w $0013,y
	BEQ.b CODE_ABD918
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABD918:
	LDA.w $0014,y
	BEQ.b CODE_ABD92D
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABD92D:
	LDA.w $0015,y
	BEQ.b CODE_ABD942
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_ABD942:
	LDA.w $0016,y
	BEQ.b CODE_ABD957
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
CODE_ABD957:
	LDA.w $0017,y
	BEQ.b CODE_ABD96C
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
CODE_ABD96C:
	LDA.w $0018,y
	BEQ.b CODE_ABD981
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
CODE_ABD981:
	LDA.w $0019,y
	BEQ.b CODE_ABD996
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
CODE_ABD996:
	LDA.w $001A,y
	BEQ.b CODE_ABD9AB
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
	STA.l $7F1680,x
CODE_ABD9AB:
	LDA.w $001B,y
	BEQ.b CODE_ABD9C0
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
	STA.l $7F1880,x
CODE_ABD9C0:
	LDA.w $001C,y
	BEQ.b CODE_ABD9D5
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
	STA.l $7F1A80,x
CODE_ABD9D5:
	LDA.w $001D,y
	BEQ.b CODE_ABD9EA
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABD9EA:
	LDA.w $001E,y
	BEQ.b CODE_ABD9FF
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABD9FF:
	LDA.w $001F,y
	BEQ.b CODE_ABDA14
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABDA14:
	LDA.w $0020,y
	BEQ.b CODE_ABDA25
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABDA25:
	LDA.w $0021,y
	BEQ.b CODE_ABDA3A
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABDA3A:
	LDA.w $0022,y
	BEQ.b CODE_ABDA4F
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABDA4F:
	LDA.w $0023,y
	BEQ.b CODE_ABDA64
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABDA64:
	LDA.w $0024,y
	BEQ.b CODE_ABDA79
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABDA79:
	LDA.w $0025,y
	BEQ.b CODE_ABDA8E
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABDA8E:
	LDA.w $0026,y
	BEQ.b CODE_ABDAA3
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABDAA3:
	LDA.w $0027,y
	BEQ.b CODE_ABDAB8
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABDAB8:
	LDA.w $0028,y
	BEQ.b CODE_ABDACD
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABDACD:
	LDA.w $0029,y
	BEQ.b CODE_ABDAE2
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABDAE2:
	LDA.w $002A,y
	BEQ.b CODE_ABDAF7
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABDAF7:
	LDA.w $002B,y
	BEQ.b CODE_ABDB0C
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABDB0C:
	LDA.w $002C,y
	BEQ.b CODE_ABDB21
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABDB21:
	LDA.w $002D,y
	BEQ.b CODE_ABDB36
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABDB36:
	LDA.w $002E,y
	BEQ.b CODE_ABDB4B
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABDB4B:
	LDA.w $002F,y
	BEQ.b CODE_ABDB5C
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABDB5C:
	REP.b #$20
	RTL

CODE_ABDB5F:
	SEP.b #$20
	LDA.w $000F,y
	BEQ.b CODE_ABDB6E
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABDB6E:
	LDA.w $0010,y
	BEQ.b CODE_ABDB7F
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABDB7F:
	LDA.w $0011,y
	BEQ.b CODE_ABDB94
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_ABDB94:
	LDA.w $0012,y
	BEQ.b CODE_ABDBA9
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABDBA9:
	LDA.w $0013,y
	BEQ.b CODE_ABDBBE
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABDBBE:
	LDA.w $0014,y
	BEQ.b CODE_ABDBD3
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABDBD3:
	LDA.w $0015,y
	BEQ.b CODE_ABDBE8
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABDBE8:
	LDA.w $0016,y
	BEQ.b CODE_ABDBFD
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_ABDBFD:
	LDA.w $0017,y
	BEQ.b CODE_ABDC12
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABDC12:
	LDA.w $0018,y
	BEQ.b CODE_ABDC27
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABDC27:
	LDA.w $0019,y
	BEQ.b CODE_ABDC3C
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABDC3C:
	LDA.w $001A,y
	BEQ.b CODE_ABDC51
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABDC51:
	LDA.w $001B,y
	BEQ.b CODE_ABDC66
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABDC66:
	LDA.w $001C,y
	BEQ.b CODE_ABDC7B
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABDC7B:
	LDA.w $001D,y
	BEQ.b CODE_ABDC90
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABDC90:
	LDA.w $001E,y
	BEQ.b CODE_ABDCA5
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABDCA5:
	LDA.w $001F,y
	BEQ.b CODE_ABDCBA
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABDCBA:
	LDA.w $0020,y
	BEQ.b CODE_ABDCCB
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABDCCB:
	LDA.w $0021,y
	BEQ.b CODE_ABDCE0
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABDCE0:
	LDA.w $0022,y
	BEQ.b CODE_ABDCF5
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABDCF5:
	LDA.w $0023,y
	BEQ.b CODE_ABDD0A
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABDD0A:
	LDA.w $0024,y
	BEQ.b CODE_ABDD1F
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABDD1F:
	LDA.w $0025,y
	BEQ.b CODE_ABDD34
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABDD34:
	LDA.w $0026,y
	BEQ.b CODE_ABDD49
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABDD49:
	LDA.w $0027,y
	BEQ.b CODE_ABDD5E
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABDD5E:
	LDA.w $0028,y
	BEQ.b CODE_ABDD73
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABDD73:
	LDA.w $0029,y
	BEQ.b CODE_ABDD88
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABDD88:
	LDA.w $002A,y
	BEQ.b CODE_ABDD9D
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABDD9D:
	LDA.w $002B,y
	BEQ.b CODE_ABDDB2
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABDDB2:
	LDA.w $002C,y
	BEQ.b CODE_ABDDC7
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABDDC7:
	LDA.w $002D,y
	BEQ.b CODE_ABDDDC
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABDDDC:
	LDA.w $002E,y
	BEQ.b CODE_ABDDF1
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABDDF1:
	LDA.w $002F,y
	BEQ.b CODE_ABDE06
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABDE06:
	REP.b #$20
	RTL

CODE_ABDE09:
	SEP.b #$20
	LDA.w $000F,y
	BEQ.b CODE_ABDE14
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABDE14:
	LDA.w $0010,y
	BEQ.b CODE_ABDE29
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABDE29:
	LDA.w $0011,y
	BEQ.b CODE_ABDE3E
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_ABDE3E:
	LDA.w $0012,y
	BEQ.b CODE_ABDE53
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABDE53:
	LDA.w $0013,y
	BEQ.b CODE_ABDE68
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABDE68:
	LDA.w $0014,y
	BEQ.b CODE_ABDE7D
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABDE7D:
	LDA.w $0015,y
	BEQ.b CODE_ABDE92
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABDE92:
	LDA.w $0016,y
	BEQ.b CODE_ABDEA7
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_ABDEA7:
	LDA.w $0017,y
	BEQ.b CODE_ABDEBC
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABDEBC:
	LDA.w $0018,y
	BEQ.b CODE_ABDED1
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABDED1:
	LDA.w $0019,y
	BEQ.b CODE_ABDEE6
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABDEE6:
	LDA.w $001A,y
	BEQ.b CODE_ABDEFB
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABDEFB:
	LDA.w $001B,y
	BEQ.b CODE_ABDF10
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABDF10:
	LDA.w $001C,y
	BEQ.b CODE_ABDF25
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABDF25:
	LDA.w $001D,y
	BEQ.b CODE_ABDF3A
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABDF3A:
	LDA.w $001E,y
	BEQ.b CODE_ABDF4F
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABDF4F:
	LDA.w $001F,y
	BEQ.b CODE_ABDF64
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABDF64:
	LDA.w $0020,y
	BEQ.b CODE_ABDF79
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABDF79:
	LDA.w $0021,y
	BEQ.b CODE_ABDF8E
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABDF8E:
	LDA.w $0022,y
	BEQ.b CODE_ABDFA3
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABDFA3:
	LDA.w $0023,y
	BEQ.b CODE_ABDFB8
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABDFB8:
	LDA.w $0024,y
	BEQ.b CODE_ABDFCD
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABDFCD:
	LDA.w $0025,y
	BEQ.b CODE_ABDFE2
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABDFE2:
	LDA.w $0026,y
	BEQ.b CODE_ABDFF7
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABDFF7:
	LDA.w $0027,y
	BEQ.b CODE_ABE00C
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABE00C:
	LDA.w $0028,y
	BEQ.b CODE_ABE021
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABE021:
	LDA.w $0029,y
	BEQ.b CODE_ABE036
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABE036:
	LDA.w $002A,y
	BEQ.b CODE_ABE04B
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABE04B:
	LDA.w $002B,y
	BEQ.b CODE_ABE060
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABE060:
	LDA.w $002C,y
	BEQ.b CODE_ABE075
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABE075:
	LDA.w $002D,y
	BEQ.b CODE_ABE08A
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABE08A:
	LDA.w $002E,y
	BEQ.b CODE_ABE09F
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABE09F:
	LDA.w $002F,y
	BEQ.b CODE_ABE0B0
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABE0B0:
	REP.b #$20
	RTL

CODE_ABE0B3:
	SEP.b #$20
CODE_ABE0B5:
	LDA.w $0010,y
	BEQ.b CODE_ABE0CA
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_ABE0CA:
	LDA.w $0011,y
	BEQ.b CODE_ABE0DF
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABE0DF:
	LDA.w $0012,y
	BEQ.b CODE_ABE0F4
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABE0F4:
	LDA.w $0013,y
	BEQ.b CODE_ABE109
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_ABE109:
	LDA.w $0014,y
	BEQ.b CODE_ABE11E
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABE11E:
	LDA.w $0015,y
	BEQ.b CODE_ABE133
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABE133:
	LDA.w $0016,y
	BEQ.b CODE_ABE148
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABE148:
	LDA.w $0017,y
	BEQ.b CODE_ABE15D
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABE15D:
	LDA.w $0018,y
	BEQ.b CODE_ABE172
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABE172:
	LDA.w $0019,y
	BEQ.b CODE_ABE187
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABE187:
	LDA.w $001A,y
	BEQ.b CODE_ABE19C
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABE19C:
	LDA.w $001B,y
	BEQ.b CODE_ABE1B1
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABE1B1:
	LDA.w $001C,y
	BEQ.b CODE_ABE1C6
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABE1C6:
	LDA.w $001D,y
	BEQ.b CODE_ABE1DB
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_ABE1DB:
	LDA.w $001E,y
	BEQ.b CODE_ABE1F0
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_ABE1F0:
	LDA.w $001F,y
	BEQ.b CODE_ABE205
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
CODE_ABE205:
	LDA.w $0020,y
	BEQ.b CODE_ABE21A
	STA.l $7F2000,x
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
CODE_ABE21A:
	LDA.w $0021,y
	BEQ.b CODE_ABE22F
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
CODE_ABE22F:
	LDA.w $0022,y
	BEQ.b CODE_ABE244
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
CODE_ABE244:
	LDA.w $0023,y
	BEQ.b CODE_ABE259
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
CODE_ABE259:
	LDA.w $0024,y
	BEQ.b CODE_ABE26E
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABE26E:
	LDA.w $0025,y
	BEQ.b CODE_ABE283
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABE283:
	LDA.w $0026,y
	BEQ.b CODE_ABE298
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABE298:
	LDA.w $0027,y
	BEQ.b CODE_ABE2AD
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABE2AD:
	LDA.w $0028,y
	BEQ.b CODE_ABE2C2
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABE2C2:
	LDA.w $0029,y
	BEQ.b CODE_ABE2D7
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABE2D7:
	LDA.w $002A,y
	BEQ.b CODE_ABE2EC
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABE2EC:
	LDA.w $002B,y
	BEQ.b CODE_ABE301
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABE301:
	LDA.w $002C,y
	BEQ.b CODE_ABE316
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABE316:
	LDA.w $002D,y
	BEQ.b CODE_ABE32B
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABE32B:
	LDA.w $002E,y
	BEQ.b CODE_ABE340
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABE340:
	LDA.w $002F,y
	BEQ.b CODE_ABE355
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABE355:
	REP.b #$20
	RTL

CODE_ABE358:
	SEP.b #$20
	LDA.w $000F,y
	BEQ.b CODE_ABE363
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABE363:
	LDA.w $0010,y
	BEQ.b CODE_ABE378
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABE378:
	LDA.w $0011,y
	BEQ.b CODE_ABE38D
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_ABE38D:
	LDA.w $0012,y
	BEQ.b CODE_ABE3A2
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABE3A2:
	LDA.w $0013,y
	BEQ.b CODE_ABE3B7
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
CODE_ABE3B7:
	LDA.w $0014,y
	BEQ.b CODE_ABE3CC
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
CODE_ABE3CC:
	LDA.w $0015,y
	BEQ.b CODE_ABE3E1
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
CODE_ABE3E1:
	LDA.w $0016,y
	BEQ.b CODE_ABE3F6
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
CODE_ABE3F6:
	LDA.w $0017,y
	BEQ.b CODE_ABE40B
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABE40B:
	LDA.w $0018,y
	BEQ.b CODE_ABE420
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABE420:
	LDA.w $0019,y
	BEQ.b CODE_ABE435
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABE435:
	LDA.w $001A,y
	BEQ.b CODE_ABE44A
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABE44A:
	LDA.w $001B,y
	BEQ.b CODE_ABE45F
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABE45F:
	LDA.w $001C,y
	BEQ.b CODE_ABE474
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABE474:
	LDA.w $001D,y
	BEQ.b CODE_ABE489
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABE489:
	LDA.w $001E,y
	BEQ.b CODE_ABE49E
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABE49E:
	LDA.w $001F,y
	BEQ.b CODE_ABE4B7
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABE4B7:
	LDA.w $0020,y
	BEQ.b CODE_ABE4CC
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_ABE4CC:
	LDA.w $0021,y
	BEQ.b CODE_ABE4E1
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_ABE4E1:
	LDA.w $0022,y
	BEQ.b CODE_ABE4F6
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABE4F6:
	LDA.w $0023,y
	BEQ.b CODE_ABE50B
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABE50B:
	LDA.w $0024,y
	BEQ.b CODE_ABE520
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABE520:
	LDA.w $0025,y
	BEQ.b CODE_ABE535
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABE535:
	LDA.w $0026,y
	BEQ.b CODE_ABE54A
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABE54A:
	LDA.w $0027,y
	BEQ.b CODE_ABE55F
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_ABE55F:
	LDA.w $0028,y
	BEQ.b CODE_ABE574
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABE574:
	LDA.w $0029,y
	BEQ.b CODE_ABE589
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABE589:
	LDA.w $002A,y
	BEQ.b CODE_ABE59E
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABE59E:
	LDA.w $002B,y
	BEQ.b CODE_ABE5B3
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABE5B3:
	LDA.w $002C,y
	BEQ.b CODE_ABE5C8
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABE5C8:
	LDA.w $002D,y
	BEQ.b CODE_ABE5DD
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_ABE5DD:
	LDA.w $002E,y
	BEQ.b CODE_ABE5F2
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABE5F2:
	LDA.w $002F,y
	BEQ.b CODE_ABE5FF
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABE5FF:
	REP.b #$20
	RTL

CODE_ABE602:
	SEP.b #$20
CODE_ABE604:
	LDA.w $0010,y
	BEQ.b CODE_ABE619
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_ABE619:
	LDA.w $0011,y
	BEQ.b CODE_ABE62E
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABE62E:
	LDA.w $0012,y
	BEQ.b CODE_ABE643
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABE643:
	LDA.w $0013,y
	BEQ.b CODE_ABE658
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_ABE658:
	LDA.w $0014,y
	BEQ.b CODE_ABE66D
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABE66D:
	LDA.w $0015,y
	BEQ.b CODE_ABE682
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABE682:
	LDA.w $0016,y
	BEQ.b CODE_ABE697
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABE697:
	LDA.w $0017,y
	BEQ.b CODE_ABE6AC
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABE6AC:
	LDA.w $0018,y
	BEQ.b CODE_ABE6C1
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABE6C1:
	LDA.w $0019,y
	BEQ.b CODE_ABE6D6
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABE6D6:
	LDA.w $001A,y
	BEQ.b CODE_ABE6EB
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABE6EB:
	LDA.w $001B,y
	BEQ.b CODE_ABE700
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABE700:
	LDA.w $001C,y
	BEQ.b CODE_ABE715
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABE715:
	LDA.w $001D,y
	BEQ.b CODE_ABE72A
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_ABE72A:
	LDA.w $001E,y
	BEQ.b CODE_ABE73F
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_ABE73F:
	LDA.w $001F,y
	BEQ.b CODE_ABE758
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABE758:
	LDA.w $0020,y
	BEQ.b CODE_ABE76D
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABE76D:
	LDA.w $0021,y
	BEQ.b CODE_ABE782
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABE782:
	LDA.w $0022,y
	BEQ.b CODE_ABE797
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABE797:
	LDA.w $0023,y
	BEQ.b CODE_ABE7AC
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABE7AC:
	LDA.w $0024,y
	BEQ.b CODE_ABE7C1
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABE7C1:
	LDA.w $0025,y
	BEQ.b CODE_ABE7D6
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABE7D6:
	LDA.w $0026,y
	BEQ.b CODE_ABE7EB
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
CODE_ABE7EB:
	LDA.w $0027,y
	BEQ.b CODE_ABE800
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABE800:
	LDA.w $0028,y
	BEQ.b CODE_ABE815
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABE815:
	LDA.w $0029,y
	BEQ.b CODE_ABE82A
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABE82A:
	LDA.w $002A,y
	BEQ.b CODE_ABE83F
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABE83F:
	LDA.w $002B,y
	BEQ.b CODE_ABE854
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABE854:
	LDA.w $002C,y
	BEQ.b CODE_ABE869
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABE869:
	LDA.w $002D,y
	BEQ.b CODE_ABE87E
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABE87E:
	LDA.w $002E,y
	BEQ.b CODE_ABE893
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABE893:
	LDA.w $002F,y
	BEQ.b CODE_ABE8A4
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABE8A4:
	REP.b #$20
	RTL

CODE_ABE8A7:
	SEP.b #$20
CODE_ABE8A9:
	LDA.w $0010,y
	BEQ.b CODE_ABE8BE
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
CODE_ABE8BE:
	LDA.w $0011,y
	BEQ.b CODE_ABE8D3
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
CODE_ABE8D3:
	LDA.w $0012,y
	BEQ.b CODE_ABE8E8
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
CODE_ABE8E8:
	LDA.w $0013,y
	BEQ.b CODE_ABE8FD
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
CODE_ABE8FD:
	LDA.w $0014,y
	BEQ.b CODE_ABE912
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABE912:
	LDA.w $0015,y
	BEQ.b CODE_ABE927
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABE927:
	LDA.w $0016,y
	BEQ.b CODE_ABE93C
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABE93C:
	LDA.w $0017,y
	BEQ.b CODE_ABE955
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
	STA.l $7F1000,x
CODE_ABE955:
	LDA.w $0018,y
	BEQ.b CODE_ABE96A
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
	STA.l $7F1200,x
CODE_ABE96A:
	LDA.w $0019,y
	BEQ.b CODE_ABE97F
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABE97F:
	LDA.w $001A,y
	BEQ.b CODE_ABE994
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABE994:
	LDA.w $001B,y
	BEQ.b CODE_ABE9A9
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABE9A9:
	LDA.w $001C,y
	BEQ.b CODE_ABE9BE
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABE9BE:
	LDA.w $001D,y
	BEQ.b CODE_ABE9D3
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABE9D3:
	LDA.w $001E,y
	BEQ.b CODE_ABE9E8
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABE9E8:
	LDA.w $001F,y
	BEQ.b CODE_ABEA01
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABEA01:
	LDA.w $0020,y
	BEQ.b CODE_ABEA16
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_ABEA16:
	LDA.w $0021,y
	BEQ.b CODE_ABEA2B
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_ABEA2B:
	LDA.w $0022,y
	BEQ.b CODE_ABEA40
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABEA40:
	LDA.w $0023,y
	BEQ.b CODE_ABEA55
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABEA55:
	LDA.w $0024,y
	BEQ.b CODE_ABEA6A
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABEA6A:
	LDA.w $0025,y
	BEQ.b CODE_ABEA7F
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABEA7F:
	LDA.w $0026,y
	BEQ.b CODE_ABEA98
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABEA98:
	LDA.w $0027,y
	BEQ.b CODE_ABEAAD
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABEAAD:
	LDA.w $0028,y
	BEQ.b CODE_ABEAC2
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABEAC2:
	LDA.w $0029,y
	BEQ.b CODE_ABEAD7
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABEAD7:
	LDA.w $002A,y
	BEQ.b CODE_ABEAEC
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABEAEC:
	LDA.w $002B,y
	BEQ.b CODE_ABEB01
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABEB01:
	LDA.w $002C,y
	BEQ.b CODE_ABEB16
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABEB16:
	LDA.w $002D,y
	BEQ.b CODE_ABEB2B
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABEB2B:
	LDA.w $002E,y
	BEQ.b CODE_ABEB44
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABEB44:
	REP.b #$20
	RTL

CODE_ABEB47:
	SEP.b #$20
	LDA.w $0010,y
	BEQ.b CODE_ABEB5A
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABEB5A:
	LDA.w $0011,y
	BEQ.b CODE_ABEB6F
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_ABEB6F:
	LDA.w $0012,y
	BEQ.b CODE_ABEB84
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABEB84:
	LDA.w $0013,y
	BEQ.b CODE_ABEB99
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABEB99:
	LDA.w $0014,y
	BEQ.b CODE_ABEBAE
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABEBAE:
	LDA.w $0015,y
	BEQ.b CODE_ABEBC3
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABEBC3:
	LDA.w $0016,y
	BEQ.b CODE_ABEBD8
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABEBD8:
	LDA.w $0017,y
	BEQ.b CODE_ABEBF1
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABEBF1:
	LDA.w $0018,y
	BEQ.b CODE_ABEC06
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABEC06:
	LDA.w $0019,y
	BEQ.b CODE_ABEC1B
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABEC1B:
	LDA.w $001A,y
	BEQ.b CODE_ABEC30
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABEC30:
	LDA.w $001B,y
	BEQ.b CODE_ABEC45
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABEC45:
	LDA.w $001C,y
	BEQ.b CODE_ABEC5A
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABEC5A:
	LDA.w $001D,y
	BEQ.b CODE_ABEC6F
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_ABEC6F:
	LDA.w $001E,y
	BEQ.b CODE_ABEC84
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
CODE_ABEC84:
	LDA.w $001F,y
	BEQ.b CODE_ABEC9D
	STA.l $7F1E00,x
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABEC9D:
	LDA.w $0020,y
	BEQ.b CODE_ABECB2
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABECB2:
	LDA.w $0021,y
	BEQ.b CODE_ABECC7
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABECC7:
	LDA.w $0022,y
	BEQ.b CODE_ABECDC
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABECDC:
	LDA.w $0023,y
	BEQ.b CODE_ABECF1
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
CODE_ABECF1:
	LDA.w $0024,y
	BEQ.b CODE_ABED06
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
CODE_ABED06:
	LDA.w $0025,y
	BEQ.b CODE_ABED1B
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
CODE_ABED1B:
	LDA.w $0026,y
	BEQ.b CODE_ABED34
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABED34:
	LDA.w $0027,y
	BEQ.b CODE_ABED49
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_ABED49:
	LDA.w $0028,y
	BEQ.b CODE_ABED5E
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
CODE_ABED5E:
	LDA.w $0029,y
	BEQ.b CODE_ABED73
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
CODE_ABED73:
	LDA.w $002A,y
	BEQ.b CODE_ABED88
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABED88:
	LDA.w $002B,y
	BEQ.b CODE_ABED9D
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABED9D:
	LDA.w $002C,y
	BEQ.b CODE_ABEDB2
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABEDB2:
	LDA.w $002D,y
	BEQ.b CODE_ABEDC7
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_ABEDC7:
	LDA.w $002E,y
	BEQ.b CODE_ABEDE0
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABEDE0:
	LDA.w $002F,y
	BEQ.b CODE_ABEDE9
	STA.l $7F3F80,x
CODE_ABEDE9:
	REP.b #$20
	RTL

CODE_ABEDEC:
	SEP.b #$20
	LDA.w $0010,y
	BEQ.b CODE_ABEDFF
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
CODE_ABEDFF:
	LDA.w $0011,y
	BEQ.b CODE_ABEE14
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
	STA.l $7F0300,x
CODE_ABEE14:
	LDA.w $0012,y
	BEQ.b CODE_ABEE29
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABEE29:
	LDA.w $0013,y
	BEQ.b CODE_ABEE3E
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABEE3E:
	LDA.w $0014,y
	BEQ.b CODE_ABEE57
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
	STA.l $7F0980,x
CODE_ABEE57:
	LDA.w $0015,y
	BEQ.b CODE_ABEE6C
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
	STA.l $7F0B80,x
CODE_ABEE6C:
	LDA.w $0016,y
	BEQ.b CODE_ABEE81
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABEE81:
	LDA.w $0017,y
	BEQ.b CODE_ABEE96
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABEE96:
	LDA.w $0018,y
	BEQ.b CODE_ABEEAB
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABEEAB:
	LDA.w $0019,y
	BEQ.b CODE_ABEEC4
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
	STA.l $7F1400,x
CODE_ABEEC4:
	LDA.w $001A,y
	BEQ.b CODE_ABEED9
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABEED9:
	LDA.w $001B,y
	BEQ.b CODE_ABEEEE
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABEEEE:
	LDA.w $001C,y
	BEQ.b CODE_ABEF03
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABEF03:
	LDA.w $001D,y
	BEQ.b CODE_ABEF18
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABEF18:
	LDA.w $001E,y
	BEQ.b CODE_ABEF31
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABEF31:
	LDA.w $001F,y
	BEQ.b CODE_ABEF46
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABEF46:
	LDA.w $0020,y
	BEQ.b CODE_ABEF5B
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_ABEF5B:
	LDA.w $0021,y
	BEQ.b CODE_ABEF70
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_ABEF70:
	LDA.w $0022,y
	BEQ.b CODE_ABEF85
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABEF85:
	LDA.w $0023,y
	BEQ.b CODE_ABEF9E
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABEF9E:
	LDA.w $0024,y
	BEQ.b CODE_ABEFB3
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABEFB3:
	LDA.w $0025,y
	BEQ.b CODE_ABEFC8
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABEFC8:
	LDA.w $0026,y
	BEQ.b CODE_ABEFDD
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABEFDD:
	LDA.w $0027,y
	BEQ.b CODE_ABEFF2
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABEFF2:
	LDA.w $0028,y
	BEQ.b CODE_ABF00B
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABF00B:
	LDA.w $0029,y
	BEQ.b CODE_ABF020
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABF020:
	LDA.w $002A,y
	BEQ.b CODE_ABF035
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABF035:
	LDA.w $002B,y
	BEQ.b CODE_ABF04A
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABF04A:
	LDA.w $002C,y
	BEQ.b CODE_ABF05F
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABF05F:
	LDA.w $002D,y
	BEQ.b CODE_ABF078
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABF078:
	LDA.w $002E,y
	BEQ.b CODE_ABF089
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABF089:
	REP.b #$20
	RTL

CODE_ABF08C:
	SEP.b #$20
	LDA.w $0010,y
	BEQ.b CODE_ABF09B
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABF09B:
	LDA.w $0011,y
	BEQ.b CODE_ABF0B0
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABF0B0:
	LDA.w $0012,y
	BEQ.b CODE_ABF0C5
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABF0C5:
	LDA.w $0013,y
	BEQ.b CODE_ABF0DA
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABF0DA:
	LDA.w $0014,y
	BEQ.b CODE_ABF0F3
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABF0F3:
	LDA.w $0015,y
	BEQ.b CODE_ABF108
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABF108:
	LDA.w $0016,y
	BEQ.b CODE_ABF11D
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABF11D:
	LDA.w $0017,y
	BEQ.b CODE_ABF132
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABF132:
	LDA.w $0018,y
	BEQ.b CODE_ABF147
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABF147:
	LDA.w $0019,y
	BEQ.b CODE_ABF160
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABF160:
	LDA.w $001A,y
	BEQ.b CODE_ABF175
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABF175:
	LDA.w $001B,y
	BEQ.b CODE_ABF18A
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABF18A:
	LDA.w $001C,y
	BEQ.b CODE_ABF19F
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABF19F:
	LDA.w $001D,y
	BEQ.b CODE_ABF1B4
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_ABF1B4:
	LDA.w $001E,y
	BEQ.b CODE_ABF1CD
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABF1CD:
	LDA.w $001F,y
	BEQ.b CODE_ABF1E2
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABF1E2:
	LDA.w $0020,y
	BEQ.b CODE_ABF1F7
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABF1F7:
	LDA.w $0021,y
	BEQ.b CODE_ABF20C
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
CODE_ABF20C:
	LDA.w $0022,y
	BEQ.b CODE_ABF221
	STA.l $7F2480,x
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
CODE_ABF221:
	LDA.w $0023,y
	BEQ.b CODE_ABF23A
	STA.l $7F2680,x
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABF23A:
	LDA.w $0024,y
	BEQ.b CODE_ABF24F
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABF24F:
	LDA.w $0025,y
	BEQ.b CODE_ABF264
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
CODE_ABF264:
	LDA.w $0026,y
	BEQ.b CODE_ABF279
	STA.l $7F2D00,x
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
CODE_ABF279:
	LDA.w $0027,y
	BEQ.b CODE_ABF28E
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
CODE_ABF28E:
	LDA.w $0028,y
	BEQ.b CODE_ABF2A7
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABF2A7:
	LDA.w $0029,y
	BEQ.b CODE_ABF2BC
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
CODE_ABF2BC:
	LDA.w $002A,y
	BEQ.b CODE_ABF2D1
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
CODE_ABF2D1:
	LDA.w $002B,y
	BEQ.b CODE_ABF2E6
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
CODE_ABF2E6:
	LDA.w $002C,y
	BEQ.b CODE_ABF2FB
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
CODE_ABF2FB:
	LDA.w $002D,y
	BEQ.b CODE_ABF314
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
CODE_ABF314:
	LDA.w $002E,y
	BEQ.b CODE_ABF329
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABF329:
	REP.b #$20
	RTL

CODE_ABF32C:
	SEP.b #$20
	LDA.w $0010,y
	BEQ.b CODE_ABF33B
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
CODE_ABF33B:
	LDA.w $0011,y
	BEQ.b CODE_ABF350
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABF350:
	LDA.w $0012,y
	BEQ.b CODE_ABF369
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
	STA.l $7F0500,x
CODE_ABF369:
	LDA.w $0013,y
	BEQ.b CODE_ABF37E
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
	STA.l $7F0700,x
CODE_ABF37E:
	LDA.w $0014,y
	BEQ.b CODE_ABF393
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABF393:
	LDA.w $0015,y
	BEQ.b CODE_ABF3A8
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABF3A8:
	LDA.w $0016,y
	BEQ.b CODE_ABF3C1
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
	STA.l $7F0D80,x
CODE_ABF3C1:
	LDA.w $0017,y
	BEQ.b CODE_ABF3D6
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABF3D6:
	LDA.w $0018,y
	BEQ.b CODE_ABF3EB
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABF3EB:
	LDA.w $0019,y
	BEQ.b CODE_ABF400
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABF400:
	LDA.w $001A,y
	BEQ.b CODE_ABF419
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABF419:
	LDA.w $001B,y
	BEQ.b CODE_ABF42E
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABF42E:
	LDA.w $001C,y
	BEQ.b CODE_ABF443
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABF443:
	LDA.w $001D,y
	BEQ.b CODE_ABF458
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABF458:
	LDA.w $001E,y
	BEQ.b CODE_ABF471
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABF471:
	LDA.w $001F,y
	BEQ.b CODE_ABF486
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABF486:
	LDA.w $0020,y
	BEQ.b CODE_ABF49B
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_ABF49B:
	LDA.w $0021,y
	BEQ.b CODE_ABF4B4
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABF4B4:
	LDA.w $0022,y
	BEQ.b CODE_ABF4C9
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABF4C9:
	LDA.w $0023,y
	BEQ.b CODE_ABF4DE
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABF4DE:
	LDA.w $0024,y
	BEQ.b CODE_ABF4F3
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABF4F3:
	LDA.w $0025,y
	BEQ.b CODE_ABF50C
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABF50C:
	LDA.w $0026,y
	BEQ.b CODE_ABF521
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABF521:
	LDA.w $0027,y
	BEQ.b CODE_ABF536
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABF536:
	LDA.w $0028,y
	BEQ.b CODE_ABF54B
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABF54B:
	LDA.w $0029,y
	BEQ.b CODE_ABF564
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABF564:
	LDA.w $002A,y
	BEQ.b CODE_ABF579
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABF579:
	LDA.w $002B,y
	BEQ.b CODE_ABF58E
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABF58E:
	LDA.w $002C,y
	BEQ.b CODE_ABF5A3
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
CODE_ABF5A3:
	LDA.w $002D,y
	BEQ.b CODE_ABF5BC
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABF5BC:
	LDA.w $002E,y
	BEQ.b CODE_ABF5C9
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABF5C9:
	REP.b #$20
	RTL

CODE_ABF5CC:
	SEP.b #$20
	LDA.w $0010,y
	BEQ.b CODE_ABF5D7
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABF5D7:
	LDA.w $0011,y
	BEQ.b CODE_ABF5EC
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABF5EC:
	LDA.w $0012,y
	BEQ.b CODE_ABF605
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABF605:
	LDA.w $0013,y
	BEQ.b CODE_ABF61A
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABF61A:
	LDA.w $0014,y
	BEQ.b CODE_ABF62F
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABF62F:
	LDA.w $0015,y
	BEQ.b CODE_ABF644
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABF644:
	LDA.w $0016,y
	BEQ.b CODE_ABF65D
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABF65D:
	LDA.w $0017,y
	BEQ.b CODE_ABF672
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABF672:
	LDA.w $0018,y
	BEQ.b CODE_ABF687
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABF687:
	LDA.w $0019,y
	BEQ.b CODE_ABF69C
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_ABF69C:
	LDA.w $001A,y
	BEQ.b CODE_ABF6B5
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABF6B5:
	LDA.w $001B,y
	BEQ.b CODE_ABF6CA
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABF6CA:
	LDA.w $001C,y
	BEQ.b CODE_ABF6DF
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABF6DF:
	LDA.w $001D,y
	BEQ.b CODE_ABF6F4
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
CODE_ABF6F4:
	LDA.w $001E,y
	BEQ.b CODE_ABF70D
	STA.l $7F1C00,x
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABF70D:
	LDA.w $001F,y
	BEQ.b CODE_ABF722
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABF722:
	LDA.w $0020,y
	BEQ.b CODE_ABF737
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
CODE_ABF737:
	LDA.w $0021,y
	BEQ.b CODE_ABF750
	STA.l $7F2280,x
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_ABF750:
	LDA.w $0022,y
	BEQ.b CODE_ABF765
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABF765:
	LDA.w $0023,y
	BEQ.b CODE_ABF77A
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
CODE_ABF77A:
	LDA.w $0024,y
	BEQ.b CODE_ABF78F
	STA.l $7F2900,x
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
CODE_ABF78F:
	LDA.w $0025,y
	BEQ.b CODE_ABF7A8
	STA.l $7F2B00,x
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABF7A8:
	LDA.w $0026,y
	BEQ.b CODE_ABF7BD
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
CODE_ABF7BD:
	LDA.w $0027,y
	BEQ.b CODE_ABF7D2
	STA.l $7F2F80,x
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
CODE_ABF7D2:
	LDA.w $0028,y
	BEQ.b CODE_ABF7E7
	STA.l $7F3180,x
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
CODE_ABF7E7:
	LDA.w $0029,y
	BEQ.b CODE_ABF800
	STA.l $7F3380,x
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
CODE_ABF800:
	LDA.w $002A,y
	BEQ.b CODE_ABF815
	STA.l $7F3600,x
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
CODE_ABF815:
	LDA.w $002B,y
	BEQ.b CODE_ABF82A
	STA.l $7F3800,x
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
CODE_ABF82A:
	LDA.w $002C,y
	BEQ.b CODE_ABF83F
	STA.l $7F3A00,x
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
CODE_ABF83F:
	LDA.w $002D,y
	BEQ.b CODE_ABF858
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
CODE_ABF858:
	LDA.w $002E,y
	BEQ.b CODE_ABF869
	STA.l $7F3E80,x
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABF869:
	REP.b #$20
	RTL

CODE_ABF86C:
	SEP.b #$20
	LDA.w $0010,y
	BEQ.b CODE_ABF877
	STA.l !RAM_JP_Interior_MapDataBuffer,x
CODE_ABF877:
	LDA.w $0011,y
	BEQ.b CODE_ABF890
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
	STA.l $7F0280,x
CODE_ABF890:
	LDA.w $0012,y
	BEQ.b CODE_ABF8A5
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
	STA.l $7F0480,x
CODE_ABF8A5:
	LDA.w $0013,y
	BEQ.b CODE_ABF8BA
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
	STA.l $7F0680,x
CODE_ABF8BA:
	LDA.w $0014,y
	BEQ.b CODE_ABF8D3
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
	STA.l $7F0900,x
CODE_ABF8D3:
	LDA.w $0015,y
	BEQ.b CODE_ABF8E8
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
	STA.l $7F0B00,x
CODE_ABF8E8:
	LDA.w $0016,y
	BEQ.b CODE_ABF8FD
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
	STA.l $7F0D00,x
CODE_ABF8FD:
	LDA.w $0017,y
	BEQ.b CODE_ABF916
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
	STA.l $7F0F80,x
CODE_ABF916:
	LDA.w $0018,y
	BEQ.b CODE_ABF92B
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
	STA.l $7F1180,x
CODE_ABF92B:
	LDA.w $0019,y
	BEQ.b CODE_ABF940
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
	STA.l $7F1380,x
CODE_ABF940:
	LDA.w $001A,y
	BEQ.b CODE_ABF959
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
	STA.l $7F1600,x
CODE_ABF959:
	LDA.w $001B,y
	BEQ.b CODE_ABF96E
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
	STA.l $7F1800,x
CODE_ABF96E:
	LDA.w $001C,y
	BEQ.b CODE_ABF983
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
	STA.l $7F1A00,x
CODE_ABF983:
	LDA.w $001D,y
	BEQ.b CODE_ABF99C
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
	STA.l $7F1C80,x
CODE_ABF99C:
	LDA.w $001E,y
	BEQ.b CODE_ABF9B1
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
	STA.l $7F1E80,x
CODE_ABF9B1:
	LDA.w $001F,y
	BEQ.b CODE_ABF9C6
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
	STA.l $7F2080,x
CODE_ABF9C6:
	LDA.w $0020,y
	BEQ.b CODE_ABF9DF
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
	STA.l $7F2300,x
CODE_ABF9DF:
	LDA.w $0021,y
	BEQ.b CODE_ABF9F4
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
	STA.l $7F2500,x
CODE_ABF9F4:
	LDA.w $0022,y
	BEQ.b CODE_ABFA09
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
	STA.l $7F2700,x
CODE_ABFA09:
	LDA.w $0023,y
	BEQ.b CODE_ABFA22
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
	STA.l $7F2980,x
CODE_ABFA22:
	LDA.w $0024,y
	BEQ.b CODE_ABFA37
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
	STA.l $7F2B80,x
CODE_ABFA37:
	LDA.w $0025,y
	BEQ.b CODE_ABFA4C
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
	STA.l $7F2D80,x
CODE_ABFA4C:
	LDA.w $0026,y
	BEQ.b CODE_ABFA65
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
	STA.l $7F3000,x
CODE_ABFA65:
	LDA.w $0027,y
	BEQ.b CODE_ABFA7A
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
	STA.l $7F3200,x
CODE_ABFA7A:
	LDA.w $0028,y
	BEQ.b CODE_ABFA8F
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
	STA.l $7F3400,x
CODE_ABFA8F:
	LDA.w $0029,y
	BEQ.b CODE_ABFAA8
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
	STA.l $7F3680,x
CODE_ABFAA8:
	LDA.w $002A,y
	BEQ.b CODE_ABFABD
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
	STA.l $7F3880,x
CODE_ABFABD:
	LDA.w $002B,y
	BEQ.b CODE_ABFAD2
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
	STA.l $7F3A80,x
CODE_ABFAD2:
	LDA.w $002C,y
	BEQ.b CODE_ABFAEB
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
	STA.l $7F3D00,x
CODE_ABFAEB:
	LDA.w $002D,y
	BEQ.b CODE_ABFB00
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
	STA.l $7F3F00,x
CODE_ABFB00:
	LDA.w $002E,y
	BEQ.b CODE_ABFB09
	STA.l $7F3F80,x
CODE_ABFB09:
	REP.b #$20
	RTL

CODE_ABFB0C:
	SEP.b #$20
CODE_ABFB0E:
	LDA.w $0011,y
	BEQ.b CODE_ABFB27
	STA.l !RAM_JP_Interior_MapDataBuffer,x
	STA.l $7F0080,x
	STA.l $7F0100,x
	STA.l $7F0180,x
	STA.l $7F0200,x
CODE_ABFB27:
	LDA.w $0012,y
	BEQ.b CODE_ABFB3C
	STA.l $7F0280,x
	STA.l $7F0300,x
	STA.l $7F0380,x
	STA.l $7F0400,x
CODE_ABFB3C:
	LDA.w $0013,y
	BEQ.b CODE_ABFB51
	STA.l $7F0480,x
	STA.l $7F0500,x
	STA.l $7F0580,x
	STA.l $7F0600,x
CODE_ABFB51:
	LDA.w $0014,y
	BEQ.b CODE_ABFB6A
	STA.l $7F0680,x
	STA.l $7F0700,x
	STA.l $7F0780,x
	STA.l $7F0800,x
	STA.l $7F0880,x
CODE_ABFB6A:
	LDA.w $0015,y
	BEQ.b CODE_ABFB7F
	STA.l $7F0900,x
	STA.l $7F0980,x
	STA.l $7F0A00,x
	STA.l $7F0A80,x
CODE_ABFB7F:
	LDA.w $0016,y
	BEQ.b CODE_ABFB94
	STA.l $7F0B00,x
	STA.l $7F0B80,x
	STA.l $7F0C00,x
	STA.l $7F0C80,x
CODE_ABFB94:
	LDA.w $0017,y
	BEQ.b CODE_ABFBAD
	STA.l $7F0D00,x
	STA.l $7F0D80,x
	STA.l $7F0E00,x
	STA.l $7F0E80,x
	STA.l $7F0F00,x
CODE_ABFBAD:
	LDA.w $0018,y
	BEQ.b CODE_ABFBC2
	STA.l $7F0F80,x
	STA.l $7F1000,x
	STA.l $7F1080,x
	STA.l $7F1100,x
CODE_ABFBC2:
	LDA.w $0019,y
	BEQ.b CODE_ABFBD7
	STA.l $7F1180,x
	STA.l $7F1200,x
	STA.l $7F1280,x
	STA.l $7F1300,x
CODE_ABFBD7:
	LDA.w $001A,y
	BEQ.b CODE_ABFBF0
	STA.l $7F1380,x
	STA.l $7F1400,x
	STA.l $7F1480,x
	STA.l $7F1500,x
	STA.l $7F1580,x
CODE_ABFBF0:
	LDA.w $001B,y
	BEQ.b CODE_ABFC05
	STA.l $7F1600,x
	STA.l $7F1680,x
	STA.l $7F1700,x
	STA.l $7F1780,x
CODE_ABFC05:
	LDA.w $001C,y
	BEQ.b CODE_ABFC1A
	STA.l $7F1800,x
	STA.l $7F1880,x
	STA.l $7F1900,x
	STA.l $7F1980,x
CODE_ABFC1A:
	LDA.w $001D,y
	BEQ.b CODE_ABFC33
	STA.l $7F1A00,x
	STA.l $7F1A80,x
	STA.l $7F1B00,x
	STA.l $7F1B80,x
	STA.l $7F1C00,x
CODE_ABFC33:
	LDA.w $001E,y
	BEQ.b CODE_ABFC48
	STA.l $7F1C80,x
	STA.l $7F1D00,x
	STA.l $7F1D80,x
	STA.l $7F1E00,x
CODE_ABFC48:
	LDA.w $001F,y
	BEQ.b CODE_ABFC5D
	STA.l $7F1E80,x
	STA.l $7F1F00,x
	STA.l $7F1F80,x
	STA.l $7F2000,x
CODE_ABFC5D:
	LDA.w $0020,y
	BEQ.b CODE_ABFC76
	STA.l $7F2080,x
	STA.l $7F2100,x
	STA.l $7F2180,x
	STA.l $7F2200,x
	STA.l $7F2280,x
CODE_ABFC76:
	LDA.w $0021,y
	BEQ.b CODE_ABFC8B
	STA.l $7F2300,x
	STA.l $7F2380,x
	STA.l $7F2400,x
	STA.l $7F2480,x
CODE_ABFC8B:
	LDA.w $0022,y
	BEQ.b CODE_ABFCA0
	STA.l $7F2500,x
	STA.l $7F2580,x
	STA.l $7F2600,x
	STA.l $7F2680,x
CODE_ABFCA0:
	LDA.w $0023,y
	BEQ.b CODE_ABFCB9
	STA.l $7F2700,x
	STA.l $7F2780,x
	STA.l $7F2800,x
	STA.l $7F2880,x
	STA.l $7F2900,x
CODE_ABFCB9:
	LDA.w $0024,y
	BEQ.b CODE_ABFCCE
	STA.l $7F2980,x
	STA.l $7F2A00,x
	STA.l $7F2A80,x
	STA.l $7F2B00,x
CODE_ABFCCE:
	LDA.w $0025,y
	BEQ.b CODE_ABFCE3
	STA.l $7F2B80,x
	STA.l $7F2C00,x
	STA.l $7F2C80,x
	STA.l $7F2D00,x
CODE_ABFCE3:
	LDA.w $0026,y
	BEQ.b CODE_ABFCFC
	STA.l $7F2D80,x
	STA.l $7F2E00,x
	STA.l $7F2E80,x
	STA.l $7F2F00,x
	STA.l $7F2F80,x
CODE_ABFCFC:
	LDA.w $0027,y
	BEQ.b CODE_ABFD11
	STA.l $7F3000,x
	STA.l $7F3080,x
	STA.l $7F3100,x
	STA.l $7F3180,x
CODE_ABFD11:
	LDA.w $0028,y
	BEQ.b CODE_ABFD26
	STA.l $7F3200,x
	STA.l $7F3280,x
	STA.l $7F3300,x
	STA.l $7F3380,x
CODE_ABFD26:
	LDA.w $0029,y
	BEQ.b CODE_ABFD3F
	STA.l $7F3400,x
	STA.l $7F3480,x
	STA.l $7F3500,x
	STA.l $7F3580,x
	STA.l $7F3600,x
CODE_ABFD3F:
	LDA.w $002A,y
	BEQ.b CODE_ABFD54
	STA.l $7F3680,x
	STA.l $7F3700,x
	STA.l $7F3780,x
	STA.l $7F3800,x
CODE_ABFD54:
	LDA.w $002B,y
	BEQ.b CODE_ABFD69
	STA.l $7F3880,x
	STA.l $7F3900,x
	STA.l $7F3980,x
	STA.l $7F3A00,x
CODE_ABFD69:
	LDA.w $002C,y
	BEQ.b CODE_ABFD82
	STA.l $7F3A80,x
	STA.l $7F3B00,x
	STA.l $7F3B80,x
	STA.l $7F3C00,x
	STA.l $7F3C80,x
CODE_ABFD82:
	LDA.w $002D,y
	BEQ.b CODE_ABFD97
	STA.l $7F3D00,x
	STA.l $7F3D80,x
	STA.l $7F3E00,x
	STA.l $7F3E80,x
CODE_ABFD97:
	LDA.w $002E,y
	BEQ.b CODE_ABFDA4
	STA.l $7F3F00,x
	STA.l $7F3F80,x
CODE_ABFDA4:
	REP.b #$20
	RTL

CODE_ABFDA7:
	REP.b #$20
	RTL

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

CODE_ABFDAA:
	DEC.w $0000,x
	DEC.w $0080,x
	DEC.w $0100,x
	DEC.w $0180,x
	DEC.w $0200,x
	DEC.w $0280,x
	DEC.w $0300,x
	DEC.w $0380,x
	DEC.w $0400,x
	DEC.w $0480,x
	DEC.w $0500,x
	DEC.w $0580,x
	DEC.w $0600,x
	DEC.w $0680,x
	DEC.w $0700,x
	DEC.w $0780,x
	DEC.w $0800,x
	DEC.w $0880,x
	DEC.w $0900,x
	DEC.w $0980,x
	DEC.w $0A00,x
	DEC.w $0A80,x
	DEC.w $0B00,x
	DEC.w $0B80,x
	DEC.w $0C00,x
	DEC.w $0C80,x
	DEC.w $0D00,x
	DEC.w $0D80,x
	DEC.w $0E00,x
	DEC.w $0E80,x
	DEC.w $0F00,x
	DEC.w $0F80,x
	DEC.w $1000,x
	DEC.w $1080,x
	DEC.w $1100,x
	DEC.w $1180,x
	DEC.w $1200,x
	DEC.w $1280,x
	DEC.w $1300,x
	DEC.w $1380,x
	DEC.w $1400,x
	DEC.w $1480,x
	DEC.w $1500,x
	DEC.w $1580,x
	DEC.w $1600,x
	DEC.w $1680,x
	DEC.w $1700,x
	DEC.w $1780,x
	DEC.w $1800,x
	DEC.w $1880,x
	DEC.w $1900,x
	DEC.w $1980,x
	DEC.w $1A00,x
	DEC.w $1A80,x
	DEC.w $1B00,x
	DEC.w $1B80,x
	DEC.w $1C00,x
	DEC.w $1C80,x
	DEC.w $1D00,x
	DEC.w $1D80,x
	DEC.w $1E00,x
	DEC.w $1E80,x
	DEC.w $1F00,x
	DEC.w $1F80,x
	DEC.w $2000,x
	DEC.w $2080,x
	DEC.w $2100,x
	DEC.w $2180,x
	DEC.w $2200,x
	DEC.w $2280,x
	DEC.w $2300,x
	DEC.w $2380,x
	DEC.w $2400,x
	DEC.w $2480,x
	DEC.w $2500,x
	DEC.w $2580,x
	DEC.w $2600,x
	DEC.w $2680,x
	DEC.w $2700,x
	DEC.w $2780,x
	DEC.w $2800,x
	DEC.w $2880,x
	DEC.w $2900,x
	DEC.w $2980,x
	DEC.w $2A00,x
	DEC.w $2A80,x
	DEC.w $2B00,x
	DEC.w $2B80,x
	DEC.w $2C00,x
	DEC.w $2C80,x
	DEC.w $2D00,x
	DEC.w $2D80,x
	DEC.w $2E00,x
	DEC.w $2E80,x
	DEC.w $2F00,x
	DEC.w $2F80,x
	DEC.w $3000,x
	DEC.w $3080,x
	DEC.w $3100,x
	DEC.w $3180,x
	DEC.w $3200,x
	DEC.w $3280,x
	DEC.w $3300,x
	DEC.w $3380,x
	DEC.w $3400,x
	DEC.w $3480,x
	DEC.w $3500,x
	DEC.w $3580,x
	DEC.w $3600,x
	DEC.w $3680,x
	DEC.w $3700,x
	DEC.w $3780,x
	DEC.w $3800,x
	DEC.w $3880,x
	DEC.w $3900,x
	DEC.w $3980,x
	DEC.w $3A00,x
	DEC.w $3A80,x
	DEC.w $3B00,x
	DEC.w $3B80,x
	DEC.w $3C00,x
	DEC.w $3C80,x
	DEC.w $3D00,x
	DEC.w $3D80,x
	DEC.w $3E00,x
	DEC.w $3E80,x
	DEC.w $3F00,x
	DEC.w $3F80,x
	PLB
	REP.b #$20
	RTL

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

DATA_ABFF2E:
	incbin "InteriorMaps/BeachUtilityShed_GroundLevel_MapLayout.rnc"

UNK_ABFFF8:
	%InsertGarbageData($ABFFF8, incbin, DATA_ABFFF8.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_AC8000:
	incbin "Textures/ShipWall_LeftPillar.bin"

DATA_AC8600:
	incbin "Textures/ShipWall_Light.bin"

DATA_AC8C00:
	incbin "Textures/ShipWall_RightPillar1.bin"

DATA_AC9200:
	incbin "Textures/ShipWall.bin"

DATA_AC9800:
	incbin "Textures/ShipWall_Window.bin"

DATA_AC9E00:
	incbin "Textures/ShipWall_Pipes.bin"

DATA_ACA400:
	incbin "Textures/DarkShipWall1.bin"

DATA_ACAA00:
	incbin "Textures/ShipWall_LifePreserver_Left.bin"

DATA_ACB000:
	incbin "Textures/ShipWall_LifePreserver_Right.bin"

DATA_ACB600:
	incbin "Textures/ShipWall_RightPillar2.bin"

DATA_ACBC00:
	incbin "Textures/ShipWall_DoublePillar.bin"

DATA_ACC200:
	incbin "Textures/DarkMetalWall2.bin"

DATA_ACC800:
	incbin "Textures/MetalWall_Grate.bin"

DATA_ACCE00:
	incbin "Textures/MetalWall_StripedBar.bin"

DATA_ACD400:
	incbin "Textures/Generator_PowerOff.bin"

DATA_ACDA00:
	incbin "Textures/Generator_PowerOn.bin"

DATA_ACE000:
	incbin "Textures/MetalWall_LargeRivets.bin"

DATA_ACE600:
	incbin "Textures/MetalWall_Switch.bin"

DATA_ACEC00:
	incbin "Textures/MetalWall_Light.bin"

DATA_ACF200:
	incbin "Textures/MetalWall_RightPillar.bin"

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

DATA_ACF800:
	dw $0000,$1C01,$1C02,$1C03,$1C04,$1C05,$1C06,$1C07
	dw $1C08,$1C09,$1C0A,$1C0B,$1C0C,$1C0D,$1C0E,$1C0F
	dw $1C10,$1C11,$1C12,$1C13,$1C14,$1C15,$1C16,$1C17
	dw $1C18,$1C19,$1C1A,$1C1B,$1C1C,$1C1D,$1C1E,$1C1F
	dw $1C20,$1C21,$1C22,$1C23,$1C24,$1C25,$1C26,$1C27
	dw $1C28,$1C29,$1C2A,$1C2B,$1C2C,$1C2D,$1C2E,$1C2F
	dw $1C30,$1C31,$1C32,$1C33,$1C34,$5C2C,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1C35,$5C35,$1C35,$1C36,$5C35,$1C37,$1C38,$1C39
	dw $1C3A,$1C3B,$1C3C,$1C3D,$1C3E,$1C3F,$1C40,$1C41
	dw $1C42,$1C43,$1C44,$1C00,$1C45,$1C46,$1C47,$1C48
	dw $1C49,$1C4A,$0000,$0000,$0000,$0000,$0000,$0000
	dw $9C35,$DC35,$1C4B,$0000,$5C4B,$1C4C,$1C4D,$1C4E
	dw $1C4F,$1C50,$1C51,$1C52,$1C53,$1C54,$1C55,$1C56
	dw $1C57,$1C58,$1C59,$1C5A,$1C5B,$1C5C,$1C5D,$1C5E
	dw $1C5F,$1C60,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1861,$1862,$9C35,$9C36,$DC35,$1C63,$1C64,$1C65
	dw $1C66,$1C67,$1C68,$1C69,$1C6A,$1C6B,$1C6C,$1C6D
	dw $1C6E,$1C6F,$1C70,$1C71,$1C72,$1C73,$1C74,$1C75
	dw $1C76,$1C77,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1C78,$1C79,$1C7A,$1C7B,$1C7C,$1C7D,$1C7E,$1C7F
	dw $1C80,$1C81,$1C82,$1C83,$1C84,$1C85,$1C86,$1C87
	dw $1C88,$1C89,$1C8A,$1C8B,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1C8C,$1C8D,$1C8E,$1C8F,$1C90,$1C91,$1C92,$1C93
	dw $1C94,$1C95,$1C96,$1C97,$1C98,$1C99,$1C9A,$1C9B
	dw $1C9C,$1C9D,$1C9E,$1C9F,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1C8C,$1CA0,$1CA1,$1CA2,$1CA3,$1CA4,$1CA5,$1CA6
	dw $1CA7,$1CA8,$1CA9,$1CAA,$1CAB,$1CAC,$1CAD,$1CAE
	dw $1CAF,$1CB0,$1CB1,$1C9F,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $9C78,$1CB2,$1CB3,$1CB4,$1CB4,$1CB5,$5CB5,$1CB4
	dw $1CB6,$1CB7,$1CB8,$1CB9,$1CBA,$5CB9,$1CBB,$1CB4
	dw $1CBC,$1CB4,$1CBD,$9C8B,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $08BE,$08BF,$08C0,$08C1,$08C2,$08BF,$08C2,$08C3
	dw $08C4,$08C1,$08BE,$08C5,$08BE,$08C5,$08C2,$08BF
	dw $08BE,$08BF,$08BE,$08BF,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $08C6,$08C7,$08C8,$08C9,$08CA,$08CB,$08CC,$08CD
	dw $08CE,$08CD,$08CE,$08CF,$08D0,$08CF,$08D1,$08C7
	dw $08D0,$08CD,$08CE,$08CD,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $08D2,$08D3,$08D4,$08D5,$08D2,$08D6,$08D7,$08D3
	dw $08D8,$08D5,$08D7,$08D3,$08D2,$08D3,$08D4,$08D5
	dw $08D2,$08D3,$08D7,$08D3,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1C00,$1CD9,$1CDA,$1CDB,$1CDC,$1CDD,$1C00
	dw $1C00,$0400,$0400,$0400,$0400,$0000,$0000,$1800
	dw $0000,$0C00,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1C00,$1CDE,$1CDF,$1CE0,$1CE1,$1CE2,$1CE3
	dw $1CE4,$1CE5,$1CE6,$1CE7,$1C00,$1C00,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$1C00,$1CE8,$1CE9,$1CEA,$1CEB,$1CE1
	dw $1CE1,$1CEC,$1CE1,$1CED,$1CEE,$1CEF,$1CF0,$1C00
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1CF1,$1CF2,$1CF3,$1CF4,$1CF5,$1CF6,$1CF7,$1CE1
	dw $1CE1,$1CEC,$1CE1,$1CE1,$1CE1,$1CF8,$1CF9,$1CFA
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1CFB,$1CFC,$1CFD,$1CFE,$1CFF,$1D00,$1D01,$1D02
	dw $1CE1,$1D03,$1D04,$1D05,$1D06,$1CE1,$1CE1,$1D07
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1D08,$1D09,$1CE1,$1CE1,$1CE1,$1CE1,$1D0A,$1D0B
	dw $1CE1,$1CE1,$1D0C,$1D0D,$1D0E,$1CE1,$1D0F,$1D10
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1D11,$1D12,$1CE1,$1CE1,$1CE1,$1CE1,$1D13,$1D14
	dw $1CE1,$1CE1,$1D15,$1D16,$1D17,$1D18,$1D18,$1D19
	dw $0000,$0000,$1000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1D1A,$1D1B,$1D1C,$1D1D,$1D1E,$1D1F,$1D20,$1D21
	dw $1D22,$1D23,$1D23,$1D23,$1D23,$1D23,$1D23,$1D24
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1D25,$9C6D,$9C6D,$9C6D,$9C6D,$9C6D,$1D26
	dw $1D27,$9C6D,$9C6D,$1D28,$1D29,$9C6D,$1D2A,$1D2B
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1D2C,$9D0E,$1CE1,$1CE1,$1CE1,$1CE1,$1D2D
	dw $1D2E,$1D2F,$1CE1,$1D30,$1D31,$1D32,$1D33,$DCF1
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1C00,$1C00,$1D34,$1D35,$1CE1,$1CE1,$1D36,$1D37
	dw $1D38,$1D39,$1D3A,$1D3B,$1D3C,$1C00,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $1C00,$1C00,$1C00,$1D3D,$1CE1,$1CE1,$1D3E,$1D3F
	dw $1D40,$1D41,$1D42,$1CE1,$1D43,$1D44,$0000,$0000
	dw $1000,$1C00,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$1D45,$1CE1,$1CE1,$1D46,$1D47
	dw $1D48,$1D49,$1CE1,$1D4A,$1D4B,$DCF1,$1C00,$1C00
	dw $0000,$1C00,$1000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1C00,$1C00,$1D4C,$1CE1,$1CE1,$1D4D,$1CE1
	dw $1CE1,$1D4E,$1D4F,$1D50,$1D51,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$1C00,$1C00,$1D31,$0152,$1D52,$0152,$0152
	dw $0152,$0152,$0152,$0153,$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,$1C00,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$1C00,$1C00
	dw $1C00,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$1C00,$0000
	dw $1C00,$0000,$1C00,$0000,$1C00,$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,$1C00,$1C00,$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 $1C00,$1C00,$1C00,$1C00,$0000,$1C00,$1C00,$1C00
	dw $1C00,$1C00,$1C00,$1C00,$1C00,$0000,$0000,$0000
	dw $0000,$1C00,$1C00,$1C00,$0000,$0000,$0000,$0000
	dw $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000

%BANK_END(<EndBank>)
endmacro

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

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

DATA_AD8000:
	incbin "Textures/MetalWall_DoublePillar.bin"

DATA_AD8600:
	incbin "Textures/VisitorCenterWall_CautionSign_Left.bin"

DATA_AD8C00:
	incbin "Textures/VisitorCenterWall_CautionSign_Right.bin"

DATA_AD9200:
	incbin "Textures/VisitorCenterWall_BiohazardSign_Left.bin"

DATA_AD9800:
	incbin "Textures/VisitorCenterWall_BiohazardSign_Right.bin"

DATA_AD9E00:
	incbin "Textures/VisitorCenterWall_ProjectSign_Left.bin"

DATA_ADA400:
	incbin "Textures/VisitorCenterWall_ProjectSign_Right.bin"

DATA_ADAA00:
	incbin "Textures/VisitorCenterWall_Chalkboard_Left.bin"

DATA_ADB000:
	incbin "Textures/VisitorCenterWall_Chalkboard_Right.bin"

DATA_ADB600:
	incbin "Textures/VisitorCenterWall1.bin"

DATA_ADBC00:
	incbin "Textures/VisitorCenterWall_Pillar.bin"

DATA_ADC200:
	incbin "Textures/VisitorCenterWall2.bin"

DATA_ADC800:
	incbin "Textures/VisitorCenterWall_DoublePillar.bin"

DATA_ADCE00:
	incbin "Textures/VisitorCenterWall_Fan_Frame1.bin"

DATA_ADD400:
	incbin "Textures/VisitorCenterWall_Fan_Frame2.bin"

DATA_ADDA00:
	incbin "Textures/VisitorCenterWall_Fan_Frame3.bin"

DATA_ADE000:
	incbin "Textures/VisitorCenterWall_AirVent.bin"

DATA_ADE600:
	incbin "Textures/VisitorCenterWall_ComputerTerminal_Left.bin"

DATA_ADEC00:
	incbin "Textures/VisitorCenterWall_ComputerTerminal_Right.bin"

DATA_ADF200:
	incbin "Textures/VisitorCenterWall_ComputerTerminalKeypad_Right.bin"

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

JP_GFX_Sprite_AlanGrantHandPart1:
;$ADF800
	incbin "Graphics/Compressed/GFX_Sprite_AlanGrantHand.bin":0-800

%BANK_END(<EndBank>)
endmacro

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

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

DATA_AE8000:
	incbin "Textures/KitchenWall_MiddlePillar1.bin"

DATA_AE8600:
	incbin "Textures/KitchenWall_MiddlePillar2.bin"

DATA_AE8C00:
	incbin "Textures/KitchenWall_MiddlePillar3.bin"

DATA_AE9200:
	incbin "Textures/KitchenWall_MiddlePillar4.bin"

DATA_AE9800:
	incbin "Textures/KitchenWall_Fan_Frame1.bin"

DATA_AE9E00:
	incbin "Textures/KitchenWall_Fan_Frame2.bin"

DATA_AEA400:
	incbin "Textures/KitchenWall_Fan_Frame3.bin"

DATA_AEAA00:
	incbin "Textures/KitchenWall.bin"

DATA_AEB000:
	incbin "Textures/KitchenWall_DoublePillar.bin"

DATA_AEB600:
	incbin "Textures/DarkShipWall2.bin"

DATA_AEBC00:
	incbin "Textures/StoneWall_LeftPillar.bin"

DATA_AEC200:
	incbin "Textures/StoneWall_RightPillar.bin"

DATA_AEC800:
	incbin "Textures/StoneWall_Left.bin"

DATA_AECE00:
	incbin "Textures/StoneWall_Right.bin"

DATA_AED400:
	incbin "Textures/PurpleGate.bin"

DATA_AEDA00:
	incbin "Textures/JurassicParkLogo_Left.bin"

DATA_AEE000:
	incbin "Textures/JurassicParkLogo_Middle.bin"

DATA_AEE600:
	incbin "Textures/JurassicParkLogo_Right.bin"

DATA_AEEC00:
	incbin "Textures/DarkStoneWall_Left.bin"

DATA_AEF200:
	incbin "Textures/DarkStoneWall_Right.bin"

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

JP_GFX_Sprite_AlanGrantHandPart2:
;$AEF800
	incbin "Graphics/Compressed/GFX_Sprite_AlanGrantHand.bin":800-

JP_Palette_ComputerTerminal:
;$AEFE80
	incbin "Palettes/Compressed/ComputerTerminal.bin"

%BANK_END(<EndBank>)
endmacro

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

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

DATA_AF8000:
	incbin "Textures/StoneWall_LightLeft.bin"

DATA_AF8600:
	incbin "Textures/StoneWall_LightMiddle.bin"

DATA_AF8C00:
	incbin "Textures/StoneWall_LightRight.bin"

DATA_AF9200:
	incbin "Textures/DarkElevatorWall.bin"

DATA_AF9800:
	incbin "Textures/ElevatorWall_Speaker.bin"

DATA_AF9E00:
	incbin "Textures/ElevatorWall_Light.bin"

DATA_AFA400:
	incbin "Textures/LabWall_MediumMonitor_Left.bin"

DATA_AFAA00:
	incbin "Textures/LabWall_MediumMonitor_Right.bin"

DATA_AFB000:
	incbin "Textures/LabWall_SmallMonitors_Left.bin"

DATA_AFB600:
	incbin "Textures/LabWall_SmallMonitors_Right.bin"

DATA_AFBC00:
	incbin "Textures/VisitorCenterDoor_Inner.bin"

DATA_AFC200:
	incbin "Textures/VisitorCenterDoor_Outer.bin"

DATA_AFC800:
	incbin "Textures/ShedDoor_Inner.bin"

DATA_AFCE00:
	incbin "Textures/ShedDoor_Outer.bin"

DATA_AFD400:
	incbin "Textures/ElevatorDoor_Inner.bin"

DATA_AFDA00:
	incbin "Textures/ElevatorDoor_Outer.bin"

DATA_AFE000:
	incbin "Textures/ShipDoor_Inner.bin"

DATA_AFE600:
	incbin "Textures/ShipDoor_Outer.bin"

DATA_AFEC00:
	incbin "Textures/KitchenDoor_Inner.bin"

DATA_AFF200:
	incbin "Textures/KitchenDoor_Outer.bin"

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

JP_GFX_BG_ComputerTerminalPart1:
;$AFF800
	incbin "Graphics/Compressed/GFX_BG_ComputerTerminal.bin":0-800

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B08000:
	incbin "Textures/PottedPlants.bin"

DATA_B08600:
	incbin "Textures/BunsenBurner.bin"

DATA_B08C00:
	incbin "Textures/Beakers.bin"

DATA_B09200:
	incbin "Textures/TestTubeRackAndStool.bin"

DATA_B09800:
	incbin "Textures/TableChairAndBed.bin"

DATA_B0A400:
	incbin "Textures/TinyExplosionCeilingLightAndLightSpots.bin"

DATA_B0B000:
	incbin "Textures/FirstAidKitAndStrangeMachine.bin"

DATA_B0B600:
	incbin "Textures/TableLampAndExtraLife.bin"

DATA_B0BC00:
	incbin "Textures/SideOfRefridgerator.bin"

DATA_B0C200:
	incbin "Textures/GreenPotAndRubberPlant.bin"

DATA_B0C800:
	incbin "Textures/Incubator.bin"

DATA_B0CE00:
	incbin "Textures/PottedPalmTree.bin"

DATA_B0D400:
	incbin "Textures/TriplePottedPalmTree.bin"

DATA_B0E000:
	incbin "Textures/IncubatorCounterEndAndSide.bin"

DATA_B0E600:
	incbin "Textures/IncubatorCounterMiddleAndMiniFridgeFront.bin"

DATA_B0EC00:
	incbin "Textures/Chain.bin"

DATA_B0F200:
	incbin "Textures/FridgeFront.bin"

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

JP_GFX_BG_ComputerTerminalPart2:
;$B0F800
	incbin "Graphics/Compressed/GFX_BG_ComputerTerminal.bin":800-1000

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B18000:
	incbin "Textures/RaptorExploding.bin"

DATA_B18C00:
	incbin "Textures/BigExplosionCloud.bin"

DATA_B19800:
	incbin "Textures/MediumExplosionCloud.bin"

DATA_B1A400:
	incbin "Textures/SmallExplosionCloud.bin"

DATA_B1B000:
	incbin "Textures/RaptorWalk_Away1.bin"

DATA_B1B600:
	incbin "Textures/RaptorWalk_Away2.bin"

DATA_B1BC00:
	incbin "Textures/RaptorWalk_Away3.bin"

DATA_B1C200:
	incbin "Textures/RaptorWalk_Away4.bin"

DATA_B1C800:
	incbin "Textures/RaptorWalk_Away5.bin"

DATA_B1CE00:
	incbin "Textures/RaptorWalk_Away6.bin"

DATA_B1D400:
	incbin "Textures/RaptorWalk_Towards1.bin"

DATA_B1DA00:
	incbin "Textures/RaptorWalk_Towards2.bin"

DATA_B1E000:
	incbin "Textures/RaptorWalk_Towards3.bin"

DATA_B1E600:
	incbin "Textures/RaptorWalk_Towards4.bin"

DATA_B1EC00:
	incbin "Textures/RaptorWalk_Towards5.bin"

DATA_B1F200:
	incbin "Textures/RaptorWalk_Towards6.bin"

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

JP_GFX_BG_ComputerTerminalPart3:
;$B1F800
	incbin "Graphics/Compressed/GFX_BG_ComputerTerminal.bin":1000-1800

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B28000:
	incbin "Textures/RaptorWalk_BodySide1.bin"

DATA_B28C00:
	incbin "Textures/RaptorWalk_BodySide2.bin"

DATA_B29800:
	incbin "Textures/RaptorWalk_BodySide3.bin"

DATA_B2A400:
	incbin "Textures/RaptorWalk_BodySide4.bin"

DATA_B2B000:
	incbin "Textures/RaptorWalk_BodySide5.bin"

DATA_B2BC00:
	incbin "Textures/RaptorWalk_BodySide6.bin"

DATA_B2C800:
	incbin "Textures/RaptorWalk_TailSide1.bin"

DATA_B2D400:
	incbin "Textures/RaptorWalk_TailSide2.bin"

DATA_B2E000:
	incbin "Textures/RaptorWalk_TailSide3.bin"

DATA_B2EC00:
	incbin "Textures/RaptorDying_Away1.bin"

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

JP_GFX_BG_ComputerTerminalPart4:
;$B2F800
	incbin "Graphics/Compressed/GFX_BG_ComputerTerminal.bin":1800-2000

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B38000:
	incbin "Textures/RaptorDying_AwayBody2.bin"

DATA_B38C00:
	incbin "Textures/RaptorDying_AwayTail2.bin"

DATA_B39200:
	incbin "Textures/DilophosaurSpit.bin"

DATA_B39800:
	incbin "Textures/RaptorDying_Towards1.bin"

DATA_B3A400:
	incbin "Textures/RaptorDying2_TowardsBody2.bin"

DATA_B3B000:
	incbin "Textures/RaptorDying2_TowardsTail2.bin"

DATA_B3BC00:
	incbin "Textures/RaptorDying3_Head_IDCard.bin"

DATA_B3C200:
	incbin "Textures/RaptorDying3_Body_Drumstick.bin"

DATA_B3C800:
	incbin "Textures/RaptorDying3_Tail_GasGrenade.bin"

DATA_B3CE00:
	incbin "Textures/GasGrenadeProjectileAndBlankSpace.bin"

DATA_B3D400:
	incbin "Textures/RaptorDying4_HeadAndLegs_Egg.bin"

DATA_B3DA00:
	incbin "Textures/RaptorDying4_Body_SideOfMiniFridge.bin"

DATA_B3E000:
	incbin "Textures/RaptorDying_SideBody.bin"

DATA_B3EC00:
	incbin "Textures/RaptorDying_SideTail_Computer.bin"

DATA_B3F200:
	incbin "Textures/ExitSign_BigLetterD.bin"

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

JP_GFX_BG_ComputerTerminalPart5:
;$B3F800
	incbin "Graphics/Compressed/GFX_BG_ComputerTerminal.bin":2000-2800

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B48000:							; Note: T-Rex Trample music
	incbin "SPC700/DATA_B48000.bin"

DATA_B4D212:
	incbin "SPC700/WelcomeToJurassicParkSamples.bin"

DATA_B4EFFB:
	incbin "SPC700/DATA_B4EFFB.bin"

DATA_B4FA8E:
	incbin "InteriorMaps/RaptorNest_MapLayout_JP_U1.rnc"

UNK_B4FFD7:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($B4FFF6, incbin, DATA_B4FFF6_JP_U2.bin)
else
	%InsertGarbageData($B4FFD7, incbin, DATA_B4FFD7_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

JP_SPCEngine:
;$B58000
	incbin "SPC700/Engine.bin"

DATA_B5D7B6:							; Note: Alex Murphy/Ellie Sattler "Alan!" voice clip
	incbin "SPC700/AlanSamples.bin"

DATA_B5DFD3:
	incbin "SPC700/HelicopterSamples.bin"

DATA_B5EB6B:
	incbin "InteriorMaps/SecretLevel_RoomDataPtrs.rnc"

DATA_B5EBA2:
	incbin "InteriorMaps/RaptorPen_GroundLevel_Entities.rnc"

DATA_B5FEAE:
	incbin "InteriorMaps/RaptorPen_UpperLevel_MapLayout_JP_U1.rnc"

UNK_B5FEFA:
	%InsertGarbageData($B5FEFA, incbin, DATA_B5FEFA.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B68000:							; Note: High score theme related
	incbin "SPC700/DATA_B68000.bin"

DATA_B6FB63:
	incbin "InteriorMaps/RaptorPen_EntryLevel_Entities_JP_U1.rnc"

UNK_B6FF26:
	%InsertGarbageData($B6FF26, incbin, DATA_B6FF26.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B78000:							; Note: Raptor Rap music
	incbin "SPC700/DATA_B78000.bin"

DATA_B7F40E:
	incbin "InteriorMaps/VisitorCenter_RoofLevel_RoomDataPtrs.rnc"

DATA_B7F45F:
	incbin "InteriorMaps/VisitorCenter_RoofLevel_MapLayout.rnc"

DATA_B7F4B4:
	incbin "InteriorMaps/SecretLevel_Entities.rnc"

DATA_B7F8E4:
	incbin "InteriorMaps/SecretLevel_MapLayout.rnc"

DATA_B7F93B:
	incbin "InteriorMaps/Ship_SubLevel1_MapLayout.rnc"

DATA_B7F9D6:
	incbin "InteriorMaps/Ship_EntryLevel_MapLayout.rnc"

DATA_B7FB2F:
	incbin "InteriorMaps/Ship_SubLevel3_RoomDataPtrs_JP_U1.rnc"

DATA_B7FCD4:
	incbin "InteriorMaps/Ship_SubLevel4_RoomDataPtrs.rnc"

DATA_B7FE07:
	incbin "InteriorMaps/Ship_SubLevel1_RoomDataPtrs.rnc"

DATA_B7FE96:
	incbin "InteriorMaps/NorthUtilityShed_SubLevel_MapLayout.rnc"

DATA_B7FF55:
	incbin "InteriorMaps/BeachUtilityShed_SubLevel_RoomDataPtrs.rnc"

UNK_B7FFF5:
	%InsertGarbageData($B7FFF5, incbin, DATA_B7FFF5.bin)

%BANK_END(<EndBank>)
endmacro

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

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

DATA_B88000:							; Note: Triceratops Trot music
	incbin "SPC700/DATA_B88000.bin"

DATA_B8F660:
	incbin "SPC700/WaterSplashSamples.bin"

UNK_B8FFCA:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($B8FFF9, incbin, DATA_B8FFF9_JP_U2.bin)
else
	%InsertGarbageData($B8FFCA, incbin, DATA_B8FFCA_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_B98000:							; Note: Submarine Symphony music
	incbin "SPC700/DATA_B98000.bin"

DATA_B9CACE:
	incbin "SPC700/TRexRoarSamples.bin"

DATA_B9E92C:							; Note: Ian Malcolm/Dennis Nedry/Robert Muldoon "Grant!" voice clip
	incbin "SPC700/GrantSamples.bin"

DATA_B9F206:							; Note: John Hammond voice clip, probably "Mr. Grant!". However, all I hear is "Its see plahnt"
	incbin "SPC700/MrGrantSamples.bin"

UNK_B9FFDE:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($B9FFDE, incbin, DATA_B9FFDE_JP_U2.bin)
else
	%InsertGarbageData($B9FFDE, incbin, DATA_B9FFDE_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_BA8000:							; Note: Gallamimus Gallop music
	incbin "SPC700/DATA_BA8000.bin"

DATA_BAFDE1:
	incbin "InteriorMaps/Ship_SubLevel4_MapLayout.rnc"

DATA_BAFEE8:
	incbin "InteriorMaps/VisitorCenter_SubLevel_RoomDataPtrs.rnc"

UNK_BAFFA7:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($BAFFEF, incbin, DATA_BAFFEF_JP_U2.bin)
else
	%InsertGarbageData($BAFFA7, incbin, DATA_BAFFA7_JP_U1.bin)
endif

%BANK_END(<EndBank>)
endmacro

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

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

DATA_BB8000:							; Note: Elevator music 1
	incbin "SPC700/DATA_BB8000.bin"

DATA_BBF7F5:
	incbin "Textures/Darkness.bin"

DATA_BBFDF5:
	incbin "InteriorMaps/NublarUtilityShed_GroundLevel_MapLayout.rnc"

DATA_BBFEB2:
	incbin "InteriorMaps/VisitorCenter_Floor1_MapLayout.rnc"

UNK_BBFFF2:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($BBFFF2, incbin, DATA_BBFFF2_JP_U2.bin)
else
	%InsertGarbageData($BBFFF2, incbin, DATA_BBFFF2_JP_U1.bin)
endif

%BANK_END(<EndBank>)
endmacro

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

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

DATA_BC8000:							; Note: Elevator music 2
	incbin "SPC700/DATA_BC8000.bin"

UNK_BCFD59:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($BCFFE0, incbin, DATA_BCFFE0_JP_U2.bin)
else
	%InsertGarbageData($BCFD59, incbin, DATA_BCFD59_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_BD8000:								; Note: Interior Interlude music
	incbin "SPC700/DATA_BD8000.bin"

DATA_BDE792:
	incbin "SPC700/UnknownSamples.bin"

UNK_BDFE46:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($BDFE46, incbin, DATA_BDFE46_JP_U1.bin)
else
	%InsertGarbageData($BDFE46, incbin, DATA_BDFE46_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_BE8000:								; Note: Mode 7 intro "music"
	incbin "SPC700/DATA_BE8000.bin"

DATA_BEE361:
	incbin "SPC700/RaptorSamples.bin"

UNK_BEFF7E:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($BEFF7E, incbin, DATA_BEFF7E_JP_U2.bin)
else
	%InsertGarbageData($BEFF7E, incbin, DATA_BEFF7E_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

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

DATA_BF8000:							; Note: Title screen music related
	incbin "SPC700/DATA_BF8000.bin"

DATA_BFD6D8:							; Note: Likely the computer humming noise
	incbin "SPC700/DATA_BFD6D8.bin"

DATA_BFF19D:
	incbin "SPC700/MrDNAChatterSamples.bin"

DATA_BFFB71:
	incbin "InteriorMaps/VisitorCenter_RoofLevel_Entities.rnc"

UNK_BFFF54:
if !Define_Global_ROMToAssemble&(!ROM_JP_U2) != $00
	%InsertGarbageData($BFFF54, incbin, DATA_BFFF54_JP_U2.bin)
else
	%InsertGarbageData($BFFF54, incbin, DATA_BFFF54_JP_U1.bin)
endif
%BANK_END(<EndBank>)
endmacro

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

macro DATATABLE_JP_DyanmicSpritePointersAndData(Address)
;namespace JP_DyanmicSpritePointersAndData
%InsertMacroAtXPosition(<Address>)

DATA_8082CA:
	dw $00E8,$00EA,$00EC,$00EE,$00EE,$00EE,$0060,$0062
	dw $0064,$0066,$0068,$006A,$0080,$0082,$0084,$0086
	dw $0088,$008A,$00A0,$00A2,$00A4,$00A6,$00A8,$00AA
	dw $00C0,$00C2,$00C4,$00C6,$00C8,$00CA,$0060,$0062
	dw $0064,$0066,$0104,$0106,$0124,$0000,$00AC,$0140
	dw $0144,$0148,$014C,$0180,$0184,$0188,$018C,$01C0
	dw $01C4,$01C8,$01CC,$0068,$00A0,$00A4,$00A8,$006C

DATA_80833A:
	dd DATA_97BE80+$0000
	dd DATA_97BE80+$0080
	dd DATA_97BE80+$0100
	dd DATA_97BE80+$0180
	dd DATA_979F80+$0000
	dd DATA_979F80+$0080
	dd DATA_979F80+$0100
	dd DATA_979F80+$0180
	dd DATA_979F80+$0200
	dd DATA_979F80+$0280
	dd DATA_979F80+$0300
	dd DATA_979F80+$0380
	dd DATA_97A380+$0000
	dd DATA_97A380+$0080
	dd DATA_97A380+$0100
	dd DATA_97A380+$0180
	dd DATA_97A380+$0200
	dd DATA_97A380+$0280
	dd DATA_97A380+$0300
	dd DATA_97A380+$0380
	dd DATA_97A780+$0000
	dd DATA_97A780+$0080
	dd DATA_97A780+$0100
	dd DATA_97A780+$0180
	dd DATA_97A780+$0200
	dd DATA_97A780+$0280
	dd DATA_97A780+$0300
	dd DATA_97A780+$0380
	dd DATA_97AB80+$0000
	dd DATA_97AB80+$0080
	dd DATA_97AB80+$0100
	dd DATA_97AB80+$0180
	dd DATA_97AB80+$0200
	dd DATA_97AB80+$0280
	dd DATA_97AB80+$0300
	dd DATA_97AB80+$0380
	dd DATA_97AF80+$0000
	dd DATA_97B000+$0000
	dd DATA_97B000+$0080
	dd DATA_97B000+$0100
	dd DATA_97B000+$0180
	dd DATA_97B000+$0200
	dd DATA_97B000+$0280
	dd DATA_97B700+$0000
	dd DATA_97B700+$0080
	dd DATA_97B700+$0180
	dd DATA_97B880+$0080
	dd DATA_979080+$0000
	dd DATA_979080+$0080
	dd DATA_979080+$0100
	dd DATA_979080+$0180
	dd DATA_979080+$0200
	dd DATA_979080+$0280
	dd DATA_979080+$0300
	dd DATA_979080+$0380
	dd DATA_979080+$0400
	dd DATA_979080+$0480
	dd DATA_979080+$0500
	dd DATA_979080+$0580
	dd DATA_979080+$0600
	dd DATA_979080+$0680
	dd DATA_979080+$0700
	dd DATA_979080+$0780
	dd DATA_979080+$0800
	dd DATA_979080+$0880
	dd DATA_979080+$0900
	dd DATA_979080+$0980
	dd DATA_979080+$0A00
	dd DATA_979080+$0A80
	dd DATA_979080+$0B00
	dd DATA_979080+$0B80
	dd DATA_979080+$0C00
	dd DATA_979080+$0C80
	dd DATA_979080+$0D00
	dd DATA_979080+$0D80
	dd DATA_979080+$0E00
	dd DATA_979080+$0E80
	dd DATA_979080+$0900
	dd DATA_979080+$0980
	dd DATA_979080+$0A00
	dd DATA_979080+$0A80
	dd DATA_979080+$0B00
	dd DATA_979080+$0B80
	dd DATA_979080+$0600
	dd DATA_979080+$0680
	dd DATA_979080+$0700
	dd DATA_979080+$0780
	dd DATA_979080+$0800
	dd DATA_979080+$0880
	dd DATA_979080+$0300
	dd DATA_979080+$0380
	dd DATA_979080+$0400
	dd DATA_979080+$0480
	dd DATA_979080+$0500
	dd DATA_979080+$0580
	dd DATA_97B700+$0100
	dd DATA_97B980+$0000
	dd DATA_97B980+$0080
	dd DATA_97B980+$0100
	dd DATA_97B980+$0180
	dd DATA_97B980+$0200
	dd DATA_97B980+$0280
	dd DATA_97B980+$0300
	dd DATA_97B980+$0380
	dd DATA_97B980+$0400
	dd DATA_97B980+$0480

DATA_8084E2:
	dd DATA_98CE00+$0000
	dd DATA_98CE00+$0080
	dd DATA_98CE00+$0100
	dd DATA_98CE00+$0180
	dd DATA_98CE00+$0200
	dd DATA_98CE00+$0280
	dd DATA_98CE00+$0300
	dd DATA_98CE00+$0380
	dd DATA_98CE00+$0400
	dd DATA_98CE00+$0480
	dd DATA_98CE00+$0500
	dd DATA_98CE00+$0580
	dd DATA_98CE00+$0600
	dd DATA_98CE00+$0680
	dd DATA_98CE00+$0700

DATA_80851E:
	dd DATA_8FE358+$0000
	dd DATA_8FE358+$0200
	dd DATA_8FE358+$0400
	dd DATA_8FE358+$0600
	dd DATA_8FEB58+$0000
	dd DATA_8FEB58+$0200
	dd DATA_8FEB58+$0400
	dd DATA_8FEB58+$0600
	dd DATA_8FEB58+$0800
	dd DATA_8FEB58+$0A00
	dd DATA_8FEB58+$0C00
	dd DATA_8FEB58+$0E00
	dd JP_GFX_DennisNedryPortrait
	dd JP_GFX_AlexMurphyPortrait
	dd JP_GFX_EllieSattlerPortrait
	dd JP_GFX_JohnHammondPortrait
	dd JP_GFX_IanMalcolmPortrait
	dd JP_GFX_RobertMuldoonPortrait
	dd JP_GFX_TimMurphyPortrait
	dd DATA_91A1DC+$1E00
	dd DATA_91A1DC+$2000
	dd DATA_91A1DC+$2200
	dd DATA_91A1DC+$2400
	dd DATA_91A1DC+$2600
	dd DATA_91A1DC+$2800
	dd DATA_91A1DC+$2A00
	dd DATA_91A1DC+$2C00
	dd DATA_91A1DC+$2E00
	dd DATA_91A1DC+$3000
	dd DATA_91A1DC+$3200
	dd DATA_91A1DC+$3400
	dd DATA_91A1DC+$3600
	dd DATA_91A1DC+$3800
	dd DATA_91A1DC+$3A00
	dd DATA_91A1DC+$3C00
	dd DATA_91A1DC+$3E00
	dd DATA_91A1DC+$4000
	dd DATA_91A1DC+$4200
	dd DATA_91A1DC+$4400
	dd DATA_91A1DC+$4E00
	dd DATA_91A1DC+$5000
	dd DATA_91A1DC+$5200
	dd DATA_91A1DC+$4600
	dd DATA_91A1DC+$4800
	dd DATA_91A1DC+$4A00
	dd DATA_91A1DC+$4C00
	dd DATA_91A1DC+$0000
	dd DATA_91A1DC+$0200
	dd DATA_91A1DC+$0400
	dd DATA_91A1DC+$0600
	dd DATA_91A1DC+$0800
	dd DATA_91A1DC+$0A00
	dd DATA_91A1DC+$0C00
	dd DATA_91A1DC+$0E00
	dd DATA_91A1DC+$1000
	dd DATA_91A1DC+$1200
	dd DATA_91A1DC+$1400
	dd DATA_91A1DC+$1600
	dd DATA_91A1DC+$1800
	dd DATA_91A1DC+$1A00
	dd DATA_91A1DC+$1C00
	dd DATA_91A1DC+$1E00
	dd DATA_91A1DC+$2000
	dd DATA_91A1DC+$2200
	dd DATA_91A1DC+$2400
	dd DATA_91A1DC+$2600
	dd DATA_91A1DC+$2800
	dd DATA_91A1DC+$2A00
	dd DATA_91A1DC+$2C00
	dd DATA_91A1DC+$2E00
	dd DATA_97C080+$0000
	dd DATA_97C080+$0200
	dd DATA_97C080+$0400
	dd DATA_97C080+$0600
	dd DATA_97C080+$0800
	dd DATA_97C080+$0A00
	dd DATA_97C080+$0C00
	dd DATA_97C080+$0E00
	dd DATA_97C080+$1000
	dd DATA_97C080+$1200
	dd DATA_97C080+$1400
	dd DATA_97C080+$1600
	dd DATA_97C080+$1800
	dd DATA_92EC00+$0000
	dd DATA_92EC00+$0200
	dd DATA_92EC00+$0400
	dd DATA_92EC00+$0600
	dd DATA_92EC00+$0800
	dd DATA_92EC00+$0A00
	dd DATA_92EC00+$0C00
	dd DATA_92EC00+$0E00
	dd DATA_8FEB58+$0000
	dd DATA_8FEB58+$0200
	dd DATA_8FEB58+$0400
	dd DATA_8FEB58+$0600
	dd DATA_8FEB58+$0800
	dd DATA_8FEB58+$0A00
	dd DATA_8FEB58+$0C00
	dd DATA_8FEB58+$0E00

DATA_8086AA:
	dd DATA_938000+$0000
	dd DATA_938000+$0300
	dd DATA_938000+$0600
	dd DATA_938000+$0900
	dd DATA_938000+$0C00
	dd DATA_938000+$0F00
	dd DATA_938000+$1200
	dd DATA_938000+$1500
	dd DATA_938000+$1800
	dd DATA_938000+$1B00
	dd DATA_938000+$1E00
	dd DATA_938000+$2100
	dd DATA_938000+$2400
	dd DATA_938000+$2700
	dd DATA_938000+$2A00
	dd DATA_938000+$2D00
	dd DATA_938000+$3000
	dd DATA_938000+$3300
	dd DATA_938000+$3600
	dd DATA_938000+$3900
	dd DATA_938000+$3C00
	dd DATA_938000+$3F00
	dd DATA_938000+$4200
	dd DATA_938000+$4500
	dd DATA_938000+$4800
	dd DATA_938000+$4B00
	dd DATA_938000+$4E00
	dd DATA_938000+$5100
	dd DATA_938000+$5400
	dd DATA_938000+$5700
	dd DATA_938000+$5A00
	dd DATA_938000+$5D00
	dd DATA_938000+$6000
	dd DATA_938000+$6300
	dd DATA_938000+$6600
	dd DATA_938000+$6900
	dd DATA_938000+$6C00
	dd DATA_938000+$6F00
	dd DATA_938000+$7200
	dd DATA_938000+$7500
	dd DATA_948000+$0000

%BeginROMMirroring($80874E, $00, !FastROMAddressOffset)

DATA_00874E:
	dd DATA_948000+$0300
	dd DATA_948000+$0600
	dd DATA_948000+$0900
	dd DATA_948000+$0C00
	dd DATA_948000+$0F00
	dd DATA_948000+$1200
	dd DATA_948000+$1500
	dd DATA_948000+$1800
	dd DATA_948000+$1B00
	dd DATA_948000+$1E00
	dd DATA_948000+$2100
	dd DATA_948000+$2400
	dd DATA_948000+$2700
	dd DATA_948000+$2A00
	dd DATA_948000+$2D00
	dd DATA_948000+$3000
	dd DATA_948000+$3300
	dd DATA_948000+$3600
	dd DATA_948000+$3900
	dd DATA_948000+$3C00
	dd DATA_948000+$3F00
	dd DATA_948000+$4200
	dd DATA_948000+$4500
	dd DATA_948000+$4800
	dd DATA_948000+$4B00
	dd DATA_948000+$4E00
	dd DATA_948000+$5100
	dd DATA_948000+$5400
	dd DATA_948000+$5700
	dd DATA_948000+$5A00
	dd DATA_948000+$5D00
	dd DATA_948000+$6000
	dd DATA_948000+$6300
	dd DATA_948000+$6600
	dd DATA_948000+$6900
	dd DATA_948000+$6C00
	dd DATA_948000+$6F00
	dd DATA_948000+$7200
	dd DATA_948000+$7500
	dd DATA_958000+$0000
	dd DATA_958000+$0300
	dd DATA_958000+$0600
	dd DATA_958000+$0900
	dd DATA_958000+$0C00
	dd DATA_958000+$0F00
	dd DATA_958000+$1200
	dd DATA_958000+$1500
	dd DATA_958000+$1800
	dd DATA_958000+$1B00
	dd DATA_958000+$1E00
	dd DATA_958000+$2100
	dd DATA_958000+$2400
	dd DATA_958000+$2700
	dd DATA_958000+$2A00
	dd DATA_958000+$2D00
	dd DATA_968000+$0000
	dd DATA_968000+$0300
	dd DATA_968000+$0600
	dd DATA_968000+$0900
	dd DATA_968000+$0C00
	dd DATA_968000+$0F00
	dd DATA_968000+$1200
	dd DATA_968000+$1500
	dd DATA_968000+$1800
	dd DATA_968000+$1B00
	dd DATA_968000+$1E00
	dd DATA_968000+$2100
	dd DATA_968000+$2400
	dd DATA_968000+$2700
	dd DATA_968000+$2A00
	dd DATA_968000+$2D00
	dd DATA_958000+$3000
	dd DATA_958000+$3300
	dd DATA_958000+$3600
	dd DATA_958000+$3900
	dd DATA_958000+$3C00
	dd DATA_958000+$3F00
	dd DATA_958000+$4200
	dd DATA_958000+$4500
	dd DATA_958000+$4800
	dd DATA_948000+$7800
	dd DATA_948000+$7B00
	dd DATA_958000+$4B00
	dd DATA_958000+$4E00
	dd DATA_958000+$5100
	dd DATA_958000+$5400
	dd DATA_958000+$5700
	dd DATA_958000+$5A00
	dd DATA_958000+$5D00
	dd DATA_958000+$6000
	dd DATA_938000+$7800
	dd DATA_938000+$7B00
	dd DATA_958000+$6300
	dd DATA_958000+$6600
	dd DATA_958000+$6900
	dd DATA_958000+$6C00
	dd DATA_958000+$6F00
	dd DATA_958000+$7200
	dd DATA_958000+$7500
	dd DATA_958000+$7800
	dd DATA_968000+$3000
	dd DATA_968000+$3300
	dd DATA_968000+$3600
	dd DATA_968000+$3900
	dd DATA_968000+$3C00
	dd DATA_968000+$3F00
	dd DATA_968000+$4200
	dd DATA_968000+$4500
	dd DATA_968000+$4800
	dd DATA_968000+$4B00
	dd DATA_968000+$4E00
	dd DATA_968000+$5100
	dd DATA_968000+$5400
	dd DATA_968000+$5700
	dd DATA_968000+$5A00
	dd DATA_968000+$5D00
	dd DATA_968000+$6000
	dd DATA_968000+$6300
	dd DATA_968000+$6600
	dd DATA_968000+$6900
	dd DATA_968000+$6C00
	dd DATA_968000+$6F00
	dd DATA_968000+$7200
	dd DATA_968000+$7500
	dd DATA_968000+$7800
	dd DATA_968000+$7B00
	dd DATA_968000+$7E00
	dd $00970100
	dd DATA_968000+$7200
	dd DATA_968000+$7500
	dd DATA_968000+$7800
	dd DATA_968000+$7B00

%EndROMMirroring()

DATA_80895E:
	dd DATA_988000+$0000
	dd DATA_988000+$0480
	dd DATA_988000+$0900
	dd DATA_988000+$0D80
	dd DATA_988000+$1200
	dd DATA_988000+$1680
	dd DATA_988000+$1B00
	dd DATA_988000+$1F80
	dd DATA_988000+$2400
	dd DATA_988000+$2880
	dd DATA_988000+$2D00
	dd DATA_988000+$3180
	dd DATA_998000+$0000
	dd DATA_998000+$0480
	dd DATA_998000+$0900
	dd DATA_998000+$0D80
	dd DATA_998000+$1200
	dd DATA_998000+$1680
	dd DATA_998000+$1B00
	dd DATA_998000+$1F80
	dd DATA_998000+$2400
	dd DATA_998000+$2880
	dd DATA_998000+$2D00
	dd DATA_998000+$3180
	dd DATA_998000+$3600
	dd DATA_998000+$3A80
	dd DATA_998000+$3F00
	dd DATA_998000+$4380
	dd DATA_998000+$4800
	dd DATA_998000+$4C80
	dd DATA_998000+$5100
	dd DATA_998000+$5580
	dd DATA_9A8000+$1B00
	dd DATA_9A8000+$1F80
	dd DATA_9A8000+$2400
	dd DATA_9A8000+$2880
	dd DATA_9A8000+$2D00
	dd DATA_9A8000+$3180
	dd DATA_9A8000+$3600
	dd DATA_9A8000+$3A80
	dd DATA_9A8000+$3F00
	dd DATA_9A8000+$4380
	dd DATA_9A8000+$4800
	dd DATA_9A8000+$4C80
	dd DATA_9A8000+$5100
	dd DATA_9A8000+$5580
	dd DATA_9A8000+$5A00
	dd DATA_9A8000+$5E80
	dd DATA_9A8000+$6300
	dd DATA_9A8000+$6780
	dd DATA_9A8000+$6C00
	dd DATA_9A8000+$7080
	dd DATA_9A8000+$0000
	dd DATA_9A8000+$0480
	dd DATA_9A8000+$0900
	dd DATA_9A8000+$0D80
	dd DATA_9A8000+$1200
	dd DATA_9A8000+$1680
	dd DATA_97C080+$0000

DATA_808A4A:
	dd DATA_9D8000+$0000
	dd DATA_9D8000+$0800
	dd DATA_9D8000+$1000
	dd DATA_9D8000+$1800
	dd DATA_9D8000+$2000
	dd DATA_9D8000+$2800
	dd DATA_9D8000+$3000
	dd DATA_9D8000+$3800
	dd DATA_9D8000+$4000
	dd DATA_9D8000+$4800
	dd DATA_9D8000+$5000
	dd DATA_9D8000+$5800
	dd DATA_9E8000+$0000
	dd DATA_9E8000+$0800
	dd DATA_9E8000+$1000
	dd DATA_9E8000+$1800
	dd DATA_9E8000+$2000
	dd DATA_9E8000+$2800
	dd DATA_9E8000+$3000
	dd DATA_9E8000+$3800
	dd DATA_9E8000+$4000
	dd DATA_9E8000+$4800
	dd DATA_9E8000+$5000
	dd DATA_9E8000+$5800
	dd DATA_9F8000+$0000
	dd DATA_9F8000+$0800
	dd DATA_9F8000+$1000
	dd DATA_9F8000+$1800
	dd DATA_9F8000+$2000
	dd DATA_9F8000+$2800
	dd DATA_9E8000+$3000
	dd DATA_9E8000+$3800
	dd DATA_9E8000+$4000
	dd DATA_9E8000+$4800
	dd DATA_9E8000+$5000
	dd DATA_9E8000+$5800
	dd DATA_9E8000+$0000
	dd DATA_9E8000+$0800
	dd DATA_9E8000+$1000
	dd DATA_9E8000+$1800
	dd DATA_9E8000+$2000
	dd DATA_9E8000+$2800
	dd DATA_9D8000+$3000
	dd DATA_9D8000+$3800
	dd DATA_9D8000+$4000
	dd DATA_9D8000+$4800
	dd DATA_9D8000+$5000
	dd DATA_9D8000+$5800
	dd DATA_9D8000+$6000
	dd DATA_9D8000+$6800
	dd DATA_9D8000+$7000
	dd DATA_9D8000+$7800
	dd DATA_9E8000+$6000
	dd DATA_9E8000+$6800
	dd DATA_9E8000+$7000
	dd DATA_9E8000+$7800
	dd DATA_9F8000+$3000
	dd DATA_9F8000+$3800
	dd DATA_9E8000+$7000
	dd DATA_9E8000+$7800
	dd DATA_9E8000+$6000
	dd DATA_9E8000+$6800
	dd DATA_9D8000+$7000
	dd DATA_9D8000+$7800
	dd DATA_9F8000+$6000
	dd DATA_9F8000+$6000
	dd DATA_9F8000+$4000
	dd DATA_9F8000+$4800
	dd DATA_9F8000+$5000
	dd DATA_9F8000+$5800
	dd DATA_9F8000+$4000
	dd DATA_9F8000+$4800
	dd DATA_9F8000+$5000
	dd DATA_9F8000+$5800
	dd DATA_9D8000+$0000
	dd DATA_9D8000+$0800
	dd DATA_9D8000+$1000
	dd DATA_9D8000+$1800
	dd DATA_9D8000+$2000
	dd DATA_9D8000+$0000
	dd DATA_9D8000+$0800
	dd DATA_9D8000+$1000
	dd DATA_9D8000+$1800
	dd DATA_9D8000+$2000

DATA_808B9A:
	dd DATA_92D400+$0000
	dd DATA_92BC00+$0000
	dd DATA_92BC00+$0C00
	dd DATA_92B000+$0000
	dd DATA_928000+$0000
	dd DATA_928000+$0C00
	dd DATA_928000+$1800
	dd DATA_928000+$2400
	dd DATA_92E000+$0000

DATA_808BBE:
	dd DATA_9B8000+$0000
	dd DATA_9B8000+$1800
	dd DATA_9B8000+$3000
	dd DATA_9B8000+$4800
	dd DATA_9B8000+$6000
	dd DATA_9C8000+$0000
	dd DATA_9C8000+$3000
	dd DATA_9C8000+$4800
	dd DATA_9C8000+$6000
	dd DATA_9C8000+$1800
	dd DATA_988000+$3600

DATA_808BEA:
	dd $01020000,$04080000,$10200000,$40800000
	dd $01020001,$04080001,$10200001,$40800001
	dd $01020002,$04080002,$10200002,$40800002
	dd $01020003,$04080003,$10200003,$40800003
	dd $01020004,$04080004,$10200004,$40800004
	dd $01020005,$04080005,$10200005,$40800005
	dd $01020006,$04080006,$10200006,$40800006
	dd $01020007,$04080007,$10200007,$40800007
	dd $01020008,$04080008,$10200008,$40800008
	dd $01020009,$04080009,$10200009,$40800009
	dd $0102000A,$0408000A,$1020000A,$4080000A
	dd $0102000B,$0408000B,$1020000B,$4080000B
	dd $0102000C,$0408000C,$1020000C,$4080000C
	dd $0102000D,$0408000D,$1020000D,$4080000D
	dd $0102000E,$0408000E,$1020000E,$4080000E
	dd $0102000F,$0408000F,$1020000F,$4080000F
	dd $01020010,$04080010,$10200010,$40800010
	dd $01020011,$04080011,$10200011,$40800011
	dd $01020012,$04080012,$10200012,$40800012
	dd $01020013,$04080013,$10200013,$40800013
	dd $01020014,$04080014,$10200014,$40800014
	dd $01020015,$04080015,$10200015,$40800015
	dd $01020016,$04080016,$10200016,$40800016
	dd $01020017,$04080017,$10200017,$40800017
	dd $01020018,$04080018,$10200018,$40800018
	dd $01020019,$04080019,$10200019,$40800019
	dd $0102001A,$0408001A,$1020001A,$4080001A
	dd $0102001B,$0408001B,$1020001B,$4080001B
	dd $0102001C,$0408001C,$1020001C,$4080001C
	dd $0102001D,$0408001D,$1020001D,$4080001D
	dd $0102001E,$0408001E,$1020001E,$4080001E
	dd $0102001F,$0408001F,$1020001F,$4080001F

namespace off
endmacro

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