libretro / vice-libretro

Versatile Commodore 8-bit Emulator
GNU General Public License v2.0
40 stars 70 forks source link

VICE LIBRETRO

Port of VICE, the Versatile Commodore Emulator 3.8

Source base: https://sourceforge.net/projects/vice-emu/files/releases/vice-3.8.tar.gz

Supported platforms: Linux, Windows, Apple, Android, emscripten, Switch, Vita

Default controls

RetroPad button Action
D-Pad Joystick
Left Analog Mouse/paddles
B Fire button 1 / Handle
A Fire button 2 / Base
X Space
L2 Escape (RUN/STOP)
R2 Enter (RETURN)
Select (Short) Toggle virtual keyboard
Select (Long) Toggle statusbar
Select (Hold) Fast-Forward
Keyboard key Action
F12 Toggle statusbar
RControl Switch between joyports
End Reset

Virtual keyboard controls

Button Action
B / Enter Keypress
A Toggle transparency
Y (Short) Toggle ShiftLock
Y (Long) Quick map button
Y (Very long) Quick clear button
X Press Space
Start Press Return

Long press for sticky keys. Stickying the third key will replace the second.

Joyport control

Older C64 games tend to use joystick port 1 and newer ones tend to use port 2 for player 1. There are several ways to switch ports in this core:

M3U support and disk control

When you have a multi disk game, you can use a M3U playlist file to be able to change disks via RetroArch "Disc Control" interface.

A M3U file is a simple text file with one disk per line (Wikipedia).

Example:

Ultima VI - The False Prophet (1990)(Origin Systems).m3u

Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 1 of 3 Side A)(Game).d64
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 1 of 3 Side B)(Surface).d64
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 2 of 3 Side A)(Dungeon).d64
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 2 of 3 Side B)(Populace A).d64
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 3 of 3 Side A)(Populace B).d64
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 3 of 3 Side B)(Populace C).d64

Path can be absolute or relative to the location of the M3U file.

When the game asks for it, you can change the current disk in the RetroArch "Disc Control" menu:

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:

Ultima VI - The False Prophet (1990)(Origin Systems).m3u

Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 1 of 3 Side A)(Game).d64|Game
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 1 of 3 Side B)(Surface).d64|Surface
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 2 of 3 Side A)(Dungeon).d64|Dungeon
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 2 of 3 Side B)(Populace A).d64|Populace A
Ultima VI - The False Prophet (1990)(Origin Systems)(Disk 3 of 3 Side A)(Populace B).d64|Populace B
Ultima VI - The False Prophet (1990)(Origin Systems)(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

If DISK_LABEL is intentionally left blank (i.e. DISK_FILE|) then only the disk index will be displayed.

For games that require a dedicated save disk, one may be generated automatically by entering the following line in an M3U file: #SAVEDISK:VolumeName. VolumeName is optional and may be omitted. For example, this will create a blank, unlabelled disk image at disk index 5:

Elite (1985)(Firebird Software).m3u

Elite (1985)(Firebird Software).d64
#SAVEDISK:

Although one save disk is normally sufficient, an arbitrary number of #SAVEDISK:VolumeName lines may be included. Save disks are located in the frontend's 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].

Extra features

M3U playlist supports disks, tapes, cartridges and programs.

ZIP support

ZIPs are extracted to a temporary directory in saves, bypassing the default frontend extraction. The temporary directory is emptied but not removed on exit. ZIP is not repacked, which means saves and highscores are lost.

This allows:

JiffyDOS support

External ROM files required in system/vice:

Filename Size MD5
JiffyDOS_C64.bin 8 192 be09394f0576cf81fa8bacf634daf9a2
JiffyDOS_SX-64.bin 8 192 f0d3aa7c5a81d1e1d3e8eeda84e9dbbe
JiffyDOS_C128.bin 16 384 cbbd1bbcb5e4fd8046b6030ab71fc021
JiffyDOS_1541-II.bin 16 384 1b1e985ea5325a1f46eb7fd9681707bf
JiffyDOS_1571_repl310654.bin 32 768 41c6cc528e9515ffd0ed9b180f8467c0
JiffyDOS_1581.bin 32 768 20b6885c6dc2d42c38754a365b043d71

Custom vicerc

Custom configs can be used globally and per-content for accessing VICE options that do not exist as core options.

Config files are processed first found in this order:

  1. saves/[content].vicerc
  2. saves/vicerc
  3. system/vice/vicerc

All available options are dumped in system/vice/vicerc-dump-[corename] for copy-pasteing to actual config.

Options must be after the correct [corename] block, for example x64 fast:

[C64]
GMod2FlashWrite=0

Command file operation

VICE command line options are supported by placing the desired command line in a text file with .cmd file extension. The command line format is as documented in the VICE manual.

Using this you can overcome limitations of the GUI and set advanced configurations required for running problematic files.

VIC-20 Mega-Cart can be launched via .cmd:

xvic -cartmega "/path/to/rom/mega-cart-name.rom"

VIC-20 Mega-Cart is supported automatically with NVRAM file directed to saves.

VIC-20 memory expansion can be set via .cmd: -memory (3k/8k/16k/24k/all) / (0/1/2/3/5) / (04/20/40/60/a0):

xvic -memory 1 "/path/to/rom/some-8k-game.d64"
xvic -memory 8k "/path/to/rom/some-8k-game.d64"
xvic -memory 20 "/path/to/rom/some-8k-game.d64"

VIC-20 memory expansion can be set with filename tags or directory matching:

Latest features

Build instructions

Currently working EMUTYPEs:

Remember to run make clean EMUTYPE=x or make objectclean EMUTYPE=x first before make EMUTYPE=x when building different EMUTYPEs.

x64 is the default when EMUTYPE is not defined.

Linux & Windows

make

Win64 (crossbuild)

make platform=wincross64

Android standalone toolchain Build

export path to your standalone toolchain like

export PATH=$PATH:/opt/standtc/bin

make platform=androidstc

Android ndk Build

cd jni
ndk-build

VICE readme

VICE 3.8 Dec 2023

             _______________
            |      ||      ||
            |      ||      ||____________________________
            |      ||      ||    ||         ||          ||
            |      ||      ||    ||    |    ||    ______||
            |      ||      ||    ||    |----||          ||
            |      ||      ||    ||    |    ||    ------||
            |              ||____||_________||__________||
             \            // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              \          //
               \________//   Versatile Commodore 8-bit Emulator

We are still looking for dedicated maintainers for the Windows port, if you want to help improving these and/or want to provide binaries, please get in touch.


This is version 3.8 of VICE, the multi-platform C64, C128, VIC20, PET, PLUS4 and CBM-II emulator. This version can be compiled for Win32, macOS, Haiku and for most Unix systems provided with the X Window System version 11, R5 or later.

The following programs are included:

NIBTOOLS

(C) 2005 Pete Rittwage and the C64 Preservation Project team

It is based on MNIB which is copyrighted (C) 2000 Markus Brenner