py65-compatible 6502/6510 MPU, assembler, and disassembler with first-class NMOS illegal-opcode support.
Project description
jennings
A py65-compatible 6502/6510 MPU, assembler, and disassembler with first-class
support for all 105 documented NMOS 6510 illegal opcodes. Drop-in for py65:
change import py65… to import jennings….
Where py65 stubs the illegals (inst_not_implemented — a 0-cycle skip),
jennings executes them byte- and cycle-exact via deity-informant's
hardware-validated lift + PcodeVM engine, and its assembler/disassembler
decode them as real mnemonics instead of ???.
Install
pip install jennings # pulls deity-informant (pure-Python engine)
pip install jennings[dev] # + test/lint tooling (pytest, black, pylint, py65)
Use
from jennings.devices.mpu6502 import MPU
from jennings.memory import ObservableMemory
from jennings.disassembler import Disassembler
from jennings.assembler import Assembler
mpu = MPU(memory=ObservableMemory()) # same API as py65.devices.mpu6502.MPU
mpu.memory[0:2] = [0xAF, 0x10] # LAX $10 — an illegal py65 cannot run
mpu.step() # a, x <- mem[$10]; cycle-exact
Assembler(MPU()).assemble("SLO $20") # [0x07, 0x20]
Disassembler(MPU()).instruction_at(pc) # (len, "SLO $20")
Compatibility
Mirrors the py65 API surface used in practice: devices.mpu6502.MPU
(.step/.reset/.irq/.nmi, a/x/y/sp/p/pc/memory/processorCycles,
ByteAt/WordAt, disassemble/instruct/cycletime/extracycles),
memory.ObservableMemory, disassembler.Disassembler, assembler.Assembler,
utils.addressing.AddressParser.
Every legal opcode is validated byte-, flag-, and cycle-exact against py65 in CI; the illegals are validated by NMS decomposition and (via the engine) byte-exact against sidplayfp. See docs/design.md, docs/illegal-opcodes.md, and docs/migrating-from-py65.md.
Limitations
No BCD (decimal-mode ADC/SBC), matching the deity-informant engine and the C64
target domain (playroutines run CLD). py65.monitor is not reimplemented.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jennings-0.1.2.tar.gz.
File metadata
- Download URL: jennings-0.1.2.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6b64ce0db3eba5c6cbbad60cc8cc27998c56e82e009db958508d2040fc1971
|
|
| MD5 |
b71df10c72e31e3db589b6f147780014
|
|
| BLAKE2b-256 |
e28496aa7eec4d725fd5a623ca5be6b17c037d1037e2d1c1b2ad2eb6ec2dd4fd
|
Provenance
The following attestation bundles were made for jennings-0.1.2.tar.gz:
Publisher:
publish.yml on anarkiwi/jennings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jennings-0.1.2.tar.gz -
Subject digest:
2d6b64ce0db3eba5c6cbbad60cc8cc27998c56e82e009db958508d2040fc1971 - Sigstore transparency entry: 2225340250
- Sigstore integration time:
-
Permalink:
anarkiwi/jennings@016020956fb4035a4e37f231fa3cea4b3cbe6df5 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/anarkiwi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@016020956fb4035a4e37f231fa3cea4b3cbe6df5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jennings-0.1.2-py3-none-any.whl.
File metadata
- Download URL: jennings-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c299def2187f9a6e63efbd8e67c0a48dc65a7b9596b4cae3662298b6619deda
|
|
| MD5 |
303948e6cc905ce6e8e14847d244f39b
|
|
| BLAKE2b-256 |
f0bff8ce7bca20159a25cfc12c122ce3223765728b050e27bc667240a44858cd
|
Provenance
The following attestation bundles were made for jennings-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on anarkiwi/jennings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jennings-0.1.2-py3-none-any.whl -
Subject digest:
6c299def2187f9a6e63efbd8e67c0a48dc65a7b9596b4cae3662298b6619deda - Sigstore transparency entry: 2225340663
- Sigstore integration time:
-
Permalink:
anarkiwi/jennings@016020956fb4035a4e37f231fa3cea4b3cbe6df5 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/anarkiwi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@016020956fb4035a4e37f231fa3cea4b3cbe6df5 -
Trigger Event:
push
-
Statement type: