SScorpio wrote on 2024-03-30, 14:29:
Exploit wrote on 2024-03-30, 03:01:
Things like this need to be solved with a boot menu. I had a boot menu with about 5-6 entries where I could cover all cases (with and without XMS, EMS, CD-ROM, Win3.1, etc.).
The problem with a boot menu is that you're forced to make a choice on start, and you could pick a game that will require you to reboot and make a different choice to then be able to run it. If you're happy with that it's fine, but you can automate it further.
You can theoretically automate it, like you described, but it's not a good idea, because of the following reasons:
1. Sometimes a user might think "Oh, I have to reboot for this game, this takes to much time now. I don't feel like doing that now. I'd rather play something else instead."
In such a case, it is better to give the user the choice to change their mind if the configured and currently loaded memory configuration does not suit the game.
For this reason, after running the batch file, it is better to simply inform the user that the game requires a specific memory configuration and exit if the memory configuration does not fit. The easiest way to test a specific memory configuration is to create an environment variable in AUTOEXEC.BAT that persists in memory and then test it.
2. In addition the other reason against such automation is flash memory. Some users of old computers now use modern flash memory as a hard drive replacement and the flash memory will not like this if you regularly change the AUTOEXEC.BAT and CONFIG.SYS files and file allocation table because that can mean too many writes to the same memory cells.
3. If you do not want to reboot the computer each time after running the corresponding batch file for a game, you must check anyway with the batch script which memory setting was loaded before rebooting and starting the game.
4. After booting, you must be able to distinguish whether a specific game should be started or the computer was booted normally. Otherwise the computer doesn't know which game should be started after booting and whether one should be started at all.
This could certainly be solved with an environment variable in the Autoexec.bat, a game-specific Autoexec.bat file that then starts the game directly, or a separate batch file to be started at the end, but in both first cases the Autoexec.bat would have to be game-specific and in the latter case the extra batch file to be started. So it wouldn't be enough to copy a handful of preconfigured Autoexec.bat files to C:\ and overwrite the old one, but you would need a separate one for each game or at least change the entry that specifies the environment variable of the game to be started . Or, if you use the third variant with the extra batch file, this would have to be changed.
5. If your game crashes, the game will boot again immediately after restarting.
For all of these reasons, I wouldn't recommend this.
Most of the time, users know roughly what game they want to launch when they turn on their computer and then select the correct memory configuration that the game requires from the 5-6 available configurations in the boot menu and then launch the game's corresponding batch file manually. At least that's how I used to do it.
Have multiple autoexec.bat and config.sys files including a very paired down version that boots you quickly into the selection m […]
Show full quote
Have multiple autoexec.bat and config.sys files including a very paired down version that boots you quickly into the selection menu.
Examples.
autoexec.xms config.xms
autoexec.ems config.ems
etc
That's not enough. See point 4 above.
Have a config.bat in each game directory that replaces the necessary boot configuration.
Configuration data does not belong in the program's directory. For backup reasons, it's better to have a special directory for such a data. In this way, you can delete your game directory, apart from the saved games, game profiles and high score lists, which of course have to be backed up, without having to worry about forgetting something.
The rungame.bat file could all make calls to programs that adjust the CPU speed if needed,
Since there is a batch file for each game, you can also start programs like slowdown in it before the game starts. Of course, this doesn't work with the ridiculous PATH only solution.