FAQ:Performance: Difference between revisions

From MAMEDEV Wiki
Line 16: Line 16:


==Why does MAME become slower all the time?==
==Why does MAME become slower all the time?==
Contrary to popular belief, the amount of drivers or the size of the executable does not make MAME slower.
The point is that the drivers are constantly improved and the improved emulation is more accurate to the actual original hardware so for MAME's purposes it's superior. Emulation accuracy trumps playability concerns in MAME.
Another thing to consider is a paradigm called "moving the optimization point". MAME's "sweet spot" is currently aimed at hardware with tilemaps, sprites, more than 256 colors on screen, and at least 2 CPUs, which is a common late-80s paradigm. Real-world examples of this include the Konami Twin16 games, the Sega X and Y boards, Namco System 2, Taito Z System, etc. It means that MAME makes more advanced games run faster at the expense of simpler hardware. The simpler hardware will work out in the end anyway due to ever-faster PCs (Pac-Man is very sub-optimal now vs. e.g. 0.29 for instance, but you'd be hard pressed to find a PC less than 4-5 years old where it doesn't run 60/60).

Revision as of 22:23, 30 March 2007

Return to the main Frequently Asked Questions page.

Why do some games run so slowly on my system?

How can I get games to run faster?

There are occasional speed problems.

Does MAME benefit from SMP (symmetric multiprocessing) / HT (Hyper-Threading) / dual cores?

Recent versions of MAME include a -mt switch which allows some tasks to be threaded off for use by SMP or multicore systems. Thus far the benefits from this are relatively small, because accurate emulation such as MAME strives for cannot easily be broken up into parallel subtasks (it would be like trying to have a baby in one month by impregnating nine women). There are exceptions of course, and MAME will support them via this mechanism in the future.

Why is MAME so slow? These games ran at less than 200 MHz, and my CPU is 2 GHz!

You are comparing apples and oranges.

MAME emulates every function of the emulated CPU(s), video hardware, audio hardware, and anything else on the board (including potentially IDE or SCSI harddisks and CD-ROMs). This is simply not something that can be done quickly in a high-quality fashion.

Why don't the developers put more hacks in MAME?

Hacks, while maybe appearing to be good in a short perspective, are always bad and destructive in the long perspective. The more hacks you put into the code, the harder it becomes to make new additions neatly as the hacks will require workaround hacks, so you'll end up on a downward slope of more and more crappy hacks, until everything collapses under its own weight. Hack-based emulators typically have a short life because it quickly becomes impossible to debug or extend them.

Why does MAME become slower all the time?

Contrary to popular belief, the amount of drivers or the size of the executable does not make MAME slower.

The point is that the drivers are constantly improved and the improved emulation is more accurate to the actual original hardware so for MAME's purposes it's superior. Emulation accuracy trumps playability concerns in MAME.

Another thing to consider is a paradigm called "moving the optimization point". MAME's "sweet spot" is currently aimed at hardware with tilemaps, sprites, more than 256 colors on screen, and at least 2 CPUs, which is a common late-80s paradigm. Real-world examples of this include the Konami Twin16 games, the Sega X and Y boards, Namco System 2, Taito Z System, etc. It means that MAME makes more advanced games run faster at the expense of simpler hardware. The simpler hardware will work out in the end anyway due to ever-faster PCs (Pac-Man is very sub-optimal now vs. e.g. 0.29 for instance, but you'd be hard pressed to find a PC less than 4-5 years old where it doesn't run 60/60).