Configuring MythGame Emulation

From MythTV Official Wiki
Revision as of 17:16, 17 February 2006 by Trevarthan (talk | contribs) (Nintendo: SNES: added SNES9x section)

Jump to: navigation, search


You will need the SVN Version of MythGame to follow these instructions. The version included in MythTV 0.18 is not covered in this document, since the configuration interface has changed drastically. Also, here is only explained how to setup MythGame after it was installed, this is not a tutorial how to compile and install it.


Firstly, we need to create folders where we can store the roms and the emulator binaries. Any of the third level (snes, gba, etc) directories are optional if you do not intend to use that specific emulator.

You will need to create the following directory structure: (This Directory Structure is only an example, yours can be different!)

/usr/emulators/amiga/chip   (For the Kickstart Image)


Nintendo: SNES


Emulator used: ZSNES (1.42)

ZNES requires a mouse for configuration in the GUI, keyboard support is not fully implemented. (But the Configuration had only to be done once!)

Most distributions include ZSNES in their package selection - Consult your package manager (rpm, dselect, emerge). If your distribution does not include it, you can download ZSNES source from [1]. The newest Version is: 1.42

Put the binary in the /usr/emulators/snes/bin Folder. Start ZSNES to create the config file. I recommend setting the options 2x Super SAI Engine under video, so that the picture looks smoother. After configuring ZSNES and exiting you have to copy the configuration from your configuration directory (by default ~/.zsnes) to the mythtv user directory (probably ~mythtv/.zsnes).

Now you have to add a game starter to Mythtv:

Player Name: SNES 
Typ: SNES 
Command: /usr/emulators/snes/bin/zsnes 
Rom Path: /usr/emulators/snes/roms

Using SNES9x

There is also an emulator called SNES9x for Linux avialable. The quality of this emulator is near to ZSNES, if not better. It has no frontend on Linux, but frontends just get in the way on MythTV boxes anyway. Everything can be configured through the command line, and most options work for all games, so once you have it set up you only need to modify command line options when you change hardware, like joysticks.

Most distributions include SNES9x in their package selection - Consult your package manager (rpm, dselect, emerge). If your distribution does not include it, you can download SNES9x source from [2]. The newest Version is: 1.43

It doesn't matter where the binary is located. Usually your distribution's package manager will add it to your PATH or inform you of it's location after the install. For example, Gentoo puts all game binaries in:


Run the following on the command line to determine the SNES9x binary's location:

 which snes9x

Remember the output from the above command. You'll need it in the next section.

There are no configuration files to worry about with SNES9x. All configuration is specified on the command line. Use the following command, replacing /path/to/snes9x with the actual path to your SNES9x binary from the step above, to view all possible command line options:

 /path/to/snes9x -h

On many distributions, in order to utilize full screen mode in SNES9x you need to add the SUID bit to your SNES9x binary. This is a security risk, but it makes games much more enjoyable. To add the SUID bit, do this:

 chmod 4750 /path/to/snes9x

Please adjust group and world permissions as necessary to suit your distribution.

Now you have to add a game starter to MythTV:

Player Name: SNES
Typ: SNES9X 
Command: /path/to/snes9x -stereo -r 6 -tr -fs
Rom Path: /usr/emulators/snes/roms

If you are interested in using SNES9x with a joystick, please read about the -joydev and -joymap command line options. In addition, if you have the luxury of building snes9x from source, Reboot's joyaxisX patch is an excellent and necessary addition to the program.

Nintendo: NES

Emulator used: fce-ultra ( 0.98.13)

Get FCE-Ultra. Official Homepage: is currently offline. But you can download it from here:

Put the binary in the /usr/emulators/nes/bin Folder.

Start fceu with fceu -inputcfg gamepad1 %romename% to configure your joystick.

Now you have to add a game starter to Mythtv:

Player Name: NES 
Typ: NES 
Command: /usr/emulators/nes/bin/fceu --fs 1 --joy1 1 --xres 1024 --yres 768
Rom Path: /usr/emulators/nes/roms

Nintendo: Game Boy Advance & Game Boy

Emulator used: Visual Boy Advance (1.80 SDL)

You need to get the CVS-Source if you want to run the newest Version. You also can use a older binary from the homepage, but I prefer to use the newest.

You can do a CVS-Checkout with the following command: "cvs -z3 co -P VisualBoyAdvance"

Then we need to got into the VisualBoyAdvace directory and run : ./configure

After that we do : make

And then after compilation has completed we can copy the VisualBoyAdvance binary from the src dir to our binary directory.

You then need to edit the VisualBoyAdvance.cfg to edit your Joystick settings. If you want to change it, you can get a program called: SLD-Test from the GameBoyAdvance homepage to get the correct settings for your joystick!

Now you need to add a game starter to Mythtv:

Player Name: GBA
Command: /usr/emulators/gba/bin/VisualBoyAdvance -F -4
Rom Path: /usr/emulators/gba/roms

(The Parameters -F to gives full screen and -4 gives a bigger picture)

Nintendo: N64

Emulator used: Mupen 64 (0.5))

You need to get the Source Version from the Message board (The Patchset needed in the 0.4 Version is now included in Mupen 0.5). (You can't use the Binary Version, Because there is no nogui Version in it!)

Download Mupen Source: wget

Extract the Mupen64.

Configure Mupen with ./configure

Mupen64 0.5 comes with a bug which results in the nogui version not compiling. To fix this, edit main/main.c and insert the following at the beginning of the file:

#include <dirent.h>
#include <sys/stat.h>

Compile the Mupen nogui Version with: make mupen64_nogui

Now you need the MUPEN Plugins. You can also compile them or get them withing the binary Distribution of the Mupen Webpage (I use the second way!)

Then you can Create a config File to use with mupen64. (Here's my Config File for Example!) mupen64.conf

Gfx Plugin = /usr/emulators/n64/bin/plugins/
Audio Plugin = /usr/emulators/n64/bin/plugins/
Input Plugin = /usr/emulators/n64/bin/plugins/
RSP Plugin = /usr/emulators/n64/bin/
Fullscreen = true
Emulation Mode = 2
No Ask = true

And the Game Starter for Mythtv:

Player Name: N64
Typ: N64
Command: /usr/emulators/n64/bin/mupen64_nogui
Rom Path: /usr/emulators/n64/roms

Commodore: Amiga

Emulator used: E-UAE (0.8.28))

The used Emulator is E-UAE 0.8.28 which is a backport to linux from WinUAE.

There are also two other Amiga Emulators for Linux aviable. These were: X-Fellow [3] and the Origanal UAE (0.8.23) [4]. And also XMESS could be used (without Sound).

Now add a player to MythGame. (The Command Line is a little bit complex, because we want to add multiple Disk Drives on multiple Disk games.)

Player Name: Amiga
Command: /usr/emulators/amiga/bin/uae -s floppy0=%d1 -s floppy1=%d2 -s floppy2=%d3 
-s floppy3=%d4 -s  floppy_speed=800 -s kickstart_rom_file=/usr/emulators/amiga/chip/KICK31.ROM
-s gfx_fullscreen_amiga=true -s use_gui=false

Rom Path: /usr/emulators/amiga/roms
Span Disks: yes

(The Command has to be added as one line, it is only split in three, so that it fits on the screen!)

Atari: Lynx

Emulator used: Handy SDL (0.82 R1)

The used Emulator can be downloaded from [5].

You also need a Bios Image from the Atari Lynx. Copy this into the Emulator Directory. (Info: You are only allowed to use a BIOS dump of your own Lynx machine!)

Player Name: Atari Lynx
Command: /usr/emulators/atari/lynx/bin/sdyhandy %s -fullscreen -scale 4 -sound -joystick
Rom Path: /usr/emulators/atari/lynx/roms


Emulator used: XMAME

The used Emulator can be downloaded from [6].

Remember to place the .zip files from the roms you download into your roms directory. Do not unzip them, just leave the .zip files. I also had to change the general settings Display orders to just gamename.

Player Name: XMAME
Type: MAME 
Command: /usr/emulators/xmame/bin/xmame -fullscreen -vidmod 1 %1
Rom Path: /usr/emulators/xmame/roms

Sega: MegaDrive/Genesis

Emulator used: DGEN/SDL (1.23)

The used Emulator can be downloaded from [7].

You cannot download a Binary on this Page, only Source. The compile of the Source Code failed on my system, so I used the Binary which came with the Debian Repository (get it via: apt-get install dgen)

Player Name: MegaDrive
Command: /usr/emulators/megadrive/bin/dgen -f -G 800x600 -j
Rom Path: /usr/emulators/megadrive/roms

More Emulators...

Here is a List of what might be possible to be Emulated, maybe someone describes how to include them in Myth:




Multiple Systems

  • Xe Game Boy, MegaDrive, Super Famicom, PC-FX, Playstation, GameGear, ...


A Script to generate your Screenshots automatically, can be found in the MythTV Trac ticket #225 . Maybe it'll be included in the MythTV distribution later.

It uses the program scrot to generate screenshots of your x display.