Skip to content
/ Junie Public
forked from Namaneo/Junie

Libretro frontend that runs entirely in your browser!

License

Notifications You must be signed in to change notification settings

RGB-loop/Junie

 
 

Repository files navigation

Junie

Junie is a Libretro frontend that aims to run entirely in your browser, desktop or mobile!

  • No installation on the end-devices.
  • Near-native performances thanks to WebAssembly.
  • Wide range of supported/compatible cores (... soon).
  • Progressive Web Application fully accessible offline.

Junie currently runs on most recent browsers, though your experience will probably be the best on Chrome and Safari (I have issues on Firefox on my side, not sure if it's isolated to my computer).

Demo: here you can play Indivisible, Celeste Classic, Daedeus and GraviBots. I haven't played those games yet but will do for sure!

Disclaimer: development is still in progress. I'll try my best not to break anything between releases (especially regarding local save files), but it's probably a good idea for you to test releases before updating.

Supported features

  • All the systems described in the Folder structure.
  • Save files (stored inside your browser's storage).
  • Additional core-specific system files.
  • Core-specific configurations override.
  • Multi-touch controller, with D-pad used as a joystick.
  • Re-mappable keyboard to joypad bindings.
  • Touch inputs, enabled by pressing the top button.
  • Savestate creation and restore.
  • Fast-forward up to 4 times the original speed.
  • Nice platform-specific user interface.

Folder structure

Games must be organized as follows, inside the application folder:

games
├── Game Boy
├── Game Boy Advance
├── Game Boy Color
├── Master System
├── Mega Drive
├── NES
├── Nintendo DS
└── SNES

System files must be organized as follows, inside the application folder:

system
├── Genesis Plus GX
├── melonDS
├── mGBA
├── QuickNES
└── Snes9x

Configuration

Junie and the underlying cores can be configured using the settings.json file. A typical default configuration looks like that:

{
    "language": "ENGLISH",
    "assets": {
        "menu":    "menu.png",
        "left":    "left.png",
        "right":   "right.png",
        "loading": "loading.png"
    },
    "bindings": {
        "A":      "X",
        "B":      "Z",
        "X":      "S",
        "Y":      "A",
        "UP":     "UP",
        "DOWN":   "DOWN",
        "LEFT":   "LEFT",
        "RIGHT":  "RIGHT",
        "L":      "C",
        "R":      "D",
        "SELECT": "ENTER",
        "START":  "SPACE"
    },
    "melonDS": {
        "dependencies": [
            "bios7.bin",
            "bios9.bin",
            "firmware.bin"
        ],
        "configurations": {
            "melonds_touch_mode": "Touch"
        }
    }
}

Global configurations

Those configuration will be used regardless of the underlying emulator in use.

Name Description
language The prefered language to use, currently used only for melonDS. Must match values defined in libretro.h without the prefix.
assets Defines the list of UI assets to use. Files will be requested as follows: relatively from the /assets/<file_name>.
bindings Defines the joypad-keyboard bindings. On the left, values from libretro.h without the prefix. On the right, values from matoya.h without the prefix.

Core-specific configurations

Those configurations will only be applied to the core they target. Section name must reflect the full name of the core. See the credits section for the exact available names.

Name Description
dependencies A list of extra dependencies the emulator might require. Files will be exposed to the core as follows: /system/<core_name>/<file_name>.
configurations A list of custom configurations to apply to the emulator. Details of available configurations for each core are logged in the browser console.

Side notes

Cores compatibility

Well, when I wrote "wide range of cores", it might be a little exagerated...

Junie is using the wasi-sdk to build the cores, and it currently lacks features that cores sometimes use extensively. Right now, the most problematic ones are threading and JIT backend. Also, no OpenGL support at this time (this one is actually doable but probably requires a lot of work).

That said, even after disabling all the above features when building the cores, performance is still far beyond acceptable for most cores. You will however have some trouble with 3D games on Nintendo DS (2D games run quite fine on recent hardware, as far as I've tested). Low-end mobile phones might also have struggle with the SNES.

Build & Run

Prerequisites

Junie is composed of 3 main components:

  • The UI: developed in JSX using React and Ionic, located in the ui folder
  • The API: developed in Golang using chi, located in the api folder
  • The Emulator: developed in C using libmatoya, located in the app folder

To initialize the submodules if you haven't already:

git submodule sync
git submodule update --init

Build

After being sure all the dependencies are installed on your machine, you can build a local version of Junie just using:

make

If you want to pack everything in the same folder (linux build only for now), here you go:

make pack

Run

After a successful build, you can run Junie using:

./junie

Docker

If you prefer to use Docker, no need for any local dependencies:

docker run \
    -d --rm \
    --name junie \
    -p 3000:3000 \
    -v /path/to/settings.json:/junie/assets/app/settings.json \
    -v /path/to/system:/system \
    -v /path/to/games:/games \
    namaneo/junie

Next steps

  • Synchronize save files for cross-browser play.
  • Build Junie for libmatoya's supported platforms as well.
  • Multiplayer support, both locally and through WebRTC.

Credits

Libraries

Cores

  • mGBA for Game Boy, Game Boy Color and Game Boy Advance emulation.
  • Snes9x for SNES emulation.
  • melonDS for Nintendo DS emulation.
  • Genesis Plus GX for Mega Drive and Master System emulation.
  • QuickNES for NES emulation.

Assets

License

Junie is licensed under the GNU General Public License v3.0. When applicable, dependencies listed in the Credits section retain their original licenses.

About

Libretro frontend that runs entirely in your browser!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 59.8%
  • TypeScript 21.7%
  • Go 5.6%
  • CSS 5.2%
  • Makefile 2.8%
  • JavaScript 2.0%
  • Other 2.9%