Changes
From Final Fantasy Inside
no edit summary
Almost all files in FF9 has structure, which starts from 2 bytes DB (hex numbers). This record points, that after we'll have pointer list, which points to different data sections in the file (data can be sounds, TIMs, models, etc).
'''DB Structure:'''
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
! style="background:rgb(204,204,204)" align="center" | Data
! style="background:rgb(204,204,204)" align="center" | Size
|-
|style="background:rgb(255,255,255)" | "DB"
|style="background:rgb(255,255,255)" | 2 bytes
|-
|style="background:rgb(255,255,255)" | Pointers count
|style="background:rgb(255,255,255)" | 2 bytes
|-
|style="background:rgb(255,255,255)" | Pointer1, Pointer2,...
|style="background:rgb(255,255,255)" | 4 bytes * Pointers count
|}
Pointer is a number, which represent how many bytes from current position there is target data. Current position in this case is first byte of this pointer.
'''Pointer structure:'''
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
! style="background:rgb(204,204,204)" align="center" | Data
! style="background:rgb(204,204,204)" align="center" | Size
|-
|style="background:rgb(255,255,255)" | Pointer
|style="background:rgb(255,255,255)" | 3 bytes
|-
|style="background:rgb(255,255,255)" | Data Type
|style="background:rgb(255,255,255)" | 1 byte
|}
Data, where points this pointer begins with 2 bytes, first byte indicates, what data type we have, and second is count of objects of selected type.
'''DB Structure:'''
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
! style="background:rgb(204,204,204)" align="center" | Data
! style="background:rgb(204,204,204)" align="center" | Size
|-
|style="background:rgb(255,255,255)" | "DB"
|style="background:rgb(255,255,255)" | 2 bytes
|-
|style="background:rgb(255,255,255)" | Pointers count
|style="background:rgb(255,255,255)" | 2 bytes
|-
|style="background:rgb(255,255,255)" | Pointer1, Pointer2,...
|style="background:rgb(255,255,255)" | 4 bytes * Pointers count
|}
Pointer is a number, which represent how many bytes from current position there is target data. Current position in this case is first byte of this pointer.
'''Pointer structure:'''
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
! style="background:rgb(204,204,204)" align="center" | Data
! style="background:rgb(204,204,204)" align="center" | Size
|-
|style="background:rgb(255,255,255)" | Pointer
|style="background:rgb(255,255,255)" | 3 bytes
|-
|style="background:rgb(255,255,255)" | Data Type
|style="background:rgb(255,255,255)" | 1 byte
|}
Data, where points this pointer begins with 2 bytes, first byte indicates, what data type we have, and second is count of objects of selected type.