Skip to content

File Structure

Retro Jack edited this page Jun 8, 2026 · 63 revisions

File Structure

genx-dos/
├── README.md                 one-page entry point
├── CHANGELOG.md
├── ATTRIBUTION.md            canonical record of every bundled third-party asset
├── serve.sh                  starts local http.server, opens browser
├── index.html                <meta refresh> to prompt/
├── favicon.ico
├── make_fonts.py             generates f12.N.png palette variants
│
├── prompt/                   the DOS terminal
│   ├── index.html
│   ├── favicon.ico
│   ├── animated_favicon1.gif
│   ├── javascript/
│   │   ├── globals.js        shared state (palette, paths, flags)
│   │   ├── goFontGo.js       builds the 256 CSS rules
│   │   ├── classUtils.js     add/remove/test class helpers
│   │   ├── keyboard.js       keypress / keydown handlers
│   │   ├── terminal.js       echo, executeBatch, prompt rendering
│   │   ├── fs.js             the virtual C: drive
│   │   ├── commands-core.js  dir, cd, type, find, attemptExec, handleCmd
│   │   ├── commands.js       echo, cls, setcol, help, easter eggs
│   │   └── init.js           entry point + AMIBIOS POST animation
│   └── img/
│       ├── ami-logo.png      AMIBIOS POST logo
│       ├── f12.7.png         master sprite sheet (light grey)
│       └── f12.<0-15>.png    CGA palette variants
│
├── gamedocs/                per-game instruction pages
│   └── <platform>/          one HTML file per game, named by URL param key
│
└── emulators/
    ├── _shared/             shared CSS for controls.html + corner-link styles
    │                        + genx-frame.css (universal play.html page reset + .err/.loading)
    │                        + genx-noscript.css (no-JS overlay)
    │                        + genx-game-loader.js (?game=KEY → games.json lookup helper)
    │                        + genx-numlock-warn.js (NumLock-off banner for VICE bundles)
    │                        + genx-vice-softkeys.js (RUN/STOP remap to Scroll Lock + soft button)
    ├── _shared-ejs/         shared EmulatorJS framework + 5 VICE cores + gearcoleco + FCEUmm cores
    │                        (9 bundles share; saves ~25 MB vs per-bundle copies)
    ├── apple1/               Apple I          (copied from Will Scullin's Apple I emulator)
    ├── jsbeeb/               BBC Micro        (copied from mattgodbolt/jsbeeb)
    ├── electron/             Acorn Electron   (copied from dmcoles/elkjs)
    ├── apple2/               Apple ][+        (copied from whscullin/apple2js)
    ├── jsnes/                NES              (EmulatorJS + FCEUmm libretro core)
    ├── javatari/             Atari 2600       (copied from ppeccin/javatari.js)
    ├── js7800/               Atari 7800       (copied from raz0red/JS7800)
    ├── webmsx/               MSX/MSX2         (mirror of ppeccin/WebMSX; engine supports MSX2+ but we don't expose it)
    ├── jsvecx/               Vectrex          (copied from DrSnuggles/jsvecx)
    ├── jsspeccy/             Sinclair Spectrum (copied from gasman/JSSpeccy 3)
    ├── jtyone/               Sinclair ZX81    (copied from hammingweight/JtyOne)
    ├── xroar/                Tandy CoCo       (copied from 6809.org.uk/xroar)
    ├── atari800/             Atari 400 + 800XL (atari800/atari800 v5.2.0, built from source to WASM)
    ├── pet/                  Commodore PET     (EmulatorJS + VICE xpet libretro core)
    ├── vic20/                Commodore VIC-20  (EmulatorJS + VICE xvic libretro core)
    ├── max/                  Commodore MAX Machine (EmulatorJS + VICE x64 in Ultimax mode)
    ├── c64/                  Commodore 64      (EmulatorJS + VICE x64 libretro core)
    ├── c16/                  Commodore 16      (EmulatorJS + VICE xplus4 in c16pal mode)
    ├── plus4/                Commodore Plus/4  (EmulatorJS + VICE xplus4 libretro core)
    ├── c128/                 Commodore 128     (EmulatorJS + VICE x128 native mode)
    ├── coleco/               ColecoVision      (EmulatorJS + gearcoleco libretro core + colecovision.rom BIOS)
    ├── intellivision/        Mattel Intellivision (jzIntv WASM, custom emscripten loader + exec.bin/grom.bin BIOS)
    └── amstradcpc/           Amstrad CPC          (floooh/chips-test tiny8bit CPC WASM, MIT, no BIOS)

Per-emulator layout

Emulator Runtime Wrapper Game files
jsbeeb/ dist/ (Vite build) the dist's own index.html (URL-driven) dist/discs/<publisher>/*.ssd
electron/ ElkJS pure-JS Acorn Electron emulator (dmcoles/elkjs) + jQuery play.html (accepts ?game=<key>) 10× .uef snapshot files
apple2/ apple2js webpack dist (dist/main2.bundle.js + chunks) play.html (accepts ?game=<key>, rewrites to apple2js ?disk=) json/disks/*.json (base64 DSK sectors)
jsnes/ EmulatorJS framework + FCEUmm libretro core (_shared-ejs/ejs/data/cores/fceumm-legacy-wasm.data, ~1.05 MB) play.html (accepts ?game=<key>) 10× .nes cart images in roms/
javatari/ javatari.js play.html roms/*.a26
js7800/ js/js7800.min.js + js/bupboop.wasm play.html roms/*.a78
webmsx/ single 5 MB index.html (engine + UI + BIOSes inlined) the bundle's own index.html (URL-driven) games/msx1/*.zip + games/msx2/*.zip
jsvecx/ index.html (single-file minified bundle; the entire engine is inlined) + js/rtm.js (dynamically loaded by the Show Chips toggle only) index.html?rom=… (URL-driven; upstream alternate entry points pruned 07/06/2026 — see Emulators wiki) roms/<publisher_or_author>/*.bin (~500 ROMs total; 24 commercial in Commercial/ + ~470 homebrew/demo subdirs)
jsspeccy/ jsspeccy/jsspeccy.js + jsspeccy-core.wasm (Z80 in Web Worker) play.html games/*.z80
jtyone/ zx81_emu.js + roms/zx81.rom play.html tapes/*.p.hex (raw bytes hex-encoded)
xroar/ xroar.js + xroar.wasm + 9 system ROMs play.html roms/*.ccc
atari800/ atari800.js + atari800.wasm (AltirraOS-XL + AltirraOS-800 + AltirraBASIC baked in via --enable-altirra_bios) play.html (accepts ?game=<key> and ?machine=400|800|xl|xe|xegs) roms/*.atr + roms/*.rom (cart); 800XL menu uses 10 disk-era titles, 400 menu uses 11 cart-era titles (incl. Choplifter, sharing starraid.rom with 800XL)
pet/ EmulatorJS framework + VICE xpet libretro core (ejs/data/cores/vice_xpet-legacy-wasm.data, 1.4 MB) play.html (accepts ?game=<key>; reads optional per-game model field from games.json; defaults to PET 3032, overrides to 4032 for PETSCII Robots) .prg BASIC programs + PETSCII Robots .d64 + empty.prg for BASIC entry, under games/
vic20/ EmulatorJS framework + VICE xvic libretro core (ejs/data/cores/vice_xvic-legacy-wasm.data, 1.1 MB) play.html (accepts ?game=<key>; sets vice_vic20_memory_expansions='all' for full 35K) 10× cartridge .prg (load at $A000), under games/
max/ EmulatorJS framework + VICE x64 libretro core in Ultimax mode (vice_c64_model='ultimax', 2 KB RAM, no built-in BASIC) play.html (accepts ?game=<key>) 10× .crt Ultimax-format cartridges + MAX BASIC cart, under games/
c64/ EmulatorJS framework + VICE x64 libretro core (ejs/data/cores/vice_x64-legacy-wasm.data, 1.2 MB) play.html (accepts ?game=<key>) 10× .d64 disk images + empty.prg for BASIC entry, under games/
c16/ EmulatorJS framework + VICE xplus4 libretro core in C16 mode (vice_plus4_model='c16pal', 16K RAM) play.html (accepts ?game=<key>; shares xplus4 core w/ Plus/4) 10× .prg first-in-series C16 16K titles, under games/
plus4/ EmulatorJS framework + VICE xplus4 libretro core (ejs/data/cores/vice_xplus4-legacy-wasm.data, 1.2 MB) play.html (accepts ?game=<key>) 10× .prg Plus/4 titles + empty.prg, under games/
c128/ EmulatorJS framework + VICE x128 libretro core (ejs/data/cores/vice_x128-legacy-wasm.data, 1.6 MB) in native mode (vice_c128_go64='disabled') play.html (accepts ?game=<key>; per-game video field toggles VICII/VDC) 5 commercial + 5 homebrew titles, under games/
coleco/ EmulatorJS framework + gearcoleco libretro core (_shared-ejs/ejs/data/cores/gearcoleco-legacy-wasm.data, ~870 KB) + colecovision.rom BIOS (bundle-local, wired via EJS_biosUrl) play.html (accepts ?game=<key>) 10× .col cart images, under games/
amstradcpc/ floooh/chips-test "tiny8bit" CPC WASM (cpc.js + cpc.wasm, mirrored from floooh.github.io/tiny8bit/) play.html (accepts ?game=<key>; rewrites URL to ?file=&input= for sokol_args; no ?game= → Locomotive BASIC) 10× .dsk disk images in games/
intellivision/ jzIntv compiled to WASM — bundle-local jzintv.js (127 KB) + jzintv.wasm (364 KB) + jzintv.data (custom desk.kbd preload, 1.2 KB) + exec.bin (8 KB) + grom.bin (2 KB) play.html (accepts ?game=<key>) — fetches BIOS + ROM via fetch(), hands buffers to Module.launchJzintv() which writes them into the WASM FS and runs the emulator 10× .int cart images, under games/
odyssey2/ libretro-o2em compiled to WASM with a custom SDL2/emscripten frontend (frontend.c ~200 LOC) — bundle-local o2em.js (172 KB) + o2em.wasm (840 KB) + o2rom.bin (1 KB BIOS) + build.sh (reproducible recipe, requires emsdk) play.html (accepts ?game=<key>) — uses shared genxLoadGame() to resolve the key, fetches BIOS + cart in parallel, writes both into MEMFS via Module.preRun, then calls createO2EM(Module) to start the runtime 10× .bin cart images, under games/

Each play.html-based emulator also has a games.json mapping <key>{title, rom} (or {title, bundle}). The URL-driven emulators (jsbeeb, webmsx, jsvecx) take all their config via query string or hash and need no per-site wrapper.

Notes on individual files

File Purpose
index.html (repo root) <meta refresh> to prompt/ — the POST animation lives in the prompt page now
prompt/index.html Loads the JS modules in order, hosts the terminal <div>
prompt/img/ami-logo.png AMIBIOS POST splash logo
prompt/img/f12.7.png 192×192 px, 16×16 grid of 12×12 px CP437 glyphs (light grey)
prompt/img/f12.<N>.png Pre-tinted variant for CGA palette index N
make_fonts.py One-shot PIL script that tints f12.7.png into the other variants
serve.sh python3 -m http.server 8765 wrapper that also opens the browser

Clone this wiki locally