summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/firefox.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-05-25 09:27:45 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-05-25 09:27:45 +0000
commit8a4aecdb46911aa25a5d15651571e30e053fb6f0 (patch)
treec648a9daf9079e8aba58b6c401f60bde5673d2bf /src/mame/drivers/firefox.c
parent7a9aefbb60af73285c3da4db61dadd732486b456 (diff)
Conversion of _DEVICE_HANDLER to _MEMBER methods - part 1 (no whatsnew)
Diffstat (limited to 'src/mame/drivers/firefox.c')
-rw-r--r--src/mame/drivers/firefox.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c
index 1ee93bd1cc5..7772b8f5376 100644
--- a/src/mame/drivers/firefox.c
+++ b/src/mame/drivers/firefox.c
@@ -92,6 +92,9 @@ public:
DECLARE_WRITE8_MEMBER(firefox_coin_counter_w);
DECLARE_CUSTOM_INPUT_MEMBER(mainflag_r);
DECLARE_CUSTOM_INPUT_MEMBER(soundflag_r);
+ DECLARE_READ8_MEMBER(riot_porta_r);
+ DECLARE_WRITE8_MEMBER(riot_porta_w);
+ DECLARE_WRITE_LINE_MEMBER(riot_irq);
};
@@ -338,9 +341,9 @@ WRITE8_MEMBER(firefox_state::sound_to_main_w)
*
*************************************/
-static READ8_DEVICE_HANDLER( riot_porta_r )
+READ8_MEMBER(firefox_state::riot_porta_r)
{
- firefox_state *state = device->machine().driver_data<firefox_state>();
+ device_t *tms = machine().device("tms");
/* bit 7 = MAINFLAG */
/* bit 6 = SOUNDFLAG */
/* bit 5 = PA5 */
@@ -350,12 +353,12 @@ static READ8_DEVICE_HANDLER( riot_porta_r )
/* bit 1 = TMS /read */
/* bit 0 = TMS /write */
- return (state->m_main_to_sound_flag << 7) | (state->m_sound_to_main_flag << 6) | 0x10 | (tms5220_readyq_r(device) << 2);
+ return (m_main_to_sound_flag << 7) | (m_sound_to_main_flag << 6) | 0x10 | (tms5220_readyq_r(tms) << 2);
}
-static WRITE8_DEVICE_HANDLER( riot_porta_w )
+WRITE8_MEMBER(firefox_state::riot_porta_w)
{
- device_t *tms = device->machine().device("tms");
+ device_t *tms = machine().device("tms");
/* handle 5220 read */
tms5220_rsq_w(tms, (data>>1) & 1);
@@ -364,9 +367,9 @@ static WRITE8_DEVICE_HANDLER( riot_porta_w )
tms5220_wsq_w(tms, data & 1);
}
-static WRITE_LINE_DEVICE_HANDLER( riot_irq )
+WRITE_LINE_MEMBER(firefox_state::riot_irq)
{
- cputag_set_input_line(device->machine(), "audiocpu", M6502_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -684,11 +687,11 @@ GFXDECODE_END
static const riot6532_interface riot_intf =
{
- DEVCB_DEVICE_HANDLER("tms", riot_porta_r),
+ DEVCB_DRIVER_MEMBER(firefox_state,riot_porta_r),
DEVCB_DEVICE_HANDLER("tms", tms5220_status_r),
- DEVCB_DEVICE_HANDLER("tms", riot_porta_w),
+ DEVCB_DRIVER_MEMBER(firefox_state,riot_porta_w),
DEVCB_DEVICE_HANDLER("tms", tms5220_data_w),
- DEVCB_LINE(riot_irq)
+ DEVCB_DRIVER_LINE_MEMBER(firefox_state,riot_irq)
};