Windows 3.1 DOS Box VGA grabbing
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: Windows 3.1 DOS Box VGA grabbing
It's not very well supported - at least the IBM VGA board doesn't implement it, and most clone boards followed suit. Given this, and that IRQ2 might be used by something else, I find it unlikely that any Windows drivers would attempt to use it.
Re: Windows 3.1 DOS Box VGA grabbing
I noticed that, at one point, in vdds3old.386 that Battler gave me (too), there's the virtual address of 0xfff78000, all other vdd 386 drivers have 0xffff8000, is this, maybe, the culprit? I'm not sure.
Re: Windows 3.1 DOS Box VGA grabbing
- SA1988: No, I just tried changing it to 0xffff8000 in vdds3old.386, and it still grabs the thing properly. So that's not the problem. Also, it's an address mask rather than an address per se, as the instruction with which that's used is clearly an AND.
Re: Windows 3.1 DOS Box VGA grabbing
Pretty much everything that has a "07" or "08" in the 0xX00 range in the one that doesn't work is replaced by "06" and "07" in this order in the one that doesn't black out.
Re: Windows 3.1 DOS Box VGA grabbing
Now, it would be interesting to find out just *WHAT* that affects. Evidently putting a value too big in that LEA statement causes something to go wrong. I suspect it might start reading or writing the segment, reaching the limit, wrapping around, maybe expecting a fault to react on to detect it's writing too far, but getting none and therefore continuing to write. I'm not sure but it could well be.
Edit: I just tested a small thing, reading from the text buffer in real mode on Virtual PC 2007 causes DEBUG.EXE to suddenly report the program execution has terminated after the execution that read from there was executed. In PCem, that doesn't happen. Same goes for writes to that buffer, and I suspect it might happen with any area of memory assigned to the graphics card.
Edit: I just tested a small thing, reading from the text buffer in real mode on Virtual PC 2007 causes DEBUG.EXE to suddenly report the program execution has terminated after the execution that read from there was executed. In PCem, that doesn't happen. Same goes for writes to that buffer, and I suspect it might happen with any area of memory assigned to the graphics card.
Re: Windows 3.1 DOS Box VGA grabbing
I am more and more convinced it's either a MMU or a CPU bug, because with any VDD that black screens the DOS box, after closing the DOS prompt while it's in windowed mode, Windows as a whole becomes incredibly unstable, and the more you open the DOS prompt, the more stuff crashes, and the emulator eventually freezes. With the VDD that does not black screen it, however, Windows remains perfectly stable.
Re: Windows 3.1 DOS Box VGA grabbing
Hmm, looks like the LEA instruction has a bug, but I can be wrong.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: Windows 3.1 DOS Box VGA grabbing
I think that's data you're looking at there, not code.
Re: Windows 3.1 DOS Box VGA grabbing
Nah, he has simply had IDA list all occurrences of the LEA instruction in both VDD files.
Anyway, he found that switching all references to <whatever>+7xx/8xx to <whatever>+6xx/7xx (ie. setting back by 100h) makes the non-working VDD work properly. This makes me wonder what actual address data is being read/written from by those commands.
Anyway, he found that switching all references to <whatever>+7xx/8xx to <whatever>+6xx/7xx (ie. setting back by 100h) makes the non-working VDD work properly. This makes me wonder what actual address data is being read/written from by those commands.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: Windows 3.1 DOS Box VGA grabbing
Attached rev 351 as a patch, which seems to fix this from my testing. Quite why IBM decided to hide a video enable bit in an index register is beyond me.
- Attachments
-
- 351.patch
- (2.01 KiB) Downloaded 344 times
Re: Windows 3.1 DOS Box VGA grabbing
thank you very much Tom!
Re: Windows 3.1 DOS Box VGA grabbing
Indeed, thank you very much!