I actually have an update regarding the VRAM situation.
Turns out it wasn't actually the video driver but rather Windows98 having issues with the VCACHE.VXD driver as explained by the developer here:
https://github.com/JHRobotics/vmdisp9x/issues/2
To quote the dev:
Ok, the problem isn’t how much total memory is critical. The problem is that with lots of RAM, memory management is not working correctly (I think that the problematic part was in the VCACHE.VXD driver – but I’m not sure) and sometimes it hits something important. 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 a patch by R. Loew.
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, the maximum is about ~3.5 GB.
In other words, the reason why it was bluescreening is that back in the Windows98 era no one really tested it with more than 512MB of RAM, which means that when the value was increased there were unexpected behaviors, like pointing to protected memory locations which were supposed to be already allocated for something different. This, of course, causes bluescreens.
The thing is that when we specify a VRAM value, that memory is reserved 'cause it can then be allocated.
Now, with it being as small as 64MB, it would be pretty hard for the system to mistakenly point to one of the MB reserved for it, however, as its size is increased, it becomes more and more likely that it's hit.
This is why with 128MB of VRAM and 1024MB of RAM, sometimes it bluescreened, some other times it froze etc and it was generally unstable.
By applying the patch by R. Loew, the system no longer points to protected memory (which is reserved) by mistake, allowing Windows98 to have as much as 4 GB of RAM (as every 32bit OS without PAE, the user will see 3.5GB only), which, let's be clear, is basically infinite memory for 98 and the programs developed at the time.
- Screenshot from 2023-07-16 23-02-24.png (7.34 KiB) Viewed 115654 times
This also means that you can have 128MB of VRAM too and the system is pretty stable:
- 253828115-ed6c6b07-d934-4dc0-a004-3fed0221bc0f.jpg (97.58 KiB) Viewed 115651 times
- 253828515-3d1fac28-0633-4f52-9030-f6074c9ae835.jpg (85.19 KiB) Viewed 115651 times
Never in my wildest dream I thought I was gonna see Win98 work just fine with that much RAM!
As a disclaimer, for those of you thinking about using VBoxManage to uselessly change the VRAM to 256MB, the driver won't use it as it's limited to 128MB (which is plenty of memory anyway and more than you'll ever need, given that we're talking about Windows98).
That being said, if you're really determined, the dev won't stop you, and given that it's open source, you can compile the code with VRAM256MB (in the makefile) so that it will be possible to increase the limit to 256 MB.
Again, there's really no reason to do it, trust me.