A bare-metal 8086/8088 bootloader and game launcher, inspired by the legendary 1984 "Beautiful Boot" on the Apple II by Mini Appler of the Midwest Pirates Guild.
Experience the original Apple II Beautiful Boot Disk Utility: 👉 HERE
Experience the original Apple II Beautiful Boot Game Disk: 👉 HERE
Like its Apple II ancestor, Beautiful Boot for PC renders an animated falling starfield — automatically adapting to VGA (Mode 13h, 256 colors), EGA (Mode 0Dh, 16 colors), or CGA (Mode 04h, 4 colors) based on the detected graphics card. It scans a standard FAT12 floppy, lets you browse .com, .exe, and .bin executables, and boots them in a bare-metal DOS-compatible environment.
Upon program exit, the menu restores the graphics environment for the detected adapter and returns to the selection screen.
Experience Beautiful Boot for PC — v86 Edition: 👉 HERE
Experience Beautiful Boot for PC — js-dos Edition (AdLib Audio): 👉 HERE
- Standard FAT12 Compatibility: Formatted as a real FAT12 1.44 MB floppy disk. Preserves the BIOS Parameter Block (BPB) on Track 0, Sector 1, so the image remains fully accessible by modern OS utilities (e.g.
mtoolsor standard mounting). - Modular Stage 2: Stage 2 is stored as a normal file (
stage2.bin) in the FAT12 filesystem. The Stage 1 boot sector dynamically searches the Root Directory for"STAGE2 BIN"and loads it via the FAT12 cluster chain, ensuring robust loading even if the file is fragmented or non-contiguous. - VFAT LFN (Long File Name) Support: Fully parses and reconstructs standard VFAT long filenames (LFN) created by tools like
mtools(mcopy) or natively by Windows 95 and later. Implemented in pure 16-bit real mode, it dynamically matches LFN entries with their corresponding 8.3 Short Filenames (SFN) using checksum validation, preserving original spaces and mixed-case names (e.g.,Agent USA.exe,King's Valley.exe) with seamless SFN fallback. - Dynamic File Explorer & Error Handling: Auto-scans the root directory of the active drive (A: or B:) and displays up to 15 matched files per page (mapped from
AtoO) along with their sizes in Kilobytes (K) (e.g.042K). Hides system files likestage2.bin. If a drive has no disk or encounters a read error, the loader gracefully displays"No Disk Inserted / Disk Error"and shows"???? Free sectors"in the footer. - Customizable Footer Comments: Configurable at build time through
build.shprompts. Allows compiling custom messages (up to two 40-character lines) directly into the bootloader footer. - Multiple Video Modes & Hardware Mappings: Pressing
TABcycles between monochromatic Green, monochromatic Amber (retro CRT amber screen feel), and Multi-color (the default boot mode) modes. The bootloader dynamically maps the text and star colors to fit the active display adapter:- VGA (Mode 13h): Renders a beautiful 256-color palette (e.g. customized NTSC Amber and deep orange separator).
- EGA (Mode 0Dh): Maps colors to standard high-intensity 16-color palette elements (e.g. Yellow and Brown for Amber).
- CGA (Mode 04h): Dynamically toggles hardware Palette 0 (Green/Red/Brown) for Green/Amber modes and Palette 1 (Cyan/Magenta/White) for Color mode via BIOS interrupt
INT 10h / AH=0Bhto avoid monochrome text rendering in incorrect colors. - MDA / Hercules: Automatically falls back to standard 80x25 text mode (Mode 03h) since standard PC BIOS does not natively support graphics modes or pixel-drawing routines on monochrome adapters, ensuring maximum hardware compatibility and safety.
- Multi-Adapter Graphics, Starfield & Audio: Renders a vertical falling starfield at ≈60 FPS (synchronized with the video card's vertical blanking interval to prevent tearing) using custom 8x8 font rendering. We offset the starfield trajectories to the character cell spacing columns so stars fall cleanly between text columns without clipping any glyph pixels. Each star movement fires a crisp 2.5 ms PC speaker click at a randomly varied pitch (~340–1136 Hz), producing a dense Geiger-counter-like crackling — faithfully recreating the Apple II's signature starfield audio signature.
- Star Speed Customization & OSD: Pressing
+/=or-/_adjusts the background starfield speed dynamically from level 01 to 12. Adjusting the speed displays an OSD indicator (Star Speed: 01~Star Speed: 12) matching the theme color on the bottom separator line, which automatically fades out after 1 second of inactivity. Speeding up the stars naturally increases the click frequency for a higher-energy retro sound. - Curtain Closing Transition & Sound: When loading a program, the screen closes like a curtain from the top and bottom simultaneously. During this animation, the PC speaker plays a sweeping laser frequency pitch synchronized with the collapsing rows. Upon completion, the system switches to 80x25 text mode, displays a centered
"Prepare Yourself..."screen message on row 12, and pauses for 1 second before executing the binary. - Robust MZ (.EXE) Relocator: Parses the DOS MZ header, copies the program code block, zeros the PSP, relocates segment pointers based on the actual header geometry, and sets up registers and stack space.
- COM & BIN Program Support: Standardizes COM environments by setting up the PSP at
0x1000:0000, copying code to0x1000:0100, zeroing registers, and setting the stack pointer to0xFFFE. - Pure 8086 Instruction Set: Restricts assembly instructions to the original 8086/8088 instruction set (no
movzx, no immediate shifts > 1, noFS/GSregisters). - Interactive Controls:
A–O: Load and execute the corresponding program on the current page.TAB: Cycle video color mode (Green -> Amber -> Color -> Green).SPACE: Swap boot drives (e.g. floppyA:vsB:).ENTER: Toggle to the next page of the file directory.+or=: Increase the falling star speed (levels 01 to 12).-or_: Decrease the falling star speed (levels 01 to 12).ESC: Exit and drop to ROM BASIC via BIOSINT 18h.
The bootloader reserves a clean 64 KB block (linear 0x0000–0xFFFF).
Everything from 0x1000:0000 (linear 0x10000) onward is left entirely free for
DOS programs, providing 576 KB of contiguous conventional memory.
| Linear Address | Seg:Off | Size | Description |
|---|---|---|---|
0x00000–0x003FF |
0000:0000 |
1 KB | Interrupt Vector Table (IVT) |
0x00400–0x004FF |
0000:0400 |
256 B | BIOS Data Area (BDA) |
0x00500–0x006FF |
0000:0500 |
512 B | Free / BIOS scratch |
0x00700–0x022FF |
0070:0000 |
7 KB | Root Directory buffer (14 sectors × 512 B) |
0x02300–0x034FF |
0230:0000 |
4.5 KB | FAT buffer (9 sectors × 512 B) |
0x03500–0x05D85 |
0350:0000 |
~10.1 KB | Stage 2 code + resident handlers (INT 21h + bounce buffer) |
0x05D86–0x07BFF |
— | ~7.6 KB | Contiguous Free Space |
0x07C00–0x07DFF |
0000:7C00 |
512 B | Stage 1 boot sector (BIOS-mandated, one-shot) |
0x07E00–0x07FFF |
0070:7700 |
512 B | Bootloader stack (grows downward from 0x07900 / 0x08000 linear) |
0x08000–0x0FFFF |
— | 32 KB | Free memory below program space |
| Linear Address | Seg:Off | Size | Description |
|---|---|---|---|
0x10000–0x100FF |
1000:0000 |
256 B | Program Segment Prefix (PSP) |
0x10100–0x9FFFF |
1010:0000 |
~575 KB | Program code, heap, and stack |
When an EXE file is selected, the relocator (exe_reloc.asm) behaves exactly like MS-DOS loader:
- Loads the raw executable file directly into segment
LOAD_SEGfrom the FAT12 cluster chain (processed atLOAD_SEG + header_paragraphsto avoid overlaps). - Checks the
MZsignature (0x5A4D) to verify the EXE format. - Reads the header parameters (relocation table offset, item count, header size, stack registers
SS:SP, and entry registersCS:IP). - Dynamically calculates the executable's image size from the MZ header (pages * 512 + last_page_bytes - header_size).
- Copies the program code (skipping the header) down to
LOAD_SEG:0000. - Zeroes out the 256-byte PSP block at
PSP_SEG:0000and configures termination hooks (INT 20hexit call atPSP:0). - Applies relocation offsets. For each entry in the relocation table:
- Finds the absolute target address:
(LOAD_SEG + reloc_segment) : reloc_offset. - Modifies the segment word at that address by adding the base load segment
LOAD_SEG.
- Finds the absolute target address:
- Restores initial stack segment (
LOAD_SEG + SS) and stack pointer (SP). - Clear all general-purpose registers (
AX,BX,CX,DX,SI,DI,BP) to0. - Far-jumps to
CS:IP(relative toLOAD_SEG) to start the program.
To enable standard DOS executable games to run in a standalone bare-metal environment, the bootloader installs a resident minimal INT 21h handler. This provides emulation for essential DOS system calls:
- Program Termination:
AH = 4Ch(Exit with return code): Emulated by triggering a software reboot (INT 19h) to return the user gracefully back to the boot menu.
- Console Input/Output:
AH = 01h(Read character with echo)AH = 02h(Character output)AH = 06h(Direct console I/O): Supports raw character output and non-blocking keyboard input with Zero Flag status reporting.AH = 07h / 08h(Read character without echo): Blocking keyboard read via BIOSINT 16h.AH = 09h(Print string): Outputs '$'-terminated strings to the screen.AH = 0Bh(Check input status): ReturnsAL = 0xFFif key is pending,0x00if none.AH = 0Ch(Clear buffer and input): Emulates clearing keyboard buffer and executing sub-functions.
- Resident FAT12 File Operations Subsystem (with Subdirectory Isolation):
AH = 3Ch(Create File): Creates or truncates a file inside the current game's directory, allocating starting clusters.AH = 3Dh(Open File): Opens an existing file, mapping it to a file handle slot.AH = 3Eh(Close File): Closes the file handle, flushing dirty sectors and updating size in the directory.AH = 3Fh(Read File): Reads file data byte-by-byte by walking the FAT12 cluster chain.AH = 40h(Write File): Writes data, dynamically appending and allocating FAT12 clusters as the file grows.AH = 41h(Delete File): Deletes the file entry and releases all associated FAT12 cluster chains.AH = 42h(Lseek): Modifies the active file pointer location (SEEK_SET,SEEK_CUR,SEEK_END).AH = 43h(Get/Set Attributes): Returns file attributes (e.g. read-only, hidden, archive).- Subdirectory Isolation: All file operations are dynamically mapped to the cluster chain corresponding to the program's parent directory (
current_dir_cluster). This lets each game (e.g., Goonies, Joust VGA, Hard Hat Mack) save configurations, high scores, and savegames (likeGOON01.SAVinside::goonies/) locally inside its own directory, keeping the disk's root directory perfectly clean and preventing FAT12 root directory entry exhaustion.
- System Information & Time:
AH = 30h(Get DOS Version): Returns DOS 5.0 to satisfy compiler startup code (e.g. Borland C++, Turbo C).AH = 2Ch(Get Time): Dynamic time polling based on BIOS system ticks (INT 1Ah) to prevent timer/random-seed deadlock loops in games.
- Interrupt Vector Management:
AH = 25h(Set Vector): Updates the Interrupt Vector Table (IVT) in real mode.AH = 35h(Get Vector): Reads segment and offset addresses from the IVT.
- Memory Management:
AH = 62h / 51h(Get PSP Segment): Returns the active PSP segment0x1000.AH = 48h(Allocate Memory): Implements segment-paragraph allocation from a dynamic free-memory allocator starting at the program's end (up to 640 KB conventional memory limit).AH = 49h(Free Memory): Simulates memory deallocation.AH = 4Ah(Resize Memory Block): Returns success to allow executable headers to allocate heap and stack space freely.
The build environment runs on Ubuntu (or Windows WSL):
nasm: Netwide Assemblermake: Build automatormtools: Utilities to access FAT floppy images (mcopy,mdir)dosfstools: FAT filesystem utility (mkfs.fat)python3: Used to package.jsdosbundles for the js-dos web editionpython3 -m http.server: Built-in HTTP server for local testing
On Ubuntu/WSL, running ./build.sh or make will check dependencies, compile the binaries, automatically search the games/ directory recursively for any game executables (.com, .exe, .bin), and package them into the floppy disk image in lowercase.
During compilation, the script emulates the interactive CLI interface of the original 1984 Apple II "Beautiful Boot" Disk Maker by MPG, displaying retro information layouts and prompting the user to customize the bottom two lines of the bootloader title page.
Build the bootable floppy image and js-dos web bundles:
chmod +x build.sh
./build.shThis produces three output files:
| File | Description |
|---|---|
beautiful.img |
Bootable 1.44 MB FAT12 floppy image (for QEMU / real hardware) |
beautiful-xt.jsdos |
js-dos bundle — XT speed (cycles=fixed 800) for classic DOS games |
beautiful.jsdos |
js-dos bundle — Full Speed (cycles=max) for MSX-recompiled games |
Alternatively, to build without the interactive prompts:
makeTest the bootloader inside the browser via the embedded v86 emulator:
chmod +x test.sh
./test.shThe test script will automatically open your default web browser to http://localhost:8000 and start a local Python HTTP server. The v86 emulator runs the floppy disk image (beautiful.img) directly in the browser with full Web Audio PC Speaker support!
The Web Emulator interface also includes built-in CPU Speed Throttling Controls (ranging from 1% to 100%). This allows you to slow down the emulated processor for older CPU-bound DOS games (such as Hard Hat Mack or Joust VGA) to make them playable and controllable, utilizing a jitter-free virtual clock and message-level synchronization to maintain a smooth 60 FPS visual frame rate even at ultra-low speeds.
The jsdos.html page runs the same floppy disk image inside js-dos (DOSBox-X WebAssembly), providing hardware-accurate AdLib OPL3 FM Synthesis and Sound Blaster 16 audio emulation — something the pure-JavaScript v86 emulator does not support.
Two speed modes are available via the toolbar dropdown and are persisted in localStorage:
| Speed Mode | Bundle loaded | Best for |
|---|---|---|
| Speed: XT (800) | beautiful-xt.jsdos |
Classic DOS games (e.g. Donkey Kong, Hard Hat Mack) |
| Speed: Full Speed | beautiful.jsdos |
MSX-recompiled games (e.g. Friends Software titles) |
To write the bootable image interactively to a physical 1.44 MB floppy disk or USB drive:
chmod +x install.sh
./install.shinstall.sh will:
- Detect and list all removable/USB devices
- Let you select the target drive
- Confirm before writing (requires typing
YES) - Write the image with
ddand sync
USB Tip: Set your BIOS boot order to USB-FDD (USB Floppy) rather than USB-HDD for best compatibility with the 1.44 MB image format.
Or write manually if you know your device path:
sudo dd if=beautiful.img of=/dev/sdX bs=512 conv=fsync status=progress(Replace /dev/sdX with the destination drive identifier of your disk)
- CPU: Intel 8086 / 8088 or 100% compatible processor.
- Memory: Minimum 256 KB RAM.
- Display Adapter:
- VGA (or newer): Runs in Mode 13h (320x200, 256 colors) with full NTSC Amber/Color palette.
- EGA: Runs in Mode 0Dh (320x200, 16 colors) with mapped Yellow/Brown Amber palette.
- CGA: Runs in Mode 04h (320x200, 4 colors) with dynamic BIOS Palette 0/1 switching.
- MDA / Hercules: Falls back to 80x25 monochrome text mode (Mode 03h) for safety.
- Floppy Drive: Standard 1.44 MB floppy drive (supports A: and B: with BIOS disk controller resets).
beautifulboot-pc/
├── boot.asm # Stage 1 bootloader (preserves BPB, loads Stage 2)
├── stage2.asm # Stage 2 menu, starfield animation, FAT12 reader
├── exe_reloc.asm # DOS MZ (.EXE) relocator & PSP builder
├── font.inc # Custom 8x8 monochrome retro graphics font
├── gen_font.ps1 # PowerShell script to generate font.inc from font image
├── Makefile # Build automation (make / make clean)
├── build.sh # Interactive build script with retro CLI prompts
├── test.sh # Rebuilds the image and serves locally for browser testing
├── install.sh # Writes beautiful.img to a real floppy or USB drive
├── index.html # v86 Edition web emulator page
├── jsdos.html # js-dos Edition web emulator page (AdLib audio)
├── beautiful.img # Built FAT12 floppy disk image
├── beautiful.jsdos # js-dos bundle — Full Speed (cycles=max)
├── beautiful-xt.jsdos # js-dos bundle — XT speed (cycles=fixed 800)
└── games/ # Subdirectory containing retro game binaries
This PC port of Beautiful Boot is created as a humble tribute to the original Apple II program and its author, Matthew Dornquast (Mini Appler of the Midwest Pirates Guild / MPG), who passed away in 2022.
Beautiful Boot was a masterpiece of disk utility software that served as a fast boot launcher utility to load programs speedily and save time in the 1980s. This project aims to preserve that spirit and share the magic of its falling starfield and clicky crackle sound with retro-computing enthusiasts on the PC platform.
For those wishing to learn more or leave their thoughts, memorial posts and media can be found here: 👉 Matthew Dornquast Memorial Post (Apple II Enthusiasts Group) 👉 Jason Scott's Memorial Tweet (X) 👉 Beautiful Boot Audio Introduction / Podcast (YouTube)
Rest in peace, Matthew. Your code and legacy live on.
Although this program is space-themed, SpaceX did not sponsor this project! ;D
This project is released under the Public Domain (CC0). Feel free to modify, distribute, or use it for any retro-computing projects.