Installing and using MythTV: MythGame.

Next Previous Contents

## 16. MythGame.

MythGame can used as a frontend to start any emulator that your host OS runs. This is an example of how to set up xmame on Linux. http://www.mameworld.net/ is an excellent resource for all things mame.

Installation overview:

1. Setup directory structure
2. Download and install xmame
3. Download and place extra files (artwork/catver.ini/etc..)
4. Download and install MythGame plugin
5. Setup xmame in MythGame
6. Hints

## 16.1 Setup Directory Structure

To keep things organized, create the following directories for xmame to use in `/usr/local/share/xmame`: hiscore, roms, and snaps.

> `

>     $ mkdir -p /usr/local/share/xmame/{highscore,roms,snaps}

> `

## 16.2 Download and Install xmame

NOTE: There may be pre-packaged versions of xmame available for your distribution. Check http://x.mame.net/download.html for the latest version.

Download the source to xmame from http://x.mame.net/download/xmame-0.103.tar.bz2

> `

>     $ wget http://x.mame.net/download/xmame-0.103.tar.bz2
>     $ tar -xjf xmame-0.103.tar.bz2
>     $ cd xmame-0.103

> `

Edit the Makefile with your favorite editor. Adjust the options as required for your system.

> `

>     $ joe Makefile

> `

Then make and install xmame

> `

>     $ make
>     $ su
>     (enter password)
>     # make install
>     # exit

> `

After mame has been installed, we need to create some defaults.

> `

>     $ mkdir ~/.xmame
>     $ cp docs/xmamerc.dist ~/.xmame/xmamerc

> `

Because some ROMS work better with different display toolkits, or possibly even older versions of xmame, it's convenient to keep all of your xmame binaries and to rename them to include the version number. MythGame allows you to match individual roms to preferred binaries.

> `

>     $ su
>     (enter password)
>     # mv /usr/local/bin/xmame.x11 /usr/local/bin/xmame-0.103.x11
>     # exit

> `

NOTE: Depending on how you compiled xmame, you may have xmame.X11, xmame.SDL or xmame.xgl based on what display toolkit you used. Also, you may need to remove and recreate `xmamerc` after upgrading since some of the default options may have changed.

> `

>     ### Fileio Related ###
>     rompath                         /usr/local/share/xmame/roms
>     snapshot_directory              /usr/local/share/xmame/snaps
>     cheat_file                      /usr/local/share/xmame/cheat.dat
>     hiscore_file                    /usr/local/share/xmame/hiscore.dat
>     hiscore_directory               /usr/local/share/xmame/hiscore
>     history_file                    /usr/local/share/xmame/history.dat
>     mameinfo_file                   /usr/local/share/xmame/mameinfo.dat

> `

Confirm that xmame works before running it inside MythTV. Place your ROM in the `/usr/local/share/xmame/roms` directory you created earlier.

NOTE: There are three public domain ROM sets available at http://www.mame.net/downmisc.html

Launch xmame with your game of choice. In this example, we are using Gauntlet.

> `

>     $ xmame gauntlet

> `

Some basic mame keyboard commands:

> `

>     5 = Insert coin
>     1 = Player 1 start
>     arrow keys = movement
>     left control = button 1
>     left alt = button 2
>     SPACE = button 3
>     ESC = exit
>     TAB - menu
>     ~ to adjust Volume
>          < and >

> `

## 16.3 Download extra files

The following files allow you to add extra functionality. Place them into `/usr/local/share/xmame`

- `catver.ini` is a catalog of categories and versions of popular mame ROMs.

Useful for keeping large libraries of ROMs organized.

It may be downloaded from http://www.catver.com or http://www.mameworld.net/catlist

- Screenshots aka "snaps"

These may be downloaded from http://www.classicgaming.com/mame32qa/

Screenshots are displayed when you are browsing your ROMS in mythgame. Unzip and place them in `/usr/local/share/xmame/snaps`

- `history.dat`

Download from http://www.arcade-history.com/ This file fills in a bit of background about each ROM.

- `hiscore.dat`

Download from http://www.mameworld.net/highscore/

- Cheats

Download from http://cheat.retrogames.com/

## 16.4 Download and Install MythGame.

MythGame is part of the mythplugins package. See the instructions in the Downloading and Compiling section to obtain mythplugins.

Switch to the mythplugins directory:

> `

>     $ cd ~/mythplugins-0.22

> `

Compile and install mythgame:

> `

>     $ ./configure --disable-all --enable-mythgame
>     $ qmake mythplugins.pro
>     $ make
>     $ su
>     (enter password)
>     # make install
>     # exit

> `

## 16.5 Setup xmame in MythGame

Start mythfrontend and navigate to Utilities/Setup > Setup > Media Settings > Game Settings > Game Players. Select `(New Game Player)`.

To set up a new player for xmame enter the following:

> `

>     Player Name:    xmame-0.103.x11                  (Name by which you want your emulator or game called)
>     Type:           xmame                           (This is used for display purposes only and does not affect the function of your system)
>     Command:        xmame-0.103.x11 -vidmod 1 -fullscreen     (Path and name of binary + any optional parameters)
>     Rom Path:       /usr/local/share/xmame/roms     (This tells MythGame what directories to scan for roms to be used with this emulator)
>     ScreenShots:    /usr/local/share/xmame/snaps    (This tells MythGame what directories to scan for snapshots to be used with these roms)
>     Working Directory:                              (Directory to change to before launching game or emulator. Blank in our case ignores this setting)
>     File Extensions:                                (List of all file extension to be used for this emulator. Blank menas any file under the Rom Path)
>     [] Allow games to span multiple roms/disks      (will treat game.1.rom game.2.rom game.3.rom as one game)

> `

## 16.6 Hints:

- Rom name before options: %s can be used as a standin for rom names on the command line.
- Multiple disk/rom games: %d1 %d2 etc can be used as standins for multiple disc games on the command line.
- Associating a rom with an emulator: Browse to the desired rom and press 'M' to enter the settings page for that rom.
- Assign a Game Favorite Status: Browse to the desired game and press "/".

Next Previous Contents