Skip to main content

pysidwizard

Pure-Python reader, writer, and player for SID-Wizard (Hermit / Mihaly Horvath) C64 tracker modules. Implements the SWM file format from first principles. The player is the SID-Wizard playroutine stated as a pysidtracker.playspec spec, run on the tune's own 6502 image (a bare module's SID-Maker export), and is checked against that 6502 and the anarkiwi/sidtrace sidplayfp oracle over real HVSC SID-Wizard exports (pytest -m oracle, needs Docker).

Also consumes .sid files (PSID/RSID containers), SID-Maker .exe.prg and Echo .sid exports (unwrapped to the .sid they embed) and bare .prg images through the shared pysidtracker base: SID-Wizard .sid exports (plain or packed SWP, single- or multi-SID) are read into the same SWMFile model, packed/relocating builds are detected, and container headers are not trusted. Standalone packed .swp files (SWP1) are read with the same decodable fidelity. The .sid/.swp paths are read-only and lossy (see docs/format.md).

Install

pip install pysidwizard

Usage

from pysidwizard import read_swm, write_swm, build_swm

swm = read_swm("tune.swm")            # native SID-Wizard module (bare or PRG-wrapped)
print(swm.author_str(), swm.frame_speed, swm.highlight)

for row in swm.patterns[0].rows[:4]:  # typed rows; no byte poking
    print(row)

write_swm(swm, "out.swm")             # byte-exact round-trip

# SID-Wizard tunes exported to .sid read into the same model:
from pysidwizard import read_sid
swm_from_sid = read_sid("tune.sid")   # read-only, lossy

# ...as do standalone packed .swp files (SWP1):
from pysidwizard import read_swp
swm_from_swp = read_swp("tune.swp")   # read-only, lossy

See docs/usage.md for building modules from scratch, playback, WAV rendering, raw write iteration, and the CLI, and docs/format.md for the SWM/.sid/.swp format, data model, and player correctness. The HVSC oracle survey runs the player against every HVSC SID-Wizard tune. docs/playspec.md describes the playroutine stated as a pysidtracker.playspec spec.

Development

pip install -e ".[dev]"
python -m pytest                                   # unit tests (fast, no Docker)
python -m pytest -m oracle                          # sidtrace oracle; requires Docker

The four SWM test tunes are not tracked in this repo (SID-Wizard binary artifacts); tests/_swm_cache.py fetches them on demand into pysidtracker's download cache (.tunecache, $PYSID_TUNECACHE) and SHA-256 verifies each one.

License

Apache 2.0 — see LICENSE.

Metadata

Release files for pysidwizard 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysidwizard 0.6.2
File Size Uploaded Provenance Actions
pysidwizard-0.6.2.tar.gz 270.8 kB With provenance Details for pysidwizard-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysidwizard 0.6.2
File Interpreter ABI Platform Actions
pysidwizard-0.6.2-py3-none-any.whl Python 3 none any Details for pysidwizard-0.6.2-py3-none-any.whl

Total release size: 472.3 kB

Release files / pysidwizard-0.6.2.tar.gz

Download URL pysidwizard-0.6.2.tar.gz
Size 270.8 kB
Tags Source
SHA-256 checksum
How to use checksums
50a130a71a0815eea9683a7e51e476d6f1487fd4c6041f1221c5888ae79e4fdf
BLAKE2b-256 checksum
How to use checksums
792b23f3e53059cc3fed787d548df505667f83e907f16975e25f8a213e53f14a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / pysidwizard-0.6.2-py3-none-any.whl

Download URL pysidwizard-0.6.2-py3-none-any.whl
Size 201.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7baf014b1b384af5a743619fd12bd2dbab6f96b7978a90cf94de99affdf5ebfc
BLAKE2b-256 checksum
How to use checksums
2214d7817b798d14efcaa3d737ce90896dd54bff43d7add66b0567b6b155601c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for pysidwizard 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pysidwizard-0.6.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page