summaryrefslogtreecommitdiff
path: root/wram.asm
diff options
context:
space:
mode:
Diffstat (limited to 'wram.asm')
-rwxr-xr-xwram.asm264
1 files changed, 210 insertions, 54 deletions
diff --git a/wram.asm b/wram.asm
index 15ed6461..79a86bfc 100755
--- a/wram.asm
+++ b/wram.asm
@@ -228,7 +228,39 @@ wSpriteStateData1:: ; c100
; C1xD
; C1xE
; C1xF
- ds $10 * $10
+spritestatedata1: MACRO
+w\1SpriteStateData1::
+w\1PictureID:: db
+w\1MovementStatus:: db
+w\1SpriteImageIdx:: db
+w\1YStepVector:: db
+w\1YPixels:: db
+w\1XStepVector:: db
+w\1XPixels:: db
+w\1IntraAnimFrameCounter:: db
+w\1AnimFrameCounter:: db
+w\1FacingDirection:: db
+ ds 6
+w\1SpriteStateData1End::
+endm
+
+ spritestatedata1 Player
+ spritestatedata1 Sprite01
+ spritestatedata1 Sprite02
+ spritestatedata1 Sprite03
+ spritestatedata1 Sprite04
+ spritestatedata1 Sprite05
+ spritestatedata1 Sprite06
+ spritestatedata1 Sprite07
+ spritestatedata1 Sprite08
+ spritestatedata1 Sprite09
+ spritestatedata1 Sprite10
+ spritestatedata1 Sprite11
+ spritestatedata1 Sprite12
+ spritestatedata1 Sprite13
+ spritestatedata1 Sprite14
+ spritestatedata1 Pikachu
+ ; ds $10 * $10
;SECTION "Sprite State Data 2", WRAM0[$c200]
@@ -253,7 +285,40 @@ wSpriteStateData2:: ; c200
; C2xD
; C2xE: sprite image base offset (in video ram, player always has value 1, used to compute c1x2)
; C2xF
- ds $10 * $10
+spritestatedata2: MACRO
+w\1SpriteStateData2::
+w\1WalkAnimationCounter:: db
+ ds 1
+w\1YDisplacement:: db
+w\1XDisplacement:: db
+w\1MapY:: db
+w\1MapX:: db
+w\1MovementByte1:: db
+w\1GrassPriority:: db
+w\1MovementDelay:: db
+ ds 5
+w\1SpriteImageBaseOffset:: db
+ ds 1
+w\1SpriteStateData2End::
+endm
+
+ spritestatedata2 Player
+ spritestatedata2 Sprite01
+ spritestatedata2 Sprite02
+ spritestatedata2 Sprite03
+ spritestatedata2 Sprite04
+ spritestatedata2 Sprite05
+ spritestatedata2 Sprite06
+ spritestatedata2 Sprite07
+ spritestatedata2 Sprite08
+ spritestatedata2 Sprite09
+ spritestatedata2 Sprite10
+ spritestatedata2 Sprite11
+ spritestatedata2 Sprite12
+ spritestatedata2 Sprite13
+ spritestatedata2 Sprite14
+ spritestatedata2 Pikachu
+ ; ds $10 * $10
wSpriteDataEnd::
@@ -404,11 +469,14 @@ wc632:: ; c632
ds 1
wc633:: ; c633
ds 1
+
+wYellowIntroCurrentScene:: ; c634
wc634:: ; c634
ds 1
+wYellowIntroSceneTimer:: ; c635
wc635:: ; c635
ds 1
-wc636:: ; c636
+wYellowIntroAnimatedObjectStructPointer:: ; c636
ds 2
; c638
@@ -417,21 +485,98 @@ wc636:: ; c636
; c698
ds 80
-wTempPic::
+wTempPic:: ; c6e8
+wPrinterData:: ; c6e8
wOverworldMap:: ; c6e8
; ds 1300
- ds $18
+wPrinterSendState:: ; c6e8
+ ds 1
+wPrinterRowIndex:: ; c6e9
+ ds 1
+
+; Printer data header
+wPrinterDataHeader:: ; c6ea
+wc6ea:: ; c6ea
+ ds 1
+wc6eb:: ; c6eb
+ ds 1
+wc6ec:: ; c6ec
+ ds 1
+wc6ed:: ; c6ed
+ ds 1
+wPrinterChecksum:: ; c6ee
+ dw
+
+wPrinterSendDataSource:: ; c6f0
+; a 40-tile buffer
+; ds $280
+wPrinterSerialReceived:: ; c6f0
+ ds 1
+wPrinterStatusReceived:: ; c6f1
+; 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
+
+wc6f2:: ; c6f2
+ ds 1
+wc6f3:: ; c6f3
+ ds 13
wc700:: ; c700
ds $10
wc710:: ; c710
ds $f0
-wc800:: ; c800
- ds $178
+wYellowIntroSurfingPikaSineWaveBuffer:: ; c800
+ ; ds $100
+ ds $10
+wc810:: ; c810
+ ds $20
+wc830:: ; c830
+ ds $d0
+
+; c900
+ ds $70
+wPrinterSendDataSourceEnd:: ; c970
+wPrinterHandshake:: ; c970
+ ds 1
+wPrinterStatusFlags:: ; c971
+ ds 1
+wHandshakeFrameDelay:: ; c972
+ ds 1
+wPrinterSerialFrameDelay:: ; c973
+ ds 1
+wPrinterSendByteOffset:: ; c974
+ dw
+wPrinterDataSize:: ; c976
+ dw
wPrinterTileBuffer:: ; c978
ds SCREEN_HEIGHT * SCREEN_WIDTH
-wcae0:: ; cae0
- ds 284
+wPrinterStatusIndicator:: ; cae0
+ ds 2
+wcae2:: ; cae2
+ ds 1
+wPrinterSettingsTempCopy:: ; cae3
+ ds 17
+wPrinterQueueLength:: ; caf4
+ ds 1
+wPrinterDataEnd:: ; caf5
+
+wPrinterPokedexEntryTextPointer:: ; caf5
+ dw
+ ds 2
+wPrinterPokedexMonIsOwned:: ; caf9
+ ds 227
+
+wcbdc:: ; cbdc
+ ds 14
+
+wcbea:: ; cbea
+ ds 2
+
+wcbec:: ; cbec
+ ds 16
wRedrawRowOrColumnSrcTiles:: ; cbfc
; the tiles of the row or column to be redrawn by RedrawRowOrColumn
@@ -653,8 +798,11 @@ wAnimationType:: ; cc5b
; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon...
wNPCMovementDirections:: ; cc5b
+
+wPikaPicUsedGFXCount:: ; cc5b
ds 1
+wPikaPicUsedGFX:: ; cc5c
wDexRatingNumMonsOwned:: ; cc5c
ds 1
@@ -667,7 +815,9 @@ wSlotMachineSavedROMBank:: ; cc5e
; ROM back to return to when the player is done with the slot machine
ds 1
- ds 26
+ ds 13
+wPikaPicUsedGFXEnd:: ; cc6c
+ ds 13
wAnimPalette:: ; cc79
ds 1
@@ -696,7 +846,9 @@ wPikaPicAnimObjectDataBuffer:: ; cc98
wNumStepsToTake:: ; cca1
; used in Pallet Town scripted movement
- ds 49
+ ds 23
+wPikaPicAnimObjectDataBufferEnd:: ;ccb8
+ ds 26
wRLEByteCount:: ; ccd2
ds 1
@@ -989,7 +1141,7 @@ wWhichBadge:: ; cd3d
wPriceTemp:: ; cd3d
; 3-byte BCD number
-wTitleMonSpecies:: ; cd3d
+wTitleScreenScene:: ; cd3d
wPlayerCharacterOAMTile:: ; cd3d
@@ -1052,6 +1204,8 @@ wTrainerSpriteOffset:: ; cd3d
wUnusedCD3D:: ; cd3d
ds 1
+wTitleScreenTimer:: ; cd3e
+
wHUDPokeballGfxOffsetX:: ; cd3e
; difference in X between the next ball and the current one
@@ -1593,22 +1747,22 @@ wMaxItemQuantity:: ; cf97
; LoadMonData copies mon data here
wLoadedMon:: party_struct wLoadedMon ; cf98
-wFontLoaded:: ; cfc4
+wFontLoaded:: ; cfc3
; bit 0: The space in VRAM that is used to store walk animation tile patterns
; for the player and NPCs is in use for font tile patterns.
; This means that NPC movement must be disabled.
; The other bits are unused.
ds 1
-wWalkCounter:: ; cfc5
+wWalkCounter:: ; cfc4
; walk animation counter
ds 1
-wTileInFrontOfPlayer:: ; cfc6
+wTileInFrontOfPlayer:: ; cfc5
; background tile number in front of the player (either 1 or 2 steps ahead)
ds 1
-wAudioFadeOutControl:: ; cfc7
+wAudioFadeOutControl:: ; cfc6
; The desired fade counter reload value is stored here prior to calling
; PlaySound in order to cause the current music to fade out before the new
; music begins playing. Storing 0 causes no fade out to occur and the new music
@@ -1620,13 +1774,13 @@ wAudioFadeOutControl:: ; cfc7
; audio, it zeroes this variable and starts playing the sound ID stored in it.
ds 1
-wAudioFadeOutCounterReloadValue:: ; cfc8
+wAudioFadeOutCounterReloadValue:: ; cfc7
ds 1
-wAudioFadeOutCounter:: ; cfc9
+wAudioFadeOutCounter:: ; cfc8
ds 1
-wLastMusicSoundID:: ; cfca
+wLastMusicSoundID:: ; cfc9
; This is used to determine whether the default music is already playing when
; attempting to play the default music (in order to avoid restarting the same
; music) and whether the music has already been stopped when attempting to
@@ -1638,45 +1792,45 @@ wLastMusicSoundID:: ; cfca
; the music).
ds 1
-wUpdateSpritesEnabled:: ; cfcb
+wUpdateSpritesEnabled:: ; cfca
; $00 = causes sprites to be hidden and the value to change to $ff
; $01 = enabled
; $ff = disabled
; other values aren't used
ds 1
-wEnemyMoveNum:: ; cfcc
+wEnemyMoveNum:: ; cfcb
ds 1
-wEnemyMoveEffect:: ; cfcd
+wEnemyMoveEffect:: ; cfcc
ds 1
-wEnemyMovePower:: ; cfce
+wEnemyMovePower:: ; cfcd
ds 1
-wEnemyMoveType:: ; cfcf
+wEnemyMoveType:: ; cfce
ds 1
-wEnemyMoveAccuracy:: ; cfd0
+wEnemyMoveAccuracy:: ; cfcf
ds 1
-wEnemyMoveMaxPP:: ; cfd1
+wEnemyMoveMaxPP:: ; cfd0
ds 1
-wPlayerMoveNum:: ; cfd2
+wPlayerMoveNum:: ; cfd1
ds 1
-wPlayerMoveEffect:: ; cfd3
+wPlayerMoveEffect:: ; cfd2
ds 1
-wPlayerMovePower:: ; cfd4
+wPlayerMovePower:: ; cfd3
ds 1
-wPlayerMoveType:: ; cfd5
+wPlayerMoveType:: ; cfd4
ds 1
-wPlayerMoveAccuracy:: ; cfd6
+wPlayerMoveAccuracy:: ; cfd5
ds 1
-wPlayerMoveMaxPP:: ; cfd7
+wPlayerMoveMaxPP:: ; cfd6
ds 1
-wEnemyMonSpecies2:: ; cfd8
+wEnemyMonSpecies2:: ; cfd7
ds 1
-wBattleMonSpecies2:: ; cfd9
+wBattleMonSpecies2:: ; cfd8
ds 1
-wEnemyMonNick:: ds NAME_LENGTH ; cfda
+wEnemyMonNick:: ds NAME_LENGTH ; cfd9
wEnemyMon:: ; cfe5
; The wEnemyMon struct reaches past 0xcfff,
@@ -1706,9 +1860,9 @@ wEnemyMonAttack:: dw
wEnemyMonDefense:: dw
wEnemyMonSpeed:: dw
wEnemyMonSpecial:: dw
-wEnemyMonPP:: ds 3 ; NUM_MOVES - 2
+wEnemyMonPP:: ds 3 ; NUM_MOVES - 1
SECTION "WRAM Bank 1", WRAMX, BANK[1]
- ds 1 ; NUM_MOVES - 2
+ ds 1 ; NUM_MOVES - 3
wEnemyMonBaseStats:: ds 5
wEnemyMonCatchRate:: ds 1
@@ -2663,7 +2817,7 @@ wDestinationWarpID:: ; d42f
ds 1
wPikachuOverworldStateFlags:: ds 1 ; d42f
-wd431:: ds 1 ; d430
+wPikachuSpawnState:: ds 1 ; d430
wd432:: ds 1 ; d431
wd433:: ds 1 ; d432
wd434:: ds 1
@@ -2676,12 +2830,13 @@ wExpressionNumber:: ; d447
ds 1
wExpressionNumber2::
ds 1
+
+wPikachuMovementScriptBank:: ds 1 ; d449
+wPikachuMovementScriptAddress:: dw ; d44a
+wd44d:: ds 1 ; d44c
-wd44a:: ds 1 ; d449
-wd44b:: ds 1
-wd44c:: ds 1
-wd44d:: ds 1
-wPikaPicAnimPointer:: dw ; d44d
+wCurPikaMovementData:: ;
+wPikaPicAnimPointer:: dw ; d44d
wPikaPicAnimPointerSetupFinished:: ds 1 ; d44f
wPikaPicAnimCurGraphicID:: ds 1
wPikaPicAnimTimer:: ds 2 ; d451
@@ -2696,7 +2851,9 @@ wd458:: ds 1 ; d458
wCurPikaPicAnimObject:: ; d459
wCurPikaPicAnimObjectIndex:: ds 1
wCurPikaPicAnimObjectGraphicID:: dw
- ds 19
+ ds 2
+wCurPikaMovementDataEnd::
+ ds 17
wPikachuHappiness:: ds 1 ; d46f
wPikachuMood:: ds 1 ; d470
@@ -2712,19 +2869,18 @@ wd475:: ds 1
wd47a:: ds 1
ds 24
-
-wPreventBlackout:: ds 1 ; d492
-
+
+wd492:: ds 1 ; d492
+
+ ds 1
+
+wSurfingMinigameHiScore:: ds 2 ; 4-digit BCD little-endian
ds 1
-wd495:: ds 1
-wd496:: ds 1
-wd497:: ds 1
-wd498:: ds 1
-
+wPrinterSettings:: ds 1
wUnknownSerialFlag_d499:: ds 1 ; d498
-wUnknownSerialFlag_d49a:: ds 1 ; d499
-wUnknownSerialFlag_d49b:: ds 1 ; d49a
+wPrinterConnectionOpen:: ds 1 ; d499
+wPrinterOpcode:: ds 1 ; d49a
wd49c:: ds 1 ; d49b
ds 19