JHRobotics / vmdisp9x

Virtual Display driver for Windows 95/98/Me.
MIT License
116 stars 8 forks source link

Windows98SE on Virtualbox 7.0.97 r157070 Guru Meditation (VBoxVGA) with 256MB of VRAM #2

Closed FranceBB closed 1 year ago

FranceBB commented 1 year ago

Hi there, I've got a Guru Meditation after trying the drivers on the new Virtualbox 7.0.97 r157070 on Fedora 38 x64 using VBoxVGA. Logs in attachment. Windows98SE-2023-06-16-23-48-50.log

Reducing the VRAM from 256MB to 64MB makes the driver work, though:

Windows98SE running in FULL HD

Any chance of getting support for 256MB of VRAM?

FranceBB commented 1 year ago

I tested the new version v1.2023.0.10. Unfortunately, with VRAM > 64 MB it still crashes in VirtualBox with VBoxVGA. Reverting to a maximum of 64MB solves the issue, though, and the system runs smoothly.

JHRobotics commented 1 year ago

Hi, thanks for your report. The developer version of VirtualBox is too new for me. Older version (7.0.8 = r156879) works with 128 MB and even 256 MB (Windows 9x has sometimes problems with cards > 128 MB). Could you please try with different adapter (vmsvga/vboxsvga)? (You may need change host type to Linux or Windows 10 to allow that). I'm also not very wise from the log :-( It looks to read/write somewhere there where is not a memory or I/O space, but driver’s errors are usually catches by guest OS.

BTW: I also added note about VRAM size to README = If you don't need 5K resolution and larger, the 64 MB is enough.

FranceBB commented 1 year ago

Well, I updated the driver to the version you just released and I also updated virtualbox to 7.0.97 r158251 and this time although it booted, it froze immediately after logging in (and changing adapter doesn't solve the issue). Reverting to 64MB fixes the issue with any adapter, though. I'm not really sure why this is happening nor what was changed from r156879 to r157070 and r158251 to cause this behavior. They're not gonna be of much use anyway, but I'm gonna attach the logs just as a reference. Windows98SE-2023-07-14-11-23-16.zip

By the way, adding the 64MB VRAM reference in the documentation will definitely help other people potentially facing the same issue, so you did the right thing adding it there. We added it too in the Windows98 guide on the Virtualbox Forum along with a reference to your driver. ;)

JHRobotics commented 1 year ago

Thanks, for test and suggestion - I added information to readme here and to SoftGPU readme too (https://github.com/JHRobotics/softgpu#virtualbox-vm-setup-with-hw-acceleration) until I won't be able to replicate and solve issue.

And many thanks to post my project to VirtualBox forum!

PS: looks like you're using 1 GB RAM. Can you please try my driver with 128 MB VRAM and 512 MB or 256 MB RAM? Windows 9x usually have strange problems if memory exceed 512 MB (depends on HW configuration), for me though 1 GB RAM works, but it would still be worth testing.

FranceBB commented 1 year ago

You're actually correct! Looks like 1GB of RAM was the culprit.

Virtualbox: 7.0.97 r158251 RAM: 1024 MB VRAM: 64 MB Status: Stable

Virtualbox: 7.0.97 r158251 RAM: 1024 MB VRAM: 128 MB Status: Unstable (Freeze/Crash)

Virtualbox: 7.0.97 r158251 RAM: 512 MB VRAM: 128 MB Status: Stable

Virtualbox: 7.0.97 r158251 RAM: 512 MB VRAM: 128 MB Status: Stable

Now, with a simple calculation, we can see that 1024+64=1088 total, which means that in theory 1024-64=960, so the following configuration is supposed to be stable:

Virtualbox: 7.0.97 r158251 RAM: 960 MB VRAM: 128 MB Status: Unstable (Freeze/Crash)

but it wasn't image

In particular, as soon as the user logs in:

image image

JHRobotics commented 1 year ago

OK, the Problem isn’t how much total memory is critical (that’s why you calculation didn’t work). The Problem is that with lots of RAM, memory management not working correctly (I think that problematic was VCACHE.VXD driver – but I’m not sure) and sometimes it hit something important and with lots of VRAM (which is permanently mapped in system memory = 1 G of 4 G 32bit space total) it’ll hit something important faster.

Fortunately, there is patch by R. Loew, so reduce RAM back to 512 MB, apply this patch. You can use this link, which you can type to IE on Windows 98 directly:

http://files.emulace.cz/patchmem.zip

Extract, run patchmem.exe and after rebooting you should be able to set as much memory as you want. For Windows 9x as every true 32-bit system is maximum about ~3.5 GB.

Alternative to this patch is replacing HIMEM manager and tune cache and swap, VOGONS thread is here: https://www.vogons.org/viewtopic.php?t=48981, but with patch it is simpler and more stable.

Hope, it’ll work for you :-)

VirtualBox_Windows 98 ICD_16_07_2023_17_33_06

FranceBB commented 1 year ago

I can't believe it worked. Not only it worked and I can use 128MB of VRAM, but I can also use 3.5 GB of RAM as a real 32bit OS. Never in my wildest dream I thought I was gonna get Win98 to be stable with that much ram! image I've been playing around, readapting an older version of one of my functions for pure fun and so far so good, I mean the system looks really stable! image image image image image Very very very nice. Thank you so much, closing the issue now. Amazing. :)