Hacker News new | comments | show | ask | jobs | submit login
Full Gameboy Color Emulator in Javascript (grantgalitz.org)
86 points by kipsfi 1660 days ago | hide | past | web | 18 comments | favorite



It's also worth checking out Imran Nazar's excellent writeup on creating a Gameboy emulator in javascript: http://imrannazar.com/GameBoy-Emulation-in-JavaScript

Direct link to the first section, the CPU: http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-C...


This has been posted here a dozen times before, many times by the author himself.

http://www.hnsearch.com/search#request/all&q=Gameboy+emu... http://news.ycombinator.com/item?id=2427963 http://news.ycombinator.com/item?id=2477582

Impressive as the emulator is, it's been suggested to him before (and he has acknowledged) that he shouldn't be running non-public-domain ROMs on his site. If he gets a C&D/DMCA takedown, I have zero sympathy.


I don't get it. What's with all the reimplementations of stuff in Javascript (and WebGL for that matter)? I understand that the Web is the next big platform, and the Javascript is currently the lingua franca of the Web. But it doesn't make any sense that vast collections of working code that happens not to be written in Javascript should be reimplemented to fit this straightjacket.

It makes far more sense for the community to focus on the development of translators -- compilers -- from other languages to Javascript, and on the optimization of Javascript engines to run such translated code. I know such systems exist (most notably for Java and C), so I'm confused by the disproportionate amount of press stories like this one get.

Of course I'm ignoring the fact that one may wish to rewrite code in Javascript because they find the language interesting. I can't say I'm one of those people.

(Note: I don't mean this to knock the author's work. Writing emulators is interesting and fun, and I'm sure he did a good job of it. But a Game Boy emulator in Javascript (the language) is no more interesting than a Game Boy emulator in PHP. The interesting part is that it is a Game Boy emulator in Javascript (the platform), which IMO should not necessitate a reimplementation of a Game Boy emulator in Javascript (the language).)


You are definitely thinking a step ahead. Being able to compile existing programs directly would be great. If someone is successfully using those translators I'd like to see it.

Porting or re-implementing these kinds of oddball programs is a way to explore the possibilities. How fast can Javascript really run? Are the graphics APIs sufficient? Should browsers support USB joysticks? Cameras? In other words, helping to see where the straightjacket is loose. And, ideally, encouraging the browser developers to cut some of the straps.


Trying to compile code to JavaScript results usually in sub-optimal performance. You have to manually do it to tweak the best performance out of the language. It's kinda retarded, but it's analogous to writing assembly code for performance critical apps. Also, I did it for the lulz.


Yeah, this seems totally pointless. I could play GBC (and GBA) games using a Windows program with no problems nearly a decade ago. But this JS implementation lags in Firefox 9 on a computer that's just a few years old.

Why does everything have to be on the web? As with most other things, a mixed approach is the best one.


I shut the party down, willy wonka style.


The music on Tetris is wrong :(((

Works far better than some other GBC emulators I've seen though, nice work.


Because I added a different version of Tetris than the one most people know. I should probably switch the one there with the later version that changed out its music.


It seems to be down


Very well done!

I'd love to see an analysis of how the different major browsers handle this emulator.


Chrome runs the JavaScript execution the best, while sucky at graphics (Scaling via CSS is sluggish in chrome).

Firefox 4+ runs it overall well (Slight GC hiccups in Firefox 9 though).

IE9 runs it like crap (JavaScript execution is like firefox 3.6, slow as hell).

Opera 11.6 can't run it, because it doesn't follow the typed array spec, causing the emulated cpu to crash. Works in older opera versions though, but just a little faster than IE9.

Safari 5.1.X reloads the page when ever a game starts, because of a js engine regression that happened in safari 5.1.1. Works in webkit nightlies though, and Safari 5.0.X


If SOPA passes, this demo will die a quick death... :-(


It won't take SOPA to kill this. The existing laws are enough.


Basically, emulators are legal (Sony v. Connectix). Pirate ROMs are not (the "24 hours" excuse is BS). Hopefully they don't provide, link to, or otherwise encourage the use of those. There are perfectly good public domain ROMs they can use for the demo.

IANAL, though, so if the person who made this gets any nastygrams, they should talk to someone who is.


You must have not even looked at the link, because these cannot possibly be mistaken for "public domain ROMS". And yes, he provides, links to, and encourages the use of.


I was only commenting on legality in general. Commenting on the legal issues of some specific person's circumstances is something that should be left to lawyers.

That said, I wouldn't do what they're doing.


I killed it myself.




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

Search: