Advanced Search

Author Topic: Stupid JavaScript Tricks: a Game Boy Advance Emulator  (Read 12615 times)

March 09, 2013, 04:13:02 AM
Read 12615 times

Archaemic

  • Ring connoisseur

  • *

  • aɹ·kʰej·mɪk

  • 2765
    Posts

    • View Profile
Stupid JavaScript Tricks: a Game Boy Advance Emulator
« on: March 09, 2013, 04:13:02 AM »
I wrote a GBA emulator a few months back.

In JavaScript.

You can thank me later.

http://jpfau.github.com/gbajs/

(By which I mean, this is totally useless and slow as fuck because IT'S A FUCKING GAME BOY ADVANCE RUNNING IN A WEB BROWSER)

(This list is incomplete)

March 10, 2013, 09:05:46 AM
Reply #1

SuitCase

  • Ring connoisseur

  • *

  • 2784
    Posts

    • View Profile
    • Soaringrabbit.com
Re: Stupid JavaScript Tricks: a Game Boy Advance Emulator
« Reply #1 on: March 10, 2013, 09:05:46 AM »
holy cow

get serious though make it compatible with multiple cores
Visit Soaringrabbit.com, home of Soaring Rabbit, a Keio Flying Squadron fansite, Rampaging Feline, which is all about Di Gi Charat, Bombastic Bunny, my blog about technology and stuff, or maybe even Bittersweet Candy Bowl, Veronica's wonderful comic.

March 10, 2013, 09:51:27 AM
Reply #2

Sofox

  • Administrator

  • ****

  • Yep, just hanging out

  • 1852
    Posts

  • Avatar by Beanie

    • View Profile
    • Sofox Central
Re: Stupid JavaScript Tricks: a Game Boy Advance Emulator
« Reply #2 on: March 10, 2013, 09:51:27 AM »
You've shown it to me before, but it's fricken awesome! Great job!

March 10, 2013, 03:41:00 PM
Reply #3

Archaemic

  • Ring connoisseur

  • *

  • aɹ·kʰej·mɪk

  • 2765
    Posts

    • View Profile
Re: Stupid JavaScript Tricks: a Game Boy Advance Emulator
« Reply #3 on: March 10, 2013, 03:41:00 PM »
holy cow

get serious though make it compatible with multiple cores

I did. The graphics render on another thread.

(This list is incomplete)

March 11, 2013, 02:29:16 PM
Reply #4

Shinmera

  • 3 ring meals a day

  • *

  • un-FUCKING believable!

  • 659
    Posts

    • View Profile
    • tymoon.eu
Re: Stupid JavaScript Tricks: a Game Boy Advance Emulator
« Reply #4 on: March 11, 2013, 02:29:16 PM »
Another instance of Atwood's Law.

March 11, 2013, 08:56:36 PM
Reply #5

SuitCase

  • Ring connoisseur

  • *

  • 2784
    Posts

    • View Profile
    • Soaringrabbit.com
Re: Stupid JavaScript Tricks: a Game Boy Advance Emulator
« Reply #5 on: March 11, 2013, 08:56:36 PM »
holy cow

get serious though make it compatible with multiple cores

I did. The graphics render on another thread.
Really? Running in Safari on a quad 2.7ghz i7 MBP Retina, it seemed to max out one core (the webkit process, content whatever it's called was at 25%) while the others lay idle. But the game ran at what felt like half-speed, so I felt if all the other cores were working it'd be a full speed emulator.
Visit Soaringrabbit.com, home of Soaring Rabbit, a Keio Flying Squadron fansite, Rampaging Feline, which is all about Di Gi Charat, Bombastic Bunny, my blog about technology and stuff, or maybe even Bittersweet Candy Bowl, Veronica's wonderful comic.

March 11, 2013, 09:18:10 PM
Reply #6

Archaemic

  • Ring connoisseur

  • *

  • aɹ·kʰej·mɪk

  • 2765
    Posts

    • View Profile
Re: Stupid JavaScript Tricks: a Game Boy Advance Emulator
« Reply #6 on: March 11, 2013, 09:18:10 PM »
Well, I can't really distribute much of the load across cores due to the fact that most of the tasks are serial. Graphics were relatively easy, but even migrating things like sound...not so easy. The overhead in using Web Workers is pretty bad, actually.

PS: Try using the WebKit Nightlies from WebKit.org. They're a lot faster.

(This list is incomplete)

March 30, 2013, 05:35:38 PM
Reply #7

Sz

  • Pasta

  • *

  • 3667
    Posts

    • View Profile
Re: Stupid JavaScript Tricks: a Game Boy Advance Emulator
« Reply #7 on: March 30, 2013, 05:35:38 PM »
Emulation is painfully single-threaded in general (and so is javascript), so it's a tough bargain...

but still, I missed this and it's pretty fun.
« Last Edit: March 30, 2013, 05:39:28 PM by Sz »