pouët.net

JS emulators for GB/GBC, NES

category: general [glöplog]
I wanted your opinion on something I've been working on.

Recently I found emulators for Gameboy, Gameboy Color and NES ROMs written in Javascript.
I created a page where you can pass a http or ftp link to a .gb/.gbc file (or .zip file containing a .gb/.gbc file) and the emulator will run the file.
You can try it here (runs this demo).

This could be a nice addition to pouet to watch those demos at least in an emulator and not only on youtube. Also there's no need to create a capture, links to the player could be created automagically...

A problem is that the scripts (combination PHP, xmlhttprequest, JS) can't cope with RAR archives (untergrund only supports ZIP and only PHP4) and page redirection, which makes it impossible to use scene.org links atm. The GB/GBC emulator has some tearing aaand the NES emulator is still missing. But well, you get the idea.

Anyway. What do you think? Suggestions? Flame away.
added on the 2011-06-21 14:39:23 by raer raer
mmm. i'll give it some thought.
added on the 2011-06-21 14:45:19 by Gargaj Gargaj
Cool idea but runs like shit here
added on the 2011-06-21 14:53:24 by ferris ferris
Fast shit or slow shit? ;)

@gargaj: Send me an email if you want some technical details or whatever...
added on the 2011-06-21 14:55:26 by raer raer
@Ferris: You might need something with a fast JS engine, as in "recent browser". It runs pretty well with an oldish processor here and FF4...
added on the 2011-06-21 15:06:31 by raer raer
well, good quality emulator is better than video so yeah
added on the 2011-06-21 16:10:25 by nosfe nosfe
Cool idea I think. Possible drawback: What if lots of people start using it to play pirated games? I know it's not really an issue for these old systems but I'm sure emulation sites have been sued in the past, best to consider it now :)

Bug: With a wide window, it seems to scale to fit horizontally, meaning the top/bottom of the screen get cut (I have a super wide browser stuck in 1 corner of my desktop).
added on the 2011-06-21 16:25:40 by psonice psonice
Uhm. The emulators are available on the net anyway and you can also download and run the illegal stuff online or offline. So not much of a difference...

The problem is the current PHP script mess (downloads and unpacks the archive to server, then streams the data back to the javascript) and the inability to unpack RARs... :/

If you find a bugin Gameboy Online, best report it to Grant Galitz, the developer.
added on the 2011-06-21 16:43:59 by raer raer
Don't forget CPC emulator
http://cpcbox.com/
Runs slowly though on my system and without sound
added on the 2011-06-21 17:24:00 by Optimus Optimus
There's a big difference legally between the emulators being available and people downloading them at home, and you running them (with a local copy of the ROM too) on your server. Technically you could be busted for hosting warez and supplying the means to use them.

Ok, so that's a really fucked up scenario, but I've been seeing way too many fucked up scenarios and way too many fucked up legal systems lately :(

If the URL had to come from a server hosting a big collection of demos, this could all be avoided.

added on the 2011-06-21 17:34:34 by psonice psonice
psonice: What copyright would a demo and an emulator infringe on? Note that it's common practice for emulator writes to do black-box emulation of BIOS code, and copying the logo-bitmap due to boot-protection has been ruled as fair-use in the US a looong time ago.
added on the 2011-06-21 18:15:02 by kusma kusma
I don't consider it much of a problem, but a solution including "internal" paths to the ROMs would be good.
It would also be good to leave the loading/depacking of the archives to the javascript to have less server load. This is possible for ZIP files, but I haven't found any libraries for RAR files, which are are also pretty common...
added on the 2011-06-21 18:18:00 by raer raer
It's worth bearing in mind that demos will tend to use a lesser or greater degree of Evil Hardware Tricks, depending on the platform, and it's quite possible that the Javascript emulators out there aren't mature/full-featured enough to support them yet.

I'd be the first to say that JSSpeccy isn't up to the job of running scene stuff right now (not least because it only supports the 48K and doesn't have sound...), and I'd be fucking amazed if JSC64 supports all that crazy C64 video trickery to an acceptable level :-)
added on the 2011-06-21 18:35:00 by gasman gasman
kusma: in that case, it's not much of an issue, but if thousands of kids start playing pokemon on it? It's still not really a problem, but the law companies sniff some money (or publicity even) and they can unleash the hounds.

I honestly can't see it being a problem really either, but is this for sceners or gamers? The whole issue goes away completely if it just runs demos :)
added on the 2011-06-21 23:18:33 by psonice psonice
@gasman: You're right about the hardware trickery, especially on full-blown "computers" such as ZX and C64. But especially for console stuff it might be a nice idea, because very few people actually have the means to make the demos run on the real thing (has hardware and flash cart)...
added on the 2011-06-22 10:23:03 by raer raer
Quote:
This could be a nice addition to pouet to watch those demos at least in an emulator and not only on youtube.


Aren't youtube videos of oldschool demos usually captured from the real console/computer it was made for? If they're not then that's pretty fucked up IMO.
So the video should be more accurate than what you'll get from an emulator.
added on the 2011-06-22 10:35:22 by mic mic
What I see as advantages are:
- Less data to download. Almost no caching going on.
- No compression artefacts (maybe emulation artefacts then ;).
- The ability to instantly run a prod after inserting it into the DB, not having to wait for a video.
- I bit closer to "the real thing" than a video.
- You'd finally be able to run zikdisks now or play stuff from a game compo...
added on the 2011-06-22 10:55:45 by raer raer
If there was a video for every demo, there'd be no need for something like this. But most don't have a video, many of the videos are terrible, and a lot are videos from emulators anyway. So there's a definite use for this :)

For me (and I guess this applies to most of us), I don't have real hardware for most of the platforms. Running an emulator is ok in theory, in practice it means hunting down some software and figuring out which emulator is best, then figuring out how to start it up + configure it, then how to actual run the software on the thing once it's booted to a dos screen or whatever.

An online emulator fixes most of that, if it can auto-load most demos, run fairly accurately and at decent speed, it's pure win as far as I'm concerned.
added on the 2011-06-22 13:00:41 by psonice psonice
@psonice:

GB/GBC: VBA-M
NES: Nintendulator, Nestopia, FCEUX
SNES: BSNES
Megadrive/32X: Kega Fusion, Gens
Master System: RetroCopy (probably)
PC-Engine: Mednafen (probably)

:P
added on the 2011-06-22 14:17:01 by mic mic
Yay. VBA was good, but got really old. Good to know there's development going on again!
added on the 2011-06-22 14:32:43 by raer raer
mic: c64/speccy/amstrad/amiga/st/etc? And do they all work on a mac? :)

A website where we can just click on the appropriate button and have it fire up would be magic. A pouet 'open in emulator' button that fires up the emulator and loads the demo would be even better.

Give it a few more years, and I bet even the amiga + st will be running in javascript too!
added on the 2011-06-22 15:03:39 by psonice psonice
VICE/MAC, E-UAE, Hatari is mac emus i used for c64, Amiga and Atari
rar: Yep, some work now is being done on cross platform stuff now mainly.
Like a proper GUI for the Linux port. A Mac port might happen if its possible.

Though if you want accuracy for GB/GBC, try Gambatte. VBA is okay for GBA, but accuracy wise, there is a fair amount of kinks I need to work out.
added on the 2011-06-27 02:21:53 by mudlord mudlord
How about writing a PC emulator in JavaScript so that it can run all the good emulators?

login