Difference between revisions of "FF9/File/0x0A"

From Final Fantasy Inside
< FF9
Jump to navigation Jump to search
my_wiki>Zidane
my_wiki>Zidane
Line 118: Line 118:
 
|-
 
|-
 
! style="background:rgb(204,204,204);" | Size
 
! style="background:rgb(204,204,204);" | Size
! style="background:rgb(249,203,81);" align="center" | 1 byte
+
! style="background:rgb(249,203,81);" | 1 byte
! style="background:rgb(249,203,81);" align="center" | 3 byte
+
! style="background:rgb(249,203,81);" | 3 byte
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);" | ??????
! style="background:rgb(255,255,255);" align="center" | 2 bytes
+
! style="background:rgb(255,255,255);" | 2 bytes
! style="background:rgb(255,255,255);" align="center" | 2 bytes
+
! style="background:rgb(255,255,255);" | 2 bytes
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);" | ??????
! style="background:rgb(255,255,255);" align="center" | 2 bytes
+
! style="background:rgb(255,255,255);" | 2 bytes
! style="background:rgb(255,255,255);" align="center" | 2 bytes
+
! style="background:rgb(255,255,255);" | 2 bytes
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);"| ??????
! style="background:rgb(255,255,255);" align="center" | 2 bytes
+
! style="background:rgb(255,255,255);" | 2 bytes
! style="background:rgb(255,255,255);" align="center" | 2 bytes
+
! style="background:rgb(255,255,255);" | 2 bytes
! style="background:rgb(255,255,255);" align="center" | 4 Bytes
+
! style="background:rgb(255,255,255);"| 4 Bytes
! style="background:rgb(255,255,255);" align="center" | 4 Bytes
+
! style="background:rgb(255,255,255);" | 4 Bytes
! style="background:rgb(255,255,255);" align="center" | 4 Bytes
+
! style="background:rgb(255,255,255);" | 4 Bytes
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);" | ??????
 
|-
 
|-
 
! style="background:rgb(204,204,204);" | Size
 
! style="background:rgb(204,204,204);" | Size
! style="background:rgb(249,203,81);" align="center" | ??? TYPE ???
+
! style="background:rgb(249,203,81);"| ??? TYPE ???
! style="background:rgb(249,203,81);" align="center" | Plane distance ????
+
! style="background:rgb(249,203,81);"| Plane distance ????
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);"| ??????
! style="background:rgb(255,255,255);" align="center" | Value for position calculating [3*]
+
! style="background:rgb(255,255,255);"| Value for position calculating [3*]
! style="background:rgb(255,255,255);" align="center" | Value for position calculating [4*]
+
! style="background:rgb(255,255,255);" | Value for position calculating [4*]
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);" | ??????
! style="background:rgb(255,255,255);" align="center" | it`s not value, just Var. Value = [1*]+[3*]
+
! style="background:rgb(255,255,255);" | it`s not value, just Var. Value = [1*]+[3*]
! style="background:rgb(255,255,255);" align="center" | it`s not value, just Var. Value = [2*]+[4*]
+
! style="background:rgb(255,255,255);" | it`s not value, just Var. Value = [2*]+[4*]
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);" | ??????
! style="background:rgb(255,255,255);" align="center" | TileSet ID (for camera settings record)
+
! style="background:rgb(255,255,255);" | TileSet ID (for camera settings record)
! style="background:rgb(255,255,255);" align="center" | Tiles count
+
! style="background:rgb(255,255,255);" | Tiles count
! style="background:rgb(255,255,255);" align="center" | Pointer to 4 bytes values (for each tile)
+
! style="background:rgb(255,255,255);" | Pointer to 4 bytes values (for each tile)
! style="background:rgb(255,255,255);" align="center" | Pointer to 8 bytes values (for each tile)
+
! style="background:rgb(255,255,255);"| Pointer to 8 bytes values (for each tile)
! style="background:rgb(255,255,255);" align="center" | Var, address in memory to created packet.[For PSX drawning loop].
+
! style="background:rgb(255,255,255);"| Var, address in memory to created packet.[For PSX drawning loop].
! style="background:rgb(249,203,81);" align="center" | ??????
+
! style="background:rgb(249,203,81);" | ??????
 
|}
 
|}
  
Line 161: Line 161:
 
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
 
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
 
! style="background:rgb(204,204,204);" | Offset
 
! style="background:rgb(204,204,204);" | Offset
! style="background:rgb(255,255,255);" align="center" | 0x00-0x0B bits
+
! style="background:rgb(249,203,81);" align="center" | 0x00-0x0B bits
 
! style="background:rgb(255,255,255);" align="center" | 0x0C-0x15 bits
 
! style="background:rgb(255,255,255);" align="center" | 0x0C-0x15 bits
 
! style="background:rgb(255,255,255);" align="center" | 0x16-0x1f bits
 
! style="background:rgb(255,255,255);" align="center" | 0x16-0x1f bits
 
|-
 
|-
 
| style="background:rgb(204,204,204);" | Size
 
| style="background:rgb(204,204,204);" | Size
| style="background:rgb(255,255,255);" | 12 bits
+
| style="background:rgb(249,203,81);" | 12 bits
 
| style="background:rgb(255,255,255);" | 10 bits
 
| style="background:rgb(255,255,255);" | 10 bits
 
| style="background:rgb(255,255,255);" | 10 bits
 
| style="background:rgb(255,255,255);" | 10 bits
Line 189: Line 189:
 
! style="background:rgb(255,255,255);" align="center" | 0x18-0x1F bits
 
! style="background:rgb(255,255,255);" align="center" | 0x18-0x1F bits
 
! style="background:rgb(255,255,255);" align="center" | 0x20-0x27 bits
 
! style="background:rgb(255,255,255);" align="center" | 0x20-0x27 bits
! style="background:rgb(255,255,255);" align="center" | 0x28-0x3B bits
+
! style="background:rgb(249,203,81);" align="center" | 0x28-0x3B bits
 
! style="background:rgb(255,255,255);" align="center" | 0x3C bit
 
! style="background:rgb(255,255,255);" align="center" | 0x3C bit
! style="background:rgb(255,255,255);" align="center" | 0x3D-0x3F bits
+
! style="background:rgb(249,203,81);" align="center" | 0x3D-0x3F bits
 
|-
 
|-
 
| style="background:rgb(204,204,204);" | Size
 
| style="background:rgb(204,204,204);" | Size
Line 202: Line 202:
 
| style="background:rgb(255,255,255);" | 8 bits
 
| style="background:rgb(255,255,255);" | 8 bits
 
| style="background:rgb(255,255,255);" | 8 bits
 
| style="background:rgb(255,255,255);" | 8 bits
| style="background:rgb(255,255,255);" | 20 bits
+
| style="background:rgb(249,203,81);" | 20 bits
 
| style="background:rgb(255,255,255);" | 1 bit
 
| style="background:rgb(255,255,255);" | 1 bit
| style="background:rgb(255,255,255);" | 3 bits
+
| style="background:rgb(249,203,81);" | 3 bits
 
|-
 
|-
 
| style="background:rgb(204,204,204);" | Description
 
| style="background:rgb(204,204,204);" | Description
Line 215: Line 215:
 
| style="background:rgb(255,255,255);" | v
 
| style="background:rgb(255,255,255);" | v
 
| style="background:rgb(255,255,255);" | u
 
| style="background:rgb(255,255,255);" | u
| style="background:rgb(255,255,255);" | ??????
+
| style="background:rgb(249,203,81);" | ??????
 
| style="background:rgb(255,255,255);" | Packet type (0: 0x7C, 1: 0x7E)
 
| style="background:rgb(255,255,255);" | Packet type (0: 0x7C, 1: 0x7E)
| style="background:rgb(255,255,255);" | ??????
+
| style="background:rgb(249,203,81);" | ??????
 
|}
 
|}
  
Line 242: Line 242:
 
! style="background:rgb(255,255,255);" align="center" | 0x0A
 
! style="background:rgb(255,255,255);" align="center" | 0x0A
 
! style="background:rgb(255,255,255);" align="center" | 0x0C
 
! style="background:rgb(255,255,255);" align="center" | 0x0C
 +
! style="background:rgb(255,255,255);" align="center" | 0x0E
 
! style="background:rgb(255,255,255);" align="center" | 0x10
 
! style="background:rgb(255,255,255);" align="center" | 0x10
 +
! style="background:rgb(255,255,255);" align="center" | 0x12
 
! style="background:rgb(255,255,255);" align="center" | 0x14
 
! style="background:rgb(255,255,255);" align="center" | 0x14
 
! style="background:rgb(255,255,255);" align="center" | 0x18
 
! style="background:rgb(255,255,255);" align="center" | 0x18
! style="background:rgb(249,203,81);" align="center" | 0x1C-0x2f
+
! style="background:rgb(255,255,255);" align="center" | 0x1C
 +
! style="background:rgb(249,203,81);" align="center" | 0x20-0x27
 +
! style="background:rgb(255,255,255);" align="center" | 0x28
 +
! style="background:rgb(255,255,255);" align="center" | 0x2A
 +
! style="background:rgb(255,255,255);" align="center" | 0x2C
 +
! style="background:rgb(255,255,255);" align="center" | 0x2E
 
! style="background:rgb(255,255,255);" align="center" | 0x30
 
! style="background:rgb(255,255,255);" align="center" | 0x30
 
! style="background:rgb(255,255,255);" align="center" | 0x32
 
! style="background:rgb(255,255,255);" align="center" | 0x32
Line 251: Line 258:
 
| style="background:rgb(204,204,204);" | Size
 
| style="background:rgb(204,204,204);" | Size
 
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
| style="background:rgb(249,203,81);" | 2 bytes
+
| style="background:rgb(255,255,255);" | 2 bytes
 +
| style="background:rgb(255,255,255);" | 2 bytes
 +
| style="background:rgb(255,255,255);" | 2 bytes
 +
| style="background:rgb(255,255,255);" | 2 bytes
 +
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
Line 259: Line 270:
 
| style="background:rgb(255,255,255);" | 4 bytes
 
| style="background:rgb(255,255,255);" | 4 bytes
 
| style="background:rgb(255,255,255);" | 4 bytes
 
| style="background:rgb(255,255,255);" | 4 bytes
| style="background:rgb(255,255,255);" | 4 bytes
+
| style="background:rgb(249,203,81);" | ??????
| style="background:rgb(249,203,81);" | ??? bytes
+
| style="background:rgb(255,255,255);" | 2 bytes
 +
| style="background:rgb(255,255,255);" | 2 bytes
 +
| style="background:rgb(255,255,255);" | 2 bytes
 +
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
 
| style="background:rgb(255,255,255);" | 2 bytes
 
|-
 
|-
 
| style="background:rgb(204,204,204);" | Description
 
| style="background:rgb(204,204,204);" | Description
| style="background:rgb(255,255,255);" | File Size
+
| style="background:rgb(255,255,255);" | H    Projection plane distance
 +
| style="background:rgb(255,255,255);" | R11
 +
| style="background:rgb(255,255,255);" | R12
 +
| style="background:rgb(255,255,255);" | R13
 +
| style="background:rgb(255,255,255);" | R21
 +
| style="background:rgb(255,255,255);" | R22
 +
| style="background:rgb(255,255,255);" | R23
 +
| style="background:rgb(255,255,255);" | R31
 +
| style="background:rgb(255,255,255);" | R32
 +
| style="background:rgb(255,255,255);" | R33
 +
| style="background:rgb(255,255,255);" | TRX
 +
| style="background:rgb(255,255,255);" | TRY
 +
| style="background:rgb(255,255,255);" | TRZ
 +
| style="background:rgb(249,203,81);" | ??????
 +
| style="background:rgb(249,203,81);" | ??????
 +
| style="background:rgb(249,203,81);" | ??????
 +
| style="background:rgb(249,203,81);" | ??????
 +
| style="background:rgb(249,203,81);" | ??????
 
| style="background:rgb(249,203,81);" | ??????
 
| style="background:rgb(249,203,81);" | ??????
| style="background:rgb(255,255,255);" | count of animation records
 
| style="background:rgb(255,255,255);" | count of tiles blocks
 
| style="background:rgb(249,203,81);" | count of ??????
 
| style="background:rgb(255,255,255);" | count of camera settings
 
| style="background:rgb(255,255,255);" | pointer to animation records
 
| style="background:rgb(255,255,255);" | pointer to tiles blocks
 
| style="background:rgb(249,203,81);" | pointer to ??????
 
| style="background:rgb(255,255,255);" | pointer to camera settings
 
 
| style="background:rgb(249,203,81);" | ??????
 
| style="background:rgb(249,203,81);" | ??????
| style="background:rgb(255,255,255);" | Number used for calculating position of blocks [1*]
 
| style="background:rgb(255,255,255);" | Number used for calculating position of blocks [2*]
 
 
|}
 
|}

Revision as of 12:54, 5 December 2008

Fields tiles header

Header size is 0x34 bytes

Offset 0x00 0x02 0x04 0x06 0x08 0x0A 0x0C 0x10 0x14 0x18 0x1C-0x2f 0x30 0x32
Size 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 4 bytes 4 bytes 4 bytes 4 bytes ??? bytes 2 bytes 2 bytes
Description File Size ?????? count of animation records count of tiles blocks count of ?????? count of camera settings pointer to animation records pointer to tiles blocks pointer to ?????? pointer to camera settings ?????? Number used for calculating position of blocks [1*] Number used for calculating position of blocks [2*]


Animation records

At this place defined animated sequences.

Each record size is 0x10 bytes.

Each record contain frames count information and pointer to sequences.


Structure:

Offset 0x00 0x01 0x02-0x0B 0x0C
Size 1 byte 1 byte ??? bytes 4 bytes
Description ??? Type ??? Frames Count ?????? Pointer to sequences


Sequences is the id`s of tiles blocks. Sequences consists of that records, count = frames count of this sequence.


One record Staructure:

1 byte 1 byte
Block ID ???Type???


Tile Blocks

In tile blocks records storage information about number of tiles, offset`s of block, and other. Many information are unknown.

Knowed structure:

Offset 0x00 0x01 0x04-0x0B 0x0C 0x0E 0x10-0x17 0x18 0x1A 0x1C-0x23 0x24 0x26 0x28 0x2C 0x30 0x34-0x38
Size 1 byte 3 byte ?????? 2 bytes 2 bytes ?????? 2 bytes 2 bytes ?????? 2 bytes 2 bytes 4 Bytes 4 Bytes 4 Bytes ??????
Size ??? TYPE ??? Plane distance ???? ?????? Value for position calculating [3*] Value for position calculating [4*] ?????? it`s not value, just Var. Value = [1*]+[3*] it`s not value, just Var. Value = [2*]+[4*] ?????? TileSet ID (for camera settings record) Tiles count Pointer to 4 bytes values (for each tile) Pointer to 8 bytes values (for each tile) Var, address in memory to created packet.[For PSX drawning loop]. ??????


One file can contain more than one field, for separating blocks used TileSet ID. And for each field exists camera settings.

When gane engine drawning block, he reading tiles count, and reads information needed for creating packets for GPU from 4 bytes and 8 bytes values.

4 bytes values:

Offset 0x00-0x0B bits 0x0C-0x15 bits 0x16-0x1f bits
Size 12 bits 10 bits 10 bits
Description Not used, or zero ???? local coordinate Y [for drawning], from block position local coordinate X [for drawning], from block position


8 bytes values:

Offset 0x00-0x08 bits 0x09-0x0E bits 0x0F bit 0x10-0x13 bits 0x14-0x15 bits 0x16-0x17 bits 0x18-0x1F bits 0x20-0x27 bits 0x28-0x3B bits 0x3C bit 0x3D-0x3F bits
Size 9 bits 6 bits 1 bit 4 bits 2 bits 2 bits 8 bits 8 bits 20 bits 1 bit 3 bits
Description CLUT ID Y CLUT ID X Page Y Page X TP ABR v u ?????? Packet type (0: 0x7C, 1: 0x7E) ??????

if packet type is 0x7C, then tile is 16x16 sprite, else if type is 0x7E, packet is ???transparent??? 16x16 sprite.


Camera Settings In asm i found hard coded values:

OFX Screen offset X = 0xA00000

OFY Screen offset Y = 0x700000


Structure of one record: Header size is 0x34 bytes

Offset 0x00 0x02 0x04 0x06 0x08 0x0A 0x0C 0x0E 0x10 0x12 0x14 0x18 0x1C 0x20-0x27 0x28 0x2A 0x2C 0x2E 0x30 0x32
Size 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 4 bytes 4 bytes 4 bytes ?????? 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes
Description H Projection plane distance R11 R12 R13 R21 R22 R23 R31 R32 R33 TRX TRY TRZ ?????? ?????? ?????? ?????? ?????? ?????? ??????