VOGONS


The Old Classic Not Enough Memory Error

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by manic232

User metadata
Rank Newbie
Rank
Newbie

I am quite new to DOS so please be patient with me! 🤣

I am trying to get some old DOS games working by using EMM386.exe but cant seem to manage it.

I am adding the following line to my CONFIG.SYS file

DEVICE=C:\DOS\EMM386.EXE NOEMS

Also I have tried adding RAM, AUTO after the .EXE I have also tried without the NOEMS line

But I still get the Not Enough Memory to run the Program message.

Can someone offer some assistence?

Thanks.

My System: SuperMicro P6SBA Motherboard, Win98SE, PIII 600Mhz, 256MB Ram, Voodoo 5 5500, SB AWE 64 Gold Sound Card, Roland LAPC-I

Reply 3 of 8, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

In old DOS getting enough memory (usually what's called conventional memory, or the memory below 1mb,) is somewhat involved. If you are running the right version of DOS, memmaker.exe can go a long way in doing this for you, though it isn't perfect (I usually do it myself manually.) First, the EMM386.EXE line can be tweaked to help out. The basic line (without fancy memory searches and such,) is:

DEVICE=C:\DOS\EMM386.EXE I=B000-B7FF RAM

That sets it up to use EMS (depending on your total RAM could also have XMS available as well.) It also frees up the monochrome graphics section (only used by the MDA cards,) for loading drivers and tsr's in high memory. It seems to max EMS out at 32MB, or it does on my system, which leave me with 32MB of XMS (64MB total at this time.) If you have less memory than that, you can add an EMS value to the line. Below is an example with 8MB set for EMS (don't know of any games that use more.)

DEVICE=C:\DOS\EMM386.EXE I=B000-B7FF 8196 RAM

The amount of RAM you set aside for EMS doesn't effect the conventional memory available, but I've found that some games require a minimal amount of EMS and some require a minimal amount of XMS. In either case, I've never come across any that required more than 8MB of either one. If you have 16MB or more of extended memory, the above value should do just fine.

A few more lines you need in your config.sys files (again this is just with DOS.)

DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH,UMB
FILES=50
LASTDRIVE=I

HIMEM.SYS is needed to access higher memory addresses, the DOS=HIGH,UMB tells DOS that the HIGH and UPPER MEMORY BLOCKS are available and to use them. FILES= just sets the total number of files that can be opened at one time, the system reserves buffer space for each one, so the higher the number the more space it takes. 50, I've found, is a good value. I think I've only come across a couple of DOS games that need that many, and "I" haven't come across any that need more, that I can recall. The LASTDRIVE line is similar, unless your going to network, or do any drive virtualization (through the subst command or the fakecd program,) Set it to the highest drive letter (on a single hard drive system this is usually D: for the CD-Rom drive.) Personally, I take the highest drive letter (F: in my case is the CD-Rom Drive,) and add 3, so my LASTDRIVE line is LASTDRIVE=I. That gives me the option, if I need, to add in some virtualized drive letters.

Now we have to start loading drivers and tsr's high. That is done with 2 commands. In config.sys its done with DEVICEHIGH= and in autoexec.bat it's done with LOADHIGH or LH (either can be used, I used LH because it's shorter and easier to type.) If you are going to use memmaker.exe don't do this yet, just use the default loads and re-boot after making the above changes, make sure all of your drivers and such are loading (CD-Rom driver, mscdex, mouse, etc...) Type memmaker at the prompt and follow the directions. This might be all you need to do.

I've also zipped up a couple of drivers and attached them that might help out. They are available on the net, but I don't know the exact URL off hand. They are very small generic drivers. There might be better ones available, and these might not work with your HW, but they work fine with mine and might help. If you use these drivers, you might be able to just cut and past my Config.sys and autoexec.bat files and skip the memmaker process. It also depends on you having a SoundBlaster 16 (or completely compatible sound card installed.)

My config.sys:

DEVICE=C:\DOS\VMADD386.SYS
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE I=B000-B7FF RAM
DOS=HIGH,UMB
FILES=50
STACKS=9,256
LASTDRIVE=I
DEVICEHIGH=/L:1 C:\DOS\SETVER.EXE
DEVICEHIGH=/L:3 C:\DOS\XGCDROM.SYS /D:MYCD01

My autoexec.bat:

@ECHO OFF
PROMPT $p$g
PATH C:\WINDOWS;C:\DOS
SET TEMP=C:\TEMP
SET SOUND=C:\SB16
SET BLASTER=A220 I5 D1 H5 P330 T6
SET MIDI=SYNTH:1 MAP:E
LH /L:1 C:\DOS\MSCDEX.EXE /D:MYCD01
LH /L:3 C:\DOS\CMOUSE.COM
LH /L:2 C:\DOS\DOSKEY.COM
C:\SB16\DIAGNOSE /S
C:\SB16\MIXERSET /P /Q

The /L: portions of the commands (LH & DEVICEHIGH,) instruct DOS in which UMB to install the driver/tsr. You can use the "mem /d" command to get a list of the blocks and the numbers associated with them (as well as their free spaces.) You will either need to use the /p switch as well, pipe it through the more command, or redirect it to a text file to study though, it results in several pages of information. I prefer the text file, it allows me to scroll back and forth if you have a compatible text viewer, or just use the edit command. The examples are "mem /d /p" tells it to pause after every page of data, "mem /d | more" tells it to pipe the output through the more command which does the same thing, and "mem /d > memd.txt" tells it to put the output in the memd.txt file - followed by (in basic DOS,) "edit memd.txt" to let you read the file with the ability to scroll up and down through the output. This is important because by default DOS loads them in the first available block that has enough space for the load. If none of the blocks has enough space, it loads in conventional memory instead. MSCDEX.EXE is the largest, and on my system block 1 is the only one large enough for it. So, I have to force XGCDROM.SYS to load in a different block with /L:3 or it would load in block one and MSCDEX.EXE would not be able to load high (eating up 25K of conventional memory.)

Also, most programs use up more space during load than they take up after they have finished and are just sitting resident in memory. So, even though they might "fit" in a particular location, they may not load there. For this reason, load order can be important. If you have 2 programs that should fit in a particular block, but the second one to load always loads low instead, try reversing the load order and see if that helps. This is one area that memmaker fails at. It cannot actually "think" and plan things out. About the only advantage memmaker has, is that it has a method of calculating how much space a program needs to load, and not just how much space it takes up after the load is finished.

Also, I have Windows 3.1 installed on my DOS boot, so you might want to remove it from the path command. Check the path command in your current autoexec.bat file and use yours instead. I like having a separate and distinct temp directory as well (the default is to use the C:\DOS directory,) so either change it to match yours, or create a TEMP directory with the "md C:\TEMP" command.

Again, the above sequences assumes a SoundBlaster16, and the BLASTER variable may be different for you. Check your current autoexec.bat file and make the appropriate changes. With my current ROM shadows, this leaves me with 615 K of conventional memory (haven't found a game yet that needs more,) and 4 K of upper memory as the largest blocks free (the important numbers.) The upper memory number isn't really important other than it tells you the largest size of additional drivers or tsr's you can add to your boot before you start taking up conventional memory. If you are using DOS 6+ (I believe,) you could also use the msd command then 'm' (for memory map,) to see if there are other areas you can add to the EMM386 line (with I=) to get more upper memory. But you cannot always trust what it gives you, so be prepared for crashes if you free up other areas.

There are other things you can do to free up space, some fancier than others, some more effective. However, I've found that for the most compatibility many of those are not worth it. Some people swear by drivers such as QEMM or UMBPCI. I've tried those, and usually end up with several games or programs that refuses to run when those are used. With the above boot, the only game that won't load is Ultima VI (and Serpent Isle which uses the same engine.) That's because U7 doesn't like EMM386 (an most of it's alternatives.) The only upper memory manager I know of that works with it is UMBPCI. It's the only game I have which actually requires a boot disk (no EMM386, CD-Rom Drivers, and I don't load DOSKEY.COM.)

Attachments

  • Filename
    Drivers.zip
    File size
    8.38 KiB
    Downloads
    149 downloads
    File comment
    CDRom & Mouse driver
    File license
    Fair use/fair dealing exception

Feeding Dragon

Reply 4 of 8, by manic232

User metadata
Rank Newbie
Rank
Newbie

Wow that was a reply and a half! Thank you very much for all that very useful information. I'm sure that I can get my games running with your suggestions. I will try what you suggest ASAP (prob not till nest w/e now) and report back to you.

Very many thanks once again for taking the time to write all that.

My System: SuperMicro P6SBA Motherboard, Win98SE, PIII 600Mhz, 256MB Ram, Voodoo 5 5500, SB AWE 64 Gold Sound Card, Roland LAPC-I

Reply 6 of 8, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

I have to make one correction. Since my off system is currently in pieces, I used an archived Config.sys and Autoexec.bat file (from an install CD I built,) and it used an old non-PnP sound blaster card. The new PnP sound blasters had to be initialized with ctcm.exe (it should be in your autoexec.bat,) already. But it doesn't stay resident, so you don't have to load it high or anything. It runs, sets the PnP card, then exits.

Feeding Dragon

Reply 7 of 8, by manic232

User metadata
Rank Newbie
Rank
Newbie

Just thought i'd give some feedback after FeedingDragon's excellent post. Basically,,,, IT WORKS!!

THANK YOU... THANK YOU... THANK YOU...

I am so happy I feel like running and jumping all the way to Central Texas and buying that man a pint! I have never ever managed to figure out how to play The Humans game outside of DosBox before, but your help has made it happen. Not only can I now play The Humans as nature intended I also figured out how to get my LAPC-I card and AWE 64 Gold card working together in DOS by changing the MIDI port address using CTCU.EXE. I just changed it to port 300, DMA 1 and as if by magic it's all working great.

Thank you so much FeedingDragon you have made a DOS gaming geek a very happy man 😀 😀 😀

My System: SuperMicro P6SBA Motherboard, Win98SE, PIII 600Mhz, 256MB Ram, Voodoo 5 5500, SB AWE 64 Gold Sound Card, Roland LAPC-I

Reply 8 of 8, by akiboy

User metadata
Rank Newbie
Rank
Newbie
FeedingDragon wrote on 2014-05-11, 17:20:
In old DOS getting enough memory (usually what's called conventional memory, or the memory below 1mb,) is somewhat involved. If […]
Show full quote

In old DOS getting enough memory (usually what's called conventional memory, or the memory below 1mb,) is somewhat involved. If you are running the right version of DOS, memmaker.exe can go a long way in doing this for you, though it isn't perfect (I usually do it myself manually.) First, the EMM386.EXE line can be tweaked to help out. The basic line (without fancy memory searches and such,) is:

DEVICE=C:\DOS\EMM386.EXE I=B000-B7FF RAM

That sets it up to use EMS (depending on your total RAM could also have XMS available as well.) It also frees up the monochrome graphics section (only used by the MDA cards,) for loading drivers and tsr's in high memory. It seems to max EMS out at 32MB, or it does on my system, which leave me with 32MB of XMS (64MB total at this time.) If you have less memory than that, you can add an EMS value to the line. Below is an example with 8MB set for EMS (don't know of any games that use more.)

DEVICE=C:\DOS\EMM386.EXE I=B000-B7FF 8196 RAM

The amount of RAM you set aside for EMS doesn't effect the conventional memory available, but I've found that some games require a minimal amount of EMS and some require a minimal amount of XMS. In either case, I've never come across any that required more than 8MB of either one. If you have 16MB or more of extended memory, the above value should do just fine.

A few more lines you need in your config.sys files (again this is just with DOS.)

DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH,UMB
FILES=50
LASTDRIVE=I

HIMEM.SYS is needed to access higher memory addresses, the DOS=HIGH,UMB tells DOS that the HIGH and UPPER MEMORY BLOCKS are available and to use them. FILES= just sets the total number of files that can be opened at one time, the system reserves buffer space for each one, so the higher the number the more space it takes. 50, I've found, is a good value. I think I've only come across a couple of DOS games that need that many, and "I" haven't come across any that need more, that I can recall. The LASTDRIVE line is similar, unless your going to network, or do any drive virtualization (through the subst command or the fakecd program,) Set it to the highest drive letter (on a single hard drive system this is usually D: for the CD-Rom drive.) Personally, I take the highest drive letter (F: in my case is the CD-Rom Drive,) and add 3, so my LASTDRIVE line is LASTDRIVE=I. That gives me the option, if I need, to add in some virtualized drive letters.

Now we have to start loading drivers and tsr's high. That is done with 2 commands. In config.sys its done with DEVICEHIGH= and in autoexec.bat it's done with LOADHIGH or LH (either can be used, I used LH because it's shorter and easier to type.) If you are going to use memmaker.exe don't do this yet, just use the default loads and re-boot after making the above changes, make sure all of your drivers and such are loading (CD-Rom driver, mscdex, mouse, etc...) Type memmaker at the prompt and follow the directions. This might be all you need to do.

I've also zipped up a couple of drivers and attached them that might help out. They are available on the net, but I don't know the exact URL off hand. They are very small generic drivers. There might be better ones available, and these might not work with your HW, but they work fine with mine and might help. If you use these drivers, you might be able to just cut and past my Config.sys and autoexec.bat files and skip the memmaker process. It also depends on you having a SoundBlaster 16 (or completely compatible sound card installed.)

My config.sys:

DEVICE=C:\DOS\VMADD386.SYS
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE I=B000-B7FF RAM
DOS=HIGH,UMB
FILES=50
STACKS=9,256
LASTDRIVE=I
DEVICEHIGH=/L:1 C:\DOS\SETVER.EXE
DEVICEHIGH=/L:3 C:\DOS\XGCDROM.SYS /D:MYCD01

My autoexec.bat:

@ECHO OFF
PROMPT $p$g
PATH C:\WINDOWS;C:\DOS
SET TEMP=C:\TEMP
SET SOUND=C:\SB16
SET BLASTER=A220 I5 D1 H5 P330 T6
SET MIDI=SYNTH:1 MAP:E
LH /L:1 C:\DOS\MSCDEX.EXE /D:MYCD01
LH /L:3 C:\DOS\CMOUSE.COM
LH /L:2 C:\DOS\DOSKEY.COM
C:\SB16\DIAGNOSE /S
C:\SB16\MIXERSET /P /Q

The /L: portions of the commands (LH & DEVICEHIGH,) instruct DOS in which UMB to install the driver/tsr. You can use the "mem /d" command to get a list of the blocks and the numbers associated with them (as well as their free spaces.) You will either need to use the /p switch as well, pipe it through the more command, or redirect it to a text file to study though, it results in several pages of information. I prefer the text file, it allows me to scroll back and forth if you have a compatible text viewer, or just use the edit command. The examples are "mem /d /p" tells it to pause after every page of data, "mem /d | more" tells it to pipe the output through the more command which does the same thing, and "mem /d > memd.txt" tells it to put the output in the memd.txt file - followed by (in basic DOS,) "edit memd.txt" to let you read the file with the ability to scroll up and down through the output. This is important because by default DOS loads them in the first available block that has enough space for the load. If none of the blocks has enough space, it loads in conventional memory instead. MSCDEX.EXE is the largest, and on my system block 1 is the only one large enough for it. So, I have to force XGCDROM.SYS to load in a different block with /L:3 or it would load in block one and MSCDEX.EXE would not be able to load high (eating up 25K of conventional memory.)

Also, most programs use up more space during load than they take up after they have finished and are just sitting resident in memory. So, even though they might "fit" in a particular location, they may not load there. For this reason, load order can be important. If you have 2 programs that should fit in a particular block, but the second one to load always loads low instead, try reversing the load order and see if that helps. This is one area that memmaker fails at. It cannot actually "think" and plan things out. About the only advantage memmaker has, is that it has a method of calculating how much space a program needs to load, and not just how much space it takes up after the load is finished.

Also, I have Windows 3.1 installed on my DOS boot, so you might want to remove it from the path command. Check the path command in your current autoexec.bat file and use yours instead. I like having a separate and distinct temp directory as well (the default is to use the C:\DOS directory,) so either change it to match yours, or create a TEMP directory with the "md C:\TEMP" command.

Again, the above sequences assumes a SoundBlaster16, and the BLASTER variable may be different for you. Check your current autoexec.bat file and make the appropriate changes. With my current ROM shadows, this leaves me with 615 K of conventional memory (haven't found a game yet that needs more,) and 4 K of upper memory as the largest blocks free (the important numbers.) The upper memory number isn't really important other than it tells you the largest size of additional drivers or tsr's you can add to your boot before you start taking up conventional memory. If you are using DOS 6+ (I believe,) you could also use the msd command then 'm' (for memory map,) to see if there are other areas you can add to the EMM386 line (with I=) to get more upper memory. But you cannot always trust what it gives you, so be prepared for crashes if you free up other areas.

There are other things you can do to free up space, some fancier than others, some more effective. However, I've found that for the most compatibility many of those are not worth it. Some people swear by drivers such as QEMM or UMBPCI. I've tried those, and usually end up with several games or programs that refuses to run when those are used. With the above boot, the only game that won't load is Ultima VI (and Serpent Isle which uses the same engine.) That's because U7 doesn't like EMM386 (an most of it's alternatives.) The only upper memory manager I know of that works with it is UMBPCI. It's the only game I have which actually requires a boot disk (no EMM386, CD-Rom Drivers, and I don't load DOSKEY.COM.)

I'm not speak english, I'm speak spanish

Woooowwww! It's works! on my laptop pentium II, Compaq Presario 1650 with ES1869 souncard, with MS-DOS 6.22 and Windows 98SE.

The memory problem was with the ms-dos game Darkseed

Thanks!

I'm happy!