When the Gamepad API was first announced for Chrome, I tried to get my USB NES RetroPort controllers to work, but Chrome did not seem to recognize them. I made a mental note to check back later, assuming the API would eventually be more polished. Fast-forward to this week where I was fortunate enough to attend Google I/O and score a Chromebook Pixel. It seemed like it was time to give my controllers another try.
Last night, I plugged a RetroPort into the Pixel and visited the Gamepad API test page, and it worked! Obviously the next thing I had to do was wire this up to JSNES, so that was the first thing I did when I woke up this morning. I now have my own fork of the JSNES project where I added support for the RetroPort controllers as well as loading local ROMs from disk. As I admit in my README.md, there are already outstanding pull requests for these types of things, but I wanted to have the fun of doing it myself (and an excuse to poke around the JSNES code).
Finally, the one outstanding feature I hoped to add was loading ROMs from Dropbox or GDrive using pure JavaScript. Neither product appears to have a simple JavaScript API that will give you access to file data like the W3C File API does. Perhaps I'll host my fork of JSNES if I can ever add such a feature...
P.S. I should admit that one does not need a Pixel to do these types of things. However, having a new piece of hardware and APIs that have been around long enough that you expect them to be stable is certainly a motivating factor. It's nice to have a project that doesn't involve any yak-shaving, such as figuring out how to install a version of Chrome from the Beta channel!
FWIW it's possible to stuff Drive API responses into File/Blob objects, but you're right that it's not easy. Luckily, this blog post has started some internal discussions about adding this as a feature to the JS client library, so this may be easier soon*
ReplyDelete*for some definition of "soon"
I got this working with the Dropbox API now: https://jsnes.bolinfest.com/. It's a bit sloppy because of the self-signed SSL certificate, but it works!
ReplyDeleteInteresting theory, but I think that all is much easier than u think. Thats why I wanna suggest u to play in ps1 roms https://romsmania.com/roms/playstation and forget about all your problems at least for a minute.
ReplyDelete