VOGONS


EMM386 NOEMS Vs EMM386

Topic actions

Reply 20 of 30, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie
derSammler wrote:

In protected mode however you have linear addressing for the whole memory range.

Actually, you have memory ranges that are set in the GDT and LDT and with whatever virtual address mangling configured in page tables, if enabled (I don't know if EMM386 uses paging).
Usually that means linear adressing in 32-bit mode (segments with base address zero and size 4GB) because it's the easy way and you can pretend segmentation doesn't exist, but in 16-bit protected mode your segments are still limited to 64k (or not. it's complicated).

Reply 21 of 30, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Azarien wrote:

[..]
Usually that means linear adressing in 32-bit mode (segments with base address zero and size 4GB) because it's the easy way and
you can pretend segmentation doesn't exist, but in 16-bit protected mode your segments are still limited to 64k (or not. it's complicated).

Yup, indeed. ^^ From what I remember, that also was the reason/one of the reasons why Windows 3.x programs continued operating 64KiB segments.
That memory model could work in all three processor modes; Real, 16-Bit (286) Protected, 32-Bit (386) Protected.
(Even thought the 386 Windows kernal chopped them of in 4KiB pieces transparently in the background without them knowing.)

In theory, 16-Bit Protected Mode code (64KiB segments code, that is) could also operate in x64 Long-Mode.
Comparable in the way well behaved Real-Mode programs could run unmodified in 16-Bit Protected Mode.
(In the DOS days of the 1980s, about no such program existed. Tame Win16 programs, however, not doing
segment arithmetics, did fit these requirement. In essence, all what they did was calling API functions, after all.)

Anyway, I remember that I mentioned that matter in several threads.

Re: Memory for protected mode DOS games
Re: x64 sys files and exe files still contain a MS-DOS stub?

Re: Wine on newer windows OSes?
Re: Ultimate OS/2 Warp 4 machine?

Not meant as a self-advertisement, though! 😅
It's just that I think that's a really interesting matter.

Also, OS/2 did also feature some interesting feats!
They managed to run 16-Bit Protected Mode code (OS/2 1.x) in a 32-Bit Protected Mode (OS/2 2.x and Warp).
OS/2 2.x even had a DPMI host that ran W3.x as a DPMI client.

Anyway, OS/2 1.x was very interesting in several aspects. It's about the only OS that took the 286 to its fullest.
Virtual Memory, paging, LOADALL and the ring scheme were used there. That's why it was in part so difficult to emulate.

"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 22 of 30, by stamasd

User metadata
Rank l33t
Rank
l33t
GabrielKnight123 wrote:

Oops I reread this from root42

"If you want to use UMBs to load programs high you NEED EMM386. himem.sys takes care of XMS, and EMM386 takes care of UMBs and EMS. You can disable EMS with the NOEMS option"

that answers my question

Actually that's not strictly true. Using emm386 is the easy way, but there are other ways to get access to UMBs that don't put the CPU in protected mode. Most of them are however chipset-dependent.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 23 of 30, by Jo22

User metadata
Rank l33t++
Rank
l33t++

UMBs can also be provided by ISA memory cards. Lo-Tech sells that 1MiB RAM card, for example.
Its jumper settings allow for UMB memory, for example. Even though the card is 8-Bit, loading a tiny mouse
or keyboard driver into UMA doesn't cause any critical performance drop.
Alternatively, there's UMBPCI. It normaly works on 586 and higher PCs.

"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 24 of 30, by oeuvre

User metadata
Rank l33t
Rank
l33t

I use the UMB
I use anarchy!

HP Z420 Workstation Intel Xeon E5-1620, 32GB, RADEON HD7850 2GB, SSD + HD, XP/7
ws90Ts2.gif

Reply 25 of 30, by stamasd

User metadata
Rank l33t
Rank
l33t
Jo22 wrote:
UMBs can also be provided by ISA memory cards. Lo-Tech sells that 1MiB RAM card, for example. Its jumper settings allow for UMB […]
Show full quote

UMBs can also be provided by ISA memory cards. Lo-Tech sells that 1MiB RAM card, for example.
Its jumper settings allow for UMB memory, for example. Even though the card is 8-Bit, loading a tiny mouse
or keyboard driver into UMA doesn't cause any critical performance drop.
Alternatively, there's UMBPCI. It normaly works on 586 and higher PCs.

You still need to use a UMB driver to make DOS use the UMBs you provide as hardware. There's UMBPCI that you mentioned, and there are other solutions as well (RDOSUMB, HIRAM, Use!UMBs, TLB aka The Last Byte, etc)

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 27 of 30, by Jo22

User metadata
Rank l33t++
Rank
l33t++
MadDog wrote on 2020-01-09, 04:05:

Upper Memory Manager 0.3 Worked great on my 486 while the rest of the ones Stamasd listed didnt work
Can find it on this page http://www.retroarchive.org/garbo/pc/memutil/index.html

Looks interesting! Thank you very much, sir! 😀

"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 28 of 30, by MadDog

User metadata
Rank Newbie
Rank
Newbie

No Problem Jo22!

Reply 30 of 30, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
Falcosoft wrote on 2018-08-19, 16:06:
Sorry to say but you are wrong. When you are talking about V86 mode you are talking from the perspective of real mode user progr […]
Show full quote
derSammler wrote:

Well, maybe nitpicking, but saying that it puts the CPU into protected mode while it's really V86 mode is wrong. Why? Because it makes a huge difference. In V86 mode, memory above 1 MB can still only be accessed by a page window. In protected mode however you have linear addressing for the whole memory range. A game like DOOM or a 32-bit OS put the CPU into protected mode, EMM386 does not. You may call V86 mode a submode of protected mode, but that still doesn't make them equal.

Sorry to say but you are wrong. When you are talking about V86 mode you are talking from the perspective of real mode user programs. What you say is only possible since the CPU itself IS in protected mode so EMM386 can virtualize a 16 bit x86 environment. DOOM or 32-bit DOS extenders can enter to protected mode directly only when they are started in real mode. When they are started with EMM386 loaded the CPU is already in protected/v86 mode so they have to use VCPI/DPMI. The source code of DOOM is available so you can study this topic further. Also you can try to write a simple DOS program that tries to enter into protected mode directly. And test it under real mode and EMM386 loaded. You will see the difference immediately. Entering into protected mode requires the modification of CR0 register. At the moment when you try to modify CR0 when EMM386 is loaded you will get a privileged instruction exception (since we are already in protected mode, and in protected mode it's prohibited for user mode programs running in ring 3). If you do not believe me here's some reference:
https://wiki.osdev.org/Virtual_8086_Mode

Edit:
If the CPU is in Protected Mode or not is defined by the lowest bit of the CR0 register.
The lowest bit of CR0 (CR0.PE, Protection Enable) is also set in V86 mode.

TRUE.
V86 is a substate of protected mode. w9x/3.x 's dosbox is a v86 mode with MS Implemented DPMI host. Even NT's NTVDM will enter v86 mode.
BTW the standard procedure to detect V86 is actually testing the PE (Protected mode Enable) bit of cr0(msw) register

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD