-
Notifications
You must be signed in to change notification settings - Fork 0
Virtual Filesystem
Retro-Jack edited this page May 10, 2026
·
56 revisions
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 — clears the screen and renders the root menu
├── menu.bat the boot configuration table + EMULATOR LAUNCHER box
├── 1.bat cd emulators / menu
└── EMULATORS\
├── DOS\ MS-DOS games (self-hosted, jsdos)
├── CONSOLE\ ATARI (2600 / 5200 / 7800) / NINTENDO (NES) / SEGA (GENESIS) /
│ MATTEL (Intellivision) / COLECO (CVision) / MAGNAVOX (Odyssey 2)
└── HOMECOMP\ ACORN (BBC / ARCHIMEDES) / COMMODORE (C64) /
ATARI (800XL / ST) / SINCLAIR (SPECTRUM / ZX81) /
TANDY (CoCo) / MSX (MSX1 / MSX2)
| System | Status | Backing emulator |
|---|---|---|
| DOS | self-hosted | jsdos (emulators/jsdos/) |
| CONSOLE → NINTENDO → NES | self-hosted | JSNES (emulators/jsnes/) |
| CONSOLE → SEGA → GENESIS | self-hosted | lrusso/Genesis (emulators/genesis/) |
| CONSOLE → ATARI → 2600 | self-hosted | javatari.js (emulators/javatari/) |
| HOMECOMP → ACORN → BBC | self-hosted | jsbeeb (emulators/jsbeeb/) |
| HOMECOMP → ACORN → ARCHIMEDES | self-hosted | archimedes-live (emulators/archimedes-live/) |
| HOMECOMP → MSX → MSX1 / MSX2 | self-hosted | WebMSX (emulators/webmsx/) |
| All other CONSOLE / HOMECOMP systems | external link | game-specific URLs on third-party sites |
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).
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:.
See Customising the Filesystem for examples of adding entries.