DOS Memory Optimization on QEMU

With HIMEM.SYS 3.95 (available from Win98SE), HIRAM 1.9a and UMBPCI 3.83, it’s possible to have >620K conventional ram available in DOS environment under QEMU 0.15.1 and above (tested with QEMU 0.15.1 and 1.1.1).

Screenshot:

QEMU 0.15.1 and 1.1.1 are slightly different on memory allocations, which 0.15.1 seems to have less UMB available. Using VIDE-CDD.SYS can further free the conventional memory up to 627K. The reason using OAKCDROM.SYS (20k) as CD-ROM driver is that other drivers do not work as expected under QEMU. UIDE.SYS/XCDROM.SYS will not load even with XMGR.SYS loaded, GCDROM.SYS cannot read disc after it has been changed, and VIDE-CDD.SYS will hang up the system when change discs. TEAC_CDI.SYS will lock the system when boots. This is an older version of OAKCDROM.SYS which has smaller footprint (20k) comparing to ATAPICD.SYS (22k) or latest version from Win98SE bootdisk (39k), while keeping the CDROM functioning well.

AUTOEXEC.BAT:

@ECHO OFF  
PROMPT $P$G  
PATH=C:DOS;C:WINDOWS  
SET TEMP=C:WINDOWSTEMP  
LH C:DOSMSCDEX.EXE /D:IDECD000 /M:20 /E  
C:DOSSMARTDRV.EXE 8192 16 A+ B- C+ D /N /E:32768  
LH C:CTMOUSECTMOUSE.EXE /R44  
C:DOSMAXENVIMAX.COM N+  
MODE.COM CON: RATE=32 DELAY=1  
LH C:RECALLRECALL.COM -I  
LH C:DOSIDLEDOSIDLE.EXE

CONFIG.SYS:

SWITCHES=/F  
DOS=HIGH,UMB  
BUFFERS=11,0  
FILES=60  
LASTDRIVE=Z  
FCBS=1,0  
STACKS=0,0  
DEVICE=C:UMBPCIUMBPCI.SYS /I=E000-EFFF  
DEVICE=C:HIRAMHIRAM.EXE  
DEVICEHIGH=C:DOSHIMEM.SYS /NUMHANDLES=128 /TESTMEM:OFF  
DEVICE=C:DOSMAXDOSMAX.EXE N+ P- R- U02 U08 U09 U0A U0B U0C U0D U0E U70 U72 U73 U74 U76 U77  
DEVICEHIGH=C:CDROMOAKCDROM.SYS /D:IDECD000  
DEVICEHIGH=C:WINDOWSIFSHLP.SYS  
SHELL=C:DOSMAXSHELLMAX.COM /N+ /P- /R- /S- C:COMMAND.COM C: /E:1536 /P

The software mentioned in both scripts can be found here: http://www.mdgx.com/mem6.htm

/I=E000-EFFF parameter must be specified for UMBPCI otherwise it cannot find a contiguous 16k memory space and will refuse to load.

PS: QEMU 0.15.1 and above can use 32BFA and 32BDA (MH32BIT.386) with WfWG 3.11, while 0.9.1 cannot. The only problem is that versions above 0.12.3 cannot have display mode of 1024x768@16.7M for Win 3.x, only 640x480@16.7M (using Cirrus driver from HP) or 1024x768@256 colors (-vga vmware and patched SVGA driver, available from http://www.scampers.org/steve/vmware/).