

Gameboy Color Emulator:  A brilliant use of HTML5 - corwinstephen
http://gamecenter.grantgalitz.org/
One of the most brilliant uses of HTML5 I've ever seen.  The technique he used to build this is beyond my comprehension at this point, but I'd certainly love to dive into his code (which is available publicly on Github) and figure it all out!
======
_frog
Related, GBA.js is a project a friend of mine has been working on to make a
GameBoy Advance emulator in pure Javascript. A WIP version is running at
<http://endrift.com/gbajs/index.html> but there's a lot of bugs and
compatibility is far from perfect. Source code is all on GitHub at
<https://github.com/jpfau/gbajs/>

~~~
grantgegalitz
ahahahaha, I'm working on my own GBA emulator in JS too. It seems I might have
started a trend, since I've been working on
<https://github.com/grantgalitz/IodineGBA> for a bit now.

------
SoapSeller
Previous posts: <http://news.ycombinator.com/item?id=3969394>
<http://news.ycombinator.com/item?id=3446871>
<http://news.ycombinator.com/item?id=2266701>

------
DiabloD3
This is the third time this has been featured on the front page of HN. Not
that I'm complaining, its a neat pile of Javascript.

~~~
grantgegalitz
Yeah seriously, there has to be other js projects... :P

------
mbel
Has anyone suceeded in running it in any browser on any smartphone? It seems
to fail on Windows Phone's IE. However, it works perfectly in few desktop
browsers (including IE9), I've tried.

Anyway it seemes, that gameboy game format could be used as some kind of
lightweight format for cross-platform browser games. It could enable
publishing small browser games without giving away js sources or using third-
party plug-ins.

~~~
pilif
Works fine (not at full frame rate, but playable) on an iPad 3. No sound of
course. The Audio APIs still aren't just there yet for dynamically generated
audio.

~~~
lbo
Same with the iPhone 4s, though it tried to download the .js file first and
didn't start working until I hit back. Load time was also much longer on the
iPhone 4 over the same connection. Low framerate is hard to play through :/

------
Keyframe
I'm not that familiar with html5/js, but I am curious if it is viable to
develop games for it old-school. What I mean by that is having a framebuffer
and direct per pixel control. Is this what people do?

~~~
TazeTSchnitzel
Canvas w/ ImageData lets you do exact pixel control, and with
requestAnimationFrame you can time animations best for the system.

~~~
Keyframe
Thanks! But do people use that for web game development at all?

~~~
TazeTSchnitzel
I've certainly used it myself (for loading levels - bitmaps are great for
level designing), dunno about performance with direct pixel access. It may be
higher or lower.

------
makmanalp
My friend wrote jsGB over 2 years ago, you might find that interesting too:
<https://github.com/Two9A/jsGB>

Maybe needs a canvas update :)

------
duqee
Really cool, but on other Gameboy emulators I have used including the visual
boy advanced, Z=A and X=B this is the other way around for any reason?

~~~
jasonkostempski
Because on the physical Gameboy the B is on the left and A is on the right but
then again the DPad is on the left and the buttons are on the right and I use
my thumbs instead of fingers so I'm not sure copying the physical layout for
just this one particular thing improves the experience any.

------
Aloush89
How does one teach himself to write such a thing?

~~~
pmarin
How To Write a Computer Emulator: <http://fms.komkon.org/EMUL8/HOWTO.html>

Study of the techniques for emulation programming:
[http://www.scribd.com/doc/94546/Study-of-the-techniques-
for-...](http://www.scribd.com/doc/94546/Study-of-the-techniques-for-
emulation-programming-by-Victor-Moya-del-Barrio)

------
huhhhuhh
Started to download this. It appears to be malware infected.

~~~
grantgegalitz
There is nothing to download.... It's just a webpage...

~~~
snowman41
Webpages are files too...

------
pimentel
Aren't game ROMs illegal to distribute? How legal is this?

~~~
TazeTSchnitzel
Definitely illegal, I'm sure he'll get a C&D eventually.

