summaryrefslogtreecommitdiff
path: root/hram.asm
diff options
context:
space:
mode:
Diffstat (limited to 'hram.asm')
-rw-r--r--hram.asm182
1 files changed, 171 insertions, 11 deletions
diff --git a/hram.asm b/hram.asm
index a6035b59..f5817fa4 100644
--- a/hram.asm
+++ b/hram.asm
@@ -1,19 +1,36 @@
-
-H_SPRITEWIDTH EQU $FF8B ; in tiles
-H_SPRITEINTERLACECOUNTER EQU $FF8B
-H_SPRITEHEIGHT EQU $FF8C ; in tiles
-H_SPRITEOFFSET EQU $FF8D
-
hSoftReset EQU $FF8A
; Initialized to 16.
; Decremented each input iteration if the player
; presses the reset sequence (A+B+SEL+START).
; Soft reset when 0 is reached.
+; base tile ID to which offsets are added
hBaseTileID EQU $FF8B
+; 3-byte BCD number
hItemPrice EQU $FF8B
+hDexWeight EQU $FF8B
+
+hWarpDestinationMap EQU $FF8B
+
+hOAMTile EQU $FF8B
+
+hROMBankTemp EQU $FF8B
+
+hPreviousTileset EQU $FF8B
+
+hEastWestConnectedMapWidth EQU $FF8B
+
+hSlideAmount EQU $FF8B
+
+hRLEByteValue EQU $FF8B
+
+H_SPRITEWIDTH EQU $FF8B ; in tiles
+H_SPRITEINTERLACECOUNTER EQU $FF8B
+H_SPRITEHEIGHT EQU $FF8C ; in tiles
+H_SPRITEOFFSET EQU $FF8D
+
; counters for blinking down arrow
H_DOWNARROWBLINKCNT1 EQU $FF8B
H_DOWNARROWBLINKCNT2 EQU $FF8C
@@ -21,11 +38,66 @@ H_DOWNARROWBLINKCNT2 EQU $FF8C
H_SPRITEDATAOFFSET EQU $FF8B
H_SPRITEINDEX EQU $FF8C
+hMapStride EQU $FF8B
+hMapWidth EQU $FF8C
+
+hNorthSouthConnectionStripWidth EQU $FF8B
+hNorthSouthConnectedMapWidth EQU $FF8C
+
; DisplayTextID's argument
hSpriteIndexOrTextID EQU $FF8C
hPartyMonIndex EQU $FF8C
+; the total number of tiles being shifted each time the pic slides by one tile
+hSlidingRegionSize EQU $FF8C
+
+; 2 bytes
+hEnemySpeed EQU $FF8D
+
+hVRAMSlot EQU $FF8D
+
+hFourTileSpriteCount EQU $FF8E
+
+; -1 = left
+; 0 = right
+hSlideDirection EQU $FF8D
+
+hSpriteFacingDirection EQU $FF8D
+
+hSpriteMovementByte2 EQU $FF8D
+
+hSpriteImageIndex EQU $FF8D
+
+hLoadSpriteTemp1 EQU $FF8D
+hLoadSpriteTemp2 EQU $FF8E
+
+hHalveItemPrices EQU $FF8E
+
+hSpriteOffset2 EQU $FF8F
+
+hOAMBufferOffset EQU $FF90
+
+hSpriteScreenX EQU $FF91
+hSpriteScreenY EQU $FF92
+
+hTilePlayerStandingOn EQU $FF93
+
+hSpritePriority EQU $FF94
+
+; 2 bytes
+hSignCoordPointer EQU $FF95
+
+hNPCMovementDirections2Index EQU $FF95
+
+; CalcPositionOfPlayerRelativeToNPC
+hNPCSpriteOffset EQU $FF95
+
+; temp value used when swapping bytes
+hSwapTemp EQU $FF95
+
+hExperience EQU $FF96 ; 3 bytes, big endian
+
; Multiplcation and division variables are meant
; to overlap for back-to-back usage. Big endian.
@@ -38,12 +110,52 @@ H_DIVISOR EQU $FF99 ; 1 byte
H_QUOTIENT EQU $FF95 ; 4 bytes
H_REMAINDER EQU $FF99 ; 1 byte
+H_DIVIDEBUFFER EQU $FF9A
+
+H_MULTIPLYBUFFER EQU $FF9B
+
; PrintNumber (big endian).
H_PASTLEADINGZEROES EQU $FF95 ; last char printed
H_NUMTOPRINT EQU $FF96 ; 3 bytes
H_POWEROFTEN EQU $FF99 ; 3 bytes
H_SAVEDNUMTOPRINT EQU $FF9C ; 3 bytes
+; distance in steps between NPC and player
+hNPCPlayerYDistance EQU $FF95
+hNPCPlayerXDistance EQU $FF96
+
+hFindPathNumSteps EQU $FF97
+
+; bit 0: set when the end of the path's Y coordinate matches the target's
+; bit 1: set when the end of the path's X coordinate matches the target's
+; When both bits are set, the end of the path is at the target's position
+; (i.e. the path has been found).
+hFindPathFlags EQU $FF98
+
+hFindPathYProgress EQU $FF99
+hFindPathXProgress EQU $FF9A
+
+; 0 = from player to NPC
+; 1 = from NPC to player
+hNPCPlayerRelativePosPerspective EQU $FF9B
+
+; bit 0:
+; 0 = target is to the south or aligned
+; 1 = target is to the north
+; bit 1:
+; 0 = target is to the east or aligned
+; 1 = target is to the west
+hNPCPlayerRelativePosFlags EQU $FF9D
+
+; some code zeroes this for no reason when writing a coin amount
+hUnusedCoinsByte EQU $FF9F
+
+hMoney EQU $FF9F ; 3-byte BCD number
+hCoins EQU $FFA0 ; 2-byte BCD number
+
+hDivideBCDDivisor EQU $FFA2 ; 3-byte BCD number
+hDivideBCDQuotient EQU $FFA2 ; 3-byte BCD number
+
hSerialReceivedNewData EQU $FFA9
; $01 = using external clock
@@ -70,7 +182,9 @@ hJoy5 EQU $FFB5
hJoy6 EQU $FFB6
hJoy7 EQU $FFB7
-H_LOADEDROMBANK EQU $FFB8
+H_LOADEDROMBANK EQU $FFB8
+
+hSavedROMBank EQU $FFB9
; is automatic background transfer during V-blank enabled?
; if nonzero, yes
@@ -128,12 +242,12 @@ H_VBCOPYDOUBLEDEST EQU $FFCE
; 00 = no redraw
; 01 = redraw column
; 02 = redraw row
-H_SCREENEDGEREDRAW EQU $FFD0
+hRedrawRowOrColumnMode EQU $FFD0
-REDRAWCOL EQU 1
-REDRAWROW EQU 2
+REDRAW_COL EQU 1
+REDRAW_ROW EQU 2
-H_SCREENEDGEREDRAWADDR EQU $FFD1
+hRedrawRowOrColumnDest EQU $FFD1
hRandomAdd EQU $FFD3
hRandomSub EQU $FFD4
@@ -151,13 +265,59 @@ H_VBLANKOCCURRED EQU $FFD6
; this is often set to 00 in order to turn off water and flower BG tile animations
hTilesetType EQU $FFD7
+hMovingBGTilesCounter1 EQU $FFD8
+
H_CURRENTSPRITEOFFSET EQU $FFDA ; multiple of $10
+hItemCounter EQU $FFDB
+
+hGymGateIndex EQU $FFDB
+
+hGymTrashCanRandNumMask EQU $FFDB
+
+hDexRatingNumMonsSeen EQU $FFDB
+hDexRatingNumMonsOwned EQU $FFDC
+
+; $00 = bag full
+; $01 = got item
+; $80 = didn't meet required number of owned mons
+; $FF = player cancelled
+hOaksAideResult EQU $FFDB
+
+hOaksAideRequirement EQU $FFDB ; required number of owned mons
+hOaksAideRewardItem EQU $FFDC
+hOaksAideNumMonsOwned EQU $FFDD
+
+hItemToRemoveID EQU $FFDB
+hItemToRemoveIndex EQU $FFDC
+
+hVendingMachineItem EQU $FFDB
+hVendingMachinePrice EQU $FFDC ; 3-byte BCD number
+
+; the first tile ID in a sequence of tile IDs that increase by 1 each step
+hStartTileID EQU $FFE1
+
+hNewPartyLength EQU $FFE4
+
+hDividend2 EQU $FFE5
+hDivisor2 EQU $FFE6
+hQuotient2 EQU $FFE7
+
+hSpriteVRAMSlotAndFacing EQU $FFE9
+
+hCoordsInFrontOfPlayerMatch EQU $FFEA
+
+hSpriteAnimFrameCounter EQU $FFEA
+
H_WHOSETURN EQU $FFF3 ; 0 on player’s turn, 1 on enemy’s turn
; bit 0: draw HP fraction to the right of bar instead of below (for party menu)
; bit 1: menu is double spaced
hFlags_0xFFF6 EQU $FFF6
+hFieldMoveMonMenuTopMenuItemX EQU $FFF7
+
+hDisableJoypadPolling EQU $FFF9
+
hJoyInput EQU $FFF8