Skip to content

Repository files navigation

Phosphor

A SID music player for USBSID-Pico hardware, software emulation, and Commodore Ultimate 64 network playback. Built with Rust and Iced.

Phosphor

Trailer

Phosphor trailer

Trailer by @exploraart β€” Adam Kazmierski.

Docs & website

Full feature tour with screenshots, install guide and trailer: https://sandlbn.github.io/Phosphor/.

Downloads

Prebuilt binaries for macOS, Linux and Windows are available on the GitHub Releases page:

https://github.com/sandlbn/Phosphor/releases

Features

  • Four playback engines β€” USB hardware, software emulation (reSID or SIDLite), or Commodore Ultimate 64 over the network
  • πŸ“š Library panel β€” browse Local HVSC, search Assembly64 live, and load curated Playlists synced from the Phosphor repo
  • Rich HVSC search β€” global search across the whole category shows title, released year, subsong count, duration, and STIL βœ“ marker for every hit, not just the filename
  • 🎲 Surprise me β€” one-click random tune from your synced HVSC tree or from the currently-loaded playlist (source is configurable in Settings)
  • USBSID-Pico device config β€” built-in Device panel (πŸ”§ button) for chip routing, clock rate, presets, and save-to-flash, all without leaving Phosphor
  • HTTP remote control β€” built-in web server for controlling playback from any browser on the network (phone, tablet, another PC)
  • Browser audio streaming β€” the same web UI can also play the current SID output as a live MP3 through the browser's <audio> element. Click πŸ”Š Listen and any device on the LAN β€” phone, laptop, another room's tablet β€” hears what the desktop is playing. Works with the reSID and SIDLite engines; the USB / U64 hardware paths are analog and can't be tapped
  • HTTP proxy support β€” single-field setting for http:// / https:// / socks5://, applied to all outbound requests
  • Playlist management β€” add files and folders, drag & drop, save/load M3U playlists; duplicate detection on import
  • Session restore β€” playlist automatically saved on exit and restored on next launch
  • Sortable columns β€” click any column header to sort by title, author, released, duration, type, or SID count
  • Search & filter β€” real-time search across title, author, released year, and file path
  • Liked tracks β€” β™₯ any tune to remember it forever. Load your liked collection as a fresh playlist with one click; tracks resolve back to disk even if you removed them from the current playlist, moved your HVSC folder, or migrated from another machine. Share via M3U import / export
  • Recently played β€” persistent history of the last 100 unique tracks with human-readable timestamps
  • HVSC Songlength DB β€” automatic song-length lookup with configurable fallback duration
  • HVSC STIL β€” song info overlay (cover titles, original artists, composer comments) via the β“˜ button; downloaded or loaded from a local STIL.txt
  • MUS file support (beta) β€” Compute's Gazette SIDplayer format with stereo (MUS+STR), PETSCII lyrics display (WDS), and real-time karaoke mode synchronized via FLAG commands
  • Multi-SID support β€” PSID/RSID, 1SID/2SID/3SID tunes, PAL/NTSC
  • Sub-tune navigation β€” step through all sub-tunes within a SID file
  • SID register panel β€” real-time scrolling tracker view (note, waveform, ADSR per voice) plus live register readout for all active SID chips
  • U64 audio streaming β€” stream SID audio from the Ultimate 64 back to the host machine over UDP
  • Keyboard shortcuts β€” full keyboard control (see below)
  • Mini player mode β€” compact window mode for background listening; all transport buttons carry hover tooltips in both mini and full player
  • Focused Settings β€” five tabs (General Β· Audio Β· Library Β· Network Β· Help) so you find the knob you want without scrolling through a wall of options
  • Window geometry β€” size and position are remembered between sessions
  • HVSC completion tracking β€” persistent log of every unique SID heard; status bar shows your progress against the full HVSC collection. Good luck hearing all 60,000+ β€” at four minutes each that's only about 167 straight days without sleep

Keyboard Shortcuts

Key Action
Space Play / Pause
← Previous track
β†’ Next track
↑ Select previous track in playlist
↓ Select next track in playlist
F Toggle full-screen visualiser
V Cycle visualiser mode (Bars β†’ Scope β†’ Tracker β†’ Karaoke)
K Toggle karaoke lyrics (MUS files with .wds)
L Toggle πŸ“š Library panel
M Toggle mini player
H Toggle favourite for currently playing track
Shift+H Toggle shuffle
, / . Nudge master volume βˆ’5% / +5%
? Show keyboard shortcuts & about
Delete Remove selected track
Ctrl+F Focus search
Escape Close overlay / exit full-screen

Playback Engines

Selectable in Settings (βš™):

  • Auto β€” tries USB first, falls back to software emulation
  • USB β€” USBSID-Pico hardware via register-level writes
  • Emulated (reSID) β€” software SID via resid-rs + cpal audio output
  • SIDLite (libsidplayfp) β€” lightweight SID emulation from libsidplayfp + cpal audio output
  • Ultimate 64 β€” native playback on Ultimate 64 / Elite II via REST API (firmware 3.14+ required)

HTTP Remote Control

Phosphor includes a built-in web server for controlling playback from any device on the same network. The browser UI is a near-complete replacement for the desktop for anything a "phone on the couch" user needs.

  1. Open Settings (βš™) β†’ Remote control (HTTP) β†’ click Start remote server
  2. Open the displayed URL (e.g. http://192.168.1.42:8364) on your phone or another computer
  3. Browse the playlist, search, play/pause/skip β€” all from the browser
  4. Hit πŸ”Š Listen to stream the live audio through the browser (reSID / SIDLite engines only β€” hardware playback paths can't be tapped)

Playlist management β€” right-click / long-press a row for a context menu (Play now, Toggle favourite, Move to top / up / down, Copy title, Remove). Desktop users can drag rows to reorder. The toolbar adds Import M3U / Save as M3U / Clear / Favourites-only chip / Sort dropdown, and every action pops a small toast confirmation.

Library discovery β€” Published Playlists (with inline preview accordion β€” click any playlist to see its track list before loading), HVSC browser (Musicians / Demos / Games), Recently Played history, plus one-click HVSC sync trigger with live progress.

Modern-player polish β€” persistent Now Playing bar on phones so the transport controls stay reachable when you scroll deep in the playlist, iOS lock-screen + Android notification-shade media controls with title / author / progress (via the Media Session API), subtune stepper 1/N β—€ β–Ά when a tune has multiple songs, keyboard shortcuts mirroring the desktop (Space, ← / β†’, F / H favourite, S surprise, R shuffle, L library, / search focus, ? help), skeleton loading rows during first fetch, friendly empty-state panels, smooth CSS view-transition animations for reorder / remove / import in Chromium browsers.

Quick settings β€” the βš™ Settings drawer in the browser flips Skip RSID / Force stereo / Surprise Me source / Repeat mode / Shuffle without walking to the desk.

The web UI auto-refreshes whenever the desktop side changes the playlist (Surprise Me, drag-add, favourites toggle, sort, reorder). Port is configurable (default 8364). The setting persists across restarts. A green ● Remote pill in the desktop's bottom toolbar shows when the server is up and clicking it opens the URL.

Liked Tracks (β™₯)

Hearting a tune with the β™₯ button (or the H key) remembers it forever in <config_dir>/favorites.json alongside the file path, title, author, released date and MD5. The button in the search bar shows a live count.

Load all liked tracks as a playlist β€” hit ❀️ Load (right of the β™₯ badge) or POST /api/favorites/play from the remote. Phosphor resolves each MD5 back to a file via a stored path β†’ HVSC-md5 lookup fallback, replaces the current playlist with everything it can find, and reports any it couldn't. That resolution chain means:

  • Removing a hearted track from the current playlist doesn't lose it.
  • Moving your HVSC folder auto-heals cached paths on the next Load.
  • Legacy MD5-only rows (migrated from an older favorites.txt) get enriched with title / author / path the first time you play them.

Share / back up via Settings β†’ Library β†’ ⬇ Export as M3U… / ⬆ Import from M3U…. The exported M3U opens in any SID player; importing merges into your collection without touching existing hearts.

Development Requirements

  • Rust toolchain (cargo)
  • SID files (e.g. from HVSC)
  • One or more of: USBSID-Pico device, audio output (for emulation), or Commodore Ultimate 64 / Elite / Ultimate-II+ on the network

Install from source

You don't need to build from source. Prebuilt binaries for macOS, Linux, and Windows are available on the Releases page. The instructions below are only needed if you want to develop or customise Phosphor.

macOS

Two-step build: .app bundle (with the bridge daemon embedded as a Helper), then the .pkg installer that drops it into /Applications and registers the LaunchDaemon.

# 1. Build Phosphor.app (ad-hoc signed; pass --sign "Developer ID ..." for distribution)
./macos/build_bundle.sh

# 2. Wrap the bundle in a double-clickable installer + matching uninstaller
./macos/build_pkg.sh

build_pkg.sh produces two files in dist/:

  • Phosphor-<version>.pkg β€” installs Phosphor.app to /Applications, registers + starts the com.phosphor.usbsid-bridge LaunchDaemon.
  • Phosphor-<version>-Uninstaller.pkg β€” removes both in one click.

Double-click either, or use the CLI:

sudo installer -pkg dist/Phosphor-<version>.pkg -target /

For signing + notarisation flags see the comment headers in build_bundle.sh and build_pkg.sh. Release builds should pass --notarize so Gatekeeper accepts the installer. The macOS USB transport toggle (Settings β†’ Bridge / Direct) is covered in MACOS_DEBUG.md.

Uninstalling on macOS

Dragging Phosphor.app to Trash leaves the bridge LaunchDaemon orphaned β€” launchd keeps trying to relaunch a binary that no longer exists. Use the matching uninstaller pkg from the same release:

sudo installer -pkg Phosphor-<version>-Uninstaller.pkg -target /

This removes /Applications/Phosphor.app, stops + deletes the com.phosphor.usbsid-bridge LaunchDaemon, and cleans the bridge socket. Your personal data in ~/Library/Application Support/phosphor (config, playlists, HVSC cache) is preserved on purpose β€” delete it manually if you want a full wipe.

Debugging the bridge daemon

If you're hacking on the usbsid-bridge daemon and need to swap in a fresh local build, see MACOS_DEBUG.md β€” covers stopping the LaunchDaemon, copying the new binary, restarting it, and tailing the logs.

Windows

Most users should just grab the installer from the Releases page:

  1. Install the WinUSB driver for your USBSID-Pico using Zadig (one-time; only needed for the USBSID-Pico hardware β€” software emulation and Ultimate 64 network playback work without it).
  2. Download and run Phosphor-<version>-windows-x86_64-setup.exe. It installs Phosphor with a Start-menu shortcut (and an optional desktop icon) and registers an uninstaller in Add/Remove Programs.

Building the installer locally

For development you can build the installer on your own machine. You need the Rust MSVC toolchain and Inno Setup 6 (iscc.exe):

make -f Makefile.windows windows_installer   # exe + installer
make -f Makefile.windows windows             # bare exe, no installer

This produces dist\Phosphor-<version>-windows-x86_64-setup.exe. The script builds with a static CRT (see .cargo/config.toml) so the exe is self-contained, then builds the Inno Setup installer (windows/phosphor.iss).

Linux

  1. Add a udev rule for the USBSID-Pico (VID cafe):
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="cafe", MODE="0666"' | sudo tee /etc/udev/rules.d/99-usbsid.rules
sudo udevadm control --reload-rules
  1. Build and run:
cargo build --release
./target/release/phosphor

Configuration

Phosphor stores its configuration in:

Platform Path
macOS ~/Library/Application Support/phosphor/
Linux ~/.config/phosphor/
Windows %APPDATA%\phosphor\

Files stored there:

File Contents
config.json Settings, window geometry, last-used directories
favorites.txt Favorited tune MD5 hashes (one per line)
recently_played.json Last 100 played tracks with timestamps
Songlengths.md5 Cached HVSC Songlength database
STIL.txt Cached HVSC SID Tune Information List
heard.txt MD5 hashes of every SID ever played (one per line)
session_playlist.m3u Auto-saved playlist restored on next launch

HVSC Integration

Phosphor can load two HVSC databases from Settings (βš™):

Songlength DB β€” provides per-subtune durations so tracks advance automatically at the right time.

STIL β€” the SID Tune Information List maps each SID file to the original songs it covers, the performing artists, and curator comments. Once loaded, a β“˜ button appears next to the β™₯ heart whenever info is available for the current tune.

For the most accurate STIL lookups, set the HVSC root directory in Settings to the root of your local HVSC tree (e.g. /home/user/C64Music). Without it Phosphor falls back to matching by filename, which works for most collections but can be ambiguous when multiple composers share a filename.

U64 Audio Streaming

When using the Ultimate 64 engine, Phosphor can stream the C64's audio output back to the host machine so you can hear playback through your computer speakers.

Enable it in Settings (βš™) under U64 audio streaming. Set the UDP port (default 11001) to any free port above 1024.

When a tune starts playing, Phosphor sends a REST command to the U64 asking it to stream audio as UDP unicast packets to your machine's IP on the configured port. A local receiver resamples from the C64's native PAL/NTSC clock rate to your audio device's sample rate and plays through your default output device with a short jitter buffer to absorb network timing variation.

Requires Ultimate 64 firmware 3.14 or later. Earlier firmware versions had a bug in the audio streaming API. A wired network connection to U64 machine is required.

Thanks

Huge thanks to Adam Kazmierski for countless hours of testing, breaking things, and helping fix them. From catching audio glitches to spotting swapped stereo channels β€” this project sounds way better because of him.

About

A SID music player for USBSID-Pico hardware and Commodore Ultimate 64, supporting both hardware SID chips and emulated SID playback.

Topics

Resources

Stars

20 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages