summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/sharc/sharc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/sharc/sharc.cpp')
-rw-r--r--src/devices/cpu/sharc/sharc.cpp39
1 files changed, 14 insertions, 25 deletions
diff --git a/src/devices/cpu/sharc/sharc.cpp b/src/devices/cpu/sharc/sharc.cpp
index e3b965eb25d..f03dd5bbfc4 100644
--- a/src/devices/cpu/sharc/sharc.cpp
+++ b/src/devices/cpu/sharc/sharc.cpp
@@ -490,34 +490,22 @@ void adsp21062_device::device_start()
m_drcuml->symbol_add(&m_core->pc, sizeof(m_core->pc), "pc");
m_drcuml->symbol_add(&m_core->icount, sizeof(m_core->icount), "icount");
- for (int i=0; i < 16; i++)
+ for (int i = 0; i < 16; i++)
{
char buf[10];
- sprintf(buf, "r%d", i);
+
+ snprintf(buf, std::size(buf), "r%d", i);
m_drcuml->symbol_add(&m_core->r[i], sizeof(m_core->r[i]), buf);
- if (i < 8)
- {
- sprintf(buf, "dag_i%d", i);
- m_drcuml->symbol_add(&m_core->dag1.i[i & 7], sizeof(m_core->dag1.i[i & 7]), buf);
- sprintf(buf, "dag_m%d", i);
- m_drcuml->symbol_add(&m_core->dag1.m[i & 7], sizeof(m_core->dag1.m[i & 7]), buf);
- sprintf(buf, "dag_l%d", i);
- m_drcuml->symbol_add(&m_core->dag1.l[i & 7], sizeof(m_core->dag1.l[i & 7]), buf);
- sprintf(buf, "dag_b%d", i);
- m_drcuml->symbol_add(&m_core->dag1.b[i & 7], sizeof(m_core->dag1.b[i & 7]), buf);
- }
- else
- {
- sprintf(buf, "dag_i%d", i);
- m_drcuml->symbol_add(&m_core->dag2.i[i & 7], sizeof(m_core->dag2.i[i & 7]), buf);
- sprintf(buf, "dag_m%d", i);
- m_drcuml->symbol_add(&m_core->dag2.m[i & 7], sizeof(m_core->dag2.m[i & 7]), buf);
- sprintf(buf, "dag_l%d", i);
- m_drcuml->symbol_add(&m_core->dag2.l[i & 7], sizeof(m_core->dag2.l[i & 7]), buf);
- sprintf(buf, "dag_b%d", i);
- m_drcuml->symbol_add(&m_core->dag2.b[i & 7], sizeof(m_core->dag2.b[i & 7]), buf);
- }
+ SHARC_DAG &dag((i < 8) ? m_core->dag1 : m_core->dag2);
+ snprintf(buf, std::size(buf), "dag_i%d", i);
+ m_drcuml->symbol_add(&dag.i[i & 7], sizeof(dag.i[i & 7]), buf);
+ snprintf(buf, std::size(buf), "dag_m%d", i);
+ m_drcuml->symbol_add(&dag.m[i & 7], sizeof(dag.m[i & 7]), buf);
+ snprintf(buf, std::size(buf), "dag_l%d", i);
+ m_drcuml->symbol_add(&dag.l[i & 7], sizeof(dag.l[i & 7]), buf);
+ snprintf(buf, std::size(buf), "dag_b%d", i);
+ m_drcuml->symbol_add(&dag.b[i & 7], sizeof(dag.b[i & 7]), buf);
}
m_drcuml->symbol_add(&m_core->astat, sizeof(m_core->astat), "astat");
@@ -1050,6 +1038,8 @@ void adsp21062_device::execute_run()
if (m_core->idle && m_core->irq_pending == 0)
{
+ debugger_wait_hook();
+
int dma_count = m_core->icount;
// run active DMAs even while idling
@@ -1064,7 +1054,6 @@ void adsp21062_device::execute_run()
}
m_core->icount = 0;
- debugger_instruction_hook(m_core->daddr);
}
if (m_core->irq_pending != 0)
{