Difference between revisions of "FF7/Kernel/Kernel.bin"

From Final Fantasy Inside
< FF7‎ | Kernel
Jump to navigation Jump to search
my_wiki>Halkun
(The KERNEL.BIN Archive)
m (49 revisions imported)
 
(35 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Important Files ==
+
== Important Files ==
  
<center>[[Image:Gears_img_5.png]]</center>
+
{| style="border: 1px solid black; border-collapse: collapse; background: rgb(0,255,0)" border="1" cellspacing="1" cellpadding="3" align="center"
 
+
! align="center" | PSX Version
== The KERNEL.BIN Archive ==
+
! align="center" | PC Version
 
 
The file KERNEL.BIN is in [[BIN-GZIP|BIN-GZIP format]]. It consists of 27 gziped sections concatenated together with a 6 byte header for each. This file is the same both on the PC and PSX versions. This holds all the static data and menu text for the game, with a look up table at the beginning of the section. Sections 10-27 are [[FF Text|FF Text files]].
 
 
 
The KERNEL.BIN file consists of the following sections.
 
 
 
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
 
! style="background:rgb(204,204,204)" align="center" | File
 
! style="background:rgb(204,204,204)" | Data
 
! style="background:rgb(204,204,204)" | Offset
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 1
 
|style="background:rgb(255,255,255)" | Command data
 
|style="background:rgb(255,255,255)" | 0x0006
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 2
 
|style="background:rgb(255,255,255)" | Attack data
 
|style="background:rgb(255,255,255)" | 0x0086
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 3
 
|style="background:rgb(255,255,255)" | Savemap
 
|style="background:rgb(255,255,255)" | 0x063A
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 4
 
|style="background:rgb(255,255,255)" | Character starting stats
 
|style="background:rgb(255,255,255)" | 0x0F7F
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 5
 
|style="background:rgb(255,255,255)" | Item data
 
|style="background:rgb(255,255,255)" | 0x111B
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 6
+
| /INIT/KERNEL.BIN
|style="background:rgb(255,255,255)" | Weapon data
+
| /DATA/KERNEL/KERNEL.BIN
|style="background:rgb(255,255,255)" | 0x137A
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 7
+
|
|style="background:rgb(255,255,255)" | Armor data
+
| /DATA/KERNEL/KERNEL2.BIN
|style="background:rgb(255,255,255)" | 0x1A30
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 8
 
|style="background:rgb(255,255,255)" | Accessory data
 
|style="background:rgb(255,255,255)" | 0x1B73
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 9
 
|style="background:rgb(255,255,255)" | Materia data
 
|style="background:rgb(255,255,255)" | 0x1C11
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 10
 
|style="background:rgb(255,255,255)" | Command Descriptions
 
|style="background:rgb(255,255,255)" | 0x1F32
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 11
 
|style="background:rgb(255,255,255)" | Magic Descriptions
 
|style="background:rgb(255,255,255)" | 0x2199
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 12
 
|style="background:rgb(255,255,255)" | Item Descriptions
 
|style="background:rgb(255,255,255)" | 0x28D4
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 13
 
|style="background:rgb(255,255,255)" | Weapon Descriptions
 
|style="background:rgb(255,255,255)" | 0x2EE2
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 14
 
|style="background:rgb(255,255,255)" | Armor Descriptions
 
|style="background:rgb(255,255,255)" | 0x307B
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 15
 
|style="background:rgb(255,255,255)" | Accessory Descriptions
 
|style="background:rgb(255,255,255)" | 0x315F
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 16
 
|style="background:rgb(255,255,255)" | Materia Descriptions
 
|style="background:rgb(255,255,255)" | 0x3384
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 17
 
|style="background:rgb(255,255,255)" | Key Item Descriptions
 
|style="background:rgb(255,255,255)" | 0x3838
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 18
 
|style="background:rgb(255,255,255)" | Command Names
 
|style="background:rgb(255,255,255)" | 0x3BE2
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 19
 
|style="background:rgb(255,255,255)" | Magic Names
 
|style="background:rgb(255,255,255)" | 0x3CCA
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 20
 
|style="background:rgb(255,255,255)" | Item Names
 
|style="background:rgb(255,255,255)" | 0x4293
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 21
 
|style="background:rgb(255,255,255)" | Weapon Names
 
|style="background:rgb(255,255,255)" | 0x4651
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 22
 
|style="background:rgb(255,255,255)" | Armor Names
 
|style="background:rgb(255,255,255)" | 0x4B02
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 23
 
|style="background:rgb(255,255,255)" | Accessory Names
 
|style="background:rgb(255,255,255)" | 0x4C4B
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 24
 
|style="background:rgb(255,255,255)" | Materia Names
 
|style="background:rgb(255,255,255)" | 0x4D90
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 25
 
|style="background:rgb(255,255,255)" | Key Item Names
 
|style="background:rgb(255,255,255)" | 0x5040
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 26
 
|style="background:rgb(255,255,255)" | Battle and Battle-Screen Text
 
|style="background:rgb(255,255,255)" | 0x5217
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 27
 
|style="background:rgb(255,255,255)" | Summon Attack Names
 
|style="background:rgb(255,255,255)" | 0x5692
 
 
|}
 
|}
  
 +
==  The KERNEL.BIN Archive  ==
  
== KERNEL.BIN Section formats ==
+
The file KERNEL.BIN archive is in [[FF7/Kernel/Low_level_libraries#BIN-GZIP_Type_Archives|BIN-GZIP format]]. It consists of 27 gziped sections concatenated together with a 6 byte header for each. This file is the same both on the PC and PSX versions. This holds all the static data and menu text for the game, with a look up table at the beginning of the section. The first 9 sections of data (i.e. The non-text related items) are in typical BIN file archive format. Sections 10-27 are [[FF7/FF_Text|FF Text files]]. The text sections have a header of pointers at the beginning of each section and point to a text block below.
  
The first 9 sections of data (i.e. The non-text related items) have a typical BIN file format. The text sections (10-27) do not have the typical 6 byte header. The text sections have a header of pointers to the text block. The text is in FF text format.
+
The KERNEL.BIN file consists of the following sections.
 
 
=== Section 1: Command data format ===
 
 
 
This contains the data for Menu commands. Each recored is 16 bytes long.
 
 
 
 
 
{| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)" align="center"
 
! style="background:rgb(204,204,204); width:50px;" align="center" | Offset
 
! style="background:rgb(204,204,204); width:50px;" | Length
 
! style="background:rgb(204,204,204); width:275px;" colspan="2" | Description
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|-
 
|style="background:rgb(255,255,255)" align="center" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
|}
 
 
 
=== Section 2: Attack data format ===
 
 
 
This contains the data for the different attacks. Each record is 28 bytes long.
 
  
{| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)" align="center"
+
{| class="wikitable"
! style="background:rgb(204,204,204); width=50px;" align="center" | Offset
+
! File
! style="background:rgb(204,204,204); width=50px;" | Length
+
! Data
! style="background:rgb(204,204,204); width:275px;" colspan="2" | Description
+
! Offset
|-
 
|style="background:rgb(255,255,204)" align="center" | 0x00
 
|style="background:rgb(255,255,204)" | 4 bytes
 
|style="background:rgb(255,255,204)" colspan="2" | Unknown
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 0x04
 
|style="background:rgb(255,255,255)" | 1 byte
 
|style="background:rgb(255,255,255)" colspan="2" | Casting cost
 
|-
 
|style="background:rgb(255,255,204)" align="center" | 0x05
 
|style="background:rgb(255,255,204)" | 5 bytes
 
|style="background:rgb(255,255,204)" colspan="2" | Unknown
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 0x0A
 
|style="background:rgb(255,255,255)" | 1 byte
 
|style="background:rgb(255,255,255)" colspan="2" | Attack type
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 0x0B
 
|style="background:rgb(255,255,255)" | 2 bytes
 
|style="background:rgb(255,255,255)" colspan="2" | Attack attribute
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="16" | &nbsp;
 
|style="background:rgb(255,255,255); width:110px" | 0x0000
 
|style="background:rgb(255,255,255); width:165px" | Escape/Exit-Type
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x0001
+
| align="center" | 1
|style="background:rgb(255,255,255)" | Ribbon-Like
+
|
 +
[[FF7/Command_data|Command data]]
 +
| 0x0006
 
|-
 
|-
|style="background:rgb(255,255,204)" | 0x0003
+
| align="center" | 2
|style="background:rgb(255,255,204)" | Enemy Skill (?)
+
|
 +
[[FF7/Attack_data|Attack data]]
 +
| 0x0086
 
|-
 
|-
|style="background:rgb(255,255,204)" | 0x0005
+
| align="center" | 3
|style="background:rgb(255,255,204)" | Enemy Skill (?)
+
|
 +
[[FF7/Battle_and_growth_data|Battle and growth data]]
 +
| 0x063A
 
|-
 
|-
|style="background:rgb(255,255,204)" | 0x0007
+
| align="center" | 4
|style="background:rgb(255,255,204)" | Enemy Skill (?)
+
|
 +
[[FF7/Character_starting_stats|Initialization data]]
 +
| 0x0F7F
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x000D
+
| align="center" | 5
|style="background:rgb(255,255,255)" | Restorative/Protective
+
|
 +
[[FF7/Item_data|Item data]]
 +
| 0x111B
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x000F
+
| align="center" | 6
|style="background:rgb(255,255,255)" | Status-giving/Elemental
+
|
 +
[[FF7/Weapon_data|Weapon data]]
 +
| 0x137A
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x0011
+
| align="center" | 7
|style="background:rgb(255,255,255)" | Shield
+
|
 +
[[FF7/Armor_data|Armor data]]
 +
| 0x1A30
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x0013
+
| align="center" | 8
|style="background:rgb(255,255,255)" | Limit Break
+
|
 +
[[FF7/Accessory_data|Accessory data]]
 +
| 0x1B73
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x0015
+
| align="center" | 9
|style="background:rgb(255,255,255)" | Cait Sith Limit Break
+
|
 +
[[FF7/Materia_data|Materia data]]
 +
| 0x1C11
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x0017
+
| align="center" | 10
|style="background:rgb(255,255,255)" | Summon
+
| Command descriptions
 +
| 0x1F32
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x00C7
+
| align="center" | 11
|style="background:rgb(255,255,255)" | Roulette
+
| Magic descriptions
 +
| 0x2199
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x0097
+
| align="center" | 12
|style="background:rgb(255,255,255)" | Multiple Strike Limit Breaks
+
| Item descriptions
 +
| 0x28D4
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0xFF01
+
| align="center" | 13
|style="background:rgb(255,255,255)" | Phoenix Down
+
| Weapon descriptions
 +
| 0x2EE2
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0xFF03
+
| align="center" | 14
|style="background:rgb(255,255,255)" | X-needles Attack
+
| Armor descriptions
 +
| 0x307B
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0xFF17
+
| align="center" | 15
|style="background:rgb(255,255,255)" | Final Limit Break
+
| Accessory descriptions
 +
| 0x315F
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x0D
+
| align="center" | 16
|style="background:rgb(255,255,255)" | 1 byte
+
| Materia descriptions
|style="background:rgb(255,255,255)" colspan="2" | ID Number
+
| 0x3384
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x0E
+
| align="center" | 17
|style="background:rgb(255,255,255)" | 1 byte
+
| Key Item descriptions
|style="background:rgb(255,255,255)" colspan="2" | Restore Apply
+
| 0x3838
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x0F
+
| align="center" | 18
|style="background:rgb(255,255,255)" | 1 byte
+
| Command Names
|style="background:rgb(255,255,255)" colspan="2" | Strength
+
| 0x3BE2
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x10
+
| align="center" | 19
|style="background:rgb(255,255,255)" | 1 byte
+
| Magic Names
|style="background:rgb(255,255,255)" colspan="2" | Restore type
+
| 0x3CCA
 
|-
 
|-
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="4" | &nbsp;
+
| align="center" | 20
|style="background:rgb(255,255,255)" | 0x00
+
| Item Names
|style="background:rgb(255,255,255)" | Restore HP
+
| 0x4293
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x01
+
| align="center" | 21
|style="background:rgb(255,255,255)" | Restore MP
+
| Weapon Names
 +
| 0x4651
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0x02
+
| align="center" | 22
|style="background:rgb(255,255,255)" | Restore Ailment
+
| Armor Names
 +
| 0x4B02
 
|-
 
|-
|style="background:rgb(255,255,255)" | 0xFF
+
| align="center" | 23
|style="background:rgb(255,255,255)" | None
+
| Accessory Names
 +
| 0x4C4B
 
|-
 
|-
|style="background:rgb(255,255,204)" align="center" | 0x11
+
| align="center" | 24
|style="background:rgb(255,255,204)" | 2 bytes
+
| Materia Names
|style="background:rgb(255,255,204)" colspan="2" | Unknown
+
| 0x4D90
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x13
+
| align="center" | 25
|style="background:rgb(255,255,255)" | 1 byte
+
| Key Item Names
|style="background:rgb(255,255,255)" colspan="2" | Times attacking
+
| 0x5040
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x14
+
| align="center" | 26
|style="background:rgb(255,255,255)" | 4 bytes
+
| Battle and Battle-Screen Text
|style="background:rgb(255,255,255)" colspan="2" | Status
+
| 0x5217
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | 0x18
+
| align="center" | 27
|style="background:rgb(255,255,255)" | 2 bytes
+
| Summon Attack Names
|style="background:rgb(255,255,255)" colspan="2" | Element
+
| 0x5692
|-
 
|style="background:rgb(255,255,204)" align="center" | 0x20
 
|style="background:rgb(255,255,204)" | 2 bytes
 
|style="background:rgb(255,255,204)" colspan="2" | Unknown
 
 
|}
 
|}
  
=== Section 3: Savemap ===
+
== The KERNEL2.BIN Archive  ==
  
This is all the initial values and structure for most of the [[Savemap]], excluding the header data and the tail of the last bank (0x0054 to 0x0FE7). This is copied into RAM on initialization.
+
On the PC version there exists a secondary kernel archive called KERNEL2.BIN. This archive contains only sections 10-27 (Text data) of KERNEL.BIN. The data was ungzipped from the original archive, concatenated together, and then LZSed into a single archive with a 4 byte header giving the length of the file.
  
 
+
The maximum allotted storage space on the PC version for all un-LZSed data in the kernel2.bin is 27KB (27648 bytes). This means that the total size of the extracted files (text and pointers) must be less than this.
=== Section 4: Initialization data ===
 
 
 
This contains the starting stats for the characters and related game states. On "New Game", this data is copied directly into the [[Savemap]] (from offset 0x0054 to 0x0BAF) which is explained in the "Menu" section. This data has the same format as the data explained in that section.
 
 
 
 
 
 
 
=== Section 5: Item data format ===
 
 
 
This contains the item data. Each item record is 27 bytes long.
 
 
 
{| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)" align="center"
 
! style="background:rgb(204,204,204); width=50px;" align="center" | Offset
 
! style="background:rgb(204,204,204); width=50px;" | Length
 
! style="background:rgb(204,204,204); width:350px;" colspan="2" | Description
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x00
 
|style="background:rgb(255,255,255);" | 8 bytes
 
|style="background:rgb(255,255,255); width: 110px;" | Unknown
 
|style="background:rgb(255,255,255);" | Always 0xFFFFFFFF
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x08
 
|style="background:rgb(255,255,204);" | 2 bytes
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x0A
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Restriction Mask
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="10" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0xFF
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in<br />Battle Menu (Not usable at all)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFE
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Not<br />usable at all)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFD
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in<br />Battle Menu (Usable in Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFC
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Usable<br /> in Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFB
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in<br />Battle Menu (Usable in Item Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFA
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Usable<br />in Item Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF9
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in<br />Battle Menu (Usable in Item Menu & Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF8
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Usable<br />in Item Menu & Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF7
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in<br />Battle Menu (Usable in Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF6
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Usable<br />in Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x0B
 
|style="background:rgb(255,255,255);" | 2 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Attack Target
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="5" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0x01
 
|style="background:rgb(255,255,255);" | One Target
 
|-
 
|style="background:rgb(255,255,204);" | 0x03
 
|style="background:rgb(255,255,204);" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" | 0x05
 
|style="background:rgb(255,255,255);" | Multiple Targets
 
|-
 
|style="background:rgb(255,255,204);" | 0x07
 
|style="background:rgb(255,255,204);" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" | 0x10
 
|style="background:rgb(255,255,255);" | On Party Only
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x0D
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Item ID
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x0E
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Restore Apply
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="10" | &nbsp;
 
|style="background:rgb(255,255,204);" | 0x00
 
|style="background:rgb(255,255,204);" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" | 0x08
 
|style="background:rgb(255,255,255);" | Apply also to MP
 
|-
 
|style="background:rgb(255,255,204);" | 0x22
 
|style="background:rgb(255,255,204);" | Unknown
 
|-
 
|style="background:rgb(255,255,204);" | 0x23
 
|style="background:rgb(255,255,204);" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" | 0x24
 
|style="background:rgb(255,255,255);" | Damage / Restore by %
 
|-
 
|style="background:rgb(255,255,255);" | 0x26
 
|style="background:rgb(255,255,255);" | Damage / Restore by 20 X Amount Multiplier
 
|-
 
|style="background:rgb(255,255,255);" | 0x37
 
|style="background:rgb(255,255,255);" | Causes Damage
 
|-
 
|style="background:rgb(255,255,204);" | 0x47
 
|style="background:rgb(255,255,204);" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" | 0x50
 
|style="background:rgb(255,255,255);" | Affects Stats
 
|-
 
|style="background:rgb(255,255,255);" | 0xFF
 
|style="background:rgb(255,255,255);" | None
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x0F
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Amount Multiplier
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x10
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Restore Type
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="4" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0x00
 
|style="background:rgb(255,255,255);" | Restore HP
 
|-
 
|style="background:rgb(255,255,255);" | 0x01
 
|style="background:rgb(255,255,255);" | Restore MP
 
|-
 
|style="background:rgb(255,255,255);" | 0x02
 
|style="background:rgb(255,255,255);" | Restore Ailment
 
|-
 
|style="background:rgb(255,255,255);" | 0xFF
 
|style="background:rgb(255,255,255);" | None
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x11
 
|style="background:rgb(255,255,204);" | 3 bytes
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x14
 
|style="background:rgb(255,255,255);" | 4 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Status effects
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x18
 
|style="background:rgb(255,255,255);" | 2 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Element
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x1A
 
|style="background:rgb(255,255,204);" | 2 bytes
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown
 
|}
 
 
 
=== Section 6: Weapon data format ===
 
 
 
This contains the weapon data. Each weapon attribute is 44 bytes long.
 
 
 
{| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)" align="center"
 
! style="background:rgb(204,204,204); width=50px;" align="center" | Offset
 
! style="background:rgb(204,204,204); width=50px;" | Length
 
! style="background:rgb(204,204,204); width:350px;" colspan="2" | Description
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x00
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Weapon Range
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="2" | &nbsp;
 
|style="background:rgb(255,255,255); width: 50px;" | 0x03
 
|style="background:rgb(255,255,255);" | Long Range
 
|-
 
|style="background:rgb(255,255,255);" | 0x23
 
|style="background:rgb(255,255,255);" | Normal Range
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x01
 
|style="background:rgb(255,255,204);" | 1 byte
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown [Always 0xFF]
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x02
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Special Options (Attack Modifiers)
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="10" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0x11
 
|style="background:rgb(255,255,255);" | Normal
 
|-
 
|style="background:rgb(255,255,255);" | 0xA0
 
|style="background:rgb(255,255,255);" | 1 + Number of Status Effects Tifa has out of following:
 
Near-death, Poison, Sadness, Silence, Slow, Darkness + 2<br /> * Number of Status Effects Tifa has out of following:<br />Death-sentence, Slow-numb
 
|-
 
|style="background:rgb(255,255,255);" | 0xA1
 
|style="background:rgb(255,255,255);" | Power up when near death
 
|-
 
|style="background:rgb(255,255,255);" | 0xA2
 
|style="background:rgb(255,255,255);" | 1 + Number of Allies in Death Status
 
|-
 
|style="background:rgb(255,255,255);" | 0xA3
 
|style="background:rgb(255,255,255);" | (Target's Level / 16) When used against allies, the weapon<br />will act like a physical hit, but will cause not damage (not<br />even a Miss or a 0). The Weapon has no Morph modifier;<br />it does the same damage with or without Morph.<br />(Conformer)
 
|-
 
|style="background:rgb(255,255,255);" | 0xA4
 
|style="background:rgb(255,255,255);" | (1 + [48 * Player's HP / Player's Max HP]) / 16
 
|-
 
|style="background:rgb(255,255,255);" | 0xA5
 
|style="background:rgb(255,255,255);" | (1 + [48 * Player's MP / Player's Max MP]) / 16
 
|-
 
|style="background:rgb(255,255,255);" | 0xA6
 
|style="background:rgb(255,255,255);" | (1 + [Total AP on Weapon / 10000]) / 16
 
|-
 
|style="background:rgb(255,255,255);" | 0xA7
 
|style="background:rgb(255,255,255);" | (10 + [Player's Kills / 128]) / 16
 
|-
 
|style="background:rgb(255,255,255);" | 0xA8
 
|style="background:rgb(255,255,255);" | (1 + [Player's Limit Level * Player's Limit Units / 16]) / 16
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x03
 
|style="background:rgb(255,255,204);" | 1 byte
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown [Always 0xFF]
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x04
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Weapon Attack
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x05
 
|style="background:rgb(255,255,204);" | 1 byte
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown [Always 0xFF]
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x06
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Materia growth rate
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x07
 
|style="background:rgb(255,255,204);" | 1 byte
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x08
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Weapon attack percentage
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x09
 
|style="background:rgb(255,255,255);" | 3 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Weapon Model ID
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x0C
 
|style="background:rgb(255,255,255);" | 2 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Unknown [Aways 0xFFFF]
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x0E
 
|style="background:rgb(255,255,255);" | 2 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Equip Mask
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="11" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0x0001
 
|style="background:rgb(255,255,255);" | Equipable on Cloud
 
|-
 
|style="background:rgb(255,255,255);" | 0x0002
 
|style="background:rgb(255,255,255);" | Equipable on Barret
 
|-
 
|style="background:rgb(255,255,255);" | 0x0004
 
|style="background:rgb(255,255,255);" | Equipable on Tifa
 
|-
 
|style="background:rgb(255,255,255);" | 0x0008
 
|style="background:rgb(255,255,255);" | Equipable on Aeris
 
|-
 
|style="background:rgb(255,255,255);" | 0x0010
 
|style="background:rgb(255,255,255);" | Equipable on Red XIII
 
|-
 
|style="background:rgb(255,255,255);" | 0x0020
 
|style="background:rgb(255,255,255);" | Equipable on Yuffie
 
|-
 
|style="background:rgb(255,255,255);" | 0x0040
 
|style="background:rgb(255,255,255);" | Equipable on Cait Sith
 
|-
 
|style="background:rgb(255,255,255);" | 0x0080
 
|style="background:rgb(255,255,255);" | Equipable on Vincent
 
|-
 
|style="background:rgb(255,255,255);" | 0x0100
 
|style="background:rgb(255,255,255);" | Equipable on Cid
 
|-
 
|style="background:rgb(255,255,255);" | 0x0200
 
|style="background:rgb(255,255,255);" | Equipable on Young Cloud
 
|-
 
|style="background:rgb(255,255,255);" | 0x0400
 
|style="background:rgb(255,255,255);" | Equipable on Sephiroth
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x10
 
|style="background:rgb(255,255,255);" | 2 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Attack Type
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="4" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0x0004
 
|style="background:rgb(255,255,255);" | Cut
 
|-
 
|style="background:rgb(255,255,255);" | 0x0008
 
|style="background:rgb(255,255,255);" | Hit
 
|-
 
|style="background:rgb(255,255,255);" | 0x0010
 
|style="background:rgb(255,255,255);" | Punch
 
|-
 
|style="background:rgb(255,255,255);" | 0x0020
 
|style="background:rgb(255,255,255);" | Hit
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x12
 
|style="background:rgb(255,255,204);" | 2 bytes
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown [Always 0xFFFF]
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x14
 
|style="background:rgb(255,255,255);" | 4 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Increase Stat Type
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="7" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0xFF
 
|style="background:rgb(255,255,255);" | None
 
|-
 
|style="background:rgb(255,255,255);" | 0x00
 
|style="background:rgb(255,255,255);" | Strength
 
|-
 
|style="background:rgb(255,255,255);" | 0x01
 
|style="background:rgb(255,255,255);" | Vitality
 
|-
 
|style="background:rgb(255,255,255);" | 0x02
 
|style="background:rgb(255,255,255);" | Magic
 
|-
 
|style="background:rgb(255,255,255);" | 0x03
 
|style="background:rgb(255,255,255);" | Spirit
 
|-
 
|style="background:rgb(255,255,255);" | 0x04
 
|style="background:rgb(255,255,255);" | Dexterity
 
|-
 
|style="background:rgb(255,255,255);" | 0x05
 
|style="background:rgb(255,255,255);" | Luck
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x18
 
|style="background:rgb(255,255,255);" | 4 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Stat Amount Increased (Based on IT)
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x1C
 
|style="background:rgb(255,255,255);" | 8 bytes
 
|style="background:rgb(255,255,255);" colspan="2" | Materia Slots
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="4" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0x00
 
|style="background:rgb(255,255,255);" | No Slot
 
|-
 
|style="background:rgb(255,255,255);" | 0x05
 
|style="background:rgb(255,255,255);" | Unlinked Slot
 
|-
 
|style="background:rgb(255,255,255);" | 0x06
 
|style="background:rgb(255,255,255);" | Left Linked Slot
 
|-
 
|style="background:rgb(255,255,255);" | 0x07
 
|style="background:rgb(255,255,255);" | Right Linked Slot
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x24
 
|style="background:rgb(255,255,204);" | 3 bytes
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x27
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Attack texture graphic
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x28
 
|style="background:rgb(255,255,204);" | 2 bytes
 
|style="background:rgb(255,255,204);" colspan="2" | [Always 0xFFFF]
 
|-
 
|style="background:rgb(255,255,255);" align="center" | 0x2A
 
|style="background:rgb(255,255,255);" | 1 byte
 
|style="background:rgb(255,255,255);" colspan="2" | Restriction Mask
 
|-
 
|style="background:rgb(204,204,255)" align="center" colspan="2" rowspan="10" | &nbsp;
 
|style="background:rgb(255,255,255);" | 0xFF
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in Battle Menu<br />(Not usable at all)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFE
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Not usable at all)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFD
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in Battle Menu <br />(Usable in Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFC
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Usable in Battle<br />Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFB
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in Battle Menu <br />(Usable in Item Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xFA
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Usable in Item <br />Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF9
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in Battle Menu <br />(Usable in Item Menu & Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF8
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item <br />Menu (Usable in Item Menu & Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF7
 
|style="background:rgb(255,255,255);" | Appears in Item Menu. Does not appear in Battle Menu <br />(Usable in Battle Menu)
 
|-
 
|style="background:rgb(255,255,255);" | 0xF6
 
|style="background:rgb(255,255,255);" | Appears in Battle Menu & Item Menu (Usable in Battle <br />Menu)
 
|-
 
|style="background:rgb(255,255,204);" align="center" | 0x2B
 
|style="background:rgb(255,255,204);" | 1 byte
 
|style="background:rgb(255,255,204);" colspan="2" | Unknown [Always 0xFF]
 
|}
 

Latest revision as of 05:19, 23 May 2019

Important Files

PSX Version PC Version
/INIT/KERNEL.BIN /DATA/KERNEL/KERNEL.BIN
/DATA/KERNEL/KERNEL2.BIN

The KERNEL.BIN Archive

The file KERNEL.BIN archive is in BIN-GZIP format. It consists of 27 gziped sections concatenated together with a 6 byte header for each. This file is the same both on the PC and PSX versions. This holds all the static data and menu text for the game, with a look up table at the beginning of the section. The first 9 sections of data (i.e. The non-text related items) are in typical BIN file archive format. Sections 10-27 are FF Text files. The text sections have a header of pointers at the beginning of each section and point to a text block below.

The KERNEL.BIN file consists of the following sections.

File Data Offset
1

Command data

0x0006
2

Attack data

0x0086
3

Battle and growth data

0x063A
4

Initialization data

0x0F7F
5

Item data

0x111B
6

Weapon data

0x137A
7

Armor data

0x1A30
8

Accessory data

0x1B73
9

Materia data

0x1C11
10 Command descriptions 0x1F32
11 Magic descriptions 0x2199
12 Item descriptions 0x28D4
13 Weapon descriptions 0x2EE2
14 Armor descriptions 0x307B
15 Accessory descriptions 0x315F
16 Materia descriptions 0x3384
17 Key Item descriptions 0x3838
18 Command Names 0x3BE2
19 Magic Names 0x3CCA
20 Item Names 0x4293
21 Weapon Names 0x4651
22 Armor Names 0x4B02
23 Accessory Names 0x4C4B
24 Materia Names 0x4D90
25 Key Item Names 0x5040
26 Battle and Battle-Screen Text 0x5217
27 Summon Attack Names 0x5692

The KERNEL2.BIN Archive

On the PC version there exists a secondary kernel archive called KERNEL2.BIN. This archive contains only sections 10-27 (Text data) of KERNEL.BIN. The data was ungzipped from the original archive, concatenated together, and then LZSed into a single archive with a 4 byte header giving the length of the file.

The maximum allotted storage space on the PC version for all un-LZSed data in the kernel2.bin is 27KB (27648 bytes). This means that the total size of the extracted files (text and pointers) must be less than this.