DR5 CONFIG.BIN

During the early days of Windows 1.0, Microsoft used a file named CONFIG.BIN to store OEM configurations and system bitmaps later stored in DISPLAY.EXE. It existed since Development Release #1 and was last seen in Development Release #5. Since Development Release #5 is available on the internet, this document will describe the basic features of DR5's CONFIG.BIN.

Basic Information
People who have developed display drivers for Windows 1.x should know the OEMBIN resource FONTS. DR5's CONFIG.BIN is basically a resource file containing an early version of FONTS and various system bitmaps. Although it is named CONFIG.BIN, it does not contain much/anything from the later CONFIG OEMBIN resource. WINDOWS function OemDependentInit contains most values later found in CONFIG:

void OemDependentInit(void) {   [...]    OpenConfig = _LOPEN((LPSTR)"config.bin", 0); /* open config.bin */ [...]   word_0746 = 2; word_0748 = 10; yThumb = yRatio * 0xc; /* vertical scroll bar thumb height */ xThumb = xRatio * 0x18; /* horizontal scroll bar thumb height */ CreatBits( parameters ); xIconCompress = 2; /* functions like xCompress, maybe the last part of config.bin */ yIconCompress = 4; /* functions like yCompress, maybe the last part of config.bin */ xCompress = xRatio * 0x20; /* horizontally compress */ yCompress = yRatio * 0x10; /* vertically compress */ ySlots = yCompress + 2; /* related but probably something else */ xSlots = xCompress + 8; /* related but probably something else */ [...]   return; }

DR5's CONFIG.BIN can be split into 2 sections - the header and the body. The header contains offsets of various resources. The body is made up of 3 sections - the font configuration file, the system bitmaps and something else similar to those icon compression factors hard coded in OemDependentInit.

Documentation
CONFIG.BIN │ ├───Header │  └───File header │          word        CfgFonts                Offset of fntConfig │          word        BmpMenu                 Offset of MENU.BMP │          word        BmpHelp                 Offset of HELP.BMP │          word        BmpClose                Offset of CLOSE.BMP │          word        BmpSize                 Offset of SIZE.BMP │          word        BmpUpAreow              Offset of UPARROW.BMP │          word        BmpDnArrow              Offset of DNARROW.BMP │          word        BmpRgArrow              Offset of RGARROW.BMP │          word        BmpLfArrow              Offset of LFARROW.BMP │          word        BmpBtSize               Offset of BTSIZE.BMP │          word        BmpCheck                Offset of CHECK.BMP │          word        Unk0001                 Offset of Unk0001 │ └───Body ├───fntConfig │      word        fntWeight               Bold (0000h), Normal (0001h-000Ah), Large bold (0010h-7FFFh)  <-- this is wrong but sometimes gives the desired result │      word        Unk0002                 Unknown │      word        Unk0003                 Unknown │      word        Unk0004                 Unknown │      word        Unk0005                 Unknown (makes the font wider) │      byte        fntItalic               Regular (00h), Italic (01h-FFh) │      byte        fntUnderline            Regular (00h), Underline (01h-FFh) │      byte        fntStrike               Regular (00h), Strikethrough (01h-FFh) │      byte        fntCharSet              English (00h), Greek (01h-FFh) │      byte        Unk0006                 Unknown (maybe fntOutPrecision) │      byte        Unk0007                 Unknown (maybe fntClipPrecision) │      byte        Unk0008                 Unknown (maybe fntQuality) │      byte        fntForceEng             English (01h), otherwise use fntCharSet  <-- probably something else but assume it forces the font to use English characters │      byte        Unk0009                 Unknown │    ├───Bitmaps │      bytes       MENU.BMP                Raw bitmap format │      bytes       HELP.BMP                Raw bitmap format │      bytes       CLOSE.BMP               Raw bitmap format │      bytes       SIZE.BMP                Raw bitmap format │      bytes       UPARROW.BMP             Raw bitmap format │      bytes       DNARROW.BMP             Raw bitmap format │      bytes       RGARROW.BMP             Raw bitmap format │      bytes       LFARROW.BMP             Raw bitmap format │      bytes       BTSIZE.BMP              Raw bitmap format │      bytes       CHECK.BMP               Raw bitmap format │    └───Unk0001 byte       2                       Unknown (maybe xIconCompress) byte       4                       Unknown (maybe yIconCompress)

Customizations
Pictures below illustrates some possible ways DR5 can be customized through modifications to CONFIG.BIN.