Skip to content

Build Options

640KB edited this page Sep 23, 2025 · 28 revisions

Below are the configurable options to build GLaBIOS for different systems that may be edited in GLABIOS.ASM.

Important build note: Not all options may be enabled simultaneously due to limited 8K of ROM storage. If experimenting with options, it's strongly recommended to build using MASM 5.x as it will produce an error if code space is exceeded. See How to Build.

CPU Type

Set CPU_TYPE to enable compatible instructions to use during build time. Selecting V20 enables the use of instructions that are specific to only the NEC V-series CPU. If unsure, it is recommended to use CPU_8088.

CPU_TYPE Code Architecture Description
CPU_8088 8 Intel x86 All Intel CPUs (8088, 8086, 80x86, NEC)
CPU_V20 V NEC V-series NEC V20, V30, V40 only

Target Architecture Preset

Set ARCH_TYPE to the defined preset type below inline in code or at assemble type using MASM option /DARCH_TYPE='X' (for ARCH_5160).

ARCH_TYPE Code Architecture Description
ARCH_5150 P PC 5150 Supports 5150 SW1/SW2 and Cassette interface
ARCH_5160 X PC 5160 Standard XT, or non-Turbo clones
ARCH_TURBO T Standard Turbo Typically discrete components, uses PPI for software turbo control
ARCH_TD3300 S TD3300A Juko ST-12, UNIQUE, Auva
ARCH_FE2010 F Faraday FE2010A
ARCH_UM82 U UMC UM82C088, ALi M1101
ARCH_EMU E 86Box/Emulators Removes I/O wait times and hardware checks for additional speed. Not for real hardware.
ARCH_EHB H EMM Homebrew 8088
ARCH_BOOK88 B Book 8088

Architecture Sub-Types

These are based on one of the above types but slightly vary in configuration.

ARCH_SUB_TYPE Code Architecture Sub-type of Description
ARCH_5160v2 Y PC 5160v2/v3 ARCH_5160 Reserved (unused)
ARCH_M88 M micro_8088/NuXT ARCH_FE2010
ARCH_NEST N Juko Nest N3 ARCH_TD3300 8086/V30
ARCH_VEN888 V Vendex 888-XT ARCH_TURBO Custom Turbo speed register
ARCH_MARTY C MartyPC Emulator ARCH_TURBO
ARCH_VIRTUALXT J VirtualXT Emulator ARCH_TURBO
ARCH_MIST I PCXT_MiSTer ARCH_EMU Experimental

Turbo Type

Some motherboards boot in normal (slow) mode by default and the BIOS may or may not switch to Turbo speed on boot. Others invert this behavior where it appears reversed to the BIOS. Use these options to customize for your motherboard.

TURBO_TYPE Description
TURBO_NONE Fixed clock speed PC, XT or clone
TURBO_STD PPI 61h bit 2 (1=turbo, 0=normal)
TURBO_REV PPI 61h bit 2 (1=normal, 0=turbo)

POST System Tests

Enable/Disable POST tests

Option Default Description
POST_TEST_INST 0 POST CPU Instruction/Flag Test
POST_TEST_DMA 1 POST DMA Register Test
POST_TEST_DMA_TC0 1 POST DMA Terminal Count Test
POST_TEST_PIT_1 1 POST Timer Channel 1 Test
POST_TEST_PIC_REG 1 POST PIC Register Test
POST_TEST_PIC_INT 1 POST PIC Interrupt Test
POST_TEST_CHK_ROM 1 POST Checksum ROM
POST_TEST_FD 1 POST Floppy Drive Test
POST_TEST_SEEK 1 POST Seek Floppy Drives
POST_TEST_KB 1 POST Keyboard Test (PKI)
POST_TEST_KEY 1 POST Key Test (PKEY)

Features and Options

Option Default Description
BASIC_ROM 1 BASIC ROM support at 0F600h
FDC_ADV_SEEK 1 Cache drive head position in memory to reduce FDC I/O for sequential reads on same track. Can significantly improve read performance.
FDC_ENABLE 1 1=Enable standard INT 13h floppy support
0=disable floppy support completely (use only if no floppy controller installed)
FDC_IPL_SW 0 Use IPL switch (SW1-1) to indicate no floppy controller/drives are installed. This is the behavior as 5150 and some later high-density FDC BIOSes.
LIGHT_PEN 1 INT 10h,4 CGA/MDA light pen support.
May be disabled if additional code space is required.
MAX_RAM_AUTO 0 Set maximum detectable low memory based on video DIP switches: EGA/VGA = 640K, MDA = 736K, CGA = 704K
MDA_ATTR 1 Filter MDA character attributes to improve visibility of MDA adapters or monitors with non-standard attributes or low contrast
2=allow all, 1=intensity only, 0=filter all
MUTE_TANDY 0 On boot, mute power-on noise on Tandy 3 Voice or SN76489AN
OEM_FONT 0 1=use OEM style CGA mode 4-6 font, 0=clone style
OEM_KB_EXT 1 Allow EAh cold reset byte from extended/enhanced keyboards
OPT_ROM_END 0FE00H Option ROM scan end segment. Default scan all segments between C800-FD80 for option ROMs.
POST_CARD 0 Enable POST codes on port 80H, corresponding to POST error beeps
POST_ERR_WAIT 1 1=Wait for Any Key press to continue if there is a POST error
0=Only display error and continue booting
POST_HD_PARMS 1 Enable POST hard drive drive count, size and geometry.
May be disabled if additional code space is required.
POST_OPT_ROM 1 Show detected option ROM address and size.
May be disabled if additional code space is required.
RAM_PARITY 1 Enable RAM parity checking.
RANDOM_TAGLINE 1 Show a randomized pithy tagline.
UNITS_IEC 0 Display units as 0=period-correct "KB" or 1=modern IEC "KiB"

Advanced options

These options may be used by emulator developers or for specific hardware use cases. It is recommended to leave these as-is

Option Default Description
DRAM_REFRESH 18 DRAM refresh divisor use standard PC timing of 1.193 MHz/18 = 66,287.87 Hz (see UNSAFE_REFRESH )
EXP_UNIT 0 Init 5161 I/O Expansion Unit (may not be necessary)
FD_AUTO_DETECT 0 Auto-detect number of floppy drives on systems that do not have drive count switches, such as FE2010
FDC_ERR_SEC_CT 0 On INT 13h read, write or verify operation errors:
0=always return 0 sectors even if some sectors have been successfully read (PC typical behavior)
1=return partial/successful sector count
FDC_HLT_WAIT 1 Halt CPU (HLT) during FD I/O (this can cause issues on TD3300A due to unknown chipsets bugs)
FDC_ZERO_BDA 0 Clear FDC FIFO buffer between operations. This is not normally necessary and can cause issues with software/BIOSes that use this memory (Seagate MFM BIOS).
FE_CONF_LOCK 1 Lock FE2010 config register after init.
FEATURE_BYTES 1 Encodes flags for most configurable build options into ROM binary for future reference.
INIT_AT_KBC 0 Init AT type KB controller. This is only necessary for EMM Homebrew and other projects that use an 8042 keyboard controller instead of PPI.
INIT_V40 0 Init V40 config registers (only enable if V40 is installed)
INT_19_BOOT_HD 0 Try IPL to floppy then hard drive (80h). This is only necessary if Hard Drive BIOS does not implement this behavior (very rare)
KB_BUF_BDA 0 1=Use start/end keyboard buffer pointers in BDA (40:80-83) (additional code bytes)
0=use standard fixed offsets (possible though unlikely compatibility issues)
KB_FILTER_SC 0 Filter KB make/break code >= 70h for non-standard keyboards that send incompatible key scan codes (ex: Book8088)
KB_HLT_WAIT 1 Halt (HLT) CPU during KB INT 16h wait for input (see FDC_HLT_WAIT)
MBR_CHECK 0 Verify magic number of DOS MBR on floppy disk at boot. Enabling can prevent booting disks with no standard MBR ID (AA55H) such as DOS 1.0.
MUSHROOM_HACK 0 If the user PIT timer is stopped by uncommon software (ex MUSHROOM.COM), enable a workaround that does not require PIT for I/O delays (such as floppy drive operations)
POST_HD_CHECK 1 Probe POST HD drive geometry and size. See issues with older hard drive controller ROMs.
RAM_DIGITS 3 Number of zero-padded digits for RAM (3 or 4), if platform supports 1024 KB of detectable memory.
RAM_TEST_LONG 1 Use normal long RAM test on cold boot. Will speed up cold boot if disabled (recommended only for emulators).
RAM_TEST_NONE 0 Don't test or clear RAM at all on boot/reboot. Use for development/testing purposes only.
ROM_SCAN_ALIGN 1 1=Option ROM scan always aligns to 2K boundaries (correct behavior), 0=scan every 2K boundary after previously detected ROM size - if ROM has a non-2K size this can cause subsequent ROMs to be undetectable (incorrect behavior found in many clones)
SW1_FLP 4 Default max number of floppy drives (if not set by SW1)
WARM_ENABLE 1 1=enable WARM boot or 0=always COLD boot

Hardware Hacks

These run your system way out of spec. You have been warned.

Option Default Description
UNSAFE_FLOPPY 0 Reduce floppy drive head settling time for possibly faster seek access and burst transfer reads.
UNSAFE_REFRESH 0 Use unsafe DRAM refresh timing

POST Screen

Option Default Description
POST_BANNER 1 show banner and version
POST_CLS 0 clear screen after POST
POST_CONFIG 1 show CPU, FPU and ports on POST
POST_FD_COUNT 1 show floppy drive count on POST
POST_GLADOS 0 say "Starting GLaDOS..." on boot
POST_HD_COUNT 1 show hard drive count and params on POST
POST_THEME 1 color theme for POST screen (see below)
POST_VID_HGC 0 1=If a Hercules adapter is detected, display "HGC" (can slow down POST if standard MDA is installed)
0=Display "MDA" for MDA or Herc
POST_VIDEO_TYPE 1 show the video adapter type on POST
POST_WARM_COLD 1 show boot WARM or COLD

POST Screen Themes

The POST screen colors may be customized in the "Theme My POST Test" section in GLABIOS.ASM.

POST_THEME 1 (Default):

Option Default Description
POST_CLR_TXT CYAN (11) Primary text color
POST_CLR_VAL1 GREEN (10) Highlighted option
POST_CLR_VAL2 YELLOW (14) Highlighted option alternate
POST_CLR_COLS BLUE (9) COLD color
POST_CLR_WARM DARKRED (4) WARM color
POST_CLR_GB GRAY (7) BIOS name in bootup screen
Clone this wiki locally