The launcher is a script which allows the user to easily start any game included in the projects. Each game has a launcher folder, and within this folder is a batch file with the same name as the game's zip file.
The file in the game's launch folder primarily reads data into variables to pass on to the universal launcher. The current folder of the launcher and the launcher's name are both read into memory. These are important, as they relate directly to the folder the decompressed game resides in as well as the name of the game in for checking the dosbox index.
At this point the game's launch file calls Launch.bat, which resides .\eXo\util\
(note: this is the name of the file for eXoDOS. Each project uses it's own universal launcher, also found in this folder)
The first step is to check for the presence of any lang files. lang files are written to the dosbox folder to note which language packs have been installed. If one is detected, the launcher checks for the presence of this game in each of the various possible language folders.
The second step is to ensure the game is installed. If no language choice is presented, then this is the standard included eXoDOS version it checks for. If any language was chosen above, it checks to ensure that particular version has been installed. In the event the game has not been installed yet, the universal launcher will pass to the game's Installer. Upon competition, control is passed back to the universal launcher and the process continues.
The name of the game is now checked against 2 indexes. The first index, dosbox.txt, resides in the util folder. This file is a complete list of ever game in the project, along with the version of DOSBox that has been chosen for it. The chosen version is not random. Depending on the capabilities or needs of the game, the most compatible version of DOSBox has been selected and stored here. However, this file also makes it easy to wholesale change a particular version of DOSBox from one to another with out individually editing each game's launch file.
The second index file is the multiplayer.txt index, which also reside in the util folder. This is an index of every game which support Remote Multiplayer. If the launched game is on this list, the universal launcher will call the ip.bat file. This checks the computers IP address (both local network and external network) and writes them to tetx files in the game's folder. These will be referenced at launch if the user chooses to start a host or client game.
The universal launcher now checks for the presence of a file called exception.bat in the game's launch folder. If this file does not exist, the process proceeds as normal. If it does exist, the universal launcher calls it, thereby skipping the normal launch procedure. The exception.bat file exists for games that have a choice at launch. This is most commonly to choose between DOSBox and ScummVM versions of a game. It may also be used, however, to give an option to launch between two different machine types. Such as a game that exists on both Tandy and IBM PC.
At this point all information is gathered and all checks are complete. The game is launched by calling the following variables, in this order:
- the dosbox version specified by the dosbox.txt index
- the game's DOSBox Configuration File, from it's launch folder
- the global options configuration file, defined by the Installer
It also includes flags to suppress the DOSBox console, any menus (DOSBox-X for example has a menu bar across the top normally), and to fully close DOSBox once the exit command is stated within the game.
On exit the universal launcher does minor clean-up, removing the DOSBox log files (stdout.txt and stderr.txt), along with any leftover glide or cwsdpmi swap files.
Each game's launch folder has an Extras folder. Within this folder will always be at least one file, the Alternate Launcher.bat. This file is linked under additional applications within LaunchBox. Here it is named Pixel Perfect & Shader Options.
When this file is launched, the user is presented with a choice for:
Pixel Perfect Mode
Pixel perfect mode forces pixels to be drawn perfectly square. In the example below, you can see that pixel perfect mode is slightly taller than standard mode, creating a 640x500 image. This is due to the fact that CRT monitors slightly compressed the image, making pixels slightly wider than they were tall. Pixel Perfect stretches the vertical axis at a 8/7 ratio to return the pixels to their square height. That said, developers may not have intended the game to have been played this way, so it would be false to claim that pixel perfect is perfect. Pixel Perfect mode is a patch in the ECE r4230. Using this is experimental with some games, and will cause certain games to fail.
Curved CRT Mode
The Curved CRT Shader emulated the style of an old CRT monitor. This includes curvature near the corners of the screens as well as scan lines. CRT mode is enabled in ECE r4460. As this version of DOSBox does not support every single game, some game swill fail when launched with this option.
No Scan Lines Mode
No Scan Line Mode removes scan lines from games that do not have the option to remove them. In interpolates the values between the lines, creating a clean image. This is most common in early games that used FMV cinematics, and relied on scan lines in order to take low res video and stretch it to a higher res screen. NSL Mode uses the Daum SVN build of DOSBox. Some games may fail when launched with Daum.