Wednesday 22 April 2015

RetroPie 3.0 Update


If you wish to create scripts to run DOS games in RetroPie as outlined in the tutorial in this blog, then you need to make the following small changes to get them to work in RetroPie version 3.0.


New to RetroPie 3.0

If you are starting with RetroPie 3.0, then make the changes outlined below before moving on to the first tutorial. You can skip configuring ES section and begin with the Add DOS Games to RetroPie section. All other tutorials are still relevant as they stand. 

If you are new to Retropie 3.0, then simply add your game files to the ~/RetroPie/roms/pc folder (check the first tutorial if you're unsure how to do this). You can then launch them directly from Emulation Station by selecting the executable file (.EXE, .BAT, .COM) in the game folder. You can still use the mapper file you may have created for your game controller from an earlier tutorial.

If you are using individual config/mapper files for games or wish to use the scripts you created in Retropie 2.6 or earlier, then you will need to make the fixes outlined below.

Unfortunately, you cannot, at this time, mix the two approaches. Either, you launch games directly from ES or just use scripts. I have raised an issue at the Retropie Github (issue #815) so I hope a solution is not far off.

[Updated 7th June]
The script launching ROMs in DOSBox has been updated so that it is now possible to launch games from a .sh shell script as well as from a DOS executable. First RetroPie Setup script needs to be updated (if not done since 1 June 2015) by running the command

cd RetroPie-Setup/
sudo ./retropie_setup.sh

Choose option U in the menu and exit the RetroPie Setup GUI. Next, configure DOSBox by running the command.

sudo ./retropie_packages.sh dosbox configure

Now DOSBox is ready for use.

There is now no need to make any changes to the emulators.cfg file located in the .dosbox folder. The only change you may wish to consider is tidying up Emulation Station (see below) if you are looking to launch games using scripts only.

Updating from RetroPie 2.6 or earlier

** This section is no longer relevant - please ignore**

Version 3.0 of RetroPie includes a config file, emulators.cfg, located in the hidden folder, .dosbox. It is used to select the DOS emulator, DOSBox or rpix86, to be launched from ES. By default, it only launches the +Start DOSBox script located in the pc roms folder. The config file needs to be edited so that the scripts created in previous tutorials can also be run.

To do this, run the following commands:

cd .dosbox
sudo nano emulators.cfg


Remove references to the default startup scripts so that the file now looks as below:

dosbox="%ROM%"
default="dosbox"
rpix86="%ROM%"


Your scripts from previous versions of RetroPie should now run.

Keyboard Functionality

In RetroPie 3.0, if the keyboard does not work correctly in DOSBox, then delete the /opt/retropie/configs/pc folder and update the Retropie script (see above). Re-run the script and re-install the DOSBox binary.

To manually fix, you can run the following commands:

cd .dosbox
sudo nano dosbox-SVN.conf

In the [sdl] section, edit line 34 of dosbox-SVN.conf so that usescancodes is set to false as below:

usescancodes=false

Tidying Up EmulationStation

By default, any DOS executables such as .bat, .com or .exe will appear in EmulationStation. If you are using shell scripts, then it is likely you will have duplicate games appearing. To remove these and to make sure that you are launching the shell script, you can edit the es_systems.cfg file using the following commands:

sudo nano /etc/emulationstation/es_systems.cfg

Remove any references to DOS executables listed above in the <extension> tag so the PC entry in es_systems looks as below.

<system>
    <name>pc</name>
    <fullname>PC (x86)</fullname>
    <path>~/RetroPie/roms/pc</path>
    <extension>.sh .SH</extension>
    <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0  SYS_pc "%ROM%"</command>
    <platform>pc</platform>
    <theme>pc</theme>
  </system>