# Getting Started

# Prerequisits

  • A web server like NGINX or the Apache server included in XAMPP (opens new window)
  • A website behing hosted on that server, or at its most basic, create an empty file named "index.html" (save for later)

# Setup

  1. Download the github project (opens new window) and unzip it into your webserver hosted folder.
  2. Choose an emulator (opens new window) you want embedded, then copy and paste its code into your "index.html" file and edit the necessary fields. You have the option to edit each of the fields manually or use the Code Editor tool.

# Example for NES

<div style='width:640px;height:480px;max-width:100%'>
    <div id='game'></div>

<script type='text/javascript'>
    EJS_player = '#game';
    // Can also be fceumm or nestopia
    EJS_core = 'nes';
    // Lightgun
    EJS_lightgun = false; // can be true or false
    // URL to BIOS file
    EJS_biosUrl = ''; // example: https://dl.dropboxusercontent.com/s/[random-code]/bios.bin
    // URL to Game rom
    EJS_gameUrl = ''; // example: https://dl.dropboxusercontent.com/s/[random-code]/mario.nes
    // Path to the data directory
    EJS_pathtodata = 'data/';
<script src='data/loader.js'></script>

# Code Editor

A Code Editor feature is included on this website. It's a wizard that will create this html web code for you.

  1. Select a System
  2. Fill out the details:
    • Upload game rom
    • Enter name of the game
    • Enter an ad URL (optional)
    • Upload bios file (if required)
    • Upload custom save state to be loaded on start (optional)
  3. Generate out file

It will then give you the download link for a zip folder that will include the rom & an index.html file that has your code ready to be copy & pasted into your website.

# Client Installation

Because this software uses WebAssembly (WASM) applications, it can be ran within a modern browser so there is no installation necessary. Only Safari for Apple devices and Chromium based browsers (Google Chrome, Edge, Brave, etc.) are supported. Other browsers might work, but have not been tested and likely never will be. Gamepads do not function on Firefox (yet!).

  • To make things a little more seamless, we can create a shortcut file to act as a launcher.
    • In the below examples, we will use as the address for the webserver hosted on port 80.

# Windows

In this example, we will use Google Chrome:

  1. Right click on Chrome and click "Send to" then "Desktop (create shortcut)"

  2. Now right click on the new shortcut and in the "Target" field, add this to the end:

    --kiosk ""

(example: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk "") 3) Lastly, rename the shortcut to "EmulatorJS"

To exit 'Kiosk' mode, hit ctrl+W

# Android/iOS

  1. Open your browser and go to the server ip address (example:
  2. After EmulatorJS has loaded in, open your browser settings and click "Add to Home Screen" or something similar.
  3. Click through any other prompts that may come up, but you should be left with a shortcut on your phone's home screen that acts like an app.

# Steam Deck

The process is similar as that of the Windows setup:

  1. Enter Desktop mode
  2. Right click on Chrome and add to Steam
  3. Right click on the Chrome shortcut in Steam and click "Properties"
  4. Under the "Shortcut" options, find the "Launch Options" text box.
  5. Add this to the end:
--kiosk ""

(example: run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1024,640 --force-device-scale-factor=1.25 --device-scale-factor=1.25 --kiosk "")