Table of Contents for
Gaming Hacks

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Gaming Hacks by Simon Carless Published by O'Reilly Media, Inc., 2004
  1. Cover
  2. Gaming Hacks
  3. Credits
  4. Contributors
  5. Acknowledgments
  6. Foreword
  7. Preface
  8. How to Use This Book
  9. How This Book Is Organized
  10. Conventions Used in This Book
  11. Using Code Examples
  12. Comments and Questions
  13. Got a Hack?
  14. 1. Playing Classic Games
  15. Legal Emulation
  16. Play Commodore 64 Games Without the C-64
  17. Play Atari ROMs Without the Atari
  18. Use Atari Paddles with Your PC
  19. Run Homebrew Games on the Atari 2600
  20. Create Your Own Atari 2600 Homebrew Games
  21. Play Classic PC Graphic Adventures
  22. Play Old Games Through DOSBox
  23. Play Reissued All-in-One Joystick Games
  24. Play Arcade Games Without the Arcade
  25. Add and Manipulate a MAME Frontend
  26. Keep Your ROMs Tidy and Organized
  27. Learn Game-Specific MAME Controls
  28. Filter Inappropriate MAME ROMs
  29. Autoboot into MAME Heaven
  30. Play Emulated Arcade Games Online
  31. Play Classic Pinball Without the Table
  32. Emulate the SNES on the Dreamcast
  33. 2. Playing Portably
  34. Play Games on Your iPod
  35. Mod Your Game Boy
  36. Take and Print Photos with Your Game Boy
  37. Compose Music on Your Game Boy
  38. Explore the GP32 Handheld Gaming System
  39. Take Your Console with You
  40. Explore the Bandai WonderSwan
  41. Play Real Games on Your PDA
  42. Install a PlayStation 2 in Your Car
  43. 3. Playing Well with Others
  44. Practice Proper MMORPG Etiquette
  45. Understand MMORPG Lingo
  46. Grind Without Going Crazy
  47. Make a Profit in Vana’diel
  48. Write MMORPG Macros
  49. Build an Effective Group
  50. Catch Half-Life FPS Cheaters Redhanded
  51. 4. Playing with Hardware
  52. Build a Quiet, Killer Gaming Rig
  53. Find and Configure the Best FPS Peripherals
  54. Adapt Old Video Game Controllers to the PC
  55. Choose the Right Audio/Video Receiver
  56. Place Your Speakers Properly
  57. Connect Your Console to Your Home Theater
  58. Tune Console Video Output
  59. Tune Your TV for Console Video
  60. PC Audio Hacking
  61. Optimize PC Video Performance
  62. Build a Dedicated Multimedia PC
  63. Use a Multimedia Projector for Gaming
  64. 5. Playing with Console and Arcade Hardware
  65. Play LAN-Only Console Games Online
  66. Hack the Nuon DVD Player/Gaming System
  67. Play Import Games on American Consoles
  68. Find a Hackable Dreamcast
  69. Play Movies and Music on Your Dreamcast
  70. Hack the Dreamcast Visual Memory Unit
  71. Unblur Your Dreamcast Video
  72. Use Your Dreamcast Online
  73. Host Dreamcast Games Online
  74. Burn Dreamcast-Compatible Discs on Your PC
  75. Burn Dreamcast Homebrew Discs
  76. Buy Your Own Arcade Hardware
  77. Configure Your Arcade Controls, Connectors, and Cartridges
  78. Reorient and Align Your Arcade Monitor
  79. Buy Cart-Based JAMMA Boards
  80. Programming Music for the Nintendo Entertainment System
  81. 6. Playing Around the Game Engine
  82. Explore Machinima
  83. Choose a Machinima Engine
  84. Film Your First Machinima Movie
  85. Improve Your Camera Control
  86. Record Game Footage to Video
  87. Speedrun Your Way Through Metroid Prime
  88. Sequence-Break Quake
  89. Run Classic Game ROM Translations
  90. Change Games with ROM Hacks
  91. Apply ROM Hacks and Patches
  92. Create PS2 Cheat Codes
  93. Hack Xbox Game Saves
  94. Cheat on Other Consoles
  95. Modify PC Game Saves and Settings
  96. Buff Your Saved Characters
  97. Create Console Game Levels
  98. 7. Playing Your Own Games
  99. Adventure Game Studio Editing Tips
  100. Create and Play Pinball Tables
  101. Put Your Face in DOOM
  102. Create a Vehicle Model for Unreal Tournament 2004
  103. Add a Vehicle to Unreal Tournament 2004
  104. Modify the Behavior of a UT2004 Model
  105. Download, Compile, and Create an Inform Adventure
  106. Decorate Your IF Rooms
  107. Add Puzzles to Your IF Games
  108. Add Nonplayer Characters to IF Adventures
  109. Make Your IF NPCs Move
  110. Make Your IF NPCs Talk
  111. Create Your Own Animations
  112. Add Interactivity to Your Animations
  113. Write a Game in an Afternoon
  114. 8. Playing Everything Else
  115. Tweak Your Tactics for FPS Glory
  116. Beat Any Shoot-Em-Up
  117. Drive a Physics-Crazed Motorcycle
  118. Play Japanese Games Without Speaking Japanese
  119. Back Up, Modify, and Restore PlayStation Saved Games
  120. Access Your Console’s Memory Card Offline
  121. Overclock Your Console
  122. Index
  123. Colophon

Add and Manipulate a MAME Frontend

MAME is wonderfully simple ( [Hack #10] ); it’s a nice, unified bundle of myriad emulators you’d otherwise have to download and configure individually. While launching it from the command line and typing the name of the ROM you want to run is sufficient, adding in options can make things a little more complex.

There’s a dizzying array of frontend programs that bolt onto MAME. These provide sophisticated GUI-based menus with which the player can choose particular games to play and options to use. Some frontends also include handy game paraphernalia such as screenshots, cabinet photos, and even related audio and video, giving you a luxurious overview of your game before you even start the emulator.

With multiple platforms and myriad slightly different choices, where do you even start? My top choice of frontends is AdvanceMenu, though I’ll also outline some alternatives.

AdvanceMenu

The AdvanceMenu (http://advancemame.sourceforge.net/menu-readme.html) site describes the program as “a frontend for AdvanceMAME, MAME, MESS, RAINE and any other emulator . . . .” It uses the cross-platform SDL multimedia library (http://www.libsdl.org/), so it runs on Linux, Mac OS X, DOS, Windows, and a few other platforms. Because it’s from the same team that developed AdvanceMAME, they play together nicely.

AdvanceMenu lacks the crazed 3D virtual reality arcade-roaming of other frontends, and because it’s so portable, it doesn’t rely on super-complex window layouts and doohickeys. It’s not plain, though. You can easily set neat browsing options, as seen in the example screenshots page (http://advancemame.sourceforge.net/menu-snapshot.html, or Figure 1-9).

The AdvanceMenu page, showing frontend layouts

Figure 1-9. The AdvanceMenu page, showing frontend layouts

Here’s how to use the program with the normal, vanilla version of MAME:

  1. Download the latest version. I use the Windows version from http://advancemame.sourceforge.net/menu-download.html. AdvanceMenu automatically detects many emulators, so make sure you have the latest version of MAME. Unzip AdvanceMenu into the same directory as MAME.

  2. Load the advanced video driver, if necessary. You will find it useful to fire up a command prompt and run the svgalist /l command. This loads the svgawin.sys driver in Windows NT, 2000, and XP. The AdvanceMAME web site has a page explaining this utility. Basically, it’s an advanced video driver that’s useful for running AdvanceMenu.

  3. Choose your options. Click on advancecfg.exe, and you’ll see several text menus with options to navigate through. The details here are impressive; they allow you to send your output to a PC monitor, an arcade machine, a TV, or other custom display devices. For this example, choose PC Monitor. You will see even more complex clock range-related values. I use Generic PC VGA, although I suspect you should look up things in your monitor manual if you can find it. Finally, center your screen appropriately, and save your settings.

  4. Create the mame.ini file. Make sure there’s a mame.ini file in your MAME directory, so run mame -createconfig from the command line. Let’s start simple: have AdvanceMenu find the ROMs directory and load a basic menu that lists each ROM you have in your directory. Edit advmenu.rc to add this line:

    emulator "mame" mame "mame.exe" ""
  5. Keep a close eye on advmenu.rc, because you’ll need to edit it later to customize things further.

In this case, AdvanceMenu figures out the ROM path from the rompath value in mame.ini. If you have screenshots or snapshots for games installed on your version of MAME, it’ll look at snap_directory from the same file to find those. In other words, AdvanceMenu extracts values automatically from MAME’s initialization files so that you don’t have to. That’s the simple approach. Here are a few more advanced options to spiff up your AdvanceMenu fun.

Flyers

To allow alternate paraphernalia, such as flyers (scans of the original game’s promotional sheets), add the following line to advmenu.rc:

emulator_flyers EMUNAME 
                  LIST

This line sets the LIST directory as the location of the flyers for the games used by the EMUNAME emulator. Find these flyers at the ArcadeFlyers site (http://www.arcadeflyers.com/).

Video previews

A particularly neat feature is the ability to output MNG (animated PNG image) files from AdvanceMAME, compress them with the AdvanceMNG command-line compressor (http://advancemame.sourceforge.net/doc-advmng.html), and then use the animations in the game selection screen. Other frontends provide video ability, of course, but this one makes it easy to record your favorite boss-beating move in the actual game and make it the default video when you load the emulation in the future. This is eye candy and personal bragging rights bundled together!

However, AdvanceMAME supports only MNG, so there may be incompatibilities with other minivideos from other frontends.

To use, place the video in the normal image preview directory. To choose how the video loops, set the ui_clip option in advmenu.rc.

Flyers as screensavers

AdvanceMenu can segue into a screensaver mode, should you wish it to, displaying the game flyers you’ve installed. Enable this by adding the following to your advmenu.rc file:

idle_screensaver 60 30
idle_screensaver_preview flyers

This starts a screensaver after 60 seconds of idleness, the first time the screensaver runs, and after 30 seconds of idleness on subsequent occasions. The screensaver cycles through the flyers you have stored, since you’ve obviously already added them.

Add a completely different emulator altogether

The documentation (http://advancemame.sourceforge.net/doc-advmenu.html) points out that you can attach any emulator you like to AdvanceMenu, as long as you do it correctly. You’ll need to specify the emulator name, call it a generic type, and then point to the ROMs, also filtering them by filename if you wish. For example, to run the SNES emulator Snes9X, add something like this to your advmenu.rc file:

emulator "snes9x" generic "c:\game\snes9x\snes9x.exe" "%f"
emulator_roms "snes9x" "c:\game\snes9x\roms"
emulator_roms_filter "snes9x" "*.smc;*.sfc;*.fig;*.1"

Alternatives to AdvanceMenu

If AdvanceMenu doesn’t quite fit the bill for you, there are many alternatives and many sites that give advice. The ever-reliable Zophar.net has a very thorough page (http://www.zophar.net/frontends/mame.html) that includes brief and very helpful descriptions of your options, along with version numbers and updates. You can also try the massive MAMEWorld site (http://www.mameworld.net/), which has one of the best lists of frontends, appearing at the bottom left of the title page. Unfortunately, the latter is completely unannotated, so you’ll have to guess which linked frontends are the best, or just keep reading. Here are some of the best alternatives.

MAME32, a Windows-based all-in-one solution

Although the MAME developers (MAMEDev) sanction their work, the splinter group who produce MAME32 (http://www.classicgaming.com/mame32qa/) aren’t part of the core MAME group. Nonetheless, they do an amazing job of providing an all-in-one MAME solution for Windows users. The overview explains that MAME32 “has an attractive, elegant, graphical interface which allows the user to forego having to type command line parameters.”

After you download MAME32 (http://www.classicgaming.com/mame32qa/down.htm), download the supplemental art packages from the same page. It’s quite convenient to have the sometimes difficult-to-find paraphernalia linked from the same site as the binaries. There’s also a very helpful page for installing the artwork packages (http://www.classicgaming.com/mame32qa/help/mame32_art.htm); it explains how to plug these add-ons into the program itself. For example, for the prodigiously large amount of screenshots, just copy them into the mame32/snaps folder of your installation. Similarly, for photos of the arcade cabinets themselves, dump them into mame32/cabinets or into one big cabinets.zip file that the program can consult when loading.

The MAME32 customization options aren’t complex, but as the MAME32 gallery shows (http://www.classicgaming.com/mame32qa/gallery/gallery.htm), you can:

  • Switch fonts by picking Options/Game List Font from the menu

  • Change the game listings to show icons, details, and other information by clicking the icons mounted just below the options menus, or picking the View menu

  • Change which GUI items appear when you start up by checking or unchecking any default options from the View menu

The official MAME32 support page (http://www.classicgaming.com/mame32qa/help/mame32_support.htm) isn’t quite comprehensive, but it does have a few good tips, especially regarding keyboard shortcuts. For example, if you’re in the mood for a little Russian Roulette as your arcade game of choice, choose a random ROM by pressing Ctrl-R in the menu. Just don’t blame me if the computer chooses Spy Hunter II, and you end up crying into your expensive arcade joystick. Alternately, if you’d like to skip swiftly to a particular game, use the keyboard to type in its name (or even the first couple of letters). MAME32 selects it automagically, saving you the pain of scrolling up and down maniacally.

3DArcade, the high-end virtual reality approach

3DArcade (http://3darcade.mameworld.net/) shows the insane lengths people will go to in order to select their MAME games: it’s home to 3D models of arcade machines. This works best when combined with the sophisticated, Windows-only FEArcade frontend (http://3darcade.mameworld.net/frontend/frontend.htm) and allows anyone to set up his own virtual arcade. Stroll up to a machine and press a button to start playing.

Is this 3D GUI over-the-top overkill? Possibly. It’s also rather marvellous, not least of which because it’s fun to imagine what a collection of classic 1982 arcade machines all looked like together in one place. Anyone can make and export cabinets in the fairly standard .W3D format. The 3DArcade models page (http://3darcade.mameworld.net/models/models.htm) also includes .MAX files for many of the cabinets, if you want to open and adapt them directly in 3D Studio Max.

There are many pictures of the frontend in action (http://3darcade.mameworld.net/frontend/defaultskin.html), and you can see some of the really insane arcades created on a special site page (http://3darcade.mameworld.net/arcades/arcades.htm). It’s particularly worth checking out the Deniros-Domus Arcade, described, trippily enough, as “a futuristic take on Frank Lloyd Wright’s Guggenheim Museum set in space.” Of course, trying to climb up a crazed 3D world-based spiral staircase into space just to play your favorite arcade game may not be your idea of fun, but it does have style.

MacMAME

MacMAME is a good all-in-one MAME and frontend solution for Mac users, whether they use OS 9 or OS X. It’s well worth checking out; for a long time, it was the only real option for Mac users who wanted decent menus with their MAME install. See http://www.macmame.org/.

Ultrastyle

This Windows-specific frontend is in early development. It’s skinnable and has a neat graphical menu, though it somewhat resembles the Ultracade frontend used for official MAME-style arcade machines running emulated Capcom games. Download it from http://www.mameworld.net/ultrastyle/index.html.

ArcadeOS

ArcadeOS is a DOS-based frontend—particularly useful if you run a PC using MAME exclusively through an arcade stick. Whether you’re using TV-out on your television and aren’t close to your keyboard or you’re using a PC inside an arcade cabinet with a MAME to JAMMA converter, this is the software to beat. You can set your PC to autoboot into this menu without needing a mouse to load a frontend through Windows. Learn more at http://www.mameworld.net/pc2jamma/frontend.html.

QMame

This is a Linux/Unix frontend based on Trolltech’s QT library. It’s a comprehensive, good-looking Linux solution. Although at press time it had not seen an update in a while, it’s pretty usable as is. Be sure to install XMame (http://x.mame.net/) before installing QMame (http://www.mameworld.net/mamecat/).