-
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 (jsdos)
│ ├── DUKE\ Duke Nukem 1, II, 3D
│ └── KEEN\ Commander Keen 1-6 + Keen Dreams
├── CONSOLE\ ATARI (2600 / 7800) / CVISION / INTV / NES /
│ ODYSSEY2 / VECTREX
└── HOMECOMP\ APPLE (APPLE1 / APPLEII) /
COMMODRE (PET / VIC20 / MAX / C64 / C16 / PLUS4 / C128) /
ATARI (400 / 800XL) / ACORN (BBC / ELECTRON / MASTER) /
SINCLAIR (SPECTRUM / ZX81) /
CPC / COCO / MSX (MSX1 / MSX2)
All 27 bundled sub-systems run their games locally — every byte of game data is on the same origin. One system (Magnavox Odyssey²) remains as a placeholder without an emulator yet.
| System | Backing emulator |
|---|---|
| DOS | jsdos (emulators/jsdos/) |
| CONSOLE → NES | EmulatorJS + FCEUmm libretro core (emulators/jsnes/) |
| CONSOLE → ATARI → 2600 | javatari.js (emulators/javatari/) |
| CONSOLE → ATARI → 7800 | JS7800 (emulators/js7800/) |
| CONSOLE → VECTREX | DrSnuggles/jsvecx (emulators/jsvecx/) |
| CONSOLE → CVISION | EmulatorJS + gearcoleco (emulators/coleco/) — 10 1982/83 launch-era classics: Donkey Kong (pack-in), Cosmic Avenger, Lady Bug, Mouse Trap, Carnival, Venture, Smurf, Zaxxon, Mr. Do!, Q*bert; BIOS colecovision.rom (©1982 Coleco) bundled |
| CONSOLE → INTV | jzIntv WASM (emulators/intellivision/) — 10 first-in-series Mattel + Imagic classics: Astrosmash, BurgerTime, TRON: Deadly Discs, Snafu, B-17 Bomber, Night Stalker, Adventure (AD&D), Atlantis, Lock 'N' Chase, Star Strike; BIOS exec.bin + grom.bin (©1979 Mattel) bundled |
| HOMECOMP → ACORN → BBC | jsbeeb (emulators/jsbeeb/) — 10 BBC Micro disc games + BASIC prompt |
| HOMECOMP → ACORN → ELECTRON | ElkJS (emulators/electron/) — 10 UEF snapshot games + Electron BASIC prompt |
| HOMECOMP → ACORN → MASTER | jsbeeb (emulators/jsbeeb/, ?model=Master) — 10 Master-enhanced titles + BBC BASIC prompt. Elite uses DSD (double-sided disc) for drive 2 access |
| HOMECOMP → APPLE → APPLE1 | apple1js (emulators/apple1/) — 10 cassette tape games + Woz Monitor prompt |
| HOMECOMP → APPLE → APPLEII | apple2js (emulators/apple2/) — 10 first-in-series classics + Applesoft BASIC prompt |
| 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 → SINCLAIR → SPECTRUM | JSSpeccy 3 (emulators/jsspeccy/) |
| HOMECOMP → SINCLAIR → ZX81 | JtyOne (emulators/jtyone/) |
| HOMECOMP → CPC | floooh tiny8bit CPC WASM (emulators/amstradcpc/) — 10 first-in-series CPC classics: Roland on the Run, Knight Lore, Bruce Lee, Elite, Bomb Jack, Get Dexter, Head over Heels, Rick Dangerous, Chase H.Q., Prince of Persia. BASIC entry boots to Locomotive BASIC 1.1 |
| HOMECOMP → 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 |
| HOMECOMP → COMMODRE → C128 | EmulatorJS + VICE x128 (emulators/c128/) — C128 native mode (BASIC 7.0), 5 commercial + 5 homebrew 80-col titles |
| Placeholders (no emulator yet) | ODYSSEY2 |
All seven VICE-family bundles ship the same input config: keyboardInput: 'enabled' + altKeyboardInput: 'enabled' (typed keys → VICE keyboard callback) + vice_joyport_type: '1' for the six with a joystick port (PET excepted — no joystick). Numpad 8/4/6/2 drives joystick directions; 0 or 5 is fire; everything else types. Esc is browser-captured so RUN/STOP is remapped to Scroll Lock (+ Pause/Break + a top-left soft button) via emulators/_shared/genx-vice-softkeys.js. A defensive UX banner (emulators/_shared/genx-numlock-warn.js) fires after the first keydown if NumLock is off. All seven bundles share one copy of the EmulatorJS framework + 5 VICE cores at emulators/_shared-ejs/.
Available 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 box-drawn menu)
├── 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 nes / menu (NES GAMES — auto-cd into games)
3 → contra (opens emulators/jsnes/play.html?game=contra)
0 → cd .. / cd .. / menu (back to CONSOLE 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.