Getting Started with MAME on macOS - Part 5 - Graphics Settings

Guide Emulators by sky

Logo de MAME

As it is provided and as we have seen in the previous articles of this series, the MAME application allows launching games without worrying too much about certain settings. Yet the application offers a wide range of configurations, and we will see here just a small part dedicated to graphical settings.


1/ Video Rendering Engine Selection

So far, we haven't touched anything to make MEWUI and games display properly.

If you look a bit in the configuration file, obviously, you will find at line 253 the following information.

video                     auto

By default, MAME itself selects the graphics engine used. The reason is simple: by choosing the engine itself, it ensures that the application will be functional out of the box on all platforms. Indeed, MAME is available on many platforms, but each of them has different graphics engines.

For example, for us on macOS, OpenGL is used by default because the engine is available on all versions of macOS, from Mac OS X (or even Mac OS 9 if you want to go back further in time). On Windows, Direct3D is used, a proprietary Microsoft engine available only on Windows or Microsoft gaming consoles.

Finally, on Linux, no driver is guaranteed to be installed, so the software rendering mode is used.

Of course, it is possible to use the driver of your choice, simply by changing the software configuration.

Here are the available choices:

  • auto : Default mode, MAME selects the most compatible rendering mode for the platform.
  • d3d : The Direct3D mode uses the full potential of current graphics cards, but this rendering mode is reserved for the Windows platform.
  • gdi : The GDI mode is an old rendering mode for Windows, available before the advent of Direct3D.
  • opengl : The OpenGL mode is the default rendering method on macOS; it uses OpenGL libraries, also available on Windows (standard) and Linux (installable).
  • soft : The software rendering mode is certainly the most compatible, but also the least performant. All graphical elements are calculated by the application and thus the CPU, instead of offloading some of these calculations to the graphics card.
  • accel : This mode uses the APIs of the SDL libraries, which then optimizes the display according to the machine's capabilities.
  • none : This somewhat particular mode allows for no graphical display at all. It does, however, enable benchmarks on chip emulation without any distortion caused by the display.
  • bgfx : This is the most complex rendering mode available for MAME. The bgfx rendering mode allows adding filters to achieve a graphical result closer to the original arcade cabinets by reproducing, if necessary, the display of a cathode-ray tube. However, the bgfx rendering mode is more complex to configure and thus to use. The next article will be dedicated to this rendering mode.

 

2/ Other video configuration elements

Below the rendering mode settings, there are other configuration elements. Less important, they can still be of interest for some enthusiasts or for certain games.

  • numscreens : Specifies the number of screens to emulate. Indeed, some systems have multiple screens, and if your configuration also does, you can fully take advantage of them.
  • The use of this configuration is optimal for each specific game setup. The default value is 1, to have only one active screen.
  • window : Indicates whether the emulator should open in windowed mode. The use of this configuration is optimal when launching the emulator or a game directly from the command line.
mame -window

The default value is 0, which opens MAME in full-screen mode.
 

  • maximize : To be used only in windowed mode. The maximize command allows obtaining a window occupying the entire screen.
mame -window -maximize

By default, the maximize value is set to 1. In case of command line usage, to achieve the opposite effect, use

mame -window -nomaximize
  • waitvsync : This MAME setting activates vertical synchronization. It forces the emulator to synchronize the game's refresh rate with that of the screen. This allows displaying only complete images and avoids the phenomenon that sometimes occurs on certain setups or machines (especially games with a vertical screen or strong scrolling). This option should only be used in case of display issues as it may cause a slight loss of frames per second.
    _ On macOS, it is not recommended to disable this option, as the graphics drivers of macOS, known for their reputation, do not allow synchronization without significant loss.
    _ On macOS or in full-screen mode in general, it is preferable to use the following setting:
triplebuffer        1
  • syncrefresh : This option attempts to correct the same display issues as waitvsync. Instead of waiting for each frame, it tries to synchronize the frames per second of MAME with the screen's refresh rate. In case of a large discrepancy between the original emulation speed and the actual refresh rate, this can cause an audio delay. Avoid using it unless you know exactly what you are doing.
  • monitorprovider : This setting allows choosing the screen resolution management mode.
The default value is auto, and there is really no reason to change this value.


3/ Multi-Monitor Configuration

The "OSD PER-WINDOW VIDEO OPTIONS" section allows you to configure multiple monitors of the emulator more precisely, for machines that support them.

This section will therefore only be useful if you wish to configure MAME on multiple monitors.

There are 4 values to configure, but they repeat 5 times, to support up to 5 screens or emulation windows.

  • screen: Allows you to specify which window goes to which screen. Screens must be written as .DISPLAYn where n is an integer defining the screen index.
  • aspect: Allows you to define the screen aspect ratio. By keeping the value auto, MAME will use the aspect ratio indicated by the machine.
  • resolution: Allows you to define the resolution on each screen. This way, you can adjust the sizes as you wish. The information must be marked with the width and height separated by a "x". Optionally, you can add the refresh rate, preceded by an "@".
  • view: Defines how the screens should be placed and managed. It is very difficult to obtain the available values for this configuration.

By default, all values are set to "auto".

Using the direct version, without a number, will configure all screens/windows created.


4/ Fullscreen Configuration and Video Acceleration

Fullscreen configuration is summarized by a single value.

  • switchres: It allows you to force the resolution change in fullscreen mode. By default, it is set to 0. If this option is enabled, you will need to specify the resolution to apply via the resolution setting seen in the previous section.

Next, there are two configuration elements related to video acceleration.

  • filter: Enables a bilinear filter to improve graphical rendering. Often, the native resolution of the CRT monitors in arcade cabinets is significantly lower than the resolution of modern screens. The filter smooths the image so that the result is not a large cluster of pixels. By default, the filter is enabled, but be careful, on macOS, the filter is only active with the OpenGL video mode.
In "accel" mode, and thus via the SDL library, it is the library that will handle optimizing the display.
  • prescale: Specifies the size at which the rendering is pre-calculated. By default set to 1, MAME calculates the display at the original size of the game. It is possible to increase the pre-calculation size before passing through filters and other shaders.
     
  • 5/ Is that it?

    Not quite, in the next article we will cover the configurations specific to the bgfx rendering engine.

    Related software

    Reply on the forum

    A question or a hands-on report? Open the discussion on the forum.

    Reply on the forum