shithub: pokecrystal

Download patch

ref: ad6e271dec7ac0d23a8e140a6fb7efabe094f5eb
parent: 4b2d4337b4f1edbac50fc369c0207043e0a9cce3
parent: fb931fe616504a8cf141521dec6fc6f7d236bff8
author: Bryan Bishop <[email protected]>
date: Tue Jun 25 16:17:18 EDT 2013

Merge pull request #148 from yenatch/master

Re-organizing some engine-related asm and constants.

--- a/battle_constants.asm
+++ /dev/null
@@ -1,291 +1,0 @@
-MAX_LEVEL EQU 100
-NUM_MOVES EQU 4
-
-ATTACK EQU 0
-DEFENSE EQU 1
-SPEED EQU 2
-SP_ATTACK EQU 3
-SP_DEFENSE EQU 4
-ACCURACY EQU 5
-EVASION EQU 6
-
-; move struct
-MOVE_LENGTH EQU 7
-MOVE_ANIM EQU 0
-MOVE_EFFECT EQU 1
-MOVE_POWER EQU 2
-MOVE_TYPE EQU 3
-MOVE_ACC EQU 4
-MOVE_PP EQU 5
-MOVE_CHANCE EQU 6
-
-; stat constants
-NUM_STATS EQU 6
-STAT_HP EQU 1
-STAT_ATK EQU 2
-STAT_DEF EQU 3
-STAT_SPD EQU 4
-STAT_SATK EQU 5
-STAT_SDEF EQU 6
-STAT_MIN_NORMAL EQU 5
-STAT_MIN_HP EQU 10
-
-; shiny dvs
-ATKDEFDV_SHINY EQU $EA
-SPDSPCDV_SHINY EQU $AA
-
-; battle classes
-WILD_BATTLE EQU 1
-TRAINER_BATTLE EQU 2
-
-; battle types
-BATTLETYPE_NORMAL EQU $00
-BATTLETYPE_CANLOSE EQU $01
-BATTLETYPE_TUTORIAL EQU $03
-BATTLETYPE_FISH EQU $04
-BATTLETYPE_ROAMING EQU $05
-BATTLETYPE_SHINY EQU $07
-BATTLETYPE_TREE EQU $08
-BATTLETYPE_FORCEITEM EQU $0a
-BATTLETYPE_SUICUNE EQU $0c
-
-; battle variables
-BATTLE_VARS_SUBSTATUS1 EQU 0
-BATTLE_VARS_SUBSTATUS2 EQU 1
-BATTLE_VARS_SUBSTATUS3 EQU 2
-BATTLE_VARS_SUBSTATUS4 EQU 3
-BATTLE_VARS_SUBSTATUS5 EQU 4
-BATTLE_VARS_SUBSTATUS1_OPP EQU 5
-BATTLE_VARS_SUBSTATUS2_OPP EQU 6
-BATTLE_VARS_SUBSTATUS3_OPP EQU 7
-BATTLE_VARS_SUBSTATUS4_OPP EQU 8
-BATTLE_VARS_SUBSTATUS5_OPP EQU 9
-BATTLE_VARS_STATUS EQU 10
-BATTLE_VARS_STATUS_OPP EQU 11
-BATTLE_VARS_MOVE_ANIM EQU 12
-BATTLE_VARS_MOVE_EFFECT EQU 13
-BATTLE_VARS_MOVE_POWER EQU 14
-BATTLE_VARS_MOVE_TYPE EQU 15
-BATTLE_VARS_MOVE EQU 16
-BATTLE_VARS_LAST_COUNTER_MOVE EQU 17
-BATTLE_VARS_LAST_COUNTER_MOVE_OPP EQU 18
-BATTLE_VARS_LAST_MOVE EQU 19
-BATTLE_VARS_LAST_MOVE_OPP EQU 20
-
-; status
-SLP EQU 7 ; 7 turns
-PSN EQU 3
-BRN EQU 4
-FRZ EQU 5
-PAR EQU 6
-
-; substatus
-SUBSTATUS_IN_LOVE      EQU 7
-SUBSTATUS_ENCORED      EQU 6
-SUBSTATUS_ENDURE       EQU 5
-SUBSTATUS_PERISH       EQU 4
-SUBSTATUS_IDENTIFIED   EQU 3
-SUBSTATUS_PROTECT      EQU 2
-SUBSTATUS_CURSE        EQU 1
-SUBSTATUS_NIGHTMARE    EQU 0
-
-SUBSTATUS_CURLED       EQU 0
-
-SUBSTATUS_CONFUSED     EQU 7
-SUBSTATUS_FLYING       EQU 6
-SUBSTATUS_UNDERGROUND  EQU 5
-SUBSTATUS_CHARGED      EQU 4
-SUBSTATUS_FLINCHED     EQU 3
-SUBSTATUS_ROLLOUT      EQU 1
-SUBSTATUS_BIDE         EQU 0
-
-SUBSTATUS_LEECH_SEED   EQU 7
-SUBSTATUS_RAGE         EQU 6
-SUBSTATUS_RECHARGE     EQU 5
-SUBSTATUS_SUBSTITUTE   EQU 4
-SUBSTATUS_FOCUS_ENERGY EQU 2
-SUBSTATUS_MIST         EQU 1
-SUBSTATUS_UNLEASH      EQU 0
-
-SUBSTATUS_CANT_RUN     EQU 7
-SUBSTATUS_DESTINY_BOND EQU 6
-SUBSTATUS_LOCK_ON      EQU 5
-SUBSTATUS_TOXIC        EQU 0
-
-; environmental
-SCREENS_REFLECT      EQU 4
-SCREENS_LIGHT_SCREEN EQU 3
-SCREENS_SAFEGUARD    EQU 2
-SCREENS_SPIKES       EQU 0
-
-; weather
-WEATHER_RAIN EQU 1
-WEATHER_SUN EQU 2
-WEATHER_SANDSTORM EQU 3
-WEATHER_RAIN_END EQU 4
-WEATHER_SUN_END EQU 5
-WEATHER_SANDSTORM_END EQU 6
-
-; move animations are 1:1 with move ids
-ANIM_CONFUSED EQU $103
-ANIM_SLEEP    EQU $104
-ANIM_INLOVE   EQU $10a
-
-; move effects
-EFFECT_NORMAL_HIT          EQU $00
-EFFECT_SLEEP               EQU $01
-EFFECT_POISON_HIT          EQU $02
-EFFECT_LEECH_HIT           EQU $03
-EFFECT_BURN_HIT            EQU $04
-EFFECT_FREEZE_HIT          EQU $05
-EFFECT_PARALYZE_HIT        EQU $06
-EFFECT_EXPLOSION           EQU $07
-EFFECT_DREAM_EATER         EQU $08
-EFFECT_MIRROR_MOVE         EQU $09
-EFFECT_ATTACK_UP           EQU $0a
-EFFECT_DEFENSE_UP          EQU $0b
-EFFECT_SPEED_UP            EQU $0c
-EFFECT_SP_ATTACK_UP        EQU $0d
-EFFECT_SP_DEFENSE_UP       EQU $0e
-EFFECT_ACCURACY_UP         EQU $0f
-EFFECT_EVASION_UP          EQU $10
-EFFECT_ALWAYS_HIT          EQU $11
-EFFECT_ATTACK_DOWN         EQU $12
-EFFECT_DEFENSE_DOWN        EQU $13
-EFFECT_SPEED_DOWN          EQU $14
-EFFECT_SP_ATTACK_DOWN      EQU $15
-EFFECT_SP_DEFENSE_DOWN     EQU $16
-EFFECT_ACCURACY_DOWN       EQU $17
-EFFECT_EVASION_DOWN        EQU $18
-EFFECT_HAZE                EQU $19
-EFFECT_BIDE                EQU $1a
-EFFECT_RAMPAGE             EQU $1b
-EFFECT_WHIRLWIND           EQU $1c
-EFFECT_MULTI_HIT           EQU $1d
-EFFECT_CONVERSION          EQU $1e
-EFFECT_FLINCH_HIT          EQU $1f
-EFFECT_HEAL                EQU $20
-EFFECT_TOXIC               EQU $21
-EFFECT_PAY_DAY             EQU $22
-EFFECT_LIGHT_SCREEN        EQU $23
-EFFECT_TRI_ATTACK          EQU $24
-EFFECT_UNUSED_25           EQU $25 ; unused
-EFFECT_OHKO                EQU $26
-EFFECT_RAZOR_WIND          EQU $27
-EFFECT_SUPER_FANG          EQU $28
-EFFECT_STATIC_DAMAGE       EQU $29
-EFFECT_BIND                EQU $2a
-EFFECT_UNUSED_2B           EQU $2b ; unused
-EFFECT_DOUBLE_HIT          EQU $2c
-EFFECT_JUMP_KICK           EQU $2d
-EFFECT_MIST                EQU $2e
-EFFECT_FOCUS_ENERGY        EQU $2f
-EFFECT_RECOIL_HIT          EQU $30
-EFFECT_CONFUSE             EQU $31
-EFFECT_ATTACK_UP_2         EQU $32
-EFFECT_DEFENSE_UP_2        EQU $33
-EFFECT_SPEED_UP_2          EQU $34
-EFFECT_SP_ATTACK_UP_2      EQU $35
-EFFECT_SP_DEFENSE_UP_2     EQU $36
-EFFECT_ACCURACY_UP_2       EQU $37
-EFFECT_EVASION_UP_2        EQU $38
-EFFECT_TRANSFORM           EQU $39
-EFFECT_ATTACK_DOWN_2       EQU $3a
-EFFECT_DEFENSE_DOWN_2      EQU $3b
-EFFECT_SPEED_DOWN_2        EQU $3c
-EFFECT_SP_ATTACK_DOWN_2    EQU $3d
-EFFECT_SP_DEFENSE_DOWN_2   EQU $3e
-EFFECT_ACCURACY_DOWN_2     EQU $3f
-EFFECT_EVASION_DOWN_2      EQU $40
-EFFECT_REFLECT             EQU $41
-EFFECT_POISON              EQU $42
-EFFECT_PARALYZE            EQU $43
-EFFECT_ATTACK_DOWN_HIT     EQU $44
-EFFECT_DEFENSE_DOWN_HIT    EQU $45
-EFFECT_SPEED_DOWN_HIT      EQU $46
-EFFECT_SP_ATTACK_DOWN_HIT  EQU $47
-EFFECT_SP_DEFENSE_DOWN_HIT EQU $48
-EFFECT_ACCURACY_DOWN_HIT   EQU $49
-EFFECT_EVASION_DOWN_HIT    EQU $4a
-EFFECT_SKY_ATTACK          EQU $4b
-EFFECT_CONFUSE_HIT         EQU $4c
-EFFECT_TWINEEDLE           EQU $4d
-EFFECT_UNUSED_4E           EQU $4e ; unused
-EFFECT_SUBSTITUTE          EQU $4f
-EFFECT_HYPER_BEAM          EQU $50
-EFFECT_RAGE                EQU $51
-EFFECT_MIMIC               EQU $52
-EFFECT_METRONOME           EQU $53
-EFFECT_LEECH_SEED          EQU $54
-EFFECT_SPLASH              EQU $55
-EFFECT_DISABLE             EQU $56
-EFFECT_LEVEL_DAMAGE        EQU $57
-EFFECT_PSYWAVE             EQU $58
-EFFECT_COUNTER             EQU $59
-EFFECT_ENCORE              EQU $5a
-EFFECT_PAIN_SPLIT          EQU $5b
-EFFECT_SNORE               EQU $5c
-EFFECT_CONVERSION2         EQU $5d
-EFFECT_LOCK_ON             EQU $5e
-EFFECT_SKETCH              EQU $5f
-EFFECT_DEFROST_OPPONENT    EQU $60
-EFFECT_SLEEP_TALK          EQU $61
-EFFECT_DESTINY_BOND        EQU $62
-EFFECT_REVERSAL            EQU $63
-EFFECT_SPITE               EQU $64
-EFFECT_FALSE_SWIPE         EQU $65
-EFFECT_HEAL_BELL           EQU $66
-EFFECT_PRIORITY_HIT        EQU $67
-EFFECT_TRIPLE_KICK         EQU $68
-EFFECT_THIEF               EQU $69
-EFFECT_MEAN_LOOK           EQU $6a
-EFFECT_NIGHTMARE           EQU $6b
-EFFECT_FLAME_WHEEL         EQU $6c
-EFFECT_CURSE               EQU $6d
-EFFECT_UNUSED_6E           EQU $6e ; unused
-EFFECT_PROTECT             EQU $6f
-EFFECT_SPIKES              EQU $70
-EFFECT_FORESIGHT           EQU $71
-EFFECT_PERISH_SONG         EQU $72
-EFFECT_SANDSTORM           EQU $73
-EFFECT_ENDURE              EQU $74
-EFFECT_ROLLOUT             EQU $75
-EFFECT_SWAGGER             EQU $76
-EFFECT_FURY_CUTTER         EQU $77
-EFFECT_ATTRACT             EQU $78
-EFFECT_RETURN              EQU $79
-EFFECT_PRESENT             EQU $7a
-EFFECT_FRUSTRATION         EQU $7b
-EFFECT_SAFEGUARD           EQU $7c
-EFFECT_SACRED_FIRE         EQU $7d
-EFFECT_MAGNITUDE           EQU $7e
-EFFECT_BATON_PASS          EQU $7f
-EFFECT_PURSUIT             EQU $80
-EFFECT_RAPID_SPIN          EQU $81
-EFFECT_UNUSED_82           EQU $82 ; unused
-EFFECT_UNUSED_83           EQU $83 ; unused
-EFFECT_MORNING_SUN         EQU $84
-EFFECT_SYNTHESIS           EQU $85
-EFFECT_MOONLIGHT           EQU $86
-EFFECT_HIDDEN_POWER        EQU $87
-EFFECT_RAIN_DANCE          EQU $88
-EFFECT_SUNNY_DAY           EQU $89
-EFFECT_STEEL_WING          EQU $8a
-EFFECT_METAL_CLAW          EQU $8b
-EFFECT_ANCIENTPOWER        EQU $8c
-EFFECT_FAKE_OUT            EQU $8d
-EFFECT_BELLY_DRUM          EQU $8e
-EFFECT_PSYCH_UP            EQU $8f
-EFFECT_MIRROR_COAT         EQU $90
-EFFECT_SKULL_BASH          EQU $91
-EFFECT_TWISTER             EQU $92
-EFFECT_EARTHQUAKE          EQU $93
-EFFECT_FUTURE_SIGHT        EQU $94
-EFFECT_GUST                EQU $95
-EFFECT_STOMP               EQU $96
-EFFECT_SOLARBEAM           EQU $97
-EFFECT_THUNDER             EQU $98
-EFFECT_TELEPORT            EQU $99
-EFFECT_BEAT_UP             EQU $9a
-EFFECT_FLY                 EQU $9b
-EFFECT_DEFENSE_CURL        EQU $9c
--- a/bittable2.asm
+++ /dev/null
@@ -1,198 +1,0 @@
-; All locations are in WRAM bank 1.
-
-	; location, bit
-
-	; pokegear
-	dwb $d957, %00000010 ; radio card
-	dwb $d957, %00000001 ; map card
-	dwb $d957, %00000100 ; phone card
-	dwb $d957, %00001000 ; expn card
-	dwb $d957, %10000000 ; on/off
-	
-	;   DaycareMan, %10000000 ; daycare 1 on
-	dwb DaycareMan, %01000000 ; monster 1 and 2 are compatible
-	;   DaycareMan, %00100000 ; egg is ready
-	dwb DaycareMan, %00000001 ; monster 1 in daycare
-	
-	;   DaycareLady, %10000000 = daycare 2 on
-	dwb DaycareLady, %00000001 ; monster 2 in daycare
-	
-	dwb $d854, %00000001 ; mom saving money
-	dwb $d854, %10000000 ; dst
-	
-	dwb $dc39, %00000001
-	
-	dwb $d84c, %00000001 ; pokedex
-	dwb $d84c, %00000010 ; unown dex
-	dwb $d84c, %00001000 ; pokerus
-	dwb $d84c, %00010000 ; rocket signal on ch20
-	dwb $d84c, %01000000 ; credits skip
-	dwb $d84c, %10000000 ; bug contest on
-	dwb $d84d, %00000100 ; bug contest timer
-	dwb $d84d, %00000010 ; rockets in radio tower
-	dwb $d84d, %00000001 ; bike shop call enabled (1024 bike steps reqd)
-	dwb $d84d, %00010000
-	dwb $d84d, %00100000 ; give pokerus; berry -> berry juice when trading?
-	dwb $d84d, %01000000
-	dwb $d84d, %10000000 ; rockets in mahogany
-	
-	dwb $dbf5, %00000001 ; strength active
-	dwb $dbf5, %00000010 ; always on bike (cant surf)
-	dwb $dbf5, %00000100 ; downhill (cycling road)
-	
-	dwb JohtoBadges, %00000001 ; zephyrbadge
-	dwb JohtoBadges, %00000010 ; hivebadge
-	dwb JohtoBadges, %00000100 ; plainbadge
-	dwb JohtoBadges, %00001000 ; fogbadge
-	dwb JohtoBadges, %00010000 ; mineralbadge
-	dwb JohtoBadges, %00100000 ; stormbadge
-	dwb JohtoBadges, %01000000 ; glacierbadge
-	dwb JohtoBadges, %10000000 ; risingbadge
-	
-	dwb KantoBadges, %00000001 ; boulderbadge
-	dwb KantoBadges, %00000010 ; cascadebadge
-	dwb KantoBadges, %00000100 ; thunderbadge
-	dwb KantoBadges, %00001000 ; rainbowbadge
-	dwb KantoBadges, %00010000 ; soulbadge
-	dwb KantoBadges, %00100000 ; marshbadge
-	dwb KantoBadges, %01000000 ; volcanobadge
-	dwb KantoBadges, %10000000 ; earthbadge
-	
-	; unown sets
-	dwb UnlockedUnowns, %00000001 ; 1
-	dwb UnlockedUnowns, %00000010 ; 2
-	dwb UnlockedUnowns, %00000100 ; 3
-	dwb UnlockedUnowns, %00001000 ; 4
-	dwb UnlockedUnowns, %00010000 ; 5
-	dwb UnlockedUnowns, %00100000 ; 6
-	dwb UnlockedUnowns, %01000000 ; 7
-	dwb UnlockedUnowns, %10000000 ; 8
-	
-	; fly
-	dwb FlypointPerms, %00000001 ; your house
-	dwb FlypointPerms, %00000010 ; viridian pokecenter
-	dwb FlypointPerms, %00000100 ; pallet
-	dwb FlypointPerms, %00001000 ; viridian
-	dwb FlypointPerms, %00010000 ; pewter
-	dwb FlypointPerms, %00100000 ; cerulean
-	dwb FlypointPerms, %01000000 ; rock tunnel
-	dwb FlypointPerms, %10000000 ; vermilion
-	dwb FlypointPerms + 1, %00000001 ; lavender
-	dwb FlypointPerms + 1, %00000010 ; saffron
-	dwb FlypointPerms + 1, %00000100 ; celadon
-	dwb FlypointPerms + 1, %00001000 ; fuchsia
-	dwb FlypointPerms + 1, %00010000 ; cinnabar
-	dwb FlypointPerms + 1, %00100000 ; indigo plateau
-	dwb FlypointPerms + 1, %01000000 ; new bark
-	dwb FlypointPerms + 1, %10000000 ; cherrygrove
-	dwb FlypointPerms + 2, %00000001 ; violet
-	dwb FlypointPerms + 2, %00000100 ; azalea
-	dwb FlypointPerms + 2, %00001000 ; cianwood
-	dwb FlypointPerms + 2, %00010000 ; goldenrod
-	dwb FlypointPerms + 2, %00100000 ; olivine
-	dwb FlypointPerms + 2, %01000000 ; ecruteak
-	dwb FlypointPerms + 2, %10000000 ; mahogany
-	dwb FlypointPerms + 3, %00000001 ; lake of rage
-	dwb FlypointPerms + 3, %00000010 ; blackthorn
-	dwb FlypointPerms + 3, %00000100 ; silver cave
-	dwb FlypointPerms + 3, %00010000 ; unused
-	
-	dwb $dc9d, %00000001 ; lucky number show
-	dwb $d84d, %00001000
-	
-	dwb $dc1e, %00000001 ; kurt making balls
-	dwb $dc1e, %00000010
-	dwb $dc1e, %00000100 ; special wilddata?
-	dwb $dc1e, %00001000 ; time capsule (24h wait)
-	dwb $dc1e, %00010000 ; all fruit trees
-	dwb $dc1e, %00100000 ; shuckle given
-	dwb $dc1e, %01000000 ; goldenrod underground merchant closed
-	dwb $dc1e, %10000000 ; fought in trainer hall today
-	
-	dwb $dc1f, %00000001 ; mt moon square clefairy
-	dwb $dc1f, %00000010 ; union cave lapras
-	dwb $dc1f, %00000100 ; goldenrod underground haircut used
-	dwb $dc1f, %00001000 ; goldenrod mall happiness event floor05 person07
-	dwb $dc1f, %00010000 ; tea in blues house
-	dwb $dc1f, %00100000 ; indigo plateau rival fight
-	dwb $dc1f, %01000000
-	dwb $dc1f, %10000000
-	
-	dwb $dc20, %00000001 ; $60
-	dwb $dc20, %00000010 ; goldenrod dept store sale is on
-	
-	dwb $cfbc, %10000000 ; $62
-	
-	dwb PlayerGender, %00000001 ; player is female
-	
-	dwb $dbf3, %00000100 ; have gs ball after kurt examined it
-	
-	; rematches
-	dwb $dc4c, %00000001 ; jack
-	dwb $dc4c, %00000010 ; huey
-	dwb $dc4c, %00000100 ; gaven
-	dwb $dc4c, %00001000 ; beth
-	dwb $dc4c, %00010000 ; jose
-	dwb $dc4c, %00100000 ; reena
-	dwb $dc4c, %01000000 ; joey
-	dwb $dc4c, %10000000 ; wade
-	dwb $dc4d, %00000001 ; ralph
-	dwb $dc4d, %00000010 ; liz
-	dwb $dc4d, %00000100 ; anthony
-	dwb $dc4d, %00001000 ; todd
-	dwb $dc4d, %00010000 ; gina
-	dwb $dc4d, %00100000 ; arnie
-	dwb $dc4d, %01000000 ; alan
-	dwb $dc4d, %10000000 ; dana
-	dwb $dc4e, %00000001 ; chad
-	dwb $dc4e, %00000010 ; tully
-	dwb $dc4e, %00000100 ; brent
-	dwb $dc4e, %00001000 ; tiffany
-	dwb $dc4e, %00010000 ; vance
-	dwb $dc4e, %00100000 ; wilton
-	dwb $dc4e, %01000000 ; parry
-	dwb $dc4e, %10000000 ; erin
-	
-	dwb $dc50, %00000001 ; beverly has nugget
-	dwb $dc50, %00000010 ; jose has star piece
-	dwb $dc50, %00000100 ; wade has item (see bittable1 $032b-e)
-	dwb $dc50, %00001000 ; gina has leaf stone
-	dwb $dc50, %00010000 ; alan has fire stone
-	dwb $dc50, %00100000 ; liz has thunderstone
-	dwb $dc50, %01000000 ; derek has nugget
-	dwb $dc50, %10000000 ; tully has water stone
-	
-	dwb $dc51, %00000001 ; tiffany has pink bow
-	dwb $dc51, %00000010 ; wilton has item (see bittable1 $032f-31)
-	
-	dwb $dc54, %00000001
-	dwb $dc54, %00000010
-	dwb $dc54, %00000100
-	dwb $dc54, %00001000
-	dwb $dc54, %00010000
-	dwb $dc54, %00100000
-	dwb $dc54, %01000000
-	dwb $dc54, %10000000
-	
-	dwb $dc55, %00000001
-	dwb $dc55, %00000010
-	dwb $dc55, %00000100
-	dwb $dc55, %00001000
-	dwb $dc55, %00010000
-	dwb $dc55, %00100000
-	dwb $dc55, %01000000
-	dwb $dc55, %10000000
-	
-	dwb $dc56, %00000001
-	dwb $dc56, %00000010
-	dwb $dc56, %00000100
-	dwb $dc56, %00001000
-	dwb $dc56, %00010000
-	dwb $dc56, %00100000
-	dwb $dc56, %01000000
-	dwb $dc56, %10000000
-	
-	dwb $d45b, %00000100 ; female player has been transformed into male
-	
-	dwb $dc20, %00000100 ; dunsparce swarm
-	dwb $dc20, %00001000 ; yanma swarm
--- a/constants.asm
+++ b/constants.asm
@@ -1,14 +1,13 @@
 _CRYSTAL EQU 1
 
-
-INCLUDE "pokemon_constants.asm"
-INCLUDE "move_constants.asm"
-INCLUDE "battle_constants.asm"
-INCLUDE "map_constants.asm"
-INCLUDE "item_constants.asm"
-INCLUDE "trainer_constants.asm"
-INCLUDE "script_constants.asm"
-INCLUDE "music_constants.asm"
+INCLUDE "constants/pokemon_constants.asm"
+INCLUDE "constants/move_constants.asm"
+INCLUDE "constants/battle_constants.asm"
+INCLUDE "constants/map_constants.asm"
+INCLUDE "constants/item_constants.asm"
+INCLUDE "constants/trainer_constants.asm"
+INCLUDE "constants/script_constants.asm"
+INCLUDE "constants/music_constants.asm"
 
 
 ; rst vectors
--- /dev/null
+++ b/constants/battle_constants.asm
@@ -1,0 +1,291 @@
+MAX_LEVEL EQU 100
+NUM_MOVES EQU 4
+
+ATTACK EQU 0
+DEFENSE EQU 1
+SPEED EQU 2
+SP_ATTACK EQU 3
+SP_DEFENSE EQU 4
+ACCURACY EQU 5
+EVASION EQU 6
+
+; move struct
+MOVE_LENGTH EQU 7
+MOVE_ANIM EQU 0
+MOVE_EFFECT EQU 1
+MOVE_POWER EQU 2
+MOVE_TYPE EQU 3
+MOVE_ACC EQU 4
+MOVE_PP EQU 5
+MOVE_CHANCE EQU 6
+
+; stat constants
+NUM_STATS EQU 6
+STAT_HP EQU 1
+STAT_ATK EQU 2
+STAT_DEF EQU 3
+STAT_SPD EQU 4
+STAT_SATK EQU 5
+STAT_SDEF EQU 6
+STAT_MIN_NORMAL EQU 5
+STAT_MIN_HP EQU 10
+
+; shiny dvs
+ATKDEFDV_SHINY EQU $EA
+SPDSPCDV_SHINY EQU $AA
+
+; battle classes
+WILD_BATTLE EQU 1
+TRAINER_BATTLE EQU 2
+
+; battle types
+BATTLETYPE_NORMAL EQU $00
+BATTLETYPE_CANLOSE EQU $01
+BATTLETYPE_TUTORIAL EQU $03
+BATTLETYPE_FISH EQU $04
+BATTLETYPE_ROAMING EQU $05
+BATTLETYPE_SHINY EQU $07
+BATTLETYPE_TREE EQU $08
+BATTLETYPE_FORCEITEM EQU $0a
+BATTLETYPE_SUICUNE EQU $0c
+
+; battle variables
+BATTLE_VARS_SUBSTATUS1 EQU 0
+BATTLE_VARS_SUBSTATUS2 EQU 1
+BATTLE_VARS_SUBSTATUS3 EQU 2
+BATTLE_VARS_SUBSTATUS4 EQU 3
+BATTLE_VARS_SUBSTATUS5 EQU 4
+BATTLE_VARS_SUBSTATUS1_OPP EQU 5
+BATTLE_VARS_SUBSTATUS2_OPP EQU 6
+BATTLE_VARS_SUBSTATUS3_OPP EQU 7
+BATTLE_VARS_SUBSTATUS4_OPP EQU 8
+BATTLE_VARS_SUBSTATUS5_OPP EQU 9
+BATTLE_VARS_STATUS EQU 10
+BATTLE_VARS_STATUS_OPP EQU 11
+BATTLE_VARS_MOVE_ANIM EQU 12
+BATTLE_VARS_MOVE_EFFECT EQU 13
+BATTLE_VARS_MOVE_POWER EQU 14
+BATTLE_VARS_MOVE_TYPE EQU 15
+BATTLE_VARS_MOVE EQU 16
+BATTLE_VARS_LAST_COUNTER_MOVE EQU 17
+BATTLE_VARS_LAST_COUNTER_MOVE_OPP EQU 18
+BATTLE_VARS_LAST_MOVE EQU 19
+BATTLE_VARS_LAST_MOVE_OPP EQU 20
+
+; status
+SLP EQU 7 ; 7 turns
+PSN EQU 3
+BRN EQU 4
+FRZ EQU 5
+PAR EQU 6
+
+; substatus
+SUBSTATUS_IN_LOVE      EQU 7
+SUBSTATUS_ENCORED      EQU 6
+SUBSTATUS_ENDURE       EQU 5
+SUBSTATUS_PERISH       EQU 4
+SUBSTATUS_IDENTIFIED   EQU 3
+SUBSTATUS_PROTECT      EQU 2
+SUBSTATUS_CURSE        EQU 1
+SUBSTATUS_NIGHTMARE    EQU 0
+
+SUBSTATUS_CURLED       EQU 0
+
+SUBSTATUS_CONFUSED     EQU 7
+SUBSTATUS_FLYING       EQU 6
+SUBSTATUS_UNDERGROUND  EQU 5
+SUBSTATUS_CHARGED      EQU 4
+SUBSTATUS_FLINCHED     EQU 3
+SUBSTATUS_ROLLOUT      EQU 1
+SUBSTATUS_BIDE         EQU 0
+
+SUBSTATUS_LEECH_SEED   EQU 7
+SUBSTATUS_RAGE         EQU 6
+SUBSTATUS_RECHARGE     EQU 5
+SUBSTATUS_SUBSTITUTE   EQU 4
+SUBSTATUS_FOCUS_ENERGY EQU 2
+SUBSTATUS_MIST         EQU 1
+SUBSTATUS_UNLEASH      EQU 0
+
+SUBSTATUS_CANT_RUN     EQU 7
+SUBSTATUS_DESTINY_BOND EQU 6
+SUBSTATUS_LOCK_ON      EQU 5
+SUBSTATUS_TOXIC        EQU 0
+
+; environmental
+SCREENS_REFLECT      EQU 4
+SCREENS_LIGHT_SCREEN EQU 3
+SCREENS_SAFEGUARD    EQU 2
+SCREENS_SPIKES       EQU 0
+
+; weather
+WEATHER_RAIN EQU 1
+WEATHER_SUN EQU 2
+WEATHER_SANDSTORM EQU 3
+WEATHER_RAIN_END EQU 4
+WEATHER_SUN_END EQU 5
+WEATHER_SANDSTORM_END EQU 6
+
+; move animations are 1:1 with move ids
+ANIM_CONFUSED EQU $103
+ANIM_SLEEP    EQU $104
+ANIM_INLOVE   EQU $10a
+
+; move effects
+EFFECT_NORMAL_HIT          EQU $00
+EFFECT_SLEEP               EQU $01
+EFFECT_POISON_HIT          EQU $02
+EFFECT_LEECH_HIT           EQU $03
+EFFECT_BURN_HIT            EQU $04
+EFFECT_FREEZE_HIT          EQU $05
+EFFECT_PARALYZE_HIT        EQU $06
+EFFECT_EXPLOSION           EQU $07
+EFFECT_DREAM_EATER         EQU $08
+EFFECT_MIRROR_MOVE         EQU $09
+EFFECT_ATTACK_UP           EQU $0a
+EFFECT_DEFENSE_UP          EQU $0b
+EFFECT_SPEED_UP            EQU $0c
+EFFECT_SP_ATTACK_UP        EQU $0d
+EFFECT_SP_DEFENSE_UP       EQU $0e
+EFFECT_ACCURACY_UP         EQU $0f
+EFFECT_EVASION_UP          EQU $10
+EFFECT_ALWAYS_HIT          EQU $11
+EFFECT_ATTACK_DOWN         EQU $12
+EFFECT_DEFENSE_DOWN        EQU $13
+EFFECT_SPEED_DOWN          EQU $14
+EFFECT_SP_ATTACK_DOWN      EQU $15
+EFFECT_SP_DEFENSE_DOWN     EQU $16
+EFFECT_ACCURACY_DOWN       EQU $17
+EFFECT_EVASION_DOWN        EQU $18
+EFFECT_HAZE                EQU $19
+EFFECT_BIDE                EQU $1a
+EFFECT_RAMPAGE             EQU $1b
+EFFECT_WHIRLWIND           EQU $1c
+EFFECT_MULTI_HIT           EQU $1d
+EFFECT_CONVERSION          EQU $1e
+EFFECT_FLINCH_HIT          EQU $1f
+EFFECT_HEAL                EQU $20
+EFFECT_TOXIC               EQU $21
+EFFECT_PAY_DAY             EQU $22
+EFFECT_LIGHT_SCREEN        EQU $23
+EFFECT_TRI_ATTACK          EQU $24
+EFFECT_UNUSED_25           EQU $25 ; unused
+EFFECT_OHKO                EQU $26
+EFFECT_RAZOR_WIND          EQU $27
+EFFECT_SUPER_FANG          EQU $28
+EFFECT_STATIC_DAMAGE       EQU $29
+EFFECT_BIND                EQU $2a
+EFFECT_UNUSED_2B           EQU $2b ; unused
+EFFECT_DOUBLE_HIT          EQU $2c
+EFFECT_JUMP_KICK           EQU $2d
+EFFECT_MIST                EQU $2e
+EFFECT_FOCUS_ENERGY        EQU $2f
+EFFECT_RECOIL_HIT          EQU $30
+EFFECT_CONFUSE             EQU $31
+EFFECT_ATTACK_UP_2         EQU $32
+EFFECT_DEFENSE_UP_2        EQU $33
+EFFECT_SPEED_UP_2          EQU $34
+EFFECT_SP_ATTACK_UP_2      EQU $35
+EFFECT_SP_DEFENSE_UP_2     EQU $36
+EFFECT_ACCURACY_UP_2       EQU $37
+EFFECT_EVASION_UP_2        EQU $38
+EFFECT_TRANSFORM           EQU $39
+EFFECT_ATTACK_DOWN_2       EQU $3a
+EFFECT_DEFENSE_DOWN_2      EQU $3b
+EFFECT_SPEED_DOWN_2        EQU $3c
+EFFECT_SP_ATTACK_DOWN_2    EQU $3d
+EFFECT_SP_DEFENSE_DOWN_2   EQU $3e
+EFFECT_ACCURACY_DOWN_2     EQU $3f
+EFFECT_EVASION_DOWN_2      EQU $40
+EFFECT_REFLECT             EQU $41
+EFFECT_POISON              EQU $42
+EFFECT_PARALYZE            EQU $43
+EFFECT_ATTACK_DOWN_HIT     EQU $44
+EFFECT_DEFENSE_DOWN_HIT    EQU $45
+EFFECT_SPEED_DOWN_HIT      EQU $46
+EFFECT_SP_ATTACK_DOWN_HIT  EQU $47
+EFFECT_SP_DEFENSE_DOWN_HIT EQU $48
+EFFECT_ACCURACY_DOWN_HIT   EQU $49
+EFFECT_EVASION_DOWN_HIT    EQU $4a
+EFFECT_SKY_ATTACK          EQU $4b
+EFFECT_CONFUSE_HIT         EQU $4c
+EFFECT_TWINEEDLE           EQU $4d
+EFFECT_UNUSED_4E           EQU $4e ; unused
+EFFECT_SUBSTITUTE          EQU $4f
+EFFECT_HYPER_BEAM          EQU $50
+EFFECT_RAGE                EQU $51
+EFFECT_MIMIC               EQU $52
+EFFECT_METRONOME           EQU $53
+EFFECT_LEECH_SEED          EQU $54
+EFFECT_SPLASH              EQU $55
+EFFECT_DISABLE             EQU $56
+EFFECT_LEVEL_DAMAGE        EQU $57
+EFFECT_PSYWAVE             EQU $58
+EFFECT_COUNTER             EQU $59
+EFFECT_ENCORE              EQU $5a
+EFFECT_PAIN_SPLIT          EQU $5b
+EFFECT_SNORE               EQU $5c
+EFFECT_CONVERSION2         EQU $5d
+EFFECT_LOCK_ON             EQU $5e
+EFFECT_SKETCH              EQU $5f
+EFFECT_DEFROST_OPPONENT    EQU $60
+EFFECT_SLEEP_TALK          EQU $61
+EFFECT_DESTINY_BOND        EQU $62
+EFFECT_REVERSAL            EQU $63
+EFFECT_SPITE               EQU $64
+EFFECT_FALSE_SWIPE         EQU $65
+EFFECT_HEAL_BELL           EQU $66
+EFFECT_PRIORITY_HIT        EQU $67
+EFFECT_TRIPLE_KICK         EQU $68
+EFFECT_THIEF               EQU $69
+EFFECT_MEAN_LOOK           EQU $6a
+EFFECT_NIGHTMARE           EQU $6b
+EFFECT_FLAME_WHEEL         EQU $6c
+EFFECT_CURSE               EQU $6d
+EFFECT_UNUSED_6E           EQU $6e ; unused
+EFFECT_PROTECT             EQU $6f
+EFFECT_SPIKES              EQU $70
+EFFECT_FORESIGHT           EQU $71
+EFFECT_PERISH_SONG         EQU $72
+EFFECT_SANDSTORM           EQU $73
+EFFECT_ENDURE              EQU $74
+EFFECT_ROLLOUT             EQU $75
+EFFECT_SWAGGER             EQU $76
+EFFECT_FURY_CUTTER         EQU $77
+EFFECT_ATTRACT             EQU $78
+EFFECT_RETURN              EQU $79
+EFFECT_PRESENT             EQU $7a
+EFFECT_FRUSTRATION         EQU $7b
+EFFECT_SAFEGUARD           EQU $7c
+EFFECT_SACRED_FIRE         EQU $7d
+EFFECT_MAGNITUDE           EQU $7e
+EFFECT_BATON_PASS          EQU $7f
+EFFECT_PURSUIT             EQU $80
+EFFECT_RAPID_SPIN          EQU $81
+EFFECT_UNUSED_82           EQU $82 ; unused
+EFFECT_UNUSED_83           EQU $83 ; unused
+EFFECT_MORNING_SUN         EQU $84
+EFFECT_SYNTHESIS           EQU $85
+EFFECT_MOONLIGHT           EQU $86
+EFFECT_HIDDEN_POWER        EQU $87
+EFFECT_RAIN_DANCE          EQU $88
+EFFECT_SUNNY_DAY           EQU $89
+EFFECT_STEEL_WING          EQU $8a
+EFFECT_METAL_CLAW          EQU $8b
+EFFECT_ANCIENTPOWER        EQU $8c
+EFFECT_FAKE_OUT            EQU $8d
+EFFECT_BELLY_DRUM          EQU $8e
+EFFECT_PSYCH_UP            EQU $8f
+EFFECT_MIRROR_COAT         EQU $90
+EFFECT_SKULL_BASH          EQU $91
+EFFECT_TWISTER             EQU $92
+EFFECT_EARTHQUAKE          EQU $93
+EFFECT_FUTURE_SIGHT        EQU $94
+EFFECT_GUST                EQU $95
+EFFECT_STOMP               EQU $96
+EFFECT_SOLARBEAM           EQU $97
+EFFECT_THUNDER             EQU $98
+EFFECT_TELEPORT            EQU $99
+EFFECT_BEAT_UP             EQU $9a
+EFFECT_FLY                 EQU $9b
+EFFECT_DEFENSE_CURL        EQU $9c
--- /dev/null
+++ b/constants/item_constants.asm
@@ -1,0 +1,273 @@
+NO_ITEM       EQU $00
+MASTER_BALL   EQU $01
+ULTRA_BALL    EQU $02
+BRIGHTPOWDER  EQU $03
+GREAT_BALL    EQU $04
+POKE_BALL     EQU $05
+BICYCLE       EQU $07
+MOON_STONE    EQU $08
+ANTIDOTE      EQU $09
+BURN_HEAL     EQU $0A
+ICE_HEAL      EQU $0B
+AWAKENING     EQU $0C
+PARLYZ_HEAL   EQU $0D
+FULL_RESTORE  EQU $0E
+MAX_POTION    EQU $0F
+HYPER_POTION  EQU $10
+SUPER_POTION  EQU $11
+POTION        EQU $12
+ESCAPE_ROPE   EQU $13
+REPEL         EQU $14
+MAX_ELIXER    EQU $15
+FIRE_STONE    EQU $16
+THUNDERSTONE  EQU $17
+WATER_STONE   EQU $18
+HP_UP         EQU $1A
+PROTEIN       EQU $1B
+IRON          EQU $1C
+CARBOS        EQU $1D
+LUCKY_PUNCH   EQU $1E
+CALCIUM       EQU $1F
+RARE_CANDY    EQU $20
+X_ACCURACY    EQU $21
+LEAF_STONE    EQU $22
+METAL_POWDER  EQU $23
+NUGGET        EQU $24
+POKE_DOLL     EQU $25
+FULL_HEAL     EQU $26
+REVIVE        EQU $27
+MAX_REVIVE    EQU $28
+GUARD_SPEC    EQU $29
+SUPER_REPEL   EQU $2A
+MAX_REPEL     EQU $2B
+DIRE_HIT      EQU $2C
+FRESH_WATER   EQU $2E
+SODA_POP      EQU $2F
+LEMONADE      EQU $30
+X_ATTACK      EQU $31
+X_DEFEND      EQU $33
+X_SPEED       EQU $34
+X_SPECIAL     EQU $35
+COIN_CASE     EQU $36
+ITEMFINDER    EQU $37
+EXP_SHARE     EQU $39
+OLD_ROD       EQU $3A
+GOOD_ROD      EQU $3B
+SILVER_LEAF   EQU $3C
+SUPER_ROD     EQU $3D
+PP_UP         EQU $3E
+ETHER         EQU $3F
+MAX_ETHER     EQU $40
+ELIXER        EQU $41
+RED_SCALE     EQU $42
+SECRETPOTION  EQU $43
+S_S_TICKET    EQU $44
+MYSTERY_EGG   EQU $45
+CLEAR_BELL    EQU $46
+SILVER_WING   EQU $47
+MOOMOO_MILK   EQU $48
+QUICK_CLAW    EQU $49
+PSNCUREBERRY  EQU $4A
+GOLD_LEAF     EQU $4B
+SOFT_SAND     EQU $4C
+SHARP_BEAK    EQU $4D
+PRZCUREBERRY  EQU $4E
+BURNT_BERRY   EQU $4F
+ICE_BERRY     EQU $50
+POISON_BARB   EQU $51
+KINGS_ROCK    EQU $52
+BITTER_BERRY  EQU $53
+MINT_BERRY    EQU $54
+RED_APRICORN  EQU $55
+TINYMUSHROOM  EQU $56
+BIG_MUSHROOM  EQU $57
+SILVERPOWDER  EQU $58
+BLU_APRICORN  EQU $59
+AMULET_COIN   EQU $5B
+YLW_APRICORN  EQU $5C
+GRN_APRICORN  EQU $5D
+CLEANSE_TAG   EQU $5E
+MYSTIC_WATER  EQU $5F
+TWISTEDSPOON  EQU $60
+WHT_APRICORN  EQU $61
+BLACKBELT     EQU $62
+BLK_APRICORN  EQU $63
+PNK_APRICORN  EQU $65
+BLACKGLASSES  EQU $66
+SLOWPOKETAIL  EQU $67
+PINK_BOW      EQU $68
+STICK         EQU $69
+SMOKE_BALL    EQU $6A
+NEVERMELTICE  EQU $6B
+MAGNET        EQU $6C
+MIRACLEBERRY  EQU $6D
+PEARL         EQU $6E
+BIG_PEARL     EQU $6F
+EVERSTONE     EQU $70
+SPELL_TAG     EQU $71
+RAGECANDYBAR  EQU $72
+GS_BALL       EQU $73
+BLUE_CARD     EQU $74
+MIRACLE_SEED  EQU $75
+THICK_CLUB    EQU $76
+FOCUS_BAND    EQU $77
+ENERGYPOWDER  EQU $79
+ENERGY_ROOT   EQU $7A
+HEAL_POWDER   EQU $7B
+REVIVAL_HERB  EQU $7C
+HARD_STONE    EQU $7D
+LUCKY_EGG     EQU $7E
+CARD_KEY      EQU $7F
+MACHINE_PART  EQU $80
+EGG_TICKET    EQU $81
+LOST_ITEM     EQU $82
+STARDUST      EQU $83
+STAR_PIECE    EQU $84
+BASEMENT_KEY  EQU $85
+PASS          EQU $86
+CHARCOAL      EQU $8A
+BERRY_JUICE   EQU $8B
+SCOPE_LENS    EQU $8C
+METAL_COAT    EQU $8F
+DRAGON_FANG   EQU $90
+LEFTOVERS     EQU $92
+MYSTERYBERRY  EQU $96
+DRAGON_SCALE  EQU $97
+BERSERK_GENE  EQU $98
+SACRED_ASH    EQU $9C
+HEAVY_BALL    EQU $9D
+FLOWER_MAIL   EQU $9E
+LEVEL_BALL    EQU $9F
+LURE_BALL     EQU $A0
+FAST_BALL     EQU $A1
+LIGHT_BALL    EQU $A3
+FRIEND_BALL   EQU $A4
+MOON_BALL     EQU $A5
+LOVE_BALL     EQU $A6
+NORMAL_BOX    EQU $A7
+GORGEOUS_BOX  EQU $A8
+SUN_STONE     EQU $A9
+POLKADOT_BOW  EQU $AA
+UP_GRADE      EQU $AC
+BERRY         EQU $AD
+GOLD_BERRY    EQU $AE
+SQUIRTBOTTLE  EQU $AF
+PARK_BALL     EQU $B1
+RAINBOW_WING  EQU $B2
+BRICK_PIECE   EQU $B4
+SURF_MAIL     EQU $B5
+LITEBLUEMAIL  EQU $B6
+PORTRAITMAIL  EQU $B7
+LOVELY_MAIL   EQU $B8
+EON_MAIL      EQU $B9
+MORPH_MAIL    EQU $BA
+BLUESKY_MAIL  EQU $BB
+MUSIC_MAIL    EQU $BC
+MIRAGE_MAIL   EQU $BD
+TM_01         EQU $BF
+TM_02         EQU $C0
+TM_03         EQU $C1
+TM_04         EQU $C2
+TM_05         EQU $C4
+TM_06         EQU $C5
+TM_07         EQU $C6
+TM_08         EQU $C7
+TM_09         EQU $C8
+TM_10         EQU $C9
+TM_11         EQU $CA
+TM_12         EQU $CB
+TM_13         EQU $CC
+TM_14         EQU $CD
+TM_15         EQU $CE
+TM_16         EQU $CF
+TM_17         EQU $D0
+TM_18         EQU $D1
+TM_19         EQU $D2
+TM_20         EQU $D3
+TM_21         EQU $D4
+TM_22         EQU $D5
+TM_23         EQU $D6
+TM_24         EQU $D7
+TM_25         EQU $D8
+TM_26         EQU $D9
+TM_27         EQU $DA
+TM_28         EQU $DB
+TM_29         EQU $DD
+TM_30         EQU $DE
+TM_31         EQU $DF
+TM_32         EQU $E0
+TM_33         EQU $E1
+TM_34         EQU $E2
+TM_35         EQU $E3
+TM_36         EQU $E4
+TM_37         EQU $E5
+TM_38         EQU $E6
+TM_39         EQU $E7
+TM_40         EQU $E8
+TM_41         EQU $E9
+TM_42         EQU $EA
+TM_43         EQU $EB
+TM_44         EQU $EC
+TM_45         EQU $ED
+TM_46         EQU $EE
+TM_47         EQU $EF
+TM_48         EQU $F0
+TM_49         EQU $F1
+TM_50         EQU $F2
+HM_01         EQU $F3
+HM_02         EQU $F4
+HM_03         EQU $F5
+HM_04         EQU $F6
+HM_05         EQU $F7
+HM_06         EQU $F8
+HM_07         EQU $F9
+
+NUM_TMS EQU HM_01 - TM_01 - 2
+
+; pockets
+ITEM     EQU 1
+KEY_ITEM EQU 2
+BALL     EQU 3
+TM_HM    EQU 4
+
+; item actions
+CANT_SELECT EQU %01000000
+CANT_TOSS   EQU %10000000
+
+; held item effects
+HELD_BERRY          EQU $01
+HELD_LEFTOVERS      EQU $03
+HELD_RESTORE_PP     EQU $06
+HELD_CLEANSE_TAG    EQU $08
+HELD_HEAL_POISON    EQU $0a
+HELD_HEAL_FREEZE    EQU $0b
+HELD_HEAL_BURN      EQU $0c
+HELD_HEAL_SLEEP     EQU $0d
+HELD_HEAL_PARALYZE  EQU $0e
+HELD_HEAL_STATUS    EQU $0f
+HELD_HEAL_CONFUSION EQU $10
+HELD_METAL_POWDER   EQU $2a
+HELD_NORMAL_BOOST   EQU $32
+HELD_FIGHTING_BOOST EQU $33
+HELD_FLYING_BOOST   EQU $34
+HELD_POISON_BOOST   EQU $35
+HELD_GROUND_BOOST   EQU $36
+HELD_ROCK_BOOST     EQU $37
+HELD_BUG_BOOST      EQU $38
+HELD_GHOST_BOOST    EQU $39
+HELD_FIRE_BOOST     EQU $3a
+HELD_WATER_BOOST    EQU $3b
+HELD_GRASS_BOOST    EQU $3c
+HELD_ELECTRIC_BOOST EQU $3d
+HELD_PSYCHIC_BOOST  EQU $3e
+HELD_ICE_BOOST      EQU $3f
+HELD_DRAGON_BOOST   EQU $40
+HELD_DARK_BOOST     EQU $41
+HELD_STEEL_BOOST    EQU $42
+HELD_ESCAPE         EQU $48
+HELD_CRITICAL_UP    EQU $49
+HELD_QUICK_CLAW     EQU $4a
+HELD_TRADE_EVOLVE   EQU $4b
+HELD_AMULET_COIN    EQU $4c
+HELD_BRIGHTPOWDER   EQU $4d
+HELD_FOCUS_BAND     EQU $4f
--- /dev/null
+++ b/constants/map_constants.asm
@@ -1,0 +1,1585 @@
+; map group ids
+GROUP_OLIVINE_POKECENTER_1F EQU $01
+GROUP_OLIVINE_GYM EQU $01
+GROUP_OLIVINE_VOLTORB_HOUSE EQU $01
+GROUP_OLIVINE_HOUSE_BETA EQU $01
+GROUP_OLIVINE_PUNISHMENT_SPEECH_HOUSE EQU $01
+GROUP_OLIVINE_GOOD_ROD_HOUSE EQU $01
+GROUP_OLIVINE_CAFE EQU $01
+GROUP_OLIVINE_MART EQU $01
+GROUP_ROUTE_38_ECRUTEAK_GATE EQU $01
+GROUP_ROUTE_39_BARN EQU $01
+GROUP_ROUTE_39_FARMHOUSE EQU $01
+GROUP_ROUTE_38 EQU $01
+GROUP_ROUTE_39 EQU $01
+GROUP_OLIVINE_CITY EQU $01
+GROUP_MAHOGANY_RED_GYARADOS_SPEECH_HOUSE EQU $02
+GROUP_MAHOGANY_GYM EQU $02
+GROUP_MAHOGANY_POKECENTER_1F EQU $02
+GROUP_ROUTE_42_ECRUTEAK_GATE EQU $02
+GROUP_ROUTE_42 EQU $02
+GROUP_ROUTE_44 EQU $02
+GROUP_MAHOGANY_TOWN EQU $02
+GROUP_SPROUT_TOWER_1F EQU $03
+GROUP_SPROUT_TOWER_2F EQU $03
+GROUP_SPROUT_TOWER_3F EQU $03
+GROUP_TIN_TOWER_1F EQU $03
+GROUP_TIN_TOWER_2F EQU $03
+GROUP_TIN_TOWER_3F EQU $03
+GROUP_TIN_TOWER_4F EQU $03
+GROUP_TIN_TOWER_5F EQU $03
+GROUP_TIN_TOWER_6F EQU $03
+GROUP_TIN_TOWER_7F EQU $03
+GROUP_TIN_TOWER_8F EQU $03
+GROUP_TIN_TOWER_9F EQU $03
+GROUP_BURNED_TOWER_1F EQU $03
+GROUP_BURNED_TOWER_B1F EQU $03
+GROUP_NATIONAL_PARK EQU $03
+GROUP_NATIONAL_PARK_BUG_CONTEST EQU $03
+GROUP_RADIO_TOWER_1F EQU $03
+GROUP_RADIO_TOWER_2F EQU $03
+GROUP_RADIO_TOWER_3F EQU $03
+GROUP_RADIO_TOWER_4F EQU $03
+GROUP_RADIO_TOWER_5F EQU $03
+GROUP_RUINS_OF_ALPH_OUTSIDE EQU $03
+GROUP_RUINS_OF_ALPH_HO_OH_CHAMBER EQU $03
+GROUP_RUINS_OF_ALPH_KABUTO_CHAMBER EQU $03
+GROUP_RUINS_OF_ALPH_OMANYTE_CHAMBER EQU $03
+GROUP_RUINS_OF_ALPH_AERODACTYL_CHAMBER EQU $03
+GROUP_RUINS_OF_ALPH_INNER_CHAMBER EQU $03
+GROUP_RUINS_OF_ALPH_RESEARCH_CENTER EQU $03
+GROUP_RUINS_OF_ALPH_HO_OH_ITEM_ROOM EQU $03
+GROUP_RUINS_OF_ALPH_KABUTO_ITEM_ROOM EQU $03
+GROUP_RUINS_OF_ALPH_OMANYTE_ITEM_ROOM EQU $03
+GROUP_RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM EQU $03
+GROUP_RUINS_OF_ALPH_HO_OH_WORD_ROOM EQU $03
+GROUP_RUINS_OF_ALPH_KABUTO_WORD_ROOM EQU $03
+GROUP_RUINS_OF_ALPH_OMANYTE_WORD_ROOM EQU $03
+GROUP_RUINS_OF_ALPH_AERODACTYL_WORD_ROOM EQU $03
+GROUP_UNION_CAVE_1F EQU $03
+GROUP_UNION_CAVE_B1F EQU $03
+GROUP_UNION_CAVE_B2F EQU $03
+GROUP_SLOWPOKE_WELL_B1F EQU $03
+GROUP_SLOWPOKE_WELL_B2F EQU $03
+GROUP_OLIVINE_LIGHTHOUSE_1F EQU $03
+GROUP_OLIVINE_LIGHTHOUSE_2F EQU $03
+GROUP_OLIVINE_LIGHTHOUSE_3F EQU $03
+GROUP_OLIVINE_LIGHTHOUSE_4F EQU $03
+GROUP_OLIVINE_LIGHTHOUSE_5F EQU $03
+GROUP_OLIVINE_LIGHTHOUSE_6F EQU $03
+GROUP_MAHOGANY_MART_1F EQU $03
+GROUP_TEAM_ROCKET_BASE_B1F EQU $03
+GROUP_TEAM_ROCKET_BASE_B2F EQU $03
+GROUP_TEAM_ROCKET_BASE_B3F EQU $03
+GROUP_ILEX_FOREST EQU $03
+GROUP_WAREHOUSE_ENTRANCE EQU $03
+GROUP_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES EQU $03
+GROUP_GOLDENROD_DEPT_STORE_B1F EQU $03
+GROUP_UNDERGROUND_WAREHOUSE EQU $03
+GROUP_MOUNT_MORTAR_1F_OUTSIDE EQU $03
+GROUP_MOUNT_MORTAR_1F_INSIDE EQU $03
+GROUP_MOUNT_MORTAR_2F_INSIDE EQU $03
+GROUP_MOUNT_MORTAR_B1F EQU $03
+GROUP_ICE_PATH_1F EQU $03
+GROUP_ICE_PATH_B1F EQU $03
+GROUP_ICE_PATH_B2F_MAHOGANY_SIDE EQU $03
+GROUP_ICE_PATH_B2F_BLACKTHORN_SIDE EQU $03
+GROUP_ICE_PATH_B3F EQU $03
+GROUP_WHIRL_ISLAND_NW EQU $03
+GROUP_WHIRL_ISLAND_NE EQU $03
+GROUP_WHIRL_ISLAND_SW EQU $03
+GROUP_WHIRL_ISLAND_CAVE EQU $03
+GROUP_WHIRL_ISLAND_SE EQU $03
+GROUP_WHIRL_ISLAND_B1F EQU $03
+GROUP_WHIRL_ISLAND_B2F EQU $03
+GROUP_WHIRL_ISLAND_LUGIA_CHAMBER EQU $03
+GROUP_SILVER_CAVE_ROOM_1 EQU $03
+GROUP_SILVER_CAVE_ROOM_2 EQU $03
+GROUP_SILVER_CAVE_ROOM_3 EQU $03
+GROUP_SILVER_CAVE_ITEM_ROOMS EQU $03
+GROUP_DARK_CAVE_VIOLET_ENTRANCE EQU $03
+GROUP_DARK_CAVE_BLACKTHORN_ENTRANCE EQU $03
+GROUP_DRAGONS_DEN_1F EQU $03
+GROUP_DRAGONS_DEN_B1F EQU $03
+GROUP_DRAGON_SHRINE EQU $03
+GROUP_TOHJO_FALLS EQU $03
+GROUP_DIGLETTS_CAVE EQU $03
+GROUP_MOUNT_MOON EQU $03
+GROUP_UNDERGROUND EQU $03
+GROUP_ROCK_TUNNEL_1F EQU $03
+GROUP_ROCK_TUNNEL_B1F EQU $03
+GROUP_SAFARI_ZONE_FUCHSIA_GATE_BETA EQU $03
+GROUP_SAFARI_ZONE_BETA EQU $03
+GROUP_VICTORY_ROAD EQU $03
+GROUP_ECRUTEAK_HOUSE EQU $04
+GROUP_WISE_TRIOS_ROOM EQU $04
+GROUP_ECRUTEAK_POKECENTER_1F EQU $04
+GROUP_ECRUTEAK_LUGIA_SPEECH_HOUSE EQU $04
+GROUP_DANCE_THEATRE EQU $04
+GROUP_ECRUTEAK_MART EQU $04
+GROUP_ECRUTEAK_GYM EQU $04
+GROUP_ECRUTEAK_ITEMFINDER_HOUSE EQU $04
+GROUP_ECRUTEAK_CITY EQU $04
+GROUP_BLACKTHORN_GYM_1F EQU $05
+GROUP_BLACKTHORN_GYM_2F EQU $05
+GROUP_BLACKTHORN_DRAGON_SPEECH_HOUSE EQU $05
+GROUP_BLACKTHORN_DODRIO_TRADE_HOUSE EQU $05
+GROUP_BLACKTHORN_MART EQU $05
+GROUP_BLACKTHORN_POKECENTER_1F EQU $05
+GROUP_MOVE_DELETERS_HOUSE EQU $05
+GROUP_ROUTE_45 EQU $05
+GROUP_ROUTE_46 EQU $05
+GROUP_BLACKTHORN_CITY EQU $05
+GROUP_CINNABAR_POKECENTER_1F EQU $06
+GROUP_CINNABAR_POKECENTER_2F_BETA EQU $06
+GROUP_ROUTE_19___FUCHSIA_GATE EQU $06
+GROUP_SEAFOAM_GYM EQU $06
+GROUP_ROUTE_19 EQU $06
+GROUP_ROUTE_20 EQU $06
+GROUP_ROUTE_21 EQU $06
+GROUP_CINNABAR_ISLAND EQU $06
+GROUP_CERULEAN_GYM_BADGE_SPEECH_HOUSE EQU $07
+GROUP_CERULEAN_POLICE_STATION EQU $07
+GROUP_CERULEAN_TRADE_SPEECH_HOUSE EQU $07
+GROUP_CERULEAN_POKECENTER_1F EQU $07
+GROUP_CERULEAN_POKECENTER_2F_BETA EQU $07
+GROUP_CERULEAN_GYM EQU $07
+GROUP_CERULEAN_MART EQU $07
+GROUP_ROUTE_10_POKECENTER_1F EQU $07
+GROUP_ROUTE_10_POKECENTER_2F_BETA EQU $07
+GROUP_POWER_PLANT EQU $07
+GROUP_BILLS_HOUSE EQU $07
+GROUP_ROUTE_4 EQU $07
+GROUP_ROUTE_9 EQU $07
+GROUP_ROUTE_10A EQU $07
+GROUP_ROUTE_10_NORTH EQU $07
+GROUP_ROUTE_24 EQU $07
+GROUP_ROUTE_25 EQU $07
+GROUP_CERULEAN_CITY EQU $07
+GROUP_AZALEA_POKECENTER_1F EQU $08
+GROUP_CHARCOAL_KILN EQU $08
+GROUP_AZALEA_MART EQU $08
+GROUP_KURTS_HOUSE EQU $08
+GROUP_AZALEA_GYM EQU $08
+GROUP_ROUTE_33 EQU $08
+GROUP_AZALEA_TOWN EQU $08
+GROUP_LAKE_OF_RAGE_HIDDEN_POWER_HOUSE EQU $09
+GROUP_LAKE_OF_RAGE_MAGIKARP_HOUSE EQU $09
+GROUP_ROUTE_43_MAHOGANY_GATE EQU $09
+GROUP_ROUTE_43_GATE EQU $09
+GROUP_ROUTE_43 EQU $09
+GROUP_LAKE_OF_RAGE EQU $09
+GROUP_ROUTE_32 EQU $0a
+GROUP_ROUTE_35 EQU $0a
+GROUP_ROUTE_36 EQU $0a
+GROUP_ROUTE_37 EQU $0a
+GROUP_VIOLET_CITY EQU $0a
+GROUP_VIOLET_MART EQU $0a
+GROUP_VIOLET_GYM EQU $0a
+GROUP_EARLS_POKEMON_ACADEMY EQU $0a
+GROUP_VIOLET_NICKNAME_SPEECH_HOUSE EQU $0a
+GROUP_VIOLET_POKECENTER_1F EQU $0a
+GROUP_VIOLET_ONIX_TRADE_HOUSE EQU $0a
+GROUP_ROUTE_32_RUINS_OF_ALPH_GATE EQU $0a
+GROUP_ROUTE_32_POKECENTER_1F EQU $0a
+GROUP_ROUTE_35_GOLDENROD_GATE EQU $0a
+GROUP_ROUTE_35_NATIONAL_PARK_GATE EQU $0a
+GROUP_ROUTE_36_RUINS_OF_ALPH_GATE EQU $0a
+GROUP_ROUTE_36_NATIONAL_PARK_GATE EQU $0a
+GROUP_ROUTE_34 EQU $0b
+GROUP_GOLDENROD_CITY EQU $0b
+GROUP_GOLDENROD_GYM EQU $0b
+GROUP_GOLDENROD_BIKE_SHOP EQU $0b
+GROUP_GOLDENROD_HAPPINESS_RATER EQU $0b
+GROUP_GOLDENROD_BILLS_HOUSE EQU $0b
+GROUP_GOLDENROD_MAGNET_TRAIN_STATION EQU $0b
+GROUP_GOLDENROD_FLOWER_SHOP EQU $0b
+GROUP_GOLDENROD_PP_SPEECH_HOUSE EQU $0b
+GROUP_GOLDENROD_NAME_RATERS_HOUSE EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_1F EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_2F EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_3F EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_4F EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_5F EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_6F EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_ELEVATOR EQU $0b
+GROUP_GOLDENROD_DEPT_STORE_ROOF EQU $0b
+GROUP_GOLDENROD_GAME_CORNER EQU $0b
+GROUP_GOLDENROD_POKECENTER_1F EQU $0b
+GROUP_GOLDENROD_POKECOM_CENTER_2F_MOBILE EQU $0b
+GROUP_ILEX_FOREST_AZALEA_GATE EQU $0b
+GROUP_ROUTE_34_ILEX_FOREST_GATE EQU $0b
+GROUP_DAY_CARE EQU $0b
+GROUP_ROUTE_6 EQU $0c
+GROUP_ROUTE_11 EQU $0c
+GROUP_VERMILION_CITY EQU $0c
+GROUP_VERMILION_HOUSE_FISHING_SPEECH_HOUSE EQU $0c
+GROUP_VERMILION_POKECENTER_1F EQU $0c
+GROUP_VERMILION_POKECENTER_2F_BETA EQU $0c
+GROUP_POKEMON_FAN_CLUB EQU $0c
+GROUP_VERMILION_MAGNET_TRAIN_SPEECH_HOUSE EQU $0c
+GROUP_VERMILION_MART EQU $0c
+GROUP_VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE EQU $0c
+GROUP_VERMILION_GYM EQU $0c
+GROUP_ROUTE_6_SAFFRON_GATE EQU $0c
+GROUP_ROUTE_6_UNDERGROUND_ENTRANCE EQU $0c
+GROUP_ROUTE_1 EQU $0d
+GROUP_PALLET_TOWN EQU $0d
+GROUP_REDS_HOUSE_1F EQU $0d
+GROUP_REDS_HOUSE_2F EQU $0d
+GROUP_BLUES_HOUSE EQU $0d
+GROUP_OAKS_LAB EQU $0d
+GROUP_ROUTE_3 EQU $0e
+GROUP_PEWTER_CITY EQU $0e
+GROUP_PEWTER_NIDORAN_SPEECH_HOUSE EQU $0e
+GROUP_PEWTER_GYM EQU $0e
+GROUP_PEWTER_MART EQU $0e
+GROUP_PEWTER_POKECENTER_1F EQU $0e
+GROUP_PEWTER_POKECENTER_2F_BETA EQU $0e
+GROUP_PEWTER_SNOOZE_SPEECH_HOUSE EQU $0e
+GROUP_OLIVINE_PORT EQU $0f
+GROUP_VERMILION_PORT EQU $0f
+GROUP_FAST_SHIP_1F EQU $0f
+GROUP_FAST_SHIP_CABINS_NNW_NNE_NE EQU $0f
+GROUP_FAST_SHIP_CABINS_SW_SSW_NW EQU $0f
+GROUP_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN EQU $0f
+GROUP_FAST_SHIP_B1F EQU $0f
+GROUP_OLIVINE_PORT_PASSAGE EQU $0f
+GROUP_VERMILION_PORT_PASSAGE EQU $0f
+GROUP_MOUNT_MOON_SQUARE EQU $0f
+GROUP_MOUNT_MOON_GIFT_SHOP EQU $0f
+GROUP_TIN_TOWER_ROOF EQU $0f
+GROUP_ROUTE_23 EQU $10
+GROUP_INDIGO_PLATEAU_POKECENTER_1F EQU $10
+GROUP_WILLS_ROOM EQU $10
+GROUP_KOGAS_ROOM EQU $10
+GROUP_BRUNOS_ROOM EQU $10
+GROUP_KARENS_ROOM EQU $10
+GROUP_LANCES_ROOM EQU $10
+GROUP_HALL_OF_FAME EQU $10
+GROUP_ROUTE_13 EQU $11
+GROUP_ROUTE_14 EQU $11
+GROUP_ROUTE_15 EQU $11
+GROUP_ROUTE_18 EQU $11
+GROUP_FUCHSIA_CITY EQU $11
+GROUP_FUCHSIA_MART EQU $11
+GROUP_SAFARI_ZONE_MAIN_OFFICE EQU $11
+GROUP_FUCHSIA_GYM EQU $11
+GROUP_FUCHSIA_BILL_SPEECH_HOUSE EQU $11
+GROUP_FUCHSIA_POKECENTER_1F EQU $11
+GROUP_FUCHSIA_POKECENTER_2F_BETA EQU $11
+GROUP_SAFARI_ZONE_WARDENS_HOME EQU $11
+GROUP_ROUTE_15_FUCHSIA_GATE EQU $11
+GROUP_ROUTE_8 EQU $12
+GROUP_ROUTE_12 EQU $12
+GROUP_ROUTE_10B EQU $12
+GROUP_ROUTE_10_SOUTH EQU $12
+GROUP_LAVENDER_TOWN EQU $12
+GROUP_LAVENDER_POKECENTER_1F EQU $12
+GROUP_LAVENDER_POKECENTER_2F_BETA EQU $12
+GROUP_MR_FUJIS_HOUSE EQU $12
+GROUP_LAVENDER_TOWN_SPEECH_HOUSE EQU $12
+GROUP_LAVENDER_NAME_RATER EQU $12
+GROUP_LAVENDER_MART EQU $12
+GROUP_SOUL_HOUSE EQU $12
+GROUP_LAV_RADIO_TOWER_1F EQU $12
+GROUP_ROUTE_8_SAFFRON_GATE EQU $12
+GROUP_ROUTE_12_SUPER_ROD_HOUSE EQU $12
+GROUP_ROUTE_28 EQU $13
+GROUP_SILVER_CAVE_OUTSIDE EQU $13
+GROUP_SILVER_CAVE_POKECENTER_1F EQU $13
+GROUP_ROUTE_28_FAMOUS_SPEECH_HOUSE EQU $13
+GROUP_POKECENTER_2F EQU $14
+GROUP_TRADE_CENTER EQU $14
+GROUP_COLOSSEUM EQU $14
+GROUP_TIME_CAPSULE EQU $14
+GROUP_MOBILE_TRADE_ROOM_MOBILE EQU $14
+GROUP_MOBILE_BATTLE_ROOM EQU $14
+GROUP_ROUTE_7 EQU $15
+GROUP_ROUTE_16 EQU $15
+GROUP_ROUTE_17 EQU $15
+GROUP_CELADON_CITY EQU $15
+GROUP_CELADON_DEPT_STORE_1F EQU $15
+GROUP_CELADON_DEPT_STORE_2F EQU $15
+GROUP_CELADON_DEPT_STORE_3F EQU $15
+GROUP_CELADON_DEPT_STORE_4F EQU $15
+GROUP_CELADON_DEPT_STORE_5F EQU $15
+GROUP_CELADON_DEPT_STORE_6F EQU $15
+GROUP_CELADON_DEPT_STORE_ELEVATOR EQU $15
+GROUP_CELADON_MANSION_1F EQU $15
+GROUP_CELADON_MANSION_2F EQU $15
+GROUP_CELADON_MANSION_3F EQU $15
+GROUP_CELADON_MANSION_ROOF EQU $15
+GROUP_CELADON_MANSION_ROOF_HOUSE EQU $15
+GROUP_CELADON_POKECENTER_1F EQU $15
+GROUP_CELADON_POKECENTER_2F_BETA EQU $15
+GROUP_CELADON_GAME_CORNER EQU $15
+GROUP_CELADON_GAME_CORNER_PRIZE_ROOM EQU $15
+GROUP_CELADON_GYM EQU $15
+GROUP_CELADON_CAFE EQU $15
+GROUP_ROUTE_16_FUCHSIA_SPEECH_HOUSE EQU $15
+GROUP_ROUTE_16_GATE EQU $15
+GROUP_ROUTE_7_SAFFRON_GATE EQU $15
+GROUP_ROUTE_17_18_GATE EQU $15
+GROUP_ROUTE_40 EQU $16
+GROUP_ROUTE_41 EQU $16
+GROUP_CIANWOOD_CITY EQU $16
+GROUP_MANIAS_HOUSE EQU $16
+GROUP_CIANWOOD_GYM EQU $16
+GROUP_CIANWOOD_POKECENTER_1F EQU $16
+GROUP_CIANWOOD_PHARMACY EQU $16
+GROUP_CIANWOOD_CITY_PHOTO_STUDIO EQU $16
+GROUP_CIANWOOD_LUGIA_SPEECH_HOUSE EQU $16
+GROUP_POKE_SEERS_HOUSE EQU $16
+GROUP_BATTLE_TOWER_1F EQU $16
+GROUP_BATTLE_TOWER_BATTLE_ROOM EQU $16
+GROUP_BATTLE_TOWER_ELEVATOR EQU $16
+GROUP_BATTLE_TOWER_HALLWAY EQU $16
+GROUP_ROUTE_40_BATTLE_TOWER_GATE EQU $16
+GROUP_BATTLE_TOWER_OUTSIDE EQU $16
+GROUP_ROUTE_2 EQU $17
+GROUP_ROUTE_22 EQU $17
+GROUP_VIRIDIAN_CITY EQU $17
+GROUP_VIRIDIAN_GYM EQU $17
+GROUP_VIRIDIAN_NICKNAME_SPEECH_HOUSE EQU $17
+GROUP_TRAINER_HOUSE_1F EQU $17
+GROUP_TRAINER_HOUSE_B1F EQU $17
+GROUP_VIRIDIAN_MART EQU $17
+GROUP_VIRIDIAN_POKECENTER_1F EQU $17
+GROUP_VIRIDIAN_POKECENTER_2F_BETA EQU $17
+GROUP_ROUTE_2_NUGGET_SPEECH_HOUSE EQU $17
+GROUP_ROUTE_2_GATE EQU $17
+GROUP_VICTORY_ROAD_GATE EQU $17
+GROUP_ROUTE_26 EQU $18
+GROUP_ROUTE_27 EQU $18
+GROUP_ROUTE_29 EQU $18
+GROUP_NEW_BARK_TOWN EQU $18
+GROUP_ELMS_LAB EQU $18
+GROUP_KRISS_HOUSE_1F EQU $18
+GROUP_KRISS_HOUSE_2F EQU $18
+GROUP_KRISS_NEIGHBORS_HOUSE EQU $18
+GROUP_ELMS_HOUSE EQU $18
+GROUP_ROUTE_26_HEAL_SPEECH_HOUSE EQU $18
+GROUP_ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE EQU $18
+GROUP_ROUTE_27_SANDSTORM_HOUSE EQU $18
+GROUP_ROUTE_29_46_GATE EQU $18
+GROUP_ROUTE_5 EQU $19
+GROUP_SAFFRON_CITY EQU $19
+GROUP_FIGHTING_DOJO EQU $19
+GROUP_SAFFRON_GYM EQU $19
+GROUP_SAFFRON_MART EQU $19
+GROUP_SAFFRON_POKECENTER_1F EQU $19
+GROUP_SAFFRON_POKECENTER_2F_BETA EQU $19
+GROUP_MR_PSYCHICS_HOUSE EQU $19
+GROUP_SAFFRON_TRAIN_STATION EQU $19
+GROUP_SILPH_CO_1F EQU $19
+GROUP_COPYCATS_HOUSE_1F EQU $19
+GROUP_COPYCATS_HOUSE_2F EQU $19
+GROUP_ROUTE_5_UNDERGROUND_ENTRANCE EQU $19
+GROUP_ROUTE_5_SAFFRON_CITY_GATE EQU $19
+GROUP_ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE EQU $19
+GROUP_ROUTE_30 EQU $1a
+GROUP_ROUTE_31 EQU $1a
+GROUP_CHERRYGROVE_CITY EQU $1a
+GROUP_CHERRYGROVE_MART EQU $1a
+GROUP_CHERRYGROVE_POKECENTER_1F EQU $1a
+GROUP_CHERRYGROVE_GYM_SPEECH_HOUSE EQU $1a
+GROUP_GUIDE_GENTS_HOUSE EQU $1a
+GROUP_CHERRYGROVE_EVOLUTION_SPEECH_HOUSE EQU $1a
+GROUP_ROUTE_30_BERRY_SPEECH_HOUSE EQU $1a
+GROUP_MR_POKEMONS_HOUSE EQU $1a
+GROUP_ROUTE_31_VIOLET_GATE EQU $1a
+
+; map ids
+MAP_OLIVINE_POKECENTER_1F EQU $01
+MAP_OLIVINE_GYM EQU $02
+MAP_OLIVINE_VOLTORB_HOUSE EQU $03
+MAP_OLIVINE_HOUSE_BETA EQU $04
+MAP_OLIVINE_PUNISHMENT_SPEECH_HOUSE EQU $05
+MAP_OLIVINE_GOOD_ROD_HOUSE EQU $06
+MAP_OLIVINE_CAFE EQU $07
+MAP_OLIVINE_MART EQU $08
+MAP_ROUTE_38_ECRUTEAK_GATE EQU $09
+MAP_ROUTE_39_BARN EQU $0a
+MAP_ROUTE_39_FARMHOUSE EQU $0b
+MAP_ROUTE_38 EQU $0c
+MAP_ROUTE_39 EQU $0d
+MAP_OLIVINE_CITY EQU $0e
+MAP_MAHOGANY_RED_GYARADOS_SPEECH_HOUSE EQU $01
+MAP_MAHOGANY_GYM EQU $02
+MAP_MAHOGANY_POKECENTER_1F EQU $03
+MAP_ROUTE_42_ECRUTEAK_GATE EQU $04
+MAP_ROUTE_42 EQU $05
+MAP_ROUTE_44 EQU $06
+MAP_MAHOGANY_TOWN EQU $07
+MAP_SPROUT_TOWER_1F EQU $01
+MAP_SPROUT_TOWER_2F EQU $02
+MAP_SPROUT_TOWER_3F EQU $03
+MAP_TIN_TOWER_1F EQU $04
+MAP_TIN_TOWER_2F EQU $05
+MAP_TIN_TOWER_3F EQU $06
+MAP_TIN_TOWER_4F EQU $07
+MAP_TIN_TOWER_5F EQU $08
+MAP_TIN_TOWER_6F EQU $09
+MAP_TIN_TOWER_7F EQU $0a
+MAP_TIN_TOWER_8F EQU $0b
+MAP_TIN_TOWER_9F EQU $0c
+MAP_BURNED_TOWER_1F EQU $0d
+MAP_BURNED_TOWER_B1F EQU $0e
+MAP_NATIONAL_PARK EQU $0f
+MAP_NATIONAL_PARK_BUG_CONTEST EQU $10
+MAP_RADIO_TOWER_1F EQU $11
+MAP_RADIO_TOWER_2F EQU $12
+MAP_RADIO_TOWER_3F EQU $13
+MAP_RADIO_TOWER_4F EQU $14
+MAP_RADIO_TOWER_5F EQU $15
+MAP_RUINS_OF_ALPH_OUTSIDE EQU $16
+MAP_RUINS_OF_ALPH_HO_OH_CHAMBER EQU $17
+MAP_RUINS_OF_ALPH_KABUTO_CHAMBER EQU $18
+MAP_RUINS_OF_ALPH_OMANYTE_CHAMBER EQU $19
+MAP_RUINS_OF_ALPH_AERODACTYL_CHAMBER EQU $1a
+MAP_RUINS_OF_ALPH_INNER_CHAMBER EQU $1b
+MAP_RUINS_OF_ALPH_RESEARCH_CENTER EQU $1c
+MAP_RUINS_OF_ALPH_HO_OH_ITEM_ROOM EQU $1d
+MAP_RUINS_OF_ALPH_KABUTO_ITEM_ROOM EQU $1e
+MAP_RUINS_OF_ALPH_OMANYTE_ITEM_ROOM EQU $1f
+MAP_RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM EQU $20
+MAP_RUINS_OF_ALPH_HO_OH_WORD_ROOM EQU $21
+MAP_RUINS_OF_ALPH_KABUTO_WORD_ROOM EQU $22
+MAP_RUINS_OF_ALPH_OMANYTE_WORD_ROOM EQU $23
+MAP_RUINS_OF_ALPH_AERODACTYL_WORD_ROOM EQU $24
+MAP_UNION_CAVE_1F EQU $25
+MAP_UNION_CAVE_B1F EQU $26
+MAP_UNION_CAVE_B2F EQU $27
+MAP_SLOWPOKE_WELL_B1F EQU $28
+MAP_SLOWPOKE_WELL_B2F EQU $29
+MAP_OLIVINE_LIGHTHOUSE_1F EQU $2a
+MAP_OLIVINE_LIGHTHOUSE_2F EQU $2b
+MAP_OLIVINE_LIGHTHOUSE_3F EQU $2c
+MAP_OLIVINE_LIGHTHOUSE_4F EQU $2d
+MAP_OLIVINE_LIGHTHOUSE_5F EQU $2e
+MAP_OLIVINE_LIGHTHOUSE_6F EQU $2f
+MAP_MAHOGANY_MART_1F EQU $30
+MAP_TEAM_ROCKET_BASE_B1F EQU $31
+MAP_TEAM_ROCKET_BASE_B2F EQU $32
+MAP_TEAM_ROCKET_BASE_B3F EQU $33
+MAP_ILEX_FOREST EQU $34
+MAP_WAREHOUSE_ENTRANCE EQU $35
+MAP_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES EQU $36
+MAP_GOLDENROD_DEPT_STORE_B1F EQU $37
+MAP_UNDERGROUND_WAREHOUSE EQU $38
+MAP_MOUNT_MORTAR_1F_OUTSIDE EQU $39
+MAP_MOUNT_MORTAR_1F_INSIDE EQU $3a
+MAP_MOUNT_MORTAR_2F_INSIDE EQU $3b
+MAP_MOUNT_MORTAR_B1F EQU $3c
+MAP_ICE_PATH_1F EQU $3d
+MAP_ICE_PATH_B1F EQU $3e
+MAP_ICE_PATH_B2F_MAHOGANY_SIDE EQU $3f
+MAP_ICE_PATH_B2F_BLACKTHORN_SIDE EQU $40
+MAP_ICE_PATH_B3F EQU $41
+MAP_WHIRL_ISLAND_NW EQU $42
+MAP_WHIRL_ISLAND_NE EQU $43
+MAP_WHIRL_ISLAND_SW EQU $44
+MAP_WHIRL_ISLAND_CAVE EQU $45
+MAP_WHIRL_ISLAND_SE EQU $46
+MAP_WHIRL_ISLAND_B1F EQU $47
+MAP_WHIRL_ISLAND_B2F EQU $48
+MAP_WHIRL_ISLAND_LUGIA_CHAMBER EQU $49
+MAP_SILVER_CAVE_ROOM_1 EQU $4a
+MAP_SILVER_CAVE_ROOM_2 EQU $4b
+MAP_SILVER_CAVE_ROOM_3 EQU $4c
+MAP_SILVER_CAVE_ITEM_ROOMS EQU $4d
+MAP_DARK_CAVE_VIOLET_ENTRANCE EQU $4e
+MAP_DARK_CAVE_BLACKTHORN_ENTRANCE EQU $4f
+MAP_DRAGONS_DEN_1F EQU $50
+MAP_DRAGONS_DEN_B1F EQU $51
+MAP_DRAGON_SHRINE EQU $52
+MAP_TOHJO_FALLS EQU $53
+MAP_DIGLETTS_CAVE EQU $54
+MAP_MOUNT_MOON EQU $55
+MAP_UNDERGROUND EQU $56
+MAP_ROCK_TUNNEL_1F EQU $57
+MAP_ROCK_TUNNEL_B1F EQU $58
+MAP_SAFARI_ZONE_FUCHSIA_GATE_BETA EQU $59
+MAP_SAFARI_ZONE_BETA EQU $5a
+MAP_VICTORY_ROAD EQU $5b
+MAP_ECRUTEAK_HOUSE EQU $01
+MAP_WISE_TRIOS_ROOM EQU $02
+MAP_ECRUTEAK_POKECENTER_1F EQU $03
+MAP_ECRUTEAK_LUGIA_SPEECH_HOUSE EQU $04
+MAP_DANCE_THEATRE EQU $05
+MAP_ECRUTEAK_MART EQU $06
+MAP_ECRUTEAK_GYM EQU $07
+MAP_ECRUTEAK_ITEMFINDER_HOUSE EQU $08
+MAP_ECRUTEAK_CITY EQU $09
+MAP_BLACKTHORN_GYM_1F EQU $01
+MAP_BLACKTHORN_GYM_2F EQU $02
+MAP_BLACKTHORN_DRAGON_SPEECH_HOUSE EQU $03
+MAP_BLACKTHORN_DODRIO_TRADE_HOUSE EQU $04
+MAP_BLACKTHORN_MART EQU $05
+MAP_BLACKTHORN_POKECENTER_1F EQU $06
+MAP_MOVE_DELETERS_HOUSE EQU $07
+MAP_ROUTE_45 EQU $08
+MAP_ROUTE_46 EQU $09
+MAP_BLACKTHORN_CITY EQU $0a
+MAP_CINNABAR_POKECENTER_1F EQU $01
+MAP_CINNABAR_POKECENTER_2F_BETA EQU $02
+MAP_ROUTE_19___FUCHSIA_GATE EQU $03
+MAP_SEAFOAM_GYM EQU $04
+MAP_ROUTE_19 EQU $05
+MAP_ROUTE_20 EQU $06
+MAP_ROUTE_21 EQU $07
+MAP_CINNABAR_ISLAND EQU $08
+MAP_CERULEAN_GYM_BADGE_SPEECH_HOUSE EQU $01
+MAP_CERULEAN_POLICE_STATION EQU $02
+MAP_CERULEAN_TRADE_SPEECH_HOUSE EQU $03
+MAP_CERULEAN_POKECENTER_1F EQU $04
+MAP_CERULEAN_POKECENTER_2F_BETA EQU $05
+MAP_CERULEAN_GYM EQU $06
+MAP_CERULEAN_MART EQU $07
+MAP_ROUTE_10_POKECENTER_1F EQU $08
+MAP_ROUTE_10_POKECENTER_2F_BETA EQU $09
+MAP_POWER_PLANT EQU $0a
+MAP_BILLS_HOUSE EQU $0b
+MAP_ROUTE_4 EQU $0c
+MAP_ROUTE_9 EQU $0d
+MAP_ROUTE_10A EQU $0e
+MAP_ROUTE_10_NORTH EQU $0e
+MAP_ROUTE_24 EQU $0f
+MAP_ROUTE_25 EQU $10
+MAP_CERULEAN_CITY EQU $11
+MAP_AZALEA_POKECENTER_1F EQU $01
+MAP_CHARCOAL_KILN EQU $02
+MAP_AZALEA_MART EQU $03
+MAP_KURTS_HOUSE EQU $04
+MAP_AZALEA_GYM EQU $05
+MAP_ROUTE_33 EQU $06
+MAP_AZALEA_TOWN EQU $07
+MAP_LAKE_OF_RAGE_HIDDEN_POWER_HOUSE EQU $01
+MAP_LAKE_OF_RAGE_MAGIKARP_HOUSE EQU $02
+MAP_ROUTE_43_MAHOGANY_GATE EQU $03
+MAP_ROUTE_43_GATE EQU $04
+MAP_ROUTE_43 EQU $05
+MAP_LAKE_OF_RAGE EQU $06
+MAP_ROUTE_32 EQU $01
+MAP_ROUTE_35 EQU $02
+MAP_ROUTE_36 EQU $03
+MAP_ROUTE_37 EQU $04
+MAP_VIOLET_CITY EQU $05
+MAP_VIOLET_MART EQU $06
+MAP_VIOLET_GYM EQU $07
+MAP_EARLS_POKEMON_ACADEMY EQU $08
+MAP_VIOLET_NICKNAME_SPEECH_HOUSE EQU $09
+MAP_VIOLET_POKECENTER_1F EQU $0a
+MAP_VIOLET_ONIX_TRADE_HOUSE EQU $0b
+MAP_ROUTE_32_RUINS_OF_ALPH_GATE EQU $0c
+MAP_ROUTE_32_POKECENTER_1F EQU $0d
+MAP_ROUTE_35_GOLDENROD_GATE EQU $0e
+MAP_ROUTE_35_NATIONAL_PARK_GATE EQU $0f
+MAP_ROUTE_36_RUINS_OF_ALPH_GATE EQU $10
+MAP_ROUTE_36_NATIONAL_PARK_GATE EQU $11
+MAP_ROUTE_34 EQU $01
+MAP_GOLDENROD_CITY EQU $02
+MAP_GOLDENROD_GYM EQU $03
+MAP_GOLDENROD_BIKE_SHOP EQU $04
+MAP_GOLDENROD_HAPPINESS_RATER EQU $05
+MAP_GOLDENROD_BILLS_HOUSE EQU $06
+MAP_GOLDENROD_MAGNET_TRAIN_STATION EQU $07
+MAP_GOLDENROD_FLOWER_SHOP EQU $08
+MAP_GOLDENROD_PP_SPEECH_HOUSE EQU $09
+MAP_GOLDENROD_NAME_RATERS_HOUSE EQU $0a
+MAP_GOLDENROD_DEPT_STORE_1F EQU $0b
+MAP_GOLDENROD_DEPT_STORE_2F EQU $0c
+MAP_GOLDENROD_DEPT_STORE_3F EQU $0d
+MAP_GOLDENROD_DEPT_STORE_4F EQU $0e
+MAP_GOLDENROD_DEPT_STORE_5F EQU $0f
+MAP_GOLDENROD_DEPT_STORE_6F EQU $10
+MAP_GOLDENROD_DEPT_STORE_ELEVATOR EQU $11
+MAP_GOLDENROD_DEPT_STORE_ROOF EQU $12
+MAP_GOLDENROD_GAME_CORNER EQU $13
+MAP_GOLDENROD_POKECENTER_1F EQU $14
+MAP_GOLDENROD_POKECOM_CENTER_2F_MOBILE EQU $15
+MAP_ILEX_FOREST_AZALEA_GATE EQU $16
+MAP_ROUTE_34_ILEX_FOREST_GATE EQU $17
+MAP_DAY_CARE EQU $18
+MAP_ROUTE_6 EQU $01
+MAP_ROUTE_11 EQU $02
+MAP_VERMILION_CITY EQU $03
+MAP_VERMILION_HOUSE_FISHING_SPEECH_HOUSE EQU $04
+MAP_VERMILION_POKECENTER_1F EQU $05
+MAP_VERMILION_POKECENTER_2F_BETA EQU $06
+MAP_POKEMON_FAN_CLUB EQU $07
+MAP_VERMILION_MAGNET_TRAIN_SPEECH_HOUSE EQU $08
+MAP_VERMILION_MART EQU $09
+MAP_VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE EQU $0a
+MAP_VERMILION_GYM EQU $0b
+MAP_ROUTE_6_SAFFRON_GATE EQU $0c
+MAP_ROUTE_6_UNDERGROUND_ENTRANCE EQU $0d
+MAP_ROUTE_1 EQU $01
+MAP_PALLET_TOWN EQU $02
+MAP_REDS_HOUSE_1F EQU $03
+MAP_REDS_HOUSE_2F EQU $04
+MAP_BLUES_HOUSE EQU $05
+MAP_OAKS_LAB EQU $06
+MAP_ROUTE_3 EQU $01
+MAP_PEWTER_CITY EQU $02
+MAP_PEWTER_NIDORAN_SPEECH_HOUSE EQU $03
+MAP_PEWTER_GYM EQU $04
+MAP_PEWTER_MART EQU $05
+MAP_PEWTER_POKECENTER_1F EQU $06
+MAP_PEWTER_POKECENTER_2F_BETA EQU $07
+MAP_PEWTER_SNOOZE_SPEECH_HOUSE EQU $08
+MAP_OLIVINE_PORT EQU $01
+MAP_VERMILION_PORT EQU $02
+MAP_FAST_SHIP_1F EQU $03
+MAP_FAST_SHIP_CABINS_NNW_NNE_NE EQU $04
+MAP_FAST_SHIP_CABINS_SW_SSW_NW EQU $05
+MAP_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN EQU $06
+MAP_FAST_SHIP_B1F EQU $07
+MAP_OLIVINE_PORT_PASSAGE EQU $08
+MAP_VERMILION_PORT_PASSAGE EQU $09
+MAP_MOUNT_MOON_SQUARE EQU $0a
+MAP_MOUNT_MOON_GIFT_SHOP EQU $0b
+MAP_TIN_TOWER_ROOF EQU $0c
+MAP_ROUTE_23 EQU $01
+MAP_INDIGO_PLATEAU_POKECENTER_1F EQU $02
+MAP_WILLS_ROOM EQU $03
+MAP_KOGAS_ROOM EQU $04
+MAP_BRUNOS_ROOM EQU $05
+MAP_KARENS_ROOM EQU $06
+MAP_LANCES_ROOM EQU $07
+MAP_HALL_OF_FAME EQU $08
+MAP_ROUTE_13 EQU $01
+MAP_ROUTE_14 EQU $02
+MAP_ROUTE_15 EQU $03
+MAP_ROUTE_18 EQU $04
+MAP_FUCHSIA_CITY EQU $05
+MAP_FUCHSIA_MART EQU $06
+MAP_SAFARI_ZONE_MAIN_OFFICE EQU $07
+MAP_FUCHSIA_GYM EQU $08
+MAP_FUCHSIA_BILL_SPEECH_HOUSE EQU $09
+MAP_FUCHSIA_POKECENTER_1F EQU $0a
+MAP_FUCHSIA_POKECENTER_2F_BETA EQU $0b
+MAP_SAFARI_ZONE_WARDENS_HOME EQU $0c
+MAP_ROUTE_15_FUCHSIA_GATE EQU $0d
+MAP_ROUTE_8 EQU $01
+MAP_ROUTE_12 EQU $02
+MAP_ROUTE_10B EQU $03
+MAP_ROUTE_10_SOUTH EQU $03
+MAP_LAVENDER_TOWN EQU $04
+MAP_LAVENDER_POKECENTER_1F EQU $05
+MAP_LAVENDER_POKECENTER_2F_BETA EQU $06
+MAP_MR_FUJIS_HOUSE EQU $07
+MAP_LAVENDER_TOWN_SPEECH_HOUSE EQU $08
+MAP_LAVENDER_NAME_RATER EQU $09
+MAP_LAVENDER_MART EQU $0a
+MAP_SOUL_HOUSE EQU $0b
+MAP_LAV_RADIO_TOWER_1F EQU $0c
+MAP_ROUTE_8_SAFFRON_GATE EQU $0d
+MAP_ROUTE_12_SUPER_ROD_HOUSE EQU $0e
+MAP_ROUTE_28 EQU $01
+MAP_SILVER_CAVE_OUTSIDE EQU $02
+MAP_SILVER_CAVE_POKECENTER_1F EQU $03
+MAP_ROUTE_28_FAMOUS_SPEECH_HOUSE EQU $04
+MAP_POKECENTER_2F EQU $01
+MAP_TRADE_CENTER EQU $02
+MAP_COLOSSEUM EQU $03
+MAP_TIME_CAPSULE EQU $04
+MAP_MOBILE_TRADE_ROOM_MOBILE EQU $05
+MAP_MOBILE_BATTLE_ROOM EQU $06
+MAP_ROUTE_7 EQU $01
+MAP_ROUTE_16 EQU $02
+MAP_ROUTE_17 EQU $03
+MAP_CELADON_CITY EQU $04
+MAP_CELADON_DEPT_STORE_1F EQU $05
+MAP_CELADON_DEPT_STORE_2F EQU $06
+MAP_CELADON_DEPT_STORE_3F EQU $07
+MAP_CELADON_DEPT_STORE_4F EQU $08
+MAP_CELADON_DEPT_STORE_5F EQU $09
+MAP_CELADON_DEPT_STORE_6F EQU $0a
+MAP_CELADON_DEPT_STORE_ELEVATOR EQU $0b
+MAP_CELADON_MANSION_1F EQU $0c
+MAP_CELADON_MANSION_2F EQU $0d
+MAP_CELADON_MANSION_3F EQU $0e
+MAP_CELADON_MANSION_ROOF EQU $0f
+MAP_CELADON_MANSION_ROOF_HOUSE EQU $10
+MAP_CELADON_POKECENTER_1F EQU $11
+MAP_CELADON_POKECENTER_2F_BETA EQU $12
+MAP_CELADON_GAME_CORNER EQU $13
+MAP_CELADON_GAME_CORNER_PRIZE_ROOM EQU $14
+MAP_CELADON_GYM EQU $15
+MAP_CELADON_CAFE EQU $16
+MAP_ROUTE_16_FUCHSIA_SPEECH_HOUSE EQU $17
+MAP_ROUTE_16_GATE EQU $18
+MAP_ROUTE_7_SAFFRON_GATE EQU $19
+MAP_ROUTE_17_18_GATE EQU $1a
+MAP_ROUTE_40 EQU $01
+MAP_ROUTE_41 EQU $02
+MAP_CIANWOOD_CITY EQU $03
+MAP_MANIAS_HOUSE EQU $04
+MAP_CIANWOOD_GYM EQU $05
+MAP_CIANWOOD_POKECENTER_1F EQU $06
+MAP_CIANWOOD_PHARMACY EQU $07
+MAP_CIANWOOD_CITY_PHOTO_STUDIO EQU $08
+MAP_CIANWOOD_LUGIA_SPEECH_HOUSE EQU $09
+MAP_POKE_SEERS_HOUSE EQU $0a
+MAP_BATTLE_TOWER_1F EQU $0b
+MAP_BATTLE_TOWER_BATTLE_ROOM EQU $0c
+MAP_BATTLE_TOWER_ELEVATOR EQU $0d
+MAP_BATTLE_TOWER_HALLWAY EQU $0e
+MAP_ROUTE_40_BATTLE_TOWER_GATE EQU $0f
+MAP_BATTLE_TOWER_OUTSIDE EQU $10
+MAP_ROUTE_2 EQU $01
+MAP_ROUTE_22 EQU $02
+MAP_VIRIDIAN_CITY EQU $03
+MAP_VIRIDIAN_GYM EQU $04
+MAP_VIRIDIAN_NICKNAME_SPEECH_HOUSE EQU $05
+MAP_TRAINER_HOUSE_1F EQU $06
+MAP_TRAINER_HOUSE_B1F EQU $07
+MAP_VIRIDIAN_MART EQU $08
+MAP_VIRIDIAN_POKECENTER_1F EQU $09
+MAP_VIRIDIAN_POKECENTER_2F_BETA EQU $0a
+MAP_ROUTE_2_NUGGET_SPEECH_HOUSE EQU $0b
+MAP_ROUTE_2_GATE EQU $0c
+MAP_VICTORY_ROAD_GATE EQU $0d
+MAP_ROUTE_26 EQU $01
+MAP_ROUTE_27 EQU $02
+MAP_ROUTE_29 EQU $03
+MAP_NEW_BARK_TOWN EQU $04
+MAP_ELMS_LAB EQU $05
+MAP_KRISS_HOUSE_1F EQU $06
+MAP_KRISS_HOUSE_2F EQU $07
+MAP_KRISS_NEIGHBORS_HOUSE EQU $08
+MAP_ELMS_HOUSE EQU $09
+MAP_ROUTE_26_HEAL_SPEECH_HOUSE EQU $0a
+MAP_ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE EQU $0b
+MAP_ROUTE_27_SANDSTORM_HOUSE EQU $0c
+MAP_ROUTE_29_46_GATE EQU $0d
+MAP_ROUTE_5 EQU $01
+MAP_SAFFRON_CITY EQU $02
+MAP_FIGHTING_DOJO EQU $03
+MAP_SAFFRON_GYM EQU $04
+MAP_SAFFRON_MART EQU $05
+MAP_SAFFRON_POKECENTER_1F EQU $06
+MAP_SAFFRON_POKECENTER_2F_BETA EQU $07
+MAP_MR_PSYCHICS_HOUSE EQU $08
+MAP_SAFFRON_TRAIN_STATION EQU $09
+MAP_SILPH_CO_1F EQU $0a
+MAP_COPYCATS_HOUSE_1F EQU $0b
+MAP_COPYCATS_HOUSE_2F EQU $0c
+MAP_ROUTE_5_UNDERGROUND_ENTRANCE EQU $0d
+MAP_ROUTE_5_SAFFRON_CITY_GATE EQU $0e
+MAP_ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE EQU $0f
+MAP_ROUTE_30 EQU $01
+MAP_ROUTE_31 EQU $02
+MAP_CHERRYGROVE_CITY EQU $03
+MAP_CHERRYGROVE_MART EQU $04
+MAP_CHERRYGROVE_POKECENTER_1F EQU $05
+MAP_CHERRYGROVE_GYM_SPEECH_HOUSE EQU $06
+MAP_GUIDE_GENTS_HOUSE EQU $07
+MAP_CHERRYGROVE_EVOLUTION_SPEECH_HOUSE EQU $08
+MAP_ROUTE_30_BERRY_SPEECH_HOUSE EQU $09
+MAP_MR_POKEMONS_HOUSE EQU $0a
+MAP_ROUTE_31_VIOLET_GATE EQU $0b
+
+; map dimensions
+OLIVINE_POKECENTER_1F_HEIGHT EQU 4
+OLIVINE_POKECENTER_1F_WIDTH EQU 5
+OLIVINE_GYM_HEIGHT EQU 8
+OLIVINE_GYM_WIDTH EQU 5
+OLIVINE_VOLTORB_HOUSE_HEIGHT EQU 4
+OLIVINE_VOLTORB_HOUSE_WIDTH EQU 4
+OLIVINE_HOUSE_BETA_HEIGHT EQU 4
+OLIVINE_HOUSE_BETA_WIDTH EQU 4
+OLIVINE_PUNISHMENT_SPEECH_HOUSE_HEIGHT EQU 4
+OLIVINE_PUNISHMENT_SPEECH_HOUSE_WIDTH EQU 4
+OLIVINE_GOOD_ROD_HOUSE_HEIGHT EQU 4
+OLIVINE_GOOD_ROD_HOUSE_WIDTH EQU 4
+OLIVINE_CAFE_HEIGHT EQU 4
+OLIVINE_CAFE_WIDTH EQU 4
+OLIVINE_MART_HEIGHT EQU 4
+OLIVINE_MART_WIDTH EQU 6
+ROUTE_38_ECRUTEAK_GATE_HEIGHT EQU 4
+ROUTE_38_ECRUTEAK_GATE_WIDTH EQU 5
+ROUTE_39_BARN_HEIGHT EQU 4
+ROUTE_39_BARN_WIDTH EQU 4
+ROUTE_39_FARMHOUSE_HEIGHT EQU 4
+ROUTE_39_FARMHOUSE_WIDTH EQU 4
+ROUTE_38_HEIGHT EQU 9
+ROUTE_38_WIDTH EQU 20
+ROUTE_39_HEIGHT EQU 18
+ROUTE_39_WIDTH EQU 10
+OLIVINE_CITY_HEIGHT EQU 18
+OLIVINE_CITY_WIDTH EQU 20
+MAHOGANY_RED_GYARADOS_SPEECH_HOUSE_HEIGHT EQU 4
+MAHOGANY_RED_GYARADOS_SPEECH_HOUSE_WIDTH EQU 4
+MAHOGANY_GYM_HEIGHT EQU 9
+MAHOGANY_GYM_WIDTH EQU 5
+MAHOGANY_POKECENTER_1F_HEIGHT EQU 4
+MAHOGANY_POKECENTER_1F_WIDTH EQU 5
+ROUTE_42_ECRUTEAK_GATE_HEIGHT EQU 4
+ROUTE_42_ECRUTEAK_GATE_WIDTH EQU 5
+ROUTE_42_HEIGHT EQU 9
+ROUTE_42_WIDTH EQU 30
+ROUTE_44_HEIGHT EQU 9
+ROUTE_44_WIDTH EQU 30
+MAHOGANY_TOWN_HEIGHT EQU 9
+MAHOGANY_TOWN_WIDTH EQU 10
+SPROUT_TOWER_1F_HEIGHT EQU 8
+SPROUT_TOWER_1F_WIDTH EQU 10
+SPROUT_TOWER_2F_HEIGHT EQU 8
+SPROUT_TOWER_2F_WIDTH EQU 10
+SPROUT_TOWER_3F_HEIGHT EQU 8
+SPROUT_TOWER_3F_WIDTH EQU 10
+TIN_TOWER_1F_HEIGHT EQU 9
+TIN_TOWER_1F_WIDTH EQU 10
+TIN_TOWER_2F_HEIGHT EQU 9
+TIN_TOWER_2F_WIDTH EQU 10
+TIN_TOWER_3F_HEIGHT EQU 9
+TIN_TOWER_3F_WIDTH EQU 10
+TIN_TOWER_4F_HEIGHT EQU 9
+TIN_TOWER_4F_WIDTH EQU 10
+TIN_TOWER_5F_HEIGHT EQU 9
+TIN_TOWER_5F_WIDTH EQU 10
+TIN_TOWER_6F_HEIGHT EQU 9
+TIN_TOWER_6F_WIDTH EQU 10
+TIN_TOWER_7F_HEIGHT EQU 9
+TIN_TOWER_7F_WIDTH EQU 10
+TIN_TOWER_8F_HEIGHT EQU 9
+TIN_TOWER_8F_WIDTH EQU 10
+TIN_TOWER_9F_HEIGHT EQU 9
+TIN_TOWER_9F_WIDTH EQU 10
+BURNED_TOWER_1F_HEIGHT EQU 9
+BURNED_TOWER_1F_WIDTH EQU 10
+BURNED_TOWER_B1F_HEIGHT EQU 9
+BURNED_TOWER_B1F_WIDTH EQU 10
+NATIONAL_PARK_HEIGHT EQU 27
+NATIONAL_PARK_WIDTH EQU 20
+NATIONAL_PARK_BUG_CONTEST_HEIGHT EQU 27
+NATIONAL_PARK_BUG_CONTEST_WIDTH EQU 20
+RADIO_TOWER_1F_HEIGHT EQU 4
+RADIO_TOWER_1F_WIDTH EQU 9
+RADIO_TOWER_2F_HEIGHT EQU 4
+RADIO_TOWER_2F_WIDTH EQU 9
+RADIO_TOWER_3F_HEIGHT EQU 4
+RADIO_TOWER_3F_WIDTH EQU 9
+RADIO_TOWER_4F_HEIGHT EQU 4
+RADIO_TOWER_4F_WIDTH EQU 9
+RADIO_TOWER_5F_HEIGHT EQU 4
+RADIO_TOWER_5F_WIDTH EQU 9
+RUINS_OF_ALPH_OUTSIDE_HEIGHT EQU 18
+RUINS_OF_ALPH_OUTSIDE_WIDTH EQU 10
+RUINS_OF_ALPH_HO_OH_CHAMBER_HEIGHT EQU 5
+RUINS_OF_ALPH_HO_OH_CHAMBER_WIDTH EQU 4
+RUINS_OF_ALPH_KABUTO_CHAMBER_HEIGHT EQU 5
+RUINS_OF_ALPH_KABUTO_CHAMBER_WIDTH EQU 4
+RUINS_OF_ALPH_OMANYTE_CHAMBER_HEIGHT EQU 5
+RUINS_OF_ALPH_OMANYTE_CHAMBER_WIDTH EQU 4
+RUINS_OF_ALPH_AERODACTYL_CHAMBER_HEIGHT EQU 5
+RUINS_OF_ALPH_AERODACTYL_CHAMBER_WIDTH EQU 4
+RUINS_OF_ALPH_INNER_CHAMBER_HEIGHT EQU 14
+RUINS_OF_ALPH_INNER_CHAMBER_WIDTH EQU 10
+RUINS_OF_ALPH_RESEARCH_CENTER_HEIGHT EQU 4
+RUINS_OF_ALPH_RESEARCH_CENTER_WIDTH EQU 4
+RUINS_OF_ALPH_HO_OH_ITEM_ROOM_HEIGHT EQU 5
+RUINS_OF_ALPH_HO_OH_ITEM_ROOM_WIDTH EQU 4
+RUINS_OF_ALPH_KABUTO_ITEM_ROOM_HEIGHT EQU 5
+RUINS_OF_ALPH_KABUTO_ITEM_ROOM_WIDTH EQU 4
+RUINS_OF_ALPH_OMANYTE_ITEM_ROOM_HEIGHT EQU 5
+RUINS_OF_ALPH_OMANYTE_ITEM_ROOM_WIDTH EQU 4
+RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM_HEIGHT EQU 5
+RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM_WIDTH EQU 4
+RUINS_OF_ALPH_HO_OH_WORD_ROOM_HEIGHT EQU 12
+RUINS_OF_ALPH_HO_OH_WORD_ROOM_WIDTH EQU 10
+RUINS_OF_ALPH_KABUTO_WORD_ROOM_HEIGHT EQU 7
+RUINS_OF_ALPH_KABUTO_WORD_ROOM_WIDTH EQU 10
+RUINS_OF_ALPH_OMANYTE_WORD_ROOM_HEIGHT EQU 8
+RUINS_OF_ALPH_OMANYTE_WORD_ROOM_WIDTH EQU 10
+RUINS_OF_ALPH_AERODACTYL_WORD_ROOM_HEIGHT EQU 7
+RUINS_OF_ALPH_AERODACTYL_WORD_ROOM_WIDTH EQU 10
+UNION_CAVE_1F_HEIGHT EQU 18
+UNION_CAVE_1F_WIDTH EQU 10
+UNION_CAVE_B1F_HEIGHT EQU 18
+UNION_CAVE_B1F_WIDTH EQU 10
+UNION_CAVE_B2F_HEIGHT EQU 18
+UNION_CAVE_B2F_WIDTH EQU 10
+SLOWPOKE_WELL_B1F_HEIGHT EQU 9
+SLOWPOKE_WELL_B1F_WIDTH EQU 10
+SLOWPOKE_WELL_B2F_HEIGHT EQU 9
+SLOWPOKE_WELL_B2F_WIDTH EQU 10
+OLIVINE_LIGHTHOUSE_1F_HEIGHT EQU 9
+OLIVINE_LIGHTHOUSE_1F_WIDTH EQU 10
+OLIVINE_LIGHTHOUSE_2F_HEIGHT EQU 9
+OLIVINE_LIGHTHOUSE_2F_WIDTH EQU 10
+OLIVINE_LIGHTHOUSE_3F_HEIGHT EQU 9
+OLIVINE_LIGHTHOUSE_3F_WIDTH EQU 10
+OLIVINE_LIGHTHOUSE_4F_HEIGHT EQU 9
+OLIVINE_LIGHTHOUSE_4F_WIDTH EQU 10
+OLIVINE_LIGHTHOUSE_5F_HEIGHT EQU 9
+OLIVINE_LIGHTHOUSE_5F_WIDTH EQU 10
+OLIVINE_LIGHTHOUSE_6F_HEIGHT EQU 9
+OLIVINE_LIGHTHOUSE_6F_WIDTH EQU 10
+MAHOGANY_MART_1F_HEIGHT EQU 4
+MAHOGANY_MART_1F_WIDTH EQU 4
+TEAM_ROCKET_BASE_B1F_HEIGHT EQU 9
+TEAM_ROCKET_BASE_B1F_WIDTH EQU 15
+TEAM_ROCKET_BASE_B2F_HEIGHT EQU 9
+TEAM_ROCKET_BASE_B2F_WIDTH EQU 15
+TEAM_ROCKET_BASE_B3F_HEIGHT EQU 9
+TEAM_ROCKET_BASE_B3F_WIDTH EQU 15
+ILEX_FOREST_HEIGHT EQU 27
+ILEX_FOREST_WIDTH EQU 15
+WAREHOUSE_ENTRANCE_HEIGHT EQU 18
+WAREHOUSE_ENTRANCE_WIDTH EQU 15
+UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HEIGHT EQU 18
+UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_WIDTH EQU 15
+GOLDENROD_DEPT_STORE_B1F_HEIGHT EQU 9
+GOLDENROD_DEPT_STORE_B1F_WIDTH EQU 10
+UNDERGROUND_WAREHOUSE_HEIGHT EQU 9
+UNDERGROUND_WAREHOUSE_WIDTH EQU 10
+MOUNT_MORTAR_1F_OUTSIDE_HEIGHT EQU 18
+MOUNT_MORTAR_1F_OUTSIDE_WIDTH EQU 20
+MOUNT_MORTAR_1F_INSIDE_HEIGHT EQU 27
+MOUNT_MORTAR_1F_INSIDE_WIDTH EQU 20
+MOUNT_MORTAR_2F_INSIDE_HEIGHT EQU 18
+MOUNT_MORTAR_2F_INSIDE_WIDTH EQU 20
+MOUNT_MORTAR_B1F_HEIGHT EQU 18
+MOUNT_MORTAR_B1F_WIDTH EQU 20
+ICE_PATH_1F_HEIGHT EQU 18
+ICE_PATH_1F_WIDTH EQU 20
+ICE_PATH_B1F_HEIGHT EQU 18
+ICE_PATH_B1F_WIDTH EQU 10
+ICE_PATH_B2F_MAHOGANY_SIDE_HEIGHT EQU 9
+ICE_PATH_B2F_MAHOGANY_SIDE_WIDTH EQU 10
+ICE_PATH_B2F_BLACKTHORN_SIDE_HEIGHT EQU 9
+ICE_PATH_B2F_BLACKTHORN_SIDE_WIDTH EQU 5
+ICE_PATH_B3F_HEIGHT EQU 9
+ICE_PATH_B3F_WIDTH EQU 10
+WHIRL_ISLAND_NW_HEIGHT EQU 9
+WHIRL_ISLAND_NW_WIDTH EQU 5
+WHIRL_ISLAND_NE_HEIGHT EQU 9
+WHIRL_ISLAND_NE_WIDTH EQU 10
+WHIRL_ISLAND_SW_HEIGHT EQU 9
+WHIRL_ISLAND_SW_WIDTH EQU 10
+WHIRL_ISLAND_CAVE_HEIGHT EQU 9
+WHIRL_ISLAND_CAVE_WIDTH EQU 5
+WHIRL_ISLAND_SE_HEIGHT EQU 9
+WHIRL_ISLAND_SE_WIDTH EQU 5
+WHIRL_ISLAND_B1F_HEIGHT EQU 18
+WHIRL_ISLAND_B1F_WIDTH EQU 20
+WHIRL_ISLAND_B2F_HEIGHT EQU 18
+WHIRL_ISLAND_B2F_WIDTH EQU 10
+WHIRL_ISLAND_LUGIA_CHAMBER_HEIGHT EQU 9
+WHIRL_ISLAND_LUGIA_CHAMBER_WIDTH EQU 10
+SILVER_CAVE_ROOM_1_HEIGHT EQU 18
+SILVER_CAVE_ROOM_1_WIDTH EQU 10
+SILVER_CAVE_ROOM_2_HEIGHT EQU 18
+SILVER_CAVE_ROOM_2_WIDTH EQU 15
+SILVER_CAVE_ROOM_3_HEIGHT EQU 18
+SILVER_CAVE_ROOM_3_WIDTH EQU 10
+SILVER_CAVE_ITEM_ROOMS_HEIGHT EQU 9
+SILVER_CAVE_ITEM_ROOMS_WIDTH EQU 10
+DARK_CAVE_VIOLET_ENTRANCE_HEIGHT EQU 18
+DARK_CAVE_VIOLET_ENTRANCE_WIDTH EQU 20
+DARK_CAVE_BLACKTHORN_ENTRANCE_HEIGHT EQU 18
+DARK_CAVE_BLACKTHORN_ENTRANCE_WIDTH EQU 15
+DRAGONS_DEN_1F_HEIGHT EQU 9
+DRAGONS_DEN_1F_WIDTH EQU 5
+DRAGONS_DEN_B1F_HEIGHT EQU 18
+DRAGONS_DEN_B1F_WIDTH EQU 20
+DRAGON_SHRINE_HEIGHT EQU 5
+DRAGON_SHRINE_WIDTH EQU 5
+TOHJO_FALLS_HEIGHT EQU 9
+TOHJO_FALLS_WIDTH EQU 15
+DIGLETTS_CAVE_HEIGHT EQU 18
+DIGLETTS_CAVE_WIDTH EQU 10
+MOUNT_MOON_HEIGHT EQU 9
+MOUNT_MOON_WIDTH EQU 15
+UNDERGROUND_HEIGHT EQU 14
+UNDERGROUND_WIDTH EQU 3
+ROCK_TUNNEL_1F_HEIGHT EQU 18
+ROCK_TUNNEL_1F_WIDTH EQU 15
+ROCK_TUNNEL_B1F_HEIGHT EQU 18
+ROCK_TUNNEL_B1F_WIDTH EQU 15
+SAFARI_ZONE_FUCHSIA_GATE_BETA_HEIGHT EQU 4
+SAFARI_ZONE_FUCHSIA_GATE_BETA_WIDTH EQU 5
+SAFARI_ZONE_BETA_HEIGHT EQU 18
+SAFARI_ZONE_BETA_WIDTH EQU 10
+VICTORY_ROAD_HEIGHT EQU 36
+VICTORY_ROAD_WIDTH EQU 10
+ECRUTEAK_HOUSE_HEIGHT EQU 9
+ECRUTEAK_HOUSE_WIDTH EQU 10
+WISE_TRIOS_ROOM_HEIGHT EQU 4
+WISE_TRIOS_ROOM_WIDTH EQU 4
+ECRUTEAK_POKECENTER_1F_HEIGHT EQU 4
+ECRUTEAK_POKECENTER_1F_WIDTH EQU 5
+ECRUTEAK_LUGIA_SPEECH_HOUSE_HEIGHT EQU 4
+ECRUTEAK_LUGIA_SPEECH_HOUSE_WIDTH EQU 4
+DANCE_THEATRE_HEIGHT EQU 7
+DANCE_THEATRE_WIDTH EQU 6
+ECRUTEAK_MART_HEIGHT EQU 4
+ECRUTEAK_MART_WIDTH EQU 6
+ECRUTEAK_GYM_HEIGHT EQU 9
+ECRUTEAK_GYM_WIDTH EQU 5
+ECRUTEAK_ITEMFINDER_HOUSE_HEIGHT EQU 4
+ECRUTEAK_ITEMFINDER_HOUSE_WIDTH EQU 4
+ECRUTEAK_CITY_HEIGHT EQU 18
+ECRUTEAK_CITY_WIDTH EQU 20
+BLACKTHORN_GYM_1F_HEIGHT EQU 9
+BLACKTHORN_GYM_1F_WIDTH EQU 5
+BLACKTHORN_GYM_2F_HEIGHT EQU 9
+BLACKTHORN_GYM_2F_WIDTH EQU 5
+BLACKTHORN_DRAGON_SPEECH_HOUSE_HEIGHT EQU 4
+BLACKTHORN_DRAGON_SPEECH_HOUSE_WIDTH EQU 4
+BLACKTHORN_DODRIO_TRADE_HOUSE_HEIGHT EQU 4
+BLACKTHORN_DODRIO_TRADE_HOUSE_WIDTH EQU 4
+BLACKTHORN_MART_HEIGHT EQU 4
+BLACKTHORN_MART_WIDTH EQU 6
+BLACKTHORN_POKECENTER_1F_HEIGHT EQU 4
+BLACKTHORN_POKECENTER_1F_WIDTH EQU 5
+MOVE_DELETERS_HOUSE_HEIGHT EQU 4
+MOVE_DELETERS_HOUSE_WIDTH EQU 4
+ROUTE_45_HEIGHT EQU 45
+ROUTE_45_WIDTH EQU 10
+ROUTE_46_HEIGHT EQU 18
+ROUTE_46_WIDTH EQU 10
+BLACKTHORN_CITY_HEIGHT EQU 18
+BLACKTHORN_CITY_WIDTH EQU 20
+CINNABAR_POKECENTER_1F_HEIGHT EQU 4
+CINNABAR_POKECENTER_1F_WIDTH EQU 5
+CINNABAR_POKECENTER_2F_BETA_HEIGHT EQU 4
+CINNABAR_POKECENTER_2F_BETA_WIDTH EQU 8
+ROUTE_19___FUCHSIA_GATE_HEIGHT EQU 4
+ROUTE_19___FUCHSIA_GATE_WIDTH EQU 5
+SEAFOAM_GYM_HEIGHT EQU 4
+SEAFOAM_GYM_WIDTH EQU 5
+ROUTE_19_HEIGHT EQU 18
+ROUTE_19_WIDTH EQU 10
+ROUTE_20_HEIGHT EQU 9
+ROUTE_20_WIDTH EQU 30
+ROUTE_21_HEIGHT EQU 18
+ROUTE_21_WIDTH EQU 10
+CINNABAR_ISLAND_HEIGHT EQU 9
+CINNABAR_ISLAND_WIDTH EQU 10
+CERULEAN_GYM_BADGE_SPEECH_HOUSE_HEIGHT EQU 4
+CERULEAN_GYM_BADGE_SPEECH_HOUSE_WIDTH EQU 4
+CERULEAN_POLICE_STATION_HEIGHT EQU 4
+CERULEAN_POLICE_STATION_WIDTH EQU 4
+CERULEAN_TRADE_SPEECH_HOUSE_HEIGHT EQU 4
+CERULEAN_TRADE_SPEECH_HOUSE_WIDTH EQU 4
+CERULEAN_POKECENTER_1F_HEIGHT EQU 4
+CERULEAN_POKECENTER_1F_WIDTH EQU 5
+CERULEAN_POKECENTER_2F_BETA_HEIGHT EQU 4
+CERULEAN_POKECENTER_2F_BETA_WIDTH EQU 8
+CERULEAN_GYM_HEIGHT EQU 8
+CERULEAN_GYM_WIDTH EQU 5
+CERULEAN_MART_HEIGHT EQU 4
+CERULEAN_MART_WIDTH EQU 6
+ROUTE_10_POKECENTER_1F_HEIGHT EQU 4
+ROUTE_10_POKECENTER_1F_WIDTH EQU 5
+ROUTE_10_POKECENTER_2F_BETA_HEIGHT EQU 4
+ROUTE_10_POKECENTER_2F_BETA_WIDTH EQU 8
+POWER_PLANT_HEIGHT EQU 9
+POWER_PLANT_WIDTH EQU 10
+BILLS_HOUSE_HEIGHT EQU 4
+BILLS_HOUSE_WIDTH EQU 4
+ROUTE_4_HEIGHT EQU 9
+ROUTE_4_WIDTH EQU 20
+ROUTE_9_HEIGHT EQU 9
+ROUTE_9_WIDTH EQU 30
+ROUTE_10_NORTH_HEIGHT EQU 9
+ROUTE_10_NORTH_WIDTH EQU 10
+ROUTE_24_HEIGHT EQU 9
+ROUTE_24_WIDTH EQU 10
+ROUTE_25_HEIGHT EQU 9
+ROUTE_25_WIDTH EQU 30
+CERULEAN_CITY_HEIGHT EQU 18
+CERULEAN_CITY_WIDTH EQU 20
+AZALEA_POKECENTER_1F_HEIGHT EQU 4
+AZALEA_POKECENTER_1F_WIDTH EQU 5
+CHARCOAL_KILN_HEIGHT EQU 4
+CHARCOAL_KILN_WIDTH EQU 4
+AZALEA_MART_HEIGHT EQU 4
+AZALEA_MART_WIDTH EQU 6
+KURTS_HOUSE_HEIGHT EQU 4
+KURTS_HOUSE_WIDTH EQU 8
+AZALEA_GYM_HEIGHT EQU 8
+AZALEA_GYM_WIDTH EQU 5
+ROUTE_33_HEIGHT EQU 9
+ROUTE_33_WIDTH EQU 10
+AZALEA_TOWN_HEIGHT EQU 9
+AZALEA_TOWN_WIDTH EQU 20
+LAKE_OF_RAGE_HIDDEN_POWER_HOUSE_HEIGHT EQU 4
+LAKE_OF_RAGE_HIDDEN_POWER_HOUSE_WIDTH EQU 4
+LAKE_OF_RAGE_MAGIKARP_HOUSE_HEIGHT EQU 4
+LAKE_OF_RAGE_MAGIKARP_HOUSE_WIDTH EQU 4
+ROUTE_43_MAHOGANY_GATE_HEIGHT EQU 4
+ROUTE_43_MAHOGANY_GATE_WIDTH EQU 5
+ROUTE_43_GATE_HEIGHT EQU 4
+ROUTE_43_GATE_WIDTH EQU 5
+ROUTE_43_HEIGHT EQU 27
+ROUTE_43_WIDTH EQU 10
+LAKE_OF_RAGE_HEIGHT EQU 18
+LAKE_OF_RAGE_WIDTH EQU 20
+ROUTE_32_HEIGHT EQU 45
+ROUTE_32_WIDTH EQU 10
+ROUTE_35_HEIGHT EQU 18
+ROUTE_35_WIDTH EQU 10
+ROUTE_36_HEIGHT EQU 9
+ROUTE_36_WIDTH EQU 30
+ROUTE_37_HEIGHT EQU 9
+ROUTE_37_WIDTH EQU 10
+VIOLET_CITY_HEIGHT EQU 18
+VIOLET_CITY_WIDTH EQU 20
+VIOLET_MART_HEIGHT EQU 4
+VIOLET_MART_WIDTH EQU 6
+VIOLET_GYM_HEIGHT EQU 8
+VIOLET_GYM_WIDTH EQU 5
+EARLS_POKEMON_ACADEMY_HEIGHT EQU 8
+EARLS_POKEMON_ACADEMY_WIDTH EQU 4
+VIOLET_NICKNAME_SPEECH_HOUSE_HEIGHT EQU 4
+VIOLET_NICKNAME_SPEECH_HOUSE_WIDTH EQU 4
+VIOLET_POKECENTER_1F_HEIGHT EQU 4
+VIOLET_POKECENTER_1F_WIDTH EQU 5
+VIOLET_ONIX_TRADE_HOUSE_HEIGHT EQU 4
+VIOLET_ONIX_TRADE_HOUSE_WIDTH EQU 4
+ROUTE_32_RUINS_OF_ALPH_GATE_HEIGHT EQU 4
+ROUTE_32_RUINS_OF_ALPH_GATE_WIDTH EQU 5
+ROUTE_32_POKECENTER_1F_HEIGHT EQU 4
+ROUTE_32_POKECENTER_1F_WIDTH EQU 5
+ROUTE_35_GOLDENROD_GATE_HEIGHT EQU 4
+ROUTE_35_GOLDENROD_GATE_WIDTH EQU 5
+ROUTE_35_NATIONAL_PARK_GATE_HEIGHT EQU 4
+ROUTE_35_NATIONAL_PARK_GATE_WIDTH EQU 4
+ROUTE_36_RUINS_OF_ALPH_GATE_HEIGHT EQU 4
+ROUTE_36_RUINS_OF_ALPH_GATE_WIDTH EQU 5
+ROUTE_36_NATIONAL_PARK_GATE_HEIGHT EQU 4
+ROUTE_36_NATIONAL_PARK_GATE_WIDTH EQU 5
+ROUTE_34_HEIGHT EQU 27
+ROUTE_34_WIDTH EQU 10
+GOLDENROD_CITY_HEIGHT EQU 18
+GOLDENROD_CITY_WIDTH EQU 20
+GOLDENROD_GYM_HEIGHT EQU 9
+GOLDENROD_GYM_WIDTH EQU 10
+GOLDENROD_BIKE_SHOP_HEIGHT EQU 4
+GOLDENROD_BIKE_SHOP_WIDTH EQU 4
+GOLDENROD_HAPPINESS_RATER_HEIGHT EQU 4
+GOLDENROD_HAPPINESS_RATER_WIDTH EQU 4
+GOLDENROD_BILLS_HOUSE_HEIGHT EQU 4
+GOLDENROD_BILLS_HOUSE_WIDTH EQU 4
+GOLDENROD_MAGNET_TRAIN_STATION_HEIGHT EQU 9
+GOLDENROD_MAGNET_TRAIN_STATION_WIDTH EQU 10
+GOLDENROD_FLOWER_SHOP_HEIGHT EQU 4
+GOLDENROD_FLOWER_SHOP_WIDTH EQU 4
+GOLDENROD_PP_SPEECH_HOUSE_HEIGHT EQU 4
+GOLDENROD_PP_SPEECH_HOUSE_WIDTH EQU 4
+GOLDENROD_NAME_RATERS_HOUSE_HEIGHT EQU 4
+GOLDENROD_NAME_RATERS_HOUSE_WIDTH EQU 4
+GOLDENROD_DEPT_STORE_1F_HEIGHT EQU 4
+GOLDENROD_DEPT_STORE_1F_WIDTH EQU 8
+GOLDENROD_DEPT_STORE_2F_HEIGHT EQU 4
+GOLDENROD_DEPT_STORE_2F_WIDTH EQU 8
+GOLDENROD_DEPT_STORE_3F_HEIGHT EQU 4
+GOLDENROD_DEPT_STORE_3F_WIDTH EQU 8
+GOLDENROD_DEPT_STORE_4F_HEIGHT EQU 4
+GOLDENROD_DEPT_STORE_4F_WIDTH EQU 8
+GOLDENROD_DEPT_STORE_5F_HEIGHT EQU 4
+GOLDENROD_DEPT_STORE_5F_WIDTH EQU 8
+GOLDENROD_DEPT_STORE_6F_HEIGHT EQU 4
+GOLDENROD_DEPT_STORE_6F_WIDTH EQU 8
+GOLDENROD_DEPT_STORE_ELEVATOR_HEIGHT EQU 2
+GOLDENROD_DEPT_STORE_ELEVATOR_WIDTH EQU 2
+GOLDENROD_DEPT_STORE_ROOF_HEIGHT EQU 4
+GOLDENROD_DEPT_STORE_ROOF_WIDTH EQU 8
+GOLDENROD_GAME_CORNER_HEIGHT EQU 7
+GOLDENROD_GAME_CORNER_WIDTH EQU 10
+GOLDENROD_POKECENTER_1F_HEIGHT EQU 4
+GOLDENROD_POKECENTER_1F_WIDTH EQU 5
+GOLDENROD_POKECOM_CENTER_2F_MOBILE_HEIGHT EQU 16
+GOLDENROD_POKECOM_CENTER_2F_MOBILE_WIDTH EQU 16
+ILEX_FOREST_AZALEA_GATE_HEIGHT EQU 4
+ILEX_FOREST_AZALEA_GATE_WIDTH EQU 5
+ROUTE_34_ILEX_FOREST_GATE_HEIGHT EQU 4
+ROUTE_34_ILEX_FOREST_GATE_WIDTH EQU 5
+DAY_CARE_HEIGHT EQU 4
+DAY_CARE_WIDTH EQU 5
+ROUTE_6_HEIGHT EQU 9
+ROUTE_6_WIDTH EQU 10
+ROUTE_11_HEIGHT EQU 9
+ROUTE_11_WIDTH EQU 20
+VERMILION_CITY_HEIGHT EQU 18
+VERMILION_CITY_WIDTH EQU 20
+VERMILION_HOUSE_FISHING_SPEECH_HOUSE_HEIGHT EQU 4
+VERMILION_HOUSE_FISHING_SPEECH_HOUSE_WIDTH EQU 4
+VERMILION_POKECENTER_1F_HEIGHT EQU 4
+VERMILION_POKECENTER_1F_WIDTH EQU 5
+VERMILION_POKECENTER_2F_BETA_HEIGHT EQU 4
+VERMILION_POKECENTER_2F_BETA_WIDTH EQU 8
+POKEMON_FAN_CLUB_HEIGHT EQU 4
+POKEMON_FAN_CLUB_WIDTH EQU 5
+VERMILION_MAGNET_TRAIN_SPEECH_HOUSE_HEIGHT EQU 4
+VERMILION_MAGNET_TRAIN_SPEECH_HOUSE_WIDTH EQU 4
+VERMILION_MART_HEIGHT EQU 4
+VERMILION_MART_WIDTH EQU 6
+VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE_HEIGHT EQU 4
+VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE_WIDTH EQU 4
+VERMILION_GYM_HEIGHT EQU 9
+VERMILION_GYM_WIDTH EQU 5
+ROUTE_6_SAFFRON_GATE_HEIGHT EQU 4
+ROUTE_6_SAFFRON_GATE_WIDTH EQU 5
+ROUTE_6_UNDERGROUND_ENTRANCE_HEIGHT EQU 4
+ROUTE_6_UNDERGROUND_ENTRANCE_WIDTH EQU 4
+ROUTE_1_HEIGHT EQU 18
+ROUTE_1_WIDTH EQU 10
+PALLET_TOWN_HEIGHT EQU 9
+PALLET_TOWN_WIDTH EQU 10
+REDS_HOUSE_1F_HEIGHT EQU 4
+REDS_HOUSE_1F_WIDTH EQU 4
+REDS_HOUSE_2F_HEIGHT EQU 4
+REDS_HOUSE_2F_WIDTH EQU 4
+BLUES_HOUSE_HEIGHT EQU 4
+BLUES_HOUSE_WIDTH EQU 4
+OAKS_LAB_HEIGHT EQU 6
+OAKS_LAB_WIDTH EQU 5
+ROUTE_3_HEIGHT EQU 9
+ROUTE_3_WIDTH EQU 30
+PEWTER_CITY_HEIGHT EQU 18
+PEWTER_CITY_WIDTH EQU 20
+PEWTER_NIDORAN_SPEECH_HOUSE_HEIGHT EQU 4
+PEWTER_NIDORAN_SPEECH_HOUSE_WIDTH EQU 4
+PEWTER_GYM_HEIGHT EQU 7
+PEWTER_GYM_WIDTH EQU 5
+PEWTER_MART_HEIGHT EQU 4
+PEWTER_MART_WIDTH EQU 6
+PEWTER_POKECENTER_1F_HEIGHT EQU 4
+PEWTER_POKECENTER_1F_WIDTH EQU 5
+PEWTER_POKECENTER_2F_BETA_HEIGHT EQU 4
+PEWTER_POKECENTER_2F_BETA_WIDTH EQU 8
+PEWTER_SNOOZE_SPEECH_HOUSE_HEIGHT EQU 4
+PEWTER_SNOOZE_SPEECH_HOUSE_WIDTH EQU 4
+OLIVINE_PORT_HEIGHT EQU 18
+OLIVINE_PORT_WIDTH EQU 10
+VERMILION_PORT_HEIGHT EQU 18
+VERMILION_PORT_WIDTH EQU 10
+FAST_SHIP_1F_HEIGHT EQU 9
+FAST_SHIP_1F_WIDTH EQU 16
+FAST_SHIP_CABINS_NNW_NNE_NE_HEIGHT EQU 16
+FAST_SHIP_CABINS_NNW_NNE_NE_WIDTH EQU 4
+FAST_SHIP_CABINS_SW_SSW_NW_HEIGHT EQU 16
+FAST_SHIP_CABINS_SW_SSW_NW_WIDTH EQU 4
+FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_HEIGHT EQU 17
+FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_WIDTH EQU 5
+FAST_SHIP_B1F_HEIGHT EQU 8
+FAST_SHIP_B1F_WIDTH EQU 16
+OLIVINE_PORT_PASSAGE_HEIGHT EQU 9
+OLIVINE_PORT_PASSAGE_WIDTH EQU 10
+VERMILION_PORT_PASSAGE_HEIGHT EQU 9
+VERMILION_PORT_PASSAGE_WIDTH EQU 10
+MOUNT_MOON_SQUARE_HEIGHT EQU 9
+MOUNT_MOON_SQUARE_WIDTH EQU 15
+MOUNT_MOON_GIFT_SHOP_HEIGHT EQU 4
+MOUNT_MOON_GIFT_SHOP_WIDTH EQU 4
+TIN_TOWER_ROOF_HEIGHT EQU 9
+TIN_TOWER_ROOF_WIDTH EQU 10
+ROUTE_23_HEIGHT EQU 9
+ROUTE_23_WIDTH EQU 10
+INDIGO_PLATEAU_POKECENTER_1F_HEIGHT EQU 7
+INDIGO_PLATEAU_POKECENTER_1F_WIDTH EQU 9
+WILLS_ROOM_HEIGHT EQU 9
+WILLS_ROOM_WIDTH EQU 5
+KOGAS_ROOM_HEIGHT EQU 9
+KOGAS_ROOM_WIDTH EQU 5
+BRUNOS_ROOM_HEIGHT EQU 9
+BRUNOS_ROOM_WIDTH EQU 5
+KARENS_ROOM_HEIGHT EQU 9
+KARENS_ROOM_WIDTH EQU 5
+LANCES_ROOM_HEIGHT EQU 12
+LANCES_ROOM_WIDTH EQU 5
+HALL_OF_FAME_HEIGHT EQU 7
+HALL_OF_FAME_WIDTH EQU 5
+ROUTE_13_HEIGHT EQU 9
+ROUTE_13_WIDTH EQU 30
+ROUTE_14_HEIGHT EQU 18
+ROUTE_14_WIDTH EQU 10
+ROUTE_15_HEIGHT EQU 9
+ROUTE_15_WIDTH EQU 20
+ROUTE_18_HEIGHT EQU 9
+ROUTE_18_WIDTH EQU 10
+FUCHSIA_CITY_HEIGHT EQU 18
+FUCHSIA_CITY_WIDTH EQU 20
+FUCHSIA_MART_HEIGHT EQU 4
+FUCHSIA_MART_WIDTH EQU 6
+SAFARI_ZONE_MAIN_OFFICE_HEIGHT EQU 4
+SAFARI_ZONE_MAIN_OFFICE_WIDTH EQU 4
+FUCHSIA_GYM_HEIGHT EQU 9
+FUCHSIA_GYM_WIDTH EQU 5
+FUCHSIA_BILL_SPEECH_HOUSE_HEIGHT EQU 4
+FUCHSIA_BILL_SPEECH_HOUSE_WIDTH EQU 4
+FUCHSIA_POKECENTER_1F_HEIGHT EQU 4
+FUCHSIA_POKECENTER_1F_WIDTH EQU 5
+FUCHSIA_POKECENTER_2F_BETA_HEIGHT EQU 4
+FUCHSIA_POKECENTER_2F_BETA_WIDTH EQU 8
+SAFARI_ZONE_WARDENS_HOME_HEIGHT EQU 4
+SAFARI_ZONE_WARDENS_HOME_WIDTH EQU 5
+ROUTE_15_FUCHSIA_GATE_HEIGHT EQU 4
+ROUTE_15_FUCHSIA_GATE_WIDTH EQU 5
+ROUTE_8_HEIGHT EQU 9
+ROUTE_8_WIDTH EQU 20
+ROUTE_12_HEIGHT EQU 27
+ROUTE_12_WIDTH EQU 10
+ROUTE_10_SOUTH_HEIGHT EQU 9
+ROUTE_10_SOUTH_WIDTH EQU 10
+LAVENDER_TOWN_HEIGHT EQU 9
+LAVENDER_TOWN_WIDTH EQU 10
+LAVENDER_POKECENTER_1F_HEIGHT EQU 4
+LAVENDER_POKECENTER_1F_WIDTH EQU 5
+LAVENDER_POKECENTER_2F_BETA_HEIGHT EQU 4
+LAVENDER_POKECENTER_2F_BETA_WIDTH EQU 8
+MR_FUJIS_HOUSE_HEIGHT EQU 4
+MR_FUJIS_HOUSE_WIDTH EQU 5
+LAVENDER_TOWN_SPEECH_HOUSE_HEIGHT EQU 4
+LAVENDER_TOWN_SPEECH_HOUSE_WIDTH EQU 4
+LAVENDER_NAME_RATER_HEIGHT EQU 4
+LAVENDER_NAME_RATER_WIDTH EQU 4
+LAVENDER_MART_HEIGHT EQU 4
+LAVENDER_MART_WIDTH EQU 6
+SOUL_HOUSE_HEIGHT EQU 4
+SOUL_HOUSE_WIDTH EQU 5
+LAV_RADIO_TOWER_1F_HEIGHT EQU 4
+LAV_RADIO_TOWER_1F_WIDTH EQU 10
+ROUTE_8_SAFFRON_GATE_HEIGHT EQU 4
+ROUTE_8_SAFFRON_GATE_WIDTH EQU 5
+ROUTE_12_SUPER_ROD_HOUSE_HEIGHT EQU 4
+ROUTE_12_SUPER_ROD_HOUSE_WIDTH EQU 4
+ROUTE_28_HEIGHT EQU 9
+ROUTE_28_WIDTH EQU 20
+SILVER_CAVE_OUTSIDE_HEIGHT EQU 18
+SILVER_CAVE_OUTSIDE_WIDTH EQU 20
+SILVER_CAVE_POKECENTER_1F_HEIGHT EQU 4
+SILVER_CAVE_POKECENTER_1F_WIDTH EQU 5
+ROUTE_28_FAMOUS_SPEECH_HOUSE_HEIGHT EQU 4
+ROUTE_28_FAMOUS_SPEECH_HOUSE_WIDTH EQU 4
+POKECENTER_2F_HEIGHT EQU 4
+POKECENTER_2F_WIDTH EQU 8
+TRADE_CENTER_HEIGHT EQU 4
+TRADE_CENTER_WIDTH EQU 5
+COLOSSEUM_HEIGHT EQU 4
+COLOSSEUM_WIDTH EQU 5
+TIME_CAPSULE_HEIGHT EQU 4
+TIME_CAPSULE_WIDTH EQU 5
+MOBILE_TRADE_ROOM_MOBILE_HEIGHT EQU 4
+MOBILE_TRADE_ROOM_MOBILE_WIDTH EQU 5
+MOBILE_BATTLE_ROOM_HEIGHT EQU 4
+MOBILE_BATTLE_ROOM_WIDTH EQU 5
+ROUTE_7_HEIGHT EQU 9
+ROUTE_7_WIDTH EQU 10
+ROUTE_16_HEIGHT EQU 9
+ROUTE_16_WIDTH EQU 10
+ROUTE_17_HEIGHT EQU 45
+ROUTE_17_WIDTH EQU 10
+CELADON_CITY_HEIGHT EQU 18
+CELADON_CITY_WIDTH EQU 20
+CELADON_DEPT_STORE_1F_HEIGHT EQU 4
+CELADON_DEPT_STORE_1F_WIDTH EQU 8
+CELADON_DEPT_STORE_2F_HEIGHT EQU 4
+CELADON_DEPT_STORE_2F_WIDTH EQU 8
+CELADON_DEPT_STORE_3F_HEIGHT EQU 4
+CELADON_DEPT_STORE_3F_WIDTH EQU 8
+CELADON_DEPT_STORE_4F_HEIGHT EQU 4
+CELADON_DEPT_STORE_4F_WIDTH EQU 8
+CELADON_DEPT_STORE_5F_HEIGHT EQU 4
+CELADON_DEPT_STORE_5F_WIDTH EQU 8
+CELADON_DEPT_STORE_6F_HEIGHT EQU 4
+CELADON_DEPT_STORE_6F_WIDTH EQU 8
+CELADON_DEPT_STORE_ELEVATOR_HEIGHT EQU 2
+CELADON_DEPT_STORE_ELEVATOR_WIDTH EQU 2
+CELADON_MANSION_1F_HEIGHT EQU 5
+CELADON_MANSION_1F_WIDTH EQU 4
+CELADON_MANSION_2F_HEIGHT EQU 5
+CELADON_MANSION_2F_WIDTH EQU 4
+CELADON_MANSION_3F_HEIGHT EQU 5
+CELADON_MANSION_3F_WIDTH EQU 4
+CELADON_MANSION_ROOF_HEIGHT EQU 5
+CELADON_MANSION_ROOF_WIDTH EQU 4
+CELADON_MANSION_ROOF_HOUSE_HEIGHT EQU 4
+CELADON_MANSION_ROOF_HOUSE_WIDTH EQU 4
+CELADON_POKECENTER_1F_HEIGHT EQU 4
+CELADON_POKECENTER_1F_WIDTH EQU 5
+CELADON_POKECENTER_2F_BETA_HEIGHT EQU 4
+CELADON_POKECENTER_2F_BETA_WIDTH EQU 8
+CELADON_GAME_CORNER_HEIGHT EQU 7
+CELADON_GAME_CORNER_WIDTH EQU 10
+CELADON_GAME_CORNER_PRIZE_ROOM_HEIGHT EQU 3
+CELADON_GAME_CORNER_PRIZE_ROOM_WIDTH EQU 3
+CELADON_GYM_HEIGHT EQU 9
+CELADON_GYM_WIDTH EQU 5
+CELADON_CAFE_HEIGHT EQU 4
+CELADON_CAFE_WIDTH EQU 6
+ROUTE_16_FUCHSIA_SPEECH_HOUSE_HEIGHT EQU 4
+ROUTE_16_FUCHSIA_SPEECH_HOUSE_WIDTH EQU 4
+ROUTE_16_GATE_HEIGHT EQU 4
+ROUTE_16_GATE_WIDTH EQU 5
+ROUTE_7_SAFFRON_GATE_HEIGHT EQU 4
+ROUTE_7_SAFFRON_GATE_WIDTH EQU 5
+ROUTE_17_18_GATE_HEIGHT EQU 4
+ROUTE_17_18_GATE_WIDTH EQU 5
+ROUTE_40_HEIGHT EQU 18
+ROUTE_40_WIDTH EQU 10
+ROUTE_41_HEIGHT EQU 27
+ROUTE_41_WIDTH EQU 25
+CIANWOOD_CITY_HEIGHT EQU 27
+CIANWOOD_CITY_WIDTH EQU 15
+MANIAS_HOUSE_HEIGHT EQU 4
+MANIAS_HOUSE_WIDTH EQU 4
+CIANWOOD_GYM_HEIGHT EQU 9
+CIANWOOD_GYM_WIDTH EQU 5
+CIANWOOD_POKECENTER_1F_HEIGHT EQU 4
+CIANWOOD_POKECENTER_1F_WIDTH EQU 5
+CIANWOOD_PHARMACY_HEIGHT EQU 4
+CIANWOOD_PHARMACY_WIDTH EQU 4
+CIANWOOD_CITY_PHOTO_STUDIO_HEIGHT EQU 4
+CIANWOOD_CITY_PHOTO_STUDIO_WIDTH EQU 4
+CIANWOOD_LUGIA_SPEECH_HOUSE_HEIGHT EQU 4
+CIANWOOD_LUGIA_SPEECH_HOUSE_WIDTH EQU 4
+POKE_SEERS_HOUSE_HEIGHT EQU 4
+POKE_SEERS_HOUSE_WIDTH EQU 4
+BATTLE_TOWER_1F_HEIGHT EQU 5
+BATTLE_TOWER_1F_WIDTH EQU 8
+BATTLE_TOWER_BATTLE_ROOM_HEIGHT EQU 4
+BATTLE_TOWER_BATTLE_ROOM_WIDTH EQU 4
+BATTLE_TOWER_ELEVATOR_HEIGHT EQU 2
+BATTLE_TOWER_ELEVATOR_WIDTH EQU 2
+BATTLE_TOWER_HALLWAY_HEIGHT EQU 2
+BATTLE_TOWER_HALLWAY_WIDTH EQU 11
+ROUTE_40_BATTLE_TOWER_GATE_HEIGHT EQU 4
+ROUTE_40_BATTLE_TOWER_GATE_WIDTH EQU 5
+BATTLE_TOWER_OUTSIDE_HEIGHT EQU 14
+BATTLE_TOWER_OUTSIDE_WIDTH EQU 10
+ROUTE_2_HEIGHT EQU 27
+ROUTE_2_WIDTH EQU 10
+ROUTE_22_HEIGHT EQU 9
+ROUTE_22_WIDTH EQU 20
+VIRIDIAN_CITY_HEIGHT EQU 18
+VIRIDIAN_CITY_WIDTH EQU 20
+VIRIDIAN_GYM_HEIGHT EQU 9
+VIRIDIAN_GYM_WIDTH EQU 5
+VIRIDIAN_NICKNAME_SPEECH_HOUSE_HEIGHT EQU 4
+VIRIDIAN_NICKNAME_SPEECH_HOUSE_WIDTH EQU 4
+TRAINER_HOUSE_1F_HEIGHT EQU 7
+TRAINER_HOUSE_1F_WIDTH EQU 5
+TRAINER_HOUSE_B1F_HEIGHT EQU 8
+TRAINER_HOUSE_B1F_WIDTH EQU 5
+VIRIDIAN_MART_HEIGHT EQU 4
+VIRIDIAN_MART_WIDTH EQU 6
+VIRIDIAN_POKECENTER_1F_HEIGHT EQU 4
+VIRIDIAN_POKECENTER_1F_WIDTH EQU 5
+VIRIDIAN_POKECENTER_2F_BETA_HEIGHT EQU 4
+VIRIDIAN_POKECENTER_2F_BETA_WIDTH EQU 8
+ROUTE_2_NUGGET_SPEECH_HOUSE_HEIGHT EQU 4
+ROUTE_2_NUGGET_SPEECH_HOUSE_WIDTH EQU 4
+ROUTE_2_GATE_HEIGHT EQU 4
+ROUTE_2_GATE_WIDTH EQU 5
+VICTORY_ROAD_GATE_HEIGHT EQU 9
+VICTORY_ROAD_GATE_WIDTH EQU 10
+ROUTE_26_HEIGHT EQU 54
+ROUTE_26_WIDTH EQU 10
+ROUTE_27_HEIGHT EQU 9
+ROUTE_27_WIDTH EQU 40
+ROUTE_29_HEIGHT EQU 9
+ROUTE_29_WIDTH EQU 30
+NEW_BARK_TOWN_HEIGHT EQU 9
+NEW_BARK_TOWN_WIDTH EQU 10
+ELMS_LAB_HEIGHT EQU 6
+ELMS_LAB_WIDTH EQU 5
+KRISS_HOUSE_1F_HEIGHT EQU 4
+KRISS_HOUSE_1F_WIDTH EQU 5
+KRISS_HOUSE_2F_HEIGHT EQU 3
+KRISS_HOUSE_2F_WIDTH EQU 4
+KRISS_NEIGHBORS_HOUSE_HEIGHT EQU 4
+KRISS_NEIGHBORS_HOUSE_WIDTH EQU 4
+ELMS_HOUSE_HEIGHT EQU 4
+ELMS_HOUSE_WIDTH EQU 4
+ROUTE_26_HEAL_SPEECH_HOUSE_HEIGHT EQU 4
+ROUTE_26_HEAL_SPEECH_HOUSE_WIDTH EQU 4
+ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE_HEIGHT EQU 4
+ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE_WIDTH EQU 4
+ROUTE_27_SANDSTORM_HOUSE_HEIGHT EQU 4
+ROUTE_27_SANDSTORM_HOUSE_WIDTH EQU 4
+ROUTE_29_46_GATE_HEIGHT EQU 4
+ROUTE_29_46_GATE_WIDTH EQU 5
+ROUTE_5_HEIGHT EQU 9
+ROUTE_5_WIDTH EQU 10
+SAFFRON_CITY_HEIGHT EQU 18
+SAFFRON_CITY_WIDTH EQU 20
+FIGHTING_DOJO_HEIGHT EQU 6
+FIGHTING_DOJO_WIDTH EQU 5
+SAFFRON_GYM_HEIGHT EQU 9
+SAFFRON_GYM_WIDTH EQU 10
+SAFFRON_MART_HEIGHT EQU 4
+SAFFRON_MART_WIDTH EQU 6
+SAFFRON_POKECENTER_1F_HEIGHT EQU 4
+SAFFRON_POKECENTER_1F_WIDTH EQU 5
+SAFFRON_POKECENTER_2F_BETA_HEIGHT EQU 4
+SAFFRON_POKECENTER_2F_BETA_WIDTH EQU 8
+MR_PSYCHICS_HOUSE_HEIGHT EQU 4
+MR_PSYCHICS_HOUSE_WIDTH EQU 4
+SAFFRON_TRAIN_STATION_HEIGHT EQU 9
+SAFFRON_TRAIN_STATION_WIDTH EQU 10
+SILPH_CO_1F_HEIGHT EQU 4
+SILPH_CO_1F_WIDTH EQU 8
+COPYCATS_HOUSE_1F_HEIGHT EQU 4
+COPYCATS_HOUSE_1F_WIDTH EQU 4
+COPYCATS_HOUSE_2F_HEIGHT EQU 3
+COPYCATS_HOUSE_2F_WIDTH EQU 5
+ROUTE_5_UNDERGROUND_ENTRANCE_HEIGHT EQU 4
+ROUTE_5_UNDERGROUND_ENTRANCE_WIDTH EQU 4
+ROUTE_5_SAFFRON_CITY_GATE_HEIGHT EQU 4
+ROUTE_5_SAFFRON_CITY_GATE_WIDTH EQU 5
+ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE_HEIGHT EQU 4
+ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE_WIDTH EQU 4
+ROUTE_30_HEIGHT EQU 27
+ROUTE_30_WIDTH EQU 10
+ROUTE_31_HEIGHT EQU 9
+ROUTE_31_WIDTH EQU 20
+CHERRYGROVE_CITY_HEIGHT EQU 9
+CHERRYGROVE_CITY_WIDTH EQU 20
+CHERRYGROVE_MART_HEIGHT EQU 4
+CHERRYGROVE_MART_WIDTH EQU 6
+CHERRYGROVE_POKECENTER_1F_HEIGHT EQU 4
+CHERRYGROVE_POKECENTER_1F_WIDTH EQU 5
+CHERRYGROVE_GYM_SPEECH_HOUSE_HEIGHT EQU 4
+CHERRYGROVE_GYM_SPEECH_HOUSE_WIDTH EQU 4
+GUIDE_GENTS_HOUSE_HEIGHT EQU 4
+GUIDE_GENTS_HOUSE_WIDTH EQU 4
+CHERRYGROVE_EVOLUTION_SPEECH_HOUSE_HEIGHT EQU 4
+CHERRYGROVE_EVOLUTION_SPEECH_HOUSE_WIDTH EQU 4
+ROUTE_30_BERRY_SPEECH_HOUSE_HEIGHT EQU 4
+ROUTE_30_BERRY_SPEECH_HOUSE_WIDTH EQU 4
+MR_POKEMONS_HOUSE_HEIGHT EQU 4
+MR_POKEMONS_HOUSE_WIDTH EQU 4
+ROUTE_31_VIOLET_GATE_HEIGHT EQU 4
+ROUTE_31_VIOLET_GATE_WIDTH EQU 5
+
+; elevator floors
+_B4F  EQU $0
+_B3F  EQU $1
+_B2F  EQU $2
+_B1F  EQU $3
+_1F   EQU $4
+_2F   EQU $5
+_3F   EQU $6
+_4F   EQU $7
+_5F   EQU $8
+_6F   EQU $9
+_7F   EQU $a
+_8F   EQU $b
+_9F   EQU $c
+_10F  EQU $d
+_11F  EQU $e
+_ROOF EQU $f
+
+; connection directions
+EAST EQU 1
+WEST EQU 2
+SOUTH EQU 4
+NORTH EQU 8
--- /dev/null
+++ b/constants/move_constants.asm
@@ -1,0 +1,251 @@
+POUND        EQU $01
+KARATE_CHOP  EQU $02
+DOUBLESLAP   EQU $03
+COMET_PUNCH  EQU $04
+MEGA_PUNCH   EQU $05
+PAY_DAY      EQU $06
+FIRE_PUNCH   EQU $07
+ICE_PUNCH    EQU $08
+THUNDERPUNCH EQU $09
+SCRATCH      EQU $0A
+VICEGRIP     EQU $0B
+GUILLOTINE   EQU $0C
+RAZOR_WIND   EQU $0D
+SWORDS_DANCE EQU $0E
+CUT          EQU $0F
+GUST         EQU $10
+WING_ATTACK  EQU $11
+WHIRLWIND    EQU $12
+FLY          EQU $13
+BIND         EQU $14
+SLAM         EQU $15
+VINE_WHIP    EQU $16
+STOMP        EQU $17
+DOUBLE_KICK  EQU $18
+MEGA_KICK    EQU $19
+JUMP_KICK    EQU $1A
+ROLLING_KICK EQU $1B
+SAND_ATTACK  EQU $1C
+HEADBUTT     EQU $1D
+HORN_ATTACK  EQU $1E
+FURY_ATTACK  EQU $1F
+HORN_DRILL   EQU $20
+TACKLE       EQU $21
+BODY_SLAM    EQU $22
+WRAP         EQU $23
+TAKE_DOWN    EQU $24
+THRASH       EQU $25
+DOUBLE_EDGE  EQU $26
+TAIL_WHIP    EQU $27
+POISON_STING EQU $28
+TWINEEDLE    EQU $29
+PIN_MISSILE  EQU $2A
+LEER         EQU $2B
+BITE         EQU $2C
+GROWL        EQU $2D
+ROAR         EQU $2E
+SING         EQU $2F
+SUPERSONIC   EQU $30
+SONICBOOM    EQU $31
+DISABLE      EQU $32
+ACID         EQU $33
+EMBER        EQU $34
+FLAMETHROWER EQU $35
+MIST         EQU $36
+WATER_GUN    EQU $37
+HYDRO_PUMP   EQU $38
+SURF         EQU $39
+ICE_BEAM     EQU $3A
+BLIZZARD     EQU $3B
+PSYBEAM      EQU $3C
+BUBBLEBEAM   EQU $3D
+AURORA_BEAM  EQU $3E
+HYPER_BEAM   EQU $3F
+PECK         EQU $40
+DRILL_PECK   EQU $41
+SUBMISSION   EQU $42
+LOW_KICK     EQU $43
+COUNTER      EQU $44
+SEISMIC_TOSS EQU $45
+STRENGTH     EQU $46
+ABSORB       EQU $47
+MEGA_DRAIN   EQU $48
+LEECH_SEED   EQU $49
+GROWTH       EQU $4A
+RAZOR_LEAF   EQU $4B
+SOLARBEAM    EQU $4C
+POISONPOWDER EQU $4D
+STUN_SPORE   EQU $4E
+SLEEP_POWDER EQU $4F
+PETAL_DANCE  EQU $50
+STRING_SHOT  EQU $51
+DRAGON_RAGE  EQU $52
+FIRE_SPIN    EQU $53
+THUNDERSHOCK EQU $54
+THUNDERBOLT  EQU $55
+THUNDER_WAVE EQU $56
+THUNDER      EQU $57
+ROCK_THROW   EQU $58
+EARTHQUAKE   EQU $59
+FISSURE      EQU $5A
+DIG          EQU $5B
+TOXIC        EQU $5C
+CONFUSION    EQU $5D
+PSYCHIC_M    EQU $5E
+HYPNOSIS     EQU $5F
+MEDITATE     EQU $60
+AGILITY      EQU $61
+QUICK_ATTACK EQU $62
+RAGE         EQU $63
+TELEPORT     EQU $64
+NIGHT_SHADE  EQU $65
+MIMIC        EQU $66
+SCREECH      EQU $67
+DOUBLE_TEAM  EQU $68
+RECOVER      EQU $69
+HARDEN       EQU $6A
+MINIMIZE     EQU $6B
+SMOKESCREEN  EQU $6C
+CONFUSE_RAY  EQU $6D
+WITHDRAW     EQU $6E
+DEFENSE_CURL EQU $6F
+BARRIER      EQU $70
+LIGHT_SCREEN EQU $71
+HAZE         EQU $72
+REFLECT      EQU $73
+FOCUS_ENERGY EQU $74
+BIDE         EQU $75
+METRONOME    EQU $76
+MIRROR_MOVE  EQU $77
+SELFDESTRUCT EQU $78
+EGG_BOMB     EQU $79
+LICK         EQU $7A
+SMOG         EQU $7B
+SLUDGE       EQU $7C
+BONE_CLUB    EQU $7D
+FIRE_BLAST   EQU $7E
+WATERFALL    EQU $7F
+CLAMP        EQU $80
+SWIFT        EQU $81
+SKULL_BASH   EQU $82
+SPIKE_CANNON EQU $83
+CONSTRICT    EQU $84
+AMNESIA      EQU $85
+KINESIS      EQU $86
+SOFTBOILED   EQU $87
+HI_JUMP_KICK EQU $88
+GLARE        EQU $89
+DREAM_EATER  EQU $8A
+POISON_GAS   EQU $8B
+BARRAGE      EQU $8C
+LEECH_LIFE   EQU $8D
+LOVELY_KISS  EQU $8E
+SKY_ATTACK   EQU $8F
+TRANSFORM    EQU $90
+BUBBLE       EQU $91
+DIZZY_PUNCH  EQU $92
+SPORE        EQU $93
+FLASH        EQU $94
+PSYWAVE      EQU $95
+SPLASH       EQU $96
+ACID_ARMOR   EQU $97
+CRABHAMMER   EQU $98
+EXPLOSION    EQU $99
+FURY_SWIPES  EQU $9A
+BONEMERANG   EQU $9B
+REST         EQU $9C
+ROCK_SLIDE   EQU $9D
+HYPER_FANG   EQU $9E
+SHARPEN      EQU $9F
+CONVERSION   EQU $A0
+TRI_ATTACK   EQU $A1
+SUPER_FANG   EQU $A2
+SLASH        EQU $A3
+SUBSTITUTE   EQU $A4
+STRUGGLE     EQU $A5
+SKETCH       EQU $A6
+TRIPLE_KICK  EQU $A7
+THIEF        EQU $A8
+SPIDER_WEB   EQU $A9
+MIND_READER  EQU $AA
+NIGHTMARE    EQU $AB
+FLAME_WHEEL  EQU $AC
+SNORE        EQU $AD
+CURSE        EQU $AE
+FLAIL        EQU $AF
+CONVERSION2  EQU $B0
+AEROBLAST    EQU $B1
+COTTON_SPORE EQU $B2
+REVERSAL     EQU $B3
+SPITE        EQU $B4
+POWDER_SNOW  EQU $B5
+PROTECT      EQU $B6
+MACH_PUNCH   EQU $B7
+SCARY_FACE   EQU $B8
+FAINT_ATTACK EQU $B9
+SWEET_KISS   EQU $BA
+BELLY_DRUM   EQU $BB
+SLUDGE_BOMB  EQU $BC
+MUD_SLAP     EQU $BD
+OCTAZOOKA    EQU $BE
+SPIKES       EQU $BF
+ZAP_CANNON   EQU $C0
+FORESIGHT    EQU $C1
+DESTINY_BOND EQU $C2
+PERISH_SONG  EQU $C3
+ICY_WIND     EQU $C4
+DETECT       EQU $C5
+BONE_RUSH    EQU $C6
+LOCK_ON      EQU $C7
+OUTRAGE      EQU $C8
+SANDSTORM    EQU $C9
+GIGA_DRAIN   EQU $CA
+ENDURE       EQU $CB
+CHARM        EQU $CC
+ROLLOUT      EQU $CD
+FALSE_SWIPE  EQU $CE
+SWAGGER      EQU $CF
+MILK_DRINK   EQU $D0
+SPARK        EQU $D1
+FURY_CUTTER  EQU $D2
+STEEL_WING   EQU $D3
+MEAN_LOOK    EQU $D4
+ATTRACT      EQU $D5
+SLEEP_TALK   EQU $D6
+HEAL_BELL    EQU $D7
+RETURN       EQU $D8
+PRESENT      EQU $D9
+FRUSTRATION  EQU $DA
+SAFEGUARD    EQU $DB
+PAIN_SPLIT   EQU $DC
+SACRED_FIRE  EQU $DD
+MAGNITUDE    EQU $DE
+DYNAMICPUNCH EQU $DF
+MEGAHORN     EQU $E0
+DRAGONBREATH EQU $E1
+BATON_PASS   EQU $E2
+ENCORE       EQU $E3
+PURSUIT      EQU $E4
+RAPID_SPIN   EQU $E5
+SWEET_SCENT  EQU $E6
+IRON_TAIL    EQU $E7
+METAL_CLAW   EQU $E8
+VITAL_THROW  EQU $E9
+MORNING_SUN  EQU $EA
+SYNTHESIS    EQU $EB
+MOONLIGHT    EQU $EC
+HIDDEN_POWER EQU $ED
+CROSS_CHOP   EQU $EE
+TWISTER      EQU $EF
+RAIN_DANCE   EQU $F0
+SUNNY_DAY    EQU $F1
+CRUNCH       EQU $F2
+MIRROR_COAT  EQU $F3
+PSYCH_UP     EQU $F4
+EXTREMESPEED EQU $F5
+ANCIENTPOWER EQU $F6
+SHADOW_BALL  EQU $F7
+FUTURE_SIGHT EQU $F8
+ROCK_SMASH   EQU $F9
+WHIRLPOOL    EQU $FA
+BEAT_UP      EQU $FB
--- /dev/null
+++ b/constants/music_constants.asm
@@ -1,0 +1,381 @@
+; music
+MUSIC_NONE EQU 0
+MUSIC_TITLE EQU 1
+MUSIC_ROUTE_1 EQU 2
+MUSIC_ROUTE_3 EQU 3
+MUSIC_ROUTE_12 EQU 4
+MUSIC_MAGNET_TRAIN EQU 5
+MUSIC_KANTO_GYM_LEADER_BATTLE EQU 6
+MUSIC_KANTO_TRAINER_BATTLE EQU 7
+MUSIC_KANTO_WILD_BATTLE EQU 8
+MUSIC_POKEMON_CENTER EQU 9
+MUSIC_HIKER_ENCOUNTER EQU 10
+MUSIC_LASS_ENCOUNTER EQU 11
+MUSIC_OFFICER_ENCOUNTER EQU 12
+MUSIC_HEAL EQU 13
+MUSIC_LAVENDER_TOWN EQU 14
+MUSIC_ROUTE_2 EQU 15
+MUSIC_MT_MOON EQU 16
+MUSIC_SHOW_ME_AROUND EQU 17
+MUSIC_GAME_CORNER EQU 18
+MUSIC_BICYCLE EQU 19
+MUSIC_HALL_OF_FAME EQU 20
+MUSIC_VIRIDIAN_CITY EQU 21
+MUSIC_CELADON_CITY EQU 22
+MUSIC_TRAINER_VICTORY EQU 23
+MUSIC_WILD_VICTORY EQU 24
+MUSIC_GYM_VICTORY EQU 25
+MUSIC_MT_MOON_SQUARE EQU 26
+MUSIC_GYM EQU 27
+MUSIC_PALLET_TOWN EQU 28
+MUSIC_POKEMON_TALK EQU 29
+MUSIC_PROF_OAK EQU 30
+MUSIC_RIVAL_ENCOUNTER EQU 31
+MUSIC_RIVAL_AFTER EQU 32
+MUSIC_SURF EQU 33
+MUSIC_EVOLUTION EQU 34
+MUSIC_NATIONAL_PARK EQU 35
+MUSIC_CREDITS EQU 36
+MUSIC_AZALEA_TOWN EQU 37
+MUSIC_CHERRYGROVE_CITY EQU 38
+MUSIC_KIMONO_ENCOUNTER EQU 39
+MUSIC_UNION_CAVE EQU 40
+MUSIC_JOHTO_WILD_BATTLE EQU 41
+MUSIC_JOHTO_TRAINER_BATTLE EQU 42
+MUSIC_ROUTE_30 EQU 43
+MUSIC_ECRUTEAK_CITY EQU 44
+MUSIC_VIOLET_CITY EQU 45
+MUSIC_JOHTO_GYM_LEADER_BATTLE EQU 46
+MUSIC_CHAMPION_BATTLE EQU 47
+MUSIC_RIVAL_BATTLE EQU 48
+MUSIC_ROCKET_BATTLE EQU 49
+MUSIC_PROF_ELM EQU 50
+MUSIC_DARK_CAVE EQU 51
+MUSIC_ROUTE_29 EQU 52
+MUSIC_ROUTE_36 EQU 53
+MUSIC_SS_AQUA EQU 54
+MUSIC_YOUNGSTER_ENCOUNTER EQU 55
+MUSIC_BEAUTY_ENCOUNTER EQU 56
+MUSIC_ROCKET_ENCOUNTER EQU 57
+MUSIC_POKEMANIAC_ENCOUNTER EQU 58
+MUSIC_SAGE_ENCOUNTER EQU 59
+MUSIC_NEW_BARK_TOWN EQU 60
+MUSIC_GOLDENROD_CITY EQU 61
+MUSIC_VERMILION_CITY EQU 62
+MUSIC_POKEMON_CHANNEL EQU 63
+MUSIC_POKE_FLUTE_CHANNEL EQU 64
+MUSIC_TIN_TOWER EQU 65
+MUSIC_SPROUT_TOWER EQU 66
+MUSIC_BURNED_TOWER EQU 67
+MUSIC_LIGHTHOUSE EQU 68
+MUSIC_LAKE_OF_RAGE EQU 69
+MUSIC_INDIGO_PLATEAU EQU 70
+MUSIC_ROUTE_37 EQU 71
+MUSIC_ROCKET_HIDEOUT EQU 72
+MUSIC_DRAGONS_DEN EQU 73
+MUSIC_JOHTO_WILD_BATTLE_NIGHT EQU 74
+MUSIC_RUINS_OF_ALPH_RADIO EQU 75
+MUSIC_CAPTURE EQU 76
+MUSIC_ROUTE_26 EQU 77
+MUSIC_MOM EQU 78
+MUSIC_VICTORY_ROAD EQU 79
+MUSIC_POKEMON_LULLABY EQU 80
+MUSIC_POKEMON_MARCH EQU 81
+MUSIC_GS_OPENING EQU 82
+MUSIC_GS_OPENING_2 EQU 83
+MUSIC_MAIN_MENU EQU 84
+MUSIC_RUINS_OF_ALPH_INTERIOR EQU 85
+MUSIC_ROCKET_OVERTURE EQU 86
+MUSIC_DANCING_HALL EQU 87
+MUSIC_BUG_CATCHING_CONTEST_RANKING EQU 88
+MUSIC_BUG_CATCHING_CONTEST EQU 89
+MUSIC_LAKE_OF_RAGE_ROCKET_RADIO EQU 90
+MUSIC_PRINTER EQU 91
+MUSIC_POST_CREDITS EQU 92
+MUSIC_CLAIR EQU 93
+MUSIC_MOBILE_ADAPTER_MENU EQU 94
+MUSIC_MOBILE_ADAPTER EQU 95
+MUSIC_BUENAS_PASSWORD EQU 96
+MUSIC_MYSTICALMAN_ENCOUNTER EQU 97
+MUSIC_CRYSTAL_OPENING EQU 98
+MUSIC_BATTLE_TOWER_THEME EQU 99
+MUSIC_SUICUNE_BATTLE EQU 100
+MUSIC_BATTLE_TOWER_LOBBY EQU 101
+MUSIC_MOBILE_CENTER EQU 102
+
+MUSIC_MAHOGANY_MART EQU 100 ; grandfathered from gold
+
+
+; sfx
+SFX_DEX_FANFARE_50_79           EQU $00
+SFX_ITEM                        EQU $01
+SFX_CAUGHT_MON                  EQU $02
+SFX_POKEBALLS_PLACED_ON_TABLE   EQU $03
+SFX_POTION                      EQU $04
+SFX_FULL_HEAL                   EQU $05
+SFX_MENU                        EQU $06
+SFX_READ_TEXT                   EQU $07
+SFX_READ_TEXT_2                 EQU $08
+SFX_DEX_FANFARE_20_49           EQU $09
+SFX_DEX_FANFARE_80_109          EQU $0a
+SFX_POISON                      EQU $0b
+SFX_GOT_SAFARI_BALLS            EQU $0c
+SFX_BOOT_PC                     EQU $0d
+SFX_SHUT_DOWN_PC                EQU $0e
+SFX_CHOOSE_PC_OPTION            EQU $0f
+SFX_ESCAPE_ROPE                 EQU $10
+SFX_PUSH_BUTTON                 EQU $11
+SFX_SECOND_PART_OF_ITEMFINDER   EQU $12
+SFX_WARP_TO                     EQU $13
+SFX_WARP_FROM                   EQU $14
+SFX_CHANGE_DEX_MODE             EQU $15
+SFX_JUMP_OVER_LEDGE             EQU $16
+SFX_GRASS_RUSTLE                EQU $17
+SFX_FLY                         EQU $18
+SFX_WRONG                       EQU $19
+SFX_SQUEAK                      EQU $1a
+SFX_STRENGTH                    EQU $1b
+SFX_BOAT                        EQU $1c
+SFX_WALL_OPEN                   EQU $1d
+SFX_PLACE_PUZZLE_PIECE_DOWN     EQU $1e
+SFX_ENTER_DOOR                  EQU $1f
+SFX_SWITCH_POKEMON              EQU $20
+SFX_TALLY                       EQU $21
+SFX_TRANSACTION                 EQU $22
+SFX_EXIT_BUILDING               EQU $23
+SFX_BUMP                        EQU $24
+SFX_SAVE                        EQU $25
+SFX_POKEFLUTE                   EQU $26
+SFX_ELEVATOR_END                EQU $27
+SFX_THROW_BALL                  EQU $28
+SFX_BALL_POOF                   EQU $29
+SFX_UNKNOWN_3A                  EQU $2a
+SFX_RUN                         EQU $2b
+SFX_SLOT_MACHINE_START          EQU $2c
+SFX_FANFARE                     EQU $2d
+SFX_PECK                        EQU $2e
+SFX_KINESIS                     EQU $2f
+SFX_LICK                        EQU $30
+SFX_POUND                       EQU $31
+SFX_MOVE_PUZZLE_PIECE           EQU $32
+SFX_COMET_PUNCH                 EQU $33
+SFX_MEGA_PUNCH                  EQU $34
+SFX_SCRATCH                     EQU $35
+SFX_VICEGRIP                    EQU $36
+SFX_RAZOR_WIND                  EQU $37
+SFX_CUT                         EQU $38
+SFX_WING_ATTACK                 EQU $39
+SFX_WHIRLWIND                   EQU $3a
+SFX_BIND                        EQU $3b
+SFX_VINE_WHIP                   EQU $3c
+SFX_DOUBLE_KICK                 EQU $3d
+SFX_MEGA_KICK                   EQU $3e
+SFX_HEADBUTT                    EQU $3f
+SFX_HORN_ATTACK                 EQU $40
+SFX_TACKLE                      EQU $41
+SFX_POISON_STING                EQU $42
+SFX_POWDER                      EQU $43
+SFX_DOUBLESLAP                  EQU $44
+SFX_BITE                        EQU $45
+SFX_JUMP_KICK                   EQU $46
+SFX_STOMP                       EQU $47
+SFX_TAIL_WHIP                   EQU $48
+SFX_KARATE_CHOP                 EQU $49
+SFX_SUBMISSION                  EQU $4a
+SFX_WATER_GUN                   EQU $4b
+SFX_SWORDS_DANCE                EQU $4c
+SFX_THUNDER                     EQU $4d
+SFX_SUPERSONIC                  EQU $4e
+SFX_LEER                        EQU $4f
+SFX_EMBER                       EQU $50
+SFX_BUBBLEBEAM                  EQU $51
+SFX_HYDRO_PUMP                  EQU $52
+SFX_SURF                        EQU $53
+SFX_PSYBEAM                     EQU $54
+SFX_CHARGE                      EQU $55
+SFX_THUNDERSHOCK                EQU $56
+SFX_PSYCHIC                     EQU $57
+SFX_SCREECH                     EQU $58
+SFX_BONE_CLUB                   EQU $59
+SFX_SHARPEN                     EQU $5a
+SFX_EGG_BOMB                    EQU $5b
+SFX_SING                        EQU $5c
+SFX_HYPER_BEAM                  EQU $5d
+SFX_SHINE                       EQU $5e
+SFX_UNKNOWN_5F                  EQU $5f
+SFX_UNKNOWN_60                  EQU $60
+SFX_UNKNOWN_61                  EQU $61
+SFX_UNKNOWN_62                  EQU $62
+SFX_UNKNOWN_63                  EQU $63
+SFX_BURN                        EQU $64
+SFX_TITLE_SCREEN_ENTRANCE       EQU $65
+SFX_UNKNOWN_66                  EQU $66
+SFX_GET_COIN_FROM_SLOTS         EQU $67
+SFX_PAY_DAY                     EQU $68
+SFX_METRONOME                   EQU $69
+SFX_CALL                        EQU $6a
+SFX_HANG_UP                     EQU $6b
+SFX_NO_SIGNAL                   EQU $6c
+SFX_SANDSTORM                   EQU $6d
+SFX_ELEVATOR                    EQU $6e
+SFX_PROTECT                     EQU $6f
+SFX_SKETCH                      EQU $70
+SFX_RAIN_DANCE                  EQU $71
+SFX_AEROBLAST                   EQU $72
+SFX_SPARK                       EQU $73
+SFX_CURSE                       EQU $74
+SFX_RAGE                        EQU $75
+SFX_THIEF                       EQU $76
+SFX_THIEF_2                     EQU $77
+SFX_SPIDER_WEB                  EQU $78
+SFX_MIND_READER                 EQU $79
+SFX_NIGHTMARE                   EQU $7a
+SFX_SNORE                       EQU $7b
+SFX_SWEET_KISS                  EQU $7c
+SFX_SWEET_KISS_2                EQU $7d
+SFX_BELLY_DRUM                  EQU $7e
+SFX_UNKNOWN_7F                  EQU $7f
+SFX_SLUDGE_BOMB                 EQU $80
+SFX_FORESIGHT                   EQU $81
+SFX_SPITE                       EQU $82
+SFX_OUTRAGE                     EQU $83
+SFX_PERISH_SONG                 EQU $84
+SFX_GIGA_DRAIN                  EQU $85
+SFX_ATTRACT                     EQU $86
+SFX_KINESIS_2                   EQU $87
+SFX_ZAP_CANNON                  EQU $88
+SFX_MEAN_LOOK                   EQU $89
+SFX_HEAL_BELL                   EQU $8a
+SFX_RETURN                      EQU $8b
+SFX_EXP_BAR                     EQU $8c
+SFX_MILK_DRINK                  EQU $8d
+SFX_PRESENT                     EQU $8e
+SFX_MORNING_SUN                 EQU $8f
+SFX_LEVEL_UP                    EQU $90
+SFX_KEY_ITEM                    EQU $91
+SFX_FANFARE_2                   EQU $92
+SFX_REGISTER_PHONE_#            EQU $93
+SFX_3RD_PLACE                   EQU $94
+SFX_GET_EGG_FROM_DAYCARE_MAN    EQU $95
+SFX_GET_EGG_FROM_DAYCARE_LADY   EQU $96
+SFX_MOVE_DELETED                EQU $97
+SFX_2ND_PLACE                   EQU $98
+SFX_1ST_PLACE                   EQU $99
+SFX_CHOOSE_A_CARD               EQU $9a
+SFX_GET_TM                      EQU $9b
+SFX_GET_BADGE                   EQU $9c
+SFX_QUIT_SLOTS                  EQU $9d
+SFX_EGG_CRACK                   EQU $9e
+SFX_DEX_FANFARE_LESS_THAN_20    EQU $9f
+SFX_DEX_FANFARE_140_169         EQU $a0
+SFX_DEX_FANFARE_170_199         EQU $a1
+SFX_DEX_FANFARE_200_229         EQU $a2
+SFX_DEX_FANFARE_230_PLUS        EQU $a3
+SFX_EVOLVED                     EQU $a4
+SFX_MASTER_BALL                 EQU $a5
+SFX_EGG_HATCH                   EQU $a6
+SFX_GS_INTRO_CHARIZARD_FIREBALL EQU $a7
+SFX_GS_INTRO_POKEMON_APPEARS    EQU $a8
+SFX_FLASH                       EQU $a9
+SFX_GAME_FREAK_LOGO_GS          EQU $aa
+SFX_NOT_VERY_EFFECTIVE          EQU $ab
+SFX_DAMAGE                      EQU $ac
+SFX_SUPER_EFFECTIVE             EQU $ad
+SFX_BALL_BOUNCE                 EQU $ae
+SFX_MOONLIGHT                   EQU $af
+SFX_ENCORE                      EQU $b0
+SFX_BEAT_UP                     EQU $b1
+SFX_BATON_PASS                  EQU $b2
+SFX_BALL_WIGGLE                 EQU $b3
+SFX_SWEET_SCENT                 EQU $b4
+SFX_SWEET_SCENT_2               EQU $b5
+SFX_HIT_END_OF_EXP_BAR          EQU $b6
+SFX_GIVE_TRADEMON               EQU $b7
+SFX_GET_TRADEMON                EQU $b8
+SFX_TRAIN_ARRIVED               EQU $b9
+SFX_STOP_SLOT                   EQU $ba
+SFX_2_BOOPS                     EQU $bb
+SFX_GLASS_TING                  EQU $bc
+SFX_GLASS_TING_2                EQU $bd
+SFX_INTRO_UNOWN_1               EQU $be
+SFX_INTRO_UNOWN_2               EQU $bf
+SFX_INTRO_UNOWN_3               EQU $c0
+SFX_DITTO_POP_UP                EQU $c1
+SFX_DITTO_TRANSFORM             EQU $c2
+SFX_INTRO_SUICUNE_1             EQU $c3
+SFX_INTRO_PICHU                 EQU $c4
+SFX_INTRO_SUICUNE_2             EQU $c5
+SFX_INTRO_SUICUNE_3             EQU $c6
+SFX_DITTO_BOUNCE                EQU $c7
+SFX_INTRO_SUICUNE_4             EQU $c8
+SFX_GAME_FREAK_PRESENTS         EQU $c9
+SFX_TINGLE                      EQU $ca
+SFX_UNKNOWN_CB                  EQU $cb
+SFX_TWO_PC_BEEPS                EQU $cc
+SFX_4_NOTE_DITTY                EQU $cd
+SFX_TWINKLE                     EQU $ce
+
+
+; header channels
+_4CH1 EQU $c0
+_3CH1 EQU $80
+_2CH1 EQU $40
+_1CH1 EQU $00
+_3CH2 EQU $81
+_2CH2 EQU $41
+_1CH2 EQU $01
+_2CH3 EQU $42
+_1CH3 EQU $02
+_1CH4 EQU $03
+
+_4CH5 EQU $c4
+_3CH5 EQU $84
+_2CH5 EQU $44
+_1CH5 EQU $04
+_3CH6 EQU $85
+_2CH6 EQU $45
+_1CH6 EQU $05
+_2CH7 EQU $46
+_1CH7 EQU $06
+_1CH8 EQU $07
+
+_CH2 EQU $01
+_CH3 EQU $02
+_CH4 EQU $03
+_CH5 EQU $04
+_CH6 EQU $05
+_CH7 EQU $06
+_CH8 EQU $07
+
+; note pitch
+NOTE_RST EQU $00
+NOTE_C EQU $10
+NOTE_C# EQU $20
+NOTE_D EQU $30
+NOTE_D# EQU $40
+NOTE_E EQU $50
+NOTE_F EQU $60
+NOTE_F# EQU $70
+NOTE_G EQU $80
+NOTE_G# EQU $90
+NOTE_A EQU $a0
+NOTE_A# EQU $b0
+NOTE_B EQU $c0
+
+; note duration (16ths)
+NOTE_1 EQU $00
+NOTE_2 EQU $01
+NOTE_3 EQU $02
+NOTE_4 EQU $03
+NOTE_5 EQU $04
+NOTE_6 EQU $05
+NOTE_7 EQU $06
+NOTE_8 EQU $07
+NOTE_9 EQU $08
+NOTE_10 EQU $09
+NOTE_11 EQU $0a
+NOTE_12 EQU $0b
+NOTE_13 EQU $0c
+NOTE_14 EQU $0d
+NOTE_15 EQU $0e
+NOTE_16 EQU $0f
--- /dev/null
+++ b/constants/pokemon_constants.asm
@@ -1,0 +1,253 @@
+BULBASAUR  EQU 1
+IVYSAUR    EQU 2
+VENUSAUR   EQU 3
+CHARMANDER EQU 4
+CHARMELEON EQU 5
+CHARIZARD  EQU 6
+SQUIRTLE   EQU 7
+WARTORTLE  EQU 8
+BLASTOISE  EQU 9
+CATERPIE   EQU 10
+METAPOD    EQU 11
+BUTTERFREE EQU 12
+WEEDLE     EQU 13
+KAKUNA     EQU 14
+BEEDRILL   EQU 15
+PIDGEY     EQU 16
+PIDGEOTTO  EQU 17
+PIDGEOT    EQU 18
+RATTATA    EQU 19
+RATICATE   EQU 20
+SPEAROW    EQU 21
+FEAROW     EQU 22
+EKANS      EQU 23
+ARBOK      EQU 24
+PIKACHU    EQU 25
+RAICHU     EQU 26
+SANDSHREW  EQU 27
+SANDSLASH  EQU 28
+NIDORAN_F  EQU 29
+NIDORINA   EQU 30
+NIDOQUEEN  EQU 31
+NIDORAN_M  EQU 32
+NIDORINO   EQU 33
+NIDOKING   EQU 34
+CLEFAIRY   EQU 35
+CLEFABLE   EQU 36
+VULPIX     EQU 37
+NINETALES  EQU 38
+JIGGLYPUFF EQU 39
+WIGGLYTUFF EQU 40
+ZUBAT      EQU 41
+GOLBAT     EQU 42
+ODDISH     EQU 43
+GLOOM      EQU 44
+VILEPLUME  EQU 45
+PARAS      EQU 46
+PARASECT   EQU 47
+VENONAT    EQU 48
+VENOMOTH   EQU 49
+DIGLETT    EQU 50
+DUGTRIO    EQU 51
+MEOWTH     EQU 52
+PERSIAN    EQU 53
+PSYDUCK    EQU 54
+GOLDUCK    EQU 55
+MANKEY     EQU 56
+PRIMEAPE   EQU 57
+GROWLITHE  EQU 58
+ARCANINE   EQU 59
+POLIWAG    EQU 60
+POLIWHIRL  EQU 61
+POLIWRATH  EQU 62
+ABRA       EQU 63
+KADABRA    EQU 64
+ALAKAZAM   EQU 65
+MACHOP     EQU 66
+MACHOKE    EQU 67
+MACHAMP    EQU 68
+BELLSPROUT EQU 69
+WEEPINBELL EQU 70
+VICTREEBEL EQU 71
+TENTACOOL  EQU 72
+TENTACRUEL EQU 73
+GEODUDE    EQU 74
+GRAVELER   EQU 75
+GOLEM      EQU 76
+PONYTA     EQU 77
+RAPIDASH   EQU 78
+SLOWPOKE   EQU 79
+SLOWBRO    EQU 80
+MAGNEMITE  EQU 81
+MAGNETON   EQU 82
+FARFETCH_D EQU 83
+DODUO      EQU 84
+DODRIO     EQU 85
+SEEL       EQU 86
+DEWGONG    EQU 87
+GRIMER     EQU 88
+MUK        EQU 89
+SHELLDER   EQU 90
+CLOYSTER   EQU 91
+GASTLY     EQU 92
+HAUNTER    EQU 93
+GENGAR     EQU 94
+ONIX       EQU 95
+DROWZEE    EQU 96
+HYPNO      EQU 97
+KRABBY     EQU 98
+KINGLER    EQU 99
+VOLTORB    EQU 100
+ELECTRODE  EQU 101
+EXEGGCUTE  EQU 102
+EXEGGUTOR  EQU 103
+CUBONE     EQU 104
+MAROWAK    EQU 105
+HITMONLEE  EQU 106
+HITMONCHAN EQU 107
+LICKITUNG  EQU 108
+KOFFING    EQU 109
+WEEZING    EQU 110
+RHYHORN    EQU 111
+RHYDON     EQU 112
+CHANSEY    EQU 113
+TANGELA    EQU 114
+KANGASKHAN EQU 115
+HORSEA     EQU 116
+SEADRA     EQU 117
+GOLDEEN    EQU 118
+SEAKING    EQU 119
+STARYU     EQU 120
+STARMIE    EQU 121
+MR__MIME   EQU 122
+SCYTHER    EQU 123
+JYNX       EQU 124
+ELECTABUZZ EQU 125
+MAGMAR     EQU 126
+PINSIR     EQU 127
+TAUROS     EQU 128
+MAGIKARP   EQU 129
+GYARADOS   EQU 130
+LAPRAS     EQU 131
+DITTO      EQU 132
+EEVEE      EQU 133
+VAPOREON   EQU 134
+JOLTEON    EQU 135
+FLAREON    EQU 136
+PORYGON    EQU 137
+OMANYTE    EQU 138
+OMASTAR    EQU 139
+KABUTO     EQU 140
+KABUTOPS   EQU 141
+AERODACTYL EQU 142
+SNORLAX    EQU 143
+ARTICUNO   EQU 144
+ZAPDOS     EQU 145
+MOLTRES    EQU 146
+DRATINI    EQU 147
+DRAGONAIR  EQU 148
+DRAGONITE  EQU 149
+MEWTWO     EQU 150
+MEW        EQU 151
+CHIKORITA  EQU 152
+BAYLEEF    EQU 153
+MEGANIUM   EQU 154
+CYNDAQUIL  EQU 155
+QUILAVA    EQU 156
+TYPHLOSION EQU 157
+TOTODILE   EQU 158
+CROCONAW   EQU 159
+FERALIGATR EQU 160
+SENTRET    EQU 161
+FURRET     EQU 162
+HOOTHOOT   EQU 163
+NOCTOWL    EQU 164
+LEDYBA     EQU 165
+LEDIAN     EQU 166
+SPINARAK   EQU 167
+ARIADOS    EQU 168
+CROBAT     EQU 169
+CHINCHOU   EQU 170
+LANTURN    EQU 171
+PICHU      EQU 172
+CLEFFA     EQU 173
+IGGLYBUFF  EQU 174
+TOGEPI     EQU 175
+TOGETIC    EQU 176
+NATU       EQU 177
+XATU       EQU 178
+MAREEP     EQU 179
+FLAAFFY    EQU 180
+AMPHAROS   EQU 181
+BELLOSSOM  EQU 182
+MARILL     EQU 183
+AZUMARILL  EQU 184
+SUDOWOODO  EQU 185
+POLITOED   EQU 186
+HOPPIP     EQU 187
+SKIPLOOM   EQU 188
+JUMPLUFF   EQU 189
+AIPOM      EQU 190
+SUNKERN    EQU 191
+SUNFLORA   EQU 192
+YANMA      EQU 193
+WOOPER     EQU 194
+QUAGSIRE   EQU 195
+ESPEON     EQU 196
+UMBREON    EQU 197
+MURKROW    EQU 198
+SLOWKING   EQU 199
+MISDREAVUS EQU 200
+UNOWN      EQU 201
+WOBBUFFET  EQU 202
+GIRAFARIG  EQU 203
+PINECO     EQU 204
+FORRETRESS EQU 205
+DUNSPARCE  EQU 206
+GLIGAR     EQU 207
+STEELIX    EQU 208
+SNUBBULL   EQU 209
+GRANBULL   EQU 210
+QWILFISH   EQU 211
+SCIZOR     EQU 212
+SHUCKLE    EQU 213
+HERACROSS  EQU 214
+SNEASEL    EQU 215
+TEDDIURSA  EQU 216
+URSARING   EQU 217
+SLUGMA     EQU 218
+MAGCARGO   EQU 219
+SWINUB     EQU 220
+PILOSWINE  EQU 221
+CORSOLA    EQU 222
+REMORAID   EQU 223
+OCTILLERY  EQU 224
+DELIBIRD   EQU 225
+MANTINE    EQU 226
+SKARMORY   EQU 227
+HOUNDOUR   EQU 228
+HOUNDOOM   EQU 229
+KINGDRA    EQU 230
+PHANPY     EQU 231
+DONPHAN    EQU 232
+PORYGON2   EQU 233
+STANTLER   EQU 234
+SMEARGLE   EQU 235
+TYROGUE    EQU 236
+HITMONTOP  EQU 237
+SMOOCHUM   EQU 238
+ELEKID     EQU 239
+MAGBY      EQU 240
+MILTANK    EQU 241
+BLISSEY    EQU 242
+RAIKOU     EQU 243
+ENTEI      EQU 244
+SUICUNE    EQU 245
+LARVITAR   EQU 246
+PUPITAR    EQU 247
+TYRANITAR  EQU 248
+LUGIA      EQU 249
+HO_OH      EQU 250
+CELEBI     EQU 251
+
+EGG        EQU 253
--- /dev/null
+++ b/constants/script_constants.asm
@@ -1,0 +1,42 @@
+; specials
+NUM_SPECIALS EQU $a8
+
+SPECIAL_UPDATESPRITETILES EQU $0038
+
+SPECIAL_WAITSFX           EQU $003b
+SPECIAL_BIKESURFMUSIC     EQU $003c
+
+SPECIAL_LOADFACESTEP      EQU $003f
+
+SPECIAL_GIVESHUCKLE       EQU $004b
+
+SPECIAL_SNORLAXAWAKE      EQU $0060
+
+SPECIAL_GAMEBOYCHECK      EQU $0066
+SPECIAL_TRAINERHOUSE      EQU $0067
+
+SPECIAL_RUSTLETREE        EQU $006a
+
+SPECIAL_ODDEGG            EQU $007d
+
+SPECIAL_MOVETUTOR         EQU $0083
+SPECIAL_OMANYTECHAMBER    EQU $0084
+
+SPECIAL_RUINCHAMBERWALL   EQU $0087
+
+SPECIAL_HOOHCHAMBER       EQU $008d
+
+SPECIAL_CELEBI            EQU $008f
+
+SPECIAL_AFTERCELEBI       EQU $0090
+SPECIAL_POKESEER          EQU $0091
+
+SPECIAL_DRATINI           EQU $0094
+
+SPECIAL_BEASTSCHECK       EQU $0096
+SPECIAL_MONCHECK          EQU $0097
+
+
+; script vars
+NUM_VARS EQU $1b
+VAR_MOVEMENT EQU $08
--- /dev/null
+++ b/constants/trainer_constants.asm
@@ -1,0 +1,623 @@
+; trainer groups
+FALKNER      EQU $01
+WHITNEY      EQU $02
+BUGSY        EQU $03
+MORTY        EQU $04
+PRYCE        EQU $05
+JASMINE      EQU $06
+CHUCK        EQU $07
+CLAIR        EQU $08
+RIVAL1       EQU $09
+POKEMON_PROF EQU $0A
+WILL         EQU $0B
+CAL          EQU $0C
+BRUNO        EQU $0D
+KAREN        EQU $0E
+KOGA         EQU $0F
+CHAMPION     EQU $10
+BROCK        EQU $11
+MISTY        EQU $12
+LT_SURGE     EQU $13
+SCIENTIST    EQU $14
+ERIKA        EQU $15
+YOUNGSTER    EQU $16
+SCHOOLBOY    EQU $17
+BIRD_KEEPER  EQU $18
+LASS         EQU $19
+JANINE       EQU $1A
+COOLTRAINERM EQU $1B
+COOLTRAINERF EQU $1C
+BEAUTY       EQU $1D
+POKEMANIAC   EQU $1E
+GRUNTM       EQU $1F
+GENTLEMAN    EQU $20
+SKIER        EQU $21
+TEACHER      EQU $22
+SABRINA      EQU $23
+BUG_CATCHER  EQU $24
+FISHER       EQU $25
+SWIMMERM     EQU $26
+SWIMMERF     EQU $27
+SAILOR       EQU $28
+SUPER_NERD   EQU $29
+RIVAL2       EQU $2A
+GUITARIST    EQU $2B
+HIKER        EQU $2C
+BIKER        EQU $2D
+BLAINE       EQU $2E
+BURGLAR      EQU $2F
+FIREBREATHER EQU $30
+JUGGLER      EQU $31
+BLACKBELT_T  EQU $32
+EXECUTIVEM   EQU $33
+PSYCHIC_T    EQU $34
+PICNICKER    EQU $35
+CAMPER       EQU $36
+EXECUTIVEF   EQU $37
+SAGE         EQU $38
+MEDIUM       EQU $39
+BOARDER      EQU $3A
+POKEFANM     EQU $3B
+KIMONO_GIRL  EQU $3C
+TWINS        EQU $3D
+POKEFANF     EQU $3E
+RED          EQU $3F
+BLUE         EQU $40
+OFFICER      EQU $41
+GRUNTF       EQU $42
+MYSTICALMAN  EQU $43
+
+; Rival1
+RIVAL1_1 EQU $01
+RIVAL1_2 EQU $02
+RIVAL1_3 EQU $03
+RIVAL1_4 EQU $04
+RIVAL1_5 EQU $05
+RIVAL1_6 EQU $06
+RIVAL1_7 EQU $07
+RIVAL1_8 EQU $08
+RIVAL1_9 EQU $09
+RIVAL1_10 EQU $0a
+RIVAL1_11 EQU $0b
+RIVAL1_12 EQU $0c
+RIVAL1_13 EQU $0d
+RIVAL1_14 EQU $0e
+RIVAL1_15 EQU $0f
+
+; PokemonProf
+; no trainers
+
+; SpecialPKMN1
+CAL1 EQU $01
+CAL2 EQU $02
+CAL3 EQU $03
+
+; Champion
+LANCE EQU $01
+
+; Scientist
+ROSS EQU $01
+MITCH EQU $02
+JED EQU $03
+MARC EQU $04
+RICH EQU $05
+
+; Youngster
+JOEY1 EQU $01
+MIKEY EQU $02
+ALBERT EQU $03
+GORDON EQU $04
+SAMUEL EQU $05
+IAN EQU $06
+JOEY2 EQU $07
+JOEY3 EQU $08
+WARREN EQU $09
+JIMMY EQU $0a
+OWEN EQU $0b
+JASON EQU $0c
+JOEY4 EQU $0d
+JOEY5 EQU $0e
+
+; Schoolboy
+JACK1 EQU $01
+KIPP EQU $02
+ALAN1 EQU $03
+JOHNNY EQU $04
+DANNY EQU $05
+TOMMY EQU $06
+DUDLEY EQU $07
+JOE EQU $08
+BILLY EQU $09
+CHAD1 EQU $0a
+NATE EQU $0b
+RICKY EQU $0c
+JACK2 EQU $0d
+JACK3 EQU $0e
+ALAN2 EQU $0f
+ALAN3 EQU $10
+CHAD2 EQU $11
+CHAD3 EQU $12
+JACK4 EQU $13
+JACK5 EQU $14
+ALAN4 EQU $15
+ALAN5 EQU $16
+CHAD4 EQU $17
+CHAD5 EQU $18
+
+; BirdKeeper
+ROD EQU $01
+ABE EQU $02
+BRYAN EQU $03
+THEO EQU $04
+TOBY EQU $05
+DENIS EQU $06
+VANCE1 EQU $07
+HANK EQU $08
+ROY EQU $09
+BORIS EQU $0a
+BOB EQU $0b
+JOSE1 EQU $0c
+PETER EQU $0d
+JOSE2 EQU $0e
+PERRY EQU $0f
+BRET EQU $10
+JOSE3 EQU $11
+VANCE2 EQU $12
+VANCE3 EQU $13
+
+; Lass
+CARRIE EQU $01
+BRIDGET EQU $02
+ALICE EQU $03
+KRISE EQU $04
+CONNIE1 EQU $05
+LINDA EQU $06
+LAURA EQU $07
+SHANNON EQU $08
+MICHELLE EQU $09
+DANA1 EQU $0a
+ELLEN EQU $0b
+CONNIE2 EQU $0c
+CONNIE3 EQU $0d
+DANA2 EQU $0e
+DANA3 EQU $0f
+DANA4 EQU $10
+DANA5 EQU $11
+
+; CooltrainerM
+NICK EQU $01
+AARON EQU $02
+PAUL EQU $03
+CODY EQU $04
+MIKE EQU $05
+GAVEN1 EQU $06
+GAVEN2 EQU $07
+RYAN EQU $08
+JAKE EQU $09
+GAVEN3 EQU $0a
+BLAKE EQU $0b
+BRIAN EQU $0c
+ERICK EQU $0d
+ANDY EQU $0e
+TYLER EQU $0f
+SEAN EQU $10
+KEVIN EQU $11
+STEVE EQU $12
+ALLEN EQU $13
+DARIN EQU $14
+
+; CooltrainerF
+GWEN EQU $01
+LOIS EQU $02
+FRAN EQU $03
+LOLA EQU $04
+KATE EQU $05
+IRENE EQU $06
+KELLY EQU $07
+JOYCE EQU $08
+BETH1 EQU $09
+REENA1 EQU $0a
+MEGAN EQU $0b
+BETH2 EQU $0c
+CAROL EQU $0d
+QUINN EQU $0e
+EMMA EQU $0f
+CYBIL EQU $10
+JENN EQU $11
+BETH3 EQU $12
+REENA2 EQU $13
+REENA3 EQU $14
+CARA EQU $15
+
+; Beauty
+VICTORIA EQU $01
+SAMANTHA EQU $02
+JULIE EQU $03
+JACLYN EQU $04
+BRENDA EQU $05
+CASSIE EQU $06
+CAROLINE EQU $07
+CARLENE EQU $08
+JESSICA EQU $09
+RACHAEL EQU $0a
+ANGELICA EQU $0b
+KENDRA EQU $0c
+VERONICA EQU $0d
+JULIA EQU $0e
+THERESA EQU $0f
+VALERIE EQU $10
+OLIVIA EQU $11
+
+; Pokemaniac
+LARRY EQU $01
+ANDREW EQU $02
+CALVIN EQU $03
+SHANE EQU $04
+BEN EQU $05
+BRENT1 EQU $06
+RON EQU $07
+ETHAN EQU $08
+BRENT2 EQU $09
+BRENT3 EQU $0a
+ISSAC EQU $0b
+DONALD EQU $0c
+ZACH EQU $0d
+BRENT4 EQU $0e
+MILLER EQU $0f
+
+; Gentleman
+PRESTON EQU $01
+EDWARD EQU $02
+GREGORY EQU $03
+VIRGIL EQU $04
+ALFRED EQU $05
+
+; Skier
+ROXANNE EQU $01
+CLARISSA EQU $02
+
+; Teacher
+COLETTE EQU $01
+HILLARY EQU $02
+SHIRLEY EQU $03
+
+; BugCatcher
+DON EQU $01
+ROB EQU $02
+ED EQU $03
+WADE1 EQU $04
+BUG_CATCHER_BENNY EQU $05
+AL EQU $06
+JOSH EQU $07
+ARNIE1 EQU $08
+KEN EQU $09
+WADE2 EQU $0a
+WADE3 EQU $0b
+DOUG EQU $0c
+ARNIE2 EQU $0d
+ARNIE3 EQU $0e
+WADE4 EQU $0f
+WADE5 EQU $10
+ARNIE4 EQU $11
+ARNIE5 EQU $12
+WAYNE EQU $13
+
+; Fisher
+JUSTIN EQU $01
+RALPH1 EQU $02
+ARNOLD EQU $03
+KYLE EQU $04
+HENRY EQU $05
+MARVIN EQU $06
+TULLY1 EQU $07
+ANDRE EQU $08
+RAYMOND EQU $09
+WILTON1 EQU $0a
+EDGAR EQU $0b
+JONAH EQU $0c
+MARTIN EQU $0d
+STEPHEN EQU $0e
+BARNEY EQU $0f
+RALPH2 EQU $10
+RALPH3 EQU $11
+TULLY2 EQU $12
+TULLY3 EQU $13
+WILTON2 EQU $14
+SCOTT EQU $15
+WILTON3 EQU $16
+RALPH4 EQU $17
+RALPH5 EQU $18
+TULLY4 EQU $19
+
+; SwimmerM
+HAROLD EQU $01
+SIMON EQU $02
+RANDALL EQU $03
+CHARLIE EQU $04
+GEORGE EQU $05
+BERKE EQU $06
+KIRK EQU $07
+MATHEW EQU $08
+HAL EQU $09
+PATON EQU $0a
+DARYL EQU $0b
+WALTER EQU $0c
+TONY EQU $0d
+JEROME EQU $0e
+TUCKER EQU $0f
+RICK EQU $10
+CAMERON EQU $11
+SETH EQU $12
+JAMES EQU $13
+LEWIS EQU $14
+PARKER EQU $15
+
+; SwimmerF
+ELAINE EQU $01
+PAULA EQU $02
+KAYLEE EQU $03
+SUSIE EQU $04
+DENISE EQU $05
+KARA EQU $06
+WENDY EQU $07
+LISA EQU $08
+JILL EQU $09
+MARY EQU $0a
+KATIE EQU $0b
+DAWN EQU $0c
+TARA EQU $0d
+NICOLE EQU $0e
+LORI EQU $0f
+JODY EQU $10
+NIKKI EQU $11
+DIANA EQU $12
+BRIANA EQU $13
+
+; Sailor
+EUGENE EQU $01
+HUEY1 EQU $02
+TERRELL EQU $03
+KENT EQU $04
+ERNEST EQU $05
+JEFF EQU $06
+GARRETT EQU $07
+KENNETH EQU $08
+STANLY EQU $09
+HARRY EQU $0a
+HUEY2 EQU $0b
+HUEY3 EQU $0c
+HUEY4 EQU $0d
+
+; SuperNerd
+STAN EQU $01
+ERIC EQU $02
+GREGG EQU $03
+JAY EQU $04
+DAVE EQU $05
+SAM EQU $06
+TOM EQU $07
+PAT EQU $08
+SHAWN EQU $09
+TERU EQU $0a
+RUSS EQU $0b
+NORTON EQU $0c
+HUGH EQU $0d
+MARKUS EQU $0e
+
+; Guitarist
+CLYDE EQU $01
+VINCENT EQU $02
+
+; Hiker
+ANTHONY1 EQU $01
+RUSSELL EQU $02
+PHILLIP EQU $03
+LEONARD EQU $04
+ANTHONY2 EQU $05
+BENJAMIN EQU $06
+ERIK EQU $07
+MICHAEL EQU $08
+PARRY1 EQU $09
+TIMOTHY EQU $0a
+BAILEY EQU $0b
+ANTHONY3 EQU $0c
+TIM EQU $0d
+NOLAND EQU $0e
+SIDNEY EQU $0f
+KENNY EQU $10
+JIM EQU $11
+DANIEL EQU $12
+PARRY2 EQU $13
+PARRY3 EQU $14
+ANTHONY4 EQU $15
+ANTHONY5 EQU $16
+
+; Biker
+BIKER_BENNY EQU $01
+KAZU EQU $02
+DWAYNE EQU $03
+HARRIS EQU $04
+ZEKE EQU $05
+CHARLES EQU $06
+RILEY EQU $07
+JOEL EQU $08
+GLENN EQU $09
+
+; Burglar
+DUNCAN EQU $01
+EDDIE EQU $02
+COREY EQU $03
+
+; Firebreather
+OTIS EQU $01
+DICK EQU $02
+NED EQU $03
+BURT EQU $04
+BILL EQU $05
+WALT EQU $06
+RAY EQU $07
+LYLE EQU $08
+
+; Juggler
+IRWIN1 EQU $01
+FRITZ EQU $02
+HORTON EQU $03
+IRWIN2 EQU $04
+IRWIN3 EQU $05
+IRWIN4 EQU $06
+
+; Blackbelt
+KENJI1 EQU $01
+YOSHI EQU $02
+KENJI2 EQU $03
+LAO EQU $04
+NOB EQU $05
+KIYO EQU $06
+LUNG EQU $07
+KENJI3 EQU $08
+WAI EQU $09
+
+; Psychic
+NATHAN EQU $01
+FRANKLIN EQU $02
+HERMAN EQU $03
+FIDEL EQU $04
+GREG EQU $05
+NORMAN EQU $06
+MARK EQU $07
+PHIL EQU $08
+RICHARD EQU $09
+GILBERT EQU $0a
+JARED EQU $0b
+RODNEY EQU $0c
+
+; Picnicker
+LIZ1 EQU $01
+GINA1 EQU $02
+BROOKE EQU $03
+KIM EQU $04
+CINDY EQU $05
+HOPE EQU $06
+SHARON EQU $07
+DEBRA EQU $08
+GINA2 EQU $09
+ERIN1 EQU $0a
+LIZ2 EQU $0b
+LIZ3 EQU $0c
+HEIDI EQU $0d
+EDNA EQU $0e
+GINA3 EQU $0f
+TIFFANY1 EQU $10
+TIFFANY2 EQU $11
+ERIN2 EQU $12
+TANYA EQU $13
+TIFFANY3 EQU $14
+ERIN3 EQU $15
+LIZ4 EQU $16
+LIZ5 EQU $17
+GINA4 EQU $18
+GINA5 EQU $19
+TIFFANY4 EQU $1a
+
+; Camper
+ROLAND EQU $01
+TODD1 EQU $02
+IVAN EQU $03
+ELLIOT EQU $04
+BARRY EQU $05
+LLOYD EQU $06
+DEAN EQU $07
+SID EQU $08
+HARVEY EQU $09
+DALE EQU $0a
+TED EQU $0b
+TODD2 EQU $0c
+TODD3 EQU $0d
+THOMAS EQU $0e
+LEROY EQU $0f
+DAVID EQU $10
+JOHN EQU $11
+JERRY EQU $12
+SPENCER EQU $13
+TODD4 EQU $14
+TODD5 EQU $15
+QUENTIN EQU $16
+
+; Sage
+CHOW EQU $01
+NICO EQU $02
+JIN EQU $03
+TROY EQU $04
+JEFFREY EQU $05
+PING EQU $06
+EDMOND EQU $07
+NEAL EQU $08
+LI EQU $09
+GAKU EQU $0a
+MASA EQU $0b
+KOJI EQU $0c
+
+; Medium
+MARTHA EQU $01
+GRACE EQU $02
+BETHANY EQU $03
+MARGRET EQU $04
+ETHEL EQU $05
+REBECCA EQU $06
+DORIS EQU $07
+
+; Boarder
+RONALD EQU $01
+BRAD EQU $02
+DOUGLAS EQU $03
+
+; PokefanM
+WILLIAM EQU $01
+DEREK1 EQU $02
+ROBERT EQU $03
+JOSHUA EQU $04
+CARTER EQU $05
+TREVOR EQU $06
+BRANDON EQU $07
+JEREMY EQU $08
+COLIN EQU $09
+DEREK2 EQU $0a
+DEREK3 EQU $0b
+ALEX EQU $0c
+REX EQU $0d
+ALLAN EQU $0e
+
+; KimonoGirl
+NAOKO1 EQU $01
+NAOKO2 EQU $02
+SAYO EQU $03
+ZUKI EQU $04
+KUNI EQU $05
+MIKI EQU $06
+
+; Twins
+AMYANDMAY1 EQU $01
+ANNANDANNE1 EQU $02
+ANNANDANNE2 EQU $03
+AMYANDMAY2 EQU $04
+JOANDZOE1 EQU $05
+JOANDZOE2 EQU $06
+MEGANDPEG1 EQU $07
+MEGANDPEG2 EQU $08
+LEAANDPIA1 EQU $09
+LEAANDPIA2 EQU $0a
+
+; PokefanF
+BEVERLY1 EQU $01
+RUTH EQU $02
+BEVERLY2 EQU $03
+BEVERLY3 EQU $04
+GEORGIA EQU $05
+JAIME EQU $06
+
+; Officer
+KEITH EQU $01
+DIRK EQU $02
+
+; Mysticalman
+EUSINE EQU $01
--- a/credits.asm
+++ /dev/null
@@ -1,824 +1,0 @@
-SATOSHI_TAJIRI       EQU 00
-JUNICHI_MASUDA       EQU 01
-TETSUYA_WATANABE     EQU 02
-SHIGEKI_MORIMOTO     EQU 03
-SOUSUKE_TAMADA       EQU 04
-TAKENORI_OOTA        EQU 05
-KEN_SUGIMORI         EQU 06
-MOTOFUMI_FUJIWARA    EQU 07
-ATSUKO_NISHIDA       EQU 08
-MUNEO_SAITO          EQU 09
-SATOSHI_OOTA         EQU 10
-RENA_YOSHIKAWA       EQU 11
-JUN_OKUTANI          EQU 12
-HIRONOBU_YOSHIDA     EQU 13
-ASUKA_IWASHITA       EQU 14
-GO_ICHINOSE          EQU 15
-MORIKAZU_AOKI        EQU 16
-KOHJI_NISHINO        EQU 17
-KENJI_MATSUSHIMA     EQU 18
-TOSHINOBU_MATSUMIYA  EQU 19
-SATORU_IWATA         EQU 20
-NOBUHIRO_SEYA        EQU 21
-KAZUHITO_SEKINE      EQU 22
-TETSUJI_OOTA         EQU 23
-NCL_SUPER_MARIO_CLUB EQU 24
-SARUGAKUCHO          EQU 25
-AKITO_MORI           EQU 26
-TAKAHIRO_HARADA      EQU 27
-TOHRU_HASHIMOTO      EQU 28
-NOBORU_MATSUMOTO     EQU 29
-TAKEHIRO_IZUSHI      EQU 30
-TAKASHI_KAWAGUCHI    EQU 31
-TSUNEKAZU_ISHIHARA   EQU 32
-HIROSHI_YAMAUCHI     EQU 33
-KENJI_SAIKI          EQU 34
-ATSUSHI_TADA         EQU 35
-NAOKO_KAWAKAMI       EQU 36
-HIROYUKI_ZINNAI      EQU 37
-KUNIMI_KAWAMURA      EQU 38
-HISASHI_SOGABE       EQU 39
-KEITA_KAGAYA         EQU 40
-YOSHINORI_MATSUDA    EQU 41
-HITOMI_SATO          EQU 42
-TORU_OSAWA           EQU 43
-TAKAO_OHARA          EQU 44
-YUICHIRO_ITO         EQU 45
-TAKAO_SHIMIZU        EQU 46
-PLANNING             EQU 47
-KEITA_NAKAMURA       EQU 48
-HIROTAKA_UEMURA      EQU 49
-HIROAKI_TAMURA       EQU 50
-NORIAKI_SAKAGUCHI    EQU 51
-MIYUKI_SATO          EQU 52
-GAKUZI_NOMOTO        EQU 53
-AI_MASHIMA           EQU 54
-MIKIHIRO_ISHIKAWA    EQU 55
-HIDEYUKI_HASHIMOTO   EQU 56
-SATOSHI_YAMATO       EQU 57
-SHIGERU_MIYAMOTO     EQU 58
-GAIL_TILDEN          EQU 59
-NOB_OGASAWARA        EQU 60
-SETH_MCMAHILL        EQU 61
-HIROTO_ALEXANDER     EQU 62
-TERESA_LILLYGREN     EQU 63
-THOMAS_HERTZOG       EQU 64
-ERIK_JOHNSON         EQU 65
-HIRO_NAKAMURA        EQU 66
-TERUKI_MURAKAWA      EQU 67
-KAZUYOSHI_OSAWA      EQU 68
-KIMIKO_NAKAMICHI     EQU 69
-END                  EQU 70
-CREDITS_UNKNOWN      EQU 71
-STAFF                EQU 72
-DIRECTOR             EQU 73
-CODIRECTOR           EQU 74
-PROGRAMMERS          EQU 75
-GRAPHICS_DIRECTOR    EQU 76
-MONSTER_DESIGN       EQU 77
-GRAPHICS_DESIGN      EQU 78
-MUSIC                EQU 79
-SOUND_EFFECTS        EQU 80
-GAME_DESIGN          EQU 81
-GAME_SCENARIO        EQU 82
-TOOL_PROGRAMMING     EQU 83
-PARAMETRIC_DESIGN    EQU 84
-SCRIPT_DESIGN        EQU 85
-MAP_DATA_DESIGN      EQU 86
-MAP_DESIGN           EQU 87
-PRODUCT_TESTING      EQU 88
-SPECIAL_THANKS       EQU 89
-PRODUCERS            EQU 90
-EXECUTIVE_PRODUCER   EQU 91
-POKEMON_ANIMATION    EQU 92
-POKEDEX_TEXT         EQU 93
-MOBILE_PRJ_LEADER    EQU 94
-MOBILE_SYSTEM_AD     EQU 95
-MOBILE_STADIUM_DIR   EQU 96
-COORDINATION         EQU 97
-COPYRIGHT            EQU 98
-US_VERSION_STAFF     EQU 99
-US_COORDINATION      EQU 100
-TEXT_TRANSLATION     EQU 101
-PAAD_TESTING         EQU 102
-
-CREDITS_THEEND       EQU $f9
-CREDITS_WAIT2        EQU $fa
-CREDITS_MUSIC        EQU $fb
-CREDITS_CLEAR        EQU $fc
-CREDITS_SCENE        EQU $fd
-CREDITS_WAIT         EQU $fe
-
-
-ParseCredits: ; 1099aa
-	ld hl, $cf63
-	bit 7, [hl]
-	jp nz, .done
-	
-; Wait until the timer has run out to parse the next command.
-	ld hl, CreditsTimer
-	ld a, [hl]
-	and a
-	jr z, .parse
-	
-; One tick has passed.
-	dec [hl]
-	jp .done
-	
-.parse
-; First, let's clear the current text display,
-; starting from line 5.
-	xor a
-	ld [$ffd4], a
-	hlcoord 0, 5
-	ld bc, 20 * 12
-	ld a, " "
-	call ByteFill
-	
-; Then read the script.
-	
-.loop
-	call .get
-	
-; Commands:
-	cp $ff
-	jp z, .end
-	cp CREDITS_WAIT
-	jr z, .wait
-	cp CREDITS_SCENE
-	jr z, .scene
-	cp CREDITS_CLEAR
-	jr z, .clear
-	cp CREDITS_MUSIC
-	jr z, .music
-	cp CREDITS_WAIT2
-	jr z, .wait2
-	cp CREDITS_THEEND
-	jr z, .theend
-	
-; If it's not a command, it's a string identifier.
-	
-	push af
-	ld e, a
-	ld d, 0
-	ld hl, CreditsStrings
-	add hl, de
-	add hl, de
-	ld a, [hli]
-	ld d, [hl]
-	ld e, a
-	pop af
-	
-; Strings spanning multiple lines have special cases.
-	
-	cp COPYRIGHT
-	jr z, .copyright
-	
-	cp STAFF
-	jr c, .staff
-	
-; The rest start from line 6.
-
-	hlcoord 0, 6
-	jr .print
-	
-.copyright
-	hlcoord 2, 6
-	jr .print
-	
-.staff
-	hlcoord 0, 6
-	
-.print
-; Print strings spaced every two lines.
-	call .get
-	ld bc, 20 * 2
-	call AddNTimes
-	call PlaceString
-	jr .loop
-	
-.theend
-; Display "The End" graphic.
-	call $5c11
-	jr .loop
-	
-.scene
-; Update the scene number and corresponding palette.
-	call .get
-	ld [$cf65], a ; scene
-	xor a
-	ld [$cf64], a ; frame
-	call GetCreditsPalette
-	call $32f9 ; update hw pal registers
-	jr .loop
-	
-.clear
-; Clear the banner.
-	ld a, $ff
-	ld [$cf64], a ; frame
-	jr .loop
-	
-.music
-; Play the credits music.
-	ld de, MUSIC_CREDITS
-	push de
-	ld de, MUSIC_NONE
-	call StartMusic
-	call DelayFrame
-	pop de
-	call StartMusic
-	jp .loop
-	
-.wait2
-; Wait for some amount of ticks.
-	call .get
-	ld [CreditsTimer], a
-	jr .done
-	
-.wait
-; Wait for some amount of ticks, and do something else.
-	call .get
-	ld [CreditsTimer], a
-	
-	xor a
-	ld [$ffd5], a
-	ld a, 1
-	ld [$ffd4], a
-	
-.done
-	jp $5951
-	
-.end
-; Stop execution.
-	ld hl, $cf63
-	set 7, [hl]
-	ld a, $20
-	ld [$c2a7], a
-	ld a, $5c
-	ld [$c2a9], a
-	ld a, $00
-	ld [$c2aa], a
-	ret
-
-.get
-; Get byte CreditsPos from CreditsScript
-	push hl
-	push de
-	ld a, [CreditsPos]
-	ld e, a
-	ld a, [CreditsPos+1]
-	ld d, a
-	ld hl, CreditsScript
-	add hl, de
-	
-	inc de
-	ld a, e
-	ld [CreditsPos], a
-	ld a, d
-	ld [CreditsPos+1], a
-	ld a, [hl]
-	pop de
-	pop hl
-	ret
-; 109a95
-
-
-INCBIN "baserom.gbc", $109a95, $109b2c - $109a95
-
-
-GetCreditsPalette: ; 109b2c
-	call .GetPalAddress
-	
-	push hl
-	ld a, 0
-	call .UpdatePals
-	pop hl
-	ret
-	
-.GetPalAddress
-; Each set of palette data is 24 bytes long.
-	ld a, [$cf65] ; scene
-	and 3
-	add a
-	add a ; * 8
-	add a
-	ld e, a
-	ld d, 0
-	ld hl, .CreditsPalettes
-	add hl, de
-	add hl, de ; * 3
-	add hl, de
-	ret
-	
-.UpdatePals
-; Update the first three colors in both palette buffers.
-	
-	push af
-	push hl
-	add $00 ; lo($d000)
-	ld e, a
-	ld a, 0
-	adc $d0 ; hi($d000)
-	ld d, a
-	ld bc, 24
-	call CopyBytes
-	
-	pop hl
-	pop af
-	add $80 ; lo($d080)
-	ld e, a
-	ld a, 0
-	adc $d0 ; hi($d080)
-	ld d, a
-	ld bc, 24
-	call CopyBytes
-	ret
-
-
-.CreditsPalettes
-INCBIN "baserom.gbc",$109b6a,$18 ; pichu.pal
-INCBIN "baserom.gbc",$109b82,$18 ; smoochum.pal
-INCBIN "baserom.gbc",$109b9a,$18 ; ditto.pal
-INCBIN "baserom.gbc",$109bb2,$18 ; igglybuff.pal
-; 109bca
-
-INCBIN "baserom.gbc", $109bca, $109c24 - $109bca
-
-CreditsGFX:
-INCBIN "gfx/credits/border.2bpp"
-INCBIN "gfx/credits/pichu.2bpp"
-INCBIN "gfx/credits/smoochum.2bpp"
-INCBIN "gfx/credits/ditto.2bpp"
-INCBIN "gfx/credits/igglybuff.2bpp"
-
-
-CreditsScript: ; 10acb4
-
-; Clear the banner.
-	db CREDITS_CLEAR
-
-; Pokemon Crystal Version Staff
-	db                STAFF, 01
-	db CREDITS_WAIT, 08
-
-; Play the credits music.
-	db CREDITS_MUSIC
-
-	db CREDITS_WAIT2, 10
-
-	db CREDITS_WAIT, 01
-
-; Update the banner.
-	db CREDITS_SCENE, 00 ; Pichu
-
-	db             DIRECTOR, 01
-	db       SATOSHI_TAJIRI, 02
-	db CREDITS_WAIT, 12
-
-	db           CODIRECTOR, 01
-	db       JUNICHI_MASUDA, 02
-	db CREDITS_WAIT, 12
-
-	db          PROGRAMMERS, 00
-	db       SOUSUKE_TAMADA, 01
-	db       HISASHI_SOGABE, 02
-	db         KEITA_KAGAYA, 03
-	db    YOSHINORI_MATSUDA, 04
-	db CREDITS_WAIT, 12
-
-	db          PROGRAMMERS, 00
-	db     SHIGEKI_MORIMOTO, 01
-	db     TETSUYA_WATANABE, 02
-	db        TAKENORI_OOTA, 03
-	db CREDITS_WAIT, 12
-
-	db    GRAPHICS_DIRECTOR, 01
-	db         KEN_SUGIMORI, 02
-	db CREDITS_WAIT, 12
-
-	db       MONSTER_DESIGN, 00
-	db         KEN_SUGIMORI, 01
-	db    MOTOFUMI_FUJIWARA, 02
-	db     SHIGEKI_MORIMOTO, 03
-	db     HIRONOBU_YOSHIDA, 04
-	db         SATOSHI_OOTA, 05
-	db CREDITS_WAIT, 12
-
-	db       MONSTER_DESIGN, 00
-	db       ATSUKO_NISHIDA, 01
-	db          MUNEO_SAITO, 02
-	db       RENA_YOSHIKAWA, 03
-	db CREDITS_WAIT, 12
-
-	db    POKEMON_ANIMATION, 01
-	db     HIRONOBU_YOSHIDA, 02
-	db          JUN_OKUTANI, 03
-	db CREDITS_WAIT, 12
-
-; Clear the banner.
-	db CREDITS_CLEAR
-
-	db CREDITS_WAIT, 01
-
-; Update the banner.
-	db CREDITS_SCENE, 01 ; Smoochum
-
-	db      GRAPHICS_DESIGN, 00
-	db     HIRONOBU_YOSHIDA, 01
-	db          JUN_OKUTANI, 02
-	db       ASUKA_IWASHITA, 03
-	db     TETSUYA_WATANABE, 04
-	db CREDITS_WAIT, 12
-
-	db                MUSIC, 00
-	db       JUNICHI_MASUDA, 01
-	db        MORIKAZU_AOKI, 02
-	db          GO_ICHINOSE, 03
-	db CREDITS_WAIT, 12
-
-	db        SOUND_EFFECTS, 00
-	db        MORIKAZU_AOKI, 01
-	db       JUNICHI_MASUDA, 02
-	db     TETSUYA_WATANABE, 03
-	db CREDITS_WAIT, 12
-
-	db          GAME_DESIGN, 00
-	db       JUNICHI_MASUDA, 01
-	db     SHIGEKI_MORIMOTO, 02
-	db        KOHJI_NISHINO, 03
-	db CREDITS_WAIT, 12
-
-	db          GAME_DESIGN, 00
-	db         TETSUJI_OOTA, 01
-	db          HITOMI_SATO, 02
-	db     KENJI_MATSUSHIMA, 03
-	db CREDITS_WAIT, 12
-
-	db        GAME_SCENARIO, 00
-	db       JUNICHI_MASUDA, 01
-	db        KOHJI_NISHINO, 02
-	db  TOSHINOBU_MATSUMIYA, 03
-	db     KENJI_MATSUSHIMA, 04
-	db CREDITS_WAIT, 12
-
-	db         POKEDEX_TEXT, 01
-	db  TOSHINOBU_MATSUMIYA, 02
-	db CREDITS_WAIT, 12
-
-	db     TOOL_PROGRAMMING, 01
-	db       SOUSUKE_TAMADA, 02
-	db        TAKENORI_OOTA, 03
-	db CREDITS_WAIT, 12
-
-	db    PARAMETRIC_DESIGN, 01
-	db        KOHJI_NISHINO, 02
-	db CREDITS_WAIT, 12
-
-; Clear the banner.
-	db CREDITS_CLEAR
-
-	db CREDITS_WAIT, 01
-
-; Update the banner.
-	db CREDITS_SCENE, 02 ; Ditto
-
-	db        SCRIPT_DESIGN, 01
-	db         TETSUJI_OOTA, 02
-	db        NOBUHIRO_SEYA, 03
-	db CREDITS_WAIT, 12
-
-	db      MAP_DATA_DESIGN, 01
-	db         TETSUJI_OOTA, 02
-	db      KAZUHITO_SEKINE, 03
-	db CREDITS_WAIT, 12
-
-	db           MAP_DESIGN, 00
-	db         TETSUJI_OOTA, 01
-	db        KOHJI_NISHINO, 02
-	db        NOBUHIRO_SEYA, 03
-	db CREDITS_WAIT, 12
-
-	db         COORDINATION, 01
-	db      HIROYUKI_ZINNAI, 02
-	db CREDITS_WAIT, 12
-
-	db            PRODUCERS, 00
-	db         SATORU_IWATA, 01
-	db       SATOSHI_YAMATO, 02
-	db     SHIGERU_MIYAMOTO, 03
-	db CREDITS_WAIT, 12
-
-	db            PRODUCERS, 01
-	db   TSUNEKAZU_ISHIHARA, 02
-	db CREDITS_WAIT, 12
-
-; Clear the banner.
-	db CREDITS_CLEAR
-
-	db CREDITS_WAIT, 01
-
-; Update the banner.
-	db CREDITS_SCENE, 03 ; Igglybuff
-
-	db     US_VERSION_STAFF, 02
-	db CREDITS_WAIT, 09
-
-	db      US_COORDINATION, 01
-	db          GAIL_TILDEN, 02
-	db        HIRO_NAKAMURA, 03
-	db CREDITS_WAIT, 12
-
-	db      US_COORDINATION, 01
-	db       JUNICHI_MASUDA, 02
-	db        SETH_MCMAHILL, 03
-	db CREDITS_WAIT, 12
-
-	db      US_COORDINATION, 01
-	db     HIROTO_ALEXANDER, 02
-	db     TERESA_LILLYGREN, 03
-	db CREDITS_WAIT, 12
-
-	db     TEXT_TRANSLATION, 01
-	db        NOB_OGASAWARA, 02
-	db CREDITS_WAIT, 12
-
-	db          PROGRAMMERS, 01
-	db      TERUKI_MURAKAWA, 02
-	db      KAZUYOSHI_OSAWA, 03
-	db CREDITS_WAIT, 12
-
-	db         PAAD_TESTING, 01
-	db       THOMAS_HERTZOG, 02
-	db         ERIK_JOHNSON, 03
-	db CREDITS_WAIT, 12
-
-	db      PRODUCT_TESTING, 00
-	db             PLANNING, 01
-	db CREDITS_WAIT, 12
-
-	db      PRODUCT_TESTING, 00
-	db       KEITA_NAKAMURA, 01
-	db      HIROTAKA_UEMURA, 02
-	db       HIROAKI_TAMURA, 03
-	db    NORIAKI_SAKAGUCHI, 04
-	db CREDITS_WAIT, 12
-
-	db      PRODUCT_TESTING, 00
-	db NCL_SUPER_MARIO_CLUB, 01
-	db          KENJI_SAIKI, 02
-	db         ATSUSHI_TADA, 03
-	db          MIYUKI_SATO, 04
-	db CREDITS_WAIT, 12
-
-	db       SPECIAL_THANKS, 00
-	db     KIMIKO_NAKAMICHI, 01
-	db           AKITO_MORI, 02
-	db CREDITS_WAIT, 12
-
-	db       SPECIAL_THANKS, 00
-	db        GAKUZI_NOMOTO, 01
-	db           AI_MASHIMA, 02
-	db      KUNIMI_KAWAMURA, 03
-	db CREDITS_WAIT, 12
-
-	db       SPECIAL_THANKS, 00
-	db    MIKIHIRO_ISHIKAWA, 01
-	db   HIDEYUKI_HASHIMOTO, 02
-	db CREDITS_WAIT, 12
-
-	db   EXECUTIVE_PRODUCER, 01
-	db     HIROSHI_YAMAUCHI, 02
-	db CREDITS_WAIT, 12
-
-	db            COPYRIGHT, 01
-	db CREDITS_WAIT, 09
-
-; Display "The End" graphic.
-	db CREDITS_THEEND
-
-	db CREDITS_WAIT, 20
-
-	db $ff ; end
-; 10ae13
-
-
-CreditsStrings:
-	dw .SatoshiTajiri
-	dw .JunichiMasuda
-	dw .TetsuyaWatanabe
-	dw .ShigekiMorimoto
-	dw .SousukeTamada
-	dw .TakenoriOota
-	dw .KenSugimori
-	dw .MotofumiFujiwara
-	dw .AtsukoNishida
-	dw .MuneoSaito
-	dw .SatoshiOota
-	dw .RenaYoshikawa
-	dw .JunOkutani
-	dw .HironobuYoshida
-	dw .AsukaIwashita
-	dw .GoIchinose
-	dw .MorikazuAoki
-	dw .KohjiNishino
-	dw .KenjiMatsushima
-	dw .ToshinobuMatsumiya
-	dw .SatoruIwata
-	dw .NobuhiroSeya
-	dw .KazuhitoSekine
-	dw .TetsujiOota
-	dw .NclSuperMarioClub
-	dw .Sarugakucho
-	dw .AkitoMori
-	dw .TakahiroHarada
-	dw .TohruHashimoto
-	dw .NoboruMatsumoto
-	dw .TakehiroIzushi
-	dw .TakashiKawaguchi
-	dw .TsunekazuIshihara
-	dw .HiroshiYamauchi
-	dw .KenjiSaiki
-	dw .AtsushiTada
-	dw .NaokoKawakami
-	dw .HiroyukiZinnai
-	dw .KunimiKawamura
-	dw .HisashiSogabe
-	dw .KeitaKagaya
-	dw .YoshinoriMatsuda
-	dw .HitomiSato
-	dw .ToruOsawa
-	dw .TakaoOhara
-	dw .YuichiroIto
-	dw .TakaoShimizu
-	dw .Planning
-	dw .KeitaNakamura
-	dw .HirotakaUemura
-	dw .HiroakiTamura
-	dw .NoriakiSakaguchi
-	dw .MiyukiSato
-	dw .GakuziNomoto
-	dw .AiMashima
-	dw .MikihiroIshikawa
-	dw .HideyukiHashimoto
-	dw .SatoshiYamato
-	dw .ShigeruMiyamoto
-	dw .GailTilden
-	dw .NobOgasawara
-	dw .SethMcMahill
-	dw .HirotoAlexander
-	dw .TeresaLillygren
-	dw .ThomasHertzog
-	dw .ErikJohnson
-	dw .HiroNakamura
-	dw .TerukiMurakawa
-	dw .KazuyoshiOsawa
-	dw .KimikoNakamichi
-	dw .End
-	dw .Unknown
-	dw .Staff
-	dw .Director
-	dw .CoDirector
-	dw .Programmers
-	dw .GraphicsDirector
-	dw .MonsterDesign
-	dw .GraphicsDesign
-	dw .Music
-	dw .SoundEffects
-	dw .GameDesign
-	dw .GameScenario
-	dw .ToolProgramming
-	dw .ParametricDesign
-	dw .ScriptDesign
-	dw .MapDataDesign
-	dw .MapDesign
-	dw .ProductTesting
-	dw .SpecialThanks
-	dw .Producers
-	dw .ExecutiveProducer
-	dw .PokemonAnimation
-	dw .PokedexText
-	dw .MobilePrjLeader
-	dw .MobileSystemAd
-	dw .MobileStadiumDir
-	dw .Coordination
-	dw .Copyright
-	dw .UsVersionStaff
-	dw .UsCoordination
-	dw .TextTranslation
-	dw .PaadTesting
-
-.SatoshiTajiri:       db "   SATOSHI TAJIRI@"         ; "たじり さとし@"
-.JunichiMasuda:       db "   JUNICHI MASUDA@"         ; "ますだ じゅんいち@"
-.TetsuyaWatanabe:     db "  TETSUYA WATANABE@"        ; "わたなべ てつや@"
-.ShigekiMorimoto:     db "  SHIGEKI MORIMOTO@"        ; "もりもと しげき@"
-.SousukeTamada:       db "   SOUSUKE TAMADA@"         ; "たまだ そうすけ@"
-.TakenoriOota:        db "   TAKENORI OOTA@"          ; "おおた たけのり@"
-.KenSugimori:         db "    KEN SUGIMORI@"          ; "すぎもり けん@"
-.MotofumiFujiwara:    db " MOTOFUMI FUJIWARA@"        ; "ふじわら もとふみ@"
-.AtsukoNishida:       db "   ATSUKO NISHIDA@"         ; "にしだ あつこ@"
-.MuneoSaito:          db "    MUNEO SAITO@"           ; "さいとう むねお@"
-.SatoshiOota:         db "    SATOSHI OOTA@"          ; "おおた さとし@"
-.RenaYoshikawa:       db "   RENA YOSHIKAWA@"         ; "よしかわ れな@"
-.JunOkutani:          db "    JUN OKUTANI@"           ; "おくたに じゅん@"
-.HironobuYoshida:     db "  HIRONOBU YOSHIDA@"        ; "よしだ ひろのぶ@"
-.AsukaIwashita:       db "   ASUKA IWASHITA@"         ; "いわした あすか@"
-.GoIchinose:          db "    GO ICHINOSE@"           ; "いちのせ ごう@"
-.MorikazuAoki:        db "   MORIKAZU AOKI@"          ; "あおき もりかず@"
-.KohjiNishino:        db "   KOHJI NISHINO@"          ; "にしの こうじ@"
-.KenjiMatsushima:     db "  KENJI MATSUSHIMA@"        ; "まつしま けんじ@"
-.ToshinobuMatsumiya:  db "TOSHINOBU MATSUMIYA@"       ; "まつみや としのぶ@"
-.SatoruIwata:         db "    SATORU IWATA@"          ; "いわた さとる@"
-.NobuhiroSeya:        db "   NOBUHIRO SEYA@"          ; "せや のぶひろ@"
-.KazuhitoSekine:      db "  KAZUHITO SEKINE@"         ; "せきね かずひと@"
-.TetsujiOota:         db "    TETSUJI OOTA@"          ; "おおた てつじ@"
-.NclSuperMarioClub:   db "NCL SUPER MARIO CLUB@"      ; "スーパーマりォクラブ@"
-.Sarugakucho:         db "    SARUGAKUCHO@"           ; "さるがくちょう@"
-.AkitoMori:           db "     AKITO MORI@"           ; "もり あきと@"
-.TakahiroHarada:      db "  TAKAHIRO HARADA@"         ; "はらだ たかひろ@"
-.TohruHashimoto:      db "  TOHRU HASHIMOTO@"         ; "はしもと とおる@"
-.NoboruMatsumoto:     db "  NOBORU MATSUMOTO@"        ; "まつもと のぼる@"
-.TakehiroIzushi:      db "  TAKEHIRO IZUSHI@"         ; "いずし たけひろ@"
-.TakashiKawaguchi:    db " TAKASHI KAWAGUCHI@"        ; "かわぐち たかし@"
-.TsunekazuIshihara:   db " TSUNEKAZU ISHIHARA@"       ; "いしはら つねかず@"
-.HiroshiYamauchi:     db "  HIROSHI YAMAUCHI@"        ; "やまうち ひろし@"
-.KenjiSaiki:          db "    KENJI SAIKI@"           ; "さいき けんじ@"
-.AtsushiTada:         db "    ATSUSHI TADA@"          ; "ただ あつし@"
-.NaokoKawakami:       db "   NAOKO KAWAKAMI@"         ; "かわかみ なおこ@"
-.HiroyukiZinnai:      db "  HIROYUKI ZINNAI@"         ; "じんない ひろゆき@"
-.KunimiKawamura:      db "  KUNIMI KAWAMURA@"         ; "かわむら くにみ@"
-.HisashiSogabe:       db "   HISASHI SOGABE@"         ; "そがべ ひさし@"
-.KeitaKagaya:         db "    KEITA KAGAYA@"          ; "かがや けいた@"
-.YoshinoriMatsuda:    db " YOSHINORI MATSUDA@"        ; "まつだ よしのり@"
-.HitomiSato:          db "    HITOMI SATO@"           ; "さとう ひとみ@"
-.ToruOsawa:           db "     TORU OSAWA@"           ; "おおさわ とおる@"
-.TakaoOhara:          db "    TAKAO OHARA@"           ; "おおはら たかお@"
-.YuichiroIto:         db "    YUICHIRO ITO@"          ; "いとう ゆういちろう@"
-.TakaoShimizu:        db "   TAKAO SHIMIZU@"          ; "しみず たかお@"
-.Planning:            db " SPECIAL PRODUCTION", $4e
-                      db "      PLANNING", $4e        ; "きかくかいはつぶ@"
-                      db " & DEVELOPMENT DEPT.@"
-.KeitaNakamura:       db "   KEITA NAKAMURA@"         ; "なかむら けいた@"
-.HirotakaUemura:      db "  HIROTAKA UEMURA@"         ; "うえむら ひろたか@"
-.HiroakiTamura:       db "   HIROAKI TAMURA@"         ; "たむら ひろあき@"
-.NoriakiSakaguchi:    db " NORIAKI SAKAGUCHI@"        ; "さかぐち のりあき@"
-.MiyukiSato:          db "    MIYUKI SATO@"           ; "さとう みゆき@"
-.GakuziNomoto:        db "   GAKUZI NOMOTO@"          ; "のもと がくじ@"
-.AiMashima:           db "     AI MASHIMA@"           ; "ましま あい@"
-.MikihiroIshikawa:    db " MIKIHIRO ISHIKAWA@"        ; "いしかわ みきひろ@"
-.HideyukiHashimoto:   db " HIDEYUKI HASHIMOTO@"       ; "はしもと ひでゆき@"
-.SatoshiYamato:       db "   SATOSHI YAMATO@"         ; "やまと さとし@"
-.ShigeruMiyamoto:     db "  SHIGERU MIYAMOTO@"        ; "みやもと しげる@"
-.End:                 db "        END@"               ; "おしまい@"
-.Unknown:             db "      ????????@"            ; "????????@"
-.GailTilden:          db "    GAIL TILDEN@"
-.NobOgasawara:        db "   NOB OGASAWARA@"
-.SethMcMahill:        db "   SETH McMAHILL@"
-.HirotoAlexander:     db "  HIROTO ALEXANDER@"
-.TeresaLillygren:     db "  TERESA LILLYGREN@"
-.ThomasHertzog:       db "   THOMAS HERTZOG@"
-.ErikJohnson:         db "    ERIK JOHNSON@"
-.HiroNakamura:        db "   HIRO NAKAMURA@"
-.TerukiMurakawa:      db "  TERUKI MURAKAWA@"
-.KazuyoshiOsawa:      db "  KAZUYOSHI OSAWA@"
-.KimikoNakamichi:     db "  KIMIKO NAKAMICHI@"
-.Staff:               db "      #MON", $4e            ; "ポケットモンスター", $4e
-                      db "  CRYSTAL VERSION", $4e     ; "  クりスタル バージョン", $4e
-                      db "       STAFF@"              ; "    スタッフ@"
-.Director:            db "      DIRECTOR@"            ; "エグゼクティブ ディレクター@"
-.CoDirector:          db "    CO-DIRECTOR@"           ; "ディレクター@"
-.Programmers:         db "    PROGRAMMERS@"           ; "プログラム@"
-.GraphicsDirector:    db " GRAPHICS DIRECTOR@"        ; "グラフィック ディレクター@"
-.MonsterDesign:       db "   MONSTER DESIGN@"         ; "# デザイン@"
-.GraphicsDesign:      db "  GRAPHICS DESIGN@"         ; "グラフィック デザイン@"
-.Music:               db "       MUSIC@"              ; "おんがく@"
-.SoundEffects:        db "   SOUND EFFECTS@"          ; "サウンド エフ→クト@"
-.GameDesign:          db "    GAME DESIGN@"           ; "ゲームデザイン@"
-.GameScenario:        db "   GAME SCENARIO@"          ; "シナりォ@"
-.ToolProgramming:     db "  TOOL PROGRAMMING@"        ; "ツール プログラム@"
-.ParametricDesign:    db " PARAMETRIC DESIGN@"        ; "パラメーター せってい@"
-.ScriptDesign:        db "   SCRIPT DESIGN@"          ; "スクりプト せってい@"
-.MapDataDesign:       db "  MAP DATA DESIGN@"         ; "マップデータ せってい@"
-.MapDesign:           db "     MAP DESIGN@"           ; "マップ デザイン@"
-.ProductTesting:      db "  PRODUCT TESTING@"         ; "デバッグプレイ@"
-.SpecialThanks:       db "   SPECIAL THANKS@"         ; "スぺシャルサンクス@"
-.Producers:           db "     PRODUCERS@"            ; "プロデューサー@"
-.ExecutiveProducer:   db " EXECUTIVE PRODUCER@"       ; "エグゼクティブ プロデューサー@"
-.PokemonAnimation:    db " #MON ANIMATION@"           ; "# アニメーション@"
-.PokedexText:         db "    #DEX TEXT@"             ; "ずかん テキスト@"
-.MobilePrjLeader:     db " MOBILE PRJ. LEADER@"       ; "モバイルプロジ→クト りーダー@"
-.MobileSystemAd:      db " MOBILE SYSTEM AD.@"        ; "モバイル システムアドバイザー@"
-.MobileStadiumDir:    db "MOBILE STADIUM DIR.@"       ; "モバイルスタジアム ディレクター@"
-.Coordination:        db "    COORDINATION@"          ; "コーディネーター@"
-.UsVersionStaff:      db "  US VERSION STAFF@"
-.UsCoordination:      db "  US COORDINATION@"
-.TextTranslation:     db "  TEXT TRANSLATION@"
-.PaadTesting:         db "    PAAD TESTING@"
-
-.Copyright:
-;  (C) 1  9  9  5 - 2  0  0  1     N  i  n  t  e  n  d  o
-db $60,$61,$62,$63,$64,$65,$66, $67, $68, $69, $6a, $6b, $6c, $4e
-;  (C) 1  9  9  5 - 2  0  0  1    C  r  e  a  t  u  r  e  s      i  n  c .
-db $60,$61,$62,$63,$64,$65,$66, $6d, $6e, $6f, $70, $71, $72,  $7a, $7b, $7c, $4e
-;  (C) 1  9  9  5 - 2  0  0  1  G   A   M   E   F   R   E   A   K     i  n  c .
-db $60,$61,$62,$63,$64,$65,$66, $73, $74, $75, $76, $77, $78, $79,  $7a, $7b, $7c, "@"
-
--- /dev/null
+++ b/engine/bittable2.asm
@@ -1,0 +1,198 @@
+; All locations are in WRAM bank 1.
+
+	; location, bit
+
+	; pokegear
+	dwb $d957, %00000010 ; radio card
+	dwb $d957, %00000001 ; map card
+	dwb $d957, %00000100 ; phone card
+	dwb $d957, %00001000 ; expn card
+	dwb $d957, %10000000 ; on/off
+	
+	;   DaycareMan, %10000000 ; daycare 1 on
+	dwb DaycareMan, %01000000 ; monster 1 and 2 are compatible
+	;   DaycareMan, %00100000 ; egg is ready
+	dwb DaycareMan, %00000001 ; monster 1 in daycare
+	
+	;   DaycareLady, %10000000 = daycare 2 on
+	dwb DaycareLady, %00000001 ; monster 2 in daycare
+	
+	dwb $d854, %00000001 ; mom saving money
+	dwb $d854, %10000000 ; dst
+	
+	dwb $dc39, %00000001
+	
+	dwb $d84c, %00000001 ; pokedex
+	dwb $d84c, %00000010 ; unown dex
+	dwb $d84c, %00001000 ; pokerus
+	dwb $d84c, %00010000 ; rocket signal on ch20
+	dwb $d84c, %01000000 ; credits skip
+	dwb $d84c, %10000000 ; bug contest on
+	dwb $d84d, %00000100 ; bug contest timer
+	dwb $d84d, %00000010 ; rockets in radio tower
+	dwb $d84d, %00000001 ; bike shop call enabled (1024 bike steps reqd)
+	dwb $d84d, %00010000
+	dwb $d84d, %00100000 ; give pokerus; berry -> berry juice when trading?
+	dwb $d84d, %01000000
+	dwb $d84d, %10000000 ; rockets in mahogany
+	
+	dwb $dbf5, %00000001 ; strength active
+	dwb $dbf5, %00000010 ; always on bike (cant surf)
+	dwb $dbf5, %00000100 ; downhill (cycling road)
+	
+	dwb JohtoBadges, %00000001 ; zephyrbadge
+	dwb JohtoBadges, %00000010 ; hivebadge
+	dwb JohtoBadges, %00000100 ; plainbadge
+	dwb JohtoBadges, %00001000 ; fogbadge
+	dwb JohtoBadges, %00010000 ; mineralbadge
+	dwb JohtoBadges, %00100000 ; stormbadge
+	dwb JohtoBadges, %01000000 ; glacierbadge
+	dwb JohtoBadges, %10000000 ; risingbadge
+	
+	dwb KantoBadges, %00000001 ; boulderbadge
+	dwb KantoBadges, %00000010 ; cascadebadge
+	dwb KantoBadges, %00000100 ; thunderbadge
+	dwb KantoBadges, %00001000 ; rainbowbadge
+	dwb KantoBadges, %00010000 ; soulbadge
+	dwb KantoBadges, %00100000 ; marshbadge
+	dwb KantoBadges, %01000000 ; volcanobadge
+	dwb KantoBadges, %10000000 ; earthbadge
+	
+	; unown sets
+	dwb UnlockedUnowns, %00000001 ; 1
+	dwb UnlockedUnowns, %00000010 ; 2
+	dwb UnlockedUnowns, %00000100 ; 3
+	dwb UnlockedUnowns, %00001000 ; 4
+	dwb UnlockedUnowns, %00010000 ; 5
+	dwb UnlockedUnowns, %00100000 ; 6
+	dwb UnlockedUnowns, %01000000 ; 7
+	dwb UnlockedUnowns, %10000000 ; 8
+	
+	; fly
+	dwb FlypointPerms, %00000001 ; your house
+	dwb FlypointPerms, %00000010 ; viridian pokecenter
+	dwb FlypointPerms, %00000100 ; pallet
+	dwb FlypointPerms, %00001000 ; viridian
+	dwb FlypointPerms, %00010000 ; pewter
+	dwb FlypointPerms, %00100000 ; cerulean
+	dwb FlypointPerms, %01000000 ; rock tunnel
+	dwb FlypointPerms, %10000000 ; vermilion
+	dwb FlypointPerms + 1, %00000001 ; lavender
+	dwb FlypointPerms + 1, %00000010 ; saffron
+	dwb FlypointPerms + 1, %00000100 ; celadon
+	dwb FlypointPerms + 1, %00001000 ; fuchsia
+	dwb FlypointPerms + 1, %00010000 ; cinnabar
+	dwb FlypointPerms + 1, %00100000 ; indigo plateau
+	dwb FlypointPerms + 1, %01000000 ; new bark
+	dwb FlypointPerms + 1, %10000000 ; cherrygrove
+	dwb FlypointPerms + 2, %00000001 ; violet
+	dwb FlypointPerms + 2, %00000100 ; azalea
+	dwb FlypointPerms + 2, %00001000 ; cianwood
+	dwb FlypointPerms + 2, %00010000 ; goldenrod
+	dwb FlypointPerms + 2, %00100000 ; olivine
+	dwb FlypointPerms + 2, %01000000 ; ecruteak
+	dwb FlypointPerms + 2, %10000000 ; mahogany
+	dwb FlypointPerms + 3, %00000001 ; lake of rage
+	dwb FlypointPerms + 3, %00000010 ; blackthorn
+	dwb FlypointPerms + 3, %00000100 ; silver cave
+	dwb FlypointPerms + 3, %00010000 ; unused
+	
+	dwb $dc9d, %00000001 ; lucky number show
+	dwb $d84d, %00001000
+	
+	dwb $dc1e, %00000001 ; kurt making balls
+	dwb $dc1e, %00000010
+	dwb $dc1e, %00000100 ; special wilddata?
+	dwb $dc1e, %00001000 ; time capsule (24h wait)
+	dwb $dc1e, %00010000 ; all fruit trees
+	dwb $dc1e, %00100000 ; shuckle given
+	dwb $dc1e, %01000000 ; goldenrod underground merchant closed
+	dwb $dc1e, %10000000 ; fought in trainer hall today
+	
+	dwb $dc1f, %00000001 ; mt moon square clefairy
+	dwb $dc1f, %00000010 ; union cave lapras
+	dwb $dc1f, %00000100 ; goldenrod underground haircut used
+	dwb $dc1f, %00001000 ; goldenrod mall happiness event floor05 person07
+	dwb $dc1f, %00010000 ; tea in blues house
+	dwb $dc1f, %00100000 ; indigo plateau rival fight
+	dwb $dc1f, %01000000
+	dwb $dc1f, %10000000
+	
+	dwb $dc20, %00000001 ; $60
+	dwb $dc20, %00000010 ; goldenrod dept store sale is on
+	
+	dwb $cfbc, %10000000 ; $62
+	
+	dwb PlayerGender, %00000001 ; player is female
+	
+	dwb $dbf3, %00000100 ; have gs ball after kurt examined it
+	
+	; rematches
+	dwb $dc4c, %00000001 ; jack
+	dwb $dc4c, %00000010 ; huey
+	dwb $dc4c, %00000100 ; gaven
+	dwb $dc4c, %00001000 ; beth
+	dwb $dc4c, %00010000 ; jose
+	dwb $dc4c, %00100000 ; reena
+	dwb $dc4c, %01000000 ; joey
+	dwb $dc4c, %10000000 ; wade
+	dwb $dc4d, %00000001 ; ralph
+	dwb $dc4d, %00000010 ; liz
+	dwb $dc4d, %00000100 ; anthony
+	dwb $dc4d, %00001000 ; todd
+	dwb $dc4d, %00010000 ; gina
+	dwb $dc4d, %00100000 ; arnie
+	dwb $dc4d, %01000000 ; alan
+	dwb $dc4d, %10000000 ; dana
+	dwb $dc4e, %00000001 ; chad
+	dwb $dc4e, %00000010 ; tully
+	dwb $dc4e, %00000100 ; brent
+	dwb $dc4e, %00001000 ; tiffany
+	dwb $dc4e, %00010000 ; vance
+	dwb $dc4e, %00100000 ; wilton
+	dwb $dc4e, %01000000 ; parry
+	dwb $dc4e, %10000000 ; erin
+	
+	dwb $dc50, %00000001 ; beverly has nugget
+	dwb $dc50, %00000010 ; jose has star piece
+	dwb $dc50, %00000100 ; wade has item (see bittable1 $032b-e)
+	dwb $dc50, %00001000 ; gina has leaf stone
+	dwb $dc50, %00010000 ; alan has fire stone
+	dwb $dc50, %00100000 ; liz has thunderstone
+	dwb $dc50, %01000000 ; derek has nugget
+	dwb $dc50, %10000000 ; tully has water stone
+	
+	dwb $dc51, %00000001 ; tiffany has pink bow
+	dwb $dc51, %00000010 ; wilton has item (see bittable1 $032f-31)
+	
+	dwb $dc54, %00000001
+	dwb $dc54, %00000010
+	dwb $dc54, %00000100
+	dwb $dc54, %00001000
+	dwb $dc54, %00010000
+	dwb $dc54, %00100000
+	dwb $dc54, %01000000
+	dwb $dc54, %10000000
+	
+	dwb $dc55, %00000001
+	dwb $dc55, %00000010
+	dwb $dc55, %00000100
+	dwb $dc55, %00001000
+	dwb $dc55, %00010000
+	dwb $dc55, %00100000
+	dwb $dc55, %01000000
+	dwb $dc55, %10000000
+	
+	dwb $dc56, %00000001
+	dwb $dc56, %00000010
+	dwb $dc56, %00000100
+	dwb $dc56, %00001000
+	dwb $dc56, %00010000
+	dwb $dc56, %00100000
+	dwb $dc56, %01000000
+	dwb $dc56, %10000000
+	
+	dwb $d45b, %00000100 ; female player has been transformed into male
+	
+	dwb $dc20, %00000100 ; dunsparce swarm
+	dwb $dc20, %00001000 ; yanma swarm
--- /dev/null
+++ b/engine/credits.asm
@@ -1,0 +1,824 @@
+SATOSHI_TAJIRI       EQU 00
+JUNICHI_MASUDA       EQU 01
+TETSUYA_WATANABE     EQU 02
+SHIGEKI_MORIMOTO     EQU 03
+SOUSUKE_TAMADA       EQU 04
+TAKENORI_OOTA        EQU 05
+KEN_SUGIMORI         EQU 06
+MOTOFUMI_FUJIWARA    EQU 07
+ATSUKO_NISHIDA       EQU 08
+MUNEO_SAITO          EQU 09
+SATOSHI_OOTA         EQU 10
+RENA_YOSHIKAWA       EQU 11
+JUN_OKUTANI          EQU 12
+HIRONOBU_YOSHIDA     EQU 13
+ASUKA_IWASHITA       EQU 14
+GO_ICHINOSE          EQU 15
+MORIKAZU_AOKI        EQU 16
+KOHJI_NISHINO        EQU 17
+KENJI_MATSUSHIMA     EQU 18
+TOSHINOBU_MATSUMIYA  EQU 19
+SATORU_IWATA         EQU 20
+NOBUHIRO_SEYA        EQU 21
+KAZUHITO_SEKINE      EQU 22
+TETSUJI_OOTA         EQU 23
+NCL_SUPER_MARIO_CLUB EQU 24
+SARUGAKUCHO          EQU 25
+AKITO_MORI           EQU 26
+TAKAHIRO_HARADA      EQU 27
+TOHRU_HASHIMOTO      EQU 28
+NOBORU_MATSUMOTO     EQU 29
+TAKEHIRO_IZUSHI      EQU 30
+TAKASHI_KAWAGUCHI    EQU 31
+TSUNEKAZU_ISHIHARA   EQU 32
+HIROSHI_YAMAUCHI     EQU 33
+KENJI_SAIKI          EQU 34
+ATSUSHI_TADA         EQU 35
+NAOKO_KAWAKAMI       EQU 36
+HIROYUKI_ZINNAI      EQU 37
+KUNIMI_KAWAMURA      EQU 38
+HISASHI_SOGABE       EQU 39
+KEITA_KAGAYA         EQU 40
+YOSHINORI_MATSUDA    EQU 41
+HITOMI_SATO          EQU 42
+TORU_OSAWA           EQU 43
+TAKAO_OHARA          EQU 44
+YUICHIRO_ITO         EQU 45
+TAKAO_SHIMIZU        EQU 46
+PLANNING             EQU 47
+KEITA_NAKAMURA       EQU 48
+HIROTAKA_UEMURA      EQU 49
+HIROAKI_TAMURA       EQU 50
+NORIAKI_SAKAGUCHI    EQU 51
+MIYUKI_SATO          EQU 52
+GAKUZI_NOMOTO        EQU 53
+AI_MASHIMA           EQU 54
+MIKIHIRO_ISHIKAWA    EQU 55
+HIDEYUKI_HASHIMOTO   EQU 56
+SATOSHI_YAMATO       EQU 57
+SHIGERU_MIYAMOTO     EQU 58
+GAIL_TILDEN          EQU 59
+NOB_OGASAWARA        EQU 60
+SETH_MCMAHILL        EQU 61
+HIROTO_ALEXANDER     EQU 62
+TERESA_LILLYGREN     EQU 63
+THOMAS_HERTZOG       EQU 64
+ERIK_JOHNSON         EQU 65
+HIRO_NAKAMURA        EQU 66
+TERUKI_MURAKAWA      EQU 67
+KAZUYOSHI_OSAWA      EQU 68
+KIMIKO_NAKAMICHI     EQU 69
+END                  EQU 70
+CREDITS_UNKNOWN      EQU 71
+STAFF                EQU 72
+DIRECTOR             EQU 73
+CODIRECTOR           EQU 74
+PROGRAMMERS          EQU 75
+GRAPHICS_DIRECTOR    EQU 76
+MONSTER_DESIGN       EQU 77
+GRAPHICS_DESIGN      EQU 78
+MUSIC                EQU 79
+SOUND_EFFECTS        EQU 80
+GAME_DESIGN          EQU 81
+GAME_SCENARIO        EQU 82
+TOOL_PROGRAMMING     EQU 83
+PARAMETRIC_DESIGN    EQU 84
+SCRIPT_DESIGN        EQU 85
+MAP_DATA_DESIGN      EQU 86
+MAP_DESIGN           EQU 87
+PRODUCT_TESTING      EQU 88
+SPECIAL_THANKS       EQU 89
+PRODUCERS            EQU 90
+EXECUTIVE_PRODUCER   EQU 91
+POKEMON_ANIMATION    EQU 92
+POKEDEX_TEXT         EQU 93
+MOBILE_PRJ_LEADER    EQU 94
+MOBILE_SYSTEM_AD     EQU 95
+MOBILE_STADIUM_DIR   EQU 96
+COORDINATION         EQU 97
+COPYRIGHT            EQU 98
+US_VERSION_STAFF     EQU 99
+US_COORDINATION      EQU 100
+TEXT_TRANSLATION     EQU 101
+PAAD_TESTING         EQU 102
+
+CREDITS_THEEND       EQU $f9
+CREDITS_WAIT2        EQU $fa
+CREDITS_MUSIC        EQU $fb
+CREDITS_CLEAR        EQU $fc
+CREDITS_SCENE        EQU $fd
+CREDITS_WAIT         EQU $fe
+
+
+ParseCredits: ; 1099aa
+	ld hl, $cf63
+	bit 7, [hl]
+	jp nz, .done
+	
+; Wait until the timer has run out to parse the next command.
+	ld hl, CreditsTimer
+	ld a, [hl]
+	and a
+	jr z, .parse
+	
+; One tick has passed.
+	dec [hl]
+	jp .done
+	
+.parse
+; First, let's clear the current text display,
+; starting from line 5.
+	xor a
+	ld [$ffd4], a
+	hlcoord 0, 5
+	ld bc, 20 * 12
+	ld a, " "
+	call ByteFill
+	
+; Then read the script.
+	
+.loop
+	call .get
+	
+; Commands:
+	cp $ff
+	jp z, .end
+	cp CREDITS_WAIT
+	jr z, .wait
+	cp CREDITS_SCENE
+	jr z, .scene
+	cp CREDITS_CLEAR
+	jr z, .clear
+	cp CREDITS_MUSIC
+	jr z, .music
+	cp CREDITS_WAIT2
+	jr z, .wait2
+	cp CREDITS_THEEND
+	jr z, .theend
+	
+; If it's not a command, it's a string identifier.
+	
+	push af
+	ld e, a
+	ld d, 0
+	ld hl, CreditsStrings
+	add hl, de
+	add hl, de
+	ld a, [hli]
+	ld d, [hl]
+	ld e, a
+	pop af
+	
+; Strings spanning multiple lines have special cases.
+	
+	cp COPYRIGHT
+	jr z, .copyright
+	
+	cp STAFF
+	jr c, .staff
+	
+; The rest start from line 6.
+
+	hlcoord 0, 6
+	jr .print
+	
+.copyright
+	hlcoord 2, 6
+	jr .print
+	
+.staff
+	hlcoord 0, 6
+	
+.print
+; Print strings spaced every two lines.
+	call .get
+	ld bc, 20 * 2
+	call AddNTimes
+	call PlaceString
+	jr .loop
+	
+.theend
+; Display "The End" graphic.
+	call $5c11
+	jr .loop
+	
+.scene
+; Update the scene number and corresponding palette.
+	call .get
+	ld [$cf65], a ; scene
+	xor a
+	ld [$cf64], a ; frame
+	call GetCreditsPalette
+	call $32f9 ; update hw pal registers
+	jr .loop
+	
+.clear
+; Clear the banner.
+	ld a, $ff
+	ld [$cf64], a ; frame
+	jr .loop
+	
+.music
+; Play the credits music.
+	ld de, MUSIC_CREDITS
+	push de
+	ld de, MUSIC_NONE
+	call StartMusic
+	call DelayFrame
+	pop de
+	call StartMusic
+	jp .loop
+	
+.wait2
+; Wait for some amount of ticks.
+	call .get
+	ld [CreditsTimer], a
+	jr .done
+	
+.wait
+; Wait for some amount of ticks, and do something else.
+	call .get
+	ld [CreditsTimer], a
+	
+	xor a
+	ld [$ffd5], a
+	ld a, 1
+	ld [$ffd4], a
+	
+.done
+	jp $5951
+	
+.end
+; Stop execution.
+	ld hl, $cf63
+	set 7, [hl]
+	ld a, $20
+	ld [$c2a7], a
+	ld a, $5c
+	ld [$c2a9], a
+	ld a, $00
+	ld [$c2aa], a
+	ret
+
+.get
+; Get byte CreditsPos from CreditsScript
+	push hl
+	push de
+	ld a, [CreditsPos]
+	ld e, a
+	ld a, [CreditsPos+1]
+	ld d, a
+	ld hl, CreditsScript
+	add hl, de
+	
+	inc de
+	ld a, e
+	ld [CreditsPos], a
+	ld a, d
+	ld [CreditsPos+1], a
+	ld a, [hl]
+	pop de
+	pop hl
+	ret
+; 109a95
+
+
+INCBIN "baserom.gbc", $109a95, $109b2c - $109a95
+
+
+GetCreditsPalette: ; 109b2c
+	call .GetPalAddress
+	
+	push hl
+	ld a, 0
+	call .UpdatePals
+	pop hl
+	ret
+	
+.GetPalAddress
+; Each set of palette data is 24 bytes long.
+	ld a, [$cf65] ; scene
+	and 3
+	add a
+	add a ; * 8
+	add a
+	ld e, a
+	ld d, 0
+	ld hl, .CreditsPalettes
+	add hl, de
+	add hl, de ; * 3
+	add hl, de
+	ret
+	
+.UpdatePals
+; Update the first three colors in both palette buffers.
+	
+	push af
+	push hl
+	add $00 ; lo($d000)
+	ld e, a
+	ld a, 0
+	adc $d0 ; hi($d000)
+	ld d, a
+	ld bc, 24
+	call CopyBytes
+	
+	pop hl
+	pop af
+	add $80 ; lo($d080)
+	ld e, a
+	ld a, 0
+	adc $d0 ; hi($d080)
+	ld d, a
+	ld bc, 24
+	call CopyBytes
+	ret
+
+
+.CreditsPalettes
+INCBIN "baserom.gbc",$109b6a,$18 ; pichu.pal
+INCBIN "baserom.gbc",$109b82,$18 ; smoochum.pal
+INCBIN "baserom.gbc",$109b9a,$18 ; ditto.pal
+INCBIN "baserom.gbc",$109bb2,$18 ; igglybuff.pal
+; 109bca
+
+INCBIN "baserom.gbc", $109bca, $109c24 - $109bca
+
+CreditsGFX:
+INCBIN "gfx/credits/border.2bpp"
+INCBIN "gfx/credits/pichu.2bpp"
+INCBIN "gfx/credits/smoochum.2bpp"
+INCBIN "gfx/credits/ditto.2bpp"
+INCBIN "gfx/credits/igglybuff.2bpp"
+
+
+CreditsScript: ; 10acb4
+
+; Clear the banner.
+	db CREDITS_CLEAR
+
+; Pokemon Crystal Version Staff
+	db                STAFF, 01
+	db CREDITS_WAIT, 08
+
+; Play the credits music.
+	db CREDITS_MUSIC
+
+	db CREDITS_WAIT2, 10
+
+	db CREDITS_WAIT, 01
+
+; Update the banner.
+	db CREDITS_SCENE, 00 ; Pichu
+
+	db             DIRECTOR, 01
+	db       SATOSHI_TAJIRI, 02
+	db CREDITS_WAIT, 12
+
+	db           CODIRECTOR, 01
+	db       JUNICHI_MASUDA, 02
+	db CREDITS_WAIT, 12
+
+	db          PROGRAMMERS, 00
+	db       SOUSUKE_TAMADA, 01
+	db       HISASHI_SOGABE, 02
+	db         KEITA_KAGAYA, 03
+	db    YOSHINORI_MATSUDA, 04
+	db CREDITS_WAIT, 12
+
+	db          PROGRAMMERS, 00
+	db     SHIGEKI_MORIMOTO, 01
+	db     TETSUYA_WATANABE, 02
+	db        TAKENORI_OOTA, 03
+	db CREDITS_WAIT, 12
+
+	db    GRAPHICS_DIRECTOR, 01
+	db         KEN_SUGIMORI, 02
+	db CREDITS_WAIT, 12
+
+	db       MONSTER_DESIGN, 00
+	db         KEN_SUGIMORI, 01
+	db    MOTOFUMI_FUJIWARA, 02
+	db     SHIGEKI_MORIMOTO, 03
+	db     HIRONOBU_YOSHIDA, 04
+	db         SATOSHI_OOTA, 05
+	db CREDITS_WAIT, 12
+
+	db       MONSTER_DESIGN, 00
+	db       ATSUKO_NISHIDA, 01
+	db          MUNEO_SAITO, 02
+	db       RENA_YOSHIKAWA, 03
+	db CREDITS_WAIT, 12
+
+	db    POKEMON_ANIMATION, 01
+	db     HIRONOBU_YOSHIDA, 02
+	db          JUN_OKUTANI, 03
+	db CREDITS_WAIT, 12
+
+; Clear the banner.
+	db CREDITS_CLEAR
+
+	db CREDITS_WAIT, 01
+
+; Update the banner.
+	db CREDITS_SCENE, 01 ; Smoochum
+
+	db      GRAPHICS_DESIGN, 00
+	db     HIRONOBU_YOSHIDA, 01
+	db          JUN_OKUTANI, 02
+	db       ASUKA_IWASHITA, 03
+	db     TETSUYA_WATANABE, 04
+	db CREDITS_WAIT, 12
+
+	db                MUSIC, 00
+	db       JUNICHI_MASUDA, 01
+	db        MORIKAZU_AOKI, 02
+	db          GO_ICHINOSE, 03
+	db CREDITS_WAIT, 12
+
+	db        SOUND_EFFECTS, 00
+	db        MORIKAZU_AOKI, 01
+	db       JUNICHI_MASUDA, 02
+	db     TETSUYA_WATANABE, 03
+	db CREDITS_WAIT, 12
+
+	db          GAME_DESIGN, 00
+	db       JUNICHI_MASUDA, 01
+	db     SHIGEKI_MORIMOTO, 02
+	db        KOHJI_NISHINO, 03
+	db CREDITS_WAIT, 12
+
+	db          GAME_DESIGN, 00
+	db         TETSUJI_OOTA, 01
+	db          HITOMI_SATO, 02
+	db     KENJI_MATSUSHIMA, 03
+	db CREDITS_WAIT, 12
+
+	db        GAME_SCENARIO, 00
+	db       JUNICHI_MASUDA, 01
+	db        KOHJI_NISHINO, 02
+	db  TOSHINOBU_MATSUMIYA, 03
+	db     KENJI_MATSUSHIMA, 04
+	db CREDITS_WAIT, 12
+
+	db         POKEDEX_TEXT, 01
+	db  TOSHINOBU_MATSUMIYA, 02
+	db CREDITS_WAIT, 12
+
+	db     TOOL_PROGRAMMING, 01
+	db       SOUSUKE_TAMADA, 02
+	db        TAKENORI_OOTA, 03
+	db CREDITS_WAIT, 12
+
+	db    PARAMETRIC_DESIGN, 01
+	db        KOHJI_NISHINO, 02
+	db CREDITS_WAIT, 12
+
+; Clear the banner.
+	db CREDITS_CLEAR
+
+	db CREDITS_WAIT, 01
+
+; Update the banner.
+	db CREDITS_SCENE, 02 ; Ditto
+
+	db        SCRIPT_DESIGN, 01
+	db         TETSUJI_OOTA, 02
+	db        NOBUHIRO_SEYA, 03
+	db CREDITS_WAIT, 12
+
+	db      MAP_DATA_DESIGN, 01
+	db         TETSUJI_OOTA, 02
+	db      KAZUHITO_SEKINE, 03
+	db CREDITS_WAIT, 12
+
+	db           MAP_DESIGN, 00
+	db         TETSUJI_OOTA, 01
+	db        KOHJI_NISHINO, 02
+	db        NOBUHIRO_SEYA, 03
+	db CREDITS_WAIT, 12
+
+	db         COORDINATION, 01
+	db      HIROYUKI_ZINNAI, 02
+	db CREDITS_WAIT, 12
+
+	db            PRODUCERS, 00
+	db         SATORU_IWATA, 01
+	db       SATOSHI_YAMATO, 02
+	db     SHIGERU_MIYAMOTO, 03
+	db CREDITS_WAIT, 12
+
+	db            PRODUCERS, 01
+	db   TSUNEKAZU_ISHIHARA, 02
+	db CREDITS_WAIT, 12
+
+; Clear the banner.
+	db CREDITS_CLEAR
+
+	db CREDITS_WAIT, 01
+
+; Update the banner.
+	db CREDITS_SCENE, 03 ; Igglybuff
+
+	db     US_VERSION_STAFF, 02
+	db CREDITS_WAIT, 09
+
+	db      US_COORDINATION, 01
+	db          GAIL_TILDEN, 02
+	db        HIRO_NAKAMURA, 03
+	db CREDITS_WAIT, 12
+
+	db      US_COORDINATION, 01
+	db       JUNICHI_MASUDA, 02
+	db        SETH_MCMAHILL, 03
+	db CREDITS_WAIT, 12
+
+	db      US_COORDINATION, 01
+	db     HIROTO_ALEXANDER, 02
+	db     TERESA_LILLYGREN, 03
+	db CREDITS_WAIT, 12
+
+	db     TEXT_TRANSLATION, 01
+	db        NOB_OGASAWARA, 02
+	db CREDITS_WAIT, 12
+
+	db          PROGRAMMERS, 01
+	db      TERUKI_MURAKAWA, 02
+	db      KAZUYOSHI_OSAWA, 03
+	db CREDITS_WAIT, 12
+
+	db         PAAD_TESTING, 01
+	db       THOMAS_HERTZOG, 02
+	db         ERIK_JOHNSON, 03
+	db CREDITS_WAIT, 12
+
+	db      PRODUCT_TESTING, 00
+	db             PLANNING, 01
+	db CREDITS_WAIT, 12
+
+	db      PRODUCT_TESTING, 00
+	db       KEITA_NAKAMURA, 01
+	db      HIROTAKA_UEMURA, 02
+	db       HIROAKI_TAMURA, 03
+	db    NORIAKI_SAKAGUCHI, 04
+	db CREDITS_WAIT, 12
+
+	db      PRODUCT_TESTING, 00
+	db NCL_SUPER_MARIO_CLUB, 01
+	db          KENJI_SAIKI, 02
+	db         ATSUSHI_TADA, 03
+	db          MIYUKI_SATO, 04
+	db CREDITS_WAIT, 12
+
+	db       SPECIAL_THANKS, 00
+	db     KIMIKO_NAKAMICHI, 01
+	db           AKITO_MORI, 02
+	db CREDITS_WAIT, 12
+
+	db       SPECIAL_THANKS, 00
+	db        GAKUZI_NOMOTO, 01
+	db           AI_MASHIMA, 02
+	db      KUNIMI_KAWAMURA, 03
+	db CREDITS_WAIT, 12
+
+	db       SPECIAL_THANKS, 00
+	db    MIKIHIRO_ISHIKAWA, 01
+	db   HIDEYUKI_HASHIMOTO, 02
+	db CREDITS_WAIT, 12
+
+	db   EXECUTIVE_PRODUCER, 01
+	db     HIROSHI_YAMAUCHI, 02
+	db CREDITS_WAIT, 12
+
+	db            COPYRIGHT, 01
+	db CREDITS_WAIT, 09
+
+; Display "The End" graphic.
+	db CREDITS_THEEND
+
+	db CREDITS_WAIT, 20
+
+	db $ff ; end
+; 10ae13
+
+
+CreditsStrings:
+	dw .SatoshiTajiri
+	dw .JunichiMasuda
+	dw .TetsuyaWatanabe
+	dw .ShigekiMorimoto
+	dw .SousukeTamada
+	dw .TakenoriOota
+	dw .KenSugimori
+	dw .MotofumiFujiwara
+	dw .AtsukoNishida
+	dw .MuneoSaito
+	dw .SatoshiOota
+	dw .RenaYoshikawa
+	dw .JunOkutani
+	dw .HironobuYoshida
+	dw .AsukaIwashita
+	dw .GoIchinose
+	dw .MorikazuAoki
+	dw .KohjiNishino
+	dw .KenjiMatsushima
+	dw .ToshinobuMatsumiya
+	dw .SatoruIwata
+	dw .NobuhiroSeya
+	dw .KazuhitoSekine
+	dw .TetsujiOota
+	dw .NclSuperMarioClub
+	dw .Sarugakucho
+	dw .AkitoMori
+	dw .TakahiroHarada
+	dw .TohruHashimoto
+	dw .NoboruMatsumoto
+	dw .TakehiroIzushi
+	dw .TakashiKawaguchi
+	dw .TsunekazuIshihara
+	dw .HiroshiYamauchi
+	dw .KenjiSaiki
+	dw .AtsushiTada
+	dw .NaokoKawakami
+	dw .HiroyukiZinnai
+	dw .KunimiKawamura
+	dw .HisashiSogabe
+	dw .KeitaKagaya
+	dw .YoshinoriMatsuda
+	dw .HitomiSato
+	dw .ToruOsawa
+	dw .TakaoOhara
+	dw .YuichiroIto
+	dw .TakaoShimizu
+	dw .Planning
+	dw .KeitaNakamura
+	dw .HirotakaUemura
+	dw .HiroakiTamura
+	dw .NoriakiSakaguchi
+	dw .MiyukiSato
+	dw .GakuziNomoto
+	dw .AiMashima
+	dw .MikihiroIshikawa
+	dw .HideyukiHashimoto
+	dw .SatoshiYamato
+	dw .ShigeruMiyamoto
+	dw .GailTilden
+	dw .NobOgasawara
+	dw .SethMcMahill
+	dw .HirotoAlexander
+	dw .TeresaLillygren
+	dw .ThomasHertzog
+	dw .ErikJohnson
+	dw .HiroNakamura
+	dw .TerukiMurakawa
+	dw .KazuyoshiOsawa
+	dw .KimikoNakamichi
+	dw .End
+	dw .Unknown
+	dw .Staff
+	dw .Director
+	dw .CoDirector
+	dw .Programmers
+	dw .GraphicsDirector
+	dw .MonsterDesign
+	dw .GraphicsDesign
+	dw .Music
+	dw .SoundEffects
+	dw .GameDesign
+	dw .GameScenario
+	dw .ToolProgramming
+	dw .ParametricDesign
+	dw .ScriptDesign
+	dw .MapDataDesign
+	dw .MapDesign
+	dw .ProductTesting
+	dw .SpecialThanks
+	dw .Producers
+	dw .ExecutiveProducer
+	dw .PokemonAnimation
+	dw .PokedexText
+	dw .MobilePrjLeader
+	dw .MobileSystemAd
+	dw .MobileStadiumDir
+	dw .Coordination
+	dw .Copyright
+	dw .UsVersionStaff
+	dw .UsCoordination
+	dw .TextTranslation
+	dw .PaadTesting
+
+.SatoshiTajiri:       db "   SATOSHI TAJIRI@"         ; "たじり さとし@"
+.JunichiMasuda:       db "   JUNICHI MASUDA@"         ; "ますだ じゅんいち@"
+.TetsuyaWatanabe:     db "  TETSUYA WATANABE@"        ; "わたなべ てつや@"
+.ShigekiMorimoto:     db "  SHIGEKI MORIMOTO@"        ; "もりもと しげき@"
+.SousukeTamada:       db "   SOUSUKE TAMADA@"         ; "たまだ そうすけ@"
+.TakenoriOota:        db "   TAKENORI OOTA@"          ; "おおた たけのり@"
+.KenSugimori:         db "    KEN SUGIMORI@"          ; "すぎもり けん@"
+.MotofumiFujiwara:    db " MOTOFUMI FUJIWARA@"        ; "ふじわら もとふみ@"
+.AtsukoNishida:       db "   ATSUKO NISHIDA@"         ; "にしだ あつこ@"
+.MuneoSaito:          db "    MUNEO SAITO@"           ; "さいとう むねお@"
+.SatoshiOota:         db "    SATOSHI OOTA@"          ; "おおた さとし@"
+.RenaYoshikawa:       db "   RENA YOSHIKAWA@"         ; "よしかわ れな@"
+.JunOkutani:          db "    JUN OKUTANI@"           ; "おくたに じゅん@"
+.HironobuYoshida:     db "  HIRONOBU YOSHIDA@"        ; "よしだ ひろのぶ@"
+.AsukaIwashita:       db "   ASUKA IWASHITA@"         ; "いわした あすか@"
+.GoIchinose:          db "    GO ICHINOSE@"           ; "いちのせ ごう@"
+.MorikazuAoki:        db "   MORIKAZU AOKI@"          ; "あおき もりかず@"
+.KohjiNishino:        db "   KOHJI NISHINO@"          ; "にしの こうじ@"
+.KenjiMatsushima:     db "  KENJI MATSUSHIMA@"        ; "まつしま けんじ@"
+.ToshinobuMatsumiya:  db "TOSHINOBU MATSUMIYA@"       ; "まつみや としのぶ@"
+.SatoruIwata:         db "    SATORU IWATA@"          ; "いわた さとる@"
+.NobuhiroSeya:        db "   NOBUHIRO SEYA@"          ; "せや のぶひろ@"
+.KazuhitoSekine:      db "  KAZUHITO SEKINE@"         ; "せきね かずひと@"
+.TetsujiOota:         db "    TETSUJI OOTA@"          ; "おおた てつじ@"
+.NclSuperMarioClub:   db "NCL SUPER MARIO CLUB@"      ; "スーパーマりォクラブ@"
+.Sarugakucho:         db "    SARUGAKUCHO@"           ; "さるがくちょう@"
+.AkitoMori:           db "     AKITO MORI@"           ; "もり あきと@"
+.TakahiroHarada:      db "  TAKAHIRO HARADA@"         ; "はらだ たかひろ@"
+.TohruHashimoto:      db "  TOHRU HASHIMOTO@"         ; "はしもと とおる@"
+.NoboruMatsumoto:     db "  NOBORU MATSUMOTO@"        ; "まつもと のぼる@"
+.TakehiroIzushi:      db "  TAKEHIRO IZUSHI@"         ; "いずし たけひろ@"
+.TakashiKawaguchi:    db " TAKASHI KAWAGUCHI@"        ; "かわぐち たかし@"
+.TsunekazuIshihara:   db " TSUNEKAZU ISHIHARA@"       ; "いしはら つねかず@"
+.HiroshiYamauchi:     db "  HIROSHI YAMAUCHI@"        ; "やまうち ひろし@"
+.KenjiSaiki:          db "    KENJI SAIKI@"           ; "さいき けんじ@"
+.AtsushiTada:         db "    ATSUSHI TADA@"          ; "ただ あつし@"
+.NaokoKawakami:       db "   NAOKO KAWAKAMI@"         ; "かわかみ なおこ@"
+.HiroyukiZinnai:      db "  HIROYUKI ZINNAI@"         ; "じんない ひろゆき@"
+.KunimiKawamura:      db "  KUNIMI KAWAMURA@"         ; "かわむら くにみ@"
+.HisashiSogabe:       db "   HISASHI SOGABE@"         ; "そがべ ひさし@"
+.KeitaKagaya:         db "    KEITA KAGAYA@"          ; "かがや けいた@"
+.YoshinoriMatsuda:    db " YOSHINORI MATSUDA@"        ; "まつだ よしのり@"
+.HitomiSato:          db "    HITOMI SATO@"           ; "さとう ひとみ@"
+.ToruOsawa:           db "     TORU OSAWA@"           ; "おおさわ とおる@"
+.TakaoOhara:          db "    TAKAO OHARA@"           ; "おおはら たかお@"
+.YuichiroIto:         db "    YUICHIRO ITO@"          ; "いとう ゆういちろう@"
+.TakaoShimizu:        db "   TAKAO SHIMIZU@"          ; "しみず たかお@"
+.Planning:            db " SPECIAL PRODUCTION", $4e
+                      db "      PLANNING", $4e        ; "きかくかいはつぶ@"
+                      db " & DEVELOPMENT DEPT.@"
+.KeitaNakamura:       db "   KEITA NAKAMURA@"         ; "なかむら けいた@"
+.HirotakaUemura:      db "  HIROTAKA UEMURA@"         ; "うえむら ひろたか@"
+.HiroakiTamura:       db "   HIROAKI TAMURA@"         ; "たむら ひろあき@"
+.NoriakiSakaguchi:    db " NORIAKI SAKAGUCHI@"        ; "さかぐち のりあき@"
+.MiyukiSato:          db "    MIYUKI SATO@"           ; "さとう みゆき@"
+.GakuziNomoto:        db "   GAKUZI NOMOTO@"          ; "のもと がくじ@"
+.AiMashima:           db "     AI MASHIMA@"           ; "ましま あい@"
+.MikihiroIshikawa:    db " MIKIHIRO ISHIKAWA@"        ; "いしかわ みきひろ@"
+.HideyukiHashimoto:   db " HIDEYUKI HASHIMOTO@"       ; "はしもと ひでゆき@"
+.SatoshiYamato:       db "   SATOSHI YAMATO@"         ; "やまと さとし@"
+.ShigeruMiyamoto:     db "  SHIGERU MIYAMOTO@"        ; "みやもと しげる@"
+.End:                 db "        END@"               ; "おしまい@"
+.Unknown:             db "      ????????@"            ; "????????@"
+.GailTilden:          db "    GAIL TILDEN@"
+.NobOgasawara:        db "   NOB OGASAWARA@"
+.SethMcMahill:        db "   SETH McMAHILL@"
+.HirotoAlexander:     db "  HIROTO ALEXANDER@"
+.TeresaLillygren:     db "  TERESA LILLYGREN@"
+.ThomasHertzog:       db "   THOMAS HERTZOG@"
+.ErikJohnson:         db "    ERIK JOHNSON@"
+.HiroNakamura:        db "   HIRO NAKAMURA@"
+.TerukiMurakawa:      db "  TERUKI MURAKAWA@"
+.KazuyoshiOsawa:      db "  KAZUYOSHI OSAWA@"
+.KimikoNakamichi:     db "  KIMIKO NAKAMICHI@"
+.Staff:               db "      #MON", $4e            ; "ポケットモンスター", $4e
+                      db "  CRYSTAL VERSION", $4e     ; "  クりスタル バージョン", $4e
+                      db "       STAFF@"              ; "    スタッフ@"
+.Director:            db "      DIRECTOR@"            ; "エグゼクティブ ディレクター@"
+.CoDirector:          db "    CO-DIRECTOR@"           ; "ディレクター@"
+.Programmers:         db "    PROGRAMMERS@"           ; "プログラム@"
+.GraphicsDirector:    db " GRAPHICS DIRECTOR@"        ; "グラフィック ディレクター@"
+.MonsterDesign:       db "   MONSTER DESIGN@"         ; "# デザイン@"
+.GraphicsDesign:      db "  GRAPHICS DESIGN@"         ; "グラフィック デザイン@"
+.Music:               db "       MUSIC@"              ; "おんがく@"
+.SoundEffects:        db "   SOUND EFFECTS@"          ; "サウンド エフ→クト@"
+.GameDesign:          db "    GAME DESIGN@"           ; "ゲームデザイン@"
+.GameScenario:        db "   GAME SCENARIO@"          ; "シナりォ@"
+.ToolProgramming:     db "  TOOL PROGRAMMING@"        ; "ツール プログラム@"
+.ParametricDesign:    db " PARAMETRIC DESIGN@"        ; "パラメーター せってい@"
+.ScriptDesign:        db "   SCRIPT DESIGN@"          ; "スクりプト せってい@"
+.MapDataDesign:       db "  MAP DATA DESIGN@"         ; "マップデータ せってい@"
+.MapDesign:           db "     MAP DESIGN@"           ; "マップ デザイン@"
+.ProductTesting:      db "  PRODUCT TESTING@"         ; "デバッグプレイ@"
+.SpecialThanks:       db "   SPECIAL THANKS@"         ; "スぺシャルサンクス@"
+.Producers:           db "     PRODUCERS@"            ; "プロデューサー@"
+.ExecutiveProducer:   db " EXECUTIVE PRODUCER@"       ; "エグゼクティブ プロデューサー@"
+.PokemonAnimation:    db " #MON ANIMATION@"           ; "# アニメーション@"
+.PokedexText:         db "    #DEX TEXT@"             ; "ずかん テキスト@"
+.MobilePrjLeader:     db " MOBILE PRJ. LEADER@"       ; "モバイルプロジ→クト りーダー@"
+.MobileSystemAd:      db " MOBILE SYSTEM AD.@"        ; "モバイル システムアドバイザー@"
+.MobileStadiumDir:    db "MOBILE STADIUM DIR.@"       ; "モバイルスタジアム ディレクター@"
+.Coordination:        db "    COORDINATION@"          ; "コーディネーター@"
+.UsVersionStaff:      db "  US VERSION STAFF@"
+.UsCoordination:      db "  US COORDINATION@"
+.TextTranslation:     db "  TEXT TRANSLATION@"
+.PaadTesting:         db "    PAAD TESTING@"
+
+.Copyright:
+;  (C) 1  9  9  5 - 2  0  0  1     N  i  n  t  e  n  d  o
+db $60,$61,$62,$63,$64,$65,$66, $67, $68, $69, $6a, $6b, $6c, $4e
+;  (C) 1  9  9  5 - 2  0  0  1    C  r  e  a  t  u  r  e  s      i  n  c .
+db $60,$61,$62,$63,$64,$65,$66, $6d, $6e, $6f, $70, $71, $72,  $7a, $7b, $7c, $4e
+;  (C) 1  9  9  5 - 2  0  0  1  G   A   M   E   F   R   E   A   K     i  n  c .
+db $60,$61,$62,$63,$64,$65,$66, $73, $74, $75, $76, $77, $78, $79,  $7a, $7b, $7c, "@"
+
--- /dev/null
+++ b/engine/joypad.asm
@@ -1,0 +1,275 @@
+JoypadInt: ; 92e
+; Replaced by Joypad, called from VBlank instead of the useless
+; joypad interrupt.
+
+; This is a placeholder in case the interrupt is somehow enabled.
+	reti
+; 92f
+
+ClearJoypadPublic: ; 92f
+	xor a
+; Pressed this frame (delta)
+	ld [hJoyPressed], a
+; Currently pressed
+	ld [hJoyDown], a
+	ret
+; 935
+
+Joypad: ; 935
+; Read the joypad register and translate it to something more
+; workable for use in-game. There are 8 buttons, so we can use
+; one byte to contain all player input.
+
+; Updates:
+
+; hJoypadReleased: released this frame (delta)
+; hJoypadPressed: pressed this frame (delta)
+; hJoypadDown: currently pressed
+; hJoypadSum: pressed so far
+
+; Any of these three bits can be used to disable input.
+	ld a, [$cfbe]
+	and %11010000
+	ret nz
+	
+; If we're saving, input is disabled.
+	ld a, [$c2cd]
+	and a
+	ret nz
+	
+; We can only get four inputs at a time.
+; We take d-pad first for no particular reason.
+	ld a, D_PAD
+	ld [rJOYP], a
+; Read twice to give the request time to take.
+	ld a, [rJOYP]
+	ld a, [rJOYP]
+	
+; The Joypad register output is in the lo nybble (inversed).
+; We make the hi nybble of our new container d-pad input.
+	cpl
+	and $f
+	swap a
+	
+; We'll keep this in b for now.
+	ld b, a
+	
+; Buttons make 8 total inputs (A, B, Select, Start).
+; We can fit this into one byte.
+	ld a, BUTTONS
+	ld [rJOYP], a
+; Wait for input to stabilize.
+	ld a, [rJOYP]
+	ld a, [rJOYP]
+	ld a, [rJOYP]
+	ld a, [rJOYP]
+	ld a, [rJOYP]
+	ld a, [rJOYP]
+; Buttons take the lo nybble.
+	cpl
+	and $f
+	or b
+	ld b, a
+	
+; Reset the joypad register since we're done with it.
+	ld a, $30
+	ld [rJOYP], a
+	
+; To get the delta we xor the last frame's input with the new one.
+	ld a, [hJoypadDown] ; last frame
+	ld e, a
+	xor b
+	ld d, a
+; Released this frame:
+	and e
+	ld [hJoypadReleased], a
+; Pressed this frame:
+	ld a, d
+	and b
+	ld [hJoypadPressed], a
+	
+; Add any new presses to the list of collective presses:
+	ld c, a
+	ld a, [hJoypadSum]
+	or c
+	ld [hJoypadSum], a
+	
+; Currently pressed:
+	ld a, b
+	ld [hJoypadDown], a
+	
+; Now that we have the input, we can do stuff with it.
+
+; For example, soft reset:
+	and BUTTON_A | BUTTON_B | SELECT | START
+	cp  BUTTON_A | BUTTON_B | SELECT | START
+	jp z, $0150 ; reset
+	
+	ret
+; 984
+
+
+GetJoypadPublic: ; 984
+; Update mirror joypad input from hJoypadDown (real input)
+
+; hJoyReleased: released this frame (delta)
+; hJoyPressed: pressed this frame (delta)
+; hJoyDown: currently pressed
+
+; bit 0 A
+;     1 B
+;     2 SELECT
+;     3 START
+;     4 RIGHT
+;     5 LEFT
+;     6 UP
+;     7 DOWN
+
+	push af
+	push hl
+	push de
+	push bc
+	
+; The player input can be automated using an input stream.
+; See more below.
+	ld a, [InputType]
+	cp a, AUTO_INPUT
+	jr z, .auto
+
+; To get deltas, take this and last frame's input.
+	ld a, [hJoypadDown] ; real input
+	ld b, a
+	ld a, [hJoyDown] ; last frame mirror
+	ld e, a
+	
+; Released this frame:
+	xor b
+	ld d, a
+	and e
+	ld [hJoyReleased], a
+	
+; Pressed this frame:
+	ld a, d
+	and b
+	ld [hJoyPressed], a
+	
+; It looks like the collective presses got commented out here.
+	ld c, a
+	
+; Currently pressed:
+	ld a, b
+	ld [hJoyDown], a ; frame input
+	
+.quit
+	pop bc
+	pop de
+	pop hl
+	pop af
+	ret	
+
+.auto
+; Use a predetermined input stream (used in the catching tutorial).
+
+; Stream format: [input][duration]
+; A value of $ff will immediately end the stream.
+
+; Read from the input stream.
+	ld a, [hROMBank]
+	push af
+	ld a, [AutoInputBank]
+	rst Bankswitch
+	
+	ld hl, AutoInputAddress
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	
+; We only update when the input duration has expired.
+	ld a, [AutoInputLength]
+	and a
+	jr z, .updateauto
+	
+; Until then, don't change anything.
+	dec a
+	ld [AutoInputLength], a
+	pop af
+	rst Bankswitch
+	jr .quit
+	
+	
+.updateauto
+; An input of $ff will end the stream.
+	ld a, [hli]
+	cp a, $ff
+	jr z, .stopauto
+	ld b, a
+	
+; A duration of $ff will end the stream indefinitely.
+	ld a, [hli]
+	ld [AutoInputLength], a
+	cp a, $ff
+	jr nz, .next
+	
+; The current input is overwritten.
+	dec hl
+	dec hl
+	ld b, NO_INPUT
+	jr .finishauto
+	
+.next
+; On to the next input...
+	ld a, l
+	ld [AutoInputAddress], a
+	ld a, h
+	ld [AutoInputAddress+1], a
+	jr .finishauto
+	
+.stopauto
+	call StopAutoInput
+	ld b, NO_INPUT
+	
+.finishauto
+	pop af
+	rst Bankswitch
+	ld a, b
+	ld [hJoyPressed], a ; pressed
+	ld [hJoyDown], a ; input
+	jr .quit
+; 9ee
+
+
+StartAutoInput: ; 9ee
+; Start reading automated input stream at a:hl.
+	
+	ld [AutoInputBank], a
+	ld a, l
+	ld [AutoInputAddress], a
+	ld a, h
+	ld [AutoInputAddress+1], a
+; Start reading the stream immediately.
+	xor a
+	ld [AutoInputLength], a
+; Reset input mirrors.
+	xor a
+	ld [hJoyPressed], a ; pressed this frame
+	ld [hJoyReleased], a ; released this frame
+	ld [hJoyDown], a ; currently pressed
+	
+	ld a, AUTO_INPUT
+	ld [InputType], a
+	ret
+; a0a
+
+
+StopAutoInput: ; a0a
+; Clear variables related to automated input.
+	xor a
+	ld [AutoInputBank], a
+	ld [AutoInputAddress], a
+	ld [AutoInputAddress+1], a
+	ld [AutoInputLength], a
+; Back to normal input.
+	ld [InputType], a
+	ret
+; a1b
+
--- /dev/null
+++ b/engine/landmarks.asm
@@ -1,0 +1,539 @@
+GetLandmarkCoords: ; 0x1ca896
+; given a landmark id in e, return the y coord in d, and the x coord in e.
+	push hl
+	ld l, e
+	ld h, $0
+	add hl, hl
+	add hl, hl
+	ld de, Landmarks
+	add hl, de
+	ld a, [hli]
+	ld e, a
+	ld d, [hl]
+	pop hl
+	ret
+
+
+GetLandmarkName: ; 0x1ca8a5
+; given a landmark id in e, copy its name to $d073.
+	push hl
+	push de
+	push bc
+	ld l, e
+	ld h, $0
+	add hl, hl
+	add hl, hl
+	ld de, Landmarks + 2 ; skip the coordinates, we only want the string
+	add hl, de
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	ld de, $d073
+	ld c, 18
+.loop
+	ld a, [hli]
+	ld [de], a
+	inc de
+	dec c
+	jr nz, .loop
+	pop bc
+	pop de
+	pop hl
+	ret
+
+Landmarks: ; 0x1ca8c3
+;db x coord, y coord
+;dw pointer to name 
+	db 0,0
+	dw SpecialMapString
+
+	db 148,116
+	dw NewBarkString
+
+	db 136,116
+	dw Route29String
+
+	db 108,116
+	dw CherrygroveString
+
+	db 108,96
+	dw Route30String
+
+	db 104,76
+	dw Route31String
+
+	db 92,76
+	dw VioletString
+
+	db 93,74
+	dw SproutString
+
+	db 92,108
+	dw Route32String
+
+	db 84,92
+	dw RuinsString
+
+	db 92,140
+	dw UnionString
+
+	db 90,140
+	dw Route33String
+
+	db 76,140
+	dw AzaleaString
+
+	db 78,138
+	dw WellString
+
+	db 60,136
+	dw IlexString
+
+	db 60,128
+	dw Route34String
+
+	db 60,108
+	dw GoldenrodString
+
+	db 58,108
+	dw RadioTowerString
+
+	db 60,92
+	dw Route35String
+
+	db 60,76
+	dw ParkString
+
+	db 72,76
+	dw Route36String
+
+	db 76,68
+	dw Route37String
+
+	db 76,60
+	dw EcruteakString
+
+	db 78,58
+	dw TinString
+
+	db 74,58
+	dw BurnedTowerString
+
+	db 60,60
+	dw Route38String
+
+	db 44,64
+	dw Route39String
+
+	db 44,76
+	dw OlivineString
+
+	db 46,78
+	dw LighthouseString
+
+	db 36,72
+	dw BattleTowerString
+
+	db 36,80
+	dw Route40String
+
+	db 36,108
+	dw WhirlString
+
+	db 36,116
+	dw Route41String
+
+	db 28,116
+	dw CianwoodString
+
+	db 100,60
+	dw Route42String
+
+	db 92,60
+	dw MortarString
+
+	db 116,60
+	dw MahoganyString
+
+	db 116,52
+	dw Route43String
+
+	db 116,44
+	dw LakeString
+
+	db 128,60
+	dw Route44String
+
+	db 138,54
+	dw PathString
+
+	db 140,60
+	dw BlackthornString
+
+	db 140,52
+	dw DenString
+
+	db 140,80
+	dw Route45String
+
+	db 120,88
+	dw DarkString
+
+	db 132,104
+	dw Route46String
+
+	db 156,84
+	dw SilverCaveString
+
+	db 60,124
+	dw PalletString
+
+	db 60,108
+	dw Route1String
+
+	db 60,92
+	dw ViridianString
+
+	db 60,80
+	dw Route2String
+
+	db 60,68
+	dw PewterString
+
+	db 72,68
+	dw Route3String
+
+	db 84,68
+	dw MoonString
+
+	db 96,68
+	dw Route4String
+
+	db 108,68
+	dw CeruleanString
+
+	db 108,60
+	dw Route24String
+
+	db 116,52
+	dw Route25String
+
+	db 108,76
+	dw Route5String
+
+	db 116,92
+	dw UndergroundString
+
+	db 108,92
+	dw Route6String
+
+	db 108,100
+	dw VermilionString
+
+	db 96,76
+	dw DiglettsCaveString
+
+	db 96,84
+	dw Route7String
+
+	db 124,84
+	dw Route8String
+
+	db 124,68
+	dw Route9String
+
+	db 140,68
+	dw TunnelString
+
+	db 140,72
+	dw Route10String
+
+	db 140,76
+	dw PlantString
+
+	db 140,84
+	dw LavenderString
+
+	db 148,84
+	dw LavTowerString
+
+	db 84,84
+	dw CeladonString
+
+	db 108,84
+	dw SaffronString
+
+	db 124,100
+	dw Route11String
+
+	db 140,96
+	dw Route12String
+
+	db 132,116
+	dw Route13String
+
+	db 124,128
+	dw Route14String
+
+	db 112,132
+	dw Route15String
+
+	db 76,84
+	dw Route16String
+
+	db 76,108
+	dw Route17String
+
+	db 88,132
+	dw Route18String
+
+	db 100,132
+	dw FuchsiaString
+
+	db 100,144
+	dw Route19String
+
+	db 84,148
+	dw Route20String
+
+	db 76,148
+	dw SeafoamString
+
+	db 60,148
+	dw CinnabarString
+
+	db 60,136
+	dw Route21String
+
+	db 44,84
+	dw Route22String
+
+	db 36,68
+	dw RoadString
+
+	db 36,60
+	dw Route23String
+
+	db 36,52
+	dw IndigoString
+
+	db 36,108
+	dw Route26String
+
+	db 28,116
+	dw Route27String
+
+	db 20,116
+	dw FallsString
+
+	db 28,84
+	dw Route28String
+
+	db 148,132
+	dw AquaString
+
+NewBarkString:
+	db "NEW BARK",$1F,"TOWN@"
+CherrygroveString:
+	db "CHERRYGROVE",$1F,"CITY@"
+VioletString:
+	db "VIOLET CITY@"
+AzaleaString:
+	db "AZALEA TOWN@"
+GoldenrodString:
+	db "GOLDENROD",$1F,"CITY@"
+EcruteakString:
+	db "ECRUTEAK",$1F,"CITY@"
+OlivineString:
+	db "OLIVINE",$1F,"CITY@"
+CianwoodString:
+	db "CIANWOOD",$1F,"CITY@"
+MahoganyString:
+	db "MAHOGANY",$1F,"TOWN@"
+BlackthornString:
+	db "BLACKTHORN",$1F,"CITY@"
+LakeString:
+	db "LAKE OF",$1F,"RAGE@"
+SilverCaveString:
+	db "SILVER CAVE@"
+SproutString:
+	db "SPROUT",$1F,"TOWER@"
+RuinsString:
+	db "RUINS",$1F,"OF ALPH@"
+UnionString:
+	db "UNION CAVE@"
+WellString:
+	db "SLOWPOKE",$1F,"WELL@"
+RadioTowerString:
+	db "RADIO TOWER@"
+PlantString:
+	db "POWER PLANT@"
+ParkString:
+	db "NATIONAL",$1F,"PARK@"
+TinString:
+	db "TIN TOWER@"
+LighthouseString:
+	db "LIGHTHOUSE@"
+WhirlString:
+	db "WHIRL",$1F,"ISLANDS@"
+MortarString:
+	db "MT.MORTAR@"
+DenString:
+	db "DRAGON'S",$1F,"DEN@"
+PathString:
+	db "ICE PATH@"
+NotApplicableString:
+	db "N/A@"
+PalletString:
+	db "PALLET TOWN@"
+ViridianString:
+	db "VIRIDIAN",$1F,"CITY@"
+PewterString:
+	db "PEWTER CITY@"
+CeruleanString:
+	db "CERULEAN",$1F,"CITY@"
+LavenderString:
+	db "LAVENDER",$1F,"TOWN@"
+VermilionString:
+	db "VERMILION",$1F,"CITY@"
+CeladonString:
+	db "CELADON",$1F,"CITY@"
+SaffronString:
+	db "SAFFRON",$1F,"CITY@"
+FuchsiaString:
+	db "FUCHSIA",$1F,"CITY@"
+CinnabarString:
+	db "CINNABAR",$1F,"ISLAND@"
+IndigoString:
+	db "INDIGO",$1F,"PLATEAU@"
+RoadString:
+	db "VICTORY",$1F,"ROAD@"
+MoonString:
+	db "MT.MOON@"
+TunnelString:
+	db "ROCK TUNNEL@"
+LavTowerString:
+	db "LAV",$1F,"RADIO TOWER@"
+SilphString:
+	db "SILPH CO.@"
+ZoneString:
+	db "SAFARI ZONE@"
+SeafoamString:
+	db "SEAFOAM",$1F,"ISLANDS@"
+MansionString:
+	db "#MON",$1F,"MANSION@"
+DungeonString:
+	db "CERULEAN",$1F,"CAVE@"
+Route1String:
+	db "ROUTE 1@"
+Route2String:
+	db "ROUTE 2@"
+Route3String:
+	db "ROUTE 3@"
+Route4String:
+	db "ROUTE 4@"
+Route5String:
+	db "ROUTE 5@"
+Route6String:
+	db "ROUTE 6@"
+Route7String:
+	db "ROUTE 7@"
+Route8String:
+	db "ROUTE 8@"
+Route9String:
+	db "ROUTE 9@"
+Route10String:
+	db "ROUTE 10@"
+Route11String:
+	db "ROUTE 11@"
+Route12String:
+	db "ROUTE 12@"
+Route13String:
+	db "ROUTE 13@"
+Route14String:
+	db "ROUTE 14@"
+Route15String:
+	db "ROUTE 15@"
+Route16String:
+	db "ROUTE 16@"
+Route17String:
+	db "ROUTE 17@"
+Route18String:
+	db "ROUTE 18@"
+Route19String:
+	db "ROUTE 19@"
+Route20String:
+	db "ROUTE 20@"
+Route21String:
+	db "ROUTE 21@"
+Route22String:
+	db "ROUTE 22@"
+Route23String:
+	db "ROUTE 23@"
+Route24String:
+	db "ROUTE 24@"
+Route25String:
+	db "ROUTE 25@"
+Route26String:
+	db "ROUTE 26@"
+Route27String:
+	db "ROUTE 27@"
+Route28String:
+	db "ROUTE 28@"
+Route29String:
+	db "ROUTE 29@"
+Route30String:
+	db "ROUTE 30@"
+Route31String:
+	db "ROUTE 31@"
+Route32String:
+	db "ROUTE 32@"
+Route33String:
+	db "ROUTE 33@"
+Route34String:
+	db "ROUTE 34@"
+Route35String:
+	db "ROUTE 35@"
+Route36String:
+	db "ROUTE 36@"
+Route37String:
+	db "ROUTE 37@"
+Route38String:
+	db "ROUTE 38@"
+Route39String:
+	db "ROUTE 39@"
+Route40String:
+	db "ROUTE 40@"
+Route41String:
+	db "ROUTE 41@"
+Route42String:
+	db "ROUTE 42@"
+Route43String:
+	db "ROUTE 43@"
+Route44String:
+	db "ROUTE 44@"
+Route45String:
+	db "ROUTE 45@"
+Route46String:
+	db "ROUTE 46@"
+DarkString:
+	db "DARK CAVE@"
+IlexString:
+	db "ILEX",$1F,"FOREST@"
+BurnedTowerString:
+	db "BURNED",$1F,"TOWER@"
+AquaString:
+	db "FAST SHIP@"
+ViridianForestString:
+	db "VIRIDIAN",$1F,"FOREST@"
+DiglettsCaveString:
+	db "DIGLETT'S",$1F,"CAVE@"
+FallsString:
+	db "TOHJO FALLS@"
+UndergroundString:
+	db "UNDERGROUND@"
+BattleTowerString:
+	db "BATTLE",$1F,"TOWER@"
+SpecialMapString:
+	db "SPECIAL@"
+
--- /dev/null
+++ b/engine/scripting.asm
@@ -1,0 +1,3127 @@
+ScriptCommandTable: ; 0x96cb1
+	dw Script_2call
+	dw Script_3call
+	dw Script_2ptcall
+	dw Script_2jump
+	dw Script_3jump
+	dw Script_2ptjump
+	dw Script_if_equal
+	dw Script_if_not_equal
+	dw Script_iffalse
+	dw Script_iftrue
+	dw Script_if_less_than
+	dw Script_if_greater_than
+	dw Script_jumpstd
+	dw Script_callstd
+	dw Script_3callasm
+	dw Script_special
+	dw Script_2ptcallasm
+	dw Script_checkmaptriggers
+	dw Script_domaptrigger
+	dw Script_checktriggers
+	dw Script_dotrigger
+	dw Script_writebyte
+	dw Script_addvar
+	dw Script_random
+	dw Script_checkver
+	dw Script_copybytetovar
+	dw Script_copyvartobyte
+	dw Script_loadvar
+	dw Script_checkcode
+	dw Script_writevarcode
+	dw Script_writecode
+	dw Script_giveitem
+	dw Script_takeitem
+	dw Script_checkitem
+	dw Script_givemoney
+	dw Script_takemoney
+	dw Script_checkmoney
+	dw Script_givecoins
+	dw Script_takecoins
+	dw Script_checkcoins
+	dw Script_addcellnum
+	dw Script_delcellnum
+	dw Script_checkcellnum
+	dw Script_checktime
+	dw Script_checkpoke
+	dw Script_givepoke
+	dw Script_giveegg
+	dw Script_givepokeitem
+	dw Script_checkpokeitem
+	dw Script_checkbit1
+	dw Script_clearbit1
+	dw Script_setbit1
+	dw Script_checkbit2
+	dw Script_clearbit2
+	dw Script_setbit2
+	dw Script_wildoff
+	dw Script_wildon
+	dw Script_xycompare
+	dw Script_warpmod
+	dw Script_blackoutmod
+	dw Script_warp
+	dw Script_readmoney
+	dw Script_readcoins
+	dw Script_RAM2MEM
+	dw Script_pokenamemem
+	dw Script_itemtotext
+	dw Script_mapnametotext
+	dw Script_trainertotext
+	dw Script_stringtotext
+	dw Script_itemnotify
+	dw Script_pocketisfull
+	dw Script_loadfont
+	dw Script_refreshscreen
+	dw Script_loadmovesprites
+	dw Script_loadbytec1ce
+	dw Script_3writetext
+	dw Script_2writetext
+	dw Script_repeattext
+	dw Script_yesorno
+	dw Script_loadmenudata
+	dw Script_writebackup
+	dw Script_jumptextfaceplayer
+	dw Script_3jumptext
+	dw Script_jumptext
+	dw Script_closetext
+	dw Script_keeptextopen
+	dw Script_pokepic
+	dw Script_pokepicyesorno
+	dw Script_interpretmenu
+	dw Script_interpretmenu2
+	dw Script_loadpikachudata
+	dw Script_battlecheck
+	dw Script_loadtrainerdata
+	dw Script_loadpokedata
+	dw Script_loadtrainer
+	dw Script_startbattle
+	dw Script_returnafterbattle
+	dw Script_catchtutorial
+	dw Script_trainertext
+	dw Script_trainerstatus
+	dw Script_winlosstext
+	dw Script_scripttalkafter
+	dw Script_talkaftercancel
+	dw Script_talkaftercheck
+	dw Script_setlasttalked
+	dw Script_applymovement
+	dw Script_applymovement2
+	dw Script_faceplayer
+	dw Script_faceperson
+	dw Script_variablesprite
+	dw Script_disappear
+	dw Script_appear
+	dw Script_follow
+	dw Script_stopfollow
+	dw Script_moveperson
+	dw Script_writepersonxy
+	dw Script_loademote
+	dw Script_showemote
+	dw Script_spriteface
+	dw Script_follownotexact
+	dw Script_earthquake
+	dw Script_changemap
+	dw Script_changeblock
+	dw Script_reloadmap
+	dw Script_reloadmappart
+	dw Script_writecmdqueue
+	dw Script_delcmdqueue
+	dw Script_playmusic
+	dw Script_playrammusic
+	dw Script_musicfadeout
+	dw Script_playmapmusic
+	dw Script_reloadmapmusic
+	dw Script_cry
+	dw Script_playsound
+	dw Script_waitbutton
+	dw Script_warpsound
+	dw Script_specialsound
+	dw Script_passtoengine
+	dw Script_newloadmap
+	dw Script_pause
+	dw Script_deactivatefacing
+	dw Script_priorityjump
+	dw Script_warpcheck
+	dw Script_ptpriorityjump
+	dw Script_return
+	dw Script_end
+	dw Script_reloadandreturn
+	dw Script_resetfuncs
+	dw Script_pokemart
+	dw Script_elevator
+	dw Script_trade
+	dw Script_askforphonenumber
+	dw Script_phonecall
+	dw Script_hangup
+	dw Script_describedecoration
+	dw Script_fruittree
+	dw Script_specialphonecall
+	dw Script_checkphonecall
+	dw Script_verbosegiveitem
+	dw Script_verbosegiveitem2
+	dw Script_loadwilddata
+	dw Script_halloffame
+	dw Script_credits
+	dw Script_warpfacing
+	dw Script_storetext
+	dw Script_displaylocation
+	dw Script_unknown0xa6
+	dw Script_unknown0xa7
+	dw Script_unknown0xa8
+	dw Script_unknown0xa9
+; 0x96e05
+
+Unknown_0x96e05: ; 0x96e05
+    ld hl, $d434
+    set 2, [hl]
+    ret
+; 0x96e0b
+
+Unknown_0x96e0b: ; 0x96e0b
+    ld hl, $d434
+    bit 2, [hl]
+    ret
+; 0x96e11
+
+Unknown_0x96e11: ; 0x96e11
+    ld hl, $d434
+    res 2, [hl]
+    ret
+; 0x96e17
+
+Script_3callasm: ; 0x96e17
+; script command 0xe
+; parameters:
+;     asm (AsmPointerParam)
+
+	call GetScriptByte
+	ld b, a
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld a, b
+	rst $8
+	ret
+; 0x96e26
+
+Script_special: ; 0x96e26
+; script command 0xf
+; parameters:
+;     predefined_script (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld a, $3
+	ld hl, $401b
+	rst $8
+	ret
+; 0x96e35
+
+Script_2ptcallasm: ; 0x96e35
+; script command 0x10
+; parameters:
+;     asm (PointerToAsmPointerParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld b, [hl]
+	inc hl
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	ld a, b
+	rst $8
+	ret
+; 0x96e45
+
+Script_jumptextfaceplayer: ; 0x96e45
+; script command 0x51
+; parameters:
+;     text_pointer (RawTextPointerLabelParam)
+
+	ld a, [ScriptBank]
+	ld [$d44e], a
+	call GetScriptByte
+	ld [$d44f], a
+	call GetScriptByte
+	ld [$d450], a
+	ld b, $25
+	ld hl, $6e79
+	jp ScriptJump
+; 0x96e5f
+
+Script_jumptext: ; 0x96e5f
+; script command 0x53
+; parameters:
+;     text_pointer (RawTextPointerLabelParam)
+
+	ld a, [ScriptBank]
+	ld [$d44e], a
+	call GetScriptByte
+	ld [$d44f], a
+	call GetScriptByte
+	ld [$d450], a
+	ld b, $25
+	ld hl, $6e7a
+	jp ScriptJump
+; 0x96e79
+
+INCBIN "baserom.gbc",$96e79,$96e81 - $96e79
+
+Script_3jumptext: ; 0x96e81
+; script command 0x52
+; parameters:
+;     text_pointer (PointerLabelBeforeBank)
+
+	call GetScriptByte
+	ld [$d44e], a
+	call GetScriptByte
+	ld [$d44f], a
+	call GetScriptByte
+	ld [$d450], a
+	ld b, $25
+	ld hl, $6e7a
+	jp ScriptJump
+; 0x96e9b
+
+Script_2writetext: ; 0x96e9b
+; script command 0x4c
+; parameters:
+;     text_pointer (RawTextPointerLabelParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld a, [ScriptBank]
+	ld b, a
+	call $269a
+	ret
+; 0x96eab
+
+Script_3writetext: ; 0x96eab
+; script command 0x4b
+; parameters:
+;     text_pointer (PointerLabelBeforeBank)
+
+	call GetScriptByte
+	ld b, a
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	call $269a
+	ret
+; 0x96ebb
+
+Script_repeattext: ; 0x96ebb
+; script command 0x4d
+; parameters:
+;     byte (SingleByteParam)
+;     byte (SingleByteParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	cp $ff
+	jr nz, .asm_96ed8 ; 0x96ec5 $11
+	ld a, l
+	cp $ff
+	jr nz, .asm_96ed8 ; 0x96eca $c
+	ld hl, $d44e
+	ld a, [hli]
+	ld b, a
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	call $269a
+	ret
+.asm_96ed8
+	ret
+; 0x96ed9
+
+Script_closetext: ; 0x96ed9
+; script command 0x54
+
+	jp $0a46
+; 0x96edc
+
+Script_keeptextopen: ; 0x96edc
+; script command 0x55
+
+	ld a, [$ffd8]
+	push af
+	ld a, $1
+	ld [$ffd8], a
+	call $31f6
+	call $0aaf
+	pop af
+	ld [$ffd8], a
+	ret
+; 0x96eed
+
+Script_yesorno: ; 0x96eed
+; script command 0x4e
+
+	call $1dcf
+	ld a, $0
+	jr c, .asm_96ef6 ; 0x96ef2 $2
+	ld a, $1
+.asm_96ef6
+	ld [$c2dd], a
+	ret
+; 0x96efa
+
+Script_loadmenudata: ; 0x96efa
+; script command 0x4f
+; parameters:
+;     data (MenuDataPointerParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld de, $1d35
+	ld a, [ScriptBank]
+	call $26b7
+	call $1ad2
+	ret
+; 0x96f0f
+
+Script_writebackup: ; 0x96f0f
+; script command 0x50
+
+	call $1c17
+	call $1ad2
+	ret
+; 0x96f16
+
+Script_pokepic: ; 0x96f16
+; script command 0x56
+; parameters:
+;     pokemon (PokemonParam)
+
+	call GetScriptByte
+	and a
+	jr nz, .asm_96f1f ; 0x96f1a $3
+	ld a, [$c2dd]
+.asm_96f1f
+	ld [$d108], a
+	ld a, $9
+	ld hl, $44e3
+	rst $8
+	ret
+; 0x96f29
+
+Script_pokepicyesorno: ; 0x96f29
+; script command 0x57
+
+	ld a, $9
+	ld hl, $4528
+	rst $8
+	ret
+; 0x96f30
+
+Script_interpretmenu2: ; 0x96f30
+; script command 0x59
+
+	ld a, [ScriptBank]
+	ld hl, $1d81
+	rst $8
+	ld a, [$cfa9]
+	jr nc, .asm_96f3d ; 0x96f3a $1
+	xor a
+.asm_96f3d
+	ld [$c2dd], a
+	ret
+; 0x96f41
+
+Script_interpretmenu: ; 0x96f41
+; script command 0x58
+
+	ld a, [ScriptBank]
+	ld hl, $202a
+	rst $8
+	ld a, [$cf88]
+	jr nc, .asm_96f4e ; 0x96f4b $1
+	xor a
+.asm_96f4e
+	ld [$c2dd], a
+	ret
+; 0x96f52
+
+Script_storetext: ; 0x96f52
+; script command 0xa4
+; parameters:
+;     pointer (PointerLabelBeforeBank)
+;     memory (SingleByteParam)
+
+	call $106c
+	call GetScriptByte
+	ld c, a
+	ld a, $47
+	ld hl, $4000
+	rst $8
+	ret
+; 0x96f60
+
+Script_verbosegiveitem: ; 0x96f60
+; script command 0x9e
+; parameters:
+;     item (ItemLabelByte)
+;     quantity (DecimalParam)
+
+	call $77ca
+	call $7051
+	ld de, $d073
+	ld a, $1
+	call $76c8
+	ld b, $25
+	ld de, $6f77
+	jp $74cb
+; 0x96f76
+
+INCBIN "baserom.gbc",$96f76,$96f8e - $96f76
+
+Script_verbosegiveitem2: ; 0x96f8e
+; script command 0x9f
+; parameters:
+;     item (ItemLabelByte)
+;     var (SingleByteParam)
+
+	call GetScriptByte
+	cp $ff
+	jr nz, .asm_96f98 ; 0x96f93 $3
+	ld a, [$c2dd]
+.asm_96f98
+	ld [$d106], a
+	call GetScriptByte
+	call $769e
+	ld a, [de]
+	ld [$d10c], a
+	ld hl, $d892
+	call $2f66
+	ld a, $1
+	jr c, .asm_96fb0 ; 0x96fad $1
+	xor a
+.asm_96fb0
+	ld [$c2dd], a
+	call $7051
+	ld de, $d073
+	ld a, $1
+	call $76c8
+	ld b, $25
+	ld de, $6f77
+	jp $74cb
+; 0x96fc6
+
+Script_itemnotify: ; 0x96fc6
+; script command 0x45
+
+	call $6ffe
+	call $7051
+	ld b, $25
+	ld hl, $705b
+	call $269a
+	ret
+; 0x96fd5
+
+Script_pocketisfull: ; 0x96fd5
+; script command 0x46
+
+	call $6ffe
+	call $7051
+	ld b, $25
+	ld hl, $7060
+	call $269a
+	ret
+; 0x96fe4
+
+Script_specialsound: ; 0x96fe4
+; script command 0x88
+
+	ld a, $3
+	ld hl, $543d
+	rst $8
+	ld a, [$d142]
+	cp TM_HM
+	ld de, SFX_GET_TM
+	jr z, .play
+	ld de, SFX_ITEM
+.play
+	call StartSFX
+	call WaitSFX
+	ret
+; 0x96ffe
+
+INCBIN "baserom.gbc",$96ffe,$97065 - $96ffe
+
+Script_pokemart: ; 0x97065
+; script command 0x94
+; parameters:
+;     dialog_id (SingleByteParam)
+;     mart_id (MultiByteParam)
+
+	call GetScriptByte
+	ld c, a
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld a, [ScriptBank]
+	ld b, a
+	ld a, $5
+	ld hl, $5a45
+	rst $8
+	ret
+; 0x9707c
+
+Script_elevator: ; 0x9707c
+; script command 0x95
+; parameters:
+;     floor_list_pointer (PointerLabelParam)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld a, [ScriptBank]
+	ld b, a
+	ld a, $4
+	ld hl, $742d
+	rst $8
+	ret c
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x97099
+
+Script_trade: ; 0x97099
+; script command 0x96
+; parameters:
+;     trade_id (SingleByteParam)
+
+	call GetScriptByte
+	ld e, a
+	ld a, $3f
+	ld hl, $4ba8
+	rst $8
+	ret
+; 0x970a4
+
+Script_phonecall: ; 0x970a4
+; script command 0x98
+; parameters:
+;     caller_name (RawTextPointerLabelParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld a, [ScriptBank]
+	ld b, a
+	ld a, $24
+	ld hl, $429a
+	rst $8
+	ret
+; 0x970b7
+
+Script_hangup: ; 0x970b7
+; script command 0x99
+
+	ld a, $24
+	ld hl, $42eb
+	rst $8
+	ret
+; 0x970be
+
+Script_askforphonenumber: ; 0x970be
+; script command 0x97
+; parameters:
+;     number (SingleByteParam)
+
+	call $1dcf
+	jr c, .asm_970d6 ; 0x970c1 $13
+	call GetScriptByte
+	ld c, a
+	ld a, $24
+	ld hl, $4000
+	rst $8
+	jr c, .asm_970d2 ; 0x970cd $3
+	xor a
+	jr .asm_970db ; 0x970d0 $9
+.asm_970d2
+	ld a, $1
+	jr .asm_970db ; 0x970d4 $5
+.asm_970d6
+	call GetScriptByte
+	ld a, $2
+.asm_970db
+	ld [$c2dd], a
+	ret
+; 0x970df
+
+Script_describedecoration: ; 0x970df
+; script command 0x9a
+; parameters:
+;     byte (SingleByteParam)
+
+	call GetScriptByte
+	ld b, a
+	ld a, $9
+	ld hl, $6f59
+	rst $8
+	ld h, d
+	ld l, e
+	jp ScriptJump
+; 0x970ee
+
+Script_fruittree: ; 0x970ee
+; script command 0x9b
+; parameters:
+;     tree_id (SingleByteParam)
+
+	call GetScriptByte
+	ld [CurFruitTree], a
+	ld b, BANK(FruitTreeScript)
+	ld hl, FruitTreeScript
+	jp ScriptJump
+; 0x970fc
+
+Script_loadwilddata: ; 0x970fc
+; script command 0xa0
+; parameters:
+;     map_group (MapGroupParam)
+;     map_id (MapIdParam)
+
+	call GetScriptByte
+	ld c, a
+	call GetScriptByte
+	ld d, a
+	call GetScriptByte
+	ld e, a
+	ld a, $3
+	ld hl, $4403
+	rst $8
+	ret
+; 0x9710f
+
+Script_trainertext: ; 0x9710f
+; script command 0x62
+; parameters:
+;     which_text (SingleByteParam)
+
+	call GetScriptByte
+	ld c, a
+	ld b, $0
+	ld hl, $d045
+	add hl, bc
+	add hl, bc
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	ld a, [$d03e]
+	ld b, a
+	call $269a
+	ret
+; 0x97125
+
+Script_scripttalkafter: ; 0x97125
+; script command 0x65
+
+	ld hl, $d04b
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	ld a, [$d03e]
+	ld b, a
+	jp ScriptJump
+; 0x97132
+
+Script_trainerstatus: ; 0x97132
+; script command 0x63
+; parameters:
+;     action (SingleByteParam)
+
+	xor a
+	ld [$c2dd], a
+	ld hl, $d041
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	call GetScriptByte
+	ld b, a
+	call BitTable1Func
+	ld a, c
+	and a
+	ret z
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x9714c
+
+Script_winlosstext: ; 0x9714c
+; script command 0x64
+; parameters:
+;     win_text_pointer (TextPointerLabelParam)
+;     loss_text_pointer (TextPointerLabelParam)
+
+	ld hl, $d047
+	call GetScriptByte
+	ld [hli], a
+	call GetScriptByte
+	ld [hli], a
+	ld hl, $d049
+	call GetScriptByte
+	ld [hli], a
+	call GetScriptByte
+	ld [hli], a
+	ret
+; 0x97163
+
+Script_talkaftercancel: ; 0x97163
+; script command 0x66
+
+	ld a, [$d04d]
+	and a
+	ret z
+	jp $7b74
+; 0x9716b
+
+Script_talkaftercheck: ; 0x9716b
+; script command 0x67
+
+	ld a, $1
+	ld [$c2dd], a
+	ld a, [$d04d]
+	and a
+	ret nz
+	xor a
+	ld [$c2dd], a
+	ret
+; 0x9717a
+
+Script_playrammusic: ; 0x9717a
+; script command 0x80
+
+	ld a, [$d22f]
+	ld e, a
+	ld a, $3a
+	ld hl, $500a
+	rst $8
+	ret
+; 0x97185
+
+Script_playmapmusic: ; 0x97185
+; script command 0x82
+
+	call $3cdf
+	ret
+; 0x97189
+
+Script_playmusic: ; 0x97189
+; script command 0x7f
+; parameters:
+;     music_pointer (MultiByteParam)
+
+	ld de, $0000
+	call StartMusic
+	xor a
+	ld [$c2a7], a
+	call MaxVolume
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	call StartMusic
+	ret
+; 0x971a2
+
+Script_musicfadeout: ; 0x971a2
+; script command 0x81
+; parameters:
+;     music (MultiByteParam)
+;     fadetime (SingleByteParam)
+
+	call GetScriptByte
+	ld [$c2a9], a
+	call GetScriptByte
+	ld [$c2aa], a
+	call GetScriptByte
+	and $7f
+	ld [$c2a7], a
+	ret
+; 0x971b7
+
+Script_playsound: ; 0x971b7
+; script command 0x85
+; parameters:
+;     sound_pointer (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	call StartSFX
+	ret
+; 0x971c3
+
+Script_waitbutton: ; 0x971c3
+; script command 0x86
+
+	call WaitSFX
+	ret
+; 0x971c7
+
+Script_warpsound: ; 0x971c7
+; script command 0x87
+
+	ld a, $5
+	ld hl, $4a07
+	rst $8
+	call StartSFX
+	ret
+; 0x971d1
+
+Script_cry: ; 0x971d1
+; script command 0x84
+; parameters:
+;     cry_id (MultiByteParam)
+
+	call GetScriptByte
+	push af
+	call GetScriptByte
+	pop af
+	and a
+	jr nz, .asm_971df ; 0x971da $3
+	ld a, [$c2dd]
+.asm_971df
+	call $37ce
+	ret
+; 0x971e3
+
+Unknown_0x971e3: ; 0x971e3
+    and a
+    ret z
+    cp $fe
+    ret z
+    dec a
+    ret
+; 0x971ea
+
+Script_setlasttalked: ; 0x971ea
+; script command 0x68
+; parameters:
+;     person (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	ld [$ffe0], a
+	ret
+; 0x971f3
+
+Script_applymovement: ; 0x971f3
+; script command 0x69
+; parameters:
+;     person (SingleByteParam)
+;     data (MovementPointerLabelParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	ld c, a
+	push bc
+	ld a, c
+	ld a, $1
+	ld hl, $585c
+	rst $8
+	pop bc
+	push bc
+	call $7221
+	pop bc
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld a, [ScriptBank]
+	ld b, a
+	call $26c7
+	ret c
+	ld a, $2
+	ld [$d437], a
+	call Unknown_0x96e11
+	ret
+; 0x97221
+
+Unknown_0x97221: ; 0x97221
+    ld a, $1
+    ld hl, $5897
+    rst $8
+    ret
+; 0x97228
+
+Script_applymovement2: ; 0x97228
+; script command 0x6a
+; parameters:
+;     data (MovementPointerLabelParam)
+
+	ld a, [$ffe0]
+	ld c, a
+	jp $71fa
+; 0x9722e
+
+Script_faceplayer: ; 0x9722e
+; script command 0x6b
+
+	ld a, [$ffe0]
+	and a
+	ret z
+	ld d, $0
+	ld a, [$ffe0]
+	ld e, a
+	ld a, $2
+	ld hl, $4417
+	rst $8
+	ld a, d
+	add a
+	add a
+	ld e, a
+	ld a, [$ffe0]
+	ld d, a
+	call $728b
+	ret
+; 0x97248
+
+Script_faceperson: ; 0x97248
+; script command 0x6c
+; parameters:
+;     person1 (SingleByteParam)
+;     person2 (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	cp $fe
+	jr c, .asm_97254 ; 0x97250 $2
+	ld a, [$ffe0]
+.asm_97254
+	ld e, a
+	call GetScriptByte
+	call Unknown_0x971e3
+	cp $fe
+	jr nz, .asm_97261 ; 0x9725d $2
+	ld a, [$ffe0]
+.asm_97261
+	ld d, a
+	push de
+	ld a, $2
+	ld hl, $4417
+	rst $8
+	pop bc
+	ret c
+	ld a, d
+	add a
+	add a
+	ld e, a
+	ld d, c
+	call $728b
+	ret
+; 0x97274
+
+Script_spriteface: ; 0x97274
+; script command 0x76
+; parameters:
+;     person (SingleByteParam)
+;     facing (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	cp $fe
+	jr nz, .asm_97280 ; 0x9727c $2
+	ld a, [$ffe0]
+.asm_97280
+	ld d, a
+	call GetScriptByte
+	add a
+	add a
+	ld e, a
+	call $728b
+	ret
+; 0x9728b
+
+Unknown_0x9728b: ; 0x9728b
+    ld a, d
+    push de
+    call $18de
+    jr c, .asm_972b9 ; 0x97290 $27
+    ld hl, $0000
+    add hl, bc
+    ld a, [hl]
+    push bc
+    call $1836
+    pop bc
+    jr c, .asm_972b9 ; 0x9729c $1b
+    ld hl, $0004
+    add hl, bc
+    bit 2, [hl]
+    jr nz, .asm_972b9 ; 0x972a4 $13
+    pop de
+    ld a, e
+    call $1af8
+    ld hl, $d0ed
+    bit 6, [hl]
+    jr nz, .asm_972b5 ; 0x972b0 $3
+    call $72bc
+.asm_972b5
+    call $1ad2
+    ret
+.asm_972b9
+    pop de
+    scf
+    ret
+; 0x972bc
+
+Unknown_0x972bc: ; 0x972bc
+    call $217a
+    ld hl, $c4a0
+    ld bc, $0168
+.asm_972c5
+    res 7, [hl]
+    inc hl
+    dec bc
+    ld a, b
+    or c
+    jr nz, .asm_972c5 ; 0x972cb $f8
+    ret
+; 0x972ce
+
+Script_variablesprite: ; 0x972ce
+; script command 0x6d
+; parameters:
+;     byte (SingleByteParam)
+;     sprite (SingleByteParam)
+
+	call GetScriptByte
+	ld e, a
+	ld d, $0
+	ld hl, $d82e
+	add hl, de
+	call GetScriptByte
+	ld [hl], a
+	ret
+; 0x972dd
+
+Script_appear: ; 0x972dd
+; script command 0x6f
+; parameters:
+;     person (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	call $1956
+	ld a, [$ffaf]
+	ld b, $0
+	call $730b
+	ret
+; 0x972ee
+
+Script_disappear: ; 0x972ee
+; script command 0x6e
+; parameters:
+;     person (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	cp $fe
+	jr nz, .asm_972fa ; 0x972f6 $2
+	ld a, [$ffe0]
+.asm_972fa
+	call $199f
+	ld a, [$ffaf]
+	ld b, $1
+	call $730b
+	ld a, $1
+	ld hl, $5920
+	rst $8
+	ret
+; 0x9730b
+
+Unknown_0x9730b: ; 0x9730b
+    push bc
+    call $18d2
+    ld hl, $000c
+    add hl, bc
+    pop bc
+    ld e, [hl]
+    inc hl
+    ld d, [hl]
+    ld a, $ff
+    cp e
+    jr nz, .asm_97321 ; 0x9731a $5
+    cp d
+    jr nz, .asm_97321 ; 0x9731d $2
+    xor a
+    ret
+.asm_97321
+    call BitTable1Func
+    ret
+; 0x97325
+
+Script_follow: ; 0x97325
+; script command 0x70
+; parameters:
+;     person2 (SingleByteParam)
+;     person1 (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	ld b, a
+	call GetScriptByte
+	call Unknown_0x971e3
+	ld c, a
+	ld a, $1
+	ld hl, $5803
+	rst $8
+	ret
+; 0x9733a
+
+Script_stopfollow: ; 0x9733a
+; script command 0x71
+
+	ld a, $1
+	ld hl, $581f
+	rst $8
+	ret
+; 0x97341
+
+Script_moveperson: ; 0x97341
+; script command 0x72
+; parameters:
+;     person (SingleByteParam)
+;     x (SingleByteParam)
+;     y (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	ld b, a
+	call GetScriptByte
+	add $4
+	ld d, a
+	call GetScriptByte
+	add $4
+	ld e, a
+	ld a, $2
+	ld hl, $407e
+	rst $8
+	ret
+; 0x9735b
+
+Script_writepersonxy: ; 0x9735b
+; script command 0x73
+; parameters:
+;     person (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	cp $fe
+	jr nz, .asm_97367 ; 0x97363 $2
+	ld a, [$ffe0]
+.asm_97367
+	ld b, a
+	ld a, $2
+	ld hl, $40a1
+	rst $8
+	ret
+; 0x9736f
+
+Script_follownotexact: ; 0x9736f
+; script command 0x77
+; parameters:
+;     person2 (SingleByteParam)
+;     person1 (SingleByteParam)
+
+	call GetScriptByte
+	call Unknown_0x971e3
+	ld b, a
+	call GetScriptByte
+	call Unknown_0x971e3
+	ld c, a
+	ld a, $2
+	ld hl, $439e
+	rst $8
+	ret
+; 0x97384
+
+Script_loademote: ; 0x97384
+; script command 0x74
+; parameters:
+;     bubble (SingleByteParam)
+
+	call GetScriptByte
+	cp $ff
+	jr nz, .asm_9738e ; 0x97389 $3
+	ld a, [$c2dd]
+.asm_9738e
+	ld c, a
+	ld a, $5
+	ld hl, $442f
+	rst $8
+	ret
+; 0x97396
+
+Script_showemote: ; 0x97396
+; script command 0x75
+; parameters:
+;     bubble (SingleByteParam)
+;     person (SingleByteParam)
+;     time (DecimalParam)
+
+	call GetScriptByte
+	ld [$c2dd], a
+	call GetScriptByte
+	call Unknown_0x971e3
+	cp $fe
+	jr z, .asm_973a8 ; 0x973a4 $2
+	ld [$ffe0], a
+.asm_973a8
+	call GetScriptByte
+	ld [$d44d], a
+	ld b, $25
+	ld de, $73b6
+	jp $74cb
+; 0x973b6
+
+INCBIN "baserom.gbc",$973b6,$973c7 - $973b6
+
+Script_earthquake: ; 0x973c7
+; script command 0x78
+; parameters:
+;     param (DecimalParam)
+
+	ld hl, $73eb
+	ld de, $d002
+	ld bc, $0005
+	call CopyBytes
+	call GetScriptByte
+	ld [$d003], a
+	and $3f
+	ld [$d005], a
+	ld b, $25
+	ld de, $73e6
+	jp $74cb
+; 0x973e6
+
+INCBIN "baserom.gbc",$973e6,$973f0 - $973e6
+
+Script_loadpikachudata: ; 0x973f0
+; script command 0x5a
+
+	ld a, $19
+	ld [$d22e], a
+	ld a, $5
+	ld [$d143], a
+	ret
+; 0x973fb
+
+Script_battlecheck: ; 0x973fb
+; script command 0x5b
+
+	xor a
+	ld [$d459], a
+	ret
+; 0x97400
+
+Script_loadtrainerdata: ; 0x97400
+; script command 0x5c
+
+	ld a, $81
+	ld [$d459], a
+	ld a, [$d043]
+	ld [$d22f], a
+	ld a, [$d044]
+	ld [$d231], a
+	ret
+; 0x97412
+
+Script_loadpokedata: ; 0x97412
+; script command 0x5d
+; parameters:
+;     pokemon (PokemonParam)
+;     level (DecimalParam)
+
+	ld a, $80
+	ld [$d459], a
+	call GetScriptByte
+	ld [$d22e], a
+	call GetScriptByte
+	ld [$d143], a
+	ret
+; 0x97424
+
+Script_loadtrainer: ; 0x97424
+; script command 0x5e
+; parameters:
+;     trainer_group (TrainerGroupParam)
+;     trainer_id (TrainerIdParam)
+
+	ld a, $81
+	ld [$d459], a
+	call GetScriptByte
+	ld [$d22f], a
+	call GetScriptByte
+	ld [$d231], a
+	ret
+; 0x97436
+
+Script_startbattle: ; 0x97436
+; script command 0x5f
+
+	call $2879
+	ld a, $16
+	call $2d83
+	ld a, [$d0ee]
+	and $3f
+	ld [$c2dd], a
+	ret
+; 0x97447
+
+Script_catchtutorial: ; 0x97447
+; script command 0x61
+; parameters:
+;     byte (SingleByteParam)
+
+	call GetScriptByte
+	ld [$d230], a
+	call $2879
+	ld a, $13
+	ld hl, $6554
+	rst $8
+	jp $7491
+; 0x97459
+
+Script_returnafterbattle: ; 0x97459
+; script command 0x60
+
+	ld hl, $d459
+	ld d, [hl]
+	ld [hl], $0
+	ld a, [$d0ee]
+	and $3f
+	cp $1
+	jr nz, .asm_97470 ; 0x97466 $8
+	ld b, $4
+	ld hl, $64c1
+	jp ScriptJump
+.asm_97470
+	bit 0, d
+	jr z, .asm_9747c ; 0x97472 $8
+	ld a, $3f
+	ld hl, $4fec
+	rst $8
+	jr .asm_9748e ; 0x9747a $12
+.asm_9747c
+	ld a, [$d0ee]
+	bit 7, a
+	jr z, .asm_9748e ; 0x97481 $b
+	ld b, $24
+	ld de, $4255
+	ld a, $25
+	ld hl, $7c4f
+	rst $8
+.asm_9748e
+	jp $7491
+; 0x97491
+
+Script_reloadmap: ; 0x97491
+; script command 0x7b
+
+	xor a
+	ld [$d459], a
+	ld a, $f3
+	ld [$ff9f], a
+	ld a, $1
+	call $261b
+	call Unknown_0x96e11
+	ret
+; 0x974a2
+
+Script_2call: ; 0x974a2
+; script command 0x0
+; parameters:
+;     pointer (ScriptPointerLabelParam)
+
+	ld a, [ScriptBank]
+	ld b, a
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	jr ScriptCall
+; 0x974b0
+
+Script_3call: ; 0x974b0
+; script command 0x1
+; parameters:
+;     pointer (ScriptPointerLabelBeforeBank)
+
+	call GetScriptByte
+	ld b, a
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	jr ScriptCall
+; 0x974be
+
+Script_2ptcall: ; 0x974be
+; script command 0x2
+; parameters:
+;     pointer (PointerLabelToScriptPointer)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld b, [hl]
+	inc hl
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	; fallthrough
+
+ScriptCall: ; 0x974cb
+	push de
+	ld hl, $d43c
+	ld e, [hl]
+	inc [hl]
+	ld d, $0
+	ld hl, $d43d
+	add hl, de
+	add hl, de
+	add hl, de
+	pop de
+	ld a, [ScriptBank]
+	ld [hli], a
+	ld a, [ScriptPos]
+	ld [hli], a
+	ld a, [ScriptPos + 1]
+	ld [hl], a
+	ld a, b
+	ld [ScriptBank], a
+	ld a, e
+	ld [ScriptPos], a
+	ld a, d
+	ld [ScriptPos + 1], a
+	ret
+; 0x974f3
+
+Unknown_0x974f3: ; 0x974f3
+    ld a, [ScriptBank]
+    or $80
+    ld [ScriptBank], a
+    jp $74cb
+; 0x974fe
+
+Script_2jump: ; 0x974fe
+; script command 0x3
+; parameters:
+;     pointer (ScriptPointerLabelParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld a, [ScriptBank]
+	ld b, a
+	jp ScriptJump
+; 0x9750d
+
+Script_3jump: ; 0x9750d
+; script command 0x4
+; parameters:
+;     pointer (ScriptPointerLabelBeforeBank)
+
+	call GetScriptByte
+	ld b, a
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	jp ScriptJump
+; 0x9751c
+
+Script_2ptjump: ; 0x9751c
+; script command 0x5
+; parameters:
+;     pointer (PointerLabelToScriptPointer)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld b, [hl]
+	inc hl
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	jp ScriptJump
+; 0x9752c
+
+Script_iffalse: ; 0x9752c
+; script command 0x8
+; parameters:
+;     pointer (ScriptPointerLabelParam)
+
+	ld a, [$c2dd]
+	and a
+	jp nz, $7596
+	jp Script_2jump
+; 0x97536
+
+Script_iftrue: ; 0x97536
+; script command 0x9
+; parameters:
+;     pointer (ScriptPointerLabelParam)
+
+	ld a, [$c2dd]
+	and a
+	jp nz, Script_2jump
+	jp $7596
+; 0x97540
+
+Script_if_equal: ; 0x97540
+; script command 0x6
+; parameters:
+;     byte (SingleByteParam)
+;     pointer (ScriptPointerLabelParam)
+
+	call GetScriptByte
+	ld hl, $c2dd
+	cp [hl]
+	jr z, Script_2jump ; 0x97547 $b5
+	jr Unknown_97596 ; 0x97549 $4b
+; 0x9754b
+
+Script_if_not_equal: ; 0x9754b
+; script command 0x7
+; parameters:
+;     byte (SingleByteParam)
+;     pointer (ScriptPointerLabelParam)
+
+	call GetScriptByte
+	ld hl, $c2dd
+	cp [hl]
+	jr nz, Script_2jump ; 0x97552 $aa
+	jr Unknown_97596 ; 0x97554 $40
+; 0x97556
+
+Script_if_less_than: ; 0x97556
+; script command 0xa
+; parameters:
+;     byte (SingleByteParam)
+;     pointer (ScriptPointerLabelParam)
+
+	ld a, [$c2dd]
+	ld b, a
+	call GetScriptByte
+	cp b
+	jr c, Script_2jump ; 0x9755e $9e
+	jr Unknown_97596 ; 0x97560 $34
+; 0x97562
+
+Script_if_greater_than: ; 0x97562
+; script command 0xb
+; parameters:
+;     byte (SingleByteParam)
+;     pointer (ScriptPointerLabelParam)
+
+	call GetScriptByte
+	ld b, a
+	ld a, [$c2dd]
+	cp b
+	jr c, Script_2jump ; 0x9756a $92
+	jr Unknown_97596 ; 0x9756c $28
+; 0x9756e
+
+Script_jumpstd: ; 0x9756e
+; script command 0xc
+; parameters:
+;     predefined_script (MultiByteParam)
+
+	call $757b
+	jr ScriptJump ; 0x97571 $2a
+; 0x97573
+
+Script_callstd: ; 0x97573
+; script command 0xd
+; parameters:
+;     predefined_script (MultiByteParam)
+
+	call $757b
+	ld d, h
+	ld e, l
+	jp $74cb
+; 0x9757b
+
+Unknown_0x9757b: ; 0x9757b
+    call GetScriptByte
+    ld e, a
+    call GetScriptByte
+    ld d, a
+    ld hl, $4000
+    add hl, de
+    add hl, de
+    add hl, de
+    ld a, $2f
+    call GetFarByte
+    ld b, a
+    inc hl
+    ld a, $2f
+    call GetFarHalfword
+    ret
+; 0x97596
+
+Unknown_97596: ; 0x97596
+	call GetScriptByte
+	call GetScriptByte
+	ret
+; 0x9759d
+
+ScriptJump: ; 0x9759d
+	ld a, b
+	ld [ScriptBank], a
+	ld a, l
+	ld [ScriptPos], a
+	ld a, h
+	ld [ScriptPos + 1], a
+	ret
+; 0x975aa
+
+Script_priorityjump: ; 0x975aa
+; script command 0x8d
+; parameters:
+;     pointer (ScriptPointerLabelParam)
+
+	ld a, [ScriptBank]
+	ld [$d44e], a
+	call GetScriptByte
+	ld [$d44f], a
+	call GetScriptByte
+	ld [$d450], a
+	ld hl, $d434
+	set 3, [hl]
+	ret
+; 0x975c2
+
+Script_checktriggers: ; 0x975c2
+; script command 0x13
+
+	call $211b
+	jr z, .asm_975cb ; 0x975c5 $4
+	ld [$c2dd], a
+	ret
+.asm_975cb
+	ld a, $ff
+	ld [$c2dd], a
+	ret
+; 0x975d1
+
+Script_checkmaptriggers: ; 0x975d1
+; script command 0x11
+; parameters:
+;     map_group (SingleByteParam)
+;     map_id (SingleByteParam)
+
+	call GetScriptByte
+	ld b, a
+	call GetScriptByte
+	ld c, a
+	call $2147
+	ld a, d
+	or e
+	jr z, .asm_975e5 ; 0x975de $5
+	ld a, [de]
+	ld [$c2dd], a
+	ret
+.asm_975e5
+	ld a, $ff
+	ld [$c2dd], a
+	ret
+; 0x975eb
+
+Script_dotrigger: ; 0x975eb
+; script command 0x14
+; parameters:
+;     trigger_id (SingleByteParam)
+
+	ld a, [$dcb5]
+	ld b, a
+	ld a, [$dcb6]
+	ld c, a
+	jr Unknown_975fd ; 0x975f3 $8
+; 0x975f5
+
+Script_domaptrigger: ; 0x975f5
+; script command 0x12
+; parameters:
+;     map_group (MapGroupParam)
+;     map_id (MapIdParam)
+;     trigger_id (SingleByteParam)
+
+	call GetScriptByte
+	ld b, a
+	call GetScriptByte
+	ld c, a
+	; fallthrough
+
+Unknown_975fd: ; 0x975fd
+	call $2147
+	ld a, d
+	or e
+	jr z, .asm_97608 ; 0x97602 $4
+	call GetScriptByte
+	ld [de], a
+.asm_97608
+	ret
+; 0x97609
+
+Script_copybytetovar: ; 0x97609
+; script command 0x19
+; parameters:
+;     address (RAMAddressParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld a, [hl]
+	ld [$c2dd], a
+	ret
+; 0x97616
+
+Script_copyvartobyte: ; 0x97616
+; script command 0x1a
+; parameters:
+;     address (RAMAddressParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld a, [$c2dd]
+	ld [hl], a
+	ret
+; 0x97623
+
+Script_loadvar: ; 0x97623
+; script command 0x1b
+; parameters:
+;     address (RAMAddressParam)
+;     value (SingleByteParam)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	call GetScriptByte
+	ld [hl], a
+	ret
+; 0x97630
+
+Script_writebyte: ; 0x97630
+; script command 0x15
+; parameters:
+;     value (SingleByteParam)
+
+	call GetScriptByte
+	ld [$c2dd], a
+	ret
+; 0x97637
+
+Script_addvar: ; 0x97637
+; script command 0x16
+; parameters:
+;     value (SingleByteParam)
+
+	call GetScriptByte
+	ld hl, $c2dd
+	add [hl]
+	ld [hl], a
+	ret
+; 0x97640
+
+Script_random: ; 0x97640
+; script command 0x17
+; parameters:
+;     input (SingleByteParam)
+
+	call GetScriptByte
+	ld [$c2dd], a
+	and a
+	ret z
+	ld c, a
+	call $7673
+	and a
+	jr z, .asm_9765f ; 0x9764d $10
+	ld b, a
+	xor a
+	sub b
+	ld b, a
+.asm_97653
+	push bc
+	call $2f8c
+	pop bc
+	ld a, [$ffe1]
+	cp b
+	jr nc, .asm_97653 ; 0x9765b $f6
+	jr .asm_97666 ; 0x9765d $7
+.asm_9765f
+	push bc
+	call $2f8c
+	pop bc
+	ld a, [$ffe1]
+.asm_97666
+	push af
+	ld a, [$c2dd]
+	ld c, a
+	pop af
+	call $3110
+	ld [$c2dd], a
+	ret
+; 0x97673
+
+Unknown_0x97673: ; 0x97673
+    xor a
+    ld b, a
+    sub c
+.asm_97676
+    inc b
+    sub c
+    jr nc, .asm_97676 ; 0x97678 $fc
+    dec b
+    add c
+    ret
+; 0x9767d
+
+Script_checkcode: ; 0x9767d
+; script command 0x1c
+; parameters:
+;     variable_id (SingleByteParam)
+
+	call GetScriptByte
+	call $769e
+	ld a, [de]
+	ld [$c2dd], a
+	ret
+; 0x97688
+
+Script_writevarcode: ; 0x97688
+; script command 0x1d
+; parameters:
+;     variable_id (SingleByteParam)
+
+	call GetScriptByte
+	call $769e
+	ld a, [$c2dd]
+	ld [de], a
+	ret
+; 0x97693
+
+Script_writecode: ; 0x97693
+; script command 0x1e
+; parameters:
+;     variable_id (SingleByteParam)
+;     value (SingleByteParam)
+
+	call GetScriptByte
+	call $769e
+	call GetScriptByte
+	ld [de], a
+	ret
+; 0x9769e
+
+Unknown_0x9769e: ; 0x9769e
+    ld c, a
+    ld a, $20
+    ld hl, $4648
+    rst $8
+    ret
+; 0x976a6
+
+Script_checkver: ; 0x976a6
+; script command 0x18
+
+	ld a, [$76ad]
+	ld [$c2dd], a
+	ret
+; 0x976ad
+
+INCBIN "baserom.gbc",$976ad,$976ae - $976ad
+
+Script_pokenamemem: ; 0x976ae
+; script command 0x40
+; parameters:
+;     pokemon (PokemonParam)
+;     memory (SingleByteParam)
+
+	call GetScriptByte
+	and a
+	jr nz, .asm_976b7 ; 0x976b2 $3
+	ld a, [$c2dd]
+.asm_976b7
+	ld [$d265], a
+	call $343b
+	ld de, $d073
+
+Unknown_976c0: ; 0x976c0
+	call GetScriptByte
+	cp $3
+	jr c, .asm_976c8 ; 0x976c5 $1
+	xor a
+.asm_976c8
+	ld hl, $d099
+	ld bc, $0013
+	call AddNTimes
+	call CopyName2
+	ret
+; 0x976d5
+
+Script_itemtotext: ; 0x976d5
+; script command 0x41
+; parameters:
+;     item (ItemLabelByte)
+;     memory (SingleByteParam)
+
+	call GetScriptByte
+	and a
+	jr nz, .asm_976de ; 0x976d9 $3
+	ld a, [$c2dd]
+.asm_976de
+	ld [$d265], a
+	call GetItemName
+	ld de, $d073
+	jr Unknown_976c0 ; 0x976e7 $d7
+; 0x976e9
+
+Script_mapnametotext: ; 0x976e9
+; script command 0x42
+; parameters:
+;     memory (SingleByteParam)
+
+	ld a, [$dcb5]
+	ld b, a
+	ld a, [$dcb6]
+	ld c, a
+	call GetWorldMapLocation
+
+Unknown_976f4: ; 0x976f4
+	ld e, a
+	ld a, $72
+	ld hl, $68a5
+	rst $8
+	ld de, $d073
+	jp $76c0
+; 0x97701
+
+Script_displaylocation: ; 0x97701
+; script command 0xa5
+; parameters:
+;     id (SingleByteParam)
+
+	call GetScriptByte
+	jr Unknown_976f4 ; 0x97704 $ee
+; 0x97706
+
+Script_trainertotext: ; 0x97706
+; script command 0x43
+; parameters:
+;     trainer_id (TrainerGroupParam)
+;     trainer_group (TrainerIdParam)
+;     memory (SingleByteParam)
+
+	call GetScriptByte
+	ld c, a
+	call GetScriptByte
+	ld b, a
+	ld a, $e
+	ld hl, $594c
+	rst $8
+	jr Unknown_976c0 ; 0x97714 $aa
+; 0x97716
+
+Script_unknown0xa7: ; 0x97716
+; script command 0xa7
+
+	call GetScriptByte
+	ld [$cf61], a
+
+Unknown_9771c: ; 0x9771c
+	call GetScriptByte
+	ld [$cf60], a
+	call GetName
+	ld de, $d073
+	jp $76c0
+; 0x9772b
+
+Script_unknown0xa6: ; 0x9772b
+; script command 0xa6
+
+	ld a, $7
+	ld [$cf61], a
+	jr Unknown_9771c ; 0x97730 $ea
+; 0x97732
+
+Script_readmoney: ; 0x97732
+; script command 0x3d
+; parameters:
+;     account (SingleByteParam)
+;     memory (SingleByteParam)
+
+	call $7771
+	call $7861
+	ld hl, $d073
+	ld bc, $4306
+	call $3198
+	ld de, $d073
+	jp $76c0
+; 0x97747
+
+Script_readcoins: ; 0x97747
+; script command 0x3e
+; parameters:
+;     memory (SingleByteParam)
+
+	call $7771
+	ld hl, $d073
+	ld de, $d855
+	ld bc, $4206
+	call $3198
+	ld de, $d073
+	jp $76c0
+; 0x9775c
+
+Script_RAM2MEM: ; 0x9775c
+; script command 0x3f
+; parameters:
+;     memory (SingleByteParam)
+
+	call $7771
+	ld de, $c2dd
+	ld hl, $d073
+	ld bc, $4103
+	call $3198
+	ld de, $d073
+	jp $76c0
+; 0x97771
+
+Unknown_0x97771: ; 0x97771
+    ld hl, $d073
+    ld bc, $000b
+    ld a, $50
+    call ByteFill
+    ret
+; 0x9777d
+
+Script_stringtotext: ; 0x9777d
+; script command 0x44
+; parameters:
+;     text_pointer (EncodedTextLabelParam)
+;     memory (SingleByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld a, [ScriptBank]
+	ld hl, $30d6
+	rst $8
+	ld de, $d086
+	jp $76c0
+; 0x97792
+
+Script_givepokeitem: ; 0x97792
+; script command 0x2f
+; parameters:
+;     pointer (PointerParamToItemAndLetter)
+
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	ld a, [ScriptBank]
+	call GetFarByte
+	ld b, a
+	push bc
+	inc hl
+	ld bc, $0020
+	ld de, $d002
+	ld a, [ScriptBank]
+	call FarCopyBytes
+	pop bc
+	ld a, $11
+	ld hl, $46cc
+	rst $8
+	ret
+; 0x977b7
+
+Script_checkpokeitem: ; 0x977b7
+; script command 0x30
+; parameters:
+;     pointer (PointerParamToItemAndLetter)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld a, [ScriptBank]
+	ld b, a
+	ld a, $11
+	ld hl, $4654
+	rst $8
+	ret
+; 0x977ca
+
+Script_giveitem: ; 0x977ca
+; script command 0x1f
+; parameters:
+;     item (ItemLabelByte)
+;     quantity (SingleByteParam)
+
+	call GetScriptByte
+	cp $ff
+	jr nz, .asm_977d4 ; 0x977cf $3
+	ld a, [$c2dd]
+.asm_977d4
+	ld [$d106], a
+	call GetScriptByte
+	ld [$d10c], a
+	ld hl, $d892
+	call $2f66
+	jr nc, .asm_977eb ; 0x977e3 $6
+	ld a, $1
+	ld [$c2dd], a
+	ret
+.asm_977eb
+	xor a
+	ld [$c2dd], a
+	ret
+; 0x977f0
+
+Script_takeitem: ; 0x977f0
+; script command 0x20
+; parameters:
+;     item (ItemLabelByte)
+;     quantity (DecimalParam)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld [$d106], a
+	call GetScriptByte
+	ld [$d10c], a
+	ld a, $ff
+	ld [$d107], a
+	ld hl, $d892
+	call $2f53
+	ret nc
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x97812
+
+Script_checkitem: ; 0x97812
+; script command 0x21
+; parameters:
+;     item (ItemLabelByte)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld [$d106], a
+	ld hl, $d892
+	call $2f79
+	ret nc
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x97829
+
+Script_givemoney: ; 0x97829
+; script command 0x22
+; parameters:
+;     account (SingleByteParam)
+;     money (MoneyByteParam)
+
+	call $7861
+	call $786d
+	ld a, $5
+	ld hl, $5fd7
+	rst $8
+	ret
+; 0x97836
+
+Script_takemoney: ; 0x97836
+; script command 0x23
+; parameters:
+;     account (SingleByteParam)
+;     money (MoneyByteParam)
+
+	call $7861
+	call $786d
+	ld a, $5
+	ld hl, $5ffa
+	rst $8
+	ret
+; 0x97843
+
+Script_checkmoney: ; 0x97843
+; script command 0x24
+; parameters:
+;     account (SingleByteParam)
+;     money (MoneyByteParam)
+
+	call $7861
+	call $786d
+	ld a, $5
+	ld hl, $600b
+	rst $8
+; 0x9784f
+
+Unknown_9784f: ; 0x9784f
+	jr c, .asm_9785b ; 0x9784f $a
+	jr z, .asm_97857 ; 0x97851 $4
+	ld a, $0
+	jr .asm_9785d ; 0x97855 $6
+.asm_97857
+	ld a, $1
+	jr .asm_9785d ; 0x97859 $2
+.asm_9785b
+	ld a, $2
+.asm_9785d
+	ld [$c2dd], a
+	ret
+; 0x97861
+
+Unknown_0x97861: ; 0x97861
+    call GetScriptByte
+    and a
+    ld de, $d84e
+    ret z
+    ld de, $d851
+    ret
+; 0x9786d
+
+Unknown_0x9786d: ; 0x9786d
+    ld bc, $ffc3
+    push bc
+    call GetScriptByte
+    ld [bc], a
+    inc bc
+    call GetScriptByte
+    ld [bc], a
+    inc bc
+    call GetScriptByte
+    ld [bc], a
+    pop bc
+    ret
+; 0x97881
+
+Script_givecoins: ; 0x97881
+; script command 0x25
+; parameters:
+;     coins (CoinByteParam)
+
+	call $78a0
+	ld a, $5
+	ld hl, $606f
+	rst $8
+	ret
+; 0x9788b
+
+Script_takecoins: ; 0x9788b
+; script command 0x26
+; parameters:
+;     coins (CoinByteParam)
+
+	call $78a0
+	ld a, $5
+	ld hl, $608f
+	rst $8
+	ret
+; 0x97895
+
+Script_checkcoins: ; 0x97895
+; script command 0x27
+; parameters:
+;     coins (CoinByteParam)
+
+	call $78a0
+	ld a, $5
+	ld hl, $60a1
+	rst $8
+	jr Unknown_9784f ; 0x9789e $af
+	call GetScriptByte
+	ld [$ffc4], a
+	call GetScriptByte
+	ld [$ffc3], a
+	ld bc, $ffc3
+	ret
+; 0x978ae
+
+Script_checktime: ; 0x978ae
+; script command 0x2b
+; parameters:
+;     time (SingleByteParam)
+
+	xor a
+	ld [$c2dd], a
+	ld a, $3
+	ld hl, $4000
+	rst $8
+	call GetScriptByte
+	and c
+	ret z
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x978c3
+
+Script_checkpoke: ; 0x978c3
+; script command 0x2c
+; parameters:
+;     pkmn (PokemonParam)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld hl, $dcd8
+	ld de, $0001
+	call IsInArray
+	ret nc
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x978da
+
+Script_addcellnum: ; 0x978da
+; script command 0x28
+; parameters:
+;     person (SingleByteParam)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld c, a
+	ld a, $24
+	ld hl, $4000
+	rst $8
+	ret nc
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x978ef
+
+Script_delcellnum: ; 0x978ef
+; script command 0x29
+; parameters:
+;     person (SingleByteParam)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld c, a
+	ld a, $24
+	ld hl, $400f
+	rst $8
+	ret nc
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x97904
+
+Script_checkcellnum: ; 0x97904
+; script command 0x2a
+; parameters:
+;     person (SingleByteParam)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld c, a
+	ld a, $24
+	ld hl, $4019
+	rst $8
+	ret nc
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x97919
+
+Script_specialphonecall: ; 0x97919
+; script command 0x9c
+; parameters:
+;     call_id (MultiByteParam)
+
+	call GetScriptByte
+	ld [$dc31], a
+	call GetScriptByte
+	ld [$dc32], a
+	ret
+; 0x97926
+
+Script_checkphonecall: ; 0x97926
+; script command 0x9d
+
+	ld a, [$dc31]
+	and a
+	jr z, .asm_9792e ; 0x9792a $2
+	ld a, $1
+.asm_9792e
+	ld [$c2dd], a
+	ret
+; 0x97932
+
+Script_givepoke: ; 0x97932
+; script command 0x2d
+; parameters:
+;     pokemon (PokemonParam)
+;     level (DecimalParam)
+;     item (ItemLabelByte)
+;     trainer (DecimalParam)
+;     trainer_name_pointer (MultiByteParam)
+;     pkmn_nickname (MultiByteParam)
+
+	call GetScriptByte
+	ld [$d108], a
+	call GetScriptByte
+	ld [$d143], a
+	call GetScriptByte
+	ld [$d106], a
+	call GetScriptByte
+	and a
+	ld b, a
+	jr z, .asm_9795d ; 0x97949 $12
+	ld hl, ScriptPos
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	call GetScriptByte
+	call GetScriptByte
+	call GetScriptByte
+	call GetScriptByte
+.asm_9795d
+	ld a, $3
+	ld hl, $6277
+	rst $8
+	ld a, b
+	ld [$c2dd], a
+	ret
+; 0x97968
+
+Script_giveegg: ; 0x97968
+; script command 0x2e
+; parameters:
+;     pkmn (PokemonParam)
+;     level (DecimalParam)
+
+	xor a
+	ld [$c2dd], a
+	ld [$cf5f], a
+	call GetScriptByte
+	ld [$d108], a
+	call GetScriptByte
+	ld [$d143], a
+	ld a, $3
+	ld hl, $5f8c
+	rst $8
+	ret nc
+	ld a, $2
+	ld [$c2dd], a
+	ret
+; 0x97988
+
+Script_setbit1: ; 0x97988
+; script command 0x33
+; parameters:
+;     bit_number (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld b, $1
+	call BitTable1Func
+	ret
+; 0x97996
+
+Script_clearbit1: ; 0x97996
+; script command 0x32
+; parameters:
+;     bit_number (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld b, $0
+	call BitTable1Func
+	ret
+; 0x979a4
+
+Script_checkbit1: ; 0x979a4
+; script command 0x31
+; parameters:
+;     bit_number (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld b, $2
+	call BitTable1Func
+	ld a, c
+	and a
+	jr z, .asm_979b7 ; 0x979b3 $2
+	ld a, $1
+.asm_979b7
+	ld [$c2dd], a
+	ret
+; 0x979bb
+
+Script_setbit2: ; 0x979bb
+; script command 0x36
+; parameters:
+;     bit_number (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld b, $1
+	call $79ee
+	ret
+; 0x979c9
+
+Script_clearbit2: ; 0x979c9
+; script command 0x35
+; parameters:
+;     bit_number (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld b, $0
+	call $79ee
+	ret
+; 0x979d7
+
+Script_checkbit2: ; 0x979d7
+; script command 0x34
+; parameters:
+;     bit_number (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld b, $2
+	call $79ee
+	ld a, c
+	and a
+	jr z, .asm_979ea ; 0x979e6 $2
+	ld a, $1
+.asm_979ea
+	ld [$c2dd], a
+	ret
+; 0x979ee
+
+Unknown_0x979ee: ; 0x979ee
+    ld a, $20
+    ld hl, $4430
+    rst $8
+    ret
+; 0x979f5
+
+Script_wildon: ; 0x979f5
+; script command 0x38
+
+	ld hl, $d84c
+	set 5, [hl]
+	ret
+; 0x979fb
+
+Script_wildoff: ; 0x979fb
+; script command 0x37
+
+	ld hl, $d84c
+	res 5, [hl]
+	ret
+; 0x97a01
+
+Script_xycompare: ; 0x97a01
+; script command 0x39
+; parameters:
+;     pointer (MultiByteParam)
+
+	call GetScriptByte
+	ld [$d453], a
+	call GetScriptByte
+	ld [$d454], a
+	ret
+; 0x97a0e
+
+Script_warpfacing: ; 0x97a0e
+; script command 0xa3
+; parameters:
+;     facing (SingleByteParam)
+;     map_group (MapGroupParam)
+;     map_id (MapIdParam)
+;     x (SingleByteParam)
+;     y (SingleByteParam)
+
+	call GetScriptByte
+	and $3
+	ld c, a
+	ld a, [$d45b]
+	set 5, a
+	or c
+	ld [$d45b], a
+; 0x97a1d
+
+Script_warp: ; 0x97a1d
+; script command 0x3c
+; parameters:
+;     map_group (MapGroupParam)
+;     map_id (MapIdParam)
+;     x (SingleByteParam)
+;     y (SingleByteParam)
+
+	call GetScriptByte
+	and a
+	jr z, .asm_97a4a ; 0x97a21 $27
+	ld [$dcb5], a
+	call GetScriptByte
+	ld [$dcb6], a
+	call GetScriptByte
+	ld [$dcb8], a
+	call GetScriptByte
+	ld [$dcb7], a
+	ld a, $ff
+	ld [$d001], a
+	ld a, $f1
+	ld [$ff9f], a
+	ld a, $1
+	call $261b
+	call Unknown_0x96e11
+	ret
+.asm_97a4a
+	call GetScriptByte
+	call GetScriptByte
+	call GetScriptByte
+	ld a, $ff
+	ld [$d001], a
+	ld a, $fb
+	ld [$ff9f], a
+	ld a, $1
+	call $261b
+	call Unknown_0x96e11
+	ret
+; 0x97a65
+
+Script_warpmod: ; 0x97a65
+; script command 0x3a
+; parameters:
+;     warp_id (SingleByteParam)
+;     map_group (MapGroupParam)
+;     map_id (MapIdParam)
+
+	call GetScriptByte
+	ld [$dcac], a
+	call GetScriptByte
+	ld [$dcad], a
+	call GetScriptByte
+	ld [$dcae], a
+	ret
+; 0x97a78
+
+Script_blackoutmod: ; 0x97a78
+; script command 0x3b
+; parameters:
+;     map_group (MapGroupParam)
+;     map_id (MapIdParam)
+
+	call GetScriptByte
+	ld [$dcb2], a
+	call GetScriptByte
+	ld [$dcb3], a
+	ret
+; 0x97a85
+
+Script_reloadmapmusic: ; 0x97a85
+; script command 0x83
+
+	ld a, $1
+	ld [$c2c1], a
+	ret
+; 0x97a8b
+
+Script_writecmdqueue: ; 0x97a8b
+; script command 0x7d
+; parameters:
+;     queue_pointer (MultiByteParam)
+
+	call GetScriptByte
+	ld e, a
+	call GetScriptByte
+	ld d, a
+	ld a, [ScriptBank]
+	ld b, a
+	ld a, $25
+	ld hl, $7e31
+	rst $8
+	ret
+; 0x97a9e
+
+Script_delcmdqueue: ; 0x97a9e
+; script command 0x7e
+; parameters:
+;     byte (SingleByteParam)
+
+	xor a
+	ld [$c2dd], a
+	call GetScriptByte
+	ld b, a
+	ld a, $25
+	ld hl, $7e5c
+	rst $8
+	ret c
+	ld a, $1
+	ld [$c2dd], a
+	ret
+; 0x97ab3
+
+Script_changemap: ; 0x97ab3
+; script command 0x79
+; parameters:
+;     map_data_pointer (MapDataPointerParam)
+
+	call GetScriptByte
+	ld [$d1a0], a
+	call GetScriptByte
+	ld [$d1a1], a
+	call GetScriptByte
+	ld [$d1a2], a
+	call $24e4
+	call $2879
+	ret
+; 0x97acc
+
+Script_changeblock: ; 0x97acc
+; script command 0x7a
+; parameters:
+;     x (SingleByteParam)
+;     y (SingleByteParam)
+;     block (SingleByteParam)
+
+	call GetScriptByte
+	add $4
+	ld d, a
+	call GetScriptByte
+	add $4
+	ld e, a
+	call $2a66
+	call GetScriptByte
+	ld [hl], a
+	call $2879
+	ret
+; 0x97ae3
+
+Script_reloadmappart: ; 0x97ae3
+; script command 0x7c
+
+	xor a
+	ld [$ffd4], a
+	call $2173
+	call $2914
+	ld a, $41
+	ld hl, $4061
+	rst $8
+	call $1ad2
+	ret
+; 0x97af6
+
+Script_warpcheck: ; 0x97af6
+; script command 0x8e
+
+	call $224a
+	ret nc
+	ld a, $25
+	ld hl, $66d0
+	rst $8
+	ret
+; 0x97b01
+
+Unknown_0x97b01: ; 0x97b01
+    ld a, $25
+    ld hl, $66d0
+    rst $8
+    ret
+; 0x97b08
+
+Script_newloadmap: ; 0x97b08
+; script command 0x8a
+; parameters:
+;     which_method (SingleByteParam)
+
+	call GetScriptByte
+	ld [$ff9f], a
+	ld a, $1
+	call $261b
+	call Unknown_0x96e11
+	ret
+; 0x97b16
+
+Script_reloadandreturn: ; 0x97b16
+; script command 0x92
+
+	call $7b08
+	jp $7b74
+; 0x97b1c
+
+Script_loadfont: ; 0x97b1c
+; script command 0x47
+
+	call $2e08
+	ret
+; 0x97b20
+
+Script_refreshscreen: ; 0x97b20
+; script command 0x48
+; parameters:
+;     dummy (SingleByteParam)
+
+	call $2dba
+	call GetScriptByte
+	ret
+; 0x97b27
+
+Script_loadbytec1ce: ; 0x97b27
+; script command 0x4a
+; parameters:
+;     byte (SingleByteParam)
+
+	call GetScriptByte
+	ld [$c2cf], a
+	ret
+; 0x97b2e
+
+INCBIN "baserom.gbc",$97b2e,$97b2f - $97b2e
+
+Script_loadmovesprites: ; 0x97b2f
+; script command 0x49
+
+	call $2e20
+	call $2dcf
+	ret
+; 0x97b36
+
+Script_passtoengine: ; 0x97b36
+; script command 0x89
+; parameters:
+;     data_pointer (PointerLabelBeforeBank)
+
+	call GetScriptByte
+	push af
+	call GetScriptByte
+	ld l, a
+	call GetScriptByte
+	ld h, a
+	pop af
+	call StartAutoInput
+	ret
+; 0x97b47
+
+Script_pause: ; 0x97b47
+; script command 0x8b
+; parameters:
+;     length (DecimalParam)
+
+	call GetScriptByte
+	and a
+	jr z, .asm_97b50 ; 0x97b4b $3
+	ld [$d44d], a
+.asm_97b50
+	ld c, $2
+	call DelayFrames
+	ld hl, $d44d
+	dec [hl]
+	jr nz, .asm_97b50 ; 0x97b59 $f5
+	ret
+; 0x97b5c
+
+Script_deactivatefacing: ; 0x97b5c
+; script command 0x8c
+; parameters:
+;     time (SingleByteParam)
+
+	call GetScriptByte
+	and a
+	jr z, .asm_97b65 ; 0x97b60 $3
+	ld [$d44d], a
+.asm_97b65
+	ld a, $3
+	ld [$d437], a
+	call Unknown_0x96e11
+	ret
+; 0x97b6e
+
+Script_ptpriorityjump: ; 0x97b6e
+; script command 0x8f
+; parameters:
+;     pointer (ScriptPointerLabelParam)
+
+	call Unknown_0x96e11
+	jp Script_2jump
+; 0x97b74
+
+Script_end: ; 0x97b74
+; script command 0x91
+
+	call $7b9a
+	jr c, .asm_97b7a ; 0x97b77 $1
+	ret
+.asm_97b7a
+	xor a
+	ld [$d438], a
+	ld a, $0
+	ld [$d437], a
+	ld hl, $d434
+	res 0, [hl]
+	call Unknown_0x96e11
+	ret
+; 0x97b8c
+
+Script_return: ; 0x97b8c
+; script command 0x90
+
+	call $7b9a
+	jr c, .asm_97b91 ; 0x97b8f $0
+.asm_97b91
+	ld hl, $d434
+	res 0, [hl]
+	call Unknown_0x96e11
+	ret
+; 0x97b9a
+
+Unknown_0x97b9a: ; 0x97b9a
+    ld hl, $d43c
+    ld a, [hl]
+    and a
+    jr z, .asm_97bbe ; 0x97b9f $1d
+    dec [hl]
+    ld e, [hl]
+    ld d, $0
+    ld hl, $d43d
+    add hl, de
+    add hl, de
+    add hl, de
+    ld a, [hli]
+    ld b, a
+    and $7f
+    ld [ScriptBank], a
+    ld a, [hli]
+    ld e, a
+    ld [ScriptPos], a
+    ld a, [hl]
+    ld d, a
+    ld [ScriptPos + 1], a
+    and a
+    ret
+.asm_97bbe
+    scf
+    ret
+; 0x97bc0
+
+Script_resetfuncs: ; 0x97bc0
+; script command 0x93
+
+	xor a
+	ld [$d43c], a
+	ld [$d438], a
+	ld a, $0
+	ld [$d437], a
+	ld hl, $d434
+	res 0, [hl]
+	call Unknown_0x96e11
+	ret
+; 0x97bd5
+
+Script_halloffame: ; 0x97bd5
+; script command 0xa1
+
+	ld hl, $cfbc
+	res 0, [hl]
+	ld a, BANK(HallOfFame1)
+	ld hl, HallOfFame1
+	rst $8
+	ld a, BANK(HallOfFame2)
+	ld hl, HallOfFame2
+	rst $8
+	ld a, BANK(HallOfFame3)
+	ld hl, HallOfFame3
+	rst $8
+	ld hl, $cfbc
+	set 0, [hl]
+	jr DisplayCredits
+; 0x97bf3
+
+Script_credits: ; 0x97bf3
+; script command 0xa2
+
+	ld a, $21
+	ld hl, $6455
+	rst $8
+	; fallthrough
+DisplayCredits:
+	call $7bc0
+	ld a, $3
+	call $261b
+	call Unknown_0x96e11
+	ret
+; 0x97c05
+
+Script_unknown0xa8: ; 0x97c05
+; script command 0xa8
+; parameters:
+;     unknown (SingleByteParam)
+
+	push bc
+	call GetScriptByte
+.asm_97c09
+	push af
+	ld c, $6
+	call DelayFrames
+	pop af
+	dec a
+	jr nz, .asm_97c09 ; 0x97c11 $f6
+	pop bc
+	ret
+; 0x97c15
+
+Script_unknown0xa9: ; 0x97c15
+; script command 0xa9
+
+	ld a, $13
+	ld hl, $4ffe
+	rst $8
+	ld a, c
+	ld [$c2dd], a
+	ret
+; 0x97c20
--- /dev/null
+++ b/engine/vblank.asm
@@ -1,0 +1,539 @@
+; VBlank is the interrupt responsible for updating VRAM.
+
+; In Pokemon Crystal, VBlank has been hijacked to act as the
+; main loop. After time-sensitive graphics operations have been
+; performed, joypad input and sound functions are executed.
+
+; This prevents the display and audio output from lagging.
+
+	push af
+	push bc
+	push de
+	push hl
+	
+; get vblank type
+	ld a, [$ff9e]
+	and $7
+	
+; get fn pointer
+	ld e, a
+	ld d, $0
+	ld hl, .VBlanks
+	add hl, de
+	add hl, de
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	
+; down to business
+	call JpHl
+	
+; since this is called once per frame
+	call GameTimer
+	
+	pop hl
+	pop de
+	pop bc
+	pop af
+	reti
+; 2a1
+
+.VBlanks ; 2a1
+	dw VBlank0 ; 0
+	dw VBlank1 ; 1
+	dw VBlank2 ; 2
+	dw VBlank3 ; 3
+	dw VBlank4 ; 4
+	dw VBlank5 ; 5
+	dw VBlank6 ; 6
+	dw VBlank0 ; 7
+; 2b1
+
+
+VBlank0: ; 2b1
+; normal operation
+
+; rng
+; scx, scy, wy, wx
+; bg map buffer
+; palettes
+; dma transfer
+; bg map
+; tiles
+; oam
+; joypad
+; sound
+
+; inc frame counter
+	ld hl, $ff9b
+	inc [hl]
+	
+; advance rng
+	ld a, [rDIV]
+	ld b, a
+	ld a, [$ffe1]
+	adc b
+	ld [$ffe1], a
+	
+	ld a, [rDIV]
+	ld b, a
+	ld a, [$ffe2]
+	sbc b
+	ld [$ffe2], a
+	
+; save bank
+	ld a, [$ff9d] ; current bank
+	ld [$ff8a], a
+	
+; scroll x
+	ld a, [$ffcf]
+	ld [rSCX], a
+; scroll y
+	ld a, [$ffd0]
+	ld [rSCY], a
+; window y
+	ld a, [$ffd2]
+	ld [rWY], a
+; window x + 7
+	ld a, [$ffd1]
+	ld [rWX], a
+	
+; some time management is in order
+; only have time for one of these during vblank
+	
+; bg map buffer has priority
+	call UpdateBGMapBuffer
+	jr c, .doneframeaction
+	
+; then pals
+	call UpdatePalsIfCGB
+	jr c, .doneframeaction
+	
+; dma transfer
+	call DMATransfer
+	jr c, .doneframeaction
+	
+; bg map
+	call UpdateBGMap
+	
+; these have their own timing checks
+	call SafeLoadTiles
+	call SafeLoadTiles2
+	call SafeTileAnimation
+	
+.doneframeaction
+; oam update off?
+	ld a, [$ffd8]
+	and a
+	jr nz, .vblankoccurred
+	
+; update oam by dma transfer
+	call hPushOAM
+;	403f:
+;		ld a, $c4
+;		ld [rDMA], a
+;		ld a, $28
+;	.loop
+;		dec a
+;		jr nz, .loop
+;		ret
+
+
+; vblank-sensitive operations are done
+	
+.vblankoccurred
+; tell other fns vblank happened
+	xor a
+	ld [VBlankOccurred], a
+	
+; dec $cfb1 until 0
+	ld a, [$cfb1]
+	and a
+	jr z, .textdelay
+	dec a
+	ld [$cfb1], a
+	
+.textdelay
+; dec text delay counter until 0
+	ld a, [TextDelayFrames]
+	and a
+	jr z, .joypad
+	dec a
+	ld [TextDelayFrames], a
+	
+.joypad
+	call Joypad
+	
+; update sound
+	ld a, BANK(UpdateSound)
+	rst Bankswitch ; bankswitch
+	call UpdateSound
+	ld a, [$ff8a]
+	rst Bankswitch ; restore bank
+	
+; 
+	ld a, [$ff98]
+	ld [$ffe3], a
+	
+	ret
+; 325
+
+
+VBlank2: ; 325
+; sound only
+
+; save bank
+	ld a, [$ff9d]
+	ld [$ff8a], a
+	
+; update sound
+	ld a, BANK(UpdateSound)
+	rst Bankswitch ; bankswitch
+	call UpdateSound
+	
+; restore bank
+	ld a, [$ff8a]
+	rst Bankswitch
+	
+; tell other fns vblank happened
+	xor a
+	ld [VBlankOccurred], a
+	ret
+; 337
+
+
+VBlank1: ; 337
+; scx, scy
+; palettes
+; bg map
+; tiles
+; oam
+; sound / lcd stat
+
+; save bank
+	ld a, [$ff9d]
+	ld [$ff8a], a
+	
+; scroll x
+	ld a, [$ffcf]
+	ld [rSCX], a
+	
+; scroll y
+	ld a, [$ffd0]
+	ld [rSCY], a
+	
+; time-sensitive fns
+	call UpdatePals
+	jr c, .vblankoccurred
+	
+; these have their own timing checks
+	call UpdateBGMap
+	call LoadTiles
+; update oam by dma transfer
+	call hPushOAM
+;	403f:
+;		ld a, $c4
+;		ld [rDMA], a
+;		ld a, $28
+;	.loop
+;		dec a
+;		jr nz, .loop
+;		ret
+	
+.vblankoccurred
+; tell other fns vblank happened
+	xor a
+	ld [VBlankOccurred], a
+	
+; get requested ints
+	ld a, [rIF]
+	ld b, a
+; discard requested ints
+	xor a
+	ld [rIF], a
+; enable lcd stat
+	ld a, %10 ; lcd stat
+	ld [rIE], a
+; rerequest serial int if applicable (still disabled)
+; request lcd stat
+	ld a, b
+	and %1000 ; serial
+	or %10 ; lcd stat
+	ld [rIF], a
+	
+	ei
+; update sound
+	ld a, BANK(UpdateSound)
+	rst Bankswitch ; bankswitch
+	call UpdateSound
+; restore bank
+	ld a, [$ff8a]
+	rst Bankswitch
+	di
+	
+; get requested ints
+	ld a, [rIF]
+	ld b, a
+; discard requested ints
+	xor a
+	ld [rIF], a
+; enable ints besides joypad
+	ld a, %1111 ; serial timer lcdstat vblank
+	ld [rIE], a
+; rerequest ints
+	ld a, b
+	ld [rIF], a
+	ret
+; 37f
+
+
+UpdatePals: ; 37f
+; update pals for either dmg or cgb
+
+; check cgb
+	ld a, [$ffe6]
+	and a
+	jp nz, UpdateCGBPals
+	
+; update gb pals
+	ld a, [$cfc7]
+	ld [rBGP], a
+	
+	ld a, [$cfc8]
+	ld [rOBP0], a
+	
+	ld a, [$cfc9]
+	ld [rOBP1], a
+	
+	and a
+	ret
+; 396
+
+
+VBlank3: ; 396
+; scx, scy
+; palettes
+; bg map
+; tiles
+; oam
+; sound / lcd stat
+
+; save bank
+	ld a, [$ff9d]
+	ld [$ff8a], a
+	
+; scroll x
+	ld a, [$ffcf]
+	ld [rSCX], a
+; scroll y
+	ld a, [$ffd0]
+	ld [rSCY], a
+	
+; any pals to update?
+	ld a, [$ffe5]
+	and a
+	call nz, ForceUpdateCGBPals
+	jr c, .vblankoccurred
+; else
+	call UpdateBGMap
+	call LoadTiles
+	
+; update oam by dma transfer
+	call hPushOAM
+;	403f:
+;		ld a, $c4 ; Sprites / $100
+;		ld [rDMA], a
+;		ld a, $28
+;	.loop
+;		dec a
+;		jr nz, .loop
+;		ret
+	
+.vblankoccurred
+; tell other fns vblank happened
+	xor a
+	ld [VBlankOccurred], a
+	
+; save int flag
+	ld a, [rIF]
+	push af
+; reset ints
+	xor a
+	ld [rIF], a
+; force lcdstat int during sound update
+	ld a, %10 ; lcd stat
+	ld [rIE], a
+	ld [rIF], a
+	
+	ei
+; update sound
+	ld a, BANK(UpdateSound)
+	rst Bankswitch ; bankswitch
+	call UpdateSound
+; restore bank
+	ld a, [$ff8a]
+	rst Bankswitch
+	di
+	
+; request lcdstat
+	ld a, [rIF]
+	ld b, a
+; and any other ints
+	pop af
+	or b
+	ld b, a
+; reset ints
+	xor a
+	ld [rIF], a
+; enable ints besides joypad
+	ld a, %1111 ; serial timer lcdstat vblank
+	ld [rIE], a
+; request ints
+	ld a, b
+	ld [rIF], a
+	ret
+; 3df
+
+
+VBlank4: ; 3df
+; bg map
+; tiles
+; oam
+; joypad
+; serial
+; sound
+
+; save bank
+	ld a, [$ff9d]
+	ld [$ff8a], a
+	
+	call UpdateBGMap
+	call SafeLoadTiles
+	
+; update oam by dma transfer
+	call hPushOAM
+;	403f:
+;		ld a, $c4
+;		ld [rDMA], a
+;		ld a, $28
+;	.loop
+;		dec a
+;		jr nz, .loop
+;		ret
+	
+; update joypad
+	call Joypad
+	
+; tell other fns vblank happened
+	xor a
+	ld [VBlankOccurred], a
+	
+; handshake
+	call AskSerial
+	
+; update sound
+	ld a, BANK(UpdateSound)
+	rst Bankswitch ; bankswitch
+	call UpdateSound
+; restore bank
+	ld a, [$ff8a]
+	rst Bankswitch
+	ret
+; 400
+
+
+VBlank5: ; 400
+; scx
+; palettes
+; bg map
+; tiles
+; joypad
+; 
+
+; save bank
+	ld a, [$ff9d]
+	ld [$ff8a], a
+	
+; scroll x
+	ld a, [$ffcf]
+	ld [rSCX], a
+	
+; if we can update pals, skip this part
+	call UpdatePalsIfCGB
+	jr c, .vblankoccurred
+	
+	call UpdateBGMap
+	call SafeLoadTiles
+	
+.vblankoccurred
+; tell other fns vblank happened
+	xor a
+	ld [VBlankOccurred], a
+	
+; joypad
+	call Joypad
+	
+; discard requested ints
+	xor a
+	ld [rIF], a
+; enable lcd stat
+	ld a, %10 ; lcd stat
+	ld [rIE], a
+; request lcd stat
+	ld [rIF], a
+	
+	ei
+; update sound
+	ld a, BANK(UpdateSound)
+	rst Bankswitch ; bankswitch
+	call UpdateSound
+; restore bank
+	ld a, [$ff8a]
+	rst Bankswitch
+	di
+	
+; discard requested ints
+	xor a
+	ld [rIF], a
+; enable ints besides joypad
+	ld a, %1111 ; serial timer lcdstat vblank
+	ld [rIE], a
+	ret
+; 436
+
+
+VBlank6: ; 436
+; palettes
+; tiles
+; dma transfer
+; sound
+
+; save bank
+	ld a, [$ff9d]
+	ld [$ff8a], a
+	
+; inc frame counter
+	ld hl, $ff9b
+	inc [hl]
+	
+	call UpdateCGBPals
+	jr c, .vblankoccurred
+	
+	call SafeLoadTiles
+	call SafeLoadTiles2
+	call DMATransfer
+	
+.vblankoccurred
+; tell other fns vblank happened
+	xor a
+	ld [VBlankOccurred], a
+	
+; update sound
+	ld a, BANK(UpdateSound)
+	rst Bankswitch ; bankswitch
+	call UpdateSound
+; restore bank
+	ld a, [$ff8a]
+	rst Bankswitch
+	ret
+; 45a
--- a/item_constants.asm
+++ /dev/null
@@ -1,273 +1,0 @@
-NO_ITEM       EQU $00
-MASTER_BALL   EQU $01
-ULTRA_BALL    EQU $02
-BRIGHTPOWDER  EQU $03
-GREAT_BALL    EQU $04
-POKE_BALL     EQU $05
-BICYCLE       EQU $07
-MOON_STONE    EQU $08
-ANTIDOTE      EQU $09
-BURN_HEAL     EQU $0A
-ICE_HEAL      EQU $0B
-AWAKENING     EQU $0C
-PARLYZ_HEAL   EQU $0D
-FULL_RESTORE  EQU $0E
-MAX_POTION    EQU $0F
-HYPER_POTION  EQU $10
-SUPER_POTION  EQU $11
-POTION        EQU $12
-ESCAPE_ROPE   EQU $13
-REPEL         EQU $14
-MAX_ELIXER    EQU $15
-FIRE_STONE    EQU $16
-THUNDERSTONE  EQU $17
-WATER_STONE   EQU $18
-HP_UP         EQU $1A
-PROTEIN       EQU $1B
-IRON          EQU $1C
-CARBOS        EQU $1D
-LUCKY_PUNCH   EQU $1E
-CALCIUM       EQU $1F
-RARE_CANDY    EQU $20
-X_ACCURACY    EQU $21
-LEAF_STONE    EQU $22
-METAL_POWDER  EQU $23
-NUGGET        EQU $24
-POKE_DOLL     EQU $25
-FULL_HEAL     EQU $26
-REVIVE        EQU $27
-MAX_REVIVE    EQU $28
-GUARD_SPEC    EQU $29
-SUPER_REPEL   EQU $2A
-MAX_REPEL     EQU $2B
-DIRE_HIT      EQU $2C
-FRESH_WATER   EQU $2E
-SODA_POP      EQU $2F
-LEMONADE      EQU $30
-X_ATTACK      EQU $31
-X_DEFEND      EQU $33
-X_SPEED       EQU $34
-X_SPECIAL     EQU $35
-COIN_CASE     EQU $36
-ITEMFINDER    EQU $37
-EXP_SHARE     EQU $39
-OLD_ROD       EQU $3A
-GOOD_ROD      EQU $3B
-SILVER_LEAF   EQU $3C
-SUPER_ROD     EQU $3D
-PP_UP         EQU $3E
-ETHER         EQU $3F
-MAX_ETHER     EQU $40
-ELIXER        EQU $41
-RED_SCALE     EQU $42
-SECRETPOTION  EQU $43
-S_S_TICKET    EQU $44
-MYSTERY_EGG   EQU $45
-CLEAR_BELL    EQU $46
-SILVER_WING   EQU $47
-MOOMOO_MILK   EQU $48
-QUICK_CLAW    EQU $49
-PSNCUREBERRY  EQU $4A
-GOLD_LEAF     EQU $4B
-SOFT_SAND     EQU $4C
-SHARP_BEAK    EQU $4D
-PRZCUREBERRY  EQU $4E
-BURNT_BERRY   EQU $4F
-ICE_BERRY     EQU $50
-POISON_BARB   EQU $51
-KINGS_ROCK    EQU $52
-BITTER_BERRY  EQU $53
-MINT_BERRY    EQU $54
-RED_APRICORN  EQU $55
-TINYMUSHROOM  EQU $56
-BIG_MUSHROOM  EQU $57
-SILVERPOWDER  EQU $58
-BLU_APRICORN  EQU $59
-AMULET_COIN   EQU $5B
-YLW_APRICORN  EQU $5C
-GRN_APRICORN  EQU $5D
-CLEANSE_TAG   EQU $5E
-MYSTIC_WATER  EQU $5F
-TWISTEDSPOON  EQU $60
-WHT_APRICORN  EQU $61
-BLACKBELT     EQU $62
-BLK_APRICORN  EQU $63
-PNK_APRICORN  EQU $65
-BLACKGLASSES  EQU $66
-SLOWPOKETAIL  EQU $67
-PINK_BOW      EQU $68
-STICK         EQU $69
-SMOKE_BALL    EQU $6A
-NEVERMELTICE  EQU $6B
-MAGNET        EQU $6C
-MIRACLEBERRY  EQU $6D
-PEARL         EQU $6E
-BIG_PEARL     EQU $6F
-EVERSTONE     EQU $70
-SPELL_TAG     EQU $71
-RAGECANDYBAR  EQU $72
-GS_BALL       EQU $73
-BLUE_CARD     EQU $74
-MIRACLE_SEED  EQU $75
-THICK_CLUB    EQU $76
-FOCUS_BAND    EQU $77
-ENERGYPOWDER  EQU $79
-ENERGY_ROOT   EQU $7A
-HEAL_POWDER   EQU $7B
-REVIVAL_HERB  EQU $7C
-HARD_STONE    EQU $7D
-LUCKY_EGG     EQU $7E
-CARD_KEY      EQU $7F
-MACHINE_PART  EQU $80
-EGG_TICKET    EQU $81
-LOST_ITEM     EQU $82
-STARDUST      EQU $83
-STAR_PIECE    EQU $84
-BASEMENT_KEY  EQU $85
-PASS          EQU $86
-CHARCOAL      EQU $8A
-BERRY_JUICE   EQU $8B
-SCOPE_LENS    EQU $8C
-METAL_COAT    EQU $8F
-DRAGON_FANG   EQU $90
-LEFTOVERS     EQU $92
-MYSTERYBERRY  EQU $96
-DRAGON_SCALE  EQU $97
-BERSERK_GENE  EQU $98
-SACRED_ASH    EQU $9C
-HEAVY_BALL    EQU $9D
-FLOWER_MAIL   EQU $9E
-LEVEL_BALL    EQU $9F
-LURE_BALL     EQU $A0
-FAST_BALL     EQU $A1
-LIGHT_BALL    EQU $A3
-FRIEND_BALL   EQU $A4
-MOON_BALL     EQU $A5
-LOVE_BALL     EQU $A6
-NORMAL_BOX    EQU $A7
-GORGEOUS_BOX  EQU $A8
-SUN_STONE     EQU $A9
-POLKADOT_BOW  EQU $AA
-UP_GRADE      EQU $AC
-BERRY         EQU $AD
-GOLD_BERRY    EQU $AE
-SQUIRTBOTTLE  EQU $AF
-PARK_BALL     EQU $B1
-RAINBOW_WING  EQU $B2
-BRICK_PIECE   EQU $B4
-SURF_MAIL     EQU $B5
-LITEBLUEMAIL  EQU $B6
-PORTRAITMAIL  EQU $B7
-LOVELY_MAIL   EQU $B8
-EON_MAIL      EQU $B9
-MORPH_MAIL    EQU $BA
-BLUESKY_MAIL  EQU $BB
-MUSIC_MAIL    EQU $BC
-MIRAGE_MAIL   EQU $BD
-TM_01         EQU $BF
-TM_02         EQU $C0
-TM_03         EQU $C1
-TM_04         EQU $C2
-TM_05         EQU $C4
-TM_06         EQU $C5
-TM_07         EQU $C6
-TM_08         EQU $C7
-TM_09         EQU $C8
-TM_10         EQU $C9
-TM_11         EQU $CA
-TM_12         EQU $CB
-TM_13         EQU $CC
-TM_14         EQU $CD
-TM_15         EQU $CE
-TM_16         EQU $CF
-TM_17         EQU $D0
-TM_18         EQU $D1
-TM_19         EQU $D2
-TM_20         EQU $D3
-TM_21         EQU $D4
-TM_22         EQU $D5
-TM_23         EQU $D6
-TM_24         EQU $D7
-TM_25         EQU $D8
-TM_26         EQU $D9
-TM_27         EQU $DA
-TM_28         EQU $DB
-TM_29         EQU $DD
-TM_30         EQU $DE
-TM_31         EQU $DF
-TM_32         EQU $E0
-TM_33         EQU $E1
-TM_34         EQU $E2
-TM_35         EQU $E3
-TM_36         EQU $E4
-TM_37         EQU $E5
-TM_38         EQU $E6
-TM_39         EQU $E7
-TM_40         EQU $E8
-TM_41         EQU $E9
-TM_42         EQU $EA
-TM_43         EQU $EB
-TM_44         EQU $EC
-TM_45         EQU $ED
-TM_46         EQU $EE
-TM_47         EQU $EF
-TM_48         EQU $F0
-TM_49         EQU $F1
-TM_50         EQU $F2
-HM_01         EQU $F3
-HM_02         EQU $F4
-HM_03         EQU $F5
-HM_04         EQU $F6
-HM_05         EQU $F7
-HM_06         EQU $F8
-HM_07         EQU $F9
-
-NUM_TMS EQU HM_01 - TM_01 - 2
-
-; pockets
-ITEM     EQU 1
-KEY_ITEM EQU 2
-BALL     EQU 3
-TM_HM    EQU 4
-
-; item actions
-CANT_SELECT EQU %01000000
-CANT_TOSS   EQU %10000000
-
-; held item effects
-HELD_BERRY          EQU $01
-HELD_LEFTOVERS      EQU $03
-HELD_RESTORE_PP     EQU $06
-HELD_CLEANSE_TAG    EQU $08
-HELD_HEAL_POISON    EQU $0a
-HELD_HEAL_FREEZE    EQU $0b
-HELD_HEAL_BURN      EQU $0c
-HELD_HEAL_SLEEP     EQU $0d
-HELD_HEAL_PARALYZE  EQU $0e
-HELD_HEAL_STATUS    EQU $0f
-HELD_HEAL_CONFUSION EQU $10
-HELD_METAL_POWDER   EQU $2a
-HELD_NORMAL_BOOST   EQU $32
-HELD_FIGHTING_BOOST EQU $33
-HELD_FLYING_BOOST   EQU $34
-HELD_POISON_BOOST   EQU $35
-HELD_GROUND_BOOST   EQU $36
-HELD_ROCK_BOOST     EQU $37
-HELD_BUG_BOOST      EQU $38
-HELD_GHOST_BOOST    EQU $39
-HELD_FIRE_BOOST     EQU $3a
-HELD_WATER_BOOST    EQU $3b
-HELD_GRASS_BOOST    EQU $3c
-HELD_ELECTRIC_BOOST EQU $3d
-HELD_PSYCHIC_BOOST  EQU $3e
-HELD_ICE_BOOST      EQU $3f
-HELD_DRAGON_BOOST   EQU $40
-HELD_DARK_BOOST     EQU $41
-HELD_STEEL_BOOST    EQU $42
-HELD_ESCAPE         EQU $48
-HELD_CRITICAL_UP    EQU $49
-HELD_QUICK_CLAW     EQU $4a
-HELD_TRADE_EVOLVE   EQU $4b
-HELD_AMULET_COIN    EQU $4c
-HELD_BRIGHTPOWDER   EQU $4d
-HELD_FOCUS_BAND     EQU $4f
--- a/joypad.asm
+++ /dev/null
@@ -1,275 +1,0 @@
-JoypadInt: ; 92e
-; Replaced by Joypad, called from VBlank instead of the useless
-; joypad interrupt.
-
-; This is a placeholder in case the interrupt is somehow enabled.
-	reti
-; 92f
-
-ClearJoypadPublic: ; 92f
-	xor a
-; Pressed this frame (delta)
-	ld [hJoyPressed], a
-; Currently pressed
-	ld [hJoyDown], a
-	ret
-; 935
-
-Joypad: ; 935
-; Read the joypad register and translate it to something more
-; workable for use in-game. There are 8 buttons, so we can use
-; one byte to contain all player input.
-
-; Updates:
-
-; hJoypadReleased: released this frame (delta)
-; hJoypadPressed: pressed this frame (delta)
-; hJoypadDown: currently pressed
-; hJoypadSum: pressed so far
-
-; Any of these three bits can be used to disable input.
-	ld a, [$cfbe]
-	and %11010000
-	ret nz
-	
-; If we're saving, input is disabled.
-	ld a, [$c2cd]
-	and a
-	ret nz
-	
-; We can only get four inputs at a time.
-; We take d-pad first for no particular reason.
-	ld a, D_PAD
-	ld [rJOYP], a
-; Read twice to give the request time to take.
-	ld a, [rJOYP]
-	ld a, [rJOYP]
-	
-; The Joypad register output is in the lo nybble (inversed).
-; We make the hi nybble of our new container d-pad input.
-	cpl
-	and $f
-	swap a
-	
-; We'll keep this in b for now.
-	ld b, a
-	
-; Buttons make 8 total inputs (A, B, Select, Start).
-; We can fit this into one byte.
-	ld a, BUTTONS
-	ld [rJOYP], a
-; Wait for input to stabilize.
-	ld a, [rJOYP]
-	ld a, [rJOYP]
-	ld a, [rJOYP]
-	ld a, [rJOYP]
-	ld a, [rJOYP]
-	ld a, [rJOYP]
-; Buttons take the lo nybble.
-	cpl
-	and $f
-	or b
-	ld b, a
-	
-; Reset the joypad register since we're done with it.
-	ld a, $30
-	ld [rJOYP], a
-	
-; To get the delta we xor the last frame's input with the new one.
-	ld a, [hJoypadDown] ; last frame
-	ld e, a
-	xor b
-	ld d, a
-; Released this frame:
-	and e
-	ld [hJoypadReleased], a
-; Pressed this frame:
-	ld a, d
-	and b
-	ld [hJoypadPressed], a
-	
-; Add any new presses to the list of collective presses:
-	ld c, a
-	ld a, [hJoypadSum]
-	or c
-	ld [hJoypadSum], a
-	
-; Currently pressed:
-	ld a, b
-	ld [hJoypadDown], a
-	
-; Now that we have the input, we can do stuff with it.
-
-; For example, soft reset:
-	and BUTTON_A | BUTTON_B | SELECT | START
-	cp  BUTTON_A | BUTTON_B | SELECT | START
-	jp z, $0150 ; reset
-	
-	ret
-; 984
-
-
-GetJoypadPublic: ; 984
-; Update mirror joypad input from hJoypadDown (real input)
-
-; hJoyReleased: released this frame (delta)
-; hJoyPressed: pressed this frame (delta)
-; hJoyDown: currently pressed
-
-; bit 0 A
-;     1 B
-;     2 SELECT
-;     3 START
-;     4 RIGHT
-;     5 LEFT
-;     6 UP
-;     7 DOWN
-
-	push af
-	push hl
-	push de
-	push bc
-	
-; The player input can be automated using an input stream.
-; See more below.
-	ld a, [InputType]
-	cp a, AUTO_INPUT
-	jr z, .auto
-
-; To get deltas, take this and last frame's input.
-	ld a, [hJoypadDown] ; real input
-	ld b, a
-	ld a, [hJoyDown] ; last frame mirror
-	ld e, a
-	
-; Released this frame:
-	xor b
-	ld d, a
-	and e
-	ld [hJoyReleased], a
-	
-; Pressed this frame:
-	ld a, d
-	and b
-	ld [hJoyPressed], a
-	
-; It looks like the collective presses got commented out here.
-	ld c, a
-	
-; Currently pressed:
-	ld a, b
-	ld [hJoyDown], a ; frame input
-	
-.quit
-	pop bc
-	pop de
-	pop hl
-	pop af
-	ret	
-
-.auto
-; Use a predetermined input stream (used in the catching tutorial).
-
-; Stream format: [input][duration]
-; A value of $ff will immediately end the stream.
-
-; Read from the input stream.
-	ld a, [hROMBank]
-	push af
-	ld a, [AutoInputBank]
-	rst Bankswitch
-	
-	ld hl, AutoInputAddress
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	
-; We only update when the input duration has expired.
-	ld a, [AutoInputLength]
-	and a
-	jr z, .updateauto
-	
-; Until then, don't change anything.
-	dec a
-	ld [AutoInputLength], a
-	pop af
-	rst Bankswitch
-	jr .quit
-	
-	
-.updateauto
-; An input of $ff will end the stream.
-	ld a, [hli]
-	cp a, $ff
-	jr z, .stopauto
-	ld b, a
-	
-; A duration of $ff will end the stream indefinitely.
-	ld a, [hli]
-	ld [AutoInputLength], a
-	cp a, $ff
-	jr nz, .next
-	
-; The current input is overwritten.
-	dec hl
-	dec hl
-	ld b, NO_INPUT
-	jr .finishauto
-	
-.next
-; On to the next input...
-	ld a, l
-	ld [AutoInputAddress], a
-	ld a, h
-	ld [AutoInputAddress+1], a
-	jr .finishauto
-	
-.stopauto
-	call StopAutoInput
-	ld b, NO_INPUT
-	
-.finishauto
-	pop af
-	rst Bankswitch
-	ld a, b
-	ld [hJoyPressed], a ; pressed
-	ld [hJoyDown], a ; input
-	jr .quit
-; 9ee
-
-
-StartAutoInput: ; 9ee
-; Start reading automated input stream at a:hl.
-	
-	ld [AutoInputBank], a
-	ld a, l
-	ld [AutoInputAddress], a
-	ld a, h
-	ld [AutoInputAddress+1], a
-; Start reading the stream immediately.
-	xor a
-	ld [AutoInputLength], a
-; Reset input mirrors.
-	xor a
-	ld [hJoyPressed], a ; pressed this frame
-	ld [hJoyReleased], a ; released this frame
-	ld [hJoyDown], a ; currently pressed
-	
-	ld a, AUTO_INPUT
-	ld [InputType], a
-	ret
-; a0a
-
-
-StopAutoInput: ; a0a
-; Clear variables related to automated input.
-	xor a
-	ld [AutoInputBank], a
-	ld [AutoInputAddress], a
-	ld [AutoInputAddress+1], a
-	ld [AutoInputLength], a
-; Back to normal input.
-	ld [InputType], a
-	ret
-; a1b
-
--- a/landmarks.asm
+++ /dev/null
@@ -1,539 +1,0 @@
-GetLandmarkCoords: ; 0x1ca896
-; given a landmark id in e, return the y coord in d, and the x coord in e.
-	push hl
-	ld l, e
-	ld h, $0
-	add hl, hl
-	add hl, hl
-	ld de, Landmarks
-	add hl, de
-	ld a, [hli]
-	ld e, a
-	ld d, [hl]
-	pop hl
-	ret
-
-
-GetLandmarkName: ; 0x1ca8a5
-; given a landmark id in e, copy its name to $d073.
-	push hl
-	push de
-	push bc
-	ld l, e
-	ld h, $0
-	add hl, hl
-	add hl, hl
-	ld de, Landmarks + 2 ; skip the coordinates, we only want the string
-	add hl, de
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	ld de, $d073
-	ld c, 18
-.loop
-	ld a, [hli]
-	ld [de], a
-	inc de
-	dec c
-	jr nz, .loop
-	pop bc
-	pop de
-	pop hl
-	ret
-
-Landmarks: ; 0x1ca8c3
-;db x coord, y coord
-;dw pointer to name 
-	db 0,0
-	dw SpecialMapString
-
-	db 148,116
-	dw NewBarkString
-
-	db 136,116
-	dw Route29String
-
-	db 108,116
-	dw CherrygroveString
-
-	db 108,96
-	dw Route30String
-
-	db 104,76
-	dw Route31String
-
-	db 92,76
-	dw VioletString
-
-	db 93,74
-	dw SproutString
-
-	db 92,108
-	dw Route32String
-
-	db 84,92
-	dw RuinsString
-
-	db 92,140
-	dw UnionString
-
-	db 90,140
-	dw Route33String
-
-	db 76,140
-	dw AzaleaString
-
-	db 78,138
-	dw WellString
-
-	db 60,136
-	dw IlexString
-
-	db 60,128
-	dw Route34String
-
-	db 60,108
-	dw GoldenrodString
-
-	db 58,108
-	dw RadioTowerString
-
-	db 60,92
-	dw Route35String
-
-	db 60,76
-	dw ParkString
-
-	db 72,76
-	dw Route36String
-
-	db 76,68
-	dw Route37String
-
-	db 76,60
-	dw EcruteakString
-
-	db 78,58
-	dw TinString
-
-	db 74,58
-	dw BurnedTowerString
-
-	db 60,60
-	dw Route38String
-
-	db 44,64
-	dw Route39String
-
-	db 44,76
-	dw OlivineString
-
-	db 46,78
-	dw LighthouseString
-
-	db 36,72
-	dw BattleTowerString
-
-	db 36,80
-	dw Route40String
-
-	db 36,108
-	dw WhirlString
-
-	db 36,116
-	dw Route41String
-
-	db 28,116
-	dw CianwoodString
-
-	db 100,60
-	dw Route42String
-
-	db 92,60
-	dw MortarString
-
-	db 116,60
-	dw MahoganyString
-
-	db 116,52
-	dw Route43String
-
-	db 116,44
-	dw LakeString
-
-	db 128,60
-	dw Route44String
-
-	db 138,54
-	dw PathString
-
-	db 140,60
-	dw BlackthornString
-
-	db 140,52
-	dw DenString
-
-	db 140,80
-	dw Route45String
-
-	db 120,88
-	dw DarkString
-
-	db 132,104
-	dw Route46String
-
-	db 156,84
-	dw SilverCaveString
-
-	db 60,124
-	dw PalletString
-
-	db 60,108
-	dw Route1String
-
-	db 60,92
-	dw ViridianString
-
-	db 60,80
-	dw Route2String
-
-	db 60,68
-	dw PewterString
-
-	db 72,68
-	dw Route3String
-
-	db 84,68
-	dw MoonString
-
-	db 96,68
-	dw Route4String
-
-	db 108,68
-	dw CeruleanString
-
-	db 108,60
-	dw Route24String
-
-	db 116,52
-	dw Route25String
-
-	db 108,76
-	dw Route5String
-
-	db 116,92
-	dw UndergroundString
-
-	db 108,92
-	dw Route6String
-
-	db 108,100
-	dw VermilionString
-
-	db 96,76
-	dw DiglettsCaveString
-
-	db 96,84
-	dw Route7String
-
-	db 124,84
-	dw Route8String
-
-	db 124,68
-	dw Route9String
-
-	db 140,68
-	dw TunnelString
-
-	db 140,72
-	dw Route10String
-
-	db 140,76
-	dw PlantString
-
-	db 140,84
-	dw LavenderString
-
-	db 148,84
-	dw LavTowerString
-
-	db 84,84
-	dw CeladonString
-
-	db 108,84
-	dw SaffronString
-
-	db 124,100
-	dw Route11String
-
-	db 140,96
-	dw Route12String
-
-	db 132,116
-	dw Route13String
-
-	db 124,128
-	dw Route14String
-
-	db 112,132
-	dw Route15String
-
-	db 76,84
-	dw Route16String
-
-	db 76,108
-	dw Route17String
-
-	db 88,132
-	dw Route18String
-
-	db 100,132
-	dw FuchsiaString
-
-	db 100,144
-	dw Route19String
-
-	db 84,148
-	dw Route20String
-
-	db 76,148
-	dw SeafoamString
-
-	db 60,148
-	dw CinnabarString
-
-	db 60,136
-	dw Route21String
-
-	db 44,84
-	dw Route22String
-
-	db 36,68
-	dw RoadString
-
-	db 36,60
-	dw Route23String
-
-	db 36,52
-	dw IndigoString
-
-	db 36,108
-	dw Route26String
-
-	db 28,116
-	dw Route27String
-
-	db 20,116
-	dw FallsString
-
-	db 28,84
-	dw Route28String
-
-	db 148,132
-	dw AquaString
-
-NewBarkString:
-	db "NEW BARK",$1F,"TOWN@"
-CherrygroveString:
-	db "CHERRYGROVE",$1F,"CITY@"
-VioletString:
-	db "VIOLET CITY@"
-AzaleaString:
-	db "AZALEA TOWN@"
-GoldenrodString:
-	db "GOLDENROD",$1F,"CITY@"
-EcruteakString:
-	db "ECRUTEAK",$1F,"CITY@"
-OlivineString:
-	db "OLIVINE",$1F,"CITY@"
-CianwoodString:
-	db "CIANWOOD",$1F,"CITY@"
-MahoganyString:
-	db "MAHOGANY",$1F,"TOWN@"
-BlackthornString:
-	db "BLACKTHORN",$1F,"CITY@"
-LakeString:
-	db "LAKE OF",$1F,"RAGE@"
-SilverCaveString:
-	db "SILVER CAVE@"
-SproutString:
-	db "SPROUT",$1F,"TOWER@"
-RuinsString:
-	db "RUINS",$1F,"OF ALPH@"
-UnionString:
-	db "UNION CAVE@"
-WellString:
-	db "SLOWPOKE",$1F,"WELL@"
-RadioTowerString:
-	db "RADIO TOWER@"
-PlantString:
-	db "POWER PLANT@"
-ParkString:
-	db "NATIONAL",$1F,"PARK@"
-TinString:
-	db "TIN TOWER@"
-LighthouseString:
-	db "LIGHTHOUSE@"
-WhirlString:
-	db "WHIRL",$1F,"ISLANDS@"
-MortarString:
-	db "MT.MORTAR@"
-DenString:
-	db "DRAGON'S",$1F,"DEN@"
-PathString:
-	db "ICE PATH@"
-NotApplicableString:
-	db "N/A@"
-PalletString:
-	db "PALLET TOWN@"
-ViridianString:
-	db "VIRIDIAN",$1F,"CITY@"
-PewterString:
-	db "PEWTER CITY@"
-CeruleanString:
-	db "CERULEAN",$1F,"CITY@"
-LavenderString:
-	db "LAVENDER",$1F,"TOWN@"
-VermilionString:
-	db "VERMILION",$1F,"CITY@"
-CeladonString:
-	db "CELADON",$1F,"CITY@"
-SaffronString:
-	db "SAFFRON",$1F,"CITY@"
-FuchsiaString:
-	db "FUCHSIA",$1F,"CITY@"
-CinnabarString:
-	db "CINNABAR",$1F,"ISLAND@"
-IndigoString:
-	db "INDIGO",$1F,"PLATEAU@"
-RoadString:
-	db "VICTORY",$1F,"ROAD@"
-MoonString:
-	db "MT.MOON@"
-TunnelString:
-	db "ROCK TUNNEL@"
-LavTowerString:
-	db "LAV",$1F,"RADIO TOWER@"
-SilphString:
-	db "SILPH CO.@"
-ZoneString:
-	db "SAFARI ZONE@"
-SeafoamString:
-	db "SEAFOAM",$1F,"ISLANDS@"
-MansionString:
-	db "#MON",$1F,"MANSION@"
-DungeonString:
-	db "CERULEAN",$1F,"CAVE@"
-Route1String:
-	db "ROUTE 1@"
-Route2String:
-	db "ROUTE 2@"
-Route3String:
-	db "ROUTE 3@"
-Route4String:
-	db "ROUTE 4@"
-Route5String:
-	db "ROUTE 5@"
-Route6String:
-	db "ROUTE 6@"
-Route7String:
-	db "ROUTE 7@"
-Route8String:
-	db "ROUTE 8@"
-Route9String:
-	db "ROUTE 9@"
-Route10String:
-	db "ROUTE 10@"
-Route11String:
-	db "ROUTE 11@"
-Route12String:
-	db "ROUTE 12@"
-Route13String:
-	db "ROUTE 13@"
-Route14String:
-	db "ROUTE 14@"
-Route15String:
-	db "ROUTE 15@"
-Route16String:
-	db "ROUTE 16@"
-Route17String:
-	db "ROUTE 17@"
-Route18String:
-	db "ROUTE 18@"
-Route19String:
-	db "ROUTE 19@"
-Route20String:
-	db "ROUTE 20@"
-Route21String:
-	db "ROUTE 21@"
-Route22String:
-	db "ROUTE 22@"
-Route23String:
-	db "ROUTE 23@"
-Route24String:
-	db "ROUTE 24@"
-Route25String:
-	db "ROUTE 25@"
-Route26String:
-	db "ROUTE 26@"
-Route27String:
-	db "ROUTE 27@"
-Route28String:
-	db "ROUTE 28@"
-Route29String:
-	db "ROUTE 29@"
-Route30String:
-	db "ROUTE 30@"
-Route31String:
-	db "ROUTE 31@"
-Route32String:
-	db "ROUTE 32@"
-Route33String:
-	db "ROUTE 33@"
-Route34String:
-	db "ROUTE 34@"
-Route35String:
-	db "ROUTE 35@"
-Route36String:
-	db "ROUTE 36@"
-Route37String:
-	db "ROUTE 37@"
-Route38String:
-	db "ROUTE 38@"
-Route39String:
-	db "ROUTE 39@"
-Route40String:
-	db "ROUTE 40@"
-Route41String:
-	db "ROUTE 41@"
-Route42String:
-	db "ROUTE 42@"
-Route43String:
-	db "ROUTE 43@"
-Route44String:
-	db "ROUTE 44@"
-Route45String:
-	db "ROUTE 45@"
-Route46String:
-	db "ROUTE 46@"
-DarkString:
-	db "DARK CAVE@"
-IlexString:
-	db "ILEX",$1F,"FOREST@"
-BurnedTowerString:
-	db "BURNED",$1F,"TOWER@"
-AquaString:
-	db "FAST SHIP@"
-ViridianForestString:
-	db "VIRIDIAN",$1F,"FOREST@"
-DiglettsCaveString:
-	db "DIGLETT'S",$1F,"CAVE@"
-FallsString:
-	db "TOHJO FALLS@"
-UndergroundString:
-	db "UNDERGROUND@"
-BattleTowerString:
-	db "BATTLE",$1F,"TOWER@"
-SpecialMapString:
-	db "SPECIAL@"
-
--- a/main.asm
+++ b/main.asm
@@ -60,7 +60,7 @@
 
 
 VBlank: ; 283
-INCLUDE "vblank.asm"
+INCLUDE "engine/vblank.asm"
 
 
 DelayFrame: ; 45a
@@ -437,7 +437,7 @@
 INCBIN "baserom.gbc", $6c4, $92e - $6c4
 
 
-INCLUDE "joypad.asm"
+INCLUDE "engine/joypad.asm"
 
 
 INCBIN "baserom.gbc", $a1b, $b40 - $a1b
@@ -12984,7 +12984,7 @@
 
 
 BitTable2: ; 80462
-INCLUDE "bittable2.asm"
+INCLUDE "engine/bittable2.asm"
 ; 80648
 
 
@@ -14938,7 +14938,7 @@
 
 INCBIN "baserom.gbc", $966b0, $96cb1 - $966b0
 
-INCLUDE "scripting.asm"
+INCLUDE "engine/scripting.asm"
 
 INCBIN "baserom.gbc", $97c20, $35e
 
@@ -19353,7 +19353,7 @@
 INCBIN "baserom.gbc", $10983f, $1099aa - $10983f
 
 ; Credits
-INCLUDE "credits.asm"
+INCLUDE "engine/credits.asm"
 
 
 SECTION "bank43",DATA,BANK[$43]
@@ -21354,7 +21354,7 @@
 INCLUDE "battle/move_names.asm"
 
 
-INCLUDE "landmarks.asm"
+INCLUDE "engine/landmarks.asm"
 
 
 RegionCheck: ; 0x1caea1
--- a/map_constants.asm
+++ /dev/null
@@ -1,1585 +1,0 @@
-; map group ids
-GROUP_OLIVINE_POKECENTER_1F EQU $01
-GROUP_OLIVINE_GYM EQU $01
-GROUP_OLIVINE_VOLTORB_HOUSE EQU $01
-GROUP_OLIVINE_HOUSE_BETA EQU $01
-GROUP_OLIVINE_PUNISHMENT_SPEECH_HOUSE EQU $01
-GROUP_OLIVINE_GOOD_ROD_HOUSE EQU $01
-GROUP_OLIVINE_CAFE EQU $01
-GROUP_OLIVINE_MART EQU $01
-GROUP_ROUTE_38_ECRUTEAK_GATE EQU $01
-GROUP_ROUTE_39_BARN EQU $01
-GROUP_ROUTE_39_FARMHOUSE EQU $01
-GROUP_ROUTE_38 EQU $01
-GROUP_ROUTE_39 EQU $01
-GROUP_OLIVINE_CITY EQU $01
-GROUP_MAHOGANY_RED_GYARADOS_SPEECH_HOUSE EQU $02
-GROUP_MAHOGANY_GYM EQU $02
-GROUP_MAHOGANY_POKECENTER_1F EQU $02
-GROUP_ROUTE_42_ECRUTEAK_GATE EQU $02
-GROUP_ROUTE_42 EQU $02
-GROUP_ROUTE_44 EQU $02
-GROUP_MAHOGANY_TOWN EQU $02
-GROUP_SPROUT_TOWER_1F EQU $03
-GROUP_SPROUT_TOWER_2F EQU $03
-GROUP_SPROUT_TOWER_3F EQU $03
-GROUP_TIN_TOWER_1F EQU $03
-GROUP_TIN_TOWER_2F EQU $03
-GROUP_TIN_TOWER_3F EQU $03
-GROUP_TIN_TOWER_4F EQU $03
-GROUP_TIN_TOWER_5F EQU $03
-GROUP_TIN_TOWER_6F EQU $03
-GROUP_TIN_TOWER_7F EQU $03
-GROUP_TIN_TOWER_8F EQU $03
-GROUP_TIN_TOWER_9F EQU $03
-GROUP_BURNED_TOWER_1F EQU $03
-GROUP_BURNED_TOWER_B1F EQU $03
-GROUP_NATIONAL_PARK EQU $03
-GROUP_NATIONAL_PARK_BUG_CONTEST EQU $03
-GROUP_RADIO_TOWER_1F EQU $03
-GROUP_RADIO_TOWER_2F EQU $03
-GROUP_RADIO_TOWER_3F EQU $03
-GROUP_RADIO_TOWER_4F EQU $03
-GROUP_RADIO_TOWER_5F EQU $03
-GROUP_RUINS_OF_ALPH_OUTSIDE EQU $03
-GROUP_RUINS_OF_ALPH_HO_OH_CHAMBER EQU $03
-GROUP_RUINS_OF_ALPH_KABUTO_CHAMBER EQU $03
-GROUP_RUINS_OF_ALPH_OMANYTE_CHAMBER EQU $03
-GROUP_RUINS_OF_ALPH_AERODACTYL_CHAMBER EQU $03
-GROUP_RUINS_OF_ALPH_INNER_CHAMBER EQU $03
-GROUP_RUINS_OF_ALPH_RESEARCH_CENTER EQU $03
-GROUP_RUINS_OF_ALPH_HO_OH_ITEM_ROOM EQU $03
-GROUP_RUINS_OF_ALPH_KABUTO_ITEM_ROOM EQU $03
-GROUP_RUINS_OF_ALPH_OMANYTE_ITEM_ROOM EQU $03
-GROUP_RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM EQU $03
-GROUP_RUINS_OF_ALPH_HO_OH_WORD_ROOM EQU $03
-GROUP_RUINS_OF_ALPH_KABUTO_WORD_ROOM EQU $03
-GROUP_RUINS_OF_ALPH_OMANYTE_WORD_ROOM EQU $03
-GROUP_RUINS_OF_ALPH_AERODACTYL_WORD_ROOM EQU $03
-GROUP_UNION_CAVE_1F EQU $03
-GROUP_UNION_CAVE_B1F EQU $03
-GROUP_UNION_CAVE_B2F EQU $03
-GROUP_SLOWPOKE_WELL_B1F EQU $03
-GROUP_SLOWPOKE_WELL_B2F EQU $03
-GROUP_OLIVINE_LIGHTHOUSE_1F EQU $03
-GROUP_OLIVINE_LIGHTHOUSE_2F EQU $03
-GROUP_OLIVINE_LIGHTHOUSE_3F EQU $03
-GROUP_OLIVINE_LIGHTHOUSE_4F EQU $03
-GROUP_OLIVINE_LIGHTHOUSE_5F EQU $03
-GROUP_OLIVINE_LIGHTHOUSE_6F EQU $03
-GROUP_MAHOGANY_MART_1F EQU $03
-GROUP_TEAM_ROCKET_BASE_B1F EQU $03
-GROUP_TEAM_ROCKET_BASE_B2F EQU $03
-GROUP_TEAM_ROCKET_BASE_B3F EQU $03
-GROUP_ILEX_FOREST EQU $03
-GROUP_WAREHOUSE_ENTRANCE EQU $03
-GROUP_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES EQU $03
-GROUP_GOLDENROD_DEPT_STORE_B1F EQU $03
-GROUP_UNDERGROUND_WAREHOUSE EQU $03
-GROUP_MOUNT_MORTAR_1F_OUTSIDE EQU $03
-GROUP_MOUNT_MORTAR_1F_INSIDE EQU $03
-GROUP_MOUNT_MORTAR_2F_INSIDE EQU $03
-GROUP_MOUNT_MORTAR_B1F EQU $03
-GROUP_ICE_PATH_1F EQU $03
-GROUP_ICE_PATH_B1F EQU $03
-GROUP_ICE_PATH_B2F_MAHOGANY_SIDE EQU $03
-GROUP_ICE_PATH_B2F_BLACKTHORN_SIDE EQU $03
-GROUP_ICE_PATH_B3F EQU $03
-GROUP_WHIRL_ISLAND_NW EQU $03
-GROUP_WHIRL_ISLAND_NE EQU $03
-GROUP_WHIRL_ISLAND_SW EQU $03
-GROUP_WHIRL_ISLAND_CAVE EQU $03
-GROUP_WHIRL_ISLAND_SE EQU $03
-GROUP_WHIRL_ISLAND_B1F EQU $03
-GROUP_WHIRL_ISLAND_B2F EQU $03
-GROUP_WHIRL_ISLAND_LUGIA_CHAMBER EQU $03
-GROUP_SILVER_CAVE_ROOM_1 EQU $03
-GROUP_SILVER_CAVE_ROOM_2 EQU $03
-GROUP_SILVER_CAVE_ROOM_3 EQU $03
-GROUP_SILVER_CAVE_ITEM_ROOMS EQU $03
-GROUP_DARK_CAVE_VIOLET_ENTRANCE EQU $03
-GROUP_DARK_CAVE_BLACKTHORN_ENTRANCE EQU $03
-GROUP_DRAGONS_DEN_1F EQU $03
-GROUP_DRAGONS_DEN_B1F EQU $03
-GROUP_DRAGON_SHRINE EQU $03
-GROUP_TOHJO_FALLS EQU $03
-GROUP_DIGLETTS_CAVE EQU $03
-GROUP_MOUNT_MOON EQU $03
-GROUP_UNDERGROUND EQU $03
-GROUP_ROCK_TUNNEL_1F EQU $03
-GROUP_ROCK_TUNNEL_B1F EQU $03
-GROUP_SAFARI_ZONE_FUCHSIA_GATE_BETA EQU $03
-GROUP_SAFARI_ZONE_BETA EQU $03
-GROUP_VICTORY_ROAD EQU $03
-GROUP_ECRUTEAK_HOUSE EQU $04
-GROUP_WISE_TRIOS_ROOM EQU $04
-GROUP_ECRUTEAK_POKECENTER_1F EQU $04
-GROUP_ECRUTEAK_LUGIA_SPEECH_HOUSE EQU $04
-GROUP_DANCE_THEATRE EQU $04
-GROUP_ECRUTEAK_MART EQU $04
-GROUP_ECRUTEAK_GYM EQU $04
-GROUP_ECRUTEAK_ITEMFINDER_HOUSE EQU $04
-GROUP_ECRUTEAK_CITY EQU $04
-GROUP_BLACKTHORN_GYM_1F EQU $05
-GROUP_BLACKTHORN_GYM_2F EQU $05
-GROUP_BLACKTHORN_DRAGON_SPEECH_HOUSE EQU $05
-GROUP_BLACKTHORN_DODRIO_TRADE_HOUSE EQU $05
-GROUP_BLACKTHORN_MART EQU $05
-GROUP_BLACKTHORN_POKECENTER_1F EQU $05
-GROUP_MOVE_DELETERS_HOUSE EQU $05
-GROUP_ROUTE_45 EQU $05
-GROUP_ROUTE_46 EQU $05
-GROUP_BLACKTHORN_CITY EQU $05
-GROUP_CINNABAR_POKECENTER_1F EQU $06
-GROUP_CINNABAR_POKECENTER_2F_BETA EQU $06
-GROUP_ROUTE_19___FUCHSIA_GATE EQU $06
-GROUP_SEAFOAM_GYM EQU $06
-GROUP_ROUTE_19 EQU $06
-GROUP_ROUTE_20 EQU $06
-GROUP_ROUTE_21 EQU $06
-GROUP_CINNABAR_ISLAND EQU $06
-GROUP_CERULEAN_GYM_BADGE_SPEECH_HOUSE EQU $07
-GROUP_CERULEAN_POLICE_STATION EQU $07
-GROUP_CERULEAN_TRADE_SPEECH_HOUSE EQU $07
-GROUP_CERULEAN_POKECENTER_1F EQU $07
-GROUP_CERULEAN_POKECENTER_2F_BETA EQU $07
-GROUP_CERULEAN_GYM EQU $07
-GROUP_CERULEAN_MART EQU $07
-GROUP_ROUTE_10_POKECENTER_1F EQU $07
-GROUP_ROUTE_10_POKECENTER_2F_BETA EQU $07
-GROUP_POWER_PLANT EQU $07
-GROUP_BILLS_HOUSE EQU $07
-GROUP_ROUTE_4 EQU $07
-GROUP_ROUTE_9 EQU $07
-GROUP_ROUTE_10A EQU $07
-GROUP_ROUTE_10_NORTH EQU $07
-GROUP_ROUTE_24 EQU $07
-GROUP_ROUTE_25 EQU $07
-GROUP_CERULEAN_CITY EQU $07
-GROUP_AZALEA_POKECENTER_1F EQU $08
-GROUP_CHARCOAL_KILN EQU $08
-GROUP_AZALEA_MART EQU $08
-GROUP_KURTS_HOUSE EQU $08
-GROUP_AZALEA_GYM EQU $08
-GROUP_ROUTE_33 EQU $08
-GROUP_AZALEA_TOWN EQU $08
-GROUP_LAKE_OF_RAGE_HIDDEN_POWER_HOUSE EQU $09
-GROUP_LAKE_OF_RAGE_MAGIKARP_HOUSE EQU $09
-GROUP_ROUTE_43_MAHOGANY_GATE EQU $09
-GROUP_ROUTE_43_GATE EQU $09
-GROUP_ROUTE_43 EQU $09
-GROUP_LAKE_OF_RAGE EQU $09
-GROUP_ROUTE_32 EQU $0a
-GROUP_ROUTE_35 EQU $0a
-GROUP_ROUTE_36 EQU $0a
-GROUP_ROUTE_37 EQU $0a
-GROUP_VIOLET_CITY EQU $0a
-GROUP_VIOLET_MART EQU $0a
-GROUP_VIOLET_GYM EQU $0a
-GROUP_EARLS_POKEMON_ACADEMY EQU $0a
-GROUP_VIOLET_NICKNAME_SPEECH_HOUSE EQU $0a
-GROUP_VIOLET_POKECENTER_1F EQU $0a
-GROUP_VIOLET_ONIX_TRADE_HOUSE EQU $0a
-GROUP_ROUTE_32_RUINS_OF_ALPH_GATE EQU $0a
-GROUP_ROUTE_32_POKECENTER_1F EQU $0a
-GROUP_ROUTE_35_GOLDENROD_GATE EQU $0a
-GROUP_ROUTE_35_NATIONAL_PARK_GATE EQU $0a
-GROUP_ROUTE_36_RUINS_OF_ALPH_GATE EQU $0a
-GROUP_ROUTE_36_NATIONAL_PARK_GATE EQU $0a
-GROUP_ROUTE_34 EQU $0b
-GROUP_GOLDENROD_CITY EQU $0b
-GROUP_GOLDENROD_GYM EQU $0b
-GROUP_GOLDENROD_BIKE_SHOP EQU $0b
-GROUP_GOLDENROD_HAPPINESS_RATER EQU $0b
-GROUP_GOLDENROD_BILLS_HOUSE EQU $0b
-GROUP_GOLDENROD_MAGNET_TRAIN_STATION EQU $0b
-GROUP_GOLDENROD_FLOWER_SHOP EQU $0b
-GROUP_GOLDENROD_PP_SPEECH_HOUSE EQU $0b
-GROUP_GOLDENROD_NAME_RATERS_HOUSE EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_1F EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_2F EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_3F EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_4F EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_5F EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_6F EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_ELEVATOR EQU $0b
-GROUP_GOLDENROD_DEPT_STORE_ROOF EQU $0b
-GROUP_GOLDENROD_GAME_CORNER EQU $0b
-GROUP_GOLDENROD_POKECENTER_1F EQU $0b
-GROUP_GOLDENROD_POKECOM_CENTER_2F_MOBILE EQU $0b
-GROUP_ILEX_FOREST_AZALEA_GATE EQU $0b
-GROUP_ROUTE_34_ILEX_FOREST_GATE EQU $0b
-GROUP_DAY_CARE EQU $0b
-GROUP_ROUTE_6 EQU $0c
-GROUP_ROUTE_11 EQU $0c
-GROUP_VERMILION_CITY EQU $0c
-GROUP_VERMILION_HOUSE_FISHING_SPEECH_HOUSE EQU $0c
-GROUP_VERMILION_POKECENTER_1F EQU $0c
-GROUP_VERMILION_POKECENTER_2F_BETA EQU $0c
-GROUP_POKEMON_FAN_CLUB EQU $0c
-GROUP_VERMILION_MAGNET_TRAIN_SPEECH_HOUSE EQU $0c
-GROUP_VERMILION_MART EQU $0c
-GROUP_VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE EQU $0c
-GROUP_VERMILION_GYM EQU $0c
-GROUP_ROUTE_6_SAFFRON_GATE EQU $0c
-GROUP_ROUTE_6_UNDERGROUND_ENTRANCE EQU $0c
-GROUP_ROUTE_1 EQU $0d
-GROUP_PALLET_TOWN EQU $0d
-GROUP_REDS_HOUSE_1F EQU $0d
-GROUP_REDS_HOUSE_2F EQU $0d
-GROUP_BLUES_HOUSE EQU $0d
-GROUP_OAKS_LAB EQU $0d
-GROUP_ROUTE_3 EQU $0e
-GROUP_PEWTER_CITY EQU $0e
-GROUP_PEWTER_NIDORAN_SPEECH_HOUSE EQU $0e
-GROUP_PEWTER_GYM EQU $0e
-GROUP_PEWTER_MART EQU $0e
-GROUP_PEWTER_POKECENTER_1F EQU $0e
-GROUP_PEWTER_POKECENTER_2F_BETA EQU $0e
-GROUP_PEWTER_SNOOZE_SPEECH_HOUSE EQU $0e
-GROUP_OLIVINE_PORT EQU $0f
-GROUP_VERMILION_PORT EQU $0f
-GROUP_FAST_SHIP_1F EQU $0f
-GROUP_FAST_SHIP_CABINS_NNW_NNE_NE EQU $0f
-GROUP_FAST_SHIP_CABINS_SW_SSW_NW EQU $0f
-GROUP_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN EQU $0f
-GROUP_FAST_SHIP_B1F EQU $0f
-GROUP_OLIVINE_PORT_PASSAGE EQU $0f
-GROUP_VERMILION_PORT_PASSAGE EQU $0f
-GROUP_MOUNT_MOON_SQUARE EQU $0f
-GROUP_MOUNT_MOON_GIFT_SHOP EQU $0f
-GROUP_TIN_TOWER_ROOF EQU $0f
-GROUP_ROUTE_23 EQU $10
-GROUP_INDIGO_PLATEAU_POKECENTER_1F EQU $10
-GROUP_WILLS_ROOM EQU $10
-GROUP_KOGAS_ROOM EQU $10
-GROUP_BRUNOS_ROOM EQU $10
-GROUP_KARENS_ROOM EQU $10
-GROUP_LANCES_ROOM EQU $10
-GROUP_HALL_OF_FAME EQU $10
-GROUP_ROUTE_13 EQU $11
-GROUP_ROUTE_14 EQU $11
-GROUP_ROUTE_15 EQU $11
-GROUP_ROUTE_18 EQU $11
-GROUP_FUCHSIA_CITY EQU $11
-GROUP_FUCHSIA_MART EQU $11
-GROUP_SAFARI_ZONE_MAIN_OFFICE EQU $11
-GROUP_FUCHSIA_GYM EQU $11
-GROUP_FUCHSIA_BILL_SPEECH_HOUSE EQU $11
-GROUP_FUCHSIA_POKECENTER_1F EQU $11
-GROUP_FUCHSIA_POKECENTER_2F_BETA EQU $11
-GROUP_SAFARI_ZONE_WARDENS_HOME EQU $11
-GROUP_ROUTE_15_FUCHSIA_GATE EQU $11
-GROUP_ROUTE_8 EQU $12
-GROUP_ROUTE_12 EQU $12
-GROUP_ROUTE_10B EQU $12
-GROUP_ROUTE_10_SOUTH EQU $12
-GROUP_LAVENDER_TOWN EQU $12
-GROUP_LAVENDER_POKECENTER_1F EQU $12
-GROUP_LAVENDER_POKECENTER_2F_BETA EQU $12
-GROUP_MR_FUJIS_HOUSE EQU $12
-GROUP_LAVENDER_TOWN_SPEECH_HOUSE EQU $12
-GROUP_LAVENDER_NAME_RATER EQU $12
-GROUP_LAVENDER_MART EQU $12
-GROUP_SOUL_HOUSE EQU $12
-GROUP_LAV_RADIO_TOWER_1F EQU $12
-GROUP_ROUTE_8_SAFFRON_GATE EQU $12
-GROUP_ROUTE_12_SUPER_ROD_HOUSE EQU $12
-GROUP_ROUTE_28 EQU $13
-GROUP_SILVER_CAVE_OUTSIDE EQU $13
-GROUP_SILVER_CAVE_POKECENTER_1F EQU $13
-GROUP_ROUTE_28_FAMOUS_SPEECH_HOUSE EQU $13
-GROUP_POKECENTER_2F EQU $14
-GROUP_TRADE_CENTER EQU $14
-GROUP_COLOSSEUM EQU $14
-GROUP_TIME_CAPSULE EQU $14
-GROUP_MOBILE_TRADE_ROOM_MOBILE EQU $14
-GROUP_MOBILE_BATTLE_ROOM EQU $14
-GROUP_ROUTE_7 EQU $15
-GROUP_ROUTE_16 EQU $15
-GROUP_ROUTE_17 EQU $15
-GROUP_CELADON_CITY EQU $15
-GROUP_CELADON_DEPT_STORE_1F EQU $15
-GROUP_CELADON_DEPT_STORE_2F EQU $15
-GROUP_CELADON_DEPT_STORE_3F EQU $15
-GROUP_CELADON_DEPT_STORE_4F EQU $15
-GROUP_CELADON_DEPT_STORE_5F EQU $15
-GROUP_CELADON_DEPT_STORE_6F EQU $15
-GROUP_CELADON_DEPT_STORE_ELEVATOR EQU $15
-GROUP_CELADON_MANSION_1F EQU $15
-GROUP_CELADON_MANSION_2F EQU $15
-GROUP_CELADON_MANSION_3F EQU $15
-GROUP_CELADON_MANSION_ROOF EQU $15
-GROUP_CELADON_MANSION_ROOF_HOUSE EQU $15
-GROUP_CELADON_POKECENTER_1F EQU $15
-GROUP_CELADON_POKECENTER_2F_BETA EQU $15
-GROUP_CELADON_GAME_CORNER EQU $15
-GROUP_CELADON_GAME_CORNER_PRIZE_ROOM EQU $15
-GROUP_CELADON_GYM EQU $15
-GROUP_CELADON_CAFE EQU $15
-GROUP_ROUTE_16_FUCHSIA_SPEECH_HOUSE EQU $15
-GROUP_ROUTE_16_GATE EQU $15
-GROUP_ROUTE_7_SAFFRON_GATE EQU $15
-GROUP_ROUTE_17_18_GATE EQU $15
-GROUP_ROUTE_40 EQU $16
-GROUP_ROUTE_41 EQU $16
-GROUP_CIANWOOD_CITY EQU $16
-GROUP_MANIAS_HOUSE EQU $16
-GROUP_CIANWOOD_GYM EQU $16
-GROUP_CIANWOOD_POKECENTER_1F EQU $16
-GROUP_CIANWOOD_PHARMACY EQU $16
-GROUP_CIANWOOD_CITY_PHOTO_STUDIO EQU $16
-GROUP_CIANWOOD_LUGIA_SPEECH_HOUSE EQU $16
-GROUP_POKE_SEERS_HOUSE EQU $16
-GROUP_BATTLE_TOWER_1F EQU $16
-GROUP_BATTLE_TOWER_BATTLE_ROOM EQU $16
-GROUP_BATTLE_TOWER_ELEVATOR EQU $16
-GROUP_BATTLE_TOWER_HALLWAY EQU $16
-GROUP_ROUTE_40_BATTLE_TOWER_GATE EQU $16
-GROUP_BATTLE_TOWER_OUTSIDE EQU $16
-GROUP_ROUTE_2 EQU $17
-GROUP_ROUTE_22 EQU $17
-GROUP_VIRIDIAN_CITY EQU $17
-GROUP_VIRIDIAN_GYM EQU $17
-GROUP_VIRIDIAN_NICKNAME_SPEECH_HOUSE EQU $17
-GROUP_TRAINER_HOUSE_1F EQU $17
-GROUP_TRAINER_HOUSE_B1F EQU $17
-GROUP_VIRIDIAN_MART EQU $17
-GROUP_VIRIDIAN_POKECENTER_1F EQU $17
-GROUP_VIRIDIAN_POKECENTER_2F_BETA EQU $17
-GROUP_ROUTE_2_NUGGET_SPEECH_HOUSE EQU $17
-GROUP_ROUTE_2_GATE EQU $17
-GROUP_VICTORY_ROAD_GATE EQU $17
-GROUP_ROUTE_26 EQU $18
-GROUP_ROUTE_27 EQU $18
-GROUP_ROUTE_29 EQU $18
-GROUP_NEW_BARK_TOWN EQU $18
-GROUP_ELMS_LAB EQU $18
-GROUP_KRISS_HOUSE_1F EQU $18
-GROUP_KRISS_HOUSE_2F EQU $18
-GROUP_KRISS_NEIGHBORS_HOUSE EQU $18
-GROUP_ELMS_HOUSE EQU $18
-GROUP_ROUTE_26_HEAL_SPEECH_HOUSE EQU $18
-GROUP_ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE EQU $18
-GROUP_ROUTE_27_SANDSTORM_HOUSE EQU $18
-GROUP_ROUTE_29_46_GATE EQU $18
-GROUP_ROUTE_5 EQU $19
-GROUP_SAFFRON_CITY EQU $19
-GROUP_FIGHTING_DOJO EQU $19
-GROUP_SAFFRON_GYM EQU $19
-GROUP_SAFFRON_MART EQU $19
-GROUP_SAFFRON_POKECENTER_1F EQU $19
-GROUP_SAFFRON_POKECENTER_2F_BETA EQU $19
-GROUP_MR_PSYCHICS_HOUSE EQU $19
-GROUP_SAFFRON_TRAIN_STATION EQU $19
-GROUP_SILPH_CO_1F EQU $19
-GROUP_COPYCATS_HOUSE_1F EQU $19
-GROUP_COPYCATS_HOUSE_2F EQU $19
-GROUP_ROUTE_5_UNDERGROUND_ENTRANCE EQU $19
-GROUP_ROUTE_5_SAFFRON_CITY_GATE EQU $19
-GROUP_ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE EQU $19
-GROUP_ROUTE_30 EQU $1a
-GROUP_ROUTE_31 EQU $1a
-GROUP_CHERRYGROVE_CITY EQU $1a
-GROUP_CHERRYGROVE_MART EQU $1a
-GROUP_CHERRYGROVE_POKECENTER_1F EQU $1a
-GROUP_CHERRYGROVE_GYM_SPEECH_HOUSE EQU $1a
-GROUP_GUIDE_GENTS_HOUSE EQU $1a
-GROUP_CHERRYGROVE_EVOLUTION_SPEECH_HOUSE EQU $1a
-GROUP_ROUTE_30_BERRY_SPEECH_HOUSE EQU $1a
-GROUP_MR_POKEMONS_HOUSE EQU $1a
-GROUP_ROUTE_31_VIOLET_GATE EQU $1a
-
-; map ids
-MAP_OLIVINE_POKECENTER_1F EQU $01
-MAP_OLIVINE_GYM EQU $02
-MAP_OLIVINE_VOLTORB_HOUSE EQU $03
-MAP_OLIVINE_HOUSE_BETA EQU $04
-MAP_OLIVINE_PUNISHMENT_SPEECH_HOUSE EQU $05
-MAP_OLIVINE_GOOD_ROD_HOUSE EQU $06
-MAP_OLIVINE_CAFE EQU $07
-MAP_OLIVINE_MART EQU $08
-MAP_ROUTE_38_ECRUTEAK_GATE EQU $09
-MAP_ROUTE_39_BARN EQU $0a
-MAP_ROUTE_39_FARMHOUSE EQU $0b
-MAP_ROUTE_38 EQU $0c
-MAP_ROUTE_39 EQU $0d
-MAP_OLIVINE_CITY EQU $0e
-MAP_MAHOGANY_RED_GYARADOS_SPEECH_HOUSE EQU $01
-MAP_MAHOGANY_GYM EQU $02
-MAP_MAHOGANY_POKECENTER_1F EQU $03
-MAP_ROUTE_42_ECRUTEAK_GATE EQU $04
-MAP_ROUTE_42 EQU $05
-MAP_ROUTE_44 EQU $06
-MAP_MAHOGANY_TOWN EQU $07
-MAP_SPROUT_TOWER_1F EQU $01
-MAP_SPROUT_TOWER_2F EQU $02
-MAP_SPROUT_TOWER_3F EQU $03
-MAP_TIN_TOWER_1F EQU $04
-MAP_TIN_TOWER_2F EQU $05
-MAP_TIN_TOWER_3F EQU $06
-MAP_TIN_TOWER_4F EQU $07
-MAP_TIN_TOWER_5F EQU $08
-MAP_TIN_TOWER_6F EQU $09
-MAP_TIN_TOWER_7F EQU $0a
-MAP_TIN_TOWER_8F EQU $0b
-MAP_TIN_TOWER_9F EQU $0c
-MAP_BURNED_TOWER_1F EQU $0d
-MAP_BURNED_TOWER_B1F EQU $0e
-MAP_NATIONAL_PARK EQU $0f
-MAP_NATIONAL_PARK_BUG_CONTEST EQU $10
-MAP_RADIO_TOWER_1F EQU $11
-MAP_RADIO_TOWER_2F EQU $12
-MAP_RADIO_TOWER_3F EQU $13
-MAP_RADIO_TOWER_4F EQU $14
-MAP_RADIO_TOWER_5F EQU $15
-MAP_RUINS_OF_ALPH_OUTSIDE EQU $16
-MAP_RUINS_OF_ALPH_HO_OH_CHAMBER EQU $17
-MAP_RUINS_OF_ALPH_KABUTO_CHAMBER EQU $18
-MAP_RUINS_OF_ALPH_OMANYTE_CHAMBER EQU $19
-MAP_RUINS_OF_ALPH_AERODACTYL_CHAMBER EQU $1a
-MAP_RUINS_OF_ALPH_INNER_CHAMBER EQU $1b
-MAP_RUINS_OF_ALPH_RESEARCH_CENTER EQU $1c
-MAP_RUINS_OF_ALPH_HO_OH_ITEM_ROOM EQU $1d
-MAP_RUINS_OF_ALPH_KABUTO_ITEM_ROOM EQU $1e
-MAP_RUINS_OF_ALPH_OMANYTE_ITEM_ROOM EQU $1f
-MAP_RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM EQU $20
-MAP_RUINS_OF_ALPH_HO_OH_WORD_ROOM EQU $21
-MAP_RUINS_OF_ALPH_KABUTO_WORD_ROOM EQU $22
-MAP_RUINS_OF_ALPH_OMANYTE_WORD_ROOM EQU $23
-MAP_RUINS_OF_ALPH_AERODACTYL_WORD_ROOM EQU $24
-MAP_UNION_CAVE_1F EQU $25
-MAP_UNION_CAVE_B1F EQU $26
-MAP_UNION_CAVE_B2F EQU $27
-MAP_SLOWPOKE_WELL_B1F EQU $28
-MAP_SLOWPOKE_WELL_B2F EQU $29
-MAP_OLIVINE_LIGHTHOUSE_1F EQU $2a
-MAP_OLIVINE_LIGHTHOUSE_2F EQU $2b
-MAP_OLIVINE_LIGHTHOUSE_3F EQU $2c
-MAP_OLIVINE_LIGHTHOUSE_4F EQU $2d
-MAP_OLIVINE_LIGHTHOUSE_5F EQU $2e
-MAP_OLIVINE_LIGHTHOUSE_6F EQU $2f
-MAP_MAHOGANY_MART_1F EQU $30
-MAP_TEAM_ROCKET_BASE_B1F EQU $31
-MAP_TEAM_ROCKET_BASE_B2F EQU $32
-MAP_TEAM_ROCKET_BASE_B3F EQU $33
-MAP_ILEX_FOREST EQU $34
-MAP_WAREHOUSE_ENTRANCE EQU $35
-MAP_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES EQU $36
-MAP_GOLDENROD_DEPT_STORE_B1F EQU $37
-MAP_UNDERGROUND_WAREHOUSE EQU $38
-MAP_MOUNT_MORTAR_1F_OUTSIDE EQU $39
-MAP_MOUNT_MORTAR_1F_INSIDE EQU $3a
-MAP_MOUNT_MORTAR_2F_INSIDE EQU $3b
-MAP_MOUNT_MORTAR_B1F EQU $3c
-MAP_ICE_PATH_1F EQU $3d
-MAP_ICE_PATH_B1F EQU $3e
-MAP_ICE_PATH_B2F_MAHOGANY_SIDE EQU $3f
-MAP_ICE_PATH_B2F_BLACKTHORN_SIDE EQU $40
-MAP_ICE_PATH_B3F EQU $41
-MAP_WHIRL_ISLAND_NW EQU $42
-MAP_WHIRL_ISLAND_NE EQU $43
-MAP_WHIRL_ISLAND_SW EQU $44
-MAP_WHIRL_ISLAND_CAVE EQU $45
-MAP_WHIRL_ISLAND_SE EQU $46
-MAP_WHIRL_ISLAND_B1F EQU $47
-MAP_WHIRL_ISLAND_B2F EQU $48
-MAP_WHIRL_ISLAND_LUGIA_CHAMBER EQU $49
-MAP_SILVER_CAVE_ROOM_1 EQU $4a
-MAP_SILVER_CAVE_ROOM_2 EQU $4b
-MAP_SILVER_CAVE_ROOM_3 EQU $4c
-MAP_SILVER_CAVE_ITEM_ROOMS EQU $4d
-MAP_DARK_CAVE_VIOLET_ENTRANCE EQU $4e
-MAP_DARK_CAVE_BLACKTHORN_ENTRANCE EQU $4f
-MAP_DRAGONS_DEN_1F EQU $50
-MAP_DRAGONS_DEN_B1F EQU $51
-MAP_DRAGON_SHRINE EQU $52
-MAP_TOHJO_FALLS EQU $53
-MAP_DIGLETTS_CAVE EQU $54
-MAP_MOUNT_MOON EQU $55
-MAP_UNDERGROUND EQU $56
-MAP_ROCK_TUNNEL_1F EQU $57
-MAP_ROCK_TUNNEL_B1F EQU $58
-MAP_SAFARI_ZONE_FUCHSIA_GATE_BETA EQU $59
-MAP_SAFARI_ZONE_BETA EQU $5a
-MAP_VICTORY_ROAD EQU $5b
-MAP_ECRUTEAK_HOUSE EQU $01
-MAP_WISE_TRIOS_ROOM EQU $02
-MAP_ECRUTEAK_POKECENTER_1F EQU $03
-MAP_ECRUTEAK_LUGIA_SPEECH_HOUSE EQU $04
-MAP_DANCE_THEATRE EQU $05
-MAP_ECRUTEAK_MART EQU $06
-MAP_ECRUTEAK_GYM EQU $07
-MAP_ECRUTEAK_ITEMFINDER_HOUSE EQU $08
-MAP_ECRUTEAK_CITY EQU $09
-MAP_BLACKTHORN_GYM_1F EQU $01
-MAP_BLACKTHORN_GYM_2F EQU $02
-MAP_BLACKTHORN_DRAGON_SPEECH_HOUSE EQU $03
-MAP_BLACKTHORN_DODRIO_TRADE_HOUSE EQU $04
-MAP_BLACKTHORN_MART EQU $05
-MAP_BLACKTHORN_POKECENTER_1F EQU $06
-MAP_MOVE_DELETERS_HOUSE EQU $07
-MAP_ROUTE_45 EQU $08
-MAP_ROUTE_46 EQU $09
-MAP_BLACKTHORN_CITY EQU $0a
-MAP_CINNABAR_POKECENTER_1F EQU $01
-MAP_CINNABAR_POKECENTER_2F_BETA EQU $02
-MAP_ROUTE_19___FUCHSIA_GATE EQU $03
-MAP_SEAFOAM_GYM EQU $04
-MAP_ROUTE_19 EQU $05
-MAP_ROUTE_20 EQU $06
-MAP_ROUTE_21 EQU $07
-MAP_CINNABAR_ISLAND EQU $08
-MAP_CERULEAN_GYM_BADGE_SPEECH_HOUSE EQU $01
-MAP_CERULEAN_POLICE_STATION EQU $02
-MAP_CERULEAN_TRADE_SPEECH_HOUSE EQU $03
-MAP_CERULEAN_POKECENTER_1F EQU $04
-MAP_CERULEAN_POKECENTER_2F_BETA EQU $05
-MAP_CERULEAN_GYM EQU $06
-MAP_CERULEAN_MART EQU $07
-MAP_ROUTE_10_POKECENTER_1F EQU $08
-MAP_ROUTE_10_POKECENTER_2F_BETA EQU $09
-MAP_POWER_PLANT EQU $0a
-MAP_BILLS_HOUSE EQU $0b
-MAP_ROUTE_4 EQU $0c
-MAP_ROUTE_9 EQU $0d
-MAP_ROUTE_10A EQU $0e
-MAP_ROUTE_10_NORTH EQU $0e
-MAP_ROUTE_24 EQU $0f
-MAP_ROUTE_25 EQU $10
-MAP_CERULEAN_CITY EQU $11
-MAP_AZALEA_POKECENTER_1F EQU $01
-MAP_CHARCOAL_KILN EQU $02
-MAP_AZALEA_MART EQU $03
-MAP_KURTS_HOUSE EQU $04
-MAP_AZALEA_GYM EQU $05
-MAP_ROUTE_33 EQU $06
-MAP_AZALEA_TOWN EQU $07
-MAP_LAKE_OF_RAGE_HIDDEN_POWER_HOUSE EQU $01
-MAP_LAKE_OF_RAGE_MAGIKARP_HOUSE EQU $02
-MAP_ROUTE_43_MAHOGANY_GATE EQU $03
-MAP_ROUTE_43_GATE EQU $04
-MAP_ROUTE_43 EQU $05
-MAP_LAKE_OF_RAGE EQU $06
-MAP_ROUTE_32 EQU $01
-MAP_ROUTE_35 EQU $02
-MAP_ROUTE_36 EQU $03
-MAP_ROUTE_37 EQU $04
-MAP_VIOLET_CITY EQU $05
-MAP_VIOLET_MART EQU $06
-MAP_VIOLET_GYM EQU $07
-MAP_EARLS_POKEMON_ACADEMY EQU $08
-MAP_VIOLET_NICKNAME_SPEECH_HOUSE EQU $09
-MAP_VIOLET_POKECENTER_1F EQU $0a
-MAP_VIOLET_ONIX_TRADE_HOUSE EQU $0b
-MAP_ROUTE_32_RUINS_OF_ALPH_GATE EQU $0c
-MAP_ROUTE_32_POKECENTER_1F EQU $0d
-MAP_ROUTE_35_GOLDENROD_GATE EQU $0e
-MAP_ROUTE_35_NATIONAL_PARK_GATE EQU $0f
-MAP_ROUTE_36_RUINS_OF_ALPH_GATE EQU $10
-MAP_ROUTE_36_NATIONAL_PARK_GATE EQU $11
-MAP_ROUTE_34 EQU $01
-MAP_GOLDENROD_CITY EQU $02
-MAP_GOLDENROD_GYM EQU $03
-MAP_GOLDENROD_BIKE_SHOP EQU $04
-MAP_GOLDENROD_HAPPINESS_RATER EQU $05
-MAP_GOLDENROD_BILLS_HOUSE EQU $06
-MAP_GOLDENROD_MAGNET_TRAIN_STATION EQU $07
-MAP_GOLDENROD_FLOWER_SHOP EQU $08
-MAP_GOLDENROD_PP_SPEECH_HOUSE EQU $09
-MAP_GOLDENROD_NAME_RATERS_HOUSE EQU $0a
-MAP_GOLDENROD_DEPT_STORE_1F EQU $0b
-MAP_GOLDENROD_DEPT_STORE_2F EQU $0c
-MAP_GOLDENROD_DEPT_STORE_3F EQU $0d
-MAP_GOLDENROD_DEPT_STORE_4F EQU $0e
-MAP_GOLDENROD_DEPT_STORE_5F EQU $0f
-MAP_GOLDENROD_DEPT_STORE_6F EQU $10
-MAP_GOLDENROD_DEPT_STORE_ELEVATOR EQU $11
-MAP_GOLDENROD_DEPT_STORE_ROOF EQU $12
-MAP_GOLDENROD_GAME_CORNER EQU $13
-MAP_GOLDENROD_POKECENTER_1F EQU $14
-MAP_GOLDENROD_POKECOM_CENTER_2F_MOBILE EQU $15
-MAP_ILEX_FOREST_AZALEA_GATE EQU $16
-MAP_ROUTE_34_ILEX_FOREST_GATE EQU $17
-MAP_DAY_CARE EQU $18
-MAP_ROUTE_6 EQU $01
-MAP_ROUTE_11 EQU $02
-MAP_VERMILION_CITY EQU $03
-MAP_VERMILION_HOUSE_FISHING_SPEECH_HOUSE EQU $04
-MAP_VERMILION_POKECENTER_1F EQU $05
-MAP_VERMILION_POKECENTER_2F_BETA EQU $06
-MAP_POKEMON_FAN_CLUB EQU $07
-MAP_VERMILION_MAGNET_TRAIN_SPEECH_HOUSE EQU $08
-MAP_VERMILION_MART EQU $09
-MAP_VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE EQU $0a
-MAP_VERMILION_GYM EQU $0b
-MAP_ROUTE_6_SAFFRON_GATE EQU $0c
-MAP_ROUTE_6_UNDERGROUND_ENTRANCE EQU $0d
-MAP_ROUTE_1 EQU $01
-MAP_PALLET_TOWN EQU $02
-MAP_REDS_HOUSE_1F EQU $03
-MAP_REDS_HOUSE_2F EQU $04
-MAP_BLUES_HOUSE EQU $05
-MAP_OAKS_LAB EQU $06
-MAP_ROUTE_3 EQU $01
-MAP_PEWTER_CITY EQU $02
-MAP_PEWTER_NIDORAN_SPEECH_HOUSE EQU $03
-MAP_PEWTER_GYM EQU $04
-MAP_PEWTER_MART EQU $05
-MAP_PEWTER_POKECENTER_1F EQU $06
-MAP_PEWTER_POKECENTER_2F_BETA EQU $07
-MAP_PEWTER_SNOOZE_SPEECH_HOUSE EQU $08
-MAP_OLIVINE_PORT EQU $01
-MAP_VERMILION_PORT EQU $02
-MAP_FAST_SHIP_1F EQU $03
-MAP_FAST_SHIP_CABINS_NNW_NNE_NE EQU $04
-MAP_FAST_SHIP_CABINS_SW_SSW_NW EQU $05
-MAP_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN EQU $06
-MAP_FAST_SHIP_B1F EQU $07
-MAP_OLIVINE_PORT_PASSAGE EQU $08
-MAP_VERMILION_PORT_PASSAGE EQU $09
-MAP_MOUNT_MOON_SQUARE EQU $0a
-MAP_MOUNT_MOON_GIFT_SHOP EQU $0b
-MAP_TIN_TOWER_ROOF EQU $0c
-MAP_ROUTE_23 EQU $01
-MAP_INDIGO_PLATEAU_POKECENTER_1F EQU $02
-MAP_WILLS_ROOM EQU $03
-MAP_KOGAS_ROOM EQU $04
-MAP_BRUNOS_ROOM EQU $05
-MAP_KARENS_ROOM EQU $06
-MAP_LANCES_ROOM EQU $07
-MAP_HALL_OF_FAME EQU $08
-MAP_ROUTE_13 EQU $01
-MAP_ROUTE_14 EQU $02
-MAP_ROUTE_15 EQU $03
-MAP_ROUTE_18 EQU $04
-MAP_FUCHSIA_CITY EQU $05
-MAP_FUCHSIA_MART EQU $06
-MAP_SAFARI_ZONE_MAIN_OFFICE EQU $07
-MAP_FUCHSIA_GYM EQU $08
-MAP_FUCHSIA_BILL_SPEECH_HOUSE EQU $09
-MAP_FUCHSIA_POKECENTER_1F EQU $0a
-MAP_FUCHSIA_POKECENTER_2F_BETA EQU $0b
-MAP_SAFARI_ZONE_WARDENS_HOME EQU $0c
-MAP_ROUTE_15_FUCHSIA_GATE EQU $0d
-MAP_ROUTE_8 EQU $01
-MAP_ROUTE_12 EQU $02
-MAP_ROUTE_10B EQU $03
-MAP_ROUTE_10_SOUTH EQU $03
-MAP_LAVENDER_TOWN EQU $04
-MAP_LAVENDER_POKECENTER_1F EQU $05
-MAP_LAVENDER_POKECENTER_2F_BETA EQU $06
-MAP_MR_FUJIS_HOUSE EQU $07
-MAP_LAVENDER_TOWN_SPEECH_HOUSE EQU $08
-MAP_LAVENDER_NAME_RATER EQU $09
-MAP_LAVENDER_MART EQU $0a
-MAP_SOUL_HOUSE EQU $0b
-MAP_LAV_RADIO_TOWER_1F EQU $0c
-MAP_ROUTE_8_SAFFRON_GATE EQU $0d
-MAP_ROUTE_12_SUPER_ROD_HOUSE EQU $0e
-MAP_ROUTE_28 EQU $01
-MAP_SILVER_CAVE_OUTSIDE EQU $02
-MAP_SILVER_CAVE_POKECENTER_1F EQU $03
-MAP_ROUTE_28_FAMOUS_SPEECH_HOUSE EQU $04
-MAP_POKECENTER_2F EQU $01
-MAP_TRADE_CENTER EQU $02
-MAP_COLOSSEUM EQU $03
-MAP_TIME_CAPSULE EQU $04
-MAP_MOBILE_TRADE_ROOM_MOBILE EQU $05
-MAP_MOBILE_BATTLE_ROOM EQU $06
-MAP_ROUTE_7 EQU $01
-MAP_ROUTE_16 EQU $02
-MAP_ROUTE_17 EQU $03
-MAP_CELADON_CITY EQU $04
-MAP_CELADON_DEPT_STORE_1F EQU $05
-MAP_CELADON_DEPT_STORE_2F EQU $06
-MAP_CELADON_DEPT_STORE_3F EQU $07
-MAP_CELADON_DEPT_STORE_4F EQU $08
-MAP_CELADON_DEPT_STORE_5F EQU $09
-MAP_CELADON_DEPT_STORE_6F EQU $0a
-MAP_CELADON_DEPT_STORE_ELEVATOR EQU $0b
-MAP_CELADON_MANSION_1F EQU $0c
-MAP_CELADON_MANSION_2F EQU $0d
-MAP_CELADON_MANSION_3F EQU $0e
-MAP_CELADON_MANSION_ROOF EQU $0f
-MAP_CELADON_MANSION_ROOF_HOUSE EQU $10
-MAP_CELADON_POKECENTER_1F EQU $11
-MAP_CELADON_POKECENTER_2F_BETA EQU $12
-MAP_CELADON_GAME_CORNER EQU $13
-MAP_CELADON_GAME_CORNER_PRIZE_ROOM EQU $14
-MAP_CELADON_GYM EQU $15
-MAP_CELADON_CAFE EQU $16
-MAP_ROUTE_16_FUCHSIA_SPEECH_HOUSE EQU $17
-MAP_ROUTE_16_GATE EQU $18
-MAP_ROUTE_7_SAFFRON_GATE EQU $19
-MAP_ROUTE_17_18_GATE EQU $1a
-MAP_ROUTE_40 EQU $01
-MAP_ROUTE_41 EQU $02
-MAP_CIANWOOD_CITY EQU $03
-MAP_MANIAS_HOUSE EQU $04
-MAP_CIANWOOD_GYM EQU $05
-MAP_CIANWOOD_POKECENTER_1F EQU $06
-MAP_CIANWOOD_PHARMACY EQU $07
-MAP_CIANWOOD_CITY_PHOTO_STUDIO EQU $08
-MAP_CIANWOOD_LUGIA_SPEECH_HOUSE EQU $09
-MAP_POKE_SEERS_HOUSE EQU $0a
-MAP_BATTLE_TOWER_1F EQU $0b
-MAP_BATTLE_TOWER_BATTLE_ROOM EQU $0c
-MAP_BATTLE_TOWER_ELEVATOR EQU $0d
-MAP_BATTLE_TOWER_HALLWAY EQU $0e
-MAP_ROUTE_40_BATTLE_TOWER_GATE EQU $0f
-MAP_BATTLE_TOWER_OUTSIDE EQU $10
-MAP_ROUTE_2 EQU $01
-MAP_ROUTE_22 EQU $02
-MAP_VIRIDIAN_CITY EQU $03
-MAP_VIRIDIAN_GYM EQU $04
-MAP_VIRIDIAN_NICKNAME_SPEECH_HOUSE EQU $05
-MAP_TRAINER_HOUSE_1F EQU $06
-MAP_TRAINER_HOUSE_B1F EQU $07
-MAP_VIRIDIAN_MART EQU $08
-MAP_VIRIDIAN_POKECENTER_1F EQU $09
-MAP_VIRIDIAN_POKECENTER_2F_BETA EQU $0a
-MAP_ROUTE_2_NUGGET_SPEECH_HOUSE EQU $0b
-MAP_ROUTE_2_GATE EQU $0c
-MAP_VICTORY_ROAD_GATE EQU $0d
-MAP_ROUTE_26 EQU $01
-MAP_ROUTE_27 EQU $02
-MAP_ROUTE_29 EQU $03
-MAP_NEW_BARK_TOWN EQU $04
-MAP_ELMS_LAB EQU $05
-MAP_KRISS_HOUSE_1F EQU $06
-MAP_KRISS_HOUSE_2F EQU $07
-MAP_KRISS_NEIGHBORS_HOUSE EQU $08
-MAP_ELMS_HOUSE EQU $09
-MAP_ROUTE_26_HEAL_SPEECH_HOUSE EQU $0a
-MAP_ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE EQU $0b
-MAP_ROUTE_27_SANDSTORM_HOUSE EQU $0c
-MAP_ROUTE_29_46_GATE EQU $0d
-MAP_ROUTE_5 EQU $01
-MAP_SAFFRON_CITY EQU $02
-MAP_FIGHTING_DOJO EQU $03
-MAP_SAFFRON_GYM EQU $04
-MAP_SAFFRON_MART EQU $05
-MAP_SAFFRON_POKECENTER_1F EQU $06
-MAP_SAFFRON_POKECENTER_2F_BETA EQU $07
-MAP_MR_PSYCHICS_HOUSE EQU $08
-MAP_SAFFRON_TRAIN_STATION EQU $09
-MAP_SILPH_CO_1F EQU $0a
-MAP_COPYCATS_HOUSE_1F EQU $0b
-MAP_COPYCATS_HOUSE_2F EQU $0c
-MAP_ROUTE_5_UNDERGROUND_ENTRANCE EQU $0d
-MAP_ROUTE_5_SAFFRON_CITY_GATE EQU $0e
-MAP_ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE EQU $0f
-MAP_ROUTE_30 EQU $01
-MAP_ROUTE_31 EQU $02
-MAP_CHERRYGROVE_CITY EQU $03
-MAP_CHERRYGROVE_MART EQU $04
-MAP_CHERRYGROVE_POKECENTER_1F EQU $05
-MAP_CHERRYGROVE_GYM_SPEECH_HOUSE EQU $06
-MAP_GUIDE_GENTS_HOUSE EQU $07
-MAP_CHERRYGROVE_EVOLUTION_SPEECH_HOUSE EQU $08
-MAP_ROUTE_30_BERRY_SPEECH_HOUSE EQU $09
-MAP_MR_POKEMONS_HOUSE EQU $0a
-MAP_ROUTE_31_VIOLET_GATE EQU $0b
-
-; map dimensions
-OLIVINE_POKECENTER_1F_HEIGHT EQU 4
-OLIVINE_POKECENTER_1F_WIDTH EQU 5
-OLIVINE_GYM_HEIGHT EQU 8
-OLIVINE_GYM_WIDTH EQU 5
-OLIVINE_VOLTORB_HOUSE_HEIGHT EQU 4
-OLIVINE_VOLTORB_HOUSE_WIDTH EQU 4
-OLIVINE_HOUSE_BETA_HEIGHT EQU 4
-OLIVINE_HOUSE_BETA_WIDTH EQU 4
-OLIVINE_PUNISHMENT_SPEECH_HOUSE_HEIGHT EQU 4
-OLIVINE_PUNISHMENT_SPEECH_HOUSE_WIDTH EQU 4
-OLIVINE_GOOD_ROD_HOUSE_HEIGHT EQU 4
-OLIVINE_GOOD_ROD_HOUSE_WIDTH EQU 4
-OLIVINE_CAFE_HEIGHT EQU 4
-OLIVINE_CAFE_WIDTH EQU 4
-OLIVINE_MART_HEIGHT EQU 4
-OLIVINE_MART_WIDTH EQU 6
-ROUTE_38_ECRUTEAK_GATE_HEIGHT EQU 4
-ROUTE_38_ECRUTEAK_GATE_WIDTH EQU 5
-ROUTE_39_BARN_HEIGHT EQU 4
-ROUTE_39_BARN_WIDTH EQU 4
-ROUTE_39_FARMHOUSE_HEIGHT EQU 4
-ROUTE_39_FARMHOUSE_WIDTH EQU 4
-ROUTE_38_HEIGHT EQU 9
-ROUTE_38_WIDTH EQU 20
-ROUTE_39_HEIGHT EQU 18
-ROUTE_39_WIDTH EQU 10
-OLIVINE_CITY_HEIGHT EQU 18
-OLIVINE_CITY_WIDTH EQU 20
-MAHOGANY_RED_GYARADOS_SPEECH_HOUSE_HEIGHT EQU 4
-MAHOGANY_RED_GYARADOS_SPEECH_HOUSE_WIDTH EQU 4
-MAHOGANY_GYM_HEIGHT EQU 9
-MAHOGANY_GYM_WIDTH EQU 5
-MAHOGANY_POKECENTER_1F_HEIGHT EQU 4
-MAHOGANY_POKECENTER_1F_WIDTH EQU 5
-ROUTE_42_ECRUTEAK_GATE_HEIGHT EQU 4
-ROUTE_42_ECRUTEAK_GATE_WIDTH EQU 5
-ROUTE_42_HEIGHT EQU 9
-ROUTE_42_WIDTH EQU 30
-ROUTE_44_HEIGHT EQU 9
-ROUTE_44_WIDTH EQU 30
-MAHOGANY_TOWN_HEIGHT EQU 9
-MAHOGANY_TOWN_WIDTH EQU 10
-SPROUT_TOWER_1F_HEIGHT EQU 8
-SPROUT_TOWER_1F_WIDTH EQU 10
-SPROUT_TOWER_2F_HEIGHT EQU 8
-SPROUT_TOWER_2F_WIDTH EQU 10
-SPROUT_TOWER_3F_HEIGHT EQU 8
-SPROUT_TOWER_3F_WIDTH EQU 10
-TIN_TOWER_1F_HEIGHT EQU 9
-TIN_TOWER_1F_WIDTH EQU 10
-TIN_TOWER_2F_HEIGHT EQU 9
-TIN_TOWER_2F_WIDTH EQU 10
-TIN_TOWER_3F_HEIGHT EQU 9
-TIN_TOWER_3F_WIDTH EQU 10
-TIN_TOWER_4F_HEIGHT EQU 9
-TIN_TOWER_4F_WIDTH EQU 10
-TIN_TOWER_5F_HEIGHT EQU 9
-TIN_TOWER_5F_WIDTH EQU 10
-TIN_TOWER_6F_HEIGHT EQU 9
-TIN_TOWER_6F_WIDTH EQU 10
-TIN_TOWER_7F_HEIGHT EQU 9
-TIN_TOWER_7F_WIDTH EQU 10
-TIN_TOWER_8F_HEIGHT EQU 9
-TIN_TOWER_8F_WIDTH EQU 10
-TIN_TOWER_9F_HEIGHT EQU 9
-TIN_TOWER_9F_WIDTH EQU 10
-BURNED_TOWER_1F_HEIGHT EQU 9
-BURNED_TOWER_1F_WIDTH EQU 10
-BURNED_TOWER_B1F_HEIGHT EQU 9
-BURNED_TOWER_B1F_WIDTH EQU 10
-NATIONAL_PARK_HEIGHT EQU 27
-NATIONAL_PARK_WIDTH EQU 20
-NATIONAL_PARK_BUG_CONTEST_HEIGHT EQU 27
-NATIONAL_PARK_BUG_CONTEST_WIDTH EQU 20
-RADIO_TOWER_1F_HEIGHT EQU 4
-RADIO_TOWER_1F_WIDTH EQU 9
-RADIO_TOWER_2F_HEIGHT EQU 4
-RADIO_TOWER_2F_WIDTH EQU 9
-RADIO_TOWER_3F_HEIGHT EQU 4
-RADIO_TOWER_3F_WIDTH EQU 9
-RADIO_TOWER_4F_HEIGHT EQU 4
-RADIO_TOWER_4F_WIDTH EQU 9
-RADIO_TOWER_5F_HEIGHT EQU 4
-RADIO_TOWER_5F_WIDTH EQU 9
-RUINS_OF_ALPH_OUTSIDE_HEIGHT EQU 18
-RUINS_OF_ALPH_OUTSIDE_WIDTH EQU 10
-RUINS_OF_ALPH_HO_OH_CHAMBER_HEIGHT EQU 5
-RUINS_OF_ALPH_HO_OH_CHAMBER_WIDTH EQU 4
-RUINS_OF_ALPH_KABUTO_CHAMBER_HEIGHT EQU 5
-RUINS_OF_ALPH_KABUTO_CHAMBER_WIDTH EQU 4
-RUINS_OF_ALPH_OMANYTE_CHAMBER_HEIGHT EQU 5
-RUINS_OF_ALPH_OMANYTE_CHAMBER_WIDTH EQU 4
-RUINS_OF_ALPH_AERODACTYL_CHAMBER_HEIGHT EQU 5
-RUINS_OF_ALPH_AERODACTYL_CHAMBER_WIDTH EQU 4
-RUINS_OF_ALPH_INNER_CHAMBER_HEIGHT EQU 14
-RUINS_OF_ALPH_INNER_CHAMBER_WIDTH EQU 10
-RUINS_OF_ALPH_RESEARCH_CENTER_HEIGHT EQU 4
-RUINS_OF_ALPH_RESEARCH_CENTER_WIDTH EQU 4
-RUINS_OF_ALPH_HO_OH_ITEM_ROOM_HEIGHT EQU 5
-RUINS_OF_ALPH_HO_OH_ITEM_ROOM_WIDTH EQU 4
-RUINS_OF_ALPH_KABUTO_ITEM_ROOM_HEIGHT EQU 5
-RUINS_OF_ALPH_KABUTO_ITEM_ROOM_WIDTH EQU 4
-RUINS_OF_ALPH_OMANYTE_ITEM_ROOM_HEIGHT EQU 5
-RUINS_OF_ALPH_OMANYTE_ITEM_ROOM_WIDTH EQU 4
-RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM_HEIGHT EQU 5
-RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM_WIDTH EQU 4
-RUINS_OF_ALPH_HO_OH_WORD_ROOM_HEIGHT EQU 12
-RUINS_OF_ALPH_HO_OH_WORD_ROOM_WIDTH EQU 10
-RUINS_OF_ALPH_KABUTO_WORD_ROOM_HEIGHT EQU 7
-RUINS_OF_ALPH_KABUTO_WORD_ROOM_WIDTH EQU 10
-RUINS_OF_ALPH_OMANYTE_WORD_ROOM_HEIGHT EQU 8
-RUINS_OF_ALPH_OMANYTE_WORD_ROOM_WIDTH EQU 10
-RUINS_OF_ALPH_AERODACTYL_WORD_ROOM_HEIGHT EQU 7
-RUINS_OF_ALPH_AERODACTYL_WORD_ROOM_WIDTH EQU 10
-UNION_CAVE_1F_HEIGHT EQU 18
-UNION_CAVE_1F_WIDTH EQU 10
-UNION_CAVE_B1F_HEIGHT EQU 18
-UNION_CAVE_B1F_WIDTH EQU 10
-UNION_CAVE_B2F_HEIGHT EQU 18
-UNION_CAVE_B2F_WIDTH EQU 10
-SLOWPOKE_WELL_B1F_HEIGHT EQU 9
-SLOWPOKE_WELL_B1F_WIDTH EQU 10
-SLOWPOKE_WELL_B2F_HEIGHT EQU 9
-SLOWPOKE_WELL_B2F_WIDTH EQU 10
-OLIVINE_LIGHTHOUSE_1F_HEIGHT EQU 9
-OLIVINE_LIGHTHOUSE_1F_WIDTH EQU 10
-OLIVINE_LIGHTHOUSE_2F_HEIGHT EQU 9
-OLIVINE_LIGHTHOUSE_2F_WIDTH EQU 10
-OLIVINE_LIGHTHOUSE_3F_HEIGHT EQU 9
-OLIVINE_LIGHTHOUSE_3F_WIDTH EQU 10
-OLIVINE_LIGHTHOUSE_4F_HEIGHT EQU 9
-OLIVINE_LIGHTHOUSE_4F_WIDTH EQU 10
-OLIVINE_LIGHTHOUSE_5F_HEIGHT EQU 9
-OLIVINE_LIGHTHOUSE_5F_WIDTH EQU 10
-OLIVINE_LIGHTHOUSE_6F_HEIGHT EQU 9
-OLIVINE_LIGHTHOUSE_6F_WIDTH EQU 10
-MAHOGANY_MART_1F_HEIGHT EQU 4
-MAHOGANY_MART_1F_WIDTH EQU 4
-TEAM_ROCKET_BASE_B1F_HEIGHT EQU 9
-TEAM_ROCKET_BASE_B1F_WIDTH EQU 15
-TEAM_ROCKET_BASE_B2F_HEIGHT EQU 9
-TEAM_ROCKET_BASE_B2F_WIDTH EQU 15
-TEAM_ROCKET_BASE_B3F_HEIGHT EQU 9
-TEAM_ROCKET_BASE_B3F_WIDTH EQU 15
-ILEX_FOREST_HEIGHT EQU 27
-ILEX_FOREST_WIDTH EQU 15
-WAREHOUSE_ENTRANCE_HEIGHT EQU 18
-WAREHOUSE_ENTRANCE_WIDTH EQU 15
-UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HEIGHT EQU 18
-UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_WIDTH EQU 15
-GOLDENROD_DEPT_STORE_B1F_HEIGHT EQU 9
-GOLDENROD_DEPT_STORE_B1F_WIDTH EQU 10
-UNDERGROUND_WAREHOUSE_HEIGHT EQU 9
-UNDERGROUND_WAREHOUSE_WIDTH EQU 10
-MOUNT_MORTAR_1F_OUTSIDE_HEIGHT EQU 18
-MOUNT_MORTAR_1F_OUTSIDE_WIDTH EQU 20
-MOUNT_MORTAR_1F_INSIDE_HEIGHT EQU 27
-MOUNT_MORTAR_1F_INSIDE_WIDTH EQU 20
-MOUNT_MORTAR_2F_INSIDE_HEIGHT EQU 18
-MOUNT_MORTAR_2F_INSIDE_WIDTH EQU 20
-MOUNT_MORTAR_B1F_HEIGHT EQU 18
-MOUNT_MORTAR_B1F_WIDTH EQU 20
-ICE_PATH_1F_HEIGHT EQU 18
-ICE_PATH_1F_WIDTH EQU 20
-ICE_PATH_B1F_HEIGHT EQU 18
-ICE_PATH_B1F_WIDTH EQU 10
-ICE_PATH_B2F_MAHOGANY_SIDE_HEIGHT EQU 9
-ICE_PATH_B2F_MAHOGANY_SIDE_WIDTH EQU 10
-ICE_PATH_B2F_BLACKTHORN_SIDE_HEIGHT EQU 9
-ICE_PATH_B2F_BLACKTHORN_SIDE_WIDTH EQU 5
-ICE_PATH_B3F_HEIGHT EQU 9
-ICE_PATH_B3F_WIDTH EQU 10
-WHIRL_ISLAND_NW_HEIGHT EQU 9
-WHIRL_ISLAND_NW_WIDTH EQU 5
-WHIRL_ISLAND_NE_HEIGHT EQU 9
-WHIRL_ISLAND_NE_WIDTH EQU 10
-WHIRL_ISLAND_SW_HEIGHT EQU 9
-WHIRL_ISLAND_SW_WIDTH EQU 10
-WHIRL_ISLAND_CAVE_HEIGHT EQU 9
-WHIRL_ISLAND_CAVE_WIDTH EQU 5
-WHIRL_ISLAND_SE_HEIGHT EQU 9
-WHIRL_ISLAND_SE_WIDTH EQU 5
-WHIRL_ISLAND_B1F_HEIGHT EQU 18
-WHIRL_ISLAND_B1F_WIDTH EQU 20
-WHIRL_ISLAND_B2F_HEIGHT EQU 18
-WHIRL_ISLAND_B2F_WIDTH EQU 10
-WHIRL_ISLAND_LUGIA_CHAMBER_HEIGHT EQU 9
-WHIRL_ISLAND_LUGIA_CHAMBER_WIDTH EQU 10
-SILVER_CAVE_ROOM_1_HEIGHT EQU 18
-SILVER_CAVE_ROOM_1_WIDTH EQU 10
-SILVER_CAVE_ROOM_2_HEIGHT EQU 18
-SILVER_CAVE_ROOM_2_WIDTH EQU 15
-SILVER_CAVE_ROOM_3_HEIGHT EQU 18
-SILVER_CAVE_ROOM_3_WIDTH EQU 10
-SILVER_CAVE_ITEM_ROOMS_HEIGHT EQU 9
-SILVER_CAVE_ITEM_ROOMS_WIDTH EQU 10
-DARK_CAVE_VIOLET_ENTRANCE_HEIGHT EQU 18
-DARK_CAVE_VIOLET_ENTRANCE_WIDTH EQU 20
-DARK_CAVE_BLACKTHORN_ENTRANCE_HEIGHT EQU 18
-DARK_CAVE_BLACKTHORN_ENTRANCE_WIDTH EQU 15
-DRAGONS_DEN_1F_HEIGHT EQU 9
-DRAGONS_DEN_1F_WIDTH EQU 5
-DRAGONS_DEN_B1F_HEIGHT EQU 18
-DRAGONS_DEN_B1F_WIDTH EQU 20
-DRAGON_SHRINE_HEIGHT EQU 5
-DRAGON_SHRINE_WIDTH EQU 5
-TOHJO_FALLS_HEIGHT EQU 9
-TOHJO_FALLS_WIDTH EQU 15
-DIGLETTS_CAVE_HEIGHT EQU 18
-DIGLETTS_CAVE_WIDTH EQU 10
-MOUNT_MOON_HEIGHT EQU 9
-MOUNT_MOON_WIDTH EQU 15
-UNDERGROUND_HEIGHT EQU 14
-UNDERGROUND_WIDTH EQU 3
-ROCK_TUNNEL_1F_HEIGHT EQU 18
-ROCK_TUNNEL_1F_WIDTH EQU 15
-ROCK_TUNNEL_B1F_HEIGHT EQU 18
-ROCK_TUNNEL_B1F_WIDTH EQU 15
-SAFARI_ZONE_FUCHSIA_GATE_BETA_HEIGHT EQU 4
-SAFARI_ZONE_FUCHSIA_GATE_BETA_WIDTH EQU 5
-SAFARI_ZONE_BETA_HEIGHT EQU 18
-SAFARI_ZONE_BETA_WIDTH EQU 10
-VICTORY_ROAD_HEIGHT EQU 36
-VICTORY_ROAD_WIDTH EQU 10
-ECRUTEAK_HOUSE_HEIGHT EQU 9
-ECRUTEAK_HOUSE_WIDTH EQU 10
-WISE_TRIOS_ROOM_HEIGHT EQU 4
-WISE_TRIOS_ROOM_WIDTH EQU 4
-ECRUTEAK_POKECENTER_1F_HEIGHT EQU 4
-ECRUTEAK_POKECENTER_1F_WIDTH EQU 5
-ECRUTEAK_LUGIA_SPEECH_HOUSE_HEIGHT EQU 4
-ECRUTEAK_LUGIA_SPEECH_HOUSE_WIDTH EQU 4
-DANCE_THEATRE_HEIGHT EQU 7
-DANCE_THEATRE_WIDTH EQU 6
-ECRUTEAK_MART_HEIGHT EQU 4
-ECRUTEAK_MART_WIDTH EQU 6
-ECRUTEAK_GYM_HEIGHT EQU 9
-ECRUTEAK_GYM_WIDTH EQU 5
-ECRUTEAK_ITEMFINDER_HOUSE_HEIGHT EQU 4
-ECRUTEAK_ITEMFINDER_HOUSE_WIDTH EQU 4
-ECRUTEAK_CITY_HEIGHT EQU 18
-ECRUTEAK_CITY_WIDTH EQU 20
-BLACKTHORN_GYM_1F_HEIGHT EQU 9
-BLACKTHORN_GYM_1F_WIDTH EQU 5
-BLACKTHORN_GYM_2F_HEIGHT EQU 9
-BLACKTHORN_GYM_2F_WIDTH EQU 5
-BLACKTHORN_DRAGON_SPEECH_HOUSE_HEIGHT EQU 4
-BLACKTHORN_DRAGON_SPEECH_HOUSE_WIDTH EQU 4
-BLACKTHORN_DODRIO_TRADE_HOUSE_HEIGHT EQU 4
-BLACKTHORN_DODRIO_TRADE_HOUSE_WIDTH EQU 4
-BLACKTHORN_MART_HEIGHT EQU 4
-BLACKTHORN_MART_WIDTH EQU 6
-BLACKTHORN_POKECENTER_1F_HEIGHT EQU 4
-BLACKTHORN_POKECENTER_1F_WIDTH EQU 5
-MOVE_DELETERS_HOUSE_HEIGHT EQU 4
-MOVE_DELETERS_HOUSE_WIDTH EQU 4
-ROUTE_45_HEIGHT EQU 45
-ROUTE_45_WIDTH EQU 10
-ROUTE_46_HEIGHT EQU 18
-ROUTE_46_WIDTH EQU 10
-BLACKTHORN_CITY_HEIGHT EQU 18
-BLACKTHORN_CITY_WIDTH EQU 20
-CINNABAR_POKECENTER_1F_HEIGHT EQU 4
-CINNABAR_POKECENTER_1F_WIDTH EQU 5
-CINNABAR_POKECENTER_2F_BETA_HEIGHT EQU 4
-CINNABAR_POKECENTER_2F_BETA_WIDTH EQU 8
-ROUTE_19___FUCHSIA_GATE_HEIGHT EQU 4
-ROUTE_19___FUCHSIA_GATE_WIDTH EQU 5
-SEAFOAM_GYM_HEIGHT EQU 4
-SEAFOAM_GYM_WIDTH EQU 5
-ROUTE_19_HEIGHT EQU 18
-ROUTE_19_WIDTH EQU 10
-ROUTE_20_HEIGHT EQU 9
-ROUTE_20_WIDTH EQU 30
-ROUTE_21_HEIGHT EQU 18
-ROUTE_21_WIDTH EQU 10
-CINNABAR_ISLAND_HEIGHT EQU 9
-CINNABAR_ISLAND_WIDTH EQU 10
-CERULEAN_GYM_BADGE_SPEECH_HOUSE_HEIGHT EQU 4
-CERULEAN_GYM_BADGE_SPEECH_HOUSE_WIDTH EQU 4
-CERULEAN_POLICE_STATION_HEIGHT EQU 4
-CERULEAN_POLICE_STATION_WIDTH EQU 4
-CERULEAN_TRADE_SPEECH_HOUSE_HEIGHT EQU 4
-CERULEAN_TRADE_SPEECH_HOUSE_WIDTH EQU 4
-CERULEAN_POKECENTER_1F_HEIGHT EQU 4
-CERULEAN_POKECENTER_1F_WIDTH EQU 5
-CERULEAN_POKECENTER_2F_BETA_HEIGHT EQU 4
-CERULEAN_POKECENTER_2F_BETA_WIDTH EQU 8
-CERULEAN_GYM_HEIGHT EQU 8
-CERULEAN_GYM_WIDTH EQU 5
-CERULEAN_MART_HEIGHT EQU 4
-CERULEAN_MART_WIDTH EQU 6
-ROUTE_10_POKECENTER_1F_HEIGHT EQU 4
-ROUTE_10_POKECENTER_1F_WIDTH EQU 5
-ROUTE_10_POKECENTER_2F_BETA_HEIGHT EQU 4
-ROUTE_10_POKECENTER_2F_BETA_WIDTH EQU 8
-POWER_PLANT_HEIGHT EQU 9
-POWER_PLANT_WIDTH EQU 10
-BILLS_HOUSE_HEIGHT EQU 4
-BILLS_HOUSE_WIDTH EQU 4
-ROUTE_4_HEIGHT EQU 9
-ROUTE_4_WIDTH EQU 20
-ROUTE_9_HEIGHT EQU 9
-ROUTE_9_WIDTH EQU 30
-ROUTE_10_NORTH_HEIGHT EQU 9
-ROUTE_10_NORTH_WIDTH EQU 10
-ROUTE_24_HEIGHT EQU 9
-ROUTE_24_WIDTH EQU 10
-ROUTE_25_HEIGHT EQU 9
-ROUTE_25_WIDTH EQU 30
-CERULEAN_CITY_HEIGHT EQU 18
-CERULEAN_CITY_WIDTH EQU 20
-AZALEA_POKECENTER_1F_HEIGHT EQU 4
-AZALEA_POKECENTER_1F_WIDTH EQU 5
-CHARCOAL_KILN_HEIGHT EQU 4
-CHARCOAL_KILN_WIDTH EQU 4
-AZALEA_MART_HEIGHT EQU 4
-AZALEA_MART_WIDTH EQU 6
-KURTS_HOUSE_HEIGHT EQU 4
-KURTS_HOUSE_WIDTH EQU 8
-AZALEA_GYM_HEIGHT EQU 8
-AZALEA_GYM_WIDTH EQU 5
-ROUTE_33_HEIGHT EQU 9
-ROUTE_33_WIDTH EQU 10
-AZALEA_TOWN_HEIGHT EQU 9
-AZALEA_TOWN_WIDTH EQU 20
-LAKE_OF_RAGE_HIDDEN_POWER_HOUSE_HEIGHT EQU 4
-LAKE_OF_RAGE_HIDDEN_POWER_HOUSE_WIDTH EQU 4
-LAKE_OF_RAGE_MAGIKARP_HOUSE_HEIGHT EQU 4
-LAKE_OF_RAGE_MAGIKARP_HOUSE_WIDTH EQU 4
-ROUTE_43_MAHOGANY_GATE_HEIGHT EQU 4
-ROUTE_43_MAHOGANY_GATE_WIDTH EQU 5
-ROUTE_43_GATE_HEIGHT EQU 4
-ROUTE_43_GATE_WIDTH EQU 5
-ROUTE_43_HEIGHT EQU 27
-ROUTE_43_WIDTH EQU 10
-LAKE_OF_RAGE_HEIGHT EQU 18
-LAKE_OF_RAGE_WIDTH EQU 20
-ROUTE_32_HEIGHT EQU 45
-ROUTE_32_WIDTH EQU 10
-ROUTE_35_HEIGHT EQU 18
-ROUTE_35_WIDTH EQU 10
-ROUTE_36_HEIGHT EQU 9
-ROUTE_36_WIDTH EQU 30
-ROUTE_37_HEIGHT EQU 9
-ROUTE_37_WIDTH EQU 10
-VIOLET_CITY_HEIGHT EQU 18
-VIOLET_CITY_WIDTH EQU 20
-VIOLET_MART_HEIGHT EQU 4
-VIOLET_MART_WIDTH EQU 6
-VIOLET_GYM_HEIGHT EQU 8
-VIOLET_GYM_WIDTH EQU 5
-EARLS_POKEMON_ACADEMY_HEIGHT EQU 8
-EARLS_POKEMON_ACADEMY_WIDTH EQU 4
-VIOLET_NICKNAME_SPEECH_HOUSE_HEIGHT EQU 4
-VIOLET_NICKNAME_SPEECH_HOUSE_WIDTH EQU 4
-VIOLET_POKECENTER_1F_HEIGHT EQU 4
-VIOLET_POKECENTER_1F_WIDTH EQU 5
-VIOLET_ONIX_TRADE_HOUSE_HEIGHT EQU 4
-VIOLET_ONIX_TRADE_HOUSE_WIDTH EQU 4
-ROUTE_32_RUINS_OF_ALPH_GATE_HEIGHT EQU 4
-ROUTE_32_RUINS_OF_ALPH_GATE_WIDTH EQU 5
-ROUTE_32_POKECENTER_1F_HEIGHT EQU 4
-ROUTE_32_POKECENTER_1F_WIDTH EQU 5
-ROUTE_35_GOLDENROD_GATE_HEIGHT EQU 4
-ROUTE_35_GOLDENROD_GATE_WIDTH EQU 5
-ROUTE_35_NATIONAL_PARK_GATE_HEIGHT EQU 4
-ROUTE_35_NATIONAL_PARK_GATE_WIDTH EQU 4
-ROUTE_36_RUINS_OF_ALPH_GATE_HEIGHT EQU 4
-ROUTE_36_RUINS_OF_ALPH_GATE_WIDTH EQU 5
-ROUTE_36_NATIONAL_PARK_GATE_HEIGHT EQU 4
-ROUTE_36_NATIONAL_PARK_GATE_WIDTH EQU 5
-ROUTE_34_HEIGHT EQU 27
-ROUTE_34_WIDTH EQU 10
-GOLDENROD_CITY_HEIGHT EQU 18
-GOLDENROD_CITY_WIDTH EQU 20
-GOLDENROD_GYM_HEIGHT EQU 9
-GOLDENROD_GYM_WIDTH EQU 10
-GOLDENROD_BIKE_SHOP_HEIGHT EQU 4
-GOLDENROD_BIKE_SHOP_WIDTH EQU 4
-GOLDENROD_HAPPINESS_RATER_HEIGHT EQU 4
-GOLDENROD_HAPPINESS_RATER_WIDTH EQU 4
-GOLDENROD_BILLS_HOUSE_HEIGHT EQU 4
-GOLDENROD_BILLS_HOUSE_WIDTH EQU 4
-GOLDENROD_MAGNET_TRAIN_STATION_HEIGHT EQU 9
-GOLDENROD_MAGNET_TRAIN_STATION_WIDTH EQU 10
-GOLDENROD_FLOWER_SHOP_HEIGHT EQU 4
-GOLDENROD_FLOWER_SHOP_WIDTH EQU 4
-GOLDENROD_PP_SPEECH_HOUSE_HEIGHT EQU 4
-GOLDENROD_PP_SPEECH_HOUSE_WIDTH EQU 4
-GOLDENROD_NAME_RATERS_HOUSE_HEIGHT EQU 4
-GOLDENROD_NAME_RATERS_HOUSE_WIDTH EQU 4
-GOLDENROD_DEPT_STORE_1F_HEIGHT EQU 4
-GOLDENROD_DEPT_STORE_1F_WIDTH EQU 8
-GOLDENROD_DEPT_STORE_2F_HEIGHT EQU 4
-GOLDENROD_DEPT_STORE_2F_WIDTH EQU 8
-GOLDENROD_DEPT_STORE_3F_HEIGHT EQU 4
-GOLDENROD_DEPT_STORE_3F_WIDTH EQU 8
-GOLDENROD_DEPT_STORE_4F_HEIGHT EQU 4
-GOLDENROD_DEPT_STORE_4F_WIDTH EQU 8
-GOLDENROD_DEPT_STORE_5F_HEIGHT EQU 4
-GOLDENROD_DEPT_STORE_5F_WIDTH EQU 8
-GOLDENROD_DEPT_STORE_6F_HEIGHT EQU 4
-GOLDENROD_DEPT_STORE_6F_WIDTH EQU 8
-GOLDENROD_DEPT_STORE_ELEVATOR_HEIGHT EQU 2
-GOLDENROD_DEPT_STORE_ELEVATOR_WIDTH EQU 2
-GOLDENROD_DEPT_STORE_ROOF_HEIGHT EQU 4
-GOLDENROD_DEPT_STORE_ROOF_WIDTH EQU 8
-GOLDENROD_GAME_CORNER_HEIGHT EQU 7
-GOLDENROD_GAME_CORNER_WIDTH EQU 10
-GOLDENROD_POKECENTER_1F_HEIGHT EQU 4
-GOLDENROD_POKECENTER_1F_WIDTH EQU 5
-GOLDENROD_POKECOM_CENTER_2F_MOBILE_HEIGHT EQU 16
-GOLDENROD_POKECOM_CENTER_2F_MOBILE_WIDTH EQU 16
-ILEX_FOREST_AZALEA_GATE_HEIGHT EQU 4
-ILEX_FOREST_AZALEA_GATE_WIDTH EQU 5
-ROUTE_34_ILEX_FOREST_GATE_HEIGHT EQU 4
-ROUTE_34_ILEX_FOREST_GATE_WIDTH EQU 5
-DAY_CARE_HEIGHT EQU 4
-DAY_CARE_WIDTH EQU 5
-ROUTE_6_HEIGHT EQU 9
-ROUTE_6_WIDTH EQU 10
-ROUTE_11_HEIGHT EQU 9
-ROUTE_11_WIDTH EQU 20
-VERMILION_CITY_HEIGHT EQU 18
-VERMILION_CITY_WIDTH EQU 20
-VERMILION_HOUSE_FISHING_SPEECH_HOUSE_HEIGHT EQU 4
-VERMILION_HOUSE_FISHING_SPEECH_HOUSE_WIDTH EQU 4
-VERMILION_POKECENTER_1F_HEIGHT EQU 4
-VERMILION_POKECENTER_1F_WIDTH EQU 5
-VERMILION_POKECENTER_2F_BETA_HEIGHT EQU 4
-VERMILION_POKECENTER_2F_BETA_WIDTH EQU 8
-POKEMON_FAN_CLUB_HEIGHT EQU 4
-POKEMON_FAN_CLUB_WIDTH EQU 5
-VERMILION_MAGNET_TRAIN_SPEECH_HOUSE_HEIGHT EQU 4
-VERMILION_MAGNET_TRAIN_SPEECH_HOUSE_WIDTH EQU 4
-VERMILION_MART_HEIGHT EQU 4
-VERMILION_MART_WIDTH EQU 6
-VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE_HEIGHT EQU 4
-VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE_WIDTH EQU 4
-VERMILION_GYM_HEIGHT EQU 9
-VERMILION_GYM_WIDTH EQU 5
-ROUTE_6_SAFFRON_GATE_HEIGHT EQU 4
-ROUTE_6_SAFFRON_GATE_WIDTH EQU 5
-ROUTE_6_UNDERGROUND_ENTRANCE_HEIGHT EQU 4
-ROUTE_6_UNDERGROUND_ENTRANCE_WIDTH EQU 4
-ROUTE_1_HEIGHT EQU 18
-ROUTE_1_WIDTH EQU 10
-PALLET_TOWN_HEIGHT EQU 9
-PALLET_TOWN_WIDTH EQU 10
-REDS_HOUSE_1F_HEIGHT EQU 4
-REDS_HOUSE_1F_WIDTH EQU 4
-REDS_HOUSE_2F_HEIGHT EQU 4
-REDS_HOUSE_2F_WIDTH EQU 4
-BLUES_HOUSE_HEIGHT EQU 4
-BLUES_HOUSE_WIDTH EQU 4
-OAKS_LAB_HEIGHT EQU 6
-OAKS_LAB_WIDTH EQU 5
-ROUTE_3_HEIGHT EQU 9
-ROUTE_3_WIDTH EQU 30
-PEWTER_CITY_HEIGHT EQU 18
-PEWTER_CITY_WIDTH EQU 20
-PEWTER_NIDORAN_SPEECH_HOUSE_HEIGHT EQU 4
-PEWTER_NIDORAN_SPEECH_HOUSE_WIDTH EQU 4
-PEWTER_GYM_HEIGHT EQU 7
-PEWTER_GYM_WIDTH EQU 5
-PEWTER_MART_HEIGHT EQU 4
-PEWTER_MART_WIDTH EQU 6
-PEWTER_POKECENTER_1F_HEIGHT EQU 4
-PEWTER_POKECENTER_1F_WIDTH EQU 5
-PEWTER_POKECENTER_2F_BETA_HEIGHT EQU 4
-PEWTER_POKECENTER_2F_BETA_WIDTH EQU 8
-PEWTER_SNOOZE_SPEECH_HOUSE_HEIGHT EQU 4
-PEWTER_SNOOZE_SPEECH_HOUSE_WIDTH EQU 4
-OLIVINE_PORT_HEIGHT EQU 18
-OLIVINE_PORT_WIDTH EQU 10
-VERMILION_PORT_HEIGHT EQU 18
-VERMILION_PORT_WIDTH EQU 10
-FAST_SHIP_1F_HEIGHT EQU 9
-FAST_SHIP_1F_WIDTH EQU 16
-FAST_SHIP_CABINS_NNW_NNE_NE_HEIGHT EQU 16
-FAST_SHIP_CABINS_NNW_NNE_NE_WIDTH EQU 4
-FAST_SHIP_CABINS_SW_SSW_NW_HEIGHT EQU 16
-FAST_SHIP_CABINS_SW_SSW_NW_WIDTH EQU 4
-FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_HEIGHT EQU 17
-FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_WIDTH EQU 5
-FAST_SHIP_B1F_HEIGHT EQU 8
-FAST_SHIP_B1F_WIDTH EQU 16
-OLIVINE_PORT_PASSAGE_HEIGHT EQU 9
-OLIVINE_PORT_PASSAGE_WIDTH EQU 10
-VERMILION_PORT_PASSAGE_HEIGHT EQU 9
-VERMILION_PORT_PASSAGE_WIDTH EQU 10
-MOUNT_MOON_SQUARE_HEIGHT EQU 9
-MOUNT_MOON_SQUARE_WIDTH EQU 15
-MOUNT_MOON_GIFT_SHOP_HEIGHT EQU 4
-MOUNT_MOON_GIFT_SHOP_WIDTH EQU 4
-TIN_TOWER_ROOF_HEIGHT EQU 9
-TIN_TOWER_ROOF_WIDTH EQU 10
-ROUTE_23_HEIGHT EQU 9
-ROUTE_23_WIDTH EQU 10
-INDIGO_PLATEAU_POKECENTER_1F_HEIGHT EQU 7
-INDIGO_PLATEAU_POKECENTER_1F_WIDTH EQU 9
-WILLS_ROOM_HEIGHT EQU 9
-WILLS_ROOM_WIDTH EQU 5
-KOGAS_ROOM_HEIGHT EQU 9
-KOGAS_ROOM_WIDTH EQU 5
-BRUNOS_ROOM_HEIGHT EQU 9
-BRUNOS_ROOM_WIDTH EQU 5
-KARENS_ROOM_HEIGHT EQU 9
-KARENS_ROOM_WIDTH EQU 5
-LANCES_ROOM_HEIGHT EQU 12
-LANCES_ROOM_WIDTH EQU 5
-HALL_OF_FAME_HEIGHT EQU 7
-HALL_OF_FAME_WIDTH EQU 5
-ROUTE_13_HEIGHT EQU 9
-ROUTE_13_WIDTH EQU 30
-ROUTE_14_HEIGHT EQU 18
-ROUTE_14_WIDTH EQU 10
-ROUTE_15_HEIGHT EQU 9
-ROUTE_15_WIDTH EQU 20
-ROUTE_18_HEIGHT EQU 9
-ROUTE_18_WIDTH EQU 10
-FUCHSIA_CITY_HEIGHT EQU 18
-FUCHSIA_CITY_WIDTH EQU 20
-FUCHSIA_MART_HEIGHT EQU 4
-FUCHSIA_MART_WIDTH EQU 6
-SAFARI_ZONE_MAIN_OFFICE_HEIGHT EQU 4
-SAFARI_ZONE_MAIN_OFFICE_WIDTH EQU 4
-FUCHSIA_GYM_HEIGHT EQU 9
-FUCHSIA_GYM_WIDTH EQU 5
-FUCHSIA_BILL_SPEECH_HOUSE_HEIGHT EQU 4
-FUCHSIA_BILL_SPEECH_HOUSE_WIDTH EQU 4
-FUCHSIA_POKECENTER_1F_HEIGHT EQU 4
-FUCHSIA_POKECENTER_1F_WIDTH EQU 5
-FUCHSIA_POKECENTER_2F_BETA_HEIGHT EQU 4
-FUCHSIA_POKECENTER_2F_BETA_WIDTH EQU 8
-SAFARI_ZONE_WARDENS_HOME_HEIGHT EQU 4
-SAFARI_ZONE_WARDENS_HOME_WIDTH EQU 5
-ROUTE_15_FUCHSIA_GATE_HEIGHT EQU 4
-ROUTE_15_FUCHSIA_GATE_WIDTH EQU 5
-ROUTE_8_HEIGHT EQU 9
-ROUTE_8_WIDTH EQU 20
-ROUTE_12_HEIGHT EQU 27
-ROUTE_12_WIDTH EQU 10
-ROUTE_10_SOUTH_HEIGHT EQU 9
-ROUTE_10_SOUTH_WIDTH EQU 10
-LAVENDER_TOWN_HEIGHT EQU 9
-LAVENDER_TOWN_WIDTH EQU 10
-LAVENDER_POKECENTER_1F_HEIGHT EQU 4
-LAVENDER_POKECENTER_1F_WIDTH EQU 5
-LAVENDER_POKECENTER_2F_BETA_HEIGHT EQU 4
-LAVENDER_POKECENTER_2F_BETA_WIDTH EQU 8
-MR_FUJIS_HOUSE_HEIGHT EQU 4
-MR_FUJIS_HOUSE_WIDTH EQU 5
-LAVENDER_TOWN_SPEECH_HOUSE_HEIGHT EQU 4
-LAVENDER_TOWN_SPEECH_HOUSE_WIDTH EQU 4
-LAVENDER_NAME_RATER_HEIGHT EQU 4
-LAVENDER_NAME_RATER_WIDTH EQU 4
-LAVENDER_MART_HEIGHT EQU 4
-LAVENDER_MART_WIDTH EQU 6
-SOUL_HOUSE_HEIGHT EQU 4
-SOUL_HOUSE_WIDTH EQU 5
-LAV_RADIO_TOWER_1F_HEIGHT EQU 4
-LAV_RADIO_TOWER_1F_WIDTH EQU 10
-ROUTE_8_SAFFRON_GATE_HEIGHT EQU 4
-ROUTE_8_SAFFRON_GATE_WIDTH EQU 5
-ROUTE_12_SUPER_ROD_HOUSE_HEIGHT EQU 4
-ROUTE_12_SUPER_ROD_HOUSE_WIDTH EQU 4
-ROUTE_28_HEIGHT EQU 9
-ROUTE_28_WIDTH EQU 20
-SILVER_CAVE_OUTSIDE_HEIGHT EQU 18
-SILVER_CAVE_OUTSIDE_WIDTH EQU 20
-SILVER_CAVE_POKECENTER_1F_HEIGHT EQU 4
-SILVER_CAVE_POKECENTER_1F_WIDTH EQU 5
-ROUTE_28_FAMOUS_SPEECH_HOUSE_HEIGHT EQU 4
-ROUTE_28_FAMOUS_SPEECH_HOUSE_WIDTH EQU 4
-POKECENTER_2F_HEIGHT EQU 4
-POKECENTER_2F_WIDTH EQU 8
-TRADE_CENTER_HEIGHT EQU 4
-TRADE_CENTER_WIDTH EQU 5
-COLOSSEUM_HEIGHT EQU 4
-COLOSSEUM_WIDTH EQU 5
-TIME_CAPSULE_HEIGHT EQU 4
-TIME_CAPSULE_WIDTH EQU 5
-MOBILE_TRADE_ROOM_MOBILE_HEIGHT EQU 4
-MOBILE_TRADE_ROOM_MOBILE_WIDTH EQU 5
-MOBILE_BATTLE_ROOM_HEIGHT EQU 4
-MOBILE_BATTLE_ROOM_WIDTH EQU 5
-ROUTE_7_HEIGHT EQU 9
-ROUTE_7_WIDTH EQU 10
-ROUTE_16_HEIGHT EQU 9
-ROUTE_16_WIDTH EQU 10
-ROUTE_17_HEIGHT EQU 45
-ROUTE_17_WIDTH EQU 10
-CELADON_CITY_HEIGHT EQU 18
-CELADON_CITY_WIDTH EQU 20
-CELADON_DEPT_STORE_1F_HEIGHT EQU 4
-CELADON_DEPT_STORE_1F_WIDTH EQU 8
-CELADON_DEPT_STORE_2F_HEIGHT EQU 4
-CELADON_DEPT_STORE_2F_WIDTH EQU 8
-CELADON_DEPT_STORE_3F_HEIGHT EQU 4
-CELADON_DEPT_STORE_3F_WIDTH EQU 8
-CELADON_DEPT_STORE_4F_HEIGHT EQU 4
-CELADON_DEPT_STORE_4F_WIDTH EQU 8
-CELADON_DEPT_STORE_5F_HEIGHT EQU 4
-CELADON_DEPT_STORE_5F_WIDTH EQU 8
-CELADON_DEPT_STORE_6F_HEIGHT EQU 4
-CELADON_DEPT_STORE_6F_WIDTH EQU 8
-CELADON_DEPT_STORE_ELEVATOR_HEIGHT EQU 2
-CELADON_DEPT_STORE_ELEVATOR_WIDTH EQU 2
-CELADON_MANSION_1F_HEIGHT EQU 5
-CELADON_MANSION_1F_WIDTH EQU 4
-CELADON_MANSION_2F_HEIGHT EQU 5
-CELADON_MANSION_2F_WIDTH EQU 4
-CELADON_MANSION_3F_HEIGHT EQU 5
-CELADON_MANSION_3F_WIDTH EQU 4
-CELADON_MANSION_ROOF_HEIGHT EQU 5
-CELADON_MANSION_ROOF_WIDTH EQU 4
-CELADON_MANSION_ROOF_HOUSE_HEIGHT EQU 4
-CELADON_MANSION_ROOF_HOUSE_WIDTH EQU 4
-CELADON_POKECENTER_1F_HEIGHT EQU 4
-CELADON_POKECENTER_1F_WIDTH EQU 5
-CELADON_POKECENTER_2F_BETA_HEIGHT EQU 4
-CELADON_POKECENTER_2F_BETA_WIDTH EQU 8
-CELADON_GAME_CORNER_HEIGHT EQU 7
-CELADON_GAME_CORNER_WIDTH EQU 10
-CELADON_GAME_CORNER_PRIZE_ROOM_HEIGHT EQU 3
-CELADON_GAME_CORNER_PRIZE_ROOM_WIDTH EQU 3
-CELADON_GYM_HEIGHT EQU 9
-CELADON_GYM_WIDTH EQU 5
-CELADON_CAFE_HEIGHT EQU 4
-CELADON_CAFE_WIDTH EQU 6
-ROUTE_16_FUCHSIA_SPEECH_HOUSE_HEIGHT EQU 4
-ROUTE_16_FUCHSIA_SPEECH_HOUSE_WIDTH EQU 4
-ROUTE_16_GATE_HEIGHT EQU 4
-ROUTE_16_GATE_WIDTH EQU 5
-ROUTE_7_SAFFRON_GATE_HEIGHT EQU 4
-ROUTE_7_SAFFRON_GATE_WIDTH EQU 5
-ROUTE_17_18_GATE_HEIGHT EQU 4
-ROUTE_17_18_GATE_WIDTH EQU 5
-ROUTE_40_HEIGHT EQU 18
-ROUTE_40_WIDTH EQU 10
-ROUTE_41_HEIGHT EQU 27
-ROUTE_41_WIDTH EQU 25
-CIANWOOD_CITY_HEIGHT EQU 27
-CIANWOOD_CITY_WIDTH EQU 15
-MANIAS_HOUSE_HEIGHT EQU 4
-MANIAS_HOUSE_WIDTH EQU 4
-CIANWOOD_GYM_HEIGHT EQU 9
-CIANWOOD_GYM_WIDTH EQU 5
-CIANWOOD_POKECENTER_1F_HEIGHT EQU 4
-CIANWOOD_POKECENTER_1F_WIDTH EQU 5
-CIANWOOD_PHARMACY_HEIGHT EQU 4
-CIANWOOD_PHARMACY_WIDTH EQU 4
-CIANWOOD_CITY_PHOTO_STUDIO_HEIGHT EQU 4
-CIANWOOD_CITY_PHOTO_STUDIO_WIDTH EQU 4
-CIANWOOD_LUGIA_SPEECH_HOUSE_HEIGHT EQU 4
-CIANWOOD_LUGIA_SPEECH_HOUSE_WIDTH EQU 4
-POKE_SEERS_HOUSE_HEIGHT EQU 4
-POKE_SEERS_HOUSE_WIDTH EQU 4
-BATTLE_TOWER_1F_HEIGHT EQU 5
-BATTLE_TOWER_1F_WIDTH EQU 8
-BATTLE_TOWER_BATTLE_ROOM_HEIGHT EQU 4
-BATTLE_TOWER_BATTLE_ROOM_WIDTH EQU 4
-BATTLE_TOWER_ELEVATOR_HEIGHT EQU 2
-BATTLE_TOWER_ELEVATOR_WIDTH EQU 2
-BATTLE_TOWER_HALLWAY_HEIGHT EQU 2
-BATTLE_TOWER_HALLWAY_WIDTH EQU 11
-ROUTE_40_BATTLE_TOWER_GATE_HEIGHT EQU 4
-ROUTE_40_BATTLE_TOWER_GATE_WIDTH EQU 5
-BATTLE_TOWER_OUTSIDE_HEIGHT EQU 14
-BATTLE_TOWER_OUTSIDE_WIDTH EQU 10
-ROUTE_2_HEIGHT EQU 27
-ROUTE_2_WIDTH EQU 10
-ROUTE_22_HEIGHT EQU 9
-ROUTE_22_WIDTH EQU 20
-VIRIDIAN_CITY_HEIGHT EQU 18
-VIRIDIAN_CITY_WIDTH EQU 20
-VIRIDIAN_GYM_HEIGHT EQU 9
-VIRIDIAN_GYM_WIDTH EQU 5
-VIRIDIAN_NICKNAME_SPEECH_HOUSE_HEIGHT EQU 4
-VIRIDIAN_NICKNAME_SPEECH_HOUSE_WIDTH EQU 4
-TRAINER_HOUSE_1F_HEIGHT EQU 7
-TRAINER_HOUSE_1F_WIDTH EQU 5
-TRAINER_HOUSE_B1F_HEIGHT EQU 8
-TRAINER_HOUSE_B1F_WIDTH EQU 5
-VIRIDIAN_MART_HEIGHT EQU 4
-VIRIDIAN_MART_WIDTH EQU 6
-VIRIDIAN_POKECENTER_1F_HEIGHT EQU 4
-VIRIDIAN_POKECENTER_1F_WIDTH EQU 5
-VIRIDIAN_POKECENTER_2F_BETA_HEIGHT EQU 4
-VIRIDIAN_POKECENTER_2F_BETA_WIDTH EQU 8
-ROUTE_2_NUGGET_SPEECH_HOUSE_HEIGHT EQU 4
-ROUTE_2_NUGGET_SPEECH_HOUSE_WIDTH EQU 4
-ROUTE_2_GATE_HEIGHT EQU 4
-ROUTE_2_GATE_WIDTH EQU 5
-VICTORY_ROAD_GATE_HEIGHT EQU 9
-VICTORY_ROAD_GATE_WIDTH EQU 10
-ROUTE_26_HEIGHT EQU 54
-ROUTE_26_WIDTH EQU 10
-ROUTE_27_HEIGHT EQU 9
-ROUTE_27_WIDTH EQU 40
-ROUTE_29_HEIGHT EQU 9
-ROUTE_29_WIDTH EQU 30
-NEW_BARK_TOWN_HEIGHT EQU 9
-NEW_BARK_TOWN_WIDTH EQU 10
-ELMS_LAB_HEIGHT EQU 6
-ELMS_LAB_WIDTH EQU 5
-KRISS_HOUSE_1F_HEIGHT EQU 4
-KRISS_HOUSE_1F_WIDTH EQU 5
-KRISS_HOUSE_2F_HEIGHT EQU 3
-KRISS_HOUSE_2F_WIDTH EQU 4
-KRISS_NEIGHBORS_HOUSE_HEIGHT EQU 4
-KRISS_NEIGHBORS_HOUSE_WIDTH EQU 4
-ELMS_HOUSE_HEIGHT EQU 4
-ELMS_HOUSE_WIDTH EQU 4
-ROUTE_26_HEAL_SPEECH_HOUSE_HEIGHT EQU 4
-ROUTE_26_HEAL_SPEECH_HOUSE_WIDTH EQU 4
-ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE_HEIGHT EQU 4
-ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE_WIDTH EQU 4
-ROUTE_27_SANDSTORM_HOUSE_HEIGHT EQU 4
-ROUTE_27_SANDSTORM_HOUSE_WIDTH EQU 4
-ROUTE_29_46_GATE_HEIGHT EQU 4
-ROUTE_29_46_GATE_WIDTH EQU 5
-ROUTE_5_HEIGHT EQU 9
-ROUTE_5_WIDTH EQU 10
-SAFFRON_CITY_HEIGHT EQU 18
-SAFFRON_CITY_WIDTH EQU 20
-FIGHTING_DOJO_HEIGHT EQU 6
-FIGHTING_DOJO_WIDTH EQU 5
-SAFFRON_GYM_HEIGHT EQU 9
-SAFFRON_GYM_WIDTH EQU 10
-SAFFRON_MART_HEIGHT EQU 4
-SAFFRON_MART_WIDTH EQU 6
-SAFFRON_POKECENTER_1F_HEIGHT EQU 4
-SAFFRON_POKECENTER_1F_WIDTH EQU 5
-SAFFRON_POKECENTER_2F_BETA_HEIGHT EQU 4
-SAFFRON_POKECENTER_2F_BETA_WIDTH EQU 8
-MR_PSYCHICS_HOUSE_HEIGHT EQU 4
-MR_PSYCHICS_HOUSE_WIDTH EQU 4
-SAFFRON_TRAIN_STATION_HEIGHT EQU 9
-SAFFRON_TRAIN_STATION_WIDTH EQU 10
-SILPH_CO_1F_HEIGHT EQU 4
-SILPH_CO_1F_WIDTH EQU 8
-COPYCATS_HOUSE_1F_HEIGHT EQU 4
-COPYCATS_HOUSE_1F_WIDTH EQU 4
-COPYCATS_HOUSE_2F_HEIGHT EQU 3
-COPYCATS_HOUSE_2F_WIDTH EQU 5
-ROUTE_5_UNDERGROUND_ENTRANCE_HEIGHT EQU 4
-ROUTE_5_UNDERGROUND_ENTRANCE_WIDTH EQU 4
-ROUTE_5_SAFFRON_CITY_GATE_HEIGHT EQU 4
-ROUTE_5_SAFFRON_CITY_GATE_WIDTH EQU 5
-ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE_HEIGHT EQU 4
-ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE_WIDTH EQU 4
-ROUTE_30_HEIGHT EQU 27
-ROUTE_30_WIDTH EQU 10
-ROUTE_31_HEIGHT EQU 9
-ROUTE_31_WIDTH EQU 20
-CHERRYGROVE_CITY_HEIGHT EQU 9
-CHERRYGROVE_CITY_WIDTH EQU 20
-CHERRYGROVE_MART_HEIGHT EQU 4
-CHERRYGROVE_MART_WIDTH EQU 6
-CHERRYGROVE_POKECENTER_1F_HEIGHT EQU 4
-CHERRYGROVE_POKECENTER_1F_WIDTH EQU 5
-CHERRYGROVE_GYM_SPEECH_HOUSE_HEIGHT EQU 4
-CHERRYGROVE_GYM_SPEECH_HOUSE_WIDTH EQU 4
-GUIDE_GENTS_HOUSE_HEIGHT EQU 4
-GUIDE_GENTS_HOUSE_WIDTH EQU 4
-CHERRYGROVE_EVOLUTION_SPEECH_HOUSE_HEIGHT EQU 4
-CHERRYGROVE_EVOLUTION_SPEECH_HOUSE_WIDTH EQU 4
-ROUTE_30_BERRY_SPEECH_HOUSE_HEIGHT EQU 4
-ROUTE_30_BERRY_SPEECH_HOUSE_WIDTH EQU 4
-MR_POKEMONS_HOUSE_HEIGHT EQU 4
-MR_POKEMONS_HOUSE_WIDTH EQU 4
-ROUTE_31_VIOLET_GATE_HEIGHT EQU 4
-ROUTE_31_VIOLET_GATE_WIDTH EQU 5
-
-; elevator floors
-_B4F  EQU $0
-_B3F  EQU $1
-_B2F  EQU $2
-_B1F  EQU $3
-_1F   EQU $4
-_2F   EQU $5
-_3F   EQU $6
-_4F   EQU $7
-_5F   EQU $8
-_6F   EQU $9
-_7F   EQU $a
-_8F   EQU $b
-_9F   EQU $c
-_10F  EQU $d
-_11F  EQU $e
-_ROOF EQU $f
-
-; connection directions
-EAST EQU 1
-WEST EQU 2
-SOUTH EQU 4
-NORTH EQU 8
--- a/move_constants.asm
+++ /dev/null
@@ -1,251 +1,0 @@
-POUND        EQU $01
-KARATE_CHOP  EQU $02
-DOUBLESLAP   EQU $03
-COMET_PUNCH  EQU $04
-MEGA_PUNCH   EQU $05
-PAY_DAY      EQU $06
-FIRE_PUNCH   EQU $07
-ICE_PUNCH    EQU $08
-THUNDERPUNCH EQU $09
-SCRATCH      EQU $0A
-VICEGRIP     EQU $0B
-GUILLOTINE   EQU $0C
-RAZOR_WIND   EQU $0D
-SWORDS_DANCE EQU $0E
-CUT          EQU $0F
-GUST         EQU $10
-WING_ATTACK  EQU $11
-WHIRLWIND    EQU $12
-FLY          EQU $13
-BIND         EQU $14
-SLAM         EQU $15
-VINE_WHIP    EQU $16
-STOMP        EQU $17
-DOUBLE_KICK  EQU $18
-MEGA_KICK    EQU $19
-JUMP_KICK    EQU $1A
-ROLLING_KICK EQU $1B
-SAND_ATTACK  EQU $1C
-HEADBUTT     EQU $1D
-HORN_ATTACK  EQU $1E
-FURY_ATTACK  EQU $1F
-HORN_DRILL   EQU $20
-TACKLE       EQU $21
-BODY_SLAM    EQU $22
-WRAP         EQU $23
-TAKE_DOWN    EQU $24
-THRASH       EQU $25
-DOUBLE_EDGE  EQU $26
-TAIL_WHIP    EQU $27
-POISON_STING EQU $28
-TWINEEDLE    EQU $29
-PIN_MISSILE  EQU $2A
-LEER         EQU $2B
-BITE         EQU $2C
-GROWL        EQU $2D
-ROAR         EQU $2E
-SING         EQU $2F
-SUPERSONIC   EQU $30
-SONICBOOM    EQU $31
-DISABLE      EQU $32
-ACID         EQU $33
-EMBER        EQU $34
-FLAMETHROWER EQU $35
-MIST         EQU $36
-WATER_GUN    EQU $37
-HYDRO_PUMP   EQU $38
-SURF         EQU $39
-ICE_BEAM     EQU $3A
-BLIZZARD     EQU $3B
-PSYBEAM      EQU $3C
-BUBBLEBEAM   EQU $3D
-AURORA_BEAM  EQU $3E
-HYPER_BEAM   EQU $3F
-PECK         EQU $40
-DRILL_PECK   EQU $41
-SUBMISSION   EQU $42
-LOW_KICK     EQU $43
-COUNTER      EQU $44
-SEISMIC_TOSS EQU $45
-STRENGTH     EQU $46
-ABSORB       EQU $47
-MEGA_DRAIN   EQU $48
-LEECH_SEED   EQU $49
-GROWTH       EQU $4A
-RAZOR_LEAF   EQU $4B
-SOLARBEAM    EQU $4C
-POISONPOWDER EQU $4D
-STUN_SPORE   EQU $4E
-SLEEP_POWDER EQU $4F
-PETAL_DANCE  EQU $50
-STRING_SHOT  EQU $51
-DRAGON_RAGE  EQU $52
-FIRE_SPIN    EQU $53
-THUNDERSHOCK EQU $54
-THUNDERBOLT  EQU $55
-THUNDER_WAVE EQU $56
-THUNDER      EQU $57
-ROCK_THROW   EQU $58
-EARTHQUAKE   EQU $59
-FISSURE      EQU $5A
-DIG          EQU $5B
-TOXIC        EQU $5C
-CONFUSION    EQU $5D
-PSYCHIC_M    EQU $5E
-HYPNOSIS     EQU $5F
-MEDITATE     EQU $60
-AGILITY      EQU $61
-QUICK_ATTACK EQU $62
-RAGE         EQU $63
-TELEPORT     EQU $64
-NIGHT_SHADE  EQU $65
-MIMIC        EQU $66
-SCREECH      EQU $67
-DOUBLE_TEAM  EQU $68
-RECOVER      EQU $69
-HARDEN       EQU $6A
-MINIMIZE     EQU $6B
-SMOKESCREEN  EQU $6C
-CONFUSE_RAY  EQU $6D
-WITHDRAW     EQU $6E
-DEFENSE_CURL EQU $6F
-BARRIER      EQU $70
-LIGHT_SCREEN EQU $71
-HAZE         EQU $72
-REFLECT      EQU $73
-FOCUS_ENERGY EQU $74
-BIDE         EQU $75
-METRONOME    EQU $76
-MIRROR_MOVE  EQU $77
-SELFDESTRUCT EQU $78
-EGG_BOMB     EQU $79
-LICK         EQU $7A
-SMOG         EQU $7B
-SLUDGE       EQU $7C
-BONE_CLUB    EQU $7D
-FIRE_BLAST   EQU $7E
-WATERFALL    EQU $7F
-CLAMP        EQU $80
-SWIFT        EQU $81
-SKULL_BASH   EQU $82
-SPIKE_CANNON EQU $83
-CONSTRICT    EQU $84
-AMNESIA      EQU $85
-KINESIS      EQU $86
-SOFTBOILED   EQU $87
-HI_JUMP_KICK EQU $88
-GLARE        EQU $89
-DREAM_EATER  EQU $8A
-POISON_GAS   EQU $8B
-BARRAGE      EQU $8C
-LEECH_LIFE   EQU $8D
-LOVELY_KISS  EQU $8E
-SKY_ATTACK   EQU $8F
-TRANSFORM    EQU $90
-BUBBLE       EQU $91
-DIZZY_PUNCH  EQU $92
-SPORE        EQU $93
-FLASH        EQU $94
-PSYWAVE      EQU $95
-SPLASH       EQU $96
-ACID_ARMOR   EQU $97
-CRABHAMMER   EQU $98
-EXPLOSION    EQU $99
-FURY_SWIPES  EQU $9A
-BONEMERANG   EQU $9B
-REST         EQU $9C
-ROCK_SLIDE   EQU $9D
-HYPER_FANG   EQU $9E
-SHARPEN      EQU $9F
-CONVERSION   EQU $A0
-TRI_ATTACK   EQU $A1
-SUPER_FANG   EQU $A2
-SLASH        EQU $A3
-SUBSTITUTE   EQU $A4
-STRUGGLE     EQU $A5
-SKETCH       EQU $A6
-TRIPLE_KICK  EQU $A7
-THIEF        EQU $A8
-SPIDER_WEB   EQU $A9
-MIND_READER  EQU $AA
-NIGHTMARE    EQU $AB
-FLAME_WHEEL  EQU $AC
-SNORE        EQU $AD
-CURSE        EQU $AE
-FLAIL        EQU $AF
-CONVERSION2  EQU $B0
-AEROBLAST    EQU $B1
-COTTON_SPORE EQU $B2
-REVERSAL     EQU $B3
-SPITE        EQU $B4
-POWDER_SNOW  EQU $B5
-PROTECT      EQU $B6
-MACH_PUNCH   EQU $B7
-SCARY_FACE   EQU $B8
-FAINT_ATTACK EQU $B9
-SWEET_KISS   EQU $BA
-BELLY_DRUM   EQU $BB
-SLUDGE_BOMB  EQU $BC
-MUD_SLAP     EQU $BD
-OCTAZOOKA    EQU $BE
-SPIKES       EQU $BF
-ZAP_CANNON   EQU $C0
-FORESIGHT    EQU $C1
-DESTINY_BOND EQU $C2
-PERISH_SONG  EQU $C3
-ICY_WIND     EQU $C4
-DETECT       EQU $C5
-BONE_RUSH    EQU $C6
-LOCK_ON      EQU $C7
-OUTRAGE      EQU $C8
-SANDSTORM    EQU $C9
-GIGA_DRAIN   EQU $CA
-ENDURE       EQU $CB
-CHARM        EQU $CC
-ROLLOUT      EQU $CD
-FALSE_SWIPE  EQU $CE
-SWAGGER      EQU $CF
-MILK_DRINK   EQU $D0
-SPARK        EQU $D1
-FURY_CUTTER  EQU $D2
-STEEL_WING   EQU $D3
-MEAN_LOOK    EQU $D4
-ATTRACT      EQU $D5
-SLEEP_TALK   EQU $D6
-HEAL_BELL    EQU $D7
-RETURN       EQU $D8
-PRESENT      EQU $D9
-FRUSTRATION  EQU $DA
-SAFEGUARD    EQU $DB
-PAIN_SPLIT   EQU $DC
-SACRED_FIRE  EQU $DD
-MAGNITUDE    EQU $DE
-DYNAMICPUNCH EQU $DF
-MEGAHORN     EQU $E0
-DRAGONBREATH EQU $E1
-BATON_PASS   EQU $E2
-ENCORE       EQU $E3
-PURSUIT      EQU $E4
-RAPID_SPIN   EQU $E5
-SWEET_SCENT  EQU $E6
-IRON_TAIL    EQU $E7
-METAL_CLAW   EQU $E8
-VITAL_THROW  EQU $E9
-MORNING_SUN  EQU $EA
-SYNTHESIS    EQU $EB
-MOONLIGHT    EQU $EC
-HIDDEN_POWER EQU $ED
-CROSS_CHOP   EQU $EE
-TWISTER      EQU $EF
-RAIN_DANCE   EQU $F0
-SUNNY_DAY    EQU $F1
-CRUNCH       EQU $F2
-MIRROR_COAT  EQU $F3
-PSYCH_UP     EQU $F4
-EXTREMESPEED EQU $F5
-ANCIENTPOWER EQU $F6
-SHADOW_BALL  EQU $F7
-FUTURE_SIGHT EQU $F8
-ROCK_SMASH   EQU $F9
-WHIRLPOOL    EQU $FA
-BEAT_UP      EQU $FB
--- a/music_constants.asm
+++ /dev/null
@@ -1,381 +1,0 @@
-; music
-MUSIC_NONE EQU 0
-MUSIC_TITLE EQU 1
-MUSIC_ROUTE_1 EQU 2
-MUSIC_ROUTE_3 EQU 3
-MUSIC_ROUTE_12 EQU 4
-MUSIC_MAGNET_TRAIN EQU 5
-MUSIC_KANTO_GYM_LEADER_BATTLE EQU 6
-MUSIC_KANTO_TRAINER_BATTLE EQU 7
-MUSIC_KANTO_WILD_BATTLE EQU 8
-MUSIC_POKEMON_CENTER EQU 9
-MUSIC_HIKER_ENCOUNTER EQU 10
-MUSIC_LASS_ENCOUNTER EQU 11
-MUSIC_OFFICER_ENCOUNTER EQU 12
-MUSIC_HEAL EQU 13
-MUSIC_LAVENDER_TOWN EQU 14
-MUSIC_ROUTE_2 EQU 15
-MUSIC_MT_MOON EQU 16
-MUSIC_SHOW_ME_AROUND EQU 17
-MUSIC_GAME_CORNER EQU 18
-MUSIC_BICYCLE EQU 19
-MUSIC_HALL_OF_FAME EQU 20
-MUSIC_VIRIDIAN_CITY EQU 21
-MUSIC_CELADON_CITY EQU 22
-MUSIC_TRAINER_VICTORY EQU 23
-MUSIC_WILD_VICTORY EQU 24
-MUSIC_GYM_VICTORY EQU 25
-MUSIC_MT_MOON_SQUARE EQU 26
-MUSIC_GYM EQU 27
-MUSIC_PALLET_TOWN EQU 28
-MUSIC_POKEMON_TALK EQU 29
-MUSIC_PROF_OAK EQU 30
-MUSIC_RIVAL_ENCOUNTER EQU 31
-MUSIC_RIVAL_AFTER EQU 32
-MUSIC_SURF EQU 33
-MUSIC_EVOLUTION EQU 34
-MUSIC_NATIONAL_PARK EQU 35
-MUSIC_CREDITS EQU 36
-MUSIC_AZALEA_TOWN EQU 37
-MUSIC_CHERRYGROVE_CITY EQU 38
-MUSIC_KIMONO_ENCOUNTER EQU 39
-MUSIC_UNION_CAVE EQU 40
-MUSIC_JOHTO_WILD_BATTLE EQU 41
-MUSIC_JOHTO_TRAINER_BATTLE EQU 42
-MUSIC_ROUTE_30 EQU 43
-MUSIC_ECRUTEAK_CITY EQU 44
-MUSIC_VIOLET_CITY EQU 45
-MUSIC_JOHTO_GYM_LEADER_BATTLE EQU 46
-MUSIC_CHAMPION_BATTLE EQU 47
-MUSIC_RIVAL_BATTLE EQU 48
-MUSIC_ROCKET_BATTLE EQU 49
-MUSIC_PROF_ELM EQU 50
-MUSIC_DARK_CAVE EQU 51
-MUSIC_ROUTE_29 EQU 52
-MUSIC_ROUTE_36 EQU 53
-MUSIC_SS_AQUA EQU 54
-MUSIC_YOUNGSTER_ENCOUNTER EQU 55
-MUSIC_BEAUTY_ENCOUNTER EQU 56
-MUSIC_ROCKET_ENCOUNTER EQU 57
-MUSIC_POKEMANIAC_ENCOUNTER EQU 58
-MUSIC_SAGE_ENCOUNTER EQU 59
-MUSIC_NEW_BARK_TOWN EQU 60
-MUSIC_GOLDENROD_CITY EQU 61
-MUSIC_VERMILION_CITY EQU 62
-MUSIC_POKEMON_CHANNEL EQU 63
-MUSIC_POKE_FLUTE_CHANNEL EQU 64
-MUSIC_TIN_TOWER EQU 65
-MUSIC_SPROUT_TOWER EQU 66
-MUSIC_BURNED_TOWER EQU 67
-MUSIC_LIGHTHOUSE EQU 68
-MUSIC_LAKE_OF_RAGE EQU 69
-MUSIC_INDIGO_PLATEAU EQU 70
-MUSIC_ROUTE_37 EQU 71
-MUSIC_ROCKET_HIDEOUT EQU 72
-MUSIC_DRAGONS_DEN EQU 73
-MUSIC_JOHTO_WILD_BATTLE_NIGHT EQU 74
-MUSIC_RUINS_OF_ALPH_RADIO EQU 75
-MUSIC_CAPTURE EQU 76
-MUSIC_ROUTE_26 EQU 77
-MUSIC_MOM EQU 78
-MUSIC_VICTORY_ROAD EQU 79
-MUSIC_POKEMON_LULLABY EQU 80
-MUSIC_POKEMON_MARCH EQU 81
-MUSIC_GS_OPENING EQU 82
-MUSIC_GS_OPENING_2 EQU 83
-MUSIC_MAIN_MENU EQU 84
-MUSIC_RUINS_OF_ALPH_INTERIOR EQU 85
-MUSIC_ROCKET_OVERTURE EQU 86
-MUSIC_DANCING_HALL EQU 87
-MUSIC_BUG_CATCHING_CONTEST_RANKING EQU 88
-MUSIC_BUG_CATCHING_CONTEST EQU 89
-MUSIC_LAKE_OF_RAGE_ROCKET_RADIO EQU 90
-MUSIC_PRINTER EQU 91
-MUSIC_POST_CREDITS EQU 92
-MUSIC_CLAIR EQU 93
-MUSIC_MOBILE_ADAPTER_MENU EQU 94
-MUSIC_MOBILE_ADAPTER EQU 95
-MUSIC_BUENAS_PASSWORD EQU 96
-MUSIC_MYSTICALMAN_ENCOUNTER EQU 97
-MUSIC_CRYSTAL_OPENING EQU 98
-MUSIC_BATTLE_TOWER_THEME EQU 99
-MUSIC_SUICUNE_BATTLE EQU 100
-MUSIC_BATTLE_TOWER_LOBBY EQU 101
-MUSIC_MOBILE_CENTER EQU 102
-
-MUSIC_MAHOGANY_MART EQU 100 ; grandfathered from gold
-
-
-; sfx
-SFX_DEX_FANFARE_50_79           EQU $00
-SFX_ITEM                        EQU $01
-SFX_CAUGHT_MON                  EQU $02
-SFX_POKEBALLS_PLACED_ON_TABLE   EQU $03
-SFX_POTION                      EQU $04
-SFX_FULL_HEAL                   EQU $05
-SFX_MENU                        EQU $06
-SFX_READ_TEXT                   EQU $07
-SFX_READ_TEXT_2                 EQU $08
-SFX_DEX_FANFARE_20_49           EQU $09
-SFX_DEX_FANFARE_80_109          EQU $0a
-SFX_POISON                      EQU $0b
-SFX_GOT_SAFARI_BALLS            EQU $0c
-SFX_BOOT_PC                     EQU $0d
-SFX_SHUT_DOWN_PC                EQU $0e
-SFX_CHOOSE_PC_OPTION            EQU $0f
-SFX_ESCAPE_ROPE                 EQU $10
-SFX_PUSH_BUTTON                 EQU $11
-SFX_SECOND_PART_OF_ITEMFINDER   EQU $12
-SFX_WARP_TO                     EQU $13
-SFX_WARP_FROM                   EQU $14
-SFX_CHANGE_DEX_MODE             EQU $15
-SFX_JUMP_OVER_LEDGE             EQU $16
-SFX_GRASS_RUSTLE                EQU $17
-SFX_FLY                         EQU $18
-SFX_WRONG                       EQU $19
-SFX_SQUEAK                      EQU $1a
-SFX_STRENGTH                    EQU $1b
-SFX_BOAT                        EQU $1c
-SFX_WALL_OPEN                   EQU $1d
-SFX_PLACE_PUZZLE_PIECE_DOWN     EQU $1e
-SFX_ENTER_DOOR                  EQU $1f
-SFX_SWITCH_POKEMON              EQU $20
-SFX_TALLY                       EQU $21
-SFX_TRANSACTION                 EQU $22
-SFX_EXIT_BUILDING               EQU $23
-SFX_BUMP                        EQU $24
-SFX_SAVE                        EQU $25
-SFX_POKEFLUTE                   EQU $26
-SFX_ELEVATOR_END                EQU $27
-SFX_THROW_BALL                  EQU $28
-SFX_BALL_POOF                   EQU $29
-SFX_UNKNOWN_3A                  EQU $2a
-SFX_RUN                         EQU $2b
-SFX_SLOT_MACHINE_START          EQU $2c
-SFX_FANFARE                     EQU $2d
-SFX_PECK                        EQU $2e
-SFX_KINESIS                     EQU $2f
-SFX_LICK                        EQU $30
-SFX_POUND                       EQU $31
-SFX_MOVE_PUZZLE_PIECE           EQU $32
-SFX_COMET_PUNCH                 EQU $33
-SFX_MEGA_PUNCH                  EQU $34
-SFX_SCRATCH                     EQU $35
-SFX_VICEGRIP                    EQU $36
-SFX_RAZOR_WIND                  EQU $37
-SFX_CUT                         EQU $38
-SFX_WING_ATTACK                 EQU $39
-SFX_WHIRLWIND                   EQU $3a
-SFX_BIND                        EQU $3b
-SFX_VINE_WHIP                   EQU $3c
-SFX_DOUBLE_KICK                 EQU $3d
-SFX_MEGA_KICK                   EQU $3e
-SFX_HEADBUTT                    EQU $3f
-SFX_HORN_ATTACK                 EQU $40
-SFX_TACKLE                      EQU $41
-SFX_POISON_STING                EQU $42
-SFX_POWDER                      EQU $43
-SFX_DOUBLESLAP                  EQU $44
-SFX_BITE                        EQU $45
-SFX_JUMP_KICK                   EQU $46
-SFX_STOMP                       EQU $47
-SFX_TAIL_WHIP                   EQU $48
-SFX_KARATE_CHOP                 EQU $49
-SFX_SUBMISSION                  EQU $4a
-SFX_WATER_GUN                   EQU $4b
-SFX_SWORDS_DANCE                EQU $4c
-SFX_THUNDER                     EQU $4d
-SFX_SUPERSONIC                  EQU $4e
-SFX_LEER                        EQU $4f
-SFX_EMBER                       EQU $50
-SFX_BUBBLEBEAM                  EQU $51
-SFX_HYDRO_PUMP                  EQU $52
-SFX_SURF                        EQU $53
-SFX_PSYBEAM                     EQU $54
-SFX_CHARGE                      EQU $55
-SFX_THUNDERSHOCK                EQU $56
-SFX_PSYCHIC                     EQU $57
-SFX_SCREECH                     EQU $58
-SFX_BONE_CLUB                   EQU $59
-SFX_SHARPEN                     EQU $5a
-SFX_EGG_BOMB                    EQU $5b
-SFX_SING                        EQU $5c
-SFX_HYPER_BEAM                  EQU $5d
-SFX_SHINE                       EQU $5e
-SFX_UNKNOWN_5F                  EQU $5f
-SFX_UNKNOWN_60                  EQU $60
-SFX_UNKNOWN_61                  EQU $61
-SFX_UNKNOWN_62                  EQU $62
-SFX_UNKNOWN_63                  EQU $63
-SFX_BURN                        EQU $64
-SFX_TITLE_SCREEN_ENTRANCE       EQU $65
-SFX_UNKNOWN_66                  EQU $66
-SFX_GET_COIN_FROM_SLOTS         EQU $67
-SFX_PAY_DAY                     EQU $68
-SFX_METRONOME                   EQU $69
-SFX_CALL                        EQU $6a
-SFX_HANG_UP                     EQU $6b
-SFX_NO_SIGNAL                   EQU $6c
-SFX_SANDSTORM                   EQU $6d
-SFX_ELEVATOR                    EQU $6e
-SFX_PROTECT                     EQU $6f
-SFX_SKETCH                      EQU $70
-SFX_RAIN_DANCE                  EQU $71
-SFX_AEROBLAST                   EQU $72
-SFX_SPARK                       EQU $73
-SFX_CURSE                       EQU $74
-SFX_RAGE                        EQU $75
-SFX_THIEF                       EQU $76
-SFX_THIEF_2                     EQU $77
-SFX_SPIDER_WEB                  EQU $78
-SFX_MIND_READER                 EQU $79
-SFX_NIGHTMARE                   EQU $7a
-SFX_SNORE                       EQU $7b
-SFX_SWEET_KISS                  EQU $7c
-SFX_SWEET_KISS_2                EQU $7d
-SFX_BELLY_DRUM                  EQU $7e
-SFX_UNKNOWN_7F                  EQU $7f
-SFX_SLUDGE_BOMB                 EQU $80
-SFX_FORESIGHT                   EQU $81
-SFX_SPITE                       EQU $82
-SFX_OUTRAGE                     EQU $83
-SFX_PERISH_SONG                 EQU $84
-SFX_GIGA_DRAIN                  EQU $85
-SFX_ATTRACT                     EQU $86
-SFX_KINESIS_2                   EQU $87
-SFX_ZAP_CANNON                  EQU $88
-SFX_MEAN_LOOK                   EQU $89
-SFX_HEAL_BELL                   EQU $8a
-SFX_RETURN                      EQU $8b
-SFX_EXP_BAR                     EQU $8c
-SFX_MILK_DRINK                  EQU $8d
-SFX_PRESENT                     EQU $8e
-SFX_MORNING_SUN                 EQU $8f
-SFX_LEVEL_UP                    EQU $90
-SFX_KEY_ITEM                    EQU $91
-SFX_FANFARE_2                   EQU $92
-SFX_REGISTER_PHONE_#            EQU $93
-SFX_3RD_PLACE                   EQU $94
-SFX_GET_EGG_FROM_DAYCARE_MAN    EQU $95
-SFX_GET_EGG_FROM_DAYCARE_LADY   EQU $96
-SFX_MOVE_DELETED                EQU $97
-SFX_2ND_PLACE                   EQU $98
-SFX_1ST_PLACE                   EQU $99
-SFX_CHOOSE_A_CARD               EQU $9a
-SFX_GET_TM                      EQU $9b
-SFX_GET_BADGE                   EQU $9c
-SFX_QUIT_SLOTS                  EQU $9d
-SFX_EGG_CRACK                   EQU $9e
-SFX_DEX_FANFARE_LESS_THAN_20    EQU $9f
-SFX_DEX_FANFARE_140_169         EQU $a0
-SFX_DEX_FANFARE_170_199         EQU $a1
-SFX_DEX_FANFARE_200_229         EQU $a2
-SFX_DEX_FANFARE_230_PLUS        EQU $a3
-SFX_EVOLVED                     EQU $a4
-SFX_MASTER_BALL                 EQU $a5
-SFX_EGG_HATCH                   EQU $a6
-SFX_GS_INTRO_CHARIZARD_FIREBALL EQU $a7
-SFX_GS_INTRO_POKEMON_APPEARS    EQU $a8
-SFX_FLASH                       EQU $a9
-SFX_GAME_FREAK_LOGO_GS          EQU $aa
-SFX_NOT_VERY_EFFECTIVE          EQU $ab
-SFX_DAMAGE                      EQU $ac
-SFX_SUPER_EFFECTIVE             EQU $ad
-SFX_BALL_BOUNCE                 EQU $ae
-SFX_MOONLIGHT                   EQU $af
-SFX_ENCORE                      EQU $b0
-SFX_BEAT_UP                     EQU $b1
-SFX_BATON_PASS                  EQU $b2
-SFX_BALL_WIGGLE                 EQU $b3
-SFX_SWEET_SCENT                 EQU $b4
-SFX_SWEET_SCENT_2               EQU $b5
-SFX_HIT_END_OF_EXP_BAR          EQU $b6
-SFX_GIVE_TRADEMON               EQU $b7
-SFX_GET_TRADEMON                EQU $b8
-SFX_TRAIN_ARRIVED               EQU $b9
-SFX_STOP_SLOT                   EQU $ba
-SFX_2_BOOPS                     EQU $bb
-SFX_GLASS_TING                  EQU $bc
-SFX_GLASS_TING_2                EQU $bd
-SFX_INTRO_UNOWN_1               EQU $be
-SFX_INTRO_UNOWN_2               EQU $bf
-SFX_INTRO_UNOWN_3               EQU $c0
-SFX_DITTO_POP_UP                EQU $c1
-SFX_DITTO_TRANSFORM             EQU $c2
-SFX_INTRO_SUICUNE_1             EQU $c3
-SFX_INTRO_PICHU                 EQU $c4
-SFX_INTRO_SUICUNE_2             EQU $c5
-SFX_INTRO_SUICUNE_3             EQU $c6
-SFX_DITTO_BOUNCE                EQU $c7
-SFX_INTRO_SUICUNE_4             EQU $c8
-SFX_GAME_FREAK_PRESENTS         EQU $c9
-SFX_TINGLE                      EQU $ca
-SFX_UNKNOWN_CB                  EQU $cb
-SFX_TWO_PC_BEEPS                EQU $cc
-SFX_4_NOTE_DITTY                EQU $cd
-SFX_TWINKLE                     EQU $ce
-
-
-; header channels
-_4CH1 EQU $c0
-_3CH1 EQU $80
-_2CH1 EQU $40
-_1CH1 EQU $00
-_3CH2 EQU $81
-_2CH2 EQU $41
-_1CH2 EQU $01
-_2CH3 EQU $42
-_1CH3 EQU $02
-_1CH4 EQU $03
-
-_4CH5 EQU $c4
-_3CH5 EQU $84
-_2CH5 EQU $44
-_1CH5 EQU $04
-_3CH6 EQU $85
-_2CH6 EQU $45
-_1CH6 EQU $05
-_2CH7 EQU $46
-_1CH7 EQU $06
-_1CH8 EQU $07
-
-_CH2 EQU $01
-_CH3 EQU $02
-_CH4 EQU $03
-_CH5 EQU $04
-_CH6 EQU $05
-_CH7 EQU $06
-_CH8 EQU $07
-
-; note pitch
-NOTE_RST EQU $00
-NOTE_C EQU $10
-NOTE_C# EQU $20
-NOTE_D EQU $30
-NOTE_D# EQU $40
-NOTE_E EQU $50
-NOTE_F EQU $60
-NOTE_F# EQU $70
-NOTE_G EQU $80
-NOTE_G# EQU $90
-NOTE_A EQU $a0
-NOTE_A# EQU $b0
-NOTE_B EQU $c0
-
-; note duration (16ths)
-NOTE_1 EQU $00
-NOTE_2 EQU $01
-NOTE_3 EQU $02
-NOTE_4 EQU $03
-NOTE_5 EQU $04
-NOTE_6 EQU $05
-NOTE_7 EQU $06
-NOTE_8 EQU $07
-NOTE_9 EQU $08
-NOTE_10 EQU $09
-NOTE_11 EQU $0a
-NOTE_12 EQU $0b
-NOTE_13 EQU $0c
-NOTE_14 EQU $0d
-NOTE_15 EQU $0e
-NOTE_16 EQU $0f
--- a/pokemon_constants.asm
+++ /dev/null
@@ -1,253 +1,0 @@
-BULBASAUR  EQU 1
-IVYSAUR    EQU 2
-VENUSAUR   EQU 3
-CHARMANDER EQU 4
-CHARMELEON EQU 5
-CHARIZARD  EQU 6
-SQUIRTLE   EQU 7
-WARTORTLE  EQU 8
-BLASTOISE  EQU 9
-CATERPIE   EQU 10
-METAPOD    EQU 11
-BUTTERFREE EQU 12
-WEEDLE     EQU 13
-KAKUNA     EQU 14
-BEEDRILL   EQU 15
-PIDGEY     EQU 16
-PIDGEOTTO  EQU 17
-PIDGEOT    EQU 18
-RATTATA    EQU 19
-RATICATE   EQU 20
-SPEAROW    EQU 21
-FEAROW     EQU 22
-EKANS      EQU 23
-ARBOK      EQU 24
-PIKACHU    EQU 25
-RAICHU     EQU 26
-SANDSHREW  EQU 27
-SANDSLASH  EQU 28
-NIDORAN_F  EQU 29
-NIDORINA   EQU 30
-NIDOQUEEN  EQU 31
-NIDORAN_M  EQU 32
-NIDORINO   EQU 33
-NIDOKING   EQU 34
-CLEFAIRY   EQU 35
-CLEFABLE   EQU 36
-VULPIX     EQU 37
-NINETALES  EQU 38
-JIGGLYPUFF EQU 39
-WIGGLYTUFF EQU 40
-ZUBAT      EQU 41
-GOLBAT     EQU 42
-ODDISH     EQU 43
-GLOOM      EQU 44
-VILEPLUME  EQU 45
-PARAS      EQU 46
-PARASECT   EQU 47
-VENONAT    EQU 48
-VENOMOTH   EQU 49
-DIGLETT    EQU 50
-DUGTRIO    EQU 51
-MEOWTH     EQU 52
-PERSIAN    EQU 53
-PSYDUCK    EQU 54
-GOLDUCK    EQU 55
-MANKEY     EQU 56
-PRIMEAPE   EQU 57
-GROWLITHE  EQU 58
-ARCANINE   EQU 59
-POLIWAG    EQU 60
-POLIWHIRL  EQU 61
-POLIWRATH  EQU 62
-ABRA       EQU 63
-KADABRA    EQU 64
-ALAKAZAM   EQU 65
-MACHOP     EQU 66
-MACHOKE    EQU 67
-MACHAMP    EQU 68
-BELLSPROUT EQU 69
-WEEPINBELL EQU 70
-VICTREEBEL EQU 71
-TENTACOOL  EQU 72
-TENTACRUEL EQU 73
-GEODUDE    EQU 74
-GRAVELER   EQU 75
-GOLEM      EQU 76
-PONYTA     EQU 77
-RAPIDASH   EQU 78
-SLOWPOKE   EQU 79
-SLOWBRO    EQU 80
-MAGNEMITE  EQU 81
-MAGNETON   EQU 82
-FARFETCH_D EQU 83
-DODUO      EQU 84
-DODRIO     EQU 85
-SEEL       EQU 86
-DEWGONG    EQU 87
-GRIMER     EQU 88
-MUK        EQU 89
-SHELLDER   EQU 90
-CLOYSTER   EQU 91
-GASTLY     EQU 92
-HAUNTER    EQU 93
-GENGAR     EQU 94
-ONIX       EQU 95
-DROWZEE    EQU 96
-HYPNO      EQU 97
-KRABBY     EQU 98
-KINGLER    EQU 99
-VOLTORB    EQU 100
-ELECTRODE  EQU 101
-EXEGGCUTE  EQU 102
-EXEGGUTOR  EQU 103
-CUBONE     EQU 104
-MAROWAK    EQU 105
-HITMONLEE  EQU 106
-HITMONCHAN EQU 107
-LICKITUNG  EQU 108
-KOFFING    EQU 109
-WEEZING    EQU 110
-RHYHORN    EQU 111
-RHYDON     EQU 112
-CHANSEY    EQU 113
-TANGELA    EQU 114
-KANGASKHAN EQU 115
-HORSEA     EQU 116
-SEADRA     EQU 117
-GOLDEEN    EQU 118
-SEAKING    EQU 119
-STARYU     EQU 120
-STARMIE    EQU 121
-MR__MIME   EQU 122
-SCYTHER    EQU 123
-JYNX       EQU 124
-ELECTABUZZ EQU 125
-MAGMAR     EQU 126
-PINSIR     EQU 127
-TAUROS     EQU 128
-MAGIKARP   EQU 129
-GYARADOS   EQU 130
-LAPRAS     EQU 131
-DITTO      EQU 132
-EEVEE      EQU 133
-VAPOREON   EQU 134
-JOLTEON    EQU 135
-FLAREON    EQU 136
-PORYGON    EQU 137
-OMANYTE    EQU 138
-OMASTAR    EQU 139
-KABUTO     EQU 140
-KABUTOPS   EQU 141
-AERODACTYL EQU 142
-SNORLAX    EQU 143
-ARTICUNO   EQU 144
-ZAPDOS     EQU 145
-MOLTRES    EQU 146
-DRATINI    EQU 147
-DRAGONAIR  EQU 148
-DRAGONITE  EQU 149
-MEWTWO     EQU 150
-MEW        EQU 151
-CHIKORITA  EQU 152
-BAYLEEF    EQU 153
-MEGANIUM   EQU 154
-CYNDAQUIL  EQU 155
-QUILAVA    EQU 156
-TYPHLOSION EQU 157
-TOTODILE   EQU 158
-CROCONAW   EQU 159
-FERALIGATR EQU 160
-SENTRET    EQU 161
-FURRET     EQU 162
-HOOTHOOT   EQU 163
-NOCTOWL    EQU 164
-LEDYBA     EQU 165
-LEDIAN     EQU 166
-SPINARAK   EQU 167
-ARIADOS    EQU 168
-CROBAT     EQU 169
-CHINCHOU   EQU 170
-LANTURN    EQU 171
-PICHU      EQU 172
-CLEFFA     EQU 173
-IGGLYBUFF  EQU 174
-TOGEPI     EQU 175
-TOGETIC    EQU 176
-NATU       EQU 177
-XATU       EQU 178
-MAREEP     EQU 179
-FLAAFFY    EQU 180
-AMPHAROS   EQU 181
-BELLOSSOM  EQU 182
-MARILL     EQU 183
-AZUMARILL  EQU 184
-SUDOWOODO  EQU 185
-POLITOED   EQU 186
-HOPPIP     EQU 187
-SKIPLOOM   EQU 188
-JUMPLUFF   EQU 189
-AIPOM      EQU 190
-SUNKERN    EQU 191
-SUNFLORA   EQU 192
-YANMA      EQU 193
-WOOPER     EQU 194
-QUAGSIRE   EQU 195
-ESPEON     EQU 196
-UMBREON    EQU 197
-MURKROW    EQU 198
-SLOWKING   EQU 199
-MISDREAVUS EQU 200
-UNOWN      EQU 201
-WOBBUFFET  EQU 202
-GIRAFARIG  EQU 203
-PINECO     EQU 204
-FORRETRESS EQU 205
-DUNSPARCE  EQU 206
-GLIGAR     EQU 207
-STEELIX    EQU 208
-SNUBBULL   EQU 209
-GRANBULL   EQU 210
-QWILFISH   EQU 211
-SCIZOR     EQU 212
-SHUCKLE    EQU 213
-HERACROSS  EQU 214
-SNEASEL    EQU 215
-TEDDIURSA  EQU 216
-URSARING   EQU 217
-SLUGMA     EQU 218
-MAGCARGO   EQU 219
-SWINUB     EQU 220
-PILOSWINE  EQU 221
-CORSOLA    EQU 222
-REMORAID   EQU 223
-OCTILLERY  EQU 224
-DELIBIRD   EQU 225
-MANTINE    EQU 226
-SKARMORY   EQU 227
-HOUNDOUR   EQU 228
-HOUNDOOM   EQU 229
-KINGDRA    EQU 230
-PHANPY     EQU 231
-DONPHAN    EQU 232
-PORYGON2   EQU 233
-STANTLER   EQU 234
-SMEARGLE   EQU 235
-TYROGUE    EQU 236
-HITMONTOP  EQU 237
-SMOOCHUM   EQU 238
-ELEKID     EQU 239
-MAGBY      EQU 240
-MILTANK    EQU 241
-BLISSEY    EQU 242
-RAIKOU     EQU 243
-ENTEI      EQU 244
-SUICUNE    EQU 245
-LARVITAR   EQU 246
-PUPITAR    EQU 247
-TYRANITAR  EQU 248
-LUGIA      EQU 249
-HO_OH      EQU 250
-CELEBI     EQU 251
-
-EGG        EQU 253
--- a/script_constants.asm
+++ /dev/null
@@ -1,42 +1,0 @@
-; specials
-NUM_SPECIALS EQU $a8
-
-SPECIAL_UPDATESPRITETILES EQU $0038
-
-SPECIAL_WAITSFX           EQU $003b
-SPECIAL_BIKESURFMUSIC     EQU $003c
-
-SPECIAL_LOADFACESTEP      EQU $003f
-
-SPECIAL_GIVESHUCKLE       EQU $004b
-
-SPECIAL_SNORLAXAWAKE      EQU $0060
-
-SPECIAL_GAMEBOYCHECK      EQU $0066
-SPECIAL_TRAINERHOUSE      EQU $0067
-
-SPECIAL_RUSTLETREE        EQU $006a
-
-SPECIAL_ODDEGG            EQU $007d
-
-SPECIAL_MOVETUTOR         EQU $0083
-SPECIAL_OMANYTECHAMBER    EQU $0084
-
-SPECIAL_RUINCHAMBERWALL   EQU $0087
-
-SPECIAL_HOOHCHAMBER       EQU $008d
-
-SPECIAL_CELEBI            EQU $008f
-
-SPECIAL_AFTERCELEBI       EQU $0090
-SPECIAL_POKESEER          EQU $0091
-
-SPECIAL_DRATINI           EQU $0094
-
-SPECIAL_BEASTSCHECK       EQU $0096
-SPECIAL_MONCHECK          EQU $0097
-
-
-; script vars
-NUM_VARS EQU $1b
-VAR_MOVEMENT EQU $08
--- a/scripting.asm
+++ /dev/null
@@ -1,3127 +1,0 @@
-ScriptCommandTable: ; 0x96cb1
-	dw Script_2call
-	dw Script_3call
-	dw Script_2ptcall
-	dw Script_2jump
-	dw Script_3jump
-	dw Script_2ptjump
-	dw Script_if_equal
-	dw Script_if_not_equal
-	dw Script_iffalse
-	dw Script_iftrue
-	dw Script_if_less_than
-	dw Script_if_greater_than
-	dw Script_jumpstd
-	dw Script_callstd
-	dw Script_3callasm
-	dw Script_special
-	dw Script_2ptcallasm
-	dw Script_checkmaptriggers
-	dw Script_domaptrigger
-	dw Script_checktriggers
-	dw Script_dotrigger
-	dw Script_writebyte
-	dw Script_addvar
-	dw Script_random
-	dw Script_checkver
-	dw Script_copybytetovar
-	dw Script_copyvartobyte
-	dw Script_loadvar
-	dw Script_checkcode
-	dw Script_writevarcode
-	dw Script_writecode
-	dw Script_giveitem
-	dw Script_takeitem
-	dw Script_checkitem
-	dw Script_givemoney
-	dw Script_takemoney
-	dw Script_checkmoney
-	dw Script_givecoins
-	dw Script_takecoins
-	dw Script_checkcoins
-	dw Script_addcellnum
-	dw Script_delcellnum
-	dw Script_checkcellnum
-	dw Script_checktime
-	dw Script_checkpoke
-	dw Script_givepoke
-	dw Script_giveegg
-	dw Script_givepokeitem
-	dw Script_checkpokeitem
-	dw Script_checkbit1
-	dw Script_clearbit1
-	dw Script_setbit1
-	dw Script_checkbit2
-	dw Script_clearbit2
-	dw Script_setbit2
-	dw Script_wildoff
-	dw Script_wildon
-	dw Script_xycompare
-	dw Script_warpmod
-	dw Script_blackoutmod
-	dw Script_warp
-	dw Script_readmoney
-	dw Script_readcoins
-	dw Script_RAM2MEM
-	dw Script_pokenamemem
-	dw Script_itemtotext
-	dw Script_mapnametotext
-	dw Script_trainertotext
-	dw Script_stringtotext
-	dw Script_itemnotify
-	dw Script_pocketisfull
-	dw Script_loadfont
-	dw Script_refreshscreen
-	dw Script_loadmovesprites
-	dw Script_loadbytec1ce
-	dw Script_3writetext
-	dw Script_2writetext
-	dw Script_repeattext
-	dw Script_yesorno
-	dw Script_loadmenudata
-	dw Script_writebackup
-	dw Script_jumptextfaceplayer
-	dw Script_3jumptext
-	dw Script_jumptext
-	dw Script_closetext
-	dw Script_keeptextopen
-	dw Script_pokepic
-	dw Script_pokepicyesorno
-	dw Script_interpretmenu
-	dw Script_interpretmenu2
-	dw Script_loadpikachudata
-	dw Script_battlecheck
-	dw Script_loadtrainerdata
-	dw Script_loadpokedata
-	dw Script_loadtrainer
-	dw Script_startbattle
-	dw Script_returnafterbattle
-	dw Script_catchtutorial
-	dw Script_trainertext
-	dw Script_trainerstatus
-	dw Script_winlosstext
-	dw Script_scripttalkafter
-	dw Script_talkaftercancel
-	dw Script_talkaftercheck
-	dw Script_setlasttalked
-	dw Script_applymovement
-	dw Script_applymovement2
-	dw Script_faceplayer
-	dw Script_faceperson
-	dw Script_variablesprite
-	dw Script_disappear
-	dw Script_appear
-	dw Script_follow
-	dw Script_stopfollow
-	dw Script_moveperson
-	dw Script_writepersonxy
-	dw Script_loademote
-	dw Script_showemote
-	dw Script_spriteface
-	dw Script_follownotexact
-	dw Script_earthquake
-	dw Script_changemap
-	dw Script_changeblock
-	dw Script_reloadmap
-	dw Script_reloadmappart
-	dw Script_writecmdqueue
-	dw Script_delcmdqueue
-	dw Script_playmusic
-	dw Script_playrammusic
-	dw Script_musicfadeout
-	dw Script_playmapmusic
-	dw Script_reloadmapmusic
-	dw Script_cry
-	dw Script_playsound
-	dw Script_waitbutton
-	dw Script_warpsound
-	dw Script_specialsound
-	dw Script_passtoengine
-	dw Script_newloadmap
-	dw Script_pause
-	dw Script_deactivatefacing
-	dw Script_priorityjump
-	dw Script_warpcheck
-	dw Script_ptpriorityjump
-	dw Script_return
-	dw Script_end
-	dw Script_reloadandreturn
-	dw Script_resetfuncs
-	dw Script_pokemart
-	dw Script_elevator
-	dw Script_trade
-	dw Script_askforphonenumber
-	dw Script_phonecall
-	dw Script_hangup
-	dw Script_describedecoration
-	dw Script_fruittree
-	dw Script_specialphonecall
-	dw Script_checkphonecall
-	dw Script_verbosegiveitem
-	dw Script_verbosegiveitem2
-	dw Script_loadwilddata
-	dw Script_halloffame
-	dw Script_credits
-	dw Script_warpfacing
-	dw Script_storetext
-	dw Script_displaylocation
-	dw Script_unknown0xa6
-	dw Script_unknown0xa7
-	dw Script_unknown0xa8
-	dw Script_unknown0xa9
-; 0x96e05
-
-Unknown_0x96e05: ; 0x96e05
-    ld hl, $d434
-    set 2, [hl]
-    ret
-; 0x96e0b
-
-Unknown_0x96e0b: ; 0x96e0b
-    ld hl, $d434
-    bit 2, [hl]
-    ret
-; 0x96e11
-
-Unknown_0x96e11: ; 0x96e11
-    ld hl, $d434
-    res 2, [hl]
-    ret
-; 0x96e17
-
-Script_3callasm: ; 0x96e17
-; script command 0xe
-; parameters:
-;     asm (AsmPointerParam)
-
-	call GetScriptByte
-	ld b, a
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld a, b
-	rst $8
-	ret
-; 0x96e26
-
-Script_special: ; 0x96e26
-; script command 0xf
-; parameters:
-;     predefined_script (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld a, $3
-	ld hl, $401b
-	rst $8
-	ret
-; 0x96e35
-
-Script_2ptcallasm: ; 0x96e35
-; script command 0x10
-; parameters:
-;     asm (PointerToAsmPointerParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld b, [hl]
-	inc hl
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	ld a, b
-	rst $8
-	ret
-; 0x96e45
-
-Script_jumptextfaceplayer: ; 0x96e45
-; script command 0x51
-; parameters:
-;     text_pointer (RawTextPointerLabelParam)
-
-	ld a, [ScriptBank]
-	ld [$d44e], a
-	call GetScriptByte
-	ld [$d44f], a
-	call GetScriptByte
-	ld [$d450], a
-	ld b, $25
-	ld hl, $6e79
-	jp ScriptJump
-; 0x96e5f
-
-Script_jumptext: ; 0x96e5f
-; script command 0x53
-; parameters:
-;     text_pointer (RawTextPointerLabelParam)
-
-	ld a, [ScriptBank]
-	ld [$d44e], a
-	call GetScriptByte
-	ld [$d44f], a
-	call GetScriptByte
-	ld [$d450], a
-	ld b, $25
-	ld hl, $6e7a
-	jp ScriptJump
-; 0x96e79
-
-INCBIN "baserom.gbc",$96e79,$96e81 - $96e79
-
-Script_3jumptext: ; 0x96e81
-; script command 0x52
-; parameters:
-;     text_pointer (PointerLabelBeforeBank)
-
-	call GetScriptByte
-	ld [$d44e], a
-	call GetScriptByte
-	ld [$d44f], a
-	call GetScriptByte
-	ld [$d450], a
-	ld b, $25
-	ld hl, $6e7a
-	jp ScriptJump
-; 0x96e9b
-
-Script_2writetext: ; 0x96e9b
-; script command 0x4c
-; parameters:
-;     text_pointer (RawTextPointerLabelParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld a, [ScriptBank]
-	ld b, a
-	call $269a
-	ret
-; 0x96eab
-
-Script_3writetext: ; 0x96eab
-; script command 0x4b
-; parameters:
-;     text_pointer (PointerLabelBeforeBank)
-
-	call GetScriptByte
-	ld b, a
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	call $269a
-	ret
-; 0x96ebb
-
-Script_repeattext: ; 0x96ebb
-; script command 0x4d
-; parameters:
-;     byte (SingleByteParam)
-;     byte (SingleByteParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	cp $ff
-	jr nz, .asm_96ed8 ; 0x96ec5 $11
-	ld a, l
-	cp $ff
-	jr nz, .asm_96ed8 ; 0x96eca $c
-	ld hl, $d44e
-	ld a, [hli]
-	ld b, a
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	call $269a
-	ret
-.asm_96ed8
-	ret
-; 0x96ed9
-
-Script_closetext: ; 0x96ed9
-; script command 0x54
-
-	jp $0a46
-; 0x96edc
-
-Script_keeptextopen: ; 0x96edc
-; script command 0x55
-
-	ld a, [$ffd8]
-	push af
-	ld a, $1
-	ld [$ffd8], a
-	call $31f6
-	call $0aaf
-	pop af
-	ld [$ffd8], a
-	ret
-; 0x96eed
-
-Script_yesorno: ; 0x96eed
-; script command 0x4e
-
-	call $1dcf
-	ld a, $0
-	jr c, .asm_96ef6 ; 0x96ef2 $2
-	ld a, $1
-.asm_96ef6
-	ld [$c2dd], a
-	ret
-; 0x96efa
-
-Script_loadmenudata: ; 0x96efa
-; script command 0x4f
-; parameters:
-;     data (MenuDataPointerParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld de, $1d35
-	ld a, [ScriptBank]
-	call $26b7
-	call $1ad2
-	ret
-; 0x96f0f
-
-Script_writebackup: ; 0x96f0f
-; script command 0x50
-
-	call $1c17
-	call $1ad2
-	ret
-; 0x96f16
-
-Script_pokepic: ; 0x96f16
-; script command 0x56
-; parameters:
-;     pokemon (PokemonParam)
-
-	call GetScriptByte
-	and a
-	jr nz, .asm_96f1f ; 0x96f1a $3
-	ld a, [$c2dd]
-.asm_96f1f
-	ld [$d108], a
-	ld a, $9
-	ld hl, $44e3
-	rst $8
-	ret
-; 0x96f29
-
-Script_pokepicyesorno: ; 0x96f29
-; script command 0x57
-
-	ld a, $9
-	ld hl, $4528
-	rst $8
-	ret
-; 0x96f30
-
-Script_interpretmenu2: ; 0x96f30
-; script command 0x59
-
-	ld a, [ScriptBank]
-	ld hl, $1d81
-	rst $8
-	ld a, [$cfa9]
-	jr nc, .asm_96f3d ; 0x96f3a $1
-	xor a
-.asm_96f3d
-	ld [$c2dd], a
-	ret
-; 0x96f41
-
-Script_interpretmenu: ; 0x96f41
-; script command 0x58
-
-	ld a, [ScriptBank]
-	ld hl, $202a
-	rst $8
-	ld a, [$cf88]
-	jr nc, .asm_96f4e ; 0x96f4b $1
-	xor a
-.asm_96f4e
-	ld [$c2dd], a
-	ret
-; 0x96f52
-
-Script_storetext: ; 0x96f52
-; script command 0xa4
-; parameters:
-;     pointer (PointerLabelBeforeBank)
-;     memory (SingleByteParam)
-
-	call $106c
-	call GetScriptByte
-	ld c, a
-	ld a, $47
-	ld hl, $4000
-	rst $8
-	ret
-; 0x96f60
-
-Script_verbosegiveitem: ; 0x96f60
-; script command 0x9e
-; parameters:
-;     item (ItemLabelByte)
-;     quantity (DecimalParam)
-
-	call $77ca
-	call $7051
-	ld de, $d073
-	ld a, $1
-	call $76c8
-	ld b, $25
-	ld de, $6f77
-	jp $74cb
-; 0x96f76
-
-INCBIN "baserom.gbc",$96f76,$96f8e - $96f76
-
-Script_verbosegiveitem2: ; 0x96f8e
-; script command 0x9f
-; parameters:
-;     item (ItemLabelByte)
-;     var (SingleByteParam)
-
-	call GetScriptByte
-	cp $ff
-	jr nz, .asm_96f98 ; 0x96f93 $3
-	ld a, [$c2dd]
-.asm_96f98
-	ld [$d106], a
-	call GetScriptByte
-	call $769e
-	ld a, [de]
-	ld [$d10c], a
-	ld hl, $d892
-	call $2f66
-	ld a, $1
-	jr c, .asm_96fb0 ; 0x96fad $1
-	xor a
-.asm_96fb0
-	ld [$c2dd], a
-	call $7051
-	ld de, $d073
-	ld a, $1
-	call $76c8
-	ld b, $25
-	ld de, $6f77
-	jp $74cb
-; 0x96fc6
-
-Script_itemnotify: ; 0x96fc6
-; script command 0x45
-
-	call $6ffe
-	call $7051
-	ld b, $25
-	ld hl, $705b
-	call $269a
-	ret
-; 0x96fd5
-
-Script_pocketisfull: ; 0x96fd5
-; script command 0x46
-
-	call $6ffe
-	call $7051
-	ld b, $25
-	ld hl, $7060
-	call $269a
-	ret
-; 0x96fe4
-
-Script_specialsound: ; 0x96fe4
-; script command 0x88
-
-	ld a, $3
-	ld hl, $543d
-	rst $8
-	ld a, [$d142]
-	cp TM_HM
-	ld de, SFX_GET_TM
-	jr z, .play
-	ld de, SFX_ITEM
-.play
-	call StartSFX
-	call WaitSFX
-	ret
-; 0x96ffe
-
-INCBIN "baserom.gbc",$96ffe,$97065 - $96ffe
-
-Script_pokemart: ; 0x97065
-; script command 0x94
-; parameters:
-;     dialog_id (SingleByteParam)
-;     mart_id (MultiByteParam)
-
-	call GetScriptByte
-	ld c, a
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld a, [ScriptBank]
-	ld b, a
-	ld a, $5
-	ld hl, $5a45
-	rst $8
-	ret
-; 0x9707c
-
-Script_elevator: ; 0x9707c
-; script command 0x95
-; parameters:
-;     floor_list_pointer (PointerLabelParam)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld a, [ScriptBank]
-	ld b, a
-	ld a, $4
-	ld hl, $742d
-	rst $8
-	ret c
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x97099
-
-Script_trade: ; 0x97099
-; script command 0x96
-; parameters:
-;     trade_id (SingleByteParam)
-
-	call GetScriptByte
-	ld e, a
-	ld a, $3f
-	ld hl, $4ba8
-	rst $8
-	ret
-; 0x970a4
-
-Script_phonecall: ; 0x970a4
-; script command 0x98
-; parameters:
-;     caller_name (RawTextPointerLabelParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld a, [ScriptBank]
-	ld b, a
-	ld a, $24
-	ld hl, $429a
-	rst $8
-	ret
-; 0x970b7
-
-Script_hangup: ; 0x970b7
-; script command 0x99
-
-	ld a, $24
-	ld hl, $42eb
-	rst $8
-	ret
-; 0x970be
-
-Script_askforphonenumber: ; 0x970be
-; script command 0x97
-; parameters:
-;     number (SingleByteParam)
-
-	call $1dcf
-	jr c, .asm_970d6 ; 0x970c1 $13
-	call GetScriptByte
-	ld c, a
-	ld a, $24
-	ld hl, $4000
-	rst $8
-	jr c, .asm_970d2 ; 0x970cd $3
-	xor a
-	jr .asm_970db ; 0x970d0 $9
-.asm_970d2
-	ld a, $1
-	jr .asm_970db ; 0x970d4 $5
-.asm_970d6
-	call GetScriptByte
-	ld a, $2
-.asm_970db
-	ld [$c2dd], a
-	ret
-; 0x970df
-
-Script_describedecoration: ; 0x970df
-; script command 0x9a
-; parameters:
-;     byte (SingleByteParam)
-
-	call GetScriptByte
-	ld b, a
-	ld a, $9
-	ld hl, $6f59
-	rst $8
-	ld h, d
-	ld l, e
-	jp ScriptJump
-; 0x970ee
-
-Script_fruittree: ; 0x970ee
-; script command 0x9b
-; parameters:
-;     tree_id (SingleByteParam)
-
-	call GetScriptByte
-	ld [CurFruitTree], a
-	ld b, BANK(FruitTreeScript)
-	ld hl, FruitTreeScript
-	jp ScriptJump
-; 0x970fc
-
-Script_loadwilddata: ; 0x970fc
-; script command 0xa0
-; parameters:
-;     map_group (MapGroupParam)
-;     map_id (MapIdParam)
-
-	call GetScriptByte
-	ld c, a
-	call GetScriptByte
-	ld d, a
-	call GetScriptByte
-	ld e, a
-	ld a, $3
-	ld hl, $4403
-	rst $8
-	ret
-; 0x9710f
-
-Script_trainertext: ; 0x9710f
-; script command 0x62
-; parameters:
-;     which_text (SingleByteParam)
-
-	call GetScriptByte
-	ld c, a
-	ld b, $0
-	ld hl, $d045
-	add hl, bc
-	add hl, bc
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	ld a, [$d03e]
-	ld b, a
-	call $269a
-	ret
-; 0x97125
-
-Script_scripttalkafter: ; 0x97125
-; script command 0x65
-
-	ld hl, $d04b
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	ld a, [$d03e]
-	ld b, a
-	jp ScriptJump
-; 0x97132
-
-Script_trainerstatus: ; 0x97132
-; script command 0x63
-; parameters:
-;     action (SingleByteParam)
-
-	xor a
-	ld [$c2dd], a
-	ld hl, $d041
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	call GetScriptByte
-	ld b, a
-	call BitTable1Func
-	ld a, c
-	and a
-	ret z
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x9714c
-
-Script_winlosstext: ; 0x9714c
-; script command 0x64
-; parameters:
-;     win_text_pointer (TextPointerLabelParam)
-;     loss_text_pointer (TextPointerLabelParam)
-
-	ld hl, $d047
-	call GetScriptByte
-	ld [hli], a
-	call GetScriptByte
-	ld [hli], a
-	ld hl, $d049
-	call GetScriptByte
-	ld [hli], a
-	call GetScriptByte
-	ld [hli], a
-	ret
-; 0x97163
-
-Script_talkaftercancel: ; 0x97163
-; script command 0x66
-
-	ld a, [$d04d]
-	and a
-	ret z
-	jp $7b74
-; 0x9716b
-
-Script_talkaftercheck: ; 0x9716b
-; script command 0x67
-
-	ld a, $1
-	ld [$c2dd], a
-	ld a, [$d04d]
-	and a
-	ret nz
-	xor a
-	ld [$c2dd], a
-	ret
-; 0x9717a
-
-Script_playrammusic: ; 0x9717a
-; script command 0x80
-
-	ld a, [$d22f]
-	ld e, a
-	ld a, $3a
-	ld hl, $500a
-	rst $8
-	ret
-; 0x97185
-
-Script_playmapmusic: ; 0x97185
-; script command 0x82
-
-	call $3cdf
-	ret
-; 0x97189
-
-Script_playmusic: ; 0x97189
-; script command 0x7f
-; parameters:
-;     music_pointer (MultiByteParam)
-
-	ld de, $0000
-	call StartMusic
-	xor a
-	ld [$c2a7], a
-	call MaxVolume
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	call StartMusic
-	ret
-; 0x971a2
-
-Script_musicfadeout: ; 0x971a2
-; script command 0x81
-; parameters:
-;     music (MultiByteParam)
-;     fadetime (SingleByteParam)
-
-	call GetScriptByte
-	ld [$c2a9], a
-	call GetScriptByte
-	ld [$c2aa], a
-	call GetScriptByte
-	and $7f
-	ld [$c2a7], a
-	ret
-; 0x971b7
-
-Script_playsound: ; 0x971b7
-; script command 0x85
-; parameters:
-;     sound_pointer (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	call StartSFX
-	ret
-; 0x971c3
-
-Script_waitbutton: ; 0x971c3
-; script command 0x86
-
-	call WaitSFX
-	ret
-; 0x971c7
-
-Script_warpsound: ; 0x971c7
-; script command 0x87
-
-	ld a, $5
-	ld hl, $4a07
-	rst $8
-	call StartSFX
-	ret
-; 0x971d1
-
-Script_cry: ; 0x971d1
-; script command 0x84
-; parameters:
-;     cry_id (MultiByteParam)
-
-	call GetScriptByte
-	push af
-	call GetScriptByte
-	pop af
-	and a
-	jr nz, .asm_971df ; 0x971da $3
-	ld a, [$c2dd]
-.asm_971df
-	call $37ce
-	ret
-; 0x971e3
-
-Unknown_0x971e3: ; 0x971e3
-    and a
-    ret z
-    cp $fe
-    ret z
-    dec a
-    ret
-; 0x971ea
-
-Script_setlasttalked: ; 0x971ea
-; script command 0x68
-; parameters:
-;     person (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	ld [$ffe0], a
-	ret
-; 0x971f3
-
-Script_applymovement: ; 0x971f3
-; script command 0x69
-; parameters:
-;     person (SingleByteParam)
-;     data (MovementPointerLabelParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	ld c, a
-	push bc
-	ld a, c
-	ld a, $1
-	ld hl, $585c
-	rst $8
-	pop bc
-	push bc
-	call $7221
-	pop bc
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld a, [ScriptBank]
-	ld b, a
-	call $26c7
-	ret c
-	ld a, $2
-	ld [$d437], a
-	call Unknown_0x96e11
-	ret
-; 0x97221
-
-Unknown_0x97221: ; 0x97221
-    ld a, $1
-    ld hl, $5897
-    rst $8
-    ret
-; 0x97228
-
-Script_applymovement2: ; 0x97228
-; script command 0x6a
-; parameters:
-;     data (MovementPointerLabelParam)
-
-	ld a, [$ffe0]
-	ld c, a
-	jp $71fa
-; 0x9722e
-
-Script_faceplayer: ; 0x9722e
-; script command 0x6b
-
-	ld a, [$ffe0]
-	and a
-	ret z
-	ld d, $0
-	ld a, [$ffe0]
-	ld e, a
-	ld a, $2
-	ld hl, $4417
-	rst $8
-	ld a, d
-	add a
-	add a
-	ld e, a
-	ld a, [$ffe0]
-	ld d, a
-	call $728b
-	ret
-; 0x97248
-
-Script_faceperson: ; 0x97248
-; script command 0x6c
-; parameters:
-;     person1 (SingleByteParam)
-;     person2 (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	cp $fe
-	jr c, .asm_97254 ; 0x97250 $2
-	ld a, [$ffe0]
-.asm_97254
-	ld e, a
-	call GetScriptByte
-	call Unknown_0x971e3
-	cp $fe
-	jr nz, .asm_97261 ; 0x9725d $2
-	ld a, [$ffe0]
-.asm_97261
-	ld d, a
-	push de
-	ld a, $2
-	ld hl, $4417
-	rst $8
-	pop bc
-	ret c
-	ld a, d
-	add a
-	add a
-	ld e, a
-	ld d, c
-	call $728b
-	ret
-; 0x97274
-
-Script_spriteface: ; 0x97274
-; script command 0x76
-; parameters:
-;     person (SingleByteParam)
-;     facing (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	cp $fe
-	jr nz, .asm_97280 ; 0x9727c $2
-	ld a, [$ffe0]
-.asm_97280
-	ld d, a
-	call GetScriptByte
-	add a
-	add a
-	ld e, a
-	call $728b
-	ret
-; 0x9728b
-
-Unknown_0x9728b: ; 0x9728b
-    ld a, d
-    push de
-    call $18de
-    jr c, .asm_972b9 ; 0x97290 $27
-    ld hl, $0000
-    add hl, bc
-    ld a, [hl]
-    push bc
-    call $1836
-    pop bc
-    jr c, .asm_972b9 ; 0x9729c $1b
-    ld hl, $0004
-    add hl, bc
-    bit 2, [hl]
-    jr nz, .asm_972b9 ; 0x972a4 $13
-    pop de
-    ld a, e
-    call $1af8
-    ld hl, $d0ed
-    bit 6, [hl]
-    jr nz, .asm_972b5 ; 0x972b0 $3
-    call $72bc
-.asm_972b5
-    call $1ad2
-    ret
-.asm_972b9
-    pop de
-    scf
-    ret
-; 0x972bc
-
-Unknown_0x972bc: ; 0x972bc
-    call $217a
-    ld hl, $c4a0
-    ld bc, $0168
-.asm_972c5
-    res 7, [hl]
-    inc hl
-    dec bc
-    ld a, b
-    or c
-    jr nz, .asm_972c5 ; 0x972cb $f8
-    ret
-; 0x972ce
-
-Script_variablesprite: ; 0x972ce
-; script command 0x6d
-; parameters:
-;     byte (SingleByteParam)
-;     sprite (SingleByteParam)
-
-	call GetScriptByte
-	ld e, a
-	ld d, $0
-	ld hl, $d82e
-	add hl, de
-	call GetScriptByte
-	ld [hl], a
-	ret
-; 0x972dd
-
-Script_appear: ; 0x972dd
-; script command 0x6f
-; parameters:
-;     person (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	call $1956
-	ld a, [$ffaf]
-	ld b, $0
-	call $730b
-	ret
-; 0x972ee
-
-Script_disappear: ; 0x972ee
-; script command 0x6e
-; parameters:
-;     person (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	cp $fe
-	jr nz, .asm_972fa ; 0x972f6 $2
-	ld a, [$ffe0]
-.asm_972fa
-	call $199f
-	ld a, [$ffaf]
-	ld b, $1
-	call $730b
-	ld a, $1
-	ld hl, $5920
-	rst $8
-	ret
-; 0x9730b
-
-Unknown_0x9730b: ; 0x9730b
-    push bc
-    call $18d2
-    ld hl, $000c
-    add hl, bc
-    pop bc
-    ld e, [hl]
-    inc hl
-    ld d, [hl]
-    ld a, $ff
-    cp e
-    jr nz, .asm_97321 ; 0x9731a $5
-    cp d
-    jr nz, .asm_97321 ; 0x9731d $2
-    xor a
-    ret
-.asm_97321
-    call BitTable1Func
-    ret
-; 0x97325
-
-Script_follow: ; 0x97325
-; script command 0x70
-; parameters:
-;     person2 (SingleByteParam)
-;     person1 (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	ld b, a
-	call GetScriptByte
-	call Unknown_0x971e3
-	ld c, a
-	ld a, $1
-	ld hl, $5803
-	rst $8
-	ret
-; 0x9733a
-
-Script_stopfollow: ; 0x9733a
-; script command 0x71
-
-	ld a, $1
-	ld hl, $581f
-	rst $8
-	ret
-; 0x97341
-
-Script_moveperson: ; 0x97341
-; script command 0x72
-; parameters:
-;     person (SingleByteParam)
-;     x (SingleByteParam)
-;     y (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	ld b, a
-	call GetScriptByte
-	add $4
-	ld d, a
-	call GetScriptByte
-	add $4
-	ld e, a
-	ld a, $2
-	ld hl, $407e
-	rst $8
-	ret
-; 0x9735b
-
-Script_writepersonxy: ; 0x9735b
-; script command 0x73
-; parameters:
-;     person (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	cp $fe
-	jr nz, .asm_97367 ; 0x97363 $2
-	ld a, [$ffe0]
-.asm_97367
-	ld b, a
-	ld a, $2
-	ld hl, $40a1
-	rst $8
-	ret
-; 0x9736f
-
-Script_follownotexact: ; 0x9736f
-; script command 0x77
-; parameters:
-;     person2 (SingleByteParam)
-;     person1 (SingleByteParam)
-
-	call GetScriptByte
-	call Unknown_0x971e3
-	ld b, a
-	call GetScriptByte
-	call Unknown_0x971e3
-	ld c, a
-	ld a, $2
-	ld hl, $439e
-	rst $8
-	ret
-; 0x97384
-
-Script_loademote: ; 0x97384
-; script command 0x74
-; parameters:
-;     bubble (SingleByteParam)
-
-	call GetScriptByte
-	cp $ff
-	jr nz, .asm_9738e ; 0x97389 $3
-	ld a, [$c2dd]
-.asm_9738e
-	ld c, a
-	ld a, $5
-	ld hl, $442f
-	rst $8
-	ret
-; 0x97396
-
-Script_showemote: ; 0x97396
-; script command 0x75
-; parameters:
-;     bubble (SingleByteParam)
-;     person (SingleByteParam)
-;     time (DecimalParam)
-
-	call GetScriptByte
-	ld [$c2dd], a
-	call GetScriptByte
-	call Unknown_0x971e3
-	cp $fe
-	jr z, .asm_973a8 ; 0x973a4 $2
-	ld [$ffe0], a
-.asm_973a8
-	call GetScriptByte
-	ld [$d44d], a
-	ld b, $25
-	ld de, $73b6
-	jp $74cb
-; 0x973b6
-
-INCBIN "baserom.gbc",$973b6,$973c7 - $973b6
-
-Script_earthquake: ; 0x973c7
-; script command 0x78
-; parameters:
-;     param (DecimalParam)
-
-	ld hl, $73eb
-	ld de, $d002
-	ld bc, $0005
-	call CopyBytes
-	call GetScriptByte
-	ld [$d003], a
-	and $3f
-	ld [$d005], a
-	ld b, $25
-	ld de, $73e6
-	jp $74cb
-; 0x973e6
-
-INCBIN "baserom.gbc",$973e6,$973f0 - $973e6
-
-Script_loadpikachudata: ; 0x973f0
-; script command 0x5a
-
-	ld a, $19
-	ld [$d22e], a
-	ld a, $5
-	ld [$d143], a
-	ret
-; 0x973fb
-
-Script_battlecheck: ; 0x973fb
-; script command 0x5b
-
-	xor a
-	ld [$d459], a
-	ret
-; 0x97400
-
-Script_loadtrainerdata: ; 0x97400
-; script command 0x5c
-
-	ld a, $81
-	ld [$d459], a
-	ld a, [$d043]
-	ld [$d22f], a
-	ld a, [$d044]
-	ld [$d231], a
-	ret
-; 0x97412
-
-Script_loadpokedata: ; 0x97412
-; script command 0x5d
-; parameters:
-;     pokemon (PokemonParam)
-;     level (DecimalParam)
-
-	ld a, $80
-	ld [$d459], a
-	call GetScriptByte
-	ld [$d22e], a
-	call GetScriptByte
-	ld [$d143], a
-	ret
-; 0x97424
-
-Script_loadtrainer: ; 0x97424
-; script command 0x5e
-; parameters:
-;     trainer_group (TrainerGroupParam)
-;     trainer_id (TrainerIdParam)
-
-	ld a, $81
-	ld [$d459], a
-	call GetScriptByte
-	ld [$d22f], a
-	call GetScriptByte
-	ld [$d231], a
-	ret
-; 0x97436
-
-Script_startbattle: ; 0x97436
-; script command 0x5f
-
-	call $2879
-	ld a, $16
-	call $2d83
-	ld a, [$d0ee]
-	and $3f
-	ld [$c2dd], a
-	ret
-; 0x97447
-
-Script_catchtutorial: ; 0x97447
-; script command 0x61
-; parameters:
-;     byte (SingleByteParam)
-
-	call GetScriptByte
-	ld [$d230], a
-	call $2879
-	ld a, $13
-	ld hl, $6554
-	rst $8
-	jp $7491
-; 0x97459
-
-Script_returnafterbattle: ; 0x97459
-; script command 0x60
-
-	ld hl, $d459
-	ld d, [hl]
-	ld [hl], $0
-	ld a, [$d0ee]
-	and $3f
-	cp $1
-	jr nz, .asm_97470 ; 0x97466 $8
-	ld b, $4
-	ld hl, $64c1
-	jp ScriptJump
-.asm_97470
-	bit 0, d
-	jr z, .asm_9747c ; 0x97472 $8
-	ld a, $3f
-	ld hl, $4fec
-	rst $8
-	jr .asm_9748e ; 0x9747a $12
-.asm_9747c
-	ld a, [$d0ee]
-	bit 7, a
-	jr z, .asm_9748e ; 0x97481 $b
-	ld b, $24
-	ld de, $4255
-	ld a, $25
-	ld hl, $7c4f
-	rst $8
-.asm_9748e
-	jp $7491
-; 0x97491
-
-Script_reloadmap: ; 0x97491
-; script command 0x7b
-
-	xor a
-	ld [$d459], a
-	ld a, $f3
-	ld [$ff9f], a
-	ld a, $1
-	call $261b
-	call Unknown_0x96e11
-	ret
-; 0x974a2
-
-Script_2call: ; 0x974a2
-; script command 0x0
-; parameters:
-;     pointer (ScriptPointerLabelParam)
-
-	ld a, [ScriptBank]
-	ld b, a
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	jr ScriptCall
-; 0x974b0
-
-Script_3call: ; 0x974b0
-; script command 0x1
-; parameters:
-;     pointer (ScriptPointerLabelBeforeBank)
-
-	call GetScriptByte
-	ld b, a
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	jr ScriptCall
-; 0x974be
-
-Script_2ptcall: ; 0x974be
-; script command 0x2
-; parameters:
-;     pointer (PointerLabelToScriptPointer)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld b, [hl]
-	inc hl
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	; fallthrough
-
-ScriptCall: ; 0x974cb
-	push de
-	ld hl, $d43c
-	ld e, [hl]
-	inc [hl]
-	ld d, $0
-	ld hl, $d43d
-	add hl, de
-	add hl, de
-	add hl, de
-	pop de
-	ld a, [ScriptBank]
-	ld [hli], a
-	ld a, [ScriptPos]
-	ld [hli], a
-	ld a, [ScriptPos + 1]
-	ld [hl], a
-	ld a, b
-	ld [ScriptBank], a
-	ld a, e
-	ld [ScriptPos], a
-	ld a, d
-	ld [ScriptPos + 1], a
-	ret
-; 0x974f3
-
-Unknown_0x974f3: ; 0x974f3
-    ld a, [ScriptBank]
-    or $80
-    ld [ScriptBank], a
-    jp $74cb
-; 0x974fe
-
-Script_2jump: ; 0x974fe
-; script command 0x3
-; parameters:
-;     pointer (ScriptPointerLabelParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld a, [ScriptBank]
-	ld b, a
-	jp ScriptJump
-; 0x9750d
-
-Script_3jump: ; 0x9750d
-; script command 0x4
-; parameters:
-;     pointer (ScriptPointerLabelBeforeBank)
-
-	call GetScriptByte
-	ld b, a
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	jp ScriptJump
-; 0x9751c
-
-Script_2ptjump: ; 0x9751c
-; script command 0x5
-; parameters:
-;     pointer (PointerLabelToScriptPointer)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld b, [hl]
-	inc hl
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	jp ScriptJump
-; 0x9752c
-
-Script_iffalse: ; 0x9752c
-; script command 0x8
-; parameters:
-;     pointer (ScriptPointerLabelParam)
-
-	ld a, [$c2dd]
-	and a
-	jp nz, $7596
-	jp Script_2jump
-; 0x97536
-
-Script_iftrue: ; 0x97536
-; script command 0x9
-; parameters:
-;     pointer (ScriptPointerLabelParam)
-
-	ld a, [$c2dd]
-	and a
-	jp nz, Script_2jump
-	jp $7596
-; 0x97540
-
-Script_if_equal: ; 0x97540
-; script command 0x6
-; parameters:
-;     byte (SingleByteParam)
-;     pointer (ScriptPointerLabelParam)
-
-	call GetScriptByte
-	ld hl, $c2dd
-	cp [hl]
-	jr z, Script_2jump ; 0x97547 $b5
-	jr Unknown_97596 ; 0x97549 $4b
-; 0x9754b
-
-Script_if_not_equal: ; 0x9754b
-; script command 0x7
-; parameters:
-;     byte (SingleByteParam)
-;     pointer (ScriptPointerLabelParam)
-
-	call GetScriptByte
-	ld hl, $c2dd
-	cp [hl]
-	jr nz, Script_2jump ; 0x97552 $aa
-	jr Unknown_97596 ; 0x97554 $40
-; 0x97556
-
-Script_if_less_than: ; 0x97556
-; script command 0xa
-; parameters:
-;     byte (SingleByteParam)
-;     pointer (ScriptPointerLabelParam)
-
-	ld a, [$c2dd]
-	ld b, a
-	call GetScriptByte
-	cp b
-	jr c, Script_2jump ; 0x9755e $9e
-	jr Unknown_97596 ; 0x97560 $34
-; 0x97562
-
-Script_if_greater_than: ; 0x97562
-; script command 0xb
-; parameters:
-;     byte (SingleByteParam)
-;     pointer (ScriptPointerLabelParam)
-
-	call GetScriptByte
-	ld b, a
-	ld a, [$c2dd]
-	cp b
-	jr c, Script_2jump ; 0x9756a $92
-	jr Unknown_97596 ; 0x9756c $28
-; 0x9756e
-
-Script_jumpstd: ; 0x9756e
-; script command 0xc
-; parameters:
-;     predefined_script (MultiByteParam)
-
-	call $757b
-	jr ScriptJump ; 0x97571 $2a
-; 0x97573
-
-Script_callstd: ; 0x97573
-; script command 0xd
-; parameters:
-;     predefined_script (MultiByteParam)
-
-	call $757b
-	ld d, h
-	ld e, l
-	jp $74cb
-; 0x9757b
-
-Unknown_0x9757b: ; 0x9757b
-    call GetScriptByte
-    ld e, a
-    call GetScriptByte
-    ld d, a
-    ld hl, $4000
-    add hl, de
-    add hl, de
-    add hl, de
-    ld a, $2f
-    call GetFarByte
-    ld b, a
-    inc hl
-    ld a, $2f
-    call GetFarHalfword
-    ret
-; 0x97596
-
-Unknown_97596: ; 0x97596
-	call GetScriptByte
-	call GetScriptByte
-	ret
-; 0x9759d
-
-ScriptJump: ; 0x9759d
-	ld a, b
-	ld [ScriptBank], a
-	ld a, l
-	ld [ScriptPos], a
-	ld a, h
-	ld [ScriptPos + 1], a
-	ret
-; 0x975aa
-
-Script_priorityjump: ; 0x975aa
-; script command 0x8d
-; parameters:
-;     pointer (ScriptPointerLabelParam)
-
-	ld a, [ScriptBank]
-	ld [$d44e], a
-	call GetScriptByte
-	ld [$d44f], a
-	call GetScriptByte
-	ld [$d450], a
-	ld hl, $d434
-	set 3, [hl]
-	ret
-; 0x975c2
-
-Script_checktriggers: ; 0x975c2
-; script command 0x13
-
-	call $211b
-	jr z, .asm_975cb ; 0x975c5 $4
-	ld [$c2dd], a
-	ret
-.asm_975cb
-	ld a, $ff
-	ld [$c2dd], a
-	ret
-; 0x975d1
-
-Script_checkmaptriggers: ; 0x975d1
-; script command 0x11
-; parameters:
-;     map_group (SingleByteParam)
-;     map_id (SingleByteParam)
-
-	call GetScriptByte
-	ld b, a
-	call GetScriptByte
-	ld c, a
-	call $2147
-	ld a, d
-	or e
-	jr z, .asm_975e5 ; 0x975de $5
-	ld a, [de]
-	ld [$c2dd], a
-	ret
-.asm_975e5
-	ld a, $ff
-	ld [$c2dd], a
-	ret
-; 0x975eb
-
-Script_dotrigger: ; 0x975eb
-; script command 0x14
-; parameters:
-;     trigger_id (SingleByteParam)
-
-	ld a, [$dcb5]
-	ld b, a
-	ld a, [$dcb6]
-	ld c, a
-	jr Unknown_975fd ; 0x975f3 $8
-; 0x975f5
-
-Script_domaptrigger: ; 0x975f5
-; script command 0x12
-; parameters:
-;     map_group (MapGroupParam)
-;     map_id (MapIdParam)
-;     trigger_id (SingleByteParam)
-
-	call GetScriptByte
-	ld b, a
-	call GetScriptByte
-	ld c, a
-	; fallthrough
-
-Unknown_975fd: ; 0x975fd
-	call $2147
-	ld a, d
-	or e
-	jr z, .asm_97608 ; 0x97602 $4
-	call GetScriptByte
-	ld [de], a
-.asm_97608
-	ret
-; 0x97609
-
-Script_copybytetovar: ; 0x97609
-; script command 0x19
-; parameters:
-;     address (RAMAddressParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld a, [hl]
-	ld [$c2dd], a
-	ret
-; 0x97616
-
-Script_copyvartobyte: ; 0x97616
-; script command 0x1a
-; parameters:
-;     address (RAMAddressParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld a, [$c2dd]
-	ld [hl], a
-	ret
-; 0x97623
-
-Script_loadvar: ; 0x97623
-; script command 0x1b
-; parameters:
-;     address (RAMAddressParam)
-;     value (SingleByteParam)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	call GetScriptByte
-	ld [hl], a
-	ret
-; 0x97630
-
-Script_writebyte: ; 0x97630
-; script command 0x15
-; parameters:
-;     value (SingleByteParam)
-
-	call GetScriptByte
-	ld [$c2dd], a
-	ret
-; 0x97637
-
-Script_addvar: ; 0x97637
-; script command 0x16
-; parameters:
-;     value (SingleByteParam)
-
-	call GetScriptByte
-	ld hl, $c2dd
-	add [hl]
-	ld [hl], a
-	ret
-; 0x97640
-
-Script_random: ; 0x97640
-; script command 0x17
-; parameters:
-;     input (SingleByteParam)
-
-	call GetScriptByte
-	ld [$c2dd], a
-	and a
-	ret z
-	ld c, a
-	call $7673
-	and a
-	jr z, .asm_9765f ; 0x9764d $10
-	ld b, a
-	xor a
-	sub b
-	ld b, a
-.asm_97653
-	push bc
-	call $2f8c
-	pop bc
-	ld a, [$ffe1]
-	cp b
-	jr nc, .asm_97653 ; 0x9765b $f6
-	jr .asm_97666 ; 0x9765d $7
-.asm_9765f
-	push bc
-	call $2f8c
-	pop bc
-	ld a, [$ffe1]
-.asm_97666
-	push af
-	ld a, [$c2dd]
-	ld c, a
-	pop af
-	call $3110
-	ld [$c2dd], a
-	ret
-; 0x97673
-
-Unknown_0x97673: ; 0x97673
-    xor a
-    ld b, a
-    sub c
-.asm_97676
-    inc b
-    sub c
-    jr nc, .asm_97676 ; 0x97678 $fc
-    dec b
-    add c
-    ret
-; 0x9767d
-
-Script_checkcode: ; 0x9767d
-; script command 0x1c
-; parameters:
-;     variable_id (SingleByteParam)
-
-	call GetScriptByte
-	call $769e
-	ld a, [de]
-	ld [$c2dd], a
-	ret
-; 0x97688
-
-Script_writevarcode: ; 0x97688
-; script command 0x1d
-; parameters:
-;     variable_id (SingleByteParam)
-
-	call GetScriptByte
-	call $769e
-	ld a, [$c2dd]
-	ld [de], a
-	ret
-; 0x97693
-
-Script_writecode: ; 0x97693
-; script command 0x1e
-; parameters:
-;     variable_id (SingleByteParam)
-;     value (SingleByteParam)
-
-	call GetScriptByte
-	call $769e
-	call GetScriptByte
-	ld [de], a
-	ret
-; 0x9769e
-
-Unknown_0x9769e: ; 0x9769e
-    ld c, a
-    ld a, $20
-    ld hl, $4648
-    rst $8
-    ret
-; 0x976a6
-
-Script_checkver: ; 0x976a6
-; script command 0x18
-
-	ld a, [$76ad]
-	ld [$c2dd], a
-	ret
-; 0x976ad
-
-INCBIN "baserom.gbc",$976ad,$976ae - $976ad
-
-Script_pokenamemem: ; 0x976ae
-; script command 0x40
-; parameters:
-;     pokemon (PokemonParam)
-;     memory (SingleByteParam)
-
-	call GetScriptByte
-	and a
-	jr nz, .asm_976b7 ; 0x976b2 $3
-	ld a, [$c2dd]
-.asm_976b7
-	ld [$d265], a
-	call $343b
-	ld de, $d073
-
-Unknown_976c0: ; 0x976c0
-	call GetScriptByte
-	cp $3
-	jr c, .asm_976c8 ; 0x976c5 $1
-	xor a
-.asm_976c8
-	ld hl, $d099
-	ld bc, $0013
-	call AddNTimes
-	call CopyName2
-	ret
-; 0x976d5
-
-Script_itemtotext: ; 0x976d5
-; script command 0x41
-; parameters:
-;     item (ItemLabelByte)
-;     memory (SingleByteParam)
-
-	call GetScriptByte
-	and a
-	jr nz, .asm_976de ; 0x976d9 $3
-	ld a, [$c2dd]
-.asm_976de
-	ld [$d265], a
-	call GetItemName
-	ld de, $d073
-	jr Unknown_976c0 ; 0x976e7 $d7
-; 0x976e9
-
-Script_mapnametotext: ; 0x976e9
-; script command 0x42
-; parameters:
-;     memory (SingleByteParam)
-
-	ld a, [$dcb5]
-	ld b, a
-	ld a, [$dcb6]
-	ld c, a
-	call GetWorldMapLocation
-
-Unknown_976f4: ; 0x976f4
-	ld e, a
-	ld a, $72
-	ld hl, $68a5
-	rst $8
-	ld de, $d073
-	jp $76c0
-; 0x97701
-
-Script_displaylocation: ; 0x97701
-; script command 0xa5
-; parameters:
-;     id (SingleByteParam)
-
-	call GetScriptByte
-	jr Unknown_976f4 ; 0x97704 $ee
-; 0x97706
-
-Script_trainertotext: ; 0x97706
-; script command 0x43
-; parameters:
-;     trainer_id (TrainerGroupParam)
-;     trainer_group (TrainerIdParam)
-;     memory (SingleByteParam)
-
-	call GetScriptByte
-	ld c, a
-	call GetScriptByte
-	ld b, a
-	ld a, $e
-	ld hl, $594c
-	rst $8
-	jr Unknown_976c0 ; 0x97714 $aa
-; 0x97716
-
-Script_unknown0xa7: ; 0x97716
-; script command 0xa7
-
-	call GetScriptByte
-	ld [$cf61], a
-
-Unknown_9771c: ; 0x9771c
-	call GetScriptByte
-	ld [$cf60], a
-	call GetName
-	ld de, $d073
-	jp $76c0
-; 0x9772b
-
-Script_unknown0xa6: ; 0x9772b
-; script command 0xa6
-
-	ld a, $7
-	ld [$cf61], a
-	jr Unknown_9771c ; 0x97730 $ea
-; 0x97732
-
-Script_readmoney: ; 0x97732
-; script command 0x3d
-; parameters:
-;     account (SingleByteParam)
-;     memory (SingleByteParam)
-
-	call $7771
-	call $7861
-	ld hl, $d073
-	ld bc, $4306
-	call $3198
-	ld de, $d073
-	jp $76c0
-; 0x97747
-
-Script_readcoins: ; 0x97747
-; script command 0x3e
-; parameters:
-;     memory (SingleByteParam)
-
-	call $7771
-	ld hl, $d073
-	ld de, $d855
-	ld bc, $4206
-	call $3198
-	ld de, $d073
-	jp $76c0
-; 0x9775c
-
-Script_RAM2MEM: ; 0x9775c
-; script command 0x3f
-; parameters:
-;     memory (SingleByteParam)
-
-	call $7771
-	ld de, $c2dd
-	ld hl, $d073
-	ld bc, $4103
-	call $3198
-	ld de, $d073
-	jp $76c0
-; 0x97771
-
-Unknown_0x97771: ; 0x97771
-    ld hl, $d073
-    ld bc, $000b
-    ld a, $50
-    call ByteFill
-    ret
-; 0x9777d
-
-Script_stringtotext: ; 0x9777d
-; script command 0x44
-; parameters:
-;     text_pointer (EncodedTextLabelParam)
-;     memory (SingleByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld a, [ScriptBank]
-	ld hl, $30d6
-	rst $8
-	ld de, $d086
-	jp $76c0
-; 0x97792
-
-Script_givepokeitem: ; 0x97792
-; script command 0x2f
-; parameters:
-;     pointer (PointerParamToItemAndLetter)
-
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	ld a, [ScriptBank]
-	call GetFarByte
-	ld b, a
-	push bc
-	inc hl
-	ld bc, $0020
-	ld de, $d002
-	ld a, [ScriptBank]
-	call FarCopyBytes
-	pop bc
-	ld a, $11
-	ld hl, $46cc
-	rst $8
-	ret
-; 0x977b7
-
-Script_checkpokeitem: ; 0x977b7
-; script command 0x30
-; parameters:
-;     pointer (PointerParamToItemAndLetter)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld a, [ScriptBank]
-	ld b, a
-	ld a, $11
-	ld hl, $4654
-	rst $8
-	ret
-; 0x977ca
-
-Script_giveitem: ; 0x977ca
-; script command 0x1f
-; parameters:
-;     item (ItemLabelByte)
-;     quantity (SingleByteParam)
-
-	call GetScriptByte
-	cp $ff
-	jr nz, .asm_977d4 ; 0x977cf $3
-	ld a, [$c2dd]
-.asm_977d4
-	ld [$d106], a
-	call GetScriptByte
-	ld [$d10c], a
-	ld hl, $d892
-	call $2f66
-	jr nc, .asm_977eb ; 0x977e3 $6
-	ld a, $1
-	ld [$c2dd], a
-	ret
-.asm_977eb
-	xor a
-	ld [$c2dd], a
-	ret
-; 0x977f0
-
-Script_takeitem: ; 0x977f0
-; script command 0x20
-; parameters:
-;     item (ItemLabelByte)
-;     quantity (DecimalParam)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld [$d106], a
-	call GetScriptByte
-	ld [$d10c], a
-	ld a, $ff
-	ld [$d107], a
-	ld hl, $d892
-	call $2f53
-	ret nc
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x97812
-
-Script_checkitem: ; 0x97812
-; script command 0x21
-; parameters:
-;     item (ItemLabelByte)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld [$d106], a
-	ld hl, $d892
-	call $2f79
-	ret nc
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x97829
-
-Script_givemoney: ; 0x97829
-; script command 0x22
-; parameters:
-;     account (SingleByteParam)
-;     money (MoneyByteParam)
-
-	call $7861
-	call $786d
-	ld a, $5
-	ld hl, $5fd7
-	rst $8
-	ret
-; 0x97836
-
-Script_takemoney: ; 0x97836
-; script command 0x23
-; parameters:
-;     account (SingleByteParam)
-;     money (MoneyByteParam)
-
-	call $7861
-	call $786d
-	ld a, $5
-	ld hl, $5ffa
-	rst $8
-	ret
-; 0x97843
-
-Script_checkmoney: ; 0x97843
-; script command 0x24
-; parameters:
-;     account (SingleByteParam)
-;     money (MoneyByteParam)
-
-	call $7861
-	call $786d
-	ld a, $5
-	ld hl, $600b
-	rst $8
-; 0x9784f
-
-Unknown_9784f: ; 0x9784f
-	jr c, .asm_9785b ; 0x9784f $a
-	jr z, .asm_97857 ; 0x97851 $4
-	ld a, $0
-	jr .asm_9785d ; 0x97855 $6
-.asm_97857
-	ld a, $1
-	jr .asm_9785d ; 0x97859 $2
-.asm_9785b
-	ld a, $2
-.asm_9785d
-	ld [$c2dd], a
-	ret
-; 0x97861
-
-Unknown_0x97861: ; 0x97861
-    call GetScriptByte
-    and a
-    ld de, $d84e
-    ret z
-    ld de, $d851
-    ret
-; 0x9786d
-
-Unknown_0x9786d: ; 0x9786d
-    ld bc, $ffc3
-    push bc
-    call GetScriptByte
-    ld [bc], a
-    inc bc
-    call GetScriptByte
-    ld [bc], a
-    inc bc
-    call GetScriptByte
-    ld [bc], a
-    pop bc
-    ret
-; 0x97881
-
-Script_givecoins: ; 0x97881
-; script command 0x25
-; parameters:
-;     coins (CoinByteParam)
-
-	call $78a0
-	ld a, $5
-	ld hl, $606f
-	rst $8
-	ret
-; 0x9788b
-
-Script_takecoins: ; 0x9788b
-; script command 0x26
-; parameters:
-;     coins (CoinByteParam)
-
-	call $78a0
-	ld a, $5
-	ld hl, $608f
-	rst $8
-	ret
-; 0x97895
-
-Script_checkcoins: ; 0x97895
-; script command 0x27
-; parameters:
-;     coins (CoinByteParam)
-
-	call $78a0
-	ld a, $5
-	ld hl, $60a1
-	rst $8
-	jr Unknown_9784f ; 0x9789e $af
-	call GetScriptByte
-	ld [$ffc4], a
-	call GetScriptByte
-	ld [$ffc3], a
-	ld bc, $ffc3
-	ret
-; 0x978ae
-
-Script_checktime: ; 0x978ae
-; script command 0x2b
-; parameters:
-;     time (SingleByteParam)
-
-	xor a
-	ld [$c2dd], a
-	ld a, $3
-	ld hl, $4000
-	rst $8
-	call GetScriptByte
-	and c
-	ret z
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x978c3
-
-Script_checkpoke: ; 0x978c3
-; script command 0x2c
-; parameters:
-;     pkmn (PokemonParam)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld hl, $dcd8
-	ld de, $0001
-	call IsInArray
-	ret nc
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x978da
-
-Script_addcellnum: ; 0x978da
-; script command 0x28
-; parameters:
-;     person (SingleByteParam)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld c, a
-	ld a, $24
-	ld hl, $4000
-	rst $8
-	ret nc
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x978ef
-
-Script_delcellnum: ; 0x978ef
-; script command 0x29
-; parameters:
-;     person (SingleByteParam)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld c, a
-	ld a, $24
-	ld hl, $400f
-	rst $8
-	ret nc
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x97904
-
-Script_checkcellnum: ; 0x97904
-; script command 0x2a
-; parameters:
-;     person (SingleByteParam)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld c, a
-	ld a, $24
-	ld hl, $4019
-	rst $8
-	ret nc
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x97919
-
-Script_specialphonecall: ; 0x97919
-; script command 0x9c
-; parameters:
-;     call_id (MultiByteParam)
-
-	call GetScriptByte
-	ld [$dc31], a
-	call GetScriptByte
-	ld [$dc32], a
-	ret
-; 0x97926
-
-Script_checkphonecall: ; 0x97926
-; script command 0x9d
-
-	ld a, [$dc31]
-	and a
-	jr z, .asm_9792e ; 0x9792a $2
-	ld a, $1
-.asm_9792e
-	ld [$c2dd], a
-	ret
-; 0x97932
-
-Script_givepoke: ; 0x97932
-; script command 0x2d
-; parameters:
-;     pokemon (PokemonParam)
-;     level (DecimalParam)
-;     item (ItemLabelByte)
-;     trainer (DecimalParam)
-;     trainer_name_pointer (MultiByteParam)
-;     pkmn_nickname (MultiByteParam)
-
-	call GetScriptByte
-	ld [$d108], a
-	call GetScriptByte
-	ld [$d143], a
-	call GetScriptByte
-	ld [$d106], a
-	call GetScriptByte
-	and a
-	ld b, a
-	jr z, .asm_9795d ; 0x97949 $12
-	ld hl, ScriptPos
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	call GetScriptByte
-	call GetScriptByte
-	call GetScriptByte
-	call GetScriptByte
-.asm_9795d
-	ld a, $3
-	ld hl, $6277
-	rst $8
-	ld a, b
-	ld [$c2dd], a
-	ret
-; 0x97968
-
-Script_giveegg: ; 0x97968
-; script command 0x2e
-; parameters:
-;     pkmn (PokemonParam)
-;     level (DecimalParam)
-
-	xor a
-	ld [$c2dd], a
-	ld [$cf5f], a
-	call GetScriptByte
-	ld [$d108], a
-	call GetScriptByte
-	ld [$d143], a
-	ld a, $3
-	ld hl, $5f8c
-	rst $8
-	ret nc
-	ld a, $2
-	ld [$c2dd], a
-	ret
-; 0x97988
-
-Script_setbit1: ; 0x97988
-; script command 0x33
-; parameters:
-;     bit_number (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld b, $1
-	call BitTable1Func
-	ret
-; 0x97996
-
-Script_clearbit1: ; 0x97996
-; script command 0x32
-; parameters:
-;     bit_number (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld b, $0
-	call BitTable1Func
-	ret
-; 0x979a4
-
-Script_checkbit1: ; 0x979a4
-; script command 0x31
-; parameters:
-;     bit_number (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld b, $2
-	call BitTable1Func
-	ld a, c
-	and a
-	jr z, .asm_979b7 ; 0x979b3 $2
-	ld a, $1
-.asm_979b7
-	ld [$c2dd], a
-	ret
-; 0x979bb
-
-Script_setbit2: ; 0x979bb
-; script command 0x36
-; parameters:
-;     bit_number (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld b, $1
-	call $79ee
-	ret
-; 0x979c9
-
-Script_clearbit2: ; 0x979c9
-; script command 0x35
-; parameters:
-;     bit_number (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld b, $0
-	call $79ee
-	ret
-; 0x979d7
-
-Script_checkbit2: ; 0x979d7
-; script command 0x34
-; parameters:
-;     bit_number (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld b, $2
-	call $79ee
-	ld a, c
-	and a
-	jr z, .asm_979ea ; 0x979e6 $2
-	ld a, $1
-.asm_979ea
-	ld [$c2dd], a
-	ret
-; 0x979ee
-
-Unknown_0x979ee: ; 0x979ee
-    ld a, $20
-    ld hl, $4430
-    rst $8
-    ret
-; 0x979f5
-
-Script_wildon: ; 0x979f5
-; script command 0x38
-
-	ld hl, $d84c
-	set 5, [hl]
-	ret
-; 0x979fb
-
-Script_wildoff: ; 0x979fb
-; script command 0x37
-
-	ld hl, $d84c
-	res 5, [hl]
-	ret
-; 0x97a01
-
-Script_xycompare: ; 0x97a01
-; script command 0x39
-; parameters:
-;     pointer (MultiByteParam)
-
-	call GetScriptByte
-	ld [$d453], a
-	call GetScriptByte
-	ld [$d454], a
-	ret
-; 0x97a0e
-
-Script_warpfacing: ; 0x97a0e
-; script command 0xa3
-; parameters:
-;     facing (SingleByteParam)
-;     map_group (MapGroupParam)
-;     map_id (MapIdParam)
-;     x (SingleByteParam)
-;     y (SingleByteParam)
-
-	call GetScriptByte
-	and $3
-	ld c, a
-	ld a, [$d45b]
-	set 5, a
-	or c
-	ld [$d45b], a
-; 0x97a1d
-
-Script_warp: ; 0x97a1d
-; script command 0x3c
-; parameters:
-;     map_group (MapGroupParam)
-;     map_id (MapIdParam)
-;     x (SingleByteParam)
-;     y (SingleByteParam)
-
-	call GetScriptByte
-	and a
-	jr z, .asm_97a4a ; 0x97a21 $27
-	ld [$dcb5], a
-	call GetScriptByte
-	ld [$dcb6], a
-	call GetScriptByte
-	ld [$dcb8], a
-	call GetScriptByte
-	ld [$dcb7], a
-	ld a, $ff
-	ld [$d001], a
-	ld a, $f1
-	ld [$ff9f], a
-	ld a, $1
-	call $261b
-	call Unknown_0x96e11
-	ret
-.asm_97a4a
-	call GetScriptByte
-	call GetScriptByte
-	call GetScriptByte
-	ld a, $ff
-	ld [$d001], a
-	ld a, $fb
-	ld [$ff9f], a
-	ld a, $1
-	call $261b
-	call Unknown_0x96e11
-	ret
-; 0x97a65
-
-Script_warpmod: ; 0x97a65
-; script command 0x3a
-; parameters:
-;     warp_id (SingleByteParam)
-;     map_group (MapGroupParam)
-;     map_id (MapIdParam)
-
-	call GetScriptByte
-	ld [$dcac], a
-	call GetScriptByte
-	ld [$dcad], a
-	call GetScriptByte
-	ld [$dcae], a
-	ret
-; 0x97a78
-
-Script_blackoutmod: ; 0x97a78
-; script command 0x3b
-; parameters:
-;     map_group (MapGroupParam)
-;     map_id (MapIdParam)
-
-	call GetScriptByte
-	ld [$dcb2], a
-	call GetScriptByte
-	ld [$dcb3], a
-	ret
-; 0x97a85
-
-Script_reloadmapmusic: ; 0x97a85
-; script command 0x83
-
-	ld a, $1
-	ld [$c2c1], a
-	ret
-; 0x97a8b
-
-Script_writecmdqueue: ; 0x97a8b
-; script command 0x7d
-; parameters:
-;     queue_pointer (MultiByteParam)
-
-	call GetScriptByte
-	ld e, a
-	call GetScriptByte
-	ld d, a
-	ld a, [ScriptBank]
-	ld b, a
-	ld a, $25
-	ld hl, $7e31
-	rst $8
-	ret
-; 0x97a9e
-
-Script_delcmdqueue: ; 0x97a9e
-; script command 0x7e
-; parameters:
-;     byte (SingleByteParam)
-
-	xor a
-	ld [$c2dd], a
-	call GetScriptByte
-	ld b, a
-	ld a, $25
-	ld hl, $7e5c
-	rst $8
-	ret c
-	ld a, $1
-	ld [$c2dd], a
-	ret
-; 0x97ab3
-
-Script_changemap: ; 0x97ab3
-; script command 0x79
-; parameters:
-;     map_data_pointer (MapDataPointerParam)
-
-	call GetScriptByte
-	ld [$d1a0], a
-	call GetScriptByte
-	ld [$d1a1], a
-	call GetScriptByte
-	ld [$d1a2], a
-	call $24e4
-	call $2879
-	ret
-; 0x97acc
-
-Script_changeblock: ; 0x97acc
-; script command 0x7a
-; parameters:
-;     x (SingleByteParam)
-;     y (SingleByteParam)
-;     block (SingleByteParam)
-
-	call GetScriptByte
-	add $4
-	ld d, a
-	call GetScriptByte
-	add $4
-	ld e, a
-	call $2a66
-	call GetScriptByte
-	ld [hl], a
-	call $2879
-	ret
-; 0x97ae3
-
-Script_reloadmappart: ; 0x97ae3
-; script command 0x7c
-
-	xor a
-	ld [$ffd4], a
-	call $2173
-	call $2914
-	ld a, $41
-	ld hl, $4061
-	rst $8
-	call $1ad2
-	ret
-; 0x97af6
-
-Script_warpcheck: ; 0x97af6
-; script command 0x8e
-
-	call $224a
-	ret nc
-	ld a, $25
-	ld hl, $66d0
-	rst $8
-	ret
-; 0x97b01
-
-Unknown_0x97b01: ; 0x97b01
-    ld a, $25
-    ld hl, $66d0
-    rst $8
-    ret
-; 0x97b08
-
-Script_newloadmap: ; 0x97b08
-; script command 0x8a
-; parameters:
-;     which_method (SingleByteParam)
-
-	call GetScriptByte
-	ld [$ff9f], a
-	ld a, $1
-	call $261b
-	call Unknown_0x96e11
-	ret
-; 0x97b16
-
-Script_reloadandreturn: ; 0x97b16
-; script command 0x92
-
-	call $7b08
-	jp $7b74
-; 0x97b1c
-
-Script_loadfont: ; 0x97b1c
-; script command 0x47
-
-	call $2e08
-	ret
-; 0x97b20
-
-Script_refreshscreen: ; 0x97b20
-; script command 0x48
-; parameters:
-;     dummy (SingleByteParam)
-
-	call $2dba
-	call GetScriptByte
-	ret
-; 0x97b27
-
-Script_loadbytec1ce: ; 0x97b27
-; script command 0x4a
-; parameters:
-;     byte (SingleByteParam)
-
-	call GetScriptByte
-	ld [$c2cf], a
-	ret
-; 0x97b2e
-
-INCBIN "baserom.gbc",$97b2e,$97b2f - $97b2e
-
-Script_loadmovesprites: ; 0x97b2f
-; script command 0x49
-
-	call $2e20
-	call $2dcf
-	ret
-; 0x97b36
-
-Script_passtoengine: ; 0x97b36
-; script command 0x89
-; parameters:
-;     data_pointer (PointerLabelBeforeBank)
-
-	call GetScriptByte
-	push af
-	call GetScriptByte
-	ld l, a
-	call GetScriptByte
-	ld h, a
-	pop af
-	call StartAutoInput
-	ret
-; 0x97b47
-
-Script_pause: ; 0x97b47
-; script command 0x8b
-; parameters:
-;     length (DecimalParam)
-
-	call GetScriptByte
-	and a
-	jr z, .asm_97b50 ; 0x97b4b $3
-	ld [$d44d], a
-.asm_97b50
-	ld c, $2
-	call DelayFrames
-	ld hl, $d44d
-	dec [hl]
-	jr nz, .asm_97b50 ; 0x97b59 $f5
-	ret
-; 0x97b5c
-
-Script_deactivatefacing: ; 0x97b5c
-; script command 0x8c
-; parameters:
-;     time (SingleByteParam)
-
-	call GetScriptByte
-	and a
-	jr z, .asm_97b65 ; 0x97b60 $3
-	ld [$d44d], a
-.asm_97b65
-	ld a, $3
-	ld [$d437], a
-	call Unknown_0x96e11
-	ret
-; 0x97b6e
-
-Script_ptpriorityjump: ; 0x97b6e
-; script command 0x8f
-; parameters:
-;     pointer (ScriptPointerLabelParam)
-
-	call Unknown_0x96e11
-	jp Script_2jump
-; 0x97b74
-
-Script_end: ; 0x97b74
-; script command 0x91
-
-	call $7b9a
-	jr c, .asm_97b7a ; 0x97b77 $1
-	ret
-.asm_97b7a
-	xor a
-	ld [$d438], a
-	ld a, $0
-	ld [$d437], a
-	ld hl, $d434
-	res 0, [hl]
-	call Unknown_0x96e11
-	ret
-; 0x97b8c
-
-Script_return: ; 0x97b8c
-; script command 0x90
-
-	call $7b9a
-	jr c, .asm_97b91 ; 0x97b8f $0
-.asm_97b91
-	ld hl, $d434
-	res 0, [hl]
-	call Unknown_0x96e11
-	ret
-; 0x97b9a
-
-Unknown_0x97b9a: ; 0x97b9a
-    ld hl, $d43c
-    ld a, [hl]
-    and a
-    jr z, .asm_97bbe ; 0x97b9f $1d
-    dec [hl]
-    ld e, [hl]
-    ld d, $0
-    ld hl, $d43d
-    add hl, de
-    add hl, de
-    add hl, de
-    ld a, [hli]
-    ld b, a
-    and $7f
-    ld [ScriptBank], a
-    ld a, [hli]
-    ld e, a
-    ld [ScriptPos], a
-    ld a, [hl]
-    ld d, a
-    ld [ScriptPos + 1], a
-    and a
-    ret
-.asm_97bbe
-    scf
-    ret
-; 0x97bc0
-
-Script_resetfuncs: ; 0x97bc0
-; script command 0x93
-
-	xor a
-	ld [$d43c], a
-	ld [$d438], a
-	ld a, $0
-	ld [$d437], a
-	ld hl, $d434
-	res 0, [hl]
-	call Unknown_0x96e11
-	ret
-; 0x97bd5
-
-Script_halloffame: ; 0x97bd5
-; script command 0xa1
-
-	ld hl, $cfbc
-	res 0, [hl]
-	ld a, BANK(HallOfFame1)
-	ld hl, HallOfFame1
-	rst $8
-	ld a, BANK(HallOfFame2)
-	ld hl, HallOfFame2
-	rst $8
-	ld a, BANK(HallOfFame3)
-	ld hl, HallOfFame3
-	rst $8
-	ld hl, $cfbc
-	set 0, [hl]
-	jr DisplayCredits
-; 0x97bf3
-
-Script_credits: ; 0x97bf3
-; script command 0xa2
-
-	ld a, $21
-	ld hl, $6455
-	rst $8
-	; fallthrough
-DisplayCredits:
-	call $7bc0
-	ld a, $3
-	call $261b
-	call Unknown_0x96e11
-	ret
-; 0x97c05
-
-Script_unknown0xa8: ; 0x97c05
-; script command 0xa8
-; parameters:
-;     unknown (SingleByteParam)
-
-	push bc
-	call GetScriptByte
-.asm_97c09
-	push af
-	ld c, $6
-	call DelayFrames
-	pop af
-	dec a
-	jr nz, .asm_97c09 ; 0x97c11 $f6
-	pop bc
-	ret
-; 0x97c15
-
-Script_unknown0xa9: ; 0x97c15
-; script command 0xa9
-
-	ld a, $13
-	ld hl, $4ffe
-	rst $8
-	ld a, c
-	ld [$c2dd], a
-	ret
-; 0x97c20
--- a/trainer_constants.asm
+++ /dev/null
@@ -1,623 +1,0 @@
-; trainer groups
-FALKNER      EQU $01
-WHITNEY      EQU $02
-BUGSY        EQU $03
-MORTY        EQU $04
-PRYCE        EQU $05
-JASMINE      EQU $06
-CHUCK        EQU $07
-CLAIR        EQU $08
-RIVAL1       EQU $09
-POKEMON_PROF EQU $0A
-WILL         EQU $0B
-CAL          EQU $0C
-BRUNO        EQU $0D
-KAREN        EQU $0E
-KOGA         EQU $0F
-CHAMPION     EQU $10
-BROCK        EQU $11
-MISTY        EQU $12
-LT_SURGE     EQU $13
-SCIENTIST    EQU $14
-ERIKA        EQU $15
-YOUNGSTER    EQU $16
-SCHOOLBOY    EQU $17
-BIRD_KEEPER  EQU $18
-LASS         EQU $19
-JANINE       EQU $1A
-COOLTRAINERM EQU $1B
-COOLTRAINERF EQU $1C
-BEAUTY       EQU $1D
-POKEMANIAC   EQU $1E
-GRUNTM       EQU $1F
-GENTLEMAN    EQU $20
-SKIER        EQU $21
-TEACHER      EQU $22
-SABRINA      EQU $23
-BUG_CATCHER  EQU $24
-FISHER       EQU $25
-SWIMMERM     EQU $26
-SWIMMERF     EQU $27
-SAILOR       EQU $28
-SUPER_NERD   EQU $29
-RIVAL2       EQU $2A
-GUITARIST    EQU $2B
-HIKER        EQU $2C
-BIKER        EQU $2D
-BLAINE       EQU $2E
-BURGLAR      EQU $2F
-FIREBREATHER EQU $30
-JUGGLER      EQU $31
-BLACKBELT_T  EQU $32
-EXECUTIVEM   EQU $33
-PSYCHIC_T    EQU $34
-PICNICKER    EQU $35
-CAMPER       EQU $36
-EXECUTIVEF   EQU $37
-SAGE         EQU $38
-MEDIUM       EQU $39
-BOARDER      EQU $3A
-POKEFANM     EQU $3B
-KIMONO_GIRL  EQU $3C
-TWINS        EQU $3D
-POKEFANF     EQU $3E
-RED          EQU $3F
-BLUE         EQU $40
-OFFICER      EQU $41
-GRUNTF       EQU $42
-MYSTICALMAN  EQU $43
-
-; Rival1
-RIVAL1_1 EQU $01
-RIVAL1_2 EQU $02
-RIVAL1_3 EQU $03
-RIVAL1_4 EQU $04
-RIVAL1_5 EQU $05
-RIVAL1_6 EQU $06
-RIVAL1_7 EQU $07
-RIVAL1_8 EQU $08
-RIVAL1_9 EQU $09
-RIVAL1_10 EQU $0a
-RIVAL1_11 EQU $0b
-RIVAL1_12 EQU $0c
-RIVAL1_13 EQU $0d
-RIVAL1_14 EQU $0e
-RIVAL1_15 EQU $0f
-
-; PokemonProf
-; no trainers
-
-; SpecialPKMN1
-CAL1 EQU $01
-CAL2 EQU $02
-CAL3 EQU $03
-
-; Champion
-LANCE EQU $01
-
-; Scientist
-ROSS EQU $01
-MITCH EQU $02
-JED EQU $03
-MARC EQU $04
-RICH EQU $05
-
-; Youngster
-JOEY1 EQU $01
-MIKEY EQU $02
-ALBERT EQU $03
-GORDON EQU $04
-SAMUEL EQU $05
-IAN EQU $06
-JOEY2 EQU $07
-JOEY3 EQU $08
-WARREN EQU $09
-JIMMY EQU $0a
-OWEN EQU $0b
-JASON EQU $0c
-JOEY4 EQU $0d
-JOEY5 EQU $0e
-
-; Schoolboy
-JACK1 EQU $01
-KIPP EQU $02
-ALAN1 EQU $03
-JOHNNY EQU $04
-DANNY EQU $05
-TOMMY EQU $06
-DUDLEY EQU $07
-JOE EQU $08
-BILLY EQU $09
-CHAD1 EQU $0a
-NATE EQU $0b
-RICKY EQU $0c
-JACK2 EQU $0d
-JACK3 EQU $0e
-ALAN2 EQU $0f
-ALAN3 EQU $10
-CHAD2 EQU $11
-CHAD3 EQU $12
-JACK4 EQU $13
-JACK5 EQU $14
-ALAN4 EQU $15
-ALAN5 EQU $16
-CHAD4 EQU $17
-CHAD5 EQU $18
-
-; BirdKeeper
-ROD EQU $01
-ABE EQU $02
-BRYAN EQU $03
-THEO EQU $04
-TOBY EQU $05
-DENIS EQU $06
-VANCE1 EQU $07
-HANK EQU $08
-ROY EQU $09
-BORIS EQU $0a
-BOB EQU $0b
-JOSE1 EQU $0c
-PETER EQU $0d
-JOSE2 EQU $0e
-PERRY EQU $0f
-BRET EQU $10
-JOSE3 EQU $11
-VANCE2 EQU $12
-VANCE3 EQU $13
-
-; Lass
-CARRIE EQU $01
-BRIDGET EQU $02
-ALICE EQU $03
-KRISE EQU $04
-CONNIE1 EQU $05
-LINDA EQU $06
-LAURA EQU $07
-SHANNON EQU $08
-MICHELLE EQU $09
-DANA1 EQU $0a
-ELLEN EQU $0b
-CONNIE2 EQU $0c
-CONNIE3 EQU $0d
-DANA2 EQU $0e
-DANA3 EQU $0f
-DANA4 EQU $10
-DANA5 EQU $11
-
-; CooltrainerM
-NICK EQU $01
-AARON EQU $02
-PAUL EQU $03
-CODY EQU $04
-MIKE EQU $05
-GAVEN1 EQU $06
-GAVEN2 EQU $07
-RYAN EQU $08
-JAKE EQU $09
-GAVEN3 EQU $0a
-BLAKE EQU $0b
-BRIAN EQU $0c
-ERICK EQU $0d
-ANDY EQU $0e
-TYLER EQU $0f
-SEAN EQU $10
-KEVIN EQU $11
-STEVE EQU $12
-ALLEN EQU $13
-DARIN EQU $14
-
-; CooltrainerF
-GWEN EQU $01
-LOIS EQU $02
-FRAN EQU $03
-LOLA EQU $04
-KATE EQU $05
-IRENE EQU $06
-KELLY EQU $07
-JOYCE EQU $08
-BETH1 EQU $09
-REENA1 EQU $0a
-MEGAN EQU $0b
-BETH2 EQU $0c
-CAROL EQU $0d
-QUINN EQU $0e
-EMMA EQU $0f
-CYBIL EQU $10
-JENN EQU $11
-BETH3 EQU $12
-REENA2 EQU $13
-REENA3 EQU $14
-CARA EQU $15
-
-; Beauty
-VICTORIA EQU $01
-SAMANTHA EQU $02
-JULIE EQU $03
-JACLYN EQU $04
-BRENDA EQU $05
-CASSIE EQU $06
-CAROLINE EQU $07
-CARLENE EQU $08
-JESSICA EQU $09
-RACHAEL EQU $0a
-ANGELICA EQU $0b
-KENDRA EQU $0c
-VERONICA EQU $0d
-JULIA EQU $0e
-THERESA EQU $0f
-VALERIE EQU $10
-OLIVIA EQU $11
-
-; Pokemaniac
-LARRY EQU $01
-ANDREW EQU $02
-CALVIN EQU $03
-SHANE EQU $04
-BEN EQU $05
-BRENT1 EQU $06
-RON EQU $07
-ETHAN EQU $08
-BRENT2 EQU $09
-BRENT3 EQU $0a
-ISSAC EQU $0b
-DONALD EQU $0c
-ZACH EQU $0d
-BRENT4 EQU $0e
-MILLER EQU $0f
-
-; Gentleman
-PRESTON EQU $01
-EDWARD EQU $02
-GREGORY EQU $03
-VIRGIL EQU $04
-ALFRED EQU $05
-
-; Skier
-ROXANNE EQU $01
-CLARISSA EQU $02
-
-; Teacher
-COLETTE EQU $01
-HILLARY EQU $02
-SHIRLEY EQU $03
-
-; BugCatcher
-DON EQU $01
-ROB EQU $02
-ED EQU $03
-WADE1 EQU $04
-BUG_CATCHER_BENNY EQU $05
-AL EQU $06
-JOSH EQU $07
-ARNIE1 EQU $08
-KEN EQU $09
-WADE2 EQU $0a
-WADE3 EQU $0b
-DOUG EQU $0c
-ARNIE2 EQU $0d
-ARNIE3 EQU $0e
-WADE4 EQU $0f
-WADE5 EQU $10
-ARNIE4 EQU $11
-ARNIE5 EQU $12
-WAYNE EQU $13
-
-; Fisher
-JUSTIN EQU $01
-RALPH1 EQU $02
-ARNOLD EQU $03
-KYLE EQU $04
-HENRY EQU $05
-MARVIN EQU $06
-TULLY1 EQU $07
-ANDRE EQU $08
-RAYMOND EQU $09
-WILTON1 EQU $0a
-EDGAR EQU $0b
-JONAH EQU $0c
-MARTIN EQU $0d
-STEPHEN EQU $0e
-BARNEY EQU $0f
-RALPH2 EQU $10
-RALPH3 EQU $11
-TULLY2 EQU $12
-TULLY3 EQU $13
-WILTON2 EQU $14
-SCOTT EQU $15
-WILTON3 EQU $16
-RALPH4 EQU $17
-RALPH5 EQU $18
-TULLY4 EQU $19
-
-; SwimmerM
-HAROLD EQU $01
-SIMON EQU $02
-RANDALL EQU $03
-CHARLIE EQU $04
-GEORGE EQU $05
-BERKE EQU $06
-KIRK EQU $07
-MATHEW EQU $08
-HAL EQU $09
-PATON EQU $0a
-DARYL EQU $0b
-WALTER EQU $0c
-TONY EQU $0d
-JEROME EQU $0e
-TUCKER EQU $0f
-RICK EQU $10
-CAMERON EQU $11
-SETH EQU $12
-JAMES EQU $13
-LEWIS EQU $14
-PARKER EQU $15
-
-; SwimmerF
-ELAINE EQU $01
-PAULA EQU $02
-KAYLEE EQU $03
-SUSIE EQU $04
-DENISE EQU $05
-KARA EQU $06
-WENDY EQU $07
-LISA EQU $08
-JILL EQU $09
-MARY EQU $0a
-KATIE EQU $0b
-DAWN EQU $0c
-TARA EQU $0d
-NICOLE EQU $0e
-LORI EQU $0f
-JODY EQU $10
-NIKKI EQU $11
-DIANA EQU $12
-BRIANA EQU $13
-
-; Sailor
-EUGENE EQU $01
-HUEY1 EQU $02
-TERRELL EQU $03
-KENT EQU $04
-ERNEST EQU $05
-JEFF EQU $06
-GARRETT EQU $07
-KENNETH EQU $08
-STANLY EQU $09
-HARRY EQU $0a
-HUEY2 EQU $0b
-HUEY3 EQU $0c
-HUEY4 EQU $0d
-
-; SuperNerd
-STAN EQU $01
-ERIC EQU $02
-GREGG EQU $03
-JAY EQU $04
-DAVE EQU $05
-SAM EQU $06
-TOM EQU $07
-PAT EQU $08
-SHAWN EQU $09
-TERU EQU $0a
-RUSS EQU $0b
-NORTON EQU $0c
-HUGH EQU $0d
-MARKUS EQU $0e
-
-; Guitarist
-CLYDE EQU $01
-VINCENT EQU $02
-
-; Hiker
-ANTHONY1 EQU $01
-RUSSELL EQU $02
-PHILLIP EQU $03
-LEONARD EQU $04
-ANTHONY2 EQU $05
-BENJAMIN EQU $06
-ERIK EQU $07
-MICHAEL EQU $08
-PARRY1 EQU $09
-TIMOTHY EQU $0a
-BAILEY EQU $0b
-ANTHONY3 EQU $0c
-TIM EQU $0d
-NOLAND EQU $0e
-SIDNEY EQU $0f
-KENNY EQU $10
-JIM EQU $11
-DANIEL EQU $12
-PARRY2 EQU $13
-PARRY3 EQU $14
-ANTHONY4 EQU $15
-ANTHONY5 EQU $16
-
-; Biker
-BIKER_BENNY EQU $01
-KAZU EQU $02
-DWAYNE EQU $03
-HARRIS EQU $04
-ZEKE EQU $05
-CHARLES EQU $06
-RILEY EQU $07
-JOEL EQU $08
-GLENN EQU $09
-
-; Burglar
-DUNCAN EQU $01
-EDDIE EQU $02
-COREY EQU $03
-
-; Firebreather
-OTIS EQU $01
-DICK EQU $02
-NED EQU $03
-BURT EQU $04
-BILL EQU $05
-WALT EQU $06
-RAY EQU $07
-LYLE EQU $08
-
-; Juggler
-IRWIN1 EQU $01
-FRITZ EQU $02
-HORTON EQU $03
-IRWIN2 EQU $04
-IRWIN3 EQU $05
-IRWIN4 EQU $06
-
-; Blackbelt
-KENJI1 EQU $01
-YOSHI EQU $02
-KENJI2 EQU $03
-LAO EQU $04
-NOB EQU $05
-KIYO EQU $06
-LUNG EQU $07
-KENJI3 EQU $08
-WAI EQU $09
-
-; Psychic
-NATHAN EQU $01
-FRANKLIN EQU $02
-HERMAN EQU $03
-FIDEL EQU $04
-GREG EQU $05
-NORMAN EQU $06
-MARK EQU $07
-PHIL EQU $08
-RICHARD EQU $09
-GILBERT EQU $0a
-JARED EQU $0b
-RODNEY EQU $0c
-
-; Picnicker
-LIZ1 EQU $01
-GINA1 EQU $02
-BROOKE EQU $03
-KIM EQU $04
-CINDY EQU $05
-HOPE EQU $06
-SHARON EQU $07
-DEBRA EQU $08
-GINA2 EQU $09
-ERIN1 EQU $0a
-LIZ2 EQU $0b
-LIZ3 EQU $0c
-HEIDI EQU $0d
-EDNA EQU $0e
-GINA3 EQU $0f
-TIFFANY1 EQU $10
-TIFFANY2 EQU $11
-ERIN2 EQU $12
-TANYA EQU $13
-TIFFANY3 EQU $14
-ERIN3 EQU $15
-LIZ4 EQU $16
-LIZ5 EQU $17
-GINA4 EQU $18
-GINA5 EQU $19
-TIFFANY4 EQU $1a
-
-; Camper
-ROLAND EQU $01
-TODD1 EQU $02
-IVAN EQU $03
-ELLIOT EQU $04
-BARRY EQU $05
-LLOYD EQU $06
-DEAN EQU $07
-SID EQU $08
-HARVEY EQU $09
-DALE EQU $0a
-TED EQU $0b
-TODD2 EQU $0c
-TODD3 EQU $0d
-THOMAS EQU $0e
-LEROY EQU $0f
-DAVID EQU $10
-JOHN EQU $11
-JERRY EQU $12
-SPENCER EQU $13
-TODD4 EQU $14
-TODD5 EQU $15
-QUENTIN EQU $16
-
-; Sage
-CHOW EQU $01
-NICO EQU $02
-JIN EQU $03
-TROY EQU $04
-JEFFREY EQU $05
-PING EQU $06
-EDMOND EQU $07
-NEAL EQU $08
-LI EQU $09
-GAKU EQU $0a
-MASA EQU $0b
-KOJI EQU $0c
-
-; Medium
-MARTHA EQU $01
-GRACE EQU $02
-BETHANY EQU $03
-MARGRET EQU $04
-ETHEL EQU $05
-REBECCA EQU $06
-DORIS EQU $07
-
-; Boarder
-RONALD EQU $01
-BRAD EQU $02
-DOUGLAS EQU $03
-
-; PokefanM
-WILLIAM EQU $01
-DEREK1 EQU $02
-ROBERT EQU $03
-JOSHUA EQU $04
-CARTER EQU $05
-TREVOR EQU $06
-BRANDON EQU $07
-JEREMY EQU $08
-COLIN EQU $09
-DEREK2 EQU $0a
-DEREK3 EQU $0b
-ALEX EQU $0c
-REX EQU $0d
-ALLAN EQU $0e
-
-; KimonoGirl
-NAOKO1 EQU $01
-NAOKO2 EQU $02
-SAYO EQU $03
-ZUKI EQU $04
-KUNI EQU $05
-MIKI EQU $06
-
-; Twins
-AMYANDMAY1 EQU $01
-ANNANDANNE1 EQU $02
-ANNANDANNE2 EQU $03
-AMYANDMAY2 EQU $04
-JOANDZOE1 EQU $05
-JOANDZOE2 EQU $06
-MEGANDPEG1 EQU $07
-MEGANDPEG2 EQU $08
-LEAANDPIA1 EQU $09
-LEAANDPIA2 EQU $0a
-
-; PokefanF
-BEVERLY1 EQU $01
-RUTH EQU $02
-BEVERLY2 EQU $03
-BEVERLY3 EQU $04
-GEORGIA EQU $05
-JAIME EQU $06
-
-; Officer
-KEITH EQU $01
-DIRK EQU $02
-
-; Mysticalman
-EUSINE EQU $01
--- a/vblank.asm
+++ /dev/null
@@ -1,539 +1,0 @@
-; VBlank is the interrupt responsible for updating VRAM.
-
-; In Pokemon Crystal, VBlank has been hijacked to act as the
-; main loop. After time-sensitive graphics operations have been
-; performed, joypad input and sound functions are executed.
-
-; This prevents the display and audio output from lagging.
-
-	push af
-	push bc
-	push de
-	push hl
-	
-; get vblank type
-	ld a, [$ff9e]
-	and $7
-	
-; get fn pointer
-	ld e, a
-	ld d, $0
-	ld hl, .VBlanks
-	add hl, de
-	add hl, de
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	
-; down to business
-	call JpHl
-	
-; since this is called once per frame
-	call GameTimer
-	
-	pop hl
-	pop de
-	pop bc
-	pop af
-	reti
-; 2a1
-
-.VBlanks ; 2a1
-	dw VBlank0 ; 0
-	dw VBlank1 ; 1
-	dw VBlank2 ; 2
-	dw VBlank3 ; 3
-	dw VBlank4 ; 4
-	dw VBlank5 ; 5
-	dw VBlank6 ; 6
-	dw VBlank0 ; 7
-; 2b1
-
-
-VBlank0: ; 2b1
-; normal operation
-
-; rng
-; scx, scy, wy, wx
-; bg map buffer
-; palettes
-; dma transfer
-; bg map
-; tiles
-; oam
-; joypad
-; sound
-
-; inc frame counter
-	ld hl, $ff9b
-	inc [hl]
-	
-; advance rng
-	ld a, [rDIV]
-	ld b, a
-	ld a, [$ffe1]
-	adc b
-	ld [$ffe1], a
-	
-	ld a, [rDIV]
-	ld b, a
-	ld a, [$ffe2]
-	sbc b
-	ld [$ffe2], a
-	
-; save bank
-	ld a, [$ff9d] ; current bank
-	ld [$ff8a], a
-	
-; scroll x
-	ld a, [$ffcf]
-	ld [rSCX], a
-; scroll y
-	ld a, [$ffd0]
-	ld [rSCY], a
-; window y
-	ld a, [$ffd2]
-	ld [rWY], a
-; window x + 7
-	ld a, [$ffd1]
-	ld [rWX], a
-	
-; some time management is in order
-; only have time for one of these during vblank
-	
-; bg map buffer has priority
-	call UpdateBGMapBuffer
-	jr c, .doneframeaction
-	
-; then pals
-	call UpdatePalsIfCGB
-	jr c, .doneframeaction
-	
-; dma transfer
-	call DMATransfer
-	jr c, .doneframeaction
-	
-; bg map
-	call UpdateBGMap
-	
-; these have their own timing checks
-	call SafeLoadTiles
-	call SafeLoadTiles2
-	call SafeTileAnimation
-	
-.doneframeaction
-; oam update off?
-	ld a, [$ffd8]
-	and a
-	jr nz, .vblankoccurred
-	
-; update oam by dma transfer
-	call hPushOAM
-;	403f:
-;		ld a, $c4
-;		ld [rDMA], a
-;		ld a, $28
-;	.loop
-;		dec a
-;		jr nz, .loop
-;		ret
-
-
-; vblank-sensitive operations are done
-	
-.vblankoccurred
-; tell other fns vblank happened
-	xor a
-	ld [VBlankOccurred], a
-	
-; dec $cfb1 until 0
-	ld a, [$cfb1]
-	and a
-	jr z, .textdelay
-	dec a
-	ld [$cfb1], a
-	
-.textdelay
-; dec text delay counter until 0
-	ld a, [TextDelayFrames]
-	and a
-	jr z, .joypad
-	dec a
-	ld [TextDelayFrames], a
-	
-.joypad
-	call Joypad
-	
-; update sound
-	ld a, BANK(UpdateSound)
-	rst Bankswitch ; bankswitch
-	call UpdateSound
-	ld a, [$ff8a]
-	rst Bankswitch ; restore bank
-	
-; 
-	ld a, [$ff98]
-	ld [$ffe3], a
-	
-	ret
-; 325
-
-
-VBlank2: ; 325
-; sound only
-
-; save bank
-	ld a, [$ff9d]
-	ld [$ff8a], a
-	
-; update sound
-	ld a, BANK(UpdateSound)
-	rst Bankswitch ; bankswitch
-	call UpdateSound
-	
-; restore bank
-	ld a, [$ff8a]
-	rst Bankswitch
-	
-; tell other fns vblank happened
-	xor a
-	ld [VBlankOccurred], a
-	ret
-; 337
-
-
-VBlank1: ; 337
-; scx, scy
-; palettes
-; bg map
-; tiles
-; oam
-; sound / lcd stat
-
-; save bank
-	ld a, [$ff9d]
-	ld [$ff8a], a
-	
-; scroll x
-	ld a, [$ffcf]
-	ld [rSCX], a
-	
-; scroll y
-	ld a, [$ffd0]
-	ld [rSCY], a
-	
-; time-sensitive fns
-	call UpdatePals
-	jr c, .vblankoccurred
-	
-; these have their own timing checks
-	call UpdateBGMap
-	call LoadTiles
-; update oam by dma transfer
-	call hPushOAM
-;	403f:
-;		ld a, $c4
-;		ld [rDMA], a
-;		ld a, $28
-;	.loop
-;		dec a
-;		jr nz, .loop
-;		ret
-	
-.vblankoccurred
-; tell other fns vblank happened
-	xor a
-	ld [VBlankOccurred], a
-	
-; get requested ints
-	ld a, [rIF]
-	ld b, a
-; discard requested ints
-	xor a
-	ld [rIF], a
-; enable lcd stat
-	ld a, %10 ; lcd stat
-	ld [rIE], a
-; rerequest serial int if applicable (still disabled)
-; request lcd stat
-	ld a, b
-	and %1000 ; serial
-	or %10 ; lcd stat
-	ld [rIF], a
-	
-	ei
-; update sound
-	ld a, BANK(UpdateSound)
-	rst Bankswitch ; bankswitch
-	call UpdateSound
-; restore bank
-	ld a, [$ff8a]
-	rst Bankswitch
-	di
-	
-; get requested ints
-	ld a, [rIF]
-	ld b, a
-; discard requested ints
-	xor a
-	ld [rIF], a
-; enable ints besides joypad
-	ld a, %1111 ; serial timer lcdstat vblank
-	ld [rIE], a
-; rerequest ints
-	ld a, b
-	ld [rIF], a
-	ret
-; 37f
-
-
-UpdatePals: ; 37f
-; update pals for either dmg or cgb
-
-; check cgb
-	ld a, [$ffe6]
-	and a
-	jp nz, UpdateCGBPals
-	
-; update gb pals
-	ld a, [$cfc7]
-	ld [rBGP], a
-	
-	ld a, [$cfc8]
-	ld [rOBP0], a
-	
-	ld a, [$cfc9]
-	ld [rOBP1], a
-	
-	and a
-	ret
-; 396
-
-
-VBlank3: ; 396
-; scx, scy
-; palettes
-; bg map
-; tiles
-; oam
-; sound / lcd stat
-
-; save bank
-	ld a, [$ff9d]
-	ld [$ff8a], a
-	
-; scroll x
-	ld a, [$ffcf]
-	ld [rSCX], a
-; scroll y
-	ld a, [$ffd0]
-	ld [rSCY], a
-	
-; any pals to update?
-	ld a, [$ffe5]
-	and a
-	call nz, ForceUpdateCGBPals
-	jr c, .vblankoccurred
-; else
-	call UpdateBGMap
-	call LoadTiles
-	
-; update oam by dma transfer
-	call hPushOAM
-;	403f:
-;		ld a, $c4 ; Sprites / $100
-;		ld [rDMA], a
-;		ld a, $28
-;	.loop
-;		dec a
-;		jr nz, .loop
-;		ret
-	
-.vblankoccurred
-; tell other fns vblank happened
-	xor a
-	ld [VBlankOccurred], a
-	
-; save int flag
-	ld a, [rIF]
-	push af
-; reset ints
-	xor a
-	ld [rIF], a
-; force lcdstat int during sound update
-	ld a, %10 ; lcd stat
-	ld [rIE], a
-	ld [rIF], a
-	
-	ei
-; update sound
-	ld a, BANK(UpdateSound)
-	rst Bankswitch ; bankswitch
-	call UpdateSound
-; restore bank
-	ld a, [$ff8a]
-	rst Bankswitch
-	di
-	
-; request lcdstat
-	ld a, [rIF]
-	ld b, a
-; and any other ints
-	pop af
-	or b
-	ld b, a
-; reset ints
-	xor a
-	ld [rIF], a
-; enable ints besides joypad
-	ld a, %1111 ; serial timer lcdstat vblank
-	ld [rIE], a
-; request ints
-	ld a, b
-	ld [rIF], a
-	ret
-; 3df
-
-
-VBlank4: ; 3df
-; bg map
-; tiles
-; oam
-; joypad
-; serial
-; sound
-
-; save bank
-	ld a, [$ff9d]
-	ld [$ff8a], a
-	
-	call UpdateBGMap
-	call SafeLoadTiles
-	
-; update oam by dma transfer
-	call hPushOAM
-;	403f:
-;		ld a, $c4
-;		ld [rDMA], a
-;		ld a, $28
-;	.loop
-;		dec a
-;		jr nz, .loop
-;		ret
-	
-; update joypad
-	call Joypad
-	
-; tell other fns vblank happened
-	xor a
-	ld [VBlankOccurred], a
-	
-; handshake
-	call AskSerial
-	
-; update sound
-	ld a, BANK(UpdateSound)
-	rst Bankswitch ; bankswitch
-	call UpdateSound
-; restore bank
-	ld a, [$ff8a]
-	rst Bankswitch
-	ret
-; 400
-
-
-VBlank5: ; 400
-; scx
-; palettes
-; bg map
-; tiles
-; joypad
-; 
-
-; save bank
-	ld a, [$ff9d]
-	ld [$ff8a], a
-	
-; scroll x
-	ld a, [$ffcf]
-	ld [rSCX], a
-	
-; if we can update pals, skip this part
-	call UpdatePalsIfCGB
-	jr c, .vblankoccurred
-	
-	call UpdateBGMap
-	call SafeLoadTiles
-	
-.vblankoccurred
-; tell other fns vblank happened
-	xor a
-	ld [VBlankOccurred], a
-	
-; joypad
-	call Joypad
-	
-; discard requested ints
-	xor a
-	ld [rIF], a
-; enable lcd stat
-	ld a, %10 ; lcd stat
-	ld [rIE], a
-; request lcd stat
-	ld [rIF], a
-	
-	ei
-; update sound
-	ld a, BANK(UpdateSound)
-	rst Bankswitch ; bankswitch
-	call UpdateSound
-; restore bank
-	ld a, [$ff8a]
-	rst Bankswitch
-	di
-	
-; discard requested ints
-	xor a
-	ld [rIF], a
-; enable ints besides joypad
-	ld a, %1111 ; serial timer lcdstat vblank
-	ld [rIE], a
-	ret
-; 436
-
-
-VBlank6: ; 436
-; palettes
-; tiles
-; dma transfer
-; sound
-
-; save bank
-	ld a, [$ff9d]
-	ld [$ff8a], a
-	
-; inc frame counter
-	ld hl, $ff9b
-	inc [hl]
-	
-	call UpdateCGBPals
-	jr c, .vblankoccurred
-	
-	call SafeLoadTiles
-	call SafeLoadTiles2
-	call DMATransfer
-	
-.vblankoccurred
-; tell other fns vblank happened
-	xor a
-	ld [VBlankOccurred], a
-	
-; update sound
-	ld a, BANK(UpdateSound)
-	rst Bankswitch ; bankswitch
-	call UpdateSound
-; restore bank
-	ld a, [$ff8a]
-	rst Bankswitch
-	ret
-; 45a