Two simple decoders for Retro computing processors.#130
Two simple decoders for Retro computing processors.#130electrickery wants to merge 7 commits intosigrokproject:masterfrom
Conversation
|
You might find some useful code for disassembly in hoglet's decoder at https://github.com/hoglet67/6809Decoder |
|
@gtoal: Thanks for the pointer, it might be interesting to port this to Python. |
ivanwick
left a comment
There was a problem hiding this comment.
Comments for cleanup and formatting
| ## | ||
| ## This file is part of the libsigrokdecode project. | ||
| ## | ||
| ## Copyright (C) 2014 Daniel Elstner <daniel.kitta@gmail.com> |
|
|
||
| import sigrokdecode as srd | ||
| from functools import reduce | ||
| from common.srdhelper import SrdIntEnum |
There was a problem hiding this comment.
SrdIntEnum does not appear to be used (other pd.py also).
| Notes on the TMS7000 opcode format and descriptions of both documented and | ||
| "undocumented" opcodes are available here: | ||
|
|
||
| Details: |
There was a problem hiding this comment.
Is this section meant to have some documentation links like the 6809 decoder?
| from common.srdhelper import SrdIntEnum | ||
| import string | ||
|
|
||
| #Ann = SrdIntEnum.from_str('Ann', 'ROMDATA') |
There was a problem hiding this comment.
Commented-out code can be removed, also remove import SrdIntEnum.
| else: | ||
| return reduce(lambda a, b: (a << 1) | b, reversed(bus)) | ||
|
|
||
|
|
There was a problem hiding this comment.
From HACKING
No double-newlines between methods (or anywhere else).
|
|
||
| import sigrokdecode as srd | ||
| from common.srdhelper import SrdIntEnum | ||
| import string |
| ## | ||
| ## This file is part of the libsigrokdecode project. | ||
| ## | ||
| ## Copyright (C) 2014 Daniel Elstner <daniel.kitta@gmail.com> |
These decoders only add visualisations of address and data values, both read and write. No attempt to add disassembly. This is already very useful for debugging hardware and software as well as a help in annotating disassembled code.