VOGONS


EXMS86 (XMS for your 8086)

Topic actions

Reply 120 of 123, by mkarcher

User metadata
Rank l33t
Rank
l33t
Yoghoo wrote on Today, 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 123, by Yoghoo

User metadata
Rank Member
Rank
Member
mkarcher wrote on Today, 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 123, by mateusz.viste

User metadata
Rank Member
Rank
Member
mkarcher wrote on Today, 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 123, by Yoghoo

User metadata
Rank Member
Rank
Member
mateusz.viste wrote on Today, 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.