MC6809 is a Open source (GPL v3 or later) emulator for the legendary 6809 CPU, used old homecomputer Dragon 32/64 and Tandy TRS-80 Color Computer (CoCo) built in the 1980s...
Tested with Python 3.8, 3.9, 3.10 and PyPy3
A example usage can be find in: MC6809/example6809.py
Getting started:
~$ git clone https://github.com/6809/MC6809.git
~$ cd MC6809
~/MC6809 $ ./cli.py --help
The output of ./cli.py --help looks like:
usage: ./cli.py [-h] {benchmark,example,profile,version}
╭─ options ────────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ────────────────────────────────────────────────────────────────────╮
│ {benchmark,example,profile,version} │
│ benchmark Run a MC6809 emulation benchmark │
│ example Just run the MC6809/example6809.py example (CRC32 calculation) │
│ profile Profile the MC6809 emulation benchmark │
│ version Print version and exit │
╰──────────────────────────────────────────────────────────────────────────────────╯
There is a simple benchmark. Run e.g.:
~/MC6809$ ./cli.py benchmark --help
The output of ./cli.py benchmark --help looks like:
usage: ./cli.py benchmark [-h] [--loops INT] [--multiply INT] [-v]
Run a MC6809 emulation benchmark
╭─ options ──────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
│ --loops INT How many benchmark loops should be run? (default: 6) │
│ --multiply INT Process data multiplier (default: 15) │
│ -v, --verbosity Verbosity level; e.g.: -v, -vv, -vvv, etc. (repeatable) │
╰────────────────────────────────────────────────────────────────────────────────╯
You can run the Python profiler against the benchmark, e.g.:
~/MC6809$ ./cli.py profile --help
The output of ./cli.py profile --help looks like:
usage: ./cli.py profile [-h] [--loops INT] [--multiply INT] [-v]
Profile the MC6809 emulation benchmark
╭─ options ──────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
│ --loops INT How many benchmark loops should be run? (default: 6) │
│ --multiply INT Process data multiplier (default: 15) │
│ -v, --verbosity Verbosity level; e.g.: -v, -vv, -vvv, etc. (repeatable) │
╰────────────────────────────────────────────────────────────────────────────────╯
For development exists dev-cli, e.g.:
~/MC6809$ ./dev-cli.py --help
The output of ./dev-cli.py --help looks like:
usage: ./dev-cli.py [-h]
{coverage,install,lint,mypy,nox,pip-audit,publish,test,update,update-readme-history,update-test-sn
apshot-files,version}
╭─ options ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ {coverage,install,lint,mypy,nox,pip-audit,publish,test,update,update-readme-history,update-test-snapshot-files,ver │
│ sion} │
│ coverage Run tests and show coverage report. │
│ install Install requirements and 'MC6809' via pip as editable. │
│ lint Check/fix code style by run: "ruff check --fix" │
│ mypy Run Mypy (configured in pyproject.toml) │
│ nox Run nox │
│ pip-audit Run pip-audit check against current requirements files │
│ publish Build and upload this project to PyPi │
│ test Run unittests │
│ update Update dependencies (uv.lock) and git pre-commit hooks │
│ update-readme-history │
│ Update project history base on git commits/tags in README.md Will be exited with 1 if the │
│ README.md was updated otherwise with 0. │
│ │
│ Also, callable via e.g.: │
│ python -m cli_base update-readme-history -v │
│ update-test-snapshot-files │
│ Update all test snapshot files (by remove and recreate all snapshot files) │
│ version Print version and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Run tests, e.g.:
~/DragonPy$ ./dev-cli.py coverage
# or just:
~/DragonPy$ ./dev-cli.py test
# or with different Python versions:
~/DragonPy$ ./dev-cli.py tox
We use cli-base-utilities to generate the history in this README.
To make a new release, do this:
(Some of the points are related to DragonPy Emulator)
Expand older history entries ...
$ claude mcp add MC6809 \
-- python -m otcore.mcp_server <graph>