BeamNG.Earth
A 1:1 scale streamed Earth for BeamNG.drive: real elevation and satellite imagery, floating origin, LOD streaming from a companion server
A FantasyConsole compiled as WebAssembly and written in Zig
Translation pending
GamesZig · JavaScriptGitHub @shazzOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
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
Loading the full README. The saved excerpt is shown below.
A Fantasy Console (or Fantasy Computer, not sure) written in Zig and running in the browser as a Web Assembly binary. The ZigMachine is dedicated to provide a fun sandbox to learn how to code oldskool effects as no advanced features are provided, only the basics of the 80s computers and video game consoles.
This project is inspired by WAB and CODEF by my friend NoNameNo who... already more than 10 years ago... provided a way to code oldskool effects in the browser without Flash but only HTML5 and javascript. Time to go one step further. 0% Flash, 0% HTML, 0% Javascript, only Zig!Read the full README ↗A Fantasy Console (or Fantasy Computer, not sure) written in Zig and running in the browser as a Web Assembly binary. The ZigMachine is dedicated to provide a fun sandbox to learn how to code oldskool effects as no advanced features are provided, only the basics of the 80s computers and video game consoles.
This project is inspired by WAB and CODEF by my friend NoNameNo who... already more than 10 years ago... provided a way to code oldskool effects in the browser without Flash but only HTML5 and javascript. Time to go one step further. 0% Flash, 0% HTML, 0% Javascript, only Zig!
Screenshots and live version below!
Live website with the latest build: ZigMachine (Click on the + and - buttons to change channels!)
The big idea, and the thing that makes this more than a demo loop: the hardware is a separate binary from the software running on it.
The browser loads four wasm modules that share ONE WebAssembly.Memory:
| module | thread | what it is |
|---|---|---|
machine-video.wasm | main | the sealed video hardware — shifter, borders, blitter |
machine-audio.wasm | worklet | the sealed sound hardware — YM2149 + 4 sample channels |
demo.wasm | main | your code: the cart currently in the slot |
demo-audio.wasm | worklet | your players, driving the sound chips |
They talk through a memory-mapped register ABI (machine/sdk/), exactly like poking hardware registers on a real machine. The app cannot reach inside the hardware, and the hardware cannot see the app — so the machine can be handed to someone else and still behave.
A fifth module, rom.wasm, is the system software (GEM — a desktop, windows, dialogs and a file manager), which carts call through a flat handle-based ABI rather than linking it.
The host JavaScript is deliberately dumb: it is glass and a speaker. It blits the framebuffer, forwards input, and plays the file a scene asks for. Everything else happens in wasm.
The specs will keep evolving, but they try to match what I would have loved to get in the 80-90s:
copper helper for per-line palette tables.rom.wasm: a TOS-1.00-style desktop with windows, icons, dialogs, drag and drop, rename, and DESKTOP.INF..zmd) with a FAT and a bootable sector; GEM can launch one off the disk, and an app can quit back to the desktop.Reusable oldskool effects: scrolltexts (with X/Y offset tables), 2D/3D starfields, 3D transforms, triangle/line/pixel drawing, sprites, bobs, fades, tile engines, parallax, and a clipped signed-coordinate blitter.
The seal is a wasm ABI, not a Zig API, so a cart can be written in anything that compiles to wasm. apps/c/ and apps/rust/ hold working carts — including a full cracktro port in C that opens the borders with the same resolution-flicker trick, driven entirely by register pokes and an exported HBL callback from C.
apps/zig/scenes/ the Zig scenes (one cart each)
apps/c/scenes/ C carts apps/rust/ Rust carts
machine/ the sealed hardware + its SDK headers
rom/ system software (GEM)
libs/{zig,c,rust}/ reusable libraries (ZigOS lives in libs/zig)
docs/ the web root, the built wasm, and the API docs
34 screens ship as cartridges, most of them ports of Atari ST cracktros and demo screens from WAB's CODEF remakes. The + / − buttons on the monitor step through them like TV channels, with an analogue-noise transition; the boot menu lists them all.
Credit belongs to the originals. Each scene's source header names the demo, its coders, graphicians and musicians, and the author of the CODEF remake it was read from. CODEF itself is MIT-licensed. The music is from the SNDH archive; the SAP TEST screen's Atari 8-bit tunes are from ASMA, the Atari SAP Music Archive: Warhawk (Rob Hubbard), Gauntlet (Ben Daglish), Barbarian (Jakub Husak), Ninja (Steve Coleman, ASMA's attribution is uncertain) and BMX Simulator (David Whittaker), and FUJI HOBBYTRONIC's Hobbytronic '92 - 1 (Stephan Duesterhoeft, Benjy, 1992) comes from there too. If you are one of the original authors and would rather your work were not here, please open an issue.
docs/HW_API.md — the sealed hardware ABIdocs/ZIGOS_API.md — the open librarydocs/HARDWARE_SPEC.md — design and statusdocs/FLOPPY_DISK.md — the disk formatdecisions.md — architecture decision recordsThe only target is wasm32-freestanding-musl.
./build.sh
That builds every module and cart, then runs the gate: RAM-window checks, the native tests, a repack of every floppy, and headless harnesses that drive the real machine end to end. Use it instead of a bare zig build — the failures it catches are the silent ones, like a cart overrunning its window and corrupting the video region instead of trapping. docs/BUILDING.md covers the faster variants (--changed, --only, --fast) and what the pre-push hook runs.
./serve.sh # serves docs/ with no-store caching
Then open http://localhost:3333. Hard-reload (Ctrl+Shift+R) after a rebuild.
To boot straight into one cart: http://localhost:3333/?demo=demo-dbug.wasm
Want to add things? Please leave a message in the Discussions.