Giter Club home page Giter Club logo

ngx-retroarch's Introduction

NgxRetroarch

RetroArch as a web component. Online Demo

Installation

NPM

npm install @nicolasroehm/ngx-retroarch
import '@nicolasroehm/ngx-retroarch';

CDN

<script src="https://unpkg.com/@nicolasroehm/ngx-retroarch@latest/elements.js"></script>

Usage

<ngx-retroarch
  core="snes9x"
  rom="Goof_Troop.zip"
  rom-path="https://www.example.com/games/snes9x/"
  asset-path="https://unpkg.com/@nicolasroehm/ngx-retroarch@latest/">
</ngx-retroarch>

The following attributes can be set on ngx-retroarch:

  • rom - The rom file name with its extension. For example: Goof_Troop.zip.
  • rom-path - The path to the rom (default is ./). You have to define the path to the rom without the rom file. For example: https://www.example.com/assets/snes/
  • asset-path - The path to the RetroArch core and assets (default is ./). Cores and assets are included into the NPM package so you don't have to update the path unless you want to import them by yourself.
  • core - Choose one the following:
Core Console
mgba GBA
dolphin GC/Wii
citra Nintendo 3DS
desmume Nintendo DS
mupen64plus_next Nintendo 64
parallel_n64 Nintendo 64
snes9x SNES
nestopia NES
ppsspp PSP
beetle_psx PS1
genesis_plus_gx Genesis

Source code

  1. Download code and install dependencies
git clone https://github.com/NicolasRoehm/ngx-retroarch
cd ./ngx-retroarch
npm install
  1. Add your rom(s) in the src/assets/roms directory

Demo

  1. Edit the rom and core attributes in src/assets/demo.html
  2. Build and serve the project
npm run demo
  1. Navigate to http://127.0.0.1:4300/.

Development

  1. Edit the rom and core attributes in src/app/app.component.html

  2. Build the library in watch mode

npm run watch:all
  1. Once the library is watched, start the dev server in a new terminal
npm run start
  1. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Architecture

File Purpose
emulator.component.ts emulator.component.html This contains the main logic of the package.
app.component.html This contains the development code which uses the package as an Angular component.
demo.html This contains the final code which uses the package as a web component (once built). This file is cp to dist/elements/index.html during the build process.

Build

npm run build:all

The build artifacts will be stored in the dist/elements directory.

❗There is no ROM included❗

Roadmap

  • Check if there is the same "wasmTable.get(108)()" function in all unminified cores / Export _cmd_reload_config
  • Save & download saved screenshot
  • Auto detect core
  • Add cores + check if there is the same "queueAudio" function in all unminified cores
  • Speed / Slow
  • Show FPS
  • About project
  • Update usage chapter (readme)
  • Disable retroarch on dev mode
  • Readable core
  • Qwerty

Thanks

ngx-retroarch's People

Contributors

nicolasroehm avatar httpanimation 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.