jhrobotics / patcher9x Goto Github PK
View Code? Open in Web Editor NEWPatch for Windows 9x to fix CPU issues
License: MIT License
Patch for Windows 9x to fix CPU issues
License: MIT License
I was attempting to patch my own 98 machine using the DOS tool, but this error kept coming up:
“Error: wrong/unknown format format
(trace: exact.c on 299)”
The command I was running was “patch9x C:\windows\system -wx-extract -patch-tlb -o C:\windows\system\vmm32\vmm.vxd”
can it fix this?
[deleted]
I installed the patch on 98SE in VirtualBox 7.0.8 and when opening folders Explorer will crash at random but very often, reporting a SHELL32.dll error:
Game installers also crash, it takes several tries to install something successfully:
I enabled the TSC patch however it didn't seem to do anything.
Similar behavior occurs in VMware Workstation 16.
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.
Tried on a Ryzen 5 Pro 4650G based system using:
VirtualBox 6.1.46 and VMware Player 16.2.5 in Windows 10 22H2
VirtualBox 6.1.38 and VMware Player 17.0.2 in Linux Mint 21.1
In all cases it crashed out just after the Time Zone window.
It was installed by script (booted from the CD, Format and Xcopy are from a working 98se install)
E:
CD E:\Apps
E:\Apps\Format.com C: /V:Win98se
MkDir C:\Win98
E:\Apps\XCopy.exe D:\Win98 C:\Win98 /S /E /V
CD E:\Apps\Patch9x
E:\Apps\Patch9x\Patch9x.exe -Auto C:\Win98
C:
CD C:\Win98
C:\Win98\Setup.exe /IE
The files seem to be extracted and modded, is there something wrong with the methodology that prevents it from working?
VM1: VirtualBox 8, Patcher9x v0.8.50-beta4, Windows 98 RTM, SoftGPU v0.4.2023.19-alpha, AC97 sound card
VM2: VMware 17, Patcher9x v0.8.50-beta4, Windows 98 SE
Host: AMD 2400G CPU, Windows 10
Sound stutters after apply Patcher9x. Deactivate "nested paging acceleration" in VirtualBox VM settings, problem temporary solved. Unfortunately it cannot deactivate nested paging in VMware 17.
Patcher9x works fine in host with Alder Lake CPU.
Host: VMware Pro 17, Windows 10, AMD Ryzen 2400G, Hyper-V features disabled
Guest: Windows Me Japanese, Patcher9x v0.8.50-beta4
It's very often to cause app crash after apply Patcher9x, especially applications that play audio/video.
Wmplayer has caused an error in <unknown>. Wmplayer will now close.
If you continue to experience probles, try restarting your computer.
Mshta has caused an error in <unknown>. Mshta will now close.
If you continue to experience probles, try restarting your computer.
Mshta has caused an error in <unknown>. Mshta will now close.
If you continue to experience probles, try restarting your computer.
As the title sais I'm using a Piledriver, applied the patches but the crashes are still there.
Windows 2000 Advanced Server with PAE enabled and nested paging enabled refuses to load anything (goes blank) after completing the log in screen in VirtualBox on my AMD systems. If nested paging is disabled it works OK with PAE. I also have absolutely no problems on my older systems with nested paging and PAE enabled.
I'm thinking this is possibly a TLB invalidation related bug because everything works with nested paging disabled. I have been trying to isolate where this bug is in Windows 2000 with PAE without much luck yet. I suspect that it could be a bug in the PAE kernel or one of the important processes or system files. After seeing this project I was curious about a possible patch. It is a bit of niche case though and only mildly related to Windows 9x.
PAE is the CPU feature that enables 32-bit OSes to use more than 4GB of RAM which is supported by Windows 2000 Advanced Server. PAE is enabled by adding "/pae" to the end of the line in the "boot.ini" file.
It is possible to patch the installation CD of Windows 98 SE with all of those patches including patches for RAM high capacity disks and AHCI? Or the patches you may have in one line with patcher9x. To modify the installation CD-ROM instead of install windows 98 se to patch. Is a question only
On some UEFI bioses(modern hardware) there is a issue when booting win98: "While initializing device VCACHE:
Windows protection error. You need to restart your computer."
I thought to try to boot win98 in qemu with UEFI+CMS and it happened that I received the same error. I installed bootice(I don't know assembly), on real hardware and in QEMU, both stop at : 0028:C03819A6 MOV [EDX+00000100],EAX
DO you want to try to fix this? I can give you the QEMU with win98 that I have.
Real hardware:
QEMU(256 ram) OVMF with csm (uefi bios) edk2.git-ovmf-x64-0-20200422.1378.ge54310451f.noarch.rpm:
After I press C, it appears:
"While initializing device VCACHE:
Windows protection error. You need to restart your computer."
There is this person that has BIOSTAR X470GTA(ryzen) that can run win98 with bios version 2020.But with bios version 2021 he gets Vcache protection error.
A feature I’d like to see is the inclusion of the late Rloew’s PATCHMEM in this program.
I finally did some testing related to Windows 9x on my AMD machines.
Windows 95 OSR2 runs without issue and I used the old Windows 95 CPU fix v3 ISO. Windows 95 appears to be unaffected by the TLB invalidation bug.
A tool in the style of the Windows 95 CPU fix v3 ISO would be convenient to have for Windows 98 and Me. I think a tool that can take your Windows 98 Second Edition (or Windows Me) ISO, grab the files, modify the files to fix the problem and spit out a bootable ISO with everything patched would be even better. Creating a new bootable ISO can be a PITA at times. None of the original Windows Me CDs were bootable by default.
I remember seeing in the past that OEMs would update and change files on the installation media of the Windows 9x releases. The modified files would sit outside of the cab files and I believe setup would see an .inf file that directed it to use the newer files. I wonder if that strategy could be used here.
The installs of Windows 98 and Windows Me tend to proceed with less problems, if USB is 100% disabled in VirtualBox. I'm curious about whether or not there's a TLB invalidation bug in the USB drivers included with Windows 98 and Windows Me. O.O All the problems that do occur during setup, happen towards the end when it's almost finished.
On a personal note, It is interesting to see Windows Me a little less affected by the TLB invalidation bug and Windows 95 OSR2 completely unaffected. With my my experiences on Windows 2000 and reading information about it on the web, I thought all the Windows 9x releases would run poorly on my modern AMD CPU.
Hi,
Windows XP Starter edition have similar issue with CPU speed. When you try to install it on newer CPUs you will encounter Unsupported State 6 error, which mean unsupported CPU speed. Can you have a look on that issue too?
Win nt system before XP also have some bugs when installing on modern CPUs.Including ntfs version was too old so the partition would broken when mount the virtual disk,win 2000 would crash when installing the components if the cpu is too fast,the old nt systems also can't be used on too big hard disk ,etc.Could you write a patcherNT project to fix these errors.
I tried to patch my installation media for Windows 98 as documented in the README file but it doesn't work for some reason.
I first copied the content of the win98
folder from my Windows 98 CD-ROM to a directory on my system, see the output below:
:~$ ls win98
BASE4.CAB NET9.CAB WIN98_32.CAB WIN98_51.CAB deltemp.com
BASE5.CAB OEMSETUP.BIN WIN98_33.CAB WIN98_52.CAB dossetup.bin
BASE6.CAB OEMSETUP.EXE WIN98_34.CAB WIN98_53.CAB install.exe
CATALOG3.CAB PRECOPY1.CAB WIN98_35.CAB WIN98_54.CAB install.txt
DRIVER11.CAB PRECOPY2.CAB WIN98_36.CAB WIN98_55.CAB mini.cab
DRIVER12.CAB SCANREG.EXE WIN98_37.CAB WIN98_56.CAB ols
DRIVER13.CAB SUCATREG.EXE WIN98_38.CAB WIN98_57.CAB save32.com
DRIVER14.CAB SUHELPER.BIN WIN98_39.CAB WIN98_58.CAB scandisk.exe
DRIVER15.CAB WIN98_21.CAB WIN98_40.CAB WIN98_59.CAB scandisk.pif
DRIVER16.CAB WIN98_22.CAB WIN98_41.CAB WIN98_60.CAB scanprog.exe
DRIVER17.CAB WIN98_23.CAB WIN98_42.CAB WIN98_61.CAB setup0.wav
DRIVER18.CAB WIN98_24.CAB WIN98_43.CAB WIN98_62.CAB setup1.wav
DRIVER19.CAB WIN98_25.CAB WIN98_44.CAB WIN98_63.CAB setup2.wav
DRIVER20.CAB WIN98_26.CAB WIN98_45.CAB WIN98_64.CAB smartdrv.exe
EXTRACT.EXE WIN98_27.CAB WIN98_46.CAB WIN98_65.CAB suback.bin
FORMAT.COM WIN98_28.CAB WIN98_47.CAB WIN98_66.CAB tour
NET10.CAB WIN98_29.CAB WIN98_48.CAB WIN98_67.CAB w98setup.bin
NET7.CAB WIN98_30.CAB WIN98_49.CAB WIN98_68.CAB wb16off.exe
NET8.CAB WIN98_31.CAB WIN98_50.CAB chl99.cab xmsmmgr.exe
After this, I run:
~$ ./patcher9x win98/
0: cancel execution
1: extract VMM.VXD from VMM32.VXD, patch it and save to VMM32 folder
2: patch VMM.VXD/VMM32.VXD directly
3: do 1 and 2 simultaneously
4: scan *.CAB archives, extract VMM32.VXD and patch it directly [default]
5: extract VMM32.VXD from selected CAB and patch it directly
Choose (0-5):
I assume option 4 should be chosen in that case:
Choose (0-5): 4
ERROR; file "vmm32.vxd" cannot be extracted, cabinet set is incomplete
ERROR; file "vmm32.vxd" cannot be extracted, cabinet set is incomplete
Error: File not found
(trace: patcher9x.c on 1049)
Invalid file operations:
1: patch.c, 388: fopen(win98//VMM32.VXD, rb)
Patching proccess failure
Press enter to exit...
What am I doing wrong here?
Windows ME has same bug in code as Windows 98, but from my observation, the system calls this code very rarely. So I need to know some configuration/application/driver who will cause this bug.
And in VMM/FlushMappedCacheBlock on Windows Me is much less space to inject some code, so patch will need longer jump/call to somewhere where space is. Untested code is here: https://github.com/JHRobotics/patcher9x/blob/main/vmm/FlushMappedCacheBlockMe.asm
If you need patched file, I created bootable floppy with fixed vmm.vxd on it. If you think you found this bug in your system/configuration you can copy vmm.vxd to WINDOWS\system\vmm32 (or exec vxdcopy.bat on floppy - it will do it for you) and check if it will solve problem.
If it solves bug, please write it to me and if it causes terrible crashes, let me know too.
Thank you for the patch!
I see you plan to add the FIX95CPU_V3_FINAL (whose automatic installer doesn't run on Win98 First Edition - but I got the NDIS Windows Protection Error, so it's needed) and 48-bit LBA patches as well.
Would be nice to have also the 4GB RAM and >1TB partition - also from Rudolph Loew
Or maybe the WinME 2GB RAM fix in SYSTEM.INI [386Enh] MaxPhysPage=7C6FF
On Win95 RTM - FIX95CPU_V3_FINAL makes 3 extra floppy drives to appear, I assume that comes from one of the integrated patches. Would be nice if you can make these superfluous drives optional in your package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.