ff6a:doc:savefile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
ff6a:doc:savefile [2017/03/18 04:16]
madsiur
ff6a:doc:savefile [2019/02/27 18:29]
jvh147 some info.
Line 1: Line 1:
 ===== GBA Save File ===== ===== GBA Save File =====
  
-All the test have been made on a (U) save file (.sav). A quick analysis suggest the first $1E00 bytes of the file are 3 blocks of $A00 bytes for the 3 save slots. They could be close copy of the SNES SRAM $1600-$1FFF which would be logic but more test are needed. The data posted here is confirmed and match the order and offsets of the SNES SRAMThere is data in the $1E00-$37FF range but its purpose is unknown. Everything past that point is set to $00 so chances are it is unused space. +Most of the test have been made on a (U) save file (.sav). The save file contains three save slotsquicksave slot and some identifying save marks. A large portion of the file goes unused. The following table lists the data blocks of the save file including their hex offsetsScroll down for the content of the blocks.
 ^  Offsets  ^  Description  ^ ^  Offsets  ^  Description  ^
 |  ''$0000-$09FF''  | Slot 1 data | |  ''$0000-$09FF''  | Slot 1 data |
 |  ''$0A00-$13FF''  | Slot 2 data | |  ''$0A00-$13FF''  | Slot 2 data |
 |  ''$1400-$1DFF''  | Slot 3 data | |  ''$1400-$1DFF''  | Slot 3 data |
-|  ''$1E00-$37FF'' Unknown data +|  ''$1E00-$1FFF'' Save marks | 
-|  ''$3800-$FFFF''  | Unused space |+|  ''$2000-$23FF''   | Data extension for slot 1 | 
 +|  ''$2400-$27FF''   | Data extension for slot 2 | 
 +|  ''$2800-$2BFF''   | Data extension for slot 3 | 
 +|  ''$2C00-$2FFF''   | Bestiary for slot 1 | 
 +|  ''$3000-$33FF''   | Bestiary for slot 2 | 
 +|  ''$3400-$37FF''   | Bestiary for slot 3 
 +|  ''$3800-$5BFF''   | Quicksave slot | 
 + ''$5C00-$FFFF''   | Unused space - Filled with 0xFF |
  
- Offsets   Description  +==== Slot data ==== 
- Character block (repeat 16 times)  || +This block is the regular save data space and the first $1E00 bytes of the file are 3 blocks of $A00 bytes for the 3 save slots. They are mostly similar to SNES [[ff3:ff3us:doc:asm:ram:field_ram#fffsave_ram|$1600-$1FFF: Save RAM]]. 
- ''$0000''  | Actor index | +^ Offsets ^ Description ^ 
- ''$0001''  | Graphic index | +| Character block (repeat 16 times) || 
- ''$0002-$0007''  | Name (A-Z $20-$39, a-z $3A-$53) | +| ''$0000''  | Actor index | 
- ''$0008''  | Level | +| ''$0001''  | Graphic index | 
- ''$0009-$000A''  | Current HP | +| ''$0002-$0007''  | Name (A-Z $20-$39, a-z $3A-$53) | 
- ''$000B-$000C''  | bbhhhhhh hhhhhhhh |+| ''$0008''  | Level | 
 +| ''$0009-$000A''  | Current HP | 
 +| ''$000B-$000C''  | bbhhhhhh hhhhhhhh |
 |  | b: hp boost (none, 25%, 50% , 12.5%) | |  | b: hp boost (none, 25%, 50% , 12.5%) |
 |  | h: max hp | |  | h: max hp |
- ''$000D-$000E''  | Current MP | +| ''$000D-$000E''  | Current MP | 
- ''$000F-$0010''  | bbmmmmmm mmmmmmmm |+| ''$000F-$0010''  | bbmmmmmm mmmmmmmm |
 |  | b: mp boost (none, 25%, 50% , 12.5%) | |  | b: mp boost (none, 25%, 50% , 12.5%) |
 |  | h: max mp | |  | h: max mp |
- ''$0011-$0013''  | Current EXP | +| ''$0011-$0013''  | Current EXP | 
- ''$0014''  | weicmpzd Status 1 |+| ''$0014''  | weicmpzd Status 1 |
 |  | w: wound | |  | w: wound |
 |  | e: petrify | |  | e: petrify |
 |  | i: imp | |  | i: imp |
-|  | c: clear |+|  | c: invisible |
 |  | m: magitek | |  | m: magitek |
 |  | p: poison | |  | p: poison |
 |  | z: zombie | |  | z: zombie |
-|  | d: dark +|  | d: blind 
- ''$0015''  | fihcmlzr Status 4 |+| ''$0015''  | fihcmlzr Status 4 |
 |  | f: float | |  | f: float |
 |  | i: interceptor | |  | i: interceptor |
 |  | h: hide    (?) | |  | h: hide    (?) |
 |  | c: control (?) | |  | c: control (?) |
-|  | m: morph   (?) | +|  | m: trance   (?) | 
-|  | l: life 3  (?) |+|  | l: reraise  (?) |
 |  | z: freeze  (?) | |  | z: freeze  (?) |
 |  | r: rage    (?) | |  | r: rage    (?) |
- ''$0016-$0019''  | Battle Commands | +| ''$0016-$0019''  | Battle Commands | 
- ''$001A'' Strenght +| ''$001A'' Strength 
- ''$001B''  | Speed | +| ''$001B''  | Speed | 
- ''$001C''  | Stamina | +| ''$001C''  | Stamina | 
- ''$001D''  | Magic | +| ''$001D''  | Magic | 
- ''$001E''  | Esper | +| ''$001E''  | Esper | 
- ''$001F''  | Right Hand | +| ''$001F''  | Right Hand | 
- ''$0020''  | Left Hand | +| ''$0020''  | Left Hand | 
- ''$0021''  | Head | +| ''$0021''  | Head | 
- ''$0022''  | Body | +| ''$0022''  | Body | 
- ''$0023''  | Relic 1 | +| ''$0023''  | Relic 1 | 
- ''$0024''  | Relic 2 | +| ''$0024''  | Relic 2 | 
- End of character block  || +| End of character block || 
-|  ''$0260-0262''  | Gil | +| Roster (16 bytes. One byte per character.) || 
-|  ''$0266-0268''  | Steps | +| ''$0250-$025F'' | verbbppp | 
-|  ''$0263'' Hours + v: Character is visible 
-|  ''$0264'' Minutes +|  | e: Character is enabled | 
-|  ''$0265'' Seconds +|  | r: Battle Row (back row if set) | 
-|  ''$08B6'' Save Related? ($81 to $C1save) | +|  | b: Battle Order (1-4) | 
-|  ''$096D'' Save Related? (same as $09A1) | +|  | p: Party (0: unassigned, 1-3: groups) | 
-|  ''$09A1-09A5'' Save related? (5 same values) | +| Generic Data || 
-|  ''$09FE-09FF''  | Checksum |+''$0260-$0262''  | Gil | 
 +''$0263''  | Hours | 
 +| ''$0264''  | Minutes | 
 +| ''$0265''  | Seconds | 
 +''$0266-$0268''  | Steps 
 +| Ability Lists || 
 +| ''$0269-$02A8'' | Character 1 known spells (57 spells + 7 empty slots, 1 byte per spell slot) | 
 +| ''$02A9-$0568'' | Spells for the other 11 characters | 
 +| ''$0569-$06F4'' | Seems empty. Probably leftovers from moving the item data to another location. | 
 +| ''$06F5'' | Active group number. (Note! Different location in SNES version.) | 
 +| ''$06F6'' | Trance bar/counter. | 
 +| ''$06F7'' | Learned Bushido | 
 +| ''$06F8-$0727'' | Legacy Japanese Bushido names from SNES (Static marks) | 
 +| ''$0728'' | Learned Blitzes | 
 +| ''$0729-$072B'' | Learned Lores | 
 +| ''$072C-$074B'' | Learned Rages | 
 +| ''$074C'' | Learned Dances | 
 +| Config Data || 
 +| ''$074D-$07C6'' | Config Data block | 
 +| ''$074D'' | cmmmwbbb 
 +|  | c: command set (window/short) | 
 +|  | m: message speed | 
 +|  | w: battle mode (active/wait) | 
 +|  | b: battle speed | 
 +''$074E'' | gcsrwwww | 
 + g: gauge 
 +|  | c: cursor | 
 +|  | s: sound (removed) | 
 +|  | r: re-equip | 
 +|  | w: wallpaper (values 0-7 valid) | 
 +''$074F'' | - - - -4321 (removed) | 
 + 4: player 2 control character 4 
 +|  | 3: player 2 control character 3 | 
 +|  | 2: player 2 control character 2 | 
 +|  | 1: player 2 control character 1 | 
 +''$0750'' | aaaabbbb (removed) | 
 + a: A button mapping (0 = start, 1 = A, 2 = B, 3 = X, 4 = Y, 5 = top L, 6 = top R, 7 = select) 
 +|  | b: B button mapping | 
 +''$0751'' | xxxxyyyy (removed) | 
 + x: X button mapping | 
 +|  | y: Y button mapping | 
 +| ''$0752'' | llllrrrr (removed) | 
 +|  | l: top L button mapping | 
 +|  | r: top R button mapping | 
 +| ''$0753'' | tttteeee (removed) | 
 +|  | t: Start button mapping | 
 +|  | e: Select button mapping | 
 +| ''$0754'' | mbcccsss | 
 +|  | m: controller 2 enabled (unused) | 
 +|  | b: enable custom button config (unused) | 
 +|  | c: Font/Window palette color selection (unused) | 
 +|  | s: Magic order | 
 +| ''$0755-$0756'' | Font color | 
 +| ''$0757-$07C6'' | Window palettes/colors (8 palettes7 colors each) | 
 +| ''$07C7-$07C8'' | Empty (SNES version had save counter here.
 +| Battle Events || 
 +| ''$07C9-$07CE'' | Seems empty | 
 +| ''$07CF'' | abcdefgh 
 +|  | a: if set, program compares current monster index with monster index at CF3780,X. if equal, monster index is changed to monster index at CF3782,X. | 
 +|  | b-h: same as a | 
 +''$07D0'' | - - - - - mtf | 
 + m: permanent trance (for Humbaba battle) | 
 +|  | t: trance lasts twice as long (set after Humbaba battle) | 
 +|  | f: magic only (Cultists' Tower) | 
 +| ''$07D1'' | ztrbemsg | 
 +|  | z: zone eater engulfed the party | 
 +|  | t: timers are shown in menu and battle | 
 +|  | r: ran out of time (before emperor's banquet) | 
 +|  | b: ran away from previous battle | 
 +|  | e: gained AP is displayed (espers have been acquired) | 
 +|  | m: trance is available | 
 +|  | s: enables scene with LOCKE and EDGAR if TERRA uses magic. | 
 +|  | g: game over after battle ends | 
 +''$07D2''-ums-gd | 
 +|  | u: LOCKE is wearing soldier uniform | 
 +|  | m: LOCKE is wearing merchant clothes | 
 +|  | s: SHADOW won't leave after battle | 
 +|  | g: GAU has been obtained | 
 +|  | d: DeathGaze has been defeated | 
 +| ''$07D3-$07D4'' | DeathGaze's HP | 
 +| ''$07D5'' | Battles Fought with Cursed Shield | 
 +| ''$07D6-$07DC'' | Seems empty | 
 +| Field Data || 
 +| ''$07DD-$081C'' | Veldt Formations Available (64 bytes) | 
 +| ''$081D-$083F'' | Seems empty | 
 +| ''$0840-$0863'' | Treasure Bits (indicates if chests have been collected) | 
 +| ''$0864-$086F'' | Empty treasure bits | 
 +| ''$0870-$087F'' | Seems empty. Leftover bytes from treasure bits. | 
 +| ''$0880-$08DB'' | Event bits | 
 +| ''$08DC-$08DD'' | Active party members in shops/menu | 
 +| ''$08DE-$08DF'' | Active party members in airship (last two bits are event bits.) | 
 +| ''$08E0-$095F'' | NPC event bits | 
 +| Position data || 
 +| ''$0960-$0961'' | Overworld XY Position | 
 +| ''$0962-$0963'' | Airship XY Position | 
 +| ''$0964-$0965'' | - -ddnzpm mmmmmmmm | 
 +|  | d: facing direction | 
 +|  | n: show map name | 
 +|  | z: z-level | 
 +|  | p: set destination as parent map | 
 +|  | m: Current Map Index | 
 +| ''$0966-$0967'' | Field XY Scroll Position (BG1) | 
 +| ''$0968'' | Facing Direction (00:Up, 01:Right, 02:Down, 03:Left, parent facing direction if bit 7 set) | 
 +| ''$0969-$096A'' | Parent Map Index | 
 +| ''$096B-$096C'' | Parent XY Position | 
 +| Other Data || 
 +| ''$096D'' | Random Number (RNG Seed for NPC walking direction.) | 
 +| ''$096E-$096F'' | Danger counter for random battles | 
 +| ''$0970-$097F'' | Saved Character Palette Indexes (for world map) | 
 +| ''$0980'' | Current Song index | 
 +| ''$0981-$09A0'' | Saved Object Map Indexes | 
 +| ''$09A1'' | Step counter used as an RNG Seed in determining the next random encounter. | 
 +| ''$09A2'' | Battle counter used as an RNG Seed in determining the monster formation. | 
 +| ''$09A3'' | RNG salt for use with $09A2 (increments +23 when $09A2 goes over 255.) | 
 +| ''$09A4'' | RNG salt for use with $09A1 (increments +17 when $09A1 goes over 255.) | 
 +| ''$09A5'' | Veldt battle group number. | 
 +| ''$09A6-$09A7'' | Pointer to Current Showing Character's Object Data | 
 +| ''$09A8-$09BF'' | Saved timer data (for 4 timers.) | 
 +| ''$09A8'' | pfrm - - - - | 
 + p: Pause timer in menu and battle. | 
 +|  | f: Timer is visible on field (timer 0 only)
 +|  | r: End battle or exit menu if timer runs out. | 
 +|  | m: Timer is visible in menu and battle (timer 0 only). | 
 +| ''$09A9-$09AA'' | Frame counter | 
 +| ''$09AB-$09AD'' | pointer to event code (+CA0000) | 
 +| End of timer block || 
 +| ''$09C0-$09C1'' | Party XY Map Position | 
 +| Event Variables ||    
 +| ''$09C2-$09C3'' | Points from Narshe security checkpoint/Emperor's banquet | 
 +| ''$09C4-$09C5'' | Narshe security checkpoint variable | 
 +| ''$09C6-$09CD'' | Empty | 
 +| ''$09CE-$09CF'' | Number of Dragons Left | 
 +| ''$09D0-$09D1'' | Cid's Health/Pieces of Coral | 
 +| More position data || 
 +| ''$09D2'' | Parent facing direction (00:Up, 01:Right, 02:Down, 03:Left) | 
 +| ''$09D3-$09F2'' | Character Saved XY Positions (2 bytes each) | 
 +| ''$09F3-$09F6'' | Party Z Levels | 
 +| ''$09F7-$09FD'' | Empty | 
 +| Checkum || 
 +''$09FE-09FF''  | Slot data checksum (Sum 16 from $0000-$09FD) | 
 + 
 +==== Save marks ==== 
 +This block contains various identifying save marks. 
 +^ Offsets ^ Description ^ 
 +|  ''$1E00-$1EFF''  | Seems empty | 
 +|  ''$1F00-$1F1F''  | Ascii mark: FINAL FANTASY VI ADVANCE | 
 +|  ''$1F20''        | 0x01: Game has been saved at least once. | 
 +|  ''$1F21-$1FEF''  | Seems empty | 
 +|  ''$1FF0''        | Most Recently Saved Slot. | 
 +|  ''$1FF1-$1FF7''  | Seems empty | 
 +|  ''$1FF8-$1FFF''  | FF6 static save mark: 0x1B, 0xE4, 0x1B, 0xE4, 0x1B, 0xE4, 0x1B, 0xE4 | 
 + 
 +==== Data extension ==== 
 +A block of data was added to the GBA port. Item inventory and Esper data were moved here when compared to the SNES version. The size of the block is 1024 bytes including a two byte checksum and it repeats three times for the three save slots. 
 +^ Offsets ^ Description ^ 
 +| ''$2000-$2003'' | Current Espers | 
 +| ''$2004-$2007'' | | 
 +| ''$2008'' | Autodash config setting 01:On 00:Off | 
 +| ''$2009'' | Japanese version script selection 00: Hiragana 01: Kanji | 
 +| ''$200A'' | 01: Game has been marked as completed (a star appears next to the save slot when viewed from the loading screen). | 
 +| ''$200B-$200F'' | | 
 +| ''$2010-$212F'' | Current Items (288 slots; to get GBA specific items, 0x80 is added to the quantity.) | 
 +| ''$2130-$224F'' | Item Quantities | 
 +| ''$2250-$225F'' | GBA added [[ff6a:doc:eventbits|event bits]] | 
 +| ''2260-$23FB'' | Seems Empty | 
 +| ''$23FC-$23FD'' | Static mark 0x47, 0x4D (Slot will appear as empty if not present.) | 
 +| ''$23FE-$23FF'' | Data extension checksum (Sum 16 + 1 from $2000-$23FD) | 
 + 
 +==== Bestiary ==== 
 +Bestiary was included in the GBA version and this block has its data. The size of the block is 1024 bytes including a two byte checksum and it repeats three times for the three save slots. Two bytes are used per monster and the byte order is the same as the monster index order. For a monster to appear in the bestiary, it needs to be slain at least once in a victorious battle. The victory increments a slain counter which gets values from 0x0-7FFF. 0x8000 clears the new entry flag. Total space is 1022/2 = 511 slots of which 384 are for pages visible in the game browser, 39 for unlisted monsters and the rest 88 are assumed to be empty. The last two bytes hold the bestiary checksum. 
 + 
 +| Bestiary || 
 +| ''$2C00-$2F4C'' | Monster list | 
 +| ''$2F4E-$2FFD'' | Empty space | 
 +| Checksum |
 +| ''$2FFE-$2FFF'' | Checksum (Sum16 + 1 from $2C00-$2FFD) | 
 + 
 +Example values: 
 +| ''$2C00'' | 28 | Monster Guard has been slain 40 times. | 
 +| ''$2C01'' | 80 | New entry has been cleared. | 
 + 
 + 
 +==== Quicksave Slot ==== 
 +A quicksave option was included in the GBA port and it enables the player to temporary save the game almost anywhere. Quicksave cannot directly be transferred to the other slots in-game, but contains the same data as the other slots plus some additions. 
 + 
 +| ''$3800-41FF'' | Quicksave Slot data | 
 +| ''$4200-45FF'' | Quicksave Data extension | 
 +| ''$4600-49FF'' | Quicksave Bestiary | 
 +| ''$4A00-5BFF'' | Quicksave Slot specific data; Last two bytes being a checksum? | 
  • ff6a/doc/savefile.txt
  • Last modified: 4 years ago
  • by bacteriamage