*.uni general Filestructure
(\PSP_GAME\USRDIR\UNION\)
File consists of 3 parts
1) UNI2 Header
2) Address Table
3) Data
container is aligned to 2048 bytes, uses sector addressing.
1 sector = 2048 bytes / 0x800 [hex]
example file: \PSP_GAME\USRDIR\UNION\SUB.UNI
Quote ( Header)
0x00: 554E 4932 0000 0100 0500 0000 0100 0000
0x10: 0200 0000 0000 0000 0000 0000 0000 0000
0x20: 0000 0000 0000 0000 0000 0000 0000 0000
0x00: UNI2 Signature (it's always 554E 4932)
0x04: unknown value
0x08: number of files (hex) (5 files in this case)
0x0C: Sector Address of Table file (1 in this case) (0x800)
0x20: Sector Address of Data Start (2 in this case) (0x1000)
Unknown values seem to be static regardless of size/number of files.
Quote ( Address Table)
0x800: 0500 0000 0000 0000 0100 0000 3000 0000
0x810: 1E00 0000 0100 0000 0400 0000 3018 0000
0x820: 3200 0000 0500 0000 0100 0000 A002 0000
0x830: 3300 0000 0600 0000 0100 0000 7001 0000
0x840: 3C00 0000 0700 0000 0100 0000 9002 0000
0x850: 0000 0000 0000 0000 0000 0000 0000 0000
0x860: 0000 0000 0000 0000 0000 0000 0000 0000
Each File entry is 16 bytes, below pattern repeats for number of files decribed at 0x08 in UNI2 header.
0x800: unknown value
0x804: Sector Start Address !!
0x808: Sector Size
0x80C: File Size in bytes (hex)
!! Sector start Address is relative to data start (in the case of example file, 0x1000)