MAME
MAME is a free and open-source emulator designed to emulate the hardware of arcade games, later expanded to include video game consoles, old computers and other systems in software on modern personal computers and other platforms. Its intention is to preserve gaming history by preventing vintage video games from being lost or forgotten. It does this by emulating the inner workings of the emulated machines; the ability to actually play the video games is considered "a nice side effect". Joystiq has listed MAME as an application that every Windows and Mac gamer should have.
The first public MAME release was by Nicola Salmoria on 5 February 1997. Now, the project documents over 32,000 individual systems, with more than 10,000 working titles, including arcade hardware, home computers, and video game consoles, though not all of the games are playable. MESS, an emulator for many video game consoles and computer systems, based on the MAME core, was integrated into MAME in 2015.
History and overview
The MAME project was started by Italian programmer Nicola Salmoria. It began as a project called Multi-Pac, intended to preserve video games in the Pac-Man family, but the name was changed as more games were added to its framework. The first MAME version was released in 1996. In April 1997, Salmoria stepped down for his national service commitments, handing stewardship of the project to fellow Italian Mirko Buffoni for half a year. In May 2003, David Haywood took over as project coordinator; and from April 2005 to April 2011, the project was coordinated by Aaron Giles; then Angelo Salese stepped in as the coordinator; and in 2012, Miodrag Milanovic took over. The project is supported by hundreds of developers around the world and thousands of outside contributors.At first, MAME was developed exclusively for MS-DOS, but it was soon ported to Unix-like systems, Macintosh and Windows. Since 24 May 2001, with version 0.37b15, MAME's main development has occurred on the Windows platform, and most other platforms are supported through the SDLMAME project, which was integrated into the main development source tree in 2006. MAME has also been ported to other computers, game consoles, mobile phones and PDAs and, at one point, even to digital cameras. In 2012, Google ported MAME to Native Client, which allows MAME to run inside Chrome.
Major releases of MAME occur approximately once a month. Windows executables in both 32-bit and 64-bit fashion are released on the , along with the complete source code. Smaller, incremental "u" releases were released weekly as source diffs against the most recent major version, to keep code in synchronization among developers. MAME's source code is developed on a public GitHub repository, allowing those with the required expertise and tools to build the most up-to-date version and contribute enhancements as pull requests. Historical version numbers 0.32, and 0.38 through 0.52 inclusively, do not exist; the former was skipped due to similar naming of the GUI-equipped MAME32 variant, while the latter numbers were skipped due to the numerous releases in the 0.37 beta cycle.
MAME's architecture has been extensively improved over the years. Support for both raster and vector displays, multiple CPUs, and sound chips were added in the project's first six months. A flexible timer system to coordinate synchronization between multiple emulated CPU cores was implemented, and ROM images started to be loaded according to their CRC-32 hash in the ZIP files they were stored in. MAME has pioneered the reverse engineering of many undocumented system architectures, various CPUs and sound chips. MAME developers have been instrumental in reverse engineering many proprietary encryption algorithms utilized in arcade games, including Neo Geo, CP System II and CP System III.
MAME's popularity has gone mainstream, with enthusiasts building their own arcade game cabinets to replay old games and even some companies producing illegal MAME derivatives to be installed in arcades. Cabinets are built either from scratch or by taking apart and modifying an original arcade game cabinet. Cabinets inspired by classic games can also be purchased and assembled.
Although MAME contains a rudimentary user interface, the use of MAME in arcade game cabinets and home theaters necessitates special launcher applications called front ends with more advanced features. They provide varying degrees of customization, allowing one to see images of games' cabinets, histories, playing tips, specialized logo artwork for games, and video of the game's play or attract mode.
The information within MAME is free for reuse, and companies have been known to utilize MAME when recreating their old classics on modern systems. Some have even hired MAME developers to create emulators for their old properties. An example is the Taito Legends pack, with ROMs readable on select versions of MAME.
On 27 May 2015, the games console and computer system emulator MESS was integrated with MAME. This also led to the removal of the acronym, as MAME can now emulate more than arcade machines. Since 2012, MAME has been maintained by former MESS project leader Miodrag Milanović.
In May 2015, it was announced that MAME's developers planned to re-license the software under a more common free and open-source license, away from the [|original MAME license]. MAME developer Miodrag Milanovic explained that the change was to draw more developer interest, allow game manufacturers to distribute MAME to emulate their own games, and to make the software "a learning tool for developers working on development boards". The transition of MAME's licensing to BSD/GPL was completed in March 2016. Most of MAME's source code is now available under the BSD-3-Clause license, and the complete project is under the GPL-2.0-or-later license.
On 24 February 2016, MAME embedded the MEWUI front-end, providing MAME with a flexible and more full-featured UI.
On 30 December 2021, exA-Arcadia, the Western copyright holders of the games Akai Katana and DoDonPachi SaiDaiOuJou had their lawyers file a cease and desist notice to the MAME developers over those games being included in the emulator. MAME complied with the request a day later, making both unplayable on the emulator outside of command line, as of version 0.240.
Design
The MAME core coordinates the emulation of several elements at the same time. These elements replicate the behavior of the hardware present in the original machines. MAME can emulate many different central processing units and associated hardware. These elements are virtualized so that MAME acts as a software layer between the original program of the game, and the platform MAME runs on. MAME supports arbitrary screen resolutions, refresh rates and display configurations. Multiple emulated monitors, as required by, for example, Darius, are supported as well.Individual systems are specified by drivers which take the form of C preprocessor macros. These drivers specify the individual components to be emulated and how they communicate with each other. While MAME was originally written in C, the need for object oriented programming caused the development team to begin to compile all code as C++ for MAME 0.136, taking advantage of additional features of that language in the process.
Although a great majority of the CPU emulation cores are interpretive, MAME also supports dynamic recompilation through an intermediate language called the Universal Machine Language to increase the emulation speed. Back-end targets supported are x86 and x64. A C back end is also available to further aid verification of the correctness. CPUs emulated in this manner are SH-2, MIPS R3000 and PowerPC.
ROM data
The original program code, graphics and sound data need to be present so that the system can be emulated. In most machines, the data is stored in read-only memory chips, although other devices such as cassette tapes, floppy disks, hard disks, laserdiscs, and compact discs are also used. The contents of most of these devices can be copied to computer files, in a process called "dumping". The resulting files are often generically called ROM images or ROMs regardless of the kind of storage they came from. A game usually consists of multiple ROM and PAL images; these are collectively stored inside a single ZIP file, constituting a "ROM set". In addition to the "parent" ROM set, games may have "clone" ROM sets with different program code, different language text intended for different markets etc. For example, Street Fighter II Turbo is considered a variant of Street Fighter II Champion Edition. System boards like the Neo Geo that have ROMs shared between multiple games require the ROMs to be stored in "BIOS" ROM sets and named appropriately.MAME ROMs come in three forms, split, non-merged, and merged:
- A "split" ROM only contains information about itself. For example, a "clone" ROM does not have the necessary data the "parent" ROM has, and a "parent" ROM will not contain its clones.
- A "non-merged" set is a ROM that has everything a program needs to run in one ZIP file, such as its "parent". Non-merged ROMs take up more space due to redundancy, but they are useful for cases where only a specific set of programs are desired, such as only desiring one specific version of a game without desiring to also obtain the other required files.
- A "merged" set is a ROM that contains the "parent" ROM and its "clones" in one package. For example, a merged Pac-Man ROM would contain the "parent" Japanese Puck-Man ROM, the Midway USA Pac-Man version, and all other clone or bootleg versions of the game. It is more space-efficient than a split set.