Skip to content

bytespiller/sidplaywx

Repository files navigation

sidplaywx

The sidplaywx is a GUI player for Commodore 64 SID chip tunes aiming to provide a modern & comfortable SID tune playback experience on the PC.

The current alpha version is fully usable, supporting QoL features like seeking, drag & drop, unicode paths, DPI awareness and much more.

The sidplaywx uses libsidplayfp for ultimate quality in SID emulation, wxWidgets for native GUI on supported platforms, and PortAudio for audio output.

Screenshots

Main window

Screenshot of the player application main window

Pictured: for tunes with subsongs, a crown icon in the playlist indicates a default subsong. You may also encounter other indicators such as a timer icon indicating an (optional) auto-skipping of (sub)songs shorter than (n) seconds, or a chip (indicates a ROM file requirement).
Tunes can be seeked (HVSC Songlengths.md5 database is supported, and default/fallback duration can be specified in the Preferences).
HVSC STIL info is also supported (blue text in the top right).

Modify Playback window

Screenshot of the Modify Playback window

Modification of ongoing playback: toggling individual SID voices (the active SIDs are indicated -- most normal tunes use a single SID chip, but there exist special stereo/multi-SID tunes which will use up to three). Realtime toggles to inhibit the filter and digi samples are also available.
Playback speed (not tempo) can also be modified (pitch is affected).
If any of these settings are changed, and they affect the currently playing tune, there will be a "MODIFIED" indication in the status bar.

Preferences window

Screenshot of the Preferences window

Each setting in the Preferences is accompanied with a help-text displayed in the bottom area. This way the Preferences also serves as a documentation/help source for sidplaywx's many features.

Platforms

This project uses the GCC and the CMake, and at the moment Windows and Linux are supported.

Planned features for v1.0

The current version of the sidplaywx is 0.x.x (alpha), so in addition to bugfixes and common sense updates, I consider at least these features are needed before the sidplaywx can graduate to version 1.0:

  • Playlist improvements such as duration columns, reordering, remembering last state and playlist file save/load etc.
  • Misc. necessary features such as remembering window size & position etc.
  • Exporting tunes to WAV
  • STIL support for displaying tune comments
  • Native Linux support
  • Theming support / dark theme

Download

  • You can find a pre-built ready-to-use binary distribution(s) in the Releases sidebar.
    • More package formats are planned for Linux (only AppImage at the moment).

Alternatives

Some alternatives to sidplaywx for playing the SID tunes I've tried and liked are:

  • Windows: foobar2000 + foo_sid plugin
  • Linux: DeaDBeeF player (note: it uses older/no longer maintained libsidplay2)
  • Mac: I don't have a Mac so I haven't tried it, but this looks great: https://github.com/Alexco500/sidplay5

Contributing, ideas, comments, issues

If you have an idea or a comment, feel free to post it in the Discussions. Issues can be reported here. There is also an email address provided in the application's Help > About box.

FAQ

  • Where can I get SID tunes?
  • Why are some tunes crossed-out and cannot be played?
    • Small number of tunes require a C64 system ROM to play. You can find the C64 system ROM files in e.g., open source C64 emulators (or elsewhere on the internet) and import them via the sidplaywx's Preferences.
    • There are three main C64 system ROM types that the sidplaywx supports (and some tunes require):
      • KERNAL ROM (tune indicated with a RED crossout text if missing)
      • BASIC ROM (tune indicated with a BLUE crossout text if missing)
      • CHARGEN ROM (you'll probably never need this one, so let's just ignore it for now)
  • When drag & dropping the files, why the playlist sometimes gets cleared?
    • By default, the sidplaywx will enqueue the files if dropped onto the playlist area, and clear (replace) the playlist if they are dropped onto the general player window area. This is configurable in the Preferences.
  • Can sidplaywx open archive files?
    • Yes, but only the Zip format in its simplest variant is supported due to wxZip limitation.
  • How come the seeking is so slow?
    • There is an "Instant seeking" option available which pre-renders the entire SID tune in the background. It is disabled by default, but if you enable it you will be able to seek instantly. See release notes of the old release (note: "Instant seeking" was formerly named "Fast seeking") for details on how it works and what are the caveats.
    • SID tunes are actually small programs and not audio files like for example the MP3, so they have to be emulated linearly as fast as possible until the "seek" target is reached.
      • More details The libsidplayfp library (which sidplaywx uses) focuses on accuracy so it's much slower than e.g., libsidplay2 (which is virtually instantaneous, try it in the DeaDBeeF player on the Linux!). FWIW the seeking in the sidplaywx is already separately threaded and bypasses some SID mixing steps, audio rendering etc. so I think it's as fast as possible at the moment, unless you enable the "Instant seeking" option of course).
  • Command-line options in sidplaywx?
    • Focus so far is on the GUI experience. There exists a sidplayfp console-based player in the libsidplayfp repo (not to be confused with a sidplaywx which is unrelated and unaffiliated project).
    • For now, you can pass the space-separated filenames. For example sidplaywx Aces_High.sid Gunstar.sid to open those two tunes. This "feature" is actually a side-effect of single-instance support, so there will be a slight delay if the app is already running and the single-instance option is enabled.

Building

Click to expand!

Linux

Prerequisites

  • GCC version with C++17 support is required (minimum I've tried is gcc-12).
  • Don't forget the sudo apt-get update and sudo apt-get install build-essential as well as sudo apt-get install cmake
(libsidplayfp)
  • NOTE: Building the libsidplayfp from its git master branch is more involved and not covered here. This guide assumes you're building one of the source releases of the libsidplayfp which is simpler.
  1. To enable C++20 set in the terminal CXXFLAGS="$CXXFLAGS -std=c++20"
  2. Commands to build statically: ./configure LDFLAGS="-static" && make
  3. Copy the following includes (with their folder structures) to the appropriate include folder in the sidplaywx's /deps/:
    • /builders/residfp.h
    • sidbuilder.h, SidConfig.h, siddefs.h, SidInfo.h, sidplayfp.h, SidTune.h, SidTuneInfo.h, sidversion.h
  4. Copy the /src/.libs/libsidplayfp.a (.libs is a hidden folder) to the appropriate lib folder in the sidplaywx's /deps/
(PortAudio)
  1. Prerequisites: you must have installed the libpulse-dev, ALSA (libasound2-dev), libsndio-dev, libjack-dev BEFORE building the PortAudio, otherwise the resultant PortAudio may not find any devices.
    • See the main CMakeLists.txt for which ones are relevant.
  2. cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -S . -B dist && cmake --build dist
    • Note: I had to use the git master version, had no luck with the stable version on the Xubuntu 24.04
  3. Copy files from /dist/include/ folder & the libportaudio.a file to the appropriate sidplaywx's /deps/ folders.
(wxWidgets)
  1. Prerequisites: if needed, install the libgtk-3-dev and libcurl-dev (the last one is needed for our "Check for updates" function).
  2. cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -S . -B dist && cmake --build dist
  3. Copy files from /dist/include/ & /dist/lib/ to the appropriate sidplaywx's /deps/ folders.

Building the sidplaywx

  1. Copy contents of the dev folder (except the icon_src folder and the SystemColorViewer.pyw) to the build folder (create a build folder next to the dev folder)
  2. You can rename the CMakeLists_linux.txt to CMakeLists.txt
  3. cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -S . -B build && cmake --build build
  • Tip: If the sidplaywx fails to launch after it was successfully built, try via terminal to see if something is missing.
  • Tip: if trying to execute the sidplaywx in VSCode and getting exit code 177, you need to edit your config: "terminal.integrated.env.linux": { "GTK_PATH": null } and restart VSCode (or for one-off thing run this in VS terminal: unset GTK_PATH)

Windows (10, 11)

Prerequisites

At the moment, the easiest way to build the sidplaywx on Windows is probably by using the MSYS2 environment.
Note: you should install it into the default C:\msys64\ path in order for some hardcoded cmake paths to work out-of-the-box.

Once installed you need to first-time configure it like so:

  • NOTE: MSYS2 supports modern UCRT64 and legacy MINGW environments. UCRT64 is recommended these days, and these instructions assume using it.
  1. Update package lists etc.: pacman -Syu and after restart (if needed): pacman -Su
  2. Install develpment prerequisites: pacman -S base-devel
  3. Install msvcrt-compatible gcc: pacman -S mingw-w64-ucrt-x86_64-gcc
  4. Install cmake & make tools (e.g., PortAudio needs those): pacman -S mingw-w64-ucrt-x86_64-cmake && pacman -S mingw-w64-ucrt-x86_64-make
  5. In your PATH environment variable add: "C:\msys64\ucrt64\bin"
  • Extra if you need to install gdb separately for some reason: pacman -S mingw-w64-ucrt-x86_64-gdb
  • IMPORTANT: run the terminal via ucrt64.exe, not default msys2 terminal (otherwise the proper gcc variant might not be used)!
(libsidplayfp)
  • NOTE: Building the libsidplayfp from its git master branch is more involved and not covered here. This guide assumes you're building one of the source releases of the libsidplayfp which is simpler.
  1. cd (with MSYS2 i.e., UCRT64.exe terminal) into the libsidplayfp's root.
  2. To specify either:
    1. C++20 – set this in the terminal: CXXFLAGS="$CXXFLAGS -std=c++20" (new)
    2. C++14 – set this in the terminal: CXXFLAGS="$CXXFLAGS -std=c++0x" (older versions of libsidplayfp)
  3. Finally, run: ./configure LDFLAGS="-static" && make && make install
    1. TIP: if doing this for the first time, break down these 3 commands (i.e., they are separated by &&) and run them one by one so you can catch any problems more easily.
  4. Note: the lib will be automatically found by our cmake later (if you've installed the msys into the C:\msys64\) and it will get linked statically.
(PortAudio)
  1. Download the PortAudio stable source release or the master from the github.
  2. You can use the regular Windows cmd:
    1. cd into the PortAudio's root.
    2. cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
    3. mingw32-make
  3. Copy files from /dist/include/ folder & the libportaudio.a file to the appropriate sidplaywx's /deps/ folders.
(wxWidgets)
  1. Simply download the appropriate pre-built binaries for your compiler (e.g., GCC v14).
  2. Copy headers & libs to the appropriate sidplaywx's /deps/ folders.
  3. IMPORTANT: additionally, in order to actually run the sidplaywx application after it's built, you need to copy the following wxWidgets' .dll files into the sidplaywx's build folder: wxbaseVER_SUFFIX.dll, wxbaseVER_xml_SUFFIX.dll, wxmswVER_core_SUFFIX.dll, wxmswVER_propgrid_SUFFIX.dll (the exact VER version and _SUFFIX suffix differs depending on wxWidgets & gcc version etc.).
  4. TIP: You can also build the wxWidgets yourself in the similar manner to building the PortAudio (in case you want to use a specific GCC version not offered among pre-built binaries).

Building the sidplaywx

  1. The main CMakeLists.txt should do the trick (I myself use the Visual Studio Code).
  2. IMPORTANT: additionally, in order to actually run the sidplaywx application after it's built, you need to copy the following files into the sidplaywx's build folder:
    1. libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll found in your appropriate MSYS bin folders (e.g., ucrt64 or mingw64).
    2. The entire dev\theme folder (so you end up with build\theme).
    3. The dev\bundled-Songlengths.md5 file (so you end up with build\bundled-Songlengths.md5).
    4. The dev\bundled-STIL.txt file (so you end up with build\bundled-STIL.txt).
    • Tip: you can see the release package for example of bundled dependency files if you get stuck.

About

A PC GUI player for Commodore 64 SID music files based on libsidplayfp and wxWidgets

Topics

Resources

License

Stars

Watchers

Forks

Languages