diff options
Diffstat (limited to 'wram.asm')
-rw-r--r-- | wram.asm | 165 |
1 files changed, 110 insertions, 55 deletions
@@ -11,7 +11,7 @@ StackTop:: ds 1 -SECTION "Audio", WRAM0 +SECTION "Audio RAM", WRAM0 wMusic:: MusicPlaying:: ; c100 ; nonzero if playing @@ -216,12 +216,15 @@ TilePermissions:: ; c2fe ds 1 -SECTION "wSpriteAnims", WRAM0 [$c300] +SECTION "wSpriteAnims", WRAM0 ; wc300 - wc313 is a 10x2 dictionary. ; keys: taken from third column of SpriteAnimSeqData ; values: VTiles + +UNION wSpriteAnimDict:: ds 10 * 2 - ds wSpriteAnimDict - @ + +NEXTU wc300:: ds 1 wc301:: ds 1 wc302:: ds 1 @@ -241,6 +244,8 @@ wc310:: ds 1 wc311:: ds 1 wc312:: ds 1 wc313:: ds 1 +ENDU + wSpriteAnimationStructs:: ; Field 0: Index ; Fields 1-3: Loaded from SpriteAnimSeqData @@ -263,10 +268,15 @@ SpriteAnim8:: sprite_anim_struct SpriteAnim8 wc394:: SpriteAnim9:: sprite_anim_struct SpriteAnim9 wc3a4:: + +UNION SpriteAnim10:: sprite_anim_struct SpriteAnim10 wSpriteAnimationStructsEnd:: - ds -8 +NEXTU + ds 8 wc3ac:: ds 8 ; c3ac +ENDU + wSpriteAnimCount:: ds 1 wCurrSpriteOAMAddr:: ds 1 @@ -310,7 +320,7 @@ wc3fb:: ds 1 wc3fc:: ds 4 -SECTION "Sprites", WRAM0 [$c400] +SECTION "Sprites", WRAM0 Sprites:: ; c400 ; 4 bytes per sprite @@ -339,18 +349,19 @@ TileMapEnd:: SECTION "Battle", WRAM0 +UNION wc608:: wOddEgg:: party_struct OddEgg wOddEggName:: ds PKMN_NAME_LENGTH wOddEggOTName:: ds PKMN_NAME_LENGTH - ds wc608 - @ +NEXTU wBT_OTTemp:: battle_tower_struct wBT_OTTemp - ds wc608 - @ +NEXTU hall_of_fame wHallOfFameTemp - ds wc608 - @ +NEXTU wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2) ds 10 wc612:: @@ -360,8 +371,8 @@ wc618:: wInitHourBuffer:: ; c61c ds 10 wc626:: - ds wc608 - @ +NEXTU wBattle:: wEnemyMoveStruct:: move_struct wEnemyMoveStruct ; c608 wPlayerMoveStruct:: move_struct wPlayerMoveStruct ; c60f @@ -559,6 +570,7 @@ PlayerSpdLevel:: ; c6ce PlayerSAtkLevel:: ; c6cf ds 1 +UNION wc6d0:: PlayerSDefLevel:: ; c6d0 ds 1 @@ -743,7 +755,7 @@ wBattleEnd:: ; Battle RAM ; c741 - ds wc6d0 - @ +NEXTU wTrademons:: wPlayerTrademon:: trademon wPlayerTrademon wOTTrademon:: trademon wOTTrademon @@ -759,8 +771,8 @@ wc7b9:: ds 1 wc7ba:: ds 1 wc7bb:: ds 2 wc7bd:: - ds wc6d0 - @ +NEXTU ; naming screen wNamingScreenDestinationPointer:: ds 2 ; c6d0 wNamingScreenCurrNameLength:: ds 1 ; c6d2 @@ -769,8 +781,8 @@ wNamingScreenType:: ds 1 ; c6d4 wNamingScreenCursorObjectPointer:: ds 2 ; c6d5 wNamingScreenLastCharacter:: ds 1 ; c6d7 wNamingScreenStringEntryCoord:: ds 2 ; c6d8 - ds wc6d0 - @ +NEXTU ; pokegear wPokegearPhoneLoadNameBuffer:: ds 1 ; c6d0 wPokegearPhoneCursorPosition:: ds 1 ; c6d1 @@ -783,8 +795,8 @@ wPokegearMapPlayerIconLandmark:: ds 1 ; c6d8 wPokegearRadioChannelBank:: ds 1 ; c6d9 wPokegearRadioChannelAddr:: ds 2 ; c6da wPokegearRadioMusicPlaying:: ds 1 ; c6dc - ds wc6d0 - @ +NEXTU wSlots:: ; Slot Machine ; c6d0 @@ -809,8 +821,8 @@ wSlotBuildingMatch:: ds 1 wSlotsDataEnd:: ds 28 wSlotsEnd:: - ds wSlots - @ +NEXTU ; Card Flip ; c6d0 wCardFlip:: @@ -822,8 +834,8 @@ wCardFlipFaceUpCard:: ds 1 wDiscardPile:: ds 24 wDiscardPileEnd:: wCardFlipEnd:: - ds wCardFlip - @ +NEXTU ; Dummy Game ; c6d0 wDummyGame:: @@ -839,15 +851,15 @@ wDummyGameLastMatches:: ds 5 ; c703 wDummyGameCounter:: ds 1 ; c708 wDummyGameNumCardsMatched:: ds 1 ; c709 wDummyGameEnd:: - ds wDummyGame - @ + +NEXTU ; Unown Puzzle wUnownPuzzle:: wPuzzlePieces:: ds 6 * 6 wUnownPuzzleEnd:: - ds wc6d0 - @ - +NEXTU wPokedexDataStart:: wPokedexOrder:: ds NUM_POKEMON +- 1 wPokedexOrderEnd:: ds 6 @@ -893,20 +905,24 @@ ENDC ds 2 wMiscEnd:: +ENDU +ENDU wc7e8:: ds 24 ; ???? -SECTION "Overworld Map", WRAM0 [$c800] +SECTION "Overworld Map", WRAM0 +UNION OverworldMap:: ; c800 ds 1300 OverworldMapEnd:: - ds OverworldMap - @ +NEXTU wGameboyPrinterRAM:: wGameboyPrinterScreen:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; c800 wGameboyPrinterScreenEnd:: ; c968 - ds wGameboyPrinterScreen - @ +NEXTU + wGameboyPrinter2bppSource:: ds 40 tiles wGameboyPrinter2bppSourceEnd:: @@ -941,8 +957,8 @@ wcbfa:: ds 1 wGBPrinterSettings:: ds 1 ds 16 wGameboyPrinterRAMEnd:: - ds wGameboyPrinterRAM - @ +NEXTU wBillsPCPokemonList:: ; c800 ; Pokemon, box number, list index @@ -955,6 +971,7 @@ wLinkPartyCount:: ds 1 wLinkPartySpecies:: ds PARTY_LENGTH wLinkPartySpeciesEnd:: ds 1 +UNION wTimeCapsulePlayerData:: wTimeCapsulePartyMon1:: red_party_struct wTimeCapsulePartyMon1 wTimeCapsulePartyMon2:: red_party_struct wTimeCapsulePartyMon2 @@ -965,8 +982,8 @@ wTimeCapsulePartyMon6:: red_party_struct wTimeCapsulePartyMon6 wTimeCapsulePartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH wTimeCapsulePartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH wTimeCapsulePlayerDataEnd:: - ds wTimeCapsulePlayerData - @ +NEXTU wLinkPlayerData:: wLinkPlayerPartyMon1:: party_struct wLinkPlayerPartyMon1 wLinkPlayerPartyMon2:: party_struct wLinkPlayerPartyMon2 @@ -977,10 +994,11 @@ wLinkPlayerPartyMon6:: party_struct wLinkPlayerPartyMon6 wLinkPlayerPartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH wLinkPlayerPartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH wLinkPlayerDataEnd:: +ENDU ds $35d wLinkDataEnd:: - ds wLinkData - @ +NEXTU wc800:: ds 1 wc801:: ds 1 @@ -999,9 +1017,11 @@ wc820:: ds 1 wc821:: ds 15 wc830:: ds 16 wc840:: ds 16 +UNION wMysteryGiftTrainerData:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2 wMysteryGiftTrainerDataEnd:: - ds wMysteryGiftTrainerData - @ + +NEXTU wc850:: ds 16 wc860:: ds 16 wc870:: ds 16 @@ -1013,6 +1033,7 @@ wc8c0:: ds 16 wc8d0:: ds 16 wc8e0:: ds 16 wc8f0:: ds 16 +ENDU wMysteryGiftPartnerData:: wc900:: ds 1 @@ -1108,8 +1129,11 @@ wccb5:: ds 3 wccb8:: ds 1 wccb9:: ds 1 wccba:: ds 102 +ENDU SECTION "Video", WRAM0 + +UNION CreditsPos:: BGMapBuffer:: wMobileMonSpeciesPointerBuffer:: dw @@ -1117,8 +1141,8 @@ wMobileMonStructurePointerBuffer:: dw wMobileMonOTNamePointerBuffer:: dw wMobileMonNicknamePointerBuffer:: dw wMobileMonMailPointerBuffer:: dw - ds CreditsPos - @ +NEXTU wcd20:: ds 1 wcd21:: ds 1 wcd22:: @@ -1132,6 +1156,8 @@ wcd26:: ds 1 wcd27:: ds 1 wcd28:: ds 1 wcd29:: ds 1 +ENDU + wMobileMonSpeciesBuffer:: wcd2a:: ds 1 wTempOddEggNickname:: @@ -1267,14 +1293,19 @@ AttrMap:: ; cdd9 ; bit 2-0: pal # (cgb only) ds SCREEN_WIDTH * SCREEN_HEIGHT AttrMapEnd:: + +UNION ds 1 wcf42:: ds 2 wcf44:: ds 1 wcf45:: - ds AttrMapEnd - @ + +NEXTU wTileAnimBuffer:: ds $10 ; addresses dealing with serial comms +ENDU + wOtherPlayerLinkMode:: ds 1 wOtherPlayerLinkAction:: ds 4 wPlayerLinkAction:: ds 1 @@ -1512,16 +1543,17 @@ wDaysSince:: ds 1 wRAM0End:: ; cfd8 -SECTION "WRAM 1", WRAMX, BANK [1] +SECTION "WRAM 1", WRAMX wd000:: ds 1 DefaultSpawnpoint:: wd001:: ds 1 ; d002 +UNION wTempMail:: mailmsg wTempMail - ds wTempMail - @ +NEXTU wSeerAction:: ds 1 wSeerNickname:: ds PKMN_NAME_LENGTH wSeerCaughtLocation:: ds 17 @@ -1532,15 +1564,15 @@ wSeerCaughtLevelString:: ds 4 wSeerCaughtLevel:: ds 1 wSeerCaughtData:: ds 1 wSeerCaughtGender:: ds 1 - ds wSeerAction - @ +NEXTU wBufferMonNick:: ds PKMN_NAME_LENGTH ; d002 wBufferMonOT:: ds NAME_LENGTH ; d00d wBufferMon:: party_struct wBufferMon ; d018 ds 8 wMonOrItemNameBuffer:: - ds wBufferMonNick - @ +NEXTU wBugContestResults:: bugcontestwinner wBugContestFirstPlace bugcontestwinner wBugContestSecondPlace @@ -1550,8 +1582,7 @@ wBugContestWinnersEnd:: ds 4 wBugContestWinnerName:: ds NAME_LENGTH - ds wBugContestResults - @ - +NEXTU wd002:: wTempDayOfWeek:: wApricorns:: @@ -1602,10 +1633,11 @@ wd00a:: ds 1 wMartItem4BCD:: wd00b:: ds 1 +UNION wRadioText:: ds 2 * SCREEN_WIDTH wRadioTextEnd:: - ds wRadioText - @ +NEXTU wMobileParticipant2Nickname:: wd00c:: ds 1 wd00d:: ds 1 @@ -1632,6 +1664,7 @@ wMartItem10BCD:: ds 2 wd01f:: ds 1 wMartItemBCDEnd:: ds 13 + wd02d:: ds 1 wd02e:: ds 1 wd02f:: ds 1 @@ -1643,6 +1676,7 @@ wd034:: ds 2 wd036:: ds 2 wd038:: ds 3 wd03b:: ds 3 +ENDU MenuItemsList:: CurFruitTree:: @@ -1713,6 +1747,7 @@ MenuItemsListEnd:: wTempTrainerHeaderEnd:: wPlayerTurningDirection:: ; d04e ds 24 +ENDU wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH ; d066 StringBuffer1:: ; d073 @@ -1780,9 +1815,12 @@ VramState:: ; d0ed wBattleResult:: ds 1 ; d0ee wUsingItemWithSelect:: ds 1 ; d0ef + +UNION CurMart:: ds 16 ; d0f0 CurMartEnd:: - ds CurMart - @ + +NEXTU CurElevator:: ds 1 wd0f1:: CurElevatorFloors:: @@ -1791,8 +1829,8 @@ wd0f2:: wMailboxCount:: ds 1 wMailboxItems:: ds MAILBOX_CAPACITY wMailboxEnd:: ds 1 ; d0fe - ds 2 +ENDU wListPointer:: dw ; d100 wUnusedD102:: dw ; d102 wItemAttributesPtr:: dw ; d104 @@ -1869,10 +1907,11 @@ wPlayerStepDirection:: ds 1 ; d151 wBGMapAnchor:: ds 2 ; d152 +UNION UsedSprites:: ds 64 ; d154 UsedSpritesEnd:: - ds UsedSprites - @ +NEXTU wd154:: ; d154 ds 31 ; 64 @@ -1885,6 +1924,8 @@ wd182:: ds 1 wd191:: ds 1 wd192:: ds 1 wd193:: ds 1 +ENDU + wOverworldMapAnchor:: dw ; d194 wMetatileStandingY:: ds 1 ; d196 wMetatileStandingX:: ds 1 ; d197 @@ -2022,6 +2063,7 @@ EvolvableFlags:: ; d1e8 wForceEvolution:: db ; d1e9 +UNION ; HP bar animations wCurHPAnimMaxHP:: dw ; d1ea wCurHPAnimOldHP:: dw ; d1ec @@ -2032,8 +2074,8 @@ wNewHPBarPixels:: db ; d1f2 wCurHPAnimDeltaHP:: dw ; d1f3 wCurHPAnimLowHP:: db ; d1f5 wCurHPAnimHighHP:: db ; d1f6 - ds wCurHPAnimMaxHP - @ +NEXTU MagikarpLength:: wEvolutionOldSpecies:: Buffer1:: ; d1ea @@ -2061,6 +2103,7 @@ wd1f4:: ds 1 wd1f5:: ds 1 wd1f6:: ds 4 +ENDU LinkBattleRNs:: ; d1fa ds 10 @@ -2191,7 +2234,8 @@ TimeOfDay:: ; d269 ds 1 -SECTION "Enemy Party", WRAMX, BANK [1] +SECTION "Enemy Party", WRAMX +UNION wPokedexShowPointerAddr:: wd26b:: ds 1 wd26c:: ds 1 @@ -2199,17 +2243,19 @@ wPokedexShowPointerBank:: wd26d:: ds 1 ds 3 wd271:: ds 5 - ds wd26b - @ - -; SECTION "Enemy Party", WRAMX, BANK [1] +NEXTU +; SECTION "Enemy Party", WRAMX OTPlayerName:: ds NAME_LENGTH ; d26b +ENDU + OTPlayerID:: ds 2 ; d276 ds 8 OTPartyCount:: ds 1 ; d280 OTPartySpecies:: ds PARTY_LENGTH ; d281 OTPartyEnd:: ds 1 +UNION wDudeBag:: ; d288 wDudeNumItems:: ds 1 wDudeItems:: ds 2 * 4 @@ -2223,8 +2269,8 @@ wDudeNumBalls:: ds 1 ; d2a6 wDudeBalls:: ds 2 * 4 ; d2a7 wDudeBallsEnd:: ds 1 ; d2af wDudeBagEnd:: - ds wDudeBag - @ +NEXTU OTPartyMons:: OTPartyMon1:: party_struct OTPartyMon1 ; d288 OTPartyMon2:: party_struct OTPartyMon2 ; d2b8 @@ -2238,6 +2284,7 @@ OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8 OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea OTPartyDataEnd:: ds 4 +ENDU wd430:: wBattleAction:: ds 1 ; d430 @@ -2528,7 +2575,7 @@ FarfetchdPosition:: ; d964 ds 13 -;SECTION "Map Triggers", WRAMX, BANK [1] +;SECTION "Map Triggers", WRAMX wPokecenter2FTrigger:: ds 1 ; d972 wTradeCenterTrigger:: ds 1 ; d973 @@ -2613,7 +2660,7 @@ wMobileBattleRoomTrigger:: ds 1 ; d9c0 ds 49 -;SECTION "Events", WRAMX, BANK [1] +;SECTION "Events", WRAMX wJackFightCount:: ds 1 ; d9f2 wBeverlyFightCount:: ds 1 ; unused @@ -2806,7 +2853,7 @@ wScreenSave:: ds 6 * 5 wMapDataEnd:: -SECTION "Party", WRAMX, BANK [1] +SECTION "Party", WRAMX wPokemonData:: @@ -2905,7 +2952,7 @@ wMagikarpRecordHoldersName:: ds NAME_LENGTH wPokemonDataEnd:: wGameDataEnd:: -SECTION "Pic Animations", WRAMX, BANK [2] +SECTION "Pic Animations", WRAMX TempTileMap:: ; 20x18 grid of 8x8 tiles @@ -2944,7 +2991,7 @@ wPokeAnimBitmaskBuffer:: ds 7 wPokeAnimStructEnd:: -SECTION "Battle Tower", WRAMX, BANK [3] +SECTION "Battle Tower", WRAMX w3_d000:: ds 1 ; d000 w3_d001:: ds 1 @@ -2967,13 +3014,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 w3_d742:: battle_tower_struct w3_d742 ; d822 - ds -$22 + +NEXTU + ds $be wBTChoiceOfLvlGroup:: w3_d800:: ; ds BG_MAP_WIDTH * SCREEN_HEIGHT ($240) ds $69 +ENDU w3_d869:: ds $17 w3_d880:: ds 1 w3_d881:: ds 1 @@ -2995,7 +3046,7 @@ w3_dd68:: ds SCREEN_WIDTH * SCREEN_HEIGHT w3_dfec:: ds $10 w3_dffc:: ds 4 -SECTION "GBC Video", WRAMX, BANK [5] +SECTION "GBC Video", WRAMX ; 8 4-color palettes UnknBGPals:: ds 8 palettes ; d000 @@ -3020,7 +3071,7 @@ LYOverridesBackup:: ; d200 LYOverridesBackupEnd:: -SECTION "Battle Animations", WRAMX [$d300], BANK [5] +SECTION "Battle Animations", WRAMX wBattleAnimTileDict:: ds 10 @@ -3080,12 +3131,16 @@ wBattleAnimTemp7:: ds 1 wBattleAnimTempPalette:: wBattleAnimTemp8:: ds 1 +UNION wSurfWaveBGEffect:: ds $40 wSurfWaveBGEffectEnd:: - ds -$e + +NEXTU + ds $32 wBattleAnimEnd:: +ENDU -SECTION "WRAM 5 MOBILE", WRAMX [$d800], BANK [5] +SECTION "WRAM 5 MOBILE", WRAMX w5_d800:: ds $200 w5_da00:: ds $200 w5_dc00:: ds $d @@ -3096,7 +3151,7 @@ w5_MobileOpponentBattleStartMessage:: ds $c ; dc26 w5_MobileOpponentBattleWinMessage:: ds $c ; dc32 w5_MobileOpponentBattleLossMessage:: ds $c ; dc3e -SECTION "WRAM 6", WRAMX, BANK [6] +SECTION "WRAM 6", WRAMX wDecompressScratch:: wScratchTileMap:: @@ -3107,6 +3162,6 @@ w6_d800:: INCLUDE "sram.asm" -SECTION "WRAM 7", WRAMX, BANK [7] +SECTION "WRAM 7", WRAMX wWindowStack:: ds $1000 - 1 wWindowStackBottom:: ds 1 |