VOGONS


First post, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

Hi all Ive been looking at my Dos book and an advanced boot disk that has options for things like booting up with EMS on or off or CDrom on or off and I did what I could and got it half working but when I select the option for the EMS it does that right but skips the options for which mouse program, here is what I have im using Dos 6.2 for the boot up options

Config.sys

[MENU]
menuitem=EMS, Start PC With EMS Ram.
menuitem=NOEMS, Start PC Without EMS Ram.

[COMMON]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF

[EMS]
DEVICE=C:\DOS\EMM386.EXE RAM AUTO HIGHSCAN I=B000-B7FF

[NOEMS]
DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF

[COMMON]
DEVICE=C:\CTCM\CTCM.EXE
DOS=HIGH,UMB
DEVICEHIGH=C:\CDROM\oakcdrom.sys /D:mscd001
FILES=80
BUFFERS=60

[MENU]
menuitem=MOU1, Start PC With Mouse.com
menuitem=MOU2, Start PC With BBBMouse.com

[MOU1]
[MOU2]

Autoexec.bat

Soundblaster settings as normal
PROMPT $P$G
SET PATH=C:\DOS;C:\MOUSE;C:\CDROM
SET TEMP=C:\DOS
LH C:\CDROM\MSCDEX.EXE /D:mscd001 /L:D

if %CONFIG% == MOU1 LH C:\MOUSE\MOUSE.COM
goto end

if %CONFIG% == MOU2 LH C:\MOUSE\BBBMOUSE.COM
goto end

:END

Im not very savy with programming but all help will be appreciated.

Reply 3 of 21, by konc

User metadata
Rank l33t
Rank
l33t

Exactly, ditch the IF from autoexec and use labels.
For what you're asking the common approach was to create 4 different menuitems. ems+mouse1, ems+mouse2, noems+mouse1, noems+mouse2

Reply 5 of 21, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

I have two mouse versions because one works well with all my games except one and thats for the game Kings Quest I dont remember at the moment which one, I was basing all this off of an advanced boot disk I downloaded that has the ability to choose an option from a list then more options from another list until it got to the end of options I was hoping someone could type out how to do this as I dont know what a Label is as my programming skills are at a minimum. I can make and use 4 menuitems like what konc said but I would like the way of a nice clean option 1 of 2 then option 2 of 2 type.

Reply 6 of 21, by konc

User metadata
Rank l33t
Rank
l33t

You're over-complicating things and introduce more keystrokes/time for every boot. We didn't use to do this back in the days for a reason. But anyway it's your call of course, find below the basic structure you need to accomplish it:

config.sys

[MENU]
SUBMENU=EMS
SUBMENU=NOEMS

[EMS]
MENUITEM=MOUSE1
MENUITEM=MOUSE2

[NOEMS]
MENUITEM=MOUSE1
MENUITEM=MOUSE2

[MOUSE1]
[MOUSE2]

autoexec.bat

GOTO %CONFIG%

:MOUSE1
load mouse driver1
GOTO EXIT

:MOUSE2
load mouse driver2
GOTO EXIT

:EXIT

Since you're already familiar with the [COMMON] block in config.sys and the use of labels in batch files is demonstrated, you should be able now to tweak it to your needs.
But do you see the trade-off for such a menu? In autoexec you end up only with the final selection. In your rather simple case it doesn't really pose a problem, but imagine having to deal with different autoexec lines for the initial [EMS] / [NOEMS] choice 😉

Reply 7 of 21, by tpowell.ca

User metadata
Rank Member
Rank
Member

I had a similar situation where I needed more control over options from my config.sys file.
Like, say you also use the boot menu to run things like softMPU which only works if EMM386 is loaded, or conversely MXK6OPT which can only run if it isn't.

You can use SET xxx=yyy as early as config.sys in the boot process.

Not the greatest example, but once you start adding a CD-ROM, EMS, noEMS, XMS, Windows98 (boot to gui disabled) to the list of possibilities, managing your autoexec can get very messy.
Especially when some drivers are dependent on some of the conditions above.

So you can have something like this:

Config.sys

[MENU]
menuitem=EMS, Start PC With EMS Ram.
menuitem=NOEMS, Start PC Without EMS Ram.
menuitem=XMS, Start PC With XMS Ram.

[COMMON]

[EMS]
SET MEM=EMS
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM AUTO HIGHSCAN I=B000-B7FF

[NOEMS]
SET MEM=EMS
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF

[XMS]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
SET MEM=XMS

Autoexec.bat

Soundblaster settings as normal
PROMPT $P$G
SET PATH=C:\DOS;C:\MOUSE;C:\CDROM
SET TEMP=C:\DOS
LH C:\CDROM\MSCDEX.EXE /D:mscd001 /L:D

if %MEM% == XMS c:\k6\mxk6opt.exe
if NOT %MEM% == XMS LH C:\MIDI\softMPU.exe

:END

  • Merlin: MS-4144, AMD5x86-160 32MB, 16GB CF, ZIP100, Orpheus, GUS, S3 VirgeGX 2MB
    Tesla: GA-6BXC, VIA C3 Ezra-T, 256MB, 120GB SATA, YMF744, GUSpnp, Quadro2
    Newton: K6XV3+/66, AMD K6-III+500, 256MB, 32GB SSD, AWE32, Voodoo3

Reply 9 of 21, by tpowell.ca

User metadata
Rank Member
Rank
Member
derSammler wrote:

Completely pointless, as %config% contains the name of the selected menu item automatically.

I thought so too initially but could not find a clean way of managing the wide range of different configurations I had.

How would you handle different configs such as:
- Conventional memory
- XMS
- EMM386 noems
- EMM386
- CD-ROM with any of the above
- Windows98

In autoexec:
Only load a mouse driver if not conventional memory only.
Only load the CD-ROM driver if one of the four CD-ROM configs was selected.
Only load the setmul (K6+ multiplier utility) if NOT using any form of EMM386 or loading windows.
Only load softMPU if EMM386 or EMM386 noems is loaded.
...

I found no way to do the above and still have a clean autoexec.bat file without using the extra environment variables.

  • Merlin: MS-4144, AMD5x86-160 32MB, 16GB CF, ZIP100, Orpheus, GUS, S3 VirgeGX 2MB
    Tesla: GA-6BXC, VIA C3 Ezra-T, 256MB, 120GB SATA, YMF744, GUSpnp, Quadro2
    Newton: K6XV3+/66, AMD K6-III+500, 256MB, 32GB SSD, AWE32, Voodoo3

Reply 10 of 21, by konc

User metadata
Rank l33t
Rank
l33t

@tpowell.ca, derSammler is right. What you're doing is pointless. You can just use the labels in autoexec as it is expected and documented. Let's examine one of your requirements: "Only load softMPU if EMM386 or EMM386 noems is loaded."

GOTO %CONFIG%
:EMS
LH C:\MIDI\softMPU.exe
GOTO EXIT
:NOEMS
LH C:\MIDI\softMPU.exe
GOTO EXIT
:XMS
GOTO EXIT
:EXIT

You might argue that I'm duplicating lines and you're keeping autoexec clean, but I doubt IFs make it cleaner. Plus the wasted environmental variables space. Anyway, of course what you did works fine, I'm only showing the intended way and that SETs aren't necessary.

Reply 11 of 21, by dr_st

User metadata
Rank l33t
Rank
l33t

In general, Config.sys boot options is one of these things where I found that people mess way too much with them. It seems that people get into the mindset that if a feature exists, then it must be good for something and so should be used gratuitously.

I used to do this myself, and then I found out that 99% of games/apps will run with a single rounded configuration, which includes HIMEM, EMM, CDROM, mouse and audio drivers.

The esoteric thing that does not run with EMM386 - can be solved by putting just a single extra option that does not load EMM386. Optionally, if you still need the other drivers and lots of conventional memory, you can try use UMBPCI in that case. Apparently I never needed to run such games/utilities, so I didn't even need this second configuration option.

Even if you do, a lot of times you will find that in such an environment you don't need any extra drivers, so you can just reboot (which you need to do anyways to select a different configuration), and hit F5 to skip startup files altogether, and there you go - the barest, purest DOS environment.

You may think something like - I want this config to load the SETMUL automatically, and that config to load WIN automatically, so I suddenly need 10 more options... Horseshit. For the 1 game out of 100 that requires SETMUL, just load it before you start the game. When you need to run Windows, just type WIN and be done with it. ASOASF.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 12 of 21, by tpowell.ca

User metadata
Rank Member
Rank
Member
dr_st wrote:
In general, Config.sys boot options is one of these things where I found that people mess way too much with them. It seems that […]
Show full quote

In general, Config.sys boot options is one of these things where I found that people mess way too much with them. It seems that people get into the mindset that if a feature exists, then it must be good for something and so should be used gratuitously.

I used to do this myself, and then I found out that 99% of games/apps will run with a single rounded configuration, which includes HIMEM, EMM, CDROM, mouse and audio drivers.

The esoteric thing that does not run with EMM386 - can be solved by putting just a single extra option that does not load EMM386. Optionally, if you still need the other drivers and lots of conventional memory, you can try use UMBPCI in that case. Apparently I never needed to run such games/utilities, so I didn't even need this second configuration option.

Even if you do, a lot of times you will find that in such an environment you don't need any extra drivers, so you can just reboot (which you need to do anyways to select a different configuration), and hit F5 to skip startup files altogether, and there you go - the barest, purest DOS environment.

You may think something like - I want this config to load the SETMUL automatically, and that config to load WIN automatically, so I suddenly need 10 more options... Horseshit. For the 1 game out of 100 that requires SETMUL, just load it before you start the game. When you need to run Windows, just type WIN and be done with it. ASOASF.

When you mix DOS4GW (or other DOS extenders) games with older games that require stupid amounts of conventional memory with EMS, some using a mouse and others not...
And using F5 isn't an option since you lose all the environment setup from autoexec.bat, unless you run it manually after.
Also, I'm using literally 2 environment variables (CD and MEM). Now everything works, and my autoexec.bat is easy to maintain. One entry for each of the options.

To each their own, but I wish it were true for the array of games I play.

  • Merlin: MS-4144, AMD5x86-160 32MB, 16GB CF, ZIP100, Orpheus, GUS, S3 VirgeGX 2MB
    Tesla: GA-6BXC, VIA C3 Ezra-T, 256MB, 120GB SATA, YMF744, GUSpnp, Quadro2
    Newton: K6XV3+/66, AMD K6-III+500, 256MB, 32GB SSD, AWE32, Voodoo3

Reply 13 of 21, by dr_st

User metadata
Rank l33t
Rank
l33t
tpowell.ca wrote:

When you mix DOS4GW (or other DOS extenders) games with older games that require stupid amounts of conventional memory with EMS, some using a mouse and others not...

You are envisioning problems that are not actual problems.

My single config gives me XMS, EMS, mouse, CDROM, audio and SMARTDRV (+DOSKey, a personal favorite of mine), with 621KB of free conventional memory (624KB if IFSHLP/DBLBUFF are excluded). That's literally the highest amount you can get; no game requires more than that. It also uses rather conservative EMM386 switches, which very few games conflict with. I don't remember the last time I had a game that conflicted, but they do exist.

For the others, you would typically be fine with a similar config excluding EMM386 (and if it's also a game that requires 'stupid amount of conventional memory', which is an even less common scenario, use UMBPCI to enable upper memory without EMM386). Nothing even remotely sane conflicts with the presence of a mouse driver or a CDROM driver. You would be fine with just two options.

tpowell.ca wrote:

And using F5 isn't an option since you lose all the environment setup from autoexec.bat, unless you run it manually after.

I agree with you, but if your workflow has only 1-2 rare cases that don't work with the standard config, it may be a simple workaround.

tpowell.ca wrote:

Also, I'm using literally 2 environment variables (CD and MEM). Now everything works, and my autoexec.bat is easy to maintain. One entry for each of the options.

To each their own, but I wish it were true for the array of games I play.

True, to each his own, but as was pointed out to you, just using %CONFIG% with no auxiliary variables can cover all your options.

Last edited by dr_st on 2018-02-13, 21:44. Edited 1 time in total.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 14 of 21, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

You can also add MENUDEAULT to your [MENU] section to setup timeout so that you don't have to select an option manually each time.

[MENU]
...
MENUDEFAULT=YOUR_BEST_OPTION,3

and, if I remember correctly, it is possible to have SUBMENU=MENU as a way to go back to the main menu from a submenu.

Reply 15 of 21, by konc

User metadata
Rank l33t
Rank
l33t

@dr_st, I agree with every word you wrote. Including the horseshit thing.
Guys that's an actual/practical/realistic approach. Back in the days no one ever had 10 different configs resulting in +- a few KBs of conventional memory, as if anything ever required it.

Reply 16 of 21, by tpowell.ca

User metadata
Rank Member
Rank
Member
dr_st wrote:
tpowell.ca wrote:

My single config gives me XMS, EMS, mouse, CDROM and audio (+DOSKey, a personal favorite of mine), with 621KB of free conventional memory (624KB if IFSHLP/DBLBUFF are excluded).

How did you get that much free memory with MSCDEX loaded?
As for cases where EMM386 is an issue is when I need to be able to use MXK6OPT on my K6-III+ to run newer DOS games (improves video throughput massively) or some old DOS demos.

  • Merlin: MS-4144, AMD5x86-160 32MB, 16GB CF, ZIP100, Orpheus, GUS, S3 VirgeGX 2MB
    Tesla: GA-6BXC, VIA C3 Ezra-T, 256MB, 120GB SATA, YMF744, GUSpnp, Quadro2
    Newton: K6XV3+/66, AMD K6-III+500, 256MB, 32GB SSD, AWE32, Voodoo3

Reply 17 of 21, by dr_st

User metadata
Rank l33t
Rank
l33t
tpowell.ca wrote:

How did you get that much free memory with MSCDEX loaded?

I posted my startup files here before. Check Re: Autoexec.bat & Config.sys Help

Wow, almost forgot it includes SMARTDRV too. Yes, that's very important.

tpowell.ca wrote:

As for cases where EMM386 is an issue is when I need to be able to use MXK6OPT on my K6-III+ to run newer DOS games (improves video throughput massively) or some old DOS demos.

I never used MXK6OPT myself, but I acknowledged that EMM386 can be an issue that justifies a config.sys menu option without it.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 18 of 21, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

Azarien was right I found a good way to make a menu after a menu and I used GOTO %CONFIG% in the Autoexec.bat see below:

Autoexec.bat

PROMPT $p$g
SET PATH=C:\DOS;C:\MOUSE;C:\CDROM
SET TEMP=C:\DOS
LH C:\CDROM\MSCDEX.EXE /D:mscd001 /L:D

GOTO %CONFIG%

:1MOUSE
LH C:\MOUSE\MOUSE.COM
goto end

:1BMOUSE
LH C:\MOUSE\BBBMOUSE.COM
goto end

:2MOUSE
LH C:\MOUSE\MOUSE.COM
goto end

:2BMOUSE
LH C:\MOUSE\BBBMOUSE.COM
goto end

:end

Config.sys

[MENU]
submenu=EMS, Start PC With EMS Ram.
submenu=NOEMS, Start PC Without EMS Ram.

[EMS]
menuitem=1MOUSE, Start PC With Mouse.Com
menuitem=1BMOUSE, Start PC With BBBMouse.Com

[1MOUSE]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM AUTO HIGHSCAN I=B000-B7FF
DEVICE=C:\CTCM\CTCM.EXE
DOS=HIGH,UMB
DEVICEHIGH=C:\CDROM\oakcdrom.sys /D:mscd001
FILES=80
BUFFERS=60

[1BMOUSE]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM AUTO HIGHSCAN I=B000-B7FF
DEVICE=C:\CTCM\CTCM.EXE
DOS=HIGH,UMB
DEVICEHIGH=C:\CDROM\oakcdrom.sys /D:mscd001
FILES=80
BUFFERS=60

[NOEMS]
menuitem=2MOUSE, Start PC With Mouse.Com
menuitem=2BMOUSE, Start PC With BBBMouse.Com

[2MOUSE]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF
DEVICE=C:\CTCM\CTCM.EXE
DOS=HIGH,UMB
DEVICEHIGH=C:\CDROM\oakcdrom.sys /D:mscd001
FILES=80
BUFFERS=60

[2BMOUSE]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF
DEVICE=C:\CTCM\CTCM.EXE
DOS=HIGH,UMB
DEVICEHIGH=C:\CDROM\oakcdrom.sys /D:mscd001
FILES=80
BUFFERS=60

[COMMON]

Reply 19 of 21, by dr_st

User metadata
Rank l33t
Rank
l33t

Yep, that's much more elegant.

But why don't you just use CuteMouse like everyone else? It's likely you will not need the different mouse driver configs.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys