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

Adapt Old Video Game Controllers to the PC

Want to play your favorite PC game with your favorite console joypad? No problem.

If you enjoy playing arcade-style games on your PC, you may have found that they benefit immensely from a joypad. (Trust me, they do.) However, although you can buy PC joypads that will do the trick, you probably already have a perfectly good Xbox or PlayStation controller. Thanks to the wonders of hacking, you can adapt that console controller to work on your home computer. This is great for console ports, MAME, other emulated titles, and your wallet.

The Easy Way: Buying Adapters

Before hacking any hardware, consider that you can buy several third-party USB adapters, particularly for PlayStation joypads, but also for the Xbox and more exotic consoles. However, you may not be able to use your choice of homebrew drivers for this equipment. Sometimes, the hardware adapter is a little bit proprietary, so you’ll have to use the manufacturer’s drivers or write your own. On the plus side, the hardware is already built.

Be aware that several available PlayStation adapters have a few compatibility problems. They do complicated things, and most adapters have only Windows drivers. As well, some commercial USB adapters will not work properly with Dance Dance Revolution pads, if you want to play DDR or DDR clones such as Stepmania on your PC. The parallel port adapter we’ll build does work in concert with the DirectPad drivers—another reason to hack it yourself. Junta’s DDR modding site (http://junta.cromas.net/adapters.html) has a good list of DDR adapter problems.

In general, you should be perfectly safe buying an Xbox-to-USB converter, because the Xbox controller is already a USB device. All the converter does is change the gender of the adapter. Of course, this makes it much easier to make your own.

Beyond these two popular classes, you can buy several more exotic prebuilt adapters, converting everything from the NES through the Neo Geo controllers to your PC. Start by looking at Smartjoy.com (http://www.smartjoy.com/), now a division of Hong Kong retailer Lik Sang. The site has some commercial impetus that could skew things, but it still seems good at comparing a large range of adapters.

Tip

If you’re feeling really lazy, look for Sega’s new PC USB version of the classic Sega Saturn. There’s no need to do any hacking at all; just buy it and plug it in.

The Hard Way: Building an Xbox-to-PC Adapter

You’ll need several items for this hack:

  • A soldering iron to reconnect the wires

  • Electrical tape to make sure you don’t short out anything along the way

  • A USB-to-USB cable, available pretty much everywhere

  • An Xbox breakaway cable, easily found online from eBay or many third-party retailers

With the breakaway cable, you can cut and snip without affecting your actual joypad. Naturally, if you’re feeling confident and don’t want to play your Xbox controller on the Xbox anymore, you can skip this piece.

Cut the breakaway cable (the half of the Xbox controller cable closest to the console itself) either just before or just after the nodule that appears halfway down its length. Then strip the sheathing so you can see the five colored wires. Strip all of the wires (red, white, green, and black) except the yellow wire.

Now do the same with the USB cable, cutting it near one end and stripping the sheathing to expose the colored wires (red, white, green, and black). Now solder together the wires of the same color on the two cables. When you finish each individual solder, wrap a small amount of electrical tape around each connection to prevent it from touching other soldered wires and shorting out.

Finally, when you’re done, tape everything shut with electrical tape, plug the USB cable into your PC, and turn on your PC. If you’re using Windows, use the XBCD drivers (http://redcl0ud.hostrocket.com/xbcd.html) to make analog joysticks, the directional pad, and all 12 buttons work in PC games. The Mac (http://homepage.mac.com/walisser/xboxhiddriver/) and Linux drivers, at least, as part of the Xbox Linux project (http://cvs.sourceforge.net/viewcvs.py/xbox-linux/kernel/drivers/usb/), are at various stages of construction, but all of them basically work.

The Hardest Way: Building a PlayStation-to-PC Adapter

The PlayStation adapter is significantly more complicated but still fairly workable. The easiest approach involves using the parallel port to plug your adapted PSX controller into the PC. It requires more advanced use of a multimeter and diodes, as Figure 4-1 shows.

You’ll need:

  • A soldering iron

  • A multimeter

  • A male DB-25 connector

  • A PlayStation extension cable, easily found online or at your local store

  • Five (5) diodes of type 1N914 or 1N4148

  • A small piece of extra bare wire, an inch or so long

Pin map for the PS2 controller

Figure 4-1. Pin map for the PS2 controller

First, cut one end of the PlayStation extension cable, and strip the sheathing, exposing the wires in a similar way to the Xbox adapter. This time, you’ll see one wire without any insulation on it at all. Ignore it. If the controller is Dual Shock-compatible, you’ll see eight other wires. Otherwise, you’ll see seven.

Unfortunately, there’s no easy way to know which wire connects to which connection on the other end of the extension cable, so grab the multimeter. Put one contact in the first hole of the PSX connector and keep testing the wires until you have a positive result. Write down the hole and the color. Repeat for each of the PSX connector holes.

Now take the diodes and cut short (half an inch or less) the end furthest away from the marked ring on the diode. Solder these diodes to holes 5, 6, 7, 8, and 9 (the top center holes) of the DB-25 parallel connector, with the short end closest to the connector itself.

Finally, solder the PSX connector’s wires onto the DB-25 connector in the order shown in Figure 4-2. Connect hole 5 on the female PSX connector to all five diodes, using the extra piece of wire.

DB-25-to-PSX controller schematic

Figure 4-2. DB-25-to-PSX controller schematic

Finally, close the DB-25 connector and plug it into your PC’s parallel port. Several software drivers will work with your adapted PlayStation joypad, but DirectPad Pro (http://www.aldostools.com/dpad.html) is one of the best, because it also supports SNES, Sega Genesis, and other console joypads. PSXPad (http://www.psxpad.com/index_e.php) also comes highly recommended and supports a multitude of consoles.