Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PIF program settings

PIF files store Windows launch settings for DOS programs.

DIGPLAY.PIF and SETSOUND.PIF describe the corresponding sound utilities. They contain a base header, Windows 386 settings, and a Windows VMM extension.

DIGPLAY.PIF launches DigPlay.EXE with argument R212.WAV. SETSOUND.PIF launches SETSOUND.EXE without arguments. These settings belong to the audio utilities’ Windows environment. They do not control sample playback in a modern game engine. See Bundled support resources.

Overall Structure

[Base header — DOS program, directory, arguments, and display settings]
[PIFEX root — linked extension header referring to the base header]
[Extension records — headers and file-relative payloads]

The base header is 369 bytes. A base-only file has no extension chain. All multibyte integers are little-endian.

Base header

OffsetSizeTypeNameDescription
0x002[u8; 2]unknown_00Stored header bytes
0x0230[u8; 30]titleSpace-padded window title
0x202u16memory_max_kbDesired conventional memory, in KiB
0x222u16memory_min_kbRequired conventional memory, in KiB
0x2463[u8; 63]programExecutable filename
0x631u8flags_63Launch flags; bit 0x10 closes the window on exit
0x641u8start_driveStartup drive byte
0x6564[u8; 64]start_directoryWorking directory
0xA564[u8; 64]parametersProgram arguments
0xE51u8video_modeVideo mode byte
0xE61u8unknown_e6Stored byte
0xE71u8irq_lowLow interrupt vector byte
0xE81u8irq_highHigh interrupt vector byte
0xE91u8rowsScreen rows
0xEA1u8columnsScreen columns
0xEB1u8window_yWindow Y position
0xEC1u8window_xWindow X position
0xED2u16unknown_edStored word
0xEF64[u8; 64]unknown_efStored bytes
0x12F64[u8; 64]unknown_12fStored bytes
0x16F1u8flags_16fAdditional flags
0x1701u8flags_170Additional flags

Text fields end at the first NUL or their fixed field boundary. Title padding is removed when displayed. Bytes after a NUL are outside the displayed string. Text fields contain legacy character bytes. A Unicode representation depends on the OEM or Windows code page used to display them.

Extension chain

Each extension header is 22 bytes. Its offsets are absolute file positions.

OffsetSizeTypeNameDescription
+0x0016[u8; 16]signatureNUL-terminated extension name
+0x102u16next_offsetNext header position; 0xFFFF ends the chain
+0x122u16data_offsetPayload position
+0x142u16data_sizePayload size in bytes

The root header starts at 0x171. Its signature is MICROSOFT PIFEX, its payload offset is zero, and its payload size is 369. This payload is the base header. Each later extension has its own signature, payload position, and size.

Windows 386 settings

The WINDOWS 386 3.0 extension contains a 104-byte settings record. Its memory limits and arguments supersede the corresponding base fields for enhanced-mode execution.

OffsetSizeTypeNameDescription
+0x002u16memory_max_kbDesired conventional memory
+0x022u16memory_min_kbRequired conventional memory
+0x042u16foreground_priorityForeground scheduling priority
+0x062u16background_priorityBackground scheduling priority
+0x082u16ems_max_kbExpanded memory limit
+0x0A2u16ems_min_kbRequired expanded memory
+0x0C2u16xms_max_kbExtended memory limit
+0x0E2u16xms_min_kbRequired extended memory
+0x102u16option_flagsExecution options
+0x122u16memory_flagsMemory options
+0x142u16video_flagsDisplay options
+0x1618[u16; 9]hotkeyHotkey fields
+0x2864[u8; 64]parametersEnhanced-mode arguments

Memory sizes are in KiB. 0xFFFF is retained as the stored limit value. The WINDOWS VMM 4.0 payload occupies 428 bytes in both shipped utility files.

External References