MC6809 CPU emulator written in Python
Project description
MC6809 CPU emulator written in Python
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
~$ git clone https://github.com/jedie/DragonPy.git
~$ cd DragonPy/
~/DragonPy$ ./cli.py --help
The output of ./cli.py --help
looks like:
Usage: ./cli.py [OPTIONS] COMMAND [ARGS]...
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ benchmark Run a MC6809 emulation benchmark │
│ check-code-style Check code style by calling darker + flake8 │
│ coverage Run and show coverage. │
│ fix-code-style Fix code style of all MC6809 source code files via darker │
│ install Run pip-sync and install 'MC6809' via pip as editable. │
│ mypy Run Mypy (configured in pyproject.toml) │
│ profile Profile the MC6809 emulation benchmark │
│ publish Build and upload this project to PyPi │
│ safety Run safety check against current requirements files │
│ test Run unittests │
│ tox Run tox │
│ update Update "requirements*.txt" dependencies files │
│ update-test-snapshot-files Update all test snapshot files (by remove and recreate all snapshot │
│ files) │
│ version Print version and exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
You can use the devshell as a CLI, too, e.g.: 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 [OPTIONS]
Run a MC6809 emulation benchmark
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --loops INTEGER How many benchmark loops should be run? [default: 6] │
│ --multiply INTEGER est data multiplier [default: 15] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
tests
~/DragonPy$ ./cli.py coverage
# or just:
~/DragonPy$ ./cli.py test
# or with different Python versions:
~/DragonPy$ ./cli.py tox
profile
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 [OPTIONS]
Profile the MC6809 emulation benchmark
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --loops INTEGER How many benchmark loops should be run? [default: 6] │
│ --multiply INTEGER est data multiplier [default: 15] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TODO
- Update 'cpu6809_html_debug.py'
- Use bottle for http control server part
- unimplemented OPs:
- RESET
- SWI / SWI2 / SWI3
- SYNC
History
(Some of the points are related to DragonPy Emulator)
- dev
- TBC
- 07.03.2023 - v0.7.0
- Replace the
Makefile
with a click CLI - Use pip-tools and https://github.com/jedie/manageprojects
- Rename git
master
tomain
branch - Run CI tests against Python 3.9, 3.10 and 3.11
- Replace Creole README with markdown
- Replace the
- 10.02.2020 - v0.6.0
- modernize project and sources
- skip support for Python 2
- minimal Python v3.6
- 19.10.2015 - v0.5.0
- Split CPU with mixin inheritance
- Optimizing:
- remove
.get()
function calls from registers - move Condition Code Register (CC) into CPU via mixin class
- remove
- Bugfix TFR and EXG by convert_differend_width()
- Run DragonPy unittests on travis CI, too.
- 24.08.2015 - v0.4.6
- Add a "max_delay", to fix the "freeze" after a speed limit change
- rename some of the "speed limit" variables
- 21.08.2015 - v0.4.5
- deactivate 'cpu6809_html_debug.py' - TODO: update it!
- update cli unittests
- update README and code cleanup
- 10.08.2015 - v0.4.4 - bugfix and cleanup the tests
- 10.08.2015 - v0.4.3 - run unittests with nose
- 27.05.2015 - v0.4.2 - Add MC6809/example6809.py
- 26.05.2015 - v0.4.0, 0.4.1 - Split MC6809 from DragonPy
- 22.09.2014 - Remove hacked CPU skeleton generator scripts with commit ac903a8f
- 14.09.2014 - Release v0.2.0 - Add a speedlimit, config dialog and IRQ: Forum post 11780
- 05.09.2014 - Release v0.1.0 - Implement pause/resume, hard-/soft-reset 6809 in GUI and improve a little the GUI/Editor stuff: v0.1.0 see also: Forum post 11719.
- 27.08.2014 - Run CoCo with Extended Color Basic v1.1, bugfix transfer BASIC Listing with 8fe24e5...697d39e see: Forum post 11696.
- 20.08.2014 - rudimenary BASIC IDE works with 7e0f16630...ce12148, see also: Forum post 11645.
- 05.08.2014 - Start to support CoCo, too with 0df724b, see also: Forum post 11573.
- 04.08.2014 - Use the origin Pixel-Font with Tkinter GUI, see: Forum post 4909 and Forum post 11570.
- 27.07.2014 - Copyrigth info from Dragon 64 ROM is alive with 543275b, see: Forum post 11524.
- 29.06.2014 - First "HELLO WORLD" works, see: Forum post 11283.
- 27.10.2013 - "sbc09" ROM works wuite well almist, see: Forum post 9752.
- 16.10.2013 - See copyright info from "Simple6809" ROM with 25a97b6 see also: Forum post 9654.
- 10.09.2013 - Start to implement the 6809 CPU with 591d2ed
- 28.08.2013 - Fork "Apple ][ Emulator" written in Python: https://github.com/jtauber/applepy to https://github.com/jedie/DragonPy
donation
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
File details
Details for the file MC6809-0.7.0.tar.gz
.
File metadata
- Download URL: MC6809-0.7.0.tar.gz
- Upload date:
- Size: 98.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a9ba010aa3fe1acdfc4d79c3a398f1442f0391af008e30a388c36347365ea2 |
|
MD5 | 291215a2b961fd455e32bb8fef84e30b |
|
BLAKE2b-256 | babb19b9edac06dbcbd0f3e1ba05c5561dac2e2d350821b40e81af13f80844c1 |
Provenance
File details
Details for the file MC6809-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: MC6809-0.7.0-py3-none-any.whl
- Upload date:
- Size: 121.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60f2d4b39b6d4be1015728fa974906f6e1906c3a8e93ae09988ea8b64066dce2 |
|
MD5 | 3ff707926c3557c026b8f66bde955c35 |
|
BLAKE2b-256 | 1d19ce5b330279c6a8edde1362d0805a5258a1c30a3a1ba599978ce7fcaf62ae |