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 and SHA-256 verifies each one.

License

Apache 2.0 — see LICENSE.

Metadata

Release files for pysidwizard 0.3.3

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.3.3
File Size Uploaded Provenance
pysidwizard-0.3.3.tar.gz 156.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 259.2 kB

Release files / pysidwizard-0.3.3.tar.gz

Download URL pysidwizard-0.3.3.tar.gz
Size 156.6 kB
Tags Source
SHA-256 checksum
How to use checksums
eb387a966d15943b45381dfae4758e3b6426bfd589ab23f4081a65d0240fe07a
BLAKE2b-256 checksum
How to use checksums
592e4a61e3254704ca7df2967f2b7b930ee421f21e43465705cacf6266dafe1f
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 22, 2026.

Transparency log

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

Download URL pysidwizard-0.3.3-py3-none-any.whl
Size 102.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba02c6045147273beb2764222c934d8a26951174bd75da7aec8f035bd1bf9cb5
BLAKE2b-256 checksum
How to use checksums
48f1418060cfd077a31ba5891a24992f1dc8ca3ef4f321868523507454fae101
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 22, 2026.

Transparency log

Security for pysidwizard 0.3.3

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pysidwizard-0.3.3.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 22, 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