If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Arcana/ROM map: Difference between revisions
< Arcana
Jump to navigation
Jump to search
(Found where it determines what fight to use for boss fights) |
(Expanded on a lot of sections, added a lot of graphics data and cleaned up the formatting.) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{rommap|game=Arcana}} | {{rommap|game=Arcana}} | ||
(Back to [[Arcana|Main page]]) | (Back to [[Arcana|Main page]]) | ||
==Bank $00: Common functions; Event handling== | |||
<pre> | <pre> | ||
$00/89F1 Sub: RNG | $00/8153 Sub: NMI disable | ||
$00/ | $00/8167 Sub: NMI enable | ||
$00/ | $00/817B Sub: Display Force Blanking | ||
$00/9B07 Sub: Main | $00/818F Sub: Set Display | ||
$00/81BF Sub: Set BG mode (1 byte parameter) | |||
$00/81D8 Sub: Set OBJ Address (1 byte parameter) | |||
$00/8208 Sub: Set OBJ Size (1 byte parameter) | |||
$00/826E Sub: Graphics dungeon stuff | |||
$00/8327 Sub: Update screen | |||
$00/8400 Sub: Update background scroll | |||
$00/8465 Sub: Video stuff | |||
$00/84B9 Table: DMA Control | |||
$00/84D0 Table: DMA Destination | |||
$00/84E7 Table: Videoport Control | |||
$00/84FE Sub: RAM Decomp80 (1 byte) | |||
$00/8521 Sub: Decomp80 setup - Decompressor helper function. Reads a data entry that looks like "80 00 xx [xx/xxxx] xx xx" and passes the pointer to the decompressor. | |||
$00/8766 Sub: Decompression. Similar to Run Length Encoding. | |||
$00/88E2 Sub: Wait for VBLANK | |||
$00/89F1 Sub: RNG (1 byte parameter) - can take a value ("5") and roll a range ("0-4"), or can provide a random 2 byte number through $1E0A. | |||
$00/8A3D Sub: Multiply to $1E00 | |||
$00/8B11 Sub: Set Mode7 | |||
$00/8BE4 Table: Bitwise1 | |||
$00/8BF4 Table: Bitwise2 | |||
$00/8C04 Table: HDMA channels (an AND table where all but 1 bit is set) | |||
$00/8C34 Table: Bit flags | |||
$00/9008 Sub: Main loop, pointer setup | |||
$00/902B Sub: Read Event Code. Reads the event opcode from program counter $1E10. (Very important line! Uses a jump table to run opcodes as code.) | |||
Events: These opcodes run over half of the game. Most commonly you'll find code 07 for long calling a subroutine. | |||
$00/90E7 Event Opcode 00 - This one is complicated, it's similar to a return | |||
$00/90FA Event Opcode 01 - Loops a number of times (1 byte input) | |||
$00/911E Event Opcode 02 - Loop end: jumps back to opcode 01 | |||
$00/9140 Event Opcode 1A - Jump always (2 bytes) | |||
$00/9148 Event Opcode 03 - Jump long (3 bytes) | |||
$00/915A Event Opcode 1B - Call subroutine (2 bytes) | |||
$00/9177 Event Opcode 1C - Return from short subroutine/1B | |||
$00/918D Event Opcode 04 - Call subroutine (3 bytes) | |||
$00/91BB Event Opcode 05 - Return from long subroutine/04 | |||
$00/91DA Event Opcode 06 - Delay x frames (1 byte) | |||
$00/91EA Animation Opcodes 30-37 (1 byte) - Sets or zeros the animation ID $0A7B,x | |||
$00/9202 Animation Opcodes 38-3F (2 bytes) - Sets the cursor X position | |||
$00/9250 Animation Opcodes 40-47 (2 bytes) - Sets the cursor Y position | |||
$00/929E Animation Opcodes E0-E7 (2 bytes) | |||
$00/92D7 Animation Opcodes 58-5F (2 bytes) | |||
$00/92F8 Animation Opcodes 60-67 (2 bytes) | |||
$00/9319 Animation Opcodes F0-F7 (2 bytes) | |||
$00/933A Animation Opcodes 68-6F (2 bytes) | |||
$00/9362 Animation Opcodes 70-77 (2 bytes) | |||
$00/938A Animation Opcodes F8-FF (2 bytes) | |||
$00/93B2 Animation Opcodes 78-7F (3 bytes) - Reads an x offset, then stores 2bytes in $0FEF,x and zeros $0FFF,x (?) | |||
$00/93CA Animation Opcodes 80-87 (3 bytes) | |||
$00/93E2 Animation Opcodes 88-8F (3 bytes) | |||
$00/9409 Animation Opcodes 90-97 (3 bytes) | |||
$00/9430 Animation Opcodes 98-9F (3 bytes) | |||
$00/945E Animation Opcodes A0-A7 (3 bytes) | |||
$00/948C Animation Opcodes 48-4F (2 bytes) - Adds to a total at $0937,x | |||
$00/949F Animation Opcodes 50-57 (2 bytes) - Adds to a total at $095B,x | |||
$00/94B2 Animation Opcodes E8-EF (2 bytes) - Adds to a total at $097F,x | |||
$00/94C5 Animation Opcodes C0-C7 (3 bytes) | |||
$00/94F7 Animation Opcodes D0-D7 (0 bytes) - Zeros some stuff | |||
$00/950F Animation Opcodes D8-DF (1 byte) - Takes an offset and zeros some stuff | |||
$00/9527 Event Opcode 07 (3 bytes) - Call a subroutine. (Runs code, returns with RTL) | |||
$00/954D Event Opcode 0B (2 bytes) - Jump if false | |||
$00/9562 Event Opcode 0C (2 bytes) - Jump if true | |||
$00/9577 Event Opcode 11 (? bytes) - Switch-case: jump based on return value. Takes 1 byte (# of entries) plus 2 bytes per entry for the jump pointers. | |||
$00/959D Event Opcode 12 (? bytes) - Similar to 11, a switch-case | |||
$00/95C7 Event Opcode 0D (0 bytes) - Similar to 00, some kind of return. | |||
$00/95DF Event Opcode 08 (2 bytes) - Similar to 1B, some kind of branch to a 2 byte pointer. Clears the animation loop. | |||
$00/960C Event Opcode 14 (1 byte) | |||
$00/963F Event Opcode 09 (3 bytes) - Similar to 04, some kind of long pointer jump. | |||
$00/9655 Event Opcode 0A (0 bytes) - Clears the current animation loop. | |||
$00/965F Animation Opcodes A8-AF (0 bytes) - Increment animation ID (A8 = high speed, AF = low speed) | |||
$00/9668 Animation Opcodes B0-B7 (0 bytes) - Decrement animation ID | |||
$00/9671 Animation Opcodes B8-BF (1 byte) - Adds (amount) to the animation ID | |||
$00/968D Event Opcode 19 (5 bytes?)- Similar to 0E, compares values | |||
$00/96B8 Event Opcode 15 (4 bytes) - Compares an actor ID with a value. | |||
$00/96CD Event Opcode 0E (5 bytes) - Compares RAM to a value using a comparator (RAM Operations table) | |||
$00/96F2 Table: RAM Operations (has pointers to functions for AND, OR, add, and XOR) | |||
$00/9717 Event Opcode 0F (3 bytes) - Set actor (1 byte) to value (2 bytes). See Actor Arrays table. | |||
$00/9739 Table: Actor Arrays - Pointers to RAM 09A3, 09C7, 09EB, 0A0F. These are used with an X offset to track various information. AKA var0, var1, var2, var3. | |||
$00/9741 Event Opcode 10 | |||
$00/974A Event Opcode 13 (3 bytes) - Set RAM address (2 bytes) to value (1 byte) | |||
$00/975F Event Opcode 16 (4 bytes) - Set RAM address (2 bytes) to value (2 bytes) | |||
$00/9772 Event Opcode 17 | |||
$00/9791 Event Opcode 18 | |||
$00/97A0 Event Opcode 1D (3 bytes) - Stores a 2 byte pointer to $0A9F,x and the bank to $0AC3,x | |||
$00/97B6 Event Opcode 1E (2 bytes) - Load value | |||
$00/97C5 Event Opcode 1F (2 bytes) - Load value at address | |||
$00/97D8 Event Opcode 20 | |||
$00/97F5 Event Opcode 21 | |||
$00/9814 Event Opcode 22 | |||
$00/982A Event Opcode 23 | |||
$00/9847 Event Opcode 24 (1 byte) - Load a value from 1 of 4 arrays | |||
$00/9864 Event Opcode 25 (1 byte) - Similar to 24 but sets the loop variable $0B9F,y | |||
$00/9AF0 Sub: Get Event Code (1 byte) - Reads the next event opcode from the program counter $1E10 | |||
$00/9AF8 Sub: Get Event Code (1 byte) (returns long) | |||
$00/9B00 Sub: Get Event Code (2 bytes) | |||
$00/9B07 Sub: Get Event Code (2 bytes) (returns long) | |||
$00/9C3C Sub: Set/Get Music (1 byte) | |||
$00/9C44 Sub: Set/Get SFX (1 byte) | |||
$00/9CAE Sub: Load sprite (14 bytes) | |||
$00/9CBC Sub: Character join (13 bytes) | |||
$00/9CF9 Sub: Decomp80 Setup (3 bytes) | |||
$00/9D34 Sub: Setup Display Stuff (8 bytes) | |||
$00/9D69 Sub: Read BG mode (1 byte) | |||
$00/9D6F Sub: Display brancher (6 bytes) - byte0: 0-3 (function to call), byte1: A register, byte2-3: X register, byte4-5: Y register | |||
$00/9D8B Table: Display functions (used with 9D6F) | |||
$00/9D93 Sub: Set sprite mode (4 bytes) | |||
$00/9DA8 Sub: Main Screen add (1 byte) | |||
$00/9DB6 Sub: Main Screen remove (1 byte) | |||
$00/9DC6 Sub: Sub Screen add (1 byte) | |||
$00/9DD7 Sub: Sub Screen remove (1 byte) | |||
$00/9E79 Sub: Mosaic BG enable (1 byte) | |||
$00/9E8A Sub: Mosaic clear (1 byte) | |||
$00/9E9D Sub: Set Mosaic Size (1 byte) | |||
$00/9EB8 Sub: Increase mosaic size | |||
$00/9ECC Sub: Decrease mosaic size | |||
$00/9EE0 Sub: DMA Transfer (6 bytes) | |||
$00/9F1F Sub: Remove HDMA channel (1 byte) | |||
$00/9F31 Sub: HDMA disable | |||
$00/9F35 Sub: HDMA enable | |||
$00/9F3C Sub: Color Add Select (2 bytes) | |||
$00/9F4F Sub: Color Math Designation (2 bytes) | |||
$00/9F83 Sub: Set RGB (3 bytes) | |||
$00/9FA1 Sub: Set color planes | |||
$00/9FE2 Sub: Add RGB (3 bytes) | |||
$00/A00F Sub: Check $31 for button press (2 bytes: button) | |||
$00/A022 Sub: Check $21 for button press (2 bytes: button) | |||
$00/A051 Sub: Loop until RAM is value (4 bytes: 2b RAM, 2b value) | |||
$00/A0AC Sub: Setup Text Parser (3 byte ptr) - Load text and text opcodes to be read | |||
$00/A0BD Sub: Call RNG (1 byte), something with screen | |||
$00/A0C4 Sub: Update screen (1 byte) | |||
$00/A0CB Sub: Unfade from black | |||
$00/A0DB Sub: Fade to black | |||
$00/A1D6 Pointer Table: 8DAD (Seems to govern animations throughout the game) | |||
$00/A20C Pointer Table: Event Brancher | |||
$00/A31A Pointer Table: 8DFA (Also seems to govern animations) | |||
$00/A688 Sub: Set Text Parser (returns long) | |||
$00/A68C Sub: Set Text Parser | |||
$00/A7B5 Sub: Read Text Opcode | |||
Text opcodes: These control formatting in-between the plaintext before it's written to RAM. | |||
$00/A858 Text Opcode 00 - Null terminator/stop reading | |||
$00/A881 Text Opcode 01 - Move cursor to X,Y position | |||
$00/A898 Text Opcode 02 - Used drawing the menus | |||
$00/A8A8 Text Opcode 03 - Sets vertical spacing (03 0E = default) | |||
$00/A8B5 Text Opcode 04 - Similar to 03, uncommon | |||
$00/A8C2 Text Opcode 05 - Determines text delay, the # of frames it takes to write a letter to the screen. | |||
$00/A8DE Text Opcode 06 - Sets text color (white/gray or white/yellow depending on context) | |||
$00/A8EC Text Opcode 0C - Clears the screen and does some other stuff | |||
$00/A902 Text Opcode 0D - Newline | |||
$00/A919 Text Opcode 14 - Writes text in RAM to the screen(2 byte address) | |||
$00/A943 Text Opcode 10 - Writes text in RAM/ROM to the screen(3 byte address) | |||
$00/A969 Text Opcode 11 - Converts number to text(3 byte address) | |||
$00/A9A8 Text Opcode 1C - Sets text scroll speed | |||
$00/A9BD Text Opcode 1D - Sets text scroll speed (1 line at a time) | |||
$00/A9C5 Text Opcode 1E - Sets text scroll speed (fast) | |||
$00/A9CD Text Opcode 7F - Wait for A press | |||
$00/A9E1 Text Opcode 1B - Draws portraits | |||
$00/A9F7 Text Opcode 0F - Sets offset 26 (?) | |||
$00/AA04 Text Opcode 08 - Move cursor to X position | |||
$00/AA11 Text Opcode Text - Reads text if it isn't an opcode. | |||
$00/AC34 Table: Variable Width Font, letter widths | |||
$00/AD14 Graphics: Font tiles - Each letter is eighteen bytes and 12x12 pixels. The first entry is $20 (space) and the last is $7F (reserved). | |||
$00/B3D3 Graphics: Font tiles (end) | |||
$00/BCC8 Sub: Get VWF Length | |||
$00/BCFD Sub: Draw font tile | |||
$00/BE07 Sub: Clears the screen of text | $00/BE07 Sub: Clears the screen of text | ||
$00/C055 Sub: Hit calculation start | $00/C055 Sub: Hit calculation start | ||
$00/C07C Sub: | $00/C07C Sub: Get row bonus | ||
$00/C0B9 Sub: Miss check/crit check | $00/C0B9 Sub: Miss check/crit check | ||
$00/C132 Sub: No-element handling | $00/C132 Sub: No-element handling | ||
Line 32: | Line 197: | ||
$00/D137 Sub: Checks if loaded music is $33 (must be SPC commands) | $00/D137 Sub: Checks if loaded music is $33 (must be SPC commands) | ||
$00/D1AA Sub: Loads HAL Logo theme | $00/D1AA Sub: Loads HAL Logo theme | ||
</pre> | |||
==Bank $02== | ==Bank $01: Game setup, gameplay, ending == | ||
$02/ | <pre> | ||
$01/8001 Game start | |||
$01/8053 A bunch of initialization/zeroing functions | |||
$01/8913 Game over | |||
$01/8C85 Event: Handle dungeon movement | |||
$01/8D04 Event: Encounter check | |||
$01/8D24 Event: Check for map exit | |||
$01/8DAE Event: Random encounter | |||
$01/9226 Event: (Pointer table) Dungeon menu options | |||
$01/923B Event: Open menu | |||
$01/9260 Event: Look | |||
$01/9584 Event: Item handling outside of battle | |||
$01/9BB6 Pointer: Draw status screen ($08/C93E) | |||
$01/9BE5 Event: Open map | |||
</pre> | |||
==Bank $02: Battles == | |||
<pre> | |||
$02/8001 Event: Load data, Enemy 00 | |||
$02/8137 Event: Load data, Enemy 01 | |||
$02/8C59 Event: Load data, Enemy 0C | |||
$02/8CF3 Event: Status handling | |||
$02/8D03 Event: Enemy paralyzed | |||
$02/8D0E Event: Enemy petrified | |||
$02/8D19 Event: Enemy confused | |||
$02/8D27 Event: Enemy asleep | |||
$02/8D50 Event: Enemy's target select | |||
$02/8D65 Event: Enemy's confusion targeting | |||
$02/8D8A Event: Check if Rooks is targetable | |||
$02/8DB3 Event: Check if Spirit is targetable | |||
$02/8DDC Event: Check if Guest1 is targetable | |||
$02/8E05 Event: Check if Guest2 is targetable | |||
$02/8E2E Event: Check if Enemies 1-8 are targetable | |||
$02/8E63 Event: Enemy death check | |||
$02/8E8A Event: Enemy spell attack | |||
$02/8EB6 Event: Enemy physical attack | |||
$02/8EE2 Event: Enemy self-confusion damage | |||
$02/8F24 Event: Enemy death animation | |||
$02/8F65 Event: (Subroutine) Pause for user input | |||
$02/8F79 Event: (Subroutine) Enemy attack animation | |||
$02/8FC9 Pointer Table: Boss animations | |||
$02/8FEA Animation: Attack, Stone Guardian | |||
$02/8FFC Animation: Attack, Iron Guardian | |||
$02/900E Animation: Attack, Cyclops | |||
$02/901A Animation: Attack, Efrite | |||
$02/90B9 Animation: Attack, Rimsala 2 | |||
$02/90FE Event: Add enemy loot to total | |||
$02/913D Sub: Initializes a character/monster's stats from ROM at battle start | $02/913D Sub: Initializes a character/monster's stats from ROM at battle start | ||
</pre> | |||
==Bank $03== | ==Bank $03: Event handling, towns== | ||
<pre> | |||
$03/A457 Sub: Load current tile's encounter value | $03/A457 Sub: Load current tile's encounter value | ||
$03/A499 Sub: Update dungeon progress? | $03/A499 Sub: Update dungeon progress? | ||
$03/A52A Dungeon BGM (See Music tab for ID list) | $03/A52A Dungeon BGM (See Music tab for ID list) | ||
$03/A5EB Pointer Table: Map, stairs logic | |||
$03/D5BF Item inventory limit (shops). Default $60 = $30 slots (48 items @ 8 per page) (see $07/AA28) | $03/D5BF Item inventory limit (shops). Default $60 = $30 slots (48 items @ 8 per page) (see $07/AA28) | ||
$03/DDD6 Item slots -1 x2, used after selling an item in town to check when to stop rearranging. (see $07/AA28)(should be $5E?) | $03/DDD6 Item slots -1 x2, used after selling an item in town to check when to stop rearranging. (see $07/AA28)(should be $5E?) | ||
Line 52: | Line 264: | ||
$03/DFAC Bar option 4 MP gain | $03/DFAC Bar option 4 MP gain | ||
$03/E052 Card prices (see Inventory) | $03/E052 Card prices (see Inventory) | ||
$03/E2A8 Set up dialogue cursor | |||
==Bank $05== | </pre> | ||
==Bank $04: Town Graphics== | |||
<pre> | |||
$04/8001 Graphics: Town | |||
$04/AC14 Graphics: Galia 1 | |||
$04/B379 Graphics: Galia 2 | |||
$04/B6E4 Graphics: Galia 3 | |||
$04/B7E4 Graphics: Castle 1 | |||
$04/C1D4 Graphics: Castle 2 | |||
$04/C583 Graphics: Castle 3 | |||
$04/C675 Graphics: Doraf 1 | |||
$04/CF7D Graphics: Doraf 2 | |||
$04/D292 Graphics: Doraf 3 | |||
$04/D383 Graphics: Elf Village 1 | |||
$04/D9BF Graphics: Elf Village 2 | |||
$04/DEB4 Graphics: Elf Village 3 | |||
</pre> | |||
==Bank $05: Battles== | |||
<pre> | |||
$05/9F7B Names, Characters ($0A bytes per entry + 00 delimeter) | $05/9F7B Names, Characters ($0A bytes per entry + 00 delimeter) | ||
$05/9FE9 Names, Enemies ($10 bytes per entry + 00 delimeter) | $05/9FE9 Names, Enemies ($10 bytes per entry + 00 delimeter) | ||
Line 61: | Line 291: | ||
$05/A895 Names, Elements ($06 bytes per entry + 00 delimeter) | $05/A895 Names, Elements ($06 bytes per entry + 00 delimeter) | ||
$05/A8BF Names, Status effects ($0C bytes per entry + 00 delimeter) | $05/A8BF Names, Status effects ($0C bytes per entry + 00 delimeter) | ||
$05/A91A EXP to next level, Rooks? | |||
$05/A992 EXP to next level, Sylph? | |||
$05/AA0A EXP to next level, Dao? | |||
$05/AA82 EXP to next level, Marid? | |||
$05/AAFA EXP to next level, Efrite? | |||
$05/AB72 EXP to next level, Teefa | |||
$05/ABEA EXP to next level, Salah? | |||
$05/AC62 EXP to next level, Darwin? | |||
$05/ACDA EXP to next level, Axs? (60 entries x 2 bytes) | |||
$05/AD6A Level-up stats, Rooks (HP, MP, Str, End, Int, Alt) (2 bytes per entry) | $05/AD6A Level-up stats, Rooks (HP, MP, Str, End, Int, Alt) (2 bytes per entry) | ||
$05/B03A Level-up stats, Sylph | $05/B03A Level-up stats, Sylph | ||
Line 70: | Line 309: | ||
$05/C11A Level-up stats, Darwin | $05/C11A Level-up stats, Darwin | ||
$05/C3EA Level-up stats, Axs | $05/C3EA Level-up stats, Axs | ||
$05/C6A3 A bunch of 0's and 1's | |||
$05/C8D4 Level-up spells, Rooks | $05/C8D4 Level-up spells, Rooks | ||
$05/C8E2 Level-up spells, Sylph | $05/C8E2 Level-up spells, Sylph | ||
Line 80: | Line 319: | ||
$05/C91F Level-up spells, Darwin | $05/C91F Level-up spells, Darwin | ||
$05/C929 Level-up spells, Axs | $05/C929 Level-up spells, Axs | ||
$05/C92D Monster race/element (2 bytes per entry) (ends at 2C9CB) | $05/C92D Monster race/element (2 bytes per entry) (ends at 2C9CB) | ||
$05/C9CD Monster Equipment stats, several unknown (start) | $05/C9CD Monster Equipment stats, several unknown (start) | ||
Line 103: | Line 341: | ||
$05/E1D5 Equipment: weapon crit rate | $05/E1D5 Equipment: weapon crit rate | ||
$05/E226 Equipment: shield mag def ($05/E1D5) | $05/E226 Equipment: shield mag def ($05/E1D5) | ||
$05/E24E Equipment | $05/E24E Equipment: weapon damage penalty | ||
$05/E2C8 Equipment - spell cast in battle | $05/E2C8 Equipment - spell cast in battle | ||
$05/E356 Spells' names | $05/E356 Spells' names | ||
Line 124: | Line 362: | ||
$05/F234 Silver Flask heal amount (15 MP) | $05/F234 Silver Flask heal amount (15 MP) | ||
$05/F249 Gold Flask heal amount (40 MP) | $05/F249 Gold Flask heal amount (40 MP) | ||
</pre> | |||
==Bank $07== | ==Bank $06: Graphics (Shops, world map, travel sprites); Stage select data== | ||
<pre> | |||
$06/928E Compressed Graphics: Shop, Weapons | |||
$06/9418 Compressed Graphics: Shop, Inn | |||
$06/9626 Compressed Graphics: Shop, Spirit Healer | |||
$06/97C0 Compressed Graphics: Shop, Alchemist | |||
$06/98F6 Compressed Graphics: World Map 1 | |||
$06/C646 Compressed Graphics: World Map 2 | |||
$06/C971 Compressed Graphics: World Map 3 | |||
$06/CB33 Compressed Graphics: World Map 4 | |||
$06/CFC0 Compressed Graphics: World Map 5 | |||
$06/D2DB Compressed Graphics: Travel Sprites, Rooks | |||
$06/D4F6 Compressed Graphics: Travel Sprites, Teefa | |||
$06/D744 Compressed Graphics: Travel Sprites, Salah | |||
$06/D99F Compressed Graphics: Travel Sprites, Darwin | |||
$06/DB1F Compressed Graphics: Travel Sprites, Axs | |||
$06/DDBD Stage select: Chapter 2 (These are essentially pre-made save files) | |||
$06/E2BD Stage select: Chapter 3 | |||
$06/E7BD Stage select: Chapter 4 | |||
$06/ECBD Stage select: Chapter 5 | |||
</pre> | |||
==Bank $07: Dungeons and gameplay== | |||
<pre> | |||
$07/8001 Sub: Fighting final boss? | |||
$07/80F2 Tbl: Levelup spells | |||
$07/8CC4 Sub: Deducts HP from target | $07/8CC4 Sub: Deducts HP from target | ||
$07/8EDF FINIS (tile bytes) (appears 2x for some reason) | $07/8EDF FINIS (tile bytes) (appears 2x for some reason) | ||
Line 151: | Line 413: | ||
$07/AA65 Sub: Adds GP to total | $07/AA65 Sub: Adds GP to total | ||
$07/AA6B Max GP (FFFF) | $07/AA6B Max GP (FFFF) | ||
$07/ | $07/B234 Sub: Levelup check | ||
$07/B2DB Sub: When Teefa/Axs join, assigns them Rooks' LV | $07/B2DB Sub: When Teefa/Axs join, assigns them Rooks' LV | ||
$07/B2E2 Sub: When Salah joins, assigns her Rooks' LV-3 | $07/B2E2 Sub: When Salah joins, assigns her Rooks' LV-3 | ||
Line 165: | Line 427: | ||
$07/C8E5 SFX for Change Attribute | $07/C8E5 SFX for Change Attribute | ||
$07/C8E4 SFX for Buffs | $07/C8E4 SFX for Buffs | ||
</pre> | |||
==Bank $08== | ==Bank $08: Small scripts== | ||
<pre> | |||
$08/8000 Script, Battle/Towns/Items/Magic | $08/8000 Script, Battle/Towns/Items/Magic | ||
$08/9650 Spell descriptions | $08/9650 Spell descriptions | ||
$08/C93E Status screen (184 bytes) | |||
$08/C9F6 Status screen, current spirit (161 bytes) | |||
$08/D3C3 Alchemist conversations | |||
</pre> | |||
==Bank $09: Unknown data== | |||
<pre> | |||
$09/80D3 Pointer table | |||
$09/8215 Pointer table | |||
$09/835D Pointer table | |||
$09/83D3 Pointer table | |||
$09/843B Pointer table | |||
$09/84FD Pointer table | |||
$09/85C5 Pointer table | |||
$09/868D Pointer table | |||
$09/98FB Pointer table | |||
</pre> | |||
==Bank $0A: Extended font== | |||
<pre> | |||
(This is data left in from the Japanese version - they're 12x12 pixels in 1bpp format) | |||
$0A/8000 Graphics: Punctuation, a different font alphabet, yen | |||
$0A/86E4 Graphics: Symbols | |||
$0A/9560 Graphics: Numbers | |||
$0A/9692 Graphics: Latin upper case | |||
$0A/98D2 Graphics: Latin lower case | |||
$0A/9B12 Graphics: Hiragana | |||
$0A/A1D2 Graphics: Katakana | |||
$0A/A892 Graphics: Greek upper case | |||
$0A/AAC0 Graphics: Greek lower case | |||
$0A/AF52 Graphics: Cyrillic upper case | |||
$0A/B2B2 Graphics: Cyrillic lower case | |||
$0A/BCD2 Graphics: Kana half-width | |||
$0A/C812 Graphics: Kanji | |||
</pre> | |||
==Bank $0B: Kanji== | |||
==Bank $0C: Kanji, Main story== | |||
<pre> | |||
(Text is in plaintext, so it's easy to search for in the ROM.) | |||
$0C/9CF9 Graphics: Kanji (end) | |||
$0C/A010 Script 001: Rooks' introduction | |||
$0C/A23A Script 002: You look healthy | |||
$0C/A7A6 Script 003: Something stung me | |||
$0C/F703 Script 117: Prelude to the final battle | |||
$0C/F7C2 Script Sub: MACRO 118 | |||
$0C/F7E3 Script Sub: PROMPT_ROOKS | |||
$0C/FA1B Script Sub: WAIT_NEWLINE | |||
$0C/FAA5 Script Sub: WAIT_CLEAR | |||
</pre> | |||
==Bank $0D: Compressed graphics== | |||
<pre> | |||
$0D/8042 HUD graphics | |||
$0D/833F Font for character cards | |||
$0D/91EF Font for character cards (end) | |||
$0D/9590 Weapons menu | |||
$0D/95F2 Spell data MVN1 | |||
$0D/9712 Spell data MVN10 | |||
$0D/B711 Compass graphics | |||
</pre> | |||
==Bank $0E: VRAM data and graphics== | |||
<pre> | |||
$0E/8048 Tile Data: Something1 - Loaded after a continue through DMA[1] to VRAM 0061 | |||
$0E/8052 Tile Data: Something2 - Loaded after a continue through DMA[1] to VRAM 0081 | |||
$0E/805C Tile Data: Something3 - Loaded after a continue through DMA[1] to VRAM 00A1 | |||
$0E/809B Tile Data: Something12 - Loads tile #s 28-2C into VRAM 009A | |||
$0E/8191 Graphics: Card, Rooks, Idle | |||
$0E/8551 Graphics: Card, Rooks, Battle | |||
$0E/88E5 Graphics: Card, Rooks, Attack | |||
$0E/8C1F Graphics: Card, Grim Reaper | |||
$0E/8FCC Graphics: Card, torn | |||
$0E/92F9 Graphics: Card, skull | |||
$0E/95A3 Graphics: Card, Sylph, Idle | |||
$0E/99D9 Graphics: Card, Sylph, Battle | |||
$0E/9D79 Graphics: Card, Sylph, Attack | |||
$0E/A12C Graphics: Card, Dao, Idle | |||
$0E/A4DF Graphics: Card, Dao, Battle | |||
$0E/A8CD Graphics: Card, Dao, Attack | |||
$0E/AC91 Graphics: Card, Marid, Idle | |||
$0E/B08D Graphics: Card, Marid, Battle | |||
$0E/B3D1 Graphics: Card, Marid, Attack | |||
$0E/B715 Graphics: Card, Efrite, Idle | |||
$0E/BB0E Graphics: Card, Efrite, Battle | |||
$0E/BEA9 Graphics: Card, Efrite, Attack | |||
$0E/C292 Graphics: Card, BadTeefa, Idle | |||
$0E/C6AB Graphics: Card, GoodTeefa, Idle | |||
$0E/CAC5 Graphics: Card, Teefa, Battle | |||
$0E/CE75 Graphics: Card, Teefa, Attack | |||
$0E/D25C Graphics: Card, Salah, Idle | |||
$0E/D66F Graphics: Card, Salah, Battle | |||
$0E/DA31 Graphics: Card, Salah, Attack | |||
$0E/DDF8 Graphics: Card, Darwin, Idle | |||
$0E/E1D3 Graphics: Card, Darwin, Battle | |||
$0E/E518 Graphics: Card, Darwin, Attack | |||
$0E/E863 Graphics: Card, Axs, Idle | |||
$0E/EC0F Graphics: Card, Axs, Battle | |||
$0E/EF6B Graphics: Card, Axs, Attack | |||
</pre> | |||
==Bank $0F: Battle animations== | |||
<pre> | |||
$0F/807C Animation: Small attack | |||
$0F/808C Animation: Medium attack | |||
$0F/809C Animation: Large attack | |||
$0F/817A Pointer table: Animation data? (This is called by Pointer Table 8DFA) | |||
$0F/CB2B Event: Spell animation | |||
$0F/CC01 Animation: Lightning | |||
$0F/CC06 Animation: Smash | |||
$0F/CC0B Animation: Water | |||
$0F/CC10 Animation: Flame | |||
$0F/CC1F Animation: Attribute 1 | |||
$0F/CC9D Animation: Attribute 11 | |||
$0F/CCB1 Animation: Call Wind Spirit | |||
$0F/CCC5 Animation: Dummied | |||
$0F/CCC6 Animation: Swirly | |||
$0F/CEB9 Animation: 5D: Rooks Unpetrify cutscene | |||
$0F/CF00 Animation: 5E: Ariel Attribute 11 cutscene | |||
$0F/CF2B Event: Single spell animation | |||
</pre> | |||
==Bank $10: Compressed gfx== | |||
<pre> | |||
$10/8001 Graphics: Balnea Temple/Reused bricks | |||
$10/C58D Graphics: Balnea Temple (end) | |||
</pre> | |||
==Bank $11: Compressed gfx== | |||
<pre> | |||
$11/8A91 Graphics: Forest of Doubt | |||
$11/FBA7 Graphics: Forest of Doubt (end) | |||
</pre> | |||
==Bank $12: Compressed gfx== | |||
<pre> | |||
$12/8571 Graphics: Bintel Castle | |||
$12/E35E Graphics: Bintel Castle (end) | |||
</pre> | |||
==Bank $13: Graphics and Maps== | |||
<pre> | |||
$13/8001 Graphics: Draven Pass | |||
$13/DACA Graphics: Draven Pass (end) | |||
$13/EBF6 Map: Balnea Temple 1F | |||
$13/ECFE Map: Balnea Temple 2F | |||
$13/EE08 Map: Draven Pass | |||
$13/EE8C Map: Crimson Valley | |||
$13/EEF2 Map: Forest of Doubt | |||
$13/F763 Map: Bintel Castle | |||
$13/F9A6 Map: Stavery Tower (Chapter 5) | |||
</pre> | |||
==Bank $14: Compressed sprites== | |||
<pre> | |||
(This bank starts with a bunch of Decomp80 entries that are basically pointers elsewhere.) | |||
$14/8001 Decomp80: Location of Ariel graphics | |||
$14/8009 Decomp80: Location of Teefa graphics | |||
$14/8012 Decomp80: Location of Crystal Room 1 graphics | |||
$14/801A Decomp80: Location of Crystal Room 2 graphics | |||
$14/8022 Decomp80: Location of Crystal Room 3 graphics | |||
$14/91D1 Graphics: Stoned Axs | |||
$14/F25A Graphics: Darwin NPC | |||
</pre> | |||
==Bank $15: Compressed sprites== | |||
<pre> | |||
$15/B4F1 Graphics: The Seven MacGuffins (ends at B87A) | |||
$15/EE8D Graphics: Ariel kneeling | |||
</pre> | |||
==Bank $16: Compressed sprites== | |||
<pre> | |||
$16/B8EC Graphics: Final fight | |||
$16/BE83 Graphics: The Three MacGuffins | |||
== | Credits text is 5 bytes per letter, in reverse order. | ||
Byte0: 00 normally, or 02 for the final (first) letter. | |||
Byte1: X position - 00 is center screen, 43 is center right, B5 is center left. So negative numbers are left of center. | |||
== | Byte2: Y position - Usually 01 | ||
Byte3: The tile to display. 00="A", 02="B", 04="C", ... 0E="H", 20="I", 22="J", 24="K"... 2E="P", 40="Q", 42="R", ...64-68="KOBY"... 80="ER" | |||
$ | Byte4: Font color - 3C for orange text (headers), 3E for white text (names) | ||
$ | $16/D883 Credits Text 00: "Character Designers" | ||
$ | $16/D8D8 Credits Text 01: "Executive Producer" | ||
$ | $16/EE3B Credits Text 42: "Ami Hashikura" | ||
$ | $16/EEDB Credits Text 44: "THE END" | ||
$16/EF17 Pointer Table: Credit Text locations | |||
</pre> | |||
==Bank $17: Initialization== | |||
<pre> | |||
==Bank $17== | |||
$17/8130 Intro script ("This is an historic land") | $17/8130 Intro script ("This is an historic land") | ||
$17/833F Sub: Stage Select (logs your inputs and compares them to the right codes) | |||
$17/840E Sound test | |||
$17/8417 Sub: Load sound test | |||
$17/874E Text: Intro crawl 1 "According to the ancient legends..." | |||
$17/87BC Text: Intro crawl 2 "Disputes broke out constantly..." | |||
$17/8A6D Text: Intro crawl 7 "King Wagnall was killed..." | |||
$17/9285 HAL logo gfx header | $17/9285 HAL logo gfx header | ||
</pre> | |||
==Bank $18== | ==Bank $18: Treasures, encounters, events== | ||
<pre> | |||
$18/802E Sub: Random encounter logic | $18/802E Sub: Random encounter logic | ||
$18/8044 Encounter rate (higher = fewer encounters) (Default $0C) | $18/8044 Encounter rate (higher = fewer encounters) (Default $0C) | ||
Line 213: | Line 642: | ||
$18/9023 Desiree data (02 0C = Equipment id 0C) | $18/9023 Desiree data (02 0C = Equipment id 0C) | ||
$18/9047 Return Ring data in "A Tunnel". | $18/9047 Return Ring data in "A Tunnel". | ||
$18/9101 Table: Pointers to boss locations by chapter (Ch1: +0, Ch2: +2 etc) | $18/9101 Table: Pointers to boss locations by chapter (Ch1: +0, Ch2: +2 etc) | ||
$18/910B Table: Ch1 boss fights (8 bytes/entry): 00 01-> Map 00 Balnea 1F; 0F00 0600 -> (0F, 06); 0600 -> Encounter #6) | $18/910B Table: Ch1 boss fights (8 bytes/entry): 00 01-> Map 00 Balnea 1F; 0F00 0600 -> (0F, 06); 0600 -> Encounter #6) | ||
Line 226: | Line 654: | ||
Ch3 example: | Ch3 example: | ||
$18/91B3 Encounter data (1C 1D 1E 1A 1B -> 5 monsters in Ice Cave) | $18/91B3 Encounter data (1C 1D 1E 1A 1B -> 5 monsters in Ice Cave) | ||
$18/91DD Table: Ch4 encounters | $18/91DD Table: Ch4 encounters | ||
$18/9229 Table: Ch5 encounters | $18/9229 Table: Ch5 encounters | ||
$18/ | $18/964F Pointer Table: Every story scene - logic handling | ||
$18/ | $18/968F Pointer Table: Every story scene - event code | ||
$18/ | $18/96CC Story Event 00: Rooks' intro | ||
$18/ | $18/C551 Story Event 1A: Red and Blue Guardian | ||
$18/C6D1 Story Event 1B: Tiamat | |||
$18/D019 Epilogue text setup | |||
</pre> | |||
==Bank $19: Enemy graphics== | |||
<pre> | |||
$19/8001 Pointer Table: Enemy Palette data | |||
$19/80A1 Bank Table: Enemy Palette data (the entries are all bank 19) | |||
Each of these entries pointed to by the Enemy Palette Data table have the same format. | |||
A header: A word (unknown use), then another word (the number of bytes in the palette, usually 20 (thirty two)). | |||
Then the palette for that individual monster, and finally a 24-bit pointer to the enemy graphics getting colored. For instance, the Goblin and Ogre will have the same pointer but different palette data. | |||
$19/80F1 Palette Header: Goblin | |||
$19/8118 Palette Header: Ogre | |||
$19/813F Palette Header: Slime | |||
$19/8166 Palette Header: Jell | |||
$19/818D Palette Header: Pilferer | |||
$19/81B4 Palette Header: Thief | |||
$19/8D3E Palette Header: Karul | |||
$19/8D85 Palette Header: Galneon 1 | |||
$19/8DEC Palette Header: Galneon 2 | |||
$19/8E53 Palette Header: Rimsala 1 | |||
$19/8EBA Palette Header: Rimsala 2 | |||
$19/8F21 Pointer Table: SourceData 1 - Called after enemy attack animations. The first and second table are used together (1st entry of each, etc) | |||
$19/8F31 Pointer Table: SourceData 2 | |||
$19/8F41 Data: SourceData1 Attack, Swords | |||
$19/9311 Data: SourceData1 Attack, Bite | |||
$19/961C Data: SourceData1 Attack, Sploosh | |||
$19/9955 Data: SourceData1 Attack, Claws | |||
$19/9D22 Data: SourceData1 Attack, Sting | |||
$19/A0D8 Data: SourceData1 Attack, Punch | |||
$19/A3F5 Data: SourceData1 Attack, ??? | |||
$19/A7A1 Data: SourceData1 Attack, Damage star | |||
$19/AF4B Compressed Graphics: Slime | |||
$19/B3B5 Compressed Graphics: Thief | |||
$19/B834 Compressed Graphics: Dog | |||
$19/BF36 Compressed Graphics: Saurian | |||
$19/C414 Compressed Graphics: Lizardman | |||
$19/CACD Compressed Graphics: Chimera | |||
$19/D1B6 Compressed Graphics: Goblin | |||
$19/D8EA Compressed Graphics: Guardian | |||
$19/E391 Compressed Graphics: Tree | |||
$19/EAB2 Compressed Graphics: Flytrap | |||
</pre> | </pre> | ||
==Bank $1A: Enemy graphics== | |||
<pre> | |||
$1A/8003 Compressed Graphics: Bee | |||
$1A/85C7 Compressed Graphics: Zerel | |||
$1A/936F Compressed Graphics: Cyclops | |||
$1A/9B65 Compressed Graphics: Efrite | |||
$1A/AB44 Compressed Graphics: Mage | |||
$1A/B1AA Compressed Graphics: Zombie | |||
$1A/B823 Compressed Graphics: Skeleton | |||
$1A/BF23 Compressed Graphics: Medusa | |||
$1A/C63A Compressed Graphics: Troll | |||
$1A/CE3C Compressed Graphics: Mimic | |||
$1A/D460 Compressed Graphics: Fighter | |||
$1A/DB45 Compressed Graphics: Sauza | |||
$1A/E79F Compressed Graphics: Hydra | |||
$1A/F18C Compressed Graphics: Ghost | |||
$1A/F843 Compressed Graphics: Shaman | |||
</pre> | |||
==Bank $1B: Enemy graphics== | |||
<pre> | |||
$1B/8003 Compressed Graphics: Minotaur | |||
$1B/880D Compressed Graphics: Giant | |||
$1B/9005 Compressed Graphics: Dragon | |||
$1B/9C58 Compressed Graphics: Darah and Barah | |||
$1B/B0EC Compressed Graphics: Ariel | |||
$1B/BD89 Compressed Graphics: Teefa | |||
$1B/CB84 Compressed Graphics: Karul | |||
$1B/D912 Compressed Graphics: Galneon 1 and 2 | |||
</pre> | |||
==Bank $1C: Enemy graphics== | |||
<pre> | |||
$1C/C21F Compressed Graphics: Rimsala 1 | |||
$1C/D56A Compressed Graphics: Rimsala 2 | |||
$1C/F297 Compressed Graphics: Rimsala 2 part 2 | |||
</pre> | |||
==Bank $1D: Unknown or compressed data== | |||
==Bank $1E, 1F: Sound and Music== | |||
{{Internal Data}} |
Latest revision as of 03:52, 3 August 2024
(Back to Main page)
Bank $00: Common functions; Event handling
$00/8153 Sub: NMI disable $00/8167 Sub: NMI enable $00/817B Sub: Display Force Blanking $00/818F Sub: Set Display $00/81BF Sub: Set BG mode (1 byte parameter) $00/81D8 Sub: Set OBJ Address (1 byte parameter) $00/8208 Sub: Set OBJ Size (1 byte parameter) $00/826E Sub: Graphics dungeon stuff $00/8327 Sub: Update screen $00/8400 Sub: Update background scroll $00/8465 Sub: Video stuff $00/84B9 Table: DMA Control $00/84D0 Table: DMA Destination $00/84E7 Table: Videoport Control $00/84FE Sub: RAM Decomp80 (1 byte) $00/8521 Sub: Decomp80 setup - Decompressor helper function. Reads a data entry that looks like "80 00 xx [xx/xxxx] xx xx" and passes the pointer to the decompressor. $00/8766 Sub: Decompression. Similar to Run Length Encoding. $00/88E2 Sub: Wait for VBLANK $00/89F1 Sub: RNG (1 byte parameter) - can take a value ("5") and roll a range ("0-4"), or can provide a random 2 byte number through $1E0A. $00/8A3D Sub: Multiply to $1E00 $00/8B11 Sub: Set Mode7 $00/8BE4 Table: Bitwise1 $00/8BF4 Table: Bitwise2 $00/8C04 Table: HDMA channels (an AND table where all but 1 bit is set) $00/8C34 Table: Bit flags $00/9008 Sub: Main loop, pointer setup $00/902B Sub: Read Event Code. Reads the event opcode from program counter $1E10. (Very important line! Uses a jump table to run opcodes as code.) Events: These opcodes run over half of the game. Most commonly you'll find code 07 for long calling a subroutine. $00/90E7 Event Opcode 00 - This one is complicated, it's similar to a return $00/90FA Event Opcode 01 - Loops a number of times (1 byte input) $00/911E Event Opcode 02 - Loop end: jumps back to opcode 01 $00/9140 Event Opcode 1A - Jump always (2 bytes) $00/9148 Event Opcode 03 - Jump long (3 bytes) $00/915A Event Opcode 1B - Call subroutine (2 bytes) $00/9177 Event Opcode 1C - Return from short subroutine/1B $00/918D Event Opcode 04 - Call subroutine (3 bytes) $00/91BB Event Opcode 05 - Return from long subroutine/04 $00/91DA Event Opcode 06 - Delay x frames (1 byte) $00/91EA Animation Opcodes 30-37 (1 byte) - Sets or zeros the animation ID $0A7B,x $00/9202 Animation Opcodes 38-3F (2 bytes) - Sets the cursor X position $00/9250 Animation Opcodes 40-47 (2 bytes) - Sets the cursor Y position $00/929E Animation Opcodes E0-E7 (2 bytes) $00/92D7 Animation Opcodes 58-5F (2 bytes) $00/92F8 Animation Opcodes 60-67 (2 bytes) $00/9319 Animation Opcodes F0-F7 (2 bytes) $00/933A Animation Opcodes 68-6F (2 bytes) $00/9362 Animation Opcodes 70-77 (2 bytes) $00/938A Animation Opcodes F8-FF (2 bytes) $00/93B2 Animation Opcodes 78-7F (3 bytes) - Reads an x offset, then stores 2bytes in $0FEF,x and zeros $0FFF,x (?) $00/93CA Animation Opcodes 80-87 (3 bytes) $00/93E2 Animation Opcodes 88-8F (3 bytes) $00/9409 Animation Opcodes 90-97 (3 bytes) $00/9430 Animation Opcodes 98-9F (3 bytes) $00/945E Animation Opcodes A0-A7 (3 bytes) $00/948C Animation Opcodes 48-4F (2 bytes) - Adds to a total at $0937,x $00/949F Animation Opcodes 50-57 (2 bytes) - Adds to a total at $095B,x $00/94B2 Animation Opcodes E8-EF (2 bytes) - Adds to a total at $097F,x $00/94C5 Animation Opcodes C0-C7 (3 bytes) $00/94F7 Animation Opcodes D0-D7 (0 bytes) - Zeros some stuff $00/950F Animation Opcodes D8-DF (1 byte) - Takes an offset and zeros some stuff $00/9527 Event Opcode 07 (3 bytes) - Call a subroutine. (Runs code, returns with RTL) $00/954D Event Opcode 0B (2 bytes) - Jump if false $00/9562 Event Opcode 0C (2 bytes) - Jump if true $00/9577 Event Opcode 11 (? bytes) - Switch-case: jump based on return value. Takes 1 byte (# of entries) plus 2 bytes per entry for the jump pointers. $00/959D Event Opcode 12 (? bytes) - Similar to 11, a switch-case $00/95C7 Event Opcode 0D (0 bytes) - Similar to 00, some kind of return. $00/95DF Event Opcode 08 (2 bytes) - Similar to 1B, some kind of branch to a 2 byte pointer. Clears the animation loop. $00/960C Event Opcode 14 (1 byte) $00/963F Event Opcode 09 (3 bytes) - Similar to 04, some kind of long pointer jump. $00/9655 Event Opcode 0A (0 bytes) - Clears the current animation loop. $00/965F Animation Opcodes A8-AF (0 bytes) - Increment animation ID (A8 = high speed, AF = low speed) $00/9668 Animation Opcodes B0-B7 (0 bytes) - Decrement animation ID $00/9671 Animation Opcodes B8-BF (1 byte) - Adds (amount) to the animation ID $00/968D Event Opcode 19 (5 bytes?)- Similar to 0E, compares values $00/96B8 Event Opcode 15 (4 bytes) - Compares an actor ID with a value. $00/96CD Event Opcode 0E (5 bytes) - Compares RAM to a value using a comparator (RAM Operations table) $00/96F2 Table: RAM Operations (has pointers to functions for AND, OR, add, and XOR) $00/9717 Event Opcode 0F (3 bytes) - Set actor (1 byte) to value (2 bytes). See Actor Arrays table. $00/9739 Table: Actor Arrays - Pointers to RAM 09A3, 09C7, 09EB, 0A0F. These are used with an X offset to track various information. AKA var0, var1, var2, var3. $00/9741 Event Opcode 10 $00/974A Event Opcode 13 (3 bytes) - Set RAM address (2 bytes) to value (1 byte) $00/975F Event Opcode 16 (4 bytes) - Set RAM address (2 bytes) to value (2 bytes) $00/9772 Event Opcode 17 $00/9791 Event Opcode 18 $00/97A0 Event Opcode 1D (3 bytes) - Stores a 2 byte pointer to $0A9F,x and the bank to $0AC3,x $00/97B6 Event Opcode 1E (2 bytes) - Load value $00/97C5 Event Opcode 1F (2 bytes) - Load value at address $00/97D8 Event Opcode 20 $00/97F5 Event Opcode 21 $00/9814 Event Opcode 22 $00/982A Event Opcode 23 $00/9847 Event Opcode 24 (1 byte) - Load a value from 1 of 4 arrays $00/9864 Event Opcode 25 (1 byte) - Similar to 24 but sets the loop variable $0B9F,y $00/9AF0 Sub: Get Event Code (1 byte) - Reads the next event opcode from the program counter $1E10 $00/9AF8 Sub: Get Event Code (1 byte) (returns long) $00/9B00 Sub: Get Event Code (2 bytes) $00/9B07 Sub: Get Event Code (2 bytes) (returns long) $00/9C3C Sub: Set/Get Music (1 byte) $00/9C44 Sub: Set/Get SFX (1 byte) $00/9CAE Sub: Load sprite (14 bytes) $00/9CBC Sub: Character join (13 bytes) $00/9CF9 Sub: Decomp80 Setup (3 bytes) $00/9D34 Sub: Setup Display Stuff (8 bytes) $00/9D69 Sub: Read BG mode (1 byte) $00/9D6F Sub: Display brancher (6 bytes) - byte0: 0-3 (function to call), byte1: A register, byte2-3: X register, byte4-5: Y register $00/9D8B Table: Display functions (used with 9D6F) $00/9D93 Sub: Set sprite mode (4 bytes) $00/9DA8 Sub: Main Screen add (1 byte) $00/9DB6 Sub: Main Screen remove (1 byte) $00/9DC6 Sub: Sub Screen add (1 byte) $00/9DD7 Sub: Sub Screen remove (1 byte) $00/9E79 Sub: Mosaic BG enable (1 byte) $00/9E8A Sub: Mosaic clear (1 byte) $00/9E9D Sub: Set Mosaic Size (1 byte) $00/9EB8 Sub: Increase mosaic size $00/9ECC Sub: Decrease mosaic size $00/9EE0 Sub: DMA Transfer (6 bytes) $00/9F1F Sub: Remove HDMA channel (1 byte) $00/9F31 Sub: HDMA disable $00/9F35 Sub: HDMA enable $00/9F3C Sub: Color Add Select (2 bytes) $00/9F4F Sub: Color Math Designation (2 bytes) $00/9F83 Sub: Set RGB (3 bytes) $00/9FA1 Sub: Set color planes $00/9FE2 Sub: Add RGB (3 bytes) $00/A00F Sub: Check $31 for button press (2 bytes: button) $00/A022 Sub: Check $21 for button press (2 bytes: button) $00/A051 Sub: Loop until RAM is value (4 bytes: 2b RAM, 2b value) $00/A0AC Sub: Setup Text Parser (3 byte ptr) - Load text and text opcodes to be read $00/A0BD Sub: Call RNG (1 byte), something with screen $00/A0C4 Sub: Update screen (1 byte) $00/A0CB Sub: Unfade from black $00/A0DB Sub: Fade to black $00/A1D6 Pointer Table: 8DAD (Seems to govern animations throughout the game) $00/A20C Pointer Table: Event Brancher $00/A31A Pointer Table: 8DFA (Also seems to govern animations) $00/A688 Sub: Set Text Parser (returns long) $00/A68C Sub: Set Text Parser $00/A7B5 Sub: Read Text Opcode Text opcodes: These control formatting in-between the plaintext before it's written to RAM. $00/A858 Text Opcode 00 - Null terminator/stop reading $00/A881 Text Opcode 01 - Move cursor to X,Y position $00/A898 Text Opcode 02 - Used drawing the menus $00/A8A8 Text Opcode 03 - Sets vertical spacing (03 0E = default) $00/A8B5 Text Opcode 04 - Similar to 03, uncommon $00/A8C2 Text Opcode 05 - Determines text delay, the # of frames it takes to write a letter to the screen. $00/A8DE Text Opcode 06 - Sets text color (white/gray or white/yellow depending on context) $00/A8EC Text Opcode 0C - Clears the screen and does some other stuff $00/A902 Text Opcode 0D - Newline $00/A919 Text Opcode 14 - Writes text in RAM to the screen(2 byte address) $00/A943 Text Opcode 10 - Writes text in RAM/ROM to the screen(3 byte address) $00/A969 Text Opcode 11 - Converts number to text(3 byte address) $00/A9A8 Text Opcode 1C - Sets text scroll speed $00/A9BD Text Opcode 1D - Sets text scroll speed (1 line at a time) $00/A9C5 Text Opcode 1E - Sets text scroll speed (fast) $00/A9CD Text Opcode 7F - Wait for A press $00/A9E1 Text Opcode 1B - Draws portraits $00/A9F7 Text Opcode 0F - Sets offset 26 (?) $00/AA04 Text Opcode 08 - Move cursor to X position $00/AA11 Text Opcode Text - Reads text if it isn't an opcode. $00/AC34 Table: Variable Width Font, letter widths $00/AD14 Graphics: Font tiles - Each letter is eighteen bytes and 12x12 pixels. The first entry is $20 (space) and the last is $7F (reserved). $00/B3D3 Graphics: Font tiles (end) $00/BCC8 Sub: Get VWF Length $00/BCFD Sub: Draw font tile $00/BE07 Sub: Clears the screen of text $00/C055 Sub: Hit calculation start $00/C07C Sub: Get row bonus $00/C0B9 Sub: Miss check/crit check $00/C132 Sub: No-element handling $00/C2D4 Sub: Check if damage is over 999 $00/C30C Sub: Load attacking Element $00/C3CA Sub: More element handling $00/C431 Sub: Attack vs. Defense $00/C585 Sub: Load stat boost modifier $00/C5B1 Sub: Check for dead/removed actors, more $00/C658 Sub: Load Strength modifier $00/C66A Sub: Load Endurance modifier $00/C676 Sub: Load Alertness modifier $00/C68A Sub: Load Intelligence $00/C6A7 Sub: Load Intelligence $00/C6C4 Sub: Load Intelligence $00/C6DC Sub: Lots of branching. Returns crit chance or other variables $00/C781 Sub: Load Armor defense $00/C856 Sub: Loads spell power/element $00/C88B Sub: Multiplication (A * X) $00/C8A1 Sub: Multiplication (AA * X) $00/C8C2 Sub: Division (Returns A remainder, X result) $00/D137 Sub: Checks if loaded music is $33 (must be SPC commands) $00/D1AA Sub: Loads HAL Logo theme
Bank $01: Game setup, gameplay, ending
$01/8001 Game start $01/8053 A bunch of initialization/zeroing functions $01/8913 Game over $01/8C85 Event: Handle dungeon movement $01/8D04 Event: Encounter check $01/8D24 Event: Check for map exit $01/8DAE Event: Random encounter $01/9226 Event: (Pointer table) Dungeon menu options $01/923B Event: Open menu $01/9260 Event: Look $01/9584 Event: Item handling outside of battle $01/9BB6 Pointer: Draw status screen ($08/C93E) $01/9BE5 Event: Open map
Bank $02: Battles
$02/8001 Event: Load data, Enemy 00 $02/8137 Event: Load data, Enemy 01 $02/8C59 Event: Load data, Enemy 0C $02/8CF3 Event: Status handling $02/8D03 Event: Enemy paralyzed $02/8D0E Event: Enemy petrified $02/8D19 Event: Enemy confused $02/8D27 Event: Enemy asleep $02/8D50 Event: Enemy's target select $02/8D65 Event: Enemy's confusion targeting $02/8D8A Event: Check if Rooks is targetable $02/8DB3 Event: Check if Spirit is targetable $02/8DDC Event: Check if Guest1 is targetable $02/8E05 Event: Check if Guest2 is targetable $02/8E2E Event: Check if Enemies 1-8 are targetable $02/8E63 Event: Enemy death check $02/8E8A Event: Enemy spell attack $02/8EB6 Event: Enemy physical attack $02/8EE2 Event: Enemy self-confusion damage $02/8F24 Event: Enemy death animation $02/8F65 Event: (Subroutine) Pause for user input $02/8F79 Event: (Subroutine) Enemy attack animation $02/8FC9 Pointer Table: Boss animations $02/8FEA Animation: Attack, Stone Guardian $02/8FFC Animation: Attack, Iron Guardian $02/900E Animation: Attack, Cyclops $02/901A Animation: Attack, Efrite $02/90B9 Animation: Attack, Rimsala 2 $02/90FE Event: Add enemy loot to total $02/913D Sub: Initializes a character/monster's stats from ROM at battle start
Bank $03: Event handling, towns
$03/A457 Sub: Load current tile's encounter value $03/A499 Sub: Update dungeon progress? $03/A52A Dungeon BGM (See Music tab for ID list) $03/A5EB Pointer Table: Map, stairs logic $03/D5BF Item inventory limit (shops). Default $60 = $30 slots (48 items @ 8 per page) (see $07/AA28) $03/DDD6 Item slots -1 x2, used after selling an item in town to check when to stop rearranging. (see $07/AA28)(should be $5E?) $03/DF27 Bar prices (you know, the Alchemist guy) (NOTE: His prices are also plaintext in his dialogue and need to be edited separately) $03/DFA2 Bar option 2 HP gain $03/DFA4 Bar option 3 HP gain $03/DFA6 Bar option 4 HP gain $03/DFA8 Bar option 2 MP gain $03/DFAA Bar option 3 MP gain $03/DFAC Bar option 4 MP gain $03/E052 Card prices (see Inventory) $03/E2A8 Set up dialogue cursor
Bank $04: Town Graphics
$04/8001 Graphics: Town $04/AC14 Graphics: Galia 1 $04/B379 Graphics: Galia 2 $04/B6E4 Graphics: Galia 3 $04/B7E4 Graphics: Castle 1 $04/C1D4 Graphics: Castle 2 $04/C583 Graphics: Castle 3 $04/C675 Graphics: Doraf 1 $04/CF7D Graphics: Doraf 2 $04/D292 Graphics: Doraf 3 $04/D383 Graphics: Elf Village 1 $04/D9BF Graphics: Elf Village 2 $04/DEB4 Graphics: Elf Village 3
Bank $05: Battles
$05/9F7B Names, Characters ($0A bytes per entry + 00 delimeter) $05/9FE9 Names, Enemies ($10 bytes per entry + 00 delimeter) $05/A539 Enemy postfixes A-H (I forget what 81 40 means though) $05/A554 Classes, Characters ($10 bytes per entry + 00 delimeter) NOTE: Using too long a name will result in a blank line. $05/A5FE Names, Areas ($10 bytes per entry + 00 delimeter) $05/A895 Names, Elements ($06 bytes per entry + 00 delimeter) $05/A8BF Names, Status effects ($0C bytes per entry + 00 delimeter) $05/A91A EXP to next level, Rooks? $05/A992 EXP to next level, Sylph? $05/AA0A EXP to next level, Dao? $05/AA82 EXP to next level, Marid? $05/AAFA EXP to next level, Efrite? $05/AB72 EXP to next level, Teefa $05/ABEA EXP to next level, Salah? $05/AC62 EXP to next level, Darwin? $05/ACDA EXP to next level, Axs? (60 entries x 2 bytes) $05/AD6A Level-up stats, Rooks (HP, MP, Str, End, Int, Alt) (2 bytes per entry) $05/B03A Level-up stats, Sylph $05/B2FD Level-up stats, Dao $05/B5CE Level-up stats, Marid $05/B89E Level-up stats, Efrite $05/BB7A Level-up stats, Teefa $05/BE4A Level-up stats, Salah $05/C11A Level-up stats, Darwin $05/C3EA Level-up stats, Axs $05/C6A3 A bunch of 0's and 1's $05/C8D4 Level-up spells, Rooks $05/C8E2 Level-up spells, Sylph $05/C8F2 Level-up spells, Dao $05/C8F2 Level-up spells, Marid $05/C8FB Level-up spells, Efrite $05/C904 Level-up spells, Teefa $05/C911 Level-up spells, Salah $05/C91F Level-up spells, Darwin $05/C929 Level-up spells, Axs $05/C92D Monster race/element (2 bytes per entry) (ends at 2C9CB) $05/C9CD Monster Equipment stats, several unknown (start) $05/CE54 Monster Equipment stats (end) $05/CE55 Monster HP $05/CEF5 Monster EXP $05/CF95 Monster GP $05/D035 Monster Lvl $05/D0D5 Monster ?? stat - $20 entries of 00 through 05. No idea what this is. $05/D195 Monster boss music (00 none, 01 Boss1, 03 Boss2, 02 Rimsala) $05/D1E5 Monster boss flag (00-0F are bosses, FF are not bosses) $05/D235 Monster spell. (If nonzero, there's a random chance they'll use that spell instead of attacking.) (see Spells page) $05/D285 Monster ?? stat $05/D405 Monster Armor Def table (bugged?): offset = Armor * 2 $05/D445 Monster Accessory Def table: offset = Accessory * 2 $05/D4A5 Possible monster stat $05/D565 Possible monster stat $05/DE88 Equipment prices (see Equipment tab) $05/DF79 Equipment "can be equipped by" data (see Equipment tab) $05/DFF3 Equipment power/defense $05/E0E3 Equipment race bonus/element (2 bytes per item) $05/E1D5 Equipment: weapon crit rate $05/E226 Equipment: shield mag def ($05/E1D5) $05/E24E Equipment: weapon damage penalty $05/E2C8 Equipment - spell cast in battle $05/E356 Spells' names $05/EA4D Spells’ “battle only flag” (01: out of battle only, 02: battle only, 03: either) $05/EA9F Spells’ “single/multi target flag” (00: single, 01: multi); Change Attribute is broken as ST $05/EAF1 Spells’ accuracy $05/EB4D Spells' power $05/EC04 Spells' element (paired with an unknown byte, so skip a byte for each entry) (see Magic tab) $05/ECA6 Spells' MP cost $05/ECF8 Spells' color palette (see Magic tab) $05/ED57 Spells’ sfx $05/EE9A Item names (look for LDA $05/EE9A,x or "BF 9A EE 05") $05/F038 Card names (look for LDA $05/F038,x or "BF 38 F0 05") $05/F17E Sleeping Bag HP heal amount (200 HP) (Heals everyone but the spirits) $05/F180 Sleeping Bag MP heal amount (25 MP) $05/F194 Tent HP heal amount (999 MP) (Heals everyone but the spirits) $05/F196 Tent MP heal amount (999 MP) $05/F20A Herbs heal amount (70 HP) $05/F21F Medicine heal amount (200 HP) $05/F234 Silver Flask heal amount (15 MP) $05/F249 Gold Flask heal amount (40 MP)
Bank $06: Graphics (Shops, world map, travel sprites); Stage select data
$06/928E Compressed Graphics: Shop, Weapons $06/9418 Compressed Graphics: Shop, Inn $06/9626 Compressed Graphics: Shop, Spirit Healer $06/97C0 Compressed Graphics: Shop, Alchemist $06/98F6 Compressed Graphics: World Map 1 $06/C646 Compressed Graphics: World Map 2 $06/C971 Compressed Graphics: World Map 3 $06/CB33 Compressed Graphics: World Map 4 $06/CFC0 Compressed Graphics: World Map 5 $06/D2DB Compressed Graphics: Travel Sprites, Rooks $06/D4F6 Compressed Graphics: Travel Sprites, Teefa $06/D744 Compressed Graphics: Travel Sprites, Salah $06/D99F Compressed Graphics: Travel Sprites, Darwin $06/DB1F Compressed Graphics: Travel Sprites, Axs $06/DDBD Stage select: Chapter 2 (These are essentially pre-made save files) $06/E2BD Stage select: Chapter 3 $06/E7BD Stage select: Chapter 4 $06/ECBD Stage select: Chapter 5
Bank $07: Dungeons and gameplay
$07/8001 Sub: Fighting final boss? $07/80F2 Tbl: Levelup spells $07/8CC4 Sub: Deducts HP from target $07/8EDF FINIS (tile bytes) (appears 2x for some reason) $07/8F6E SLEEP (appears 3x for some reason) $07/8FEC ROOKS $07/9020 EFRITE $07/903A SALAH $07/906A End of names' sprite values $07/A83D Sub: Branches based on treasure chest contents $07/A866 Sub: Card treasure type $07/A932 Sub: Loads a card name from ROM $07/A9D4 Sub: Adds a card to the inventory $07/A872 Sub: Item treasure type $07/A95C Sub: Loads an item name from ROM $07/AA18 Sub: Adds an item to the inventory $07/AA27 Item inventory limit (chests). Default $60 = $30 slots (48 items @ 8 per page) $07/A87E Sub: Equipment treasure type $07/A986 Sub: Loads an equipment name from ROM $07/AA3D Sub: Adds a weapon to the inventory $07/AA4D Equipment inventory limit (chests). Default $40 = $20 slots (32 items @ 8 per page) $07/A88A Sub: GP treasure type $07/A896 Sub: Monster treasure type (unused) $07/A8AF Sub: FFFF treasure type (unused???) (returns failure) $07/A8BB Sub: Empty treasure type (returns failure) $07/AA65 Sub: Adds GP to total $07/AA6B Max GP (FFFF) $07/B234 Sub: Levelup check $07/B2DB Sub: When Teefa/Axs join, assigns them Rooks' LV $07/B2E2 Sub: When Salah joins, assigns her Rooks' LV-3 $07/B2F5 Sub: When Darwin joins, assigns him Rooks' LV+3 $07/BBEA Pointer table for character stats in RAM $07/BBF6 Honey stat boost amounts (Str, Int, End, Alt, HP, MP) $07/BC7C Sub: Recovers MP, sets to full MP if more than max $07/BCF1 Sub: Loop for full party healing; ends when X=08 $07/BF3A Sub: Related to running $07/BF54 Sub: Deducts MP from a spell $07/C355 Pointer table for spell effects $07/C8DE SFX for Healing (See Music tab for values) $07/C8E5 SFX for Change Attribute $07/C8E4 SFX for Buffs
Bank $08: Small scripts
$08/8000 Script, Battle/Towns/Items/Magic $08/9650 Spell descriptions $08/C93E Status screen (184 bytes) $08/C9F6 Status screen, current spirit (161 bytes) $08/D3C3 Alchemist conversations
Bank $09: Unknown data
$09/80D3 Pointer table $09/8215 Pointer table $09/835D Pointer table $09/83D3 Pointer table $09/843B Pointer table $09/84FD Pointer table $09/85C5 Pointer table $09/868D Pointer table $09/98FB Pointer table
Bank $0A: Extended font
(This is data left in from the Japanese version - they're 12x12 pixels in 1bpp format) $0A/8000 Graphics: Punctuation, a different font alphabet, yen $0A/86E4 Graphics: Symbols $0A/9560 Graphics: Numbers $0A/9692 Graphics: Latin upper case $0A/98D2 Graphics: Latin lower case $0A/9B12 Graphics: Hiragana $0A/A1D2 Graphics: Katakana $0A/A892 Graphics: Greek upper case $0A/AAC0 Graphics: Greek lower case $0A/AF52 Graphics: Cyrillic upper case $0A/B2B2 Graphics: Cyrillic lower case $0A/BCD2 Graphics: Kana half-width $0A/C812 Graphics: Kanji
Bank $0B: Kanji
Bank $0C: Kanji, Main story
(Text is in plaintext, so it's easy to search for in the ROM.) $0C/9CF9 Graphics: Kanji (end) $0C/A010 Script 001: Rooks' introduction $0C/A23A Script 002: You look healthy $0C/A7A6 Script 003: Something stung me $0C/F703 Script 117: Prelude to the final battle $0C/F7C2 Script Sub: MACRO 118 $0C/F7E3 Script Sub: PROMPT_ROOKS $0C/FA1B Script Sub: WAIT_NEWLINE $0C/FAA5 Script Sub: WAIT_CLEAR
Bank $0D: Compressed graphics
$0D/8042 HUD graphics $0D/833F Font for character cards $0D/91EF Font for character cards (end) $0D/9590 Weapons menu $0D/95F2 Spell data MVN1 $0D/9712 Spell data MVN10 $0D/B711 Compass graphics
Bank $0E: VRAM data and graphics
$0E/8048 Tile Data: Something1 - Loaded after a continue through DMA[1] to VRAM 0061 $0E/8052 Tile Data: Something2 - Loaded after a continue through DMA[1] to VRAM 0081 $0E/805C Tile Data: Something3 - Loaded after a continue through DMA[1] to VRAM 00A1 $0E/809B Tile Data: Something12 - Loads tile #s 28-2C into VRAM 009A $0E/8191 Graphics: Card, Rooks, Idle $0E/8551 Graphics: Card, Rooks, Battle $0E/88E5 Graphics: Card, Rooks, Attack $0E/8C1F Graphics: Card, Grim Reaper $0E/8FCC Graphics: Card, torn $0E/92F9 Graphics: Card, skull $0E/95A3 Graphics: Card, Sylph, Idle $0E/99D9 Graphics: Card, Sylph, Battle $0E/9D79 Graphics: Card, Sylph, Attack $0E/A12C Graphics: Card, Dao, Idle $0E/A4DF Graphics: Card, Dao, Battle $0E/A8CD Graphics: Card, Dao, Attack $0E/AC91 Graphics: Card, Marid, Idle $0E/B08D Graphics: Card, Marid, Battle $0E/B3D1 Graphics: Card, Marid, Attack $0E/B715 Graphics: Card, Efrite, Idle $0E/BB0E Graphics: Card, Efrite, Battle $0E/BEA9 Graphics: Card, Efrite, Attack $0E/C292 Graphics: Card, BadTeefa, Idle $0E/C6AB Graphics: Card, GoodTeefa, Idle $0E/CAC5 Graphics: Card, Teefa, Battle $0E/CE75 Graphics: Card, Teefa, Attack $0E/D25C Graphics: Card, Salah, Idle $0E/D66F Graphics: Card, Salah, Battle $0E/DA31 Graphics: Card, Salah, Attack $0E/DDF8 Graphics: Card, Darwin, Idle $0E/E1D3 Graphics: Card, Darwin, Battle $0E/E518 Graphics: Card, Darwin, Attack $0E/E863 Graphics: Card, Axs, Idle $0E/EC0F Graphics: Card, Axs, Battle $0E/EF6B Graphics: Card, Axs, Attack
Bank $0F: Battle animations
$0F/807C Animation: Small attack $0F/808C Animation: Medium attack $0F/809C Animation: Large attack $0F/817A Pointer table: Animation data? (This is called by Pointer Table 8DFA) $0F/CB2B Event: Spell animation $0F/CC01 Animation: Lightning $0F/CC06 Animation: Smash $0F/CC0B Animation: Water $0F/CC10 Animation: Flame $0F/CC1F Animation: Attribute 1 $0F/CC9D Animation: Attribute 11 $0F/CCB1 Animation: Call Wind Spirit $0F/CCC5 Animation: Dummied $0F/CCC6 Animation: Swirly $0F/CEB9 Animation: 5D: Rooks Unpetrify cutscene $0F/CF00 Animation: 5E: Ariel Attribute 11 cutscene $0F/CF2B Event: Single spell animation
Bank $10: Compressed gfx
$10/8001 Graphics: Balnea Temple/Reused bricks $10/C58D Graphics: Balnea Temple (end)
Bank $11: Compressed gfx
$11/8A91 Graphics: Forest of Doubt $11/FBA7 Graphics: Forest of Doubt (end)
Bank $12: Compressed gfx
$12/8571 Graphics: Bintel Castle $12/E35E Graphics: Bintel Castle (end)
Bank $13: Graphics and Maps
$13/8001 Graphics: Draven Pass $13/DACA Graphics: Draven Pass (end) $13/EBF6 Map: Balnea Temple 1F $13/ECFE Map: Balnea Temple 2F $13/EE08 Map: Draven Pass $13/EE8C Map: Crimson Valley $13/EEF2 Map: Forest of Doubt $13/F763 Map: Bintel Castle $13/F9A6 Map: Stavery Tower (Chapter 5)
Bank $14: Compressed sprites
(This bank starts with a bunch of Decomp80 entries that are basically pointers elsewhere.) $14/8001 Decomp80: Location of Ariel graphics $14/8009 Decomp80: Location of Teefa graphics $14/8012 Decomp80: Location of Crystal Room 1 graphics $14/801A Decomp80: Location of Crystal Room 2 graphics $14/8022 Decomp80: Location of Crystal Room 3 graphics $14/91D1 Graphics: Stoned Axs $14/F25A Graphics: Darwin NPC
Bank $15: Compressed sprites
$15/B4F1 Graphics: The Seven MacGuffins (ends at B87A) $15/EE8D Graphics: Ariel kneeling
Bank $16: Compressed sprites
$16/B8EC Graphics: Final fight $16/BE83 Graphics: The Three MacGuffins Credits text is 5 bytes per letter, in reverse order. Byte0: 00 normally, or 02 for the final (first) letter. Byte1: X position - 00 is center screen, 43 is center right, B5 is center left. So negative numbers are left of center. Byte2: Y position - Usually 01 Byte3: The tile to display. 00="A", 02="B", 04="C", ... 0E="H", 20="I", 22="J", 24="K"... 2E="P", 40="Q", 42="R", ...64-68="KOBY"... 80="ER" Byte4: Font color - 3C for orange text (headers), 3E for white text (names) $16/D883 Credits Text 00: "Character Designers" $16/D8D8 Credits Text 01: "Executive Producer" $16/EE3B Credits Text 42: "Ami Hashikura" $16/EEDB Credits Text 44: "THE END" $16/EF17 Pointer Table: Credit Text locations
Bank $17: Initialization
$17/8130 Intro script ("This is an historic land") $17/833F Sub: Stage Select (logs your inputs and compares them to the right codes) $17/840E Sound test $17/8417 Sub: Load sound test $17/874E Text: Intro crawl 1 "According to the ancient legends..." $17/87BC Text: Intro crawl 2 "Disputes broke out constantly..." $17/8A6D Text: Intro crawl 7 "King Wagnall was killed..." $17/9285 HAL logo gfx header
Bank $18: Treasures, encounters, events
$18/802E Sub: Random encounter logic $18/8044 Encounter rate (higher = fewer encounters) (Default $0C) $18/8056 Sub: Random encounter $18/80DB Sub: Normal (returns 3)/back attack (returns 2)? $18/8210 Sub: Formations $18/826A Snip: Loads the proper battle music ID $18/82B6 Snip: Loads monster ID from formation $18/82E2 Table: Battle music IDs (normal, boss, goddess, final) $18/85AB Sub: Returns treasure data (A: item type, X: value) $18/85D2 Sub: Updates treasure tracker ($18E3) after opening a chest $18/8A99 Table: Pointers for chapter treasures tables $18/8AA3 Table: Treasure data Ch1 (12 bytes per entry) $18/8B1D Table: Treasure data Ch2 (12 bytes per entry) $18/8CB7 Table: Treasure data Ch3 (12 bytes per entry) $18/8EBD Table: Treasure data Ch4 (12 bytes per entry) $18/8FEB Table: Treasure data Ch5 (12 bytes per entry) Ch5 examples: $18/9001 Location of Robe of Valor in Bintel Castle first room $18/900D Location of Gold Flask in Bintel Castle first room ^_^ $18/9079 Location of Grand Shield $18/9023 Desiree data (02 0C = Equipment id 0C) $18/9047 Return Ring data in "A Tunnel". $18/9101 Table: Pointers to boss locations by chapter (Ch1: +0, Ch2: +2 etc) $18/910B Table: Ch1 boss fights (8 bytes/entry): 00 01-> Map 00 Balnea 1F; 0F00 0600 -> (0F, 06); 0600 -> Encounter #6) $18/911D Table: Ch2 boss fights (8 bytes/entry) $18/912F Table: Ch3 boss fights (8 bytes/entry) $18/9139 Table: Ch4 boss fights (8 bytes/entry) empty, needs research $18/913B Table: Ch5 boss fights (8 bytes/entry) empty, needs research $18/913D Table: Pointers to encounters by chapter (Ch1: +2, Ch2: +4 etc) $18/9147 Table: Ch1 encounters $18/9177 Table: Ch2 encounters $18/91AA Table: Ch3 encounters Ch3 example: $18/91B3 Encounter data (1C 1D 1E 1A 1B -> 5 monsters in Ice Cave) $18/91DD Table: Ch4 encounters $18/9229 Table: Ch5 encounters $18/964F Pointer Table: Every story scene - logic handling $18/968F Pointer Table: Every story scene - event code $18/96CC Story Event 00: Rooks' intro $18/C551 Story Event 1A: Red and Blue Guardian $18/C6D1 Story Event 1B: Tiamat $18/D019 Epilogue text setup
Bank $19: Enemy graphics
$19/8001 Pointer Table: Enemy Palette data $19/80A1 Bank Table: Enemy Palette data (the entries are all bank 19) Each of these entries pointed to by the Enemy Palette Data table have the same format. A header: A word (unknown use), then another word (the number of bytes in the palette, usually 20 (thirty two)). Then the palette for that individual monster, and finally a 24-bit pointer to the enemy graphics getting colored. For instance, the Goblin and Ogre will have the same pointer but different palette data. $19/80F1 Palette Header: Goblin $19/8118 Palette Header: Ogre $19/813F Palette Header: Slime $19/8166 Palette Header: Jell $19/818D Palette Header: Pilferer $19/81B4 Palette Header: Thief $19/8D3E Palette Header: Karul $19/8D85 Palette Header: Galneon 1 $19/8DEC Palette Header: Galneon 2 $19/8E53 Palette Header: Rimsala 1 $19/8EBA Palette Header: Rimsala 2 $19/8F21 Pointer Table: SourceData 1 - Called after enemy attack animations. The first and second table are used together (1st entry of each, etc) $19/8F31 Pointer Table: SourceData 2 $19/8F41 Data: SourceData1 Attack, Swords $19/9311 Data: SourceData1 Attack, Bite $19/961C Data: SourceData1 Attack, Sploosh $19/9955 Data: SourceData1 Attack, Claws $19/9D22 Data: SourceData1 Attack, Sting $19/A0D8 Data: SourceData1 Attack, Punch $19/A3F5 Data: SourceData1 Attack, ??? $19/A7A1 Data: SourceData1 Attack, Damage star $19/AF4B Compressed Graphics: Slime $19/B3B5 Compressed Graphics: Thief $19/B834 Compressed Graphics: Dog $19/BF36 Compressed Graphics: Saurian $19/C414 Compressed Graphics: Lizardman $19/CACD Compressed Graphics: Chimera $19/D1B6 Compressed Graphics: Goblin $19/D8EA Compressed Graphics: Guardian $19/E391 Compressed Graphics: Tree $19/EAB2 Compressed Graphics: Flytrap
Bank $1A: Enemy graphics
$1A/8003 Compressed Graphics: Bee $1A/85C7 Compressed Graphics: Zerel $1A/936F Compressed Graphics: Cyclops $1A/9B65 Compressed Graphics: Efrite $1A/AB44 Compressed Graphics: Mage $1A/B1AA Compressed Graphics: Zombie $1A/B823 Compressed Graphics: Skeleton $1A/BF23 Compressed Graphics: Medusa $1A/C63A Compressed Graphics: Troll $1A/CE3C Compressed Graphics: Mimic $1A/D460 Compressed Graphics: Fighter $1A/DB45 Compressed Graphics: Sauza $1A/E79F Compressed Graphics: Hydra $1A/F18C Compressed Graphics: Ghost $1A/F843 Compressed Graphics: Shaman
Bank $1B: Enemy graphics
$1B/8003 Compressed Graphics: Minotaur $1B/880D Compressed Graphics: Giant $1B/9005 Compressed Graphics: Dragon $1B/9C58 Compressed Graphics: Darah and Barah $1B/B0EC Compressed Graphics: Ariel $1B/BD89 Compressed Graphics: Teefa $1B/CB84 Compressed Graphics: Karul $1B/D912 Compressed Graphics: Galneon 1 and 2
Bank $1C: Enemy graphics
$1C/C21F Compressed Graphics: Rimsala 1 $1C/D56A Compressed Graphics: Rimsala 2 $1C/F297 Compressed Graphics: Rimsala 2 part 2
Bank $1D: Unknown or compressed data
Bank $1E, 1F: Sound and Music
Internal Data for Arcana
| |
---|---|