Final Fantasy IV (SNES)/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
m (simplified {rammap})
 
(35 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{rammap|game=Final Fantasy II (US)}}
{{rammap}}


==Miscellaneous==
==Main==
* <tt>7EEF8C</tt> - Targetting type
* <tt>7EEF8D</tt> - Controller, directional presses
* <tt>7EEF8E</tt> - Ability to Target single and multiple targets (00 for no)
* <tt>7EEF8F</tt> - Enemy target
* <tt>7EEF90</tt> - Playable Character target
* <tt>7EF0C2</tt> - Hit effect (graphic animation) for Fight
* <tt>7E06DF</tt> - Dialog/Text Window open amount (00 = closed, 08 = fully extended)


==Map Data==
{| class="wikitable sortable"
* <tt>7E06A2</tt> - Makes screen flash when walking, like damage
|-
* <tt>7E06C2</tt> - Makes screen pixelate when walking, like poison
! Category  !! Address  !! Description
* <tt>7E06C4</tt> - Makes location's colors inverted (not sprites)
|-
* <tt>7E06C9</tt> - Layer 2's scrolling method
|  General State  || 7E06B1  ||  1 if currently in a cutscene, 0 otherwise.
* <tt>7E06E3</tt> - change this for screen shake
|-
* <tt>7E0EDB</tt> - Tile properties for town (solid, non-solid, exit, harmful,etc...)
|  General State  || 7E06D5  ||  0 party is moving (walking/riding/flying between squares on current map), 1 when stationary. Possibly delayed by a frame or two.
* <tt>7E1A02 </tt>- Can you save and use a tent here? (00 - no, 01 - yes)
|-
* <tt>7E1E00</tt> - Music data (instruments and the likes)
|  General State  || 7E06D9  ||  1 when transitioning between maps, 0 otherwise.
* <tt>7E1A02</tt> - Can you save and use a tent here? (00 - no, 01 - yes)
|-
* <tt>7E1E00</tt> - Music data (instruments and the likes)
|  General State  || 7E0650  ||  nonzero if we're currently looking at the in-game menu (also possibly shop menus?)
* <tt>7E09CF</tt> - Event for location?
|-
* <tt>7E09D1</tt> - Storyline point for location?
|  General State  || 7E02E3  ||  1 when viewing the window that says what we got from a treasure chest, 0 otherwise (changes values/goes nuts during battles and screen transitions)
* <tt>7E1703</tt> - Current location map
|-
* <tt>7E0649 </tt>- Location name displayed (00-not currently displaying, 01-currently displaying)
|  General State  || 7E08FB  ||  item ID of the last item found in a treasure chest/pot.
* <tt>7E08F0</tt> - Location NPC sprite data, palette, location, movement, etc..
|-
* <tt>7F5000</tt> - Location MAP data in RAM
|  General State  || 7E1400  ||  Item Slot 1 Type
* <tt>7E172C</tt> - Location Exit destination
|-
* <tt>7E0FDE</tt> - Location NPC Layout
|  General State  || 7E1401  ||  Item Slot 1 Quantity
* <tt>7E0FDD</tt> - Location tileset
|-
* <tt>7E0FD6</tt> - Location Name displayed upon entering
|  General State  || 7E1402-5F  ||  Item Slots 2-48 (Note: 47 and 48 are FE and FF for Sort and Trashcan)
* <tt>7E0FD4</tt> - Layer 1 visibility, On/Off
|-
* <tt>7E0FD3</tt> - Layer 1 tileset (Whole maps, used for water and the likes)
|  General State  || 7E1660-2  ||  Gil
* <tt>7E0FE0</tt> - Layer 1 palette for locations
|-
* <tt>7F4480</tt> - Town Baron Level Data
|  Battle  || 7E0140  ||  1 if in a battle, 0 otherwise (doesn't include battle transitions)
|-
|  Battle  || 7E0685  ||  1 when blurring into battle, in battle, or in post-battle transition, 0 otherwise
|-
|  Battle  || 7E0686  ||  Encounter counter
|-
|  Battle  || 7E26BB  ||  battle autopilot flag. 1 when in a cutscene battle, 16 when in a non-cutscene battle, 0 when entering a battle.
|-
|  Battle  || 7E00A8  ||  battle results. 128 when TPK, 64 when ran away, 48 when victory, 32 when cutscene victory, 8 when cutscene defeat, 4 when fight is interrupted, 0 when in battle. Stays on last result when not in battle.
|-
|  Battle  || 7EEF8D  ||  Current target of cursor. Possible values:
** 0 through 7: One of the 8 possible enemy targets.
** 8 through 12: One of the 5 possible ally targets.
** 13: All allies
** 255 / -1: All enemies
|-
|  Battle  || 7E000E  ||  bit flags for which of 8 possible enemies are being targeted. 255 (all flags set) for targeting all enemies.
|-
|  Battle  || 7E00D0  ||  slot of party member that currently has their battle menu open (0 through 4), or 255 / -1 if nobody does.
|-
|  Battle  || 7E1822  ||  same as above, but does not switch to 255 after the character had chosen their action; stays on the last character to have their battle menu optin.
|-
|  Battle  || 7E00D7  ||  1 when a party member's battle menu is open, 0 otherwise.
|-
|  Battle  || 7E1820  ||  1 when a battle menu is in the middle of opening/closing, 0 otherwise.
|-
|  Battle  || 7E1823  ||  battle cursor state. Known values are:
** 0 - no cursor
** 1 - base menu
** 2 - right-side Defend menu
** 3 - left-side Change menu
** 4 - choosing a target for an Attack command
** 5 - Item menu
** 6 - Spell menu
** 7 - Choosing a target for a Skill (Aim, Kick, Jump, etc.)
** 8 - Base menu closing after an action has been chosen
** 9 - Spell menu opening
** 10 - Spell menu closing
** 11 - Equipment menu above the item menu
** 12 - Choosing a target for an item or spell
** 13,14 - ?????
** 15 - Closing item menu
|-
|  Battle  || 7E0060  ||  Cursor position in battle base menu. Can be 0 through 4.
|-
|  Battle  || 7E0063  ||  Cursor position in item/spell menu. Can be 0 through 23 for spell menu, 0 through 47 for item menu.
|-
|  Battle  || 7E321B  ||  Battle item inventory. 48 items * 4 bytes per item. For each item:
** Byte 0: item ID
** Byte 1: Item quantity
** Byte 2-3: unused?
|-
|  Battle  || 7E38D8  ||  128 when surprised or back attack, 1 when first strike, 0 for a regular battle.
|-
|  Battle  || 7E030B  ||  113 when in back attack, 49 when party is oriented normally. Flickers onto 240 at start of a fight.
|-
|  Battle  || 7E00CE  ||  Slot number of ally targeted by most recent enemy attack. Can be 0 through 4.
|-
|  Battle  || 7E2307-8  ||  Enemy's current HP - Slot 01
|-
|  Battle  || 7E2309-A  ||  Enemy's max HP - Slot 01
|-
|  Battle  || 7E230B-C  ||  Enemy's current MP - Slot 01
|-
|  Battle  || 7E230D-E  ||  Enemy's max MP - Slot 01
|-
|  Battle  || 7E2387-E  ||  Repeat of 7E2307-7E230E - Slot 02
|-
|  Battle  || 7E29CD  ||  Current enemy count. Updates as enemies are killed.
|-
|  Battle  || 7E29CA  ||  3 bytes, one for how many enemies of the 3 possible enemy types are left in the fight. Updates as enemies are killed.
|-
|  Battle  || 7E29AD  ||  3 bytes, each representing the ID of one of the enemy types in the current fight. 255 for no enemy type. Values change to 255 if all enemies of that type have been killed.
|-
|  Battle  || 7E29B5  ||  8 bytes, can be 0, 1, or 2, representing which enemy group from <tt>7E29AD</tt> this


==Game/Menu Settings==
enemy is. Value is 255 if no enemy is in that slot or if the enemy has been killed.
* <tt>7E16A3</tt> - Menu 'Time' counter (always counting up)
|-
* <tt>7E1440</tt> - Begining of Items
Battle || 7E29BD  ||  same as <tt>7E29B5</tt>, but retains the values from the start of the fight.
* <tt>7E16AD</tt> - Menu customize settings - Battle Speed
|-
* <tt>7E16AE</tt> - Menu customize settings - Battle Message
Battle || 7E29A3  ||  value that represents how the enemies are arranged; this is independent of which enemies you're actually fighting. For example, 0 is just one enemy in the middle - used for most boss fights.
* <tt>7E16B6</tt> - Menu customize settings - Sound (Stereo/Mono)
* <tt>7E16AA</tt> - Menu customize settings - Window Color
* <tt>7E16AB</tt> - Menu customize settings - Window Color
* <tt>7E16A8</tt> - Menu customize settings - Change (Front/Back)
* <tt>7E1500 - 7E1553</tt> - Character Names
(Cecil/Kain/Rydia/Tellah/Edward/Rosa/Yang/Palom/Porom/Cid/Edge/FuSoYa/Golbez/Anna)
* <tt>7EC6B0</tt> - Menu string "Item"
* <tt>7EC730</tt> - Menu string "Magic"
* <tt>7EC7B0</tt> - Menu string "Equip"
* <tt>7EC830</tt> - Menu string "Status"
* <tt>7EC8B0</tt> - Menu string "Form"
* <tt>7EC930</tt> - Menu string "Change"
* <tt>7EC9B0</tt> - Menu string "Custom"
* <tt>7ECA30</tt> - Menu string "Save"
* <tt>7E0774 -7E0877</tt> Popup window text (found so and so, people's text, etc.)
* <tt>7E8CBC</tt> - Character command strings - character slot #1
* <tt>7E8D20</tt> - Character command strings - character slot #2
* <tt>7E8D84</tt> - Character command strings - character slot #3
* <tt>7E8DE8</tt> - Character command strings - character slot #4
* <tt>7E8E4C</tt> - Character command strings - character slot #5
* <tt>7E8EC0 -7E97A4</tt> - Battle Item menu strings and numbers (example - Cure1: 01)
* <tt>7EBEEA</tt> - Enemy Names and number of (Imp 4)
* <tt>7EBF02</tt> - In-battle character name (Slot #1)
* <tt>7EBF12</tt> - In-battle character Current/Max HP (Slot #1)
* <tt>7EBF82</tt> - In-battle character name (Slot #1)
* <tt>7EBF92</tt> - In-battle character Current/Max HP (Slot #1)
* <tt>7E0302</tt> - Item menu hand graphic (top menu)
* <tt>7E0303</tt> - Item menu hand graphic (attribute top menu)
* <tt>7E0312</tt> - Item menu hand graphic (bottom menu)
* <tt>7E0313</tt> - Item menu hand graphic attribute (bottom menu)
* <tt>7E0300</tt> - X coordinate of graphic hand pointer for Main Menu
* <tt>7E0301</tt> - Y coordinate of graphic hand pointer for Main Menu
* <tt>7E0302</tt> - Graphic for hand pointer for Main Menu
* <tt>7E0301</tt> - Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
* <tt>7E0300</tt> - X coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
* <tt>7E0301</tt> - Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
* <tt>7E0310</tt> - X coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in bottom menu
* <tt>7E0311</tt> - Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in bottom menu)


== Characters ==
|-
The following 64-byte memory blocks contain out-of-battle character data:
|  Battle  || 7EEF8E  ||  Ability to Target single and multiple targets (00 for no)
* 7E1000: Center Character
|-
* 7E1040: Upper Character
|  Battle  || 7EEF8F  ||  Enemy target
* 7E1080: Lower Character
|-
* 7E10C0: Center-up Character
|  Battle  || 7EEF90  ||  Playable Character target
* 7E1100: Center-low Character
|-
|  Battle  || 7EF0C2  ||  Hit effect (graphic animation) for Fight
|-
|  Map Data  || 7E0CDD  ||  overworld flag. Nonzero when on an overworld map.
|-
|  Map Data  || 7E1701  ||  current plane. 0 in overworld (and some cutscenes), 1 in underworld and some moon maps, 2 for the moon. This is set for overworld and local maps.
|-
|  Map Data  || 7E1702  ||  current local map. Does not update when exiting to overworld.
|-
|  Map Data  || 7E16D2  ||  player's current map traversal layer (local maps). Can be 0, 1, 2, or 3.
** Possible values:
*** 0 is always an obstacle.
*** If 1, can move to neighboring positions that have layer 1 or 3.
*** If 2, can move to neighboring positions that have layer 2 or 3.
*** If 3, can move to any non-zero neighboring layer.
** This is part of how the game handles things like bridges and underpasses. Usually, when walking onto a bridge, the player switches from traversal layers 1 -> 3 -> 2, and then 2 -> 3 -> 1 when walking back off, but stays on layer 1 if walking underneath a bridge.
|-
|  Map Data  || 7E06A1  ||  current map square type.
** On local maps, this is 5 bits of flags:
*** Bits 1-0: transition layer 0, 1, 2, or 3 (see above)
*** Bit 2: Position has a bridge
*** Bit 3: Position has a save point
*** Bit 4: Position transitions to another map
** On overworld maps, this represents the type of terrain in the current square. Known values:
*** 183: Grass/desert
*** 175: Forest
*** 167: Forest edge
*** 161,165,173: Town/cave/forest entrance
*** 180: Shoal
*** 182: River
*** 164: Ocean
*** 181: Foothills
*** 160,170,234: Mountain
*** 134: Lava
*** 0: Underworld walls
*** 133: Lunar plains (walking layer 1)
*** 200: Lunar mesa (walking layer 2)
*** 136: Lunar obstacles
*** 132: Lunar crystal palace
*** 201: Lunar ramp (walking layer 3)
|-
|  Map Data  || 7E06A3  ||  current map square type 1 square north of player
|-
|  Map Data  || 7E06A5  ||  current map square type 1 square east of player
|-
|  Map Data  || 7E06A7  ||  current map square type 1 square south of player
|-
|  Map Data  || 7E06A9  ||  current map square type 1 square west of player
|-
|  Map Data  || 7E06A2  ||  current map square landability. Seems to be a bitmask for whether various vehicle can land in this position.
|-
|  Map Data  || 7E1705  ||  player's facing direction. 0 = north, 1 = east, 2 = south, 3 = west
|-
|  Map Data  || 7E1706  ||  player's current map x coordinate. Updates at start of move when moving left, updates after move is finished when moving right.
|-
|  Map Data  || 7E1707  ||  player's current map y coordinate. Updates at start of move when moving up, updates after move is finished when moving down.
|-
|  Map Data  || 7E1704  ||  player's current vehicle. 0 = walking, 1 = chocobo, 2 = black chocobo, 3 = hovercraft, 4 = Enterprise, 5 = Falcon, 6 = Whale.


The following 128-byte memory blocks contain in-battle character data:
|-
* 7E2000: Center Character
|  Map Data  || 7E06A2  ||  Makes screen flash when walking, like damage
* 7E2080: Upper Character
|-
* 7E2100: Lower Character
|  Map Data  || 7E06C2  ||  Makes screen pixelate when walking, like poison
* 7E2180: Center-up Character
|-
* 7E2200: Center-low Character
|  Map Data  || 7E06C4  ||  Makes location's colors inverted (not sprites)
|-
|  Map Data  || 7E06C9  ||  Layer 2's scrolling method
|-
|  Map Data  || 7E06E3  ||  change this for screen shake
|-
|  Map Data  || 7E0EDB  ||  Tile properties for town (solid, non-solid, exit, harmful,etc...)
|-
|  Map Data  || 7E1A02  ||  Can you save and use a tent here? (00 - no, 01 - yes)
|-
|  Map Data  || 7E1E00  ||  Music data (instruments and the likes)
|-
|  Map Data  || 7E09CF  ||  Event for location?
|-
|  Map Data  || 7E09D1  ||  Storyline point for location?
|-
|  Map Data  || 7E1703  ||  Current location map
|-
|  Map Data  || 7E0649  ||  Location name displayed (00-not currently displaying, 01-currently displaying)
|-
|  Map Data  || 7E08F0  ||  Location NPC sprite data, palette, location, movement, etc..
|-
|  Map Data  || 7F5000  ||  Location MAP data in RAM
|-
|  Map Data  || 7E172C  ||  Location Exit destination
|-
|  Map Data  || 7E0FDE  ||  Location NPC Layout
|-
|  Map Data  || 7E0FDD  ||  Location tileset
|-
|  Map Data  || 7E0FD6  ||  Location Name displayed upon entering
|-
|  Map Data  || 7E0FD4  ||  Layer 1 visibility, On/Off
|-
|  Map Data  || 7E0FD3  ||  Layer 1 tileset (Whole maps, used for water and the likes)
|-
|  Map Data  || 7E0FE0  ||  Layer 1 palette for locations
|-
|  Map Data  || 7F4480  ||  Town Baron Level Data
|-
|  Game/Menu Settings  || 7E16A3  ||  Menu 'Time' counter (always counting up)
|-
|  Game/Menu Settings  || 7E1440  ||  Player's item inventory. 48 items * 2 bytes per item.
** Byte 0: item ID
** Byte 1: item quantity
|-
|  Game/Menu Settings  || 7E16AD  ||  Menu customize settings - Battle Speed
|-
|  Game/Menu Settings  || 7E16AE  ||  Menu customize settings - Battle Message
|-
|  Game/Menu Settings  || 7E16B6  ||  Menu customize settings - Sound (Stereo/Mono)
|-
|  Game/Menu Settings  || 7E16AA  ||  Menu customize settings - Window Color
|-
|  Game/Menu Settings  || 7E16AB  ||  Menu customize settings - Window Color
|-
|  Game/Menu Settings  || 7E16A8  ||  Menu customize settings - Change (Front/Back)
|-
|  Game/Menu Settings  || 7E1500 - 7E1553  ||  Character Names
(Cecil/Kain/Rydia/Tellah/Edward/Rosa/Yang/Palom/Porom/Cid/Edge/FuSoYa/Golbez/Anna)
|-
|  Game/Menu Settings  || 7EC6B0  ||  Menu string "Item"
|-
|  Game/Menu Settings  || 7EC730  ||  Menu string "Magic"
|-
|  Game/Menu Settings  || 7EC7B0  ||  Menu string "Equip"
|-
|  Game/Menu Settings  || 7EC830  ||  Menu string "Status"
|-
|  Game/Menu Settings  || 7EC8B0  ||  Menu string "Form"
|-
|  Game/Menu Settings  || 7EC930  ||  Menu string "Change"
|-
|  Game/Menu Settings  || 7EC9B0  ||  Menu string "Custom"
|-
|  Game/Menu Settings  || 7ECA30  ||  Menu string "Save"
|-
|  Game/Menu Settings  || 7E0774 -7E0877  || Popup window text (found so and so, people's text, etc.)
|-
|  Game/Menu Settings  || 7E8CBC  ||  Character command strings - character slot #1
|-
|  Game/Menu Settings  || 7E8D20  ||  Character command strings - character slot #2
|-
|  Game/Menu Settings  || 7E8D84  ||  Character command strings - character slot #3
|-
|  Game/Menu Settings  || 7E8DE8  ||  Character command strings - character slot #4
|-
|  Game/Menu Settings  || 7E8E4C  ||  Character command strings - character slot #5
|-
|  Game/Menu Settings  || 7E8EC0 -7E97A4  ||  Battle Item menu strings and numbers (example - Cure1: 01)
|-
|  Game/Menu Settings  || 7EBEEA  ||  Enemy Names and number of (Imp 4)
|-
|  Game/Menu Settings  || 7EBF02  ||  In-battle character name (Slot #1)
|-
|  Game/Menu Settings  || 7EBF12  ||  In-battle character Current/Max HP (Slot #1)
|-
|  Game/Menu Settings  || 7EBF82  ||  In-battle character name (Slot #1)
|-
|  Game/Menu Settings  || 7EBF92  ||  In-battle character Current/Max HP (Slot #1)
|-
|  Game/Menu Settings  || 7E0302  ||  Item menu hand graphic (top menu)
|-
|  Game/Menu Settings  || 7E0303  ||  Item menu hand graphic (attribute top menu)
|-
|  Game/Menu Settings  || 7E0312  ||  Item menu hand graphic (bottom menu)
|-
|  Game/Menu Settings  || 7E0313  ||  Item menu hand graphic attribute (bottom menu)
|-
|  Game/Menu Settings  || 7E0300  ||  X coordinate of graphic hand pointer for Main Menu
|-
|  Game/Menu Settings  || 7E0301  ||  Y coordinate of graphic hand pointer for Main Menu
|-
|  Game/Menu Settings  || 7E0302  ||  Graphic for hand pointer for Main Menu
|-
|  Game/Menu Settings  || 7E0301  ||  Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
|-
|  Game/Menu Settings  || 7E0300  ||  X coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
|-
|  Game/Menu Settings  || 7E0301  ||  Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
|-
|  Game/Menu Settings  || 7E0310  ||  X coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in bottom menu
|-
|  Game/Menu Settings  || 7E0311  ||  Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in bottom menu)
|-
|  Characters  || 7E1000  ||  Center Character
|-
|  Characters  || 7E1040  ||  Upper Character
|-
|  Characters  || 7E1080  ||  Lower Character
|-
|  Characters  || 7E10C0  ||  Center-up Character
|-
|  Characters  || 7E1100  ||  Center-low Character
|-
|  Characters  || 7E1140  ||  Extra Character Data(?)
|-
|  Characters  || 7E1180  ||  Extra Character Data(?)
|-
|  Characters  || 7E11C0  ||  Extra Character Data(?)
|-
|  Characters  || 7E1200  ||  Extra Character Data(?)
|-
|  Characters  || 7E1240  ||  Extra Character Data(?)
|-
|  Characters(Battle)  || 7E2000 ||  Center Character
|-
|  Characters(Battle)  || 7E2080 ||  Upper Character
|-
|  Characters(Battle)  || 7E2100 ||  Lower Character
|-
|  Characters(Battle)  || 7E2180 ||  Center-up Character
|-
|  Characters(Battle)  || 7E2200 ||  Center-low Character
|-
|  Miscellaneous  || 7E06DF  ||  Dialog/Text Window open amount (00 = closed, 08 = fully extended)
|}


Use the following offsets to gather information about each character:
==Character data(Out of Battle, 64 bytes)==
* +0: Character identifier. Read this modulo 64 - the 2 most significant bits appear to be flags. Values are:
{| class="wikitable sortable"
|-
! Address  !! Size  !! Description
|-
0 ||  1(&&63)  ||  Character identifier in lower 6 bits. Known values are:
** 0: Empty (Game ignores this slot until next party member acquired)
** 1: Cecil (Dark Knight)
** 1: Cecil (Dark Knight)
** 2: Kain (beginning of game)
** 2: Kain (beginning of game)
Line 117: Line 364:
** 19: FuSoYa
** 19: FuSoYa
** 20: Kain (final)
** 20: Kain (final)
* +2: Level.
|-
* +3: Status flags. (4 bytes)
|  00  ||  1(2MSb)  || Flags?
* +7: Current HP. (2 bytes)
|-
* +9: Max HP. (2 bytes)
|  01  ||  1  ||  Similar to above but class?
* +11: Current MP. (2 bytes)
|-
* +13: Max MP. (2 bytes)
|  02  ||  1  ||  Level.
* +16 through +47: Various stats (Strength, Agility, etc.)
|-
* +48: Head equipment slot
|  03  ||  4  ||  Status Flags (Grouped by byte):
* +49: Body equipment slot
** 80: Wounded
* +50: Arms equipment slot
** 40: Stone
* +51: Right hand equipment slot
** 20: Frog
* +52: ???
** 10: Tiny
* +53: Left hand equipment slot
** 08: Piggy
** 04: Mute
** 02: Darkness
** 01: Poison
** 80: Skull
** 40:Float
** 20:Paralyzed
** 10:Sleep
** 08:Confused
** 04:Berzerk
** 03:Petrify (2-bit value, 3=fully petrified)
** 80:Looks like paralyzed?
** 40:Can't move
** 20:?????
** 10:?????
** 08:?????
** 04:?????
** 02:?????
** 01:Doom timer?
** 80:?????
** 40:?????
** 20:?????
** 10:?????
** 0C:Decoy (2-bit value, 3=2 hits, 1=1 hit, 0/2=inactive)
** 02:?????
** 01:Crouch position (when HP is low)
|-
|  07  ||  2  ||  Current HP. (2 bytes)
|-
|  09  ||  2  ||  Max HP. (2 bytes)
|-
|  0B  ||  2  ||  Current MP. (2 bytes)
|-
|  0D  ||  2  ||  Max MP. (2 bytes)
|-
|  0F  ||  1  ||  Strength (Base)
|-
|  10  ||  1  ||  Agility (Base)
|-
|  11  ||  1  ||  Vitality (Base)
|-
|  12  ||  1  ||  Wisdom (Base)
|-
|  13  ||  1  ||  Will (Base)
|-
|  14  ||  1  ||  Strength (Effective)
|-
|  15  ||  1  ||  Agility (Effective)
|-
|  16  ||  1  ||  Vitality (Effective)
|-
|  17  ||  1  ||  Wisdom (Effective)
|-
|  18  ||  1  ||  Will (Effective)
|-
|  19  ||  ?  ||  ?????
|-
|  1A  ||  ?  ||  ?????
|-
|  1B  ||  1  ||  Attack
|-
|  1C  ||  1  ||  Accuracy
|-
|  1D  ||  1  ||  Attack %
|-
|  1E  ||  ?  ||  ?????
|-
|  22  ||  1  ||  Magic Defense
|-
|  23  ||  1  ||  Magic Evasion
|-
|  24  ||  ?  ||  ?????
|-
|  28  ||  1  ||  Defense
|-
|  29  ||  1  ||  Evasion
|-
|  2A  ||  1  ||  Defense %
|-
|  2B  ||  ?  ||  ?????
|-
|  30  ||  1  ||  Head equipment slot
|-
|  31  ||  1  ||  Body equipment slot
|-
|  32  ||  1  ||  Arms equipment slot
|-
|  33  ||  1  ||  Right hand equipment slot
|-
|  34  ||  1  ||  ?????
|-
|  35  ||  1  ||  Left hand equipment slot
|-
|  36  ||  1  ||  ?????
|-
|  37  ||  3  ||  Experience points
|-
|  3A  ||  ?  ||  ?????
|}


== Combat ==
==Battery-backed SRAM==
* 7E2000: Center Character
<pre>
* 7E2080: Upper Character
File Structure (0x2000 = 8192 bytes)
* 7E2100: Lower Character
* 7E2180: Center-up Character
* 7E2200: Center-low Character


Most of the offsets listed in the Characters section apply here.
Offset | Len  | Description
_______|______|_____________________
0x0000 |    ? | ?????
</pre>


[[Category:Final Fantasy II|RAM map]]
{{Internal Data}}

Latest revision as of 04:51, 18 April 2024

Chip tiny.png The following article is a RAM map for Final Fantasy IV (SNES).

Main

Category Address Description
General State 7E06B1 1 if currently in a cutscene, 0 otherwise.
General State 7E06D5 0 party is moving (walking/riding/flying between squares on current map), 1 when stationary. Possibly delayed by a frame or two.
General State 7E06D9 1 when transitioning between maps, 0 otherwise.
General State 7E0650 nonzero if we're currently looking at the in-game menu (also possibly shop menus?)
General State 7E02E3 1 when viewing the window that says what we got from a treasure chest, 0 otherwise (changes values/goes nuts during battles and screen transitions)
General State 7E08FB item ID of the last item found in a treasure chest/pot.
General State 7E1400 Item Slot 1 Type
General State 7E1401 Item Slot 1 Quantity
General State 7E1402-5F Item Slots 2-48 (Note: 47 and 48 are FE and FF for Sort and Trashcan)
General State 7E1660-2 Gil
Battle 7E0140 1 if in a battle, 0 otherwise (doesn't include battle transitions)
Battle 7E0685 1 when blurring into battle, in battle, or in post-battle transition, 0 otherwise
Battle 7E0686 Encounter counter
Battle 7E26BB battle autopilot flag. 1 when in a cutscene battle, 16 when in a non-cutscene battle, 0 when entering a battle.
Battle 7E00A8 battle results. 128 when TPK, 64 when ran away, 48 when victory, 32 when cutscene victory, 8 when cutscene defeat, 4 when fight is interrupted, 0 when in battle. Stays on last result when not in battle.
Battle 7EEF8D Current target of cursor. Possible values:
    • 0 through 7: One of the 8 possible enemy targets.
    • 8 through 12: One of the 5 possible ally targets.
    • 13: All allies
    • 255 / -1: All enemies
Battle 7E000E bit flags for which of 8 possible enemies are being targeted. 255 (all flags set) for targeting all enemies.
Battle 7E00D0 slot of party member that currently has their battle menu open (0 through 4), or 255 / -1 if nobody does.
Battle 7E1822 same as above, but does not switch to 255 after the character had chosen their action; stays on the last character to have their battle menu optin.
Battle 7E00D7 1 when a party member's battle menu is open, 0 otherwise.
Battle 7E1820 1 when a battle menu is in the middle of opening/closing, 0 otherwise.
Battle 7E1823 battle cursor state. Known values are:
    • 0 - no cursor
    • 1 - base menu
    • 2 - right-side Defend menu
    • 3 - left-side Change menu
    • 4 - choosing a target for an Attack command
    • 5 - Item menu
    • 6 - Spell menu
    • 7 - Choosing a target for a Skill (Aim, Kick, Jump, etc.)
    • 8 - Base menu closing after an action has been chosen
    • 9 - Spell menu opening
    • 10 - Spell menu closing
    • 11 - Equipment menu above the item menu
    • 12 - Choosing a target for an item or spell
    • 13,14 - ?????
    • 15 - Closing item menu
Battle 7E0060 Cursor position in battle base menu. Can be 0 through 4.
Battle 7E0063 Cursor position in item/spell menu. Can be 0 through 23 for spell menu, 0 through 47 for item menu.
Battle 7E321B Battle item inventory. 48 items * 4 bytes per item. For each item:
    • Byte 0: item ID
    • Byte 1: Item quantity
    • Byte 2-3: unused?
Battle 7E38D8 128 when surprised or back attack, 1 when first strike, 0 for a regular battle.
Battle 7E030B 113 when in back attack, 49 when party is oriented normally. Flickers onto 240 at start of a fight.
Battle 7E00CE Slot number of ally targeted by most recent enemy attack. Can be 0 through 4.
Battle 7E2307-8 Enemy's current HP - Slot 01
Battle 7E2309-A Enemy's max HP - Slot 01
Battle 7E230B-C Enemy's current MP - Slot 01
Battle 7E230D-E Enemy's max MP - Slot 01
Battle 7E2387-E Repeat of 7E2307-7E230E - Slot 02
Battle 7E29CD Current enemy count. Updates as enemies are killed.
Battle 7E29CA 3 bytes, one for how many enemies of the 3 possible enemy types are left in the fight. Updates as enemies are killed.
Battle 7E29AD 3 bytes, each representing the ID of one of the enemy types in the current fight. 255 for no enemy type. Values change to 255 if all enemies of that type have been killed.
Battle 7E29B5 8 bytes, can be 0, 1, or 2, representing which enemy group from 7E29AD this

enemy is. Value is 255 if no enemy is in that slot or if the enemy has been killed.

Battle 7E29BD same as 7E29B5, but retains the values from the start of the fight.
Battle 7E29A3 value that represents how the enemies are arranged; this is independent of which enemies you're actually fighting. For example, 0 is just one enemy in the middle - used for most boss fights.
Battle 7EEF8E Ability to Target single and multiple targets (00 for no)
Battle 7EEF8F Enemy target
Battle 7EEF90 Playable Character target
Battle 7EF0C2 Hit effect (graphic animation) for Fight
Map Data 7E0CDD overworld flag. Nonzero when on an overworld map.
Map Data 7E1701 current plane. 0 in overworld (and some cutscenes), 1 in underworld and some moon maps, 2 for the moon. This is set for overworld and local maps.
Map Data 7E1702 current local map. Does not update when exiting to overworld.
Map Data 7E16D2 player's current map traversal layer (local maps). Can be 0, 1, 2, or 3.
    • Possible values:
      • 0 is always an obstacle.
      • If 1, can move to neighboring positions that have layer 1 or 3.
      • If 2, can move to neighboring positions that have layer 2 or 3.
      • If 3, can move to any non-zero neighboring layer.
    • This is part of how the game handles things like bridges and underpasses. Usually, when walking onto a bridge, the player switches from traversal layers 1 -> 3 -> 2, and then 2 -> 3 -> 1 when walking back off, but stays on layer 1 if walking underneath a bridge.
Map Data 7E06A1 current map square type.
    • On local maps, this is 5 bits of flags:
      • Bits 1-0: transition layer 0, 1, 2, or 3 (see above)
      • Bit 2: Position has a bridge
      • Bit 3: Position has a save point
      • Bit 4: Position transitions to another map
    • On overworld maps, this represents the type of terrain in the current square. Known values:
      • 183: Grass/desert
      • 175: Forest
      • 167: Forest edge
      • 161,165,173: Town/cave/forest entrance
      • 180: Shoal
      • 182: River
      • 164: Ocean
      • 181: Foothills
      • 160,170,234: Mountain
      • 134: Lava
      • 0: Underworld walls
      • 133: Lunar plains (walking layer 1)
      • 200: Lunar mesa (walking layer 2)
      • 136: Lunar obstacles
      • 132: Lunar crystal palace
      • 201: Lunar ramp (walking layer 3)
Map Data 7E06A3 current map square type 1 square north of player
Map Data 7E06A5 current map square type 1 square east of player
Map Data 7E06A7 current map square type 1 square south of player
Map Data 7E06A9 current map square type 1 square west of player
Map Data 7E06A2 current map square landability. Seems to be a bitmask for whether various vehicle can land in this position.
Map Data 7E1705 player's facing direction. 0 = north, 1 = east, 2 = south, 3 = west
Map Data 7E1706 player's current map x coordinate. Updates at start of move when moving left, updates after move is finished when moving right.
Map Data 7E1707 player's current map y coordinate. Updates at start of move when moving up, updates after move is finished when moving down.
Map Data 7E1704 player's current vehicle. 0 = walking, 1 = chocobo, 2 = black chocobo, 3 = hovercraft, 4 = Enterprise, 5 = Falcon, 6 = Whale.
Map Data 7E06A2 Makes screen flash when walking, like damage
Map Data 7E06C2 Makes screen pixelate when walking, like poison
Map Data 7E06C4 Makes location's colors inverted (not sprites)
Map Data 7E06C9 Layer 2's scrolling method
Map Data 7E06E3 change this for screen shake
Map Data 7E0EDB Tile properties for town (solid, non-solid, exit, harmful,etc...)
Map Data 7E1A02 Can you save and use a tent here? (00 - no, 01 - yes)
Map Data 7E1E00 Music data (instruments and the likes)
Map Data 7E09CF Event for location?
Map Data 7E09D1 Storyline point for location?
Map Data 7E1703 Current location map
Map Data 7E0649 Location name displayed (00-not currently displaying, 01-currently displaying)
Map Data 7E08F0 Location NPC sprite data, palette, location, movement, etc..
Map Data 7F5000 Location MAP data in RAM
Map Data 7E172C Location Exit destination
Map Data 7E0FDE Location NPC Layout
Map Data 7E0FDD Location tileset
Map Data 7E0FD6 Location Name displayed upon entering
Map Data 7E0FD4 Layer 1 visibility, On/Off
Map Data 7E0FD3 Layer 1 tileset (Whole maps, used for water and the likes)
Map Data 7E0FE0 Layer 1 palette for locations
Map Data 7F4480 Town Baron Level Data
Game/Menu Settings 7E16A3 Menu 'Time' counter (always counting up)
Game/Menu Settings 7E1440 Player's item inventory. 48 items * 2 bytes per item.
    • Byte 0: item ID
    • Byte 1: item quantity
Game/Menu Settings 7E16AD Menu customize settings - Battle Speed
Game/Menu Settings 7E16AE Menu customize settings - Battle Message
Game/Menu Settings 7E16B6 Menu customize settings - Sound (Stereo/Mono)
Game/Menu Settings 7E16AA Menu customize settings - Window Color
Game/Menu Settings 7E16AB Menu customize settings - Window Color
Game/Menu Settings 7E16A8 Menu customize settings - Change (Front/Back)
Game/Menu Settings 7E1500 - 7E1553 Character Names

(Cecil/Kain/Rydia/Tellah/Edward/Rosa/Yang/Palom/Porom/Cid/Edge/FuSoYa/Golbez/Anna)

Game/Menu Settings 7EC6B0 Menu string "Item"
Game/Menu Settings 7EC730 Menu string "Magic"
Game/Menu Settings 7EC7B0 Menu string "Equip"
Game/Menu Settings 7EC830 Menu string "Status"
Game/Menu Settings 7EC8B0 Menu string "Form"
Game/Menu Settings 7EC930 Menu string "Change"
Game/Menu Settings 7EC9B0 Menu string "Custom"
Game/Menu Settings 7ECA30 Menu string "Save"
Game/Menu Settings 7E0774 -7E0877 Popup window text (found so and so, people's text, etc.)
Game/Menu Settings 7E8CBC Character command strings - character slot #1
Game/Menu Settings 7E8D20 Character command strings - character slot #2
Game/Menu Settings 7E8D84 Character command strings - character slot #3
Game/Menu Settings 7E8DE8 Character command strings - character slot #4
Game/Menu Settings 7E8E4C Character command strings - character slot #5
Game/Menu Settings 7E8EC0 -7E97A4 Battle Item menu strings and numbers (example - Cure1: 01)
Game/Menu Settings 7EBEEA Enemy Names and number of (Imp 4)
Game/Menu Settings 7EBF02 In-battle character name (Slot #1)
Game/Menu Settings 7EBF12 In-battle character Current/Max HP (Slot #1)
Game/Menu Settings 7EBF82 In-battle character name (Slot #1)
Game/Menu Settings 7EBF92 In-battle character Current/Max HP (Slot #1)
Game/Menu Settings 7E0302 Item menu hand graphic (top menu)
Game/Menu Settings 7E0303 Item menu hand graphic (attribute top menu)
Game/Menu Settings 7E0312 Item menu hand graphic (bottom menu)
Game/Menu Settings 7E0313 Item menu hand graphic attribute (bottom menu)
Game/Menu Settings 7E0300 X coordinate of graphic hand pointer for Main Menu
Game/Menu Settings 7E0301 Y coordinate of graphic hand pointer for Main Menu
Game/Menu Settings 7E0302 Graphic for hand pointer for Main Menu
Game/Menu Settings 7E0301 Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
Game/Menu Settings 7E0300 X coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
Game/Menu Settings 7E0301 Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in top menu)
Game/Menu Settings 7E0310 X coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in bottom menu
Game/Menu Settings 7E0311 Y coordinate of graphic hand pointer for Equip Menu (choosing which area of equipment you are changing in bottom menu)
Characters 7E1000 Center Character
Characters 7E1040 Upper Character
Characters 7E1080 Lower Character
Characters 7E10C0 Center-up Character
Characters 7E1100 Center-low Character
Characters 7E1140 Extra Character Data(?)
Characters 7E1180 Extra Character Data(?)
Characters 7E11C0 Extra Character Data(?)
Characters 7E1200 Extra Character Data(?)
Characters 7E1240 Extra Character Data(?)
Characters(Battle) 7E2000 Center Character
Characters(Battle) 7E2080 Upper Character
Characters(Battle) 7E2100 Lower Character
Characters(Battle) 7E2180 Center-up Character
Characters(Battle) 7E2200 Center-low Character
Miscellaneous 7E06DF Dialog/Text Window open amount (00 = closed, 08 = fully extended)

Character data(Out of Battle, 64 bytes)

Address Size Description
0 1(&&63) Character identifier in lower 6 bits. Known values are:
    • 0: Empty (Game ignores this slot until next party member acquired)
    • 1: Cecil (Dark Knight)
    • 2: Kain (beginning of game)
    • 3: Young Rydia
    • 4: Tellah (pre-Damycam)
    • 5: Gilbert
    • 6: Rosa (pre-Fabul)
    • 7: Yang (pre-Baron)
    • 8: Palom
    • 9: Porom
    • 10: Tellah (pre-Paladin)
    • 11: Cecil (Paladin)
    • 12: Tellah (post-Paladin)
    • 13: Yang (post-Baron)
    • 14: Cid
    • 15: Kain (pre-Sealed Cave)
    • 16: Rosa (final)
    • 17: Rydia (final)
    • 18: Edge
    • 19: FuSoYa
    • 20: Kain (final)
00 1(2MSb) Flags?
01 1 Similar to above but class?
02 1 Level.
03 4 Status Flags (Grouped by byte):
    • 80: Wounded
    • 40: Stone
    • 20: Frog
    • 10: Tiny
    • 08: Piggy
    • 04: Mute
    • 02: Darkness
    • 01: Poison
    • 80: Skull
    • 40:Float
    • 20:Paralyzed
    • 10:Sleep
    • 08:Confused
    • 04:Berzerk
    • 03:Petrify (2-bit value, 3=fully petrified)
    • 80:Looks like paralyzed?
    • 40:Can't move
    • 20:?????
    • 10:?????
    • 08:?????
    • 04:?????
    • 02:?????
    • 01:Doom timer?
    • 80:?????
    • 40:?????
    • 20:?????
    • 10:?????
    • 0C:Decoy (2-bit value, 3=2 hits, 1=1 hit, 0/2=inactive)
    • 02:?????
    • 01:Crouch position (when HP is low)
07 2 Current HP. (2 bytes)
09 2 Max HP. (2 bytes)
0B 2 Current MP. (2 bytes)
0D 2 Max MP. (2 bytes)
0F 1 Strength (Base)
10 1 Agility (Base)
11 1 Vitality (Base)
12 1 Wisdom (Base)
13 1 Will (Base)
14 1 Strength (Effective)
15 1 Agility (Effective)
16 1 Vitality (Effective)
17 1 Wisdom (Effective)
18 1 Will (Effective)
19 ? ?????
1A ? ?????
1B 1 Attack
1C 1 Accuracy
1D 1 Attack %
1E ? ?????
22 1 Magic Defense
23 1 Magic Evasion
24 ? ?????
28 1 Defense
29 1 Evasion
2A 1 Defense %
2B ? ?????
30 1 Head equipment slot
31 1 Body equipment slot
32 1 Arms equipment slot
33 1 Right hand equipment slot
34 1 ?????
35 1 Left hand equipment slot
36 1 ?????
37 3 Experience points
3A ? ?????

Battery-backed SRAM

File Structure (0x2000 = 8192 bytes)

	Offset | Len  | Description
	_______|______|_____________________
	0x0000 |    ? | ?????