John Smith Legacy John Smith Legacy Gradius Home World Gradius Home World GameStone GameStone JimStoneCraft on X Follow @JimStoneCraft

Gradius Home World グラディウス ホームワールド

Guides Guides

GameStone's Arcade - MAME Command Line

Arcade

Introduction

MAME (Multiple Arcade Machine Emulator) is an Arcade game emulator for playing Arcade games on your PC, Mac, Linux and just about any other operating system, this guide will concentrate on the PC version of MAME.

It has a very good compatibility rate with over 4000 games and growing, supports steering wheel, track balls, mice etc...

There are many builds (versions) of MAME from the Command Line version to the Win32 version, this guide will look at the Command Line version because its the first one to be released when a new version comes out and it offers the fastest possible framerate (speed) available.

Setting MAME up is not for the faint hearted as there are going to be lots of steps and ini files to edit but I will try to make it clear enough to follow.

Downloading MAME and Installation

http://mamedev.org/

Download MAME from the download section of the MAME site

mame0173b.exe

or if you have a 64bit Operating System then download the 64bit version.

mame0173b_64bit.exe

(later version maybe listed since this guide was written)

Open Command Window Here

In Windows 7 onwards you can get the 'Open Command Window Here' on the right click menu if you hold down the Shift key when you right click the folder.

Open Command Window Here

Installing

Create a directory called MAME and extract the mame0173b_64bit.exe file into that directory. (later version maybe listed since this guide was written)

Here's a look at the folder and files that are set up.

MAME File List

  • artwork - Where background artwork is stored (not used in Gradius games).
  • ctrlr - Some joystick configs, ignore if you don't have a Hot Rod or X Arcade stick.
  • docs - MAME Documentation and disclaimers.
  • roms - Where the Rom Images (Games) are stored.
  • samples - Some games do not emulate some sounds and the samples would go in here (not used in Gradius games).

These two are automatically created after you run MAME at least once.

  • nvram - Some games stored there settings on eproms rather than Dip Switches (Konami GX games and others)
  • cfg - Game config files are stored here

You may want to make this directory as well.

  • snap - When you press F12 a screen shot is captured, this is where they are stored.

Installing Games

To play games on MAME you will need the game rom image, put the zip file for the game in the roms directory.

There is no need to extract the game zip files as MAME can read zip files.

MAME is a command line program which has many settings (switches), you can type these in each time but its best to just create the MAME config ini file

Right click to MAME directory and select Open Command Window Here.

Open Command Window Here

Then type :-

mame -cc

This creates the mame.ini which holds all the settings for MAME

MAME Command Window

There are lots of setting in this file but I will only go into a few settings I use, read the Windows.txt file in the docs directory for more detailed information about the various setting.

In the MAME directory there will now be a file called mame.ini, open the file in Notepad and look at the settings.

To change a setting you change the 0 to a 1 to enabling that feature.

ie.

triplebuffer 0 = off

triplebuffer 1 = on

Right lets get onto the setting I use.

waitvsync 1
triplebuffer 1
d3dtexmanage 0
d3dfilter 0
joystick 1
skip_gameinfo 1
cheat 1

All the rest I leave at default.

Setting Up MAME with the Command Prompt

There are other command line options but its beyond the scope of this guide.

The one I will say is useful is the Verifyroms switch, open a Command Prompt on the MAME directory and type:-

mame -verifyroms

This will check if the rom sets you have are working ok with you version of MAME, this is useful if you are having trouble getting a game working with the latest version of MAME.

MAME

Running a Game

Open a Command Prompt on the MAME directory and type mame and then the name of the rom image zip file:-

mame gradius

This will run the Gradius, below are the list of games you could run if you had all the Gradius related games in the roms directory.

blswhstl
detatwin
fantjour
gokuparo
gradius
gradius2
gradius2a
gradius2b
gradius3
gradius3a
gradius3e
gradius4
lgtnfght
lgtnfghta
lgtnfghtu
lifefrce
lifefrcej
nemesis
nemesisuk
parodius
parodiusj
pc_grdue
pc_grdus
salamand
salamandj
salmndr2a
sexyparo
slrasslt
tbyahhoo
thndrx2
thndrx2a
thndrx2j
thunderx
thunderxa
thunderxb
thunderxj
trigon
twinbee
vsgradus
vulcan
vulcana
vulcanb
xexex
xexexa
xexexj

Rotating the Screen

Some games have the monitor set vertically (TATE mode) in the arcades, if you have a fancy rotating Flat Panel monitor you could use the autorol feature in MAME, this will only effect games that have a vertical monitor so putting that switch on Gradius would have no effect.

Rotates the screen left

mame twinbee -autorol

Rotates the screen right

mame twinbee -autoror

Gradius related games with vertical monitors are:-

blswhstl
detatwin
twinbee

Configuring Controllers and Keyboard Controls

Keyboard Controls and Other Keys

Tab

Toggles the configuration menu, in this menu you can edit the Dip Switch settings and see other game information

Tilde ¬ (top left of keyboard next to the number 1 and below ESC)

Toggles the On Screen Display. Use the up and down arrow keys to select the parameter (global volume, mixing level, gamma correction etc.), left and right to arrow keys to modify it.

P

Pauses the game

Shift+P

While paused, advances to next frame (good for capturing sprite animations)

F1

Toggle crosshairs for games that use them (not used in Gradius game)

F2

Service Mode (used is Konami GX and Hornet games)

F3

Resets the game

F4

Shows the game palette, decoded GFX, and any tilemaps
Cursor left/right changes between palette, GFX and tilemaps
Cursor up/down cycle through valid palettes
Page up/down scroll through the palette and GFX
Page up/down, D, G scroll the tilemap display
Ctrl & Shift are modifiers to change movement speed.
F4 or Esc returns to the emulation.

Note: Not all games have decoded graphics and/or tilemaps.

F6

Toggle cheat mode On and Off (if started with "-cheat"), I will talk about the cheat addon later

F7

Load a 'Save State'. You will be requested to press a key to
determine which Save State you wish to load. Note that the 'Save
State' feature is for developing drivers and not intended for
users. It is incomplete and works only on a number of drivers. Use
at own risk.

Shift+F7

Create a 'Save State'. Requires an additional keypress to identify
the state.

F8

Decrease frame skip on the fly

F9

Increase frame skip on the fly

F10

Toggles speed throttling, this sets the speed that the game should run at

F11

Toggles speed display - show the framerate on screen

F12

Saves a screen snapshot. The default target directory is Snap

ESC

Quits the game and exits the MAME emulator

Framerate

Framerate is king, if the framerate is too low the game will become unplayable, to speed up framerate you can shutdown all other programs before you run MAME, use Frame Skipping or upgrade your hardware (CPU).

The thing you have got to remember is most arcade boards have more that one processor, ie.. Gradius II GOFER no Yabou has two Motorola X68000 processors and you have to emulate that on a single PC CPU, this is quite good now as the X68000 is quite an old chip but when you get the later games like Gradius IV Fukkatsu which runs a PowerPC CPU and a Voodoo graphics processor then you will need a fast PC to make the game playable.

Cheats

Download the cheat.zip file from the site below

http://cheat.retrogames.com/

Extract the cheat.zip file to the MAME directory and you will see a file called cheat.dat.

Run a game (Gradius in this example)

MAME

You can edit the mame.ini file and change the cheat line so you don't have to use the switch -cheat each time, change the line:-

cheat 0

to

cheat 1

To navigate the menus in MAME use the cursor keys and Return to select the options you want.

When you run the game press tab to go into the menu system and select Cheat, watch the animation below for an example.

MAME

While playing the game you can then enable and disable the cheats on the fly with F6.

 

That's about it for this guide, there are lots of other bits in MAME but this guide should get you started.