- Details
- Category: Setup
We're going to describe a fast way to install MAME on your Windows computer. If you follow these steps closely, there should not be any problem getting it running.
Check your Windows release
You should run a post-XP version (Vista, 7, 8, 10, 11). Do not try any older release like Windows 98, ME, or 2000. Windows XP is not recommended for security reasons, and MAME is not tested to run on it.
Get the MAME package
Download the most recent MAME release from the MAMEdev website from the section Official Binaries. You should use the 64 bit version (unless you know that your computer is 32 bit only).
Please do not attempt to install an older release, particularly not if its release number is much smaller than the current one. There have been changes in the meantime concerning the ROM formats, and this may make it impossible to run MAME.
Install the files
Run the exe file; this is just a self-extracting archive file. Choose your target directory; for easier configuration, a simple path like C:\prg\mame is recommended. The extracted files will be located in that directory.
Note that MAME does not alter your registry file. This means you can at any time simply remove the MAME installation, install another one in a separate directory, or reinstall it if desired. Uninstalling means that you just remove the MAME directory.
Configure it once
Open a command shell and type (in black)
C:\Users\Whoever> cd \prg\mame
C:\prg\mame> mame -createconfig
C:\prg\mame> exit
This creates a file C:\prg\mame\mame.ini. Open it in some text editor.
In the second section ("CORE SEARCH PATH OPTIONS") you will find a setting rompath. This is relative to your base directory C:\prg\mame; typically, you will find the value roms (i.e. it will be C:\prg\mame\roms). This subdirectory is already created by unpacking the zip file. If you like, you can append ;cartridges or similar in order to separate between modules and system roms. You must make sure that there is a directory C:\prg\mame\cartridges; if needed, create a new folder of that name in your explorer.
Scroll down to "OSD VIDEO OPTION"; change window to 1 to get a windowed output, otherwise it is fullscreen. In the next section "OSD PER-WINDOW VIDEO OPTION" you should set the first resolution property to 640x480 or bigger, as you find suitable.
Note that this configuration is only done once, when you install MAME, as we show it here.
Install system ROMs and cartridges
Go to our WHTech repository and download ti99_complete.zip from the directory /System ROMs/MAME. Unzip its contents into the roms subdir. Do not unzip the zip files inside.
Also from WHTech, download all_carts.zip from /Cartridges/MAME. It contains a collection of zip files, each one for a cartridge; do not unpack these cartridge zips.
Store the cartridge zips into the cartridges subdir if you added that location to the rompath, otherwise move all cartridge zip files to the roms subdir.
Create a starter batch
Create a small batch file to launch MAME. You may drop that on your desktop. For that, open some text editor and type
c:
cd \prg\mame
mame ti99_4a
Save it as ti99.bat to your desktop, or anywhere else as desired.
You can now edit this starter batch or create copies. You can change the system name (e.g. geneve, ti99_8), add cartridges (-cart exbasic) or peripheral devices (-ioport peb -ioport:peb:slot8 hfdc), and add floppy disks (-flop1 mydisk.dsk).
If you prefer the 32 KiB internal 16-bit RAM expansion, you can turn it on in the "System configuration" menu of the on-screen display (OSD). You then have to remove the 32kmem configuration below in all examples, however.
Example 1
Plain console, cassette file inserted
Important: This and the following examples will only work if the specified disk or cassette image files are actually present at the indicated paths (or in the working directory if no path is specified).
c:
cd \prg\mame
mame ti99_4a -cass1 cassette.wav
Example 2
External 32K memory expansion, TI floppy controller, myfloppyimage.dsk inserted in DSK1
c:
cd \prg\mame
mame ti99_4a -ioport peb -ioport:peb:slot2 32kmem -ioport:peb:slot8 tifdc -flop1 myfloppyimage.dsk
Example 3
Cartridge Extended Basic, external 32K memory expansion, RS232 card, HFDC controller, one drive, myfloppyimage.dsk inserted
c:
cd \prg\mame
mame ti99_4a -cart exbasic -ioport peb -ioport:peb:slot2 32kmem -ioport:peb:slot7 tirs232 -ioport:peb:slot8 hfdc -flop1 myfloppyimage.dsk
Example 4
Cartridge Editor/Assembler, external 32K memory expansion, Speech synthesizer, Horizon RAMDisk, HFDC, hard disk, one floppy image inserted
c:
cd \prg\mame
mame ti99_4a -cart editass -ioport peb -ioport:peb:slot2 32kmem -ioport:peb:slot3 spchsyn -ioport:peb:slot4 horizon -ioport:peb:slot8 hfdc -ioport:peb:slot8:hfdc:h1 generic -hard1 myharddisk.hd -flop1 myfloppyimage.dsk
Example 5
P-Code system, external 32K memory expansion, TI floppy controller, one drive, Editor/Filer inserted from folder C:\prg\mame\disks\UCSD
c:
cd \prg\mame
mame ti99_4a -ioport peb -ioport:peb:slot2 32kmem -ioport:peb:slot3 pcode -ioport:peb:slot8 tifdc -flop1 disks\UCSD\ucsd_pascal_editor_filer_1.dsk
Note: You must turn on the P-Code card in the DIP switches menu of the On-screen display (OSD). The card is turned off by default because it immediately takes over control on start.
Example 6
Geneve, Horizon RAMDisk, Speech, RS232, HFDC, one hard disk
c:
cd \prg\mame
mame geneve -peb:slot4 horizon -peb:slot5 spchsyn -peb:slot6 tirs232 -peb:slot8 hfdc -ioport:peb:slot8:hfdc:h1 generic -hard1 myharddisk.hd
Reconfiguration
If you do not plan to change your configuration too often, you may want to set it inside MAME using the OSD. You can use the menu selection Slot devices to change the peripheral box contents, for example. Note that this change is only temporary until you leave MAME.
If you want to keep changes after stopping MAME, you must set readconfig and writeconfig to 1 in mame.ini.
When you use this setting, be aware that your command-line arguments may be overridden by what you had set in the OSD menu before you exited MAME the last time.
- Details
- Category: Setup
Many users may prefer to install the ready-to-use MAME package. If you are interested how MAME works, if you want to contribute to its development, try to fix a bug, or suggest a useful extension, you should consider installing the MAME sources and building MAME.
If you are not so familiar with building, this may sound rather complicated, and you probably doubt that you can safely get to the desired end. Or you do have some experience in building software from sources, but all you remember was that at some time compilation stopped with a long error text that you could not make sense of from the second line.
However, MAME sources show a very high quality, that is, they actually compile to completion, and there are only very few compiler warnings (mostly from the imported 3rd-party libraries). With the following instructions, you should be able to successfully build MAME and to run it on your computer. Even if you do not plan to write own code, you will enjoy building MAME, because you always have access to the latest changes, so you do not have to wait for the next release.
- Details
- Category: Setup
If you decide to build MAME from source code in Linux, you should probably directly use the git repository on Github since bugs are corrected very quickly (and new ones are as quickly introduced ...).
The following descriptions apply to MAME release 0.256 and higher.
Preparing your Linux build environment
You need
- gcc / gcc-c++ version 10 or higher
- git
- make
- Development package of alsa
- Development package of gconf2
- Development package of gtk2
- Development package of the SDL2 library
- Development package of the SDL2_ttf library
- Development package of the Qt5Core library
- Development package of Pulseaudio (since 0.230)
- Development package of Pipewire (since 0.277)
Ubuntu
Ubuntu users use the apt(-get) command or other appropriate software repository tools.
For Ubuntu 22.04 and newer, the following packages are required:
sudo apt install git make g++ qtbase5-dev libsdl2-ttf-dev libfontconfig-dev
openSUSE
For an openSUSE installation (July 2023), either use YaST or (if not already installed) use zypper to install them:
sudo zypper install git-core make gcc-c++ libSDL2_ttf-devel alsa-devel fontconfig-devel libqt5-qtbase-devel libXi-devel libpulse-devel libXinerama-devel pipewire-devel
Setting up your source directory
I suggest to create a directory in your home folder. Usually, I create a src directory, and in that directory I collect all my source projects in separate subdirectories. (user@host will be replaced by your user name and your host name.)
user@host:~$ mkdir -p ~/src/mamegit
user@host:~$ cd ~/src/mamegit
user@host:~/src/mamegit$ git clone https://github.com/mamedev/mame.git
This takes some minutes, depending on your Internet connection. The MAME source tree will be installed as a subdirectory mame in the current directory.
Building
If all of the libraries mentioned above are installed, you can now start compiling. With the SOURCES parameter, you can control which computer systems will be built. If you leave it away, all emulated systems will be built (which is quite a lot).
user@host:~/src/mamegit$ cd mame
user@host:~/src/mamegit/mame$ make SOURCES=ti/ti99_4x.cpp,ti/ti99_4p.cpp,ti/ti99_8.cpp,ti/geneve.cpp,ti/ti99_2.cpp REGENIE=1 TOOLS=1
If everything went smoothly, you should now find a mame file in the directory with a size of about 110 MiB (!). This depends, of course, on the number of systems you included in the SOURCES.
Installing
Actually, you could now run MAME in the directory where is has been built; you just have to put the ROM dump files of the systems you want to run in the roms subdirectory.
However, I highly suggest to use a separate directory: When you put everything in the source file directory, this will get messed up with files that do not belong to the source tree, and the git command will complain to have found unversioned files. Also, when you build MAME and something goes wrong, you would lose your previous build.
I usually create a subdirectory mame in my home directory:
user@host:~/src/mamegit$ cd mame
user@host:~/src/mamegit/mame$ mkdir ~/mame
We now copy everything we need into the mame subdirectory:
user@host:~/src/mamegit/mame$ cp -R artwork bgfx ctrlr docs hash hlsl ini language plugins roms samples ~/mame/
user@host:~/src/mamegit/mame$ cp castool chdman floptool imgtool jedutil ldresample ldverify nltool nlwav romcmp unidasm mame mamed ~/mame/
If the list contains files that are not available, you will get an error message, but the rest should be copied.
You should now continue with the setup as described in the section about setting up.
Script files
Instead of running these commands each time, I suggest you use my predefined scripts:
- maketi: Build MAME
- clean: Remove all previously build components in order to start fresh
- mameinst: Install mame in the target directory
- mameprep: Download required ROMs and other media from our server
Put them in the directory ~/src/mamegit. Make them executable with the chmod command:
user@host:~/src/mamegit$ chmod u+x maketi clean mameinst mameprep
MAME will be installed into a separate directory, the mame subdirectory of your home directory. You should run the build process with maketi, and then use mameinst to install the newly built components into that target directory.
You have to run mameprep only once. It downloads all required ROMs and creates start scripts for running the TI emulations. For all future builds, you just use mameinst.
So off you go:
user@host:~/src/mamegit$ ./clean
user@host:~/src/mamegit$ ./maketiuser@host:~/src/mamegit$ ./mameinst
user@host:~/mame$ ./mameprep
- Details
- Category: Setup
The following text assumes that you use Raspberry Pi OS, not the older Raspbian OS. Since MAME 0.254, building on Raspbian OS is not possible anymore due to outdated libraries.
We will use Debian version 11 (bullseye) and the Raspberry Pi OS with desktop installation. You need to use the apt(-get) command or check the software repository tools.
Required libraries
The following descriptions apply to MAME release 0.256 and higher.
You need
- gcc / gcc-c++ version 10 or higher
- git
- make
- Development package of alsa
- Development package of gconf2
- Development package of gtk2
- Development package of the SDL2 library
- Development package of the SDL2_ttf library
- Development package of the Qt5Core library
- Development package of Pulseaudio (since 0.230)
git, make, g++ should already be installed.
The following packages are required:
sudo apt install qtbase5-dev
sudo apt install libsdl2-ttf-dev
sudo apt install libfontconfig-dev
or with a single line:
sudo apt install qtbase5-dev libsdl2-ttf-dev libfontconfig-dev
Getting the sources
Use git to clone the repository to your local drive:
git clone https://github.com/mamedev/mame.git
This will create a mame directory containing a ready-to-use makefile.
When you want to get a current version, use the git pull command.
git pull
If you want to build a specific release or based on a particular commit, use git checkout.
git checkout b41370db026
This will set your repository to the state when the 0.256 release was published. Alternatively, you can use the tag mame0256:
git checkout mame0256
Compiling
A makefile is included with the MAME distribution so you can easily start the build process with make.
Cleaning the build environment is optional, but if you experience problems when compiling, try to clean first.
make clean
If you only want the TI systems to be included, you may specify them in the command line:
make SOURCES=ti/ti99_4x.cpp,ti/ti99_4p.cpp,ti/ti99_8.cpp,ti/geneve.cpp,ti/ti99_2.cpp REGENIE=1 TOOLS=1
REGENIE should be specified, since the GENie project generator tool is used for building. TOOLS will generate the additional helpers imgtool, chdman, and others. You probably don't need them if you use TIImageTool.
Although the Raspberry Pi 4 is much faster than all previous models, it will run into heavy thrashing during the build process, which means it seems to make no more progress after some time. Do not stop it. It may take some hours until the process is complete, but it will eventually reach its goal.
One particular slow point during compilation occurs when compiling the files src/emu/emumem_*.
One thing you can do is to tell your Raspberry to avoid swapping as long as possible. The parameter for this is called swappiness, and it is set to 60 by default. Maybe try 25 or lower. You can make this change permanent. Add the following line to the /etc/sysctl.conf file:
vm.swappiness=25
Many sources recommend not to increase the swap space on the Raspberry Pi, as this swap space is located on the SD card, and this will lower the lifetime of the flash memory on the card. However, I noticed that during building, all of the 4 GiB of main memory was used up, and the small swap space (100 MiB) was also gone, and from here, the system dropped into thrashing hell. So I increased the swap size to 1 GiB, and the atop tool showed me that the build process drew another 600 MiB from the swap file. But then, it continued.
Also, while you should make use of the -j parameter for Linux on PCs, you may get better results on a Raspberry Pi with fewer processes. If your Raspberry Pi gets stuck in thrashing, try building with a single job (just leave away the -j option). Also, once the emumem files have been built, you may interrupt the process and restart it with more parallel processes.
A recent test with a Raspberry Pi 5 (8 GiB) showed that the full MAME build with 4 jobs takes about 10000 seconds (2h 47 min).

- Details
- Category: Setup
While the simulation of hardware circuits is in no way problematic with respect to copyright (since we produce a new system by observing the behavior of the original one), the distribution of memory contents is generally subject to copyright, and unlicenced distribution is considered an offense by most jurisdictions.