diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..4aef42f --- /dev/null +++ b/src/Makefile @@ -0,0 +1,15 @@ +OBJS=rk65c02.o bus.o +EXEC=rk65c02 +LDFLAGS= +CFLAGS=-Wall + +$(EXEC) : $(OBJS) + $(CC) -o $(EXEC) $(LDFLAGS) $(OBJS) + +%.o : %.c %.h + $(CC) $(CFLAGS) -c $< + +clean : + rm -f $(OBJS) + rm -f $(EXEC) + diff --git a/src/bus.c b/src/bus.c new file mode 100644 index 0000000..39bae53 --- /dev/null +++ b/src/bus.c @@ -0,0 +1,46 @@ +#include +#include + +#include +#include + +#define RK65C02_BUS_SIZE 64*1024 + +struct bus_tag { + uint8_t *space; +}; + +typedef struct bus_tag bus_t; + +uint8_t +bus_read_1(bus_t *t, uint16_t addr) +{ + return t->space[addr]; +} + +void +bus_write_1(bus_t *t, uint16_t addr, uint8_t val) +{ + t->space[addr] = val; +} + +bus_t +bus_init() +{ + bus_t t; + + t.space = (uint8_t *) malloc(RK65C02_BUS_SIZE); + + assert(t.space != NULL); + + memset(t.space, 0, RK65C02_BUS_SIZE); + + return t; +} + +void +bus_finish(bus_t *t) +{ + free(t->space); +} + diff --git a/src/bus.h b/src/bus.h new file mode 100644 index 0000000..da2d66d --- /dev/null +++ b/src/bus.h @@ -0,0 +1,20 @@ +#ifndef _BUS_H_ +#define _BUS_H_ + +#include + +#define RK65C02_BUS_SIZE 64*1024 + +struct bus_tag { + uint8_t *space; +}; + +typedef struct bus_tag bus_t; + +uint8_t bus_read_1(bus_t *, uint16_t); +void bus_write_1(bus_t *, uint16_t, uint8_t); +bus_t bus_init(); +void bus_finish(); + +#endif /* _BUS_H_ */ + diff --git a/src/rk65c02.c b/src/rk65c02.c new file mode 100644 index 0000000..254e3f9 --- /dev/null +++ b/src/rk65c02.c @@ -0,0 +1,141 @@ +#include +#include +#include +#include + +#include +#include + +#include "rk65c02.h" +#include "bus.h" + +static bool run = false; + +struct reg_state { + uint8_t A; /* accumulator */ + uint8_t X; /* index X */ + uint8_t Y; /* index Y */ + + uint16_t PC; /* program counter */ + uint8_t SP; /* stack pointer */ + uint8_t P; /* status */ +}; + +typedef struct reg_state reg_state_t; + +instruction_t +instruction_fetch(bus_t *b, uint16_t addr) +{ + instruction_t i; + + i.opcode = bus_read_1(b, addr); + i.def = instrs[i.opcode]; + + assert(i.def.op != OP_UNIMPL); + + /* handle operands */ + switch (i.def.mode) { + case ADDR_IMMEDIATE: + case ADDR_ZP: + case ADDR_ZPX: + case ADDR_ZPY: + case ADDR_IZP: + case ADDR_IZPX: + case ADDR_IZPY: + case ADDR_RELATIVE: + i.op1 = bus_read_1(b, addr+1); + break; + case ADDR_ABSOLUTE: + case ADDR_ABSOLUTEX: + case ADDR_ABSOLUTEY: + case ADDR_IABSOLUTE: + case ADDR_IABSOLUTEX: + i.op1 = bus_read_1(b, addr+1); + i.op2 = bus_read_1(b, addr+2); + break; + case ADDR_IMPLIED: + default: + break; + } + + return i; +} + +void +instruction_print(instruction_t *i) +{ + switch (i->def.mode) { + case ADDR_IMPLIED: + printf("%s", i->def.mnemonic); + break; + case ADDR_IMMEDIATE: + printf("%s #%X", i->def.mnemonic, i->op1); + break; + case ADDR_ZP: + printf("%s %X", i->def.mnemonic, i->op1); + break; + + case ADDR_ABSOLUTE: + printf("%s %02X%02X", i->def.mnemonic, i->op2, i->op1); + break; + } + +} + +void +disassemble(bus_t *b, uint16_t addr) +{ + instruction_t i; + + i = instruction_fetch(b, addr); + + printf("%X:\t", addr); + instruction_print(&i); + printf("\t\t// %X", i.opcode); + printf("\n"); +} + +void +rk6502_start(bus_t *b, uint16_t addr) { + reg_state_t r; + instruction_t i; + + r.PC = addr; + + run = true; + while (run) { + disassemble(b, r.PC); + i = instruction_fetch(b, r.PC); + + //execute(i, r); + + if (i.opcode == OP_STP) + run = false; + + r.PC += i.def.size; + } +} + +int +main(void) +{ + bus_t b; + + b = bus_init(); + + bus_write_1(&b, 0, OP_INX); + bus_write_1(&b, 1, OP_NOP); + bus_write_1(&b, 2, OP_LDY_IMM); + bus_write_1(&b, 3, 0x1); + bus_write_1(&b, 4, OP_TSB_ZP); + bus_write_1(&b, 5, 0x3); + bus_write_1(&b, 6, OP_JSR); + bus_write_1(&b, 7, 0x09); + bus_write_1(&b, 8, 0x0); + bus_write_1(&b, 9, OP_STP); + + rk6502_start(&b, 0); + + bus_finish(&b); +} + diff --git a/src/rk65c02.h b/src/rk65c02.h new file mode 100644 index 0000000..3407233 --- /dev/null +++ b/src/rk65c02.h @@ -0,0 +1,310 @@ +#ifndef _RK6502_H_ +#define _RK6502_H_ + +struct instrdef { + uint8_t op; + const char *mnemonic; + uint8_t mode; + uint8_t size; +}; + +typedef struct instrdef instrdef_t; + +struct instruction { + uint8_t opcode; + instrdef_t def; + uint8_t op1; + uint8_t op2; +}; + +typedef struct instruction instruction_t; + +#define ADDR_IMPLIED 1 +#define ADDR_IMMEDIATE 2 +#define ADDR_ZP 3 +#define ADDR_ZPX 4 +#define ADDR_ZPY 5 +#define ADDR_IZP 6 +#define ADDR_IZPX 7 +#define ADDR_IZPY 8 +#define ADDR_RELATIVE 9 +#define ADDR_ABSOLUTE 10 +#define ADDR_ABSOLUTEX 11 +#define ADDR_ABSOLUTEY 12 +#define ADDR_IABSOLUTE 13 +#define ADDR_IABSOLUTEX 14 + + +#define OP_BRK 0x00 +#define OP_TSB_ZP 0x04 +#define OP_JSR 0x20 +#define OP_LDY_IMM 0xA0 +#define OP_STP 0xDB +#define OP_INX 0xE8 +#define OP_NOP 0xEA + +#define OP_UNIMPL 0xFF + +const struct instrdef instrs[] = { + { OP_BRK, "brk", ADDR_IMPLIED, 1 }, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_NOP, "nop", ADDR_IMMEDIATE, 2}, /* invalid */ + { OP_NOP, "nop", ADDR_IMPLIED, 1}, /* invalid */ + { OP_TSB_ZP, "tsb", ADDR_ZP, 2}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_JSR, "jsr", ADDR_ABSOLUTE, 3}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_LDY_IMM, "ldy", ADDR_IMMEDIATE, 2}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_STP, "stp", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_INX, "inx", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_NOP, "nop", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, + { OP_UNIMPL, "unimpllast", ADDR_IMPLIED, 1} +}; + + +#endif /* _RK6502_H_ */ +