diff options
Diffstat (limited to 'wram.asm')
-rw-r--r-- | wram.asm | 425 |
1 files changed, 410 insertions, 15 deletions
@@ -147,7 +147,9 @@ wFrequencyModifier:: wTempoModifier:: ds 1 - ds 13 +wc0f3:: ds 1 +wc0f4:: ds 1 +wc0f5:: ds 11 SECTION "Sprite State Data", WRAM0 @@ -190,7 +192,7 @@ wSprite11StateData1:: spritestatedata1 wSprite11StateData1 wSprite12StateData1:: spritestatedata1 wSprite12StateData1 wSprite13StateData1:: spritestatedata1 wSprite13StateData1 wSprite14StateData1:: spritestatedata1 wSprite14StateData1 -wSprite15StateData1:: spritestatedata1 wSprite15StateData1 +wSpritePikachuStateData1:: spritestatedata1 wSpritePikachuStateData1 wSpriteStateData2:: ; more data for all sprites on the current map @@ -228,7 +230,7 @@ wSprite11StateData2:: spritestatedata2 wSprite11StateData2 wSprite12StateData2:: spritestatedata2 wSprite12StateData2 wSprite13StateData2:: spritestatedata2 wSprite13StateData2 wSprite14StateData2:: spritestatedata2 wSprite14StateData2 -wSprite15StateData2:: spritestatedata2 wSprite15StateData2 +wSpritePikachuStateData2:: spritestatedata2 wSpritePikachuStateData2 wSpriteDataEnd:: @@ -259,6 +261,135 @@ wSerialPartyMonsPatchList:: wSerialEnemyMonsPatchList:: ; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer ds 200 + +NEXTU +wAnimatedObjectsData:: +; Used by functions in BANK 3E +; This looks similar to the address structure for Gen 2 OAM animations. + +wAnimatedObjectStartTileOffsets:: + ds 10 * 2 + +wAnimatedObjectDataStructs:: +wAnimatedObject0:: animated_object wAnimatedObject0 +wAnimatedObject1:: animated_object wAnimatedObject1 +wAnimatedObject2:: animated_object wAnimatedObject2 +wAnimatedObject3:: animated_object wAnimatedObject3 +wAnimatedObject4:: animated_object wAnimatedObject4 +wAnimatedObject5:: animated_object wAnimatedObject5 +wAnimatedObject6:: animated_object wAnimatedObject6 +wAnimatedObject7:: animated_object wAnimatedObject7 +wAnimatedObject8:: animated_object wAnimatedObject8 +wAnimatedObject9:: animated_object wAnimatedObject9 + +wNumLoadedAnimatedObjects:: + ds 1 +wCurrentAnimatedObjectOAMBufferOffset:: + ds 3 +wAnimatedObjectSpawnStateDataPointer:: + ds 2 +wAnimatedObjectFramesDataPointer:: + ds 2 +wAnimatedObjectJumptablePointer:: + ds 2 +wAnimatedObjectOAMDataPointer:: + ds 2 +wCurAnimatedObjectOAMAttributes:: + ds 1 +wCurrentAnimatedObjectVTileOffset:: + ds 1 +wCurrentAnimatedObjectXCoord:: + ds 1 +wCurrentAnimatedObjectYCoord:: + ds 1 +wCurrentAnimatedObjectXOffset:: + ds 1 +wCurrentAnimatedObjectYOffset:: + ds 1 +wAnimatedObjectGlobalYOffset:: + ds 1 +wAnimatedObjectGlobalXOffset:: + ds 1 +wAnimatedObjectsDataEnd:: + +; Surfing minigame +wSurfingMinigameData:: + ds 1 +wSurfingMinigameRoutineNumber:: + ds 1 +wc5d2:: + ds 1 +wSurfingMinigameWaveFunctionNumber:: + ds 2 +wc5d5:: + ds 1 +wSurfingMinigamePikachuHP:: + ds 2 ; little-endian BCD +wc5d8:: ; unused? + ds 1 +wSurfingMinigameRadnessMeter:: +; number of consecutive tricks + ds 1 +wSurfingMinigameRadnessScore:: + ds 2 ; little-endian BCD +wSurfingMinigameTotalScore:: + ds 2 ; little-endian BCD +wc5de:: + ds 1 +wc5df:: + ds 1 +wc5e0:: + ds 1 +wc5e1:: + ds 1 +wc5e2:: + ds 1 +wSurfingMinigamePikachuSpeed:: + ds 2 ; little-endian +wc5e5:: + ds 3 ; big-endian +wSurfingMinigameWaveHeightBuffer:: + ds 2 +wSurfingMinigamePikachuObjectHeight:: + ds 1 +wc5eb:: + ds 1 +wc5ec:: + ds 1 +wc5ed:: + ds 1 +wc5ee:: + ds 1 +wSurfingMinigameBGMapReadBuffer:: + ds 16 + ds 24 +wSurfingMinigameSCX:: + ds 3 +wSurfingMinigameWaveHeight:: + ds SCREEN_WIDTH +wSurfingMinigameXOffset:: + ds 1 +wSurfingMinigameTrickFlags:: + ds 1 +wc630:: + ds 1 +wc631:: + ds 1 +wSurfingMinigameRoutineDelay:: + ds 1 +wSurfingMinigameIntroAnimationFinished:: + ds 1 + +; Yellow intro +wYellowIntroCurrentScene:: +wc634:: + ds 1 +wYellowIntroSceneTimer:: +wc635:: + ds 1 +wYellowIntroAnimatedObjectStructPointer:: + ds 1 +wSurfingMinigameDataEnd:: ENDU ds 80 @@ -271,6 +402,98 @@ wOverworldMapEnd:: NEXTU wTempPic:: ds 7 * 7 tiles + +NEXTU +wPrinterData:: +wPrinterSendState:: + ds 1 +wPrinterRowIndex:: + ds 1 + +; Printer data header +wPrinterDataHeader:: +wc6ea:: + ds 1 +wc6eb:: + ds 1 +wc6ec:: + ds 1 +wc6ed:: + ds 1 +wPrinterChecksum:: + dw + +UNION + +wPrinterSerialReceived:: + ds 1 +wPrinterStatusReceived:: +; 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:: + ds 1 +wc6f3:: + ds 13 +wLYOverrides:: + ds $100 +wLYOverridesEnd:: +wLYOverridesBuffer:: + ds $100 +wLYOverridesBufferEnd:: + +NEXTU + +wPrinterSendDataSource1:: +; two 20-tile buffers + ds $140 +wPrinterSendDataSource2:: + ds $140 +ENDU + +wPrinterSendDataSource1End:: + +wPrinterHandshake:: + ds 1 +wPrinterStatusFlags:: + ds 1 +wHandshakeFrameDelay:: + ds 1 +wPrinterSerialFrameDelay:: + ds 1 +wPrinterSendByteOffset:: + dw +wPrinterDataSize:: + dw +wPrinterTileBuffer:: + ds SCREEN_HEIGHT * SCREEN_WIDTH +wPrinterStatusIndicator:: + ds 2 +wcae2:: + ds 1 +wPrinterSettingsTempCopy:: + ds 17 +wPrinterQueueLength:: + ds 1 +wPrinterDataEnd:: + +wPrinterPokedexEntryTextPointer:: + dw + ds 2 +wPrinterPokedexMonIsOwned:: + ds 227 + +wcbdc:: + ds 14 + +wcbea:: + ds 2 + +wcbec:: + ds 16 ENDU wRedrawRowOrColumnSrcTiles:: @@ -496,6 +719,7 @@ wBoostExpByExpAll:: wAnimationType:: ; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon... +UNION wNPCMovementDirections:: ds 1 @@ -503,6 +727,7 @@ wDexRatingNumMonsOwned:: ds 1 wDexRatingText:: +wTrainerCardBadgeAttributes:: ds 1 wSlotMachineSavedROMBank:: @@ -516,6 +741,17 @@ wAnimPalette:: ds 29 +NEXTU +wPikaPicUsedGFXCount:: + ds 1 + +wPikaPicUsedGFX:: + ds 16 +wPikaPicUsedGFXEnd:: + + ds 43 +ENDU + UNION wNPCMovementDirections2:: ds 10 @@ -531,6 +767,23 @@ NEXTU wNumStepsToTake:: ; used in Pallet Town scripted movement ds 1 + +NEXTU +wPikaPicAnimObjectDataBufferSize:: + ds 1 + +wPikaPicAnimObjectDataBuffer:: +; 4 structs each of length 8 +; 0: buffer index +; 1: script index +; 2: frame index +; 3: frame timer +; 4: vtile offset +; 5: x offset +; 6: y offset +; 7: unused + ds 4 * 8 +wPikaPicAnimObjectDataBufferEnd:: ENDU ds 10 @@ -802,8 +1055,6 @@ wHoFTeamIndex:: wSSAnneSmokeDriftAmount:: ; multiplied by 16 to get the number of times to go right by 2 pixels -wRivalStarterTemp:: - wBoxMonCounts:: ; 12 bytes ; array of the number of mons in each box @@ -826,7 +1077,7 @@ wWhichBadge:: wPriceTemp:: ; 3-byte BCD number -wTitleMonSpecies:: +wTitleScreenScene:: wPlayerCharacterOAMTile:: @@ -839,6 +1090,8 @@ wCoordIndex:: wOptionsTextSpeedCursorX:: +wOptionsCursorLocation:: + wTrainerInfoTextBoxWidthPlus1:: wSwappedMenuItem:: @@ -887,6 +1140,8 @@ wTrainerSpriteOffset:: wUnusedCD3D:: ds 1 +wTitleScreenTimer:: + wHUDPokeballGfxOffsetX:: ; difference in X between the next ball and the current one @@ -896,8 +1151,6 @@ wBattleTransitionCircleScreenQuadrantX:: wSSAnneSmokeX:: -wRivalStarterBallSpriteIndex:: - wDayCareNumLevelsGrown:: wOptionsBattleAnimCursorX:: @@ -930,6 +1183,8 @@ wPlayerSpinWhileMovingUpOrDownAnimMaxY:: wHiddenObjectFunctionRomBank:: wTrainerEngageDistance:: + +wJigglypuffFacingDirections2:: ds 1 wHUDGraphicsTiles:: @@ -1321,9 +1576,6 @@ wScriptedNPCWalkCounter:: ds 1 -wGBC:: - ds 1 - wOnSGB:: ; if running on SGB, it's 1, else it's 0 ds 1 @@ -1360,7 +1612,12 @@ wPalPacket:: wPartyMenuBlkPacket:: ; $30 bytes - ds 29 + ds 9 + +wPartyHPBarAttributes:: + ds 6 + + ds 14 wExpAmountGained:: ; 2-byte big-endian number @@ -1520,7 +1777,41 @@ wBattleMonSpecies2:: wEnemyMonNick:: ds NAME_LENGTH -wEnemyMon:: battle_struct wEnemyMon +wEnemyMon:: +; The wEnemyMon struct reaches past 0xcfff, +; the end of wram bank 0 on cgb. +; This has no significance on dmg, where wram +; isn't banked (c000-dfff is contiguous). +; However, recent versions of rgbds have replaced +; dmg-style wram with cgb wram banks. + +; Until this is fixed, this struct will have +; to be declared manually. + +wEnemyMonSpecies:: db +wEnemyMonHP:: dw +wEnemyMonPartyPos:: +wEnemyMonBoxLevel:: db +wEnemyMonStatus:: db +wEnemyMonType:: +wEnemyMonType1:: db +wEnemyMonType2:: db +wEnemyMonCatchRate_NotReferenced:: db +wEnemyMonMoves:: ds NUM_MOVES +wEnemyMonDVs:: ds 2 +wEnemyMonLevel:: db +wEnemyMonMaxHP:: dw +wEnemyMonAttack:: dw +wEnemyMonDefense:: dw +wEnemyMonSpeed:: dw +wEnemyMonSpecial:: dw +wEnemyMonPP:: ds 3 ; NUM_MOVES - 1 + + +SECTION "WRAM Bank 1", WRAMX + +; continuing wEnemyMon from the previous section + ds 1 ; NUM_MOVES - 3 wEnemyMonBaseStats:: ds 5 wEnemyMonActualCatchRate:: ds 1 @@ -2083,6 +2374,7 @@ wEvolutionOccurred:: wVBlankSavedROMBank:: ds 1 +wFarCopyDataSavedROMBank:: ds 1 wIsKeyItem:: @@ -2483,7 +2775,96 @@ wDestinationWarpID:: ; if $ff, the player's coordinates are not updated when entering the map ds 1 - ds 128 +wPikachuOverworldStateFlags:: ds 1 +wPikachuSpawnState:: ds 1 +wd432:: ds 1 +wd433:: ds 1 +wd434:: ds 1 +wd435:: ds 1 +wd436:: ds 1 +wPikachuFollowCommandBufferSize:: ds 1 +wPikachuFollowCommandBuffer:: ds 16 + +wExpressionNumber:: + ds 1 +wPikaPicAnimNumber:: + ds 1 + +wPikachuMovementScriptBank:: ds 1 +wPikachuMovementScriptAddress:: dw +wPikachuMovementFlags:: +; bit 6 - spawn shadow +; bit 7 - signal end of command + ds 1 + +UNION +wCurPikaMovementData:: +wCurPikaMovementParam1:: ds 1 +wCurPikaMovementFunc1:: ds 1 +wCurPikaMovementParam2:: ds 1 +wCurPikaMovementFunc2:: ds 1 +wd451:: ds 1 +wCurPikaMovementSpriteImageIdx:: ds 1 +wPikaSpriteX:: ds 1 +wPikaSpriteY:: ds 1 +wPikachuMovementXOffset:: ds 1 +wPikachuMovementYOffset:: ds 1 +wPikachuStepTimer:: ds 1 +wPikachuStepSubtimer:: ds 1 + ds 5 +wCurPikaMovementDataEnd:: + +NEXTU +wPikaPicAnimPointer:: dw +wPikaPicAnimPointerSetupFinished:: ds 1 +wPikaPicAnimCurGraphicID:: ds 1 +wPikaPicAnimTimer:: ds 2 +wPikaPicAnimDelay:: ds 1 +wPikaPicPikaDrawStartX:: ds 1 +wPikaPicPikaDrawStartY:: ds 1 + +wCurPikaPicAnimObject:: +wCurPikaPicAnimObjectVTileOffset:: db +wCurPikaPicAnimObjectXOffset:: db +wCurPikaPicAnimObjectYOffset:: db +wCurPikaPicAnimObjectScriptIdx:: db +wCurPikaPicAnimObjectFrameIdx:: db +wCurPikaPicAnimObjectFrameTimer:: db + ds 1 +wCurPikaPicAnimObjectEnd:: + + ds 18 +ENDU + +wPikachuHappiness:: ds 1 +wPikachuMood:: ds 1 +wd472:: ds 1 +wd473:: ds 1 + + ds 1 + +wd475:: ds 1 + + ds 4 + +wd47a:: ds 1 + + ds 24 + +wd492:: ds 1 + + ds 1 + +wSurfingMinigameHiScore:: ds 2 ; 4-digit BCD little-endian + ds 1 + +wPrinterSettings:: ds 1 +wUnknownSerialFlag_d499:: ds 1 +wPrinterConnectionOpen:: ds 1 +wPrinterOpcode:: ds 1 +wd49c:: ds 1 + + ds 19 wNumSigns:: ; number of signs in the current map (up to 16) @@ -2624,6 +3005,7 @@ wRoute3CurScript:: ds 1 wRoute4CurScript:: ds 1 +wFanClubCurScript:: ds 1 wViridianGymCurScript:: ds 1 @@ -2744,6 +3126,7 @@ wVictoryRoad2FCurScript:: ds 1 wVictoryRoad3FCurScript:: ds 1 +wCeladonCityCurScript:: ds 1 wFightingDojoCurScript:: ds 1 @@ -2863,6 +3246,10 @@ wPlayerJumpingYScreenCoordsIndex:: wRivalStarter:: ds 1 +IF DEF(_DEBUG) +; This byte gets set to NUM_POKEMON by DebugStart. +wUnknownDebugByte:: +ENDC ds 1 wPlayerStarter:: @@ -3141,8 +3528,16 @@ wBoxMonNicksEnd:: wBoxDataEnd:: +wGBCBasePalPointers:: ds NUM_ACTIVE_PALS * 2 +wGBCPal:: ds PALETTE_SIZE +wLastBGP:: ds 1 +wLastOBP0:: ds 1 +wLastOBP1:: ds 1 +wdef5:: ds 1 +wBGPPalsBuffer:: ds NUM_ACTIVE_PALS * PALETTE_SIZE + -SECTION "Stack", WRAM0 +SECTION "Stack", WRAMX wStack:: |