Is there a DOS memory documentation available? (Users)
> I'm not sure about the validity of this but I've read about EMM386 being
> shunned because it puts the processor in Protected mode and thus the system
> runs slower and some incompatibilities may be introduced too.
That is correct. EMM386 uses protected mode because this allows it to put DOS into a special task which simulates a normal DOS environment, but allows it to juggle with memory in software to provide EMS and UMB. There also was EMS hardware, sometimes as add-on card, sometimes as a chipset feature of the mainboard, but neither were widespread.
You also have UMB chipset drivers such as UMBPCI. Not all mainboards are supported by those and sometimes the UMB have limitations, such as not supporting DMA access for example related to disk/floppy/network/sound controllers. DMA can also be an issue with UMB and EMM386 if BIOS and drivers do not properly implement negotiations and preparations for them.
But back to EMM386: Because it simulates normality, there can be gaps in the simulation and somethings can be slower to simulate than others, such as the DOS style of handling hardware interrupts. Newer CPU had VME, virtual mode extensions, to speed up those again. The main compatibility issue with EMM386 is that by design, it cannot coexist with early protected mode DOS games which want to use protected mode themselves, but do not yet support various interfaces allowing EMM386 and the game to share it. More modern DOS games can even coexist with Windows through DPMI. Others cannot even coexist with HIMEM, but those are rare. Games with DOS extenders which cannot coexist with EMM386 (and Windows) were actually a thing for a while. Those would usually tell you that you have to reboot and not load EMM386 before playing them if they detected a loaded EMM386.
Which is one of the reasons why a default FreeDOS install will ask you at boot which standard set of drivers you want to load. Including choices where EMM386 is omitted.
Regarding VCPI: That is a very low level coexistence interface. It is used for example by Windows to replace the entire EMM386 by a Windows built-in implementation when it starts. Games may support it, but DPMI is far more app-oriented and smooth to use. Things compiled with DJGPP and related compilers often use CWSDPMI as DOS extender, so if CWSDPMI can use VCPI to load its own DPMI layer and then load your DJGPP-based app, it can use that route for running while EMM386 is loaded.
Games which do not care about protected mode will not usually have compatibility problems with EMM386, because EMM386 will only have to make things look like normal DOS processor mode, which is why the special task style used here is called virtual 8086 mode. In practice, EMM386 can let you use 32-bit computations as well, but it cannot let you mess with protected mode yourself. Your apps will have to use VCPI and play nice if they want that while EMM386 is loaded.
I would say the speed issue affects mostly interrupt-heavy apps, such as games which use soundcard IRQ many times per second. If your CPU and EMM386 support VME as mentioned above, the speed impact will be much less.
> On Windows 98 EMM386 doesn't need to be loaded as a DEVICE in CONFIG.SYS,
> but nevertheless Windows creates an EMM Page Frame for EMS compatibility
See above. Windows, even Windows 3, takes control of protected mode. While doing so, it is polite enough to also provide services normally offered by EMM386. If EMM386 is already loaded before Windows 3, then Windows needs to use VCPI to replace EMM386 with its built-in implementation on the fly.
The CPU does not unload EMM386 if you restart in DOS mode. You just actually restart and do not load it again that time, so you stay in real mode
In real mode, everybody is free to switch to protected mode any way they like. But if EMM386 is loaded, protected mode already is active, so it cannot allow you to do uncontrolled changes to protected mode.
Completely unloading EMM386 would involve rolling back all protected mode configuration. You would no longer have EMS and UMB, so it would only be possible if neither are used at that moment. Because it is far easier to just reboot and not load EMM386 again after that reboot, there would not be much use in EMM386 implementing a method to remove itself on the fly.
With JEMM386 and JEMMEX, you do have LOAD and UNLOAD command line options. Check whether they are sufficient for what you need, but note that you can only use them if you loaded JEMM... from autoexec or command line, not if you loaded it from config sys.
---
FreeDOS / DOSEMU2 / ...
Complete thread:
- Is there a DOS memory documentation available? - fritz.mueller, 07.01.2024, 21:20 (Users)
- Is there a DOS memory documentation available? - SuperIlu, 08.01.2024, 00:35
- Is there a DOS memory documentation available? - mceric, 08.01.2024, 00:58
- Is there a DOS memory documentation available? - Rugxulo, 08.01.2024, 09:46
- Is there a DOS memory documentation available? - marcov, 08.01.2024, 22:40
- Is there a DOS memory documentation available? - tauro, 18.01.2024, 06:22
- Is there a DOS memory documentation available? - mceric, 18.01.2024, 10:47
- Is there a DOS memory documentation available? - Rugxulo, 19.01.2024, 01:25
- Is there a DOS memory documentation available? - mceric, 19.01.2024, 10:42
- Is there a DOS memory documentation available? - Japheth, 19.01.2024, 11:57
- Is there a DOS memory documentation available? - ecm, 19.01.2024, 16:42
- Is there a DOS memory documentation available? - mceric, 19.01.2024, 18:02
- Is there a DOS memory documentation available? - mceric, 19.01.2024, 10:42
- Is there a DOS memory documentation available? - Rugxulo, 19.01.2024, 01:25
- Is there a DOS memory documentation available? - mceric, 18.01.2024, 10:47
- Is there a DOS memory documentation available? - Rugxulo, 08.01.2024, 09:46
- Is there a DOS memory documentation available? - bretjohn, 08.01.2024, 18:17
- Is there a DOS memory documentation available? - fritz.mueller, 08.01.2024, 20:30
- Is there a DOS memory documentation available? - tom, 08.01.2024, 21:20
- Is there a DOS memory documentation available? - marcov, 08.01.2024, 23:22
- Is there a DOS memory documentation available? - ecm, 09.01.2024, 00:00
- Is there a DOS memory documentation available? - bretjohn, 09.01.2024, 01:03
- Is there a DOS memory documentation available? - ecm, 09.01.2024, 09:38
- Is there a DOS memory documentation available? - bretjohn, 09.01.2024, 17:35
- Is there a DOS memory documentation available? - Oso2k, 09.01.2024, 20:09
- Is there a DOS memory documentation available? - fritz.mueller, 09.01.2024, 22:21
- Is there a DOS memory documentation available? - Zyzzle, 10.01.2024, 04:47
- Is there a DOS memory documentation available? - mceric, 10.01.2024, 11:56
- Is there a DOS memory documentation available? - ecm, 10.01.2024, 21:14
- Is there a DOS memory documentation available? - bretjohn, 12.01.2024, 04:42
- Is there a DOS memory documentation available? - ecm, 12.01.2024, 18:00
- Is there a DOS memory documentation available? - bretjohn, 12.01.2024, 04:42
- Is there a DOS memory documentation available? - ecm, 10.01.2024, 21:14
- Is there a DOS memory documentation available? - mceric, 10.01.2024, 11:56
- Is there a DOS memory documentation available? - Zyzzle, 10.01.2024, 04:47
- Is there a DOS memory documentation available? - fritz.mueller, 09.01.2024, 22:21
- Is there a DOS memory documentation available? - Oso2k, 09.01.2024, 20:09
- Is there a DOS memory documentation available? - bretjohn, 09.01.2024, 17:35
- Is there a DOS memory documentation available? - ecm, 09.01.2024, 09:38
- Is there a DOS memory documentation available? - marcov, 09.01.2024, 09:42
- Is there a DOS memory documentation available? - bretjohn, 09.01.2024, 01:03
- Is there a DOS memory documentation available? - ecm, 09.01.2024, 00:00
- Is there a DOS memory documentation available? - fritz.mueller, 08.01.2024, 20:30
- Is there a DOS memory documentation available? - boeckmann, 19.01.2024, 10:09