Page 1 of 2

Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sat Aug 15, 2020 6:59 pm
by rhester72
OK - seeing folks struggling with the update, particularly with memory management and shared folders, I'm offering a ready-to-go base configuration that will ease most of your pain. If you still remember all your DOS CONFIG.SYS kung-fu, prefer QEMM or FreeDOS, or are Bill Gates, you probably aren't going to learn anything useful here. =)

This configuration is deliberately simplified, using only the misterfs application from github (attached as a zipped floppy image for convenience) and cutemouse (which you can download from http://cutemouse.sourceforge.net/downlo ... se21b4.zip and easily unzip and copy across via misterfs after you've set up the rest - only ctmouse.exe from the bin directory is required). It assumes a recent-ish version of MS-DOS (I tested on 6.22, I think it'll work on 5.0 or higher).

First things first, create a directory on the MiSTer SD card called /media/fat/Games/ao486/shared - I've read it gets auto-created, I can tell you from experience that it doesn't.

After that, edit CONFIG.SYS to read as follows:

Code: Select all

DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM 8192 FRAME=D000 D=256 I=C800-CDFF X=CE00-CFFF I=D000-EFFF
DOS=HIGH,UMB
FILES=30
LASTDRIVE=Z
What this does, in plain English:

- Sets up memory expansion without a lengthy (and pointless) RAM test
- Sets up XMS with 8MB of EMS with proper regions excluded (BIOS, MiSTerFS, etc.)
- Sets up DOS to run in high memory
- Creates 10 more filehandles than default, which many games expect
- Sets the highest-possible DOS drive letter to Z, for ease in changing the drive MiSTerFS maps to (see below) - without this, anything higher than E: will error out!

Next up, AUTOEXEC.BAT:

Code: Select all

@ECHO OFF
LH C:\MISTERFS.EXE E /Q
LH C:\CTMOUSE.EXE /3 /P
This quiet-loads MiSTerFS into upper memory with drive letter E: and loads the mouse driver as a 3-button PS/2 mouse (to avoid autodetection delay). Note both programs are assumed to be in the root of C:\ - if you want them somewhere else, change these lines accordingly. Likewise, if you'd prefer MiSTerFS on a drive letter other than E:, change that letter to something else.

Unzip and mount the misterfs floppy image, copy misterfs.exe to C:\, and reboot. You'll get an error about ctmouse not loading because you haven't installed it yet, that's OK. Check the E: drive and make sure when you get a directory listing it shows the volume name as MiSTer...if it does, you're golden.

Now grab ctmouse, put it in the shared folder, then copy it from E:\ to C:\ and reboot one last time for mouse support.

You now have XMS, EMS, MiSTerFS, a mouse driver, and 618K of free conventional memory - congratulations!

(If you want to get even crazier, you can have 115KB of UMBs in total by taking over monochrome display RAM...add I=B000-B7FF to the EMM386 line, but be warned that if anything you run tries to open a true monochrome screen, you will crash!)

The usual tuning (adding more autoload things to AUTOEXEC.BAT, temporarily commenting things out when not needed to get even more conventional back, etc.) applies, there's no getting away from that, but at least this is a very solid generic does-it-all configuration starting point that hopefully eliminates a bit of confusion.

Old hands will no doubt complain that there should be an alternate NOEMS option for EMM386 that provides only XMS and gives back more conventional (you're right, and it looks like DEVICE=C:\DOS\EMM386.EXE NOEMS I=C800-CDFF X=CE00-CFFF I=D000-EFFF), and will remember that when loading executables into UMB, it's always best to load them from largest to smallest to minimize fragmentation and give the most possible opportunity for things to still have a slot to load into.

It also doesn't take into account things like MIDI...there are already huge volumes of discussion on that topic and how to go about it depends very much on what you're trying to accomplish. This wasn't intended as a do-everything-and-the-kitchen-sink solution, just a vetted starting point for further configuration adventures.

DOS was an art, not a science, kids. Some experimentation is invariably required. Be safe out there! :)

EDIT: Changed include/exclude ranges to give more free UMBs by narrowing the protected range thanks to Sorg's input, moved frame page from E000 to D000 for neatness in layout, mentioned monochrome range.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sat Aug 15, 2020 7:24 pm
by akeley
Nice, thanks, will start with that when I finally get around to trying this core. I used to do this for a living but it was a long time ago and was since then replaced by other data in my memory banks :)

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sat Aug 15, 2020 9:32 pm
by bry111
Thanks for this! :) Especially the part about EMM386, I never would have guessed the right options for excluding regions, and other instructions I've seen reference QEMM.

Consider adding /3 to the CTMOUSE line to add 3-button mouse support (clicking the wheel on modern mice maps to button 3). I had a 3-button mouse back in the day though now that I think about it I don't remember any software that actually used the third button... so maybe consider not adding it. EDIT: Duke 3D supports the third button. Though Duke 3D doesn't run very well even with the recent incredible performance improvements to the core, not that it ran well on a low-spec 486 either. Seems crashier than I remember. But I digress...

Consider adding the following to AUTOEXEC.BAT so you can see where you are at the command line, though I forget if it's the default in some (all?) versions of DOS:

Code: Select all

PROMPT $p$g
I'd also add a BLASTER environment variable to AUTOEXEC.BAT so at least some games can auto-detect sound settings. If you haven't set up any fancy midi stuff, the basic line for MiSTer is:

Code: Select all

SET BLASTER=A220 I5 D1 T3
or at least, I think T3 is right for MiSTer's SoundBlaster 2.0. EDIT: what I put above is no longer correct now that MiSTer implements a SoundBlaster 16.

I'm hesitant to suggest any fancy midi settings because I haven't gotten it to work well yet. But I wouldn't worry too much about it unless Adlib/SB OPL2/3 FM synth makes your skin crawl. FM synth is a lot more typical of what most people had back in the day, I don't think many (any?) games would assume you have either an MT-32 or a general midi card. Though it might be nice to approximate what was too expensive back then...

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 6:36 am
by Cebion
Also check out Enhanced doskey for features like autocomplete

http://paulhoule.com/doskey/

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 11:05 am
by NightShadowPT
Cebion wrote: Sun Aug 16, 2020 6:36 am Also check out Enhanced doskey for features like autocomplete

http://paulhoule.com/doskey/
Been exploring DOSKEY to create Macros to make my life easier, but I cannot find a way to disable the ECHO, so all the commands are always displayed twice, the one I keyed in, and then the one being run by the macro.

Is there a way to disable the echo?

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 11:14 am
by breiztiger
in batch you can put @ before each line or @echo off at begin of file

edit : not relevant, sorry it's when you execute your macro you have first line command and second line result

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 11:41 am
by Cebion
For german Keyboard and country specific settings you can add following lines

config.sys
COUNTRY=049,,C:\DOS\COUNTRY.SYS

autoexec.bat

KEYB GR,,C:\DOS\KEYBOARD.SYS


Edit:

Also to be noted you may get problems with the above configs with 16 mb instead of 256 mb of ram

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 3:13 pm
by Fallon
Amazing guide, thanks!

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 4:48 pm
by jrronimo
This is a really fantastic thread and guide for people new to DOS or who need a refresher. Thanks for putting it together rhester72!

Another "Ease of Use" utility is MaxDir: https://www.c-shore.com/maxdir/, a fantastic continuation of HotDir.

Stick the contents in your DOS directory (or put them in their own directory and add it to the PATH command in your autoexec.bat) and start using "di" instead of "dir". The triple columns and color coding of your files and directories will change your life.

FWIW, you can change some settings using mcfg. I prefer to have all files always be uppercase and for it to sort files by Name first, Extension second, but everyone prefers their own thing.

I loved hotdir so much as a kid that I now write custom color strings for *nix machines that I use to give the same colored output from ls, haha.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 7:39 pm
by Caldor
Btw. Sorgelig posted this in the thread about floppy drives and QEMM:
Sorgelig wrote: Sun Aug 16, 2020 6:14 pm X=CE00-CFFF is enough actually for MiSTer
I can also recommend using "AUTO" instead off EMS RAM. Making it like:

Code: Select all

DEVICE=C:\DOS\EMM386.EXE AUTO RAM FRAME=E000 D=256 X=CE00-C7FF I=D000-EFFF
This adds the maxium amount of EMS memory, which is 32mb if you have enabled 256mb RAM, and it seems to help free up some more conventional memory. X should exclude the area needed for MiSTerFS and possibly other MiSTer stuff as well.

Next step is to have everything else use DEVICEHIGH and load everything with LH / LOADHIGH in Autoexec.bat. That should free up a good amount of conventional memory for DOS programs and games. I have 620kb free after loading mouse, 4DOS, SmartDRV and some midi and soundblaster stuff... that I am not even sure is needed.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Aug 16, 2020 7:42 pm
by Caldor
NightShadowPT wrote: Sun Aug 16, 2020 11:05 am
Cebion wrote: Sun Aug 16, 2020 6:36 am Also check out Enhanced doskey for features like autocomplete

http://paulhoule.com/doskey/
Been exploring DOSKEY to create Macros to make my life easier, but I cannot find a way to disable the ECHO, so all the commands are always displayed twice, the one I keyed in, and then the one being run by the macro.

Is there a way to disable the echo?
Like
@ECHO OFF
Or is that not what you are looking for? That disables echo lines, and everything else, except the output from echo commands.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 12:49 am
by NightShadowPT
Caldor wrote: Sun Aug 16, 2020 7:42 pm Like
@ECHO OFF
Or is that not what you are looking for? That disables echo lines, and everything else, except the output from echo commands.
Unfortunately It does not work with DOSKEY.

Run this:

Code: Select all

DOSKEY DUR=DIR /W
DUR
See how the command shows twice.

That's my issue :)

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 1:07 am
by Caldor
NightShadowPT wrote: Mon Aug 17, 2020 12:49 am
Caldor wrote: Sun Aug 16, 2020 7:42 pm Like
@ECHO OFF
Or is that not what you are looking for? That disables echo lines, and everything else, except the output from echo commands.
Unfortunately It does not work with DOSKEY.

Run this:

Code: Select all

DOSKEY DUR=DIR /W
DUR
See how the command shows twice.

That's my issue :)
Not sure what you mean. I load DOSkey into memory, but you seem to be trying to add extra DOSkey specific commands? You know you can just make dir work like that by default? With the /W setting that is. Even without DOSKey. I mainly use DOSkey for autocompletion and remembering commands I used previously.

But it has not stopped me from using ECHO OFF.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 3:43 am
by rhester72
Caldor wrote: Sun Aug 16, 2020 7:39 pm Btw. Sorgelig posted this in the thread about floppy drives and QEMM:
Sorgelig wrote: Sun Aug 16, 2020 6:14 pm X=CE00-CFFF is enough actually for MiSTer
I can also recommend using "AUTO" instead off EMS RAM. Making it like:

Code: Select all

DEVICE=C:\DOS\EMM386.EXE AUTO RAM FRAME=E000 D=256 X=CE00-C7FF I=D000-EFFF
This adds the maxium amount of EMS memory, which is 32mb if you have enabled 256mb RAM, and it seems to help free up some more conventional memory. X should exclude the area needed for MiSTerFS and possibly other MiSTer stuff as well.

Next step is to have everything else use DEVICEHIGH and load everything with LH / LOADHIGH in Autoexec.bat. That should free up a good amount of conventional memory for DOS programs and games. I have 620kb free after loading mouse, 4DOS, SmartDRV and some midi and soundblaster stuff... that I am not even sure is needed.
I saw Sorg's comment - will update the original post to take that into consideration (you absolutely can get back some additional UMBs that way, but the line above doesn't reflect that).

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 5:11 am
by Caldor
I have been experimenting some more and it seems that X parameter does not work with EMM386. I think it then ends up being ignored, but then it works with MiSTerFS and it wont work when I change it to X=A000-C7FF

I never really understood what these settings are for. Pretty sure I never used them back in the DOS days, I just loaded EMM386 with EMS or AUTO and no special parameters like FRAME, D, X or I. From what I can understand it specifies the memory allocations in a more specific / exact way than if you just run it without them?

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 9:30 am
by Solskogen
@rhester72
You might want to add how to install Sound Blaster drivers to your guide :-)

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 11:56 am
by rhester72
Solskogen wrote: Mon Aug 17, 2020 9:30 am @rhester72
You might want to add how to install Sound Blaster drivers to your guide :-)
Which drivers are you referring to, specifically? I'm not aware of any 'drivers' as such, just the BLASTER line (which a lot of games ignore so I haven't bothered).

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 12:03 pm
by rhester72
Caldor wrote: Mon Aug 17, 2020 5:11 am I have been experimenting some more and it seems that X parameter does not work with EMM386. I think it then ends up being ignored, but then it works with MiSTerFS and it wont work when I change it to X=A000-C7FF

I never really understood what these settings are for. Pretty sure I never used them back in the DOS days, I just loaded EMM386 with EMS or AUTO and no special parameters like FRAME, D, X or I. From what I can understand it specifies the memory allocations in a more specific / exact way than if you just run it without them?
It definitely works - MiSTerFS couldn't work without them. :) What's the specific configuration you're trying to use?

There's a pretty detailed guide at https://www.cubic.org/docs/configuring.htm#config.sys if you want to get down-and-dirty with the exclusion tables. A decent writeup on EMS and frames can be found on Wikipedia at https://en.wikipedia.org/wiki/Expanded_memory (it's just the memory location that EMS is page-swapped into, one 64KB frame at a time), and D is how many bytes to reserve for DMA (increases performance, default is 32 - see http://info.wsisiz.edu.pl/~bse26236/bat ... MM386S.HTM for details on each of the options.

In most cases, you're right, it's just a more precise description of your memory layout - MiSTer requires them for proper exclusion of the MiSTerFS memory mapper and because a default frame location cannot be autodetected.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 12:56 pm
by Caldor
Ahh, good to know. Yeah... I found that the invalid parameter error I am getting is one I have to live with, as it does seem to do what it is supposed to do.

I tried removing the X and that also stops MiSTerFS from working. Maybe I can change it to X=A000-C7FF again and it wont see it as an invalid parameter.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 2:33 pm
by NightShadowPT
Caldor wrote: Mon Aug 17, 2020 1:07 am
Not sure what you mean. I load DOSkey into memory, but you seem to be trying to add extra DOSkey specific commands? You know you can just make dir work like that by default? With the /W setting that is. Even without DOSKey. I mainly use DOSkey for autocompletion and remembering commands I used previously.

But it has not stopped me from using ECHO OFF.
To be clear:

DOSKEY alows you to create Macros, including a sequence of commands. To give you another example, you can create a command to create a directory and enter it in one fell swoop:

DOSKEY MCD=MD $1$TCD $1

What I am trying to avoid is that these commands show up on screen, just like when you use the ECHO OFF command on a batch file. Unfortunately, I have not been able to use the ECHO command in the macros, hence my question.

Hope this clarifies it ;)

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 3:43 pm
by pgimeno
Maybe try with 4DOS. Its command history handling is epic.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 3:58 pm
by chimaera
You can use aliases in 4DOS, its great. I use it with ANSIPLUS to get more text on screen.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Aug 17, 2020 4:18 pm
by Caldor
NightShadowPT wrote: Mon Aug 17, 2020 2:33 pm
Caldor wrote: Mon Aug 17, 2020 1:07 am
Not sure what you mean. I load DOSkey into memory, but you seem to be trying to add extra DOSkey specific commands? You know you can just make dir work like that by default? With the /W setting that is. Even without DOSKey. I mainly use DOSkey for autocompletion and remembering commands I used previously.

But it has not stopped me from using ECHO OFF.
To be clear:

DOSKEY alows you to create Macros, including a sequence of commands. To give you another example, you can create a command to create a directory and enter it in one fell swoop:

DOSKEY MCD=MD $1$TCD $1

What I am trying to avoid is that these commands show up on screen, just like when you use the ECHO OFF command on a batch file. Unfortunately, I have not been able to use the ECHO command in the macros, hence my question.

Hope this clarifies it ;)
Cant you just make some BAT files instead? Seems like a much better solution than having to write a bunch of macros to store in memory, and I am guessing its much easier to keep track off bat files in a folder that is added to the path. For all I know 4DOS is meant to work this way.

Are you using the latest version of 4DOS? Its open source now so there might be a newer version that fixes this.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sat Mar 12, 2022 7:05 pm
by Shogun
Sorry to bump this old thread but I came across it while trying to get misterfs to autoload across all my configs (including expanded mem). Using the following in config.sys that was posted above results in misterfs working:

Code: Select all

DEVICE=C:\DOS\EMM386.EXE RAM 8192 FRAME=D000 D=256 I=C800-CDFF X=CE00-CFFF I=D000-EFFF
However as was previously stated it results in an invalid parameter error. Its not a big deal because expanded memory isn't used as often as extended and you just hit a key and DOS continues loading. I was just curious if anyone came across a fix for the error or knows why this happens?

It looks like the ao486 exclusion specifically causes the error - X=CE00-CFFF.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Mar 13, 2022 12:50 pm
by user7182
Shogun wrote: Sat Mar 12, 2022 7:05 pm Sorry to bump this old thread but I came across it while trying to get misterfs to autoload across all my configs (including expanded mem). Using the following in config.sys that was posted above results in misterfs working:

Code: Select all

DEVICE=C:\DOS\EMM386.EXE RAM 8192 FRAME=D000 D=256 I=C800-CDFF X=CE00-CFFF I=D000-EFFF
However as was previously stated it results in an invalid parameter error. Its not a big deal because expanded memory isn't used as often as extended and you just hit a key and DOS continues loading. I was just curious if anyone came across a fix for the error or knows why this happens?

It looks like the ao486 exclusion specifically causes the error - X=CE00-CFFF.
I'd double check there isn't a typo in your config.sys. I typed this into my config.sys in a MS-DOS 6.22 environment and initially got the invalid parameter issue. But I realized I had a typo (I wrote X=CE00-CFF instead), and after fixing the typo I don't see an invalid parameter error.

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Sun Mar 13, 2022 10:14 pm
by Shogun
Can you copy paste your device line here? I don't have any typos that I can see. I think the error is because of a syntax issue here. I'm not well versed but if I used FRAME=D000 doesn't that mean it won't be looking at the CE00-CFFF range anyway? What I have that throws the invalid parameter error is below:

Code: Select all

DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM 8192 FRAME=D000 D=256 I=C800-CDFF X=CE00-CFFF I=D000-EFFF
DEVICEHIGH=C:\DRIVERS\VIDECDD.SYS /D:OPTICAL

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Mar 14, 2022 12:33 am
by user7182
This is copy and pasted:

Code: Select all

DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM 8192 FRAME=D000 D=256 I=C800-CDFF X=CE00-CFFF I=D000-EFFF
FILES=10
BUFFERS=10
DOS=HIGH,UMB
LASTDRIVE=Z

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Mon Mar 14, 2022 6:39 pm
by Shogun
Weird we have pretty much the same setting. I'm at a loss because I have beginner's grasp on these settings but it doesn't really seem to hurt anything.

366P5we.png
366P5we.png (15.04 KiB) Viewed 3624 times
ohfkj02.png
ohfkj02.png (15.91 KiB) Viewed 3624 times
a6Usite.png
a6Usite.png (26.89 KiB) Viewed 3624 times

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Tue Mar 15, 2022 2:01 pm
by held
rhester72 wrote: Sat Aug 15, 2020 6:59 pm First things first, create a directory on the MiSTer SD card called /media/fat/Games/ao486/shared - I've read it gets auto-created, I can tell you from experience that it doesn't.
Not by the installer or the core, I think its the misterfs.exe that creates that folder

Re: Starting-point DOS configuration for ao486 and all features (instructional)

Posted: Tue Mar 15, 2022 8:23 pm
by Shogun
Interesting I managed to find a workaround with the invalid parameter error by using the line from Flynn's top 300 pack (https://github.com/flynnsbit/Top300_upd ... NFIG16.EMM) and this works but throws another perplexing error.

Code: Select all

DEVICEHIGH=C:\DOS\EMM386.EXE AUTO 32768 RAM FRAME=D000 D=64 X=C000-CFFF I=B000-B7FF I=D000-EFFF
Results in expanded memory working a bit better without the error from before but now it appears it can only see 15mb instead of the specified 32mb.

Guu4f2Z.png
Guu4f2Z.png (16.76 KiB) Viewed 3623 times