Changes

Jump to navigation Jump to search

FF7/Kernel/Kernel.bin

15,639 bytes removed, 05:19, 23 May 2019
m
49 revisions imported
== Important Files ==
<center>[[Image:Gears_img_5.png]]</center> == The KERNEL.BIN Archive == The file KERNEL.BIN archive is in [[FF7/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 [[FF7/FF Text|FF Text files]]. The KERNEL.BIN file consists of the following sections. {| border="0" cellspacing="1" cellpadding="3" style="backgroundborder: rgb(0,0,0)" align="center"! style="background1px solid black; border-collapse:rgb(204,204,204)" align="center" | File! style="collapse; background:rgb(204,2040,204)" | Data! style="background:rgb(204,204,204)" | Offset|-|style="background:rgb(255,255,2550)" alignborder="center" | 1|style="background:rgb(255,255,255)" | [[FF7/Command data|Command data]]|stylecellspacing="background:rgb(255,255,255)1" | 0x0006|-|stylecellpadding="background:rgb(255,255,255)3" align="center" | 2|style="background:rgb(255,255,255)" | [[FF7/Attack data|Attack data]]|style="background:rgb(255,255,255)" | 0x0086|-|style="background:rgb(255,255,255)" ! align="center" | 3PSX Version|style="background:rgb(255,255,255)" | [[FF7/Savemap|Savemap]]|style="background:rgb(255,255,255)" | 0x063A|-|style="background:rgb(255,255,255)" ! align="center" | 4|style="background:rgb(255,255,255)" | [[FF7/Character starting stats|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)" | [[FF7/Item data|Item data]]|style="background:rgb(255,255,255)" | 0x111BPC Version
|-
|style="background:rgb(255,255,255)" align="center" | 6/INIT/KERNEL.BIN|style="background:rgb(255,255,255)" | [[FF7/Weapon data|Weapon data]]|style="background:rgb(255,255,255)" | 0x137ADATA/KERNEL/KERNEL.BIN
|-
|style="background:rgb(255,255,255)" align="center" | 7|style="background:rgb(255,255,255)" | [[FF7/Armor data|Armor data]]|style="background:rgb(255,255,255)" | 0x1A30|-|style="background:rgb(255,255,255)" align="center" | 8|style="background:rgb(255,255,255)" | [[FF7DATA/Accessory data|Accessory data]]|style="background:rgb(255,255,255)" | 0x1B73|-|style="background:rgb(255,255,255)" align="center" | 9|style="background:rgb(255,255,255)" | [[FF7KERNEL/Materia data|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)" | 0x5692KERNEL2.BIN
|}
== 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.
  == KERNEL.BIN Section formats == 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.       === Section 4: Initialization data {| class=== This contains the starting stats for the characters and related game states. On "New Game", this data is copied directly into the [[FF&/Savemap|Savemap]] (from offset 0x0054 to 0x0BAF) which is explained in the "Menuwikitable" section. This data has the same format as the data explained in that section.! File! Data! Offset|-      === Section 9: Materia data format === This contains the Materia data. Each record is 20 bytes long.  {| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)" align="center"| 1! style="background:rgb(204,204,204); width=50px;" align="center" | Offset! style="background:rgb(204,204,204); width=50px;" [[FF7/Command_data| LengthCommand data]]! style="background:rgb(204,204,204); width:350px;" colspan="2" | Description0x0006
|-
|stylealign="background:rgb(255,255,255);center" | 0x002|style="background:rgb(255,255,255);" | 8 bytes[[FF7/Attack_data|style="background:rgb(255,255,255);width:150px;" | Level-up AP limitsAttack data]]|style="background:rgb(255,255,255);width:200px;" | Multiples of 100 (4x WORD)0x0086
|-
|stylealign="background:rgb(255,255,255);center" | 0x083|style="background:rgb(255,255,255);" | 1 byte[[FF7/Battle_and_growth_data|style="background:rgb(255,255,255);" | Equip EffectBattle and growth data]]|style="background:rgb(255,255,255);" | [See table below]0x063A
|-
|stylealign="background:rgb(255,255,255);center" | 0x094|style="background:rgb(255,255,255);" [[FF7/Character_starting_stats| 3 bytesInitialization data]]|style="background:rgb(255,255,255);" colspan="2" | Status Bitmask0x0F7F
|-
|stylealign="background:rgb(255,255,255);center" | 0x0C5|style="background:rgb(255,255,255);" [[FF7/Item_data| 1 byteItem data]]|style="background:rgb(255,255,255);" colspan="2" | Element0x111B
|-
|stylealign="background:rgb(255,255,255);center" | 0x0D6|style="background:rgb(255,255,255);" [[FF7/Weapon_data| 1 byteWeapon data]]|style="background:rgb(255,255,255);" colspan="2" | Materia Type0x137A
|-
|stylealign="background:rgb(204,204,255);" colspan="2" rowspan="15center" | &nbsp;7|style="background:rgb(255,255,255);" [[FF7/Armor_data| 0x00Armor data]]|style="background:rgb(255,255,255);" | Unknown0x1A30
|-
|stylealign="background:rgb(255,255,255);center" | 0x088|style="background:rgb(255,255,255);" [[FF7/Accessory_data|Accessory data]]| Master Command: All commands are available 0x1B73
|-
|stylealign="background:rgb(255,255,255);center" | 0x0A9|style="background:rgb(255,255,255);" [[FF7/Materia_data|Materia data]]| Master Magic: All spells are available 0x1C11
|-
|stylealign="background:rgb(255,255,255);center" | 0x0C10|style="background:rgb(255,255,255);" Command descriptions| Master Summon: All summons are available0x1F32
|-
|stylealign="background:rgb(255,255,255);center" | 0x1211|style="background:rgb(255,255,255);" Magic descriptions| Command: Command at offset 0x0E to 0x12 is <br />available, depending on AP level0x2199
|-
|stylealign="background:rgb(255,255,255);center" | 0x1612|style="background:rgb(255,255,255);" Item descriptions| Command: Commands at offset 0x0E to 0x12 <br />become available as you level up0x28D4
|-
|stylealign="background:rgb(255,255,255);center" | 0x1913|style="background:rgb(255,255,255);" Weapon descriptions| Magic: Spells 0x0E to 0x11 become available<br />as you level up0x2EE2
|-
|stylealign="background:rgb(255,255,255);center" | 0x2014|style="background:rgb(255,255,255);" Armor descriptions| Booster%: 0x0E is boosted by offset 0x0F to <br />0x13 depending on AP level 0x307B
|-
|stylealign="background:rgb(255,255,255);center" | 0x2115|style="background:rgb(255,255,255);" Accessory descriptions| Unknown0x315F
|-
|stylealign="background:rgb(255,255,255);center" | 0x2516|style="background:rgb(255,255,255);" Materia descriptions| Unknown0x3384
|-
|stylealign="background:rgb(255,255,255);center" | 0x3017|style="background:rgb(255,255,255);" Key Item descriptions| Unknown0x3838
|-
|stylealign="background:rgb(255,255,255);center" | 0x3318|style="background:rgb(255,255,255);" Command Names| W-Command: Command at 0x0E is added to <br />the battle menu 0x3BE2
|-
|stylealign="background:rgb(255,255,255);center" | 0x3519|style="background:rgb(255,255,255);" Magic Names| Unknown0x3CCA
|-
|stylealign="background:rgb(255,255,255);center" | 0x3B20|style="background:rgb(255,255,255);" Item Names| Summon: Summon: Spell at 0x0E can be used from<br />offset 0x0F to 0x13 times depending on AP level 0x4293
|-
|stylealign="background:rgb(255,255,255);center" | 0x5721|style="background:rgb(255,255,255);" Weapon Names| Enemy Skill: Enables command 'Enemy Skill'0x4651
|-
|stylealign="background:rgb(255,255,255);center" | 0x0E22|style="background:rgb(255,255,255);" | 1 byte|style="background:rgb(255,255,255);" | Materia attributesArmor Names|style="background:rgb(255,255,255);" | [See Above] 0x4B02
|-
|stylealign="background:rgb(255,255,255);center" | 0x0F23|style="background:rgb(255,255,255);" | 1 byte|style="background:rgb(255,255,255);" | Materia attributesAccessory Names|style="background:rgb(255,255,255);" | [See Above] 0x4C4B
|-
|stylealign="background:rgb(255,255,255);center" | 0x1024|style="background:rgb(255,255,255);" | 1 byte|style="background:rgb(255,255,255);" | Materia attributesNames|style="background:rgb(255,255,255);" | [See Above] 0x4D90
|-
|stylealign="background:rgb(255,255,255);center" | 0x1125|style="background:rgb(255,255,255);" | 1 byte|style="background:rgb(255,255,255);" | Materia attributesKey Item Names|style="background:rgb(255,255,255);" | [See Above] 0x5040
|-
|stylealign="background:rgb(255,255,255);center" | 0x1226|style="background:rgb(255,255,255);" | 1 byte|style="background:rgb(255,255,255);" | Materia attributesBattle and Battle-Screen Text|style="background:rgb(255,255,255);" | [See Above] 0x5217
|-
|stylealign="background:rgb(255,255,255);center" | 0x1327|style="background:rgb(255,255,255);" | 1 byte|style="background:rgb(255,255,255);" | Materia attributesSummon Attack Names|style="background:rgb(255,255,255);" | [See Above] 0x5692
|}
== The KERNEL2.BIN Archive == Equip Effects ==== {| border="0" cellpadding="5" cellspacing="1" style="background: rgb(0,0,0)" align="center"! style="background:rgb(204,204,204);" align="center" | Byte! style="background:rgb(204,204,204);" align="center" | STR! style="background:rgb(204,204,204);" align="center" | VIT! style="background:rgb(204,204,204);" align="center" | MAG! style="background:rgb(204,204,204);" align="center" | MDEF! style="background:rgb(204,204,204);" align="center" | MAXHP! style="background:rgb(204,204,204);" align="center" | MAXMP! style="background:rgb(204,204,204);" align="center" | LUCK! style="background:rgb(204,204,204);" align="center" | DEX|-! style="background:rgb(204,204,204);" align="center" | 0x00|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x01|style="background:rgb(255,255,255);" align="center" | -02|style="background:rgb(255,255,255);" align="center" | -01|style="background:rgb(255,255,255);" align="center" | +02|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | -05%|style="background:rgb(255,255,255);" align="center" | +05%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x02|style="background:rgb(255,255,255);" align="center" | -04|style="background:rgb(255,255,255);" align="center" | -04|style="background:rgb(255,255,255);" align="center" | +04|style="background:rgb(255,255,255);" align="center" | +02|style="background:rgb(255,255,255);" align="center" | -10%|style="background:rgb(255,255,255);" align="center" | +10%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x06|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x07|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x08|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x0A|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +02|-! style="background:rgb(204,204,204);" align="center" | 0x0B|style="background:rgb(255,255,255);" align="center" | -01|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | -02%|style="background:rgb(255,255,255);" align="center" | +02%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x0C|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | -02%|style="background:rgb(255,255,255);" align="center" | +02%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x0D|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | +01|style="background:rgb(255,255,255);" align="center" | -05%|style="background:rgb(255,255,255);" align="center" | +05%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x0E|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +02|style="background:rgb(255,255,255);" align="center" | +02|style="background:rgb(255,255,255);" align="center" | -10%|style="background:rgb(255,255,255);" align="center" | +10%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x0F|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +04|style="background:rgb(255,255,255);" align="center" | +04|style="background:rgb(255,255,255);" align="center" | -10%|style="background:rgb(255,255,255);" align="center" | +15%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|-! style="background:rgb(204,204,204);" align="center" | 0x10|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | +08|style="background:rgb(255,255,255);" align="center" | +08|style="background:rgb(255,255,255);" align="center" | -10%|style="background:rgb(255,255,255);" align="center" | +20%|style="background:rgb(255,255,255);" align="center" | &nbsp;|style="background:rgb(255,255,255);" align="center" | &nbsp;|}
== The On the PC version there exists a secondary kernel archive called KERNEL2.BIN Archive ==. 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.
On The maximum allotted storage space on the PC version there exists a secondary kernel archive called KERNEL2.BINfor all un-LZSed data in the kernel2. This archive contains only sections 10-27 bin is 27KB (Text data27648 bytes) of KERNEL.BIN. The data was ungzipped from This means that the original archive, concatenated together, and then LZSed into a single archive with a 4 byte header giving the length total size of the file. See the section on BIN types extracted files (text and LZS compression later in pointers) must be less than this document for more information.

Navigation menu