MiSTer AO486 Core Part 3 – Managing Memory

Emulation, MiSTer FPGA, MiSTer FPGA Cores

You’ve installed DOS and MiSTerFS. Next we need to look at memory management.

Some DOS games require Extended Memory to be configured. Some take advantage of Expanded Memory (EMS) and some only need the original 640kB of DOS Conventional Memory. Others still do their own memory management.

There’s no “one size fits all” – DOS needs to be configured differently for different software. Here’s how.

Update CONFIG.SYS

Quick setup (if you have MiSTerFS installed)

Copy/Paste the code below and save it as CONFIG.SYS. Use MiSTerFS to transfer it to ao486 and copy to C:\CONFIG.SYS (overwrite the existing file with this new one). Reboot ao486.

Without MiSTerFS:

Type edit c:\config.sys. An editor application will open. Update config.sys to the following:

[COMMON]
FILES=30
LASTDRIVE=Z

[menu]  
menuitem=X, Extended memory (default)
menuitem=E, Extended + Expanded memory
menuitem=C, Conventional memory only

menudefault=X,10

[X]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DOS=HIGH,UMB
DEVICE=C:\DOS\EMM386.EXE NOEMS I=C800-CDFF X=CE00-CFFF I=D000-EFFF

[E]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DOS=HIGH,UMB
DEVICE=C:\DOS\EMM386.EXE RAM 8192 FRAME=D000 D=256 I=C800-CDFF X=CE00-CFFF I=D000-EFFF

[C]

Hit Alt+F,S to save the file, then Alt+F,X to exit the editor. Reboot ao486.

A Note on Included/Excluded Memory Ranges

You might have noticed the I= (“Include”) and X= (“Exclude”) parameters above. These are used tell EMM386 which memory segements it can/can’t use for Extended/Expanded memory.

The ao486 core reserves memory segments between CE00 and CFFF for system features (including MiSTerFS). The code above prevents EMM386 from using segments in this range – otherwise the system may hang/crash.

Making a Memory Choice

When DOS starts again, you’ll have a choice of memory configurations:

For most software and games, the default option 1 (Extended memory) will work. This is also a good choice for booting windows.

Some games (e.g. Wing Commander 1 and 2) make use of Expanded memory. Use option 2.

Lastly, some games (e.g. Ultima VII) use their own memory manager and won’t work with either Expanded or Extended memory. For these use option 3.

Next Posts

Comments