JavaScript Gameboy Color Emulator 153
Prosthetic_Lips writes "A programmer named Grant Galitz has released a GameBoy Color emulator written in HTML5/JavaScript, and it will run ROM images stored locally. What's amazing is that it runs the games at a playable speed. We discussed a different, but similar project six months ago, but it seems like this one is pretty complete at this point. It's also open source."
GBC JavaScript (Score:3, Funny)
Holy shit someone made JavaScript useful?!?
Re: (Score:1)
Maybe you should have a look at QML from Nokia/Qt Community. Some of the apps look stunning and use Javascript to control the game logic
Re: (Score:3)
The x86 emulator running Linux in Javascript wasn't impressive enough to you?
http://bellard.org/jslinux/ [bellard.org]
Re: (Score:2)
Why? (Score:2)
It's really cool, and I bow to his technical prowess for getting it working, but I have to ask why anyone in their right mind would choose HTML5 and Javascript to implement a Gameboy emulator???
Re:Why? (Score:5, Insightful)
Well, if you can visit this site on the phone with a modern browser for example...
Re: (Score:1)
Right.
Around 1GHz.
Re: (Score:2, Insightful)
No. They might both be of the same magnitude of order, as in around 1GHz, but there definitely is a real noticable difference between the old 1GHz processor i bought around a decade ago, the 1GHz processor in my iPad and the 1.42GHz on my relatively old desktop.
Clock speed is not comparable when you have different architectures and the surrounding hardware differs greatly.
Re: (Score:2)
but there definitely is a real noticable difference between the old 1GHz processor i bought around a decade ago, the 1GHz processor in my iPad and the 1.42GHz on my relatively old desktop.
Considering that the topic at hand is GBC emulation, I'm doubtful that there would be any noticeable difference.
Re: (Score:2)
Re: (Score:1)
Yes, a modern 6 core 3GHz processor runs around 1GHz... like Road Runner running around Wile E. Coyote.
Re: (Score:2)
Re: (Score:1)
well. think about it. your walled garden mobile device has to do js and html5 soon enough. .. ..so it's not so walled garden anymore. it shows how futile it is to try to keep censoring what you can run on a device from the user.
Re: (Score:2)
Re: (Score:2)
What? who mentioned Java?
Re: (Score:2)
Re: (Score:2)
Yeah, I know, Java, Javascript, whatever
There is a HUGE difference.
Re: (Score:1)
Re: (Score:3, Funny)
Wow, you're an idiot.
Re: (Score:2)
Re: (Score:2)
You confused Java and Javascript for one.
Re: (Score:1)
Re: (Score:2)
JavaScript isn't OO in the same way that, say, Java and C# are. Java is class-based, JavaScript is prototype-based. JavaScript is also dynamically typed while Java is statically typed.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Well, several years ago you could say Javascript was solely a web scripting language. It's showing up more and more as a general-purpose scripting language in stand-alone applications. It's actually much cleaner and faster when divorced from the browser, because 90% of the annoying cruft associated with Javascript is actually the crappy HTML DOM, browser
Offline, JIT, and camera (Score:2)
My point is that, if you were happy using non-native code, no "walls" have ever stopped you on the iPhone.
Three differences:
Re: (Score:2)
Still walls (Score:2)
The walls apply only to native code
Then please allow me to rephrase: The 5 MB wall, speed wall, and camera/microphone wall apply to non-native code. I'd like to hear why these aren't walls.
Re: (Score:2)
Re: (Score:2)
From my understanding, 5MB is the default, and if it grows the user is prompted to allow the increase. That may be just for databases though, I haven't personally tested it.
See: http://ofps.oreilly.com/titles/9780596805784/ch05_id35816678.html [oreilly.com]
Re: (Score:2)
Yes, Java and Javacript are TOTALLY different, just like tigers and polar bears are TOTALLY different (if you disregard the fact that they're both large carnivores and therefore incredibly similar from an alien point of view). My point is that, if you were happy using non-native code, no "walls" have ever stopped you on the iPhone.
Um, no. The iPhone doesn't *have* Java support. Yes, they are like polar bears and tigers. And the iPhone is like Antarctica. To an alien visiting Antarctica, there's a big difference between a polar bear and a tiger because only one of them lives there.
And yes, I know that there's a difference between Antarctic and The Arctic Circle, but they are both kinda similar, right? Except for the lack of polar bears ...
Re: (Score:2)
Yes, I get it, Java and Javascript are different, give me a break! Google for "Java Javascript difference", count the similarities and count the differences. I found more similarities than differences. Yes, one has to be compiled and the other doesn't. Yes, one is a scripting language and the other isn't. I don't care. They are languages with a C-ish syntax that are mainly used to run little programs in browsers (yes, Java can run outside of a browser too, I know), they are slower than native code and have
Re: (Score:1, Redundant)
Re: (Score:2)
-1 Redundant.
Re: (Score:1)
It's really cool, and I bow to his technical prowess for getting it working, but I have to ask why anyone in their right mind would choose HTML5 and Javascript to implement a Gameboy emulator???
You answered your own questions in your opening remarks.
Re: (Score:2)
I have to ask why anyone in their right mind would choose HTML5 and Javascript to implement a Gameboy emulator???
Platforms that require digital signatures with an expensive certificate for native applications often do not require them for JavaScript applications.
Re:Why? (Score:4, Funny)
Maybe they want it to run on Windows 8.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
The same reason they have three-legged races.
It runs pokemon red! (Score:2)
http://i.imgur.com/HX3pF.png [imgur.com]
Render me impressed. The sound is a bit of a mess but works better than that javascript Doom from some days ago.
I don't have a ROM for pokemon gold/silver but they might work as well. Pretty cool.
(Why pokemon and why should you care? It squeezes the gameboy until the last drop)
Re: (Score:1)
Re: (Score:2)
Well yes, graphically speaking DKC or even the infamous Resident Evil and a few other titles I can think about, do push the console much further in graphics.
However, pokemon required a lot of clever and/or gross hacks to fit everything in the minuscule available space. It's like cramming a modern-style database in a 8086.
(I believe the second generation (gold/silver/crystal) used a larger ROM size so they could relax a bit and fit stuff more liberally, but read about the "glitch pokemon" "Missingno" which o
Re: (Score:1)
Re: (Score:2)
I have a self-dumped pokémon red rom, and it does indeed run pretty well.
Colour me impressed!
Re: (Score:2)
Nah, I have acute versionitis so I am playing Black and White because it has more of everything. Although it can be a feat to finish Crystal in a javascript emulator of all things.
Re: (Score:2)
Impossible! You must be trolling!
A GBA emulator would be extreme. Shouldn't you start with something smaller like...megadrive(genesis) or pc-engine(tg16)?
Although if GBA-style visuals are possible and manageable in javascript, I will be really tempted to do games in there...I am worried about the sound though, none of this cool javascript demos seems to get sound right judging by slashdot comments.
Ahem, I digress. If you aren't trolling, I hope to see that emulator showcased in here as well.
Re: (Score:2)
Re: (Score:2)
Damn, I'd mod you informative if not because I posted already. That's a lot of insight on the topic in a single post.
This actually works =D (Score:2, Interesting)
Google Pokemon ROMs...
Download Pokemon Gold...
I'll be back in 20 hours...
It's also open source. (Score:1)
It's also open source.
Are there any JavaScript applications which aren't?
Re: (Score:2)
Remember back in the day... (Score:1)
Remember back when JavaScript was good for little more than web forms and maybe some silly sparkling rainbow ponies? It's amazing how far this little language has come. I think a lot of these developers start projects like this just to show they can. Preconceptions die hard with developers. There's a lot of developers out there still afraid to use anything other than C++ for a basic desktop application because, "those other languages are slow". In think in the open source and *nix communities attitudes
Re:Remember back in the day... (Score:4, Insightful)
There's a lot of developers out there still afraid to use anything other than C++ for a basic desktop application because, "those other languages are slow".
Euhm. JavaScript *is* slow. In this case, it runs a technology of 13 years ago in a platform-on-a-platform. On hardware that is a zillion times faster than a handheld game computer. I have the feeling computers get more and more sluggish the last years, just because of all this eye candy and layer-upon-layer.
Remember C64 boot times? It was subsecond. Granted, it loaded almost nothing, but it is also 30 years ago. But even the iPad (dedicated hardware, relatively small OS footprint) needs several tens of seconds to boot.
Re: (Score:1)
You're right, and I'm not trying to say JavaScript is just so damn blazing fast people should rewrite all their FORTRAN code in JS. I'm just saying that a lot of progress has been made making the language somewhat capable. It's come along way in the last 10 years. I guess I went off topic a bit, as I wasn't specifically referring to JavaScript with that comment; I was talking more about why people do fun, but somewhat pointless projects like this in a language like JavaScript. It's good fun do things wi
Re: (Score:2)
Isn't QuickBasic a compiled language? If so, I don't see anything weird in making 3d games in it, even on old and slow hardware.
Re: (Score:2)
Wait, what are you talking about? Do you mean booting to (presumably) the BASIC interpreter (built into ROM), or actually booting off of a 5.25" floppy into an OS? If the latter, I doubt sub-second. Maybe a couple of seconds at best.
I never had a C64, I am comparing with the general features/abilities of other computers of the time.
Re: (Score:2)
Do you mean booting to (presumably) the BASIC interpreter (built into ROM)
The one second boot is booting into BASIC interpreter, as that essentially was the C64s OS/commandline. Loading stuff from a floppy of course took a whole lot longer.
Re: (Score:2)
Yeah, but if you had a floppy in the drive, doesn't it boot directly from that?
In other words, that was my point that I didn't state too clearly -- that most people wouldn't actually get that sub-second boot time, since they'd be booting a floppy to get an OS/run a program.
Re: (Score:2)
Yeah, but if you had a floppy in the drive, doesn't it boot directly from that?
No, it would always boot into BASIC from which the user then had to load the game manually with LOAD "*",8,1:RUN. Only the later Amiga did auto-boot into whatever floppy you had in the drive. The C64 however had a module slot, so that you could for example insert an enhanced BASIC module and if that was inserted, on power on, the C64 would boot directly into that, instead of the default BASIC, again that was essentially a second.
Now of course, actually loading a game from floppy could take minutes, but havi
Comment removed (Score:4, Insightful)
speed of your computer getting you down? (Score:5, Interesting)
Finding that your machine is fast enough? Noticing that previous generation native software runs at a good speed, providing you the security of physical barriers and an uptime which doesn't require you to rely on hundreds of cooperating network, storage and service companies? Worried that it's too easy to trust the admins in your own office more than any number of competitors, foreign governments and bored hackers?
Then you want... THE CLOUD. Turn your PC into a graphical terminal and turn the UI and responsiveness clock back 15 years. Show off to your friends that, thanks to the uniquely layered framework making up THE CLOUD, only you have a machine modern and beefy enough to emulate a 4MHz Z80. You too can have what you had with Windows 95, today!
Pretty much my feeling (Score:5, Interesting)
I've no issue with stuff being online. I love the Internet, it is a major part of my life both in terms of entertainment and profession. However let's be straight as to when it is and isn't useful. This "Let's do everything in a webbrowser," shit is stupid. No, let's not. There is nothing wrong with local, native apps and indeed there's efficiency advantages to be had.
Maybe someday we'll have processors so ridiculously overpowered it won't matter, you'll be able to run everything in a very high level language, all sandboxed up, with all kinds of crazy overhead and still have great performance and do it on less than a watt. However until that day, I think there's plenty of room for more efficient things on your computer.
That is all, of course, not to mention any of the security or privacy concerns you note.
I like the progress of technology but I dislike the fadism. People get in to these various fads with no real thought of if they are a good idea for everything. Currently "the cloud" and 3D video top my list of stupid fads. Not that having remote, distributed, data storage and computing is useless in all cases, but we had that before "the cloud." "The cloud" is rather ill defined and just seems to be BS speak for "Let's do everything somewhere else online because... well I don't know but it is an awesome fad!"
Seriously people, use the right tool for the job.
Re: (Score:2)
Yes, but.
The Internet is like that hot girlfriend that promised to give you a threesome with her and her twin sister, but you've been with her for three years, spending money all your money on her and now the twins are starting to get fat and skanky and they still haven't put out and now they're starting to become nothing but a pair of greedy sluts. On top of that they've both got these suspicious sores around their mouths.
Yes, that's the Internet.
Re: (Score:2)
There is nothing wrong with local, native apps
I can think of a few things:
Re: (Score:2)
Since you mention iTunes separately, I presume you are referring to are referring to the iPhone here. There have been lots of one-programmer apps that have shown up on the App Store. How exactly can't a smaller firm compete?
Re: (Score:2)
Since you mention iTunes separately, I presume you are referring to are referring to the iPhone here.
I'm largely referring to Nintendo and Sony video game consoles. Not all game concepts work well on a PC or a phone.
Re: (Score:2)
Several popular platforms require all native applications to be digitally signed, and there's so much bureaucracy in getting an application signed that a smaller firm cannot compete.
You're being deliberately vague with "several popular platforms" because you're probably referring to games consoles or something rather than general purpose platforms we're talking about. Can you get comparable gaming performance from a web app?
Local applications are usually packaged in such a way that the user must have administrator privileges to install it, and not everybody who uses a computer is its owner. [...]
"Web apps are a way of bypassing the environment's security policy." And please don't respond with the statement that HTML/Javascript engines are 100% secure so it's totally OK to break these rules as it won't have any technical consequences.
Even on a home PC, where a sympathetic administrator is usually within easy reach, downloading and installing an application is a psychological barrier to using the application.
The minute or two requir
Re: (Score:2)
you're probably referring to games consoles or something rather than general purpose platforms we're talking about.
A lot of users don't own their own PC.
Can you get comparable gaming performance from a web app?
No, but millions of FarmVille players will attest that Adobe technology gives good enough gaming performance. And HTML5 performance is better than zero performance and an error message "The application could not be installed because its signature is invalid."
"Web apps are a way of bypassing the environment's security policy."
Pretty much. If operating systems had easy-to-reach UI for creating a sandbox in which to run native applications, as in "point, click, jail", this workaround wouldn't be as necessary.
If you're really lazy and impulsive
Which a lot of end users are, e
Re: (Score:2)
A lot of users don't own their own PC.
Which users are you thinking of? Don't handwave an argument.
No, but millions of FarmVille players will attest that Adobe technology gives good enough gaming performance.
"Look over there, it's something else."
And HTML5 performance is better than zero performance and an error message "The application could not be installed because its signature is invalid."
What is your obsession with signatures? The two top platforms have no mandatory app signing by default. It's an option for Windows but it's entirely at the discretion of the guy who controls the client machine.
Which a lot of end users are, especially users who routinely use a web application on several machines that don't belong to them.
This might be true for casual usage such as checking for information or reading mail, but which user routinely gets sustained, productive work done on machines which are in no way prepared for him to use
Re: (Score:2)
A lot of users don't own their own PC.
Which users are you thinking of?
Someone in a school computer lab, in the break room at work, or in a public library or Internet cafe uses a PC that he does not own. A school-age child uses a parent's PC that he does not own.
What is your obsession with signatures?
All popular set-top interactive devices, which are not general-purpose PCs, have them.
This might be true for casual usage such as checking for information or reading mail
Or someone who spends all day on Facebook and on things linked from Facebook.
but which user routinely gets sustained, productive work done on machines which are in no way prepared for him to use them?
Not all applications are tools for "sustained, productive work". Consider a regular user of a PC in the break room at work, where IT has authorized web appli
The Cloud: you keep using that word... (Score:1)
... I do not think it means what you think it means. This is a story about an emulator which runs client-side and can read local ROMs. Just because the magic words "Javascript" and "HTML" are in there doesn't mean it's "in the cloud".
Re: (Score:1)
To refute God, first you must define Him.
Proceed.
Re: (Score:2)
Re: (Score:2)
Bwahaha so true :-)
Re: (Score:2)
However software not improving much in responsiveness even while the technology gets much faster is due to increased security layers, increased hardware abstraction layers, more things going on at once, software development environments which put the priority on dev time rather
"Open source Javascript" (Score:2, Insightful)
Wait a sec, is it even possible to hide Javascript code? Thought it was open by design, being client side and all...
Re: (Score:2)
There are obfuscators, changing function names to two letter ones, and removing whitespace.
Re:"Open source Javascript" (Score:4, Insightful)
Re: (Score:2)
Re: (Score:3)
If I can see the source code unobfuscated and without charge then it is open source.
No, 'open source' was a term coined to convey a specific meaning. Free Software means something else too. Try here [wikipedia.org].
Props (Score:2)
Nicely done!
C64 > GBC (Score:3)
Re:C64 GBC (Score:1)
The author really needs to sort that space bar issue out.
Re:C64 GBC (Score:2)
Cool, but not as cool as the JavaScript C64 emulator [kingsquare.nl].
Umm, whatever your beliefs about the relative "coolness" of both the C64 and the GBC, it can hardly be argued that the thing you linked to is cooler than this GBC emulator. Not only is the GBC considerably more complex as a machine, the emulator is surprisingly complete and very usable.
What about Dynamic Recompilation (Score:1)
Re: (Score:2)
You could JIT generate Javascript which is then JIT compiled itself...
Challenge Accepted (Score:1)
Author Here (Score:1)
Re: (Score:1)
Other JavaScript emulators (Score:1)
It's not the only JavaScript classic system emulator.
For example, here are TWO different JavaScript Amstrad CPC emulators: http://www.cpcbox.com/ [cpcbox.com] http://roland.antoniovillena.es/ [antoniovillena.es]
A Spectrum emulator! http://jbacteria.antoniovillena.es/ [antoniovillena.es]
TRS-80: http://jtandy.antoniovillena.es/ [antoniovillena.es]
Of course the first two systems here are 4MHz Z80s, not 8MHz Z80s like the Gameboy Color.
Re: (Score:1)
Ah yes, I see, a Hitachi CPU halfway between an 8080 and a Z80.
Nezulator (Score:3)
Wow, we have a thread about a Javascript Gameboy Color emulator, and nobody has mentioned Nezulator, the Javascript NES emulator [zelex.net].
Re: (Score:1)
Sad state of software (Score:2)
What's amazing is that it runs the games at a playable speed.
It's really a sad state for software in general when something like this is considered "amazing".
Re: (Score:2)
iOS? (Score:2)
But does it work in iOS?
PDRoms.de (Score:2)
They could have at least included a demo ROM to run.
Take your pick [pdroms.de].