I present to you my wholly javascript NES emulator. It spins in a cube and a monkey throws barrels slowly, that's about it.
Though it started as more of a science experiment than anything else, I wanted to see just what can be done with pure JavaScript in this brave new world of 'browser apps can do it all'.
I actually ported the code a long while ago, optimized it a little, but there's still much more I could do.
I had abandoned it until typed arrays hit the street, as I figured the performance boost over regular javascript arrays for holding everything from the memory maps to the output buffers might give me a running chance again. It did, but just barely.
The next step is to run the emulator in a web worker, sending back partial frame update information to the calling thread. That may help, besides that there's still more code to flatten, and plenty of tweaks to be found.
I wanted to play with the file api, so I'll maybe write a function to load ROMs. I only have the most basic of mapper support at this point, so there aren't many that would load, but it's about the experience.
It would be nice to have it run fast enough to add sound. It might be fun to port my apu code over one night and have it just play back register dumps.
In the meanwhile I think I'm going to move on to kicking WebGls tires some more. Multiple textures were annoying me (broken?), and I want to set up a reusable post-processing chain I can play with. Then move on to loading models, skinning and animating some meshes, terrain generation. Make it so you can lock a smart bomb on the guy and blow him up with all your twitter friends.
Of course, if you just want to play some nintendo in your browser, my Silverlight version still works. It's still missing working IRQs, sadly, and who knows if and when I'll come back to it.
Wednesday, June 8, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment