The current URL is datacrystal.tcrf.net.
Arcana/RAM map: Difference between revisions
(Added 13A3-A7) |
(Elaborated on equipment flags, game progress and other such stuff. Did a little cleaning up because "temporary variables" is redundant for RAM.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
==Main Loop== | ==Main Loop== | ||
These are common when tracing and debugging. | |||
* $1049: Pointer to indirect function calls (JMP [$1049]) | * $1049: Pointer to indirect function calls (JMP [$1049]) | ||
* $1E10: Event pointer, used for reading most of the game's code ( | * $1E10 ([$10]): Event pointer, used for reading most of the game's code. (See a tutorial in the [[ROM_map#FOREWORD:_How_to_read_Arcana's_event_code|Foreward]]) | ||
* $1E14: Event pointer stack, stores return addresses during function calls | * $1E14 ([$14]): Event pointer stack, stores return addresses during function calls | ||
* $1E18 ([$18]): Function pointer | |||
* $1E1C ([$1C]): Address pointer | |||
== | ==General Variables== | ||
Some variables here are incredibly hard to trace because the address read is not always consistent. They're listed as arrays, since the game calls them with the first address plus an x offset. So depending on context, "Load $0643,x" could be reading from $0643, $0645, $0647... Typically the offset is related to a certain character, but sometimes there's a separate array listing what order to read the offsets in. When tracing code like that, it really helps to follow along in your emulator's RAM viewer. | |||
* $0643-065B: | * $0006: Usually set to #$2000, related to RAM transfers | ||
* $09A3-09BB: | * $0008: Usually set to #$8000, related to RAM transfers | ||
* $09C7-09DF: | * $0021-$0037: Temp, controller inputs | ||
* $09EB-0A03: | * $0041: Temp, screen display | ||
* $0A0F-0A27: | * $0042: Temp, screen lighting | ||
* $ | * $0043: Temp, OAM size | ||
* $ | * $0044: Temp, background mode | ||
* $0047: Temp, NMI status | |||
* $0624-$0626: Active spirit's HP (in binary-coded decimal) | |||
* $062A: Temp, APU | |||
* $062D: Temp offset used with $11F3 (party order) | |||
* $0643-065B: Array, Battle Enemy ID | |||
* $06F7-07??: Array, Cursor X position (usually $06F9; set by animation opcode 38-3F) | |||
* $071B-07??: Array, Cursor Y position (usually $071D; set by animation opcode 40-47) | |||
* $0787-07??: Array, Cursor X position (mirror of 06F7-) | |||
* $07AB-07??: Array, Cursor Y position (mirror of 07AB-) | |||
* $0937: Temp, a total used by animation opcode 48-4F | |||
* $0958: Temp, a total used by animation opcode 50-57 | |||
* $097F: Temp, a total used by animation opcode E8-EF | |||
* $09A3-09BB: Array, cursor (menu) position | |||
* $09C7-09DF: Array, misc return values (i.e. if a treasure contains an item/gold/equipment; battle item/spell/enemy chosen) | |||
* $09CB: Turn status (02: not turning, 00: turning left, 01: turning right) | |||
* $09EB-0A03: Array, current selection (Attacker ID, caster ID, treasure GP amount, whose turn is it etc) | |||
* $0A0F-0A27: Array, target (ID being attacked, treasure chest being opened) | |||
* $0A33-0A??: Stack, address pointer | |||
* $0A57-0A??: Stack, address bank (forms a 3 byte pointer with its 0A33 counterpart) | |||
* $0A7B-0A??: Array, Animation ID (involves tracking which things are animating) | |||
* $0A7F: Compass heading (00: N, 02: NE, 04: E, 06: SE... 0E: NW) (Tracks diagonals unlike $16FB) | |||
* $0A87-$0A8E: Current selected battle command (2 bytes per character) | * $0A87-$0A8E: Current selected battle command (2 bytes per character) | ||
** #$0001: Main menu | ** #$0001: Main menu | ||
Line 25: | Line 47: | ||
** #$0005: Weapons | ** #$0005: Weapons | ||
** #$0008: Attack | ** #$0008: Attack | ||
* $0B9F-0B??: Array, Animation loop variable (involves animation frames) | |||
* $0BFB-0C??: Stack, Event pointers | |||
* $0C57-0C??: Stack, Event pointer bank (forms a 3 byte pointer with its 0BFB counterpart) | |||
* $0CB3-0C??: Array, Stores function results (0=failure) (The event code uses this for branch if true/branch if false) | |||
* $0FF1: Temp, town compass (0200 is south) | |||
* $102F: Temp, a total used by animation opcode C0-C7 | |||
* $1037: Temp, a total used by animation opcode C8-CF | |||
* $103F: Temp, current selection | |||
* $1041: Temp, function results | |||
* $1047: Temp, loop var | |||
* $1049: Event Code Pointer (3 bytes) (stores subroutine pointers) | |||
* $104B: Event Code Bank | |||
* $104D: Temp, animation loop pointer 1 | |||
* $104F: Temp, animation loop pointer 2 | |||
* $1051: Temp, cursor X position | |||
* $1053: Temp, cursor Y position | |||
* $1055: Temp, OAM transfer | |||
* $1057: Temp, Main screen | |||
* $1058: Temp, Subscreen | |||
* $1059: Temp, Screen pixellation | |||
* $105A: Temp, HDMA channels | |||
* $105B-1060: Unused? | |||
* $1061: Temp, Color add | |||
* $1062: Temp, Color math | |||
* $1063: Temp, APC bit operations | |||
* $1064: Current music | |||
* $1066: Current sfx | |||
* $1068-106D: Related to graphics | |||
* $106E-108B: Unused? | |||
* $108C: RGB red | |||
* $108D: RGB green | |||
* $108E: RGB blue | |||
* $108F: Temp, portrait offset (used with text opcode 1B) | |||
* $1091: Animation finish timer | |||
* $1093: Unused? | |||
* $1095: Temp, pause status (used with text opcode 7F) | |||
* $1097: Text line speed (default 10 frame delay when printing a line at a time) | |||
* $1099: Text speed (default 1 frame delay per letter) | |||
* $109B-10C2: Array 1, related to text formatting. (Text subroutines call these variables [$00]-[$26] when x=$109B) | |||
* $10C3-10EA: Array 2, related to text formatting. (Text subroutines call these variables [$00]-[$26] when x=$10C3) | |||
* $10EB: Temp, ASCII values (used for displaying numbers) | |||
==Battle== | |||
* $1121: Attacker | * $1121: Attacker | ||
* $1123: Target | * $1123: Target | ||
* $1127: Spell ID | * $1127: Spell ID | ||
* $112B: Array, spell results (01=Confused, 02=Slept, 03=Paralyzed, 04=Petrified, 05=Silence) | |||
* $11B5: Tracks progress in intro crawl | |||
* $11B9: Current page# in item list | |||
* $11C1: Battle state (00=not fighting/can move, 02=battle poses, ) | * $11C1: Battle state (00=not fighting/can move, 02=battle poses, ) | ||
* $11C3: Status/Condition (a series of words in the order: Rooks, Spirit, Guest1, Guest2, Enemies 1-8) | * $11C3-11DA: Status/Condition (a series of words in the order: Rooks, Spirit, Guest1, Guest2, Enemies 1-8) | ||
** Odd byte: | ** Odd byte: | ||
*** #$00: Satisfactory | *** #$00: Satisfactory | ||
Line 39: | Line 107: | ||
*** #$06: Sleeping | *** #$06: Sleeping | ||
** Even byte: #$01 indicates a party member | ** Even byte: #$01 indicates a party member | ||
* $11DB-11F2: Mirror of 11C3- | |||
* $11F3-11FA: Order that spells hit the party (2 bytes per character) | * $11F3-11FA: Order that spells hit the party (2 bytes per character) | ||
** #$0000: Upper left | ** #$0000: Upper left | ||
Line 44: | Line 113: | ||
** #$0002: Lower left | ** #$0002: Lower left | ||
** #$0003: Lower right | ** #$0003: Lower right | ||
* $11FB-120A: Order that spells hit the enemies (2 bytes each) | |||
* $120B: Rooks' Element/Race | * $120B: Rooks' [[Arcana:Mechanics|Element/Race]] | ||
* $120D: Spirit's Element/Race | * $120D: Spirit's [[Arcana:Mechanics|Element/Race]] | ||
* $120F: Guest1's Element/Race | * $120F: Guest1's [[Arcana:Mechanics|Element/Race]] | ||
* $ | * $1211: Guest2's [[Arcana:Mechanics|Element/Race]] | ||
* $ | * $1213: Enemy1's [[Arcana:Mechanics|Element/Race]] | ||
** | * $1215: Enemy2's [[Arcana:Mechanics|Element/Race]] | ||
* $1217: Enemy3's [[Arcana:Mechanics|Element/Race]] | |||
* $1219: Enemy4's [[Arcana:Mechanics|Element/Race]] | |||
* $121B: Enemy5's [[Arcana:Mechanics|Element/Race]] | |||
* $121D: Enemy6's [[Arcana:Mechanics|Element/Race]] | |||
* $121F: Enemy7's [[Arcana:Mechanics|Element/Race]] | |||
* $1221: Enemy8's [[Arcana:Mechanics|Element/Race]] | |||
* $1223: Rooks' Strength | * $1223: Rooks' Strength | ||
* $1225: Spirit's Strength | * $1225: Spirit's Strength | ||
* $1227: Guest1's Strength | * $1227: Guest1's Strength | ||
* $1229: Guest2's Strength | * $1229: Guest2's Strength | ||
* $122B: Enemy1's Strength | * $122B: Enemy1's Strength | ||
** | * $122D: Enemy2's Strength | ||
* $123B: Rooks' Intelligence (reduces magic damage taken) | * $122F: Enemy3's Strength | ||
* $1231: Enemy4's Strength | |||
* $1233: Enemy5's Strength | |||
* $1235: Enemy6's Strength | |||
* $1237: Enemy7's Strength | |||
* $1239: Enemy8's Strength | |||
* $123B: Rooks' Intelligence (reduces magic damage taken, increases magic damage, affects magic evade) | |||
* $123D: Spirit's Intelligence | * $123D: Spirit's Intelligence | ||
* $123F: Guest1's Intelligence | * $123F: Guest1's Intelligence | ||
* $1241: Guest2's Intelligence | * $1241: Guest2's Intelligence | ||
* $1243: | * $1243: Enemy1's Intelligence | ||
** | * $1245: Enemy2's Intelligence | ||
* $1247: Enemy3's Intelligence | |||
* $1249: Enemy4's Intelligence | |||
* $124B: Enemy5's Intelligence | |||
* $124D: Enemy6's Intelligence | |||
* $124F: Enemy7's Intelligence | |||
* $1251: Enemy8's Intelligence | |||
* $1253: Rooks' Endurance (reduces physical damage taken) | * $1253: Rooks' Endurance (reduces physical damage taken) | ||
* $1255: Spirit's Endurance | * $1255: Spirit's Endurance | ||
Line 68: | Line 155: | ||
* $1259: Guest2's Endurance | * $1259: Guest2's Endurance | ||
* $125B: Enemy1's Endurance | * $125B: Enemy1's Endurance | ||
** | * $125D: Enemy2's Endurance | ||
* $126B: Rooks' Alertness (affects accuracy, evasion | * $125F: Enemy3's Endurance | ||
* $1261: Enemy4's Endurance | |||
* $1263: Enemy5's Endurance | |||
* $1265: Enemy6's Endurance | |||
* $1267: Enemy7's Endurance | |||
* $1269: Enemy8's Endurance | |||
* $126B: Rooks' Alertness (affects accuracy, evasion, critical hits and chance for extra turn) | |||
* $126D: Spirit's Alertness | * $126D: Spirit's Alertness | ||
* $126F: Guest1's Alertness | * $126F: Guest1's Alertness | ||
* $1271: Guest2's Alertness | * $1271: Guest2's Alertness | ||
* $1273: Enemy1's Alertness | * $1273: Enemy1's Alertness | ||
** | * $1275: Enemy2's Alertness | ||
* $1277: Enemy3's Alertness | |||
* $1283: Equipped | * $1279: Enemy4's Alertness | ||
** Two bytes each, in order of Rooks, Guest 1 and Guest 2. | * $127B: Enemy5's Alertness | ||
* $127D: Enemy6's Alertness | |||
* $127F: Enemy7's Alertness | |||
* $1281: Enemy8's Alertness | |||
* $1283: Equipped weapon, Rooks | |||
** This actually affects your stats. | |||
** Two bytes each, in order of Rooks, Spirit, Guest 1 and Guest 2. | |||
*** [[Arcana:Equipment|item ID]] / "Equipped by" flag | *** [[Arcana:Equipment|item ID]] / "Equipped by" flag | ||
** "Equipped by" flags: | ** "Equipped by" flags: | ||
Line 85: | Line 184: | ||
*** #$07: Darwin | *** #$07: Darwin | ||
*** #$08: Axs | *** #$08: Axs | ||
* $129B: Equipped | * $1285: Equipped weapon, Spirit (unused) | ||
* $12B3: Equipped | * $1287: Equipped weapon, Guest1 | ||
* $12CB: Equipped | * $1289: Equipped weapon, Guest2 | ||
* $128B: Equipped weapon, Enemy1 (affects their attack animation) | |||
* $128D: Equipped weapon, Enemy2 | |||
* $128F: Equipped weapon, Enemy3 | |||
* $1291: Equipped weapon, Enemy4 | |||
* $1293: Equipped weapon, Enemy5 | |||
* $1295: Equipped weapon, Enemy6 | |||
* $1297: Equipped weapon, Enemy7 | |||
* $1299: Equipped weapon, Enemy8 | |||
* $129B: Equipped armor, Rooks | |||
* $129D: Equipped armor, Spirit (unused) | |||
* $129F: Equipped armor, Guest1 | |||
* $12A1: Equipped armor, Guest2 | |||
* $12A3: Equipped armor, Enemy1 (affects their defense) | |||
* $12A5: Equipped armor, Enemy2 | |||
* $12A7: Equipped armor, Enemy3 | |||
* $12A9: Equipped armor, Enemy4 | |||
* $12AB: Equipped armor, Enemy5 | |||
* $12AD: Equipped armor, Enemy6 | |||
* $12AF: Equipped armor, Enemy7 | |||
* $12B1: Equipped armor, Enemy8 | |||
* $12B3: Equipped amulet, Rooks | |||
* $12B5: Equipped amulet, Spirit (unused) | |||
* $12B7: Equipped amulet, Guest1 | |||
* $12B9: Equipped amulet, Guest2 | |||
* $12BB: Equipped amulet, Enemy1 (probably affects defense and magic defense) | |||
* $12BD: Equipped amulet, Enemy2 | |||
* $12BF: Equipped amulet, Enemy3 | |||
* $12C1: Equipped amulet, Enemy4 | |||
* $12C3: Equipped amulet, Enemy5 | |||
* $12C5: Equipped amulet, Enemy6 | |||
* $12C7: Equipped amulet, Enemy7 | |||
* $12C9: Equipped amulet, Enemy8 | |||
* $12CB: Equipped ring, Rooks (unused) | |||
* $12CD: Equipped ring, Spirit (unused) | |||
* $12CF: Equipped ring, Guest1 (unused) | |||
* $12D1: Equipped ring, Guest2 (unused) | |||
* $12D3: Equipped ring, Enemy1 (unused) | |||
* $12D5: Equipped ring, Enemy2 (unused) | |||
* $12D7: Equipped ring, Enemy3 (unused) | |||
* $12D9: Equipped ring, Enemy4 (unused) | |||
* $12DB: Equipped ring, Enemy5 (unused) | |||
* $12DD: Equipped ring, Enemy6 (unused) | |||
* $12DF: Equipped ring, Enemy7 (unused) | |||
* $12E1: Equipped ring, Enemy8 (unused) | |||
* $12E3: Accuracy modifier (concerns Acc. Increase All and Accuracy Impair) | * $12E3: Accuracy modifier (concerns Acc. Increase All and Accuracy Impair) | ||
** There are 3 possible states: StatDown, Normal and StatUp. StatUp and StatDown cancel each other out. | ** There are 3 possible states: StatDown, Normal and StatUp. StatUp and StatDown cancel each other out. | ||
Line 107: | Line 249: | ||
* $12EF: Defense modifier (concerns Wall All and Defense Impair) (same flags) | * $12EF: Defense modifier (concerns Wall All and Defense Impair) (same flags) | ||
* $12F1: Defense modifier (enemies) | * $12F1: Defense modifier (enemies) | ||
* $12F3: Current HP, Rooks | |||
* $12F3: HP, Rooks | * $12F5: Current HP, Spirit | ||
* $12F5: HP, Spirit | * $12F7: Current HP, Guest1 | ||
* $12F7: HP, Guest1 | * $12F9: Current HP, Guest2 | ||
* $12F9: HP, Guest2 | * $12FB: Current HP, Enemy1 | ||
* $12FB: HP, Enemy1 | * $12FD: Current HP, Enemy2 | ||
** | * $12FF: Current HP, Enemy3 | ||
* $1323: MP, Rooks | * $1301: Current HP, Enemy4 | ||
* $1325: MP, Spirit | * $1303: Current HP, Enemy5 | ||
* $1327: MP, Guest1 | * $1305: Current HP, Enemy6 | ||
* $1329: MP, Guest2 | * $1307: Current HP, Enemy7 | ||
* $132B: MP, Enemy1 | * $1309: Current HP, Enemy8 | ||
** | * $130B: Copy of Current HP, Rooks | ||
* $130D: Copy of Current HP, Spirit | |||
* $130F: Copy of Current HP, Guest1 | |||
* $1311: Copy of Current HP, Guest2 | |||
* $1313: Copy of Current HP, Enemy1 | |||
* $1315: Copy of Current HP, Enemy2 | |||
* $1317: Copy of Current HP, Enemy3 | |||
* $1319: Copy of Current HP, Enemy4 | |||
* $131B: Copy of Current HP, Enemy5 | |||
* $131D: Copy of Current HP, Enemy6 | |||
* $131F: Copy of Current HP, Enemy7 | |||
* $1321: Copy of Current HP, Enemy8 | |||
* $1323: Current MP (Magic Points), Rooks | |||
* $1325: Current MP, Spirit | |||
* $1327: Current MP, Guest1 | |||
* $1329: Current MP, Guest2 | |||
* $132B: Current MP, Enemy1 (Enemies don't actually use MP, so these values just stay at 5555) | |||
* $132D: Current MP, Enemy2 | |||
* $132F: Current MP, Enemy3 | |||
* $1331: Current MP, Enemy4 | |||
* $1333: Current MP, Enemy5 | |||
* $1335: Current MP, Enemy6 | |||
* $1337: Current MP, Enemy7 | |||
* $1339: Current MP, Enemy8 | |||
* $133B: Copy of Current MP (Magic Points), Rooks | |||
* $133D: Copy of Current MP, Spirit | |||
* $133F: Copy of Current MP, Guest1 | |||
* $1341: Copy of Current MP, Guest2 | |||
* $1343: Copy of Current MP, Enemy1 (Enemies don't actually use MP, so these values just stay at 5555) | |||
* $1345: Copy of Current MP, Enemy2 | |||
* $1347: Copy of Current MP, Enemy3 | |||
* $1349: Copy of Current MP, Enemy4 | |||
* $134B: Copy of Current MP, Enemy5 | |||
* $134D: Copy of Current MP, Enemy6 | |||
* $134F: Copy of Current MP, Enemy7 | |||
* $1351: Copy of Current MP, Enemy8 | |||
* $1353: Current HP, Sylph | |||
* $1355: Current HP, Dao | |||
* $1357: Current HP, Marid | |||
* $1359: Current HP, Efrite | |||
* $135B: Current MP, Sylph | |||
* $135D: Current MP, Dao | |||
* $135F: Current MP, Marid | |||
* $1361: Current MP, Efrite | |||
* $1363: EXP to next level, Rooks | |||
* $1365: EXP to next level, Spirit (Unused? Seems to stay at 0258) | |||
* $1367: EXP to next level, Guest1 | |||
* $1369: EXP to next level, Guest2 | |||
* $136B: EXP award, Enemy1 (The EXP you get for beating this enemy. Unclaimed enemy slots are FFFF) | |||
* $136D: EXP award, Enemy2 | |||
* $136F: EXP award, Enemy3 | |||
* $1371: EXP award, Enemy4 | |||
* $1373: EXP award, Enemy5 | |||
* $1375: EXP award, Enemy6 | |||
* $1377: EXP award, Enemy7 | |||
* $1379: EXP award, Enemy8 | |||
* $137B: Level, Rooks | |||
* $137D: Level, Spirit (Shares Rooks' level) | |||
* $137F: Level, Guest1 | |||
* $1381: Level, Guest2 | |||
* $1383: Level, Enemy1 (Affects run chance) | |||
* $1385: Level, Enemy2 | |||
* $1387: Level, Enemy3 | |||
* $1389: Level, Enemy4 | |||
* $138B: Level, Enemy5 | |||
* $138D: Level, Enemy6 | |||
* $138F: Level, Enemy7 | |||
* $1391: Level, Enemy8 | |||
* $1393: Max HP, Rooks | * $1393: Max HP, Rooks | ||
* $1395: Max HP, Spirit | * $1395: Max HP, Spirit | ||
* $1397: Max HP, Guest1 | * $1397: Max HP, Guest1 | ||
* $1399: Max HP, Guest2 | * $1399: Max HP, Guest2 | ||
** (Next byte is Rooks' Max | ** (Next byte is Rooks' Max MP -> Enemies have no max HP/MP stat) | ||
* $139B: Max MP, Rooks | * $139B: Max MP, Rooks | ||
* $139D: Max MP, Spirit | * $139D: Max MP, Spirit | ||
* $139F: Max MP, Guest1 | * $139F: Max MP, Guest1 | ||
* $13A1: Max MP, Guest2 | * $13A1: Max MP, Guest2 | ||
* $13A3: Temp EXP | * $13A3: Temp EXP (A running total collected through battle) | ||
* $13A5: Temp GP | * $13A5: Temp GP | ||
* $13A7: Spirits not owned (Bit flags: xxxx EMDS) (Example: 6 -> 0110 -> missing Marid/Dao) | * $13A7: Spirits not owned (Bit flags: xxxx EMDS) (Example: 6 -> 0110 -> missing Marid/Dao) | ||
* $13A9: Card inventory ( | * $13A9-13B8: Card inventory (8 total, 2 bytes each; item ID / quantity) | ||
** #$00: Empty slot | ** #$00: Empty slot | ||
** #$01: Wind Card | ** #$01: Wind Card | ||
Line 166: | Line 351: | ||
** #$07: Call Amulet | ** #$07: Call Amulet | ||
** #$08: Mirror Card (bugged) | ** #$08: Mirror Card (bugged) | ||
* $13B9-$1418: Item inventory (2 bytes per slot, | * $13B9-$1418: Item inventory (2 bytes per slot, 48 slots: item ID with a high byte of 00)(Items could have had quantities, but they didn't implement it.) | ||
** #$01: Return Ring | ** #$01: Return Ring | ||
** #$02: Water of Life (dummied) | ** #$02: Water of Life (dummied) | ||
Line 184: | Line 369: | ||
** #$10: Moon Oil | ** #$10: Moon Oil | ||
** #$11: Enchanted Jewel (dummied) | ** #$11: Enchanted Jewel (dummied) | ||
* $1419–1458: [[Arcana:Equipment|Equipment]] inventory (2 bytes per slot, | * $13B9-1418: Item inventory (Two bytes each, 48 entries) | ||
** ([[Arcana:Equipment|item ID]] / quantity) | |||
* $1419–1458: [[Arcana:Equipment|Equipment]] inventory (2 bytes per slot, 32 slots: ID then Equipped By) | |||
** Equipped by flags: | ** Equipped by flags: | ||
** #$00: Rooks | ** #$00: Rooks | ||
Line 192: | Line 379: | ||
** #$08: Axs | ** #$08: Axs | ||
** #$FF: Nobody | ** #$FF: Nobody | ||
** ([[Arcana:Equipment|item ID]] / quantity) | |||
(For instance, if Rooks claimed a Flying Axe then that slot would show "12 00" for Flying Axe (12), Rooks (00). If Axs claimed a Plate Mail then that slot would show "31 08" for Plate Mail (31), Axs (08). This LOOKS like it's equipped with your name next to the weapon, but this is actually cosmetic. Since the game doesn't actually remove equipment from your inventory like in FF4, there's a separate routine that updates your equipped weapon at $1283. So if you can edit your equipped weapon directly, the game won't notice it's not actually in your inventory.) | |||
* $1459-1498: Rooks' spell list (Two bytes each, 32 entries) (Each spell is the [[Arcana:Spells|Spell ID]] followed by #$00) | |||
* $1499-14D8: Spirit's spell list (Two bytes each, 32 entries) | |||
* $14D9-1518: Guest1's spell list (Two bytes each, 32 entries) | |||
* $1519-1558: Guest2's spell list (Two bytes each, 32 entries) | |||
* $1559: Current GP | |||
* $155B-1562: Current party (Two bytes each) | |||
** #$00: Rooks | |||
** #$01: Sylph | |||
** #$02: Marid | |||
** #$03: Dao | |||
** #$04: Efrite | |||
** #$05: Teefa | |||
** #$06: Salah | |||
** #$07: Darwin | |||
** #$08: Axs | |||
** #$09: (Empty slot) | |||
* $1563-1572: Unused? (Appears to be enemy data, so ...enemy party slots.) | |||
* $1573: Current area (high byte 1 = dungeon, 0 = town)(Towns 0000, 0001, 0002...)(Dungeon floors 0100, 0101 for chapter 1....) | |||
* $1575: Used for comparisons, especially in banks 02, 05 and 07 | |||
* $1577: Window color (3 colors represented by 2 bytes: bitwise it looks like (xBBB B0GG GG0R RRR0) where x is unused and the 0's are...zeros.) | |||
* $1579: Encounter type (2=back attack, 3=normal fight) | |||
* $157B: Show compass (01=show, 00=hide) | |||
* $157D: Compass subdirection (updated with 01/A126 Event_Turning_Step) | |||
* $157F: Unused? | |||
* $1580-16EB: Text buffer for writing text or numbers to be repositioned later. (Text opcodes aren't capable of running code, so the game writes everything dynamic in advance. So stuff like "this character gained this level's levelup stats or learned this spell" are written in advance here.) | |||
** For spells, names are preceded by 06 0D (white) if usable and 06 0E (grayed) if not. | |||
** $1581: Read point for character name in levelup messages ("All of [reads the text at $1581]/Rooks'/ power has been increased") | |||
** $15AF: Commonly a pointer to text is written here or after this entry, then overwritten with the actual text. | |||
** $16DB: Temp var for displaying a 1st number, like attack power or damage, or how many of the first monster there are | |||
** $16DD: Temp var for displaying a 2nd number, like defense power, or strength levelup bonus, or how many of the second monster there are | |||
** $16DF: Temp var for displaying a 3rd number, like endurance levelup bonus | |||
** $16E1: Temp var for displaying a 4th number, like intelligence levelup bonus | |||
** $16E3: Temp var for displaying a 5th number, like alertness levelup bonus | |||
** $16E5: Temp var for displaying a 6th number, like current HP in the status screen | |||
** $16E7: Temp var for displaying a 7th number, like HP levelup bonus | |||
** $16E9: Temp var for displaying a 8th number, like current MP in the status screen | |||
** $16EB: Temp var for displaying a 9th number, like MP levelup bonus | |||
** $16ED: Temp var for displaying a 10th number, like current EXP in the status screen | |||
== | ==Dungeons and Towns== | ||
* $ | * $16F1: Stores the destination floor when taking a staircase or door | ||
* $16F3: 01 if in motion, 00 if standing still | |||
* $16F5: Current floor tile value (affects which encounters you get, along with everything else that happens in a dungeon) | |||
* $16F3: | |||
* $16F5: Current floor tile value | |||
* $16F7: Dungeon X position | * $16F7: Dungeon X position | ||
* $16F9: Dungeon Y position | * $16F9: Dungeon Y position | ||
* $16FB: Current direction (#$00 North, #$02 East, #$04 South, #$06 West) | * $16FB: Current direction (#$00 North, #$02 East, #$04 South, #$06 West) | ||
* $16FD: | * $16FD: Map number (0000=Map1, 0080=Map2, 0100=Map3) | ||
* $16FF: | * $16FF-177E: Map1 progress | ||
* $ | * $177F-17FE: Map2 progress | ||
* $1885: Shop selection (i.e. Card | * $17FF-187E: Map1 progress | ||
* $ | (Most of these town variables are used throughout bank 03, which uses a huge number of RAM addresses) | ||
* $187F: Town direction (0000=North, 0200=South, 03F8=West) | |||
* $1881: Town selection (0=Armory,1=Inn,2=Healer,3=Pub,8000=Exit) | |||
* $1883: Shop max entries (Number of entries in current menu) | |||
* $1885: Shop selection (i.e. Card Shop has values 0-6) | |||
* $1887: Related to shop menus | |||
* $1889: Related to shop menus | |||
* $188B: Related to shop menus | |||
* $188D: Shop screen position (0-3 for a shop with 4 weapons) | |||
* $188F: Related to shop selection | |||
* $1891: Related to shop menus | |||
* $1893: Used with color math register $2131 | |||
* $1895-189C: Used with the spirit healer to show which spirit cards are torn | |||
* $189D: Related to the spirit healer | |||
* $189F: Related to shops and towns | |||
* $18A1: Related to shops and towns | |||
* $18A3: Unused? | |||
* $18A5: Which card, when using multiple cards in battle | |||
* $18A7: How many cards, when using multiple cards in battle | |||
* $18A9: Related to cursor selection (found in bank 07) | |||
* $18C5: Spell type | * $18C5: Spell type | ||
* $18C9: Temp MP | * $18C9: Temp MP | ||
Line 251: | Line 458: | ||
* $18D7: Encounter layout (long ptr) | * $18D7: Encounter layout (long ptr) | ||
* $18DA: Encounter enemy list (long ptr) | * $18DA: Encounter enemy list (long ptr) | ||
* $18DF: Bosses defeated | * $18DF: Bosses defeated (0=Ch2 start, 1=Cyclops killed)(Not all chapters use this since later fights start with a cutscene rather than a fight) | ||
* $18E1: Temp var for Boss encounter (6 = Cyclops) | * $18E1: Temp var for Boss encounter (6 = Cyclops) | ||
* $18E3-$18E8: Treasure chest flags (each chest has its own bit) | * $18E3-$18E8: Treasure chest flags (each chest has its own bit) | ||
* $18EF: Battle related | |||
* $18F3: Decompression entry (long ptr) | * $18F3: Decompression entry (long ptr) | ||
* $18F8: Decompression start (long ptr) | * $18F8: Decompression start (long ptr) | ||
* $18FF: Event | * $18FF: Story progress (the Event Moment, in FF7 terms) | ||
** 05: | ** 00: Before game starts | ||
** 0A: | ** 01: Rooks introduced | ||
** 0E: | ** 02: Teefa introduced | ||
** 18: | ** 03: Can exit Galia | ||
** 04: Entered Crystal Sword room | |||
** 05: (Chapter 2) Salah joins | |||
** 06: Meet Darwin | |||
** 07: Darwin joins | |||
** 08: Efrite joins | |||
** 09: Entered Reinoll's place | |||
** 0A: (Chapter 3) Looking for Axs | |||
** 0B: Found Axs | |||
** 0C: Defeated the Hydra | |||
** 0D: Entered the Lava Room | |||
** 0E: (Chapter 4) Axs rejoins (he left so he's unequipped again) | |||
** 0F: Meet Darah | |||
** 10: The door is locked | |||
** 11: Salah is awake | |||
** 12: Salah meets a door | |||
** 13: Meet Darah and Barah | |||
** 14: Meet Ariel (If it's a trap, I will fall into a trap!) | |||
** 15: Meet Darwin again | |||
** 16: Meet Teefa | |||
** 17: Entered the door to Galneon | |||
** 18: (Chapter 5) Darwin and Teefa join | |||
** 19: Meet Karul | |||
** 1A: Meet Galneon again | |||
** 1B: Meet Red and Blue Guardians | |||
** 1C: Meet Tiamat | |||
** 1D: Enter door to Rimsala | |||
* $1927: Credits progress | |||
{{Internal Data}} | {{Internal Data}} |
Latest revision as of 07:06, 9 February 2025
(Back to Main page)
- The list corresponds to RAM variables used by the game engine. They are generally accessed by LDA and STA instructions.
Main Loop
These are common when tracing and debugging.
- $1049: Pointer to indirect function calls (JMP [$1049])
- $1E10 ([$10]): Event pointer, used for reading most of the game's code. (See a tutorial in the Foreward)
- $1E14 ([$14]): Event pointer stack, stores return addresses during function calls
- $1E18 ([$18]): Function pointer
- $1E1C ([$1C]): Address pointer
General Variables
Some variables here are incredibly hard to trace because the address read is not always consistent. They're listed as arrays, since the game calls them with the first address plus an x offset. So depending on context, "Load $0643,x" could be reading from $0643, $0645, $0647... Typically the offset is related to a certain character, but sometimes there's a separate array listing what order to read the offsets in. When tracing code like that, it really helps to follow along in your emulator's RAM viewer.
- $0006: Usually set to #$2000, related to RAM transfers
- $0008: Usually set to #$8000, related to RAM transfers
- $0021-$0037: Temp, controller inputs
- $0041: Temp, screen display
- $0042: Temp, screen lighting
- $0043: Temp, OAM size
- $0044: Temp, background mode
- $0047: Temp, NMI status
- $0624-$0626: Active spirit's HP (in binary-coded decimal)
- $062A: Temp, APU
- $062D: Temp offset used with $11F3 (party order)
- $0643-065B: Array, Battle Enemy ID
- $06F7-07??: Array, Cursor X position (usually $06F9; set by animation opcode 38-3F)
- $071B-07??: Array, Cursor Y position (usually $071D; set by animation opcode 40-47)
- $0787-07??: Array, Cursor X position (mirror of 06F7-)
- $07AB-07??: Array, Cursor Y position (mirror of 07AB-)
- $0937: Temp, a total used by animation opcode 48-4F
- $0958: Temp, a total used by animation opcode 50-57
- $097F: Temp, a total used by animation opcode E8-EF
- $09A3-09BB: Array, cursor (menu) position
- $09C7-09DF: Array, misc return values (i.e. if a treasure contains an item/gold/equipment; battle item/spell/enemy chosen)
- $09CB: Turn status (02: not turning, 00: turning left, 01: turning right)
- $09EB-0A03: Array, current selection (Attacker ID, caster ID, treasure GP amount, whose turn is it etc)
- $0A0F-0A27: Array, target (ID being attacked, treasure chest being opened)
- $0A33-0A??: Stack, address pointer
- $0A57-0A??: Stack, address bank (forms a 3 byte pointer with its 0A33 counterpart)
- $0A7B-0A??: Array, Animation ID (involves tracking which things are animating)
- $0A7F: Compass heading (00: N, 02: NE, 04: E, 06: SE... 0E: NW) (Tracks diagonals unlike $16FB)
- $0A87-$0A8E: Current selected battle command (2 bytes per character)
- #$0001: Main menu
- #$0003: Items/Magic
- #$0004: Cards
- #$0005: Weapons
- #$0008: Attack
- $0B9F-0B??: Array, Animation loop variable (involves animation frames)
- $0BFB-0C??: Stack, Event pointers
- $0C57-0C??: Stack, Event pointer bank (forms a 3 byte pointer with its 0BFB counterpart)
- $0CB3-0C??: Array, Stores function results (0=failure) (The event code uses this for branch if true/branch if false)
- $0FF1: Temp, town compass (0200 is south)
- $102F: Temp, a total used by animation opcode C0-C7
- $1037: Temp, a total used by animation opcode C8-CF
- $103F: Temp, current selection
- $1041: Temp, function results
- $1047: Temp, loop var
- $1049: Event Code Pointer (3 bytes) (stores subroutine pointers)
- $104B: Event Code Bank
- $104D: Temp, animation loop pointer 1
- $104F: Temp, animation loop pointer 2
- $1051: Temp, cursor X position
- $1053: Temp, cursor Y position
- $1055: Temp, OAM transfer
- $1057: Temp, Main screen
- $1058: Temp, Subscreen
- $1059: Temp, Screen pixellation
- $105A: Temp, HDMA channels
- $105B-1060: Unused?
- $1061: Temp, Color add
- $1062: Temp, Color math
- $1063: Temp, APC bit operations
- $1064: Current music
- $1066: Current sfx
- $1068-106D: Related to graphics
- $106E-108B: Unused?
- $108C: RGB red
- $108D: RGB green
- $108E: RGB blue
- $108F: Temp, portrait offset (used with text opcode 1B)
- $1091: Animation finish timer
- $1093: Unused?
- $1095: Temp, pause status (used with text opcode 7F)
- $1097: Text line speed (default 10 frame delay when printing a line at a time)
- $1099: Text speed (default 1 frame delay per letter)
- $109B-10C2: Array 1, related to text formatting. (Text subroutines call these variables [$00]-[$26] when x=$109B)
- $10C3-10EA: Array 2, related to text formatting. (Text subroutines call these variables [$00]-[$26] when x=$10C3)
- $10EB: Temp, ASCII values (used for displaying numbers)
Battle
- $1121: Attacker
- $1123: Target
- $1127: Spell ID
- $112B: Array, spell results (01=Confused, 02=Slept, 03=Paralyzed, 04=Petrified, 05=Silence)
- $11B5: Tracks progress in intro crawl
- $11B9: Current page# in item list
- $11C1: Battle state (00=not fighting/can move, 02=battle poses, )
- $11C3-11DA: Status/Condition (a series of words in the order: Rooks, Spirit, Guest1, Guest2, Enemies 1-8)
- Odd byte:
- #$00: Satisfactory
- #$01: Deceased
- #$02: Not Here
- #$03: Paralyzed
- #$04: Petrified
- #$05: Confused
- #$06: Sleeping
- Even byte: #$01 indicates a party member
- Odd byte:
- $11DB-11F2: Mirror of 11C3-
- $11F3-11FA: Order that spells hit the party (2 bytes per character)
- #$0000: Upper left
- #$0001: Upper right
- #$0002: Lower left
- #$0003: Lower right
- $11FB-120A: Order that spells hit the enemies (2 bytes each)
- $120B: Rooks' Element/Race
- $120D: Spirit's Element/Race
- $120F: Guest1's Element/Race
- $1211: Guest2's Element/Race
- $1213: Enemy1's Element/Race
- $1215: Enemy2's Element/Race
- $1217: Enemy3's Element/Race
- $1219: Enemy4's Element/Race
- $121B: Enemy5's Element/Race
- $121D: Enemy6's Element/Race
- $121F: Enemy7's Element/Race
- $1221: Enemy8's Element/Race
- $1223: Rooks' Strength
- $1225: Spirit's Strength
- $1227: Guest1's Strength
- $1229: Guest2's Strength
- $122B: Enemy1's Strength
- $122D: Enemy2's Strength
- $122F: Enemy3's Strength
- $1231: Enemy4's Strength
- $1233: Enemy5's Strength
- $1235: Enemy6's Strength
- $1237: Enemy7's Strength
- $1239: Enemy8's Strength
- $123B: Rooks' Intelligence (reduces magic damage taken, increases magic damage, affects magic evade)
- $123D: Spirit's Intelligence
- $123F: Guest1's Intelligence
- $1241: Guest2's Intelligence
- $1243: Enemy1's Intelligence
- $1245: Enemy2's Intelligence
- $1247: Enemy3's Intelligence
- $1249: Enemy4's Intelligence
- $124B: Enemy5's Intelligence
- $124D: Enemy6's Intelligence
- $124F: Enemy7's Intelligence
- $1251: Enemy8's Intelligence
- $1253: Rooks' Endurance (reduces physical damage taken)
- $1255: Spirit's Endurance
- $1257: Guest1's Endurance
- $1259: Guest2's Endurance
- $125B: Enemy1's Endurance
- $125D: Enemy2's Endurance
- $125F: Enemy3's Endurance
- $1261: Enemy4's Endurance
- $1263: Enemy5's Endurance
- $1265: Enemy6's Endurance
- $1267: Enemy7's Endurance
- $1269: Enemy8's Endurance
- $126B: Rooks' Alertness (affects accuracy, evasion, critical hits and chance for extra turn)
- $126D: Spirit's Alertness
- $126F: Guest1's Alertness
- $1271: Guest2's Alertness
- $1273: Enemy1's Alertness
- $1275: Enemy2's Alertness
- $1277: Enemy3's Alertness
- $1279: Enemy4's Alertness
- $127B: Enemy5's Alertness
- $127D: Enemy6's Alertness
- $127F: Enemy7's Alertness
- $1281: Enemy8's Alertness
- $1283: Equipped weapon, Rooks
- This actually affects your stats.
- Two bytes each, in order of Rooks, Spirit, Guest 1 and Guest 2.
- item ID / "Equipped by" flag
- "Equipped by" flags:
- #$00: Rooks
- #$05: Teefa
- #$06: Salah
- #$07: Darwin
- #$08: Axs
- $1285: Equipped weapon, Spirit (unused)
- $1287: Equipped weapon, Guest1
- $1289: Equipped weapon, Guest2
- $128B: Equipped weapon, Enemy1 (affects their attack animation)
- $128D: Equipped weapon, Enemy2
- $128F: Equipped weapon, Enemy3
- $1291: Equipped weapon, Enemy4
- $1293: Equipped weapon, Enemy5
- $1295: Equipped weapon, Enemy6
- $1297: Equipped weapon, Enemy7
- $1299: Equipped weapon, Enemy8
- $129B: Equipped armor, Rooks
- $129D: Equipped armor, Spirit (unused)
- $129F: Equipped armor, Guest1
- $12A1: Equipped armor, Guest2
- $12A3: Equipped armor, Enemy1 (affects their defense)
- $12A5: Equipped armor, Enemy2
- $12A7: Equipped armor, Enemy3
- $12A9: Equipped armor, Enemy4
- $12AB: Equipped armor, Enemy5
- $12AD: Equipped armor, Enemy6
- $12AF: Equipped armor, Enemy7
- $12B1: Equipped armor, Enemy8
- $12B3: Equipped amulet, Rooks
- $12B5: Equipped amulet, Spirit (unused)
- $12B7: Equipped amulet, Guest1
- $12B9: Equipped amulet, Guest2
- $12BB: Equipped amulet, Enemy1 (probably affects defense and magic defense)
- $12BD: Equipped amulet, Enemy2
- $12BF: Equipped amulet, Enemy3
- $12C1: Equipped amulet, Enemy4
- $12C3: Equipped amulet, Enemy5
- $12C5: Equipped amulet, Enemy6
- $12C7: Equipped amulet, Enemy7
- $12C9: Equipped amulet, Enemy8
- $12CB: Equipped ring, Rooks (unused)
- $12CD: Equipped ring, Spirit (unused)
- $12CF: Equipped ring, Guest1 (unused)
- $12D1: Equipped ring, Guest2 (unused)
- $12D3: Equipped ring, Enemy1 (unused)
- $12D5: Equipped ring, Enemy2 (unused)
- $12D7: Equipped ring, Enemy3 (unused)
- $12D9: Equipped ring, Enemy4 (unused)
- $12DB: Equipped ring, Enemy5 (unused)
- $12DD: Equipped ring, Enemy6 (unused)
- $12DF: Equipped ring, Enemy7 (unused)
- $12E1: Equipped ring, Enemy8 (unused)
- $12E3: Accuracy modifier (concerns Acc. Increase All and Accuracy Impair)
- There are 3 possible states: StatDown, Normal and StatUp. StatUp and StatDown cancel each other out.
- Byte values are as follows:
- #$01: Rooks' accuracy up
- #$04: Spirit's accuracy up
- #$10: Guest1's accuracy up
- #$40: Guest2's accuracy up
- #$02: Rooks' accuracy down
- #$08: Spirit's accuracy down
- #$20: Guest1's accuracy down
- #$80: Guest2's accuracy down
- $12E5: Accuracy modifier (enemies)
- $12E7: Evasion modifier (concerns Dodge All and Offense Impair) (same flags)
- $12E9: Evasion modifier (enemies)
- $12EB: Attack modifier (concerns Stomp All and Attack Impair) (same flags)
- $12ED: Attack modifier (enemies)
- $12EF: Defense modifier (concerns Wall All and Defense Impair) (same flags)
- $12F1: Defense modifier (enemies)
- $12F3: Current HP, Rooks
- $12F5: Current HP, Spirit
- $12F7: Current HP, Guest1
- $12F9: Current HP, Guest2
- $12FB: Current HP, Enemy1
- $12FD: Current HP, Enemy2
- $12FF: Current HP, Enemy3
- $1301: Current HP, Enemy4
- $1303: Current HP, Enemy5
- $1305: Current HP, Enemy6
- $1307: Current HP, Enemy7
- $1309: Current HP, Enemy8
- $130B: Copy of Current HP, Rooks
- $130D: Copy of Current HP, Spirit
- $130F: Copy of Current HP, Guest1
- $1311: Copy of Current HP, Guest2
- $1313: Copy of Current HP, Enemy1
- $1315: Copy of Current HP, Enemy2
- $1317: Copy of Current HP, Enemy3
- $1319: Copy of Current HP, Enemy4
- $131B: Copy of Current HP, Enemy5
- $131D: Copy of Current HP, Enemy6
- $131F: Copy of Current HP, Enemy7
- $1321: Copy of Current HP, Enemy8
- $1323: Current MP (Magic Points), Rooks
- $1325: Current MP, Spirit
- $1327: Current MP, Guest1
- $1329: Current MP, Guest2
- $132B: Current MP, Enemy1 (Enemies don't actually use MP, so these values just stay at 5555)
- $132D: Current MP, Enemy2
- $132F: Current MP, Enemy3
- $1331: Current MP, Enemy4
- $1333: Current MP, Enemy5
- $1335: Current MP, Enemy6
- $1337: Current MP, Enemy7
- $1339: Current MP, Enemy8
- $133B: Copy of Current MP (Magic Points), Rooks
- $133D: Copy of Current MP, Spirit
- $133F: Copy of Current MP, Guest1
- $1341: Copy of Current MP, Guest2
- $1343: Copy of Current MP, Enemy1 (Enemies don't actually use MP, so these values just stay at 5555)
- $1345: Copy of Current MP, Enemy2
- $1347: Copy of Current MP, Enemy3
- $1349: Copy of Current MP, Enemy4
- $134B: Copy of Current MP, Enemy5
- $134D: Copy of Current MP, Enemy6
- $134F: Copy of Current MP, Enemy7
- $1351: Copy of Current MP, Enemy8
- $1353: Current HP, Sylph
- $1355: Current HP, Dao
- $1357: Current HP, Marid
- $1359: Current HP, Efrite
- $135B: Current MP, Sylph
- $135D: Current MP, Dao
- $135F: Current MP, Marid
- $1361: Current MP, Efrite
- $1363: EXP to next level, Rooks
- $1365: EXP to next level, Spirit (Unused? Seems to stay at 0258)
- $1367: EXP to next level, Guest1
- $1369: EXP to next level, Guest2
- $136B: EXP award, Enemy1 (The EXP you get for beating this enemy. Unclaimed enemy slots are FFFF)
- $136D: EXP award, Enemy2
- $136F: EXP award, Enemy3
- $1371: EXP award, Enemy4
- $1373: EXP award, Enemy5
- $1375: EXP award, Enemy6
- $1377: EXP award, Enemy7
- $1379: EXP award, Enemy8
- $137B: Level, Rooks
- $137D: Level, Spirit (Shares Rooks' level)
- $137F: Level, Guest1
- $1381: Level, Guest2
- $1383: Level, Enemy1 (Affects run chance)
- $1385: Level, Enemy2
- $1387: Level, Enemy3
- $1389: Level, Enemy4
- $138B: Level, Enemy5
- $138D: Level, Enemy6
- $138F: Level, Enemy7
- $1391: Level, Enemy8
- $1393: Max HP, Rooks
- $1395: Max HP, Spirit
- $1397: Max HP, Guest1
- $1399: Max HP, Guest2
- (Next byte is Rooks' Max MP -> Enemies have no max HP/MP stat)
- $139B: Max MP, Rooks
- $139D: Max MP, Spirit
- $139F: Max MP, Guest1
- $13A1: Max MP, Guest2
- $13A3: Temp EXP (A running total collected through battle)
- $13A5: Temp GP
- $13A7: Spirits not owned (Bit flags: xxxx EMDS) (Example: 6 -> 0110 -> missing Marid/Dao)
- $13A9-13B8: Card inventory (8 total, 2 bytes each; item ID / quantity)
- #$00: Empty slot
- #$01: Wind Card
- #$02: Earth Card
- #$03: Water Card
- #$04: Fire Card
- #$05: Null Card
- #$06: Fog Card
- #$07: Call Amulet
- #$08: Mirror Card (bugged)
- $13B9-$1418: Item inventory (2 bytes per slot, 48 slots: item ID with a high byte of 00)(Items could have had quantities, but they didn't implement it.)
- #$01: Return Ring
- #$02: Water of Life (dummied)
- #$03: Sleeping Bag
- #$04: Tent
- #$05: Strength Honey
- #$06: Intelligence Honey
- #$07: Endurance Honey
- #$08: Agility Honey
- #$09: Restore Honey
- #$0A: MP Honey
- #$0B: Herbs
- #$0C: Medicine
- #$0D: Silver Flask
- #$0E: Gold Flask
- #$0F: Maiden's Tears
- #$10: Moon Oil
- #$11: Enchanted Jewel (dummied)
- $13B9-1418: Item inventory (Two bytes each, 48 entries)
- (item ID / quantity)
- $1419–1458: Equipment inventory (2 bytes per slot, 32 slots: ID then Equipped By)
- Equipped by flags:
- #$00: Rooks
- #$05: Teefa
- #$06: Salah
- #$07: Darwin
- #$08: Axs
- #$FF: Nobody
- (item ID / quantity)
(For instance, if Rooks claimed a Flying Axe then that slot would show "12 00" for Flying Axe (12), Rooks (00). If Axs claimed a Plate Mail then that slot would show "31 08" for Plate Mail (31), Axs (08). This LOOKS like it's equipped with your name next to the weapon, but this is actually cosmetic. Since the game doesn't actually remove equipment from your inventory like in FF4, there's a separate routine that updates your equipped weapon at $1283. So if you can edit your equipped weapon directly, the game won't notice it's not actually in your inventory.)
- $1459-1498: Rooks' spell list (Two bytes each, 32 entries) (Each spell is the Spell ID followed by #$00)
- $1499-14D8: Spirit's spell list (Two bytes each, 32 entries)
- $14D9-1518: Guest1's spell list (Two bytes each, 32 entries)
- $1519-1558: Guest2's spell list (Two bytes each, 32 entries)
- $1559: Current GP
- $155B-1562: Current party (Two bytes each)
- #$00: Rooks
- #$01: Sylph
- #$02: Marid
- #$03: Dao
- #$04: Efrite
- #$05: Teefa
- #$06: Salah
- #$07: Darwin
- #$08: Axs
- #$09: (Empty slot)
- $1563-1572: Unused? (Appears to be enemy data, so ...enemy party slots.)
- $1573: Current area (high byte 1 = dungeon, 0 = town)(Towns 0000, 0001, 0002...)(Dungeon floors 0100, 0101 for chapter 1....)
- $1575: Used for comparisons, especially in banks 02, 05 and 07
- $1577: Window color (3 colors represented by 2 bytes: bitwise it looks like (xBBB B0GG GG0R RRR0) where x is unused and the 0's are...zeros.)
- $1579: Encounter type (2=back attack, 3=normal fight)
- $157B: Show compass (01=show, 00=hide)
- $157D: Compass subdirection (updated with 01/A126 Event_Turning_Step)
- $157F: Unused?
- $1580-16EB: Text buffer for writing text or numbers to be repositioned later. (Text opcodes aren't capable of running code, so the game writes everything dynamic in advance. So stuff like "this character gained this level's levelup stats or learned this spell" are written in advance here.)
- For spells, names are preceded by 06 0D (white) if usable and 06 0E (grayed) if not.
- $1581: Read point for character name in levelup messages ("All of [reads the text at $1581]/Rooks'/ power has been increased")
- $15AF: Commonly a pointer to text is written here or after this entry, then overwritten with the actual text.
- $16DB: Temp var for displaying a 1st number, like attack power or damage, or how many of the first monster there are
- $16DD: Temp var for displaying a 2nd number, like defense power, or strength levelup bonus, or how many of the second monster there are
- $16DF: Temp var for displaying a 3rd number, like endurance levelup bonus
- $16E1: Temp var for displaying a 4th number, like intelligence levelup bonus
- $16E3: Temp var for displaying a 5th number, like alertness levelup bonus
- $16E5: Temp var for displaying a 6th number, like current HP in the status screen
- $16E7: Temp var for displaying a 7th number, like HP levelup bonus
- $16E9: Temp var for displaying a 8th number, like current MP in the status screen
- $16EB: Temp var for displaying a 9th number, like MP levelup bonus
- $16ED: Temp var for displaying a 10th number, like current EXP in the status screen
Dungeons and Towns
- $16F1: Stores the destination floor when taking a staircase or door
- $16F3: 01 if in motion, 00 if standing still
- $16F5: Current floor tile value (affects which encounters you get, along with everything else that happens in a dungeon)
- $16F7: Dungeon X position
- $16F9: Dungeon Y position
- $16FB: Current direction (#$00 North, #$02 East, #$04 South, #$06 West)
- $16FD: Map number (0000=Map1, 0080=Map2, 0100=Map3)
- $16FF-177E: Map1 progress
- $177F-17FE: Map2 progress
- $17FF-187E: Map1 progress
(Most of these town variables are used throughout bank 03, which uses a huge number of RAM addresses)
- $187F: Town direction (0000=North, 0200=South, 03F8=West)
- $1881: Town selection (0=Armory,1=Inn,2=Healer,3=Pub,8000=Exit)
- $1883: Shop max entries (Number of entries in current menu)
- $1885: Shop selection (i.e. Card Shop has values 0-6)
- $1887: Related to shop menus
- $1889: Related to shop menus
- $188B: Related to shop menus
- $188D: Shop screen position (0-3 for a shop with 4 weapons)
- $188F: Related to shop selection
- $1891: Related to shop menus
- $1893: Used with color math register $2131
- $1895-189C: Used with the spirit healer to show which spirit cards are torn
- $189D: Related to the spirit healer
- $189F: Related to shops and towns
- $18A1: Related to shops and towns
- $18A3: Unused?
- $18A5: Which card, when using multiple cards in battle
- $18A7: How many cards, when using multiple cards in battle
- $18A9: Related to cursor selection (found in bank 07)
- $18C5: Spell type
- $18C9: Temp MP
- $18CD: Current Chapter # (01-05)
- $18CF: Weather fx (Used in the intro)
- $18D5: Stage select counter (adds 2 for every correct button press until $1C)
- $18D7: Encounter layout (long ptr)
- $18DA: Encounter enemy list (long ptr)
- $18DF: Bosses defeated (0=Ch2 start, 1=Cyclops killed)(Not all chapters use this since later fights start with a cutscene rather than a fight)
- $18E1: Temp var for Boss encounter (6 = Cyclops)
- $18E3-$18E8: Treasure chest flags (each chest has its own bit)
- $18EF: Battle related
- $18F3: Decompression entry (long ptr)
- $18F8: Decompression start (long ptr)
- $18FF: Story progress (the Event Moment, in FF7 terms)
- 00: Before game starts
- 01: Rooks introduced
- 02: Teefa introduced
- 03: Can exit Galia
- 04: Entered Crystal Sword room
- 05: (Chapter 2) Salah joins
- 06: Meet Darwin
- 07: Darwin joins
- 08: Efrite joins
- 09: Entered Reinoll's place
- 0A: (Chapter 3) Looking for Axs
- 0B: Found Axs
- 0C: Defeated the Hydra
- 0D: Entered the Lava Room
- 0E: (Chapter 4) Axs rejoins (he left so he's unequipped again)
- 0F: Meet Darah
- 10: The door is locked
- 11: Salah is awake
- 12: Salah meets a door
- 13: Meet Darah and Barah
- 14: Meet Ariel (If it's a trap, I will fall into a trap!)
- 15: Meet Darwin again
- 16: Meet Teefa
- 17: Entered the door to Galneon
- 18: (Chapter 5) Darwin and Teefa join
- 19: Meet Karul
- 1A: Meet Galneon again
- 1B: Meet Red and Blue Guardians
- 1C: Meet Tiamat
- 1D: Enter door to Rimsala
- $1927: Credits progress
Internal Data for Arcana
| |
---|---|