Skip to content

Virtual Filesystem

Retro Jack edited this page May 16, 2026 · 56 revisions

Virtual Filesystem

The simulated C: drive lives in prompt/javascript/fs.js as a JS object tree. Every directory and file in the prompt is defined here.

Top-level layout

C:\
├── AUTOEXEC.BAT          runs on boot — calls `menu`
├── menu.bat              `cd emulators\nmenu` (drops straight into the EMULATOR LAUNCHER)
└── EMULATORS\
    ├── DOS\              MS-DOS games (self-hosted, jsdos)
    │   ├── DUKE\         Duke Nukem 1, II, 3D
    │   └── KEEN\         Commander Keen 1-6 + Keen Dreams
    ├── CONSOLE\          ATARI (2600 / 7800) / NINTENDO (NES) / SEGA (GENESIS) /
    │                     MATTEL (INTV) / COLECO (CVISION) / MAGNAVOX (ODYSSEY2) /
    │                     SMITH-ENG (VECTREX)
    └── HOMECOMP\         ACORN (BBC / ARCHIMDS) / COMMODRE (C64) /
                          ATARI (800XL / ST) / SINCLAIR (SPECTRUM / ZX81) /
                          TANDY (COCO) / MSX (MSX1 / MSX2)

Self-hosted vs placeholder systems

All 14 self-hosted systems run their games locally — every byte of ROM is on the same origin. The remaining 4 systems are placeholders without an emulator yet.

System Backing emulator
DOS jsdos (emulators/jsdos/)
CONSOLE → NINTENDO → NES JSNES (emulators/jsnes/)
CONSOLE → SEGA → GENESIS lrusso/Genesis (emulators/genesis/)
CONSOLE → ATARI → 2600 javatari.js (emulators/javatari/)
CONSOLE → ATARI → 7800 JS7800 (emulators/js7800/)
CONSOLE → SMITH-ENG → VECTREX DrSnuggles/jsvecx (emulators/jsvecx/)
HOMECOMP → ACORN → BBC jsbeeb (emulators/jsbeeb/)
HOMECOMP → ACORN → ARCHIMDS archimedes-live (emulators/archimedes-live/)
HOMECOMP → ATARI → 800XL atari800 v5.2.0 built to WASM + AltirraOS-XL (emulators/atari800/)
HOMECOMP → ATARI → ST EstyJS + EmuTOS (emulators/estyjs/)
HOMECOMP → SINCLAIR → SPECTRUM JSSpeccy 3 (emulators/jsspeccy/)
HOMECOMP → SINCLAIR → ZX81 JtyOne (emulators/jtyone/)
HOMECOMP → TANDY → COCO XRoar (emulators/xroar/)
HOMECOMP → MSX → MSX1 / MSX2 WebMSX (emulators/webmsx/)
Placeholders (no emulator yet) INTV, CVISION, ODYSSEY2, C64

Self-hosted systems have 10 games each plus a PROMPT (command-line systems) or DESKTOP (RISC OS) entry that boots a clean machine. MSX has 10 + 10 (MSX1 + MSX2 sub-menus). Placeholder GAMES menus collapse to a single (No locally-hosted titles yet) line + Back option.

See Emulators for the integration recipe and how to add more systems.

Per-system menu pattern

A typical <SYSTEM>\GAMES\ directory looks like:

GAMES\
├── menu.bat              numbered title list (45-char wide CP437 box)
├── 0.bat                 cd .. / cd .. / menu (back two levels)
├── 1.bat .. N.bat        each runs a named .bat
└── <key>.bat             one per title, with link: → emulator URL

Navigation (NES example):

1   → cd emulators / menu        (EMULATOR LAUNCHER → CONSOLE / HOMECOMP)
2   → cd console / menu          (CONSOLE SYSTEMS)
2   → cd nintendo / menu         (NINTENDO CONSOLES)
1   → cd nes / cd games / menu   (NES GAMES)
3   → contra                     (opens emulators/jsnes/play.html?game=contra)
0   → cd .. / cd .. / menu       (back to NINTENDO menu)

File object schema

A node in fs.js is { name, directories?, files? } for directories, or one of these for files:

Field on a file Meaning
data: '<batch>' Treats the "file" as a batch script — each \n-separated line is dispatched as a command
link: '<url>' Treats the file as a launcher — window.open(link, "_blank")
hidden: true Hidden from dir output (still navigable via cd)

Game .bat files use link: to the emulator wrapper. menu.bat and numbered launchers use data:.

See Customising the Filesystem for examples of adding entries.

Clone this wiki locally