-
Notifications
You must be signed in to change notification settings - Fork 0
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.
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)
All 16 self-hosted sub-systems run their games locally — every byte of game data is on the same origin. The remaining 3 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 → 400 | atari800 v5.2.0 (emulators/atari800/, ?machine=atari → OS-B / AltirraOS-800) |
| HOMECOMP → ATARI → 800XL | atari800 v5.2.0 (emulators/atari800/, default → AltirraOS-XL) |
| 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/) |
| HOMECOMP → COMMODRE → C64 | EmulatorJS + VICE x64 (emulators/c64/) — self-hosted; 10 .d64 disk images, real-time IEC loading, loud authentic 1541 drive sounds during loads |
| Placeholders (no emulator yet) | INTV, CVISION, ODYSSEY2 |
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.
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)
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:.
No .html files in the tree. The virtual filesystem only lists .bat files — game launchers, menu scripts, and the numbered shortcuts that route between them. Auxiliary HTML pages (each emulator's controls.html, future bezels, etc.) live on disk under emulators/<name>/ but are reached from inside the emulator's entry HTML (via a corner link), not from the DOS prompt. Period-correct: a DOS user typing dir shouldn't see .html.
See Customising the Filesystem for examples of adding entries.