Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Is there a DOS memory documentation available? (Users)

posted by mceric, Germany, 19.01.2024, 10:42

> > That is correct. EMM386 uses protected mode
>
> V86 mode (a special real-mode friendly form of protected mode)

It is a special task type in the protected mode ecosystem and you need to activate protected mode in general to juggle with memory paging, which is what software-based EMS as in EMM386 needs. To be able to provide EMS and still run DOS requires EMM386 to encapsulate DOS in a V86 task, which feels similar to real hardware for DOS, but it is not the same, so EMM386 has to emulate some things. Apps which want to use other protected mode features (such as creating tasks using more than 1 MB of RAM) get in conflict with EMM386 while in V86, so they have to make VCPI requests instead of just messing with protected mode directly.

> VME came with the Pentium (aka 586) in 1993.

So with a VME-aware EMM386 version and a Pentium or similar or newer CPU, the hardware interrupt IRQ speed loss caused by EMM386 will be much smaller, yes.

> > More modern DOS games can even coexist with Windows through DPMI.

Of course only with Windows versions which still offer DPMI.

> > Regarding VCPI: That is a very low level coexistence interface.

Not to be confused with GEMMIS, but both are related, yes. VCPI allows you to take over protected mode powers from EMM386. GEMMIS allows in particular Windows to know about the internal state of EMS and UMB, helping it to take over the entire work of EMM386 instead of only grabbing some powers from it.

What makes VCPI worse than DPMI is that it is more for grabbing power and less for cooperation. DPMI is more cooperative, but also far more complex, so EMM386 usually only have the former built in. I think DR-DOS EMM386 had both built in. Normally, DPMI is provided by Windows or by a separate DPMI host driver. CWSDPMI provides DPMI, too.

> CWSDPMI is not a "DOS extender"

Well it is somewhat in between. Classic DOS extenders help you to port DOS apps to protected mode, offering protected mode wrappers for INT 21 etc.

CWSDPMI just makes sure you get DPMI and a few other goodies, which in combination "extends" DOS far enough to let DJGPP compiled and similar apps run. Those apps do not target classic real mode DOS anyway, they are already built for the DPMI protected mode ecosystem.

As Rugxulo says, all types of protected mode apps for DOS have some speed loss because BIOS and DOS kernel will work in V86 mode while the app uses protected mode. The VESA VBE graphics BIOS can also be used directly in protected mode.

The FD32 project uses a FreeDOS kernel running directly in protected mode, too, to speed up DPMI-based apps, but practical speed gains are limited.

In DOSEMU2, even the shell (a port of FreeCOM) runs in protected mode on the Linux (or other host operating system) side with some glue magic to make it visible from the DOS V86 or DOS emulated CPU world. Thanks to CPU emulation, DOSEMU2 can be ported to non-x86, non-amd64 CPU.

> Actually, switching to V86 mode from pmode (e.g. EMM386) should be faster
> than switching from pmode to real mode.

Probably, yes. You also had ancient protected mode DOS apps which just refrained from using DOS and the BIOS at all after loading, so they had to do all hardware access themselves, but avoided the effort of providing a V86 task for DOS and BIOS.

---
FreeDOS / DOSEMU2 / ...

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 219 users online (0 registered, 219 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum