Code Monkey home page Code Monkey logo

gameboy's Introduction

gameboy

NPM module that exports the GameBoyCore.js file from grantgalitz/GameBoy-Online

Changes:

  • Converted into module.
  • Avoids using globals.
  • Cleaner interface for options tuning.
  • Compatible with browsers and node.js.
  • Removed js-based resizing in favor of browser's.
  • Allow for ROM input as Buffer or ArrayBuffer instead of deprecated binary strings
  • Linting.
  • Removed unneeded dependencies.
  • Main interface turned into an Emitter.
  • Incorporated debug.
  • Added server-side usage examples

How to use

var gb = require('gameboy');
gb(canvasElement, romData, opts);

Options

  • bootRom - boot with boot ROM first (true)
  • gbBootRom - use gameboy boot ROM instead of gameboy color (false)
  • mbc1 - allow for MCB1 instead of ROM only (false)
  • prioritizeGb - give priority to gameboy mode (false)
  • interval - emulator loop interval (6)
  • canvas - custom canvas constructor (null)
  • imageSmoothing - smooth images when resizing (true)
  • drawEvents - emit draw (false)
  • sound - sound interface (null)
  • volume - volume level (1)
  • audioBufferMin - minimum span amount over x interpreter iterations (10)
  • audioBufferMax - maximum span amount over x interpreter iterations (20)
  • colorizeGb - colorize gameboy mode (true)
  • overrideMbc - override MBC RAM disabling and always allow reading and writing to the banks (false)
  • typedArrays - use typed arrays (true)
  • channels - user controlled channel enables ([true,true,true,true])

Events

  • draw raised only if drawEvents is true whenever a draw to the canvas occurs
  • error raised when emulation should be paused due to unexpected behavior

License

GPL2 - Copyright (C) 2010 - 2012 Grant Galitz

gameboy's People

Contributors

rauchg avatar

Watchers

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