2014-05-25 17:51:53 +00:00
|
|
|
|
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.
|
2013-12-05 06:18:14 +00:00
|
|
|
|
|
2015-07-24 03:48:35 +00:00
|
|
|
|
; base tile ID to which offsets are added
|
2015-02-07 10:43:08 +00:00
|
|
|
|
hBaseTileID EQU $FF8B
|
|
|
|
|
|
2015-07-18 15:17:29 +00:00
|
|
|
|
; 3-byte BCD number
|
2015-02-08 02:37:40 +00:00
|
|
|
|
hItemPrice EQU $FF8B
|
|
|
|
|
|
2015-07-18 15:17:29 +00:00
|
|
|
|
hDexWeight EQU $FF8B
|
|
|
|
|
|
|
|
|
|
hWarpDestinationMap EQU $FF8B
|
|
|
|
|
|
|
|
|
|
hOAMTile EQU $FF8B
|
|
|
|
|
|
|
|
|
|
hROMBankTemp EQU $FF8B
|
|
|
|
|
|
|
|
|
|
hPreviousTileset EQU $FF8B
|
|
|
|
|
|
|
|
|
|
hEastWestConnectedMapWidth EQU $FF8B
|
|
|
|
|
|
|
|
|
|
hSlideAmount EQU $FF8B
|
|
|
|
|
|
2015-07-24 03:48:35 +00:00
|
|
|
|
hRLEByteValue EQU $FF8B
|
|
|
|
|
|
2015-07-18 15:17:29 +00:00
|
|
|
|
H_SPRITEWIDTH EQU $FF8B ; in tiles
|
|
|
|
|
H_SPRITEINTERLACECOUNTER EQU $FF8B
|
|
|
|
|
H_SPRITEHEIGHT EQU $FF8C ; in tiles
|
|
|
|
|
H_SPRITEOFFSET EQU $FF8D
|
|
|
|
|
|
2013-12-05 06:18:14 +00:00
|
|
|
|
; counters for blinking down arrow
|
|
|
|
|
H_DOWNARROWBLINKCNT1 EQU $FF8B
|
|
|
|
|
H_DOWNARROWBLINKCNT2 EQU $FF8C
|
|
|
|
|
|
2014-09-10 03:55:19 +00:00
|
|
|
|
H_SPRITEDATAOFFSET EQU $FF8B
|
|
|
|
|
H_SPRITEINDEX EQU $FF8C
|
|
|
|
|
|
2015-07-18 15:17:29 +00:00
|
|
|
|
hMapStride EQU $FF8B
|
|
|
|
|
hMapWidth EQU $FF8C
|
|
|
|
|
|
|
|
|
|
hNorthSouthConnectionStripWidth EQU $FF8B
|
|
|
|
|
hNorthSouthConnectedMapWidth EQU $FF8C
|
|
|
|
|
|
2014-09-14 18:29:18 +00:00
|
|
|
|
; DisplayTextID's argument
|
|
|
|
|
hSpriteIndexOrTextID EQU $FF8C
|
|
|
|
|
|
2015-03-13 12:33:16 +00:00
|
|
|
|
hPartyMonIndex EQU $FF8C
|
|
|
|
|
|
2015-07-18 15:17:29 +00:00
|
|
|
|
; 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
|
|
|
|
|
|
2015-07-13 06:00:48 +00:00
|
|
|
|
hHalveItemPrices EQU $FF8E
|
|
|
|
|
|
2015-07-15 20:58:21 +00:00
|
|
|
|
hSpriteOffset2 EQU $FF8F
|
2015-07-15 11:27:59 +00:00
|
|
|
|
|
|
|
|
|
hOAMBufferOffset EQU $FF90
|
|
|
|
|
|
|
|
|
|
hSpriteScreenX EQU $FF91
|
|
|
|
|
hSpriteScreenY EQU $FF92
|
|
|
|
|
|
|
|
|
|
hTilePlayerStandingOn EQU $FF93
|
|
|
|
|
|
|
|
|
|
hSpritePriority EQU $FF94
|
|
|
|
|
|
2015-07-20 00:52:26 +00:00
|
|
|
|
; 2 bytes
|
|
|
|
|
hSignCoordPointer EQU $FF95
|
|
|
|
|
|
2015-07-15 20:58:21 +00:00
|
|
|
|
hNPCMovementDirections2Index EQU $FF95
|
|
|
|
|
|
|
|
|
|
; CalcPositionOfPlayerRelativeToNPC
|
|
|
|
|
hNPCSpriteOffset EQU $FF95
|
|
|
|
|
|
2015-07-16 03:04:58 +00:00
|
|
|
|
; temp value used when swapping bytes
|
|
|
|
|
hSwapTemp EQU $FF95
|
|
|
|
|
|
2015-07-19 03:49:52 +00:00
|
|
|
|
hExperience EQU $FF96 ; 3 bytes, big endian
|
|
|
|
|
|
2014-08-31 02:48:49 +00:00
|
|
|
|
; Multiplcation and division variables are meant
|
|
|
|
|
; to overlap for back-to-back usage. Big endian.
|
2013-12-05 06:18:14 +00:00
|
|
|
|
|
2014-08-31 02:48:49 +00:00
|
|
|
|
H_MULTIPLICAND EQU $FF96 ; 3 bytes
|
2013-12-05 06:18:14 +00:00
|
|
|
|
H_MULTIPLIER EQU $FF99 ; 1 byte
|
2014-08-31 02:48:49 +00:00
|
|
|
|
H_PRODUCT EQU $FF95 ; 4 bytes
|
2013-12-05 06:18:14 +00:00
|
|
|
|
|
2014-08-31 02:48:49 +00:00
|
|
|
|
H_DIVIDEND EQU $FF95 ; 4 bytes
|
2013-12-05 06:18:14 +00:00
|
|
|
|
H_DIVISOR EQU $FF99 ; 1 byte
|
2014-08-31 02:48:49 +00:00
|
|
|
|
H_QUOTIENT EQU $FF95 ; 4 bytes
|
2013-12-05 06:18:14 +00:00
|
|
|
|
H_REMAINDER EQU $FF99 ; 1 byte
|
|
|
|
|
|
2015-07-26 21:04:24 +00:00
|
|
|
|
H_DIVIDEBUFFER EQU $FF9A
|
|
|
|
|
|
|
|
|
|
H_MULTIPLYBUFFER EQU $FF9B
|
|
|
|
|
|
2014-08-31 02:48:49 +00:00
|
|
|
|
; 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
|
|
|
|
|
|
2015-07-15 20:58:21 +00:00
|
|
|
|
; 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
|
|
|
|
|
|
2015-07-19 21:01:08 +00:00
|
|
|
|
; some code zeroes this for no reason when writing a coin amount
|
|
|
|
|
hUnusedCoinsByte EQU $FF9F
|
|
|
|
|
|
2015-07-17 08:21:40 +00:00
|
|
|
|
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
|
|
|
|
|
|
2015-02-07 10:43:08 +00:00
|
|
|
|
hSerialReceivedNewData EQU $FFA9
|
|
|
|
|
|
|
|
|
|
; $01 = using external clock
|
|
|
|
|
; $02 = using internal clock
|
|
|
|
|
; $ff = establishing connection
|
|
|
|
|
hSerialConnectionStatus EQU $FFAA
|
|
|
|
|
|
|
|
|
|
hSerialIgnoringInitialData EQU $FFAB
|
|
|
|
|
|
|
|
|
|
hSerialSendData EQU $FFAC
|
|
|
|
|
|
|
|
|
|
hSerialReceiveData EQU $FFAD
|
|
|
|
|
|
2014-08-09 05:39:13 +00:00
|
|
|
|
; these values are copied to SCX, SCY, and WY during V-blank
|
2014-09-23 22:02:03 +00:00
|
|
|
|
hSCX EQU $FFAE
|
|
|
|
|
hSCY EQU $FFAF
|
|
|
|
|
hWY EQU $FFB0
|
2014-08-09 05:39:13 +00:00
|
|
|
|
|
2015-01-23 17:48:14 +00:00
|
|
|
|
hJoyLast EQU $FFB1
|
2014-08-31 02:48:49 +00:00
|
|
|
|
hJoyReleased EQU $FFB2
|
|
|
|
|
hJoyPressed EQU $FFB3
|
|
|
|
|
hJoyHeld EQU $FFB4
|
|
|
|
|
hJoy5 EQU $FFB5
|
|
|
|
|
hJoy6 EQU $FFB6
|
|
|
|
|
hJoy7 EQU $FFB7
|
2013-12-05 06:18:14 +00:00
|
|
|
|
|
2015-08-09 05:32:44 +00:00
|
|
|
|
H_LOADEDROMBANK EQU $FFB8
|
|
|
|
|
|
|
|
|
|
hSavedROMBank EQU $FFB9
|
2013-12-05 06:18:14 +00:00
|
|
|
|
|
|
|
|
|
; is automatic background transfer during V-blank enabled?
|
|
|
|
|
; if nonzero, yes
|
|
|
|
|
; if zero, no
|
|
|
|
|
H_AUTOBGTRANSFERENABLED EQU $FFBA
|
|
|
|
|
|
|
|
|
|
TRANSFERTOP EQU 0
|
|
|
|
|
TRANSFERMIDDLE EQU 1
|
|
|
|
|
TRANSFERBOTTOM EQU 2
|
|
|
|
|
|
|
|
|
|
; 00 = top third of background
|
|
|
|
|
; 01 = middle third of background
|
|
|
|
|
; 02 = bottom third of background
|
|
|
|
|
H_AUTOBGTRANSFERPORTION EQU $FFBB
|
|
|
|
|
|
|
|
|
|
; the destination address of the automatic background transfer
|
|
|
|
|
H_AUTOBGTRANSFERDEST EQU $FFBC ; 2 bytes
|
|
|
|
|
|
|
|
|
|
; temporary storage for stack pointer during memory transfers that use pop
|
|
|
|
|
; to increase speed
|
|
|
|
|
H_SPTEMP EQU $FFBF ; 2 bytes
|
|
|
|
|
|
|
|
|
|
; source address for VBlankCopyBgMap function
|
|
|
|
|
; the first byte doubles as the byte that enabled the transfer.
|
|
|
|
|
; if it is 0, the transfer is disabled
|
|
|
|
|
; if it is not 0, the transfer is enabled
|
|
|
|
|
; this means that XX00 is not a valid source address
|
|
|
|
|
H_VBCOPYBGSRC EQU $FFC1 ; 2 bytes
|
|
|
|
|
|
|
|
|
|
; destination address for VBlankCopyBgMap function
|
|
|
|
|
H_VBCOPYBGDEST EQU $FFC3 ; 2 bytes
|
|
|
|
|
|
|
|
|
|
; number of rows for VBlankCopyBgMap to copy
|
|
|
|
|
H_VBCOPYBGNUMROWS EQU $FFC5
|
|
|
|
|
|
|
|
|
|
; size of VBlankCopy transfer in 16-byte units
|
|
|
|
|
H_VBCOPYSIZE EQU $FFC6
|
|
|
|
|
|
|
|
|
|
; source address for VBlankCopy function
|
|
|
|
|
H_VBCOPYSRC EQU $FFC7
|
|
|
|
|
|
|
|
|
|
; destination address for VBlankCopy function
|
|
|
|
|
H_VBCOPYDEST EQU $FFC9
|
|
|
|
|
|
|
|
|
|
; size of source data for VBlankCopyDouble in 8-byte units
|
|
|
|
|
H_VBCOPYDOUBLESIZE EQU $FFCB
|
|
|
|
|
|
|
|
|
|
; source address for VBlankCopyDouble function
|
|
|
|
|
H_VBCOPYDOUBLESRC EQU $FFCC
|
|
|
|
|
|
|
|
|
|
; destination address for VBlankCopyDouble function
|
|
|
|
|
H_VBCOPYDOUBLEDEST EQU $FFCE
|
|
|
|
|
|
|
|
|
|
; controls whether a row or column of 2x2 tile blocks is redrawn in V-blank
|
|
|
|
|
; 00 = no redraw
|
|
|
|
|
; 01 = redraw column
|
|
|
|
|
; 02 = redraw row
|
|
|
|
|
H_SCREENEDGEREDRAW EQU $FFD0
|
|
|
|
|
|
|
|
|
|
REDRAWCOL EQU 1
|
|
|
|
|
REDRAWROW EQU 2
|
|
|
|
|
|
|
|
|
|
H_SCREENEDGEREDRAWADDR EQU $FFD1
|
|
|
|
|
|
2014-05-24 18:40:38 +00:00
|
|
|
|
hRandomAdd EQU $FFD3
|
|
|
|
|
hRandomSub EQU $FFD4
|
2013-12-05 06:18:14 +00:00
|
|
|
|
|
|
|
|
|
H_FRAMECOUNTER EQU $FFD5 ; decremented every V-blank (used for delays)
|
|
|
|
|
|
|
|
|
|
; V-blank sets this to 0 each time it runs.
|
|
|
|
|
; So, by setting it to a nonzero value and waiting for it to become 0 again,
|
|
|
|
|
; you can detect that the V-blank handler has run since then.
|
|
|
|
|
H_VBLANKOCCURRED EQU $FFD6
|
|
|
|
|
|
2014-09-14 18:29:18 +00:00
|
|
|
|
; 00 = indoor
|
|
|
|
|
; 01 = cave
|
|
|
|
|
; 02 = outdoor
|
|
|
|
|
; this is often set to 00 in order to turn off water and flower BG tile animations
|
|
|
|
|
hTilesetType EQU $FFD7
|
|
|
|
|
|
2015-07-25 03:27:59 +00:00
|
|
|
|
hMovingBGTilesCounter1 EQU $FFD8
|
|
|
|
|
|
2013-12-05 06:18:14 +00:00
|
|
|
|
H_CURRENTSPRITEOFFSET EQU $FFDA ; multiple of $10
|
|
|
|
|
|
2015-07-24 21:57:49 +00:00
|
|
|
|
hFossilCounter EQU $FFDB
|
|
|
|
|
|
2015-07-26 02:26:54 +00:00
|
|
|
|
hGymGateIndex EQU $FFDB
|
|
|
|
|
|
|
|
|
|
hGymTrashCanRandNumMask EQU $FFDB
|
|
|
|
|
|
2015-08-07 11:24:06 +00:00
|
|
|
|
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
|
|
|
|
|
hOaksAideItemReward EQU $FFDC
|
|
|
|
|
hOaksAideNumMonsOwned EQU $FFDD
|
|
|
|
|
|
2015-07-24 21:57:49 +00:00
|
|
|
|
hItemToRemoveID EQU $FFDB
|
|
|
|
|
hItemToRemoveIndex EQU $FFDC
|
|
|
|
|
|
2015-07-17 07:16:27 +00:00
|
|
|
|
hVendingMachineItem EQU $FFDB
|
|
|
|
|
hVendingMachinePrice EQU $FFDC ; 3-byte BCD number
|
|
|
|
|
|
2015-07-24 03:48:35 +00:00
|
|
|
|
; the first tile ID in a sequence of tile IDs that increase by 1 each step
|
|
|
|
|
hStartTileID EQU $FFE1
|
|
|
|
|
|
2015-07-16 03:04:58 +00:00
|
|
|
|
hNewPartyLength EQU $FFE4
|
|
|
|
|
|
2015-07-15 20:58:21 +00:00
|
|
|
|
hDividend2 EQU $FFE5
|
|
|
|
|
hDivisor2 EQU $FFE6
|
|
|
|
|
hQuotient2 EQU $FFE7
|
|
|
|
|
|
2015-07-15 11:27:59 +00:00
|
|
|
|
hSpriteVRAMSlotAndFacing EQU $FFE9
|
|
|
|
|
|
2015-07-19 03:49:52 +00:00
|
|
|
|
hCoordsInFrontOfPlayerMatch EQU $FFEA
|
|
|
|
|
|
2015-07-15 11:27:59 +00:00
|
|
|
|
hSpriteAnimFrameCounter EQU $FFEA
|
|
|
|
|
|
2013-12-05 06:18:14 +00:00
|
|
|
|
H_WHOSETURN EQU $FFF3 ; 0 on player’s turn, 1 on enemy’s turn
|
|
|
|
|
|
2015-02-08 00:24:16 +00:00
|
|
|
|
; bit 0: draw HP fraction to the right of bar instead of below (for party menu)
|
2015-02-08 02:37:40 +00:00
|
|
|
|
; bit 1: menu is double spaced
|
2015-02-08 00:24:16 +00:00
|
|
|
|
hFlags_0xFFF6 EQU $FFF6
|
|
|
|
|
|
2015-07-14 22:48:34 +00:00
|
|
|
|
hFieldMoveMonMenuTopMenuItemX EQU $FFF7
|
|
|
|
|
|
2014-05-25 17:51:53 +00:00
|
|
|
|
hJoyInput EQU $FFF8
|
2013-12-05 06:18:14 +00:00
|
|
|
|
|