-
Notifications
You must be signed in to change notification settings - Fork 0
Virtual Filesystem
Retro Jack edited this page May 8, 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 (external links)
├── CONSOLE\ ATARI / NINTENDO / SEGA / MATTEL / COLECO / MAGNAVOX
└── HOMECOMP\ COMMODORE / ATARI / SINCLAIR / TANDY / TI / SHARP / ACORN
| System | Status | Backing emulator |
|---|---|---|
| ACORN → BBC | self-hosted | jsbeeb (emulators/jsbeeb/) |
| NINTENDO → NES | self-hosted | JSNES (emulators/jsnes/) |
| SEGA → GENESIS | self-hosted | lrusso/Genesis (emulators/genesis/) |
| All other CONSOLE systems | external link | game-specific URLs on third-party sites |
| All other HOMECOMP systems | external link | game-specific URLs on third-party sites |
Self-hosted systems have 10 games each plus (BBC only) a PROMPT entry for the bare BASIC interpreter.
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.