GitPedia

BootMine

Bootable minesweeper game in a 512-byte boot sector

From io12·Updated June 12, 2026·View on GitHub·

*Ever wanted to play minesweeper but didn't have an OS to run it in? No? Really no??* The project is written primarily in Assembly, distributed under the MIT License license, first published in 2020. Key topics include: 16-bit, assembly, bios, boot-sector, bootloader.

Latest release: 1.1.1
January 21, 2021View Changelog →

BootMine

Ever wanted to play minesweeper but didn't have an OS to run it in? No? Really no??

BootMine is an entire minesweeper game crammed into 512 bytes, the size of a BIOS boot sector. It can boot on any PC that supports BIOS booting, without running inside an OS. In a sense, BootMine is its own OS that can do nothing but run minesweeper.

demo

Controls

KeyAction
<kbd>Space</kbd>🔲 Clear cell
<kbd></kbd> <kbd></kbd> <kbd></kbd> <kbd></kbd>🕹 Move cursor
<kbd>Enter</kbd>🚩 Place flag
<kbd>R</kbd>💣 Restart game (only works on GAME WIN and GAME OVER screens)

Building

Make sure nasm and make are installed, then run:

sh
make

Alternatively, prebuilt versions can be downloaded from the
releases page.

Installing

The 512-byte file bootmine.img can be written to the first sector of a floppy disk (or USB drive), with a command like dd if=bootmine.img of=/dev/sdb. Keep in mind that this will effectively destroy all data on the drive.

Emulation

Makefile targets are provided for emulating in QEMU and Bochs.

sh
make qemu
sh
make bochs

NOTE: The way Bochs implements the rdtsc instruction appears to be bad as a source of entropy, so the bomb locations are predictable.

DOS

BootMine has DOS support too! Running make also produces bootmine.com that can be run in DOS. There are Makefile targets for easily running in DOSBox and DOSEMU.

sh
make dosbox
sh
make dosemu

Credits

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from io12/BootMine via the GitHub API.Last fetched: 6/28/2026