All Projects → BFriedrichs → switch-gba

BFriedrichs / switch-gba

Licence: other
Browser based Nintendo Switch GBA Emulator

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
CSS
56736 projects
HTML
75241 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to switch-gba

Emuloader
Emuloader is an application that allows easy management of game backups locally or on the cloud and one-click installs of emulator enivronments
Stars: ✭ 55 (-26.67%)
Mutual labels:  emulator, gba
awesome-emu-resources
A curated list of emulator development resources
Stars: ✭ 26 (-65.33%)
Mutual labels:  emulator, gba
Road To Yuzu Without Switch
This Repo explains how to install the Yuzu Switch Emulator without a Switch
Stars: ✭ 267 (+256%)
Mutual labels:  emulator, nintendo-switch
Hades
🔥 A Nintendo Game Boy Advance emulator
Stars: ✭ 44 (-41.33%)
Mutual labels:  emulator, gba
Vba M Nx
WIP full featured port of VBA-M for Nintendo Switch
Stars: ✭ 11 (-85.33%)
Mutual labels:  emulator, nintendo-switch
gba-pong
Classic pong game on the GameBoy Advance.
Stars: ✭ 23 (-69.33%)
Mutual labels:  gba
rombundler
A tiny libretro frontend to release homebrews as executables
Stars: ✭ 49 (-34.67%)
Mutual labels:  emulator
Mirage
Reimplementation of the Nintendo Switch firmware
Stars: ✭ 40 (-46.67%)
Mutual labels:  nintendo-switch
NXController
Use keyboard to play Switch games
Stars: ✭ 24 (-68%)
Mutual labels:  nintendo-switch
openemulator
An accurate, portable emulator of legacy computer systems.
Stars: ✭ 71 (-5.33%)
Mutual labels:  emulator
nes-rust
NES emulator in Rust with GUI
Stars: ✭ 78 (+4%)
Mutual labels:  emulator
NeoGB-Printer
An open-source and standalone Gameboy Printer emulator 100% compatible with all officially released games (110 in total) that support the accessory. Just print and save the images as BMP
Stars: ✭ 61 (-18.67%)
Mutual labels:  emulator
osnine-java
6809 and OS-9 emulator in Java
Stars: ✭ 17 (-77.33%)
Mutual labels:  emulator
IBMulator
The IBM PS/1 emulator.
Stars: ✭ 62 (-17.33%)
Mutual labels:  emulator
x86e
A simple x86 emulator, debugger, and editor in JavaScript.
Stars: ✭ 89 (+18.67%)
Mutual labels:  emulator
Gearnes
NES / Famicom emulator for iOS, Mac, Raspberry Pi, Windows, Linux and RetroArch.
Stars: ✭ 23 (-69.33%)
Mutual labels:  emulator
reboot to rcm
A small app to reboot 1.0 Switches into RCM mode
Stars: ✭ 32 (-57.33%)
Mutual labels:  nintendo-switch
soulworker-server
An emulator of the soulworker protocol written in Go
Stars: ✭ 15 (-80%)
Mutual labels:  emulator
rv32emu
RISC-V RV32I[MAC] emulator with ELF support
Stars: ✭ 61 (-18.67%)
Mutual labels:  emulator
nxquake
TyrQuake ported to Nintendo Switch
Stars: ✭ 17 (-77.33%)
Mutual labels:  nintendo-switch

Switch GBA Emulator

Docker Cloud Build Status

Motivation

Homebrewing / Hacking a switch is too much of a dangerous affair for me personally and after learning there is a browser I tried to get it running in there. Turns out it is (sort of) possible.

Preview (Old UI but still relevant)

This project is meant as an experiment of what is possible and not to be used commercially. This is a hobby project and therefore I won't commit to offering help / maintaining / updating this project unless I choose to do so.

Information / How it's done This project makes use of the Switch browser that comes up when trying to verify / sign in with certain DNS providers. I won't explain how to do this here but if are capable of setting this up you certainly will also be able to find that information yourself.

The way the Switch handles B is a bit different if there is an iFrame present on the page. In this case B will actually navigate the iFrame back first before navigating back the actual page (or reloading it). This is crucial for my workaround. With the use of postMessage I always immediately return to a "navigated" state of the iFrame.

This is a modified and heavily towards switch tailored version of [crowdsourced-gba](https://github.com/vinnyoodles/crowdsourced-gba) by vinnynoodles.

Planned features

  • [Done] Save states
  • [Done] Gamepad API

Button Layout

Thanks to the Gamepad API I was able to remove most of the onscreen buttons and enable hardware button support.

Since v1.0.2 custom layouts are also supported. Just click the cogs at the top of the screen during rom selection to open the options menu. The left side shows the GBA key and the right side shows the currently assigned Switch key.

Developer info The current layout file is found at `src/backend/layout.json`. A default configuration is always saved at `src/backend/layout.backup.json`, which is also used for the reset.


Usage

The emulator in it's entirety is ready to be pulled as a docker image. It runs on and exposes port 8888 by default.

Docker Images

Latest release
bfriedrichs/switch-gba:release-latest

Latest master (possibly unstable)
bfriedrichs/switch-gba:latest

Latest dev (most likely unstable)
bfriedrichs/switch-gba:dev

Older release
bfriedrichs/switch-gba:release-{version}

I'm not distributing any roms, so you will have to make a folder roms with your .gba files directly in it.

Example

docker run -d -v $(pwd)/roms:/home/roms/ --name switch-gba -p 8888:8888 bfriedrichs/switch-gba:release-latest

Versions

1.0.2

  • Added custom button layouts
  • Code restructuring

1.0.1

  • Add fix for content size warning after alerts are open for too long
  • Minor changes

1.0.0

  • Initial release
  • ROM selection
  • Gamepad support
  • Turbo mode (2-20x speed)

Misc issues / features

Some other stuff that I build / had to deal with.

  • Page size too large, refresh the page This popped up every now and then and then made the window lag out continously even when Cancel is pressed. I changed from png to uncompressed webp images and added logic that disconnects the WebSocket if there's no input for more than 10 seconds. The WebSocket automatically reconnects if there's new input.

  • Turbo mode When enabled turbo mode makes the emulator tick at times the speed of its usual execution (e.g. 600 vs 60 fps for x10). The output rate of frames remains 60 so the switch doesn't choke up.

  • Audio Sadly the switch doesn't seem to have an exposed audio API for the web browser. I'm still looking for a solution since various feature checkers actually report a prefixed AudioContext to be present but I didn't have luck with that yet.


Resources

Switch supported HTML features http://html5test.com/s/a77ccd45f1540617.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].