.VSR file format description (unfinished) ---------------------------------------------------------------------------------------------------- The Visual Sciences resource archive format (.VSR) is an archive format used in at least one game by Visual Sciences (Lemmings Paintball.) The format itself is basically IFF (or rather its little-endian cousin RIFF), with chunks denoted by a four-byte identifier string and a 32-bit size. Known valid chunk IDs: (note: they're all written backwards like this in the file) "CRID" (directory) " NIB" (binary data) "TSIL" (list[?]) " LAP" (palette data?) "PMTB" (bitmap data) "ELRZ" (RLE-compressed data?) "GRTS" (string data) " TNI" (integer) As with regular RIFF files, all numerical values are little-endian. == Generic chunk format == Offset | Type | Description 0 | char[4] | chunk ID (see above) 4 | int | size of data == CRID chunk format == Offset | Type | Description 8 | int | pointer to directory entry names 12 | int | ??? 16 | int | pointer to directory entry data Located at the directory entry data pointer is a series of 32-byte directory entries. These describe additional chunks contained within the CRID chunk. The chunks described by these entries can be other "CRID" chunks (to create nested directories) or any other valid chunk type. Offset | Type | Description 0 | int | pointer to file name (null terminated string) 4 | int | file number(?) 8 | char[4] | chunk ID 12 | int | pointer to actual chunk (target chunk's ID should match previous field) The remaining bytes depend on what type the target chunk is, and provide additional information about the contents of the chunk. For CRID chunks, the remaining bytes are all null. For TSIL chunks: 16 | int | ??? 20 | int | number of entries in list 24 | ???? For other chunks: ???? The last four bytes of directory data are always "?DNE".