FFV ROM map

From FF5 Hacking Wiki
Revision as of 00:50, 1 March 2019 by Samurai goroh (talk | contribs) (Creation of ROM map)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

C Banks (000000 to 0FFFFF)

C0 bank

Address Type Comments
0000 - 8540 ???? ????
8541 - 858E Data (Japanese Script) Dictionary entries sizes (78)
858F - 87F6 Data (Japanese Script) Dictionary Lo bytes (78 * 8 bytes)
87F7 - 8A66 Data (Japanese Script) Dictionary Hi bytes (78 * 8 bytes) (0 = Normal ; 1 = 1E Kanji ; 2 = 1F Kanji)
8A67 - CB08 ???? ????
CB09 - CB10 Data Dungeon danger table for random battle encounters (2*4)
CB11 - CC49 ???? ????
CC4A - CC51 Data Wold danger table for random battle encounters (2*4)
CC52 - D37F ???? ????
D380 - D97F 4bpp 8x8 Windows, 8x16 numbers, Finger icon, 16x16 Yes, No (Field message symbols)
D980 - DEFF ???? ????
DF00 - E7FF 1bpp 8x8 Shape masks
E800 - F40F ???? ????
F410 - F459 Text Main character naming screen
F45A - F986 ???? ????
F987 - FA9D Data Menu texts offsets (at E7/2F00 in RPGe) (2bytes * 139)
FAC0 - FEBF Text (Japanese) Menu texts (139 variable sized texts)
FEC0 - FFBF Data Lookup Table (LUT) used in RNG stuff
FFC0 - FFFF Data SNES Header

C1 bank

This bank primarily handles graphics and animations.

Address Type Comments
0000 - 001E ASM Entry function for C1 Bank (jumps to one of fifteen general C1 functions)
0020 - 003E Data C1 function lookup table (15 locations; see entry fxn)
0040 - 754C ???? ????
754D - 7575 ASM Enemy death palette fade animation (lighter pink) (from C1/76D1)
7576 - 75AB ASM Enemy death palette fade animation step (from C1/755E)
75AC - 7623 ASM ????
7624 - 763C ASM Set enemy palette to pink on death (from C1/76CE)
763D - 765D ASM Find enemies that are still alive (from C1/76D4)
765E - 76FD ASM ????
76FE - 772B ASM Prepare enemies for dissolve animation (from C1/76EE)
772C - 7789 ASM Enemy dissolve animation (from C1/7725)
778A - 781C ASM Partial dissolve step (from C1/775C)
781D - 7863 ASM Add pixels during "dissolve in" animation (from C1/77FB, called twice)
7864 - 78AA ASM Remove pixels during "dissolve out" animation (from C1/77F3, called twice)
78AB - 8B68 ???? ????
8B69 - 8B7C ASM Battle Command Animation (11 branches, see below)
8B7D - 8B92 Data LUT for command animations (11 entries)
8B93 - 8BA8 ???? ????
8BA9 ASM No Animation (from C1/8B7A, X = 8)
8BAA - 8BCF ASM Item Animation Function (from C1/8B7A, X = 9)
8BD0 - 8BE3 ???? ????
8BE4 - 8C34 ASM Banner Display Function (from C1/8B7A, X = 4)
8C35 - 8C36 ???? ????
8C37 - 8C6C ASM Battle Message Display Function (ie, Steal/Mug, etc) (from C1/8B7A, X = 5)
8C6D - 8CF0 ???? ????
8CF1 - 8D13 ASM Animals Animation Function (from C1/8B7A, X = 2 or X = 3)
8D14 - 8D5E ???? ????
8D5F - 8D73 ASM Ability Animation Function (from C1/8B7A, X = 1)
8D74 - 8D87 ???? ????
8D88 - 8E19 Data LUT for ability animation (based on ability number, 73 entries)
8E1A - 96EB ???? ????
96EC - 9708 ASM Run Character Animation (from numerous places)
9709 - B31B ???? ????
B31C - B38B Data Spell Animation Shape Table (2 bytes * 63 entries; width, height in tiles)
B38C - B676 ???? ????
B677 - B69B ASM Spell Animation Function (from C1/8B7A, X = 0)
B69C - B73F ASM Run Spell Animation (from numerous places)
B740 - FD1C ???? ????
FD1D - FD21 ASM Wait for NMI
FD22 - FF2D ???? ????
FF2E - FF87 Data [P] Hexadecimal to Decimal converter (4 digits)
FF88 - FFFF ???? ????

C2 bank

Address Type Comments
0000 - FFFF ASM Battle related code
16FA - ???? ASM Display Message
56D4 - 56EB ASM Monster item drop routine?
56EC - 62BA ??? ?
62BB - ???? ASM Time-Quick Bug routine?
7150 - 71B8 ASM Can steal from enemy routine?
71B9 - 9207 ??? ?
9208 - 92A4 ASM Item to steal from enemy routine?
92A5 - 9409 ??? ?
940A - 9426 ASM 9999 Max damage delimiter?
9427 - F587 ??? ?
F588 - ???? ASM 16-Bit SRAM Checksum with carry?

C3 bank

Address Type Comments
0000 - 0052 ASM ???? ASM ????
0053 - 016D ASM Decompression subroutine
016E - 02B2 ???? ????
02B3 - 0367 Data ???? (0x0200 bytes after decompress) [ Type 02 headed compression]
0368 - 1176 ???? ????
1177 - 1242 Data (0x041A bytes after decompress) [ Type 02 headed compression]
1243 - 1C64 Data FFV Title? (0x1000 bytes after decompress) [ Type 02 headed compression]
1C65 - 1C8A Data ???? (0x____ bytes after decompress) [ Type 01 headed compression]
1C69 - 1C8A Data ???? (0x____ bytes after decompress) [ Type 01 headed compression]
1C8B - 1D24 ???? ????
1D25 - 1D47 Data ???? (0x0020 bytes after decompress) [ Type 00 headed compression]
1D48 - 1DFD Data ???? (0x0231 bytes after decompress) [ Type 02 headed compression]
1DFE - 1E82 Data ???? (0x0174 bytes after decompress) [ Type 02 headed compression]
1E83 - 2D21 4bpp Chocobo riders (0x1B00 bytes after decompress) [ Type 02 headed compression]
2D22 - 331E 4bpp Dragon of the main screen (0x1200 bytes after decompress) [Compressed Type 02]
331F - 3341 Data ???? (0x0020 bytes after decompress) [ Type 00 headed compression]
3342 - 33F5 Data OAM data (Title dragon) (0x0120 bytes after decompress) [ Type 02 headed compression]
33F6 - 362A 4bpp Staff font [Compressed headed Type 02]
362B - 383B Text Staff [Compressed headed Type 02]
383C - 3908 Data ???? (0x0151 bytes after decompress) [ Type 02 headed compression]
3908 - 7B91 ???? ????
7B92 - 7E4A Text Credits [Compressed headed Type 02]
7E4B - A06E Data ???? Code expansion? (i.e. / 7F8000-7FC7FF)
A06F - A2FF ???? ????
A300 - B9FF Data Menu drawing data
BA00 - BAFF ???? ????
BB00 - E5FF Data Locations background palettes [15-bit RGB, 2 bytes per color] [2bytes * 43 sets * 128 colors]
E600 - EAFF ???? ????
EB00 - EF7F 1bpp 8x12 Mp Hp & Japanese characters (Japanese font)
EF80 - FFFF 1bpp 8x12 Some western, arrows, and Cº (Field font)

C4 to C6 banks

Address Type Comments
C4/0000 - C4/01FF Data SPC Engine?
C4/0200 - C4/0600 ASM ASM
C4/0601 - C4/3DA9 ???? ????
C4/3DAA - C4/46A9 Data (Pointers) Audio, Samples / Indexes
C4/46AA - C5/E5E7 Data Instruments
C5/E5E8 - C6/FE75 Data BGM (Songs)
C6/FE76 - C6/FFFF Data (Blank) (0x18A bytes, 394 bytes)

C7 to C9 banks

Address Type Comments
C7/0000 - C8/221F Data World Map Tilemaps (custom compression)
C8/2220 - C8/331F Text (Japanese) Speech offset [2 Bytes * 2160]
C8/3320 - C8/49DE Data Extended Event data offsets [3 Bytes * 1940]
C8/49DF - C9/FFFF Data Extended Event data [x Bytes * 1940]

CA bank

Address Type Comments
0000 - FFFF Text Speech (Japanese)

CB to CD banks

These banks are related with the location maps.

Address Type Comments
CB/0000 - CB/028F Data Tilemaps offsets (Location maps) [2bytes * 0x0148]
CB/0290 - CD/FA01 Data Tilemaps (Location maps) [Compressed unheaded type02] [64 * 64 bytes (after decompressing)]
CD/FA02 - CD/FA3F Data (Blank)
CD/FA40 - CD/FDFF ???? Unknown data (used by ASM function at C0/9913)
CD/FE00 - CD/FFFF 4bpp 8x8 Row 8x8 numbers and ":" (Menu/Battle hex numbers)

CE bank

Address Type Comments
0000 - 073F Data NPC Actions data offsets [2Bytes * 928 entries]
0740 - 2293 Data NPC Actions data
2294 - 23FF Data (Blank)
2400 - 27FF Data Event places offset [2Bytes * 512]
2800 - 365F Data Event places [4 Bytes * 920] (2B: Coordinates, 2B Event id (in table D8/E080))
3660 - 36BF Data (Blank)(Sure?)
36C0 - 3ABF Data Location and World Maps Exits Offsets [2 Bytes * 512]
3AC0 - 58CF Data Location and World Maps Exits [6 Bytes *] (2B: Origin Coordinates, 2B: Destiny Map ID, 2B: Destiny Coordinates)
58D0 - 59BF Data (Blank)(Sure?)
59C0 - 5DC1 Data NPCs offsets [2Bytes * 512 + 2bytes eof]
5DC2 - 9BFF Data NPCs (Non Playable Characters) [7Bytes each]
9C00 - CFFF Data Locations entries (Map Descriptors) [26 Bytes * 512]
D000 - E12F Data Monster battle palettes [8 (or 16) Bytes * 550]
E130 - FFFF ???? ????

CF bank

Address Type Comments
0000 - 0037 Data Tile blocks offset
0038 - C53F Data Tile blocks [Compressed Type02 Unheaded]
C502 - C53F Data (Blank)
C540 - C56D Data Tile properties offsets [2bytes * 23]
C56E - D7FF Data Tile properties [Compressed unheaded type02] [2 bytes * 256 after decompressed]
D800 - DBFF 4bpp 8x8 World Map (background)
DC00 - DFFF Data (Blank)
E000 - E9FF Data World map tilemap offsets [2bytes * 256 * 5 worlds] (Every offset points to a horizontal line of 256 tiles stored in banks C7 and C8)
EA00 - F0BF Data World map tile block properties [3Bytes * 192 * 3]
F0C0 - F9BF Data World map tile blocks [1Byte * 192 * 4 * 3]
F9C0 - FABF Data World map tileset color masks (first and third worlds) [1Byte * 16 * 16]
FAC0 - FBBF Data World map tileset color masks (second world) [1Byte * 16 * 16]
FBC0 - FCBF Data World map tileset color masks (underwater) [1Byte * 16 * 16]
FCC0 - FDBF Data World map tileset palette (first and third worlds) [2Bytes * 128]
FDC0 - FEBF Data World map tileset palette (second world) [2Bytes * 128]
FEC0 - FFBF Data World map tileset palette (underwater) [2Bytes * 128]
FFC0 - FFFF Data (Blank)

D Banks (100000 to 1FFFFF)

D0 bank

This bank primarily handles monsters data

Address Type Comments
0000 - 2FFF Data Monster Stats
3000 - 4FFF Data Monster Encounter (512*16)
5000 - 55FF Data Monster Drops/Steals
5600 - 5BFF Data Monster Control Actions
5C00 - 67FF Text (Japanese) Monster names
6800 - 6FFF Data Monster groups (256 * 4*2bytes indices to Monster Encounter)
7000 - 71FF Data Location names offsets (2 bytes * 164) (At E7/0000 in RPGe)
7200 - 77FF Text (Japanese) Location names
7800 - 797F Data Event encounters
7980 - 79FF Data Monster-in-a-box encounters
7A00 - 7BFF Data Monster zones in World 1 (4*2 * 8*8)
7C00 - 7DFF Data Monster zones in World 2 (4*2 * 8*8)
7E00 - 7FFF Data Monster zones in World 3 (4*2 * 8*8)
8000 - 83FF Data Monster zones in dungeons (512*2 indices to Monster groups)
8400 - 85FF ???? (fragmented data)
8600 - 88FF Data Monster Release actions
8900 - 98FF Data Monster formation coordinates in battle
9900 - 9BFF Data Monster Specialty data
9C00 - 9EFF ASM Monster AI scripts offsets
9C00 - C7FF ASM Monster AI scripts
C800 - CFFF ???? (8*256 ?)
D000 - D003 Data Offsets to monster bitmap tile tables (8x8 tiles and 16x16 tiles) respectively
D004 - D333 Data Monster 8x8 bitmap tile tables
D334 - DC33 Data Monster 16x16 bitmap tile tables
DC34 - DE?? ???? Unknown data
E003 - E162 4bpp Monster Mini, Toad and shadow graphics
E163 - E4C9 ???? (Graphics?)
E4CB - EBE4 4bpp The End [Compressed Unheaded Type 02]
EBE5 - EBFF ???? ????
EC00 - EFFF Data Game engine constants
F000 - F1D3 Text Battle speech offsets (2 bytes)
F1D4 - FFDF Text (Japanese) Battle speech
FFE0 - FFFF Data ???? Some other info about monster groups ????

D1 bank

This bank primarily handles Items/Characters/Jobs/Abilities data

Address Type Comments
0000 - 0B7F Data Item (and armor and weapons) data
0B80 - 137F Data Magic data
1380 - 1C7F Text Item names (menu)
1C80 - 1E89 Text Magic names (field menu)
1E8A - 247F Text Magic names2
2480 - 287F Text Item definition tables
2880 - 288F Data Item stat change definitions
2890 - 28B5 ???? ???? (pointer table ?)
28B6 - 2975 Text Status names (battle menu)
2976 - 29FF ???? ???? (fragmented data)
2A00 - 2CFF Data Item/magic prices
2D00 - 2D3F Text Shops names [1Byte * 8 * 8]
2D40 - 2FFF Data Shop data
3000 - 3200 Data Treasure boxes offsets (1byte * 4 + D1/3210)
3201 - 320F Data 15 bytes unused
3210 - 35FF Data Treasure chests/boxes/pots (252 x 4 bytes)
3600 - 39A8 ???? ???? (fragmented values)
39A9 - 3BA8 Text Battle messages offsets
3BA9 - 3FFF Text (Japanese) Battle messages
4000 - 40FF Text Offset items descriptions
4100 - 4FFF Text Item descriptions (D1/43FC to D1/4FFF; 3076 free bytes at the end)
5000 - 52B4 Data Level tables
52B5 - 52C0 ???? ???? Unknown data
52C1 - 54FF Data Job levels
5500 - 551D Text Character names
551E - 5531 Data Character stat bonuses
5532 - 55FF ???? ???? Unknown data
5600 - 56AF Text Job names
56B0 - 57FF Data Job data
5800 - 59DF Text Ability data/names (support) (menu) + (Japanese)
59E0 - 61FF ???? ???? Unknown data
6200 - 6307 Text Menu abilities texts
6308 - 6AB0 ???? ???? Unknown data
6700 - 6AB0 Text Special abilities texts
6AB1 - 6DF8 Data Ability effect data (Animals, Mix, Terrain actions)
6DF9 - 6FFF ???? (rising, varying values) (Pointers?)
7000 - 713F Data Character initial data
7140 - 7249 Text Job/ability descriptions offsets
724A - 7F9F Text Job/ability descriptions (& Empty Space)
7FA0 - A39F ???? (2*~4600)
A3A0 - A59F Data Color Palettes (4 bytes * 128 entries)
A59F - AB9F ???? ????
ABA0 - BDFF 4bpp 8x8 Misc. spell effects
BE00 - BFFF 2bpp? 3bpp? (2*256)
C000 - EFFF 2bpp 8x8 Terrain spell effects?
F000 - FFFF 2bpp 8x8 Menú Font (1 page 2bpp 8x8)

D2 to D4 banks

Address Type Comments
D2/0000 - D4/97BF 4bpp Character battle sprites
D4/97C0 - D4/A3BF 3bpp Misc. battle sprites
D4/A3C0 - D4/B17F Data Job Palettes (32*5*22)
D4/B180 - D4/B8FF Data Monster battle sprites data [5Bytes * 384]
D4/B900 - D4/FFFF ???? ????

D5 to D8 banks

Address Type Comments
D5/0000 - D8/2FFF 4BPP & 3BPP Monster battle sprites
D8/3000 - D8/4195 ???? ????
D8/4196 - D8/41D4 Data Pointers to battle background tilesets [3bytes * 21 entries]
D8/41D5 - D8/DE35 4bpp Battle background tilesets [x bytes * 9 entries] [Compressed unheaded type02]
D8/DE36 - D8/E07F ???? ????
D8/E080 - D8/E5DF Data Event data offsets [2 Bytes * 687 (0x2AF)]
D8/E5E0 - D8/FFFF Data Event data [x Bytes * 687 (0x2AF)] (Links to Extended Event data in table C8/3320)

D9 bank

Address Type Comments
0000 - 7CCF 3bpp Attack animations
7CD0 - FFFF ???? ????

DA and DB banks

The world maps tilesets are 8bpp mode 7. To save rom space each byte in these tables represents actually 2 8bpp mode 7 bytes. The lesser 4 bits are the first mode 7 byte and the higher 4 bits (right shifted) are the second one. With this approach, only 32 bytes are needed to store every mode 7 8x8 tile instead of 64, but it limits the number of different colors from 256 (0xFF) to 16 (0x0F). To avoid this limitation, every byte of each tile is masked with the values stored on the tables CF/F9C0, CF/FAC0 and CF/FBC0 respectively. That means, the values from DB/8000 to DB/801F are masked with the value stored in CF/F9C0; the values from DB/8020 to DB/803F are masked with the value stored in CF/F9C1...

Address Type Comments
DA/0000 - DB/39FF 4bpp NPCs sprites
DB/3A00 - DB/4D7F 3bpp Overworld / World map sprites
DB/4D80 - DB/7FFF 4bpp Overworld sprites
DB/8000 - DB/9FFF 8bpp Mode 7 (Compressed) World map tileset (first and third worlds)
DB/A000 - DB/BFFF 8bpp Mode 7 (Compressed) World map tileset (second world)
DB/C000 - DB/CFFF 8bpp Mode 7 (Compressed) World map tileset (underwater)
DB/D000 - DB/F7FF 1bpp Kanji
DB/F800 - DB/FFFF ???? ????

DC to DF banks

Address Type Comments
DC/0000 - DC/0023 Data World Map and Locations 8x8 Background/Foreground tiles offsets (2 bytes)
DC/0024 - DC/2D83 2bpp World Map and Locations 8x8 Background/Foreground tiles
DC/2D84 - DC/2E23 Data World Map and Locations 8x8 Background graphics offsets (4 bytes to add to 00DC2E24)
DC/2E24 - DF/FBFF 4bpp World Map and Locations 8x8 Background graphics
DF/FC00 - DF/FC7F Data World Map and Locations Sprite palette [2bytes * 4 sets * 16 (0x10) colors]
DF/FC80 - DF/FFBF ???? ????
DF/FFC0 - DF/FFFF Data ???? Palettes ????

E Banks (200000 to 2FFFFF)

ROM expansion used by RPGe Translation

E0 bank

Address Type Comments
0000 - 0F4F Text Monster names
0F50 - 0F6F ASM ASM
0F70 - 114F Data Multiply by 7/5
1150 - 13EF Text Ability names (commands)
13F0 - 2D3F ???? ????
2D40 - 2F4D ASM ASM
2F4E - 30FF ???? ????
3100 - 3140 Text Misc. menu text fields
3140 - 31A7 ???? ????
31A8 - 31B1 ASM ASM
31B2 - 3224 ???? ????
3225 - 3324 Data Texts font characters widths (Speech and battle messages)
3325 - 3424 Data Texts font characters widths (Crystal prophecy)
3425 - 3723 ???? ????
3724 - 4AA4 1bpp Crystal prophecy font
4AA5 - 4C24 ???? ????
4C25 - FFFF Blank Blank data

E1 to E6 banks

Address Type Comments
E1/0000-E6/FFFF Text Game script

E7 bank

Address Type Comments
0000 - 08FF Text Area headings
0900 - 0F8F Text Effect names
0F90 - 177F Text Magic names (57-FF) (battle menu) (Song)
1780 - 275F Text Magic names (57-FF) (battle message)
2760 - 2CA9 Text Battle messages
2CAA - 2EFF ???? ????
2F00 - 33FF Text Menu/shop text
3400 - 355F ???? ????
3560 - 36FF Text Rare item names
3700 - 3AF0 Text Monster Specialty names
3B00 - 50FF Text Battle dialog
5100 - 57FF Text Item descriptions
5800 - 585F Text Battle record text
5860 - 705F Text Item names (battle message)
7060 - 739F Text Ability names (support) (battle message)
73A0 - 751F Text Crystal prophecy
7520 - FAD8 ???? ????
FAD9 - FFFF Text Misc. menu text fields