RetroArch ported to WebAssembly with emscripten!
These cores are included pre-built with the repository (ROMs NOT included):
assets/base.js
.The asset bundle will be fetched from GitHub using jsdelivr by default. You can change this option on line 10 and 11 of assets/base.js
(example alternate value: "./"
).
Query string options:
core
- specify the libretro core library to use, i.e. genesis_plus_gx
, mgba
, mupen64plus_next
, nestopia
, snes9x
, etc. autodetect
can also be used, which attempts to find the correct core for the ROM (slower to load because the core is loaded after the ROM) (if not specified, the user will be shown a list of the default cores).system
- same as above, but will attempt to detect the core based on the specified system, i.e. gba
, genesis
, nes
, nintendo 64
, snes
, etc. If both core
and system
are specified, core
will override system
.rom
- will attempt to fetch a ROM from the ./roms/
directory on the server, or an absolute url (including protocol), e.g. mario3.nes
(if not specified, the user will be prompted to upload a ROM).nobundle
- skips the bundle fetch.console
- opens the console window on load.noautorefocus
- prevents embedded webretro from automatically refocusing the frame.forcestartbutton
- always show the start button (only if rom
is also specified).Example OK query uris:
?core=snes9x&rom=dkc.smc&nobundle&console
?core=mgba&rom=https://example.com/marioadvance3.zip
?core=autodetect&rom=supermarioworld.sfc
?core=autodetect&nobundle
?core=genesis_plus_gx
?
You can easily embed webretro on your site by using the api provided in embed/embed.js
. You can see an example of it here.
How to use: webretroEmbed(domNodeToAppendTo, webretroPath, queries)
(returns the new iframe node that it creates)
domNodeToAppendTo
- the element that you want webretro to load into.webretroPath
- the path to the index of the webretro instance.queries
- object containing the query string options shown above.Mostly long-term:
libretro emscripten support tracker: spreadsheet
Extra thanks to ToadKing for the initial port of RetroArch to emscripten, including rweb drivers as well as libco support.