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.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.3.0
File Size Uploaded Provenance
pysidwizard-0.3.0.tar.gz 155.0 kB With provenance Details

Built distribution (wheel)

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

Total release size: 257.1 kB

Release files / pysidwizard-0.3.0.tar.gz

Download URL pysidwizard-0.3.0.tar.gz
Size 155.0 kB
Tags Source
SHA-256 checksum
How to use checksums
26facd03e852f824a2e764d80fbd8bab334d9053a8ea1559389310c147e9c163
BLAKE2b-256 checksum
How to use checksums
98b768076aa1a9987776d7cb303e1f5eda20bf9ac47298a172a2d4a529201f25
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.0-py3-none-any.whl

Download URL pysidwizard-0.3.0-py3-none-any.whl
Size 102.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33e83a4b5283a4b49409e40365c1326745c87312b32ab3079ff9c06678f4cd3f
BLAKE2b-256 checksum
How to use checksums
1cf17ba379b478a98c07321e8f327a8e1a5da9a12af6093744de793ba016c15b
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.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

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

Select from 2 files

Attestation for pysidwizard-0.3.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 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