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

From Final Fantasy Inside
< FF7‎ | Kernel
Jump to navigation Jump to search
my_wiki>Halkun
m (49 revisions imported)
 
(46 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Image:Gears_img_5.png]]
+
==  Important Files  ==
  
== The KERNEL.BIN Archive. ==
+
{| 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
 +
! align="center" | PC Version
 +
|-
 +
| /INIT/KERNEL.BIN
 +
| /DATA/KERNEL/KERNEL.BIN
 +
|-
 +
|
 +
| /DATA/KERNEL/KERNEL2.BIN
 +
|}
  
The file /INIT/KERNEL.BIN is in BIN-GZIP format. This format is explained later in this document. 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 files.
+
==  The KERNEL.BIN Archive  ==
 +
 
 +
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 KERNEL.BIN file consists of the following sections.
 
The KERNEL.BIN file consists of the following sections.
  
<table CELLSPACING="0" style="margin-bottom: 53px;">
+
{| class="wikitable"
<tr>
+
! File
<th style="border: 1px solid rgb(0, 0, 0); text-align: center; vertical-align: middle; width: 37px; height: 26px; background-color: rgb(204, 204, 204);">
+
! Data
File</th>
+
! Offset
<th style="border: 1px solid rgb(0, 0, 0); vertical-align: middle; width: 199px; height: 26px; background-color: rgb(204, 204, 204);">
+
|-
Data</th>
+
| align="center" | 1
<th style="border: 1px solid rgb(0, 0, 0); vertical-align: middle; width: 66px; height: 26px; background-color: rgb(204, 204, 204);">
+
|
Offset</th>
+
[[FF7/Command_data|Command data]]
</tr>
+
| 0x0006
 
+
|-
<tr>
+
| align="center" | 2
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
|
1</td>
+
[[FF7/Attack_data|Attack data]]
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| 0x0086
Command data</td>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
| align="center" | 3
0x0006</td>
+
|
</tr>
+
[[FF7/Battle_and_growth_data|Battle and growth data]]
 
+
| 0x063A
<tr>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| align="center" | 4
2</td>
+
|
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
[[FF7/Character_starting_stats|Initialization data]]
Attack data</td>
+
| 0x0F7F
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
|-
0x0086</td>
+
| align="center" | 5
</tr>
+
|
 
+
[[FF7/Item_data|Item data]]
<tr>
+
| 0x111B
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px; background-color: rgb(255, 255, 204);">
+
|-
3</td>
+
| align="center" | 6
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px; background-color: rgb(255, 255, 204);">
+
|
Unknown (Savemap?)</td>
+
[[FF7/Weapon_data|Weapon data]]
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px; background-color: rgb(255, 255, 204);">
+
| 0x137A
0x063A</td>
+
|-
</tr>
+
| align="center" | 7
 
+
|
<tr>
+
[[FF7/Armor_data|Armor data]]
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| 0x1A30
4</td>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| align="center" | 8
Character starting stats</td>
+
|
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
[[FF7/Accessory_data|Accessory data]]
0x0F7F</td>
+
| 0x1B73
</tr>
+
|-
 
+
| align="center" | 9
<tr>
+
|
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
[[FF7/Materia_data|Materia data]]
5</td>
+
| 0x1C11
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
|-
Item data</td>
+
| align="center" | 10
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
| Command descriptions
0x111B</td>
+
| 0x1F32
</tr>
+
|-
 
+
| align="center" | 11
<tr>
+
| Magic descriptions
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| 0x2199
6</td>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| align="center" | 12
Weapon data</td>
+
| Item descriptions
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
| 0x28D4
0x137A</td>
+
|-
</tr>
+
| align="center" | 13
 
+
| Weapon descriptions
<tr>
+
| 0x2EE2
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
|-
7</td>
+
| align="center" | 14
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| Armor descriptions
Armor data</td>
+
| 0x307B
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
|-
0x1A30</td>
+
| align="center" | 15
</tr>
+
| Accessory descriptions
 
+
| 0x315F
<tr>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| align="center" | 16
8</td>
+
| Materia descriptions
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| 0x3384
Accessory data</td>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
| align="center" | 17
0x1B73</td>
+
| Key Item descriptions
</tr>
+
| 0x3838
 
+
|-
<tr>
+
| align="center" | 18
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| Command Names
9</td>
+
| 0x3BE2
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
|-
Materia data</td>
+
| align="center" | 19
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
| Magic Names
0x1C11</td>
+
| 0x3CCA
</tr>
+
|-
 
+
| align="center" | 20
<tr>
+
| Item Names
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| 0x4293
10</td>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| align="center" | 21
Command Descriptions</td>
+
| Weapon Names
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
| 0x4651
0x1F32</td>
+
|-
</tr>
+
| align="center" | 22
 
+
| Armor Names
<tr>
+
| 0x4B02
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
|-
11</td>
+
| align="center" | 23
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| Accessory Names
Magic Descriptions</td>
+
| 0x4C4B
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
|-
0x2119</td>
+
| align="center" | 24
</tr>
+
| Materia Names
 
+
| 0x4D90
<tr>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| align="center" | 25
12</td>
+
| Key Item Names
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
| 0x5040
Item Descriptions</td>
+
|-
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
+
| align="center" | 26
0x28D4</td>
+
| Battle and Battle-Screen Text
</tr>
+
| 0x5217
 
+
|-
<tr>
+
| align="center" | 27
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
+
| Summon Attack Names
13</td>
+
| 0x5692
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
+
|}
Weapon Descriptions</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x2EE2</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
14</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Armor Descriptions</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x307B</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
15</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Accessory Descriptions</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x315F</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
16</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Materia Descriptions</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x3384</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
17</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Key Item Description</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x3838</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
18</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Command Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x3BE2</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
19</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Magic Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x3CCA</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
20</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Item Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x4293</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
21</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Weapon Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x4651</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
22</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Armor Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x4B02</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
23</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Accessory Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x4C4B</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
24</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Materia Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x4D90</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
25</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Key Item Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x5040</td>
 
</tr>
 
 
 
<tr>
 
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
26</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Battle and Battle-Screen Text</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x5217</td>
 
</tr>
 
  
<tr>
+
== The KERNEL2.BIN Archive  ==
<td style="border: 1px solid rgb(0, 0, 0); text-align: center; width: 37px; height: 25px;">
 
27</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 199px; height: 25px;">
 
Summon Attack Names</td>
 
<td style="border: 1px solid rgb(0, 0, 0); width: 66px; height: 25px;">
 
0x5692</td>
 
</tr>
 
</table>
 
  
== KERNEL.BIN Section formats ==
+
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 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 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.

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.