Changes

MAME

7,091 bytes added, 18 April
Pang screenshot caption modification. MAME emulation is not “glitchy” anymore.
[[File:Mess sysinfo.png|thumb|260pxupright=.9|The MESS MAME system info box for the CPC6128]][[File:Mess gx4000 pang.png|thumb|upright=1.2|MAME also has support for the GX4000 and CPC+ series. Here is shown ''[[Pang (cartridge)|Pang]]'' for the GX4000.]]'''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.
'''''MESS''''' (Multi Emulator Super System) is an emulator for vintage computers, gaming consoles, chess computers, and calculators. It is a descendant of the MAME arcade emulation project and just like MAME, the The most important goal of MESS MAME is highly accurate emulation, not speed. MESS and MAME are is mainly a preservation projects project that aim aims to reproduce the behavior behaviour of the real hardware perfectly, so CPU usage may be slightly higher than many dedicated CPC emulators.
Currently, over 450 ==Emulated systems are supported, including the CPC and CPC Plus ranges and the GX4000.[http://www.mess.org/mess:drivers:amstrad] This is probably the main reason for using MESS, that 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). MESS does not have the depth of other emulators, but it sure has enormous breadth.==
MESS runs on WindowsCurrently, Mac OS X, Linux, and FreeBSD. If you also use MAME, you may want to get [http://mamedevwww.emulabprogettoemma.itnet/hazemess/latest-ume-mame-mess-binaries UMEsysset.php over a thousand systems are supported] insteadby MAME, which combines MESS including the CPC and CPC Plus ranges and the GX4000. This is probably the main reason for using MAME into a : A single executable with 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 shared configuration file, ume.iniROM set that works (see below).
==Command line arguments==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.
==Installation==
 
MAME runs on Windows, Mac OS X, Linux, and FreeBSD. You can get Windows binaries from [http://mamedev.org/release.html mamedev.org].
 
On OS X, you can install MAME via [http://brew.sh/ Homebrew]:
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:
alias mame=/usr/share/sdlmame/sdlmame
 
==Starting MAME; command line arguments; MAME menu; quitting==
[[File:MAME menu CPC.png|thumb|upright|The MAME menu]]
First get the [[Media:CPC_ROMs_for_MAME.zip|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. (See also [http://docs.mamedev.org/usingmame/defaultkeys.html default keys].)
 
You can use the "-ab" commandline option to type text into MAME, e.g.
mame cpc6128 -flop1 disk.dsk -ab "run\"disc\n"
will boot the disc.
 
===Device options for the CPC from [http://www.progettoemma.net/mess/extra.html sysinfo.dat]===
{|class="wikitable"
|'''Name'''
|Cartridge
| -cart
|.cpr; .bin '''(Plus series and GX4000 only)'''
|}
 
(info from [http://www.progettoemma.net/mess/extra.html sysinfo.dat])
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".
==Keyboard options=Python script to start MAME in CPC mode===On Linux, you can also set your file manager (e.g. Nautilus or Konqueror) to open .dsk files with the following Python script:<pre>#!/usr/bin/env python
MESS generally supports two keyboard mode command line options# Call as# "cpc" : '''emulated''' (the default; based on key position) and '''natural''' (command line option keyboard# "-cpcn" : natural"; based on the character generated by a key, e.g. pressing "z" will always generate a "z" on the emulated system, even if the keyboard positions are different).
In emulated modeimport os, keys can also be remapped os.path, zipfilefrom the emulator menu: first press ''Scroll Lock'' to enable the MESS control keys, then press ''Tab'' to open the menu, and finally select ''Input (this system)''.sys import argv
if 'cpcn' in argv[0]: nat ='-natural'else: nat =ROMs==''
Just as in MAME, some MESS ROMs have parent ROMs that also need to be installed. E.g., <tt>s = "/usr/share/sdlmame/sdlmame cpc6128.zip<-skip_gameinfo -window %s -keymap -keymap_file /tt> also requires <tt>cpc464.zip<usr/share/sdlmame/keymaps/tt> to runkm_de_LINUX.map" % nat
ROMs often only work with def checkzip(t): "Check if file is a specific version of MESSZIP file; use the first file in the archive" if t[-4:]. 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 MESS expectedlower() == '.zip': a = zipfile.ZipFile(t).namelist() t = os.path.join(t, a[0]) return t
if len(argv) > 1: for x in range(1, len(argv)): s +==Front' -ends==flop%u "%s"' % (x, checkzip(argv[x]))os.system(s)</pre>This script should open a MAME window with the disc inserted in drive A. (Note that this also selects the German keymap.) You can also use this to open ZIP files containing disc images, e.g. "cpc mydisc.zip" will try to insert the first file in the ZIP archive.
Various ==GUI front-ends for MESS exist for Windows, Linux, and OS X—see the list here: ==[http[File://wwwMameui.mess.org/mess:howto#frontendspng|thumb|MAMEUI64 on Windows]]
Several GUI front-ends for MAME/MESS exist for Windows, Linux, and OS X: *[http://www.mameui.info/ MAMEUI64] (Windows)*[http://qmc2.arcadehits.net/ QMC2] (Windows, OS X, Linux) ==Keyboard layouts== 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_LINUX.map You can also put these settings in your mame.ini like this: keymap 1 keymap_file /usr/share/sdlmame/keymaps/km_de_LINUX.map 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. ==CPC artwork==[[File:MessmenuMAME with CPC artwork.png|thumb|none|650pxMAME window with monitor type set to green and optional CPC artwork]]You can add optional bezel artwork to MAME to simulate a CPC monitor:*[[Media:Cpc6128 mame artwork.zip|MessMenu MAME artwork]] (CPC6128/GT65 bezel) Rename this file to cpc6128.zip and put it in MAME's artwork folder (~/.mame/artwork/ on OS X Linux). ==ROMs and extension hardware== [[Media:CPC_ROMs_for_MAME.zip|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., <tt>cpc6128.zip</tt> also requires <tt>cpc464.zip</tt> 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 selectedfilenames or checksums do not match what MAME expected. Currently, seven different  ===Slot options (extension hardware)===[[File:MESS with Dobbertin Smart Watch.png|thumb|upright=1.4||MAME with the Dobbertin Smart Watch ROM loaded (-exp smartwatch)]][[File:Brunword mame.png|thumb|upright=1.4||BrunWord MK4 (ROM) main menu in MAME 0.162 (-exp brunword4)]] You can get a list of slot options with  mame cpc6128 -lslot These are (as of MAME 0.168): *for "-centronics"{|class="wikitable"|-|pl80 |COMX PL-80|-|ex800 |Epson EX-800|-|lx800 |Epson LX-800|-|lx810l |Epson LX-810L|-|ap2000 |Epson ActionPrinter 2000|-|printer |Centronics Printer|-|digiblst |[[Digiblaster]] (DIY)|} *for "-exp"{|class="wikitable"|-|ssa1 |[[Amstrad SSA-1 Speech Synthesizer]]|-|dkspeech |[[Dk'tronics Speech Synthesizer]]|-|rom |ROM Box|-|multiface2 |[[Multiface II]]|-|pds |[[PDS development system|Programmers Development System (CPC models Target)]]|-|rs232 |Pace RS232C interface|-|amsrs232 |[[Original Amstrad RS232 interface|Amstrad RS232C interface]]|-|sf2 |[[SYMBiFACE II]]|-|amdrum |[[Amdrum]]|-|playcity |[[PlayCity]]|-|smartwatch |[[Dobbertin Smart Watch]]|-|brunword4|[[BrunWord]] Elite MK4|-|hd20|[[Dobbertin Harddisc]]|-|doubler|[[Draysoft Doubler]]|-|transtape|HM [[Transtape]]|} ===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 supportedthis way. ===[[Dobbertin Harddisc]]=== From the [http://www.cpcwiki.eu/forum/emulators/got-bored-again/msg102272/#msg102272 forum post]: To use, including some regional variants 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 (French and Swedish-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 fileYou 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.]]
==CRT simulation==
[[File:Cpc shader mess.png|thumb|upright=1.5|GLSL shader example]][[File:Cpc hlsl shader mess MAME BGFX Linux detail.png|thumb|HLSL "1980s" BGFX output with default shader (detail)settings]]Like MAME, MESS can use shaders to simulate typical CRT graphics artifacts such as scanlines, colors bleeding into each other, jitter, and display curvature. This involves editing mess ===BGFX=== The easiest way to do this (works on Windows, OS X, and Linux) since MAME 0.172 is to enable [https://github.com/bkaradzic/bgfx BGFX] video output: Put this in your mame.ini :  video bgfx bgfx_screen_chains hlsl (or umeYou may also have to set bgfx_path to the bgfx directory if MAME cannot find the shaders.ini ) Check with F11 if you use UMEstill get 100% performance. If not, adjust frame skip with F8/F9. Also, if you press the tilde (~) and then cursor up/down, you can adjust the shader settings (they are also under Slider Controls in the MAME menu).These are not saved at the moment though.[http://docs.mamedev.org/advanced/bgfx.html] If you edit bgfx/chains/hlsl.json in a text editor, you can change the default values. E.g., to reduce the Moiré pattern, search for "Shadow Mask Amount" and change it to:  "default": 0.20 ===HLSL and GLSL===[[File:Cpc hlsl shader mess detail.png|thumb|HLSL "1980s" shader (Windows); MAME config used is on image description page]]
Mess.ini works the same as mame.ini, so MAME tutorials can be used as a starting point. Some example Older methods for CRT simulation are manual HLSL and GLSL configurations, here are some examples:
*Windows (using HLSL shaders)
**A scripted setup with separate "1980s" and "1990s" CRT configs: [http://shmups.system11.org/viewtopic.php?f=6&t=45026&start=240] (huge post is halfway down the page)
==Remaining issues with CPC emulation==
*MESS will usually MAME may fail to read DSK images that use 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 done may be broken in demos (MAME, e.g. overscan) pictures are still slightly broken in MESShorizontally misaligned (i.*Loading extension ROMs is also not supportede==JSMESS, a JavaScript port==shifted to the right).[[File:Jsmess in Chromium*CPC+/GX4000 emulation still has some obvious graphics glitches.png|thumb|upright=1.1|JSMESS emulating a CPC 6128 in Chromium 30 on Linux]] MESS *The emulated CPC464 has also recently been ported to JavaScript using the C/C++-to-JS transcompiler Emscripten; this port AMSDOS ROM loaded which is called [http://jsmess.textfiles.com/ JSMESS]. So far only a small selection of MESS machines are supported in JSMESS—the main problem is finding out which MESS modules are needed for a given architecture and creating the Makefiles accordingly, although JSMESS now includes scripts with early 464-only programs that scan for dependencies. A JSMESS fork that includes rely on the necessary Makefiles to build the CPC 6128 version is here: [https://github.com/mdoege/jsmess] Note that cpc6128.zip also needs to contain the ROM files from cpc464.zip because unlike regular MESS, JSMESS only loads a single ROM ZIP file per machine464's larger free memory.
Currently, sound only works in Firefox and not in Chrome/Chromium.==Compiling to JavaScript==
A JSMESS CPC demo page with the SubHunter disc Since MAME 0.168 (released in November 2015), MAME can be found here: compile to JavaScript using Emscripten's emmake command.[http://mdoegemamedev.github.ioorg/jsmessreleases/whatsnew_0168.txt][[JSMESS]] is therefore no longer necessary to compile e.g. the MAME/MESS CPC emulator for web browsers.
==Links==
*{{EnWiki}}
*[http://www.messmamedev.org/ Official site]
*[http://www.mess.org/mess:howto MESS user's manual]
*[http[Media://wwwCPC_ROMs_for_MAME.emunews.eu/mess-bioses/ zip|CPC ROMs for MESSMAME] (look for <tt>cpc]*[https://linux-user.zip<gr/tt>t/one-retro-cumputers-emulator-to-rule-them-all/1302 one-retro-cumputers-emulator-to-rule-them-all-(in-greek-language)]
[[Category:Emulator]]
9
edits