Difference between revisions of "Adding DOSBox Games"

From EmuVR Wiki
Jump to: navigation, search
m
Line 5: Line 5:
 
Note: DOSBox games always need to be extracted. Each game should be in their own separate subfolder, inside your DOS games folder.
 
Note: DOSBox games always need to be extracted. Each game should be in their own separate subfolder, inside your DOS games folder.
  
=== Adding executables ===
+
== Adding executables ==
  
 
Previously, the scanner would add every single .exe file in your game folder, and some games have lots of executable files that don't need to be clogging your playlist.
 
Previously, the scanner would add every single .exe file in your game folder, and some games have lots of executable files that don't need to be clogging your playlist.
Line 35: Line 35:
 
If you're creating this from an empty text file or anything, ''enable file extensions'' to be sure you don't end up with something like: '''STUNTS.COM.evrdos''.TXT'' '''
 
If you're creating this from an empty text file or anything, ''enable file extensions'' to be sure you don't end up with something like: '''STUNTS.COM.evrdos''.TXT'' '''
  
=== Adding folders ===
+
== Adding folders ==
 
You might not want your game to run automatically, but instead you want to just start with the DOS prompt at your desired game folder, so you can browse folders and run anything you want, like SETUP.EXE to install or set up your game before playing it.
 
You might not want your game to run automatically, but instead you want to just start with the DOS prompt at your desired game folder, so you can browse folders and run anything you want, like SETUP.EXE to install or set up your game before playing it.
  
Line 52: Line 52:
 
It will show up as an extra cartridge in your inventory menu, and playing it will make you start the DOSBox prompt in that folder.
 
It will show up as an extra cartridge in your inventory menu, and playing it will make you start the DOSBox prompt in that folder.
  
==== Folder Labels ====
+
=== Folder Labels ===
 
If you want to add a label to a DOS folder, you have two ways, using the example above:
 
If you want to add a label to a DOS folder, you have two ways, using the example above:
  
Line 63: Line 63:
 
<code>...\Games\DOS\Duke 3D.png</code> (Notice it's '''not inside''' the "Duke 3D" folder)
 
<code>...\Games\DOS\Duke 3D.png</code> (Notice it's '''not inside''' the "Duke 3D" folder)
  
=== Dosbox.conf (Advanced) ===
+
== Dosbox.conf (Advanced) ==
'''dosbox.conf''' is a configuration file that DOSBox uses to store various system settings and initialization values that define your emulated environment.
+
'''dosbox.conf''' is a configuration file that DOSBox uses to store various system settings and initialization values that define your emulated environment. Some games do need specific settings in this file to work.
  
 
Learn more about it here: https://www.dosbox.com/wiki/Dosbox.conf
 
Learn more about it here: https://www.dosbox.com/wiki/Dosbox.conf
  
When you run an executable file that you've added using the .evrdos file, it will automatically load a '''dosbox.conf''' if found in the same folder.
+
To load it, you need to create an empty '''dosbox.conf.evrdos''', following the example above, instead of pointing to your executable.
  
If you use the '''folder.evrdos''' method to start at the command prompt, it will not load that configuration file.
+
=== [autoexec] ===
 +
When loading an executable directly, its current directory will be automatically mounted to C:, then the executable will run. '''This does not happen when loading dosbox.conf''', you'll need to manually mount your patch and run your executable with commands in the ''[autoexec]'' section of the file. Think of it as a .bat file that will run your commands as soon as it loads.
  
To be able to start the DOS prompt ''and'' load your '''dosbox.conf''' settings, you just need to create this empty file: '''dosbox.conf.evrdos'''.
+
==== Relative Paths ====
 +
You can use relative paths when using the '''mount''' or any other command in the ''[autoexec]'' section. But some cores interpret them differently:
 +
* '''DOSBox-Core''' core: paths are relative to your loaded '''dosbox.conf''' file
 +
* '''DOSBox-SVN''' core: paths are relative to '''retroarch.exe'''
  
Attention: loading '''dosbox.conf''' files directly won't automatically mount your folder, so you'll need to do that in the ''[autoexec]'' section of your conf file, using the ''relative path'' from Retroarch to your folder. Example:
 
  
 +
Examples:
 +
 +
* '''DOSBox-Core'''
 +
[autoexec]
 +
mount C "."
 +
C:
 +
duke3d.exe
 +
(Here, "." means we're mounting the current folder, where '''dosbox.conf''' is)
 +
 +
* '''DOXBox SVN'''
 
  [autoexec]
 
  [autoexec]
 
  mount C "..\Games\DOS\Duke 3D"
 
  mount C "..\Games\DOS\Duke 3D"
 
  C:
 
  C:
 +
duke3d.exe
 +
(Here, ".." means we go up to the parent folder '''relative to retroarch.exe''', then into the Games folder)
 +
 +
 +
If you don't want to automatically start the game, but instead want to start at the prompt as when you load a folder, just remove the "duke3d.exe" lines above.
  
This will allow you to load all your custom settings ''and'' start your DOS prompt in your mounted folder.
 
  
If you have any '''relative paths''' in your ''[autoexec]'' section, note they're originally supposed to be relative to ''DOSBox.exe'', so you'll need to rewrite them to be relative to your ''retroarch.exe'' path instead, as shown above. Again, paths are not relative to ''dosbox.conf'', but to ''retroarch.exe''.
+
If your DOS game already comes bundled with a '''dosbox.conf''' file (e.g. buying from GOG), be sure to fix your relative paths as explained above. On standalone DOSBox (i.e. not the core versions for Retroarch), paths are always relative to '''DOSBox.exe'''. Again, you need to change them to be relative to '''dosbox.conf''' or '''retroarch.exe''' instead, depending on the core as explained above.
  
You can also use ''absolute paths'' instead, if more convenient, but you'll need to change them again if you move your EmuVR installation folder, losing portability.
+
You can also use absolute paths if you want, but you'll need to edit them again every time you move your EmuVR installation folder to another place, losing the convenience of portability.
  
If you don't really need any custom settings from a ''dosbox.conf'' file, just [[Adding_DOSBox_Games#Adding_folders|add the folder]] as usual.
 
  
Again, if you're just loading '''.exe''', '''.com''', etc, directly, any '''dosbox.conf''' in the same folder will be automatically loaded.
+
Note: If you're already familiar with standalone DOSBox, you might know that when you load an executable file directly (.exe, .bat, .com, etc), if there is a '''dosbox.conf''' file in the same folder it will be automatically loaded for you before running the executable. '''This does not happen in the core versions for Retroarch currently.''' If your game relies on a '''dosbox.conf''' file, it needs to be loaded manually instead of the executable.

Revision as of 01:01, 22 June 2020

DOSBox Games are a special case for the Game Scanner.

Read further below to learn how to properly add them.

Note: DOSBox games always need to be extracted. Each game should be in their own separate subfolder, inside your DOS games folder.

Adding executables

Previously, the scanner would add every single .exe file in your game folder, and some games have lots of executable files that don't need to be clogging your playlist.

Now, since version 1.0.4, you just need to create an empty file (like a new text file or anything really) and name it like "your_executable_filename.extension.evrdos", and it will work like a link to it for the Game Scanner.

For example, if you want to add Duke3D.exe, you need to create an empty file in the same folder, named Duke3D.exe.evrdos

If you want a STUNTS.COM file, create a STUNTS.COM.evrdos file in the same folder.

You have: Create:
duke3d.exe duke3d.exe.evrdos
stunts.com stunts.com.evrdos
prince.com prince.com.evrdos
play.bat play.bat.evrdos

If you're creating this from an empty text file or anything, enable file extensions to be sure you don't end up with something like: STUNTS.COM.evrdos.TXT

Adding folders

You might not want your game to run automatically, but instead you want to just start with the DOS prompt at your desired game folder, so you can browse folders and run anything you want, like SETUP.EXE to install or set up your game before playing it.

To do that, just create an empty file named folder.evrdos inside the folder you want to start in.

For example, you want to start the prompt inside your Duke Nukem 3D folder, but while being free to run SETUP.EXE or anything else you need to, instead of running the actual game as soon as you turn the console on.

If your Duke Nukem 3D folder, which contains files such as duke3d.exe and setup.exe, is located like this:

...\Games\DOS\Duke 3D\

Just create this empty file:

...\Games\DOS\Duke 3D\folder.evrdos

It will show up as an extra cartridge in your inventory menu, and playing it will make you start the DOSBox prompt in that folder.

Folder Labels

If you want to add a label to a DOS folder, you have two ways, using the example above:

Match the "folder.evrdos" file with a folder.png label like this:

...\Games\DOS\Duke 3D\folder.png (Notice it's inside the "Dude 3D" folder)

Or match the actual folder, "Duke 3D", like this:

...\Games\DOS\Duke 3D.png (Notice it's not inside the "Duke 3D" folder)

Dosbox.conf (Advanced)

dosbox.conf is a configuration file that DOSBox uses to store various system settings and initialization values that define your emulated environment. Some games do need specific settings in this file to work.

Learn more about it here: https://www.dosbox.com/wiki/Dosbox.conf

To load it, you need to create an empty dosbox.conf.evrdos, following the example above, instead of pointing to your executable.

[autoexec]

When loading an executable directly, its current directory will be automatically mounted to C:, then the executable will run. This does not happen when loading dosbox.conf, you'll need to manually mount your patch and run your executable with commands in the [autoexec] section of the file. Think of it as a .bat file that will run your commands as soon as it loads.

Relative Paths

You can use relative paths when using the mount or any other command in the [autoexec] section. But some cores interpret them differently:

  • DOSBox-Core core: paths are relative to your loaded dosbox.conf file
  • DOSBox-SVN core: paths are relative to retroarch.exe


Examples:

  • DOSBox-Core
[autoexec]
mount C "."
C:
duke3d.exe

(Here, "." means we're mounting the current folder, where dosbox.conf is)

  • DOXBox SVN
[autoexec]
mount C "..\Games\DOS\Duke 3D"
C:
duke3d.exe

(Here, ".." means we go up to the parent folder relative to retroarch.exe, then into the Games folder)


If you don't want to automatically start the game, but instead want to start at the prompt as when you load a folder, just remove the "duke3d.exe" lines above.


If your DOS game already comes bundled with a dosbox.conf file (e.g. buying from GOG), be sure to fix your relative paths as explained above. On standalone DOSBox (i.e. not the core versions for Retroarch), paths are always relative to DOSBox.exe. Again, you need to change them to be relative to dosbox.conf or retroarch.exe instead, depending on the core as explained above.

You can also use absolute paths if you want, but you'll need to edit them again every time you move your EmuVR installation folder to another place, losing the convenience of portability.


Note: If you're already familiar with standalone DOSBox, you might know that when you load an executable file directly (.exe, .bat, .com, etc), if there is a dosbox.conf file in the same folder it will be automatically loaded for you before running the executable. This does not happen in the core versions for Retroarch currently. If your game relies on a dosbox.conf file, it needs to be loaded manually instead of the executable.