summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/netlist.c
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-05-02 19:41:03 +0200
committer ImJezze <jezze@gmx.net>2015-05-02 19:41:03 +0200
commitcc3b682e52bf097d31db78032aad01d6a0b12e94 (patch)
tree860c97ca011b64c31a5ad277f5cea2b1d86eeaf0 /src/emu/machine/netlist.c
parent7df6a23ba2ae1c1df94ed8cc2398f2546f339997 (diff)
parenta649a95488e1fc85813dda747dc74c596496bd1c (diff)
Merge pull request #1 from mamedev/master
Sync to master
Diffstat (limited to 'src/emu/machine/netlist.c')
-rw-r--r--src/emu/machine/netlist.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c
index ae88104f605..daf08a61598 100644
--- a/src/emu/machine/netlist.c
+++ b/src/emu/machine/netlist.c
@@ -370,7 +370,8 @@ void netlist_mame_device_t::device_clock_changed()
//printf("device_clock_changed\n");
m_div = netlist_time::from_hz(clock()).as_raw();
//m_rem = 0;
- NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div));
+ //NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clock(), m_div));
+ NL_VERBOSE_OUT(("Setting clock %d and divisor %d\n", clock(), m_div));
//printf("Setting clock %d and divisor %d\n", clock(), m_div);
}
@@ -535,18 +536,16 @@ ATTR_COLD offs_t netlist_mame_cpu_device_t::disasm_disassemble(char *buffer, off
//char tmp[16];
unsigned startpc = pc;
int relpc = pc - m_genPC;
- //UINT16 opcode = (oprom[pc - startpc] << 8) | oprom[pc+1 - startpc];
- //UINT8 inst = opcode >> 13;
-
if (relpc >= 0 && relpc < netlist().queue().count())
{
- // sprintf(buffer, "%04x %02d %s", pc, relpc, netlist().queue()[netlist().queue().count() - relpc - 1].object().name().cstr());
int dpc = netlist().queue().count() - relpc - 1;
- sprintf(buffer, "%c %s @%10.7f", (relpc == 0) ? '*' : ' ', netlist().queue()[dpc].object()->name().cstr(),
+ // FIXME: 50 below fixes crash in mame-debugger. It's based on try on error.
+ snprintf(buffer, 50, "%c %s @%10.7f", (relpc == 0) ? '*' : ' ', netlist().queue()[dpc].object()->name().cstr(),
netlist().queue()[dpc].exec_time().as_double());
}
else
sprintf(buffer, "%s", "");
+
pc+=1;
return (pc - startpc);
}