Live data from Hacker News

Show HN: My x86 emulator written in JavaScript

copy.sh

61–70 of 194 posts

Re: Show HN: My x86 emulator written in JavaScript

#62
post #29
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.

With emscripten, anything is possible nowadays. And it blows your mind.

Anything has been possible since 1999. Anything at all.

http://www.zombo.com

Re: Show HN: My x86 emulator written in JavaScript

#63

I want to write an emulator as a learning experience. Any tips how should I start?

I'm not the OP but check out the book: "The Elements of Computing Systems: Building a Modern Computer from First Principles" It's quite comprehensive, not exactly about writing an emulator, but it should give you what you need.

Re: Show HN: My x86 emulator written in JavaScript

#66
post #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).

Yes, it's very similar to the jslinux project. However, I added more hardware (it can boot a real bios: seabios). Also, I'll make this open source.

Re: Show HN: My x86 emulator written in JavaScript

#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 worker threads gave me an incredible speed boost in Firefox. The whole GUI stuff is then separated. Especially the costly canvas update.

Re: Show HN: My x86 emulator written in JavaScript

#68
post #26
post #13

I tried the freedos image, says something about 400kips and then down to 0. Nothing ever shows. FF 17.0.9 ESR on 1386 freebsd 8.3

I'm testing in Firefox 24. If you could tell me what the error console outputs, I'll try to fix it.

Thanks, it's under the error tab:

ReferenceError: requestAnimationFrame is not defined http://copy.sh/v24/v86_all.js Line: 239

Post reply on HN