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

Play Commodore 64 Games Without the C-64

Relive the glory days of Commodore’s long-lived personal computers.

Commodore’s unassuming C-64 had a surprisingly long run as the king of computer games. The inexpensive machine had powerful sound, colorful graphics, and just enough hackability that clever developers could squeeze every last bit of performance out of its 1-MHz processor and specialized graphics and sound chips.

Although Commodore’s Amiga surpassed the C-64 (and the improved, though relatively ignored, C-128), the PC finally took over the reign of computer games in the early ’90s. Commodore’s 1992 bankruptcy didn’t help, either. [2]

A decade later, the C-64 lives on, sometimes in hardware, but more often in emulators. If you’re feeling nostalgic for Commodore BASIC—a simple, easy to use, and, in retrospect, fairly awful programming language—or the thousands of games produced in that heady decade, you’re in luck.

Installing VICE

Two emulators vie for the top spot in C-64 emulation, VICE, available from http://www.viceteam.org/, and CCS64, available from http://www.computerbrains.com/ccs64/. CCS64 is shareware, and the current version runs only on Windows, while the GPLd VICE runs on several platforms. Both work well, but we’ll concentrate on VICE.

Download the current version for your platform from the VICE homepage. Windows users: unzip the WinVICE-1.14.zip file to its own directory (perhaps C:\WinVice-1.14). Mac OS X users: mount and install the VICE1.14-macosx.dmg image as usual. Unix users should know what to do already.

Tip

The archive contains a HTML version of the documentation, found in the html/ subdirectory. See html/vice_toc.html for a good starting point.

Run the C-64 emulator as x64. There are also C-128, VIC-20, PET, and CBM-II emulators, if you’re feeling really retro.

Loading Disk Images

We’ll use Richard Bayliss’s public-domain Balloonacy (see http://web.ukonline.co.uk/tnd64/download_library.html) as the example game. This cute little action game has you guiding a helium-filled balloon through a dangerous maze of lasers, walls, and sharp corners everywhere.

Launching the game is easy. From the command line, launch the emulator (x64 for the C-64, x128 for the C-128, and so on), passing the name of the disk image to launch as the final command parameter. One nice feature of VICE is that it can extract a disk image from inside a compressed file.

$ x64 balloonacy.zip

This loads the disk image and launches it. Alternately, you can boot the emulator and load the image manually:

$ x64

When the familiar blue-on-blue screen appears (see Figure 1-2), click the left mouse button and select “Attach a disk image.” Choose the drive number to use—remember, the first 1541 or 1571 starts as device number 8—and browse to the disk image to load. Hit the Select button, and then press OK. In effect, you’ve just put a floppy disk in the drive.

The familiar C-64 prompt

Figure 1-2. The familiar C-64 prompt

If you don’t see the files you want to load, be sure to check the filter expression in the Show box. By default, it shows only files with extensions starting with the letters g, d, or x, regardless of case. To see all files, change the expression to *.*.

Now reach back a decade or more into long-forgotten BASIC commands. To read the directory of the disk, load the special directory file ($), then list it. Figure 1-3 shows the results.

The Balloonacy disk directory listing

Figure 1-3. The Balloonacy disk directory listing

               LOAD "$",8
SEARCHING FOR $
LOADING
READY.
LIST

If you just want to run the program, use the special “load into memory” command, then run the program (some programs run automatically):

               LOAD "*",8,1

SEARCHING FOR *
LOADING
READY.
RUN

It’s been a decade, so how do you remember all of these commands? Unless you spent your childhood writing games on the C-64, you might prefer to consult the Commodore 64 Online User Manual (http://www.lemon64.com/manual/). Feel free to snicker over the section on cassette drives.

Configuring Joystick Emulation

Unless you have a joystick plugged into your machine (at the time of writing, this required running VICE on Linux), the number pad is the easiest way to play games. As you’d expect, the number keys correspond to the directions, where 8 is up, 4 is left, 6 is right, and 2 is down. 0 is fire.

Right-click in the VICE window, and select the Joystick settings menu. From here, you can configure joysticks 1 and 2. Many C-64 games contrarily used joystick 2 for player one, and vice versa. Select Joystick device in port 2, then the Numpad option. Be sure that joystick 1 has a different setting; none is fine.

Left-click again, and choose Save settings. This saves you from having to reconfigure the joystick every time you launch a new game.

Now that you have joystick emulation configured, hit 0 on the number pad to start the game. Figure 1-4 shows a (paused) screenshot of the first level.[3]

Balloonacy level one

Figure 1-4. Balloonacy level one

There are a few other keys and options worth remembering, as seen in Table 1-1.

Table 1-1. VICE key commands

Key

Action

Alt-8

Attach a new image to drive 8.

Alt-1

Load a snapshot.

Alt-s

Save a snapshot.

Alt-F9

Perform a soft reset.

Alt-p

Pause the emulator.

Finding Games

Unless you want to program your own games in Commodore BASIC,[4] you’ll need a disk image. Fortunately, these are easy to find. C64.com (http://www.c64.com/) and C64 Unlimited (http://www.c64unlimited.net/) have huge collections of downloadable games. If you have a pile of old floppy disks gathering dust in the closet, this is a wonderful resource. If not, or if you’re not sure about the legalities of media shifting (see [Hack #1] ), it’s easy enough to play homebrew games.

It’s exceedingly difficult to find homebrew games, however. The C-64 had a huge piracy problem, especially considering that it predated the Internet explosion. Though many games are at least a decade old, there are still copyright considerations to keep in mind.

Of course, there’s much fun to have in hacking around the games (Chapter 6) and creating games (Chapter 7).



[2] For more on C-64 history, see http://commodore.ca/products/c64/commodore_64.htm.

[3] To be honest, my arcade skills are rusty enough that in 10 minutes of playing, I couldn’t beat this level. That’s a good sign.

[4] At least one author started his illustrious career this way.