Commodore 64

The Commodore 64 is a computer developed by Commodore. It was released in 1982 and there is still active game development happening. There are several hardware revisions and even a cartridge-based console version, but the internals are nearly identical. The CPU is a 1 MHz 6502-variant, but the main features are a special video chip (the VIC-II) and a famous soundchip (the SID) which is still used by chiptune makers today. Emulating the SID takes a lot more system resources than the rest of the C64 due to its analog modulation features. The C64 was especially popular in Germany, Scandinavia and the USA. There are more than 20.000 known games for the C64 and several thousand of these were sold professionally.

This system scrapes metadata for the “c64” group and loads the c64 set from the currently selected theme, if available.

Grouped with the “c64” group of systems. There are two (lesser known) variants that can be chosen for specific games, the C64 DTV and the C64 SCPU. Please see the respective sections.

  • Accepted ROM formats: .d64, .d81, .crt, .prg, .tap, .t64, .m3u, .zip, .7z
  • Folder: /userdata/roms/c64
  • BIOS files: Batocera V33 comes with all required BIOS files.
  • BIOS required? No
Emulators Accepted ROM formats
libretro: VICE_X64 .d64, .d81, .crt, .prg, .tap, .t64, .m3u, .zip, .7z
libretro: VICE_X64SC .d64, .d81, .crt, .prg, .tap, .t64, .m3u, .zip, .7z
VICE: X64 .d64, .d81, .crt, .prg, .tap, .t64, .zip
VICE: X64DTV .d64, .d81, .crt, .prg, .tap, .t64, .zip
VICE: XSCPU64 .d64, .d81, .crt, .prg, .tap, .t64, .zip

No Commodore 64 emulator in Batocera needs a BIOS file to run.

Games for the C64 basically can come in three different physical formats (Cartridge, Tape, Disk) and each of those can have different filetypes. Games can also be loaded as a C64 program (PRG file) directly, bypassing any emulated physical media. Therefore this section is more detailed than with other systems.

A “program” is a C64 executable file that you would LOAD and then RUN on a real C64. Using it with an emulator usually bypasses the loading process, injecting the file directly into the memory, and then automatically runs it (so there is no tape, disc or cartridge inserted). Emulators can also run programs that could not work on a real C64 because they use memory that can not be accessed during the real loading process. The most famous example is the “Oneload” collection of C64 games, which are very emulator friendly as they bypass all loading and unpacking times.

Most PRGs are “crunched”, meaning they have been optimized to use the least possible amount of disk space in order to fit more games on one disk or reduce loading times. Decrunching usually takes up to 20 seconds and is identified by wildly flickering color bars in the border area.

The C64 has a cartridge port and .crt files emulate these cartridges. In the early days of the C64, commercial games were released on cartridges that are usually 8KB or 16KB in size. Late in the eighties developers created cartridges that could store up to a megabyte of data via bank switching. The emulators in Batocera support nearly all these formats automatically. There are a few cartridges specifically produced for the obscure C64GS that will require you to set the MODEL TYPE to C64 GAMES SYSTEM PAL in the metadata for that game (not recommended for other C64 games).

A lot of popular disk based games have been hacked into cartridge games (and as of November 2021 there still is active development in this area), most often for the Easyflash3 cartridge. These modified versions usually have the shortest load times and also avoid diskette changes.

Easyflash cartridges can be modified (for example for Gamesaves) and when you properly exit the emulator, the modified cartridge is written back to the roms directory, so be advised that the checksums of .crt files can change when you play them.

There are also several utility cartridges which contain fast loaders or “freezers” can snapshot a game while it is running.

This is possible with the stand alone emulators (VICE: X64) by entering their main menu via [START], then CartridgeAttach CRT imageSet current cartridge as default. Back out to the main menu, Settings Management and finally Save current settings.

In libretro: VICE_X64, enter RetroArch's Quick Menu ([HOTKEY] + South button (B SNES)), then OptionsMedia OptionsCartridge. Remember to save the options.

Loading from tapes is a long process and if you want the full experience, there are .tap images for many games that are representations of the audio on the tape and therefore you enjoy the same load times of several minutes for one game. As many later C64 games actually include extra music and graphics during the load, these large (several 100 KB) files are important for digital preservation. If a tape file is smaller than roughly 40KB most likely it is actually just a PRG file hiding inside a wrapper that can be loaded instantly.

For multi-load games on tape you can access a full tape emulation including a tape counter, fast forward and rewind, either by opening the Virtual Keyboard in libretro: VICE_X64 (short press on [SELECT]) or by entering the Menu in VICE: X64 and going into the Tape options.

The Commodore 64 used a separate floppy disk drive, the 1541, which in itself is a complete computer with a nearly identical CPU to the C64. The 1541 reads single sided disks with about 170 KB of contents. The data of one diskette can be stored in a .d64 file which contains the data for all the tracks and sectors as the C64 would see it, but not the full data that the 1541 would access, so .d64 files usually do not contain any information about the copy protection used. There are file formats for raw disks (for example .g64) which are not directly supported by Emulation Station but can be loaded manually in the standalone emulators if required.

Loading a .d64 file emulates inserting the disk, typing LOAD “*”,8,1 which loads the first directory entry on a disk, and then RUN to start the program if it is not an Autostart program (which is actually a hack overwriting stack space, the C64 had no official Autostart). For disks that contain several different programs you need to manually load the correct program by resetting the emulated machine and typing in the specific commands (please refer to C64 documentation). There is no parameter in Emulation Station to select which program to load, it will always start the first one on the inserted media.

A later disk drive, the 1581, used 3.5 inch disks with a higher capacity of 800KB. This is represented by a .d81 image. While there have been nearly no commercial games released for this drive, some games have been converted from multi-disk 1541 to single-disk 1581 versions which then require no disk changes.

By default all emulators have Accurate Drive Emulation turned on which emulates the full 1541 drive. This can be turned off in the RetroArch settings (not EmulationStation) to speed up disk access but this reduces compatibility especially with games on multiple disks.

Many games use two sided disks or more than one disk. A two sided disk must be flipped manually on a 1541, so you would eject the disk, flip it around and re-insert it. The standard naming convention for such disks is Disk 1 - Side A and Disk 1 - Side B, followed of course by Disk 2 - Side A and so on.

When using the LIBRETRO: VICE X64 emulator (the default), the easiest way to switch disks is to just insert all required disk images into one ZIP file. When loading this ZIP, the emulator will temporarily unzip all disks into a save folder and build an .m3u file on the fly. To switch between the disks you can use [HOTKEY] + [L2] or [R2] to go through the disks. You can also utilize RetroArch's Disc Control menu in the Quick Menu ([HOTKEY]+South button (B SNES) button in-game, then scroll down, it's pretty low in the list). Select Eject Disc, then go to Current Disc Index and change your disk to the required one. Then, Insert Disc to continue the game.

This method does NOT save your progress on the disks as these are not modified inside the ZIP. You have to use Snapshots to save your in-game progress or check Save Disks.

You can of course create .m3u files yourself for better naming of disks as well as saving progress inside the .d64 images. By default, RetroArch will display the filename (without extension) of each M3U entry when selecting a disk via the Current Disc Index drop-down menu. Custom display labels may be set for each disk using the syntax: DISK_FILE|DISK_LABEL. For example, the following M3U file:

Cool Game Name (1990)(Developer)(Disk 1 of 3 Side A)(Game).d64|Game
Cool Game Name (1990)(Developer)(Disk 1 of 3 Side B)(Surface).d64|Surface
Cool Game Name (1990)(Developer)(Disk 2 of 3 Side A)(Dungeon).d64|Dungeon
Cool Game Name (1990)(Developer)(Disk 2 of 3 Side B)(Populace A).d64|Populace A
Cool Game Name (1990)(Developer)(Disk 3 of 3 Side A)(Populace B).d64|Populace B
Cool Game Name (1990)(Developer)(Disk 3 of 3 Side B)(Populace C).d64|Populace C

… will be shown in RetroArch's disk selection menu as:

1: Game
2: Surface
3: Dungeon
4: Populace A
5: Populace B
6: Populace C

Some games require you to supply your own empty disk for saving games. This requires an .m3u file. On the first line(s) you should point out to the program which does not need to be a disk but can be any supported file type (so you can use Save Disks also with PRGs or cartridges and even tapes). The last line in the .m3u file should be:


Although one save disk is normally sufficient, an arbitrary number of #SAVEDISK:VolumeName lines may be included. Save disks are located in the save directory, with the following name: [M3U_FILE_NAME].save[DISK_INDEX].d64.

Save disks generated by the #SAVEDISK: keyword are automatically assigned the label: Save Disk [SAVE_DISK_INDEX] in the list of disks.

Remember to switch to the Save Disk after starting your game, either via [HOTKEY] + [L1] or the RetroArch menus.

There are five emulators included for the C64 group. The default is libretro: VICE_X64 which is preferred due to better configuration via EmulationStation and some more display options. For high specced machines there also is a VICE_X64SC emulator, which is functional identical but has higher accuracy. It is only recommended on X64 machines. The higher accuracy usually is not needed for games although some graphics intensive demos need it.

There are three supplementary standalone variants: VICE: X64, VICE: X64DTV and VICE: XSCPU64. The first one, X64, emulates a standard C64. The X64DTV is for the C64DTV C64_Direct-to-TV which has more graphical capabilities, but does not have many specific games. The XSCPU64 emulates a modified C64 SuperCPU with a 20 MHz CPU and 16 MB of RAM instead of the standard 1 MHz CPU and 64 KB of RAM. It usually requires modified software.

RetroArch (formerly SSNES), is a ubiquitous frontend that can run multiple “cores”, which are essentially the emulators themselves. The most common cores use the libretro API, so that's why cores run in RetroArch in Batocera are referred to as “libretro: (core name)”. RetroArch aims to unify the feature set of all libretro cores and offer a universal, familiar interface independent of platform.

RetroArch configuration

RetroArch offers a Quick Menu accessed by pressing [HOTKEY] + South button (B SNES) which can be used to alter various things like RetroArch and core options, and controller mapping. Most RetroArch related settings can be altered from Batocera's EmulationStation.

Standardized features available to all libretro cores: c64.videomode, c64.ratio, c64.smooth, c64.shaders, c64.pixel_perfect, c64.decoration, c64.game_translation

ES setting name batocera.conf_key Description ⇒ ES option key_value
Settings that apply to all cores of this emulator
GRAPHICS BACKEND c64.gfxbackend Choose your graphics rendering
⇒ OpenGL opengl, Vulkan vulkan.
AUDIO LATENCY c64.audio_latency Audio latency in milliseconds, turn it up if you hear crackles
⇒ 256 256, 192 192, 128 128, 64 64, 32 32, 16 16, 8 8.
THREADED VIDEO c64.video_threaded Improves performance at the cost of latency and more video stuttering. Use only if full speed cannot be obtained otherwise.
⇒ On true, Off false.

libretro: VICE_X64

libretro: VICE_X64 configuration
ES setting name batocera.conf key Description » ES option key value
MODEL TYPE c64.c64_model Automatically switches region per file path tags (see PAL vs NTSC above)
» C64 PAL Automatic C64 PAL auto, C64 NTSC Automatic C64 NTSC auto, C64 PAL C64 PAL, C64 NTSC C64 NTSC, C64 Games System PAL C64 GS PAL, C64 Japanese NTSC C64 JAP NTSC.
EXTERNAL PALETTE c64.external_palette Choose your color palette.
» default default, colodore colodore, pepto-pal pepto-pal, pepto-ntsc pepto-ntsc, pepto-ntsc-sony pepto-ntsc-sony, cjam cjam, c64hq c64hq, c64s c64s, ccs64 ccs64, community-colors community-colors, deekay deekay, frodo frodo, godot godot, pc64 pc64, ptoing ptoing, rgb rgb, vice vice.
ASPECT RATIO c64.aspect_ratio Switches the aspect ratio (but not refresh rate or model)
» PAL 50Hz - 312/576px pal, NTSC 60Hz - 262/492px ntsc.
ZOOM MODE c64.zoom_mode_c64 Crops the borders to show or hide border graphics.
» Off none, small small, medium medium, maximum maximum.
CONTROLLER PORT c64.vice_joyport Most games use port 2, some use port 1.
» Port 1 1, Port 2 2.
CONTROLLER TYPE c64.vice_joyport_type Choose what type of controller to use.
» Joystick 1, Paddles 2, Mouse (1351) 3, Trackball (Atari CX-22) 6, Koalapad 10.
KEYBOARD PASS-THROUGH c64.keyboard_pass_through Passes all physical keyboard events for Pad2Key
» Off disabled, On enabled.

The three standalone versions basically use the same emulator engine as the RetroArch version, but expose a lot more of the internal features (like switching Soundchip emulation) in their own UI (and not in EmulationStation). They are recommended only if you need access to these features. The full documentation for these emulators is available on SourceForge (Vice-Emu).

VICE configuration

The following features were added in Batocera v33.

The controls have been changed to be more accessible.

Standardized features available to all cores of this emulator: c64.videomode, c64.ratio, c64.padtokeyboard

ES setting name batocera.conf_key Description ⇒ ES option key_value
Settings that apply to all cores of this emulator
ZOOM (HIDE BORDERS) c64.noborder Display only 200 scanlines, effectively removing borders on many games
⇒ NO (DEFAULT) 0, YES 1.







The C64 has several specialties regarding its various video modes. While the default options will work in many cases, for some games you might need to change specific options.

The C64 behaves differently on PAL or NTSC systems and some games need to be set to the correct video mode if you experience screen flickering or crashes. Also most games are locked to the screen refresh so that they run 20% faster on NTSC settings (60 fps) than on PAL settings (50 fps).

PAL games run in 50 Hz while sometimes your Batocera machine will output 60 Hz (especially Laptops). This will result in stuttering every 10th of a second. If your Batocera machine and monitor can switch to 50 Hz output you will see smooth scrolling. On a 60 Hz locked host machine you can switch the emulated C64 to NTSC instead for smooth scrolling, but this will speed up gameplay by 20% in most cases and can crash some games.

The default setting for libretro: VICE_X64 is to run the game in C64 PAL AUTOMATIC mode, as most games of the C64 library were written for PAL systems. You can change this default behaviour in the ADVANCED SYSTEM SETTINGS for C64. Recommeded is to use one of the three automatic modes, as these allow switching for specific games by filename. You can also change this individually for specific games in the ADVANCED GAME OPTIONS.

If the path or filename of the game contains one of the following strings: NTSC, (USA), (Japan),(Japan, USA) the machine will be set to NTSC when it is in Auto PAL. If the path or filename of the game contains one of the following strings: PAL, (Europe), (Finland), (France), (Germany), (Netherlands), (Sweden) the machine will be set to PAL when it is in Auto NTSC.

PAL and NTSC machines also had different aspect ratios, with NTSC being more “quadratic” and PAL being more horizontally stretched. If the game you are playing looks either squashed or stretched, you can simply change the Aspect Ratio in Emulation Station either per game or for the full system.

While the C64 officially has a screen resolution of 200 lines, in reality the video chip draws the equivalent of 288 lines (for PAL) - 200 lines of image (interlaced) and 88 extra lines above and below that image. Some these are never visible due to overscan, but on a real C64 you always have a large visible border on the display. Officially this border can only be set to one of the 16 colors of the C64 palette, so most games will fill the screen and not display the border at all.

Zoomed (Default) Zoom off

Left: Zoom active, border graphics cut off. Right: Zoom deactivated.

With programming tricks this border are can be used to display graphics, extending the screen for example for score displays and life counters. These would appear cut off with the default settings. This requires you to turn off the zoom so that you can see the full graphics. The current implementation of lr-vice has a detection logic to automatically zoom out once border graphics are displayed. If this fails with a specific game, you can set the ZOOM (HIDE BORDERS) setting in the ADVANCED GAME OPTIONS for a specific game.

The C64 colors always were displayed very differently on the different monitors available in the late 80s. LIBRETRO: VICE X64 usually picks a palette equivalent to common PAL or NTSC displays based on the video mode. You can override these palettes and choose a different one. Emulation Station provides 16 different options that you can set in the ADVANCED SYSTEM OPTIONS (for all games) and ADVANCED GAME OPTIONS (for individual overrides).

In Batocera v33, the default controls were changed to be more accessible. Manual remaps still take priority.

The C64 has two joystick ports and every original joystick only has four digital directions and one fire button. Additional fire buttons were added later and are usually not seen by any original games. The C64 also has a keyboard that is extensively used in many games. The controller mapping has been optimized to cover most use cases for known C64 games, but there will be limitations. There also is a virtual keyboard available for those keys that are not mapped.

Many Jump'n'Run games of the C64 use “Joystick Up” for a jump (as there is only one button). As a quality-of-life hack the East button (A SNES) button has been mapped to “Up”. You can change this for the full system or a single game, either in ADVANCED SYSTEM SETTINGS or in ADVANCED GAME OPTIONS with the JUMP ON A option. If you turn this off, this button is mapped to a 2nd controller button that is only used in some more modern C64 games. You might want to turn it off if that behaviour is irritating in other games.

Here are the default Commodore 64's controls shown on a Batocera Retropad:

Retropad libretro: VICE_X64 VICE: X64
D-Pad Joystick directions Joystick directions
Left Stick Joystick directions Joystick directions
East button (A SNES) Up or Button 2 Joystick Fire
South button (B SNES) Joystick Fire Space (keyboard)
West button (Y SNES) Space (keyboard) Y (keyboard)
North button (X SNES) Turbo Fire Toggle N (keyboard)
[Select] Short press: Virtual keyboard
Longer press: Statusbar on/off
Even longer press: Fast Forward
Virtual Keyboard
[Start] Return (keyboard) VICE Main Menu
[L1] Run/Stop (keyboard) Run/Stop (keyboard)
[R1] Restore (keyboard) - see below! Return (keyboard)
[L2] Warp mode (keep pressed)
[R2] Shift key
[L3] Switch Joystick ports
[R3] Virtual keyboard
[HOTKEY] + [L2] Switch disk (.m3u required)
[HOTKEY] + [R2] Switch disk (.m3u required)
Right Thumbstick F Keys (keyboard)
Up: F1
Left: F3
Right: F5
Down: F7

Joystick Ports

The C64 has two Joystick Ports named #1 and #2. Unfortunately for technical reasons most games use Port #2 as the standard port for Player Number 1. So the Player 1 controller by default is mapped to Port #2. To switch controller ports (map Player 1 to Port #1) you can:

  • Press [L3] to switch ports - this setting is NOT saved per game
  • Add a J1 to the filename / filepath of the game (you can also specify J2 in the filename if you have switched defaults to Port #1)
  • Set the CONTROLLER PORT in the ADVANCED GAME OPTIONS for a specific game (this overrides filename settings)

Controller Type

Besides Joysticks, LIBRETRO: VICE X64 also supports the emulation of C64 mice, paddles and the Koalapad. These are autoconfigured on the left thumbstick. To change the Controller Type, set CONTROLLER TYPE in the ADVANCED GAME OPTIONS

Special C64 keys

A lot of early C64 games use the four function keys on the right side of the keyboard for selections of number of players and play modes (please check the respective game manuals). These keys have been mapped to the right thumbstick. Moving it up presses the F1 key, left is F3, right is F5, down is F7. There are no even numbered F-keys, F2 is Shift-F1, F4 is Shift-F3 and so forth.

The C64 has a Shift Lock key that is not emulated as it is a mechanical key. You need to keep Shift pressed. Shift is mapped to [R2].

The C64 has a key called Restore that actually triggers a NMI (Non Maskable Interrupt). That is used a some kind of soft reset in some situations, especially when pressed together with the Run/Stop key. This might be needed for some cartridge games.

Special emulation keys

The controller has been mapped with some specific quality-of-life functions in LIBRETRO: VICE X64.

The [SELECT] Button has three functions:

  • Pushing it once shortly will show/hide a virtual keyboard.
  • Pushing it a little bit longer will show/hide a status bar.
  • Pushing it even longer will start the Fast Forward, speeding up the emulation (not as fast as Warp but internally rendering every frame).

Pulling [L2] will “warp” the emulation. This runs the CPU emulation at maximum speed and skips frames. This can greatly reduce wait times during loading and/or decrunching.

Pushing [L3] will switch the controller between Port #1 and Port #2.

Pushing [R3] will turn the virtual keyboard on or off. (For the standalone emulators this will get you to the main VICE menu).

Using [L2] and [R2] together with the [HOTKEY] will switch disks from an .m3u playlist (see Multi Disk above).

Virtual Keyboard

Pressing [Select] will bring up a virtual keyboard to enter keys that are not mapped to the controller. In LIBRETRO: VICE X64 this virtual keyboard has the following extra options:

[STB] - Turns a statusbar on or off

[JOY] - Switches Joystick Ports 1 and 2

[TRF] - Switches Turbo Fire for the Joystick on or off

Red Button in lower left corner - Keep pushed for Reset

Brown Buttons in lower line - Tape controls for Multi-Load Tape Games

Status Bar

A medium length (1/2 second) press of [SELECT] turns a specific status bar on or off (only in LIBRETRO: VICE X64). The information provided is (from left to right):

  • Joystick activity and port switches
  • Current Screen resolution
  • Current emulated machine
  • Green: Current Track position of 1541 drive
  • Red: Current frame rate

For further troubleshooting, refer to the generic support pages.

  • systems/c64.txt
  • Last modified: 14 months ago
  • by kugelblitz