Stunts/4D [Sports] Driving game resource unpacker
This program decodes packed resources and code files used by the PC version of the game "Stunts" (Brøderbund), also published as "4D Sports Driving" (Mindscape) and "4D Driving" (Electronic Arts).
An encoder has not been made as the game accepts uncompressed resource files.
Pre-compiled binaries can be downloaded from the project's release page.
The program requires at least one parameter as the source file path. If the optional destination file path is omitted a new filename is generated by adding the .out
extension to the source file name. Except for the DOS version, where the last character of the source file name is replaced by a _
in the destination file name.
For a full list of options run stunpack -h
.
The project can be compiled with the GNU toolchain by running make
. Building for other targets can be achieved by setting a compiler/linker in the CC
environment variable:
- Win32 with MinGW:
CC=i686-w64-mingw32-gcc make
- Win64 with MinGW:
CC=x86_64-w64-mingw32-gcc make
- MS DOS with Open Watcom:
CC=wcl386 INCLUDE=$WATCOM/h LIB=$WATCOM/lib386 PATH=$WATCOM/binl:$WATCOM/binw:$PATH make
- Any target exposed by Zig's Clang interface:
CC="zig cc -target riscv64-linux-musl" make
Variables that affects the build process:
CC
: Compiler executableCFLAGS
: Compiler flagsLDFLAGS
: Linker flagsBUILDDIR
: Place output files in external directoryEXESUFFIX
: Defaults to.exe
if a Windows or DOS compiler is detectedINSTALLDIR
: Defaults to/usr/local/bin
formake install
The code for handling the compression formats is separated from the command line utility in a static library located in src/lib
. The header file is include/stunpack.h
.
The data format, compression algorithms and applied optimisations are described in the Stunts Wiki.
GNU GPL version 2, see COPYING.