Hacker News new | comments | show | ask | jobs | submit login
Gameboy color emulator entirely in Javascript (grantgalitz.org)
128 points by kmax12 1712 days ago | hide | past | web | 32 comments | favorite

On the one hand, this is pretty cool. On the other hand, I'm not sure the best argument for "look how far JavaScript has come" is to use it to do things that native code was doing 13 years ago. On the third hand, this has been around for like a year now. I'm fairly shocked that Nintendo hasn't come down on him yet for hosting commercial ROMs in this thing, they have a history of non-tolerance of these sorts of things.

On the fourth hand, it has an audio synthesis core that samples at 4194304 Hertz that's way more accurate than what GBC emulators had 13 years ago.

The point isn't the code, it's the emulation of the hardware the code runs on. A processor, ram, display and sound are being emulated inside a browser by JavaScript, and we can use this to run a binary almost perfectly. That is what is amazing here, not the ability to play tetris!

Meanwhile, native code was emulating an NES at full speed on a 60Mhz Pentium 1 back in 1997. http://bloodlust.zophar.net/NESticle/nes.html Its nice that we can finally do in browsers what required assembly 14 years prior, but it's not exactly satisfying...

The spotlight here goes to the browser, and what this means to it's future. Not what you can do with native code.

> The spotlight here goes to the browser, and what this means to it's future.

It probably means that the web browser's future is to be an awesome web browser.

Which is great because everybody has a browser and is capable of updating it.

It is not look how far Javascript has come -- it is and will always remain a mediocre language -- but how far the browser has come.

And I am not quite sure how you cannot be impressed with this.

On the other hand, emulating a machine of this complexity was beyond imagination when gameboy came out. On the other hand, Virtualbox can emulate much more complicate machines. On the other hand, this one lives entirely and safely inside your browser.

> Virtualbox can emulate much more complicate machines.

Virtualbox does not emulate anything, it uses the CPU's virtualization extensions and the code runs natively on the CPU.

What did VMWare do prior to "virtualization extensions" ?

Virtualization without extensions is possible, but tricky on x86. VMWare has historically used binary translation to deal with the tricky bits. (I.e. go through the binary before you run it, look for instructions that don't virtualize properly, replace them with sequences that can be virtualized and either do the same thing, or trap into the virtual machine monitor.)

Since it doesn't seem to be linked from the main page, this appears to be the source code (GPL):


please make the keys assignable. On my keyboard layout, z is right to t :/

Same here, the keys are in awkward places.

Just added Dvorak compatibility. :)

Yet another play-in your browser thing that gives zero f's about the y/z key switch on German keyboard layouts

Just use Y & X on a German keyboard.

Just added Dvorak overrides.

Is there a way to integrate local saving of games? It seems crazy to think someone could use this to play the old pokemans and "catch em all"

Unfortunately, LSDJ is unusable as you can't press A and the arrow keys at the same time.

This is probably an artifact of your keyboard. Most keyboards have sets of keys that can't be read in combination. For example, on the classic Model M, QWAS all pressed at once won't work properly (but asdf does.)

Find out more at http://en.wikipedia.org/wiki/Rollover_%28key%29#n-key_rollov...

I can do it in other emulators, so it's not a problem with my physical keyboard. I imagine it's an issue with Chrome.

That's a problem with your browser it seems then, as I can press multiple keys at the same time.

on the iphone 4: "Result of Expression 'document.getElementByID("drop down_progress")'[null] is not an object. File: undefined line: undefined.

That error is from the page overloading. Secondly, it won't run on mobile safari anyhow (Best will be 1 fps tops with no audio and no keyboard input).

Mobile Safari will never run this right.

it run extremely slow on my celeron SU2300 @ 1.2GHz, 8gb ram, google chrome @ ubuntu 12.04 not playable

It's just you: http://i.imgur.com/XuQL9.png

I can run multiple instances in parallel fullspeed on a shitty mac. If you don't have a GPU (or a blacklisted one), expect your browsers to run like shit.

First time I see this thinking JS has come very far.

This seems to get posted every few months. I guess people don't notice the search field at the bottom of the page.

OTOH, few months seems to me a good balance to recur on good posts without being too frequent.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact