Skip to content
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

Support for WFW 3.11? #23

Open
mcayland opened this issue Mar 24, 2024 · 1 comment
Open

Support for WFW 3.11? #23

mcayland opened this issue Mar 24, 2024 · 1 comment

Comments

@mcayland
Copy link
Contributor

I've recently been chasing down a regression in newer versions of QEMU booting a WFW 3.11 image, and after analysing the JIT traces I'm fairly sure that it has exactly the same problem that patcher9x solves (which is nicely described in https://www.os2museum.com/wp/those-win9x-crashes-on-fast-machines/).

What has happened is that newer releases of QEMU (from 7.2 onwards) have an optimised LOOP implementation and is now subject to this exact same bug. As per the above article I can confirm that using win /n allows WFW 3.11 to boot successfully, which makes it likely that this is the same NDIS issue that affects Win9x.

Below are the traces obtained from the QEMU JIT where the delay loop is initialised and executed:

0x802959cc:  8b d0                    movl     %eax, %edx

----------------
IN:
0x802959ce:  b9 00 00 10 00           movl     $0x100000, %ecx

----------------
IN:
0x802959d3:  90                       nop

----------------
IN:
0x802959d4:  e2 fe                    loop     0x802959d4

and here is the point where we hit the divide by zero error at address 0x802959f3:

----------------
IN:
0x802959dc:  2b c2                    subl     %edx, %eax
0x802959de:  b9 e8 03 00 00           movl     $0x3e8, %ecx
0x802959e3:  f7 e1                    mull     %ecx
0x802959e5:  a3 10 dc 06 80           movl     %eax, 0x8006dc10
0x802959ea:  8b c8                    movl     %eax, %ecx
0x802959ec:  b8 00 00 10 00           movl     $0x100000, %eax
0x802959f1:  2b d2                    subl     %edx, %edx
0x802959f3:  f7 f1                    divl     %ecx
0x802959f5:  40                       incl     %eax
0x802959f6:  a3 0c dc 06 80           movl     %eax, 0x8006dc0c
0x802959fb:  58                       popl     %eax
0x802959fc:  e6 21                    outb     %al, $0x21
0x802959fe:  fc                       cld
0x802959ff:  c3                       retl

Is there any support for WFW 3.11 planned? Since patcher9x already has most of the required infrastructure, I believe it should be possible to devise a patch that can work around the NDIS bug in a similar way.

@Torinde
Copy link

Torinde commented Apr 4, 2024

VirtualBox also has the same problem with WFW3.11 and Ryzen - after installing the PCNet drivers: black screen with blinking cursor after the Win3.11 startup graphic flashes.

Many "Win 3.1x on VirtualBox" guides/youtube videos have comments asking about that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants