RES Format (Boppin)

From ModdingWiki
Jump to navigation Jump to search
Edge of map!
RES Format (Boppin)
Format typeArchive
Max filesUnlimited
File Allocation Table (FAT)Beginning
Supports compression?Yes
Supports encryption?No
Supports subdirectories?No
Hidden data?Yes

The Boppin RES Format is used by Boppin for storing game data. No filenames are saved, and files can be stored compressed or uncompressed.

File format

The offsets and sizes of each file are stored in the file header. If a file is compressed, the size stored in the header is of the compressed size, so this can be used to accurately extract data from the RES file itself.

Data type Name Description
UINT32LE iOffset Offset to the file at this index
UINT32LE iSize Size of data stored in RES file

If iOffset is 0xFFFFFFFF or iSize is zero, this "slot" is unused and doesn't point to a file, so it should be ignored.

This structure is repeated until a file offset plus its size points at or past the end of the RES file. (You could also keep reading until you reach the offset of the first file.)

To access a file, you must seek to its offset as given in the header. At this offset, read in a UINT32LE. This value is the compressed file size. If it matches the value given in the header, then the file is compressed. If the value doesn't match then the file is uncompressed (and these four bytes are actually the start of the file itself.)

If the file is compressed, read in another UINT32LE. This is the decompressed file size. The compressed data then follows.


The data is compressed using the LZSS algorithm. This still needs to be posted here, however the original Boppin programmer has released code for manipulating RES files and this code includes the LZSS algorithm - until the details are posted here, the code can be obtained easily enough (try asking on the PCKF)

The compression code also contains this header:

        LZSS.C -- A Data Compression Program
        (tab = 4 spaces)
        4/6/1989 Haruhiko Okumura
        Use, distribute, and modify this program freely.
        Please send me your improved versions.
                PC-VAN          SCIENCE
                NIFTY-Serve     PAF01022
                CompuServe      74050,1022


Since the RES format doesn't store any filenames, these would normally have to be automatically generated (e.g. file0001.bin, file0002.bin, etc.) Since the Boppin programmer has released some source code however, the original filenames can be obtained from there:

char *boppin_res[] = {
	"boppin.lvl",  // doesn't seem to be boppin.lvl
	"<unknown>",   // boppin.lvl seems to be here instead

char *boppin_mus[] = {

char *boppin_snd[] = {


The following tools are able to work with files in this format.

Name PlatformExtract files? Decompress on extract? Create new? Modify? Compress on insert? Access hidden data? Edit metadata? Notes
Camoto Linux/WindowsNoN/ANoNoN/ANoN/A
Wombat WindowsYesN/ANoNoN/ANoN/A


This file format was discovered thanks to Stephen P. Lepisto, the original Boppin' programmer, supplying source code for the programs used in development to create the official .RES files. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)