VOGONS


First post, by partomatty

User metadata
Rank Newbie
Rank
Newbie

Hi,

I'm using V86 for a browser emulation project that involves a game that was originally written to run under Win9x's VMM and uses EMS memory. I'm trying to use a DOS guest to run this game, but I need to get EMS memory working.

I don't need CDROM or networking or any special drvers, so I used a DOS 6.22 boot diskette with CONFIG.SYS only containing

DEVICE=HIMEM.SYS /TESTMEM:OFF

I added some lines to enable EMS memory:

DEVICE=EMM386.EXE RAM
DOS=HIGH,UMB

But I get the following error:

WARNING: Unable to set page frame base address--EMS unavailable.

I ran MEM, which shows no available upper memory:

Memory Type        Total  =   Used  +   Free                                    
---------------- ------- ------- -------
Conventional 639K 65K 574K
Upper 0K 0K 0K
Reserved 0K 0K 0K
Extended (XMS) 64,512K 64K 64,448K
---------------- ------- ------- -------
Total memory 65,151K 129K 65,022K

I tried running UMBCHK, which showed unused blocks from CC00 to E3FF. I added /I to EMM386, which worked. But when I ran the application it couldn't allocate EMS memory.

I tried using EMSMAGIC.EXE to use conventional memory for EMS, which did work. But the EMS application hangs after a few seconds, so I want to try getting EMS working the normal way.

I tried both HIMEM + JEMM386 and JEMMEX and those didn't work either.

JemmEx v5.84 [02/12/24]                                                         
System memory found at c000-ffff, region might be in use
Warning: no suitable page frame found, EMS functions limited.
JemmEx loaded

I was able to reproduce all these issues in QEMU, which makes me think that maybe this has something to do with seabios not making this memory available.

I tried the BOCHS bios but that didn't even boot...

So my question is:

  • Has anyone ever gotten MS-DOS + EMS or FreeDOS + EMS working in either QEMU or V86?
  • Is there a way to configure seabios to leave some UMB memory available for EMS?
  • Is there another legacy PC BIOS that might work under V86/QEMU?

Thanks

Reply 1 of 3, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

If you have unused areas in your upper memory area between CC00 and E3FF, try this for your config.sys

DOS=HIGH,UMB
Device=C:\dos\himem.sys
device=C:\dos\emm386.exe RAM I=B000-B7FF I=CC00-DBFF I=DC00-DFFF I=E000-E3FF FRAME=CC00 NOTR

For FREEDOS, you can tell JEMMEX to just ENABLE the ram already mapped there as UMB.

Device=C:\freedos\jemmex.exe RAM S=CC00-E3FF FRAME=CCOO I=TEST

The issue you are having isnt really from seabios per-se.

An actual dos machine maps NOTHING (as in, the space is conected to nothing at all, unless you assign it with jumpers on a card!) between CFFF and EFFF. This area is reserved for memory mapped IO devices, like EMS ram cards, and option roms.

Your emulator is populating this area with RAM.

This is 'basically the same thing' that UMBPCI does; find unused/unpopulated address in this area, and fill it with RAM (using the chipset).

Your emulator is giving you this 'for free'. No driver needed.

However, EMM drivers find this RAM and get mad. They expect 'NOTHING' there, find RAM, and get uppity.

EMM386 can be explicitly told to use the address *regardless of what's there* with explicit includes. (Like with my first example).

Jemmex can be told to enable this already mapped ram for umbs with the S=xxxx notation, as per the second example.

In both cases, the EMM will fail to find an area with 'NOTHING' present already to place the EMS pageframe.

However, explicitly telling the EMM where to place it, will shut it up, and it will work. The EMM just unmap the ram, then handle that 64kb chunk of address for the pageframe.

Reply 2 of 3, by partomatty

User metadata
Rank Newbie
Rank
Newbie

Thank you, the configuration worked! Those parameters always seemed like a lot of voodoo to me, but your explanation made it clear.

Reply 3 of 3, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

Glad it worked for you!