Javascript x86 emulator

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
mrstobbe
Member
Member
Posts: 62
Joined: Fri Nov 08, 2013 7:40 pm

Re: Javascritp x86 emulator

Post by mrstobbe »

Very nice... someone (Fabian) definitely had fun.
mikegonta
Member
Member
Posts: 229
Joined: Thu May 19, 2011 5:13 am
Contact:

Re: Javascript x86 emulator - UPDATE

Post by mikegonta »

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
Mike Gonta
look and see - many look but few see

https://mikegonta.com
User avatar
Muazzam
Member
Member
Posts: 543
Joined: Mon Jun 16, 2014 5:59 am
Location: Shahpur, Layyah, Pakistan

Re: Javascript x86 emulator

Post by Muazzam »

I think, it does not like my OS. Still, it's a good approach.
Does it support SSE instructions?
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: Javascript x86 emulator

Post by BrightLight »

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
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Javascript x86 emulator

Post by SpyderTL »

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.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Javascript x86 emulator

Post by SpyderTL »

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.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
embryo2
Member
Member
Posts: 397
Joined: Wed Jun 03, 2015 5:03 am

Re: Javascript x86 emulator

Post by embryo2 »

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?
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability :)
User avatar
max
Member
Member
Posts: 616
Joined: Mon Mar 05, 2012 11:23 am
Libera.chat IRC: maxdev
Location: Germany
Contact:

Re: Javascript x86 emulator

Post by max »

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?
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Javascript x86 emulator

Post by SpyderTL »

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...
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: Javascript x86 emulator

Post by Kevin »

The old pre-OASIS virtio specs seems to contain a bit on 9p devices: https://github.com/rustyrussell/virtio-spec
Developer of tyndur - community OS of Lowlevel (German)
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Javascript x86 emulator

Post by SpyderTL »

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.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: Javascript x86 emulator

Post by Kevin »

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.
Developer of tyndur - community OS of Lowlevel (German)
embryo2
Member
Member
Posts: 397
Joined: Wed Jun 03, 2015 5:03 am

Re: Javascript x86 emulator

Post by embryo2 »

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.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability :)
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Javascript x86 emulator

Post by SpyderTL »

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.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: Javascript x86 emulator

Post by Kevin »

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."
Developer of tyndur - community OS of Lowlevel (German)
Post Reply