OSDev.org
https://forum.osdev.org/

Javascript x86 emulator
https://forum.osdev.org/viewtopic.php?f=11&t=27276
Page 2 of 3

Author:  mrstobbe [ Sat Nov 09, 2013 12:16 am ]
Post subject:  Re: Javascritp x86 emulator

Very nice... someone (Fabian) definitely had fun.

Author:  mikegonta [ Mon May 25, 2015 1:58 am ]
Post subject:  Re: Javascript x86 emulator - UPDATE

bubach wrote:
Have you seen this?
http://copy.sh/v24/
great fun, and a quick way to try out simple OS's :)
DavidCooper wrote:
Is it supposed to be able to handle 32-bit mode or is it limited to real mode? ... It puts up that message within a few seconds with
MikeOS32 and my own OS.
Appears to be fixed and works fine. MikeOS32 is here.

Attachments:
v86 MikeOS32_4.4.PNG
v86 MikeOS32_4.4.PNG [ 44.32 KiB | Viewed 5844 times ]

Author:  Muazzam [ Tue May 26, 2015 7:28 am ]
Post subject:  Re: Javascript x86 emulator

I think, it does not like my OS. Still, it's a good approach.
Does it support SSE instructions?

Author:  BrightLight [ Tue May 26, 2015 10:25 am ]
Post subject:  Re: Javascript x86 emulator

It runs my OS properly, though the font doesn't seem to work.
It's a little odd that the processor doesn't have a model, though. Not exactly efficient, but definitely very cool, seeing as how we can now test our OSes from smartphones and such. :)

Attachments:
vector os.png
vector os.png [ 117.52 KiB | Viewed 5787 times ]

Author:  SpyderTL [ Fri May 29, 2015 1:34 pm ]
Post subject:  Re: Javascript x86 emulator

My OS seems to run pretty well on this emulator, but only when booting from the hard drive. The CD and floppy boot loaders both lock up. I guess that's what I get for writing my own boot loader...

Still, pretty impressive.

Author:  SpyderTL [ Sat Jul 25, 2015 8:00 am ]
Post subject:  Re: Javascript x86 emulator

If anyone is interested, I found this list of online JavaScript emulators.

http://www.cambus.net/emulators-written-in-javascript/

The emulator in the original post is on this list.

Author:  embryo2 [ Sun Jul 26, 2015 5:26 am ]
Post subject:  Re: Javascript x86 emulator

SpyderTL wrote:
If anyone is interested, I found this list of online JavaScript emulators.

http://www.cambus.net/emulators-written-in-javascript/

A lot of work and a lot of time were spent. Is the JavaScript emulation so useful (or was it)? Or is it something that students make for some processor related courses?

Author:  max [ Sun Jul 26, 2015 5:39 am ]
Post subject:  Re: Javascript x86 emulator

embryo2 wrote:
A lot of work and a lot of time were spent. Is the JavaScript emulation so useful (or was it)? Or is it something that students make for some processor related courses?

No offense, but why are you bringing *anything* into question, whatever its about? They are clearly just doing it for the lulz and to show that its possible, probably also to show off. Same reason why people on here write their own OS, are they very useful?

Author:  SpyderTL [ Sun Jul 26, 2015 9:15 am ]
Post subject:  Re: Javascript x86 emulator

I think they are useful, because it gives me yet another test bed to test out my OS without having to buy any more hardware.

For instance, the one linked in the original post supports VirtIO Filesystem, which I've never seen before, and am currently researching.

Speaking of which, does anyone have any documentation for this PCI device? I've found some information on the 9p file system, but it only covers the command packets, not the "hardware" involved...

Author:  Kevin [ Sun Jul 26, 2015 3:02 pm ]
Post subject:  Re: Javascript x86 emulator

The old pre-OASIS virtio specs seems to contain a bit on 9p devices: https://github.com/rustyrussell/virtio-spec

Author:  SpyderTL [ Sun Jul 26, 2015 8:16 pm ]
Post subject:  Re: Javascript x86 emulator

I actually already have the VirtIO 0.9.5 spec PDF file. I didn't realize that it included the 9p transport subsystem id. But reading through that document again, I don't see any other information other than the ID. Maybe I'm just missing it...

I may try to look through the source for that VM in the original post, if I can find it.

Usually, the VirtIO communication protocol requires a VirtIO specific header in each packet, but maybe not in this case. Maybe you just write 9p packets directly to the VirtIO buffers. I may just try that when I get a few minutes.

Author:  Kevin [ Mon Jul 27, 2015 4:15 am ]
Post subject:  Re: Javascript x86 emulator

Yes, the old PDF specs that I can find are too old. The source in the repo I posted does have an appendix for virtio-9p, though.

I didn't read it, but it was rather short, so I guess apart from some initialisation you really just put the 9p packets (if that is what they are called) into the virtqueue.

Author:  embryo2 [ Mon Jul 27, 2015 4:22 am ]
Post subject:  Re: Javascript x86 emulator

max wrote:
No offense, but why are you bringing *anything* into question, whatever its about?

No offense, but I don't understand what do you mean when you use the word "anything". Is it about why I ask the question? Or is it why I think there could be any other intent except the lulz? I really can't figure out what to answer here.

Author:  SpyderTL [ Tue Jul 28, 2015 11:20 am ]
Post subject:  Re: Javascript x86 emulator

Kevin wrote:
Yes, the old PDF specs that I can find are too old. The source in the repo I posted does have an appendix for virtio-9p, though.

I didn't read it, but it was rather short, so I guess apart from some initialisation you really just put the 9p packets (if that is what they are called) into the virtqueue.

I didn't see this in any of the documents that I found. Can you post an exact link, or instructions on how to find that appendix? Thanks.

Author:  Kevin [ Wed Jul 29, 2015 4:03 am ]
Post subject:  Re: Javascript x86 emulator

It's pretty much the only file with real contents in the repository that I linked above, but here it is: https://github.com/rustyrussell/virtio- ... o-spec.lyx

It's probably easiest to just clone the whole repository and build a PDF document, but if you really want to read it in the source file, look for Appendix J, starting at line 9906. It doesn't say much more than what should be in the header files and "When the driver wantes to send a 9P request it places the descriptor of the PDU in the queue. It will be processed by the device according to the 9P protocol specifications (available at http://ericvh.github.io/9p-rfc/) and returned to the driver."

Page 2 of 3 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/