This extension allows you to play retro console games right from the SillyTavern chat.
See the original README below. Thanks libretro and EmulatorJS projects for making this possible.
Current EmulatorJS version: 4.2.2
Cool stuff:
- Unnecessary and absurd concept.
- AI can provide immersive comments on your gameplay (compatible model required).
- Simple ROM file management. ROMs are stored in your browser.
- All EmulatorJS cores supported.
- Nintendo
- Sega
- Atari
- PlayStation
- many more
Limitations:
- AI can't play the game with you as a second player (yet).
- No built-in ROMs. But you can find them anywhere.
- Latest release version of SillyTavern.
- ROM and/or BIOS files downloaded from the net.
Install using SillyTavern's third-party extensions installer using this link:
https://github.com/SillyTavern/SillyTavern-EmulatorJS
- Open the "EmulatorJS" extension menu.
- Click "Add ROM file".
- Select the game file to add. Input the name and core (if it wasn't auto-detected).
- Some cores (e.g. PlayStation) require you to provide a BIOS file. See the documentation to find out what are the necessary files.
- Click the "Play" button in the list or launch via the wand menu.
With the power of multimodal models, your AI bots can see your gameplay and provide witty in-character comments.
- Latest version of SillyTavern.
- Latest update of EmulatorJS extension.
- A browser that supports ImageCapture. Tested on desktop Chrome. Firefox requires to enable it with config. Safari won't work.
- (If image inlining is enabled. Recommended) Chat Completion API key with a supported model.
- (If image inlining is disabled) Multimodal captioning extension enabled and configured.
- Make sure you set the interval of providing comments in the EmulatorJS extension settings. This setting defines how often the character is queried for comments using a screenshot of your current gameplay. A value of 0 indicates that no comments are provided.
- Select a character chat and launch the game. For the best performance, make sure that the ROM file is properly named so that AI can have more background context.
- Start playing as you normally would. The vision model will be queried periodically to write a comment based on the latest screenshot it "sees".
Comments are temporarily paused (interval step skipped) if:
- Emulator is paused (with a pause option, not in-game).
- The browser window is out of focus.
- The user input area is not empty. This is to let you type your reply in peace.
- Another reply generation is currently in progress.
- TTS voice is being read aloud. Comment is held off (30 seconds maximum) until it finishes, but not skipped.
- A character card or group is currently open. Comment mode is disabled when starting the game from a welcome screen.
Other common issues:
- Make sure you've set a commenting interval before launching the game.
- Make sure you have set an API key and there are no errors in the ST server console.
Still doesn't work? Send us your browser debug console logs (press F12).
- Caption template - a prompt used to describe the in-game screenshot.
{{game}}
and{{core}}
additional macro are supported. - Comment template - a prompt used to write a comment based on the generated caption.
{{game}}
,{{core}}
,{{caption}}
additional macro are supported. For image inlining mode,{{caption}}
is replaced withsee included image
.
Feel free to contribute.
GPLv3


Self-hosted Javascript emulation for various systems.
Join our Discord server:
Or the Matrix server (#emulatorjs:matrix.emulatorjs.org):
Note
As of EmulatorJS version 4.0, this project is no longer a reverse-engineered version of the emulatorjs.com project. It is now a complete rewrite.
Warning
As of version 4.0.9 cores and minified files are no longer included in the repository. You will need to get them separately. You can get it from releases or the * new CDN (see this for more info). There is also a new version system that we will be using. (read here for more info).
Tip
Cloning the repository is no longer recommended for production use. You should use releases or the CDN instead.
This project has no ads.
Although, the demo page currently has an ad to help fund this project.
Ads on the demo page may come and go depending on how many people are
funding this project.
You can help fund this project on patreon
If something doesn't work, please consider opening an Issue
with as many details as possible, as well as the console log.
EmulatorJS itself is built to be a plugin, rather than an entire website. This is why there is no docker container of this project. However, there are several projects you can use that use EmulatorJS!
Looking for projects that integrate EmulatorJS? Check out https://emulatorjs.org/docs/3rd-party
There are three different version names that you need to be aware of:
- stable - This will be the most stable version of the emulator both code and cores will be tested before release. It will be updated every time a new version is released on GitHub. This is the default version on the Demo.
- latest - This will contain the latest code but use the stable cores. This will be updated every time the main branch is updated.
- nightly - This will contain the latest code and the latest cores. The cores will be updated every day, so this is considered alpha.
EmulatorJS provides a CDN at https://cdn.emulatorjs.org/
, allowing access to any version of the emulator.
To use it, set EJS_pathtodata
to https://cdn.emulatorjs.org/<version>/data/
, replacing <version>
with stable
, latest
, nightly
, or another main release.
Be sure to also update the loader.js
path to:
https://cdn.emulatorjs.org/<version>/data/loader.js
Run a local server with:
-
Open a terminal in the root of the project.
-
Install the dependencies with:
npm i
-
Start the minification with:
node start
-
Open your browser and go to
http://localhost:8080/
to see the demo page.
Before pushing the script files onto your production server it is recommended to minify them to save on load times as well as bandwidth.
Read the minifying documentation for more info.
If you want to help with localization, please check out the localization documentation.
>> When reporting bugs, please specify what version you are using
Game Boy Advance | Famicom / NES | Virtual Boy
Master System | Mega Drive | Game Gear
2600 | 5200 | 7800 | Lynx | Jaguar
Commodore 64 | Commodore 128 | Commodore Amiga
Commodore PET | Commodore Plus/4 | Commodore VIC-20
PlayStation | PlayStation Portable | Arcade
3DO | MAME 2003 | ColecoVision