Hack58.Emulate the Commodore 64

Hack 58. Emulate the Commodore 64

Run Commodore software on your modern-day PC .

Maybe you don't want to wait until the end of an eBay auction, or perhaps the shoggoth that shambles around your attic still hasn't left. Whatever the case, running a real Commodore 64 [Hack #57] didn't quite do it for you. No matteryou can emulate the Commodore 64, and the programs you run will be none the wiser. There are plenty of emulators that run this classic system perfectly , bringing back the classics you loved and introducing some you've never seen before. You can find emulators for just about any platform you can think of.

5.7.1. Windows

Windows users have plenty of Commodore 64 emulators to choose from, and many of these are listed at Zophar's Domain (http://www.zophar.net/c64.html). CCS64 (http://www.computerbrains.com/ccs64/) is a popular and capable shareware ($30) emulator that is well-worth checking out. When you launch it for the first time, you'll probably click randomly like a wild monkey trying to find either the emulator options or a menu that lets you load a disk imagedon't worry, you're just looking in the wrong place. To get to either the emulator options or to load a disk image, press F9 to enter the emulator menu. It has a delightful retro-64 feel, as shown in Figure 5-12.

Figure 5-12. CCS64's emulator menu

Frodo (http://www.students.uni-mainz.de/bauec002/FRMain.html) and VICE (http://www.viceteam.org/) are two free emulators that also work well on Windows. Although you can download the source for either and compile it yourself, you should always be able to find links to the latest Windows binary release on the web site for each emulator. These binary releases usually come in the form of a Zip file that you need to extract (with WinZip, Info -ZIP, or Windows XP's built-in Zip support) and copy to a folder somewhere on your hard drive. Although you don't get the usual Windows installer, these programs are simple to use: to run VICE, double-click on the x64 icon. To run Frodo, double-click on the Frodo icon (you should only use FrodoPC and FrodoSC if Frodo, or a particular C64 application running under Frodo, malfunctions).

5.7.2. Linux

There are a number of Commodore 64 emulators for Linux and Unix (see http://www.zophar.net/unix/c64.html), but of all of them, I prefer Frodo and VICE. You may be able to find either or both of these in a package repository for your operating system (either on your installation media or online). If not, it's easy to compile and install either of these. You can download Frodo from http://www.students.uni-mainz.de/bauec002/FRMain.html and VICE from http://www.viceteam.org. Both emulators are packaged as .tar.gz files. Use the command tar xfz filename to extract the emulator's source code, change directory ( cd ) into the top-level directory that tar creates for you, and examine both the README and INSTALL files for instructions on compiling and installing the emulator. I suggest you install both emulators and see which one suits you best. For example, here's how I compiled and ran VICE:

  1. Extract the file and cd to the top-level directory:

     $  tar xfz vice-1.16.tar.gz  $  cd vice-1.16  

  2. Read both the README and INSTALL files (press the spacebar to proceed to the next screenfull of text, press Q to quit):

     $  less README  $  less INSTALL  

  3. Run the configure and make commands as root . You need to prefix the configure command with ./ because the command is in the top-level directory. The make command is a utility that's installed on your system:

     $  ./configure  $  make  

  4. Use the sudo command to run make install as root (if you don't have the sudo command on your machine, run su to become root first):

     $  sudo make install  Password: ******** 

  5. Run the x64 program to launch the Commodore 64 emulator (see Figure 5-13):

     $  x64  

Figure 5-13. Running VICE on a Linux system.

5.7.3. Mac OS X

There are a few Commodore 64 emulators for Mac OS X. Of the three I've tried, Power64 (http://www.infinite-loop.at/Power64/) works best for me, if only because it is so much more configurable than Frodo, the other native Mac OS X C64 emulator I tried. The demo version is limited to 10-minute sessions, and the full version is available for $25.

Frodo (http://www.bannister.org/software/frodo.htm) is a great port of the excellent Frodo emulator described in the previous sections, but it was much less configurable. For example, Power64 allows me to configure which keyboard buttons map to the joystick, but on Frodo's Joysticks preferences, the "Configure Keyboard" option was grayed out. With the addition of Richard Bannister's Emulation Enhancer ($25; http://bannister.org/software/ee.htm), you can add USB game controller support to Frodo and to many of Richard's other emulators [Hack #42] .

Mac OS X supports the same X11 windowing system that's used as the foundation of the desktop on Linux and Unix systems. X11 is an optional install, but you can find it on your Mac OS X installation CD or DVD (look in /System/Installation/Packages for a file called X11User.pkg ). X11 is not just an afterthought add-on for rudimentary Linux/Unix compatibility. It's a solid and fast implementation, and makes it easy to bring over X11 apps such as VICE (http://www.viceteam.org/). The Mac OS X version of VICE comes with a rudimentary Mac frontend that lets you choose which emulator (Commodore 64, 120, Vic-20, and more) to run. Once you click the Start button, there will be a delay as X11 starts, and then you'll find VICE up and running. From there on in, VICE behaves identically to the Linux/Unix version.

5.7.4. Getting Software

If you're an old-school C64 user , you've probably got a nice collection of floppy disk games. But even if there isn't an unspeakable horror coming between you and the contents of your attic, Cthulhu himself might as well be guarding your old games . For even if you picked up some hardware (see http://sta.c64.org/) that lets you connect your Commodore 64 hard drive to your computer, there's a good chance that the disks are old enough that you'll have trouble reading them.

GameBase64 (see http://www.gamebase64.com/mission.php) maintains a database of screenshots, descriptions, and other information about all the games that ever graced a Commodore 64 disk drive. If you need a trip down memory lane, check out their site as well as their frontend application that lets you browse the database and launch applications from within your favorite emulator.

It's not hard to find disk images of commercial C64 games online; use your favorite search engine or P2P filesharing application, then download what you're looking for. But don't neglect the efforts of public domain, shareware, and even modern Commodore 64 developers. You can find plenty of great games, applications, and information in the Commodore 8-Bit archive at http://www.zimmers.net/anonftp/pub/cbm. The c64/games directory is full of public domain, freeware, and shareware games. Be sure to check out the Llamasoft section for some great games from retro-gaming legend Jeff Minter. You can also find the Llamasoft titles at http://www.llamasoft.co.uk/lc-8bit.php. Don't let the greatness of Jeff's games keep you too occupied, though. Make sure you check out the offerings from Protovision (http://www.protovision-online.de/), who started writing games for the Commodore 64 in 1996. They have freeware games as well as some games that you can try in demo form.

When you download games, you'll find them in a variety of forms. A .d64 file is a Commodore 64 disk image, and you can use the floppy drive instructions in "Run a Commodore 64" [Hack #57] to list, load, and run programs.

Files ending with .prg are Commodore 64 programs that need to be on a disk image or run from an emulator (such as Power64) that can run programs directly. Some files, such as the ones you download from Llamasoft, won't have an extension after you extract them from their Zip file. In this case, you can usually append .prg to the end of the filename. If your emulator won't load a file directly from a .prg , you can use a utility to create a disk image and load it just like any other .d64 (and then you don't need that extension, but it doesn't hurt to have it).

The Vice emulator, discussed later in this hack, includes a utility called c1541 that you can use to create a disk image and add files to it. Suppose you have a couple of Jeff Minter's Llamasoft games in your current directory. You must start c1541 from a Command Prompt (Windows), or a terminal application (Mac OS X or Linux). Issue the following commands from within c1541 to create a disk image ( llamas.d64 ) and add a couple of games to it:

 C1541 Version 4.00. Copyright 1995-2003 The VICE Development Team. C1541 is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type 'show copying' to see the conditions. There is absolutely no warranty for C1541. Type 'show warranty' for details. c1541 #8>  format llamas,8 d64 llamas.d64  Unit: 0 Formatting in unit 8 c1541 #8>  write revenge.prg  Writing file 'REVENGE.PRG' to unit 8. c1541 #8>  write gridrunner.prg  Writing file 'GRIDRUNNER.PRG' to unit 8. c1541 #8>  exit  

Depending on whether you are on Mac, Linux, or Windows, you'll find c1541 in different locations. On Windows, it will be in the WinVICE - x.xx subdirectory ( x.xx should be replaced with the actual version of WinVICE you are running) On the Mac, it's in the data/bin subdirectory of the VICE directory (defaults to /Applications/VICE ). On Linux, you'll find it in /usr/ local/bin,/usr/bin , or wherever you installed VICE.

Once you've created the .d64 , load it in your Commodore 64 emulator and run the game you want; for example: LOAD "REVENGE.PRG",8,1 and then type RUN and press Return. Some emulators (such as Frodo) may automatically launch the first program on the disk image (you'll see the command LOAD "*",8,1 fly by on the screen) and others (such as Power64) will prompt you to choose which program to run. Once you've got it running, read the documentation to find out which controls your emulator uses for the joystick, and start blasting!

If you take a look at a Commodore 64 keyboard, you'll see that the " key is placed over the 2 key. So, if pressing the real double-quote key (usually Shift-') doesn't work, try Shift-2.


Brian Jepson



Retro Gaming Hacks
Retro Gaming Hacks: Tips & Tools for Playing the Classics
ISBN: 0596009178
EAN: 2147483647
Year: 2003
Pages: 150
Authors: Chris Kohler

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net