# DOS Arcade

`dosarcade.img` is a 1.44 MB FAT12 boot floppy. It runs on [v86](https://github.com/copy/v86) (BSD-2-Clause, self-hosted in `/v86`, see `/v86/LICENSE`) with the SeaBIOS and VGA BIOS images in the same folder. FreeDOS boots from it and `AUTOEXEC.BAT` opens a small batch menu with three games. Everything runs in the visitor's browser and nothing is saved.

The image was put together for this site by a small Node script that writes FAT12. It copies the FreeDOS boot sector code from `/v86/images/freedos722.img` and gives it a 1.44 MB BPB. The script is not shipped; the image is reproducible from the files listed below.

## What is on the disk

| Path on disk | What it is | Where it came from | Licence |
| --- | --- | --- | --- |
| boot sector code, `KERNEL.SYS` | FreeDOS kernel | Copied unchanged from the FreeDOS "Ripcord" boot floppy at `/v86/images/freedos722.img` (kernel dated 2012-04-07). Source: https://github.com/FDOS/kernel | GPL-2.0, `licenses/GPL-2.0.txt` |
| `COMMAND.COM` | FreeCOM shell | Same floppy (file dated 2003-12-10). Source: https://github.com/FDOS/freecom | GPL-2.0 |
| `HIMEM.EXE` | FreeDOS XMS driver | Same floppy, `FDOS\HIMEM.EXE` (dated 2003-02-13). Source: https://github.com/FDOS (himem) and the FreeDOS ibiblio archive | GPL-2.0 |
| `CONFIG.SYS`, `AUTOEXEC.BAT`, `MENU.BAT` | Boot config and game menu | Written for this site | Public domain (CC0) |
| `KEY.COM` | 8-byte keypress reader for the menu (`mov ah,0; int 16h; mov ah,4Ch; int 21h`: waits for a key and exits with its ASCII code as the errorlevel) | Written for this site | Public domain (CC0) |
| `PAKU\*` | **Paku Paku 1.6** by Jason M. Knight: a Pac-Man clone in a 160x100 text mode | FreeDOS package `pakupaku` 2025-06-06.2, https://fd.lod.bz/repos/latest/games/pakupaku/20250606.2/pakupaku.zip. All files from `GAMES\PAKUPAKU` unchanged, including `README.HTM` | Public domain (see below), `licenses/paku-paku-readme.htm` |
| `FLPYBIRD\*` | **Floppy Bird 1.0a** by Mihail Szabolcs: a Flappy Bird clone in 16-bit assembly | FreeDOS package `flpybird` 2025-04-09.9, https://fd.lod.bz/repos/latest/games/flpybird/20250409.9/flpybird.zip. `FLPYBIRD.COM`, `LICENSE` and `README.MD` unchanged. Source: https://github.com/icebreaker/floppybird | MIT, `licenses/floppy-bird-MIT.txt` |
| `VITETRIS\*` | **vitetris 0.55** by Victor Nilsson: a text-mode Tetris clone (32-bit DJGPP build) | FreeDOS package `vitetris` 2025-04-10.1, https://fd.lod.bz/repos/latest/games/vitetris.zip. `TETRIS.EXE`, `VITETRIS.CFG`, `README.TXT`, `README.DOS`, `LICENCE.TXT` unchanged. Homepage: http://victornils.net/tetris | BSD-2-Clause, `licenses/vitetris-BSD-2-Clause.txt` |
| `VITETRIS\CWSDPMI.EXE`, `CWSDPMI.DOC` | CWSDPMI r5 DPMI host by Charles W. Sandmann, which vitetris needs in plain DOS | Same vitetris package, unchanged | Redistributable without source when unmodified (terms in `licenses/CWSDPMI.txt`). You have the right to receive its source code; it is available from http://clio.rice.edu/cwsdpmi/ |
| `LICENSES\GPL2.TXT` | GPL version 2 text | `DOC\SENET\COPYING` from the FreeDOS `senet` package | (licence text) |

## Licence statements, quoted from the packages

- **Paku Paku**, `PAKU\README.HTM`: "Source Code (C) Jason M Knight and released to the public domain. [...] Feel free to do what you like with the code so long as you remain within the scope and practices of International Copyright law by giving credit to the original author - Jason M. Knight." The FreeDOS package metadata (`APPINFO\PAKUPAKU.LSM`) says `Copying-Policy: Public Domain`. The readme also calls the game "Cardware" and asks players who enjoy it to send the author a postcard; that is a request, not a condition.
- **Floppy Bird**, `FLPYBIRD\LICENSE`: "MIT LICENSE, Copyright (c) 2014, Mihail Szabolcs". The full text is in `licenses/floppy-bird-MIT.txt`.
- **vitetris**, `VITETRIS\LICENCE.TXT`: "Copyright (c) 2007-2008 Victor Nilsson. All rights reserved." followed by the two-clause BSD conditions. The full text is in `licenses/vitetris-BSD-2-Clause.txt`.
- **CWSDPMI**, `CWSDPMI.DOC`: "The files in this binary distribution may be redistributed under the GPL (with source) or without the source code provided: CWSDPMI.EXE or CWSDPR0.EXE are not modified in any way [...]".
- **FreeDOS kernel, FreeCOM, HIMEM**: GNU GPL version 2. They are unmodified binaries; the corresponding source is published by the FreeDOS project at the URLs above.

## Changes made

None of the game or system binaries were modified. The only new files are the boot config, the menu batch file and `KEY.COM`. `CONFIG.SYS` loads `HIMEM.EXE` with `DOS=HIGH` so that the kernel moves out of low memory. Floppy Bird draws to a back buffer at a fixed address (segment 2200h), and without `DOS=HIGH` that buffer lands on top of COMMAND.COM.

## Controls

- Menu: `1`, `2`, `3` to start a game, `Q` or `Esc` to drop to the FreeDOS prompt (type `MENU` to come back).
- Paku Paku: arrows or WASD, Enter starts, Esc leaves the game and then the program.
- Floppy Bird: Space flaps. Esc on its title screen returns to the menu.
- vitetris: arrows, Space hard-drops, Enter or P pauses, Q quits.

## Rebuilding

`src/mkfloppy.js` is the Node FAT12 writer that produced `dosarcade.img`. Bump the `?v=` query in `app/play/dos-arcade/DosArcade.tsx` after rebuilding, because `public/` files are cached for a day.
