This guide walks you through installing and configuring VICE, the Versatile Commodore Emulator, so you can develop and test Commodore 64 software on a modern computer. You’ll learn how to set up the emulator, attach a virtual disk drive, and load your own programs, giving you a reliable development environment without needing original hardware.
What You’ll Need
- A computer running Windows, macOS, or Linux.
- The VICE emulator, downloaded from the official VICE website (vice-emu.sourceforge.io). Choose the package for your operating system.
- A text editor that can save files in plain ASCII (e.g., Notepad on Windows, TextEdit on macOS, or any code editor).
- Optional: A real Commodore 64 ROM image (e.g., “basic.rom”, “kernal.rom”, “characters.rom”) if you want to use the original ROMs. VICE includes freely distributable ROMs for basic use, but they are not the original Commodore ROMs.
- Optional: A cross-assembler or compiler for 6502 assembly (like the ACME assembler or Kick Assembler) if you plan to write assembly code.
Step-by-Step
- Download and install VICE. Go to the official VICE download page and grab the installer for your OS. Run the installer and follow the prompts. On Windows, you’ll likely get a .exe file; on macOS, a .dmg; on Linux, use your package manager (e.g.,
sudo apt install viceon Debian/Ubuntu). - Launch VICE. After installation, open the program. You’ll see the main window with a virtual C64 screen and a separate control bar. If you get a message about missing ROMs, see the Troubleshooting section.
- Configure the emulator for development. Click on the “Options” menu in the control bar, then select “Settings” (or press F10). In the Settings dialog, go to “Drive” settings. Set the “Drive type” to “1581” or “1541” (most C64 software uses 1541). For development, you’ll often want to use a virtual device like the “Virtual Device” (also known as the “Virtual FS”) to access files directly from your host computer. Under “Drive 8”, select “Virtual FS” as the device type. This allows you to treat a folder on your computer as a disk drive.
- Set up a virtual disk folder. Create a folder on your computer, for example
C:\c64dev(Windows) or~/c64dev(macOS/Linux). In VICE’s Settings, under “Drive 8”, click the “Browse” button next to “Virtual FS” and select that folder. This folder will appear as the disk in drive 8. - Write a test program. Open a text editor and write a simple BASIC program. For example:
10 PRINT "HELLO FROM VICE!" 20 GOTO 10
Save this file as
hello.prginside your virtual disk folder. The .prg extension is conventional for Commodore programs, but not strictly required for the virtual FS. - Load the program in VICE. In the VICE window, type
LOAD"HELLO.PRG",8and press Enter. The emulator will read the file from your virtual disk. You should seeSEARCHING FOR HELLO.PRGand thenLOADING. - Run the program. After the load completes, type
RUNand press Enter. The screen should clear and start printing “HELLO FROM VICE!” in an infinite loop. To stop it, hold theRUN/STOPkey (usually mapped to the Esc key on your keyboard). - Test with assembly language (optional). If you want to develop in assembly, you’ll need a cross-assembler. Install ACME (a popular 6502 assembler) on your host. Write a small assembly program, assemble it to a .prg file, and place it in your virtual disk folder. Then load and run it in VICE just like the BASIC program.
- Use the debugger for testing. VICE includes a powerful debugger. To open it, press
Alt+D(Windows/Linux) orCmd+D(macOS). The debugger lets you set breakpoints, step through code, inspect memory, and monitor CPU registers. This is essential for testing and debugging your development work. - Save your work. When you’re done, you can save a program back to the virtual disk by typing
SAVE"MYPROG.PRG",8in VICE. This writes the file to your host folder, so you can easily edit it with your regular tools.
Common Mistakes
- Using the wrong device number. If you type
LOAD"FILE",8but your virtual drive is set as device 9, the load will fail. Always check the device number in VICE’s drive settings. - Forgetting the comma and 8. The correct syntax is
LOAD"FILENAME",8. Omitting the comma or the 8 will cause a syntax error or attempt to load from tape (device 1). - File name case sensitivity. On the virtual FS, file names are case-sensitive on Linux and macOS, but not on Windows. If your file is named
Hello.prg, typingLOAD"HELLO.PRG",8will fail on Linux. Use exact case. - Not setting the virtual FS folder correctly. If you select the wrong folder, VICE won’t see your files. Double-check the path in Settings.
- Using a .d64 image when you meant virtual FS. If you want to use a disk image (like .d64), you need to attach it via the “Attach disk image” option, not the virtual FS. Mixing these up causes confusion.
Tips
- Use a dedicated folder for each project. This keeps your virtual disks organized and makes it easier to manage multiple programs.
- Learn the keyboard shortcuts. VICE has many shortcuts:
F10for settings,Alt+Dfor debugger,F5to warp speed (fast forward), andAlt+Enterfor fullscreen. - Use warp mode for long tests. If your program has a long delay, press
F5to run at maximum speed, thenF5again to return to normal speed. - Take advantage of the monitor. The debugger’s monitor allows you to examine memory, disassemble code, and even patch memory while the program is running. This is invaluable for testing.
- Back up your virtual disk folder. Since it’s just a folder on your host, you can copy it to another location for backup.
Troubleshooting
- VICE won’t start or complains about missing ROMs. VICE needs ROM images for the C64. If you don’t have the original ROMs, VICE can use its built-in “free” ROMs, but you must enable them. In Settings, go to “ROM” and select the “Use built-in ROMs” option. If you have the original ROMs, place them in the appropriate folder (e.g.,
C:\Program Files\VICE\C64on Windows) and configure the paths in Settings. - LOAD”FILE”,8 gives a “FILE NOT FOUND” error. Check that the file is in the virtual FS folder, the name is spelled correctly (including case), and the device number matches the drive settings.
- The program loads but doesn’t run correctly. If you’re loading a .prg file, make sure it’s a valid Commodore program. If you’re using a cross-assembler, ensure you’re generating a proper .prg format (with a two-byte load address header). For BASIC programs, ensure the file is saved in ASCII with line numbers and no extra characters.
- The screen is black or garbled. Try resetting the emulator (press
Ctrl+Xor use the “Reset” option in the menu). If the problem persists, check your ROM settings. - Keyboard input is not working. Make sure the VICE window has focus. If you’re using a laptop, check that the function keys are mapped correctly (e.g., F1, F2, etc. are used by the C64). You can remap keys in Settings under “Keyboard”.
- Performance is slow. Close other programs, or enable warp mode. If it’s still slow, try reducing the screen size or disabling sound in Settings.
Frequently Asked Questions
- Do I need original Commodore ROMs to use VICE? No, VICE includes freely distributable ROMs that work for most development. However, for perfect compatibility, you can use the original ROMs if you own them.
- Can I use a real Commodore 1541 disk drive with VICE? Yes, VICE supports connecting a real disk drive via a serial adapter (like the XUM1541). This is advanced and requires additional hardware.
- What is the difference between a .d64 file and the virtual FS? A .d64 is a disk image that emulates a real floppy disk. The virtual FS treats a folder on your computer as a disk, which is easier for development because you can edit files directly.
- How do I create a .d64 image for testing? You can use VICE’s built-in “Attach disk image” to create a new .d64, or use a tool like c1541 (included with VICE) to create and manage .d64 files from the command line.
- Can I debug assembly code in VICE? Yes, the debugger (Alt+D) provides a full-featured monitor with breakpoints, single-stepping, and memory inspection. You can also use the monitor to disassemble code.
- Is VICE legal to use? Yes, VICE is open-source software. However, using original ROM images may be subject to copyright laws in your jurisdiction. The built-in ROMs are legally distributable.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Campus Tech Innovation Hubs: What They Are
- Poco C51 Airtel Prepaid Locked Variant India?
- Jenkins vs GitHub Actions: Which CI/CD Fits Your Team?
- Turn Off Backup Encryption in iTunes?
- Shared VPS Hosting: Is It Better?
- Disk Defrag Pro: What It Does and Whether You Need It