### README - v0.2.b2, 05-MAY-2008

### Contents

1. What is the M.A.M.E. Catalog / Launcher II?

2. Build and installation instructions

3. Command line arguments and configuration

4. Gamelist statistics, ROM status and the ROMAlyzer

5. GUI style plugins

6. Shortcuts and special keys

7. External tools and tool argument syntax

8. Multi-platform support

9. Contact

10. Contributing

11. License and copyright

12. Legal notice

### 1. What is the M.A.M.E. Catalog / Launcher II?

M.A.M.E. Catalog / Launcher II - also referred to as QMC2 - is the successor of one of the first UNIX MAME GUI frontends available on this planet called QMamecat (derived from MAMECAT, which was text-only).

QMamecat was based upon Qt 2; its development was frozen in 2003. QMC2 has been rebuilt from scratch as a Qt 4 project. Parts of the design and code were inspired by its predecessor, but it's not just a remake. We tried to make the new design as flexible as possible to minimize dependencies from frontend- and CLI-related MAME changes, which was a major deficiency of QMamecat. QMC2 now uses a template based emulator configuration scheme, which can easily be enhanced with additional command line options (defined in an XML template file).

As a result of this flexible design, QMC2 can be used for multiple emulators. Currently, only SDLMAME is supported.

XMAME support has been dropped since QMC2 0.2.b1 (use QMC2 0.1 if you still need XMAME!).

QMC2's current major features include:

- Extremely fast preview- & flyer- image support, optionally smoothly scaled (PNG images, buffered in a resizable LRU-cache)
- Support for game icons (also PNG images), fast (pre-)caching mechanism
- Icons, preview- & flyer-images can either be stored as individual files in respective directories or they can be combined and compressed in ZIP archives
- Easily extensible template-based emulator configuration scheme (defined through an external XML file)
- Cool editor for configuration of global and game-specific emulator command line options, with search function
- Support for all emulation-related extra information available through the emulator (displayed in a tree)
- Fast search function with automatic wildcard pattern matching
- Selectable sort criteria and order for gamelist (game description, game name, ROM state, year and manufacturer)
- Straightforward process management to control emulator processes
- Clear and full logging (separate frontend- and emulator-logs)
- Cached ROM state verification, indicated as colored spheres in front of each game description
- Verification of sample sets
- Game image checks (icons, previews & flyers)
- Online display of current gamelist and search result statistics
- Two gamelist views: full game detail and parent/clone hierarchy
- GUI will always remain interactive, so you may configure or play MAME (or whatever) even if heavy background-processing is active
- Time-consuming background tasks can be stopped on demand at (nearly) any time
- Optional auto-save/restore of window layout and game selection
- Multi-platform support
- Fully multi-language capable - right now, translations exist for English (us), German (de), Polish (pl) and French (fr)
- Game favorites management and play-history
- Online HTML documentation and browser
- Designed to be used for multiple emulators (currently SDLMAME only)
- Built-in support for GUI styles (KDE 4 / Qt 4 style plugins are supported)
- Automatic caching of analysed game data to speed up gamelist processing
- MAME configuration import/export from/to mame.ini/gamename.ini
- All shortcuts & GUI control keys can be remapped
- Removal of obsolete samples & image files (stored in directories or ZIP archives)
- Automatic caching of -listxml output from MAME
- Built-in ROMAlyzer to deeply analyze a game's ROMs and CHDs - inspired by Carsten Engel's ROMAlyzer script (see scripts/romalyzer.pl in source distribution)
- Support for direct GUI control via analog and digital joysticks, requires SDL (work in progress and disabled for now)

### 2. Build and installation instructions

Software requirements:

Software requirement | Where to get
Qt 4.3.0+ | http://www.trolltech.com/developer/downloads/qt/x11
GNU make 3.8+ | ftp://ftp.gnu.org/pub/gnu/make
zlib 1.2.3+ | http://www.zlib.net/
SDLMAME 0.124+ | http://rbelmont.mameworld.info/?page_id=163
Additional tools (optional): zip 2.31+ coreutils 6.4+ | http://www.info-zip.org ftp://ftp.gnu.org/pub/gnu/coreutils
Joystick support (optional): SDL 1.2.11+ | http://www.libsdl.org

Uncompress and untar the source distribution archive:

    $ bzip2 -d qmc2-<version>.tar.bz2
    $ tar xvf qmc2-<version>.tar

Make sure that the environment is setup correctly:

    $ cd qmc2
    $ export QTDIR=/your/qt4/installation/directory

At this point, you may have to create (or adjust) an OS-dependent configuration file, if your platform should not be in the list of tested operating environments; see section 8. for more details.

Now you are ready to run the build process:

    $ make

If you have an SMP system, you should better run make in jobserver mode, this is completely safe and much faster. For example:

    $ make -j3

(replace "3" with "#CPUs + 1")

QMC2 is generally prepared to support multiple emulators. You have to choose which target emulator you're going to use. SDLMAME is the default emulator. For other potential emulators, please use the following make command:

    $ make [-jX] EMULATOR=<emulator-name>

Joystick support is optional (but enabled by default) and requires SDL - the Simple DirectMedia Layer. If you would like to disable it, for example because SDL is not supported on your OS (huh?), you could use the JOYSTICK make command line option to do so:

    $ make [-jX] JOYSTICK=0

As soon as QMC2 has been compiled and linked completely, it's ready for use. There is no need to explicitly install QMC2 as it has been designed to work fully self-contained. Even the data-directory can be kept locally, which works well.

However, it's still advisable to install QMC2 system-wide (you have to do this as root). The user's configuration and his data will be kept locally (in $HOME/.qmc2/):

    $ su
    Password:
    # make install [EMULATOR=<emulator-name>]
    # exit

See

    $ make help

for more information.

### 3. Command line arguments and configuration

Usage:

    $ qmc2 [qt4_arguments]

QMC2 does not provide any arguments except those inherited from Qt 4.

Here's the list of all optional Qt 4 arguments quoted from http://doc.trolltech.com/4.3/qapplication.html#QApplication

- -style= style, sets the application GUI style. Possible values are `cde`, `motif`, `windows`, `plastique` and `cleanlooks`. If you compiled Qt with additional styles or have additional styles as plugins, these will also be available to the `-style` command line option. This argument will only be regarded if the style setting of QMC2 is set to Default!
- -style style, is the same as listed above
- -session= session, restores the application from an earlier session
- -session session, is the same as listed above
- -widgetcount, prints debug message at the end about number of widgets left undestroyed and maximum number of widgets existed at the same time

The X11 version of Qt also supports some traditional X11 command line options (please note that some of these arguments are useless as they will be overwritten with QMC2's configuration settings):

- -display display, sets the X display (default is $DISPLAY)
- -geometry geometry, sets the client geometry of the first window that is shown
- -fn or `-font` font, defines the application font. The font should be specified using an X logical font description
- -bg or `-background` color, sets the default background color and an application palette (light and dark shades are calculated)
- -fg or `-foreground` color, sets the default foreground color
- -btn or `-button` color, sets the default button color
- -name name, sets the application name
- -title title, sets the application title
- -visual `TrueColor`, forces the application to use a TrueColor visual on an 8-bit display
- -ncols count, limits the number of colors allocated in the color cube on an 8-bit display, if the application is using the QApplication::ManyColor color specification. If count is 216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of green, and 6 of blue); for other values, a cube approximately proportional to a 2x3x1 cube is used
- -cmap, causes the application to install a private color map on an 8-bit display

Notes on the configuration of QMC2:

- The user's configuration file will be stored as $HOME/.qmc2/qmc2.ini
- A system-wide default configuration can be used to pre-configure QMC2 for your users (common path: /etc/qmc2/qmc2.ini)
- If no configuration can be found for a specific option, hard-coded default values will be used for all frontend settings (see code); default values for the emulator configuration are read from the current XML template (common path: /usr/local/share/qmc2/opt/template.xml)
- If the path to the emulator's executable file has not been set (yet), QMC2 will assume that you are starting it for the first time (your setup is incomplete as long as this option hasn't been set!)
- Although it is recommended to edit the configuration with the built-in setup dialog, you may change it manually with any editor at your own risk; only do this if QMC2 is NOT currently running!

### 4. Gamelist statistics, ROM status and the ROMAlyzer

Gamelist statistics are shown in the lower-left corner of the main widget, below the gamelist. The letters - and their colors - have the following meanings:

Letter | Icon / Color | Meaning

L

| black

Number of Listed games

C

| green

Number of Correct games (*)

M

| yellowgreen

Number of Mostly correct games (*)

I

| red

Number of Incorrect games (*)

N

| grey

Number of games which were Not found (*)

U

| blue

Number of games with an Unknown ROM status

S

| brown

Number of game-matches for the current Search-pattern (if any)

(*) only available if the ROM state has been checked

If any statistical number is yet undetermined, a question mark (?) is shown instead.

Individual ROM states are displayed in the gamelist itself, indicated by colored sphere icons in front of each game entry (see table above). When using the classic image set, BIOS ROMs will contain a white B in their ROM status icons and obviously cannot be run. Other (= non-default) image sets may indicate BIOS ROMs differently.

Depending on your hardware, ROM status determination may be a very time-consuming task, so it's not started automatically. You have to explicitly trigger a ROM check (see Tools menu) at least once. To speed up this process for future runs, ROM states are cached in an external ROM state cache file (default: $HOME/.qmc2/qmc2.rsc). If QMC2 finds cached ROM state information in this file, it will read the states for each game from the cache when the gamelist is reloaded.

Unless the option AutoTriggerROMCheck (available since v0.1.b11) hasn't been activated, it is in your responsibility to trigger a re-check of the ROM states when anything changes (ROM images or MAME updates, for example). If the number of totally supported games is different than the number of cached ROM states, QMC2 will log a warning to the frontend log (and optionally trigger an automatic ROM check, if AutoTriggerROMCheck has been set).

Since v0.1.b10 QMC2 also supports individual ROM checks, so changes to only some games of your collection do not force you to fully re-check every ROM. For MAME updates there is no way around it, though (unless you know which games may have changed or have been added).

ROM states can also be used to filter and/or sort the gamelist. Please note that as a matter of principle the ROM state filter cannot be applied to the hierarchical parent/clone view of the gamelist, because the display of clones depends on the display of their parents.

BTW, the words game and ROM are used as synonyms within QMC2.

ROMAlyzer

Since v0.2.b1, there is also a so called ROMAlyzer which allows to deeply scan individual (or multiple) games for their exact ROM state. This work was inspired by Carsten Engel's romalyzer.pl Perl script (see scripts/romalyzer.pl in the source distribution) - he also offered very helpful comments on ROM identification and how to handle CHDs. Thanks!

ROMAlyzer features & restrictions:

- Imitates MAME's way of finding ROMs, using their CRCs to identify them.
- Uses the XML game data to compare (expected) checksums and sizes as well as to know which ROM & CHD files are required, if they need to be merged from other games etc.
- ZIP-archived ROMs will be decompressed and their checksums will be recalculated on-the-fly (this will also identify ZIP-archives with an invalid file integrity).
- ROMs which are stored in game-directories (not ZIP-archived) will be loaded to calculate their hashes.
- All required hash algorithms are supported: CRC(-32), SHA1 and MD5.
- CHDs (only v3+) are not yet decompressed, their header checksums are used instead (the provided hashes are for the uncompressed data).
- ROM and CHD files will never be fully loaded into memory, only small blocks of data are read for hash calculation and dropped directly afterwards.
- Long ROMAlyzer runs can be paused / resumed (or stopped) at nearly any time.

### 5. GUI style plugins

GUI styles can either be selected on the command line (-style, see section 3.) if the GUI style setting is setup as Default, or by explicitly selecting a style plugin from the respective combo-box in the setup dialog (see Frontend -> GUI).

If the GUI style is setup as Default and not overwritten on the command line, the system's default style will be used.

KDE styles are supported, but only if they were made for KDE 4 (Qt 4)!

Since v0.1.b11, support for style-specific custom color palettes (which can be setup with qtconfig) has been added. The default behavior of QMC2 is to use the default palette, though (same as before). You can disable this via the StandardColorPalette setting to enable the use of customized color palettes (see Frontend -> GUI in the configuration dialog).

### 6. Shortcuts and special keys

Several functions (or actions in Qt technical jargon :) can be accessed via shortcut key-sequences. The following table lists all of them:

Shortcut | Function
CTRL+P | Play the currently selected game (start emulation)
CTRL+F | Copy the currently selected game to the list of favorites
CTRL+R | Reload the entire gamelist
CTRL+X | Stop any active processing, otherwise exit QMC2
CTRL+O | Open the options dialog
CTRL+T | Housekeeping: recreate template configuration map (needed if the XML options template changes at run-time)
CTRL+I | Housekeeping: clear image cache
CTRL+N | Housekeeping: clear icon cache
CTRL+H | QMC2 documentation browser
CTRL+A | About QMC2: version, license etc.
CTRL+Q | About Qt: version, license etc.
CTRL+S | Check current game's ROM state individually and update its state in the ROM state cache
CTRL+D | Analyse (deep-scan) current ROM with the ROMAlyzer
CTRL+Z | Open ROMAlyzer to analyse one or more games of your ROM collection
CTRL+L | Reserved: setup layout of fullscreen arcade mode
CTRL+1 | Check ROM states for all games in your collection and recreate the ROM state cache from scratch
CTRL+2 | Check sample set for games that need samples
CTRL+3 | Check preview images for existance & accessability
CTRL+4 | Check flyer images for existance & accessability
CTRL+5 | Check icon images for existance & accessability
F5 | View gamelist with full detail
F6 | View parent/clone hierarchy
F11 | Reserved: toggle between normal mode and fullscreen arcade mode

Since v0.1.b11, QMC2 also supports remapping of all these shortcuts and some special keys (cursor keys, tab, +/-, ...) needed for GUI control by key-strokes. It should be very handy for users of MAME cabinets with sticks that map their controls to key-strokes (X-Arcade controls for example). We hope it's useful for others as well :).

### 7. External tools and tool argument syntax

External tools like zip or rm are used for specific operations which weren't natively built into QMC2.

For example, to remove obsolete image files from ZIP archives, QMC2 uses an external zip-tool and passes the files to be removed on the argument list when the zip-tool is started. We recommend to use Info-ZIP's zip 2.31+ which is what we've tested. But it could be any zip program that supports the deletion of multiple entries from ZIP archives at once.

Similarly, a second tool is needed for the deletion of files within filesystems (when images are stored directory based, for example). We recommend rm from GNU coreutils 6.4+. This tool also needs to support the deletion of multiple files in one step.

Tools can have a single function or they can have multiple functions. For each function, an argument list has to be specified which defines the correct syntax for the command. Macros (like $MACRONAME$) can be used as placeholders and will be filled with real data before execution.

The following macros exist:

Macro | Will be replaced with... | Valid tools
$ARCHIVE$ | ... the currently processed ZIP archive's filename (fully qualified) | Zip tool
$FILELIST$ | ... the currently processed list of files ("file1 file2 ..." - fully qualified) | Zip tool File removal tool

Everything else will be passed as literal text at the position where it's specified (see Frontend -> Tools in setup dialog).

When external tools are started by QMC2, a simple tool-executor dialog will pop up to display the command and its output.

### 8. Multi-platform support

As the frontend-code has been designed with full POSIX-portability in mind, QMC2 should work on any UNIX or UNIX-like platform, provided Qt 4 and SDLMAME (or whatever emulator may be used) are supported on this platform as well.

However, you may have to create or adopt the corresponding OS-specific configuration file, which is arch/`uname`.cfg. If it does not exist nor fit your local situation, the build will most likely fail:

    $ make ARCH=test
    ls: arch/test.cfg: No such file or directory
    Qmake version: 1.07a (Qt 3.3.7)
    Qmake is free software from Trolltech AS.
    Error: Wrong QMake version. QMake version 2 (Qt 4) required!

Note that by using the ARCH-variable on the make command line, you could easily specify a local configuration, even if a system configuration file already exists for your platform. Take the one that comes nearest to your system configuration and change it to your needs.

Since v0.1.b10, there's an alternative method which will help to solve distribution-specific build problems. Let's say you wanted to use the Qt 4 packages provided by your distribution and you know that the version is sufficient. So, instead of just considering Linux as the OS name (or architecture), also consider the local differences of this type of setup:

    $ make DISTCFG=1

If make is called this way, the QMC2 build process will try to figure out what the exact name and release of your OS / distribution is. It will load the OS-specific configuration just as before (i.e. arch/Linux.cfg), but it will overwrite the OS configuration settings with the distribution-specific configuration settings (i.e. arch/Linux/openSUSE_10.2_(i586).cfg). This means that only differences to the global OS configuration need to be placed in this file.

Of course, this mechanism requires that a specific configuration file for your OS / distribution exists. If not, the build will fail. Create the required file (see output from make or run make os-detect to figure out the correct name of the configuration file) and try again!

In case of any trouble, feel free to contact us (see section 9.). Please attach the output of make os-detect in this case!

Also, please send us your configuration file if you try QMC2 on other platforms / distributions than the ones included in the arch/ or arch/<os-name>/ directories. Regardless if you are successful or not, any help is greatly appreciated (see section 10.).

We are especially interested to hear how it works on Mac OS X; it's expected to run, but no one reported back yet. Preliminary tests show that it would even be possible to port it to Win32 (using Qt 4 for Windows and the MinGW compiler), but we are most likely not going to officially support this any time soon.

### 9. Contact

Project homepage:

- http://www.mameworld.net/mamecat/

Development site:

- http://sourceforge.net/projects/qmc2

QMC2 development mailing list:

- qmc2-devel@lists.sourceforge.net (subscribers only)
- https://lists.sourceforge.net/lists/listinfo/qmc2-devel

### 10. Contributing

Help and contributions are greatly appreciated. Following are the most important areas where we need your support:

- beta testing, bug hunting
- documentation
- translations (application and documentation)
- graphics / GUI design

If you think you can help us in one or more of these areas, please contact us!

We are using SourceForge.net as our open-source development platform. If you intend to become a QMC2 developer, note that you're required to use SVN (Subversion).

See credits.html for a list of contributers.

### 11. License and copyright

QMC2 - M.A.M.E. Catalog / Launcher II
Copyright © 2006 - 2008 R. Reucher, Germany, All Rights Reserved

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the license, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Third party software used in this project:

Minizip 1.01e
Copyright © 1998 - 2005 Gilles Vollant, http://www.winimage.com/zLibDll/minizip.html, info@winimage.com

See copying.html for the GNU General Public License.

### 12. Legal notice

Please note that you are required to have permission to use or to be the legal owner of any ROM images you are going to run through M.A.M.E. and / or this frontend. The goal of emulators such as M.A.M.E. and its surrounding projects (like QMC2) is educational and academic (of course, it's also fun :).

We do NOT and will NEVER encourage or support any type of illegal use!

However, a hand full of ROM images has been released for free for non-commercial use. For example, see the MAME-compatible ROM images at http://www.mamedev.org/roms/ for more information.