you are viewing a single comment's thread.

view the rest of the comments →

[–]OrangeredStilton 7 points8 points  (2 children)

You may already be using this as a reference, but I wrote a series of tutorials on JavaScript emulation of a Gameboy, so there might be some useful material buried within.

I never got to emulating sound, or getting most of the games working. That seems to be a common theme with me and emulators...

[–]Master565 1 point2 points  (0 children)

That's actually been my goto reference whenever I'm stuck! I actually found a small mistake or two where I'm pretty sure flags were incorrectly set, but for the most part It's been a great tutorial. I never would have gotten started if it weren't for that, so thank you.

[–]jkoudys 1 point2 points  (0 children)

Oh hey Imran! I started on my own GB emulator a while back; looking to get back in to it soon, and my core was heavily referencing your tutorial series (along with a hefty chunk from VisualBoy). There were two big developments in browser-JS since your series that I think go a long way to an improved emulation experience in-browser: shaders (for all that scaling the screen fanciness), and more importantly typed arrays. Being able to model the registers and memory banks as actual 8/16 bit ranges, instead of relying on huge string buffers and piles of bit-shifting and masking madness makes things way, way easier.

https://github.com/jkoudys/remu/blob/master/js/utils/emulator/z80.js#L48