Difference between revisions of "FF7/Command data"

From Final Fantasy Inside
< FF7
Jump to navigation Jump to search
my_wiki>Halkun
m (Command data format)
m (18 revisions imported)
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
=== Command data format ===
+
== KERNEL.BIN - Section 1: Command data format ==
  
This contains the data for Menu commands. Each recored is 16 bytes long.
+
This section contains the data for Menu commands.<br />
  
<i>(Note:This is a stub, this information was lost when my hard drive died)
+
There are 32 entries of 8 bytes in the following format:
  
--[[User:Halkun|Halkun]] 21:18, 9 Mar 2005 (CST)</i>
+
{| class="wikitable"
 +
! 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" | 0x00
 +
| 1 byte
 +
| Initial Cursor Action*
 +
|-
 +
| style="background: rgb(255,255,255)" align="center" | 0x01
 +
| 1 byte
 +
|
 +
[[FF7/Battle/Targeting_Data|Target Flags]]
 +
|-
 +
| style="background: rgb(255,255,204)" align="center" | 0x02
 +
| style="background: rgb(255,255,204)" | 2 bytes
 +
| style="background: rgb(255,255,204)" | Unknown (Always [FFFFh])
 +
|-
 +
| style="background: rgb(255,255,255)" align="center" | 0x04
 +
| 2 bytes
 +
|
 +
[[FF7/Battle/Camera_Movement_Id_List|Camera Movement Id]] for single target.
 +
|-
 +
| style="background: rgb(255,255,255)" align="center" | 0x06
 +
| 2 bytes
 +
|
 +
[[FF7/Battle/Camera_Movement_Id_List|Camera Movement Id]] for multiple targets.
 +
|}
  
 +
<br /> *Initial Cursor Action: The different values will tell it what to do or what menu to bring up:
  
{| 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
+
! Value
! style="background:rgb(204,204,204); width:50px;" | Length
+
! Effect
! style="background:rgb(204,204,204); width:275px;" colspan="2" | Description
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 00h
|style="background:rgb(255,255,255)" | &nbsp;
+
| Perform command using target data
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 01h
|style="background:rgb(255,255,255)" | &nbsp;
+
| Magic Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 02h
|style="background:rgb(255,255,255)" | &nbsp;
+
| Summon Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 03h
|style="background:rgb(255,255,255)" | &nbsp;
+
| Item Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 04h
|style="background:rgb(255,255,255)" | &nbsp;
+
| E.Skill Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 05h
|style="background:rgb(255,255,255)" | &nbsp;
+
| Throw Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 06h
|style="background:rgb(255,255,255)" | &nbsp;
+
| Limit Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 07h
|style="background:rgb(255,255,255)" | &nbsp;
+
| Enable Target Selection via Cursor
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 08h
|style="background:rgb(255,255,255)" | &nbsp;
+
| W-Magic Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 09h
|style="background:rgb(255,255,255)" | &nbsp;
+
| W-Summon Menu
|style="background:rgb(255,255,255)" | &nbsp;
 
|style="background:rgb(255,255,255)" | &nbsp;
 
 
|-
 
|-
|style="background:rgb(255,255,255)" align="center" | &nbsp;
+
| 0Ah
|style="background:rgb(255,255,255)" | &nbsp;
+
| W-Item Menu
|style="background:rgb(255,255,255)" | &nbsp;
+
|-
|style="background:rgb(255,255,255)" | &nbsp;
+
| 0Bh
 +
| Coin Menu
 +
|}
 +
 
 +
The commands themselves are hard-coded into the Battle Engine and their actions cannot be changed via editing the KERNEL.BIN<br /> Example of what this means: If the summon command was changed to bring up the magic menu and Cure was selected, the battle engine would perform Choco/Mog summon instead. Why? Because The Battle Engine is expecting summon data from command 03h. While the target was considered based on the targeting information of Cure, which has the same magic index as Choco/Mog has summon index, the attack the Battle Engine selected to perform was Summon attack 00h which is Choco/Mog.

Latest revision as of 05:11, 23 May 2019

KERNEL.BIN - Section 1: Command data format

This section contains the data for Menu commands.

There are 32 entries of 8 bytes in the following format:

Offset Length Description
0x00 1 byte Initial Cursor Action*
0x01 1 byte

Target Flags

0x02 2 bytes Unknown (Always [FFFFh])
0x04 2 bytes

Camera Movement Id for single target.

0x06 2 bytes

Camera Movement Id for multiple targets.


*Initial Cursor Action: The different values will tell it what to do or what menu to bring up:

Value Effect
00h Perform command using target data
01h Magic Menu
02h Summon Menu
03h Item Menu
04h E.Skill Menu
05h Throw Menu
06h Limit Menu
07h Enable Target Selection via Cursor
08h W-Magic Menu
09h W-Summon Menu
0Ah W-Item Menu
0Bh Coin Menu

The commands themselves are hard-coded into the Battle Engine and their actions cannot be changed via editing the KERNEL.BIN
Example of what this means: If the summon command was changed to bring up the magic menu and Cure was selected, the battle engine would perform Choco/Mog summon instead. Why? Because The Battle Engine is expecting summon data from command 03h. While the target was considered based on the targeting information of Cure, which has the same magic index as Choco/Mog has summon index, the attack the Battle Engine selected to perform was Summon attack 00h which is Choco/Mog.