Skip to content

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

License

Notifications You must be signed in to change notification settings

bytespiller/sidplaywx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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).

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).
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

While the project uses GCC and CMake, at the moment the focus is on the Windows version. A proper Linux support is planned before the v1.0 release.

Planned features for v1.0

The current version of the sidplaywx is 0.x.x, 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
  • Proper Linux support
  • Theming support / dark theme

Download

  • You can find a pre-built ready-to-use binary distribution(s) in the Releases sidebar.

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)

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 form is supported due to wxZip limitation.
  • How come the seeking is so slow?
    • There is a "Fast 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 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 "Fast 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!

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

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

  • Update package lists etc.: pacman -Syu and after restart (if needed): pacman -Su
  • Prerequisites: pacman -S base-devel
  • msvcrt-compatible gcc: pacman -S mingw-w64-x86_64-gcc
  • IMPORTANT: run in mingw64.exe, not default msys2 terminal (otherwise the proper gcc variant might not be used)!
  • Note: if need to install gdb separately for some reason: pacman -S mingw-w64-x86_64-gdb

Building libsidplayfp:

  • Download the libsidplayfp source release.
  • cd (with MSYS2 MINGW64 terminal) into the libsidplayfp's root.
  • To enable C++14 set this in the terminal: CXXFLAGS="$CXXFLAGS -std=c++0x"
  • Finally, run: ./configure LDFLAGS="-static" && make && make install
  • 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.

Building Portaudio:

  • Download the PortAudio stable source release.
  • Prerequisites (in the MSYS2 MINGW64 terminal): pacman -S mingw-w64-x86_64-cmake && pacman -S mingw-w64-x86_64-make
  • cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
  • mingw32-make
  • Copy headers and libs into the new folder (so our cmake can find it later):
    • headers into the C:\Program Files\PortAudio\include\
    • libs into the C:\Program Files\PortAudio\include\lib\

wxWidgets:

  • Simply download the appropriate pre-built binaries for your compiler (e.g., GCC v10).
  • Copy them into the new folder:
    • headers into the C:\wxWidgets\include\ (with msvc and wx subfolders in there)
    • libs into the C:\wxWidgets\gcc_lib\
  • 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: libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll, wxbase315u_gcc1020_x64.dll, wxbase315u_xml_gcc1020_x64.dll, wxmsw315u_core_gcc1020_x64.dll, wxmsw315u_propgrid_gcc1020_x64.dll

Finally building the actual sidplaywx application:

  • The main CMakeLists.txt should do the trick (I myself use the Visual Studio Code).
  • 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:
    • The entire dev\theme folder (so you end up with build\theme).
    • The dev\bundled-Songlengths.md5 file (so you end up with build\bundled-Songlengths.md5).
    • Tip: you can see the release package for example if you get stuck.