RAM Map - ShiningForceCentral/SF2DISASM GitHub Wiki

RAM Map

Address Description
0xFF0000- battle scene text message #s with arguments, all word length, stack, pixel data for tileset 3
0xFF1000- pixel data for tileset 1
0xFF2000- pixel data for tileset 4
0xFF3000- pixel data for tileset 5, battle backgrounds
0xFF4400- obstruction data for current moving character (terrain values for all movable tiles (including targetting))
0xFF4D00- obstruction data for current moving character (boolean values for all movable tiles (including targetting))
0xFF5600- possible targets on each map tile during battle (FF if no target) (during targetting only)
0xFF5F00-0xFF5FFF obstruction data for battle map (terrain)
0xFF6000-0xFF67FF
0xFF6802 pixel data for textbox, pixel data for tileset 2?
0xFF8806- number of targets reachable by spell action
0xFF8808- number of targets reachable by item action
0xFF880E-0xFF883D targets reachable by attack action
0xFF883E-0xFF886D targets reachable by spell action
0xFF886E-0xFF889D targets reachable by item action
0xFF889E-0xFF88CD movement to attack action targets
0xFF88CE-0xFF88FD movement to spell action targets
0xFF88FE-0xFF892E movement to item action targets
0xFF892E-0xFF895D priority of attack action targets
0xFF895E-0xFF898D priority of spell action targets
0xFF898E-0xFF89BD priority of item action targets
0xFF9004- spell icon graphics (when in a status screen)
0xFF9304- item icons (plus jewels of light / evil) in status screen
0xFF9803 whether or not current enemy is currently moving (00 or FF)
0xFF9804- battle entity move string (00-03, direction byte, until FF is found)
0xFF9B04-0xFFA303 animating tiles used on current map
0xFFA304-0xFFA703 some other kind of map tiles... possibly also animated?
0xFFA804-0xFFA807 viewplane A/B x-axis counters
0xFFA808-0xFFA80B viewplane A/B y-axis counters
0xFFA80C-0xFFA80D screen shake intensity
0xFFA80E-0xFFA80F
0xFFA810-0xFFA811 viewplane A x-axis current offset
0xFFA812-0xFFA813 viewplane A y-axis current offset
0xFFA814-0xFFA815 viewplane B x-axis current offset
0xFFA816-0xFFA817 viewplane B y-axis current offset
0xFFA818-0xFFA819 viewplane A x-axis destination offset
0xFFA81A-0xFFA81B viewplane A y-axis destination offset
0xFFA81C-0xFFA81D viewplane B x-axis destination offset
0xFFA81E-0xFFA81F viewplane B y-axis destination offset
0xFFA820-0xFFA821 viewplane A x-axis scroll speed
0xFFA822-0xFFA823 viewplane A y-axis scroll speed
0xFFA824-0xFFA825 viewplane B x-axis scroll speed
0xFFA826-0xFFA827 viewplane B y-axis scroll speed
0xFFA828-0xFFA829
0xFFA82A
0xFFA82B [Unused]
0xFFA82C target entity of camera
0xFFA82D viewplane update bitmap; goes to 1 very quickly when entering a house (layer disappearing?)... used in csc34_setBlocks
0xFFA82E-0xFFA849 map properties, loaded on map load
0xFFA84A-0xFFA84F current event type and args
0xFFA84C related to how map transitions (eg scroll left/right/up/down)
0xFFA84D new map ID when warping to new map
0xFFA84E starting X position when warping to new map
0xFFA84F starting Y position when warping to new map
0xFFA850 starting facing when warping to new map
0xFFA851-0xFFA869 [Unused]
0xFFA86A-0xFFA86D address of tile animations for current map, or FFFFFFFF if none
0xFFA86E-0xFFA86F counter for map animation
0xFFA870 map to animate
0xFFA876- address of end of window tile information
0xFFA87E-0xFFA8FD current windows information list; entries are 16 bytes (address of tiles, width, height, x, y, from/to animation coords?)
0xFFA900
0xFFA901 [Unused]
0xFFA902-0xFFAF21 entity information
0xFFAF02-0xFFAF21 tile cursor entity information
0xFFAF22- controlled entity and followers
0xFFAF42-0xFFAF43 holds which roof hide script we're doing (so we know which to undo); 0 when none
0xFFAF44-0xFFAF45 sprite size
0xFFAF46 map area layer type
0xFFAF47-0xFFAF66 [Unused] (byte for each ally in unused subroutine)
0xFFAF67 number of sprites to load (for death spin/explosion)
0xFFAF68 [Unused]
0xFFAF69
0xFFAF6A
0xFFAF6B
0xFFAF6C-0xFFAF6D index for text window
0xFFAF6E-0xFFAF6F text tile offset
0xFFAF70-0xFFAF71 Huffman barrel
0xFFAF72-0xFFAF73 Huffman length
0xFFAF74 decoded symbol
0xFFAF75 [Unused]
0xFFAF76-0xFFAF79 index for combatant ministatus window
0xFFAF7A-0xFFAF81 list of items/spells for diamond-menus
0xFFAF7A area of effect for spells and whatnot (word)
0xFFAF82-0xFFAF8B levelup arguments (HP/MP/ATT/DEF/AGI)
0xFFAF8C current ministatus page
0xFFAF8D [Unused]
0xFFAF8E cursor radius
0xFFAF8F [Unused]
0xFFAF90-0xFFAF91 tile position of moving combatant destination (x, y)
0xFFAF92 [Unused]
0xFFAF93
0xFFAF94-0xFFAF9D [Unused]
0xFFAF9E
0xFFAF9F [Unused]
0xFFAFA0-0xFFAFDF 64 1-byte slots for entities ???
0xFFAFA1-0xFFAFA9 battlescene battlesprite vdp toggle (0/1, 9 32x32 px sprites)
0xFFAFAA-0xFFAFAD battlescene weaponsprite vdp toggle (0/1, 4 32x32 px sprites)
0xFFAFAE-0xFFAFB0 battlescene groundsprite vdp toggle (0/1, 3 32x32 px sprites)
0xFFAFE0-0xFFAFE6 [Unused]
0xFFAFE7 current diamenu choice (0-3)
0xFFAFE8-0xFFAFFA [Unused]
0xFFAFFB text counter (decrements every symbol) (0 is speech sound/1 is muted)
0xFFAFFC-0xFFAFFD [Unused]
0xFFAFFE-0xFFAFFF holds number of entries for blink animation
0xFFB000-0xFFB03B blink animation data (x pos, y pos, new tile index (2 bytes), 15 entries)
0xFFB03C-0xFFB03D holds counter for portrait blink (blinks when 0 and resets)
0xFFB03E-0xFFB03F holds number of entries for speech animation
0xFFB040-0xFFB07B speech animation data (x pos, y pos, new tile index (2 bytes), 15 entries)
0xFFB07C-0xFFB07D counter of some sort relating to portrait only ???
0xFFB07E-0xFFB07F portrait vdp tile bitfield
0xFFB080 state of portrait window (0-3: static, blink+mouth, blink, mouth?)
0xFFB080-0xFFB081 index for portrait window
0xFFB082 toggle to prevent portrait animation (0 stop animation)
0xFFB083 state of mouth (0 is old/1 is new tiles)
0xFFB084 state of portrait animation mirroring
0xFFB085 state of portrait location
0xFFB086-0xFFB087 index for gold window
0xFFB088-0xFFB089 index for land effect window
0xFFB08A-0xFFB08B index for timer window
0xFFB08C-0xFFB08D index for name window
0xFFB08E-0xFFB08F battle actor x-axis offset
0xFFB090-0xFFB091 battle actor y-axis offset
0xFFB092-0xFFB093 battle target x-axis offset
0xFFB094-0xFFB095 battle target y-axis offset
0xFFB096-0xFFB097 width of ministatus window
0xFFB098-0xFFB099 walking sound ($4F normally, $63 if Chirrup, $00 outside battle)
0xFFB09A-0xFFB09B index for save slot
0xFFB09C-0xFFB09D speech sound
0xFFB09E-0xFFB09F speech sound copy
0xFFB0A0-0xFFB0A1 currently used portrait
0xFFB0A2 [Unused]
0xFFB0A3
0xFFB0A4-0xFFB0A5 ROM checksum
0xFFB0A6-0xFFB0A7 [Unused]
0xFFB0A8 special turbo; $00 (not set) or $FF (set)
0xFFB0A9 debug mode code; $00 (not entered) or $FF (entered)
0xFFB0AA control opponent; $00 (not set) or $FF (set)
0xFFB0AB auto battle; $00 (not set) or $FF (set)
0xFFB0AC cheat mode config code; $00 (not entered) or $FF (entered)
0xFFB0AD map properties - music to play
0xFFB0AE-0xFFB12D multipurpose index list (items in shop, members in force (all/join/purge), etc)
0xFFB12E-0xFFB12F number of entries in multipurpose list
0xFFB130-0xFFB131 current page of items (shop or caravan)
0xFFB132-0xFFB133 current item on page (relative)
0xFFB134-0xFFB135 number of items on page
0xFFB136-0xFFB137 first memberlist entry displayed (absolute, refers to first entry)
0xFFB138-0xFFB139 selected memberlist entry (relative)
0xFFB13A-0xFFB13B selected item index
0xFFB13C
0xFFB13D current memberlist page
0xFFB13E [Unused]
0xFFB13F textbox state ??? (1 normally, 2 when animating in or out, 3 when displayed)
0xFFB140-0xFFB15F combatant entity index for allies
0xFFB160-0xFFB17F combatant entity index for enemies
0xFFB160-0xFFB17F exploration entity indexes
0xFFB16F combatant entity index for "Jar"
0xFFB180-0xFFB181 chest contents
0xFFB182-0xFFB187 [Unused]
0xFFB188 battlescene music; 02=unpro, 03=promo, 05=enemy, 06=boss, 07=zeon
0xFFB189 [Unused]
0xFFB18A-0xFFB18B currently moving battle entity
0xFFB18C-0xFFB18D currently moving battle entity's selected spell/item index
0xFFB18E-0xFFB18F
0xFFB190-0xFFB193 [Unused]
0xFFB194-0xFFB195 camera movement speed
0xFFB196-0xFFB197 step counter (for random battles)
0xFFB198
0xFFB199
0xFFB19A whether or not camera has to move (00 or FF)
0xFFB19B [Unused]
0xFFB19C-0xFFB19F address offset for after intro
0xFFB1A0-0xFFB1A3 entity walking param
0xFFB1A4-0xFFB1A7
0xFFB1A8-0xFFB1A9 warp sound
0xFFB1AA-0xFFB1AD pointer for config mode or credits
0xFFB1AC stores enemy targetting AI command for each monster
0xFFB1DC stores movement AI command for each monster
0xFFB20C-0xFFB20D battle region activation bitfield
0xFFB20E-0xFFB3BF [Unused]
0xFFB3C0-0xFFB3C3
0xFFB3C4-0xFFB3C5
0xFFB3C6-0xFFB3C9
0xFFB3CA-0xFFB3CB
0xFFB3CC-0xFFB3CD frame counter for battle scene
0xFFB3CE-0xFFB3CF entity # of current monster in battle scene
0xFFB3D0-0xFFB3D1 battle sprite # of current monster in battle scene
0xFFB3D2-0xFFB3D3 battle sprite palette # of current monster in battle scene
0xFFB3D4-0xFFB3D5 entity # of current character in battle scene
0xFFB3D6-0xFFB3D7 battle sprite # of current character in battle scene
0xFFB3D8-0xFFB3D9 battle sprite palette # of current character in battle scene
0xFFB3DA-0xFFB3DB battle sprite # of current character's equipped weapon in battle scene
0xFFB3DC-0xFFB3DD battle sprite palette # of current character's equipped weapon in battle scene
0xFFB3DE-0xFFB3DF enemy battle sprite animation speed
0xFFB3E0-0xFFB3E1 enemy battle sprite animation speed counter
0xFFB3E2-0xFFB3E3 ally battle sprite animation speed
0xFFB3E4-0xFFB3E5 ally battle sprite animation speed counter
0xFFB3E6-0xFFB3E7 enemy battle sprite animation #
0xFFB3E8-0xFFB3E9 ally battle sprite animation #
0xFFB3EA-0xFFB3EB
0xFFB3EC-0xFFB3ED battlescene enemy X offset
0xFFB3EE-0xFFB3EF
0xFFB3F0-0xFFB3F1 battlescene enemy Y offset
0xFFB3F2-0xFFB3F3 battlescene ally X offset
0xFFB3F4-0xFFB3F5 battlescene ally Y offset
0xFFB3F6-0xFFB3F7 battlescene enemy X speed
0xFFB3F8-0xFFB3F9 battlescene enemy Y speed
0xFFB3FA-0xFFB3FB battlescene ally X speed
0xFFB3FC-0xFFB3FD battlescene ally Y speed
0xFFB3FE-0xFFB3FF
0xFFB400-0xFFB401 copy of entity # of current character in battle scene
0xFFB402-0xFFB403 number of combatants killed during turn
0xFFB404-0xFFB405
0xFFB406-0xFFB531 variables for current spell animation code
0xFFB41E-0xFFB49D
0xFFB496-0xFFB515
0xFFB532-0xFFB541
0xFFB536-0xFFB539
0xFFB53A-0xFFB53B
0xFFB542-0xFFB561 battlescene background palette
0xFFB562-0xFFB565
0xFFB56A potency of screen shake ???
0xFFB56C-0xFFB56D battle sprite to make idle (1 = ally, 2 = enemy)
0xFFB56D bitflags for battle sprite (1 = enemy battle sprite change frames)
0xFFB570 weapon frame #
0xFFB571 weapon frame priority layer
0xFFB572 weapon x-axis offset
0xFFB573 weapon y-axis offset
0xFFB574-0xFFB575 weapon idle frame #
0xFFB576 weapon idle frame 1 x-axis offset
0xFFB577 weapon idle frame 1 y-axis offset
0xFFB578 weapon idle frame 2 x-axis offset
0xFFB579 weapon idle frame 2 y-axis offset
0xFFB57A ally battle sprite status X offset
0xFFB57B ally battle sprite status y offset
0xFFB57C enemy battle sprite status x offset
0xFFB57D enemy battle sprite status y offset
0xFFB57E battlescene ally status animation #
0xFFB57F battlescene enemy status animation #
0xFFB582 which battle background we're currently using
0xFFB584 something to do with spell animation (current frame idx) ???
0xFFB586 spell mirroring bit
0xFFB587 current spell animation #
0xFFB58A list of combatants killed during turn
0xFFB5AA-0xFFB629 [Unused]
0xFFB62A-0xFFB62B gold gained from previous battle action (2 bytes)
0xFFB62C-0xFFB62D experience gained from previous battle action (2 bytes)
0xFFB62E-0xFFB62F current battle action type; 00=attack, 01=magic, 02=item, 03=stay, 04=explode, 05=muddle, 06=laser
0xFFB630-0xFFB631 selected item/spell number for use
0xFFB632-0xFFB633 copy of selected item/spell # for use
0xFFB634-0xFFB635 selected item slot to use (00 through 03)
0xFFB636-0xFFB637 related to double/counter .... 00 = normal attack, 01 = double attack, 02 = counter attack
0xFFB638-0xFFB639 current spell index in battle, for name/effect
0xFFB63A-0xFFB63B current spell level in battle, for name/effect
0xFFB63C-0xFFB63D current item index in battle, for name/effect
0xFFB63E-0xFFB63F number of targets reachable by current action from current position
0xFFB640-0xFFB641 number of current battle party members (1 to 12)
0xFFB642-0xFFB643 number of current reserve members (0 to 29)
0xFFB646-0xFFB647 holds current script number
0xFFB648
0xFFB64A index of first ally in current battle (FF if none)
0xFFB64B index of last ally in current battle (FF if none)
0xFFB64C index of first enemy in current battle (FF if none)
0xFFB64D index of last enemy in current battle (FF if none)
0xFFB64E index of current attacker in battle
0xFFB64F copy of index of current attacker in battle
0xFFB651 relative axis when speaking with NPC
0xFFB652-0xFFB681 indexes of currently available targets in battle / chosen targets during skirmish
0xFFB682-0xFFB68D indexes of current battle party members (12 slots, 1 byte each)
0xFFB68E-0xFFB6A1 indexes of current reserve members
0xFFB6A2-0xFFB6C1 indexes of current enemies
0xFFB6C2-0xFFB6D1 terrain cost list for current unit, straight from ROM
0xFFB6D2 current shop index
0xFFB6D4 variable containing x position of text, for wrapping
0xFFB6D5 variable containing y position of text (in lines)
0xFFB6D6 palette index for text color (01 of palette 3)
0xFFB6D7 length of current Huffman string (bytes)
0xFFB6E8-0xFFB6ED indexes used for text (2 bytes each entry) (used for name/class/item/spell/etc)
0xFFB6F0- dialogue string to print
0xFFB776-0xFFB779 contains current number loaded for printing
0xFFB778-0xFFB779 current item price
0xFFB77E address of current Huffman-encoded script byte
0xFFB786-0xFFB795 list of equippable items (4 bytes each entry) (2 bytes item index/2 bytes slot #)
0xFFB800-0xFFB8A0 portrait art data in memory, references to tiles
0xFFB8A0-0xFFBA80 textbox art data in memory, references to tiles
0xFFD000-0xFFD01F palette 1 (16 colors)(2 bytes each color, 0BGR)
0xFFD020-0xFFD03F palette 2 (16 colors)(2 bytes each color, 0BGR)
0xFFD040-0xFFD05F palette 3 (16 colors)(2 bytes each color, 0BGR)
0xFFD060-0xFFD07F palette 4 (16 colors)(2 bytes each color, 0BGR)
0xFFD080-0xFFD09F copy of palette 1 (ally battle sprites, current map)
0xFFD0A0-0xFFD0BF copy of palette 2 (portraits, witch screen bubble, enemy battle sprites, pulsing range)
0xFFD0C0-0xFFD0DF copy of palette 3 (U/I sprites, ground sprite, spell graphics)
0xFFD0E0-0xFFD0FF copy of palette 4 (special sprite, background)
0xFFD100-0xFFD4FF horizontal scroll data
0xFFD500-0xFFD54F vertical scroll data
0xFFDC80-0xFFDE7F sprite table (64 entries of 8 bytes) (1-9 ally battle sprite, 10-13 ally weapon sprite, 14-16 ground sprite, 8-12 menu cursor, 8-15 battle cursor, 38-59 spell graphics, 60-63 battle special sprite, 46-54 exploration special sprite, 20-28 summon battle sprite
0xFFDE80-0xFFDE89 loaded number
0xFFDE8A-0xFFDE93 [Unused]
0xFFDE97 player 1 button group A (80=Start, 40=A, 20=C, 10=B, 8=Right, 4=Left, 2=Down, 1=Up)
0xFFDE98 player 1 button group B (80=Start, 40=A, 20=C, 10=B, 8=Mode, 4=X, 2=Y, 1=Z)
0xFFDE99 player 2 button group A (80=Start, 40=A, 20=C, 10=B, 8=Right, 4=Left, 2=Down, 1=Up)
0xFFDE9A player 2 button group B (80=Start, 40=A, 20=C, 10=B, 8=Mode, 4=X, 2=Y, 1=Z)
0xFFDE9B current player (= player 1 button group A by default)
0xFFDE9C first direction moved (same as above) if still moving (or holding move buttons)
0xFFDEA0 frame counter
0xFFDEA4-0xFFDEA5 value for "randomizing"
0xFFDEAA-0xFFDEC9 vdp register status/value (16 pairs)
0xFFDECA-0xFFDECF [Unused]
0xFFDED0-0xFFDED3 vdp command queue pointer
0xFFDED4-0xFFDED7 dma queue pointer
0xFFDED8-0xFFDEDF sound command queue
0xFFDEE0 number of songs in stack
0xFFDEE1 current song playing
0xFFDEE2-0xFFDEEA previous songs
0xFFDEEC last player input
0xFFDEED input repeat delayer
0xFFDEEE-0xFFDEEF [Unused]
0xFFDEF0-0xFFDEF5 related to various screen effects (fade, flash, tint) and their speed
0xFFDEF7
0xFFDEF8 what kind of action we're currently doing
0xFFDEF9 frames of current second in battle; increments 0xFFDF1E when hits 60
0xFFDEFA-0xFFDF19 pointers to vint funtions
0xFFDF1E-0xFFDF21 current battle time (in seconds; 1 sec = 60 frames)
0xFFDF22-0xFFDF25 special battle time (in seconds)
0xFFDF2A-0xFFDFA9 copy of palettes 1-4
0xFFDFAA-0xFFDFAB fading timer
0xFFDFB0-0xFFDFB1 "random" value for determining AI/hit chance??
0xFFE000-0xFFE7FF
0xFFE800-0xFFEEFF character data (32 character slots, 56 bytes each)
0xFFEF00-0xFFF5FF monster data loaded from current battle (32 monster slots, 56 bytes each)
0xFFF600-0xFFF603 current force gold (4 bytes)
0xFFF604-0xFFF643 items in deals (128 slots, 4 bits each, item index is location, number of that item index is entry (up to 15 (=F))
0xFFF644 number of items in caravan
0xFFF646-0xFFF685 item indexes in caravan (64 slots, 1 byte each, 7F=no item)
0xFFF686-0xFFF705 game flags (1024 slots, 1 bit each, set=1, not set=0)
0xFFF706 camera lock x1
0xFFF707 camera lock y1
0xFFF708 camera lock x2
0xFFF709 camera lock y2
0xFFF710 current player type (00=Bowie, 01=caravan, 02=raft)
0xFFF711 current map
0xFFF712 current battle
0xFFF713 current map raft is on
0xFFF714 raft X coord
0xFFF715 raft Y coord
0xFFF717 battle message speed (00=slow, 01=medium slow, 02=medium fast, 03=fast)
0xFFF718 battle messages toggle (00=on, 01=off)
0xFFF719 current map to egress to
0xFFF71A-0xFFF799 current turn order 2 byte pairs (index, altered agility score)
0xFFF79A current turn index * 2 (or current byte of F71A)
0xFFF79C saved battle time (mid battle; in seconds)
0xFFF7A0 special battle record (359999 seconds = 99 hours 59 min 59 sec at the game start)
0xFFF7A4-0xFFF7A7 enemy item dropped flags (32 slots, 1 bit each, set=1, not set=0)
0xFFF7A8-0xFFF7AF currently ordered mithril weapons at the blacksmith (4 slots, 2 bytes each)
0xFFFF38 holds which script line index we're currently using