MAME explained

MAME
Logo Size:270px
Logo Alt:MAME Logo
Author:Nicola Salmoria
Developer:The MAME community
Latest Release Version:0.268 (July 31, 2024)
Programming Language:C++ (C and Python for some drivers)
Operating System:Windows, macOS, Linux, BSD, Amiga, etc.
Genre:Emulator
License:GPL-2.0-or-later, with some sub-parts BSD-3-Clause.(for versions since 0.172)

Original MAME license (for versions prior to 0.172)

MAME (formerly an acronym of Multiple Arcade Machine Emulator) is a free and open-source emulator designed to recreate the hardware of arcade games, video game consoles, old computers and other systems in software on modern personal computers and other platforms.[1] 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".[2] Joystiq has listed MAME as an application that every Windows and Mac gamer should have.[3]

The first public MAME release was by Nicola Salmoria on 5 February 1997. It now supports over 7,000 unique games and 10,000 actual ROM image sets, 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.

With OTVDM (WineVDM) a version of MAME is available to emulate 16-Bit DOS and Windows applications on x64 and AArch64 versions of Windows. The NTVDM from Microsoft is only supported for the 32-bit versions of Windows.[4]

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.[5] 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;[6] then Angelo Salese stepped in as the coordinator;[7] and in 2012, Miodrag Milanovic took over.[8] 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 (X/MAME), Macintosh (MacMAME and later MAME OS X) and Windows (MAME32). 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.[9] MAME has also been ported to other computers, game consoles, mobile phones and PDAs and, at one point, even to digital cameras.[10] In 2012, Google ported MAME to Native Client, which allows MAME to run inside Chrome.[11]

Major releases of MAME occur approximately once a month. Windows executables in both 32-bit and 64-bit fashion are released on the development team's official website, along with the complete source code.[12] Smaller, incremental "u" (for update) releases were released weekly (until version 0.149u1) as source diffs against the most recent major version, to keep code in synchronization among developers.[13] MAME's source code is developed on a public GitHub repository,[14] 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 (which itself has since been renamed MAMEUI due to the move to 64-bit builds), while the latter numbers were skipped due to the numerous releases in the 0.37 beta cycle (these version numbers have since been marked next to their equivalent 0.37 beta releases on the official MAMEdev website).[15]

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 CRC32 hash in the ZIP files they were stored in. MAME has pioneered the reverse engineering of many undocumented system architectures, various CPUs (such as the M6809-derivative custom Konami CPU with new instructions) and sound chips (for example, Yamaha FM 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.[16] [17] Cabinets inspired by classic games can also be purchased and assembled (with MAME optionally preinstalled).[18]

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.[19]

On 27 May 2015 (0.162), the games console and computer system emulator MESS was integrated with MAME (so the MESS User Manual is still the most important usage instruction for the non-arcade parts of MAME).[20] 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.[21] [22] Most of MAME's source code (90%+) is now available under the BSD-3-Clause license, and the complete project is under the GPL-2.0-or-later license.[23]

On 24 February 2016 (0.171), MAME embedded the MEWUI front-end (and its developer joined the team), providing MAME with a flexible and more full-featured UI.[24]

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.[25] MAME complied with the request a day later, making both unplayable on the emulator outside of command line, as of version 0.240.[26]

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 (CPUs) 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 (UML) 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 (ROMs), 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 (usually chosen as the most recent "World" version of the game), 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:[27]

Hard disks, compact discs and laserdiscs are stored in a MAME-specific format called CHD (Compressed Hunks of Data).[28] Some machines use analog hardware, such as laserdiscs, to store and play back audio/video data such as soundtracks and cinematics. This data must be captured and encoded into digital files that can be read by MAME. MAME does not support the use of external analog devices, which (along with identical speaker and speaker enclosures) would be required for a 100% faithful reproduction of the experience. An ever decreasing number of games with unemulated audio circuits require sound samples in WAV file format for sound emulation. MAME additionally supports artwork files in PNG format for bezel and overlay graphics. Furthermore, emulation of games with liquid-crystal displays such as Game & Watch or extra physical aspects such as slot machines usually require extra image files for backgrounds or other aspects of the games.

Philosophy, accuracy and quality

The stated aim of the project is to document hardware, and so MAME takes a somewhat purist view of emulation, prohibiting programming hacks that might make a game easier to run at the expense of emulation accuracy. Components such as CPUs are emulated at a low level (meaning individual instructions are emulated) whenever possible, and high-level emulation (HLE) is only used when a chip is completely undocumented and cannot be reverse-engineered in detail. Signal level emulation is used to emulate audio circuitry that consists of analog components.

MAME emulates well over a thousand different arcade system boards, a majority of which are completely undocumented and custom designed to run either a single game or a very small number of them. The approach MAME takes with regards to accuracy is an incremental one; systems are emulated as accurately as they reasonably can be. Bootleg copies of games are often the first to be emulated, with proper (and copy protected) versions emulated later. Besides encryption, arcade games were usually protected with custom microcontroller units (MCUs) that implemented a part of the game logic or some other important functions. Emulation of these chips is preferred even when they have little or no immediately visible effect on the game itself. For example, the monster behavior in Bubble Bobble was not perfected until the code and data contained with the custom MCU was dumped through the decapping of the chip.[29] This results in the ROM set requirements changing as the games are emulated to a more and more accurate degree, causing older versions of the ROM set becoming unusable in newer versions of MAME.

Portability and generality are also important to MAME. Combined with the uncompromising stance on accuracy, this often results in high system requirements. Although a 2 GHz processor is enough to run almost all 2D games, more recent systems and particularly systems with 3D graphics can be unplayably slow, even on the fastest computers. MAME does not currently take advantage of hardware acceleration to speed up the rendering of 3D graphics, in part because of the lack of a stable cross-platform 3D API, and in part because software rendering can, in theory, be an exact reproduction of the various custom 3D rendering approaches that were used in the arcade games.

Legal status

Owning and distributing MAME itself is legal in most countries, as it is merely an emulator. Companies such as Sony have attempted in court to prevent other software such as Virtual Game Station, a Sony PlayStation emulator from being sold, but they have been ultimately unsuccessful.[30] MAME itself has thus far not been the subject of any court cases.

Most games are still covered by copyright. Downloading or distributing copyrighted ROMs without permission from copyright holders is almost always a violation of copyright laws. However, some countries (including the US)[31] allow the owner of a board to transfer data contained in its ROM chips to a personal computer or other device they own. Some copyright holders have explored making ROMs available to the public through licensing. For example, in 2003 Atari made MAME-compatible ROMs for 27 of its arcade games available on the Internet site Star ROMs. However, by 2006 the ROMs were no longer being sold there. At one point, various Capcom games were sold with the HotRod arcade joystick manufactured by Hanaho, but this arrangement was discontinued as well. Other copyright holders have released games which are no longer commercially viable free of charge to the public under licenses that prohibit commercial use of the games. Many of these games may be downloaded legally from the official MAME web site.[32] The Spanish arcade game developer Gaelco has also released World Rally for non-commercial use on their website.[33]

The MAME community has distanced itself from other groups redistributing ROMs via the Internet or physical media, claiming they are blatantly infringing copyright and harm the project by potentially bringing it into disrepute.[34] Despite this, illegal distributions of ROMs are widespread on the Internet, and many "Full Sets" also exist which contains a full collection of a specific version's ROMs.[35] [36] In addition, many bootleg game systems, such as arcade multi carts, often use versions of MAME to run their games.

Original MAME license

MAME was formerly distributed under a custom self-written copyleft license, called the "MAME license" or the "MAME-like license", which was adopted also by other projects, e.g. Visual Pinball. This license ensures the availability of the licensed program's source code, whilst the redistribution of the program in commercial activities is prohibited.[37] Due to this clause, the license is incompatible with the OSI's Open Source Definition and the FSF's Free Software Definition, and as such is not considered an open source, or free software license, respectively. The non-commercial clause was designed to prevent arcade operators from installing MAME cabinets and profiting from the works of the original manufacturers of the games.[22] The ambiguity of the definition "commercial" led to legal problems with the license.[38] [39]

Since March 2016 with version 0.172, MAME itself switched, by dual licensing, to common free software licenses, the BSD-3-Clause license, and the GPL-2.0-or-later license.[40] [41] However, old versions remain licensed under the original license.

See also

External links

Notes and References

  1. News: With Software Sleight of Hand, Video Ghosts Walk. Herz. J.C.. 1998-03-05. The New York Times. 2013-07-03. https://web.archive.org/web/20190414162803/https://archive.nytimes.com/www.nytimes.com/library/tech/98/03/circuits/game-theory/05game-theory.html. 2019-04-14. live.
  2. Web site: MAME | About MAME . Mamedev.org . 2011-04-11.
  3. Web site: PC and Mac Applications that Every Gamer Should Have. Quilty-Harper. Conrad. 2005-12-16. Joystiq. https://web.archive.org/web/20060106055312/http://www.joystiq.com/2005/12/16/pc-and-mac-applications-that-every-gamer-should-have/. 2006-01-06. dead. 2013-07-03.
  4. Web site: WineVDM - Emulation General Wiki . 2023-03-25 . emulation.gametechwiki.com.
  5. Web site: Afterlife: The World of Console Game Emulation. Maragos. Nich. 2015-07-25. 1UP.com. https://web.archive.org/web/20150725101010/http://www.1up.com/features/afterlife. 2015-07-25. dead. 2018-08-21.
  6. Web site: MAME Project History . 2011-04-23.
  7. Web site: Giles. Aaron. Regime Change . Mamedev.org . 2013-07-03 . 2011-04-05.
  8. Web site: Milanovic. Miodrag. 2012-04-26. Passing the torch. 2012-04-26. Mamedev.org.
  9. Web site: The SDLMAME Homepage . Rbelmont.mameworld.info . 2006-10-13 . 2011-04-11.
  10. Web site: But Wait, That's a Camera.... IGN Staff. 1999-11-03. IGN. https://web.archive.org/web/20140222212031/https://www.ign.com/articles/1999/11/04/but-wait-thats-a-camera. 2014-02-22. live. 2013-07-03.
  11. Web site: MAME Runs In Google Chrome, Plays All Your Favorite Arcade Games. Wawro. Alex. 2012-01-03. PC World. https://web.archive.org/web/20130907224159/http://www.pcworld.com/article/247189/mame_runs_in_google_chrome_plays_all_your_favorite_arcade_games.html. 2013-09-07. live. 2013-07-03.
  12. Web site: MAME Latest MAME Release . 2011-04-23.
  13. Web site: MAME Source Updates . 2011-04-23 . dead . https://web.archive.org/web/20110420212857/http://mamedev.org/updates.html . 20 April 2011 .
  14. Web site: GitHub - mamedev/mame: MAME - Multiple Arcade Machine Emulator. GitHub. 2016-05-19.
  15. Web site: MAME Previous Releases.
  16. Book: St. Clair, John. Project Arcade: Build Your Own Arcade Machine. Wiley. Indianapolis, IN. 2004. 0764556169.
  17. Web site: Build Your Own MAME Machine. Roush. George. 2008-04-16. IGN. https://web.archive.org/web/20121216020929/https://www.ign.com/articles/2008/04/16/build-your-own-mame-machine. 2012-12-16. live. 2013-07-03.
  18. Web site: Dream Arcade Cocktail Kit. Harris. Craig. 2005-11-30. IGN. https://web.archive.org/web/20140222212037/https://www.ign.com/articles/2005/12/01/dream-arcade-cocktail-kit. 2014-02-22. live. 2013-07-03.
  19. Web site: Taito Legends manual . https://web.archive.org/web/20111004040310/http://www2.sega.com/support/manuals/taitolegends_pc_manual.pdf . 2011-10-04 . live . Sega . 2011-04-23 .
  20. Web site: MAME 0.162 . MAMEDEV.org.
  21. Web site: 10 months later, MAME finishes its transition to open source. Wawro. Alex. 4 March 2016. Gamasutra. https://web.archive.org/web/20160422164522/https://gamasutra.com/view/news/267316/10_months_later_MAME_finishes_its_transition_to_open_source.php. 22 April 2016. live. 5 March 2016.
  22. Web site: MAME is going open source to be a 'learning tool for developers'. Wawro. Alex. 15 May 2015. Gamasutra. https://web.archive.org/web/20150516082153/https://gamasutra.com/view/news/243598/MAME_is_going_open_source_to_be_a_learning_tool_for_developers.php. 16 May 2015. live. 27 May 2015.
  23. Web site: MAME is now Free and Open Source Software. MAMEdev.org. 5 March 2016.
  24. http://mamedev.org/releases/whatsnew_0171.txt
  25. Web site: You wanted the C&D, you got it.
  26. Web site: MAME SVN History.
  27. Web site: About ROMs and Sets . MAME Documentation . 11 November 2022.
  28. Web site: MAME | src/lib/util/chd.h . Mamedev.org . 2012-12-20 . dead . https://web.archive.org/web/20130704071827/http://mamedev.org/source/src/lib/util/chd.h.html . 4 July 2013 .
  29. Web site: Salmoria. Nicola. Nicola's MAME Ramblings. 2013-07-03.
  30. Court Upholds PlayStation Rival. Glasner. Joanna. 2000-02-10. Wired. https://web.archive.org/web/20010618100548/https://www.wired.com/news/business/0,1367,34281,00.html. 2001-06-18. dead. 2006-09-26.
  31. Web site: 17 U.S. Code § 117 (a). U.S. Copyright Office. 8 February 2014.
  32. Web site: MAME ROMs for Free Download. 2013-07-03.
  33. Web site: Gaelco Games at Home!. 2013-07-03. dead. https://web.archive.org/web/20130518040356/http://www.gaelco.com/english/pages/hablando/frhablan.htm. 18 May 2013.
  34. Web site: FAQ: Roms. MAME development site. 28 December 2013.
  35. 4 September 2007. Make The Most of It. PC Magazine. 26. 17. 61. 28 December 2013.
  36. April 2007. Game On. Popular Science. 270. 4. 78. 28 December 2013.
  37. Web site: 2016-01-03 . MAME Legal Information . 2022-06-25 . https://web.archive.org/web/20160103180457/https://www.mamedev.org/legal.html . 3 January 2016 .
  38. Web site: David Haywood's Homepage » The 'Already Dead' Theory... https://archive.today/20131031202643/http://mamedev.emulab.it/haze/2013/10/25/the-already-dead-theory. dead. 31 October 2013. 31 October 2013.
  39. Web site: So why did this annoy me so much?. 22 October 2013. mameworld.info. 29 October 2017.
  40. Web site: MAME is now Free and Open Source Software . MAMEDEV.org.
  41. Web site: MAME Legal Information . 2022-06-25 . www.mamedev.org.