summaryrefslogtreecommitdiff
path: root/wram.asm
diff options
context:
space:
mode:
Diffstat (limited to 'wram.asm')
-rw-r--r--wram.asm3247
1 files changed, 1550 insertions, 1697 deletions
diff --git a/wram.asm b/wram.asm
index 582ad30c0..ee0bcbbde 100644
--- a/wram.asm
+++ b/wram.asm
@@ -2,8 +2,10 @@ INCLUDE "includes.asm"
INCLUDE "macros/wram.asm"
INCLUDE "vram.asm"
+
SECTION "Stack", WRAM0
-wc000::
+
+wRAM0Start::
StackBottom::
ds $100 - 1
Stack::
@@ -12,10 +14,11 @@ StackTop::
SECTION "Audio RAM", WRAM0
+
wMusic::
-MusicPlaying:: ; c100
+
; nonzero if playing
- ds 1
+MusicPlaying:: db ; c100
Channels::
Channel1:: channel_struct Channel1 ; c101
@@ -30,16 +33,15 @@ Channel7:: channel_struct Channel7 ; c22d
Channel8:: channel_struct Channel8 ; c25f
ds 1 ; c291
-wCurTrackDuty:: ds 1
-wCurTrackIntensity:: ds 1
+
+wCurTrackDuty:: db
+wCurTrackIntensity:: db
wCurTrackFrequency:: dw
-wc296:: ds 1 ; BCD value, dummied out
-wCurNoteDuration:: ds 1 ; used in MusicE0 and LoadNote
+wc296:: db ; BCD value, dummied out
+wCurNoteDuration:: db ; used in MusicE0 and LoadNote
-CurMusicByte:: ; c298
- ds 1
-CurChannel:: ; c299
- ds 1
+CurMusicByte:: db ; c298
+CurChannel:: db ; c299
Volume:: ; c29a
; corresponds to $ff24
; Channel control / ON-OFF / Volume (R/W)
@@ -47,12 +49,12 @@ Volume:: ; c29a
; bit 6-4 - SO2 output level (volume) (# 0-7)
; bit 3 - Vin->SO1 ON/OFF
; bit 2-0 - SO1 output level (volume) (# 0-7)
- ds 1
+ db
SoundOutput:: ; c29b
; corresponds to $ff25
; bit 4-7: ch1-4 so2 on/off
; bit 0-3: ch1-4 so1 on/off
- ds 1
+ db
SoundInput:: ; c29c
; corresponds to $ff26
; bit 7: global on/off
@@ -60,80 +62,69 @@ SoundInput:: ; c29c
; bit 1: ch2 on/off
; bit 2: ch3 on/off
; bit 3: ch4 on/off
- ds 1
+ db
+
+MusicID:: dw ; c29d
+MusicBank:: db ; c29f
+NoiseSampleAddress:: dw ; c2a0
+wNoiseSampleDelay:: db ; c2a2
+ ds 1 ; c2a3
+MusicNoiseSampleSet:: db ; c2a4
+SFXNoiseSampleSet:: db ; c2a5
-MusicID::
-MusicIDLo:: ; c29d
- ds 1
-MusicIDHi:: ; c29e
- ds 1
-MusicBank:: ; c29f
- ds 1
-NoiseSampleAddress::
-NoiseSampleAddressLo:: ; c2a0
- ds 1
-NoiseSampleAddressHi:: ; c2a1
- ds 1
-wNoiseSampleDelay:: ; noise delay? ; c2a2
- ds 1
-; c2a3
- ds 1
-MusicNoiseSampleSet:: ; c2a4
- ds 1
-SFXNoiseSampleSet:: ; c2a5
- ds 1
Danger:: ; c2a6
; bit 7: on/off
; bit 4: pitch
; bit 0-3: counter
- ds 1
+ db
+
MusicFade:: ; c2a7
; fades volume over x frames
; bit 7: fade in/out
; bit 0-5: number of frames for each volume level
; $00 = none (default)
- ds 1
-MusicFadeCount:: ; c2a8
- ds 1
-MusicFadeID::
-wc2a9::
-MusicFadeIDLo:: ; c2a9
- ds 1
-wc2aa::
-MusicFadeIDHi:: ; c2aa
- ds 1
+ db
+MusicFadeCount:: db ; c2a8
+MusicFadeID:: dw ; c2a9
+
ds 5
-CryPitch:: ; c2b0
- ds 2
-CryLength:: ; c2b2
- ds 2
-LastVolume:: ; c2b4
- ds 1
-wc2b5:: ds 1
+
+CryPitch:: dw ; c2b0
+CryLength:: dw ; c2b2
+
+LastVolume:: db ; c2b4
+wc2b5:: db ; c2b5
+
SFXPriority:: ; c2b6
; if nonzero, turn off music when playing sfx
+ db
+
ds 1
- ds 1
-Channel1JumpCondition:: ds 1
-Channel2JumpCondition:: ds 1
-Channel3JumpCondition:: ds 1
-Channel4JumpCondition:: ds 1
-wStereoPanningMask:: ds 1 ; c2bc
+
+Channel1JumpCondition:: db
+Channel2JumpCondition:: db
+Channel3JumpCondition:: db
+Channel4JumpCondition:: db
+
+wStereoPanningMask:: db ; c2bc
+
CryTracks:: ; c2bd
; plays only in left or right track depending on what side the monster is on
; both tracks active outside of battle
- ds 1
-wSFXDuration:: ds 1
+ db
+
+wSFXDuration:: db
CurSFX:: ; c2bf
; id of sfx currently playing
- ds 1
+ db
ChannelsEnd::
-wMapMusic:: ; c2c0
- ds 1
-wDontPlayMapMusicOnReload:: ds 1
+wMapMusic:: db ; c2c0
+
+wDontPlayMapMusicOnReload:: db
wMusicEnd::
+
SECTION "WRAM", WRAM0
wLZAddress:: dw ; c2c2
@@ -141,69 +132,66 @@ wLZBank:: db ; c2c4
ds 1
-wBoxAlignment:: ds 1
-InputType:: ; c2c7
- ds 1
-AutoInputAddress:: ; c2c8
- ds 2
-AutoInputBank:: ; c2ca
- ds 1
-AutoInputLength:: ; c2cb
- ds 1
+wBoxAlignment:: db
+
+InputType:: db ; c2c7
+AutoInputAddress:: dw ; c2c8
+AutoInputBank:: db ; c2ca
+AutoInputLength:: db ; c2cb
+
+wMonStatusFlags:: db
+wGameLogicPaused:: db ; c2cd
+wSpriteUpdatesEnabled:: db
+
+wc2cf:: db ; ????
+
+wMapTimeOfDay:: db
-wMonStatusFlags:: ds 1
-wGameLogicPaused:: ds 1 ; c2cd
-wSpriteUpdatesEnabled:: ds 1
-wc2cf:: ds 1
-wMapTimeOfDay:: ds 1
ds 3
-wPrinterConnectionOpen:: ds 1
-wPrinterOpcode:: ds 1
-wLastDexEntry:: ds 1
-wDisableTextAcceleration:: ds 1
-wPreviousLandmark:: ds 1
-wCurrentLandmark:: ds 1
-wLandmarkSignTimer:: ds 2
+
+wPrinterConnectionOpen:: db
+wPrinterOpcode:: db
+wLastDexEntry:: db
+wDisableTextAcceleration:: db
+wPreviousLandmark:: db
+wCurrentLandmark:: db
+wLandmarkSignTimer:: dw
wLinkMode:: ; c2dc
; 0 not in link battle
; 1 link battle
; 4 mobile battle
- ds 1
+ db
-ScriptVar:: ; c2dd
- ds 1
+ScriptVar:: db ; c2dd
-wPlayerNextMovement:: ds 1
-wPlayerMovement:: ds 1
+wPlayerNextMovement:: db
+wPlayerMovement:: db
ds 2
wc2e2::
-wMovementPerson:: ds 1
+wMovementPerson:: db
wMovementDataPointer:: ds 3 ; dba
wc2e6:: ds 4
-wMovementByteWasControlSwitch:: ds 1
-wMovementPointer:: ds 2 ; c2eb
+wMovementByteWasControlSwitch:: db
+wMovementPointer:: dw ; c2eb
+
ds 3
-wTempObjectCopyMapObjectIndex:: ds 1 ; c2f0
-wTempObjectCopySprite:: ds 1 ; c2f1
-wTempObjectCopySpriteVTile:: ds 1 ; c2f2
-wTempObjectCopyPalette:: ds 1 ; c2f3
-wTempObjectCopyMovement:: ds 1 ; c2f4
-wTempObjectCopyRange:: ds 1 ; c2f5
-wTempObjectCopyX:: ds 1 ; c2f6
-wTempObjectCopyY:: ds 1 ; c2f7
-wTempObjectCopyRadius:: ds 1 ; c2f8
+wTempObjectCopyMapObjectIndex:: db ; c2f0
+wTempObjectCopySprite:: db ; c2f1
+wTempObjectCopySpriteVTile:: db ; c2f2
+wTempObjectCopyPalette:: db ; c2f3
+wTempObjectCopyMovement:: db ; c2f4
+wTempObjectCopyRange:: db ; c2f5
+wTempObjectCopyX:: db ; c2f6
+wTempObjectCopyY:: db ; c2f7
+wTempObjectCopyRadius:: db ; c2f8
ds 1
-TileDown:: ; c2fa
- ds 1
-TileUp:: ; c2fb
- ds 1
-TileLeft:: ; c2fc
- ds 1
-TileRight:: ; c2fd
- ds 1
+TileDown:: db ; c2fa
+TileUp:: db ; c2fb
+TileLeft:: db ; c2fc
+TileRight:: db ; c2fd
TilePermissions:: ; c2fe
; set if tile behavior prevents
@@ -212,19 +200,36 @@ TilePermissions:: ; c2fe
; bit 2: up
; bit 1: left
; bit 0: right
- ds 1
+ db
ds 1
+
SECTION "wSpriteAnims", WRAM0
-; wc300 - wc313 is a 10x2 dictionary.
+
+UNION ; c300
+; wSpriteAnimDict is a 10x2 dictionary
; keys: taken from third column of SpriteAnimSeqData
; values: VTiles
-
-UNION
wSpriteAnimDict:: ds 10 * 2
-NEXTU
+wSpriteAnimationStructs::
+; field 0: index
+; fields 1-3: loaded from SpriteAnimSeqData
+SpriteAnim1:: sprite_anim_struct SpriteAnim1
+SpriteAnim2:: sprite_anim_struct SpriteAnim2
+SpriteAnim3:: sprite_anim_struct SpriteAnim3
+SpriteAnim4:: sprite_anim_struct SpriteAnim4
+SpriteAnim5:: sprite_anim_struct SpriteAnim5
+SpriteAnim6:: sprite_anim_struct SpriteAnim6
+SpriteAnim7:: sprite_anim_struct SpriteAnim7
+SpriteAnim8:: sprite_anim_struct SpriteAnim8
+SpriteAnim9:: sprite_anim_struct SpriteAnim9
+SpriteAnim10:: sprite_anim_struct SpriteAnim10
+wSpriteAnimationStructsEnd::
+
+NEXTU ; c300
+; mobile data
wc300:: ds 1
wc301:: ds 1
wc302:: ds 1
@@ -244,62 +249,32 @@ wc310:: ds 1
wc311:: ds 1
wc312:: ds 1
wc313:: ds 1
-ENDU
+wc314:: ds 152
+wc3ac:: ds 8
+ENDU ; c3b4
-wSpriteAnimationStructs::
-; Field 0: Index
-; Fields 1-3: Loaded from SpriteAnimSeqData
-wc314::
-SpriteAnim1:: sprite_anim_struct SpriteAnim1
-wc324::
-SpriteAnim2:: sprite_anim_struct SpriteAnim2
-wc334::
-SpriteAnim3:: sprite_anim_struct SpriteAnim3
-wc344::
-SpriteAnim4:: sprite_anim_struct SpriteAnim4
-wc354::
-SpriteAnim5:: sprite_anim_struct SpriteAnim5
-wc364::
-SpriteAnim6:: sprite_anim_struct SpriteAnim6
-wc374::
-SpriteAnim7:: sprite_anim_struct SpriteAnim7
-wc384::
-SpriteAnim8:: sprite_anim_struct SpriteAnim8
-wc394::
-SpriteAnim9:: sprite_anim_struct SpriteAnim9
-wc3a4::
+wSpriteAnimCount:: db
+wCurrSpriteOAMAddr:: db
-UNION
-SpriteAnim10:: sprite_anim_struct SpriteAnim10
-wSpriteAnimationStructsEnd::
-NEXTU
- ds 8
-wc3ac:: ds 8 ; c3ac
-ENDU
-
-wSpriteAnimCount:: ds 1
-wCurrSpriteOAMAddr:: ds 1
+CurIcon:: db ; c3b6
-CurIcon:: ; c3b6
- ds 1
-
-
-wCurIconTile:: ds 1
+wCurIconTile:: db
wSpriteAnimAddrBackup::
wSpriteAnimIDBuffer::
wCurrSpriteAddSubFlags::
- ds 2
-wCurrAnimVTile:: ds 1
-wCurrAnimXCoord:: ds 1
-wCurrAnimYCoord:: ds 1
-wCurrAnimXOffset:: ds 1
-wCurrAnimYOffset:: ds 1
-wGlobalAnimYOffset:: ds 1
-wGlobalAnimXOffset:: ds 1
+ dw
+wCurrAnimVTile:: db
+wCurrAnimXCoord:: db
+wCurrAnimYCoord:: db
+wCurrAnimXOffset:: db
+wCurrAnimYOffset:: db
+wGlobalAnimYOffset:: db
+wGlobalAnimXOffset:: db
wSpriteAnimsEnd::
ds 11
+; mobile data
wc3cc:: ds 1
wc3cd:: ds 31
wc3ec:: ds 1
@@ -352,30 +327,42 @@ TileMapEnd::
SECTION "Battle", WRAM0
-UNION
+
+UNION ; c608
+; unidentified uses
wc608::
+
+NEXTU ; c608
+; miscellaneous
+wMisc:: ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
+wMiscEnd::
+
+NEXTU ; c608
+; odd egg
wOddEgg:: party_struct OddEgg
wOddEggName:: ds PKMN_NAME_LENGTH
wOddEggOTName:: ds PKMN_NAME_LENGTH
-NEXTU
+NEXTU ; c608
+; battle tower temp struct
wBT_OTTemp:: battle_tower_struct wBT_OTTemp
-NEXTU
+NEXTU ; c608
+; hall of fame temp struct
hall_of_fame wHallOfFameTemp
-NEXTU
-wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
- ds 10
-wc612::
- ds 6
-wc618::
- ds 4
-wInitHourBuffer:: ; c61c
+NEXTU ; c608
+; timeset temp storage
+ ds 20
+wInitHourBuffer:: db ; c61c
+
+NEXTU ; c608
+; link engine data
ds 10
-wc626::
+wc612:: ds 10
-NEXTU
+NEXTU ; c608
+; battle data
wBattle::
wEnemyMoveStruct:: move_struct wEnemyMoveStruct ; c608
wPlayerMoveStruct:: move_struct wPlayerMoveStruct ; c60f
@@ -387,16 +374,15 @@ BattleMon:: battle_struct BattleMon ; c62c
ds 2
-wWildMon:: ds 1 ; c64e
+wWildMon:: db ; c64e
ds 1
-wEnemyTrainerItem1:: ds 1 ; c650
-wEnemyTrainerItem2:: ds 1 ; c651
-wEnemyTrainerBaseReward:: ds 1 ; c652
+wEnemyTrainerItem1:: db ; c650
+wEnemyTrainerItem2:: db ; c651
+wEnemyTrainerBaseReward:: db ; c652
wEnemyTrainerAIFlags:: ds 3 ; c653
OTClassName:: ds TRAINER_CLASS_NAME_LENGTH ; c656
-CurOTMon:: ; c663
- ds 1
+CurOTMon:: db ; c663
wBattleParticipantsNotFainted::
; Bit array. Bits 0 - 5 correspond to party members 1 - 6.
@@ -404,28 +390,28 @@ wBattleParticipantsNotFainted::
; Bit cleared if the mon faints.
; Backed up if the enemy switches.
; All bits cleared if the enemy faints.
- ds 1
+ db
TypeModifier:: ; c665
; >10: super-effective
; 10: normal
; <10: not very effective
; bit 7: stab
- ds 1
+ db
CriticalHit:: ; c666
; 0 if not critical
; 1 for a critical hit
; 2 for a OHKO
- ds 1
+ db
AttackMissed:: ; c667
; nonzero for a miss
- ds 1
+ db
PlayerSubStatus1:: ; c668
; bit
-; 7 attract
+; 7 in love
; 6 rollout
; 5 endure
; 4 perish song
@@ -433,7 +419,7 @@ PlayerSubStatus1:: ; c668
; 2 protect
; 1 curse
; 0 nightmare
- ds 1
+ db
PlayerSubStatus2:: ; c669
; bit
; 7
@@ -444,18 +430,18 @@ PlayerSubStatus2:: ; c669
; 2
; 1
; 0 curled
- ds 1
+ db
PlayerSubStatus3:: ; c66a
; bit
; 7 confused
; 6 flying
; 5 underground
; 4 charged
-; 3 flinch
-; 2
-; 1 rollout
+; 3 flinched
+; 2 in loop
+; 1 rampage
; 0 bide
- ds 1
+ db
PlayerSubStatus4:: ; c66b
; bit
; 7 leech seed
@@ -466,228 +452,181 @@ PlayerSubStatus4:: ; c66b
; 2 focus energy
; 1 mist
; 0 x accuracy
- ds 1
+ db
PlayerSubStatus5:: ; c66c
; bit
-; 7 cant run
+; 7 can't run
; 6 destiny bond
; 5 lock-on
-; 4 encore
+; 4 encored
; 3 transformed
; 2
; 1
; 0 toxic
- ds 1
+ db
EnemySubStatus1:: ; c66d
; see PlayerSubStatus1
- ds 1
+ db
EnemySubStatus2:: ; c66e
; see PlayerSubStatus2
- ds 1
+ db
EnemySubStatus3:: ; c66f
; see PlayerSubStatus3
- ds 1
+ db
EnemySubStatus4:: ; c670
; see PlayerSubStatus4
- ds 1
+ db
EnemySubStatus5:: ; c671
; see PlayerSubStatus5
- ds 1
-
-PlayerRolloutCount:: ; c672
- ds 1
-PlayerConfuseCount:: ; c673
- ds 1
-PlayerToxicCount:: ; c674
- ds 1
-PlayerDisableCount:: ; c675
- ds 1
-PlayerEncoreCount:: ; c676
- ds 1
-PlayerPerishCount:: ; c677
- ds 1
-PlayerFuryCutterCount:: ; c678
- ds 1
-PlayerProtectCount:: ; c679
- ds 1
-
-EnemyRolloutCount:: ; c67a
- ds 1
-EnemyConfuseCount:: ; c67b
- ds 1
-EnemyToxicCount:: ; c67c
- ds 1
-EnemyDisableCount:: ; c67d
- ds 1
-EnemyEncoreCount:: ; c67e
- ds 1
-EnemyPerishCount:: ; c67f
- ds 1
-EnemyFuryCutterCount:: ; c680
- ds 1
-EnemyProtectCount:: ; c681
- ds 1
-
-PlayerDamageTaken:: ; c682
- ds 2
-EnemyDamageTaken:: ; c684
- ds 2
+ db
+
+PlayerRolloutCount:: db ; c672
+PlayerConfuseCount:: db ; c673
+PlayerToxicCount:: db ; c674
+PlayerDisableCount:: db ; c675
+PlayerEncoreCount:: db ; c676
+PlayerPerishCount:: db ; c677
+PlayerFuryCutterCount:: db ; c678
+PlayerProtectCount:: db ; c679
+
+EnemyRolloutCount:: db ; c67a
+EnemyConfuseCount:: db ; c67b
+EnemyToxicCount:: db ; c67c
+EnemyDisableCount:: db ; c67d
+EnemyEncoreCount:: db ; c67e
+EnemyPerishCount:: db ; c67f
+EnemyFuryCutterCount:: db ; c680
+EnemyProtectCount:: db ; c681
+
+PlayerDamageTaken:: dw ; c682
+EnemyDamageTaken:: dw ; c684
wBattleReward:: ds 3 ; c686
wBattleAnimParam::
wKickCounter::
-wPresentPower:: ds 1 ; c689
-BattleScriptBuffer:: ; c68a
- ds 40
+wPresentPower:: db ; c689
+BattleScriptBuffer:: ds 40 ; c68a
-BattleScriptBufferLoc:: ; c6b2
- ds 2
+BattleScriptBufferAddress:: dw ; c6b2
+
+wTurnEnded:: db ; c6b4
-wTurnEnded:: ds 1 ; c6b4
ds 1
PlayerStats:: ; c6b6
-PlayerAttack:: ds 2
-PlayerDefense:: ds 2
-PlayerSpeed:: ds 2
-PlayerSpAtk:: ds 2
-PlayerSpDef:: ds 2
+PlayerAttack:: dw
+PlayerDefense:: dw
+PlayerSpeed:: dw
+PlayerSpAtk:: dw
+PlayerSpDef:: dw
ds 1
+
EnemyStats:: ; c6c1
-EnemyAttack:: ds 2
-EnemyDefense:: ds 2
-EnemySpeed:: ds 2
-EnemySpAtk:: ds 2
-EnemySpDef:: ds 2
+EnemyAttack:: dw
+EnemyDefense:: dw
+EnemySpeed:: dw
+EnemySpAtk:: dw
+EnemySpDef:: dw
ds 1
PlayerStatLevels:: ; c6cc
; 07 neutral
-PlayerAtkLevel:: ; c6cc
- ds 1
-PlayerDefLevel:: ; c6cd
- ds 1
-PlayerSpdLevel:: ; c6ce
- ds 1
-PlayerSAtkLevel:: ; c6cf
- ds 1
-
-UNION
-wc6d0::
-PlayerSDefLevel:: ; c6d0
- ds 1
-PlayerAccLevel:: ; c6d1
- ds 1
-PlayerEvaLevel:: ; c6d2
- ds 1
-; c6d3
- ds 1
+PlayerAtkLevel:: db ; c6cc
+PlayerDefLevel:: db ; c6cd
+PlayerSpdLevel:: db ; c6ce
+PlayerSAtkLevel:: db ; c6cf
+
+UNION ; c6d0
+; finish battle RAM
+PlayerSDefLevel:: db ; c6d0
+PlayerAccLevel:: db ; c6d1
+PlayerEvaLevel:: db ; c6d2
+ ds 1 ; c6d3
PlayerStatLevelsEnd::
EnemyStatLevels:: ; c6d4
; 07 neutral
-EnemyAtkLevel:: ; c6d4
- ds 1
-EnemyDefLevel:: ; c6d5
- ds 1
-EnemySpdLevel:: ; c6d6
- ds 1
-EnemySAtkLevel:: ; c6d7
- ds 1
-EnemySDefLevel:: ; c6d8
- ds 1
-EnemyAccLevel:: ; c6d9
- ds 1
-EnemyEvaLevel:: ; c6da
+EnemyAtkLevel:: db ; c6d4
+EnemyDefLevel:: db ; c6d5
+EnemySpdLevel:: db ; c6d6
+EnemySAtkLevel:: db ; c6d7
+EnemySDefLevel:: db ; c6d8
+EnemyAccLevel:: db ; c6d9
+EnemyEvaLevel:: db ; c6da
ds 1
- ds 1
-EnemyTurnsTaken:: ; c6dc
- ds 1
-PlayerTurnsTaken:: ; c6dd
+EnemyTurnsTaken:: db ; c6dc
+PlayerTurnsTaken:: db ; c6dd
ds 1
- ds 1
+PlayerSubstituteHP:: db ; c6df
+EnemySubstituteHP:: db ; c6e0
-PlayerSubstituteHP:: ; c6df
- ds 1
-EnemySubstituteHP:: ; c6e0
+wUnusedPlayerLockedMove:: db ; c6e1
ds 1
-wUnusedPlayerLockedMove:: ds 1 ; c6e1
- ds 1
-CurPlayerMove:: ; c6e3
- ds 1
-CurEnemyMove:: ; c6e4
- ds 1
+CurPlayerMove:: db ; c6e3
+CurEnemyMove:: db ; c6e4
LinkBattleRNCount:: ; c6e5
; how far through the prng stream
- ds 1
+ db
-wEnemyItemState:: ds 1 ; c6e6
+wEnemyItemState:: db ; c6e6
ds 2
-CurEnemyMoveNum:: ; c6e9
- ds 1
+CurEnemyMoveNum:: db ; c6e9
-wEnemyHPAtTimeOfPlayerSwitch:: ds 2 ; c6ea
+wEnemyHPAtTimeOfPlayerSwitch:: dw ; c6ea
wPayDayMoney:: ds 3 ; c6ec
-wSafariMonAngerCount:: ds 1
-wSafariMonEating:: ds 2
-wEnemyBackupDVs:: ; used when enemy is transformed
- ds 2
-AlreadyDisobeyed:: ; c6f4
+wSafariMonAngerCount:: db
+wSafariMonEating:: db
ds 1
+wEnemyBackupDVs:: dw ; used when enemy is transformed
+AlreadyDisobeyed:: db ; c6f4
-DisabledMove:: ; c6f5
- ds 1
-EnemyDisabledMove:: ; c6f6
- ds 1
-wWhichMonFaintedFirst:: ds 1
+DisabledMove:: db ; c6f5
+EnemyDisabledMove:: db ; c6f6
+wWhichMonFaintedFirst:: db
; exists so you can't counter on switch
-LastPlayerCounterMove:: ; c6f8
- ds 1
-LastEnemyCounterMove:: ; c6f9
- ds 1
+LastPlayerCounterMove:: db ; c6f8
+LastEnemyCounterMove:: db ; c6f9
-wEnemyMinimized:: ds 1 ; c6fa
+wEnemyMinimized:: db ; c6fa
-AlreadyFailed:: ; c6fb
- ds 1
+AlreadyFailed:: db ; c6fb
-wBattleParticipantsIncludingFainted:: ds 1 ; c6fc
-wDanger:: ds 1 ; c6fd
-wPlayerMinimized:: ds 1 ; c6fe
+wBattleParticipantsIncludingFainted:: db ; c6fc
+wDanger:: db ; c6fd
+wPlayerMinimized:: db ; c6fe
PlayerScreens:: ; c6ff
; bit
+; 7
+; 6
+; 5
; 4 reflect
; 3 light screen
; 2 safeguard
+; 1
; 0 spikes
- ds 1
+ db
EnemyScreens:: ; c700
; see PlayerScreens
- ds 1
+ db
-PlayerSafeguardCount:: ; c701
- ds 1
-PlayerLightScreenCount:: ; c702
- ds 1
-PlayerReflectCount:: ; c703
+PlayerSafeguardCount:: db ; c701
+PlayerLightScreenCount:: db ; c702
+PlayerReflectCount:: db ; c703
ds 1
- ds 1
-EnemySafeguardCount:: ; c705
- ds 1
-EnemyLightScreenCount:: ; c706
- ds 1
-EnemyReflectCount:: ; c707
- ds 1
+EnemySafeguardCount:: db ; c705
+EnemyLightScreenCount:: db ; c706
+EnemyReflectCount:: db ; c707
ds 2
+
Weather:: ; c70a
; 00 normal
; 01 rain
@@ -696,113 +635,110 @@ Weather:: ; c70a
; 04 rain stopped
; 05 sunliight faded
; 06 sandstorm subsided
- ds 1
+ db
WeatherCount:: ; c70b
; # turns remaining
- ds 1
+ db
-LoweredStat:: ; c70c
- ds 1
-EffectFailed:: ; c70d
- ds 1
-FailedMessage:: ; c70e
- ds 1
-wEnemyGoesFirst:: ; c70f
- ds 1
-wPlayerIsSwitching:: ds 1 ; c710
-wEnemyIsSwitching:: ds 1 ; c711
+LoweredStat:: db ; c70c
+EffectFailed:: db ; c70d
+FailedMessage:: db ; c70e
+wEnemyGoesFirst:: db ; c70f
+
+wPlayerIsSwitching:: db ; c710
+wEnemyIsSwitching:: db ; c711
PlayerUsedMoves:: ; c712
; add a move that has been used once by the player
; added in order of use
ds NUM_MOVES
-wEnemyAISwitchScore:: ds 1 ; c716
-wEnemySwitchMonParam:: ds 1 ; c717
-wEnemySwitchMonIndex:: ds 1 ; c718
-wTempLevel:: ds 1 ; c719
-LastPlayerMon:: ds 1 ; c71a
-LastPlayerMove:: ; c71b
- ds 1
-LastEnemyMove:: ; c71c
- ds 1
+wEnemyAISwitchScore:: db ; c716
+wEnemySwitchMonParam:: db ; c717
+wEnemySwitchMonIndex:: db ; c718
+wTempLevel:: db ; c719
+LastPlayerMon:: db ; c71a
+LastPlayerMove:: db ; c71b
+LastEnemyMove:: db ; c71c
+
+wPlayerFutureSightCount:: db ; c71d
+wEnemyFutureSightCount:: db ; c71e
+
+wGivingExperienceToExpShareHolders:: db ; c71f
-wPlayerFutureSightCount:: ds 1 ; c71d
-wEnemyFutureSightCount:: ds 1 ; c71e
-wGivingExperienceToExpShareHolders:: ds 1 ; c71f
wBackupEnemyMonBaseStats:: ds 5 ; c720
wBackupEnemyMonCatchRate:: db ; c725
wBackupEnemyMonBaseExp:: db ; c726
-wPlayerFutureSightDamage:: ds 2 ; c727
-wEnemyFutureSightDamage:: ds 2 ; c729
-wPlayerRageCounter:: ds 1 ; c72b
-wEnemyRageCounter:: ds 1 ; c72c
-wBeatUpHitAtLeastOnce:: ds 1 ; c72d
-wPlayerTrappingMove:: ds 1 ; c72e
-wEnemyTrappingMove:: ds 1 ; c72f
-wPlayerWrapCount:: ds 1 ; c730
-wEnemyWrapCount:: ds 1 ; c731
-wPlayerCharging:: ds 1 ; c732
-wEnemyCharging:: ds 1 ; c733
-BattleEnded:: ; c734
- ds 1
+
+wPlayerFutureSightDamage:: dw ; c727
+wEnemyFutureSightDamage:: dw ; c729
+wPlayerRageCounter:: db ; c72b
+wEnemyRageCounter:: db ; c72c
+
+wBeatUpHitAtLeastOnce:: db ; c72d
+
+wPlayerTrappingMove:: db ; c72e
+wEnemyTrappingMove:: db ; c72f
+wPlayerWrapCount:: db ; c730
+wEnemyWrapCount:: db ; c731
+wPlayerCharging:: db ; c732
+wEnemyCharging:: db ; c733
+
+BattleEnded:: db ; c734
wWildMonMoves:: ds NUM_MOVES ; c735
wWildMonPP:: ds NUM_MOVES ; c739
-wAmuletCoin:: ds 1 ; c73a
-wSomeoneIsRampaging:: ds 1 ; c73b
-wPlayerJustGotFrozen:: ds 1 ; c73c
-wEnemyJustGotFrozen:: ds 1 ; c73d
+
+wAmuletCoin:: db ; c73a
+
+wSomeoneIsRampaging:: db ; c73b
+
+wPlayerJustGotFrozen:: db ; c73c
+wEnemyJustGotFrozen:: db ; c73d
wBattleEnd::
; Battle RAM
-
; c741
-NEXTU
+
+NEXTU ; c6d0
+; trade
wTrademons::
wPlayerTrademon:: trademon wPlayerTrademon
wOTTrademon:: trademon wOTTrademon
wTrademonsEnd::
-wTradeAnimPointer::
- ds 2
+wTradeAnimAddress:: dw
wLinkPlayer1Name:: ds NAME_LENGTH
wLinkPlayer2Name:: ds NAME_LENGTH
-wLinkTradeSendmonSpecies:: ds 1
-wLinkTradeGetmonSpecies:: ds 1
-wc74e:: ds 107
-wc7b9:: ds 1
-wc7ba:: ds 1
-wc7bb:: ds 2
-wc7bd::
+wLinkTradeSendmonSpecies:: db
+wLinkTradeGetmonSpecies:: db
-NEXTU
+NEXTU ; c6d0
; naming screen
-wNamingScreenDestinationPointer:: ds 2 ; c6d0
-wNamingScreenCurrNameLength:: ds 1 ; c6d2
-wNamingScreenMaxNameLength:: ds 1 ; c6d3
-wNamingScreenType:: ds 1 ; c6d4
-wNamingScreenCursorObjectPointer:: ds 2 ; c6d5
-wNamingScreenLastCharacter:: ds 1 ; c6d7
-wNamingScreenStringEntryCoord:: ds 2 ; c6d8
-
-NEXTU
+wNamingScreenDestinationPointer:: dw ; c6d0
+wNamingScreenCurrNameLength:: db ; c6d2
+wNamingScreenMaxNameLength:: db ; c6d3
+wNamingScreenType:: db ; c6d4
+wNamingScreenCursorObjectPointer:: dw ; c6d5
+wNamingScreenLastCharacter:: db ; c6d7
+wNamingScreenStringEntryCoord:: dw ; c6d8
+
+NEXTU ; c6d0
; pokegear
-wPokegearPhoneLoadNameBuffer:: ds 1 ; c6d0
-wPokegearPhoneCursorPosition:: ds 1 ; c6d1
-wPokegearPhoneScrollPosition:: ds 1 ; c6d2
-wPokegearPhoneSelectedPerson:: ds 1 ; c6d3
-wPokegearPhoneSubmenuCursor:: ds 1 ; c6d4
-wPokegearMapCursorObjectPointer:: ds 2 ; c6d5
-wPokegearMapCursorLandmark:: ds 1 ; c6d7
-wPokegearMapPlayerIconLandmark:: ds 1 ; c6d8
-wPokegearRadioChannelBank:: ds 1 ; c6d9
-wPokegearRadioChannelAddr:: ds 2 ; c6da
-wPokegearRadioMusicPlaying:: ds 1 ; c6dc
-
-NEXTU
+wPokegearPhoneLoadNameBuffer:: db ; c6d0
+wPokegearPhoneCursorPosition:: db ; c6d1
+wPokegearPhoneScrollPosition:: db ; c6d2
+wPokegearPhoneSelectedPerson:: db ; c6d3
+wPokegearPhoneSubmenuCursor:: db ; c6d4
+wPokegearMapCursorObjectPointer:: dw ; c6d5
+wPokegearMapCursorLandmark:: db ; c6d7
+wPokegearMapPlayerIconLandmark:: db ; c6d8
+wPokegearRadioChannelBank:: db ; c6d9
+wPokegearRadioChannelAddr:: dw ; c6da
+wPokegearRadioMusicPlaying:: db ; c6dc
+
+NEXTU ; c6d0
+; slot machine
wSlots::
-; Slot Machine
-; c6d0
wReel1:: slot_reel wReel1
wReel2:: slot_reel wReel2
wReel3:: slot_reel wReel3
@@ -810,171 +746,174 @@ wReel3:: slot_reel wReel3
wReel1Stopped:: ds 3
wReel2Stopped:: ds 3
wReel3Stopped:: ds 3
-wSlotBias:: ds 1
-wSlotBet:: ds 1
-wFirstTwoReelsMatching:: ds 1
-wFirstTwoReelsMatchingSevens:: ds 1
-wSlotMatched:: ds 1
+wSlotBias:: db
+wSlotBet:: db
+wFirstTwoReelsMatching:: db
+wFirstTwoReelsMatchingSevens:: db
+wSlotMatched:: db
wCurrReelStopped:: ds 3
-wPayout:: ds 2
-wCurrReelXCoord:: ds 1
-wCurrReelYCoord:: ds 1
+wPayout:: dw
+wCurrReelXCoord:: db
+wCurrReelYCoord:: db
ds 2
-wSlotBuildingMatch:: ds 1
+wSlotBuildingMatch:: db
wSlotsDataEnd::
ds 28
wSlotsEnd::
-NEXTU
-; Card Flip
-; c6d0
+NEXTU ; c6d0
+; card flip
wCardFlip::
wDeck:: ds 24
wDeckEnd::
; c6e8
-wCardFlipNumCardsPlayed:: ds 1
-wCardFlipFaceUpCard:: ds 1
+wCardFlipNumCardsPlayed:: db
+wCardFlipFaceUpCard:: db
wDiscardPile:: ds 24
wDiscardPileEnd::
wCardFlipEnd::
-NEXTU
-; Dummy Game
-; c6d0
+NEXTU ; c6d0
+; dummy game
wDummyGame::
wDummyGameCards:: ds 9 * 5
wDummyGameCardsEnd::
-wDummyGameLastCardPicked:: ds 1 ; c6fd
-wDummyGameCard1:: ds 1 ; c6fe
-wDummyGameCard2:: ds 1 ; c6ff
-wDummyGameCard1Location:: ds 1 ; c700
-wDummyGameCard2Location:: ds 1 ; c701
-wDummyGameNumberTriesRemaining:: ds 1 ; c702
+wDummyGameLastCardPicked:: db ; c6fd
+wDummyGameCard1:: db ; c6fe
+wDummyGameCard2:: db ; c6ff
+wDummyGameCard1Location:: db ; c700
+wDummyGameCard2Location:: db ; c701
+wDummyGameNumberTriesRemaining:: db ; c702
wDummyGameLastMatches:: ds 5 ; c703
-wDummyGameCounter:: ds 1 ; c708
-wDummyGameNumCardsMatched:: ds 1 ; c709
+wDummyGameCounter:: db ; c708
+wDummyGameNumCardsMatched:: db ; c709
wDummyGameEnd::
-NEXTU
-; Unown Puzzle
+NEXTU ; c6d0
+; unown puzzle
wUnownPuzzle::
-wPuzzlePieces::
- ds 6 * 6
+wPuzzlePieces:: ds 6 * 6
wUnownPuzzleEnd::
-NEXTU
+NEXTU ; c6d0
+; pokedex
wPokedexDataStart::
-wPokedexOrder:: ds NUM_POKEMON +- 1
-wPokedexOrderEnd:: ds 6
+wPokedexOrder:: ds $100 ; NUM_POKEMON + 5
+wPokedexOrderEnd::
wPokedexMetadata::
-wDexListingScrollOffset:: ; offset of the first displayed entry from the start
-wc7d0:: ds 1
-wDexListingCursor::
-wc7d1:: ds 1 ; Dex cursor
-wDexListingEnd::
-wc7d2:: ds 1 ; Last mon to display
-wDexListingHeight:: ; number of entries displayed at once in the dex listing
-wc7d3:: ds 1
-wCurrentDexMode:: ; Pokedex Mode
-wc7d4:: ds 1 ; Index of the topmost visible item in a scrolling menu
-wDexSearchMonType1:: ds 1 ; first type to search
-wDexSearchMonType2:: ds 1 ; second type to search
-wDexSearchResultCount:: ds 1
-wDexArrowCursorPosIndex:: ds 1
-wDexArrowCursorDelayCounter:: ds 1
-wDexArrowCursorBlinkCounter:: ds 1
-wDexSearchSlowpokeFrame:: ds 1
-wUnlockedUnownMode:: ds 1
-wDexCurrentUnownIndex:: ds 1
-wDexUnownCount:: ds 1
-wDexConvertedMonType:: ds 1 ; mon type converted from dex search mon type
-wDexListingScrollOffsetBackup:: ds 1
-wDexListingCursorBackup:: ds 1
-wBackupDexListingCursor::
-wc7e2:: ds 1
-wBackupDexListingPage::
-wc7e3:: ds 1
-wDexCurrentLocation::
-wc7e4:: ds 1
-IF DEF(CRYSTAL11)
-wPokedexStatus::
-ELSE
-wPokedexDataEnd::
-ENDC
- ds 1
+wDexListingScrollOffset:: db ; offset of the first displayed entry from the start
+wDexListingCursor:: db ; Dex cursor
+wDexListingEnd:: db ; Last mon to display
+wDexListingHeight:: db ; number of entries displayed at once in the dex listing
+wCurrentDexMode:: db ; Pokedex Mode
+wDexSearchMonType1:: db ; first type to search
+wDexSearchMonType2:: db ; second type to search
+wDexSearchResultCount:: db
+wDexArrowCursorPosIndex:: db
+wDexArrowCursorDelayCounter:: db
+wDexArrowCursorBlinkCounter:: db
+wDexSearchSlowpokeFrame:: db
+wUnlockedUnownMode:: db
+wDexCurrentUnownIndex:: db
+wDexUnownCount:: db
+wDexConvertedMonType:: db ; mon type converted from dex search mon type
+wDexListingScrollOffsetBackup:: db
+wDexListingCursorBackup:: db
+wBackupDexListingCursor:: db
+wBackupDexListingPage:: db
+wDexCurrentLocation:: db
IF DEF(CRYSTAL11)
+wPokedexStatus:: db
wPokedexDataEnd::
+ELSE
+wPokedexDataEnd:: ds 1
ENDC
ds 2
-wMiscEnd::
-ENDU
-ENDU
+NEXTU ; c6d0
+; mobile data
+wc6d0:: ds 126
+wc74e:: ds 107
+wc7b9:: ds 1
+wc7ba:: ds 1
+wc7bb:: ds 2
+wc7bd:: ds 19
+wc7d0:: ds 1
+wc7d1:: ds 1
+wc7d2:: ds 1
+wc7d3:: ds 1
+wc7d4:: ds 1
+ENDU ; c7e8
+ENDU ; c7e8
wc7e8:: ds 24 ; ????
+
SECTION "Overworld Map", WRAM0
-UNION
-OverworldMap:: ; c800
- ds 1300
+UNION ; c800
+OverworldMap:: ds 1300 ; c800
OverworldMapEnd::
-NEXTU
+NEXTU ; c800
+; GB Printer screen RAM
wGameboyPrinterRAM::
wGameboyPrinterScreen:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; c800
wGameboyPrinterScreenEnd:: ; c968
-NEXTU
-wGameboyPrinter2bppSource::
- ds 40 tiles
+NEXTU ; c800
+; GB Printer data
+wGameboyPrinter2bppSource:: ds 40 tiles
wGameboyPrinter2bppSourceEnd::
-wca80:: ds 1
-wPrinterRowIndex:: ds 1
+wca80:: db
+wPrinterRowIndex:: db
; Printer data header
-wca82:: ds 1
-wca83:: ds 1
-wca84:: ds 1
-wca85:: ds 1
+wPrinterData:: ds 4
wPrinterChecksum:: dw ; ca86
-wPrinterHandshake:: ds 1
+wPrinterHandshake:: db
wPrinterStatusFlags::
; bit 7: set if error 1 (battery low)
; bit 6: set if error 4 (too hot or cold)
; bit 5: set if error 3 (paper jammed or empty)
; if this and the previous byte are both $ff: error 2 (connection error)
- ds 1
+ db
-wHandshakeFrameDelay:: ds 1
-wPrinterSerialFrameDelay:: ds 1
+wHandshakeFrameDelay:: db
+wPrinterSerialFrameDelay:: db
wPrinterSendByteOffset:: dw
wPrinterSendByteCounter:: dw
; tilemap backup?
wPrinterTileMapBuffer:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; ca90
wPrinterTileMapBufferEnd::
-wPrinterStatus:: ds 1 ; cbf8
+wPrinterStatus:: db ; cbf8
ds 1
wcbfa:: ds 1
-wGBPrinterSettings:: ds 1
+wGBPrinterSettings:: db
ds 16
wGameboyPrinterRAMEnd::
-NEXTU
+NEXTU ; c800
+; bill's pc data
wBillsPCPokemonList:: ; c800
; Pokemon, box number, list index
+ ds 3 * 30
-wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
-wMysteryGiftStaging::
+NEXTU ; c800
+; raw link data
+wLinkData:: ds $514
+wLinkDataEnd::
-wLinkData:: ; ds $514
+NEXTU ; c800
+; link data members
wLinkPlayerName:: ds NAME_LENGTH
-wLinkPartyCount:: ds 1
+wLinkPartyCount:: db
wLinkPartySpecies:: ds PARTY_LENGTH
-wLinkPartySpeciesEnd:: ds 1
+wLinkPartySpeciesEnd:: db ; legacy scripts don't check PartyCount
-UNION
+UNION ; c813
+; time capsule party data
wTimeCapsulePlayerData::
wTimeCapsulePartyMon1:: red_party_struct wTimeCapsulePartyMon1
wTimeCapsulePartyMon2:: red_party_struct wTimeCapsulePartyMon2
@@ -986,7 +925,8 @@ wTimeCapsulePartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
wTimeCapsulePartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH
wTimeCapsulePlayerDataEnd::
-NEXTU
+NEXTU ; c813
+; link player data
wLinkPlayerData::
wLinkPlayerPartyMon1:: party_struct wLinkPlayerPartyMon1
wLinkPlayerPartyMon2:: party_struct wLinkPlayerPartyMon2
@@ -997,13 +937,13 @@ wLinkPlayerPartyMon6:: party_struct wLinkPlayerPartyMon6
wLinkPlayerPartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
wLinkPlayerPartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH
wLinkPlayerDataEnd::
-ENDU
- ds $35d
-
-wLinkDataEnd::
-NEXTU
+ENDU ; c9b7
-wc800:: ds 1
+NEXTU ; c800
+; mystery gift data
+wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
+wMysteryGiftStaging::
+wc800:: ds 1
wc801:: ds 1
wc802:: ds 1
wc803:: ds 4
@@ -1017,14 +957,13 @@ wc813:: ds 1
wc814:: ds 4
wc818:: ds 8
wc820:: ds 1
-wc821:: ds 15
-wc830:: ds 16
-wc840:: ds 16
-UNION
+wc821:: ds 47
+
+UNION ; c850
wMysteryGiftTrainerData:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
wMysteryGiftTrainerDataEnd::
-NEXTU
+NEXTU ; c850
wc850:: ds 16
wc860:: ds 16
wc870:: ds 16
@@ -1036,62 +975,53 @@ wc8c0:: ds 16
wc8d0:: ds 16
wc8e0:: ds 16
wc8f0:: ds 16
-ENDU
+ENDU ; c900
wMysteryGiftPartnerData::
-wc900:: ds 1
-wMysteryGiftPartnerID:: ds 2
+wc900:: db
+wMysteryGiftPartnerID:: dw
wMysteryGiftPartnerName:: ds NAME_LENGTH
-wMysteryGiftPartnerDexCaught:: ds 1
+wMysteryGiftPartnerDexCaught:: db
wc90f::
-wMysteryGiftPartnerSentDeco:: ds 1
-wMysteryGiftPartnerWhichItem:: ds 1
-wMysteryGiftPartnerWhichDeco:: ds 1
-wMysteryGiftPartnerBackupItem:: ds 2
+wMysteryGiftPartnerSentDeco:: db
+wMysteryGiftPartnerWhichItem:: db
+wMysteryGiftPartnerWhichDeco:: db
+wMysteryGiftPartnerBackupItem:: db
+ ds 1
wMysteryGiftPartnerDataEnd::
- ds 12
-wc920:: ds 16
-wc930:: ds 16
-wc940:: ds 16
+
+ ds 60
+
wMysteryGiftPlayerData::
-wc950:: ds 1
-wMysteryGiftPlayerID:: ds 2
+ ds 1
+wMysteryGiftPlayerID:: dw
wMysteryGiftPlayerName:: ds NAME_LENGTH
-wMysteryGiftPlayerDexCaught:: ds 1
-wMysteryGiftPlayerSentDeco:: ds 1
-wMysteryGiftPlayerWhichItem:: ds 1
-wMysteryGiftPlayerWhichDeco:: ds 1
-wMysteryGiftPlayerBackupItem:: ds 2
+wMysteryGiftPlayerDexCaught:: db
+wMysteryGiftPlayerSentDeco:: db
+wMysteryGiftPlayerWhichItem:: db
+wMysteryGiftPlayerWhichDeco:: db
+wMysteryGiftPlayerBackupItem:: db
+ ds 1
wMysteryGiftPlayerDataEnd::
-wc964:: ds 12
-wc970:: ds 16
-wc980:: ds 16
-wc990:: ds 16
-wc9a0:: ds 16
-wc9b0:: ds 16
-wc9c0:: ds 16
-wc9d0:: ds 16
-wc9e0:: ds 16
-wc9f0:: ds 4
+ ds 144
+
wc9f4:: ds 5
wc9f9:: ds 7
-wCreditsFaux2bpp::
-wca00:: ds 1
-wca01:: ds 1
-wca02:: ds 14
-wca10:: ds 16
-wca20:: ds 16
-wca30:: ds 16
-wca40:: ds 16
-wca50:: ds 16
-wca60:: ds 16
-wca70:: ds 16
-
- ds 35
-
-wcaa3:: ds 2 ; caa3
+UNION ; ca00
+; blank credits tile buffer
+wCreditsFaux2bpp:: ds 128
+
+NEXTU ; ca00
+; mystery gift data
+wca00:: db
+wca01:: db
+wca02:: db
+ ds 160
+ENDU ; caa3
+
+wcaa3:: ds 2
wcaa5:: ds 16
wcab5:: ds 10
wcabf:: ds 10
@@ -1100,24 +1030,25 @@ wcb08:: ds 6
wcb0e:: ds 5
wcb13:: ds 9
wcb1c:: ds 14
-wBillsPC_ScrollPosition:: ds 1
-wBillsPC_CursorPosition:: ds 1
-wBillsPC_NumMonsInBox:: ds 1
-wBillsPC_NumMonsOnScreen:: ds 1
-wBillsPC_LoadedBox:: ds 1 ; 0 if party, 1 - 14 if box, 15 if active box
-wBillsPC_BackupScrollPosition:: ds 1
-wBillsPC_BackupCursorPosition:: ds 1
-wBillsPC_BackupLoadedBox:: ds 1
-wBillsPC_MonHasMail:: ds 1
+
+wBillsPC_ScrollPosition:: db
+wBillsPC_CursorPosition:: db
+wBillsPC_NumMonsInBox:: db
+wBillsPC_NumMonsOnScreen:: db
+wBillsPC_LoadedBox:: db ; 0 if party, 1 - 14 if box, 15 if active box
+wBillsPC_BackupScrollPosition:: db
+wBillsPC_BackupCursorPosition:: db
+wBillsPC_BackupLoadedBox:: db
+wBillsPC_MonHasMail:: db
ds 18
+
wcb45:: ds 20
wcb59:: ds 20
wcb6d:: ds 1
wcb6e:: ds 22
wcb84:: ds 100
wcbe8:: dw
-wLinkOTPartyMonTypes::
- ds 2 * PARTY_LENGTH
+wLinkOTPartyMonTypes:: ds 2 * PARTY_LENGTH
ds 84
wcc4a:: ds 22
@@ -1132,26 +1063,37 @@ wccb5:: ds 3
wccb8:: ds 1
wccb9:: ds 1
wccba:: ds 102
-ENDU
+ENDU ; cd20
+
SECTION "Video", WRAM0
-UNION
-CreditsPos::
-BGMapBuffer::
+UNION ; cd20
+; BGMapBuffer
+BGMapBuffer:: ds 40 ; cd20
+BGMapPalBuffer:: ds 40 ; cd48
+BGMapBufferPtrs:: ds 40 ; cd70 ; 20 bg map addresses (16x8 tiles)
+BGMapBufferEnd::
+
+NEXTU ; cd20
+; credits
+CreditsPos:: db
+CreditsUnusedCD21:: db
+CreditsTimer:: db
+
+NEXTU ; cd20
+; mobile data
wMobileMonSpeciesPointerBuffer:: dw
wMobileMonStructurePointerBuffer:: dw
wMobileMonOTNamePointerBuffer:: dw
wMobileMonNicknamePointerBuffer:: dw
wMobileMonMailPointerBuffer:: dw
-NEXTU
+NEXTU ; cd20
+; more mobile data
wcd20:: ds 1
wcd21:: ds 1
-wcd22::
-CreditsTimer:: ; cd22
- ds 1
-
+wcd22:: ds 1
wcd23:: ds 1
wcd24:: ds 1
wMobileCommsJumptableIndex:: ds 1 ; cd25
@@ -1159,11 +1101,11 @@ wcd26:: ds 1
wcd27:: ds 1
wcd28:: ds 1
wcd29:: ds 1
-ENDU
wMobileMonSpeciesBuffer::
-wcd2a:: ds 1
-wTempOddEggNickname::
+wcd2a:: db
+
+wTempOddEggNickname:: ; ds 11
wcd2b:: ds 1
wcd2c:: ds 1
wcd2d:: ds 1
@@ -1177,9 +1119,9 @@ wcd34:: ds 1
wcd35:: ds 1
; current time for link/mobile?
-wcd36:: ds 1 ; hours
-wcd37:: ds 1 ; mins
-wcd38:: ds 1 ; secs
+wcd36:: db ; hours
+wcd37:: db ; mins
+wcd38:: db ; secs
wcd39:: ds 1
wcd3a:: ds 1
@@ -1194,29 +1136,31 @@ wcd42:: ds 1
wcd43:: ds 1
; some sort of timer in link battles
-wMobileInactivityTimerMinutes:: ds 1 ; mins
-wMobileInactivityTimerSeconds:: ds 1 ; secs
-wMobileInactivityTimerFrames:: ds 1 ; frames
-
+wMobileInactivityTimerMinutes:: db ; mins
+wMobileInactivityTimerSeconds:: db ; secs
+wMobileInactivityTimerFrames:: db ; frames
wcd47:: ds 1
-BGMapPalBuffer:: ; cd48
- ds 1 ; 40
+ ds 1
wBTTempOTSprite::
-wcd49:: ds 1
+wcd49:: db
+
wcd4a:: ds 1
wcd4b:: ds 1
+
wEZChatCursorXCoord::
-wcd4c:: ds 1
+wcd4c:: db
wEZChatCursorYCoord::
-wcd4d:: ds 1
+wcd4d:: db
+
wcd4e:: ds 1
wcd4f:: ds 1
wcd50:: ds 1
wcd51:: ds 1
wcd52:: ds 1
-wMobileOpponentBattleMessage:: ; dc $c
+
+wMobileOpponentBattleMessage:: ; ds 12
wcd53:: ds 1
wcd54:: ds 1
wcd55:: ds 1
@@ -1244,18 +1188,15 @@ wcd6b:: ds 1
wcd6c:: ds 1
wcd6d:: ds 1
wcd6e:: ds 1
-wcd6f:: ds 1
-
-BGMapBufferPtrs:: ; cd70
-; 20 bg map addresses (16x8 tiles)
- ds 1 ; 40
-
+wcd6f:: ds 2
wcd71:: ds 1
wcd72:: ds 1
wcd73:: ds 1
wcd74:: ds 1
+
wOTMonSelection:: ds 2 ; ds 3
wcd77:: ds 1
+
wcd78:: ds 1
wcd79:: ds 1
wcd7a:: ds 2
@@ -1272,17 +1213,18 @@ wcd8a:: ds 1
wcd8b:: ds 1
wcd8c:: ds 1
wcd8d:: ds 11
-BGMapBufferEnd::
+ENDU ; cd98
-SGBPredef:: ; cd98
- ds 1
-PlayerHPPal:: ; cd99
- ds 1
-EnemyHPPal:: ; cd9a
- ds 1
+SGBPredef:: db ; cd98
+
+PlayerHPPal:: db ; cd99
+EnemyHPPal:: db ; cd9a
wHPPals:: ds PARTY_LENGTH
-wcda1:: ds 8
+wCurHPPal:: db
+
+ ds 7
+
wSGBPals:: ds 48 ; cda9
AttrMap:: ; cdd9
@@ -1297,101 +1239,123 @@ AttrMap:: ; cdd9
ds SCREEN_WIDTH * SCREEN_HEIGHT
AttrMapEnd::
-UNION
+UNION ; cf41
+; addresses dealing with serial comms
+ ds 1
+wcf42:: db
ds 1
-wcf42:: ds 2
-wcf44:: ds 1
-wcf45::
+wcf44:: db
+wcf45:: db
-NEXTU
-wTileAnimBuffer::
- ds $10
-; addresses dealing with serial comms
-ENDU
+NEXTU ; cf41
+wTileAnimBuffer:: ds 1 tiles
+ENDU ; cf51
-wOtherPlayerLinkMode:: ds 1
-wOtherPlayerLinkAction:: ds 4
-wPlayerLinkAction:: ds 1
-wcf57:: ds 4
+; link data
+wOtherPlayerLinkMode:: db
+wOtherPlayerLinkAction:: db
+ ds 3
+wPlayerLinkAction:: db
+wcf57:: db
+ ds 3
wLinkTimeoutFrames:: dw ; cf5b
-wcf5d:: ds 2
+wcf5d:: dw
-MonType:: ; cf5f
- ds 1
+MonType:: db ; cf5f
-CurSpecies:: ; cf60
-CurMove::
- ds 1
+CurSpecies::
+CurMove:: db ; cf60
+
+wNamedObjectTypeBuffer:: db
-wNamedObjectTypeBuffer:: ds 1
ds 1
-wJumptableIndex::
+
wBattleTowerBattleEnded::
-wcf63:: ds 1
-wNrOfBeatenBattleTowerTrainers::
-wMomBankDigitCursorPosition::
-wIntroSceneFrameCounter::
-wHoldingUnownPuzzlePiece::
-wCardFlipCursorY::
-wCreditsBorderFrame::
-wDexEntryPrevJumptableIndex::
-wcf64:: ds 1
+wJumptableIndex:: db
+
+UNION ; cf64
+; unidentified
+wcf64:: db
+wcf65:: db
+wcf66:: db
+
+NEXTU ; cf64
+; intro and title data
+wIntroSceneFrameCounter:: db
+wTitleScreenTimer:: dw
+
+NEXTU ; cf64
+; credits data
+wCreditsBorderFrame:: db
+wCreditsBorderMon:: db
+wCreditsLYOverride:: db
+
+NEXTU ; cf64
+; unown puzzle data
+wHoldingUnownPuzzlePiece:: db
+wUnownPuzzleCursorPosition:: db
+wUnownPuzzleHeldPiece:: db
+
+NEXTU ; cf64
+; card flip data
+wCardFlipCursorY:: db
+wCardFlipCursorX:: db
+wCardFlipWhichCard:: db
+
+NEXTU ; cf64
+; pokedex
+wDexEntryPrevJumptableIndex:: db
IF !DEF(CRYSTAL11)
-wPokedexStatus::
+wPokedexStatus:: db
ENDC
-wCreditsBorderMon::
-wTitleScreenTimerLo::
-wUnownPuzzleCursorPosition::
-wCardFlipCursorX::
+
+NEXTU ; cf64
+; miscellaneous
+wNrOfBeatenBattleTowerTrainers::
+wMomBankDigitCursorPosition::
+ db
wCurrPocket::
wPrinterQueueLength::
-wcf65:: ds 1
-wCreditsLYOverride::
-wTitleScreenTimerHi::
-wUnownPuzzleHeldPiece::
-wCardFlipWhichCard::
-wcf66:: ds 1
-
-Requested2bpp:: ; cf67
-Requested2bppSize::
- ds 1
-Requested2bppSource:: ; cf68
- ds 2
-Requested2bppDest:: ; cf6a
- ds 2
+ db
+ENDU ; cf67
-Requested1bpp:: ; cf6c
-Requested1bppSize::
- ds 1
-Requested1bppSource:: ; cf6d
- ds 2
-Requested1bppDest:: ; cf6f
- ds 2
+Requested2bpp::
+Requested2bppSize:: db ; cf67
+Requested2bppSource:: dw ; cf68
+Requested2bppDest:: dw ; cf6a
+
+Requested1bpp::
+Requested1bppSize:: db ; cf6c
+Requested1bppSource:: dw ; cf6d
+Requested1bppDest:: dw ; cf6f
wWindowStackPointer:: dw ; cf71
-wMenuJoypad:: ds 1 ; cf73
-MenuSelection:: ds 1 ; cf74
-MenuSelectionQuantity:: ds 1 ; cf75
-wWhichIndexSet:: ds 1 ; cf76
-wScrollingMenuCursorPosition:: ds 1 ; cf77
-wWindowStackSize:: ds 9 ; cf78
+wMenuJoypad:: db ; cf73
+MenuSelection:: db ; cf74
+MenuSelectionQuantity:: db ; cf75
+wWhichIndexSet:: db ; cf76
+wScrollingMenuCursorPosition:: db ; cf77
+wWindowStackSize:: db ; cf78
+
+ ds 8
; menu data header
wMenuDataHeader:: ; cf81
-wMenuFlags:: ds 1
-wMenuBorderTopCoord:: ds 1
-wMenuBorderLeftCoord:: ds 1
-wMenuBorderBottomCoord:: ds 1
-wMenuBorderRightCoord:: ds 1
-wMenuData2Pointer:: ds 2
-wMenuCursorBuffer:: ds 2
-; end menu data header
-wMenuDataBank:: ds 1 ; menu data bank?
+wMenuFlags:: db
+wMenuBorderTopCoord:: db
+wMenuBorderLeftCoord:: db
+wMenuBorderBottomCoord:: db
+wMenuBorderRightCoord:: db
+wMenuData2Pointer:: dw
+wMenuCursorBuffer:: dw
+wMenuDataBank:: db
ds 6
wMenuDataHeaderEnd::
wMenuData2::
-wMenuData2Flags:: ds 1 ; cf91
+UNION ; cf91
+; MenuData2
+wMenuData2Flags:: ; cf91
; bit 7: When set, start printing text one tile to the right of the border
; In scrolling menus, SELECT is functional
; bit 6: When set, start printing text one tile below the border
@@ -1402,104 +1366,98 @@ wMenuData2Flags:: ds 1 ; cf91
; bit 2: ????
; bit 1: Enable Select button
; bit 0: Disable B button
-
-wMenuData2_ScrollingMenuHeight::
-wMenuData2Items::
- ds 1 ; cf92
-wMenuData2IndicesPointer::
-wMenuData2Spacing::
-wMenuData2_ScrollingMenuWidth::
- ds 1 ; cf93
-wMenuData2_2DMenuItemStringsBank::
-wMenuData2_ScrollingMenuSpacing::
- ds 1 ; cf94
-wMenuData2_2DMenuItemStringsAddr::
-wMenuData2DisplayFunctionPointer::
-wMenuData2_ItemsPointerBank::
- ds 1 ; cf95
-wMenuData2_ItemsPointerAddr::
- ds 1 ; cf96
-wMenuData2PointerTableAddr::
-wMenuData2_2DMenuFunctionBank::
- ds 1 ; cf97
-wMenuData2_2DMenuFunctionAddr::
-wMenuData2_ScrollingMenuFunction1::
- ds 3 ; cf98
-wMenuData2_ScrollingMenuFunction2::
- ds 3 ; cf9b
-wMenuData2_ScrollingMenuFunction3::
- ds 3 ; cf9e
+ db
+wMenuData2Items:: db ; cf92
+wMenuData2IndicesPointer:: dw ; cf94
+wMenuData2DisplayFunctionPointer:: dw ; cf96
+wMenuData2PointerTableAddr:: dw ; cf97
+
+NEXTU ; cf91
+; 2D menu
+ ds 2 ; cf91
+wMenuData2Spacing:: db ; cf93
+wMenuData2_2DMenuItemStringsBank:: db ; cf94
+wMenuData2_2DMenuItemStringsAddr:: dw ; cf96
+wMenuData2_2DMenuFunctionBank:: db ; cf97
+wMenuData2_2DMenuFunctionAddr:: dw ; cf98
+
+NEXTU ; cf91
+; scrolling menu
+ ds 1 ; cf91
+wMenuData2_ScrollingMenuHeight:: db ; cf92
+wMenuData2_ScrollingMenuWidth:: db ; cf93
+wMenuData2_ScrollingMenuSpacing:: db ; cf94
+wMenuData2_ItemsPointerBank:: db ; cf95
+wMenuData2_ItemsPointerAddr:: dw ; cf97
+wMenuData2_ScrollingMenuFunction1:: ds 3 ; cf98
+wMenuData2_ScrollingMenuFunction2:: ds 3 ; cf9b
+wMenuData2_ScrollingMenuFunction3:: ds 3 ; cf9e
+ENDU ; cfa1
wMenuData2End::
wMenuData3::
-w2DMenuCursorInitY:: ds 1 ; cfa1
-w2DMenuCursorInitX:: ds 1 ; cfa2
-w2DMenuNumRows:: ds 1 ; cfa3
-w2DMenuNumCols:: ds 1 ; cfa4
-w2DMenuFlags1:: ds 1 ; cfa5
-w2DMenuFlags2:: ds 1 ; cfa6
-w2DMenuCursorOffsets:: ds 1 ; cfa7
-wMenuJoypadFilter:: ds 1 ; cfa8
+w2DMenuCursorInitY:: db ; cfa1
+w2DMenuCursorInitX:: db ; cfa2
+w2DMenuNumRows:: db ; cfa3
+w2DMenuNumCols:: db ; cfa4
+w2DMenuFlags1:: db ; cfa5
+w2DMenuFlags2:: db ; cfa6
+w2DMenuCursorOffsets:: db ; cfa7
+wMenuJoypadFilter:: db ; cfa8
wMenuData3End::
-wMenuCursorY:: ds 1 ; cfa9
-wMenuCursorX:: ds 1 ; cfaa
-wCursorOffCharacter:: ds 1 ; cfab
-wCursorCurrentTile:: ds 2 ; cfac
+wMenuCursorY:: db ; cfa9
+wMenuCursorX:: db ; cfaa
+wCursorOffCharacter:: db ; cfab
+wCursorCurrentTile:: dw ; cfac
+
ds 3
-OverworldDelay:: ; cfb1
- ds 1
-TextDelayFrames:: ; cfb2
- ds 1
-VBlankOccurred:: ; cfb3
- ds 1
+OverworldDelay:: db ; cfb1
+TextDelayFrames:: db ; cfb2
+VBlankOccurred:: db ; cfb3
-PredefID:: ; cfb4
- ds 1
-PredefTemp:: ; cfb5
- ds 2
-PredefAddress:: ; cfb7
- ds 2
-wFarCallBCBuffer:: ; cfb9
- ds 2
+PredefID:: db ; cfb4
+PredefTemp:: dw ; cfb5
+PredefAddress:: dw ; cfb7
+wFarCallBCBuffer:: dw ; cfb9
+
+wcfbb:: db
-wcfbb:: ds 1
GameTimerPause:: ; cfbc
; bit 0
- ds 1
+ db
ds 1
-wcfbe::
-; SGB flags?
- ds 2
+wcfbe:: ; SGB flags?
+; bit 7
+ db
+
+ ds 1
InBattleTowerBattle:: ; cfc0
; 0 not in BattleTower-Battle
; 1 BattleTower-Battle
- ds 1
+ db
ds 1
-FXAnimID::
-FXAnimIDLo:: ; cfc2
- ds 1
-FXAnimIDHi:: ; cfc3
- ds 1
-wPlaceBallsX:: ; cfc4
- ds 1
-wPlaceBallsY:: ; cfc5
- ds 1
-TileAnimationTimer:: ; cfc6
- ds 1
+FXAnimID:: dw ; cfc2
+
+wPlaceBallsX:: db ; cfc4
+wPlaceBallsY:: db ; cfc5
+
+TileAnimationTimer:: db ; cfc6
; palette backups?
-wBGP:: ds 1
-wOBP0:: ds 1
-wOBP1:: ds 1
+wBGP:: db
+wOBP0:: db
+wOBP1:: db
-wNumHits:: ds 2
+wNumHits:: db
+
+ ds 1
Options:: ; cfcc
; bit 0-2: number of frames to delay when printing text
@@ -1509,16 +1467,12 @@ Options:: ; cfcc
; bit 5: stereo off/on
; bit 6: battle style shift/set
; bit 7: battle scene off/on
- ds 1
-
-wSaveFileExists:: ds 1
-
+ db
+wSaveFileExists:: db
TextBoxFrame:: ; cfce
; bits 0-2: textbox frame 0-7
- ds 1
-TextBoxFlags::
- ds 1
-
+ db
+TextBoxFlags:: db
GBPrinter:: ; cfd0
; bit 0-6: brightness
; lightest: $00
@@ -1526,56 +1480,55 @@ GBPrinter:: ; cfd0
; normal: $40 (default)
; darker: $60
; darkest: $7F
- ds 1
-
+ db
Options2:: ; cfd1
; bit 1: menu account off/on
- ds 1
-
+ db
ds 2
OptionsEnd::
; Time buffer, for counting the amount of time since
; an event began.
-
-wSecondsSince:: ds 1
-wMinutesSince:: ds 1
-wHoursSince:: ds 1
-wDaysSince:: ds 1
-
-wRAM0End:: ; cfd8
+wSecondsSince:: db
+wMinutesSince:: db
+wHoursSince:: db
+wDaysSince:: db
SECTION "WRAM 1", WRAMX
+wRAM1Start::
wd000:: ds 1
-DefaultSpawnpoint::
-wd001:: ds 1
-; d002
-UNION
+DefaultSpawnpoint:: db
+
+UNION ; d002
+; mail temp storage
wTempMail:: mailmsg wTempMail
-NEXTU
-wSeerAction:: ds 1
+NEXTU ; d002
+; poke seer
+wSeerAction:: db
wSeerNickname:: ds PKMN_NAME_LENGTH
wSeerCaughtLocation:: ds 17
wSeerTimeOfDay:: ds NAME_LENGTH
wSeerOTName:: ds NAME_LENGTH
-wSeerOTNameGrammar:: ds 1
+wSeerOTNameGrammar:: db
wSeerCaughtLevelString:: ds 4
-wSeerCaughtLevel:: ds 1
-wSeerCaughtData:: ds 1
-wSeerCaughtGender:: ds 1
+wSeerCaughtLevel:: db
+wSeerCaughtData:: db
+wSeerCaughtGender:: db
-NEXTU
+NEXTU ; d002
+; mon buffer
wBufferMonNick:: ds PKMN_NAME_LENGTH ; d002
wBufferMonOT:: ds NAME_LENGTH ; d00d
wBufferMon:: party_struct wBufferMon ; d018
ds 8
wMonOrItemNameBuffer::
-NEXTU
+NEXTU ; d002
+; bug-catching contest
wBugContestResults::
bugcontestwinner wBugContestFirstPlace
bugcontestwinner wBugContestSecondPlace
@@ -1585,89 +1538,120 @@ wBugContestWinnersEnd::
ds 4
wBugContestWinnerName:: ds NAME_LENGTH
-NEXTU
-wd002::
-wTempDayOfWeek::
-wApricorns::
-PhoneScriptBank::
-LuckyNumberDigit1Buffer::
-wCurrentRadioLine::
-wMovementBufferCount::
-wMartItem1BCD::
-wWhichBoxMonToPrint::
- ds 1
-wd003::
-LuckyNumberDigit2Buffer::
-PhoneCallerLo::
-wNextRadioLine::
-wMovementBufferPerson::
-wPlaceBallsDirection::
-wFinishedPrintingBox::
- ds 1
-wd004::
-LuckyNumberDigit3Buffer::
-PhoneCallerHi::
-wRadioTextDelay::
-wTrainerHUDTiles::
-wAddrOfBoxToPrint::
- ds 1
-wd005::
-LuckyNumberDigit4Buffer::
-StartFlypoint:: ; d005
-wNumRadioLinesPrinted::
-wMartItem2BCD::
- ds 1
-wd006::
-wMobileParticipant1Nickname::
-LuckyNumberDigit5Buffer::
-EndFlypoint:: ; d006
-wOaksPkmnTalkSegmentCounter::
-wBankOfBoxToPrint::
- ds 1
-
-wd007::
-wWhichBoxToPrint::
-MovementBuffer:: ; d007
- ds 1
-
-wMartItem3BCD::
-wd008:: ds 2
-wd00a:: ds 1
-wMartItem4BCD::
-wd00b:: ds 1
+NEXTU ; d002
+; mart items
+wMartItem1BCD:: ds 3
+wMartItem2BCD:: ds 3
+wMartItem3BCD:: ds 3
+wMartItem4BCD:: ds 3
+wMartItem5BCD:: ds 3
+wMartItem6BCD:: ds 3
+wMartItem7BCD:: ds 3
+wMartItem8BCD:: ds 3
+wMartItem9BCD:: ds 3
+wMartItem10BCD:: ds 3
+wMartItemBCDEnd::
+NEXTU ; d002
+; town map data
+wTownMapPlayerIconLandmark:: ds 1
UNION
+wTownMapCursorLandmark:: ds 1
+wTownMapCursorObjectPointer:: ds 2
+NEXTU
+wTownMapCursorCoordinates:: ds 2
+ENDU
+
+NEXTU ; d002
+; phone call data
+PhoneScriptBank:: db
+PhoneCaller:: dw
+
+NEXTU ; d002
+; radio data
+wCurrentRadioLine:: db
+wNextRadioLine:: db
+wRadioTextDelay:: db
+wNumRadioLinesPrinted:: db
+wOaksPkmnTalkSegmentCounter:: db
+ ds 5
wRadioText:: ds 2 * SCREEN_WIDTH
wRadioTextEnd::
-NEXTU
-wMobileParticipant2Nickname::
+NEXTU ; d002
+; lucky number show
+LuckyNumberDigit1Buffer:: db
+LuckyNumberDigit2Buffer:: db
+LuckyNumberDigit3Buffer:: db
+LuckyNumberDigit4Buffer:: db
+LuckyNumberDigit5Buffer:: db
+
+NEXTU ; d002
+; movement buffer data
+wMovementBufferCount:: db
+wMovementBufferPerson:: db
+wUnusedMovementBufferBank:: db
+wUnusedMovementBufferPointer:: dw
+MovementBuffer:: ds 55
+
+NEXTU ; d002
+; box printing
+wWhichBoxMonToPrint:: db
+wFinishedPrintingBox:: db
+wAddrOfBoxToPrint:: dw
+wBankOfBoxToPrint:: db
+wWhichBoxToPrint:: db
+
+NEXTU ; d002
+; trainer HUD data
+ ds 1
+wPlaceBallsDirection:: db
+wTrainerHUDTiles:: db
+
+NEXTU ; d002
+; mobile participant nicknames
+ ds 4
+wMobileParticipant1Nickname:: ds 6
+wMobileParticipant2Nickname:: ds 6
+wMobileParticipant3Nickname:: ds 6
+
+NEXTU ; d002
+; earthquake data buffer
+wEarthquakeMovementDataBuffer:: ds 5
+
+NEXTU ; d002
+; miscellaneous
+wTempDayOfWeek::
+wApricorns:: db
+ ds 2
+
+StartFlypoint:: db
+EndFlypoint:: db
+
+NEXTU ; d002
+; unidentified
+wd002:: db
+wd003:: db
+wd004:: db
+
+; mobile?
+ ds 3
+wd008:: ds 2
+ ds 2
wd00c:: ds 1
wd00d:: ds 1
-wMartItem5BCD::
-wd00e:: ds 1
+ ds 1
wd00f:: ds 1
wd010:: ds 1
-wMartItem6BCD::
wd011:: ds 1
-wMobileParticipant3Nickname::
wd012:: ds 1
wd013:: ds 1
-wMartItem7BCD::
wd014:: ds 2
-wd016:: ds 1
-wMartItem8BCD::
+ ds 1
wd017:: ds 1
-
wd018:: ds 1
wd019:: ds 1
-wMartItem9BCD::
-wd01a:: ds 3
-wMartItem10BCD:: ds 2
-wd01f:: ds 1
-wMartItemBCDEnd::
- ds 13
-
+ ds 19
wd02d:: ds 1
wd02e:: ds 1
wd02f:: ds 1
@@ -1677,129 +1661,144 @@ wd032:: ds 1
wd033:: ds 1
wd034:: ds 2
wd036:: ds 2
-wd038:: ds 3
-wd03b:: ds 3
-ENDU
-
-MenuItemsList::
-CurFruitTree::
-CurInput::
-wElevatorPointerBank::
-wCurCoordEventTriggerID::
-wCurSignpostYCoord::
-EngineBuffer1:: ; d03e
- ds 1
-
-wd03f::
-wJumpStdScriptBuffer::
-CurFruit:: ; d03f
-MartPointerBank::
-wElevatorPointerLo::
-wCurCoordEventMapY::
-wCurSignpostXCoord::
-EngineBuffer2::
- ds 1
+ ds 6
-wd040::
-wElevatorPointerHi::
-MartPointer:: ; d040
-wCurCoordEventMapX::
-wCurSignpostType::
-EngineBuffer3::
- ds 1
+UNION ; d03e
+; engine buffers
+EngineBuffer1:: db
+EngineBuffer2:: db
+EngineBuffer3:: db
+EngineBuffer4:: db
+EngineBuffer5:: db
+
+NEXTU ; d03e
+; menu items list
+MenuItemsList:: ds 16
+MenuItemsListEnd::
-wd041::
-wElevatorOriginFloor::
-wTempTrainerHeader::
-wTempTrainerEventFlagLo::
-wCurSignpostScriptAddr::
-EngineBuffer4::
- ds 1
+NEXTU ; d03e
+; fruit tree data
+CurFruitTree:: db
+CurFruit:: db
-wTempTrainerEventFlagHi::
-MovementAnimation:: ; d042
-wCurCoordEventScriptAddr::
-EngineBuffer5::
- ds 1
+NEXTU ; d03e
+; elevator data
+wElevatorPointerBank:: db
+wElevatorPointer:: dw
+wElevatorOriginFloor:: db
-wTempTrainerClass::
-WalkingDirection:: ; d043
-wBargainShopFlags::
+NEXTU ; d03e
+; coord event data
+wCurCoordEventTriggerID:: db
+wCurCoordEventMapY:: db
+wCurCoordEventMapX:: db
ds 1
+wCurCoordEventScriptAddr:: dw
-wTempTrainerID::
-FacingDirection:: ; d044
- ds 1
+NEXTU ; d03e
+; signpost data
+wCurSignpostYCoord:: db
+wCurSignpostXCoord:: db
+wCurSignpostType:: db
+wCurSignpostScriptAddr:: dw
-wSeenTextPointer::
-WalkingX::
-wd045:: ; d045
+NEXTU ; d03e
+; mart data
ds 1
-WalkingY:: ; d046
+MartPointerBank:: db
+MartPointer:: dw
ds 1
+wBargainShopFlags:: db
-WalkingTile:: ; d047
-wWinTextPointer::
- ds 1
-
-wPhoneScriptPointer:: ds 1
-wLossTextPointer:: ds 2
-wScriptAfterPointer:: ds 2
-wRunningTrainerBattleScript:: ds 1
-MenuItemsListEnd::
+NEXTU ; d03e
+; trainer data
+ ds 3
+wTempTrainerHeader::
+wTempTrainerEventFlag:: dw
+wTempTrainerClass:: db
+wTempTrainerID:: db
+wSeenTextPointer:: dw
+wWinTextPointer:: dw
+wLossTextPointer:: dw
+wScriptAfterPointer:: dw
+wRunningTrainerBattleScript:: db
wTempTrainerHeaderEnd::
-wPlayerTurningDirection:: ; d04e
- ds 24
-ENDU
-wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH ; d066
-StringBuffer1:: ; d073
- ds 19
+NEXTU ; d03e
+; player movement data
+CurInput:: db
+wd03f:: db
+wd040:: db
+wd041:: db
+MovementAnimation:: db
+WalkingDirection:: db
+FacingDirection:: db
+WalkingX:: db
+WalkingY:: db
+WalkingTile:: db
+ ds 6
+wPlayerTurningDirection:: db
-StringBuffer2:: ; d086
- ds 19
+NEXTU ; d03e
+; std script buffer
+ ds 1
+wJumpStdScriptBuffer:: ds 3
-StringBuffer3:: ; d099
- ds 19
+NEXTU ; d03e
+; phone script pointer
+ ds 10
+wPhoneScriptPointer:: dw
-StringBuffer4:: ; d0ac
- ds 19
+NEXTU ; d03e
+; backup menu data
+ ds 7
+wMenuCursorBufferBackup:: db
+wMenuScrollPositionBackup:: db
+ ds 31
+ENDU ; d066
+ENDU ; d066
-StringBuffer5:: ; d0bf
- ds 19
+wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH ; d066
-wd0d2:: ds 2
+StringBuffer1:: ds 19 ; d073
+StringBuffer2:: ds 19 ; d086
+StringBuffer3:: ds 19 ; d099
+StringBuffer4:: ds 19 ; d0ac
+StringBuffer5:: ds 19 ; d0bf
-CurBattleMon:: ; d0d4
- ds 1
-CurMoveNum:: ; d0d5
- ds 1
+wBattleMenuCursorBuffer:: dw ; d0d2
-wLastPocket:: ds 1
+CurBattleMon:: db ; d0d4
+CurMoveNum:: db ; d0d5
-wPCItemsCursor:: ds 1
-wPartyMenuCursor:: ds 1
-wItemsPocketCursor:: ds 1
-wKeyItemsPocketCursor:: ds 1
-wBallsPocketCursor:: ds 1
-wTMHMPocketCursor:: ds 1
+wLastPocket:: db
-wPCItemsScrollPosition:: ds 1
-wPartyMenuScrollPosition:: ds 1 ; unused
-wItemsPocketScrollPosition:: ds 1
-wKeyItemsPocketScrollPosition:: ds 1
-wBallsPocketScrollPosition:: ds 1
-wTMHMPocketScrollPosition:: ds 1
+wPCItemsCursor:: db
+wPartyMenuCursor:: db
+wItemsPocketCursor:: db
+wKeyItemsPocketCursor:: db
+wBallsPocketCursor:: db
+wTMHMPocketCursor:: db
+
+wPCItemsScrollPosition:: db
+wPartyMenuScrollPosition:: db ; unused
+wItemsPocketScrollPosition:: db
+wKeyItemsPocketScrollPosition:: db
+wBallsPocketScrollPosition:: db
+wTMHMPocketScrollPosition:: db
-wMoveSwapBuffer::
wSwitchMon::
wSwitchItem::
+wMoveSwapBuffer::
wd0e3:: ds 1
+
wMenuScrollPosition:: ds 4
-wQueuedScriptBank:: ds 1
-wQueuedScriptAddr:: ds 2
-wNumMoves::
-wd0eb:: ds 1
+
+wQueuedScriptBank:: db
+wQueuedScriptAddr:: dw
+
+wNumMoves:: db
+
wFieldMoveSucceeded::
wItemEffectSucceeded::
wPlayerAction::
@@ -1807,266 +1806,210 @@ wPlayerAction::
; 1 - use item
; 2 - switch
wSolvedUnownPuzzle::
- ds 1 ; d0ec
+ db ; d0ec
VramState:: ; d0ed
; bit 0: overworld sprite updating on/off
; bit 6: something to do with text
; bit 7: on when surf initiates
; flickers when climbing waterfall
- ds 1
+ db
-wBattleResult:: ds 1 ; d0ee
-wUsingItemWithSelect:: ds 1 ; d0ef
+wBattleResult:: db ; d0ee
+wUsingItemWithSelect:: db ; d0ef
-UNION
-CurMart:: ds 16 ; d0f0
+UNION ; d0f0
+; mart data
+CurMart:: ds 16
CurMartEnd::
-NEXTU
-CurElevator:: ds 1
-wd0f1::
-CurElevatorFloors::
-wCurMessageIndex:: ds 1
-wd0f2::
-wMailboxCount:: ds 1
+NEXTU ; d0f0
+; elevator data
+CurElevator:: db
+CurElevatorFloors:: db
+
+NEXTU ; d0f0
+; mailbox data
+ ds 1
+wCurMessageIndex:: db
+wMailboxCount:: db
wMailboxItems:: ds MAILBOX_CAPACITY
wMailboxEnd:: ds 1 ; d0fe
+ENDU ; d100
-ENDU
wListPointer:: dw ; d100
wUnusedD102:: dw ; d102
wItemAttributesPtr:: dw ; d104
-CurItem:: ds 1 ; d106
+CurItem:: db ; d106
CurItemQuantity:: ; d107
wMartItemID::
-wd107:: ds 1
+ db
-CurPartySpecies:: ; d108
- ds 1
+CurPartySpecies:: db ; d108
CurPartyMon:: ; d109
; contains which monster in a party
; is being dealt with at the moment
; 0-5
- ds 1
+ db
wWhichHPBar::
; 0: Enemy
; 1: Player
; 2: Party Menu
- ds 1
+ db
wPokemonWithdrawDepositParameter::
; 0: Take from PC
; 1: Put into PC
; 2: Take from Daycare
; 3: Put into Daycare
-wd10b:: ds 1
-wItemQuantityChangeBuffer:: ds 1
-wItemQuantityBuffer:: ds 1
+ db
-TempMon:: ; d10e
- party_struct TempMon
+wItemQuantityChangeBuffer:: db
+wItemQuantityBuffer:: db
-wSpriteFlags:: ds 1 ; d13e
+TempMon:: party_struct TempMon ; d10e
-wHandlePlayerStep:: ds 2 ; d13f
+wSpriteFlags:: db ; d13e
-PartyMenuActionText:: ; d141
- ds 1
+wHandlePlayerStep:: dw ; d13f
-wItemAttributeParamBuffer:: ; d142
- ds 1
+PartyMenuActionText:: db ; d141
-CurPartyLevel:: ; d143
- ds 1
+wItemAttributeParamBuffer:: db ; d142
-wScrollingMenuListSize:: ds 2
+CurPartyLevel:: db ; d143
+
+wScrollingMenuListSize:: dw
; used when following a map warp
; d146
-wNextWarp:: ds 1
-wNextMapGroup:: ds 1
-wNextMapNumber:: ds 1
-wPrevWarp:: ds 1
-wPrevMapGroup:: ds 1
-wPrevMapNumber:: ds 1
+wNextWarp:: db
+wNextMapGroup:: db
+wNextMapNumber:: db
+wPrevWarp:: db
+wPrevMapGroup:: db
+wPrevMapNumber:: db
; d14c
-wPlayerBGMapOffsetX:: ds 1 ; used in FollowNotExact; unit is pixels
-wPlayerBGMapOffsetY:: ds 1 ; used in FollowNotExact; unit is pixels
+wPlayerBGMapOffsetX:: db ; used in FollowNotExact; unit is pixels
+wPlayerBGMapOffsetY:: db ; used in FollowNotExact; unit is pixels
; Player movement
-wPlayerStepVectorX:: ds 1 ; d14e
-wPlayerStepVectorY:: ds 1 ; d14f
-wPlayerStepFlags:: ds 1 ; d150
+wPlayerStepVectorX:: db ; d14e
+wPlayerStepVectorY:: db ; d14f
+wPlayerStepFlags:: db ; d150
+wPlayerStepDirection:: ; d151
; bit 7: Start step
; bit 6: Stop step
; bit 5: Doing step
; bit 4: In midair
; bits 0-3: unused
-wPlayerStepDirection:: ds 1 ; d151
+ db
-wBGMapAnchor:: ds 2 ; d152
+wBGMapAnchor:: dw ; d152
-UNION
-UsedSprites:: ds 64 ; d154
+UNION ; d154
+UsedSprites:: ds 64
UsedSpritesEnd::
-NEXTU
-wd154:: ; d154
- ds 31 ; 64
-
-wd173:: ds 1 ; related to command queue type 3
- ds 13
-wd181:: ds 1
-wd182:: ds 1
- ds 14
-
-wd191:: ds 1
-wd192:: ds 1
-wd193:: ds 1
-ENDU
+NEXTU ; d154
+ ds 31
+wd173:: db ; related to command queue type 3
+ENDU ; d194
wOverworldMapAnchor:: dw ; d194
-wMetatileStandingY:: ds 1 ; d196
-wMetatileStandingX:: ds 1 ; d197
-wSecondMapHeaderBank:: ds 1 ; d198
-wTileset:: ds 1 ; d199
-wPermission:: ds 1 ; d19a
+wMetatileStandingY:: db ; d196
+wMetatileStandingX:: db ; d197
+
+wSecondMapHeaderBank:: db ; d198
+wTileset:: db ; d199
+wPermission:: db ; d19a
wSecondMapHeaderAddr:: dw ; d19b
; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles)
MapHeader:: ; d19d
-MapBorderBlock:: ; d19d
- ds 1
-MapHeight:: ; d19e
- ds 1
-MapWidth:: ; d19f
- ds 1
-MapBlockDataBank:: ; d1a0
- ds 1
-MapBlockDataPointer:: ; d1a1
- ds 2
-MapScriptHeaderBank:: ; d1a3
- ds 1
-MapScriptHeaderPointer:: ; d1a4
- ds 2
-MapEventHeaderPointer:: ; d1a6
- ds 2
+MapBorderBlock:: db ; d19d
+MapHeight:: db ; d19e
+MapWidth:: db ; d19f
+MapBlockDataBank:: db; d1a0
+MapBlockDataPointer:: dw ; d1a1
+MapScriptHeaderBank:: db ; d1a3
+MapScriptHeaderPointer:: dw ; d1a4
+MapEventHeaderPointer:: dw ; d1a6
; bit set
-MapConnections:: ; d1a8
- ds 1
+MapConnections:: db ; d1a8
+
NorthMapConnection:: ; d1a9
-NorthConnectedMapGroup:: ; d1a9
- ds 1
-NorthConnectedMapNumber:: ; d1aa
- ds 1
-NorthConnectionStripPointer:: ; d1ab
- ds 2
-NorthConnectionStripLocation:: ; d1ad
- ds 2
-NorthConnectionStripLength:: ; d1af
- ds 1
-NorthConnectedMapWidth:: ; d1b0
- ds 1
-NorthConnectionStripYOffset:: ; d1b1
- ds 1
-NorthConnectionStripXOffset:: ; d1b2
- ds 1
-NorthConnectionWindow:: ; d1b3
- ds 2
+NorthConnectedMapGroup:: db ; d1a9
+NorthConnectedMapNumber:: db ; d1aa
+NorthConnectionStripPointer:: dw ; d1ab
+NorthConnectionStripLocation:: dw ; d1ad
+NorthConnectionStripLength:: db ; d1af
+NorthConnectedMapWidth:: db ; d1b0
+NorthConnectionStripYOffset:: db ; d1b1
+NorthConnectionStripXOffset:: db ; d1b2
+NorthConnectionWindow:: dw ; d1b3
SouthMapConnection:: ; d1b5
-SouthConnectedMapGroup:: ; d1b5
- ds 1
-SouthConnectedMapNumber:: ; d1b6
- ds 1
-SouthConnectionStripPointer:: ; d1b7
- ds 2
-SouthConnectionStripLocation:: ; d1b9
- ds 2
-SouthConnectionStripLength:: ; d1bb
- ds 1
-SouthConnectedMapWidth:: ; d1bc
- ds 1
-SouthConnectionStripYOffset:: ; d1bd
- ds 1
-SouthConnectionStripXOffset:: ; d1be
- ds 1
-SouthConnectionWindow:: ; d1bf
- ds 2
+SouthConnectedMapGroup:: db ; d1b5
+SouthConnectedMapNumber:: db ; d1b6
+SouthConnectionStripPointer:: dw ; d1b7
+SouthConnectionStripLocation:: dw ; d1b9
+SouthConnectionStripLength:: db ; d1bb
+SouthConnectedMapWidth:: db ; d1bc
+SouthConnectionStripYOffset:: db ; d1bd
+SouthConnectionStripXOffset:: db ; d1be
+SouthConnectionWindow:: dw ; d1bf
WestMapConnection:: ; d1c1
-WestConnectedMapGroup:: ; d1c1
- ds 1
-WestConnectedMapNumber:: ; d1c2
- ds 1
-WestConnectionStripPointer:: ; d1c3
- ds 2
-WestConnectionStripLocation:: ; d1c5
- ds 2
-WestConnectionStripLength:: ; d1c7
- ds 1
-WestConnectedMapWidth:: ; d1c8
- ds 1
-WestConnectionStripYOffset:: ; d1c9
- ds 1
-WestConnectionStripXOffset:: ; d1ca
- ds 1
-WestConnectionWindow:: ; d1cb
- ds 2
+WestConnectedMapGroup:: db ; d1c1
+WestConnectedMapNumber:: db ; d1c2
+WestConnectionStripPointer:: dw ; d1c3
+WestConnectionStripLocation:: dw ; d1c5
+WestConnectionStripLength:: db ; d1c7
+WestConnectedMapWidth:: db ; d1c8
+WestConnectionStripYOffset:: db ; d1c9
+WestConnectionStripXOffset:: db ; d1ca
+WestConnectionWindow:: dw ; d1cb
EastMapConnection:: ; d1cd
-EastConnectedMapGroup:: ; d1cd
- ds 1
-EastConnectedMapNumber:: ; d1ce
- ds 1
-EastConnectionStripPointer:: ; d1cf
- ds 2
-EastConnectionStripLocation:: ; d1d1
- ds 2
-EastConnectionStripLength:: ; d1d3
- ds 1
-EastConnectedMapWidth:: ; d1d4
- ds 1
-EastConnectionStripYOffset:: ; d1d5
- ds 1
-EastConnectionStripXOffset:: ; d1d6
- ds 1
-EastConnectionWindow:: ; d1d7
- ds 2
-
+EastConnectedMapGroup:: db ; d1cd
+EastConnectedMapNumber:: db ; d1ce
+EastConnectionStripPointer:: dw ; d1cf
+EastConnectionStripLocation:: dw ; d1d1
+EastConnectionStripLength:: db ; d1d3
+EastConnectedMapWidth:: db ; d1d4
+EastConnectionStripYOffset:: db ; d1d5
+EastConnectionStripXOffset:: db ; d1d6
+EastConnectionWindow:: dw ; d1d7
TilesetHeader::
-TilesetBank:: ; d1d9
- ds 1
-TilesetAddress:: ; d1da
- ds 2
-TilesetBlocksBank:: ; d1dc
- ds 1
-TilesetBlocksAddress:: ; d1dd
- ds 2
-TilesetCollisionBank:: ; d1df
- ds 1
-TilesetCollisionAddress:: ; d1e0
- ds 2
-TilesetAnim:: ; d1e2
-; bank 3f
- ds 2
-; unused ; d1e4
- ds 2
-TilesetPalettes:: ; d1e6
-; bank 3f
- ds 2
-
-EvolvableFlags:: ; d1e8
- flag_array PARTY_LENGTH
+TilesetBank:: db ; d1d9
+TilesetAddress:: dw ; d1da
+TilesetBlocksBank:: db ; d1dc
+TilesetBlocksAddress:: dw ; d1dd
+TilesetCollisionBank:: db ; d1df
+TilesetCollisionAddress:: dw ; d1e0
+TilesetAnim:: dw ; bank 3f ; d1e2
+ ds 2 ; unused ; d1e4
+TilesetPalettes:: dw ; bank 3f ; d1e6
+
+EvolvableFlags:: flag_array PARTY_LENGTH ; d1e8
wForceEvolution:: db ; d1e9
-UNION
+UNION ; d1ea
+; general-purpose buffers
+Buffer1:: db ; d1ea
+Buffer2:: db ; d1eb
+Buffer3:: db ; d1ec
+Buffer4:: db ; d1ed
+Buffer5:: db ; d1ee
+Buffer6:: db ; d1ef
+
+NEXTU ; d1ea
; HP bar animations
wCurHPAnimMaxHP:: dw ; d1ea
wCurHPAnimOldHP:: dw ; d1ec
@@ -2078,41 +2021,40 @@ wCurHPAnimDeltaHP:: dw ; d1f3
wCurHPAnimLowHP:: db ; d1f5
wCurHPAnimHighHP:: db ; d1f6
-NEXTU
-MagikarpLength::
-wEvolutionOldSpecies::
-Buffer1:: ; d1ea
- ds 1
-MovementType::
-wEvolutionNewSpecies::
-Buffer2:: ; d1eb
- ds 1
-wEvolutionPicOffset::
-Buffer3::
+NEXTU ; d1ea
+; evolution data
+wEvolutionOldSpecies:: db ; d1ea
+wEvolutionNewSpecies:: db ; d1eb
+wEvolutionPicOffset:: db ; d1ec
+wEvolutionCanceled:: db ; d1ed
+
+NEXTU ; d1ea
+; mobile
+ ds 2
wd1ec:: ds 1
-wEvolutionCanceled::
-Buffer4::
wd1ed:: ds 1
-Buffer5::
wd1ee:: ds 1
-Buffer6::
wd1ef:: ds 1
wd1f0:: ds 1
-CurEnemyItem::
wd1f1:: ds 1
wd1f2:: ds 1
-wd1f3:: ds 1
-wd1f4:: ds 1
-wd1f5:: ds 1
-wd1f6::
- ds 4
-ENDU
+wd1f3:: ds 4
-LinkBattleRNs:: ; d1fa
- ds 10
+NEXTU ; d1ea
+; miscellaneous
+wMagikarpLength:: dw
+wSelectedDecoration:: db
+wOtherDecoration:: db
+ ds 3
+CurEnemyItem:: db
+ENDU ; d1f7
-TempEnemyMonSpecies:: ds 1 ; d204
-TempBattleMonSpecies:: ds 1 ; d205
+ ds 3
+
+LinkBattleRNs:: ds 10 ; d1fa
+
+TempEnemyMonSpecies:: db ; d204
+TempBattleMonSpecies:: db ; d205
EnemyMon:: battle_struct EnemyMon ; d206
EnemyMonBaseStats:: ds 5 ; d226
@@ -2125,120 +2067,88 @@ wBattleMode:: ; d22d
; 0: overworld
; 1: wild battle
; 2: trainer battle
- ds 1
+ db
+
+TempWildMonSpecies:: db
-TempWildMonSpecies:: ds 1
OtherTrainerClass:: ; d22f
; class (Youngster, Bug Catcher, etc.) of opposing trainer
; 0 if opponent is a wild Pokémon, not a trainer
- ds 1
+ db
-BattleType:: ; d230
-; $00 normal
-; $01 can lose
-; $02 debug
-; $03 dude/tutorial
-; $04 fishing
-; $05 roaming
-; $06 contest
-; $07 shiny
-; $08 headbutt/rock smash
-; $09 trap
-; $0a force Item1
-; $0b celebi
-; $0c suicune
- ds 1
+; BATTLETYPE_* values
+BattleType:: db ; d230
OtherTrainerID:: ; d231
; which trainer of the class that you're fighting
; (Joey, Mikey, Albert, etc.)
- ds 1
+ db
-wForcedSwitch:: ds 1
+wForcedSwitch:: db
-TrainerClass:: ; d233
- ds 1
+TrainerClass:: db ; d233
-UnownLetter:: ; d234
- ds 1
+UnownLetter:: db ; d234
-wMoveSelectionMenuType:: ds 1
+wMoveSelectionMenuType:: db
+; corresponds to the data/base_stats/*.asm contents
CurBaseData:: ; d236
-BaseDexNo:: ; d236
- ds 1
+BaseDexNo:: db ; d236
BaseStats:: ; d237
-BaseHP:: ; d237
- ds 1
-BaseAttack:: ; d238
- ds 1
-BaseDefense:: ; d239
- ds 1
-BaseSpeed:: ; d23a
- ds 1
-BaseSpecialAttack:: ; d23b
- ds 1
-BaseSpecialDefense:: ; d23c
- ds 1
+BaseHP:: db ; d237
+BaseAttack:: db ; d238
+BaseDefense:: db ; d239
+BaseSpeed:: db ; d23a
+BaseSpecialAttack:: db ; d23b
+BaseSpecialDefense:: db ; d23c
BaseType:: ; d23d
-BaseType1:: ; d23d
- ds 1
-BaseType2:: ; d23e
- ds 1
-BaseCatchRate:: ; d23f
- ds 1
-BaseExp:: ; d240
- ds 1
-BaseItems:: ; d241
- ds 2
-BaseGender:: ; d243
- ds 1
-BaseUnknown1:: ; d244
- ds 1
-BaseEggSteps:: ; d245
- ds 1
-BaseUnknown2:: ; d246
- ds 1
-BasePicSize:: ; d247
- ds 1
-BasePadding:: ; d248
- ds 4
-BaseGrowthRate:: ; d24c
- ds 1
-BaseEggGroups:: ; d24d
- ds 1
-BaseTMHM:: ; d24e
- ds 8
-
-
-CurDamage:: ; d256
- ds 2
-
- ds 2
-wMornEncounterRate:: ds 1 ; d25a
-wDayEncounterRate:: ds 1 ; d25b
-wNiteEncounterRate:: ds 1 ; d25c
-wWaterEncounterRate:: ds 1 ; d25d
+BaseType1:: db ; d23d
+BaseType2:: db ; d23e
+BaseCatchRate:: db ; d23f
+BaseExp:: db ; d240
+BaseItems:: dw ; d241
+BaseGender:: db ; d243
+BaseUnknown1:: db ; d244
+BaseEggSteps:: db ; d245
+BaseUnknown2:: db ; d246
+BasePicSize:: db ; d247
+BasePadding:: ds 4 ; d248
+BaseGrowthRate:: db ; d24c
+BaseEggGroups:: db ; d24d
+BaseTMHM:: flag_array NUM_TM_HM_TUTOR ; d24e
+
+CurDamage:: dw ; d256
+
+ ds 2
+
+wMornEncounterRate:: db ; d25a
+wDayEncounterRate:: db ; d25b
+wNiteEncounterRate:: db ; d25c
+wWaterEncounterRate:: db ; d25d
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
-wPutativeTMHMMove:: ds 1
-wInitListType:: ds 1
-wBattleHasJustStarted:: ds 1
+wPutativeTMHMMove:: db
+wInitListType:: db
+wBattleHasJustStarted:: db
+
wFoundMatchingIDInParty::
wNamedObjectIndexBuffer::
wCurTMHM::
wTypeMatchup::
-wd265:: ds 1
-wFailedToFlee:: ds 1
-wNumFleeAttempts:: ds 1
-wMonTriedToEvolve:: ds 1
+wd265:: db
-TimeOfDay:: ; d269
- ds 1
+wFailedToFlee:: db
+wNumFleeAttempts:: db
+wMonTriedToEvolve:: db
+
+TimeOfDay:: db ; d269
ds 1
+
SECTION "Enemy Party", WRAMX
-UNION
+
+UNION ; d26b
wPokedexShowPointerAddr::
wd26b:: ds 1
wd26c:: ds 1
@@ -2247,33 +2157,35 @@ wd26d:: ds 1
ds 3
wd271:: ds 5
-NEXTU
+NEXTU ; d26b
; SECTION "Enemy Party", WRAMX
OTPlayerName:: ds NAME_LENGTH ; d26b
-ENDU
+ENDU ; d276
OTPlayerID:: ds 2 ; d276
ds 8
OTPartyCount:: ds 1 ; d280
OTPartySpecies:: ds PARTY_LENGTH ; d281
-OTPartyEnd:: ds 1
+OTPartyEnd:: ds 1 ; legacy scripts don't check PartyCount
-UNION
-wDudeBag:: ; d288
-wDudeNumItems:: ds 1
+UNION ; d288
+; catch tutorial dude pack
+wDudeBag::
+wDudeNumItems:: db
wDudeItems:: ds 2 * 4
-wDudeItemsEnd:: ds 1
+wDudeItemsEnd:: db
-wDudeNumKeyItems:: ds 1 ; d292
+wDudeNumKeyItems:: db ; d292
wDudeKeyItems:: ds 18
-wDudeKeyItemsEnd:: ds 1
+wDudeKeyItemsEnd:: db
-wDudeNumBalls:: ds 1 ; d2a6
+wDudeNumBalls:: db ; d2a6
wDudeBalls:: ds 2 * 4 ; d2a7
-wDudeBallsEnd:: ds 1 ; d2af
+wDudeBallsEnd:: db ; d2af
wDudeBagEnd::
-NEXTU
+NEXTU ; d288
+; ot party mons
OTPartyMons::
OTPartyMon1:: party_struct OTPartyMon1 ; d288
OTPartyMon2:: party_struct OTPartyMon2 ; d2b8
@@ -2287,72 +2199,66 @@ OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8
OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea
OTPartyDataEnd::
ds 4
-ENDU
+ENDU ; d430
wd430::
-wBattleAction:: ds 1 ; d430
+wBattleAction:: db ; d430
-wd431:: ds 1
-MapStatus:: ; d432
- ds 1
+wd431:: db
+MapStatus:: db ; d432
MapEventStatus:: ; d433
; 0: do map events
; 1: do background events
- ds 1
+ db
ScriptFlags:: ; d434
; bit 3: priority jump
- ds 1
+ db
ScriptFlags2:: ; d435
- ds 1
+ db
ScriptFlags3:: ; d436
; bit 0: count steps
; bit 1: xy triggers
; bit 2: warps and connections
; bit 4: wild encounters
; bit 5: unknown
- ds 1
+ db
-ScriptMode:: ; d437
- ds 1
-ScriptRunning:: ; d438
- ds 1
-ScriptBank:: ; d439
- ds 1
-ScriptPos:: ; d43a
- ds 2
+ScriptMode:: db ; d437
+ScriptRunning:: db ; d438
+ScriptBank:: db ; d439
+ScriptPos:: dw ; d43a
-wScriptStackSize:: ds 1
+wScriptStackSize:: db
wScriptStack:: ds 3 * 5
ds 1
-ScriptDelay:: ; d44d
- ds 1
+ScriptDelay:: db ; d44d
wPriorityScriptBank::
-wScriptTextBank::
- ds 1 ; d44e
+wScriptTextBank:: db ; d44e
wPriorityScriptAddr::
-wScriptTextAddr:: ds 2 ; d44f
+wScriptTextAddr:: dw ; d44f
ds 1
-wWildEncounterCooldown:: ds 1 ; d452
-wXYComparePointer:: ds 2 ; d453
+wWildEncounterCooldown:: db ; d452
+wXYComparePointer:: dw ; d453
ds 4
-wBattleScriptFlags:: ds 2 ; d459
-wPlayerSpriteSetupFlags:: ds 1 ; d45b
+wBattleScriptFlags:: dw ; d459
+wPlayerSpriteSetupFlags:: ; d45b
; bit 7: if set, cancel PlayerAction
; bit 5: if set, set facing according to bits 0-1
; bits 0-1: direction facing
-wMapReentryScriptQueueFlag:: ds 1 ; d45c MemScriptFlag
-wMapReentryScriptBank:: ds 1 ; d45d MemScriptBank
-wMapReentryScriptAddress:: ds 2 ; d45e MemScriptAddr
- ds 4 ; ?????????????
-wTimeCyclesSinceLastCall:: ds 1 ; d464
-wReceiveCallDelay_MinsRemaining:: ds 1 ; d465
+ db
+wMapReentryScriptQueueFlag:: db ; d45c MemScriptFlag
+wMapReentryScriptBank:: db ; d45d MemScriptBank
+wMapReentryScriptAddress:: dw ; d45e MemScriptAddr
+ ds 4
+wTimeCyclesSinceLastCall:: db ; d464
+wReceiveCallDelay_MinsRemaining:: db ; d465
wReceiveCallDelay_StartTime:: ds 3 ; d466
ds 3
-wBugContestMinsRemaining:: ds 1 ; d46c
-wBugContestSecsRemaining:: ds 1 ; d46d
+wBugContestMinsRemaining:: db ; d46c
+wBugContestSecsRemaining:: db ; d46d
ds 2
wMapStatusEnd:: ds 2 ; d470
@@ -2361,7 +2267,7 @@ PlayerGender:: ; d472
; bit 0:
; 0 male
; 1 female
- ds 1
+ db
wd473:: ds 1
wd474:: ds 1
wd475:: ds 1
@@ -2375,7 +2281,7 @@ wd479:: ds 2
wGameData::
wPlayerData::
PlayerID:: ; d47b
- ds 2
+ dw
PlayerName:: ds NAME_LENGTH ; d47d
MomsName:: ds NAME_LENGTH ; d488
@@ -2383,45 +2289,34 @@ RivalName:: ds NAME_LENGTH ; d493
RedsName:: ds NAME_LENGTH ; d49e
GreensName:: ds NAME_LENGTH ; d4a9
-wSavedAtLeastOnce:: ds 1
-wSpawnAfterChampion:: ds 1
+wSavedAtLeastOnce:: db
+wSpawnAfterChampion:: db
; init time set at newgame
-StartDay:: ; d4b6
- ds 1
-StartHour:: ; d4b7
- ds 1
-StartMinute:: ; d4b8
- ds 1
-StartSecond:: ; d4b9
- ds 1
+StartDay:: db ; d4b6
+StartHour:: db ; d4b7
+StartMinute:: db ; d4b8
+StartSecond:: db ; d4b9
-wRTC:: ; d4ba
- ds 8
-wDST:: ; d4c2
- ds 1
+wRTC:: ds 8 ; d4ba
+wDST:: db ; d4c2
-GameTimeCap:: ; d4c3
- ds 1
-GameTimeHours:: ; d4c4
- ds 2
-GameTimeMinutes:: ; d4c6
- ds 1
-GameTimeSeconds:: ; d4c7
- ds 1
-GameTimeFrames:: ; d4c8
- ds 1
+GameTimeCap:: db ; d4c3
+GameTimeHours:: dw ; d4c4
+GameTimeMinutes:: db ; d4c6
+GameTimeSeconds:: db ; d4c7
+GameTimeFrames:: db ; d4c8
ds 2
-CurDay:: ; d4cb
- ds 1
+CurDay:: db ; d4cb
ds 1
-wObjectFollow_Leader:: ds 1
-wObjectFollow_Follower:: ds 1
-wCenteredObject:: ds 1
-wFollowerMovementQueueLength:: ds 1
+
+wObjectFollow_Leader:: db
+wObjectFollow_Follower:: db
+wCenteredObject:: db
+wFollowerMovementQueueLength:: db
wFollowMovementQueue:: ds 5
ObjectStructs:: ; d4d6
@@ -2441,7 +2336,8 @@ ObjectStructs:: ; d4d6
ObjectStructsEnd:: ; d6de
wCmdQueue:: ds CMDQUEUE_CAPACITY * CMDQUEUE_ENTRY_SIZE
- ds $28
+
+ ds 40
MapObjects:: ; d71e
map_object Player
@@ -2464,23 +2360,19 @@ MapObjectsEnd::
wObjectMasks:: ds NUM_OBJECTS ; d81e
-VariableSprites:: ; d82e
- ds $10
+VariableSprites:: ds 16; d82e
-wEnteredMapFromContinue:: ds 1 ; d83e
+wEnteredMapFromContinue:: db ; d83e
ds 2
-TimeOfDayPal:: ; d841
- ds 1
+TimeOfDayPal:: db ; d841
ds 4
-; d846
-wTimeOfDayPalFlags:: ds 1
-wTimeOfDayPalset:: ds 1
-CurTimeOfDay:: ; d848
- ds 1
+wTimeOfDayPalFlags:: db ; d846
+wTimeOfDayPalset:: db
+CurTimeOfDay:: db ; d848
ds 1
-wSecretID:: ds 2
+wSecretID:: dw
StatusFlags:: ; d84c
; 0 - pokedex
; 1 - unown dex
@@ -2490,7 +2382,7 @@ StatusFlags:: ; d84c
; 5 - wild encounters on/off
; 6 - hall of fame
; 7 - bug contest on
- ds 1
+ db
StatusFlags2:: ; d84d
; 0 - rockets
@@ -2501,356 +2393,323 @@ StatusFlags2:: ; d84d
; 5 - pokerus
; 6 - berry juice?
; 7 - rockets in mahogany
- ds 1
-
-Money:: ; d84e
- ds 3
+ db
-wMomsMoney:: ; d851
- ds 3
-wMomSavingMoney:: ; d854
- ds 1
+Money:: ds 3 ; d84e
+wMomsMoney:: ds 3 ; d851
+wMomSavingMoney:: db ; d854
-Coins:: ; d855
- ds 2
+Coins:: dw ; d855
Badges::
-JohtoBadges:: ; d857
- flag_array 8
-KantoBadges:: ; d858
- flag_array 8
+JohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
+KantoBadges:: flag_array NUM_KANTO_BADGES ; d858
-TMsHMs:: ; d859
- ds NUM_TMS + NUM_HMS
+TMsHMs:: ds NUM_TMS + NUM_HMS ; d859
TMsHMsEnd::
-NumItems:: ; d892
- ds 1
-Items:: ; d893
- ds MAX_ITEMS * 2 + 1
+NumItems:: db ; d892
+Items:: ds MAX_ITEMS * 2 + 1 ; d893
ItemsEnd::
-NumKeyItems:: ; d8bc
- ds 1
-KeyItems:: ; d8bd
- ds MAX_KEY_ITEMS + 1
+NumKeyItems:: db ; d8bc
+KeyItems:: ds MAX_KEY_ITEMS + 1 ; d8bd
KeyItemsEnd::
-NumBalls:: ; d8d7
- ds 1
-Balls:: ; d8d8
- ds MAX_BALLS * 2 + 1
+NumBalls:: db ; d8d7
+Balls:: ds MAX_BALLS * 2 + 1 ; d8d8
BallsEnd::
-PCItems:: ; d8f1
- ds MAX_PC_ITEMS * 2 + 1
+PCItems:: ds MAX_PC_ITEMS * 2 + 1 ; d8f1
PCItemsEnd::
ds 1
-wPokegearFlags:: ds 1
+wPokegearFlags::
; bit 0: map
; bit 1: radio
; bit 2: phone
; bit 3: expn
; bit 7: on/off
-wRadioTuningKnob:: ds 1
-wLastDexMode:: ds 2
-WhichRegisteredItem:: ; d95b
- ds 1
-RegisteredItem:: ; d95c
+ db
+wRadioTuningKnob:: db
+wLastDexMode:: db
ds 1
+WhichRegisteredItem:: db ; d95b
+RegisteredItem:: db ; d95c
-PlayerState:: ; d95d
- ds 1
+PlayerState:: db ; d95d
-wHallOfFameCount:: ds 2
+wHallOfFameCount:: dw
wTradeFlags:: flag_array 6 ; d960
ds 1
-MooMooBerries:: ; d962
- ds 1 ; how many berries fed to MooMoo
-UndergroundSwitchPositions:: ; d963
- ds 1 ; which positions the switches are in
-FarfetchdPosition:: ; d964
- ds 1 ; which position the ilex farfetch'd is in
+MooMooBerries:: db ; d962
+UndergroundSwitchPositions:: db ; d963
+FarfetchdPosition:: db ; d964
ds 13
;SECTION "Map Triggers", WRAMX
-wPokecenter2FTrigger:: ds 1 ; d972
-wTradeCenterTrigger:: ds 1 ; d973
-wColosseumTrigger:: ds 1 ; d974
-wTimeCapsuleTrigger:: ds 1 ; d975
-wPowerPlantTrigger:: ds 1 ; d976
-wCeruleanGymTrigger:: ds 1 ; d977
-wRoute25Trigger:: ds 1 ; d978
-wTrainerHouseB1FTrigger:: ds 1 ; d979
-wVictoryRoadGateTrigger:: ds 1 ; d97a
-wSaffronTrainStationTrigger:: ds 1 ; d97b
-wRoute16GateTrigger:: ds 1 ; d97c
-wRoute1718GateTrigger:: ds 1 ; d97d
-wIndigoPlateauPokecenter1FTrigger:: ds 1 ; d97e
-wWillsRoomTrigger:: ds 1 ; d97f
-wKogasRoomTrigger:: ds 1 ; d980
-wBrunosRoomTrigger:: ds 1 ; d981
-wKarensRoomTrigger:: ds 1 ; d982
-wLancesRoomTrigger:: ds 1 ; d983
-wHallOfFameTrigger:: ds 1 ; d984
-wRoute27Trigger:: ds 1 ; d985
-wNewBarkTownTrigger:: ds 1 ; d986
-wElmsLabTrigger:: ds 1 ; d987
-wKrissHouse1FTrigger:: ds 1 ; d988
-wRoute29Trigger:: ds 1 ; d989
-wCherrygroveCityTrigger:: ds 1 ; d98a
-wMrPokemonsHouseTrigger:: ds 1 ; d98b
-wRoute32Trigger:: ds 1 ; d98c
-wRoute35NationalParkGateTrigger:: ds 1 ; d98d
-wRoute36Trigger:: ds 1 ; d98e
-wRoute36NationalParkGateTrigger:: ds 1 ; d98f
-wAzaleaTownTrigger:: ds 1 ; d990
-wGoldenrodGymTrigger:: ds 1 ; d991
-wGoldenrodMagnetTrainStationTrigger:: ds 1 ; d992
-wGoldenrodPokecenter1FTrigger:: ds 1 ; d993
-wOlivineCityTrigger:: ds 1 ; d994
-wRoute34Trigger:: ds 1 ; d995
-wRoute34IlexForestGateTrigger:: ds 1 ; d996
-wEcruteakHouseTrigger:: ds 1 ; d997
-wWiseTriosRoomTrigger:: ds 1 ; d998
-wEcruteakPokecenter1FTrigger:: ds 1 ; d999
-wEcruteakGymTrigger:: ds 1 ; d99a
-wMahoganyTownTrigger:: ds 1 ; d99b
-wRoute42Trigger:: ds 1 ; d99c
-wCianwoodCityTrigger:: ds 1 ; d99d
-wBattleTower1FTrigger:: ds 1 ; d99e
-wBattleTowerBattleRoomTrigger:: ds 1 ; d99f
-wBattleTowerElevatorTrigger:: ds 1 ; d9a0
-wBattleTowerHallwayTrigger:: ds 1 ; d9a1
-wBattleTowerOutsideTrigger:: ds 1 ; d9a2
-wRoute43GateTrigger:: ds 1 ; d9a3
-wMountMoonTrigger:: ds 1 ; d9a4
-wSproutTower3FTrigger:: ds 1 ; d9a5
-wTinTower1FTrigger:: ds 1 ; d9a6
-wBurnedTower1FTrigger:: ds 1 ; d9a7
-wBurnedTowerB1FTrigger:: ds 1 ; d9a8
-wRadioTower5FTrigger:: ds 1 ; d9a9
-wRuinsOfAlphOutsideTrigger:: ds 1 ; d9aa
-wRuinsOfAlphResearchCenterTrigger:: ds 1 ; d9ab
-wRuinsOfAlphHoOhChamberTrigger:: ds 1 ; d9ac
-wRuinsOfAlphKabutoChamberTrigger:: ds 1 ; d9ad
-wRuinsOfAlphOmanyteChamberTrigger:: ds 1 ; d9ae
-wRuinsOfAlphAerodactylChamberTrigger:: ds 1 ; d9af
-wRuinsOfAlphInnerChamberTrigger:: ds 1 ; d9b0
-wMahoganyMart1FTrigger:: ds 1 ; d9b1
-wTeamRocketBaseB1FTrigger:: ds 1 ; d9b2
-wTeamRocketBaseB2FTrigger:: ds 1 ; d9b3
-wTeamRocketBaseB3FTrigger:: ds 1 ; d9b4
-wUndergroundPathSwitchRoomEntrancesTrigger:: ds 1 ; d9b5
-wSilverCaveRoom3Trigger:: ds 1 ; d9b6
-wVictoryRoadTrigger:: ds 1 ; d9b7
-wDragonsDenB1FTrigger:: ds 1 ; d9b8
-wDragonShrineTrigger:: ds 1 ; d9b9
-wOlivinePortTrigger:: ds 1 ; d9ba
-wVermilionPortTrigger:: ds 1 ; d9bb
-wFastShip1FTrigger:: ds 1 ; d9bc
-wFastShipB1FTrigger:: ds 1 ; d9bd
-wMountMoonSquareTrigger:: ds 1 ; d9be
-wMobileTradeRoomMobileTrigger:: ds 1 ; d9bf
-wMobileBattleRoomTrigger:: ds 1 ; d9c0
+wPokecenter2FTrigger:: db ; d972
+wTradeCenterTrigger:: db ; d973
+wColosseumTrigger:: db ; d974
+wTimeCapsuleTrigger:: db ; d975
+wPowerPlantTrigger:: db ; d976
+wCeruleanGymTrigger:: db ; d977
+wRoute25Trigger:: db ; d978
+wTrainerHouseB1FTrigger:: db ; d979
+wVictoryRoadGateTrigger:: db ; d97a
+wSaffronTrainStationTrigger:: db ; d97b
+wRoute16GateTrigger:: db ; d97c
+wRoute1718GateTrigger:: db ; d97d
+wIndigoPlateauPokecenter1FTrigger:: db ; d97e
+wWillsRoomTrigger:: db ; d97f
+wKogasRoomTrigger:: db ; d980
+wBrunosRoomTrigger:: db ; d981
+wKarensRoomTrigger:: db ; d982
+wLancesRoomTrigger:: db ; d983
+wHallOfFameTrigger:: db ; d984
+wRoute27Trigger:: db ; d985
+wNewBarkTownTrigger:: db ; d986
+wElmsLabTrigger:: db ; d987
+wKrissHouse1FTrigger:: db ; d988
+wRoute29Trigger:: db ; d989
+wCherrygroveCityTrigger:: db ; d98a
+wMrPokemonsHouseTrigger:: db ; d98b
+wRoute32Trigger:: db ; d98c
+wRoute35NationalParkGateTrigger:: db ; d98d
+wRoute36Trigger:: db ; d98e
+wRoute36NationalParkGateTrigger:: db ; d98f
+wAzaleaTownTrigger:: db ; d990
+wGoldenrodGymTrigger:: db ; d991
+wGoldenrodMagnetTrainStationTrigger:: db ; d992
+wGoldenrodPokecenter1FTrigger:: db ; d993
+wOlivineCityTrigger:: db ; d994
+wRoute34Trigger:: db ; d995
+wRoute34IlexForestGateTrigger:: db ; d996
+wEcruteakHouseTrigger:: db ; d997
+wWiseTriosRoomTrigger:: db ; d998
+wEcruteakPokecenter1FTrigger:: db ; d999
+wEcruteakGymTrigger:: db ; d99a
+wMahoganyTownTrigger:: db ; d99b
+wRoute42Trigger:: db ; d99c
+wCianwoodCityTrigger:: db ; d99d
+wBattleTower1FTrigger:: db ; d99e
+wBattleTowerBattleRoomTrigger:: db ; d99f
+wBattleTowerElevatorTrigger:: db ; d9a0
+wBattleTowerHallwayTrigger:: db ; d9a1
+wBattleTowerOutsideTrigger:: db ; d9a2
+wRoute43GateTrigger:: db ; d9a3
+wMountMoonTrigger:: db ; d9a4
+wSproutTower3FTrigger:: db ; d9a5
+wTinTower1FTrigger:: db ; d9a6
+wBurnedTower1FTrigger:: db ; d9a7
+wBurnedTowerB1FTrigger:: db ; d9a8
+wRadioTower5FTrigger:: db ; d9a9
+wRuinsOfAlphOutsideTrigger:: db ; d9aa
+wRuinsOfAlphResearchCenterTrigger:: db ; d9ab
+wRuinsOfAlphHoOhChamberTrigger:: db ; d9ac
+wRuinsOfAlphKabutoChamberTrigger:: db ; d9ad
+wRuinsOfAlphOmanyteChamberTrigger:: db ; d9ae
+wRuinsOfAlphAerodactylChamberTrigger:: db ; d9af
+wRuinsOfAlphInnerChamberTrigger:: db ; d9b0
+wMahoganyMart1FTrigger:: db ; d9b1
+wTeamRocketBaseB1FTrigger:: db ; d9b2
+wTeamRocketBaseB2FTrigger:: db ; d9b3
+wTeamRocketBaseB3FTrigger:: db ; d9b4
+wUndergroundPathSwitchRoomEntrancesTrigger:: db ; d9b5
+wSilverCaveRoom3Trigger:: db ; d9b6
+wVictoryRoadTrigger:: db ; d9b7
+wDragonsDenB1FTrigger:: db ; d9b8
+wDragonShrineTrigger:: db ; d9b9
+wOlivinePortTrigger:: db ; d9ba
+wVermilionPortTrigger:: db ; d9bb
+wFastShip1FTrigger:: db ; d9bc
+wFastShipB1FTrigger:: db ; d9bd
+wMountMoonSquareTrigger:: db ; d9be
+wMobileTradeRoomMobileTrigger:: db ; d9bf
+wMobileBattleRoomTrigger:: db ; d9c0
ds 49
;SECTION "Events", WRAMX
-wJackFightCount:: ds 1 ; d9f2
-wBeverlyFightCount:: ds 1 ; unused
-wHueyFightCount:: ds 1
-wGavenFightCount:: ds 1
-wBethFightCount:: ds 1
-wJoseFightCount:: ds 1
-wReenaFightCount:: ds 1
-wJoeyFightCount:: ds 1
-wWadeFightCount:: ds 1
-wRalphFightCount:: ds 1
-wLizFightCount:: ds 1
-wAnthonyFightCount:: ds 1
-wToddFightCount:: ds 1
-wGinaFightCount:: ds 1
-wIrwinFightCount:: ds 1 ; unused
-wArnieFightCount:: ds 1
-wAlanFightCount:: ds 1
-wDanaFightCount:: ds 1
-wChadFightCount:: ds 1
-wDerekFightCount:: ds 1 ; unused
-wTullyFightCount:: ds 1
-wBrentFightCount:: ds 1
-wTiffanyFightCount:: ds 1
-wVanceFightCount:: ds 1
-wWiltonFightCount:: ds 1
-wKenjiFightCount:: ds 1 ; unused
-wParryFightCount:: ds 1
-wErinFightCount:: ds 1
+wJackFightCount:: db ; d9f2
+wBeverlyFightCount:: db ; unused
+wHueyFightCount:: db
+wGavenFightCount:: db
+wBethFightCount:: db
+wJoseFightCount:: db
+wReenaFightCount:: db
+wJoeyFightCount:: db
+wWadeFightCount:: db
+wRalphFightCount:: db
+wLizFightCount:: db
+wAnthonyFightCount:: db
+wToddFightCount:: db
+wGinaFightCount:: db
+wIrwinFightCount:: db ; unused
+wArnieFightCount:: db
+wAlanFightCount:: db
+wDanaFightCount:: db
+wChadFightCount:: db
+wDerekFightCount:: db ; unused
+wTullyFightCount:: db
+wBrentFightCount:: db
+wTiffanyFightCount:: db
+wVanceFightCount:: db
+wWiltonFightCount:: db
+wKenjiFightCount:: db ; unused
+wParryFightCount:: db
+wErinFightCount:: db
; da0e
ds 100
-EventFlags:: ; da72
- flag_array NUM_EVENTS
+EventFlags:: flag_array NUM_EVENTS ; da72
; db6c
ds 6
-wCurBox:: ; db72
- ds 1
+wCurBox:: db ; db72
ds 2
; 8 chars + $50
wBoxNames:: ds BOX_NAME_LENGTH * NUM_BOXES ; db75
-wCelebiEvent:: ds 1
+wCelebiEvent:: db
+
ds 1
BikeFlags:: ; dbf5
; bit 0: using strength
; bit 1: always on bike
; bit 2: downhill
- ds 1
+ db
ds 1
-wCurrentMapTriggerPointer:: ds 2 ; dbf7
-
-wCurrentCaller:: ds 2 ; dbf9
-wCurrMapWarpCount:: ds 1 ; dbfb
-wCurrMapWarpHeaderPointer:: ds 2 ; dbfc
-wCurrentMapXYTriggerCount:: ds 1 ; dbfe
-wCurrentMapXYTriggerHeaderPointer:: ds 2 ; dbff
-wCurrentMapSignpostCount:: ds 1 ; dc01
-wCurrentMapSignpostHeaderPointer:: ds 2 ; dc02
-wCurrentMapPersonEventCount:: ds 1 ; dc04
-wCurrentMapPersonEventHeaderPointer:: ds 2 ; dc05
-wCurrMapTriggerCount:: ds 1 ; dc07
-wCurrMapTriggerHeaderPointer:: ds 2 ; dc08
-wCurrMapCallbackCount:: ds 1 ; dc0a
-wCurrMapCallbackHeaderPointer:: ds 2 ; dc0b
+
+wCurrentMapTriggerPointer:: dw ; dbf7
+
+wCurrentCaller:: dw ; dbf9
+wCurrMapWarpCount:: db ; dbfb
+wCurrMapWarpHeaderPointer:: dw ; dbfc
+wCurrentMapXYTriggerCount:: db ; dbfe
+wCurrentMapXYTriggerHeaderPointer:: dw ; dbff
+wCurrentMapSignpostCount:: db ; dc01
+wCurrentMapSignpostHeaderPointer:: dw ; dc02
+wCurrentMapPersonEventCount:: db ; dc04
+wCurrentMapPersonEventHeaderPointer:: dw ; dc05
+wCurrMapTriggerCount:: db ; dc07
+wCurrMapTriggerHeaderPointer:: dw ; dc08
+wCurrMapCallbackCount:: db ; dc0a
+wCurrMapCallbackHeaderPointer:: dw ; dc0b
+
ds 2
; Sprite id of each decoration
-Bed:: ; dc0f
- ds 1
-Carpet:: ; dc10
- ds 1
-Plant:: ; dc11
- ds 1
-Poster:: ; dc12
- ds 1
-Console:: ; dc13
- ds 1
-LeftOrnament:: ; dc14
- ds 1
-RightOrnament:: ; dc15
- ds 1
-BigDoll:: ; dc16
- ds 1
+Bed:: db ; dc0f
+Carpet:: db ; dc10
+Plant:: db ; dc11
+Poster:: db ; dc12
+Console:: db ; dc13
+LeftOrnament:: db ; dc14
+RightOrnament:: db ; dc15
+BigDoll:: db ; dc16
; Items bought from Mom
-wWhichMomItem:: ds 1 ; dc17
-wWhichMomItemSet:: ds 1 ; dc18
+wWhichMomItem:: db ; dc17
+wWhichMomItemSet:: db ; dc18
MomItemTriggerBalance:: ds 3 ; dc19
-wDailyResetTimer:: ds 2 ; dc1c
-DailyFlags:: ds 1
-WeeklyFlags:: ds 1
-SwarmFlags:: ds 1
+wDailyResetTimer:: dw ; dc1c
+DailyFlags:: db
+WeeklyFlags:: db
+SwarmFlags:: db
ds 2
-wStartDay:: ds 1
+wStartDay:: db
ds 3
FruitTreeFlags:: flag_array NUM_FRUIT_TREES ; dc27
ds 2
-wLuckyNumberDayBuffer:: ds 2 ; dc2d
+wLuckyNumberDayBuffer:: dw ; dc2d
ds 2
-wSpecialPhoneCallID:: ds 1 ; dc31
+wSpecialPhoneCallID:: db ; dc31
ds 3
wBugContestStartTime:: ds 4 ; day, hour, min, sec ; dc35
-wUnusedTwoDayTimerOn:: ds 1 ; dc39
-wUnusedTwoDayTimer:: ds 1
-wUnusedTwoDayTimerStartDate:: ds 1
+wUnusedTwoDayTimerOn:: db ; dc39
+wUnusedTwoDayTimer:: db
+wUnusedTwoDayTimerStartDate:: db
ds 4
-wMobileOrCable_LastSelection:: ds 1
+wMobileOrCable_LastSelection:: db
wdc41:: ds 1
wdc42:: ds 8
-wBuenasPassword:: ds 1
-wBlueCardBalance:: ds 1
+wBuenasPassword:: db
+wBlueCardBalance:: db
wDailyRematchFlags:: ds 4
wDailyPhoneItemFlags:: ds 4
wDailyPhoneTimeOfDayFlags:: ds 4
wKenjiBreakTimer:: ds 2 ; Kenji
-wYanmaMapGroup:: ds 1 ; dc5a
-wYanmaMapNumber:: ds 1
+wYanmaMapGroup:: db ; dc5a
+wYanmaMapNumber:: db
wPlayerMonSelection:: ds 3
wdc5f:: ds 1
wdc60:: ds 19
-StepCount:: ; dc73
- ds 1
-PoisonStepCount:: ; dc74
- ds 1
-
+StepCount:: db ; dc73
+PoisonStepCount:: db ; dc74
ds 2
-wHappinessStepCount:: ds 1
+wHappinessStepCount:: db
ds 1
+
wParkBallsRemaining::
-wSafariBallsRemaining:: ds 1 ; dc79
-wSafariTimeRemaining:: ds 2 ; dc7a
+wSafariBallsRemaining:: db ; dc79
+wSafariTimeRemaining:: dw ; dc7a
+
wPhoneList:: ds CONTACT_LIST_SIZE ; dc7c
; dc86
ds 23
-wLuckyNumberShowFlag:: ds 2 ; dc9d
-wLuckyIDNumber:: ds 2 ; dc9f
-wRepelEffect:: ds 1 ; If a Repel is in use, it contains the nr of steps it's still active
-wBikeStep:: ds 2
-wKurtApricornQuantity:: ds 1
+
+wLuckyNumberShowFlag:: dw ; dc9d
+wLuckyIDNumber:: dw ; dc9f
+
+wRepelEffect:: db ; If a Repel is in use, it contains the nr of steps it's still active
+wBikeStep:: dw
+wKurtApricornQuantity:: db
wPlayerDataEnd::
wMapData::
-VisitedSpawns:: ; dca5
- flag_array NUM_SPAWNS
+VisitedSpawns:: flag_array NUM_SPAWNS ; dca5
+
+wDigWarpNumber:: db ; dcaa
+wDigMapGroup:: db ; dcab
+wDigMapNumber:: db ; dcac
-wDigWarp:: ds 1 ; dcaa
-wDigMapGroup:: ds 1 ; dcab
-wDigMapNumber:: ds 1 ; dcac
; used on maps like second floor pokécenter, which are reused, so we know which
; map to return to
-BackupWarpNumber:: ; dcad
- ds 1
-BackupMapGroup:: ; dcae
- ds 1
-BackupMapNumber:: ; dcaf
- ds 1
+BackupWarpNumber:: db ; dcad
+BackupMapGroup:: db ; dcae
+BackupMapNumber:: db ; dcaf
ds 3
-wLastSpawnMapGroup:: ds 1
-wLastSpawnMapNumber:: ds 1
+wLastSpawnMapGroup:: db
+wLastSpawnMapNumber:: db
-WarpNumber:: ; dcb4
- ds 1
-MapGroup:: ; dcb5
- ds 1 ; map group of current map
-MapNumber:: ; dcb6
- ds 1 ; map number of current map
-YCoord:: ; dcb7
- ds 1 ; current y coordinate relative to top-left corner of current map
-XCoord:: ; dcb8
- ds 1 ; current x coordinate relative to top-left corner of current map
+WarpNumber:: db ; dcb4
+MapGroup:: db ; dcb5 ; map group of current map
+MapNumber:: db ; dcb6 ; map number of current map
+YCoord:: db ; dcb7 ; current y coordinate relative to top-left corner of current map
+XCoord:: db ; dcb8 ; current x coordinate relative to top-left corner of current map
wScreenSave:: ds 6 * 5
wMapDataEnd::
@@ -2860,12 +2719,9 @@ SECTION "Party", WRAMX
wPokemonData::
-PartyCount:: ; dcd7
- ds 1 ; number of Pokémon in party
-PartySpecies:: ; dcd8
- ds PARTY_LENGTH ; species of each Pokémon in party
-PartyEnd:: ; dcde
- ds 1 ; legacy scripts don't check PartyCount
+PartyCount:: db ; dcd7 ; number of Pokémon in party
+PartySpecies:: ds PARTY_LENGTH ; dcd8 ; species of each Pokémon in party
+PartyEnd:: db ; dcde ; legacy scripts don't check PartyCount
PartyMons::
PartyMon1:: party_struct PartyMon1 ; dcdf
@@ -2880,32 +2736,25 @@ PartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; ddff
PartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; de41
PartyMonNicknamesEnd::
-
ds 22
-PokedexCaught:: ; de99
- flag_array NUM_POKEMON
+PokedexCaught:: flag_array NUM_POKEMON ; de99
EndPokedexCaught::
-PokedexSeen:: ; deb9
- flag_array NUM_POKEMON
+PokedexSeen:: flag_array NUM_POKEMON ; deb9
EndPokedexSeen::
-UnownDex:: ; ded9
- ds 26
-UnlockedUnowns:: ; def3
- ds 1
-
-wFirstUnownSeen:: ds 1
-
+UnownDex:: ds NUM_UNOWN ; ded9
+UnlockedUnowns:: db ; def3
+wFirstUnownSeen:: db
wDaycareMan:: ; def5
; bit 7: active
; bit 6: monsters are compatible
; bit 5: egg ready
; bit 0: monster 1 in daycare
- ds 1
+ db
wBreedMon1::
wBreedMon1Nick:: ds PKMN_NAME_LENGTH ; def6
@@ -2915,14 +2764,14 @@ wBreedMon1Stats:: box_struct wBreedMon1 ; df0c
wDaycareLady:: ; df2c
; bit 7: active
; bit 0: monster 2 in daycare
- ds 1
+ db
wStepsToEgg:: ; df2d
- ds 1
+ db
wBreedMotherOrNonDitto:: ; df2e
; z: yes
; nz: no
- ds 1
+ db
wBreedMon2::
wBreedMon2Nick:: ds PKMN_NAME_LENGTH ; df2f
@@ -2933,62 +2782,64 @@ wEggNick:: ds PKMN_NAME_LENGTH ; df65
wEggOT:: ds NAME_LENGTH ; df70
wEggMon:: box_struct wEggMon ; df7b
-wBugContestSecondPartySpecies:: ds 1
+wBugContestSecondPartySpecies:: db
wContestMon:: party_struct wContestMon ; df9c
-wDunsparceMapGroup:: ds 1
-wDunsparceMapNumber:: ds 1
-wFishingSwarmFlag:: ds 1
+wDunsparceMapGroup:: db
+wDunsparceMapNumber:: db
+wFishingSwarmFlag:: db
wRoamMon1:: roam_struct wRoamMon1 ; dfcf
wRoamMon2:: roam_struct wRoamMon2 ; dfd6
wRoamMon3:: roam_struct wRoamMon3 ; dfdd
-wRoamMons_CurrentMapNumber:: ds 1
-wRoamMons_CurrentMapGroup:: ds 1
-wRoamMons_LastMapNumber:: ds 1
-wRoamMons_LastMapGroup:: ds 1
-wBestMagikarpLengthFeet:: ds 1
-wBestMagikarpLengthInches:: ds 1
+wRoamMons_CurrentMapNumber:: db
+wRoamMons_CurrentMapGroup:: db
+wRoamMons_LastMapNumber:: db
+wRoamMons_LastMapGroup:: db
+wBestMagikarpLengthFeet:: db
+wBestMagikarpLengthInches:: db
wMagikarpRecordHoldersName:: ds NAME_LENGTH
; dff5
wPokemonDataEnd::
wGameDataEnd::
+
SECTION "Pic Animations", WRAMX
TempTileMap::
; 20x18 grid of 8x8 tiles
ds SCREEN_WIDTH * SCREEN_HEIGHT ; $168 = 360
+
; PokeAnim Header
-wPokeAnimSceneIndex:: ds 1
-wPokeAnimPointer:: ds 2
-wPokeAnimSpecies:: ds 1
-wPokeAnimUnownLetter:: ds 1
-wPokeAnimSpeciesOrUnown:: ds 1
-wPokeAnimGraphicStartTile:: ds 1
-wPokeAnimCoord:: ds 2
-wPokeAnimFrontpicHeight:: ds 1
+wPokeAnimSceneIndex:: db
+wPokeAnimPointer:: dw
+wPokeAnimSpecies:: db
+wPokeAnimUnownLetter:: db
+wPokeAnimSpeciesOrUnown:: db
+wPokeAnimGraphicStartTile:: db
+wPokeAnimCoord:: dw
+wPokeAnimFrontpicHeight:: db
; PokeAnim Data
-wPokeAnimExtraFlag:: ds 1
-wPokeAnimSpeed:: ds 1
-wPokeAnimPointerBank:: ds 1
-wPokeAnimPointerAddr:: ds 2
-wPokeAnimFramesBank:: ds 1
-wPokeAnimFramesAddr:: ds 2
-wPokeAnimBitmaskBank:: ds 1
-wPokeAnimBitmaskAddr:: ds 2
-wPokeAnimFrame:: ds 1
-wPokeAnimJumptableIndex:: ds 1
-wPokeAnimRepeatTimer:: ds 1
-wPokeAnimCurBitmask:: ds 1
-wPokeAnimWaitCounter:: ds 1
-wPokeAnimCommand:: ds 1
-wPokeAnimParameter:: ds 1
- ds 1
-wPokeAnimBitmaskCurCol:: ds 1
-wPokeAnimBitmaskCurRow:: ds 1
-wPokeAnimBitmaskCurBit:: ds 1
+wPokeAnimExtraFlag:: db
+wPokeAnimSpeed:: db
+wPokeAnimPointerBank:: db
+wPokeAnimPointerAddr:: dw
+wPokeAnimFramesBank:: db
+wPokeAnimFramesAddr:: dw
+wPokeAnimBitmaskBank:: db
+wPokeAnimBitmaskAddr:: dw
+wPokeAnimFrame:: db
+wPokeAnimJumptableIndex:: db
+wPokeAnimRepeatTimer:: db
+wPokeAnimCurBitmask:: db
+wPokeAnimWaitCounter:: db
+wPokeAnimCommand:: db
+wPokeAnimParameter:: db
+ ds 1
+wPokeAnimBitmaskCurCol:: db
+wPokeAnimBitmaskCurRow:: db
+wPokeAnimBitmaskCurBit:: db
wPokeAnimBitmaskBuffer:: ds 7
ds 2
wPokeAnimStructEnd::
@@ -3017,17 +2868,17 @@ w3_d3c2:: battle_tower_struct w3_d3c2
w3_d4a2:: battle_tower_struct w3_d4a2
w3_d582:: battle_tower_struct w3_d582
w3_d662:: battle_tower_struct w3_d662
-UNION
+UNION ; d742
w3_d742:: battle_tower_struct w3_d742
; d822
-NEXTU
+NEXTU ; d742
ds $be
wBTChoiceOfLvlGroup::
w3_d800:: ; ds BG_MAP_WIDTH * SCREEN_HEIGHT ($240)
ds $69
-ENDU
+ENDU ; d869
w3_d869:: ds $17
w3_d880:: ds 1
w3_d881:: ds 1
@@ -3049,28 +2900,29 @@ w3_dd68:: ds SCREEN_WIDTH * SCREEN_HEIGHT
w3_dfec:: ds $10
w3_dffc:: ds 4
+
SECTION "GBC Video", WRAMX
-; 8 4-color palettes
+; eight 4-color palettes each
UnknBGPals:: ds 8 palettes ; d000
UnknOBPals:: ds 8 palettes ; d040
BGPals:: ds 8 palettes ; d080
OBPals:: ds 8 palettes ; d0c0
-LYOverrides:: ; d100
- ds SCREEN_HEIGHT_PX
+LYOverrides:: ds SCREEN_HEIGHT_PX ; d100
LYOverridesEnd:: ; d190
ds 1
-wMagnetTrainDirection:: ds 1
-wMagnetTrainInitPosition:: ds 1
-wMagnetTrainHoldPosition:: ds 1
-wMagnetTrainFinalPosition:: ds 1
-wMagnetTrainPlayerSpriteInitX:: ds 1
+
+wMagnetTrainDirection:: db
+wMagnetTrainInitPosition:: db
+wMagnetTrainHoldPosition:: db
+wMagnetTrainFinalPosition:: db
+wMagnetTrainPlayerSpriteInitX:: db
+
ds 106
-LYOverridesBackup:: ; d200
- ds SCREEN_HEIGHT_PX
+LYOverridesBackup:: ds SCREEN_HEIGHT_PX ; d200
LYOverridesBackupEnd::
@@ -3099,51 +2951,46 @@ BGEffect4:: battle_bg_effect BGEffect4
BGEffect5:: battle_bg_effect BGEffect5
ActiveBGEffectsEnd::
-wNumActiveBattleAnims:: ds 1 ; d40e
+wNumActiveBattleAnims:: db ; d40e
-BattleAnimFlags:: ; d40f
- ds 1
-BattleAnimAddress:: ; d410
- ds 2
-BattleAnimDuration:: ; d412
- ds 1
-BattleAnimParent:: ; d413
- ds 2
-BattleAnimLoops:: ; d415
- ds 1
-BattleAnimVar:: ; d416
- ds 1
-BattleAnimByte:: ; d417
- ds 1
-wBattleAnimOAMPointerLo:: ds 1 ; d418
+BattleAnimFlags:: db ; d40f
+BattleAnimAddress:: dw ; d410
+BattleAnimDuration:: db ; d412
+BattleAnimParent:: dw ; d413
+BattleAnimLoops:: db ; d415
+BattleAnimVar:: db ; d416
+BattleAnimByte:: db ; d417
+wBattleAnimOAMPointerLo:: db ; d418
BattleAnimTemps:: ; d419
wBattleAnimTempOAMFlags::
-wBattleAnimTemp0:: ds 1
-wBattleAnimTemp1:: ds 1
+wBattleAnimTemp0:: db
+wBattleAnimTemp1:: db
wBattleAnimTempTileID::
-wBattleAnimTemp2:: ds 1
+wBattleAnimTemp2:: db
wBattleAnimTempXCoord::
-wBattleAnimTemp3:: ds 1
+wBattleAnimTemp3:: db
wBattleAnimTempYCoord::
-wBattleAnimTemp4:: ds 1
+wBattleAnimTemp4:: db
wBattleAnimTempXOffset::
-wBattleAnimTemp5:: ds 1
+wBattleAnimTemp5:: db
wBattleAnimTempYOffset::
-wBattleAnimTemp6:: ds 1
-wBattleAnimTemp7:: ds 1
+wBattleAnimTemp6:: db
+wBattleAnimTemp7:: db
wBattleAnimTempPalette::
-wBattleAnimTemp8:: ds 1
+wBattleAnimTemp8:: db
-UNION
+UNION ; d422
wSurfWaveBGEffect:: ds $40
wSurfWaveBGEffectEnd::
-NEXTU
+NEXTU ; d422
ds $32
wBattleAnimEnd::
-ENDU
+ENDU ; d462
+
SECTION "WRAM 5 MOBILE", WRAMX
+
w5_d800:: ds $200
w5_da00:: ds $200
w5_dc00:: ds $d
@@ -3154,17 +3001,23 @@ w5_MobileOpponentBattleStartMessage:: ds $c ; dc26
w5_MobileOpponentBattleWinMessage:: ds $c ; dc32
w5_MobileOpponentBattleLossMessage:: ds $c ; dc3e
+
SECTION "WRAM 6", WRAMX
-wDecompressScratch::
-wScratchTileMap::
- ds BG_MAP_WIDTH * BG_MAP_HEIGHT
-wScratchAttrMap:: ds $200
-w6_d600:: ds $200
-w6_d800::
+UNION ; d000
+wScratchTileMap:: ds BG_MAP_WIDTH * BG_MAP_HEIGHT
+wScratchAttrMap:: ds BG_MAP_WIDTH * BG_MAP_HEIGHT
+
+NEXTU ; d000
+wDecompressScratch:: ds $80 tiles
+wDecompressEnemyFrontpic:: ds $80 tiles
+ENDU ; e000
-INCLUDE "sram.asm"
SECTION "WRAM 7", WRAMX
+
wWindowStack:: ds $1000 - 1
wWindowStackBottom:: ds 1
+
+
+INCLUDE "sram.asm"