Skip to content

File Structure

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

File Structure

A tour of where things live in the repo. The shape is deliberately flat — no src/ vs dist/ distinction, no build outputs, no node_modules. Everything you see is what gets served.

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
│   │   └── 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 used by every gamedoc + controls.html (305 pages)
    │                        + corner controls-link CSS/JS
    │                        + 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)
    │                        + bezels/   PNG monitor frames (PC.png live on the prompt; others staging)
    │                        + textures/ 70s wallpaper tile (sitewide body background)
    ├── _shared-ejs/         shared EmulatorJS framework + 4 VICE cores + gearcoleco + FCEUmm cores
    │                        (8 bundles share; saves ~25 MB vs per-bundle copies)
    ├── apple1/              Apple I            (copied from scullin/apple1js)
    ├── apple2/              Apple ][+          (copied from whscullin/apple2js)
    ├── jsbeeb/              BBC Micro + Master 128 (copied from mattgodbolt/jsbeeb)
    ├── electron/            Acorn Electron     (copied from dmcoles/elkjs)
    ├── jsnes/               NES                (EmulatorJS + FCEUmm libretro core)
    ├── stella/              Atari 2600         (EmulatorJS + Stella, stella2014 core)
    ├── js7800/              Atari 7800         (copied from raz0red/JS7800)
    ├── webmsx/              MSX/MSX2           (mirror of ppeccin/WebMSX)
    ├── jsvecx/              Vectrex            (copied from DrSnuggles/jsvecx)
    ├── jsspeccy/            Sinclair Spectrum  (copied from gasman/JSSpeccy 3)
    ├── jtyone/              Sinclair ZX81      (copied from JtyOne)
    ├── xroar/               Tandy CoCo         (copied from 6809.org.uk/xroar)
    ├── js99er/              TI-99/4A           (copied from Rasmus-M/js99er — vanilla-JS build)
    ├── atari800/            Atari 400 + 800XL  (built from source to WASM)
    ├── pet/                 Commodore PET      (Thomas Skibo's pet2001 — vanilla JS)
    ├── vic20/               Commodore VIC-20   (EmulatorJS + VICE xvic)
    ├── max/                 Commodore MAX      (EmulatorJS + VICE x64 in Ultimax mode)
    ├── c64/                 Commodore 64       (EmulatorJS + VICE x64)
    ├── c16/                 Commodore 16       (EmulatorJS + VICE xplus4 in c16pal mode)
    ├── plus4/               Commodore Plus/4   (EmulatorJS + VICE xplus4)
    ├── c128/                Commodore 128      (EmulatorJS + VICE x128 native mode)
    ├── coleco/              ColecoVision       (EmulatorJS + gearcoleco + BIOS)
    ├── intellivision/       Intellivision      (jzIntv WASM + custom loader + BIOS)
    ├── odyssey2/            Magnavox Odyssey²  (libretro-o2em + custom SDL2 frontend + BIOS)
    └── amstradcpc/          Amstrad CPC        (floooh/chips-test tiny8bit CPC WASM)

Per-emulator layout

Every emulator-specific page can be told in one row. Where there's an integration story behind the layout, the engine article on the Emulators index goes into the detail.

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 + jQuery play.html (?game=<key>) 10× .uef snapshots
apple1/ apple1js pure-JS play.html (?game=<key>) tapes/*.js
apple2/ apple2js webpack dist play.html (rewrites ?game= → apple2js ?disk=) json/disks/*.json
jsnes/ EmulatorJS + FCEUmm libretro core play.html (?game=<key>) roms/*.nes
stella/ EmulatorJS (shared _shared-ejs/) 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/ single-file minified index.html index.html?rom=… (URL-driven) Commercial/*.bin
jsspeccy/ jsspeccy/jsspeccy.js + WASM Z80 in Web Worker play.html games/*.z80/*.tap
jtyone/ zx81_emu.js + roms/zx81.rom play.html tapes/*.p
xroar/ xroar.js + xroar.wasm + 9 system ROMs play.html roms/*.ccc
js99er/ vanilla-JS modules + lib/ (jQuery + zip.js) play.html (.rpk first, .bin fallback) carts/*.rpk
atari800/ atari800.js + atari800.wasm (AltirraOS baked in) play.html (?game=<key> + ?machine=…) roms/*.atr + *.rom
pet, vic20, max, c64, c16, plus4, c128 EmulatorJS framework + VICE libretro core (shared) play.html (per-game model/video overrides) games/*.prg/*.d64/*.crt
coleco/ EmulatorJS + gearcoleco + colecovision.rom BIOS play.html (EJS_defaultControls numpad remap) games/*.col
amstradcpc/ floooh/tiny8bit CPC WASM play.html (URL rewrite to sokol_args ?file=&input=) games/*.dsk
intellivision/ jzIntv WASM + exec.bin + grom.bin BIOS play.html (calls Module.launchJzintv()) games/*.int
odyssey2/ libretro-o2em + custom SDL2 frontend + o2rom.bin BIOS play.html (uses shared genxLoadGame()) games/*.bin

Each play.html-based emulator 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