Vice with reSIDfp
  • C++ 46.4%
  • Shell 38.8%
  • Dockerfile 7.9%
  • C 5.5%
  • xBase 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sven Bröckling 7b3ef5541b
All checks were successful
Release / release (push) Successful in 2s
Release / build (windows) (push) Successful in 7m32s
Release / build (linux) (push) Successful in 8m39s
VICE 3.10 with a reSIDfp SID engine
- engine/: sid_engine_t wrapper around libresidfp (engine id 8)
- patches: VICE core integration (resources, command line, snapshots,
  configure check) and two sound recording fixes (dummy device, warp)
- Arch package, local build scripts, A/B render script, tests
- Forgejo release workflow: Arch package + Windows GTK3 zip
2026-12-02 14:08:21 +01:00
.forgejo/workflows VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
ci VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
engine VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
packaging/arch VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
patches VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
scripts VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
test VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
.dockerignore VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
.gitignore VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
build-local.sh VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
make-arch-package.sh VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
README.md VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00
render-ab.sh VICE 3.10 with a reSIDfp SID engine 2026-12-02 14:08:21 +01:00

vice-residfp

VICE 3.10 with an additional SID engine based on reSIDfp, the SID emulation from the libsidplayfp project (libresidfp).

VICE has no plugin system for audio: SID engines are compiled in. This project adds reSIDfp as a new engine next to the stock reSID, so you can switch between them at runtime and compare.

reSIDfp models the analog parts more closely than reSID, mainly:

  • the 6581 filter (non-linear, with distortion), including the filter capacitor variants of different C64 boards
  • combined waveforms (pulse+saw, tri+saw, …), with three chip "strength" profiles
  • DAC non-linearity and leakage, the 6581 digi offset ($d418 samples)
  • analog background noise and the output DC blocker

Using it

In the GTK UI: Settings → Audio → SID, choose 6581 (reSIDfp), 8580 (reSIDfp) or 8580 + digi boost (reSIDfp).

On the command line:

Option Meaning
-sidenginemodel 2048 / residfp6581 reSIDfp 6581
-sidenginemodel 2049 / residfp8580 reSIDfp 8580
-sidenginemodel 2050 / residfp8580d reSIDfp 8580 + digi boost
-sidengine 8 reSIDfp, keep the current model
-residfpsamp 0|1 decimate (fast) / sinc resampling (default)
-residfp6581curve 0-1000 6581 filter curve, dark…bright (500)
-residfp6581range 0-1000 6581 filter range (500)
-residfp8580curve 0-1000 8580 filter curve (500)
-residfpcws 0|1|2 combined waveforms: average, weak, strong
-residfp6581caps 0|1|2 6581 filter caps: 2200 pF (old ASSY 326298), 470 pF (common), 330 pF
-residfpstrongps strong pulse+saw on the 6581
-residfpnoise 0-8 analog noise level (5, 0 = off)
-residfpdacleak 0-1000 DAC leakage (1000 = standard)
-residfp6581offset 0-1000 6581 digi loudness (1000 = loud)
-residfpdcb 0-1000 DC blocker, ~1.6 Hz … ~16 Hz highpass (0)

The matching resources (SidResidFP…) can be set in vicerc. The settings dialog does not have controls for these yet.

Note: stock VICE does not know engine 8. If you save settings with reSIDfp selected and then start a stock VICE with the same vicerc, it rejects SidEngine=8.

Install

Arch Linux

Download vice-residfp-*.pkg.tar.zst from the releases and sudo pacman -U it (pulls libresidfp from extra), or build it yourself:

./make-arch-package.sh -si

The package replaces vice (provides/conflicts).

Windows

Unpack GTK3VICE-*-residfp-win64.zip and start bin\x64sc.exe. libresidfp is linked statically.

Building

./build-local.sh               # GTK3 build into ./install, nothing installed system-wide
UI=headless ./build-local.sh   # headless build into ./install-headless (for render-ab.sh)

build-local.sh expects upstream/vice-3.10.tar.gz, and libresidfp either installed or unpacked into deps/sysroot (from the Arch package).

Release builds run in Docker and need no local toolchain:

ci/build-artifacts.sh ci/linux.Dockerfile dist     # Arch package (archlinux image)
ci/build-artifacts.sh ci/windows.Dockerfile dist   # Windows zip (Fedora mingw64 cross build)

The Forgejo workflow .forgejo/workflows/release.yml does the same for every pushed v* tag and attaches the results to a release. It uses the automatic token, or a RELEASE_TOKEN secret if the automatic one may not write releases.

Layout

Path Content
engine/residfp.{cc,h} the engine (sid_engine_t hooks around reSIDfp::residfp)
patches/vice-3.10-residfp.patch VICE core changes: engine id 8, hooks, resources, command line, snapshots, configure check for libresidfp
patches/vice-3.10-sound-record-fixes.patch two VICE fixes: the dummy sound device rendered nothing (output channels stayed 0), and sound recording dropped all samples in warp mode
patches/disable-fc-cache.patch from the Arch vice package
scripts/apply.sh applies engine and patches to a VICE source tree
packaging/arch/PKGBUILD Arch package
ci/ Docker builds for the releases
render-ab.sh renders a program with reSID and reSIDfp to WAV for A/B listening
test/ test tune and the clocking test

Testing

test/chunktest.cc checks the engine's clocking against libresidfp directly: VICE asks for samples into a buffer of limited size, while reSIDfp's clock() has no output limit, so the engine feeds cycles in chunks that cannot overflow the buffer. The test runs 20 s of random register writes with random buffer sizes at 22.05/44.1/48/96 kHz and both resamplers, and requires bit-identical output to unchunked clocking, without any overrun.

g++ -O2 test/chunktest.cc -lresidfp -o chunktest && ./chunktest

test/sidtest.a65 (assemble with xa -o sidtest.prg test/sidtest.a65) plays the parts where the engines differ most: filter sweeps with resonance, the bandpass, combined waveforms, a $d418 digi and a filtered chord.

./render-ab.sh test/sidtest.prg 28
./render-ab.sh game.d64 60 '\x20'     # press space after start

This writes renders/<name>-{resid,residfp}-{6581,8580}.wav, plus <name>-ab-{6581,8580}.wav, which switches between reSID and reSIDfp every 4 seconds. The original disk image is never written to.

License

GPL-2.0-or-later, like VICE and libresidfp.