Live data from Hacker News

Show HN: My x86 emulator written in JavaScript

copy.sh

141–150 of 194 posts

Re: Show HN: My x86 emulator written in JavaScript

#142
post #12
post #6

This may as well be magic as far as I'm concerned. When I first saw http://bellard.org/jslinux/ I just about shat myself. This is definitely another level of awesome. Well done.

This really is extremely well done [and I'd like to see the unminified source]. The next feature I'd want to see is networking support. I love the idea to be able to run my entire dev setup in an emulated browser session [e.g. ruby, rails, redis]. That would be a game changer on how I'd develop.

Must plug http://www.koding.com here.

It is a "social" development platform supporting rails, mysql etc.

Re: Show HN: My x86 emulator written in JavaScript

#143
post #58
post #44

Earlier quoted context omitted.

Just for reference's sake this does vary a fair bit by computer and browser - mine never drops below ~8kIPS and runs mostly at ~15kIPS (and up to ~23kIPS). Whilst this is nothing like the several orders of magnitude required for more capable interactive behaviour, it does make my load times noticeably faster than those claimed on the page. :) (I'm Chrome on Linux, i7 4th Gen, incidentally)

I'm getting here > speed 1640kIPS on the old Nexus 7, don't you mean 8kkIPS? (This value was the average while booting Linux)

Absolutely so, yes. Thanks. :)

8 - 23 MIPS ain't so bad, right?

Re: Show HN: My x86 emulator written in JavaScript

#144

This is so cool! I have one problem with it though, it doesn't seem to support my keyboard. For example when I try "*", it writes "-". I'm using a Turkish Q keyboard and Chromium on OS X Mavericks GM.

It should be the US keyboard layout, because that's what the operating systems in the emulator use.

Re: Show HN: My x86 emulator written in JavaScript

#145
post #67
post #50

g3: Probably you have seen my emulator. http://s-macke.github.io/jor1k/ It does more or less the same, but emulates a different CPU. Your emulator is impressive and especially fast. I think it took a long time for you to optimize it. I tried to start TinyCore, but it stops after decompressing the kernel. So still some work to do ;)

I saw the source and I have some tips for you: Avoid the UInt32 Arrays and the >>> operator. They could be transformed by the JIT compiler into doubles and slow everything down. This does not happen with the Int32 Arrays and the >> operator. There is a plug-in called JIT-Inspector which give you this information. Unfortunately it does no longer work in Firefox 24. Firefox 22 was the last working version. Additionally…

Hi s-macke. I've read the source code of your emulator before, good job.

I'm aware of the problem with big integers. I'll look into this more closely, thanks for your help.

Regarding workers: I need some restructuring to get this working. I'll also need to figure out the fastest way to exchange the canvas buffer between the worker and the browser.

Re: Show HN: My x86 emulator written in JavaScript

#146
post #143
post #58

Earlier quoted context omitted.

I'm getting here > speed 1640kIPS on the old Nexus 7, don't you mean 8kkIPS? (This value was the average while booting Linux)

Absolutely so, yes. Thanks. :) 8 - 23 MIPS ain't so bad, right?

For reference, that's about as fast as a Motorola 68030 @50MHz [1] which was used in the AppleIIx, and while that was no slouch when it was released, you wouldn't want to run a modern development environment on such a machine either ;)

[1] http://en.wikipedia.org/wiki/Motorola_68030

Re: Show HN: My x86 emulator written in JavaScript

#147

Very impressive. Interesting bug: I can't seem to type '-', '=', '+', or '_' into the Linux image. Missing '-' in particular makes it hard to run commands with options. Elaborate workaround: /root% eval eq$(dmesg | grep 'e820 update' | sed 's/.*) \(.\).*/\1\1/') /root% echo $eq = /root% eval dash$eq$(uname bad 2>&1 | grep Usage: | sed 's/.*\[\(.\).*/\1/') /root% echo $dash - /root% uname ${dash}a Linux (none) 2.6.34.…

I can type -, +, = and _ from the alpha area of the keyboard, but none of the keys of the numpad works (not even the numbers)

Re: Show HN: My x86 emulator written in JavaScript

#148
post #106

Earlier quoted context omitted.

That's very nice too, though aren't you going to be running into some legal issues by distributing their ROMs?

Potentially, but I feel that the historical significance of these systems and the value of making them available to a newer generation of creators outweighs the technical infringement of copyright. It's basically abandonware, after all. I feel very strongly about the importance of learning from the past, and not making the same mistakes over and over due to lack of historical perspective. I was particularly inspired…

I don't know about the other games, but Wolfenstein 3D is definitely not abandonware. You can still buy it on Steam, XBLA, PSN and other places.

Re: Show HN: My x86 emulator written in JavaScript

#149
post #78

Just when you thought "I've written an x in JavaScript" can't get any more insane . . . Still, this wins the Nobel Prize for awesome.

I'm still waiting for "Show HN: I built a self-modifying general AI in JavaScript".

(@Eliezer, how's the work going? ;))

Re: Show HN: My x86 emulator written in JavaScript

#150
post #132
post #127

Earlier quoted context omitted.

> That would be a game changer on how I'd develop. Why? I'm honestly curious since I can't imagine any big advantages over more "classic" setups ...

Go to any machine with a browser, log in, and have your dev environment pop up in the same state it was when you left it somewhere else, yet all running locally rather over some VNC connection or potentially laggy ssh connection. Log out, and have the state persisted.

I use a remote dev server that behaves exactly like this, except it's just a hosted virtual server. What advantage would doing this in JS give you?
Post reply on HN