Skip to content

Commit

Permalink
clean up and expand readme (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer authored Feb 4, 2024
1 parent 676ad1f commit a47f465
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 14 deletions.
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,11 @@ The Backend can be accessed at:

The first thing you will need to do is click to download the default art/configs from this interface, this will setup a skeleton directory in your `/data` mount. From there add roms to the respective `roms` directories and follow the on screen instructions to add them to your web frontend running on port 80.

The frontend application has been initially optimized around being used with a standard gamepad (more specifically for modern Xbox consoles that have chromium based Edge browsers). The navigation revolves around the up/down/left/right keys to browse the menus and launch games.
Mobile browsers will function, just keep in mind compatibility will be reduced especially for CD based games.

**I understand there may be some confusion as to project naming, but when this project (linuxserver/emulatorjs) started it was meant to be a simple frontend for self hosting folks to use the at the time deobfuscated code of [https://www.emulatorjs.com/](https://www.emulatorjs.com/) that [ethanaobrien](https://github.com/ethanaobrien) was working on. Since then [EmulatorJS](https://github.com/EmulatorJS/EmulatorJS) has evolved into it's own amazing project based on [Libretro](https://github.com/libretro) cores that have been highly optimized to function for web. This project mostly contains custom built libretro cores found [here](https://github.com/linuxserver/libretro-cores). So in general despite the naming of this project and the logo this is just a docker container with a web based backend for generating a useable self hosted emulation website and is in no way affiliated with [EmulatorJS](https://github.com/EmulatorJS/EmulatorJS).**

**For Xbox users please click the select button a couple times after launching a game to ensure the B button does not trigger a "back" action in the browser. (official name "view button" it is the two small squares) Exiting the controller mode and back to browser controls can be triggered by holding the start button for 3 seconds. (official name "menu button" the three lines) You will be unable to use features like save states and modify controller layouts on the emulatorjs based emulators currently as I have not determined a methodology of re-entering controller mode once you exit it. All normal game saves will function given you exit the game play screen cleanly using the B button for back this includes multi disc games for psx. Your game saves are stored in browser storage by hostname so if you make any changes to your local hosted setup (port or IP) the saves will not follow with it. For libretro based emulators you can use the button combination start+select+L+R to access the libretro menu and change settings/save or load/etc.**

**We know about most of the oddities like crackling sound for some emulators, rendering issues, and games unreliably auto launching to fullscreen. In general full CD games on the Xbox web browser do not seem to work due to their size if you have a chd/pbp less than 450 megs it will run. Edge on Xbox has some kind of undocumented ram limitation of about a gigabyte. Until all emulators are transitioned to libretro cores the oddities of using self hosted EmulatorJS will not be something that can or should be solved using hacky workarounds interacting with obfuscated code. Just keep in mind these are full blown machine emulators running in Javascript in a browser, do not expect bare metal performance.**
**This container (outside of the profile functionality) only generates a static set of files that can be hosted on any web provider even object storage. Everything runs in the client's browser and there are no dependencies on this container. To extract/copy this website it is at the path `/emulatorjs/frontend` inside the container. If you are happy with the catalouge you have created and no longer want to run stuff like the IPFS backend or want to upload these files to some other hosting provider you can simply copy the contents of that directory and kill off this container. This container can also be started without IPFS once you collection is set using the environment variable `-e DISABLE_IPFS=true`.**

**This container (outside of the profile functionality) only generates a static set of files that can be hosted on any web provider even object storage. Eveyrthing runs in the clients browser and there are no dependencies on this container. To extract/copy this website it is at the path `/emulatorjs/frontend` inside the container. If you are happy with the catalouge you have created and no longer want to run stuff like the IPFS backend or want to upload these files to some other hosting provider you can simply copy the contents of that directory and kill off this container. This container can also be started without IPFS once you collection is set using the environment variable `-e DISABLE_IPFS=true`.**
### Read Only Rom Mounts

**Mounting in existing rom directories Read Only can be achieved by using a special root path `/roms`, For example for NES:**

Expand Down Expand Up @@ -113,6 +108,24 @@ The folder names for systems are:
* vectrex
* ws

### Compatible and Tested Browsers

**Chromium Based Browsers**- This is the golden standard whether desktop or on mobile (Android) Chrome/Chromium/Brave/Edge should always be used. They have the best performance when it comes to WebAssembly.

**Firefox**- This will work (at reduced performance though) without tested controller support.

**Safari iOS**- Safari performs well and has controller support though in recent updates the amount of ram available to a single tab (~265MB) makes it impossible to run n64 emulation or anything CD based. Do not use [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview) applications like Chrome or Firefox on iOS they will not be detected properly in the client software. Your best bet in iOS is to add the web page to your home screen from Safari and launch from there to get a full screen interface.

**Edge Xbox Series X/S**- This also performs well and was the basis of this project though recent console updates have knocked the ram available to a single tab from 1GB to 128MB making it impossible to run CD based games or n64.

### Navigation Basics

**Retroarch Menu**- The Retroarch menu can be accessed using F1 on keyboard, start/select/R1/L1 at the same time on controller, or pressing the button in the top left in touch mode.

**Fast Scrolling**- Items in the menu can be scrolled by letter by using PgUp/PgDn on the keyboard or the R1/L1 buttons on controller. In touch mode scrolling can be sped up by touching and dragging (while holding) either up or down.

**For Xbox users please click the select button a couple times after launching a game to ensure the B button does not trigger a "back" action in the browser. (official name "view button" it is the two small squares) Exiting the controller mode and back to browser controls can be triggered by holding the start button for 3 seconds. (official name "menu button" the three lines)**

## Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.
Expand Down
27 changes: 20 additions & 7 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,11 @@ app_setup_block: |
The first thing you will need to do is click to download the default art/configs from this interface, this will setup a skeleton directory in your `/data` mount. From there add roms to the respective `roms` directories and follow the on screen instructions to add them to your web frontend running on port 80.
The frontend application has been initially optimized around being used with a standard gamepad (more specifically for modern Xbox consoles that have chromium based Edge browsers). The navigation revolves around the up/down/left/right keys to browse the menus and launch games.
Mobile browsers will function, just keep in mind compatibility will be reduced especially for CD based games.
**I understand there may be some confusion as to project naming, but when this project (linuxserver/emulatorjs) started it was meant to be a simple frontend for self hosting folks to use the at the time deobfuscated code of [https://www.emulatorjs.com/](https://www.emulatorjs.com/) that [ethanaobrien](https://github.com/ethanaobrien) was working on. Since then [EmulatorJS](https://github.com/EmulatorJS/EmulatorJS) has evolved into it's own amazing project based on [Libretro](https://github.com/libretro) cores that have been highly optimized to function for web. This project mostly contains custom built libretro cores found [here](https://github.com/linuxserver/libretro-cores). So in general despite the naming of this project and the logo this is just a docker container with a web based backend for generating a useable self hosted emulation website and is in no way affiliated with [EmulatorJS](https://github.com/EmulatorJS/EmulatorJS).**
**For Xbox users please click the select button a couple times after launching a game to ensure the B button does not trigger a "back" action in the browser. (official name "view button" it is the two small squares) Exiting the controller mode and back to browser controls can be triggered by holding the start button for 3 seconds. (official name "menu button" the three lines) You will be unable to use features like save states and modify controller layouts on the emulatorjs based emulators currently as I have not determined a methodology of re-entering controller mode once you exit it. All normal game saves will function given you exit the game play screen cleanly using the B button for back this includes multi disc games for psx. Your game saves are stored in browser storage by hostname so if you make any changes to your local hosted setup (port or IP) the saves will not follow with it. For libretro based emulators you can use the button combination start+select+L+R to access the libretro menu and change settings/save or load/etc.**
**We know about most of the oddities like crackling sound for some emulators, rendering issues, and games unreliably auto launching to fullscreen. In general full CD games on the Xbox web browser do not seem to work due to their size if you have a chd/pbp less than 450 megs it will run. Edge on Xbox has some kind of undocumented ram limitation of about a gigabyte. Until all emulators are transitioned to libretro cores the oddities of using self hosted EmulatorJS will not be something that can or should be solved using hacky workarounds interacting with obfuscated code. Just keep in mind these are full blown machine emulators running in Javascript in a browser, do not expect bare metal performance.**
**This container (outside of the profile functionality) only generates a static set of files that can be hosted on any web provider even object storage. Everything runs in the client's browser and there are no dependencies on this container. To extract/copy this website it is at the path `/emulatorjs/frontend` inside the container. If you are happy with the catalouge you have created and no longer want to run stuff like the IPFS backend or want to upload these files to some other hosting provider you can simply copy the contents of that directory and kill off this container. This container can also be started without IPFS once you collection is set using the environment variable `-e DISABLE_IPFS=true`.**
**This container (outside of the profile functionality) only generates a static set of files that can be hosted on any web provider even object storage. Eveyrthing runs in the clients browser and there are no dependencies on this container. To extract/copy this website it is at the path `/emulatorjs/frontend` inside the container. If you are happy with the catalouge you have created and no longer want to run stuff like the IPFS backend or want to upload these files to some other hosting provider you can simply copy the contents of that directory and kill off this container. This container can also be started without IPFS once you collection is set using the environment variable `-e DISABLE_IPFS=true`.**
### Read Only Rom Mounts
**Mounting in existing rom directories Read Only can be achieved by using a special root path `/roms`, For example for NES:**
Expand Down Expand Up @@ -88,6 +83,24 @@ app_setup_block: |
* vectrex
* ws
### Compatible and Tested Browsers
**Chromium Based Browsers**- This is the golden standard whether desktop or on mobile (Android) Chrome/Chromium/Brave/Edge should always be used. They have the best performance when it comes to WebAssembly.
**Firefox**- This will work (at reduced performance though) without tested controller support.
**Safari iOS**- Safari performs well and has controller support though in recent updates the amount of ram available to a single tab (~265MB) makes it impossible to run n64 emulation or anything CD based. Do not use [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview) applications like Chrome or Firefox on iOS they will not be detected properly in the client software. Your best bet in iOS is to add the web page to your home screen from Safari and launch from there to get a full screen interface.
**Edge Xbox Series X/S**- This also performs well and was the basis of this project though recent console updates have knocked the ram available to a single tab from 1GB to 128MB making it impossible to run CD based games or n64.
### Navigation Basics
**Retroarch Menu**- The Retroarch menu can be accessed using F1 on keyboard, start/select/R1/L1 at the same time on controller, or pressing the button in the top left in touch mode.
**Fast Scrolling**- Items in the menu can be scrolled by letter by using PgUp/PgDn on the keyboard or the R1/L1 buttons on controller. In touch mode scrolling can be sped up by touching and dragging (while holding) either up or down.
**For Xbox users please click the select button a couple times after launching a game to ensure the B button does not trigger a "back" action in the browser. (official name "view button" it is the two small squares) Exiting the controller mode and back to browser controls can be triggered by holding the start button for 3 seconds. (official name "menu button" the three lines)**
# changelog
changelogs:
- {date: "28.01.24:", desc: "Skip IPFS config if DISABLE_IPFS is set as env variable."}
Expand Down

0 comments on commit a47f465

Please sign in to comment.