GithubHelp home page GithubHelp logo

lunacoder2008 / webretro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liammuir/webretro

0.0 0.0 0.0 23.11 MB

WebRetro (retroarch browser port) fork.

Home Page: https://liammuir.github.io/webretro/

License: MIT License

CSS 0.64% JavaScript 4.90% Python 0.03% HTML 2.26% C 74.66% C++ 5.87% Makefile 1.28% GLSL 10.35%

webretro's Introduction

webretro

RetroArch ported to WASM with emscripten!
Demo

This was initially part of gfiles, but I decided to split it off.

These 5 cores are included with the repository (ROMs NOT included):

  • Genesis Plus GX (Genesis / MD)
  • mGBA (GBA, GB, GBC)
  • Mupen64plus Next (N64, broken but playable)
  • Nestopia (NES)
  • Snes9x (SNES)

How to use

The asset bundle will be fetched from GitHub using jsdelivr by default. You can change this option on line 10 of assets/base.js (example alternate value: "./").

Query string options:

  • core - specify the libretro core to use, i.e. genesis_plus_gx, mgba, mupen64plus_next, nestopia, snes9x. 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. 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 if this exists, the bundle fetch will be skipped.
  • console if this exists, the console window will open on load.

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
  • ?

Embed API

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 appear in.
  • webretroPath - the path to the index of the webretro instance.
  • queries - object containing the query string options shown above.

Additional

  • The user can upload their ROM directly, or using Google Drive/Dropbox/OneDrive.
  • Importing/Exporting of save states and SRAM is supported.
  • States and SRAM are saved to indexedDB per ROM name. (SRAM autosaves every 5 minutes by default)
  • ROMs can be inside of zip files (The ROM file name is used in this case, instead of the zip file name).
  • Cheat codes are supported.
  • SMAS brick fix should automatically be softpatched to SMAS ROMs.
  • The keybindings are remapped so that all the inputs should be supported by a normal keyboard, but can be changed on line 11 of assets/base.js:

Controller Layout Map

webretro's People

Contributors

binbashbanana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.