bfirsh / jsnes-web Goto Github PK
View Code? Open in Web Editor NEWA browser UI for JSNES, a JavaScript NES emulator
Home Page: https://jsnes.org
License: Apache License 2.0
A browser UI for JSNES, a JavaScript NES emulator
Home Page: https://jsnes.org
License: Apache License 2.0
Replacing bfirsh/jsnes#10 and an implementation in bfirsh/jsnes#20 .
Ideally we'd find something that both does an on-screen controller and supports the gamepad API, so we can hit #19 too.
Currently you get horrible repeated samples.
Hi thanks for this amazing emulator.
I managed ( after a hard pain ) to get JSNES work on my server.
But Where to put the rom files ? I tried every place in the /build , folder without success.
I don't know where the serve folder is ( I mean /run).
Hey, I know that this is not really a issue, but I just wanted to thank you for the awesome project and let you know that thanks for the emulator's clean design, I was able to implement two-players Net Play over network on my jsnes frontend!
The project is open source, it's deployed at https://rodri042.github.io/nestation and
here is a topic on nesdev explaining the details.
The jsnes-web
's FrameTimer was working bad on my 120hz screen (it was running the games really fast) so I had to implement it by myself here -> https://github.com/rodri042/nestation/blob/master/src/emulator/FrameTimer.js
Maybe you can use the timer or other parts as well on jsnes-web.
Cheers!
I'd really like to take up issue 171 of making this an npm package. However I'd like to TypeScript-ify it first so that the components' props' types and methods' types can be easily found and documented.
While I can sideload an emulator to my phone, that requires a bit more work than just loading JSNES.
On my device (iPhone 7 Plus, iOS 14.5.1, Mobile Safari) JSNES seems to run fine, but I can’t actually play the games because of the lack of a keyboard to control it with.
It’d be nice to have on screen controls available for mobile devices, as well as a file picker that doesn’t use drag and drop, so that I can load my own ROMs
@bfirsh Hi. Could you help me with one question. I tried to run my custom game by example from source directory https://github.com/bfirsh/jsnes and compare it with the same game in web https://jsnes.org/. I tested it on same computer.
And in case of example I see that game is faster than in web. I think the difference is about 15-20%.
Could you help me with it? How can I set the speed of emulated game?
Thanks Linkandar Airimder for the report, via email:
I discovered that the controls for 2-player mode are unplayable to someone on a laptop without a number pad. If you would be so kind, would you be willing to change the controls to something similar to the 1st players? Nearly any control scheme would be preferable to the current.
Navigating away should cancel download.
It'd be really neat if we had a homebrew section, with credits and links to authors and so on.
https://developer.mozilla.org/en-US/docs/Web/API/Gamepad
Loads of existing implementations:
Drag & drop, or something like that.
See bfirsh/jsnes#2 for previous implementation.
A common use case for JSNES is by homebrew ROM authors to run demonstrate the ROM on their websites.
This is currently quite hard to do - see bfirsh/jsnes#219. It'd be really nice if jsnes-web was refactored somehow so that it could be embedded to play a single ROM.
When I do yarn install i'm getting the following errors -
yarn install v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/react-router/-/react-router-4.4.0.tgz: Request
failed "404 Not Found"".
Please let me know if there's something i'm missing.
Thanks
ezpz
This is the code I used function sendKey (code) {
var down = new Event('keydown');
down.keyCode = code;
document.dispatchEvent(down);
var press = new Event('keypress');
press.keyCode = code;
document.dispatchEvent(press);
setTimeout(function () {
var up = new Event('keyup');
up.keyCode = code;
document.dispatchEvent(up);
}, 1);
}
All of the classic games I would play daily are gone! What happened?
This will allow people to embed the emulator on their own sites.
We probably need to split this out into a jsnes-react
library or something: https://github.com/insin/nwb#react-components-and-libraries
See also #170
There should be some basic automated tests for the gamepad support added in #164. I don't have a gamepad, and I imagine most contributors won't, so it'll be very easy to cause regressions. It is also impossible for me or other contributors to refactor/touch that code because we can't test it.
Once there are some tests, there are some refactorings I have noted in #164 that are probably worth doing.
Current approach is use requestAnimationFrame, unless requestAnimationFrame isn't 60fps in which case use setTimeout to time frames. Separately, extra frames are run if the audio buffer runs low.
We can do better than this, I think. If requestAnimationFrame isn't 60fps and the browser supports audio, we can drive the emulation from the audio instead of using setTimeout. If audio isn't supported, we fall back on setTimeout.
Please support more mappers, most of the games/hacks doesn't work.
Thank you
Dump snapshot of whole emulator to JSON and restore. See bfirsh/jsnes#16 for existing issue and bfirsh/jsnes#42 for existing implementation. Not to be confused with #17 which is built-in save game support.
Simplest implementation of this is to just restore previously saved game, but it could potentially keep several save games too.
Hi! This project is amazing! Great work!
I'm trying to use jsnes-web
on a github pages site. I'm doing so with the gh-pages package. I've used gh-pages
to successfully deploy a react site in the past.
Prior to deployment I've added a line to the package.json
(as per gh-pages
instructions)
"homepage": ".",
I've used the following to build and deploy (from the root of jsnes-web
)
npm run build
npx gh-pages -d dist
This appears to work. And if I run
npx serve build
I see a working version of the site (locally). When i browse to the corresponding site though, I get a blank page.
Here's the repo and branch that I'm building from: https://github.com/ds17f/jsnes-web/tree/customize
and here's the GH pages site: https://ds17f.github.io/jsnes-web/
Does anybody have any thoughts on why this doesn't work? I would expect to at least see the main title screen which lets me pick a rom. But instead I get nothing. I've also checked the js console and there's no output worth mentioning.
like make a .sav file
@bfirsh, sound emulation via Web Audio API does not work in iOS 10 Mobile Safari, iOS WKWebViews, or Android browsers. Unlocking the audio context on a touchend event before loading a ROM from the list might resolve the issue. Sound is working fine in my Chrome and Firefox desktop browsers, though.
https://jsnes.fir.sh/ (open web ui in mobile browser)
Originally reported here:
bfirsh/jsnes#52
Lots of newbies are using JSNES as an educational thing: bfirsh/jsnes#109
It’d be nice to have some clear documentation to get the emulator up and running from nothing.
From review in #136:
keyboardController.keys
could be passed to ControlsModal
. You could then have a setKey
method on KeyboardController
that was passed all the way down to each row. That way the state management and business logic is all in KeyboardController
.#136 added customizable keys, but there is no way for users to discover this behaviour. Perhaps the text "Click to change" should be somewhere, perhaps as a tooltip?
Support built-in save games. High scores, save games, etc.
Not to be confused with #18 which is about snapshotting the entire emulator.
Why does the item run in the ios equipment no sound?
I think Sentry does this.
Jas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.