FF7/Kernel/Kernel.bin

From Final Fantasy Inside
< FF7‎ | Kernel
Revision as of 01:40, 9 March 2005 by my_wiki>Synergy Blades (KERNEL.BIN Section formats)

The KERNEL.BIN Archive.

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 file consists of the following sections.

File Data Offset
1 Command data 0x0006
2 Attack data 0x0086
3 Unknown (Savemap?) 0x063A
4 Character starting stats 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 0x2119
12 Item Descriptions 0x28D4
13 Weapon Descriptions 0x2EE2
14 Armor Descriptions 0x307B
15 Accessory Descriptions 0x315F
16 Materia Descriptions 0x3384
17 Key Item Description 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

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 1: Command data format

This contains the data for Menu commands. Each recored is 16 bytes long.


Offset Length Description

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Section 2: Attack data format

This contains the data for the different attacks. Each record is 28 bytes long.


Offset Length Description

0x00

4 bytes

Unknown

0x04

1 bytes

Casting cost

0x05

5 bytes

Unknown

0x0A

1 bytes

Attack type

0x0B

2 bytes

Attack attribute

 

0x0000

Escape/Exit-Type

0x0001

Ribbon-Like

0x0003

Enemy Skill (?)

0x0005

Enemy Skill (?)

0x0007

Enemy Skill (?)

0x000D

Restorative/Protective

0x000F

Status-giving/Elemental

0x0011

Shield

0x0013

Limit Break

0x0015

Cait Sith Limit Break

0x0017

Summon

0x00C7

Roulette

0x0097

Multiple Strike Limit Breaks

0xFF01

Phoenix Down

0xFF03

X-needles attack

0xFF17

Final Limit Break

0x0D

1 byte

ID Number

0x0E

1 byte

Restore Apply

0x0F

1 byte

Strength

0x10

1 byte

Restore type

 

0x00

Restore HP

0x01

Restore MP

0x02

Restore Ailment

0xFF

None

0x11

2 bytes

Unknown

0x13

1 byte

Times attacking

0x14

4 bytes

Status

0x18

2 bytes

Element

0x20

2 bytes

Unknown

Section 3: Savemap

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. This format is explained in the "Menu" Section.

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 save map (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.


Offset Length Description

0x00

8 bytes

Unknown

Always 0xFFFFFFFF

0x08

2 bytes

Unknown

0x0A

1 byte

Restriction Mask

 

0xFF

Appears in Item Menu. Does not appear in
Battle Menu (Not usable at all)

0xFE

Appears in Battle Menu & Item Menu (Not
usable at all)

0xFD

Appears in Item Menu. Does not appear in
Battle Menu (Usable in Battle Menu)

0xFC

Appears in Battle Menu & Item Menu (Usable
in Battle Menu)

0xFB

Appears in Item Menu. Does not appear in
Battle Menu (Usable in Item Menu)

0xFA

Appears in Battle Menu & Item Menu (Usable
in Item Menu)

0xF9

Appears in Item Menu. Does not appear in
Battle Menu (Usable in Item Menu & Battle Menu)

0xF8

Appears in Battle Menu & Item Menu (Usable
in Item Menu & Battle Menu)

0xF7

Appears in Item Menu. Does not appear in
Battle Menu (Usable in Battle Menu)

0xF6

Appears in Battle Menu & Item Menu (Usable
in Battle Menu)

0x0B

2 bytes

Attack Target

 

0x01

One Target

0x03

Unknown

0x05

Multiple Targets

0x07

Unknown

0x10

On Party Only

0x0D

1 byte

Item ID

0x0E

1 byte

Restore Apply

 

0x00

Unknown

0x08

Apply also to MP

0x22

Unknown

0x23

Unknown

0x24

Damage / Restore by %

0x26

Damage / Restore by 20 X Amount Multiplier

0x37

Causes Damage

0x47

Unknown

0x50

Affects Stats

0xFF

None

0x0F

1 byte

Amount Multiplier

0x10

1 byte

Restore Type

 

0x00

Restore HP

0x01

Restore MP

0x02

Restore Ailment

0xFF

None

0x11

3 bytes

Unknown

0x14

4 bytes

Status effects

0x18

2 bytes

Element

0x1A

2 bytes

Unknown