Online Book Reader

Home Category

Running Linux, 5th Edition - Matthias Kalle Dalheimer [115]

By Root 1251 0
bindings

Key

Action

Arrow keys

Move left, right, up, and down

1

Select one player

2

Select two players

5

Insert a coin

Ctrl

Button 1

Alt

Button 2

Because some arcade games just have a joystick, and others have six or more buttons, the button mappings to a keyboard will sometimes vary. For basic games, Ctrl and Alt work as the first and second buttons but more complicated games will require some experimentation to discover the key bindings. By default, Xmame will play a game in its original resolution, so on a high-resolution computer screen you might want to increase the scale of the game once or twice with left-Shift and PageUp.

Xmame can use your mouse for applicable games as well. A good example of using a mouse in an arcade game is Centipede , which by default uses a large trackball mouse. You can either use your mouse or the arrow keys for movement.

Xmame also supports use of a joystick, although this isn't turned on by default. Either change the joytype option in your xmamerc file or pass -joytype number on the command line. The number corresponds to the type of joystick you use (Table 7-3).

Table 7-3. Joystick mapping

Number

Joystick type

0

No joystick

1

i386 joystick driver

2

Fm Town Pad support

3

X11 input extensions joystick

4

New i386 Linux joystick driver

5

NetBSD USB joystick driver

6

PS2-Linux native pad

7

SDL joystick driver

Nestra

Arcade games are incredibly fun, but there are some games that seem to only exist on certain game consoles, such as the original Nintendo Entertainment System (NES) . As with the MAME project, there is software you can use to emulate the NES hardware and play ROMs directly on your computer. Under Linux, the software is Nestra .

Nestra will already be packaged for you depending on your distribution, but if it isn't, you can download and build the source directly from nestra.linuxgames.com. Once installed, using Nestra is as simple as running nestra with the path to the ROM you want to play as an argument. So, to play the original Metroid , you would type:

$ nestra Metroid.nes

See Figure 7-8.

Figure 7-8. Metroid under Nestra

Nestra key bindings are the same across games and correspond to the standard NES controller (Table 7-4).

Table 7-4. Nestra key mappings

Key

Function

Arrow keys

Arrow pad

Spacebar

Button A

z, x

Button B

Enter

Start

Tab

Select

Pause, Break

Reset

Esc

Exit Nestra

1-9

Adjust the emulation speed. 1 is the normal speed, 2 is double speed, etc.

-

Run at half speed

0

Pause the emulator

Some games, such as Zelda, save games on the game cartridge itself. Since you are dealing with ROMs here, Nestra will place saved games in a file in the directory containing the ROM you are running, or will put the saved games in ~/.nestra if the directory exists.

SNES9x

The NES definitely had a lot of fun games, and when the next generation of Nintendo's consoles was released — the Super Nintendo Entertainment System, or SNES — many of the classics, such as Super Mario Bros, Zelda, and Metroid, found their way onto the new platform. You can play all of your favorite SNES ROMs under Linux using the Snes9x program.

Snes9x is an SNES emulator that runs on Windows, Linux, Mac OSX, and other platforms. The Linux port is packaged by most distributions, or you can download and build the source from the official Snes9x page at www.snes9x.com.

Once installed, running Snes9x is similar to Nestra — simply type snes9x followed by the path to the SNES ROM as an argument. To run Zelda 3, for example, you would type

$ snes9x zelda3.smc

Unlike Nestra, Snes9x has a large number of options you can pass on the command line. For instance, the -y option enables "TV mode," which scales the image by two and inserts an extra blended pixel between each scan line. The end result of TV mode is a larger, easier-to-read screen that looks more like a regular television

Return Main Page Previous Page Next Page

®Online Book Reader