I'm not sure if anyone here is familiar with JSNes.org. I've been going through the open source project JSNes and trying to get it working with some of my roms on one of my websites, but I've been running into issues. It looks like you should be able to get it running without using React, but the example they use JSNes-web uses React, so I'm trying to figure out how to get it working without React.
Anyway, I suspect this is something I'm going to have to do on my own, but I wanted to ask if anyone else has done this before I waste a few days trying to figure it out. So if you've worked with JSNes in the past, and don't mind me asking you a few questions, please give me a shout.
Thanks,
Rick
Have you tried contacting the developer?
He's on twitter, and looks like a very experienced web developer. He could probably give you some good advice.
samophlange wrote:
Have you tried contacting the developer?
He's on twitter, and looks like a very experienced web developer. He could probably give you some good advice.
I tried sending him an email, but he never got back to me. I can figure this stuff out, it's just a lot more time consuming. I figured it was kind of a long shot asking if anyone here had worked with it, but you never know.
Thanks for the suggestion
I spent like a day or so on it a year ago. Ran into the same issues mostly. I tried contacting the dev as well, but maybe it wasn't an active email or something?
Got it working, but it seems to have some problems with sprites that are smaller than 8x8. By smaller I mean they have transparent pixels all the way around the edge so that they are effectively smaller than 8x8.
https://www.embed.com/nes/nesteroids.htmlthe controls are arrow keys for the d-pad and asdf for select, start, b, a Next week I'm on vacation. The week after that I'll try to get my jsnes helper out... I'll also need to try and figure out why jsnes has issues with the smaller than 8x8 sprites.
I had a bit of luck using a different emulator:
https://github.com/peteward44/WebNES (It's MIT licensed) ... might be worth trying to see if it avoids your bug. There's a demo site you can load your rom in w/o setting it up to see:
http://peteward44.github.io/WebNESThe version they use for their demo is a lot easier to look at:
https://github.com/peteward44/WebNES/tree/gh-pages -- if you look at the index_app.html, that shows how to embed it and use it.
I'm using it for my starter kit app here if you want another demo:
https://cppchriscpp.github.io/nes-starter-kit/ -- I stripped out a lot of the formatting around it to make it simpler.
Hope this helps!
I would go for an Emscripten-based emulator (asm.js/WebAssembly) such as
https://github.com/ryanwmoore/fceux for better performance.
I made a more stripped down version here:
http://files.slembcke.net/temp/nes-embe ... stack.htmlAt 100 lines, someone might find it a bit easier to embed in their own pages. I haven't gotten sound working yet though. The example version throws a ton of errors in the console for me so I was going to try something else. (edit: sound is working now, but like the original, it ignores sampling rate and changes game speed based on it. Bleh)
@thefox Performance isn't *really* an issue, ease of embedding is what I wanted. Also, that one doesn't work for me in the two browsers I bothered to try. (shrugs)
slembcke wrote:
I made a more stripped down version here:
http://files.slembcke.net/temp/nes-embe ... stack.htmlAt 100 lines, someone might find it a bit easier to embed in their own pages. I haven't gotten sound working yet though. The example version throws a ton of errors in the console for me so I was going to try something else. (edit: sound is working now, but like the original, it ignores sampling rate and changes game speed based on it. Bleh)
@thefox Performance isn't *really* an issue, ease of embedding is what I wanted. Also, that one doesn't work for me in the two browsers I bothered to try. (shrugs)
I'd give it a try. Do you have it on github?
I sent a pull request to the original author as well, but never heard back:
https://github.com/slembcke/jsnes/tree/master/exampleIt doesn't fix any of the timing issues due to audio audio sampling rate from the original though.