r/programming • • Dec 20 '10

A Christmas Tree in 1k of Javascript

http://www.romancortes.com/blog/how-i-did-the-1kb-christmas-tree/
1.1k Upvotes

221 comments sorted by

View all comments

Show parent comments

12

u/mrkite77 Dec 20 '10

chrome has incredible javascript performance. I made a 68k emulator in javascript that had no problem running at 1mhz on chrome.

6

u/feureau Dec 21 '10

I made a 68k emulator in javascript

... whoat?!

68k emulator in javascript

@_@

68k emulator in javascript

WANT!!!

1

u/mrkite77 Dec 21 '10

It's just the CPU, I did it to run Magnetic Scrolls adventure games in the browser (they're basically just 68K code with some special A-Line traps).

1

u/feureau Dec 21 '10

Still, ... Cool stuff! ^

1

u/Concise_Pirate Dec 21 '10

Hats off to ye.

1

u/irascible Dec 21 '10

Do you mean your emulator was 68k big, or you were emulating a motorola 68000?.. and if it was the motorola... are you talking about emulating for a mac game? and if so... have you ever played the game Hellcats over the Pacific? and if so... we should talk because I would kill to have a working version of that game on the PC again.

2

u/mrkite77 Dec 21 '10

A motorola 68000, although it's a slightly stripped down 68k, without an eXtend flag, so none of the opcodes that rely on that flag are implemented (abcd, addx, subx, roxl, etc). (Like I said in the other reply, this was specifically to run Magnetic Scrolls text adventure games.. like The Pawn. They were originally written on the Amiga, the game logic itself targeted this theoretical stripped down 68k cpu to make it portable. So, for example, there was a light-weight 68k emulator built into the Apple II version of The Pawn, which is rather impressive).

As far as your Hellcats over the Pacific game goes, you can get everything to need to run it in emulation here: http://macintoshgarden.org/games/hellcats-over-the-pacific