2009-09-05: Adjustable "files" setting in DOSBox

Posted at 2009-09-05 17:57:08 by SHD

In the time of DOS, the operating system severely limited how many files could be open simultaneously. The default amount was a ridiculously low of 8 open files, so most people made use of the system's ability to customise the limit by adding a setting to config.sys. A common (and sensible) value was "files=20".

DOSBox does an excellent job of emulating a DOS PC, including some of its quirks. DOSBox' default limit is at a generous 127 files open at any one time. Unfortunately, thu only way to change this limit is by altering the DOSBox source code and doing your own build. The default of 127 is more than enough for all but the most extreme cases. Such cases do exist, but when a program complains about "insufficient files" it is more commonly an indication of something being wrong with that particular program/installation or even a bug in DOSBox itself.

To be able to determine what the problem may be, I hereby present a simple patch that makes the files limit configurable through the configuration file. The patch file as well as a pre-built binary for MS Windows can be downloaded below.

The setting can be adjusted by adding a line such as "files=200" to the [dos] section of the configuration file. Be sure to use values in the range of 128..255 only. Anything below the default of 127 would be useless. Anything below 20 would be silly. A value of 0 or fewer would be stupid and anything above 255 can potentially cause data corruption, so don't even try.

If you're interested in trying this out, you can download either the source code patch or the pre-built binary for Windows.

Tags:

Comments

It helped that patch when dealing with running DOS program "Process Control" written in Clarion 2.1. The problem was that:
1. When you run the program loads into memory at the same time more than 130 files
2. To generate a report program lacked the lower DOS memory.

Original DOSBOX decided the second issue, but this patch is decided first.

Posted at 2009-09-08 07:49:53 by puzdir

Post a comment

Note: HTML is not permitted, URLs will be linked automatically. Spam comments will result in a permanent ban.
Type these 4 symbols into the edit field