EmulatorJS/docs/Usage.md
ElectronicsArchiver fb840685ce Some Refactoring
2022-04-02 15:49:20 -04:00

2.4 KiB

Usage

For questions please use the Issue tab.


Setup

  1. Download this repository.
    Code ➞ Download As Zip

  2. Use a WebServer to host the emulator.

  3. Use your Browser to navigate to localhost


ROMs

ROMs can be used as zip / rar / 7z archives.


Netplay

By default Netplay is disabled,
to enable it, add the following:

// ID in your website, required for netplay. Each game in your site should have a different ID
EJS_gameID = 1;

by default, the netplay server url will be emuserver.emulatorjs.ga, but to default to the default ws.emulatorjs.com server add the following line

EJS_oldEJSNetplayServer = true;

To self host:

  1. Download the Server.

  2. Specify the servers address with:

EJS_netplayUrl = 'http://localhost:3000/'; // Absolute Url To Your Netplay Server

Custom Save Filename

To customize the filename of save states
simply add the following lines of code.

EJS_gameName = 'Game Name';

➞ Save Filename: Game Name.state


AD

To place an advertisement in front of the
play now screen, include the following line:

EJS_AdUrl = 'URL';

Interface Color

To use a different color for the emulator interface, use:

EJS_color = '#FF0000'; // Hex Color Code

Direct Start

To start the emulator immediately, add this line:

EJS_startOnLoaded = true;

For audio to play the user still
needs to interact with the page.


Custom Paths

Paths to emulator files can be customized with:

EJS_paths = {
    'fileName' : '/somepath',
    'emulator.js' : 'https://example.com/emulator.js',
    'n64-asmjs.data' : '/asdfds.data'
};

If a file is not defined, the default is used.


Localization

Please see the localization README.


Using MAME

To use the MAME system you will have to add:

EJS_core = 'mame';
EJS_mameCore = '' // mame core options (example: '4|0')

to your code.

Set the mame core value to the mame core number ( 1 - 6 ) + | + save states supported ( 0 or 1 )