Difference between revisions of "Launcher"

From eXo Wiki
Jump to navigation Jump to search
 
(21 intermediate revisions by 2 users not shown)
Line 40: Line 40:
When this file is launched, the user is presented with a choice for:
When this file is launched, the user is presented with a choice for:


* [[#Pixel Perfect Mode]]
* [[#Integer Scaling|Integer Scaling]]
* [[#Curved CRT Mode]]
* [[#No Scan Lines|No Scan Lines]]
* [[#No Scan Lines Mode]]
* [[#Shaders|Shaders]]


=== Pixel Perfect Mode ===
DOSBox Staging is used when starting a game with the Alternate Launcher. As this version of DOSBox does not support every single game, some games will fail when launched with this option.


=== Curved CRT Mode ===
=== Integer Scaling ===
[[File:Curved crt.png|300px|Curved CRT Shader]]<br>
Integer scaling (or Pixel Perfect mode) forces pixels to be drawn perfectly square. In the example below, you can see that integer scaling 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. Integer scaling constrains the horizontal or vertical scaling factor to integer values when upscaling the image. That said, developers may not have intended the game to have been played this way, so it would be false to claim that integer scaling is ''perfect''.
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.


=== No Scan Lines Mode ===
'''Integer Scaling:'''<br>
[[File:Pixel perfect face.png|frameless|Pixel Perfect]]<br>
''Resolution: 640x500''<br>
 
'''Regular DOSBox: Aspect Ratio On'''<br>
[[File:Normal face.png|frameless|Aspect Ratio On]]<br>
''Resolution: 640x480''<br>
 
'''Regular DOSBox: Aspect Ratio Off'''<br>
[[File:Normal aspect off face.png|frameless|Aspect Ratio Off]]<br>
''Resolution: 640x400''<br>
 
=== No Scan Lines ===
The no scan lines setting removes scan lines from games that do not have the option to remove them. It 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.
 
=== Shaders ===
[[File:CRT_auto_shader.png|300px]]<br><br>
Multiple shader options are available when using the Alternate Launcher. Shaders are filters that can modify the image you get while playing a game, for example emulating the style of an old CRT monitor. This could even include curvature near the corners of the screens as well as scan lines.
 
[[Category:Common Core Systems]]

Latest revision as of 19:37, 25 October 2024

Overview

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.

Process

Initial Launch

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.

Launch.bat

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)

Language Check

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.

Installation

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.

Index Checks

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.

Exception.bat

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.

Game Launch

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.

Game Exit

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.

Alternate Launcher

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:

DOSBox Staging is used when starting a game with the Alternate Launcher. As this version of DOSBox does not support every single game, some games will fail when launched with this option.

Integer Scaling

Integer scaling (or Pixel Perfect mode) forces pixels to be drawn perfectly square. In the example below, you can see that integer scaling 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. Integer scaling constrains the horizontal or vertical scaling factor to integer values when upscaling the image. That said, developers may not have intended the game to have been played this way, so it would be false to claim that integer scaling is perfect.

Integer Scaling:
Pixel Perfect
Resolution: 640x500

Regular DOSBox: Aspect Ratio On
Aspect Ratio On
Resolution: 640x480

Regular DOSBox: Aspect Ratio Off
Aspect Ratio Off
Resolution: 640x400

No Scan Lines

The no scan lines setting removes scan lines from games that do not have the option to remove them. It 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.

Shaders

CRT auto shader.png

Multiple shader options are available when using the Alternate Launcher. Shaders are filters that can modify the image you get while playing a game, for example emulating the style of an old CRT monitor. This could even include curvature near the corners of the screens as well as scan lines.