summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio
diff options
context:
space:
mode:
author Ryan Holtz <therealmogminer@gmail.com>2018-05-21 22:19:38 +0200
committer Ryan Holtz <therealmogminer@gmail.com>2018-05-21 22:20:05 +0200
commita55f0df6263f1396789c155fb9c9017ab337b366 (patch)
treef0eb0fc5cc2d9e1ca2f32b928085e60f99af78f7 /src/mame/audio
parent7629ebb831d6ec436e5ad6ac4ba3c783203d8fe8 (diff)
voodoo: Use device finders instead of machine().device (nw)
Diffstat (limited to 'src/mame/audio')
-rw-r--r--src/mame/audio/dcs.cpp7
-rw-r--r--src/mame/audio/dcs.h8
-rw-r--r--src/mame/audio/williams.h3
3 files changed, 12 insertions, 6 deletions
diff --git a/src/mame/audio/dcs.cpp b/src/mame/audio/dcs.cpp
index 667e83bdee6..073310c110a 100644
--- a/src/mame/audio/dcs.cpp
+++ b/src/mame/audio/dcs.cpp
@@ -1379,7 +1379,7 @@ WRITE32_MEMBER( dcs_audio_device::dsio_idma_data_w )
}
if (dsio.start_on_next_write && --dsio.start_on_next_write == 0)
{
- logerror("%08X: Starting DSIO CPU\n", machine().device<cpu_device>("maincpu")->pc());
+ logerror("%s: Starting DSIO CPU\n", machine().describe_context());
m_cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
// Restore internal/external mapping
@@ -1631,9 +1631,8 @@ void dcs_audio_device::ack_w()
uint16_t dcs_audio_device::data_r()
{
- // If the cpu is reading empty data it is probably polling so eat some cyles
if IS_OUTPUT_EMPTY()
- machine().device<cpu_device>("maincpu")->eat_cycles(4444);
+ return m_output_data;
/* data is actually only 8 bit (read from d8-d15, which is d0-d7 from the data access instructions POV) on early dcs, but goes 16 on later (seattle) */
if (m_last_output_full && !m_output_full_cb.isnull())
@@ -1681,7 +1680,7 @@ READ16_MEMBER( dcs_audio_device::output_control_r )
int dcs_audio_device::data2_r()
{
if (LOG_DCS_IO)
- logerror("%08X dcs:data2_r = %04X\n", machine().device<cpu_device>("maincpu")->pc(), m_output_control);
+ logerror("%s: dcs:data2_r = %04X\n", machine().describe_context(), m_output_control);
return m_output_control;
}
diff --git a/src/mame/audio/dcs.h b/src/mame/audio/dcs.h
index 66423fe73be..bd5f3931831 100644
--- a/src/mame/audio/dcs.h
+++ b/src/mame/audio/dcs.h
@@ -128,6 +128,12 @@ public:
void dsio_io_map(address_map &map);
void dsio_program_map(address_map &map);
void dsio_rambank_map(address_map &map);
+
+ uint8_t get_rev() { return m_rev; } // TODO(RH): This can be done better, and shouldn't be necessary.
+ cpu_device *get_cpu() { return m_cpu; } // TODO(RH): Same.
+
+ enum { REV_DCS1, REV_DCS1P5, REV_DCS2, REV_DSIO, REV_DENV };
+
protected:
// construction/destruction
dcs_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int rev);
@@ -137,8 +143,6 @@ protected:
virtual void device_reset() override;
void add_mconfig_dcs(machine_config &config);
- // Formerly DCS1=1 DCS1P5=15 DCS2=2 DSIO=3 DENV=4
- enum { REV_DCS1, REV_DCS1P5, REV_DCS2, REV_DSIO, REV_DENV };
static constexpr const char *const denver_regname[4] =
{ "SDRC_ROM", "SDRC_IO", "RAM_PAGE", "VER/FIFO_RESET" };
diff --git a/src/mame/audio/williams.h b/src/mame/audio/williams.h
index 5a46b2b9853..2f75d3da043 100644
--- a/src/mame/audio/williams.h
+++ b/src/mame/audio/williams.h
@@ -150,6 +150,9 @@ public:
void williams_adpcm_map(address_map &map);
void williams_adpcm_oki_map(address_map &map);
+
+ mc6809e_device *get_cpu() { return m_cpu; }
+
protected:
// timer IDs
enum