-
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 (PET / VIC20 / MAX / C64 / C16 / PLUS4) /
ATARI (400 / 800XL / ST) / SINCLAIR (SPECTRUM / ZX81) /
TANDY (COCO) / MSX (MSX1 / MSX2)
All 22 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 → PET | EmulatorJS + VICE xpet (emulators/pet/) — default model 3032 (BASIC 2 chargen); per-game override to 4032 for PETSCII Robots; 9 .prg classics + the PETSCII Robots shareware .d64 (David Murray, 2022) |
| HOMECOMP → COMMODRE → VIC20 | EmulatorJS + VICE xvic (emulators/vic20/) — 10 cartridge .prgs loading at $A000; vice_vic20_memory_expansions='all' gives the full 35K expansion |
| HOMECOMP → COMMODRE → MAX | EmulatorJS + VICE x64 in Ultimax mode (emulators/max/) — Japan-only 1982 console, 2 KB RAM + cart-only; 8 .crt carts (TOSEC + Internet Archive Slalom + Multimax-extracted) + MAX BASIC cart |
| HOMECOMP → COMMODRE → C64 | EmulatorJS + VICE x64 (emulators/c64/) — 10 .d64 disk images; real-time IEC loading with authentic 1541 drive sounds during loads |
| HOMECOMP → COMMODRE → C16 | EmulatorJS + VICE xplus4 in C16 mode (emulators/c16/) — vice_plus4_model='c16pal' for 16K RAM; 10 first-in-series C16 16K .prgs from plus4world.com |
| HOMECOMP → COMMODRE → PLUS4 | EmulatorJS + VICE xplus4 (emulators/plus4/) — 10 first-in-series Plus/4 classics from plus4world.com |
| Placeholders (no emulator yet) | INTV, CVISION, ODYSSEY2 |
All six VICE-family bundles ship the same input config: keyboardInput: 'enabled' + altKeyboardInput: 'enabled' (typed keys → VICE keyboard callback) + vice_joyport_type: '1' for the five with a joystick port (PET excepted — no joystick). Numpad 8/4/6/2 drives joystick directions; 0 or 5 is fire; everything else types. A defensive UX banner (emulators/_shared/genx-numlock-warn.js) fires after the first keydown if NumLock is off.
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.