From MythTV Official Wiki
Revision as of 18:04, 26 April 2020 by Robert Worrall (talk | contribs) (PC-Game Setup)

Jump to: navigation, search

This Guide is for MythGame for MythTV 0.19 or later.

This guide describes only the installation, general setup, pc games and use of MythGame. If you need a guide how to setup different emulators in MythGame look at: Configuring MythGame Emulation.

What is MythGame

MythGame is a starter for games and emulators, so they can be run from within MythTV. To use it you need a game emulator and ROMS for each game. Alternatively, you need PC-Games which can be started.

Compiling & Installation

Get the Plugins from the SVN Server:

svn co

go into the mythplugins directory, configure, compile & install:

cd mythplugins
./configure --prefix=/usr --disable-all --enable-mythgame
make install


In MythTV you can configure Mythgame. In the general Settings normally you don't need to change anything.

Input Device Setup

Most emulators that MythGame calls can use a keyboard or joystick, but some can also use an LIRC remote. Each emulator has its own quirks and are covered on the MythGame emulator setup page

Emulation Setup

To Setup different Emulators look at the guide: Configuring MythGame Emulation

PC-Game Setup

To Setup PC Games Create a Directory with Scripts which run your different PC Games. (for example: /usr/games/scripts). You also can link the game executable to this directory if you don't want to create a script.

Then you have to create a game-player which runs your scripts.

Player Name: PC-GAMES 
Type: Other
Command: %s
Rom Path: /usr/games/scripts

Writing Scripts

Scripts can be used to launch any program, it is how the script is written which results on how well it integrates with mythtv. A basic script can be as simple as:


Here it will just launch the game. However even for a native Linux program there are things that can be done to improve its integration with mythtv.

Setting Resolutions

Some older games run at lower resolutions and if the game crashes and exits this will leave resolution different from when the game started. So to save frustration add a line a restores the resolution after the game has stopped. E.g:

xrandr --output HDMI-0 --mode 1920x1080

Note: you may need to change HDMI-0 in the line to match your display. To do this, type the following at the command line:

xrandr –q

Look for the connected device e.g:

DP-0 disconnected (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) HDMI-0 connected primary 1280x720+0+0 (normal left inverted right x axis y axis) 885mm x 498mm

It also shows your current resolution, in this case 1280x720 so in this case the command to add to your script is: xrandr --output HDMI-0 --mode 1280x720

Game Controller Integration

Qjoypad is a program where keyboard commands can be mapped to a gamepad or joystick. It is helpful for mapping mythtv navigation keys to joypad to allow the end user to navigate to their game without having to swap between the controller and a remote control/ keyboard. See the section on Qjoypad ( on how to install and configure it.

For the writing of scripts we want to ensure the Qjoypads device list is up to date before the game starts. To do this we add this line to the script

qjoypad –update

This is just in-case the user plugs the controller after mythtv has loaded and the game has no native game controller integration. It therefore ensures the controller is ready to respond to input.

Running Your Script

To be able to run your script you must make it executable, there are couple ways of doing this. From the command line go to the directory using the cd command e.g

cd /usr/games/scripts

now make the script (e.g a script called executable by typing:

chmod u+x

If you have your script in a location that you do not have rights granted then you need to add sudo to the front of the line and then enter your password when executing the command.

The other method to use your desktop environment to make it executable. This can vary between desktop environments but essentially it requires you to right click on the script, select properties, then find and tick the executable box. Finally click okay to set the commit the change to the script.

Game metadata

MythGame can retrieve additional information about games and display box art for the selected game. Some titles will automatically obtain and display the correct metadata for a particular game. If an exact match is not found, you will have to manually perform a search, press Menu (M) then select "Retrieve Details". A list of matching titles will be displayed, where you can select the appropriate one.

MythGame obtains its data from using a script located at /usr/share/mythtv/metadata/Game/