VOGONS


EXMS86 (XMS for your 8086)

Topic actions

Reply 120 of 156, by mkarcher

User metadata
Rank l33t
Rank
l33t
Yoghoo wrote on 2025-08-15, 13:21:

But mem/c shows Largest free upper memory block 0K (without DOS=UMB). If I start with DOS=UMB it hangs the pc when trying to run any command (config.sys and autoexec.bat load successfully).

It is expected to get 0KB UMB without "DOS=UMB": While the XMS standard includes functions to allocate and free single upper memory blocks, this is not how the MS-DOS kernel will use it. Instead, the MS-DOS kernel uses its integrated memory mechanism for UMBs that it also uses for conventional memory. So, if you add "DOS=UMB" to CONFIG.SYS, MS-DOS will allocate all UMBs from the XMS driver and integrate that memory into the MS-DOS kernel memory management system. MS-DOS will never return UMBs to the XMS driver. "mem /c" only shows DOS memory located in upper memory blocks that are managed by the DOS kernel, so without DOS=UMB, that memory could still be allocated from the XMS driver (as DOS didn't do it), but it is not available in the DOS kernel management system. There could be applications that allocate UMB memory directly from the XMS driver, but I expect them to be extremely rare, as integrating the UMBs into the DOS kernel memory management via DOS=UMB is so common that system on which an application is actually able to allocate memory using the XMS UMB API are really rare.

By the way, this is similar, but not identical to how DOS deals with the HMA (which only exists on 286+ computers, and can only be provided using physical extended memory). The XMS driver can hand out the HMA in one piece to one single user. The XMS driver can not split the HMA into different parts for different users. If you use "DOS=HIGH", DOS will ask the XMS driver to hand the HMA over to DOS. But unlike UMBs, the HMA is not integrated into the normal DOS kernel memory management system, but DOS uses the HMA for special internal purposes only. This is likely due to the fact that unlike UMBs, the HMA is not accessible all the time. For compatibility reasons, there are some situations in which the HMA memory is inaccessible. On the other hand, programs that allocate memory using the normal DOS kernel memory management API expect their memory to be accessible all the time. When you usen DOS=HIGH, DOS controls when the HMA is accessible and when it has to be hidden for compatibility reasons, and DOS is written in a way that it does not require access to the data stored in the HMA while the HMA is hidden. Just like with UMBs, if you have a 286 with HIMEM, you may omit "DOS=HIGH" from CONFIG.SYS, so DOS does not allocate the HMA and places all its data structures into conventional or UMB memory. In that case, applications can ask HIMEM.SYS to hand them the HMA. Again, applications actually doing this are rare, because most systems that support HIMEM.SYS were configured in a way that DOS uses the HMA, so adding HMA support to applications is a complication that only pays off on a very small amount of systems. Unlike UMBs, MS-DOS does not provide an application API to allocate memory in the HMA, so if you use DOS=HIGH, only DOS internal data structures and parts of the DOS kernel code are located in the HMA.

Back to topic. It seems for some reason, you get issues as soon as you try to use UMBs or EMS (both require the use of the page frame) for purposes other than accessing the "virtual" XMS memory. Does your EMS driver have an option to configure a "nesting limit for saved page frames on a handle"? If it does, did you by any chance configure it to zero to conserve memory when loading the EMS driver? If I understood the EXMS source code correctly when I glimpsed over it some days ago, it seems this code requires a saving depth of at least one to work properly, otherwise it would leave the page frame in a messed up state after XMS transfers.

Reply 121 of 156, by Yoghoo

User metadata
Rank Member
Rank
Member
mkarcher wrote on 2025-08-15, 15:17:

Back to topic. It seems for some reason, you get issues as soon as you try to use UMBs or EMS (both require the use of the page frame) for purposes other than accessing the "virtual" XMS memory. Does your EMS driver have an option to configure a "nesting limit for saved page frames on a handle"? If it does, did you by any chance configure it to zero to conserve memory when loading the EMS driver? If I understood the EXMS source code correctly when I glimpsed over it some days ago, it seems this code requires a saving depth of at least one to work properly, otherwise it would leave the page frame in a messed up state after XMS transfers.

Thanks for the background about UMB's! These are the options:

PMEMM: Lo-tech EMM Driver for PicoMEM r01

Expanded Memory Manager for the PicoMEM Board.
Based on original works Copyright (c) 1988, Alex Tsourikov.

http://www.lo-tech.co.uk/wiki/2MB-EMS-Board
Syntax: DEVICE=PMEMM.EXE [/switches]

/h:nnn - Maximal number of handles(64)
/d:nn - Depth of contest saves(5)
/n - Bypass memory test
/x - Perform long memory test
/3 - Use only EMS 3.2 functions
/q - Quiet mode
/z - No ticking noise

Defaults in parentheses.

I added the /z option as I hate sounds during startup. 😀 The original source can be found here: https://github.com/FreddyVRetro/ISA-PicoMEM/t … c/drivers/PMEMM. It's based on LTEMM.EXE from Lo-tech.

I am using /n /z as options. The rest is default. I guess you're talking about Depth of contest saves in this case. It's default at 5.

Reply 122 of 156, by mateusz.viste

User metadata
Rank Member
Rank
Member
mkarcher wrote on 2025-08-15, 15:17:

Back to topic. It seems for some reason, you get issues as soon as you try to use UMBs or EMS (both require the use of the page frame) for purposes other than accessing the "virtual" XMS memory. Does your EMS driver have an option to configure a "nesting limit for saved page frames on a handle"? If it does, did you by any chance configure it to zero to conserve memory when loading the EMS driver? If I understood the EXMS source code correctly when I glimpsed over it some days ago, it seems this code requires a saving depth of at least one to work properly

Interesting. I did not know this could be configurable. And indeed, EXMS86 asks the EMS driver to save the pageframe configuration before doing the XMS transfer, and asks to restore it once the transfer is finished. The symptoms Yoghoo describe could match an issue there, albeit I am not sure it would explain the UMB issues, because in the 32k configuration there is no need to save the pageframe config at all (and EXMS86 does not save it in this mode) - EXMS86 uses only the upper 32kb of the pageframe, while UMBs are declared in the lower 32k.

@Yoghoo - just for the extra data point, would you mind testing UMBs in the "!!" mode? In this mode you get the full 64k of the pageframe and EXMS86 takes care to disable interrupts + save/restore the pageframe configuration before every XMS transfer. None of these precautions are performed in the "!" mode.

http://mateusz.fr

Reply 123 of 156, by Yoghoo

User metadata
Rank Member
Rank
Member
mateusz.viste wrote on 2025-08-15, 16:17:

@Yoghoo - just for the extra data point, would you mind testing UMBs in the "!!" mode? In this mode you get the full 64k of the pageframe and EXMS86 takes care to disable interrupts + save/restore the pageframe configuration before every XMS transfer. None of these precautions are performed in the "!" mode.

Tried with "!!" mode but unfortunately same problems as with only "!". Computer hangs when running any command after loading config.sys and autoexec.bat.

Reply 124 of 156, by mkarcher

User metadata
Rank l33t
Rank
l33t
Yoghoo wrote on 2025-08-15, 16:10:

I am using /n /z as options. The rest is default. I guess you're talking about Depth of contest saves in this case. It's default at 5.

Exactly. /d:0 (if accepted by that driver) would likely break a lot of things, EXMS86 being one of them. I vaguely remember that the EMS specification requires a minimum depth for conformant EMS implementations, and my gut tells me that this minimum might be 2. But please don't expect that information to be more reliable than info you get from ChatGPT 2.0 😉

Reply 125 of 156, by Frenkel

User metadata
Rank Newbie
Rank
Newbie

EXMS86 is useful for Doom8088. That game uses 64 kB of EMS memory as an upper memory block to store graphics, level data, etc. And 1507 kB of XMS memory as a RAM drive to store the WAD file.
There are plans to use EMS as a RAM drive, but until that's implemented, EXMS86 can be used (in combination with -noems to disable the 64 kB EMS UMB).

mkarcher wrote on 2025-08-15, 15:17:

There could be applications that allocate UMB memory directly from the XMS driver, but I expect them to be extremely rare, as integrating the UMBs into the DOS kernel memory management via DOS=UMB is so common that system on which an application is actually able to allocate memory using the XMS UMB API are really rare.

Commander Keen 4 uses UMB. On the startup screen it's listed under Extended Memory.

Reply 126 of 156, by mateusz.viste

User metadata
Rank Member
Rank
Member
Yoghoo wrote on 2025-08-15, 17:02:

Tried with "!!" mode but unfortunately same problems as with only "!". Computer hangs when running any command after loading config.sys and autoexec.bat.

Ok, at least we know it's not related to the EMS page frame saving/restoring logic.

A thought occurred to me: are you using something in background that relies on EMS? Like an EMS disk cache...? Anything that uses EMS will break down horribly when EXMS takes over the EMS driver.

If not this, then I don't have much clue about what is going on with your setup. Maybe something specific to the PicoMEM, but I really don't know.

EDIT: I also managed to make Wolf3D use both EMS and XMS on my setup, by sabotaging the int 67h handler and returning a limited amount of EMS so EXMS86 still has EMS for itself. Unfortunately I am not reproducing any hangs, wolf3d does use a combination of EMS and XMS caching but everything works perfectly. NB: Wolf3D 1.1 does not care about XMS when it has EMS, but Wolf3D 1.4 does use both when available.

Frenkel wrote on 2025-08-16, 08:37:

EXMS86 is useful for Doom8088. That game uses 64 kB of EMS memory as an upper memory block to store graphics, level data, etc. And 1507 kB of XMS memory as a RAM drive to store the WAD file.

That sounds very cool, it's an awesome use case of EXMS86! :-)

What EMS board are you using? Have you noticed any glitches or limitations with the latest EXMS86 (0.9.6)?

http://mateusz.fr

Reply 127 of 156, by igully

User metadata
Rank Newbie
Rank
Newbie

I am thinking a use case for EXMS86 could be for virtual memory via MEMSIM32 on constrained hardware systems.
Extremely slow XMS memory is always better than no memory at all.

http://www.lanet.lv/ftp/simtelnet/msdos/memutil/memsim32.zip

Perhaps, it would be interesting exploring the possibility to include MEMSIM32 functionality directly into EXMS86 for improved functionality.

Food for thought.

Reply 128 of 156, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on 2025-08-16, 16:32:
I am thinking a use case for EXMS86 could be for virtual memory via MEMSIM32 on constrained hardware systems. Extremely slow XMS […]
Show full quote

I am thinking a use case for EXMS86 could be for virtual memory via MEMSIM32 on constrained hardware systems.
Extremely slow XMS memory is always better than no memory at all.

http://www.lanet.lv/ftp/simtelnet/msdos/memutil/memsim32.zip

Perhaps, it would be interesting exploring the possibility to include MEMSIM32 functionality directly into EXMS86 for improved functionality.

Food for thought.

I already meantioned this as an unholy union on page 1, before this manager got lim3.0 support.

Reply 129 of 156, by mateusz.viste

User metadata
Rank Member
Rank
Member
Yoghoo wrote on 2025-08-15, 13:21:

Edit: Also where can I download UMM.SYS v0.3?

Only saw this question now (oops).

Some time ago I've added UMM to SvarDOS packages. You can download the *.svp package there, it's a zip file.

http://mateusz.fr

Reply 130 of 156, by Yoghoo

User metadata
Rank Member
Rank
Member
mateusz.viste wrote on 2025-08-16, 19:03:
Yoghoo wrote on 2025-08-15, 13:21:

Edit: Also where can I download UMM.SYS v0.3?

Only saw this question now (oops).

Some time ago I've added UMM to SvarDOS packages. You can download the *.svp package there, it's a zip file.

Thanks. Will try that one out. Think why it was not working is because of 4DOS. If I don't use it it seems a lot slower but it at least doesn't hang during some short tests with USE!UMBS. But it now reports 373K of UMB (all used by IBMDOS). That amount doesn't make sense to me.

Reply 131 of 156, by mateusz.viste

User metadata
Rank Member
Rank
Member
Yoghoo wrote on 2025-08-16, 19:14:

Thanks. Will try that one out.

I have to warn though that UMM.SYS never worked for me, just hangs my system. Maybe I have unlucky hardware, or maybe it's not compatible with DR-DOS, dunno.

USE!UMB v2.1 works perfectly for me (you can also find it in the SvarDOS packages).

Yoghoo wrote on 2025-08-16, 19:14:

Think why it was not working is because of 4DOS. If I don't use it it seems a lot slower but it at least doesn't hang during some short tests with USE!UMBS.

4DOS is apparently capable of EMS swapping... So it is probably not surprising it goes belly-up when EXMS86 suddenly removes EMS support. Maybe there is some 4DOS option or switch to disable EMS usage.

Yoghoo wrote on 2025-08-16, 19:14:

But it now reports 373K of UMB (all used by IBMDOS). That amount doesn't make sense to me.

Are you sure you provided the proper range (D000-DFFF) to USE!UMBS ?

http://mateusz.fr

Reply 132 of 156, by Yoghoo

User metadata
Rank Member
Rank
Member
mateusz.viste wrote on 2025-08-16, 19:31:
I have to warn though that UMM.SYS never worked for me, just hangs my system. Maybe I have unlucky hardware, or maybe it's not c […]
Show full quote
Yoghoo wrote on 2025-08-16, 19:14:

Thanks. Will try that one out.

I have to warn though that UMM.SYS never worked for me, just hangs my system. Maybe I have unlucky hardware, or maybe it's not compatible with DR-DOS, dunno.

USE!UMB v2.1 works perfectly for me (you can also find it in the SvarDOS packages).

Yoghoo wrote on 2025-08-16, 19:14:

Think why it was not working is because of 4DOS. If I don't use it it seems a lot slower but it at least doesn't hang during some short tests with USE!UMBS.

4DOS is apparently capable of EMS swapping... So it is probably not surprising it goes belly-up when EXMS86 suddenly removes EMS support. Maybe there is some 4DOS option or switch to disable EMS usage.

Yoghoo wrote on 2025-08-16, 19:14:

But it now reports 373K of UMB (all used by IBMDOS). That amount doesn't make sense to me.

Are you sure you provided the proper range (D000-DFFF) to USE!UMBS ?

I am using version 2.2 of USE!UMB. Also tried 2.0 before. I can remove EMS from 4DOS.INI and then it runs ok (at least no immediate hang). But with or without 4DOS mem/c does hang half the time or is very very slow. Something is not ok.

I am using range D000-D7FF. That's the correct range for 32K? I am testing with "!" mode which reports I can reuse 32K.

Reply 133 of 156, by Yoghoo

User metadata
Rank Member
Rank
Member

Think I found the problem. Your program needs to load with INSTALL= in the config.sys. This probably gives problems as this loads after the DEVICE= statements.

USE!UMBS does not give any output so didn't see it before. Trying UMM it gives an error that there is no XMS. That's because it loads before your tool as DEVICE= always comes before LOAD= even if you put the line before it.

Reply 134 of 156, by mateusz.viste

User metadata
Rank Member
Rank
Member
Yoghoo wrote on 2025-08-16, 19:49:

Think I found the problem. Your program needs to load with INSTALL= in the config.sys. This probably gives problems as this loads after the DEVICE= statements.

USE!UMBS does not give any output so didn't see it before. Trying UMM it gives an error that there is no XMS. That's because it loads before your tool as DEVICE= always comes before LOAD= even if you put the line before it.

Good catch. I didn't know IBM DOS has such hardcoded ordering. On DR-DOS (SvarDOS) the CONFIG.SYS binaries are loaded in the order they appear, no matter if they are DEVICE drivers or INSTALLable programs.

That's quite a bummer, since refitting EXMS86 into a SYS driver would be a major pain that I am not really planning going trough.

Is this IBM-DOS behavior shared with MS-DOS? Are there any ways to configure it otherwise?

http://mateusz.fr

Reply 135 of 156, by Yoghoo

User metadata
Rank Member
Rank
Member
mateusz.viste wrote on 2025-08-16, 20:01:
Good catch. I didn't know IBM DOS has such hardcoded ordering. On DR-DOS (SvarDOS) the CONFIG.SYS binaries are loaded in the ord […]
Show full quote
Yoghoo wrote on 2025-08-16, 19:49:

Think I found the problem. Your program needs to load with INSTALL= in the config.sys. This probably gives problems as this loads after the DEVICE= statements.

USE!UMBS does not give any output so didn't see it before. Trying UMM it gives an error that there is no XMS. That's because it loads before your tool as DEVICE= always comes before LOAD= even if you put the line before it.

Good catch. I didn't know IBM DOS has such hardcoded ordering. On DR-DOS (SvarDOS) the CONFIG.SYS binaries are loaded in the order they appear, no matter if they are DEVICE drivers or INSTALLable programs.

That's quite a bummer, since refitting EXMS86 into a SYS driver would be a major pain that I am not really planning going trough.

Is this IBM-DOS behavior shared with MS-DOS? Are there any ways to configure it otherwise?

No way to configure it otherwise unfortunately. It's shared with MS-DOS as well.

Reply 136 of 156, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

Ctload.exe can load .sys files from autoexec.bat, but eats a bit more conventional to do it, iirc.

It might allow this with ibmdos

Reply 137 of 156, by mateusz.viste

User metadata
Rank Member
Rank
Member

A workaround could be to load USE!UMBS via the DEVLOAD utility. I will assess how hard it would be to make EXMS86 a *.SYS.

BTW The USE!UMBS v2.1 *does* print an extensive log on screen when it loads. I never used USE!UMBS v2.2, will look for it. I suppose the main change is that it's quiet during boot.

http://mateusz.fr

Reply 138 of 156, by igully

User metadata
Rank Newbie
Rank
Newbie
mateusz.viste wrote on 2025-08-16, 20:01:
Good catch. I didn't know IBM DOS has such hardcoded ordering. On DR-DOS (SvarDOS) the CONFIG.SYS binaries are loaded in the ord […]
Show full quote
Yoghoo wrote on 2025-08-16, 19:49:

Think I found the problem. Your program needs to load with INSTALL= in the config.sys. This probably gives problems as this loads after the DEVICE= statements.

USE!UMBS does not give any output so didn't see it before. Trying UMM it gives an error that there is no XMS. That's because it loads before your tool as DEVICE= always comes before LOAD= even if you put the line before it.

Good catch. I didn't know IBM DOS has such hardcoded ordering. On DR-DOS (SvarDOS) the CONFIG.SYS binaries are loaded in the order they appear, no matter if they are DEVICE drivers or INSTALLable programs.

That's quite a bummer, since refitting EXMS86 into a SYS driver would be a major pain that I am not really planning going trough.

Is this IBM-DOS behavior shared with MS-DOS? Are there any ways to configure it otherwise?

Maybe, you could cheat EXMS86 into a SYS driver using a wrapper:

http://ftp.sunet.se/pub/simtelnet/msdos/bootutil/wrap10.zip

So, it would be something like:

DEVICE=WRAPPER.SYS EXMS86 .COM

Just saying...

Reply 139 of 156, by mateusz.viste

User metadata
Rank Member
Rank
Member

EXMS86 became a SYS driver. version 0.9.7 beta attached. Works for me, but no guarantee, I just finished the SYS work and did not test it extensively yet.

http://mateusz.fr