Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/io12/BootMine
Bootable minesweeper game in a 512-byte boot sector
https://github.com/io12/BootMine
16-bit assembly bios boot-sector bootloader dos game golf mbr mines minesweeper x86
Last synced: 2 months ago
JSON representation
Bootable minesweeper game in a 512-byte boot sector
- Host: GitHub
- URL: https://github.com/io12/BootMine
- Owner: io12
- License: mit
- Created: 2020-05-28T07:48:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-21T04:53:31.000Z (about 4 years ago)
- Last Synced: 2024-08-05T10:09:21.031Z (6 months ago)
- Topics: 16-bit, assembly, bios, boot-sector, bootloader, dos, game, golf, mbr, mines, minesweeper, x86
- Language: Assembly
- Homepage:
- Size: 232 KB
- Stars: 165
- Watchers: 4
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](demo.gif)
## Controls
| Key | Action |
|-----------------------------------------------------|-----------------------------------------------------------------|
| Space | 🔲 Clear cell |
| ↑ ↓ ← → | 🕹 Move cursor |
| Enter | 🚩 Place flag |
| R | 💣 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](https://github.com/io12/BootMine/releases).## 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
```## Links
* [Hacker News discussion](https://news.ycombinator.com/item?id=23360133)
## Credits
* [nanochess](https://github.com/nanochess), for his excellent collection of boot sector games
* Curt Johnson and Robert Donner, for [*Microsoft Minesweeper*](https://en.wikipedia.org/wiki/Microsoft_Minesweeper), popularizing the game