https://github.com/splch/js-emulator
Updated fork of a JavaScript Game Boy Emulator
https://github.com/splch/js-emulator
gameboy gameboy-development gameboy-emulator gb
Last synced: about 1 month ago
JSON representation
Updated fork of a JavaScript Game Boy Emulator
- Host: GitHub
- URL: https://github.com/splch/js-emulator
- Owner: splch
- Created: 2022-01-15T23:58:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-17T06:31:20.000Z (over 3 years ago)
- Last Synced: 2025-08-25T01:28:41.919Z (about 1 month ago)
- Topics: gameboy, gameboy-development, gameboy-emulator, gb
- Language: JavaScript
- Homepage:
- Size: 635 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JavaScript GameBoy Color Emulator
Fork of GB Studio's fork of Grant Galitz's JavaScript GameBoy Color Emulator made for running a single ROM
when uploading homebrew games to services like Itch.io.This version makes the following changes.
- Fixes undefined `customControls` error
- Sets game title from `___PROJECT_NAME___`
- Mostly uses modern `let` instead of `var` for improving scope
- Adds helpful text in HTML
- Canvas fills browser window on desktop/tablet while keeping aspect ratio
- Touch controls displayed on mobile/tablet
- Using css `image-rendering: pixelated` rather than bilinear filtering
- Touch dpad controls for mobile using touch move with a deadzone
- Keyboard fix for iPad keyboard case that doesn't report keyup event keycode
- Wait for keyboard or touch input before starting AudioContext to fix issues in Chrome and iOS not playing Audio
- No ability to switch ROM, or save/load states, this version is intended for deploying a single game## Usage
- Clone this repository
- Add your ROM file as `rom/game.gb` (or edit romPath in js/other/mobile.js to point to your ROM file)
- If you're running this as a webapp, update the `images/128.png` file
- Upload to a webserver and visit index.html## Keyboard Controls
Up - Up Arrow / W
Down - Down Arrow / S
Left - Left Arrow / A
Right - Right Arrow / D
A - Alt / Z / J
B - Ctrl / K / X
Start - Enter
Select - ShiftEdit by changing `bindKeyboard` in `js/other/controls.js`.
## License
**Copyright (C) 2010 - 2016 Grant Galitz**
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.