1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-12-11 18:49:16 +00:00

Make runtime disassembly optional.

This commit is contained in:
Radosław Kujawa 2017-02-15 21:38:51 +01:00
parent 23492e6533
commit de1ab25427
2 changed files with 4 additions and 3 deletions

View File

@ -32,6 +32,7 @@ rk65c02_init(bus_t *b)
e.bps_head = NULL; e.bps_head = NULL;
e.trace_head = NULL; e.trace_head = NULL;
e.runtime_disassembly = false;
return e; return e;
} }
@ -103,8 +104,8 @@ rk65c02_exec(rk65c02emu_t *e)
return; return;
} }
/* if disassembly-when-running enabled */ if (e->runtime_disassembly)
disassemble(e->bus, e->regs.PC); disassemble(e->bus, e->regs.PC);
i = instruction_fetch(e->bus, e->regs.PC); i = instruction_fetch(e->bus, e->regs.PC);
id = instruction_decode(i.opcode); id = instruction_decode(i.opcode);

View File

@ -69,7 +69,7 @@ struct rk65c02emu {
bool irq; /* interrupt request line state, true is asserted */ bool irq; /* interrupt request line state, true is asserted */
breakpoint_t *bps_head; /* pointer to linked list with breakpoints */ breakpoint_t *bps_head; /* pointer to linked list with breakpoints */
bool runtime_disassembly; /* disassemble code when emulator is running */
bool trace; /* tracing mode enable/disable */ bool trace; /* tracing mode enable/disable */
trace_t *trace_head; /* pointer to linked list with trace log */ trace_t *trace_head; /* pointer to linked list with trace log */
}; };