VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

Does Windows 3.x simulate V86 mode using real mode with LOADALL on a 80286 CPU?

Then it for example can set SS to use a DPL of 3 to make it run in user mode? Or is that simply not possible?
How does it make sure to catch thinks like port accesses in real mode(for it's Windows device drivers, for example the HDD)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 2 of 9, by superfury

User metadata
Rank l33t++
Rank
l33t++

But can Windows virtualize anything in real mode? Like virtual ports or port access detection(virtualizing hardware), like Windows 95 can in V86 mode? Is that even possible?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 4 of 9, by superfury

User metadata
Rank l33t++
Rank
l33t++

Won't that cause disk corruption issues when switching between MS-DOS and Windows(using Akt-Tab)? If a disk write/read gets broken up and Windows(because it gets control) is switched in and changes things on the hard disk, the MS-DOS app won't know and the both of them might corrupt when reading/writing files?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 6 of 9, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
superfury wrote on 2020-05-21, 22:06:

Won't that cause disk corruption issues when switching between MS-DOS and Windows(using Akt-Tab)? If a disk write/read gets broken up and Windows(because it gets control) is switched in and changes things on the hard disk, the MS-DOS app won't know and the both of them might corrupt when reading/writing files?

I don't have a complete technical answer other than that for this specific issue, Windows and DOS applications go through DOS for disk access, so I think any of this i/o would be properly serialized. This is why 32-bit disk access was such a big deal. I think you might enjoy reading about the Task Switcher in this magazine article though. https://books.google.com/books?id=Xb5VnujctzA … epage&q&f=false

Reply 7 of 9, by Caluser2000

User metadata
Rank l33t
Rank
l33t

Wont happen.

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 8 of 9, by Jo22

User metadata
Rank l33t++
Rank
l33t++

DOSX/Krnl286.exe use the 286 native mode, the 16-Bit Protected-Mode, which has a segment-based Memory Managment Unit.
Unlike Real-Mode, segment size can be anything between 1KB to 64KB (but WIn 3.x stuck to 64KB in order to be binary compatible with Real-Mode programs).
In theory, it could do Virtual Memory (1GB adress space).. However, since it can't "swap to disk" in hardware, virtual memory isn't implemented in Standard Mode.
OS/2 1.3, on the other hand, did support Virtual Mem0ry on iAPX286 platform. OS/2 also used the ring schemes (0,2,3 ?).

https://archive.org/search.php?query=apx286
https://en.wikipedia.org/wiki/Protected_mode
https://www.landley.net/history/mirror/os2/hi … s213/index.html

"OS/2 fully utilized the segmented memory model of 286 processors with the accompanying memory protection capabilities.
Up to 16MB RAM could be directly used; segment-based virtual memory (segment swapping) allowed much higher virtual address spaces.
With OS/2 1.0, that was of course very theoretical with a 32MB partition size limit, although in an era when a powerful PC had 4MB RAM,
it was not a practical restriction.
"
http://www.os2museum.com/wp/os2-history/os2-1-0/

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 9 of 9, by crazyc

User metadata
Rank Member
Rank
Member
Jo22 wrote on 2020-05-31, 08:48:

However, since it can't "swap to disk" in hardware, virtual memory isn't implemented in Standard Mode.

Standard mode does support segment swapping. From https://docs.microsoft.com/en-us/archive/msdn … versary-windows

In standard mode swapping, an entire memory segment (up to 64KB) could be copied out to a swap file, and the corresponding selector could be marked not-present. When the selector was subsequently referenced, the CPU generated a fault. The system handled this by finding memory elsewhere and copying the data from the swap file back into memory.

It's different from enhanced mode paging so isn't called that.

Also about the question in the first post:

One interesting aspect of standard mode Windows was how it handled MS-DOS-based programs. Back then, the vast majority of existing programs were written for MS-DOS. While standard mode Windows supported MS-DOS-based programs, it did this by switching the processor between standard mode when running Windows-based code and real mode when running MS-DOS-based programs. Thus, if you hosed your PC while inside an MS-DOS-based program, you lost the entire Windows session. What's worse, when performing operations like file I/O, programs running under Windows had to switch to real mode so that real mode MS-DOS could execute the request.