MAME (Multiple Arcade Machine Emulator) is a multi-platform emulator for arcade games, home computers, gaming consoles, chess computers, calculators, etc. MAME 0.162 (released on May 27, 2015) merged the previously separate MAME and MESS (Multi Emulator Super System) projects into one, so that a single executable now combines the emulation capabilities of pre-0.162 MAME/MESS.
The most important goal of MAME is highly accurate emulation, not speed. MAME is mainly a preservation project that aims to reproduce the behaviour of the real hardware perfectly, so CPU usage may be slightly higher than many dedicated CPC emulators.
Currently, over a thousand systems are supported by MAME, including the CPC and CPC Plus ranges and the GX4000. This is probably the main reason for using MAME: A single download is enough to emulate more or less every home computer and gaming console that ever existed in the late 1970s and 1980s—provided one can find a ROM set that works (see below).
MAME does not have the depth of other CPC emulators, but it sure has enormous breadth. Its flexible input mapping and pixel shader effects make MAME particularly suited for gaming.
MAME runs on Windows, Mac OS X, Linux, and FreeBSD. You can get Windows binaries from mamedev.org.
On OS X, you can install MAME via Homebrew:
brew tap homebrew/games brew install mame
On Windows and OS X, the MAME binary is called mame, on Linux sdlmame. On some Linux distros such as Arch Linux you have to use absolute paths for disk images or ROMs because /usr/bin/sdlmame is a wrapper script that will cd to the directory with the MAME binary. Or you could simply skip the wrapper script and run /usr/share/sdlmame/sdlmame directly:
First get the CPC ROMs for MAME and unzip them into the MAME roms folder.
Typical command line to start MAME in CPC mode (windowed mode and with a disc inserted in drive A):
mame cpc6128 -skip_gameinfo -window -flop1 disk.dsk
Supported CPC models are cpc464, cpc464p, cpc664, cpc6128, cpc6128p, gx4000, cpc6128f (French), cpc6128s (Swedish), and the clones kccomp (KC Compact) and al520ex (Aleste 520EX; hold Shift during boot to go to Basic).
Press Scroll Lock to toggle partial keyboard emulation mode. Now you can use P to pause MAME, Tab to enter the MAME menu, and Escape to quit MAME. Alt-Return toggles fullscreen mode.
- Device options for the CPC from sysinfo.dat
|Name||Argument||Allowed file extensions|
|Disk drive A||-flop1||.dsk; .d77; .d88; .1dd; .dfi; .imd; .ipf; .mfi; .mfm|
|Disk drive B||-flop2|
|Cartridge||-cart||.cpr; .bin (Plus series and GX4000 only)|
Supported file types can also be shown with the "-listmedia" command line option.
You can use zipped disk images too. If there is more than one DSK image in the zip file, treat the zip file like a directory, e.g.
mame cpc6128 -flop1 disk.zip/disk0.dsk
MAME supports two keyboard modes:
- emulated (the default; keys are assigned based on key position on the emulated hardware)
- natural (command line option "-natural"; based on the character generated by a key, e.g. pressing "z" will always generate a "z" on the emulated system)
To use a German keyboard in emulated keyboard mode, start MAME e.g. with (key map path on Linux):
mame cpc6128 -keymap -keymap_file /usr/share/sdlmame/keymaps/km-de.txt
In emulated mode, keys can also be remapped in the emulator menu. First press Scroll Lock to enable the MAME control keys, then Tab to open the menu, and finally select Input (this system). Return, Esc clears an assigned key.
Note that the Delete and Backspace keys are swapped on the emulated keyboard because of the CPC keyboard layout. So you may want to reassign those. Escape on the CPC is mapped to the key left of "1" on the PC keyboard. Alt-Enter switches between windowed and full screen mode.
ROMs and extension hardware
CPC ROMs for MAME. Just unzip the file and move the ZIPs inside into the MAME ROM folder.
- General notes about MAME and ROMs
Some MAME ROMs have parent ROMs that also need to be installed. E.g., cpc6128.zip also requires cpc464.zip to run. (See the links section for CPC ROM files for MAME.)
ROMs often only work with a specific version of MAME. This does not seem to affect CPC ROMs, but other systems sometimes give an error message when ROM filenames or checksums do not match what MAME expected.
- Slot options (extension hardware)
You can get a list of slot options with
mame cpc6128 -lslot
These are (as of MAME 0.163):
- for "-centronics"
|ap2000||Epson ActionPrinter 2000|
- for "-exp"
|ssa1||Amstrad SSA-1 Speech Synthesizer|
|dkspeech||Dk'tronics Speech Synthesizer|
|pds||Programmers Development System (CPC Target)|
|rs232||Pace RS232C interface|
|amsrs232||Amstrad RS232C interface|
|smartwatch||Dobbertin Smart Watch|
|brunword4||BrunWord Elite MK4|
- Loading external ROMs
The ROM Box expansion can be used to load external ROMs such as MAXAM:
mame cpc6128 -exp rom -rom1 /path/to/MAXAM.ROM
Up to 8 external ROMs (-rom1 to -rom8) are supported this way.
From the forum post:
To use, add -exp hd20 to the commandline, which will also allow you to add -hard <filename>. Code:
mame cpc6128 -exp hd20 -hard1 disk.chd
Only MAME CHDs are supported, you can create a blank hard disk image using chdman. Geometry is 615/4/17. Code:
chdman createhd -o disk.chd -c none -chs 615,4,17
(-c none means no compression, but this is required for MAME to write directly to the CHD image. If you use compression, then data writes will be written to a separate file)
You can use X-DDOS 2.00 or 2.10 by using -exp hd20,bios=xddos200 or -exp hd20,bios=xddos210. v2.10 is the default.
See http://mahlemiut.marpirc.net/cpc_hd20.avi, a quick demo loading a game from HD.
Various GUI front-ends for MAME/MESS exist for Windows, Linux, and OS X:
MAME can use shaders to simulate typical CRT graphics artifacts such as scanlines, colors bleeding into each other, jitter, and display curvature.
Some example configurations:
- Windows (using HLSL shaders)
- Linux (using GLSL shaders): MAME tutorial 
Remaining issues with CPC emulation
- MAME may fail to read DSK images with certain kinds of copy protection. Speedlock seems to work fine though.
- MAME cannot write to disc images in DSK format; only MFI (MESS floppy image) and MFM (HxCFloppyEmulator floppy image) are supported for writing.
- Some demo tricks may be broken in MAME, e.g. overscan pictures are horizontally misaligned (i.e., shifted to the right).
- CPC+/GX4000 emulation still has some obvious graphics glitches.
- The emulated CPC464 has the AMSDOS ROM loaded which is a problem with early 464-only programs that rely on the 464's larger free memory.