Code Monkey home page Code Monkey logo

gbajs2's Introduction

gbajs2 -- Community Fork

gbajs2 is a Game Boy Advance emulator written in Javascript from scratch using HTML5 technologies like Canvas and Web Audio. It is freely licensed and works in any modern browser without plugins.

Use it online! https://andychase.me/gbajs2

See the issues page for feature suggestions and ways you can help contribute!

Mailing list for general discussion or if you want to just be kept in the loop: https://groups.google.com/forum/#!forum/gbajs2

Feature List

  • Playable compatibility, see compatibility
  • Acceptable performance on modern browsers
  • Pure javascript, allowing easy API access
  • Realtime clock gamepad support (Pokemon Ruby)
  • Save games

License

Original work by Endrift. Repo: (Archived / No longer maintained) https://github.com/endrift/gbajs

Copyright © 2012 – 2013, Jeffrey Pfau Copyright © 2020, Andrew Chase

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

gbajs2's People

Contributors

andychase avatar cam-opperman avatar catarax avatar domon avatar endrift avatar fordi avatar rettgerst avatar tintheanh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gbajs2's Issues

not issue just question

is there anything like this but for nds? i have done some research but no luck. Something were you just put in a save and a game file and boom you play. i have tried emulator.js but i couldn't fine a web server that worked :(

Expose save states through the ui

This should work

<script>
function save() {
	let gba = this.gba;
	gba.pause();
	window.localforage.setItem("state", Serializer.serialize(gba.freeze()), function (err) {
		gba.runStable();
	})
}

function load() {
	let gba = this.gba;
	window.localforage.getItem("state", function (err, value) {
		Serializer.deserialize(value, function (out) {
			gba.pause();
			gba.defrost(out);
			gba.runStable();
		});
	});
}
</script>

<button class="bigbutton" onclick="save()">SAVE</button>
		<button class="bigbutton" onclick="load()">LOAD</button>

However we are running out of room in the ui, so some ui designs make be helpful

Settings and ROMS Menu UI

Hey all, looking to create the UI for both menus this week. What kind of information and menu items need to go into both of these menus, please see current designs.

Are there any suggested features that would be nice to have?

Load ROM via URL, from input field or via query param

Allow users to enter a URL that points to a ROM to load.

Users on mobile may have an easier time pasting in a link to a file on Dropbox or a personal server than browsing their device's file system. Same could be done for the save.

Also, allow the ROM URL to passed in via a URL query parameter. This would enable users to bookmark or "Add to Homescreen" an instance of GBA.js that would boot up that game right away. An additional URL parameter could also load a save.

Autoloading a rom from a URL

Hello! I have a question that I couldn't find answered in the documentation. I am working on a GBA game and I'd like to publish it so that people can play it in the browser without downloading the rom file and clicking "Select" on https://gbajs2.com. Basically I'd like to know how to modify index.html so it automatically loads a rom from a preselected URL rather than prompting the user.

I'm sure this is probably obvious to someone with a cursory understanding of Javascript, but for the rest of us, it'd be really useful to have this documented. Thanks!

Will it support network features?

it seems that this project is so perfect! But is it possible to add some network api that let people link together through websocket? If so, that will be so great to play games like Shinning Souls 2.

Improve saving ui (currently confusing)

Whenever you open a ROM, the "Upload Savegame" button disappears. Whenever I use the button before I open a ROM, it does nothing. Also, are the saves meant to be downloaded with no file extension?

Provide an open source game

https://github.com/gbdev/awesome-gbdev

Under the homebrew heading, there are multiple custom open source games - even something as simple as a flappy bird clone being loaded/available by default would make it much easier to check out your emulator (especially its performance compared to WASM projects)

Mobile interface

There is a pretty good implementation of it here:

https://github.com/trentmercer/gameplayadvanced

I have been working with some of these changes locally. I do think the style of it could be improved. Also if there could be a way of allowing someone to drag their finger to change which dpad input they are putting in (currently only taps work)

@trentmercer are you interested in trying to merge your changes in?

Project main ui suggestions

A couple people suggested the ui could be improved:

  • Mobile ui non existant
  • A lot of buttons now
  • Need a remapping design
  • Possibly prepare a homebrew game to show off the emulator?

Hoping to start a thread where people can post some images of designs

How to preload ROMs and avoid selecting ROM

I'm a private user.My school device use the browser that doesn't support local file browsing and downloading.Is there a method that can preload ROMs ?And can we use Cookie to save the game?

GBA image is double-scaled

That is, when I change the size of the canvas, the scale of the rendered image is not scaled proportionately. If I scale it to 0.5, only 1/4 of the half-size canvas is covered (the rest being a ghost of the last full-size frame). This gets in the way of adding a fullscreen button (since the image renders way off the screen).

start bug 勇者斗恶龙怪兽仙境中文版.gba

Rom link removed
gba.js:233 Uncaught Unimplemented software interrupt: 0xd
runFunc @ gba.js:233
setTimeout (async)
GameBoyAdvance.window.queueFrame @ gba.js:68
runFunc @ gba.js:225
setTimeout (async)
GameBoyAdvance.window.queueFrame @ gba.js:68
runFunc @ gba.js:225
setTimeout (async)
GameBoyAdvance.window.queueFrame @ gba.js:68
runStable @ gba.js:237
(anonymous) @ (index):130
reader.onload @ gba.js:126
load (async)
loadRomFromFile @ gba.js:123
run @ (index):122
onchange @ (index):372

PKHeX

Hello. I was wondering if there is a way to use the saves in PKHeX? Thank you!

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.