summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/dsp32/dsp32.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2014-03-23 12:32:30 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2014-03-23 12:32:30 +0000
commiteaeb87a2807cf515ece571792c5930b72aaa57d2 (patch)
tree08c01507e724caa8b643c75d74e22ee85f7273fd /src/emu/cpu/dsp32/dsp32.c
parenta063ecccd6fe3d8dc59371e36dea8e9f304c9cac (diff)
dsp32 devcb2 (nw)
Diffstat (limited to 'src/emu/cpu/dsp32/dsp32.c')
-rw-r--r--src/emu/cpu/dsp32/dsp32.c44
1 files changed, 14 insertions, 30 deletions
diff --git a/src/emu/cpu/dsp32/dsp32.c b/src/emu/cpu/dsp32/dsp32.c
index 6c4298df197..f95c09463a7 100644
--- a/src/emu/cpu/dsp32/dsp32.c
+++ b/src/emu/cpu/dsp32/dsp32.c
@@ -174,33 +174,21 @@ dsp32c_device::dsp32c_device(const machine_config &mconfig, const char *tag, dev
m_lastpins(0),
m_ppc(0),
m_program(NULL),
- m_direct(NULL)
+ m_direct(NULL),
+ m_output_pins_changed(*this)
{
- m_output_pins_changed = NULL;
-
// set our instruction counter
m_icountptr = &m_icount;
}
-
-//-------------------------------------------------
-// static_set_config - set the configuration
-// structure
-//-------------------------------------------------
-
-void dsp32c_device::static_set_config(device_t &device, const dsp32_config &config)
-{
- dsp32c_device &dsp = downcast<dsp32c_device &>(device);
- static_cast<dsp32_config &>(dsp) = config;
-}
-
-
//-------------------------------------------------
// device_start - start up the device
//-------------------------------------------------
void dsp32c_device::device_start()
{
+ m_output_pins_changed.resolve_safe();
+
// get our address spaces
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
@@ -297,8 +285,7 @@ void dsp32c_device::device_reset()
m_emr = 0xffff;
// clear the output pins
- if (m_output_pins_changed != NULL)
- (*m_output_pins_changed)(*this, 0);
+ m_output_pins_changed(0);
// initialize fixed registers
R0 = R0_ALT = 0;
@@ -540,21 +527,18 @@ void dsp32c_device::update_pins(void)
{
if (m_pcr & PCR_ENI)
{
- if (m_output_pins_changed != NULL)
- {
- UINT16 newoutput = 0;
+ UINT16 newoutput = 0;
- if (m_pcr & PCR_PIFs)
- newoutput |= DSP32_OUTPUT_PIF;
+ if (m_pcr & PCR_PIFs)
+ newoutput |= DSP32_OUTPUT_PIF;
- if (m_pcr & PCR_PDFs)
- newoutput |= DSP32_OUTPUT_PDF;
+ if (m_pcr & PCR_PDFs)
+ newoutput |= DSP32_OUTPUT_PDF;
- if (newoutput != m_lastpins)
- {
- m_lastpins = newoutput;
- (*m_output_pins_changed)(*this, newoutput);
- }
+ if (newoutput != m_lastpins)
+ {
+ m_lastpins = newoutput;
+ m_output_pins_changed(newoutput);
}
}
}