Live data from Hacker News

Show HN: My x86 emulator written in JavaScript

copy.sh

41–50 of 194 posts

Re: Show HN: My x86 emulator written in JavaScript

#41

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've found the bug. For now, try Chromium. I'll fix this tomorrow.

Re: Show HN: My x86 emulator written in JavaScript

#42

This is awesome. You might want to consider re-ordering the font list in the console though. Consolas isn't perfectly fixed-width apparently, and it made Rogue rather puzzling to play.

Consoles isn't perfectly fixed width? That sucks. Till now it was my go-to fixed width font. I assumed something named consol as would be a font suitable for consoles. Which font do you like to use?

I use Consolas every day.

I'm on Linux, so that might also impact something.

Perhaps the line drawing characters are extra-small or something? Fire up Rogue and try it out...

Re: Show HN: My x86 emulator written in JavaScript

#44
post #15
post #12

Earlier quoted context omitted.

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.

At 2000 kIPS you may have a few generations of javascript engines to go before we get there. That's not meant to take away from this project - it truly is amazing what can be interpreted in the browser now.

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)

Re: Show HN: My x86 emulator written in JavaScript

#45
post #41

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've found the bug. For now, try Chromium. I'll fix this tomorrow.

Thanks! What was the bug? I'd be interested.

Also, any plans to implement GPF handling? I tried booting a test environment I have on it (which runs Python as part of the GRUB2 bootloader), but it failed primarily due to lack of support for trapping GPFs. (There are a few other issues I'd have to work around to make it work, but that's a major one that I can't easily work around.)

Re: Show HN: My x86 emulator written in JavaScript

#46
post #44
post #15

Earlier quoted context omitted.

At 2000 kIPS you may have a few generations of javascript engines to go before we get there. That's not meant to take away from this project - it truly is amazing what can be interpreted in the browser now.

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)

[deleted]

Re: Show HN: My x86 emulator written in JavaScript

#47
post #39

Anyone know what format the floppies are expecting? It won't accept a DOS 6.22 install disk from MSDN, maybe it doesn't like DMF? Also, swapping disks during the install might be an issue, I don't see a button...

It expects one of the standard formats (720k, 1440k or 2880k). I'll add switching disks some time in the future.

Re: Show HN: My x86 emulator written in JavaScript

#48
post #17
post #8

Is there a non minified version of the javascript emulator file that is publicly available?

I'll put it online soon. I haven't figured licensing out yet and need to write some technical notes

Awesome - congrats on a very impressive hack.

Re: Show HN: My x86 emulator written in JavaScript

#49
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.

Wait how does this differ from JSLinux? Aren't they doing the same thing?

Also, this isn't just an x86 emulator, right? If it can boot linux, it's emulating the entire PC platform, not just x86. Very impressive of course. But I am interested in a comparison vs jslinux (also not open source).

Re: Show HN: My x86 emulator written in JavaScript

#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 ;)

Post reply on HN