Create Total DOS Launcher Menu for certain Games

Top  Previous  Next

Some DOS games may be well suited with a startup menu showing some of the executables. Anthologies like the id Anthology or games containing multiple episodes having a separate executable each are good examples.

 

In this example, we create a Total DOS Launcher menu for Bio Menace- Episode One to Three

 

1. Select the game on the Games & Emulation Main Screen

 

2a. open the context menu (right click) and choose Create Total DOS Launcher Menu

 

Total_DOS_Launcher_Create_Menu01

 

2b. launch the game (Enter or double click) into the MAIN executable selection dialog and click the Create TDL Menu button

 

Total_DOS_Launcher_Create_Menu

 

 

3. The Create Total DOS Launcher Menu dialog opens

 

Total_DOS_Launcher_Create_Menu02

 

   The Total DOS Launcher .zip File should already be set (as it is shipped with Metropolis Launcher)

 

  You can leave the Configuration as is

 

   The Custom Subtitle should already be set with the game's name, you can alter it however

 

   The Menu Entries table below enumerates all found executables. You can decide with the Visible flag, if a menu item for that executable should be visible or not. The Menu Entry can be re-written to your liking.

 

   With Move up and Move down buttons you can re-order the menu entries.

 

   Press the Button_Create button to create the Total DOS Launcher menu.

 

4a. Launch the game and automatically open the MAIN executable selection dialog* (if you previously used the context menu from Game & Emulation Main Screen)

 

    *if the MAIN executable selection dialog does not open but instead DOSBox starts, use the context menu in the Games & Emulation Main Screen and choose Cear Executables Config

 

4b. Automatically return to the MAIN executable selection dialog

 

Total_DOS_Launcher_Create_Menu04

 

   Now the _TDL_\TDL.EXE should be selectable. Select it and press Button_OK.

 

5. DOSBox launches with the Total DOS Launcher menu

 

Total_DOS_Launcher_Create_Menu03

 

Behind the Scenes

 

If you just want to use the Total DOS Launcher menu creation, you can stop reading. The following text will go into detail what Metropolis Launcher does when you create a Total DOS Launcher menu.

 

The Total DOS Launcher (short: TDL) comes, when downloaded, as a .zip file containing amongst others (Metropolis Launcher ships it as total-dos-launcher.zip in the tools directory):

 

- a distro directory containing the necessary binaries and configuration files for the TDL runtime

- a TDLindexer.py script

- sources and text files

 

The TDLindexer.py script is the reference implementation of an export in Python. The actual file isn't needed with Metropolis Launcher - it was used as documentation but the complete menu creation is completely implemented in Metropolis Launcher.

 

If you specify in Metropolis Launcher which executables should be part of the Total DOS Launcher menu, Metropolis Launcher performs the following tasks:

 

1. extract the distro directory inside total-dos-launcher.zip as _TDL_ subdirectory in the working directory of the chosen game

 

   Every imported DOS game in Metropolis Launcher automatically gets a working directory created (for extraction, installation etc.). This directory now gets a _TDL_ subdirectory with the binaries, configuration files etc. for the Total DOS Launcher menu.

 

2. Collect all DOS executable names and check if they are unique

 

   In the example above (Bio Menace) we have BMENACE1.EXE, BMENACE2.EXE and BMENACE3.EXE, all of them are unique, so TDL should have no problem in launching them.

 

   There could be however the situation, where you have non-unique executables, for example multiple instances of START.BAT in multiple sub-directories. If this is the case, 4b will be used next (see below).

 

3. Collect all relative Program Locations (proglocations)

 

  Program Locations are subdirectories where TDL has to look for executables. In our example above (Bio Menace) it would just be ".." (relative to the _TDL_ sub-directory).

 

   Another example would be the Prince of Persia CD Collection, where you have ../PRINCE and ../PRINCE2

 

   Unfortunately, the proglocations separated by semicolon (e.g. "../PRINCE;../PRINCE2") can only take a maximum number of characters up to 80. If this is the case, see 4b.

 

4a. If 2. and 3. succeed (we have only unique executables and proglocations at max. 80 characters)

 

   - Generate FILES.IDX according to the unique executable names

 

   - Generate TITLES.IDX accoding to the user-defined titles for each executable

 

   - Generate TITLES.DAT (one 0-byte per executable)

 

   - Generate TDL.INI according to the proglocations and the settings defined in the selected Configuration

 

4b. If either 2. or 3. fails (non-unique executables or proglocations exceeding 80 characters)

 

   Metropolis Launcher creates _TDL_\BATCHES sub-directory and creates a unique .bat file for each executable (e.g. 1.BAT, 2.BAT, 3.BAT ...)

 

   Now, proglocations only needs to be the BATCHES sub-directory and the executables are uniquely named. This kills off any incompatibility regarding 2. and/or 3.

 

   - Generate FILES.IDX according to the .bat files in BATCHES

 

   - Generate TITLES.IDX according to the user-defined titles for each executable

 

   - Generate TITLES.DAT (one 0-byte per executable)

 

   - Generate TDL.INI according to proglocations=BATCHES and the settings defined in the selected Configuration

 

5. Rescan the DOS game

 

   Rescanning identifies newly created executables for the next launch. In our case the _TDL_ sub-directory is newly created. Metropolis Launcher knows, that the _TDL_ sub-directory may contain more than the needed TDL.EXE and ignores any other executable therein.