MythGame

MythGame is a front-end interface to launch PC games and emulators from MythTV. You will need the game files, emulators, ROMs, etc. in order to use MythGame- no game files are included.

Install MythGame

$ sudo apt-get install mythgame

Setting up mythgame for MAME

Credit to amoore from the forums for the content of this howto. Formatted by superm1:

MAME, which is an acronym for Multiple Arcade Machine Emulator, is a computer software program for personal computers designed to faithfully and precisely emulate as many arcade games as possible, with the intent of preserving gaming history and preventing vintage games from being lost or forgotten.

For these instructions it assumed you have the lirc drivers installed or you don't want to use a tv remote to exit xmame during game play.

if you don't have the lirc drivers and you want to use a tv remote you can find instructions on how to install a set up the drivers:

MCE Hauppauge remote lirc instructions https://help.ubuntu.com/community/Install_Lirc_Edgy

Standard hauppauge remote lirc instructions http://www.mythtv.org/wiki/index.php/LIRC_on_Ubuntu_Edgy_Eft

  • 1) Get xmame and it's other packages
    • sudo apt-get install xmame-common xmame-gl xmame-sdl xmame-svga xmame-tools xmame-x
    2) If you don't already have the mythgame plug in get that too.
    • sudo apt-get install mythgame
    3) Now we need to create a config file so that xmame can use your TV remote to exit xmame. Xmame has support for LIRC as of version 0.89. This means, no more keyboard to exit out of Xmame when your finished playing.
    • gedit /home/your_user_name/.lircrc

      Note: “ . “ before lircrc in the command listed above. This means the file will be hidden in your directory. To view your hidden files in a directory, go to the directory then View>Show hidden files

    4) Copy and paste this into the .lircrc file we just made
    • begin prog = xmame button = Back/Exit config = 1 end
    5) Save the file.
    • Now the "Back/Exit" button will quit Xmame when using mythgame.

NOTE!!!! (I'm using a Hauppauge 150 silver remote so, your buttons might not be the same!!!) You can use irw in the terminal to map what buttons you use on your remote. Just change "button = to what your button is" in the file we just made.

  • irw
    Press Ctrl-C when your finished finding the button name.
  • 6) Make a folder in your /home/your_user_name/ called xmame_roms this will be where we store mame roms.

    • mkdir /home /your_user_name/xmame_roms
    7) Copy any roms you have to this folder. Only copy .zip files to this folder and nothing else!!!
    • Mythgame can also display a picture or screen shot of the game called a snap in the mythgame browser. Make sure any image file (snaps) are named the exactly how the rom is named.
      Example> Rom name: mvsc.zip Snap: mvsc.png
      You can use .png, and .jpeg files for snaps
    8) Make a folder in your /home/your_user_name/ called xmame_snaps this will be where we store mame snaps.
    • mkdir /home /your_user_name/xmame_snaps
    9) Copy any snaps you have or make to this folder. 10) Start your mythtv
    • mythfrontend

    11) In mythtv go to: Utillites/Setup> Media settings> Game settings> Game Players Select (new game player) make your settings look like this:

    • Player Name: MAME Type: MAME Command:
      • xmame -vidmod 1 -fullscreen -skip_gameinfo -jt 1 -jdev /dev/input/js -gm
      Rom path:
      • /home /your_user_name/xmame_roms
      Screen Shots:
      • /home /your_user_name/xmame_snaps
      Working Directory: File Extension:
      • zip

Notice: that there is no “.” before “zip” in the file extension.

  • 11) Select finish.

Start (Untested section) MythGame allows you to provide titles, descriptions, release year, and other information for your ROMs. This information can be automatically detected by matching CRC values from the roms.

Now goto general settings (inside the mythgame settings)

check mark the box that say “Indepth Game Scan” Finished (Untested section) Select finish

Now goto scan for games (inside the mythgame settings)

You can now play xmame with MythGames in Mythtv.

From the main menu in Mythtv goto: Media library>Play Games

I've noticed that if you have a lot of roms sometime. it takes myth a little time to scan and load the all of the roms. Also, some time mythgame gets stuck on the root menu in mythgame if this happen s just press down and left a few times then select the game.

You should now be able to use up to 4 joysticks in xmame or the keyboard to control game play. Also, if you set up your TV remote right then the Back/Exit will quite xmame and return to mythtv.

Note: joysticks still have to be configured in xmame for each game!!! You can do this by pressing the “Tab” key while in xmame then goto: Input this game and set the buttons up on the joystick. Forward Message

Setting up MythGame for ZX Spectrum emulation

Section Last Updated:

This section describes how to setup the MythTV Game plugin for ZX Spectrum emulation.

Most of this is based on the section above, with thanks. This was setup on a Mythbuntu 7.10 box (32-bit).

There are a few ZX Spectrum emulation programs available, include "xspect" in the Ubuntu repositories, but I've had better luck with xfuse-sdl, which you can get as follows.

  • Add the following to /etc/apt/sources.list:

# Repo for xfuse-sdl (ZX Spectrum emulator)
# More details here: 
#  http://fuse-emulator.sourceforge.net/
#  http://www.youmustbejoking.demon.co.uk/progs.lenny.html
deb http://att.tartarus.org/~ds/debian testing main contrib non-free
  • Then run:

sudo aptitude update && sudo aptitude install xfuse-sdl
  • At this stage you can optionally remove the repository and run aptitude update again to leave you with just the packages you need from this repository.

Now we have the emulator installed, we need to setup a few directories.

  • Roms directory - choose a location that will hold your ZX Spectrum Roms
  • Screenshots directory - this will hold screenshots that will be shown as you browse through games.

Setup the Spectrum Game Player in MythTV:

  • In mythtv go to: Utillites/Setup> Media settings> Game settings> Game Players Select (new game player) make your settings look like this:

Player Name: Spectrum
Type: OTHER
Command: xfuse-sdl --full-screen
Rom Path: <your_rom_directory_path_as_chosen_above> (NOTE: This should be unique per "Game Player", and should be a full path)
Screen Shots: <your_screenshots_directory_path_as_chosen_above> (NOTE: This should be unique per "Game Player", and should be a full path)
Working Directory:
File Extension:

I leave the file extension blank, and that way anything you put in the Roms directory (.TAP, .Z80, etc.) will be recognised. Once you have it all setup, select Finish.

From within a game, press F10 to bring up the exit dialogue.

Setting up MythGame for "Native" Linux Games

This section describes how to set up the MythGame plugin for native Linux games. In this example, the package frozen-bubble will be used. ' First, install the game you'd like to run from MythGame via apt-get (or other means):

sudo apt-get install frozen-bubble

You'll want to also examine the command line options to see how to set up fullscreen and other handy options you might want or need. In frozen bubble's case, we don't need a fullscreen option, but we might want to add the -cb option for color-blind friendly graphics.

Then, in mythTV, navigate to Utillites/Setup> Media settings> Game settings> Game Players, and add a new game player.

Player Name: Frozen Bubble
Type: PC GAME
Command: frozen-bubble -cb 
Rom Path: /usr/games/frozen-bubble
Screen Shots: 
Working Directory:
File Extension:

Note that the Rom Path should be the location of the executable itself, which can be found with the "which" command.

Scripting MythGame for "Native" Linux Games

Section Last Updated:

This section describes how to setup the MythTV Game plugin for "Native" Linux Games using a script instead of a simple command line. This is handy when you want to set up joystick keybindings etc. As an example, you can setup SuperTuxKart.

Most of this is based on the section above, with thanks. This was setup on a Mythbuntu 7.10 box (32-bit).

  • Install the game you want to run (in our example, SuperTuxKart, but could be any game, packaged or otherwise):

sudo aptitude install supertuxkart

Now we need to setup a few directories.

  • "Roms" directory - choose a location that will hold your scripts that run your games.
  • Screenshots directory - this will hold screenshots that will be shown as you browse through games.

Setup the "Linux Native" Game Player in MythTV:

  • In mythtv go to: Utillites/Setup> Media settings> Game settings> Game Players Select (new game player) make your settings look like this:

Player Name: Linux Native
Type: OTHER
Command: sh
Rom Path: <your_rom_directory_path_as_chosen_above> (NOTE: This should be unique per "Game Player", and should be a full path)
Screen Shots: <your_screenshots_directory_path_as_chosen_above> (NOTE: This should be unique per "Game Player", and should be a full path)
Working Directory:
File Extension: .sh

Once you have it all setup, select Finish.

Now we want to create the script to run the game (can be used as a template):

# If you haven't already done so, you'll need to create the directory
cd <your_rom_directory_path_as_chosen_above>
gedit SuperTuxKart.sh
# Paste the following into this file
---- Starts Here ----
#!/bin/sh

/usr/games/supertuxkart --fullscreen
---- Ends Here ----
chmod +x SuperTuxKart.sh
  • Now you'll need to go into the Game Settings section, and "Scan for New Games". Optionally you can download a screenshot and add it into <your_screenshots_directory_path_as_chosen_above>.

  • To troubleshoot, just exit the MythTV Frontend and run the script manually from a shell (sh <your_script_name>).

  • Enjoy!

MythGame Page at mythtv.org
Emulator setup at mythtv.org

MythGame (last edited 2008-07-24 17:11:13 by localhost)