summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ryan Holtz <therealmogminer@gmail.com>2018-05-26 11:47:16 +0200
committer Ryan Holtz <therealmogminer@gmail.com>2018-05-26 11:47:16 +0200
commit33affeb2f8f95d5a5a3872a77567d30db04afdad (patch)
tree4b33206656b4d0644b4ade61a5b00f83957d7eff
parent618f42b96e9b0a4ce5e1b71a53badb9a6c6b9743 (diff)
tp84: device_finder stuff. Also removed a bunch of commented-out stuff that was tripping my device_finder search. (nw)'
-rw-r--r--src/mame/audio/leland.cpp2
-rw-r--r--src/mame/audio/mario.cpp2
-rw-r--r--src/mame/drivers/dectalk.cpp7
-rw-r--r--src/mame/drivers/ghosteo.cpp4
-rw-r--r--src/mame/drivers/gticlub.cpp2
-rw-r--r--src/mame/drivers/norautp.cpp4
-rw-r--r--src/mame/drivers/pc9801.cpp6
-rw-r--r--src/mame/drivers/pcxt.cpp3
-rw-r--r--src/mame/drivers/tp84.cpp9
-rw-r--r--src/mame/includes/tp84.h13
10 files changed, 28 insertions, 24 deletions
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index 53a7c7fc545..4ff24acd042 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -490,7 +490,7 @@ WRITE8_MEMBER( leland_80186_sound_device::leland_80186_control_w )
the next command, it uses an NMI to force the issue; unfortunately, this
seems to really screw up the sound system. It turns out it's better to
just wait for the original interrupt to occur naturally */
-/* machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);*/
+/* m_audiocpu->set_input_line(INPUT_LINE_NMI, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);*/
/* INT0 */
m_audiocpu->int0_w(data & 0x20);
diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp
index 840a4cdfdcc..b95ea00f001 100644
--- a/src/mame/audio/mario.cpp
+++ b/src/mame/audio/mario.cpp
@@ -405,7 +405,7 @@ DISCRETE_SOUND_END
void mario_state::set_ea(int ea)
{
//printf("ea: %d\n", ea);
- //machine().device("audiocpu")->execute().set_input_line(MCS48_INPUT_EA, (ea) ? ASSERT_LINE : CLEAR_LINE);
+ //m_audiocpu->set_input_line(MCS48_INPUT_EA, (ea) ? ASSERT_LINE : CLEAR_LINE);
if (m_eabank != nullptr)
membank(m_eabank)->set_entry(ea);
}
diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp
index 4fdf2846e77..3c313ac6f30 100644
--- a/src/mame/drivers/dectalk.cpp
+++ b/src/mame/drivers/dectalk.cpp
@@ -868,11 +868,10 @@ TIMER_CALLBACK_MEMBER(dectalk_state::outfifo_read_cb)
m_dac->write(data >> 4);
// hack for break key, requires hacked up duart core so disabled for now
// also it doesn't work well, the setup menu is badly corrupt
- /*device_t *duart = machine().device("duart");
- if (machine.input().code_pressed(KEYCODE_F1))
- duart_rx_break(duart, 1, 1);
+ /*if (machine.input().code_pressed(KEYCODE_F1))
+ m_duart->duart_rx_break(1, 1);
else
- duart_rx_break(duart, 1, 0);*/
+ m_duart->duart_rx_break(1, 0);*/
}
MACHINE_CONFIG_START(dectalk_state::dectalk)
diff --git a/src/mame/drivers/ghosteo.cpp b/src/mame/drivers/ghosteo.cpp
index 36c5d13b503..0993736d393 100644
--- a/src/mame/drivers/ghosteo.cpp
+++ b/src/mame/drivers/ghosteo.cpp
@@ -269,7 +269,6 @@ READ32_MEMBER(ghosteo_state::s3c2410_core_pin_r)
WRITE8_MEMBER(ghosteo_state::s3c2410_nand_command_w )
{
struct nand_t &nand = m_nand;
-// device_t *nand = machine().device( "nand");
#if NAND_LOG
logerror( "s3c2410_nand_command_w %02X\n", data);
#endif
@@ -294,7 +293,6 @@ WRITE8_MEMBER(ghosteo_state::s3c2410_nand_command_w )
WRITE8_MEMBER(ghosteo_state::s3c2410_nand_address_w )
{
struct nand_t &nand = m_nand;
-// device_t *nand = machine().device( "nand");
#if NAND_LOG
logerror( "s3c2410_nand_address_w %02X\n", data);
#endif
@@ -329,7 +327,6 @@ WRITE8_MEMBER(ghosteo_state::s3c2410_nand_address_w )
READ8_MEMBER(ghosteo_state::s3c2410_nand_data_r )
{
struct nand_t &nand = m_nand;
-// device_t *nand = machine().device( "nand");
uint8_t data = 0;
switch (nand.mode)
{
@@ -375,7 +372,6 @@ READ8_MEMBER(ghosteo_state::s3c2410_nand_data_r )
WRITE8_MEMBER(ghosteo_state::s3c2410_nand_data_w )
{
-// device_t *nand = machine().device( "nand");
#if NAND_LOG
logerror( "s3c2410_nand_data_w %02X\n", data);
#endif
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp
index 4e050214235..14061e1d728 100644
--- a/src/mame/drivers/gticlub.cpp
+++ b/src/mame/drivers/gticlub.cpp
@@ -922,7 +922,7 @@ uint32_t gticlub_state::screen_update_gticlub(screen_device &screen, bitmap_rgb3
draw_7segment_led(bitmap, 3, 3, m_gticlub_led_reg[0]);
draw_7segment_led(bitmap, 9, 3, m_gticlub_led_reg[1]);
- //machine().device("dsp")->execute().set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE);
+ //m_dsp->set_input_line(SHARC_INPUT_FLAG1, ASSERT_LINE);
m_dsp->set_flag_input(1, ASSERT_LINE);
return 0;
}
diff --git a/src/mame/drivers/norautp.cpp b/src/mame/drivers/norautp.cpp
index 0d96b91970d..756194617e1 100644
--- a/src/mame/drivers/norautp.cpp
+++ b/src/mame/drivers/norautp.cpp
@@ -755,8 +755,8 @@ WRITE8_MEMBER(norautp_state::vram_data_w)
m_np_vram[m_np_addr] = data & 0xff;
/* trigger 8255-2 port C bit 7 (/OBF) */
-// i8255a_pc7_w(machine().device("ppi8255_2"), 0);
-// i8255a_pc7_w(machine().device("ppi8255_2"), 1);
+// m_ppi8255_2->set_pc_bit(7, 0);
+// m_ppi8255_2->set_pc_bit(7, 1);
}
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index ce8ad83ae96..2a16c07b68e 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -2357,9 +2357,9 @@ MACHINE_CONFIG_START(pc9801_state::pc9801_common)
MCFG_DEVICE_ADD("ppi8255_fdd", I8255, 0)
MCFG_I8255_IN_PORTA_CB(CONSTANT(0xff))
- MCFG_I8255_IN_PORTB_CB(CONSTANT(0xff)) //upd765_status_r(machine().device("upd765_2dd"),space, 0);
- MCFG_I8255_IN_PORTC_CB(CONSTANT(0xff)) //upd765_data_r(machine().device("upd765_2dd"),space, 0);
- //MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, pc9801_state, ppi_fdd_portc_w)) //upd765_data_w(machine().device("upd765_2dd"),space, 0,data);
+ MCFG_I8255_IN_PORTB_CB(CONSTANT(0xff))
+ MCFG_I8255_IN_PORTC_CB(CONSTANT(0xff))
+ //MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, pc9801_state, ppi_fdd_portc_w))
MCFG_SOFTWARE_LIST_ADD("disk_list","pc98")
diff --git a/src/mame/drivers/pcxt.cpp b/src/mame/drivers/pcxt.cpp
index 29ef831ac2b..abf47fef67a 100644
--- a/src/mame/drivers/pcxt.cpp
+++ b/src/mame/drivers/pcxt.cpp
@@ -322,8 +322,7 @@ WRITE8_MEMBER(pcxt_state::port_b_w)
m_mb->m_pit8253->write_gate2(BIT(data, 0));
m_mb->pc_speaker_set_spkrdata(BIT(data, 1));
m_port_b_data = data;
-// device_t *cvsd = machine().device("cvsd");
-// hc55516_digit_w(cvsd, data);
+// m_cvsd->digit_w(data);
}
/*Floppy Disk Controller 765 device*/
diff --git a/src/mame/drivers/tp84.cpp b/src/mame/drivers/tp84.cpp
index 804786fc8a5..2a3e273add5 100644
--- a/src/mame/drivers/tp84.cpp
+++ b/src/mame/drivers/tp84.cpp
@@ -72,7 +72,6 @@ C004 76489 #4 trigger
#include "machine/74259.h"
#include "machine/gen_latch.h"
#include "machine/watchdog.h"
-#include "sound/flt_rc.h"
#include "sound/sn76496.h"
#include "speaker.h"
@@ -146,23 +145,23 @@ WRITE8_MEMBER(tp84_state::tp84_filter_w)
C = 0;
if (offset & 0x008) C += 47000; /* 47000pF = 0.047uF */
if (offset & 0x010) C += 470000; /* 470000pF = 0.47uF */
- downcast<filter_rc_device*>(machine().device("filter1"))->filter_rc_set_RC(filter_rc_device::LOWPASS,1000,2200,1000,CAP_P(C));
+ m_filter[0]->filter_rc_set_RC(filter_rc_device::LOWPASS,1000,2200,1000,CAP_P(C));
/* 76489 #1 (optional) */
C = 0;
if (offset & 0x020) C += 47000; /* 47000pF = 0.047uF */
if (offset & 0x040) C += 470000; /* 470000pF = 0.47uF */
- // dynamic_cast<filter_rc_device*>(machine().device("filter2"))->filter_rc_set_RC(,1000,2200,1000,C);
+ // m_filter[1]->filter_rc_set_RC(,1000,2200,1000,C);
/* 76489 #2 */
C = 0;
if (offset & 0x080) C += 470000; /* 470000pF = 0.47uF */
- downcast<filter_rc_device*>(machine().device("filter2"))->filter_rc_set_RC(filter_rc_device::LOWPASS,1000,2200,1000,CAP_P(C));
+ m_filter[1]->filter_rc_set_RC(filter_rc_device::LOWPASS,1000,2200,1000,CAP_P(C));
/* 76489 #3 */
C = 0;
if (offset & 0x100) C += 470000; /* 470000pF = 0.47uF */
- downcast<filter_rc_device*>(machine().device("filter3"))->filter_rc_set_RC(filter_rc_device::LOWPASS,1000,2200,1000,CAP_P(C));
+ m_filter[2]->filter_rc_set_RC(filter_rc_device::LOWPASS,1000,2200,1000,CAP_P(C));
}
WRITE8_MEMBER(tp84_state::tp84_sh_irqtrigger_w)
diff --git a/src/mame/includes/tp84.h b/src/mame/includes/tp84.h
index 169f38957a9..7d38587e2c3 100644
--- a/src/mame/includes/tp84.h
+++ b/src/mame/includes/tp84.h
@@ -1,5 +1,12 @@
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
+
+#ifndef MAME_INCLUDES_TP84
+#define MAME_INCLUDES_TP84
+
+#pragma once
+
+#include "sound/flt_rc.h"
#include "screen.h"
class tp84_state : public driver_device
@@ -20,7 +27,8 @@ public:
m_spriteram(*this, "spriteram"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_filter(*this, "filter%u", 1U) { }
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
@@ -36,6 +44,7 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ required_device_array<filter_rc_device, 3> m_filter;
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
bool m_flipscreen_x;
@@ -70,3 +79,5 @@ public:
void tp84_cpu1_map(address_map &map);
void tp84b_cpu1_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TP84 \ No newline at end of file