Changes
From Final Fantasy Inside
Created page with "== WM0.TXZ == The following information applies specifically to WM0.TXZ, it is reasonable to assume that the rest of the TXZ files use a similar format, where WM2.TXZ and WM3..."
== WM0.TXZ ==
The following information applies specifically to WM0.TXZ, it is reasonable to assume that the rest of the TXZ files use a similar format, where WM2.TXZ and WM3.TXZ presumably holds equivalent data for the underwater and snowfield maps respectively.
=== Compression ===
TXZ files are compressed using standard LZS compression where the first 4 bytes contain the size of the compressed data.
=== TXZ archive format ===
Uncompressed TXZ files are divided into several different sections, to extract the different sections a header must be parsed at the beginning of the file. The first 4 bytes will tell you how many sections there are. After that follows 4 * <number of sections> bytes containing offsets into the file for each section. A section can be assumed to end where the next section begins and the last section runs until the end of the file.
== Sections ==
=== WM0.TXZ, section 0 ===
Unknown format, might be a model? Looks like there's atleast one or two textures in there.
=== WM0.TXZ, section 1 ===
Texture data for direct VRAM upload, same format as section 2 but contains only a single block.
=== WM0.TXZ, section 2 ===
Texture data for the worldmap mesh (see .MAP format), starts with a table of 512 palette/texture identifiers in a format compatible with the PSX GPU, see http://psx.rules.org/gpu.txt for more information.
The following structure can be used to read this data:
struct wm_texture
{
unsigned int clutx:6;
unsigned int cluty:10;
unsigned int tx:4;
unsigned int ty:1;
unsigned int abr:2;
unsigned int tp:2;
unsigned int reserved:7;
};
After this table follows a number of blocks intended for direct VRAM upload, each block has the following structure:
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse; text-align:center"
|+ VRAM Block
|-
! style="background:rgb(204,204,204)" align="center" | size
! style="background:rgb(204,204,204)" align="center" | description
|-
| 4 bytes
| Size of this block (including header)
|-
| 2 bytes
| Destination X coordinate
|-
| 2 bytes
| Destination Y coordinate
|-
| 2 bytes
| Width
|-
| 2 bytes
| Height
|-
| Width * Height * 2 bytes
| Pixel data
|}
A new block can be assumed to start where the previous one ends until the end of this section is reached.
=== WM0.TXZ, section 3 ===
Unknown format, contains more blocks of VRAM data.
=== WM0.TXZ, section 4 ===
Contains the script for the overworld map, a copy of the data in wm0.ev?
=== WM0.TXZ, section 5-11 ===
These sections contain songs in standard AKAO format. Presumably the different overworld background themes are in there, don't know what else?
The following information applies specifically to WM0.TXZ, it is reasonable to assume that the rest of the TXZ files use a similar format, where WM2.TXZ and WM3.TXZ presumably holds equivalent data for the underwater and snowfield maps respectively.
=== Compression ===
TXZ files are compressed using standard LZS compression where the first 4 bytes contain the size of the compressed data.
=== TXZ archive format ===
Uncompressed TXZ files are divided into several different sections, to extract the different sections a header must be parsed at the beginning of the file. The first 4 bytes will tell you how many sections there are. After that follows 4 * <number of sections> bytes containing offsets into the file for each section. A section can be assumed to end where the next section begins and the last section runs until the end of the file.
== Sections ==
=== WM0.TXZ, section 0 ===
Unknown format, might be a model? Looks like there's atleast one or two textures in there.
=== WM0.TXZ, section 1 ===
Texture data for direct VRAM upload, same format as section 2 but contains only a single block.
=== WM0.TXZ, section 2 ===
Texture data for the worldmap mesh (see .MAP format), starts with a table of 512 palette/texture identifiers in a format compatible with the PSX GPU, see http://psx.rules.org/gpu.txt for more information.
The following structure can be used to read this data:
struct wm_texture
{
unsigned int clutx:6;
unsigned int cluty:10;
unsigned int tx:4;
unsigned int ty:1;
unsigned int abr:2;
unsigned int tp:2;
unsigned int reserved:7;
};
After this table follows a number of blocks intended for direct VRAM upload, each block has the following structure:
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse; text-align:center"
|+ VRAM Block
|-
! style="background:rgb(204,204,204)" align="center" | size
! style="background:rgb(204,204,204)" align="center" | description
|-
| 4 bytes
| Size of this block (including header)
|-
| 2 bytes
| Destination X coordinate
|-
| 2 bytes
| Destination Y coordinate
|-
| 2 bytes
| Width
|-
| 2 bytes
| Height
|-
| Width * Height * 2 bytes
| Pixel data
|}
A new block can be assumed to start where the previous one ends until the end of this section is reached.
=== WM0.TXZ, section 3 ===
Unknown format, contains more blocks of VRAM data.
=== WM0.TXZ, section 4 ===
Contains the script for the overworld map, a copy of the data in wm0.ev?
=== WM0.TXZ, section 5-11 ===
These sections contain songs in standard AKAO format. Presumably the different overworld background themes are in there, don't know what else?