1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-06-15 05:29:28 +00:00

Document the way invalid opcodes are handled.

This commit is contained in:
Radosław Kujawa 2018-04-01 21:16:58 +02:00
parent 3c684fbf2c
commit 68fa918d97

View File

@ -123,8 +123,15 @@ rk65c02_exec(rk65c02emu_t *e)
if (!instruction_modify_pc(&id))
program_counter_increment(e, &id);
} else {
rk65c02_log(LOG_ERROR, "unimplemented opcode %X @ %X\n",
/*
* Technically, on a real 65C02, all invalid opcodes
* are NOPs, but until rk65c02 reaches some level of
* maturity, let's catch them here to help iron out the
* bugs.
*/
rk65c02_log(LOG_WARN, "invalid opcode %X @ %X\n",
i.opcode, e->regs.PC);
e->state = STOPPED;
e->stopreason = EMUERROR;
}