-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boot Windows XP #86
Comments
It's not the double fault exception that causes this. The double fault shouldn't happen in the first place. If you want to see how far Windows XP gets, set What version of OS/2 are you testing? If possible, can you upload a disk image?
That's very cool, I'm also testing a (probably different) version of Windows NT and it doesn't work for me. Did you apply some fixes? Can you upload a disk image somewhere? |
I'm guessing that the ACPI interpreter is failing (it's very strict, according to what I heard). BTW I am using OS/2 Warp 4.52 (I think). I created the disk image in QEMU and I'll try to upload it somewhere. There used to be a 16-bit iret problem but now it's gone, thanks to a recent commit. :) |
I think I figured out why some OSes don't work when ACPI is enabled. It's not the emulator's fault (although it might be -- you never know). Early OSes have no support for ACPI at all (see https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface#Operating_systems). When an OS, such as DOS sees random AML bytecode in spots where x86 code is supposed to be, then things go south.... |
This isn't necessary, the bios sets up ACPI tables: https://github.com/KevinOConnor/seabios/blob/master/src/fw/acpi.c
That's good to know, this will need to be a runtime option then. |
Then what's the problem? Is there an I/O port that's mis-reading/writing? And BTW, how do you debug things like this? |
The APIC implementation is quite incomplete, so there are just many parts missing (or wrong).
Run the emulator in You can see what is being used. There are some unimplemented IO ports. Then Windows goes to sleep waiting for something to happen, probably an interrupt. Could also be related to that RTC register. |
Is it ACPI or APIC? In the code, I saw "APIC" in acpi.js. |
ACPI needs to be enabled for it to work at all. APIC implementation is incomplete.
Do you have the latest version? |
I have one from a while ago -- it still has traces of the dynamic translator in it. So, let me get these things straight: |
https://www.dropbox.com/s/k970phbvyk6erdy/os2.img.vmdk?dl=0 That's the file (I made it in QEMU) |
Thanks for the disk image. After a bit of fixing small things, I found that OS/2 uses far call gates, which aren't implemented yet.
Probably the latter, yes. |
So Win XP doesn't boot because of APIC problems and OS/2 doesn't boot because of far call gates. |
Sounds fun! |
I did some research yesterday and I discovered this: I just thought it was interesting. |
Actually, from what I saw, it worked more like the Windows 98 demo: http://copy.sh/v86?profile=windows98 I looked a bit more and apparently, it emulates the code, but loads the hard disk over the Internet. |
I dug some more and it's by a company named "eMediaTrack" in Great Britan (because they say "optimised" instead of "optimized"). I went to eMediaTrack.net and saw their demos -- it's called "Proteus" or something. Then, I looked up "Proteus" online and came up with proteuscc.sourceforge.net. I found out that they compiled Bochs to Java. Somehow. Then, I went back to archive.org and looked at the page source. The main class is Finally, I looked backwards in time and found something new! Apparently, they compiled Bochs to Java with their "Proteus-S" product. The company got liquidated in October 2015. I saw this in the British "Companies' House" web site. They owed a bunch of money to other companies. Maybe the file is owned by one of them now..? |
Oh, BTW a site called ww45.jpc2.com was up in 2014 but now it's down. |
Just discovered this (http://sandpile.org/x86/cpuid.htm#level_0000_0001h)
Maybe the lack of this is causing the double faults. |
jsbochs is Bochs compiled to JavaScript via Emscripten. In unrelated news, Windows XP launched for retail sale on October 25, 2001. It would be cool to have it work in the browser as a "15th anniversary" thing. |
There's a difference between regular Windows XP and the "small variants". For example, I tried a PEBuilder ISO and it faults with a BSOD (after taking like 50 minutes to boot). However, Windows XP SP3 (It's a 1.5 GB image, so I can't post it online like my OS/2 one) just stops in the middle[1]. The IPS counter just goes down to 0. That's because a "double fault" exception is being thrown (AKA no ACPI/APIC support). [1] It's been a while since I checked, so who knows? :D I could probably implement ACPI in a few days, but I'm busy at the moment (and I don't know a lot about hardware stuff) |
I had an interesting idea: I saved an instance of Windows XP on Bochs when I had a little too much free time on my hands. So, it would be relatively easy to convert the Bochs format (which is like JSON but with equal signs) into the v86 format, because I believe that ACPI tables are only parsed on startup and aren't used unless you want to shut down the computer or mess around with the power options. On the other hand, implementing ACPI/APIC can make some more operating systems work and I personally think that this is a bit like cheating. |
That's true... |
Imagine Vista at 8 MHz! >:-) XP said the computer was a 5 MHz Pentium IV. I can't see the entire IPS counter in the UI, though. But that's pretty fast compared to a Pentium 60 (but people say the Pentium IV was slow, though...) By the way, did anybody have any success implementing ACPI yet? |
They're just measuring the TSC, which runs at a constant speed, defined here.
There's not much to do as far as I know, most work is done by the bios: https://github.com/coreboot/seabios/blob/master/src/fw/acpi.c |
Oops I meant APIC. |
I think the original Windows XP should work, since it booted in safe mode in JDosbox[1]. When I tried SP3 on it, it double faulted. A closer inspection of the project revealed that there was no ACPI or APIC. A forum thread[2] didn't say anything about ACPI or APIC. But, I can't find any original (non "service pack"ed) ISOs out there. [1] http://jdosbox.sourceforge.net/ PS: There is a cool OS on the last page that you should try: http://ftp.unixdev.net/pub/iso/QNX/qnxnc621.iso |
Sure! That would be great! Can you post it online somewhere so that I can test it/install it? There's a way to disable APIC during install, but I couldn't find it. And people are typing in ACPI instead of APIC and vice versa. Driving me crazy. |
Well, after all that, what is the status of Windows XP support ? |
|
If @copy says I can, I'll share it. It's only about 500 MB with NTFS compression, so I would probably be able to put it on the Internet Archive. Still, I don't want to risk it. (Remember who owns GitHub? ) |
I'm not going to risk it. |
Windows the year is 1600 has some strange side affects. For example, it made |
After the first boot of XP in v86, it takes XP:
Just for reference. |
To fix this:
|
|
IRC. |
@hello-smile6 I got a question, since you got Windows XP working on v86, which application did you use to create an .img file? |
Used QEMU to install. |
I'm checking my email with Windows XP right now. It works well, you just have to use ncat -l -k 0.0.0.0 995 -c "ncat --ssl youremail.com 995" Not the best, but it works! |
Try using browservice (https://github.com/ttalvitie/browservice). Its supports as far back as windows 95 and runs on windows and Linux (to do modern web stuff
|
96 megabytes? I'd either need a floppy with it or a non-throttled WebSocket proxy, neither of which I have. It seems like the floppy driver might not work anyway. |
It’s to host on the host os, not on the guest.
|
Oh. But that doesn't help with email. I'm using email, not a web browser. Anyway, I could probably use the Internet Archive for browsing. |
I don’t think you quite understand what it does. Why don’t you take a look at the project, read through the readme. If I’m correct it would even allow you to upload a YouTube video
|
relay.widgetry.org is anything but fast, and I don't know of an alternative. |
It probably wouldn’t be too hard to write one. I’ve thought about doing it but haven’t ever gotten around to it |
One of what? A network relay? Can't you just use |
Yeah. I’m not familiar with docker so i wouldn’t know. You could try it |
I couldn't, because I don't have a server to run it on. If there was a way to not need direct network access (similar to QEMU with |
@Unzor It's possible to create a bootable hard disk image from a Docker container, I wonder if someone could do that with the websockproxy Docker container. If so, it could be run with QEMU and |
It seems like you just have to open it and run |
Windows XP Works!!! |
@hello-smile6 Can you please release that image file for Windows XP for us? |
It's been a few years, so I might not have it anymore. |
@hello-smile6 Can you create it with QEMU again please? I tried to install QEMU on Arch but it is being weird. |
Why is this issue still open? Heck, we even got Windows 8 (tho, build 8133) support now |
Windows XP and OS/2 don't boot because of an unhandled double fault exception.
At the page fault handler, I tried doing this:
but then there were more
#GP
exceptions and it would have triple-faulted anyways.It would be really cool to see Windows or OS/2 booting.
The text was updated successfully, but these errors were encountered: