mirror of
https://github.com/rkujawa/rk65c02.git
synced 2025-07-01 17:23:52 +00:00
Document the way invalid opcodes are handled.
This commit is contained in:
@ -123,8 +123,15 @@ rk65c02_exec(rk65c02emu_t *e)
|
|||||||
if (!instruction_modify_pc(&id))
|
if (!instruction_modify_pc(&id))
|
||||||
program_counter_increment(e, &id);
|
program_counter_increment(e, &id);
|
||||||
} else {
|
} 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);
|
i.opcode, e->regs.PC);
|
||||||
|
|
||||||
e->state = STOPPED;
|
e->state = STOPPED;
|
||||||
e->stopreason = EMUERROR;
|
e->stopreason = EMUERROR;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user