asq
mame cabinet front end | |
A simple front end for mame/emulator cabinets.
It runs in a terminal window (using curses) on UNIX/linux/OSX (might work on Windows with CygWin or ActivePerl) It can optionally display images/screenshots for any games you have. (if perl Tk installed) It uses mame/emulator keybindings, so you can control your mame cabinet using just your mame controls. (In fact, this is where the name comes from - player 2 buttons 1,2,3) Doesn't verifyroms for MAME because I have the full set. Supports MAME as well as other emulators and various games. Someday maybe I'll add rom filtering... License:This software is essentially free, but please read my payment spielPlease read the full license |
Screenshot - click for full-size |
TYPE |
FORMAT (separate with tabs) |
|
Executable launcher (just runs a program) | <name> <exec> <optional_title> | |
Mame launcher (brings up a submenu of mame roms) | <name> MAME:<rom_path> <mame_path/args> | |
Executable selector (brings up a submenu of files, then runs a program) | <name> DIR:<dir> <command/args> |
Let's look at some examples:
Space Ace [DOS] /usr/games/bin/SpaceAce Mame (X11) MAME:/usr/games/roms mame.x11 Mame (SDL-fullscreen) MAME:/usr/games/roms mame.sdl -fullscreen Atari 2600 DIR:/usr/games/2600roms/ stella -fullscreenasq will only read the list of mame games if a MAME: type is found (and only reads it once). The two MAME: lines above show how you can specify different args for the same command by putting it on the menu more than once.
You can also specify filter the DIR: contents through a regexp to only pick certain types of files. As an example:
Commodore64 DIR[.d64]:/usr/games/c64/ x64 -dsize
asq can also temporarily remap keys (UNIX only, using xmodmap) for specific games/emulators, so that you don't have to whip out a keyboard just to play a game that doesn't use the mame "keyset".
To do this, specify an extra option on a launcher line in the asq.rc file:
Commodore64 DIR[.d64]:/usr/games/c64/ x64 -dsize MAP=/usr/games/c64.mapThe map file contains keys to replace while the game is playing (though it uses xmodmap, so the keys will be switched for your entire system while the game is playing, and if asq dies before fixing the keys, you'll be in a spot of trouble :). The keys are replaced all at once, which allows you to swap keys. A simple example:
# Map file for asq. Comments are ignored. Control_L space Left Right Right LeftThis mapfile will replace Control_L with space - so when you press what would be the left control (mame player 1 button 1), you'll get a space instead. It also swaps the left and right arrow keys. To get the proper names for keys, look at the output of xmodmap -pk.
For a better example, stella is an Atari2600 emulator which doesn't use normal mame keys. Here is my stella.map.
It may help to understand what keys I chose to use for my MAME cabinet, here's my basic layout, a 2x3 grid of control buttons and then two players, each with a joystick and a 3x2 grid of buttons. Here's the ascii layout:
5 7 Up 1 Shift_L Return r 2 w p F8 F9 Left Right Control_L Alt_L space d g a s q Escape Tab Down f
Each menu can have an image directory. When a menu item is active it will look for an image of the same name and of the given image type. Any text inside parentheses () is optional in the image name, and also mame rom names can be used instead of the full names.
Image directories are specified as an extra option to a launcher line (like MAP):
Commodore64 DIR[.d64]:/usr/games/c64/ x64 -dsize IMAGES[gif]=/usr/games/c64/imagesYou need to specify the type of images to look for (though you can specify multiple types separated with commas). Any types you use that aren't builtin to Tk will require a separate loader, such as Tk::JPEG.
Because mame rom names can be used, you can just set the IMAGES directory for mame roms to include the screenshots directory and then asq will automatically use screenshots as you take them. Make sure to include the 'png' image type in your IMAGES specification (this requires installation of the Tk::PNG module). Example:
Mame (X11) MAME:/usr/games/roms mame.x11 IMAGES[jpg,png]=/usr/games/mame/imagesYou can specify an IMAGES option and a MAP option, just separate them with tabs.