Skip to main content

pysidwizard

Pure-Python reader, writer, and bit-exact player for SID-Wizard (Hermit / Mihaly Horvath) C64 tracker modules. Implements the SWM file format and player IRQ from first principles, with no native dependencies. The player is validated byte-for-byte against the anarkiwi/sidtrace sidplayfp oracle over real HVSC SID-Wizard exports (pytest -m oracle, needs Docker).

Also consumes .sid files (PSID/RSID containers) and bare .prg images through the shared pysidtracker base: SID-Wizard .sid exports (plain or packed SWP) 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.

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

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.4.0
File Size Uploaded Provenance Actions
pysidwizard-0.4.0.tar.gz 179.2 kB With provenance Details for pysidwizard-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 298.5 kB

Release files / pysidwizard-0.4.0.tar.gz

Download URL pysidwizard-0.4.0.tar.gz
Size 179.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ec59884e6cdc6dc7509bff7ba1110805f5f3a38cc2e6ea4864956870da6218b7
BLAKE2b-256 checksum
How to use checksums
ff53389d3471a2c3c114741fede5e229079a57846b4c22273c12f700d69e106a
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 Oct 24, 2026.

Transparency log

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

Download URL pysidwizard-0.4.0-py3-none-any.whl
Size 119.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be2fecf8669cf56456692bf40d4a8feeee7ca91716a34c97b37af8d3b7b2b564
BLAKE2b-256 checksum
How to use checksums
695b7fe28a3692cbd8d96e5c5fbc8ccda77c926fe78fc2f8ae8d43d701a3d5fd
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 Oct 24, 2026.

Transparency log

Security for pysidwizard 0.4.0

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.4.0.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 Oct 24, 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