GameFormat/BaldrForce

PAC Format

About

An archive format. Everything except for the opening movies and mecha battle data and fonts are stored in these files. Seem to be PAC<00>, PACw and PACW(?) types. The normal pacs seem to use PACw while the update.pac uses PAC<00>.

PACw Header Format:

DWORD - 'PACw'
DWORD - number of files in the pack
DWORD - type of compression (0: uncompressed, 1:LZ32, 2:LZW/Huffy?, 3:zlib DEFLATE?)

This is followed by a table of file descriptors.

Each file descriptor (total 42 bytes each):

64*CHAR - Filename
DWORD - Offset in .PAC file
DWORD - Decompressed size
DWORD - Compressed size

BIN Format

About

Script format. Consists of a header, followed by some sort of DWORD table and then the actual script

Header Format:

DWORD - Zero
DWORD - Zero
DWORD - Number of DWORD table entries
DWORD - Number of bytes in the actual script file

Table Format: (maybe this is variable space, with initial values?)

N*DWORD - Often -1 or 0

Script Format:

Opcode List (sequential byte order (Big-endian)):

Script Text Format:

Function Calls (arguments listed in reverse push order):

Sample Function Call:

fn53('Tohru blah blah',2,0)

becomes

0C 00 00 00 00 00
0C 00 02 00 00 00
0B 00 10 00 00 00
T  o  h  r  u     b  l  a  h     b  l  a  h 00
53 04 03 00 00 00
08 00 FF FF FF FF

last edited 2006-03-13 13:04:59 by RasqualTwilight