BeamNG.Earth
A 1:1 scale streamed Earth for BeamNG.drive: real elevation and satellite imagery, floating origin, LOD streaming from a companion server
DOS games, Linux programs and the demoscene's Windows intros, run from their original binaries in your browser tab — an x86 PC in plain JavaScript.
GamesJavaScript · AssemblyGitHub @jfrelat-labOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
An x86 PC in plain JavaScript: a dynamic recompiler from x86 to JavaScript, with DOS, Linux system calls and the Win32 API built in — DOS games, Linux programs and the demoscene's Windows intros run in the browser, no WebAssembly.
Taken from the repository README
Loading the full README.
Read the full README ↗An x86 PC written in plain JavaScript. A dynamic recompiler turns x86 machine code into JavaScript
source, and DOS, Linux's system calls and the Win32 API are built in: a .COM, an ELF or an .exe
runs at once, with no operating system to boot.
No WebAssembly, no build step, no dependencies beyond its sibling PRISM (a submodule, for OpenGL and Direct3D 9). It runs in a browser and in Node.
Try it: mirage-x86.pages.dev — Windows 4K intros, Linux programs of 1997, DOS games and demos, boot sectors and a FreeDOS disk, each a click away.
Every picture is a frame MIRAGE drew. Screenshots of Microsoft products used with permission from Microsoft.
x86 machine code ─▶ decoder ─▶ JS source ─▶ new Function ─▶ the engine's own JIT ─▶ run
(block by block, cached by linear address, aware of self-modifying code)
Four machines share one CPU: Windows (MIRAGE-WIN32, machines.html?m=win32), Linux
(MIRAGE-LINUX, machines.html?m=linux), DOS (dos.html: DOS, BIOS, XMS, EMS and a DPMI host in
JavaScript) and a bare PC (boot.html: BIOS, VGA and VBE, IDE, CD-ROM, Sound Blaster, OPL3 and
MIDI, enough to boot Windows 95 and 98 from their own disks).
| Reaches | |
|---|---|
| Windows intros (MIRAGE-WIN32) | 15 of the scene's 4K and 1K intros, 2007–2017, OpenGL and Direct3D 9 |
| Linux programs (MIRAGE-LINUX) | Debian 12, XFree86 3.3 and its clients, DOOM and Quake, Mesa, the scene's Linux intros |
| DOS | games and demos in real mode, with EMS/XMS and DOS extenders |
| Operating systems (bare PC) | Windows 3.0 to ME, NT 3.51 and 2000 to the desktop, BeOS 5, Linux 2.2 and 2.4, QNX, KolibriOS, OpenBSD, NetBSD, FreeDOS |
Not yet: Windows XP and later, ReactOS, Haiku, networking, 64-bit. Per-title status is in docs/COMPATIBILITY.md, what fails and why in docs/KNOWN-ISSUES.md.
Linux programs run at 450–460 M x86 instructions a second on Dhrystone; Windows 98 reaches its desktop in about 36 s. On 16-bit real-mode code MIRAGE leads: BYTE's Sieve runs in 4.9 s headless and 6.7 s in the page, against 6.2 s for native DOSBox-X. The WebAssembly emulators are faster on 32-bit code — v86 by 2.5 to 4 times on DOS, v86 and CheerpX by 6 to 9 times on Linux — and MIRAGE is ahead of js-dos and RetroTick. docs/BENCHMARKS.md has every figure and how to reproduce it.
python3 tools/serve.py 8761 # with the oasis-fetch relay OASIS images are fetched through; any static server runs the rest
# http://localhost:8761/ the home page, with the examples
# http://localhost:8761/machines.html DOS, Linux, Windows and the bare PC on one page
# http://localhost:8761/dos.html the DOS player: drop a .COM, .EXE or a folder
# http://localhost:8761/boot.html the bare PC: boot a floppy, hard-disk or ISO image
git clone --recursive https://github.com/jfrelat-lab/mirage-x86 # PRISM is a submodule
node tools/test.js # the unit suite
npm run test:all # every suite that needs nothing outside the repository
Node 22 (what it is developed on). The assembly sources under demos/ and tools/ need nasm only if you change
them; the assembled demos are checked in.
Against other machines, not against its own expectations: a unit suite whose every test fails when its fix is reverted, 44 golden programs, single-instruction tests against SingleStepTests and Unicorn, probe programs run unchanged under QEMU and MIRAGE, and whole-system comparisons with QEMU, DOSBox-X and v86. docs/TESTING.md has the details.
Start with docs/ARCHITECTURE.md; docs/README.md lists the rest — the recompiler, the devices, the machine a guest sees, what runs and what does not, the tests, OASIS images, the comparison with other emulators, the roadmap — and CHANGELOG.md what changed. docs/notes/ keeps the investigations as they were written.
The repository holds MIRAGE, its own small demos (demos/) and the home page's examples
(examples/): programs their authors allow passing on, each with its licence in examples/licenses/
(examples/README.md), and a FreeDOS 1.4 disk whose source is served beside it.
OASIS images are recipes: what they run is fetched from where its authors published it (Debian,
idgames, scene.org). PRISM is a submodule (MIT; its
THIRD-PARTY.md). Anything else you
run — boot/, games/, intros/, ignored by git — is yours to bring.
MIRAGE was written with Claude Code.
MIT. The licence covers MIRAGE itself, not the software you run on it.