EmulatorJS/README.md

210 lines
4.9 KiB
Markdown
Raw Normal View History

2021-12-20 16:30:29 +00:00
2021-12-31 17:49:03 +00:00
# EmulatorJS
2021-12-20 16:30:29 +00:00
2021-12-31 17:49:03 +00:00
Self-hosted **Javascript** emulation for various system.
2021-12-20 16:30:29 +00:00
2021-12-31 17:52:21 +00:00
<br>
2021-12-31 17:49:03 +00:00
*If something doesn't work, please consider opening an* ***[Issue]*** <br>
*with as many details as possible, as well as the console log.*
2021-04-05 20:37:22 +00:00
2021-12-31 17:49:03 +00:00
*The* ***Screen Recording*** *option currently doesn't support* ***Audio*** *.*
2021-04-06 18:49:16 +00:00
2021-12-31 17:49:03 +00:00
---
2021-08-25 19:49:00 +00:00
2022-01-13 21:30:06 +00:00
**⸢ [Example Use] ⸥ ⸢ [Emulator Demo] ⸥ ⸢ [Beta] ⸥**
2021-04-06 18:39:36 +00:00
2021-12-31 17:49:03 +00:00
---
2021-04-19 16:30:24 +00:00
2021-12-31 17:49:03 +00:00
## Where Did I Get This?
2021-04-06 18:20:09 +00:00
2021-12-31 17:49:03 +00:00
> So I found this website called [EmulatorJS.com][EJS] and <br>
> I went into inspect and downloaded the resources.<br>
2021-12-31 17:51:45 +00:00
> <br>
2021-12-31 17:49:03 +00:00
> I removed the ad server, and made everything work within your own domain.<br>
2021-12-31 17:51:45 +00:00
> <br>
2021-12-31 17:49:03 +00:00
> [This repository] may soon make it possible to use all this open source.<br>
2021-12-31 17:51:45 +00:00
> <br>
2021-12-31 17:49:03 +00:00
> The emulator is not illegal - the rom is - I am not responsible <br>
> for what people decide to do with this software.
2021-04-05 20:37:22 +00:00
2021-12-31 17:49:03 +00:00
---
2021-11-17 23:01:45 +00:00
2021-12-31 17:49:03 +00:00
## Supported Systems
2021-04-05 20:37:22 +00:00
2021-12-31 17:49:03 +00:00
| Nintendo | Sega | Atari | | |
|:--------:|:----:|:-----:|:-:|:-:|
| **[Game Boy<br>Advance][Nintendo Game Boy Advance]** | **[Master<br>System][Sega Master System]** | **[Jaguar][Atari Jaguar]** | **[TurboGrafs 16<br>PC Engine][TurboGrafs-16 / PC Engine]** | **[MSX]**
| **[Game Boy][Nintendo Game Boy]** | **[Mega<br>Drive][Sega Mega Drive]** | **[Lynx][Atari Lynx]** | **[WanderSwan<br>Color][WanderSwan / Color]** | **[3DO]**
| **[Famicom <br> NES][NES / Famicom]** | **[Game<br>Gear][Sega Game Gear]** | **[7800][Atari 7800]** | **[Neo Geo<br>Poket][Neo Geo Poket]**
| **[Virtual<br>Boy][Virtual Boy]** | **[Saturn][Sega Saturn]** | **[2600][Atari 2600]** | **[PlayStation]**
| **[SNES]** | **[32X][Sega 32X]** | | **[Arcade]**
| **[DS][Nintendo DS]** | **[CD][Sega CD]** |
| **[64][Nintendo 64]**
2021-04-05 20:37:22 +00:00
2021-12-31 17:49:03 +00:00
*If your system is not listed here, navigate to* ***[EmulatorJS.com][EJS]****,* <br>
*check if it's available there and if it is, simply open an* ***[Issue]****.*
2021-04-05 20:37:22 +00:00
2021-12-31 17:49:03 +00:00
---
2021-04-05 20:37:22 +00:00
2021-12-31 17:49:03 +00:00
## Usage
2021-04-05 20:37:22 +00:00
2021-12-31 17:49:03 +00:00
*For questions please use the* ***[Issue]*** *tab.*
2021-08-02 12:31:28 +00:00
2021-12-31 17:49:03 +00:00
<br>
2021-12-21 00:35:17 +00:00
2021-12-31 17:49:03 +00:00
##### Setup
2021-12-21 00:35:17 +00:00
2021-12-31 17:49:03 +00:00
1. Download this repository.<br>
*`Code ➞ Download As Zip`*
2021-12-21 00:35:17 +00:00
2021-12-31 17:49:03 +00:00
2. Use a **WebServer** to host the emulator.
3. Use your **Browser** to navigate to `localhost`
2021-12-21 00:35:17 +00:00
<br>
2022-01-13 21:30:06 +00:00
##### ROMs
2021-12-31 17:49:03 +00:00
2022-01-13 21:30:06 +00:00
**ROMs** can be used as `zip` / `rar` / `7z` archives.
2021-12-31 17:49:03 +00:00
<br>
2022-01-13 21:30:06 +00:00
##### Netplay
2021-12-31 17:49:03 +00:00
2022-01-13 21:30:06 +00:00
By default **Netplay** is ***disabled***, <br>
to enable it, add the following:
```js
// ID of your website, required for netplay.
EJS_gameID = 1;
2021-12-21 00:35:17 +00:00
```
2022-01-13 21:30:06 +00:00
*I have successfully rewrote the server side portion* <br>
*of netplay, which you can now use to self host!*
1. Download the **[Server]**.
2. Install **NPM**
```sh
npm install
```
3. Start the server with:
```sh
node index.js
```
4. Specify the servers address with:
```js
// Absolute Url To Your Netplay Server
EJS_netplayUrl = `http://localhost:3000/`;
2021-12-21 00:35:17 +00:00
```
2021-12-31 17:49:03 +00:00
<br>
2021-12-21 00:35:17 +00:00
2021-12-31 17:49:03 +00:00
##### Custom Saves
To customize the filename of save states <br>
simply add the following lines of code.
```js
EJS_gameName = `Game Name`;
2021-12-21 00:35:17 +00:00
```
2021-12-31 17:49:03 +00:00
**➞ Save Filename:** `Game Name.state`
<br>
##### AD
To place an advertisement in front of the <br>
`play now` screen, include the following line:
```js
EJS_AdUrl = `URL`;
2021-12-21 00:35:17 +00:00
```
2021-12-31 17:49:03 +00:00
2022-01-05 18:38:25 +00:00
<br>
2022-01-13 21:30:06 +00:00
##### Interface Color
To use a different color for the emulator interface, use:
2022-01-05 18:38:25 +00:00
2022-01-13 21:30:06 +00:00
```js
EJS_color = '#FF0000'; // Hex Color Code
2022-01-05 18:38:25 +00:00
```
2022-01-13 21:30:06 +00:00
<br>
##### Direct Start
To start the emulator immediately, add this line:
```js
2022-01-05 18:38:25 +00:00
EJS_startOnLoaded = true;
```
2022-01-13 21:30:06 +00:00
*For audio to play the user still* <br>
*needs to interact with the page.*
2022-01-05 18:38:25 +00:00
<br>
2022-01-13 21:30:06 +00:00
##### Custom Paths
2022-01-05 18:38:25 +00:00
2022-01-13 21:30:06 +00:00
Paths to emulator files can be customized with:
```js
2022-01-05 18:38:25 +00:00
EJS_paths = {
2022-01-13 21:30:06 +00:00
'fileName' : `/somepath` ,
'emulator.js' : `https://example.com/emulator.js` ,
'n64-asmjs.data' : `/asdfds.data`
};
2022-01-05 18:38:25 +00:00
```
2022-01-13 21:30:06 +00:00
*If a file is not defined, the default is used.*
2021-12-31 17:49:03 +00:00
<!----------------------------------------------------------------------------->
[Example Use]: https://coldcast.org/games/1/Super-Mario-Bros
[Emulator Demo]: https://ethanaobrien.github.io/emulatorjs/
2022-01-13 21:30:06 +00:00
[Beta]: https://emulatorjs.netlify.app/
2021-12-31 17:49:03 +00:00
2021-12-31 17:50:40 +00:00
[Issue]: https://github.com/ethanaobrien/emulatorjs/issues
2021-12-31 17:49:03 +00:00
[This repository]: https://github.com/linuxserver/emulatorjs
[EJS]: https://www.emulatorjs.com/
2022-01-13 21:30:06 +00:00
[Server]: https://github.com/ethanaobrien/emuserver
2021-12-31 17:49:03 +00:00
[NES / Famicom]: docs/NES-Famicom.md
[SNES]: docs/SNES.md
[Nintendo 64]: docs/Nintendo%2064.md
[Nintendo Game Boy]: docs/Nintendo%20Game%20Boy.md
[Nintendo Game Boy Advance]: docs/Nintendo%20Game%20Boy%20Advance.md
[Nintendo DS]: docs/Nintendo%20DS.md
[PlayStation]: docs/PlayStation.md
[Virtual Boy]: docs/Virtual%20Boy.md
[Sega Mega Drive]: docs/Sega%20Mega%20Drive.md
[Sega Master System]: docs/Sega%20Master%20System.md
[Sega CD]: docs/Sega%20CD.md
[Atari Lynx]: docs/Atari%20Lynx.md
[MSX]: docs/MSX.md
[3DO]: docs/3DO.md
[Sega 32X]: docs/Sega%2032X.md
[Atari Jaguar]: docs/Atari%20Jaguar.md
[Neo Geo Poket]: docs/Neo%20Geo%20Poket.md
[Sega Game Gear]: docs/Sega%20Game%20Gear.md
[Sega Saturn]: docs/Sega%20Saturn.md
[Atari 7800]: docs/Atari%207800.md
[WanderSwan / Color]: docs/WanderSwan-Color.md
[TurboGrafs-16 / PC Engine]: docs/TurboGrafs%2016-PC%20Engine.md
[Arcade]: docs/Arcade.md
[Atari 2600]: docs/Atari%202600.md
2022-01-13 21:30:06 +00:00