joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.57k stars 374 forks source link

Windows 95 32bit color mode bug green currupted screen with s3trio64 #1619

Open bisaalz opened 4 years ago

bisaalz commented 4 years ago

Annotation 2020-05-31 083523

When using 32bit color mode with s3trio64 installed i am facing greenish bug but in true color 16bit i am not facing this bug Please Help

my config dosbox-x.zip

joncampbell123 commented 4 years ago

What happens if you go into advanced display settings and disable all hardware acceleration?

bisaalz commented 4 years ago

What happens if you go into advanced display settings and disable all hardware acceleration?

Still facing this bug even after disabling hardware acceleration

rderooy commented 4 years ago

A few questions;

bisaalz commented 4 years ago

A few questions;

  • Are you using the default colour scheme in windows?
  • Which Win95 variation is this (RTM, OSR1, 2, 2.1 or 2.5)
  • I see a "S3 Refresh" tab in the panel, so clearly you installed some different display drivers since that tab does not exist by default. What did you install?
  • It does not happen with other colour depths?
  1. I am using the default color scheme
  2. My variant is the final windows 95 2.5
  3. I am using s3trio64 driver which is supported by dosbox
  4. It only happens in 32bit color mode. It doesnot happen in 16bit or 256.

I still dont know how this happening i reinstall the driver it still showing this greenish only in 32bit color mode

bisaalz commented 4 years ago

And dosbox-x is also slow compare to dosboxdaum due to not able to use dynamic core

joncampbell123 commented 4 years ago

Windows 95 may happen to work with dynamic core in DOSBox and DAUM but there are issues with page faults and Windows 95 that eventually cause corruption and crashes. It has to do with Windows 95 allowing task switches during a page fault, and the recursive nature of DOSBox's page fault handling. DOSBox-X's normal core is fixed to handle that correctly, but dynamic core still cannot handle it properly.

joncampbell123 commented 4 years ago

Here's an odd related bug: Windows 95 seems to have display issues with S3 emulation only if you set 800x600 16-color mode. Higher or lower resolution works fine.

EDIT: Just fixed that.

joncampbell123 commented 4 years ago

Can you provide console/log output? One of the important bits of information is the SDL R/G/B/A bitmasks of the display.

sikthehedgehog commented 4 years ago

Something that may be worth mentioning (looking at the screenshot) is that it seems anything to do with bitmaps looks to be immune, while everything else is missing the red channel. Somebody had suggested it may have to do with the hardware acceleration code, which may explain it if bitmaps go through a different pipeline.

So yeah, I think it's an emulation issue (and possibly one to do with the emulated card rather than the CPU emulation, depending what the driver is trying to do).

sikthehedgehog commented 4 years ago

Wait, I see that disabling hardware acceleration was brought up… but not sure if what was disabled was DOSBox-X's acceleration (i.e. blitting the emulated output using the GPU) or the driver's hardware acceleration (i.e. the emulated hardware).

joncampbell123 commented 4 years ago

I'm not able to reproduce this on my Windows 10 system (SDL2 builds according to your screenshot) even if I ask Windows 95 to install S3 Trio32/64 drivers and set 800x600 32bpp. I'll keep an eye out for any case that might cause this.

rderooy commented 4 years ago

@bisaalz My question was, which s3 driver did you install in Windows 95. Your clearly not using the default Windows 95 S3 driver that is included with OSR2.5 as that one does not have the "S3 Refresh" tab that is visible in the screenshot.

rderooy commented 4 years ago

I found a w9520205.zip driver package, and installed the "S3 Trio32/64 PCI" driver from that. The driver is dated 8-24-1996. After that I was able to reproduce the issue as mentioned. It happens with both SDL1 and SDL2 on my Linux system in 640x480 and 800x600.

joncampbell123 commented 4 years ago

Ah, but it doesn't happen in the original Windows 95 RTM (what I test) version of the drivers it seems.

rderooy commented 4 years ago

Win95 RTM and Win95 OSR1 have an older S3 driver with fewer video modes. There is no 800x600 in 32bit colour in that case, until you install the w9520205.zip driver package.

Win95 OSR2 already has a newer driver which does support 800x600 in 32bit colour, and even 1024x768 in 32bit colour if you set vmemsize=8 (which is strange, since that should only need 3MB VRAM, which should work with the default 4? Double buffering?).

But regardless of resolution, 32bit colour does cause the reported issue.

But regarding Win95 RTM and Win95 OSR1, I can select 640x480 in 32bit colour, but when it reboots, it gives an error "There is a problem with your display settings. The adapter type is incorrect, or the current settings do not work with your hardware", and then it asks to select a different video mode with the default drivers.

No updated Win95/98/ME video drivers seem to exist for the S3 Trio64, other then for Win95 RTM and OSR1 releases. There are updated drivers for the S3 Trio64V and V+ (adds some limited video playback acceleration), but that is not what DOSBox emulates.

4shpool commented 2 years ago

Not sure whether or not this information may be helpfull, but in case it is:

P.S.: Curious about 95A and 95C

Edit: As rderooy mentioned in his post above that Win95 RTM/OSR1 are coming with S3 drivers not supporting 32bit for 800x600, cannot speak for non-german releases - but it's OOB fine on mine and the Microsoft provided S3 Trio32/64 driver reports in the device manager a version correlating to/same as the windows version (registry reported Version 4.00.950) (FYI: The "troublesome" one coming with my 95B reports as 4.03.00.2030).

Wengier commented 2 years ago

Perhaps it’s fixed by #3428 as well.