I will start a new implementation.
I hacked some data scraping scripts:
https://github.com/jedie/DragonPy/commi ... 5f6e75d903
These script will collect information from:
http://www.maddes.net/m6809pm/sections.htm#sec4_4
http://www.burgins.com/m6809.html
http://www.maddes.net/m6809pm/appendix_a.htm#appA
With the scraper i will create a "python script data file" with all merged data. Something like a poorman database
Will look like this:
Code: Select all
OP_DATA = (
#### 8-Bit Accumulator and Memory Instructions
{
"opcode": 0x0, "instruction": "NEG", "mnemonic": "NEG",
"desc": "Negate accumulator or memory",
"addr_mode": 1, "operant": None,
"cycles": "6", "bytes": "2", "HNZVC": "uaaaa", "category": 0
},
{
"opcode": 0x3, "instruction": "COM", "mnemonic": "COM",
"desc": "Complement accumulator or memory location",
"addr_mode": 1, "operant": None,
"cycles": "6", "bytes": "2", "HNZVC": "-aa01", "category": 0
},
{
"opcode": 0x4, "instruction": "LSR", "mnemonic": "LSR",
"desc": "Logical shift right accumulator or memory location",
"addr_mode": 1, "operant": None,
"cycles": "6", "bytes": "2", "HNZVC": "-0a-s", "category": 0
},
...
Then i started to create a "make skeleton" script. To create something like this, automatic:
Code: Select all
class CPU6809(object):
#### 8-Bit Accumulator and Memory Instructions
# ADC - Add memory to accumulator with carry
@opcode((
0x89, "ADCA", IMMEDIATE, operant=A
0x99, "ADCA", DIRECT, operant=A
0xa9, "ADCA", INDEXED, operant=A
0xb9, "ADCA", EXTENDED, operant=A
0xc9, "ADCB", IMMEDIATE, operant=B
0xd9, "ADCB", DIRECT, operant=B
0xe9, "ADCB", INDEXED, operant=B
0xf9, "ADCB", EXTENDED, operant=B
))
def ADC(self, op, ea=None, operant=None):
raise NotImplementedError("TODO: $%x ADC") % op
# ADD - Add memory to accumulator
@opcode((
0x8b, "ADDA", IMMEDIATE, operant=A
0x9b, "ADDA", DIRECT, operant=A
0xab, "ADDA", INDEXED, operant=A
0xbb, "ADDA", EXTENDED, operant=A
0xcb, "ADDB", IMMEDIATE, operant=B
0xdb, "ADDB", DIRECT, operant=B
0xeb, "ADDB", INDEXED, operant=B
0xfb, "ADDB", EXTENDED, operant=B
))
def ADD(self, op, ea=None, operant=None):
raise NotImplementedError("TODO: $%x ADD") % op
# AND - AND memory with accumulator
@opcode((
0x84, "ANDA", IMMEDIATE, operant=A
0x94, "ANDA", DIRECT, operant=A
0xa4, "ANDA", INDEXED, operant=A
0xb4, "ANDA", EXTENDED, operant=A
0xc4, "ANDB", IMMEDIATE, operant=B
0xd4, "ANDB", DIRECT, operant=B
0xe4, "ANDB", INDEXED, operant=B
0xf4, "ANDB", EXTENDED, operant=B
))
def AND(self, op, ea=None, operant=None):
raise NotImplementedError("TODO: $%x AND") % op
...