[Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Discussion of development and patch submission.
Post Reply
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

[Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

This happens on any board and emulated CPU - when you're using Windows 95 OSR 2 with the S3 Trio64, the DOS prompt will hang the guest OS when in windowed mode. Basically, just clean install the OS, and try to enter the MS-DOS prompt by doing Start -> Run... -> dosprmpt . You will see the waiting cursor, and the OS will be stuck there. Does not happen with any other graphics card.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by leilei »

Cannot reproduce (with a proper self-dumped Phoenix Trio64 BIOS from a STB Powergraph 64)
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

Except my emulation is supposed to work with the publicly available Phoenix Trio64 BIOS, because that's what's available online. And the issue also seems to hit OS/2 Warp 4. I guess the BIOS we have does something differently, most likely it tries to use a feature that is not implemented. Also, the problem does not happen on Virtual PC 2004, even with the same Phoenix S3 Trio64 BIOS replacing the original VPC BIOS. So it's still a PCem bug.

Edit: I just tried on two other Phoenix S3 Trio64 BIOS'es, and I still have the same bug. So there's definitely something wrong.
SA1988
Posts: 274
Joined: Wed 30 Apr, 2014 9:38 am

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SA1988 »

leilei wrote:Cannot reproduce (with a proper self-dumped Phoenix Trio64 BIOS from a STB Powergraph 64)
Use the default drivers.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

Yeah, you should use the default drivers, and the commonly available BIOS, as that's what I intended the Trio64 emulation to use in the first place when I added it.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

Just tried with the Diamond Stealth64 764 BIOS, after fixing a minor bug in the SDAC RAMDAC emulation (mode 0xD 32bpp was not implemented), I got it to display 800x600x32bpp but it the DOS Prompt hang is still there.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

Just tried with the Phoenix S3 Trio32, and the same bug occurs.

Remember also that the bug does not always occur so the inability to reproduce with the STG PowerGraph 64 BIOS might have been a matter of luck.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

I enabled all logging on the S3 code to see what might be causing this hang, to no avail. All I see is the Windows driver talking to the BIOS, the BIOS attempting to change mode, and then nothing after, as if somehow the guest OS's code execution gets stuck. It's probably waiting for something on an I/O port, but I have no idea which.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

OK, I've done more search on this bug, and I have noticed the following:
1. It only seems to happen if a DOS application will run at startup, otherwise it seems to work fine;
2. It does not happen if I force the emulated card to be VLB rather than PCI (I had to do that since I can not get this specific hard disk image to boot on any of the emulated 486 machines for some reason).

At this point I suspect it has something to do with the PCI registers.
SA1988
Posts: 274
Joined: Wed 30 Apr, 2014 9:38 am

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SA1988 »

Still happening, ffs. And yes, this is definitely a bug, since it doesn't happen in VPC2007 or on DOSBox and they ought to emulate it normally (this is on s3mm.drv, not s3_2.drv or s3.drv).
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

I confirm that it doesn't happen on Virtual PC 2007 even if you replace its video BIOS with the same S3 Trio64 BIOS we're using with PCem. SA1988 and I have been trying to fix it, and it appears to have to do with a part of the blitter that DOSBox (and Virtual PC 2007) implements differently from PCem.
SA1988
Posts: 274
Joined: Wed 30 Apr, 2014 9:38 am

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SA1988 »

Just tested with DOSBox-x, also happens there, with the built-in s3mm.drv as well as the ID (CRTC 0x30) set to 0xe1.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SarahWalker »

Think I have this working now - it looks to be a combination of buggy driver that works by accident, and mapping behaviour that isn't currently implemented in PCem. I want to confirm this on a real Trio64 though, as if I'm correct this isn't be the most stable driver in the world. So I won't commit this until the board I've just ordered arrives in the post.
waltje
Posts: 13
Joined: Wed 15 Mar, 2017 10:17 pm
Location: Fort Wayne, IN
Contact:

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by waltje »

Got a patch for it? It's annoying ...
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SarahWalker »

See attached...
Attachments
trio64.patch
(4.63 KiB) Downloaded 359 times
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by Battler »

Based on my tests, the SVGA return changes of 0xFF to 0x00 are not needed, I have tested with them back at 0xFF, but the rest of the patch still applied, and the bug is still gone.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SarahWalker »

My Trio64 turned up in the post today, so hopefully I should actually be able to test all of this at the weekend.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SarahWalker »

Finally got around to doing some testing with the Trio64, revs 903 and 904 are the results. This fixes _most_ of the cases of this hang. There are still one or two cases where this can happen - eg 800x600x16 with 1MB VRAM - but most are okay now.
ecksemmess
Posts: 183
Joined: Wed 18 Mar, 2015 5:27 am

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by ecksemmess »

Thanks Sarah, great to finally have this sorted!
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Bug] DOS Prompt on Windows 95 OSR 2 and S3 Trio64...

Post by SarahWalker »

And this is now _properly_ fixed in rev 908. I'm annoyed I didn't spot what the Trio64 drivers were doing earlier, but it's working now.
Post Reply