summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c149
1 files changed, 148 insertions, 1 deletions
diff --git a/cpu.c b/cpu.c
index 7ef4985..e3bb7d5 100644
--- a/cpu.c
+++ b/cpu.c
@@ -177,6 +177,8 @@ branch(uint16_t addr, bool cond)
regs.pc = addr;
}
+/* OFFICIAL OPCODES */
+
void
ADC(uint16_t arg)
{
@@ -696,6 +698,140 @@ TYA(uint16_t arg)
STATUS_UPDATE_NZ(regs.a);
}
+/* UNOFFICIAL OPCODES */
+
+void
+AAC(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+AAX(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+ARR(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+ASR(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+ATX(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+AXA(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+AXS(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+DCP(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+DOP(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+ISC(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+KIL(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+LAR(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+LAX(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+RLA(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+RRA(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+SLO(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+SRE(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+SXA(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+SYA(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+TOP(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+XAA(uint16_t arg)
+{
+ NOP(0);
+}
+
+void
+XAS(uint16_t arg)
+{
+ NOP(0);
+}
+
static void
interpret(void)
{
@@ -711,7 +847,18 @@ interpret(void)
printf("%02X", op);
for (uint8_t i = 0; i < opcodes[op].bytes - 1; i++)
printf(" %02X", peek(regs.pc + i));
- printf("\t%s ", opcodes[op].name);
+
+ if (opcodes[op].unofficial) {
+ if (opcodes[op].bytes == 1)
+ printf(" ");
+ else if (opcodes[op].bytes == 2)
+ printf(" ");
+ else if (opcodes[op].bytes == 3)
+ putchar(' ');
+ putchar('*');
+ } else
+ putchar('\t');
+ printf("%s ", opcodes[op].name);
mode = opcodes[op].mode;
arg = opcode_mem(mode);