[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Updated fork of a JavaScript Game Boy Emulator

Notifications You must be signed in to change notification settings

splch/js-emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 - Shift

Edit 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.