Why not just use qemu?
Writing a system emulator in JS/HTML5 is a great way to learn the system being emulated, how to quickly and efficiently read assembly and/or opcodes for the processor under emulation, and acts as an introduction to HTML5 with it.
I plan to write a GB emulator too one day.
I'm a Java programmer by day job but I find it dull so this is my "hobby" at the moment