MAME:Installing: Difference between revisions
Image file name only relates to that specific example. Formatting. |
m .typos |
||
| Line 135: | Line 135: | ||
MAME is updated on a release schedule, but due to the ongoing nature of development, including for the MAME Next machine, it can be sometimes useful to install a recent build, if it contains a new feature or bugfix you are interested in. Sometimes ongoing work is discussed on social media, like [https://discordapp.com/channels/556228195767156758/752197165891321886 Discord]. | MAME is updated on a release schedule, but due to the ongoing nature of development, including for the MAME Next machine, it can be sometimes useful to install a recent build, if it contains a new feature or bugfix you are interested in. Sometimes ongoing work is discussed on social media, like [https://discordapp.com/channels/556228195767156758/752197165891321886 Discord]. | ||
Continuous Integration (CI) builds are available from both the [https://github.com/mamedev/mame/actions | Continuous Integration (CI) builds are available from both the [https://github.com/mamedev/mame/actions primary MAME] and [https://github.com/holub/mame/actions holub] github repos. Both are considered bleeding-edge, with the primary MAME repo slightly less so. MAME CI builds are available for Windows, linux and MacOS, and are updated automatically every time code is committed by a maintainer or pushed to the primary repo. | ||
To try out a CI build, do a fill MAME install from the [https://www.mamedev.org/release.html latest release] first, if you have not already done so. Then back up your main binary from its installation location - these are called something like <code>mame.exe</code>, <code>mame</code> or <code>mametiny</code>. You can always restore these if the CI build doesn't work, or you don't like how it behaves. | To try out a CI build, do a fill MAME install from the [https://www.mamedev.org/release.html latest release] first, if you have not already done so. Then back up your main binary from its installation location - these are called something like <code>mame.exe</code>, <code>mame</code> or <code>mametiny</code>. You can always restore these if the CI build doesn't work, or you don't like how it behaves. | ||
Revision as of 22:44, 15 November 2025
MAME (formerly an acronym of Multiple Arcade Machine Emulator) 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.
MAME supports The ZX Spectrum Next since version 0.267. Existing implementation is based on v3.02.01 core and implements most of the features.
Get
The latest MAME version for Windows is available here and macOS builds can be downloaded from here. For the MAME platform as a whole, check your package manager or build from sources.
Linux users can install the latest stable version of MAME from the flatpak repositories by running:
sudo flatpak install org.mamedev.MAME
Use
In order to run the Next (and any others) you need to acquire rom dumps for the system.
In the case of the Next download tbblue.zip and put it into your MAME roms folder. Under Linux you can copy your MAME roms into ~/mame/roms.
You also need an SD card image of NextZXOS. Some published images do not work with some emulators, but all images from https://zxnext.uk/hosted/#sd are now confirmed to work with both MAME and CSpect, including the official ones, including this one (the SD card image is the cspect-next-2gb.img file within the zip file).
The fastest way to run a machine with a desired configuration is from the command prompt. Most of the features are also available from MAME's UI, but that takes more time to configure. Let's discover some useful options:
-
Use window and no mouse more till you get familiar with UI keys:
> mame tbblue -window -mouse_device none -hard /path/to/next-distribution.img
To launch the Linux flatpak version using the same options:
> flatpak run org.mamedev.MAME tbblue -window -mouse_device none -hard /path/to/next-distribution.img
-
Activate UI keys on startup:
> ... -ui_active
-
Don't show info popup on startup:
> ...-skip_gameinfo
- Run with debugger. If not requested on startup, you won't have access to it:
> ... -debug
Check official docs for more advanced usage.
Also, this combination of parameters enables the "crisp" pixels:
mame -ui_active -nounevenstretch -aspect 2:1 -video bgfx -bgfx_screen_chains unfiltered -window -skip_gameinfo -mouse_device none tbblue -hard1 /path/to/next-distribution.img
And if you don't need to use a joystick attached to the PC there's a chance that a little faster startup will be when -joystickprovider none is added to the command line.
Keys
Keys are emulated in two modes: to control MAME or completely dedicated to the emulated system. You can toggle between these two keyboard modes with ScrLk or Fn+delete under macOS.
Some UI keys:
- F3 - soft reset
- Shift+F3 - hard reset
- F4 - sprites/tiles/font viewer (Enter, ], [)
- F6 - save state
- F7 - load state
- Tab - emulator settings
- ~ - menu
- PgDwn (Linux) or Insert (Win) -- max speed (only while it's pressed; can be used e.g. to speed up boot)
- Esc - exit
- F12 - MF NMI
- F11 - DivMMC NMI
Changing the UI toggle key
Some laptops don't have a Scroll Lock key so you won't be able to exit MAME if you run it in full screen mode hence you will need to change the UI toggle key.
Follow these steps to change the UI toggle key:
- Run MAME without any command line arguments (except maybe -window) to open its GUI.
- Push TAB and enter the General Settings menu.
- Go to Input Assignments -> User Interface -> Toggle UI controls and select a new key. I use Right Alt / Alt GR.
- Return to Previous menu twice then choose Save Settings
Mounting SD card images under Linux
Under Linux you can use losetup to mount SD card images as loop devices which enables you to copy files to and from the image and perform other file management tasks as you would using any other filesystem.
Run the following commands as the root user to mount an image called sn-emulator-22.10a.img under the /mnt directory:
losetup --partscan --show --find cspect-next-2gb.img mount /dev/loop0p1 /mnt/
After you have finished modifying the SD card image, cd out of /mnt then unmount and detach the loopback device:
umount /mnt/ losetup -D
Creating a NextZXOS SD card image under Linux
Most users wanting to emulate the Next using MAME will be fine using a pre-built SD card image downloaded from the specnext website but the following guide is provided for anyone wanting to create a NextZXOS SD card image from scratch.
Download the latest NextZXOS distribution zip file (named something like sn-complete-WX.YZ.zip) and extract it into a new, empty directory.
Create a disk image of at least 256 MB. The current complete NextZXOS distro requires at least 130 MB of disk space. This command will create a 256 MB SD card image, change the count value to make the image file as big as you want in megabytes:
dd if=/dev/zero of=NextZXOS.img bs=1M count=256
The rest of the commands in this guide must be run as the root user or using sudo.
You will need the dosfstools and parted packages, if you don't already have them installed. Debian and Ubuntu Linux users can install these using this apt command:
apt install dosfstools parted
Mount the SD card image loopback device:
losetup --partscan --show --find NextZXOS.img
Create a FAT32 partition:
parted /dev/loop0 mklabel msdos parted /dev/loop0 mkpart primary fat32 1MB 100%
Format and mount the partition under /mnt:
mkfs.vfat -F 32 /dev/loop0p1 mount /dev/loop0p1 /mnt
You can now copy all of the files you extracted from sn-complete-WX.YZ.zip into /mnt.
After copying the files, unmount and detach the loopback device (the SD card image):
umount /mnt/ losetup -D
Continuous Integration MAME Builds
MAME is updated on a release schedule, but due to the ongoing nature of development, including for the MAME Next machine, it can be sometimes useful to install a recent build, if it contains a new feature or bugfix you are interested in. Sometimes ongoing work is discussed on social media, like Discord.
Continuous Integration (CI) builds are available from both the primary MAME and holub github repos. Both are considered bleeding-edge, with the primary MAME repo slightly less so. MAME CI builds are available for Windows, linux and MacOS, and are updated automatically every time code is committed by a maintainer or pushed to the primary repo.
To try out a CI build, do a fill MAME install from the latest release first, if you have not already done so. Then back up your main binary from its installation location - these are called something like mame.exe, mame or mametiny. You can always restore these if the CI build doesn't work, or you don't like how it behaves.
Then visit the one of the links above, and find a workflow run item for your platform - these are flagged as CI (Windows) CI (Linux) or CI (macOS). Click on it and find the Artifacts section at the bottom, then click the download button. Unzip the downloaded file and find the main binary (same name as above). Copy the main binary over the top of the original one in the install location, and run MAME the same way your were running it before. On Windows you may have to do an additional step of trusting the binary (Run Anyway).
More MAME links
The source code is available here.
Report any issues with MAME on the bugtracker.